@ahrowe/ui 0.1.13 → 0.1.14
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 +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +253 -247
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/package/common/virtualList/virtualList.types.d.ts +6 -0
- package/dist/types/package/common/virtualList/virtualRow.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import e, { Component as t, PureComponent as n, forwardRef as r, useCallback as i, useEffect as a, useImperativeHandle as o, useLayoutEffect as s, useMemo as c, useReducer as l, useRef as u, useState as d } from "react";
|
|
2
2
|
import f from "classnames";
|
|
3
3
|
import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
|
|
4
|
-
import { faBell as m, faCheck as h, faChevronDown as g, faChevronLeft as _, faChevronRight as v, faChevronUp as y, faCircleCheck as b, faCircleInfo as x, faCircleXmark as S, faDoorOpen as C, faDownload as w, faDrawPolygon as T, faEnvelope as E, faEye as D, faEyeSlash as O, faGear as k, faHandPointer as A, faLayerGroup as j, faMagnifyingGlassMinus as M, faMagnifyingGlassPlus as N, faPen as P, faPhone as F, faPlus as I, faSearch as
|
|
4
|
+
import { faBell as m, faCheck as h, faChevronDown as g, faChevronLeft as _, faChevronRight as v, faChevronUp as y, faCircleCheck as b, faCircleInfo as x, faCircleXmark as S, faDoorOpen as C, faDownload as w, faDrawPolygon as T, faEnvelope as E, faEye as D, faEyeSlash as O, faGear as k, faHandPointer as A, faLayerGroup as j, faMagnifyingGlassMinus as M, faMagnifyingGlassPlus as N, faPen as P, faPhone as F, faPlus as I, faSearch as ee, faSquare as L, faTrash as R, faTriangleExclamation as te, faUpload as ne, faXmark as z, faXmarkCircle as re } from "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
6
6
|
import { createPortal as ie } from "react-dom";
|
|
7
7
|
import ae from "downshift";
|
|
8
8
|
import oe from "@mona-health/react-input-mask";
|
|
9
|
-
import { DndContext as
|
|
10
|
-
import { SortableContext as
|
|
9
|
+
import { DndContext as U, DragOverlay as se, PointerSensor as W, closestCorners as ce, useDroppable as le, useSensor as G, useSensors as K } from "@dnd-kit/core";
|
|
10
|
+
import { SortableContext as q, arrayMove as ue, useSortable as de, verticalListSortingStrategy as fe } from "@dnd-kit/sortable";
|
|
11
11
|
import { CSS as pe } from "@dnd-kit/utilities";
|
|
12
12
|
import { NumericFormat as me } from "react-number-format";
|
|
13
13
|
//#region package/common/accordion/accordion.types.ts
|
|
@@ -840,11 +840,11 @@ var Y = {
|
|
|
840
840
|
}({});
|
|
841
841
|
//#endregion
|
|
842
842
|
//#region package/common/input/input.tsx
|
|
843
|
-
function rt({ name: t = "", label: n = "", errorMessage: r = "", isValid: o = !0, className: s = "", style: c, value: l = "", icon: m = null, onChange: h = () => {}, onFocus: g = null, onBlur: _ = null, onMouseEnter: v = null, onMouseLeave: y = null, isUppercase: b = !1, isRequired: x = !1, tabIndex: S = 0, type: C = void 0, isRow: w = !1, onIconClick: T = null, parse: k = null, formValidator: A = null, autoFocus: j = !1, suffix: M = null, upperRightLabel: N = null, labelInBorder: I = !1, showCancel:
|
|
844
|
-
let [
|
|
843
|
+
function rt({ name: t = "", label: n = "", errorMessage: r = "", isValid: o = !0, className: s = "", style: c, value: l = "", icon: m = null, onChange: h = () => {}, onFocus: g = null, onBlur: _ = null, onMouseEnter: v = null, onMouseLeave: y = null, isUppercase: b = !1, isRequired: x = !1, tabIndex: S = 0, type: C = void 0, isRow: w = !1, onIconClick: T = null, parse: k = null, formValidator: A = null, autoFocus: j = !1, suffix: M = null, upperRightLabel: N = null, labelInBorder: I = !1, showCancel: L = !1, onClearClicked: R, min: te = null, max: ne = null, placeholder: re = "", useMatLabelStyle: B = !0, autoComplete: ie = null, onClick: ae = () => null, readOnly: oe = !1, customInput: U, alwaysShowCancel: se = !1, multiline: W = !1, rows: ce, autoResize: le = !1, classNames: G, styles: K, disabled: q = !1, ...ue }) {
|
|
844
|
+
let [de, fe] = d(!1), [pe, me] = d(!1), [he, ge] = d(!1), [, _e] = d(0), ve = u(null), ye = u(A), be = i(() => {
|
|
845
845
|
let e = ve.current;
|
|
846
|
-
!e || !
|
|
847
|
-
}, [
|
|
846
|
+
!e || !le || (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
847
|
+
}, [le]);
|
|
848
848
|
a(() => {
|
|
849
849
|
setTimeout(() => {
|
|
850
850
|
fe(!1), me(!1);
|
|
@@ -887,18 +887,18 @@ function rt({ name: t = "", label: n = "", errorMessage: r = "", isValid: o = !0
|
|
|
887
887
|
onClick: () => ge(!he)
|
|
888
888
|
}, Me = xe(), Ne = n;
|
|
889
889
|
Ne && J() && (Ne = `${Ne} *`);
|
|
890
|
-
let Pe = A ? A.value : l, Fe = B && (
|
|
890
|
+
let Pe = A ? A.value : l, Fe = B && (de || Pe || C === X.Date);
|
|
891
891
|
return /* @__PURE__ */ H("div", {
|
|
892
892
|
className: f(Y.input, s),
|
|
893
893
|
style: c,
|
|
894
894
|
children: [
|
|
895
895
|
/* @__PURE__ */ H("label", {
|
|
896
896
|
htmlFor: t,
|
|
897
|
-
className: f(Y.inputLabel,
|
|
897
|
+
className: f(Y.inputLabel, G?.label, {
|
|
898
898
|
[Y.inputLabelColumn]: !w,
|
|
899
899
|
[Y.inputLabelInBorder]: I
|
|
900
900
|
}),
|
|
901
|
-
style:
|
|
901
|
+
style: K?.label,
|
|
902
902
|
children: [
|
|
903
903
|
Ne && !B ? /* @__PURE__ */ H("span", {
|
|
904
904
|
className: Y.inputLabelText,
|
|
@@ -908,33 +908,33 @@ function rt({ name: t = "", label: n = "", errorMessage: r = "", isValid: o = !0
|
|
|
908
908
|
}) : null]
|
|
909
909
|
}) : null,
|
|
910
910
|
N && /* @__PURE__ */ V("div", {
|
|
911
|
-
className: f(Y.inputUpperRightLabel,
|
|
912
|
-
style:
|
|
911
|
+
className: f(Y.inputUpperRightLabel, G?.upperRightLabel),
|
|
912
|
+
style: K?.upperRightLabel,
|
|
913
913
|
children: N
|
|
914
914
|
}),
|
|
915
915
|
/* @__PURE__ */ H("div", {
|
|
916
|
-
className: f(Y.inputContainer, { [Y.inputContainerMultiline]:
|
|
917
|
-
style:
|
|
916
|
+
className: f(Y.inputContainer, { [Y.inputContainerMultiline]: W }, G?.container),
|
|
917
|
+
style: K?.container,
|
|
918
918
|
onMouseEnter: Se,
|
|
919
919
|
onMouseLeave: Ce,
|
|
920
920
|
children: [
|
|
921
921
|
m,
|
|
922
|
-
e.cloneElement(
|
|
923
|
-
...
|
|
922
|
+
e.cloneElement(U || V(W ? "textarea" : "input", {}), {
|
|
923
|
+
...ue,
|
|
924
924
|
className: f(Y.inputField, {
|
|
925
925
|
[Y.inputFieldUppercase]: b,
|
|
926
926
|
[Y.inputFieldDate]: C === X.Date,
|
|
927
927
|
[Y.inputFieldDefault]: C !== X.Date,
|
|
928
928
|
[Y.inputFieldWithIcon]: Oe,
|
|
929
929
|
[Y.inputFieldWithIconLeft]: ke,
|
|
930
|
-
[Y.inputFieldMultiline]:
|
|
931
|
-
[Y.inputFieldMultilineAutoResize]:
|
|
932
|
-
},
|
|
930
|
+
[Y.inputFieldMultiline]: W,
|
|
931
|
+
[Y.inputFieldMultilineAutoResize]: W && le
|
|
932
|
+
}, G?.input),
|
|
933
933
|
name: t,
|
|
934
934
|
id: t,
|
|
935
935
|
value: A ? A.value : l,
|
|
936
936
|
tabIndex: S,
|
|
937
|
-
ref:
|
|
937
|
+
ref: U ? void 0 : ve,
|
|
938
938
|
onChange: Ee,
|
|
939
939
|
onFocus: we,
|
|
940
940
|
onBlur: Te,
|
|
@@ -942,29 +942,29 @@ function rt({ name: t = "", label: n = "", errorMessage: r = "", isValid: o = !0
|
|
|
942
942
|
autoComplete: ie,
|
|
943
943
|
onClick: ae,
|
|
944
944
|
readOnly: oe,
|
|
945
|
-
disabled:
|
|
946
|
-
...!
|
|
945
|
+
disabled: q,
|
|
946
|
+
...!W && {
|
|
947
947
|
type: De(),
|
|
948
948
|
min: te,
|
|
949
949
|
max: ne
|
|
950
950
|
},
|
|
951
|
-
...
|
|
951
|
+
...W && ce !== void 0 && { rows: ce }
|
|
952
952
|
}),
|
|
953
953
|
M && /* @__PURE__ */ V("div", {
|
|
954
|
-
className: f(Y.inputFieldSuffix,
|
|
955
|
-
style:
|
|
954
|
+
className: f(Y.inputFieldSuffix, G?.suffix),
|
|
955
|
+
style: K?.suffix,
|
|
956
956
|
children: M
|
|
957
957
|
})
|
|
958
958
|
]
|
|
959
959
|
}),
|
|
960
960
|
/* @__PURE__ */ V("fieldset", {
|
|
961
|
-
className: f(Y.inputFieldset,
|
|
962
|
-
[Y.inputContainerBorderFocused]:
|
|
963
|
-
[Y.inputContainerBorderSearchFocused]: C === X.Search && (
|
|
961
|
+
className: f(Y.inputFieldset, G?.fieldset, {
|
|
962
|
+
[Y.inputContainerBorderFocused]: de,
|
|
963
|
+
[Y.inputContainerBorderSearchFocused]: C === X.Search && (de || l),
|
|
964
964
|
[Y.inputContainerBorderInvalid]: Me,
|
|
965
965
|
[Y.inputContainerBorderError]: Me
|
|
966
966
|
}),
|
|
967
|
-
style:
|
|
967
|
+
style: K?.fieldset,
|
|
968
968
|
children: /* @__PURE__ */ V("legend", {
|
|
969
969
|
className: f(Y.inputFieldsetLegend, { [Y.inputFieldsetLegendActive]: Fe }),
|
|
970
970
|
children: /* @__PURE__ */ V("span", { children: Ne })
|
|
@@ -973,18 +973,18 @@ function rt({ name: t = "", label: n = "", errorMessage: r = "", isValid: o = !0
|
|
|
973
973
|
B && n && /* @__PURE__ */ V("div", {
|
|
974
974
|
className: f(Y.inputMatLabel, {
|
|
975
975
|
[Y.inputMatLabelFloating]: Fe,
|
|
976
|
-
[Y.inputMatLabelMultiline]:
|
|
976
|
+
[Y.inputMatLabelMultiline]: W && !Fe
|
|
977
977
|
}),
|
|
978
978
|
children: Ne
|
|
979
979
|
}),
|
|
980
980
|
B && re && /* @__PURE__ */ V("div", {
|
|
981
|
-
className: f(Y.inputPlaceholder,
|
|
981
|
+
className: f(Y.inputPlaceholder, de && !Pe && Y.inputPlaceholderShown, W && Y.inputPlaceholderMultiline),
|
|
982
982
|
children: re
|
|
983
983
|
}),
|
|
984
984
|
/* @__PURE__ */ V(nt, {
|
|
985
985
|
variant: "error",
|
|
986
986
|
message: A ? A.getCurrentErrorMessage() : r || "",
|
|
987
|
-
isVisible: Me && (
|
|
987
|
+
isVisible: Me && (de || pe)
|
|
988
988
|
})
|
|
989
989
|
]
|
|
990
990
|
}),
|
|
@@ -1001,17 +1001,17 @@ function rt({ name: t = "", label: n = "", errorMessage: r = "", isValid: o = !0
|
|
|
1001
1001
|
...Ae
|
|
1002
1002
|
}),
|
|
1003
1003
|
C === X.Search && /* @__PURE__ */ V(p, {
|
|
1004
|
-
icon:
|
|
1004
|
+
icon: ee,
|
|
1005
1005
|
...Ae
|
|
1006
1006
|
}),
|
|
1007
1007
|
C === X.Password && /* @__PURE__ */ V(p, {
|
|
1008
1008
|
icon: he ? O : D,
|
|
1009
1009
|
...je
|
|
1010
1010
|
}),
|
|
1011
|
-
(
|
|
1011
|
+
(L && l && (de || pe) || se) && /* @__PURE__ */ V(p, {
|
|
1012
1012
|
icon: z,
|
|
1013
1013
|
className: Y.inputFieldIcon,
|
|
1014
|
-
onClick:
|
|
1014
|
+
onClick: R ?? void 0,
|
|
1015
1015
|
onMouseEnter: () => me(!0),
|
|
1016
1016
|
onMouseLeave: () => me(!1)
|
|
1017
1017
|
})
|
|
@@ -1604,6 +1604,8 @@ var Z = {
|
|
|
1604
1604
|
dropdownInputListItemActive: "dropdown-input-list-item-active_0dhia",
|
|
1605
1605
|
"dropdown-input-list-item-selected": "dropdown-input-list-item-selected_hShJf",
|
|
1606
1606
|
dropdownInputListItemSelected: "dropdown-input-list-item-selected_hShJf",
|
|
1607
|
+
"dropdown-input-list-item-disabled": "dropdown-input-list-item-disabled_3r-Yn",
|
|
1608
|
+
dropdownInputListItemDisabled: "dropdown-input-list-item-disabled_3r-Yn",
|
|
1607
1609
|
"dropdown-input-list-hidden": "dropdown-input-list-hidden_huNc5",
|
|
1608
1610
|
dropdownInputListHidden: "dropdown-input-list-hidden_huNc5",
|
|
1609
1611
|
"dropdown-fieldset": "dropdown-fieldset_wQwTf",
|
|
@@ -1636,8 +1638,8 @@ var Z = {
|
|
|
1636
1638
|
};
|
|
1637
1639
|
//#endregion
|
|
1638
1640
|
//#region package/common/dropdown/dropdown.tsx
|
|
1639
|
-
function Ut({ errorMessage: e = "", className: t = "", label: n = "", value: r = "", isValid: i = !0, tabIndex: o = 0, isRequired: s = !1, customProps: c = {}, isRow: l = !1, disabled: m = !1, onScroll: h = () => Promise.resolve(), isListOnTop: _ = !1, onClick: v, onChange: y, onFocus: b = null, onBlur: x = null, onMouseEnter: S = null, onMouseLeave: C = null, dropdownLabel: w, isDropdownListWider: T = !1, inputClassName: E = "", dropDownIconClassName: D = "", dropDownClassName: O = "", formValidator: k = null, labelClassName: A = "", dropDownInputClassName: j = "", items: M = [], useMatLabelStyle: N = !0, placeholder: P = "", plainStyle: F = !1, scrollToSelected: I = !1, reactRef:
|
|
1640
|
-
let [
|
|
1641
|
+
function Ut({ errorMessage: e = "", className: t = "", label: n = "", value: r = "", isValid: i = !0, tabIndex: o = 0, isRequired: s = !1, customProps: c = {}, isRow: l = !1, disabled: m = !1, onScroll: h = () => Promise.resolve(), isListOnTop: _ = !1, onClick: v, onChange: y, onFocus: b = null, onBlur: x = null, onMouseEnter: S = null, onMouseLeave: C = null, dropdownLabel: w, isDropdownListWider: T = !1, inputClassName: E = "", dropDownIconClassName: D = "", dropDownClassName: O = "", formValidator: k = null, labelClassName: A = "", dropDownInputClassName: j = "", items: M = [], useMatLabelStyle: N = !0, placeholder: P = "", plainStyle: F = !1, scrollToSelected: I = !1, reactRef: ee, ...L }) {
|
|
1642
|
+
let [R, te] = d(!1), [ne, z] = d(!1), [, re] = d(0), B = u(k);
|
|
1641
1643
|
a(() => {
|
|
1642
1644
|
if (B.current = k, !B.current) return;
|
|
1643
1645
|
B.current.label = n ?? "", B.current.validate();
|
|
@@ -1648,34 +1650,34 @@ function Ut({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1648
1650
|
z(!0), S?.(e);
|
|
1649
1651
|
}, oe = (e) => {
|
|
1650
1652
|
z(!1), C?.(e);
|
|
1651
|
-
},
|
|
1653
|
+
}, U = (e) => {
|
|
1652
1654
|
te(!0), b?.(e);
|
|
1653
|
-
},
|
|
1655
|
+
}, se = (e) => {
|
|
1654
1656
|
B.current && (B.current.touched = !0), te(!1), x?.(e);
|
|
1655
|
-
},
|
|
1657
|
+
}, W = () => k ? k.touched && k.hasError() : !i || !!e, ce = () => !!(s || k?.validators.find((e) => e.validatorId === "required")), le = (e) => {
|
|
1656
1658
|
k ? (k.set(e), y?.(k.value, c)) : y?.(e, c);
|
|
1657
|
-
},
|
|
1659
|
+
}, G = w, K = k ? k.value : r, q = W();
|
|
1658
1660
|
M.forEach((e) => {
|
|
1659
|
-
e.key ===
|
|
1661
|
+
e.key === K && (G = e.label);
|
|
1660
1662
|
});
|
|
1661
|
-
let
|
|
1663
|
+
let ue = G || K, de = ue == null || typeof ue == "string" && ue.trim() === "";
|
|
1662
1664
|
return /* @__PURE__ */ H("div", {
|
|
1663
|
-
...
|
|
1665
|
+
...L,
|
|
1664
1666
|
className: f(t, Z.dropdownLabel, Z.dropdown, { [Z.dropdownLabelColumn]: !l }),
|
|
1665
1667
|
onMouseEnter: ie,
|
|
1666
1668
|
onMouseLeave: oe,
|
|
1667
1669
|
children: [
|
|
1668
1670
|
/* @__PURE__ */ V(ae, {
|
|
1669
|
-
onChange: (e) =>
|
|
1671
|
+
onChange: (e) => le((e || { key: "" }).key),
|
|
1670
1672
|
itemToString: (e) => e ? String(e.key) : "",
|
|
1671
|
-
selectedItem: M.find((e) => e.key ===
|
|
1673
|
+
selectedItem: M.find((e) => e.key === K) ?? null,
|
|
1672
1674
|
stateReducer: (e, t) => I && Object.prototype.hasOwnProperty.call(t, "isOpen") ? {
|
|
1673
1675
|
...t,
|
|
1674
1676
|
highlightedIndex: t.isOpen ? M.indexOf(e.selectedItem) : null
|
|
1675
1677
|
} : t,
|
|
1676
1678
|
children: ({ getItemProps: e, getToggleButtonProps: t, isOpen: r, selectedItem: i, highlightedIndex: a, setHighlightedIndex: s }) => /* @__PURE__ */ V("div", { children: /* @__PURE__ */ H("div", {
|
|
1677
|
-
onFocus:
|
|
1678
|
-
onBlur:
|
|
1679
|
+
onFocus: U,
|
|
1680
|
+
onBlur: se,
|
|
1679
1681
|
className: f(Z.dropdownInput, { [Z.dropdownInputPlain]: F }, j),
|
|
1680
1682
|
children: [
|
|
1681
1683
|
/* @__PURE__ */ V("button", {
|
|
@@ -1691,8 +1693,8 @@ function Ut({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1691
1693
|
onClick: (e) => {
|
|
1692
1694
|
t().onClick?.(e), v?.(e);
|
|
1693
1695
|
},
|
|
1694
|
-
ref:
|
|
1695
|
-
children:
|
|
1696
|
+
ref: ee,
|
|
1697
|
+
children: de ? "\xA0" : ue
|
|
1696
1698
|
}),
|
|
1697
1699
|
/* @__PURE__ */ V("button", {
|
|
1698
1700
|
type: "button",
|
|
@@ -1723,7 +1725,8 @@ function Ut({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1723
1725
|
}),
|
|
1724
1726
|
className: f(Z.dropdownInputListItem, O, {
|
|
1725
1727
|
[Z.dropdownInputListItemActive]: a === n,
|
|
1726
|
-
[Z.dropdownInputListItemSelected]: i === t
|
|
1728
|
+
[Z.dropdownInputListItemSelected]: i === t,
|
|
1729
|
+
[Z.dropdownInputListItemDisabled]: !!t.disabled
|
|
1727
1730
|
}),
|
|
1728
1731
|
children: t.label
|
|
1729
1732
|
}, t.key))
|
|
@@ -1731,21 +1734,21 @@ function Ut({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1731
1734
|
/* @__PURE__ */ V("fieldset", {
|
|
1732
1735
|
className: f(Z.dropdownFieldset, {
|
|
1733
1736
|
[Z.dropdownBorderPlain]: F,
|
|
1734
|
-
[Z.dropdownBorderFocused]:
|
|
1735
|
-
[Z.dropdownBorderInvalid]:
|
|
1736
|
-
[Z.dropdownBorderError]:
|
|
1737
|
+
[Z.dropdownBorderFocused]: R,
|
|
1738
|
+
[Z.dropdownBorderInvalid]: q,
|
|
1739
|
+
[Z.dropdownBorderError]: q
|
|
1737
1740
|
}),
|
|
1738
1741
|
children: /* @__PURE__ */ V("legend", {
|
|
1739
|
-
className: f(Z.dropdownFieldsetLegend, { [Z.dropdownFieldsetLegendActive]: N && (
|
|
1742
|
+
className: f(Z.dropdownFieldsetLegend, { [Z.dropdownFieldsetLegendActive]: N && (R || !de) }),
|
|
1740
1743
|
children: /* @__PURE__ */ V("span", { children: n })
|
|
1741
1744
|
})
|
|
1742
1745
|
}),
|
|
1743
1746
|
N && n && /* @__PURE__ */ V("div", {
|
|
1744
|
-
className: f(Z.dropdownMatLabel, { [Z.dropdownMatLabelFloating]:
|
|
1747
|
+
className: f(Z.dropdownMatLabel, { [Z.dropdownMatLabelFloating]: R || !de }),
|
|
1745
1748
|
children: n
|
|
1746
1749
|
}),
|
|
1747
1750
|
N && P && /* @__PURE__ */ V("div", {
|
|
1748
|
-
className: f(Z.dropdownPlaceholder,
|
|
1751
|
+
className: f(Z.dropdownPlaceholder, R && !G && Z.dropdownPlaceholderShown),
|
|
1749
1752
|
children: P
|
|
1750
1753
|
})
|
|
1751
1754
|
]
|
|
@@ -1753,7 +1756,7 @@ function Ut({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1753
1756
|
}),
|
|
1754
1757
|
n && !N && /* @__PURE__ */ H("div", {
|
|
1755
1758
|
className: f(Z.dropdownLabelText, A),
|
|
1756
|
-
children: [n,
|
|
1759
|
+
children: [n, ce() ? /* @__PURE__ */ V("div", {
|
|
1757
1760
|
className: Z.requiredMark,
|
|
1758
1761
|
children: "*"
|
|
1759
1762
|
}) : null]
|
|
@@ -1761,7 +1764,7 @@ function Ut({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1761
1764
|
/* @__PURE__ */ V(nt, {
|
|
1762
1765
|
variant: "error",
|
|
1763
1766
|
message: k ? k.getCurrentErrorMessage() : e || "",
|
|
1764
|
-
isVisible:
|
|
1767
|
+
isVisible: q && (R || ne)
|
|
1765
1768
|
})
|
|
1766
1769
|
]
|
|
1767
1770
|
});
|
|
@@ -1784,7 +1787,7 @@ var Wt = {
|
|
|
1784
1787
|
//#endregion
|
|
1785
1788
|
//#region package/common/datePicker/datePicker.tsx
|
|
1786
1789
|
function Gt({ className: e = "", selected: t, onSelect: n = () => null, formValidator: r = null, noInput: i = !1, noHeader: o = !1, isModal: s = !1, isInline: c = !1, onChange: l = () => null, minDate: p = null, maxDate: m = null, children: h = null, showClearButton: g = !1, label: y = "", isValid: b = !0, errorMessage: x = "", isRequired: S = !1, startDate: C, endDate: w }) {
|
|
1787
|
-
let T = () => r ? r.value : t, E = T() ?? /* @__PURE__ */ new Date(), [D, O] = d(E.getMonth() + 1), [k, A] = d(E.getFullYear()), [j, M] = d(!1), [N, P] = d(() => T() ? Nt(E) : ""), [F, I] = d(!1), [
|
|
1790
|
+
let T = () => r ? r.value : t, E = T() ?? /* @__PURE__ */ new Date(), [D, O] = d(E.getMonth() + 1), [k, A] = d(E.getFullYear()), [j, M] = d(!1), [N, P] = d(() => T() ? Nt(E) : ""), [F, I] = d(!1), [ee, L] = d(!1), [, R] = d(0), [te, ne] = d(t), z = u(r);
|
|
1788
1791
|
if (te !== t) {
|
|
1789
1792
|
ne(t);
|
|
1790
1793
|
let e = t ?? /* @__PURE__ */ new Date();
|
|
@@ -1794,42 +1797,42 @@ function Gt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1794
1797
|
if (z.current = r, !r) return;
|
|
1795
1798
|
let e = () => {
|
|
1796
1799
|
let e = r.value;
|
|
1797
|
-
e ? (O(e.getMonth() + 1), A(e.getFullYear()), P(Nt(e))) : P(""),
|
|
1800
|
+
e ? (O(e.getMonth() + 1), A(e.getFullYear()), P(Nt(e))) : P(""), R((e) => e + 1);
|
|
1798
1801
|
};
|
|
1799
1802
|
return r.registerOnUpdateListener(e), () => r.removeOnUpdateListener(e);
|
|
1800
1803
|
}, [r]);
|
|
1801
1804
|
let re = () => r ? r.touched && r.hasError() : !b || !!x, ie = () => !!(S || r?.validators.find((e) => e.validatorId === "required")), ae = (e) => {
|
|
1802
1805
|
P(e ? Nt(e) : ""), r && r.set(e), l(e);
|
|
1803
|
-
},
|
|
1806
|
+
}, U = (e) => {
|
|
1804
1807
|
ae(e), n(e), M(!1);
|
|
1805
|
-
},
|
|
1808
|
+
}, se = (e) => {
|
|
1806
1809
|
O((t) => {
|
|
1807
1810
|
let n = t + e;
|
|
1808
1811
|
return n < 1 ? (n = 12, A((e) => e - 1)) : n > 12 && (n = 1, A((e) => e + 1)), n;
|
|
1809
1812
|
});
|
|
1810
|
-
},
|
|
1813
|
+
}, W = (e) => {
|
|
1811
1814
|
if (e.match(/\d{2}\.\d{2}\.\d{4}/gi)) {
|
|
1812
1815
|
let [t, n, r] = e.split("."), i = Dt(Number(t), Number(n), Number(r));
|
|
1813
1816
|
if (i && i.toString() !== "Invalid Date" && (!m || i <= m) && (!p || i >= p)) return i;
|
|
1814
1817
|
}
|
|
1815
1818
|
return null;
|
|
1816
|
-
},
|
|
1819
|
+
}, ce = ({ previousState: e, nextState: t }) => {
|
|
1817
1820
|
if (!e || t.value === e.value) return t;
|
|
1818
|
-
let n = Pt(t.value, e.value, t.selection ?? null), r =
|
|
1821
|
+
let n = Pt(t.value, e.value, t.selection ?? null), r = W(n.value);
|
|
1819
1822
|
return r && ae(r), n;
|
|
1820
|
-
},
|
|
1823
|
+
}, le = () => {
|
|
1821
1824
|
let e = 400, t = (/* @__PURE__ */ new Date()).getFullYear() - 200;
|
|
1822
1825
|
return p && (t = p.getFullYear()), m && (e = m.getFullYear() - t + 1), Array.from(Array(e).keys()).map((e) => ({
|
|
1823
1826
|
key: e + t,
|
|
1824
1827
|
label: e + t
|
|
1825
1828
|
}));
|
|
1826
|
-
},
|
|
1829
|
+
}, G = T(), K = re(), q = /* @__PURE__ */ H(B, { children: [
|
|
1827
1830
|
o ? null : /* @__PURE__ */ H("div", {
|
|
1828
1831
|
className: Wt.datePickerHeader,
|
|
1829
1832
|
children: [
|
|
1830
1833
|
/* @__PURE__ */ V(Re, {
|
|
1831
1834
|
icon: _,
|
|
1832
|
-
onClick: () =>
|
|
1835
|
+
onClick: () => se(-1)
|
|
1833
1836
|
}),
|
|
1834
1837
|
/* @__PURE__ */ V("div", {
|
|
1835
1838
|
className: Wt.datePickerHeaderMonthAndYearContainer,
|
|
@@ -1852,13 +1855,13 @@ function Gt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1852
1855
|
className: Wt.datePickerHeaderYear,
|
|
1853
1856
|
onChange: (e) => A(e),
|
|
1854
1857
|
value: k,
|
|
1855
|
-
items:
|
|
1858
|
+
items: le()
|
|
1856
1859
|
})]
|
|
1857
1860
|
})
|
|
1858
1861
|
}),
|
|
1859
1862
|
/* @__PURE__ */ V(Re, {
|
|
1860
1863
|
icon: v,
|
|
1861
|
-
onClick: () =>
|
|
1864
|
+
onClick: () => se(1)
|
|
1862
1865
|
})
|
|
1863
1866
|
]
|
|
1864
1867
|
}),
|
|
@@ -1866,18 +1869,18 @@ function Gt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1866
1869
|
className: Wt.datePickerMonth,
|
|
1867
1870
|
month: D,
|
|
1868
1871
|
year: k,
|
|
1869
|
-
onSelect:
|
|
1870
|
-
selectionStart: C ??
|
|
1871
|
-
selectionEnd: w ??
|
|
1872
|
+
onSelect: U,
|
|
1873
|
+
selectionStart: C ?? G,
|
|
1874
|
+
selectionEnd: w ?? G,
|
|
1872
1875
|
minDate: p,
|
|
1873
1876
|
maxDate: m
|
|
1874
1877
|
}),
|
|
1875
1878
|
g && /* @__PURE__ */ V(Me, {
|
|
1876
|
-
onClick: () =>
|
|
1879
|
+
onClick: () => U(null),
|
|
1877
1880
|
children: "Clear"
|
|
1878
1881
|
}),
|
|
1879
1882
|
h
|
|
1880
|
-
] }),
|
|
1883
|
+
] }), ue = i ? null : /* @__PURE__ */ V(rt, {
|
|
1881
1884
|
readOnly: s,
|
|
1882
1885
|
label: `${y}${ie() ? " *" : ""}`,
|
|
1883
1886
|
value: N,
|
|
@@ -1886,37 +1889,37 @@ function Gt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1886
1889
|
customInput: /* @__PURE__ */ V(oe, {
|
|
1887
1890
|
mask: "99.99.9999",
|
|
1888
1891
|
maskPlaceholder: "_",
|
|
1889
|
-
beforeMaskedStateChange:
|
|
1892
|
+
beforeMaskedStateChange: ce
|
|
1890
1893
|
}),
|
|
1891
1894
|
onBlur: () => {
|
|
1892
|
-
z.current && (z.current.touched = !0), I(!1), ae(
|
|
1895
|
+
z.current && (z.current.touched = !0), I(!1), ae(W(N));
|
|
1893
1896
|
},
|
|
1894
1897
|
onFocus: () => I(!0),
|
|
1895
|
-
onMouseEnter: () =>
|
|
1896
|
-
onMouseLeave: () =>
|
|
1897
|
-
isValid: !
|
|
1898
|
-
}),
|
|
1898
|
+
onMouseEnter: () => L(!0),
|
|
1899
|
+
onMouseLeave: () => L(!1),
|
|
1900
|
+
isValid: !K
|
|
1901
|
+
}), de = c ? q : s ? /* @__PURE__ */ V(gt, {
|
|
1899
1902
|
hideHeader: !0,
|
|
1900
1903
|
isOpen: j,
|
|
1901
1904
|
onClose: () => M(!1),
|
|
1902
|
-
children:
|
|
1905
|
+
children: q
|
|
1903
1906
|
}) : /* @__PURE__ */ V(et, {
|
|
1904
1907
|
isOpen: j,
|
|
1905
1908
|
onOpenChange: (e) => M(e),
|
|
1906
|
-
content:
|
|
1909
|
+
content: q,
|
|
1907
1910
|
align: Qe.Left,
|
|
1908
1911
|
dontCloseOnChildClick: !0,
|
|
1909
|
-
children:
|
|
1912
|
+
children: ue
|
|
1910
1913
|
});
|
|
1911
1914
|
return /* @__PURE__ */ H("div", {
|
|
1912
1915
|
className: f(Wt.datePicker, e),
|
|
1913
1916
|
children: [
|
|
1914
|
-
(s || c) &&
|
|
1915
|
-
|
|
1917
|
+
(s || c) && ue,
|
|
1918
|
+
de,
|
|
1916
1919
|
/* @__PURE__ */ V(nt, {
|
|
1917
1920
|
variant: "error",
|
|
1918
1921
|
message: r ? r.getCurrentErrorMessage() : x || "",
|
|
1919
|
-
isVisible:
|
|
1922
|
+
isVisible: K && (F || ee)
|
|
1920
1923
|
})
|
|
1921
1924
|
]
|
|
1922
1925
|
});
|
|
@@ -2230,7 +2233,7 @@ var un = {
|
|
|
2230
2233
|
//#endregion
|
|
2231
2234
|
//#region package/common/kanbanBoard/KanbanItem.tsx
|
|
2232
2235
|
function dn({ id: e, children: t }) {
|
|
2233
|
-
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } =
|
|
2236
|
+
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } = de({ id: e });
|
|
2234
2237
|
return /* @__PURE__ */ V("div", {
|
|
2235
2238
|
ref: i,
|
|
2236
2239
|
style: {
|
|
@@ -2246,14 +2249,14 @@ function dn({ id: e, children: t }) {
|
|
|
2246
2249
|
//#endregion
|
|
2247
2250
|
//#region package/common/kanbanBoard/KanbanColumn.tsx
|
|
2248
2251
|
function fn({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a, classNames: o, styles: s }) {
|
|
2249
|
-
let { setNodeRef: c, isOver: l } =
|
|
2252
|
+
let { setNodeRef: c, isOver: l } = le({ id: `column-${e}` });
|
|
2250
2253
|
return /* @__PURE__ */ H("div", {
|
|
2251
2254
|
className: f(un.column, l && un.columnOver, n.length === 0 && un.columnEmpty, a),
|
|
2252
2255
|
children: [/* @__PURE__ */ V("div", {
|
|
2253
2256
|
className: f(un.columnHeader, o?.header),
|
|
2254
2257
|
style: s?.header,
|
|
2255
2258
|
children: t
|
|
2256
|
-
}), /* @__PURE__ */ V(
|
|
2259
|
+
}), /* @__PURE__ */ V(q, {
|
|
2257
2260
|
items: n,
|
|
2258
2261
|
strategy: fe,
|
|
2259
2262
|
children: /* @__PURE__ */ V("div", {
|
|
@@ -2271,7 +2274,7 @@ function fn({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a
|
|
|
2271
2274
|
//#endregion
|
|
2272
2275
|
//#region package/common/kanbanBoard/KanbanBoard.tsx
|
|
2273
2276
|
function pn({ columns: e, items: t, renderItem: n, onChange: r, className: i, style: a, classNames: o, styles: s }) {
|
|
2274
|
-
let [c, l] = d(null), [u, p] = d(null), m = G(W
|
|
2277
|
+
let [c, l] = d(null), [u, p] = d(null), m = K(G(W, { activationConstraint: { distance: 8 } })), h = u ?? e;
|
|
2275
2278
|
function g(e, t) {
|
|
2276
2279
|
return e.findIndex((e) => e.itemIds.includes(t));
|
|
2277
2280
|
}
|
|
@@ -2303,7 +2306,7 @@ function pn({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2303
2306
|
let e = n[a], t = e.itemIds.indexOf(r), o = e.itemIds.indexOf(i);
|
|
2304
2307
|
t !== -1 && o !== -1 && t !== o && (n[a] = {
|
|
2305
2308
|
...e,
|
|
2306
|
-
itemIds:
|
|
2309
|
+
itemIds: ue(e.itemIds, t, o)
|
|
2307
2310
|
});
|
|
2308
2311
|
} else {
|
|
2309
2312
|
n[a].itemIds = n[a].itemIds.filter((e) => e !== r);
|
|
@@ -2320,9 +2323,9 @@ function pn({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2320
2323
|
}
|
|
2321
2324
|
r(u), p(null);
|
|
2322
2325
|
}
|
|
2323
|
-
return /* @__PURE__ */ H(
|
|
2326
|
+
return /* @__PURE__ */ H(U, {
|
|
2324
2327
|
sensors: m,
|
|
2325
|
-
collisionDetection:
|
|
2328
|
+
collisionDetection: ce,
|
|
2326
2329
|
onDragStart: _,
|
|
2327
2330
|
onDragOver: v,
|
|
2328
2331
|
onDragEnd: y,
|
|
@@ -2336,7 +2339,7 @@ function pn({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2336
2339
|
items: t,
|
|
2337
2340
|
renderItem: n
|
|
2338
2341
|
}, e.id))
|
|
2339
|
-
}), /* @__PURE__ */ V(
|
|
2342
|
+
}), /* @__PURE__ */ V(se, { children: c && t[c] !== void 0 ? /* @__PURE__ */ V("div", {
|
|
2340
2343
|
className: f(un.dragOverlay, o?.dragOverlay),
|
|
2341
2344
|
style: s?.dragOverlay,
|
|
2342
2345
|
children: n(t[c], c)
|
|
@@ -2947,7 +2950,7 @@ function tr({ className: e }) {
|
|
|
2947
2950
|
let [t, n] = d([]), [r, i] = d([]), [o, c] = d("rect"), [l, m] = d(null), [g, _] = d(null), [v, y] = d(null), [b, x] = d(null), [S, E] = d([]), [D, O] = d(null), [k, j] = d(1), [P, F] = d({
|
|
2948
2951
|
x: 0,
|
|
2949
2952
|
y: 0
|
|
2950
|
-
}), I = u(null),
|
|
2953
|
+
}), I = u(null), ee = u(null), te = u(null), z = u(null), re = u(null), ie = u({
|
|
2951
2954
|
rooms: t,
|
|
2952
2955
|
doors: r,
|
|
2953
2956
|
tool: o,
|
|
@@ -3039,10 +3042,10 @@ function tr({ className: e }) {
|
|
|
3039
3042
|
y: a - 300 / r / 2
|
|
3040
3043
|
}), j(r);
|
|
3041
3044
|
}
|
|
3042
|
-
function
|
|
3045
|
+
function U(e) {
|
|
3043
3046
|
return z.current ? jn(e.clientX, e.clientY, z.current) : null;
|
|
3044
3047
|
}
|
|
3045
|
-
function
|
|
3048
|
+
function se(e, t) {
|
|
3046
3049
|
let n = null;
|
|
3047
3050
|
for (let r = 0; r < t.points.length; r++) {
|
|
3048
3051
|
let i = Mn(e, t.points[r]);
|
|
@@ -3053,7 +3056,7 @@ function tr({ className: e }) {
|
|
|
3053
3056
|
}
|
|
3054
3057
|
return n;
|
|
3055
3058
|
}
|
|
3056
|
-
function
|
|
3059
|
+
function W(e, t) {
|
|
3057
3060
|
let n = null;
|
|
3058
3061
|
for (let r = 0; r < t.points.length; r++) {
|
|
3059
3062
|
let i = t.points[r], a = t.points[(r + 1) % t.points.length], { dist: o, t: s } = Nn(e, i, a);
|
|
@@ -3065,7 +3068,7 @@ function tr({ className: e }) {
|
|
|
3065
3068
|
}
|
|
3066
3069
|
return n;
|
|
3067
3070
|
}
|
|
3068
|
-
function
|
|
3071
|
+
function ce(e, t, r, a) {
|
|
3069
3072
|
return n((n) => n.map((n) => {
|
|
3070
3073
|
if (n.id !== e) return n;
|
|
3071
3074
|
let r = [...n.points];
|
|
@@ -3085,7 +3088,7 @@ function tr({ className: e }) {
|
|
|
3085
3088
|
wallIndex: n.wallIndex + 1
|
|
3086
3089
|
} : n : n)), t + 1;
|
|
3087
3090
|
}
|
|
3088
|
-
function
|
|
3091
|
+
function le(e, r) {
|
|
3089
3092
|
let a = t.find((t) => t.id === e);
|
|
3090
3093
|
if (!a || a.points.length <= 3) return;
|
|
3091
3094
|
let o = a.points.length;
|
|
@@ -3104,7 +3107,7 @@ function tr({ className: e }) {
|
|
|
3104
3107
|
} : t;
|
|
3105
3108
|
}).filter((e) => e.wallIndex !== -1));
|
|
3106
3109
|
}
|
|
3107
|
-
function
|
|
3110
|
+
function G(e) {
|
|
3108
3111
|
if (e.button === 1) {
|
|
3109
3112
|
e.preventDefault();
|
|
3110
3113
|
let t = z.current;
|
|
@@ -3124,7 +3127,7 @@ function tr({ className: e }) {
|
|
|
3124
3127
|
}
|
|
3125
3128
|
if (e.button !== 0) return;
|
|
3126
3129
|
e.preventDefault();
|
|
3127
|
-
let n =
|
|
3130
|
+
let n = U(e);
|
|
3128
3131
|
if (n) {
|
|
3129
3132
|
if (g) {
|
|
3130
3133
|
let e = t.find((e) => e.id === g);
|
|
@@ -3151,7 +3154,7 @@ function tr({ className: e }) {
|
|
|
3151
3154
|
if (o === "select") {
|
|
3152
3155
|
let e = t.find((e) => e.id === l) ?? null;
|
|
3153
3156
|
if (e) {
|
|
3154
|
-
let t =
|
|
3157
|
+
let t = se(n, e);
|
|
3155
3158
|
if (t) {
|
|
3156
3159
|
I.current = {
|
|
3157
3160
|
type: "vertex",
|
|
@@ -3164,12 +3167,12 @@ function tr({ className: e }) {
|
|
|
3164
3167
|
}
|
|
3165
3168
|
}
|
|
3166
3169
|
if (e) {
|
|
3167
|
-
let t =
|
|
3170
|
+
let t = W(n, e);
|
|
3168
3171
|
if (t) {
|
|
3169
3172
|
let r = e.points[t.index], i = e.points[(t.index + 1) % e.points.length], a = An({
|
|
3170
3173
|
x: r.x + (i.x - r.x) * t.t,
|
|
3171
3174
|
y: r.y + (i.y - r.y) * t.t
|
|
3172
|
-
}), o =
|
|
3175
|
+
}), o = ce(e.id, t.index, t.t, a);
|
|
3173
3176
|
I.current = {
|
|
3174
3177
|
type: "vertex",
|
|
3175
3178
|
roomId: e.id,
|
|
@@ -3194,16 +3197,16 @@ function tr({ className: e }) {
|
|
|
3194
3197
|
}
|
|
3195
3198
|
}
|
|
3196
3199
|
}
|
|
3197
|
-
function
|
|
3200
|
+
function K(e) {
|
|
3198
3201
|
if (o !== "select" || g) return;
|
|
3199
|
-
let n =
|
|
3202
|
+
let n = U(e);
|
|
3200
3203
|
if (!n) return;
|
|
3201
3204
|
let r = t.find((e) => e.id === l);
|
|
3202
3205
|
if (!r) return;
|
|
3203
|
-
let i =
|
|
3204
|
-
i && (e.preventDefault(),
|
|
3206
|
+
let i = se(n, r);
|
|
3207
|
+
i && (e.preventDefault(), le(r.id, i.index));
|
|
3205
3208
|
}
|
|
3206
|
-
function
|
|
3209
|
+
function q(e) {
|
|
3207
3210
|
if (te.current) {
|
|
3208
3211
|
let { startClient: t, origPan: n, scaleX: r, scaleY: i } = te.current;
|
|
3209
3212
|
F({
|
|
@@ -3212,13 +3215,13 @@ function tr({ className: e }) {
|
|
|
3212
3215
|
});
|
|
3213
3216
|
return;
|
|
3214
3217
|
}
|
|
3215
|
-
let r =
|
|
3218
|
+
let r = U(e);
|
|
3216
3219
|
if (r) {
|
|
3217
|
-
if (
|
|
3220
|
+
if (ee.current && g) {
|
|
3218
3221
|
let e = t.find((e) => e.id === g);
|
|
3219
3222
|
if (e) {
|
|
3220
3223
|
let t = Pn(r, [e]);
|
|
3221
|
-
t && i((e) => e.map((e) => e.id ===
|
|
3224
|
+
t && i((e) => e.map((e) => e.id === ee.current ? {
|
|
3222
3225
|
...e,
|
|
3223
3226
|
wallIndex: t.wallIndex,
|
|
3224
3227
|
t: t.t
|
|
@@ -3262,12 +3265,12 @@ function tr({ className: e }) {
|
|
|
3262
3265
|
}
|
|
3263
3266
|
}
|
|
3264
3267
|
}
|
|
3265
|
-
function
|
|
3268
|
+
function ue(e) {
|
|
3266
3269
|
if (te.current) {
|
|
3267
3270
|
te.current = null;
|
|
3268
3271
|
return;
|
|
3269
3272
|
}
|
|
3270
|
-
let t =
|
|
3273
|
+
let t = U(e);
|
|
3271
3274
|
if (t) {
|
|
3272
3275
|
if (o === "rect" && v) {
|
|
3273
3276
|
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);
|
|
@@ -3277,10 +3280,10 @@ function tr({ className: e }) {
|
|
|
3277
3280
|
points: Ln(e, r, i, a)
|
|
3278
3281
|
}]), y(null), x(null);
|
|
3279
3282
|
}
|
|
3280
|
-
|
|
3283
|
+
ee.current = null, I.current = null;
|
|
3281
3284
|
}
|
|
3282
3285
|
}
|
|
3283
|
-
function
|
|
3286
|
+
function de(e) {
|
|
3284
3287
|
l && n((t) => t.map((t) => t.id === l ? {
|
|
3285
3288
|
...t,
|
|
3286
3289
|
name: e
|
|
@@ -3333,7 +3336,7 @@ function tr({ className: e }) {
|
|
|
3333
3336
|
},
|
|
3334
3337
|
{
|
|
3335
3338
|
t: "rect",
|
|
3336
|
-
icon:
|
|
3339
|
+
icon: L,
|
|
3337
3340
|
label: "Rectangle room"
|
|
3338
3341
|
},
|
|
3339
3342
|
{
|
|
@@ -3407,10 +3410,10 @@ function tr({ className: e }) {
|
|
|
3407
3410
|
ref: z,
|
|
3408
3411
|
className: f(Q.roomDrawerCanvas, Ce),
|
|
3409
3412
|
viewBox: `${P.x} ${P.y} ${J} ${Se}`,
|
|
3410
|
-
onMouseDown:
|
|
3411
|
-
onMouseMove:
|
|
3412
|
-
onMouseUp:
|
|
3413
|
-
onDoubleClick:
|
|
3413
|
+
onMouseDown: G,
|
|
3414
|
+
onMouseMove: q,
|
|
3415
|
+
onMouseUp: ue,
|
|
3416
|
+
onDoubleClick: K,
|
|
3414
3417
|
children: [
|
|
3415
3418
|
/* @__PURE__ */ V("defs", { children: /* @__PURE__ */ V("pattern", {
|
|
3416
3419
|
id: "rd-grid",
|
|
@@ -3478,7 +3481,7 @@ function tr({ className: e }) {
|
|
|
3478
3481
|
r: 2.5,
|
|
3479
3482
|
className: Q.doorMarker,
|
|
3480
3483
|
onMouseDown: (t) => {
|
|
3481
|
-
t.button === 0 && (t.preventDefault(), t.stopPropagation(),
|
|
3484
|
+
t.button === 0 && (t.preventDefault(), t.stopPropagation(), ee.current = e.id);
|
|
3482
3485
|
}
|
|
3483
3486
|
}, e.id);
|
|
3484
3487
|
}),
|
|
@@ -3525,7 +3528,7 @@ function tr({ className: e }) {
|
|
|
3525
3528
|
/* @__PURE__ */ V("input", {
|
|
3526
3529
|
className: Q.roomDrawerInfoInput,
|
|
3527
3530
|
value: ve.name,
|
|
3528
|
-
onChange: (e) =>
|
|
3531
|
+
onChange: (e) => de(e.target.value),
|
|
3529
3532
|
placeholder: "Room name"
|
|
3530
3533
|
}),
|
|
3531
3534
|
/* @__PURE__ */ H("button", {
|
|
@@ -3538,7 +3541,7 @@ function tr({ className: e }) {
|
|
|
3538
3541
|
className: Q.roomDrawerInfoDelete,
|
|
3539
3542
|
onClick: pe,
|
|
3540
3543
|
title: "Delete room",
|
|
3541
|
-
children: /* @__PURE__ */ V(p, { icon:
|
|
3544
|
+
children: /* @__PURE__ */ V(p, { icon: R })
|
|
3542
3545
|
})
|
|
3543
3546
|
]
|
|
3544
3547
|
}),
|
|
@@ -3589,7 +3592,7 @@ function tr({ className: e }) {
|
|
|
3589
3592
|
className: Q.roomDrawerInfoDelete,
|
|
3590
3593
|
onClick: () => me(e.id),
|
|
3591
3594
|
title: "Delete door",
|
|
3592
|
-
children: /* @__PURE__ */ V(p, { icon:
|
|
3595
|
+
children: /* @__PURE__ */ V(p, { icon: R })
|
|
3593
3596
|
})
|
|
3594
3597
|
]
|
|
3595
3598
|
}, e.id))]
|
|
@@ -4337,6 +4340,8 @@ var $ = {
|
|
|
4337
4340
|
virtualListRow: "virtualList-row_TTY50",
|
|
4338
4341
|
"virtualList-row-no-divider": "virtualList-row-no-divider_Ct0gV",
|
|
4339
4342
|
virtualListRowNoDivider: "virtualList-row-no-divider_Ct0gV",
|
|
4343
|
+
"virtualList-row-no-hover": "virtualList-row-no-hover_2d3mH",
|
|
4344
|
+
virtualListRowNoHover: "virtualList-row-no-hover_2d3mH",
|
|
4340
4345
|
"virtualList-row-selected": "virtualList-row-selected_hwEN-",
|
|
4341
4346
|
virtualListRowSelected: "virtualList-row-selected_hwEN-",
|
|
4342
4347
|
"virtualList-row-draggable": "virtualList-row-draggable_I86ha",
|
|
@@ -4364,15 +4369,15 @@ var $ = {
|
|
|
4364
4369
|
};
|
|
4365
4370
|
//#endregion
|
|
4366
4371
|
//#region package/common/virtualList/virtualRow.tsx
|
|
4367
|
-
function Ir({ index: e, top: t, columnTemplate: n, isSelected: r, showDivider: i,
|
|
4368
|
-
let
|
|
4372
|
+
function Ir({ index: e, top: t, columnTemplate: n, isSelected: r, showDivider: i, hover: a, onClick: o, observer: c, ariaRowIndex: l, ariaPosInSet: d, ariaSetSize: p, rowRole: m, reorderable: h, draggable: g, isDragging: _, reserveToggleGutter: v, onMouseDown: y, onDragStart: b, onDragOver: x, onDragEnd: S, onDrop: C, onTouchStart: w, dropPosition: T, dropIndentPx: E, dropIndicatorClassName: D, dropIndicatorStyle: O, rowClassName: k, rowStyle: A, children: j }) {
|
|
4373
|
+
let M = u(null);
|
|
4369
4374
|
return s(() => {
|
|
4370
|
-
let e =
|
|
4371
|
-
if (!(!e || !
|
|
4372
|
-
}, [
|
|
4373
|
-
ref:
|
|
4375
|
+
let e = M.current;
|
|
4376
|
+
if (!(!e || !c)) return c.observe(e), () => c.unobserve(e);
|
|
4377
|
+
}, [c]), /* @__PURE__ */ H("div", {
|
|
4378
|
+
ref: M,
|
|
4374
4379
|
"data-index": e,
|
|
4375
|
-
className: f($.virtualListRow, r && $.virtualListRowSelected, !i && $.virtualListRowNoDivider,
|
|
4380
|
+
className: f($.virtualListRow, r && $.virtualListRowSelected, !i && $.virtualListRowNoDivider, !a && $.virtualListRowNoHover, h && $.virtualListRowDraggable, _ && $.virtualListRowDragging, T === "inside" && $.virtualListRowDropInside, k),
|
|
4376
4381
|
style: {
|
|
4377
4382
|
position: "absolute",
|
|
4378
4383
|
top: 0,
|
|
@@ -4383,32 +4388,32 @@ function Ir({ index: e, top: t, columnTemplate: n, isSelected: r, showDivider: i
|
|
|
4383
4388
|
display: "grid",
|
|
4384
4389
|
gridTemplateColumns: n
|
|
4385
4390
|
} : {},
|
|
4386
|
-
...
|
|
4387
|
-
...
|
|
4391
|
+
...v ? { paddingRight: 32 } : {},
|
|
4392
|
+
...A
|
|
4388
4393
|
},
|
|
4389
|
-
onClick:
|
|
4390
|
-
draggable:
|
|
4391
|
-
onMouseDown:
|
|
4392
|
-
onDragStart:
|
|
4393
|
-
onDragOver:
|
|
4394
|
-
onDragEnd:
|
|
4395
|
-
onDrop:
|
|
4396
|
-
onTouchStart:
|
|
4397
|
-
onContextMenu:
|
|
4394
|
+
onClick: o,
|
|
4395
|
+
draggable: g,
|
|
4396
|
+
onMouseDown: y,
|
|
4397
|
+
onDragStart: b,
|
|
4398
|
+
onDragOver: x,
|
|
4399
|
+
onDragEnd: S,
|
|
4400
|
+
onDrop: C ?? (g ? (e) => e.preventDefault() : void 0),
|
|
4401
|
+
onTouchStart: w,
|
|
4402
|
+
onContextMenu: g ? (e) => e.preventDefault() : void 0,
|
|
4398
4403
|
"aria-selected": r,
|
|
4399
|
-
"aria-rowindex":
|
|
4400
|
-
"aria-posinset":
|
|
4401
|
-
"aria-setsize":
|
|
4402
|
-
role:
|
|
4403
|
-
children: [(
|
|
4404
|
-
"data-drop-line":
|
|
4404
|
+
"aria-rowindex": l,
|
|
4405
|
+
"aria-posinset": d,
|
|
4406
|
+
"aria-setsize": p,
|
|
4407
|
+
role: m,
|
|
4408
|
+
children: [(T === "before" || T === "after") && /* @__PURE__ */ V("div", {
|
|
4409
|
+
"data-drop-line": T,
|
|
4405
4410
|
"aria-hidden": !0,
|
|
4406
|
-
className: f($.virtualListDropLine,
|
|
4411
|
+
className: f($.virtualListDropLine, T === "before" ? $.virtualListDropLineBefore : $.virtualListDropLineAfter, D),
|
|
4407
4412
|
style: {
|
|
4408
|
-
left:
|
|
4409
|
-
...
|
|
4413
|
+
left: E ?? 0,
|
|
4414
|
+
...O
|
|
4410
4415
|
}
|
|
4411
|
-
}),
|
|
4416
|
+
}), j]
|
|
4412
4417
|
});
|
|
4413
4418
|
}
|
|
4414
4419
|
//#endregion
|
|
@@ -4726,7 +4731,7 @@ function Yr({ columns: e, items: t, multiSelect: n, visibleColumnKeys: r, onVisi
|
|
|
4726
4731
|
//#endregion
|
|
4727
4732
|
//#region package/common/virtualList/useRowDrag.ts
|
|
4728
4733
|
function Xr({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longPressDelay: o, dragHandle: c, treeIndentPx: l, keys: f, depths: p, isGroupAt: m, rootRef: h, keysRef: g }) {
|
|
4729
|
-
let _ = u(null), [v, y] = d(null), [b, x] = d(null), S = u(null), C = u(n), w = u(r), T = u(t), E = u(p), D = u(m), O = u(!0), k = u(null), A = u(!1), j = u(null), M = u(0), N = u(0), P = u(null), F = u(!1), I = u(null),
|
|
4734
|
+
let _ = u(null), [v, y] = d(null), [b, x] = d(null), S = u(null), C = u(n), w = u(r), T = u(t), E = u(p), D = u(m), O = u(!0), k = u(null), A = u(!1), j = u(null), M = u(0), N = u(0), P = u(null), F = u(!1), I = u(null), ee = u(0), L = u(0), R = u(0), [te] = d(() => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)").matches : !1);
|
|
4730
4735
|
s(() => {
|
|
4731
4736
|
C.current = n, w.current = r, T.current = t, E.current = p, S.current = b, D.current = m;
|
|
4732
4737
|
});
|
|
@@ -4776,10 +4781,10 @@ function Xr({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
4776
4781
|
function oe() {
|
|
4777
4782
|
_.current = null, y(null);
|
|
4778
4783
|
}
|
|
4779
|
-
let
|
|
4784
|
+
let U = i((e) => {
|
|
4780
4785
|
let t = _.current, n = h.current;
|
|
4781
4786
|
if (t == null || !n) return;
|
|
4782
|
-
let r = I.current ? N.current -
|
|
4787
|
+
let r = I.current ? N.current - ee.current + R.current / 2 : N.current, i = document.elementFromPoint(e, r), a = i && n.contains(i) ? i.closest("[data-index]") : null;
|
|
4783
4788
|
if (!a) return;
|
|
4784
4789
|
let o = Number(a.dataset.index);
|
|
4785
4790
|
if (Number.isNaN(o)) return;
|
|
@@ -4799,26 +4804,26 @@ function Xr({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
4799
4804
|
}
|
|
4800
4805
|
let l = Br(s, o, r, c.top, c.height);
|
|
4801
4806
|
l != null && C.current?.(s, l);
|
|
4802
|
-
}, [h, g]),
|
|
4807
|
+
}, [h, g]), se = i(() => {
|
|
4803
4808
|
let e = I.current;
|
|
4804
|
-
e && (e.style.transform = `translate(${
|
|
4805
|
-
}, []),
|
|
4809
|
+
e && (e.style.transform = `translate(${L.current}px, ${N.current - ee.current}px)`);
|
|
4810
|
+
}, []), W = i(() => {
|
|
4806
4811
|
let e = h.current;
|
|
4807
4812
|
if (!e || !A.current) {
|
|
4808
4813
|
P.current = null;
|
|
4809
4814
|
return;
|
|
4810
4815
|
}
|
|
4811
4816
|
let t = e.getBoundingClientRect(), n = M.current, r = N.current, i = 0;
|
|
4812
|
-
n >= t.left && n <= t.right && r >= t.top && r <= t.bottom && (r < t.top + 48 ? i = -Math.min(18, Math.ceil((t.top + 48 - r) / 3)) : r > t.bottom - 48 && (i = Math.min(18, Math.ceil((r - (t.bottom - 48)) / 3)))), i !== 0 && (e.scrollTop += i,
|
|
4813
|
-
}, [
|
|
4814
|
-
if (k.current != null && (clearTimeout(k.current), k.current = null), window.removeEventListener("touchmove",
|
|
4817
|
+
n >= t.left && n <= t.right && r >= t.top && r <= t.bottom && (r < t.top + 48 ? i = -Math.min(18, Math.ceil((t.top + 48 - r) / 3)) : r > t.bottom - 48 && (i = Math.min(18, Math.ceil((r - (t.bottom - 48)) / 3)))), i !== 0 && (e.scrollTop += i, U(n)), P.current = requestAnimationFrame(W);
|
|
4818
|
+
}, [U, h]), ce = i(() => {
|
|
4819
|
+
if (k.current != null && (clearTimeout(k.current), k.current = null), window.removeEventListener("touchmove", le), window.removeEventListener("touchend", ce), window.removeEventListener("touchcancel", ce), P.current != null && (cancelAnimationFrame(P.current), P.current = null), I.current &&= (I.current.remove(), null), document.body.style.touchAction = "", document.body.style.overscrollBehavior = "", A.current && (F.current = !0, setTimeout(() => {
|
|
4815
4820
|
F.current = !1;
|
|
4816
4821
|
}, 350), T.current)) {
|
|
4817
4822
|
let e = _.current, t = S.current;
|
|
4818
4823
|
e != null && t && t.key !== e && w.current?.(e, t);
|
|
4819
4824
|
}
|
|
4820
4825
|
x(null), A.current = !1, j.current = null, _.current = null, y(null);
|
|
4821
|
-
}, []),
|
|
4826
|
+
}, []), le = i((e) => {
|
|
4822
4827
|
let t = e.touches[0];
|
|
4823
4828
|
if (t) {
|
|
4824
4829
|
if (M.current = t.clientX, N.current = t.clientY, !A.current) {
|
|
@@ -4826,23 +4831,23 @@ function Xr({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
4826
4831
|
e != null && Math.abs(t.clientY - e) > 10 && k.current != null && (clearTimeout(k.current), k.current = null);
|
|
4827
4832
|
return;
|
|
4828
4833
|
}
|
|
4829
|
-
e.cancelable && e.preventDefault(),
|
|
4834
|
+
e.cancelable && e.preventDefault(), se(), U(t.clientX);
|
|
4830
4835
|
}
|
|
4831
|
-
}, [
|
|
4832
|
-
function
|
|
4836
|
+
}, [U, se]);
|
|
4837
|
+
function G(n, r) {
|
|
4833
4838
|
if (!e && !t || c && !r.target.closest("[data-drag-handle]") || k.current != null || A.current) return;
|
|
4834
4839
|
let i = r.touches[0];
|
|
4835
|
-
i && (j.current = i.clientY, M.current = i.clientX, N.current = i.clientY, window.addEventListener("touchmove",
|
|
4836
|
-
k.current = null, A.current = !0, _.current = n, y(n), navigator.vibrate?.(10), document.body.style.touchAction = "none", document.body.style.overscrollBehavior = "none",
|
|
4840
|
+
i && (j.current = i.clientY, M.current = i.clientX, N.current = i.clientY, window.addEventListener("touchmove", le, { passive: !1 }), window.addEventListener("touchend", ce), window.addEventListener("touchcancel", ce), k.current = window.setTimeout(() => {
|
|
4841
|
+
k.current = null, A.current = !0, _.current = n, y(n), navigator.vibrate?.(10), document.body.style.touchAction = "none", document.body.style.overscrollBehavior = "none", K(n), P.current ??= requestAnimationFrame(W);
|
|
4837
4842
|
}, o));
|
|
4838
4843
|
}
|
|
4839
|
-
function
|
|
4844
|
+
function K(e) {
|
|
4840
4845
|
let t = h.current;
|
|
4841
4846
|
if (!t) return;
|
|
4842
4847
|
let n = g.current.indexOf(e), r = t.querySelector(`[data-index="${n}"]`);
|
|
4843
4848
|
if (!r) return;
|
|
4844
4849
|
let i = r.getBoundingClientRect();
|
|
4845
|
-
|
|
4850
|
+
ee.current = N.current - i.top, L.current = i.left, R.current = i.height;
|
|
4846
4851
|
let a = r.cloneNode(!0);
|
|
4847
4852
|
a.removeAttribute("data-index"), a.setAttribute("data-drag-clone", "true"), a.setAttribute("aria-hidden", "true"), a.classList.add($.virtualListDragClone), Object.assign(a.style, {
|
|
4848
4853
|
position: "fixed",
|
|
@@ -4857,56 +4862,56 @@ function Xr({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
4857
4862
|
background: "var(--background)",
|
|
4858
4863
|
boxShadow: "var(--card-shadow)",
|
|
4859
4864
|
borderRadius: "var(--default-border-radius)"
|
|
4860
|
-
}), t.appendChild(a), I.current = a,
|
|
4865
|
+
}), t.appendChild(a), I.current = a, se();
|
|
4861
4866
|
}
|
|
4862
|
-
a(() =>
|
|
4863
|
-
let
|
|
4864
|
-
function
|
|
4867
|
+
a(() => ce, [ce]);
|
|
4868
|
+
let q = e || t;
|
|
4869
|
+
function ue(n, r) {
|
|
4865
4870
|
let i = t && b?.key === r ? b.position : void 0;
|
|
4866
4871
|
return {
|
|
4867
|
-
reorderable:
|
|
4868
|
-
draggable:
|
|
4869
|
-
isDragging:
|
|
4870
|
-
onMouseDown:
|
|
4871
|
-
onDragStart:
|
|
4872
|
+
reorderable: q,
|
|
4873
|
+
draggable: q && !te || void 0,
|
|
4874
|
+
isDragging: q && r === v,
|
|
4875
|
+
onMouseDown: q && c ? ne : void 0,
|
|
4876
|
+
onDragStart: q ? (e) => z(r, e) : void 0,
|
|
4872
4877
|
onDragOver: t ? (e) => B(n, e) : e ? (e) => ae(n, e) : void 0,
|
|
4873
4878
|
onDragEnd: t ? ie : e ? oe : void 0,
|
|
4874
4879
|
onDrop: t ? H : void 0,
|
|
4875
|
-
onTouchStart:
|
|
4880
|
+
onTouchStart: q ? (e) => G(r, e) : void 0,
|
|
4876
4881
|
dropPosition: i,
|
|
4877
4882
|
dropIndentPx: i ? (p[n] ?? 0) * l : void 0
|
|
4878
4883
|
};
|
|
4879
4884
|
}
|
|
4880
|
-
function
|
|
4885
|
+
function de() {
|
|
4881
4886
|
return F.current ? (F.current = !1, !0) : !1;
|
|
4882
4887
|
}
|
|
4883
4888
|
return {
|
|
4884
4889
|
draggingKey: v,
|
|
4885
|
-
dragEnabled:
|
|
4886
|
-
getRowDragProps:
|
|
4887
|
-
consumeSuppressedClick:
|
|
4890
|
+
dragEnabled: q,
|
|
4891
|
+
getRowDragProps: ue,
|
|
4892
|
+
consumeSuppressedClick: de
|
|
4888
4893
|
};
|
|
4889
4894
|
}
|
|
4890
4895
|
//#endregion
|
|
4891
4896
|
//#region package/common/virtualList/virtualList.tsx
|
|
4892
|
-
function Zr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedRowHeight: a = 40, overscan: o = 3, rowGap: s = 0, selectedKey: l, getItemKey: u, onRowClick: d, visibleColumnKeys: m, onVisibleColumnsChange: h, persistColumnsKey: g, showColumnToggle: _, onLoadMore: v, loadMoreThreshold: y = 100, isLoading: b = !1, multiSelect: x = !1, selectedKeys: S, onSelectionChange: C, reorderable: w = !1, onReorder: T, longPressDelay: E = 400, treeReorder: D = !1, getItemDepth: O, isGroup: A, onTreeDrop: j, treeIndentPx: M = 24, dragHandle: N = !1, showDivider: P = !0,
|
|
4893
|
-
let
|
|
4897
|
+
function Zr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedRowHeight: a = 40, overscan: o = 3, rowGap: s = 0, selectedKey: l, getItemKey: u, onRowClick: d, visibleColumnKeys: m, onVisibleColumnsChange: h, persistColumnsKey: g, showColumnToggle: _, onLoadMore: v, loadMoreThreshold: y = 100, isLoading: b = !1, multiSelect: x = !1, selectedKeys: S, onSelectionChange: C, reorderable: w = !1, onReorder: T, longPressDelay: E = 400, treeReorder: D = !1, getItemDepth: O, isGroup: A, onTreeDrop: j, treeIndentPx: M = 24, dragHandle: N = !1, showDivider: P = !0, rowHover: F = !0, className: I, style: ee, classNames: L, styles: R, ...te }, ne) {
|
|
4898
|
+
let z = i((e, t) => u ? u(e, t) : t, [u]), re = c(() => e.map((e, t) => z(e, t)), [e, z]), ie = c(() => O ? e.map((e, t) => O(e, t)) : [], [e, O]), ae = i((t) => A ? A(e[t], t) : !1, [A, e]), oe = qr({
|
|
4894
4899
|
items: e,
|
|
4895
|
-
keys:
|
|
4900
|
+
keys: re,
|
|
4896
4901
|
getItemKey: u,
|
|
4897
4902
|
estimatedRowHeight: a,
|
|
4898
4903
|
rowGap: s,
|
|
4899
4904
|
overscan: o,
|
|
4900
4905
|
onLoadMore: v,
|
|
4901
4906
|
loadMoreThreshold: y,
|
|
4902
|
-
forwardedRef:
|
|
4903
|
-
}), { rootRef:
|
|
4907
|
+
forwardedRef: ne
|
|
4908
|
+
}), { rootRef: U, headerRef: se, rowObserver: W, keysRef: ce, offsets: le, totalHeight: G, startIndex: K, endIndex: q } = oe, ue = Jr({
|
|
4904
4909
|
items: e,
|
|
4905
|
-
getKey:
|
|
4910
|
+
getKey: z,
|
|
4906
4911
|
multiSelect: x,
|
|
4907
4912
|
selectedKeys: S,
|
|
4908
4913
|
onSelectionChange: C
|
|
4909
|
-
}), { effectiveSelectedKeys: de } =
|
|
4914
|
+
}), { effectiveSelectedKeys: de } = ue, { hasColumns: fe, visibleColumns: pe, columnTemplate: me, shouldShowToggle: he, effectiveVisible: ge, manuallyHiddenCount: _e, toggleOpen: ve, setToggleOpen: ye, toggleRef: be, handleToggleColumn: xe } = Yr({
|
|
4910
4915
|
columns: n,
|
|
4911
4916
|
items: e,
|
|
4912
4917
|
multiSelect: x,
|
|
@@ -4914,11 +4919,11 @@ function Zr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4914
4919
|
onVisibleColumnsChange: h,
|
|
4915
4920
|
persistColumnsKey: g,
|
|
4916
4921
|
showColumnToggle: _,
|
|
4917
|
-
rootRef:
|
|
4918
|
-
startIndex:
|
|
4919
|
-
endIndex:
|
|
4920
|
-
containerHeight:
|
|
4921
|
-
}),
|
|
4922
|
+
rootRef: U,
|
|
4923
|
+
startIndex: K,
|
|
4924
|
+
endIndex: q,
|
|
4925
|
+
containerHeight: oe.containerHeight
|
|
4926
|
+
}), J = Xr({
|
|
4922
4927
|
reorderable: w,
|
|
4923
4928
|
treeReorder: D,
|
|
4924
4929
|
onReorder: T,
|
|
@@ -4926,44 +4931,45 @@ function Zr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4926
4931
|
longPressDelay: E,
|
|
4927
4932
|
dragHandle: N,
|
|
4928
4933
|
treeIndentPx: M,
|
|
4929
|
-
keys:
|
|
4930
|
-
depths:
|
|
4931
|
-
isGroupAt:
|
|
4932
|
-
rootRef:
|
|
4933
|
-
keysRef:
|
|
4934
|
-
}),
|
|
4935
|
-
let r = e[n], i =
|
|
4934
|
+
keys: re,
|
|
4935
|
+
depths: ie,
|
|
4936
|
+
isGroupAt: ae,
|
|
4937
|
+
rootRef: U,
|
|
4938
|
+
keysRef: ce
|
|
4939
|
+
}), Se = (n) => {
|
|
4940
|
+
let r = e[n], i = z(r, n), a = l != null && i === l || de.has(i), o = J.getRowDragProps(n, i);
|
|
4936
4941
|
return /* @__PURE__ */ V(Ir, {
|
|
4937
4942
|
index: n,
|
|
4938
4943
|
top: le[n],
|
|
4939
|
-
columnTemplate:
|
|
4944
|
+
columnTemplate: me,
|
|
4940
4945
|
isSelected: a,
|
|
4941
4946
|
showDivider: P,
|
|
4947
|
+
hover: F,
|
|
4942
4948
|
onClick: () => {
|
|
4943
|
-
|
|
4949
|
+
J.consumeSuppressedClick() || d?.(r, n);
|
|
4944
4950
|
},
|
|
4945
|
-
observer:
|
|
4946
|
-
ariaRowIndex:
|
|
4947
|
-
ariaPosInSet:
|
|
4948
|
-
ariaSetSize:
|
|
4949
|
-
rowRole:
|
|
4950
|
-
reserveToggleGutter:
|
|
4951
|
+
observer: W,
|
|
4952
|
+
ariaRowIndex: fe ? n + 2 : void 0,
|
|
4953
|
+
ariaPosInSet: fe ? void 0 : n + 1,
|
|
4954
|
+
ariaSetSize: fe ? void 0 : e.length,
|
|
4955
|
+
rowRole: fe ? "row" : "listitem",
|
|
4956
|
+
reserveToggleGutter: he,
|
|
4951
4957
|
...o,
|
|
4952
4958
|
dropIndicatorClassName: L?.dropIndicator,
|
|
4953
4959
|
dropIndicatorStyle: R?.dropIndicator,
|
|
4954
4960
|
rowClassName: L?.row,
|
|
4955
4961
|
rowStyle: R?.row,
|
|
4956
|
-
children:
|
|
4962
|
+
children: fe ? /* @__PURE__ */ H(B, { children: [x && /* @__PURE__ */ V("div", {
|
|
4957
4963
|
className: f($.virtualListSelectCell, L?.selectCell),
|
|
4958
4964
|
style: R?.selectCell,
|
|
4959
4965
|
role: "gridcell",
|
|
4960
4966
|
onClick: (e) => e.stopPropagation(),
|
|
4961
4967
|
children: /* @__PURE__ */ V(qe, {
|
|
4962
4968
|
selected: de.has(i),
|
|
4963
|
-
onToggle: () =>
|
|
4969
|
+
onToggle: () => ue.handleRowSelect(i),
|
|
4964
4970
|
"aria-label": "Select row"
|
|
4965
4971
|
})
|
|
4966
|
-
}),
|
|
4972
|
+
}), pe.map((e) => /* @__PURE__ */ V("div", {
|
|
4967
4973
|
className: f($.virtualListCell, L?.cell),
|
|
4968
4974
|
style: R?.cell,
|
|
4969
4975
|
role: "gridcell",
|
|
@@ -4971,28 +4977,28 @@ function Zr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4971
4977
|
children: e.renderCell(r, n)
|
|
4972
4978
|
}, e.key))] }) : t?.(r, n)
|
|
4973
4979
|
}, i);
|
|
4974
|
-
},
|
|
4975
|
-
for (let e =
|
|
4976
|
-
let
|
|
4977
|
-
return
|
|
4978
|
-
...
|
|
4979
|
-
ref:
|
|
4980
|
-
className: f($.virtualList,
|
|
4980
|
+
}, Ce = [];
|
|
4981
|
+
for (let e = K; e <= q; e++) Ce.push(Se(e));
|
|
4982
|
+
let Te = J.draggingKey == null ? -1 : re.indexOf(J.draggingKey);
|
|
4983
|
+
return Te >= 0 && (Te < K || Te > q) && Ce.push(Se(Te)), /* @__PURE__ */ H("div", {
|
|
4984
|
+
...te,
|
|
4985
|
+
ref: U,
|
|
4986
|
+
className: f($.virtualList, J.draggingKey != null && $.virtualListReordering, I, L?.root),
|
|
4981
4987
|
style: {
|
|
4982
4988
|
height: r,
|
|
4983
|
-
...
|
|
4989
|
+
...ee,
|
|
4984
4990
|
...R?.root
|
|
4985
4991
|
},
|
|
4986
|
-
onScroll:
|
|
4987
|
-
role:
|
|
4988
|
-
"aria-rowcount":
|
|
4992
|
+
onScroll: oe.handleScroll,
|
|
4993
|
+
role: fe ? "grid" : "list",
|
|
4994
|
+
"aria-rowcount": fe ? e.length + 1 : void 0,
|
|
4989
4995
|
children: [
|
|
4990
|
-
|
|
4996
|
+
fe && /* @__PURE__ */ H("div", {
|
|
4991
4997
|
ref: se,
|
|
4992
4998
|
className: f($.virtualListHeader, L?.header),
|
|
4993
4999
|
style: {
|
|
4994
|
-
gridTemplateColumns:
|
|
4995
|
-
...
|
|
5000
|
+
gridTemplateColumns: me,
|
|
5001
|
+
...he ? { paddingRight: 32 } : {},
|
|
4996
5002
|
...R?.header
|
|
4997
5003
|
},
|
|
4998
5004
|
role: "row",
|
|
@@ -5003,48 +5009,48 @@ function Zr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
5003
5009
|
style: R?.selectCell,
|
|
5004
5010
|
role: "columnheader",
|
|
5005
5011
|
children: /* @__PURE__ */ V(qe, {
|
|
5006
|
-
selected:
|
|
5007
|
-
onToggle:
|
|
5012
|
+
selected: ue.allSelected || ue.someSelected,
|
|
5013
|
+
onToggle: ue.handleSelectAll,
|
|
5008
5014
|
"aria-label": "Select all rows"
|
|
5009
5015
|
})
|
|
5010
5016
|
}),
|
|
5011
|
-
|
|
5017
|
+
pe.map((e) => /* @__PURE__ */ V("div", {
|
|
5012
5018
|
className: f($.virtualListHeaderCell, L?.headerCell),
|
|
5013
5019
|
style: R?.headerCell,
|
|
5014
5020
|
role: "columnheader",
|
|
5015
5021
|
"data-fit-key": e.width.type === "fit" ? e.key : void 0,
|
|
5016
5022
|
children: e.label
|
|
5017
5023
|
}, e.key)),
|
|
5018
|
-
|
|
5019
|
-
ref:
|
|
5024
|
+
he && /* @__PURE__ */ H("div", {
|
|
5025
|
+
ref: be,
|
|
5020
5026
|
className: $.virtualListToggleWrapper,
|
|
5021
5027
|
children: [
|
|
5022
5028
|
/* @__PURE__ */ V("button", {
|
|
5023
5029
|
type: "button",
|
|
5024
5030
|
className: f($.virtualListHeaderToggle, L?.headerToggle),
|
|
5025
5031
|
style: R?.headerToggle,
|
|
5026
|
-
onClick: () =>
|
|
5032
|
+
onClick: () => ye((e) => !e),
|
|
5027
5033
|
"aria-label": "Toggle column visibility",
|
|
5028
5034
|
children: /* @__PURE__ */ V(p, {
|
|
5029
5035
|
icon: k,
|
|
5030
5036
|
style: R?.headerToggle
|
|
5031
5037
|
})
|
|
5032
5038
|
}),
|
|
5033
|
-
|
|
5039
|
+
_e > 0 && /* @__PURE__ */ V("span", {
|
|
5034
5040
|
className: f($.virtualListColumnChip, L?.columnChip),
|
|
5035
5041
|
style: R?.columnChip,
|
|
5036
|
-
"data-column-hidden-count":
|
|
5037
|
-
"aria-label": `${
|
|
5038
|
-
children:
|
|
5042
|
+
"data-column-hidden-count": _e,
|
|
5043
|
+
"aria-label": `${_e} columns hidden`,
|
|
5044
|
+
children: _e
|
|
5039
5045
|
}),
|
|
5040
|
-
|
|
5046
|
+
ve && /* @__PURE__ */ V("div", {
|
|
5041
5047
|
className: f($.virtualListTogglePopover, L?.togglePopover),
|
|
5042
5048
|
style: R?.togglePopover,
|
|
5043
5049
|
children: n.map((e) => /* @__PURE__ */ V(qe, {
|
|
5044
5050
|
className: f($.virtualListToggleItem, L?.toggleItem),
|
|
5045
5051
|
style: R?.toggleItem,
|
|
5046
|
-
selected:
|
|
5047
|
-
onToggle: () =>
|
|
5052
|
+
selected: ge.has(e.key),
|
|
5053
|
+
onToggle: () => xe(e.key),
|
|
5048
5054
|
cursorDefault: !1,
|
|
5049
5055
|
children: e.label
|
|
5050
5056
|
}, e.key))
|
|
@@ -5059,12 +5065,12 @@ function Zr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
5059
5065
|
}) : /* @__PURE__ */ V("div", {
|
|
5060
5066
|
className: f($.virtualListBody, L?.body),
|
|
5061
5067
|
style: {
|
|
5062
|
-
height:
|
|
5068
|
+
height: G,
|
|
5063
5069
|
...R?.body
|
|
5064
5070
|
},
|
|
5065
|
-
children:
|
|
5071
|
+
children: Ce
|
|
5066
5072
|
}),
|
|
5067
|
-
|
|
5073
|
+
oe.showLoadMoreSpinner && /* @__PURE__ */ V("div", {
|
|
5068
5074
|
className: f($.virtualListLoadingIndicator, L?.loadingIndicator),
|
|
5069
5075
|
style: R?.loadingIndicator,
|
|
5070
5076
|
children: /* @__PURE__ */ V(we, { className: $.virtualListSpinner })
|