@tenorlab/react-dashboard 1.2.2 → 1.2.3
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.
|
@@ -81,7 +81,7 @@ const Nt = [
|
|
|
81
81
|
}
|
|
82
82
|
], Tt = ["rem", "pc", "cm", "in", "em", "vh", "vw", "%"], Et = (e, n) => Tt.includes(e) ? n : 1, _t = {
|
|
83
83
|
incrementOrDecrementValue: (e, n) => {
|
|
84
|
-
const t = e.value.match(/([\d.]+)/), r = t ? parseFloat(t[1]) : 0,
|
|
84
|
+
const t = e.value.match(/([\d.]+)/), r = t ? parseFloat(t[1]) : 0, o = e.value.match(/([^\d.]+)/), i = o ? o[1] : e.defaultUnit, a = Et(i, e.step) * n, b = `${Math.max(r + a, e.minValue).toFixed(1)}${i}`;
|
|
85
85
|
return {
|
|
86
86
|
...e,
|
|
87
87
|
value: b
|
|
@@ -97,9 +97,9 @@ const Nt = [
|
|
|
97
97
|
widgets: [],
|
|
98
98
|
childWidgetsConfig: [],
|
|
99
99
|
cssSettings: [...Nt]
|
|
100
|
-
}, Ae = 0.7,
|
|
100
|
+
}, Ae = 0.7, Fe = 1, Mt = 0.05, ct = (e) => {
|
|
101
101
|
let n = Number(e || 0);
|
|
102
|
-
return n < Ae && (n = Ae), n >
|
|
102
|
+
return n < Ae && (n = Ae), n > Fe && (n = Fe), n;
|
|
103
103
|
}, Pn = (e, n) => {
|
|
104
104
|
let t = Number(Number((Mt * n).toFixed(2)).toFixed(2)), r = Number((Number(e) + t).toFixed(2));
|
|
105
105
|
return ct(r);
|
|
@@ -110,11 +110,11 @@ const Nt = [
|
|
|
110
110
|
return n.widgets = n.widgets.filter((t) => {
|
|
111
111
|
if (`${t}`.includes("WidgetContainer")) {
|
|
112
112
|
const r = n.childWidgetsConfig.filter(
|
|
113
|
-
(
|
|
113
|
+
(o) => o.parentWidgetKey === t
|
|
114
114
|
);
|
|
115
115
|
if (!r || r.length === 0)
|
|
116
116
|
return n.widgets = n.widgets.filter(
|
|
117
|
-
(
|
|
117
|
+
(o) => o !== t
|
|
118
118
|
), !1;
|
|
119
119
|
}
|
|
120
120
|
return !0;
|
|
@@ -123,23 +123,23 @@ const Nt = [
|
|
|
123
123
|
const n = e.widgets.filter(
|
|
124
124
|
(r) => r.includes("WidgetContainer")
|
|
125
125
|
), t = {};
|
|
126
|
-
return n.forEach((r,
|
|
127
|
-
const d = `${r.split("_container")[0]}_container${
|
|
126
|
+
return n.forEach((r, o) => {
|
|
127
|
+
const d = `${r.split("_container")[0]}_container${o + 1}`;
|
|
128
128
|
t[r] = d;
|
|
129
129
|
}), e.widgets = e.widgets.map((r) => t[r] || r), e.childWidgetsConfig = e.childWidgetsConfig.map((r) => {
|
|
130
|
-
const
|
|
130
|
+
const o = r.parentWidgetKey, i = t[o];
|
|
131
131
|
return {
|
|
132
132
|
...r,
|
|
133
133
|
// If a new key exists, use it. If not, keep the original key.
|
|
134
|
-
parentWidgetKey:
|
|
134
|
+
parentWidgetKey: i || o
|
|
135
135
|
};
|
|
136
136
|
}), e;
|
|
137
137
|
}, ge = (e, n) => {
|
|
138
|
-
const t = `${e}`.includes("Container"), r = t ? ["Container"] : ["Widget"],
|
|
138
|
+
const t = `${e}`.includes("Container"), r = t ? ["Container"] : ["Widget"], o = n?.title || e, i = n?.description || (t ? "Container" : "Unknown");
|
|
139
139
|
return {
|
|
140
|
-
title:
|
|
140
|
+
title: o,
|
|
141
141
|
displayName: e,
|
|
142
|
-
description:
|
|
142
|
+
description: i,
|
|
143
143
|
categories: r,
|
|
144
144
|
noDuplicatedWidgets: !0,
|
|
145
145
|
icon: void 0,
|
|
@@ -176,26 +176,28 @@ const Nt = [
|
|
|
176
176
|
}
|
|
177
177
|
];
|
|
178
178
|
}, It = (e) => {
|
|
179
|
-
const n = e.match(/\/widget-([a-zA-Z0-
|
|
179
|
+
const n = e.match(/\/widget-([a-zA-Z0-9-]+)\/index\.ts$/);
|
|
180
180
|
if (n && n[1]) {
|
|
181
|
-
const t = n[1], r = t.split(
|
|
181
|
+
const t = n[1], r = t.split("-"), o = `Widget${r.map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join("")}`, i = r.map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ");
|
|
182
182
|
return {
|
|
183
|
-
key:
|
|
184
|
-
title:
|
|
183
|
+
key: o,
|
|
184
|
+
title: i,
|
|
185
185
|
folder: t
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
return null;
|
|
189
189
|
}, Ot = (e, n, t, r) => {
|
|
190
|
-
const
|
|
191
|
-
if (
|
|
192
|
-
return
|
|
190
|
+
const o = `${n}/widget-${t}/meta.ts`, i = e[o];
|
|
191
|
+
if (!i)
|
|
192
|
+
return;
|
|
193
|
+
const a = `${r}Meta`;
|
|
194
|
+
return i[a] || void 0;
|
|
193
195
|
}, In = async (e) => new Promise(async (n, t) => {
|
|
194
196
|
const r = [];
|
|
195
197
|
try {
|
|
196
|
-
const
|
|
197
|
-
for (const a in
|
|
198
|
-
const d =
|
|
198
|
+
const i = await (await fetch(`${e}?${Math.random()}`)).json();
|
|
199
|
+
for (const a in i) {
|
|
200
|
+
const d = i[a], b = () => import(
|
|
199
201
|
/* @vite-ignore */
|
|
200
202
|
d.url
|
|
201
203
|
), g = {
|
|
@@ -214,44 +216,45 @@ const Nt = [
|
|
|
214
216
|
message: "",
|
|
215
217
|
details: ""
|
|
216
218
|
});
|
|
217
|
-
} catch (
|
|
218
|
-
console.error("Remote plugin discovery failed:",
|
|
219
|
+
} catch (o) {
|
|
220
|
+
console.error("Remote plugin discovery failed:", o), t({
|
|
219
221
|
entries: [],
|
|
220
222
|
message: "Remote plugin discovery failed:",
|
|
221
|
-
details: typeof
|
|
223
|
+
details: typeof o == "object" ? JSON.stringify(o) : o
|
|
222
224
|
});
|
|
223
225
|
}
|
|
224
226
|
}), On = (e, n, t, r = !0) => {
|
|
225
|
-
const
|
|
226
|
-
for (const
|
|
227
|
-
const a = n[
|
|
227
|
+
const o = [];
|
|
228
|
+
for (const i in n) {
|
|
229
|
+
const a = n[i], d = It(i);
|
|
228
230
|
if (d && a) {
|
|
229
231
|
const { key: b, title: g, folder: h } = d;
|
|
230
232
|
let u = Ot(t, e, h, b);
|
|
231
233
|
if (u || (u = ge(b, {
|
|
232
234
|
title: g,
|
|
233
235
|
description: `Local ${r ? "dynamic" : "static"} widget`
|
|
234
|
-
})), r)
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
236
|
+
})), r)
|
|
237
|
+
o.push(
|
|
238
|
+
dt(b, a, u)
|
|
239
|
+
);
|
|
240
|
+
else {
|
|
241
|
+
const p = a.default || a;
|
|
242
|
+
o.push(Wt(b, p, u));
|
|
240
243
|
}
|
|
241
244
|
}
|
|
242
245
|
}
|
|
243
|
-
return
|
|
244
|
-
},
|
|
246
|
+
return o;
|
|
247
|
+
}, Le = (e) => {
|
|
245
248
|
let n;
|
|
246
249
|
const t = /* @__PURE__ */ new Set(), r = (g, h) => {
|
|
247
250
|
const u = typeof g == "function" ? g(n) : g;
|
|
248
251
|
if (!Object.is(u, n)) {
|
|
249
|
-
const
|
|
250
|
-
n = h ?? (typeof u != "object" || u === null) ? u : Object.assign({}, n, u), t.forEach((y) => y(n,
|
|
252
|
+
const p = n;
|
|
253
|
+
n = h ?? (typeof u != "object" || u === null) ? u : Object.assign({}, n, u), t.forEach((y) => y(n, p));
|
|
251
254
|
}
|
|
252
|
-
},
|
|
255
|
+
}, o = () => n, d = { setState: r, getState: o, getInitialState: () => b, subscribe: (g) => (t.add(g), () => t.delete(g)) }, b = n = e(r, o, d);
|
|
253
256
|
return d;
|
|
254
|
-
}, Rt = ((e) => e ?
|
|
257
|
+
}, Rt = ((e) => e ? Le(e) : Le), kt = (e) => e;
|
|
255
258
|
function jt(e, n = kt) {
|
|
256
259
|
const t = ae.useSyncExternalStore(
|
|
257
260
|
e.subscribe,
|
|
@@ -263,16 +266,16 @@ function jt(e, n = kt) {
|
|
|
263
266
|
const At = (e) => {
|
|
264
267
|
const n = Rt(e), t = (r) => jt(n, r);
|
|
265
268
|
return Object.assign(t, n), t;
|
|
266
|
-
},
|
|
269
|
+
}, Ft = ((e) => At), Lt = (e) => {
|
|
267
270
|
const n = e.widgets.filter((r) => r.includes("WidgetContainer")).map((r) => Number(r.split("_")[1].replace("container", "")));
|
|
268
271
|
return `container${n.length > 0 ? Math.max(...n) + 1 : 1}`;
|
|
269
272
|
}, Vt = (e, n) => {
|
|
270
|
-
const t =
|
|
273
|
+
const t = Lt(e);
|
|
271
274
|
return `${n}_${t}`;
|
|
272
275
|
}, Ut = (e) => {
|
|
273
|
-
const { dashboardConfig: n, widgetKey: t, parentWidgetKey: r, noDuplicatedWidgets:
|
|
276
|
+
const { dashboardConfig: n, widgetKey: t, parentWidgetKey: r, noDuplicatedWidgets: o } = e;
|
|
274
277
|
if (r) {
|
|
275
|
-
if (
|
|
278
|
+
if (o && n.childWidgetsConfig.find(
|
|
276
279
|
(a) => a.parentWidgetKey === r && a.widgetKey === t
|
|
277
280
|
))
|
|
278
281
|
return {
|
|
@@ -280,7 +283,7 @@ const At = (e) => {
|
|
|
280
283
|
message: `DashboardStore: addWidget: Widget already added (${t})`,
|
|
281
284
|
updatedDashboardConfig: n
|
|
282
285
|
};
|
|
283
|
-
const
|
|
286
|
+
const i = [
|
|
284
287
|
...n.childWidgetsConfig,
|
|
285
288
|
{ parentWidgetKey: r, widgetKey: t }
|
|
286
289
|
// new entry
|
|
@@ -289,22 +292,22 @@ const At = (e) => {
|
|
|
289
292
|
success: !0,
|
|
290
293
|
updatedDashboardConfig: {
|
|
291
294
|
...n,
|
|
292
|
-
childWidgetsConfig:
|
|
295
|
+
childWidgetsConfig: i
|
|
293
296
|
}
|
|
294
297
|
};
|
|
295
298
|
} else {
|
|
296
|
-
if (
|
|
299
|
+
if (o && n.widgets.includes(t))
|
|
297
300
|
return {
|
|
298
301
|
success: !1,
|
|
299
302
|
message: `DashboardStore: addWidget: Widget already added (${t})`,
|
|
300
303
|
updatedDashboardConfig: n
|
|
301
304
|
};
|
|
302
|
-
const
|
|
305
|
+
const i = [...n.widgets, t];
|
|
303
306
|
return {
|
|
304
307
|
success: !0,
|
|
305
308
|
updatedDashboardConfig: {
|
|
306
309
|
...n,
|
|
307
|
-
widgets:
|
|
310
|
+
widgets: i
|
|
308
311
|
}
|
|
309
312
|
};
|
|
310
313
|
}
|
|
@@ -312,64 +315,64 @@ const At = (e) => {
|
|
|
312
315
|
if ((t || "").trim().length > 0) {
|
|
313
316
|
const r = e.childWidgetsConfig.filter(
|
|
314
317
|
(b) => b.parentWidgetKey !== t
|
|
315
|
-
),
|
|
318
|
+
), o = e.childWidgetsConfig.filter(
|
|
316
319
|
(b) => b.parentWidgetKey === t && b.widgetKey !== n
|
|
317
|
-
),
|
|
320
|
+
), i = [...r, ...o];
|
|
318
321
|
let a = {
|
|
319
322
|
...e,
|
|
320
|
-
childWidgetsConfig:
|
|
323
|
+
childWidgetsConfig: i
|
|
321
324
|
};
|
|
322
325
|
return `${n}`.includes("Container") && (a = Pt(a)), {
|
|
323
326
|
success: !0,
|
|
324
327
|
updatedDashboardConfig: a
|
|
325
328
|
};
|
|
326
329
|
} else {
|
|
327
|
-
const r = e.widgets.filter((
|
|
328
|
-
(
|
|
330
|
+
const r = e.widgets.filter((i) => i !== n), o = e.childWidgetsConfig.filter(
|
|
331
|
+
(i) => i.parentWidgetKey !== n
|
|
329
332
|
);
|
|
330
333
|
return {
|
|
331
334
|
success: !0,
|
|
332
335
|
updatedDashboardConfig: {
|
|
333
336
|
...e,
|
|
334
337
|
widgets: r,
|
|
335
|
-
childWidgetsConfig:
|
|
338
|
+
childWidgetsConfig: o
|
|
336
339
|
}
|
|
337
340
|
};
|
|
338
341
|
}
|
|
339
342
|
}, Yt = (e, n, t, r) => {
|
|
340
343
|
if ((r || "").trim().length > 0) {
|
|
341
|
-
const
|
|
344
|
+
const o = e.childWidgetsConfig.filter(
|
|
342
345
|
(h) => h.parentWidgetKey !== r
|
|
343
346
|
);
|
|
344
|
-
let
|
|
347
|
+
let i = e.childWidgetsConfig.filter(
|
|
345
348
|
(h) => h.parentWidgetKey === r
|
|
346
349
|
);
|
|
347
|
-
const a =
|
|
350
|
+
const a = i.indexOf(t);
|
|
348
351
|
let d = a + n;
|
|
349
|
-
if (d = Math.max(0, d), d = Math.min(
|
|
352
|
+
if (d = Math.max(0, d), d = Math.min(i.length - 1, d), d === a)
|
|
350
353
|
return {
|
|
351
354
|
success: !1,
|
|
352
355
|
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
353
356
|
updatedDashboardConfig: e
|
|
354
357
|
};
|
|
355
|
-
const b = [...
|
|
358
|
+
const b = [...i], [g] = b.splice(a, 1);
|
|
356
359
|
return b.splice(d, 0, g), {
|
|
357
360
|
success: !0,
|
|
358
361
|
updatedDashboardConfig: {
|
|
359
362
|
...e,
|
|
360
|
-
childWidgetsConfig: [...
|
|
363
|
+
childWidgetsConfig: [...o, ...b]
|
|
361
364
|
}
|
|
362
365
|
};
|
|
363
366
|
} else {
|
|
364
|
-
const
|
|
365
|
-
let a =
|
|
366
|
-
if (a = Math.max(0, a), a = Math.min(
|
|
367
|
+
const o = e.widgets || [], i = o.indexOf(t);
|
|
368
|
+
let a = i + n;
|
|
369
|
+
if (a = Math.max(0, a), a = Math.min(o.length - 1, a), a === i)
|
|
367
370
|
return {
|
|
368
371
|
success: !1,
|
|
369
372
|
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
370
373
|
updatedDashboardConfig: e
|
|
371
374
|
};
|
|
372
|
-
const d = [...
|
|
375
|
+
const d = [...o], [b] = d.splice(i, 1);
|
|
373
376
|
return d.splice(a, 0, b), {
|
|
374
377
|
success: !0,
|
|
375
378
|
updatedDashboardConfig: {
|
|
@@ -393,79 +396,79 @@ const At = (e) => {
|
|
|
393
396
|
setTargetContainerKey: (t) => (e(() => ({ targetContainerKey: t })), t),
|
|
394
397
|
setAllDashboardConfigs: (t) => (e(() => ({ allDashboardConfigs: t })), n().allDashboardConfigs),
|
|
395
398
|
setCurrentDashboardConfig: (t) => {
|
|
396
|
-
const r = n(),
|
|
397
|
-
...r.allDashboardConfigs.filter((
|
|
399
|
+
const r = n(), o = [
|
|
400
|
+
...r.allDashboardConfigs.filter((i) => i.dashboardId !== t.dashboardId),
|
|
398
401
|
t
|
|
399
402
|
];
|
|
400
403
|
return e(() => ({
|
|
401
404
|
...r,
|
|
402
|
-
allDashboardConfigs:
|
|
405
|
+
allDashboardConfigs: o,
|
|
403
406
|
currentDashboardConfig: t
|
|
404
|
-
})),
|
|
407
|
+
})), o;
|
|
405
408
|
},
|
|
406
409
|
addDashboardConfig: (t) => {
|
|
407
|
-
const r = n(),
|
|
408
|
-
...r.allDashboardConfigs.filter((
|
|
410
|
+
const r = n(), o = [
|
|
411
|
+
...r.allDashboardConfigs.filter((i) => i.dashboardId !== t.dashboardId),
|
|
409
412
|
t
|
|
410
413
|
];
|
|
411
414
|
return e(() => ({
|
|
412
415
|
...r,
|
|
413
|
-
allDashboardConfigs:
|
|
416
|
+
allDashboardConfigs: o,
|
|
414
417
|
currentDashboardConfig: t
|
|
415
|
-
})),
|
|
418
|
+
})), o;
|
|
416
419
|
},
|
|
417
420
|
deleteDashboardConfigById: (t) => {
|
|
418
|
-
const r = n(),
|
|
421
|
+
const r = n(), o = [...r.allDashboardConfigs.filter((i) => i.dashboardId !== t)];
|
|
419
422
|
return e(() => ({
|
|
420
423
|
...r,
|
|
421
|
-
allDashboardConfigs:
|
|
422
|
-
currentDashboardConfig:
|
|
423
|
-
})),
|
|
424
|
+
allDashboardConfigs: o,
|
|
425
|
+
currentDashboardConfig: o[0] || Ce
|
|
426
|
+
})), o;
|
|
424
427
|
},
|
|
425
428
|
selectDashboardById: (t) => (e(() => {
|
|
426
|
-
const r = n(),
|
|
427
|
-
return
|
|
428
|
-
currentDashboardConfig:
|
|
429
|
+
const r = n(), o = r.allDashboardConfigs.find((i) => i.dashboardId === t);
|
|
430
|
+
return o ? {
|
|
431
|
+
currentDashboardConfig: o
|
|
429
432
|
} : {
|
|
430
433
|
...r
|
|
431
434
|
};
|
|
432
435
|
}), n().currentDashboardConfig),
|
|
433
436
|
addWidget: (t) => {
|
|
434
|
-
const r = n(),
|
|
437
|
+
const r = n(), o = Ut({
|
|
435
438
|
dashboardConfig: r.currentDashboardConfig,
|
|
436
439
|
...t
|
|
437
|
-
}),
|
|
440
|
+
}), i = [
|
|
438
441
|
...r.allDashboardConfigs.filter(
|
|
439
|
-
(a) => a.dashboardId !==
|
|
442
|
+
(a) => a.dashboardId !== o.updatedDashboardConfig.dashboardId
|
|
440
443
|
),
|
|
441
|
-
|
|
444
|
+
o.updatedDashboardConfig
|
|
442
445
|
];
|
|
443
|
-
return
|
|
444
|
-
allDashboardConfigs:
|
|
445
|
-
currentDashboardConfig:
|
|
446
|
+
return o.success && e(() => ({
|
|
447
|
+
allDashboardConfigs: i,
|
|
448
|
+
currentDashboardConfig: o.updatedDashboardConfig
|
|
446
449
|
})), {
|
|
447
|
-
...
|
|
448
|
-
allUpdatedDashboardConfigs:
|
|
450
|
+
...o,
|
|
451
|
+
allUpdatedDashboardConfigs: i
|
|
449
452
|
};
|
|
450
453
|
},
|
|
451
454
|
removeWidget: (t, r) => {
|
|
452
|
-
const
|
|
453
|
-
...
|
|
454
|
-
(d) => d.dashboardId !==
|
|
455
|
+
const o = n(), i = qt(o.currentDashboardConfig, t, r), a = [
|
|
456
|
+
...o.allDashboardConfigs.filter(
|
|
457
|
+
(d) => d.dashboardId !== i.updatedDashboardConfig.dashboardId
|
|
455
458
|
),
|
|
456
|
-
|
|
459
|
+
i.updatedDashboardConfig
|
|
457
460
|
];
|
|
458
|
-
return
|
|
461
|
+
return i.success && e(() => ({
|
|
459
462
|
allDashboardConfigs: a,
|
|
460
|
-
currentDashboardConfig:
|
|
463
|
+
currentDashboardConfig: i.updatedDashboardConfig
|
|
461
464
|
})), {
|
|
462
|
-
...
|
|
465
|
+
...i,
|
|
463
466
|
allUpdatedDashboardConfigs: a
|
|
464
467
|
};
|
|
465
468
|
},
|
|
466
|
-
moveWidget: (t, r,
|
|
467
|
-
const
|
|
468
|
-
...
|
|
469
|
+
moveWidget: (t, r, o) => {
|
|
470
|
+
const i = n(), a = Yt(i.currentDashboardConfig, t, r, o), d = [
|
|
471
|
+
...i.allDashboardConfigs.filter(
|
|
469
472
|
(b) => b.dashboardId !== a.updatedDashboardConfig.dashboardId
|
|
470
473
|
),
|
|
471
474
|
a.updatedDashboardConfig
|
|
@@ -478,14 +481,14 @@ const At = (e) => {
|
|
|
478
481
|
allUpdatedDashboardConfigs: d
|
|
479
482
|
};
|
|
480
483
|
}
|
|
481
|
-
}), Rn =
|
|
484
|
+
}), Rn = Ft()((...e) => ({
|
|
482
485
|
...zt(...e)
|
|
483
486
|
})), ut = (e, n) => `dashboards_${n}_${e}`, Bt = async (e, n, t, r) => {
|
|
484
|
-
const
|
|
485
|
-
if (
|
|
487
|
+
const o = localStorage.getItem(ut(e, n));
|
|
488
|
+
if (o)
|
|
486
489
|
try {
|
|
487
|
-
const
|
|
488
|
-
return
|
|
490
|
+
const i = JSON.parse(o);
|
|
491
|
+
return i.length < 1 ? [r] : (i.forEach((a) => {
|
|
489
492
|
a.dashboardId || (a.dashboardId = "default"), a.dashboardName || (a.dashboardName = `Dashboard ${a.dashboardId}`), a.responsiveGrid = a.responsiveGrid ?? !1, (a.widgets || []).length < 1 && (a.widgets = r.widgets);
|
|
490
493
|
const d = (a.cssSettings || []).filter(
|
|
491
494
|
(b) => r.cssSettings.some((g) => g.key === b.key)
|
|
@@ -512,30 +515,30 @@ const At = (e) => {
|
|
|
512
515
|
), a.childWidgetsConfig = a.childWidgetsConfig.filter(
|
|
513
516
|
(b) => t.has(b.widgetKey)
|
|
514
517
|
), a.zoomScale ? a.zoomScale < 0.7 && (a.zoomScale = 0.7) : a.zoomScale = 1;
|
|
515
|
-
}),
|
|
516
|
-
} catch (
|
|
517
|
-
console.warn("Error parsing saved dashboard config:",
|
|
518
|
+
}), i);
|
|
519
|
+
} catch (i) {
|
|
520
|
+
console.warn("Error parsing saved dashboard config:", i);
|
|
518
521
|
}
|
|
519
522
|
return [r];
|
|
520
523
|
}, Ht = async (e, n, t, r) => {
|
|
521
|
-
t.forEach((
|
|
522
|
-
if (
|
|
524
|
+
t.forEach((i) => {
|
|
525
|
+
if (i.userID = e, i.clientAppKey = n, i.responsiveGrid = i.responsiveGrid ?? !1, typeof i != "object")
|
|
523
526
|
throw new Error("Invalid dashboard configuration");
|
|
524
|
-
|
|
527
|
+
i.widgets = i.widgets.filter(
|
|
525
528
|
(a) => a.includes("WidgetContainer") || r.has(a)
|
|
526
|
-
),
|
|
529
|
+
), i.childWidgetsConfig = i.childWidgetsConfig.filter(
|
|
527
530
|
(a) => r.has(a.widgetKey)
|
|
528
|
-
),
|
|
531
|
+
), i.zoomScale ? i.zoomScale < 0.7 && (i.zoomScale = 0.7) : i.zoomScale = 1;
|
|
529
532
|
});
|
|
530
|
-
const
|
|
531
|
-
return localStorage.setItem(ut(e, n),
|
|
533
|
+
const o = JSON.stringify(t);
|
|
534
|
+
return localStorage.setItem(ut(e, n), o), !0;
|
|
532
535
|
}, Kt = {
|
|
533
536
|
getSavedDashboards: Bt,
|
|
534
537
|
saveDashboards: Ht
|
|
535
538
|
}, kn = () => Kt, jn = () => {
|
|
536
|
-
const [e, n] = le({}), [t, r] = le({}),
|
|
539
|
+
const [e, n] = le({}), [t, r] = le({}), o = ue((h) => {
|
|
537
540
|
const u = h.dashboardId;
|
|
538
|
-
n((
|
|
541
|
+
n((p) => {
|
|
539
542
|
const y = {
|
|
540
543
|
undoIndex: 0,
|
|
541
544
|
config: h
|
|
@@ -544,26 +547,26 @@ const At = (e) => {
|
|
|
544
547
|
...D,
|
|
545
548
|
[u]: 0
|
|
546
549
|
})), {
|
|
547
|
-
...
|
|
550
|
+
...p,
|
|
548
551
|
[u]: [y]
|
|
549
552
|
// Forces a reset to just this one entry
|
|
550
553
|
};
|
|
551
554
|
});
|
|
552
|
-
}, []),
|
|
555
|
+
}, []), i = ue(
|
|
553
556
|
(h) => {
|
|
554
557
|
n((u) => {
|
|
555
|
-
const
|
|
556
|
-
undoIndex:
|
|
558
|
+
const p = h.dashboardId, y = u[p] || [], D = t[p] ?? -1, m = y.slice(0, D + 1), v = {
|
|
559
|
+
undoIndex: m.length,
|
|
557
560
|
// New index based on trimmed length
|
|
558
561
|
config: h
|
|
559
|
-
}, w = [...
|
|
562
|
+
}, w = [...m, v];
|
|
560
563
|
return r((N) => ({
|
|
561
564
|
...N,
|
|
562
|
-
[
|
|
565
|
+
[p]: w.length - 1
|
|
563
566
|
// Index is now the last element's index
|
|
564
567
|
})), {
|
|
565
568
|
...u,
|
|
566
|
-
[
|
|
569
|
+
[p]: w
|
|
567
570
|
};
|
|
568
571
|
});
|
|
569
572
|
},
|
|
@@ -572,17 +575,17 @@ const At = (e) => {
|
|
|
572
575
|
n((u) => {
|
|
573
576
|
if (!u[h])
|
|
574
577
|
return u;
|
|
575
|
-
const { [h]:
|
|
578
|
+
const { [h]: p, ...y } = u;
|
|
576
579
|
return y;
|
|
577
580
|
}), r((u) => {
|
|
578
|
-
const { [h]:
|
|
581
|
+
const { [h]: p, ...y } = u;
|
|
579
582
|
return y;
|
|
580
583
|
});
|
|
581
584
|
}, []), d = ue(
|
|
582
585
|
(h) => {
|
|
583
586
|
r((u) => {
|
|
584
|
-
const
|
|
585
|
-
return y !==
|
|
587
|
+
const p = u[h] ?? -1, y = Math.max(0, p - 1);
|
|
588
|
+
return y !== p ? { ...u, [h]: y } : u;
|
|
586
589
|
});
|
|
587
590
|
},
|
|
588
591
|
[
|
|
@@ -591,7 +594,7 @@ const At = (e) => {
|
|
|
591
594
|
), b = ue(
|
|
592
595
|
(h) => {
|
|
593
596
|
r((u) => {
|
|
594
|
-
const
|
|
597
|
+
const p = e[h]?.length || 0, y = u[h] ?? -1, D = Math.min(p - 1, y + 1);
|
|
595
598
|
return D !== y ? { ...u, [h]: D } : u;
|
|
596
599
|
});
|
|
597
600
|
},
|
|
@@ -601,14 +604,14 @@ const At = (e) => {
|
|
|
601
604
|
]
|
|
602
605
|
);
|
|
603
606
|
return {
|
|
604
|
-
initializeHistoryForDashboard:
|
|
607
|
+
initializeHistoryForDashboard: o,
|
|
605
608
|
resetAllHistory: () => n({}),
|
|
606
|
-
addUndoEntry:
|
|
609
|
+
addUndoEntry: i,
|
|
607
610
|
removeUndoHistoryForDashboard: a,
|
|
608
611
|
undo: d,
|
|
609
612
|
redo: b,
|
|
610
613
|
getUndoStatus: (h) => {
|
|
611
|
-
const u = t[h] ?? -1,
|
|
614
|
+
const u = t[h] ?? -1, p = e[h]?.length || 0, y = u <= 0, D = u >= p - 1;
|
|
612
615
|
return { isUndoDisabled: y, isRedoDisabled: D };
|
|
613
616
|
},
|
|
614
617
|
undoHistory: e,
|
|
@@ -644,7 +647,7 @@ function An({ className: e }) {
|
|
|
644
647
|
/* @__PURE__ */ s("path", { d: "M12 8v8" })
|
|
645
648
|
] });
|
|
646
649
|
}
|
|
647
|
-
function
|
|
650
|
+
function Fn({ className: e }) {
|
|
648
651
|
return /* @__PURE__ */ W(H, { className: `lucide lucide-trash2-icon lucide-trash-2 ${e}`, children: [
|
|
649
652
|
/* @__PURE__ */ s("path", { d: "M10 11v6" }),
|
|
650
653
|
/* @__PURE__ */ s("path", { d: "M14 11v6" }),
|
|
@@ -653,7 +656,7 @@ function Ln({ className: e }) {
|
|
|
653
656
|
/* @__PURE__ */ s("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
654
657
|
] });
|
|
655
658
|
}
|
|
656
|
-
function
|
|
659
|
+
function Ln({ className: e }) {
|
|
657
660
|
return /* @__PURE__ */ W(H, { className: `lucide lucide-square-pen-icon lucide-square-pen ${e}`, children: [
|
|
658
661
|
/* @__PURE__ */ s("path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
659
662
|
/* @__PURE__ */ s("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" })
|
|
@@ -828,7 +831,7 @@ const G = (e, ...n) => [
|
|
|
828
831
|
].join(" ").trim(), re = (e, n = "color") => {
|
|
829
832
|
if (typeof window > "u") return "#FFFFFF";
|
|
830
833
|
const t = document.createElement("div");
|
|
831
|
-
Array.isArray(e) ? e.forEach((
|
|
834
|
+
Array.isArray(e) ? e.forEach((o) => t.classList.add(o)) : e.split(" ").forEach((o) => t.classList.add(o)), t.style.display = "none", document.body.appendChild(t);
|
|
832
835
|
const r = window.getComputedStyle(t)[n];
|
|
833
836
|
return document.body.removeChild(t), r;
|
|
834
837
|
}, Kn = {
|
|
@@ -863,8 +866,8 @@ const G = (e, ...n) => [
|
|
|
863
866
|
className: n,
|
|
864
867
|
size: t = "medium",
|
|
865
868
|
value: r,
|
|
866
|
-
onChange:
|
|
867
|
-
onKeyDown:
|
|
869
|
+
onChange: o,
|
|
870
|
+
onKeyDown: i,
|
|
868
871
|
placeholder: a = ""
|
|
869
872
|
}) => {
|
|
870
873
|
const d = st(() => t === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [t]), b = G("flex flex-col mb-4", n || ""), h = `${G(`
|
|
@@ -882,8 +885,8 @@ const G = (e, ...n) => [
|
|
|
882
885
|
id: e,
|
|
883
886
|
type: "text",
|
|
884
887
|
value: r,
|
|
885
|
-
onChange:
|
|
886
|
-
onKeyDown: (u) =>
|
|
888
|
+
onChange: o,
|
|
889
|
+
onKeyDown: (u) => i && i(u),
|
|
887
890
|
placeholder: a,
|
|
888
891
|
className: h,
|
|
889
892
|
"aria-label": e
|
|
@@ -905,15 +908,15 @@ function J(e) {
|
|
|
905
908
|
tooltip: n,
|
|
906
909
|
disabled: t,
|
|
907
910
|
isIconButton: r,
|
|
908
|
-
className:
|
|
909
|
-
buttonType:
|
|
911
|
+
className: o,
|
|
912
|
+
buttonType: i,
|
|
910
913
|
category: a,
|
|
911
914
|
px: d,
|
|
912
915
|
py: b,
|
|
913
916
|
children: g,
|
|
914
917
|
...h
|
|
915
918
|
} = e, u = () => {
|
|
916
|
-
const y = e.isIconButton || !1, D = e.category || "primary",
|
|
919
|
+
const y = e.isIconButton || !1, D = e.category || "primary", m = e.buttonType || "normal", v = e.disabled || !1, w = e.className || "", N = e.font || "semibold", C = Number((e.border || 0) > 0 ? e.border : 0);
|
|
917
920
|
let S = (e.borderColor || "").trim();
|
|
918
921
|
S = S.length > 0 ? S : "";
|
|
919
922
|
const c = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), E = e.shadow || "sm", l = e.shadowHover || "md", f = (e.addCss || "").trim(), M = e.justifyCss || "justify-center";
|
|
@@ -931,36 +934,36 @@ function J(e) {
|
|
|
931
934
|
`font-${N}`
|
|
932
935
|
];
|
|
933
936
|
if (v)
|
|
934
|
-
|
|
937
|
+
m === "ghost" ? $.push("text-disabled border-disabled cursor-not-allowed") : $.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
|
|
935
938
|
else {
|
|
936
939
|
$.push("cursor-pointer");
|
|
937
940
|
let I = "";
|
|
938
|
-
Se.has(
|
|
941
|
+
Se.has(m) ? I = `${Se.get(m)}` : I = `${Se.get("normal")}`, C < 1 && (I = I.replace("border-[category]", ""));
|
|
939
942
|
const T = I.replace(/\[category\]/g, D).trim();
|
|
940
943
|
$.push(T);
|
|
941
944
|
}
|
|
942
945
|
return C > 0 ? ($.push(`border-[${C}px]`), $.push(`border-${S}`)) : ($.push("border-[1px]"), $.push("border-transparent")), c > 0 ? ($.push(`hover:border-[${c}px] group-hover:border-[${c}px]`), $.push(`hover:border-${S} group-hover:border-${S}`)) : $.push("hover:border-[1px] group-hover:border-[1px]"), $.push(`shadow-${E}`), $.push(`hover:shadow-${l} group-hover:shadow-${l}`), f.length > 0 && $.push(f), f.indexOf("hidden") === -1 && $.push("inline-flex"), $.push(M), $.join(" ").trim();
|
|
943
|
-
},
|
|
946
|
+
}, p = () => {
|
|
944
947
|
const y = e.px || 0.7, D = e.py || 0.25;
|
|
945
948
|
return {
|
|
946
949
|
padding: r ? 0 : `${D}rem ${y}rem `
|
|
947
950
|
};
|
|
948
951
|
};
|
|
949
|
-
return /* @__PURE__ */ s("button", { type: "button", disabled: t, className: u(), style:
|
|
952
|
+
return /* @__PURE__ */ s("button", { type: "button", disabled: t, className: u(), style: p(), ...h, children: g });
|
|
950
953
|
}
|
|
951
954
|
const rn = (e) => e.direction === "row" ? G("flex flex-row items-center gap-2", e.classNames || "") : G("flex flex-col gap-2 w-full", e.classNames || "");
|
|
952
955
|
function on(e) {
|
|
953
|
-
const { children: n, testId: t, classNames: r, direction:
|
|
954
|
-
return /* @__PURE__ */ s("div", { "data-testid": t || "not-set", className: a, ...
|
|
956
|
+
const { children: n, testId: t, classNames: r, direction: o, ...i } = e, a = rn(e);
|
|
957
|
+
return /* @__PURE__ */ s("div", { "data-testid": t || "not-set", className: a, ...i, children: n });
|
|
955
958
|
}
|
|
956
959
|
const Gn = ce(
|
|
957
960
|
(e, n) => {
|
|
958
|
-
const { classNames: t, innerClass: r, ...
|
|
961
|
+
const { classNames: t, innerClass: r, ...o } = e, i = G(t || "", "w-full"), a = G(
|
|
959
962
|
`w-full flex overflow-hidden justify-between items-center gap-0
|
|
960
963
|
rounded-md border`,
|
|
961
964
|
r || ""
|
|
962
965
|
);
|
|
963
|
-
return /* @__PURE__ */ s(on, { direction: "row", classNames:
|
|
966
|
+
return /* @__PURE__ */ s(on, { direction: "row", classNames: i, ...o, children: /* @__PURE__ */ s("div", { className: a, children: e.children }) });
|
|
964
967
|
}
|
|
965
968
|
), Zn = ce((e, n) => /* @__PURE__ */ s(
|
|
966
969
|
"div",
|
|
@@ -1002,7 +1005,7 @@ var Ve;
|
|
|
1002
1005
|
function sn() {
|
|
1003
1006
|
if (Ve) return U;
|
|
1004
1007
|
Ve = 1;
|
|
1005
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107,
|
|
1008
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, m = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, N = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1006
1009
|
function C(c) {
|
|
1007
1010
|
if (typeof c == "object" && c !== null) {
|
|
1008
1011
|
var E = c.$$typeof;
|
|
@@ -1012,8 +1015,8 @@ function sn() {
|
|
|
1012
1015
|
case b:
|
|
1013
1016
|
case g:
|
|
1014
1017
|
case r:
|
|
1015
|
-
case o:
|
|
1016
1018
|
case i:
|
|
1019
|
+
case o:
|
|
1017
1020
|
case u:
|
|
1018
1021
|
return c;
|
|
1019
1022
|
default:
|
|
@@ -1036,7 +1039,7 @@ function sn() {
|
|
|
1036
1039
|
function S(c) {
|
|
1037
1040
|
return C(c) === g;
|
|
1038
1041
|
}
|
|
1039
|
-
return U.AsyncMode = b, U.ConcurrentMode = g, U.ContextConsumer = d, U.ContextProvider = a, U.Element = n, U.ForwardRef = h, U.Fragment = r, U.Lazy = D, U.Memo = y, U.Portal = t, U.Profiler =
|
|
1042
|
+
return U.AsyncMode = b, U.ConcurrentMode = g, U.ContextConsumer = d, U.ContextProvider = a, U.Element = n, U.ForwardRef = h, U.Fragment = r, U.Lazy = D, U.Memo = y, U.Portal = t, U.Profiler = i, U.StrictMode = o, U.Suspense = u, U.isAsyncMode = function(c) {
|
|
1040
1043
|
return S(c) || C(c) === b;
|
|
1041
1044
|
}, U.isConcurrentMode = S, U.isContextConsumer = function(c) {
|
|
1042
1045
|
return C(c) === d;
|
|
@@ -1055,23 +1058,23 @@ function sn() {
|
|
|
1055
1058
|
}, U.isPortal = function(c) {
|
|
1056
1059
|
return C(c) === t;
|
|
1057
1060
|
}, U.isProfiler = function(c) {
|
|
1058
|
-
return C(c) === o;
|
|
1059
|
-
}, U.isStrictMode = function(c) {
|
|
1060
1061
|
return C(c) === i;
|
|
1062
|
+
}, U.isStrictMode = function(c) {
|
|
1063
|
+
return C(c) === o;
|
|
1061
1064
|
}, U.isSuspense = function(c) {
|
|
1062
1065
|
return C(c) === u;
|
|
1063
1066
|
}, U.isValidElementType = function(c) {
|
|
1064
|
-
return typeof c == "string" || typeof c == "function" || c === r || c === g || c ===
|
|
1067
|
+
return typeof c == "string" || typeof c == "function" || c === r || c === g || c === i || c === o || c === u || c === p || typeof c == "object" && c !== null && (c.$$typeof === D || c.$$typeof === y || c.$$typeof === a || c.$$typeof === d || c.$$typeof === h || c.$$typeof === v || c.$$typeof === w || c.$$typeof === N || c.$$typeof === m);
|
|
1065
1068
|
}, U.typeOf = C, U;
|
|
1066
1069
|
}
|
|
1067
1070
|
var q = {};
|
|
1068
1071
|
var Ue;
|
|
1069
1072
|
function ln() {
|
|
1070
1073
|
return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
1071
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107,
|
|
1074
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, m = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, N = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1072
1075
|
function C(_) {
|
|
1073
1076
|
return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1074
|
-
_ === r || _ === g || _ ===
|
|
1077
|
+
_ === r || _ === g || _ === i || _ === o || _ === u || _ === p || typeof _ == "object" && _ !== null && (_.$$typeof === D || _.$$typeof === y || _.$$typeof === a || _.$$typeof === d || _.$$typeof === h || _.$$typeof === v || _.$$typeof === w || _.$$typeof === N || _.$$typeof === m);
|
|
1075
1078
|
}
|
|
1076
1079
|
function S(_) {
|
|
1077
1080
|
if (typeof _ == "object" && _ !== null) {
|
|
@@ -1083,8 +1086,8 @@ function ln() {
|
|
|
1083
1086
|
case b:
|
|
1084
1087
|
case g:
|
|
1085
1088
|
case r:
|
|
1086
|
-
case o:
|
|
1087
1089
|
case i:
|
|
1090
|
+
case o:
|
|
1088
1091
|
case u:
|
|
1089
1092
|
return me;
|
|
1090
1093
|
default:
|
|
@@ -1105,7 +1108,7 @@ function ln() {
|
|
|
1105
1108
|
}
|
|
1106
1109
|
}
|
|
1107
1110
|
}
|
|
1108
|
-
var c = b, E = g, l = d, f = a, M = n, $ = h, I = r, T = D, z = y, X = t, Q =
|
|
1111
|
+
var c = b, E = g, l = d, f = a, M = n, $ = h, I = r, T = D, z = y, X = t, Q = i, K = o, ee = u, se = !1;
|
|
1109
1112
|
function de(_) {
|
|
1110
1113
|
return se || (se = !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.")), x(_) || S(_) === b;
|
|
1111
1114
|
}
|
|
@@ -1124,7 +1127,7 @@ function ln() {
|
|
|
1124
1127
|
function O(_) {
|
|
1125
1128
|
return S(_) === h;
|
|
1126
1129
|
}
|
|
1127
|
-
function
|
|
1130
|
+
function F(_) {
|
|
1128
1131
|
return S(_) === r;
|
|
1129
1132
|
}
|
|
1130
1133
|
function R(_) {
|
|
@@ -1133,19 +1136,19 @@ function ln() {
|
|
|
1133
1136
|
function j(_) {
|
|
1134
1137
|
return S(_) === y;
|
|
1135
1138
|
}
|
|
1136
|
-
function
|
|
1139
|
+
function L(_) {
|
|
1137
1140
|
return S(_) === t;
|
|
1138
1141
|
}
|
|
1139
1142
|
function Y(_) {
|
|
1140
|
-
return S(_) ===
|
|
1143
|
+
return S(_) === i;
|
|
1141
1144
|
}
|
|
1142
1145
|
function V(_) {
|
|
1143
|
-
return S(_) ===
|
|
1146
|
+
return S(_) === o;
|
|
1144
1147
|
}
|
|
1145
1148
|
function Z(_) {
|
|
1146
1149
|
return S(_) === u;
|
|
1147
1150
|
}
|
|
1148
|
-
q.AsyncMode = c, q.ConcurrentMode = E, q.ContextConsumer = l, q.ContextProvider = f, q.Element = M, q.ForwardRef = $, q.Fragment = I, q.Lazy = T, q.Memo = z, q.Portal = X, q.Profiler = Q, q.StrictMode = K, q.Suspense = ee, q.isAsyncMode = de, q.isConcurrentMode = x, q.isContextConsumer = P, q.isContextProvider = A, q.isElement = k, q.isForwardRef = O, q.isFragment =
|
|
1151
|
+
q.AsyncMode = c, q.ConcurrentMode = E, q.ContextConsumer = l, q.ContextProvider = f, q.Element = M, q.ForwardRef = $, q.Fragment = I, q.Lazy = T, q.Memo = z, q.Portal = X, q.Profiler = Q, q.StrictMode = K, q.Suspense = ee, q.isAsyncMode = de, q.isConcurrentMode = x, q.isContextConsumer = P, q.isContextProvider = A, q.isElement = k, q.isForwardRef = O, q.isFragment = F, q.isLazy = R, q.isMemo = j, q.isPortal = L, q.isProfiler = Y, q.isStrictMode = V, q.isSuspense = Z, q.isValidElementType = C, q.typeOf = S;
|
|
1149
1152
|
})()), q;
|
|
1150
1153
|
}
|
|
1151
1154
|
var qe;
|
|
@@ -1157,17 +1160,17 @@ function cn() {
|
|
|
1157
1160
|
if (Ye) return Ne;
|
|
1158
1161
|
Ye = 1;
|
|
1159
1162
|
var e = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
1160
|
-
function r(
|
|
1161
|
-
if (
|
|
1163
|
+
function r(i) {
|
|
1164
|
+
if (i == null)
|
|
1162
1165
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
1163
|
-
return Object(
|
|
1166
|
+
return Object(i);
|
|
1164
1167
|
}
|
|
1165
|
-
function
|
|
1168
|
+
function o() {
|
|
1166
1169
|
try {
|
|
1167
1170
|
if (!Object.assign)
|
|
1168
1171
|
return !1;
|
|
1169
|
-
var
|
|
1170
|
-
if (
|
|
1172
|
+
var i = new String("abc");
|
|
1173
|
+
if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
|
|
1171
1174
|
return !1;
|
|
1172
1175
|
for (var a = {}, d = 0; d < 10; d++)
|
|
1173
1176
|
a["_" + String.fromCharCode(d)] = d;
|
|
@@ -1184,15 +1187,15 @@ function cn() {
|
|
|
1184
1187
|
return !1;
|
|
1185
1188
|
}
|
|
1186
1189
|
}
|
|
1187
|
-
return Ne =
|
|
1188
|
-
for (var d, b = r(
|
|
1190
|
+
return Ne = o() ? Object.assign : function(i, a) {
|
|
1191
|
+
for (var d, b = r(i), g, h = 1; h < arguments.length; h++) {
|
|
1189
1192
|
d = Object(arguments[h]);
|
|
1190
1193
|
for (var u in d)
|
|
1191
1194
|
n.call(d, u) && (b[u] = d[u]);
|
|
1192
1195
|
if (e) {
|
|
1193
1196
|
g = e(d);
|
|
1194
|
-
for (var
|
|
1195
|
-
t.call(d, g[
|
|
1197
|
+
for (var p = 0; p < g.length; p++)
|
|
1198
|
+
t.call(d, g[p]) && (b[g[p]] = d[g[p]]);
|
|
1196
1199
|
}
|
|
1197
1200
|
}
|
|
1198
1201
|
return b;
|
|
@@ -1217,8 +1220,8 @@ function dn() {
|
|
|
1217
1220
|
};
|
|
1218
1221
|
if (process.env.NODE_ENV !== "production") {
|
|
1219
1222
|
var n = /* @__PURE__ */ Oe(), t = {}, r = /* @__PURE__ */ bt();
|
|
1220
|
-
e = function(
|
|
1221
|
-
var a = "Warning: " +
|
|
1223
|
+
e = function(i) {
|
|
1224
|
+
var a = "Warning: " + i;
|
|
1222
1225
|
typeof console < "u" && console.error(a);
|
|
1223
1226
|
try {
|
|
1224
1227
|
throw new Error(a);
|
|
@@ -1226,19 +1229,19 @@ function dn() {
|
|
|
1226
1229
|
}
|
|
1227
1230
|
};
|
|
1228
1231
|
}
|
|
1229
|
-
function i
|
|
1232
|
+
function o(i, a, d, b, g) {
|
|
1230
1233
|
if (process.env.NODE_ENV !== "production") {
|
|
1231
|
-
for (var h in
|
|
1232
|
-
if (r(
|
|
1234
|
+
for (var h in i)
|
|
1235
|
+
if (r(i, h)) {
|
|
1233
1236
|
var u;
|
|
1234
1237
|
try {
|
|
1235
|
-
if (typeof
|
|
1236
|
-
var
|
|
1237
|
-
(b || "React class") + ": " + d + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof
|
|
1238
|
+
if (typeof i[h] != "function") {
|
|
1239
|
+
var p = Error(
|
|
1240
|
+
(b || "React class") + ": " + d + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1238
1241
|
);
|
|
1239
|
-
throw
|
|
1242
|
+
throw p.name = "Invariant Violation", p;
|
|
1240
1243
|
}
|
|
1241
|
-
u =
|
|
1244
|
+
u = i[h](a, h, b, d, null, n);
|
|
1242
1245
|
} catch (D) {
|
|
1243
1246
|
u = D;
|
|
1244
1247
|
}
|
|
@@ -1254,17 +1257,17 @@ function dn() {
|
|
|
1254
1257
|
}
|
|
1255
1258
|
}
|
|
1256
1259
|
}
|
|
1257
|
-
return
|
|
1260
|
+
return o.resetWarningCache = function() {
|
|
1258
1261
|
process.env.NODE_ENV !== "production" && (t = {});
|
|
1259
|
-
}, _e =
|
|
1262
|
+
}, _e = o, _e;
|
|
1260
1263
|
}
|
|
1261
1264
|
var Me, Ke;
|
|
1262
1265
|
function un() {
|
|
1263
1266
|
if (Ke) return Me;
|
|
1264
1267
|
Ke = 1;
|
|
1265
|
-
var e = yt(), n = cn(), t = /* @__PURE__ */ Oe(), r = /* @__PURE__ */ bt(),
|
|
1268
|
+
var e = yt(), n = cn(), t = /* @__PURE__ */ Oe(), r = /* @__PURE__ */ bt(), o = /* @__PURE__ */ dn(), i = function() {
|
|
1266
1269
|
};
|
|
1267
|
-
process.env.NODE_ENV !== "production" && (
|
|
1270
|
+
process.env.NODE_ENV !== "production" && (i = function(d) {
|
|
1268
1271
|
var b = "Warning: " + d;
|
|
1269
1272
|
typeof console < "u" && console.error(b);
|
|
1270
1273
|
try {
|
|
@@ -1282,7 +1285,7 @@ function un() {
|
|
|
1282
1285
|
if (typeof P == "function")
|
|
1283
1286
|
return P;
|
|
1284
1287
|
}
|
|
1285
|
-
var
|
|
1288
|
+
var p = "<<anonymous>>", y = {
|
|
1286
1289
|
array: w("array"),
|
|
1287
1290
|
bigint: w("bigint"),
|
|
1288
1291
|
bool: w("boolean"),
|
|
@@ -1306,40 +1309,40 @@ function un() {
|
|
|
1306
1309
|
function D(x, P) {
|
|
1307
1310
|
return x === P ? x !== 0 || 1 / x === 1 / P : x !== x && P !== P;
|
|
1308
1311
|
}
|
|
1309
|
-
function
|
|
1312
|
+
function m(x, P) {
|
|
1310
1313
|
this.message = x, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
|
|
1311
1314
|
}
|
|
1312
|
-
|
|
1315
|
+
m.prototype = Error.prototype;
|
|
1313
1316
|
function v(x) {
|
|
1314
1317
|
if (process.env.NODE_ENV !== "production")
|
|
1315
1318
|
var P = {}, A = 0;
|
|
1316
|
-
function k(
|
|
1317
|
-
if (
|
|
1319
|
+
function k(F, R, j, L, Y, V, Z) {
|
|
1320
|
+
if (L = L || p, V = V || j, Z !== t) {
|
|
1318
1321
|
if (b) {
|
|
1319
1322
|
var _ = new Error(
|
|
1320
1323
|
"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"
|
|
1321
1324
|
);
|
|
1322
1325
|
throw _.name = "Invariant Violation", _;
|
|
1323
1326
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1324
|
-
var te =
|
|
1327
|
+
var te = L + ":" + j;
|
|
1325
1328
|
!P[te] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1326
|
-
A < 3 && (
|
|
1327
|
-
"You are manually calling a React.PropTypes validation function for the `" + V + "` prop on `" +
|
|
1329
|
+
A < 3 && (i(
|
|
1330
|
+
"You are manually calling a React.PropTypes validation function for the `" + V + "` prop on `" + L + "`. 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."
|
|
1328
1331
|
), P[te] = !0, A++);
|
|
1329
1332
|
}
|
|
1330
1333
|
}
|
|
1331
|
-
return R[j] == null ?
|
|
1334
|
+
return R[j] == null ? F ? R[j] === null ? new m("The " + Y + " `" + V + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new m("The " + Y + " `" + V + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : x(R, j, L, Y, V);
|
|
1332
1335
|
}
|
|
1333
1336
|
var O = k.bind(null, !1);
|
|
1334
1337
|
return O.isRequired = k.bind(null, !0), O;
|
|
1335
1338
|
}
|
|
1336
1339
|
function w(x) {
|
|
1337
|
-
function P(A, k, O,
|
|
1338
|
-
var
|
|
1340
|
+
function P(A, k, O, F, R, j) {
|
|
1341
|
+
var L = A[k], Y = K(L);
|
|
1339
1342
|
if (Y !== x) {
|
|
1340
|
-
var V = ee(
|
|
1341
|
-
return new
|
|
1342
|
-
"Invalid " +
|
|
1343
|
+
var V = ee(L);
|
|
1344
|
+
return new m(
|
|
1345
|
+
"Invalid " + F + " `" + R + "` of type " + ("`" + V + "` supplied to `" + O + "`, expected ") + ("`" + x + "`."),
|
|
1343
1346
|
{ expectedType: x }
|
|
1344
1347
|
);
|
|
1345
1348
|
}
|
|
@@ -1351,16 +1354,16 @@ function un() {
|
|
|
1351
1354
|
return v(a);
|
|
1352
1355
|
}
|
|
1353
1356
|
function C(x) {
|
|
1354
|
-
function P(A, k, O,
|
|
1357
|
+
function P(A, k, O, F, R) {
|
|
1355
1358
|
if (typeof x != "function")
|
|
1356
|
-
return new
|
|
1359
|
+
return new m("Property `" + R + "` of component `" + O + "` has invalid PropType notation inside arrayOf.");
|
|
1357
1360
|
var j = A[k];
|
|
1358
1361
|
if (!Array.isArray(j)) {
|
|
1359
|
-
var
|
|
1360
|
-
return new
|
|
1362
|
+
var L = K(j);
|
|
1363
|
+
return new m("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected an array."));
|
|
1361
1364
|
}
|
|
1362
1365
|
for (var Y = 0; Y < j.length; Y++) {
|
|
1363
|
-
var V = x(j, Y, O,
|
|
1366
|
+
var V = x(j, Y, O, F, R + "[" + Y + "]", t);
|
|
1364
1367
|
if (V instanceof Error)
|
|
1365
1368
|
return V;
|
|
1366
1369
|
}
|
|
@@ -1369,32 +1372,32 @@ function un() {
|
|
|
1369
1372
|
return v(P);
|
|
1370
1373
|
}
|
|
1371
1374
|
function S() {
|
|
1372
|
-
function x(P, A, k, O,
|
|
1375
|
+
function x(P, A, k, O, F) {
|
|
1373
1376
|
var R = P[A];
|
|
1374
1377
|
if (!d(R)) {
|
|
1375
1378
|
var j = K(R);
|
|
1376
|
-
return new
|
|
1379
|
+
return new m("Invalid " + O + " `" + F + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement."));
|
|
1377
1380
|
}
|
|
1378
1381
|
return null;
|
|
1379
1382
|
}
|
|
1380
1383
|
return v(x);
|
|
1381
1384
|
}
|
|
1382
1385
|
function c() {
|
|
1383
|
-
function x(P, A, k, O,
|
|
1386
|
+
function x(P, A, k, O, F) {
|
|
1384
1387
|
var R = P[A];
|
|
1385
1388
|
if (!e.isValidElementType(R)) {
|
|
1386
1389
|
var j = K(R);
|
|
1387
|
-
return new
|
|
1390
|
+
return new m("Invalid " + O + " `" + F + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement type."));
|
|
1388
1391
|
}
|
|
1389
1392
|
return null;
|
|
1390
1393
|
}
|
|
1391
1394
|
return v(x);
|
|
1392
1395
|
}
|
|
1393
1396
|
function E(x) {
|
|
1394
|
-
function P(A, k, O,
|
|
1397
|
+
function P(A, k, O, F, R) {
|
|
1395
1398
|
if (!(A[k] instanceof x)) {
|
|
1396
|
-
var j = x.name ||
|
|
1397
|
-
return new
|
|
1399
|
+
var j = x.name || p, L = de(A[k]);
|
|
1400
|
+
return new m("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected ") + ("instance of `" + j + "`."));
|
|
1398
1401
|
}
|
|
1399
1402
|
return null;
|
|
1400
1403
|
}
|
|
@@ -1402,31 +1405,31 @@ function un() {
|
|
|
1402
1405
|
}
|
|
1403
1406
|
function l(x) {
|
|
1404
1407
|
if (!Array.isArray(x))
|
|
1405
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ?
|
|
1408
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
1406
1409
|
"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])."
|
|
1407
|
-
) :
|
|
1408
|
-
function P(A, k, O,
|
|
1409
|
-
for (var j = A[k],
|
|
1410
|
-
if (D(j, x[
|
|
1410
|
+
) : i("Invalid argument supplied to oneOf, expected an array.")), a;
|
|
1411
|
+
function P(A, k, O, F, R) {
|
|
1412
|
+
for (var j = A[k], L = 0; L < x.length; L++)
|
|
1413
|
+
if (D(j, x[L]))
|
|
1411
1414
|
return null;
|
|
1412
1415
|
var Y = JSON.stringify(x, function(Z, _) {
|
|
1413
1416
|
var te = ee(_);
|
|
1414
1417
|
return te === "symbol" ? String(_) : _;
|
|
1415
1418
|
});
|
|
1416
|
-
return new
|
|
1419
|
+
return new m("Invalid " + F + " `" + R + "` of value `" + String(j) + "` " + ("supplied to `" + O + "`, expected one of " + Y + "."));
|
|
1417
1420
|
}
|
|
1418
1421
|
return v(P);
|
|
1419
1422
|
}
|
|
1420
1423
|
function f(x) {
|
|
1421
|
-
function P(A, k, O,
|
|
1424
|
+
function P(A, k, O, F, R) {
|
|
1422
1425
|
if (typeof x != "function")
|
|
1423
|
-
return new
|
|
1424
|
-
var j = A[k],
|
|
1425
|
-
if (
|
|
1426
|
-
return new
|
|
1426
|
+
return new m("Property `" + R + "` of component `" + O + "` has invalid PropType notation inside objectOf.");
|
|
1427
|
+
var j = A[k], L = K(j);
|
|
1428
|
+
if (L !== "object")
|
|
1429
|
+
return new m("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected an object."));
|
|
1427
1430
|
for (var Y in j)
|
|
1428
1431
|
if (r(j, Y)) {
|
|
1429
|
-
var V = x(j, Y, O,
|
|
1432
|
+
var V = x(j, Y, O, F, R + "." + Y, t);
|
|
1430
1433
|
if (V instanceof Error)
|
|
1431
1434
|
return V;
|
|
1432
1435
|
}
|
|
@@ -1436,47 +1439,47 @@ function un() {
|
|
|
1436
1439
|
}
|
|
1437
1440
|
function M(x) {
|
|
1438
1441
|
if (!Array.isArray(x))
|
|
1439
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1442
|
+
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), a;
|
|
1440
1443
|
for (var P = 0; P < x.length; P++) {
|
|
1441
1444
|
var A = x[P];
|
|
1442
1445
|
if (typeof A != "function")
|
|
1443
|
-
return
|
|
1446
|
+
return i(
|
|
1444
1447
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + se(A) + " at index " + P + "."
|
|
1445
1448
|
), a;
|
|
1446
1449
|
}
|
|
1447
|
-
function k(O,
|
|
1450
|
+
function k(O, F, R, j, L) {
|
|
1448
1451
|
for (var Y = [], V = 0; V < x.length; V++) {
|
|
1449
|
-
var Z = x[V], _ = Z(O,
|
|
1452
|
+
var Z = x[V], _ = Z(O, F, R, j, L, t);
|
|
1450
1453
|
if (_ == null)
|
|
1451
1454
|
return null;
|
|
1452
1455
|
_.data && r(_.data, "expectedType") && Y.push(_.data.expectedType);
|
|
1453
1456
|
}
|
|
1454
1457
|
var te = Y.length > 0 ? ", expected one of type [" + Y.join(", ") + "]" : "";
|
|
1455
|
-
return new
|
|
1458
|
+
return new m("Invalid " + j + " `" + L + "` supplied to " + ("`" + R + "`" + te + "."));
|
|
1456
1459
|
}
|
|
1457
1460
|
return v(k);
|
|
1458
1461
|
}
|
|
1459
1462
|
function $() {
|
|
1460
|
-
function x(P, A, k, O,
|
|
1461
|
-
return X(P[A]) ? null : new
|
|
1463
|
+
function x(P, A, k, O, F) {
|
|
1464
|
+
return X(P[A]) ? null : new m("Invalid " + O + " `" + F + "` supplied to " + ("`" + k + "`, expected a ReactNode."));
|
|
1462
1465
|
}
|
|
1463
1466
|
return v(x);
|
|
1464
1467
|
}
|
|
1465
1468
|
function I(x, P, A, k, O) {
|
|
1466
|
-
return new
|
|
1469
|
+
return new m(
|
|
1467
1470
|
(x || "React class") + ": " + P + " type `" + A + "." + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + O + "`."
|
|
1468
1471
|
);
|
|
1469
1472
|
}
|
|
1470
1473
|
function T(x) {
|
|
1471
|
-
function P(A, k, O,
|
|
1472
|
-
var j = A[k],
|
|
1473
|
-
if (
|
|
1474
|
-
return new
|
|
1474
|
+
function P(A, k, O, F, R) {
|
|
1475
|
+
var j = A[k], L = K(j);
|
|
1476
|
+
if (L !== "object")
|
|
1477
|
+
return new m("Invalid " + F + " `" + R + "` of type `" + L + "` " + ("supplied to `" + O + "`, expected `object`."));
|
|
1475
1478
|
for (var Y in x) {
|
|
1476
1479
|
var V = x[Y];
|
|
1477
1480
|
if (typeof V != "function")
|
|
1478
|
-
return I(O,
|
|
1479
|
-
var Z = V(j, Y, O,
|
|
1481
|
+
return I(O, F, R, Y, ee(V));
|
|
1482
|
+
var Z = V(j, Y, O, F, R + "." + Y, t);
|
|
1480
1483
|
if (Z)
|
|
1481
1484
|
return Z;
|
|
1482
1485
|
}
|
|
@@ -1485,21 +1488,21 @@ function un() {
|
|
|
1485
1488
|
return v(P);
|
|
1486
1489
|
}
|
|
1487
1490
|
function z(x) {
|
|
1488
|
-
function P(A, k, O,
|
|
1489
|
-
var j = A[k],
|
|
1490
|
-
if (
|
|
1491
|
-
return new
|
|
1491
|
+
function P(A, k, O, F, R) {
|
|
1492
|
+
var j = A[k], L = K(j);
|
|
1493
|
+
if (L !== "object")
|
|
1494
|
+
return new m("Invalid " + F + " `" + R + "` of type `" + L + "` " + ("supplied to `" + O + "`, expected `object`."));
|
|
1492
1495
|
var Y = n({}, A[k], x);
|
|
1493
1496
|
for (var V in Y) {
|
|
1494
1497
|
var Z = x[V];
|
|
1495
1498
|
if (r(x, V) && typeof Z != "function")
|
|
1496
|
-
return I(O,
|
|
1499
|
+
return I(O, F, R, V, ee(Z));
|
|
1497
1500
|
if (!Z)
|
|
1498
|
-
return new
|
|
1499
|
-
"Invalid " +
|
|
1501
|
+
return new m(
|
|
1502
|
+
"Invalid " + F + " `" + R + "` key `" + V + "` supplied to `" + O + "`.\nBad object: " + JSON.stringify(A[k], null, " ") + `
|
|
1500
1503
|
Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
1501
1504
|
);
|
|
1502
|
-
var _ = Z(j, V, O,
|
|
1505
|
+
var _ = Z(j, V, O, F, R + "." + V, t);
|
|
1503
1506
|
if (_)
|
|
1504
1507
|
return _;
|
|
1505
1508
|
}
|
|
@@ -1574,9 +1577,9 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1574
1577
|
}
|
|
1575
1578
|
}
|
|
1576
1579
|
function de(x) {
|
|
1577
|
-
return !x.constructor || !x.constructor.name ?
|
|
1580
|
+
return !x.constructor || !x.constructor.name ? p : x.constructor.name;
|
|
1578
1581
|
}
|
|
1579
|
-
return y.checkPropTypes =
|
|
1582
|
+
return y.checkPropTypes = o, y.resetWarningCache = o.resetWarningCache, y.PropTypes = y, y;
|
|
1580
1583
|
}, Me;
|
|
1581
1584
|
}
|
|
1582
1585
|
var Pe, Xe;
|
|
@@ -1591,17 +1594,17 @@ function fn() {
|
|
|
1591
1594
|
return t.resetWarningCache = n, Pe = function() {
|
|
1592
1595
|
function r(a, d, b, g, h, u) {
|
|
1593
1596
|
if (u !== e) {
|
|
1594
|
-
var
|
|
1597
|
+
var p = new Error(
|
|
1595
1598
|
"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"
|
|
1596
1599
|
);
|
|
1597
|
-
throw
|
|
1600
|
+
throw p.name = "Invariant Violation", p;
|
|
1598
1601
|
}
|
|
1599
1602
|
}
|
|
1600
1603
|
r.isRequired = r;
|
|
1601
|
-
function
|
|
1604
|
+
function o() {
|
|
1602
1605
|
return r;
|
|
1603
1606
|
}
|
|
1604
|
-
var
|
|
1607
|
+
var i = {
|
|
1605
1608
|
array: r,
|
|
1606
1609
|
bigint: r,
|
|
1607
1610
|
bool: r,
|
|
@@ -1611,20 +1614,20 @@ function fn() {
|
|
|
1611
1614
|
string: r,
|
|
1612
1615
|
symbol: r,
|
|
1613
1616
|
any: r,
|
|
1614
|
-
arrayOf:
|
|
1617
|
+
arrayOf: o,
|
|
1615
1618
|
element: r,
|
|
1616
1619
|
elementType: r,
|
|
1617
|
-
instanceOf:
|
|
1620
|
+
instanceOf: o,
|
|
1618
1621
|
node: r,
|
|
1619
|
-
objectOf:
|
|
1620
|
-
oneOf:
|
|
1621
|
-
oneOfType:
|
|
1622
|
-
shape:
|
|
1623
|
-
exact:
|
|
1622
|
+
objectOf: o,
|
|
1623
|
+
oneOf: o,
|
|
1624
|
+
oneOfType: o,
|
|
1625
|
+
shape: o,
|
|
1626
|
+
exact: o,
|
|
1624
1627
|
checkPropTypes: t,
|
|
1625
1628
|
resetWarningCache: n
|
|
1626
1629
|
};
|
|
1627
|
-
return
|
|
1630
|
+
return i.PropTypes = i, i;
|
|
1628
1631
|
}, Pe;
|
|
1629
1632
|
}
|
|
1630
1633
|
var Ge;
|
|
@@ -1642,81 +1645,81 @@ function hn() {
|
|
|
1642
1645
|
if (Ze) return be.exports;
|
|
1643
1646
|
Ze = 1;
|
|
1644
1647
|
function e(t) {
|
|
1645
|
-
var r,
|
|
1646
|
-
if (typeof t == "string" || typeof t == "number")
|
|
1648
|
+
var r, o, i = "";
|
|
1649
|
+
if (typeof t == "string" || typeof t == "number") i += t;
|
|
1647
1650
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1648
1651
|
var a = t.length;
|
|
1649
|
-
for (r = 0; r < a; r++) t[r] && (
|
|
1650
|
-
} else for (
|
|
1651
|
-
return
|
|
1652
|
+
for (r = 0; r < a; r++) t[r] && (o = e(t[r])) && (i && (i += " "), i += o);
|
|
1653
|
+
} else for (o in t) t[o] && (i && (i += " "), i += o);
|
|
1654
|
+
return i;
|
|
1652
1655
|
}
|
|
1653
1656
|
function n() {
|
|
1654
|
-
for (var t, r,
|
|
1655
|
-
return
|
|
1657
|
+
for (var t, r, o = 0, i = "", a = arguments.length; o < a; o++) (t = arguments[o]) && (r = e(t)) && (i && (i += " "), i += r);
|
|
1658
|
+
return i;
|
|
1656
1659
|
}
|
|
1657
1660
|
return be.exports = n, be.exports.clsx = n, be.exports;
|
|
1658
1661
|
}
|
|
1659
|
-
var B = {},
|
|
1662
|
+
var B = {}, ie = {}, Je;
|
|
1660
1663
|
function we() {
|
|
1661
|
-
if (Je) return
|
|
1662
|
-
Je = 1, Object.defineProperty(
|
|
1664
|
+
if (Je) return ie;
|
|
1665
|
+
Je = 1, Object.defineProperty(ie, "__esModule", {
|
|
1663
1666
|
value: !0
|
|
1664
|
-
}),
|
|
1665
|
-
function e(
|
|
1666
|
-
for (let d = 0, b =
|
|
1667
|
-
if (a.apply(a, [
|
|
1667
|
+
}), ie.dontSetMe = o, ie.findInArray = e, ie.int = r, ie.isFunction = n, ie.isNum = t;
|
|
1668
|
+
function e(i, a) {
|
|
1669
|
+
for (let d = 0, b = i.length; d < b; d++)
|
|
1670
|
+
if (a.apply(a, [i[d], d, i])) return i[d];
|
|
1668
1671
|
}
|
|
1669
|
-
function n(
|
|
1670
|
-
return typeof
|
|
1672
|
+
function n(i) {
|
|
1673
|
+
return typeof i == "function" || Object.prototype.toString.call(i) === "[object Function]";
|
|
1671
1674
|
}
|
|
1672
|
-
function t(
|
|
1673
|
-
return typeof
|
|
1675
|
+
function t(i) {
|
|
1676
|
+
return typeof i == "number" && !isNaN(i);
|
|
1674
1677
|
}
|
|
1675
|
-
function r(
|
|
1676
|
-
return parseInt(
|
|
1678
|
+
function r(i) {
|
|
1679
|
+
return parseInt(i, 10);
|
|
1677
1680
|
}
|
|
1678
|
-
function i
|
|
1679
|
-
if (
|
|
1681
|
+
function o(i, a, d) {
|
|
1682
|
+
if (i[a])
|
|
1680
1683
|
return new Error(`Invalid prop ${a} passed to ${d} - do not set this, set it on the child.`);
|
|
1681
1684
|
}
|
|
1682
|
-
return
|
|
1685
|
+
return ie;
|
|
1683
1686
|
}
|
|
1684
|
-
var
|
|
1687
|
+
var oe = {}, Qe;
|
|
1685
1688
|
function gn() {
|
|
1686
|
-
if (Qe) return
|
|
1687
|
-
Qe = 1, Object.defineProperty(
|
|
1689
|
+
if (Qe) return oe;
|
|
1690
|
+
Qe = 1, Object.defineProperty(oe, "__esModule", {
|
|
1688
1691
|
value: !0
|
|
1689
|
-
}),
|
|
1692
|
+
}), oe.browserPrefixToKey = t, oe.browserPrefixToStyle = r, oe.default = void 0, oe.getPrefix = n;
|
|
1690
1693
|
const e = ["Moz", "Webkit", "O", "ms"];
|
|
1691
1694
|
function n() {
|
|
1692
|
-
let
|
|
1695
|
+
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
|
|
1693
1696
|
if (typeof window > "u") return "";
|
|
1694
1697
|
const a = window.document?.documentElement?.style;
|
|
1695
|
-
if (!a ||
|
|
1698
|
+
if (!a || i in a) return "";
|
|
1696
1699
|
for (let d = 0; d < e.length; d++)
|
|
1697
|
-
if (t(
|
|
1700
|
+
if (t(i, e[d]) in a) return e[d];
|
|
1698
1701
|
return "";
|
|
1699
1702
|
}
|
|
1700
|
-
function t(
|
|
1701
|
-
return a ? `${a}${i
|
|
1703
|
+
function t(i, a) {
|
|
1704
|
+
return a ? `${a}${o(i)}` : i;
|
|
1702
1705
|
}
|
|
1703
|
-
function r(
|
|
1704
|
-
return a ? `-${a.toLowerCase()}-${
|
|
1706
|
+
function r(i, a) {
|
|
1707
|
+
return a ? `-${a.toLowerCase()}-${i}` : i;
|
|
1705
1708
|
}
|
|
1706
|
-
function i
|
|
1709
|
+
function o(i) {
|
|
1707
1710
|
let a = "", d = !0;
|
|
1708
|
-
for (let b = 0; b <
|
|
1709
|
-
d ? (a +=
|
|
1711
|
+
for (let b = 0; b < i.length; b++)
|
|
1712
|
+
d ? (a += i[b].toUpperCase(), d = !1) : i[b] === "-" ? d = !0 : a += i[b];
|
|
1710
1713
|
return a;
|
|
1711
1714
|
}
|
|
1712
|
-
return
|
|
1715
|
+
return oe.default = n(), oe;
|
|
1713
1716
|
}
|
|
1714
1717
|
var et;
|
|
1715
1718
|
function Re() {
|
|
1716
1719
|
if (et) return B;
|
|
1717
1720
|
et = 1, Object.defineProperty(B, "__esModule", {
|
|
1718
1721
|
value: !0
|
|
1719
|
-
}), B.addClassName = c, B.addEvent = a, B.addUserSelectStyles = N, B.createCSSTransform = y, B.createSVGTransform = D, B.getTouch = v, B.getTouchIdentifier = w, B.getTranslation =
|
|
1722
|
+
}), B.addClassName = c, B.addEvent = a, B.addUserSelectStyles = N, B.createCSSTransform = y, B.createSVGTransform = D, B.getTouch = v, B.getTouchIdentifier = w, B.getTranslation = m, B.innerHeight = h, B.innerWidth = u, B.matchesSelector = o, B.matchesSelectorAndParentsTo = i, B.offsetXYFromParent = p, B.outerHeight = b, B.outerWidth = g, B.removeClassName = E, B.removeEvent = d, B.scheduleRemoveUserSelectStyles = C;
|
|
1720
1723
|
var e = we(), n = t(gn());
|
|
1721
1724
|
function t(l, f) {
|
|
1722
1725
|
if (typeof WeakMap == "function") var M = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakMap();
|
|
@@ -1733,15 +1736,15 @@ function Re() {
|
|
|
1733
1736
|
})(l, f);
|
|
1734
1737
|
}
|
|
1735
1738
|
let r = "";
|
|
1736
|
-
function
|
|
1739
|
+
function o(l, f) {
|
|
1737
1740
|
return r || (r = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(M) {
|
|
1738
1741
|
return (0, e.isFunction)(l[M]);
|
|
1739
1742
|
})), (0, e.isFunction)(l[r]) ? l[r](f) : !1;
|
|
1740
1743
|
}
|
|
1741
|
-
function
|
|
1744
|
+
function i(l, f, M) {
|
|
1742
1745
|
let $ = l;
|
|
1743
1746
|
do {
|
|
1744
|
-
if (
|
|
1747
|
+
if (o($, f)) return !0;
|
|
1745
1748
|
if ($ === M) return !1;
|
|
1746
1749
|
$ = $.parentNode;
|
|
1747
1750
|
} while ($);
|
|
@@ -1783,7 +1786,7 @@ function Re() {
|
|
|
1783
1786
|
const M = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1784
1787
|
return f -= (0, e.int)(M.paddingLeft), f -= (0, e.int)(M.paddingRight), f;
|
|
1785
1788
|
}
|
|
1786
|
-
function
|
|
1789
|
+
function p(l, f, M) {
|
|
1787
1790
|
const I = f === f.ownerDocument.body ? {
|
|
1788
1791
|
left: 0,
|
|
1789
1792
|
top: 0
|
|
@@ -1794,15 +1797,15 @@ function Re() {
|
|
|
1794
1797
|
};
|
|
1795
1798
|
}
|
|
1796
1799
|
function y(l, f) {
|
|
1797
|
-
const M =
|
|
1800
|
+
const M = m(l, f, "px");
|
|
1798
1801
|
return {
|
|
1799
1802
|
[(0, n.browserPrefixToKey)("transform", n.default)]: M
|
|
1800
1803
|
};
|
|
1801
1804
|
}
|
|
1802
1805
|
function D(l, f) {
|
|
1803
|
-
return
|
|
1806
|
+
return m(l, f, "");
|
|
1804
1807
|
}
|
|
1805
|
-
function
|
|
1808
|
+
function m(l, f, M) {
|
|
1806
1809
|
let {
|
|
1807
1810
|
x: $,
|
|
1808
1811
|
y: I
|
|
@@ -1857,76 +1860,76 @@ function xt() {
|
|
|
1857
1860
|
if (tt) return ne;
|
|
1858
1861
|
tt = 1, Object.defineProperty(ne, "__esModule", {
|
|
1859
1862
|
value: !0
|
|
1860
|
-
}), ne.canDragX =
|
|
1863
|
+
}), ne.canDragX = o, ne.canDragY = i, ne.createCoreData = d, ne.createDraggableData = b, ne.getBoundPosition = t, ne.getControlPosition = a, ne.snapToGrid = r;
|
|
1861
1864
|
var e = we(), n = Re();
|
|
1862
|
-
function t(u,
|
|
1863
|
-
if (!u.props.bounds) return [
|
|
1865
|
+
function t(u, p, y) {
|
|
1866
|
+
if (!u.props.bounds) return [p, y];
|
|
1864
1867
|
let {
|
|
1865
1868
|
bounds: D
|
|
1866
1869
|
} = u.props;
|
|
1867
1870
|
D = typeof D == "string" ? D : g(D);
|
|
1868
|
-
const
|
|
1871
|
+
const m = h(u);
|
|
1869
1872
|
if (typeof D == "string") {
|
|
1870
1873
|
const {
|
|
1871
1874
|
ownerDocument: v
|
|
1872
|
-
} =
|
|
1875
|
+
} = m, w = v.defaultView;
|
|
1873
1876
|
let N;
|
|
1874
|
-
if (D === "parent" ? N =
|
|
1877
|
+
if (D === "parent" ? N = m.parentNode : N = m.getRootNode().querySelector(D), !(N instanceof w.HTMLElement))
|
|
1875
1878
|
throw new Error('Bounds selector "' + D + '" could not find an element.');
|
|
1876
|
-
const C = N, S = w.getComputedStyle(
|
|
1879
|
+
const C = N, S = w.getComputedStyle(m), c = w.getComputedStyle(C);
|
|
1877
1880
|
D = {
|
|
1878
|
-
left: -
|
|
1879
|
-
top: -
|
|
1880
|
-
right: (0, n.innerWidth)(C) - (0, n.outerWidth)(
|
|
1881
|
-
bottom: (0, n.innerHeight)(C) - (0, n.outerHeight)(
|
|
1881
|
+
left: -m.offsetLeft + (0, e.int)(c.paddingLeft) + (0, e.int)(S.marginLeft),
|
|
1882
|
+
top: -m.offsetTop + (0, e.int)(c.paddingTop) + (0, e.int)(S.marginTop),
|
|
1883
|
+
right: (0, n.innerWidth)(C) - (0, n.outerWidth)(m) - m.offsetLeft + (0, e.int)(c.paddingRight) - (0, e.int)(S.marginRight),
|
|
1884
|
+
bottom: (0, n.innerHeight)(C) - (0, n.outerHeight)(m) - m.offsetTop + (0, e.int)(c.paddingBottom) - (0, e.int)(S.marginBottom)
|
|
1882
1885
|
};
|
|
1883
1886
|
}
|
|
1884
|
-
return (0, e.isNum)(D.right) && (
|
|
1887
|
+
return (0, e.isNum)(D.right) && (p = Math.min(p, D.right)), (0, e.isNum)(D.bottom) && (y = Math.min(y, D.bottom)), (0, e.isNum)(D.left) && (p = Math.max(p, D.left)), (0, e.isNum)(D.top) && (y = Math.max(y, D.top)), [p, y];
|
|
1885
1888
|
}
|
|
1886
|
-
function r(u,
|
|
1887
|
-
const D = Math.round(
|
|
1888
|
-
return [D,
|
|
1889
|
+
function r(u, p, y) {
|
|
1890
|
+
const D = Math.round(p / u[0]) * u[0], m = Math.round(y / u[1]) * u[1];
|
|
1891
|
+
return [D, m];
|
|
1889
1892
|
}
|
|
1890
|
-
function
|
|
1893
|
+
function o(u) {
|
|
1891
1894
|
return u.props.axis === "both" || u.props.axis === "x";
|
|
1892
1895
|
}
|
|
1893
|
-
function
|
|
1896
|
+
function i(u) {
|
|
1894
1897
|
return u.props.axis === "both" || u.props.axis === "y";
|
|
1895
1898
|
}
|
|
1896
|
-
function a(u,
|
|
1897
|
-
const D = typeof
|
|
1898
|
-
if (typeof
|
|
1899
|
-
const
|
|
1899
|
+
function a(u, p, y) {
|
|
1900
|
+
const D = typeof p == "number" ? (0, n.getTouch)(u, p) : null;
|
|
1901
|
+
if (typeof p == "number" && !D) return null;
|
|
1902
|
+
const m = h(y), v = y.props.offsetParent || m.offsetParent || m.ownerDocument.body;
|
|
1900
1903
|
return (0, n.offsetXYFromParent)(D || u, v, y.props.scale);
|
|
1901
1904
|
}
|
|
1902
|
-
function d(u,
|
|
1903
|
-
const D = !(0, e.isNum)(u.lastX),
|
|
1905
|
+
function d(u, p, y) {
|
|
1906
|
+
const D = !(0, e.isNum)(u.lastX), m = h(u);
|
|
1904
1907
|
return D ? {
|
|
1905
|
-
node:
|
|
1908
|
+
node: m,
|
|
1906
1909
|
deltaX: 0,
|
|
1907
1910
|
deltaY: 0,
|
|
1908
|
-
lastX:
|
|
1911
|
+
lastX: p,
|
|
1909
1912
|
lastY: y,
|
|
1910
|
-
x:
|
|
1913
|
+
x: p,
|
|
1911
1914
|
y
|
|
1912
1915
|
} : {
|
|
1913
|
-
node:
|
|
1914
|
-
deltaX:
|
|
1916
|
+
node: m,
|
|
1917
|
+
deltaX: p - u.lastX,
|
|
1915
1918
|
deltaY: y - u.lastY,
|
|
1916
1919
|
lastX: u.lastX,
|
|
1917
1920
|
lastY: u.lastY,
|
|
1918
|
-
x:
|
|
1921
|
+
x: p,
|
|
1919
1922
|
y
|
|
1920
1923
|
};
|
|
1921
1924
|
}
|
|
1922
|
-
function b(u,
|
|
1925
|
+
function b(u, p) {
|
|
1923
1926
|
const y = u.props.scale;
|
|
1924
1927
|
return {
|
|
1925
|
-
node:
|
|
1926
|
-
x: u.state.x +
|
|
1927
|
-
y: u.state.y +
|
|
1928
|
-
deltaX:
|
|
1929
|
-
deltaY:
|
|
1928
|
+
node: p.node,
|
|
1929
|
+
x: u.state.x + p.deltaX / y,
|
|
1930
|
+
y: u.state.y + p.deltaY / y,
|
|
1931
|
+
deltaX: p.deltaX / y,
|
|
1932
|
+
deltaY: p.deltaY / y,
|
|
1930
1933
|
lastX: u.state.x,
|
|
1931
1934
|
lastY: u.state.y
|
|
1932
1935
|
};
|
|
@@ -1940,10 +1943,10 @@ function xt() {
|
|
|
1940
1943
|
};
|
|
1941
1944
|
}
|
|
1942
1945
|
function h(u) {
|
|
1943
|
-
const
|
|
1944
|
-
if (!
|
|
1946
|
+
const p = u.findDOMNode();
|
|
1947
|
+
if (!p)
|
|
1945
1948
|
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
1946
|
-
return
|
|
1949
|
+
return p;
|
|
1947
1950
|
}
|
|
1948
1951
|
return ne;
|
|
1949
1952
|
}
|
|
@@ -1963,11 +1966,11 @@ function mn() {
|
|
|
1963
1966
|
rt = 1, Object.defineProperty(he, "__esModule", {
|
|
1964
1967
|
value: !0
|
|
1965
1968
|
}), he.default = void 0;
|
|
1966
|
-
var e = b(ae), n = d(/* @__PURE__ */ vt()), t = d(lt), r = Re(),
|
|
1967
|
-
function d(
|
|
1968
|
-
return
|
|
1969
|
+
var e = b(ae), n = d(/* @__PURE__ */ vt()), t = d(lt), r = Re(), o = xt(), i = we(), a = d(wt());
|
|
1970
|
+
function d(m) {
|
|
1971
|
+
return m && m.__esModule ? m : { default: m };
|
|
1969
1972
|
}
|
|
1970
|
-
function b(
|
|
1973
|
+
function b(m, v) {
|
|
1971
1974
|
if (typeof WeakMap == "function") var w = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap();
|
|
1972
1975
|
return (b = function(C, S) {
|
|
1973
1976
|
if (!S && C && C.__esModule) return C;
|
|
@@ -1979,26 +1982,26 @@ function mn() {
|
|
|
1979
1982
|
}
|
|
1980
1983
|
for (const f in C) f !== "default" && {}.hasOwnProperty.call(C, f) && ((E = (c = Object.defineProperty) && Object.getOwnPropertyDescriptor(C, f)) && (E.get || E.set) ? c(l, f, E) : l[f] = C[f]);
|
|
1981
1984
|
return l;
|
|
1982
|
-
})(
|
|
1985
|
+
})(m, v);
|
|
1983
1986
|
}
|
|
1984
|
-
function g(
|
|
1985
|
-
return (v = h(v)) in
|
|
1987
|
+
function g(m, v, w) {
|
|
1988
|
+
return (v = h(v)) in m ? Object.defineProperty(m, v, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : m[v] = w, m;
|
|
1986
1989
|
}
|
|
1987
|
-
function h(
|
|
1988
|
-
var v = u(
|
|
1990
|
+
function h(m) {
|
|
1991
|
+
var v = u(m, "string");
|
|
1989
1992
|
return typeof v == "symbol" ? v : v + "";
|
|
1990
1993
|
}
|
|
1991
|
-
function u(
|
|
1992
|
-
if (typeof
|
|
1993
|
-
var w =
|
|
1994
|
+
function u(m, v) {
|
|
1995
|
+
if (typeof m != "object" || !m) return m;
|
|
1996
|
+
var w = m[Symbol.toPrimitive];
|
|
1994
1997
|
if (w !== void 0) {
|
|
1995
|
-
var N = w.call(
|
|
1998
|
+
var N = w.call(m, v);
|
|
1996
1999
|
if (typeof N != "object") return N;
|
|
1997
2000
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1998
2001
|
}
|
|
1999
|
-
return (v === "string" ? String : Number)(
|
|
2002
|
+
return (v === "string" ? String : Number)(m);
|
|
2000
2003
|
}
|
|
2001
|
-
const
|
|
2004
|
+
const p = {
|
|
2002
2005
|
touch: {
|
|
2003
2006
|
start: "touchstart",
|
|
2004
2007
|
move: "touchmove",
|
|
@@ -2010,7 +2013,7 @@ function mn() {
|
|
|
2010
2013
|
stop: "mouseup"
|
|
2011
2014
|
}
|
|
2012
2015
|
};
|
|
2013
|
-
let y =
|
|
2016
|
+
let y = p.mouse, D = class extends e.Component {
|
|
2014
2017
|
constructor() {
|
|
2015
2018
|
super(...arguments), g(this, "dragging", !1), g(this, "lastX", NaN), g(this, "lastY", NaN), g(this, "touchIdentifier", null), g(this, "mounted", !1), g(this, "handleDragStart", (v) => {
|
|
2016
2019
|
if (this.props.onMouseDown(v), !this.props.allowAnyClick && typeof v.button == "number" && v.button !== 0) return !1;
|
|
@@ -2025,15 +2028,15 @@ function mn() {
|
|
|
2025
2028
|
v.type === "touchstart" && !this.props.allowMobileScroll && v.preventDefault();
|
|
2026
2029
|
const C = (0, r.getTouchIdentifier)(v);
|
|
2027
2030
|
this.touchIdentifier = C;
|
|
2028
|
-
const S = (0,
|
|
2031
|
+
const S = (0, o.getControlPosition)(v, C, this);
|
|
2029
2032
|
if (S == null) return;
|
|
2030
2033
|
const {
|
|
2031
2034
|
x: c,
|
|
2032
2035
|
y: E
|
|
2033
|
-
} = S, l = (0,
|
|
2036
|
+
} = S, l = (0, o.createCoreData)(this, c, E);
|
|
2034
2037
|
(0, a.default)("DraggableCore: handleDragStart: %j", l), (0, a.default)("calling", this.props.onStart), !(this.props.onStart(v, l) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(N), this.dragging = !0, this.lastX = c, this.lastY = E, (0, r.addEvent)(N, y.move, this.handleDrag), (0, r.addEvent)(N, y.stop, this.handleDragStop));
|
|
2035
2038
|
}), g(this, "handleDrag", (v) => {
|
|
2036
|
-
const w = (0,
|
|
2039
|
+
const w = (0, o.getControlPosition)(v, this.touchIdentifier, this);
|
|
2037
2040
|
if (w == null) return;
|
|
2038
2041
|
let {
|
|
2039
2042
|
x: N,
|
|
@@ -2041,10 +2044,10 @@ function mn() {
|
|
|
2041
2044
|
} = w;
|
|
2042
2045
|
if (Array.isArray(this.props.grid)) {
|
|
2043
2046
|
let E = N - this.lastX, l = C - this.lastY;
|
|
2044
|
-
if ([E, l] = (0,
|
|
2047
|
+
if ([E, l] = (0, o.snapToGrid)(this.props.grid, E, l), !E && !l) return;
|
|
2045
2048
|
N = this.lastX + E, C = this.lastY + l;
|
|
2046
2049
|
}
|
|
2047
|
-
const S = (0,
|
|
2050
|
+
const S = (0, o.createCoreData)(this, N, C);
|
|
2048
2051
|
if ((0, a.default)("DraggableCore: handleDrag: %j", S), this.props.onDrag(v, S) === !1 || this.mounted === !1) {
|
|
2049
2052
|
try {
|
|
2050
2053
|
this.handleDragStop(new MouseEvent("mouseup"));
|
|
@@ -2057,7 +2060,7 @@ function mn() {
|
|
|
2057
2060
|
this.lastX = N, this.lastY = C;
|
|
2058
2061
|
}), g(this, "handleDragStop", (v) => {
|
|
2059
2062
|
if (!this.dragging) return;
|
|
2060
|
-
const w = (0,
|
|
2063
|
+
const w = (0, o.getControlPosition)(v, this.touchIdentifier, this);
|
|
2061
2064
|
if (w == null) return;
|
|
2062
2065
|
let {
|
|
2063
2066
|
x: N,
|
|
@@ -2065,18 +2068,18 @@ function mn() {
|
|
|
2065
2068
|
} = w;
|
|
2066
2069
|
if (Array.isArray(this.props.grid)) {
|
|
2067
2070
|
let l = N - this.lastX || 0, f = C - this.lastY || 0;
|
|
2068
|
-
[l, f] = (0,
|
|
2071
|
+
[l, f] = (0, o.snapToGrid)(this.props.grid, l, f), N = this.lastX + l, C = this.lastY + f;
|
|
2069
2072
|
}
|
|
2070
|
-
const S = (0,
|
|
2073
|
+
const S = (0, o.createCoreData)(this, N, C);
|
|
2071
2074
|
if (this.props.onStop(v, S) === !1 || this.mounted === !1) return !1;
|
|
2072
2075
|
const E = this.findDOMNode();
|
|
2073
2076
|
E && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(E.ownerDocument), (0, a.default)("DraggableCore: handleDragStop: %j", S), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, E && ((0, a.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(E.ownerDocument, y.move, this.handleDrag), (0, r.removeEvent)(E.ownerDocument, y.stop, this.handleDragStop));
|
|
2074
|
-
}), g(this, "onMouseDown", (v) => (y =
|
|
2077
|
+
}), g(this, "onMouseDown", (v) => (y = p.mouse, this.handleDragStart(v))), g(this, "onMouseUp", (v) => (y = p.mouse, this.handleDragStop(v))), g(this, "onTouchStart", (v) => (y = p.touch, this.handleDragStart(v))), g(this, "onTouchEnd", (v) => (y = p.touch, this.handleDragStop(v)));
|
|
2075
2078
|
}
|
|
2076
2079
|
componentDidMount() {
|
|
2077
2080
|
this.mounted = !0;
|
|
2078
2081
|
const v = this.findDOMNode();
|
|
2079
|
-
v && (0, r.addEvent)(v,
|
|
2082
|
+
v && (0, r.addEvent)(v, p.touch.start, this.onTouchStart, {
|
|
2080
2083
|
passive: !1
|
|
2081
2084
|
});
|
|
2082
2085
|
}
|
|
@@ -2087,7 +2090,7 @@ function mn() {
|
|
|
2087
2090
|
const {
|
|
2088
2091
|
ownerDocument: w
|
|
2089
2092
|
} = v;
|
|
2090
|
-
(0, r.removeEvent)(w,
|
|
2093
|
+
(0, r.removeEvent)(w, p.mouse.move, this.handleDrag), (0, r.removeEvent)(w, p.touch.move, this.handleDrag), (0, r.removeEvent)(w, p.mouse.stop, this.handleDragStop), (0, r.removeEvent)(w, p.touch.stop, this.handleDragStop), (0, r.removeEvent)(v, p.touch.start, this.onTouchStart, {
|
|
2091
2094
|
passive: !1
|
|
2092
2095
|
}), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(w);
|
|
2093
2096
|
}
|
|
@@ -2142,8 +2145,8 @@ function mn() {
|
|
|
2142
2145
|
* `offsetParent`, if set, uses the passed DOM node to compute drag offsets
|
|
2143
2146
|
* instead of using the parent node.
|
|
2144
2147
|
*/
|
|
2145
|
-
offsetParent: function(
|
|
2146
|
-
if (
|
|
2148
|
+
offsetParent: function(m, v) {
|
|
2149
|
+
if (m[v] && m[v].nodeType !== 1)
|
|
2147
2150
|
throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
2148
2151
|
},
|
|
2149
2152
|
/**
|
|
@@ -2237,9 +2240,9 @@ function mn() {
|
|
|
2237
2240
|
/**
|
|
2238
2241
|
* These properties should be defined on the child, not here.
|
|
2239
2242
|
*/
|
|
2240
|
-
className:
|
|
2241
|
-
style:
|
|
2242
|
-
transform:
|
|
2243
|
+
className: i.dontSetMe,
|
|
2244
|
+
style: i.dontSetMe,
|
|
2245
|
+
transform: i.dontSetMe
|
|
2243
2246
|
}), g(D, "defaultProps", {
|
|
2244
2247
|
allowAnyClick: !1,
|
|
2245
2248
|
// by default only accept left click
|
|
@@ -2257,9 +2260,9 @@ function mn() {
|
|
|
2257
2260
|
scale: 1
|
|
2258
2261
|
}), he;
|
|
2259
2262
|
}
|
|
2260
|
-
var
|
|
2263
|
+
var it;
|
|
2261
2264
|
function pn() {
|
|
2262
|
-
return
|
|
2265
|
+
return it || (it = 1, (function(e) {
|
|
2263
2266
|
Object.defineProperty(e, "__esModule", {
|
|
2264
2267
|
value: !0
|
|
2265
2268
|
}), Object.defineProperty(e, "DraggableCore", {
|
|
@@ -2268,7 +2271,7 @@ function pn() {
|
|
|
2268
2271
|
return b.default;
|
|
2269
2272
|
}
|
|
2270
2273
|
}), e.default = void 0;
|
|
2271
|
-
var n = u(ae), t = h(/* @__PURE__ */ vt()), r = h(lt),
|
|
2274
|
+
var n = u(ae), t = h(/* @__PURE__ */ vt()), r = h(lt), o = hn(), i = Re(), a = xt(), d = we(), b = h(mn()), g = h(wt());
|
|
2272
2275
|
function h(w) {
|
|
2273
2276
|
return w && w.__esModule ? w : { default: w };
|
|
2274
2277
|
}
|
|
@@ -2286,23 +2289,23 @@ function pn() {
|
|
|
2286
2289
|
return M;
|
|
2287
2290
|
})(w, N);
|
|
2288
2291
|
}
|
|
2289
|
-
function
|
|
2290
|
-
return
|
|
2292
|
+
function p() {
|
|
2293
|
+
return p = Object.assign ? Object.assign.bind() : function(w) {
|
|
2291
2294
|
for (var N = 1; N < arguments.length; N++) {
|
|
2292
2295
|
var C = arguments[N];
|
|
2293
2296
|
for (var S in C) ({}).hasOwnProperty.call(C, S) && (w[S] = C[S]);
|
|
2294
2297
|
}
|
|
2295
2298
|
return w;
|
|
2296
|
-
},
|
|
2299
|
+
}, p.apply(null, arguments);
|
|
2297
2300
|
}
|
|
2298
2301
|
function y(w, N, C) {
|
|
2299
2302
|
return (N = D(N)) in w ? Object.defineProperty(w, N, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : w[N] = C, w;
|
|
2300
2303
|
}
|
|
2301
2304
|
function D(w) {
|
|
2302
|
-
var N =
|
|
2305
|
+
var N = m(w, "string");
|
|
2303
2306
|
return typeof N == "symbol" ? N : N + "";
|
|
2304
2307
|
}
|
|
2305
|
-
function
|
|
2308
|
+
function m(w, N) {
|
|
2306
2309
|
if (typeof w != "object" || !w) return w;
|
|
2307
2310
|
var C = w[Symbol.toPrimitive];
|
|
2308
2311
|
if (C !== void 0) {
|
|
@@ -2429,12 +2432,12 @@ function pn() {
|
|
|
2429
2432
|
// Set top if vertical drag is enabled
|
|
2430
2433
|
y: (0, a.canDragY)(this) && K ? this.state.y : ee.y
|
|
2431
2434
|
};
|
|
2432
|
-
this.state.isElementSVG ? X = (0,
|
|
2433
|
-
const de = (0,
|
|
2435
|
+
this.state.isElementSVG ? X = (0, i.createSVGTransform)(se, $) : z = (0, i.createCSSTransform)(se, $);
|
|
2436
|
+
const de = (0, o.clsx)(S.props.className || "", E, {
|
|
2434
2437
|
[l]: this.state.dragging,
|
|
2435
2438
|
[f]: this.state.dragged
|
|
2436
2439
|
});
|
|
2437
|
-
return /* @__PURE__ */ n.createElement(b.default,
|
|
2440
|
+
return /* @__PURE__ */ n.createElement(b.default, p({}, T, {
|
|
2438
2441
|
onStart: this.onDragStart,
|
|
2439
2442
|
onDrag: this.onDrag,
|
|
2440
2443
|
onStop: this.onDragStop
|
|
@@ -2570,10 +2573,10 @@ function pn() {
|
|
|
2570
2573
|
});
|
|
2571
2574
|
})(De)), De;
|
|
2572
2575
|
}
|
|
2573
|
-
var
|
|
2576
|
+
var ot;
|
|
2574
2577
|
function yn() {
|
|
2575
|
-
if (
|
|
2576
|
-
|
|
2578
|
+
if (ot) return fe.exports;
|
|
2579
|
+
ot = 1;
|
|
2577
2580
|
const {
|
|
2578
2581
|
default: e,
|
|
2579
2582
|
DraggableCore: n
|
|
@@ -2599,14 +2602,14 @@ const vn = /* @__PURE__ */ an(bn), xn = ce((e, n) => {
|
|
|
2599
2602
|
boxShadow: "rgba(0, 0, 0, 0.5) 7px 7px 10px 0px"
|
|
2600
2603
|
},
|
|
2601
2604
|
...e.style || {}
|
|
2602
|
-
},
|
|
2605
|
+
}, o = e.testId || "not-set", i = e.className || "panel", a = Ct(null);
|
|
2603
2606
|
return (
|
|
2604
2607
|
// 3. Pass the internal ref to the Draggable component via 'nodeRef'
|
|
2605
2608
|
/* @__PURE__ */ s(
|
|
2606
2609
|
vn,
|
|
2607
2610
|
{
|
|
2608
2611
|
nodeRef: a,
|
|
2609
|
-
"data-testid":
|
|
2612
|
+
"data-testid": o,
|
|
2610
2613
|
axis: "both",
|
|
2611
2614
|
handle: ".handle",
|
|
2612
2615
|
onStart: (g, h) => {
|
|
@@ -2617,7 +2620,7 @@ const vn = /* @__PURE__ */ an(bn), xn = ce((e, n) => {
|
|
|
2617
2620
|
e.onDraggingChange?.(!1);
|
|
2618
2621
|
}, 100);
|
|
2619
2622
|
},
|
|
2620
|
-
children: /* @__PURE__ */ s("div", { ref: a, className:
|
|
2623
|
+
children: /* @__PURE__ */ s("div", { ref: a, className: i, style: r, children: e.children })
|
|
2621
2624
|
}
|
|
2622
2625
|
)
|
|
2623
2626
|
);
|
|
@@ -2647,23 +2650,23 @@ function nr({ children: e, addCssClasses: n }) {
|
|
|
2647
2650
|
}
|
|
2648
2651
|
const rr = (e) => {
|
|
2649
2652
|
console.warn("showToast TODO", e);
|
|
2650
|
-
}, wn = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0,
|
|
2653
|
+
}, wn = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, ir = ce((e, n) => {
|
|
2651
2654
|
let t = ct(Number(e.zoomScale || 0));
|
|
2652
|
-
const r = e.responsiveGrid || !1,
|
|
2655
|
+
const r = e.responsiveGrid || !1, o = e.isEditing || !1, i = {
|
|
2653
2656
|
"--bwj-dashboard-transform-scale": t,
|
|
2654
2657
|
"--bwj-dashboard-add-cols": wn(t)
|
|
2655
2658
|
}, a = G(
|
|
2656
2659
|
"dashboard-main-grid w-full",
|
|
2657
|
-
|
|
2660
|
+
o ? "editing" : "",
|
|
2658
2661
|
r ? "responsive-grid" : "",
|
|
2659
|
-
`border border-dashed ${
|
|
2662
|
+
`border border-dashed ${o ? "border-primary border-opacity-50" : "border-transparent"}`
|
|
2660
2663
|
);
|
|
2661
|
-
return /* @__PURE__ */ s("div", { className: a, style:
|
|
2664
|
+
return /* @__PURE__ */ s("div", { className: a, style: i, children: e.children });
|
|
2662
2665
|
}), $e = "size-5", Cn = (e, n) => {
|
|
2663
2666
|
const t = e.hideTitle && !e.isEditing, r = e.noBorder;
|
|
2664
|
-
let
|
|
2665
|
-
r ?
|
|
2666
|
-
const
|
|
2667
|
+
let o = `dashboard-widget ${e.isEditing ? "editing" : ""} border border-solid`;
|
|
2668
|
+
r ? o = `${o} border-transparent border-opacity-0` : (e.borderCssClasses || "").trim().length > 0 ? o = `${o} ${e.borderCssClasses}` : o = `${o} border-card-invert border-opacity-20`, e.noShadow && (o = `${o} no-shadow`), e.noPadding && (o = `${o} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? o = `${o} ${e.backgroundCssClasses}` : o = `${o} bg-card content-card`, ["large", "xlarge"].indexOf(e.size || "") > -1 && (o = `${o} ${e.size}-widget`);
|
|
2669
|
+
const i = () => {
|
|
2667
2670
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey, e.parentWidgetKey);
|
|
2668
2671
|
}, a = (b) => {
|
|
2669
2672
|
e.onMoveClick && e.widgetKey && e.onMoveClick(b, e.widgetKey, e.parentWidgetKey);
|
|
@@ -2672,7 +2675,7 @@ const rr = (e) => {
|
|
|
2672
2675
|
t ? "hidden" : "flex items-center justify-between border-b border-solid border-card-invert",
|
|
2673
2676
|
t ? "border-opacity-0" : "border-opacity-20"
|
|
2674
2677
|
);
|
|
2675
|
-
return /* @__PURE__ */ W("div", { className:
|
|
2678
|
+
return /* @__PURE__ */ W("div", { className: o, children: [
|
|
2676
2679
|
/* @__PURE__ */ W("div", { className: d, children: [
|
|
2677
2680
|
/* @__PURE__ */ W("div", { className: "widget-title-wrapper w-full flex flex-row gap-2 items-center justify-between", children: [
|
|
2678
2681
|
/* @__PURE__ */ W("h2", { className: "widget-title", children: [
|
|
@@ -2721,7 +2724,7 @@ const rr = (e) => {
|
|
|
2721
2724
|
placement: "top",
|
|
2722
2725
|
title: "Remove Widget"
|
|
2723
2726
|
},
|
|
2724
|
-
onClick: () =>
|
|
2727
|
+
onClick: () => i(),
|
|
2725
2728
|
children: /* @__PURE__ */ s(gt, { className: $e })
|
|
2726
2729
|
}
|
|
2727
2730
|
)
|
|
@@ -2731,8 +2734,8 @@ const rr = (e) => {
|
|
|
2731
2734
|
/* @__PURE__ */ s("div", { className: "widget-inner", children: e.children })
|
|
2732
2735
|
] });
|
|
2733
2736
|
}, at = ce(Cn), Sn = (e, n) => {
|
|
2734
|
-
const t = (
|
|
2735
|
-
return !(r[0] !==
|
|
2737
|
+
const t = (i) => i.replace(/[^0-9.]/g, ""), r = t(e).split(".").map(Number), o = t(n).split(".").map(Number);
|
|
2738
|
+
return !(r[0] !== o[0] || r[1] < o[1]);
|
|
2736
2739
|
};
|
|
2737
2740
|
function Dn(e) {
|
|
2738
2741
|
return /* @__PURE__ */ s("div", { className: "dashboard-widget", children: /* @__PURE__ */ W("div", { className: "absolute inset-0 bg-black flex flex-col items-center justify-center text-center", children: [
|
|
@@ -2745,8 +2748,8 @@ function Nn({
|
|
|
2745
2748
|
maxIndex: n,
|
|
2746
2749
|
widgetKey: t,
|
|
2747
2750
|
parentWidgetKey: r,
|
|
2748
|
-
targetContainerKey:
|
|
2749
|
-
childWidgetsConfig:
|
|
2751
|
+
targetContainerKey: o,
|
|
2752
|
+
childWidgetsConfig: i,
|
|
2750
2753
|
widgetCatalog: a,
|
|
2751
2754
|
isEditing: d,
|
|
2752
2755
|
// for additional props passed to all widget from the dashboard through the DynamicWidgetLoader:
|
|
@@ -2755,27 +2758,27 @@ function Nn({
|
|
|
2755
2758
|
onMoveClick: h,
|
|
2756
2759
|
selectContainer: u
|
|
2757
2760
|
}) {
|
|
2758
|
-
const
|
|
2759
|
-
if (!
|
|
2761
|
+
const p = `${t}`.split("_"), y = p.length > 1, D = y ? p[0] : t, m = a.get(D);
|
|
2762
|
+
if (!m)
|
|
2760
2763
|
return /* @__PURE__ */ s("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
|
|
2761
2764
|
"Widget not found in catalog: ",
|
|
2762
2765
|
D
|
|
2763
2766
|
] }) });
|
|
2764
2767
|
let v = null, w = !1;
|
|
2765
|
-
const N = !!
|
|
2768
|
+
const N = !!m.isContainer, C = y ? mt(t) : "", S = N ? (i || []).filter((l) => l.parentWidgetKey === t) : [], c = {
|
|
2766
2769
|
index: e,
|
|
2767
2770
|
maxIndex: n,
|
|
2768
2771
|
widgetKey: t,
|
|
2769
2772
|
parentWidgetKey: r,
|
|
2770
2773
|
isEditing: d,
|
|
2771
2774
|
extraProps: b,
|
|
2772
|
-
title: y ? C :
|
|
2775
|
+
title: y ? C : m.title,
|
|
2773
2776
|
onRemoveClick: g,
|
|
2774
2777
|
onMoveClick: h
|
|
2775
2778
|
};
|
|
2776
|
-
if (
|
|
2777
|
-
if (!
|
|
2778
|
-
const l = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3", f =
|
|
2779
|
+
if (m.component ? (v = m.component, w = !1) : m.loader && (w = !0, v = st(() => {
|
|
2780
|
+
if (!m) return null;
|
|
2781
|
+
const l = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3", f = m.meta?.externalDependencies || [], M = f.find(($) => $.startsWith("react@"));
|
|
2779
2782
|
if (M) {
|
|
2780
2783
|
const $ = M.split("@")[1];
|
|
2781
2784
|
if (!Sn(l, $))
|
|
@@ -2814,12 +2817,12 @@ function Nn({
|
|
|
2814
2817
|
] }) })
|
|
2815
2818
|
}));
|
|
2816
2819
|
}
|
|
2817
|
-
if (
|
|
2818
|
-
return
|
|
2819
|
-
if (
|
|
2820
|
+
if (m.component)
|
|
2821
|
+
return m.component;
|
|
2822
|
+
if (m.loader) {
|
|
2820
2823
|
const $ = async () => {
|
|
2821
2824
|
try {
|
|
2822
|
-
return await
|
|
2825
|
+
return await m.loader();
|
|
2823
2826
|
} catch (I) {
|
|
2824
2827
|
return console.error(`CDN Load Failure for ${t}:`, I), {
|
|
2825
2828
|
default: () => /* @__PURE__ */ s(at, { ...c, children: /* @__PURE__ */ W("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
@@ -2829,7 +2832,7 @@ function Nn({
|
|
|
2829
2832
|
'"'
|
|
2830
2833
|
] }),
|
|
2831
2834
|
/* @__PURE__ */ s("p", { className: "text-xs italic", children: "The remote plugin is unavailable or incompatible." }),
|
|
2832
|
-
/* @__PURE__ */ s("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(
|
|
2835
|
+
/* @__PURE__ */ s("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(m.meta || {}, null, 2) })
|
|
2833
2836
|
] }) })
|
|
2834
2837
|
};
|
|
2835
2838
|
}
|
|
@@ -2837,13 +2840,13 @@ function Nn({
|
|
|
2837
2840
|
return ae.lazy($);
|
|
2838
2841
|
}
|
|
2839
2842
|
return null;
|
|
2840
|
-
}, [
|
|
2843
|
+
}, [m, t])), !v)
|
|
2841
2844
|
return /* @__PURE__ */ s("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
|
|
2842
2845
|
"Widget definition incomplete: ",
|
|
2843
2846
|
D
|
|
2844
2847
|
] }) });
|
|
2845
2848
|
const E = N ? {
|
|
2846
|
-
highlight:
|
|
2849
|
+
highlight: o === t,
|
|
2847
2850
|
selectContainer: u,
|
|
2848
2851
|
// The children prop is the recursive call back to DynamicWidgetLoader
|
|
2849
2852
|
children: S.map((l, f) => /* @__PURE__ */ s(
|
|
@@ -2862,12 +2865,12 @@ function Nn({
|
|
|
2862
2865
|
`${l.widgetKey}_${f}`
|
|
2863
2866
|
))
|
|
2864
2867
|
} : {};
|
|
2865
|
-
return w ? /* @__PURE__ */ s(St, { fallback: /* @__PURE__ */ s(Dn, { title: `Loading ${
|
|
2868
|
+
return w ? /* @__PURE__ */ s(St, { fallback: /* @__PURE__ */ s(Dn, { title: `Loading ${m.title}` }), children: /* @__PURE__ */ s(v, { ...c, ...E }) }) : /* @__PURE__ */ s(v, { ...c, ...E });
|
|
2866
2869
|
}
|
|
2867
2870
|
const xe = "size-5";
|
|
2868
2871
|
function ke(e) {
|
|
2869
|
-
const n = e.highlight || !1, t = e.direction || "column", r = e.children.length > 0,
|
|
2870
|
-
let d = n ? "border-transparent" :
|
|
2872
|
+
const n = e.highlight || !1, t = e.direction || "column", r = e.children.length > 0, o = e.isEditing || !1;
|
|
2873
|
+
let d = n ? "border-transparent" : o && !r ? "border-card-invert" : "border-transparent";
|
|
2871
2874
|
const b = ["large", "xlarge"].includes(e.size || "");
|
|
2872
2875
|
let g = "";
|
|
2873
2876
|
["large", "xlarge"].indexOf(e.size || "") > -1 && (g = `${e.size}-widget`);
|
|
@@ -2876,28 +2879,28 @@ function ke(e) {
|
|
|
2876
2879
|
let u = G(
|
|
2877
2880
|
"dashboard-widget-container relative ",
|
|
2878
2881
|
r ? "" : "has-no-children",
|
|
2879
|
-
|
|
2882
|
+
o ? "editing" : "",
|
|
2880
2883
|
h,
|
|
2881
2884
|
g,
|
|
2882
2885
|
b ? "widget-container-grid" : "widget-container-flex",
|
|
2883
2886
|
`direction-${t}`,
|
|
2884
2887
|
`border ${d}`,
|
|
2885
2888
|
`${n ? "highlight-container" : ""} ${d}`
|
|
2886
|
-
),
|
|
2889
|
+
), p = `widget-container-header direction-${t} flex items-center border-1 ${d}`;
|
|
2887
2890
|
const y = () => {
|
|
2888
2891
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey);
|
|
2889
2892
|
}, D = (v) => {
|
|
2890
2893
|
e.onMoveClick && e.widgetKey && e.onMoveClick(v, e.widgetKey, e.parentWidgetKey);
|
|
2891
|
-
},
|
|
2894
|
+
}, m = () => {
|
|
2892
2895
|
e.selectContainer && e.widgetKey && e.selectContainer(e.widgetKey);
|
|
2893
2896
|
};
|
|
2894
2897
|
return /* @__PURE__ */ W("div", { "data-testid": `container_${e.widgetKey}`, className: u, children: [
|
|
2895
|
-
/* @__PURE__ */ W("div", { className:
|
|
2898
|
+
/* @__PURE__ */ W("div", { className: p, children: [
|
|
2896
2899
|
/* @__PURE__ */ s(
|
|
2897
2900
|
"div",
|
|
2898
2901
|
{
|
|
2899
2902
|
className: "widget-title-wrapper w-full flex whitespace-nowrap",
|
|
2900
|
-
onClick:
|
|
2903
|
+
onClick: m,
|
|
2901
2904
|
children: /* @__PURE__ */ s("span", { className: "text-sm font-semibold capitalize", children: e.title })
|
|
2902
2905
|
}
|
|
2903
2906
|
),
|
|
@@ -2912,7 +2915,7 @@ function ke(e) {
|
|
|
2912
2915
|
placement: "top",
|
|
2913
2916
|
title: "Target this Container"
|
|
2914
2917
|
},
|
|
2915
|
-
onClick:
|
|
2918
|
+
onClick: m,
|
|
2916
2919
|
children: /* @__PURE__ */ s(
|
|
2917
2920
|
tn,
|
|
2918
2921
|
{
|
|
@@ -2967,7 +2970,7 @@ function ke(e) {
|
|
|
2967
2970
|
/* @__PURE__ */ s("div", { "data-testid": `childrenwrapper_${e.widgetKey}`, className: "widget-container-inner", children: e.children })
|
|
2968
2971
|
] });
|
|
2969
2972
|
}
|
|
2970
|
-
function
|
|
2973
|
+
function or(e) {
|
|
2971
2974
|
const { direction: n, ...t } = e;
|
|
2972
2975
|
return /* @__PURE__ */ s(ke, { direction: "column", ...t });
|
|
2973
2976
|
}
|
|
@@ -2985,14 +2988,14 @@ function We({
|
|
|
2985
2988
|
alreadyAdded: n,
|
|
2986
2989
|
addWidget: t
|
|
2987
2990
|
}) {
|
|
2988
|
-
const [r,
|
|
2991
|
+
const [r, o] = le(!1), i = e.icon || nn, a = e.displayName || "Unknown", d = e.description || "---", g = (e.noDuplicatedWidgets || !1) && n, h = G(`
|
|
2989
2992
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2990
2993
|
${g ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
|
|
2991
2994
|
`);
|
|
2992
2995
|
return /* @__PURE__ */ W("div", { className: h, style: { width: "calc(100% - 1rem)" }, onClick: () => {
|
|
2993
2996
|
g || t();
|
|
2994
2997
|
}, children: [
|
|
2995
|
-
/* @__PURE__ */ s(
|
|
2998
|
+
/* @__PURE__ */ s(i, { className: "" }),
|
|
2996
2999
|
/* @__PURE__ */ W("div", { className: "w-full", children: [
|
|
2997
3000
|
/* @__PURE__ */ W("div", { className: "flex flex-row items-center gap-2 justify-between", children: [
|
|
2998
3001
|
/* @__PURE__ */ s("span", { className: "font-bold", children: a }),
|
|
@@ -3001,7 +3004,7 @@ function We({
|
|
|
3001
3004
|
/* @__PURE__ */ W("div", { className: "flex flex-col text-xs", children: [
|
|
3002
3005
|
/* @__PURE__ */ s("div", { children: d }),
|
|
3003
3006
|
/* @__PURE__ */ s("div", { className: "mt-3 cursor-pointer", onClick: (y) => {
|
|
3004
|
-
y.stopPropagation(), y.preventDefault(),
|
|
3007
|
+
y.stopPropagation(), y.preventDefault(), o(!r);
|
|
3005
3008
|
}, children: "Externals:" }),
|
|
3006
3009
|
r && /* @__PURE__ */ s("dl", { className: "ml-2 flex flex-col text-xs", children: e.externalDependencies.map((y, D) => /* @__PURE__ */ W("dd", { children: [
|
|
3007
3010
|
"- ",
|
|
@@ -3015,9 +3018,9 @@ function Tn({
|
|
|
3015
3018
|
item: e,
|
|
3016
3019
|
onSettingItemChanged: n
|
|
3017
3020
|
}) {
|
|
3018
|
-
const t = e.displayName || "Unknown", r = e.description || "---",
|
|
3021
|
+
const t = e.displayName || "Unknown", r = e.description || "---", o = G(`
|
|
3019
3022
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
3020
|
-
`),
|
|
3023
|
+
`), i = (d) => {
|
|
3021
3024
|
const b = d.key;
|
|
3022
3025
|
if (["ArrowUp", "ArrowDown"].includes(b)) {
|
|
3023
3026
|
d.preventDefault();
|
|
@@ -3033,7 +3036,7 @@ function Tn({
|
|
|
3033
3036
|
value: d.target.value || ""
|
|
3034
3037
|
});
|
|
3035
3038
|
};
|
|
3036
|
-
return /* @__PURE__ */ s("div", { className:
|
|
3039
|
+
return /* @__PURE__ */ s("div", { className: o, style: { width: "calc(100% - 1rem)" }, children: /* @__PURE__ */ W("div", { className: "w-full", children: [
|
|
3037
3040
|
/* @__PURE__ */ s("div", { className: "flex flex-row items-center gap-2 justify-between", children: /* @__PURE__ */ s("span", { className: "font-bold", children: t }) }),
|
|
3038
3041
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2 text-xs", children: /* @__PURE__ */ s("div", { children: r }) }),
|
|
3039
3042
|
/* @__PURE__ */ W("div", { children: [
|
|
@@ -3046,7 +3049,7 @@ function Tn({
|
|
|
3046
3049
|
className: "w-full",
|
|
3047
3050
|
value: e.value,
|
|
3048
3051
|
onChange: a,
|
|
3049
|
-
onKeyDown:
|
|
3052
|
+
onKeyDown: i
|
|
3050
3053
|
}
|
|
3051
3054
|
)
|
|
3052
3055
|
] })
|
|
@@ -3061,18 +3064,18 @@ function lr({
|
|
|
3061
3064
|
widgetsCatalog: n,
|
|
3062
3065
|
currentDashboardConfig: t,
|
|
3063
3066
|
undoStatus: r,
|
|
3064
|
-
addWidget:
|
|
3065
|
-
addContainer:
|
|
3067
|
+
addWidget: o,
|
|
3068
|
+
addContainer: i,
|
|
3066
3069
|
onSettingItemsUpdated: a,
|
|
3067
3070
|
onResetToDefaultDashboardClick: d,
|
|
3068
3071
|
onUndoOrRedo: b,
|
|
3069
3072
|
onDoneClick: g
|
|
3070
3073
|
}) {
|
|
3071
|
-
const [h, u] = le("Editing"), [
|
|
3074
|
+
const [h, u] = le("Editing"), [p, y] = le(0), [D, m] = le(""), w = Array.from(n.keys()).map((T) => ({
|
|
3072
3075
|
widgetKey: T,
|
|
3073
3076
|
metaData: $t(T, n)
|
|
3074
3077
|
})), N = (T) => {
|
|
3075
|
-
|
|
3078
|
+
m(T.target.value);
|
|
3076
3079
|
}, C = (T) => {
|
|
3077
3080
|
const z = D.trim().toLowerCase();
|
|
3078
3081
|
return z.length < 1 ? !0 : T.displayName.trim().toLowerCase().includes(z) || T.description.toLowerCase().includes(z);
|
|
@@ -3081,7 +3084,7 @@ function lr({
|
|
|
3081
3084
|
return z.length < 1 ? !0 : T.displayName.trim().toLowerCase().includes(z) || T.description.toLowerCase().includes(z);
|
|
3082
3085
|
}, c = (T) => G(
|
|
3083
3086
|
"px-4 py-2 font-medium cursor-pointer border-b-2 border-transparent hover:border-primary focus:outline-none",
|
|
3084
|
-
T ===
|
|
3087
|
+
T === p ? "text-primary border-primary" : ""
|
|
3085
3088
|
), E = !!e;
|
|
3086
3089
|
Dt(() => {
|
|
3087
3090
|
if (e) {
|
|
@@ -3092,7 +3095,7 @@ function lr({
|
|
|
3092
3095
|
u("Editing Dashboard");
|
|
3093
3096
|
}, [e]);
|
|
3094
3097
|
const l = (T) => {
|
|
3095
|
-
E ?
|
|
3098
|
+
E ? o(T, e) : o(T);
|
|
3096
3099
|
}, f = (T) => {
|
|
3097
3100
|
const z = (t.cssSettings || []).map((X) => X.key === T.key ? T : X);
|
|
3098
3101
|
a(z);
|
|
@@ -3193,7 +3196,7 @@ function lr({
|
|
|
3193
3196
|
maxHeight: "360px"
|
|
3194
3197
|
},
|
|
3195
3198
|
children: [
|
|
3196
|
-
|
|
3199
|
+
p === 0 && w.filter(
|
|
3197
3200
|
(T) => T.metaData.categories.includes("Widget") && C(T.metaData)
|
|
3198
3201
|
).map((T) => /* @__PURE__ */ s(
|
|
3199
3202
|
We,
|
|
@@ -3205,7 +3208,7 @@ function lr({
|
|
|
3205
3208
|
},
|
|
3206
3209
|
T.widgetKey
|
|
3207
3210
|
)),
|
|
3208
|
-
|
|
3211
|
+
p === 1 && w.filter(
|
|
3209
3212
|
(T) => T.metaData.categories.includes("Chart") && C(T.metaData)
|
|
3210
3213
|
).map((T) => /* @__PURE__ */ s(
|
|
3211
3214
|
We,
|
|
@@ -3217,17 +3220,17 @@ function lr({
|
|
|
3217
3220
|
},
|
|
3218
3221
|
T.widgetKey
|
|
3219
3222
|
)),
|
|
3220
|
-
!E &&
|
|
3223
|
+
!E && p === 2 && w.filter((T) => T.metaData.categories.includes("Container")).map((T) => /* @__PURE__ */ s(
|
|
3221
3224
|
We,
|
|
3222
3225
|
{
|
|
3223
3226
|
widgetKey: T.widgetKey,
|
|
3224
3227
|
metaData: T.metaData,
|
|
3225
3228
|
alreadyAdded: Ie(T.widgetKey, t),
|
|
3226
|
-
addWidget: () =>
|
|
3229
|
+
addWidget: () => i(T.widgetKey)
|
|
3227
3230
|
},
|
|
3228
3231
|
T.widgetKey
|
|
3229
3232
|
)),
|
|
3230
|
-
!E &&
|
|
3233
|
+
!E && p === 3 && (t.cssSettings || []).filter(S).map((T) => /* @__PURE__ */ s(
|
|
3231
3234
|
Tn,
|
|
3232
3235
|
{
|
|
3233
3236
|
item: T,
|
|
@@ -3259,15 +3262,15 @@ export {
|
|
|
3259
3262
|
J as Button,
|
|
3260
3263
|
nn as CircleQuestionMark,
|
|
3261
3264
|
tn as CrosshairIcon,
|
|
3262
|
-
|
|
3263
|
-
|
|
3265
|
+
ir as DashboardGrid,
|
|
3266
|
+
Fe as DashboardMaxZoomScale,
|
|
3264
3267
|
Ae as DashboardMinZoomScale,
|
|
3265
3268
|
at as DashboardWidgetBase,
|
|
3266
3269
|
Mt as DashboardZoomStep,
|
|
3267
|
-
|
|
3270
|
+
Fn as DeleteIcon,
|
|
3268
3271
|
xn as DraggablePanel,
|
|
3269
3272
|
Nn as DynamicWidgetLoader,
|
|
3270
|
-
|
|
3273
|
+
Ln as EditIcon,
|
|
3271
3274
|
Vn as GridIcon,
|
|
3272
3275
|
en as HandGrabIcon,
|
|
3273
3276
|
Qt as HandIcon,
|
|
@@ -3288,7 +3291,7 @@ export {
|
|
|
3288
3291
|
pt as TextField,
|
|
3289
3292
|
Gt as TimerResetIcon,
|
|
3290
3293
|
Zt as UndoIcon,
|
|
3291
|
-
|
|
3294
|
+
or as WidgetContainerColumn,
|
|
3292
3295
|
ar as WidgetContainerLarge,
|
|
3293
3296
|
sr as WidgetContainerRow,
|
|
3294
3297
|
lr as WidgetsCatalogFlyout,
|