@payloadcms/ui 3.29.0-internal.d74b919 → 3.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/elements/EditMany/index.scss +14 -3
- package/dist/elements/WhereBuilder/Condition/Relationship/index.d.ts.map +1 -1
- package/dist/elements/WhereBuilder/Condition/Relationship/index.js +3 -0
- package/dist/elements/WhereBuilder/Condition/Relationship/index.js.map +1 -1
- package/dist/exports/client/index.js +23 -23
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/shared/index.js +2 -2
- package/dist/exports/shared/index.js.map +2 -2
- package/dist/fields/Tabs/index.js +1 -0
- package/dist/fields/Tabs/index.js.map +1 -1
- package/dist/fields/Upload/Input.d.ts.map +1 -1
- package/dist/fields/Upload/Input.js +323 -632
- package/dist/fields/Upload/Input.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/renderField.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/renderField.js +1 -0
- package/dist/forms/fieldSchemasToFormState/renderField.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utilities/groupNavItems.d.ts.map +1 -1
- package/dist/utilities/groupNavItems.js +1 -0
- package/dist/utilities/groupNavItems.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groupNavItems.d.ts","sourceRoot":"","sources":["../../src/utilities/groupNavItems.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EACV,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACZ,MAAM,SAAS,CAAA;AAIhB,oBAAY,UAAU;IACpB,UAAU,gBAAgB;IAC1B,MAAM,YAAY;CACnB;AAED,MAAM,MAAM,aAAa,GACrB;IACE,MAAM,EAAE,yBAAyB,CAAA;IACjC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAA;CAC5B,GAC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CAiEhB"}
|
|
@@ -14,6 +14,7 @@ export function groupNavItems(entities, permissions, i18n) {
|
|
|
14
14
|
const translatedGroup = getTranslation(entityToGroup.entity.admin.group, i18n);
|
|
15
15
|
const labelOrFunction = 'labels' in entityToGroup.entity ? entityToGroup.entity.labels.plural : entityToGroup.entity.label;
|
|
16
16
|
const label = typeof labelOrFunction === 'function' ? labelOrFunction({
|
|
17
|
+
i18n,
|
|
17
18
|
t: i18n.t
|
|
18
19
|
}) : labelOrFunction;
|
|
19
20
|
if (entityToGroup.entity.admin.group) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groupNavItems.js","names":["getTranslation","EntityType","groupNavItems","entities","permissions","i18n","result","reduce","groups","entityToGroup","entity","admin","group","type","toLowerCase","slug","read","translatedGroup","labelOrFunction","labels","plural","label","t","existingGroup","find","matchedGroup","push","defaultGroup","filter","length"],"sources":["../../src/utilities/groupNavItems.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type {\n SanitizedCollectionConfig,\n SanitizedGlobalConfig,\n SanitizedPermissions,\n StaticLabel,\n} from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nexport enum EntityType {\n collection = 'collections',\n global = 'globals',\n}\n\nexport type EntityToGroup =\n | {\n entity: SanitizedCollectionConfig\n type: EntityType.collection\n }\n | {\n entity: SanitizedGlobalConfig\n type: EntityType.global\n }\n\nexport type NavGroupType = {\n entities: {\n label: StaticLabel\n slug: string\n type: EntityType\n }[]\n label: string\n}\n\nexport function groupNavItems(\n entities: EntityToGroup[],\n permissions: SanitizedPermissions,\n i18n: I18nClient,\n): NavGroupType[] {\n const result = entities.reduce(\n (groups, entityToGroup) => {\n // Skip entities where admin.group is explicitly false\n if (entityToGroup.entity?.admin?.group === false) {\n return groups\n }\n\n if (permissions?.[entityToGroup.type.toLowerCase()]?.[entityToGroup.entity.slug]?.read) {\n const translatedGroup = getTranslation(entityToGroup.entity.admin.group, i18n)\n\n const labelOrFunction =\n 'labels' in entityToGroup.entity\n ? entityToGroup.entity.labels.plural\n : entityToGroup.entity.label\n\n const label =\n typeof labelOrFunction === 'function'
|
|
1
|
+
{"version":3,"file":"groupNavItems.js","names":["getTranslation","EntityType","groupNavItems","entities","permissions","i18n","result","reduce","groups","entityToGroup","entity","admin","group","type","toLowerCase","slug","read","translatedGroup","labelOrFunction","labels","plural","label","t","existingGroup","find","matchedGroup","push","defaultGroup","filter","length"],"sources":["../../src/utilities/groupNavItems.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type {\n SanitizedCollectionConfig,\n SanitizedGlobalConfig,\n SanitizedPermissions,\n StaticLabel,\n} from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nexport enum EntityType {\n collection = 'collections',\n global = 'globals',\n}\n\nexport type EntityToGroup =\n | {\n entity: SanitizedCollectionConfig\n type: EntityType.collection\n }\n | {\n entity: SanitizedGlobalConfig\n type: EntityType.global\n }\n\nexport type NavGroupType = {\n entities: {\n label: StaticLabel\n slug: string\n type: EntityType\n }[]\n label: string\n}\n\nexport function groupNavItems(\n entities: EntityToGroup[],\n permissions: SanitizedPermissions,\n i18n: I18nClient,\n): NavGroupType[] {\n const result = entities.reduce(\n (groups, entityToGroup) => {\n // Skip entities where admin.group is explicitly false\n if (entityToGroup.entity?.admin?.group === false) {\n return groups\n }\n\n if (permissions?.[entityToGroup.type.toLowerCase()]?.[entityToGroup.entity.slug]?.read) {\n const translatedGroup = getTranslation(entityToGroup.entity.admin.group, i18n)\n\n const labelOrFunction =\n 'labels' in entityToGroup.entity\n ? entityToGroup.entity.labels.plural\n : entityToGroup.entity.label\n\n const label =\n typeof labelOrFunction === 'function'\n ? labelOrFunction({ i18n, t: i18n.t })\n : labelOrFunction\n\n if (entityToGroup.entity.admin.group) {\n const existingGroup = groups.find(\n (group) => getTranslation(group.label, i18n) === translatedGroup,\n ) as NavGroupType\n\n let matchedGroup: NavGroupType = existingGroup\n\n if (!existingGroup) {\n matchedGroup = { entities: [], label: translatedGroup }\n groups.push(matchedGroup)\n }\n\n matchedGroup.entities.push({\n slug: entityToGroup.entity.slug,\n type: entityToGroup.type,\n label,\n })\n } else {\n const defaultGroup = groups.find((group) => {\n return getTranslation(group.label, i18n) === i18n.t(`general:${entityToGroup.type}`)\n }) as NavGroupType\n defaultGroup.entities.push({\n slug: entityToGroup.entity.slug,\n type: entityToGroup.type,\n label,\n })\n }\n }\n\n return groups\n },\n [\n {\n entities: [],\n label: i18n.t('general:collections'),\n },\n {\n entities: [],\n label: i18n.t('general:globals'),\n },\n ],\n )\n\n return result.filter((group) => group.entities.length > 0)\n}\n"],"mappings":"AAQA,SAASA,cAAc,QAAQ;AAE/B,OAAO,IAAAC,UAAK,0BAAAA,UAAA;;;SAAAA,UAAA;;AAwBZ,OAAO,SAASC,cACdC,QAAyB,EACzBC,WAAiC,EACjCC,IAAgB;EAEhB,MAAMC,MAAA,GAASH,QAAA,CAASI,MAAM,CAC5B,CAACC,MAAA,EAAQC,aAAA;IACP;IACA,IAAIA,aAAA,CAAcC,MAAM,EAAEC,KAAA,EAAOC,KAAA,KAAU,OAAO;MAChD,OAAOJ,MAAA;IACT;IAEA,IAAIJ,WAAA,GAAcK,aAAA,CAAcI,IAAI,CAACC,WAAW,GAAG,GAAGL,aAAA,CAAcC,MAAM,CAACK,IAAI,CAAC,EAAEC,IAAA,EAAM;MACtF,MAAMC,eAAA,GAAkBjB,cAAA,CAAeS,aAAA,CAAcC,MAAM,CAACC,KAAK,CAACC,KAAK,EAAEP,IAAA;MAEzE,MAAMa,eAAA,GACJ,YAAYT,aAAA,CAAcC,MAAM,GAC5BD,aAAA,CAAcC,MAAM,CAACS,MAAM,CAACC,MAAM,GAClCX,aAAA,CAAcC,MAAM,CAACW,KAAK;MAEhC,MAAMA,KAAA,GACJ,OAAOH,eAAA,KAAoB,aACvBA,eAAA,CAAgB;QAAEb,IAAA;QAAMiB,CAAA,EAAGjB,IAAA,CAAKiB;MAAE,KAClCJ,eAAA;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CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/ui",
|
|
3
|
-
"version": "3.29.0
|
|
3
|
+
"version": "3.29.0",
|
|
4
4
|
"homepage": "https://payloadcms.com",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"ts-essentials": "10.0.3",
|
|
133
133
|
"use-context-selector": "2.0.0",
|
|
134
134
|
"uuid": "10.0.0",
|
|
135
|
-
"@payloadcms/translations": "3.29.0
|
|
135
|
+
"@payloadcms/translations": "3.29.0"
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
138
|
"@babel/cli": "7.26.4",
|
|
@@ -148,14 +148,14 @@
|
|
|
148
148
|
"esbuild": "0.24.2",
|
|
149
149
|
"esbuild-sass-plugin": "3.3.1",
|
|
150
150
|
"eslint-plugin-react-compiler": "19.0.0-beta-714736e-20250131",
|
|
151
|
-
"
|
|
152
|
-
"
|
|
151
|
+
"payload": "3.29.0",
|
|
152
|
+
"@payloadcms/eslint-config": "3.28.0"
|
|
153
153
|
},
|
|
154
154
|
"peerDependencies": {
|
|
155
155
|
"next": "^15.0.0",
|
|
156
156
|
"react": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020",
|
|
157
157
|
"react-dom": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020",
|
|
158
|
-
"payload": "3.29.0
|
|
158
|
+
"payload": "3.29.0"
|
|
159
159
|
},
|
|
160
160
|
"engines": {
|
|
161
161
|
"node": "^18.20.2 || >=20.9.0"
|