Files
klz-cables.com/.pnpm-store/v10/files/20/38169627be30db5c99d2b80c00fe6db4d40c67946fe09d55a30e6332c0765ddeb53e69a3e93a3ce345c0b5f415efbf3f2fdc7dbe79d2a061149606fa8da373
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.5 KiB
Plaintext

{"version":3,"file":"Provider.js","names":["createContext","use","DocumentDrawerCallbacksContext","DocumentDrawerContextProvider","children","rest","_jsx","value","useDocumentDrawerContext","context","Error"],"sources":["../../../src/elements/DocumentDrawer/Provider.tsx"],"sourcesContent":["import type { ClientCollectionConfig, Data, FormState, TypeWithID } from 'payload'\n\nimport { createContext, use } from 'react'\n\nexport type DocumentDrawerContextProps = {\n readonly clearDoc?: () => void\n readonly drawerSlug: string\n readonly onDelete?: (args: {\n collectionConfig?: ClientCollectionConfig\n id: string\n }) => Promise<void> | void\n /* only available if `redirectAfterDuplicate` is `false` */\n readonly onDuplicate?: (args: {\n collectionConfig?: ClientCollectionConfig\n doc: TypeWithID\n }) => Promise<void> | void\n readonly onRestore?: (args: {\n collectionConfig?: ClientCollectionConfig\n id: string\n }) => Promise<void> | void\n readonly onSave?: (args: {\n collectionConfig?: ClientCollectionConfig\n /**\n * If you want to pass additional data to the onSuccess callback, you can use this context object.\n *\n * @experimental This property is experimental and may change in the future. Use at your own risk.\n */\n context?: Record<string, unknown>\n doc: TypeWithID\n operation: 'create' | 'update'\n result: Data\n }) => Promise<FormState | void> | void\n}\n\nexport type DocumentDrawerContextType = {} & DocumentDrawerContextProps\n\nexport const DocumentDrawerCallbacksContext = createContext({} as DocumentDrawerContextType)\n\nexport const DocumentDrawerContextProvider: React.FC<\n {\n children: React.ReactNode\n } & DocumentDrawerContextProps\n> = ({ children, ...rest }) => {\n return (\n <DocumentDrawerCallbacksContext value={{ ...rest }}>{children}</DocumentDrawerCallbacksContext>\n )\n}\n\nexport const useDocumentDrawerContext = (): DocumentDrawerContextType => {\n const context = use(DocumentDrawerCallbacksContext)\n\n if (!context) {\n throw new Error('useDocumentDrawerContext must be used within a DocumentDrawerProvider')\n }\n\n return context\n}\n"],"mappings":";AAEA,SAASA,aAAa,EAAEC,GAAG,QAAQ;AAkCnC,OAAO,MAAMC,8BAAA,gBAAiCF,aAAA,CAAc,CAAC;AAE7D,OAAO,MAAMG,6BAAA,GAITA,CAAC;EAAEC,QAAQ;EAAE,GAAGC;AAAA,CAAM;EACxB,oBACEC,IAAA,CAACJ,8BAAA;IAA+BK,KAAA,EAAO;MAAE,GAAGF;IAAK;cAAID;;AAEzD;AAEA,OAAO,MAAMI,wBAAA,GAA2BA,CAAA;EACtC,MAAMC,OAAA,GAAUR,GAAA,CAAIC,8BAAA;EAEpB,IAAI,CAACO,OAAA,EAAS;IACZ,MAAM,IAAIC,KAAA,CAAM;EAClB;EAEA,OAAOD,OAAA;AACT","ignoreList":[]}