@payloadcms/plugin-import-export 3.52.0 → 3.53.0-canary.1
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/SortBy/index.d.ts.map +1 -1
- package/dist/components/SortBy/index.js +63 -19
- package/dist/components/SortBy/index.js.map +1 -1
- package/dist/components/SortOrder/index.d.ts +4 -0
- package/dist/components/SortOrder/index.d.ts.map +1 -0
- package/dist/components/SortOrder/index.js +123 -0
- package/dist/components/SortOrder/index.js.map +1 -0
- package/dist/components/SortOrder/index.scss +3 -0
- package/dist/export/getFields.d.ts.map +1 -1
- package/dist/export/getFields.js +23 -0
- package/dist/export/getFields.js.map +1 -1
- package/dist/exports/rsc.d.ts +1 -0
- package/dist/exports/rsc.d.ts.map +1 -1
- package/dist/exports/rsc.js +1 -0
- package/dist/exports/rsc.js.map +1 -1
- package/dist/translations/languages/ar.d.ts.map +1 -1
- package/dist/translations/languages/ar.js +1 -0
- package/dist/translations/languages/ar.js.map +1 -1
- package/dist/translations/languages/az.d.ts.map +1 -1
- package/dist/translations/languages/az.js +1 -0
- package/dist/translations/languages/az.js.map +1 -1
- package/dist/translations/languages/bg.d.ts.map +1 -1
- package/dist/translations/languages/bg.js +1 -0
- package/dist/translations/languages/bg.js.map +1 -1
- package/dist/translations/languages/ca.d.ts.map +1 -1
- package/dist/translations/languages/ca.js +1 -0
- package/dist/translations/languages/ca.js.map +1 -1
- package/dist/translations/languages/cs.d.ts.map +1 -1
- package/dist/translations/languages/cs.js +1 -0
- package/dist/translations/languages/cs.js.map +1 -1
- package/dist/translations/languages/da.d.ts.map +1 -1
- package/dist/translations/languages/da.js +1 -0
- package/dist/translations/languages/da.js.map +1 -1
- package/dist/translations/languages/de.d.ts.map +1 -1
- package/dist/translations/languages/de.js +1 -0
- package/dist/translations/languages/de.js.map +1 -1
- package/dist/translations/languages/en.d.ts +1 -0
- package/dist/translations/languages/en.d.ts.map +1 -1
- package/dist/translations/languages/en.js +1 -0
- package/dist/translations/languages/en.js.map +1 -1
- package/dist/translations/languages/es.d.ts.map +1 -1
- package/dist/translations/languages/es.js +1 -0
- package/dist/translations/languages/es.js.map +1 -1
- package/dist/translations/languages/et.d.ts.map +1 -1
- package/dist/translations/languages/et.js +1 -0
- package/dist/translations/languages/et.js.map +1 -1
- package/dist/translations/languages/fa.d.ts.map +1 -1
- package/dist/translations/languages/fa.js +1 -0
- package/dist/translations/languages/fa.js.map +1 -1
- package/dist/translations/languages/fr.d.ts.map +1 -1
- package/dist/translations/languages/fr.js +1 -0
- package/dist/translations/languages/fr.js.map +1 -1
- package/dist/translations/languages/he.d.ts.map +1 -1
- package/dist/translations/languages/he.js +1 -0
- package/dist/translations/languages/he.js.map +1 -1
- package/dist/translations/languages/hr.d.ts.map +1 -1
- package/dist/translations/languages/hr.js +1 -0
- package/dist/translations/languages/hr.js.map +1 -1
- package/dist/translations/languages/hu.d.ts.map +1 -1
- package/dist/translations/languages/hu.js +1 -0
- package/dist/translations/languages/hu.js.map +1 -1
- package/dist/translations/languages/hy.d.ts.map +1 -1
- package/dist/translations/languages/hy.js +1 -0
- package/dist/translations/languages/hy.js.map +1 -1
- package/dist/translations/languages/it.d.ts.map +1 -1
- package/dist/translations/languages/it.js +1 -0
- package/dist/translations/languages/it.js.map +1 -1
- package/dist/translations/languages/ja.d.ts.map +1 -1
- package/dist/translations/languages/ja.js +1 -0
- package/dist/translations/languages/ja.js.map +1 -1
- package/dist/translations/languages/ko.d.ts.map +1 -1
- package/dist/translations/languages/ko.js +1 -0
- package/dist/translations/languages/ko.js.map +1 -1
- package/dist/translations/languages/lt.d.ts.map +1 -1
- package/dist/translations/languages/lt.js +1 -0
- package/dist/translations/languages/lt.js.map +1 -1
- package/dist/translations/languages/lv.d.ts.map +1 -1
- package/dist/translations/languages/lv.js +1 -0
- package/dist/translations/languages/lv.js.map +1 -1
- package/dist/translations/languages/my.d.ts.map +1 -1
- package/dist/translations/languages/my.js +1 -0
- package/dist/translations/languages/my.js.map +1 -1
- package/dist/translations/languages/nb.d.ts.map +1 -1
- package/dist/translations/languages/nb.js +1 -0
- package/dist/translations/languages/nb.js.map +1 -1
- package/dist/translations/languages/nl.d.ts.map +1 -1
- package/dist/translations/languages/nl.js +1 -0
- package/dist/translations/languages/nl.js.map +1 -1
- package/dist/translations/languages/pl.d.ts.map +1 -1
- package/dist/translations/languages/pl.js +1 -0
- package/dist/translations/languages/pl.js.map +1 -1
- package/dist/translations/languages/pt.d.ts.map +1 -1
- package/dist/translations/languages/pt.js +1 -0
- package/dist/translations/languages/pt.js.map +1 -1
- package/dist/translations/languages/ro.d.ts.map +1 -1
- package/dist/translations/languages/ro.js +1 -0
- package/dist/translations/languages/ro.js.map +1 -1
- package/dist/translations/languages/rs.d.ts.map +1 -1
- package/dist/translations/languages/rs.js +1 -0
- package/dist/translations/languages/rs.js.map +1 -1
- package/dist/translations/languages/rsLatin.d.ts.map +1 -1
- package/dist/translations/languages/rsLatin.js +1 -0
- package/dist/translations/languages/rsLatin.js.map +1 -1
- package/dist/translations/languages/ru.d.ts.map +1 -1
- package/dist/translations/languages/ru.js +1 -0
- package/dist/translations/languages/ru.js.map +1 -1
- package/dist/translations/languages/sk.d.ts.map +1 -1
- package/dist/translations/languages/sk.js +1 -0
- package/dist/translations/languages/sk.js.map +1 -1
- package/dist/translations/languages/sl.d.ts.map +1 -1
- package/dist/translations/languages/sl.js +1 -0
- package/dist/translations/languages/sl.js.map +1 -1
- package/dist/translations/languages/sv.d.ts.map +1 -1
- package/dist/translations/languages/sv.js +1 -0
- package/dist/translations/languages/sv.js.map +1 -1
- package/dist/translations/languages/th.d.ts.map +1 -1
- package/dist/translations/languages/th.js +1 -0
- package/dist/translations/languages/th.js.map +1 -1
- package/dist/translations/languages/tr.d.ts.map +1 -1
- package/dist/translations/languages/tr.js +1 -0
- package/dist/translations/languages/tr.js.map +1 -1
- package/dist/translations/languages/translation-schema.json +4 -0
- package/dist/translations/languages/uk.d.ts.map +1 -1
- package/dist/translations/languages/uk.js +1 -0
- package/dist/translations/languages/uk.js.map +1 -1
- package/dist/translations/languages/vi.d.ts.map +1 -1
- package/dist/translations/languages/vi.js +1 -0
- package/dist/translations/languages/vi.js.map +1 -1
- package/dist/translations/languages/zh.d.ts.map +1 -1
- package/dist/translations/languages/zh.js +1 -0
- package/dist/translations/languages/zh.js.map +1 -1
- package/dist/translations/languages/zhTw.d.ts.map +1 -1
- package/dist/translations/languages/zhTw.js +1 -0
- package/dist/translations/languages/zhTw.js.map +1 -1
- package/dist/translations/types.d.ts +1 -0
- package/dist/translations/types.d.ts.map +1 -1
- package/dist/translations/types.js.map +1 -1
- package/dist/utilities/sortHelpers.d.ts +6 -0
- package/dist/utilities/sortHelpers.d.ts.map +1 -0
- package/dist/utilities/sortHelpers.js +14 -0
- package/dist/utilities/sortHelpers.js.map +1 -0
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SortBy/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SortBy/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAgBzD,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,MAAM,EAAE,0BAqHpB,CAAA"}
|
|
@@ -1,65 +1,109 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { FieldLabel, ReactSelect, useConfig, useDocumentInfo, useField, useListQuery } from '@payloadcms/ui';
|
|
4
|
-
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
5
|
+
import { applySortOrder, normalizeQueryParam, stripSortDash } from '../../utilities/sortHelpers.js';
|
|
5
6
|
import { reduceFields } from '../FieldsToExport/reduceFields.js';
|
|
6
7
|
import { useImportExport } from '../ImportExportProvider/index.js';
|
|
7
8
|
import './index.scss';
|
|
8
9
|
const baseClass = 'sort-by-fields';
|
|
9
10
|
export const SortBy = (props)=>{
|
|
10
11
|
const { id } = useDocumentInfo();
|
|
11
|
-
|
|
12
|
+
// The "sort" text field that stores 'title' or '-title'
|
|
13
|
+
const { setValue: setSort, value: sortRaw } = useField();
|
|
14
|
+
// Sibling order field ('asc' | 'desc') used when writing sort on change
|
|
15
|
+
const { value: sortOrder = 'asc' } = useField({
|
|
16
|
+
path: 'sortOrder'
|
|
17
|
+
});
|
|
18
|
+
// Needed so we can initialize sortOrder when SortOrder component is hidden
|
|
19
|
+
const { setValue: setSortOrder } = useField({
|
|
20
|
+
path: 'sortOrder'
|
|
21
|
+
});
|
|
12
22
|
const { value: collectionSlug } = useField({
|
|
13
23
|
path: 'collectionSlug'
|
|
14
24
|
});
|
|
15
25
|
const { query } = useListQuery();
|
|
16
26
|
const { getEntityConfig } = useConfig();
|
|
17
27
|
const { collection } = useImportExport();
|
|
28
|
+
// ReactSelect's displayed option
|
|
18
29
|
const [displayedValue, setDisplayedValue] = useState(null);
|
|
19
30
|
const collectionConfig = getEntityConfig({
|
|
20
31
|
collectionSlug: collectionSlug ?? collection
|
|
21
32
|
});
|
|
22
|
-
const fieldOptions = reduceFields({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
const fieldOptions = useMemo(()=>reduceFields({
|
|
34
|
+
fields: collectionConfig?.fields
|
|
35
|
+
}), [
|
|
36
|
+
collectionConfig?.fields
|
|
37
|
+
]);
|
|
38
|
+
// Normalize the stored value for display (strip the '-') and pick the option
|
|
26
39
|
useEffect(()=>{
|
|
27
|
-
|
|
40
|
+
const clean = stripSortDash(sortRaw);
|
|
41
|
+
if (!clean) {
|
|
28
42
|
setDisplayedValue(null);
|
|
29
43
|
return;
|
|
30
44
|
}
|
|
31
|
-
const option = fieldOptions.find((
|
|
32
|
-
if (option && (!displayedValue || displayedValue.value !==
|
|
45
|
+
const option = fieldOptions.find((f)=>f.value === clean);
|
|
46
|
+
if (option && (!displayedValue || displayedValue.value !== clean)) {
|
|
33
47
|
setDisplayedValue(option);
|
|
34
48
|
}
|
|
35
49
|
}, [
|
|
36
|
-
|
|
50
|
+
sortRaw,
|
|
37
51
|
fieldOptions,
|
|
38
|
-
|
|
52
|
+
displayedValue
|
|
39
53
|
]);
|
|
54
|
+
// One-time init guard so clearing `sort` doesn't rehydrate from query again
|
|
55
|
+
const didInitRef = useRef(false);
|
|
56
|
+
// Sync the visible select from list-view query sort (preferred) or groupBy (fallback)
|
|
57
|
+
// and initialize both `sort` and `sortOrder` here as SortOrder may be hidden by admin.condition.
|
|
40
58
|
useEffect(()=>{
|
|
41
|
-
if (
|
|
59
|
+
if (didInitRef.current) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (id) {
|
|
63
|
+
didInitRef.current = true;
|
|
42
64
|
return;
|
|
43
65
|
}
|
|
44
|
-
|
|
66
|
+
if (typeof sortRaw === 'string' && sortRaw.length > 0) {
|
|
67
|
+
// Already initialized elsewhere
|
|
68
|
+
didInitRef.current = true;
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const qsSort = normalizeQueryParam(query?.sort);
|
|
72
|
+
const qsGroupBy = normalizeQueryParam(query?.groupBy);
|
|
73
|
+
const source = qsSort ?? qsGroupBy;
|
|
74
|
+
if (!source) {
|
|
75
|
+
didInitRef.current = true;
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const isDesc = !!qsSort && qsSort.startsWith('-');
|
|
79
|
+
const base = stripSortDash(source);
|
|
80
|
+
const order = isDesc ? 'desc' : 'asc';
|
|
81
|
+
// Write BOTH fields so preview/export have the right values even if SortOrder is hidden
|
|
82
|
+
setSort(applySortOrder(base, order));
|
|
83
|
+
setSortOrder(order);
|
|
84
|
+
const option = fieldOptions.find((f)=>f.value === base);
|
|
45
85
|
if (option) {
|
|
46
|
-
setValue(option.value);
|
|
47
86
|
setDisplayedValue(option);
|
|
48
87
|
}
|
|
88
|
+
didInitRef.current = true;
|
|
49
89
|
}, [
|
|
50
|
-
fieldOptions,
|
|
51
90
|
id,
|
|
91
|
+
query?.groupBy,
|
|
52
92
|
query?.sort,
|
|
53
|
-
|
|
54
|
-
|
|
93
|
+
sortRaw,
|
|
94
|
+
fieldOptions,
|
|
95
|
+
setSort,
|
|
96
|
+
setSortOrder
|
|
55
97
|
]);
|
|
98
|
+
// When user selects a different field, store it with the current order applied
|
|
56
99
|
const onChange = (option)=>{
|
|
57
100
|
if (!option) {
|
|
58
|
-
|
|
101
|
+
setSort('');
|
|
59
102
|
setDisplayedValue(null);
|
|
60
103
|
} else {
|
|
61
|
-
setValue(option.value);
|
|
62
104
|
setDisplayedValue(option);
|
|
105
|
+
const next = applySortOrder(option.value, String(sortOrder));
|
|
106
|
+
setSort(next);
|
|
63
107
|
}
|
|
64
108
|
};
|
|
65
109
|
return /*#__PURE__*/ _jsxs("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SortBy/index.tsx"],"sourcesContent":["'use client'\n\nimport type { SelectFieldClientComponent } from 'payload'\nimport type { ReactNode } from 'react'\n\nimport {\n FieldLabel,\n ReactSelect,\n useConfig,\n useDocumentInfo,\n useField,\n useListQuery,\n} from '@payloadcms/ui'\nimport React, { useEffect, useState } from 'react'\n\nimport { reduceFields } from '../FieldsToExport/reduceFields.js'\nimport { useImportExport } from '../ImportExportProvider/index.js'\nimport './index.scss'\n\nconst baseClass = 'sort-by-fields'\n\nexport const SortBy: SelectFieldClientComponent = (props) => {\n const { id } = useDocumentInfo()\n const { setValue, value } = useField<string>()\n const { value: collectionSlug } = useField<string>({ path: 'collectionSlug' })\n const { query } = useListQuery()\n const { getEntityConfig } = useConfig()\n const { collection } = useImportExport()\n\n const [displayedValue, setDisplayedValue] = useState<{\n id: string\n label: ReactNode\n value: string\n } | null>(null)\n\n const collectionConfig = getEntityConfig({ collectionSlug: collectionSlug ?? collection })\n const fieldOptions = reduceFields({ fields: collectionConfig?.fields })\n\n //
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SortBy/index.tsx"],"sourcesContent":["'use client'\n\nimport type { SelectFieldClientComponent } from 'payload'\nimport type { ReactNode } from 'react'\n\nimport {\n FieldLabel,\n ReactSelect,\n useConfig,\n useDocumentInfo,\n useField,\n useListQuery,\n} from '@payloadcms/ui'\nimport React, { useEffect, useMemo, useRef, useState } from 'react'\n\nimport { applySortOrder, normalizeQueryParam, stripSortDash } from '../../utilities/sortHelpers.js'\nimport { reduceFields } from '../FieldsToExport/reduceFields.js'\nimport { useImportExport } from '../ImportExportProvider/index.js'\nimport './index.scss'\n\nconst baseClass = 'sort-by-fields'\n\nexport const SortBy: SelectFieldClientComponent = (props) => {\n const { id } = useDocumentInfo()\n\n // The \"sort\" text field that stores 'title' or '-title'\n const { setValue: setSort, value: sortRaw } = useField<string>()\n\n // Sibling order field ('asc' | 'desc') used when writing sort on change\n const { value: sortOrder = 'asc' } = useField<string>({ path: 'sortOrder' })\n // Needed so we can initialize sortOrder when SortOrder component is hidden\n const { setValue: setSortOrder } = useField<'asc' | 'desc'>({ path: 'sortOrder' })\n\n const { value: collectionSlug } = useField<string>({ path: 'collectionSlug' })\n const { query } = useListQuery()\n const { getEntityConfig } = useConfig()\n const { collection } = useImportExport()\n\n // ReactSelect's displayed option\n const [displayedValue, setDisplayedValue] = useState<{\n id: string\n label: ReactNode\n value: string\n } | null>(null)\n\n const collectionConfig = getEntityConfig({ collectionSlug: collectionSlug ?? collection })\n const fieldOptions = useMemo(\n () => reduceFields({ fields: collectionConfig?.fields }),\n [collectionConfig?.fields],\n )\n\n // Normalize the stored value for display (strip the '-') and pick the option\n useEffect(() => {\n const clean = stripSortDash(sortRaw)\n if (!clean) {\n setDisplayedValue(null)\n return\n }\n\n const option = fieldOptions.find((f) => f.value === clean)\n if (option && (!displayedValue || displayedValue.value !== clean)) {\n setDisplayedValue(option)\n }\n }, [sortRaw, fieldOptions, displayedValue])\n\n // One-time init guard so clearing `sort` doesn't rehydrate from query again\n const didInitRef = useRef(false)\n\n // Sync the visible select from list-view query sort (preferred) or groupBy (fallback)\n // and initialize both `sort` and `sortOrder` here as SortOrder may be hidden by admin.condition.\n useEffect(() => {\n if (didInitRef.current) {\n return\n }\n if (id) {\n didInitRef.current = true\n return\n }\n if (typeof sortRaw === 'string' && sortRaw.length > 0) {\n // Already initialized elsewhere\n didInitRef.current = true\n return\n }\n\n const qsSort = normalizeQueryParam(query?.sort)\n const qsGroupBy = normalizeQueryParam(query?.groupBy)\n\n const source = qsSort ?? qsGroupBy\n if (!source) {\n didInitRef.current = true\n return\n }\n\n const isDesc = !!qsSort && qsSort.startsWith('-')\n const base = stripSortDash(source)\n const order: 'asc' | 'desc' = isDesc ? 'desc' : 'asc'\n\n // Write BOTH fields so preview/export have the right values even if SortOrder is hidden\n setSort(applySortOrder(base, order))\n setSortOrder(order)\n\n const option = fieldOptions.find((f) => f.value === base)\n if (option) {\n setDisplayedValue(option)\n }\n\n didInitRef.current = true\n }, [id, query?.groupBy, query?.sort, sortRaw, fieldOptions, setSort, setSortOrder])\n\n // When user selects a different field, store it with the current order applied\n const onChange = (option: { id: string; label: ReactNode; value: string } | null) => {\n if (!option) {\n setSort('')\n setDisplayedValue(null)\n } else {\n setDisplayedValue(option)\n const next = applySortOrder(option.value, String(sortOrder) as 'asc' | 'desc')\n setSort(next)\n }\n }\n\n return (\n <div className={baseClass}>\n <FieldLabel label={props.field.label} path={props.path} />\n <ReactSelect\n className={baseClass}\n disabled={props.readOnly}\n getOptionValue={(option) => String(option.value)}\n inputId={`field-${props.path.replace(/\\./g, '__')}`}\n isClearable={true}\n isSortable={true}\n // @ts-expect-error react select option\n onChange={onChange}\n options={fieldOptions}\n // @ts-expect-error react select\n value={displayedValue}\n />\n </div>\n )\n}\n"],"names":["FieldLabel","ReactSelect","useConfig","useDocumentInfo","useField","useListQuery","React","useEffect","useMemo","useRef","useState","applySortOrder","normalizeQueryParam","stripSortDash","reduceFields","useImportExport","baseClass","SortBy","props","id","setValue","setSort","value","sortRaw","sortOrder","path","setSortOrder","collectionSlug","query","getEntityConfig","collection","displayedValue","setDisplayedValue","collectionConfig","fieldOptions","fields","clean","option","find","f","didInitRef","current","length","qsSort","sort","qsGroupBy","groupBy","source","isDesc","startsWith","base","order","onChange","next","String","div","className","label","field","disabled","readOnly","getOptionValue","inputId","replace","isClearable","isSortable","options"],"mappings":"AAAA;;AAKA,SACEA,UAAU,EACVC,WAAW,EACXC,SAAS,EACTC,eAAe,EACfC,QAAQ,EACRC,YAAY,QACP,iBAAgB;AACvB,OAAOC,SAASC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AAEnE,SAASC,cAAc,EAAEC,mBAAmB,EAAEC,aAAa,QAAQ,iCAAgC;AACnG,SAASC,YAAY,QAAQ,oCAAmC;AAChE,SAASC,eAAe,QAAQ,mCAAkC;AAClE,OAAO,eAAc;AAErB,MAAMC,YAAY;AAElB,OAAO,MAAMC,SAAqC,CAACC;IACjD,MAAM,EAAEC,EAAE,EAAE,GAAGhB;IAEf,wDAAwD;IACxD,MAAM,EAAEiB,UAAUC,OAAO,EAAEC,OAAOC,OAAO,EAAE,GAAGnB;IAE9C,wEAAwE;IACxE,MAAM,EAAEkB,OAAOE,YAAY,KAAK,EAAE,GAAGpB,SAAiB;QAAEqB,MAAM;IAAY;IAC1E,2EAA2E;IAC3E,MAAM,EAAEL,UAAUM,YAAY,EAAE,GAAGtB,SAAyB;QAAEqB,MAAM;IAAY;IAEhF,MAAM,EAAEH,OAAOK,cAAc,EAAE,GAAGvB,SAAiB;QAAEqB,MAAM;IAAiB;IAC5E,MAAM,EAAEG,KAAK,EAAE,GAAGvB;IAClB,MAAM,EAAEwB,eAAe,EAAE,GAAG3B;IAC5B,MAAM,EAAE4B,UAAU,EAAE,G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H,aAAaI,IAAI,CAAC,CAACC,IAAMA,EAAEjB,KAAK,KAAK4B;QACpD,IAAIb,QAAQ;YACVL,kBAAkBK;QACpB;QAEAG,WAAWC,OAAO,GAAG;IACvB,GAAG;QAACtB;QAAIS,OAAOkB;QAASlB,OAAOgB;QAAMrB;QAASW;QAAcb;QAASK;KAAa;IAElF,+EAA+E;IAC/E,MAAM0B,WAAW,CAACf;QAChB,IAAI,CAACA,QAAQ;YACXhB,QAAQ;YACRW,kBAAkB;QACpB,OAAO;YACLA,kBAAkBK;YAClB,MAAMgB,OAAO1C,eAAe0B,OAAOf,KAAK,EAAEgC,OAAO9B;YACjDH,QAAQgC;QACV;IACF;IAEA,qBACE,MAACE;QAAIC,WAAWxC;;0BACd,KAAChB;gBAAWyD,OAAOvC,MAAMwC,KAAK,CAACD,KAAK;gBAAEhC,MAAMP,MAAMO,IAAI;;0BACtD,KAACxB;gBACCuD,WAAWxC;gBACX2C,UAAUzC,MAAM0C,QAAQ;gBACxBC,gBAAgB,CAACxB,SAAWiB,OAAOjB,OAAOf,KAAK;gBAC/CwC,SAAS,CAAC,MAAM,EAAE5C,MAAMO,IAAI,CAACsC,OAAO,CAAC,OAAO,OAAO;gBACnDC,aAAa;gBACbC,YAAY;gBACZ,uCAAuC;gBACvCb,UAAUA;gBACVc,SAAShC;gBACT,gCAAgC;gBAChCZ,OAAOS;;;;AAIf,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SortOrder/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAMzD,OAAO,cAAc,CAAA;AAcrB,eAAO,MAAM,SAAS,EAAE,0BAuGvB,CAAA"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { FieldLabel, ReactSelect, useDocumentInfo, useField, useListQuery } from '@payloadcms/ui';
|
|
4
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
5
|
+
import { applySortOrder, normalizeQueryParam, stripSortDash } from '../../utilities/sortHelpers.js';
|
|
6
|
+
import './index.scss';
|
|
7
|
+
const baseClass = 'sort-order-field';
|
|
8
|
+
const options = [
|
|
9
|
+
{
|
|
10
|
+
label: 'Ascending',
|
|
11
|
+
value: 'asc'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
label: 'Descending',
|
|
15
|
+
value: 'desc'
|
|
16
|
+
}
|
|
17
|
+
];
|
|
18
|
+
const defaultOption = options[0];
|
|
19
|
+
export const SortOrder = (props)=>{
|
|
20
|
+
const { id } = useDocumentInfo();
|
|
21
|
+
const { query } = useListQuery();
|
|
22
|
+
// 'sortOrder' select field: 'asc' | 'desc'
|
|
23
|
+
const { setValue: setOrder, value: orderValueRaw } = useField();
|
|
24
|
+
// 'sort' text field: 'title' | '-title'
|
|
25
|
+
const { setValue: setSort, value: sortRaw } = useField({
|
|
26
|
+
path: 'sort'
|
|
27
|
+
});
|
|
28
|
+
// The current order value, defaulting to 'asc' for UI
|
|
29
|
+
const orderValue = orderValueRaw || 'asc';
|
|
30
|
+
// Map 'asc' | 'desc' to the option object for ReactSelect
|
|
31
|
+
const currentOption = useMemo(()=>options.find((o)=>o.value === orderValue) ?? defaultOption, [
|
|
32
|
+
orderValue
|
|
33
|
+
]);
|
|
34
|
+
const [displayed, setDisplayed] = useState(currentOption);
|
|
35
|
+
// One-time init guard so clearing `sort` doesn't rehydrate from query again
|
|
36
|
+
const didInitRef = useRef(false);
|
|
37
|
+
// Derive from list-view query.sort if present; otherwise fall back to groupBy
|
|
38
|
+
useEffect(()=>{
|
|
39
|
+
if (didInitRef.current) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
// Existing export -> don't initialize here
|
|
43
|
+
if (id) {
|
|
44
|
+
didInitRef.current = true;
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
// If sort already has a value, treat as initialized
|
|
48
|
+
if (typeof sortRaw === 'string' && sortRaw.length > 0) {
|
|
49
|
+
didInitRef.current = true;
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const qsSort = normalizeQueryParam(query?.sort);
|
|
53
|
+
const qsGroupBy = normalizeQueryParam(query?.groupBy);
|
|
54
|
+
if (qsSort) {
|
|
55
|
+
const isDesc = qsSort.startsWith('-');
|
|
56
|
+
const base = stripSortDash(qsSort);
|
|
57
|
+
const order = isDesc ? 'desc' : 'asc';
|
|
58
|
+
setOrder(order);
|
|
59
|
+
setSort(applySortOrder(base, order)) // combined: 'title' or '-title'
|
|
60
|
+
;
|
|
61
|
+
didInitRef.current = true;
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// Fallback: groupBy (always ascending)
|
|
65
|
+
if (qsGroupBy) {
|
|
66
|
+
setOrder('asc');
|
|
67
|
+
setSort(applySortOrder(qsGroupBy, 'asc')) // write 'groupByField' (no dash)
|
|
68
|
+
;
|
|
69
|
+
didInitRef.current = true;
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
// Nothing to initialize
|
|
73
|
+
didInitRef.current = true;
|
|
74
|
+
}, [
|
|
75
|
+
id,
|
|
76
|
+
query?.sort,
|
|
77
|
+
query?.groupBy,
|
|
78
|
+
sortRaw,
|
|
79
|
+
setOrder,
|
|
80
|
+
setSort
|
|
81
|
+
]);
|
|
82
|
+
// Keep the select's displayed option in sync with the stored order
|
|
83
|
+
useEffect(()=>{
|
|
84
|
+
setDisplayed(currentOption ?? defaultOption);
|
|
85
|
+
}, [
|
|
86
|
+
currentOption
|
|
87
|
+
]);
|
|
88
|
+
// Handle manual order changes via ReactSelect:
|
|
89
|
+
// - update the order field
|
|
90
|
+
// - rewrite the combined "sort" string to add/remove the leading '-'
|
|
91
|
+
const onChange = (option)=>{
|
|
92
|
+
const next = option?.value ?? 'asc';
|
|
93
|
+
setOrder(next);
|
|
94
|
+
const base = stripSortDash(sortRaw);
|
|
95
|
+
if (base) {
|
|
96
|
+
setSort(applySortOrder(base, next));
|
|
97
|
+
}
|
|
98
|
+
setDisplayed(option ?? defaultOption);
|
|
99
|
+
};
|
|
100
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
101
|
+
className: baseClass,
|
|
102
|
+
children: [
|
|
103
|
+
/*#__PURE__*/ _jsx(FieldLabel, {
|
|
104
|
+
label: props.field.label,
|
|
105
|
+
path: props.path
|
|
106
|
+
}),
|
|
107
|
+
/*#__PURE__*/ _jsx(ReactSelect, {
|
|
108
|
+
className: baseClass,
|
|
109
|
+
disabled: props.readOnly,
|
|
110
|
+
inputId: `field-${props.path.replace(/\./g, '__')}`,
|
|
111
|
+
isClearable: false,
|
|
112
|
+
isSearchable: false,
|
|
113
|
+
// @ts-expect-error react-select option typing differs from our local type
|
|
114
|
+
onChange: onChange,
|
|
115
|
+
options: options,
|
|
116
|
+
// @ts-expect-error react-select option typing differs from our local type
|
|
117
|
+
value: displayed
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SortOrder/index.tsx"],"sourcesContent":["'use client'\n\nimport type { SelectFieldClientComponent } from 'payload'\n\nimport { FieldLabel, ReactSelect, useDocumentInfo, useField, useListQuery } from '@payloadcms/ui'\nimport React, { useEffect, useMemo, useRef, useState } from 'react'\n\nimport { applySortOrder, normalizeQueryParam, stripSortDash } from '../../utilities/sortHelpers.js'\nimport './index.scss'\n\nconst baseClass = 'sort-order-field'\n\ntype Order = 'asc' | 'desc'\ntype OrderOption = { label: string; value: Order }\n\nconst options = [\n { label: 'Ascending', value: 'asc' as const },\n { label: 'Descending', value: 'desc' as const },\n] as const\n\nconst defaultOption: OrderOption = options[0]\n\nexport const SortOrder: SelectFieldClientComponent = (props) => {\n const { id } = useDocumentInfo()\n const { query } = useListQuery()\n\n // 'sortOrder' select field: 'asc' | 'desc'\n const { setValue: setOrder, value: orderValueRaw } = useField<Order>()\n\n // 'sort' text field: 'title' | '-title'\n const { setValue: setSort, value: sortRaw } = useField<string>({ path: 'sort' })\n\n // The current order value, defaulting to 'asc' for UI\n const orderValue: Order = orderValueRaw || 'asc'\n\n // Map 'asc' | 'desc' to the option object for ReactSelect\n const currentOption = useMemo<OrderOption>(\n () => options.find((o) => o.value === orderValue) ?? defaultOption,\n [orderValue],\n )\n const [displayed, setDisplayed] = useState<null | OrderOption>(currentOption)\n\n // One-time init guard so clearing `sort` doesn't rehydrate from query again\n const didInitRef = useRef(false)\n\n // Derive from list-view query.sort if present; otherwise fall back to groupBy\n useEffect(() => {\n if (didInitRef.current) {\n return\n }\n\n // Existing export -> don't initialize here\n if (id) {\n didInitRef.current = true\n return\n }\n\n // If sort already has a value, treat as initialized\n if (typeof sortRaw === 'string' && sortRaw.length > 0) {\n didInitRef.current = true\n return\n }\n\n const qsSort = normalizeQueryParam(query?.sort)\n const qsGroupBy = normalizeQueryParam(query?.groupBy)\n\n if (qsSort) {\n const isDesc = qsSort.startsWith('-')\n const base = stripSortDash(qsSort)\n const order: Order = isDesc ? 'desc' : 'asc'\n setOrder(order)\n setSort(applySortOrder(base, order)) // combined: 'title' or '-title'\n didInitRef.current = true\n return\n }\n\n // Fallback: groupBy (always ascending)\n if (qsGroupBy) {\n setOrder('asc')\n setSort(applySortOrder(qsGroupBy, 'asc')) // write 'groupByField' (no dash)\n didInitRef.current = true\n return\n }\n\n // Nothing to initialize\n didInitRef.current = true\n }, [id, query?.sort, query?.groupBy, sortRaw, setOrder, setSort])\n\n // Keep the select's displayed option in sync with the stored order\n useEffect(() => {\n setDisplayed(currentOption ?? defaultOption)\n }, [currentOption])\n\n // Handle manual order changes via ReactSelect:\n // - update the order field\n // - rewrite the combined \"sort\" string to add/remove the leading '-'\n const onChange = (option: null | OrderOption) => {\n const next = option?.value ?? 'asc'\n setOrder(next)\n\n const base = stripSortDash(sortRaw)\n if (base) {\n setSort(applySortOrder(base, next))\n }\n\n setDisplayed(option ?? defaultOption)\n }\n\n return (\n <div className={baseClass}>\n <FieldLabel label={props.field.label} path={props.path} />\n <ReactSelect\n className={baseClass}\n disabled={props.readOnly}\n inputId={`field-${props.path.replace(/\\./g, '__')}`}\n isClearable={false}\n isSearchable={false}\n // @ts-expect-error react-select option typing differs from our local type\n onChange={onChange}\n options={options as unknown as OrderOption[]}\n // @ts-expect-error react-select option typing differs from our local type\n value={displayed}\n />\n </div>\n )\n}\n"],"names":["FieldLabel","ReactSelect","useDocumentInfo","useField","useListQuery","React","useEffect","useMemo","useRef","useState","applySortOrder","normalizeQueryParam","stripSortDash","baseClass","options","label","value","defaultOption","SortOrder","props","id","query","setValue","setOrder","orderValueRaw","setSort","sortRaw","path","orderValue","currentOption","find","o","displayed","setDisplayed","didInitRef","current","length","qsSort","sort","qsGroupBy","groupBy","isDesc","startsWith","base","order","onChange","option","next","div","className","field","disabled","readOnly","inputId","replace","isClearable","isSearchable"],"mappings":"AAAA;;AAIA,SAASA,UAAU,EAAEC,WAAW,EAAEC,eAAe,EAAEC,QAAQ,EAAEC,YAAY,QAAQ,iBAAgB;AACjG,OAAOC,SAASC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AAEnE,SAASC,cAAc,EAAEC,mBAAmB,EAAEC,aAAa,QAAQ,iCAAgC;AACnG,OAAO,eAAc;AAErB,MAAMC,YAAY;AAKlB,MAAMC,UAAU;IACd;QAAEC,OAAO;QAAaC,OAAO;IAAe;IAC5C;QAAED,OAAO;QAAcC,OAAO;IAAgB;CAC/C;AAED,MAAMC,gBAA6BH,OAAO,CAAC,EAAE;AAE7C,OAAO,MAAMI,YAAwC,CAACC;IACpD,MAAM,EAAEC,EAAE,EAAE,GAAGlB;IACf,MAAM,EAAEmB,KAAK,EAAE,GAAGjB;IAElB,2CAA2C;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QAASd;QAASH;QAAUE;KAAQ;IAEhE,mEAAmE;IACnEnB,UAAU;QACR2B,aAAaJ,iBAAiBZ;IAChC,GAAG;QAACY;KAAc;IAElB,+CAA+C;IAC/C,4BAA4B;IAC5B,sEAAsE;IACtE,MAAMgB,WAAW,CAACC;QAChB,MAAMC,OAAOD,QAAQ9B,SAAS;QAC9BO,SAASwB;QAET,MAAMJ,OAAO/B,cAAcc;QAC3B,IAAIiB,MAAM;YACRlB,QAAQf,eAAeiC,MAAMI;QAC/B;QAEAd,aAAaa,UAAU7B;IACzB;IAEA,qBACE,MAAC+B;QAAIC,WAAWpC;;0BACd,KAACb;gBAAWe,OAAOI,MAAM+B,KAAK,CAACnC,KAAK;gBAAEY,MAAMR,MAAMQ,IAAI;;0BACtD,KAAC1B;gBACCgD,WAAWpC;gBACXsC,UAAUhC,MAAMiC,QAAQ;gBACxBC,SAAS,CAAC,MAAM,EAAElC,MAAMQ,IAAI,CAAC2B,OAAO,CAAC,OAAO,OAAO;gBACnDC,aAAa;gBACbC,cAAc;gBACd,0EAA0E;gBAC1EX,UAAUA;gBACV/B,SAASA;gBACT,0EAA0E;gBAC1EE,OAAOgB;;;;AAIf,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,EAAe,MAAM,SAAS,CAAA;AAEzD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAK3D,eAAO,MAAM,SAAS,WAAY,MAAM,iBAAiB,wBAAwB,KAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"getFields.d.ts","sourceRoot":"","sources":["../../src/export/getFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAe,MAAM,SAAS,CAAA;AAEzD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAK3D,eAAO,MAAM,SAAS,WAAY,MAAM,iBAAiB,wBAAwB,KAAG,KAAK,EA2PxF,CAAA"}
|
package/dist/export/getFields.js
CHANGED
|
@@ -111,6 +111,29 @@ export const getFields = (config, pluginConfig)=>{
|
|
|
111
111
|
// @ts-expect-error - this is not correctly typed in plugins right now
|
|
112
112
|
label: ({ t })=>t('plugin-import-export:field-sort-label')
|
|
113
113
|
},
|
|
114
|
+
{
|
|
115
|
+
name: 'sortOrder',
|
|
116
|
+
type: 'select',
|
|
117
|
+
admin: {
|
|
118
|
+
components: {
|
|
119
|
+
Field: '@payloadcms/plugin-import-export/rsc#SortOrder'
|
|
120
|
+
},
|
|
121
|
+
// Only show when `sort` has a value
|
|
122
|
+
condition: ({ sort })=>typeof sort === 'string' && sort.trim().length > 0
|
|
123
|
+
},
|
|
124
|
+
// @ts-expect-error - this is not correctly typed in plugins right now
|
|
125
|
+
label: ({ t })=>t('plugin-import-export:field-sort-order-label'),
|
|
126
|
+
options: [
|
|
127
|
+
{
|
|
128
|
+
label: 'Ascending',
|
|
129
|
+
value: 'asc'
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
label: 'Descending',
|
|
133
|
+
value: 'desc'
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
},
|
|
114
137
|
...localeField ? [
|
|
115
138
|
localeField
|
|
116
139
|
] : [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/export/getFields.ts"],"sourcesContent":["import type { TFunction } from '@payloadcms/translations'\nimport type { Config, Field, SelectField } from 'payload'\n\nimport type { ImportExportPluginConfig } from '../types.js'\n\nimport { validateLimitValue } from '../utilities/validateLimitValue.js'\nimport { getFilename } from './getFilename.js'\n\nexport const getFields = (config: Config, pluginConfig?: ImportExportPluginConfig): Field[] => {\n let localeField: SelectField | undefined\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 // Hide if a forced format is set via plugin config\n condition: () => !pluginConfig?.format,\n width: '33.3333%',\n },\n defaultValue: (() => {\n // Default to plugin-defined format, otherwise 'csv'\n return pluginConfig?.format ?? 'csv'\n })(),\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 ...(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 hidden: true,\n },\n required: true,\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#Preview',\n },\n },\n },\n ]\n}\n"],"names":["validateLimitValue","getFilename","getFields","config","pluginConfig","localeField","localization","name","type","admin","width","defaultValue","label","t","options","value","locales","map","locale","code","fields","condition","format","required","placeholder","step","validate","req","components","Field","limit","data","collectionConfig","collections","find","collection","slug","collectionSlug","Boolean","versions","drafts","virtual","hasMany","hidden","hooks","beforeValidate"],"mappings":"AAKA,SAASA,kBAAkB,QAAQ,qCAAoC;AACvE,SAASC,WAAW,QAAQ,mBAAkB;AAE9C,OAAO,MAAMC,YAAY,CAACC,QAAgBC;IACxC,IAAIC;IACJ,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;YACpBC,SAAS;gBACP;oBACEF,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;oBACpBE,OAAO;gBACT;mBACGZ,OAAOG,YAAY,CAACU,OAAO,CAACC,GAAG,CAAC,CAACC,SAAY,CAAA;wBAC9CN,OAAO,OAAOM,WAAW,WAAWA,SAASA,OAAON,KAAK;wBACzDG,OAAO,OAAOG,WAAW,WAAWA,SAASA,OAAOC,IAAI;oBAC1D,CAAA;aACD;QACH;IACF;IAEA,OAAO;QACL;YACEX,MAAM;YACNY,QAAQ;gBACN;oBACEb,MAAM;oBACNC,MAAM;oBACNG,cAAc,IAAMV;oBACpB,sEAAs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NC,MAAM;oBACNC,OAAO;wBACLmB,YAAY;4BACVC,OAAO;wBACT;wBACAc,QAAQ;oBACV;oBACApB,UAAU;gBACZ;gBACA;oBACEhB,MAAM;oBACNC,MAAM;oBACNC,OAAO;wBACLkC,QAAQ;oBACV;oBACAhC,cAAc,CAAC;oBACfiC,OAAO;wBACLC,gBAAgB;4BACd,CAAC,EAAE9B,KAAK,EAAE;gCACR,OAAOA,SAAS,CAAC;4BACnB;yBACD;oBACH;gBACF;aACD;YACD,sEAAsE;YACtEH,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;QACtB;QACA;YACEN,MAAM;YACNC,MAAM;YACNC,OAAO;gBACLmB,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, SelectField } from 'payload'\n\nimport type { ImportExportPluginConfig } from '../types.js'\n\nimport { validateLimitValue } from '../utilities/validateLimitValue.js'\nimport { getFilename } from './getFilename.js'\n\nexport const getFields = (config: Config, pluginConfig?: ImportExportPluginConfig): Field[] => {\n let localeField: SelectField | undefined\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 // Hide if a forced format is set via plugin config\n condition: () => !pluginConfig?.format,\n width: '33.3333%',\n },\n defaultValue: (() => {\n // Default to plugin-defined format, otherwise 'csv'\n return pluginConfig?.format ?? 'csv'\n })(),\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 hidden: true,\n },\n required: true,\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#Preview',\n },\n },\n },\n ]\n}\n"],"names":["validateLimitValue","getFilename","getFields","config","pluginConfig","localeField","localization","name","type","admin","width","defaultValue","label","t","options","value","locales","map","locale","code","fields","condition","format","required","placeholder","step","validate","req","components","Field","limit","sort","trim","length","data","collectionConfig","collections","find","collection","slug","collectionSlug","Boolean","versions","drafts","virtual","hasMany","hidden","hooks","beforeValidate"],"mappings":"AAKA,SAASA,kBAAkB,QAAQ,qCAAoC;AACvE,SAASC,WAAW,QAAQ,mBAAkB;AAE9C,OAAO,MAAMC,YAAY,CAACC,QAAgBC;IACxC,IAAIC;IACJ,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;YACpBC,SAAS;gBACP;oBACEF,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;oBACpBE,OAAO;gBACT;mBACGZ,OAAOG,YAAY,CAACU,OAAO,CAACC,GAAG,CAAC,CAACC,SAAY,CAAA;wBAC9CN,OAAO,OAAOM,WAAW,WAAWA,SAASA,OAAON,KAAK;wBACzDG,OAAO,OAAOG,WAAW,WAAWA,SAASA,OAAOC,IAAI;oBAC1D,CAAA;aACD;QACH;IACF;IAEA,OAAO;QACL;YACEX,MAAM;YACNY,QAAQ;gBACN;oBACEb,MAAM;oBACNC,MAAM;oBACNG,cAAc,IAAMV;oBACpB,sEAAsE;oBACtEW,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;gBACtB;gBACA;oBACEL,MAAM;oBACNY,QAAQ;wBACN;4BACEb,MAAM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C,EAAE,GAAKA,EAAE;4BACpBE,OAAO;wBACT;qBACD;oBACD6B,SAAS;gBACX;gBACA;oBACErC,MAAM;oBACNC,MAAM;oBACNC,OAAO;wBACLmB,YAAY;4BACVC,OAAO;wBACT;oBACF;oBACAgB,SAAS;oBACT,sEAAsE;oBACtEjC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;gBACtB;gBACA;oBACEN,MAAM;oBACNC,MAAM;oBACNC,OAAO;wBACLmB,YAAY;4BACVC,OAAO;wBACT;wBACAiB,QAAQ;oBACV;oBACAvB,UAAU;gBACZ;gBACA;oBACEhB,MAAM;oBACNC,MAAM;oBACNC,OAAO;wBACLqC,QAAQ;oBACV;oBACAnC,cAAc,CAAC;oBACfoC,OAAO;wBACLC,gBAAgB;4BACd,CAAC,EAAEjC,KAAK,EAAE;gCACR,OAAOA,SAAS,CAAC;4BACnB;yBACD;oBACH;gBACF;aACD;YACD,sEAAsE;YACtEH,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;QACtB;QACA;YACEN,MAAM;YACNC,MAAM;YACNC,OAAO;gBACLmB,YAAY;oBACVC,OAAO;gBACT;YACF;QACF;KACD;AACH,EAAC"}
|
package/dist/exports/rsc.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ export { Page } from '../components/Page/index.js';
|
|
|
7
7
|
export { Preview } from '../components/Preview/index.js';
|
|
8
8
|
export { SelectionToUseField } from '../components/SelectionToUseField/index.js';
|
|
9
9
|
export { SortBy } from '../components/SortBy/index.js';
|
|
10
|
+
export { SortOrder } from '../components/SortOrder/index.js';
|
|
10
11
|
//# sourceMappingURL=rsc.d.ts.map
|
|
@@ -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,gBAAgB,EAAE,MAAM,yCAAyC,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAA;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,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,gBAAgB,EAAE,MAAM,yCAAyC,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AACxD,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
|
@@ -7,5 +7,6 @@ export { Page } from '../components/Page/index.js';
|
|
|
7
7
|
export { Preview } from '../components/Preview/index.js';
|
|
8
8
|
export { SelectionToUseField } from '../components/SelectionToUseField/index.js';
|
|
9
9
|
export { SortBy } from '../components/SortBy/index.js';
|
|
10
|
+
export { SortOrder } from '../components/SortOrder/index.js';
|
|
10
11
|
|
|
11
12
|
//# sourceMappingURL=rsc.js.map
|
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 { ExportSaveButton } from '../components/ExportSaveButton/index.js'\nexport { FieldsToExport } from '../components/FieldsToExport/index.js'\nexport { ImportExportProvider } from '../components/ImportExportProvider/index.js'\nexport { Page } from '../components/Page/index.js'\nexport { Preview } from '../components/Preview/index.js'\nexport { SelectionToUseField } from '../components/SelectionToUseField/index.js'\nexport { SortBy } from '../components/SortBy/index.js'\n"],"names":["CollectionField","ExportListMenuItem","ExportSaveButton","FieldsToExport","ImportExportProvider","Page","Preview","SelectionToUseField","SortBy"],"mappings":"AAAA,SAASA,eAAe,QAAQ,yCAAwC;AACxE,SAASC,kBAAkB,QAAQ,4CAA2C;AAC9E,SAASC,gBAAgB,QAAQ,0CAAyC;AAC1E,SAASC,cAAc,QAAQ,wCAAuC;AACtE,SAASC,oBAAoB,QAAQ,8CAA6C;AAClF,SAASC,IAAI,QAAQ,8BAA6B;AAClD,SAASC,OAAO,QAAQ,iCAAgC;AACxD,SAASC,mBAAmB,QAAQ,6CAA4C;AAChF,SAASC,MAAM,QAAQ,gCAA+B"}
|
|
1
|
+
{"version":3,"sources":["../../src/exports/rsc.ts"],"sourcesContent":["export { CollectionField } from '../components/CollectionField/index.js'\nexport { ExportListMenuItem } from '../components/ExportListMenuItem/index.js'\nexport { ExportSaveButton } from '../components/ExportSaveButton/index.js'\nexport { FieldsToExport } from '../components/FieldsToExport/index.js'\nexport { ImportExportProvider } from '../components/ImportExportProvider/index.js'\nexport { Page } from '../components/Page/index.js'\nexport { Preview } from '../components/Preview/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","ExportSaveButton","FieldsToExport","ImportExportProvider","Page","Preview","SelectionToUseField","SortBy","SortOrder"],"mappings":"AAAA,SAASA,eAAe,QAAQ,yCAAwC;AACxE,SAASC,kBAAkB,QAAQ,4CAA2C;AAC9E,SAASC,gBAAgB,QAAQ,0CAAyC;AAC1E,SAASC,cAAc,QAAQ,wCAAuC;AACtE,SAASC,oBAAoB,QAAQ,8CAA6C;AAClF,SAASC,IAAI,QAAQ,8BAA6B;AAClD,SAASC,OAAO,QAAQ,iCAAgC;AACxD,SAASC,mBAAmB,QAAQ,6CAA4C;AAChF,SAASC,MAAM,QAAQ,gCAA+B;AACtD,SAASC,SAAS,QAAQ,mCAAkC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../../src/translations/languages/ar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAElF,eAAO,MAAM,cAAc,EAAE,+
|
|
1
|
+
{"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../../src/translations/languages/ar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAElF,eAAO,MAAM,cAAc,EAAE,+BAqB5B,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,cAGhB,CAAA"}
|
|
@@ -13,6 +13,7 @@ export const arTranslations = {
|
|
|
13
13
|
'field-page-label': 'صفحة',
|
|
14
14
|
'field-selectionToUse-label': 'اختيار للاستخدام',
|
|
15
15
|
'field-sort-label': 'ترتيب حسب',
|
|
16
|
+
'field-sort-order-label': 'ترتيب',
|
|
16
17
|
'selectionToUse-allDocuments': 'استخدم جميع الوثائق',
|
|
17
18
|
'selectionToUse-currentFilters': 'استخدم الفلاتر الحالية',
|
|
18
19
|
'selectionToUse-currentSelection': 'استخدم الاختيار الحالي',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/translations/languages/ar.ts"],"sourcesContent":["import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.js'\n\nexport const arTranslations: PluginDefaultTranslationsObject = {\n 'plugin-import-export': {\n allLocales: 'جميع المواقع',\n exportDocumentLabel: 'تصدير {{label}}',\n exportOptions: 'خيارات التصدير',\n 'field-depth-label': 'عمق',\n 'field-drafts-label': 'تضمن المسودات',\n 'field-fields-label': 'حقول',\n 'field-format-label': 'تنسيق التصدير',\n 'field-limit-label': 'حد',\n 'field-locale-label': 'موقع',\n 'field-name-label': 'اسم الملف',\n 'field-page-label': 'صفحة',\n 'field-selectionToUse-label': 'اختيار للاستخدام',\n 'field-sort-label': 'ترتيب حسب',\n 'selectionToUse-allDocuments': 'استخدم جميع الوثائق',\n 'selectionToUse-currentFilters': 'استخدم الفلاتر الحالية',\n 'selectionToUse-currentSelection': 'استخدم الاختيار الحالي',\n totalDocumentsCount: '{{count}} مستنداً إجمالياً',\n },\n}\n\nexport const ar: PluginLanguage = {\n dateFNSKey: 'ar',\n translations: arTranslations,\n}\n"],"names":["arTranslations","allLocales","exportDocumentLabel","exportOptions","totalDocumentsCount","ar","dateFNSKey","translations"],"mappings":"AAEA,OAAO,MAAMA,iBAAkD;IAC7D,wBAAwB;QACtBC,YAAY;QACZC,qBAAqB;QACrBC,eAAe;QACf,qBAAqB;QACrB,sBAAsB;QACtB,sBAAsB;QACtB,sBAAsB;QACtB,qBAAqB;QACrB,sBAAsB;QACtB,oBAAoB;QACpB,oBAAoB;QACpB,8BAA8B;QAC9B,oBAAoB;QACpB,+BAA+B;QAC/B,iCAAiC;QACjC,mCAAmC;QACnCC,qBAAqB;IACvB;AACF,EAAC;AAED,OAAO,MAAMC,KAAqB;IAChCC,YAAY;IACZC,cAAcP;AAChB,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/translations/languages/ar.ts"],"sourcesContent":["import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.js'\n\nexport const arTranslations: PluginDefaultTranslationsObject = {\n 'plugin-import-export': {\n allLocales: 'جميع المواقع',\n exportDocumentLabel: 'تصدير {{label}}',\n exportOptions: 'خيارات التصدير',\n 'field-depth-label': 'عمق',\n 'field-drafts-label': 'تضمن المسودات',\n 'field-fields-label': 'حقول',\n 'field-format-label': 'تنسيق التصدير',\n 'field-limit-label': 'حد',\n 'field-locale-label': 'موقع',\n 'field-name-label': 'اسم الملف',\n 'field-page-label': 'صفحة',\n 'field-selectionToUse-label': 'اختيار للاستخدام',\n 'field-sort-label': 'ترتيب حسب',\n 'field-sort-order-label': 'ترتيب',\n 'selectionToUse-allDocuments': 'استخدم جميع الوثائق',\n 'selectionToUse-currentFilters': 'استخدم الفلاتر الحالية',\n 'selectionToUse-currentSelection': 'استخدم الاختيار الحالي',\n totalDocumentsCount: '{{count}} مستنداً إجمالياً',\n },\n}\n\nexport const ar: PluginLanguage = {\n dateFNSKey: 'ar',\n translations: arTranslations,\n}\n"],"names":["arTranslations","allLocales","exportDocumentLabel","exportOptions","totalDocumentsCount","ar","dateFNSKey","translations"],"mappings":"AAEA,OAAO,MAAMA,iBAAkD;IAC7D,wBAAwB;QACtBC,YAAY;QACZC,qBAAqB;QACrBC,eAAe;QACf,qBAAqB;QACrB,sBAAsB;QACtB,sBAAsB;QACtB,sBAAsB;QACtB,qBAAqB;QACrB,sBAAsB;QACtB,oBAAoB;QACpB,oBAAoB;QACpB,8BAA8B;QAC9B,oBAAoB;QACpB,0BAA0B;QAC1B,+BAA+B;QAC/B,iCAAiC;QACjC,mCAAmC;QACnCC,qBAAqB;IACvB;AACF,EAAC;AAED,OAAO,MAAMC,KAAqB;IAChCC,YAAY;IACZC,cAAcP;AAChB,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"az.d.ts","sourceRoot":"","sources":["../../../src/translations/languages/az.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAElF,eAAO,MAAM,cAAc,EAAE,+
|
|
1
|
+
{"version":3,"file":"az.d.ts","sourceRoot":"","sources":["../../../src/translations/languages/az.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAElF,eAAO,MAAM,cAAc,EAAE,+BAqB5B,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,cAGhB,CAAA"}
|
|
@@ -13,6 +13,7 @@ export const azTranslations = {
|
|
|
13
13
|
'field-page-label': 'Səhifə',
|
|
14
14
|
'field-selectionToUse-label': 'İstifadə etmək üçün seçim',
|
|
15
15
|
'field-sort-label': 'Sırala',
|
|
16
|
+
'field-sort-order-label': 'Sıralama',
|
|
16
17
|
'selectionToUse-allDocuments': 'Bütün sənədlərdən istifadə edin',
|
|
17
18
|
'selectionToUse-currentFilters': 'Cari filtrlərdən istifadə edin',
|
|
18
19
|
'selectionToUse-currentSelection': 'Cari seçimi istifadə edin',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/translations/languages/az.ts"],"sourcesContent":["import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.js'\n\nexport const azTranslations: PluginDefaultTranslationsObject = {\n 'plugin-import-export': {\n allLocales: 'Bütün yerlər',\n exportDocumentLabel: '{{label}} ixrac edin',\n exportOptions: 'İxrac Variantları',\n 'field-depth-label': 'Dərinlik',\n 'field-drafts-label': 'Qaralamaları daxil etin',\n 'field-fields-label': 'Sahələr',\n 'field-format-label': 'İxrac Formatı',\n 'field-limit-label': 'Hədd',\n 'field-locale-label': 'Yerli',\n 'field-name-label': 'Fayl adı',\n 'field-page-label': 'Səhifə',\n 'field-selectionToUse-label': 'İstifadə etmək üçün seçim',\n 'field-sort-label': 'Sırala',\n 'selectionToUse-allDocuments': 'Bütün sənədlərdən istifadə edin',\n 'selectionToUse-currentFilters': 'Cari filtrlərdən istifadə edin',\n 'selectionToUse-currentSelection': 'Cari seçimi istifadə edin',\n totalDocumentsCount: '{{count}} ümumi sənəd',\n },\n}\n\nexport const az: PluginLanguage = {\n dateFNSKey: 'az',\n translations: azTranslations,\n}\n"],"names":["azTranslations","allLocales","exportDocumentLabel","exportOptions","totalDocumentsCount","az","dateFNSKey","translations"],"mappings":"AAEA,OAAO,MAAMA,iBAAkD;IAC7D,wBAAwB;QACtBC,YAAY;QACZC,qBAAqB;QACrBC,eAAe;QACf,qBAAqB;QACrB,sBAAsB;QACtB,sBAAsB;QACtB,sBAAsB;QACtB,qBAAqB;QACrB,sBAAsB;QACtB,oBAAoB;QACpB,oBAAoB;QACpB,8BAA8B;QAC9B,oBAAoB;QACpB,+BAA+B;QAC/B,iCAAiC;QACjC,mCAAmC;QACnCC,qBAAqB;IACvB;AACF,EAAC;AAED,OAAO,MAAMC,KAAqB;IAChCC,YAAY;IACZC,cAAcP;AAChB,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/translations/languages/az.ts"],"sourcesContent":["import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.js'\n\nexport const azTranslations: PluginDefaultTranslationsObject = {\n 'plugin-import-export': {\n allLocales: 'Bütün yerlər',\n exportDocumentLabel: '{{label}} ixrac edin',\n exportOptions: 'İxrac Variantları',\n 'field-depth-label': 'Dərinlik',\n 'field-drafts-label': 'Qaralamaları daxil etin',\n 'field-fields-label': 'Sahələr',\n 'field-format-label': 'İxrac Formatı',\n 'field-limit-label': 'Hədd',\n 'field-locale-label': 'Yerli',\n 'field-name-label': 'Fayl adı',\n 'field-page-label': 'Səhifə',\n 'field-selectionToUse-label': 'İstifadə etmək üçün seçim',\n 'field-sort-label': 'Sırala',\n 'field-sort-order-label': 'Sıralama',\n 'selectionToUse-allDocuments': 'Bütün sənədlərdən istifadə edin',\n 'selectionToUse-currentFilters': 'Cari filtrlərdən istifadə edin',\n 'selectionToUse-currentSelection': 'Cari seçimi istifadə edin',\n totalDocumentsCount: '{{count}} ümumi sənəd',\n },\n}\n\nexport const az: PluginLanguage = {\n dateFNSKey: 'az',\n translations: azTranslations,\n}\n"],"names":["azTranslations","allLocales","exportDocumentLabel","exportOptions","totalDocumentsCount","az","dateFNSKey","translations"],"mappings":"AAEA,OAAO,MAAMA,iBAAkD;IAC7D,wBAAwB;QACtBC,YAAY;QACZC,qBAAqB;QACrBC,eAAe;QACf,qBAAqB;QACrB,sBAAsB;QACtB,sBAAsB;QACtB,sBAAsB;QACtB,qBAAqB;QACrB,sBAAsB;QACtB,oBAAoB;QACpB,oBAAoB;QACpB,8BAA8B;QAC9B,oBAAoB;QACpB,0BAA0B;QAC1B,+BAA+B;QAC/B,iCAAiC;QACjC,mCAAmC;QACnCC,qBAAqB;IACvB;AACF,EAAC;AAED,OAAO,MAAMC,KAAqB;IAChCC,YAAY;IACZC,cAAcP;AAChB,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bg.d.ts","sourceRoot":"","sources":["../../../src/translations/languages/bg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAElF,eAAO,MAAM,cAAc,EAAE,+
|
|
1
|
+
{"version":3,"file":"bg.d.ts","sourceRoot":"","sources":["../../../src/translations/languages/bg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAElF,eAAO,MAAM,cAAc,EAAE,+BAqB5B,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,cAGhB,CAAA"}
|
|
@@ -13,6 +13,7 @@ export const bgTranslations = {
|
|
|
13
13
|
'field-page-label': 'Страница',
|
|
14
14
|
'field-selectionToUse-label': 'Избор за използване',
|
|
15
15
|
'field-sort-label': 'Сортирай по',
|
|
16
|
+
'field-sort-order-label': 'Ред на сортиране',
|
|
16
17
|
'selectionToUse-allDocuments': 'Използвайте всички документи',
|
|
17
18
|
'selectionToUse-currentFilters': 'Използвайте текущите филтри',
|
|
18
19
|
'selectionToUse-currentSelection': 'Използвайте текущия избор',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/translations/languages/bg.ts"],"sourcesContent":["import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.js'\n\nexport const bgTranslations: PluginDefaultTranslationsObject = {\n 'plugin-import-export': {\n allLocales: 'Всички локации',\n exportDocumentLabel: 'Експортиране {{label}}',\n exportOptions: 'Опции за експортиране',\n 'field-depth-label': 'Дълбочина',\n 'field-drafts-label': 'Включете чернови',\n 'field-fields-label': 'Полета',\n 'field-format-label': 'Формат за експортиране',\n 'field-limit-label': 'Лимит',\n 'field-locale-label': 'Регион',\n 'field-name-label': 'Име на файла',\n 'field-page-label': 'Страница',\n 'field-selectionToUse-label': 'Избор за използване',\n 'field-sort-label': 'Сортирай по',\n 'selectionToUse-allDocuments': 'Използвайте всички документи',\n 'selectionToUse-currentFilters': 'Използвайте текущите филтри',\n 'selectionToUse-currentSelection': 'Използвайте текущия избор',\n totalDocumentsCount: '{{count}} общо документа',\n },\n}\n\nexport const bg: PluginLanguage = {\n dateFNSKey: 'bg',\n translations: bgTranslations,\n}\n"],"names":["bgTranslations","allLocales","exportDocumentLabel","exportOptions","totalDocumentsCount","bg","dateFNSKey","translations"],"mappings":"AAEA,OAAO,MAAMA,iBAAkD;IAC7D,wBAAwB;QACtBC,YAAY;QACZC,qBAAqB;QACrBC,eAAe;QACf,qBAAqB;QACrB,sBAAsB;QACtB,sBAAsB;QACtB,sBAAsB;QACtB,qBAAqB;QACrB,sBAAsB;QACtB,oBAAoB;QACpB,oBAAoB;QACpB,8BAA8B;QAC9B,oBAAoB;QACpB,+BAA+B;QAC/B,iCAAiC;QACjC,mCAAmC;QACnCC,qBAAqB;IACvB;AACF,EAAC;AAED,OAAO,MAAMC,KAAqB;IAChCC,YAAY;IACZC,cAAcP;AAChB,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/translations/languages/bg.ts"],"sourcesContent":["import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.js'\n\nexport const bgTranslations: PluginDefaultTranslationsObject = {\n 'plugin-import-export': {\n allLocales: 'Всички локации',\n exportDocumentLabel: 'Експортиране {{label}}',\n exportOptions: 'Опции за експортиране',\n 'field-depth-label': 'Дълбочина',\n 'field-drafts-label': 'Включете чернови',\n 'field-fields-label': 'Полета',\n 'field-format-label': 'Формат за експортиране',\n 'field-limit-label': 'Лимит',\n 'field-locale-label': 'Регион',\n 'field-name-label': 'Име на файла',\n 'field-page-label': 'Страница',\n 'field-selectionToUse-label': 'Избор за използване',\n 'field-sort-label': 'Сортирай по',\n 'field-sort-order-label': 'Ред на сортиране',\n 'selectionToUse-allDocuments': 'Използвайте всички документи',\n 'selectionToUse-currentFilters': 'Използвайте текущите филтри',\n 'selectionToUse-currentSelection': 'Използвайте текущия избор',\n totalDocumentsCount: '{{count}} общо документа',\n },\n}\n\nexport const bg: PluginLanguage = {\n dateFNSKey: 'bg',\n translations: bgTranslations,\n}\n"],"names":["bgTranslations","allLocales","exportDocumentLabel","exportOptions","totalDocumentsCount","bg","dateFNSKey","translations"],"mappings":"AAEA,OAAO,MAAMA,iBAAkD;IAC7D,wBAAwB;QACtBC,YAAY;QACZC,qBAAqB;QACrBC,eAAe;QACf,qBAAqB;QACrB,sBAAsB;QACtB,sBAAsB;QACtB,sBAAsB;QACtB,qBAAqB;QACrB,sBAAsB;QACtB,oBAAoB;QACpB,oBAAoB;QACpB,8BAA8B;QAC9B,oBAAoB;QACpB,0BAA0B;QAC1B,+BAA+B;QAC/B,iCAAiC;QACjC,mCAAmC;QACnCC,qBAAqB;IACvB;AACF,EAAC;AAED,OAAO,MAAMC,KAAqB;IAChCC,YAAY;IACZC,cAAcP;AAChB,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ca.d.ts","sourceRoot":"","sources":["../../../src/translations/languages/ca.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAElF,eAAO,MAAM,cAAc,EAAE,+
|
|
1
|
+
{"version":3,"file":"ca.d.ts","sourceRoot":"","sources":["../../../src/translations/languages/ca.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAElF,eAAO,MAAM,cAAc,EAAE,+BAqB5B,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,cAGhB,CAAA"}
|
|
@@ -13,6 +13,7 @@ export const caTranslations = {
|
|
|
13
13
|
'field-page-label': 'Pàgina',
|
|
14
14
|
'field-selectionToUse-label': 'Selecció per utilitzar',
|
|
15
15
|
'field-sort-label': 'Ordena per',
|
|
16
|
+
'field-sort-order-label': 'Ordre de classificació',
|
|
16
17
|
'selectionToUse-allDocuments': 'Utilitzeu tots els documents',
|
|
17
18
|
'selectionToUse-currentFilters': 'Utilitza els filtres actuals',
|
|
18
19
|
'selectionToUse-currentSelection': 'Utilitza la selecció actual',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/translations/languages/ca.ts"],"sourcesContent":["import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.js'\n\nexport const caTranslations: PluginDefaultTranslationsObject = {\n 'plugin-import-export': {\n allLocales: 'Totes les localitzacions',\n exportDocumentLabel: 'Exporta {{label}}',\n exportOptions: \"Opcions d'exportació\",\n 'field-depth-label': 'Profunditat',\n 'field-drafts-label': 'Inclou esborranys',\n 'field-fields-label': 'Camps',\n 'field-format-label': \"Format d'exportació\",\n 'field-limit-label': 'Límit',\n 'field-locale-label': 'Local',\n 'field-name-label': 'Nom del fitxer',\n 'field-page-label': 'Pàgina',\n 'field-selectionToUse-label': 'Selecció per utilitzar',\n 'field-sort-label': 'Ordena per',\n 'selectionToUse-allDocuments': 'Utilitzeu tots els documents',\n 'selectionToUse-currentFilters': 'Utilitza els filtres actuals',\n 'selectionToUse-currentSelection': 'Utilitza la selecció actual',\n totalDocumentsCount: '{{count}} documents totals',\n },\n}\n\nexport const ca: PluginLanguage = {\n dateFNSKey: 'ca',\n translations: caTranslations,\n}\n"],"names":["caTranslations","allLocales","exportDocumentLabel","exportOptions","totalDocumentsCount","ca","dateFNSKey","translations"],"mappings":"AAEA,OAAO,MAAMA,iBAAkD;IAC7D,wBAAwB;QACtBC,YAAY;QACZC,qBAAqB;QACrBC,eAAe;QACf,qBAAqB;QACrB,sBAAsB;QACtB,sBAAsB;QACtB,sBAAsB;QACtB,qBAAqB;QACrB,sBAAsB;QACtB,oBAAoB;QACpB,oBAAoB;QACpB,8BAA8B;QAC9B,oBAAoB;QACpB,+BAA+B;QAC/B,iCAAiC;QACjC,mCAAmC;QACnCC,qBAAqB;IACvB;AACF,EAAC;AAED,OAAO,MAAMC,KAAqB;IAChCC,YAAY;IACZC,cAAcP;AAChB,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/translations/languages/ca.ts"],"sourcesContent":["import type { PluginDefaultTranslationsObject, PluginLanguage } from '../types.js'\n\nexport const caTranslations: PluginDefaultTranslationsObject = {\n 'plugin-import-export': {\n allLocales: 'Totes les localitzacions',\n exportDocumentLabel: 'Exporta {{label}}',\n exportOptions: \"Opcions d'exportació\",\n 'field-depth-label': 'Profunditat',\n 'field-drafts-label': 'Inclou esborranys',\n 'field-fields-label': 'Camps',\n 'field-format-label': \"Format d'exportació\",\n 'field-limit-label': 'Límit',\n 'field-locale-label': 'Local',\n 'field-name-label': 'Nom del fitxer',\n 'field-page-label': 'Pàgina',\n 'field-selectionToUse-label': 'Selecció per utilitzar',\n 'field-sort-label': 'Ordena per',\n 'field-sort-order-label': 'Ordre de classificació',\n 'selectionToUse-allDocuments': 'Utilitzeu tots els documents',\n 'selectionToUse-currentFilters': 'Utilitza els filtres actuals',\n 'selectionToUse-currentSelection': 'Utilitza la selecció actual',\n totalDocumentsCount: '{{count}} documents totals',\n },\n}\n\nexport const ca: PluginLanguage = {\n dateFNSKey: 'ca',\n translations: caTranslations,\n}\n"],"names":["caTranslations","allLocales","exportDocumentLabel","exportOptions","totalDocumentsCount","ca","dateFNSKey","translations"],"mappings":"AAEA,OAAO,MAAMA,iBAAkD;IAC7D,wBAAwB;QACtBC,YAAY;QACZC,qBAAqB;QACrBC,eAAe;QACf,qBAAqB;QACrB,sBAAsB;QACtB,sBAAsB;QACtB,sBAAsB;QACtB,qBAAqB;QACrB,sBAAsB;QACtB,oBAAoB;QACpB,oBAAoB;QACpB,8BAA8B;QAC9B,oBAAoB;QACpB,0BAA0B;QAC1B,+BAA+B;QAC/B,iCAAiC;QACjC,mCAAmC;QACnCC,qBAAqB;IACvB;AACF,EAAC;AAED,OAAO,MAAMC,KAAqB;IAChCC,YAAY;IACZC,cAAcP;AAChB,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cs.d.ts","sourceRoot":"","sources":["../../../src/translations/languages/cs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAElF,eAAO,MAAM,cAAc,EAAE,+
|
|
1
|
+
{"version":3,"file":"cs.d.ts","sourceRoot":"","sources":["../../../src/translations/languages/cs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAElF,eAAO,MAAM,cAAc,EAAE,+BAqB5B,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,cAGhB,CAAA"}
|
|
@@ -13,6 +13,7 @@ export const csTranslations = {
|
|
|
13
13
|
'field-page-label': 'Stránka',
|
|
14
14
|
'field-selectionToUse-label': 'Výběr k použití',
|
|
15
15
|
'field-sort-label': 'Seřadit podle',
|
|
16
|
+
'field-sort-order-label': 'Řazení',
|
|
16
17
|
'selectionToUse-allDocuments': 'Použijte všechny dokumenty',
|
|
17
18
|
'selectionToUse-currentFilters': 'Použijte aktuální filtry',
|
|
18
19
|
'selectionToUse-currentSelection': 'Použijte aktuální výběr',
|