@memobit/libs 1.0.10 → 1.0.11
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/index.d.ts +1 -1
- package/dist/index.esm.js +137 -137
- package/dist/version.json +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -883,7 +883,7 @@ export declare interface DataViewProps<T> {
|
|
|
883
883
|
actions?: (row: T) => default_2.ReactNode;
|
|
884
884
|
actionsWidth?: number;
|
|
885
885
|
timeline?: DataViewTimelineConfig<T>;
|
|
886
|
-
onRowClick?: (row: T) => void;
|
|
886
|
+
onRowClick?: (row: T, event?: default_2.MouseEvent) => void;
|
|
887
887
|
/** Render an optional detail row spanning all columns directly below the matching row.
|
|
888
888
|
* Return `null`/`undefined` to skip rendering for that row. Table mode only. */
|
|
889
889
|
rowDetail?: (row: T) => default_2.ReactNode;
|
package/dist/index.esm.js
CHANGED
|
@@ -10863,7 +10863,7 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
10863
10863
|
}), [b, x] = L("days"), [y, M] = L(() => {
|
|
10864
10864
|
const S = (p ?? u).getFullYear();
|
|
10865
10865
|
return Math.floor(S / E1) * E1;
|
|
10866
|
-
}), [k, V] = L(null), _ = p ?? u, C = w ?? k, N = h1(() => ir(_.getFullYear(), _.getMonth(), i), [_, i]), B = i === 1 ? dr : hr, z = (S) => a && S0(S, a) || s && sr(S, s) ? !0 : o ? typeof o == "function" ? o(S) : o.some((D) => j1(D, S)) : !1,
|
|
10866
|
+
}), [k, V] = L(null), _ = p ?? u, C = w ?? k, N = h1(() => ir(_.getFullYear(), _.getMonth(), i), [_, i]), B = i === 1 ? dr : hr, z = (S) => a && S0(S, a) || s && sr(S, s) ? !0 : o ? typeof o == "function" ? o(S) : o.some((D) => j1(D, S)) : !1, G = (S) => {
|
|
10867
10867
|
if (!t) return !1;
|
|
10868
10868
|
if (l === "single" && t instanceof Date) return j1(S, t);
|
|
10869
10869
|
if (l === "range") {
|
|
@@ -10907,7 +10907,7 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
10907
10907
|
v ? v(D) : f(D), x("days"), l === "single" && c?.(S);
|
|
10908
10908
|
}, T = () => {
|
|
10909
10909
|
g && x("months");
|
|
10910
|
-
},
|
|
10910
|
+
}, Z = () => {
|
|
10911
10911
|
g && (M(Math.floor(_.getFullYear() / E1) * E1), x("years"));
|
|
10912
10912
|
}, d1 = (S) => {
|
|
10913
10913
|
const D = new Date(_.getFullYear(), S, 1);
|
|
@@ -10922,7 +10922,7 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
10922
10922
|
}, n1 = () => {
|
|
10923
10923
|
const S = new Date(_.getFullYear() - 1, _.getMonth(), 1);
|
|
10924
10924
|
v ? v(S) : f(S);
|
|
10925
|
-
},
|
|
10925
|
+
}, y1 = () => {
|
|
10926
10926
|
const S = new Date(_.getFullYear() + 1, _.getMonth(), 1);
|
|
10927
10927
|
v ? v(S) : f(S);
|
|
10928
10928
|
}, u1 = () => {
|
|
@@ -10931,7 +10931,7 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
10931
10931
|
return S;
|
|
10932
10932
|
}, A1 = (S) => {
|
|
10933
10933
|
const D = ["calendar__day"];
|
|
10934
|
-
return q(S) ? (
|
|
10934
|
+
return q(S) ? (G(S) && D.push("calendar__day--selected"), R(S) && D.push("calendar__day--in-range"), $(S) && D.push("calendar__day--hover-range")) : D.push("calendar__day--other-month"), nr(S) && D.push("calendar__day--today"), or(S) && D.push("calendar__day--weekend"), z(S) && D.push("calendar__day--disabled"), D.join(" ");
|
|
10935
10935
|
}, G1 = () => b === "years" ? /* @__PURE__ */ r("div", {
|
|
10936
10936
|
className: "calendar__header",
|
|
10937
10937
|
children: [
|
|
@@ -10971,13 +10971,13 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
10971
10971
|
/* @__PURE__ */ e("button", {
|
|
10972
10972
|
type: "button",
|
|
10973
10973
|
className: "calendar__header-button",
|
|
10974
|
-
onClick:
|
|
10974
|
+
onClick: Z,
|
|
10975
10975
|
children: _.getFullYear()
|
|
10976
10976
|
}),
|
|
10977
10977
|
/* @__PURE__ */ e("button", {
|
|
10978
10978
|
type: "button",
|
|
10979
10979
|
className: "calendar__nav-button",
|
|
10980
|
-
onClick:
|
|
10980
|
+
onClick: y1,
|
|
10981
10981
|
title: "Next year",
|
|
10982
10982
|
children: "›"
|
|
10983
10983
|
})
|
|
@@ -11005,7 +11005,7 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
11005
11005
|
}), /* @__PURE__ */ e("button", {
|
|
11006
11006
|
type: "button",
|
|
11007
11007
|
className: "calendar__header-button",
|
|
11008
|
-
onClick:
|
|
11008
|
+
onClick: Z,
|
|
11009
11009
|
children: _.getFullYear()
|
|
11010
11010
|
})] })
|
|
11011
11011
|
}),
|
|
@@ -12354,20 +12354,20 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12354
12354
|
left: 0
|
|
12355
12355
|
}), g = O(null), w = O(null), m = O(null), u = O(null), f = O(!1), b = n !== void 0, x = b ? 150 : 0, y = () => {
|
|
12356
12356
|
if (!m.current || !u.current) return;
|
|
12357
|
-
const N = m.current.firstElementChild, B = N && N.getBoundingClientRect().width > 0 ? N.getBoundingClientRect() : m.current.getBoundingClientRect(), z = u.current.getBoundingClientRect(),
|
|
12357
|
+
const N = m.current.firstElementChild, B = N && N.getBoundingClientRect().width > 0 ? N.getBoundingClientRect() : m.current.getBoundingClientRect(), z = u.current.getBoundingClientRect(), G = 8;
|
|
12358
12358
|
let R = 0, $ = 0;
|
|
12359
12359
|
switch (c) {
|
|
12360
12360
|
case "top":
|
|
12361
|
-
R = B.top - z.height -
|
|
12361
|
+
R = B.top - z.height - G, $ = B.left + B.width / 2 - z.width / 2;
|
|
12362
12362
|
break;
|
|
12363
12363
|
case "bottom":
|
|
12364
|
-
R = B.bottom +
|
|
12364
|
+
R = B.bottom + G, $ = B.left + B.width / 2 - z.width / 2;
|
|
12365
12365
|
break;
|
|
12366
12366
|
case "left":
|
|
12367
|
-
R = B.top + B.height / 2 - z.height / 2, $ = B.left - z.width -
|
|
12367
|
+
R = B.top + B.height / 2 - z.height / 2, $ = B.left - z.width - G;
|
|
12368
12368
|
break;
|
|
12369
12369
|
case "right":
|
|
12370
|
-
R = B.top + B.height / 2 - z.height / 2, $ = B.right +
|
|
12370
|
+
R = B.top + B.height / 2 - z.height / 2, $ = B.right + G;
|
|
12371
12371
|
break;
|
|
12372
12372
|
}
|
|
12373
12373
|
const q = 8;
|
|
@@ -12428,7 +12428,7 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12428
12428
|
const [w, m] = L(!1), [u, f] = L(0), [b, x] = L(0), [y, M] = L(0), [k, V] = L(!1), [_, C] = L(null), [N, B] = L({
|
|
12429
12429
|
position: "fixed",
|
|
12430
12430
|
visibility: "hidden"
|
|
12431
|
-
}), z = O(null),
|
|
12431
|
+
}), z = O(null), G = O(null);
|
|
12432
12432
|
F(() => {
|
|
12433
12433
|
a && t instanceof Date && (f(s === "12h" ? t.getHours() % 12 || 12 : t.getHours()), x(t.getMinutes()), M(t.getSeconds()), V(t.getHours() >= 12));
|
|
12434
12434
|
}, [
|
|
@@ -12439,17 +12439,17 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12439
12439
|
const R = v ? !d : w;
|
|
12440
12440
|
F(() => {
|
|
12441
12441
|
if (v) return;
|
|
12442
|
-
const T = (
|
|
12443
|
-
R && z.current &&
|
|
12442
|
+
const T = (Z) => {
|
|
12443
|
+
R && z.current && G.current && !z.current.contains(Z.target) && !G.current.contains(Z.target) && (C(null), m(!1));
|
|
12444
12444
|
};
|
|
12445
12445
|
return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
|
|
12446
12446
|
}, [v, R]);
|
|
12447
12447
|
const $ = E(() => {
|
|
12448
|
-
if (v || !R || !z.current || !
|
|
12449
|
-
const T = z.current.getBoundingClientRect(),
|
|
12448
|
+
if (v || !R || !z.current || !G.current) return;
|
|
12449
|
+
const T = z.current.getBoundingClientRect(), Z = G.current.getBoundingClientRect(), d1 = 16, v1 = 8, U = window.innerHeight - T.bottom - d1, i1 = T.top - d1, n1 = U < Z.height && i1 > Z.height ? T.top - Z.height - v1 : T.bottom + v1, y1 = Math.max(d1, Math.min(n1, window.innerHeight - Z.height - d1)), u1 = Math.max(d1, Math.min(T.left, window.innerWidth - Z.width - d1));
|
|
12450
12450
|
B({
|
|
12451
12451
|
position: "fixed",
|
|
12452
|
-
top: `${
|
|
12452
|
+
top: `${y1}px`,
|
|
12453
12453
|
left: `${u1}px`,
|
|
12454
12454
|
zIndex: 1100
|
|
12455
12455
|
});
|
|
@@ -12483,12 +12483,12 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12483
12483
|
c?.(T), p && l !== "multiple" && !v && m(!1);
|
|
12484
12484
|
return;
|
|
12485
12485
|
}
|
|
12486
|
-
const
|
|
12487
|
-
|
|
12486
|
+
const Z = new Date(T), d1 = s === "12h" ? k ? u % 12 + 12 : u % 12 : u;
|
|
12487
|
+
Z.setHours(d1, b, y), c?.(Z), p && !v && m(!1);
|
|
12488
12488
|
}, A = () => {
|
|
12489
12489
|
if (!t || !(t instanceof Date)) return;
|
|
12490
|
-
const T = new Date(t),
|
|
12491
|
-
T.setHours(
|
|
12490
|
+
const T = new Date(t), Z = s === "12h" ? k ? u % 12 + 12 : u % 12 : u;
|
|
12491
|
+
T.setHours(Z, b, y), c?.(T);
|
|
12492
12492
|
}, c1 = (T) => {
|
|
12493
12493
|
T.stopPropagation(), C(null), c?.(void 0);
|
|
12494
12494
|
}, t1 = q();
|
|
@@ -12517,7 +12517,7 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12517
12517
|
})]
|
|
12518
12518
|
})]
|
|
12519
12519
|
}), R && (v ? /* @__PURE__ */ r("div", {
|
|
12520
|
-
ref:
|
|
12520
|
+
ref: G,
|
|
12521
12521
|
className: "datepicker__dropdown datepicker__dropdown--inline",
|
|
12522
12522
|
children: [/* @__PURE__ */ e(b0, {
|
|
12523
12523
|
...g,
|
|
@@ -12539,8 +12539,8 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12539
12539
|
className: "datepicker__time-input",
|
|
12540
12540
|
value: u,
|
|
12541
12541
|
onChange: (T) => {
|
|
12542
|
-
const
|
|
12543
|
-
f(Math.min(Math.max(
|
|
12542
|
+
const Z = parseInt(T.target.value) || 0;
|
|
12543
|
+
f(Math.min(Math.max(Z, 0), s === "12h" ? 12 : 23));
|
|
12544
12544
|
},
|
|
12545
12545
|
onBlur: A,
|
|
12546
12546
|
min: "0",
|
|
@@ -12552,8 +12552,8 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12552
12552
|
className: "datepicker__time-input",
|
|
12553
12553
|
value: b,
|
|
12554
12554
|
onChange: (T) => {
|
|
12555
|
-
const
|
|
12556
|
-
x(Math.min(Math.max(
|
|
12555
|
+
const Z = parseInt(T.target.value) || 0;
|
|
12556
|
+
x(Math.min(Math.max(Z, 0), 59));
|
|
12557
12557
|
},
|
|
12558
12558
|
onBlur: A,
|
|
12559
12559
|
min: "0",
|
|
@@ -12564,8 +12564,8 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12564
12564
|
className: "datepicker__time-input",
|
|
12565
12565
|
value: y,
|
|
12566
12566
|
onChange: (T) => {
|
|
12567
|
-
const
|
|
12568
|
-
M(Math.min(Math.max(
|
|
12567
|
+
const Z = parseInt(T.target.value) || 0;
|
|
12568
|
+
M(Math.min(Math.max(Z, 0), 59));
|
|
12569
12569
|
},
|
|
12570
12570
|
onBlur: A,
|
|
12571
12571
|
min: "0",
|
|
@@ -12583,7 +12583,7 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12583
12583
|
})]
|
|
12584
12584
|
})]
|
|
12585
12585
|
}) : W1(/* @__PURE__ */ r("div", {
|
|
12586
|
-
ref:
|
|
12586
|
+
ref: G,
|
|
12587
12587
|
className: "datepicker__dropdown",
|
|
12588
12588
|
style: N,
|
|
12589
12589
|
children: [/* @__PURE__ */ e(b0, {
|
|
@@ -12606,8 +12606,8 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12606
12606
|
className: "datepicker__time-input",
|
|
12607
12607
|
value: u,
|
|
12608
12608
|
onChange: (T) => {
|
|
12609
|
-
const
|
|
12610
|
-
f(Math.min(Math.max(
|
|
12609
|
+
const Z = parseInt(T.target.value) || 0;
|
|
12610
|
+
f(Math.min(Math.max(Z, 0), s === "12h" ? 12 : 23));
|
|
12611
12611
|
},
|
|
12612
12612
|
onBlur: A,
|
|
12613
12613
|
min: "0",
|
|
@@ -12619,8 +12619,8 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12619
12619
|
className: "datepicker__time-input",
|
|
12620
12620
|
value: b,
|
|
12621
12621
|
onChange: (T) => {
|
|
12622
|
-
const
|
|
12623
|
-
x(Math.min(Math.max(
|
|
12622
|
+
const Z = parseInt(T.target.value) || 0;
|
|
12623
|
+
x(Math.min(Math.max(Z, 0), 59));
|
|
12624
12624
|
},
|
|
12625
12625
|
onBlur: A,
|
|
12626
12626
|
min: "0",
|
|
@@ -12631,8 +12631,8 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12631
12631
|
className: "datepicker__time-input",
|
|
12632
12632
|
value: y,
|
|
12633
12633
|
onChange: (T) => {
|
|
12634
|
-
const
|
|
12635
|
-
M(Math.min(Math.max(
|
|
12634
|
+
const Z = parseInt(T.target.value) || 0;
|
|
12635
|
+
M(Math.min(Math.max(Z, 0), 59));
|
|
12636
12636
|
},
|
|
12637
12637
|
onBlur: A,
|
|
12638
12638
|
min: "0",
|
|
@@ -12662,18 +12662,18 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12662
12662
|
}
|
|
12663
12663
|
return o / a.length >= s;
|
|
12664
12664
|
}, u0 = ({ allowCustomValue: t = !1, autofocus: c = !1, className: l = "", disabled: a = !1, error: s, highlighted: o = !1, id: i, label: n, multiple: d = !1, name: h, onChange: p, onSearchChange: v, options: g, placeholder: w = "Select an option", searchable: m = !0, searchValue: u, selectedCountDisplay: f = "inline", success: b, usePortal: x = !0, value: y, valueAsChip: M = !0 }) => {
|
|
12665
|
-
const [k, V] = L(!1), [_, C] = L(u || ""), [N, B] = L(g), [z,
|
|
12665
|
+
const [k, V] = L(!1), [_, C] = L(u || ""), [N, B] = L(g), [z, G] = L(-1), [R, $] = L([]), [q, p1] = L({
|
|
12666
12666
|
top: 0,
|
|
12667
12667
|
left: 0,
|
|
12668
12668
|
width: 0
|
|
12669
|
-
}), [A, c1] = L(!1), t1 = O(null), T = O([]),
|
|
12669
|
+
}), [A, c1] = L(!1), t1 = O(null), T = O([]), Z = O(null), d1 = O(null), v1 = g0(), U = i ?? `dropdown-${v1}`;
|
|
12670
12670
|
F(() => {
|
|
12671
12671
|
if (!m || !_) B(g);
|
|
12672
12672
|
else {
|
|
12673
12673
|
const P = r2(_);
|
|
12674
12674
|
B(g.filter((j) => r2(j.label).includes(P)));
|
|
12675
12675
|
}
|
|
12676
|
-
|
|
12676
|
+
G(-1);
|
|
12677
12677
|
}, [
|
|
12678
12678
|
_,
|
|
12679
12679
|
g,
|
|
@@ -12776,7 +12776,7 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12776
12776
|
j ? Y = R.filter((m1) => m1.value !== P.value) : Y = [...R, P], $(Y), m && C(""), p && p(Y, h);
|
|
12777
12777
|
} else
|
|
12778
12778
|
C(P.label), $([P]), V(!1), p && p(P, h);
|
|
12779
|
-
},
|
|
12779
|
+
}, y1 = () => {
|
|
12780
12780
|
if (!t || !_.trim()) return;
|
|
12781
12781
|
const P = g.find((Y) => Y.label.toLowerCase() === _.toLowerCase() || Y.value.toString() === _);
|
|
12782
12782
|
if (P) {
|
|
@@ -12801,9 +12801,9 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12801
12801
|
}, G1 = (P) => {
|
|
12802
12802
|
C(P), k || V(!0), v?.(P);
|
|
12803
12803
|
}, X = () => {
|
|
12804
|
-
a || (V(!0), !d && m && R.length > 0 && C(""), (d || m) &&
|
|
12804
|
+
a || (V(!0), !d && m && R.length > 0 && C(""), (d || m) && Z.current?.focus());
|
|
12805
12805
|
}, K = () => {
|
|
12806
|
-
a || (V(!k), k || (
|
|
12806
|
+
a || (V(!k), k || (G(-1), !d && m && R.length > 0 && C(""), (d || m) && Z.current?.focus()));
|
|
12807
12807
|
}, S = (P) => {
|
|
12808
12808
|
if (!a) {
|
|
12809
12809
|
if (!k) {
|
|
@@ -12813,20 +12813,20 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12813
12813
|
switch (P.key) {
|
|
12814
12814
|
case "ArrowDown":
|
|
12815
12815
|
if (P.preventDefault(), t && _ && N.length === 0) return;
|
|
12816
|
-
|
|
12816
|
+
G((j) => {
|
|
12817
12817
|
const Y = j < (t && _ && !N.some((m1) => m1.label.toLowerCase() === _.toLowerCase()) ? N.length : N.length - 1) ? j + 1 : 0;
|
|
12818
12818
|
return Y < N.length && T.current[Y] && T.current[Y]?.scrollIntoView({ block: "nearest" }), Y;
|
|
12819
12819
|
});
|
|
12820
12820
|
break;
|
|
12821
12821
|
case "ArrowUp":
|
|
12822
12822
|
if (P.preventDefault(), t && _ && N.length === 0) return;
|
|
12823
|
-
|
|
12823
|
+
G((j) => {
|
|
12824
12824
|
const Y = t && _ && !N.some((B1) => B1.label.toLowerCase() === _.toLowerCase()) ? N.length : N.length - 1, m1 = j > 0 ? j - 1 : Y;
|
|
12825
12825
|
return m1 < N.length && T.current[m1] && T.current[m1]?.scrollIntoView({ block: "nearest" }), m1;
|
|
12826
12826
|
});
|
|
12827
12827
|
break;
|
|
12828
12828
|
case "Enter":
|
|
12829
|
-
P.preventDefault(), z >= 0 && z < N.length ? n1(N[z]) : (t && _ && z === N.length || t && _ && N.length === 0) &&
|
|
12829
|
+
P.preventDefault(), z >= 0 && z < N.length ? n1(N[z]) : (t && _ && z === N.length || t && _ && N.length === 0) && y1();
|
|
12830
12830
|
break;
|
|
12831
12831
|
case "Escape":
|
|
12832
12832
|
P.preventDefault(), V(!1), !d && R.length > 0 ? C(R[0].label) : d && m && C("");
|
|
@@ -12866,7 +12866,7 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12866
12866
|
},
|
|
12867
12867
|
className: `dropdown-option ${j.className || ""} ${z === Y ? "focused" : ""} ${D(j) ? "selected" : ""} ${j.disabled ? "dropdown-option--disabled" : ""}`,
|
|
12868
12868
|
onClick: () => n1(j),
|
|
12869
|
-
onMouseEnter: () =>
|
|
12869
|
+
onMouseEnter: () => G(Y),
|
|
12870
12870
|
title: j.tooltip,
|
|
12871
12871
|
children: [d && /* @__PURE__ */ e("div", {
|
|
12872
12872
|
className: "dropdown-option-checkbox",
|
|
@@ -12909,8 +12909,8 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12909
12909
|
T.current[N.length] = j;
|
|
12910
12910
|
},
|
|
12911
12911
|
className: `dropdown-option dropdown-option--create ${z === N.length ? "focused" : ""}`,
|
|
12912
|
-
onClick:
|
|
12913
|
-
onMouseEnter: () =>
|
|
12912
|
+
onClick: y1,
|
|
12913
|
+
onMouseEnter: () => G(N.length),
|
|
12914
12914
|
children: /* @__PURE__ */ e("div", {
|
|
12915
12915
|
className: "dropdown-option-content",
|
|
12916
12916
|
children: /* @__PURE__ */ r("span", {
|
|
@@ -12955,7 +12955,7 @@ var Ul = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
|
|
|
12955
12955
|
})]
|
|
12956
12956
|
}),
|
|
12957
12957
|
/* @__PURE__ */ e(S1, {
|
|
12958
|
-
ref:
|
|
12958
|
+
ref: Z,
|
|
12959
12959
|
id: U,
|
|
12960
12960
|
placeholder: b1 ? "" : x1(),
|
|
12961
12961
|
value: b1 ? "" : a1(),
|
|
@@ -13839,7 +13839,7 @@ var Wr = [{
|
|
|
13839
13839
|
].filter(Boolean).join(" "), B = ["control-panel__overlay", i ? "control-panel__overlay--contained" : ""].filter(Boolean).join(" "), z = {
|
|
13840
13840
|
"--control-panel-width": t,
|
|
13841
13841
|
"--control-panel-shadow": d
|
|
13842
|
-
},
|
|
13842
|
+
}, G = f.length === 0 ? [] : "type" in f[0] ? [{ options: f }] : f, R = !!(x || y || M || G.length > 0), $ = g.length > 0 || w !== void 0 && w > 0;
|
|
13843
13843
|
return /* @__PURE__ */ r(r1, { children: [o && V && _ && /* @__PURE__ */ e("div", {
|
|
13844
13844
|
className: B,
|
|
13845
13845
|
onClick: C
|
|
@@ -13883,7 +13883,7 @@ var Wr = [{
|
|
|
13883
13883
|
}),
|
|
13884
13884
|
$ && R && /* @__PURE__ */ e(e0, { spacing: 0 }),
|
|
13885
13885
|
R && /* @__PURE__ */ e(Fr, {
|
|
13886
|
-
normalizedOptionGroups:
|
|
13886
|
+
normalizedOptionGroups: G,
|
|
13887
13887
|
onOptionChange: b,
|
|
13888
13888
|
viewToggle: x,
|
|
13889
13889
|
groupBy: y,
|
|
@@ -14232,9 +14232,9 @@ function hc({ data: t, columns: c, rowKey: l, card: a, actions: s, timeline: o,
|
|
|
14232
14232
|
primary: h.primary,
|
|
14233
14233
|
secondary: h.secondary
|
|
14234
14234
|
}) : /* @__PURE__ */ e(l0, { title: "No data available" });
|
|
14235
|
-
const B = (z,
|
|
14236
|
-
const R = N.get(
|
|
14237
|
-
|
|
14235
|
+
const B = (z, G) => {
|
|
14236
|
+
const R = N.get(G), $ = l(z, G), q = p && v.includes($), p1 = V.has($), A = n?.(z), c1 = `data-view__card ${i || A ? "data-view__card--clickable" : ""} ${q ? "data-view__card--selected" : ""} ${p1 ? "data-view__card--pinned" : ""} ${d?.(z) || ""}`, t1 = (Z) => {
|
|
14237
|
+
Z.metaKey || Z.ctrlKey || Z.shiftKey || Z.altKey || Z.button !== 0 || i && (Z.preventDefault(), i(z, Z));
|
|
14238
14238
|
}, T = /* @__PURE__ */ r(r1, { children: [
|
|
14239
14239
|
p1 && /* @__PURE__ */ e("span", {
|
|
14240
14240
|
className: "data-view__card-pin",
|
|
@@ -14246,10 +14246,10 @@ function hc({ data: t, columns: c, rowKey: l, card: a, actions: s, timeline: o,
|
|
|
14246
14246
|
}),
|
|
14247
14247
|
p && w && /* @__PURE__ */ e("div", {
|
|
14248
14248
|
className: "data-view__card-select",
|
|
14249
|
-
onClick: (
|
|
14249
|
+
onClick: (Z) => Z.stopPropagation(),
|
|
14250
14250
|
children: /* @__PURE__ */ e(m0, {
|
|
14251
14251
|
checked: q || !1,
|
|
14252
|
-
onChange: (
|
|
14252
|
+
onChange: (Z) => w($, Z)
|
|
14253
14253
|
})
|
|
14254
14254
|
}),
|
|
14255
14255
|
a?.media && /* @__PURE__ */ e("div", {
|
|
@@ -14257,16 +14257,16 @@ function hc({ data: t, columns: c, rowKey: l, card: a, actions: s, timeline: o,
|
|
|
14257
14257
|
children: a.media(z)
|
|
14258
14258
|
}),
|
|
14259
14259
|
a && (() => {
|
|
14260
|
-
const
|
|
14260
|
+
const Z = a.icon?.(z);
|
|
14261
14261
|
return /* @__PURE__ */ r("div", {
|
|
14262
14262
|
className: "data-view__card-header",
|
|
14263
14263
|
children: [/* @__PURE__ */ r("div", {
|
|
14264
14264
|
className: "data-view__card-title-row",
|
|
14265
14265
|
children: [/* @__PURE__ */ r("div", {
|
|
14266
14266
|
className: "data-view__card-title-line",
|
|
14267
|
-
children: [
|
|
14267
|
+
children: [Z && /* @__PURE__ */ e(I, {
|
|
14268
14268
|
className: "data-view__card-icon",
|
|
14269
|
-
name:
|
|
14269
|
+
name: Z
|
|
14270
14270
|
}), /* @__PURE__ */ e("span", {
|
|
14271
14271
|
className: "data-view__card-title",
|
|
14272
14272
|
children: a.title(z)
|
|
@@ -14283,20 +14283,20 @@ function hc({ data: t, columns: c, rowKey: l, card: a, actions: s, timeline: o,
|
|
|
14283
14283
|
})(),
|
|
14284
14284
|
k.length > 0 && /* @__PURE__ */ e("div", {
|
|
14285
14285
|
className: "data-view__card-body",
|
|
14286
|
-
children: k.map((
|
|
14286
|
+
children: k.map((Z) => /* @__PURE__ */ r("div", {
|
|
14287
14287
|
className: "data-view__card-field",
|
|
14288
14288
|
children: [/* @__PURE__ */ e("span", {
|
|
14289
14289
|
className: "data-view__card-label",
|
|
14290
|
-
children: N2(
|
|
14290
|
+
children: N2(Z)
|
|
14291
14291
|
}), /* @__PURE__ */ e("span", {
|
|
14292
14292
|
className: "data-view__card-value",
|
|
14293
|
-
children: H2(
|
|
14293
|
+
children: H2(Z, z)
|
|
14294
14294
|
})]
|
|
14295
|
-
},
|
|
14295
|
+
}, Z.key))
|
|
14296
14296
|
}),
|
|
14297
14297
|
s && /* @__PURE__ */ e("div", {
|
|
14298
14298
|
className: "data-view__card-actions",
|
|
14299
|
-
onClick: (
|
|
14299
|
+
onClick: (Z) => Z.stopPropagation(),
|
|
14300
14300
|
children: s(z)
|
|
14301
14301
|
})
|
|
14302
14302
|
] });
|
|
@@ -14307,7 +14307,7 @@ function hc({ data: t, columns: c, rowKey: l, card: a, actions: s, timeline: o,
|
|
|
14307
14307
|
children: T
|
|
14308
14308
|
}) : /* @__PURE__ */ e("div", {
|
|
14309
14309
|
className: c1,
|
|
14310
|
-
onClick: i ? () => i(z) : void 0,
|
|
14310
|
+
onClick: i ? (Z) => i(z, Z) : void 0,
|
|
14311
14311
|
children: T
|
|
14312
14312
|
})] }, $);
|
|
14313
14313
|
};
|
|
@@ -14315,23 +14315,23 @@ function hc({ data: t, columns: c, rowKey: l, card: a, actions: s, timeline: o,
|
|
|
14315
14315
|
let z = 0;
|
|
14316
14316
|
return /* @__PURE__ */ e("div", {
|
|
14317
14317
|
className: "data-view__groups",
|
|
14318
|
-
children: f.map((
|
|
14318
|
+
children: f.map((G) => {
|
|
14319
14319
|
const R = z;
|
|
14320
|
-
z +=
|
|
14321
|
-
const $ = x && y?.has(
|
|
14320
|
+
z += G.items.length;
|
|
14321
|
+
const $ = x && y?.has(G.key);
|
|
14322
14322
|
return /* @__PURE__ */ r("section", {
|
|
14323
14323
|
className: "data-view__group",
|
|
14324
14324
|
children: [/* @__PURE__ */ r("header", {
|
|
14325
14325
|
className: `data-view__group-header${x ? " data-view__group-header--collapsible" : ""}`,
|
|
14326
|
-
onClick: x ? () => M?.(
|
|
14326
|
+
onClick: x ? () => M?.(G.key) : void 0,
|
|
14327
14327
|
children: [
|
|
14328
14328
|
/* @__PURE__ */ e("span", {
|
|
14329
14329
|
className: "data-view__group-label",
|
|
14330
|
-
children:
|
|
14330
|
+
children: G.label
|
|
14331
14331
|
}),
|
|
14332
14332
|
b && /* @__PURE__ */ e("span", {
|
|
14333
14333
|
className: "data-view__group-count",
|
|
14334
|
-
children:
|
|
14334
|
+
children: G.totalCount
|
|
14335
14335
|
}),
|
|
14336
14336
|
x && /* @__PURE__ */ e(I, {
|
|
14337
14337
|
className: "data-view__group-chevron",
|
|
@@ -14342,16 +14342,16 @@ function hc({ data: t, columns: c, rowKey: l, card: a, actions: s, timeline: o,
|
|
|
14342
14342
|
}), !$ && /* @__PURE__ */ e("div", {
|
|
14343
14343
|
className: _,
|
|
14344
14344
|
style: C,
|
|
14345
|
-
children:
|
|
14345
|
+
children: G.items.map((q, p1) => B(q, R + p1))
|
|
14346
14346
|
})]
|
|
14347
|
-
},
|
|
14347
|
+
}, G.key ?? "__null__");
|
|
14348
14348
|
})
|
|
14349
14349
|
});
|
|
14350
14350
|
}
|
|
14351
14351
|
return /* @__PURE__ */ e("div", {
|
|
14352
14352
|
className: _,
|
|
14353
14353
|
style: C,
|
|
14354
|
-
children: t.map((z,
|
|
14354
|
+
children: t.map((z, G) => B(z, G))
|
|
14355
14355
|
});
|
|
14356
14356
|
}
|
|
14357
14357
|
var dc = ({ items: t, sortKey: c, sortDirection: l, onSort: a, align: s = "left", showDirectionToggle: o = !1, className: i = "" }) => t.length === 0 ? null : /* @__PURE__ */ r("div", {
|
|
@@ -14421,8 +14421,8 @@ function pc({ state: t }) {
|
|
|
14421
14421
|
children: /* @__PURE__ */ e(I, { name: t === "asc" ? "arrow-up" : t === "desc" ? "arrow-down" : "arrow-bidirectional-vertical" })
|
|
14422
14422
|
});
|
|
14423
14423
|
}
|
|
14424
|
-
function _a({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1, onSelectionChange: o, selectedIds: i, pageSizeOptions: n = a2, initialPageSize: d = a2[1], showPageSize: h = !0, card: p, actions: v, actionsWidth: g, timeline: w, onRowClick: m, rowHref: u, rowClassName: f, rowDetail: b, empty: x, initialSortKey: y = null, initialSortDirection: M = "asc", sortKey: k, sortDirection: V, onSortChange: _, miniSort: C, showCardSortControls: N = !0, desktopView: B = "table", cardMaxWidth: z, className:
|
|
14425
|
-
const { isMobile:
|
|
14424
|
+
function _a({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1, onSelectionChange: o, selectedIds: i, pageSizeOptions: n = a2, initialPageSize: d = a2[1], showPageSize: h = !0, card: p, actions: v, actionsWidth: g, timeline: w, onRowClick: m, rowHref: u, rowClassName: f, rowDetail: b, empty: x, initialSortKey: y = null, initialSortDirection: M = "asc", sortKey: k, sortDirection: V, onSortChange: _, miniSort: C, showCardSortControls: N = !0, desktopView: B = "table", cardMaxWidth: z, className: G, onPageChange: R, onPageSizeChange: $, currentPage: q, totalItems: p1, group: A, showResultsCount: c1 = !0, totalCount: t1, itemNoun: T }) {
|
|
14425
|
+
const { isMobile: Z } = a0(), [d1, v1] = L(y), [U, i1] = L(M), [n1, y1] = L([]), u1 = i ?? n1, [A1, G1] = L(1), X = q ?? A1, [K, S] = L(d), [D, e1] = L(() => t.reduce((H, Q) => (Q.width && (H[Q.key] = Q.width), H), {})), [a1, x1] = L(/* @__PURE__ */ new Set()), f1 = (H) => {
|
|
14426
14426
|
x1((Q) => {
|
|
14427
14427
|
const o1 = new Set(Q);
|
|
14428
14428
|
return o1.has(H) ? o1.delete(H) : o1.add(H), o1;
|
|
@@ -14494,7 +14494,7 @@ function _a({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
|
|
|
14494
14494
|
id: w.idAccessor(H),
|
|
14495
14495
|
date: w.dateAccessor(H)
|
|
14496
14496
|
})), w.granularity) : /* @__PURE__ */ new Map(), [D1, w]), K1 = (H) => {
|
|
14497
|
-
i === void 0 &&
|
|
14497
|
+
i === void 0 && y1(H), o?.(c.filter((Q, o1) => H.includes(M1(Q, o1))));
|
|
14498
14498
|
}, j2 = (H) => {
|
|
14499
14499
|
H.sortable && (g1 === H.key ? $1(H.key, b1 === "asc" ? "desc" : "asc") : $1(H.key, "asc"));
|
|
14500
14500
|
}, P2 = (H, Q) => {
|
|
@@ -14526,7 +14526,7 @@ function _a({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
|
|
|
14526
14526
|
}), O0]
|
|
14527
14527
|
}) : null;
|
|
14528
14528
|
if (B === "cards") return /* @__PURE__ */ r("div", {
|
|
14529
|
-
className: `data-view data-view--cards${
|
|
14529
|
+
className: `data-view data-view--cards${G ? ` ${G}` : ""}`,
|
|
14530
14530
|
children: [
|
|
14531
14531
|
Y0,
|
|
14532
14532
|
N && U2 && /* @__PURE__ */ r("div", {
|
|
@@ -14585,7 +14585,7 @@ function _a({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
|
|
|
14585
14585
|
selectedIds: u1,
|
|
14586
14586
|
pinnedIds: a,
|
|
14587
14587
|
cardMaxWidth: z,
|
|
14588
|
-
isMobile:
|
|
14588
|
+
isMobile: Z,
|
|
14589
14589
|
groups: L0 ?? void 0,
|
|
14590
14590
|
showGroupCount: A?.showCount !== !1,
|
|
14591
14591
|
collapsible: A?.collapsible,
|
|
@@ -14670,14 +14670,14 @@ function _a({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
|
|
|
14670
14670
|
}) : /* @__PURE__ */ e(l0, { title: "No data available" })
|
|
14671
14671
|
}) });
|
|
14672
14672
|
const H = i0.length + (Q1 ? 1 : 0) + (s ? 1 : 0) + (v ? 1 : 0), Q = A?.showCount !== !1, o1 = (J, l1) => {
|
|
14673
|
-
const w1 = M1(J, l1), V1 = u1.includes(w1), L1 = q1.has(w1), R1 = F0.get(l1), k1 = u?.(J), K0 = !!m || !!k1, Y2 = (
|
|
14674
|
-
if (k1 && (
|
|
14673
|
+
const w1 = M1(J, l1), V1 = u1.includes(w1), L1 = q1.has(w1), R1 = F0.get(l1), k1 = u?.(J), K0 = !!m || !!k1, Y2 = (C1) => {
|
|
14674
|
+
if (k1 && (C1.metaKey || C1.ctrlKey || C1.shiftKey)) {
|
|
14675
14675
|
window.open(k1, "_blank", "noopener,noreferrer");
|
|
14676
14676
|
return;
|
|
14677
14677
|
}
|
|
14678
|
-
m?.(J);
|
|
14679
|
-
}, X2 = (
|
|
14680
|
-
|
|
14678
|
+
m?.(J, C1);
|
|
14679
|
+
}, X2 = (C1) => {
|
|
14680
|
+
C1.button !== 1 || !k1 || (C1.preventDefault(), window.open(k1, "_blank", "noopener,noreferrer"));
|
|
14681
14681
|
}, N0 = b?.(J);
|
|
14682
14682
|
return /* @__PURE__ */ r(Z1.Fragment, { children: [/* @__PURE__ */ r("tr", {
|
|
14683
14683
|
className: `${V1 ? "is-selected" : ""} ${K0 ? "data-view__row--clickable" : ""} ${L1 ? "data-view__row--pinned" : ""} ${f?.(J) || ""}`,
|
|
@@ -14692,13 +14692,13 @@ function _a({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
|
|
|
14692
14692
|
className: "data-view__checkbox",
|
|
14693
14693
|
children: /* @__PURE__ */ e(m0, {
|
|
14694
14694
|
checked: V1,
|
|
14695
|
-
onChange: (
|
|
14696
|
-
K1(
|
|
14695
|
+
onChange: (C1) => {
|
|
14696
|
+
K1(C1 ? [...u1, w1] : u1.filter((H0) => H0 !== w1));
|
|
14697
14697
|
}
|
|
14698
14698
|
})
|
|
14699
14699
|
}),
|
|
14700
|
-
i0.map((
|
|
14701
|
-
style: D[
|
|
14700
|
+
i0.map((C1, H0) => /* @__PURE__ */ r("td", {
|
|
14701
|
+
style: D[C1.key] ? { width: D[C1.key] } : void 0,
|
|
14702
14702
|
children: [H0 === 0 && L1 && /* @__PURE__ */ e(s1, {
|
|
14703
14703
|
title: "Pinned",
|
|
14704
14704
|
children: /* @__PURE__ */ e(I, {
|
|
@@ -14706,14 +14706,14 @@ function _a({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
|
|
|
14706
14706
|
name: "pin",
|
|
14707
14707
|
size: "sm"
|
|
14708
14708
|
})
|
|
14709
|
-
}), H2(
|
|
14710
|
-
},
|
|
14709
|
+
}), H2(C1, J)]
|
|
14710
|
+
}, C1.key)),
|
|
14711
14711
|
v && /* @__PURE__ */ e("td", {
|
|
14712
14712
|
className: "data-view__actions-cell",
|
|
14713
14713
|
style: g ? { width: g } : void 0,
|
|
14714
14714
|
children: /* @__PURE__ */ e("div", {
|
|
14715
14715
|
className: "data-view__table-actions",
|
|
14716
|
-
onClick: (
|
|
14716
|
+
onClick: (C1) => C1.stopPropagation(),
|
|
14717
14717
|
children: v(J)
|
|
14718
14718
|
})
|
|
14719
14719
|
})
|
|
@@ -14722,7 +14722,7 @@ function _a({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
|
|
|
14722
14722
|
className: "data-view__row-detail",
|
|
14723
14723
|
children: /* @__PURE__ */ e("td", {
|
|
14724
14724
|
colSpan: H,
|
|
14725
|
-
onClick: (
|
|
14725
|
+
onClick: (C1) => C1.stopPropagation(),
|
|
14726
14726
|
children: N0
|
|
14727
14727
|
})
|
|
14728
14728
|
})] }, w1);
|
|
@@ -14774,7 +14774,7 @@ function _a({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
|
|
|
14774
14774
|
})
|
|
14775
14775
|
] });
|
|
14776
14776
|
return /* @__PURE__ */ e("div", {
|
|
14777
|
-
className: `data-view${
|
|
14777
|
+
className: `data-view${G ? ` ${G}` : ""}`,
|
|
14778
14778
|
children: Q1 ? /* @__PURE__ */ r("div", {
|
|
14779
14779
|
className: "timeline-markers",
|
|
14780
14780
|
children: [/* @__PURE__ */ e("div", { className: "timeline-markers__track" }), X0]
|
|
@@ -14793,28 +14793,28 @@ var O1 = (t) => {
|
|
|
14793
14793
|
}), [x, y] = L(c?.start ?? ""), [M, k] = L(c?.end ?? ""), V = O(null), _ = O(null), C = c ?? d, N = O1(C.start), B = O1(C.end), z = N && B ? {
|
|
14794
14794
|
start: N,
|
|
14795
14795
|
end: B
|
|
14796
|
-
} : void 0,
|
|
14796
|
+
} : void 0, G = (U) => {
|
|
14797
14797
|
c || h(U), l?.(U);
|
|
14798
14798
|
}, R = (U) => {
|
|
14799
|
-
U && typeof U == "object" && "start" in U && (
|
|
14799
|
+
U && typeof U == "object" && "start" in U && (G({
|
|
14800
14800
|
start: f0(U.start),
|
|
14801
14801
|
end: f0(U.end)
|
|
14802
14802
|
}), w(null), !o && i && u(!1));
|
|
14803
14803
|
}, $ = (U) => {
|
|
14804
14804
|
w(U);
|
|
14805
14805
|
}, q = (U) => /^\d{4}-\d{2}-\d{2}$/.test(U) && O1(U) !== void 0, p1 = () => {
|
|
14806
|
-
q(x) ?
|
|
14806
|
+
q(x) ? G({
|
|
14807
14807
|
...C,
|
|
14808
14808
|
start: x
|
|
14809
14809
|
}) : y(C.start ?? "");
|
|
14810
14810
|
}, A = () => {
|
|
14811
|
-
q(M) ?
|
|
14811
|
+
q(M) ? G({
|
|
14812
14812
|
...C,
|
|
14813
14813
|
end: M
|
|
14814
14814
|
}) : k(C.end ?? "");
|
|
14815
14815
|
}, c1 = (U) => {
|
|
14816
14816
|
const i1 = /* @__PURE__ */ new Date(), n1 = /* @__PURE__ */ new Date();
|
|
14817
|
-
n1.setDate(n1.getDate() - U),
|
|
14817
|
+
n1.setDate(n1.getDate() - U), G({
|
|
14818
14818
|
start: f0(n1),
|
|
14819
14819
|
end: f0(i1)
|
|
14820
14820
|
});
|
|
@@ -14824,20 +14824,20 @@ var O1 = (t) => {
|
|
|
14824
14824
|
}, [C.start]), F(() => {
|
|
14825
14825
|
k(C.end ?? "");
|
|
14826
14826
|
}, [C.end]);
|
|
14827
|
-
const t1 = h1(() => d0(p, 1), [p]), T = o || m,
|
|
14828
|
-
if (!
|
|
14829
|
-
const U = V.current.getBoundingClientRect(), i1 = _.current.getBoundingClientRect(), n1 = 16,
|
|
14827
|
+
const t1 = h1(() => d0(p, 1), [p]), T = o || m, Z = !o && m, d1 = E(() => {
|
|
14828
|
+
if (!Z || !V.current || !_.current) return;
|
|
14829
|
+
const U = V.current.getBoundingClientRect(), i1 = _.current.getBoundingClientRect(), n1 = 16, y1 = 8, u1 = window.innerHeight - U.bottom - n1, A1 = U.top - n1, G1 = u1 < i1.height && A1 > i1.height ? U.top - i1.height - y1 : U.bottom + y1, X = Math.max(n1, Math.min(G1, window.innerHeight - i1.height - n1)), K = U.left, S = Math.max(n1, Math.min(K, window.innerWidth - i1.width - n1));
|
|
14830
14830
|
b({
|
|
14831
14831
|
position: "fixed",
|
|
14832
14832
|
top: `${X}px`,
|
|
14833
14833
|
left: `${S}px`,
|
|
14834
14834
|
zIndex: 1e3
|
|
14835
14835
|
});
|
|
14836
|
-
}, [
|
|
14836
|
+
}, [Z]);
|
|
14837
14837
|
F(() => {
|
|
14838
14838
|
o && u(!0);
|
|
14839
14839
|
}, [o]), F(() => {
|
|
14840
|
-
if (!
|
|
14840
|
+
if (!Z) {
|
|
14841
14841
|
b({
|
|
14842
14842
|
position: "fixed",
|
|
14843
14843
|
visibility: "hidden"
|
|
@@ -14848,18 +14848,18 @@ var O1 = (t) => {
|
|
|
14848
14848
|
return window.addEventListener("resize", d1), window.addEventListener("scroll", d1, !0), () => {
|
|
14849
14849
|
cancelAnimationFrame(U), window.removeEventListener("resize", d1), window.removeEventListener("scroll", d1, !0);
|
|
14850
14850
|
};
|
|
14851
|
-
}, [
|
|
14852
|
-
if (!
|
|
14851
|
+
}, [Z, d1]), F(() => {
|
|
14852
|
+
if (!Z) return;
|
|
14853
14853
|
const U = (n1) => {
|
|
14854
|
-
const
|
|
14855
|
-
V.current?.contains(
|
|
14854
|
+
const y1 = n1.target;
|
|
14855
|
+
V.current?.contains(y1) || _.current?.contains(y1) || u(!1);
|
|
14856
14856
|
}, i1 = (n1) => {
|
|
14857
14857
|
n1.key === "Escape" && u(!1);
|
|
14858
14858
|
};
|
|
14859
14859
|
return document.addEventListener("mousedown", U), document.addEventListener("keydown", i1), () => {
|
|
14860
14860
|
document.removeEventListener("mousedown", U), document.removeEventListener("keydown", i1);
|
|
14861
14861
|
};
|
|
14862
|
-
}, [
|
|
14862
|
+
}, [Z]);
|
|
14863
14863
|
const v1 = /* @__PURE__ */ r("div", {
|
|
14864
14864
|
className: "date-range-picker__calendar",
|
|
14865
14865
|
children: [/* @__PURE__ */ r("div", {
|
|
@@ -14974,7 +14974,7 @@ var O1 = (t) => {
|
|
|
14974
14974
|
]
|
|
14975
14975
|
}),
|
|
14976
14976
|
o && T && v1,
|
|
14977
|
-
|
|
14977
|
+
Z && W1(/* @__PURE__ */ e("div", {
|
|
14978
14978
|
ref: _,
|
|
14979
14979
|
className: "date-range-picker__overlay",
|
|
14980
14980
|
style: f,
|
|
@@ -15251,8 +15251,8 @@ var Cc = ({ text: t }) => /* @__PURE__ */ e(r1, { children: h1(() => fc(t), [t])
|
|
|
15251
15251
|
if (F(() => {
|
|
15252
15252
|
t && (i2 += 1, V(i2));
|
|
15253
15253
|
}, [t]), F(() => {
|
|
15254
|
-
const z = (
|
|
15255
|
-
|
|
15254
|
+
const z = (G) => {
|
|
15255
|
+
G.key === "Escape" && t && c();
|
|
15256
15256
|
};
|
|
15257
15257
|
return document.addEventListener("keydown", z), () => document.removeEventListener("keydown", z);
|
|
15258
15258
|
}, [t, c]), !t) return null;
|
|
@@ -15296,7 +15296,7 @@ var Cc = ({ text: t }) => /* @__PURE__ */ e(r1, { children: h1(() => fc(t), [t])
|
|
|
15296
15296
|
u.length > 0 && /* @__PURE__ */ e("div", {
|
|
15297
15297
|
className: "drawer__header-actions",
|
|
15298
15298
|
children: u.map((z) => {
|
|
15299
|
-
const
|
|
15299
|
+
const G = /* @__PURE__ */ e(W, {
|
|
15300
15300
|
disabled: z.disabled,
|
|
15301
15301
|
onClick: z.onClick,
|
|
15302
15302
|
icon: z.icon,
|
|
@@ -15308,8 +15308,8 @@ var Cc = ({ text: t }) => /* @__PURE__ */ e(r1, { children: h1(() => fc(t), [t])
|
|
|
15308
15308
|
return R ? /* @__PURE__ */ e(s1, {
|
|
15309
15309
|
title: R,
|
|
15310
15310
|
position: "bottom",
|
|
15311
|
-
children:
|
|
15312
|
-
}, z.id) : /* @__PURE__ */ e(Z1.Fragment, { children:
|
|
15311
|
+
children: G
|
|
15312
|
+
}, z.id) : /* @__PURE__ */ e(Z1.Fragment, { children: G }, z.id);
|
|
15313
15313
|
})
|
|
15314
15314
|
}),
|
|
15315
15315
|
!m && /* @__PURE__ */ e(W, {
|
|
@@ -20788,7 +20788,7 @@ var Cc = ({ text: t }) => /* @__PURE__ */ e(r1, { children: h1(() => fc(t), [t])
|
|
|
20788
20788
|
const q = B($);
|
|
20789
20789
|
_(q), N(!0), w?.(q);
|
|
20790
20790
|
}
|
|
20791
|
-
},
|
|
20791
|
+
}, G = ($) => {
|
|
20792
20792
|
if (N(!0), y === "blur" || y === "both") {
|
|
20793
20793
|
const q = B($.target.value);
|
|
20794
20794
|
_(q), w?.(q);
|
|
@@ -20817,7 +20817,7 @@ var Cc = ({ text: t }) => /* @__PURE__ */ e(r1, { children: h1(() => fc(t), [t])
|
|
|
20817
20817
|
placeholder: m,
|
|
20818
20818
|
ref: k,
|
|
20819
20819
|
value: M,
|
|
20820
|
-
onBlur:
|
|
20820
|
+
onBlur: G,
|
|
20821
20821
|
onChange: ($) => z($.target.value),
|
|
20822
20822
|
onClick: p,
|
|
20823
20823
|
onKeyDown: v,
|
|
@@ -20907,9 +20907,9 @@ function Ac(t) {
|
|
|
20907
20907
|
return t.filter((c) => c.type === "token").length;
|
|
20908
20908
|
}
|
|
20909
20909
|
var $c = _1(({ mask: t, value: c, onChange: l, onComplete: a, placeholder: s, label: o, hint: i, error: n, highlighted: d, size: h = "md", variant: p = "default", disabled: v = !1, readOnly: g = !1, maskChar: w = "_", mono: m = !0, icon: u, suffix: f, className: b = "", id: x, name: y, autoComplete: M }, k) => {
|
|
20910
|
-
const V = Z1.useMemo(() => Rc(t), [t]), _ = Z1.useMemo(() => Ac(V), [V]), C = g0(), N = x ?? C, [B, z] = L(() => c !== void 0 ? c : ""),
|
|
20910
|
+
const V = Z1.useMemo(() => Rc(t), [t]), _ = Z1.useMemo(() => Ac(V), [V]), C = g0(), N = x ?? C, [B, z] = L(() => c !== void 0 ? c : ""), G = O(null);
|
|
20911
20911
|
u2(k, () => ({
|
|
20912
|
-
focus: () =>
|
|
20912
|
+
focus: () => G.current?.focus(),
|
|
20913
20913
|
clear: () => {
|
|
20914
20914
|
z(""), l?.("", "");
|
|
20915
20915
|
},
|
|
@@ -20935,16 +20935,16 @@ var $c = _1(({ mask: t, value: c, onChange: l, onComplete: a, placeholder: s, la
|
|
|
20935
20935
|
return;
|
|
20936
20936
|
}
|
|
20937
20937
|
if (T.key.length !== 1 || T.ctrlKey || T.metaKey || (T.preventDefault(), B.length >= _)) return;
|
|
20938
|
-
const
|
|
20938
|
+
const Z = T.key;
|
|
20939
20939
|
let d1 = 0;
|
|
20940
20940
|
for (const i1 of V) if (i1.type === "token") {
|
|
20941
20941
|
if (d1 === B.length) {
|
|
20942
|
-
if (!R2[i1.key].test(
|
|
20942
|
+
if (!R2[i1.key].test(Z)) return;
|
|
20943
20943
|
break;
|
|
20944
20944
|
}
|
|
20945
20945
|
d1++;
|
|
20946
20946
|
}
|
|
20947
|
-
const { masked: v1, rawAccepted: U } = Z0(B +
|
|
20947
|
+
const { masked: v1, rawAccepted: U } = Z0(B + Z, V, w);
|
|
20948
20948
|
z(U), l?.(U, v1), U.length === _ && a?.(U, v1);
|
|
20949
20949
|
}, [
|
|
20950
20950
|
v,
|
|
@@ -20972,7 +20972,7 @@ var $c = _1(({ mask: t, value: c, onChange: l, onComplete: a, placeholder: s, la
|
|
|
20972
20972
|
children: u
|
|
20973
20973
|
}),
|
|
20974
20974
|
/* @__PURE__ */ e("input", {
|
|
20975
|
-
ref:
|
|
20975
|
+
ref: G,
|
|
20976
20976
|
id: N,
|
|
20977
20977
|
name: y,
|
|
20978
20978
|
type: "text",
|
|
@@ -21076,8 +21076,8 @@ function Tc(t) {
|
|
|
21076
21076
|
}
|
|
21077
21077
|
var Zc = _1(({ autoFocus: t, disabled: c, error: l, format: a = Dc, highlighted: s, id: o, label: i, onBlur: n, onChange: d, onClick: h, onKeyDown: p, placeholder: v, readOnly: g = !1, required: w = !1, success: m, value: u }, f) => {
|
|
21078
21078
|
const b = u !== void 0, [x, y] = L(() => u ? G0(E0(u), a) : ""), M = b ? G0(E0(u ?? ""), a) : x, k = v ?? a.replace(/#/g, "0"), V = a.length, _ = (C) => {
|
|
21079
|
-
const N = E0(C), B = Tc(a), z = N.slice(0, B),
|
|
21080
|
-
b || y(
|
|
21079
|
+
const N = E0(C), B = Tc(a), z = N.slice(0, B), G = G0(z, a);
|
|
21080
|
+
b || y(G), d?.(G, z);
|
|
21081
21081
|
};
|
|
21082
21082
|
return /* @__PURE__ */ r("div", {
|
|
21083
21083
|
className: "input-phone-wrapper",
|
|
@@ -21744,13 +21744,13 @@ var Ta = _1(({ autoComplete: t = "on", autoFocus: c, cols: l, disabled: a, error
|
|
|
21744
21744
|
if (k <= 0) return [];
|
|
21745
21745
|
let V = 0;
|
|
21746
21746
|
return M.map((_, C) => {
|
|
21747
|
-
const N = _.value / k * 360, B = V, z = C === M.length - 1 ? 360 : V + N,
|
|
21747
|
+
const N = _.value / k * 360, B = V, z = C === M.length - 1 ? 360 : V + N, G = B + (z - B) / 2;
|
|
21748
21748
|
return V = z, {
|
|
21749
21749
|
color: Fc(_, C),
|
|
21750
21750
|
endAngle: z,
|
|
21751
21751
|
index: C,
|
|
21752
21752
|
label: o ? o(_.value, _, C) : _.value,
|
|
21753
|
-
midAngle:
|
|
21753
|
+
midAngle: G,
|
|
21754
21754
|
path: Wc(h, p, B, z),
|
|
21755
21755
|
startAngle: B,
|
|
21756
21756
|
value: _.value
|
|
@@ -22814,7 +22814,7 @@ ${s.textContent ?? ""}
|
|
|
22814
22814
|
editorRef: p,
|
|
22815
22815
|
snapshotForUndo: f,
|
|
22816
22816
|
emitChange: u
|
|
22817
|
-
}), { activeTable:
|
|
22817
|
+
}), { activeTable: G, tableToolbarPos: R, showTableToolbar: $, hideTableToolbar: q, addRowAbove: p1, addRowBelow: A, removeRow: c1, addColumnLeft: t1, addColumnRight: T, removeColumn: Z, deleteTable: d1 } = il({
|
|
22818
22818
|
editorRef: p,
|
|
22819
22819
|
snapshotForUndo: f,
|
|
22820
22820
|
emitChange: u
|
|
@@ -22870,7 +22870,7 @@ ${s.textContent ?? ""}
|
|
|
22870
22870
|
x1.className = "rte-task-list", x1.appendChild(D), S.deleteContents(), S.insertNode(x1);
|
|
22871
22871
|
const f1 = document.createRange();
|
|
22872
22872
|
f1.setStart(a1, 1), f1.collapse(!0), K.removeAllRanges(), K.addRange(f1), u();
|
|
22873
|
-
}, [f, u]),
|
|
22873
|
+
}, [f, u]), y1 = E(() => {
|
|
22874
22874
|
U("insertHTML", rl);
|
|
22875
22875
|
}, [U]), u1 = E((X) => {
|
|
22876
22876
|
const K = X.target, S = K.closest("a");
|
|
@@ -22944,7 +22944,7 @@ ${s.textContent ?? ""}
|
|
|
22944
22944
|
applyHeading: i1,
|
|
22945
22945
|
insertTaskList: n1,
|
|
22946
22946
|
openLinkPrompt: () => N(),
|
|
22947
|
-
insertTable:
|
|
22947
|
+
insertTable: y1,
|
|
22948
22948
|
undo: b,
|
|
22949
22949
|
redo: x
|
|
22950
22950
|
}),
|
|
@@ -22957,7 +22957,7 @@ ${s.textContent ?? ""}
|
|
|
22957
22957
|
confirmLink: B,
|
|
22958
22958
|
cancelLink: z
|
|
22959
22959
|
}),
|
|
22960
|
-
|
|
22960
|
+
G && R && /* @__PURE__ */ e(ol, {
|
|
22961
22961
|
pos: R,
|
|
22962
22962
|
toolbarRef: g,
|
|
22963
22963
|
addRowAbove: p1,
|
|
@@ -22965,7 +22965,7 @@ ${s.textContent ?? ""}
|
|
|
22965
22965
|
removeRow: c1,
|
|
22966
22966
|
addColumnLeft: t1,
|
|
22967
22967
|
addColumnRight: T,
|
|
22968
|
-
removeColumn:
|
|
22968
|
+
removeColumn: Z,
|
|
22969
22969
|
deleteTable: d1
|
|
22970
22970
|
}),
|
|
22971
22971
|
/* @__PURE__ */ e("div", {
|
|
@@ -23408,8 +23408,8 @@ var h2 = 10, pi = ({ data: t, label: c, title: l, tooltip: a, enableSearch: s =
|
|
|
23408
23408
|
const [i, n] = L(!1), [d, h] = L(!1), [p, v] = L(""), [g, w] = L(null), [m, u] = L("asc"), f = h1(() => p.trim() ? t.filter((C) => C.name.toLowerCase().includes(p.toLowerCase())) : t, [t, p]), b = h1(() => {
|
|
23409
23409
|
if (!g) return f;
|
|
23410
23410
|
const C = [...f].sort((N, B) => {
|
|
23411
|
-
const z = g === "name" ? N.name : N.value,
|
|
23412
|
-
return typeof z == "number" && typeof
|
|
23411
|
+
const z = g === "name" ? N.name : N.value, G = g === "name" ? B.name : B.value;
|
|
23412
|
+
return typeof z == "number" && typeof G == "number" ? z - G : String(z).localeCompare(String(G));
|
|
23413
23413
|
});
|
|
23414
23414
|
return m === "asc" ? C : C.reverse();
|
|
23415
23415
|
}, [
|
|
@@ -24132,7 +24132,7 @@ var h2 = 10, pi = ({ data: t, label: c, title: l, tooltip: a, enableSearch: s =
|
|
|
24132
24132
|
V,
|
|
24133
24133
|
d
|
|
24134
24134
|
]);
|
|
24135
|
-
const
|
|
24135
|
+
const G = (A) => {
|
|
24136
24136
|
p(A);
|
|
24137
24137
|
}, R = (A) => {
|
|
24138
24138
|
v({
|
|
@@ -24220,7 +24220,7 @@ var h2 = 10, pi = ({ data: t, label: c, title: l, tooltip: a, enableSearch: s =
|
|
|
24220
24220
|
ref: d === A.value ? C : null,
|
|
24221
24221
|
type: "button",
|
|
24222
24222
|
className: `theme-settings__swatch ${d === A.value ? "theme-settings__swatch--active" : ""}`,
|
|
24223
|
-
onClick: () =>
|
|
24223
|
+
onClick: () => G(A.value),
|
|
24224
24224
|
children: [/* @__PURE__ */ r("div", {
|
|
24225
24225
|
className: "theme-settings__preview",
|
|
24226
24226
|
"data-theme": A.value,
|
|
@@ -25405,7 +25405,7 @@ var Si = (t, c, l) => {
|
|
|
25405
25405
|
} catch {
|
|
25406
25406
|
return t.trim();
|
|
25407
25407
|
}
|
|
25408
|
-
}, Nl = "1.0.
|
|
25408
|
+
}, Nl = "1.0.11", Zi = 217, Hl = "04b6943", Sl = "2026-06-28T14:45:22.478Z", Gi = "217", Bl = (t) => {
|
|
25409
25409
|
const c = document.getElementById("mb-version-toast");
|
|
25410
25410
|
if (c) {
|
|
25411
25411
|
c.remove();
|
|
@@ -25429,7 +25429,7 @@ var Si = (t, c, l) => {
|
|
|
25429
25429
|
const c = {
|
|
25430
25430
|
...t,
|
|
25431
25431
|
lib: Nl,
|
|
25432
|
-
libBuildNumber:
|
|
25432
|
+
libBuildNumber: 217,
|
|
25433
25433
|
libCommit: Hl,
|
|
25434
25434
|
libBuildDate: Sl
|
|
25435
25435
|
};
|
package/dist/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memobit/libs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "React component library powering the Memobit apps — 100+ components, 470+ icons, 70+ themes, helpers and hooks. TypeScript-first, ESM-only, React 19.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|