@payloadcms/ui 3.59.0-internal.152bf35 → 3.59.0-internal.3731940
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/Collapsible/index.d.ts +2 -15
- package/dist/elements/Collapsible/index.d.ts.map +1 -1
- package/dist/elements/Collapsible/index.js +60 -59
- package/dist/elements/Collapsible/index.js.map +1 -1
- package/dist/elements/Collapsible/index.scss +2 -6
- package/dist/elements/RelationshipTable/index.d.ts.map +1 -1
- package/dist/elements/RelationshipTable/index.js +3 -2
- package/dist/elements/RelationshipTable/index.js.map +1 -1
- package/dist/elements/Table/index.scss +1 -0
- package/dist/exports/client/index.js +9 -9
- package/dist/exports/client/index.js.map +3 -3
- package/dist/fields/Code/index.d.ts.map +1 -1
- package/dist/fields/Code/index.js +1 -3
- package/dist/fields/Code/index.js.map +1 -1
- package/dist/fields/Upload/RelationshipContent/index.js +1 -1
- package/dist/fields/Upload/RelationshipContent/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utilities/getColumns.js +1 -1
- package/dist/utilities/getColumns.js.map +1 -1
- package/package.json +5 -5
|
@@ -31,6 +31,6 @@ export const getColumns = ({
|
|
|
31
31
|
})?.some(field => {
|
|
32
32
|
const accessor = 'accessor' in field ? field.accessor : 'name' in field ? field.name : undefined;
|
|
33
33
|
return accessor === column.accessor;
|
|
34
|
-
})) : getInitialColumns(isPolymorphic ? fields : filterFields(fields), collectionConfig
|
|
34
|
+
})) : getInitialColumns(isPolymorphic ? fields : filterFields(fields), collectionConfig?.admin?.useAsTitle, isPolymorphic ? [] : collectionConfig?.admin?.defaultColumns);
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=getColumns.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getColumns.js","names":["flattenTopLevelFields","fieldAffectsData","filterFields","getInitialColumns","getColumns","clientConfig","collectionConfig","collectionSlug","columns","i18n","isPolymorphic","Array","isArray","fields","collection","clientCollectionConfig","collections","find","each","slug","field","some","name","push","filter","column","keepPresentationalFields","moveSubFieldsToTop","accessor","undefined","admin","useAsTitle","defaultColumns"],"sources":["../../src/utilities/getColumns.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { ClientCollectionConfig, ClientConfig, ColumnPreference } from 'payload'\n\nimport { flattenTopLevelFields } from 'payload'\nimport { fieldAffectsData } from 'payload/shared'\n\nimport { filterFields } from '../providers/TableColumns/buildColumnState/filterFields.js'\nimport { getInitialColumns } from '../providers/TableColumns/getInitialColumns.js'\n\nexport const getColumns = ({\n clientConfig,\n collectionConfig,\n collectionSlug,\n columns,\n i18n,\n}: {\n clientConfig: ClientConfig\n collectionConfig?: ClientCollectionConfig\n collectionSlug: string | string[]\n columns: ColumnPreference[]\n i18n: I18nClient\n}) => {\n const isPolymorphic = Array.isArray(collectionSlug)\n\n const fields = !isPolymorphic ? (collectionConfig?.fields ?? []) : []\n\n if (isPolymorphic) {\n for (const collection of collectionSlug) {\n const clientCollectionConfig = clientConfig.collections.find(\n (each) => each.slug === collection,\n )\n\n for (const field of filterFields(clientCollectionConfig.fields)) {\n if (fieldAffectsData(field)) {\n if (fields.some((each) => fieldAffectsData(each) && each.name === field.name)) {\n continue\n }\n }\n\n fields.push(field)\n }\n }\n }\n\n return columns\n ? columns?.filter((column) =>\n flattenTopLevelFields(fields, {\n i18n,\n keepPresentationalFields: true,\n moveSubFieldsToTop: true,\n })?.some((field) => {\n const accessor =\n 'accessor' in field ? field.accessor : 'name' in field ? field.name : undefined\n return accessor === column.accessor\n }),\n )\n : getInitialColumns(\n isPolymorphic ? fields : filterFields(fields),\n collectionConfig
|
|
1
|
+
{"version":3,"file":"getColumns.js","names":["flattenTopLevelFields","fieldAffectsData","filterFields","getInitialColumns","getColumns","clientConfig","collectionConfig","collectionSlug","columns","i18n","isPolymorphic","Array","isArray","fields","collection","clientCollectionConfig","collections","find","each","slug","field","some","name","push","filter","column","keepPresentationalFields","moveSubFieldsToTop","accessor","undefined","admin","useAsTitle","defaultColumns"],"sources":["../../src/utilities/getColumns.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { ClientCollectionConfig, ClientConfig, ColumnPreference } from 'payload'\n\nimport { flattenTopLevelFields } from 'payload'\nimport { fieldAffectsData } from 'payload/shared'\n\nimport { filterFields } from '../providers/TableColumns/buildColumnState/filterFields.js'\nimport { getInitialColumns } from '../providers/TableColumns/getInitialColumns.js'\n\nexport const getColumns = ({\n clientConfig,\n collectionConfig,\n collectionSlug,\n columns,\n i18n,\n}: {\n clientConfig: ClientConfig\n collectionConfig?: ClientCollectionConfig\n collectionSlug: string | string[]\n columns: ColumnPreference[]\n i18n: I18nClient\n}) => {\n const isPolymorphic = Array.isArray(collectionSlug)\n\n const fields = !isPolymorphic ? (collectionConfig?.fields ?? []) : []\n\n if (isPolymorphic) {\n for (const collection of collectionSlug) {\n const clientCollectionConfig = clientConfig.collections.find(\n (each) => each.slug === collection,\n )\n\n for (const field of filterFields(clientCollectionConfig.fields)) {\n if (fieldAffectsData(field)) {\n if (fields.some((each) => fieldAffectsData(each) && each.name === field.name)) {\n continue\n }\n }\n\n fields.push(field)\n }\n }\n }\n\n return columns\n ? columns?.filter((column) =>\n flattenTopLevelFields(fields, {\n i18n,\n keepPresentationalFields: true,\n moveSubFieldsToTop: true,\n })?.some((field) => {\n const accessor =\n 'accessor' in field ? field.accessor : 'name' in field ? field.name : undefined\n return accessor === column.accessor\n }),\n )\n : getInitialColumns(\n isPolymorphic ? fields : filterFields(fields),\n collectionConfig?.admin?.useAsTitle,\n isPolymorphic ? [] : collectionConfig?.admin?.defaultColumns,\n )\n}\n"],"mappings":"AAGA,SAASA,qBAAqB,QAAQ;AACtC,SAASC,gBAAgB,QAAQ;AAEjC,SAASC,YAAY,QAAQ;AAC7B,SAASC,iBAAiB,QAAQ;AAElC,OAAO,MAAMC,UAAA,GAAaA,CAAC;EACzBC,YAAY;EACZC,gBAAgB;EAChBC,c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AAOE,cAAA;AAEtD","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/ui",
|
|
3
|
-
"version": "3.59.0-internal.
|
|
3
|
+
"version": "3.59.0-internal.3731940",
|
|
4
4
|
"homepage": "https://payloadcms.com",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"ts-essentials": "10.0.3",
|
|
137
137
|
"use-context-selector": "2.0.0",
|
|
138
138
|
"uuid": "10.0.0",
|
|
139
|
-
"@payloadcms/translations": "3.59.0-internal.
|
|
139
|
+
"@payloadcms/translations": "3.59.0-internal.3731940"
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
142
|
"@babel/cli": "7.27.2",
|
|
@@ -151,14 +151,14 @@
|
|
|
151
151
|
"babel-plugin-react-compiler": "19.1.0-rc.3",
|
|
152
152
|
"esbuild": "0.25.5",
|
|
153
153
|
"esbuild-sass-plugin": "3.3.1",
|
|
154
|
-
"
|
|
155
|
-
"
|
|
154
|
+
"@payloadcms/eslint-config": "3.28.0",
|
|
155
|
+
"payload": "3.59.0-internal.3731940"
|
|
156
156
|
},
|
|
157
157
|
"peerDependencies": {
|
|
158
158
|
"next": "^15.2.3",
|
|
159
159
|
"react": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020",
|
|
160
160
|
"react-dom": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020",
|
|
161
|
-
"payload": "3.59.0-internal.
|
|
161
|
+
"payload": "3.59.0-internal.3731940"
|
|
162
162
|
},
|
|
163
163
|
"engines": {
|
|
164
164
|
"node": "^18.20.2 || >=20.9.0"
|