@tenorlab/react-dashboard 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-dashboard.es.js +158 -158
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import se, { useState as le, useCallback as ue, useMemo as at, forwardRef as ce, useRef as
|
|
1
|
+
import se, { useState as le, useCallback as ue, useMemo as at, forwardRef as ce, useRef as xt, Suspense as Ct, useEffect as St } from "react";
|
|
2
2
|
import { jsxs as W, jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import st from "react-dom";
|
|
4
4
|
const Dt = [
|
|
@@ -182,7 +182,7 @@ const Dt = [
|
|
|
182
182
|
}
|
|
183
183
|
return null;
|
|
184
184
|
}, It = (e, n, t, r) => {
|
|
185
|
-
const i = `${n}
|
|
185
|
+
const i = `${n}/widget-${t}/widget-${t}.meta.ts`, o = e[i], a = `${r}Meta`;
|
|
186
186
|
if (o && o[a])
|
|
187
187
|
return o[a];
|
|
188
188
|
}, Wn = async (e) => new Promise(async (n, t) => {
|
|
@@ -534,8 +534,8 @@ const jt = (e) => {
|
|
|
534
534
|
undoIndex: 0,
|
|
535
535
|
config: g
|
|
536
536
|
};
|
|
537
|
-
return r((
|
|
538
|
-
...
|
|
537
|
+
return r((x) => ({
|
|
538
|
+
...x,
|
|
539
539
|
[u]: 0
|
|
540
540
|
})), {
|
|
541
541
|
...h,
|
|
@@ -546,7 +546,7 @@ const jt = (e) => {
|
|
|
546
546
|
}, []), o = ue(
|
|
547
547
|
(g) => {
|
|
548
548
|
n((u) => {
|
|
549
|
-
const h = g.dashboardId, y = u[h] || [],
|
|
549
|
+
const h = g.dashboardId, y = u[h] || [], x = t[h] ?? -1, v = y.slice(0, x + 1), b = {
|
|
550
550
|
undoIndex: v.length,
|
|
551
551
|
// New index based on trimmed length
|
|
552
552
|
config: g
|
|
@@ -585,8 +585,8 @@ const jt = (e) => {
|
|
|
585
585
|
), m = ue(
|
|
586
586
|
(g) => {
|
|
587
587
|
r((u) => {
|
|
588
|
-
const h = e[g]?.length || 0, y = u[g] ?? -1,
|
|
589
|
-
return
|
|
588
|
+
const h = e[g]?.length || 0, y = u[g] ?? -1, x = Math.min(h - 1, y + 1);
|
|
589
|
+
return x !== y ? { ...u, [g]: x } : u;
|
|
590
590
|
});
|
|
591
591
|
},
|
|
592
592
|
[
|
|
@@ -602,8 +602,8 @@ const jt = (e) => {
|
|
|
602
602
|
undo: d,
|
|
603
603
|
redo: m,
|
|
604
604
|
getUndoStatus: (g) => {
|
|
605
|
-
const u = t[g] ?? -1, h = e[g]?.length || 0, y = u <= 0,
|
|
606
|
-
return { isUndoDisabled: y, isRedoDisabled:
|
|
605
|
+
const u = t[g] ?? -1, h = e[g]?.length || 0, y = u <= 0, x = u >= h - 1;
|
|
606
|
+
return { isUndoDisabled: y, isRedoDisabled: x };
|
|
607
607
|
},
|
|
608
608
|
undoHistory: e,
|
|
609
609
|
historyIndex: t
|
|
@@ -907,14 +907,14 @@ function J(e) {
|
|
|
907
907
|
children: p,
|
|
908
908
|
...g
|
|
909
909
|
} = e, u = () => {
|
|
910
|
-
const y = e.isIconButton || !1,
|
|
910
|
+
const y = e.isIconButton || !1, x = e.category || "primary", v = e.buttonType || "normal", b = e.disabled || !1, C = e.className || "", T = e.font || "semibold", S = Number((e.border || 0) > 0 ? e.border : 0);
|
|
911
911
|
let D = (e.borderColor || "").trim();
|
|
912
912
|
D = D.length > 0 ? D : "";
|
|
913
913
|
const l = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), N = e.shadow || "sm", c = e.shadowHover || "md", f = (e.addCss || "").trim(), P = e.justifyCss || "justify-center";
|
|
914
914
|
if (y)
|
|
915
915
|
return Z(
|
|
916
916
|
"flex flex-row items-center",
|
|
917
|
-
b ? "text-disabled" : `text-${
|
|
917
|
+
b ? "text-disabled" : `text-${x} hover:brightness-110 cursor-pointer`,
|
|
918
918
|
C || ""
|
|
919
919
|
);
|
|
920
920
|
const $ = [
|
|
@@ -930,14 +930,14 @@ function J(e) {
|
|
|
930
930
|
$.push("cursor-pointer");
|
|
931
931
|
let O = "";
|
|
932
932
|
Se.has(v) ? O = `${Se.get(v)}` : O = `${Se.get("normal")}`, S < 1 && (O = O.replace("border-[category]", ""));
|
|
933
|
-
const E = O.replace(/\[category\]/g,
|
|
933
|
+
const E = O.replace(/\[category\]/g, x).trim();
|
|
934
934
|
$.push(E);
|
|
935
935
|
}
|
|
936
936
|
return S > 0 ? ($.push(`border-[${S}px]`), $.push(`border-${D}`)) : ($.push("border-[1px]"), $.push("border-transparent")), l > 0 ? ($.push(`hover:border-[${l}px] group-hover:border-[${l}px]`), $.push(`hover:border-${D} group-hover:border-${D}`)) : $.push("hover:border-[1px] group-hover:border-[1px]"), $.push(`shadow-${N}`), $.push(`hover:shadow-${c} group-hover:shadow-${c}`), f.length > 0 && $.push(f), f.indexOf("hidden") === -1 && $.push("inline-flex"), $.push(P), $.join(" ").trim();
|
|
937
937
|
}, h = () => {
|
|
938
|
-
const y = e.px || 0.7,
|
|
938
|
+
const y = e.px || 0.7, x = e.py || 0.25;
|
|
939
939
|
return {
|
|
940
|
-
padding: r ? 0 : `${
|
|
940
|
+
padding: r ? 0 : `${x}rem ${y}rem `
|
|
941
941
|
};
|
|
942
942
|
};
|
|
943
943
|
return /* @__PURE__ */ s("button", { type: "button", disabled: t, className: u(), style: h(), ...g, children: p });
|
|
@@ -996,7 +996,7 @@ var Ue;
|
|
|
996
996
|
function an() {
|
|
997
997
|
if (Ue) return V;
|
|
998
998
|
Ue = 1;
|
|
999
|
-
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, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, m = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, p = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, h = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115,
|
|
999
|
+
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, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, m = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, p = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, h = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, v = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, b = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1000
1000
|
function S(l) {
|
|
1001
1001
|
if (typeof l == "object" && l !== null) {
|
|
1002
1002
|
var N = l.$$typeof;
|
|
@@ -1014,7 +1014,7 @@ function an() {
|
|
|
1014
1014
|
switch (l = l && l.$$typeof, l) {
|
|
1015
1015
|
case d:
|
|
1016
1016
|
case g:
|
|
1017
|
-
case
|
|
1017
|
+
case x:
|
|
1018
1018
|
case y:
|
|
1019
1019
|
case a:
|
|
1020
1020
|
return l;
|
|
@@ -1030,7 +1030,7 @@ function an() {
|
|
|
1030
1030
|
function D(l) {
|
|
1031
1031
|
return S(l) === p;
|
|
1032
1032
|
}
|
|
1033
|
-
return V.AsyncMode = m, V.ConcurrentMode = p, V.ContextConsumer = d, V.ContextProvider = a, V.Element = n, V.ForwardRef = g, V.Fragment = r, V.Lazy =
|
|
1033
|
+
return V.AsyncMode = m, V.ConcurrentMode = p, V.ContextConsumer = d, V.ContextProvider = a, V.Element = n, V.ForwardRef = g, V.Fragment = r, V.Lazy = x, V.Memo = y, V.Portal = t, V.Profiler = o, V.StrictMode = i, V.Suspense = u, V.isAsyncMode = function(l) {
|
|
1034
1034
|
return D(l) || S(l) === m;
|
|
1035
1035
|
}, V.isConcurrentMode = D, V.isContextConsumer = function(l) {
|
|
1036
1036
|
return S(l) === d;
|
|
@@ -1043,7 +1043,7 @@ function an() {
|
|
|
1043
1043
|
}, V.isFragment = function(l) {
|
|
1044
1044
|
return S(l) === r;
|
|
1045
1045
|
}, V.isLazy = function(l) {
|
|
1046
|
-
return S(l) ===
|
|
1046
|
+
return S(l) === x;
|
|
1047
1047
|
}, V.isMemo = function(l) {
|
|
1048
1048
|
return S(l) === y;
|
|
1049
1049
|
}, V.isPortal = function(l) {
|
|
@@ -1055,17 +1055,17 @@ function an() {
|
|
|
1055
1055
|
}, V.isSuspense = function(l) {
|
|
1056
1056
|
return S(l) === u;
|
|
1057
1057
|
}, V.isValidElementType = function(l) {
|
|
1058
|
-
return typeof l == "string" || typeof l == "function" || l === r || l === p || l === o || l === i || l === u || l === h || typeof l == "object" && l !== null && (l.$$typeof ===
|
|
1058
|
+
return typeof l == "string" || typeof l == "function" || l === r || l === p || l === o || l === i || l === u || l === h || typeof l == "object" && l !== null && (l.$$typeof === x || l.$$typeof === y || l.$$typeof === a || l.$$typeof === d || l.$$typeof === g || l.$$typeof === b || l.$$typeof === C || l.$$typeof === T || l.$$typeof === v);
|
|
1059
1059
|
}, V.typeOf = S, V;
|
|
1060
1060
|
}
|
|
1061
1061
|
var Y = {};
|
|
1062
1062
|
var Ve;
|
|
1063
1063
|
function sn() {
|
|
1064
1064
|
return Ve || (Ve = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
1065
|
-
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, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, m = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, p = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, h = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115,
|
|
1065
|
+
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, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, m = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, p = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, h = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, v = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, b = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1066
1066
|
function S(_) {
|
|
1067
1067
|
return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1068
|
-
_ === r || _ === p || _ === o || _ === i || _ === u || _ === h || typeof _ == "object" && _ !== null && (_.$$typeof ===
|
|
1068
|
+
_ === r || _ === p || _ === o || _ === i || _ === u || _ === h || typeof _ == "object" && _ !== null && (_.$$typeof === x || _.$$typeof === y || _.$$typeof === a || _.$$typeof === d || _.$$typeof === g || _.$$typeof === b || _.$$typeof === C || _.$$typeof === T || _.$$typeof === v);
|
|
1069
1069
|
}
|
|
1070
1070
|
function D(_) {
|
|
1071
1071
|
if (typeof _ == "object" && _ !== null) {
|
|
@@ -1086,7 +1086,7 @@ function sn() {
|
|
|
1086
1086
|
switch (je) {
|
|
1087
1087
|
case d:
|
|
1088
1088
|
case g:
|
|
1089
|
-
case
|
|
1089
|
+
case x:
|
|
1090
1090
|
case y:
|
|
1091
1091
|
case a:
|
|
1092
1092
|
return je;
|
|
@@ -1099,11 +1099,11 @@ function sn() {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
1102
|
-
var l = m, N = p, c = d, f = a, P = n, $ = g, O = r, E =
|
|
1102
|
+
var l = m, N = p, c = d, f = a, P = n, $ = g, O = r, E = x, z = y, X = t, Q = o, H = i, ee = u, ae = !1;
|
|
1103
1103
|
function de(_) {
|
|
1104
|
-
return ae || (ae = !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.")),
|
|
1104
|
+
return ae || (ae = !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.")), w(_) || D(_) === m;
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1106
|
+
function w(_) {
|
|
1107
1107
|
return D(_) === p;
|
|
1108
1108
|
}
|
|
1109
1109
|
function M(_) {
|
|
@@ -1122,7 +1122,7 @@ function sn() {
|
|
|
1122
1122
|
return D(_) === r;
|
|
1123
1123
|
}
|
|
1124
1124
|
function R(_) {
|
|
1125
|
-
return D(_) ===
|
|
1125
|
+
return D(_) === x;
|
|
1126
1126
|
}
|
|
1127
1127
|
function j(_) {
|
|
1128
1128
|
return D(_) === y;
|
|
@@ -1139,7 +1139,7 @@ function sn() {
|
|
|
1139
1139
|
function G(_) {
|
|
1140
1140
|
return D(_) === u;
|
|
1141
1141
|
}
|
|
1142
|
-
Y.AsyncMode = l, Y.ConcurrentMode = N, Y.ContextConsumer = c, Y.ContextProvider = f, Y.Element = P, Y.ForwardRef = $, Y.Fragment = O, Y.Lazy = E, Y.Memo = z, Y.Portal = X, Y.Profiler = Q, Y.StrictMode = H, Y.Suspense = ee, Y.isAsyncMode = de, Y.isConcurrentMode =
|
|
1142
|
+
Y.AsyncMode = l, Y.ConcurrentMode = N, Y.ContextConsumer = c, Y.ContextProvider = f, Y.Element = P, Y.ForwardRef = $, Y.Fragment = O, Y.Lazy = E, Y.Memo = z, Y.Portal = X, Y.Profiler = Q, Y.StrictMode = H, Y.Suspense = ee, Y.isAsyncMode = de, Y.isConcurrentMode = w, Y.isContextConsumer = M, Y.isContextProvider = A, Y.isElement = k, Y.isForwardRef = I, Y.isFragment = L, Y.isLazy = R, Y.isMemo = j, Y.isPortal = F, Y.isProfiler = q, Y.isStrictMode = U, Y.isSuspense = G, Y.isValidElementType = S, Y.typeOf = D;
|
|
1143
1143
|
})()), Y;
|
|
1144
1144
|
}
|
|
1145
1145
|
var Ye;
|
|
@@ -1233,8 +1233,8 @@ function ln() {
|
|
|
1233
1233
|
throw h.name = "Invariant Violation", h;
|
|
1234
1234
|
}
|
|
1235
1235
|
u = o[g](a, g, m, d, null, n);
|
|
1236
|
-
} catch (
|
|
1237
|
-
u =
|
|
1236
|
+
} catch (x) {
|
|
1237
|
+
u = x;
|
|
1238
1238
|
}
|
|
1239
1239
|
if (u && !(u instanceof Error) && e(
|
|
1240
1240
|
(m || "React class") + ": type specification of " + d + " `" + g + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
@@ -1271,8 +1271,8 @@ function dn() {
|
|
|
1271
1271
|
}
|
|
1272
1272
|
return Me = function(d, m) {
|
|
1273
1273
|
var p = typeof Symbol == "function" && Symbol.iterator, g = "@@iterator";
|
|
1274
|
-
function u(
|
|
1275
|
-
var M =
|
|
1274
|
+
function u(w) {
|
|
1275
|
+
var M = w && (p && w[p] || w[g]);
|
|
1276
1276
|
if (typeof M == "function")
|
|
1277
1277
|
return M;
|
|
1278
1278
|
}
|
|
@@ -1297,14 +1297,14 @@ function dn() {
|
|
|
1297
1297
|
shape: E,
|
|
1298
1298
|
exact: z
|
|
1299
1299
|
};
|
|
1300
|
-
function w
|
|
1301
|
-
return
|
|
1300
|
+
function x(w, M) {
|
|
1301
|
+
return w === M ? w !== 0 || 1 / w === 1 / M : w !== w && M !== M;
|
|
1302
1302
|
}
|
|
1303
|
-
function v(
|
|
1304
|
-
this.message =
|
|
1303
|
+
function v(w, M) {
|
|
1304
|
+
this.message = w, this.data = M && typeof M == "object" ? M : {}, this.stack = "";
|
|
1305
1305
|
}
|
|
1306
1306
|
v.prototype = Error.prototype;
|
|
1307
|
-
function b(
|
|
1307
|
+
function b(w) {
|
|
1308
1308
|
if (process.env.NODE_ENV !== "production")
|
|
1309
1309
|
var M = {}, A = 0;
|
|
1310
1310
|
function k(L, R, j, F, q, U, G) {
|
|
@@ -1322,19 +1322,19 @@ function dn() {
|
|
|
1322
1322
|
), M[te] = !0, A++);
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
|
-
return R[j] == null ? L ? R[j] === null ? new v("The " + q + " `" + U + "` is marked as required " + ("in `" + F + "`, but its value is `null`.")) : new v("The " + q + " `" + U + "` is marked as required in " + ("`" + F + "`, but its value is `undefined`.")) : null :
|
|
1325
|
+
return R[j] == null ? L ? R[j] === null ? new v("The " + q + " `" + U + "` is marked as required " + ("in `" + F + "`, but its value is `null`.")) : new v("The " + q + " `" + U + "` is marked as required in " + ("`" + F + "`, but its value is `undefined`.")) : null : w(R, j, F, q, U);
|
|
1326
1326
|
}
|
|
1327
1327
|
var I = k.bind(null, !1);
|
|
1328
1328
|
return I.isRequired = k.bind(null, !0), I;
|
|
1329
1329
|
}
|
|
1330
|
-
function C(
|
|
1330
|
+
function C(w) {
|
|
1331
1331
|
function M(A, k, I, L, R, j) {
|
|
1332
1332
|
var F = A[k], q = H(F);
|
|
1333
|
-
if (q !==
|
|
1333
|
+
if (q !== w) {
|
|
1334
1334
|
var U = ee(F);
|
|
1335
1335
|
return new v(
|
|
1336
|
-
"Invalid " + L + " `" + R + "` of type " + ("`" + U + "` supplied to `" + I + "`, expected ") + ("`" +
|
|
1337
|
-
{ expectedType:
|
|
1336
|
+
"Invalid " + L + " `" + R + "` of type " + ("`" + U + "` supplied to `" + I + "`, expected ") + ("`" + w + "`."),
|
|
1337
|
+
{ expectedType: w }
|
|
1338
1338
|
);
|
|
1339
1339
|
}
|
|
1340
1340
|
return null;
|
|
@@ -1344,9 +1344,9 @@ function dn() {
|
|
|
1344
1344
|
function T() {
|
|
1345
1345
|
return b(a);
|
|
1346
1346
|
}
|
|
1347
|
-
function S(
|
|
1347
|
+
function S(w) {
|
|
1348
1348
|
function M(A, k, I, L, R) {
|
|
1349
|
-
if (typeof
|
|
1349
|
+
if (typeof w != "function")
|
|
1350
1350
|
return new v("Property `" + R + "` of component `" + I + "` has invalid PropType notation inside arrayOf.");
|
|
1351
1351
|
var j = A[k];
|
|
1352
1352
|
if (!Array.isArray(j)) {
|
|
@@ -1354,7 +1354,7 @@ function dn() {
|
|
|
1354
1354
|
return new v("Invalid " + L + " `" + R + "` of type " + ("`" + F + "` supplied to `" + I + "`, expected an array."));
|
|
1355
1355
|
}
|
|
1356
1356
|
for (var q = 0; q < j.length; q++) {
|
|
1357
|
-
var U =
|
|
1357
|
+
var U = w(j, q, I, L, R + "[" + q + "]", t);
|
|
1358
1358
|
if (U instanceof Error)
|
|
1359
1359
|
return U;
|
|
1360
1360
|
}
|
|
@@ -1363,7 +1363,7 @@ function dn() {
|
|
|
1363
1363
|
return b(M);
|
|
1364
1364
|
}
|
|
1365
1365
|
function D() {
|
|
1366
|
-
function
|
|
1366
|
+
function w(M, A, k, I, L) {
|
|
1367
1367
|
var R = M[A];
|
|
1368
1368
|
if (!d(R)) {
|
|
1369
1369
|
var j = H(R);
|
|
@@ -1371,10 +1371,10 @@ function dn() {
|
|
|
1371
1371
|
}
|
|
1372
1372
|
return null;
|
|
1373
1373
|
}
|
|
1374
|
-
return b(
|
|
1374
|
+
return b(w);
|
|
1375
1375
|
}
|
|
1376
1376
|
function l() {
|
|
1377
|
-
function
|
|
1377
|
+
function w(M, A, k, I, L) {
|
|
1378
1378
|
var R = M[A];
|
|
1379
1379
|
if (!e.isValidElementType(R)) {
|
|
1380
1380
|
var j = H(R);
|
|
@@ -1382,28 +1382,28 @@ function dn() {
|
|
|
1382
1382
|
}
|
|
1383
1383
|
return null;
|
|
1384
1384
|
}
|
|
1385
|
-
return b(
|
|
1385
|
+
return b(w);
|
|
1386
1386
|
}
|
|
1387
|
-
function N(
|
|
1387
|
+
function N(w) {
|
|
1388
1388
|
function M(A, k, I, L, R) {
|
|
1389
|
-
if (!(A[k] instanceof
|
|
1390
|
-
var j =
|
|
1389
|
+
if (!(A[k] instanceof w)) {
|
|
1390
|
+
var j = w.name || h, F = de(A[k]);
|
|
1391
1391
|
return new v("Invalid " + L + " `" + R + "` of type " + ("`" + F + "` supplied to `" + I + "`, expected ") + ("instance of `" + j + "`."));
|
|
1392
1392
|
}
|
|
1393
1393
|
return null;
|
|
1394
1394
|
}
|
|
1395
1395
|
return b(M);
|
|
1396
1396
|
}
|
|
1397
|
-
function c(
|
|
1398
|
-
if (!Array.isArray(
|
|
1397
|
+
function c(w) {
|
|
1398
|
+
if (!Array.isArray(w))
|
|
1399
1399
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
1400
1400
|
"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])."
|
|
1401
1401
|
) : o("Invalid argument supplied to oneOf, expected an array.")), a;
|
|
1402
1402
|
function M(A, k, I, L, R) {
|
|
1403
|
-
for (var j = A[k], F = 0; F <
|
|
1404
|
-
if (
|
|
1403
|
+
for (var j = A[k], F = 0; F < w.length; F++)
|
|
1404
|
+
if (x(j, w[F]))
|
|
1405
1405
|
return null;
|
|
1406
|
-
var q = JSON.stringify(
|
|
1406
|
+
var q = JSON.stringify(w, function(G, _) {
|
|
1407
1407
|
var te = ee(_);
|
|
1408
1408
|
return te === "symbol" ? String(_) : _;
|
|
1409
1409
|
});
|
|
@@ -1411,16 +1411,16 @@ function dn() {
|
|
|
1411
1411
|
}
|
|
1412
1412
|
return b(M);
|
|
1413
1413
|
}
|
|
1414
|
-
function f(
|
|
1414
|
+
function f(w) {
|
|
1415
1415
|
function M(A, k, I, L, R) {
|
|
1416
|
-
if (typeof
|
|
1416
|
+
if (typeof w != "function")
|
|
1417
1417
|
return new v("Property `" + R + "` of component `" + I + "` has invalid PropType notation inside objectOf.");
|
|
1418
1418
|
var j = A[k], F = H(j);
|
|
1419
1419
|
if (F !== "object")
|
|
1420
1420
|
return new v("Invalid " + L + " `" + R + "` of type " + ("`" + F + "` supplied to `" + I + "`, expected an object."));
|
|
1421
1421
|
for (var q in j)
|
|
1422
1422
|
if (r(j, q)) {
|
|
1423
|
-
var U =
|
|
1423
|
+
var U = w(j, q, I, L, R + "." + q, t);
|
|
1424
1424
|
if (U instanceof Error)
|
|
1425
1425
|
return U;
|
|
1426
1426
|
}
|
|
@@ -1428,19 +1428,19 @@ function dn() {
|
|
|
1428
1428
|
}
|
|
1429
1429
|
return b(M);
|
|
1430
1430
|
}
|
|
1431
|
-
function P(
|
|
1432
|
-
if (!Array.isArray(
|
|
1431
|
+
function P(w) {
|
|
1432
|
+
if (!Array.isArray(w))
|
|
1433
1433
|
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), a;
|
|
1434
|
-
for (var M = 0; M <
|
|
1435
|
-
var A =
|
|
1434
|
+
for (var M = 0; M < w.length; M++) {
|
|
1435
|
+
var A = w[M];
|
|
1436
1436
|
if (typeof A != "function")
|
|
1437
1437
|
return o(
|
|
1438
1438
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ae(A) + " at index " + M + "."
|
|
1439
1439
|
), a;
|
|
1440
1440
|
}
|
|
1441
1441
|
function k(I, L, R, j, F) {
|
|
1442
|
-
for (var q = [], U = 0; U <
|
|
1443
|
-
var G =
|
|
1442
|
+
for (var q = [], U = 0; U < w.length; U++) {
|
|
1443
|
+
var G = w[U], _ = G(I, L, R, j, F, t);
|
|
1444
1444
|
if (_ == null)
|
|
1445
1445
|
return null;
|
|
1446
1446
|
_.data && r(_.data, "expectedType") && q.push(_.data.expectedType);
|
|
@@ -1451,23 +1451,23 @@ function dn() {
|
|
|
1451
1451
|
return b(k);
|
|
1452
1452
|
}
|
|
1453
1453
|
function $() {
|
|
1454
|
-
function
|
|
1454
|
+
function w(M, A, k, I, L) {
|
|
1455
1455
|
return X(M[A]) ? null : new v("Invalid " + I + " `" + L + "` supplied to " + ("`" + k + "`, expected a ReactNode."));
|
|
1456
1456
|
}
|
|
1457
|
-
return b(
|
|
1457
|
+
return b(w);
|
|
1458
1458
|
}
|
|
1459
|
-
function O(
|
|
1459
|
+
function O(w, M, A, k, I) {
|
|
1460
1460
|
return new v(
|
|
1461
|
-
(
|
|
1461
|
+
(w || "React class") + ": " + M + " type `" + A + "." + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + I + "`."
|
|
1462
1462
|
);
|
|
1463
1463
|
}
|
|
1464
|
-
function E(
|
|
1464
|
+
function E(w) {
|
|
1465
1465
|
function M(A, k, I, L, R) {
|
|
1466
1466
|
var j = A[k], F = H(j);
|
|
1467
1467
|
if (F !== "object")
|
|
1468
1468
|
return new v("Invalid " + L + " `" + R + "` of type `" + F + "` " + ("supplied to `" + I + "`, expected `object`."));
|
|
1469
|
-
for (var q in
|
|
1470
|
-
var U =
|
|
1469
|
+
for (var q in w) {
|
|
1470
|
+
var U = w[q];
|
|
1471
1471
|
if (typeof U != "function")
|
|
1472
1472
|
return O(I, L, R, q, ee(U));
|
|
1473
1473
|
var G = U(j, q, I, L, R + "." + q, t);
|
|
@@ -1478,20 +1478,20 @@ function dn() {
|
|
|
1478
1478
|
}
|
|
1479
1479
|
return b(M);
|
|
1480
1480
|
}
|
|
1481
|
-
function z(
|
|
1481
|
+
function z(w) {
|
|
1482
1482
|
function M(A, k, I, L, R) {
|
|
1483
1483
|
var j = A[k], F = H(j);
|
|
1484
1484
|
if (F !== "object")
|
|
1485
1485
|
return new v("Invalid " + L + " `" + R + "` of type `" + F + "` " + ("supplied to `" + I + "`, expected `object`."));
|
|
1486
|
-
var q = n({}, A[k],
|
|
1486
|
+
var q = n({}, A[k], w);
|
|
1487
1487
|
for (var U in q) {
|
|
1488
|
-
var G =
|
|
1489
|
-
if (r(
|
|
1488
|
+
var G = w[U];
|
|
1489
|
+
if (r(w, U) && typeof G != "function")
|
|
1490
1490
|
return O(I, L, R, U, ee(G));
|
|
1491
1491
|
if (!G)
|
|
1492
1492
|
return new v(
|
|
1493
1493
|
"Invalid " + L + " `" + R + "` key `" + U + "` supplied to `" + I + "`.\nBad object: " + JSON.stringify(A[k], null, " ") + `
|
|
1494
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
1494
|
+
Valid keys: ` + JSON.stringify(Object.keys(w), null, " ")
|
|
1495
1495
|
);
|
|
1496
1496
|
var _ = G(j, U, I, L, R + "." + U, t);
|
|
1497
1497
|
if (_)
|
|
@@ -1501,23 +1501,23 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1501
1501
|
}
|
|
1502
1502
|
return b(M);
|
|
1503
1503
|
}
|
|
1504
|
-
function X(
|
|
1505
|
-
switch (typeof
|
|
1504
|
+
function X(w) {
|
|
1505
|
+
switch (typeof w) {
|
|
1506
1506
|
case "number":
|
|
1507
1507
|
case "string":
|
|
1508
1508
|
case "undefined":
|
|
1509
1509
|
return !0;
|
|
1510
1510
|
case "boolean":
|
|
1511
|
-
return !
|
|
1511
|
+
return !w;
|
|
1512
1512
|
case "object":
|
|
1513
|
-
if (Array.isArray(
|
|
1514
|
-
return
|
|
1515
|
-
if (
|
|
1513
|
+
if (Array.isArray(w))
|
|
1514
|
+
return w.every(X);
|
|
1515
|
+
if (w === null || d(w))
|
|
1516
1516
|
return !0;
|
|
1517
|
-
var M = u(
|
|
1517
|
+
var M = u(w);
|
|
1518
1518
|
if (M) {
|
|
1519
|
-
var A = M.call(
|
|
1520
|
-
if (M !==
|
|
1519
|
+
var A = M.call(w), k;
|
|
1520
|
+
if (M !== w.entries) {
|
|
1521
1521
|
for (; !(k = A.next()).done; )
|
|
1522
1522
|
if (!X(k.value))
|
|
1523
1523
|
return !1;
|
|
@@ -1534,27 +1534,27 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1534
1534
|
return !1;
|
|
1535
1535
|
}
|
|
1536
1536
|
}
|
|
1537
|
-
function Q(
|
|
1538
|
-
return
|
|
1537
|
+
function Q(w, M) {
|
|
1538
|
+
return w === "symbol" ? !0 : M ? M["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && M instanceof Symbol : !1;
|
|
1539
1539
|
}
|
|
1540
|
-
function H(
|
|
1541
|
-
var M = typeof
|
|
1542
|
-
return Array.isArray(
|
|
1540
|
+
function H(w) {
|
|
1541
|
+
var M = typeof w;
|
|
1542
|
+
return Array.isArray(w) ? "array" : w instanceof RegExp ? "object" : Q(M, w) ? "symbol" : M;
|
|
1543
1543
|
}
|
|
1544
|
-
function ee(
|
|
1545
|
-
if (typeof
|
|
1546
|
-
return "" +
|
|
1547
|
-
var M = H(
|
|
1544
|
+
function ee(w) {
|
|
1545
|
+
if (typeof w > "u" || w === null)
|
|
1546
|
+
return "" + w;
|
|
1547
|
+
var M = H(w);
|
|
1548
1548
|
if (M === "object") {
|
|
1549
|
-
if (
|
|
1549
|
+
if (w instanceof Date)
|
|
1550
1550
|
return "date";
|
|
1551
|
-
if (
|
|
1551
|
+
if (w instanceof RegExp)
|
|
1552
1552
|
return "regexp";
|
|
1553
1553
|
}
|
|
1554
1554
|
return M;
|
|
1555
1555
|
}
|
|
1556
|
-
function ae(
|
|
1557
|
-
var M = ee(
|
|
1556
|
+
function ae(w) {
|
|
1557
|
+
var M = ee(w);
|
|
1558
1558
|
switch (M) {
|
|
1559
1559
|
case "array":
|
|
1560
1560
|
case "object":
|
|
@@ -1567,8 +1567,8 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1567
1567
|
return M;
|
|
1568
1568
|
}
|
|
1569
1569
|
}
|
|
1570
|
-
function de(
|
|
1571
|
-
return !
|
|
1570
|
+
function de(w) {
|
|
1571
|
+
return !w.constructor || !w.constructor.name ? h : w.constructor.name;
|
|
1572
1572
|
}
|
|
1573
1573
|
return y.checkPropTypes = i, y.resetWarningCache = i.resetWarningCache, y.PropTypes = y, y;
|
|
1574
1574
|
}, Me;
|
|
@@ -1651,7 +1651,7 @@ function fn() {
|
|
|
1651
1651
|
return ve.exports = n, ve.exports.clsx = n, ve.exports;
|
|
1652
1652
|
}
|
|
1653
1653
|
var B = {}, oe = {}, Je;
|
|
1654
|
-
function
|
|
1654
|
+
function xe() {
|
|
1655
1655
|
if (Je) return oe;
|
|
1656
1656
|
Je = 1, Object.defineProperty(oe, "__esModule", {
|
|
1657
1657
|
value: !0
|
|
@@ -1710,8 +1710,8 @@ function Re() {
|
|
|
1710
1710
|
if (et) return B;
|
|
1711
1711
|
et = 1, Object.defineProperty(B, "__esModule", {
|
|
1712
1712
|
value: !0
|
|
1713
|
-
}), B.addClassName = l, B.addEvent = a, B.addUserSelectStyles = T, B.createCSSTransform = y, B.createSVGTransform =
|
|
1714
|
-
var e =
|
|
1713
|
+
}), B.addClassName = l, B.addEvent = a, B.addUserSelectStyles = T, B.createCSSTransform = y, B.createSVGTransform = x, B.getTouch = b, B.getTouchIdentifier = C, B.getTranslation = v, B.innerHeight = g, B.innerWidth = u, B.matchesSelector = i, B.matchesSelectorAndParentsTo = o, B.offsetXYFromParent = h, B.outerHeight = m, B.outerWidth = p, B.removeClassName = N, B.removeEvent = d, B.scheduleRemoveUserSelectStyles = S;
|
|
1714
|
+
var e = xe(), n = t(hn());
|
|
1715
1715
|
function t(c, f) {
|
|
1716
1716
|
if (typeof WeakMap == "function") var P = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakMap();
|
|
1717
1717
|
return (t = function(O, E) {
|
|
@@ -1793,7 +1793,7 @@ function Re() {
|
|
|
1793
1793
|
[(0, n.browserPrefixToKey)("transform", n.default)]: P
|
|
1794
1794
|
};
|
|
1795
1795
|
}
|
|
1796
|
-
function
|
|
1796
|
+
function x(c, f) {
|
|
1797
1797
|
return v(c, f, "");
|
|
1798
1798
|
}
|
|
1799
1799
|
function v(c, f, P) {
|
|
@@ -1852,34 +1852,34 @@ function bt() {
|
|
|
1852
1852
|
tt = 1, Object.defineProperty(ne, "__esModule", {
|
|
1853
1853
|
value: !0
|
|
1854
1854
|
}), ne.canDragX = i, ne.canDragY = o, ne.createCoreData = d, ne.createDraggableData = m, ne.getBoundPosition = t, ne.getControlPosition = a, ne.snapToGrid = r;
|
|
1855
|
-
var e =
|
|
1855
|
+
var e = xe(), n = Re();
|
|
1856
1856
|
function t(u, h, y) {
|
|
1857
1857
|
if (!u.props.bounds) return [h, y];
|
|
1858
1858
|
let {
|
|
1859
|
-
bounds:
|
|
1859
|
+
bounds: x
|
|
1860
1860
|
} = u.props;
|
|
1861
|
-
|
|
1861
|
+
x = typeof x == "string" ? x : p(x);
|
|
1862
1862
|
const v = g(u);
|
|
1863
|
-
if (typeof
|
|
1863
|
+
if (typeof x == "string") {
|
|
1864
1864
|
const {
|
|
1865
1865
|
ownerDocument: b
|
|
1866
1866
|
} = v, C = b.defaultView;
|
|
1867
1867
|
let T;
|
|
1868
|
-
if (
|
|
1869
|
-
throw new Error('Bounds selector "' +
|
|
1868
|
+
if (x === "parent" ? T = v.parentNode : T = v.getRootNode().querySelector(x), !(T instanceof C.HTMLElement))
|
|
1869
|
+
throw new Error('Bounds selector "' + x + '" could not find an element.');
|
|
1870
1870
|
const S = T, D = C.getComputedStyle(v), l = C.getComputedStyle(S);
|
|
1871
|
-
|
|
1871
|
+
x = {
|
|
1872
1872
|
left: -v.offsetLeft + (0, e.int)(l.paddingLeft) + (0, e.int)(D.marginLeft),
|
|
1873
1873
|
top: -v.offsetTop + (0, e.int)(l.paddingTop) + (0, e.int)(D.marginTop),
|
|
1874
1874
|
right: (0, n.innerWidth)(S) - (0, n.outerWidth)(v) - v.offsetLeft + (0, e.int)(l.paddingRight) - (0, e.int)(D.marginRight),
|
|
1875
1875
|
bottom: (0, n.innerHeight)(S) - (0, n.outerHeight)(v) - v.offsetTop + (0, e.int)(l.paddingBottom) - (0, e.int)(D.marginBottom)
|
|
1876
1876
|
};
|
|
1877
1877
|
}
|
|
1878
|
-
return (0, e.isNum)(
|
|
1878
|
+
return (0, e.isNum)(x.right) && (h = Math.min(h, x.right)), (0, e.isNum)(x.bottom) && (y = Math.min(y, x.bottom)), (0, e.isNum)(x.left) && (h = Math.max(h, x.left)), (0, e.isNum)(x.top) && (y = Math.max(y, x.top)), [h, y];
|
|
1879
1879
|
}
|
|
1880
1880
|
function r(u, h, y) {
|
|
1881
|
-
const
|
|
1882
|
-
return [
|
|
1881
|
+
const x = Math.round(h / u[0]) * u[0], v = Math.round(y / u[1]) * u[1];
|
|
1882
|
+
return [x, v];
|
|
1883
1883
|
}
|
|
1884
1884
|
function i(u) {
|
|
1885
1885
|
return u.props.axis === "both" || u.props.axis === "x";
|
|
@@ -1888,14 +1888,14 @@ function bt() {
|
|
|
1888
1888
|
return u.props.axis === "both" || u.props.axis === "y";
|
|
1889
1889
|
}
|
|
1890
1890
|
function a(u, h, y) {
|
|
1891
|
-
const
|
|
1892
|
-
if (typeof h == "number" && !
|
|
1891
|
+
const x = typeof h == "number" ? (0, n.getTouch)(u, h) : null;
|
|
1892
|
+
if (typeof h == "number" && !x) return null;
|
|
1893
1893
|
const v = g(y), b = y.props.offsetParent || v.offsetParent || v.ownerDocument.body;
|
|
1894
|
-
return (0, n.offsetXYFromParent)(
|
|
1894
|
+
return (0, n.offsetXYFromParent)(x || u, b, y.props.scale);
|
|
1895
1895
|
}
|
|
1896
1896
|
function d(u, h, y) {
|
|
1897
|
-
const
|
|
1898
|
-
return
|
|
1897
|
+
const x = !(0, e.isNum)(u.lastX), v = g(u);
|
|
1898
|
+
return x ? {
|
|
1899
1899
|
node: v,
|
|
1900
1900
|
deltaX: 0,
|
|
1901
1901
|
deltaY: 0,
|
|
@@ -1942,7 +1942,7 @@ function bt() {
|
|
|
1942
1942
|
return ne;
|
|
1943
1943
|
}
|
|
1944
1944
|
var he = {}, be = {}, nt;
|
|
1945
|
-
function
|
|
1945
|
+
function wt() {
|
|
1946
1946
|
if (nt) return be;
|
|
1947
1947
|
nt = 1, Object.defineProperty(be, "__esModule", {
|
|
1948
1948
|
value: !0
|
|
@@ -1957,7 +1957,7 @@ function gn() {
|
|
|
1957
1957
|
rt = 1, Object.defineProperty(he, "__esModule", {
|
|
1958
1958
|
value: !0
|
|
1959
1959
|
}), he.default = void 0;
|
|
1960
|
-
var e = m(se), n = d(/* @__PURE__ */ vt()), t = d(st), r = Re(), i = bt(), o =
|
|
1960
|
+
var e = m(se), n = d(/* @__PURE__ */ vt()), t = d(st), r = Re(), i = bt(), o = xe(), a = d(wt());
|
|
1961
1961
|
function d(v) {
|
|
1962
1962
|
return v && v.__esModule ? v : { default: v };
|
|
1963
1963
|
}
|
|
@@ -2004,7 +2004,7 @@ function gn() {
|
|
|
2004
2004
|
stop: "mouseup"
|
|
2005
2005
|
}
|
|
2006
2006
|
};
|
|
2007
|
-
let y = h.mouse,
|
|
2007
|
+
let y = h.mouse, x = class extends e.Component {
|
|
2008
2008
|
constructor() {
|
|
2009
2009
|
super(...arguments), p(this, "dragging", !1), p(this, "lastX", NaN), p(this, "lastY", NaN), p(this, "touchIdentifier", null), p(this, "mounted", !1), p(this, "handleDragStart", (b) => {
|
|
2010
2010
|
if (this.props.onMouseDown(b), !this.props.allowAnyClick && typeof b.button == "number" && b.button !== 0) return !1;
|
|
@@ -2104,7 +2104,7 @@ function gn() {
|
|
|
2104
2104
|
});
|
|
2105
2105
|
}
|
|
2106
2106
|
};
|
|
2107
|
-
return he.default =
|
|
2107
|
+
return he.default = x, p(x, "displayName", "DraggableCore"), p(x, "propTypes", {
|
|
2108
2108
|
/**
|
|
2109
2109
|
* `allowAnyClick` allows dragging using any mouse button.
|
|
2110
2110
|
* By default, we only accept the left button.
|
|
@@ -2234,7 +2234,7 @@ function gn() {
|
|
|
2234
2234
|
className: o.dontSetMe,
|
|
2235
2235
|
style: o.dontSetMe,
|
|
2236
2236
|
transform: o.dontSetMe
|
|
2237
|
-
}), p(
|
|
2237
|
+
}), p(x, "defaultProps", {
|
|
2238
2238
|
allowAnyClick: !1,
|
|
2239
2239
|
// by default only accept left click
|
|
2240
2240
|
allowMobileScroll: !1,
|
|
@@ -2262,7 +2262,7 @@ function mn() {
|
|
|
2262
2262
|
return m.default;
|
|
2263
2263
|
}
|
|
2264
2264
|
}), e.default = void 0;
|
|
2265
|
-
var n = u(se), t = g(/* @__PURE__ */ vt()), r = g(st), i = fn(), o = Re(), a = bt(), d =
|
|
2265
|
+
var n = u(se), t = g(/* @__PURE__ */ vt()), r = g(st), i = fn(), o = Re(), a = bt(), d = xe(), m = g(gn()), p = g(wt());
|
|
2266
2266
|
function g(C) {
|
|
2267
2267
|
return C && C.__esModule ? C : { default: C };
|
|
2268
2268
|
}
|
|
@@ -2290,9 +2290,9 @@ function mn() {
|
|
|
2290
2290
|
}, h.apply(null, arguments);
|
|
2291
2291
|
}
|
|
2292
2292
|
function y(C, T, S) {
|
|
2293
|
-
return (T =
|
|
2293
|
+
return (T = x(T)) in C ? Object.defineProperty(C, T, { value: S, enumerable: !0, configurable: !0, writable: !0 }) : C[T] = S, C;
|
|
2294
2294
|
}
|
|
2295
|
-
function
|
|
2295
|
+
function x(C) {
|
|
2296
2296
|
var T = v(C, "string");
|
|
2297
2297
|
return typeof T == "symbol" ? T : T + "";
|
|
2298
2298
|
}
|
|
@@ -2593,7 +2593,7 @@ const vn = /* @__PURE__ */ on(yn), bn = ce((e, n) => {
|
|
|
2593
2593
|
boxShadow: "rgba(0, 0, 0, 0.5) 7px 7px 10px 0px"
|
|
2594
2594
|
},
|
|
2595
2595
|
...e.style || {}
|
|
2596
|
-
}, i = e.testId || "not-set", o = e.className || "panel", a =
|
|
2596
|
+
}, i = e.testId || "not-set", o = e.className || "panel", a = xt(null);
|
|
2597
2597
|
return (
|
|
2598
2598
|
// 3. Pass the internal ref to the Draggable component via 'nodeRef'
|
|
2599
2599
|
/* @__PURE__ */ s(
|
|
@@ -2633,11 +2633,11 @@ function tr({ children: e }) {
|
|
|
2633
2633
|
}
|
|
2634
2634
|
const nr = (e) => {
|
|
2635
2635
|
console.warn("showToast TODO", e);
|
|
2636
|
-
},
|
|
2636
|
+
}, wn = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, rr = ce((e, n) => {
|
|
2637
2637
|
let t = ct(Number(e.zoomScale || 0));
|
|
2638
2638
|
const r = e.responsiveGrid || !1, i = e.isEditing || !1, o = {
|
|
2639
2639
|
"--bwj-dashboard-transform-scale": t,
|
|
2640
|
-
"--bwj-dashboard-add-cols":
|
|
2640
|
+
"--bwj-dashboard-add-cols": wn(t)
|
|
2641
2641
|
}, a = Z(
|
|
2642
2642
|
"dashboard-main-grid w-full",
|
|
2643
2643
|
i ? "editing" : "",
|
|
@@ -2646,7 +2646,7 @@ const nr = (e) => {
|
|
|
2646
2646
|
"border border-solid border-primary"
|
|
2647
2647
|
);
|
|
2648
2648
|
return /* @__PURE__ */ s("div", { className: a, style: o, children: e.children });
|
|
2649
|
-
}), $e = "size-5",
|
|
2649
|
+
}), $e = "size-5", xn = (e, n) => {
|
|
2650
2650
|
const t = e.hideTitle && !e.isEditing, r = e.noBorder;
|
|
2651
2651
|
let i = `dashboard-widget ${e.isEditing ? "editing" : ""} border border-solid`;
|
|
2652
2652
|
r ? i = `${i} border-transparent border-opacity-0` : (e.borderCssClasses || "").trim().length > 0 ? i = `${i} ${e.borderCssClasses}` : i = `${i} border-card-invert border-opacity-20`, e.noShadow && (i = `${i} no-shadow`), e.noPadding && (i = `${i} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? i = `${i} ${e.backgroundCssClasses}` : i = `${i} bg-card content-card`, ["large", "xlarge"].indexOf(e.size || "") > -1 && (i = `${i} ${e.size}-widget`);
|
|
@@ -2717,7 +2717,7 @@ const nr = (e) => {
|
|
|
2717
2717
|
] }),
|
|
2718
2718
|
/* @__PURE__ */ s("div", { className: "widget-inner", children: e.children })
|
|
2719
2719
|
] });
|
|
2720
|
-
}, Cn = ce(
|
|
2720
|
+
}, Cn = ce(xn);
|
|
2721
2721
|
function Sn(e) {
|
|
2722
2722
|
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: [
|
|
2723
2723
|
/* @__PURE__ */ s("div", { className: "w-full absolute opacity-100 text-primary", children: e.title }),
|
|
@@ -2737,21 +2737,21 @@ function Dn({
|
|
|
2737
2737
|
onMoveClick: p,
|
|
2738
2738
|
selectContainer: g
|
|
2739
2739
|
}) {
|
|
2740
|
-
const u = `${t}`.split("_"), h = u.length > 1, y = h ? u[0] : t,
|
|
2741
|
-
if (!
|
|
2740
|
+
const u = `${t}`.split("_"), h = u.length > 1, y = h ? u[0] : t, x = a.get(y);
|
|
2741
|
+
if (!x)
|
|
2742
2742
|
return /* @__PURE__ */ s("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
|
|
2743
2743
|
"Widget not found in catalog: ",
|
|
2744
2744
|
y
|
|
2745
2745
|
] }) });
|
|
2746
2746
|
let v = null, b = !1;
|
|
2747
|
-
if (
|
|
2748
|
-
if (!
|
|
2749
|
-
if (
|
|
2750
|
-
return
|
|
2751
|
-
if (
|
|
2747
|
+
if (x.component ? (v = x.component, b = !1) : x.loader && (b = !0, v = at(() => {
|
|
2748
|
+
if (!x) return null;
|
|
2749
|
+
if (x.component)
|
|
2750
|
+
return x.component;
|
|
2751
|
+
if (x.loader) {
|
|
2752
2752
|
const c = async () => {
|
|
2753
2753
|
try {
|
|
2754
|
-
return await
|
|
2754
|
+
return await x.loader();
|
|
2755
2755
|
} catch (f) {
|
|
2756
2756
|
return console.error(`CDN Load Failure for ${t}:`, f), {
|
|
2757
2757
|
default: () => /* @__PURE__ */ s(Cn, { ...D, children: /* @__PURE__ */ W("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
@@ -2761,7 +2761,7 @@ function Dn({
|
|
|
2761
2761
|
'"'
|
|
2762
2762
|
] }),
|
|
2763
2763
|
/* @__PURE__ */ s("p", { className: "text-xs italic", children: "The remote plugin is unavailable or incompatible." }),
|
|
2764
|
-
/* @__PURE__ */ s("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(
|
|
2764
|
+
/* @__PURE__ */ s("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(x.meta || {}, null, 2) })
|
|
2765
2765
|
] }) })
|
|
2766
2766
|
};
|
|
2767
2767
|
}
|
|
@@ -2769,18 +2769,18 @@ function Dn({
|
|
|
2769
2769
|
return se.lazy(c);
|
|
2770
2770
|
}
|
|
2771
2771
|
return null;
|
|
2772
|
-
}, [
|
|
2772
|
+
}, [x, t])), !v)
|
|
2773
2773
|
return /* @__PURE__ */ s("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
|
|
2774
2774
|
"Widget definition incomplete: ",
|
|
2775
2775
|
y
|
|
2776
2776
|
] }) });
|
|
2777
|
-
const C = !!
|
|
2777
|
+
const C = !!x.isContainer, T = h ? gt(t) : "", S = C ? (o || []).filter((c) => c.parentWidgetKey === t) : [], D = {
|
|
2778
2778
|
index: e,
|
|
2779
2779
|
maxIndex: n,
|
|
2780
2780
|
widgetKey: t,
|
|
2781
2781
|
parentWidgetKey: r,
|
|
2782
2782
|
isEditing: d,
|
|
2783
|
-
title: h ? T :
|
|
2783
|
+
title: h ? T : x.title,
|
|
2784
2784
|
onRemoveClick: m,
|
|
2785
2785
|
onMoveClick: p
|
|
2786
2786
|
}, l = C ? {
|
|
@@ -2802,9 +2802,9 @@ function Dn({
|
|
|
2802
2802
|
`${c.widgetKey}_${f}`
|
|
2803
2803
|
))
|
|
2804
2804
|
} : {}, N = () => /* @__PURE__ */ s(v, { ...D, ...l });
|
|
2805
|
-
return b ? /* @__PURE__ */ s(Ct, { fallback: /* @__PURE__ */ s(Sn, { title: `Loading ${
|
|
2805
|
+
return b ? /* @__PURE__ */ s(Ct, { fallback: /* @__PURE__ */ s(Sn, { title: `Loading ${x.title}` }), children: /* @__PURE__ */ s(N, {}) }) : /* @__PURE__ */ s(N, {});
|
|
2806
2806
|
}
|
|
2807
|
-
const
|
|
2807
|
+
const we = "size-5";
|
|
2808
2808
|
function ke(e) {
|
|
2809
2809
|
const n = e.highlight || !1, t = e.direction || "column", r = e.children.length > 0, i = e.isEditing || !1;
|
|
2810
2810
|
let d = n ? "border-transparent" : i && !r ? "border-card-invert" : "border-transparent";
|
|
@@ -2826,7 +2826,7 @@ function ke(e) {
|
|
|
2826
2826
|
), h = `widget-container-header direction-${t} flex items-center border-1 ${d}`;
|
|
2827
2827
|
const y = () => {
|
|
2828
2828
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey);
|
|
2829
|
-
},
|
|
2829
|
+
}, x = (b) => {
|
|
2830
2830
|
e.onMoveClick && e.widgetKey && e.onMoveClick(b, e.widgetKey, e.parentWidgetKey);
|
|
2831
2831
|
}, v = () => {
|
|
2832
2832
|
e.selectContainer && e.widgetKey && e.selectContainer(e.widgetKey);
|
|
@@ -2856,7 +2856,7 @@ function ke(e) {
|
|
|
2856
2856
|
children: /* @__PURE__ */ s(
|
|
2857
2857
|
en,
|
|
2858
2858
|
{
|
|
2859
|
-
className: `${
|
|
2859
|
+
className: `${we} ${n ? "text-success" : "text-disabled"}`
|
|
2860
2860
|
}
|
|
2861
2861
|
)
|
|
2862
2862
|
}
|
|
@@ -2871,8 +2871,8 @@ function ke(e) {
|
|
|
2871
2871
|
placement: "top",
|
|
2872
2872
|
title: `${e.index < 1 ? "Already at min position" : "Move Container to the left/up"}`
|
|
2873
2873
|
},
|
|
2874
|
-
onClick: () =>
|
|
2875
|
-
children: /* @__PURE__ */ s(ut, { className:
|
|
2874
|
+
onClick: () => x(-1),
|
|
2875
|
+
children: /* @__PURE__ */ s(ut, { className: we })
|
|
2876
2876
|
}
|
|
2877
2877
|
),
|
|
2878
2878
|
/* @__PURE__ */ s(
|
|
@@ -2885,8 +2885,8 @@ function ke(e) {
|
|
|
2885
2885
|
placement: "top",
|
|
2886
2886
|
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Container to the right/down"}`
|
|
2887
2887
|
},
|
|
2888
|
-
onClick: () =>
|
|
2889
|
-
children: /* @__PURE__ */ s(ft, { className:
|
|
2888
|
+
onClick: () => x(1),
|
|
2889
|
+
children: /* @__PURE__ */ s(ft, { className: we })
|
|
2890
2890
|
}
|
|
2891
2891
|
),
|
|
2892
2892
|
/* @__PURE__ */ s(
|
|
@@ -2899,7 +2899,7 @@ function ke(e) {
|
|
|
2899
2899
|
title: "Remove Container"
|
|
2900
2900
|
},
|
|
2901
2901
|
onClick: () => y(),
|
|
2902
|
-
children: /* @__PURE__ */ s(ht, { className:
|
|
2902
|
+
children: /* @__PURE__ */ s(ht, { className: we })
|
|
2903
2903
|
}
|
|
2904
2904
|
)
|
|
2905
2905
|
] }) }) })
|
|
@@ -2999,16 +2999,16 @@ function sr({
|
|
|
2999
2999
|
onUndoOrRedo: m,
|
|
3000
3000
|
onDoneClick: p
|
|
3001
3001
|
}) {
|
|
3002
|
-
const [g, u] = le("Editing"), [h, y] = le(0), [
|
|
3002
|
+
const [g, u] = le("Editing"), [h, y] = le(0), [x, v] = le(""), C = Array.from(n.keys()).map((E) => ({
|
|
3003
3003
|
widgetKey: E,
|
|
3004
3004
|
metaData: Pt(E, n)
|
|
3005
3005
|
})), T = (E) => {
|
|
3006
3006
|
v(E.target.value);
|
|
3007
3007
|
}, S = (E) => {
|
|
3008
|
-
const z =
|
|
3008
|
+
const z = x.trim().toLowerCase();
|
|
3009
3009
|
return z.length < 1 ? !0 : E.displayName.trim().toLowerCase().includes(z) || E.description.toLowerCase().includes(z);
|
|
3010
3010
|
}, D = (E) => {
|
|
3011
|
-
const z =
|
|
3011
|
+
const z = x.trim().toLowerCase();
|
|
3012
3012
|
return z.length < 1 ? !0 : E.displayName.trim().toLowerCase().includes(z) || E.description.toLowerCase().includes(z);
|
|
3013
3013
|
}, l = (E) => Z(
|
|
3014
3014
|
"px-4 py-2 font-medium cursor-pointer border-b-2 border-transparent hover:border-primary focus:outline-none",
|
|
@@ -3112,7 +3112,7 @@ function sr({
|
|
|
3112
3112
|
label: "Filter...",
|
|
3113
3113
|
size: "small",
|
|
3114
3114
|
className: "w-full",
|
|
3115
|
-
value:
|
|
3115
|
+
value: x,
|
|
3116
3116
|
onChange: T
|
|
3117
3117
|
}
|
|
3118
3118
|
) }),
|