@owp/core 2.5.9 → 2.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index20.js +2 -2
- package/dist/_virtual/index21.js +2 -2
- package/dist/_virtual/index22.js +2 -2
- package/dist/_virtual/index5.js +2 -2
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +195 -147
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewColorField.js +10 -11
- package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewControls.js +232 -198
- package/dist/features/themePreview/components/ThemePreviewControls.js.map +1 -1
- package/dist/features/themePreview/hooks/useThemePreview.js +214 -199
- package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
- package/dist/features/themePreview/utils/themePreviewSettings.js +188 -151
- package/dist/features/themePreview/utils/themePreviewSettings.js.map +1 -1
- package/dist/features/themePreview.js +18 -17
- package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js +1 -1
- package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/features/themePreview/utils/index.d.ts +1 -1
- package/dist/types/features/themePreview/utils/themePreviewSettings.d.ts +11 -1
- package/package.json +1 -1
|
@@ -1,74 +1,75 @@
|
|
|
1
|
-
var
|
|
2
|
-
var s = (r, d) =>
|
|
3
|
-
import { jsx as o, jsxs as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { ThemeProvider as
|
|
7
|
-
import { useState as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
1
|
+
var ie = Object.defineProperty;
|
|
2
|
+
var s = (r, d) => ie(r, "name", { value: d, configurable: !0 });
|
|
3
|
+
import { jsx as o, jsxs as u } from "../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
|
+
import { MenuItem as W, ButtonBase as ae, Typography as x, Paper as A, TextField as Y, Divider as Z, Box as se, IconButton as de, FormControlLabel as ce, Checkbox as he } from "@mui/material";
|
|
5
|
+
import ue from "../../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestartAltOutlined.js";
|
|
6
|
+
import { ThemeProvider as me, createTheme as fe } from "@mui/material/styles";
|
|
7
|
+
import { useState as pe, useMemo as T } from "react";
|
|
8
|
+
import { toolbarCuratedPresetKeys as be, designSystemPresetKeys as Ce } from "../configs/presets.js";
|
|
9
|
+
import { ThemePreviewColorField as q } from "./ThemePreviewColorField.js";
|
|
10
|
+
import { getThemePreviewPresetOptionsByMode as ve, THEME_PREVIEW_CUSTOM_PRESET_KEY as J, isThemePreviewCustomSection as ge, getThemePreviewPaletteValue as G } from "../utils/themePreviewSettings.js";
|
|
11
|
+
import { themePreviewFieldGroupsBySection as xe, themePreviewSectionOptions as X } from "../utils/themePreviewDefinitions.js";
|
|
12
|
+
import { deriveThemePreviewPaletteGroupValues as ye } from "../utils/color.js";
|
|
13
|
+
function Pe(r) {
|
|
13
14
|
return r.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (d) => d.toUpperCase());
|
|
14
15
|
}
|
|
15
|
-
s(
|
|
16
|
-
function
|
|
17
|
-
const d = r.find((
|
|
18
|
-
return !d || !
|
|
16
|
+
s(Pe, "getThemePreviewFieldClusterLabel");
|
|
17
|
+
function ke(r) {
|
|
18
|
+
const d = r.find((f) => f.path.endsWith(".main")), p = r.find((f) => f.path.endsWith(".light")), m = r.find((f) => f.path.endsWith(".dark")), c = r.find((f) => f.path.endsWith(".contrastText"));
|
|
19
|
+
return !d || !p && !m && !c ? null : {
|
|
19
20
|
mainPath: d.path,
|
|
20
|
-
lightPath:
|
|
21
|
-
darkPath:
|
|
21
|
+
lightPath: p == null ? void 0 : p.path,
|
|
22
|
+
darkPath: m == null ? void 0 : m.path,
|
|
22
23
|
contrastTextPath: c == null ? void 0 : c.path
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
|
-
s(
|
|
26
|
-
function
|
|
26
|
+
s(ke, "getThemePreviewAutoDerivedFieldPaths");
|
|
27
|
+
function we(r) {
|
|
27
28
|
const d = r.reduce(
|
|
28
29
|
(t, h) => {
|
|
29
|
-
const
|
|
30
|
-
return
|
|
30
|
+
const i = h.path.split(".")[0] ?? "";
|
|
31
|
+
return i && (t[i] || (t[i] = []), t[i].push(h)), t;
|
|
31
32
|
},
|
|
32
33
|
{}
|
|
33
|
-
),
|
|
34
|
+
), p = Object.fromEntries(
|
|
34
35
|
Object.entries(d).map(([t, h]) => [
|
|
35
36
|
t,
|
|
36
37
|
h.length
|
|
37
38
|
])
|
|
38
|
-
),
|
|
39
|
-
Object.entries(
|
|
39
|
+
), m = new Set(
|
|
40
|
+
Object.entries(p).filter(([, t]) => t > 1).map(([t]) => t)
|
|
40
41
|
), c = r.some(
|
|
41
|
-
(t) => !
|
|
42
|
+
(t) => !m.has(t.path.split(".")[0] ?? "")
|
|
42
43
|
);
|
|
43
|
-
if (!(
|
|
44
|
+
if (!(m.size > 1 || c))
|
|
44
45
|
return r.map((t) => ({
|
|
45
46
|
key: t.path,
|
|
46
47
|
fields: [t]
|
|
47
48
|
}));
|
|
48
|
-
const
|
|
49
|
+
const F = /* @__PURE__ */ new Set();
|
|
49
50
|
return r.reduce((t, h) => {
|
|
50
|
-
const
|
|
51
|
-
if (!
|
|
51
|
+
const i = h.path.split(".")[0] ?? "";
|
|
52
|
+
if (!m.has(i))
|
|
52
53
|
return t.push({
|
|
53
54
|
key: h.path,
|
|
54
55
|
fields: [h]
|
|
55
56
|
}), t;
|
|
56
|
-
if (
|
|
57
|
+
if (F.has(i))
|
|
57
58
|
return t;
|
|
58
|
-
|
|
59
|
-
const
|
|
59
|
+
F.add(i);
|
|
60
|
+
const M = d[i] ?? [h];
|
|
60
61
|
return t.push({
|
|
61
|
-
key:
|
|
62
|
-
label:
|
|
63
|
-
fields:
|
|
64
|
-
autoDerivedFieldPaths:
|
|
62
|
+
key: i,
|
|
63
|
+
label: Pe(i),
|
|
64
|
+
fields: M,
|
|
65
|
+
autoDerivedFieldPaths: ke(M) ?? void 0
|
|
65
66
|
}), t;
|
|
66
67
|
}, []);
|
|
67
68
|
}
|
|
68
|
-
s(
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
),
|
|
69
|
+
s(we, "getThemePreviewFieldClusters");
|
|
70
|
+
const Te = Object.fromEntries(
|
|
71
|
+
X.map((r) => [r.key, r])
|
|
72
|
+
), v = {
|
|
72
73
|
active: {
|
|
73
74
|
backgroundColor: "#1ea3e6",
|
|
74
75
|
borderColor: "#1591cf",
|
|
@@ -81,23 +82,23 @@ const ge = Object.fromEntries(
|
|
|
81
82
|
descriptionColor: "#6b7280",
|
|
82
83
|
textColor: "#111827"
|
|
83
84
|
}
|
|
84
|
-
},
|
|
85
|
+
}, B = "#d8dee8", Be = "#d1d7e0", Fe = "#f8fafc", D = "#ffffff", y = "#111827", g = "#6b7280", O = "#ffffff", ee = "#cbd5e1", Me = "#94a3b8", z = "#1ea3e6", Q = "#111827", Se = "#f8fafc", Ne = "#f8fafc", Ie = fe({
|
|
85
86
|
palette: {
|
|
86
87
|
mode: "light",
|
|
87
88
|
background: {
|
|
88
89
|
default: D,
|
|
89
90
|
paper: D
|
|
90
91
|
},
|
|
91
|
-
divider:
|
|
92
|
+
divider: B,
|
|
92
93
|
primary: {
|
|
93
|
-
main:
|
|
94
|
+
main: z
|
|
94
95
|
},
|
|
95
96
|
secondary: {
|
|
96
|
-
main:
|
|
97
|
+
main: z
|
|
97
98
|
},
|
|
98
99
|
text: {
|
|
99
|
-
primary:
|
|
100
|
-
secondary:
|
|
100
|
+
primary: y,
|
|
101
|
+
secondary: g
|
|
101
102
|
}
|
|
102
103
|
},
|
|
103
104
|
typography: {
|
|
@@ -110,190 +111,225 @@ const ge = Object.fromEntries(
|
|
|
110
111
|
fontSize: "1.3rem"
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
}),
|
|
114
|
-
color:
|
|
114
|
+
}), Ee = {
|
|
115
|
+
color: y,
|
|
115
116
|
"& .MuiFormHelperText-root": {
|
|
116
|
-
color:
|
|
117
|
+
color: g
|
|
117
118
|
},
|
|
118
119
|
"& .MuiInputAdornment-root": {
|
|
119
|
-
color:
|
|
120
|
+
color: g
|
|
120
121
|
},
|
|
121
122
|
"& .MuiInputLabel-root": {
|
|
122
|
-
color:
|
|
123
|
+
color: g
|
|
123
124
|
},
|
|
124
125
|
"& .MuiInputLabel-root.Mui-focused": {
|
|
125
|
-
color:
|
|
126
|
+
color: y
|
|
126
127
|
},
|
|
127
128
|
"& .MuiInputBase-input": {
|
|
128
|
-
color:
|
|
129
|
+
color: y
|
|
129
130
|
},
|
|
130
131
|
"& .MuiOutlinedInput-root": {
|
|
131
|
-
backgroundColor:
|
|
132
|
-
color:
|
|
132
|
+
backgroundColor: O,
|
|
133
|
+
color: y,
|
|
133
134
|
"& fieldset": {
|
|
134
|
-
borderColor:
|
|
135
|
+
borderColor: ee
|
|
135
136
|
},
|
|
136
137
|
"&:hover fieldset": {
|
|
137
|
-
borderColor:
|
|
138
|
+
borderColor: Me
|
|
138
139
|
},
|
|
139
140
|
"&.Mui-focused fieldset": {
|
|
140
|
-
borderColor:
|
|
141
|
+
borderColor: z,
|
|
141
142
|
borderWidth: 1
|
|
142
143
|
}
|
|
143
144
|
},
|
|
144
145
|
"& .MuiSelect-icon": {
|
|
145
|
-
color:
|
|
146
|
+
color: g
|
|
146
147
|
},
|
|
147
148
|
"& .MuiButton-outlined": {
|
|
148
|
-
backgroundColor:
|
|
149
|
-
borderColor:
|
|
150
|
-
color:
|
|
149
|
+
backgroundColor: O,
|
|
150
|
+
borderColor: Q,
|
|
151
|
+
color: y,
|
|
151
152
|
"&:hover": {
|
|
152
|
-
backgroundColor:
|
|
153
|
-
borderColor:
|
|
153
|
+
backgroundColor: Se,
|
|
154
|
+
borderColor: Q
|
|
154
155
|
}
|
|
155
156
|
},
|
|
156
157
|
"& .MuiCheckbox-root": {
|
|
157
|
-
color:
|
|
158
|
+
color: g
|
|
158
159
|
},
|
|
159
160
|
"& .MuiCheckbox-root.Mui-checked": {
|
|
160
|
-
color:
|
|
161
|
+
color: z
|
|
161
162
|
},
|
|
162
163
|
"& .MuiDivider-root": {
|
|
163
|
-
borderColor:
|
|
164
|
+
borderColor: B
|
|
164
165
|
}
|
|
165
|
-
}
|
|
166
|
-
|
|
166
|
+
}, We = /* @__PURE__ */ new Set([
|
|
167
|
+
...be,
|
|
168
|
+
...Ce
|
|
169
|
+
]), V = /* @__PURE__ */ new Set(["tableFieldHeader", "tableFieldCell"]);
|
|
170
|
+
function _e({
|
|
167
171
|
activeSection: r,
|
|
168
172
|
presetOptions: d,
|
|
169
|
-
selectedMode:
|
|
170
|
-
selectedPresetKey:
|
|
173
|
+
selectedMode: p,
|
|
174
|
+
selectedPresetKey: m,
|
|
171
175
|
settings: c,
|
|
172
|
-
resetVersion:
|
|
173
|
-
onSectionChange:
|
|
176
|
+
resetVersion: f,
|
|
177
|
+
onSectionChange: F,
|
|
174
178
|
onPaletteValueChange: t,
|
|
175
179
|
onPaletteValuesChange: h,
|
|
176
|
-
onPaletteValueReset:
|
|
177
|
-
onPaletteValuesReset:
|
|
178
|
-
onPresetKeyChange:
|
|
179
|
-
onPresetModeChange:
|
|
180
|
+
onPaletteValueReset: i,
|
|
181
|
+
onPaletteValuesReset: M,
|
|
182
|
+
onPresetKeyChange: re,
|
|
183
|
+
onPresetModeChange: oe
|
|
180
184
|
}) {
|
|
181
|
-
const [
|
|
182
|
-
() =>
|
|
183
|
-
[
|
|
184
|
-
), R =
|
|
185
|
-
() =>
|
|
185
|
+
const [te, le] = pe({}), S = !ge(r), b = S ? r : null, N = T(
|
|
186
|
+
() => S && b ? ve(d, b, p) : [],
|
|
187
|
+
[S, d, b, p]
|
|
188
|
+
), R = T(
|
|
189
|
+
() => {
|
|
190
|
+
var e;
|
|
191
|
+
return (e = N.find(
|
|
192
|
+
(l) => !We.has(l.key)
|
|
193
|
+
)) == null ? void 0 : e.key;
|
|
194
|
+
},
|
|
195
|
+
[N]
|
|
196
|
+
), H = xe[r], I = T(
|
|
197
|
+
() => H.map((e) => ({
|
|
186
198
|
...e,
|
|
187
|
-
fieldClusters:
|
|
199
|
+
fieldClusters: we(e.fields)
|
|
188
200
|
})),
|
|
189
|
-
[
|
|
190
|
-
),
|
|
201
|
+
[H]
|
|
202
|
+
), L = T(() => {
|
|
191
203
|
if (r !== "table")
|
|
192
204
|
return [
|
|
193
205
|
{
|
|
194
206
|
key: r,
|
|
195
|
-
fieldGroups:
|
|
207
|
+
fieldGroups: I
|
|
196
208
|
}
|
|
197
209
|
];
|
|
198
|
-
const e =
|
|
199
|
-
(
|
|
200
|
-
),
|
|
201
|
-
(
|
|
210
|
+
const e = I.filter(
|
|
211
|
+
(n) => V.has(n.key)
|
|
212
|
+
), l = I.filter(
|
|
213
|
+
(n) => !V.has(n.key)
|
|
202
214
|
);
|
|
203
215
|
return [
|
|
204
216
|
{
|
|
205
217
|
key: "table-field",
|
|
206
218
|
label: "Field Table",
|
|
207
|
-
fieldGroups:
|
|
219
|
+
fieldGroups: e
|
|
208
220
|
},
|
|
209
221
|
{
|
|
210
222
|
key: "table-base",
|
|
211
223
|
label: "Table",
|
|
212
|
-
fieldGroups:
|
|
224
|
+
fieldGroups: l
|
|
213
225
|
}
|
|
214
|
-
].filter((
|
|
215
|
-
}, [r,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
226
|
+
].filter((n) => n.fieldGroups.length > 0);
|
|
227
|
+
}, [r, I]), j = Te[r], ne = T(
|
|
228
|
+
() => N.flatMap((e) => {
|
|
229
|
+
const l = [];
|
|
230
|
+
return e.key === R && l.push(
|
|
231
|
+
/* @__PURE__ */ o(
|
|
232
|
+
Z,
|
|
233
|
+
{
|
|
234
|
+
component: "li",
|
|
235
|
+
role: "presentation",
|
|
236
|
+
textAlign: "center",
|
|
237
|
+
sx: {
|
|
238
|
+
color: g,
|
|
239
|
+
fontSize: "1.2rem",
|
|
240
|
+
my: 0.5
|
|
241
|
+
},
|
|
242
|
+
children: "legacy"
|
|
243
|
+
},
|
|
244
|
+
"preset-legacy-divider"
|
|
245
|
+
)
|
|
246
|
+
), l.push(
|
|
247
|
+
/* @__PURE__ */ o(W, { value: e.key, children: e.label }, e.key)
|
|
248
|
+
), l;
|
|
249
|
+
}),
|
|
250
|
+
[R, N]
|
|
251
|
+
), U = /* @__PURE__ */ s((e, l, n) => {
|
|
252
|
+
const P = G(c, e, "common.white") || "#FFFFFF", k = G(c, e, "common.black") || "#111827", a = ye(n, {
|
|
253
|
+
whiteTextColor: P,
|
|
254
|
+
blackTextColor: k
|
|
219
255
|
});
|
|
220
256
|
return a ? [
|
|
221
257
|
l.lightPath ? { path: l.lightPath, value: a.light } : null,
|
|
222
258
|
l.darkPath ? { path: l.darkPath, value: a.dark } : null,
|
|
223
259
|
l.contrastTextPath ? { path: l.contrastTextPath, value: a.contrastText } : null
|
|
224
|
-
].filter((
|
|
225
|
-
}, "getAutoDerivedUpdates"),
|
|
260
|
+
].filter((K) => !!K) : [];
|
|
261
|
+
}, "getAutoDerivedUpdates"), _ = /* @__PURE__ */ s((e) => {
|
|
226
262
|
const l = e.fieldClusters.flatMap(
|
|
227
|
-
(
|
|
263
|
+
(n) => n.fields.map((P) => P.path)
|
|
228
264
|
);
|
|
229
|
-
return /* @__PURE__ */
|
|
230
|
-
e.label ? /* @__PURE__ */
|
|
231
|
-
/* @__PURE__ */ o(
|
|
265
|
+
return /* @__PURE__ */ u("div", { className: "flex flex-col gap-12", children: [
|
|
266
|
+
e.label ? /* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-8", children: [
|
|
267
|
+
/* @__PURE__ */ o(x, { variant: "subtitle1", fontWeight: 700, children: e.label }),
|
|
232
268
|
/* @__PURE__ */ o(
|
|
233
|
-
|
|
269
|
+
de,
|
|
234
270
|
{
|
|
235
271
|
size: "small",
|
|
236
272
|
"aria-label": `${e.label} reset`,
|
|
237
273
|
onClick: /* @__PURE__ */ s(() => {
|
|
238
|
-
|
|
274
|
+
M(l);
|
|
239
275
|
}, "onClick"),
|
|
240
276
|
sx: {
|
|
241
|
-
border: `1px solid ${
|
|
277
|
+
border: `1px solid ${ee}`,
|
|
242
278
|
borderRadius: 1,
|
|
243
|
-
color:
|
|
279
|
+
color: g,
|
|
244
280
|
p: 0.5
|
|
245
281
|
},
|
|
246
|
-
children: /* @__PURE__ */ o(
|
|
282
|
+
children: /* @__PURE__ */ o(ue, { sx: { fontSize: 18 } })
|
|
247
283
|
}
|
|
248
284
|
)
|
|
249
285
|
] }) : null,
|
|
250
|
-
/* @__PURE__ */ o("div", { className: "grid gap-12", children: e.fieldClusters.map((
|
|
251
|
-
if (!
|
|
252
|
-
return
|
|
253
|
-
|
|
286
|
+
/* @__PURE__ */ o("div", { className: "grid gap-12", children: e.fieldClusters.map((n) => {
|
|
287
|
+
if (!n.label)
|
|
288
|
+
return n.fields.map((C) => /* @__PURE__ */ o(
|
|
289
|
+
q,
|
|
254
290
|
{
|
|
255
|
-
definition:
|
|
256
|
-
resetVersion:
|
|
291
|
+
definition: C,
|
|
292
|
+
resetVersion: f,
|
|
257
293
|
sectionKey: r,
|
|
258
294
|
settings: c,
|
|
259
295
|
onChange: t,
|
|
260
|
-
onReset:
|
|
296
|
+
onReset: i
|
|
261
297
|
},
|
|
262
|
-
|
|
298
|
+
C.path
|
|
263
299
|
));
|
|
264
|
-
const
|
|
265
|
-
return /* @__PURE__ */
|
|
266
|
-
|
|
300
|
+
const P = `${r}:${e.key}:${n.key}`, k = !!te[P], a = n.autoDerivedFieldPaths, K = !!(a && b);
|
|
301
|
+
return /* @__PURE__ */ u(
|
|
302
|
+
A,
|
|
267
303
|
{
|
|
268
304
|
variant: "outlined",
|
|
269
305
|
sx: {
|
|
270
|
-
backgroundColor:
|
|
271
|
-
borderColor:
|
|
306
|
+
backgroundColor: Fe,
|
|
307
|
+
borderColor: Be,
|
|
272
308
|
display: "flex",
|
|
273
309
|
flexDirection: "column",
|
|
274
310
|
gap: 1.5,
|
|
275
311
|
p: 1.5
|
|
276
312
|
},
|
|
277
313
|
children: [
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
-
/* @__PURE__ */ o(
|
|
280
|
-
|
|
281
|
-
|
|
314
|
+
/* @__PURE__ */ u("div", { className: "flex items-start justify-between gap-12", children: [
|
|
315
|
+
/* @__PURE__ */ o(x, { variant: "body2", fontWeight: 700, children: n.label }),
|
|
316
|
+
K ? /* @__PURE__ */ o(
|
|
317
|
+
ce,
|
|
282
318
|
{
|
|
283
319
|
className: "m-0",
|
|
284
320
|
control: /* @__PURE__ */ o(
|
|
285
|
-
|
|
321
|
+
he,
|
|
286
322
|
{
|
|
287
323
|
size: "small",
|
|
288
|
-
checked:
|
|
289
|
-
onChange: /* @__PURE__ */ s((
|
|
290
|
-
const
|
|
291
|
-
|
|
324
|
+
checked: k,
|
|
325
|
+
onChange: /* @__PURE__ */ s((C) => {
|
|
326
|
+
const E = C.target.checked;
|
|
327
|
+
le((w) => ({
|
|
292
328
|
...w,
|
|
293
|
-
[
|
|
294
|
-
})), !
|
|
295
|
-
|
|
296
|
-
|
|
329
|
+
[P]: E
|
|
330
|
+
})), !E && (!b || !a || h(
|
|
331
|
+
U(
|
|
332
|
+
b,
|
|
297
333
|
a,
|
|
298
334
|
G(
|
|
299
335
|
c,
|
|
@@ -305,71 +341,69 @@ function Ge({
|
|
|
305
341
|
}, "onChange")
|
|
306
342
|
}
|
|
307
343
|
),
|
|
308
|
-
label: /* @__PURE__ */ o(
|
|
344
|
+
label: /* @__PURE__ */ o(x, { variant: "caption", color: "text.secondary", children: "Edit derived colors" })
|
|
309
345
|
}
|
|
310
346
|
) : null
|
|
311
347
|
] }),
|
|
312
|
-
/* @__PURE__ */ o("div", { className: "grid gap-12", children:
|
|
313
|
-
const
|
|
348
|
+
/* @__PURE__ */ o("div", { className: "grid gap-12", children: n.fields.map((C) => {
|
|
349
|
+
const E = a && b ? !k && C.path !== a.mainPath : !1;
|
|
314
350
|
return /* @__PURE__ */ o(
|
|
315
|
-
|
|
351
|
+
q,
|
|
316
352
|
{
|
|
317
|
-
disabled:
|
|
318
|
-
definition:
|
|
319
|
-
resetVersion:
|
|
353
|
+
disabled: E,
|
|
354
|
+
definition: C,
|
|
355
|
+
resetVersion: f,
|
|
320
356
|
sectionKey: r,
|
|
321
357
|
settings: c,
|
|
322
|
-
onChange: /* @__PURE__ */ s((w,
|
|
323
|
-
if (!a || !
|
|
324
|
-
t(w,
|
|
358
|
+
onChange: /* @__PURE__ */ s((w, $) => {
|
|
359
|
+
if (!a || !b || k || w !== a.mainPath) {
|
|
360
|
+
t(w, $);
|
|
325
361
|
return;
|
|
326
362
|
}
|
|
327
|
-
h(
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
]
|
|
336
|
-
);
|
|
363
|
+
h([
|
|
364
|
+
{ path: w, value: $ },
|
|
365
|
+
...U(
|
|
366
|
+
b,
|
|
367
|
+
a,
|
|
368
|
+
$
|
|
369
|
+
)
|
|
370
|
+
]);
|
|
337
371
|
}, "onChange"),
|
|
338
|
-
onReset:
|
|
372
|
+
onReset: i
|
|
339
373
|
},
|
|
340
|
-
|
|
374
|
+
C.path
|
|
341
375
|
);
|
|
342
376
|
}) })
|
|
343
377
|
]
|
|
344
378
|
},
|
|
345
|
-
|
|
379
|
+
n.key
|
|
346
380
|
);
|
|
347
381
|
}) })
|
|
348
382
|
] }, e.key);
|
|
349
383
|
}, "renderFieldGroup");
|
|
350
|
-
return /* @__PURE__ */ o(
|
|
351
|
-
/* @__PURE__ */ o("div", { className: "grid grid-cols-2 gap-12", children:
|
|
384
|
+
return /* @__PURE__ */ o(me, { theme: Ie, children: /* @__PURE__ */ u(se, { sx: Ee, className: "flex h-full min-h-0 flex-col gap-16", children: [
|
|
385
|
+
/* @__PURE__ */ o("div", { className: "grid grid-cols-2 gap-12", children: X.map((e) => {
|
|
352
386
|
const l = e.key === r;
|
|
353
387
|
return /* @__PURE__ */ o(
|
|
354
|
-
|
|
388
|
+
ae,
|
|
355
389
|
{
|
|
356
|
-
onClick: /* @__PURE__ */ s(() =>
|
|
390
|
+
onClick: /* @__PURE__ */ s(() => F(e.key), "onClick"),
|
|
357
391
|
className: "w-full rounded-lg text-left",
|
|
358
392
|
sx: {
|
|
359
393
|
alignItems: "flex-start",
|
|
360
|
-
backgroundColor: l ?
|
|
361
|
-
border: `1px solid ${l ?
|
|
362
|
-
color: l ?
|
|
394
|
+
backgroundColor: l ? v.active.backgroundColor : v.inactive.backgroundColor,
|
|
395
|
+
border: `1px solid ${l ? v.active.borderColor : v.inactive.borderColor}`,
|
|
396
|
+
color: l ? v.active.textColor : v.inactive.textColor,
|
|
363
397
|
p: 2
|
|
364
398
|
},
|
|
365
|
-
children: /* @__PURE__ */
|
|
366
|
-
/* @__PURE__ */ o(
|
|
399
|
+
children: /* @__PURE__ */ u("div", { className: "flex w-full flex-col gap-4", children: [
|
|
400
|
+
/* @__PURE__ */ o(x, { variant: "subtitle1", fontWeight: 600, children: e.label }),
|
|
367
401
|
e.description ? /* @__PURE__ */ o(
|
|
368
|
-
|
|
402
|
+
x,
|
|
369
403
|
{
|
|
370
404
|
variant: "body2",
|
|
371
405
|
sx: {
|
|
372
|
-
color: l ?
|
|
406
|
+
color: l ? v.active.descriptionColor : v.inactive.descriptionColor
|
|
373
407
|
},
|
|
374
408
|
children: e.description
|
|
375
409
|
}
|
|
@@ -379,66 +413,66 @@ function Ge({
|
|
|
379
413
|
e.key
|
|
380
414
|
);
|
|
381
415
|
}) }),
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
|
|
416
|
+
/* @__PURE__ */ u(
|
|
417
|
+
A,
|
|
384
418
|
{
|
|
385
419
|
className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg",
|
|
386
420
|
sx: {
|
|
387
421
|
backgroundColor: D,
|
|
388
|
-
border: `1px solid ${
|
|
422
|
+
border: `1px solid ${B}`,
|
|
389
423
|
boxShadow: "none"
|
|
390
424
|
},
|
|
391
425
|
children: [
|
|
392
|
-
/* @__PURE__ */ o("div", { className: "flex items-center justify-between px-20 py-16", children: /* @__PURE__ */
|
|
393
|
-
/* @__PURE__ */ o(
|
|
394
|
-
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
|
|
426
|
+
/* @__PURE__ */ o("div", { className: "flex items-center justify-between px-20 py-16", children: /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-14", children: [
|
|
427
|
+
/* @__PURE__ */ o(x, { variant: "h6", sx: { color: y }, children: j == null ? void 0 : j.label }),
|
|
428
|
+
S ? /* @__PURE__ */ u("div", { className: "grid gap-12 md:grid-cols-2", children: [
|
|
429
|
+
/* @__PURE__ */ u(
|
|
430
|
+
Y,
|
|
397
431
|
{
|
|
398
432
|
select: !0,
|
|
399
433
|
label: "Mode",
|
|
400
|
-
value:
|
|
434
|
+
value: p,
|
|
401
435
|
onChange: /* @__PURE__ */ s((e) => {
|
|
402
|
-
|
|
436
|
+
oe(e.target.value);
|
|
403
437
|
}, "onChange"),
|
|
404
438
|
children: [
|
|
405
|
-
/* @__PURE__ */ o(
|
|
406
|
-
/* @__PURE__ */ o(
|
|
439
|
+
/* @__PURE__ */ o(W, { value: "light", children: "light" }),
|
|
440
|
+
/* @__PURE__ */ o(W, { value: "dark", children: "dark" })
|
|
407
441
|
]
|
|
408
442
|
}
|
|
409
443
|
),
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
|
|
444
|
+
/* @__PURE__ */ u(
|
|
445
|
+
Y,
|
|
412
446
|
{
|
|
413
447
|
select: !0,
|
|
414
448
|
label: "Preset",
|
|
415
|
-
value:
|
|
449
|
+
value: m,
|
|
416
450
|
onChange: /* @__PURE__ */ s((e) => {
|
|
417
|
-
|
|
451
|
+
re(e.target.value);
|
|
418
452
|
}, "onChange"),
|
|
419
453
|
children: [
|
|
420
|
-
|
|
421
|
-
|
|
454
|
+
m === J ? /* @__PURE__ */ o(W, { value: J, children: "custom" }) : null,
|
|
455
|
+
ne
|
|
422
456
|
]
|
|
423
457
|
}
|
|
424
458
|
)
|
|
425
459
|
] }) : null
|
|
426
460
|
] }) }),
|
|
427
461
|
/* @__PURE__ */ o(
|
|
428
|
-
|
|
462
|
+
Z,
|
|
429
463
|
{
|
|
430
464
|
sx: {
|
|
431
|
-
borderColor:
|
|
465
|
+
borderColor: B
|
|
432
466
|
}
|
|
433
467
|
}
|
|
434
468
|
),
|
|
435
|
-
/* @__PURE__ */ o("div", { className: "flex min-h-0 flex-1 flex-col gap-20 overflow-y-auto px-20 py-20", children:
|
|
436
|
-
|
|
469
|
+
/* @__PURE__ */ o("div", { className: "flex min-h-0 flex-1 flex-col gap-20 overflow-y-auto px-20 py-20", children: L.map((e) => r === "table" && L.length > 1 ? /* @__PURE__ */ u(
|
|
470
|
+
A,
|
|
437
471
|
{
|
|
438
472
|
variant: "outlined",
|
|
439
473
|
sx: {
|
|
440
|
-
backgroundColor:
|
|
441
|
-
borderColor:
|
|
474
|
+
backgroundColor: Ne,
|
|
475
|
+
borderColor: B,
|
|
442
476
|
boxShadow: "none",
|
|
443
477
|
display: "flex",
|
|
444
478
|
flexDirection: "column",
|
|
@@ -446,19 +480,19 @@ function Ge({
|
|
|
446
480
|
p: 2
|
|
447
481
|
},
|
|
448
482
|
children: [
|
|
449
|
-
e.label ? /* @__PURE__ */ o(
|
|
450
|
-
/* @__PURE__ */ o("div", { className: "grid gap-20", children: e.fieldGroups.map(
|
|
483
|
+
e.label ? /* @__PURE__ */ o(x, { variant: "subtitle1", fontWeight: 700, children: e.label }) : null,
|
|
484
|
+
/* @__PURE__ */ o("div", { className: "grid gap-20", children: e.fieldGroups.map(_) })
|
|
451
485
|
]
|
|
452
486
|
},
|
|
453
487
|
e.key
|
|
454
|
-
) : e.fieldGroups.map(
|
|
488
|
+
) : e.fieldGroups.map(_)) })
|
|
455
489
|
]
|
|
456
490
|
}
|
|
457
491
|
)
|
|
458
492
|
] }) });
|
|
459
493
|
}
|
|
460
|
-
s(
|
|
494
|
+
s(_e, "ThemePreviewControls");
|
|
461
495
|
export {
|
|
462
|
-
|
|
496
|
+
_e as ThemePreviewControls
|
|
463
497
|
};
|
|
464
498
|
//# sourceMappingURL=ThemePreviewControls.js.map
|