Skip to content

Commit f45477f

Browse files
Merge branch '2026.1' into 2026.x
2 parents 5e57378 + 4916a9e commit f45477f

758 files changed

Lines changed: 1773 additions & 30344 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

assets/js/src/core/modules/data-object/listing/decorator/column-configuration/view-layer/components/grid/hooks/use-grid-options/tabs/grid-config/forms/advanced-column-form/preview/preview-item-selection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const PreviewItemSelection = (): React.JSX.Element => {
2828
},
2929
config: {
3030
objects: {
31-
allowedTypes: [selectedClassDefinition?.name ?? '']
31+
allowedClasses: selectedClassDefinition?.name !== undefined ? [selectedClassDefinition.name] : undefined
3232
}
3333
},
3434

assets/js/src/core/modules/reports/reports-editor/components/report-configuration/components/general-settings/general-settings.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { useTranslation } from 'react-i18next'
1313
import { FormKit } from '@Pimcore/components/form/form-kit'
1414
import { Form } from '@Pimcore/components/form/form'
1515
import { Input } from '@Pimcore/components/input/input'
16+
import { IconSelector } from '@Pimcore/components/icon-selector/icon-selector'
1617
import { Switch } from '@Pimcore/components/switch/switch'
1718

1819
export const GeneralSettings = (): React.JSX.Element => {
@@ -32,14 +33,24 @@ export const GeneralSettings = (): React.JSX.Element => {
3233
<FormKit.Panel title={ t('reports.editor.general-settings.title') }>
3334
{renderInputItem({ label: t('reports.editor.general-settings.name-label'), name: 'name', disabled: true })}
3435
{renderInputItem({ label: t('reports.editor.general-settings.display-name-label'), name: 'niceName' })}
35-
{renderInputItem({ label: t('reports.editor.general-settings.icon-class-label'), name: 'iconClass' })}
36+
<Form.Item
37+
label={ t('reports.editor.general-settings.icon-class-label') }
38+
name="iconClass"
39+
>
40+
<IconSelector />
41+
</Form.Item>
3642
{renderInputItem({
3743
label: t('reports.editor.general-settings.group-label'),
3844
name: 'group',
3945
tooltip: t('reports.editor.general-settings.group-tooltip')
4046
})}
4147
{renderInputItem({ label: t('reports.editor.general-settings.report-class-label'), name: 'reportClass' })}
42-
{renderInputItem({ label: t('reports.editor.general-settings.group-icon-class-label'), name: 'groupIconClass' })}
48+
<Form.Item
49+
label={ t('reports.editor.general-settings.group-icon-class-label') }
50+
name="groupIconClass"
51+
>
52+
<IconSelector />
53+
</Form.Item>
4354
<Form.Item name="menuShortcut">
4455
<Switch labelRight={ t('reports.editor.general-settings.shortcut-menu-label') } />
4556
</Form.Item>

assets/js/src/core/modules/reports/reports-editor/components/report-configuration/helpers.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ import { castArray, isNull } from 'lodash'
1212
import { type ReportFormData } from '@Pimcore/modules/reports/reports-editor/hooks/use-report-form-state'
1313
import {
1414
type BundleCustomReportsColumnConfigurationUpdateData,
15+
type BundleCustomReportUpdate,
1516
type CustomReportsConfigUpdateApiArg
1617
} from '@Pimcore/modules/reports/custom-reports-api-slice.gen'
18+
import { denormalizeIcon } from '@Pimcore/utils/normalize-icon'
1719

1820
export const normalizeDataSourceConfig = (data: ReportFormData): {
1921
dataSourceConfig: CustomReportsConfigUpdateApiArg['bundleCustomReportUpdate']['dataSourceConfig']
@@ -58,3 +60,15 @@ export const normalizeColumnConfigurations = (data: ReportFormData): INormalizeC
5860
columnConfigurations: cleanedColumns
5961
}
6062
}
63+
64+
interface INormalizeIconFieldsReturn {
65+
iconClass: BundleCustomReportUpdate['iconClass']
66+
groupIconClass: BundleCustomReportUpdate['groupIconClass']
67+
}
68+
69+
export const normalizeIconFields = (data: ReportFormData): INormalizeIconFieldsReturn => {
70+
return {
71+
iconClass: denormalizeIcon(data?.iconClass) ?? '',
72+
groupIconClass: denormalizeIcon(data?.groupIconClass) ?? ''
73+
}
74+
}

assets/js/src/core/modules/reports/reports-editor/components/report-configuration/report-configuration.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ import { Permissions } from '@Pimcore/modules/reports/reports-editor/components/
3232
import {
3333
normalizeChartData,
3434
normalizeColumnConfigurations,
35-
normalizeDataSourceConfig
35+
normalizeDataSourceConfig,
36+
normalizeIconFields
3637
} from '@Pimcore/modules/reports/reports-editor/components/report-configuration/helpers'
3738
import { Form } from '@Pimcore/components/form/form'
3839
import { loadReportsMenuItems } from '@Pimcore/modules/reports/utils/reports-loader'
@@ -104,6 +105,7 @@ export const ReportConfiguration = ({ report, isActive, modifiedReports, setModi
104105

105106
const bundleCustomReportUpdateData: BundleCustomReportUpdate = {
106107
...currentData,
108+
...normalizeIconFields(currentData),
107109
...normalizeDataSourceConfig(currentData),
108110
...normalizeChartData(currentData),
109111
...normalizeColumnConfigurations(currentData),

assets/js/src/core/modules/reports/reports-editor/hooks/use-report-form-state.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,26 @@
1010

1111
import { useMemo, useState } from 'react'
1212
import { isEqual, isNull } from 'lodash'
13+
import { type ElementIcon } from '@Pimcore/components/icon/icon'
1314
import { type BundleCustomReportsDetails } from '@Pimcore/modules/reports/custom-reports-api-slice.gen'
15+
import { normalizeIcon } from '@Pimcore/utils/normalize-icon'
1416

15-
export type ReportFormData = BundleCustomReportsDetails
17+
export type ReportFormData = Omit<BundleCustomReportsDetails, 'iconClass' | 'groupIconClass'> & {
18+
iconClass: ElementIcon | null
19+
groupIconClass: ElementIcon | null
20+
}
21+
22+
export const normalizeReportFormData = (data: BundleCustomReportsDetails): ReportFormData => ({
23+
...data,
24+
iconClass: normalizeIcon(data?.iconClass),
25+
groupIconClass: normalizeIcon(data?.groupIconClass)
26+
})
1627

1728
interface IUseReportFormStateReturn {
1829
initialData: ReportFormData | null
1930
currentData: ReportFormData | null
2031
isDirty: boolean
21-
initializeForm: (data: ReportFormData) => void
32+
initializeForm: (data: BundleCustomReportsDetails) => void
2233
updateFormData: (data: Partial<ReportFormData>) => void
2334
markFormSaved: () => void
2435
}
@@ -27,9 +38,11 @@ export const useReportFormState = (): IUseReportFormStateReturn => {
2738
const [initialData, setInitialData] = useState<ReportFormData | null>(null)
2839
const [currentData, setCurrentData] = useState<ReportFormData | null>(null)
2940

30-
const initializeForm = (data: ReportFormData): void => {
31-
setInitialData({ ...data })
32-
setCurrentData({ ...data })
41+
const initializeForm = (data: BundleCustomReportsDetails): void => {
42+
const normalizedData = normalizeReportFormData(data)
43+
44+
setInitialData({ ...normalizedData })
45+
setCurrentData({ ...normalizedData })
3346
}
3447

3548
const updateFormData = (data: Partial<ReportFormData>): void => {

doc/03_Configuration_and_Administration/01_Configuration/04_Additional_CSS_or_JS_Files.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@ title: Including Additional CSS or JS Files
77
Pimcore Studio plugins typically require a frontend build and entry point files.
88
For details, refer to the [Getting started with your first plugin guide](../../04_Extending/01_Getting_Started_with_Your_First_Plugin.md).
99

10-
However, if you want to include additional CSS or JS files that are not part of the frontend build (e.g., to add a basic CSS class or include an external script), configure them in the config tree:
10+
However, if you want to include additional CSS or JS files that are not part of the frontend build (e.g., to add a basic CSS class or include an external script), configure them in the config tree.
11+
12+
> **Important — use absolute paths**
13+
>
14+
> The values configured below are rendered verbatim into `<link href="...">` and `<script src="...">` tags.
15+
> Always provide an **absolute, web-accessible URL path** (starting with `/`) or a full external URL — relative values like `my-custom-css.css` will not resolve correctly.
16+
>
17+
> Typical sources for these files:
18+
> - **Files shipped by a Pimcore bundle:** place them in the bundle's `public/` directory and run `bin/console assets:install --symlink --relative`. They are then served from `/bundles/<bundle-name>/...` (the bundle name is the lowercased class name without the `Bundle` suffix, e.g. `MyCustomBundle``/bundles/mycustom/`).
19+
> - **Files in the application's `public/` directory:** they are served from the path they live at, e.g. `public/static/custom.css``/static/custom.css`.
20+
> - **External resources:** provide the full URL, e.g. `https://cdn.example.com/lib.js`.
1121
1222
## Regular Pimcore Studio Resources
1323

@@ -17,9 +27,11 @@ For the main Pimcore Studio interface:
1727
pimcore_studio_ui:
1828
static_resources:
1929
css:
20-
- my-custom-css.css
30+
- /bundles/mycustom/css/my-custom-css.css
31+
- /static/global-overrides.css
2132
js:
22-
- my-custom-js.js
33+
- /bundles/mycustom/js/my-custom-js.js
34+
- https://cdn.example.com/some-lib.min.js
2335
```
2436
2537
## Document Editmode Resources
@@ -31,9 +43,9 @@ pimcore_studio_ui:
3143
static_resources:
3244
editmode:
3345
css:
34-
- my-editmode-styles.css
46+
- /bundles/mycustom/css/my-editmode-styles.css
3547
js:
36-
- my-editmode-scripts.js
48+
- /bundles/mycustom/js/my-editmode-scripts.js
3749
```
3850
3951
## Multi-Bundle Configuration
@@ -45,21 +57,21 @@ When multiple bundles define static resources, they will be automatically merged
4557
pimcore_studio_ui:
4658
static_resources:
4759
css:
48-
- bundle-a-styles.css
60+
- /bundles/bundlea/css/bundle-a-styles.css
4961
editmode:
5062
css:
51-
- bundle-a-editmode.css
63+
- /bundles/bundlea/css/bundle-a-editmode.css
5264
```
5365
5466
**Bundle B:**
5567
```yaml
5668
pimcore_studio_ui:
5769
static_resources:
5870
css:
59-
- bundle-b-styles.css
71+
- /bundles/bundleb/css/bundle-b-styles.css
6072
editmode:
6173
css:
62-
- bundle-b-editmode.css
74+
- /bundles/bundleb/css/bundle-b-editmode.css
6375
```
6476
6577
**Result:** All files from both bundles will be included in their respective contexts, with duplicates automatically removed.

doc/04_Extending/01_Getting_Started_with_Your_First_Plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Plugins provide additional tools, widgets, or settings that enhance the user exp
1010

1111
## Getting started
1212

13-
Create your Pimcore Studio Plugin either in a [Pimcore Bundle](https://pimcore.com/docs/platform/Pimcore/Extending_Pimcore/Bundle_Developers_Guide/)
13+
Create your Pimcore Studio Plugin either in a [Pimcore Bundle](https://docs.pimcore.com/platform/Pimcore/Extending_Pimcore/Pimcore_Bundle_Developers_Guide/)
1414
(the way to go when your Studio Plugin should be reused in multiple Pimcore installations), or directly in your Pimcore App
1515
without creating a Pimcore Bundle.
1616

public/build/2fbb588f-0173-4989-b4c7-2ffd097b60c0/documentEditorIframe.html renamed to public/build/25b22eff-b09b-4b28-a522-6121613c8f96/documentEditorIframe.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/25b22eff-b09b-4b28-a522-6121613c8f96/entrypoints.json

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/2fbb588f-0173-4989-b4c7-2ffd097b60c0/exposeRemote.js renamed to public/build/25b22eff-b09b-4b28-a522-6121613c8f96/exposeRemote.js

File renamed without changes.

0 commit comments

Comments
 (0)