@payloadcms/plugin-import-export 3.79.0-internal.2874f3f → 3.80.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/dist/components/LimitField/index.d.ts +3 -0
- package/dist/components/LimitField/index.d.ts.map +1 -0
- package/dist/components/LimitField/index.js +39 -0
- package/dist/components/LimitField/index.js.map +1 -0
- package/dist/components/LocaleField/index.d.ts +3 -0
- package/dist/components/LocaleField/index.d.ts.map +1 -0
- package/dist/components/LocaleField/index.js +38 -0
- package/dist/components/LocaleField/index.js.map +1 -0
- package/dist/export/getFields.d.ts.map +1 -1
- package/dist/export/getFields.js +6 -0
- package/dist/export/getFields.js.map +1 -1
- package/dist/exports/rsc.d.ts +2 -0
- package/dist/exports/rsc.d.ts.map +1 -1
- package/dist/exports/rsc.js +2 -0
- package/dist/exports/rsc.js.map +1 -1
- package/package.json +7 -7
|
@@ -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 @@
|
|
|
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,
|
|
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"}
|
package/dist/export/getFields.js
CHANGED
|
@@ -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,cAA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O;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,GAAGH;IAE5C,IAAII;IAEJ,IAAIF,OAAOG,YAAY,EAAE;QACvBD,cAAc;YACZE,MAAM;YACNC,MAAM;YACNC,OAAO;gBACLC,YAAY;oBACVC,OAAO;gBACT;gBACAC,OAAO;YACT;YACAC,cAAc;YACd,sEAAsE;YACtEC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;YACpBd,SAAS;gBACP;oBACEa,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;oBACpBC,OAAO;gBACT;mBACGb,OAAOG,YAAY,CAACW,OAAO,CAACC,GAAG,CAAC,CAACC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C,CAAC,EAAE,GAAKA,EAAE;QACtB;QACA;YACER,MAAM;YACNC,MAAM;YACNC,OAAO;gBACLC,YAAY;oBACVC,OAAO;gBACT;YACF;QACF;KACD;AACH,EAAC"}
|
package/dist/exports/rsc.d.ts
CHANGED
|
@@ -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,MAAM,oCAAoC,CAAA;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AAClF,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,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAA;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAA"}
|
|
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,MAAM,oCAAoC,CAAA;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AAClF,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,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAA;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAA"}
|
package/dist/exports/rsc.js
CHANGED
|
@@ -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';
|
package/dist/exports/rsc.js.map
CHANGED
|
@@ -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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/plugin-import-export",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.80.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/translations": "3.
|
|
68
|
-
"@payloadcms/ui": "3.
|
|
67
|
+
"@payloadcms/translations": "3.80.0-canary.0",
|
|
68
|
+
"@payloadcms/ui": "3.80.0-canary.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@payloadcms/eslint-config": "3.28.0",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
72
|
+
"payload": "3.80.0-canary.0",
|
|
73
|
+
"@payloadcms/ui": "3.80.0-canary.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@payloadcms/ui": "3.
|
|
77
|
-
"payload": "3.
|
|
76
|
+
"@payloadcms/ui": "3.80.0-canary.0",
|
|
77
|
+
"payload": "3.80.0-canary.0"
|
|
78
78
|
},
|
|
79
79
|
"homepage:": "https://payloadcms.com",
|
|
80
80
|
"scripts": {
|