@pie-element/charting 13.0.1-next.20261004200555 → 13.0.1-next.20261004202944
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/browser/author/index.js +623 -620
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/{chart-BBYI_J0h.js → chart-CluVqze2.js} +7468 -7490
- package/dist/browser/{chart-BBYI_J0h.js.map → chart-CluVqze2.js.map} +1 -1
- package/dist/browser/delivery/index.js +45 -45
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +623 -620
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/{chart-C0Rs2q9f.js → chart-LER0X8RL.js} +45 -67
- package/dist/browser/editor-runtime/{chart-C0Rs2q9f.js.map → chart-LER0X8RL.js.map} +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +45 -45
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
- package/dist/index.iife.js +69 -69
- package/package.json +2 -2
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { i as e } from "../rolldown-runtime-CWhphoD1.js";
|
|
2
|
-
import {
|
|
3
|
-
import { f as
|
|
2
|
+
import { $ as t, A as n, B as r, C as i, D as a, E as o, F as s, G as c, H as l, I as u, J as d, K as f, L as p, M as m, N as h, O as g, P as _, Q as v, R as y, T as b, U as x, W as S, X as C, Y as w, Z as T, _ as E, a as D, c as O, d as k, f as A, i as j, l as M, m as N, n as P, p as F, q as I, r as L, s as R, t as z, u as ee, v as B, w as te, z as V } from "../chart-CluVqze2.js";
|
|
3
|
+
import { f as ne, g as re, i as H, r as U, t as W, v as ie } from "../dist-Csg_Ufh1.js";
|
|
4
4
|
import * as G from "react";
|
|
5
|
-
import K, { Component as
|
|
6
|
-
import { createRoot as
|
|
5
|
+
import K, { Component as ae, createElement as oe, useEffect as se, useState as ce } from "react";
|
|
6
|
+
import { createRoot as le } from "react-dom/client";
|
|
7
7
|
import { jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
8
8
|
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/createChainedFunction.js
|
|
9
|
-
var
|
|
9
|
+
var ue = p;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControlLabel/formControlLabelClasses.js
|
|
12
|
-
function
|
|
12
|
+
function de(e) {
|
|
13
13
|
return C("MuiFormControlLabel", e);
|
|
14
14
|
}
|
|
15
|
-
var Y =
|
|
15
|
+
var Y = w("MuiFormControlLabel", [
|
|
16
16
|
"root",
|
|
17
17
|
"labelPlacementStart",
|
|
18
18
|
"labelPlacementTop",
|
|
@@ -22,20 +22,20 @@ var Y = l("MuiFormControlLabel", [
|
|
|
22
22
|
"error",
|
|
23
23
|
"required",
|
|
24
24
|
"asterisk"
|
|
25
|
-
]),
|
|
26
|
-
let { classes: t, disabled: n, labelPlacement: r, error: i, required:
|
|
27
|
-
return
|
|
25
|
+
]), fe = (e) => {
|
|
26
|
+
let { classes: t, disabled: n, labelPlacement: r, error: i, required: a } = e;
|
|
27
|
+
return d({
|
|
28
28
|
root: [
|
|
29
29
|
"root",
|
|
30
30
|
n && "disabled",
|
|
31
|
-
`labelPlacement${
|
|
31
|
+
`labelPlacement${u(r)}`,
|
|
32
32
|
i && "error",
|
|
33
|
-
|
|
33
|
+
a && "required"
|
|
34
34
|
],
|
|
35
35
|
label: ["label", n && "disabled"],
|
|
36
36
|
asterisk: ["asterisk", i && "error"]
|
|
37
|
-
},
|
|
38
|
-
},
|
|
37
|
+
}, de, t);
|
|
38
|
+
}, pe = S("label", {
|
|
39
39
|
name: "MuiFormControlLabel",
|
|
40
40
|
slot: "Root",
|
|
41
41
|
overridesResolver: (e, t) => {
|
|
@@ -43,10 +43,10 @@ var Y = l("MuiFormControlLabel", [
|
|
|
43
43
|
return [
|
|
44
44
|
{ [`& .${Y.label}`]: t.label },
|
|
45
45
|
t.root,
|
|
46
|
-
t[`labelPlacement${
|
|
46
|
+
t[`labelPlacement${u(n.labelPlacement)}`]
|
|
47
47
|
];
|
|
48
48
|
}
|
|
49
|
-
})(
|
|
49
|
+
})(V(({ theme: e }) => ({
|
|
50
50
|
display: "inline-flex",
|
|
51
51
|
alignItems: "center",
|
|
52
52
|
cursor: "pointer",
|
|
@@ -77,16 +77,16 @@ var Y = l("MuiFormControlLabel", [
|
|
|
77
77
|
style: { marginLeft: 16 }
|
|
78
78
|
}
|
|
79
79
|
]
|
|
80
|
-
}))),
|
|
80
|
+
}))), me = S("span", {
|
|
81
81
|
name: "MuiFormControlLabel",
|
|
82
82
|
slot: "Asterisk"
|
|
83
|
-
})(
|
|
84
|
-
let n =
|
|
83
|
+
})(V(({ theme: e }) => ({ [`&.${Y.error}`]: { color: (e.vars || e).palette.error.main } }))), he = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
84
|
+
let n = r({
|
|
85
85
|
props: e,
|
|
86
86
|
name: "MuiFormControlLabel"
|
|
87
|
-
}), { checked:
|
|
87
|
+
}), { checked: i, className: a, componentsProps: s = {}, control: c, disabled: l, disableTypography: u, inputRef: d, label: f, labelPlacement: p = "end", name: m, onChange: h, required: _, slots: v = {}, slotProps: b = {}, value: x, ...S } = n, C = o(), w = l ?? c.props.disabled ?? C?.disabled, E = _ ?? c.props.required, D = {
|
|
88
88
|
disabled: w,
|
|
89
|
-
required:
|
|
89
|
+
required: E
|
|
90
90
|
};
|
|
91
91
|
[
|
|
92
92
|
"checked",
|
|
@@ -95,53 +95,53 @@ var Y = l("MuiFormControlLabel", [
|
|
|
95
95
|
"value",
|
|
96
96
|
"inputRef"
|
|
97
97
|
].forEach((e) => {
|
|
98
|
-
|
|
98
|
+
c.props[e] === void 0 && n[e] !== void 0 && (D[e] = n[e]);
|
|
99
99
|
});
|
|
100
|
-
let
|
|
100
|
+
let O = g({
|
|
101
101
|
props: n,
|
|
102
102
|
muiFormControl: C,
|
|
103
103
|
states: ["error"]
|
|
104
|
-
}),
|
|
104
|
+
}), k = {
|
|
105
105
|
...n,
|
|
106
106
|
disabled: w,
|
|
107
107
|
labelPlacement: p,
|
|
108
|
-
required:
|
|
109
|
-
error:
|
|
110
|
-
},
|
|
111
|
-
elementType:
|
|
108
|
+
required: E,
|
|
109
|
+
error: O.error
|
|
110
|
+
}, A = fe(k), [j, M] = y("typography", {
|
|
111
|
+
elementType: N,
|
|
112
112
|
externalForwardedProps: {
|
|
113
113
|
slots: v,
|
|
114
114
|
slotProps: {
|
|
115
|
-
...
|
|
116
|
-
...
|
|
115
|
+
...s,
|
|
116
|
+
...b
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
|
-
ownerState:
|
|
120
|
-
}),
|
|
121
|
-
return
|
|
119
|
+
ownerState: k
|
|
120
|
+
}), P = f;
|
|
121
|
+
return P != null && P.type !== N && !u && (P = /*#__PURE__*/ q(j, {
|
|
122
122
|
component: "span",
|
|
123
|
-
...
|
|
124
|
-
className:
|
|
125
|
-
children:
|
|
126
|
-
})), /*#__PURE__*/ J(
|
|
127
|
-
className:
|
|
128
|
-
ownerState:
|
|
123
|
+
...M,
|
|
124
|
+
className: T(A.label, M?.className),
|
|
125
|
+
children: P
|
|
126
|
+
})), /*#__PURE__*/ J(pe, {
|
|
127
|
+
className: T(A.root, a),
|
|
128
|
+
ownerState: k,
|
|
129
129
|
ref: t,
|
|
130
|
-
...
|
|
131
|
-
children: [/*#__PURE__*/ G.cloneElement(
|
|
132
|
-
ownerState:
|
|
130
|
+
...S,
|
|
131
|
+
children: [/*#__PURE__*/ G.cloneElement(c, D), E ? /*#__PURE__*/ J("div", { children: [P, /*#__PURE__*/ J(me, {
|
|
132
|
+
ownerState: k,
|
|
133
133
|
"aria-hidden": !0,
|
|
134
|
-
className:
|
|
134
|
+
className: A.asterisk,
|
|
135
135
|
children: [" ", "*"]
|
|
136
|
-
})] }) :
|
|
136
|
+
})] }) : P]
|
|
137
137
|
});
|
|
138
138
|
});
|
|
139
139
|
//#endregion
|
|
140
140
|
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/InputAdornment/inputAdornmentClasses.js
|
|
141
|
-
function
|
|
141
|
+
function ge(e) {
|
|
142
142
|
return C("MuiInputAdornment", e);
|
|
143
143
|
}
|
|
144
|
-
var
|
|
144
|
+
var _e = w("MuiInputAdornment", [
|
|
145
145
|
"root",
|
|
146
146
|
"filled",
|
|
147
147
|
"standard",
|
|
@@ -151,29 +151,29 @@ var ge = l("MuiInputAdornment", [
|
|
|
151
151
|
"disablePointerEvents",
|
|
152
152
|
"hiddenLabel",
|
|
153
153
|
"sizeSmall"
|
|
154
|
-
]),
|
|
154
|
+
]), ve, ye = (e, t) => {
|
|
155
155
|
let { ownerState: n } = e;
|
|
156
156
|
return [
|
|
157
157
|
t.root,
|
|
158
|
-
t[`position${
|
|
158
|
+
t[`position${u(n.position)}`],
|
|
159
159
|
n.disablePointerEvents === !0 && t.disablePointerEvents,
|
|
160
160
|
t[n.variant]
|
|
161
161
|
];
|
|
162
|
-
},
|
|
163
|
-
let { classes: t, disablePointerEvents: n, hiddenLabel: r, position: i, size:
|
|
164
|
-
return
|
|
162
|
+
}, be = (e) => {
|
|
163
|
+
let { classes: t, disablePointerEvents: n, hiddenLabel: r, position: i, size: a, variant: o } = e;
|
|
164
|
+
return d({ root: [
|
|
165
165
|
"root",
|
|
166
166
|
n && "disablePointerEvents",
|
|
167
|
-
i && `position${
|
|
168
|
-
|
|
167
|
+
i && `position${u(i)}`,
|
|
168
|
+
o,
|
|
169
169
|
r && "hiddenLabel",
|
|
170
|
-
|
|
171
|
-
] },
|
|
172
|
-
},
|
|
170
|
+
a && `size${u(a)}`
|
|
171
|
+
] }, ge, t);
|
|
172
|
+
}, xe = S("div", {
|
|
173
173
|
name: "MuiInputAdornment",
|
|
174
174
|
slot: "Root",
|
|
175
|
-
overridesResolver:
|
|
176
|
-
})(
|
|
175
|
+
overridesResolver: ye
|
|
176
|
+
})(V(({ theme: e }) => ({
|
|
177
177
|
display: "flex",
|
|
178
178
|
maxHeight: "2em",
|
|
179
179
|
alignItems: "center",
|
|
@@ -182,7 +182,7 @@ var ge = l("MuiInputAdornment", [
|
|
|
182
182
|
variants: [
|
|
183
183
|
{
|
|
184
184
|
props: { variant: "filled" },
|
|
185
|
-
style: { [`&.${
|
|
185
|
+
style: { [`&.${_e.positionStart}&:not(.${_e.hiddenLabel})`]: { marginTop: 16 } }
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
props: { position: "start" },
|
|
@@ -197,45 +197,45 @@ var ge = l("MuiInputAdornment", [
|
|
|
197
197
|
style: { pointerEvents: "none" }
|
|
198
198
|
}
|
|
199
199
|
]
|
|
200
|
-
}))),
|
|
201
|
-
let n =
|
|
200
|
+
}))), Se = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
201
|
+
let n = r({
|
|
202
202
|
props: e,
|
|
203
203
|
name: "MuiInputAdornment"
|
|
204
|
-
}), { children:
|
|
205
|
-
|
|
206
|
-
let
|
|
204
|
+
}), { children: i, className: s, component: c = "div", disablePointerEvents: l = !1, disableTypography: u = !1, position: d, variant: f, ...p } = n, m = o() || {}, h = f;
|
|
205
|
+
f && m.variant, m && !h && (h = m.variant);
|
|
206
|
+
let g = {
|
|
207
207
|
...n,
|
|
208
|
-
hiddenLabel:
|
|
209
|
-
size:
|
|
210
|
-
disablePointerEvents:
|
|
211
|
-
position:
|
|
212
|
-
variant:
|
|
213
|
-
},
|
|
214
|
-
return /*#__PURE__*/ q(
|
|
208
|
+
hiddenLabel: m.hiddenLabel,
|
|
209
|
+
size: m.size,
|
|
210
|
+
disablePointerEvents: l,
|
|
211
|
+
position: d,
|
|
212
|
+
variant: h
|
|
213
|
+
}, _ = be(g);
|
|
214
|
+
return /*#__PURE__*/ q(a.Provider, {
|
|
215
215
|
value: null,
|
|
216
|
-
children: /*#__PURE__*/ q(
|
|
217
|
-
as:
|
|
218
|
-
ownerState:
|
|
219
|
-
className:
|
|
216
|
+
children: /*#__PURE__*/ q(xe, {
|
|
217
|
+
as: c,
|
|
218
|
+
ownerState: g,
|
|
219
|
+
className: T(_.root, s),
|
|
220
220
|
ref: t,
|
|
221
|
-
...
|
|
222
|
-
children: typeof
|
|
221
|
+
...p,
|
|
222
|
+
children: typeof i == "string" && !u ? /*#__PURE__*/ q(N, {
|
|
223
223
|
color: "textSecondary",
|
|
224
|
-
children:
|
|
225
|
-
}) : /*#__PURE__*/ J(G.Fragment, { children: [
|
|
224
|
+
children: i
|
|
225
|
+
}) : /*#__PURE__*/ J(G.Fragment, { children: [d === "start" ? ve ||= /*#__PURE__*/ q("span", {
|
|
226
226
|
className: "notranslate",
|
|
227
227
|
"aria-hidden": !0,
|
|
228
228
|
children: ""
|
|
229
|
-
}) : null,
|
|
229
|
+
}) : null, i] })
|
|
230
230
|
})
|
|
231
231
|
});
|
|
232
|
-
}),
|
|
232
|
+
}), Ce = s(/*#__PURE__*/ q("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" }), "RadioButtonUnchecked"), we = s(/*#__PURE__*/ q("path", { d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z" }), "RadioButtonChecked"), Te = S("span", {
|
|
233
233
|
name: "MuiRadioButtonIcon",
|
|
234
|
-
shouldForwardProp:
|
|
234
|
+
shouldForwardProp: c
|
|
235
235
|
})({
|
|
236
236
|
position: "relative",
|
|
237
237
|
display: "flex"
|
|
238
|
-
}),
|
|
238
|
+
}), Ee = S(Ce, { name: "MuiRadioButtonIcon" })({ transform: "scale(1)" }), De = S(we, { name: "MuiRadioButtonIcon" })(V(({ theme: e }) => ({
|
|
239
239
|
left: 0,
|
|
240
240
|
position: "absolute",
|
|
241
241
|
transform: "scale(0)",
|
|
@@ -254,19 +254,19 @@ var ge = l("MuiInputAdornment", [
|
|
|
254
254
|
}
|
|
255
255
|
}]
|
|
256
256
|
})));
|
|
257
|
-
function
|
|
257
|
+
function Oe(e) {
|
|
258
258
|
let { checked: t = !1, classes: n = {}, fontSize: r } = e, i = {
|
|
259
259
|
...e,
|
|
260
260
|
checked: t
|
|
261
261
|
};
|
|
262
|
-
return /*#__PURE__*/ J(
|
|
262
|
+
return /*#__PURE__*/ J(Te, {
|
|
263
263
|
className: n.root,
|
|
264
264
|
ownerState: i,
|
|
265
|
-
children: [/*#__PURE__*/ q(
|
|
265
|
+
children: [/*#__PURE__*/ q(Ee, {
|
|
266
266
|
fontSize: r,
|
|
267
267
|
className: n.background,
|
|
268
268
|
ownerState: i
|
|
269
|
-
}), /*#__PURE__*/ q(
|
|
269
|
+
}), /*#__PURE__*/ q(De, {
|
|
270
270
|
fontSize: r,
|
|
271
271
|
className: n.dot,
|
|
272
272
|
ownerState: i
|
|
@@ -275,49 +275,49 @@ function De(e) {
|
|
|
275
275
|
}
|
|
276
276
|
//#endregion
|
|
277
277
|
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/RadioGroupContext.js
|
|
278
|
-
var
|
|
278
|
+
var ke = /*#__PURE__*/ G.createContext(void 0);
|
|
279
279
|
//#endregion
|
|
280
280
|
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/useRadioGroup.js
|
|
281
|
-
function
|
|
282
|
-
return G.useContext(
|
|
281
|
+
function Ae() {
|
|
282
|
+
return G.useContext(ke);
|
|
283
283
|
}
|
|
284
284
|
//#endregion
|
|
285
285
|
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Radio/radioClasses.js
|
|
286
|
-
function
|
|
286
|
+
function je(e) {
|
|
287
287
|
return C("MuiRadio", e);
|
|
288
288
|
}
|
|
289
|
-
var
|
|
289
|
+
var Me = w("MuiRadio", [
|
|
290
290
|
"root",
|
|
291
291
|
"checked",
|
|
292
292
|
"disabled",
|
|
293
293
|
"colorPrimary",
|
|
294
294
|
"colorSecondary",
|
|
295
295
|
"sizeSmall"
|
|
296
|
-
]),
|
|
296
|
+
]), Ne = (e) => {
|
|
297
297
|
let { classes: t, color: n, size: r } = e, i = { root: [
|
|
298
298
|
"root",
|
|
299
|
-
`color${
|
|
300
|
-
r !== "medium" && `size${
|
|
299
|
+
`color${u(n)}`,
|
|
300
|
+
r !== "medium" && `size${u(r)}`
|
|
301
301
|
] };
|
|
302
302
|
return {
|
|
303
303
|
...t,
|
|
304
|
-
...
|
|
304
|
+
...d(i, je, t)
|
|
305
305
|
};
|
|
306
|
-
},
|
|
307
|
-
shouldForwardProp: (e) =>
|
|
306
|
+
}, Pe = S(j, {
|
|
307
|
+
shouldForwardProp: (e) => c(e) || e === "classes",
|
|
308
308
|
name: "MuiRadio",
|
|
309
309
|
slot: "Root",
|
|
310
310
|
overridesResolver: (e, t) => {
|
|
311
311
|
let { ownerState: n } = e;
|
|
312
312
|
return [
|
|
313
313
|
t.root,
|
|
314
|
-
n.size !== "medium" && t[`size${
|
|
315
|
-
t[`color${
|
|
314
|
+
n.size !== "medium" && t[`size${u(n.size)}`],
|
|
315
|
+
t[`color${u(n.color)}`]
|
|
316
316
|
];
|
|
317
317
|
}
|
|
318
|
-
})(
|
|
318
|
+
})(V(({ theme: e }) => ({
|
|
319
319
|
color: (e.vars || e).palette.text.secondary,
|
|
320
|
-
[`&.${
|
|
320
|
+
[`&.${Me.disabled}`]: { color: (e.vars || e).palette.action.disabled },
|
|
321
321
|
variants: [
|
|
322
322
|
{
|
|
323
323
|
props: {
|
|
@@ -327,7 +327,7 @@ var je = l("MuiRadio", [
|
|
|
327
327
|
},
|
|
328
328
|
style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity) } }
|
|
329
329
|
},
|
|
330
|
-
...Object.entries(e.palette).filter(
|
|
330
|
+
...Object.entries(e.palette).filter(n()).map(([t]) => ({
|
|
331
331
|
props: {
|
|
332
332
|
color: t,
|
|
333
333
|
disabled: !1,
|
|
@@ -335,12 +335,12 @@ var je = l("MuiRadio", [
|
|
|
335
335
|
},
|
|
336
336
|
style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.hoverOpacity) } }
|
|
337
337
|
})),
|
|
338
|
-
...Object.entries(e.palette).filter(
|
|
338
|
+
...Object.entries(e.palette).filter(n()).map(([t]) => ({
|
|
339
339
|
props: {
|
|
340
340
|
color: t,
|
|
341
341
|
disabled: !1
|
|
342
342
|
},
|
|
343
|
-
style: { [`&.${
|
|
343
|
+
style: { [`&.${Me.checked}`]: { color: (e.vars || e).palette[t].main } }
|
|
344
344
|
})),
|
|
345
345
|
{
|
|
346
346
|
props: { disableRipple: !1 },
|
|
@@ -348,27 +348,27 @@ var je = l("MuiRadio", [
|
|
|
348
348
|
}
|
|
349
349
|
]
|
|
350
350
|
})));
|
|
351
|
-
function
|
|
351
|
+
function Fe(e, t) {
|
|
352
352
|
return typeof t == "object" && t ? e === t : String(e) === String(t);
|
|
353
353
|
}
|
|
354
|
-
var
|
|
355
|
-
let n =
|
|
354
|
+
var Ie = /*#__PURE__*/ q(Oe, { checked: !0 }), Le = /*#__PURE__*/ q(Oe, {}), Re = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
355
|
+
let n = r({
|
|
356
356
|
props: e,
|
|
357
357
|
name: "MuiRadio"
|
|
358
|
-
}), { checked:
|
|
359
|
-
|
|
360
|
-
let
|
|
358
|
+
}), { checked: i, checkedIcon: a = Ie, color: s = "primary", icon: c = Le, name: l, onChange: u, size: d = "medium", className: f, disabled: p, disableRipple: m = !1, slots: h = {}, slotProps: g = {}, inputProps: _, ...v } = n, b = o(), x = p;
|
|
359
|
+
b && x === void 0 && (x = b.disabled), x ??= !1;
|
|
360
|
+
let S = {
|
|
361
361
|
...n,
|
|
362
|
-
disabled:
|
|
362
|
+
disabled: x,
|
|
363
363
|
disableRipple: m,
|
|
364
|
-
color:
|
|
365
|
-
size:
|
|
366
|
-
}, C =
|
|
367
|
-
w && (
|
|
368
|
-
let
|
|
364
|
+
color: s,
|
|
365
|
+
size: d
|
|
366
|
+
}, C = Ne(S), w = Ae(), E = i, D = ue(u, w && w.onChange), O = l;
|
|
367
|
+
w && (E === void 0 && (E = Fe(w.value, n.value)), O === void 0 && (O = w.name));
|
|
368
|
+
let k = g.input ?? _, [A, j] = y("root", {
|
|
369
369
|
ref: t,
|
|
370
|
-
elementType:
|
|
371
|
-
className:
|
|
370
|
+
elementType: Pe,
|
|
371
|
+
className: T(C.root, f),
|
|
372
372
|
shouldForwardComponentProp: !0,
|
|
373
373
|
externalForwardedProps: {
|
|
374
374
|
slots: h,
|
|
@@ -378,32 +378,32 @@ var Fe = /*#__PURE__*/ q(De, { checked: !0 }), Ie = /*#__PURE__*/ q(De, {}), Le
|
|
|
378
378
|
getSlotProps: (e) => ({
|
|
379
379
|
...e,
|
|
380
380
|
onChange: (t, ...n) => {
|
|
381
|
-
e.onChange?.(t, ...n),
|
|
381
|
+
e.onChange?.(t, ...n), D(t, ...n);
|
|
382
382
|
}
|
|
383
383
|
}),
|
|
384
|
-
ownerState:
|
|
384
|
+
ownerState: S,
|
|
385
385
|
additionalProps: {
|
|
386
386
|
type: "radio",
|
|
387
|
-
icon: /*#__PURE__*/ G.cloneElement(
|
|
388
|
-
checkedIcon: /*#__PURE__*/ G.cloneElement(a, { fontSize: a.props.fontSize ??
|
|
389
|
-
disabled:
|
|
390
|
-
name:
|
|
391
|
-
checked:
|
|
387
|
+
icon: /*#__PURE__*/ G.cloneElement(c, { fontSize: c.props.fontSize ?? d }),
|
|
388
|
+
checkedIcon: /*#__PURE__*/ G.cloneElement(a, { fontSize: a.props.fontSize ?? d }),
|
|
389
|
+
disabled: x,
|
|
390
|
+
name: O,
|
|
391
|
+
checked: E,
|
|
392
392
|
slots: h,
|
|
393
|
-
slotProps: { input: typeof
|
|
393
|
+
slotProps: { input: typeof k == "function" ? k(S) : k }
|
|
394
394
|
}
|
|
395
395
|
});
|
|
396
|
-
return /*#__PURE__*/ q(
|
|
397
|
-
...
|
|
396
|
+
return /*#__PURE__*/ q(A, {
|
|
397
|
+
...j,
|
|
398
398
|
classes: C
|
|
399
399
|
});
|
|
400
400
|
});
|
|
401
401
|
//#endregion
|
|
402
402
|
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Switch/switchClasses.js
|
|
403
|
-
function
|
|
403
|
+
function ze(e) {
|
|
404
404
|
return C("MuiSwitch", e);
|
|
405
405
|
}
|
|
406
|
-
var X =
|
|
406
|
+
var X = w("MuiSwitch", [
|
|
407
407
|
"root",
|
|
408
408
|
"edgeStart",
|
|
409
409
|
"edgeEnd",
|
|
@@ -417,36 +417,36 @@ var X = l("MuiSwitch", [
|
|
|
417
417
|
"input",
|
|
418
418
|
"thumb",
|
|
419
419
|
"track"
|
|
420
|
-
]),
|
|
421
|
-
let { classes: t, edge: n, size: r, color: i, checked:
|
|
420
|
+
]), Be = (e) => {
|
|
421
|
+
let { classes: t, edge: n, size: r, color: i, checked: a, disabled: o } = e, s = d({
|
|
422
422
|
root: [
|
|
423
423
|
"root",
|
|
424
|
-
n && `edge${
|
|
425
|
-
`size${
|
|
424
|
+
n && `edge${u(n)}`,
|
|
425
|
+
`size${u(r)}`
|
|
426
426
|
],
|
|
427
427
|
switchBase: [
|
|
428
428
|
"switchBase",
|
|
429
|
-
`color${
|
|
430
|
-
|
|
431
|
-
|
|
429
|
+
`color${u(i)}`,
|
|
430
|
+
a && "checked",
|
|
431
|
+
o && "disabled"
|
|
432
432
|
],
|
|
433
433
|
thumb: ["thumb"],
|
|
434
434
|
track: ["track"],
|
|
435
435
|
input: ["input"]
|
|
436
|
-
},
|
|
436
|
+
}, ze, t);
|
|
437
437
|
return {
|
|
438
438
|
...t,
|
|
439
|
-
...
|
|
439
|
+
...s
|
|
440
440
|
};
|
|
441
|
-
},
|
|
441
|
+
}, Ve = S("span", {
|
|
442
442
|
name: "MuiSwitch",
|
|
443
443
|
slot: "Root",
|
|
444
444
|
overridesResolver: (e, t) => {
|
|
445
445
|
let { ownerState: n } = e;
|
|
446
446
|
return [
|
|
447
447
|
t.root,
|
|
448
|
-
n.edge && t[`edge${
|
|
449
|
-
t[`size${
|
|
448
|
+
n.edge && t[`edge${u(n.edge)}`],
|
|
449
|
+
t[`size${u(n.size)}`]
|
|
450
450
|
];
|
|
451
451
|
}
|
|
452
452
|
})({
|
|
@@ -487,7 +487,7 @@ var X = l("MuiSwitch", [
|
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
]
|
|
490
|
-
}),
|
|
490
|
+
}), He = S(j, {
|
|
491
491
|
name: "MuiSwitch",
|
|
492
492
|
slot: "SwitchBase",
|
|
493
493
|
overridesResolver: (e, t) => {
|
|
@@ -495,10 +495,10 @@ var X = l("MuiSwitch", [
|
|
|
495
495
|
return [
|
|
496
496
|
t.switchBase,
|
|
497
497
|
{ [`& .${X.input}`]: t.input },
|
|
498
|
-
n.color !== "default" && t[`color${
|
|
498
|
+
n.color !== "default" && t[`color${u(n.color)}`]
|
|
499
499
|
];
|
|
500
500
|
}
|
|
501
|
-
})(
|
|
501
|
+
})(V(({ theme: e }) => ({
|
|
502
502
|
position: "absolute",
|
|
503
503
|
top: 0,
|
|
504
504
|
left: 0,
|
|
@@ -513,12 +513,12 @@ var X = l("MuiSwitch", [
|
|
|
513
513
|
left: "-100%",
|
|
514
514
|
width: "300%"
|
|
515
515
|
}
|
|
516
|
-
})),
|
|
516
|
+
})), V(({ theme: e }) => ({
|
|
517
517
|
"&:hover": {
|
|
518
518
|
backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity),
|
|
519
519
|
"@media (hover: none)": { backgroundColor: "transparent" }
|
|
520
520
|
},
|
|
521
|
-
variants: [...Object.entries(e.palette).filter(
|
|
521
|
+
variants: [...Object.entries(e.palette).filter(n(["light"])).map(([t]) => ({
|
|
522
522
|
props: { color: t },
|
|
523
523
|
style: {
|
|
524
524
|
[`&.${X.checked}`]: {
|
|
@@ -532,10 +532,10 @@ var X = l("MuiSwitch", [
|
|
|
532
532
|
[`&.${X.checked} + .${X.track}`]: { backgroundColor: (e.vars || e).palette[t].main }
|
|
533
533
|
}
|
|
534
534
|
}))]
|
|
535
|
-
}))),
|
|
535
|
+
}))), Ue = S("span", {
|
|
536
536
|
name: "MuiSwitch",
|
|
537
537
|
slot: "Track"
|
|
538
|
-
})(
|
|
538
|
+
})(V(({ theme: e }) => ({
|
|
539
539
|
height: "100%",
|
|
540
540
|
width: "100%",
|
|
541
541
|
borderRadius: 14 / 2,
|
|
@@ -545,10 +545,10 @@ var X = l("MuiSwitch", [
|
|
|
545
545
|
transition: e.transitions.create(["opacity", "background-color"], { duration: e.transitions.duration.shortest }),
|
|
546
546
|
backgroundColor: e.vars ? e.vars.palette.common.onBackground : `${e.palette.mode === "light" ? e.palette.common.black : e.palette.common.white}`,
|
|
547
547
|
opacity: e.vars ? e.vars.opacity.switchTrack : `${e.palette.mode === "light" ? .38 : .3}`
|
|
548
|
-
}))),
|
|
548
|
+
}))), We = S("span", {
|
|
549
549
|
name: "MuiSwitch",
|
|
550
550
|
slot: "Thumb"
|
|
551
|
-
})(
|
|
551
|
+
})(V(({ theme: e }) => ({
|
|
552
552
|
boxShadow: (e.vars || e).shadows[1],
|
|
553
553
|
backgroundColor: "currentColor",
|
|
554
554
|
boxSizing: "border-box",
|
|
@@ -556,70 +556,70 @@ var X = l("MuiSwitch", [
|
|
|
556
556
|
width: 20,
|
|
557
557
|
height: 20,
|
|
558
558
|
borderRadius: "50%"
|
|
559
|
-
}))),
|
|
560
|
-
let n =
|
|
559
|
+
}))), Ge = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
560
|
+
let n = r({
|
|
561
561
|
props: e,
|
|
562
562
|
name: "MuiSwitch"
|
|
563
|
-
}), { className:
|
|
563
|
+
}), { className: i, color: a = "primary", edge: o = !1, size: s = "medium", sx: c, slots: l = {}, slotProps: u = {}, ...d } = n, f = {
|
|
564
564
|
...n,
|
|
565
|
-
color:
|
|
566
|
-
edge:
|
|
567
|
-
size:
|
|
568
|
-
},
|
|
569
|
-
slots:
|
|
570
|
-
slotProps:
|
|
571
|
-
}, [
|
|
572
|
-
className:
|
|
573
|
-
elementType:
|
|
574
|
-
externalForwardedProps:
|
|
565
|
+
color: a,
|
|
566
|
+
edge: o,
|
|
567
|
+
size: s
|
|
568
|
+
}, p = Be(f), m = u.input, h = {
|
|
569
|
+
slots: l,
|
|
570
|
+
slotProps: u
|
|
571
|
+
}, [g, v] = y("root", {
|
|
572
|
+
className: T(p.root, i),
|
|
573
|
+
elementType: Ve,
|
|
574
|
+
externalForwardedProps: h,
|
|
575
575
|
ownerState: f,
|
|
576
|
-
additionalProps: { sx:
|
|
577
|
-
}), [
|
|
578
|
-
className:
|
|
579
|
-
elementType:
|
|
580
|
-
externalForwardedProps:
|
|
576
|
+
additionalProps: { sx: c }
|
|
577
|
+
}), [b, x] = y("thumb", {
|
|
578
|
+
className: p.thumb,
|
|
579
|
+
elementType: We,
|
|
580
|
+
externalForwardedProps: h,
|
|
581
581
|
ownerState: f
|
|
582
|
-
}),
|
|
583
|
-
className:
|
|
584
|
-
elementType:
|
|
585
|
-
externalForwardedProps:
|
|
582
|
+
}), S = /*#__PURE__*/ q(b, { ...x }), [C, w] = y("track", {
|
|
583
|
+
className: p.track,
|
|
584
|
+
elementType: Ue,
|
|
585
|
+
externalForwardedProps: h,
|
|
586
586
|
ownerState: f
|
|
587
587
|
});
|
|
588
|
-
return /*#__PURE__*/ J(
|
|
588
|
+
return /*#__PURE__*/ J(g, {
|
|
589
589
|
...v,
|
|
590
|
-
children: [/*#__PURE__*/ q(
|
|
590
|
+
children: [/*#__PURE__*/ q(He, {
|
|
591
591
|
type: "checkbox",
|
|
592
|
-
icon:
|
|
593
|
-
checkedIcon:
|
|
592
|
+
icon: S,
|
|
593
|
+
checkedIcon: S,
|
|
594
594
|
ref: t,
|
|
595
595
|
ownerState: f,
|
|
596
|
-
...
|
|
596
|
+
...d,
|
|
597
597
|
classes: {
|
|
598
|
-
...
|
|
599
|
-
root:
|
|
598
|
+
...p,
|
|
599
|
+
root: p.switchBase
|
|
600
600
|
},
|
|
601
601
|
slots: {
|
|
602
|
-
...
|
|
603
|
-
...
|
|
602
|
+
...l.switchBase && { root: l.switchBase },
|
|
603
|
+
...l.input && { input: l.input }
|
|
604
604
|
},
|
|
605
605
|
slotProps: {
|
|
606
|
-
...
|
|
607
|
-
input:
|
|
606
|
+
...u.switchBase && { root: typeof u.switchBase == "function" ? u.switchBase(f) : u.switchBase },
|
|
607
|
+
input: _(typeof m == "function" ? m(f) : m, { role: "switch" })
|
|
608
608
|
}
|
|
609
609
|
}), /*#__PURE__*/ q(C, { ...w })]
|
|
610
610
|
});
|
|
611
|
-
}),
|
|
611
|
+
}), Ke = /* @__PURE__ */ e(ie(), 1), Z = /* @__PURE__ */ e(t(), 1), qe = S(he)(() => ({ "& .MuiFormControlLabel-label": {
|
|
612
612
|
left: "-5px",
|
|
613
613
|
position: "relative"
|
|
614
|
-
} })),
|
|
614
|
+
} })), Je = S(Re)(() => ({ color: `${l.tertiary()} !important` })), Ye = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ q(qe, {
|
|
615
615
|
value: t,
|
|
616
|
-
control: /* @__PURE__ */ q(
|
|
616
|
+
control: /* @__PURE__ */ q(Je, {
|
|
617
617
|
checked: n,
|
|
618
618
|
onChange: r
|
|
619
619
|
}),
|
|
620
620
|
label: e
|
|
621
621
|
});
|
|
622
|
-
|
|
622
|
+
Ye.propTypes = {
|
|
623
623
|
label: Z.default.string,
|
|
624
624
|
value: Z.default.string,
|
|
625
625
|
checked: Z.default.bool,
|
|
@@ -627,7 +627,7 @@ Je.propTypes = {
|
|
|
627
627
|
};
|
|
628
628
|
//#endregion
|
|
629
629
|
//#region ../../lib-react/config-ui/dist/tabs/index.js
|
|
630
|
-
var
|
|
630
|
+
var Xe = S(O)(() => ({})), Ze = class extends K.Component {
|
|
631
631
|
static propTypes = {
|
|
632
632
|
className: Z.default.string,
|
|
633
633
|
contentClassName: Z.default.string,
|
|
@@ -644,11 +644,11 @@ var Ye = y(D)(() => ({})), Xe = class extends K.Component {
|
|
|
644
644
|
let { value: e } = this.state, { children: t, className: n, contentClassName: r, contentStyle: i = {} } = this.props;
|
|
645
645
|
return /* @__PURE__ */ J("div", {
|
|
646
646
|
className: n,
|
|
647
|
-
children: [/* @__PURE__ */ q(
|
|
647
|
+
children: [/* @__PURE__ */ q(M, {
|
|
648
648
|
indicatorColor: "primary",
|
|
649
649
|
value: e,
|
|
650
650
|
onChange: this.handleChange,
|
|
651
|
-
children: K.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ q(
|
|
651
|
+
children: K.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ q(Xe, { label: e.props.title }, t) : null)
|
|
652
652
|
}), /* @__PURE__ */ q("div", {
|
|
653
653
|
className: r,
|
|
654
654
|
style: i,
|
|
@@ -656,7 +656,7 @@ var Ye = y(D)(() => ({})), Xe = class extends K.Component {
|
|
|
656
656
|
})]
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
|
-
},
|
|
659
|
+
}, Qe = S(he)(({ theme: e, mini: t }) => ({
|
|
660
660
|
margin: 0,
|
|
661
661
|
marginLeft: 0,
|
|
662
662
|
padding: 0,
|
|
@@ -666,12 +666,12 @@ var Ye = y(D)(() => ({})), Xe = class extends K.Component {
|
|
|
666
666
|
color: "rgba(0,0,0,1.0)",
|
|
667
667
|
...t && {
|
|
668
668
|
marginLeft: e.spacing(1),
|
|
669
|
-
color:
|
|
669
|
+
color: I[700],
|
|
670
670
|
fontSize: e.typography.fontSize - 3
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
|
-
})),
|
|
674
|
-
color: `${
|
|
673
|
+
})), $e = S(L)(({ theme: e, mini: t, error: n }) => ({
|
|
674
|
+
color: `${l.tertiary()} !important`,
|
|
675
675
|
...t && {
|
|
676
676
|
margin: 0,
|
|
677
677
|
padding: 0,
|
|
@@ -679,9 +679,9 @@ var Ye = y(D)(() => ({})), Xe = class extends K.Component {
|
|
|
679
679
|
height: e.spacing(3)
|
|
680
680
|
},
|
|
681
681
|
...n && { color: `${e.palette.error.main} !important` }
|
|
682
|
-
})),
|
|
682
|
+
})), et = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ q(Qe, {
|
|
683
683
|
mini: e,
|
|
684
|
-
control: /* @__PURE__ */ q(
|
|
684
|
+
control: /* @__PURE__ */ q($e, {
|
|
685
685
|
checked: t,
|
|
686
686
|
onChange: n,
|
|
687
687
|
value: r,
|
|
@@ -690,21 +690,21 @@ var Ye = y(D)(() => ({})), Xe = class extends K.Component {
|
|
|
690
690
|
}),
|
|
691
691
|
label: i
|
|
692
692
|
});
|
|
693
|
-
|
|
693
|
+
et.propTypes = {
|
|
694
694
|
mini: Z.default.bool,
|
|
695
695
|
checked: Z.default.bool.isRequired,
|
|
696
696
|
onChange: Z.default.func.isRequired,
|
|
697
697
|
value: Z.default.string,
|
|
698
698
|
label: Z.default.string.isRequired,
|
|
699
699
|
error: Z.default.bool
|
|
700
|
-
},
|
|
700
|
+
}, et.defaultProps = {
|
|
701
701
|
value: "",
|
|
702
702
|
mini: !1,
|
|
703
703
|
error: !1
|
|
704
704
|
};
|
|
705
705
|
//#endregion
|
|
706
706
|
//#region ../../lib-react/config-ui/dist/number-text-field.js
|
|
707
|
-
var
|
|
707
|
+
var tt = (0, Ke.default)("@pie-lib:config-ui:number-text-field"), nt = S(ee)(({ theme: e }) => ({
|
|
708
708
|
marginRight: e.spacing(1),
|
|
709
709
|
"& .MuiInputLabel-root": {
|
|
710
710
|
width: "auto",
|
|
@@ -726,11 +726,11 @@ var et = (0, Ge.default)("@pie-lib:config-ui:number-text-field"), tt = y(z)(({ t
|
|
|
726
726
|
minHeight: "auto",
|
|
727
727
|
padding: "6px 0 7px"
|
|
728
728
|
}
|
|
729
|
-
})),
|
|
730
|
-
if (!
|
|
731
|
-
if (!
|
|
732
|
-
if (
|
|
733
|
-
},
|
|
729
|
+
})), rt = (e, t) => {
|
|
730
|
+
if (!H(e) && !H(t)) return 0;
|
|
731
|
+
if (!H(e) && H(t)) return t;
|
|
732
|
+
if (H(e)) return e;
|
|
733
|
+
}, it = class extends K.Component {
|
|
734
734
|
static propTypes = {
|
|
735
735
|
disabled: Z.default.bool,
|
|
736
736
|
className: Z.default.string,
|
|
@@ -756,13 +756,13 @@ var et = (0, Ge.default)("@pie-lib:config-ui:number-text-field"), tt = y(z)(({ t
|
|
|
756
756
|
this.setState({ value: t });
|
|
757
757
|
}
|
|
758
758
|
clamp(e, t = this.props.min, n = this.props.max) {
|
|
759
|
-
return
|
|
759
|
+
return H(e) ? (H(n) && (e = Math.min(e, n)), H(t) && (e = Math.max(e, t)), e) : rt(t, n);
|
|
760
760
|
}
|
|
761
761
|
onBlur = (e) => {
|
|
762
762
|
let t = e.target.value, n = parseFloat(t);
|
|
763
|
-
|
|
763
|
+
tt("rawNumber: ", n);
|
|
764
764
|
let r = this.clamp(n);
|
|
765
|
-
|
|
765
|
+
tt("number: ", r), r !== this.state.value && (tt("trigger update..."), this.setState({ value: r.toString() }, () => {
|
|
766
766
|
this.props.onChange(e, r);
|
|
767
767
|
}));
|
|
768
768
|
};
|
|
@@ -782,7 +782,7 @@ var et = (0, Ge.default)("@pie-lib:config-ui:number-text-field"), tt = y(z)(({ t
|
|
|
782
782
|
};
|
|
783
783
|
render() {
|
|
784
784
|
let { className: e, label: t, disabled: n, suffix: r, min: i, max: a, inputClassName: o, disableUnderline: s, showErrorWhenOutsideRange: c, variant: l } = this.props, u = c && this.getError();
|
|
785
|
-
return /* @__PURE__ */ q(
|
|
785
|
+
return /* @__PURE__ */ q(nt, {
|
|
786
786
|
variant: s ? "filled" : l || "standard",
|
|
787
787
|
inputRef: (e) => {
|
|
788
788
|
this.inputRef = e;
|
|
@@ -801,7 +801,7 @@ var et = (0, Ge.default)("@pie-lib:config-ui:number-text-field"), tt = y(z)(({ t
|
|
|
801
801
|
type: "number",
|
|
802
802
|
className: e,
|
|
803
803
|
slotProps: { input: {
|
|
804
|
-
endAdornment: r && /* @__PURE__ */ q(
|
|
804
|
+
endAdornment: r && /* @__PURE__ */ q(Se, {
|
|
805
805
|
position: "end",
|
|
806
806
|
children: r
|
|
807
807
|
}),
|
|
@@ -814,12 +814,12 @@ var et = (0, Ge.default)("@pie-lib:config-ui:number-text-field"), tt = y(z)(({ t
|
|
|
814
814
|
margin: "normal"
|
|
815
815
|
});
|
|
816
816
|
}
|
|
817
|
-
},
|
|
817
|
+
}, at = (e) => typeof e == "object" && !!e && typeof e.n == "number" && typeof e.d == "number", ot = (e) => {
|
|
818
818
|
if (typeof e == "number") return e;
|
|
819
|
-
if (
|
|
819
|
+
if (at(e)) return (e.s ?? 1) * e.n / e.d;
|
|
820
820
|
let t = String(e).trim(), n = t.match(/^([+-]?\d+)\s*\/\s*([+-]?\d+)$/);
|
|
821
821
|
return n ? Number.parseInt(n[1] ?? "0", 10) / Number.parseInt(n[2] ?? "1", 10) : Number(t);
|
|
822
|
-
},
|
|
822
|
+
}, st = s(/*#__PURE__*/ q("path", { d: "M19 13H5v-2h14z" }), "Remove"), ct = s(/*#__PURE__*/ q("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z" }), "Add"), lt = S(ee)(() => ({
|
|
823
823
|
"& input[type=number]": { MozAppearance: "textfield" },
|
|
824
824
|
"& input[type=number]::-webkit-outer-spin-button": {
|
|
825
825
|
WebkitAppearance: "none",
|
|
@@ -829,11 +829,11 @@ var et = (0, Ge.default)("@pie-lib:config-ui:number-text-field"), tt = y(z)(({ t
|
|
|
829
829
|
WebkitAppearance: "none",
|
|
830
830
|
margin: 0
|
|
831
831
|
}
|
|
832
|
-
})),
|
|
833
|
-
if (!
|
|
834
|
-
if (!
|
|
835
|
-
if (
|
|
836
|
-
},
|
|
832
|
+
})), ut = S(E)(() => ({ padding: "2px" })), dt = (e, t) => {
|
|
833
|
+
if (!H(e) && !H(t)) return 0;
|
|
834
|
+
if (!H(e) && H(t)) return t;
|
|
835
|
+
if (H(e)) return e;
|
|
836
|
+
}, ft = class extends K.Component {
|
|
837
837
|
static propTypes = {
|
|
838
838
|
className: Z.default.string,
|
|
839
839
|
customValues: Z.default.array,
|
|
@@ -877,7 +877,7 @@ var et = (0, Ge.default)("@pie-lib:config-ui:number-text-field"), tt = y(z)(({ t
|
|
|
877
877
|
}
|
|
878
878
|
clamp(e, t = this.props.min, n = this.props.max) {
|
|
879
879
|
let { customValues: r } = this.props;
|
|
880
|
-
return (r || []).length > 0 ? e :
|
|
880
|
+
return (r || []).length > 0 ? e : H(e) ? (H(n) && (e = Math.min(e, n)), H(t) && (e = Math.max(e, t)), e) : dt(t, n);
|
|
881
881
|
}
|
|
882
882
|
normalizeValueAndIndex = (e, t, n, r) => {
|
|
883
883
|
let { type: i } = this.props, a = this.clamp(t, n, r), o = (e || []).findIndex((e) => e === a);
|
|
@@ -900,7 +900,7 @@ var et = (0, Ge.default)("@pie-lib:config-ui:number-text-field"), tt = y(z)(({ t
|
|
|
900
900
|
value: e[0],
|
|
901
901
|
index: 0
|
|
902
902
|
});
|
|
903
|
-
getClosestFractionValue = (e, t) => e.reduce((e, n, r) => Math.abs(
|
|
903
|
+
getClosestFractionValue = (e, t) => e.reduce((e, n, r) => Math.abs(ot(n) - ot(t)) < Math.abs(ot(e.value) - ot(t)) ? {
|
|
904
904
|
value: n,
|
|
905
905
|
index: r
|
|
906
906
|
} : e, {
|
|
@@ -948,7 +948,7 @@ var et = (0, Ge.default)("@pie-lib:config-ui:number-text-field"), tt = y(z)(({ t
|
|
|
948
948
|
}
|
|
949
949
|
render() {
|
|
950
950
|
let { className: e, label: t, disabled: n, error: r, min: i, max: a, customValues: o, inputClassName: s, disableUnderline: c, helperText: l, variant: u, textAlign: d, type: f = "number" } = this.props, { value: p } = this.state, m = e, h = !1, g = !1;
|
|
951
|
-
return o.length > 0 ? (h = p === o[0], g = p === o[o.length - 1]) :
|
|
951
|
+
return o.length > 0 ? (h = p === o[0], g = p === o[o.length - 1]) : H(i) && H(a) && (h = p === i, g = p === a), /* @__PURE__ */ q(lt, {
|
|
952
952
|
variant: u,
|
|
953
953
|
inputRef: (e) => this.inputRef = e,
|
|
954
954
|
disabled: n,
|
|
@@ -970,22 +970,22 @@ var et = (0, Ge.default)("@pie-lib:config-ui:number-text-field"), tt = y(z)(({ t
|
|
|
970
970
|
InputProps: {
|
|
971
971
|
className: s,
|
|
972
972
|
disableUnderline: c,
|
|
973
|
-
startAdornment: /* @__PURE__ */ q(
|
|
973
|
+
startAdornment: /* @__PURE__ */ q(Se, {
|
|
974
974
|
position: "start",
|
|
975
|
-
children: /* @__PURE__ */ q(
|
|
975
|
+
children: /* @__PURE__ */ q(ut, {
|
|
976
976
|
disabled: n || h,
|
|
977
977
|
onClick: (e) => this.changeValue(e, -1, !0),
|
|
978
978
|
size: "large",
|
|
979
|
-
children: /* @__PURE__ */ q(
|
|
979
|
+
children: /* @__PURE__ */ q(st, { fontSize: "small" })
|
|
980
980
|
})
|
|
981
981
|
}),
|
|
982
|
-
endAdornment: /* @__PURE__ */ q(
|
|
982
|
+
endAdornment: /* @__PURE__ */ q(Se, {
|
|
983
983
|
position: "end",
|
|
984
|
-
children: /* @__PURE__ */ q(
|
|
984
|
+
children: /* @__PURE__ */ q(ut, {
|
|
985
985
|
disabled: n || g,
|
|
986
986
|
onClick: (e) => this.changeValue(e, 1, !0),
|
|
987
987
|
size: "large",
|
|
988
|
-
children: /* @__PURE__ */ q(
|
|
988
|
+
children: /* @__PURE__ */ q(ct, { fontSize: "small" })
|
|
989
989
|
})
|
|
990
990
|
})
|
|
991
991
|
},
|
|
@@ -999,19 +999,19 @@ var et = (0, Ge.default)("@pie-lib:config-ui:number-text-field"), tt = y(z)(({ t
|
|
|
999
999
|
};
|
|
1000
1000
|
//#endregion
|
|
1001
1001
|
//#region ../../lib-react/config-ui/dist/two-choice.js
|
|
1002
|
-
function
|
|
1002
|
+
function pt(e) {
|
|
1003
1003
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1006
|
-
return !e ||
|
|
1005
|
+
function mt(e, t) {
|
|
1006
|
+
return !e || pt(e) ? e : pt(e.default) ? e.default : t && pt(e[t]) ? e[t] : t && pt(e[t]?.default) ? e[t].default : e;
|
|
1007
1007
|
}
|
|
1008
|
-
var
|
|
1008
|
+
var ht = mt(i, "InputContainer") || mt(vt.InputContainer, "InputContainer"), gt = B, _t = gt.default, vt = _t && typeof _t == "object" ? _t : gt, yt = S("div")(({ theme: e, direction: t }) => ({
|
|
1009
1009
|
display: "flex",
|
|
1010
1010
|
flexWrap: "wrap",
|
|
1011
1011
|
paddingLeft: 0,
|
|
1012
1012
|
marginTop: e.spacing(1),
|
|
1013
1013
|
...t === "vertical" && { flexDirection: "column" }
|
|
1014
|
-
})),
|
|
1014
|
+
})), bt = class extends K.Component {
|
|
1015
1015
|
static propTypes = {
|
|
1016
1016
|
header: Z.default.string.isRequired,
|
|
1017
1017
|
className: Z.default.string,
|
|
@@ -1028,11 +1028,11 @@ var mt = pt(n, "InputContainer") || pt(_t.InputContainer, "InputContainer"), ht
|
|
|
1028
1028
|
let { header: e, className: t, customLabel: n, opts: r, value: i, direction: a } = this.props, o = r.map((e) => typeof e == "string" ? {
|
|
1029
1029
|
label: e,
|
|
1030
1030
|
value: e
|
|
1031
|
-
} : e), s = n ||
|
|
1032
|
-
return /* @__PURE__ */ q(
|
|
1031
|
+
} : e), s = n || Ye;
|
|
1032
|
+
return /* @__PURE__ */ q(ht, {
|
|
1033
1033
|
label: e,
|
|
1034
1034
|
className: t,
|
|
1035
|
-
children: /* @__PURE__ */ q(
|
|
1035
|
+
children: /* @__PURE__ */ q(yt, {
|
|
1036
1036
|
direction: a,
|
|
1037
1037
|
children: o.map((e, t) => /* @__PURE__ */ q(s, {
|
|
1038
1038
|
value: e.value,
|
|
@@ -1043,7 +1043,7 @@ var mt = pt(n, "InputContainer") || pt(_t.InputContainer, "InputContainer"), ht
|
|
|
1043
1043
|
})
|
|
1044
1044
|
});
|
|
1045
1045
|
}
|
|
1046
|
-
},
|
|
1046
|
+
}, xt = Z.default.shape({
|
|
1047
1047
|
label: Z.default.string,
|
|
1048
1048
|
value: Z.default.string
|
|
1049
1049
|
});
|
|
@@ -1052,14 +1052,14 @@ var mt = pt(n, "InputContainer") || pt(_t.InputContainer, "InputContainer"), ht
|
|
|
1052
1052
|
header: Z.default.string.isRequired,
|
|
1053
1053
|
value: Z.default.string.isRequired,
|
|
1054
1054
|
onChange: Z.default.func.isRequired,
|
|
1055
|
-
one: Z.default.oneOfType([
|
|
1056
|
-
two: Z.default.oneOfType([
|
|
1055
|
+
one: Z.default.oneOfType([xt, Z.default.string]),
|
|
1056
|
+
two: Z.default.oneOfType([xt, Z.default.string]),
|
|
1057
1057
|
className: Z.default.string,
|
|
1058
1058
|
customLabel: Z.default.func
|
|
1059
1059
|
};
|
|
1060
1060
|
render() {
|
|
1061
1061
|
let { one: e, two: t, header: n, className: r, customLabel: i, value: a, onChange: o } = this.props;
|
|
1062
|
-
return /* @__PURE__ */ q(
|
|
1062
|
+
return /* @__PURE__ */ q(bt, {
|
|
1063
1063
|
customLabel: i,
|
|
1064
1064
|
header: n,
|
|
1065
1065
|
className: r,
|
|
@@ -1071,21 +1071,21 @@ var mt = pt(n, "InputContainer") || pt(_t.InputContainer, "InputContainer"), ht
|
|
|
1071
1071
|
});
|
|
1072
1072
|
//#endregion
|
|
1073
1073
|
//#region ../../lib-react/config-ui/dist/_virtual/_rolldown/runtime.js
|
|
1074
|
-
var
|
|
1074
|
+
var St = Object.defineProperty, Ct = (e, t) => {
|
|
1075
1075
|
let n = {};
|
|
1076
|
-
for (var r in e)
|
|
1076
|
+
for (var r in e) St(n, r, {
|
|
1077
1077
|
get: e[r],
|
|
1078
1078
|
enumerable: !0
|
|
1079
1079
|
});
|
|
1080
|
-
return t ||
|
|
1081
|
-
},
|
|
1080
|
+
return t || St(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
1081
|
+
}, wt = S("div")(() => ({
|
|
1082
1082
|
display: "flex",
|
|
1083
1083
|
flexDirection: "column",
|
|
1084
1084
|
position: "relative"
|
|
1085
|
-
})),
|
|
1085
|
+
})), Tt = S("div")(() => ({
|
|
1086
1086
|
display: "flex",
|
|
1087
1087
|
justifyContent: "space-between"
|
|
1088
|
-
})),
|
|
1088
|
+
})), Et = S("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), Dt = S("div")(() => ({ flex: "1" })), Ot = S("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), kt = class extends K.Component {
|
|
1089
1089
|
static propTypes = {
|
|
1090
1090
|
mode: Z.default.oneOf(["tabbed", "inline"]),
|
|
1091
1091
|
secondary: Z.default.oneOfType([Z.default.arrayOf(Z.default.node), Z.default.node]),
|
|
@@ -1103,7 +1103,7 @@ var xt = Object.defineProperty, St = (e, t) => {
|
|
|
1103
1103
|
} catch (e) {
|
|
1104
1104
|
console.log(e.toString());
|
|
1105
1105
|
}
|
|
1106
|
-
return /* @__PURE__ */ J(
|
|
1106
|
+
return /* @__PURE__ */ J(wt, {
|
|
1107
1107
|
style: {
|
|
1108
1108
|
minHeight: i,
|
|
1109
1109
|
minWidth: a,
|
|
@@ -1111,28 +1111,28 @@ var xt = Object.defineProperty, St = (e, t) => {
|
|
|
1111
1111
|
maxWidth: s
|
|
1112
1112
|
},
|
|
1113
1113
|
children: [
|
|
1114
|
-
e === "inline" && /* @__PURE__ */ J(
|
|
1114
|
+
e === "inline" && /* @__PURE__ */ J(Tt, { children: [/* @__PURE__ */ q(Dt, {
|
|
1115
1115
|
className: "design-container",
|
|
1116
1116
|
children: n
|
|
1117
|
-
}), l && /* @__PURE__ */ q(
|
|
1117
|
+
}), l && /* @__PURE__ */ q(Ot, {
|
|
1118
1118
|
className: "settings-container",
|
|
1119
1119
|
children: t
|
|
1120
1120
|
})] }),
|
|
1121
|
-
e === "tabbed" && l && /* @__PURE__ */ J(
|
|
1121
|
+
e === "tabbed" && l && /* @__PURE__ */ J(Ze, {
|
|
1122
1122
|
onChange: this.onTabsChange,
|
|
1123
1123
|
contentClassName: "content-container",
|
|
1124
1124
|
indicatorColor: "primary",
|
|
1125
|
-
children: [/* @__PURE__ */ q(
|
|
1125
|
+
children: [/* @__PURE__ */ q(Et, {
|
|
1126
1126
|
title: "Design",
|
|
1127
1127
|
className: "design-container",
|
|
1128
1128
|
children: n
|
|
1129
|
-
}), /* @__PURE__ */ q(
|
|
1129
|
+
}), /* @__PURE__ */ q(Et, {
|
|
1130
1130
|
title: "Settings",
|
|
1131
1131
|
className: "settings-container",
|
|
1132
1132
|
children: t
|
|
1133
1133
|
})]
|
|
1134
1134
|
}),
|
|
1135
|
-
e === "tabbed" && !l && /* @__PURE__ */ q(
|
|
1135
|
+
e === "tabbed" && !l && /* @__PURE__ */ q(Et, {
|
|
1136
1136
|
className: "design-container",
|
|
1137
1137
|
children: n
|
|
1138
1138
|
})
|
|
@@ -1142,18 +1142,18 @@ var xt = Object.defineProperty, St = (e, t) => {
|
|
|
1142
1142
|
};
|
|
1143
1143
|
//#endregion
|
|
1144
1144
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
1145
|
-
function
|
|
1146
|
-
return
|
|
1145
|
+
function At() {
|
|
1146
|
+
return At = Object.assign ? Object.assign.bind() : function(e) {
|
|
1147
1147
|
for (var t = 1; t < arguments.length; t++) {
|
|
1148
1148
|
var n = arguments[t];
|
|
1149
1149
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
1150
1150
|
}
|
|
1151
1151
|
return e;
|
|
1152
|
-
},
|
|
1152
|
+
}, At.apply(null, arguments);
|
|
1153
1153
|
}
|
|
1154
1154
|
//#endregion
|
|
1155
1155
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
1156
|
-
function
|
|
1156
|
+
function jt(e, t) {
|
|
1157
1157
|
if (e == null) return {};
|
|
1158
1158
|
var n = {};
|
|
1159
1159
|
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
@@ -1164,19 +1164,19 @@ function At(e, t) {
|
|
|
1164
1164
|
}
|
|
1165
1165
|
//#endregion
|
|
1166
1166
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
1167
|
-
function
|
|
1168
|
-
return
|
|
1167
|
+
function Mt(e, t) {
|
|
1168
|
+
return Mt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
1169
1169
|
return e.__proto__ = t, e;
|
|
1170
|
-
},
|
|
1170
|
+
}, Mt(e, t);
|
|
1171
1171
|
}
|
|
1172
1172
|
//#endregion
|
|
1173
1173
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
1174
|
-
function
|
|
1175
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
1174
|
+
function Nt(e, t) {
|
|
1175
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Mt(e, t);
|
|
1176
1176
|
}
|
|
1177
1177
|
//#endregion
|
|
1178
1178
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
1179
|
-
var
|
|
1179
|
+
var Pt = (function() {
|
|
1180
1180
|
if (typeof Map < "u") return Map;
|
|
1181
1181
|
function e(e, t) {
|
|
1182
1182
|
var n = -1;
|
|
@@ -1215,34 +1215,34 @@ var Nt = (function() {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
}, t;
|
|
1217
1217
|
}();
|
|
1218
|
-
})(),
|
|
1218
|
+
})(), Ft = typeof window < "u" && typeof document < "u" && window.document === document, It = (function() {
|
|
1219
1219
|
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
|
|
1220
|
-
})(),
|
|
1221
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
1220
|
+
})(), Lt = (function() {
|
|
1221
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(It) : function(e) {
|
|
1222
1222
|
return setTimeout(function() {
|
|
1223
1223
|
return e(Date.now());
|
|
1224
1224
|
}, 1e3 / 60);
|
|
1225
1225
|
};
|
|
1226
|
-
})(),
|
|
1227
|
-
function
|
|
1226
|
+
})(), Rt = 2;
|
|
1227
|
+
function zt(e, t) {
|
|
1228
1228
|
var n = !1, r = !1, i = 0;
|
|
1229
1229
|
function a() {
|
|
1230
1230
|
n && (n = !1, e()), r && s();
|
|
1231
1231
|
}
|
|
1232
1232
|
function o() {
|
|
1233
|
-
|
|
1233
|
+
Lt(a);
|
|
1234
1234
|
}
|
|
1235
1235
|
function s() {
|
|
1236
1236
|
var e = Date.now();
|
|
1237
1237
|
if (n) {
|
|
1238
|
-
if (e - i <
|
|
1238
|
+
if (e - i < Rt) return;
|
|
1239
1239
|
r = !0;
|
|
1240
1240
|
} else n = !0, r = !1, setTimeout(o, t);
|
|
1241
1241
|
i = e;
|
|
1242
1242
|
}
|
|
1243
1243
|
return s;
|
|
1244
1244
|
}
|
|
1245
|
-
var
|
|
1245
|
+
var Bt = 20, Vt = [
|
|
1246
1246
|
"top",
|
|
1247
1247
|
"right",
|
|
1248
1248
|
"bottom",
|
|
@@ -1251,9 +1251,9 @@ var zt = 20, Bt = [
|
|
|
1251
1251
|
"height",
|
|
1252
1252
|
"size",
|
|
1253
1253
|
"weight"
|
|
1254
|
-
],
|
|
1254
|
+
], Ht = typeof MutationObserver < "u", Ut = function() {
|
|
1255
1255
|
function e() {
|
|
1256
|
-
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh =
|
|
1256
|
+
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = zt(this.refresh.bind(this), Bt);
|
|
1257
1257
|
}
|
|
1258
1258
|
return e.prototype.addObserver = function(e) {
|
|
1259
1259
|
~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
|
|
@@ -1270,23 +1270,23 @@ var zt = 20, Bt = [
|
|
|
1270
1270
|
return e.broadcastActive();
|
|
1271
1271
|
}), e.length > 0;
|
|
1272
1272
|
}, e.prototype.connect_ = function() {
|
|
1273
|
-
!
|
|
1273
|
+
!Ft || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), Ht ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
1274
1274
|
attributes: !0,
|
|
1275
1275
|
childList: !0,
|
|
1276
1276
|
characterData: !0,
|
|
1277
1277
|
subtree: !0
|
|
1278
1278
|
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
1279
1279
|
}, e.prototype.disconnect_ = function() {
|
|
1280
|
-
!
|
|
1280
|
+
!Ft || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
|
|
1281
1281
|
}, e.prototype.onTransitionEnd_ = function(e) {
|
|
1282
1282
|
var t = e.propertyName, n = t === void 0 ? "" : t;
|
|
1283
|
-
|
|
1283
|
+
Vt.some(function(e) {
|
|
1284
1284
|
return !!~n.indexOf(e);
|
|
1285
1285
|
}) && this.refresh();
|
|
1286
1286
|
}, e.getInstance = function() {
|
|
1287
1287
|
return this.instance_ ||= new e(), this.instance_;
|
|
1288
1288
|
}, e.instance_ = null, e;
|
|
1289
|
-
}(),
|
|
1289
|
+
}(), Wt = (function(e, t) {
|
|
1290
1290
|
for (var n = 0, r = Object.keys(t); n < r.length; n++) {
|
|
1291
1291
|
var i = r[n];
|
|
1292
1292
|
Object.defineProperty(e, i, {
|
|
@@ -1298,18 +1298,18 @@ var zt = 20, Bt = [
|
|
|
1298
1298
|
}
|
|
1299
1299
|
return e;
|
|
1300
1300
|
}), Q = (function(e) {
|
|
1301
|
-
return e && e.ownerDocument && e.ownerDocument.defaultView ||
|
|
1302
|
-
}),
|
|
1303
|
-
function
|
|
1301
|
+
return e && e.ownerDocument && e.ownerDocument.defaultView || It;
|
|
1302
|
+
}), Gt = tn(0, 0, 0, 0);
|
|
1303
|
+
function Kt(e) {
|
|
1304
1304
|
return parseFloat(e) || 0;
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1306
|
+
function qt(e) {
|
|
1307
1307
|
return [...arguments].slice(1).reduce(function(t, n) {
|
|
1308
1308
|
var r = e["border-" + n + "-width"];
|
|
1309
|
-
return t +
|
|
1309
|
+
return t + Kt(r);
|
|
1310
1310
|
}, 0);
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1312
|
+
function Jt(e) {
|
|
1313
1313
|
for (var t = [
|
|
1314
1314
|
"top",
|
|
1315
1315
|
"right",
|
|
@@ -1317,40 +1317,40 @@ function qt(e) {
|
|
|
1317
1317
|
"left"
|
|
1318
1318
|
], n = {}, r = 0, i = t; r < i.length; r++) {
|
|
1319
1319
|
var a = i[r], o = e["padding-" + a];
|
|
1320
|
-
n[a] =
|
|
1320
|
+
n[a] = Kt(o);
|
|
1321
1321
|
}
|
|
1322
1322
|
return n;
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function Yt(e) {
|
|
1325
1325
|
var t = e.getBBox();
|
|
1326
|
-
return
|
|
1326
|
+
return tn(0, 0, t.width, t.height);
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1328
|
+
function Xt(e) {
|
|
1329
1329
|
var t = e.clientWidth, n = e.clientHeight;
|
|
1330
|
-
if (!t && !n) return
|
|
1331
|
-
var r = Q(e).getComputedStyle(e), i =
|
|
1332
|
-
if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -=
|
|
1330
|
+
if (!t && !n) return Gt;
|
|
1331
|
+
var r = Q(e).getComputedStyle(e), i = Jt(r), a = i.left + i.right, o = i.top + i.bottom, s = Kt(r.width), c = Kt(r.height);
|
|
1332
|
+
if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= qt(r, "left", "right") + a), Math.round(c + o) !== n && (c -= qt(r, "top", "bottom") + o)), !Qt(e)) {
|
|
1333
1333
|
var l = Math.round(s + a) - t, u = Math.round(c + o) - n;
|
|
1334
1334
|
Math.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);
|
|
1335
1335
|
}
|
|
1336
|
-
return
|
|
1336
|
+
return tn(i.left, i.top, s, c);
|
|
1337
1337
|
}
|
|
1338
|
-
var
|
|
1338
|
+
var Zt = (function() {
|
|
1339
1339
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
1340
1340
|
return e instanceof Q(e).SVGGraphicsElement;
|
|
1341
1341
|
} : function(e) {
|
|
1342
1342
|
return e instanceof Q(e).SVGElement && typeof e.getBBox == "function";
|
|
1343
1343
|
};
|
|
1344
1344
|
})();
|
|
1345
|
-
function Zt(e) {
|
|
1346
|
-
return e === Q(e).document.documentElement;
|
|
1347
|
-
}
|
|
1348
1345
|
function Qt(e) {
|
|
1349
|
-
return
|
|
1346
|
+
return e === Q(e).document.documentElement;
|
|
1350
1347
|
}
|
|
1351
1348
|
function $t(e) {
|
|
1349
|
+
return Ft ? Zt(e) ? Yt(e) : Xt(e) : Gt;
|
|
1350
|
+
}
|
|
1351
|
+
function en(e) {
|
|
1352
1352
|
var t = e.x, n = e.y, r = e.width, i = e.height, a = Object.create((typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object).prototype);
|
|
1353
|
-
return
|
|
1353
|
+
return Wt(a, {
|
|
1354
1354
|
x: t,
|
|
1355
1355
|
y: n,
|
|
1356
1356
|
width: r,
|
|
@@ -1361,7 +1361,7 @@ function $t(e) {
|
|
|
1361
1361
|
left: t
|
|
1362
1362
|
}), a;
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function tn(e, t, n, r) {
|
|
1365
1365
|
return {
|
|
1366
1366
|
x: e,
|
|
1367
1367
|
y: t,
|
|
@@ -1369,29 +1369,29 @@ function en(e, t, n, r) {
|
|
|
1369
1369
|
height: r
|
|
1370
1370
|
};
|
|
1371
1371
|
}
|
|
1372
|
-
var
|
|
1372
|
+
var nn = function() {
|
|
1373
1373
|
function e(e) {
|
|
1374
|
-
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ =
|
|
1374
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = tn(0, 0, 0, 0), this.target = e;
|
|
1375
1375
|
}
|
|
1376
1376
|
return e.prototype.isActive = function() {
|
|
1377
|
-
var e =
|
|
1377
|
+
var e = $t(this.target);
|
|
1378
1378
|
return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
|
|
1379
1379
|
}, e.prototype.broadcastRect = function() {
|
|
1380
1380
|
var e = this.contentRect_;
|
|
1381
1381
|
return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
|
|
1382
1382
|
}, e;
|
|
1383
|
-
}(),
|
|
1383
|
+
}(), rn = function() {
|
|
1384
1384
|
function e(e, t) {
|
|
1385
|
-
var n =
|
|
1386
|
-
|
|
1385
|
+
var n = en(t);
|
|
1386
|
+
Wt(this, {
|
|
1387
1387
|
target: e,
|
|
1388
1388
|
contentRect: n
|
|
1389
1389
|
});
|
|
1390
1390
|
}
|
|
1391
1391
|
return e;
|
|
1392
|
-
}(),
|
|
1392
|
+
}(), an = function() {
|
|
1393
1393
|
function e(e, t, n) {
|
|
1394
|
-
if (this.activeObservations_ = [], this.observations_ = new
|
|
1394
|
+
if (this.activeObservations_ = [], this.observations_ = new Pt(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
|
|
1395
1395
|
this.callback_ = e, this.controller_ = t, this.callbackCtx_ = n;
|
|
1396
1396
|
}
|
|
1397
1397
|
return e.prototype.observe = function(e) {
|
|
@@ -1399,7 +1399,7 @@ var tn = function() {
|
|
|
1399
1399
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
1400
1400
|
if (!(e instanceof Q(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
|
|
1401
1401
|
var t = this.observations_;
|
|
1402
|
-
t.has(e) || (t.set(e, new
|
|
1402
|
+
t.has(e) || (t.set(e, new nn(e)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
1403
1403
|
}
|
|
1404
1404
|
}, e.prototype.unobserve = function(e) {
|
|
1405
1405
|
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
@@ -1418,7 +1418,7 @@ var tn = function() {
|
|
|
1418
1418
|
}, e.prototype.broadcastActive = function() {
|
|
1419
1419
|
if (this.hasActive()) {
|
|
1420
1420
|
var e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {
|
|
1421
|
-
return new
|
|
1421
|
+
return new rn(e.target, e.broadcastRect());
|
|
1422
1422
|
});
|
|
1423
1423
|
this.callback_.call(e, t, e), this.clearActive();
|
|
1424
1424
|
}
|
|
@@ -1427,12 +1427,12 @@ var tn = function() {
|
|
|
1427
1427
|
}, e.prototype.hasActive = function() {
|
|
1428
1428
|
return this.activeObservations_.length > 0;
|
|
1429
1429
|
}, e;
|
|
1430
|
-
}(),
|
|
1430
|
+
}(), on = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Pt(), sn = function() {
|
|
1431
1431
|
function e(t) {
|
|
1432
1432
|
if (!(this instanceof e)) throw TypeError("Cannot call a class as a function.");
|
|
1433
1433
|
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
1434
|
-
var n = new
|
|
1435
|
-
|
|
1434
|
+
var n = new an(t, Ut.getInstance(), this);
|
|
1435
|
+
on.set(this, n);
|
|
1436
1436
|
}
|
|
1437
1437
|
return e;
|
|
1438
1438
|
}();
|
|
@@ -1441,27 +1441,27 @@ var tn = function() {
|
|
|
1441
1441
|
"unobserve",
|
|
1442
1442
|
"disconnect"
|
|
1443
1443
|
].forEach(function(e) {
|
|
1444
|
-
|
|
1444
|
+
sn.prototype[e] = function() {
|
|
1445
1445
|
var t;
|
|
1446
|
-
return (t =
|
|
1446
|
+
return (t = on.get(this))[e].apply(t, arguments);
|
|
1447
1447
|
};
|
|
1448
1448
|
});
|
|
1449
|
-
var
|
|
1450
|
-
return
|
|
1451
|
-
})(),
|
|
1449
|
+
var cn = (function() {
|
|
1450
|
+
return It.ResizeObserver === void 0 ? sn : It.ResizeObserver;
|
|
1451
|
+
})(), ln = [
|
|
1452
1452
|
"client",
|
|
1453
1453
|
"offset",
|
|
1454
1454
|
"scroll",
|
|
1455
1455
|
"bounds",
|
|
1456
1456
|
"margin"
|
|
1457
1457
|
];
|
|
1458
|
-
function
|
|
1458
|
+
function un(e) {
|
|
1459
1459
|
var t = [];
|
|
1460
|
-
return
|
|
1460
|
+
return ln.forEach(function(n) {
|
|
1461
1461
|
e[n] && t.push(n);
|
|
1462
1462
|
}), t;
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1464
|
+
function dn(e, t) {
|
|
1465
1465
|
var n = {};
|
|
1466
1466
|
if (t.indexOf("client") > -1 && (n.client = {
|
|
1467
1467
|
top: e.clientTop,
|
|
@@ -1500,14 +1500,14 @@ function un(e, t) {
|
|
|
1500
1500
|
}
|
|
1501
1501
|
return n;
|
|
1502
1502
|
}
|
|
1503
|
-
function
|
|
1503
|
+
function fn(e) {
|
|
1504
1504
|
return e && e.ownerDocument && e.ownerDocument.defaultView || window;
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1506
|
+
function pn(e) {
|
|
1507
1507
|
return function(t) {
|
|
1508
1508
|
var n, r;
|
|
1509
1509
|
return r = n = /*#__PURE__*/ function(n) {
|
|
1510
|
-
|
|
1510
|
+
Nt(r, n);
|
|
1511
1511
|
function r() {
|
|
1512
1512
|
var t, r = [...arguments];
|
|
1513
1513
|
return t = n.call.apply(n, [this].concat(r)) || this, t.state = { contentRect: {
|
|
@@ -1518,30 +1518,30 @@ function fn(e) {
|
|
|
1518
1518
|
bounds: {},
|
|
1519
1519
|
margin: {}
|
|
1520
1520
|
} }, t._animationFrameID = null, t._resizeObserver = null, t._node = null, t._window = null, t.measure = function(n) {
|
|
1521
|
-
var r =
|
|
1521
|
+
var r = dn(t._node, e || un(t.props));
|
|
1522
1522
|
n && (r.entry = n[0].contentRect), t._animationFrameID = t._window.requestAnimationFrame(function() {
|
|
1523
1523
|
t._resizeObserver !== null && (t.setState({ contentRect: r }), typeof t.props.onResize == "function" && t.props.onResize(r));
|
|
1524
1524
|
});
|
|
1525
1525
|
}, t._handleRef = function(e) {
|
|
1526
|
-
t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window =
|
|
1526
|
+
t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = fn(t._node);
|
|
1527
1527
|
var n = t.props.innerRef;
|
|
1528
1528
|
n && (typeof n == "function" ? n(t._node) : n.current = t._node), t._resizeObserver !== null && t._node !== null && t._resizeObserver.observe(t._node);
|
|
1529
1529
|
}, t;
|
|
1530
1530
|
}
|
|
1531
1531
|
var i = r.prototype;
|
|
1532
1532
|
return i.componentDidMount = function() {
|
|
1533
|
-
this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new
|
|
1533
|
+
this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new cn(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(dn(this._node, e || un(this.props))));
|
|
1534
1534
|
}, i.componentWillUnmount = function() {
|
|
1535
1535
|
this._window !== null && this._window.cancelAnimationFrame(this._animationFrameID), this._resizeObserver !== null && (this._resizeObserver.disconnect(), this._resizeObserver = null);
|
|
1536
1536
|
}, i.render = function() {
|
|
1537
1537
|
var e = this.props;
|
|
1538
|
-
return e.innerRef, e.onResize,
|
|
1538
|
+
return e.innerRef, e.onResize, oe(t, At({}, jt(e, ["innerRef", "onResize"]), {
|
|
1539
1539
|
measureRef: this._handleRef,
|
|
1540
1540
|
measure: this.measure,
|
|
1541
1541
|
contentRect: this.state.contentRect
|
|
1542
1542
|
}));
|
|
1543
1543
|
}, r;
|
|
1544
|
-
}(
|
|
1544
|
+
}(ae), n.propTypes = {
|
|
1545
1545
|
client: Z.default.bool,
|
|
1546
1546
|
offset: Z.default.bool,
|
|
1547
1547
|
scroll: Z.default.bool,
|
|
@@ -1552,7 +1552,7 @@ function fn(e) {
|
|
|
1552
1552
|
}, r;
|
|
1553
1553
|
};
|
|
1554
1554
|
}
|
|
1555
|
-
var
|
|
1555
|
+
var mn = pn()(function(e) {
|
|
1556
1556
|
var t = e.measure, n = e.measureRef, r = e.contentRect, i = e.children;
|
|
1557
1557
|
return i({
|
|
1558
1558
|
measure: t,
|
|
@@ -1560,12 +1560,12 @@ var pn = fn()(function(e) {
|
|
|
1560
1560
|
contentRect: r
|
|
1561
1561
|
});
|
|
1562
1562
|
});
|
|
1563
|
-
|
|
1563
|
+
mn.displayName = "Measure", mn.propTypes.children = Z.default.func;
|
|
1564
1564
|
//#endregion
|
|
1565
1565
|
//#region ../../lib-react/config-ui/dist/layout/settings-box.js
|
|
1566
|
-
var
|
|
1567
|
-
backgroundColor:
|
|
1568
|
-
border: `2px solid ${
|
|
1566
|
+
var hn = S("div")(() => ({
|
|
1567
|
+
backgroundColor: l.white(),
|
|
1568
|
+
border: `2px solid ${l.border()}`,
|
|
1569
1569
|
display: "flex",
|
|
1570
1570
|
flexDirection: "column",
|
|
1571
1571
|
justifyContent: "flex-start",
|
|
@@ -1573,7 +1573,7 @@ var mn = y("div")(() => ({
|
|
|
1573
1573
|
maxWidth: "300px",
|
|
1574
1574
|
padding: "20px 4px 4px 20px",
|
|
1575
1575
|
zIndex: 99
|
|
1576
|
-
})),
|
|
1576
|
+
})), gn = class extends K.Component {
|
|
1577
1577
|
static propTypes = {
|
|
1578
1578
|
className: Z.default.string,
|
|
1579
1579
|
children: Z.default.oneOfType([Z.default.arrayOf(Z.default.node), Z.default.node]).isRequired
|
|
@@ -1581,19 +1581,19 @@ var mn = y("div")(() => ({
|
|
|
1581
1581
|
static defaultProps = {};
|
|
1582
1582
|
render() {
|
|
1583
1583
|
let { className: e, children: t } = this.props;
|
|
1584
|
-
return /* @__PURE__ */ q(
|
|
1584
|
+
return /* @__PURE__ */ q(hn, {
|
|
1585
1585
|
className: e,
|
|
1586
1586
|
children: t
|
|
1587
1587
|
});
|
|
1588
1588
|
}
|
|
1589
|
-
},
|
|
1589
|
+
}, _n = f({
|
|
1590
1590
|
typography: { fontFamily: "inherit" },
|
|
1591
1591
|
components: { MuiButton: { styleOverrides: { contained: {
|
|
1592
1592
|
backgroundColor: "#e0e0e0",
|
|
1593
1593
|
color: "#000000",
|
|
1594
1594
|
"&:hover": { backgroundColor: "#bdbdbd" }
|
|
1595
1595
|
} } } }
|
|
1596
|
-
}),
|
|
1596
|
+
}), vn = class extends K.Component {
|
|
1597
1597
|
static propTypes = {
|
|
1598
1598
|
children: Z.default.oneOfType([
|
|
1599
1599
|
Z.default.string,
|
|
@@ -1623,22 +1623,22 @@ var mn = y("div")(() => ({
|
|
|
1623
1623
|
a !== this.state.layoutMode && this.setState({ layoutMode: a });
|
|
1624
1624
|
};
|
|
1625
1625
|
render() {
|
|
1626
|
-
return /* @__PURE__ */ q(
|
|
1626
|
+
return /* @__PURE__ */ q(v, {
|
|
1627
1627
|
injectFirst: !0,
|
|
1628
|
-
children: /* @__PURE__ */ q(
|
|
1629
|
-
theme:
|
|
1630
|
-
children: /* @__PURE__ */ q(
|
|
1628
|
+
children: /* @__PURE__ */ q(x, {
|
|
1629
|
+
theme: _n,
|
|
1630
|
+
children: /* @__PURE__ */ q(mn, {
|
|
1631
1631
|
bounds: !0,
|
|
1632
1632
|
onResize: this.onResize,
|
|
1633
1633
|
children: ({ measureRef: e }) => {
|
|
1634
|
-
let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ q(
|
|
1634
|
+
let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ q(gn, {
|
|
1635
1635
|
className: "settings-box",
|
|
1636
1636
|
children: n
|
|
1637
1637
|
}) : n;
|
|
1638
1638
|
return /* @__PURE__ */ J("div", {
|
|
1639
1639
|
ref: e,
|
|
1640
1640
|
className: "main-container extraCSSRules",
|
|
1641
|
-
children: [a?.rules ? /* @__PURE__ */ q("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ q(
|
|
1641
|
+
children: [a?.rules ? /* @__PURE__ */ q("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ q(kt, {
|
|
1642
1642
|
mode: o,
|
|
1643
1643
|
secondary: s,
|
|
1644
1644
|
dimensions: i,
|
|
@@ -1650,27 +1650,27 @@ var mn = y("div")(() => ({
|
|
|
1650
1650
|
})
|
|
1651
1651
|
});
|
|
1652
1652
|
}
|
|
1653
|
-
},
|
|
1654
|
-
ConfigLayout: () =>
|
|
1655
|
-
LayoutContents: () =>
|
|
1656
|
-
}),
|
|
1653
|
+
}, yn = pn("bounds")(vn), bn = /* @__PURE__ */ Ct({
|
|
1654
|
+
ConfigLayout: () => yn,
|
|
1655
|
+
LayoutContents: () => kt
|
|
1656
|
+
}), xn = S("div")(() => ({
|
|
1657
1657
|
display: "flex",
|
|
1658
1658
|
width: "100%",
|
|
1659
1659
|
justifyContent: "space-between"
|
|
1660
|
-
})),
|
|
1660
|
+
})), Sn = S(b)(({ theme: e }) => ({
|
|
1661
1661
|
color: "rgba(0, 0, 0, 0.89)",
|
|
1662
1662
|
fontSize: e.typography.fontSize,
|
|
1663
1663
|
paddingTop: e.spacing(2)
|
|
1664
|
-
})),
|
|
1665
|
-
"&.Mui-checked .MuiSwitch-thumb": { color: `${
|
|
1666
|
-
"&.Mui-checked .MuiSwitch-track": { backgroundColor: `${
|
|
1667
|
-
"& .MuiSwitch-track": { backgroundColor: e ? `${
|
|
1668
|
-
})),
|
|
1664
|
+
})), Cn = S(Ge)(({ checked: e }) => ({
|
|
1665
|
+
"&.Mui-checked .MuiSwitch-thumb": { color: `${l.tertiary()} !important` },
|
|
1666
|
+
"&.Mui-checked .MuiSwitch-track": { backgroundColor: `${l.tertiaryLight()} !important` },
|
|
1667
|
+
"& .MuiSwitch-track": { backgroundColor: e ? `${l.tertiaryLight()} !important` : void 0 }
|
|
1668
|
+
})), wn = ({ checked: e, disabled: t, label: n, toggle: r }) => /* @__PURE__ */ J(xn, { children: [/* @__PURE__ */ q(Sn, { children: n }), /* @__PURE__ */ q(Cn, {
|
|
1669
1669
|
checked: e,
|
|
1670
1670
|
disabled: t,
|
|
1671
1671
|
onChange: (e) => r(e.target.checked)
|
|
1672
1672
|
})] });
|
|
1673
|
-
|
|
1673
|
+
wn.propTypes = {
|
|
1674
1674
|
checked: Z.default.bool,
|
|
1675
1675
|
disabled: Z.default.bool,
|
|
1676
1676
|
label: Z.default.string.isRequired,
|
|
@@ -1678,20 +1678,20 @@ Cn.propTypes = {
|
|
|
1678
1678
|
};
|
|
1679
1679
|
//#endregion
|
|
1680
1680
|
//#region ../../lib-react/config-ui/dist/settings/settings-radio-label.js
|
|
1681
|
-
var
|
|
1681
|
+
var Tn = S(he)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": {
|
|
1682
1682
|
color: "rgba(0, 0, 0, 0.89)",
|
|
1683
1683
|
fontSize: e.typography.fontSize - 2,
|
|
1684
1684
|
left: "-5px",
|
|
1685
1685
|
position: "relative"
|
|
1686
|
-
} })),
|
|
1686
|
+
} })), En = S(Re)(() => ({ color: `${l.tertiary()} !important` })), Dn = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ q(Tn, {
|
|
1687
1687
|
value: t,
|
|
1688
|
-
control: /* @__PURE__ */ q(
|
|
1688
|
+
control: /* @__PURE__ */ q(En, {
|
|
1689
1689
|
checked: n,
|
|
1690
1690
|
onChange: r
|
|
1691
1691
|
}),
|
|
1692
1692
|
label: e
|
|
1693
1693
|
});
|
|
1694
|
-
|
|
1694
|
+
Dn.propTypes = {
|
|
1695
1695
|
label: Z.default.string,
|
|
1696
1696
|
value: Z.default.string,
|
|
1697
1697
|
checked: Z.default.bool,
|
|
@@ -1699,26 +1699,26 @@ En.propTypes = {
|
|
|
1699
1699
|
};
|
|
1700
1700
|
//#endregion
|
|
1701
1701
|
//#region ../../lib-react/config-ui/dist/settings/panel.js
|
|
1702
|
-
var
|
|
1702
|
+
var On = (0, Ke.default)("pie-lib:config-ui:settings:panel"), kn = {
|
|
1703
1703
|
label: Z.default.string,
|
|
1704
1704
|
value: Z.default.string
|
|
1705
|
-
},
|
|
1705
|
+
}, An = {
|
|
1706
1706
|
label: Z.default.string,
|
|
1707
1707
|
value: Z.default.string,
|
|
1708
1708
|
onChange: Z.default.func
|
|
1709
|
-
},
|
|
1709
|
+
}, jn = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ q(et, {
|
|
1710
1710
|
checked: t,
|
|
1711
1711
|
label: e,
|
|
1712
1712
|
onChange: (e) => {
|
|
1713
1713
|
n(e.target.checked);
|
|
1714
1714
|
}
|
|
1715
1715
|
});
|
|
1716
|
-
|
|
1716
|
+
jn.propTypes = {
|
|
1717
1717
|
label: Z.default.string,
|
|
1718
1718
|
value: Z.default.bool,
|
|
1719
1719
|
onChange: Z.default.func
|
|
1720
1720
|
};
|
|
1721
|
-
var
|
|
1721
|
+
var Mn = S(bt)(({ theme: e }) => ({
|
|
1722
1722
|
marginTop: e.spacing(.5),
|
|
1723
1723
|
paddingBottom: e.spacing(.5),
|
|
1724
1724
|
width: "100%",
|
|
@@ -1729,51 +1729,51 @@ var jn = y(yt)(({ theme: e }) => ({
|
|
|
1729
1729
|
marginTop: e.spacing(2.5)
|
|
1730
1730
|
},
|
|
1731
1731
|
"& > div": { marginTop: e.spacing(2.5) }
|
|
1732
|
-
})),
|
|
1732
|
+
})), Nn = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ q(Mn, {
|
|
1733
1733
|
direction: "horizontal",
|
|
1734
|
-
customLabel:
|
|
1734
|
+
customLabel: Dn,
|
|
1735
1735
|
value: t,
|
|
1736
1736
|
header: e,
|
|
1737
1737
|
opts: r,
|
|
1738
1738
|
onChange: n
|
|
1739
1739
|
});
|
|
1740
|
-
|
|
1741
|
-
...
|
|
1742
|
-
choices: Z.default.arrayOf(Z.default.shape(
|
|
1740
|
+
Nn.propTypes = {
|
|
1741
|
+
...An,
|
|
1742
|
+
choices: Z.default.arrayOf(Z.default.shape(kn))
|
|
1743
1743
|
};
|
|
1744
|
-
var
|
|
1744
|
+
var Pn = Nn, Fn = S("p")(({ theme: e }) => ({
|
|
1745
1745
|
margin: 0,
|
|
1746
1746
|
fontSize: e.typography.fontSize
|
|
1747
|
-
})),
|
|
1747
|
+
})), In = S(A)(({ theme: e }) => ({
|
|
1748
1748
|
marginTop: e.spacing(.5),
|
|
1749
1749
|
border: "2px solid lightgrey",
|
|
1750
1750
|
padding: `0 ${e.spacing(1)}`,
|
|
1751
1751
|
borderRadius: "4px"
|
|
1752
|
-
})),
|
|
1752
|
+
})), Ln = ({ label: e, value: t, onChange: n, choices: r = [] }) => {
|
|
1753
1753
|
let i = (e) => typeof e == "string" ? e : e.label, a = (e) => typeof e == "string" ? e : e.value;
|
|
1754
|
-
return /* @__PURE__ */ J("div", { children: [e && /* @__PURE__ */ q(
|
|
1754
|
+
return /* @__PURE__ */ J("div", { children: [e && /* @__PURE__ */ q(Fn, { children: e }), /* @__PURE__ */ q(In, {
|
|
1755
1755
|
value: t || r && r[0],
|
|
1756
1756
|
onChange: ({ target: e }) => n(e.value),
|
|
1757
|
-
input: /* @__PURE__ */ q(
|
|
1757
|
+
input: /* @__PURE__ */ q(F, { id: `dropdown-${e}` }),
|
|
1758
1758
|
disableUnderline: !0,
|
|
1759
1759
|
MenuProps: { transitionDuration: {
|
|
1760
1760
|
enter: 225,
|
|
1761
1761
|
exit: 195
|
|
1762
1762
|
} },
|
|
1763
|
-
children: r.map((e, t) => /* @__PURE__ */ q(
|
|
1763
|
+
children: r.map((e, t) => /* @__PURE__ */ q(k, {
|
|
1764
1764
|
value: a(e),
|
|
1765
1765
|
children: i(e)
|
|
1766
1766
|
}, t))
|
|
1767
1767
|
})] });
|
|
1768
1768
|
};
|
|
1769
|
-
|
|
1770
|
-
...
|
|
1769
|
+
Ln.propTypes = {
|
|
1770
|
+
...An,
|
|
1771
1771
|
choices: Z.default.arrayOf(Z.default.string)
|
|
1772
1772
|
};
|
|
1773
|
-
var
|
|
1773
|
+
var Rn = S(N)(({ theme: e }) => ({
|
|
1774
1774
|
marginRight: e.spacing(3),
|
|
1775
1775
|
marginTop: e.spacing(1)
|
|
1776
|
-
})),
|
|
1776
|
+
})), zn = ({ label: e }) => /* @__PURE__ */ q(Rn, { children: e }), Bn = S(it)(({ theme: e }) => ({
|
|
1777
1777
|
width: "35%",
|
|
1778
1778
|
marginRight: e.spacing(3),
|
|
1779
1779
|
marginTop: e.spacing(1),
|
|
@@ -1784,7 +1784,7 @@ var Ln = y(M)(({ theme: e }) => ({
|
|
|
1784
1784
|
padding: `0 ${e.spacing(1)}`,
|
|
1785
1785
|
backgroundColor: "transparent"
|
|
1786
1786
|
}
|
|
1787
|
-
})),
|
|
1787
|
+
})), Vn = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ q(Bn, {
|
|
1788
1788
|
variant: "standard",
|
|
1789
1789
|
label: e || "Label",
|
|
1790
1790
|
value: t,
|
|
@@ -1795,45 +1795,45 @@ var Ln = y(M)(({ theme: e }) => ({
|
|
|
1795
1795
|
showErrorWhenOutsideRange: !0,
|
|
1796
1796
|
disableUnderline: !0
|
|
1797
1797
|
});
|
|
1798
|
-
|
|
1799
|
-
...
|
|
1798
|
+
Vn.propTypes = {
|
|
1799
|
+
...An,
|
|
1800
1800
|
suffix: Z.default.string,
|
|
1801
1801
|
min: Z.default.number,
|
|
1802
1802
|
max: Z.default.number,
|
|
1803
1803
|
value: Z.default.number
|
|
1804
|
-
},
|
|
1805
|
-
var
|
|
1804
|
+
}, zn.propTypes = { ...An };
|
|
1805
|
+
var Hn = ({ disabled: e, label: t, value: n, onChange: r }) => /* @__PURE__ */ q(wn, {
|
|
1806
1806
|
label: t,
|
|
1807
1807
|
checked: !!n,
|
|
1808
1808
|
disabled: !!e,
|
|
1809
1809
|
toggle: r
|
|
1810
1810
|
});
|
|
1811
|
-
|
|
1812
|
-
...
|
|
1811
|
+
Hn.propTypes = {
|
|
1812
|
+
...An,
|
|
1813
1813
|
value: Z.default.bool
|
|
1814
1814
|
};
|
|
1815
|
-
var
|
|
1816
|
-
toggle:
|
|
1817
|
-
radio:
|
|
1818
|
-
dropdown:
|
|
1819
|
-
numberField:
|
|
1820
|
-
checkbox:
|
|
1821
|
-
textField:
|
|
1822
|
-
},
|
|
1815
|
+
var Un = {
|
|
1816
|
+
toggle: Hn,
|
|
1817
|
+
radio: Pn,
|
|
1818
|
+
dropdown: Ln,
|
|
1819
|
+
numberField: Vn,
|
|
1820
|
+
checkbox: jn,
|
|
1821
|
+
textField: zn
|
|
1822
|
+
}, Wn = S("div")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), Gn = S("div")(({ theme: e }) => ({
|
|
1823
1823
|
color: "#495B8F",
|
|
1824
1824
|
fontSize: e.typography.fontSize + 2,
|
|
1825
1825
|
fontWeight: 600,
|
|
1826
1826
|
marginBottom: e.spacing(1)
|
|
1827
|
-
})),
|
|
1827
|
+
})), Kn = S("p")(({ theme: e }) => ({
|
|
1828
1828
|
fontSize: e.typography.fontSize,
|
|
1829
1829
|
marginBottom: 0
|
|
1830
|
-
})),
|
|
1830
|
+
})), qn = (e) => {
|
|
1831
1831
|
let { model: t, label: n, group: r, configuration: i, onChange: a } = e, o = (e, n, r) => {
|
|
1832
|
-
let { isConfigProperty: o, ...s } =
|
|
1832
|
+
let { isConfigProperty: o, ...s } = re(e, r || n), c = re(o ? i : t, n), l = {
|
|
1833
1833
|
...s,
|
|
1834
1834
|
key: n,
|
|
1835
1835
|
value: c
|
|
1836
|
-
}, u =
|
|
1836
|
+
}, u = Un[l.type];
|
|
1837
1837
|
return /* @__PURE__ */ q(u, {
|
|
1838
1838
|
...l,
|
|
1839
1839
|
onChange: (e) => a(n, e, o)
|
|
@@ -1842,18 +1842,18 @@ var Hn = {
|
|
|
1842
1842
|
let n = e[t];
|
|
1843
1843
|
if (!n) return null;
|
|
1844
1844
|
let { type: r, label: i, fields: a, choices: s } = n;
|
|
1845
|
-
return r === "numberFields" ? /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
1845
|
+
return r === "numberFields" ? /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Kn, { children: i }), Object.keys(a).map((n) => o(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", { children: i }), Object.keys(s).map((n) => o(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : o(e, t);
|
|
1846
1846
|
};
|
|
1847
|
-
return /* @__PURE__ */ J(
|
|
1847
|
+
return /* @__PURE__ */ J(Wn, { children: [/* @__PURE__ */ q(Gn, { children: n }), Object.keys(r).map((e) => s(r, e))] });
|
|
1848
1848
|
};
|
|
1849
|
-
|
|
1849
|
+
qn.propTypes = {
|
|
1850
1850
|
model: Z.default.object,
|
|
1851
1851
|
label: Z.default.string,
|
|
1852
1852
|
group: Z.default.object,
|
|
1853
1853
|
configuration: Z.default.object,
|
|
1854
1854
|
onChange: Z.default.func
|
|
1855
1855
|
};
|
|
1856
|
-
var
|
|
1856
|
+
var Jn = class extends K.Component {
|
|
1857
1857
|
static propTypes = {
|
|
1858
1858
|
model: Z.default.object,
|
|
1859
1859
|
configuration: Z.default.object,
|
|
@@ -1867,13 +1867,13 @@ var qn = class extends K.Component {
|
|
|
1867
1867
|
onChangeConfiguration: () => {}
|
|
1868
1868
|
};
|
|
1869
1869
|
change = (e, t, n = !1) => {
|
|
1870
|
-
|
|
1870
|
+
On("[changeModel]", e, t);
|
|
1871
1871
|
let { onChangeModel: r, onChangeConfiguration: i } = this.props, a = { ...this.props.model }, o = { ...this.props.configuration };
|
|
1872
|
-
n ? (
|
|
1872
|
+
n ? (U(o, e, t), i(o, e)) : (U(a, e, t), r(a, e));
|
|
1873
1873
|
};
|
|
1874
1874
|
render() {
|
|
1875
1875
|
let { groups: e, model: t, configuration: n, modal: r } = this.props;
|
|
1876
|
-
return
|
|
1876
|
+
return On("render:", t), /* @__PURE__ */ J("div", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ q(qn, {
|
|
1877
1877
|
label: r,
|
|
1878
1878
|
model: t,
|
|
1879
1879
|
configuration: n,
|
|
@@ -1881,59 +1881,59 @@ var qn = class extends K.Component {
|
|
|
1881
1881
|
onChange: this.change
|
|
1882
1882
|
}, r) : null), r] });
|
|
1883
1883
|
}
|
|
1884
|
-
},
|
|
1885
|
-
Panel: () =>
|
|
1886
|
-
checkbox: () =>
|
|
1887
|
-
checkboxes: () =>
|
|
1888
|
-
dropdown: () =>
|
|
1889
|
-
numberField: () =>
|
|
1890
|
-
numberFields: () =>
|
|
1891
|
-
radio: () =>
|
|
1892
|
-
textField: () =>
|
|
1893
|
-
toggle: () =>
|
|
1894
|
-
}),
|
|
1884
|
+
}, Yn = /* @__PURE__ */ Ct({
|
|
1885
|
+
Panel: () => Jn,
|
|
1886
|
+
checkbox: () => rr,
|
|
1887
|
+
checkboxes: () => ir,
|
|
1888
|
+
dropdown: () => er,
|
|
1889
|
+
numberField: () => tr,
|
|
1890
|
+
numberFields: () => nr,
|
|
1891
|
+
radio: () => $n,
|
|
1892
|
+
textField: () => Xn,
|
|
1893
|
+
toggle: () => Zn
|
|
1894
|
+
}), Xn = (e, t = !0) => ({
|
|
1895
1895
|
label: e,
|
|
1896
1896
|
type: "textField",
|
|
1897
1897
|
isConfigProperty: t
|
|
1898
|
-
}),
|
|
1898
|
+
}), Zn = (e, t = !1, n = !1) => ({
|
|
1899
1899
|
type: "toggle",
|
|
1900
1900
|
label: e,
|
|
1901
1901
|
isConfigProperty: t,
|
|
1902
1902
|
disabled: n
|
|
1903
|
-
}),
|
|
1903
|
+
}), Qn = (e) => typeof e == "string" ? {
|
|
1904
1904
|
label: e,
|
|
1905
1905
|
value: e
|
|
1906
|
-
} : e,
|
|
1906
|
+
} : e, $n = function() {
|
|
1907
1907
|
let [e, t, n = !1] = Array.prototype.slice.call(arguments);
|
|
1908
1908
|
return {
|
|
1909
1909
|
type: "radio",
|
|
1910
1910
|
label: e,
|
|
1911
|
-
choices: t && t.map((e) =>
|
|
1911
|
+
choices: t && t.map((e) => Qn(e)),
|
|
1912
1912
|
isConfigProperty: n
|
|
1913
1913
|
};
|
|
1914
|
-
},
|
|
1914
|
+
}, er = (e, t, n = !1) => ({
|
|
1915
1915
|
type: "dropdown",
|
|
1916
1916
|
label: e,
|
|
1917
1917
|
choices: t,
|
|
1918
1918
|
isConfigProperty: n
|
|
1919
|
-
}),
|
|
1919
|
+
}), tr = (e, t, n = !1) => ({
|
|
1920
1920
|
...t,
|
|
1921
1921
|
label: e,
|
|
1922
1922
|
type: "numberField",
|
|
1923
1923
|
isConfigProperty: n
|
|
1924
|
-
}),
|
|
1925
|
-
t[e] =
|
|
1924
|
+
}), nr = (e, t, n = !1) => (Object.keys(t).map((e) => {
|
|
1925
|
+
t[e] = tr(t[e].label, t[e], n);
|
|
1926
1926
|
}), {
|
|
1927
1927
|
type: "numberFields",
|
|
1928
1928
|
label: e,
|
|
1929
1929
|
fields: t
|
|
1930
|
-
}),
|
|
1930
|
+
}), rr = (e, t, n = !1) => ({
|
|
1931
1931
|
...t,
|
|
1932
1932
|
label: e,
|
|
1933
1933
|
type: "checkbox",
|
|
1934
1934
|
isConfigProperty: n
|
|
1935
|
-
}),
|
|
1936
|
-
t[e] =
|
|
1935
|
+
}), ir = (e, t, n = !1) => (Object.keys(t).map((e) => {
|
|
1936
|
+
t[e] = rr(t[e].label, t[e], n);
|
|
1937
1937
|
}), {
|
|
1938
1938
|
type: "checkboxes",
|
|
1939
1939
|
label: e,
|
|
@@ -1941,57 +1941,60 @@ var qn = class extends K.Component {
|
|
|
1941
1941
|
});
|
|
1942
1942
|
//#endregion
|
|
1943
1943
|
//#region ../../lib-react/config-ui/dist/index.js
|
|
1944
|
-
function
|
|
1944
|
+
function ar(e) {
|
|
1945
1945
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
1946
1946
|
}
|
|
1947
|
-
function
|
|
1948
|
-
return !e ||
|
|
1947
|
+
function or(e, t) {
|
|
1948
|
+
return !e || ar(e) ? e : ar(e.default) ? e.default : t && ar(e[t]) ? e[t] : t && ar(e[t]?.default) ? e[t].default : e;
|
|
1949
1949
|
}
|
|
1950
|
-
var
|
|
1951
|
-
|
|
1952
|
-
children:
|
|
1953
|
-
|
|
1954
|
-
children:
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1950
|
+
var sr = or(i, "InputContainer") || or(ur.InputContainer, "InputContainer"), cr = B, lr = cr.default, ur = lr && typeof lr == "object" ? lr : cr, dr = S("div")(() => ({ width: "160px" })), fr = S(te)(() => ({ width: "160px" })), pr = S(b)(() => ({ backgroundColor: "transparent" })), mr = ({ onChange: e, value: t, availableChartTypes: n, chartTypeLabel: r }) => {
|
|
1951
|
+
let i = h("chart-type-label");
|
|
1952
|
+
return /* @__PURE__ */ q(dr, { children: /* @__PURE__ */ J(fr, {
|
|
1953
|
+
variant: "outlined",
|
|
1954
|
+
children: [/* @__PURE__ */ q(pr, {
|
|
1955
|
+
id: i,
|
|
1956
|
+
children: r
|
|
1957
|
+
}), /* @__PURE__ */ J(A, {
|
|
1958
|
+
labelId: i,
|
|
1959
|
+
id: `${i}-select`,
|
|
1960
|
+
name: "chartType",
|
|
1961
|
+
value: t,
|
|
1962
|
+
onChange: e,
|
|
1963
|
+
label: r,
|
|
1964
|
+
MenuProps: { transitionDuration: {
|
|
1965
|
+
enter: 225,
|
|
1966
|
+
exit: 195
|
|
1967
|
+
} },
|
|
1968
|
+
children: [
|
|
1969
|
+
n?.histogram && /* @__PURE__ */ q(k, {
|
|
1970
|
+
value: "histogram",
|
|
1971
|
+
children: n.histogram
|
|
1972
|
+
}),
|
|
1973
|
+
n?.bar && /* @__PURE__ */ q(k, {
|
|
1974
|
+
value: "bar",
|
|
1975
|
+
children: n.bar
|
|
1976
|
+
}),
|
|
1977
|
+
n?.lineDot && /* @__PURE__ */ q(k, {
|
|
1978
|
+
value: "lineDot",
|
|
1979
|
+
children: n.lineDot
|
|
1980
|
+
}),
|
|
1981
|
+
n?.lineCross && /* @__PURE__ */ q(k, {
|
|
1982
|
+
value: "lineCross",
|
|
1983
|
+
children: n.lineCross
|
|
1984
|
+
}),
|
|
1985
|
+
n?.dotPlot && /* @__PURE__ */ q(k, {
|
|
1986
|
+
value: "dotPlot",
|
|
1987
|
+
children: n.dotPlot
|
|
1988
|
+
}),
|
|
1989
|
+
n?.linePlot && /* @__PURE__ */ q(k, {
|
|
1990
|
+
value: "linePlot",
|
|
1991
|
+
children: n.linePlot
|
|
1992
|
+
})
|
|
1993
|
+
]
|
|
1994
|
+
})]
|
|
1995
|
+
}) });
|
|
1996
|
+
};
|
|
1997
|
+
mr.propTypes = {
|
|
1995
1998
|
onChange: Z.default.func.isRequired,
|
|
1996
1999
|
value: Z.default.string.isRequired,
|
|
1997
2000
|
availableChartTypes: Z.default.shape({
|
|
@@ -2006,7 +2009,7 @@ pr.propTypes = {
|
|
|
2006
2009
|
};
|
|
2007
2010
|
//#endregion
|
|
2008
2011
|
//#region ../../lib-react/charting/dist/chart-setup.js
|
|
2009
|
-
var
|
|
2012
|
+
var hr = (e, t, n, r, i) => {
|
|
2010
2013
|
(e || []).forEach((e) => {
|
|
2011
2014
|
let t = Math.round(e.value * 10) % Math.round(n.step * 10) / 10;
|
|
2012
2015
|
(e.value > n.max || t !== 0) && (e.value = 0);
|
|
@@ -2014,38 +2017,38 @@ var mr = (e, t, n, r, i) => {
|
|
|
2014
2017
|
...i,
|
|
2015
2018
|
data: e
|
|
2016
2019
|
});
|
|
2017
|
-
},
|
|
2020
|
+
}, gr = S("div")(() => ({ width: "450px" })), _r = S("div")(({ theme: e }) => ({
|
|
2018
2021
|
display: "flex",
|
|
2019
2022
|
flexDirection: "column",
|
|
2020
2023
|
width: "100%",
|
|
2021
2024
|
marginTop: e.spacing(3)
|
|
2022
|
-
})),
|
|
2025
|
+
})), vr = S("div")(() => ({
|
|
2023
2026
|
display: "flex",
|
|
2024
2027
|
flexDirection: "column",
|
|
2025
2028
|
alignItems: "center"
|
|
2026
|
-
})),
|
|
2029
|
+
})), yr = S("div")(() => ({
|
|
2027
2030
|
display: "flex",
|
|
2028
2031
|
justifyContent: "space-around",
|
|
2029
2032
|
alignItems: "center"
|
|
2030
|
-
})),
|
|
2033
|
+
})), br = S(ft)(({ theme: e }) => ({
|
|
2031
2034
|
width: "130px",
|
|
2032
2035
|
margin: `${e.spacing(1)} ${e.spacing(.5)}`
|
|
2033
|
-
})),
|
|
2036
|
+
})), xr = S(ft)(({ theme: e }) => ({
|
|
2034
2037
|
width: "160px",
|
|
2035
2038
|
margin: `${e.spacing(1)} ${e.spacing(.5)}`
|
|
2036
|
-
})),
|
|
2039
|
+
})), Sr = S("div")(({ theme: e }) => ({
|
|
2037
2040
|
display: "flex",
|
|
2038
2041
|
justifyContent: "space-between",
|
|
2039
2042
|
alignItems: "center",
|
|
2040
2043
|
margin: `${e.spacing(3)} 0`
|
|
2041
|
-
})),
|
|
2042
|
-
let { model: t, onChange: n, chartDimensions: r, gridValues: i = {}, labelValues: a = {}, studentNewCategoryDefaultLabel: o = {}, availableChartTypes: s = {}, chartTypeLabel: c } = e, [l, u] =
|
|
2044
|
+
})), Cr = S(N)(() => ({ color: l.disabled() })), wr = (e) => {
|
|
2045
|
+
let { model: t, onChange: n, chartDimensions: r, gridValues: i = {}, labelValues: a = {}, studentNewCategoryDefaultLabel: o = {}, availableChartTypes: s = {}, chartTypeLabel: c } = e, [l, u] = ce({
|
|
2043
2046
|
open: !1,
|
|
2044
2047
|
title: "",
|
|
2045
2048
|
text: "",
|
|
2046
2049
|
onClose: null,
|
|
2047
2050
|
onConfirm: null
|
|
2048
|
-
}), [d, f] =
|
|
2051
|
+
}), [d, f] = ce(!1), [p, m] = ce(""), [h, g] = ce(0), { range: _ = {}, correctAnswer: v, changeInteractiveEnabled: y, changeEditableEnabled: b } = t, x = t.graph, { showInConfigPanel: S, width: C, height: w } = r || {}, T = {
|
|
2049
2052
|
min: C?.min ? Math.max(50, C.min) : 50,
|
|
2050
2053
|
max: C?.max ? Math.min(700, C.max) : 700,
|
|
2051
2054
|
step: C?.step >= 1 ? Math.min(200, C.step) : 20
|
|
@@ -2059,13 +2062,13 @@ var mr = (e, t, n, r, i) => {
|
|
|
2059
2062
|
}, O = a && a.range ? { customValues: a.range } : {
|
|
2060
2063
|
min: 0,
|
|
2061
2064
|
max: 1e4
|
|
2062
|
-
}, k = /* @__PURE__ */ J(
|
|
2065
|
+
}, k = /* @__PURE__ */ J(yr, { children: [/* @__PURE__ */ q(xr, {
|
|
2063
2066
|
label: "Grid Interval",
|
|
2064
2067
|
value: _.step,
|
|
2065
2068
|
variant: "outlined",
|
|
2066
2069
|
onChange: (e, t) => z("step", t, e),
|
|
2067
2070
|
...D
|
|
2068
|
-
}), /* @__PURE__ */ q(
|
|
2071
|
+
}), /* @__PURE__ */ q(xr, {
|
|
2069
2072
|
label: "Label Interval",
|
|
2070
2073
|
value: _.labelStep,
|
|
2071
2074
|
variant: "outlined",
|
|
@@ -2076,9 +2079,9 @@ var mr = (e, t, n, r, i) => {
|
|
|
2076
2079
|
...t,
|
|
2077
2080
|
open: e
|
|
2078
2081
|
})), f(e);
|
|
2079
|
-
}, j = (e, t) => e.map((e) => (Object.prototype.hasOwnProperty.call(e, t) && (e[t] = t == "interactive"), e)),
|
|
2082
|
+
}, j = (e, t) => e.map((e) => (Object.prototype.hasOwnProperty.call(e, t) && (e[t] = t == "interactive"), e)), M = (e) => {
|
|
2080
2083
|
let { correctAnswer: r, data: i } = t;
|
|
2081
|
-
y === !1 && j(i, "interactive"), b === !1 && j(i, "editable"),
|
|
2084
|
+
y === !1 && j(i, "interactive"), b === !1 && j(i, "editable"), hr(i, e, _, n, t), hr(r.data, !1, _, n, t);
|
|
2082
2085
|
}, F = () => {
|
|
2083
2086
|
let e = o?.label;
|
|
2084
2087
|
n({
|
|
@@ -2106,15 +2109,15 @@ var mr = (e, t, n, r, i) => {
|
|
|
2106
2109
|
range: _
|
|
2107
2110
|
});
|
|
2108
2111
|
};
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
}, []),
|
|
2112
|
+
se(() => {
|
|
2113
|
+
M(!0), F();
|
|
2114
|
+
}, []), se(() => {
|
|
2112
2115
|
d && u({
|
|
2113
2116
|
open: !0,
|
|
2114
2117
|
title: "Warning",
|
|
2115
2118
|
text: "This change will remove values defined for one or more categories",
|
|
2116
2119
|
onConfirm: () => {
|
|
2117
|
-
|
|
2120
|
+
M(), A(!1), n({
|
|
2118
2121
|
...t,
|
|
2119
2122
|
range: _,
|
|
2120
2123
|
correctAnswer: v
|
|
@@ -2130,7 +2133,7 @@ var mr = (e, t, n, r, i) => {
|
|
|
2130
2133
|
...t,
|
|
2131
2134
|
range: _
|
|
2132
2135
|
});
|
|
2133
|
-
},
|
|
2136
|
+
}, te = (e) => {
|
|
2134
2137
|
if (e.includes("Plot")) {
|
|
2135
2138
|
if (!ee) {
|
|
2136
2139
|
u({
|
|
@@ -2138,7 +2141,7 @@ var mr = (e, t, n, r, i) => {
|
|
|
2138
2141
|
title: "Warning",
|
|
2139
2142
|
text: "The selected chart type does not support the current chart configuration. Reset chart configuration?",
|
|
2140
2143
|
onConfirm: () => {
|
|
2141
|
-
B(),
|
|
2144
|
+
B(), M(), A(!1), n({
|
|
2142
2145
|
...t,
|
|
2143
2146
|
range: _,
|
|
2144
2147
|
chartType: e
|
|
@@ -2161,18 +2164,18 @@ var mr = (e, t, n, r, i) => {
|
|
|
2161
2164
|
chartType: e
|
|
2162
2165
|
});
|
|
2163
2166
|
};
|
|
2164
|
-
return /* @__PURE__ */ J(
|
|
2165
|
-
/* @__PURE__ */ q(
|
|
2167
|
+
return /* @__PURE__ */ J(gr, { children: [
|
|
2168
|
+
/* @__PURE__ */ q(N, {
|
|
2166
2169
|
variant: "subtitle1",
|
|
2167
2170
|
children: "Configure Chart"
|
|
2168
2171
|
}),
|
|
2169
|
-
/* @__PURE__ */ J(
|
|
2170
|
-
/* @__PURE__ */ J(
|
|
2172
|
+
/* @__PURE__ */ J(_r, { children: [
|
|
2173
|
+
/* @__PURE__ */ J(yr, { children: [/* @__PURE__ */ q(mr, {
|
|
2171
2174
|
value: t.chartType,
|
|
2172
|
-
onChange: (e) =>
|
|
2175
|
+
onChange: (e) => te(e.target.value),
|
|
2173
2176
|
availableChartTypes: s,
|
|
2174
2177
|
chartTypeLabel: c
|
|
2175
|
-
}), /* @__PURE__ */ q(
|
|
2178
|
+
}), /* @__PURE__ */ q(xr, {
|
|
2176
2179
|
label: "Max Value",
|
|
2177
2180
|
value: _.max,
|
|
2178
2181
|
min: I(t.chartType).min,
|
|
@@ -2181,9 +2184,9 @@ var mr = (e, t, n, r, i) => {
|
|
|
2181
2184
|
onChange: (e, t) => z("max", t, e)
|
|
2182
2185
|
})] }),
|
|
2183
2186
|
!t.chartType.includes("Plot") && k,
|
|
2184
|
-
S && /* @__PURE__ */ J(
|
|
2185
|
-
/* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(
|
|
2186
|
-
/* @__PURE__ */ J(
|
|
2187
|
+
S && /* @__PURE__ */ J(Sr, { children: [
|
|
2188
|
+
/* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(N, { children: "Dimensions(px)" }) }),
|
|
2189
|
+
/* @__PURE__ */ J(vr, { children: [/* @__PURE__ */ q(br, {
|
|
2187
2190
|
label: "Width",
|
|
2188
2191
|
value: x.width,
|
|
2189
2192
|
min: T.min,
|
|
@@ -2191,8 +2194,8 @@ var mr = (e, t, n, r, i) => {
|
|
|
2191
2194
|
step: T.step,
|
|
2192
2195
|
variant: "outlined",
|
|
2193
2196
|
onChange: (e, t) => L("width", t)
|
|
2194
|
-
}), /* @__PURE__ */ q(
|
|
2195
|
-
/* @__PURE__ */ J(
|
|
2197
|
+
}), /* @__PURE__ */ q(Cr, { children: "Min 50, Max 700" })] }),
|
|
2198
|
+
/* @__PURE__ */ J(vr, { children: [/* @__PURE__ */ q(br, {
|
|
2196
2199
|
label: "Height",
|
|
2197
2200
|
value: x.height,
|
|
2198
2201
|
min: E.min,
|
|
@@ -2200,10 +2203,10 @@ var mr = (e, t, n, r, i) => {
|
|
|
2200
2203
|
step: E.step,
|
|
2201
2204
|
variant: "outlined",
|
|
2202
2205
|
onChange: (e, t) => L("height", t)
|
|
2203
|
-
}), /* @__PURE__ */ q(
|
|
2206
|
+
}), /* @__PURE__ */ q(Cr, { children: "Min 400, Max 700" })] })
|
|
2204
2207
|
] })
|
|
2205
2208
|
] }),
|
|
2206
|
-
/* @__PURE__ */ q(
|
|
2209
|
+
/* @__PURE__ */ q(P, {
|
|
2207
2210
|
open: l.open,
|
|
2208
2211
|
title: l.title,
|
|
2209
2212
|
text: l.text,
|
|
@@ -2212,7 +2215,7 @@ var mr = (e, t, n, r, i) => {
|
|
|
2212
2215
|
})
|
|
2213
2216
|
] });
|
|
2214
2217
|
};
|
|
2215
|
-
|
|
2218
|
+
wr.propTypes = {
|
|
2216
2219
|
chartDimensions: Z.default.object,
|
|
2217
2220
|
domain: Z.default.object,
|
|
2218
2221
|
gridValues: Z.default.object,
|
|
@@ -2228,7 +2231,7 @@ Cr.propTypes = {
|
|
|
2228
2231
|
};
|
|
2229
2232
|
//#endregion
|
|
2230
2233
|
//#region ../../shared/configure-events/dist/index.js
|
|
2231
|
-
var
|
|
2234
|
+
var Tr = class e extends CustomEvent {
|
|
2232
2235
|
static {
|
|
2233
2236
|
this.TYPE = "model.updated";
|
|
2234
2237
|
}
|
|
@@ -2241,7 +2244,7 @@ var wr = class e extends CustomEvent {
|
|
|
2241
2244
|
}
|
|
2242
2245
|
}), this.update = t, this.reset = n;
|
|
2243
2246
|
}
|
|
2244
|
-
},
|
|
2247
|
+
}, Er = class e extends CustomEvent {
|
|
2245
2248
|
static {
|
|
2246
2249
|
this.TYPE = "delete.image";
|
|
2247
2250
|
}
|
|
@@ -2254,7 +2257,7 @@ var wr = class e extends CustomEvent {
|
|
|
2254
2257
|
}
|
|
2255
2258
|
}), this.src = t, this.done = n;
|
|
2256
2259
|
}
|
|
2257
|
-
},
|
|
2260
|
+
}, Dr = class e extends CustomEvent {
|
|
2258
2261
|
static {
|
|
2259
2262
|
this.TYPE = "insert.image";
|
|
2260
2263
|
}
|
|
@@ -2264,7 +2267,7 @@ var wr = class e extends CustomEvent {
|
|
|
2264
2267
|
detail: t
|
|
2265
2268
|
}), this.handler = t;
|
|
2266
2269
|
}
|
|
2267
|
-
},
|
|
2270
|
+
}, Or = class e extends CustomEvent {
|
|
2268
2271
|
static {
|
|
2269
2272
|
this.TYPE = "delete.sound";
|
|
2270
2273
|
}
|
|
@@ -2277,7 +2280,7 @@ var wr = class e extends CustomEvent {
|
|
|
2277
2280
|
}
|
|
2278
2281
|
}), this.src = t, this.done = n;
|
|
2279
2282
|
}
|
|
2280
|
-
},
|
|
2283
|
+
}, kr = class e extends CustomEvent {
|
|
2281
2284
|
static {
|
|
2282
2285
|
this.TYPE = "insert.sound";
|
|
2283
2286
|
}
|
|
@@ -2287,11 +2290,11 @@ var wr = class e extends CustomEvent {
|
|
|
2287
2290
|
detail: t
|
|
2288
2291
|
}), this.handler = t;
|
|
2289
2292
|
}
|
|
2290
|
-
},
|
|
2293
|
+
}, Ar = S("div")(({ theme: e }) => ({
|
|
2291
2294
|
marginBottom: e.spacing(2.5),
|
|
2292
2295
|
display: "flex",
|
|
2293
2296
|
flex: 1
|
|
2294
|
-
})),
|
|
2297
|
+
})), jr = S("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), Mr = S("div")({ flex: 1 }), Nr = S(L)({ color: `${l.tertiary()} !important` }), Pr = (e, t) => {
|
|
2295
2298
|
if (!e) return t;
|
|
2296
2299
|
let n = [];
|
|
2297
2300
|
return (t || []).forEach((t, r) => {
|
|
@@ -2303,7 +2306,7 @@ var wr = class e extends CustomEvent {
|
|
|
2303
2306
|
interactive: t.interactive
|
|
2304
2307
|
};
|
|
2305
2308
|
}), n;
|
|
2306
|
-
},
|
|
2309
|
+
}, Fr = class extends G.Component {
|
|
2307
2310
|
static propTypes = {
|
|
2308
2311
|
model: Z.default.object.isRequired,
|
|
2309
2312
|
onChange: Z.default.func.isRequired,
|
|
@@ -2323,7 +2326,7 @@ var wr = class e extends CustomEvent {
|
|
|
2323
2326
|
data: e
|
|
2324
2327
|
});
|
|
2325
2328
|
changeAddRemoveEnabled = (e) => {
|
|
2326
|
-
let { model: t } = this.props, n =
|
|
2329
|
+
let { model: t } = this.props, n = Pr(t.correctAnswer.data, t.data);
|
|
2327
2330
|
e ? this.props.onChange({
|
|
2328
2331
|
...this.props.model,
|
|
2329
2332
|
addCategoryEnabled: e
|
|
@@ -2352,13 +2355,13 @@ var wr = class e extends CustomEvent {
|
|
|
2352
2355
|
});
|
|
2353
2356
|
render() {
|
|
2354
2357
|
let { model: e, charts: t, labelsPlaceholders: n, titlePlaceholder: r, showPixelGuides: i, authorNewCategoryDefaults: a, chartingOptions: o, mathMlOptions: s = {}, labelsCharactersLimit: c } = this.props, { dialog: l } = this.state, { domain: u = {}, range: d = {} } = e || {};
|
|
2355
|
-
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
2356
|
-
/* @__PURE__ */ q(
|
|
2358
|
+
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(jr, { children: "Define Initial Chart Attributes" }), /* @__PURE__ */ q(Ar, { children: /* @__PURE__ */ J(Mr, { children: [
|
|
2359
|
+
/* @__PURE__ */ q(N, {
|
|
2357
2360
|
component: "div",
|
|
2358
2361
|
type: "body1",
|
|
2359
2362
|
children: /* @__PURE__ */ q("span", { children: "Use the tools below to set up the chart as it will initially appear to students." })
|
|
2360
2363
|
}),
|
|
2361
|
-
/* @__PURE__ */ q(
|
|
2364
|
+
/* @__PURE__ */ q(z, {
|
|
2362
2365
|
defineChart: !0,
|
|
2363
2366
|
chartingOptions: o,
|
|
2364
2367
|
showPixelGuides: i,
|
|
@@ -2385,13 +2388,13 @@ var wr = class e extends CustomEvent {
|
|
|
2385
2388
|
mathMlOptions: s,
|
|
2386
2389
|
labelsCharactersLimit: c
|
|
2387
2390
|
}),
|
|
2388
|
-
e.changeAddCategoryEnabled && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
2391
|
+
e.changeAddCategoryEnabled && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Nr, {
|
|
2389
2392
|
checked: e.addCategoryEnabled,
|
|
2390
2393
|
onChange: (e) => {
|
|
2391
2394
|
this.changeAddRemoveEnabled(e.target.checked);
|
|
2392
2395
|
}
|
|
2393
2396
|
}), o?.addCategory?.authoringLabel] }),
|
|
2394
|
-
/* @__PURE__ */ q(
|
|
2397
|
+
/* @__PURE__ */ q(P, {
|
|
2395
2398
|
open: l.open,
|
|
2396
2399
|
title: l.title,
|
|
2397
2400
|
text: l.text,
|
|
@@ -2400,20 +2403,20 @@ var wr = class e extends CustomEvent {
|
|
|
2400
2403
|
})
|
|
2401
2404
|
] }, "graph") })] });
|
|
2402
2405
|
}
|
|
2403
|
-
},
|
|
2406
|
+
}, Ir = S("div")(({ theme: e }) => ({
|
|
2404
2407
|
marginBottom: e.spacing(2.5),
|
|
2405
2408
|
display: "flex",
|
|
2406
2409
|
flex: 1
|
|
2407
|
-
})),
|
|
2410
|
+
})), Lr = S("div")({ flex: 1 }), Rr = S("div")(({ theme: e }) => ({ border: `2px solid ${e.palette.error.main}` })), zr = S(N)(({ theme: e }) => ({
|
|
2408
2411
|
fontSize: e.typography.fontSize - 2,
|
|
2409
2412
|
color: e.palette.error.main,
|
|
2410
2413
|
paddingTop: e.spacing(1)
|
|
2411
|
-
})),
|
|
2414
|
+
})), Br = S("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), Vr = (e, t) => e.map((e, n) => ({
|
|
2412
2415
|
...e,
|
|
2413
2416
|
editable: n < t.length ? t[n].editable : !0,
|
|
2414
2417
|
interactive: n < t.length ? t[n].interactive : !0,
|
|
2415
2418
|
deletable: n >= t.length
|
|
2416
|
-
})),
|
|
2419
|
+
})), Hr = (e, t) => {
|
|
2417
2420
|
if (!e) return t;
|
|
2418
2421
|
let n = [...e], r = [];
|
|
2419
2422
|
if ((t || []).forEach((t, n) => {
|
|
@@ -2426,25 +2429,25 @@ var wr = class e extends CustomEvent {
|
|
|
2426
2429
|
};
|
|
2427
2430
|
}), r.length < e.length) {
|
|
2428
2431
|
let i = (n || []).slice(r.length, e.length);
|
|
2429
|
-
return
|
|
2432
|
+
return Vr((r || []).concat(i), t);
|
|
2430
2433
|
}
|
|
2431
2434
|
return r;
|
|
2432
|
-
},
|
|
2435
|
+
}, Ur = (e, t) => {
|
|
2433
2436
|
let n = t.length - 1, { editable: r, interactive: i, deletable: a, ...o } = t[t.length - 1];
|
|
2434
|
-
return (e || []).splice(n, 0, o),
|
|
2435
|
-
},
|
|
2436
|
-
let r = e && e.model && e.model.data || [], i = t && t.model && t.model.data || [], a =
|
|
2437
|
-
if (r.length > i.length) return s =
|
|
2437
|
+
return (e || []).splice(n, 0, o), Vr([...e], t);
|
|
2438
|
+
}, Wr = (e, t, n) => ((e || []).splice(n, 1), Vr([...e], t)), Gr = (e, t, n) => {
|
|
2439
|
+
let r = e && e.model && e.model.data || [], i = t && t.model && t.model.data || [], a = ne(e && e.model && e.model.correctAnswer && e.model.correctAnswer.data || []), o = ne(n ? n.categories : []), s = [];
|
|
2440
|
+
if (r.length > i.length) return s = Ur(a, r), s;
|
|
2438
2441
|
if (r.length < i.length) {
|
|
2439
2442
|
let e = r.length;
|
|
2440
2443
|
for (let t = 0; t < r.length; t++) if (r[t].index !== t) {
|
|
2441
2444
|
e = t;
|
|
2442
2445
|
break;
|
|
2443
2446
|
}
|
|
2444
|
-
return s =
|
|
2447
|
+
return s = Wr(o, r, e), s;
|
|
2445
2448
|
}
|
|
2446
|
-
return s =
|
|
2447
|
-
},
|
|
2449
|
+
return s = Hr(a, r), s;
|
|
2450
|
+
}, Kr = class extends G.Component {
|
|
2448
2451
|
static propTypes = {
|
|
2449
2452
|
correctAnswerErrors: Z.default.object,
|
|
2450
2453
|
studentNewCategoryDefaultLabel: Z.default.string,
|
|
@@ -2467,22 +2470,22 @@ var wr = class e extends CustomEvent {
|
|
|
2467
2470
|
});
|
|
2468
2471
|
};
|
|
2469
2472
|
componentDidMount() {
|
|
2470
|
-
let e =
|
|
2471
|
-
this.setState({ categories: e ||
|
|
2473
|
+
let e = Gr(this.props, this.props, null);
|
|
2474
|
+
this.setState({ categories: e || Hr(this.props.model.correctAnswer.data, this.props.model.data) });
|
|
2472
2475
|
}
|
|
2473
2476
|
componentDidUpdate(e, t) {
|
|
2474
|
-
let n =
|
|
2477
|
+
let n = Gr(this.props, e, t);
|
|
2475
2478
|
n && !W(n, this.state.categories) && (this.changeData(n), this.setState({ categories: n }));
|
|
2476
2479
|
}
|
|
2477
2480
|
render() {
|
|
2478
2481
|
let { model: e, charts: t, error: n, studentNewCategoryDefaultLabel: r, correctAnswerErrors: i, mathMlOptions: a = {}, labelsPlaceholders: o = {} } = this.props, { categories: s } = this.state, { domain: c = {}, range: l = {} } = e || {}, { identicalError: u, categoriesError: d } = i || {};
|
|
2479
|
-
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
2480
|
-
/* @__PURE__ */ q(
|
|
2482
|
+
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Br, { children: "Define Correct Response" }), /* @__PURE__ */ q(Ir, { children: /* @__PURE__ */ J(Lr, { children: [
|
|
2483
|
+
/* @__PURE__ */ q(N, {
|
|
2481
2484
|
component: "div",
|
|
2482
2485
|
type: "body1",
|
|
2483
2486
|
children: /* @__PURE__ */ q("span", { children: "Use the tools below to define the correct answer." })
|
|
2484
2487
|
}),
|
|
2485
|
-
q(u || d ?
|
|
2488
|
+
q(u || d ? Rr : "div", { children: /* @__PURE__ */ q(z, {
|
|
2486
2489
|
chartType: e.chartType,
|
|
2487
2490
|
size: e.graph,
|
|
2488
2491
|
domain: c,
|
|
@@ -2497,14 +2500,14 @@ var wr = class e extends CustomEvent {
|
|
|
2497
2500
|
mathMlOptions: a,
|
|
2498
2501
|
labelsPlaceholders: o
|
|
2499
2502
|
}) }, `correct-response-graph-${e.correctAnswer.name}`),
|
|
2500
|
-
(u || d) && /* @__PURE__ */ q(
|
|
2503
|
+
(u || d) && /* @__PURE__ */ q(zr, {
|
|
2501
2504
|
component: "div",
|
|
2502
2505
|
type: "body1",
|
|
2503
2506
|
children: /* @__PURE__ */ q("span", { children: u || d })
|
|
2504
2507
|
})
|
|
2505
2508
|
] }, "graph") })] });
|
|
2506
2509
|
}
|
|
2507
|
-
},
|
|
2510
|
+
}, qr = [
|
|
2508
2511
|
.01,
|
|
2509
2512
|
.02,
|
|
2510
2513
|
.04,
|
|
@@ -2531,7 +2534,7 @@ var wr = class e extends CustomEvent {
|
|
|
2531
2534
|
100,
|
|
2532
2535
|
500,
|
|
2533
2536
|
1e3
|
|
2534
|
-
],
|
|
2537
|
+
], Jr = [
|
|
2535
2538
|
.01,
|
|
2536
2539
|
.02,
|
|
2537
2540
|
.05,
|
|
@@ -2548,7 +2551,7 @@ var wr = class e extends CustomEvent {
|
|
|
2548
2551
|
100,
|
|
2549
2552
|
500,
|
|
2550
2553
|
1e3
|
|
2551
|
-
],
|
|
2554
|
+
], Yr = {
|
|
2552
2555
|
.01: [
|
|
2553
2556
|
0,
|
|
2554
2557
|
.01,
|
|
@@ -2727,14 +2730,14 @@ var wr = class e extends CustomEvent {
|
|
|
2727
2730
|
4e3,
|
|
2728
2731
|
5e3
|
|
2729
2732
|
]
|
|
2730
|
-
},
|
|
2731
|
-
let r = 10 * (e.max - e.min) / t, i = r * 10, a = n && !
|
|
2732
|
-
return (!n || a ?
|
|
2733
|
-
},
|
|
2734
|
-
let i =
|
|
2733
|
+
}, Xr = (e, t, n = !1) => {
|
|
2734
|
+
let r = 10 * (e.max - e.min) / t, i = r * 10, a = n && !Jr.includes(e.step) && qr.includes(e.step);
|
|
2735
|
+
return (!n || a ? qr : Jr).filter((e) => e >= r && e <= i);
|
|
2736
|
+
}, Zr = (e) => Yr[e] || [], Qr = (e, t, n, r) => {
|
|
2737
|
+
let i = Xr(e, t), a = Zr(e.step || 1);
|
|
2735
2738
|
if (!W(n, i) && !i.includes(e.step)) {
|
|
2736
|
-
let n =
|
|
2737
|
-
return e.step = n, a =
|
|
2739
|
+
let n = Xr(e, t, !0)[0] || 1;
|
|
2740
|
+
return e.step = n, a = Zr(n), a.includes(e.labelStep) || (e.labelStep = n), {
|
|
2738
2741
|
gridValues: i,
|
|
2739
2742
|
labelValues: a
|
|
2740
2743
|
};
|
|
@@ -2743,22 +2746,22 @@ var wr = class e extends CustomEvent {
|
|
|
2743
2746
|
gridValues: i,
|
|
2744
2747
|
labelValues: a
|
|
2745
2748
|
};
|
|
2746
|
-
},
|
|
2749
|
+
}, $r = (0, Ke.default)("@pie-element:graphing:configure"), { Panel: ei, toggle: $, radio: ti, dropdown: ni, textField: ri } = Yn, ii = S(sr)(({ theme: e }) => ({
|
|
2747
2750
|
width: "100%",
|
|
2748
2751
|
paddingTop: e.spacing(2),
|
|
2749
2752
|
marginBottom: e.spacing(2)
|
|
2750
|
-
})),
|
|
2753
|
+
})), ai = S(N)(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), oi = S("div")(({ theme: e }) => ({
|
|
2751
2754
|
fontSize: e.typography.fontSize - 2,
|
|
2752
2755
|
color: e.palette.error.main,
|
|
2753
2756
|
paddingTop: e.spacing(1)
|
|
2754
|
-
})),
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
],
|
|
2757
|
+
})), si = [
|
|
2758
|
+
D.Bar(),
|
|
2759
|
+
D.Histogram(),
|
|
2760
|
+
D.LineDot(),
|
|
2761
|
+
D.LineCross(),
|
|
2762
|
+
D.DotPlot(),
|
|
2763
|
+
D.LinePlot()
|
|
2764
|
+
], ci = class extends K.Component {
|
|
2762
2765
|
static propTypes = {
|
|
2763
2766
|
onModelChanged: Z.default.func,
|
|
2764
2767
|
onConfigurationChanged: Z.default.func,
|
|
@@ -2770,7 +2773,7 @@ var wr = class e extends CustomEvent {
|
|
|
2770
2773
|
};
|
|
2771
2774
|
constructor(e) {
|
|
2772
2775
|
super(e);
|
|
2773
|
-
let { range: t = {}, graph: n } = e.model || {}, r = { range:
|
|
2776
|
+
let { range: t = {}, graph: n } = e.model || {}, r = { range: Xr(t, n.height, !0) }, i = { range: Zr(t.step || 1) };
|
|
2774
2777
|
this.state = {
|
|
2775
2778
|
gridValues: r,
|
|
2776
2779
|
labelValues: i
|
|
@@ -2796,7 +2799,7 @@ var wr = class e extends CustomEvent {
|
|
|
2796
2799
|
let { model: t, onModelChanged: n } = this.props, { gridValues: r, labelValues: i } = this.state, a = {
|
|
2797
2800
|
...t,
|
|
2798
2801
|
...e
|
|
2799
|
-
}, { graph: o, range: s } = a, c = {}, l = {}, u =
|
|
2802
|
+
}, { graph: o, range: s } = a, c = {}, l = {}, u = Qr(s, o.height, r.range, i.range);
|
|
2800
2803
|
c.range = u.gridValues, l.range = u.labelValues, this.setState({
|
|
2801
2804
|
gridValues: c,
|
|
2802
2805
|
labelValues: l
|
|
@@ -2804,66 +2807,66 @@ var wr = class e extends CustomEvent {
|
|
|
2804
2807
|
};
|
|
2805
2808
|
render() {
|
|
2806
2809
|
let { configuration: e, imageSupport: t, model: n, onConfigurationChanged: r, onModelChanged: i, uploadSoundSupport: a } = this.props;
|
|
2807
|
-
|
|
2808
|
-
let { graph: o } = n, { baseInputConfiguration: s = {}, contentDimensions: c = {}, chartDimensions: l = {}, authorNewCategoryDefaults: u = {}, labelsPlaceholders: d = {}, instruction: f = {}, maxImageWidth: p = {}, maxImageHeight: m = {}, prompt: h = {}, rationale: g = {}, scoringType: _ = {}, settingsPanelDisabled: v, spellCheck: y = {}, studentInstructions: b = {}, teacherInstructions: x = {}, titlePlaceholder: S = {}, withRubric: C = {}, chartingOptions: w = {}, availableChartTypes: T = {}, mathMlOptions: E = {}, chartTypeLabel: D, language: O = {}, languageChoices: k = {}, labelsCharactersLimit: A } = e || {}, { errors: j, extraCSSRules: M, promptEnabled: N, rationaleEnabled: P, spellCheckEnabled: F, teacherInstructionsEnabled: I, studentNewCategoryDefaultLabel:
|
|
2810
|
+
$r("[render] model", n);
|
|
2811
|
+
let { graph: o } = n, { baseInputConfiguration: s = {}, contentDimensions: c = {}, chartDimensions: l = {}, authorNewCategoryDefaults: u = {}, labelsPlaceholders: d = {}, instruction: f = {}, maxImageWidth: p = {}, maxImageHeight: m = {}, prompt: h = {}, rationale: g = {}, scoringType: _ = {}, settingsPanelDisabled: v, spellCheck: y = {}, studentInstructions: b = {}, teacherInstructions: x = {}, titlePlaceholder: S = {}, withRubric: C = {}, chartingOptions: w = {}, availableChartTypes: T = {}, mathMlOptions: E = {}, chartTypeLabel: D, language: O = {}, languageChoices: k = {}, labelsCharactersLimit: A } = e || {}, { errors: j, extraCSSRules: M, promptEnabled: N, rationaleEnabled: P, spellCheckEnabled: F, teacherInstructionsEnabled: I, studentNewCategoryDefaultLabel: L } = n || {}, { categoryErrors: z, correctAnswerErrors: ee, prompt: B, rationale: te, teacherInstructions: V } = j || {}, { gridValues: ne, labelValues: re } = this.state, H = l.showInConfigPanel || !0, U = p && p.prompt, W = m && m.prompt, ie = {
|
|
2809
2812
|
changeInteractiveEnabled: w.changeInteractive?.settings && $(w.changeInteractive.settingsLabel),
|
|
2810
2813
|
changeEditableEnabled: w.changeEditable?.settings && $(w.changeEditable.settingsLabel),
|
|
2811
2814
|
changeAddCategoryEnabled: w.addCategory?.settings && $(w.addCategory.settingsLabel)
|
|
2812
|
-
},
|
|
2815
|
+
}, G = {
|
|
2813
2816
|
teacherInstructionsEnabled: x.settings && $(x.label),
|
|
2814
2817
|
studentInstructionsEnabled: b.settings && $(b.label),
|
|
2815
2818
|
rationaleEnabled: g.settings && $(g.label),
|
|
2816
2819
|
spellCheckEnabled: y.settings && $(y.label),
|
|
2817
2820
|
promptEnabled: h.settings && $(h.label),
|
|
2818
|
-
scoringType: _.settings &&
|
|
2821
|
+
scoringType: _.settings && ti(_.label, ["all or nothing", "partial scoring"]),
|
|
2819
2822
|
rubricEnabled: C?.settings && $(C?.label),
|
|
2820
2823
|
"language.enabled": O.settings && $(O.label, !0),
|
|
2821
|
-
language: O.settings && O.enabled &&
|
|
2822
|
-
instruction: f.settings &&
|
|
2823
|
-
},
|
|
2824
|
+
language: O.settings && O.enabled && ni(k.label, k.options),
|
|
2825
|
+
instruction: f.settings && ri(f.label)
|
|
2826
|
+
}, K = (e = {}) => ({
|
|
2824
2827
|
...s,
|
|
2825
2828
|
...e
|
|
2826
2829
|
});
|
|
2827
|
-
return /* @__PURE__ */ J(
|
|
2830
|
+
return /* @__PURE__ */ J(bn.ConfigLayout, {
|
|
2828
2831
|
extraCSSRules: M,
|
|
2829
2832
|
dimensions: c,
|
|
2830
2833
|
hideSettings: v,
|
|
2831
|
-
settings: /* @__PURE__ */ q(
|
|
2834
|
+
settings: /* @__PURE__ */ q(ei, {
|
|
2832
2835
|
model: n,
|
|
2833
2836
|
configuration: e,
|
|
2834
2837
|
onChangeModel: i,
|
|
2835
2838
|
onChangeConfiguration: r,
|
|
2836
2839
|
groups: {
|
|
2837
|
-
Settings:
|
|
2838
|
-
Properties:
|
|
2840
|
+
Settings: ie,
|
|
2841
|
+
Properties: G
|
|
2839
2842
|
}
|
|
2840
2843
|
}),
|
|
2841
2844
|
children: [
|
|
2842
|
-
/* @__PURE__ */ q(
|
|
2845
|
+
/* @__PURE__ */ q(ai, {
|
|
2843
2846
|
component: "div",
|
|
2844
2847
|
type: "body1",
|
|
2845
2848
|
children: f?.label || ""
|
|
2846
2849
|
}),
|
|
2847
|
-
I && /* @__PURE__ */ J(
|
|
2850
|
+
I && /* @__PURE__ */ J(ii, {
|
|
2848
2851
|
label: x.label,
|
|
2849
|
-
children: [/* @__PURE__ */ q(
|
|
2852
|
+
children: [/* @__PURE__ */ q(R, {
|
|
2850
2853
|
markup: n.teacherInstructions || "",
|
|
2851
2854
|
onChange: this.onTeacherInstructionsChange,
|
|
2852
2855
|
imageSupport: t,
|
|
2853
2856
|
nonEmpty: !1,
|
|
2854
|
-
error:
|
|
2857
|
+
error: V,
|
|
2855
2858
|
spellCheck: F,
|
|
2856
|
-
pluginProps:
|
|
2857
|
-
maxImageWidth: p && p.teacherInstructions ||
|
|
2858
|
-
maxImageHeight: m && m.teacherInstructions ||
|
|
2859
|
+
pluginProps: K(x?.inputConfiguration),
|
|
2860
|
+
maxImageWidth: p && p.teacherInstructions || U,
|
|
2861
|
+
maxImageHeight: m && m.teacherInstructions || W,
|
|
2859
2862
|
uploadSoundSupport: a,
|
|
2860
2863
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
2861
2864
|
mathMlOptions: E
|
|
2862
|
-
}),
|
|
2865
|
+
}), V && /* @__PURE__ */ q(oi, { children: V })]
|
|
2863
2866
|
}),
|
|
2864
|
-
N && /* @__PURE__ */ J(
|
|
2867
|
+
N && /* @__PURE__ */ J(ii, {
|
|
2865
2868
|
label: h.label,
|
|
2866
|
-
children: [/* @__PURE__ */ q(
|
|
2869
|
+
children: [/* @__PURE__ */ q(R, {
|
|
2867
2870
|
markup: n.prompt,
|
|
2868
2871
|
onChange: this.onPromptChange,
|
|
2869
2872
|
imageSupport: t,
|
|
@@ -2871,68 +2874,68 @@ var wr = class e extends CustomEvent {
|
|
|
2871
2874
|
error: B,
|
|
2872
2875
|
spellCheck: F,
|
|
2873
2876
|
disableUnderline: !0,
|
|
2874
|
-
pluginProps:
|
|
2875
|
-
maxImageWidth:
|
|
2876
|
-
maxImageHeight:
|
|
2877
|
+
pluginProps: K(h?.inputConfiguration),
|
|
2878
|
+
maxImageWidth: U,
|
|
2879
|
+
maxImageHeight: W,
|
|
2877
2880
|
uploadSoundSupport: a,
|
|
2878
2881
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
2879
2882
|
mathMlOptions: E
|
|
2880
|
-
}), B && /* @__PURE__ */ q(
|
|
2883
|
+
}), B && /* @__PURE__ */ q(oi, { children: B })]
|
|
2881
2884
|
}),
|
|
2882
|
-
/* @__PURE__ */ q(
|
|
2885
|
+
/* @__PURE__ */ q(wr, {
|
|
2883
2886
|
model: n,
|
|
2884
2887
|
onChange: this.onConfigChange,
|
|
2885
|
-
gridValues:
|
|
2886
|
-
labelValues:
|
|
2888
|
+
gridValues: ne,
|
|
2889
|
+
labelValues: re,
|
|
2887
2890
|
chartDimensions: l,
|
|
2888
|
-
charts:
|
|
2889
|
-
studentNewCategoryDefaultLabel:
|
|
2891
|
+
charts: si,
|
|
2892
|
+
studentNewCategoryDefaultLabel: L,
|
|
2890
2893
|
availableChartTypes: T,
|
|
2891
2894
|
chartTypeLabel: D
|
|
2892
2895
|
}),
|
|
2893
|
-
/* @__PURE__ */ q(
|
|
2896
|
+
/* @__PURE__ */ q(Fr, {
|
|
2894
2897
|
model: n,
|
|
2895
2898
|
onChange: i,
|
|
2896
|
-
charts:
|
|
2899
|
+
charts: si,
|
|
2897
2900
|
labelsPlaceholders: d,
|
|
2898
2901
|
titlePlaceholder: S,
|
|
2899
|
-
showPixelGuides:
|
|
2902
|
+
showPixelGuides: H,
|
|
2900
2903
|
authorNewCategoryDefaults: u,
|
|
2901
2904
|
chartingOptions: w,
|
|
2902
2905
|
mathMlOptions: E,
|
|
2903
2906
|
labelsCharactersLimit: A
|
|
2904
2907
|
}),
|
|
2905
|
-
/* @__PURE__ */ q(
|
|
2908
|
+
/* @__PURE__ */ q(Kr, {
|
|
2906
2909
|
config: o,
|
|
2907
2910
|
model: n,
|
|
2908
2911
|
onChange: i,
|
|
2909
|
-
charts:
|
|
2912
|
+
charts: si,
|
|
2910
2913
|
error: z,
|
|
2911
2914
|
correctAnswerErrors: ee,
|
|
2912
|
-
studentNewCategoryDefaultLabel:
|
|
2915
|
+
studentNewCategoryDefaultLabel: L,
|
|
2913
2916
|
mathMlOptions: E,
|
|
2914
2917
|
labelsPlaceholders: d
|
|
2915
2918
|
}),
|
|
2916
|
-
P && /* @__PURE__ */ J(
|
|
2919
|
+
P && /* @__PURE__ */ J(ii, {
|
|
2917
2920
|
label: g.label || "Rationale",
|
|
2918
|
-
children: [/* @__PURE__ */ q(
|
|
2921
|
+
children: [/* @__PURE__ */ q(R, {
|
|
2919
2922
|
markup: n.rationale || "",
|
|
2920
2923
|
onChange: this.onRationaleChange,
|
|
2921
2924
|
imageSupport: t,
|
|
2922
|
-
error:
|
|
2925
|
+
error: te,
|
|
2923
2926
|
spellCheck: F,
|
|
2924
|
-
pluginProps:
|
|
2925
|
-
maxImageWidth: p && p.rationale ||
|
|
2926
|
-
maxImageHeight: m && m.rationale ||
|
|
2927
|
+
pluginProps: K(g?.inputConfiguration),
|
|
2928
|
+
maxImageWidth: p && p.rationale || U,
|
|
2929
|
+
maxImageHeight: m && m.rationale || W,
|
|
2927
2930
|
uploadSoundSupport: a,
|
|
2928
2931
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
2929
2932
|
mathMlOptions: E
|
|
2930
|
-
}),
|
|
2933
|
+
}), te && /* @__PURE__ */ q(oi, { children: te })]
|
|
2931
2934
|
})
|
|
2932
2935
|
]
|
|
2933
2936
|
});
|
|
2934
2937
|
}
|
|
2935
|
-
},
|
|
2938
|
+
}, li = {
|
|
2936
2939
|
model: {
|
|
2937
2940
|
addCategoryEnabled: !0,
|
|
2938
2941
|
changeAddCategoryEnabled: !1,
|
|
@@ -3114,20 +3117,20 @@ var wr = class e extends CustomEvent {
|
|
|
3114
3117
|
}
|
|
3115
3118
|
}
|
|
3116
3119
|
}
|
|
3117
|
-
},
|
|
3120
|
+
}, ui = (0, Ke.default)("pie-elements:graphing:configure"), di = class e extends HTMLElement {
|
|
3118
3121
|
static createDefaultModel = (e = {}) => ({
|
|
3119
|
-
...
|
|
3122
|
+
...li.model,
|
|
3120
3123
|
...e
|
|
3121
3124
|
});
|
|
3122
3125
|
constructor() {
|
|
3123
|
-
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration =
|
|
3126
|
+
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = li.configuration;
|
|
3124
3127
|
}
|
|
3125
3128
|
set model(t) {
|
|
3126
3129
|
this._model = e.createDefaultModel(t), this._render();
|
|
3127
3130
|
}
|
|
3128
3131
|
set configuration(e) {
|
|
3129
3132
|
let t = {
|
|
3130
|
-
...
|
|
3133
|
+
...li.configuration,
|
|
3131
3134
|
...e
|
|
3132
3135
|
};
|
|
3133
3136
|
this._configuration = t, t?.language?.enabled ? t?.languageChoices?.options?.length && (this._model.language = t?.languageChoices.options[0].value) : t.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
|
|
@@ -3136,26 +3139,26 @@ var wr = class e extends CustomEvent {
|
|
|
3136
3139
|
})) : delete this._model.language, this._render();
|
|
3137
3140
|
}
|
|
3138
3141
|
onModelChanged(e) {
|
|
3139
|
-
this._model = e, this._render(),
|
|
3142
|
+
this._model = e, this._render(), ui("[onModelChanged]: ", this._model), this.dispatchEvent(new Tr(this._model));
|
|
3140
3143
|
}
|
|
3141
3144
|
onConfigurationChanged(e) {
|
|
3142
3145
|
this._configuration = e, this._render();
|
|
3143
3146
|
}
|
|
3144
3147
|
insertImage(e) {
|
|
3145
|
-
this.dispatchEvent(new
|
|
3148
|
+
this.dispatchEvent(new Dr(e));
|
|
3146
3149
|
}
|
|
3147
3150
|
onDeleteImage(e, t) {
|
|
3148
|
-
this.dispatchEvent(new
|
|
3151
|
+
this.dispatchEvent(new Er(e, t));
|
|
3149
3152
|
}
|
|
3150
3153
|
insertSound(e) {
|
|
3151
|
-
this.dispatchEvent(new
|
|
3154
|
+
this.dispatchEvent(new kr(e));
|
|
3152
3155
|
}
|
|
3153
3156
|
onDeleteSound(e, t) {
|
|
3154
|
-
this.dispatchEvent(new
|
|
3157
|
+
this.dispatchEvent(new Or(e, t));
|
|
3155
3158
|
}
|
|
3156
3159
|
_render() {
|
|
3157
3160
|
if (this._model) {
|
|
3158
|
-
let e = K.createElement(
|
|
3161
|
+
let e = K.createElement(ci, {
|
|
3159
3162
|
onModelChanged: this.onModelChanged.bind(this),
|
|
3160
3163
|
onConfigurationChanged: this.onConfigurationChanged.bind(this),
|
|
3161
3164
|
model: this._model,
|
|
@@ -3169,8 +3172,8 @@ var wr = class e extends CustomEvent {
|
|
|
3169
3172
|
delete: this.onDeleteSound.bind(this)
|
|
3170
3173
|
}
|
|
3171
3174
|
});
|
|
3172
|
-
this._root ||=
|
|
3173
|
-
|
|
3175
|
+
this._root ||= le(this), this._root.render(e), queueMicrotask(() => {
|
|
3176
|
+
m(this);
|
|
3174
3177
|
});
|
|
3175
3178
|
}
|
|
3176
3179
|
}
|
|
@@ -3182,6 +3185,6 @@ var wr = class e extends CustomEvent {
|
|
|
3182
3185
|
}
|
|
3183
3186
|
};
|
|
3184
3187
|
//#endregion
|
|
3185
|
-
export {
|
|
3188
|
+
export { di as default };
|
|
3186
3189
|
|
|
3187
3190
|
//# sourceMappingURL=index.js.map
|