Files
klz-cables.com/.pnpm-store/v10/files/25/a24b9bc57175ce8ab12ba44705302d14ff748fea9daaddbed0f2358b0f155ae9e7de4b57c72ed8ee553cd68a983680aced7fc8410fe342ce40a51f62db382f
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

57 lines
2.2 KiB
Plaintext

import type { Data, DefaultDocumentIDType, FormState, Operation } from 'payload';
import type React from 'react';
import type { HTMLAttributes } from 'react';
import type { Props as DrawerProps } from '../Drawer/types.js';
import type { DocumentDrawerContextProps } from './Provider.js';
export type DocumentDrawerProps = {
readonly AfterFields?: React.ReactNode;
/**
* The slug of the collection to which the document belongs.
*/
readonly collectionSlug: string;
readonly disableActions?: boolean;
readonly drawerSlug?: string;
/**
* The ID of the document to be edited.
* When provided, will be fetched and displayed in the drawer.
* If omitted, will render the "create new" view for the given collection.
*/
readonly id?: DefaultDocumentIDType | null;
readonly initialData?: Data;
/**
* @deprecated
*/
readonly initialState?: FormState;
readonly overrideEntityVisibility?: boolean;
readonly redirectAfterCreate?: boolean;
readonly redirectAfterDelete?: boolean;
readonly redirectAfterDuplicate?: boolean;
readonly redirectAfterRestore?: boolean;
} & Pick<DocumentDrawerContextProps, 'onDelete' | 'onDuplicate' | 'onSave'> & Pick<DrawerProps, 'Header'>;
export type DocumentTogglerProps = {
readonly children?: React.ReactNode;
readonly className?: string;
readonly collectionSlug: string;
readonly disabled?: boolean;
readonly drawerSlug?: string;
readonly onClick?: () => void;
readonly operation: Operation;
} & Readonly<HTMLAttributes<HTMLButtonElement>>;
export type UseDocumentDrawerContext = {
closeDrawer: () => void;
drawerDepth: number;
drawerSlug: string;
isDrawerOpen: boolean;
openDrawer: () => void;
toggleDrawer: () => void;
};
export type UseDocumentDrawer = (args: Pick<DocumentDrawerProps, 'collectionSlug' | 'id' | 'overrideEntityVisibility'>) => [
React.FC<{
children?: React.ReactNode;
} & Omit<DocumentDrawerProps, 'collectionSlug' | 'operation'>>,
React.FC<{
children?: React.ReactNode;
} & Omit<DocumentTogglerProps, 'collectionSlug' | 'operation'>>,
UseDocumentDrawerContext
];
//# sourceMappingURL=types.d.ts.map