@pimcore/studio-ui-bundle 2026.2.0-RC1 → 2026.2.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/bundler/build-id.ts +79 -0
- package/bundler/package-build.cjs +145 -0
- package/dist/build/rsbuild/entrypoints.js +4 -3
- package/dist/build/rsbuild/entrypoints.js.LICENSE.txt +9 -0
- package/dist/build/types/src/core/components/accordion/accordion.stories.d.ts +13 -0
- package/dist/build/types/src/core/components/date-picker/date-picker.stories.d.ts +1 -0
- package/dist/build/types/src/core/components/editable-empty-placeholder/editable-empty-placeholder.d.ts +1 -1
- package/dist/build/types/src/core/components/editable-empty-placeholder/editable-empty-placeholder.stories.d.ts +0 -4
- package/dist/build/types/src/core/components/grid/grid.stories.d.ts +7 -0
- package/dist/build/types/src/core/{modules/data-object/listing/batch-actions/batch-actions.styles.d.ts → components/icon-selector/utils/element-icon.test.d.ts} +1 -12
- package/dist/build/types/src/core/components/image-picker/image-picker.stories.d.ts +38 -0
- package/dist/build/types/src/core/components/image-preview/image-preview.stories.d.ts +28 -0
- package/dist/build/types/src/core/components/modal/form-modal/form-modal.stories.d.ts +8 -0
- package/dist/build/types/src/core/components/modal/form-modal/hooks/form-modal-types.d.ts +47 -0
- package/dist/build/types/src/core/components/modal/form-modal/hooks/use-form-modal.d.ts +2 -37
- package/dist/build/types/src/core/lib/event-bus/event-types.d.ts +1 -0
- package/dist/build/types/src/core/modules/app/component-registry/component-config.d.ts +6 -0
- package/dist/build/types/src/core/modules/app/theme/constants/theme-algorithms.d.ts +17 -0
- package/dist/build/types/src/core/modules/app/theme/constants/theme-ids.d.ts +2 -1
- package/dist/build/types/src/core/modules/app/theme/dynamic-theme-provider.d.ts +12 -0
- package/dist/build/types/src/core/modules/app/theme/dynamic-types/definitions/studio-default-light/dynamic-type-theme-studio-default-light.d.ts +5 -7
- package/dist/build/types/src/core/modules/app/theme/dynamic-types/registry/dynamic-type-theme-registry.d.ts +11 -1
- package/dist/build/types/src/core/modules/app/theme/dynamic-types/registry/dynamic-type-theme-registry.test.d.ts +10 -0
- package/dist/build/types/src/core/modules/app/theme/theme-provider.d.ts +12 -2
- package/dist/build/types/src/core/modules/app/theme/theme-slice.d.ts +15 -0
- package/dist/build/types/src/core/modules/app/theme/theme-slice.test.d.ts +10 -0
- package/dist/build/types/src/core/modules/asset/actions/batch-delete/use-batch-delete.d.ts +13 -0
- package/dist/build/types/src/core/modules/auth/user/user-api-slice.gen.d.ts +8 -0
- package/dist/build/types/src/core/modules/data-object/actions/batch-delete/use-batch-delete.d.ts +13 -0
- package/dist/build/types/src/core/modules/data-object/data-object-api-slice-enhanced.d.ts +1 -0
- package/dist/build/types/src/core/modules/data-object/data-object-api-slice.gen.d.ts +194 -0
- package/dist/build/types/src/core/modules/element/actions/delete/use-batch-delete-confirm.d.ts +20 -0
- package/dist/build/types/src/core/modules/element/dynamic-types/definitions/field-filters/utils/date-filter-transform.d.ts +27 -0
- package/dist/build/types/src/core/modules/element/listing/decorators/row-selection/row-selection-decorator.d.ts +2 -0
- package/dist/build/types/src/core/modules/notifications/filters/filters.d.ts +17 -0
- package/dist/build/types/src/core/modules/notifications/filters/hooks/use-notifications-field-filter-editor.d.ts +19 -0
- package/dist/build/types/src/core/modules/notifications/filters/types.d.ts +37 -0
- package/dist/build/types/src/core/modules/notifications/notifications-sidebar/components/filter-tab/filter-tab.d.ts +11 -0
- package/dist/build/types/src/core/modules/notifications/notifications-sidebar/notifications-sidebar.d.ts +11 -0
- package/dist/build/types/src/core/modules/recycle-bin/filters/filters.d.ts +18 -0
- package/dist/build/types/src/core/modules/recycle-bin/filters/hooks/use-recycle-bin-field-filter-editor.d.ts +19 -0
- package/dist/build/types/src/core/modules/recycle-bin/filters/types.d.ts +37 -0
- package/dist/build/types/src/core/modules/recycle-bin/recycle-bin-sidebar/components/filter-tab/filter-tab.d.ts +11 -0
- package/dist/build/types/src/core/modules/recycle-bin/recycle-bin-sidebar/recycle-bin-sidebar.d.ts +11 -0
- package/dist/build/types/src/core/modules/translations/filters/filters.d.ts +17 -0
- package/dist/build/types/src/core/modules/translations/filters/hooks/use-translation-filter-columns.d.ts +12 -0
- package/dist/build/types/src/core/modules/translations/filters/hooks/use-translations-field-filter-editor.d.ts +19 -0
- package/dist/build/types/src/core/modules/translations/filters/types.d.ts +32 -0
- package/dist/build/types/src/core/modules/translations/translations-sidebar/components/filter-tab/filter-tab.d.ts +11 -0
- package/dist/build/types/src/core/modules/translations/translations-sidebar/translations-sidebar.d.ts +11 -0
- package/dist/build/types/src/core/modules/user/management/detail/tabs/settings/components/form/appearance-branding-accordion.d.ts +30 -0
- package/dist/build/types/src/core/modules/user/user-management-slice.d.ts +9 -0
- package/dist/build/types/src/core/modules/widget-manager/services/widget-registry.d.ts +10 -0
- package/dist/build/types/src/core/modules/widget-manager/services/widget-registry.test.d.ts +10 -0
- package/dist/build/types/src/core/utils/files.d.ts +9 -0
- package/dist/build/types/src/core/utils/files.test.d.ts +10 -0
- package/dist/build/types/src/core/utils/normalize-icon.d.ts +2 -0
- package/dist/build/types/src/core/utils/normalize-icon.test.d.ts +10 -0
- package/dist/build/types/src/sdk/components/index.d.ts +4 -0
- package/dist/build/types/src/sdk/modules/app/index.d.ts +8 -0
- package/dist/build/types/src/sdk/modules/element/index.d.ts +1 -0
- package/package.json +14 -2
- /package/dist/build/types/src/core/modules/{asset/listing/batch-actions/batch-actions.styles.d.ts → element/actions/delete/use-batch-delete-confirm.styles.d.ts} +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This source file is available under the terms of the
|
|
3
|
+
* Pimcore Open Core License (POCL)
|
|
4
|
+
* Full copyright and license information is available in
|
|
5
|
+
* LICENSE.md which is distributed with this source code.
|
|
6
|
+
*
|
|
7
|
+
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
+
* @license Pimcore Open Core License (POCL)
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { createHash, type Hash } from 'node:crypto';
|
|
12
|
+
import fs from 'node:fs';
|
|
13
|
+
import path from 'node:path';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Deterministic build id derived from a source tree (excluding installed dependencies and
|
|
17
|
+
* generated output). It is a sha256 over every file's normalized relative path + content, so
|
|
18
|
+
* identical source — including configs (rsbuild, tsconfig, …), fonts and the API spec —
|
|
19
|
+
* yields the same id regardless of checkout location, and any change to them bumps it. Both
|
|
20
|
+
* the SDK and app builds of one `build-app` run resolve the same id (used as the archive
|
|
21
|
+
* filename and the grouping key).
|
|
22
|
+
*
|
|
23
|
+
* Shared across bundles: the source dir is passed by the caller so consumers installed via
|
|
24
|
+
* npm (e.g. collab-bundle importing this via `@pimcore/studio-ui-bundle/bundler/build-id`)
|
|
25
|
+
* can point it at their own assets root. If omitted, defaults to the parent of this file —
|
|
26
|
+
* correct only when the script runs from within the studio-ui-bundle source repo.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
// Installed dependencies and generated output — not part of the source fingerprint.
|
|
30
|
+
const EXCLUDED_DIRS = new Set(['node_modules', 'dist']);
|
|
31
|
+
|
|
32
|
+
const cache = new Map<string, string>();
|
|
33
|
+
|
|
34
|
+
function hashTree(dir: string, base: string, hash: Hash): void {
|
|
35
|
+
const entries = fs
|
|
36
|
+
.readdirSync(dir, { withFileTypes: true })
|
|
37
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
38
|
+
|
|
39
|
+
for (const entry of entries) {
|
|
40
|
+
if (entry.isDirectory()) {
|
|
41
|
+
if (!EXCLUDED_DIRS.has(entry.name)) {
|
|
42
|
+
hashTree(path.join(dir, entry.name), base, hash);
|
|
43
|
+
}
|
|
44
|
+
} else if (entry.isFile()) {
|
|
45
|
+
const abs = path.join(dir, entry.name);
|
|
46
|
+
// relative + normalized path keeps the id stable across checkout locations / OSes
|
|
47
|
+
hash.update(path.relative(base, abs).split(path.sep).join('/'));
|
|
48
|
+
hash.update(fs.readFileSync(abs));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function sourceFingerprint(sourceDir: string): string {
|
|
54
|
+
const resolved = path.resolve(sourceDir);
|
|
55
|
+
const cached = cache.get(resolved);
|
|
56
|
+
if (cached !== undefined) {
|
|
57
|
+
return cached;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const hash = createHash('sha256');
|
|
61
|
+
hashTree(resolved, resolved, hash);
|
|
62
|
+
const fingerprint = hash.digest('hex');
|
|
63
|
+
cache.set(resolved, fingerprint);
|
|
64
|
+
|
|
65
|
+
return fingerprint;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Shared id for one build (the SDK + app pair). Used as the archive filename
|
|
70
|
+
* (`build-<id>.zip`) and written into each output dir as `.build-id` so the dirs of a
|
|
71
|
+
* single build can be grouped and stale builds ignored at serve time.
|
|
72
|
+
*
|
|
73
|
+
* @param sourceDir absolute path to the source tree to fingerprint (e.g. `assets/` in
|
|
74
|
+
* studio-ui-bundle, `assets/studio/` in collab-bundle). Defaults to the parent of this
|
|
75
|
+
* file — correct only for in-repo use, not when installed as a dependency.
|
|
76
|
+
*/
|
|
77
|
+
export function getBuildGroupId(sourceDir: string = path.resolve(__dirname, '..')): string {
|
|
78
|
+
return sourceFingerprint(sourceDir).slice(0, 12);
|
|
79
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* This source file is available under the terms of the
|
|
4
|
+
* Pimcore Open Core License (POCL)
|
|
5
|
+
* Full copyright and license information is available in
|
|
6
|
+
* LICENSE.md which is distributed with this source code.
|
|
7
|
+
*
|
|
8
|
+
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
9
|
+
* @license Pimcore Open Core License (POCL)
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Packages the latest frontend build into a single committed archive
|
|
14
|
+
* (build-dist/build-<id>.zip). Only this archive is tracked in git; the expanded build is
|
|
15
|
+
* gitignored and reconstructed by BuildArchiveExtractor.
|
|
16
|
+
*
|
|
17
|
+
* Shared across bundles: paths default to studio-ui-bundle's layout (public/build,
|
|
18
|
+
* build-dist relative to __dirname/../..) but can be overridden via --build-dir / --out-dir
|
|
19
|
+
* so consumers installed via npm (e.g. collab-bundle's `studio-package-build --build-dir
|
|
20
|
+
* ../../public/studio/build --out-dir ../../build-dist`) can point at their own layout.
|
|
21
|
+
*
|
|
22
|
+
* - The build id is the shared `.build-id` written into each output dir at build time. It
|
|
23
|
+
* is content-derived, so identical source always yields the same id. The compiled output
|
|
24
|
+
* itself is NOT byte-reproducible (e.g. Module Federation's mf-stats.json lists modules in
|
|
25
|
+
* non-deterministic order), so the id — not the bytes — is the archive's identity: if an
|
|
26
|
+
* archive for this id already exists it is kept untouched, avoiding a churned commit on
|
|
27
|
+
* every build when the source did not actually change.
|
|
28
|
+
* - Only the dirs of one build (a single `.build-id`, chosen deterministically) are
|
|
29
|
+
* packaged, so a dev tree containing several builds still yields a single-pair archive.
|
|
30
|
+
* - When the id is new (a real source change) any previous build-*.zip is removed, so only
|
|
31
|
+
* one archive is ever tracked.
|
|
32
|
+
*/
|
|
33
|
+
const path = require('node:path');
|
|
34
|
+
const fs = require('node:fs');
|
|
35
|
+
const AdmZip = require('adm-zip');
|
|
36
|
+
|
|
37
|
+
const EXCLUDED = new Set(['studio-npm-package.tgz']);
|
|
38
|
+
const FIXED_TIME = new Date(Date.UTC(2001, 0, 1)); // stable zip entry timestamp
|
|
39
|
+
|
|
40
|
+
function parseArg(name) {
|
|
41
|
+
const flag = `--${name}`;
|
|
42
|
+
const idx = process.argv.indexOf(flag);
|
|
43
|
+
if (idx >= 0 && idx + 1 < process.argv.length) {
|
|
44
|
+
return process.argv[idx + 1];
|
|
45
|
+
}
|
|
46
|
+
const prefix = `${flag}=`;
|
|
47
|
+
const eq = process.argv.find((a) => a.startsWith(prefix));
|
|
48
|
+
|
|
49
|
+
return eq ? eq.slice(prefix.length) : undefined;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const buildDir = path.resolve(parseArg('build-dir') ?? path.resolve(__dirname, '..', '..', 'public', 'build'));
|
|
53
|
+
const outDir = path.resolve(parseArg('out-dir') ?? path.resolve(__dirname, '..', '..', 'build-dist'));
|
|
54
|
+
|
|
55
|
+
if (!fs.existsSync(buildDir)) {
|
|
56
|
+
console.error(`[package-build] nothing to package: ${buildDir} is missing`);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// All output dirs of one build share a .build-id. A clean build emits exactly one; if
|
|
61
|
+
// several linger, pick deterministically (sorted) rather than by mtime.
|
|
62
|
+
const dirs = fs
|
|
63
|
+
.readdirSync(buildDir, { withFileTypes: true })
|
|
64
|
+
.filter((e) => e.isDirectory())
|
|
65
|
+
.map((e) => {
|
|
66
|
+
const idFile = path.join(buildDir, e.name, '.build-id');
|
|
67
|
+
return {
|
|
68
|
+
name: e.name,
|
|
69
|
+
buildId: fs.existsSync(idFile) ? fs.readFileSync(idFile, 'utf8').trim() : null,
|
|
70
|
+
};
|
|
71
|
+
})
|
|
72
|
+
.filter((d) => d.buildId);
|
|
73
|
+
|
|
74
|
+
if (dirs.length === 0) {
|
|
75
|
+
console.error('[package-build] no build dirs with a .build-id found — run the build first');
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const buildId = [...new Set(dirs.map((d) => d.buildId))].sort((a, b) => a.localeCompare(b)).pop();
|
|
80
|
+
const pairDirs = dirs.filter((d) => d.buildId === buildId).map((d) => d.name);
|
|
81
|
+
|
|
82
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
83
|
+
const outFile = path.join(outDir, `build-${buildId}.zip`);
|
|
84
|
+
|
|
85
|
+
// The id is the source-tree hash, so an existing archive with this id already represents
|
|
86
|
+
// this exact source. Rewriting it would only churn the committed binary with non-reproducible
|
|
87
|
+
// build noise (see header), so leave it untouched — but still sweep any stray archive from a
|
|
88
|
+
// different id (e.g. dragged in by a merge) to preserve the one-archive invariant.
|
|
89
|
+
if (fs.existsSync(outFile)) {
|
|
90
|
+
const strays = fs
|
|
91
|
+
.readdirSync(outDir)
|
|
92
|
+
.filter((file) => /^build.*\.zip$/.test(file) && file !== path.basename(outFile));
|
|
93
|
+
for (const file of strays) {
|
|
94
|
+
fs.rmSync(path.join(outDir, file), { force: true });
|
|
95
|
+
}
|
|
96
|
+
console.log(
|
|
97
|
+
strays.length > 0
|
|
98
|
+
? `[package-build] kept ${path.basename(outFile)}; removed ${strays.length} stray archive(s)`
|
|
99
|
+
: `[package-build] ${path.basename(outFile)} already up to date for this source; nothing to do`
|
|
100
|
+
);
|
|
101
|
+
process.exit(0);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Collect the build's files, relative to the build dir, sorted for determinism.
|
|
105
|
+
function collect(absDir, relBase, out) {
|
|
106
|
+
for (const entry of fs.readdirSync(absDir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
107
|
+
if (EXCLUDED.has(entry.name)) {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
const abs = path.join(absDir, entry.name);
|
|
111
|
+
const rel = relBase ? `${relBase}/${entry.name}` : entry.name;
|
|
112
|
+
if (entry.isDirectory()) {
|
|
113
|
+
collect(abs, rel, out);
|
|
114
|
+
} else {
|
|
115
|
+
out.push({ rel, abs });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const files = [];
|
|
121
|
+
for (const dir of pairDirs) {
|
|
122
|
+
collect(path.join(buildDir, dir), dir, files);
|
|
123
|
+
}
|
|
124
|
+
files.sort((a, b) => a.rel.localeCompare(b.rel));
|
|
125
|
+
|
|
126
|
+
const zip = new AdmZip();
|
|
127
|
+
for (const f of files) {
|
|
128
|
+
zip.addFile(f.rel, fs.readFileSync(f.abs));
|
|
129
|
+
const entry = zip.getEntry(f.rel);
|
|
130
|
+
if (entry) {
|
|
131
|
+
entry.header.time = FIXED_TIME;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// New id (a real source change): drop any previous archive before writing the new one.
|
|
136
|
+
for (const file of fs.readdirSync(outDir)) {
|
|
137
|
+
if (/^build.*\.zip$/.test(file)) {
|
|
138
|
+
fs.rmSync(path.join(outDir, file), { force: true });
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
zip.writeZip(outFile);
|
|
143
|
+
|
|
144
|
+
const sizeMb = (fs.statSync(outFile).size / (1024 * 1024)).toFixed(1);
|
|
145
|
+
console.log(`[package-build] wrote ${path.relative(process.cwd(), outFile)} (${sizeMb} MB) from ${pairDirs.length} dir(s)`);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/*! For license information please see entrypoints.js.LICENSE.txt */
|
|
2
|
+
(()=>{"use strict";var t={};t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};t.r(e),t.d(e,{pluginGenerateEntrypoints:()=>c,pluginWriteBuildId:()=>a});let n=require("fs");var i=t.n(n);let r=require("node:fs");var s=t.n(r);let o=require("node:path");var l=t.n(o);let a=t=>({name:"write-build-id",setup(e){e.onAfterBuild(e=>{let n,i=e.environments.web.config.output.distPath.root,r=l().dirname(i),o=l().basename(i),{buildId:a}=t;s().writeFileSync(l().join(i,".build-id"),a);let u=l().join(r,"extracted-archive.json");if(s().existsSync(u))try{s().unlinkSync(u)}catch{}try{n=s().readdirSync(r)}catch{return}for(let t of n){if(t===o)continue;let e=l().join(r,t);try{if(!s().statSync(e).isDirectory())continue;let t=l().join(e,".build-id");if(!s().existsSync(t))continue;s().readFileSync(t,"utf8").trim()!==a&&s().rmSync(e,{recursive:!0,force:!0})}catch{}}})}}),u=(t,e,n)=>{var r,s,o,l,a,u,c;let p=t.environments.web.manifest,f={entrypoints:{}},d=void 0!==e,y="localhost";d&&"0.0.0.0"!==e.hostname&&(y=e.hostname);let h=!1;for(let[t,e]of Object.entries(p.entries))Array.isArray(null==e||null==(r=e.initial)?void 0:r.js)&&(null==e||null==(s=e.initial)?void 0:s.js.length)>0&&e.initial.js[0].startsWith("http")&&(h=!0),f.entrypoints[t]={js:[...(null==e||null==(o=e.async)?void 0:o.js)??[],...(null==e||null==(l=e.initial)?void 0:l.js)??[]],css:[...(null==e||null==(a=e.async)?void 0:a.css)??[],...(null==e||null==(u=e.initial)?void 0:u.css)??[]]};if(d&&!h)for(let[t,n]of Object.entries(f.entrypoints)){if(Array.isArray(n.js))for(let t=0;t<n.js.length;t++){let i=n.js[t];i.startsWith("http")||(n.js[t]=`http${e.https?"s":""}://${y}:${e.port}${i}`)}if(Array.isArray(n.css))for(let t=0;t<n.css.length;t++){let i=n.css[t];i.startsWith("http")||(n.css[t]=`http${e.https?"s":""}://${y}:${e.port}${i}`)}}if(h&&!d)for(let[e,n]of Object.entries(f.entrypoints)){if(Array.isArray(n.js))for(let e=0;e<n.js.length;e++){let i=n.js[e];i.startsWith("http")&&(n.js[e]=i.replace(/^(https?:\/\/[^\/]+)(.*)$/,"$1"+t.environments.web.config.output.assetPrefix+"$2"))}if(Array.isArray(n.css))for(let e=0;e<n.css.length;e++){let i=n.css[e];i.startsWith("http")&&(n.css[e]=i.replace(/^(https?:\/\/[^\/]+)(.*)$/,"$1"+t.environments.web.config.output.assetPrefix+"$2"))}}let j={};for(let[t,e]of Object.entries(p.entries))if(null==e||null==(c=e.initial)?void 0:c.js)for(let n of e.initial.js)n.endsWith("remoteEntry.js")&&(j[t]=n);return i().writeFileSync(`${t.environments.web.config.output.distPath.root}/exposeRemote.js`,`
|
|
2
3
|
if (window.pluginRemotes === undefined) {
|
|
3
4
|
window.pluginRemotes = {}
|
|
4
5
|
}
|
|
@@ -7,7 +8,7 @@
|
|
|
7
8
|
window.alternativePluginExportPaths = {}
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
${Object.entries(j).map(t=>{let[n,i]=t;return`window.pluginRemotes.${n} = "${d&&!
|
|
11
|
+
${Object.entries(j).map(t=>{let[n,i]=t;return`window.pluginRemotes.${n} = "${d&&!h?`http${e.https?"s":""}://${y}:${e.port}`:""}${i}"`})}
|
|
11
12
|
|
|
12
13
|
${(null==n?void 0:n.alternativePluginExportPath)?Object.entries(j).map(t=>{let[e,i]=t;return`window.alternativePluginExportPaths.${e} = "${n.alternativePluginExportPath}"`}).join("\n "):""}
|
|
13
|
-
`),
|
|
14
|
+
`),f.entrypoints.exposeRemote={js:[`${t.environments.web.config.output.assetPrefix}/exposeRemote.js`],css:[]},f},c=t=>({name:"entrypoints-generate",setup(e){e.onAfterBuild(e=>{let n=u(e,void 0,t),r=e.environments.web.config.output.distPath.root,s=`${r}/entrypoints.json`;i().writeFileSync(s,JSON.stringify(n,null,2),"utf-8")}),e.onDevCompileDone(n=>{let r=u(n,e.context.devServer,t),s=n.environments.web.config.output.distPath.root,o=`${s}/entrypoints.json`;i().writeFileSync(o,JSON.stringify(r,null,2),"utf-8")})}});module.exports=e})();
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This source file is available under the terms of the
|
|
3
|
+
* Pimcore Open Core License (POCL)
|
|
4
|
+
* Full copyright and license information is available in
|
|
5
|
+
* LICENSE.md which is distributed with this source code.
|
|
6
|
+
*
|
|
7
|
+
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
+
* @license Pimcore Open Core License (POCL)
|
|
9
|
+
*/
|
|
@@ -50,6 +50,19 @@ export declare const Bordered: {
|
|
|
50
50
|
}[];
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
+
export declare const BorderedWithTable: {
|
|
54
|
+
args: {
|
|
55
|
+
bordered: boolean;
|
|
56
|
+
table: boolean;
|
|
57
|
+
activeKey: string;
|
|
58
|
+
size: string;
|
|
59
|
+
items: {
|
|
60
|
+
key: string;
|
|
61
|
+
title: React.JSX.Element;
|
|
62
|
+
children: React.JSX.Element;
|
|
63
|
+
}[];
|
|
64
|
+
};
|
|
65
|
+
};
|
|
53
66
|
export declare const Ghost: {
|
|
54
67
|
args: {
|
|
55
68
|
items: import("rc-collapse/es/interface").ItemType[];
|
|
@@ -11,7 +11,7 @@ import React from 'react';
|
|
|
11
11
|
import { type IconProps } from '../../components/icon/icon';
|
|
12
12
|
export interface EditableEmptyPlaceholderProps {
|
|
13
13
|
text: string;
|
|
14
|
-
buttonText
|
|
14
|
+
buttonText?: string;
|
|
15
15
|
onClick: () => void;
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
icon?: IconProps;
|
|
@@ -57,3 +57,10 @@ export declare const SmallSize: {
|
|
|
57
57
|
size: string;
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
|
+
export declare const EmptyState: {
|
|
61
|
+
args: {
|
|
62
|
+
data: never[];
|
|
63
|
+
columns: ((import("@tanstack/react-table").AccessorKeyColumnDefBase<User, string> & Partial<import("@tanstack/react-table").IdIdentifier<User, string>>) | (import("@tanstack/react-table").AccessorKeyColumnDefBase<User, number> & Partial<import("@tanstack/react-table").IdIdentifier<User, number>>))[];
|
|
64
|
+
isLoading: boolean;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -7,15 +7,4 @@
|
|
|
7
7
|
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
8
|
* @license Pimcore Open Core License (POCL)
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
11
|
-
warningText: {
|
|
12
|
-
color: string;
|
|
13
|
-
};
|
|
14
|
-
pathList: {
|
|
15
|
-
maxHeight: number;
|
|
16
|
-
overflowY: "auto";
|
|
17
|
-
marginTop: number;
|
|
18
|
-
paddingLeft: number;
|
|
19
|
-
listStyle: "none";
|
|
20
|
-
};
|
|
21
|
-
}>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This source file is available under the terms of the
|
|
3
|
+
* Pimcore Open Core License (POCL)
|
|
4
|
+
* Full copyright and license information is available in
|
|
5
|
+
* LICENSE.md which is distributed with this source code.
|
|
6
|
+
*
|
|
7
|
+
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
+
* @license Pimcore Open Core License (POCL)
|
|
9
|
+
*/
|
|
10
|
+
import { type Meta } from '@storybook/react';
|
|
11
|
+
declare const config: Meta;
|
|
12
|
+
export default config;
|
|
13
|
+
export declare const _default: {
|
|
14
|
+
args: {
|
|
15
|
+
type: string;
|
|
16
|
+
value: null;
|
|
17
|
+
onChange: (value: unknown) => void;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare const WithValue: {
|
|
21
|
+
args: {
|
|
22
|
+
value: {
|
|
23
|
+
type: string;
|
|
24
|
+
id: number;
|
|
25
|
+
fullPath: string;
|
|
26
|
+
};
|
|
27
|
+
type: string;
|
|
28
|
+
onChange: (value: unknown) => void;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare const Disabled: {
|
|
32
|
+
args: {
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
type: string;
|
|
35
|
+
value: null;
|
|
36
|
+
onChange: (value: unknown) => void;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
8
|
* @license Pimcore Open Core License (POCL)
|
|
9
9
|
*/
|
|
10
|
+
import React from 'react';
|
|
10
11
|
import { type Meta } from '@storybook/react';
|
|
11
12
|
declare const config: Meta;
|
|
12
13
|
export default config;
|
|
@@ -19,3 +20,30 @@ export declare const _default: {
|
|
|
19
20
|
};
|
|
20
21
|
};
|
|
21
22
|
};
|
|
23
|
+
export declare const WithDropdownItems: {
|
|
24
|
+
args: {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
style: {
|
|
28
|
+
border: string;
|
|
29
|
+
};
|
|
30
|
+
dropdownItems: ({
|
|
31
|
+
key: string;
|
|
32
|
+
label: string;
|
|
33
|
+
icon: React.JSX.Element;
|
|
34
|
+
type?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
type: string;
|
|
37
|
+
key: string;
|
|
38
|
+
label?: undefined;
|
|
39
|
+
icon?: undefined;
|
|
40
|
+
})[];
|
|
41
|
+
};
|
|
42
|
+
parameters: {
|
|
43
|
+
docs: {
|
|
44
|
+
description: {
|
|
45
|
+
story: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -29,6 +29,14 @@ export declare const InputWithInitialValue: {
|
|
|
29
29
|
initialValue: string;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
+
export declare const InputWithWarning: {
|
|
33
|
+
args: {
|
|
34
|
+
type: string;
|
|
35
|
+
title: string;
|
|
36
|
+
label: string;
|
|
37
|
+
warningMessage: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
32
40
|
export declare const Confirmation: {
|
|
33
41
|
args: {
|
|
34
42
|
type: string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This source file is available under the terms of the
|
|
3
|
+
* Pimcore Open Core License (POCL)
|
|
4
|
+
* Full copyright and license information is available in
|
|
5
|
+
* LICENSE.md which is distributed with this source code.
|
|
6
|
+
*
|
|
7
|
+
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
+
* @license Pimcore Open Core License (POCL)
|
|
9
|
+
*/
|
|
10
|
+
import { type ModalFuncProps } from 'antd';
|
|
11
|
+
import { type Rule } from 'antd/lib/form';
|
|
12
|
+
export type ConfigUpdate = ModalFuncProps | ((prevConfig: ModalFuncProps) => ModalFuncProps);
|
|
13
|
+
export type InputFormModalProps = Omit<ModalFuncProps, 'content'> & {
|
|
14
|
+
label?: string;
|
|
15
|
+
rule?: Rule;
|
|
16
|
+
initialValue?: string;
|
|
17
|
+
warningMessage?: string;
|
|
18
|
+
};
|
|
19
|
+
export type TextareaFormModalProps = Omit<ModalFuncProps, 'content'> & {
|
|
20
|
+
label?: string;
|
|
21
|
+
initialValue?: string;
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
};
|
|
24
|
+
export interface UploadFormModalProps extends Omit<InputFormModalProps, 'initialValues'> {
|
|
25
|
+
accept?: string;
|
|
26
|
+
}
|
|
27
|
+
export type ConfirmFormModalProps = ModalFuncProps & {
|
|
28
|
+
dontAskAgainKey?: string;
|
|
29
|
+
};
|
|
30
|
+
export interface UseFormModalHookResponse {
|
|
31
|
+
input: (props: InputFormModalProps) => {
|
|
32
|
+
destroy: () => void;
|
|
33
|
+
update: (configUpdate: ConfigUpdate) => void;
|
|
34
|
+
};
|
|
35
|
+
textarea: (props: TextareaFormModalProps) => {
|
|
36
|
+
destroy: () => void;
|
|
37
|
+
update: (configUpdate: ConfigUpdate) => void;
|
|
38
|
+
};
|
|
39
|
+
confirm: (props: ConfirmFormModalProps) => {
|
|
40
|
+
destroy: () => void;
|
|
41
|
+
update: (configUpdate: ConfigUpdate) => void;
|
|
42
|
+
};
|
|
43
|
+
upload: (props: UploadFormModalProps) => {
|
|
44
|
+
destroy: () => void;
|
|
45
|
+
update: (configUpdate: ConfigUpdate) => void;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -9,45 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { type ModalFuncProps } from 'antd';
|
|
12
|
-
import {
|
|
13
|
-
export type ConfigUpdate
|
|
14
|
-
export type InputFormModalProps = Omit<ModalFuncProps, 'content'> & {
|
|
15
|
-
label?: string;
|
|
16
|
-
rule?: Rule;
|
|
17
|
-
initialValue?: string;
|
|
18
|
-
};
|
|
19
|
-
export type TextareaFormModalProps = Omit<ModalFuncProps, 'content'> & {
|
|
20
|
-
label?: string;
|
|
21
|
-
initialValue?: string;
|
|
22
|
-
placeholder?: string;
|
|
23
|
-
};
|
|
24
|
-
interface UploadFormModalProps extends Omit<InputFormModalProps, 'initialValues'> {
|
|
25
|
-
accept?: string;
|
|
26
|
-
}
|
|
27
|
-
export type ConfirmFormModalProps = ModalFuncProps & {
|
|
28
|
-
dontAskAgainKey?: string;
|
|
29
|
-
};
|
|
30
|
-
export interface UseFormModalHookResponse {
|
|
31
|
-
input: (props: InputFormModalProps) => {
|
|
32
|
-
destroy: () => void;
|
|
33
|
-
update: (configUpdate: ConfigUpdate) => void;
|
|
34
|
-
};
|
|
35
|
-
textarea: (props: TextareaFormModalProps) => {
|
|
36
|
-
destroy: () => void;
|
|
37
|
-
update: (configUpdate: ConfigUpdate) => void;
|
|
38
|
-
};
|
|
39
|
-
confirm: (props: ConfirmFormModalProps) => {
|
|
40
|
-
destroy: () => void;
|
|
41
|
-
update: (configUpdate: ConfigUpdate) => void;
|
|
42
|
-
};
|
|
43
|
-
upload: (props: UploadFormModalProps) => {
|
|
44
|
-
destroy: () => void;
|
|
45
|
-
update: (configUpdate: ConfigUpdate) => void;
|
|
46
|
-
};
|
|
47
|
-
}
|
|
12
|
+
import type { InputFormModalProps, TextareaFormModalProps, ConfirmFormModalProps, UseFormModalHookResponse, UploadFormModalProps } from './form-modal-types';
|
|
13
|
+
export type { ConfigUpdate, InputFormModalProps, TextareaFormModalProps, ConfirmFormModalProps, UseFormModalHookResponse } from './form-modal-types';
|
|
48
14
|
export declare function useFormModal(): UseFormModalHookResponse;
|
|
49
15
|
export declare function withInput(props: InputFormModalProps, onKeyBoardSubmit: any, onSetModalLoading: any): ModalFuncProps;
|
|
50
16
|
export declare function withTextarea(props: TextareaFormModalProps): ModalFuncProps;
|
|
51
17
|
export declare function withConfirm(props: ConfirmFormModalProps, dontAskAgainRef: React.MutableRefObject<boolean>): ModalFuncProps;
|
|
52
18
|
export declare function withUpload(props: UploadFormModalProps): ModalFuncProps;
|
|
53
|
-
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This source file is available under the terms of the
|
|
3
|
+
* Pimcore Open Core License (POCL)
|
|
4
|
+
* Full copyright and license information is available in
|
|
5
|
+
* LICENSE.md which is distributed with this source code.
|
|
6
|
+
*
|
|
7
|
+
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
+
* @license Pimcore Open Core License (POCL)
|
|
9
|
+
*/
|
|
10
|
+
import { type MappingAlgorithm } from 'antd';
|
|
11
|
+
/**
|
|
12
|
+
* Ant Design's dark mapping algorithm, exposed through the SDK surface.
|
|
13
|
+
* Bundles must never import from antd directly — use this export when
|
|
14
|
+
* building a dark theme dynamic type (see `PimcoreThemeConfig.algorithm`).
|
|
15
|
+
*/
|
|
16
|
+
export declare const darkThemeAlgorithm: MappingAlgorithm;
|
|
17
|
+
export type { MappingAlgorithm };
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* @license Pimcore Open Core License (POCL)
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
|
-
* Standard theme IDs for Pimcore Studio
|
|
11
|
+
* Standard theme IDs for Pimcore Studio.
|
|
12
|
+
* The dark theme ships with the Backend Power Tools bundle.
|
|
12
13
|
*/
|
|
13
14
|
export declare const studioThemeIds: {
|
|
14
15
|
readonly light: "studio-default-light";
|
|
@@ -12,4 +12,16 @@ export interface DynamicThemeProviderProps {
|
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
id?: string;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Resolves the theme chain for the given id from the theme registry, deep-merges
|
|
17
|
+
* it into a single config, and applies it via one antd-style theme provider. The
|
|
18
|
+
* deep merge lets a child theme override individual values inside a nested token
|
|
19
|
+
* group without dropping the group's other keys.
|
|
20
|
+
*
|
|
21
|
+
* Note: theme resolution is memoized on [themeRegistry, id] and is NOT
|
|
22
|
+
* reactive to later registry changes. Theme dynamic types must therefore be
|
|
23
|
+
* registered during the module init / app-loader phase, before first render —
|
|
24
|
+
* a theme registered after a failed resolution is only retried once the
|
|
25
|
+
* theme id changes.
|
|
26
|
+
*/
|
|
15
27
|
export declare const DynamicThemeProvider: ({ children, id }: DynamicThemeProviderProps) => React.JSX.Element;
|
|
@@ -70,6 +70,11 @@ export declare const studioDefaultLightThemeConfig: {
|
|
|
70
70
|
colorBorderInverse: string;
|
|
71
71
|
colorDividerInverse: string;
|
|
72
72
|
colorInactiveInverse: string;
|
|
73
|
+
geekblue1: string;
|
|
74
|
+
geekblue2: string;
|
|
75
|
+
geekblue3: string;
|
|
76
|
+
geekblue6: string;
|
|
77
|
+
geekblue7: string;
|
|
73
78
|
colorCodingRed1: string;
|
|
74
79
|
colorCodingRed2: string;
|
|
75
80
|
colorCodingRed3: string;
|
|
@@ -250,13 +255,6 @@ export declare const studioDefaultLightThemeConfig: {
|
|
|
250
255
|
colorPrimaryText: string;
|
|
251
256
|
};
|
|
252
257
|
};
|
|
253
|
-
Base: {
|
|
254
|
-
Geekblue: {
|
|
255
|
-
2: string;
|
|
256
|
-
3: string;
|
|
257
|
-
6: string;
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
258
|
};
|
|
261
259
|
Radio: {
|
|
262
260
|
fontFamily: string;
|
|
@@ -18,7 +18,17 @@ export interface ThemeChain {
|
|
|
18
18
|
}
|
|
19
19
|
export declare class DynamicTypeThemeRegistry extends DynamicTypeRegistryAbstract<DynamicTypeThemeAbstract> {
|
|
20
20
|
/**
|
|
21
|
-
* Resolve a theme and its inheritance chain
|
|
21
|
+
* Resolve a theme and its inheritance chain into an ordered list of configs,
|
|
22
|
+
* from the root ancestor down to the requested leaf theme.
|
|
23
|
+
*
|
|
24
|
+
* A theme reached via more than one path (diamond inheritance) is emitted only
|
|
25
|
+
* once, at its first occurrence; a theme that (transitively) extends itself
|
|
26
|
+
* throws, since that chain can never be resolved.
|
|
22
27
|
*/
|
|
23
28
|
resolveThemeChain(themeId: string): ThemeChain;
|
|
29
|
+
/**
|
|
30
|
+
* Resolve a theme's inheritance chain and deep-merge it into a single config,
|
|
31
|
+
* with the leaf theme's values taking precedence over its ancestors'.
|
|
32
|
+
*/
|
|
33
|
+
resolveMergedTheme(themeId: string): PimcoreThemeConfig;
|
|
24
34
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This source file is available under the terms of the
|
|
3
|
+
* Pimcore Open Core License (POCL)
|
|
4
|
+
* Full copyright and license information is available in
|
|
5
|
+
* LICENSE.md which is distributed with this source code.
|
|
6
|
+
*
|
|
7
|
+
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
+
* @license Pimcore Open Core License (POCL)
|
|
9
|
+
*/
|
|
10
|
+
import 'reflect-metadata';
|