Files
klz-cables.com/.pnpm-store/v10/files/41/d9c3dc9b7f8662c3807d303a489f6958aa54ae3770f263579dcb0015e5e7c6a5275ad4042e2eae6bc59bb212651fa02a853d9ab9d00750a8e690d481db5af1
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
1.4 KiB
Plaintext

{"version":3,"sources":["../../../src/transform/read/hasManyText.ts"],"sourcesContent":["import type { TextField } from 'payload'\n\ntype Args = {\n field: TextField\n locale?: string\n ref: Record<string, unknown>\n textRows: Record<string, unknown>[]\n withinArrayOrBlockLocale?: string\n}\n\nexport const transformHasManyText = ({\n field,\n locale,\n ref,\n textRows,\n withinArrayOrBlockLocale,\n}: Args) => {\n let result: unknown[]\n\n if (withinArrayOrBlockLocale) {\n result = textRows.reduce((acc, { locale, text }) => {\n if (locale === withinArrayOrBlockLocale) {\n acc.push(text)\n }\n\n return acc\n }, [])\n } else {\n result = textRows.map(({ text }) => text)\n }\n\n if (locale) {\n ref[field.name][locale] = result\n } else {\n ref[field.name] = result\n }\n}\n"],"names":["transformHasManyText","field","locale","ref","textRows","withinArrayOrBlockLocale","result","reduce","acc","text","push","map","name"],"mappings":"AAUA,OAAO,MAAMA,uBAAuB,CAAC,EACnCC,KAAK,EACLC,MAAM,EACNC,GAAG,EACHC,QAAQ,EACRC,wBAAwB,EACnB;IACL,IAAIC;IAEJ,IAAID,0BAA0B;QAC5BC,SAASF,SAASG,MAAM,CAAC,CAACC,KAAK,EAAEN,MAAM,EAAEO,IAAI,EAAE;YAC7C,IAAIP,WAAWG,0BAA0B;gBACvCG,IAAIE,IAAI,CAACD;YACX;YAEA,OAAOD;QACT,GAAG,EAAE;IACP,OAAO;QACLF,SAASF,SAASO,GAAG,CAAC,CAAC,EAAEF,IAAI,EAAE,GAAKA;IACtC;IAEA,IAAIP,QAAQ;QACVC,GAAG,CAACF,MAAMW,IAAI,CAAC,CAACV,OAAO,GAAGI;IAC5B,OAAO;QACLH,GAAG,CAACF,MAAMW,IAAI,CAAC,GAAGN;IACpB;AACF,EAAC"}