feat(plugin-import-export): adds sort order control and sync with sort-by field (#13478)
### What? This PR adds a dedicated `sortOrder` select field (Ascending / Descending) to the import-export plugin, alongside updates to the existing `SortBy` component. The new field and component logic keep the sort field (`sort`) in sync with the selected sort direction. ### Why? Previously, descending sorting did not work. While the `SortBy` field could read the list view’s `query.sort` param, if the value contained a leading dash (e.g. `-title`), it would not be handled correctly. Only ascending sorts such as `sort=title` worked, and the preview table would not reflect a descending order. ### How? - Added a new `sortOrder` select field to the export options schema. - Implemented a `SortOrder` custom component using ReactSelect: - On new exports, reads `query.sort` from the list view and sets both `sortOrder` and `sort` (combined value with or without a leading dash). - Handles external changes to `sort` that include a leading dash. - Updated `SortBy`: - No longer writes to `sort` during initial hydration—`SortOrder` owns initial value setting. - On user field changes, writes the combined value using the current `sortOrder`.
This commit is contained in:
@@ -11,8 +11,9 @@ import {
|
|||||||
useField,
|
useField,
|
||||||
useListQuery,
|
useListQuery,
|
||||||
} from '@payloadcms/ui'
|
} from '@payloadcms/ui'
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useMemo, useState } from 'react'
|
||||||
|
|
||||||
|
import { applySortOrder, stripSortDash } from '../../utilities/sortHelpers.js'
|
||||||
import { reduceFields } from '../FieldsToExport/reduceFields.js'
|
import { reduceFields } from '../FieldsToExport/reduceFields.js'
|
||||||
import { useImportExport } from '../ImportExportProvider/index.js'
|
import { useImportExport } from '../ImportExportProvider/index.js'
|
||||||
import './index.scss'
|
import './index.scss'
|
||||||
@@ -21,12 +22,19 @@ const baseClass = 'sort-by-fields'
|
|||||||
|
|
||||||
export const SortBy: SelectFieldClientComponent = (props) => {
|
export const SortBy: SelectFieldClientComponent = (props) => {
|
||||||
const { id } = useDocumentInfo()
|
const { id } = useDocumentInfo()
|
||||||
const { setValue, value } = useField<string>()
|
|
||||||
|
// The "sort" text field that stores 'title' or '-title'
|
||||||
|
const { setValue: setSort, value: sortRaw } = useField<string>()
|
||||||
|
|
||||||
|
// Sibling order field ('asc' | 'desc') used when writing sort on change
|
||||||
|
const { value: sortOrder = 'asc' } = useField<string>({ path: 'sortOrder' })
|
||||||
|
|
||||||
const { value: collectionSlug } = useField<string>({ path: 'collectionSlug' })
|
const { value: collectionSlug } = useField<string>({ path: 'collectionSlug' })
|
||||||
const { query } = useListQuery()
|
const { query } = useListQuery()
|
||||||
const { getEntityConfig } = useConfig()
|
const { getEntityConfig } = useConfig()
|
||||||
const { collection } = useImportExport()
|
const { collection } = useImportExport()
|
||||||
|
|
||||||
|
// ReactSelect's displayed option
|
||||||
const [displayedValue, setDisplayedValue] = useState<{
|
const [displayedValue, setDisplayedValue] = useState<{
|
||||||
id: string
|
id: string
|
||||||
label: ReactNode
|
label: ReactNode
|
||||||
@@ -34,40 +42,52 @@ export const SortBy: SelectFieldClientComponent = (props) => {
|
|||||||
} | null>(null)
|
} | null>(null)
|
||||||
|
|
||||||
const collectionConfig = getEntityConfig({ collectionSlug: collectionSlug ?? collection })
|
const collectionConfig = getEntityConfig({ collectionSlug: collectionSlug ?? collection })
|
||||||
const fieldOptions = reduceFields({ fields: collectionConfig?.fields })
|
const fieldOptions = useMemo(
|
||||||
|
() => reduceFields({ fields: collectionConfig?.fields }),
|
||||||
|
[collectionConfig?.fields],
|
||||||
|
)
|
||||||
|
|
||||||
// Sync displayedValue with value from useField
|
// Normalize the stored value for display (strip the '-') and pick the option
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!value) {
|
const clean = stripSortDash(sortRaw)
|
||||||
|
if (!clean) {
|
||||||
setDisplayedValue(null)
|
setDisplayedValue(null)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const option = fieldOptions.find((field) => field.value === value)
|
const option = fieldOptions.find((f) => f.value === clean)
|
||||||
if (option && (!displayedValue || displayedValue.value !== value)) {
|
if (option && (!displayedValue || displayedValue.value !== clean)) {
|
||||||
setDisplayedValue(option)
|
setDisplayedValue(option)
|
||||||
}
|
}
|
||||||
}, [displayedValue, fieldOptions, value])
|
}, [sortRaw, fieldOptions, displayedValue])
|
||||||
|
|
||||||
|
// Sync the visible select from list-view query sort,
|
||||||
|
// but no need to write to the "sort" field here — SortOrder owns initial combined value.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (id || !query?.sort || value) {
|
if (id || !query?.sort || sortRaw) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const option = fieldOptions.find((field) => field.value === query.sort)
|
if (!query.sort) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const clean = stripSortDash(query.sort as string)
|
||||||
|
const option = fieldOptions.find((f) => f.value === clean)
|
||||||
if (option) {
|
if (option) {
|
||||||
setValue(option.value)
|
|
||||||
setDisplayedValue(option)
|
setDisplayedValue(option)
|
||||||
}
|
}
|
||||||
}, [fieldOptions, id, query?.sort, value, setValue])
|
}, [id, query?.sort, sortRaw, fieldOptions])
|
||||||
|
|
||||||
|
// When user selects a different field, store it with the current order applied
|
||||||
const onChange = (option: { id: string; label: ReactNode; value: string } | null) => {
|
const onChange = (option: { id: string; label: ReactNode; value: string } | null) => {
|
||||||
if (!option) {
|
if (!option) {
|
||||||
setValue('')
|
setSort('')
|
||||||
setDisplayedValue(null)
|
setDisplayedValue(null)
|
||||||
} else {
|
} else {
|
||||||
setValue(option.value)
|
|
||||||
setDisplayedValue(option)
|
setDisplayedValue(option)
|
||||||
|
const next = applySortOrder(option.value, String(sortOrder) as 'asc' | 'desc')
|
||||||
|
setSort(next)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
.sort-order-field {
|
||||||
|
--field-width: 25%;
|
||||||
|
}
|
||||||
109
packages/plugin-import-export/src/components/SortOrder/index.tsx
Normal file
109
packages/plugin-import-export/src/components/SortOrder/index.tsx
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import type { SelectFieldClientComponent } from 'payload'
|
||||||
|
|
||||||
|
import { FieldLabel, ReactSelect, useDocumentInfo, useField, useListQuery } from '@payloadcms/ui'
|
||||||
|
import React, { useEffect, useMemo, useState } from 'react'
|
||||||
|
|
||||||
|
import { applySortOrder, stripSortDash } from '../../utilities/sortHelpers.js'
|
||||||
|
import './index.scss'
|
||||||
|
|
||||||
|
const baseClass = 'sort-order-field'
|
||||||
|
|
||||||
|
type Order = 'asc' | 'desc'
|
||||||
|
type OrderOption = { label: string; value: Order }
|
||||||
|
|
||||||
|
const options = [
|
||||||
|
{ label: 'Ascending', value: 'asc' as const },
|
||||||
|
{ label: 'Descending', value: 'desc' as const },
|
||||||
|
] as const
|
||||||
|
|
||||||
|
const defaultOption: OrderOption = options[0]
|
||||||
|
|
||||||
|
// Safely coerce query.sort to a string (ignore arrays)
|
||||||
|
const normalizeSortParam = (v: unknown): string | undefined => {
|
||||||
|
if (typeof v === 'string') {
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
if (Array.isArray(v) && typeof v[0] === 'string') {
|
||||||
|
return v[0]
|
||||||
|
}
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
export const SortOrder: SelectFieldClientComponent = (props) => {
|
||||||
|
const { id } = useDocumentInfo()
|
||||||
|
const { query } = useListQuery()
|
||||||
|
|
||||||
|
// 'sortOrder' select field: 'asc' | 'desc'
|
||||||
|
const { setValue: setOrder, value: orderValueRaw } = useField<Order>()
|
||||||
|
|
||||||
|
// 'sort' text field: 'title' | '-title'
|
||||||
|
const { setValue: setSort, value: sortRaw } = useField<string>({ path: 'sort' })
|
||||||
|
|
||||||
|
// The current order value, defaulting to 'asc' for UI
|
||||||
|
const orderValue: Order = orderValueRaw || 'asc'
|
||||||
|
|
||||||
|
// Map 'asc' | 'desc' to the option object for ReactSelect
|
||||||
|
const currentOption = useMemo<OrderOption>(
|
||||||
|
() => options.find((o) => o.value === orderValue) ?? defaultOption,
|
||||||
|
[orderValue],
|
||||||
|
)
|
||||||
|
const [displayed, setDisplayed] = useState<null | OrderOption>(currentOption)
|
||||||
|
|
||||||
|
// Derive from list-view query.sort if present
|
||||||
|
useEffect(() => {
|
||||||
|
if (id) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const qs = normalizeSortParam(query?.sort)
|
||||||
|
if (!qs) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const isDesc = qs.startsWith('-')
|
||||||
|
const base = stripSortDash(qs)
|
||||||
|
const order: Order = isDesc ? 'desc' : 'asc'
|
||||||
|
|
||||||
|
setOrder(order)
|
||||||
|
setSort(applySortOrder(base, order))
|
||||||
|
}, [id, query?.sort, setOrder, setSort])
|
||||||
|
|
||||||
|
// Keep the select's displayed option in sync with the stored order
|
||||||
|
useEffect(() => {
|
||||||
|
setDisplayed(currentOption ?? defaultOption)
|
||||||
|
}, [currentOption])
|
||||||
|
|
||||||
|
// Handle manual order changes via ReactSelect:
|
||||||
|
// - update the order field
|
||||||
|
// - rewrite the combined "sort" string to add/remove the leading '-'
|
||||||
|
const onChange = (option: null | OrderOption) => {
|
||||||
|
const next = option?.value ?? 'asc'
|
||||||
|
setOrder(next)
|
||||||
|
|
||||||
|
const base = stripSortDash(sortRaw)
|
||||||
|
if (base) {
|
||||||
|
setSort(applySortOrder(base, next))
|
||||||
|
}
|
||||||
|
|
||||||
|
setDisplayed(option ?? defaultOption)
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={baseClass}>
|
||||||
|
<FieldLabel label={props.field.label} path={props.path} />
|
||||||
|
<ReactSelect
|
||||||
|
className={baseClass}
|
||||||
|
disabled={props.readOnly}
|
||||||
|
inputId={`field-${props.path.replace(/\./g, '__')}`}
|
||||||
|
isClearable={false}
|
||||||
|
isSearchable={false}
|
||||||
|
// @ts-expect-error react-select option typing differs from our local type
|
||||||
|
onChange={onChange}
|
||||||
|
options={options as unknown as OrderOption[]}
|
||||||
|
// @ts-expect-error react-select option typing differs from our local type
|
||||||
|
value={displayed}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -118,6 +118,21 @@ export const getFields = (config: Config, pluginConfig?: ImportExportPluginConfi
|
|||||||
// @ts-expect-error - this is not correctly typed in plugins right now
|
// @ts-expect-error - this is not correctly typed in plugins right now
|
||||||
label: ({ t }) => t('plugin-import-export:field-sort-label'),
|
label: ({ t }) => t('plugin-import-export:field-sort-label'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'sortOrder',
|
||||||
|
type: 'select',
|
||||||
|
admin: {
|
||||||
|
components: {
|
||||||
|
Field: '@payloadcms/plugin-import-export/rsc#SortOrder',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// @ts-expect-error - this is not correctly typed in plugins right now
|
||||||
|
label: ({ t }) => t('plugin-import-export:field-sort-order-label'),
|
||||||
|
options: [
|
||||||
|
{ label: 'Ascending', value: 'asc' },
|
||||||
|
{ label: 'Descending', value: 'desc' },
|
||||||
|
],
|
||||||
|
},
|
||||||
...(localeField ? [localeField] : []),
|
...(localeField ? [localeField] : []),
|
||||||
{
|
{
|
||||||
name: 'drafts',
|
name: 'drafts',
|
||||||
|
|||||||
@@ -7,3 +7,4 @@ export { Page } from '../components/Page/index.js'
|
|||||||
export { Preview } from '../components/Preview/index.js'
|
export { Preview } from '../components/Preview/index.js'
|
||||||
export { SelectionToUseField } from '../components/SelectionToUseField/index.js'
|
export { SelectionToUseField } from '../components/SelectionToUseField/index.js'
|
||||||
export { SortBy } from '../components/SortBy/index.js'
|
export { SortBy } from '../components/SortBy/index.js'
|
||||||
|
export { SortOrder } from '../components/SortOrder/index.js'
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const arTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'صفحة',
|
'field-page-label': 'صفحة',
|
||||||
'field-selectionToUse-label': 'اختيار للاستخدام',
|
'field-selectionToUse-label': 'اختيار للاستخدام',
|
||||||
'field-sort-label': 'ترتيب حسب',
|
'field-sort-label': 'ترتيب حسب',
|
||||||
|
'field-sort-order-label': 'ترتيب',
|
||||||
'selectionToUse-allDocuments': 'استخدم جميع الوثائق',
|
'selectionToUse-allDocuments': 'استخدم جميع الوثائق',
|
||||||
'selectionToUse-currentFilters': 'استخدم الفلاتر الحالية',
|
'selectionToUse-currentFilters': 'استخدم الفلاتر الحالية',
|
||||||
'selectionToUse-currentSelection': 'استخدم الاختيار الحالي',
|
'selectionToUse-currentSelection': 'استخدم الاختيار الحالي',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const azTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Səhifə',
|
'field-page-label': 'Səhifə',
|
||||||
'field-selectionToUse-label': 'İstifadə etmək üçün seçim',
|
'field-selectionToUse-label': 'İstifadə etmək üçün seçim',
|
||||||
'field-sort-label': 'Sırala',
|
'field-sort-label': 'Sırala',
|
||||||
|
'field-sort-order-label': 'Sıralama',
|
||||||
'selectionToUse-allDocuments': 'Bütün sənədlərdən istifadə edin',
|
'selectionToUse-allDocuments': 'Bütün sənədlərdən istifadə edin',
|
||||||
'selectionToUse-currentFilters': 'Cari filtrlərdən istifadə edin',
|
'selectionToUse-currentFilters': 'Cari filtrlərdən istifadə edin',
|
||||||
'selectionToUse-currentSelection': 'Cari seçimi istifadə edin',
|
'selectionToUse-currentSelection': 'Cari seçimi istifadə edin',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const bgTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Страница',
|
'field-page-label': 'Страница',
|
||||||
'field-selectionToUse-label': 'Избор за използване',
|
'field-selectionToUse-label': 'Избор за използване',
|
||||||
'field-sort-label': 'Сортирай по',
|
'field-sort-label': 'Сортирай по',
|
||||||
|
'field-sort-order-label': 'Ред на сортиране',
|
||||||
'selectionToUse-allDocuments': 'Използвайте всички документи',
|
'selectionToUse-allDocuments': 'Използвайте всички документи',
|
||||||
'selectionToUse-currentFilters': 'Използвайте текущите филтри',
|
'selectionToUse-currentFilters': 'Използвайте текущите филтри',
|
||||||
'selectionToUse-currentSelection': 'Използвайте текущия избор',
|
'selectionToUse-currentSelection': 'Използвайте текущия избор',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const caTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Pàgina',
|
'field-page-label': 'Pàgina',
|
||||||
'field-selectionToUse-label': 'Selecció per utilitzar',
|
'field-selectionToUse-label': 'Selecció per utilitzar',
|
||||||
'field-sort-label': 'Ordena per',
|
'field-sort-label': 'Ordena per',
|
||||||
|
'field-sort-order-label': 'Ordre de classificació',
|
||||||
'selectionToUse-allDocuments': 'Utilitzeu tots els documents',
|
'selectionToUse-allDocuments': 'Utilitzeu tots els documents',
|
||||||
'selectionToUse-currentFilters': 'Utilitza els filtres actuals',
|
'selectionToUse-currentFilters': 'Utilitza els filtres actuals',
|
||||||
'selectionToUse-currentSelection': 'Utilitza la selecció actual',
|
'selectionToUse-currentSelection': 'Utilitza la selecció actual',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const csTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Stránka',
|
'field-page-label': 'Stránka',
|
||||||
'field-selectionToUse-label': 'Výběr k použití',
|
'field-selectionToUse-label': 'Výběr k použití',
|
||||||
'field-sort-label': 'Seřadit podle',
|
'field-sort-label': 'Seřadit podle',
|
||||||
|
'field-sort-order-label': 'Řazení',
|
||||||
'selectionToUse-allDocuments': 'Použijte všechny dokumenty',
|
'selectionToUse-allDocuments': 'Použijte všechny dokumenty',
|
||||||
'selectionToUse-currentFilters': 'Použijte aktuální filtry',
|
'selectionToUse-currentFilters': 'Použijte aktuální filtry',
|
||||||
'selectionToUse-currentSelection': 'Použijte aktuální výběr',
|
'selectionToUse-currentSelection': 'Použijte aktuální výběr',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const daTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Side',
|
'field-page-label': 'Side',
|
||||||
'field-selectionToUse-label': 'Valg til brug',
|
'field-selectionToUse-label': 'Valg til brug',
|
||||||
'field-sort-label': 'Sorter efter',
|
'field-sort-label': 'Sorter efter',
|
||||||
|
'field-sort-order-label': 'Sorteringsrækkefølge',
|
||||||
'selectionToUse-allDocuments': 'Brug alle dokumenter',
|
'selectionToUse-allDocuments': 'Brug alle dokumenter',
|
||||||
'selectionToUse-currentFilters': 'Brug nuværende filtre',
|
'selectionToUse-currentFilters': 'Brug nuværende filtre',
|
||||||
'selectionToUse-currentSelection': 'Brug nuværende valg',
|
'selectionToUse-currentSelection': 'Brug nuværende valg',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const deTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Seite',
|
'field-page-label': 'Seite',
|
||||||
'field-selectionToUse-label': 'Auswahl zur Verwendung',
|
'field-selectionToUse-label': 'Auswahl zur Verwendung',
|
||||||
'field-sort-label': 'Sortieren nach',
|
'field-sort-label': 'Sortieren nach',
|
||||||
|
'field-sort-order-label': 'Sortierreihenfolge',
|
||||||
'selectionToUse-allDocuments': 'Verwenden Sie alle Dokumente.',
|
'selectionToUse-allDocuments': 'Verwenden Sie alle Dokumente.',
|
||||||
'selectionToUse-currentFilters': 'Verwenden Sie aktuelle Filter',
|
'selectionToUse-currentFilters': 'Verwenden Sie aktuelle Filter',
|
||||||
'selectionToUse-currentSelection': 'Verwenden Sie die aktuelle Auswahl',
|
'selectionToUse-currentSelection': 'Verwenden Sie die aktuelle Auswahl',
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export const enTranslations = {
|
|||||||
'field-page-label': 'Page',
|
'field-page-label': 'Page',
|
||||||
'field-selectionToUse-label': 'Selection to use',
|
'field-selectionToUse-label': 'Selection to use',
|
||||||
'field-sort-label': 'Sort by',
|
'field-sort-label': 'Sort by',
|
||||||
|
'field-sort-order-label': 'Sort order',
|
||||||
'selectionToUse-allDocuments': 'Use all documents',
|
'selectionToUse-allDocuments': 'Use all documents',
|
||||||
'selectionToUse-currentFilters': 'Use current filters',
|
'selectionToUse-currentFilters': 'Use current filters',
|
||||||
'selectionToUse-currentSelection': 'Use current selection',
|
'selectionToUse-currentSelection': 'Use current selection',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const esTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Página',
|
'field-page-label': 'Página',
|
||||||
'field-selectionToUse-label': 'Selección para usar',
|
'field-selectionToUse-label': 'Selección para usar',
|
||||||
'field-sort-label': 'Ordenar por',
|
'field-sort-label': 'Ordenar por',
|
||||||
|
'field-sort-order-label': 'Orden de clasificación',
|
||||||
'selectionToUse-allDocuments': 'Utilice todos los documentos',
|
'selectionToUse-allDocuments': 'Utilice todos los documentos',
|
||||||
'selectionToUse-currentFilters': 'Utilice los filtros actuales',
|
'selectionToUse-currentFilters': 'Utilice los filtros actuales',
|
||||||
'selectionToUse-currentSelection': 'Usar selección actual',
|
'selectionToUse-currentSelection': 'Usar selección actual',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const etTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Leht',
|
'field-page-label': 'Leht',
|
||||||
'field-selectionToUse-label': 'Valiku kasutamine',
|
'field-selectionToUse-label': 'Valiku kasutamine',
|
||||||
'field-sort-label': 'Sorteeri järgi',
|
'field-sort-label': 'Sorteeri järgi',
|
||||||
|
'field-sort-order-label': 'Sorteerimise järjekord',
|
||||||
'selectionToUse-allDocuments': 'Kasutage kõiki dokumente',
|
'selectionToUse-allDocuments': 'Kasutage kõiki dokumente',
|
||||||
'selectionToUse-currentFilters': 'Kasuta praeguseid filtreid',
|
'selectionToUse-currentFilters': 'Kasuta praeguseid filtreid',
|
||||||
'selectionToUse-currentSelection': 'Kasuta praegust valikut',
|
'selectionToUse-currentSelection': 'Kasuta praegust valikut',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const faTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'صفحه',
|
'field-page-label': 'صفحه',
|
||||||
'field-selectionToUse-label': 'انتخاب برای استفاده',
|
'field-selectionToUse-label': 'انتخاب برای استفاده',
|
||||||
'field-sort-label': 'مرتب سازی بر اساس',
|
'field-sort-label': 'مرتب سازی بر اساس',
|
||||||
|
'field-sort-order-label': 'ترتیب',
|
||||||
'selectionToUse-allDocuments': 'از تمام مستندات استفاده کنید',
|
'selectionToUse-allDocuments': 'از تمام مستندات استفاده کنید',
|
||||||
'selectionToUse-currentFilters': 'از فیلترهای فعلی استفاده کنید',
|
'selectionToUse-currentFilters': 'از فیلترهای فعلی استفاده کنید',
|
||||||
'selectionToUse-currentSelection': 'از انتخاب فعلی استفاده کنید',
|
'selectionToUse-currentSelection': 'از انتخاب فعلی استفاده کنید',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const frTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Page',
|
'field-page-label': 'Page',
|
||||||
'field-selectionToUse-label': 'Sélection à utiliser',
|
'field-selectionToUse-label': 'Sélection à utiliser',
|
||||||
'field-sort-label': 'Trier par',
|
'field-sort-label': 'Trier par',
|
||||||
|
'field-sort-order-label': 'Ordre de tri',
|
||||||
'selectionToUse-allDocuments': 'Utilisez tous les documents',
|
'selectionToUse-allDocuments': 'Utilisez tous les documents',
|
||||||
'selectionToUse-currentFilters': 'Utilisez les filtres actuels',
|
'selectionToUse-currentFilters': 'Utilisez les filtres actuels',
|
||||||
'selectionToUse-currentSelection': 'Utilisez la sélection actuelle',
|
'selectionToUse-currentSelection': 'Utilisez la sélection actuelle',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const heTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'עמוד',
|
'field-page-label': 'עמוד',
|
||||||
'field-selectionToUse-label': 'בחירה לשימוש',
|
'field-selectionToUse-label': 'בחירה לשימוש',
|
||||||
'field-sort-label': 'מיין לפי',
|
'field-sort-label': 'מיין לפי',
|
||||||
|
'field-sort-order-label': 'סדר מיון',
|
||||||
'selectionToUse-allDocuments': 'השתמש בכל המסמכים',
|
'selectionToUse-allDocuments': 'השתמש בכל המסמכים',
|
||||||
'selectionToUse-currentFilters': 'השתמש במסננים הנוכחיים',
|
'selectionToUse-currentFilters': 'השתמש במסננים הנוכחיים',
|
||||||
'selectionToUse-currentSelection': 'השתמש בבחירה הנוכחית',
|
'selectionToUse-currentSelection': 'השתמש בבחירה הנוכחית',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const hrTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Stranica',
|
'field-page-label': 'Stranica',
|
||||||
'field-selectionToUse-label': 'Odabir za upotrebu',
|
'field-selectionToUse-label': 'Odabir za upotrebu',
|
||||||
'field-sort-label': 'Sortiraj po',
|
'field-sort-label': 'Sortiraj po',
|
||||||
|
'field-sort-order-label': 'Redoslijed sortiranja',
|
||||||
'selectionToUse-allDocuments': 'Koristite sve dokumente',
|
'selectionToUse-allDocuments': 'Koristite sve dokumente',
|
||||||
'selectionToUse-currentFilters': 'Koristite trenutne filtre',
|
'selectionToUse-currentFilters': 'Koristite trenutne filtre',
|
||||||
'selectionToUse-currentSelection': 'Koristite trenutni odabir',
|
'selectionToUse-currentSelection': 'Koristite trenutni odabir',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const huTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Oldal',
|
'field-page-label': 'Oldal',
|
||||||
'field-selectionToUse-label': 'Használatra kiválasztva',
|
'field-selectionToUse-label': 'Használatra kiválasztva',
|
||||||
'field-sort-label': 'Rendezés szerint',
|
'field-sort-label': 'Rendezés szerint',
|
||||||
|
'field-sort-order-label': 'Rendezési sorrend',
|
||||||
'selectionToUse-allDocuments': 'Használjon minden dokumentumot',
|
'selectionToUse-allDocuments': 'Használjon minden dokumentumot',
|
||||||
'selectionToUse-currentFilters': 'Használja az aktuális szűrőket',
|
'selectionToUse-currentFilters': 'Használja az aktuális szűrőket',
|
||||||
'selectionToUse-currentSelection': 'Használja a jelenlegi kiválasztást',
|
'selectionToUse-currentSelection': 'Használja a jelenlegi kiválasztást',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const hyTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Էջ',
|
'field-page-label': 'Էջ',
|
||||||
'field-selectionToUse-label': 'Օգտագործման ընտրություն',
|
'field-selectionToUse-label': 'Օգտագործման ընտրություն',
|
||||||
'field-sort-label': 'Դասավորել ըստ',
|
'field-sort-label': 'Դասավորել ըստ',
|
||||||
|
'field-sort-order-label': 'Դասավորության կարգ',
|
||||||
'selectionToUse-allDocuments': 'Օգտագործեք բոլոր փաստաթղթերը',
|
'selectionToUse-allDocuments': 'Օգտագործեք բոլոր փաստաթղթերը',
|
||||||
'selectionToUse-currentFilters': 'Օգտագործեք ընթացիկ ֆիլտրերը',
|
'selectionToUse-currentFilters': 'Օգտագործեք ընթացիկ ֆիլտրերը',
|
||||||
'selectionToUse-currentSelection': 'Օգտագործել ընթացիկ ընտրությունը',
|
'selectionToUse-currentSelection': 'Օգտագործել ընթացիկ ընտրությունը',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const itTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Pagina',
|
'field-page-label': 'Pagina',
|
||||||
'field-selectionToUse-label': 'Selezione da utilizzare',
|
'field-selectionToUse-label': 'Selezione da utilizzare',
|
||||||
'field-sort-label': 'Ordina per',
|
'field-sort-label': 'Ordina per',
|
||||||
|
'field-sort-order-label': 'Ordine di sort',
|
||||||
'selectionToUse-allDocuments': 'Utilizza tutti i documenti',
|
'selectionToUse-allDocuments': 'Utilizza tutti i documenti',
|
||||||
'selectionToUse-currentFilters': 'Utilizza i filtri correnti',
|
'selectionToUse-currentFilters': 'Utilizza i filtri correnti',
|
||||||
'selectionToUse-currentSelection': 'Utilizza la selezione corrente',
|
'selectionToUse-currentSelection': 'Utilizza la selezione corrente',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const jaTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'ページ',
|
'field-page-label': 'ページ',
|
||||||
'field-selectionToUse-label': '使用する選択',
|
'field-selectionToUse-label': '使用する選択',
|
||||||
'field-sort-label': '並び替える',
|
'field-sort-label': '並び替える',
|
||||||
|
'field-sort-order-label': '並び替えの順序',
|
||||||
'selectionToUse-allDocuments': 'すべての文書を使用してください。',
|
'selectionToUse-allDocuments': 'すべての文書を使用してください。',
|
||||||
'selectionToUse-currentFilters': '現在のフィルターを使用してください',
|
'selectionToUse-currentFilters': '現在のフィルターを使用してください',
|
||||||
'selectionToUse-currentSelection': '現在の選択を使用する',
|
'selectionToUse-currentSelection': '現在の選択を使用する',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const koTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': '페이지',
|
'field-page-label': '페이지',
|
||||||
'field-selectionToUse-label': '사용할 선택',
|
'field-selectionToUse-label': '사용할 선택',
|
||||||
'field-sort-label': '정렬 방식',
|
'field-sort-label': '정렬 방식',
|
||||||
|
'field-sort-order-label': '정렬 순서',
|
||||||
'selectionToUse-allDocuments': '모든 문서를 사용하십시오.',
|
'selectionToUse-allDocuments': '모든 문서를 사용하십시오.',
|
||||||
'selectionToUse-currentFilters': '현재 필터를 사용하십시오.',
|
'selectionToUse-currentFilters': '현재 필터를 사용하십시오.',
|
||||||
'selectionToUse-currentSelection': '현재 선택 항목을 사용하십시오.',
|
'selectionToUse-currentSelection': '현재 선택 항목을 사용하십시오.',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const ltTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Puslapis',
|
'field-page-label': 'Puslapis',
|
||||||
'field-selectionToUse-label': 'Naudojimo pasirinkimas',
|
'field-selectionToUse-label': 'Naudojimo pasirinkimas',
|
||||||
'field-sort-label': 'Rūšiuoti pagal',
|
'field-sort-label': 'Rūšiuoti pagal',
|
||||||
|
'field-sort-order-label': 'Rūšiavimo tvarka',
|
||||||
'selectionToUse-allDocuments': 'Naudokite visus dokumentus.',
|
'selectionToUse-allDocuments': 'Naudokite visus dokumentus.',
|
||||||
'selectionToUse-currentFilters': 'Naudoti esamus filtrus',
|
'selectionToUse-currentFilters': 'Naudoti esamus filtrus',
|
||||||
'selectionToUse-currentSelection': 'Naudoti dabartinį pasirinkimą',
|
'selectionToUse-currentSelection': 'Naudoti dabartinį pasirinkimą',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const lvTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Lapa',
|
'field-page-label': 'Lapa',
|
||||||
'field-selectionToUse-label': 'Izvēles lietošana',
|
'field-selectionToUse-label': 'Izvēles lietošana',
|
||||||
'field-sort-label': 'Kārtot pēc',
|
'field-sort-label': 'Kārtot pēc',
|
||||||
|
'field-sort-order-label': 'Kārtot pēc secības',
|
||||||
'selectionToUse-allDocuments': 'Izmantojiet visus dokumentus',
|
'selectionToUse-allDocuments': 'Izmantojiet visus dokumentus',
|
||||||
'selectionToUse-currentFilters': 'Izmantot pašreizējos filtrus',
|
'selectionToUse-currentFilters': 'Izmantot pašreizējos filtrus',
|
||||||
'selectionToUse-currentSelection': 'Izmantot pašreizējo izvēli',
|
'selectionToUse-currentSelection': 'Izmantot pašreizējo izvēli',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const myTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'စာမျက်နှာ',
|
'field-page-label': 'စာမျက်နှာ',
|
||||||
'field-selectionToUse-label': 'Pilihan untuk digunakan',
|
'field-selectionToUse-label': 'Pilihan untuk digunakan',
|
||||||
'field-sort-label': 'စီမံအလိုက်',
|
'field-sort-label': 'စီမံအလိုက်',
|
||||||
|
'field-sort-order-label': 'Sorteringsrækkefølge',
|
||||||
'selectionToUse-allDocuments': 'Gunakan semua dokumen',
|
'selectionToUse-allDocuments': 'Gunakan semua dokumen',
|
||||||
'selectionToUse-currentFilters': 'Gunakan penapis semasa',
|
'selectionToUse-currentFilters': 'Gunakan penapis semasa',
|
||||||
'selectionToUse-currentSelection': 'Gunakan pilihan semasa',
|
'selectionToUse-currentSelection': 'Gunakan pilihan semasa',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const nbTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Side',
|
'field-page-label': 'Side',
|
||||||
'field-selectionToUse-label': 'Valg til bruk',
|
'field-selectionToUse-label': 'Valg til bruk',
|
||||||
'field-sort-label': 'Sorter etter',
|
'field-sort-label': 'Sorter etter',
|
||||||
|
'field-sort-order-label': 'Sorteringsrekkefølge',
|
||||||
'selectionToUse-allDocuments': 'Bruk alle dokumentene',
|
'selectionToUse-allDocuments': 'Bruk alle dokumentene',
|
||||||
'selectionToUse-currentFilters': 'Bruk gjeldende filtre',
|
'selectionToUse-currentFilters': 'Bruk gjeldende filtre',
|
||||||
'selectionToUse-currentSelection': 'Bruk gjeldende utvalg',
|
'selectionToUse-currentSelection': 'Bruk gjeldende utvalg',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const nlTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Pagina',
|
'field-page-label': 'Pagina',
|
||||||
'field-selectionToUse-label': 'Selectie om te gebruiken',
|
'field-selectionToUse-label': 'Selectie om te gebruiken',
|
||||||
'field-sort-label': 'Sorteer op',
|
'field-sort-label': 'Sorteer op',
|
||||||
|
'field-sort-order-label': 'Sorteer volgorde',
|
||||||
'selectionToUse-allDocuments': 'Gebruik alle documenten',
|
'selectionToUse-allDocuments': 'Gebruik alle documenten',
|
||||||
'selectionToUse-currentFilters': 'Gebruik huidige filters',
|
'selectionToUse-currentFilters': 'Gebruik huidige filters',
|
||||||
'selectionToUse-currentSelection': 'Gebruik huidige selectie',
|
'selectionToUse-currentSelection': 'Gebruik huidige selectie',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const plTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Strona',
|
'field-page-label': 'Strona',
|
||||||
'field-selectionToUse-label': 'Wybór do użycia',
|
'field-selectionToUse-label': 'Wybór do użycia',
|
||||||
'field-sort-label': 'Sortuj według',
|
'field-sort-label': 'Sortuj według',
|
||||||
|
'field-sort-order-label': 'Sortowanie według',
|
||||||
'selectionToUse-allDocuments': 'Użyj wszystkich dokumentów.',
|
'selectionToUse-allDocuments': 'Użyj wszystkich dokumentów.',
|
||||||
'selectionToUse-currentFilters': 'Użyj aktualnych filtrów',
|
'selectionToUse-currentFilters': 'Użyj aktualnych filtrów',
|
||||||
'selectionToUse-currentSelection': 'Użyj aktualnego wyboru',
|
'selectionToUse-currentSelection': 'Użyj aktualnego wyboru',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const ptTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Página',
|
'field-page-label': 'Página',
|
||||||
'field-selectionToUse-label': 'Seleção para usar',
|
'field-selectionToUse-label': 'Seleção para usar',
|
||||||
'field-sort-label': 'Ordenar por',
|
'field-sort-label': 'Ordenar por',
|
||||||
|
'field-sort-order-label': 'Ordem de classificação',
|
||||||
'selectionToUse-allDocuments': 'Use todos os documentos',
|
'selectionToUse-allDocuments': 'Use todos os documentos',
|
||||||
'selectionToUse-currentFilters': 'Use os filtros atuais',
|
'selectionToUse-currentFilters': 'Use os filtros atuais',
|
||||||
'selectionToUse-currentSelection': 'Use a seleção atual',
|
'selectionToUse-currentSelection': 'Use a seleção atual',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const roTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Pagina',
|
'field-page-label': 'Pagina',
|
||||||
'field-selectionToUse-label': 'Selectarea pentru utilizare',
|
'field-selectionToUse-label': 'Selectarea pentru utilizare',
|
||||||
'field-sort-label': 'Sortează după',
|
'field-sort-label': 'Sortează după',
|
||||||
|
'field-sort-order-label': 'Ordine de sortare',
|
||||||
'selectionToUse-allDocuments': 'Utilizați toate documentele.',
|
'selectionToUse-allDocuments': 'Utilizați toate documentele.',
|
||||||
'selectionToUse-currentFilters': 'Utilizați filtrele curente',
|
'selectionToUse-currentFilters': 'Utilizați filtrele curente',
|
||||||
'selectionToUse-currentSelection': 'Utilizați selecția curentă',
|
'selectionToUse-currentSelection': 'Utilizați selecția curentă',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const rsTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Strana',
|
'field-page-label': 'Strana',
|
||||||
'field-selectionToUse-label': 'Izbor za upotrebu',
|
'field-selectionToUse-label': 'Izbor za upotrebu',
|
||||||
'field-sort-label': 'Sortiraj po',
|
'field-sort-label': 'Sortiraj po',
|
||||||
|
'field-sort-order-label': 'Redoslijed sortiranja',
|
||||||
'selectionToUse-allDocuments': 'Koristite sve dokumente',
|
'selectionToUse-allDocuments': 'Koristite sve dokumente',
|
||||||
'selectionToUse-currentFilters': 'Koristite trenutne filtere',
|
'selectionToUse-currentFilters': 'Koristite trenutne filtere',
|
||||||
'selectionToUse-currentSelection': 'Koristite trenutni izbor',
|
'selectionToUse-currentSelection': 'Koristite trenutni izbor',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const rsLatinTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Strana',
|
'field-page-label': 'Strana',
|
||||||
'field-selectionToUse-label': 'Izbor za upotrebu',
|
'field-selectionToUse-label': 'Izbor za upotrebu',
|
||||||
'field-sort-label': 'Sortiraj po',
|
'field-sort-label': 'Sortiraj po',
|
||||||
|
'field-sort-order-label': 'Redoslijed sortiranja',
|
||||||
'selectionToUse-allDocuments': 'Koristite sve dokumente',
|
'selectionToUse-allDocuments': 'Koristite sve dokumente',
|
||||||
'selectionToUse-currentFilters': 'Koristite trenutne filtere',
|
'selectionToUse-currentFilters': 'Koristite trenutne filtere',
|
||||||
'selectionToUse-currentSelection': 'Koristi trenutni izbor',
|
'selectionToUse-currentSelection': 'Koristi trenutni izbor',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const ruTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Страница',
|
'field-page-label': 'Страница',
|
||||||
'field-selectionToUse-label': 'Выбор использования',
|
'field-selectionToUse-label': 'Выбор использования',
|
||||||
'field-sort-label': 'Сортировать по',
|
'field-sort-label': 'Сортировать по',
|
||||||
|
'field-sort-order-label': 'Порядок сортировки',
|
||||||
'selectionToUse-allDocuments': 'Используйте все документы',
|
'selectionToUse-allDocuments': 'Используйте все документы',
|
||||||
'selectionToUse-currentFilters': 'Использовать текущие фильтры',
|
'selectionToUse-currentFilters': 'Использовать текущие фильтры',
|
||||||
'selectionToUse-currentSelection': 'Использовать текущий выбор',
|
'selectionToUse-currentSelection': 'Использовать текущий выбор',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const skTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Stránka',
|
'field-page-label': 'Stránka',
|
||||||
'field-selectionToUse-label': 'Výber na použitie',
|
'field-selectionToUse-label': 'Výber na použitie',
|
||||||
'field-sort-label': 'Triediť podľa',
|
'field-sort-label': 'Triediť podľa',
|
||||||
|
'field-sort-order-label': 'Poradie triedenia',
|
||||||
'selectionToUse-allDocuments': 'Použite všetky dokumenty',
|
'selectionToUse-allDocuments': 'Použite všetky dokumenty',
|
||||||
'selectionToUse-currentFilters': 'Použiť aktuálne filtre',
|
'selectionToUse-currentFilters': 'Použiť aktuálne filtre',
|
||||||
'selectionToUse-currentSelection': 'Použiť aktuálny výber',
|
'selectionToUse-currentSelection': 'Použiť aktuálny výber',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const slTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Stran',
|
'field-page-label': 'Stran',
|
||||||
'field-selectionToUse-label': 'Izbor za uporabo',
|
'field-selectionToUse-label': 'Izbor za uporabo',
|
||||||
'field-sort-label': 'Razvrsti po',
|
'field-sort-label': 'Razvrsti po',
|
||||||
|
'field-sort-order-label': 'Razvrsti po vrstnem redu',
|
||||||
'selectionToUse-allDocuments': 'Uporabite vse dokumente',
|
'selectionToUse-allDocuments': 'Uporabite vse dokumente',
|
||||||
'selectionToUse-currentFilters': 'Uporabite trenutne filtre.',
|
'selectionToUse-currentFilters': 'Uporabite trenutne filtre.',
|
||||||
'selectionToUse-currentSelection': 'Uporabi trenutno izbiro',
|
'selectionToUse-currentSelection': 'Uporabi trenutno izbiro',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const svTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Sida',
|
'field-page-label': 'Sida',
|
||||||
'field-selectionToUse-label': 'Val att använda',
|
'field-selectionToUse-label': 'Val att använda',
|
||||||
'field-sort-label': 'Sortera efter',
|
'field-sort-label': 'Sortera efter',
|
||||||
|
'field-sort-order-label': 'Sortera i ordning',
|
||||||
'selectionToUse-allDocuments': 'Använd alla dokument',
|
'selectionToUse-allDocuments': 'Använd alla dokument',
|
||||||
'selectionToUse-currentFilters': 'Använd aktuella filter',
|
'selectionToUse-currentFilters': 'Använd aktuella filter',
|
||||||
'selectionToUse-currentSelection': 'Använd nuvarande urval',
|
'selectionToUse-currentSelection': 'Använd nuvarande urval',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const thTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'หน้า',
|
'field-page-label': 'หน้า',
|
||||||
'field-selectionToUse-label': 'การเลือกใช้',
|
'field-selectionToUse-label': 'การเลือกใช้',
|
||||||
'field-sort-label': 'เรียงตาม',
|
'field-sort-label': 'เรียงตาม',
|
||||||
|
'field-sort-order-label': 'เรียงลำดับตาม',
|
||||||
'selectionToUse-allDocuments': 'ใช้เอกสารทั้งหมด',
|
'selectionToUse-allDocuments': 'ใช้เอกสารทั้งหมด',
|
||||||
'selectionToUse-currentFilters': 'ใช้ตัวกรองปัจจุบัน',
|
'selectionToUse-currentFilters': 'ใช้ตัวกรองปัจจุบัน',
|
||||||
'selectionToUse-currentSelection': 'ใช้การเลือกปัจจุบัน',
|
'selectionToUse-currentSelection': 'ใช้การเลือกปัจจุบัน',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const trTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Sayfa',
|
'field-page-label': 'Sayfa',
|
||||||
'field-selectionToUse-label': 'Kullanılacak seçim',
|
'field-selectionToUse-label': 'Kullanılacak seçim',
|
||||||
'field-sort-label': 'Sırala',
|
'field-sort-label': 'Sırala',
|
||||||
|
'field-sort-order-label': 'Sıralama düzeni',
|
||||||
'selectionToUse-allDocuments': 'Tüm belgeleri kullanın',
|
'selectionToUse-allDocuments': 'Tüm belgeleri kullanın',
|
||||||
'selectionToUse-currentFilters': 'Mevcut filtreleri kullanın',
|
'selectionToUse-currentFilters': 'Mevcut filtreleri kullanın',
|
||||||
'selectionToUse-currentSelection': 'Mevcut seçimi kullanın',
|
'selectionToUse-currentSelection': 'Mevcut seçimi kullanın',
|
||||||
|
|||||||
@@ -58,6 +58,9 @@
|
|||||||
"field-sort-label": {
|
"field-sort-label": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"field-sort-order-label": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"no": {
|
"no": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@@ -96,6 +99,7 @@
|
|||||||
"field-name-label",
|
"field-name-label",
|
||||||
"field-selectionToUse-label",
|
"field-selectionToUse-label",
|
||||||
"field-sort-label",
|
"field-sort-label",
|
||||||
|
"field-sort-order-label",
|
||||||
"no",
|
"no",
|
||||||
"preview",
|
"preview",
|
||||||
"selectionToUse-allDocuments",
|
"selectionToUse-allDocuments",
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const ukTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Сторінка',
|
'field-page-label': 'Сторінка',
|
||||||
'field-selectionToUse-label': 'Вибір для використання',
|
'field-selectionToUse-label': 'Вибір для використання',
|
||||||
'field-sort-label': 'Сортувати за',
|
'field-sort-label': 'Сортувати за',
|
||||||
|
'field-sort-order-label': 'Сортувати за порядком',
|
||||||
'selectionToUse-allDocuments': 'Використовуйте всі документи',
|
'selectionToUse-allDocuments': 'Використовуйте всі документи',
|
||||||
'selectionToUse-currentFilters': 'Використовувати поточні фільтри',
|
'selectionToUse-currentFilters': 'Використовувати поточні фільтри',
|
||||||
'selectionToUse-currentSelection': 'Використовуйте поточний вибір',
|
'selectionToUse-currentSelection': 'Використовуйте поточний вибір',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const viTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': 'Trang',
|
'field-page-label': 'Trang',
|
||||||
'field-selectionToUse-label': 'Lựa chọn để sử dụng',
|
'field-selectionToUse-label': 'Lựa chọn để sử dụng',
|
||||||
'field-sort-label': 'Sắp xếp theo',
|
'field-sort-label': 'Sắp xếp theo',
|
||||||
|
'field-sort-order-label': 'Sắp xếp theo thứ tự',
|
||||||
'selectionToUse-allDocuments': 'Sử dụng tất cả các tài liệu',
|
'selectionToUse-allDocuments': 'Sử dụng tất cả các tài liệu',
|
||||||
'selectionToUse-currentFilters': 'Sử dụng bộ lọc hiện tại',
|
'selectionToUse-currentFilters': 'Sử dụng bộ lọc hiện tại',
|
||||||
'selectionToUse-currentSelection': 'Sử dụng lựa chọn hiện tại',
|
'selectionToUse-currentSelection': 'Sử dụng lựa chọn hiện tại',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const zhTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': '页面',
|
'field-page-label': '页面',
|
||||||
'field-selectionToUse-label': '选择范围',
|
'field-selectionToUse-label': '选择范围',
|
||||||
'field-sort-label': '排序方式',
|
'field-sort-label': '排序方式',
|
||||||
|
'field-sort-order-label': '排序顺序',
|
||||||
'selectionToUse-allDocuments': '使用所有文档',
|
'selectionToUse-allDocuments': '使用所有文档',
|
||||||
'selectionToUse-currentFilters': '使用当前过滤条件',
|
'selectionToUse-currentFilters': '使用当前过滤条件',
|
||||||
'selectionToUse-currentSelection': '使用当前选择',
|
'selectionToUse-currentSelection': '使用当前选择',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const zhTwTranslations: PluginDefaultTranslationsObject = {
|
|||||||
'field-page-label': '頁面',
|
'field-page-label': '頁面',
|
||||||
'field-selectionToUse-label': '使用的選取範圍',
|
'field-selectionToUse-label': '使用的選取範圍',
|
||||||
'field-sort-label': '排序方式',
|
'field-sort-label': '排序方式',
|
||||||
|
'field-sort-order-label': '排序順序',
|
||||||
'selectionToUse-allDocuments': '使用所有文件',
|
'selectionToUse-allDocuments': '使用所有文件',
|
||||||
'selectionToUse-currentFilters': '使用目前篩選條件',
|
'selectionToUse-currentFilters': '使用目前篩選條件',
|
||||||
'selectionToUse-currentSelection': '使用目前選取內容',
|
'selectionToUse-currentSelection': '使用目前選取內容',
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export type PluginLanguage = Language<{
|
|||||||
'field-page-label': string
|
'field-page-label': string
|
||||||
'field-selectionToUse-label': string
|
'field-selectionToUse-label': string
|
||||||
'field-sort-label': string
|
'field-sort-label': string
|
||||||
|
'field-sort-order-label': string
|
||||||
'selectionToUse-allDocuments': string
|
'selectionToUse-allDocuments': string
|
||||||
'selectionToUse-currentFilters': string
|
'selectionToUse-currentFilters': string
|
||||||
'selectionToUse-currentSelection': string
|
'selectionToUse-currentSelection': string
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
/** Remove a leading '-' from a sort value (e.g. "-title" -> "title") */
|
||||||
|
export const stripSortDash = (v?: null | string): string => (v ? v.replace(/^-/, '') : '')
|
||||||
|
|
||||||
|
/** Apply order to a base field (("title","desc") -> "-title") */
|
||||||
|
export const applySortOrder = (field: string, order: 'asc' | 'desc'): string =>
|
||||||
|
order === 'desc' ? `-${field}` : field
|
||||||
@@ -227,6 +227,60 @@ describe('@payloadcms/plugin-import-export', () => {
|
|||||||
).rejects.toThrow(/Limit/)
|
).rejects.toThrow(/Limit/)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('should export results sorted ASC by title when sort="title"', async () => {
|
||||||
|
let doc = await payload.create({
|
||||||
|
collection: 'exports',
|
||||||
|
user,
|
||||||
|
data: {
|
||||||
|
collectionSlug: 'pages',
|
||||||
|
format: 'csv',
|
||||||
|
sort: 'title',
|
||||||
|
where: {
|
||||||
|
or: [{ title: { contains: 'Title' } }, { title: { contains: 'Array' } }],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
doc = await payload.findByID({
|
||||||
|
collection: 'exports',
|
||||||
|
id: doc.id,
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(doc.filename).toBeDefined()
|
||||||
|
const expectedPath = path.join(dirname, './uploads', doc.filename as string)
|
||||||
|
const data = await readCSV(expectedPath)
|
||||||
|
|
||||||
|
expect(data[0].id).toBeDefined()
|
||||||
|
expect(data[0].title).toStrictEqual('Array 0')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should export results sorted DESC by title when sort="-title"', async () => {
|
||||||
|
let doc = await payload.create({
|
||||||
|
collection: 'exports',
|
||||||
|
user,
|
||||||
|
data: {
|
||||||
|
collectionSlug: 'pages',
|
||||||
|
format: 'csv',
|
||||||
|
sort: '-title',
|
||||||
|
where: {
|
||||||
|
or: [{ title: { contains: 'Title' } }, { title: { contains: 'Array' } }],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
doc = await payload.findByID({
|
||||||
|
collection: 'exports',
|
||||||
|
id: doc.id,
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(doc.filename).toBeDefined()
|
||||||
|
const expectedPath = path.join(dirname, './uploads', doc.filename as string)
|
||||||
|
const data = await readCSV(expectedPath)
|
||||||
|
|
||||||
|
expect(data[0].id).toBeDefined()
|
||||||
|
expect(data[0].title).toStrictEqual('Title 4')
|
||||||
|
})
|
||||||
|
|
||||||
it('should create a file for collection csv with draft data', async () => {
|
it('should create a file for collection csv with draft data', async () => {
|
||||||
const draftPage = await payload.create({
|
const draftPage = await payload.create({
|
||||||
collection: 'pages',
|
collection: 'pages',
|
||||||
|
|||||||
@@ -270,6 +270,7 @@ export interface Export {
|
|||||||
limit?: number | null;
|
limit?: number | null;
|
||||||
page?: number | null;
|
page?: number | null;
|
||||||
sort?: string | null;
|
sort?: string | null;
|
||||||
|
sortOrder?: ('asc' | 'desc') | null;
|
||||||
locale?: ('all' | 'en' | 'es' | 'de') | null;
|
locale?: ('all' | 'en' | 'es' | 'de') | null;
|
||||||
drafts?: ('yes' | 'no') | null;
|
drafts?: ('yes' | 'no') | null;
|
||||||
selectionToUse?: ('currentSelection' | 'currentFilters' | 'all') | null;
|
selectionToUse?: ('currentSelection' | 'currentFilters' | 'all') | null;
|
||||||
@@ -307,6 +308,7 @@ export interface ExportsTask {
|
|||||||
limit?: number | null;
|
limit?: number | null;
|
||||||
page?: number | null;
|
page?: number | null;
|
||||||
sort?: string | null;
|
sort?: string | null;
|
||||||
|
sortOrder?: ('asc' | 'desc') | null;
|
||||||
locale?: ('all' | 'en' | 'es' | 'de') | null;
|
locale?: ('all' | 'en' | 'es' | 'de') | null;
|
||||||
drafts?: ('yes' | 'no') | null;
|
drafts?: ('yes' | 'no') | null;
|
||||||
selectionToUse?: ('currentSelection' | 'currentFilters' | 'all') | null;
|
selectionToUse?: ('currentSelection' | 'currentFilters' | 'all') | null;
|
||||||
@@ -609,6 +611,7 @@ export interface ExportsSelect<T extends boolean = true> {
|
|||||||
limit?: T;
|
limit?: T;
|
||||||
page?: T;
|
page?: T;
|
||||||
sort?: T;
|
sort?: T;
|
||||||
|
sortOrder?: T;
|
||||||
locale?: T;
|
locale?: T;
|
||||||
drafts?: T;
|
drafts?: T;
|
||||||
selectionToUse?: T;
|
selectionToUse?: T;
|
||||||
@@ -637,6 +640,7 @@ export interface ExportsTasksSelect<T extends boolean = true> {
|
|||||||
limit?: T;
|
limit?: T;
|
||||||
page?: T;
|
page?: T;
|
||||||
sort?: T;
|
sort?: T;
|
||||||
|
sortOrder?: T;
|
||||||
locale?: T;
|
locale?: T;
|
||||||
drafts?: T;
|
drafts?: T;
|
||||||
selectionToUse?: T;
|
selectionToUse?: T;
|
||||||
@@ -729,6 +733,7 @@ export interface TaskCreateCollectionExport {
|
|||||||
limit?: number | null;
|
limit?: number | null;
|
||||||
page?: number | null;
|
page?: number | null;
|
||||||
sort?: string | null;
|
sort?: string | null;
|
||||||
|
sortOrder?: ('asc' | 'desc') | null;
|
||||||
locale?: ('all' | 'en' | 'es' | 'de') | null;
|
locale?: ('all' | 'en' | 'es' | 'de') | null;
|
||||||
drafts?: ('yes' | 'no') | null;
|
drafts?: ('yes' | 'no') | null;
|
||||||
selectionToUse?: ('currentSelection' | 'currentFilters' | 'all') | null;
|
selectionToUse?: ('currentSelection' | 'currentFilters' | 'all') | null;
|
||||||
|
|||||||
Reference in New Issue
Block a user