@tenorlab/react-dashboard 1.6.0 → 1.6.2
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/README.md +179 -127
- package/dist/core.d.ts +3 -0
- package/dist/core.es.js +5 -15
- package/dist/react-dashboard.d.ts +3 -0
- package/dist/react-dashboard.es.js +769 -766
- package/dist/styles.css +1 -1
- package/package.json +4 -6
|
@@ -1,123 +1,123 @@
|
|
|
1
1
|
import { create as mt } from "zustand";
|
|
2
|
-
import {
|
|
3
|
-
import ve, { useState as
|
|
2
|
+
import { blankDashboardConfig as Ce, dashboardStoreUtils as he, getDistinctCssClasses as G, ensureZoomScaleIsWithinRange as pt, parseContainerTitle as nt, getWidgetMetaFromCatalog as yt, dashboardSettingsUtils as bt } from "./core.es.js";
|
|
3
|
+
import ve, { useState as ae, useCallback as ce, useMemo as ot, forwardRef as se, useRef as vt, Suspense as xt, useEffect as Ct } from "react";
|
|
4
4
|
import { jsxs as I, jsx as t } from "react/jsx-runtime";
|
|
5
|
-
import
|
|
6
|
-
const wt = (e) => (
|
|
7
|
-
const
|
|
8
|
-
return
|
|
5
|
+
import it from "react-dom";
|
|
6
|
+
const wt = (e) => (s, r, n) => {
|
|
7
|
+
const d = n.subscribe;
|
|
8
|
+
return n.subscribe = ((f, g, T) => {
|
|
9
9
|
let S = f;
|
|
10
10
|
if (g) {
|
|
11
|
-
const b =
|
|
12
|
-
let
|
|
11
|
+
const b = T?.equalityFn || Object.is;
|
|
12
|
+
let l = f(n.getState());
|
|
13
13
|
S = (p) => {
|
|
14
14
|
const m = f(p);
|
|
15
|
-
if (!b(
|
|
16
|
-
const
|
|
17
|
-
g(
|
|
15
|
+
if (!b(l, m)) {
|
|
16
|
+
const D = l;
|
|
17
|
+
g(l = m, D);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, T?.fireImmediately && g(l, l);
|
|
20
20
|
}
|
|
21
|
-
return
|
|
22
|
-
}), e(
|
|
23
|
-
}, St = wt, Dt = (e,
|
|
21
|
+
return d(S);
|
|
22
|
+
}), e(s, r, n);
|
|
23
|
+
}, St = wt, Dt = (e, s) => ({
|
|
24
24
|
isLoading: !1,
|
|
25
25
|
isEditing: !1,
|
|
26
26
|
allDashboardConfigs: [Ce],
|
|
27
27
|
currentDashboardConfig: Ce,
|
|
28
28
|
targetContainerKey: void 0,
|
|
29
|
-
getNextContainerKey: (r) => he.getNextContainerKey(
|
|
29
|
+
getNextContainerKey: (r) => he.getNextContainerKey(s().currentDashboardConfig, r),
|
|
30
30
|
setIsLoading: (r) => (e(() => ({ isLoading: r })), r),
|
|
31
31
|
setIsEditing: (r) => {
|
|
32
|
-
let
|
|
33
|
-
return r || (
|
|
32
|
+
let n = s().targetContainerKey;
|
|
33
|
+
return r || (n = void 0), e(() => ({ isEditing: r, targetContainerKey: n })), r;
|
|
34
34
|
},
|
|
35
35
|
setTargetContainerKey: (r) => (e(() => ({ targetContainerKey: r })), r),
|
|
36
|
-
setAllDashboardConfigs: (r) => (e(() => ({ allDashboardConfigs: r })),
|
|
36
|
+
setAllDashboardConfigs: (r) => (e(() => ({ allDashboardConfigs: r })), s().allDashboardConfigs),
|
|
37
37
|
setCurrentDashboardConfig: (r) => {
|
|
38
|
-
const
|
|
39
|
-
...
|
|
38
|
+
const n = s(), d = [
|
|
39
|
+
...n.allDashboardConfigs.filter((o) => o.dashboardId !== r.dashboardId),
|
|
40
40
|
r
|
|
41
41
|
];
|
|
42
42
|
return e(() => ({
|
|
43
|
-
...
|
|
44
|
-
allDashboardConfigs:
|
|
43
|
+
...n,
|
|
44
|
+
allDashboardConfigs: d,
|
|
45
45
|
currentDashboardConfig: r
|
|
46
|
-
})),
|
|
46
|
+
})), d;
|
|
47
47
|
},
|
|
48
48
|
addDashboardConfig: (r) => {
|
|
49
|
-
const
|
|
50
|
-
...
|
|
49
|
+
const n = s(), d = [
|
|
50
|
+
...n.allDashboardConfigs.filter((o) => o.dashboardId !== r.dashboardId),
|
|
51
51
|
r
|
|
52
52
|
];
|
|
53
53
|
return e(() => ({
|
|
54
|
-
...
|
|
55
|
-
allDashboardConfigs:
|
|
54
|
+
...n,
|
|
55
|
+
allDashboardConfigs: d,
|
|
56
56
|
currentDashboardConfig: r
|
|
57
|
-
})),
|
|
57
|
+
})), d;
|
|
58
58
|
},
|
|
59
59
|
deleteDashboardConfigById: (r) => {
|
|
60
|
-
const
|
|
60
|
+
const n = s(), d = [...n.allDashboardConfigs.filter((o) => o.dashboardId !== r)];
|
|
61
61
|
return e(() => ({
|
|
62
|
-
...
|
|
63
|
-
allDashboardConfigs:
|
|
64
|
-
currentDashboardConfig:
|
|
65
|
-
})),
|
|
62
|
+
...n,
|
|
63
|
+
allDashboardConfigs: d,
|
|
64
|
+
currentDashboardConfig: d[0] || Ce
|
|
65
|
+
})), d;
|
|
66
66
|
},
|
|
67
67
|
selectDashboardById: (r) => (e(() => {
|
|
68
|
-
const
|
|
69
|
-
return
|
|
70
|
-
currentDashboardConfig:
|
|
68
|
+
const n = s(), d = n.allDashboardConfigs.find((o) => o.dashboardId === r);
|
|
69
|
+
return d ? {
|
|
70
|
+
currentDashboardConfig: d
|
|
71
71
|
} : {
|
|
72
|
-
...
|
|
72
|
+
...n
|
|
73
73
|
};
|
|
74
|
-
}),
|
|
74
|
+
}), s().currentDashboardConfig),
|
|
75
75
|
addWidget: (r) => {
|
|
76
|
-
const
|
|
77
|
-
dashboardConfig:
|
|
76
|
+
const n = s(), d = he.addWidget({
|
|
77
|
+
dashboardConfig: n.currentDashboardConfig,
|
|
78
78
|
...r
|
|
79
|
-
}),
|
|
80
|
-
...
|
|
81
|
-
(f) => f.dashboardId !==
|
|
79
|
+
}), o = [
|
|
80
|
+
...n.allDashboardConfigs.filter(
|
|
81
|
+
(f) => f.dashboardId !== d.updatedDashboardConfig.dashboardId
|
|
82
82
|
),
|
|
83
|
-
|
|
83
|
+
d.updatedDashboardConfig
|
|
84
84
|
];
|
|
85
|
-
return
|
|
86
|
-
allDashboardConfigs:
|
|
87
|
-
currentDashboardConfig:
|
|
85
|
+
return d.success && e(() => ({
|
|
86
|
+
allDashboardConfigs: o,
|
|
87
|
+
currentDashboardConfig: d.updatedDashboardConfig
|
|
88
88
|
})), {
|
|
89
|
-
...
|
|
90
|
-
allUpdatedDashboardConfigs:
|
|
89
|
+
...d,
|
|
90
|
+
allUpdatedDashboardConfigs: o
|
|
91
91
|
};
|
|
92
92
|
},
|
|
93
|
-
removeWidget: (r,
|
|
94
|
-
const
|
|
95
|
-
|
|
93
|
+
removeWidget: (r, n) => {
|
|
94
|
+
const d = s(), o = he.removeWidget(
|
|
95
|
+
d.currentDashboardConfig,
|
|
96
96
|
r,
|
|
97
|
-
|
|
97
|
+
n
|
|
98
98
|
), f = [
|
|
99
|
-
...
|
|
100
|
-
(g) => g.dashboardId !==
|
|
99
|
+
...d.allDashboardConfigs.filter(
|
|
100
|
+
(g) => g.dashboardId !== o.updatedDashboardConfig.dashboardId
|
|
101
101
|
),
|
|
102
|
-
|
|
102
|
+
o.updatedDashboardConfig
|
|
103
103
|
];
|
|
104
|
-
return
|
|
104
|
+
return o.success && e(() => ({
|
|
105
105
|
allDashboardConfigs: f,
|
|
106
|
-
currentDashboardConfig:
|
|
106
|
+
currentDashboardConfig: o.updatedDashboardConfig
|
|
107
107
|
})), {
|
|
108
|
-
...
|
|
108
|
+
...o,
|
|
109
109
|
allUpdatedDashboardConfigs: f
|
|
110
110
|
};
|
|
111
111
|
},
|
|
112
|
-
moveWidget: (r,
|
|
113
|
-
const
|
|
114
|
-
|
|
112
|
+
moveWidget: (r, n, d) => {
|
|
113
|
+
const o = s(), f = he.moveWidget(
|
|
114
|
+
o.currentDashboardConfig,
|
|
115
115
|
r,
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
n,
|
|
117
|
+
d
|
|
118
118
|
), g = [
|
|
119
|
-
...
|
|
120
|
-
(
|
|
119
|
+
...o.allDashboardConfigs.filter(
|
|
120
|
+
(T) => T.dashboardId !== f.updatedDashboardConfig.dashboardId
|
|
121
121
|
),
|
|
122
122
|
f.updatedDashboardConfig
|
|
123
123
|
];
|
|
@@ -129,71 +129,71 @@ const wt = (e) => (l, r, o) => {
|
|
|
129
129
|
allUpdatedDashboardConfigs: g
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
}),
|
|
132
|
+
}), cr = mt()(
|
|
133
133
|
St((...e) => ({
|
|
134
134
|
...Dt(...e)
|
|
135
135
|
}))
|
|
136
|
-
),
|
|
137
|
-
const [e,
|
|
138
|
-
const
|
|
139
|
-
|
|
136
|
+
), dr = () => {
|
|
137
|
+
const [e, s] = ae({}), [r, n] = ae({}), d = ce((b) => {
|
|
138
|
+
const l = b.dashboardId;
|
|
139
|
+
s((p) => {
|
|
140
140
|
const m = {
|
|
141
141
|
undoIndex: 0,
|
|
142
142
|
config: b
|
|
143
143
|
};
|
|
144
|
-
return
|
|
145
|
-
...
|
|
146
|
-
[
|
|
144
|
+
return n((D) => ({
|
|
145
|
+
...D,
|
|
146
|
+
[l]: 0
|
|
147
147
|
})), {
|
|
148
148
|
...p,
|
|
149
|
-
[
|
|
149
|
+
[l]: [m]
|
|
150
150
|
// Forces a reset to just this one entry
|
|
151
151
|
};
|
|
152
152
|
});
|
|
153
|
-
}, []),
|
|
153
|
+
}, []), o = ce(
|
|
154
154
|
(b) => {
|
|
155
|
-
|
|
156
|
-
const p = b.dashboardId, m =
|
|
155
|
+
s((l) => {
|
|
156
|
+
const p = b.dashboardId, m = l[p] || [], D = r[p] ?? -1, h = m.slice(0, D + 1), y = {
|
|
157
157
|
undoIndex: h.length,
|
|
158
158
|
// New index based on trimmed length
|
|
159
159
|
config: b
|
|
160
160
|
}, x = [...h, y];
|
|
161
|
-
return
|
|
161
|
+
return n((E) => ({
|
|
162
162
|
...E,
|
|
163
163
|
[p]: x.length - 1
|
|
164
164
|
// Index is now the last element's index
|
|
165
165
|
})), {
|
|
166
|
-
...
|
|
166
|
+
...l,
|
|
167
167
|
[p]: x
|
|
168
168
|
};
|
|
169
169
|
});
|
|
170
170
|
},
|
|
171
171
|
[r]
|
|
172
172
|
), f = ce((b) => {
|
|
173
|
-
|
|
174
|
-
if (!
|
|
175
|
-
return
|
|
176
|
-
const { [b]: p, ...m } =
|
|
173
|
+
s((l) => {
|
|
174
|
+
if (!l[b])
|
|
175
|
+
return l;
|
|
176
|
+
const { [b]: p, ...m } = l;
|
|
177
177
|
return m;
|
|
178
|
-
}),
|
|
179
|
-
const { [b]: p, ...m } =
|
|
178
|
+
}), n((l) => {
|
|
179
|
+
const { [b]: p, ...m } = l;
|
|
180
180
|
return m;
|
|
181
181
|
});
|
|
182
182
|
}, []), g = ce(
|
|
183
183
|
(b) => {
|
|
184
|
-
|
|
185
|
-
const p =
|
|
186
|
-
return m !== p ? { ...
|
|
184
|
+
n((l) => {
|
|
185
|
+
const p = l[b] ?? -1, m = Math.max(0, p - 1);
|
|
186
|
+
return m !== p ? { ...l, [b]: m } : l;
|
|
187
187
|
});
|
|
188
188
|
},
|
|
189
189
|
[
|
|
190
190
|
//loadConfigFromHistory
|
|
191
191
|
]
|
|
192
|
-
),
|
|
192
|
+
), T = ce(
|
|
193
193
|
(b) => {
|
|
194
|
-
|
|
195
|
-
const p = e[b]?.length || 0, m =
|
|
196
|
-
return
|
|
194
|
+
n((l) => {
|
|
195
|
+
const p = e[b]?.length || 0, m = l[b] ?? -1, D = Math.min(p - 1, m + 1);
|
|
196
|
+
return D !== m ? { ...l, [b]: D } : l;
|
|
197
197
|
});
|
|
198
198
|
},
|
|
199
199
|
[
|
|
@@ -202,15 +202,15 @@ const wt = (e) => (l, r, o) => {
|
|
|
202
202
|
]
|
|
203
203
|
);
|
|
204
204
|
return {
|
|
205
|
-
initializeHistoryForDashboard:
|
|
206
|
-
resetAllHistory: () =>
|
|
207
|
-
addUndoEntry:
|
|
205
|
+
initializeHistoryForDashboard: d,
|
|
206
|
+
resetAllHistory: () => s({}),
|
|
207
|
+
addUndoEntry: o,
|
|
208
208
|
removeUndoHistoryForDashboard: f,
|
|
209
209
|
undo: g,
|
|
210
|
-
redo:
|
|
210
|
+
redo: T,
|
|
211
211
|
getUndoStatus: (b) => {
|
|
212
|
-
const
|
|
213
|
-
return { isUndoDisabled: m, isRedoDisabled:
|
|
212
|
+
const l = r[b] ?? -1, p = e[b]?.length || 0, m = l <= 0, D = l >= p - 1;
|
|
213
|
+
return { isUndoDisabled: m, isRedoDisabled: D };
|
|
214
214
|
},
|
|
215
215
|
undoHistory: e,
|
|
216
216
|
historyIndex: r
|
|
@@ -219,7 +219,7 @@ const wt = (e) => (l, r, o) => {
|
|
|
219
219
|
};
|
|
220
220
|
function K({
|
|
221
221
|
children: e,
|
|
222
|
-
className:
|
|
222
|
+
className: s
|
|
223
223
|
}) {
|
|
224
224
|
return /* @__PURE__ */ t(
|
|
225
225
|
"svg",
|
|
@@ -233,19 +233,19 @@ function K({
|
|
|
233
233
|
strokeWidth: "2",
|
|
234
234
|
strokeLinecap: "round",
|
|
235
235
|
strokeLinejoin: "round",
|
|
236
|
-
className:
|
|
236
|
+
className: s,
|
|
237
237
|
children: e
|
|
238
238
|
}
|
|
239
239
|
);
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function ur({ className: e }) {
|
|
242
242
|
return /* @__PURE__ */ I(K, { className: `lucide lucide-circle-plus-icon lucide-circle-plus ${e}`, children: [
|
|
243
243
|
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10" }),
|
|
244
244
|
/* @__PURE__ */ t("path", { d: "M8 12h8" }),
|
|
245
245
|
/* @__PURE__ */ t("path", { d: "M12 8v8" })
|
|
246
246
|
] });
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function fr({ className: e }) {
|
|
249
249
|
return /* @__PURE__ */ I(K, { className: `lucide lucide-trash2-icon lucide-trash-2 ${e}`, children: [
|
|
250
250
|
/* @__PURE__ */ t("path", { d: "M10 11v6" }),
|
|
251
251
|
/* @__PURE__ */ t("path", { d: "M14 11v6" }),
|
|
@@ -254,13 +254,13 @@ function ur({ className: e }) {
|
|
|
254
254
|
/* @__PURE__ */ t("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
255
255
|
] });
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function hr({ className: e }) {
|
|
258
258
|
return /* @__PURE__ */ I(K, { className: `lucide lucide-square-pen-icon lucide-square-pen ${e}`, children: [
|
|
259
259
|
/* @__PURE__ */ t("path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
260
260
|
/* @__PURE__ */ t("path", { d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" })
|
|
261
261
|
] });
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function gr({ className: e }) {
|
|
264
264
|
return /* @__PURE__ */ I(
|
|
265
265
|
K,
|
|
266
266
|
{
|
|
@@ -275,7 +275,7 @@ function hr({ className: e }) {
|
|
|
275
275
|
}
|
|
276
276
|
);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function mr({ className: e }) {
|
|
279
279
|
return /* @__PURE__ */ I(K, { className: `lucide lucide-grid3x3-icon lucide-grid-3x3 ${e}`, children: [
|
|
280
280
|
/* @__PURE__ */ t("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
281
281
|
/* @__PURE__ */ t("path", { d: "M3 9h18" }),
|
|
@@ -284,14 +284,14 @@ function gr({ className: e }) {
|
|
|
284
284
|
/* @__PURE__ */ t("path", { d: "M15 3v18" })
|
|
285
285
|
] });
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function pr({ className: e }) {
|
|
288
288
|
return /* @__PURE__ */ I(K, { className: `lucide lucide-monitor-icon lucide-monitor ${e}`, children: [
|
|
289
289
|
/* @__PURE__ */ t("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
|
|
290
290
|
/* @__PURE__ */ t("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
|
|
291
291
|
/* @__PURE__ */ t("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
|
|
292
292
|
] });
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function yr({ className: e }) {
|
|
295
295
|
return /* @__PURE__ */ I(
|
|
296
296
|
K,
|
|
297
297
|
{
|
|
@@ -305,7 +305,7 @@ function pr({ className: e }) {
|
|
|
305
305
|
}
|
|
306
306
|
);
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function at({ className: e }) {
|
|
309
309
|
return /* @__PURE__ */ I(
|
|
310
310
|
K,
|
|
311
311
|
{
|
|
@@ -337,7 +337,7 @@ function Tt({ className: e }) {
|
|
|
337
337
|
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "3" })
|
|
338
338
|
] });
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function br({ className: e }) {
|
|
341
341
|
return /* @__PURE__ */ I(
|
|
342
342
|
K,
|
|
343
343
|
{
|
|
@@ -357,7 +357,7 @@ function lt({ className: e }) {
|
|
|
357
357
|
/* @__PURE__ */ t("path", { d: "m9 9 6 6" })
|
|
358
358
|
] });
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function vr({ className: e }) {
|
|
361
361
|
return /* @__PURE__ */ I(K, { className: `lucide lucide-zoom-in-icon lucide-zoom-in ${e}`, children: [
|
|
362
362
|
/* @__PURE__ */ t("circle", { cx: "11", cy: "11", r: "8" }),
|
|
363
363
|
/* @__PURE__ */ t("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
@@ -365,7 +365,7 @@ function br({ className: e }) {
|
|
|
365
365
|
/* @__PURE__ */ t("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
366
366
|
] });
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function xr({ className: e }) {
|
|
369
369
|
return /* @__PURE__ */ I(K, { className: `lucide lucide-zoom-out-icon lucide-zoom-out ${e}`, children: [
|
|
370
370
|
/* @__PURE__ */ t("circle", { cx: "11", cy: "11", r: "8" }),
|
|
371
371
|
/* @__PURE__ */ t("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
@@ -417,7 +417,7 @@ function It({ className: e }) {
|
|
|
417
417
|
/* @__PURE__ */ t("line", { x1: "12", x2: "12", y1: "22", y2: "18" })
|
|
418
418
|
] });
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function Cr({ className: e }) {
|
|
421
421
|
return /* @__PURE__ */ I(K, { className: `lucide lucide-target-icon lucide-target ${e}`, children: [
|
|
422
422
|
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10" }),
|
|
423
423
|
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "6" }),
|
|
@@ -439,30 +439,30 @@ function Rt({ className: e }) {
|
|
|
439
439
|
}
|
|
440
440
|
const ct = ({
|
|
441
441
|
label: e,
|
|
442
|
-
className:
|
|
442
|
+
className: s,
|
|
443
443
|
size: r = "medium",
|
|
444
|
-
value:
|
|
445
|
-
onChange:
|
|
446
|
-
onKeyDown:
|
|
444
|
+
value: n,
|
|
445
|
+
onChange: d,
|
|
446
|
+
onKeyDown: o,
|
|
447
447
|
placeholder: f = ""
|
|
448
448
|
}) => {
|
|
449
|
-
const g = ot(() => r === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [r]),
|
|
449
|
+
const g = ot(() => r === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [r]), T = G("flex flex-col mb-4", s || ""), b = `${G(`
|
|
450
450
|
block w-full rounded-md px-3 py-1.5 text-base
|
|
451
451
|
bg-formfield content-formfield
|
|
452
452
|
outline-1 -outline-offset-1 outline-primary
|
|
453
453
|
placeholder:text-disabled
|
|
454
454
|
focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-200 sm:text-sm/6
|
|
455
455
|
`)} ${g}`;
|
|
456
|
-
return /* @__PURE__ */ I("div", { className:
|
|
456
|
+
return /* @__PURE__ */ I("div", { className: T, children: [
|
|
457
457
|
/* @__PURE__ */ t("label", { htmlFor: e, className: "block text-sm/6 font-medium mb-1.5", children: e }),
|
|
458
458
|
/* @__PURE__ */ t(
|
|
459
459
|
"input",
|
|
460
460
|
{
|
|
461
461
|
id: e,
|
|
462
462
|
type: "text",
|
|
463
|
-
value:
|
|
464
|
-
onChange:
|
|
465
|
-
onKeyDown: (
|
|
463
|
+
value: n,
|
|
464
|
+
onChange: d,
|
|
465
|
+
onKeyDown: (l) => o && o(l),
|
|
466
466
|
placeholder: f,
|
|
467
467
|
className: b,
|
|
468
468
|
"aria-label": e
|
|
@@ -481,25 +481,25 @@ const ct = ({
|
|
|
481
481
|
]);
|
|
482
482
|
function J(e) {
|
|
483
483
|
const {
|
|
484
|
-
tooltip:
|
|
484
|
+
tooltip: s,
|
|
485
485
|
disabled: r,
|
|
486
|
-
isIconButton:
|
|
487
|
-
className:
|
|
488
|
-
buttonType:
|
|
486
|
+
isIconButton: n,
|
|
487
|
+
className: d,
|
|
488
|
+
buttonType: o,
|
|
489
489
|
category: f,
|
|
490
490
|
px: g,
|
|
491
|
-
py:
|
|
491
|
+
py: T,
|
|
492
492
|
children: S,
|
|
493
493
|
...b
|
|
494
|
-
} = e,
|
|
495
|
-
const m = e.isIconButton || !1,
|
|
494
|
+
} = e, l = () => {
|
|
495
|
+
const m = e.isIconButton || !1, D = e.category || "primary", h = e.buttonType || "normal", y = e.disabled || !1, x = e.className || "", E = e.font || "semibold", C = Number((e.border || 0) > 0 ? e.border : 0);
|
|
496
496
|
let w = (e.borderColor || "").trim();
|
|
497
497
|
w = w.length > 0 ? w : "";
|
|
498
|
-
const
|
|
498
|
+
const a = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), M = e.shadow || "sm", i = e.shadowHover || "md", u = (e.addCss || "").trim(), c = e.justifyCss || "justify-center";
|
|
499
499
|
if (m)
|
|
500
500
|
return G(
|
|
501
501
|
"flex flex-row items-center",
|
|
502
|
-
y ? "text-disabled" : `text-${
|
|
502
|
+
y ? "text-disabled" : `text-${D} hover:brightness-110 cursor-pointer`,
|
|
503
503
|
x || ""
|
|
504
504
|
);
|
|
505
505
|
const _ = [
|
|
@@ -515,33 +515,33 @@ function J(e) {
|
|
|
515
515
|
_.push("cursor-pointer");
|
|
516
516
|
let R = "";
|
|
517
517
|
we.has(h) ? R = `${we.get(h)}` : R = `${we.get("normal")}`, C < 1 && (R = R.replace("border-[category]", ""));
|
|
518
|
-
const H = R.replace(/\[category\]/g,
|
|
518
|
+
const H = R.replace(/\[category\]/g, D).trim();
|
|
519
519
|
_.push(H);
|
|
520
520
|
}
|
|
521
|
-
return C > 0 ? (_.push(`border-[${C}px]`), _.push(`border-${w}`)) : (_.push("border-[1px]"), _.push("border-transparent")),
|
|
521
|
+
return C > 0 ? (_.push(`border-[${C}px]`), _.push(`border-${w}`)) : (_.push("border-[1px]"), _.push("border-transparent")), a > 0 ? (_.push(`hover:border-[${a}px] group-hover:border-[${a}px]`), _.push(`hover:border-${w} group-hover:border-${w}`)) : _.push("hover:border-[1px] group-hover:border-[1px]"), _.push(`shadow-${M}`), _.push(`hover:shadow-${i} group-hover:shadow-${i}`), u.length > 0 && _.push(u), u.indexOf("hidden") === -1 && _.push("inline-flex"), _.push(c), _.join(" ").trim();
|
|
522
522
|
}, p = () => {
|
|
523
|
-
const m = e.px || 0.7,
|
|
523
|
+
const m = e.px || 0.7, D = e.py || 0.25;
|
|
524
524
|
return {
|
|
525
|
-
padding:
|
|
525
|
+
padding: n ? 0 : `${D}rem ${m}rem `
|
|
526
526
|
};
|
|
527
527
|
};
|
|
528
|
-
return /* @__PURE__ */ t("button", { type: "button", disabled: r, className:
|
|
528
|
+
return /* @__PURE__ */ t("button", { type: "button", disabled: r, className: l(), style: p(), ...b, children: S });
|
|
529
529
|
}
|
|
530
530
|
const $t = (e) => e.direction === "row" ? G("flex flex-row items-center gap-2", e.classNames || "") : G("flex flex-col gap-2 w-full", e.classNames || "");
|
|
531
531
|
function Ot(e) {
|
|
532
|
-
const { children:
|
|
533
|
-
return /* @__PURE__ */ t("div", { "data-testid": r || "not-set", className: f, ...
|
|
532
|
+
const { children: s, testId: r, classNames: n, direction: d, ...o } = e, f = $t(e);
|
|
533
|
+
return /* @__PURE__ */ t("div", { "data-testid": r || "not-set", className: f, ...o, children: s });
|
|
534
534
|
}
|
|
535
|
-
const
|
|
536
|
-
(e,
|
|
537
|
-
const { classNames: r, innerClass:
|
|
535
|
+
const wr = se(
|
|
536
|
+
(e, s) => {
|
|
537
|
+
const { classNames: r, innerClass: n, ...d } = e, o = G(r || "", "w-full"), f = G(
|
|
538
538
|
`w-full flex overflow-hidden justify-between items-center gap-0
|
|
539
539
|
rounded-md border`,
|
|
540
|
-
|
|
540
|
+
n || ""
|
|
541
541
|
);
|
|
542
|
-
return /* @__PURE__ */ t(Ot, { direction: "row", classNames:
|
|
542
|
+
return /* @__PURE__ */ t(Ot, { direction: "row", classNames: o, ...d, children: /* @__PURE__ */ t("div", { className: f, children: e.children }) });
|
|
543
543
|
}
|
|
544
|
-
),
|
|
544
|
+
), Sr = se((e, s) => /* @__PURE__ */ t(
|
|
545
545
|
"div",
|
|
546
546
|
{
|
|
547
547
|
"data-testid": e.testId || "not-set",
|
|
@@ -552,8 +552,8 @@ const Cr = se(
|
|
|
552
552
|
},
|
|
553
553
|
children: e.children
|
|
554
554
|
}
|
|
555
|
-
)),
|
|
556
|
-
(e,
|
|
555
|
+
)), Dr = se(
|
|
556
|
+
(e, s) => /* @__PURE__ */ t(
|
|
557
557
|
"div",
|
|
558
558
|
{
|
|
559
559
|
"data-testid": e.testId || "not-set",
|
|
@@ -561,7 +561,7 @@ const Cr = se(
|
|
|
561
561
|
children: e.children
|
|
562
562
|
}
|
|
563
563
|
)
|
|
564
|
-
),
|
|
564
|
+
), Tr = se((e, s) => /* @__PURE__ */ t(
|
|
565
565
|
"div",
|
|
566
566
|
{
|
|
567
567
|
"data-testid": e.testId || "not-set",
|
|
@@ -581,28 +581,28 @@ var je;
|
|
|
581
581
|
function Wt() {
|
|
582
582
|
if (je) return U;
|
|
583
583
|
je = 1;
|
|
584
|
-
var e = typeof Symbol == "function" && Symbol.for,
|
|
585
|
-
function C(
|
|
586
|
-
if (typeof
|
|
587
|
-
var M =
|
|
584
|
+
var e = typeof Symbol == "function" && Symbol.for, s = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, n = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, d = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, f = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, g = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, T = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, S = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, b = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, l = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, m = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, h = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, y = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, x = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, E = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
585
|
+
function C(a) {
|
|
586
|
+
if (typeof a == "object" && a !== null) {
|
|
587
|
+
var M = a.$$typeof;
|
|
588
588
|
switch (M) {
|
|
589
|
-
case
|
|
590
|
-
switch (
|
|
591
|
-
case
|
|
589
|
+
case s:
|
|
590
|
+
switch (a = a.type, a) {
|
|
591
|
+
case T:
|
|
592
592
|
case S:
|
|
593
|
-
case o:
|
|
594
593
|
case n:
|
|
595
|
-
case
|
|
596
|
-
case
|
|
597
|
-
|
|
594
|
+
case o:
|
|
595
|
+
case d:
|
|
596
|
+
case l:
|
|
597
|
+
return a;
|
|
598
598
|
default:
|
|
599
|
-
switch (
|
|
599
|
+
switch (a = a && a.$$typeof, a) {
|
|
600
600
|
case g:
|
|
601
601
|
case b:
|
|
602
|
-
case
|
|
602
|
+
case D:
|
|
603
603
|
case m:
|
|
604
604
|
case f:
|
|
605
|
-
return
|
|
605
|
+
return a;
|
|
606
606
|
default:
|
|
607
607
|
return M;
|
|
608
608
|
}
|
|
@@ -612,66 +612,66 @@ function Wt() {
|
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
function w(
|
|
616
|
-
return C(
|
|
615
|
+
function w(a) {
|
|
616
|
+
return C(a) === S;
|
|
617
617
|
}
|
|
618
|
-
return U.AsyncMode =
|
|
619
|
-
return w(
|
|
620
|
-
}, U.isConcurrentMode = w, U.isContextConsumer = function(
|
|
621
|
-
return C(
|
|
622
|
-
}, U.isContextProvider = function(
|
|
623
|
-
return C(
|
|
624
|
-
}, U.isElement = function(
|
|
625
|
-
return typeof
|
|
626
|
-
}, U.isForwardRef = function(
|
|
627
|
-
return C(
|
|
628
|
-
}, U.isFragment = function(
|
|
629
|
-
return C(
|
|
630
|
-
}, U.isLazy = function(
|
|
631
|
-
return C(
|
|
632
|
-
}, U.isMemo = function(
|
|
633
|
-
return C(
|
|
634
|
-
}, U.isPortal = function(
|
|
635
|
-
return C(
|
|
636
|
-
}, U.isProfiler = function(
|
|
637
|
-
return C(
|
|
638
|
-
}, U.isStrictMode = function(
|
|
639
|
-
return C(
|
|
640
|
-
}, U.isSuspense = function(
|
|
641
|
-
return C(
|
|
642
|
-
}, U.isValidElementType = function(
|
|
643
|
-
return typeof
|
|
618
|
+
return U.AsyncMode = T, U.ConcurrentMode = S, U.ContextConsumer = g, U.ContextProvider = f, U.Element = s, U.ForwardRef = b, U.Fragment = n, U.Lazy = D, U.Memo = m, U.Portal = r, U.Profiler = o, U.StrictMode = d, U.Suspense = l, U.isAsyncMode = function(a) {
|
|
619
|
+
return w(a) || C(a) === T;
|
|
620
|
+
}, U.isConcurrentMode = w, U.isContextConsumer = function(a) {
|
|
621
|
+
return C(a) === g;
|
|
622
|
+
}, U.isContextProvider = function(a) {
|
|
623
|
+
return C(a) === f;
|
|
624
|
+
}, U.isElement = function(a) {
|
|
625
|
+
return typeof a == "object" && a !== null && a.$$typeof === s;
|
|
626
|
+
}, U.isForwardRef = function(a) {
|
|
627
|
+
return C(a) === b;
|
|
628
|
+
}, U.isFragment = function(a) {
|
|
629
|
+
return C(a) === n;
|
|
630
|
+
}, U.isLazy = function(a) {
|
|
631
|
+
return C(a) === D;
|
|
632
|
+
}, U.isMemo = function(a) {
|
|
633
|
+
return C(a) === m;
|
|
634
|
+
}, U.isPortal = function(a) {
|
|
635
|
+
return C(a) === r;
|
|
636
|
+
}, U.isProfiler = function(a) {
|
|
637
|
+
return C(a) === o;
|
|
638
|
+
}, U.isStrictMode = function(a) {
|
|
639
|
+
return C(a) === d;
|
|
640
|
+
}, U.isSuspense = function(a) {
|
|
641
|
+
return C(a) === l;
|
|
642
|
+
}, U.isValidElementType = function(a) {
|
|
643
|
+
return typeof a == "string" || typeof a == "function" || a === n || a === S || a === o || a === d || a === l || a === p || typeof a == "object" && a !== null && (a.$$typeof === D || a.$$typeof === m || a.$$typeof === f || a.$$typeof === g || a.$$typeof === b || a.$$typeof === y || a.$$typeof === x || a.$$typeof === E || a.$$typeof === h);
|
|
644
644
|
}, U.typeOf = C, U;
|
|
645
645
|
}
|
|
646
646
|
var Y = {};
|
|
647
647
|
var Ae;
|
|
648
648
|
function jt() {
|
|
649
649
|
return Ae || (Ae = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
650
|
-
var e = typeof Symbol == "function" && Symbol.for,
|
|
650
|
+
var e = typeof Symbol == "function" && Symbol.for, s = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, n = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, d = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, f = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, g = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, T = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, S = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, b = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, l = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, m = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, h = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, y = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, x = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, E = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
651
651
|
function C(N) {
|
|
652
652
|
return typeof N == "string" || typeof N == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
653
|
-
N ===
|
|
653
|
+
N === n || N === S || N === o || N === d || N === l || N === p || typeof N == "object" && N !== null && (N.$$typeof === D || N.$$typeof === m || N.$$typeof === f || N.$$typeof === g || N.$$typeof === b || N.$$typeof === y || N.$$typeof === x || N.$$typeof === E || N.$$typeof === h);
|
|
654
654
|
}
|
|
655
655
|
function w(N) {
|
|
656
656
|
if (typeof N == "object" && N !== null) {
|
|
657
657
|
var te = N.$$typeof;
|
|
658
658
|
switch (te) {
|
|
659
|
-
case
|
|
659
|
+
case s:
|
|
660
660
|
var fe = N.type;
|
|
661
661
|
switch (fe) {
|
|
662
|
-
case
|
|
662
|
+
case T:
|
|
663
663
|
case S:
|
|
664
|
-
case o:
|
|
665
664
|
case n:
|
|
666
|
-
case
|
|
667
|
-
case
|
|
665
|
+
case o:
|
|
666
|
+
case d:
|
|
667
|
+
case l:
|
|
668
668
|
return fe;
|
|
669
669
|
default:
|
|
670
670
|
var We = fe && fe.$$typeof;
|
|
671
671
|
switch (We) {
|
|
672
672
|
case g:
|
|
673
673
|
case b:
|
|
674
|
-
case
|
|
674
|
+
case D:
|
|
675
675
|
case m:
|
|
676
676
|
case f:
|
|
677
677
|
return We;
|
|
@@ -684,9 +684,9 @@ function jt() {
|
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
var
|
|
687
|
+
var a = T, M = S, i = g, u = f, c = s, _ = b, R = n, H = D, V = m, X = r, Q = o, B = d, ee = l, ie = !1;
|
|
688
688
|
function le(N) {
|
|
689
|
-
return
|
|
689
|
+
return ie || (ie = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), v(N) || w(N) === T;
|
|
690
690
|
}
|
|
691
691
|
function v(N) {
|
|
692
692
|
return w(N) === S;
|
|
@@ -698,16 +698,16 @@ function jt() {
|
|
|
698
698
|
return w(N) === f;
|
|
699
699
|
}
|
|
700
700
|
function k(N) {
|
|
701
|
-
return typeof N == "object" && N !== null && N.$$typeof ===
|
|
701
|
+
return typeof N == "object" && N !== null && N.$$typeof === s;
|
|
702
702
|
}
|
|
703
703
|
function $(N) {
|
|
704
704
|
return w(N) === b;
|
|
705
705
|
}
|
|
706
706
|
function A(N) {
|
|
707
|
-
return w(N) ===
|
|
707
|
+
return w(N) === n;
|
|
708
708
|
}
|
|
709
709
|
function O(N) {
|
|
710
|
-
return w(N) ===
|
|
710
|
+
return w(N) === D;
|
|
711
711
|
}
|
|
712
712
|
function W(N) {
|
|
713
713
|
return w(N) === m;
|
|
@@ -716,15 +716,15 @@ function jt() {
|
|
|
716
716
|
return w(N) === r;
|
|
717
717
|
}
|
|
718
718
|
function F(N) {
|
|
719
|
-
return w(N) ===
|
|
719
|
+
return w(N) === o;
|
|
720
720
|
}
|
|
721
721
|
function L(N) {
|
|
722
|
-
return w(N) ===
|
|
722
|
+
return w(N) === d;
|
|
723
723
|
}
|
|
724
724
|
function Z(N) {
|
|
725
|
-
return w(N) ===
|
|
725
|
+
return w(N) === l;
|
|
726
726
|
}
|
|
727
|
-
Y.AsyncMode =
|
|
727
|
+
Y.AsyncMode = a, Y.ConcurrentMode = M, Y.ContextConsumer = i, Y.ContextProvider = u, Y.Element = c, Y.ForwardRef = _, Y.Fragment = R, Y.Lazy = H, Y.Memo = V, Y.Portal = X, Y.Profiler = Q, Y.StrictMode = B, Y.Suspense = ee, Y.isAsyncMode = le, Y.isConcurrentMode = v, Y.isContextConsumer = P, Y.isContextProvider = j, Y.isElement = k, Y.isForwardRef = $, Y.isFragment = A, Y.isLazy = O, Y.isMemo = W, Y.isPortal = q, Y.isProfiler = F, Y.isStrictMode = L, Y.isSuspense = Z, Y.isValidElementType = C, Y.typeOf = w;
|
|
728
728
|
})()), Y;
|
|
729
729
|
}
|
|
730
730
|
var qe;
|
|
@@ -735,25 +735,25 @@ var De, Le;
|
|
|
735
735
|
function At() {
|
|
736
736
|
if (Le) return De;
|
|
737
737
|
Le = 1;
|
|
738
|
-
var e = Object.getOwnPropertySymbols,
|
|
739
|
-
function o
|
|
740
|
-
if (
|
|
738
|
+
var e = Object.getOwnPropertySymbols, s = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
|
|
739
|
+
function n(o) {
|
|
740
|
+
if (o == null)
|
|
741
741
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
742
|
-
return Object(
|
|
742
|
+
return Object(o);
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function d() {
|
|
745
745
|
try {
|
|
746
746
|
if (!Object.assign)
|
|
747
747
|
return !1;
|
|
748
|
-
var
|
|
749
|
-
if (
|
|
748
|
+
var o = new String("abc");
|
|
749
|
+
if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
|
|
750
750
|
return !1;
|
|
751
751
|
for (var f = {}, g = 0; g < 10; g++)
|
|
752
752
|
f["_" + String.fromCharCode(g)] = g;
|
|
753
|
-
var
|
|
753
|
+
var T = Object.getOwnPropertyNames(f).map(function(b) {
|
|
754
754
|
return f[b];
|
|
755
755
|
});
|
|
756
|
-
if (
|
|
756
|
+
if (T.join("") !== "0123456789")
|
|
757
757
|
return !1;
|
|
758
758
|
var S = {};
|
|
759
759
|
return "abcdefghijklmnopqrst".split("").forEach(function(b) {
|
|
@@ -763,18 +763,18 @@ function At() {
|
|
|
763
763
|
return !1;
|
|
764
764
|
}
|
|
765
765
|
}
|
|
766
|
-
return De =
|
|
767
|
-
for (var g,
|
|
766
|
+
return De = d() ? Object.assign : function(o, f) {
|
|
767
|
+
for (var g, T = n(o), S, b = 1; b < arguments.length; b++) {
|
|
768
768
|
g = Object(arguments[b]);
|
|
769
|
-
for (var
|
|
770
|
-
|
|
769
|
+
for (var l in g)
|
|
770
|
+
s.call(g, l) && (T[l] = g[l]);
|
|
771
771
|
if (e) {
|
|
772
772
|
S = e(g);
|
|
773
773
|
for (var p = 0; p < S.length; p++)
|
|
774
|
-
r.call(g, S[p]) && (
|
|
774
|
+
r.call(g, S[p]) && (T[S[p]] = g[S[p]]);
|
|
775
775
|
}
|
|
776
776
|
}
|
|
777
|
-
return
|
|
777
|
+
return T;
|
|
778
778
|
}, De;
|
|
779
779
|
}
|
|
780
780
|
var Te, Ue;
|
|
@@ -795,9 +795,9 @@ function qt() {
|
|
|
795
795
|
var e = function() {
|
|
796
796
|
};
|
|
797
797
|
if (process.env.NODE_ENV !== "production") {
|
|
798
|
-
var
|
|
799
|
-
e = function(
|
|
800
|
-
var f = "Warning: " +
|
|
798
|
+
var s = /* @__PURE__ */ $e(), r = {}, n = /* @__PURE__ */ ut();
|
|
799
|
+
e = function(o) {
|
|
800
|
+
var f = "Warning: " + o;
|
|
801
801
|
typeof console < "u" && console.error(f);
|
|
802
802
|
try {
|
|
803
803
|
throw new Error(f);
|
|
@@ -805,58 +805,58 @@ function qt() {
|
|
|
805
805
|
}
|
|
806
806
|
};
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function d(o, f, g, T, S) {
|
|
809
809
|
if (process.env.NODE_ENV !== "production") {
|
|
810
|
-
for (var b in
|
|
811
|
-
if (o
|
|
812
|
-
var
|
|
810
|
+
for (var b in o)
|
|
811
|
+
if (n(o, b)) {
|
|
812
|
+
var l;
|
|
813
813
|
try {
|
|
814
|
-
if (typeof
|
|
814
|
+
if (typeof o[b] != "function") {
|
|
815
815
|
var p = Error(
|
|
816
|
-
(
|
|
816
|
+
(T || "React class") + ": " + g + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
817
817
|
);
|
|
818
818
|
throw p.name = "Invariant Violation", p;
|
|
819
819
|
}
|
|
820
|
-
|
|
821
|
-
} catch (
|
|
822
|
-
|
|
820
|
+
l = o[b](f, b, T, g, null, s);
|
|
821
|
+
} catch (D) {
|
|
822
|
+
l = D;
|
|
823
823
|
}
|
|
824
|
-
if (
|
|
825
|
-
(
|
|
826
|
-
),
|
|
827
|
-
r[
|
|
824
|
+
if (l && !(l instanceof Error) && e(
|
|
825
|
+
(T || "React class") + ": type specification of " + g + " `" + b + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof l + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
826
|
+
), l instanceof Error && !(l.message in r)) {
|
|
827
|
+
r[l.message] = !0;
|
|
828
828
|
var m = S ? S() : "";
|
|
829
829
|
e(
|
|
830
|
-
"Failed " + g + " type: " +
|
|
830
|
+
"Failed " + g + " type: " + l.message + (m ?? "")
|
|
831
831
|
);
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
|
-
return
|
|
836
|
+
return d.resetWarningCache = function() {
|
|
837
837
|
process.env.NODE_ENV !== "production" && (r = {});
|
|
838
|
-
}, Ne =
|
|
838
|
+
}, Ne = d, Ne;
|
|
839
839
|
}
|
|
840
840
|
var _e, Ke;
|
|
841
841
|
function Lt() {
|
|
842
842
|
if (Ke) return _e;
|
|
843
843
|
Ke = 1;
|
|
844
|
-
var e = dt(),
|
|
844
|
+
var e = dt(), s = At(), r = /* @__PURE__ */ $e(), n = /* @__PURE__ */ ut(), d = /* @__PURE__ */ qt(), o = function() {
|
|
845
845
|
};
|
|
846
|
-
process.env.NODE_ENV !== "production" && (
|
|
847
|
-
var
|
|
848
|
-
typeof console < "u" && console.error(
|
|
846
|
+
process.env.NODE_ENV !== "production" && (o = function(g) {
|
|
847
|
+
var T = "Warning: " + g;
|
|
848
|
+
typeof console < "u" && console.error(T);
|
|
849
849
|
try {
|
|
850
|
-
throw new Error(
|
|
850
|
+
throw new Error(T);
|
|
851
851
|
} catch {
|
|
852
852
|
}
|
|
853
853
|
});
|
|
854
854
|
function f() {
|
|
855
855
|
return null;
|
|
856
856
|
}
|
|
857
|
-
return _e = function(g,
|
|
857
|
+
return _e = function(g, T) {
|
|
858
858
|
var S = typeof Symbol == "function" && Symbol.iterator, b = "@@iterator";
|
|
859
|
-
function
|
|
859
|
+
function l(v) {
|
|
860
860
|
var P = v && (S && v[S] || v[b]);
|
|
861
861
|
if (typeof P == "function")
|
|
862
862
|
return P;
|
|
@@ -873,16 +873,16 @@ function Lt() {
|
|
|
873
873
|
any: E(),
|
|
874
874
|
arrayOf: C,
|
|
875
875
|
element: w(),
|
|
876
|
-
elementType:
|
|
876
|
+
elementType: a(),
|
|
877
877
|
instanceOf: M,
|
|
878
878
|
node: _(),
|
|
879
879
|
objectOf: u,
|
|
880
|
-
oneOf:
|
|
881
|
-
oneOfType:
|
|
880
|
+
oneOf: i,
|
|
881
|
+
oneOfType: c,
|
|
882
882
|
shape: H,
|
|
883
883
|
exact: V
|
|
884
884
|
};
|
|
885
|
-
function
|
|
885
|
+
function D(v, P) {
|
|
886
886
|
return v === P ? v !== 0 || 1 / v === 1 / P : v !== v && P !== P;
|
|
887
887
|
}
|
|
888
888
|
function h(v, P) {
|
|
@@ -894,7 +894,7 @@ function Lt() {
|
|
|
894
894
|
var P = {}, j = 0;
|
|
895
895
|
function k(A, O, W, q, F, L, Z) {
|
|
896
896
|
if (q = q || p, L = L || W, Z !== r) {
|
|
897
|
-
if (
|
|
897
|
+
if (T) {
|
|
898
898
|
var N = new Error(
|
|
899
899
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
900
900
|
);
|
|
@@ -902,7 +902,7 @@ function Lt() {
|
|
|
902
902
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
903
903
|
var te = q + ":" + W;
|
|
904
904
|
!P[te] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
905
|
-
j < 3 && (
|
|
905
|
+
j < 3 && (o(
|
|
906
906
|
"You are manually calling a React.PropTypes validation function for the `" + L + "` prop on `" + q + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
907
907
|
), P[te] = !0, j++);
|
|
908
908
|
}
|
|
@@ -958,7 +958,7 @@ function Lt() {
|
|
|
958
958
|
}
|
|
959
959
|
return y(v);
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function a() {
|
|
962
962
|
function v(P, j, k, $, A) {
|
|
963
963
|
var O = P[j];
|
|
964
964
|
if (!e.isValidElementType(O)) {
|
|
@@ -979,14 +979,14 @@ function Lt() {
|
|
|
979
979
|
}
|
|
980
980
|
return y(P);
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function i(v) {
|
|
983
983
|
if (!Array.isArray(v))
|
|
984
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ?
|
|
984
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
985
985
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
986
|
-
) :
|
|
986
|
+
) : o("Invalid argument supplied to oneOf, expected an array.")), f;
|
|
987
987
|
function P(j, k, $, A, O) {
|
|
988
988
|
for (var W = j[k], q = 0; q < v.length; q++)
|
|
989
|
-
if (
|
|
989
|
+
if (D(W, v[q]))
|
|
990
990
|
return null;
|
|
991
991
|
var F = JSON.stringify(v, function(Z, N) {
|
|
992
992
|
var te = ee(N);
|
|
@@ -1004,7 +1004,7 @@ function Lt() {
|
|
|
1004
1004
|
if (q !== "object")
|
|
1005
1005
|
return new h("Invalid " + A + " `" + O + "` of type " + ("`" + q + "` supplied to `" + $ + "`, expected an object."));
|
|
1006
1006
|
for (var F in W)
|
|
1007
|
-
if (
|
|
1007
|
+
if (n(W, F)) {
|
|
1008
1008
|
var L = v(W, F, $, A, O + "." + F, r);
|
|
1009
1009
|
if (L instanceof Error)
|
|
1010
1010
|
return L;
|
|
@@ -1013,14 +1013,14 @@ function Lt() {
|
|
|
1013
1013
|
}
|
|
1014
1014
|
return y(P);
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1016
|
+
function c(v) {
|
|
1017
1017
|
if (!Array.isArray(v))
|
|
1018
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1018
|
+
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), f;
|
|
1019
1019
|
for (var P = 0; P < v.length; P++) {
|
|
1020
1020
|
var j = v[P];
|
|
1021
1021
|
if (typeof j != "function")
|
|
1022
|
-
return
|
|
1023
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
1022
|
+
return o(
|
|
1023
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ie(j) + " at index " + P + "."
|
|
1024
1024
|
), f;
|
|
1025
1025
|
}
|
|
1026
1026
|
function k($, A, O, W, q) {
|
|
@@ -1028,7 +1028,7 @@ function Lt() {
|
|
|
1028
1028
|
var Z = v[L], N = Z($, A, O, W, q, r);
|
|
1029
1029
|
if (N == null)
|
|
1030
1030
|
return null;
|
|
1031
|
-
N.data &&
|
|
1031
|
+
N.data && n(N.data, "expectedType") && F.push(N.data.expectedType);
|
|
1032
1032
|
}
|
|
1033
1033
|
var te = F.length > 0 ? ", expected one of type [" + F.join(", ") + "]" : "";
|
|
1034
1034
|
return new h("Invalid " + W + " `" + q + "` supplied to " + ("`" + O + "`" + te + "."));
|
|
@@ -1068,10 +1068,10 @@ function Lt() {
|
|
|
1068
1068
|
var W = j[k], q = B(W);
|
|
1069
1069
|
if (q !== "object")
|
|
1070
1070
|
return new h("Invalid " + A + " `" + O + "` of type `" + q + "` " + ("supplied to `" + $ + "`, expected `object`."));
|
|
1071
|
-
var F =
|
|
1071
|
+
var F = s({}, j[k], v);
|
|
1072
1072
|
for (var L in F) {
|
|
1073
1073
|
var Z = v[L];
|
|
1074
|
-
if (
|
|
1074
|
+
if (n(v, L) && typeof Z != "function")
|
|
1075
1075
|
return R($, A, O, L, ee(Z));
|
|
1076
1076
|
if (!Z)
|
|
1077
1077
|
return new h(
|
|
@@ -1099,7 +1099,7 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
|
1099
1099
|
return v.every(X);
|
|
1100
1100
|
if (v === null || g(v))
|
|
1101
1101
|
return !0;
|
|
1102
|
-
var P =
|
|
1102
|
+
var P = l(v);
|
|
1103
1103
|
if (P) {
|
|
1104
1104
|
var j = P.call(v), k;
|
|
1105
1105
|
if (P !== v.entries) {
|
|
@@ -1138,7 +1138,7 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
|
1138
1138
|
}
|
|
1139
1139
|
return P;
|
|
1140
1140
|
}
|
|
1141
|
-
function
|
|
1141
|
+
function ie(v) {
|
|
1142
1142
|
var P = ee(v);
|
|
1143
1143
|
switch (P) {
|
|
1144
1144
|
case "array":
|
|
@@ -1155,7 +1155,7 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
|
1155
1155
|
function le(v) {
|
|
1156
1156
|
return !v.constructor || !v.constructor.name ? p : v.constructor.name;
|
|
1157
1157
|
}
|
|
1158
|
-
return m.checkPropTypes =
|
|
1158
|
+
return m.checkPropTypes = d, m.resetWarningCache = d.resetWarningCache, m.PropTypes = m, m;
|
|
1159
1159
|
}, _e;
|
|
1160
1160
|
}
|
|
1161
1161
|
var Me, ze;
|
|
@@ -1163,55 +1163,55 @@ function Ut() {
|
|
|
1163
1163
|
if (ze) return Me;
|
|
1164
1164
|
ze = 1;
|
|
1165
1165
|
var e = /* @__PURE__ */ $e();
|
|
1166
|
-
function
|
|
1166
|
+
function s() {
|
|
1167
1167
|
}
|
|
1168
1168
|
function r() {
|
|
1169
1169
|
}
|
|
1170
|
-
return r.resetWarningCache =
|
|
1171
|
-
function
|
|
1172
|
-
if (
|
|
1170
|
+
return r.resetWarningCache = s, Me = function() {
|
|
1171
|
+
function n(f, g, T, S, b, l) {
|
|
1172
|
+
if (l !== e) {
|
|
1173
1173
|
var p = new Error(
|
|
1174
1174
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1175
1175
|
);
|
|
1176
1176
|
throw p.name = "Invariant Violation", p;
|
|
1177
1177
|
}
|
|
1178
1178
|
}
|
|
1179
|
-
|
|
1180
|
-
function
|
|
1181
|
-
return
|
|
1182
|
-
}
|
|
1183
|
-
var
|
|
1184
|
-
array:
|
|
1185
|
-
bigint:
|
|
1186
|
-
bool:
|
|
1187
|
-
func:
|
|
1188
|
-
number:
|
|
1189
|
-
object:
|
|
1190
|
-
string:
|
|
1191
|
-
symbol:
|
|
1192
|
-
any:
|
|
1193
|
-
arrayOf:
|
|
1194
|
-
element:
|
|
1195
|
-
elementType:
|
|
1196
|
-
instanceOf:
|
|
1197
|
-
node:
|
|
1198
|
-
objectOf:
|
|
1199
|
-
oneOf:
|
|
1200
|
-
oneOfType:
|
|
1201
|
-
shape:
|
|
1202
|
-
exact:
|
|
1179
|
+
n.isRequired = n;
|
|
1180
|
+
function d() {
|
|
1181
|
+
return n;
|
|
1182
|
+
}
|
|
1183
|
+
var o = {
|
|
1184
|
+
array: n,
|
|
1185
|
+
bigint: n,
|
|
1186
|
+
bool: n,
|
|
1187
|
+
func: n,
|
|
1188
|
+
number: n,
|
|
1189
|
+
object: n,
|
|
1190
|
+
string: n,
|
|
1191
|
+
symbol: n,
|
|
1192
|
+
any: n,
|
|
1193
|
+
arrayOf: d,
|
|
1194
|
+
element: n,
|
|
1195
|
+
elementType: n,
|
|
1196
|
+
instanceOf: d,
|
|
1197
|
+
node: n,
|
|
1198
|
+
objectOf: d,
|
|
1199
|
+
oneOf: d,
|
|
1200
|
+
oneOfType: d,
|
|
1201
|
+
shape: d,
|
|
1202
|
+
exact: d,
|
|
1203
1203
|
checkPropTypes: r,
|
|
1204
|
-
resetWarningCache:
|
|
1204
|
+
resetWarningCache: s
|
|
1205
1205
|
};
|
|
1206
|
-
return
|
|
1206
|
+
return o.PropTypes = o, o;
|
|
1207
1207
|
}, Me;
|
|
1208
1208
|
}
|
|
1209
1209
|
var Be;
|
|
1210
1210
|
function ft() {
|
|
1211
1211
|
if (Be) return ge.exports;
|
|
1212
1212
|
if (Be = 1, process.env.NODE_ENV !== "production") {
|
|
1213
|
-
var e = dt(),
|
|
1214
|
-
ge.exports = /* @__PURE__ */ Lt()(e.isElement,
|
|
1213
|
+
var e = dt(), s = !0;
|
|
1214
|
+
ge.exports = /* @__PURE__ */ Lt()(e.isElement, s);
|
|
1215
1215
|
} else
|
|
1216
1216
|
ge.exports = /* @__PURE__ */ Ut()();
|
|
1217
1217
|
return ge.exports;
|
|
@@ -1221,41 +1221,41 @@ function Yt() {
|
|
|
1221
1221
|
if (He) return pe.exports;
|
|
1222
1222
|
He = 1;
|
|
1223
1223
|
function e(r) {
|
|
1224
|
-
var
|
|
1225
|
-
if (typeof r == "string" || typeof r == "number")
|
|
1224
|
+
var n, d, o = "";
|
|
1225
|
+
if (typeof r == "string" || typeof r == "number") o += r;
|
|
1226
1226
|
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
1227
1227
|
var f = r.length;
|
|
1228
|
-
for (
|
|
1229
|
-
} else for (
|
|
1230
|
-
return
|
|
1228
|
+
for (n = 0; n < f; n++) r[n] && (d = e(r[n])) && (o && (o += " "), o += d);
|
|
1229
|
+
} else for (d in r) r[d] && (o && (o += " "), o += d);
|
|
1230
|
+
return o;
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1233
|
-
for (var r,
|
|
1234
|
-
return
|
|
1232
|
+
function s() {
|
|
1233
|
+
for (var r, n, d = 0, o = "", f = arguments.length; d < f; d++) (r = arguments[d]) && (n = e(r)) && (o && (o += " "), o += n);
|
|
1234
|
+
return o;
|
|
1235
1235
|
}
|
|
1236
|
-
return pe.exports =
|
|
1236
|
+
return pe.exports = s, pe.exports.clsx = s, pe.exports;
|
|
1237
1237
|
}
|
|
1238
1238
|
var z = {}, ne = {}, Ve;
|
|
1239
1239
|
function xe() {
|
|
1240
1240
|
if (Ve) return ne;
|
|
1241
1241
|
Ve = 1, Object.defineProperty(ne, "__esModule", {
|
|
1242
1242
|
value: !0
|
|
1243
|
-
}), ne.dontSetMe =
|
|
1244
|
-
function e(
|
|
1245
|
-
for (let g = 0,
|
|
1246
|
-
if (f.apply(f, [
|
|
1243
|
+
}), ne.dontSetMe = d, ne.findInArray = e, ne.int = n, ne.isFunction = s, ne.isNum = r;
|
|
1244
|
+
function e(o, f) {
|
|
1245
|
+
for (let g = 0, T = o.length; g < T; g++)
|
|
1246
|
+
if (f.apply(f, [o[g], g, o])) return o[g];
|
|
1247
1247
|
}
|
|
1248
|
-
function
|
|
1249
|
-
return typeof
|
|
1248
|
+
function s(o) {
|
|
1249
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Function]";
|
|
1250
1250
|
}
|
|
1251
|
-
function r(
|
|
1252
|
-
return typeof
|
|
1251
|
+
function r(o) {
|
|
1252
|
+
return typeof o == "number" && !isNaN(o);
|
|
1253
1253
|
}
|
|
1254
|
-
function o
|
|
1255
|
-
return parseInt(
|
|
1254
|
+
function n(o) {
|
|
1255
|
+
return parseInt(o, 10);
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1258
|
-
if (
|
|
1257
|
+
function d(o, f, g) {
|
|
1258
|
+
if (o[f])
|
|
1259
1259
|
return new Error(`Invalid prop ${f} passed to ${g} - do not set this, set it on the child.`);
|
|
1260
1260
|
}
|
|
1261
1261
|
return ne;
|
|
@@ -1265,169 +1265,169 @@ function Ft() {
|
|
|
1265
1265
|
if (Xe) return oe;
|
|
1266
1266
|
Xe = 1, Object.defineProperty(oe, "__esModule", {
|
|
1267
1267
|
value: !0
|
|
1268
|
-
}), oe.browserPrefixToKey = r, oe.browserPrefixToStyle =
|
|
1268
|
+
}), oe.browserPrefixToKey = r, oe.browserPrefixToStyle = n, oe.default = void 0, oe.getPrefix = s;
|
|
1269
1269
|
const e = ["Moz", "Webkit", "O", "ms"];
|
|
1270
|
-
function
|
|
1271
|
-
let
|
|
1270
|
+
function s() {
|
|
1271
|
+
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
|
|
1272
1272
|
if (typeof window > "u") return "";
|
|
1273
1273
|
const f = window.document?.documentElement?.style;
|
|
1274
|
-
if (!f ||
|
|
1274
|
+
if (!f || o in f) return "";
|
|
1275
1275
|
for (let g = 0; g < e.length; g++)
|
|
1276
|
-
if (r(
|
|
1276
|
+
if (r(o, e[g]) in f) return e[g];
|
|
1277
1277
|
return "";
|
|
1278
1278
|
}
|
|
1279
|
-
function r(
|
|
1280
|
-
return f ? `${f}${
|
|
1279
|
+
function r(o, f) {
|
|
1280
|
+
return f ? `${f}${d(o)}` : o;
|
|
1281
1281
|
}
|
|
1282
|
-
function o
|
|
1283
|
-
return f ? `-${f.toLowerCase()}-${
|
|
1282
|
+
function n(o, f) {
|
|
1283
|
+
return f ? `-${f.toLowerCase()}-${o}` : o;
|
|
1284
1284
|
}
|
|
1285
|
-
function
|
|
1285
|
+
function d(o) {
|
|
1286
1286
|
let f = "", g = !0;
|
|
1287
|
-
for (let
|
|
1288
|
-
g ? (f +=
|
|
1287
|
+
for (let T = 0; T < o.length; T++)
|
|
1288
|
+
g ? (f += o[T].toUpperCase(), g = !1) : o[T] === "-" ? g = !0 : f += o[T];
|
|
1289
1289
|
return f;
|
|
1290
1290
|
}
|
|
1291
|
-
return oe.default =
|
|
1291
|
+
return oe.default = s(), oe;
|
|
1292
1292
|
}
|
|
1293
1293
|
var Ge;
|
|
1294
1294
|
function Oe() {
|
|
1295
1295
|
if (Ge) return z;
|
|
1296
1296
|
Ge = 1, Object.defineProperty(z, "__esModule", {
|
|
1297
1297
|
value: !0
|
|
1298
|
-
}), z.addClassName =
|
|
1299
|
-
var e = xe(),
|
|
1300
|
-
function r(
|
|
1301
|
-
if (typeof WeakMap == "function") var
|
|
1298
|
+
}), z.addClassName = a, z.addEvent = f, z.addUserSelectStyles = E, z.createCSSTransform = m, z.createSVGTransform = D, z.getTouch = y, z.getTouchIdentifier = x, z.getTranslation = h, z.innerHeight = b, z.innerWidth = l, z.matchesSelector = d, z.matchesSelectorAndParentsTo = o, z.offsetXYFromParent = p, z.outerHeight = T, z.outerWidth = S, z.removeClassName = M, z.removeEvent = g, z.scheduleRemoveUserSelectStyles = C;
|
|
1299
|
+
var e = xe(), s = r(Ft());
|
|
1300
|
+
function r(i, u) {
|
|
1301
|
+
if (typeof WeakMap == "function") var c = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap();
|
|
1302
1302
|
return (r = function(R, H) {
|
|
1303
1303
|
if (!H && R && R.__esModule) return R;
|
|
1304
1304
|
var V, X, Q = { __proto__: null, default: R };
|
|
1305
1305
|
if (R === null || typeof R != "object" && typeof R != "function") return Q;
|
|
1306
|
-
if (V = H ? _ :
|
|
1306
|
+
if (V = H ? _ : c) {
|
|
1307
1307
|
if (V.has(R)) return V.get(R);
|
|
1308
1308
|
V.set(R, Q);
|
|
1309
1309
|
}
|
|
1310
1310
|
for (const B in R) B !== "default" && {}.hasOwnProperty.call(R, B) && ((X = (V = Object.defineProperty) && Object.getOwnPropertyDescriptor(R, B)) && (X.get || X.set) ? V(Q, B, X) : Q[B] = R[B]);
|
|
1311
1311
|
return Q;
|
|
1312
|
-
})(
|
|
1312
|
+
})(i, u);
|
|
1313
1313
|
}
|
|
1314
|
-
let
|
|
1315
|
-
function
|
|
1316
|
-
return
|
|
1317
|
-
return (0, e.isFunction)(
|
|
1318
|
-
})), (0, e.isFunction)(
|
|
1314
|
+
let n = "";
|
|
1315
|
+
function d(i, u) {
|
|
1316
|
+
return n || (n = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(c) {
|
|
1317
|
+
return (0, e.isFunction)(i[c]);
|
|
1318
|
+
})), (0, e.isFunction)(i[n]) ? i[n](u) : !1;
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1321
|
-
let _ =
|
|
1320
|
+
function o(i, u, c) {
|
|
1321
|
+
let _ = i;
|
|
1322
1322
|
do {
|
|
1323
|
-
if (
|
|
1324
|
-
if (_ ===
|
|
1323
|
+
if (d(_, u)) return !0;
|
|
1324
|
+
if (_ === c) return !1;
|
|
1325
1325
|
_ = _.parentNode;
|
|
1326
1326
|
} while (_);
|
|
1327
1327
|
return !1;
|
|
1328
1328
|
}
|
|
1329
|
-
function f(
|
|
1330
|
-
if (!
|
|
1329
|
+
function f(i, u, c, _) {
|
|
1330
|
+
if (!i) return;
|
|
1331
1331
|
const R = {
|
|
1332
1332
|
capture: !0,
|
|
1333
1333
|
..._
|
|
1334
1334
|
};
|
|
1335
|
-
|
|
1335
|
+
i.addEventListener ? i.addEventListener(u, c, R) : i.attachEvent ? i.attachEvent("on" + u, c) : i["on" + u] = c;
|
|
1336
1336
|
}
|
|
1337
|
-
function g(
|
|
1338
|
-
if (!
|
|
1337
|
+
function g(i, u, c, _) {
|
|
1338
|
+
if (!i) return;
|
|
1339
1339
|
const R = {
|
|
1340
1340
|
capture: !0,
|
|
1341
1341
|
..._
|
|
1342
1342
|
};
|
|
1343
|
-
|
|
1343
|
+
i.removeEventListener ? i.removeEventListener(u, c, R) : i.detachEvent ? i.detachEvent("on" + u, c) : i["on" + u] = null;
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1346
|
-
let u =
|
|
1347
|
-
const
|
|
1348
|
-
return u += (0, e.int)(
|
|
1345
|
+
function T(i) {
|
|
1346
|
+
let u = i.clientHeight;
|
|
1347
|
+
const c = i.ownerDocument.defaultView.getComputedStyle(i);
|
|
1348
|
+
return u += (0, e.int)(c.borderTopWidth), u += (0, e.int)(c.borderBottomWidth), u;
|
|
1349
1349
|
}
|
|
1350
|
-
function S(
|
|
1351
|
-
let u =
|
|
1352
|
-
const
|
|
1353
|
-
return u += (0, e.int)(
|
|
1350
|
+
function S(i) {
|
|
1351
|
+
let u = i.clientWidth;
|
|
1352
|
+
const c = i.ownerDocument.defaultView.getComputedStyle(i);
|
|
1353
|
+
return u += (0, e.int)(c.borderLeftWidth), u += (0, e.int)(c.borderRightWidth), u;
|
|
1354
1354
|
}
|
|
1355
|
-
function b(
|
|
1356
|
-
let u =
|
|
1357
|
-
const
|
|
1358
|
-
return u -= (0, e.int)(
|
|
1355
|
+
function b(i) {
|
|
1356
|
+
let u = i.clientHeight;
|
|
1357
|
+
const c = i.ownerDocument.defaultView.getComputedStyle(i);
|
|
1358
|
+
return u -= (0, e.int)(c.paddingTop), u -= (0, e.int)(c.paddingBottom), u;
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1361
|
-
let u =
|
|
1362
|
-
const
|
|
1363
|
-
return u -= (0, e.int)(
|
|
1360
|
+
function l(i) {
|
|
1361
|
+
let u = i.clientWidth;
|
|
1362
|
+
const c = i.ownerDocument.defaultView.getComputedStyle(i);
|
|
1363
|
+
return u -= (0, e.int)(c.paddingLeft), u -= (0, e.int)(c.paddingRight), u;
|
|
1364
1364
|
}
|
|
1365
|
-
function p(
|
|
1365
|
+
function p(i, u, c) {
|
|
1366
1366
|
const R = u === u.ownerDocument.body ? {
|
|
1367
1367
|
left: 0,
|
|
1368
1368
|
top: 0
|
|
1369
|
-
} : u.getBoundingClientRect(), H = (
|
|
1369
|
+
} : u.getBoundingClientRect(), H = (i.clientX + u.scrollLeft - R.left) / c, V = (i.clientY + u.scrollTop - R.top) / c;
|
|
1370
1370
|
return {
|
|
1371
1371
|
x: H,
|
|
1372
1372
|
y: V
|
|
1373
1373
|
};
|
|
1374
1374
|
}
|
|
1375
|
-
function m(
|
|
1376
|
-
const
|
|
1375
|
+
function m(i, u) {
|
|
1376
|
+
const c = h(i, u, "px");
|
|
1377
1377
|
return {
|
|
1378
|
-
[(0,
|
|
1378
|
+
[(0, s.browserPrefixToKey)("transform", s.default)]: c
|
|
1379
1379
|
};
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1382
|
-
return h(
|
|
1381
|
+
function D(i, u) {
|
|
1382
|
+
return h(i, u, "");
|
|
1383
1383
|
}
|
|
1384
|
-
function h(
|
|
1384
|
+
function h(i, u, c) {
|
|
1385
1385
|
let {
|
|
1386
1386
|
x: _,
|
|
1387
1387
|
y: R
|
|
1388
|
-
} =
|
|
1388
|
+
} = i, H = `translate(${_}${c},${R}${c})`;
|
|
1389
1389
|
if (u) {
|
|
1390
|
-
const V = `${typeof u.x == "string" ? u.x : u.x +
|
|
1390
|
+
const V = `${typeof u.x == "string" ? u.x : u.x + c}`, X = `${typeof u.y == "string" ? u.y : u.y + c}`;
|
|
1391
1391
|
H = `translate(${V}, ${X})` + H;
|
|
1392
1392
|
}
|
|
1393
1393
|
return H;
|
|
1394
1394
|
}
|
|
1395
|
-
function y(
|
|
1396
|
-
return
|
|
1395
|
+
function y(i, u) {
|
|
1396
|
+
return i.targetTouches && (0, e.findInArray)(i.targetTouches, (c) => u === c.identifier) || i.changedTouches && (0, e.findInArray)(i.changedTouches, (c) => u === c.identifier);
|
|
1397
1397
|
}
|
|
1398
|
-
function x(
|
|
1399
|
-
if (
|
|
1400
|
-
if (
|
|
1398
|
+
function x(i) {
|
|
1399
|
+
if (i.targetTouches && i.targetTouches[0]) return i.targetTouches[0].identifier;
|
|
1400
|
+
if (i.changedTouches && i.changedTouches[0]) return i.changedTouches[0].identifier;
|
|
1401
1401
|
}
|
|
1402
|
-
function E(
|
|
1403
|
-
if (!
|
|
1404
|
-
let u =
|
|
1405
|
-
u || (u =
|
|
1402
|
+
function E(i) {
|
|
1403
|
+
if (!i) return;
|
|
1404
|
+
let u = i.getElementById("react-draggable-style-el");
|
|
1405
|
+
u || (u = i.createElement("style"), u.type = "text/css", u.id = "react-draggable-style-el", u.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
1406
1406
|
`, u.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
1407
|
-
`,
|
|
1407
|
+
`, i.getElementsByTagName("head")[0].appendChild(u)), i.body && a(i.body, "react-draggable-transparent-selection");
|
|
1408
1408
|
}
|
|
1409
|
-
function C(
|
|
1409
|
+
function C(i) {
|
|
1410
1410
|
window.requestAnimationFrame ? window.requestAnimationFrame(() => {
|
|
1411
|
-
w(
|
|
1412
|
-
}) : w(
|
|
1411
|
+
w(i);
|
|
1412
|
+
}) : w(i);
|
|
1413
1413
|
}
|
|
1414
|
-
function w(
|
|
1415
|
-
if (
|
|
1414
|
+
function w(i) {
|
|
1415
|
+
if (i)
|
|
1416
1416
|
try {
|
|
1417
|
-
if (
|
|
1418
|
-
|
|
1417
|
+
if (i.body && M(i.body, "react-draggable-transparent-selection"), i.selection)
|
|
1418
|
+
i.selection.empty();
|
|
1419
1419
|
else {
|
|
1420
|
-
const u = (
|
|
1420
|
+
const u = (i.defaultView || window).getSelection();
|
|
1421
1421
|
u && u.type !== "Caret" && u.removeAllRanges();
|
|
1422
1422
|
}
|
|
1423
1423
|
} catch {
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
|
-
function i
|
|
1427
|
-
|
|
1426
|
+
function a(i, u) {
|
|
1427
|
+
i.classList ? i.classList.add(u) : i.className.match(new RegExp(`(?:^|\\s)${u}(?!\\S)`)) || (i.className += ` ${u}`);
|
|
1428
1428
|
}
|
|
1429
|
-
function M(
|
|
1430
|
-
|
|
1429
|
+
function M(i, u) {
|
|
1430
|
+
i.classList ? i.classList.remove(u) : i.className = i.className.replace(new RegExp(`(?:^|\\s)${u}(?!\\S)`, "g"), "");
|
|
1431
1431
|
}
|
|
1432
1432
|
return z;
|
|
1433
1433
|
}
|
|
@@ -1436,51 +1436,51 @@ function ht() {
|
|
|
1436
1436
|
if (Ze) return re;
|
|
1437
1437
|
Ze = 1, Object.defineProperty(re, "__esModule", {
|
|
1438
1438
|
value: !0
|
|
1439
|
-
}), re.canDragX =
|
|
1440
|
-
var e = xe(),
|
|
1441
|
-
function r(
|
|
1442
|
-
if (!
|
|
1439
|
+
}), re.canDragX = d, re.canDragY = o, re.createCoreData = g, re.createDraggableData = T, re.getBoundPosition = r, re.getControlPosition = f, re.snapToGrid = n;
|
|
1440
|
+
var e = xe(), s = Oe();
|
|
1441
|
+
function r(l, p, m) {
|
|
1442
|
+
if (!l.props.bounds) return [p, m];
|
|
1443
1443
|
let {
|
|
1444
|
-
bounds:
|
|
1445
|
-
} =
|
|
1446
|
-
|
|
1447
|
-
const h = b(
|
|
1448
|
-
if (typeof
|
|
1444
|
+
bounds: D
|
|
1445
|
+
} = l.props;
|
|
1446
|
+
D = typeof D == "string" ? D : S(D);
|
|
1447
|
+
const h = b(l);
|
|
1448
|
+
if (typeof D == "string") {
|
|
1449
1449
|
const {
|
|
1450
1450
|
ownerDocument: y
|
|
1451
1451
|
} = h, x = y.defaultView;
|
|
1452
1452
|
let E;
|
|
1453
|
-
if (
|
|
1454
|
-
throw new Error('Bounds selector "' +
|
|
1455
|
-
const C = E, w = x.getComputedStyle(h),
|
|
1456
|
-
|
|
1457
|
-
left: -h.offsetLeft + (0, e.int)(
|
|
1458
|
-
top: -h.offsetTop + (0, e.int)(
|
|
1459
|
-
right: (0,
|
|
1460
|
-
bottom: (0,
|
|
1453
|
+
if (D === "parent" ? E = h.parentNode : E = h.getRootNode().querySelector(D), !(E instanceof x.HTMLElement))
|
|
1454
|
+
throw new Error('Bounds selector "' + D + '" could not find an element.');
|
|
1455
|
+
const C = E, w = x.getComputedStyle(h), a = x.getComputedStyle(C);
|
|
1456
|
+
D = {
|
|
1457
|
+
left: -h.offsetLeft + (0, e.int)(a.paddingLeft) + (0, e.int)(w.marginLeft),
|
|
1458
|
+
top: -h.offsetTop + (0, e.int)(a.paddingTop) + (0, e.int)(w.marginTop),
|
|
1459
|
+
right: (0, s.innerWidth)(C) - (0, s.outerWidth)(h) - h.offsetLeft + (0, e.int)(a.paddingRight) - (0, e.int)(w.marginRight),
|
|
1460
|
+
bottom: (0, s.innerHeight)(C) - (0, s.outerHeight)(h) - h.offsetTop + (0, e.int)(a.paddingBottom) - (0, e.int)(w.marginBottom)
|
|
1461
1461
|
};
|
|
1462
1462
|
}
|
|
1463
|
-
return (0, e.isNum)(
|
|
1463
|
+
return (0, e.isNum)(D.right) && (p = Math.min(p, D.right)), (0, e.isNum)(D.bottom) && (m = Math.min(m, D.bottom)), (0, e.isNum)(D.left) && (p = Math.max(p, D.left)), (0, e.isNum)(D.top) && (m = Math.max(m, D.top)), [p, m];
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1466
|
-
const
|
|
1467
|
-
return [
|
|
1465
|
+
function n(l, p, m) {
|
|
1466
|
+
const D = Math.round(p / l[0]) * l[0], h = Math.round(m / l[1]) * l[1];
|
|
1467
|
+
return [D, h];
|
|
1468
1468
|
}
|
|
1469
|
-
function
|
|
1470
|
-
return
|
|
1469
|
+
function d(l) {
|
|
1470
|
+
return l.props.axis === "both" || l.props.axis === "x";
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1473
|
-
return
|
|
1472
|
+
function o(l) {
|
|
1473
|
+
return l.props.axis === "both" || l.props.axis === "y";
|
|
1474
1474
|
}
|
|
1475
|
-
function f(
|
|
1476
|
-
const
|
|
1477
|
-
if (typeof p == "number" && !
|
|
1475
|
+
function f(l, p, m) {
|
|
1476
|
+
const D = typeof p == "number" ? (0, s.getTouch)(l, p) : null;
|
|
1477
|
+
if (typeof p == "number" && !D) return null;
|
|
1478
1478
|
const h = b(m), y = m.props.offsetParent || h.offsetParent || h.ownerDocument.body;
|
|
1479
|
-
return (0,
|
|
1479
|
+
return (0, s.offsetXYFromParent)(D || l, y, m.props.scale);
|
|
1480
1480
|
}
|
|
1481
|
-
function g(
|
|
1482
|
-
const
|
|
1483
|
-
return
|
|
1481
|
+
function g(l, p, m) {
|
|
1482
|
+
const D = !(0, e.isNum)(l.lastX), h = b(l);
|
|
1483
|
+
return D ? {
|
|
1484
1484
|
node: h,
|
|
1485
1485
|
deltaX: 0,
|
|
1486
1486
|
deltaY: 0,
|
|
@@ -1490,36 +1490,36 @@ function ht() {
|
|
|
1490
1490
|
y: m
|
|
1491
1491
|
} : {
|
|
1492
1492
|
node: h,
|
|
1493
|
-
deltaX: p -
|
|
1494
|
-
deltaY: m -
|
|
1495
|
-
lastX:
|
|
1496
|
-
lastY:
|
|
1493
|
+
deltaX: p - l.lastX,
|
|
1494
|
+
deltaY: m - l.lastY,
|
|
1495
|
+
lastX: l.lastX,
|
|
1496
|
+
lastY: l.lastY,
|
|
1497
1497
|
x: p,
|
|
1498
1498
|
y: m
|
|
1499
1499
|
};
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1502
|
-
const m =
|
|
1501
|
+
function T(l, p) {
|
|
1502
|
+
const m = l.props.scale;
|
|
1503
1503
|
return {
|
|
1504
1504
|
node: p.node,
|
|
1505
|
-
x:
|
|
1506
|
-
y:
|
|
1505
|
+
x: l.state.x + p.deltaX / m,
|
|
1506
|
+
y: l.state.y + p.deltaY / m,
|
|
1507
1507
|
deltaX: p.deltaX / m,
|
|
1508
1508
|
deltaY: p.deltaY / m,
|
|
1509
|
-
lastX:
|
|
1510
|
-
lastY:
|
|
1509
|
+
lastX: l.state.x,
|
|
1510
|
+
lastY: l.state.y
|
|
1511
1511
|
};
|
|
1512
1512
|
}
|
|
1513
|
-
function S(
|
|
1513
|
+
function S(l) {
|
|
1514
1514
|
return {
|
|
1515
|
-
left:
|
|
1516
|
-
top:
|
|
1517
|
-
right:
|
|
1518
|
-
bottom:
|
|
1515
|
+
left: l.left,
|
|
1516
|
+
top: l.top,
|
|
1517
|
+
right: l.right,
|
|
1518
|
+
bottom: l.bottom
|
|
1519
1519
|
};
|
|
1520
1520
|
}
|
|
1521
|
-
function b(
|
|
1522
|
-
const p =
|
|
1521
|
+
function b(l) {
|
|
1522
|
+
const p = l.findDOMNode();
|
|
1523
1523
|
if (!p)
|
|
1524
1524
|
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
1525
1525
|
return p;
|
|
@@ -1542,32 +1542,32 @@ function Kt() {
|
|
|
1542
1542
|
Qe = 1, Object.defineProperty(ue, "__esModule", {
|
|
1543
1543
|
value: !0
|
|
1544
1544
|
}), ue.default = void 0;
|
|
1545
|
-
var e =
|
|
1545
|
+
var e = T(ve), s = g(/* @__PURE__ */ ft()), r = g(it), n = Oe(), d = ht(), o = xe(), f = g(gt());
|
|
1546
1546
|
function g(h) {
|
|
1547
1547
|
return h && h.__esModule ? h : { default: h };
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function T(h, y) {
|
|
1550
1550
|
if (typeof WeakMap == "function") var x = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap();
|
|
1551
|
-
return (
|
|
1551
|
+
return (T = function(C, w) {
|
|
1552
1552
|
if (!w && C && C.__esModule) return C;
|
|
1553
|
-
var
|
|
1554
|
-
if (C === null || typeof C != "object" && typeof C != "function") return
|
|
1555
|
-
if (
|
|
1556
|
-
if (
|
|
1557
|
-
|
|
1553
|
+
var a, M, i = { __proto__: null, default: C };
|
|
1554
|
+
if (C === null || typeof C != "object" && typeof C != "function") return i;
|
|
1555
|
+
if (a = w ? E : x) {
|
|
1556
|
+
if (a.has(C)) return a.get(C);
|
|
1557
|
+
a.set(C, i);
|
|
1558
1558
|
}
|
|
1559
|
-
for (const u in C) u !== "default" && {}.hasOwnProperty.call(C, u) && ((M = (
|
|
1560
|
-
return
|
|
1559
|
+
for (const u in C) u !== "default" && {}.hasOwnProperty.call(C, u) && ((M = (a = Object.defineProperty) && Object.getOwnPropertyDescriptor(C, u)) && (M.get || M.set) ? a(i, u, M) : i[u] = C[u]);
|
|
1560
|
+
return i;
|
|
1561
1561
|
})(h, y);
|
|
1562
1562
|
}
|
|
1563
1563
|
function S(h, y, x) {
|
|
1564
1564
|
return (y = b(y)) in h ? Object.defineProperty(h, y, { value: x, enumerable: !0, configurable: !0, writable: !0 }) : h[y] = x, h;
|
|
1565
1565
|
}
|
|
1566
1566
|
function b(h) {
|
|
1567
|
-
var y =
|
|
1567
|
+
var y = l(h, "string");
|
|
1568
1568
|
return typeof y == "symbol" ? y : y + "";
|
|
1569
1569
|
}
|
|
1570
|
-
function
|
|
1570
|
+
function l(h, y) {
|
|
1571
1571
|
if (typeof h != "object" || !h) return h;
|
|
1572
1572
|
var x = h[Symbol.toPrimitive];
|
|
1573
1573
|
if (x !== void 0) {
|
|
@@ -1589,7 +1589,7 @@ function Kt() {
|
|
|
1589
1589
|
stop: "mouseup"
|
|
1590
1590
|
}
|
|
1591
1591
|
};
|
|
1592
|
-
let m = p.mouse,
|
|
1592
|
+
let m = p.mouse, D = class extends e.Component {
|
|
1593
1593
|
constructor() {
|
|
1594
1594
|
super(...arguments), S(this, "dragging", !1), S(this, "lastX", NaN), S(this, "lastY", NaN), S(this, "touchIdentifier", null), S(this, "mounted", !1), S(this, "handleDragStart", (y) => {
|
|
1595
1595
|
if (this.props.onMouseDown(y), !this.props.allowAnyClick && typeof y.button == "number" && y.button !== 0) return !1;
|
|
@@ -1599,63 +1599,63 @@ function Kt() {
|
|
|
1599
1599
|
const {
|
|
1600
1600
|
ownerDocument: E
|
|
1601
1601
|
} = x;
|
|
1602
|
-
if (this.props.disabled || !(y.target instanceof E.defaultView.Node) || this.props.handle && !(0,
|
|
1602
|
+
if (this.props.disabled || !(y.target instanceof E.defaultView.Node) || this.props.handle && !(0, n.matchesSelectorAndParentsTo)(y.target, this.props.handle, x) || this.props.cancel && (0, n.matchesSelectorAndParentsTo)(y.target, this.props.cancel, x))
|
|
1603
1603
|
return;
|
|
1604
1604
|
y.type === "touchstart" && !this.props.allowMobileScroll && y.preventDefault();
|
|
1605
|
-
const C = (0,
|
|
1605
|
+
const C = (0, n.getTouchIdentifier)(y);
|
|
1606
1606
|
this.touchIdentifier = C;
|
|
1607
|
-
const w = (0,
|
|
1607
|
+
const w = (0, d.getControlPosition)(y, C, this);
|
|
1608
1608
|
if (w == null) return;
|
|
1609
1609
|
const {
|
|
1610
|
-
x:
|
|
1610
|
+
x: a,
|
|
1611
1611
|
y: M
|
|
1612
|
-
} = w,
|
|
1613
|
-
(0, f.default)("DraggableCore: handleDragStart: %j",
|
|
1612
|
+
} = w, i = (0, d.createCoreData)(this, a, M);
|
|
1613
|
+
(0, f.default)("DraggableCore: handleDragStart: %j", i), (0, f.default)("calling", this.props.onStart), !(this.props.onStart(y, i) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, n.addUserSelectStyles)(E), this.dragging = !0, this.lastX = a, this.lastY = M, (0, n.addEvent)(E, m.move, this.handleDrag), (0, n.addEvent)(E, m.stop, this.handleDragStop));
|
|
1614
1614
|
}), S(this, "handleDrag", (y) => {
|
|
1615
|
-
const x = (0,
|
|
1615
|
+
const x = (0, d.getControlPosition)(y, this.touchIdentifier, this);
|
|
1616
1616
|
if (x == null) return;
|
|
1617
1617
|
let {
|
|
1618
1618
|
x: E,
|
|
1619
1619
|
y: C
|
|
1620
1620
|
} = x;
|
|
1621
1621
|
if (Array.isArray(this.props.grid)) {
|
|
1622
|
-
let M = E - this.lastX,
|
|
1623
|
-
if ([M,
|
|
1624
|
-
E = this.lastX + M, C = this.lastY +
|
|
1622
|
+
let M = E - this.lastX, i = C - this.lastY;
|
|
1623
|
+
if ([M, i] = (0, d.snapToGrid)(this.props.grid, M, i), !M && !i) return;
|
|
1624
|
+
E = this.lastX + M, C = this.lastY + i;
|
|
1625
1625
|
}
|
|
1626
|
-
const w = (0,
|
|
1626
|
+
const w = (0, d.createCoreData)(this, E, C);
|
|
1627
1627
|
if ((0, f.default)("DraggableCore: handleDrag: %j", w), this.props.onDrag(y, w) === !1 || this.mounted === !1) {
|
|
1628
1628
|
try {
|
|
1629
1629
|
this.handleDragStop(new MouseEvent("mouseup"));
|
|
1630
1630
|
} catch {
|
|
1631
|
-
const
|
|
1632
|
-
|
|
1631
|
+
const i = document.createEvent("MouseEvents");
|
|
1632
|
+
i.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(i);
|
|
1633
1633
|
}
|
|
1634
1634
|
return;
|
|
1635
1635
|
}
|
|
1636
1636
|
this.lastX = E, this.lastY = C;
|
|
1637
1637
|
}), S(this, "handleDragStop", (y) => {
|
|
1638
1638
|
if (!this.dragging) return;
|
|
1639
|
-
const x = (0,
|
|
1639
|
+
const x = (0, d.getControlPosition)(y, this.touchIdentifier, this);
|
|
1640
1640
|
if (x == null) return;
|
|
1641
1641
|
let {
|
|
1642
1642
|
x: E,
|
|
1643
1643
|
y: C
|
|
1644
1644
|
} = x;
|
|
1645
1645
|
if (Array.isArray(this.props.grid)) {
|
|
1646
|
-
let
|
|
1647
|
-
[
|
|
1646
|
+
let i = E - this.lastX || 0, u = C - this.lastY || 0;
|
|
1647
|
+
[i, u] = (0, d.snapToGrid)(this.props.grid, i, u), E = this.lastX + i, C = this.lastY + u;
|
|
1648
1648
|
}
|
|
1649
|
-
const w = (0,
|
|
1649
|
+
const w = (0, d.createCoreData)(this, E, C);
|
|
1650
1650
|
if (this.props.onStop(y, w) === !1 || this.mounted === !1) return !1;
|
|
1651
1651
|
const M = this.findDOMNode();
|
|
1652
|
-
M && this.props.enableUserSelectHack && (0,
|
|
1652
|
+
M && this.props.enableUserSelectHack && (0, n.scheduleRemoveUserSelectStyles)(M.ownerDocument), (0, f.default)("DraggableCore: handleDragStop: %j", w), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, M && ((0, f.default)("DraggableCore: Removing handlers"), (0, n.removeEvent)(M.ownerDocument, m.move, this.handleDrag), (0, n.removeEvent)(M.ownerDocument, m.stop, this.handleDragStop));
|
|
1653
1653
|
}), S(this, "onMouseDown", (y) => (m = p.mouse, this.handleDragStart(y))), S(this, "onMouseUp", (y) => (m = p.mouse, this.handleDragStop(y))), S(this, "onTouchStart", (y) => (m = p.touch, this.handleDragStart(y))), S(this, "onTouchEnd", (y) => (m = p.touch, this.handleDragStop(y)));
|
|
1654
1654
|
}
|
|
1655
1655
|
componentDidMount() {
|
|
1656
1656
|
this.mounted = !0;
|
|
1657
1657
|
const y = this.findDOMNode();
|
|
1658
|
-
y && (0,
|
|
1658
|
+
y && (0, n.addEvent)(y, p.touch.start, this.onTouchStart, {
|
|
1659
1659
|
passive: !1
|
|
1660
1660
|
});
|
|
1661
1661
|
}
|
|
@@ -1666,9 +1666,9 @@ function Kt() {
|
|
|
1666
1666
|
const {
|
|
1667
1667
|
ownerDocument: x
|
|
1668
1668
|
} = y;
|
|
1669
|
-
(0,
|
|
1669
|
+
(0, n.removeEvent)(x, p.mouse.move, this.handleDrag), (0, n.removeEvent)(x, p.touch.move, this.handleDrag), (0, n.removeEvent)(x, p.mouse.stop, this.handleDragStop), (0, n.removeEvent)(x, p.touch.stop, this.handleDragStop), (0, n.removeEvent)(y, p.touch.start, this.onTouchStart, {
|
|
1670
1670
|
passive: !1
|
|
1671
|
-
}), this.props.enableUserSelectHack && (0,
|
|
1671
|
+
}), this.props.enableUserSelectHack && (0, n.scheduleRemoveUserSelectStyles)(x);
|
|
1672
1672
|
}
|
|
1673
1673
|
}
|
|
1674
1674
|
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
@@ -1689,14 +1689,14 @@ function Kt() {
|
|
|
1689
1689
|
});
|
|
1690
1690
|
}
|
|
1691
1691
|
};
|
|
1692
|
-
return ue.default =
|
|
1692
|
+
return ue.default = D, S(D, "displayName", "DraggableCore"), S(D, "propTypes", {
|
|
1693
1693
|
/**
|
|
1694
1694
|
* `allowAnyClick` allows dragging using any mouse button.
|
|
1695
1695
|
* By default, we only accept the left button.
|
|
1696
1696
|
*
|
|
1697
1697
|
* Defaults to `false`.
|
|
1698
1698
|
*/
|
|
1699
|
-
allowAnyClick:
|
|
1699
|
+
allowAnyClick: s.default.bool,
|
|
1700
1700
|
/**
|
|
1701
1701
|
* `allowMobileScroll` turns off cancellation of the 'touchstart' event
|
|
1702
1702
|
* on mobile devices. Only enable this if you are having trouble with click
|
|
@@ -1704,19 +1704,19 @@ function Kt() {
|
|
|
1704
1704
|
*
|
|
1705
1705
|
* Defaults to `false`.
|
|
1706
1706
|
*/
|
|
1707
|
-
allowMobileScroll:
|
|
1708
|
-
children:
|
|
1707
|
+
allowMobileScroll: s.default.bool,
|
|
1708
|
+
children: s.default.node.isRequired,
|
|
1709
1709
|
/**
|
|
1710
1710
|
* `disabled`, if true, stops the <Draggable> from dragging. All handlers,
|
|
1711
1711
|
* with the exception of `onMouseDown`, will not fire.
|
|
1712
1712
|
*/
|
|
1713
|
-
disabled:
|
|
1713
|
+
disabled: s.default.bool,
|
|
1714
1714
|
/**
|
|
1715
1715
|
* By default, we add 'user-select:none' attributes to the document body
|
|
1716
1716
|
* to prevent ugly text selection during drag. If this is causing problems
|
|
1717
1717
|
* for your app, set this to `false`.
|
|
1718
1718
|
*/
|
|
1719
|
-
enableUserSelectHack:
|
|
1719
|
+
enableUserSelectHack: s.default.bool,
|
|
1720
1720
|
/**
|
|
1721
1721
|
* `offsetParent`, if set, uses the passed DOM node to compute drag offsets
|
|
1722
1722
|
* instead of using the parent node.
|
|
@@ -1728,7 +1728,7 @@ function Kt() {
|
|
|
1728
1728
|
/**
|
|
1729
1729
|
* `grid` specifies the x and y that dragging should snap to.
|
|
1730
1730
|
*/
|
|
1731
|
-
grid:
|
|
1731
|
+
grid: s.default.arrayOf(s.default.number),
|
|
1732
1732
|
/**
|
|
1733
1733
|
* `handle` specifies a selector to be used as the handle that initiates drag.
|
|
1734
1734
|
*
|
|
@@ -1749,7 +1749,7 @@ function Kt() {
|
|
|
1749
1749
|
* });
|
|
1750
1750
|
* ```
|
|
1751
1751
|
*/
|
|
1752
|
-
handle:
|
|
1752
|
+
handle: s.default.string,
|
|
1753
1753
|
/**
|
|
1754
1754
|
* `cancel` specifies a selector to be used to prevent drag initialization.
|
|
1755
1755
|
*
|
|
@@ -1770,7 +1770,7 @@ function Kt() {
|
|
|
1770
1770
|
* });
|
|
1771
1771
|
* ```
|
|
1772
1772
|
*/
|
|
1773
|
-
cancel:
|
|
1773
|
+
cancel: s.default.string,
|
|
1774
1774
|
/* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
|
|
1775
1775
|
* Unfortunately, in order for <Draggable> to work properly, we need raw access
|
|
1776
1776
|
* to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`
|
|
@@ -1788,38 +1788,38 @@ function Kt() {
|
|
|
1788
1788
|
* This can be used for arbitrarily nested components, so long as the ref ends up
|
|
1789
1789
|
* pointing to the actual child DOM node and not a custom component.
|
|
1790
1790
|
*/
|
|
1791
|
-
nodeRef:
|
|
1791
|
+
nodeRef: s.default.object,
|
|
1792
1792
|
/**
|
|
1793
1793
|
* Called when dragging starts.
|
|
1794
1794
|
* If this function returns the boolean false, dragging will be canceled.
|
|
1795
1795
|
*/
|
|
1796
|
-
onStart:
|
|
1796
|
+
onStart: s.default.func,
|
|
1797
1797
|
/**
|
|
1798
1798
|
* Called while dragging.
|
|
1799
1799
|
* If this function returns the boolean false, dragging will be canceled.
|
|
1800
1800
|
*/
|
|
1801
|
-
onDrag:
|
|
1801
|
+
onDrag: s.default.func,
|
|
1802
1802
|
/**
|
|
1803
1803
|
* Called when dragging stops.
|
|
1804
1804
|
* If this function returns the boolean false, the drag will remain active.
|
|
1805
1805
|
*/
|
|
1806
|
-
onStop:
|
|
1806
|
+
onStop: s.default.func,
|
|
1807
1807
|
/**
|
|
1808
1808
|
* A workaround option which can be passed if onMouseDown needs to be accessed,
|
|
1809
1809
|
* since it'll always be blocked (as there is internal use of onMouseDown)
|
|
1810
1810
|
*/
|
|
1811
|
-
onMouseDown:
|
|
1811
|
+
onMouseDown: s.default.func,
|
|
1812
1812
|
/**
|
|
1813
1813
|
* `scale`, if set, applies scaling while dragging an element
|
|
1814
1814
|
*/
|
|
1815
|
-
scale:
|
|
1815
|
+
scale: s.default.number,
|
|
1816
1816
|
/**
|
|
1817
1817
|
* These properties should be defined on the child, not here.
|
|
1818
1818
|
*/
|
|
1819
|
-
className:
|
|
1820
|
-
style:
|
|
1821
|
-
transform:
|
|
1822
|
-
}), S(
|
|
1819
|
+
className: o.dontSetMe,
|
|
1820
|
+
style: o.dontSetMe,
|
|
1821
|
+
transform: o.dontSetMe
|
|
1822
|
+
}), S(D, "defaultProps", {
|
|
1823
1823
|
allowAnyClick: !1,
|
|
1824
1824
|
// by default only accept left click
|
|
1825
1825
|
allowMobileScroll: !1,
|
|
@@ -1844,25 +1844,25 @@ function zt() {
|
|
|
1844
1844
|
}), Object.defineProperty(e, "DraggableCore", {
|
|
1845
1845
|
enumerable: !0,
|
|
1846
1846
|
get: function() {
|
|
1847
|
-
return
|
|
1847
|
+
return T.default;
|
|
1848
1848
|
}
|
|
1849
1849
|
}), e.default = void 0;
|
|
1850
|
-
var
|
|
1850
|
+
var s = l(ve), r = b(/* @__PURE__ */ ft()), n = b(it), d = Yt(), o = Oe(), f = ht(), g = xe(), T = b(Kt()), S = b(gt());
|
|
1851
1851
|
function b(x) {
|
|
1852
1852
|
return x && x.__esModule ? x : { default: x };
|
|
1853
1853
|
}
|
|
1854
|
-
function
|
|
1854
|
+
function l(x, E) {
|
|
1855
1855
|
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap();
|
|
1856
|
-
return (
|
|
1857
|
-
if (!M &&
|
|
1858
|
-
var
|
|
1859
|
-
if (
|
|
1860
|
-
if (
|
|
1861
|
-
if (
|
|
1862
|
-
|
|
1856
|
+
return (l = function(a, M) {
|
|
1857
|
+
if (!M && a && a.__esModule) return a;
|
|
1858
|
+
var i, u, c = { __proto__: null, default: a };
|
|
1859
|
+
if (a === null || typeof a != "object" && typeof a != "function") return c;
|
|
1860
|
+
if (i = M ? w : C) {
|
|
1861
|
+
if (i.has(a)) return i.get(a);
|
|
1862
|
+
i.set(a, c);
|
|
1863
1863
|
}
|
|
1864
|
-
for (const _ in
|
|
1865
|
-
return
|
|
1864
|
+
for (const _ in a) _ !== "default" && {}.hasOwnProperty.call(a, _) && ((u = (i = Object.defineProperty) && Object.getOwnPropertyDescriptor(a, _)) && (u.get || u.set) ? i(c, _, u) : c[_] = a[_]);
|
|
1865
|
+
return c;
|
|
1866
1866
|
})(x, E);
|
|
1867
1867
|
}
|
|
1868
1868
|
function p() {
|
|
@@ -1875,9 +1875,9 @@ function zt() {
|
|
|
1875
1875
|
}, p.apply(null, arguments);
|
|
1876
1876
|
}
|
|
1877
1877
|
function m(x, E, C) {
|
|
1878
|
-
return (E =
|
|
1878
|
+
return (E = D(E)) in x ? Object.defineProperty(x, E, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : x[E] = C, x;
|
|
1879
1879
|
}
|
|
1880
|
-
function
|
|
1880
|
+
function D(x) {
|
|
1881
1881
|
var E = h(x, "string");
|
|
1882
1882
|
return typeof E == "symbol" ? E : E + "";
|
|
1883
1883
|
}
|
|
@@ -1891,18 +1891,18 @@ function zt() {
|
|
|
1891
1891
|
}
|
|
1892
1892
|
return (E === "string" ? String : Number)(x);
|
|
1893
1893
|
}
|
|
1894
|
-
class y extends
|
|
1894
|
+
class y extends s.Component {
|
|
1895
1895
|
// React 16.3+
|
|
1896
1896
|
// Arity (props, state)
|
|
1897
1897
|
static getDerivedStateFromProps(E, C) {
|
|
1898
1898
|
let {
|
|
1899
1899
|
position: w
|
|
1900
1900
|
} = E, {
|
|
1901
|
-
prevPropsPosition:
|
|
1901
|
+
prevPropsPosition: a
|
|
1902
1902
|
} = C;
|
|
1903
|
-
return w && (!
|
|
1903
|
+
return w && (!a || w.x !== a.x || w.y !== a.y) ? ((0, S.default)("Draggable: getDerivedStateFromProps %j", {
|
|
1904
1904
|
position: w,
|
|
1905
|
-
prevPropsPosition:
|
|
1905
|
+
prevPropsPosition: a
|
|
1906
1906
|
}), {
|
|
1907
1907
|
x: w.x,
|
|
1908
1908
|
y: w.y,
|
|
@@ -1921,22 +1921,22 @@ function zt() {
|
|
|
1921
1921
|
}), m(this, "onDrag", (C, w) => {
|
|
1922
1922
|
if (!this.state.dragging) return !1;
|
|
1923
1923
|
(0, S.default)("Draggable: onDrag: %j", w);
|
|
1924
|
-
const
|
|
1925
|
-
x:
|
|
1926
|
-
y:
|
|
1924
|
+
const a = (0, f.createDraggableData)(this, w), M = {
|
|
1925
|
+
x: a.x,
|
|
1926
|
+
y: a.y,
|
|
1927
1927
|
slackX: 0,
|
|
1928
1928
|
slackY: 0
|
|
1929
1929
|
};
|
|
1930
1930
|
if (this.props.bounds) {
|
|
1931
1931
|
const {
|
|
1932
1932
|
x: u,
|
|
1933
|
-
y:
|
|
1933
|
+
y: c
|
|
1934
1934
|
} = M;
|
|
1935
1935
|
M.x += this.state.slackX, M.y += this.state.slackY;
|
|
1936
1936
|
const [_, R] = (0, f.getBoundPosition)(this, M.x, M.y);
|
|
1937
|
-
M.x = _, M.y = R, M.slackX = this.state.slackX + (u - M.x), M.slackY = this.state.slackY + (
|
|
1937
|
+
M.x = _, M.y = R, M.slackX = this.state.slackX + (u - M.x), M.slackY = this.state.slackY + (c - M.y), a.x = M.x, a.y = M.y, a.deltaX = M.x - this.state.x, a.deltaY = M.y - this.state.y;
|
|
1938
1938
|
}
|
|
1939
|
-
if (this.props.onDrag(C,
|
|
1939
|
+
if (this.props.onDrag(C, a) === !1) return !1;
|
|
1940
1940
|
this.setState(M);
|
|
1941
1941
|
}), m(this, "onDragStop", (C, w) => {
|
|
1942
1942
|
if (!this.state.dragging || this.props.onStop(C, (0, f.createDraggableData)(this, w)) === !1) return !1;
|
|
@@ -1949,9 +1949,9 @@ function zt() {
|
|
|
1949
1949
|
if (!!this.props.position) {
|
|
1950
1950
|
const {
|
|
1951
1951
|
x: u,
|
|
1952
|
-
y:
|
|
1952
|
+
y: c
|
|
1953
1953
|
} = this.props.position;
|
|
1954
|
-
M.x = u, M.y =
|
|
1954
|
+
M.x = u, M.y = c;
|
|
1955
1955
|
}
|
|
1956
1956
|
this.setState(M);
|
|
1957
1957
|
}), this.state = {
|
|
@@ -1985,39 +1985,39 @@ function zt() {
|
|
|
1985
1985
|
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
1986
1986
|
// the underlying DOM node ourselves. See the README for more information.
|
|
1987
1987
|
findDOMNode() {
|
|
1988
|
-
return this.props?.nodeRef?.current ??
|
|
1988
|
+
return this.props?.nodeRef?.current ?? n.default.findDOMNode(this);
|
|
1989
1989
|
}
|
|
1990
1990
|
render() {
|
|
1991
1991
|
const {
|
|
1992
1992
|
axis: E,
|
|
1993
1993
|
bounds: C,
|
|
1994
1994
|
children: w,
|
|
1995
|
-
defaultPosition:
|
|
1995
|
+
defaultPosition: a,
|
|
1996
1996
|
defaultClassName: M,
|
|
1997
|
-
defaultClassNameDragging:
|
|
1997
|
+
defaultClassNameDragging: i,
|
|
1998
1998
|
defaultClassNameDragged: u,
|
|
1999
|
-
position:
|
|
1999
|
+
position: c,
|
|
2000
2000
|
positionOffset: _,
|
|
2001
2001
|
scale: R,
|
|
2002
2002
|
...H
|
|
2003
2003
|
} = this.props;
|
|
2004
2004
|
let V = {}, X = null;
|
|
2005
|
-
const B = !!!
|
|
2005
|
+
const B = !!!c || this.state.dragging, ee = c || a, ie = {
|
|
2006
2006
|
// Set left if horizontal drag is enabled
|
|
2007
2007
|
x: (0, f.canDragX)(this) && B ? this.state.x : ee.x,
|
|
2008
2008
|
// Set top if vertical drag is enabled
|
|
2009
2009
|
y: (0, f.canDragY)(this) && B ? this.state.y : ee.y
|
|
2010
2010
|
};
|
|
2011
|
-
this.state.isElementSVG ? X = (0,
|
|
2012
|
-
const le = (0,
|
|
2013
|
-
[
|
|
2011
|
+
this.state.isElementSVG ? X = (0, o.createSVGTransform)(ie, _) : V = (0, o.createCSSTransform)(ie, _);
|
|
2012
|
+
const le = (0, d.clsx)(w.props.className || "", M, {
|
|
2013
|
+
[i]: this.state.dragging,
|
|
2014
2014
|
[u]: this.state.dragged
|
|
2015
2015
|
});
|
|
2016
|
-
return /* @__PURE__ */
|
|
2016
|
+
return /* @__PURE__ */ s.createElement(T.default, p({}, H, {
|
|
2017
2017
|
onStart: this.onDragStart,
|
|
2018
2018
|
onDrag: this.onDrag,
|
|
2019
2019
|
onStop: this.onDragStop
|
|
2020
|
-
}), /* @__PURE__ */
|
|
2020
|
+
}), /* @__PURE__ */ s.cloneElement(s.Children.only(w), {
|
|
2021
2021
|
className: le,
|
|
2022
2022
|
style: {
|
|
2023
2023
|
...w.props.style,
|
|
@@ -2029,7 +2029,7 @@ function zt() {
|
|
|
2029
2029
|
}
|
|
2030
2030
|
e.default = y, m(y, "displayName", "Draggable"), m(y, "propTypes", {
|
|
2031
2031
|
// Accepts all props <DraggableCore> accepts.
|
|
2032
|
-
...
|
|
2032
|
+
...T.default.propTypes,
|
|
2033
2033
|
/**
|
|
2034
2034
|
* `axis` determines which axis the draggable can move.
|
|
2035
2035
|
*
|
|
@@ -2135,7 +2135,7 @@ function zt() {
|
|
|
2135
2135
|
style: g.dontSetMe,
|
|
2136
2136
|
transform: g.dontSetMe
|
|
2137
2137
|
}), m(y, "defaultProps", {
|
|
2138
|
-
...
|
|
2138
|
+
...T.default.defaultProps,
|
|
2139
2139
|
axis: "both",
|
|
2140
2140
|
bounds: !1,
|
|
2141
2141
|
defaultClassName: "react-draggable",
|
|
@@ -2155,13 +2155,13 @@ function Bt() {
|
|
|
2155
2155
|
tt = 1;
|
|
2156
2156
|
const {
|
|
2157
2157
|
default: e,
|
|
2158
|
-
DraggableCore:
|
|
2158
|
+
DraggableCore: s
|
|
2159
2159
|
} = zt();
|
|
2160
|
-
return de.exports = e, de.exports.default = e, de.exports.DraggableCore =
|
|
2160
|
+
return de.exports = e, de.exports.default = e, de.exports.DraggableCore = s, de.exports;
|
|
2161
2161
|
}
|
|
2162
2162
|
var Ht = Bt();
|
|
2163
|
-
const Vt = /* @__PURE__ */ kt(Ht), Xt = se((e,
|
|
2164
|
-
const
|
|
2163
|
+
const Vt = /* @__PURE__ */ kt(Ht), Xt = se((e, s) => {
|
|
2164
|
+
const d = {
|
|
2165
2165
|
...{
|
|
2166
2166
|
// 1. Take it out of the document flow
|
|
2167
2167
|
position: "fixed",
|
|
@@ -2178,33 +2178,33 @@ const Vt = /* @__PURE__ */ kt(Ht), Xt = se((e, l) => {
|
|
|
2178
2178
|
boxShadow: "rgba(0, 0, 0, 0.5) 7px 7px 10px 0px"
|
|
2179
2179
|
},
|
|
2180
2180
|
...e.style || {}
|
|
2181
|
-
},
|
|
2181
|
+
}, o = e.testId || "not-set", f = e.className || "panel", g = vt(null);
|
|
2182
2182
|
return (
|
|
2183
2183
|
// 3. Pass the internal ref to the Draggable component via 'nodeRef'
|
|
2184
2184
|
/* @__PURE__ */ t(
|
|
2185
2185
|
Vt,
|
|
2186
2186
|
{
|
|
2187
2187
|
nodeRef: g,
|
|
2188
|
-
"data-testid":
|
|
2188
|
+
"data-testid": o,
|
|
2189
2189
|
axis: "both",
|
|
2190
2190
|
handle: ".handle",
|
|
2191
|
-
onStart: (b,
|
|
2191
|
+
onStart: (b, l) => {
|
|
2192
2192
|
e.onDraggingChange?.(!0);
|
|
2193
2193
|
},
|
|
2194
|
-
onStop: (b,
|
|
2194
|
+
onStop: (b, l) => {
|
|
2195
2195
|
setTimeout(() => {
|
|
2196
2196
|
e.onDraggingChange?.(!1);
|
|
2197
2197
|
}, 100);
|
|
2198
2198
|
},
|
|
2199
|
-
children: /* @__PURE__ */ t("div", { ref: g, className: f, style:
|
|
2199
|
+
children: /* @__PURE__ */ t("div", { ref: g, className: f, style: d, children: e.children })
|
|
2200
2200
|
}
|
|
2201
2201
|
)
|
|
2202
2202
|
);
|
|
2203
2203
|
});
|
|
2204
|
-
function
|
|
2204
|
+
function Nr({ children: e, addCssClasses: s }) {
|
|
2205
2205
|
const r = G(
|
|
2206
2206
|
"w-full h-full flex-1 flex flex-col",
|
|
2207
|
-
(
|
|
2207
|
+
(s || "gap-2 items-end justify-end content-end").trim()
|
|
2208
2208
|
);
|
|
2209
2209
|
return /* @__PURE__ */ t(
|
|
2210
2210
|
"div",
|
|
@@ -2217,42 +2217,45 @@ function Er({ children: e, addCssClasses: l }) {
|
|
|
2217
2217
|
}
|
|
2218
2218
|
);
|
|
2219
2219
|
}
|
|
2220
|
-
function
|
|
2220
|
+
function _r({ children: e, addCssClasses: s }) {
|
|
2221
2221
|
const r = G(
|
|
2222
2222
|
"w-full flex flex-col",
|
|
2223
|
-
(
|
|
2223
|
+
(s || "items-end").trim()
|
|
2224
2224
|
);
|
|
2225
2225
|
return /* @__PURE__ */ t("div", { className: r, children: e });
|
|
2226
2226
|
}
|
|
2227
|
-
const
|
|
2227
|
+
const Mr = (e) => {
|
|
2228
2228
|
console.warn("showToast TODO", e);
|
|
2229
|
-
}, Gt = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0,
|
|
2229
|
+
}, Gt = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, Pr = se((e, s) => {
|
|
2230
2230
|
let r = pt(Number(e.zoomScale || 0));
|
|
2231
|
-
const
|
|
2231
|
+
const n = e.responsiveGrid || !1, d = e.isEditing || !1, o = {
|
|
2232
2232
|
"--bwj-dashboard-transform-scale": r,
|
|
2233
2233
|
"--bwj-dashboard-add-cols": Gt(r)
|
|
2234
2234
|
}, f = G(
|
|
2235
2235
|
"dashboard-main-grid w-full",
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
`border border-dashed ${
|
|
2236
|
+
d ? "editing" : "",
|
|
2237
|
+
n ? "responsive-grid" : "",
|
|
2238
|
+
`border border-dashed ${d ? "border-primary border-opacity-50" : "border-transparent"}`
|
|
2239
2239
|
);
|
|
2240
|
-
return /* @__PURE__ */ t("div", { className: f, style:
|
|
2241
|
-
}), Pe = "size-5", Zt = (e
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2240
|
+
return /* @__PURE__ */ t("div", { className: f, style: o, children: e.children });
|
|
2241
|
+
}), Pe = "size-5", Zt = (e) => {
|
|
2242
|
+
if ((e.overrideCssClasses || "").trim().length > 0)
|
|
2243
|
+
return (e.overrideCssClasses || "").trim();
|
|
2244
|
+
const s = e.direction || "column", r = e.noBorder;
|
|
2245
|
+
let n = `dashboard-widget direction-${s} ${e.isEditing ? "editing" : ""} border border-solid`;
|
|
2246
|
+
return ["large", "xlarge"].indexOf(e.size || "") > -1 && (n = `${n} ${e.size}-widget`), r ? n = `${n} border-transparent border-opacity-0` : (e.borderCssClasses || "").trim().length > 0 ? n = `${n} ${e.borderCssClasses}` : n = `${n} border-card-invert border-opacity-20`, e.noShadow && (n = `${n} no-shadow`), e.noPadding && (n = `${n} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? n = `${n} ${e.backgroundCssClasses}`.trim() : n = `${n} bg-card content-card`, (e.addCssClasses || "").trim().length > 0 && (n = `${n} ${e.addCssClasses}`.trim()), n;
|
|
2247
|
+
}, Jt = (e, s) => {
|
|
2248
|
+
const r = e.hideTitle && !e.isEditing, n = G(Zt(e)), d = () => {
|
|
2246
2249
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey, e.parentWidgetKey);
|
|
2247
|
-
},
|
|
2248
|
-
e.onMoveClick && e.widgetKey && e.onMoveClick(
|
|
2249
|
-
},
|
|
2250
|
+
}, o = (g) => {
|
|
2251
|
+
e.onMoveClick && e.widgetKey && e.onMoveClick(g, e.widgetKey, e.parentWidgetKey);
|
|
2252
|
+
}, f = G(
|
|
2250
2253
|
"widget-header",
|
|
2251
2254
|
r ? "hidden" : "flex items-center justify-between border-b border-solid border-card-invert",
|
|
2252
2255
|
r ? "border-opacity-0" : "border-opacity-20"
|
|
2253
2256
|
);
|
|
2254
|
-
return /* @__PURE__ */ I("div", { className:
|
|
2255
|
-
/* @__PURE__ */ I("div", { className:
|
|
2257
|
+
return /* @__PURE__ */ I("div", { className: n, children: [
|
|
2258
|
+
/* @__PURE__ */ I("div", { className: f, children: [
|
|
2256
2259
|
/* @__PURE__ */ I("div", { className: "widget-title-wrapper w-full flex flex-row gap-2 items-center justify-between", children: [
|
|
2257
2260
|
/* @__PURE__ */ I("h2", { className: "widget-title", children: [
|
|
2258
2261
|
e.title,
|
|
@@ -2273,8 +2276,8 @@ const _r = (e) => {
|
|
|
2273
2276
|
placement: "top",
|
|
2274
2277
|
title: `${e.index < 1 ? "Already at min position" : "Move Widget to the left/up"}`
|
|
2275
2278
|
},
|
|
2276
|
-
onClick: () =>
|
|
2277
|
-
children: /* @__PURE__ */ t(
|
|
2279
|
+
onClick: () => o(-1),
|
|
2280
|
+
children: /* @__PURE__ */ t(at, { className: Pe })
|
|
2278
2281
|
}
|
|
2279
2282
|
),
|
|
2280
2283
|
/* @__PURE__ */ t(
|
|
@@ -2287,7 +2290,7 @@ const _r = (e) => {
|
|
|
2287
2290
|
placement: "top",
|
|
2288
2291
|
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Widget to the right/down"}`
|
|
2289
2292
|
},
|
|
2290
|
-
onClick: () =>
|
|
2293
|
+
onClick: () => o(1),
|
|
2291
2294
|
children: /* @__PURE__ */ t(st, { className: Pe })
|
|
2292
2295
|
}
|
|
2293
2296
|
),
|
|
@@ -2300,7 +2303,7 @@ const _r = (e) => {
|
|
|
2300
2303
|
placement: "top",
|
|
2301
2304
|
title: "Remove Widget"
|
|
2302
2305
|
},
|
|
2303
|
-
onClick: () =>
|
|
2306
|
+
onClick: () => d(),
|
|
2304
2307
|
children: /* @__PURE__ */ t(lt, { className: Pe })
|
|
2305
2308
|
}
|
|
2306
2309
|
)
|
|
@@ -2309,125 +2312,125 @@ const _r = (e) => {
|
|
|
2309
2312
|
] }),
|
|
2310
2313
|
/* @__PURE__ */ t("div", { className: "widget-inner", children: e.children })
|
|
2311
2314
|
] });
|
|
2312
|
-
},
|
|
2315
|
+
}, Qt = se(Jt);
|
|
2313
2316
|
function rt(e) {
|
|
2314
|
-
const { widgetKey:
|
|
2317
|
+
const { widgetKey: s, parentWidgetKey: r, index: n, maxIndex: d, isEditing: o, onRemoveClick: f, onMoveClick: g } = e, T = e.extraProps;
|
|
2315
2318
|
return /* @__PURE__ */ t(
|
|
2316
|
-
|
|
2319
|
+
Qt,
|
|
2317
2320
|
{
|
|
2318
|
-
widgetKey:
|
|
2321
|
+
widgetKey: s,
|
|
2319
2322
|
title: "Widget Error",
|
|
2320
2323
|
parentWidgetKey: r,
|
|
2321
|
-
index:
|
|
2322
|
-
maxIndex:
|
|
2323
|
-
isEditing:
|
|
2324
|
+
index: n,
|
|
2325
|
+
maxIndex: d,
|
|
2326
|
+
isEditing: o,
|
|
2324
2327
|
onRemoveClick: f,
|
|
2325
2328
|
onMoveClick: g,
|
|
2326
2329
|
children: /* @__PURE__ */ I("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
2327
2330
|
/* @__PURE__ */ I("span", { className: "font-bold", children: [
|
|
2328
2331
|
'Failed to load "',
|
|
2329
|
-
|
|
2332
|
+
s,
|
|
2330
2333
|
'"'
|
|
2331
2334
|
] }),
|
|
2332
|
-
|
|
2335
|
+
T?.versionMismatch && /* @__PURE__ */ I("div", { className: "flex flex-col", children: [
|
|
2333
2336
|
/* @__PURE__ */ I("span", { className: "font-bold text-sm", children: [
|
|
2334
2337
|
"Version Mismatch: ",
|
|
2335
|
-
|
|
2338
|
+
s
|
|
2336
2339
|
] }),
|
|
2337
2340
|
/* @__PURE__ */ I("div", { className: "flex flex-col text-xs", children: [
|
|
2338
2341
|
/* @__PURE__ */ I("span", { children: [
|
|
2339
2342
|
"Widget requires: Vue ",
|
|
2340
|
-
|
|
2343
|
+
T?.requiredVer,
|
|
2341
2344
|
"."
|
|
2342
2345
|
] }),
|
|
2343
2346
|
/* @__PURE__ */ I("span", { children: [
|
|
2344
2347
|
"Host version: ",
|
|
2345
|
-
|
|
2348
|
+
T?.hostVer,
|
|
2346
2349
|
"."
|
|
2347
2350
|
] })
|
|
2348
2351
|
] }),
|
|
2349
2352
|
/* @__PURE__ */ I("div", { className: "flex flex-col mt-3", children: [
|
|
2350
2353
|
/* @__PURE__ */ t("h5", { children: "Externals:" }),
|
|
2351
|
-
/* @__PURE__ */ t("dl", { className: "ml-2 flex flex-col text-xs", children:
|
|
2354
|
+
/* @__PURE__ */ t("dl", { className: "ml-2 flex flex-col text-xs", children: T?.externalDependencies.map((S, b) => /* @__PURE__ */ I("dd", { children: [
|
|
2352
2355
|
"- ",
|
|
2353
2356
|
S
|
|
2354
2357
|
] }, `dep-${b}`)) })
|
|
2355
2358
|
] })
|
|
2356
2359
|
] }),
|
|
2357
|
-
!
|
|
2360
|
+
!T?.versionMismatch && /* @__PURE__ */ I("div", { className: "flex flex-col", children: [
|
|
2358
2361
|
/* @__PURE__ */ t("div", { className: "flex flex-col text-xs italic", children: /* @__PURE__ */ t("span", { children: "The remote plugin is unavailable." }) }),
|
|
2359
2362
|
/* @__PURE__ */ t("span", { className: "font-bold text-sm", children: "Error Details:" }),
|
|
2360
2363
|
/* @__PURE__ */ I("div", { className: "flex flex-col mt-3", children: [
|
|
2361
2364
|
/* @__PURE__ */ t("h5", { children: "Details:" }),
|
|
2362
|
-
/* @__PURE__ */ t("div", { className: "text-xs break-all", children:
|
|
2365
|
+
/* @__PURE__ */ t("div", { className: "text-xs break-all", children: T?.errorMessage || "Unknown error occurred." })
|
|
2363
2366
|
] })
|
|
2364
2367
|
] })
|
|
2365
2368
|
] })
|
|
2366
2369
|
}
|
|
2367
2370
|
);
|
|
2368
2371
|
}
|
|
2369
|
-
const
|
|
2370
|
-
const r = (
|
|
2371
|
-
return !(
|
|
2372
|
+
const er = (e, s) => {
|
|
2373
|
+
const r = (o) => o.replace(/[^0-9.]/g, ""), n = r(e).split(".").map(Number), d = r(s).split(".").map(Number);
|
|
2374
|
+
return !(n[0] !== d[0] || n[1] < d[1]);
|
|
2372
2375
|
};
|
|
2373
|
-
function
|
|
2376
|
+
function tr(e) {
|
|
2374
2377
|
return /* @__PURE__ */ t("div", { className: "dashboard-widget", children: /* @__PURE__ */ I("div", { className: "absolute inset-0 bg-black flex flex-col items-center justify-center text-center", children: [
|
|
2375
2378
|
/* @__PURE__ */ t("div", { className: "w-full absolute opacity-100 text-primary", children: e.title }),
|
|
2376
2379
|
/* @__PURE__ */ t("div", { className: "animate-ping rounded-full h-32 w-32 border-8 border-white" })
|
|
2377
2380
|
] }) });
|
|
2378
2381
|
}
|
|
2379
|
-
function
|
|
2382
|
+
function rr({
|
|
2380
2383
|
index: e,
|
|
2381
|
-
maxIndex:
|
|
2384
|
+
maxIndex: s,
|
|
2382
2385
|
widgetKey: r,
|
|
2383
|
-
parentWidgetKey:
|
|
2384
|
-
targetContainerKey:
|
|
2385
|
-
childWidgetsConfig:
|
|
2386
|
+
parentWidgetKey: n,
|
|
2387
|
+
targetContainerKey: d,
|
|
2388
|
+
childWidgetsConfig: o,
|
|
2386
2389
|
widgetCatalog: f,
|
|
2387
2390
|
isEditing: g,
|
|
2388
2391
|
// for additional props passed to all widget from the dashboard through the DynamicWidgetLoader:
|
|
2389
|
-
extraProps:
|
|
2392
|
+
extraProps: T,
|
|
2390
2393
|
onRemoveClick: S,
|
|
2391
2394
|
onMoveClick: b,
|
|
2392
|
-
selectContainer:
|
|
2395
|
+
selectContainer: l
|
|
2393
2396
|
}) {
|
|
2394
|
-
const p = `${r}`.split("_"), m = p.length > 1,
|
|
2397
|
+
const p = `${r}`.split("_"), m = p.length > 1, D = m ? p[0] : r, h = f.get(D);
|
|
2395
2398
|
if (!h)
|
|
2396
2399
|
return /* @__PURE__ */ t("div", { className: "flex", children: /* @__PURE__ */ I("p", { children: [
|
|
2397
2400
|
"Widget not found in catalog: ",
|
|
2398
|
-
|
|
2401
|
+
D
|
|
2399
2402
|
] }) });
|
|
2400
2403
|
let y = null, x = !1;
|
|
2401
|
-
const E = !!h.isContainer, C = m ? nt(r) : "", w = E ? (
|
|
2404
|
+
const E = !!h.isContainer, C = m ? nt(r) : "", w = E ? (o || []).filter((i) => i.parentWidgetKey === r) : [], a = {
|
|
2402
2405
|
index: e,
|
|
2403
|
-
maxIndex:
|
|
2406
|
+
maxIndex: s,
|
|
2404
2407
|
widgetKey: r,
|
|
2405
|
-
parentWidgetKey:
|
|
2408
|
+
parentWidgetKey: n,
|
|
2406
2409
|
isEditing: g,
|
|
2407
|
-
extraProps:
|
|
2410
|
+
extraProps: T,
|
|
2408
2411
|
title: m ? C : h.title,
|
|
2409
2412
|
onRemoveClick: S,
|
|
2410
2413
|
onMoveClick: b
|
|
2411
2414
|
};
|
|
2412
2415
|
if (h.component ? (y = h.component, x = !1) : h.loader && (x = !0, y = ot(() => {
|
|
2413
2416
|
if (!h) return null;
|
|
2414
|
-
const
|
|
2415
|
-
if (
|
|
2416
|
-
const _ =
|
|
2417
|
-
if (!
|
|
2417
|
+
const i = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3", u = h.meta?.externalDependencies || [], c = u.find((_) => _.startsWith("react@"));
|
|
2418
|
+
if (c) {
|
|
2419
|
+
const _ = c.split("@")[1];
|
|
2420
|
+
if (!er(i, _)) {
|
|
2418
2421
|
const R = {
|
|
2419
|
-
...
|
|
2420
|
-
hostVer:
|
|
2422
|
+
...a.extraProps,
|
|
2423
|
+
hostVer: i,
|
|
2421
2424
|
requiredVer: _,
|
|
2422
2425
|
externalDependencies: u,
|
|
2423
|
-
errorMessage: `Incompatible React version. Required: ${_}, Host: ${
|
|
2426
|
+
errorMessage: `Incompatible React version. Required: ${_}, Host: ${i}`,
|
|
2424
2427
|
versionMismatch: !0
|
|
2425
2428
|
};
|
|
2426
|
-
return
|
|
2427
|
-
...
|
|
2429
|
+
return a.extraProps = {
|
|
2430
|
+
...a.extraProps,
|
|
2428
2431
|
...R
|
|
2429
2432
|
}, ve.lazy(async () => ({
|
|
2430
|
-
default: () => /* @__PURE__ */ t(rt, { ...
|
|
2433
|
+
default: () => /* @__PURE__ */ t(rt, { ...a })
|
|
2431
2434
|
}));
|
|
2432
2435
|
}
|
|
2433
2436
|
}
|
|
@@ -2440,18 +2443,18 @@ function tr({
|
|
|
2440
2443
|
} catch (R) {
|
|
2441
2444
|
console.error(`Widget Load Error [${r}]:`, R);
|
|
2442
2445
|
const H = {
|
|
2443
|
-
...
|
|
2444
|
-
hostVer:
|
|
2445
|
-
requiredVer:
|
|
2446
|
+
...a.extraProps,
|
|
2447
|
+
hostVer: i,
|
|
2448
|
+
requiredVer: c ? c.split("@")[1] : "Unknown",
|
|
2446
2449
|
externalDependencies: u,
|
|
2447
2450
|
errorMessage: R.message,
|
|
2448
2451
|
versionMismatch: !1
|
|
2449
2452
|
};
|
|
2450
|
-
return
|
|
2451
|
-
...
|
|
2453
|
+
return a.extraProps = {
|
|
2454
|
+
...a.extraProps,
|
|
2452
2455
|
...H
|
|
2453
2456
|
}, {
|
|
2454
|
-
default: () => /* @__PURE__ */ t(rt, { ...
|
|
2457
|
+
default: () => /* @__PURE__ */ t(rt, { ...a })
|
|
2455
2458
|
};
|
|
2456
2459
|
}
|
|
2457
2460
|
};
|
|
@@ -2461,58 +2464,58 @@ function tr({
|
|
|
2461
2464
|
}, [h, r])), !y)
|
|
2462
2465
|
return /* @__PURE__ */ t("div", { className: "flex", children: /* @__PURE__ */ I("p", { children: [
|
|
2463
2466
|
"Widget definition incomplete: ",
|
|
2464
|
-
|
|
2467
|
+
D
|
|
2465
2468
|
] }) });
|
|
2466
2469
|
const M = E ? {
|
|
2467
|
-
highlight:
|
|
2468
|
-
selectContainer:
|
|
2470
|
+
highlight: d === r,
|
|
2471
|
+
selectContainer: l,
|
|
2469
2472
|
// The children prop is the recursive call back to DynamicWidgetLoader
|
|
2470
|
-
children: w.map((
|
|
2471
|
-
|
|
2473
|
+
children: w.map((i, u) => /* @__PURE__ */ t(
|
|
2474
|
+
rr,
|
|
2472
2475
|
{
|
|
2473
2476
|
index: u,
|
|
2474
2477
|
maxIndex: w.length - 1,
|
|
2475
|
-
widgetKey:
|
|
2476
|
-
parentWidgetKey:
|
|
2478
|
+
widgetKey: i.widgetKey,
|
|
2479
|
+
parentWidgetKey: i.parentWidgetKey,
|
|
2477
2480
|
widgetCatalog: f,
|
|
2478
2481
|
isEditing: g,
|
|
2479
|
-
extraProps:
|
|
2482
|
+
extraProps: T,
|
|
2480
2483
|
onRemoveClick: S,
|
|
2481
2484
|
onMoveClick: b
|
|
2482
2485
|
},
|
|
2483
|
-
`${
|
|
2486
|
+
`${i.widgetKey}_${u}`
|
|
2484
2487
|
))
|
|
2485
2488
|
} : {};
|
|
2486
|
-
return x ? /* @__PURE__ */ t(xt, { fallback: /* @__PURE__ */ t(
|
|
2489
|
+
return x ? /* @__PURE__ */ t(xt, { fallback: /* @__PURE__ */ t(tr, { title: `Loading ${h.title}` }), children: /* @__PURE__ */ t(y, { ...a, ...M }) }) : /* @__PURE__ */ t(y, { ...a, ...M });
|
|
2487
2490
|
}
|
|
2488
2491
|
const be = "size-5";
|
|
2489
2492
|
function ke(e) {
|
|
2490
|
-
const
|
|
2491
|
-
let g =
|
|
2492
|
-
const
|
|
2493
|
+
const s = e.highlight || !1, r = e.direction || "column", n = e.children.length > 0, d = e.isEditing || !1;
|
|
2494
|
+
let g = s ? "border-transparent" : d && !n ? "border-card-invert" : "border-transparent";
|
|
2495
|
+
const T = ["large", "xlarge"].includes(e.size || "");
|
|
2493
2496
|
let S = "";
|
|
2494
2497
|
["large", "xlarge"].indexOf(e.size || "") > -1 && (S = `${e.size}-widget`);
|
|
2495
2498
|
let b = "";
|
|
2496
|
-
r === "row" && !
|
|
2497
|
-
let
|
|
2499
|
+
r === "row" && !n ? b = "min-h-48" : r === "column" && !n && (b = "min-h-96");
|
|
2500
|
+
let l = G(
|
|
2498
2501
|
"dashboard-widget-container relative ",
|
|
2499
|
-
|
|
2500
|
-
|
|
2502
|
+
n ? "" : "has-no-children",
|
|
2503
|
+
d ? "editing" : "",
|
|
2501
2504
|
b,
|
|
2502
2505
|
S,
|
|
2503
|
-
|
|
2506
|
+
T ? "widget-container-grid" : "widget-container-flex",
|
|
2504
2507
|
`direction-${r}`,
|
|
2505
2508
|
`border ${g}`,
|
|
2506
|
-
`${
|
|
2509
|
+
`${s ? "highlight-container" : ""} ${g}`
|
|
2507
2510
|
), p = `widget-container-header direction-${r} flex items-center border-1 ${g}`;
|
|
2508
2511
|
const m = () => {
|
|
2509
2512
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey);
|
|
2510
|
-
},
|
|
2513
|
+
}, D = (y) => {
|
|
2511
2514
|
e.onMoveClick && e.widgetKey && e.onMoveClick(y, e.widgetKey, e.parentWidgetKey);
|
|
2512
2515
|
}, h = () => {
|
|
2513
2516
|
e.selectContainer && e.widgetKey && e.selectContainer(e.widgetKey);
|
|
2514
2517
|
};
|
|
2515
|
-
return /* @__PURE__ */ I("div", { "data-testid": `container_${e.widgetKey}`, className:
|
|
2518
|
+
return /* @__PURE__ */ I("div", { "data-testid": `container_${e.widgetKey}`, className: l, children: [
|
|
2516
2519
|
/* @__PURE__ */ I("div", { className: p, children: [
|
|
2517
2520
|
/* @__PURE__ */ t(
|
|
2518
2521
|
"div",
|
|
@@ -2537,7 +2540,7 @@ function ke(e) {
|
|
|
2537
2540
|
children: /* @__PURE__ */ t(
|
|
2538
2541
|
It,
|
|
2539
2542
|
{
|
|
2540
|
-
className: `${be} ${
|
|
2543
|
+
className: `${be} ${s ? "text-success" : "text-disabled"}`
|
|
2541
2544
|
}
|
|
2542
2545
|
)
|
|
2543
2546
|
}
|
|
@@ -2552,8 +2555,8 @@ function ke(e) {
|
|
|
2552
2555
|
placement: "top",
|
|
2553
2556
|
title: `${e.index < 1 ? "Already at min position" : "Move Container to the left/up"}`
|
|
2554
2557
|
},
|
|
2555
|
-
onClick: () =>
|
|
2556
|
-
children: /* @__PURE__ */ t(
|
|
2558
|
+
onClick: () => D(-1),
|
|
2559
|
+
children: /* @__PURE__ */ t(at, { className: be })
|
|
2557
2560
|
}
|
|
2558
2561
|
),
|
|
2559
2562
|
/* @__PURE__ */ t(
|
|
@@ -2566,7 +2569,7 @@ function ke(e) {
|
|
|
2566
2569
|
placement: "top",
|
|
2567
2570
|
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Container to the right/down"}`
|
|
2568
2571
|
},
|
|
2569
|
-
onClick: () =>
|
|
2572
|
+
onClick: () => D(1),
|
|
2570
2573
|
children: /* @__PURE__ */ t(st, { className: be })
|
|
2571
2574
|
}
|
|
2572
2575
|
),
|
|
@@ -2588,32 +2591,32 @@ function ke(e) {
|
|
|
2588
2591
|
/* @__PURE__ */ t("div", { "data-testid": `childrenwrapper_${e.widgetKey}`, className: "widget-container-inner", children: e.children })
|
|
2589
2592
|
] });
|
|
2590
2593
|
}
|
|
2591
|
-
function
|
|
2592
|
-
const { direction:
|
|
2594
|
+
function Ir(e) {
|
|
2595
|
+
const { direction: s, ...r } = e;
|
|
2593
2596
|
return /* @__PURE__ */ t(ke, { direction: "column", ...r });
|
|
2594
2597
|
}
|
|
2595
|
-
function
|
|
2596
|
-
const { size:
|
|
2598
|
+
function Rr(e) {
|
|
2599
|
+
const { size: s, ...r } = e;
|
|
2597
2600
|
return /* @__PURE__ */ t(ke, { size: "large", ...r });
|
|
2598
2601
|
}
|
|
2599
|
-
function
|
|
2600
|
-
const { direction:
|
|
2602
|
+
function $r(e) {
|
|
2603
|
+
const { direction: s, ...r } = e;
|
|
2601
2604
|
return /* @__PURE__ */ t(ke, { direction: "row", ...r });
|
|
2602
2605
|
}
|
|
2603
2606
|
function Ie({
|
|
2604
2607
|
// widgetKey,
|
|
2605
2608
|
metaData: e,
|
|
2606
|
-
alreadyAdded:
|
|
2609
|
+
alreadyAdded: s,
|
|
2607
2610
|
addWidget: r
|
|
2608
2611
|
}) {
|
|
2609
|
-
const [
|
|
2612
|
+
const [n, d] = ae(!1), o = e.icon || Rt, f = e.name || "Unknown", g = e.description || "---", S = (e.noDuplicatedWidgets || !1) && s, b = G(`
|
|
2610
2613
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2611
2614
|
${S ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
|
|
2612
2615
|
`);
|
|
2613
2616
|
return /* @__PURE__ */ I("div", { className: b, style: { width: "calc(100% - 1rem)" }, onClick: () => {
|
|
2614
2617
|
S || r();
|
|
2615
2618
|
}, children: [
|
|
2616
|
-
/* @__PURE__ */ t(
|
|
2619
|
+
/* @__PURE__ */ t(o, { className: "" }),
|
|
2617
2620
|
/* @__PURE__ */ I("div", { className: "w-full", children: [
|
|
2618
2621
|
/* @__PURE__ */ I("div", { className: "flex flex-row items-center gap-2 justify-between", children: [
|
|
2619
2622
|
/* @__PURE__ */ t("span", { className: "font-bold", children: f }),
|
|
@@ -2622,38 +2625,38 @@ function Ie({
|
|
|
2622
2625
|
/* @__PURE__ */ I("div", { className: "flex flex-col text-xs", children: [
|
|
2623
2626
|
/* @__PURE__ */ t("div", { children: g }),
|
|
2624
2627
|
/* @__PURE__ */ t("div", { className: "mt-3 cursor-pointer", onClick: (m) => {
|
|
2625
|
-
m.stopPropagation(), m.preventDefault(),
|
|
2628
|
+
m.stopPropagation(), m.preventDefault(), d(!n);
|
|
2626
2629
|
}, children: "Externals:" }),
|
|
2627
|
-
|
|
2630
|
+
n && /* @__PURE__ */ t("dl", { className: "ml-2 flex flex-col text-xs", children: e.externalDependencies.map((m, D) => /* @__PURE__ */ I("dd", { children: [
|
|
2628
2631
|
"- ",
|
|
2629
2632
|
m
|
|
2630
|
-
] },
|
|
2633
|
+
] }, D)) })
|
|
2631
2634
|
] })
|
|
2632
2635
|
] })
|
|
2633
2636
|
] });
|
|
2634
2637
|
}
|
|
2635
|
-
function
|
|
2636
|
-
const r = e.name || "Unknown",
|
|
2638
|
+
function nr({ item: e, onSettingItemChanged: s }) {
|
|
2639
|
+
const r = e.name || "Unknown", n = e.description || "---", d = G(`
|
|
2637
2640
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2638
|
-
`),
|
|
2639
|
-
const
|
|
2640
|
-
if (["ArrowUp", "ArrowDown"].includes(
|
|
2641
|
+
`), o = (g) => {
|
|
2642
|
+
const T = g.key;
|
|
2643
|
+
if (["ArrowUp", "ArrowDown"].includes(T)) {
|
|
2641
2644
|
g.preventDefault();
|
|
2642
2645
|
const S = bt.incrementOrDecrementValue(
|
|
2643
2646
|
e,
|
|
2644
|
-
|
|
2647
|
+
T === "ArrowUp" ? 1 : -1
|
|
2645
2648
|
);
|
|
2646
|
-
|
|
2649
|
+
s(S);
|
|
2647
2650
|
}
|
|
2648
2651
|
}, f = (g) => {
|
|
2649
|
-
|
|
2652
|
+
s({
|
|
2650
2653
|
...e,
|
|
2651
2654
|
value: g.target.value || ""
|
|
2652
2655
|
});
|
|
2653
2656
|
};
|
|
2654
|
-
return /* @__PURE__ */ t("div", { className:
|
|
2657
|
+
return /* @__PURE__ */ t("div", { className: d, style: { width: "calc(100% - 1rem)" }, children: /* @__PURE__ */ I("div", { className: "w-full", children: [
|
|
2655
2658
|
/* @__PURE__ */ t("div", { className: "flex flex-row items-center gap-2 justify-between", children: /* @__PURE__ */ t("span", { className: "font-bold", children: r }) }),
|
|
2656
|
-
/* @__PURE__ */ t("div", { className: "flex flex-col gap-2 text-xs", children: /* @__PURE__ */ t("div", { children:
|
|
2659
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-2 text-xs", children: /* @__PURE__ */ t("div", { children: n }) }),
|
|
2657
2660
|
/* @__PURE__ */ I("div", { children: [
|
|
2658
2661
|
"Value:",
|
|
2659
2662
|
/* @__PURE__ */ t(
|
|
@@ -2664,53 +2667,53 @@ function rr({ item: e, onSettingItemChanged: l }) {
|
|
|
2664
2667
|
className: "w-full",
|
|
2665
2668
|
value: e.value,
|
|
2666
2669
|
onChange: f,
|
|
2667
|
-
onKeyDown:
|
|
2670
|
+
onKeyDown: o
|
|
2668
2671
|
}
|
|
2669
2672
|
)
|
|
2670
2673
|
] })
|
|
2671
2674
|
] }) });
|
|
2672
2675
|
}
|
|
2673
|
-
const Re = (e,
|
|
2674
|
-
...
|
|
2675
|
-
...
|
|
2676
|
+
const Re = (e, s) => [
|
|
2677
|
+
...s.widgets.filter((n) => n.indexOf("Container") === -1),
|
|
2678
|
+
...s.childWidgetsConfig.map((n) => n.widgetKey)
|
|
2676
2679
|
].includes(e);
|
|
2677
|
-
function
|
|
2680
|
+
function Or(e) {
|
|
2678
2681
|
const {
|
|
2679
|
-
currentDashboardConfig:
|
|
2682
|
+
currentDashboardConfig: s,
|
|
2680
2683
|
undoStatus: r,
|
|
2681
|
-
addContainer:
|
|
2682
|
-
onResetToDefaultDashboardClick:
|
|
2683
|
-
onUndoOrRedo:
|
|
2684
|
+
addContainer: n,
|
|
2685
|
+
onResetToDefaultDashboardClick: d,
|
|
2686
|
+
onUndoOrRedo: o,
|
|
2684
2687
|
onDoneClick: f
|
|
2685
|
-
} = e, [g,
|
|
2686
|
-
widgetKey:
|
|
2687
|
-
metaData: yt(
|
|
2688
|
-
})), h = !!e.targetContainerKey, y = (
|
|
2689
|
-
p(
|
|
2690
|
-
}, x = (
|
|
2691
|
-
const _ =
|
|
2692
|
-
return _.length < 1 ? !0 :
|
|
2693
|
-
}, E = (
|
|
2694
|
-
const _ =
|
|
2695
|
-
return _.length < 1 ? !0 :
|
|
2696
|
-
}, C = (
|
|
2688
|
+
} = e, [g, T] = ae("Editing"), [S, b] = ae(0), [l, p] = ae(""), D = Array.from(e.widgetsCatalog.keys()).map((c) => ({
|
|
2689
|
+
widgetKey: c,
|
|
2690
|
+
metaData: yt(c, e.widgetsCatalog)
|
|
2691
|
+
})), h = !!e.targetContainerKey, y = (c) => {
|
|
2692
|
+
p(c.target.value);
|
|
2693
|
+
}, x = (c) => {
|
|
2694
|
+
const _ = l.trim().toLowerCase();
|
|
2695
|
+
return _.length < 1 ? !0 : c.name.trim().toLowerCase().includes(_) || c.description.toLowerCase().includes(_);
|
|
2696
|
+
}, E = (c) => {
|
|
2697
|
+
const _ = l.trim().toLowerCase();
|
|
2698
|
+
return _.length < 1 ? !0 : c.name.trim().toLowerCase().includes(_) || c.description.toLowerCase().includes(_);
|
|
2699
|
+
}, C = (c) => G(
|
|
2697
2700
|
"px-4 py-2 font-medium cursor-pointer border-b-2 border-transparent hover:border-primary focus:outline-none",
|
|
2698
|
-
|
|
2699
|
-
), w = (
|
|
2700
|
-
h ? e.addWidget(
|
|
2701
|
-
},
|
|
2702
|
-
const _ = (e.currentDashboardConfig.cssSettings || []).map((R) => R.key ===
|
|
2701
|
+
c === S ? "text-primary border-primary" : ""
|
|
2702
|
+
), w = (c) => {
|
|
2703
|
+
h ? e.addWidget(c, e.targetContainerKey) : e.addWidget(c);
|
|
2704
|
+
}, a = (c) => {
|
|
2705
|
+
const _ = (e.currentDashboardConfig.cssSettings || []).map((R) => R.key === c.key ? c : R);
|
|
2703
2706
|
e.onSettingItemsUpdated(_);
|
|
2704
|
-
}, [M,
|
|
2705
|
-
|
|
2707
|
+
}, [M, i] = ae(!1), u = (c) => {
|
|
2708
|
+
i(c);
|
|
2706
2709
|
};
|
|
2707
2710
|
return Ct(() => {
|
|
2708
2711
|
if (e.targetContainerKey) {
|
|
2709
2712
|
b(0);
|
|
2710
|
-
const
|
|
2711
|
-
|
|
2713
|
+
const c = nt(e.targetContainerKey);
|
|
2714
|
+
T(`Editing ${c}`);
|
|
2712
2715
|
} else
|
|
2713
|
-
|
|
2716
|
+
T("Editing Dashboard");
|
|
2714
2717
|
}, [e.targetContainerKey]), /* @__PURE__ */ t(
|
|
2715
2718
|
Xt,
|
|
2716
2719
|
{
|
|
@@ -2733,7 +2736,7 @@ function $r(e) {
|
|
|
2733
2736
|
"h2",
|
|
2734
2737
|
{
|
|
2735
2738
|
className: "flex-1 text-base margin-0 capitalize",
|
|
2736
|
-
title: h ? g : `Editing dashboard: ${
|
|
2739
|
+
title: h ? g : `Editing dashboard: ${s.dashboardName}`,
|
|
2737
2740
|
children: g
|
|
2738
2741
|
}
|
|
2739
2742
|
)
|
|
@@ -2749,7 +2752,7 @@ function $r(e) {
|
|
|
2749
2752
|
title: "Undo"
|
|
2750
2753
|
},
|
|
2751
2754
|
disabled: r.isUndoDisabled,
|
|
2752
|
-
onClick: () =>
|
|
2755
|
+
onClick: () => o("Undo"),
|
|
2753
2756
|
children: /* @__PURE__ */ t(Nt, { className: "size-5" })
|
|
2754
2757
|
}
|
|
2755
2758
|
),
|
|
@@ -2763,7 +2766,7 @@ function $r(e) {
|
|
|
2763
2766
|
title: "Redo"
|
|
2764
2767
|
},
|
|
2765
2768
|
disabled: r.isRedoDisabled,
|
|
2766
|
-
onClick: () =>
|
|
2769
|
+
onClick: () => o("Redo"),
|
|
2767
2770
|
children: /* @__PURE__ */ t(_t, { className: "size-5" })
|
|
2768
2771
|
}
|
|
2769
2772
|
),
|
|
@@ -2776,7 +2779,7 @@ function $r(e) {
|
|
|
2776
2779
|
placement: "bottom",
|
|
2777
2780
|
title: "Reset this dashboard to the default configuration"
|
|
2778
2781
|
},
|
|
2779
|
-
onClick:
|
|
2782
|
+
onClick: d,
|
|
2780
2783
|
children: /* @__PURE__ */ t(Et, { className: "size-5" })
|
|
2781
2784
|
}
|
|
2782
2785
|
)
|
|
@@ -2794,7 +2797,7 @@ function $r(e) {
|
|
|
2794
2797
|
label: "Filter...",
|
|
2795
2798
|
size: "small",
|
|
2796
2799
|
className: "w-full",
|
|
2797
|
-
value:
|
|
2800
|
+
value: l,
|
|
2798
2801
|
onChange: y
|
|
2799
2802
|
}
|
|
2800
2803
|
) }),
|
|
@@ -2806,47 +2809,47 @@ function $r(e) {
|
|
|
2806
2809
|
maxHeight: "360px"
|
|
2807
2810
|
},
|
|
2808
2811
|
children: [
|
|
2809
|
-
S === 0 &&
|
|
2810
|
-
(
|
|
2811
|
-
).map((
|
|
2812
|
+
S === 0 && D.filter(
|
|
2813
|
+
(c) => c.metaData.categories.includes("Widget") && x(c.metaData)
|
|
2814
|
+
).map((c) => /* @__PURE__ */ t(
|
|
2812
2815
|
Ie,
|
|
2813
2816
|
{
|
|
2814
|
-
widgetKey:
|
|
2815
|
-
metaData:
|
|
2816
|
-
alreadyAdded: Re(
|
|
2817
|
-
addWidget: () => w(
|
|
2817
|
+
widgetKey: c.widgetKey,
|
|
2818
|
+
metaData: c.metaData,
|
|
2819
|
+
alreadyAdded: Re(c.widgetKey, s),
|
|
2820
|
+
addWidget: () => w(c.widgetKey)
|
|
2818
2821
|
},
|
|
2819
|
-
|
|
2822
|
+
c.widgetKey
|
|
2820
2823
|
)),
|
|
2821
|
-
S === 1 &&
|
|
2822
|
-
(
|
|
2823
|
-
).map((
|
|
2824
|
+
S === 1 && D.filter(
|
|
2825
|
+
(c) => c.metaData.categories.includes("Chart") && x(c.metaData)
|
|
2826
|
+
).map((c) => /* @__PURE__ */ t(
|
|
2824
2827
|
Ie,
|
|
2825
2828
|
{
|
|
2826
|
-
widgetKey:
|
|
2827
|
-
metaData:
|
|
2828
|
-
alreadyAdded: Re(
|
|
2829
|
-
addWidget: () => w(
|
|
2829
|
+
widgetKey: c.widgetKey,
|
|
2830
|
+
metaData: c.metaData,
|
|
2831
|
+
alreadyAdded: Re(c.widgetKey, s),
|
|
2832
|
+
addWidget: () => w(c.widgetKey)
|
|
2830
2833
|
},
|
|
2831
|
-
|
|
2834
|
+
c.widgetKey
|
|
2832
2835
|
)),
|
|
2833
|
-
!h && S === 2 &&
|
|
2836
|
+
!h && S === 2 && D.filter((c) => c.metaData.categories.includes("Container")).map((c) => /* @__PURE__ */ t(
|
|
2834
2837
|
Ie,
|
|
2835
2838
|
{
|
|
2836
|
-
widgetKey:
|
|
2837
|
-
metaData:
|
|
2838
|
-
alreadyAdded: Re(
|
|
2839
|
-
addWidget: () =>
|
|
2839
|
+
widgetKey: c.widgetKey,
|
|
2840
|
+
metaData: c.metaData,
|
|
2841
|
+
alreadyAdded: Re(c.widgetKey, s),
|
|
2842
|
+
addWidget: () => n(c.widgetKey)
|
|
2840
2843
|
},
|
|
2841
|
-
|
|
2844
|
+
c.widgetKey
|
|
2842
2845
|
)),
|
|
2843
|
-
!h && S === 3 && (
|
|
2844
|
-
|
|
2846
|
+
!h && S === 3 && (s.cssSettings || []).filter(E).map((c) => /* @__PURE__ */ t(
|
|
2847
|
+
nr,
|
|
2845
2848
|
{
|
|
2846
|
-
item:
|
|
2847
|
-
onSettingItemChanged:
|
|
2849
|
+
item: c,
|
|
2850
|
+
onSettingItemChanged: a
|
|
2848
2851
|
},
|
|
2849
|
-
|
|
2852
|
+
c.key
|
|
2850
2853
|
))
|
|
2851
2854
|
]
|
|
2852
2855
|
}
|
|
@@ -2868,48 +2871,48 @@ function $r(e) {
|
|
|
2868
2871
|
);
|
|
2869
2872
|
}
|
|
2870
2873
|
export {
|
|
2871
|
-
|
|
2874
|
+
ur as AddIcon,
|
|
2872
2875
|
J as Button,
|
|
2873
2876
|
Rt as CircleQuestionMark,
|
|
2874
2877
|
It as CrosshairIcon,
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
+
Pr as DashboardGrid,
|
|
2879
|
+
Qt as DashboardWidgetBase,
|
|
2880
|
+
fr as DeleteIcon,
|
|
2878
2881
|
Xt as DraggablePanel,
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
+
rr as DynamicWidgetLoader,
|
|
2883
|
+
hr as EditIcon,
|
|
2884
|
+
mr as GridIcon,
|
|
2882
2885
|
Pt as HandGrabIcon,
|
|
2883
2886
|
Mt as HandIcon,
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2887
|
+
wr as ListItem,
|
|
2888
|
+
Sr as ListItemLeftChild,
|
|
2889
|
+
Dr as ListItemMiddleChild,
|
|
2890
|
+
Tr as ListItemRightChild,
|
|
2891
|
+
pr as MonitorIcon,
|
|
2892
|
+
yr as MonitorSmartphoneIcon,
|
|
2893
|
+
at as MoveLeftIcon,
|
|
2891
2894
|
st as MoveRightIcon,
|
|
2892
2895
|
_t as RedoIcon,
|
|
2893
|
-
|
|
2896
|
+
gr as RenameIcon,
|
|
2894
2897
|
Tt as SettingsIcon,
|
|
2895
2898
|
Ot as Stack,
|
|
2896
2899
|
K as SvgBaseWrapper,
|
|
2897
|
-
|
|
2898
|
-
|
|
2900
|
+
br as TabletSmartphoneIcon,
|
|
2901
|
+
Cr as TargetIcon,
|
|
2899
2902
|
ct as TextField,
|
|
2900
2903
|
Et as TimerResetIcon,
|
|
2901
2904
|
Nt as UndoIcon,
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2905
|
+
Ir as WidgetContainerColumn,
|
|
2906
|
+
Rr as WidgetContainerLarge,
|
|
2907
|
+
$r as WidgetContainerRow,
|
|
2908
|
+
Or as WidgetsCatalogFlyout,
|
|
2909
|
+
Nr as WrapperColumnContent,
|
|
2910
|
+
_r as WrapperColumnContentListItem,
|
|
2908
2911
|
lt as XCircleIcon,
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2912
|
+
vr as ZoomInIcon,
|
|
2913
|
+
xr as ZoomOutIcon,
|
|
2914
|
+
er as _isVersionCompatible,
|
|
2915
|
+
Mr as showToast,
|
|
2916
|
+
cr as useDashboardStore,
|
|
2917
|
+
dr as useDashboardUndoService
|
|
2915
2918
|
};
|