Skip to content

Commit 74ed3d1

Browse files
committed
Merge branch '2026.1' into 2026.x
2 parents b04ea20 + bc29177 commit 74ed3d1

33 files changed

Lines changed: 1296 additions & 78 deletions

assets/js/src/core/modules/classification-store-config/components/store-editor/tabs/groups/key-selection-dialog.tsx

Lines changed: 59 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
* @license Pimcore Open Core License (POCL)
99
*/
1010

11-
import React, { useEffect, useMemo, useState } from 'react'
11+
import React, { useCallback, useEffect, useMemo, useState } from 'react'
1212
import { useTranslation } from 'react-i18next'
1313
import { Modal, Input } from 'antd'
1414
import { Grid } from '@Pimcore/components/grid/grid'
1515
import { Content } from '@Pimcore/components/content/content'
16-
import { createColumnHelper } from '@tanstack/react-table'
17-
import { type RowSelectionState } from '@tanstack/react-table'
16+
import { Pagination } from '@Pimcore/components/pagination/pagination'
17+
import { createColumnHelper, type RowSelectionState, type SortingState } from '@tanstack/react-table'
1818
import {
1919
type ClassificationStoreConfigurationKeyDetail,
2020
useClassificationStoreConfigurationKeyCollectionQuery
@@ -40,34 +40,57 @@ export const KeySelectionDialog = ({
4040

4141
const [searchTerm, setSearchTerm] = useState('')
4242
const [selectedRows, setSelectedRows] = useState<RowSelectionState>({})
43+
const [sorting, setSorting] = useState<SortingState>([])
44+
const [page, setPage] = useState<number>(1)
45+
const [pageSize, setPageSize] = useState<number>(20)
46+
47+
const onSortingChange = useCallback((newSorting: SortingState) => {
48+
setSorting(newSorting)
49+
setPage(1)
50+
}, [])
51+
52+
const queryArgs = useMemo(() => ({
53+
storeId,
54+
body: {
55+
filters: {
56+
page,
57+
pageSize,
58+
columnFilters: searchTerm.trim().length > 0
59+
? [{ type: 'search', filterValue: searchTerm.trim() }]
60+
: [],
61+
...(sorting.length > 0
62+
? {
63+
sortFilter: {
64+
key: sorting[0].id,
65+
direction: sorting[0].desc ? 'DESC' : 'ASC'
66+
}
67+
}
68+
: {})
69+
}
70+
}
71+
}), [storeId, page, pageSize, searchTerm, sorting])
4372

4473
const { data, isLoading } = useClassificationStoreConfigurationKeyCollectionQuery(
45-
{ storeId, body: { filters: { page: 1, pageSize: 9999 } } },
74+
queryArgs,
4675
{ skip: !open }
4776
)
4877

49-
const allKeys = data?.items ?? []
78+
const total = data?.totalItems ?? 0
5079

51-
// Reset selection and search when dialog opens
80+
// Reset selection, search and pagination when dialog opens
5281
useEffect(() => {
5382
if (open) {
5483
setSelectedRows({})
5584
setSearchTerm('')
85+
setSorting([])
86+
setPage(1)
5687
}
5788
}, [open])
5889

5990
const availableKeys = useMemo(() => {
6091
const excludedSet = new Set(excludedKeyIds)
61-
return allKeys.filter((k) => {
62-
if (excludedSet.has(k.id)) return false
63-
if (searchTerm.trim() === '') return true
64-
const term = searchTerm.trim().toLowerCase()
65-
return (
66-
k.name.toLowerCase().includes(term) ||
67-
(k.description ?? '').toLowerCase().includes(term)
68-
)
69-
})
70-
}, [allKeys, excludedKeyIds, searchTerm])
92+
return (data?.items ?? []).filter((k) => !excludedSet.has(k.id))
93+
}, [data?.items, excludedKeyIds])
7194

7295
const columnHelper = createColumnHelper<ClassificationStoreConfigurationKeyDetail>()
7396

@@ -117,7 +140,10 @@ export const KeySelectionDialog = ({
117140
vertical
118141
>
119142
<Input.Search
120-
onChange={ (e) => { setSearchTerm(e.target.value) } }
143+
onChange={ (e) => {
144+
setSearchTerm(e.target.value)
145+
setPage(1)
146+
} }
121147
placeholder={ t('classification-store.search-keys') }
122148
value={ searchTerm }
123149
/>
@@ -130,12 +156,28 @@ export const KeySelectionDialog = ({
130156
columns={ columns }
131157
data={ availableKeys }
132158
enableMultipleRowSelection
159+
enableSorting
133160
isLoading={ isLoading }
161+
manualSorting
134162
onSelectedRowsChange={ setSelectedRows }
163+
onSortingChange={ onSortingChange }
135164
selectedRows={ selectedRows }
136165
setRowId={ (row: ClassificationStoreConfigurationKeyDetail) => row.id !== undefined ? String(row.id) : undefined as unknown as string }
166+
sorting={ sorting }
137167
/>
138168
</Content>
169+
170+
<Pagination
171+
current={ page }
172+
defaultPageSize={ pageSize }
173+
onChange={ (newPage, newPageSize) => {
174+
setPage(newPage)
175+
setPageSize(newPageSize)
176+
} }
177+
showSizeChanger
178+
showTotal={ (total) => t('pagination.show-total', { total }) }
179+
total={ total }
180+
/>
139181
</Flex>
140182
</Modal>
141183
)

doc/01_Architecture_Overview/01_SDK_Overview/01_UI_Components_and_Storybook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ Explore our [Storybook](../../05_Development_Details/01_Studio_UI_Core_Developme
2828

2929
## Source
3030

31-
- [Component Overview](https://github.com/pimcore/studio-ui-bundle/tree/1.x/assets/js/src/core/components)
31+
- [Component Overview](https://github.com/pimcore/studio-ui-bundle/tree/2026.x/assets/js/src/core/components)

doc/01_Architecture_Overview/01_SDK_Overview/02_Plugin_Architecture_Plugins_Modules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ onStartup: ({ moduleSystem }): void => {
4040
}
4141
```
4242

43-
For more details on plugins, refer to the [Plugin system source](https://github.com/pimcore/studio-ui-bundle/blob/1.x/assets/js/src/core/app/plugin-system/plugin-system.ts).
43+
For more details on plugins, refer to the [Plugin system source](https://github.com/pimcore/studio-ui-bundle/blob/2026.x/assets/js/src/core/app/plugin-system/plugin-system.ts).
4444

4545
---
4646

@@ -66,4 +66,4 @@ export const ImageSliderModule: AbstractModule = {
6666
}
6767
```
6868

69-
For more details, refer to the [Module system source](https://github.com/pimcore/studio-ui-bundle/blob/1.x/assets/js/src/core/app/module-system/module-system.ts).
69+
For more details, refer to the [Module system source](https://github.com/pimcore/studio-ui-bundle/blob/2026.x/assets/js/src/core/app/module-system/module-system.ts).

doc/01_Architecture_Overview/01_SDK_Overview/03_Services_and_Dependency_Injection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ The DI container is used in multiple examples. For instance, refer to the [How t
7676

7777
### Source
7878

79-
- [Core services](https://github.com/pimcore/studio-ui-bundle/blob/1.x/assets/js/src/core/app/config/services/index.ts)
79+
- [Core services](https://github.com/pimcore/studio-ui-bundle/blob/2026.x/assets/js/src/core/app/config/services/index.ts)

doc/01_Architecture_Overview/01_SDK_Overview/04_Component_Registry.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ This configuration ensures that components are registered in the correct context
6767
### Default Configuration
6868

6969
The default configuration is defined in
70-
[`component-config.ts`](https://github.com/pimcore/studio-ui-bundle/blob/1.x/assets/js/src/core/modules/app/component-registry/component-config.ts).
70+
[`component-config.ts`](https://github.com/pimcore/studio-ui-bundle/blob/2026.x/assets/js/src/core/modules/app/component-registry/component-config.ts).
7171
It organizes components into a hierarchical structure based on their context,
7272
such as `asset`, `dataObject`, or `wysiwyg`.
7373

@@ -116,7 +116,7 @@ componentRegistry.registerConfig({
116116
})
117117
```
118118

119-
Refer to the [Component Configuration Source](https://github.com/pimcore/studio-ui-bundle/blob/1.x/assets/js/src/core/modules/app/component-registry/component-config.ts)
119+
Refer to the [Component Configuration Source](https://github.com/pimcore/studio-ui-bundle/blob/2026.x/assets/js/src/core/modules/app/component-registry/component-config.ts)
120120
for the complete default configuration and available single components and slots.
121121
This file lists the extension points available in Pimcore Studio via the component registry.
122122

doc/01_Architecture_Overview/01_SDK_Overview/05_Widget_Manager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,4 @@ refer to the [Widget Manager example](../../04_Extending/02_Plugin_Development_E
192192
193193
### Source
194194
195-
- [Widget Manager Hooks](https://github.com/pimcore/studio-ui-bundle/tree/1.x/assets/js/src/core/modules/widget-manager/hooks)
195+
- [Widget Manager Hooks](https://github.com/pimcore/studio-ui-bundle/tree/2026.x/assets/js/src/core/modules/widget-manager/hooks)

doc/01_Architecture_Overview/01_SDK_Overview/06_Context_Menu_Registry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ contextMenuRegistry.registerToSlot(contextMenuConfig.assetListGrid.name, {
7070
})
7171
```
7272

73-
The [Context Menu Configuration Source](https://github.com/pimcore/studio-ui-bundle/blob/1.x/assets/js/src/core/modules/app/context-menu-registry/context-menu-config.ts) contains all available slot names and their priority configurations for consistent referencing.
73+
The [Context Menu Configuration Source](https://github.com/pimcore/studio-ui-bundle/blob/2026.x/assets/js/src/core/modules/app/context-menu-registry/context-menu-config.ts) contains all available slot names and their priority configurations for consistent referencing.
7474

7575
## Modifying Existing Context Menu Items
7676

doc/01_Architecture_Overview/01_SDK_Overview/07_Dynamic_Types.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,44 +18,44 @@ handles them. They serve as boilerplate for creating or extending types by cover
1818
implementation details, from the edit view to versions and listings.
1919

2020
#### Source
21-
- [Data types](https://github.com/pimcore/studio-ui-bundle/tree/1.x/assets/js/src/core/modules/element/dynamic-types/definitions/objects/data-related)
22-
- [Layout types](https://github.com/pimcore/studio-ui-bundle/tree/1.x/assets/js/src/core/modules/element/dynamic-types/definitions/objects/layout-related)
21+
- [Data types](https://github.com/pimcore/studio-ui-bundle/tree/2026.x/assets/js/src/core/modules/element/dynamic-types/definitions/objects/data-related)
22+
- [Layout types](https://github.com/pimcore/studio-ui-bundle/tree/2026.x/assets/js/src/core/modules/element/dynamic-types/definitions/objects/layout-related)
2323

2424
### Meta-Data
2525
Dynamic types define how asset metadata appears in different views,
2626
such as grids and version comparisons.
2727

2828
#### Source
29-
- [Meta-data](https://github.com/pimcore/studio-ui-bundle/tree/1.x/assets/js/src/core/modules/element/dynamic-types/definitions/meta-data)
29+
- [Meta-data](https://github.com/pimcore/studio-ui-bundle/tree/2026.x/assets/js/src/core/modules/element/dynamic-types/definitions/meta-data)
3030

3131
### Grid-Cells
3232
For grid cells, dynamic types describe how each cell renders its value and whether it supports
3333
inline editing. Grid cell types range from simple text to images and other complex types.
3434

3535
#### Source
36-
- [Grid cells](https://github.com/pimcore/studio-ui-bundle/tree/1.x/assets/js/src/core/modules/element/dynamic-types/definitions/grid-cell)
36+
- [Grid cells](https://github.com/pimcore/studio-ui-bundle/tree/2026.x/assets/js/src/core/modules/element/dynamic-types/definitions/grid-cell)
3737

3838
### Assets
3939
Defines which asset types (image, audio, folder, etc.) are available in Pimcore Studio.
4040

4141
#### Source
4242

43-
- [Assets](https://github.com/pimcore/studio-ui-bundle/tree/1.x/assets/js/src/core/modules/element/dynamic-types/definitions/asset)
43+
- [Assets](https://github.com/pimcore/studio-ui-bundle/tree/2026.x/assets/js/src/core/modules/element/dynamic-types/definitions/asset)
4444

4545
### Batch-Edit
4646
In the context of batch editing, dynamic types specify how form fields should behave.
4747

4848
#### Source
4949

50-
- [Batch-edit](https://github.com/pimcore/studio-ui-bundle/tree/1.x/assets/js/src/core/modules/element/dynamic-types/definitions/batch-edits)
50+
- [Batch-edit](https://github.com/pimcore/studio-ui-bundle/tree/2026.x/assets/js/src/core/modules/element/dynamic-types/definitions/batch-edits)
5151

5252
### Field-Filters
5353
Dynamic types define filter behavior within grids,
5454
mapping each data or asset metadata type to a suitable filter UI component.
5555

5656
#### Source
5757

58-
- [Field-filters](https://github.com/pimcore/studio-ui-bundle/tree/1.x/assets/js/src/core/modules/element/dynamic-types/definitions/field-filters)
58+
- [Field-filters](https://github.com/pimcore/studio-ui-bundle/tree/2026.x/assets/js/src/core/modules/element/dynamic-types/definitions/field-filters)
5959

6060
## Overriding Dynamic Types
6161

doc/01_Architecture_Overview/01_SDK_Overview/08_RTK_Query_API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ and fewer runtime errors. These slices integrate with
2525

2626
Import the generated API slices directly from the SDK.
2727
For an overview of available imports, see the
28-
[SDK API directory](https://github.com/pimcore/studio-ui-bundle/tree/1.x/assets/js/src/sdk/api).
28+
[SDK API directory](https://github.com/pimcore/studio-ui-bundle/tree/2026.x/assets/js/src/sdk/api).
2929

3030
:::tip
3131
The structure of the API imports mirrors the folder structure of the linked SDK API directory.

doc/01_Architecture_Overview/01_SDK_Overview/09_SDK_Imports.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ These imports act as modules that encapsulate specific functionalities or utilit
99

1010
The SDK defines the public API of Studio, meaning that not all components of the UI are exported by default. Only the components and modules intended to be used for extensions are made available through the SDK.
1111

12-
For a full overview of all available import sources, you can refer to the [GitHub repository](https://github.com/pimcore/studio-ui-bundle/tree/1.x/assets/js/src/sdk).
12+
For a full overview of all available import sources, you can refer to the [GitHub repository](https://github.com/pimcore/studio-ui-bundle/tree/2026.x/assets/js/src/sdk).
1313

1414
## Folder Structure and Import Paths
1515

16-
The folder structure in the SDK mirrors the import paths. Each folder and `index.ts` in the [SDK](https://github.com/pimcore/studio-ui-bundle/tree/1.x/assets/js/src/sdk) corresponds directly to an importable module. For example, if there is a file located at `sdk/api/asset/index.ts`, you can import it in your project as follows:
16+
The folder structure in the SDK mirrors the import paths. Each folder and `index.ts` in the [SDK](https://github.com/pimcore/studio-ui-bundle/tree/2026.x/assets/js/src/sdk) corresponds directly to an importable module. For example, if there is a file located at `sdk/api/asset/index.ts`, you can import it in your project as follows:
1717

1818
```typescript
1919
import { useAssetGetByIdQuery } from '@pimcore/studio-ui-bundle/api/asset';

0 commit comments

Comments
 (0)