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