@ahrowe/ui 0.3.0 → 0.4.0
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.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +912 -809
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/package/common/dropdown/dropdown.d.ts +1 -1
- package/dist/types/package/common/dropdown/dropdown.types.d.ts +0 -1
- package/dist/types/package/common/floatingMenu/useFloatingPosition.d.ts +25 -0
- package/docs/Card.md +1 -1
- package/docs/Dropdown.md +2 -1
- package/docs/InputDropdown.md +2 -0
- package/docs/Tooltip.md +2 -0
- package/docs/VirtualList.md +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e, { Children as t, Component as n, PureComponent as r, forwardRef as i, useCallback as a, useEffect as o, useId as s, useImperativeHandle as c, useLayoutEffect as l, useMemo as u, useReducer as d, useRef as f, useState as p } from "react";
|
|
2
2
|
import m from "classnames";
|
|
3
3
|
import { FontAwesomeIcon as h } from "@fortawesome/react-fontawesome";
|
|
4
|
-
import { faBell as g, faCheck as _, faChevronDown as v, faChevronLeft as y, faChevronRight as b, faChevronUp as x, faCircleCheck as S, faCircleInfo as C, faCircleXmark as w, faClock as T, faDoorOpen as E, faDownload as D, faDrawPolygon as O, faEnvelope as k, faEye as A, faEyeSlash as j, faGear as M, faHandPointer as N, faLayerGroup as P, faMagnifyingGlassMinus as F, faMagnifyingGlassPlus as I, faPen as L, faPhone as R, faPlus as z, faSearch as B, faSquare as V, faTrash as ee, faTriangleExclamation as
|
|
4
|
+
import { faBell as g, faCheck as _, faChevronDown as v, faChevronLeft as y, faChevronRight as b, faChevronUp as x, faCircleCheck as S, faCircleInfo as C, faCircleXmark as w, faClock as T, faDoorOpen as E, faDownload as D, faDrawPolygon as O, faEnvelope as k, faEye as A, faEyeSlash as j, faGear as M, faHandPointer as N, faLayerGroup as P, faMagnifyingGlassMinus as F, faMagnifyingGlassPlus as I, faPen as L, faPhone as R, faPlus as z, faSearch as B, faSquare as V, faTrash as ee, faTriangleExclamation as H, faUpload as te, faUser as U, faXmark as ne, faXmarkCircle as re } from "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
import { Fragment as ie, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
6
6
|
import { createPortal as K } from "react-dom";
|
|
7
7
|
import ae from "downshift";
|
|
@@ -249,13 +249,15 @@ var Oe = De, ke = /* @__PURE__ */ function(e) {
|
|
|
249
249
|
onClick: l ? void 0 : (e) => g(e),
|
|
250
250
|
style: {
|
|
251
251
|
position: "relative",
|
|
252
|
-
overflow: i ? "hidden" : "visible",
|
|
253
252
|
...r
|
|
254
253
|
},
|
|
255
254
|
children: [t, /* @__PURE__ */ W("div", {
|
|
256
255
|
className: Me.rippleContainer,
|
|
257
256
|
ref: p,
|
|
258
|
-
style:
|
|
257
|
+
style: {
|
|
258
|
+
overflow: i ? "hidden" : "visible",
|
|
259
|
+
..._
|
|
260
|
+
}
|
|
259
261
|
})]
|
|
260
262
|
});
|
|
261
263
|
}), Pe = {
|
|
@@ -558,18 +560,18 @@ var tt = /* @__PURE__ */ function(e) {
|
|
|
558
560
|
outlined: nt.cardStyleOutlined,
|
|
559
561
|
filled: nt.cardStyleFilled
|
|
560
562
|
};
|
|
561
|
-
function it({ className: e = void 0, children: t = null, styleType: n = tt.Elevated, onClick: r = void 0, tabIndex: i = null, hoverEffect: a = void 0, style: o = void 0, autoGap: s = !0, clip: c = !
|
|
563
|
+
function it({ className: e = void 0, children: t = null, styleType: n = tt.Elevated, onClick: r = void 0, tabIndex: i = null, hoverEffect: a = void 0, style: o = void 0, autoGap: s = !0, clip: c = !1, ...l }) {
|
|
562
564
|
let u = !!r;
|
|
563
565
|
return /* @__PURE__ */ W(Be, {
|
|
564
566
|
...l,
|
|
565
|
-
className: m(nt.card,
|
|
567
|
+
className: m(nt.card, rt[n], c && nt.cardClip, u && nt.cardInteractable, (u && a !== !1 || a) && nt.cardHover, e),
|
|
566
568
|
onClick: r,
|
|
567
569
|
tabIndex: i ?? (u ? 0 : null),
|
|
568
570
|
style: o,
|
|
569
571
|
children: /* @__PURE__ */ W(Ne, {
|
|
570
572
|
disabled: !u,
|
|
571
|
-
|
|
572
|
-
|
|
573
|
+
className: m(nt.cardPadding, s && nt.cardGaps),
|
|
574
|
+
style: { borderRadius: "inherit" },
|
|
573
575
|
children: t
|
|
574
576
|
})
|
|
575
577
|
});
|
|
@@ -810,6 +812,8 @@ var gt = {
|
|
|
810
812
|
floatingMenuContent: "floatingMenu-content_AmxkA",
|
|
811
813
|
"floatingMenu-container": "floatingMenu-container_w7k-Y",
|
|
812
814
|
floatingMenuContainer: "floatingMenu-container_w7k-Y",
|
|
815
|
+
"floatingMenu-anim-flip": "floatingMenu-anim-flip_a4-Ri",
|
|
816
|
+
floatingMenuAnimFlip: "floatingMenu-anim-flip_a4-Ri",
|
|
813
817
|
"floatingMenu-container-align-left": "floatingMenu-container-align-left_InKnZ",
|
|
814
818
|
floatingMenuContainerAlignLeft: "floatingMenu-container-align-left_InKnZ",
|
|
815
819
|
"floatingMenu-container-align-right": "floatingMenu-container-align-right_a9OoS",
|
|
@@ -827,47 +831,90 @@ var gt = {
|
|
|
827
831
|
"floatingMenu-anim": "floatingMenu-anim_5KB-f",
|
|
828
832
|
floatingMenuAnim: "floatingMenu-anim_5KB-f",
|
|
829
833
|
showMenu: "showMenu_AprCh"
|
|
830
|
-
}
|
|
834
|
+
};
|
|
835
|
+
//#endregion
|
|
836
|
+
//#region package/common/floatingMenu/useFloatingPosition.ts
|
|
837
|
+
function _t(e) {
|
|
838
|
+
let t = [], n = e.parentElement;
|
|
839
|
+
for (; n && n !== document.body && n !== document.documentElement;) {
|
|
840
|
+
let e = getComputedStyle(n);
|
|
841
|
+
(e.overflowX !== "visible" || e.overflowY !== "visible") && t.push(n), n = n.parentElement;
|
|
842
|
+
}
|
|
843
|
+
return t;
|
|
844
|
+
}
|
|
845
|
+
function vt(e, t) {
|
|
846
|
+
return t.some((t) => {
|
|
847
|
+
let n = t.getBoundingClientRect();
|
|
848
|
+
return e.bottom <= n.top || e.top >= n.bottom || e.right <= n.left || e.left >= n.right;
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
function yt({ isOpen: e, triggerRef: t, anchorRef: n, panelRef: r, flipClassName: i, placement: a = "bottom" }) {
|
|
852
|
+
l(() => {
|
|
853
|
+
if (!e) return;
|
|
854
|
+
let o, s;
|
|
855
|
+
function c() {
|
|
856
|
+
let e = t.current, l = n.current;
|
|
857
|
+
if (!e || !l) {
|
|
858
|
+
o = requestAnimationFrame(c);
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
861
|
+
let u = _t(e);
|
|
862
|
+
function d() {
|
|
863
|
+
let t = e.getBoundingClientRect(), n = r.current?.offsetHeight ?? 0, o = window.innerHeight - t.bottom, s = t.top, c = a === "top" ? s : o, d = c < n && (a === "top" ? o : s) > c, f = a === "top" ? !d : d;
|
|
864
|
+
l.classList.toggle(i, d), l.style.top = `${f ? t.top - l.offsetHeight : t.bottom}px`, l.style.left = `${t.left}px`, l.style.visibility = vt(t, u) ? "hidden" : "";
|
|
865
|
+
}
|
|
866
|
+
d();
|
|
867
|
+
let f = [window, ...u];
|
|
868
|
+
f.forEach((e) => e.addEventListener("scroll", d, { passive: !0 })), window.addEventListener("resize", d), s = () => {
|
|
869
|
+
f.forEach((e) => e.removeEventListener("scroll", d)), window.removeEventListener("resize", d);
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
return c(), () => {
|
|
873
|
+
o !== void 0 && cancelAnimationFrame(o), s?.();
|
|
874
|
+
};
|
|
875
|
+
}, [
|
|
876
|
+
e,
|
|
877
|
+
t,
|
|
878
|
+
n,
|
|
879
|
+
r,
|
|
880
|
+
i,
|
|
881
|
+
a
|
|
882
|
+
]);
|
|
883
|
+
}
|
|
884
|
+
//#endregion
|
|
885
|
+
//#region package/common/floatingMenu/floatingMenu.types.ts
|
|
886
|
+
var bt = /* @__PURE__ */ function(e) {
|
|
831
887
|
return e.Left = "left", e.Right = "right", e.Center = "center", e;
|
|
832
888
|
}({});
|
|
833
889
|
//#endregion
|
|
834
890
|
//#region package/common/floatingMenu/floatingMenu.tsx
|
|
835
|
-
function
|
|
891
|
+
function xt(e) {
|
|
836
892
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
837
893
|
}
|
|
838
|
-
function
|
|
839
|
-
let h = f(null), g = f(null), _ = f(
|
|
894
|
+
function St({ align: e = bt.Left, children: t = null, content: n = null, isOpen: r = !1, onOpenChange: i = () => {}, dontCloseOnChildClick: a = !1, className: s, style: c, classNames: l, styles: u, ...d }) {
|
|
895
|
+
let h = f(null), g = f(null), _ = f(null), v = f(i), [y, b] = p(10);
|
|
840
896
|
o(() => {
|
|
841
|
-
|
|
897
|
+
v.current = i;
|
|
842
898
|
});
|
|
843
|
-
function
|
|
899
|
+
function x() {
|
|
844
900
|
if (!r) {
|
|
845
|
-
let e =
|
|
846
|
-
|
|
847
|
-
top: e.bottom,
|
|
848
|
-
left: e.left
|
|
849
|
-
} : null), i(!0);
|
|
901
|
+
let e = _.current?.getBoundingClientRect();
|
|
902
|
+
b(e?.width ?? 10), i(!0);
|
|
850
903
|
}
|
|
851
904
|
}
|
|
852
|
-
return
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
});
|
|
860
|
-
}
|
|
861
|
-
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
862
|
-
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
863
|
-
};
|
|
864
|
-
}, [r]), o(() => {
|
|
905
|
+
return yt({
|
|
906
|
+
isOpen: r,
|
|
907
|
+
triggerRef: _,
|
|
908
|
+
anchorRef: g,
|
|
909
|
+
panelRef: h,
|
|
910
|
+
flipClassName: gt.floatingMenuAnimFlip
|
|
911
|
+
}), o(() => {
|
|
865
912
|
if (!r) return;
|
|
866
913
|
function e(e) {
|
|
867
|
-
let t = h.current, n =
|
|
914
|
+
let t = h.current, n = _.current;
|
|
868
915
|
if (!t || !n) return;
|
|
869
916
|
let r = t === e.target || t.contains(e.target), i = a && (n === e.target || n.contains(e.target));
|
|
870
|
-
!r && !i &&
|
|
917
|
+
!r && !i && v.current(!1);
|
|
871
918
|
}
|
|
872
919
|
return window.addEventListener("mouseup", e), () => window.removeEventListener("mouseup", e);
|
|
873
920
|
}, [r, a]), /* @__PURE__ */ G("div", {
|
|
@@ -880,30 +927,30 @@ function yt({ align: e = _t.Left, children: t = null, content: n = null, isOpen:
|
|
|
880
927
|
children: [/* @__PURE__ */ W("div", {
|
|
881
928
|
className: m(gt.floatingMenuContent, l?.trigger),
|
|
882
929
|
style: u?.trigger,
|
|
883
|
-
ref:
|
|
884
|
-
onClick:
|
|
930
|
+
ref: _,
|
|
931
|
+
onClick: x,
|
|
885
932
|
children: t
|
|
886
|
-
}), r && /* @__PURE__ */ G("div", {
|
|
933
|
+
}), r && /* @__PURE__ */ W(et, { children: /* @__PURE__ */ G("div", {
|
|
934
|
+
ref: g,
|
|
887
935
|
className: m(gt.floatingMenuAnim, l?.menu),
|
|
888
936
|
style: {
|
|
889
|
-
width: `${
|
|
890
|
-
...b && {
|
|
891
|
-
top: b.top,
|
|
892
|
-
left: b.left
|
|
893
|
-
},
|
|
937
|
+
width: `${y}px`,
|
|
894
938
|
...u?.menu
|
|
895
939
|
},
|
|
896
|
-
children: [/* @__PURE__ */ W("div", { className: m(gt.floatingMenuContainerFlag, gt[`floatingMenuContainerFlagAlign${
|
|
940
|
+
children: [/* @__PURE__ */ W("div", { className: m(gt.floatingMenuContainerFlag, gt[`floatingMenuContainerFlagAlign${xt(e)}`]) }), /* @__PURE__ */ W("div", {
|
|
897
941
|
ref: h,
|
|
898
|
-
className: m(gt.floatingMenuContainer, gt[`floatingMenuContainerAlign${
|
|
942
|
+
className: m(gt.floatingMenuContainer, gt[`floatingMenuContainerAlign${xt(e)}`], l?.menuContainer),
|
|
899
943
|
style: u?.menuContainer,
|
|
900
944
|
children: n
|
|
901
945
|
})]
|
|
902
|
-
})]
|
|
946
|
+
}) })]
|
|
903
947
|
});
|
|
904
948
|
}
|
|
905
|
-
var
|
|
949
|
+
var Ct = {
|
|
950
|
+
tooltipAnchor: "tooltipAnchor_Ew7Xk",
|
|
906
951
|
tooltipBubble: "tooltipBubble_uyev0",
|
|
952
|
+
"tooltip-anchor-flip": "tooltip-anchor-flip_qlJyz",
|
|
953
|
+
tooltipAnchorFlip: "tooltip-anchor-flip_qlJyz",
|
|
907
954
|
tooltipDetails: "tooltipDetails_R7N16",
|
|
908
955
|
"tooltipDetails-icon": "tooltipDetails-icon_rsjns",
|
|
909
956
|
tooltipDetailsIcon: "tooltipDetails-icon_rsjns",
|
|
@@ -911,28 +958,50 @@ var bt = {
|
|
|
911
958
|
};
|
|
912
959
|
//#endregion
|
|
913
960
|
//#region package/common/tooltip/tooltip.tsx
|
|
914
|
-
function
|
|
915
|
-
let [a, o] = p(!1);
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
961
|
+
function wt({ variant: e, message: t = "", isVisible: n = !0, tooltipPosition: r, onClick: i }) {
|
|
962
|
+
let [a, o] = p(!1), s = f(null), c = f(null), u = f(null), d = f(null), h = f(null), [g, _] = p(10), v = e === "details" ? a : n;
|
|
963
|
+
l(() => {
|
|
964
|
+
u.current = e === "details" ? c.current : s.current?.parentElement ?? null;
|
|
965
|
+
}), l(() => {
|
|
966
|
+
if (v) {
|
|
967
|
+
let e = u.current?.getBoundingClientRect();
|
|
968
|
+
_(e?.width ?? 10);
|
|
969
|
+
}
|
|
970
|
+
}, [v]), yt({
|
|
971
|
+
isOpen: v,
|
|
972
|
+
triggerRef: u,
|
|
973
|
+
anchorRef: d,
|
|
974
|
+
panelRef: h,
|
|
975
|
+
flipClassName: Ct.tooltipAnchorFlip,
|
|
976
|
+
placement: "top"
|
|
977
|
+
});
|
|
978
|
+
let y = v && /* @__PURE__ */ W(et, { children: /* @__PURE__ */ W("div", {
|
|
979
|
+
ref: d,
|
|
980
|
+
className: Ct.tooltipAnchor,
|
|
981
|
+
style: {
|
|
982
|
+
width: `${g}px`,
|
|
983
|
+
"--tooltip-trigger-width": `${g}px`
|
|
984
|
+
},
|
|
985
|
+
children: /* @__PURE__ */ W("div", {
|
|
986
|
+
ref: h,
|
|
987
|
+
className: m(e === "error" ? Ct.tooltipError : Ct.tooltipBubble, r),
|
|
988
|
+
onClick: i,
|
|
989
|
+
children: t
|
|
990
|
+
})
|
|
991
|
+
}) });
|
|
992
|
+
return e === "details" ? /* @__PURE__ */ G("div", {
|
|
993
|
+
ref: c,
|
|
994
|
+
className: Ct.tooltipDetails,
|
|
922
995
|
children: [/* @__PURE__ */ W("span", {
|
|
923
|
-
className:
|
|
996
|
+
className: Ct.tooltipDetailsIcon,
|
|
924
997
|
onMouseEnter: () => o(!0),
|
|
925
998
|
onMouseLeave: () => o(!1),
|
|
926
999
|
children: "?"
|
|
927
|
-
}),
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
}
|
|
931
|
-
})
|
|
932
|
-
className: m(bt.tooltipError, r),
|
|
933
|
-
onClick: i,
|
|
934
|
-
children: t
|
|
935
|
-
}) : null;
|
|
1000
|
+
}), y]
|
|
1001
|
+
}) : e === "info" || e === "error" ? /* @__PURE__ */ G(ie, { children: [/* @__PURE__ */ W("span", {
|
|
1002
|
+
ref: s,
|
|
1003
|
+
style: { display: "none" }
|
|
1004
|
+
}), y] }) : null;
|
|
936
1005
|
}
|
|
937
1006
|
var Y = {
|
|
938
1007
|
"required-mark": "required-mark_xGJdX",
|
|
@@ -1006,12 +1075,12 @@ var Y = {
|
|
|
1006
1075
|
inputFieldIconNotClickable: "input-field-icon-notClickable_7j24I",
|
|
1007
1076
|
"input-error": "input-error_LIG23",
|
|
1008
1077
|
inputError: "input-error_LIG23"
|
|
1009
|
-
},
|
|
1078
|
+
}, Tt = /* @__PURE__ */ function(e) {
|
|
1010
1079
|
return e.Edit = "edit", e.Phone = "phone", e.Email = "email", e.Iban = "iban", e.Date = "date", e.HasNoIcon = "hasNoIcon", e.Search = "searchInput", e.Password = "password", e;
|
|
1011
1080
|
}({});
|
|
1012
1081
|
//#endregion
|
|
1013
1082
|
//#region package/common/input/input.tsx
|
|
1014
|
-
function
|
|
1083
|
+
function Et({ name: t = "", id: n, label: r = "", errorMessage: i = "", isValid: c = !0, className: l = "", style: u, value: d = "", icon: g = null, onChange: _ = () => {}, onFocus: v = null, onBlur: y = null, onMouseEnter: b = null, onMouseLeave: x = null, isUppercase: S = !1, isRequired: C = !1, tabIndex: w = 0, type: T = void 0, isRow: E = !1, onIconClick: D = null, parse: O = null, formValidator: M = null, autoFocus: N = !1, suffix: P = null, upperRightLabel: F = null, labelInBorder: I = !1, showCancel: z = !1, onClearClicked: V, min: ee = null, max: H = null, placeholder: te = "", useMatLabelStyle: U = !0, autoComplete: re = null, onClick: ie = () => null, readOnly: K = !1, customInput: ae, alwaysShowCancel: oe = !1, multiline: q = !1, rows: se, autoResize: ce = !1, classNames: J, styles: le, disabled: ue = !1, ...de }) {
|
|
1015
1084
|
let [fe, pe] = p(!1), [me, he] = p(!1), [ge, _e] = p(!1), [, ve] = p(0), ye = f(null), be = f(M), xe = s(), Se = n || t || xe, Ce = a(() => {
|
|
1016
1085
|
let e = ye.current;
|
|
1017
1086
|
!e || !ce || (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
@@ -1045,7 +1114,7 @@ function Ct({ name: t = "", id: n, label: r = "", errorMessage: i = "", isValid:
|
|
|
1045
1114
|
typeof e == "string" ? n = e : (t = e, n = e.target.value), O && (n = O(n)), M && M.set(n), _ && _(n, t), Ce();
|
|
1046
1115
|
}, je = () => {
|
|
1047
1116
|
if (T !== "email") return T === "password" && ge ? "text" : T;
|
|
1048
|
-
}, Me = T && T !==
|
|
1117
|
+
}, Me = T && T !== Tt.Date && T !== Tt.Iban && T !== Tt.HasNoIcon, Ne = Me && !U && (T === Tt.Email || T === Tt.Phone || T === Tt.Search), Pe = {
|
|
1049
1118
|
className: m(Y.inputFieldIcon, {
|
|
1050
1119
|
[Y.inputFieldIconNotClickable]: !D,
|
|
1051
1120
|
[Y.inputFieldIconLeft]: Ne
|
|
@@ -1059,7 +1128,7 @@ function Ct({ name: t = "", id: n, label: r = "", errorMessage: i = "", isValid:
|
|
|
1059
1128
|
onClick: () => _e(!ge)
|
|
1060
1129
|
}, ze = we(), Be = r;
|
|
1061
1130
|
Be && Te() && (Be = `${Be} *`);
|
|
1062
|
-
let Ve = M ? M.value : d, He = U && (fe || Ve || T ===
|
|
1131
|
+
let Ve = M ? M.value : d, He = U && (fe || Ve || T === Tt.Date);
|
|
1063
1132
|
return /* @__PURE__ */ G("div", {
|
|
1064
1133
|
className: m(Y.input, l),
|
|
1065
1134
|
style: u,
|
|
@@ -1095,8 +1164,8 @@ function Ct({ name: t = "", id: n, label: r = "", errorMessage: i = "", isValid:
|
|
|
1095
1164
|
...de,
|
|
1096
1165
|
className: m(Y.inputField, {
|
|
1097
1166
|
[Y.inputFieldUppercase]: S,
|
|
1098
|
-
[Y.inputFieldDate]: T ===
|
|
1099
|
-
[Y.inputFieldDefault]: T !==
|
|
1167
|
+
[Y.inputFieldDate]: T === Tt.Date,
|
|
1168
|
+
[Y.inputFieldDefault]: T !== Tt.Date,
|
|
1100
1169
|
[Y.inputFieldWithIcon]: Me || Le,
|
|
1101
1170
|
[Y.inputFieldWithIconLeft]: Ne,
|
|
1102
1171
|
[Y.inputFieldMultiline]: q,
|
|
@@ -1110,7 +1179,7 @@ function Ct({ name: t = "", id: n, label: r = "", errorMessage: i = "", isValid:
|
|
|
1110
1179
|
onChange: Ae,
|
|
1111
1180
|
onFocus: Oe,
|
|
1112
1181
|
onBlur: ke,
|
|
1113
|
-
placeholder: U ? "" :
|
|
1182
|
+
placeholder: U ? "" : te,
|
|
1114
1183
|
autoComplete: re,
|
|
1115
1184
|
onClick: ie,
|
|
1116
1185
|
readOnly: K,
|
|
@@ -1118,7 +1187,7 @@ function Ct({ name: t = "", id: n, label: r = "", errorMessage: i = "", isValid:
|
|
|
1118
1187
|
...!q && {
|
|
1119
1188
|
type: je(),
|
|
1120
1189
|
min: ee,
|
|
1121
|
-
max:
|
|
1190
|
+
max: H
|
|
1122
1191
|
},
|
|
1123
1192
|
...q && se !== void 0 && { rows: se }
|
|
1124
1193
|
}),
|
|
@@ -1132,7 +1201,7 @@ function Ct({ name: t = "", id: n, label: r = "", errorMessage: i = "", isValid:
|
|
|
1132
1201
|
/* @__PURE__ */ W("fieldset", {
|
|
1133
1202
|
className: m(Y.inputFieldset, J?.fieldset, {
|
|
1134
1203
|
[Y.inputContainerBorderFocused]: fe,
|
|
1135
|
-
[Y.inputContainerBorderSearchFocused]: T ===
|
|
1204
|
+
[Y.inputContainerBorderSearchFocused]: T === Tt.Search && (fe || d),
|
|
1136
1205
|
[Y.inputContainerBorderInvalid]: ze,
|
|
1137
1206
|
[Y.inputContainerBorderError]: ze
|
|
1138
1207
|
}),
|
|
@@ -1149,34 +1218,34 @@ function Ct({ name: t = "", id: n, label: r = "", errorMessage: i = "", isValid:
|
|
|
1149
1218
|
}),
|
|
1150
1219
|
children: Be
|
|
1151
1220
|
}),
|
|
1152
|
-
U &&
|
|
1221
|
+
U && te && /* @__PURE__ */ W("div", {
|
|
1153
1222
|
className: m(Y.inputPlaceholder, fe && !Ve && Y.inputPlaceholderShown, q && Y.inputPlaceholderMultiline),
|
|
1154
|
-
children:
|
|
1223
|
+
children: te
|
|
1155
1224
|
}),
|
|
1156
|
-
/* @__PURE__ */ W(
|
|
1225
|
+
/* @__PURE__ */ W(wt, {
|
|
1157
1226
|
variant: "error",
|
|
1158
1227
|
message: M ? M.getCurrentErrorMessage() : i || "",
|
|
1159
1228
|
isVisible: ze && (fe || me)
|
|
1160
1229
|
})
|
|
1161
1230
|
]
|
|
1162
1231
|
}),
|
|
1163
|
-
T ===
|
|
1232
|
+
T === Tt.Phone && /* @__PURE__ */ W(h, {
|
|
1164
1233
|
icon: R,
|
|
1165
1234
|
...Pe
|
|
1166
1235
|
}),
|
|
1167
|
-
T ===
|
|
1236
|
+
T === Tt.Email && /* @__PURE__ */ W(h, {
|
|
1168
1237
|
icon: k,
|
|
1169
1238
|
...Pe
|
|
1170
1239
|
}),
|
|
1171
|
-
T ===
|
|
1240
|
+
T === Tt.Edit && /* @__PURE__ */ W(h, {
|
|
1172
1241
|
icon: L,
|
|
1173
1242
|
...Pe
|
|
1174
1243
|
}),
|
|
1175
|
-
T ===
|
|
1244
|
+
T === Tt.Search && /* @__PURE__ */ W(h, {
|
|
1176
1245
|
icon: B,
|
|
1177
1246
|
...Pe
|
|
1178
1247
|
}),
|
|
1179
|
-
T ===
|
|
1248
|
+
T === Tt.Password && /* @__PURE__ */ W(h, {
|
|
1180
1249
|
icon: ge ? j : A,
|
|
1181
1250
|
...Re
|
|
1182
1251
|
}),
|
|
@@ -1190,7 +1259,7 @@ function Ct({ name: t = "", id: n, label: r = "", errorMessage: i = "", isValid:
|
|
|
1190
1259
|
]
|
|
1191
1260
|
});
|
|
1192
1261
|
}
|
|
1193
|
-
var
|
|
1262
|
+
var Dt = {
|
|
1194
1263
|
colorPicker: "colorPicker_Ts3an",
|
|
1195
1264
|
swatch: "swatch_NW78g",
|
|
1196
1265
|
swatchHex: "swatchHex_j7-i5",
|
|
@@ -1205,10 +1274,10 @@ var wt = {
|
|
|
1205
1274
|
};
|
|
1206
1275
|
//#endregion
|
|
1207
1276
|
//#region package/common/colorPicker/colorPicker.tsx
|
|
1208
|
-
function
|
|
1277
|
+
function Ot(e) {
|
|
1209
1278
|
return /^#[0-9a-fA-F]{6}$/.test(e) || /^#[0-9a-fA-F]{8}$/.test(e);
|
|
1210
1279
|
}
|
|
1211
|
-
function
|
|
1280
|
+
function kt(e) {
|
|
1212
1281
|
return /^#[0-9a-fA-F]{8}$/.test(e) ? {
|
|
1213
1282
|
hex6: e.slice(0, 7),
|
|
1214
1283
|
alpha: Math.round(parseInt(e.slice(7, 9), 16) / 255 * 100)
|
|
@@ -1217,13 +1286,13 @@ function Et(e) {
|
|
|
1217
1286
|
alpha: 100
|
|
1218
1287
|
};
|
|
1219
1288
|
}
|
|
1220
|
-
function
|
|
1289
|
+
function At(e, t, n) {
|
|
1221
1290
|
return !n || t >= 100 ? e : `${e}${Math.round(t / 100 * 255).toString(16).padStart(2, "0")}`;
|
|
1222
1291
|
}
|
|
1223
|
-
function
|
|
1292
|
+
function jt(e, t) {
|
|
1224
1293
|
return `rgba(${parseInt(e.slice(1, 3), 16)}, ${parseInt(e.slice(3, 5), 16)}, ${parseInt(e.slice(5, 7), 16)}, ${t / 100})`;
|
|
1225
1294
|
}
|
|
1226
|
-
function
|
|
1295
|
+
function Mt(e) {
|
|
1227
1296
|
let t = parseInt(e.slice(1, 3), 16) / 255, n = parseInt(e.slice(3, 5), 16) / 255, r = parseInt(e.slice(5, 7), 16) / 255, i = Math.max(t, n, r), a = i - Math.min(t, n, r), o = 0;
|
|
1228
1297
|
a !== 0 && (o = i === t ? (n - r) / a % 6 : i === n ? (r - t) / a + 2 : (t - n) / a + 4, o = Math.round(o * 60), o < 0 && (o += 360));
|
|
1229
1298
|
let s = i === 0 ? 0 : Math.round(a / i * 100), c = Math.round(i * 100);
|
|
@@ -1233,13 +1302,13 @@ function kt(e) {
|
|
|
1233
1302
|
v: c
|
|
1234
1303
|
};
|
|
1235
1304
|
}
|
|
1236
|
-
function
|
|
1305
|
+
function Nt(e, t, n) {
|
|
1237
1306
|
let r = t / 100, i = n / 100, a = i * r, o = a * (1 - Math.abs(e / 60 % 2 - 1)), s = i - a, c = 0, l = 0, u = 0;
|
|
1238
1307
|
e < 60 ? (c = a, l = o, u = 0) : e < 120 ? (c = o, l = a, u = 0) : e < 180 ? (c = 0, l = a, u = o) : e < 240 ? (c = 0, l = o, u = a) : e < 300 ? (c = o, l = 0, u = a) : (c = a, l = 0, u = o);
|
|
1239
1308
|
let d = (e) => Math.round((e + s) * 255).toString(16).padStart(2, "0");
|
|
1240
1309
|
return `#${d(c)}${d(l)}${d(u)}`;
|
|
1241
1310
|
}
|
|
1242
|
-
function
|
|
1311
|
+
function Pt({ hex: e, onChange: t, useInputComponent: n = !1 }) {
|
|
1243
1312
|
let [r, i] = p(e);
|
|
1244
1313
|
o(() => {
|
|
1245
1314
|
i(e);
|
|
@@ -1247,12 +1316,12 @@ function jt({ hex: e, onChange: t, useInputComponent: n = !1 }) {
|
|
|
1247
1316
|
function a(e) {
|
|
1248
1317
|
i(e);
|
|
1249
1318
|
let n = e.startsWith("#") ? e : `#${e}`;
|
|
1250
|
-
|
|
1319
|
+
Ot(n) && t(n);
|
|
1251
1320
|
}
|
|
1252
1321
|
function s() {
|
|
1253
|
-
|
|
1322
|
+
Ot(r.startsWith("#") ? r : `#${r}`) || i(e);
|
|
1254
1323
|
}
|
|
1255
|
-
return n ? /* @__PURE__ */ W(
|
|
1324
|
+
return n ? /* @__PURE__ */ W(Et, {
|
|
1256
1325
|
value: r,
|
|
1257
1326
|
onChange: (e) => a(e),
|
|
1258
1327
|
onBlur: s
|
|
@@ -1261,11 +1330,11 @@ function jt({ hex: e, onChange: t, useInputComponent: n = !1 }) {
|
|
|
1261
1330
|
value: r,
|
|
1262
1331
|
onChange: (e) => a(e.target.value),
|
|
1263
1332
|
onBlur: s,
|
|
1264
|
-
className:
|
|
1333
|
+
className: Dt.hexInput,
|
|
1265
1334
|
spellCheck: !1
|
|
1266
1335
|
});
|
|
1267
1336
|
}
|
|
1268
|
-
function
|
|
1337
|
+
function Ft({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, onAlphaChange: o, showInput: s = !0, showAlpha: c = !1 }) {
|
|
1269
1338
|
let l = f(null);
|
|
1270
1339
|
function u(e) {
|
|
1271
1340
|
let t = l.current.getBoundingClientRect(), n = Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)), r = Math.max(0, Math.min(1, (e.clientY - t.top) / t.height));
|
|
@@ -1286,20 +1355,20 @@ function Mt({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, o
|
|
|
1286
1355
|
window.addEventListener("mousemove", r), window.addEventListener("mouseup", i);
|
|
1287
1356
|
}
|
|
1288
1357
|
function p(e) {
|
|
1289
|
-
let { hex6: t, alpha: n } =
|
|
1358
|
+
let { hex6: t, alpha: n } = kt(e), { h: r, s, v: l } = Mt(t);
|
|
1290
1359
|
i(r), a(s, l), c && o(n);
|
|
1291
1360
|
}
|
|
1292
|
-
let m =
|
|
1361
|
+
let m = Nt(e, t, n), h = c ? At(m, r, !0) : m;
|
|
1293
1362
|
return /* @__PURE__ */ G("div", {
|
|
1294
|
-
className:
|
|
1363
|
+
className: Dt.panel,
|
|
1295
1364
|
children: [
|
|
1296
1365
|
/* @__PURE__ */ G("div", {
|
|
1297
1366
|
ref: l,
|
|
1298
|
-
className:
|
|
1367
|
+
className: Dt.gradientArea,
|
|
1299
1368
|
style: { "--hue": e },
|
|
1300
1369
|
onMouseDown: d,
|
|
1301
|
-
children: [/* @__PURE__ */ W("div", { className:
|
|
1302
|
-
className:
|
|
1370
|
+
children: [/* @__PURE__ */ W("div", { className: Dt.gradientOverlay }), /* @__PURE__ */ W("div", {
|
|
1371
|
+
className: Dt.cursor,
|
|
1303
1372
|
style: {
|
|
1304
1373
|
left: `${t}%`,
|
|
1305
1374
|
top: `${100 - n}%`
|
|
@@ -1312,7 +1381,7 @@ function Mt({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, o
|
|
|
1312
1381
|
max: 359,
|
|
1313
1382
|
value: e,
|
|
1314
1383
|
onChange: (e) => i(Number(e.target.value)),
|
|
1315
|
-
className:
|
|
1384
|
+
className: Dt.hueSlider
|
|
1316
1385
|
}),
|
|
1317
1386
|
c && /* @__PURE__ */ W("input", {
|
|
1318
1387
|
type: "range",
|
|
@@ -1320,19 +1389,19 @@ function Mt({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, o
|
|
|
1320
1389
|
max: 100,
|
|
1321
1390
|
value: r,
|
|
1322
1391
|
onChange: (e) => o(Number(e.target.value)),
|
|
1323
|
-
className:
|
|
1392
|
+
className: Dt.alphaSlider,
|
|
1324
1393
|
style: { "--alpha-color": m }
|
|
1325
1394
|
}),
|
|
1326
|
-
s && /* @__PURE__ */ W(
|
|
1395
|
+
s && /* @__PURE__ */ W(Pt, {
|
|
1327
1396
|
hex: h,
|
|
1328
1397
|
onChange: p
|
|
1329
1398
|
})
|
|
1330
1399
|
]
|
|
1331
1400
|
});
|
|
1332
1401
|
}
|
|
1333
|
-
var
|
|
1334
|
-
function
|
|
1335
|
-
let [s, c] = p(!1), { hex6: l, alpha: u } =
|
|
1402
|
+
var It = "#3b82f6";
|
|
1403
|
+
function Lt({ className: e, value: t = It, onChange: n, showInput: r = !1, showAlpha: i = !1, inline: a = !1, ...o }) {
|
|
1404
|
+
let [s, c] = p(!1), { hex6: l, alpha: u } = kt(Ot(t) ? t : It), d = Mt(l), [h, g] = p({
|
|
1336
1405
|
h: d.h,
|
|
1337
1406
|
s: d.s,
|
|
1338
1407
|
v: d.v,
|
|
@@ -1340,9 +1409,9 @@ function Pt({ className: e, value: t = Nt, onChange: n, showInput: r = !1, showA
|
|
|
1340
1409
|
}), _ = f(h), [v, y] = p(t);
|
|
1341
1410
|
if (t !== v) {
|
|
1342
1411
|
y(t);
|
|
1343
|
-
let { hex6: e, alpha: n } =
|
|
1344
|
-
if (e !==
|
|
1345
|
-
let t =
|
|
1412
|
+
let { hex6: e, alpha: n } = kt(Ot(t) ? t : It);
|
|
1413
|
+
if (e !== Nt(h.h, h.s, h.v) || n !== h.a) {
|
|
1414
|
+
let t = Mt(e);
|
|
1346
1415
|
g({
|
|
1347
1416
|
h: t.h,
|
|
1348
1417
|
s: t.s,
|
|
@@ -1353,7 +1422,7 @@ function Pt({ className: e, value: t = Nt, onChange: n, showInput: r = !1, showA
|
|
|
1353
1422
|
}
|
|
1354
1423
|
let { h: b, s: x, v: S, a: C } = h;
|
|
1355
1424
|
function w(e, t, r, a) {
|
|
1356
|
-
n?.(
|
|
1425
|
+
n?.(At(Nt(e, t, r), a, i));
|
|
1357
1426
|
}
|
|
1358
1427
|
function T(e) {
|
|
1359
1428
|
_.current.h = e, g((t) => ({
|
|
@@ -1374,7 +1443,7 @@ function Pt({ className: e, value: t = Nt, onChange: n, showInput: r = !1, showA
|
|
|
1374
1443
|
a: e
|
|
1375
1444
|
})), w(_.current.h, _.current.s, _.current.v, e);
|
|
1376
1445
|
}
|
|
1377
|
-
let O =
|
|
1446
|
+
let O = Nt(b, x, S), k = i ? jt(O, C) : O, A = At(O, C, i), j = {
|
|
1378
1447
|
hue: b,
|
|
1379
1448
|
sat: x,
|
|
1380
1449
|
val: S,
|
|
@@ -1386,38 +1455,38 @@ function Pt({ className: e, value: t = Nt, onChange: n, showInput: r = !1, showA
|
|
|
1386
1455
|
};
|
|
1387
1456
|
return a ? /* @__PURE__ */ W("div", {
|
|
1388
1457
|
...o,
|
|
1389
|
-
className: m(
|
|
1390
|
-
children: /* @__PURE__ */ W(
|
|
1458
|
+
className: m(Dt.colorPicker, e),
|
|
1459
|
+
children: /* @__PURE__ */ W(Ft, {
|
|
1391
1460
|
...j,
|
|
1392
1461
|
showInput: r
|
|
1393
1462
|
})
|
|
1394
1463
|
}) : /* @__PURE__ */ G("div", {
|
|
1395
1464
|
...o,
|
|
1396
|
-
className: m(
|
|
1397
|
-
children: [/* @__PURE__ */ W(
|
|
1465
|
+
className: m(Dt.colorPicker, e),
|
|
1466
|
+
children: [/* @__PURE__ */ W(St, {
|
|
1398
1467
|
isOpen: s,
|
|
1399
1468
|
onOpenChange: c,
|
|
1400
1469
|
dontCloseOnChildClick: !0,
|
|
1401
|
-
align:
|
|
1402
|
-
content: /* @__PURE__ */ W(
|
|
1470
|
+
align: bt.Left,
|
|
1471
|
+
content: /* @__PURE__ */ W(Ft, { ...j }),
|
|
1403
1472
|
children: /* @__PURE__ */ G(Be, {
|
|
1404
|
-
className:
|
|
1473
|
+
className: Dt.swatch,
|
|
1405
1474
|
children: [/* @__PURE__ */ W("div", {
|
|
1406
|
-
className:
|
|
1475
|
+
className: Dt.swatchFill,
|
|
1407
1476
|
style: { background: k }
|
|
1408
1477
|
}), /* @__PURE__ */ W("span", {
|
|
1409
|
-
className:
|
|
1478
|
+
className: Dt.swatchHex,
|
|
1410
1479
|
children: A
|
|
1411
1480
|
})]
|
|
1412
1481
|
})
|
|
1413
|
-
}), r && /* @__PURE__ */ W(
|
|
1482
|
+
}), r && /* @__PURE__ */ W(Pt, {
|
|
1414
1483
|
hex: A,
|
|
1415
1484
|
onChange: (e) => n?.(e),
|
|
1416
1485
|
useInputComponent: !0
|
|
1417
1486
|
})]
|
|
1418
1487
|
});
|
|
1419
1488
|
}
|
|
1420
|
-
var
|
|
1489
|
+
var Rt = {
|
|
1421
1490
|
modal: "modal_L-Fkd",
|
|
1422
1491
|
slideIn: "slideIn_RVIHR",
|
|
1423
1492
|
fadeIn: "fadeIn_XSuIE",
|
|
@@ -1432,26 +1501,26 @@ var Ft = {
|
|
|
1432
1501
|
};
|
|
1433
1502
|
//#endregion
|
|
1434
1503
|
//#region package/common/modal/modal.tsx
|
|
1435
|
-
function
|
|
1504
|
+
function zt({ children: e = null, title: t = "", isOpen: n = !1, onClose: r = () => null, className: i = "", style: a, hideHeader: s = !1, classNames: c, styles: l }) {
|
|
1436
1505
|
let [u, d] = p(n), [f, g] = p(n);
|
|
1437
1506
|
return o(() => {
|
|
1438
1507
|
n ? (d(n), setTimeout(() => g(!0), 1)) : (g(!1), setTimeout(() => d(n), 300));
|
|
1439
1508
|
}, [n]), u ? /* @__PURE__ */ W(et, { children: /* @__PURE__ */ G("div", {
|
|
1440
|
-
className: m(
|
|
1509
|
+
className: m(Rt.modalContainer, c?.container),
|
|
1441
1510
|
style: l?.container,
|
|
1442
1511
|
children: [/* @__PURE__ */ W("div", {
|
|
1443
|
-
className: m(
|
|
1512
|
+
className: m(Rt.modalWrapper, f && Rt.modalWrapperShown, c?.backdrop),
|
|
1444
1513
|
style: l?.backdrop,
|
|
1445
1514
|
onClick: r
|
|
1446
1515
|
}), f && /* @__PURE__ */ G("div", {
|
|
1447
|
-
className: m(
|
|
1516
|
+
className: m(Rt.modal, f && Rt.modalShown, i, c?.modal),
|
|
1448
1517
|
style: {
|
|
1449
1518
|
...a,
|
|
1450
1519
|
...l?.modal
|
|
1451
1520
|
},
|
|
1452
1521
|
onClick: (e) => e.stopPropagation(),
|
|
1453
1522
|
children: [!s && /* @__PURE__ */ G("div", {
|
|
1454
|
-
className: m(
|
|
1523
|
+
className: m(Rt.modalHeader, c?.header),
|
|
1455
1524
|
style: l?.header,
|
|
1456
1525
|
children: [/* @__PURE__ */ W("div", {
|
|
1457
1526
|
className: c?.title,
|
|
@@ -1469,7 +1538,7 @@ function It({ children: e = null, title: t = "", isOpen: n = !1, onClose: r = ()
|
|
|
1469
1538
|
}
|
|
1470
1539
|
//#endregion
|
|
1471
1540
|
//#region package/common/confirmModal/confirmModal.tsx
|
|
1472
|
-
function
|
|
1541
|
+
function Bt({ children: e = null, className: t = "", onClose: n = () => {}, onConfirm: r = () => {}, title: i = "", content: a = null, isOpen: o = void 0, actionButtonsProps: s = {} }) {
|
|
1473
1542
|
let [c, l] = p(!1), [u, d] = p(!1);
|
|
1474
1543
|
function f(e = !1) {
|
|
1475
1544
|
l(!1), n(e);
|
|
@@ -1482,7 +1551,7 @@ function Lt({ children: e = null, className: t = "", onClose: n = () => {}, onCo
|
|
|
1482
1551
|
d(!1);
|
|
1483
1552
|
}
|
|
1484
1553
|
}
|
|
1485
|
-
let h = /* @__PURE__ */ G(
|
|
1554
|
+
let h = /* @__PURE__ */ G(zt, {
|
|
1486
1555
|
title: i,
|
|
1487
1556
|
isOpen: o === void 0 ? c : o,
|
|
1488
1557
|
onClose: () => f(),
|
|
@@ -1503,7 +1572,7 @@ function Lt({ children: e = null, className: t = "", onClose: n = () => {}, onCo
|
|
|
1503
1572
|
}), h]
|
|
1504
1573
|
}) : h;
|
|
1505
1574
|
}
|
|
1506
|
-
var
|
|
1575
|
+
var Vt = {
|
|
1507
1576
|
"datePickerMonth-item": "datePickerMonth-item_30WWy",
|
|
1508
1577
|
datePickerMonthItem: "datePickerMonth-item_30WWy",
|
|
1509
1578
|
"datePickerMonth-content": "datePickerMonth-content_9bbSs",
|
|
@@ -1522,7 +1591,7 @@ var Rt = {
|
|
|
1522
1591
|
datePickerMonthDayDisabled: "datePickerMonth-day-disabled_4t0Ci",
|
|
1523
1592
|
"datePickerMonth-placeholder": "datePickerMonth-placeholder_gy1Yx",
|
|
1524
1593
|
datePickerMonthPlaceholder: "datePickerMonth-placeholder_gy1Yx"
|
|
1525
|
-
},
|
|
1594
|
+
}, Ht = [
|
|
1526
1595
|
"de_AT",
|
|
1527
1596
|
"de_CH",
|
|
1528
1597
|
"de_DE",
|
|
@@ -1530,10 +1599,10 @@ var Rt = {
|
|
|
1530
1599
|
"en_GB",
|
|
1531
1600
|
"de",
|
|
1532
1601
|
"en"
|
|
1533
|
-
],
|
|
1534
|
-
let e = navigator.languages[0]?.replace("-", "_") ||
|
|
1535
|
-
return
|
|
1536
|
-
},
|
|
1602
|
+
], Ut = "en_US", Wt = () => {
|
|
1603
|
+
let e = navigator.languages[0]?.replace("-", "_") || Ut;
|
|
1604
|
+
return Ht.includes(e) ? e === "en_GB" || e === "en" ? "en_US" : e === "de" ? "de_DE" : e : Ut;
|
|
1605
|
+
}, Gt = (e) => {
|
|
1537
1606
|
switch (e) {
|
|
1538
1607
|
case "en_US":
|
|
1539
1608
|
case "en_GB": return "en";
|
|
@@ -1542,47 +1611,47 @@ var Rt = {
|
|
|
1542
1611
|
case "de_AT": return "de";
|
|
1543
1612
|
default: return "de";
|
|
1544
1613
|
}
|
|
1545
|
-
},
|
|
1546
|
-
async function
|
|
1547
|
-
|
|
1614
|
+
}, Kt = Wt();
|
|
1615
|
+
async function qt(e) {
|
|
1616
|
+
Kt = e;
|
|
1548
1617
|
}
|
|
1549
|
-
function
|
|
1550
|
-
return
|
|
1618
|
+
function Jt(e = "_") {
|
|
1619
|
+
return Kt.replace("_", e);
|
|
1551
1620
|
}
|
|
1552
1621
|
//#endregion
|
|
1553
1622
|
//#region package/common/datePicker/dateFunctions.ts
|
|
1554
|
-
function
|
|
1623
|
+
function Yt(e, t) {
|
|
1555
1624
|
return new Date(t, e, 0).getDate();
|
|
1556
1625
|
}
|
|
1557
|
-
function
|
|
1626
|
+
function Xt(e, t, n) {
|
|
1558
1627
|
return new Date(Date.UTC(n, t - 1, e));
|
|
1559
1628
|
}
|
|
1560
|
-
function
|
|
1629
|
+
function Zt(e, t, n, r, i = !1) {
|
|
1561
1630
|
return new Date(Date.UTC(t, n - 1, r)).toLocaleDateString(e, { month: i ? "short" : "long" });
|
|
1562
1631
|
}
|
|
1563
|
-
function
|
|
1564
|
-
return Array.from(Array(12).keys()).map((t) =>
|
|
1632
|
+
function Qt(e = Jt("-")) {
|
|
1633
|
+
return Array.from(Array(12).keys()).map((t) => Zt(e, 2023, t + 1, 1));
|
|
1565
1634
|
}
|
|
1566
|
-
function
|
|
1635
|
+
function $t(e, t = !0) {
|
|
1567
1636
|
let n = new Date(Date.UTC(2023, 3, 10)), r = [];
|
|
1568
1637
|
for (let i = 0; i < 7; i++) r.push(n.toLocaleDateString(e, { weekday: t ? "short" : "long" })), n.setDate(n.getDate() + 1);
|
|
1569
1638
|
return r;
|
|
1570
1639
|
}
|
|
1571
|
-
function
|
|
1640
|
+
function en(e, t) {
|
|
1572
1641
|
return new Date(Date.UTC(t, e - 1, 1)).getDay() || 7;
|
|
1573
1642
|
}
|
|
1574
|
-
function
|
|
1643
|
+
function tn(e) {
|
|
1575
1644
|
return {
|
|
1576
1645
|
day: e.getDate(),
|
|
1577
1646
|
month: e.getMonth() + 1,
|
|
1578
1647
|
year: e.getFullYear()
|
|
1579
1648
|
};
|
|
1580
1649
|
}
|
|
1581
|
-
function
|
|
1650
|
+
function nn(e) {
|
|
1582
1651
|
let t = e.getDate(), n = e.getMonth() + 1, r = e.getFullYear();
|
|
1583
1652
|
return `${t < 10 ? `0${t}` : t}.${n < 10 ? `0${n}` : n}.${r}`;
|
|
1584
1653
|
}
|
|
1585
|
-
function
|
|
1654
|
+
function rn(e, t, n) {
|
|
1586
1655
|
let r = e, i = n;
|
|
1587
1656
|
return r[0] !== "_" && (r[0] > "3" ? (r = `0${r[0]}${t.substring(2)}`, i = {
|
|
1588
1657
|
start: 3,
|
|
@@ -1600,18 +1669,18 @@ function en(e, t, n) {
|
|
|
1600
1669
|
}
|
|
1601
1670
|
//#endregion
|
|
1602
1671
|
//#region package/common/datePicker/components/datePickerMonth/datePickerMonth.tsx
|
|
1603
|
-
function
|
|
1604
|
-
let { day: a, month: o, year: s } = r ?
|
|
1672
|
+
function an(e, t, n, r, i) {
|
|
1673
|
+
let { day: a, month: o, year: s } = r ? tn(r) : {
|
|
1605
1674
|
day: void 0,
|
|
1606
1675
|
month: void 0,
|
|
1607
1676
|
year: void 0
|
|
1608
|
-
}, { day: c, month: l, year: u } = i ?
|
|
1677
|
+
}, { day: c, month: l, year: u } = i ? tn(i) : {
|
|
1609
1678
|
day: void 0,
|
|
1610
1679
|
month: void 0,
|
|
1611
1680
|
year: void 0
|
|
1612
|
-
}, d =
|
|
1681
|
+
}, d = Xt(e, t, n), f = e === a && t === o && n === s, p = e === c && t === l && n === u, m = !1;
|
|
1613
1682
|
if (a !== void 0 && o !== void 0 && s !== void 0 && c !== void 0 && l !== void 0 && u !== void 0) {
|
|
1614
|
-
let e =
|
|
1683
|
+
let e = Xt(a, o, s), t = Xt(c, l, u);
|
|
1615
1684
|
m = d.getTime() >= e.getTime() && d.getTime() <= t.getTime();
|
|
1616
1685
|
}
|
|
1617
1686
|
return {
|
|
@@ -1620,54 +1689,54 @@ function tn(e, t, n, r, i) {
|
|
|
1620
1689
|
isEndDate: p
|
|
1621
1690
|
};
|
|
1622
1691
|
}
|
|
1623
|
-
function
|
|
1624
|
-
let a =
|
|
1692
|
+
function on(e, t, n, r, i) {
|
|
1693
|
+
let a = Xt(e, t, n);
|
|
1625
1694
|
if (r) {
|
|
1626
|
-
let { day: e, month: t, year: n } =
|
|
1627
|
-
if (a <
|
|
1695
|
+
let { day: e, month: t, year: n } = tn(r);
|
|
1696
|
+
if (a < Xt(e, t, n)) return !0;
|
|
1628
1697
|
}
|
|
1629
1698
|
if (i) {
|
|
1630
|
-
let { day: e, month: t, year: n } =
|
|
1631
|
-
if (a >
|
|
1699
|
+
let { day: e, month: t, year: n } = tn(i);
|
|
1700
|
+
if (a > Xt(e, t, n)) return !0;
|
|
1632
1701
|
}
|
|
1633
1702
|
return !1;
|
|
1634
1703
|
}
|
|
1635
|
-
function
|
|
1636
|
-
let { day: r, month: i, year: a } =
|
|
1704
|
+
function sn(e, t, n) {
|
|
1705
|
+
let { day: r, month: i, year: a } = tn(/* @__PURE__ */ new Date());
|
|
1637
1706
|
return e === r && t === i && n === a;
|
|
1638
1707
|
}
|
|
1639
|
-
function
|
|
1640
|
-
let c =
|
|
1708
|
+
function cn({ className: e = "", month: t = (/* @__PURE__ */ new Date()).getMonth() + 1, year: n = (/* @__PURE__ */ new Date()).getFullYear(), onSelect: r = () => null, selectionStart: i, selectionEnd: a, minDate: o = null, maxDate: s = null }) {
|
|
1709
|
+
let c = Jt("-"), l = Yt(t, n), u = en(t, n);
|
|
1641
1710
|
return /* @__PURE__ */ W("div", {
|
|
1642
|
-
className: m(
|
|
1711
|
+
className: m(Vt.datePickerMonth, e),
|
|
1643
1712
|
children: /* @__PURE__ */ G("div", {
|
|
1644
|
-
className: m(
|
|
1713
|
+
className: m(Vt.datePickerMonthContent),
|
|
1645
1714
|
children: [
|
|
1646
|
-
|
|
1647
|
-
Array.from(Array(u - 1).keys()).map((e) => /* @__PURE__ */ W("div", { className: m(
|
|
1715
|
+
$t(c).map((e, t) => /* @__PURE__ */ W("div", { children: e }, t)),
|
|
1716
|
+
Array.from(Array(u - 1).keys()).map((e) => /* @__PURE__ */ W("div", { className: m(Vt.datePickerMonthItem, Vt.datePickerMonthPlaceholder) }, e)),
|
|
1648
1717
|
Array.from(Array(l).keys()).map((e) => {
|
|
1649
|
-
let c = e + 1, l =
|
|
1718
|
+
let c = e + 1, l = an(c, t, n, i, a), u = on(c, t, n, o, s), d = sn(c, t, n);
|
|
1650
1719
|
return /* @__PURE__ */ W(Be, {
|
|
1651
|
-
onClick: () => u ? null : r(
|
|
1652
|
-
className: m(
|
|
1653
|
-
[
|
|
1654
|
-
[
|
|
1655
|
-
[
|
|
1656
|
-
[
|
|
1657
|
-
[
|
|
1720
|
+
onClick: () => u ? null : r(Xt(c, t, n)),
|
|
1721
|
+
className: m(Vt.datePickerMonthDay, Vt.datePickerMonthItem, {
|
|
1722
|
+
[Vt.datePickerMonthDaySelected]: l.isInRange,
|
|
1723
|
+
[Vt.datePickerMonthDaySelectedStart]: l.isStartDate,
|
|
1724
|
+
[Vt.datePickerMonthDaySelectedEnd]: l.isEndDate,
|
|
1725
|
+
[Vt.datePickerMonthDayDisabled]: u,
|
|
1726
|
+
[Vt.datePickerMonthDayToday]: d
|
|
1658
1727
|
}),
|
|
1659
1728
|
children: c
|
|
1660
1729
|
}, c);
|
|
1661
1730
|
}),
|
|
1662
1731
|
Array.from(Array(42 - (u + l - 1)).keys()).map((e) => /* @__PURE__ */ W("div", {
|
|
1663
|
-
className: m(
|
|
1732
|
+
className: m(Vt.datePickerMonthItem, Vt.datePickerMonthPlaceholder),
|
|
1664
1733
|
children: "\xA0"
|
|
1665
1734
|
}, e))
|
|
1666
1735
|
]
|
|
1667
1736
|
})
|
|
1668
1737
|
});
|
|
1669
1738
|
}
|
|
1670
|
-
var
|
|
1739
|
+
var ln = {
|
|
1671
1740
|
infiniteBlock: "infiniteBlock_dFv-h",
|
|
1672
1741
|
"spinner-wrapper": "spinner-wrapper_hsgWz",
|
|
1673
1742
|
spinnerWrapper: "spinner-wrapper_hsgWz",
|
|
@@ -1675,7 +1744,7 @@ var on = {
|
|
|
1675
1744
|
};
|
|
1676
1745
|
//#endregion
|
|
1677
1746
|
//#region package/common/infiniteBlock/infiniteBlock.tsx
|
|
1678
|
-
function
|
|
1747
|
+
function un(e, t) {
|
|
1679
1748
|
let n = e;
|
|
1680
1749
|
for (; n.props.children !== null && typeof n.props.children == "object" && !Array.isArray(n.props.children);) n = n.props.children;
|
|
1681
1750
|
let r = n.props.children;
|
|
@@ -1688,11 +1757,11 @@ function sn(e, t) {
|
|
|
1688
1757
|
}
|
|
1689
1758
|
return String(r).toLowerCase().startsWith(t);
|
|
1690
1759
|
}
|
|
1691
|
-
function
|
|
1760
|
+
function dn(e, t, n) {
|
|
1692
1761
|
let r = e + t;
|
|
1693
1762
|
return r === n ? 0 : r < -1 ? n - 1 : r;
|
|
1694
1763
|
}
|
|
1695
|
-
function
|
|
1764
|
+
function fn({ children: t, onScroll: n, className: r = "", isDataLoading: i = !1, setHighlightedIndex: o = () => null }) {
|
|
1696
1765
|
let s = f(null), c = f(!1), [l, u] = p(!1), d = f(-1), h = f(null), g = a(() => {
|
|
1697
1766
|
let e = s.current;
|
|
1698
1767
|
if (!e) return;
|
|
@@ -1706,12 +1775,12 @@ function ln({ children: t, onScroll: n, className: r = "", isDataLoading: i = !1
|
|
|
1706
1775
|
let i = e.Children.toArray(t), a = d.current;
|
|
1707
1776
|
switch (n.key) {
|
|
1708
1777
|
case "ArrowDown":
|
|
1709
|
-
a =
|
|
1778
|
+
a = dn(a, 1, i.length);
|
|
1710
1779
|
break;
|
|
1711
1780
|
case "ArrowUp":
|
|
1712
|
-
a =
|
|
1781
|
+
a = dn(a, -1, i.length);
|
|
1713
1782
|
break;
|
|
1714
|
-
default: for (let e = 0; e < i.length; e++) if (
|
|
1783
|
+
default: for (let e = 0; e < i.length; e++) if (un(i[e], n.key)) {
|
|
1715
1784
|
if (a >= e && h.current === n.key) continue;
|
|
1716
1785
|
a = e;
|
|
1717
1786
|
break;
|
|
@@ -1727,17 +1796,17 @@ function ln({ children: t, onScroll: n, className: r = "", isDataLoading: i = !1
|
|
|
1727
1796
|
}
|
|
1728
1797
|
}, [t, o]);
|
|
1729
1798
|
return /* @__PURE__ */ G("div", {
|
|
1730
|
-
className: m(
|
|
1799
|
+
className: m(ln.infiniteBlock, r),
|
|
1731
1800
|
onScroll: g,
|
|
1732
1801
|
onKeyDown: _,
|
|
1733
1802
|
tabIndex: 0,
|
|
1734
1803
|
ref: s,
|
|
1735
1804
|
children: [i ? /* @__PURE__ */ W("div", {
|
|
1736
|
-
className:
|
|
1737
|
-
children: /* @__PURE__ */ W(Oe, { className:
|
|
1805
|
+
className: ln.spinnerWrapper,
|
|
1806
|
+
children: /* @__PURE__ */ W(Oe, { className: ln.spinner })
|
|
1738
1807
|
}) : t, l && /* @__PURE__ */ W("div", {
|
|
1739
|
-
className:
|
|
1740
|
-
children: /* @__PURE__ */ W(Oe, { className:
|
|
1808
|
+
className: ln.spinnerWrapper,
|
|
1809
|
+
children: /* @__PURE__ */ W(Oe, { className: ln.spinner })
|
|
1741
1810
|
})]
|
|
1742
1811
|
});
|
|
1743
1812
|
}
|
|
@@ -1765,12 +1834,14 @@ var X = {
|
|
|
1765
1834
|
dropdownInputButtonIconArrow: "dropdown-input-button-icon-arrow_SFJbx",
|
|
1766
1835
|
"dropdown-input-button-icon-arrow-open": "dropdown-input-button-icon-arrow-open_8yQbZ",
|
|
1767
1836
|
dropdownInputButtonIconArrowOpen: "dropdown-input-button-icon-arrow-open_8yQbZ",
|
|
1837
|
+
"dropdown-input-list-anim": "dropdown-input-list-anim_knSMT",
|
|
1838
|
+
dropdownInputListAnim: "dropdown-input-list-anim_knSMT",
|
|
1839
|
+
"dropdown-input-list-anim-flip": "dropdown-input-list-anim-flip_O6wWY",
|
|
1840
|
+
dropdownInputListAnimFlip: "dropdown-input-list-anim-flip_O6wWY",
|
|
1841
|
+
"dropdown-input-list-anim-wider": "dropdown-input-list-anim-wider_-YyLJ",
|
|
1842
|
+
dropdownInputListAnimWider: "dropdown-input-list-anim-wider_-YyLJ",
|
|
1768
1843
|
"dropdown-input-list": "dropdown-input-list_JnMbA",
|
|
1769
1844
|
dropdownInputList: "dropdown-input-list_JnMbA",
|
|
1770
|
-
"dropdown-input-list-on-top": "dropdown-input-list-on-top_RpQ9v",
|
|
1771
|
-
dropdownInputListOnTop: "dropdown-input-list-on-top_RpQ9v",
|
|
1772
|
-
"dropdown-input-list-wider": "dropdown-input-list-wider_0rbTN",
|
|
1773
|
-
dropdownInputListWider: "dropdown-input-list-wider_0rbTN",
|
|
1774
1845
|
"dropdown-input-list-item": "dropdown-input-list-item_EAy5L",
|
|
1775
1846
|
dropdownInputListItem: "dropdown-input-list-item_EAy5L",
|
|
1776
1847
|
"dropdown-input-list-item-active": "dropdown-input-list-item-active_0dhia",
|
|
@@ -1811,138 +1882,155 @@ var X = {
|
|
|
1811
1882
|
};
|
|
1812
1883
|
//#endregion
|
|
1813
1884
|
//#region package/common/dropdown/dropdown.tsx
|
|
1814
|
-
function
|
|
1815
|
-
let [
|
|
1885
|
+
function pn({ errorMessage: e = "", className: t = "", label: n = "", value: r = "", isValid: i = !0, tabIndex: a = 0, isRequired: s = !1, customProps: c = {}, isRow: l = !1, disabled: u = !1, onScroll: d = () => Promise.resolve(), onClick: g, onChange: _, onFocus: y = null, onBlur: b = null, onMouseEnter: x = null, onMouseLeave: S = null, dropdownLabel: C, isDropdownListWider: w = !1, inputClassName: T = "", dropDownIconClassName: E = "", dropDownClassName: D = "", formValidator: O = null, labelClassName: k = "", dropDownInputClassName: A = "", items: j = [], useMatLabelStyle: M = !0, placeholder: N = "", plainStyle: P = !1, scrollToSelected: F = !1, reactRef: I, ...L }) {
|
|
1886
|
+
let [R, z] = p(!1), [B, V] = p(!1), [, ee] = p(0), H = f(O), te = f(null), U = f(null), [ne, re] = p(!1), [ie, K] = p(10);
|
|
1816
1887
|
o(() => {
|
|
1817
|
-
if (
|
|
1888
|
+
if (ne) {
|
|
1889
|
+
let e = te.current?.getBoundingClientRect();
|
|
1890
|
+
K(e?.width ?? 10);
|
|
1891
|
+
}
|
|
1892
|
+
}, [ne]), yt({
|
|
1893
|
+
isOpen: ne,
|
|
1894
|
+
triggerRef: te,
|
|
1895
|
+
anchorRef: U,
|
|
1896
|
+
panelRef: U,
|
|
1897
|
+
flipClassName: X.dropdownInputListAnimFlip
|
|
1898
|
+
}), o(() => {
|
|
1899
|
+
if (H.current = O, !H.current) return;
|
|
1818
1900
|
H.current.label = n ?? "", H.current.validate();
|
|
1819
|
-
let e = () =>
|
|
1901
|
+
let e = () => ee((e) => e + 1);
|
|
1820
1902
|
return H.current.registerOnUpdateListener(e), () => H.current?.removeOnUpdateListener(e);
|
|
1821
|
-
}, [
|
|
1822
|
-
let
|
|
1823
|
-
|
|
1824
|
-
},
|
|
1825
|
-
|
|
1826
|
-
},
|
|
1827
|
-
|
|
1828
|
-
},
|
|
1829
|
-
H.current && (H.current.touched = !0),
|
|
1830
|
-
},
|
|
1831
|
-
|
|
1832
|
-
},
|
|
1833
|
-
|
|
1834
|
-
e.key ===
|
|
1903
|
+
}, [O, n]);
|
|
1904
|
+
let oe = (e) => {
|
|
1905
|
+
V(!0), x?.(e);
|
|
1906
|
+
}, q = (e) => {
|
|
1907
|
+
V(!1), S?.(e);
|
|
1908
|
+
}, se = (e) => {
|
|
1909
|
+
z(!0), y?.(e);
|
|
1910
|
+
}, ce = (e) => {
|
|
1911
|
+
H.current && (H.current.touched = !0), z(!1), b?.(e);
|
|
1912
|
+
}, J = () => O ? O.touched && O.hasError() : !i || !!e, le = () => !!(s || O?.validators.find((e) => e.validatorId === "required")), ue = (e) => {
|
|
1913
|
+
O ? (O.set(e), _?.(O.value, c)) : _?.(e, c);
|
|
1914
|
+
}, de = C, fe = O ? O.value : r, pe = J();
|
|
1915
|
+
j.forEach((e) => {
|
|
1916
|
+
e.key === fe && (de = e.label);
|
|
1835
1917
|
});
|
|
1836
|
-
let
|
|
1918
|
+
let me = de || fe, he = me == null || typeof me == "string" && me.trim() === "";
|
|
1837
1919
|
return /* @__PURE__ */ G("div", {
|
|
1838
|
-
...
|
|
1920
|
+
...L,
|
|
1839
1921
|
className: m(t, X.dropdownLabel, X.dropdown, { [X.dropdownLabelColumn]: !l }),
|
|
1840
|
-
onMouseEnter:
|
|
1841
|
-
onMouseLeave:
|
|
1922
|
+
onMouseEnter: oe,
|
|
1923
|
+
onMouseLeave: q,
|
|
1842
1924
|
children: [
|
|
1843
1925
|
/* @__PURE__ */ W(ae, {
|
|
1844
|
-
onChange: (e) =>
|
|
1926
|
+
onChange: (e) => ue((e || { key: "" }).key),
|
|
1845
1927
|
itemToString: (e) => e ? String(e.key) : "",
|
|
1846
|
-
selectedItem:
|
|
1847
|
-
|
|
1928
|
+
selectedItem: j.find((e) => e.key === fe) ?? null,
|
|
1929
|
+
onStateChange: (e) => {
|
|
1930
|
+
typeof e.isOpen == "boolean" && re(e.isOpen);
|
|
1931
|
+
},
|
|
1932
|
+
stateReducer: (e, t) => F && Object.prototype.hasOwnProperty.call(t, "isOpen") ? {
|
|
1848
1933
|
...t,
|
|
1849
|
-
highlightedIndex: t.isOpen ?
|
|
1934
|
+
highlightedIndex: t.isOpen ? j.indexOf(e.selectedItem) : null
|
|
1850
1935
|
} : t,
|
|
1851
1936
|
children: ({ getItemProps: e, getToggleButtonProps: t, isOpen: r, selectedItem: i, highlightedIndex: o, setHighlightedIndex: s }) => /* @__PURE__ */ W("div", { children: /* @__PURE__ */ G("div", {
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1937
|
+
ref: te,
|
|
1938
|
+
onFocus: se,
|
|
1939
|
+
onBlur: ce,
|
|
1940
|
+
className: m(X.dropdownInput, { [X.dropdownInputPlain]: P }, A),
|
|
1855
1941
|
children: [
|
|
1856
1942
|
/* @__PURE__ */ W("button", {
|
|
1857
1943
|
tabIndex: a,
|
|
1858
1944
|
type: "button",
|
|
1859
1945
|
disabled: u,
|
|
1860
|
-
style:
|
|
1946
|
+
style: w ? {
|
|
1861
1947
|
padding: "6px",
|
|
1862
1948
|
border: "none"
|
|
1863
1949
|
} : {},
|
|
1864
|
-
className: m(X.dropdownInputButton, { [X.dropdownInputButtonDisabled]: u },
|
|
1950
|
+
className: m(X.dropdownInputButton, { [X.dropdownInputButtonDisabled]: u }, T),
|
|
1865
1951
|
...t(),
|
|
1866
1952
|
onClick: (e) => {
|
|
1867
|
-
t().onClick?.(e),
|
|
1953
|
+
t().onClick?.(e), g?.(e);
|
|
1868
1954
|
},
|
|
1869
|
-
ref:
|
|
1870
|
-
children:
|
|
1955
|
+
ref: I,
|
|
1956
|
+
children: he ? "\xA0" : me
|
|
1871
1957
|
}),
|
|
1872
1958
|
/* @__PURE__ */ W("button", {
|
|
1873
1959
|
type: "button",
|
|
1874
1960
|
tabIndex: -1,
|
|
1875
1961
|
disabled: u,
|
|
1876
|
-
className: m(X.dropdownInputButtonIcon,
|
|
1962
|
+
className: m(X.dropdownInputButtonIcon, E),
|
|
1877
1963
|
...t(),
|
|
1878
1964
|
onClick: (e) => {
|
|
1879
|
-
t().onClick?.(e),
|
|
1965
|
+
t().onClick?.(e), g?.(e);
|
|
1880
1966
|
},
|
|
1881
1967
|
children: !u && /* @__PURE__ */ W(h, {
|
|
1882
1968
|
icon: v,
|
|
1883
1969
|
className: m(X.dropdownInputButtonIconArrow, { [X.dropdownInputButtonIconArrowOpen]: r })
|
|
1884
1970
|
})
|
|
1885
1971
|
}),
|
|
1886
|
-
!u && r ? /* @__PURE__ */ W(
|
|
1887
|
-
|
|
1888
|
-
className: m(X.
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1972
|
+
!u && r ? /* @__PURE__ */ W(et, { children: /* @__PURE__ */ W("div", {
|
|
1973
|
+
ref: U,
|
|
1974
|
+
className: m(X.dropdownInputListAnim, { [X.dropdownInputListAnimWider]: w }),
|
|
1975
|
+
style: { width: `${ie}px` },
|
|
1976
|
+
children: /* @__PURE__ */ W(fn, {
|
|
1977
|
+
onScroll: d,
|
|
1978
|
+
className: X.dropdownInputList,
|
|
1979
|
+
setHighlightedIndex: s,
|
|
1980
|
+
children: j.map((t, n) => /* @__PURE__ */ W("div", {
|
|
1981
|
+
...e({
|
|
1982
|
+
index: n,
|
|
1983
|
+
item: t,
|
|
1984
|
+
disabled: !!t.disabled
|
|
1985
|
+
}),
|
|
1986
|
+
className: m(X.dropdownInputListItem, D, {
|
|
1987
|
+
[X.dropdownInputListItemActive]: o === n,
|
|
1988
|
+
[X.dropdownInputListItemSelected]: i === t,
|
|
1989
|
+
[X.dropdownInputListItemDisabled]: !!t.disabled
|
|
1990
|
+
}),
|
|
1991
|
+
children: t.label
|
|
1992
|
+
}, t.key))
|
|
1993
|
+
})
|
|
1994
|
+
}) }) : null,
|
|
1907
1995
|
/* @__PURE__ */ W("fieldset", {
|
|
1908
1996
|
className: m(X.dropdownFieldset, {
|
|
1909
|
-
[X.dropdownBorderPlain]:
|
|
1910
|
-
[X.dropdownBorderFocused]:
|
|
1911
|
-
[X.dropdownBorderInvalid]:
|
|
1912
|
-
[X.dropdownBorderError]:
|
|
1997
|
+
[X.dropdownBorderPlain]: P,
|
|
1998
|
+
[X.dropdownBorderFocused]: R,
|
|
1999
|
+
[X.dropdownBorderInvalid]: pe,
|
|
2000
|
+
[X.dropdownBorderError]: pe
|
|
1913
2001
|
}),
|
|
1914
2002
|
children: /* @__PURE__ */ W("legend", {
|
|
1915
|
-
className: m(X.dropdownFieldsetLegend, { [X.dropdownFieldsetLegendActive]:
|
|
2003
|
+
className: m(X.dropdownFieldsetLegend, { [X.dropdownFieldsetLegendActive]: M && (R || !he) }),
|
|
1916
2004
|
children: /* @__PURE__ */ W("span", { children: n })
|
|
1917
2005
|
})
|
|
1918
2006
|
}),
|
|
1919
|
-
|
|
1920
|
-
className: m(X.dropdownMatLabel, { [X.dropdownMatLabelFloating]:
|
|
2007
|
+
M && n && /* @__PURE__ */ W("div", {
|
|
2008
|
+
className: m(X.dropdownMatLabel, { [X.dropdownMatLabelFloating]: R || !he }),
|
|
1921
2009
|
children: n
|
|
1922
2010
|
}),
|
|
1923
|
-
|
|
1924
|
-
className: m(X.dropdownPlaceholder,
|
|
1925
|
-
children:
|
|
2011
|
+
M && N && /* @__PURE__ */ W("div", {
|
|
2012
|
+
className: m(X.dropdownPlaceholder, R && !de && X.dropdownPlaceholderShown),
|
|
2013
|
+
children: N
|
|
1926
2014
|
})
|
|
1927
2015
|
]
|
|
1928
2016
|
}) })
|
|
1929
2017
|
}),
|
|
1930
|
-
n && !
|
|
1931
|
-
className: m(X.dropdownLabelText,
|
|
1932
|
-
children: [n,
|
|
2018
|
+
n && !M && /* @__PURE__ */ G("div", {
|
|
2019
|
+
className: m(X.dropdownLabelText, k),
|
|
2020
|
+
children: [n, le() ? /* @__PURE__ */ W("div", {
|
|
1933
2021
|
className: X.requiredMark,
|
|
1934
2022
|
children: "*"
|
|
1935
2023
|
}) : null]
|
|
1936
2024
|
}),
|
|
1937
|
-
/* @__PURE__ */ W(
|
|
2025
|
+
/* @__PURE__ */ W(wt, {
|
|
1938
2026
|
variant: "error",
|
|
1939
|
-
message:
|
|
1940
|
-
isVisible:
|
|
2027
|
+
message: O ? O.getCurrentErrorMessage() : e || "",
|
|
2028
|
+
isVisible: pe && (R || B)
|
|
1941
2029
|
})
|
|
1942
2030
|
]
|
|
1943
2031
|
});
|
|
1944
2032
|
}
|
|
1945
|
-
var
|
|
2033
|
+
var mn = {
|
|
1946
2034
|
datePicker: "datePicker_ZohTp",
|
|
1947
2035
|
"datePicker-header": "datePicker-header_YmSWE",
|
|
1948
2036
|
datePickerHeader: "datePicker-header_YmSWE",
|
|
@@ -1959,23 +2047,23 @@ var dn = {
|
|
|
1959
2047
|
};
|
|
1960
2048
|
//#endregion
|
|
1961
2049
|
//#region package/common/datePicker/datePicker.tsx
|
|
1962
|
-
function
|
|
1963
|
-
let T = () => r ? r.value : t, E = T() ?? /* @__PURE__ */ new Date(), [D, O] = p(E.getMonth() + 1), [k, A] = p(E.getFullYear()), [j, M] = p(!1), [N, P] = p(() => T() ?
|
|
2050
|
+
function hn({ className: e = "", selected: t, onSelect: n = () => null, formValidator: r = null, noInput: i = !1, noHeader: a = !1, isModal: s = !1, isInline: c = !1, onChange: l = () => null, minDate: u = null, maxDate: d = null, children: h = null, showClearButton: g = !1, label: _ = "", isValid: v = !0, errorMessage: x = "", isRequired: S = !1, startDate: C, endDate: w }) {
|
|
2051
|
+
let T = () => r ? r.value : t, E = T() ?? /* @__PURE__ */ new Date(), [D, O] = p(E.getMonth() + 1), [k, A] = p(E.getFullYear()), [j, M] = p(!1), [N, P] = p(() => T() ? nn(E) : ""), [F, I] = p(!1), [L, R] = p(!1), [, z] = p(0), [B, V] = p(t), ee = f(r);
|
|
1964
2052
|
if (B !== t) {
|
|
1965
2053
|
V(t);
|
|
1966
2054
|
let e = t ?? /* @__PURE__ */ new Date();
|
|
1967
|
-
O(e.getMonth() + 1), A(e.getFullYear()), P(t ?
|
|
2055
|
+
O(e.getMonth() + 1), A(e.getFullYear()), P(t ? nn(t) : "");
|
|
1968
2056
|
}
|
|
1969
2057
|
o(() => {
|
|
1970
2058
|
if (ee.current = r, !r) return;
|
|
1971
2059
|
let e = () => {
|
|
1972
2060
|
let e = r.value;
|
|
1973
|
-
e ? (O(e.getMonth() + 1), A(e.getFullYear()), P(
|
|
2061
|
+
e ? (O(e.getMonth() + 1), A(e.getFullYear()), P(nn(e))) : P(""), z((e) => e + 1);
|
|
1974
2062
|
};
|
|
1975
2063
|
return r.registerOnUpdateListener(e), () => r.removeOnUpdateListener(e);
|
|
1976
2064
|
}, [r]);
|
|
1977
|
-
let
|
|
1978
|
-
P(e ?
|
|
2065
|
+
let H = () => r ? r.touched && r.hasError() : !v || !!x, te = () => !!(S || r?.validators.find((e) => e.validatorId === "required")), U = (e) => {
|
|
2066
|
+
P(e ? nn(e) : ""), r && r.set(e), l(e);
|
|
1979
2067
|
}, ne = (e) => {
|
|
1980
2068
|
U(e), n(e), M(!1);
|
|
1981
2069
|
}, re = (e) => {
|
|
@@ -1985,13 +2073,13 @@ function fn({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1985
2073
|
});
|
|
1986
2074
|
}, K = (e) => {
|
|
1987
2075
|
if (e.match(/\d{2}\.\d{2}\.\d{4}/gi)) {
|
|
1988
|
-
let [t, n, r] = e.split("."), i =
|
|
2076
|
+
let [t, n, r] = e.split("."), i = Xt(Number(t), Number(n), Number(r));
|
|
1989
2077
|
if (i && i.toString() !== "Invalid Date" && (!d || i <= d) && (!u || i >= u)) return i;
|
|
1990
2078
|
}
|
|
1991
2079
|
return null;
|
|
1992
2080
|
}, ae = ({ previousState: e, nextState: t }) => {
|
|
1993
2081
|
if (!e || t.value === e.value) return t;
|
|
1994
|
-
let n =
|
|
2082
|
+
let n = rn(t.value, e.value, t.selection ?? null), r = K(n.value);
|
|
1995
2083
|
return r && U(r), n;
|
|
1996
2084
|
}, q = () => {
|
|
1997
2085
|
let e = 400, t = (/* @__PURE__ */ new Date()).getFullYear() - 200;
|
|
@@ -1999,33 +2087,33 @@ function fn({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1999
2087
|
key: e + t,
|
|
2000
2088
|
label: e + t
|
|
2001
2089
|
}));
|
|
2002
|
-
}, se = T(), ce =
|
|
2090
|
+
}, se = T(), ce = H(), J = /* @__PURE__ */ G(ie, { children: [
|
|
2003
2091
|
a ? null : /* @__PURE__ */ G("div", {
|
|
2004
|
-
className:
|
|
2092
|
+
className: mn.datePickerHeader,
|
|
2005
2093
|
children: [
|
|
2006
2094
|
/* @__PURE__ */ W(He, {
|
|
2007
2095
|
icon: y,
|
|
2008
2096
|
onClick: () => re(-1)
|
|
2009
2097
|
}),
|
|
2010
2098
|
/* @__PURE__ */ W("div", {
|
|
2011
|
-
className:
|
|
2099
|
+
className: mn.datePickerHeaderMonthAndYearContainer,
|
|
2012
2100
|
children: /* @__PURE__ */ G("div", {
|
|
2013
|
-
className:
|
|
2014
|
-
children: [/* @__PURE__ */ W(
|
|
2101
|
+
className: mn.datePickerHeaderMonthAndYear,
|
|
2102
|
+
children: [/* @__PURE__ */ W(pn, {
|
|
2015
2103
|
plainStyle: !0,
|
|
2016
2104
|
scrollToSelected: !0,
|
|
2017
2105
|
onChange: (e) => O(e),
|
|
2018
|
-
className:
|
|
2019
|
-
value: Jt(
|
|
2020
|
-
items:
|
|
2106
|
+
className: mn.datePickerHeaderMonth,
|
|
2107
|
+
value: Zt(Jt("-"), k, D, 1),
|
|
2108
|
+
items: Qt().map((e, t) => ({
|
|
2021
2109
|
key: t + 1,
|
|
2022
2110
|
label: e
|
|
2023
2111
|
}))
|
|
2024
|
-
}), /* @__PURE__ */ W(
|
|
2112
|
+
}), /* @__PURE__ */ W(pn, {
|
|
2025
2113
|
plainStyle: !0,
|
|
2026
2114
|
scrollToSelected: !0,
|
|
2027
2115
|
useMatLabelStyle: !1,
|
|
2028
|
-
className:
|
|
2116
|
+
className: mn.datePickerHeaderYear,
|
|
2029
2117
|
onChange: (e) => A(e),
|
|
2030
2118
|
value: k,
|
|
2031
2119
|
items: q()
|
|
@@ -2038,8 +2126,8 @@ function fn({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
2038
2126
|
})
|
|
2039
2127
|
]
|
|
2040
2128
|
}),
|
|
2041
|
-
/* @__PURE__ */ W(
|
|
2042
|
-
className:
|
|
2129
|
+
/* @__PURE__ */ W(cn, {
|
|
2130
|
+
className: mn.datePickerMonth,
|
|
2043
2131
|
month: D,
|
|
2044
2132
|
year: k,
|
|
2045
2133
|
onSelect: ne,
|
|
@@ -2053,9 +2141,9 @@ function fn({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
2053
2141
|
children: "Clear"
|
|
2054
2142
|
}),
|
|
2055
2143
|
h
|
|
2056
|
-
] }), le = i ? null : /* @__PURE__ */ W(
|
|
2144
|
+
] }), le = i ? null : /* @__PURE__ */ W(Et, {
|
|
2057
2145
|
readOnly: s,
|
|
2058
|
-
label: `${_}${
|
|
2146
|
+
label: `${_}${te() ? " *" : ""}`,
|
|
2059
2147
|
value: N,
|
|
2060
2148
|
onChange: (e) => P(e),
|
|
2061
2149
|
onClick: () => M(!0),
|
|
@@ -2071,25 +2159,25 @@ function fn({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
2071
2159
|
onMouseEnter: () => R(!0),
|
|
2072
2160
|
onMouseLeave: () => R(!1),
|
|
2073
2161
|
isValid: !ce
|
|
2074
|
-
}), ue = c ? J : s ? /* @__PURE__ */ W(
|
|
2162
|
+
}), ue = c ? J : s ? /* @__PURE__ */ W(zt, {
|
|
2075
2163
|
hideHeader: !0,
|
|
2076
2164
|
isOpen: j,
|
|
2077
2165
|
onClose: () => M(!1),
|
|
2078
2166
|
children: J
|
|
2079
|
-
}) : /* @__PURE__ */ W(
|
|
2167
|
+
}) : /* @__PURE__ */ W(St, {
|
|
2080
2168
|
isOpen: j,
|
|
2081
2169
|
onOpenChange: (e) => M(e),
|
|
2082
2170
|
content: J,
|
|
2083
|
-
align:
|
|
2171
|
+
align: bt.Left,
|
|
2084
2172
|
dontCloseOnChildClick: !0,
|
|
2085
2173
|
children: le
|
|
2086
2174
|
});
|
|
2087
2175
|
return /* @__PURE__ */ G("div", {
|
|
2088
|
-
className: m(
|
|
2176
|
+
className: m(mn.datePicker, e),
|
|
2089
2177
|
children: [
|
|
2090
2178
|
(s || c) && le,
|
|
2091
2179
|
ue,
|
|
2092
|
-
/* @__PURE__ */ W(
|
|
2180
|
+
/* @__PURE__ */ W(wt, {
|
|
2093
2181
|
variant: "error",
|
|
2094
2182
|
message: r ? r.getCurrentErrorMessage() : x || "",
|
|
2095
2183
|
isVisible: ce && (F || L)
|
|
@@ -2097,7 +2185,7 @@ function fn({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
2097
2185
|
]
|
|
2098
2186
|
});
|
|
2099
2187
|
}
|
|
2100
|
-
var
|
|
2188
|
+
var gn = {
|
|
2101
2189
|
drawer: "drawer_5SRoc",
|
|
2102
2190
|
"drawer-open": "drawer-open_-YQ8n",
|
|
2103
2191
|
drawerOpen: "drawer-open_-YQ8n",
|
|
@@ -2108,7 +2196,7 @@ var pn = {
|
|
|
2108
2196
|
};
|
|
2109
2197
|
//#endregion
|
|
2110
2198
|
//#region package/common/drawer/drawer.tsx
|
|
2111
|
-
function
|
|
2199
|
+
function _n({ className: e, isOpen: t = !1, closedWidth: n, openedWidth: r, children: i }) {
|
|
2112
2200
|
let a = f(null), s = f(null);
|
|
2113
2201
|
return o(() => {
|
|
2114
2202
|
let e = new ResizeObserver(() => {
|
|
@@ -2117,16 +2205,16 @@ function mn({ className: e, isOpen: t = !1, closedWidth: n, openedWidth: r, chil
|
|
|
2117
2205
|
return s.current && e.observe(s.current), () => e.disconnect();
|
|
2118
2206
|
}, []), /* @__PURE__ */ W("div", {
|
|
2119
2207
|
ref: a,
|
|
2120
|
-
className: m(
|
|
2208
|
+
className: m(gn.drawer, t && gn.drawerOpen, e),
|
|
2121
2209
|
style: {
|
|
2122
2210
|
...n !== void 0 && { "--drawer-closed-width": n },
|
|
2123
2211
|
...r !== void 0 && { "--drawer-opened-width": r }
|
|
2124
2212
|
},
|
|
2125
2213
|
children: /* @__PURE__ */ W("div", {
|
|
2126
2214
|
ref: s,
|
|
2127
|
-
className:
|
|
2215
|
+
className: gn.drawerContent,
|
|
2128
2216
|
children: /* @__PURE__ */ W("div", {
|
|
2129
|
-
className:
|
|
2217
|
+
className: gn.drawerContentInner,
|
|
2130
2218
|
children: i
|
|
2131
2219
|
})
|
|
2132
2220
|
})
|
|
@@ -2136,9 +2224,9 @@ function mn({ className: e, isOpen: t = !1, closedWidth: n, openedWidth: r, chil
|
|
|
2136
2224
|
//#region package/common/dropZone/dropZone.types.ts
|
|
2137
2225
|
var Z = /* @__PURE__ */ function(e) {
|
|
2138
2226
|
return e.Idle = "idle", e.Dragging = "dragging", e.Active = "active", e.Error = "error", e;
|
|
2139
|
-
}({}),
|
|
2227
|
+
}({}), vn = /* @__PURE__ */ function(e) {
|
|
2140
2228
|
return e.File = "file", e.Base64 = "base64", e.Text = "text", e;
|
|
2141
|
-
}({}),
|
|
2229
|
+
}({}), yn = {
|
|
2142
2230
|
dropZone: "dropZone_9iJZy",
|
|
2143
2231
|
"dropZone-clickable": "dropZone-clickable_pcRhf",
|
|
2144
2232
|
dropZoneClickable: "dropZone-clickable_pcRhf",
|
|
@@ -2165,7 +2253,7 @@ var Z = /* @__PURE__ */ function(e) {
|
|
|
2165
2253
|
};
|
|
2166
2254
|
//#endregion
|
|
2167
2255
|
//#region package/common/dropZone/dropZone.tsx
|
|
2168
|
-
function
|
|
2256
|
+
function bn(e, t) {
|
|
2169
2257
|
if (!t.length) return !0;
|
|
2170
2258
|
let n = e.name.toLowerCase(), r = e.type.toLowerCase();
|
|
2171
2259
|
return t.some((e) => {
|
|
@@ -2173,8 +2261,8 @@ function _n(e, t) {
|
|
|
2173
2261
|
return t ? t.startsWith(".") ? n.endsWith(t) : t.endsWith("/*") ? r.startsWith(t.slice(0, -1)) : r === t : !1;
|
|
2174
2262
|
});
|
|
2175
2263
|
}
|
|
2176
|
-
function
|
|
2177
|
-
return t ===
|
|
2264
|
+
function xn(e, t) {
|
|
2265
|
+
return t === vn.File ? Promise.resolve({
|
|
2178
2266
|
ok: !0,
|
|
2179
2267
|
value: e
|
|
2180
2268
|
}) : new Promise((n) => {
|
|
@@ -2195,23 +2283,23 @@ function vn(e, t) {
|
|
|
2195
2283
|
data: r
|
|
2196
2284
|
}
|
|
2197
2285
|
});
|
|
2198
|
-
}, r.onerror = () => n({ ok: !1 }), t ===
|
|
2286
|
+
}, r.onerror = () => n({ ok: !1 }), t === vn.Base64 ? r.readAsDataURL(e) : r.readAsText(e);
|
|
2199
2287
|
});
|
|
2200
2288
|
}
|
|
2201
|
-
function
|
|
2289
|
+
function Sn(e) {
|
|
2202
2290
|
return new Promise((t) => {
|
|
2203
2291
|
if (e.isFile) e.file((e) => t([e]), () => t([]));
|
|
2204
2292
|
else if (e.isDirectory) {
|
|
2205
2293
|
let n = e.createReader(), r = [], i = () => {
|
|
2206
2294
|
n.readEntries((e) => {
|
|
2207
|
-
e.length ? (r.push(...e), i()) : Promise.all(r.map(
|
|
2295
|
+
e.length ? (r.push(...e), i()) : Promise.all(r.map(Sn)).then((e) => t(e.flat()));
|
|
2208
2296
|
}, () => t([]));
|
|
2209
2297
|
};
|
|
2210
2298
|
i();
|
|
2211
2299
|
} else t([]);
|
|
2212
2300
|
});
|
|
2213
2301
|
}
|
|
2214
|
-
function
|
|
2302
|
+
function Cn(e, t) {
|
|
2215
2303
|
let n = e.items;
|
|
2216
2304
|
if (n && n.length) {
|
|
2217
2305
|
if (t && typeof n[0].webkitGetAsEntry == "function") {
|
|
@@ -2220,7 +2308,7 @@ function bn(e, t) {
|
|
|
2220
2308
|
let r = n[t].webkitGetAsEntry();
|
|
2221
2309
|
r && e.push(r);
|
|
2222
2310
|
}
|
|
2223
|
-
if (e.length) return Promise.all(e.map(
|
|
2311
|
+
if (e.length) return Promise.all(e.map(Sn)).then((e) => e.flat());
|
|
2224
2312
|
}
|
|
2225
2313
|
let e = [];
|
|
2226
2314
|
for (let t = 0; t < n.length; t += 1) if (n[t].kind === "file") {
|
|
@@ -2231,7 +2319,7 @@ function bn(e, t) {
|
|
|
2231
2319
|
}
|
|
2232
2320
|
return Promise.resolve(Array.from(e.files || []));
|
|
2233
2321
|
}
|
|
2234
|
-
function
|
|
2322
|
+
function wn({ children: e, acceptedTypes: t = [], returnType: n = vn.File, openPickerOnClick: r = !1, multiple: i = !0, maxFiles: c, maxSize: l, enablePaste: u = !1, allowDirectories: d = !0, capture: h, disabled: g = !1, unstyled: _ = !1, showFileNames: v = !1, files: y, onFilesChanged: b, onReject: x, onStatusChanged: S, className: C, style: w, classNames: T, styles: E, ...D }) {
|
|
2235
2323
|
let [O, k] = p(Z.Idle), A = f(null), j = s(), M = f(O), N = f(0), P = f(0), F = f({
|
|
2236
2324
|
acceptedTypes: t,
|
|
2237
2325
|
returnType: n,
|
|
@@ -2260,7 +2348,7 @@ function xn({ children: e, acceptedTypes: t = [], returnType: n = hn.File, openP
|
|
|
2260
2348
|
M.current !== e && (M.current = e, k(e), F.current.onStatusChanged?.(e));
|
|
2261
2349
|
}, []), L = a(async (e) => {
|
|
2262
2350
|
let t = F.current, n = [], r = [];
|
|
2263
|
-
for (let i of e)
|
|
2351
|
+
for (let i of e) bn(i, t.acceptedTypes) ? t.maxSize != null && i.size > t.maxSize ? n.push({
|
|
2264
2352
|
file: i,
|
|
2265
2353
|
reason: "tooLarge"
|
|
2266
2354
|
}) : r.push(i) : n.push({
|
|
@@ -2271,7 +2359,7 @@ function xn({ children: e, acceptedTypes: t = [], returnType: n = hn.File, openP
|
|
|
2271
2359
|
file: e,
|
|
2272
2360
|
reason: "tooMany"
|
|
2273
2361
|
})), r = r.slice(0, t.maxFiles));
|
|
2274
|
-
let i = await Promise.all(r.map((e) =>
|
|
2362
|
+
let i = await Promise.all(r.map((e) => xn(e, t.returnType))), a = [];
|
|
2275
2363
|
i.forEach((e, t) => {
|
|
2276
2364
|
e.ok ? a.push(e.value) : n.push({
|
|
2277
2365
|
file: r[t],
|
|
@@ -2302,7 +2390,7 @@ function xn({ children: e, acceptedTypes: t = [], returnType: n = hn.File, openP
|
|
|
2302
2390
|
I(Z.Idle);
|
|
2303
2391
|
return;
|
|
2304
2392
|
}
|
|
2305
|
-
I(Z.Idle),
|
|
2393
|
+
I(Z.Idle), Cn(e.dataTransfer, F.current.allowDirectories).then((e) => {
|
|
2306
2394
|
e.length && L(e);
|
|
2307
2395
|
});
|
|
2308
2396
|
}, [
|
|
@@ -2311,10 +2399,10 @@ function xn({ children: e, acceptedTypes: t = [], returnType: n = hn.File, openP
|
|
|
2311
2399
|
L
|
|
2312
2400
|
]), ee = a(() => {
|
|
2313
2401
|
g || !r || A.current?.click();
|
|
2314
|
-
}, [g, r]),
|
|
2402
|
+
}, [g, r]), H = a((e) => {
|
|
2315
2403
|
let t = Array.from(e.target.files || []);
|
|
2316
2404
|
e.target.value = "", t.length && L(t);
|
|
2317
|
-
}, [L]),
|
|
2405
|
+
}, [L]), te = a((e) => {
|
|
2318
2406
|
if (!u || g) return;
|
|
2319
2407
|
let t = Array.from(e.clipboardData?.files || []);
|
|
2320
2408
|
t.length && (e.preventDefault(), L(t));
|
|
@@ -2336,7 +2424,7 @@ function xn({ children: e, acceptedTypes: t = [], returnType: n = hn.File, openP
|
|
|
2336
2424
|
}, ie = t.length ? t.join(",") : void 0;
|
|
2337
2425
|
return /* @__PURE__ */ G("div", {
|
|
2338
2426
|
...D,
|
|
2339
|
-
className: m(
|
|
2427
|
+
className: m(yn.dropZone, r && yn.dropZoneClickable, g && yn.dropZoneDisabled, !_ && yn.dropZoneDefault, !_ && O === Z.Dragging && yn.dropZoneDragging, !_ && O === Z.Active && yn.dropZoneActive, !_ && O === Z.Error && yn.dropZoneError, T?.root, C),
|
|
2340
2428
|
style: {
|
|
2341
2429
|
...E?.root,
|
|
2342
2430
|
...w
|
|
@@ -2347,21 +2435,21 @@ function xn({ children: e, acceptedTypes: t = [], returnType: n = hn.File, openP
|
|
|
2347
2435
|
onDrop: V,
|
|
2348
2436
|
onClick: ee,
|
|
2349
2437
|
onKeyDown: U,
|
|
2350
|
-
onPaste: u ?
|
|
2438
|
+
onPaste: u ? te : void 0,
|
|
2351
2439
|
role: r ? "button" : void 0,
|
|
2352
2440
|
tabIndex: r && !g ? 0 : void 0,
|
|
2353
2441
|
"aria-disabled": g || void 0,
|
|
2354
2442
|
children: [
|
|
2355
2443
|
/* @__PURE__ */ W("div", {
|
|
2356
|
-
className: m(
|
|
2444
|
+
className: m(yn.dropZoneContent, ne && yn.dropZoneContentDragging, T?.content),
|
|
2357
2445
|
style: E?.content,
|
|
2358
2446
|
children: typeof e == "function" ? e(re) : e
|
|
2359
2447
|
}),
|
|
2360
2448
|
v && y && y.length > 0 && /* @__PURE__ */ W("div", {
|
|
2361
|
-
className: m(
|
|
2449
|
+
className: m(yn.dropZoneFileList, T?.fileList),
|
|
2362
2450
|
style: E?.fileList,
|
|
2363
2451
|
children: y.map((e, t) => /* @__PURE__ */ W("div", {
|
|
2364
|
-
className: m(
|
|
2452
|
+
className: m(yn.dropZoneFileItem, T?.fileItem),
|
|
2365
2453
|
style: E?.fileItem,
|
|
2366
2454
|
children: e.name
|
|
2367
2455
|
}, `${e.name}-${t}`))
|
|
@@ -2370,30 +2458,30 @@ function xn({ children: e, acceptedTypes: t = [], returnType: n = hn.File, openP
|
|
|
2370
2458
|
ref: A,
|
|
2371
2459
|
id: j,
|
|
2372
2460
|
type: "file",
|
|
2373
|
-
className: m(
|
|
2461
|
+
className: m(yn.dropZoneInput, T?.input),
|
|
2374
2462
|
style: E?.input,
|
|
2375
2463
|
accept: ie,
|
|
2376
2464
|
multiple: i,
|
|
2377
2465
|
capture: h,
|
|
2378
2466
|
disabled: g,
|
|
2379
|
-
onChange:
|
|
2467
|
+
onChange: H,
|
|
2380
2468
|
tabIndex: -1,
|
|
2381
2469
|
"aria-hidden": "true"
|
|
2382
2470
|
})
|
|
2383
2471
|
]
|
|
2384
2472
|
});
|
|
2385
2473
|
}
|
|
2386
|
-
var
|
|
2474
|
+
var Tn = { emptyState: "emptyState_KXOIx" };
|
|
2387
2475
|
//#endregion
|
|
2388
2476
|
//#region package/common/emptyState/emptyState.tsx
|
|
2389
|
-
function
|
|
2477
|
+
function En({ className: e, icon: t, children: n, ...r }) {
|
|
2390
2478
|
return /* @__PURE__ */ G("div", {
|
|
2391
2479
|
...r,
|
|
2392
|
-
className: m(
|
|
2480
|
+
className: m(Tn.emptyState, e),
|
|
2393
2481
|
children: [t && /* @__PURE__ */ W(h, { icon: t }), /* @__PURE__ */ W("div", { children: n ?? "No entries available" })]
|
|
2394
2482
|
});
|
|
2395
2483
|
}
|
|
2396
|
-
var
|
|
2484
|
+
var Dn = {
|
|
2397
2485
|
fab: "fab_hyAAa",
|
|
2398
2486
|
"fab-content": "fab-content_IBiXm",
|
|
2399
2487
|
fabContent: "fab-content_IBiXm",
|
|
@@ -2401,25 +2489,25 @@ var wn = {
|
|
|
2401
2489
|
fabContentContainer: "fab-content-container_FQD1x",
|
|
2402
2490
|
"fab-size-mini": "fab-size-mini_KP9BD",
|
|
2403
2491
|
fabSizeMini: "fab-size-mini_KP9BD"
|
|
2404
|
-
},
|
|
2492
|
+
}, On = {
|
|
2405
2493
|
default: null,
|
|
2406
|
-
mini:
|
|
2494
|
+
mini: Dn.fabSizeMini
|
|
2407
2495
|
};
|
|
2408
|
-
function
|
|
2496
|
+
function kn({ children: e = null, size: t = "default", className: n = "", styleType: r = ke.Primary, onClick: i = () => {} }) {
|
|
2409
2497
|
return /* @__PURE__ */ W(Ie, {
|
|
2410
2498
|
styleType: r,
|
|
2411
|
-
className: m(
|
|
2499
|
+
className: m(Dn.fab, On[t], n),
|
|
2412
2500
|
onClick: i,
|
|
2413
2501
|
children: /* @__PURE__ */ W("div", {
|
|
2414
|
-
className:
|
|
2502
|
+
className: Dn.fabContentContainer,
|
|
2415
2503
|
children: /* @__PURE__ */ W("div", {
|
|
2416
|
-
className:
|
|
2504
|
+
className: Dn.fabContent,
|
|
2417
2505
|
children: e
|
|
2418
2506
|
})
|
|
2419
2507
|
})
|
|
2420
2508
|
});
|
|
2421
2509
|
}
|
|
2422
|
-
var
|
|
2510
|
+
var An = {
|
|
2423
2511
|
fab: "fab_YI34X",
|
|
2424
2512
|
appear: "appear_DL0wm",
|
|
2425
2513
|
"fab-container": "fab-container_8uoYo",
|
|
@@ -2449,7 +2537,7 @@ var Dn = {
|
|
|
2449
2537
|
};
|
|
2450
2538
|
//#endregion
|
|
2451
2539
|
//#region package/common/fab/fab.tsx
|
|
2452
|
-
function
|
|
2540
|
+
function jn({ children: e = null, size: t = "default", menuEntries: n = [], onMenuEntryClicked: r = () => {}, onClick: i = () => {}, closeMenuOnEntryClicked: a = !0, ...o }) {
|
|
2453
2541
|
let [s, c] = p(!1);
|
|
2454
2542
|
function l() {
|
|
2455
2543
|
n.length > 0 && c((e) => !e), i();
|
|
@@ -2459,44 +2547,44 @@ function On({ children: e = null, size: t = "default", menuEntries: n = [], onMe
|
|
|
2459
2547
|
}
|
|
2460
2548
|
return /* @__PURE__ */ G("div", {
|
|
2461
2549
|
...o,
|
|
2462
|
-
className:
|
|
2550
|
+
className: An.fabContainer,
|
|
2463
2551
|
children: [
|
|
2464
2552
|
/* @__PURE__ */ W("div", {
|
|
2465
|
-
className: m(
|
|
2553
|
+
className: m(An.fabMenuBackdrop, s && An.fabMenuBackdropOpen),
|
|
2466
2554
|
onClick: (e) => {
|
|
2467
2555
|
e.stopPropagation(), c(!1);
|
|
2468
2556
|
}
|
|
2469
2557
|
}),
|
|
2470
2558
|
/* @__PURE__ */ W("div", {
|
|
2471
2559
|
onClick: (e) => e.stopPropagation(),
|
|
2472
|
-
children: /* @__PURE__ */ W(
|
|
2473
|
-
className:
|
|
2560
|
+
children: /* @__PURE__ */ W(kn, {
|
|
2561
|
+
className: An.fab,
|
|
2474
2562
|
size: t,
|
|
2475
2563
|
onClick: l,
|
|
2476
2564
|
children: /* @__PURE__ */ G("div", {
|
|
2477
|
-
className: m(
|
|
2565
|
+
className: m(An.fabIcon, s && An.fabIconMenuOpen),
|
|
2478
2566
|
children: [/* @__PURE__ */ W("div", {
|
|
2479
|
-
className: m(
|
|
2567
|
+
className: m(An.fabIconContent, !s && An.fabIconContentShown),
|
|
2480
2568
|
children: e
|
|
2481
2569
|
}), /* @__PURE__ */ W("div", {
|
|
2482
|
-
className: m(
|
|
2570
|
+
className: m(An.fabIconContent, s && An.fabIconContentShown),
|
|
2483
2571
|
children: /* @__PURE__ */ W(h, { icon: z })
|
|
2484
2572
|
})]
|
|
2485
2573
|
})
|
|
2486
2574
|
})
|
|
2487
2575
|
}),
|
|
2488
2576
|
/* @__PURE__ */ W("div", {
|
|
2489
|
-
className:
|
|
2577
|
+
className: An.fabMenu,
|
|
2490
2578
|
children: n.map(({ id: e, label: t, icon: n }) => /* @__PURE__ */ G("div", {
|
|
2491
|
-
className: m(
|
|
2579
|
+
className: m(An.fabMenuEntry, s && An.fabMenuEntryShown),
|
|
2492
2580
|
onClick: (t) => u(t, e),
|
|
2493
2581
|
children: [t && /* @__PURE__ */ W("div", {
|
|
2494
|
-
className:
|
|
2582
|
+
className: An.fabMenuEntryLabelContainer,
|
|
2495
2583
|
children: /* @__PURE__ */ W("div", {
|
|
2496
|
-
className:
|
|
2584
|
+
className: An.fabMenuEntryLabel,
|
|
2497
2585
|
children: t
|
|
2498
2586
|
})
|
|
2499
|
-
}), /* @__PURE__ */ W(
|
|
2587
|
+
}), /* @__PURE__ */ W(kn, {
|
|
2500
2588
|
size: "mini",
|
|
2501
2589
|
children: /* @__PURE__ */ W(h, { icon: n })
|
|
2502
2590
|
})]
|
|
@@ -2505,7 +2593,7 @@ function On({ children: e = null, size: t = "default", menuEntries: n = [], onMe
|
|
|
2505
2593
|
]
|
|
2506
2594
|
});
|
|
2507
2595
|
}
|
|
2508
|
-
var
|
|
2596
|
+
var Mn = {
|
|
2509
2597
|
iconPicker: "iconPicker_xJJmG",
|
|
2510
2598
|
"iconPicker-label": "iconPicker-label_VEB2X",
|
|
2511
2599
|
iconPickerLabel: "iconPicker-label_VEB2X",
|
|
@@ -2520,19 +2608,19 @@ var kn = {
|
|
|
2520
2608
|
};
|
|
2521
2609
|
//#endregion
|
|
2522
2610
|
//#region package/common/iconPicker/iconPicker.tsx
|
|
2523
|
-
function
|
|
2611
|
+
function Nn(e) {
|
|
2524
2612
|
let { formValidator: t } = e;
|
|
2525
2613
|
return t ? t.touched && t.hasError() : !1;
|
|
2526
2614
|
}
|
|
2527
|
-
function
|
|
2615
|
+
function Pn(e) {
|
|
2528
2616
|
let { isRequired: t, formValidator: n } = e;
|
|
2529
2617
|
return !!(t || n?.validators.find((e) => e.validatorId === "required"));
|
|
2530
2618
|
}
|
|
2531
|
-
function
|
|
2532
|
-
let d = i ? i.value ?? null : t, f =
|
|
2619
|
+
function Fn({ data: e = [], selectedId: t = null, label: n = "", onChange: r, formValidator: i = null, isRequired: a, className: o, style: s, classNames: c, styles: l, ...u }) {
|
|
2620
|
+
let d = i ? i.value ?? null : t, f = Nn({
|
|
2533
2621
|
formValidator: i,
|
|
2534
2622
|
isRequired: a
|
|
2535
|
-
}), p =
|
|
2623
|
+
}), p = Pn({
|
|
2536
2624
|
formValidator: i,
|
|
2537
2625
|
isRequired: a
|
|
2538
2626
|
});
|
|
@@ -2541,20 +2629,20 @@ function Mn({ data: e = [], selectedId: t = null, label: n = "", onChange: r, fo
|
|
|
2541
2629
|
}
|
|
2542
2630
|
return /* @__PURE__ */ G("div", {
|
|
2543
2631
|
...u,
|
|
2544
|
-
className: m(
|
|
2632
|
+
className: m(Mn.iconPicker, { [Mn.iconPickerError]: f }, c?.root, o),
|
|
2545
2633
|
style: {
|
|
2546
2634
|
...l?.root,
|
|
2547
2635
|
...s
|
|
2548
2636
|
},
|
|
2549
2637
|
children: [n && /* @__PURE__ */ G("div", {
|
|
2550
|
-
className: m(
|
|
2638
|
+
className: m(Mn.iconPickerLabel, c?.label),
|
|
2551
2639
|
style: l?.label,
|
|
2552
2640
|
children: [n, p && " *"]
|
|
2553
2641
|
}), /* @__PURE__ */ W("div", {
|
|
2554
|
-
className: m(
|
|
2642
|
+
className: m(Mn.iconPickerItemContainer, c?.itemContainer),
|
|
2555
2643
|
style: l?.itemContainer,
|
|
2556
2644
|
children: e.map(({ id: e, label: t, icon: n, customIcon: r }) => /* @__PURE__ */ G("div", {
|
|
2557
|
-
className: m(
|
|
2645
|
+
className: m(Mn.iconPickerItem, { [Mn.iconPickerItemSelected]: d === e }, c?.item),
|
|
2558
2646
|
style: l?.item,
|
|
2559
2647
|
title: t,
|
|
2560
2648
|
tabIndex: 0,
|
|
@@ -2574,14 +2662,14 @@ function Mn({ data: e = [], selectedId: t = null, label: n = "", onChange: r, fo
|
|
|
2574
2662
|
}
|
|
2575
2663
|
//#endregion
|
|
2576
2664
|
//#region package/common/idleManager/idleManager.tsx
|
|
2577
|
-
var
|
|
2665
|
+
var In = [
|
|
2578
2666
|
"click",
|
|
2579
2667
|
"mousemove",
|
|
2580
2668
|
"keydown",
|
|
2581
2669
|
"scroll",
|
|
2582
2670
|
"touchstart"
|
|
2583
2671
|
];
|
|
2584
|
-
function
|
|
2672
|
+
function Ln({ children: e = null, idleAfterSeconds: t = 600, renderCondition: n = !0 }) {
|
|
2585
2673
|
let [r, i] = p(!1), s = f(null), c = a(() => {
|
|
2586
2674
|
s.current !== null && clearTimeout(s.current), i(!1), s.current = setTimeout(() => {
|
|
2587
2675
|
i(!0);
|
|
@@ -2590,18 +2678,22 @@ function Pn({ children: e = null, idleAfterSeconds: t = 600, renderCondition: n
|
|
|
2590
2678
|
return o(() => {
|
|
2591
2679
|
c();
|
|
2592
2680
|
}, [c]), o(() => {
|
|
2593
|
-
for (let e of
|
|
2681
|
+
for (let e of In) document.addEventListener(e, c);
|
|
2594
2682
|
return () => {
|
|
2595
|
-
for (let e of
|
|
2683
|
+
for (let e of In) document.removeEventListener(e, c);
|
|
2596
2684
|
s.current !== null && clearTimeout(s.current);
|
|
2597
2685
|
};
|
|
2598
2686
|
}, [c]), /* @__PURE__ */ W(ie, { children: n && r && e });
|
|
2599
2687
|
}
|
|
2600
|
-
var
|
|
2688
|
+
var Rn = {
|
|
2601
2689
|
inputDropdown: "inputDropdown_UdYMa",
|
|
2602
2690
|
dropdown: "dropdown_-M5-x",
|
|
2691
|
+
"dropdown-scroll": "dropdown-scroll_XMZs-",
|
|
2692
|
+
dropdownScroll: "dropdown-scroll_XMZs-",
|
|
2603
2693
|
"dropdown-shown": "dropdown-shown_H2rFU",
|
|
2604
2694
|
dropdownShown: "dropdown-shown_H2rFU",
|
|
2695
|
+
"dropdown-flip": "dropdown-flip_djJhT",
|
|
2696
|
+
dropdownFlip: "dropdown-flip_djJhT",
|
|
2605
2697
|
"dropdown-item": "dropdown-item_JRgbt",
|
|
2606
2698
|
dropdownItem: "dropdown-item_JRgbt",
|
|
2607
2699
|
"dropdown-item-highlighted": "dropdown-item-highlighted_1ZENP",
|
|
@@ -2611,51 +2703,58 @@ var Fn = {
|
|
|
2611
2703
|
};
|
|
2612
2704
|
//#endregion
|
|
2613
2705
|
//#region package/common/inputDropdown/inputDropdown.tsx
|
|
2614
|
-
function
|
|
2706
|
+
function zn(e, t) {
|
|
2615
2707
|
return t ? t.value ?? "" : e ?? "";
|
|
2616
2708
|
}
|
|
2617
|
-
function
|
|
2709
|
+
function Bn(e, t) {
|
|
2618
2710
|
let n = t.find((t) => t.value === e);
|
|
2619
2711
|
return n ? n.label ?? n.value : e;
|
|
2620
2712
|
}
|
|
2621
|
-
function
|
|
2622
|
-
let _ =
|
|
2623
|
-
if (
|
|
2713
|
+
function Vn({ label: e = "", value: t = "", formValidator: n = null, items: r = [], allowCustomValue: i = !1, className: o, style: s, classNames: c, styles: l, onSelect: u = () => null, onChange: d, placeholder: h = "", ...g }) {
|
|
2714
|
+
let _ = zn(t, n), [v, y] = p(() => Bn(_, r)), [b, x] = p(_), [S, C] = p(!1), [w, T] = p(null), E = f(null), D = f(null), O = f(null);
|
|
2715
|
+
if (yt({
|
|
2716
|
+
isOpen: S,
|
|
2717
|
+
triggerRef: D,
|
|
2718
|
+
anchorRef: O,
|
|
2719
|
+
panelRef: O,
|
|
2720
|
+
flipClassName: Rn.dropdownFlip
|
|
2721
|
+
}), _ !== b) {
|
|
2624
2722
|
x(_);
|
|
2625
2723
|
let e = r.find((e) => e.value === _);
|
|
2626
2724
|
e ? y(e.label ?? e.value) : i && y(_);
|
|
2627
2725
|
}
|
|
2628
|
-
let
|
|
2726
|
+
let k = r.filter((e) => (e.label ?? e.value).toLowerCase().includes(v.toLowerCase())), A = () => {
|
|
2629
2727
|
E.current &&= (clearTimeout(E.current), null), C(!0);
|
|
2630
|
-
},
|
|
2728
|
+
}, j = () => {
|
|
2631
2729
|
E.current = setTimeout(() => {
|
|
2632
|
-
C(!1), E.current = null, i || y(
|
|
2730
|
+
C(!1), E.current = null, i || y(Bn(_, r));
|
|
2633
2731
|
}, 100);
|
|
2634
|
-
},
|
|
2732
|
+
}, M = a((e) => {
|
|
2635
2733
|
y(e.label ?? e.value), C(!1), T(null), n && n.set(e.value), d && d(e.value), u(e.value);
|
|
2636
2734
|
}, [
|
|
2637
2735
|
n,
|
|
2638
2736
|
d,
|
|
2639
2737
|
u
|
|
2640
|
-
]),
|
|
2641
|
-
e.key === "ArrowUp" ? (e.preventDefault(), T((e) => e ? e - 1 : null)) : e.key === "ArrowDown" ? (e.preventDefault(), T((e) => e === null ? 0 : Math.min(e + 1,
|
|
2738
|
+
]), N = a((e) => {
|
|
2739
|
+
e.key === "ArrowUp" ? (e.preventDefault(), T((e) => e ? e - 1 : null)) : e.key === "ArrowDown" ? (e.preventDefault(), T((e) => e === null ? 0 : Math.min(e + 1, k.length - 1))) : e.key === "Enter" && (w !== null && k[w] ? M(k[w]) : i && (C(!1), T(null)));
|
|
2642
2740
|
}, [
|
|
2643
|
-
|
|
2741
|
+
k,
|
|
2644
2742
|
w,
|
|
2645
|
-
|
|
2743
|
+
M,
|
|
2646
2744
|
i
|
|
2647
2745
|
]);
|
|
2648
2746
|
return /* @__PURE__ */ G("div", {
|
|
2649
2747
|
...g,
|
|
2650
|
-
|
|
2748
|
+
ref: D,
|
|
2749
|
+
className: m(Rn.inputDropdown, c?.root, o),
|
|
2651
2750
|
style: {
|
|
2652
2751
|
...l?.root,
|
|
2653
2752
|
...s
|
|
2654
2753
|
},
|
|
2655
|
-
onFocus:
|
|
2656
|
-
onBlur:
|
|
2657
|
-
onKeyDown:
|
|
2658
|
-
children: [/* @__PURE__ */ W(
|
|
2754
|
+
onFocus: A,
|
|
2755
|
+
onBlur: j,
|
|
2756
|
+
onKeyDown: N,
|
|
2757
|
+
children: [/* @__PURE__ */ W(Et, {
|
|
2659
2758
|
label: e,
|
|
2660
2759
|
value: v,
|
|
2661
2760
|
onChange: (e) => {
|
|
@@ -2667,20 +2766,24 @@ function Rn({ label: e = "", value: t = "", formValidator: n = null, items: r =
|
|
|
2667
2766
|
}
|
|
2668
2767
|
},
|
|
2669
2768
|
placeholder: h
|
|
2670
|
-
}), /* @__PURE__ */ W("div", {
|
|
2671
|
-
|
|
2769
|
+
}), S && /* @__PURE__ */ W(et, { children: /* @__PURE__ */ W("div", {
|
|
2770
|
+
ref: O,
|
|
2771
|
+
className: m(Rn.dropdown, Rn.dropdownShown, c?.dropdown),
|
|
2672
2772
|
style: l?.dropdown,
|
|
2673
|
-
children:
|
|
2674
|
-
className:
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2773
|
+
children: /* @__PURE__ */ W("div", {
|
|
2774
|
+
className: Rn.dropdownScroll,
|
|
2775
|
+
children: k.map((e, t) => /* @__PURE__ */ W("div", {
|
|
2776
|
+
className: m(Rn.dropdownItem, w === t && Rn.dropdownItemHighlighted, c?.item),
|
|
2777
|
+
style: l?.item,
|
|
2778
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
2779
|
+
onClick: () => M(e),
|
|
2780
|
+
children: e.label ?? e.value
|
|
2781
|
+
}, `${t}_${e.label}_${e.value}`))
|
|
2782
|
+
})
|
|
2783
|
+
}) })]
|
|
2681
2784
|
});
|
|
2682
2785
|
}
|
|
2683
|
-
var
|
|
2786
|
+
var Hn = {
|
|
2684
2787
|
board: "board_6KRdw",
|
|
2685
2788
|
column: "column_NrNeF",
|
|
2686
2789
|
"column-empty": "column-empty_5KYsJ",
|
|
@@ -2698,7 +2801,7 @@ var zn = {
|
|
|
2698
2801
|
};
|
|
2699
2802
|
//#endregion
|
|
2700
2803
|
//#region package/common/kanbanBoard/KanbanItem.tsx
|
|
2701
|
-
function
|
|
2804
|
+
function Un({ id: e, children: t }) {
|
|
2702
2805
|
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } = me({ id: e });
|
|
2703
2806
|
return /* @__PURE__ */ W("div", {
|
|
2704
2807
|
ref: i,
|
|
@@ -2706,7 +2809,7 @@ function Bn({ id: e, children: t }) {
|
|
|
2706
2809
|
transform: ge.Transform.toString(a),
|
|
2707
2810
|
transition: o
|
|
2708
2811
|
},
|
|
2709
|
-
className: m(
|
|
2812
|
+
className: m(Hn.item, s && Hn.itemDragging),
|
|
2710
2813
|
...n,
|
|
2711
2814
|
...r,
|
|
2712
2815
|
children: t
|
|
@@ -2714,12 +2817,12 @@ function Bn({ id: e, children: t }) {
|
|
|
2714
2817
|
}
|
|
2715
2818
|
//#endregion
|
|
2716
2819
|
//#region package/common/kanbanBoard/KanbanColumn.tsx
|
|
2717
|
-
function
|
|
2820
|
+
function Wn({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a, classNames: o, styles: s }) {
|
|
2718
2821
|
let { setNodeRef: c, isOver: l } = le({ id: `column-${e}` });
|
|
2719
2822
|
return /* @__PURE__ */ G("div", {
|
|
2720
|
-
className: m(
|
|
2823
|
+
className: m(Hn.column, l && Hn.columnOver, n.length === 0 && Hn.columnEmpty, a),
|
|
2721
2824
|
children: [/* @__PURE__ */ W("div", {
|
|
2722
|
-
className: m(
|
|
2825
|
+
className: m(Hn.columnHeader, o?.header),
|
|
2723
2826
|
style: s?.header,
|
|
2724
2827
|
children: t
|
|
2725
2828
|
}), /* @__PURE__ */ W(fe, {
|
|
@@ -2727,9 +2830,9 @@ function Vn({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a
|
|
|
2727
2830
|
strategy: he,
|
|
2728
2831
|
children: /* @__PURE__ */ W("div", {
|
|
2729
2832
|
ref: c,
|
|
2730
|
-
className: m(
|
|
2833
|
+
className: m(Hn.columnItems, o?.items),
|
|
2731
2834
|
style: s?.items,
|
|
2732
|
-
children: n.map((e) => /* @__PURE__ */ W(
|
|
2835
|
+
children: n.map((e) => /* @__PURE__ */ W(Un, {
|
|
2733
2836
|
id: e,
|
|
2734
2837
|
children: r[e] === void 0 ? null : i(r[e], e)
|
|
2735
2838
|
}, e))
|
|
@@ -2739,7 +2842,7 @@ function Vn({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a
|
|
|
2739
2842
|
}
|
|
2740
2843
|
//#endregion
|
|
2741
2844
|
//#region package/common/kanbanBoard/KanbanBoard.tsx
|
|
2742
|
-
function
|
|
2845
|
+
function Gn({ columns: e, items: t, renderItem: n, onChange: r, className: i, style: a, classNames: o, styles: s }) {
|
|
2743
2846
|
let [c, l] = p(null), [u, d] = p(null), f = de(ue(ce, { activationConstraint: { distance: 8 } })), h = u ?? e;
|
|
2744
2847
|
function g(e, t) {
|
|
2745
2848
|
return e.findIndex((e) => e.itemIds.includes(t));
|
|
@@ -2796,9 +2899,9 @@ function Hn({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2796
2899
|
onDragOver: v,
|
|
2797
2900
|
onDragEnd: y,
|
|
2798
2901
|
children: [/* @__PURE__ */ W("div", {
|
|
2799
|
-
className: m(
|
|
2902
|
+
className: m(Hn.board, i),
|
|
2800
2903
|
style: a,
|
|
2801
|
-
children: h.map((e) => /* @__PURE__ */ W(
|
|
2904
|
+
children: h.map((e) => /* @__PURE__ */ W(Wn, {
|
|
2802
2905
|
id: e.id,
|
|
2803
2906
|
title: e.title,
|
|
2804
2907
|
itemIds: e.itemIds,
|
|
@@ -2806,7 +2909,7 @@ function Hn({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2806
2909
|
renderItem: n
|
|
2807
2910
|
}, e.id))
|
|
2808
2911
|
}), /* @__PURE__ */ W(se, { children: c && t[c] !== void 0 ? /* @__PURE__ */ W("div", {
|
|
2809
|
-
className: m(
|
|
2912
|
+
className: m(Hn.dragOverlay, o?.dragOverlay),
|
|
2810
2913
|
style: s?.dragOverlay,
|
|
2811
2914
|
children: n(t[c], c)
|
|
2812
2915
|
}) : null })]
|
|
@@ -2814,7 +2917,7 @@ function Hn({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2814
2917
|
}
|
|
2815
2918
|
//#endregion
|
|
2816
2919
|
//#region package/services/klipy.ts
|
|
2817
|
-
var
|
|
2920
|
+
var Kn = "https://api.klipy.com/v2", qn = class {
|
|
2818
2921
|
constructor(e) {
|
|
2819
2922
|
this.key = e;
|
|
2820
2923
|
}
|
|
@@ -2823,14 +2926,14 @@ var Un = "https://api.klipy.com/v2", Wn = class {
|
|
|
2823
2926
|
q: e,
|
|
2824
2927
|
key: this.key
|
|
2825
2928
|
});
|
|
2826
|
-
return t.limit != null && n.set("limit", String(t.limit)), t.contentfilter != null && n.set("contentfilter", t.contentfilter), t.pos != null && n.set("pos", t.pos), (await fetch(`${
|
|
2929
|
+
return t.limit != null && n.set("limit", String(t.limit)), t.contentfilter != null && n.set("contentfilter", t.contentfilter), t.pos != null && n.set("pos", t.pos), (await fetch(`${Kn}/search?${n}`)).json();
|
|
2827
2930
|
}
|
|
2828
2931
|
async searchSuggestions(e) {
|
|
2829
2932
|
let t = new URLSearchParams({
|
|
2830
2933
|
q: e,
|
|
2831
2934
|
key: this.key
|
|
2832
2935
|
});
|
|
2833
|
-
return (await fetch(`${
|
|
2936
|
+
return (await fetch(`${Kn}/search_suggestions?${t}`)).json();
|
|
2834
2937
|
}
|
|
2835
2938
|
registerShare(e, t) {
|
|
2836
2939
|
let n = new URLSearchParams({
|
|
@@ -2838,12 +2941,12 @@ var Un = "https://api.klipy.com/v2", Wn = class {
|
|
|
2838
2941
|
q: e,
|
|
2839
2942
|
key: this.key
|
|
2840
2943
|
});
|
|
2841
|
-
fetch(`${
|
|
2944
|
+
fetch(`${Kn}/registershare?${n}`).catch(() => null);
|
|
2842
2945
|
}
|
|
2843
|
-
},
|
|
2946
|
+
}, Jn = { resultCount: "resultCount_Sn48Q" };
|
|
2844
2947
|
//#endregion
|
|
2845
2948
|
//#region package/common/searchInput/searchInput.tsx
|
|
2846
|
-
function
|
|
2949
|
+
function Yn({ value: e, onChange: t, onDebounce: n, placeholder: r, label: i, debounceMs: a = 500, totalAmount: s, showAmount: c = !0, className: l, width: u, ...d }) {
|
|
2847
2950
|
let p = f(null);
|
|
2848
2951
|
o(() => () => {
|
|
2849
2952
|
p.current !== null && clearTimeout(p.current);
|
|
@@ -2859,14 +2962,14 @@ function Kn({ value: e, onChange: t, onDebounce: n, placeholder: r, label: i, de
|
|
|
2859
2962
|
...d,
|
|
2860
2963
|
className: l,
|
|
2861
2964
|
style: u == null ? void 0 : { width: u },
|
|
2862
|
-
children: [/* @__PURE__ */ W(
|
|
2863
|
-
type:
|
|
2965
|
+
children: [/* @__PURE__ */ W(Et, {
|
|
2966
|
+
type: Tt.Search,
|
|
2864
2967
|
label: i,
|
|
2865
2968
|
placeholder: r,
|
|
2866
2969
|
value: e,
|
|
2867
2970
|
onChange: m
|
|
2868
2971
|
}), h && /* @__PURE__ */ G("p", {
|
|
2869
|
-
className:
|
|
2972
|
+
className: Jn.resultCount,
|
|
2870
2973
|
children: [
|
|
2871
2974
|
s,
|
|
2872
2975
|
" ",
|
|
@@ -2875,7 +2978,7 @@ function Kn({ value: e, onChange: t, onDebounce: n, placeholder: r, label: i, de
|
|
|
2875
2978
|
})]
|
|
2876
2979
|
});
|
|
2877
2980
|
}
|
|
2878
|
-
var
|
|
2981
|
+
var Xn = {
|
|
2879
2982
|
gifPreview: "gifPreview_jAXT2",
|
|
2880
2983
|
"gifPreview-image": "gifPreview-image_41bwm",
|
|
2881
2984
|
gifPreviewImage: "gifPreview-image_41bwm",
|
|
@@ -2885,25 +2988,25 @@ var qn = {
|
|
|
2885
2988
|
};
|
|
2886
2989
|
//#endregion
|
|
2887
2990
|
//#region package/common/klipyPicker/components/gifPreview/gifPreview.tsx
|
|
2888
|
-
function
|
|
2991
|
+
function Zn({ className: e, previewItems: t = [], onSelect: n, onLoadAdditional: r }) {
|
|
2889
2992
|
function i(e) {
|
|
2890
2993
|
let t = e.currentTarget, n = t.scrollHeight - t.clientHeight * 1.5;
|
|
2891
2994
|
t.scrollTop >= n && r?.();
|
|
2892
2995
|
}
|
|
2893
2996
|
return /* @__PURE__ */ W(ie, { children: t.length > 0 && /* @__PURE__ */ W("div", {
|
|
2894
|
-
className: m(
|
|
2997
|
+
className: m(Xn.gifPreview, e),
|
|
2895
2998
|
onScroll: i,
|
|
2896
2999
|
children: t.map((e, t) => /* @__PURE__ */ W(Be, {
|
|
2897
|
-
className:
|
|
3000
|
+
className: Xn.gifPreviewImageContainer,
|
|
2898
3001
|
onClick: () => n?.(e),
|
|
2899
3002
|
children: /* @__PURE__ */ W("div", {
|
|
2900
|
-
className:
|
|
3003
|
+
className: Xn.gifPreviewImage,
|
|
2901
3004
|
style: { backgroundImage: `url(${e.media_formats.tinygif.url})` }
|
|
2902
3005
|
})
|
|
2903
3006
|
}, `${e.id}_${t}`))
|
|
2904
3007
|
}) });
|
|
2905
3008
|
}
|
|
2906
|
-
var
|
|
3009
|
+
var Qn = {
|
|
2907
3010
|
gifView: "gifView_YUeLK",
|
|
2908
3011
|
"gifView-loading": "gifView-loading_N1Lzx",
|
|
2909
3012
|
gifViewLoading: "gifView-loading_N1Lzx",
|
|
@@ -2911,20 +3014,20 @@ var Yn = {
|
|
|
2911
3014
|
};
|
|
2912
3015
|
//#endregion
|
|
2913
3016
|
//#region package/common/klipyPicker/components/gifView/gifView.tsx
|
|
2914
|
-
function
|
|
3017
|
+
function $n({ className: e, src: t = "" }) {
|
|
2915
3018
|
let [n, r] = p(!0);
|
|
2916
3019
|
return o(() => {
|
|
2917
3020
|
r(!0);
|
|
2918
3021
|
}, [t]), /* @__PURE__ */ G("div", {
|
|
2919
|
-
className: m(
|
|
3022
|
+
className: m(Qn.gifView, e),
|
|
2920
3023
|
children: [/* @__PURE__ */ W("img", {
|
|
2921
|
-
className:
|
|
3024
|
+
className: Qn.klipyPickerSelected,
|
|
2922
3025
|
src: t,
|
|
2923
3026
|
onLoad: () => r(!1)
|
|
2924
|
-
}), n && /* @__PURE__ */ W("div", { className:
|
|
3027
|
+
}), n && /* @__PURE__ */ W("div", { className: Qn.gifViewLoading })]
|
|
2925
3028
|
});
|
|
2926
3029
|
}
|
|
2927
|
-
var
|
|
3030
|
+
var er = {
|
|
2928
3031
|
"klipyPicker-selected": "klipyPicker-selected_Watxl",
|
|
2929
3032
|
klipyPickerSelected: "klipyPicker-selected_Watxl",
|
|
2930
3033
|
"klipyPicker-modal-content": "klipyPicker-modal-content_3CBV9",
|
|
@@ -2936,8 +3039,8 @@ var Zn = {
|
|
|
2936
3039
|
};
|
|
2937
3040
|
//#endregion
|
|
2938
3041
|
//#region package/common/klipyPicker/klipyPicker.tsx
|
|
2939
|
-
function
|
|
2940
|
-
let a = u(() => new
|
|
3042
|
+
function tr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () => void 0, selected: i = null }) {
|
|
3043
|
+
let a = u(() => new qn(t), [t]), [o, s] = p(""), [c, l] = p([]), [d, f] = p([]), [h, g] = p(null), [_, v] = p(!1);
|
|
2941
3044
|
async function y(e) {
|
|
2942
3045
|
if (s(e), !e.trim()) {
|
|
2943
3046
|
l([]), f([]), g(null);
|
|
@@ -2963,23 +3066,23 @@ function Qn({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
2963
3066
|
function S() {
|
|
2964
3067
|
return /* @__PURE__ */ W(ht, {
|
|
2965
3068
|
inline: !0,
|
|
2966
|
-
className:
|
|
3069
|
+
className: er.klipyPickerSuggestionsContainer,
|
|
2967
3070
|
children: d.map((e) => /* @__PURE__ */ W(mt, {
|
|
2968
|
-
className:
|
|
3071
|
+
className: er.klipyPickerSuggestionsItem,
|
|
2969
3072
|
text: e,
|
|
2970
3073
|
onClick: () => y(e)
|
|
2971
3074
|
}, e))
|
|
2972
3075
|
});
|
|
2973
3076
|
}
|
|
2974
3077
|
function C() {
|
|
2975
|
-
return /* @__PURE__ */ W(
|
|
3078
|
+
return /* @__PURE__ */ W(Zn, {
|
|
2976
3079
|
previewItems: c,
|
|
2977
3080
|
onSelect: x,
|
|
2978
3081
|
onLoadAdditional: b
|
|
2979
3082
|
});
|
|
2980
3083
|
}
|
|
2981
3084
|
function w() {
|
|
2982
|
-
return /* @__PURE__ */ W(
|
|
3085
|
+
return /* @__PURE__ */ W(Yn, {
|
|
2983
3086
|
label: "Pick gif",
|
|
2984
3087
|
value: o,
|
|
2985
3088
|
onDebounce: y,
|
|
@@ -2987,7 +3090,7 @@ function Qn({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
2987
3090
|
});
|
|
2988
3091
|
}
|
|
2989
3092
|
return n ? /* @__PURE__ */ G("div", {
|
|
2990
|
-
className: m(
|
|
3093
|
+
className: m(er.klipyPicker, e),
|
|
2991
3094
|
children: [
|
|
2992
3095
|
/* @__PURE__ */ G("div", {
|
|
2993
3096
|
className: we.actionButtons,
|
|
@@ -3000,15 +3103,15 @@ function Qn({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3000
3103
|
children: "Remove gif"
|
|
3001
3104
|
})]
|
|
3002
3105
|
}),
|
|
3003
|
-
i && /* @__PURE__ */ W(
|
|
3004
|
-
className:
|
|
3106
|
+
i && /* @__PURE__ */ W($n, {
|
|
3107
|
+
className: er.klipyPickerSelected,
|
|
3005
3108
|
src: i
|
|
3006
3109
|
}),
|
|
3007
|
-
/* @__PURE__ */ W(
|
|
3110
|
+
/* @__PURE__ */ W(zt, {
|
|
3008
3111
|
isOpen: _,
|
|
3009
3112
|
onClose: () => v(!1),
|
|
3010
3113
|
children: /* @__PURE__ */ G("div", {
|
|
3011
|
-
className:
|
|
3114
|
+
className: er.klipyPickerModalContent,
|
|
3012
3115
|
children: [
|
|
3013
3116
|
w(),
|
|
3014
3117
|
S(),
|
|
@@ -3018,10 +3121,10 @@ function Qn({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3018
3121
|
})
|
|
3019
3122
|
]
|
|
3020
3123
|
}) : /* @__PURE__ */ G("div", {
|
|
3021
|
-
className: m(
|
|
3124
|
+
className: m(er.klipyPicker, e),
|
|
3022
3125
|
children: [
|
|
3023
|
-
/* @__PURE__ */ W(
|
|
3024
|
-
align:
|
|
3126
|
+
/* @__PURE__ */ W(St, {
|
|
3127
|
+
align: bt.Left,
|
|
3025
3128
|
isOpen: c.length > 0 && _,
|
|
3026
3129
|
onOpenChange: v,
|
|
3027
3130
|
content: /* @__PURE__ */ G(ie, { children: [S(), C()] }),
|
|
@@ -3032,14 +3135,14 @@ function Qn({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3032
3135
|
onClick: () => x(null),
|
|
3033
3136
|
children: "Remove gif"
|
|
3034
3137
|
}),
|
|
3035
|
-
i && /* @__PURE__ */ W(
|
|
3036
|
-
className:
|
|
3138
|
+
i && /* @__PURE__ */ W($n, {
|
|
3139
|
+
className: er.klipyPickerSelected,
|
|
3037
3140
|
src: i
|
|
3038
3141
|
})
|
|
3039
3142
|
]
|
|
3040
3143
|
});
|
|
3041
3144
|
}
|
|
3042
|
-
var
|
|
3145
|
+
var nr = {
|
|
3043
3146
|
iconLoading: "iconLoading_wovj4",
|
|
3044
3147
|
"spin-to-oblivion": "spin-to-oblivion_0tZtm",
|
|
3045
3148
|
spinToOblivion: "spin-to-oblivion_0tZtm",
|
|
@@ -3054,39 +3157,39 @@ var $n = {
|
|
|
3054
3157
|
};
|
|
3055
3158
|
//#endregion
|
|
3056
3159
|
//#region package/common/loading/iconLoading/iconLoading.tsx
|
|
3057
|
-
function
|
|
3160
|
+
function rr({ className: e = "" }) {
|
|
3058
3161
|
return /* @__PURE__ */ W("div", {
|
|
3059
|
-
className: m(
|
|
3162
|
+
className: m(nr.iconLoading, e),
|
|
3060
3163
|
children: /* @__PURE__ */ G("svg", {
|
|
3061
3164
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3062
3165
|
viewBox: "-8 -1 16 14",
|
|
3063
3166
|
children: [
|
|
3064
3167
|
/* @__PURE__ */ W("path", {
|
|
3065
|
-
className:
|
|
3168
|
+
className: nr.iconLoadingFirst,
|
|
3066
3169
|
d: "M 0 0 C 3 5 6 5 6 12",
|
|
3067
3170
|
strokeWidth: "1.7",
|
|
3068
3171
|
fill: "none"
|
|
3069
3172
|
}),
|
|
3070
3173
|
/* @__PURE__ */ W("path", {
|
|
3071
|
-
className:
|
|
3174
|
+
className: nr.iconLoadingFirst,
|
|
3072
3175
|
d: "M 0 0 C -3 5 -6 5 -6 12",
|
|
3073
3176
|
strokeWidth: "1.7",
|
|
3074
3177
|
fill: "none"
|
|
3075
3178
|
}),
|
|
3076
3179
|
/* @__PURE__ */ W("path", {
|
|
3077
|
-
className:
|
|
3180
|
+
className: nr.iconLoadingFirst,
|
|
3078
3181
|
d: "M 0 0 L 0 10",
|
|
3079
3182
|
strokeWidth: "1.7",
|
|
3080
3183
|
fill: "none"
|
|
3081
3184
|
}),
|
|
3082
3185
|
/* @__PURE__ */ W("path", {
|
|
3083
|
-
className:
|
|
3186
|
+
className: nr.iconLoadingSecond,
|
|
3084
3187
|
d: "M 0.1 10 C -3 10 -4 10 -6 12",
|
|
3085
3188
|
strokeWidth: "1.7",
|
|
3086
3189
|
fill: "none"
|
|
3087
3190
|
}),
|
|
3088
3191
|
/* @__PURE__ */ W("path", {
|
|
3089
|
-
className:
|
|
3192
|
+
className: nr.iconLoadingSecond,
|
|
3090
3193
|
d: "M -0.1 10 C 3 10 4 10 6 12",
|
|
3091
3194
|
strokeWidth: "1.7",
|
|
3092
3195
|
fill: "none"
|
|
@@ -3097,14 +3200,14 @@ function er({ className: e = "" }) {
|
|
|
3097
3200
|
}
|
|
3098
3201
|
//#endregion
|
|
3099
3202
|
//#region package/common/loading/iconLoading/index.ts
|
|
3100
|
-
var
|
|
3203
|
+
var ir = rr, ar = {
|
|
3101
3204
|
numberInput: "numberInput_7p2O3",
|
|
3102
3205
|
arrows: "arrows_yjRlc",
|
|
3103
3206
|
arrowBtn: "arrowBtn_DbJoa"
|
|
3104
3207
|
};
|
|
3105
3208
|
//#endregion
|
|
3106
3209
|
//#region package/common/numberInput/numberInput.tsx
|
|
3107
|
-
function
|
|
3210
|
+
function or({ value: e, onChange: t, formValidator: n, label: r, error: i, className: a, allowNegative: o = !1, decimalSeparator: s, thousandSeparator: c, prefix: l, suffix: u, decimalScale: d, placeholder: f, sign: p, showArrows: g = !1, step: _ = 1, onKeyDown: y, ...b }) {
|
|
3108
3211
|
let S = n == null ? e : n.value, C = p != null && S != null ? Math.abs(Number(S)) : S, w = C == null ? "" : String(C);
|
|
3109
3212
|
function T(e) {
|
|
3110
3213
|
let r = e;
|
|
@@ -3126,16 +3229,16 @@ function rr({ value: e, onChange: t, formValidator: n, label: r, error: i, class
|
|
|
3126
3229
|
y?.(e);
|
|
3127
3230
|
}
|
|
3128
3231
|
let O = p === "-" ? "-" : p === "+" ? "+" : l, k = g ? /* @__PURE__ */ G("div", {
|
|
3129
|
-
className:
|
|
3232
|
+
className: ar.arrows,
|
|
3130
3233
|
children: [/* @__PURE__ */ W(Be, {
|
|
3131
|
-
className:
|
|
3234
|
+
className: ar.arrowBtn,
|
|
3132
3235
|
tabIndex: -1,
|
|
3133
3236
|
onMouseDown: (e) => {
|
|
3134
3237
|
e.preventDefault(), E(e.shiftKey ? _ * 10 : _);
|
|
3135
3238
|
},
|
|
3136
3239
|
children: /* @__PURE__ */ W(h, { icon: x })
|
|
3137
3240
|
}), /* @__PURE__ */ W(Be, {
|
|
3138
|
-
className:
|
|
3241
|
+
className: ar.arrowBtn,
|
|
3139
3242
|
tabIndex: -1,
|
|
3140
3243
|
onMouseDown: (e) => {
|
|
3141
3244
|
e.preventDefault(), E(e.shiftKey ? -_ * 10 : -_);
|
|
@@ -3143,9 +3246,9 @@ function rr({ value: e, onChange: t, formValidator: n, label: r, error: i, class
|
|
|
3143
3246
|
children: /* @__PURE__ */ W(h, { icon: v })
|
|
3144
3247
|
})]
|
|
3145
3248
|
}) : null;
|
|
3146
|
-
return /* @__PURE__ */ W(
|
|
3249
|
+
return /* @__PURE__ */ W(Et, {
|
|
3147
3250
|
label: r,
|
|
3148
|
-
className: m(
|
|
3251
|
+
className: m(ar.numberInput, a),
|
|
3149
3252
|
value: w,
|
|
3150
3253
|
onChange: () => {},
|
|
3151
3254
|
formValidator: null,
|
|
@@ -3169,7 +3272,7 @@ function rr({ value: e, onChange: t, formValidator: n, label: r, error: i, class
|
|
|
3169
3272
|
}
|
|
3170
3273
|
//#endregion
|
|
3171
3274
|
//#region package/common/numberInput/index.ts
|
|
3172
|
-
var
|
|
3275
|
+
var sr = or, cr = {
|
|
3173
3276
|
optionPicker: "optionPicker_Yx82s",
|
|
3174
3277
|
"optionPicker-chip": "optionPicker-chip_ywtvr",
|
|
3175
3278
|
optionPickerChip: "optionPicker-chip_ywtvr",
|
|
@@ -3180,20 +3283,20 @@ var ir = rr, ar = {
|
|
|
3180
3283
|
};
|
|
3181
3284
|
//#endregion
|
|
3182
3285
|
//#region package/common/optionPicker/optionPicker.tsx
|
|
3183
|
-
function
|
|
3286
|
+
function lr({ className: e = void 0, options: t, onChange: n, value: r, ...i }) {
|
|
3184
3287
|
let a = t.findIndex((e) => e.key === r) * 100 / t.length;
|
|
3185
3288
|
return /* @__PURE__ */ G("div", {
|
|
3186
3289
|
...i,
|
|
3187
|
-
className: m(
|
|
3290
|
+
className: m(cr.optionPicker, e),
|
|
3188
3291
|
children: [/* @__PURE__ */ W("div", {
|
|
3189
|
-
className:
|
|
3292
|
+
className: cr.optionPickerChip,
|
|
3190
3293
|
style: {
|
|
3191
3294
|
left: `${a}%`,
|
|
3192
3295
|
width: `${100 / t.length}%`
|
|
3193
3296
|
}
|
|
3194
3297
|
}), t.map((e) => /* @__PURE__ */ W(Be, {
|
|
3195
3298
|
onClick: (t) => n(e.key, t),
|
|
3196
|
-
className: m(
|
|
3299
|
+
className: m(cr.optionPickerOption, e.key === r && cr.optionPickerOptionActive),
|
|
3197
3300
|
tabIndex: e.key === r ? -1 : 0,
|
|
3198
3301
|
children: e.label
|
|
3199
3302
|
}, e.key))]
|
|
@@ -3201,25 +3304,25 @@ function or({ className: e = void 0, options: t, onChange: n, value: r, ...i })
|
|
|
3201
3304
|
}
|
|
3202
3305
|
//#endregion
|
|
3203
3306
|
//#region package/hooks/useWindowSize.ts
|
|
3204
|
-
var
|
|
3205
|
-
function
|
|
3307
|
+
var ur = 768;
|
|
3308
|
+
function dr() {
|
|
3206
3309
|
let [e, t] = p(() => ({
|
|
3207
3310
|
width: window.innerWidth,
|
|
3208
3311
|
height: window.innerHeight,
|
|
3209
|
-
isMobileSize: window.innerWidth <
|
|
3312
|
+
isMobileSize: window.innerWidth < ur
|
|
3210
3313
|
}));
|
|
3211
3314
|
return o(() => {
|
|
3212
3315
|
function e() {
|
|
3213
3316
|
t({
|
|
3214
3317
|
width: window.innerWidth,
|
|
3215
3318
|
height: window.innerHeight,
|
|
3216
|
-
isMobileSize: window.innerWidth <
|
|
3319
|
+
isMobileSize: window.innerWidth < ur
|
|
3217
3320
|
});
|
|
3218
3321
|
}
|
|
3219
3322
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
3220
3323
|
}, []), e;
|
|
3221
3324
|
}
|
|
3222
|
-
var
|
|
3325
|
+
var fr = {
|
|
3223
3326
|
overscroll: "overscroll_Ij750",
|
|
3224
3327
|
"overscroll-header": "overscroll-header_S6vYc",
|
|
3225
3328
|
overscrollHeader: "overscroll-header_S6vYc",
|
|
@@ -3230,8 +3333,8 @@ var lr = {
|
|
|
3230
3333
|
};
|
|
3231
3334
|
//#endregion
|
|
3232
3335
|
//#region package/common/overscroll/overscroll.tsx
|
|
3233
|
-
function
|
|
3234
|
-
let { isMobileSize: h, height: g } =
|
|
3336
|
+
function pr({ children: e = null, overscrollContent: t = null, overscrollContentDesktop: n = null, centerHeader: r = !0, min: i = 10, max: s = 80, start: c = 30, unit: l = "%", mobileOnly: u = !0, onScrollChange: d = () => {}, scrollDisabled: p = !1 }) {
|
|
3337
|
+
let { isMobileSize: h, height: g } = dr(), _ = f(null), v = f(null), y = f(null), b = f(!1), x = f(null), S = f(d);
|
|
3235
3338
|
S.current = d;
|
|
3236
3339
|
let C = a((e) => {
|
|
3237
3340
|
let t;
|
|
@@ -3289,15 +3392,15 @@ function ur({ children: e = null, overscrollContent: t = null, overscrollContent
|
|
|
3289
3392
|
if (u && !h) return n ? /* @__PURE__ */ G("div", { children: [n, e] }) : /* @__PURE__ */ W(ie, { children: e });
|
|
3290
3393
|
let k = l === "%" ? `${100 - i}%` : `calc(100% - ${i}px)`;
|
|
3291
3394
|
return /* @__PURE__ */ G("div", {
|
|
3292
|
-
className:
|
|
3395
|
+
className: fr.overscroll,
|
|
3293
3396
|
ref: _,
|
|
3294
3397
|
onScroll: O,
|
|
3295
3398
|
children: [/* @__PURE__ */ W("div", {
|
|
3296
|
-
className:
|
|
3399
|
+
className: fr.overscrollHeaderContainer,
|
|
3297
3400
|
style: { height: `${s}${l}` },
|
|
3298
3401
|
ref: y,
|
|
3299
3402
|
children: /* @__PURE__ */ W("div", {
|
|
3300
|
-
className: m(
|
|
3403
|
+
className: m(fr.overscrollHeader, r && fr.overscrollHeaderCentered),
|
|
3301
3404
|
ref: v,
|
|
3302
3405
|
children: t
|
|
3303
3406
|
})
|
|
@@ -3307,7 +3410,7 @@ function ur({ children: e = null, overscrollContent: t = null, overscrollContent
|
|
|
3307
3410
|
})]
|
|
3308
3411
|
});
|
|
3309
3412
|
}
|
|
3310
|
-
var
|
|
3413
|
+
var mr = {
|
|
3311
3414
|
progressBar: "progressBar_LO0sX",
|
|
3312
3415
|
"progressBar-fill": "progressBar-fill_rt32j",
|
|
3313
3416
|
progressBarFill: "progressBar-fill_rt32j",
|
|
@@ -3320,17 +3423,17 @@ var dr = {
|
|
|
3320
3423
|
};
|
|
3321
3424
|
//#endregion
|
|
3322
3425
|
//#region package/common/progressBar/progressBar.tsx
|
|
3323
|
-
function
|
|
3426
|
+
function hr(e) {
|
|
3324
3427
|
let t = e.replace("#", ""), n = parseInt(t.substring(0, 2), 16), r = parseInt(t.substring(2, 4), 16), i = parseInt(t.substring(4, 6), 16);
|
|
3325
3428
|
return (.299 * n + .587 * r + .114 * i) / 255 > .5 ? "#000000" : "#ffffff";
|
|
3326
3429
|
}
|
|
3327
|
-
function
|
|
3430
|
+
function gr({ className: e = void 0, total: t = 100, progress: n = 0, style: r = void 0, ...i }) {
|
|
3328
3431
|
function a() {
|
|
3329
3432
|
let e = [];
|
|
3330
3433
|
return Array.isArray(n) ? e.push(...n) : typeof n == "object" ? e.push(n) : e.push({ amount: n }), e.map((n, i) => {
|
|
3331
3434
|
let a = t ? n.amount / t * 100 : 0;
|
|
3332
3435
|
return /* @__PURE__ */ W("div", {
|
|
3333
|
-
className: m(
|
|
3436
|
+
className: m(mr.progressBarFill, i === e.length - 1 && mr.progressBarFillEnd, n.class),
|
|
3334
3437
|
style: {
|
|
3335
3438
|
width: `${a}%`,
|
|
3336
3439
|
background: n.color || void 0,
|
|
@@ -3338,8 +3441,8 @@ function pr({ className: e = void 0, total: t = 100, progress: n = 0, style: r =
|
|
|
3338
3441
|
},
|
|
3339
3442
|
title: n.label ? `${n.label}: ${n.amount}` : void 0,
|
|
3340
3443
|
children: n.label && /* @__PURE__ */ W("div", {
|
|
3341
|
-
className:
|
|
3342
|
-
style: n.color ? { color:
|
|
3444
|
+
className: mr.progressBarLabel,
|
|
3445
|
+
style: n.color ? { color: hr(n.color) } : {},
|
|
3343
3446
|
children: n.label
|
|
3344
3447
|
})
|
|
3345
3448
|
}, i);
|
|
@@ -3347,21 +3450,21 @@ function pr({ className: e = void 0, total: t = 100, progress: n = 0, style: r =
|
|
|
3347
3450
|
}
|
|
3348
3451
|
return /* @__PURE__ */ W("div", {
|
|
3349
3452
|
...i,
|
|
3350
|
-
className: m(
|
|
3453
|
+
className: m(mr.progressBar, e),
|
|
3351
3454
|
style: r,
|
|
3352
3455
|
children: a()
|
|
3353
3456
|
});
|
|
3354
3457
|
}
|
|
3355
|
-
function
|
|
3458
|
+
function _r(e) {
|
|
3356
3459
|
return Math.round(e / 5) * 5;
|
|
3357
3460
|
}
|
|
3358
|
-
function
|
|
3461
|
+
function vr(e) {
|
|
3359
3462
|
return {
|
|
3360
|
-
x:
|
|
3361
|
-
y:
|
|
3463
|
+
x: _r(e.x),
|
|
3464
|
+
y: _r(e.y)
|
|
3362
3465
|
};
|
|
3363
3466
|
}
|
|
3364
|
-
function
|
|
3467
|
+
function yr(e, t, n) {
|
|
3365
3468
|
let r = n.createSVGPoint();
|
|
3366
3469
|
r.x = e, r.y = t;
|
|
3367
3470
|
let i = n.getScreenCTM();
|
|
@@ -3370,18 +3473,18 @@ function gr(e, t, n) {
|
|
|
3370
3473
|
y: 0
|
|
3371
3474
|
};
|
|
3372
3475
|
let a = r.matrixTransform(i.inverse());
|
|
3373
|
-
return
|
|
3476
|
+
return vr({
|
|
3374
3477
|
x: a.x,
|
|
3375
3478
|
y: a.y
|
|
3376
3479
|
});
|
|
3377
3480
|
}
|
|
3378
|
-
function
|
|
3481
|
+
function br(e, t) {
|
|
3379
3482
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
3380
3483
|
}
|
|
3381
|
-
function
|
|
3484
|
+
function xr(e, t, n) {
|
|
3382
3485
|
let r = n.x - t.x, i = n.y - t.y, a = r * r + i * i;
|
|
3383
3486
|
if (a === 0) return {
|
|
3384
|
-
dist:
|
|
3487
|
+
dist: br(e, t),
|
|
3385
3488
|
t: 0
|
|
3386
3489
|
};
|
|
3387
3490
|
let o = Math.max(0, Math.min(1, ((e.x - t.x) * r + (e.y - t.y) * i) / a)), s = t.x + o * r, c = t.y + o * i;
|
|
@@ -3390,12 +3493,12 @@ function vr(e, t, n) {
|
|
|
3390
3493
|
t: o
|
|
3391
3494
|
};
|
|
3392
3495
|
}
|
|
3393
|
-
function
|
|
3496
|
+
function Sr(e, t) {
|
|
3394
3497
|
let n = null;
|
|
3395
3498
|
for (let r of t) {
|
|
3396
3499
|
let t = r.points;
|
|
3397
3500
|
for (let i = 0; i < t.length; i++) {
|
|
3398
|
-
let a = t[i], o = t[(i + 1) % t.length], { dist: s, t: c } =
|
|
3501
|
+
let a = t[i], o = t[(i + 1) % t.length], { dist: s, t: c } = xr(e, a, o);
|
|
3399
3502
|
s <= 8 && (!n || s < n.dist) && (n = {
|
|
3400
3503
|
roomId: r.id,
|
|
3401
3504
|
wallIndex: i,
|
|
@@ -3406,7 +3509,7 @@ function yr(e, t) {
|
|
|
3406
3509
|
}
|
|
3407
3510
|
return n;
|
|
3408
3511
|
}
|
|
3409
|
-
function
|
|
3512
|
+
function Cr(e, t) {
|
|
3410
3513
|
let n = !1;
|
|
3411
3514
|
for (let r = 0, i = t.length - 1; r < t.length; i = r++) {
|
|
3412
3515
|
let a = t[r].x, o = t[r].y, s = t[i].x, c = t[i].y;
|
|
@@ -3414,13 +3517,13 @@ function br(e, t) {
|
|
|
3414
3517
|
}
|
|
3415
3518
|
return n;
|
|
3416
3519
|
}
|
|
3417
|
-
function
|
|
3520
|
+
function wr(e) {
|
|
3418
3521
|
return {
|
|
3419
3522
|
x: e.reduce((e, t) => e + t.x, 0) / e.length,
|
|
3420
3523
|
y: e.reduce((e, t) => e + t.y, 0) / e.length
|
|
3421
3524
|
};
|
|
3422
3525
|
}
|
|
3423
|
-
function
|
|
3526
|
+
function Tr(e, t, n, r) {
|
|
3424
3527
|
return [
|
|
3425
3528
|
{
|
|
3426
3529
|
x: e,
|
|
@@ -3440,7 +3543,7 @@ function Sr(e, t, n, r) {
|
|
|
3440
3543
|
}
|
|
3441
3544
|
];
|
|
3442
3545
|
}
|
|
3443
|
-
function
|
|
3546
|
+
function Er(e, t, n, r) {
|
|
3444
3547
|
let i = t.x - e.x, a = t.y - e.y, o = Math.sqrt(i * i + a * a);
|
|
3445
3548
|
if (o < .001) return null;
|
|
3446
3549
|
let s = i / o, c = a / o, l = e.x + i * n, u = e.y + a * n, d = Math.min(r / 2, o / 2 - .001);
|
|
@@ -3459,13 +3562,13 @@ function Cr(e, t, n, r) {
|
|
|
3459
3562
|
}
|
|
3460
3563
|
};
|
|
3461
3564
|
}
|
|
3462
|
-
function
|
|
3565
|
+
function Dr(e) {
|
|
3463
3566
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
3464
3567
|
}
|
|
3465
|
-
function
|
|
3568
|
+
function Or(e) {
|
|
3466
3569
|
return e.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(" ") + " Z";
|
|
3467
3570
|
}
|
|
3468
|
-
function
|
|
3571
|
+
function kr(e, t) {
|
|
3469
3572
|
if (e.length < 2) return [];
|
|
3470
3573
|
if (t.length === 0) return [e.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(" ") + " Z"];
|
|
3471
3574
|
let n = e.length, r = [], i = [`M ${e[0].x.toFixed(2)},${e[0].y.toFixed(2)}`];
|
|
@@ -3488,8 +3591,8 @@ function Er(e, t) {
|
|
|
3488
3591
|
}
|
|
3489
3592
|
return r[0] = [...i, ...r[0].slice(1)], r.map((e) => e.join(" "));
|
|
3490
3593
|
}
|
|
3491
|
-
function
|
|
3492
|
-
let r =
|
|
3594
|
+
function Ar(e, t, n) {
|
|
3595
|
+
let r = Er(e, t, n.t, n.width);
|
|
3493
3596
|
if (!r) return "";
|
|
3494
3597
|
let { p1: i, p2: a, perp: o } = r, s = {
|
|
3495
3598
|
x: i.x + o.x * n.width,
|
|
@@ -3497,7 +3600,7 @@ function Dr(e, t, n) {
|
|
|
3497
3600
|
};
|
|
3498
3601
|
return [`M ${i.x.toFixed(2)},${i.y.toFixed(2)} L ${a.x.toFixed(2)},${a.y.toFixed(2)}`, `M ${i.x.toFixed(2)},${i.y.toFixed(2)} A ${n.width},${n.width} 0 0,1 ${s.x.toFixed(2)},${s.y.toFixed(2)}`].join(" ");
|
|
3499
3602
|
}
|
|
3500
|
-
function
|
|
3603
|
+
function jr(e, t) {
|
|
3501
3604
|
let n = Infinity, r = Infinity, i = -Infinity, a = -Infinity;
|
|
3502
3605
|
for (let t of e) for (let e of t.points) e.x < n && (n = e.x), e.y < r && (r = e.y), e.x > i && (i = e.x), e.y > a && (a = e.y);
|
|
3503
3606
|
isFinite(n) || (n = 0, r = 0, i = 400, a = 300);
|
|
@@ -3507,10 +3610,10 @@ function Or(e, t) {
|
|
|
3507
3610
|
(i - n + 10).toFixed(2),
|
|
3508
3611
|
(a - r + 10).toFixed(2)
|
|
3509
3612
|
].join(" "), s = e.map((e) => {
|
|
3510
|
-
let n = t.filter((t) => t.roomId === e.id), r =
|
|
3511
|
-
let n = e.points[t.wallIndex], r = e.points[(t.wallIndex + 1) % e.points.length], i =
|
|
3613
|
+
let n = t.filter((t) => t.roomId === e.id), r = kr(e.points, n), i = Or(e.points), a = wr(e.points), o = r.map((e) => ` <path d="${e}" />`).join("\n"), s = n.map((t) => {
|
|
3614
|
+
let n = e.points[t.wallIndex], r = e.points[(t.wallIndex + 1) % e.points.length], i = Ar(n, r, t);
|
|
3512
3615
|
return i ? ` <path d="${i}" fill="none" />` : "";
|
|
3513
|
-
}).filter(Boolean).join("\n"), c = e.name ? ` <text fontSize="5" x="${a.x.toFixed(1)}" y="${a.y.toFixed(1)}">${
|
|
3616
|
+
}).filter(Boolean).join("\n"), c = e.name ? ` <text fontSize="5" x="${a.x.toFixed(1)}" y="${a.y.toFixed(1)}">${Dr(e.name)}</text>` : "";
|
|
3514
3617
|
return [
|
|
3515
3618
|
` <g id="${e.id}">`,
|
|
3516
3619
|
o,
|
|
@@ -3529,7 +3632,7 @@ function Or(e, t) {
|
|
|
3529
3632
|
"</svg>"
|
|
3530
3633
|
].join("\n");
|
|
3531
3634
|
}
|
|
3532
|
-
function
|
|
3635
|
+
function Mr(e) {
|
|
3533
3636
|
let t = [];
|
|
3534
3637
|
for (let n of e.matchAll(/[ML]\s*([-\d.]+)[,\s]+([-\d.]+)/gi)) t.push({
|
|
3535
3638
|
x: parseFloat(n[1]),
|
|
@@ -3537,14 +3640,14 @@ function kr(e) {
|
|
|
3537
3640
|
});
|
|
3538
3641
|
return t;
|
|
3539
3642
|
}
|
|
3540
|
-
function
|
|
3643
|
+
function Nr(e) {
|
|
3541
3644
|
let t = new DOMParser().parseFromString(e, "image/svg+xml"), n = [];
|
|
3542
3645
|
return t.querySelectorAll("[id^=\"room\"]").forEach((e) => {
|
|
3543
3646
|
let t = e.querySelector("[id=\"background\"]");
|
|
3544
3647
|
if (!t) return;
|
|
3545
3648
|
let r = t.getAttribute("d");
|
|
3546
3649
|
if (!r) return;
|
|
3547
|
-
let i =
|
|
3650
|
+
let i = Mr(r);
|
|
3548
3651
|
if (i.length < 3) return;
|
|
3549
3652
|
let a = e.querySelector("text")?.textContent?.trim() ?? "";
|
|
3550
3653
|
n.push({
|
|
@@ -3554,8 +3657,8 @@ function Ar(e) {
|
|
|
3554
3657
|
});
|
|
3555
3658
|
}), n;
|
|
3556
3659
|
}
|
|
3557
|
-
function
|
|
3558
|
-
let n =
|
|
3660
|
+
function Pr(e, t) {
|
|
3661
|
+
let n = jr(e, t), r = new Blob([n], { type: "image/svg+xml" }), i = URL.createObjectURL(r), a = document.createElement("a");
|
|
3559
3662
|
a.href = i, a.download = "room-plan.svg", a.click(), URL.revokeObjectURL(i);
|
|
3560
3663
|
}
|
|
3561
3664
|
var Q = {
|
|
@@ -3630,20 +3733,20 @@ var Q = {
|
|
|
3630
3733
|
polyCloseTarget: "polyCloseTarget_snjYx",
|
|
3631
3734
|
polyVertex: "polyVertex_fw0nX",
|
|
3632
3735
|
vertexHandle: "vertexHandle_-z7g5"
|
|
3633
|
-
},
|
|
3634
|
-
function
|
|
3635
|
-
return
|
|
3736
|
+
}, Fr = 6, Ir = 5, Lr = 1.25, Rr = .25, zr = 12, Br = 0;
|
|
3737
|
+
function Vr(e) {
|
|
3738
|
+
return Br += 1, `${e}${Br}`;
|
|
3636
3739
|
}
|
|
3637
|
-
var
|
|
3740
|
+
var Hr = {
|
|
3638
3741
|
select: "Drag inside to move · Drag corner to reshape · Click wall to add corner · Dbl-click corner to remove · Delete to erase",
|
|
3639
3742
|
rect: "Drag to draw a rectangular room",
|
|
3640
3743
|
polygon: "Click to place corners · Click first point or Enter to close · Esc to cancel"
|
|
3641
3744
|
};
|
|
3642
|
-
function
|
|
3745
|
+
function Ur({ className: e }) {
|
|
3643
3746
|
let [t, n] = p([]), [r, i] = p([]), [a, s] = p("rect"), [c, u] = p(null), [d, g] = p(null), [v, y] = p(null), [b, x] = p(null), [S, C] = p([]), [w, T] = p(null), [k, A] = p(1), [j, M] = p({
|
|
3644
3747
|
x: 0,
|
|
3645
3748
|
y: 0
|
|
3646
|
-
}), P = f(null), L = f(null), R = f(null), z = f(null), B = f(null),
|
|
3749
|
+
}), P = f(null), L = f(null), R = f(null), z = f(null), B = f(null), H = f({
|
|
3647
3750
|
rooms: t,
|
|
3648
3751
|
doors: r,
|
|
3649
3752
|
tool: a,
|
|
@@ -3654,7 +3757,7 @@ function Br({ className: e }) {
|
|
|
3654
3757
|
pan: j
|
|
3655
3758
|
});
|
|
3656
3759
|
l(() => {
|
|
3657
|
-
|
|
3760
|
+
H.current = {
|
|
3658
3761
|
rooms: t,
|
|
3659
3762
|
doors: r,
|
|
3660
3763
|
tool: a,
|
|
@@ -3667,7 +3770,7 @@ function Br({ className: e }) {
|
|
|
3667
3770
|
});
|
|
3668
3771
|
function U(e) {
|
|
3669
3772
|
e.length < 3 || (n((t) => [...t, {
|
|
3670
|
-
id:
|
|
3773
|
+
id: Vr("room"),
|
|
3671
3774
|
name: `Room ${t.length + 1}`,
|
|
3672
3775
|
points: e
|
|
3673
3776
|
}]), C([]), T(null));
|
|
@@ -3677,9 +3780,9 @@ function Br({ className: e }) {
|
|
|
3677
3780
|
if (!e) return;
|
|
3678
3781
|
function t(e) {
|
|
3679
3782
|
e.preventDefault();
|
|
3680
|
-
let { zoom: t, pan: n } =
|
|
3783
|
+
let { zoom: t, pan: n } = H.current, r = yr(e.clientX, e.clientY, z.current);
|
|
3681
3784
|
if (!r) return;
|
|
3682
|
-
let i = e.deltaY < 0 ?
|
|
3785
|
+
let i = e.deltaY < 0 ? Lr : 1 / Lr, a = Math.max(Rr, Math.min(zr, t * i));
|
|
3683
3786
|
M({
|
|
3684
3787
|
x: r.x - (r.x - n.x) * (t / a),
|
|
3685
3788
|
y: r.y - (r.y - n.y) * (t / a)
|
|
@@ -3688,7 +3791,7 @@ function Br({ className: e }) {
|
|
|
3688
3791
|
return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
|
|
3689
3792
|
}, []), o(() => {
|
|
3690
3793
|
function e(e) {
|
|
3691
|
-
let { tool: t, selectedId: r, editingDoorsForRoomId: a, polyPoints: o, zoom: s, pan: c } =
|
|
3794
|
+
let { tool: t, selectedId: r, editingDoorsForRoomId: a, polyPoints: o, zoom: s, pan: c } = H.current;
|
|
3692
3795
|
if (e.key === "Escape") {
|
|
3693
3796
|
if (a) {
|
|
3694
3797
|
g(null);
|
|
@@ -3702,7 +3805,7 @@ function Br({ className: e }) {
|
|
|
3702
3805
|
return;
|
|
3703
3806
|
}
|
|
3704
3807
|
if ((e.key === "+" || e.key === "=") && !(e.target instanceof HTMLInputElement)) {
|
|
3705
|
-
let e = Math.max(
|
|
3808
|
+
let e = Math.max(Rr, Math.min(zr, s * Lr)), t = c.x + 400 / s / 2, n = c.y + 300 / s / 2;
|
|
3706
3809
|
A(e), M({
|
|
3707
3810
|
x: t - 400 / e / 2,
|
|
3708
3811
|
y: n - 300 / e / 2
|
|
@@ -3710,7 +3813,7 @@ function Br({ className: e }) {
|
|
|
3710
3813
|
return;
|
|
3711
3814
|
}
|
|
3712
3815
|
if (e.key === "-" && !(e.target instanceof HTMLInputElement)) {
|
|
3713
|
-
let e = Math.max(
|
|
3816
|
+
let e = Math.max(Rr, Math.min(zr, s / Lr)), t = c.x + 400 / s / 2, n = c.y + 300 / s / 2;
|
|
3714
3817
|
A(e), M({
|
|
3715
3818
|
x: t - 400 / e / 2,
|
|
3716
3819
|
y: n - 300 / e / 2
|
|
@@ -3729,20 +3832,20 @@ function Br({ className: e }) {
|
|
|
3729
3832
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
3730
3833
|
}, []);
|
|
3731
3834
|
function ne(e, t = k, n = j) {
|
|
3732
|
-
let r = Math.max(
|
|
3835
|
+
let r = Math.max(Rr, Math.min(zr, t * e)), i = n.x + 400 / t / 2, a = n.y + 300 / t / 2;
|
|
3733
3836
|
M({
|
|
3734
3837
|
x: i - 400 / r / 2,
|
|
3735
3838
|
y: a - 300 / r / 2
|
|
3736
3839
|
}), A(r);
|
|
3737
3840
|
}
|
|
3738
3841
|
function re(e) {
|
|
3739
|
-
return z.current ?
|
|
3842
|
+
return z.current ? yr(e.clientX, e.clientY, z.current) : null;
|
|
3740
3843
|
}
|
|
3741
3844
|
function K(e, t) {
|
|
3742
3845
|
let n = null;
|
|
3743
3846
|
for (let r = 0; r < t.points.length; r++) {
|
|
3744
|
-
let i =
|
|
3745
|
-
i <=
|
|
3847
|
+
let i = br(e, t.points[r]);
|
|
3848
|
+
i <= Fr && (!n || i < n.d) && (n = {
|
|
3746
3849
|
index: r,
|
|
3747
3850
|
d: i
|
|
3748
3851
|
});
|
|
@@ -3752,8 +3855,8 @@ function Br({ className: e }) {
|
|
|
3752
3855
|
function ae(e, t) {
|
|
3753
3856
|
let n = null;
|
|
3754
3857
|
for (let r = 0; r < t.points.length; r++) {
|
|
3755
|
-
let i = t.points[r], a = t.points[(r + 1) % t.points.length], { dist: o, t: s } =
|
|
3756
|
-
o <=
|
|
3858
|
+
let i = t.points[r], a = t.points[(r + 1) % t.points.length], { dist: o, t: s } = xr(e, i, a);
|
|
3859
|
+
o <= Ir && (!n || o < n.d) && (n = {
|
|
3757
3860
|
index: r,
|
|
3758
3861
|
t: s,
|
|
3759
3862
|
d: o
|
|
@@ -3825,9 +3928,9 @@ function Br({ className: e }) {
|
|
|
3825
3928
|
if (d) {
|
|
3826
3929
|
let e = t.find((e) => e.id === d);
|
|
3827
3930
|
if (e) {
|
|
3828
|
-
let t =
|
|
3931
|
+
let t = Sr(n, [e]);
|
|
3829
3932
|
t && i((e) => [...e, {
|
|
3830
|
-
id:
|
|
3933
|
+
id: Vr("door"),
|
|
3831
3934
|
roomId: t.roomId,
|
|
3832
3935
|
wallIndex: t.wallIndex,
|
|
3833
3936
|
t: t.t,
|
|
@@ -3841,7 +3944,7 @@ function Br({ className: e }) {
|
|
|
3841
3944
|
return;
|
|
3842
3945
|
}
|
|
3843
3946
|
if (a === "polygon") {
|
|
3844
|
-
S.length >= 3 &&
|
|
3947
|
+
S.length >= 3 && br(n, S[0]) <= 8 ? U(S) : C((e) => [...e, n]);
|
|
3845
3948
|
return;
|
|
3846
3949
|
}
|
|
3847
3950
|
if (a === "select") {
|
|
@@ -3862,7 +3965,7 @@ function Br({ className: e }) {
|
|
|
3862
3965
|
if (e) {
|
|
3863
3966
|
let t = ae(n, e);
|
|
3864
3967
|
if (t) {
|
|
3865
|
-
let r = e.points[t.index], i = e.points[(t.index + 1) % e.points.length], a =
|
|
3968
|
+
let r = e.points[t.index], i = e.points[(t.index + 1) % e.points.length], a = vr({
|
|
3866
3969
|
x: r.x + (i.x - r.x) * t.t,
|
|
3867
3970
|
y: r.y + (i.y - r.y) * t.t
|
|
3868
3971
|
}), o = oe(e.id, t.index, t.t, a);
|
|
@@ -3876,7 +3979,7 @@ function Br({ className: e }) {
|
|
|
3876
3979
|
return;
|
|
3877
3980
|
}
|
|
3878
3981
|
}
|
|
3879
|
-
let r = t.find((e) =>
|
|
3982
|
+
let r = t.find((e) => Cr(n, e.points));
|
|
3880
3983
|
if (r) {
|
|
3881
3984
|
u(r.id), P.current = {
|
|
3882
3985
|
type: "room",
|
|
@@ -3913,7 +4016,7 @@ function Br({ className: e }) {
|
|
|
3913
4016
|
if (L.current && d) {
|
|
3914
4017
|
let e = t.find((e) => e.id === d);
|
|
3915
4018
|
if (e) {
|
|
3916
|
-
let t =
|
|
4019
|
+
let t = Sr(r, [e]);
|
|
3917
4020
|
t && i((e) => e.map((e) => e.id === L.current ? {
|
|
3918
4021
|
...e,
|
|
3919
4022
|
wallIndex: t.wallIndex,
|
|
@@ -3933,7 +4036,7 @@ function Br({ className: e }) {
|
|
|
3933
4036
|
if (a === "select" && !d && P.current) {
|
|
3934
4037
|
let e = P.current;
|
|
3935
4038
|
if (e.type === "vertex") {
|
|
3936
|
-
let t = r.x - e.start.x, i = r.y - e.start.y, a =
|
|
4039
|
+
let t = r.x - e.start.x, i = r.y - e.start.y, a = vr({
|
|
3937
4040
|
x: e.origPt.x + t,
|
|
3938
4041
|
y: e.origPt.y + i
|
|
3939
4042
|
});
|
|
@@ -3968,9 +4071,9 @@ function Br({ className: e }) {
|
|
|
3968
4071
|
if (a === "rect" && v) {
|
|
3969
4072
|
let e = Math.min(v.x, t.x), r = Math.min(v.y, t.y), i = Math.abs(t.x - v.x), a = Math.abs(t.y - v.y);
|
|
3970
4073
|
i >= 10 && a >= 10 && n((t) => [...t, {
|
|
3971
|
-
id:
|
|
4074
|
+
id: Vr("room"),
|
|
3972
4075
|
name: `Room ${t.length + 1}`,
|
|
3973
|
-
points:
|
|
4076
|
+
points: Tr(e, r, i, a)
|
|
3974
4077
|
}]), y(null), x(null);
|
|
3975
4078
|
}
|
|
3976
4079
|
L.current = null, P.current = null;
|
|
@@ -4006,10 +4109,10 @@ function Br({ className: e }) {
|
|
|
4006
4109
|
r.onload = (e) => {
|
|
4007
4110
|
let t = e.target?.result;
|
|
4008
4111
|
if (typeof t != "string") return;
|
|
4009
|
-
let r =
|
|
4112
|
+
let r = Nr(t);
|
|
4010
4113
|
r.length !== 0 && (n(r.map((e) => ({
|
|
4011
4114
|
...e,
|
|
4012
|
-
id:
|
|
4115
|
+
id: Vr("room")
|
|
4013
4116
|
}))), i([]), u(null), g(null), A(1), M({
|
|
4014
4117
|
x: 0,
|
|
4015
4118
|
y: 0
|
|
@@ -4054,8 +4157,8 @@ function Br({ className: e }) {
|
|
|
4054
4157
|
/* @__PURE__ */ W("button", {
|
|
4055
4158
|
title: "Zoom in (+)",
|
|
4056
4159
|
className: Q.roomDrawerToolbarBtn,
|
|
4057
|
-
onClick: () => ne(
|
|
4058
|
-
disabled: k >=
|
|
4160
|
+
onClick: () => ne(Lr),
|
|
4161
|
+
disabled: k >= zr,
|
|
4059
4162
|
children: /* @__PURE__ */ W(h, { icon: I })
|
|
4060
4163
|
}),
|
|
4061
4164
|
/* @__PURE__ */ G("button", {
|
|
@@ -4072,8 +4175,8 @@ function Br({ className: e }) {
|
|
|
4072
4175
|
/* @__PURE__ */ W("button", {
|
|
4073
4176
|
title: "Zoom out (−)",
|
|
4074
4177
|
className: Q.roomDrawerToolbarBtn,
|
|
4075
|
-
onClick: () => ne(1 /
|
|
4076
|
-
disabled: k <=
|
|
4178
|
+
onClick: () => ne(1 / Lr),
|
|
4179
|
+
disabled: k <= Rr,
|
|
4077
4180
|
children: /* @__PURE__ */ W(h, { icon: F })
|
|
4078
4181
|
}),
|
|
4079
4182
|
/* @__PURE__ */ W("div", { className: Q.roomDrawerToolbarSep }),
|
|
@@ -4081,12 +4184,12 @@ function Br({ className: e }) {
|
|
|
4081
4184
|
title: "Upload SVG",
|
|
4082
4185
|
className: Q.roomDrawerToolbarBtn,
|
|
4083
4186
|
onClick: () => B.current?.click(),
|
|
4084
|
-
children: /* @__PURE__ */ W(h, { icon:
|
|
4187
|
+
children: /* @__PURE__ */ W(h, { icon: te })
|
|
4085
4188
|
}),
|
|
4086
4189
|
/* @__PURE__ */ W("button", {
|
|
4087
4190
|
title: "Download SVG",
|
|
4088
4191
|
className: Q.roomDrawerToolbarBtn,
|
|
4089
|
-
onClick: () =>
|
|
4192
|
+
onClick: () => Pr(t, r),
|
|
4090
4193
|
disabled: t.length === 0,
|
|
4091
4194
|
children: /* @__PURE__ */ W(h, { icon: D })
|
|
4092
4195
|
}),
|
|
@@ -4127,7 +4230,7 @@ function Br({ className: e }) {
|
|
|
4127
4230
|
fill: "url(#rd-grid)"
|
|
4128
4231
|
}),
|
|
4129
4232
|
t.map((e) => {
|
|
4130
|
-
let t = e.points, n = t.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x},${e.y}`).join(" ") + " Z", i =
|
|
4233
|
+
let t = e.points, n = t.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x},${e.y}`).join(" ") + " Z", i = kr(t, r.filter((t) => t.roomId === e.id)), a = wr(t), o = c === e.id, s = d === e.id;
|
|
4131
4234
|
return /* @__PURE__ */ G("g", { children: [
|
|
4132
4235
|
/* @__PURE__ */ W("path", {
|
|
4133
4236
|
d: n,
|
|
@@ -4150,7 +4253,7 @@ function Br({ className: e }) {
|
|
|
4150
4253
|
r.map((e) => {
|
|
4151
4254
|
let n = t.find((t) => t.id === e.roomId);
|
|
4152
4255
|
if (!n) return null;
|
|
4153
|
-
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a =
|
|
4256
|
+
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a = Er(r, i, e.t, e.width);
|
|
4154
4257
|
return a ? /* @__PURE__ */ W("line", {
|
|
4155
4258
|
x1: a.p1.x,
|
|
4156
4259
|
y1: a.p1.y,
|
|
@@ -4162,7 +4265,7 @@ function Br({ className: e }) {
|
|
|
4162
4265
|
d && ye.map((e) => {
|
|
4163
4266
|
let n = t.find((t) => t.id === e.roomId);
|
|
4164
4267
|
if (!n) return null;
|
|
4165
|
-
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a =
|
|
4268
|
+
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a = Er(r, i, e.t, e.width);
|
|
4166
4269
|
if (!a) return null;
|
|
4167
4270
|
let o = {
|
|
4168
4271
|
x: (a.p1.x + a.p2.x) / 2,
|
|
@@ -4293,12 +4396,12 @@ function Br({ className: e }) {
|
|
|
4293
4396
|
}),
|
|
4294
4397
|
/* @__PURE__ */ W("div", {
|
|
4295
4398
|
className: Q.roomDrawerHint,
|
|
4296
|
-
children: d ? "Click a wall to add a door · Adjust width or delete from the list · Done or Esc to finish" : `${
|
|
4399
|
+
children: d ? "Click a wall to add a door · Adjust width or delete from the list · Done or Esc to finish" : `${Hr[a]} · Scroll to zoom · Middle-drag to pan · 0 to reset`
|
|
4297
4400
|
})
|
|
4298
4401
|
]
|
|
4299
4402
|
});
|
|
4300
4403
|
}
|
|
4301
|
-
var
|
|
4404
|
+
var Wr = {
|
|
4302
4405
|
"roomViewer-containerLoading": "roomViewer-containerLoading_BL3M-",
|
|
4303
4406
|
roomViewerContainerLoading: "roomViewer-containerLoading_BL3M-",
|
|
4304
4407
|
"roomViewer-container": "roomViewer-container_YlmB8",
|
|
@@ -4316,7 +4419,7 @@ var Vr = {
|
|
|
4316
4419
|
};
|
|
4317
4420
|
//#endregion
|
|
4318
4421
|
//#region package/common/roomViewer/roomViewer.tsx
|
|
4319
|
-
function
|
|
4422
|
+
function Gr({ data: e = [] }) {
|
|
4320
4423
|
let t = f(null), [, n] = p(null), [r, i] = p(0), [a, s] = p(!0);
|
|
4321
4424
|
o(() => {
|
|
4322
4425
|
let i = new AbortController();
|
|
@@ -4336,15 +4439,15 @@ function Hr({ data: e = [] }) {
|
|
|
4336
4439
|
if (n) {
|
|
4337
4440
|
let [e] = t.querySelectorAll(`[id="room${n}"]`);
|
|
4338
4441
|
if (e) {
|
|
4339
|
-
e.classList.remove(
|
|
4442
|
+
e.classList.remove(Wr.roomViewerSelected, Wr.roomViewerTint);
|
|
4340
4443
|
let [t] = e.querySelectorAll("[id=\"background\"]");
|
|
4341
|
-
t && t.classList.remove(
|
|
4444
|
+
t && t.classList.remove(Wr.roomViewerTint);
|
|
4342
4445
|
}
|
|
4343
4446
|
}
|
|
4344
4447
|
if (a) {
|
|
4345
|
-
a.classList.add(
|
|
4448
|
+
a.classList.add(Wr.roomViewerSelected);
|
|
4346
4449
|
let [e] = a.querySelectorAll("[id=\"background\"]");
|
|
4347
|
-
(e ?? a).classList.add(
|
|
4450
|
+
(e ?? a).classList.add(Wr.roomViewerTint);
|
|
4348
4451
|
}
|
|
4349
4452
|
return r;
|
|
4350
4453
|
});
|
|
@@ -4357,19 +4460,19 @@ function Hr({ data: e = [] }) {
|
|
|
4357
4460
|
}
|
|
4358
4461
|
let u = e[r]?.data ?? null;
|
|
4359
4462
|
return /* @__PURE__ */ G("div", {
|
|
4360
|
-
className:
|
|
4463
|
+
className: Wr.roomViewer,
|
|
4361
4464
|
ref: t,
|
|
4362
4465
|
children: [
|
|
4363
4466
|
/* @__PURE__ */ W("h3", {
|
|
4364
|
-
className:
|
|
4467
|
+
className: Wr.roomViewerHeader,
|
|
4365
4468
|
children: e[r]?.label ?? ""
|
|
4366
4469
|
}),
|
|
4367
4470
|
/* @__PURE__ */ W("div", {
|
|
4368
|
-
className: m(
|
|
4471
|
+
className: m(Wr.roomViewerContainer, a && Wr.roomViewerContainerLoading),
|
|
4369
4472
|
children: u
|
|
4370
4473
|
}, r),
|
|
4371
4474
|
e.length > 1 && /* @__PURE__ */ G("div", {
|
|
4372
|
-
className:
|
|
4475
|
+
className: Wr.roomViewerActions,
|
|
4373
4476
|
children: [
|
|
4374
4477
|
/* @__PURE__ */ W(h, {
|
|
4375
4478
|
icon: y,
|
|
@@ -4385,22 +4488,22 @@ function Hr({ data: e = [] }) {
|
|
|
4385
4488
|
]
|
|
4386
4489
|
});
|
|
4387
4490
|
}
|
|
4388
|
-
var
|
|
4491
|
+
var Kr = { scrollbarProvider: "scrollbarProvider_IMBFu" };
|
|
4389
4492
|
//#endregion
|
|
4390
4493
|
//#region package/common/scrollbarProvider/scrollbarProvider.tsx
|
|
4391
|
-
function
|
|
4494
|
+
function qr({ className: e = void 0, children: t = void 0 }) {
|
|
4392
4495
|
return /* @__PURE__ */ W("div", {
|
|
4393
|
-
className: m(
|
|
4496
|
+
className: m(Kr.scrollbarProvider, e),
|
|
4394
4497
|
children: t
|
|
4395
4498
|
});
|
|
4396
4499
|
}
|
|
4397
4500
|
//#endregion
|
|
4398
4501
|
//#region package/common/scrollbarProvider/index.ts
|
|
4399
|
-
var
|
|
4502
|
+
var Jr = qr, Yr = /* @__PURE__ */ function(e) {
|
|
4400
4503
|
return e.Text = "text", e.Circle = "circle", e.Rectangular = "rectangular", e;
|
|
4401
|
-
}({}),
|
|
4504
|
+
}({}), Xr = /* @__PURE__ */ function(e) {
|
|
4402
4505
|
return e.Shimmer = "shimmer", e.Pulse = "pulse", e.None = "none", e;
|
|
4403
|
-
}({}),
|
|
4506
|
+
}({}), Zr = {
|
|
4404
4507
|
skeleton: "skeleton_TSg1y",
|
|
4405
4508
|
"skeleton-lines": "skeleton-lines_-Z-gf",
|
|
4406
4509
|
skeletonLines: "skeleton-lines_-Z-gf",
|
|
@@ -4418,32 +4521,32 @@ var Gr = Wr, Kr = /* @__PURE__ */ function(e) {
|
|
|
4418
4521
|
"skeleton-animation-shimmer": "skeleton-animation-shimmer_a0nwc",
|
|
4419
4522
|
skeletonAnimationShimmer: "skeleton-animation-shimmer_a0nwc",
|
|
4420
4523
|
skeletonShimmer: "skeletonShimmer_wLPXR"
|
|
4421
|
-
},
|
|
4422
|
-
[
|
|
4423
|
-
[
|
|
4424
|
-
[
|
|
4425
|
-
},
|
|
4426
|
-
[
|
|
4427
|
-
[
|
|
4428
|
-
[
|
|
4524
|
+
}, Qr = {
|
|
4525
|
+
[Yr.Text]: Zr.skeletonText,
|
|
4526
|
+
[Yr.Circle]: Zr.skeletonCircle,
|
|
4527
|
+
[Yr.Rectangular]: Zr.skeletonRectangular
|
|
4528
|
+
}, $r = {
|
|
4529
|
+
[Xr.Shimmer]: Zr.skeletonAnimationShimmer,
|
|
4530
|
+
[Xr.Pulse]: Zr.skeletonAnimationPulse,
|
|
4531
|
+
[Xr.None]: void 0
|
|
4429
4532
|
};
|
|
4430
|
-
function
|
|
4431
|
-
let c =
|
|
4432
|
-
return e !==
|
|
4533
|
+
function ei({ variant: e = Yr.Text, animation: t = Xr.Shimmer, lines: n = 1, className: r, style: i, classNames: a, styles: o, ...s }) {
|
|
4534
|
+
let c = Qr[e], l = $r[t];
|
|
4535
|
+
return e !== Yr.Text || n <= 1 ? /* @__PURE__ */ W("span", {
|
|
4433
4536
|
...s,
|
|
4434
|
-
className: m(
|
|
4537
|
+
className: m(Zr.skeleton, c, l, r),
|
|
4435
4538
|
style: i
|
|
4436
4539
|
}) : /* @__PURE__ */ W("span", {
|
|
4437
4540
|
...s,
|
|
4438
|
-
className: m(
|
|
4541
|
+
className: m(Zr.skeletonLines, r),
|
|
4439
4542
|
style: i,
|
|
4440
4543
|
children: Array.from({ length: n }, (e, t) => /* @__PURE__ */ W("span", {
|
|
4441
|
-
className: m(
|
|
4544
|
+
className: m(Zr.skeleton, c, l, t === n - 1 && Zr.skeletonLineLast, a?.line),
|
|
4442
4545
|
style: o?.line
|
|
4443
4546
|
}, t))
|
|
4444
4547
|
});
|
|
4445
4548
|
}
|
|
4446
|
-
var
|
|
4549
|
+
var ti = {
|
|
4447
4550
|
stepper: "stepper_kiS2A",
|
|
4448
4551
|
"stepper-clickable": "stepper-clickable_Nm6fP",
|
|
4449
4552
|
stepperClickable: "stepper-clickable_Nm6fP",
|
|
@@ -4473,7 +4576,7 @@ var Qr = {
|
|
|
4473
4576
|
};
|
|
4474
4577
|
//#endregion
|
|
4475
4578
|
//#region package/common/stepper/stepper.tsx
|
|
4476
|
-
function
|
|
4579
|
+
function ni() {
|
|
4477
4580
|
return /* @__PURE__ */ W("svg", {
|
|
4478
4581
|
strokeLinejoin: "round",
|
|
4479
4582
|
strokeLinecap: "round",
|
|
@@ -4489,22 +4592,22 @@ function $r() {
|
|
|
4489
4592
|
})
|
|
4490
4593
|
});
|
|
4491
4594
|
}
|
|
4492
|
-
function
|
|
4595
|
+
function ri({ steps: t = [], currentStep: n = 0, alignment: r = "horizontal", onStepClicked: i = null, nonLinear: a = !1, hideLabels: o = !1, className: s, style: c, classNames: l, styles: u, ...d }) {
|
|
4493
4596
|
let f = r === "vertical";
|
|
4494
4597
|
return /* @__PURE__ */ W("div", {
|
|
4495
4598
|
...d,
|
|
4496
|
-
className: m(
|
|
4599
|
+
className: m(ti.stepper, { [ti.stepperVertical]: f }, l?.root, s),
|
|
4497
4600
|
style: {
|
|
4498
4601
|
...u?.root,
|
|
4499
4602
|
...c
|
|
4500
4603
|
},
|
|
4501
4604
|
children: t.map((r, s) => {
|
|
4502
|
-
let c = s < n, d = s <= n, p = !!i && (a ? s !== n : c), h = m(
|
|
4503
|
-
className: m(
|
|
4605
|
+
let c = s < n, d = s <= n, p = !!i && (a ? s !== n : c), h = m(ti.stepperEntry, { [ti.stepperEntryActive]: d }, { [ti.stepperEntryDone]: c }, { [ti.stepperClickable]: p }, l?.entry), g = /* @__PURE__ */ G(ie, { children: [/* @__PURE__ */ W("div", {
|
|
4606
|
+
className: m(ti.stepperEntryNumber, { [ti.stepperEntryNumberDone]: c }, l?.entryNumber),
|
|
4504
4607
|
style: u?.entryNumber,
|
|
4505
|
-
children: c ? /* @__PURE__ */ W(
|
|
4608
|
+
children: c ? /* @__PURE__ */ W(ni, {}) : s + 1
|
|
4506
4609
|
}), !o && /* @__PURE__ */ W("div", {
|
|
4507
|
-
className: m(
|
|
4610
|
+
className: m(ti.stepperEntryLabel, { [ti.stepperEntryLabelVertical]: f }, l?.entryLabel),
|
|
4508
4611
|
style: u?.entryLabel,
|
|
4509
4612
|
children: r.label
|
|
4510
4613
|
})] });
|
|
@@ -4520,13 +4623,13 @@ function ei({ steps: t = [], currentStep: n = 0, alignment: r = "horizontal", on
|
|
|
4520
4623
|
"aria-current": s === n ? "step" : void 0,
|
|
4521
4624
|
children: g
|
|
4522
4625
|
}), s < t.length - 1 && /* @__PURE__ */ W("div", {
|
|
4523
|
-
className: m(
|
|
4626
|
+
className: m(ti.stepperConnector, { [ti.stepperConnectorFilled]: c }, { [ti.stepperConnectorVertical]: f }, l?.connector),
|
|
4524
4627
|
style: u?.connector
|
|
4525
4628
|
})] }, s);
|
|
4526
4629
|
})
|
|
4527
4630
|
});
|
|
4528
4631
|
}
|
|
4529
|
-
var
|
|
4632
|
+
var ii = {
|
|
4530
4633
|
sticky: "sticky_L6zO2",
|
|
4531
4634
|
"sticky-content": "sticky-content_ZaXTD",
|
|
4532
4635
|
stickyContent: "sticky-content_ZaXTD",
|
|
@@ -4537,7 +4640,7 @@ var ti = {
|
|
|
4537
4640
|
};
|
|
4538
4641
|
//#endregion
|
|
4539
4642
|
//#region package/common/sticky/sticky.tsx
|
|
4540
|
-
function
|
|
4643
|
+
function ai({ children: e, offsetTop: t = 0, zIndex: n = 20, disabled: r = !1, onStuckChange: i, className: s, style: c, classNames: u, styles: d, ...h }) {
|
|
4541
4644
|
let g = f(null), _ = f(null), [v, y] = p(!1), [b, x] = p({
|
|
4542
4645
|
width: 0,
|
|
4543
4646
|
left: 0,
|
|
@@ -4589,7 +4692,7 @@ function ni({ children: e, offsetTop: t = 0, zIndex: n = 20, disabled: r = !1, o
|
|
|
4589
4692
|
} : d?.content;
|
|
4590
4693
|
return /* @__PURE__ */ G("div", {
|
|
4591
4694
|
ref: g,
|
|
4592
|
-
className: m(
|
|
4695
|
+
className: m(ii.sticky, s, u?.root),
|
|
4593
4696
|
style: {
|
|
4594
4697
|
...d?.root,
|
|
4595
4698
|
...c
|
|
@@ -4597,20 +4700,20 @@ function ni({ children: e, offsetTop: t = 0, zIndex: n = 20, disabled: r = !1, o
|
|
|
4597
4700
|
...h,
|
|
4598
4701
|
children: [v && /* @__PURE__ */ W("div", {
|
|
4599
4702
|
"aria-hidden": !0,
|
|
4600
|
-
className: m(
|
|
4703
|
+
className: m(ii.stickyPlaceholder, u?.placeholder),
|
|
4601
4704
|
style: {
|
|
4602
4705
|
height: b.height,
|
|
4603
4706
|
...d?.placeholder
|
|
4604
4707
|
}
|
|
4605
4708
|
}), /* @__PURE__ */ W("div", {
|
|
4606
4709
|
ref: _,
|
|
4607
|
-
className: m(
|
|
4710
|
+
className: m(ii.stickyContent, v && ii.stickyContentStuck, u?.content),
|
|
4608
4711
|
style: T,
|
|
4609
4712
|
children: e
|
|
4610
4713
|
})]
|
|
4611
4714
|
});
|
|
4612
4715
|
}
|
|
4613
|
-
var
|
|
4716
|
+
var oi = {
|
|
4614
4717
|
switch: "switch_9TG2Y",
|
|
4615
4718
|
"switch-disabled": "switch-disabled_UL-F-",
|
|
4616
4719
|
switchDisabled: "switch-disabled_UL-F-",
|
|
@@ -4627,7 +4730,7 @@ var ri = {
|
|
|
4627
4730
|
};
|
|
4628
4731
|
//#endregion
|
|
4629
4732
|
//#region package/common/switch/switch.tsx
|
|
4630
|
-
function
|
|
4733
|
+
function si({ label: e = "", selected: t = !1, onToggle: n = () => {}, className: r = "", style: i, disabled: a = !1, title: s = "", tabIndex: c = 0, formValidator: l = null, children: u = null, classNames: d, styles: f, ...h }) {
|
|
4631
4734
|
let [, g] = p(0);
|
|
4632
4735
|
o(() => {
|
|
4633
4736
|
if (!l) return;
|
|
@@ -4641,7 +4744,7 @@ function ii({ label: e = "", selected: t = !1, onToggle: n = () => {}, className
|
|
|
4641
4744
|
return /* @__PURE__ */ G("div", {
|
|
4642
4745
|
...h,
|
|
4643
4746
|
title: s,
|
|
4644
|
-
className: m(
|
|
4747
|
+
className: m(oi.switch, { [oi.switchDisabled]: a }, r),
|
|
4645
4748
|
style: i,
|
|
4646
4749
|
onClick: _,
|
|
4647
4750
|
onKeyDown: (e) => {
|
|
@@ -4651,20 +4754,20 @@ function ii({ label: e = "", selected: t = !1, onToggle: n = () => {}, className
|
|
|
4651
4754
|
"aria-checked": v,
|
|
4652
4755
|
tabIndex: a ? -1 : c,
|
|
4653
4756
|
children: [/* @__PURE__ */ W("div", {
|
|
4654
|
-
className: m(
|
|
4757
|
+
className: m(oi.switchTrack, v && oi.switchTrackChecked, d?.track),
|
|
4655
4758
|
style: f?.track,
|
|
4656
4759
|
children: /* @__PURE__ */ W("div", {
|
|
4657
|
-
className: m(
|
|
4760
|
+
className: m(oi.switchThumb, v && oi.switchThumbChecked, d?.thumb),
|
|
4658
4761
|
style: f?.thumb
|
|
4659
4762
|
})
|
|
4660
4763
|
}), (u || e) && /* @__PURE__ */ W("div", {
|
|
4661
|
-
className: m(
|
|
4764
|
+
className: m(oi.switchLabel, d?.label),
|
|
4662
4765
|
style: f?.label,
|
|
4663
4766
|
children: u || e
|
|
4664
4767
|
})]
|
|
4665
4768
|
});
|
|
4666
4769
|
}
|
|
4667
|
-
var
|
|
4770
|
+
var ci = {
|
|
4668
4771
|
tabHeader: "tabHeader_C-b9d",
|
|
4669
4772
|
"tabHeader-tab": "tabHeader-tab_Wbyt-",
|
|
4670
4773
|
tabHeaderTab: "tabHeader-tab_Wbyt-",
|
|
@@ -4683,11 +4786,11 @@ var ai = {
|
|
|
4683
4786
|
};
|
|
4684
4787
|
//#endregion
|
|
4685
4788
|
//#region package/common/tabHeader/tabHeader.tsx
|
|
4686
|
-
function
|
|
4789
|
+
function li({ tabs: e = [], currentTab: t, onChange: n, className: r, style: i, classNames: a, styles: o, ...s }) {
|
|
4687
4790
|
return /* @__PURE__ */ W("div", {
|
|
4688
4791
|
...s,
|
|
4689
4792
|
role: "tablist",
|
|
4690
|
-
className: m(
|
|
4793
|
+
className: m(ci.tabHeader, a?.root, r),
|
|
4691
4794
|
style: {
|
|
4692
4795
|
...o?.root,
|
|
4693
4796
|
...i
|
|
@@ -4699,24 +4802,24 @@ function oi({ tabs: e = [], currentTab: t, onChange: n, className: r, style: i,
|
|
|
4699
4802
|
"aria-selected": r,
|
|
4700
4803
|
"aria-disabled": e.disabled || void 0,
|
|
4701
4804
|
tabIndex: e.disabled ? -1 : 0,
|
|
4702
|
-
className: m(
|
|
4805
|
+
className: m(ci.tabHeaderTab, { [ci.tabHeaderTabActive]: r }, { [ci.tabHeaderTabDisabled]: e.disabled }, a?.tab),
|
|
4703
4806
|
style: o?.tab,
|
|
4704
4807
|
onClick: () => {
|
|
4705
4808
|
e.disabled || r || n(e.id);
|
|
4706
4809
|
},
|
|
4707
4810
|
children: [/* @__PURE__ */ W(h, {
|
|
4708
4811
|
icon: e.icon,
|
|
4709
|
-
className: m(
|
|
4812
|
+
className: m(ci.tabHeaderIcon, a?.icon),
|
|
4710
4813
|
style: o?.icon
|
|
4711
4814
|
}), i && /* @__PURE__ */ G("div", {
|
|
4712
|
-
className: m(
|
|
4815
|
+
className: m(ci.tabHeaderLabels, a?.labels),
|
|
4713
4816
|
style: o?.labels,
|
|
4714
4817
|
children: [e.title && /* @__PURE__ */ W("span", {
|
|
4715
|
-
className: m(
|
|
4818
|
+
className: m(ci.tabHeaderTitle, a?.title),
|
|
4716
4819
|
style: o?.title,
|
|
4717
4820
|
children: e.title
|
|
4718
4821
|
}), e.subtitle && /* @__PURE__ */ W("span", {
|
|
4719
|
-
className: m(
|
|
4822
|
+
className: m(ci.tabHeaderSubtitle, a?.subtitle),
|
|
4720
4823
|
style: o?.subtitle,
|
|
4721
4824
|
children: e.subtitle
|
|
4722
4825
|
})]
|
|
@@ -4727,15 +4830,15 @@ function oi({ tabs: e = [], currentTab: t, onChange: n, className: r, style: i,
|
|
|
4727
4830
|
}
|
|
4728
4831
|
//#endregion
|
|
4729
4832
|
//#region package/common/textarea/textarea.tsx
|
|
4730
|
-
function
|
|
4731
|
-
return /* @__PURE__ */ W(
|
|
4833
|
+
function ui(e) {
|
|
4834
|
+
return /* @__PURE__ */ W(Et, {
|
|
4732
4835
|
...e,
|
|
4733
4836
|
multiline: !0
|
|
4734
4837
|
});
|
|
4735
4838
|
}
|
|
4736
4839
|
//#endregion
|
|
4737
4840
|
//#region package/common/themeProvider/defaultTheme.ts
|
|
4738
|
-
var
|
|
4841
|
+
var di = {
|
|
4739
4842
|
id: "default",
|
|
4740
4843
|
variables: {
|
|
4741
4844
|
"--grey": "#8A8A8A",
|
|
@@ -4800,14 +4903,14 @@ var ci = {
|
|
|
4800
4903
|
"--spacing-m": "8px",
|
|
4801
4904
|
"--spacing-l": "16px"
|
|
4802
4905
|
}
|
|
4803
|
-
},
|
|
4906
|
+
}, fi = { colorFade: "colorFade_eLv2g" }, pi = class extends n {
|
|
4804
4907
|
constructor(...t) {
|
|
4805
4908
|
super(...t), this.state = {
|
|
4806
4909
|
resolvedVariables: {},
|
|
4807
4910
|
colorFadeActive: !1,
|
|
4808
4911
|
currentThemeColor: null
|
|
4809
4912
|
}, this.colorFadeTimeout = null, this.wrapperRef = e.createRef(), this.themeColorMeta = null, this.createdThemeColorMeta = !1, this.applyTheme = (e) => {
|
|
4810
|
-
let t = this.props.themes ?? [
|
|
4913
|
+
let t = this.props.themes ?? [di], n = t.find((e) => !e.baseThemeId) ?? t[0], r = n ? n.variables : {}, i = t.find((t) => t.id === e), a = i ? this.resolveChain(i.id) : [], o = Object.assign({}, r, ...a);
|
|
4811
4914
|
this.setState({
|
|
4812
4915
|
resolvedVariables: o,
|
|
4813
4916
|
colorFadeActive: !0
|
|
@@ -4841,7 +4944,7 @@ var ci = {
|
|
|
4841
4944
|
}
|
|
4842
4945
|
}
|
|
4843
4946
|
resolveChain(e) {
|
|
4844
|
-
let t = (this.props.themes ?? [
|
|
4947
|
+
let t = (this.props.themes ?? [di]).find((t) => t.id === e);
|
|
4845
4948
|
return t ? [...t.baseThemeId ? this.resolveChain(t.baseThemeId) : [], t.variables] : [];
|
|
4846
4949
|
}
|
|
4847
4950
|
render() {
|
|
@@ -4849,7 +4952,7 @@ var ci = {
|
|
|
4849
4952
|
return /* @__PURE__ */ W("div", {
|
|
4850
4953
|
ref: this.wrapperRef,
|
|
4851
4954
|
id: "themeProvider",
|
|
4852
|
-
className: n ?
|
|
4955
|
+
className: n ? fi.colorFade : void 0,
|
|
4853
4956
|
style: t,
|
|
4854
4957
|
children: e
|
|
4855
4958
|
});
|
|
@@ -4857,7 +4960,7 @@ var ci = {
|
|
|
4857
4960
|
};
|
|
4858
4961
|
//#endregion
|
|
4859
4962
|
//#region package/common/themeProvider/useTheme.ts
|
|
4860
|
-
function
|
|
4963
|
+
function mi(e = "default") {
|
|
4861
4964
|
let [t, n] = p(localStorage.getItem("theme") || e);
|
|
4862
4965
|
return {
|
|
4863
4966
|
currentThemeId: t,
|
|
@@ -4868,8 +4971,8 @@ function di(e = "default") {
|
|
|
4868
4971
|
}
|
|
4869
4972
|
//#endregion
|
|
4870
4973
|
//#region package/common/timeInput/timeFunctions.ts
|
|
4871
|
-
var
|
|
4872
|
-
function
|
|
4974
|
+
var hi = (e) => (Math.trunc(e) % 24 + 24) % 24, gi = (e) => (Math.trunc(e) % 60 + 60) % 60;
|
|
4975
|
+
function _i(e) {
|
|
4873
4976
|
if (!e) return null;
|
|
4874
4977
|
let t = e.match(/^(\d{1,2}):(\d{1,2})$/);
|
|
4875
4978
|
if (!t) return null;
|
|
@@ -4879,31 +4982,31 @@ function mi(e) {
|
|
|
4879
4982
|
minutes: r
|
|
4880
4983
|
};
|
|
4881
4984
|
}
|
|
4882
|
-
function
|
|
4883
|
-
return e ? `${String(
|
|
4985
|
+
function vi(e) {
|
|
4986
|
+
return e ? `${String(hi(e.hours)).padStart(2, "0")}:${String(gi(e.minutes)).padStart(2, "0")}` : "";
|
|
4884
4987
|
}
|
|
4885
|
-
function
|
|
4886
|
-
return
|
|
4988
|
+
function yi(e, t) {
|
|
4989
|
+
return gi(!t || t <= 1 ? e : Math.round(gi(e) / t) * t);
|
|
4887
4990
|
}
|
|
4888
|
-
var
|
|
4889
|
-
function
|
|
4890
|
-
let r =
|
|
4891
|
-
return i && (r = Math.max(r,
|
|
4991
|
+
var bi = (e) => e.hours * 60 + e.minutes;
|
|
4992
|
+
function xi(e, t, n) {
|
|
4993
|
+
let r = bi(e), i = _i(t), a = _i(n);
|
|
4994
|
+
return i && (r = Math.max(r, bi(i))), a && (r = Math.min(r, bi(a))), {
|
|
4892
4995
|
hours: Math.floor(r / 60),
|
|
4893
4996
|
minutes: r % 60
|
|
4894
4997
|
};
|
|
4895
4998
|
}
|
|
4896
|
-
function
|
|
4999
|
+
function Si(e, t, n, r, i) {
|
|
4897
5000
|
let a = r * i * Math.PI / 180;
|
|
4898
5001
|
return {
|
|
4899
5002
|
x: e + n * Math.sin(a),
|
|
4900
5003
|
y: t - n * Math.cos(a)
|
|
4901
5004
|
};
|
|
4902
5005
|
}
|
|
4903
|
-
function
|
|
5006
|
+
function Ci(e, t) {
|
|
4904
5007
|
return (Math.atan2(e, -t) * 180 / Math.PI + 360) % 360;
|
|
4905
5008
|
}
|
|
4906
|
-
var
|
|
5009
|
+
var wi = (e, t) => Math.sqrt(e * e + t * t), Ti = {
|
|
4907
5010
|
clockFace: "clockFace_LbXIa",
|
|
4908
5011
|
clockHand: "clockHand_E9nTw",
|
|
4909
5012
|
"clockHand-line": "clockHand-line_iOipC",
|
|
@@ -4917,8 +5020,8 @@ var xi = (e, t) => Math.sqrt(e * e + t * t), Si = {
|
|
|
4917
5020
|
clockNumberInner: "clockNumber-inner_x2XR1",
|
|
4918
5021
|
"clockNumber-selected": "clockNumber-selected_rPVlV",
|
|
4919
5022
|
clockNumberSelected: "clockNumber-selected_rPVlV"
|
|
4920
|
-
},
|
|
4921
|
-
function
|
|
5023
|
+
}, Ei = 50, Di = 40, Oi = 25.5, ki = 65.5 / 2, Ai = 30, ji = 6, Mi = (e) => (e + 11) % 12 + 1;
|
|
5024
|
+
function Ni(e, t) {
|
|
4922
5025
|
if (e === "minutes") return Array.from({ length: 12 }, (e, t) => {
|
|
4923
5026
|
let n = t * 5;
|
|
4924
5027
|
return {
|
|
@@ -4956,49 +5059,49 @@ function Ai(e, t) {
|
|
|
4956
5059
|
});
|
|
4957
5060
|
return [...n, ...r];
|
|
4958
5061
|
}
|
|
4959
|
-
function
|
|
4960
|
-
let c = f(null), l = f(!1), u =
|
|
5062
|
+
function Pi({ time: e, mode: t, use24Hour: n, minuteStep: r, onChange: i, onCommit: a, classNames: o, styles: s }) {
|
|
5063
|
+
let c = f(null), l = f(!1), u = Ni(t, n), d = e.hours >= 12, p = Mi(e.hours), h = t === "minutes" ? {
|
|
4961
5064
|
slot: e.minutes,
|
|
4962
|
-
radius:
|
|
5065
|
+
radius: Di
|
|
4963
5066
|
} : n ? e.hours === 0 ? {
|
|
4964
5067
|
slot: 0,
|
|
4965
|
-
radius:
|
|
5068
|
+
radius: Oi
|
|
4966
5069
|
} : e.hours <= 12 ? {
|
|
4967
5070
|
slot: e.hours % 12,
|
|
4968
|
-
radius:
|
|
5071
|
+
radius: Di
|
|
4969
5072
|
} : {
|
|
4970
5073
|
slot: (e.hours - 12) % 12,
|
|
4971
|
-
radius:
|
|
5074
|
+
radius: Oi
|
|
4972
5075
|
} : {
|
|
4973
5076
|
slot: p % 12,
|
|
4974
|
-
radius:
|
|
4975
|
-
}, g =
|
|
5077
|
+
radius: Di
|
|
5078
|
+
}, g = Si(Ei, Ei, h.radius, h.slot, t === "minutes" ? ji : Ai), _ = (i) => t === "minutes" ? yi(e.minutes, r) === i.value || e.minutes === i.value : n ? e.hours === i.value : p === i.value, v = (i, a) => {
|
|
4976
5079
|
let o = c.current?.getBoundingClientRect();
|
|
4977
5080
|
if (!o) return e;
|
|
4978
|
-
let s = i - (o.left + o.width / 2), l = a - (o.top + o.height / 2), u =
|
|
5081
|
+
let s = i - (o.left + o.width / 2), l = a - (o.top + o.height / 2), u = Ci(s, l);
|
|
4979
5082
|
if (t === "minutes") {
|
|
4980
|
-
let t =
|
|
5083
|
+
let t = yi(Math.round(u / ji), r);
|
|
4981
5084
|
return {
|
|
4982
5085
|
hours: e.hours,
|
|
4983
5086
|
minutes: t
|
|
4984
5087
|
};
|
|
4985
5088
|
}
|
|
4986
|
-
let f = Math.round(u /
|
|
5089
|
+
let f = Math.round(u / Ai) % 12;
|
|
4987
5090
|
if (!n) {
|
|
4988
5091
|
let t = f === 0 ? 12 : f;
|
|
4989
5092
|
return {
|
|
4990
|
-
hours:
|
|
5093
|
+
hours: hi(d ? t % 12 + 12 : t % 12),
|
|
4991
5094
|
minutes: e.minutes
|
|
4992
5095
|
};
|
|
4993
5096
|
}
|
|
4994
5097
|
return {
|
|
4995
|
-
hours:
|
|
5098
|
+
hours: hi(wi(s, l) / (o.width / 2) * Ei < ki ? f === 0 ? 0 : f + 12 : f === 0 ? 12 : f),
|
|
4996
5099
|
minutes: e.minutes
|
|
4997
5100
|
};
|
|
4998
5101
|
};
|
|
4999
5102
|
return /* @__PURE__ */ G("div", {
|
|
5000
5103
|
ref: c,
|
|
5001
|
-
className: m(
|
|
5104
|
+
className: m(Ti.clockFace, o?.clockFace),
|
|
5002
5105
|
style: s?.clockFace,
|
|
5003
5106
|
onPointerDown: (e) => {
|
|
5004
5107
|
l.current = !0, e.currentTarget.setPointerCapture?.(e.pointerId), i(v(e.clientX, e.clientY));
|
|
@@ -5013,35 +5116,35 @@ function ji({ time: e, mode: t, use24Hour: n, minuteStep: r, onChange: i, onComm
|
|
|
5013
5116
|
"aria-label": t === "minutes" ? "Minutes" : "Hours",
|
|
5014
5117
|
"aria-valuetext": t === "minutes" ? `${e.minutes} minutes` : `${e.hours} hours`,
|
|
5015
5118
|
children: [/* @__PURE__ */ G("svg", {
|
|
5016
|
-
className:
|
|
5119
|
+
className: Ti.clockHand,
|
|
5017
5120
|
viewBox: "0 0 100 100",
|
|
5018
5121
|
"aria-hidden": !0,
|
|
5019
5122
|
children: [
|
|
5020
5123
|
/* @__PURE__ */ W("circle", {
|
|
5021
|
-
cx:
|
|
5022
|
-
cy:
|
|
5124
|
+
cx: Ei,
|
|
5125
|
+
cy: Ei,
|
|
5023
5126
|
r: 1.8,
|
|
5024
|
-
className:
|
|
5127
|
+
className: Ti.clockHandCenter
|
|
5025
5128
|
}),
|
|
5026
5129
|
/* @__PURE__ */ W("line", {
|
|
5027
|
-
x1:
|
|
5028
|
-
y1:
|
|
5130
|
+
x1: Ei,
|
|
5131
|
+
y1: Ei,
|
|
5029
5132
|
x2: g.x,
|
|
5030
5133
|
y2: g.y,
|
|
5031
|
-
className:
|
|
5134
|
+
className: Ti.clockHandLine
|
|
5032
5135
|
}),
|
|
5033
5136
|
/* @__PURE__ */ W("circle", {
|
|
5034
5137
|
cx: g.x,
|
|
5035
5138
|
cy: g.y,
|
|
5036
5139
|
r: 7,
|
|
5037
|
-
className: m(
|
|
5140
|
+
className: m(Ti.clockHandKnob, o?.clockHand),
|
|
5038
5141
|
style: s?.clockHand
|
|
5039
5142
|
})
|
|
5040
5143
|
]
|
|
5041
5144
|
}), u.map((e) => {
|
|
5042
|
-
let t =
|
|
5145
|
+
let t = Si(Ei, Ei, e.ring === "inner" ? Oi : Di, e.slot, Ai), n = _(e);
|
|
5043
5146
|
return /* @__PURE__ */ W("div", {
|
|
5044
|
-
className: m(
|
|
5147
|
+
className: m(Ti.clockNumber, e.ring === "inner" && Ti.clockNumberInner, n && Ti.clockNumberSelected, o?.clockNumber),
|
|
5045
5148
|
style: {
|
|
5046
5149
|
left: `${t.x}%`,
|
|
5047
5150
|
top: `${t.y}%`,
|
|
@@ -5052,7 +5155,7 @@ function ji({ time: e, mode: t, use24Hour: n, minuteStep: r, onChange: i, onComm
|
|
|
5052
5155
|
})]
|
|
5053
5156
|
});
|
|
5054
5157
|
}
|
|
5055
|
-
var
|
|
5158
|
+
var Fi = {
|
|
5056
5159
|
timeInput: "timeInput_EbsZN",
|
|
5057
5160
|
"timeInput-clock": "timeInput-clock_D1-dk",
|
|
5058
5161
|
timeInputClock: "timeInput-clock_D1-dk",
|
|
@@ -5073,9 +5176,9 @@ var Mi = {
|
|
|
5073
5176
|
};
|
|
5074
5177
|
//#endregion
|
|
5075
5178
|
//#region package/common/timeInput/timeInput.tsx
|
|
5076
|
-
function
|
|
5077
|
-
let j = () => i ? i.value || "" : e ?? t ?? "", [M, N] = p(j), [P, F] = p(!1), [I, L] = p("hours"), [R, z] = p(!1), [B, V] = p(!1), [, ee] = p(0),
|
|
5078
|
-
!i &&
|
|
5179
|
+
function Ii({ value: e, selected: t, onChange: n = () => null, onSelect: r = () => null, formValidator: i = null, isInline: a = !1, isModal: s = !1, noInput: c = !1, noHeader: l = !1, showClearButton: u = !1, showNowButton: d = !1, minuteStep: g = 1, use24Hour: _ = !0, minTime: v = null, maxTime: y = null, label: b = "", isValid: x = !0, errorMessage: S = "", isRequired: C = !1, disabled: w = !1, className: E = "", style: D, classNames: O, styles: k, ...A }) {
|
|
5180
|
+
let j = () => i ? i.value || "" : e ?? t ?? "", [M, N] = p(j), [P, F] = p(!1), [I, L] = p("hours"), [R, z] = p(!1), [B, V] = p(!1), [, ee] = p(0), H = j(), [te, U] = p(H), ne = f(i);
|
|
5181
|
+
!i && te !== H && (U(H), N(H)), o(() => {
|
|
5079
5182
|
if (ne.current = i, !i) return;
|
|
5080
5183
|
let e = () => {
|
|
5081
5184
|
N(i.value || ""), ee((e) => e + 1);
|
|
@@ -5083,28 +5186,28 @@ function Ni({ value: e, selected: t, onChange: n = () => null, onSelect: r = ()
|
|
|
5083
5186
|
return i.registerOnUpdateListener(e), () => i.removeOnUpdateListener(e);
|
|
5084
5187
|
}, [i]);
|
|
5085
5188
|
let re = () => i ? i.touched && i.hasError() : !x || !!S, ie = () => !!(C || i?.validators.find((e) => e.validatorId === "required")), K = (e) => {
|
|
5086
|
-
let t = e ?
|
|
5189
|
+
let t = e ? vi(e) : null;
|
|
5087
5190
|
i && i.set(t), n?.(t);
|
|
5088
5191
|
}, ae = (e) => {
|
|
5089
|
-
N(e ?
|
|
5090
|
-
}, q =
|
|
5192
|
+
N(e ? vi(e) : ""), K(e);
|
|
5193
|
+
}, q = _i(M), se = q ?? {
|
|
5091
5194
|
hours: 12,
|
|
5092
5195
|
minutes: 0
|
|
5093
5196
|
}, ce = (e) => {
|
|
5094
|
-
ae(
|
|
5197
|
+
ae(xi({
|
|
5095
5198
|
hours: e.hours,
|
|
5096
|
-
minutes:
|
|
5199
|
+
minutes: yi(e.minutes, g)
|
|
5097
5200
|
}, v, y));
|
|
5098
5201
|
}, J = (e) => {
|
|
5099
|
-
let t =
|
|
5202
|
+
let t = xi({
|
|
5100
5203
|
hours: e.hours,
|
|
5101
|
-
minutes:
|
|
5204
|
+
minutes: yi(e.minutes, g)
|
|
5102
5205
|
}, v, y);
|
|
5103
5206
|
if (ae(t), I === "hours") {
|
|
5104
5207
|
L("minutes");
|
|
5105
5208
|
return;
|
|
5106
5209
|
}
|
|
5107
|
-
r?.(
|
|
5210
|
+
r?.(vi(t)), a || F(!1);
|
|
5108
5211
|
}, le = () => {
|
|
5109
5212
|
w || (L("hours"), F(!0));
|
|
5110
5213
|
}, ue = ({ previousState: e, nextState: t }) => {
|
|
@@ -5118,55 +5221,55 @@ function Ni({ value: e, selected: t, onChange: n = () => null, onSelect: r = ()
|
|
|
5118
5221
|
};
|
|
5119
5222
|
}, de = (e) => {
|
|
5120
5223
|
N(e);
|
|
5121
|
-
let t =
|
|
5224
|
+
let t = _i(e);
|
|
5122
5225
|
t && K(t);
|
|
5123
5226
|
}, fe = () => {
|
|
5124
|
-
ne.current && (ne.current.touched = !0), z(!1), K(
|
|
5227
|
+
ne.current && (ne.current.touched = !0), z(!1), K(_i(M));
|
|
5125
5228
|
}, pe = (e) => {
|
|
5126
5229
|
e !== se.hours >= 12 && ae({
|
|
5127
|
-
hours:
|
|
5230
|
+
hours: hi(se.hours + (e ? 12 : -12)),
|
|
5128
5231
|
minutes: se.minutes
|
|
5129
5232
|
});
|
|
5130
5233
|
}, me = re(), he = q ? String(_ ? q.hours : (q.hours + 11) % 12 + 1).padStart(2, "0") : "--", ge = q ? String(q.minutes).padStart(2, "0") : "--", _e = l ? null : /* @__PURE__ */ G("div", {
|
|
5131
|
-
className: m(
|
|
5234
|
+
className: m(Fi.timeInputClockHeader, O?.clockHeader),
|
|
5132
5235
|
style: k?.clockHeader,
|
|
5133
5236
|
children: [
|
|
5134
5237
|
/* @__PURE__ */ W("button", {
|
|
5135
5238
|
type: "button",
|
|
5136
|
-
className: m(
|
|
5239
|
+
className: m(Fi.timeInputHeaderSegment, I === "hours" && Fi.timeInputHeaderSegmentActive, O?.headerSegment),
|
|
5137
5240
|
style: k?.headerSegment,
|
|
5138
5241
|
onClick: () => L("hours"),
|
|
5139
5242
|
children: he
|
|
5140
5243
|
}),
|
|
5141
5244
|
/* @__PURE__ */ W("span", {
|
|
5142
|
-
className:
|
|
5245
|
+
className: Fi.timeInputHeaderColon,
|
|
5143
5246
|
children: ":"
|
|
5144
5247
|
}),
|
|
5145
5248
|
/* @__PURE__ */ W("button", {
|
|
5146
5249
|
type: "button",
|
|
5147
|
-
className: m(
|
|
5250
|
+
className: m(Fi.timeInputHeaderSegment, I === "minutes" && Fi.timeInputHeaderSegmentActive, O?.headerSegment),
|
|
5148
5251
|
style: k?.headerSegment,
|
|
5149
5252
|
onClick: () => L("minutes"),
|
|
5150
5253
|
children: ge
|
|
5151
5254
|
}),
|
|
5152
5255
|
!_ && /* @__PURE__ */ G("div", {
|
|
5153
|
-
className: m(
|
|
5256
|
+
className: m(Fi.timeInputMeridiem, O?.meridiem),
|
|
5154
5257
|
style: k?.meridiem,
|
|
5155
5258
|
children: [/* @__PURE__ */ W("button", {
|
|
5156
5259
|
type: "button",
|
|
5157
|
-
className: m(se.hours < 12 &&
|
|
5260
|
+
className: m(se.hours < 12 && Fi.timeInputMeridiemActive),
|
|
5158
5261
|
onClick: () => pe(!1),
|
|
5159
5262
|
children: "AM"
|
|
5160
5263
|
}), /* @__PURE__ */ W("button", {
|
|
5161
5264
|
type: "button",
|
|
5162
|
-
className: m(se.hours >= 12 &&
|
|
5265
|
+
className: m(se.hours >= 12 && Fi.timeInputMeridiemActive),
|
|
5163
5266
|
onClick: () => pe(!0),
|
|
5164
5267
|
children: "PM"
|
|
5165
5268
|
})]
|
|
5166
5269
|
})
|
|
5167
5270
|
]
|
|
5168
5271
|
}), ve = u || d ? /* @__PURE__ */ G("div", {
|
|
5169
|
-
className: m(
|
|
5272
|
+
className: m(Fi.timeInputFooter, O?.footer),
|
|
5170
5273
|
style: k?.footer,
|
|
5171
5274
|
children: [d && /* @__PURE__ */ W(Ie, {
|
|
5172
5275
|
styleType: ke.Default,
|
|
@@ -5186,11 +5289,11 @@ function Ni({ value: e, selected: t, onChange: n = () => null, onSelect: r = ()
|
|
|
5186
5289
|
children: "Clear"
|
|
5187
5290
|
})]
|
|
5188
5291
|
}) : null, ye = /* @__PURE__ */ G("div", {
|
|
5189
|
-
className: m(
|
|
5292
|
+
className: m(Fi.timeInputClock, O?.clock),
|
|
5190
5293
|
style: k?.clock,
|
|
5191
5294
|
children: [
|
|
5192
5295
|
_e,
|
|
5193
|
-
/* @__PURE__ */ W(
|
|
5296
|
+
/* @__PURE__ */ W(Pi, {
|
|
5194
5297
|
time: se,
|
|
5195
5298
|
mode: I,
|
|
5196
5299
|
use24Hour: _,
|
|
@@ -5202,7 +5305,7 @@ function Ni({ value: e, selected: t, onChange: n = () => null, onSelect: r = ()
|
|
|
5202
5305
|
}),
|
|
5203
5306
|
ve
|
|
5204
5307
|
]
|
|
5205
|
-
}), be = c ? null : /* @__PURE__ */ W(
|
|
5308
|
+
}), be = c ? null : /* @__PURE__ */ W(Et, {
|
|
5206
5309
|
label: `${b}${ie() ? " *" : ""}`,
|
|
5207
5310
|
value: M,
|
|
5208
5311
|
icon: /* @__PURE__ */ W(h, { icon: T }),
|
|
@@ -5221,21 +5324,21 @@ function Ni({ value: e, selected: t, onChange: n = () => null, onSelect: r = ()
|
|
|
5221
5324
|
onFocus: () => z(!0),
|
|
5222
5325
|
onMouseEnter: () => V(!0),
|
|
5223
5326
|
onMouseLeave: () => V(!1)
|
|
5224
|
-
}), xe = a ? ye : s ? /* @__PURE__ */ W(
|
|
5327
|
+
}), xe = a ? ye : s ? /* @__PURE__ */ W(zt, {
|
|
5225
5328
|
hideHeader: !0,
|
|
5226
5329
|
isOpen: P,
|
|
5227
5330
|
onClose: () => F(!1),
|
|
5228
5331
|
children: ye
|
|
5229
|
-
}) : /* @__PURE__ */ W(
|
|
5332
|
+
}) : /* @__PURE__ */ W(St, {
|
|
5230
5333
|
isOpen: P,
|
|
5231
5334
|
onOpenChange: F,
|
|
5232
5335
|
content: ye,
|
|
5233
|
-
align:
|
|
5336
|
+
align: bt.Left,
|
|
5234
5337
|
dontCloseOnChildClick: !0,
|
|
5235
5338
|
children: be
|
|
5236
5339
|
});
|
|
5237
5340
|
return /* @__PURE__ */ G("div", {
|
|
5238
|
-
className: m(
|
|
5341
|
+
className: m(Fi.timeInput, O?.root, E),
|
|
5239
5342
|
style: {
|
|
5240
5343
|
...k?.root,
|
|
5241
5344
|
...D
|
|
@@ -5244,7 +5347,7 @@ function Ni({ value: e, selected: t, onChange: n = () => null, onSelect: r = ()
|
|
|
5244
5347
|
children: [
|
|
5245
5348
|
(s || a) && be,
|
|
5246
5349
|
xe,
|
|
5247
|
-
/* @__PURE__ */ W(
|
|
5350
|
+
/* @__PURE__ */ W(wt, {
|
|
5248
5351
|
variant: "error",
|
|
5249
5352
|
message: i ? i.getCurrentErrorMessage() ?? "" : S || "",
|
|
5250
5353
|
isVisible: me && (R || B)
|
|
@@ -5252,7 +5355,7 @@ function Ni({ value: e, selected: t, onChange: n = () => null, onSelect: r = ()
|
|
|
5252
5355
|
]
|
|
5253
5356
|
});
|
|
5254
5357
|
}
|
|
5255
|
-
var
|
|
5358
|
+
var Li = {
|
|
5256
5359
|
container: "container_krdsW",
|
|
5257
5360
|
"container-top-left": "container-top-left_zfDTO",
|
|
5258
5361
|
containerTopLeft: "container-top-left_zfDTO",
|
|
@@ -5291,14 +5394,14 @@ var Pi = {
|
|
|
5291
5394
|
toastContent: "toastContent_gvyIv",
|
|
5292
5395
|
toastCloseButton: "toastCloseButton_n-YST",
|
|
5293
5396
|
toastShrink: "toastShrink_h89HS"
|
|
5294
|
-
},
|
|
5397
|
+
}, Ri = {
|
|
5295
5398
|
info: C,
|
|
5296
5399
|
success: S,
|
|
5297
5400
|
error: w,
|
|
5298
|
-
warn:
|
|
5401
|
+
warn: H,
|
|
5299
5402
|
default: g
|
|
5300
5403
|
};
|
|
5301
|
-
function
|
|
5404
|
+
function zi({ item: e, isBottom: t, onDismiss: n }) {
|
|
5302
5405
|
let { id: r, content: i, options: a, dismissing: s } = e, { duration: c, showRemainingTime: l, showCloseButton: u, pauseOnHover: d, type: g, classNames: _, styles: v } = a, [y, b] = p(!1), [x, S] = p(!1), C = d && (y || x), w = f(c);
|
|
5303
5406
|
return o(() => {
|
|
5304
5407
|
if (c === 0 || C) return;
|
|
@@ -5312,7 +5415,7 @@ function Ii({ item: e, isBottom: t, onDismiss: n }) {
|
|
|
5312
5415
|
n,
|
|
5313
5416
|
C
|
|
5314
5417
|
]), /* @__PURE__ */ G("div", {
|
|
5315
|
-
className: m(
|
|
5418
|
+
className: m(Li.toast, t ? Li.toastBottom : null, Li[`toast-${g}`], s && Li.toastDismissing, C && Li.toastPaused, _?.root),
|
|
5316
5419
|
style: v?.root,
|
|
5317
5420
|
onMouseEnter: d ? () => b(!0) : void 0,
|
|
5318
5421
|
onMouseLeave: d ? () => b(!1) : void 0,
|
|
@@ -5320,24 +5423,24 @@ function Ii({ item: e, isBottom: t, onDismiss: n }) {
|
|
|
5320
5423
|
onBlur: d ? () => S(!1) : void 0,
|
|
5321
5424
|
children: [
|
|
5322
5425
|
/* @__PURE__ */ W(h, {
|
|
5323
|
-
icon:
|
|
5324
|
-
className: m(
|
|
5426
|
+
icon: Ri[g],
|
|
5427
|
+
className: m(Li.toastIcon, _?.icon),
|
|
5325
5428
|
style: v?.icon
|
|
5326
5429
|
}),
|
|
5327
5430
|
/* @__PURE__ */ W("div", {
|
|
5328
|
-
className: m(
|
|
5431
|
+
className: m(Li.toastContent, _?.content),
|
|
5329
5432
|
style: v?.content,
|
|
5330
5433
|
children: i
|
|
5331
5434
|
}),
|
|
5332
5435
|
u && /* @__PURE__ */ W(He, {
|
|
5333
5436
|
icon: ne,
|
|
5334
5437
|
onClick: () => n(r),
|
|
5335
|
-
className: m(
|
|
5438
|
+
className: m(Li.toastCloseButton, _?.closeButton),
|
|
5336
5439
|
style: v?.closeButton,
|
|
5337
5440
|
"aria-label": "Close"
|
|
5338
5441
|
}),
|
|
5339
5442
|
l && c > 0 && /* @__PURE__ */ W("div", {
|
|
5340
|
-
className: m(
|
|
5443
|
+
className: m(Li.toastProgressBar, _?.progressBar),
|
|
5341
5444
|
style: {
|
|
5342
5445
|
"--toast-duration": `${c}ms`,
|
|
5343
5446
|
...v?.progressBar
|
|
@@ -5348,41 +5451,41 @@ function Ii({ item: e, isBottom: t, onDismiss: n }) {
|
|
|
5348
5451
|
}
|
|
5349
5452
|
//#endregion
|
|
5350
5453
|
//#region package/common/toast/toastService.ts
|
|
5351
|
-
var
|
|
5352
|
-
function
|
|
5353
|
-
|
|
5454
|
+
var Bi = null;
|
|
5455
|
+
function Vi(e) {
|
|
5456
|
+
Bi = e;
|
|
5354
5457
|
}
|
|
5355
|
-
function
|
|
5356
|
-
|
|
5458
|
+
function Hi() {
|
|
5459
|
+
Bi = null;
|
|
5357
5460
|
}
|
|
5358
|
-
function
|
|
5359
|
-
if (!
|
|
5461
|
+
function Ui(e, t) {
|
|
5462
|
+
if (!Bi) {
|
|
5360
5463
|
console.error("[Toast] No ToastProvider found. Wrap your app with <ToastProvider>.");
|
|
5361
5464
|
return;
|
|
5362
5465
|
}
|
|
5363
|
-
|
|
5466
|
+
Bi(e, t);
|
|
5364
5467
|
}
|
|
5365
5468
|
//#endregion
|
|
5366
5469
|
//#region package/common/toast/toastProvider.tsx
|
|
5367
|
-
var
|
|
5470
|
+
var Wi = {
|
|
5368
5471
|
position: "top-right",
|
|
5369
5472
|
duration: 4e3,
|
|
5370
5473
|
showRemainingTime: !0,
|
|
5371
5474
|
showCloseButton: !0,
|
|
5372
5475
|
allowStacking: !0,
|
|
5373
5476
|
pauseOnHover: !0
|
|
5374
|
-
},
|
|
5375
|
-
function
|
|
5376
|
-
return
|
|
5477
|
+
}, Gi = 220;
|
|
5478
|
+
function Ki(e) {
|
|
5479
|
+
return Li[`container-${e}`];
|
|
5377
5480
|
}
|
|
5378
|
-
function
|
|
5481
|
+
function qi({ children: e, position: t = Wi.position, duration: n = Wi.duration, showRemainingTime: r = Wi.showRemainingTime, showCloseButton: i = Wi.showCloseButton, allowStacking: s = Wi.allowStacking, pauseOnHover: c = Wi.pauseOnHover }) {
|
|
5379
5482
|
let [l, u] = p([]), d = f(0), h = a((e) => {
|
|
5380
5483
|
u((t) => t.map((t) => t.id === e ? {
|
|
5381
5484
|
...t,
|
|
5382
5485
|
dismissing: !0
|
|
5383
5486
|
} : t)), setTimeout(() => {
|
|
5384
5487
|
u((t) => t.filter((t) => t.id !== e));
|
|
5385
|
-
},
|
|
5488
|
+
}, Gi);
|
|
5386
5489
|
}, []), g = a((e, a) => {
|
|
5387
5490
|
let o = {
|
|
5388
5491
|
position: a?.position ?? t,
|
|
@@ -5403,7 +5506,7 @@ function Wi({ children: e, position: t = Vi.position, duration: n = Vi.duration,
|
|
|
5403
5506
|
};
|
|
5404
5507
|
u((e) => !s && e.length > 0 ? (setTimeout(() => {
|
|
5405
5508
|
u([l]);
|
|
5406
|
-
},
|
|
5509
|
+
}, Gi), e.map((e) => ({
|
|
5407
5510
|
...e,
|
|
5408
5511
|
dismissing: !0
|
|
5409
5512
|
}))) : [...e, l]);
|
|
@@ -5415,14 +5518,14 @@ function Wi({ children: e, position: t = Vi.position, duration: n = Vi.duration,
|
|
|
5415
5518
|
s,
|
|
5416
5519
|
c
|
|
5417
5520
|
]);
|
|
5418
|
-
o(() => (
|
|
5521
|
+
o(() => (Vi(g), () => Hi()), [g]);
|
|
5419
5522
|
let _ = l.reduce((e, t) => {
|
|
5420
5523
|
let n = t.options.position;
|
|
5421
5524
|
return e[n] || (e[n] = []), e[n].push(t), e;
|
|
5422
5525
|
}, {});
|
|
5423
5526
|
return /* @__PURE__ */ G(ie, { children: [e, /* @__PURE__ */ W(et, { children: Object.entries(_).map(([e, t]) => /* @__PURE__ */ W("div", {
|
|
5424
|
-
className: m(
|
|
5425
|
-
children: t.map((t) => /* @__PURE__ */ W(
|
|
5527
|
+
className: m(Li.container, Ki(e)),
|
|
5528
|
+
children: t.map((t) => /* @__PURE__ */ W(zi, {
|
|
5426
5529
|
item: t,
|
|
5427
5530
|
isBottom: e.startsWith("bottom"),
|
|
5428
5531
|
onDismiss: h
|
|
@@ -5484,7 +5587,7 @@ var $ = {
|
|
|
5484
5587
|
};
|
|
5485
5588
|
//#endregion
|
|
5486
5589
|
//#region package/common/virtualList/virtualRow.tsx
|
|
5487
|
-
function
|
|
5590
|
+
function Ji({ index: e, top: t, padding: n, columnTemplate: r, isSelected: i, showDivider: a, hover: o, onClick: s, observer: c, ariaRowIndex: u, ariaPosInSet: d, ariaSetSize: p, rowRole: h, reorderable: g, draggable: _, isDragging: v, reserveToggleGutter: y, onMouseDown: b, onDragStart: x, onDragOver: S, onDragEnd: C, onDrop: w, onTouchStart: T, dropPosition: E, dropIndentPx: D, dropIndicatorClassName: O, dropIndicatorStyle: k, rowClassName: A, rowStyle: j, children: M }) {
|
|
5488
5591
|
let N = f(null);
|
|
5489
5592
|
return l(() => {
|
|
5490
5593
|
let e = N.current;
|
|
@@ -5534,7 +5637,7 @@ function Gi({ index: e, top: t, padding: n, columnTemplate: r, isSelected: i, sh
|
|
|
5534
5637
|
}
|
|
5535
5638
|
//#endregion
|
|
5536
5639
|
//#region package/common/virtualList/virtualList.utils.ts
|
|
5537
|
-
function
|
|
5640
|
+
function Yi(e, t, n, r = 0) {
|
|
5538
5641
|
let i = e.length, a = Array(i + 1);
|
|
5539
5642
|
a[0] = 0;
|
|
5540
5643
|
for (let o = 0; o < i; o++) {
|
|
@@ -5546,7 +5649,7 @@ function Ki(e, t, n, r = 0) {
|
|
|
5546
5649
|
totalHeight: a[i]
|
|
5547
5650
|
};
|
|
5548
5651
|
}
|
|
5549
|
-
function
|
|
5652
|
+
function Xi(e, t, n) {
|
|
5550
5653
|
if (n <= 0) return 0;
|
|
5551
5654
|
let r = 0, i = n - 1;
|
|
5552
5655
|
for (; r < i;) {
|
|
@@ -5555,34 +5658,34 @@ function qi(e, t, n) {
|
|
|
5555
5658
|
}
|
|
5556
5659
|
return r;
|
|
5557
5660
|
}
|
|
5558
|
-
function
|
|
5661
|
+
function Zi(e, t, n, r, i) {
|
|
5559
5662
|
if (i === 0) return {
|
|
5560
5663
|
startIndex: 0,
|
|
5561
5664
|
endIndex: -1
|
|
5562
5665
|
};
|
|
5563
|
-
let a =
|
|
5666
|
+
let a = Xi(e, t, i), o = a;
|
|
5564
5667
|
for (; o < i && e[o] < t + n;) o++;
|
|
5565
5668
|
return {
|
|
5566
5669
|
startIndex: Math.max(0, a - r),
|
|
5567
5670
|
endIndex: Math.min(i - 1, o + r - 1)
|
|
5568
5671
|
};
|
|
5569
5672
|
}
|
|
5570
|
-
function
|
|
5673
|
+
function Qi(e, t, n, r, i) {
|
|
5571
5674
|
if (e === -1 || e === t) return null;
|
|
5572
5675
|
let a = r + i / 2;
|
|
5573
5676
|
return (t > e ? n >= a : n <= a) ? t : null;
|
|
5574
5677
|
}
|
|
5575
|
-
function
|
|
5678
|
+
function $i(e, t, n, r) {
|
|
5576
5679
|
if (n <= 0) return "before";
|
|
5577
5680
|
let i = (e - t) / n;
|
|
5578
5681
|
return r ? i < 1 / 3 ? "before" : i > 2 / 3 ? "after" : "inside" : i < .5 ? "before" : "after";
|
|
5579
5682
|
}
|
|
5580
|
-
function
|
|
5683
|
+
function ea(e, t) {
|
|
5581
5684
|
let n = t[e], r = e + 1;
|
|
5582
5685
|
for (; r < t.length && t[r] > n;) r++;
|
|
5583
5686
|
return r - 1;
|
|
5584
5687
|
}
|
|
5585
|
-
function
|
|
5688
|
+
function ta(e, t) {
|
|
5586
5689
|
return e.length === 0 ? "1fr" : e.map((e) => {
|
|
5587
5690
|
switch (e.width.type) {
|
|
5588
5691
|
case "fixed": return `${e.width.px}px`;
|
|
@@ -5594,11 +5697,11 @@ function Qi(e, t) {
|
|
|
5594
5697
|
}
|
|
5595
5698
|
}).join(" ");
|
|
5596
5699
|
}
|
|
5597
|
-
var
|
|
5598
|
-
function
|
|
5700
|
+
var na = "ahroweui:virtuallist:columns:";
|
|
5701
|
+
function ra(e) {
|
|
5599
5702
|
if (!e || typeof window > "u") return null;
|
|
5600
5703
|
try {
|
|
5601
|
-
let t = window.localStorage.getItem(
|
|
5704
|
+
let t = window.localStorage.getItem(na + e);
|
|
5602
5705
|
if (!t) return null;
|
|
5603
5706
|
let n = JSON.parse(t);
|
|
5604
5707
|
if (n && Array.isArray(n.visible) && Array.isArray(n.known)) return {
|
|
@@ -5608,12 +5711,12 @@ function ea(e) {
|
|
|
5608
5711
|
} catch {}
|
|
5609
5712
|
return null;
|
|
5610
5713
|
}
|
|
5611
|
-
function
|
|
5714
|
+
function ia(e, t) {
|
|
5612
5715
|
return t && t.known.includes(e.key) ? t.visible.includes(e.key) : !e.defaultHidden;
|
|
5613
5716
|
}
|
|
5614
5717
|
//#endregion
|
|
5615
5718
|
//#region package/common/virtualList/useVirtualWindow.ts
|
|
5616
|
-
function
|
|
5719
|
+
function aa(e, t) {
|
|
5617
5720
|
if (typeof e == "number") return e;
|
|
5618
5721
|
let n = e.trim();
|
|
5619
5722
|
if (n === "") return 0;
|
|
@@ -5627,8 +5730,8 @@ function na(e, t) {
|
|
|
5627
5730
|
let o = a.getBoundingClientRect().height;
|
|
5628
5731
|
return t.removeChild(a), Number.isFinite(o) ? o : 0;
|
|
5629
5732
|
}
|
|
5630
|
-
function
|
|
5631
|
-
let [m, h] = p(0), [g, _] = p(0), [v, y] = p(0), [b, x] = p(() =>
|
|
5733
|
+
function oa({ items: e, keys: t, getItemKey: n, estimatedRowHeight: r, rowGap: i, overscan: s, onLoadMore: c, loadMoreThreshold: d }) {
|
|
5734
|
+
let [m, h] = p(0), [g, _] = p(0), [v, y] = p(0), [b, x] = p(() => aa(i, null)), [S, C] = p(/* @__PURE__ */ new Map()), [w, T] = p(!1), E = f(!1), D = f(null), O = f(null), k = f([]), A = f(null), j = f(0), M = f([]), [N] = p(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((e) => {
|
|
5632
5735
|
C((t) => {
|
|
5633
5736
|
let n = null;
|
|
5634
5737
|
for (let r of e) {
|
|
@@ -5664,14 +5767,14 @@ function ra({ items: e, keys: t, getItemKey: n, estimatedRowHeight: r, rowGap: i
|
|
|
5664
5767
|
}, []), l(() => {
|
|
5665
5768
|
M.current = t;
|
|
5666
5769
|
}), l(() => {
|
|
5667
|
-
let e =
|
|
5770
|
+
let e = aa(i, D.current);
|
|
5668
5771
|
x((t) => t === e ? t : e);
|
|
5669
5772
|
}, [
|
|
5670
5773
|
i,
|
|
5671
5774
|
v,
|
|
5672
5775
|
g
|
|
5673
5776
|
]);
|
|
5674
|
-
let { offsets: F, totalHeight: I } = u(() =>
|
|
5777
|
+
let { offsets: F, totalHeight: I } = u(() => Yi(t, S, r, b), [
|
|
5675
5778
|
t,
|
|
5676
5779
|
S,
|
|
5677
5780
|
r,
|
|
@@ -5682,7 +5785,7 @@ function ra({ items: e, keys: t, getItemKey: n, estimatedRowHeight: r, rowGap: i
|
|
|
5682
5785
|
if (k.current = F, !t || n.length === 0) return;
|
|
5683
5786
|
let r = t.scrollTop;
|
|
5684
5787
|
if (r <= 0) return;
|
|
5685
|
-
let i =
|
|
5788
|
+
let i = Xi(n, r, n.length - 1);
|
|
5686
5789
|
if (i >= e.length) return;
|
|
5687
5790
|
let a = r - n[i], o = F[i] + a;
|
|
5688
5791
|
Math.abs(o - r) > .5 && (t.scrollTop = o, j.current = o, h(o));
|
|
@@ -5718,7 +5821,7 @@ function ra({ items: e, keys: t, getItemKey: n, estimatedRowHeight: r, rowGap: i
|
|
|
5718
5821
|
e,
|
|
5719
5822
|
F,
|
|
5720
5823
|
n
|
|
5721
|
-
]), { startIndex: R, endIndex: z } = u(() =>
|
|
5824
|
+
]), { startIndex: R, endIndex: z } = u(() => Zi(F, m, g, s, e.length), [
|
|
5722
5825
|
F,
|
|
5723
5826
|
m,
|
|
5724
5827
|
g,
|
|
@@ -5743,7 +5846,7 @@ function ra({ items: e, keys: t, getItemKey: n, estimatedRowHeight: r, rowGap: i
|
|
|
5743
5846
|
}
|
|
5744
5847
|
//#endregion
|
|
5745
5848
|
//#region package/common/virtualList/useSelection.ts
|
|
5746
|
-
function
|
|
5849
|
+
function sa({ items: e, getKey: t, multiSelect: n, selectedKeys: r, onSelectionChange: i }) {
|
|
5747
5850
|
let a = r !== void 0, [o, s] = p(/* @__PURE__ */ new Set()), c = a ? r : o;
|
|
5748
5851
|
function l(e) {
|
|
5749
5852
|
a || s(e), i?.(e);
|
|
@@ -5782,10 +5885,10 @@ function ia({ items: e, getKey: t, multiSelect: n, selectedKeys: r, onSelectionC
|
|
|
5782
5885
|
}
|
|
5783
5886
|
//#endregion
|
|
5784
5887
|
//#region package/common/virtualList/useColumns.ts
|
|
5785
|
-
function
|
|
5888
|
+
function ca({ columns: e, items: t, multiSelect: n, visibleColumnKeys: r, onVisibleColumnsChange: i, persistColumnsKey: s, showColumnToggle: c, rootRef: u, startIndex: d, endIndex: m, containerHeight: h, containerWidth: g }) {
|
|
5786
5889
|
let _ = r !== void 0, [v, y] = p(!1), b = f(null), [x, S] = p({}), [C, w] = p(() => {
|
|
5787
|
-
let t =
|
|
5788
|
-
return new Set((e ?? []).filter((e) =>
|
|
5890
|
+
let t = ra(s);
|
|
5891
|
+
return new Set((e ?? []).filter((e) => ia(e, t)).map((e) => e.key));
|
|
5789
5892
|
}), T = f(new Set((e ?? []).map((e) => e.key)));
|
|
5790
5893
|
o(() => {
|
|
5791
5894
|
if (_) return;
|
|
@@ -5798,10 +5901,10 @@ function aa({ columns: e, items: t, multiSelect: n, visibleColumnKeys: r, onVisi
|
|
|
5798
5901
|
}
|
|
5799
5902
|
if (i) return;
|
|
5800
5903
|
T.current = n;
|
|
5801
|
-
let a =
|
|
5904
|
+
let a = ra(s);
|
|
5802
5905
|
w((e) => {
|
|
5803
5906
|
let n = /* @__PURE__ */ new Set();
|
|
5804
|
-
for (let i of t) r.has(i.key) ? e.has(i.key) && n.add(i.key) :
|
|
5907
|
+
for (let i of t) r.has(i.key) ? e.has(i.key) && n.add(i.key) : ia(i, a) && n.add(i.key);
|
|
5805
5908
|
return n;
|
|
5806
5909
|
});
|
|
5807
5910
|
}, [
|
|
@@ -5812,7 +5915,7 @@ function aa({ columns: e, items: t, multiSelect: n, visibleColumnKeys: r, onVisi
|
|
|
5812
5915
|
if (_ || !s || typeof window > "u") return;
|
|
5813
5916
|
let t = e ?? [];
|
|
5814
5917
|
if (!(t.length === 0 || C.size === 0)) try {
|
|
5815
|
-
window.localStorage.setItem(
|
|
5918
|
+
window.localStorage.setItem(na + s, JSON.stringify({
|
|
5816
5919
|
visible: [...C],
|
|
5817
5920
|
known: t.map((e) => e.key)
|
|
5818
5921
|
}));
|
|
@@ -5831,7 +5934,7 @@ function aa({ columns: e, items: t, multiSelect: n, visibleColumnKeys: r, onVisi
|
|
|
5831
5934
|
}
|
|
5832
5935
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
5833
5936
|
}, [v]);
|
|
5834
|
-
let D = !!e?.length, O = D ? e.filter((e) => E.has(e.key)) : [], k = D ? e.filter((e) => !e.defaultHidden && !E.has(e.key)).length : 0, A = D ? `${n && D ? "40px " : ""}${
|
|
5937
|
+
let D = !!e?.length, O = D ? e.filter((e) => E.has(e.key)) : [], k = D ? e.filter((e) => !e.defaultHidden && !E.has(e.key)).length : 0, A = D ? `${n && D ? "40px " : ""}${ta(O, x)}` : void 0, j = c !== !1 && D, M = O.filter((e) => e.width.type === "fit"), N = M.length > 0, P = M.map((e) => e.key).join("|"), [F, I] = p({
|
|
5835
5938
|
key: P,
|
|
5836
5939
|
items: t
|
|
5837
5940
|
});
|
|
@@ -5931,7 +6034,7 @@ function aa({ columns: e, items: t, multiSelect: n, visibleColumnKeys: r, onVisi
|
|
|
5931
6034
|
}
|
|
5932
6035
|
//#endregion
|
|
5933
6036
|
//#region package/common/virtualList/useRowDrag.ts
|
|
5934
|
-
function
|
|
6037
|
+
function la({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longPressDelay: i, dragHandle: s, treeIndentPx: c, keys: u, depths: d, isGroupAt: m, rootRef: h, keysRef: g }) {
|
|
5935
6038
|
let _ = f(null), [v, y] = p(null), [b, x] = p(null), S = f(null), C = f(n), w = f(r), T = f(t), E = f(d), D = f(m), O = f(!0), k = f(null), A = f(!1), j = f(null), M = f(0), N = f(0), P = f(null), F = f(!1), I = f(null), L = f(0), R = f(0), z = f(0), [B] = p(() => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)").matches : !1);
|
|
5936
6039
|
l(() => {
|
|
5937
6040
|
C.current = n, w.current = r, T.current = t, E.current = d, S.current = b, D.current = m;
|
|
@@ -5946,20 +6049,20 @@ function oa({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
5946
6049
|
}
|
|
5947
6050
|
_.current = e, y(e), t && x(null);
|
|
5948
6051
|
}
|
|
5949
|
-
function
|
|
6052
|
+
function H(e, t, n) {
|
|
5950
6053
|
let r = _.current;
|
|
5951
6054
|
if (r == null) return null;
|
|
5952
6055
|
let i = u.indexOf(r);
|
|
5953
|
-
if (i !== -1 && e >= i && e <=
|
|
5954
|
-
let a =
|
|
6056
|
+
if (i !== -1 && e >= i && e <= ea(i, d)) return null;
|
|
6057
|
+
let a = $i(t, n.top, n.height, m(e));
|
|
5955
6058
|
return {
|
|
5956
6059
|
key: u[e],
|
|
5957
6060
|
position: a
|
|
5958
6061
|
};
|
|
5959
6062
|
}
|
|
5960
|
-
function
|
|
6063
|
+
function te(e, t) {
|
|
5961
6064
|
t.preventDefault();
|
|
5962
|
-
let n = t.currentTarget.getBoundingClientRect(), r =
|
|
6065
|
+
let n = t.currentTarget.getBoundingClientRect(), r = H(e, t.clientY, n);
|
|
5963
6066
|
x((e) => e?.key === r?.key && e?.position === r?.position ? e : r);
|
|
5964
6067
|
}
|
|
5965
6068
|
function U() {
|
|
@@ -5976,7 +6079,7 @@ function oa({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
5976
6079
|
t.preventDefault();
|
|
5977
6080
|
let r = _.current;
|
|
5978
6081
|
if (r == null) return;
|
|
5979
|
-
let i = u.indexOf(r), a = t.currentTarget.getBoundingClientRect(), o =
|
|
6082
|
+
let i = u.indexOf(r), a = t.currentTarget.getBoundingClientRect(), o = Qi(i, e, t.clientY, a.top, a.height);
|
|
5980
6083
|
o != null && n?.(i, o);
|
|
5981
6084
|
}
|
|
5982
6085
|
function W() {
|
|
@@ -5992,18 +6095,18 @@ function oa({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
5992
6095
|
let s = g.current.indexOf(t), c = a.getBoundingClientRect();
|
|
5993
6096
|
if (T.current) {
|
|
5994
6097
|
let e = g.current, t = E.current;
|
|
5995
|
-
if (s !== -1 && o >= s && o <=
|
|
6098
|
+
if (s !== -1 && o >= s && o <= ea(s, t)) {
|
|
5996
6099
|
x(null);
|
|
5997
6100
|
return;
|
|
5998
6101
|
}
|
|
5999
|
-
let n =
|
|
6102
|
+
let n = $i(r, c.top, c.height, D.current(o)), i = {
|
|
6000
6103
|
key: e[o],
|
|
6001
6104
|
position: n
|
|
6002
6105
|
};
|
|
6003
6106
|
x((e) => e?.key === i.key && e?.position === i.position ? e : i);
|
|
6004
6107
|
return;
|
|
6005
6108
|
}
|
|
6006
|
-
let l =
|
|
6109
|
+
let l = Qi(s, o, r, c.top, c.height);
|
|
6007
6110
|
l != null && C.current?.(s, l);
|
|
6008
6111
|
}, [h, g]), K = a(() => {
|
|
6009
6112
|
let e = I.current;
|
|
@@ -6075,7 +6178,7 @@ function oa({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
6075
6178
|
isDragging: J && r === v,
|
|
6076
6179
|
onMouseDown: J && s ? V : void 0,
|
|
6077
6180
|
onDragStart: J ? (e) => ee(r, e) : void 0,
|
|
6078
|
-
onDragOver: t ? (e) =>
|
|
6181
|
+
onDragOver: t ? (e) => te(n, e) : e ? (e) => ie(n, e) : void 0,
|
|
6079
6182
|
onDragEnd: t ? re : e ? W : void 0,
|
|
6080
6183
|
onDrop: t ? ne : void 0,
|
|
6081
6184
|
onTouchStart: J ? (e) => se(r, e) : void 0,
|
|
@@ -6095,8 +6198,8 @@ function oa({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
6095
6198
|
}
|
|
6096
6199
|
//#endregion
|
|
6097
6200
|
//#region package/common/virtualList/virtualList.tsx
|
|
6098
|
-
function
|
|
6099
|
-
let
|
|
6201
|
+
function ua({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedRowHeight: i = 40, overscan: o = 3, rowGap: s = 0, rowPadding: l, selectedKey: d, getItemKey: f, onRowClick: p, visibleColumnKeys: g, onVisibleColumnsChange: _, persistColumnsKey: v, showColumnToggle: y, onLoadMore: b, loadMoreThreshold: x = 100, isLoading: S = !1, multiSelect: C = !1, selectedKeys: w, onSelectionChange: T, reorderable: E = !1, onReorder: D, longPressDelay: O = 400, treeReorder: k = !1, getItemDepth: A, isGroup: j, onTreeDrop: N, treeIndentPx: P = 24, dragHandle: F = !1, showDivider: I = !0, rowHover: L = !0, className: R, style: z, classNames: B, styles: V, ...ee }, H) {
|
|
6202
|
+
let te = a((e, t) => f ? f(e, t) : t, [f]), U = u(() => e.map((e, t) => te(e, t)), [e, te]), ne = u(() => A ? e.map((e, t) => A(e, t)) : [], [e, A]), re = a((t) => j ? j(e[t], t) : !1, [j, e]), K = oa({
|
|
6100
6203
|
items: e,
|
|
6101
6204
|
keys: U,
|
|
6102
6205
|
getItemKey: f,
|
|
@@ -6105,13 +6208,13 @@ function sa({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
6105
6208
|
overscan: o,
|
|
6106
6209
|
onLoadMore: b,
|
|
6107
6210
|
loadMoreThreshold: x
|
|
6108
|
-
}), { rootRef: ae, headerRef: oe, rowObserver: q, keysRef: se, offsets: ce, totalHeight: J, startIndex: le, endIndex: ue } = K, de =
|
|
6211
|
+
}), { rootRef: ae, headerRef: oe, rowObserver: q, keysRef: se, offsets: ce, totalHeight: J, startIndex: le, endIndex: ue } = K, de = sa({
|
|
6109
6212
|
items: e,
|
|
6110
|
-
getKey:
|
|
6213
|
+
getKey: te,
|
|
6111
6214
|
multiSelect: C,
|
|
6112
6215
|
selectedKeys: w,
|
|
6113
6216
|
onSelectionChange: T
|
|
6114
|
-
}), { effectiveSelectedKeys: fe } = de, { hasColumns: pe, visibleColumns: me, columnTemplate: he, shouldShowToggle: ge, effectiveVisible: _e, manuallyHiddenCount: ve, toggleOpen: ye, setToggleOpen: be, toggleRef: xe, handleToggleColumn: Se, recalculateColumns: Ce } =
|
|
6217
|
+
}), { effectiveSelectedKeys: fe } = de, { hasColumns: pe, visibleColumns: me, columnTemplate: he, shouldShowToggle: ge, effectiveVisible: _e, manuallyHiddenCount: ve, toggleOpen: ye, setToggleOpen: be, toggleRef: xe, handleToggleColumn: Se, recalculateColumns: Ce } = ca({
|
|
6115
6218
|
columns: n,
|
|
6116
6219
|
items: e,
|
|
6117
6220
|
multiSelect: C,
|
|
@@ -6125,11 +6228,11 @@ function sa({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
6125
6228
|
containerHeight: K.containerHeight,
|
|
6126
6229
|
containerWidth: K.containerWidth
|
|
6127
6230
|
});
|
|
6128
|
-
c(
|
|
6231
|
+
c(H, () => ({
|
|
6129
6232
|
...K.scrollApi,
|
|
6130
6233
|
recalculateColumns: Ce
|
|
6131
6234
|
}), [K.scrollApi, Ce]);
|
|
6132
|
-
let we =
|
|
6235
|
+
let we = la({
|
|
6133
6236
|
reorderable: E,
|
|
6134
6237
|
treeReorder: k,
|
|
6135
6238
|
onReorder: D,
|
|
@@ -6143,8 +6246,8 @@ function sa({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
6143
6246
|
rootRef: ae,
|
|
6144
6247
|
keysRef: se
|
|
6145
6248
|
}), Te = typeof l == "number" ? `${l}px` : l, Ee = (n) => {
|
|
6146
|
-
let r = e[n], i =
|
|
6147
|
-
return /* @__PURE__ */ W(
|
|
6249
|
+
let r = e[n], i = te(r, n), a = d != null && i === d || fe.has(i), o = we.getRowDragProps(n, i);
|
|
6250
|
+
return /* @__PURE__ */ W(Ji, {
|
|
6148
6251
|
index: n,
|
|
6149
6252
|
top: ce[n],
|
|
6150
6253
|
padding: Te,
|
|
@@ -6285,7 +6388,7 @@ function sa({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
6285
6388
|
]
|
|
6286
6389
|
});
|
|
6287
6390
|
}
|
|
6288
|
-
var
|
|
6391
|
+
var da = e.forwardRef(ua), fa = {
|
|
6289
6392
|
wizard: "wizard_uRBAN",
|
|
6290
6393
|
"wizard-content": "wizard-content_lcl4C",
|
|
6291
6394
|
wizardContent: "wizard-content_lcl4C",
|
|
@@ -6296,7 +6399,7 @@ var ca = e.forwardRef(sa), la = {
|
|
|
6296
6399
|
};
|
|
6297
6400
|
//#endregion
|
|
6298
6401
|
//#region package/common/wizard/wizard.tsx
|
|
6299
|
-
function
|
|
6402
|
+
function pa({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null, className: r, style: i, classNames: a, styles: s, ...c }) {
|
|
6300
6403
|
let [l, u] = p(void 0), [d, h] = p(!1), [g, _] = p(e), v = f([]), y = f(null);
|
|
6301
6404
|
e !== g && (_(e), h(!0)), o(() => {
|
|
6302
6405
|
if (!d) return;
|
|
@@ -6316,10 +6419,10 @@ function ua({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null,
|
|
|
6316
6419
|
};
|
|
6317
6420
|
return /* @__PURE__ */ W("div", {
|
|
6318
6421
|
...c,
|
|
6319
|
-
className: m(
|
|
6422
|
+
className: m(fa.wizard, a?.root, r),
|
|
6320
6423
|
style: b,
|
|
6321
6424
|
children: /* @__PURE__ */ W("div", {
|
|
6322
|
-
className: m(
|
|
6425
|
+
className: m(fa.wizardContentContainer, a?.container),
|
|
6323
6426
|
style: {
|
|
6324
6427
|
width: `${t * 100}%`,
|
|
6325
6428
|
marginLeft: `-${e * 100}%`,
|
|
@@ -6329,14 +6432,14 @@ function ua({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null,
|
|
|
6329
6432
|
ref: (e) => {
|
|
6330
6433
|
v.current[i] = e;
|
|
6331
6434
|
},
|
|
6332
|
-
className: m(
|
|
6435
|
+
className: m(fa.wizardContent, a?.step),
|
|
6333
6436
|
style: {
|
|
6334
6437
|
width: `${100 / t}%`,
|
|
6335
6438
|
marginLeft: `${100 / t * i}%`,
|
|
6336
6439
|
...s?.step
|
|
6337
6440
|
},
|
|
6338
6441
|
children: /* @__PURE__ */ W("div", {
|
|
6339
|
-
className: m({ [
|
|
6442
|
+
className: m({ [fa.wizardContentOutOfFrame]: e !== i && !d }, a?.stepContent),
|
|
6340
6443
|
style: s?.stepContent,
|
|
6341
6444
|
inert: e === i ? void 0 : !0,
|
|
6342
6445
|
children: n(i)
|
|
@@ -6347,20 +6450,20 @@ function ua({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null,
|
|
|
6347
6450
|
}
|
|
6348
6451
|
//#endregion
|
|
6349
6452
|
//#region package/services/formValidation/formValidatorGroup.ts
|
|
6350
|
-
function
|
|
6453
|
+
function ma(e) {
|
|
6351
6454
|
let t = e;
|
|
6352
6455
|
return t?.errors && Array.isArray(t.errors) ? t.errors.flatMap((e) => Object.entries(e).map(([e, t]) => ({
|
|
6353
6456
|
id: e,
|
|
6354
6457
|
message: t
|
|
6355
6458
|
}))) : [];
|
|
6356
6459
|
}
|
|
6357
|
-
var
|
|
6460
|
+
var ha = class {
|
|
6358
6461
|
#e;
|
|
6359
6462
|
#t;
|
|
6360
6463
|
#n;
|
|
6361
6464
|
#r;
|
|
6362
6465
|
#i;
|
|
6363
|
-
constructor(e, t = null, { initialValues: n, onSubmit: r = () => void 0, onValidate: i = () => void 0, errorParser: a =
|
|
6466
|
+
constructor(e, t = null, { initialValues: n, onSubmit: r = () => void 0, onValidate: i = () => void 0, errorParser: a = ma, onSubmitError: o = () => void 0 } = {}) {
|
|
6364
6467
|
this.#t = !1, this.#i = [], this.getFormError = () => {
|
|
6365
6468
|
let e = Object.keys(this.group);
|
|
6366
6469
|
for (let t = 0; t < e.length; t += 1) {
|
|
@@ -6450,7 +6553,7 @@ var fa = class {
|
|
|
6450
6553
|
};
|
|
6451
6554
|
//#endregion
|
|
6452
6555
|
//#region package/services/formValidation/FormValidatorGroupForm.tsx
|
|
6453
|
-
function
|
|
6556
|
+
function ga(e) {
|
|
6454
6557
|
return function({ children: t, ...n }) {
|
|
6455
6558
|
return /* @__PURE__ */ W("form", {
|
|
6456
6559
|
onSubmit: e.submit,
|
|
@@ -6462,16 +6565,16 @@ function pa(e) {
|
|
|
6462
6565
|
}
|
|
6463
6566
|
//#endregion
|
|
6464
6567
|
//#region package/services/formValidation/FormValidatorGroupWithForm.tsx
|
|
6465
|
-
var
|
|
6466
|
-
|
|
6467
|
-
},
|
|
6568
|
+
var _a = (e) => {
|
|
6569
|
+
Ui(e[0].message, { type: "error" });
|
|
6570
|
+
}, va = class extends ha {
|
|
6468
6571
|
constructor(e, t = null, n) {
|
|
6469
6572
|
super(e, t, {
|
|
6470
6573
|
...n,
|
|
6471
|
-
onSubmitError: n?.onSubmitError ??
|
|
6472
|
-
}), this.Form =
|
|
6574
|
+
onSubmitError: n?.onSubmitError ?? _a
|
|
6575
|
+
}), this.Form = ga(this);
|
|
6473
6576
|
}
|
|
6474
|
-
},
|
|
6577
|
+
}, ya = class {
|
|
6475
6578
|
#e;
|
|
6476
6579
|
#t;
|
|
6477
6580
|
#n;
|
|
@@ -6525,44 +6628,44 @@ var ma = (e) => {
|
|
|
6525
6628
|
return this.#r;
|
|
6526
6629
|
}
|
|
6527
6630
|
};
|
|
6528
|
-
|
|
6631
|
+
ya.prototype.toString = function() {
|
|
6529
6632
|
return `${this.value}`;
|
|
6530
6633
|
};
|
|
6531
6634
|
//#endregion
|
|
6532
6635
|
//#region package/services/regexp.ts
|
|
6533
|
-
function
|
|
6636
|
+
function ba(e) {
|
|
6534
6637
|
return /^[0-9]+$/.test(e);
|
|
6535
6638
|
}
|
|
6536
|
-
function
|
|
6639
|
+
function xa(e) {
|
|
6537
6640
|
return /^[0-9]{2}.[0-9]{2}.[0-9]{4}$/.test(e);
|
|
6538
6641
|
}
|
|
6539
|
-
function
|
|
6642
|
+
function Sa(e) {
|
|
6540
6643
|
return /^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z$/.test(e);
|
|
6541
6644
|
}
|
|
6542
|
-
function
|
|
6645
|
+
function Ca(e) {
|
|
6543
6646
|
return /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-ZöäüÜÖÄß\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e);
|
|
6544
6647
|
}
|
|
6545
|
-
function
|
|
6648
|
+
function wa(e) {
|
|
6546
6649
|
return /^[A-Z]{6}[A-Z\d]{2}([A-Z\d]{3})?$/.test(e);
|
|
6547
6650
|
}
|
|
6548
|
-
function
|
|
6651
|
+
function Ta(e) {
|
|
6549
6652
|
return /[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}(\/[-a-zA-Z0-9@:%_+.~#?&//=]*)?$/.test(e);
|
|
6550
6653
|
}
|
|
6551
|
-
function
|
|
6654
|
+
function Ea(e) {
|
|
6552
6655
|
return /^[\w!@#$%^&*?±§~`'"/\\[\]{}\-,.();:><+=|öäüÖÄÜß €μ]{8,}$/.test(e);
|
|
6553
6656
|
}
|
|
6554
|
-
function
|
|
6657
|
+
function Da(e) {
|
|
6555
6658
|
return /^(?=.*[a-zöäüA-ZÖÄÜß])/.test(e);
|
|
6556
6659
|
}
|
|
6557
|
-
function
|
|
6660
|
+
function Oa(e) {
|
|
6558
6661
|
return /^(?=.*\d)/.test(e);
|
|
6559
6662
|
}
|
|
6560
|
-
function
|
|
6561
|
-
return
|
|
6663
|
+
function ka(e) {
|
|
6664
|
+
return Ea(e) && Da(e) && Oa(e);
|
|
6562
6665
|
}
|
|
6563
6666
|
//#endregion
|
|
6564
6667
|
//#region package/services/formValidation/validators.ts
|
|
6565
|
-
var
|
|
6668
|
+
var Aa = { t: (e, t) => ({
|
|
6566
6669
|
"formValidators.minLength": `Must be at least ${t?.min} characters long`,
|
|
6567
6670
|
"formValidators.maxLength": `Must be at most ${t?.max} characters long`,
|
|
6568
6671
|
"formValidators.email": "Must be a valid email address",
|
|
@@ -6577,23 +6680,23 @@ var Da = { t: (e, t) => ({
|
|
|
6577
6680
|
"garages.errors.bic": "Must be a valid BIC",
|
|
6578
6681
|
"formValidators.minLetters": `Must contain at least ${t?.smart_count} letters`,
|
|
6579
6682
|
"formValidators.minDigits": `Must contain at least ${t?.smart_count} digits`
|
|
6580
|
-
})[e] || e },
|
|
6683
|
+
})[e] || e }, ja = class e {
|
|
6581
6684
|
static {
|
|
6582
6685
|
this.minLength = (e, t) => (n) => !n || n.length < e ? {
|
|
6583
6686
|
id: "minLength",
|
|
6584
|
-
message: t ||
|
|
6687
|
+
message: t || Aa.t("formValidators.minLength", { min: e })
|
|
6585
6688
|
} : null;
|
|
6586
6689
|
}
|
|
6587
6690
|
static {
|
|
6588
6691
|
this.maxLength = (e, t) => (n) => n && n.length > e ? {
|
|
6589
6692
|
id: "maxLength",
|
|
6590
|
-
message: t ||
|
|
6693
|
+
message: t || Aa.t("formValidators.maxLength", { max: e })
|
|
6591
6694
|
} : null;
|
|
6592
6695
|
}
|
|
6593
6696
|
static {
|
|
6594
|
-
this.email = (e) => (t) => t && !
|
|
6697
|
+
this.email = (e) => (t) => t && !Ca(t) ? {
|
|
6595
6698
|
id: "email",
|
|
6596
|
-
message: e ||
|
|
6699
|
+
message: e || Aa.t("formValidators.email")
|
|
6597
6700
|
} : null;
|
|
6598
6701
|
}
|
|
6599
6702
|
static {
|
|
@@ -6601,7 +6704,7 @@ var Da = { t: (e, t) => ({
|
|
|
6601
6704
|
function t(t, n) {
|
|
6602
6705
|
return !t && t !== 0 ? {
|
|
6603
6706
|
id: "required",
|
|
6604
|
-
message: e ||
|
|
6707
|
+
message: e || Aa.t("formValidators.required", { label: n || Aa.t("formValidators.value") })
|
|
6605
6708
|
} : null;
|
|
6606
6709
|
}
|
|
6607
6710
|
return t.validatorId = "required", t;
|
|
@@ -6610,13 +6713,13 @@ var Da = { t: (e, t) => ({
|
|
|
6610
6713
|
static {
|
|
6611
6714
|
this.mustBeNumber = (e) => (t) => t && Number.isNaN(+t) ? {
|
|
6612
6715
|
id: "mustBeNumber",
|
|
6613
|
-
message: e ||
|
|
6716
|
+
message: e || Aa.t("formValidators.mustBeNumber")
|
|
6614
6717
|
} : null;
|
|
6615
6718
|
}
|
|
6616
6719
|
static {
|
|
6617
6720
|
this.oneOf = (e, t) => (n) => n && !e.includes(n) ? {
|
|
6618
6721
|
id: "oneOf",
|
|
6619
|
-
message: t ||
|
|
6722
|
+
message: t || Aa.t("formValidators.oneOf", { allowedValues: e })
|
|
6620
6723
|
} : null;
|
|
6621
6724
|
}
|
|
6622
6725
|
static {
|
|
@@ -6634,48 +6737,48 @@ var Da = { t: (e, t) => ({
|
|
|
6634
6737
|
this.multiEmail = (e) => (t) => {
|
|
6635
6738
|
if (t) {
|
|
6636
6739
|
let n = t.replace(/ /g, "").replace(/,/g, ";").split(";");
|
|
6637
|
-
for (let t = 0; t < n.length; t += 1) if (!
|
|
6740
|
+
for (let t = 0; t < n.length; t += 1) if (!Ca(n[t])) return {
|
|
6638
6741
|
id: "multiEmail",
|
|
6639
|
-
message: e ||
|
|
6742
|
+
message: e || Aa.t("formValidators.multiEmail")
|
|
6640
6743
|
};
|
|
6641
6744
|
}
|
|
6642
6745
|
return null;
|
|
6643
6746
|
};
|
|
6644
6747
|
}
|
|
6645
6748
|
static {
|
|
6646
|
-
this.date = (e) => (t) => t && !
|
|
6749
|
+
this.date = (e) => (t) => t && !xa(t) && !Sa(t) ? {
|
|
6647
6750
|
id: "date",
|
|
6648
|
-
message: e ||
|
|
6751
|
+
message: e || Aa.t("formValidators.date")
|
|
6649
6752
|
} : null;
|
|
6650
6753
|
}
|
|
6651
6754
|
static {
|
|
6652
6755
|
this.dateObject = (e) => (t) => t && !t.isValid ? {
|
|
6653
6756
|
id: "date",
|
|
6654
|
-
message: e ||
|
|
6757
|
+
message: e || Aa.t("formValidators.date")
|
|
6655
6758
|
} : null;
|
|
6656
6759
|
}
|
|
6657
6760
|
static {
|
|
6658
|
-
this.website = (e) => (t) => t && !
|
|
6761
|
+
this.website = (e) => (t) => t && !Ta(t) ? {
|
|
6659
6762
|
id: "website",
|
|
6660
|
-
message: e ||
|
|
6763
|
+
message: e || Aa.t("garages.errors.website")
|
|
6661
6764
|
} : null;
|
|
6662
6765
|
}
|
|
6663
6766
|
static {
|
|
6664
|
-
this.bic = (e) => (t) => t && !
|
|
6767
|
+
this.bic = (e) => (t) => t && !wa(t) ? {
|
|
6665
6768
|
id: "bic",
|
|
6666
|
-
message: e ||
|
|
6769
|
+
message: e || Aa.t("garages.errors.bic")
|
|
6667
6770
|
} : null;
|
|
6668
6771
|
}
|
|
6669
6772
|
static {
|
|
6670
6773
|
this.minLetters = (e, t) => (n) => n && n.replace(/[^a-zöäüA-ZÖÄÜß]/g, "").length < e ? {
|
|
6671
6774
|
id: "minLetters",
|
|
6672
|
-
message: t ||
|
|
6775
|
+
message: t || Aa.t("formValidators.minLetters", { smart_count: e })
|
|
6673
6776
|
} : null;
|
|
6674
6777
|
}
|
|
6675
6778
|
static {
|
|
6676
6779
|
this.minDigits = (e, t) => (n) => n && n.replace(/[\D]/g, "").length < e ? {
|
|
6677
6780
|
id: "minDigits",
|
|
6678
|
-
message: t ||
|
|
6781
|
+
message: t || Aa.t("formValidators.minDigits", { smart_count: e })
|
|
6679
6782
|
} : null;
|
|
6680
6783
|
}
|
|
6681
6784
|
static {
|
|
@@ -6687,7 +6790,7 @@ var Da = { t: (e, t) => ({
|
|
|
6687
6790
|
} : r : null;
|
|
6688
6791
|
};
|
|
6689
6792
|
}
|
|
6690
|
-
},
|
|
6793
|
+
}, Ma = class extends r {
|
|
6691
6794
|
static {
|
|
6692
6795
|
this.defaultProps = {
|
|
6693
6796
|
formValidator: null,
|
|
@@ -6750,7 +6853,7 @@ var Da = { t: (e, t) => ({
|
|
|
6750
6853
|
}
|
|
6751
6854
|
renderTooltip() {
|
|
6752
6855
|
let { errorMessage: e, formValidator: t } = this.props, { isHovered: n, isFocused: r } = this.state;
|
|
6753
|
-
return /* @__PURE__ */ W(
|
|
6856
|
+
return /* @__PURE__ */ W(wt, {
|
|
6754
6857
|
variant: "error",
|
|
6755
6858
|
message: t ? t.getCurrentErrorMessage() : e || "",
|
|
6756
6859
|
isVisible: this.hasError() && (r || n)
|
|
@@ -6767,7 +6870,7 @@ var Da = { t: (e, t) => ({
|
|
|
6767
6870
|
};
|
|
6768
6871
|
//#endregion
|
|
6769
6872
|
//#region package/services/formValidation/useFormValidator.ts
|
|
6770
|
-
function
|
|
6873
|
+
function Na(e) {
|
|
6771
6874
|
let [, t] = d((e) => e + 1, 0);
|
|
6772
6875
|
return o(() => {
|
|
6773
6876
|
if (e) return e.registerOnUpdateListener(t), () => e.removeOnUpdateListener(t);
|
|
@@ -6775,9 +6878,9 @@ function Aa(e) {
|
|
|
6775
6878
|
}
|
|
6776
6879
|
//#endregion
|
|
6777
6880
|
//#region package/services/formValidation/useFormValidatorGroup.ts
|
|
6778
|
-
function
|
|
6881
|
+
function Pa(e, { initialValues: t, onSubmit: n, onValidate: r, errorParser: i, onSubmitError: a } = {}) {
|
|
6779
6882
|
let [, s] = d((e) => e + 1, 0), c = f(null);
|
|
6780
|
-
c.current ||= new
|
|
6883
|
+
c.current ||= new va(e, null, {
|
|
6781
6884
|
initialValues: t,
|
|
6782
6885
|
errorParser: i,
|
|
6783
6886
|
onSubmitError: a
|
|
@@ -6786,6 +6889,6 @@ function ja(e, { initialValues: t, onSubmit: n, onValidate: r, errorParser: i, o
|
|
|
6786
6889
|
return u.current = n, p.current = r, o(() => (n !== void 0 && (l.onSubmitCallback = (...e) => u.current?.(...e)), r !== void 0 && (l.onValidateCallback = (...e) => p.current?.(...e)), l.registerOnUpdateListener(s), () => l.removeOnUpdateListener(s)), []), l;
|
|
6787
6890
|
}
|
|
6788
6891
|
//#endregion
|
|
6789
|
-
export { Ce as Accordion, ve as AccordionStyleType, Le as ActionButtons, He as ActionIcon,
|
|
6892
|
+
export { Ce as Accordion, ve as AccordionStyleType, Le as ActionButtons, He as ActionIcon, bt as Align, Qe as Avatar, $e as AvatarGroup, Je as Badge, We as BadgePosition, Ue as BadgeStyleType, et as BodyEnd, Ie as Button, Ae as ButtonSize, ke as ButtonStyleType, je as ButtonType, it as Card, ct as CardActions, st as CardContent, at as CardHeader, ot as CardMedia, tt as CardStyleType, ut as Checkbox, mt as Chip, ht as ChipContainer, dt as ChipStyleType, Lt as ColorPicker, Bt as ConfirmModal, hn as DatePicker, _n as Drawer, wn as DropZone, vn as DropZoneReturnType, Z as DropZoneStatus, pn as Dropdown, En as EmptyState, jn as Fab, St as FloatingMenu, ya as FormValidator, va as FormValidatorGroup, ir as IconLoading, Fn as IconPicker, Ln as IdleManager, fn as InfiniteBlock, Et as Input, Vn as InputDropdown, Tt as InputType, Be as InteractableDiv, Gn as KanbanBoard, Wn as KanbanColumn, tr as KlipyPicker, zt as Modal, sr as NumberInput, lr as OptionPicker, pr as Overscroll, gr as ProgressBar, Ne as Ripple, Ur as RoomDrawer, Gr as RoomViewer, Jr as ScrollbarProvider, Yn as SearchInput, ei as Skeleton, Xr as SkeletonAnimation, Yr as SkeletonVariant, Oe as SpinnerLoading, ri as Stepper, ai as Sticky, si as Switch, li as TabHeader, ui as Textarea, pi as ThemeProvider, Ii as TimeInput, qi as ToastProvider, wt as Tooltip, Ma as ValidatableComponent, ja as Validators, da as VirtualList, pa as Wizard, di as defaultTheme, Jt as getLocale, Ea as hasEightPasswordChars, Oa as hasOnePasswordDigit, Da as hasOnePasswordLetter, wa as isBic, xa as isDate, Ca as isEmail, Sa as isISODate, ba as isNumber, ka as isPassword, Ta as isURL, Gt as mapLocale, qt as setLocale, Ui as showToast, Na as useFormValidator, Pa as useFormValidatorGroup, mi as useTheme };
|
|
6790
6893
|
|
|
6791
6894
|
//# sourceMappingURL=index.mjs.map
|