@ahrowe/ui 0.1.2 → 0.1.4
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 +427 -435
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/package/common/idleManager/idleManager.d.ts +2 -25
- package/dist/types/package/common/idleManager/idleManager.types.d.ts +8 -0
- package/dist/types/package/common/idleManager/index.d.ts +1 -2
- package/dist/types/package/common/infiniteBlock/index.d.ts +1 -2
- package/dist/types/package/common/infiniteBlock/infiniteBlock.d.ts +3 -30
- package/dist/types/package/common/infiniteBlock/infiniteBlock.types.d.ts +11 -0
- package/dist/types/package/common/roomViewer/index.d.ts +1 -2
- package/dist/types/package/common/roomViewer/roomViewer.d.ts +2 -25
- package/dist/types/package/common/roomViewer/roomViewer.types.d.ts +10 -0
- package/dist/types/package/common/themeProvider/defaultTheme.d.ts +7 -0
- package/dist/types/package/common/themeProvider/index.d.ts +1 -0
- package/dist/types/package/common/themeProvider/theme.types.d.ts +1 -0
- package/dist/types/package/common/themeProvider/themeProvider.d.ts +1 -1
- package/package.json +2 -1
- package/dist/types/package/common/searchInputModern/index.d.ts +0 -2
- package/dist/types/package/common/searchInputModern/searchInputModern.d.ts +0 -39
package/dist/index.mjs
CHANGED
|
@@ -4,9 +4,9 @@ import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
|
|
|
4
4
|
import { faCheck as m, faChevronDown as h, faChevronLeft as g, faChevronRight as _, faDoorOpen as v, faDownload as y, faDrawPolygon as b, faEnvelope as x, faEye as S, faEyeSlash as C, faHandPointer as w, faMagnifyingGlassMinus as T, faMagnifyingGlassPlus as E, faPen as ee, faPhone as D, faPlus as O, faSearch as te, faSquare as ne, faTrash as re, faUpload as k, faXmark as A, faXmarkCircle as j } from "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
import { Fragment as ie, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
6
6
|
import { createPortal as P } from "react-dom";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import ae from "downshift";
|
|
8
|
+
import F from "@mona-health/react-input-mask";
|
|
9
|
+
import I from "prop-types";
|
|
10
10
|
import { DndContext as oe, DragOverlay as se, PointerSensor as ce, closestCorners as L, useDroppable as le, useSensor as ue, useSensors as de } from "@dnd-kit/core";
|
|
11
11
|
import { SortableContext as fe, arrayMove as pe, useSortable as R, verticalListSortingStrategy as me } from "@dnd-kit/sortable";
|
|
12
12
|
import { CSS as he } from "@dnd-kit/utilities";
|
|
@@ -830,7 +830,7 @@ var K = {
|
|
|
830
830
|
}({});
|
|
831
831
|
//#endregion
|
|
832
832
|
//#region package/common/input/input.tsx
|
|
833
|
-
function $e({ 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: w = !1, tabIndex: T = 0, type: E = void 0, isRow: O = !1, onIconClick: ne = null, parse: re = null, formValidator: k = null, autoFocus: j = !1, suffix: ie = null, upperRightLabel: P = null, labelInBorder:
|
|
833
|
+
function $e({ 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: w = !1, tabIndex: T = 0, type: E = void 0, isRow: O = !1, onIconClick: ne = null, parse: re = null, formValidator: k = null, autoFocus: j = !1, suffix: ie = null, upperRightLabel: P = null, labelInBorder: ae = !1, showCancel: F = !1, onClearClicked: I, min: oe = null, max: se = null, placeholder: ce = "", useMatLabelStyle: L = !0, autoComplete: le = null, onClick: ue = () => null, readOnly: de = !1, customInput: fe, alwaysShowCancel: pe = !1, multiline: R = !1, rows: me, autoResize: he = !1, classNames: z, styles: B }) {
|
|
834
834
|
let [ge, _e] = d(!1), [ve, ye] = d(!1), [be, xe] = d(!1), [, V] = d(0), Se = u(null), Ce = u(k), H = i(() => {
|
|
835
835
|
let e = Se.current;
|
|
836
836
|
!e || !he || (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
@@ -886,7 +886,7 @@ function $e({ name: t = "", label: n = "", errorMessage: r = "", isValid: o = !0
|
|
|
886
886
|
htmlFor: t,
|
|
887
887
|
className: f(K.inputLabel, z?.label, {
|
|
888
888
|
[K.inputLabelColumn]: !O,
|
|
889
|
-
[K.inputLabelInBorder]:
|
|
889
|
+
[K.inputLabelInBorder]: ae
|
|
890
890
|
}),
|
|
891
891
|
style: B?.label,
|
|
892
892
|
children: [
|
|
@@ -996,10 +996,10 @@ function $e({ name: t = "", label: n = "", errorMessage: r = "", isValid: o = !0
|
|
|
996
996
|
icon: be ? C : S,
|
|
997
997
|
...Ne
|
|
998
998
|
}),
|
|
999
|
-
(
|
|
999
|
+
(F && l && (ge || ve) || pe) && /* @__PURE__ */ M(p, {
|
|
1000
1000
|
icon: A,
|
|
1001
1001
|
className: K.inputFieldIcon,
|
|
1002
|
-
onClick:
|
|
1002
|
+
onClick: I ?? void 0,
|
|
1003
1003
|
onMouseEnter: () => ye(!0),
|
|
1004
1004
|
onMouseLeave: () => ye(!1)
|
|
1005
1005
|
})
|
|
@@ -1480,81 +1480,61 @@ function Nt({ className: e = "", month: t = (/* @__PURE__ */ new Date()).getMont
|
|
|
1480
1480
|
})
|
|
1481
1481
|
});
|
|
1482
1482
|
}
|
|
1483
|
-
var Pt = { infiniteBlock: "infiniteBlock_dFv-h" }
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
};
|
|
1497
|
-
state = {
|
|
1498
|
-
isLoadingOnScroll: !1,
|
|
1499
|
-
index: -1
|
|
1500
|
-
};
|
|
1501
|
-
componentDidMount() {
|
|
1502
|
-
document.addEventListener("keydown", this.respondToUserInput);
|
|
1503
|
-
}
|
|
1504
|
-
componentWillUnmount() {
|
|
1505
|
-
document.removeEventListener("keydown", this.respondToUserInput);
|
|
1483
|
+
var Pt = { infiniteBlock: "infiniteBlock_dFv-h" };
|
|
1484
|
+
//#endregion
|
|
1485
|
+
//#region package/common/infiniteBlock/infiniteBlock.tsx
|
|
1486
|
+
function Ft(e, t) {
|
|
1487
|
+
let n = e;
|
|
1488
|
+
for (; n.props.children !== null && typeof n.props.children == "object" && !Array.isArray(n.props.children);) n = n.props.children;
|
|
1489
|
+
let r = n.props.children;
|
|
1490
|
+
if (Array.isArray(r)) {
|
|
1491
|
+
let e = r;
|
|
1492
|
+
if (!e[0]?.props?.children) {
|
|
1493
|
+
for (let n of e) if (typeof n == "string" && n.trim().length > 0) return n.toLowerCase().startsWith(t);
|
|
1494
|
+
}
|
|
1495
|
+
return String(e[0].props.children).toLowerCase().startsWith(t);
|
|
1506
1496
|
}
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1497
|
+
return String(r).toLowerCase().startsWith(t);
|
|
1498
|
+
}
|
|
1499
|
+
function It(e, t, n) {
|
|
1500
|
+
let r = e + t;
|
|
1501
|
+
return r === n ? 0 : r < -1 ? n - 1 : r;
|
|
1502
|
+
}
|
|
1503
|
+
function Lt({ children: t, onScroll: n, className: r = "", isDataLoading: o = !1, setHighlightedIndex: s = () => null }) {
|
|
1504
|
+
let c = u(null), l = u(!1), [p, m] = d(!1), h = u(-1), g = u(null), _ = i(() => {
|
|
1505
|
+
let e = c.current;
|
|
1506
|
+
if (!e) return;
|
|
1507
|
+
let { scrollTop: t, offsetHeight: r, scrollHeight: i } = e;
|
|
1508
|
+
Math.abs(t + r - i) > 5 || l.current || (l.current = !0, m(!0), n().then(() => {
|
|
1509
|
+
l.current = !1, m(!1);
|
|
1510
|
+
}));
|
|
1511
|
+
}, [n]), v = i((n) => {
|
|
1512
|
+
let r = c.current;
|
|
1513
|
+
if (!r) return;
|
|
1514
|
+
let i = e.Children.toArray(t), { scrollHeight: a, childElementCount: o } = r, l = a / o, u = h.current;
|
|
1515
|
+
switch (n.key) {
|
|
1514
1516
|
case "ArrowDown":
|
|
1515
|
-
|
|
1517
|
+
u = It(u, 1, i.length);
|
|
1516
1518
|
break;
|
|
1517
1519
|
case "ArrowUp":
|
|
1518
|
-
|
|
1520
|
+
u = It(u, -1, i.length);
|
|
1519
1521
|
break;
|
|
1520
|
-
default: for (let
|
|
1521
|
-
if (
|
|
1522
|
-
|
|
1522
|
+
default: for (let e = 0; e < i.length; e++) if (Ft(i[e], n.key)) {
|
|
1523
|
+
if (u >= e && g.current === n.key) continue;
|
|
1524
|
+
u = e;
|
|
1523
1525
|
break;
|
|
1524
1526
|
}
|
|
1525
1527
|
}
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
for (let e = 0; e < n.length; e += 1) if (typeof n[e] == "string" && n[e].trim().length > 0) return n[e].toLowerCase().startsWith(t);
|
|
1537
|
-
}
|
|
1538
|
-
return n[0].props.children.toString().toLowerCase().startsWith(t);
|
|
1539
|
-
}
|
|
1540
|
-
return n.props.children.toString().toLowerCase().startsWith(t);
|
|
1541
|
-
};
|
|
1542
|
-
addToIndex(e, t) {
|
|
1543
|
-
let { children: n } = this.props, r = t + e;
|
|
1544
|
-
return r === n.length ? 0 : r < -1 ? n.length - 1 : r;
|
|
1545
|
-
}
|
|
1546
|
-
render() {
|
|
1547
|
-
let { isLoadingOnScroll: e } = this.state, { children: t, className: n, isDataLoading: r } = this.props;
|
|
1548
|
-
return /* @__PURE__ */ N("div", {
|
|
1549
|
-
className: f(Pt.infiniteBlock, n),
|
|
1550
|
-
onScroll: this.onScroll,
|
|
1551
|
-
ref: (e) => {
|
|
1552
|
-
this.tableBody = e;
|
|
1553
|
-
},
|
|
1554
|
-
children: [r ? /* @__PURE__ */ M(H, {}) : t, e && /* @__PURE__ */ M(H, { isScroll: !0 })]
|
|
1555
|
-
});
|
|
1556
|
-
}
|
|
1557
|
-
}, Y = {
|
|
1528
|
+
h.current = u, g.current = n.key, u >= 0 && (r.scrollTop = u * l, s(u));
|
|
1529
|
+
}, [t, s]);
|
|
1530
|
+
return a(() => (document.addEventListener("keydown", v), () => document.removeEventListener("keydown", v)), [v]), /* @__PURE__ */ N("div", {
|
|
1531
|
+
className: f(Pt.infiniteBlock, r),
|
|
1532
|
+
onScroll: _,
|
|
1533
|
+
ref: c,
|
|
1534
|
+
children: [o ? /* @__PURE__ */ M(H, {}) : t, p && /* @__PURE__ */ M(H, {})]
|
|
1535
|
+
});
|
|
1536
|
+
}
|
|
1537
|
+
var Y = {
|
|
1558
1538
|
"required-mark": "required-mark_fy7Fm",
|
|
1559
1539
|
requiredMark: "required-mark_fy7Fm",
|
|
1560
1540
|
dropdown: "dropdown_XTshY",
|
|
@@ -1622,8 +1602,8 @@ var Pt = { infiniteBlock: "infiniteBlock_dFv-h" }, Ft = class extends n {
|
|
|
1622
1602
|
};
|
|
1623
1603
|
//#endregion
|
|
1624
1604
|
//#region package/common/dropdown/dropdown.tsx
|
|
1625
|
-
function
|
|
1626
|
-
let [F,
|
|
1605
|
+
function Rt({ 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: g = () => 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: ee = "", dropDownClassName: D = "", formValidator: O = null, labelClassName: te = "", dropDownInputClassName: ne = "", items: re = [], useMatLabelStyle: k = !0, placeholder: A = "", plainStyle: j = !1, scrollToSelected: ie = !1, reactRef: P }) {
|
|
1606
|
+
let [F, I] = d(!1), [oe, se] = d(!1), [, ce] = d(0), L = u(O);
|
|
1627
1607
|
a(() => {
|
|
1628
1608
|
if (L.current = O, !L.current) return;
|
|
1629
1609
|
L.current.label = n ?? "", L.current.validate();
|
|
@@ -1635,9 +1615,9 @@ function It({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1635
1615
|
}, ue = (e) => {
|
|
1636
1616
|
se(!1), C?.(e);
|
|
1637
1617
|
}, de = (e) => {
|
|
1638
|
-
|
|
1618
|
+
I(!0), b?.(e);
|
|
1639
1619
|
}, fe = (e) => {
|
|
1640
|
-
L.current && (L.current.touched = !0),
|
|
1620
|
+
L.current && (L.current.touched = !0), I(!1), x?.(e);
|
|
1641
1621
|
}, pe = () => O ? O.touched && O.hasError() : !i || !!e, R = () => !!(s || O?.validators.find((e) => e.validatorId === "required")), me = (e) => {
|
|
1642
1622
|
O ? (O.set(e), y?.(O.value, c)) : y?.(e, c);
|
|
1643
1623
|
}, he = w, z = O ? O.value : r, B = pe();
|
|
@@ -1648,7 +1628,7 @@ function It({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1648
1628
|
onMouseEnter: le,
|
|
1649
1629
|
onMouseLeave: ue,
|
|
1650
1630
|
children: [
|
|
1651
|
-
/* @__PURE__ */ M(
|
|
1631
|
+
/* @__PURE__ */ M(ae, {
|
|
1652
1632
|
onChange: (e) => me((e || { key: "" }).key),
|
|
1653
1633
|
itemToString: (e) => e ? String(e.key) : "",
|
|
1654
1634
|
selectedItem: re.find((e) => e.key === z) ?? null,
|
|
@@ -1692,14 +1672,13 @@ function It({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1692
1672
|
className: f(Y.dropdownInputButtonIconArrow, { [Y.dropdownInputButtonIconArrowOpen]: r })
|
|
1693
1673
|
})
|
|
1694
1674
|
}),
|
|
1695
|
-
!m && r ? /* @__PURE__ */ M(
|
|
1675
|
+
!m && r ? /* @__PURE__ */ M(Lt, {
|
|
1696
1676
|
onScroll: g,
|
|
1697
1677
|
className: f(Y.dropdownInputList, {
|
|
1698
1678
|
[Y.dropdownInputListOnTop]: _,
|
|
1699
1679
|
[Y.dropdownInputListWider]: T
|
|
1700
1680
|
}),
|
|
1701
1681
|
setHighlightedIndex: s,
|
|
1702
|
-
highlightedIndex: a,
|
|
1703
1682
|
children: re.map((t, n) => /* @__PURE__ */ M("div", {
|
|
1704
1683
|
...e({
|
|
1705
1684
|
index: n,
|
|
@@ -1751,7 +1730,7 @@ function It({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1751
1730
|
]
|
|
1752
1731
|
});
|
|
1753
1732
|
}
|
|
1754
|
-
var
|
|
1733
|
+
var zt = {
|
|
1755
1734
|
datePicker: "datePicker_ZohTp",
|
|
1756
1735
|
"datePicker-header": "datePicker-header_YmSWE",
|
|
1757
1736
|
datePickerHeader: "datePicker-header_YmSWE",
|
|
@@ -1768,8 +1747,8 @@ var Lt = {
|
|
|
1768
1747
|
};
|
|
1769
1748
|
//#endregion
|
|
1770
1749
|
//#region package/common/datePicker/datePicker.tsx
|
|
1771
|
-
function
|
|
1772
|
-
let T = () => r ? r.value : t, E = T() ?? /* @__PURE__ */ new Date(), [ee, D] = d(E.getMonth() + 1), [O, te] = d(E.getFullYear()), [ne, re] = d(!1), [k, A] = d(() => T() ? Ot(E) : ""), [j, P] = d(!1), [
|
|
1750
|
+
function Bt({ 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: v = !1, label: y = "", isValid: b = !0, errorMessage: x = "", isRequired: S = !1, startDate: C, endDate: w }) {
|
|
1751
|
+
let T = () => r ? r.value : t, E = T() ?? /* @__PURE__ */ new Date(), [ee, D] = d(E.getMonth() + 1), [O, te] = d(E.getFullYear()), [ne, re] = d(!1), [k, A] = d(() => T() ? Ot(E) : ""), [j, P] = d(!1), [ae, I] = d(!1), [, oe] = d(0), [se, ce] = d(t), L = u(r);
|
|
1773
1752
|
if (se !== t) {
|
|
1774
1753
|
ce(t);
|
|
1775
1754
|
let e = t ?? /* @__PURE__ */ new Date();
|
|
@@ -1810,31 +1789,31 @@ function Rt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1810
1789
|
}));
|
|
1811
1790
|
}, z = T(), B = le(), ge = /* @__PURE__ */ N(ie, { children: [
|
|
1812
1791
|
o ? null : /* @__PURE__ */ N("div", {
|
|
1813
|
-
className:
|
|
1792
|
+
className: zt.datePickerHeader,
|
|
1814
1793
|
children: [
|
|
1815
1794
|
/* @__PURE__ */ M(Fe, {
|
|
1816
1795
|
icon: g,
|
|
1817
1796
|
onClick: () => pe(-1)
|
|
1818
1797
|
}),
|
|
1819
1798
|
/* @__PURE__ */ M("div", {
|
|
1820
|
-
className:
|
|
1799
|
+
className: zt.datePickerHeaderMonthAndYearContainer,
|
|
1821
1800
|
children: /* @__PURE__ */ N("div", {
|
|
1822
|
-
className:
|
|
1823
|
-
children: [/* @__PURE__ */ M(
|
|
1801
|
+
className: zt.datePickerHeaderMonthAndYear,
|
|
1802
|
+
children: [/* @__PURE__ */ M(Rt, {
|
|
1824
1803
|
plainStyle: !0,
|
|
1825
1804
|
scrollToSelected: !0,
|
|
1826
1805
|
onChange: (e) => D(e),
|
|
1827
|
-
className:
|
|
1806
|
+
className: zt.datePickerHeaderMonth,
|
|
1828
1807
|
value: Ct(bt("-"), O, ee, 1),
|
|
1829
1808
|
items: wt().map((e, t) => ({
|
|
1830
1809
|
key: t + 1,
|
|
1831
1810
|
label: e
|
|
1832
1811
|
}))
|
|
1833
|
-
}), /* @__PURE__ */ M(
|
|
1812
|
+
}), /* @__PURE__ */ M(Rt, {
|
|
1834
1813
|
plainStyle: !0,
|
|
1835
1814
|
scrollToSelected: !0,
|
|
1836
1815
|
useMatLabelStyle: !1,
|
|
1837
|
-
className:
|
|
1816
|
+
className: zt.datePickerHeaderYear,
|
|
1838
1817
|
onChange: (e) => te(e),
|
|
1839
1818
|
value: O,
|
|
1840
1819
|
items: he()
|
|
@@ -1848,7 +1827,7 @@ function Rt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1848
1827
|
]
|
|
1849
1828
|
}),
|
|
1850
1829
|
/* @__PURE__ */ M(Nt, {
|
|
1851
|
-
className:
|
|
1830
|
+
className: zt.datePickerMonth,
|
|
1852
1831
|
month: ee,
|
|
1853
1832
|
year: O,
|
|
1854
1833
|
onSelect: fe,
|
|
@@ -1868,7 +1847,7 @@ function Rt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1868
1847
|
value: k,
|
|
1869
1848
|
onChange: (e) => A(e),
|
|
1870
1849
|
onClick: () => re(!0),
|
|
1871
|
-
customInput: /* @__PURE__ */ M(
|
|
1850
|
+
customInput: /* @__PURE__ */ M(F, {
|
|
1872
1851
|
mask: "99.99.9999",
|
|
1873
1852
|
maskPlaceholder: "_",
|
|
1874
1853
|
beforeMaskedStateChange: me
|
|
@@ -1894,29 +1873,29 @@ function Rt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1894
1873
|
children: _e
|
|
1895
1874
|
});
|
|
1896
1875
|
return /* @__PURE__ */ N("div", {
|
|
1897
|
-
className: f(
|
|
1876
|
+
className: f(zt.datePicker, e),
|
|
1898
1877
|
children: [
|
|
1899
1878
|
(s || c) && _e,
|
|
1900
1879
|
ve,
|
|
1901
1880
|
/* @__PURE__ */ M(Qe, {
|
|
1902
1881
|
variant: "error",
|
|
1903
1882
|
message: r ? r.getCurrentErrorMessage() : x || "",
|
|
1904
|
-
isVisible: B && (j ||
|
|
1883
|
+
isVisible: B && (j || ae)
|
|
1905
1884
|
})
|
|
1906
1885
|
]
|
|
1907
1886
|
});
|
|
1908
1887
|
}
|
|
1909
|
-
var
|
|
1888
|
+
var Vt = { emptyState: "emptyState_KXOIx" };
|
|
1910
1889
|
//#endregion
|
|
1911
1890
|
//#region package/common/emptyState/emptyState.tsx
|
|
1912
|
-
function
|
|
1891
|
+
function Ht({ className: e, icon: t, children: n, ...r }) {
|
|
1913
1892
|
return /* @__PURE__ */ N("div", {
|
|
1914
1893
|
...r,
|
|
1915
|
-
className: f(
|
|
1894
|
+
className: f(Vt.emptyState, e),
|
|
1916
1895
|
children: [t && /* @__PURE__ */ M(p, { icon: t }), /* @__PURE__ */ M("div", { children: n ?? "No entries available" })]
|
|
1917
1896
|
});
|
|
1918
1897
|
}
|
|
1919
|
-
var
|
|
1898
|
+
var Ut = {
|
|
1920
1899
|
fab: "fab_hyAAa",
|
|
1921
1900
|
"fab-content": "fab-content_IBiXm",
|
|
1922
1901
|
fabContent: "fab-content_IBiXm",
|
|
@@ -1924,19 +1903,19 @@ var Vt = {
|
|
|
1924
1903
|
fabContentContainer: "fab-content-container_FQD1x",
|
|
1925
1904
|
"fab-size-mini": "fab-size-mini_KP9BD",
|
|
1926
1905
|
fabSizeMini: "fab-size-mini_KP9BD"
|
|
1927
|
-
},
|
|
1906
|
+
}, Wt = {
|
|
1928
1907
|
default: null,
|
|
1929
|
-
mini:
|
|
1908
|
+
mini: Ut.fabSizeMini
|
|
1930
1909
|
};
|
|
1931
|
-
function
|
|
1910
|
+
function Gt({ children: e = null, size: t = "default", className: n = "", styleType: r = U.Primary, onClick: i = () => {} }) {
|
|
1932
1911
|
return /* @__PURE__ */ M(W, {
|
|
1933
1912
|
styleType: r,
|
|
1934
|
-
className: f(
|
|
1913
|
+
className: f(Ut.fab, Wt[t], n),
|
|
1935
1914
|
onClick: i,
|
|
1936
1915
|
children: /* @__PURE__ */ M("div", {
|
|
1937
|
-
className:
|
|
1916
|
+
className: Ut.fabContentContainer,
|
|
1938
1917
|
children: /* @__PURE__ */ M("div", {
|
|
1939
|
-
className:
|
|
1918
|
+
className: Ut.fabContent,
|
|
1940
1919
|
children: e
|
|
1941
1920
|
})
|
|
1942
1921
|
})
|
|
@@ -1972,7 +1951,7 @@ var X = {
|
|
|
1972
1951
|
};
|
|
1973
1952
|
//#endregion
|
|
1974
1953
|
//#region package/common/fab/fab.tsx
|
|
1975
|
-
function
|
|
1954
|
+
function Kt({ children: e = null, size: t = "default", menuEntries: n = [], onMenuEntryClicked: r = () => {}, onClick: i = () => {}, closeMenuOnEntryClicked: a = !0, ...o }) {
|
|
1976
1955
|
let [s, c] = d(!1);
|
|
1977
1956
|
function l() {
|
|
1978
1957
|
n.length > 0 && c((e) => !e), i();
|
|
@@ -1992,7 +1971,7 @@ function Wt({ children: e = null, size: t = "default", menuEntries: n = [], onMe
|
|
|
1992
1971
|
}),
|
|
1993
1972
|
/* @__PURE__ */ M("div", {
|
|
1994
1973
|
onClick: (e) => e.stopPropagation(),
|
|
1995
|
-
children: /* @__PURE__ */ M(
|
|
1974
|
+
children: /* @__PURE__ */ M(Gt, {
|
|
1996
1975
|
className: X.fab,
|
|
1997
1976
|
size: t,
|
|
1998
1977
|
onClick: l,
|
|
@@ -2019,7 +1998,7 @@ function Wt({ children: e = null, size: t = "default", menuEntries: n = [], onMe
|
|
|
2019
1998
|
className: X.fabMenuEntryLabel,
|
|
2020
1999
|
children: t
|
|
2021
2000
|
})
|
|
2022
|
-
}), /* @__PURE__ */ M(
|
|
2001
|
+
}), /* @__PURE__ */ M(Gt, {
|
|
2023
2002
|
size: "mini",
|
|
2024
2003
|
children: /* @__PURE__ */ M(p, { icon: n })
|
|
2025
2004
|
})]
|
|
@@ -2030,7 +2009,7 @@ function Wt({ children: e = null, size: t = "default", menuEntries: n = [], onMe
|
|
|
2030
2009
|
}
|
|
2031
2010
|
//#endregion
|
|
2032
2011
|
//#region package/common/icon/svg/can.jsx
|
|
2033
|
-
var
|
|
2012
|
+
var qt = (e) => /* @__PURE__ */ M("svg", {
|
|
2034
2013
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2035
2014
|
viewBox: "-1.02083 -3.15 21.04 17.65",
|
|
2036
2015
|
...e,
|
|
@@ -2039,57 +2018,39 @@ var Gt = (e) => /* @__PURE__ */ M("svg", {
|
|
|
2039
2018
|
strokeWidth: "1",
|
|
2040
2019
|
fill: "none"
|
|
2041
2020
|
})
|
|
2042
|
-
}),
|
|
2021
|
+
}), Jt = ({ type: e, ...t }) => {
|
|
2043
2022
|
switch (e) {
|
|
2044
|
-
case "can": return /* @__PURE__ */ M(
|
|
2023
|
+
case "can": return /* @__PURE__ */ M(qt, { ...t });
|
|
2045
2024
|
default: return null;
|
|
2046
2025
|
}
|
|
2047
2026
|
};
|
|
2048
|
-
|
|
2027
|
+
Jt.propTypes = { type: I.string.isRequired };
|
|
2049
2028
|
//#endregion
|
|
2050
2029
|
//#region package/common/icon/index.js
|
|
2051
|
-
var
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
}
|
|
2076
|
-
registerHandlers() {
|
|
2077
|
-
document.addEventListener("click", this.resetIdleTimeout), document.addEventListener("mousemove", this.resetIdleTimeout), document.addEventListener("mousemove", this.resetIdleTimeout), document.addEventListener("keydown", this.resetIdleTimeout), document.addEventListener("scroll", this.resetIdleTimeout), document.addEventListener("touchstart", this.resetIdleTimeout);
|
|
2078
|
-
}
|
|
2079
|
-
unregisterhandlers() {
|
|
2080
|
-
document.removeEventListener("click", this.resetIdleTimeout), document.removeEventListener("mousemove", this.resetIdleTimeout), document.removeEventListener("keydown", this.resetIdleTimeout), document.removeEventListener("scroll", this.resetIdleTimeout), document.addEventListener("touchstart", this.resetIdleTimeout);
|
|
2081
|
-
}
|
|
2082
|
-
resetIdleTimeout = () => {
|
|
2083
|
-
let { idleAfterSeconds: e } = this.props, { isIdleContentShown: t } = this.state;
|
|
2084
|
-
this.#e && clearTimeout(this.#e), t && this.setState({ isIdleContentShown: !1 }), this.#e = setTimeout(() => {
|
|
2085
|
-
this.setState({ isIdleContentShown: !0 });
|
|
2086
|
-
}, e * 1e3);
|
|
2087
|
-
};
|
|
2088
|
-
render() {
|
|
2089
|
-
let { children: e, renderCondition: t } = this.props, { isIdleContentShown: n } = this.state;
|
|
2090
|
-
return /* @__PURE__ */ M(ie, { children: t && n && e });
|
|
2091
|
-
}
|
|
2092
|
-
}, Yt = {
|
|
2030
|
+
var Yt = Jt, Xt = [
|
|
2031
|
+
"click",
|
|
2032
|
+
"mousemove",
|
|
2033
|
+
"keydown",
|
|
2034
|
+
"scroll",
|
|
2035
|
+
"touchstart"
|
|
2036
|
+
];
|
|
2037
|
+
function Zt({ children: e = null, idleAfterSeconds: t = 600, renderCondition: n = !0 }) {
|
|
2038
|
+
let [r, o] = d(!1), s = u(null), c = i(() => {
|
|
2039
|
+
s.current !== null && clearTimeout(s.current), o(!1), s.current = setTimeout(() => {
|
|
2040
|
+
o(!0);
|
|
2041
|
+
}, t * 1e3);
|
|
2042
|
+
}, [t]);
|
|
2043
|
+
return a(() => {
|
|
2044
|
+
c();
|
|
2045
|
+
}, [c]), a(() => {
|
|
2046
|
+
for (let e of Xt) document.addEventListener(e, c);
|
|
2047
|
+
return () => {
|
|
2048
|
+
for (let e of Xt) document.removeEventListener(e, c);
|
|
2049
|
+
s.current !== null && clearTimeout(s.current);
|
|
2050
|
+
};
|
|
2051
|
+
}, [c]), /* @__PURE__ */ M(ie, { children: n && r && e });
|
|
2052
|
+
}
|
|
2053
|
+
var Qt = {
|
|
2093
2054
|
board: "board_6KRdw",
|
|
2094
2055
|
column: "column_NrNeF",
|
|
2095
2056
|
"column-empty": "column-empty_5KYsJ",
|
|
@@ -2107,7 +2068,7 @@ var qt = Kt, Jt = class extends t {
|
|
|
2107
2068
|
};
|
|
2108
2069
|
//#endregion
|
|
2109
2070
|
//#region package/common/kanbanBoard/KanbanItem.tsx
|
|
2110
|
-
function
|
|
2071
|
+
function $t({ id: e, children: t }) {
|
|
2111
2072
|
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } = R({ id: e });
|
|
2112
2073
|
return /* @__PURE__ */ M("div", {
|
|
2113
2074
|
ref: i,
|
|
@@ -2115,7 +2076,7 @@ function Xt({ id: e, children: t }) {
|
|
|
2115
2076
|
transform: he.Transform.toString(a),
|
|
2116
2077
|
transition: o
|
|
2117
2078
|
},
|
|
2118
|
-
className: f(
|
|
2079
|
+
className: f(Qt.item, s && Qt.itemDragging),
|
|
2119
2080
|
...n,
|
|
2120
2081
|
...r,
|
|
2121
2082
|
children: t
|
|
@@ -2123,12 +2084,12 @@ function Xt({ id: e, children: t }) {
|
|
|
2123
2084
|
}
|
|
2124
2085
|
//#endregion
|
|
2125
2086
|
//#region package/common/kanbanBoard/KanbanColumn.tsx
|
|
2126
|
-
function
|
|
2087
|
+
function en({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a, classNames: o, styles: s }) {
|
|
2127
2088
|
let { setNodeRef: c, isOver: l } = le({ id: `column-${e}` });
|
|
2128
2089
|
return /* @__PURE__ */ N("div", {
|
|
2129
|
-
className: f(
|
|
2090
|
+
className: f(Qt.column, l && Qt.columnOver, n.length === 0 && Qt.columnEmpty, a),
|
|
2130
2091
|
children: [/* @__PURE__ */ M("div", {
|
|
2131
|
-
className: f(
|
|
2092
|
+
className: f(Qt.columnHeader, o?.header),
|
|
2132
2093
|
style: s?.header,
|
|
2133
2094
|
children: t
|
|
2134
2095
|
}), /* @__PURE__ */ M(fe, {
|
|
@@ -2136,9 +2097,9 @@ function Zt({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a
|
|
|
2136
2097
|
strategy: me,
|
|
2137
2098
|
children: /* @__PURE__ */ M("div", {
|
|
2138
2099
|
ref: c,
|
|
2139
|
-
className: f(
|
|
2100
|
+
className: f(Qt.columnItems, o?.items),
|
|
2140
2101
|
style: s?.items,
|
|
2141
|
-
children: n.map((e) => /* @__PURE__ */ M(
|
|
2102
|
+
children: n.map((e) => /* @__PURE__ */ M($t, {
|
|
2142
2103
|
id: e,
|
|
2143
2104
|
children: r[e] === void 0 ? null : i(r[e], e)
|
|
2144
2105
|
}, e))
|
|
@@ -2148,7 +2109,7 @@ function Zt({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a
|
|
|
2148
2109
|
}
|
|
2149
2110
|
//#endregion
|
|
2150
2111
|
//#region package/common/kanbanBoard/KanbanBoard.tsx
|
|
2151
|
-
function
|
|
2112
|
+
function tn({ columns: e, items: t, renderItem: n, onChange: r, className: i, style: a, classNames: o, styles: s }) {
|
|
2152
2113
|
let [c, l] = d(null), [u, p] = d(null), m = de(ue(ce, { activationConstraint: { distance: 8 } })), h = u ?? e;
|
|
2153
2114
|
function g(e, t) {
|
|
2154
2115
|
return e.findIndex((e) => e.itemIds.includes(t));
|
|
@@ -2205,9 +2166,9 @@ function Qt({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2205
2166
|
onDragOver: v,
|
|
2206
2167
|
onDragEnd: y,
|
|
2207
2168
|
children: [/* @__PURE__ */ M("div", {
|
|
2208
|
-
className: f(
|
|
2169
|
+
className: f(Qt.board, i),
|
|
2209
2170
|
style: a,
|
|
2210
|
-
children: h.map((e) => /* @__PURE__ */ M(
|
|
2171
|
+
children: h.map((e) => /* @__PURE__ */ M(en, {
|
|
2211
2172
|
id: e.id,
|
|
2212
2173
|
title: e.title,
|
|
2213
2174
|
itemIds: e.itemIds,
|
|
@@ -2215,13 +2176,13 @@ function Qt({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2215
2176
|
renderItem: n
|
|
2216
2177
|
}, e.id))
|
|
2217
2178
|
}), /* @__PURE__ */ M(se, { children: c && t[c] !== void 0 ? /* @__PURE__ */ M("div", {
|
|
2218
|
-
className: f(
|
|
2179
|
+
className: f(Qt.dragOverlay, o?.dragOverlay),
|
|
2219
2180
|
style: s?.dragOverlay,
|
|
2220
2181
|
children: n(t[c], c)
|
|
2221
2182
|
}) : null })]
|
|
2222
2183
|
});
|
|
2223
2184
|
}
|
|
2224
|
-
var
|
|
2185
|
+
var nn = {
|
|
2225
2186
|
iconLoading: "iconLoading_wovj4",
|
|
2226
2187
|
"spin-to-oblivion": "spin-to-oblivion_0tZtm",
|
|
2227
2188
|
spinToOblivion: "spin-to-oblivion_0tZtm",
|
|
@@ -2236,39 +2197,39 @@ var $t = {
|
|
|
2236
2197
|
};
|
|
2237
2198
|
//#endregion
|
|
2238
2199
|
//#region package/common/loading/iconLoading/iconLoading.tsx
|
|
2239
|
-
function
|
|
2200
|
+
function rn({ className: e = "" }) {
|
|
2240
2201
|
return /* @__PURE__ */ M("div", {
|
|
2241
|
-
className: f(
|
|
2202
|
+
className: f(nn.iconLoading, e),
|
|
2242
2203
|
children: /* @__PURE__ */ N("svg", {
|
|
2243
2204
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2244
2205
|
viewBox: "-8 -1 16 14",
|
|
2245
2206
|
children: [
|
|
2246
2207
|
/* @__PURE__ */ M("path", {
|
|
2247
|
-
className:
|
|
2208
|
+
className: nn.iconLoadingFirst,
|
|
2248
2209
|
d: "M 0 0 C 3 5 6 5 6 12",
|
|
2249
2210
|
strokeWidth: "1.7",
|
|
2250
2211
|
fill: "none"
|
|
2251
2212
|
}),
|
|
2252
2213
|
/* @__PURE__ */ M("path", {
|
|
2253
|
-
className:
|
|
2214
|
+
className: nn.iconLoadingFirst,
|
|
2254
2215
|
d: "M 0 0 C -3 5 -6 5 -6 12",
|
|
2255
2216
|
strokeWidth: "1.7",
|
|
2256
2217
|
fill: "none"
|
|
2257
2218
|
}),
|
|
2258
2219
|
/* @__PURE__ */ M("path", {
|
|
2259
|
-
className:
|
|
2220
|
+
className: nn.iconLoadingFirst,
|
|
2260
2221
|
d: "M 0 0 L 0 10",
|
|
2261
2222
|
strokeWidth: "1.7",
|
|
2262
2223
|
fill: "none"
|
|
2263
2224
|
}),
|
|
2264
2225
|
/* @__PURE__ */ M("path", {
|
|
2265
|
-
className:
|
|
2226
|
+
className: nn.iconLoadingSecond,
|
|
2266
2227
|
d: "M 0.1 10 C -3 10 -4 10 -6 12",
|
|
2267
2228
|
strokeWidth: "1.7",
|
|
2268
2229
|
fill: "none"
|
|
2269
2230
|
}),
|
|
2270
2231
|
/* @__PURE__ */ M("path", {
|
|
2271
|
-
className:
|
|
2232
|
+
className: nn.iconLoadingSecond,
|
|
2272
2233
|
d: "M -0.1 10 C 3 10 4 10 6 12",
|
|
2273
2234
|
strokeWidth: "1.7",
|
|
2274
2235
|
fill: "none"
|
|
@@ -2279,10 +2240,10 @@ function en({ className: e = "" }) {
|
|
|
2279
2240
|
}
|
|
2280
2241
|
//#endregion
|
|
2281
2242
|
//#region package/common/loading/iconLoading/index.ts
|
|
2282
|
-
var
|
|
2243
|
+
var an = rn, on = { numberInput: "numberInput_7p2O3" };
|
|
2283
2244
|
//#endregion
|
|
2284
2245
|
//#region package/common/numberInput/numberInput.tsx
|
|
2285
|
-
function
|
|
2246
|
+
function sn({ 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: p, sign: m, ...h }) {
|
|
2286
2247
|
let g = n == null ? e : n.value, _ = m != null && g != null ? Math.abs(Number(g)) : g, v = _ == null ? "" : String(_);
|
|
2287
2248
|
function y(e) {
|
|
2288
2249
|
let r = e;
|
|
@@ -2291,7 +2252,7 @@ function rn({ value: e, onChange: t, formValidator: n, label: r, error: i, class
|
|
|
2291
2252
|
let b = m === "-" ? "-" : m === "+" ? "+" : l;
|
|
2292
2253
|
return /* @__PURE__ */ M($e, {
|
|
2293
2254
|
label: r,
|
|
2294
|
-
className: f(
|
|
2255
|
+
className: f(on.numberInput, a),
|
|
2295
2256
|
value: v,
|
|
2296
2257
|
onChange: () => {},
|
|
2297
2258
|
formValidator: null,
|
|
@@ -2313,29 +2274,31 @@ function rn({ value: e, onChange: t, formValidator: n, label: r, error: i, class
|
|
|
2313
2274
|
}
|
|
2314
2275
|
//#endregion
|
|
2315
2276
|
//#region package/common/numberInput/index.ts
|
|
2316
|
-
var
|
|
2277
|
+
var cn = sn, ln = {
|
|
2317
2278
|
optionPicker: "optionPicker_Yx82s",
|
|
2318
2279
|
"optionPicker-chip": "optionPicker-chip_ywtvr",
|
|
2319
2280
|
optionPickerChip: "optionPicker-chip_ywtvr",
|
|
2320
2281
|
"optionPicker-option": "optionPicker-option_uq0vK",
|
|
2321
|
-
optionPickerOption: "optionPicker-option_uq0vK"
|
|
2282
|
+
optionPickerOption: "optionPicker-option_uq0vK",
|
|
2283
|
+
"optionPicker-option-active": "optionPicker-option-active_yUECW",
|
|
2284
|
+
optionPickerOptionActive: "optionPicker-option-active_yUECW"
|
|
2322
2285
|
};
|
|
2323
2286
|
//#endregion
|
|
2324
2287
|
//#region package/common/optionPicker/optionPicker.tsx
|
|
2325
|
-
function
|
|
2288
|
+
function un({ className: e = void 0, options: t, onChange: n, value: r, ...i }) {
|
|
2326
2289
|
let a = t.findIndex((e) => e.key === r) * 100 / t.length;
|
|
2327
2290
|
return /* @__PURE__ */ N("div", {
|
|
2328
2291
|
...i,
|
|
2329
|
-
className: f(
|
|
2292
|
+
className: f(ln.optionPicker, e),
|
|
2330
2293
|
children: [/* @__PURE__ */ M("div", {
|
|
2331
|
-
className:
|
|
2294
|
+
className: ln.optionPickerChip,
|
|
2332
2295
|
style: {
|
|
2333
2296
|
left: `${a}%`,
|
|
2334
2297
|
width: `${100 / t.length}%`
|
|
2335
2298
|
}
|
|
2336
2299
|
}), t.map((e) => /* @__PURE__ */ M(Ne, {
|
|
2337
2300
|
onClick: (t) => n(e.key, t),
|
|
2338
|
-
className: f(
|
|
2301
|
+
className: f(ln.optionPickerOption, e.key === r && ln.optionPickerOptionActive),
|
|
2339
2302
|
tabIndex: e.key === r ? -1 : 0,
|
|
2340
2303
|
children: e.label
|
|
2341
2304
|
}, e.key))]
|
|
@@ -2343,25 +2306,25 @@ function sn({ className: e = void 0, options: t, onChange: n, value: r, ...i })
|
|
|
2343
2306
|
}
|
|
2344
2307
|
//#endregion
|
|
2345
2308
|
//#region package/hooks/useWindowSize.ts
|
|
2346
|
-
var
|
|
2347
|
-
function
|
|
2309
|
+
var dn = 768;
|
|
2310
|
+
function fn() {
|
|
2348
2311
|
let [e, t] = d(() => ({
|
|
2349
2312
|
width: window.innerWidth,
|
|
2350
2313
|
height: window.innerHeight,
|
|
2351
|
-
isMobileSize: window.innerWidth <
|
|
2314
|
+
isMobileSize: window.innerWidth < dn
|
|
2352
2315
|
}));
|
|
2353
2316
|
return a(() => {
|
|
2354
2317
|
function e() {
|
|
2355
2318
|
t({
|
|
2356
2319
|
width: window.innerWidth,
|
|
2357
2320
|
height: window.innerHeight,
|
|
2358
|
-
isMobileSize: window.innerWidth <
|
|
2321
|
+
isMobileSize: window.innerWidth < dn
|
|
2359
2322
|
});
|
|
2360
2323
|
}
|
|
2361
2324
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
2362
2325
|
}, []), e;
|
|
2363
2326
|
}
|
|
2364
|
-
var
|
|
2327
|
+
var pn = {
|
|
2365
2328
|
overscroll: "overscroll_Ij750",
|
|
2366
2329
|
"overscroll-header": "overscroll-header_S6vYc",
|
|
2367
2330
|
overscrollHeader: "overscroll-header_S6vYc",
|
|
@@ -2372,8 +2335,8 @@ var un = {
|
|
|
2372
2335
|
};
|
|
2373
2336
|
//#endregion
|
|
2374
2337
|
//#region package/common/overscroll/overscroll.tsx
|
|
2375
|
-
function
|
|
2376
|
-
let { isMobileSize: h, height: g } =
|
|
2338
|
+
function mn({ children: e = null, overscrollContent: t = null, overscrollContentDesktop: n = null, centerHeader: r = !0, min: o = 10, max: s = 80, start: c = 30, unit: l = "%", mobileOnly: d = !0, onScrollChange: p = () => {}, scrollDisabled: m = !1 }) {
|
|
2339
|
+
let { isMobileSize: h, height: g } = fn(), _ = u(null), v = u(null), y = u(null), b = u(!1), x = u(null), S = u(p);
|
|
2377
2340
|
S.current = p;
|
|
2378
2341
|
let C = i((e) => {
|
|
2379
2342
|
let t;
|
|
@@ -2431,15 +2394,15 @@ function dn({ children: e = null, overscrollContent: t = null, overscrollContent
|
|
|
2431
2394
|
if (d && !h) return n ? /* @__PURE__ */ N("div", { children: [n, e] }) : /* @__PURE__ */ M(ie, { children: e });
|
|
2432
2395
|
let O = l === "%" ? `${100 - o}%` : `calc(100% - ${o}px)`;
|
|
2433
2396
|
return /* @__PURE__ */ N("div", {
|
|
2434
|
-
className:
|
|
2397
|
+
className: pn.overscroll,
|
|
2435
2398
|
ref: _,
|
|
2436
2399
|
onScroll: D,
|
|
2437
2400
|
children: [/* @__PURE__ */ M("div", {
|
|
2438
|
-
className:
|
|
2401
|
+
className: pn.overscrollHeaderContainer,
|
|
2439
2402
|
style: { height: `${s}${l}` },
|
|
2440
2403
|
ref: y,
|
|
2441
2404
|
children: /* @__PURE__ */ M("div", {
|
|
2442
|
-
className: f(
|
|
2405
|
+
className: f(pn.overscrollHeader, r && pn.overscrollHeaderCentered),
|
|
2443
2406
|
ref: v,
|
|
2444
2407
|
children: t
|
|
2445
2408
|
})
|
|
@@ -2449,7 +2412,7 @@ function dn({ children: e = null, overscrollContent: t = null, overscrollContent
|
|
|
2449
2412
|
})]
|
|
2450
2413
|
});
|
|
2451
2414
|
}
|
|
2452
|
-
var
|
|
2415
|
+
var hn = {
|
|
2453
2416
|
progressBar: "progressBar_LO0sX",
|
|
2454
2417
|
"progressBar-fill": "progressBar-fill_rt32j",
|
|
2455
2418
|
progressBarFill: "progressBar-fill_rt32j",
|
|
@@ -2462,17 +2425,17 @@ var fn = {
|
|
|
2462
2425
|
};
|
|
2463
2426
|
//#endregion
|
|
2464
2427
|
//#region package/common/progressBar/progressBar.tsx
|
|
2465
|
-
function
|
|
2428
|
+
function gn(e) {
|
|
2466
2429
|
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);
|
|
2467
2430
|
return (.299 * n + .587 * r + .114 * i) / 255 > .5 ? "#000000" : "#ffffff";
|
|
2468
2431
|
}
|
|
2469
|
-
function
|
|
2432
|
+
function _n({ className: e = void 0, total: t = 100, progress: n = 0, style: r = void 0, ...i }) {
|
|
2470
2433
|
function a() {
|
|
2471
2434
|
let e = [];
|
|
2472
2435
|
return Array.isArray(n) ? e.push(...n) : typeof n == "object" ? e.push(n) : e.push({ amount: n }), e.map((n, i) => {
|
|
2473
2436
|
let a = t ? n.amount / t * 100 : 0;
|
|
2474
2437
|
return /* @__PURE__ */ M("div", {
|
|
2475
|
-
className: f(
|
|
2438
|
+
className: f(hn.progressBarFill, i === e.length - 1 && hn.progressBarFillEnd, n.class),
|
|
2476
2439
|
style: {
|
|
2477
2440
|
width: `${a}%`,
|
|
2478
2441
|
background: n.color || void 0,
|
|
@@ -2480,8 +2443,8 @@ function mn({ className: e = void 0, total: t = 100, progress: n = 0, style: r =
|
|
|
2480
2443
|
},
|
|
2481
2444
|
title: n.label ? `${n.label}: ${n.amount}` : void 0,
|
|
2482
2445
|
children: n.label && /* @__PURE__ */ M("div", {
|
|
2483
|
-
className:
|
|
2484
|
-
style: n.color ? { color:
|
|
2446
|
+
className: hn.progressBarLabel,
|
|
2447
|
+
style: n.color ? { color: gn(n.color) } : {},
|
|
2485
2448
|
children: n.label
|
|
2486
2449
|
})
|
|
2487
2450
|
}, i);
|
|
@@ -2489,21 +2452,21 @@ function mn({ className: e = void 0, total: t = 100, progress: n = 0, style: r =
|
|
|
2489
2452
|
}
|
|
2490
2453
|
return /* @__PURE__ */ M("div", {
|
|
2491
2454
|
...i,
|
|
2492
|
-
className: f(
|
|
2455
|
+
className: f(hn.progressBar, e),
|
|
2493
2456
|
style: r,
|
|
2494
2457
|
children: a()
|
|
2495
2458
|
});
|
|
2496
2459
|
}
|
|
2497
|
-
function
|
|
2460
|
+
function vn(e) {
|
|
2498
2461
|
return Math.round(e / 5) * 5;
|
|
2499
2462
|
}
|
|
2500
|
-
function
|
|
2463
|
+
function yn(e) {
|
|
2501
2464
|
return {
|
|
2502
|
-
x:
|
|
2503
|
-
y:
|
|
2465
|
+
x: vn(e.x),
|
|
2466
|
+
y: vn(e.y)
|
|
2504
2467
|
};
|
|
2505
2468
|
}
|
|
2506
|
-
function
|
|
2469
|
+
function bn(e, t, n) {
|
|
2507
2470
|
let r = n.createSVGPoint();
|
|
2508
2471
|
r.x = e, r.y = t;
|
|
2509
2472
|
let i = n.getScreenCTM();
|
|
@@ -2512,18 +2475,18 @@ function _n(e, t, n) {
|
|
|
2512
2475
|
y: 0
|
|
2513
2476
|
};
|
|
2514
2477
|
let a = r.matrixTransform(i.inverse());
|
|
2515
|
-
return
|
|
2478
|
+
return yn({
|
|
2516
2479
|
x: a.x,
|
|
2517
2480
|
y: a.y
|
|
2518
2481
|
});
|
|
2519
2482
|
}
|
|
2520
|
-
function
|
|
2483
|
+
function xn(e, t) {
|
|
2521
2484
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
2522
2485
|
}
|
|
2523
|
-
function
|
|
2486
|
+
function Sn(e, t, n) {
|
|
2524
2487
|
let r = n.x - t.x, i = n.y - t.y, a = r * r + i * i;
|
|
2525
2488
|
if (a === 0) return {
|
|
2526
|
-
dist:
|
|
2489
|
+
dist: xn(e, t),
|
|
2527
2490
|
t: 0
|
|
2528
2491
|
};
|
|
2529
2492
|
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;
|
|
@@ -2532,12 +2495,12 @@ function yn(e, t, n) {
|
|
|
2532
2495
|
t: o
|
|
2533
2496
|
};
|
|
2534
2497
|
}
|
|
2535
|
-
function
|
|
2498
|
+
function Cn(e, t) {
|
|
2536
2499
|
let n = null;
|
|
2537
2500
|
for (let r of t) {
|
|
2538
2501
|
let t = r.points;
|
|
2539
2502
|
for (let i = 0; i < t.length; i++) {
|
|
2540
|
-
let a = t[i], o = t[(i + 1) % t.length], { dist: s, t: c } =
|
|
2503
|
+
let a = t[i], o = t[(i + 1) % t.length], { dist: s, t: c } = Sn(e, a, o);
|
|
2541
2504
|
s <= 8 && (!n || s < n.dist) && (n = {
|
|
2542
2505
|
roomId: r.id,
|
|
2543
2506
|
wallIndex: i,
|
|
@@ -2548,7 +2511,7 @@ function bn(e, t) {
|
|
|
2548
2511
|
}
|
|
2549
2512
|
return n;
|
|
2550
2513
|
}
|
|
2551
|
-
function
|
|
2514
|
+
function wn(e, t) {
|
|
2552
2515
|
let n = !1;
|
|
2553
2516
|
for (let r = 0, i = t.length - 1; r < t.length; i = r++) {
|
|
2554
2517
|
let a = t[r].x, o = t[r].y, s = t[i].x, c = t[i].y;
|
|
@@ -2556,13 +2519,13 @@ function xn(e, t) {
|
|
|
2556
2519
|
}
|
|
2557
2520
|
return n;
|
|
2558
2521
|
}
|
|
2559
|
-
function
|
|
2522
|
+
function Tn(e) {
|
|
2560
2523
|
return {
|
|
2561
2524
|
x: e.reduce((e, t) => e + t.x, 0) / e.length,
|
|
2562
2525
|
y: e.reduce((e, t) => e + t.y, 0) / e.length
|
|
2563
2526
|
};
|
|
2564
2527
|
}
|
|
2565
|
-
function
|
|
2528
|
+
function En(e, t, n, r) {
|
|
2566
2529
|
return [
|
|
2567
2530
|
{
|
|
2568
2531
|
x: e,
|
|
@@ -2582,7 +2545,7 @@ function Cn(e, t, n, r) {
|
|
|
2582
2545
|
}
|
|
2583
2546
|
];
|
|
2584
2547
|
}
|
|
2585
|
-
function
|
|
2548
|
+
function Dn(e, t, n, r) {
|
|
2586
2549
|
let i = t.x - e.x, a = t.y - e.y, o = Math.sqrt(i * i + a * a);
|
|
2587
2550
|
if (o < .001) return null;
|
|
2588
2551
|
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);
|
|
@@ -2601,13 +2564,13 @@ function wn(e, t, n, r) {
|
|
|
2601
2564
|
}
|
|
2602
2565
|
};
|
|
2603
2566
|
}
|
|
2604
|
-
function
|
|
2567
|
+
function On(e) {
|
|
2605
2568
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2606
2569
|
}
|
|
2607
|
-
function
|
|
2570
|
+
function kn(e) {
|
|
2608
2571
|
return e.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(" ") + " Z";
|
|
2609
2572
|
}
|
|
2610
|
-
function
|
|
2573
|
+
function An(e, t) {
|
|
2611
2574
|
if (e.length < 2) return [];
|
|
2612
2575
|
if (t.length === 0) return [e.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(" ") + " Z"];
|
|
2613
2576
|
let n = e.length, r = [], i = [`M ${e[0].x.toFixed(2)},${e[0].y.toFixed(2)}`];
|
|
@@ -2630,8 +2593,8 @@ function Dn(e, t) {
|
|
|
2630
2593
|
}
|
|
2631
2594
|
return r[0] = [...i, ...r[0].slice(1)], r.map((e) => e.join(" "));
|
|
2632
2595
|
}
|
|
2633
|
-
function
|
|
2634
|
-
let r =
|
|
2596
|
+
function jn(e, t, n) {
|
|
2597
|
+
let r = Dn(e, t, n.t, n.width);
|
|
2635
2598
|
if (!r) return "";
|
|
2636
2599
|
let { p1: i, p2: a, perp: o } = r, s = {
|
|
2637
2600
|
x: i.x + o.x * n.width,
|
|
@@ -2639,7 +2602,7 @@ function On(e, t, n) {
|
|
|
2639
2602
|
};
|
|
2640
2603
|
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(" ");
|
|
2641
2604
|
}
|
|
2642
|
-
function
|
|
2605
|
+
function Mn(e, t) {
|
|
2643
2606
|
let n = Infinity, r = Infinity, i = -Infinity, a = -Infinity;
|
|
2644
2607
|
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);
|
|
2645
2608
|
isFinite(n) || (n = 0, r = 0, i = 400, a = 300);
|
|
@@ -2649,10 +2612,10 @@ function kn(e, t) {
|
|
|
2649
2612
|
(i - n + 10).toFixed(2),
|
|
2650
2613
|
(a - r + 10).toFixed(2)
|
|
2651
2614
|
].join(" "), s = e.map((e) => {
|
|
2652
|
-
let n = t.filter((t) => t.roomId === e.id), r =
|
|
2653
|
-
let n = e.points[t.wallIndex], r = e.points[(t.wallIndex + 1) % e.points.length], i =
|
|
2615
|
+
let n = t.filter((t) => t.roomId === e.id), r = An(e.points, n), i = kn(e.points), a = Tn(e.points), o = r.map((e) => ` <path d="${e}" />`).join("\n"), s = n.map((t) => {
|
|
2616
|
+
let n = e.points[t.wallIndex], r = e.points[(t.wallIndex + 1) % e.points.length], i = jn(n, r, t);
|
|
2654
2617
|
return i ? ` <path d="${i}" fill="none" />` : "";
|
|
2655
|
-
}).filter(Boolean).join("\n"), c = e.name ? ` <text fontSize="5" x="${a.x.toFixed(1)}" y="${a.y.toFixed(1)}">${
|
|
2618
|
+
}).filter(Boolean).join("\n"), c = e.name ? ` <text fontSize="5" x="${a.x.toFixed(1)}" y="${a.y.toFixed(1)}">${On(e.name)}</text>` : "";
|
|
2656
2619
|
return [
|
|
2657
2620
|
` <g id="${e.id}">`,
|
|
2658
2621
|
o,
|
|
@@ -2671,7 +2634,7 @@ function kn(e, t) {
|
|
|
2671
2634
|
"</svg>"
|
|
2672
2635
|
].join("\n");
|
|
2673
2636
|
}
|
|
2674
|
-
function
|
|
2637
|
+
function Nn(e) {
|
|
2675
2638
|
let t = [];
|
|
2676
2639
|
for (let n of e.matchAll(/[ML]\s*([-\d.]+)[,\s]+([-\d.]+)/gi)) t.push({
|
|
2677
2640
|
x: parseFloat(n[1]),
|
|
@@ -2679,14 +2642,14 @@ function An(e) {
|
|
|
2679
2642
|
});
|
|
2680
2643
|
return t;
|
|
2681
2644
|
}
|
|
2682
|
-
function
|
|
2645
|
+
function Pn(e) {
|
|
2683
2646
|
let t = new DOMParser().parseFromString(e, "image/svg+xml"), n = [];
|
|
2684
2647
|
return t.querySelectorAll("[id^=\"room\"]").forEach((e) => {
|
|
2685
2648
|
let t = e.querySelector("[id=\"background\"]");
|
|
2686
2649
|
if (!t) return;
|
|
2687
2650
|
let r = t.getAttribute("d");
|
|
2688
2651
|
if (!r) return;
|
|
2689
|
-
let i =
|
|
2652
|
+
let i = Nn(r);
|
|
2690
2653
|
if (i.length < 3) return;
|
|
2691
2654
|
let a = e.querySelector("text")?.textContent?.trim() ?? "";
|
|
2692
2655
|
n.push({
|
|
@@ -2696,8 +2659,8 @@ function jn(e) {
|
|
|
2696
2659
|
});
|
|
2697
2660
|
}), n;
|
|
2698
2661
|
}
|
|
2699
|
-
function
|
|
2700
|
-
let n =
|
|
2662
|
+
function Fn(e, t) {
|
|
2663
|
+
let n = Mn(e, t), r = new Blob([n], { type: "image/svg+xml" }), i = URL.createObjectURL(r), a = document.createElement("a");
|
|
2701
2664
|
a.href = i, a.download = "room-plan.svg", a.click(), URL.revokeObjectURL(i);
|
|
2702
2665
|
}
|
|
2703
2666
|
var Z = {
|
|
@@ -2772,20 +2735,20 @@ var Z = {
|
|
|
2772
2735
|
polyCloseTarget: "polyCloseTarget_snjYx",
|
|
2773
2736
|
polyVertex: "polyVertex_fw0nX",
|
|
2774
2737
|
vertexHandle: "vertexHandle_-z7g5"
|
|
2775
|
-
},
|
|
2776
|
-
function
|
|
2777
|
-
return
|
|
2738
|
+
}, In = 6, Ln = 5, Rn = 1.25, zn = .25, Bn = 12, Vn = 0;
|
|
2739
|
+
function Hn(e) {
|
|
2740
|
+
return Vn += 1, `${e}${Vn}`;
|
|
2778
2741
|
}
|
|
2779
|
-
var
|
|
2742
|
+
var Un = {
|
|
2780
2743
|
select: "Drag inside to move · Drag corner to reshape · Click wall to add corner · Dbl-click corner to remove · Delete to erase",
|
|
2781
2744
|
rect: "Drag to draw a rectangular room",
|
|
2782
2745
|
polygon: "Click to place corners · Click first point or Enter to close · Esc to cancel"
|
|
2783
2746
|
};
|
|
2784
|
-
function
|
|
2785
|
-
let [t, n] = d([]), [r, i] = d([]), [o, c] = d("rect"), [l, h] = d(null), [g, _] = d(null), [x, S] = d(null), [C, ee] = d(null), [D, O] = d([]), [te, A] = d(null), [j, P] = d(1), [
|
|
2747
|
+
function Wn({ className: e }) {
|
|
2748
|
+
let [t, n] = d([]), [r, i] = d([]), [o, c] = d("rect"), [l, h] = d(null), [g, _] = d(null), [x, S] = d(null), [C, ee] = d(null), [D, O] = d([]), [te, A] = d(null), [j, P] = d(1), [ae, F] = d({
|
|
2786
2749
|
x: 0,
|
|
2787
2750
|
y: 0
|
|
2788
|
-
}),
|
|
2751
|
+
}), I = u(null), oe = u(null), se = u(null), ce = u(null), L = u(null), le = u({
|
|
2789
2752
|
rooms: t,
|
|
2790
2753
|
doors: r,
|
|
2791
2754
|
tool: o,
|
|
@@ -2793,7 +2756,7 @@ function Vn({ className: e }) {
|
|
|
2793
2756
|
editingDoorsForRoomId: g,
|
|
2794
2757
|
polyPoints: D,
|
|
2795
2758
|
zoom: j,
|
|
2796
|
-
pan:
|
|
2759
|
+
pan: ae
|
|
2797
2760
|
});
|
|
2798
2761
|
s(() => {
|
|
2799
2762
|
le.current = {
|
|
@@ -2804,12 +2767,12 @@ function Vn({ className: e }) {
|
|
|
2804
2767
|
editingDoorsForRoomId: g,
|
|
2805
2768
|
polyPoints: D,
|
|
2806
2769
|
zoom: j,
|
|
2807
|
-
pan:
|
|
2770
|
+
pan: ae
|
|
2808
2771
|
};
|
|
2809
2772
|
});
|
|
2810
2773
|
function ue(e) {
|
|
2811
2774
|
e.length < 3 || (n((t) => [...t, {
|
|
2812
|
-
id:
|
|
2775
|
+
id: Hn("room"),
|
|
2813
2776
|
name: `Room ${t.length + 1}`,
|
|
2814
2777
|
points: e
|
|
2815
2778
|
}]), O([]), A(null));
|
|
@@ -2819,10 +2782,10 @@ function Vn({ className: e }) {
|
|
|
2819
2782
|
if (!e) return;
|
|
2820
2783
|
function t(e) {
|
|
2821
2784
|
e.preventDefault();
|
|
2822
|
-
let { zoom: t, pan: n } = le.current, r =
|
|
2785
|
+
let { zoom: t, pan: n } = le.current, r = bn(e.clientX, e.clientY, ce.current);
|
|
2823
2786
|
if (!r) return;
|
|
2824
|
-
let i = e.deltaY < 0 ?
|
|
2825
|
-
|
|
2787
|
+
let i = e.deltaY < 0 ? Rn : 1 / Rn, a = Math.max(zn, Math.min(Bn, t * i));
|
|
2788
|
+
F({
|
|
2826
2789
|
x: r.x - (r.x - n.x) * (t / a),
|
|
2827
2790
|
y: r.y - (r.y - n.y) * (t / a)
|
|
2828
2791
|
}), P(a);
|
|
@@ -2844,23 +2807,23 @@ function Vn({ className: e }) {
|
|
|
2844
2807
|
return;
|
|
2845
2808
|
}
|
|
2846
2809
|
if ((e.key === "+" || e.key === "=") && !(e.target instanceof HTMLInputElement)) {
|
|
2847
|
-
let e = Math.max(
|
|
2848
|
-
P(e),
|
|
2810
|
+
let e = Math.max(zn, Math.min(Bn, s * Rn)), t = c.x + 400 / s / 2, n = c.y + 300 / s / 2;
|
|
2811
|
+
P(e), F({
|
|
2849
2812
|
x: t - 400 / e / 2,
|
|
2850
2813
|
y: n - 300 / e / 2
|
|
2851
2814
|
});
|
|
2852
2815
|
return;
|
|
2853
2816
|
}
|
|
2854
2817
|
if (e.key === "-" && !(e.target instanceof HTMLInputElement)) {
|
|
2855
|
-
let e = Math.max(
|
|
2856
|
-
P(e),
|
|
2818
|
+
let e = Math.max(zn, Math.min(Bn, s / Rn)), t = c.x + 400 / s / 2, n = c.y + 300 / s / 2;
|
|
2819
|
+
P(e), F({
|
|
2857
2820
|
x: t - 400 / e / 2,
|
|
2858
2821
|
y: n - 300 / e / 2
|
|
2859
2822
|
});
|
|
2860
2823
|
return;
|
|
2861
2824
|
}
|
|
2862
2825
|
if (e.key === "0" && !(e.target instanceof HTMLInputElement)) {
|
|
2863
|
-
P(1),
|
|
2826
|
+
P(1), F({
|
|
2864
2827
|
x: 0,
|
|
2865
2828
|
y: 0
|
|
2866
2829
|
});
|
|
@@ -2870,21 +2833,21 @@ function Vn({ className: e }) {
|
|
|
2870
2833
|
}
|
|
2871
2834
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
2872
2835
|
}, []);
|
|
2873
|
-
function de(e, t = j, n =
|
|
2874
|
-
let r = Math.max(
|
|
2875
|
-
|
|
2836
|
+
function de(e, t = j, n = ae) {
|
|
2837
|
+
let r = Math.max(zn, Math.min(Bn, t * e)), i = n.x + 400 / t / 2, a = n.y + 300 / t / 2;
|
|
2838
|
+
F({
|
|
2876
2839
|
x: i - 400 / r / 2,
|
|
2877
2840
|
y: a - 300 / r / 2
|
|
2878
2841
|
}), P(r);
|
|
2879
2842
|
}
|
|
2880
2843
|
function fe(e) {
|
|
2881
|
-
return ce.current ?
|
|
2844
|
+
return ce.current ? bn(e.clientX, e.clientY, ce.current) : null;
|
|
2882
2845
|
}
|
|
2883
2846
|
function pe(e, t) {
|
|
2884
2847
|
let n = null;
|
|
2885
2848
|
for (let r = 0; r < t.points.length; r++) {
|
|
2886
|
-
let i =
|
|
2887
|
-
i <=
|
|
2849
|
+
let i = xn(e, t.points[r]);
|
|
2850
|
+
i <= In && (!n || i < n.d) && (n = {
|
|
2888
2851
|
index: r,
|
|
2889
2852
|
d: i
|
|
2890
2853
|
});
|
|
@@ -2894,8 +2857,8 @@ function Vn({ className: e }) {
|
|
|
2894
2857
|
function R(e, t) {
|
|
2895
2858
|
let n = null;
|
|
2896
2859
|
for (let r = 0; r < t.points.length; r++) {
|
|
2897
|
-
let i = t.points[r], a = t.points[(r + 1) % t.points.length], { dist: o, t: s } =
|
|
2898
|
-
o <=
|
|
2860
|
+
let i = t.points[r], a = t.points[(r + 1) % t.points.length], { dist: o, t: s } = Sn(e, i, a);
|
|
2861
|
+
o <= Ln && (!n || o < n.d) && (n = {
|
|
2899
2862
|
index: r,
|
|
2900
2863
|
t: s,
|
|
2901
2864
|
d: o
|
|
@@ -2953,7 +2916,7 @@ function Vn({ className: e }) {
|
|
|
2953
2916
|
x: e.clientX,
|
|
2954
2917
|
y: e.clientY
|
|
2955
2918
|
},
|
|
2956
|
-
origPan: { ...
|
|
2919
|
+
origPan: { ...ae },
|
|
2957
2920
|
scaleX: 400 / j / n.width,
|
|
2958
2921
|
scaleY: 300 / j / n.height
|
|
2959
2922
|
};
|
|
@@ -2967,9 +2930,9 @@ function Vn({ className: e }) {
|
|
|
2967
2930
|
if (g) {
|
|
2968
2931
|
let e = t.find((e) => e.id === g);
|
|
2969
2932
|
if (e) {
|
|
2970
|
-
let t =
|
|
2933
|
+
let t = Cn(n, [e]);
|
|
2971
2934
|
t && i((e) => [...e, {
|
|
2972
|
-
id:
|
|
2935
|
+
id: Hn("door"),
|
|
2973
2936
|
roomId: t.roomId,
|
|
2974
2937
|
wallIndex: t.wallIndex,
|
|
2975
2938
|
t: t.t,
|
|
@@ -2983,7 +2946,7 @@ function Vn({ className: e }) {
|
|
|
2983
2946
|
return;
|
|
2984
2947
|
}
|
|
2985
2948
|
if (o === "polygon") {
|
|
2986
|
-
D.length >= 3 &&
|
|
2949
|
+
D.length >= 3 && xn(n, D[0]) <= 8 ? ue(D) : O((e) => [...e, n]);
|
|
2987
2950
|
return;
|
|
2988
2951
|
}
|
|
2989
2952
|
if (o === "select") {
|
|
@@ -2991,7 +2954,7 @@ function Vn({ className: e }) {
|
|
|
2991
2954
|
if (e) {
|
|
2992
2955
|
let t = pe(n, e);
|
|
2993
2956
|
if (t) {
|
|
2994
|
-
|
|
2957
|
+
I.current = {
|
|
2995
2958
|
type: "vertex",
|
|
2996
2959
|
roomId: e.id,
|
|
2997
2960
|
index: t.index,
|
|
@@ -3004,11 +2967,11 @@ function Vn({ className: e }) {
|
|
|
3004
2967
|
if (e) {
|
|
3005
2968
|
let t = R(n, e);
|
|
3006
2969
|
if (t) {
|
|
3007
|
-
let r = e.points[t.index], i = e.points[(t.index + 1) % e.points.length], a =
|
|
2970
|
+
let r = e.points[t.index], i = e.points[(t.index + 1) % e.points.length], a = yn({
|
|
3008
2971
|
x: r.x + (i.x - r.x) * t.t,
|
|
3009
2972
|
y: r.y + (i.y - r.y) * t.t
|
|
3010
2973
|
}), o = me(e.id, t.index, t.t, a);
|
|
3011
|
-
|
|
2974
|
+
I.current = {
|
|
3012
2975
|
type: "vertex",
|
|
3013
2976
|
roomId: e.id,
|
|
3014
2977
|
index: o,
|
|
@@ -3018,9 +2981,9 @@ function Vn({ className: e }) {
|
|
|
3018
2981
|
return;
|
|
3019
2982
|
}
|
|
3020
2983
|
}
|
|
3021
|
-
let r = t.find((e) =>
|
|
2984
|
+
let r = t.find((e) => wn(n, e.points));
|
|
3022
2985
|
if (r) {
|
|
3023
|
-
h(r.id),
|
|
2986
|
+
h(r.id), I.current = {
|
|
3024
2987
|
type: "room",
|
|
3025
2988
|
roomId: r.id,
|
|
3026
2989
|
start: n,
|
|
@@ -3044,7 +3007,7 @@ function Vn({ className: e }) {
|
|
|
3044
3007
|
function ge(e) {
|
|
3045
3008
|
if (se.current) {
|
|
3046
3009
|
let { startClient: t, origPan: n, scaleX: r, scaleY: i } = se.current;
|
|
3047
|
-
|
|
3010
|
+
F({
|
|
3048
3011
|
x: n.x - (e.clientX - t.x) * r,
|
|
3049
3012
|
y: n.y - (e.clientY - t.y) * i
|
|
3050
3013
|
});
|
|
@@ -3055,7 +3018,7 @@ function Vn({ className: e }) {
|
|
|
3055
3018
|
if (oe.current && g) {
|
|
3056
3019
|
let e = t.find((e) => e.id === g);
|
|
3057
3020
|
if (e) {
|
|
3058
|
-
let t =
|
|
3021
|
+
let t = Cn(r, [e]);
|
|
3059
3022
|
t && i((e) => e.map((e) => e.id === oe.current ? {
|
|
3060
3023
|
...e,
|
|
3061
3024
|
wallIndex: t.wallIndex,
|
|
@@ -3072,10 +3035,10 @@ function Vn({ className: e }) {
|
|
|
3072
3035
|
A(r);
|
|
3073
3036
|
return;
|
|
3074
3037
|
}
|
|
3075
|
-
if (o === "select" && !g &&
|
|
3076
|
-
let e =
|
|
3038
|
+
if (o === "select" && !g && I.current) {
|
|
3039
|
+
let e = I.current;
|
|
3077
3040
|
if (e.type === "vertex") {
|
|
3078
|
-
let t = r.x - e.start.x, i = r.y - e.start.y, a =
|
|
3041
|
+
let t = r.x - e.start.x, i = r.y - e.start.y, a = yn({
|
|
3079
3042
|
x: e.origPt.x + t,
|
|
3080
3043
|
y: e.origPt.y + i
|
|
3081
3044
|
});
|
|
@@ -3110,12 +3073,12 @@ function Vn({ className: e }) {
|
|
|
3110
3073
|
if (o === "rect" && x) {
|
|
3111
3074
|
let e = Math.min(x.x, t.x), r = Math.min(x.y, t.y), i = Math.abs(t.x - x.x), a = Math.abs(t.y - x.y);
|
|
3112
3075
|
i >= 10 && a >= 10 && n((t) => [...t, {
|
|
3113
|
-
id:
|
|
3076
|
+
id: Hn("room"),
|
|
3114
3077
|
name: `Room ${t.length + 1}`,
|
|
3115
|
-
points:
|
|
3078
|
+
points: En(e, r, i, a)
|
|
3116
3079
|
}]), S(null), ee(null);
|
|
3117
3080
|
}
|
|
3118
|
-
oe.current = null,
|
|
3081
|
+
oe.current = null, I.current = null;
|
|
3119
3082
|
}
|
|
3120
3083
|
}
|
|
3121
3084
|
function ve(e) {
|
|
@@ -3148,11 +3111,11 @@ function Vn({ className: e }) {
|
|
|
3148
3111
|
r.onload = (e) => {
|
|
3149
3112
|
let t = e.target?.result;
|
|
3150
3113
|
if (typeof t != "string") return;
|
|
3151
|
-
let r =
|
|
3114
|
+
let r = Pn(t);
|
|
3152
3115
|
r.length !== 0 && (n(r.map((e) => ({
|
|
3153
3116
|
...e,
|
|
3154
|
-
id:
|
|
3155
|
-
}))), i([]), h(null), _(null), P(1),
|
|
3117
|
+
id: Hn("room")
|
|
3118
|
+
}))), i([]), h(null), _(null), P(1), F({
|
|
3156
3119
|
x: 0,
|
|
3157
3120
|
y: 0
|
|
3158
3121
|
}));
|
|
@@ -3196,15 +3159,15 @@ function Vn({ className: e }) {
|
|
|
3196
3159
|
/* @__PURE__ */ M("button", {
|
|
3197
3160
|
title: "Zoom in (+)",
|
|
3198
3161
|
className: Z.roomDrawerToolbarBtn,
|
|
3199
|
-
onClick: () => de(
|
|
3200
|
-
disabled: j >=
|
|
3162
|
+
onClick: () => de(Rn),
|
|
3163
|
+
disabled: j >= Bn,
|
|
3201
3164
|
children: /* @__PURE__ */ M(p, { icon: E })
|
|
3202
3165
|
}),
|
|
3203
3166
|
/* @__PURE__ */ N("button", {
|
|
3204
3167
|
title: `Reset zoom (0) — ${Math.round(j * 100)}%`,
|
|
3205
3168
|
className: Z.roomDrawerToolbarZoomLabel,
|
|
3206
3169
|
onClick: () => {
|
|
3207
|
-
P(1),
|
|
3170
|
+
P(1), F({
|
|
3208
3171
|
x: 0,
|
|
3209
3172
|
y: 0
|
|
3210
3173
|
});
|
|
@@ -3214,8 +3177,8 @@ function Vn({ className: e }) {
|
|
|
3214
3177
|
/* @__PURE__ */ M("button", {
|
|
3215
3178
|
title: "Zoom out (−)",
|
|
3216
3179
|
className: Z.roomDrawerToolbarBtn,
|
|
3217
|
-
onClick: () => de(1 /
|
|
3218
|
-
disabled: j <=
|
|
3180
|
+
onClick: () => de(1 / Rn),
|
|
3181
|
+
disabled: j <= zn,
|
|
3219
3182
|
children: /* @__PURE__ */ M(p, { icon: T })
|
|
3220
3183
|
}),
|
|
3221
3184
|
/* @__PURE__ */ M("div", { className: Z.roomDrawerToolbarSep }),
|
|
@@ -3228,7 +3191,7 @@ function Vn({ className: e }) {
|
|
|
3228
3191
|
/* @__PURE__ */ M("button", {
|
|
3229
3192
|
title: "Download SVG",
|
|
3230
3193
|
className: Z.roomDrawerToolbarBtn,
|
|
3231
|
-
onClick: () =>
|
|
3194
|
+
onClick: () => Fn(t, r),
|
|
3232
3195
|
disabled: t.length === 0,
|
|
3233
3196
|
children: /* @__PURE__ */ M(p, { icon: y })
|
|
3234
3197
|
}),
|
|
@@ -3244,7 +3207,7 @@ function Vn({ className: e }) {
|
|
|
3244
3207
|
/* @__PURE__ */ N("svg", {
|
|
3245
3208
|
ref: ce,
|
|
3246
3209
|
className: f(Z.roomDrawerCanvas, Oe),
|
|
3247
|
-
viewBox: `${
|
|
3210
|
+
viewBox: `${ae.x} ${ae.y} ${Ee} ${De}`,
|
|
3248
3211
|
onMouseDown: z,
|
|
3249
3212
|
onMouseMove: ge,
|
|
3250
3213
|
onMouseUp: _e,
|
|
@@ -3262,14 +3225,14 @@ function Vn({ className: e }) {
|
|
|
3262
3225
|
})
|
|
3263
3226
|
}) }),
|
|
3264
3227
|
/* @__PURE__ */ M("rect", {
|
|
3265
|
-
x:
|
|
3266
|
-
y:
|
|
3228
|
+
x: ae.x,
|
|
3229
|
+
y: ae.y,
|
|
3267
3230
|
width: Ee,
|
|
3268
3231
|
height: De,
|
|
3269
3232
|
fill: "url(#rd-grid)"
|
|
3270
3233
|
}),
|
|
3271
3234
|
t.map((e) => {
|
|
3272
|
-
let t = e.points, n = t.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x},${e.y}`).join(" ") + " Z", i =
|
|
3235
|
+
let t = e.points, n = t.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x},${e.y}`).join(" ") + " Z", i = An(t, r.filter((t) => t.roomId === e.id)), a = Tn(t), o = l === e.id, s = g === e.id;
|
|
3273
3236
|
return /* @__PURE__ */ N("g", { children: [
|
|
3274
3237
|
/* @__PURE__ */ M("path", {
|
|
3275
3238
|
d: n,
|
|
@@ -3292,7 +3255,7 @@ function Vn({ className: e }) {
|
|
|
3292
3255
|
r.map((e) => {
|
|
3293
3256
|
let n = t.find((t) => t.id === e.roomId);
|
|
3294
3257
|
if (!n) return null;
|
|
3295
|
-
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a =
|
|
3258
|
+
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a = Dn(r, i, e.t, e.width);
|
|
3296
3259
|
return a ? /* @__PURE__ */ M("line", {
|
|
3297
3260
|
x1: a.p1.x,
|
|
3298
3261
|
y1: a.p1.y,
|
|
@@ -3304,7 +3267,7 @@ function Vn({ className: e }) {
|
|
|
3304
3267
|
g && we.map((e) => {
|
|
3305
3268
|
let n = t.find((t) => t.id === e.roomId);
|
|
3306
3269
|
if (!n) return null;
|
|
3307
|
-
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a =
|
|
3270
|
+
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a = Dn(r, i, e.t, e.width);
|
|
3308
3271
|
if (!a) return null;
|
|
3309
3272
|
let o = {
|
|
3310
3273
|
x: (a.p1.x + a.p2.x) / 2,
|
|
@@ -3435,26 +3398,26 @@ function Vn({ className: e }) {
|
|
|
3435
3398
|
}),
|
|
3436
3399
|
/* @__PURE__ */ M("div", {
|
|
3437
3400
|
className: Z.roomDrawerHint,
|
|
3438
|
-
children: g ? "Click a wall to add a door · Adjust width or delete from the list · Done or Esc to finish" : `${
|
|
3401
|
+
children: g ? "Click a wall to add a door · Adjust width or delete from the list · Done or Esc to finish" : `${Un[o]} · Scroll to zoom · Middle-drag to pan · 0 to reset`
|
|
3439
3402
|
})
|
|
3440
3403
|
]
|
|
3441
3404
|
});
|
|
3442
3405
|
}
|
|
3443
|
-
var
|
|
3406
|
+
var Gn = { scrollbarProvider: "scrollbarProvider_IMBFu" };
|
|
3444
3407
|
//#endregion
|
|
3445
3408
|
//#region package/common/scrollbarProvider/scrollbarProvider.tsx
|
|
3446
|
-
function
|
|
3409
|
+
function Kn({ className: e = void 0, children: t = void 0 }) {
|
|
3447
3410
|
return /* @__PURE__ */ M("div", {
|
|
3448
|
-
className: f(
|
|
3411
|
+
className: f(Gn.scrollbarProvider, e),
|
|
3449
3412
|
children: t
|
|
3450
3413
|
});
|
|
3451
3414
|
}
|
|
3452
3415
|
//#endregion
|
|
3453
3416
|
//#region package/common/scrollbarProvider/index.ts
|
|
3454
|
-
var
|
|
3417
|
+
var qn = Kn, Jn = { resultCount: "resultCount_Sn48Q" };
|
|
3455
3418
|
//#endregion
|
|
3456
3419
|
//#region package/common/searchInput/searchInput.tsx
|
|
3457
|
-
function
|
|
3420
|
+
function Yn({ value: e, onChange: t, onDebounce: n, placeholder: r, label: i, debounceMs: o = 500, totalAmount: s, showAmount: c = !0, className: l, width: d, ...f }) {
|
|
3458
3421
|
let p = u(null);
|
|
3459
3422
|
a(() => () => {
|
|
3460
3423
|
p.current !== null && clearTimeout(p.current);
|
|
@@ -3477,7 +3440,7 @@ function Kn({ value: e, onChange: t, onDebounce: n, placeholder: r, label: i, de
|
|
|
3477
3440
|
value: e,
|
|
3478
3441
|
onChange: m
|
|
3479
3442
|
}), h && /* @__PURE__ */ N("p", {
|
|
3480
|
-
className:
|
|
3443
|
+
className: Jn.resultCount,
|
|
3481
3444
|
children: [
|
|
3482
3445
|
s,
|
|
3483
3446
|
" ",
|
|
@@ -3513,16 +3476,16 @@ var Q = {
|
|
|
3513
3476
|
stepperEntryLabel: "stepper-entry-label_b94eg",
|
|
3514
3477
|
"stepper-entry-label-vertical": "stepper-entry-label-vertical_Zm8i4",
|
|
3515
3478
|
stepperEntryLabelVertical: "stepper-entry-label-vertical_Zm8i4"
|
|
3516
|
-
},
|
|
3479
|
+
}, Xn = class e extends t {
|
|
3517
3480
|
static alignments = {
|
|
3518
3481
|
VERTICAL: "vertical",
|
|
3519
3482
|
HORIZONTAL: "horizontal"
|
|
3520
3483
|
};
|
|
3521
3484
|
static propTypes = {
|
|
3522
|
-
steps:
|
|
3523
|
-
currentStep:
|
|
3524
|
-
alignment:
|
|
3525
|
-
onStepClicked:
|
|
3485
|
+
steps: I.arrayOf(I.shape({})),
|
|
3486
|
+
currentStep: I.number,
|
|
3487
|
+
alignment: I.oneOf([e.alignments.HORIZONTAL, e.alignments.VERTICAL]),
|
|
3488
|
+
onStepClicked: I.func
|
|
3526
3489
|
};
|
|
3527
3490
|
static defaultProps = {
|
|
3528
3491
|
steps: [],
|
|
@@ -3576,7 +3539,7 @@ var Q = {
|
|
|
3576
3539
|
children: t.map(this.renderStep)
|
|
3577
3540
|
});
|
|
3578
3541
|
}
|
|
3579
|
-
},
|
|
3542
|
+
}, Zn = "https://tenor.googleapis.com/v2", Qn = class {
|
|
3580
3543
|
constructor(e) {
|
|
3581
3544
|
this.key = e;
|
|
3582
3545
|
}
|
|
@@ -3585,14 +3548,14 @@ var Q = {
|
|
|
3585
3548
|
q: e,
|
|
3586
3549
|
key: this.key
|
|
3587
3550
|
});
|
|
3588
|
-
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(`${
|
|
3551
|
+
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(`${Zn}/search?${n}`)).json();
|
|
3589
3552
|
}
|
|
3590
3553
|
async searchSuggestions(e) {
|
|
3591
3554
|
let t = new URLSearchParams({
|
|
3592
3555
|
q: e,
|
|
3593
3556
|
key: this.key
|
|
3594
3557
|
});
|
|
3595
|
-
return (await fetch(`${
|
|
3558
|
+
return (await fetch(`${Zn}/search_suggestions?${t}`)).json();
|
|
3596
3559
|
}
|
|
3597
3560
|
registerShare(e, t) {
|
|
3598
3561
|
let n = new URLSearchParams({
|
|
@@ -3600,91 +3563,58 @@ var Q = {
|
|
|
3600
3563
|
q: e,
|
|
3601
3564
|
key: this.key
|
|
3602
3565
|
});
|
|
3603
|
-
fetch(`${
|
|
3566
|
+
fetch(`${Zn}/registershare?${n}`).catch(() => null);
|
|
3604
3567
|
}
|
|
3605
|
-
},
|
|
3568
|
+
}, $n = {
|
|
3606
3569
|
gifPreview: "gifPreview_-ECUZ",
|
|
3607
3570
|
"gifPreview-image": "gifPreview-image_Aq7-a",
|
|
3608
3571
|
gifPreviewImage: "gifPreview-image_Aq7-a",
|
|
3609
3572
|
"gifPreview-image-container": "gifPreview-image-container_ycypL",
|
|
3610
3573
|
gifPreviewImageContainer: "gifPreview-image-container_ycypL",
|
|
3611
3574
|
gradientBottomLeftToTopRight: "gradientBottomLeftToTopRight_wo6HB"
|
|
3612
|
-
}
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
let { className: e, previewItems: t, onSelect: n } = this.props;
|
|
3635
|
-
return /* @__PURE__ */ M(ie, { children: t.length > 0 && /* @__PURE__ */ M("div", {
|
|
3636
|
-
className: f(Xn.gifPreview, e),
|
|
3637
|
-
onScroll: this.onScroll,
|
|
3638
|
-
children: t.map((e, t) => /* @__PURE__ */ M(Ne, {
|
|
3639
|
-
className: Xn.gifPreviewImageContainer,
|
|
3640
|
-
onClick: () => n(e),
|
|
3641
|
-
children: /* @__PURE__ */ M("div", {
|
|
3642
|
-
className: Xn.gifPreviewImage,
|
|
3643
|
-
style: { backgroundImage: `url(${e.media_formats.tinygif.url})` }
|
|
3644
|
-
})
|
|
3645
|
-
}, `${e.id}_${t}`))
|
|
3646
|
-
}) });
|
|
3647
|
-
}
|
|
3648
|
-
}, Qn = {
|
|
3575
|
+
};
|
|
3576
|
+
//#endregion
|
|
3577
|
+
//#region package/common/tenorPicker/components/gifPreview/gifPreview.tsx
|
|
3578
|
+
function er({ className: e, previewItems: t = [], onSelect: n, onLoadAdditional: r }) {
|
|
3579
|
+
function i(e) {
|
|
3580
|
+
let t = e.currentTarget, n = t.scrollHeight - t.clientHeight * 1.5;
|
|
3581
|
+
t.scrollTop >= n && r?.();
|
|
3582
|
+
}
|
|
3583
|
+
return /* @__PURE__ */ M(ie, { children: t.length > 0 && /* @__PURE__ */ M("div", {
|
|
3584
|
+
className: f($n.gifPreview, e),
|
|
3585
|
+
onScroll: i,
|
|
3586
|
+
children: t.map((e, t) => /* @__PURE__ */ M(Ne, {
|
|
3587
|
+
className: $n.gifPreviewImageContainer,
|
|
3588
|
+
onClick: () => n?.(e),
|
|
3589
|
+
children: /* @__PURE__ */ M("div", {
|
|
3590
|
+
className: $n.gifPreviewImage,
|
|
3591
|
+
style: { backgroundImage: `url(${e.media_formats.tinygif.url})` }
|
|
3592
|
+
})
|
|
3593
|
+
}, `${e.id}_${t}`))
|
|
3594
|
+
}) });
|
|
3595
|
+
}
|
|
3596
|
+
var tr = {
|
|
3649
3597
|
gifView: "gifView_Fa2zj",
|
|
3650
3598
|
"gifView-loading": "gifView-loading_LfNJr",
|
|
3651
3599
|
gifViewLoading: "gifView-loading_LfNJr",
|
|
3652
3600
|
gradientBottomLeftToTopRight: "gradientBottomLeftToTopRight_JR6aS"
|
|
3653
|
-
}
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
let { src: t } = e, { src: n } = this.props;
|
|
3671
|
-
console.log(">>SRC", {
|
|
3672
|
-
src: n,
|
|
3673
|
-
prevSrc: t
|
|
3674
|
-
}), n !== t && this.setState({ isLoading: !0 });
|
|
3675
|
-
}
|
|
3676
|
-
render() {
|
|
3677
|
-
let { className: e, src: t } = this.props, { isLoading: n } = this.state;
|
|
3678
|
-
return console.log(">>RENDER", t), /* @__PURE__ */ N("div", {
|
|
3679
|
-
className: f(Qn.gifView, e),
|
|
3680
|
-
children: [/* @__PURE__ */ M("img", {
|
|
3681
|
-
className: Qn.tenorPickerSelected,
|
|
3682
|
-
src: t,
|
|
3683
|
-
onLoad: this.onLoaded
|
|
3684
|
-
}), n && /* @__PURE__ */ M("div", { className: Qn.gifViewLoading })]
|
|
3685
|
-
});
|
|
3686
|
-
}
|
|
3687
|
-
}, er = {
|
|
3601
|
+
};
|
|
3602
|
+
//#endregion
|
|
3603
|
+
//#region package/common/tenorPicker/components/gifView/gifView.tsx
|
|
3604
|
+
function nr({ className: e, src: t = "" }) {
|
|
3605
|
+
let [n, r] = d(!0);
|
|
3606
|
+
return a(() => {
|
|
3607
|
+
r(!0);
|
|
3608
|
+
}, [t]), /* @__PURE__ */ N("div", {
|
|
3609
|
+
className: f(tr.gifView, e),
|
|
3610
|
+
children: [/* @__PURE__ */ M("img", {
|
|
3611
|
+
className: tr.tenorPickerSelected,
|
|
3612
|
+
src: t,
|
|
3613
|
+
onLoad: () => r(!1)
|
|
3614
|
+
}), n && /* @__PURE__ */ M("div", { className: tr.gifViewLoading })]
|
|
3615
|
+
});
|
|
3616
|
+
}
|
|
3617
|
+
var rr = {
|
|
3688
3618
|
"tenorPicker-selected": "tenorPicker-selected_IfR2z",
|
|
3689
3619
|
tenorPickerSelected: "tenorPicker-selected_IfR2z",
|
|
3690
3620
|
"tenorPicker-modal-content": "tenorPicker-modal-content_Vkolf",
|
|
@@ -3696,8 +3626,8 @@ var Q = {
|
|
|
3696
3626
|
};
|
|
3697
3627
|
//#endregion
|
|
3698
3628
|
//#region package/common/tenorPicker/tenorPicker.tsx
|
|
3699
|
-
function
|
|
3700
|
-
let a = c(() => new
|
|
3629
|
+
function ir({ className: e, token: t = "", isModal: n = !1, onSelect: r = () => void 0, selected: i = null }) {
|
|
3630
|
+
let a = c(() => new Qn(t), [t]), [o, s] = d(""), [l, u] = d([]), [p, m] = d([]), [h, g] = d(null), [_, v] = d(!1);
|
|
3701
3631
|
async function y(e) {
|
|
3702
3632
|
if (s(e), !e.trim()) {
|
|
3703
3633
|
u([]), m([]), g(null);
|
|
@@ -3723,23 +3653,23 @@ function tr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3723
3653
|
function S() {
|
|
3724
3654
|
return /* @__PURE__ */ M(Ke, {
|
|
3725
3655
|
inline: !0,
|
|
3726
|
-
className:
|
|
3656
|
+
className: rr.tenorPickerSuggestionsContainer,
|
|
3727
3657
|
children: p.map((e) => /* @__PURE__ */ M(Ge, {
|
|
3728
|
-
className:
|
|
3658
|
+
className: rr.tenorPickerSuggestionsItem,
|
|
3729
3659
|
text: e,
|
|
3730
3660
|
onClick: () => y(e)
|
|
3731
3661
|
}, e))
|
|
3732
3662
|
});
|
|
3733
3663
|
}
|
|
3734
3664
|
function C() {
|
|
3735
|
-
return /* @__PURE__ */ M(
|
|
3665
|
+
return /* @__PURE__ */ M(er, {
|
|
3736
3666
|
previewItems: l,
|
|
3737
3667
|
onSelect: x,
|
|
3738
3668
|
onLoadAdditional: b
|
|
3739
3669
|
});
|
|
3740
3670
|
}
|
|
3741
3671
|
function w() {
|
|
3742
|
-
return /* @__PURE__ */ M(
|
|
3672
|
+
return /* @__PURE__ */ M(Yn, {
|
|
3743
3673
|
label: "Pick gif",
|
|
3744
3674
|
value: o,
|
|
3745
3675
|
onDebounce: y,
|
|
@@ -3747,7 +3677,7 @@ function tr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3747
3677
|
});
|
|
3748
3678
|
}
|
|
3749
3679
|
return n ? /* @__PURE__ */ N("div", {
|
|
3750
|
-
className: f(
|
|
3680
|
+
className: f(rr.tenorPicker, e),
|
|
3751
3681
|
children: [
|
|
3752
3682
|
/* @__PURE__ */ N("div", {
|
|
3753
3683
|
className: xe.actionButtons,
|
|
@@ -3760,15 +3690,15 @@ function tr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3760
3690
|
children: "Remove gif"
|
|
3761
3691
|
})]
|
|
3762
3692
|
}),
|
|
3763
|
-
i && /* @__PURE__ */ M(
|
|
3764
|
-
className:
|
|
3693
|
+
i && /* @__PURE__ */ M(nr, {
|
|
3694
|
+
className: rr.tenorPickerSelected,
|
|
3765
3695
|
src: i
|
|
3766
3696
|
}),
|
|
3767
3697
|
/* @__PURE__ */ M(ft, {
|
|
3768
3698
|
isOpen: _,
|
|
3769
3699
|
onClose: () => v(!1),
|
|
3770
3700
|
children: /* @__PURE__ */ N("div", {
|
|
3771
|
-
className:
|
|
3701
|
+
className: rr.tenorPickerModalContent,
|
|
3772
3702
|
children: [
|
|
3773
3703
|
w(),
|
|
3774
3704
|
S(),
|
|
@@ -3778,7 +3708,7 @@ function tr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3778
3708
|
})
|
|
3779
3709
|
]
|
|
3780
3710
|
}) : /* @__PURE__ */ N("div", {
|
|
3781
|
-
className: f(
|
|
3711
|
+
className: f(rr.tenorPicker, e),
|
|
3782
3712
|
children: [
|
|
3783
3713
|
/* @__PURE__ */ M(Xe, {
|
|
3784
3714
|
align: Je.Left,
|
|
@@ -3792,8 +3722,8 @@ function tr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3792
3722
|
onClick: () => x(null),
|
|
3793
3723
|
children: "Remove gif"
|
|
3794
3724
|
}),
|
|
3795
|
-
i && /* @__PURE__ */ M(
|
|
3796
|
-
className:
|
|
3725
|
+
i && /* @__PURE__ */ M(nr, {
|
|
3726
|
+
className: rr.tenorPickerSelected,
|
|
3797
3727
|
src: i
|
|
3798
3728
|
})
|
|
3799
3729
|
]
|
|
@@ -3801,20 +3731,82 @@ function tr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3801
3731
|
}
|
|
3802
3732
|
//#endregion
|
|
3803
3733
|
//#region package/common/textarea/textarea.tsx
|
|
3804
|
-
function
|
|
3734
|
+
function ar(e) {
|
|
3805
3735
|
return /* @__PURE__ */ M($e, {
|
|
3806
3736
|
...e,
|
|
3807
3737
|
multiline: !0
|
|
3808
3738
|
});
|
|
3809
3739
|
}
|
|
3810
|
-
|
|
3740
|
+
//#endregion
|
|
3741
|
+
//#region package/common/themeProvider/defaultTheme.ts
|
|
3742
|
+
var or = {
|
|
3743
|
+
id: "default",
|
|
3744
|
+
variables: {
|
|
3745
|
+
"--grey": "#8A8A8A",
|
|
3746
|
+
"--lightgrey": "#e0e0e0",
|
|
3747
|
+
"--lightergrey": "#B1B1B1",
|
|
3748
|
+
"--white": "#FFFFFF",
|
|
3749
|
+
"--red": "#D6002A",
|
|
3750
|
+
"--lighter-red": "#ffeae9",
|
|
3751
|
+
"--green": "#287626",
|
|
3752
|
+
"--lighter-green": "#C4FFC9",
|
|
3753
|
+
"--blue": "#5873d5",
|
|
3754
|
+
"--lighter-blue": "#C6DBFF",
|
|
3755
|
+
"--black": "black",
|
|
3756
|
+
"--orange": "#ff7f50",
|
|
3757
|
+
"--lighter-orange": "#ffe5d9",
|
|
3758
|
+
"--primary-color": "#8184d6",
|
|
3759
|
+
"--primary-accent": "#90CAF9",
|
|
3760
|
+
"--primary-lighter": "#9a9ce4",
|
|
3761
|
+
"--accent-color": "var(--grey)",
|
|
3762
|
+
"--accent-color-light": "var(--lightgrey)",
|
|
3763
|
+
"--text-color": "var(--white)",
|
|
3764
|
+
"--text-dark": "var(--lightergrey)",
|
|
3765
|
+
"--text-light": "var(--lightergrey)",
|
|
3766
|
+
"--text-on-primary": "var(--white)",
|
|
3767
|
+
"--text-on-delete": "var(--white)",
|
|
3768
|
+
"--border-color": "#656574",
|
|
3769
|
+
"--background": "#393945",
|
|
3770
|
+
"--background-accent": "#33333c",
|
|
3771
|
+
"--background-accent-dark": "var(--grey)",
|
|
3772
|
+
"--background-accent-light": "#484856",
|
|
3773
|
+
"--background-modal": "#484856",
|
|
3774
|
+
"--success-color": "var(--green)",
|
|
3775
|
+
"--success-lighter": "var(--lighter-green)",
|
|
3776
|
+
"--error-color": "var(--red)",
|
|
3777
|
+
"--error-lighter": "var(--lighter-red)",
|
|
3778
|
+
"--info-color": "var(--blue)",
|
|
3779
|
+
"--info-lighter": "var(--lighter-blue)",
|
|
3780
|
+
"--warn-color": "var(--orange)",
|
|
3781
|
+
"--warn-lighter": "var(--lighter-orange)",
|
|
3782
|
+
"--default-font-size": "14px",
|
|
3783
|
+
"--text-small-font-size": "12px",
|
|
3784
|
+
"--header-font-size": "24px",
|
|
3785
|
+
"--header-medium-font-size": "18px",
|
|
3786
|
+
"--header-small-font-size": "16px",
|
|
3787
|
+
"--default-font-weight": "400",
|
|
3788
|
+
"--header-font-weight": "600",
|
|
3789
|
+
"--input-background": "transparent",
|
|
3790
|
+
"--input-icon-color": "var(--text-color)",
|
|
3791
|
+
"--error-border-color": "var(--red)",
|
|
3792
|
+
"--default-border-radius": "8px",
|
|
3793
|
+
"--padding-sides": "15px",
|
|
3794
|
+
"--margin-top": "10px",
|
|
3795
|
+
"--default-font": "'Inter', sans-serif",
|
|
3796
|
+
"--themed-font": "'Inter', sans-serif",
|
|
3797
|
+
"--card-shadow": "0 3px 1px -2px rgb(0 0 0 / 20%), 0 2px 2px 0 rgb(0 0 0 / 14%), 0 1px 5px 0 rgb(0 0 0 / 12%)",
|
|
3798
|
+
"--spacing-s": "4px",
|
|
3799
|
+
"--spacing-m": "8px",
|
|
3800
|
+
"--spacing-l": "16px"
|
|
3801
|
+
}
|
|
3802
|
+
}, sr = { colorFade: "colorFade_eLv2g" }, cr = class extends t {
|
|
3811
3803
|
constructor(...t) {
|
|
3812
3804
|
super(...t), this.state = {
|
|
3813
3805
|
resolvedVariables: {},
|
|
3814
3806
|
colorFadeActive: !1,
|
|
3815
3807
|
currentThemeColor: null
|
|
3816
3808
|
}, this.colorFadeTimeout = null, this.wrapperRef = e.createRef(), this.themeColorMeta = null, this.createdThemeColorMeta = !1, this.applyTheme = (e) => {
|
|
3817
|
-
let
|
|
3809
|
+
let t = this.props.themes ?? [or], 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);
|
|
3818
3810
|
this.setState({
|
|
3819
3811
|
resolvedVariables: o,
|
|
3820
3812
|
colorFadeActive: !0
|
|
@@ -3848,15 +3840,15 @@ var rr = { colorFade: "colorFade_eLv2g" }, ir = class extends t {
|
|
|
3848
3840
|
}
|
|
3849
3841
|
}
|
|
3850
3842
|
resolveChain(e) {
|
|
3851
|
-
let
|
|
3852
|
-
return
|
|
3843
|
+
let t = (this.props.themes ?? [or]).find((t) => t.id === e);
|
|
3844
|
+
return t ? [...t.baseThemeId ? this.resolveChain(t.baseThemeId) : [], t.variables] : [];
|
|
3853
3845
|
}
|
|
3854
3846
|
render() {
|
|
3855
3847
|
let { children: e } = this.props, { resolvedVariables: t, colorFadeActive: n } = this.state;
|
|
3856
3848
|
return /* @__PURE__ */ M("div", {
|
|
3857
3849
|
ref: this.wrapperRef,
|
|
3858
3850
|
id: "themeProvider",
|
|
3859
|
-
className: n ?
|
|
3851
|
+
className: n ? sr.colorFade : void 0,
|
|
3860
3852
|
style: t,
|
|
3861
3853
|
children: e
|
|
3862
3854
|
});
|
|
@@ -3864,7 +3856,7 @@ var rr = { colorFade: "colorFade_eLv2g" }, ir = class extends t {
|
|
|
3864
3856
|
};
|
|
3865
3857
|
//#endregion
|
|
3866
3858
|
//#region package/common/themeProvider/useTheme.ts
|
|
3867
|
-
function
|
|
3859
|
+
function lr(e = "default") {
|
|
3868
3860
|
let [t, n] = d(localStorage.getItem("theme") || e);
|
|
3869
3861
|
return {
|
|
3870
3862
|
currentThemeId: t,
|
|
@@ -3873,7 +3865,7 @@ function ar(e = "default") {
|
|
|
3873
3865
|
}
|
|
3874
3866
|
};
|
|
3875
3867
|
}
|
|
3876
|
-
var
|
|
3868
|
+
var ur = {
|
|
3877
3869
|
wizard: "wizard_uRBAN",
|
|
3878
3870
|
"wizard-content": "wizard-content_lcl4C",
|
|
3879
3871
|
wizardContent: "wizard-content_lcl4C",
|
|
@@ -3881,12 +3873,12 @@ var or = {
|
|
|
3881
3873
|
wizardContentOutOfFrame: "wizard-content-outOfFrame_Eks4Y",
|
|
3882
3874
|
"wizard-content-container": "wizard-content-container_yxbCJ",
|
|
3883
3875
|
wizardContentContainer: "wizard-content-container_yxbCJ"
|
|
3884
|
-
},
|
|
3876
|
+
}, dr = class extends t {
|
|
3885
3877
|
static propTypes = {
|
|
3886
|
-
currentStep:
|
|
3887
|
-
stepCount:
|
|
3888
|
-
renderStep:
|
|
3889
|
-
className:
|
|
3878
|
+
currentStep: I.number,
|
|
3879
|
+
stepCount: I.number,
|
|
3880
|
+
renderStep: I.func,
|
|
3881
|
+
className: I.string
|
|
3890
3882
|
};
|
|
3891
3883
|
static defaultProps = {
|
|
3892
3884
|
currentStep: 0,
|
|
@@ -3916,23 +3908,23 @@ var or = {
|
|
|
3916
3908
|
render() {
|
|
3917
3909
|
let { renderStep: e, currentStep: t, stepCount: n, className: r } = this.props, { height: i, showOtherContent: a } = this.state, o = i === void 0 ? {} : { height: `${i}px` };
|
|
3918
3910
|
return /* @__PURE__ */ M("div", {
|
|
3919
|
-
className: f(f(
|
|
3911
|
+
className: f(f(ur.wizard, r)),
|
|
3920
3912
|
style: o,
|
|
3921
3913
|
children: /* @__PURE__ */ M("div", {
|
|
3922
|
-
className:
|
|
3914
|
+
className: ur.wizardContentContainer,
|
|
3923
3915
|
style: {
|
|
3924
3916
|
width: `${n * 100}%`,
|
|
3925
3917
|
marginLeft: `-${t * 100}%`
|
|
3926
3918
|
},
|
|
3927
3919
|
children: Array.from(Array(n), () => null).map((r, i) => /* @__PURE__ */ M("div", {
|
|
3928
3920
|
ref: (e) => this.updateCurrentRef(e, i),
|
|
3929
|
-
className:
|
|
3921
|
+
className: ur.wizardContent,
|
|
3930
3922
|
style: {
|
|
3931
3923
|
width: `${100 / n}%`,
|
|
3932
3924
|
marginLeft: `${100 / n * i}%`
|
|
3933
3925
|
},
|
|
3934
3926
|
children: /* @__PURE__ */ M("div", {
|
|
3935
|
-
className: f({ [
|
|
3927
|
+
className: f({ [ur.wizardContentOutOfFrame]: t !== i && !a }),
|
|
3936
3928
|
children: e(i)
|
|
3937
3929
|
})
|
|
3938
3930
|
}, `wizardContent${i}`))
|
|
@@ -3942,20 +3934,20 @@ var or = {
|
|
|
3942
3934
|
};
|
|
3943
3935
|
//#endregion
|
|
3944
3936
|
//#region package/services/formValidation/formValidatorGroup.ts
|
|
3945
|
-
function
|
|
3937
|
+
function fr(e) {
|
|
3946
3938
|
let t = e;
|
|
3947
3939
|
return t?.errors && Array.isArray(t.errors) ? t.errors.flatMap((e) => Object.entries(e).map(([e, t]) => ({
|
|
3948
3940
|
id: e,
|
|
3949
3941
|
message: t
|
|
3950
3942
|
}))) : [];
|
|
3951
3943
|
}
|
|
3952
|
-
var
|
|
3944
|
+
var pr = class {
|
|
3953
3945
|
#e;
|
|
3954
3946
|
#t;
|
|
3955
3947
|
#n;
|
|
3956
3948
|
#r;
|
|
3957
3949
|
#i;
|
|
3958
|
-
constructor(e, t = null, { initialValues: n, onSubmit: r = () => void 0, onValidate: i = () => void 0, errorParser: a =
|
|
3950
|
+
constructor(e, t = null, { initialValues: n, onSubmit: r = () => void 0, onValidate: i = () => void 0, errorParser: a = fr } = {}) {
|
|
3959
3951
|
this.#t = !1, this.#i = [], this.getFormError = () => {
|
|
3960
3952
|
let e = Object.keys(this.group);
|
|
3961
3953
|
for (let t = 0; t < e.length; t += 1) {
|
|
@@ -4039,7 +4031,7 @@ var lr = class {
|
|
|
4039
4031
|
};
|
|
4040
4032
|
//#endregion
|
|
4041
4033
|
//#region package/services/formValidation/FormValidatorGroupForm.tsx
|
|
4042
|
-
function
|
|
4034
|
+
function mr(e) {
|
|
4043
4035
|
return function({ children: t, ...n }) {
|
|
4044
4036
|
return /* @__PURE__ */ M("form", {
|
|
4045
4037
|
onSubmit: e.submit,
|
|
@@ -4051,11 +4043,11 @@ function ur(e) {
|
|
|
4051
4043
|
}
|
|
4052
4044
|
//#endregion
|
|
4053
4045
|
//#region package/services/formValidation/FormValidatorGroupWithForm.tsx
|
|
4054
|
-
var
|
|
4046
|
+
var hr = class extends pr {
|
|
4055
4047
|
constructor(e, t = null, n) {
|
|
4056
|
-
super(e, t, n), this.Form =
|
|
4048
|
+
super(e, t, n), this.Form = mr(this);
|
|
4057
4049
|
}
|
|
4058
|
-
},
|
|
4050
|
+
}, gr = class {
|
|
4059
4051
|
#e;
|
|
4060
4052
|
#t;
|
|
4061
4053
|
#n;
|
|
@@ -4109,40 +4101,40 @@ var dr = class extends lr {
|
|
|
4109
4101
|
return this.#r;
|
|
4110
4102
|
}
|
|
4111
4103
|
};
|
|
4112
|
-
|
|
4104
|
+
gr.prototype.toString = function() {
|
|
4113
4105
|
return `${this.value}`;
|
|
4114
4106
|
};
|
|
4115
4107
|
//#endregion
|
|
4116
4108
|
//#region package/services/regexp.ts
|
|
4117
|
-
function
|
|
4109
|
+
function _r(e) {
|
|
4118
4110
|
return /^[0-9]+$/.test(e);
|
|
4119
4111
|
}
|
|
4120
|
-
function
|
|
4112
|
+
function vr(e) {
|
|
4121
4113
|
return /^[0-9]{2}.[0-9]{2}.[0-9]{4}$/.test(e);
|
|
4122
4114
|
}
|
|
4123
|
-
function
|
|
4115
|
+
function yr(e) {
|
|
4124
4116
|
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);
|
|
4125
4117
|
}
|
|
4126
|
-
function
|
|
4118
|
+
function br(e) {
|
|
4127
4119
|
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);
|
|
4128
4120
|
}
|
|
4129
|
-
function
|
|
4121
|
+
function xr(e) {
|
|
4130
4122
|
return /^[A-Z]{6}[A-Z\d]{2}([A-Z\d]{3})?$/.test(e);
|
|
4131
4123
|
}
|
|
4132
|
-
function
|
|
4124
|
+
function Sr(e) {
|
|
4133
4125
|
return /[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}(\/[-a-zA-Z0-9@:%_+.~#?&//=]*)?$/.test(e);
|
|
4134
4126
|
}
|
|
4135
|
-
function
|
|
4127
|
+
function Cr(e) {
|
|
4136
4128
|
return /^[\w!@#$%^&*?±§~`'"/\\[\]{}\-,.();:><+=|öäüÖÄÜß €μ]{8,}$/.test(e);
|
|
4137
4129
|
}
|
|
4138
|
-
function
|
|
4130
|
+
function wr(e) {
|
|
4139
4131
|
return /^(?=.*[a-zöäüA-ZÖÄÜß])/.test(e);
|
|
4140
4132
|
}
|
|
4141
|
-
function
|
|
4133
|
+
function Tr(e) {
|
|
4142
4134
|
return /^(?=.*\d)/.test(e);
|
|
4143
4135
|
}
|
|
4144
|
-
function
|
|
4145
|
-
return
|
|
4136
|
+
function Er(e) {
|
|
4137
|
+
return Cr(e) && wr(e) && Tr(e);
|
|
4146
4138
|
}
|
|
4147
4139
|
//#endregion
|
|
4148
4140
|
//#region package/services/formValidation/validators.ts
|
|
@@ -4161,7 +4153,7 @@ var $ = { t: (e, t) => ({
|
|
|
4161
4153
|
"garages.errors.bic": "Must be a valid BIC",
|
|
4162
4154
|
"formValidators.minLetters": `Must contain at least ${t?.smart_count} letters`,
|
|
4163
4155
|
"formValidators.minDigits": `Must contain at least ${t?.smart_count} digits`
|
|
4164
|
-
})[e] || e },
|
|
4156
|
+
})[e] || e }, Dr = class e {
|
|
4165
4157
|
static {
|
|
4166
4158
|
this.minLength = (e, t) => (n) => !n || n.length < e ? {
|
|
4167
4159
|
id: "minLength",
|
|
@@ -4175,7 +4167,7 @@ var $ = { t: (e, t) => ({
|
|
|
4175
4167
|
} : null;
|
|
4176
4168
|
}
|
|
4177
4169
|
static {
|
|
4178
|
-
this.email = (e) => (t) => t && !
|
|
4170
|
+
this.email = (e) => (t) => t && !br(t) ? {
|
|
4179
4171
|
id: "email",
|
|
4180
4172
|
message: e || $.t("formValidators.email")
|
|
4181
4173
|
} : null;
|
|
@@ -4218,7 +4210,7 @@ var $ = { t: (e, t) => ({
|
|
|
4218
4210
|
this.multiEmail = (e) => (t) => {
|
|
4219
4211
|
if (t) {
|
|
4220
4212
|
let n = t.replace(/ /g, "").replace(/,/g, ";").split(";");
|
|
4221
|
-
for (let t = 0; t < n.length; t += 1) if (!
|
|
4213
|
+
for (let t = 0; t < n.length; t += 1) if (!br(n[t])) return {
|
|
4222
4214
|
id: "multiEmail",
|
|
4223
4215
|
message: e || $.t("formValidators.multiEmail")
|
|
4224
4216
|
};
|
|
@@ -4227,7 +4219,7 @@ var $ = { t: (e, t) => ({
|
|
|
4227
4219
|
};
|
|
4228
4220
|
}
|
|
4229
4221
|
static {
|
|
4230
|
-
this.date = (e) => (t) => t && !
|
|
4222
|
+
this.date = (e) => (t) => t && !vr(t) && !yr(t) ? {
|
|
4231
4223
|
id: "date",
|
|
4232
4224
|
message: e || $.t("formValidators.date")
|
|
4233
4225
|
} : null;
|
|
@@ -4239,13 +4231,13 @@ var $ = { t: (e, t) => ({
|
|
|
4239
4231
|
} : null;
|
|
4240
4232
|
}
|
|
4241
4233
|
static {
|
|
4242
|
-
this.website = (e) => (t) => t && !
|
|
4234
|
+
this.website = (e) => (t) => t && !Sr(t) ? {
|
|
4243
4235
|
id: "website",
|
|
4244
4236
|
message: e || $.t("garages.errors.website")
|
|
4245
4237
|
} : null;
|
|
4246
4238
|
}
|
|
4247
4239
|
static {
|
|
4248
|
-
this.bic = (e) => (t) => t && !
|
|
4240
|
+
this.bic = (e) => (t) => t && !xr(t) ? {
|
|
4249
4241
|
id: "bic",
|
|
4250
4242
|
message: e || $.t("garages.errors.bic")
|
|
4251
4243
|
} : null;
|
|
@@ -4271,7 +4263,7 @@ var $ = { t: (e, t) => ({
|
|
|
4271
4263
|
} : r : null;
|
|
4272
4264
|
};
|
|
4273
4265
|
}
|
|
4274
|
-
},
|
|
4266
|
+
}, Or = class extends n {
|
|
4275
4267
|
static {
|
|
4276
4268
|
this.defaultProps = {
|
|
4277
4269
|
formValidator: null,
|
|
@@ -4351,7 +4343,7 @@ var $ = { t: (e, t) => ({
|
|
|
4351
4343
|
};
|
|
4352
4344
|
//#endregion
|
|
4353
4345
|
//#region package/services/formValidation/useFormValidator.ts
|
|
4354
|
-
function
|
|
4346
|
+
function kr(e) {
|
|
4355
4347
|
let [, t] = l((e) => e + 1, 0);
|
|
4356
4348
|
return a(() => {
|
|
4357
4349
|
if (e) return e.registerOnUpdateListener(t), () => e.removeOnUpdateListener(t);
|
|
@@ -4359,9 +4351,9 @@ function Tr(e) {
|
|
|
4359
4351
|
}
|
|
4360
4352
|
//#endregion
|
|
4361
4353
|
//#region package/services/formValidation/useFormValidatorGroup.ts
|
|
4362
|
-
function
|
|
4354
|
+
function Ar(e, { initialValues: t, onSubmit: n, onValidate: r, errorParser: i } = {}) {
|
|
4363
4355
|
let [, o] = l((e) => e + 1, 0), s = u(null);
|
|
4364
|
-
s.current ||= new
|
|
4356
|
+
s.current ||= new hr(e, null, {
|
|
4365
4357
|
initialValues: t,
|
|
4366
4358
|
errorParser: i
|
|
4367
4359
|
});
|
|
@@ -4369,6 +4361,6 @@ function Er(e, { initialValues: t, onSubmit: n, onValidate: r, errorParser: i }
|
|
|
4369
4361
|
return d.current = n, f.current = r, a(() => (n !== void 0 && (c.onSubmitCallback = (...e) => d.current?.(...e)), r !== void 0 && (c.onValidateCallback = (...e) => f.current?.(...e)), c.registerOnUpdateListener(o), () => c.removeOnUpdateListener(o)), []), c;
|
|
4370
4362
|
}
|
|
4371
4363
|
//#endregion
|
|
4372
|
-
export { be as Accordion, B as AccordionStyleType, Ae as ActionButtons, Fe as ActionIcon, Je as Align, Ie as BodyEnd, W as Button, we as ButtonSize, U as ButtonStyleType, Te as ButtonType, Le as Card, Ve as CardActions, Be as CardContent, Re as CardHeader, ze as CardMedia, Ue as Checkbox, Ge as Chip, Ke as ChipContainer, ut as ColorPicker, pt as ConfirmModal,
|
|
4364
|
+
export { be as Accordion, B as AccordionStyleType, Ae as ActionButtons, Fe as ActionIcon, Je as Align, Ie as BodyEnd, W as Button, we as ButtonSize, U as ButtonStyleType, Te as ButtonType, Le as Card, Ve as CardActions, Be as CardContent, Re as CardHeader, ze as CardMedia, Ue as Checkbox, Ge as Chip, Ke as ChipContainer, ut as ColorPicker, pt as ConfirmModal, Bt as DatePicker, Rt as Dropdown, Ht as EmptyState, Kt as Fab, Xe as FloatingMenu, gr as FormValidator, hr as FormValidatorGroup, Yt as Icon, an as IconLoading, Zt as IdleManager, Lt as InfiniteBlock, $e as Input, q as InputType, Ne as InteractableDiv, tn as KanbanBoard, en as KanbanColumn, ft as Modal, cn as NumberInput, un as OptionPicker, mn as Overscroll, _n as ProgressBar, De as Ripple, Wn as RoomDrawer, qn as ScrollbarProvider, Yn as SearchInput, H as SpinnerLoading, Xn as Stepper, ir as TenorPicker, ar as Textarea, cr as ThemeProvider, Qe as Tooltip, Or as ValidatableComponent, Dr as Validators, dr as Wizard, bt as getLocale, Cr as hasEightPasswordChars, Tr as hasOnePasswordDigit, wr as hasOnePasswordLetter, xr as isBic, vr as isDate, br as isEmail, yr as isISODate, _r as isNumber, Er as isPassword, Sr as isURL, _t as mapLocale, yt as setLocale, kr as useFormValidator, Ar as useFormValidatorGroup, lr as useTheme };
|
|
4373
4365
|
|
|
4374
4366
|
//# sourceMappingURL=index.mjs.map
|