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.8 KiB
Plaintext
1 line
1.8 KiB
Plaintext
{"version":3,"file":"index.js","names":["toWords","React","Fragment","QueryPresetsAccessCell","cellData","operations","_jsx","reduce","acc","operation","index","operationData","constraint","push","_jsxs","length"],"sources":["../../../../../src/elements/QueryPresets/cells/AccessCell/index.tsx"],"sourcesContent":["import type { DefaultCellComponentProps } from 'payload'\nimport type { JSX } from 'react'\n\nimport { toWords } from 'payload/shared'\nimport React, { Fragment } from 'react'\n\nexport const QueryPresetsAccessCell: React.FC<DefaultCellComponentProps> = ({ cellData }) => {\n // first sort the operations in the order they should be displayed\n const operations = ['read', 'update', 'delete']\n\n return (\n <p>\n {operations.reduce((acc, operation, index) => {\n const operationData = (cellData as JSON)?.[operation]\n\n if (operationData && operationData.constraint) {\n acc.push(\n <Fragment key={operation}>\n <span>\n <strong>{toWords(operation)}</strong>: {toWords(operationData.constraint)}\n </span>\n {index !== operations.length - 1 && ', '}\n </Fragment>,\n )\n }\n return acc\n }, [] as JSX.Element[])}\n </p>\n )\n}\n"],"mappings":";AAGA,SAASA,OAAO,QAAQ;AACxB,OAAOC,KAAA,IAASC,QAAQ,QAAQ;AAEhC,OAAO,MAAMC,sBAAA,GAA8DA,CAAC;EAAEC;AAAQ,CAAE;EACtF;EACA,MAAMC,UAAA,GAAa,CAAC,QAAQ,UAAU,SAAS;EAE/C,oBACEC,IAAA,CAAC;cACED,UAAA,CAAWE,MAAM,CAAC,CAACC,GAAA,EAAKC,SAAA,EAAWC,KAAA;MAClC,MAAMC,aAAA,GAAiBP,QAAA,GAAoBK,SAAA,CAAU;MAErD,IAAIE,aAAA,IAAiBA,aAAA,CAAcC,UAAU,EAAE;QAC7CJ,GAAA,CAAIK,IAAI,cACNC,KAAA,CAACZ,QAAA;kCACCY,KAAA,CAAC;oCACCR,IAAA,CAAC;wBAAQN,OAAA,CAAQS,SAAA;gBAAoB,MAAGT,OAAA,CAAQW,aAAA,CAAcC,UAAU;cAEzEF,KAAA,KAAUL,UAAA,CAAWU,MAAM,GAAG,KAAK;WAJvBN,SAAA;MAOnB;MACA,OAAOD,GAAA;IACT,GAAG,EAAE;;AAGX","ignoreList":[]} |