Files
klz-cables.com/.pnpm-store/v10/files/a1/0713a2b9720d19d9529033cb37266bdb28f559db13ec43124f5117797122f6d11e3f2cfaf4eebc8492e44db68143351789db01bc9a362ae021358aad86ebff
Marc Mintel 5397309103
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
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

1 line
3.7 KiB
Plaintext

{"version":3,"file":"types.js","names":[],"sources":["../../../src/elements/ReactSelect/types.ts"],"sourcesContent":["import type { LabelFunction } from 'payload'\nimport type { CommonProps, GroupBase, Props as ReactSelectStateManagerProps } from 'react-select'\n\nimport type { DocumentDrawerProps } from '../DocumentDrawer/types.js'\n\ntype CustomSelectProps = {\n disableKeyDown?: boolean\n disableMouseDown?: boolean\n draggableProps?: any\n droppableRef?: React.RefObject<HTMLDivElement | null>\n editableProps?: (\n data: Option<{ label: string; value: string }>,\n className: string,\n selectProps: ReactSelectStateManagerProps,\n ) => any\n onDelete?: DocumentDrawerProps['onDelete']\n onDocumentOpen?: (args: {\n collectionSlug: string\n hasReadPermission: boolean\n id: number | string\n openInNewTab?: boolean\n }) => void\n onDuplicate?: DocumentDrawerProps['onSave']\n onSave?: DocumentDrawerProps['onSave']\n valueContainerLabel?: string\n}\n\n// augment the types for the `Select` component from `react-select`\n// this is to include the `selectProps` prop at the top-level `Select` component\n// @ts-expect-error-next-line // TODO Fix this - moduleResolution 16 breaks our declare module\ndeclare module 'react-select/dist/declarations/src/Select' {\n export interface Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {\n customProps?: CustomSelectProps\n }\n}\n\n// augment the types for the `CommonPropsAndClassName` from `react-select`\n// this will include the `selectProps` prop to every `react-select` component automatically\n// @ts-expect-error-next-line // TODO Fix this - moduleResolution 16 breaks our declare module\ndeclare module 'react-select/dist/declarations/src' {\n export interface CommonPropsAndClassName<\n Option,\n IsMulti extends boolean,\n Group extends GroupBase<Option>,\n > extends CommonProps<Option, IsMulti, Group> {\n customProps?: CustomSelectProps & ReactSelectStateManagerProps<Option, IsMulti, Group>\n }\n}\n\nexport type Option<TValue = unknown> = {\n [key: string]: unknown\n //* The ID is used to identify the option in the UI. If it doesn't exist and value cannot be transformed into a string, sorting won't work */\n id?: string\n value: TValue\n}\n\nexport type OptionGroup = {\n label: string\n options: Option[]\n}\n\nexport type ReactSelectAdapterProps = {\n backspaceRemovesValue?: boolean\n blurInputOnSelect?: boolean\n className?: string\n components?: {\n [key: string]: React.FC<any>\n }\n customProps?: CustomSelectProps\n disabled?: boolean\n filterOption?:\n | ((\n {\n allowEdit,\n data,\n label,\n value,\n }: { allowEdit: boolean; data: Option; label: string; value: string },\n search: string,\n ) => boolean)\n | undefined\n getOptionValue?: ReactSelectStateManagerProps<\n Option,\n boolean,\n GroupBase<Option>\n >['getOptionValue']\n id?: string\n inputId?: string\n isClearable?: boolean\n /** Allows you to create own values in the UI despite them not being pre-specified */\n isCreatable?: boolean\n isLoading?: boolean\n /** Allows you to specify multiple values instead of just one */\n isMulti?: boolean\n isOptionSelected?: any\n isSearchable?: boolean\n isSortable?: boolean\n menuIsOpen?: boolean\n noOptionsMessage?: (obj: { inputValue: string }) => string\n numberOnly?: boolean\n onChange?: (value: Option | Option[]) => void\n onInputChange?: (val: string) => void\n onMenuClose?: () => void\n onMenuOpen?: () => void\n onMenuScrollToBottom?: () => void\n options: Option[] | OptionGroup[]\n placeholder?: LabelFunction | string\n showError?: boolean\n value?: Option | Option[]\n}\n"],"mappings":"AA6DA","ignoreList":[]}