Files
klz-cables.com/.pnpm-store/v10/files/9d/96167f50badd0395daacddb5910f970121d9f121b147f74be4343a8c3195f2bd70ddd62fdf7cf77abcdb41188e3d2f4f3145f08d20fe982ce78304831aad7d
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.2 KiB
Plaintext

{"version":3,"sources":["../../src/folders/types.ts"],"sourcesContent":["import type { CollectionConfig, TypeWithID } from '../collections/config/types.js'\nimport type { CollectionSlug, SanitizedCollectionConfig } from '../index.js'\nimport type { Document } from '../types/index.js'\n\nexport type FolderInterface = {\n documentsAndFolders?: {\n docs: {\n relationTo: CollectionSlug\n value: Document\n }[]\n }\n folder?: FolderInterface | (number | string | undefined)\n folderType: CollectionSlug[]\n name: string\n} & TypeWithID\n\nexport type FolderBreadcrumb = {\n folderType?: CollectionSlug[]\n id: null | number | string\n name: string\n}\n\nexport type Subfolder = {\n fileCount: number\n hasSubfolders: boolean\n id: number | string\n name: string\n subfolderCount: number\n}\n\nexport type FolderEnabledColection = {\n admin: {\n custom: {\n folderCollectionSlug: CollectionSlug\n }\n }\n slug: CollectionSlug\n} & SanitizedCollectionConfig\n\n/**\n * `${relationTo}-${id}` is used as a key for the item\n */\nexport type FolderDocumentItemKey = `${string}-${number | string}`\n\n/**\n * Needed for document card view for upload enabled collections\n */\ntype DocumentMediaData = {\n filename?: string\n mimeType?: string\n url?: string\n}\n/**\n * A generic structure for a folder or document item.\n */\nexport type FolderOrDocument = {\n itemKey: FolderDocumentItemKey\n relationTo: CollectionSlug\n value: {\n _folderOrDocumentTitle: string\n createdAt?: string\n folderID?: number | string\n folderType: CollectionSlug[]\n id: number | string\n updatedAt?: string\n } & DocumentMediaData\n}\n\nexport type GetFolderDataResult = {\n breadcrumbs: FolderBreadcrumb[] | null\n documents: FolderOrDocument[]\n folderAssignedCollections: CollectionSlug[] | undefined\n subfolders: FolderOrDocument[]\n}\n\nexport type RootFoldersConfiguration = {\n /**\n * If true, the browse by folder view will be enabled\n *\n * @default true\n */\n browseByFolder?: boolean\n /**\n * An array of functions to be ran when the folder collection is initialized\n * This allows plugins to modify the collection configuration\n */\n collectionOverrides?: (({\n collection,\n }: {\n collection: Omit<CollectionConfig, 'trash'>\n }) => Omit<CollectionConfig, 'trash'> | Promise<Omit<CollectionConfig, 'trash'>>)[]\n /**\n * If true, you can scope folders to specific collections.\n *\n * @default true\n */\n collectionSpecific?: boolean\n /**\n * Ability to view hidden fields and collections related to folders\n *\n * @default false\n */\n debug?: boolean\n /**\n * The Folder field name\n *\n * @default \"folder\"\n */\n fieldName?: string\n /**\n * Slug for the folder collection\n *\n * @default \"payload-folders\"\n */\n slug?: string\n}\n\nexport type CollectionFoldersConfiguration = {\n /**\n * If true, the collection will be included in the browse by folder view\n *\n * @default true\n */\n browseByFolder?: boolean\n}\n\ntype BaseFolderSortKeys = 'createdAt' | 'name' | 'updatedAt'\n\nexport type FolderSortKeys = `-${BaseFolderSortKeys}` | BaseFolderSortKeys\n"],"names":[],"mappings":"AAgIA,WAA0E"}