@payloadcms/plugin-import-export 3.79.0-internal.2874f3f → 3.79.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.
@@ -0,0 +1,3 @@
1
+ import type { SelectFieldClientComponent } from 'payload';
2
+ export declare const ImportCollectionField: SelectFieldClientComponent;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,17 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,3 @@
1
+ import type { NumberFieldClientComponent } from 'payload';
2
+ export declare const LimitField: NumberFieldClientComponent;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LimitField/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAKzD,eAAO,MAAM,UAAU,EAAE,0BA6BxB,CAAA"}
@@ -0,0 +1,39 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { NumberField, useDocumentInfo, useField, useListQuery } from '@payloadcms/ui';
4
+ import React, { useEffect, useRef } from 'react';
5
+ export const LimitField = (props)=>{
6
+ const { id } = useDocumentInfo();
7
+ const { setValue, value } = useField();
8
+ const { query } = useListQuery();
9
+ const didInitRef = useRef(false);
10
+ useEffect(()=>{
11
+ if (didInitRef.current) {
12
+ return;
13
+ }
14
+ if (id) {
15
+ didInitRef.current = true;
16
+ return;
17
+ }
18
+ if (typeof value === 'number') {
19
+ didInitRef.current = true;
20
+ return;
21
+ }
22
+ const queryLimit = query?.limit;
23
+ if (typeof queryLimit === 'number' && queryLimit > 0) {
24
+ setValue(queryLimit);
25
+ }
26
+ didInitRef.current = true;
27
+ }, [
28
+ id,
29
+ query?.limit,
30
+ value,
31
+ setValue
32
+ ]);
33
+ return /*#__PURE__*/ _jsx(NumberField, {
34
+ field: props.field,
35
+ path: props.path
36
+ });
37
+ };
38
+
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/LimitField/index.tsx"],"sourcesContent":["'use client'\n\nimport type { NumberFieldClientComponent } from 'payload'\n\nimport { NumberField, useDocumentInfo, useField, useListQuery } from '@payloadcms/ui'\nimport React, { useEffect, useRef } from 'react'\n\nexport const LimitField: NumberFieldClientComponent = (props) => {\n const { id } = useDocumentInfo()\n const { setValue, value } = useField<number>()\n const { query } = useListQuery()\n\n const didInitRef = useRef(false)\n\n useEffect(() => {\n if (didInitRef.current) {\n return\n }\n if (id) {\n didInitRef.current = true\n return\n }\n if (typeof value === 'number') {\n didInitRef.current = true\n return\n }\n\n const queryLimit = query?.limit\n if (typeof queryLimit === 'number' && queryLimit > 0) {\n setValue(queryLimit)\n }\n\n didInitRef.current = true\n }, [id, query?.limit, value, setValue])\n\n return <NumberField field={props.field} path={props.path} />\n}\n"],"names":["NumberField","useDocumentInfo","useField","useListQuery","React","useEffect","useRef","LimitField","props","id","setValue","value","query","didInitRef","current","queryLimit","limit","field","path"],"mappings":"AAAA;;AAIA,SAASA,WAAW,EAAEC,eAAe,EAAEC,QAAQ,EAAEC,YAAY,QAAQ,iBAAgB;AACrF,OAAOC,SAASC,SAAS,EAAEC,MAAM,QAAQ,QAAO;AAEhD,OAAO,MAAMC,aAAyC,CAACC;IACrD,MAAM,EAAEC,EAAE,EAAE,GAAGR;IACf,MAAM,EAAES,QAAQ,EAAEC,KAAK,EAAE,GAAGT;IAC5B,MAAM,EAAEU,KAAK,EAAE,GAAGT;IAElB,MAAMU,aAAaP,OAAO;IAE1BD,UAAU;QACR,IAAIQ,WAAWC,OAAO,EAAE;YACtB;QACF;QACA,IAAIL,IAAI;YACNI,WAAWC,OAAO,GAAG;YACrB;QACF;QACA,IAAI,OAAOH,UAAU,UAAU;YAC7BE,WAAWC,OAAO,GAAG;YACrB;QACF;QAEA,MAAMC,aAAaH,OAAOI;QAC1B,IAAI,OAAOD,eAAe,YAAYA,aAAa,GAAG;YACpDL,SAASK;QACX;QAEAF,WAAWC,OAAO,GAAG;IACvB,GAAG;QAACL;QAAIG,OAAOI;QAAOL;QAAOD;KAAS;IAEtC,qBAAO,KAACV;QAAYiB,OAAOT,MAAMS,KAAK;QAAEC,MAAMV,MAAMU,IAAI;;AAC1D,EAAC"}
@@ -0,0 +1,3 @@
1
+ import type { SelectFieldClientComponent } from 'payload';
2
+ export declare const LocaleField: SelectFieldClientComponent;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LocaleField/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAKzD,eAAO,MAAM,WAAW,EAAE,0BA4BzB,CAAA"}
@@ -0,0 +1,38 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { SelectField, useDocumentInfo, useField, useLocale } from '@payloadcms/ui';
4
+ import React, { useEffect, useRef } from 'react';
5
+ export const LocaleField = (props)=>{
6
+ const { id } = useDocumentInfo();
7
+ const { setValue, value } = useField();
8
+ const locale = useLocale();
9
+ const didInitRef = useRef(false);
10
+ useEffect(()=>{
11
+ if (didInitRef.current) {
12
+ return;
13
+ }
14
+ if (id) {
15
+ didInitRef.current = true;
16
+ return;
17
+ }
18
+ if (typeof value === 'string' && value !== 'all') {
19
+ didInitRef.current = true;
20
+ return;
21
+ }
22
+ if (locale?.code) {
23
+ setValue(locale.code);
24
+ }
25
+ didInitRef.current = true;
26
+ }, [
27
+ id,
28
+ locale?.code,
29
+ value,
30
+ setValue
31
+ ]);
32
+ return /*#__PURE__*/ _jsx(SelectField, {
33
+ field: props.field,
34
+ path: props.path
35
+ });
36
+ };
37
+
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/LocaleField/index.tsx"],"sourcesContent":["'use client'\n\nimport type { SelectFieldClientComponent } from 'payload'\n\nimport { SelectField, useDocumentInfo, useField, useLocale } from '@payloadcms/ui'\nimport React, { useEffect, useRef } from 'react'\n\nexport const LocaleField: SelectFieldClientComponent = (props) => {\n const { id } = useDocumentInfo()\n const { setValue, value } = useField<string>()\n const locale = useLocale()\n\n const didInitRef = useRef(false)\n\n useEffect(() => {\n if (didInitRef.current) {\n return\n }\n if (id) {\n didInitRef.current = true\n return\n }\n if (typeof value === 'string' && value !== 'all') {\n didInitRef.current = true\n return\n }\n\n if (locale?.code) {\n setValue(locale.code)\n }\n\n didInitRef.current = true\n }, [id, locale?.code, value, setValue])\n\n return <SelectField field={props.field} path={props.path} />\n}\n"],"names":["SelectField","useDocumentInfo","useField","useLocale","React","useEffect","useRef","LocaleField","props","id","setValue","value","locale","didInitRef","current","code","field","path"],"mappings":"AAAA;;AAIA,SAASA,WAAW,EAAEC,eAAe,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,iBAAgB;AAClF,OAAOC,SAASC,SAAS,EAAEC,MAAM,QAAQ,QAAO;AAEhD,OAAO,MAAMC,cAA0C,CAACC;IACtD,MAAM,EAAEC,EAAE,EAAE,GAAGR;IACf,MAAM,EAAES,QAAQ,EAAEC,KAAK,EAAE,GAAGT;IAC5B,MAAMU,SAAST;IAEf,MAAMU,aAAaP,OAAO;IAE1BD,UAAU;QACR,IAAIQ,WAAWC,OAAO,EAAE;YACtB;QACF;QACA,IAAIL,IAAI;YACNI,WAAWC,OAAO,GAAG;YACrB;QACF;QACA,IAAI,OAAOH,UAAU,YAAYA,UAAU,OAAO;YAChDE,WAAWC,OAAO,GAAG;YACrB;QACF;QAEA,IAAIF,QAAQG,MAAM;YAChBL,SAASE,OAAOG,IAAI;QACtB;QAEAF,WAAWC,OAAO,GAAG;IACvB,GAAG;QAACL;QAAIG,QAAQG;QAAMJ;QAAOD;KAAS;IAEtC,qBAAO,KAACV;QAAYgB,OAAOR,MAAMQ,KAAK;QAAEC,MAAMT,MAAMS,IAAI;;AAC1D,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getFields.d.ts","sourceRoot":"","sources":["../../src/export/getFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAA+B,MAAM,SAAS,CAAA;AAKzE,KAAK,gBAAgB,GAAG;IACtB;;;OAGG;IACH,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,SAAS,YAAa,gBAAgB,KAAG,KAAK,EAuQ1D,CAAA"}
1
+ {"version":3,"file":"getFields.d.ts","sourceRoot":"","sources":["../../src/export/getFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAA+B,MAAM,SAAS,CAAA;AAKzE,KAAK,gBAAgB,GAAG;IACtB;;;OAGG;IACH,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,SAAS,YAAa,gBAAgB,KAAG,KAAK,EA6Q1D,CAAA"}
@@ -8,6 +8,9 @@ export const getFields = (options)=>{
8
8
  name: 'locale',
9
9
  type: 'select',
10
10
  admin: {
11
+ components: {
12
+ Field: '@payloadcms/plugin-import-export/rsc#LocaleField'
13
+ },
11
14
  width: '25%'
12
15
  },
13
16
  defaultValue: 'all',
@@ -67,6 +70,9 @@ export const getFields = (options)=>{
67
70
  name: 'limit',
68
71
  type: 'number',
69
72
  admin: {
73
+ components: {
74
+ Field: '@payloadcms/plugin-import-export/rsc#LimitField'
75
+ },
70
76
  placeholder: 'No limit',
71
77
  step: 100,
72
78
  width: '33.3333%'
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/export/getFields.ts"],"sourcesContent":["import type { TFunction } from '@payloadcms/translations'\nimport type { Config, Field, PayloadRequest, SelectField } from 'payload'\n\nimport { getFilename } from '../utilities/getFilename.js'\nimport { validateLimitValue } from '../utilities/validateLimitValue.js'\n\ntype GetFieldsOptions = {\n /**\n * Collection slugs that this export collection supports.\n * Used for schema/types and as the options in the select field.\n */\n collectionSlugs: string[]\n config: Config\n /**\n * Force a specific format, hiding the format dropdown\n */\n format?: 'csv' | 'json'\n}\n\nexport const getFields = (options: GetFieldsOptions): Field[] => {\n const { collectionSlugs, config, format } = options\n\n let localeField: SelectField | undefined\n\n if (config.localization) {\n localeField = {\n name: 'locale',\n type: 'select',\n admin: {\n width: '25%',\n },\n defaultValue: 'all',\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-locale-label'),\n options: [\n {\n label: ({ t }) => t('general:allLocales'),\n value: 'all',\n },\n ...config.localization.locales.map((locale) => ({\n label: typeof locale === 'string' ? locale : locale.label,\n value: typeof locale === 'string' ? locale : locale.code,\n })),\n ],\n }\n }\n\n return [\n {\n type: 'collapsible',\n fields: [\n {\n name: 'name',\n type: 'text',\n defaultValue: () => getFilename(),\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-name-label'),\n },\n {\n type: 'row',\n fields: [\n {\n name: 'format',\n type: 'select',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#FormatField',\n },\n width: '33.3333%',\n },\n defaultValue: format ?? 'csv',\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-format-label'),\n options: [\n {\n label: 'CSV',\n value: 'csv',\n },\n {\n label: 'JSON',\n value: 'json',\n },\n ],\n required: true,\n },\n {\n name: 'limit',\n type: 'number',\n admin: {\n placeholder: 'No limit',\n step: 100,\n width: '33.3333%',\n },\n validate: (value: null | number | undefined, { req }: { req: { t: TFunction } }) => {\n return validateLimitValue(value, req.t) ?? true\n },\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-limit-label'),\n },\n {\n name: 'page',\n type: 'number',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#Page',\n },\n condition: ({ limit }) => {\n // Show the page field only if limit is set\n return typeof limit === 'number' && limit !== 0\n },\n width: '33.3333%',\n },\n defaultValue: 1,\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-page-label'),\n },\n ],\n },\n {\n type: 'row',\n fields: [\n {\n name: 'sort',\n type: 'text',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#SortBy',\n },\n },\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-sort-label'),\n },\n {\n name: 'sortOrder',\n type: 'select',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#SortOrder',\n },\n // Only show when `sort` has a value\n condition: ({ sort }) => typeof sort === 'string' && sort.trim().length > 0,\n },\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-sort-order-label'),\n options: [\n { label: 'Ascending', value: 'asc' },\n { label: 'Descending', value: 'desc' },\n ],\n },\n ...(localeField ? [localeField] : []),\n {\n name: 'drafts',\n type: 'select',\n admin: {\n condition: (data) => {\n const collectionConfig = (config.collections ?? []).find(\n (collection) => collection.slug === data.collectionSlug,\n )\n return Boolean(\n typeof collectionConfig?.versions === 'object' &&\n collectionConfig?.versions?.drafts,\n )\n },\n width: '25%',\n },\n defaultValue: 'yes',\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-drafts-label'),\n options: [\n {\n label: ({ t }) => t('general:yes'),\n value: 'yes',\n },\n {\n label: ({ t }) => t('general:no'),\n value: 'no',\n },\n ],\n },\n // {\n // name: 'depth',\n // type: 'number',\n // // @ts-expect-error - this is not correctly typed in plugins right now\n // label: ({ t }) => t('plugin-import-export:field-depth-label'),\n // admin: {\n // width: '33%',\n // },\n // defaultValue: 1,\n // required: true,\n // },\n ],\n },\n {\n name: 'selectionToUse',\n type: 'radio',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#SelectionToUseField',\n },\n },\n options: [\n {\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:selectionToUse-currentSelection'),\n value: 'currentSelection',\n },\n {\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:selectionToUse-currentFilters'),\n value: 'currentFilters',\n },\n {\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:selectionToUse-allDocuments'),\n value: 'all',\n },\n ],\n virtual: true,\n },\n {\n name: 'fields',\n type: 'text',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#FieldsToExport',\n },\n },\n hasMany: true,\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-fields-label'),\n },\n {\n name: 'collectionSlug',\n type: 'text',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#CollectionField',\n },\n },\n defaultValue: collectionSlugs[0],\n required: true,\n validate: (value: null | string | undefined, { req }: { req: PayloadRequest }) => {\n if (!value) {\n return 'Collection is required'\n }\n // Validate that the collection exists\n const collectionExists = req?.payload?.collections?.[value]\n if (!collectionExists) {\n return `Collection \"${value}\" does not exist`\n }\n return true\n },\n },\n {\n name: 'where',\n type: 'json',\n admin: {\n hidden: true,\n },\n defaultValue: {},\n hooks: {\n beforeValidate: [\n ({ value }) => {\n return value ?? {}\n },\n ],\n },\n },\n ],\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:exportOptions'),\n },\n {\n name: 'preview',\n type: 'ui',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#ExportPreview',\n },\n },\n },\n ]\n}\n"],"names":["getFilename","validateLimitValue","getFields","options","collectionSlugs","config","format","localeField","localization","name","type","admin","width","defaultValue","label","t","value","locales","map","locale","code","fields","components","Field","required","placeholder","step","validate","req","condition","limit","sort","trim","length","data","collectionConfig","collections","find","collection","slug","collectionSlug","Boolean","versions","drafts","virtual","hasMany","collectionExists","payload","hidden","hooks","beforeValidate"],"mappings":"AAGA,SAASA,WAAW,QAAQ,8BAA6B;AACzD,SAASC,kBAAkB,QAAQ,qCAAoC;AAevE,OAAO,MAAMC,YAAY,CAACC;IACxB,MAAM,EAAEC,eAAe,EAAEC,MAAM,EAAEC,MAAM,EAAE,GAAGH;IAE5C,IAAII;IAEJ,IAAIF,OAAOG,YAAY,EAAE;QACvBD,cAAc;YACZE,MAAM;YACNC,MAAM;YACNC,OAAO;gBACLC,OAAO;YACT;YACAC,cAAc;YACd,sEAAsE;YACtEC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;YACpBZ,SAAS;gBACP;oBACEW,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;oBACpBC,OAAO;gBACT;mBACGX,OAAOG,YAAY,CAACS,OAAO,CAACC,GAAG,CAAC,CAACC,SAAY,CAAA;wBAC9CL,OAAO,OAAOK,WAAW,WAAWA,SAASA,OAAOL,KAAK;wBACzDE,OAAO,OAAOG,WAAW,WAAWA,SAASA,OAAOC,IAAI;oBAC1D,CAAA;aACD;QACH;IACF;IAEA,OAAO;QACL;YACEV,MAAM;YACNW,QAAQ;gBACN;oBACEZ,MAAM;oBACNC,MAAM;oBACNG,cAAc,IAAMb;oBACpB,sEAAsE;oBACtEc,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;gBACtB;gBACA;oBACEL,MAAM;oBACNW,QAAQ;wBACN;4BACEZ,MAAM;4BACNC,MAAM;4BACNC,OAAO;gCACLW,YAAY;oCACVC,OAAO;gCACT;gCACAX,OAAO;4BACT;4BACAC,cAAcP,UAAU;4BACxB,sEAAsE;4BACtEQ,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;4BACpBZ,SAAS;gCACP;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BACNC,MAAM;oBACNC,OAAO;wBACLW,YAAY;4BACVC,OAAO;wBACT;oBACF;oBACAV,cAAcT,eAAe,CAAC,EAAE;oBAChCoB,UAAU;oBACVG,UAAU,CAACX,OAAkC,EAAEY,GAAG,EAA2B;wBAC3E,IAAI,CAACZ,OAAO;4BACV,OAAO;wBACT;wBACA,sCAAsC;wBACtC,MAAM8B,mBAAmBlB,KAAKmB,SAASX,aAAa,CAACpB,MAAM;wBAC3D,IAAI,CAAC8B,kBAAkB;4BACrB,OAAO,CAAC,YAAY,EAAE9B,MAAM,gBAAgB,CAAC;wBAC/C;wBACA,OAAO;oBACT;gBACF;gBACA;oBACEP,MAAM;oBACNC,MAAM;oBACNC,OAAO;wBACLqC,QAAQ;oBACV;oBACAnC,cAAc,CAAC;oBACfoC,OAAO;wBACLC,gBAAgB;4BACd,CAAC,EAAElC,KAAK,EAAE;gCACR,OAAOA,SAAS,CAAC;4BACnB;yBACD;oBACH;gBACF;aACD;YACD,sEAAsE;YACtEF,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;QACtB;QACA;YACEN,MAAM;YACNC,MAAM;YACNC,OAAO;gBACLW,YAAY;oBACVC,OAAO;gBACT;YACF;QACF;KACD;AACH,EAAC"}
1
+ {"version":3,"sources":["../../src/export/getFields.ts"],"sourcesContent":["import type { TFunction } from '@payloadcms/translations'\nimport type { Config, Field, PayloadRequest, SelectField } from 'payload'\n\nimport { getFilename } from '../utilities/getFilename.js'\nimport { validateLimitValue } from '../utilities/validateLimitValue.js'\n\ntype GetFieldsOptions = {\n /**\n * Collection slugs that this export collection supports.\n * Used for schema/types and as the options in the select field.\n */\n collectionSlugs: string[]\n config: Config\n /**\n * Force a specific format, hiding the format dropdown\n */\n format?: 'csv' | 'json'\n}\n\nexport const getFields = (options: GetFieldsOptions): Field[] => {\n const { collectionSlugs, config, format } = options\n\n let localeField: SelectField | undefined\n\n if (config.localization) {\n localeField = {\n name: 'locale',\n type: 'select',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#LocaleField',\n },\n width: '25%',\n },\n defaultValue: 'all',\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-locale-label'),\n options: [\n {\n label: ({ t }) => t('general:allLocales'),\n value: 'all',\n },\n ...config.localization.locales.map((locale) => ({\n label: typeof locale === 'string' ? locale : locale.label,\n value: typeof locale === 'string' ? locale : locale.code,\n })),\n ],\n }\n }\n\n return [\n {\n type: 'collapsible',\n fields: [\n {\n name: 'name',\n type: 'text',\n defaultValue: () => getFilename(),\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-name-label'),\n },\n {\n type: 'row',\n fields: [\n {\n name: 'format',\n type: 'select',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#FormatField',\n },\n width: '33.3333%',\n },\n defaultValue: format ?? 'csv',\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-format-label'),\n options: [\n {\n label: 'CSV',\n value: 'csv',\n },\n {\n label: 'JSON',\n value: 'json',\n },\n ],\n required: true,\n },\n {\n name: 'limit',\n type: 'number',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#LimitField',\n },\n placeholder: 'No limit',\n step: 100,\n width: '33.3333%',\n },\n validate: (value: null | number | undefined, { req }: { req: { t: TFunction } }) => {\n return validateLimitValue(value, req.t) ?? true\n },\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-limit-label'),\n },\n {\n name: 'page',\n type: 'number',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#Page',\n },\n condition: ({ limit }) => {\n // Show the page field only if limit is set\n return typeof limit === 'number' && limit !== 0\n },\n width: '33.3333%',\n },\n defaultValue: 1,\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-page-label'),\n },\n ],\n },\n {\n type: 'row',\n fields: [\n {\n name: 'sort',\n type: 'text',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#SortBy',\n },\n },\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-sort-label'),\n },\n {\n name: 'sortOrder',\n type: 'select',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#SortOrder',\n },\n // Only show when `sort` has a value\n condition: ({ sort }) => typeof sort === 'string' && sort.trim().length > 0,\n },\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-sort-order-label'),\n options: [\n { label: 'Ascending', value: 'asc' },\n { label: 'Descending', value: 'desc' },\n ],\n },\n ...(localeField ? [localeField] : []),\n {\n name: 'drafts',\n type: 'select',\n admin: {\n condition: (data) => {\n const collectionConfig = (config.collections ?? []).find(\n (collection) => collection.slug === data.collectionSlug,\n )\n return Boolean(\n typeof collectionConfig?.versions === 'object' &&\n collectionConfig?.versions?.drafts,\n )\n },\n width: '25%',\n },\n defaultValue: 'yes',\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-drafts-label'),\n options: [\n {\n label: ({ t }) => t('general:yes'),\n value: 'yes',\n },\n {\n label: ({ t }) => t('general:no'),\n value: 'no',\n },\n ],\n },\n // {\n // name: 'depth',\n // type: 'number',\n // // @ts-expect-error - this is not correctly typed in plugins right now\n // label: ({ t }) => t('plugin-import-export:field-depth-label'),\n // admin: {\n // width: '33%',\n // },\n // defaultValue: 1,\n // required: true,\n // },\n ],\n },\n {\n name: 'selectionToUse',\n type: 'radio',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#SelectionToUseField',\n },\n },\n options: [\n {\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:selectionToUse-currentSelection'),\n value: 'currentSelection',\n },\n {\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:selectionToUse-currentFilters'),\n value: 'currentFilters',\n },\n {\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:selectionToUse-allDocuments'),\n value: 'all',\n },\n ],\n virtual: true,\n },\n {\n name: 'fields',\n type: 'text',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#FieldsToExport',\n },\n },\n hasMany: true,\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:field-fields-label'),\n },\n {\n name: 'collectionSlug',\n type: 'text',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#CollectionField',\n },\n },\n defaultValue: collectionSlugs[0],\n required: true,\n validate: (value: null | string | undefined, { req }: { req: PayloadRequest }) => {\n if (!value) {\n return 'Collection is required'\n }\n // Validate that the collection exists\n const collectionExists = req?.payload?.collections?.[value]\n if (!collectionExists) {\n return `Collection \"${value}\" does not exist`\n }\n return true\n },\n },\n {\n name: 'where',\n type: 'json',\n admin: {\n hidden: true,\n },\n defaultValue: {},\n hooks: {\n beforeValidate: [\n ({ value }) => {\n return value ?? {}\n },\n ],\n },\n },\n ],\n // @ts-expect-error - this is not correctly typed in plugins right now\n label: ({ t }) => t('plugin-import-export:exportOptions'),\n },\n {\n name: 'preview',\n type: 'ui',\n admin: {\n components: {\n Field: '@payloadcms/plugin-import-export/rsc#ExportPreview',\n },\n },\n },\n ]\n}\n"],"names":["getFilename","validateLimitValue","getFields","options","collectionSlugs","config","format","localeField","localization","name","type","admin","components","Field","width","defaultValue","label","t","value","locales","map","locale","code","fields","required","placeholder","step","validate","req","condition","limit","sort","trim","length","data","collectionConfig","collections","find","collection","slug","collectionSlug","Boolean","versions","drafts","virtual","hasMany","collectionExists","payload","hidden","hooks","beforeValidate"],"mappings":"AAGA,SAASA,WAAW,QAAQ,8BAA6B;AACzD,SAASC,kBAAkB,QAAQ,qCAAoC;AAevE,OAAO,MAAMC,YAAY,CAACC;IACxB,MAAM,EAAEC,eAAe,EAAEC,MAAM,EAAEC,MAAM,EAAE,GA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a,CAAClB,MAAM;wBAC3D,IAAI,CAAC4B,kBAAkB;4BACrB,OAAO,CAAC,YAAY,EAAE5B,MAAM,gBAAgB,CAAC;wBAC/C;wBACA,OAAO;oBACT;gBACF;gBACA;oBACET,MAAM;oBACNC,MAAM;oBACNC,OAAO;wBACLqC,QAAQ;oBACV;oBACAjC,cAAc,CAAC;oBACfkC,OAAO;wBACLC,gBAAgB;4BACd,CAAC,EAAEhC,KAAK,EAAE;gCACR,OAAOA,SAAS,CAAC;4BACnB;yBACD;oBACH;gBACF;aACD;YACD,sEAAsE;YACtEF,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;QACtB;QACA;YACER,MAAM;YACNC,MAAM;YACNC,OAAO;gBACLC,YAAY;oBACVC,OAAO;gBACT;YACF;QACF;KACD;AACH,EAAC"}
@@ -8,6 +8,8 @@ export { ImportExportProvider } from '../components/ImportExportProvider/index.j
8
8
  export { ImportListMenuItem } from '../components/ImportListMenuItem/index.js';
9
9
  export { ImportPreview } from '../components/ImportPreview/index.js';
10
10
  export { ImportSaveButton } from '../components/ImportSaveButton/index.js';
11
+ export { LimitField } from '../components/LimitField/index.js';
12
+ export { LocaleField } from '../components/LocaleField/index.js';
11
13
  export { Page } from '../components/Page/index.js';
12
14
  export { SelectionToUseField } from '../components/SelectionToUseField/index.js';
13
15
  export { SortBy } from '../components/SortBy/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../../src/exports/rsc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAA;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAA;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,EAAE,WAAW,EAAE,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4C,CAAA;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAA"}
@@ -8,6 +8,8 @@ export { ImportExportProvider } from '../components/ImportExportProvider/index.j
8
8
  export { ImportListMenuItem } from '../components/ImportListMenuItem/index.js';
9
9
  export { ImportPreview } from '../components/ImportPreview/index.js';
10
10
  export { ImportSaveButton } from '../components/ImportSaveButton/index.js';
11
+ export { LimitField } from '../components/LimitField/index.js';
12
+ export { LocaleField } from '../components/LocaleField/index.js';
11
13
  export { Page } from '../components/Page/index.js';
12
14
  export { SelectionToUseField } from '../components/SelectionToUseField/index.js';
13
15
  export { SortBy } from '../components/SortBy/index.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exports/rsc.ts"],"sourcesContent":["export { CollectionField } from '../components/CollectionField/index.js'\nexport { ExportListMenuItem } from '../components/ExportListMenuItem/index.js'\nexport { ExportPreview } from '../components/ExportPreview/index.js'\nexport { ExportSaveButton } from '../components/ExportSaveButton/index.js'\nexport { FieldsToExport } from '../components/FieldsToExport/index.js'\nexport { FormatField } from '../components/FormatField/index.js'\nexport { ImportExportProvider } from '../components/ImportExportProvider/index.js'\nexport { ImportListMenuItem } from '../components/ImportListMenuItem/index.js'\nexport { ImportPreview } from '../components/ImportPreview/index.js'\nexport { ImportSaveButton } from '../components/ImportSaveButton/index.js'\nexport { Page } from '../components/Page/index.js'\nexport { SelectionToUseField } from '../components/SelectionToUseField/index.js'\nexport { SortBy } from '../components/SortBy/index.js'\nexport { SortOrder } from '../components/SortOrder/index.js'\n"],"names":["CollectionField","ExportListMenuItem","ExportPreview","ExportSaveButton","FieldsToExport","FormatField","ImportExportProvider","ImportListMenuItem","ImportPreview","ImportSaveButton","Page","SelectionToUseField","SortBy","SortOrder"],"mappings":"AAAA,SAASA,eAAe,QAAQ,yCAAwC;AACxE,SAASC,kBAAkB,QAAQ,4CAA2C;AAC9E,SAASC,aAAa,QAAQ,uCAAsC;AACpE,SAASC,gBAAgB,QAAQ,0CAAyC;AAC1E,SAASC,cAAc,QAAQ,wCAAuC;AACtE,SAASC,WAAW,QAAQ,qCAAoC;AAChE,SAASC,oBAAoB,QAAQ,8CAA6C;AAClF,SAASC,kBAAkB,QAAQ,4CAA2C;AAC9E,SAASC,aAAa,QAAQ,uCAAsC;AACpE,SAASC,gBAAgB,QAAQ,0CAAyC;AAC1E,SAASC,IAAI,QAAQ,8BAA6B;AAClD,SAASC,mBAAmB,QAAQ,6CAA4C;AAChF,SAASC,MAAM,QAAQ,gCAA+B;AACtD,SAASC,SAAS,QAAQ,mCAAkC"}
1
+ {"version":3,"sources":["../../src/exports/rsc.ts"],"sourcesContent":["export { CollectionField } from '../components/CollectionField/index.js'\nexport { ExportListMenuItem } from '../components/ExportListMenuItem/index.js'\nexport { ExportPreview } from '../components/ExportPreview/index.js'\nexport { ExportSaveButton } from '../components/ExportSaveButton/index.js'\nexport { FieldsToExport } from '../components/FieldsToExport/index.js'\nexport { FormatField } from '../components/FormatField/index.js'\nexport { ImportExportProvider } from '../components/ImportExportProvider/index.js'\nexport { ImportListMenuItem } from '../components/ImportListMenuItem/index.js'\nexport { ImportPreview } from '../components/ImportPreview/index.js'\nexport { ImportSaveButton } from '../components/ImportSaveButton/index.js'\nexport { LimitField } from '../components/LimitField/index.js'\nexport { LocaleField } from '../components/LocaleField/index.js'\nexport { Page } from '../components/Page/index.js'\nexport { SelectionToUseField } from '../components/SelectionToUseField/index.js'\nexport { SortBy } from '../components/SortBy/index.js'\nexport { SortOrder } from '../components/SortOrder/index.js'\n"],"names":["CollectionField","ExportListMenuItem","ExportPreview","ExportSaveButton","FieldsToExport","FormatField","ImportExportProvider","ImportListMenuItem","ImportPreview","ImportSaveButton","LimitField","LocaleField","Page","SelectionToUseField","SortBy","SortOrder"],"mappings":"AAAA,SAASA,eAAe,QAAQ,yCAAwC;AACxE,SAASC,kBAAkB,QAAQ,4CAA2C;AAC9E,SAASC,aAAa,QAAQ,uCAAsC;AACpE,SAASC,gBAAgB,QAAQ,0CAAyC;AAC1E,SAASC,cAAc,QAAQ,wCAAuC;AACtE,SAASC,WAAW,QAAQ,qCAAoC;AAChE,SAASC,oBAAoB,QAAQ,8CAA6C;AAClF,SAASC,kBAAkB,QAAQ,4CAA2C;AAC9E,SAASC,aAAa,QAAQ,uCAAsC;AACpE,SAASC,gBAAgB,QAAQ,0CAAyC;AAC1E,SAASC,UAAU,QAAQ,oCAAmC;AAC9D,SAASC,WAAW,QAAQ,qCAAoC;AAChE,SAASC,IAAI,QAAQ,8BAA6B;AAClD,SAASC,mBAAmB,QAAQ,6CAA4C;AAChF,SAASC,MAAM,QAAQ,gCAA+B;AACtD,SAASC,SAAS,QAAQ,mCAAkC"}
@@ -0,0 +1,24 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,89 @@
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
@@ -0,0 +1 @@
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,UAAUF,QAAQN,SAAS,GAAGA,OAAO,CAAC,EAAEM,MAAM,GAAIA,QAAQN;QAEhE,OAAQK,MAAMI,IAAI;YAChB,KAAK;gBAAS;oBACZ,kFAAkF;oBAClF,MAAMC,YAAYZ,+BAA+BO,MAAMN,MAAM,EAAsBS;oBACnF,KAAK,MAAMG,YAAYD,UAAW;wBAChCT,OAAOW,GAAG,CAACD;oBACb;oBACA;gBACF;YAEA,KAAK;gBAAU;oBACb,+BAA+B;oBAC/B,KAAK,MAAME,SAASR,MAAMS,MAAM,CAAE;wBAChC,IAAI,OAAOD,UAAU,UAAU;4BAC7B,UAAS,wBAAwB;wBACnC;wBACA,MAAME,cAAc,GAAGP,QAAQ,CAAC,EAAEK,MAAMG,IAAI,EAAE;wBAC9C,MAAMC,cAAcnB,+BAClBe,MAAMK,eAAe,IAAIL,MAAMd,MAAM,EACrCgB;wBAEF,KAAK,MAAMI,cAAcF,YAAa;4BACpChB,OAAOW,GAAG,CAACO;wBACb;oBACF;oBACA;gBACF;YAEA,KAAK;YACL,KAAK;YACL,KAAK;gBAAO;oBACV,MAAMT,YAAYZ,+BAA+BO,MAAMN,MAAM,EAAsBS;oBACnF,KAAK,MAAMG,YAAYD,UAAW;wBAChCT,OAAOW,GAAG,CAACD;oBACb;oBACA;gBACF;YAEA,KAAK;gBAAQ;oBACX,kFAAkF;oBAClF,yEAAyE;oBACzE,IAAI,cAAcN,SAASA,MAAMe,QAAQ,EAAE;wBACzC,MAAMC,YAAYtB,MAAM,CAACI,IAAI,EAAE;wBAC/B,IAAIkB,aAAa,UAAUA,aAAaA,UAAUZ,IAAI,KAAK,UAAU;4BACnE,MAAMa,gBAAgBtB,SAAS,GAAGA,OAAO,CAAC,EAAEqB,UAAUf,IAAI,EAAE,GAAGe,UAAUf,IAAI;4BAC7EL,OAAOW,GAAG,CAACU;wBACb;oBACF;oBACA;gBACF;YAEA,KAAK;gBAAQ;oBACX,KAAK,MAAMC,OAAOlB,MAAMmB,IAAI,IAAI,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"}
@@ -0,0 +1,319 @@
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
@@ -0,0 +1 @@
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;gBAASC,MAAM;YAAO;YAC9B;gBAAED,MAAM;gBAAeC,MAAM;YAAW;SACzC;QAED,MAAMC,SAASJ,+BAA+BC;QAE9CH,OAAOM,OAAOC,IAAI,EAAEC,IAAI,CAAC;IAC3B;IAEAP,GAAG,oEAAoE;QACrE,MAAME,SAA2B;YAC/B;gBAAEC,MAAM;gBAAeC,MAAM;YAAO;YACpC;gBAAED,MAAM;gBAAaC,MAAM;YAAO;SACnC;QAED,MAAMC,SAASJ,+BAA+BC;QAE9CH,OAAOM,OAAOC,IAAI,EAAEC,IAAI,CAAC;IAC3B;IAEAP,GAAG,yFAAyF;QAC1F,sFAAsF;QACtF,MAAME,SAA2B;YAC/B;gBAAEC,MAAM;gBAAeC,MAAM;gBAAQI,UAAU;YAAK;YACpD;gBAAEL,MAAM;gBAAkBC,MAAM;gBAAUK,SAAS,EAAE;YAAC;SACvD;QAED,MAAMJ,SAASJ,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EH,OAAOM,OAAOC,IAAI,EAAEC,IAAI,CAAC;QACzBR,OAAOM,OAAOK,GAAG,CAAC,mBAAmBH,IAAI,CAAC;QAC1CR,OAAOM,OAAOK,GAAG,CAAC,UAAUH,IAAI,CAAC;QACjCR,OAAOM,OAAOK,GAAG,CAAC,gBAAgBH,IAAI,CAAC;IACzC;IAEAP,GAAG,8DAA8D;QAC/D,+DAA+D;QAC/D,MAAME,SAA2B;YAC/B;gBAAEC,MAAM;gBAAeC,MAAM;gBAAQI,UAAU;YAAK;YACpD;gBAAEL,MAAM;gBAASC,MAAM;YAAO;SAC/B;QAED,MAAMC,SAASJ,+BAA+BC;QAE9CH,OAAOM,OAAOC,IAAI,EAAEC,IAAI,CAAC;IAC3B;IAEAP,GAAG,sDAAsD;QACvD,MAAME,SAA2B;YAC/B;gBAAEC,MAAM;gBAASC,MAAM;YAAO;YAC9B;gBAAED,MAAM;gBAAeC,MAAM;gBAAQI,UAAU;YAAK;SAErD;QAED,MAAMH,SAASJ,+BAA+BC;QAE9CH,OAAOM,OAAOC,IAAI,EAAEC,IAAI,CAAC;IAC3B;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/plugin-import-export",
3
- "version": "3.79.0-internal.2874f3f",
3
+ "version": "3.79.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/translations": "3.79.0-internal.2874f3f",
68
- "@payloadcms/ui": "3.79.0-internal.2874f3f"
67
+ "@payloadcms/translations": "3.79.0",
68
+ "@payloadcms/ui": "3.79.0"
69
69
  },
70
70
  "devDependencies": {
71
- "@payloadcms/eslint-config": "3.28.0",
72
- "@payloadcms/ui": "3.79.0-internal.2874f3f",
73
- "payload": "3.79.0-internal.2874f3f"
71
+ "payload": "3.79.0",
72
+ "@payloadcms/ui": "3.79.0",
73
+ "@payloadcms/eslint-config": "3.28.0"
74
74
  },
75
75
  "peerDependencies": {
76
- "@payloadcms/ui": "3.79.0-internal.2874f3f",
77
- "payload": "3.79.0-internal.2874f3f"
76
+ "@payloadcms/ui": "3.79.0",
77
+ "payload": "3.79.0"
78
78
  },
79
79
  "homepage:": "https://payloadcms.com",
80
80
  "scripts": {