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
1 line
1.9 KiB
Plaintext
1 line
1.9 KiB
Plaintext
{"version":3,"file":"index.js","names":["React","ContextFolderFileCard","baseClass","ItemCardGrid","type","items","subfolderCount","title","_jsxs","_Fragment","_jsx","className","length","map","item","_index","index","itemKey"],"sources":["../../../../src/elements/FolderView/ItemCardGrid/index.tsx"],"sourcesContent":["'use client'\n\nimport type { FolderOrDocument } from 'payload/shared'\n\nimport React from 'react'\n\nimport { ContextFolderFileCard } from '../FolderFileCard/index.js'\nimport './index.scss'\n\nconst baseClass = 'item-card-grid'\n\ntype ItemCardGridProps = {\n items: FolderOrDocument[]\n title?: string\n} & (\n | {\n subfolderCount: number\n type: 'file'\n }\n | {\n subfolderCount?: never\n type: 'folder'\n }\n)\nexport function ItemCardGrid({ type, items, subfolderCount, title }: ItemCardGridProps) {\n return (\n <>\n {title && <p className={`${baseClass}__title`}>{title}</p>}\n <div className={baseClass}>\n {!items || items?.length === 0\n ? null\n : items.map((item, _index) => {\n const index = _index + (subfolderCount || 0)\n const { itemKey } = item\n\n return <ContextFolderFileCard index={index} item={item} key={itemKey} type={type} />\n })}\n </div>\n </>\n )\n}\n"],"mappings":"AAAA;;;AAIA,OAAOA,KAAA,MAAW;AAElB,SAASC,qBAAqB,QAAQ;AACtC,OAAO;AAEP,MAAMC,SAAA,GAAY;AAelB,OAAO,SAASC,aAAa;EAAEC,IAAI;EAAEC,KAAK;EAAEC,cAAc;EAAEC;AAAK,CAAqB;EACpF,oBACEC,KAAA,CAAAC,SAAA;eACGF,KAAA,iBAASG,IAAA,CAAC;MAAEC,SAAA,EAAW,GAAGT,SAAA,SAAkB;gBAAGK;qBAChDG,IAAA,CAAC;MAAIC,SAAA,EAAWT,SAAA;gBACb,CAACG,KAAA,IAASA,KAAA,EAAOO,MAAA,KAAW,IACzB,OACAP,KAAA,CAAMQ,GAAG,CAAC,CAACC,IAAA,EAAMC,MAAA;QACf,MAAMC,KAAA,GAAQD,MAAA,IAAUT,cAAA,IAAkB;QAC1C,MAAM;UAAEW;QAAO,CAAE,GAAGH,IAAA;QAEpB,oBAAOJ,IAAA,CAACT,qBAAA;UAAsBe,KAAA,EAAOA,KAAA;UAAOF,IAAA,EAAMA,IAAA;UAAoBV,IAAA,EAAMA;WAAfa,OAAA;MAC/D;;;AAIZ","ignoreList":[]} |