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":["c","_c","getTranslation","React","useTranslation","ArrayCell","t0","$","cellData","field","t1","labels","i18n","arrayFields","label","length","singular","t","plural","t2","_jsx","children"],"sources":["../../../../../../src/elements/Table/DefaultCell/fields/Array/index.tsx"],"sourcesContent":["'use client'\nimport type { ArrayFieldClient, DefaultCellComponentProps } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React from 'react'\n\nimport { useTranslation } from '../../../../../providers/Translation/index.js'\n\nexport interface ArrayCellProps extends DefaultCellComponentProps<ArrayFieldClient> {}\n\nexport const ArrayCell: React.FC<ArrayCellProps> = ({ cellData, field: { labels } }) => {\n const { i18n } = useTranslation()\n\n const arrayFields = cellData ?? []\n\n const label =\n arrayFields.length === 1\n ? `${arrayFields.length} ${getTranslation(labels?.singular || i18n.t('general:rows'), i18n)}`\n : `${arrayFields.length} ${getTranslation(labels?.plural || i18n.t('general:rows'), i18n)}`\n\n return <span>{label}</span>\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,cAAc,QAAQ;AAI/B,OAAO,MAAMC,SAAA,GAAsCC,EAAA;EAAA,MAAAC,CAAA,GAAAN,EAAA;EAAC;IAAAO,QAAA;IAAAC,KAAA,EAAAC;EAAA,IAAAJ,EAA+B;EAAZ;IAAAK;EAAA,IAAAD,EAAU;EAC/E;IAAAE;EAAA,IAAiBR,cAAA;EAEjB,MAAAS,WAAA,GAAoBL,QAAA,MAAc;EAElC,MAAAM,KAAA,GACED,WAAA,CAAAE,MAAA,MAAuB,GACnB,GAAGF,WAAA,CAAAE,MAAA,IAAsBb,cAAA,CAAeS,MAAA,EAAAK,QAAA,IAAoBJ,IAAA,CAAAK,CAAA,CAAO,iBAAiBL,IAAA,GAAO,GAC3F,GAAGC,WAAA,CAAAE,MAAA,IAAsBb,cAAA,CAAeS,MAAA,EAAAO,MAAA,IAAkBN,IAAA,CAAAK,CAAA,CAAO,iBAAiBL,IAAA,GAAO;EAAA,IAAAO,EAAA;EAAA,IAAAZ,CAAA,QAAAO,KAAA;IAExFK,EAAA,GAAAC,IAAA,CAAC;MAAAC,QAAA,EAAMP;IAAA,C;;;;;;SAAPK,E;CACT","ignoreList":[]} |