Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
1 line
2.7 KiB
Plaintext
1 line
2.7 KiB
Plaintext
{"version":3,"file":"index.js","names":["React","components","SelectComponents","Control","props","children","innerProps","selectProps","customProps","disableKeyDown","disableMouseDown","_jsx","Fragment","onKeyDown","e","stopPropagation","bypassEvent","CustomEvent","detail","document","dispatchEvent","onMouseDown"],"sources":["../../../../src/elements/ReactSelect/Control/index.tsx"],"sourcesContent":["'use client'\nimport type { ControlProps } from 'react-select'\n\nimport React from 'react'\nimport { components as SelectComponents } from 'react-select'\n\nimport type { Option } from '../types.js'\n\nexport const Control: React.FC<ControlProps<Option, any>> = (props) => {\n const {\n children,\n innerProps,\n // @ts-expect-error-next-line // TODO Fix this - moduleResolution 16 breaks our declare module\n selectProps: { customProps: { disableKeyDown, disableMouseDown } = {} } = {},\n } = props\n\n return (\n <React.Fragment>\n <SelectComponents.Control\n {...props}\n innerProps={{\n ...innerProps,\n onKeyDown: (e) => {\n if (disableKeyDown) {\n e.stopPropagation()\n // Create event for keydown listeners which specifically want to bypass this stopPropagation\n const bypassEvent = new CustomEvent('bypassKeyDown', { detail: e })\n document.dispatchEvent(bypassEvent)\n }\n },\n // react-select has this typed incorrectly so we disable the linting rule\n // we need to prevent react-select from hijacking the 'onKeyDown' event while modals are open (i.e. the 'Relationship' field component)\n\n onMouseDown: (e) => {\n // we need to prevent react-select from hijacking the 'onMouseDown' event while modals are open (i.e. the 'Relationship' field component)\n if (!disableMouseDown) {\n innerProps.onMouseDown(e)\n }\n },\n }}\n >\n {children}\n </SelectComponents.Control>\n </React.Fragment>\n )\n}\n"],"mappings":"AAAA;;;AAGA,OAAOA,KAAA,MAAW;AAClB,SAASC,UAAA,IAAcC,gBAAgB,QAAQ;AAI/C,OAAO,MAAMC,OAAA,GAAgDC,KAAA;EAC3D,MAAM;IACJC,QAAQ;IACRC,UAAU;IACV;IACAC,WAAA,EAAa;MAAEC,WAAA,EAAa;QAAEC,cAAc;QAAEC;MAAgB,CAAE,GAAG,CAAC;IAAC,CAAE,GAAG,CAAC;EAAC,CAC7E,GAAGN,KAAA;EAEJ,oBACEO,IAAA,CAACX,KAAA,CAAMY,QAAQ;cACb,aAAAD,IAAA,CAACT,gBAAA,CAAiBC,OAAO;MACtB,GAAGC,KAAK;MACTE,UAAA,EAAY;QACV,GAAGA,UAAU;QACbO,SAAA,EAAYC,CAAA;UACV,IAAIL,cAAA,EAAgB;YAClBK,CAAA,CAAEC,eAAe;YACjB;YACA,MAAMC,WAAA,GAAc,IAAIC,WAAA,CAAY,iBAAiB;cAAEC,MAAA,EAAQJ;YAAE;YACjEK,QAAA,CAASC,aAAa,CAACJ,WAAA;UACzB;QACF;QACA;QACA;QAEAK,WAAA,EAAcP,CAAA;UACZ;UACA,IAAI,CAACJ,gBAAA,EAAkB;YACrBJ,UAAA,CAAWe,WAAW,CAACP,CAAA;UACzB;QACF;MACF;gBAECT;;;AAIT","ignoreList":[]} |