@payloadcms/plugin-import-export 3.78.0 → 3.79.0-canary.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/package.json +7 -7
- package/dist/components/ImportCollectionField/index.d.ts +0 -3
- package/dist/components/ImportCollectionField/index.d.ts.map +0 -1
- package/dist/components/ImportCollectionField/index.js +0 -17
- package/dist/components/ImportCollectionField/index.js.map +0 -1
- package/dist/utilities/collectTimezoneCompanionFields.d.ts +0 -24
- package/dist/utilities/collectTimezoneCompanionFields.d.ts.map +0 -1
- package/dist/utilities/collectTimezoneCompanionFields.js +0 -89
- package/dist/utilities/collectTimezoneCompanionFields.js.map +0 -1
- package/dist/utilities/collectTimezoneCompanionFields.spec.js +0 -319
- package/dist/utilities/collectTimezoneCompanionFields.spec.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/plugin-import-export",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.79.0-canary.0",
|
|
4
4
|
"description": "Import-Export plugin for Payload",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"payload",
|
|
@@ -64,17 +64,17 @@
|
|
|
64
64
|
"csv-parse": "5.6.0",
|
|
65
65
|
"csv-stringify": "6.5.2",
|
|
66
66
|
"qs-esm": "7.0.2",
|
|
67
|
-
"@payloadcms/
|
|
68
|
-
"@payloadcms/
|
|
67
|
+
"@payloadcms/ui": "3.79.0-canary.0",
|
|
68
|
+
"@payloadcms/translations": "3.79.0-canary.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@payloadcms/eslint-config": "3.28.0",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
72
|
+
"@payloadcms/ui": "3.79.0-canary.0",
|
|
73
|
+
"payload": "3.79.0-canary.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"
|
|
77
|
-
"
|
|
76
|
+
"@payloadcms/ui": "3.79.0-canary.0",
|
|
77
|
+
"payload": "3.79.0-canary.0"
|
|
78
78
|
},
|
|
79
79
|
"homepage:": "https://payloadcms.com",
|
|
80
80
|
"scripts": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollectionField/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAIzD,eAAO,MAAM,qBAAqB,EAAE,0BAWnC,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { SelectField, useDocumentInfo } from '@payloadcms/ui';
|
|
4
|
-
export const ImportCollectionField = (props)=>{
|
|
5
|
-
const { id, initialData } = useDocumentInfo();
|
|
6
|
-
// If creating (no id) and have initialData with collectionSlug (e.g., from drawer),
|
|
7
|
-
// hide the field to prevent user selection.
|
|
8
|
-
if (!id && initialData?.collectionSlug) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
// Otherwise render the normal select field
|
|
12
|
-
return /*#__PURE__*/ _jsx(SelectField, {
|
|
13
|
-
...props
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ImportCollectionField/index.tsx"],"sourcesContent":["'use client'\nimport type { SelectFieldClientComponent } from 'payload'\n\nimport { SelectField, useDocumentInfo } from '@payloadcms/ui'\n\nexport const ImportCollectionField: SelectFieldClientComponent = (props) => {\n const { id, initialData } = useDocumentInfo()\n\n // If creating (no id) and have initialData with collectionSlug (e.g., from drawer),\n // hide the field to prevent user selection.\n if (!id && initialData?.collectionSlug) {\n return null\n }\n\n // Otherwise render the normal select field\n return <SelectField {...props} />\n}\n"],"names":["SelectField","useDocumentInfo","ImportCollectionField","props","id","initialData","collectionSlug"],"mappings":"AAAA;;AAGA,SAASA,WAAW,EAAEC,eAAe,QAAQ,iBAAgB;AAE7D,OAAO,MAAMC,wBAAoD,CAACC;IAChE,MAAM,EAAEC,EAAE,EAAEC,WAAW,EAAE,GAAGJ;IAE5B,oFAAoF;IACpF,4CAA4C;IAC5C,IAAI,CAACG,MAAMC,aAAaC,gBAAgB;QACtC,OAAO;IACT;IAEA,2CAA2C;IAC3C,qBAAO,KAACN;QAAa,GAAGG,KAAK;;AAC/B,EAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { FlattenedField } from 'payload';
|
|
2
|
-
type FieldWithPresentational = {
|
|
3
|
-
fields?: FlattenedField[];
|
|
4
|
-
name?: string;
|
|
5
|
-
tabs?: {
|
|
6
|
-
fields: FlattenedField[];
|
|
7
|
-
name?: string;
|
|
8
|
-
}[];
|
|
9
|
-
type: 'collapsible' | 'row' | 'tabs';
|
|
10
|
-
} | FlattenedField;
|
|
11
|
-
/**
|
|
12
|
-
* Collects the names of auto-generated timezone companion fields from the schema.
|
|
13
|
-
*
|
|
14
|
-
* When a date field has `timezone: true`, Payload automatically generates a companion
|
|
15
|
-
* select field and inserts it immediately after the date field in the fields array.
|
|
16
|
-
* This function identifies those auto-generated fields by looking at the field sequence
|
|
17
|
-
* rather than assuming a specific naming convention (since the name can be overridden).
|
|
18
|
-
*
|
|
19
|
-
* This is used to filter out timezone companions unless explicitly selected,
|
|
20
|
-
* without incorrectly filtering user-defined fields that happen to end with `_tz`.
|
|
21
|
-
*/
|
|
22
|
-
export declare const collectTimezoneCompanionFields: (fields: FieldWithPresentational[], prefix?: string) => Set<string>;
|
|
23
|
-
export {};
|
|
24
|
-
//# sourceMappingURL=collectTimezoneCompanionFields.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collectTimezoneCompanionFields.d.ts","sourceRoot":"","sources":["../../src/utilities/collectTimezoneCompanionFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,KAAK,uBAAuB,GACxB;IACE,MAAM,CAAC,EAAE,cAAc,EAAE,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE;QACL,MAAM,EAAE,cAAc,EAAE,CAAA;QACxB,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,EAAE,CAAA;IACH,IAAI,EAAE,aAAa,GAAG,KAAK,GAAG,MAAM,CAAA;CACrC,GACD,cAAc,CAAA;AAElB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B,WACjC,uBAAuB,EAAE,sBAEhC,GAAG,CAAC,MAAM,CAmFZ,CAAA"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Collects the names of auto-generated timezone companion fields from the schema.
|
|
3
|
-
*
|
|
4
|
-
* When a date field has `timezone: true`, Payload automatically generates a companion
|
|
5
|
-
* select field and inserts it immediately after the date field in the fields array.
|
|
6
|
-
* This function identifies those auto-generated fields by looking at the field sequence
|
|
7
|
-
* rather than assuming a specific naming convention (since the name can be overridden).
|
|
8
|
-
*
|
|
9
|
-
* This is used to filter out timezone companions unless explicitly selected,
|
|
10
|
-
* without incorrectly filtering user-defined fields that happen to end with `_tz`.
|
|
11
|
-
*/ export const collectTimezoneCompanionFields = (fields, prefix = '')=>{
|
|
12
|
-
const result = new Set();
|
|
13
|
-
for(let i = 0; i < fields.length; i++){
|
|
14
|
-
const field = fields[i];
|
|
15
|
-
if (!field) {
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
const name = 'name' in field && typeof field.name === 'string' ? field.name : undefined;
|
|
19
|
-
const fullKey = name && prefix ? `${prefix}_${name}` : name ?? prefix;
|
|
20
|
-
switch(field.type){
|
|
21
|
-
case 'array':
|
|
22
|
-
{
|
|
23
|
-
// Recurse into array fields - companion fields inside arrays get the array prefix
|
|
24
|
-
const subFields = collectTimezoneCompanionFields(field.fields, fullKey);
|
|
25
|
-
for (const subField of subFields){
|
|
26
|
-
result.add(subField);
|
|
27
|
-
}
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
case 'blocks':
|
|
31
|
-
{
|
|
32
|
-
// Recurse into each block type
|
|
33
|
-
for (const block of field.blocks){
|
|
34
|
-
if (typeof block === 'string') {
|
|
35
|
-
continue; // Skip block references
|
|
36
|
-
}
|
|
37
|
-
const blockPrefix = `${fullKey}_${block.slug}`;
|
|
38
|
-
const blockFields = collectTimezoneCompanionFields(block.flattenedFields ?? block.fields, blockPrefix);
|
|
39
|
-
for (const blockField of blockFields){
|
|
40
|
-
result.add(blockField);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
case 'collapsible':
|
|
46
|
-
case 'group':
|
|
47
|
-
case 'row':
|
|
48
|
-
{
|
|
49
|
-
const subFields = collectTimezoneCompanionFields(field.fields, fullKey);
|
|
50
|
-
for (const subField of subFields){
|
|
51
|
-
result.add(subField);
|
|
52
|
-
}
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
case 'date':
|
|
56
|
-
{
|
|
57
|
-
// If this date field has timezone enabled, the next field should be the companion
|
|
58
|
-
// (Payload splices it in right after the date field during sanitization)
|
|
59
|
-
if ('timezone' in field && field.timezone) {
|
|
60
|
-
const nextField = fields[i + 1];
|
|
61
|
-
if (nextField && 'name' in nextField && nextField.type === 'select') {
|
|
62
|
-
const companionName = prefix ? `${prefix}_${nextField.name}` : nextField.name;
|
|
63
|
-
result.add(companionName);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
case 'tabs':
|
|
69
|
-
{
|
|
70
|
-
for (const tab of field.tabs ?? []){
|
|
71
|
-
let tabPrefix;
|
|
72
|
-
if (tab.name) {
|
|
73
|
-
tabPrefix = fullKey ? `${fullKey}_${tab.name}` : tab.name;
|
|
74
|
-
} else {
|
|
75
|
-
tabPrefix = fullKey;
|
|
76
|
-
}
|
|
77
|
-
const tabFields = collectTimezoneCompanionFields(tab.fields || [], tabPrefix);
|
|
78
|
-
for (const tabField of tabFields){
|
|
79
|
-
result.add(tabField);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return result;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
//# sourceMappingURL=collectTimezoneCompanionFields.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/collectTimezoneCompanionFields.ts"],"sourcesContent":["import type { FlattenedField } from 'payload'\n\ntype FieldWithPresentational =\n | {\n fields?: FlattenedField[]\n name?: string\n tabs?: {\n fields: FlattenedField[]\n name?: string\n }[]\n type: 'collapsible' | 'row' | 'tabs'\n }\n | FlattenedField\n\n/**\n * Collects the names of auto-generated timezone companion fields from the schema.\n *\n * When a date field has `timezone: true`, Payload automatically generates a companion\n * select field and inserts it immediately after the date field in the fields array.\n * This function identifies those auto-generated fields by looking at the field sequence\n * rather than assuming a specific naming convention (since the name can be overridden).\n *\n * This is used to filter out timezone companions unless explicitly selected,\n * without incorrectly filtering user-defined fields that happen to end with `_tz`.\n */\nexport const collectTimezoneCompanionFields = (\n fields: FieldWithPresentational[],\n prefix = '',\n): Set<string> => {\n const result = new Set<string>()\n\n for (let i = 0; i < fields.length; i++) {\n const field = fields[i]\n\n if (!field) {\n continue\n }\n\n const name = 'name' in field && typeof field.name === 'string' ? field.name : undefined\n const fullKey = name && prefix ? `${prefix}_${name}` : (name ?? prefix)\n\n switch (field.type) {\n case 'array': {\n // Recurse into array fields - companion fields inside arrays get the array prefix\n const subFields = collectTimezoneCompanionFields(field.fields as FlattenedField[], fullKey)\n for (const subField of subFields) {\n result.add(subField)\n }\n break\n }\n\n case 'blocks': {\n // Recurse into each block type\n for (const block of field.blocks) {\n if (typeof block === 'string') {\n continue // Skip block references\n }\n const blockPrefix = `${fullKey}_${block.slug}`\n const blockFields = collectTimezoneCompanionFields(\n block.flattenedFields ?? block.fields,\n blockPrefix,\n )\n for (const blockField of blockFields) {\n result.add(blockField)\n }\n }\n break\n }\n\n case 'collapsible':\n case 'group':\n case 'row': {\n const subFields = collectTimezoneCompanionFields(field.fields as FlattenedField[], fullKey)\n for (const subField of subFields) {\n result.add(subField)\n }\n break\n }\n\n case 'date': {\n // If this date field has timezone enabled, the next field should be the companion\n // (Payload splices it in right after the date field during sanitization)\n if ('timezone' in field && field.timezone) {\n const nextField = fields[i + 1]\n if (nextField && 'name' in nextField && nextField.type === 'select') {\n const companionName = prefix ? `${prefix}_${nextField.name}` : nextField.name\n result.add(companionName)\n }\n }\n break\n }\n\n case 'tabs': {\n for (const tab of field.tabs ?? []) {\n let tabPrefix: string\n if (tab.name) {\n tabPrefix = fullKey ? `${fullKey}_${tab.name}` : tab.name\n } else {\n tabPrefix = fullKey\n }\n const tabFields = collectTimezoneCompanionFields(tab.fields || [], tabPrefix)\n for (const tabField of tabFields) {\n result.add(tabField)\n }\n }\n break\n }\n }\n }\n\n return result\n}\n"],"names":["collectTimezoneCompanionFields","fields","prefix","result","Set","i","length","field","name","undefined","fullKey","type","subFields","subField","add","block","blocks","blockPrefix","slug","blockFields","flattenedFields","blockField","timezone","nextField","companionName","tab","tabs","tabPrefix","tabFields","tabField"],"mappings":"AAcA;;;;;;;;;;CAUC,GACD,OAAO,MAAMA,iCAAiC,CAC5CC,QACAC,SAAS,EAAE;IAEX,MAAMC,SAAS,IAAIC;IAEnB,IAAK,IAAIC,IAAI,GAAGA,IAAIJ,OAAOK,MAAM,EAAED,IAAK;QACtC,MAAME,QAAQN,MAAM,CAACI,EAAE;QAEvB,IAAI,CAACE,OAAO;YACV;QACF;QAEA,MAAMC,OAAO,UAAUD,SAAS,OAAOA,MAAMC,IAAI,KAAK,WAAWD,MAAMC,IAAI,GAAGC;QAC9E,MAAMC,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EAAE,CAAE;wBAClC,IAAIC;wBACJ,IAAIF,IAAIjB,IAAI,EAAE;4BACZmB,YAAYjB,UAAU,GAAGA,QAAQ,CAAC,EAAEe,IAAIjB,IAAI,EAAE,GAAGiB,IAAIjB,IAAI;wBAC3D,OAAO;4BACLmB,YAAYjB;wBACd;wBACA,MAAMkB,YAAY5B,+BAA+ByB,IAAIxB,MAAM,IAAI,EAAE,EAAE0B;wBACnE,KAAK,MAAME,YAAYD,UAAW;4BAChCzB,OAAOW,GAAG,CAACe;wBACb;oBACF;oBACA;gBACF;QACF;IACF;IAEA,OAAO1B;AACT,EAAC"}
|
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { collectTimezoneCompanionFields } from './collectTimezoneCompanionFields.js';
|
|
3
|
-
describe('collectTimezoneCompanionFields', ()=>{
|
|
4
|
-
it('should return empty set for fields without date timezone', ()=>{
|
|
5
|
-
const fields = [
|
|
6
|
-
{
|
|
7
|
-
name: 'title',
|
|
8
|
-
type: 'text'
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
name: 'description',
|
|
12
|
-
type: 'textarea'
|
|
13
|
-
}
|
|
14
|
-
];
|
|
15
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
16
|
-
expect(result.size).toBe(0);
|
|
17
|
-
});
|
|
18
|
-
it('should return empty set for date fields without timezone enabled', ()=>{
|
|
19
|
-
const fields = [
|
|
20
|
-
{
|
|
21
|
-
name: 'publishedAt',
|
|
22
|
-
type: 'date'
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
name: 'createdAt',
|
|
26
|
-
type: 'date'
|
|
27
|
-
}
|
|
28
|
-
];
|
|
29
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
30
|
-
expect(result.size).toBe(0);
|
|
31
|
-
});
|
|
32
|
-
it('should collect timezone companion from the next select field after date with timezone', ()=>{
|
|
33
|
-
// Simulates sanitized fields where Payload inserts the companion right after the date
|
|
34
|
-
const fields = [
|
|
35
|
-
{
|
|
36
|
-
name: 'publishedAt',
|
|
37
|
-
type: 'date',
|
|
38
|
-
timezone: true
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'publishedAt_tz',
|
|
42
|
-
type: 'select',
|
|
43
|
-
options: []
|
|
44
|
-
}
|
|
45
|
-
];
|
|
46
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
47
|
-
expect(result.size).toBe(1);
|
|
48
|
-
expect(result.has('publishedAt_tz')).toBe(true);
|
|
49
|
-
});
|
|
50
|
-
it('should handle overridden timezone field names', ()=>{
|
|
51
|
-
// User overrode the timezone field name via timezone.override
|
|
52
|
-
const fields = [
|
|
53
|
-
{
|
|
54
|
-
name: 'publishedAt',
|
|
55
|
-
type: 'date',
|
|
56
|
-
timezone: true
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: 'pub_timezone',
|
|
60
|
-
type: 'select',
|
|
61
|
-
options: []
|
|
62
|
-
}
|
|
63
|
-
];
|
|
64
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
65
|
-
expect(result.size).toBe(1);
|
|
66
|
-
expect(result.has('pub_timezone')).toBe(true);
|
|
67
|
-
expect(result.has('publishedAt_tz')).toBe(false);
|
|
68
|
-
});
|
|
69
|
-
it('should collect multiple timezone companions', ()=>{
|
|
70
|
-
const fields = [
|
|
71
|
-
{
|
|
72
|
-
name: 'publishedAt',
|
|
73
|
-
type: 'date',
|
|
74
|
-
timezone: true
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
name: 'publishedAt_tz',
|
|
78
|
-
type: 'select',
|
|
79
|
-
options: []
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
name: 'title',
|
|
83
|
-
type: 'text'
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: 'scheduledAt',
|
|
87
|
-
type: 'date',
|
|
88
|
-
timezone: true
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name: 'scheduledAt_tz',
|
|
92
|
-
type: 'select',
|
|
93
|
-
options: []
|
|
94
|
-
}
|
|
95
|
-
];
|
|
96
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
97
|
-
expect(result.size).toBe(2);
|
|
98
|
-
expect(result.has('publishedAt_tz')).toBe(true);
|
|
99
|
-
expect(result.has('scheduledAt_tz')).toBe(true);
|
|
100
|
-
});
|
|
101
|
-
it('should handle date fields in groups', ()=>{
|
|
102
|
-
const fields = [
|
|
103
|
-
{
|
|
104
|
-
name: 'meta',
|
|
105
|
-
type: 'group',
|
|
106
|
-
fields: [
|
|
107
|
-
{
|
|
108
|
-
name: 'publishedAt',
|
|
109
|
-
type: 'date',
|
|
110
|
-
timezone: true
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: 'publishedAt_tz',
|
|
114
|
-
type: 'select',
|
|
115
|
-
options: []
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
];
|
|
120
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
121
|
-
expect(result.size).toBe(1);
|
|
122
|
-
expect(result.has('meta_publishedAt_tz')).toBe(true);
|
|
123
|
-
});
|
|
124
|
-
it('should handle date fields in arrays', ()=>{
|
|
125
|
-
const fields = [
|
|
126
|
-
{
|
|
127
|
-
name: 'events',
|
|
128
|
-
type: 'array',
|
|
129
|
-
fields: [
|
|
130
|
-
{
|
|
131
|
-
name: 'startTime',
|
|
132
|
-
type: 'date',
|
|
133
|
-
timezone: true
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
name: 'startTime_tz',
|
|
137
|
-
type: 'select',
|
|
138
|
-
options: []
|
|
139
|
-
}
|
|
140
|
-
]
|
|
141
|
-
}
|
|
142
|
-
];
|
|
143
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
144
|
-
expect(result.size).toBe(1);
|
|
145
|
-
expect(result.has('events_startTime_tz')).toBe(true);
|
|
146
|
-
});
|
|
147
|
-
it('should handle date fields in blocks', ()=>{
|
|
148
|
-
const fields = [
|
|
149
|
-
{
|
|
150
|
-
name: 'layout',
|
|
151
|
-
type: 'blocks',
|
|
152
|
-
blocks: [
|
|
153
|
-
{
|
|
154
|
-
slug: 'event',
|
|
155
|
-
fields: [
|
|
156
|
-
{
|
|
157
|
-
name: 'eventDate',
|
|
158
|
-
type: 'date',
|
|
159
|
-
timezone: true
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
name: 'eventDate_tz',
|
|
163
|
-
type: 'select',
|
|
164
|
-
options: []
|
|
165
|
-
}
|
|
166
|
-
]
|
|
167
|
-
}
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
];
|
|
171
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
172
|
-
expect(result.size).toBe(1);
|
|
173
|
-
expect(result.has('layout_event_eventDate_tz')).toBe(true);
|
|
174
|
-
});
|
|
175
|
-
it('should handle deeply nested date fields', ()=>{
|
|
176
|
-
const fields = [
|
|
177
|
-
{
|
|
178
|
-
name: 'content',
|
|
179
|
-
type: 'group',
|
|
180
|
-
fields: [
|
|
181
|
-
{
|
|
182
|
-
name: 'schedule',
|
|
183
|
-
type: 'array',
|
|
184
|
-
fields: [
|
|
185
|
-
{
|
|
186
|
-
name: 'time',
|
|
187
|
-
type: 'date',
|
|
188
|
-
timezone: true
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
name: 'time_tz',
|
|
192
|
-
type: 'select',
|
|
193
|
-
options: []
|
|
194
|
-
}
|
|
195
|
-
]
|
|
196
|
-
}
|
|
197
|
-
]
|
|
198
|
-
}
|
|
199
|
-
];
|
|
200
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
201
|
-
expect(result.size).toBe(1);
|
|
202
|
-
expect(result.has('content_schedule_time_tz')).toBe(true);
|
|
203
|
-
});
|
|
204
|
-
it('should handle tabs', ()=>{
|
|
205
|
-
const fields = [
|
|
206
|
-
{
|
|
207
|
-
type: 'tabs',
|
|
208
|
-
tabs: [
|
|
209
|
-
{
|
|
210
|
-
name: 'scheduling',
|
|
211
|
-
fields: [
|
|
212
|
-
{
|
|
213
|
-
name: 'publishAt',
|
|
214
|
-
type: 'date',
|
|
215
|
-
timezone: true
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
name: 'publishAt_tz',
|
|
219
|
-
type: 'select',
|
|
220
|
-
options: []
|
|
221
|
-
}
|
|
222
|
-
]
|
|
223
|
-
}
|
|
224
|
-
]
|
|
225
|
-
}
|
|
226
|
-
];
|
|
227
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
228
|
-
expect(result.size).toBe(1);
|
|
229
|
-
expect(result.has('scheduling_publishAt_tz')).toBe(true);
|
|
230
|
-
});
|
|
231
|
-
it('should handle unnamed tabs (no prefix added)', ()=>{
|
|
232
|
-
const fields = [
|
|
233
|
-
{
|
|
234
|
-
type: 'tabs',
|
|
235
|
-
tabs: [
|
|
236
|
-
{
|
|
237
|
-
fields: [
|
|
238
|
-
{
|
|
239
|
-
name: 'publishAt',
|
|
240
|
-
type: 'date',
|
|
241
|
-
timezone: true
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
name: 'publishAt_tz',
|
|
245
|
-
type: 'select',
|
|
246
|
-
options: []
|
|
247
|
-
}
|
|
248
|
-
]
|
|
249
|
-
}
|
|
250
|
-
]
|
|
251
|
-
}
|
|
252
|
-
];
|
|
253
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
254
|
-
expect(result.size).toBe(1);
|
|
255
|
-
expect(result.has('publishAt_tz')).toBe(true);
|
|
256
|
-
});
|
|
257
|
-
it('should not include user-defined fields ending with _tz', ()=>{
|
|
258
|
-
const fields = [
|
|
259
|
-
{
|
|
260
|
-
name: 'my_tz',
|
|
261
|
-
type: 'text'
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
name: 'timezone_tz',
|
|
265
|
-
type: 'select',
|
|
266
|
-
options: []
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
name: 'publishedAt',
|
|
270
|
-
type: 'date',
|
|
271
|
-
timezone: true
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
name: 'publishedAt_tz',
|
|
275
|
-
type: 'select',
|
|
276
|
-
options: []
|
|
277
|
-
}
|
|
278
|
-
];
|
|
279
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
280
|
-
// Only the auto-generated timezone companion should be included
|
|
281
|
-
expect(result.size).toBe(1);
|
|
282
|
-
expect(result.has('publishedAt_tz')).toBe(true);
|
|
283
|
-
expect(result.has('my_tz')).toBe(false);
|
|
284
|
-
expect(result.has('timezone_tz')).toBe(false);
|
|
285
|
-
});
|
|
286
|
-
it('should not collect companion if next field is not a select', ()=>{
|
|
287
|
-
// Edge case: date with timezone but next field is not a select
|
|
288
|
-
const fields = [
|
|
289
|
-
{
|
|
290
|
-
name: 'publishedAt',
|
|
291
|
-
type: 'date',
|
|
292
|
-
timezone: true
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
name: 'title',
|
|
296
|
-
type: 'text'
|
|
297
|
-
}
|
|
298
|
-
];
|
|
299
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
300
|
-
expect(result.size).toBe(0);
|
|
301
|
-
});
|
|
302
|
-
it('should not collect companion if date is last field', ()=>{
|
|
303
|
-
const fields = [
|
|
304
|
-
{
|
|
305
|
-
name: 'title',
|
|
306
|
-
type: 'text'
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
name: 'publishedAt',
|
|
310
|
-
type: 'date',
|
|
311
|
-
timezone: true
|
|
312
|
-
}
|
|
313
|
-
];
|
|
314
|
-
const result = collectTimezoneCompanionFields(fields);
|
|
315
|
-
expect(result.size).toBe(0);
|
|
316
|
-
});
|
|
317
|
-
});
|
|
318
|
-
|
|
319
|
-
//# sourceMappingURL=collectTimezoneCompanionFields.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/collectTimezoneCompanionFields.spec.ts"],"sourcesContent":["import type { FlattenedField } from 'payload'\n\nimport { describe, expect, it } from 'vitest'\n\nimport { collectTimezoneCompanionFields } from './collectTimezoneCompanionFields.js'\n\ndescribe('collectTimezoneCompanionFields', () => {\n it('should return empty set for fields without date timezone', () => {\n const fields: FlattenedField[] = [\n { name: 'title', type: 'text' },\n { name: 'description', type: 'textarea' },\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n expect(result.size).toBe(0)\n })\n\n it('should return empty set for date fields without timezone enabled', () => {\n const fields: FlattenedField[] = [\n { name: 'publishedAt', type: 'date' },\n { name: 'createdAt', type: 'date' },\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n expect(result.size).toBe(0)\n })\n\n it('should collect timezone companion from the next select field after date with timezone', () => {\n // Simulates sanitized fields where Payload inserts the companion right after the date\n const fields: FlattenedField[] = [\n { name: 'publishedAt', type: 'date', timezone: true },\n { name: 'publishedAt_tz', type: 'select', options: [] }, // auto-generated companion\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n expect(result.size).toBe(1)\n expect(result.has('publishedAt_tz')).toBe(true)\n })\n\n it('should handle overridden timezone field names', () => {\n // User overrode the timezone field name via timezone.override\n const fields: FlattenedField[] = [\n { name: 'publishedAt', type: 'date', timezone: true },\n { name: 'pub_timezone', type: 'select', options: [] }, // overridden name\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n expect(result.size).toBe(1)\n expect(result.has('pub_timezone')).toBe(true)\n expect(result.has('publishedAt_tz')).toBe(false)\n })\n\n it('should collect multiple timezone companions', () => {\n const fields: FlattenedField[] = [\n { name: 'publishedAt', type: 'date', timezone: true },\n { name: 'publishedAt_tz', type: 'select', options: [] },\n { name: 'title', type: 'text' },\n { name: 'scheduledAt', type: 'date', timezone: true },\n { name: 'scheduledAt_tz', type: 'select', options: [] },\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n expect(result.size).toBe(2)\n expect(result.has('publishedAt_tz')).toBe(true)\n expect(result.has('scheduledAt_tz')).toBe(true)\n })\n\n it('should handle date fields in groups', () => {\n const fields: FlattenedField[] = [\n {\n name: 'meta',\n type: 'group',\n fields: [\n { name: 'publishedAt', type: 'date', timezone: true },\n { name: 'publishedAt_tz', type: 'select', options: [] },\n ],\n },\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n expect(result.size).toBe(1)\n expect(result.has('meta_publishedAt_tz')).toBe(true)\n })\n\n it('should handle date fields in arrays', () => {\n const fields: FlattenedField[] = [\n {\n name: 'events',\n type: 'array',\n fields: [\n { name: 'startTime', type: 'date', timezone: true },\n { name: 'startTime_tz', type: 'select', options: [] },\n ],\n },\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n expect(result.size).toBe(1)\n expect(result.has('events_startTime_tz')).toBe(true)\n })\n\n it('should handle date fields in blocks', () => {\n const fields: FlattenedField[] = [\n {\n name: 'layout',\n type: 'blocks',\n blocks: [\n {\n slug: 'event',\n fields: [\n { name: 'eventDate', type: 'date', timezone: true },\n { name: 'eventDate_tz', type: 'select', options: [] },\n ],\n },\n ],\n },\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n expect(result.size).toBe(1)\n expect(result.has('layout_event_eventDate_tz')).toBe(true)\n })\n\n it('should handle deeply nested date fields', () => {\n const fields: FlattenedField[] = [\n {\n name: 'content',\n type: 'group',\n fields: [\n {\n name: 'schedule',\n type: 'array',\n fields: [\n { name: 'time', type: 'date', timezone: true },\n { name: 'time_tz', type: 'select', options: [] },\n ],\n },\n ],\n },\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n expect(result.size).toBe(1)\n expect(result.has('content_schedule_time_tz')).toBe(true)\n })\n\n it('should handle tabs', () => {\n const fields: FlattenedField[] = [\n {\n type: 'tabs',\n tabs: [\n {\n name: 'scheduling',\n fields: [\n { name: 'publishAt', type: 'date', timezone: true },\n { name: 'publishAt_tz', type: 'select', options: [] },\n ],\n },\n ],\n },\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n expect(result.size).toBe(1)\n expect(result.has('scheduling_publishAt_tz')).toBe(true)\n })\n\n it('should handle unnamed tabs (no prefix added)', () => {\n const fields: FlattenedField[] = [\n {\n type: 'tabs',\n tabs: [\n {\n fields: [\n { name: 'publishAt', type: 'date', timezone: true },\n { name: 'publishAt_tz', type: 'select', options: [] },\n ],\n },\n ],\n },\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n expect(result.size).toBe(1)\n expect(result.has('publishAt_tz')).toBe(true)\n })\n\n it('should not include user-defined fields ending with _tz', () => {\n const fields: FlattenedField[] = [\n { name: 'my_tz', type: 'text' },\n { name: 'timezone_tz', type: 'select', options: [] },\n { name: 'publishedAt', type: 'date', timezone: true },\n { name: 'publishedAt_tz', type: 'select', options: [] }, // actual companion\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n // Only the auto-generated timezone companion should be included\n expect(result.size).toBe(1)\n expect(result.has('publishedAt_tz')).toBe(true)\n expect(result.has('my_tz')).toBe(false)\n expect(result.has('timezone_tz')).toBe(false)\n })\n\n it('should not collect companion if next field is not a select', () => {\n // Edge case: date with timezone but next field is not a select\n const fields: FlattenedField[] = [\n { name: 'publishedAt', type: 'date', timezone: true },\n { name: 'title', type: 'text' }, // not a select, so not a companion\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n expect(result.size).toBe(0)\n })\n\n it('should not collect companion if date is last field', () => {\n const fields: FlattenedField[] = [\n { name: 'title', type: 'text' },\n { name: 'publishedAt', type: 'date', timezone: true },\n // no next field\n ]\n\n const result = collectTimezoneCompanionFields(fields)\n\n expect(result.size).toBe(0)\n })\n})\n"],"names":["describe","expect","it","collectTimezoneCompanionFields","fields","name","type","result","size","toBe","timezone","options","has","blocks","slug","tabs"],"mappings":"AAEA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,SAAQ;AAE7C,SAASC,8BAA8B,QAAQ,sCAAqC;AAEpFH,SAAS,kCAAkC;IACzCE,GAAG,4DAA4D;QAC7D,MAAME,SAA2B;YAC/B;gBAAEC,MAAM;g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