Files
klz-cables.com/.pnpm-store/v10/files/01/32ee7a98677f696b881651913da122d5eee2b617eb0988e7345fc785c76876a64c22eae85922e50de411470a12f5b8476fd04b844ede57d71b7b893c6876bc
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

33 lines
1.5 KiB
Plaintext

import { type CollectionConfig, type GlobalConfig, type Operation, type PayloadRequest, type SanitizedConfig } from 'payload';
/**
* Multi-level check to determine whether live preview is enabled on a collection or global.
* For example, live preview can be enabled at both the root config level, or on the entity's config.
* If a collectionConfig/globalConfig is provided, checks if it is enabled at the root level,
* or on the entity's own config.
*/
export declare const isPreviewEnabled: ({ collectionConfig, globalConfig, }: {
collectionConfig?: CollectionConfig;
globalConfig?: GlobalConfig;
}) => boolean;
/**
* 1. Looks up the relevant live preview config, which could have been enabled:
* a. At the root level, e.g. `collections: ['posts']`
* b. On the collection or global config, e.g. `admin: { livePreview: { ... } }`
* 2. Determines if live preview is enabled, and if not, early returns.
* 3. Merges the config with the root config, if necessary.
* 4. Executes the `url` function, if necessary.
*
* Notice: internal function only. Subject to change at any time. Use at your own risk.
*/
export declare const handlePreview: ({ collectionSlug, config, data, globalSlug, operation, req, }: {
collectionSlug?: string;
config: SanitizedConfig;
data: Record<string, unknown>;
globalSlug?: string;
operation?: Operation;
req: PayloadRequest;
}) => Promise<{
isPreviewEnabled?: boolean;
previewURL?: string;
}>;
//# sourceMappingURL=handlePreview.d.ts.map