Files
klz-cables.com/.pnpm-store/v10/files/a7/e0ae01f6b59935d52eaa1d96e095fb332e07ada806b03cf8a67f7cce2d7596f33258204fa23cb76daee46b77567be1e28f80baa9a0f2e5ed4e1f22f68b5591
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
2.9 KiB
Plaintext

{"version":3,"file":"Provider.js","names":["createContext","use","ListDrawerContext","ListDrawerContextProvider","children","rest","_jsx","value","isInDrawer","Boolean","drawerSlug","useListDrawerContext","context","Error"],"sources":["../../../src/elements/ListDrawer/Provider.tsx"],"sourcesContent":["import type { CollectionSlug, Data, ListQuery } from 'payload'\n\nimport { createContext, use } from 'react'\n\nimport type { useSelection } from '../../providers/Selection/index.js'\nimport type { UseDocumentDrawer } from '../DocumentDrawer/types.js'\nimport type { Option } from '../ReactSelect/index.js'\n\nexport type ListDrawerContextProps = {\n readonly allowCreate?: boolean\n readonly createNewDrawerSlug?: string\n readonly DocumentDrawerToggler?: ReturnType<UseDocumentDrawer>[1]\n readonly drawerSlug?: string\n readonly enabledCollections?: CollectionSlug[]\n readonly onBulkSelect?: (selected: ReturnType<typeof useSelection>['selected']) => void\n readonly onQueryChange?: (query: ListQuery) => void\n readonly onSelect?: (args: {\n collectionSlug: CollectionSlug\n doc: Data\n /**\n * @deprecated\n * The `docID` property is deprecated and will be removed in the next major version of Payload.\n * Use `doc.id` instead.\n */\n docID: string\n }) => void\n readonly selectedOption?: Option<CollectionSlug>\n readonly setSelectedOption?: (option: Option<CollectionSlug>) => void\n}\n\nexport type ListDrawerContextType = {\n readonly isInDrawer: boolean\n /**\n * When called, will either refresh the list view with its currently selected collection.\n * If an collection slug is provided, will use that instead of the currently selected one.\n */\n readonly refresh: (collectionSlug?: CollectionSlug) => Promise<void>\n} & ListDrawerContextProps\n\nexport const ListDrawerContext = createContext({} as ListDrawerContextType)\n\nexport const ListDrawerContextProvider: React.FC<\n {\n children: React.ReactNode\n refresh: ListDrawerContextType['refresh']\n } & ListDrawerContextProps\n> = ({ children, ...rest }) => {\n return (\n <ListDrawerContext value={{ isInDrawer: Boolean(rest.drawerSlug), ...rest }}>\n {children}\n </ListDrawerContext>\n )\n}\n\nexport const useListDrawerContext = (): ListDrawerContextType => {\n const context = use(ListDrawerContext)\n\n if (!context) {\n throw new Error('useListDrawerContext must be used within a ListDrawerContextProvider')\n }\n\n return context\n}\n"],"mappings":";AAEA,SAASA,aAAa,EAAEC,GAAG,QAAQ;AAqCnC,OAAO,MAAMC,iBAAA,gBAAoBF,aAAA,CAAc,CAAC;AAEhD,OAAO,MAAMG,yBAAA,GAKTA,CAAC;EAAEC,QAAQ;EAAE,GAAGC;AAAA,CAAM;EACxB,oBACEC,IAAA,CAACJ,iBAAA;IAAkBK,KAAA,EAAO;MAAEC,UAAA,EAAYC,OAAA,CAAQJ,IAAA,CAAKK,UAAU;MAAG,GAAGL;IAAK;cACvED;;AAGP;AAEA,OAAO,MAAMO,oBAAA,GAAuBA,CAAA;EAClC,MAAMC,OAAA,GAAUX,GAAA,CAAIC,iBAAA;EAEpB,IAAI,CAACU,OAAA,EAAS;IACZ,MAAM,IAAIC,KAAA,CAAM;EAClB;EAEA,OAAOD,OAAA;AACT","ignoreList":[]}