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.6 KiB
Plaintext
1 line
2.6 KiB
Plaintext
{"version":3,"file":"index.js","names":["getTranslation","React","components","SelectComponents","useTranslation","baseClass","ValueContainer","props","selectProps","t0","customProps","value","undefined","i18n","titleText","Array","isArray","labelText","label","_jsxs","className","ref","droppableRef","title","children","valueContainerLabel","_jsx"],"sources":["../../../../src/elements/ReactSelect/ValueContainer/index.tsx"],"sourcesContent":["'use client'\nimport type { OptionLabel } from 'payload'\nimport type { ValueContainerProps } from 'react-select'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React from 'react'\nimport { components as SelectComponents } from 'react-select'\n\nimport type { Option } from '../types.js'\n\nimport { useTranslation } from '../../../providers/Translation/index.js'\nimport './index.scss'\n\nconst baseClass = 'value-container'\n\nexport const ValueContainer: React.FC<ValueContainerProps<Option, any>> = (props) => {\n // @ts-expect-error-next-line // TODO Fix this - moduleResolution 16 breaks our declare module\n const { selectProps: { customProps, value } = {} } = props\n const { i18n } = useTranslation()\n\n // Get the title for single-value selects\n let titleText = ''\n if (value && !Array.isArray(value) && typeof value === 'object' && 'label' in value) {\n const labelText = value.label ? getTranslation(value.label as OptionLabel, i18n) : ''\n titleText = typeof labelText === 'string' ? labelText : ''\n }\n\n return (\n <div className={baseClass} ref={customProps?.droppableRef} title={titleText}>\n {customProps?.valueContainerLabel && (\n <span className={`${baseClass}__label`}>{customProps?.valueContainerLabel}</span>\n )}\n <SelectComponents.ValueContainer {...props} />\n </div>\n )\n}\n"],"mappings":"AAAA;;;AAIA,SAASA,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAClB,SAASC,UAAA,IAAcC,gBAAgB,QAAQ;AAI/C,SAASC,cAAc,QAAQ;AAC/B,OAAO;AAEP,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,cAAA,GAA6DC,KAAA;EAExE;IAAAC,WAAA,EAAAC;EAAA,IAAqDF,KAAA;EAAhC;IAAAG,WAAA;IAAAC;EAAA,IAAAF,EAA2B,KAAAG,SAAA,QAA3BH,EAA2B;EAChD;IAAAI;EAAA,IAAiBT,cAAA;EAGjB,IAAAU,SAAA,GAAgB;EAAA,IACZH,KAAA,KAAUI,KAAA,CAAAC,OAAA,CAAcL,KAAA,KAAU,OAAOA,KAAA,KAAU,YAAY,WAAWA,KAAA;IAC5E,MAAAM,SAAA,GAAkBN,KAAA,CAAAO,KAAA,GAAclB,cAAA,CAAeW,KAAA,CAAAO,KAAA,EAA4BL,IAAA,IAAQ;IACnFC,SAAA,CAAAA,CAAA,CAAYA,MAAA,CAAOG,SAAA,KAAc,WAAWA,SAAA,GAAY;EAAxD;EAAA,OAIAE,KAAA,CAAC;IAAAC,SAAA,EAAAf,SAAA;IAAAgB,GAAA,EAA+BX,WAAA,EAAAY,YAAA;IAAAC,KAAA,EAAkCT,SAAA;IAAAU,QAAA,GAC/Dd,WAAA,EAAAe,mBAAA,IACCC,IAAA,CAAC;MAAAN,SAAA,EAAgB,GAAAf,SAAA,SAAqB;MAAAmB,QAAA,EAAGd,WAAA,EAAAe;IAAA,C,GAE3CC,IAAA,CAAAvB,gBAAA,CAAAG,cAAA;MAAA,GAAqCC;IAAK,C;;CAGhD","ignoreList":[]} |