@ahrowe/ui 0.1.3 → 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 +424 -434
- package/dist/index.mjs.map +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/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,7 +2274,7 @@ 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",
|
|
@@ -2324,20 +2285,20 @@ var an = rn, on = {
|
|
|
2324
2285
|
};
|
|
2325
2286
|
//#endregion
|
|
2326
2287
|
//#region package/common/optionPicker/optionPicker.tsx
|
|
2327
|
-
function
|
|
2288
|
+
function un({ className: e = void 0, options: t, onChange: n, value: r, ...i }) {
|
|
2328
2289
|
let a = t.findIndex((e) => e.key === r) * 100 / t.length;
|
|
2329
2290
|
return /* @__PURE__ */ N("div", {
|
|
2330
2291
|
...i,
|
|
2331
|
-
className: f(
|
|
2292
|
+
className: f(ln.optionPicker, e),
|
|
2332
2293
|
children: [/* @__PURE__ */ M("div", {
|
|
2333
|
-
className:
|
|
2294
|
+
className: ln.optionPickerChip,
|
|
2334
2295
|
style: {
|
|
2335
2296
|
left: `${a}%`,
|
|
2336
2297
|
width: `${100 / t.length}%`
|
|
2337
2298
|
}
|
|
2338
2299
|
}), t.map((e) => /* @__PURE__ */ M(Ne, {
|
|
2339
2300
|
onClick: (t) => n(e.key, t),
|
|
2340
|
-
className: f(
|
|
2301
|
+
className: f(ln.optionPickerOption, e.key === r && ln.optionPickerOptionActive),
|
|
2341
2302
|
tabIndex: e.key === r ? -1 : 0,
|
|
2342
2303
|
children: e.label
|
|
2343
2304
|
}, e.key))]
|
|
@@ -2345,25 +2306,25 @@ function sn({ className: e = void 0, options: t, onChange: n, value: r, ...i })
|
|
|
2345
2306
|
}
|
|
2346
2307
|
//#endregion
|
|
2347
2308
|
//#region package/hooks/useWindowSize.ts
|
|
2348
|
-
var
|
|
2349
|
-
function
|
|
2309
|
+
var dn = 768;
|
|
2310
|
+
function fn() {
|
|
2350
2311
|
let [e, t] = d(() => ({
|
|
2351
2312
|
width: window.innerWidth,
|
|
2352
2313
|
height: window.innerHeight,
|
|
2353
|
-
isMobileSize: window.innerWidth <
|
|
2314
|
+
isMobileSize: window.innerWidth < dn
|
|
2354
2315
|
}));
|
|
2355
2316
|
return a(() => {
|
|
2356
2317
|
function e() {
|
|
2357
2318
|
t({
|
|
2358
2319
|
width: window.innerWidth,
|
|
2359
2320
|
height: window.innerHeight,
|
|
2360
|
-
isMobileSize: window.innerWidth <
|
|
2321
|
+
isMobileSize: window.innerWidth < dn
|
|
2361
2322
|
});
|
|
2362
2323
|
}
|
|
2363
2324
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
2364
2325
|
}, []), e;
|
|
2365
2326
|
}
|
|
2366
|
-
var
|
|
2327
|
+
var pn = {
|
|
2367
2328
|
overscroll: "overscroll_Ij750",
|
|
2368
2329
|
"overscroll-header": "overscroll-header_S6vYc",
|
|
2369
2330
|
overscrollHeader: "overscroll-header_S6vYc",
|
|
@@ -2374,8 +2335,8 @@ var un = {
|
|
|
2374
2335
|
};
|
|
2375
2336
|
//#endregion
|
|
2376
2337
|
//#region package/common/overscroll/overscroll.tsx
|
|
2377
|
-
function
|
|
2378
|
-
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);
|
|
2379
2340
|
S.current = p;
|
|
2380
2341
|
let C = i((e) => {
|
|
2381
2342
|
let t;
|
|
@@ -2433,15 +2394,15 @@ function dn({ children: e = null, overscrollContent: t = null, overscrollContent
|
|
|
2433
2394
|
if (d && !h) return n ? /* @__PURE__ */ N("div", { children: [n, e] }) : /* @__PURE__ */ M(ie, { children: e });
|
|
2434
2395
|
let O = l === "%" ? `${100 - o}%` : `calc(100% - ${o}px)`;
|
|
2435
2396
|
return /* @__PURE__ */ N("div", {
|
|
2436
|
-
className:
|
|
2397
|
+
className: pn.overscroll,
|
|
2437
2398
|
ref: _,
|
|
2438
2399
|
onScroll: D,
|
|
2439
2400
|
children: [/* @__PURE__ */ M("div", {
|
|
2440
|
-
className:
|
|
2401
|
+
className: pn.overscrollHeaderContainer,
|
|
2441
2402
|
style: { height: `${s}${l}` },
|
|
2442
2403
|
ref: y,
|
|
2443
2404
|
children: /* @__PURE__ */ M("div", {
|
|
2444
|
-
className: f(
|
|
2405
|
+
className: f(pn.overscrollHeader, r && pn.overscrollHeaderCentered),
|
|
2445
2406
|
ref: v,
|
|
2446
2407
|
children: t
|
|
2447
2408
|
})
|
|
@@ -2451,7 +2412,7 @@ function dn({ children: e = null, overscrollContent: t = null, overscrollContent
|
|
|
2451
2412
|
})]
|
|
2452
2413
|
});
|
|
2453
2414
|
}
|
|
2454
|
-
var
|
|
2415
|
+
var hn = {
|
|
2455
2416
|
progressBar: "progressBar_LO0sX",
|
|
2456
2417
|
"progressBar-fill": "progressBar-fill_rt32j",
|
|
2457
2418
|
progressBarFill: "progressBar-fill_rt32j",
|
|
@@ -2464,17 +2425,17 @@ var fn = {
|
|
|
2464
2425
|
};
|
|
2465
2426
|
//#endregion
|
|
2466
2427
|
//#region package/common/progressBar/progressBar.tsx
|
|
2467
|
-
function
|
|
2428
|
+
function gn(e) {
|
|
2468
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);
|
|
2469
2430
|
return (.299 * n + .587 * r + .114 * i) / 255 > .5 ? "#000000" : "#ffffff";
|
|
2470
2431
|
}
|
|
2471
|
-
function
|
|
2432
|
+
function _n({ className: e = void 0, total: t = 100, progress: n = 0, style: r = void 0, ...i }) {
|
|
2472
2433
|
function a() {
|
|
2473
2434
|
let e = [];
|
|
2474
2435
|
return Array.isArray(n) ? e.push(...n) : typeof n == "object" ? e.push(n) : e.push({ amount: n }), e.map((n, i) => {
|
|
2475
2436
|
let a = t ? n.amount / t * 100 : 0;
|
|
2476
2437
|
return /* @__PURE__ */ M("div", {
|
|
2477
|
-
className: f(
|
|
2438
|
+
className: f(hn.progressBarFill, i === e.length - 1 && hn.progressBarFillEnd, n.class),
|
|
2478
2439
|
style: {
|
|
2479
2440
|
width: `${a}%`,
|
|
2480
2441
|
background: n.color || void 0,
|
|
@@ -2482,8 +2443,8 @@ function mn({ className: e = void 0, total: t = 100, progress: n = 0, style: r =
|
|
|
2482
2443
|
},
|
|
2483
2444
|
title: n.label ? `${n.label}: ${n.amount}` : void 0,
|
|
2484
2445
|
children: n.label && /* @__PURE__ */ M("div", {
|
|
2485
|
-
className:
|
|
2486
|
-
style: n.color ? { color:
|
|
2446
|
+
className: hn.progressBarLabel,
|
|
2447
|
+
style: n.color ? { color: gn(n.color) } : {},
|
|
2487
2448
|
children: n.label
|
|
2488
2449
|
})
|
|
2489
2450
|
}, i);
|
|
@@ -2491,21 +2452,21 @@ function mn({ className: e = void 0, total: t = 100, progress: n = 0, style: r =
|
|
|
2491
2452
|
}
|
|
2492
2453
|
return /* @__PURE__ */ M("div", {
|
|
2493
2454
|
...i,
|
|
2494
|
-
className: f(
|
|
2455
|
+
className: f(hn.progressBar, e),
|
|
2495
2456
|
style: r,
|
|
2496
2457
|
children: a()
|
|
2497
2458
|
});
|
|
2498
2459
|
}
|
|
2499
|
-
function
|
|
2460
|
+
function vn(e) {
|
|
2500
2461
|
return Math.round(e / 5) * 5;
|
|
2501
2462
|
}
|
|
2502
|
-
function
|
|
2463
|
+
function yn(e) {
|
|
2503
2464
|
return {
|
|
2504
|
-
x:
|
|
2505
|
-
y:
|
|
2465
|
+
x: vn(e.x),
|
|
2466
|
+
y: vn(e.y)
|
|
2506
2467
|
};
|
|
2507
2468
|
}
|
|
2508
|
-
function
|
|
2469
|
+
function bn(e, t, n) {
|
|
2509
2470
|
let r = n.createSVGPoint();
|
|
2510
2471
|
r.x = e, r.y = t;
|
|
2511
2472
|
let i = n.getScreenCTM();
|
|
@@ -2514,18 +2475,18 @@ function _n(e, t, n) {
|
|
|
2514
2475
|
y: 0
|
|
2515
2476
|
};
|
|
2516
2477
|
let a = r.matrixTransform(i.inverse());
|
|
2517
|
-
return
|
|
2478
|
+
return yn({
|
|
2518
2479
|
x: a.x,
|
|
2519
2480
|
y: a.y
|
|
2520
2481
|
});
|
|
2521
2482
|
}
|
|
2522
|
-
function
|
|
2483
|
+
function xn(e, t) {
|
|
2523
2484
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
2524
2485
|
}
|
|
2525
|
-
function
|
|
2486
|
+
function Sn(e, t, n) {
|
|
2526
2487
|
let r = n.x - t.x, i = n.y - t.y, a = r * r + i * i;
|
|
2527
2488
|
if (a === 0) return {
|
|
2528
|
-
dist:
|
|
2489
|
+
dist: xn(e, t),
|
|
2529
2490
|
t: 0
|
|
2530
2491
|
};
|
|
2531
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;
|
|
@@ -2534,12 +2495,12 @@ function yn(e, t, n) {
|
|
|
2534
2495
|
t: o
|
|
2535
2496
|
};
|
|
2536
2497
|
}
|
|
2537
|
-
function
|
|
2498
|
+
function Cn(e, t) {
|
|
2538
2499
|
let n = null;
|
|
2539
2500
|
for (let r of t) {
|
|
2540
2501
|
let t = r.points;
|
|
2541
2502
|
for (let i = 0; i < t.length; i++) {
|
|
2542
|
-
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);
|
|
2543
2504
|
s <= 8 && (!n || s < n.dist) && (n = {
|
|
2544
2505
|
roomId: r.id,
|
|
2545
2506
|
wallIndex: i,
|
|
@@ -2550,7 +2511,7 @@ function bn(e, t) {
|
|
|
2550
2511
|
}
|
|
2551
2512
|
return n;
|
|
2552
2513
|
}
|
|
2553
|
-
function
|
|
2514
|
+
function wn(e, t) {
|
|
2554
2515
|
let n = !1;
|
|
2555
2516
|
for (let r = 0, i = t.length - 1; r < t.length; i = r++) {
|
|
2556
2517
|
let a = t[r].x, o = t[r].y, s = t[i].x, c = t[i].y;
|
|
@@ -2558,13 +2519,13 @@ function xn(e, t) {
|
|
|
2558
2519
|
}
|
|
2559
2520
|
return n;
|
|
2560
2521
|
}
|
|
2561
|
-
function
|
|
2522
|
+
function Tn(e) {
|
|
2562
2523
|
return {
|
|
2563
2524
|
x: e.reduce((e, t) => e + t.x, 0) / e.length,
|
|
2564
2525
|
y: e.reduce((e, t) => e + t.y, 0) / e.length
|
|
2565
2526
|
};
|
|
2566
2527
|
}
|
|
2567
|
-
function
|
|
2528
|
+
function En(e, t, n, r) {
|
|
2568
2529
|
return [
|
|
2569
2530
|
{
|
|
2570
2531
|
x: e,
|
|
@@ -2584,7 +2545,7 @@ function Cn(e, t, n, r) {
|
|
|
2584
2545
|
}
|
|
2585
2546
|
];
|
|
2586
2547
|
}
|
|
2587
|
-
function
|
|
2548
|
+
function Dn(e, t, n, r) {
|
|
2588
2549
|
let i = t.x - e.x, a = t.y - e.y, o = Math.sqrt(i * i + a * a);
|
|
2589
2550
|
if (o < .001) return null;
|
|
2590
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);
|
|
@@ -2603,13 +2564,13 @@ function wn(e, t, n, r) {
|
|
|
2603
2564
|
}
|
|
2604
2565
|
};
|
|
2605
2566
|
}
|
|
2606
|
-
function
|
|
2567
|
+
function On(e) {
|
|
2607
2568
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2608
2569
|
}
|
|
2609
|
-
function
|
|
2570
|
+
function kn(e) {
|
|
2610
2571
|
return e.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(" ") + " Z";
|
|
2611
2572
|
}
|
|
2612
|
-
function
|
|
2573
|
+
function An(e, t) {
|
|
2613
2574
|
if (e.length < 2) return [];
|
|
2614
2575
|
if (t.length === 0) return [e.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(" ") + " Z"];
|
|
2615
2576
|
let n = e.length, r = [], i = [`M ${e[0].x.toFixed(2)},${e[0].y.toFixed(2)}`];
|
|
@@ -2632,8 +2593,8 @@ function Dn(e, t) {
|
|
|
2632
2593
|
}
|
|
2633
2594
|
return r[0] = [...i, ...r[0].slice(1)], r.map((e) => e.join(" "));
|
|
2634
2595
|
}
|
|
2635
|
-
function
|
|
2636
|
-
let r =
|
|
2596
|
+
function jn(e, t, n) {
|
|
2597
|
+
let r = Dn(e, t, n.t, n.width);
|
|
2637
2598
|
if (!r) return "";
|
|
2638
2599
|
let { p1: i, p2: a, perp: o } = r, s = {
|
|
2639
2600
|
x: i.x + o.x * n.width,
|
|
@@ -2641,7 +2602,7 @@ function On(e, t, n) {
|
|
|
2641
2602
|
};
|
|
2642
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(" ");
|
|
2643
2604
|
}
|
|
2644
|
-
function
|
|
2605
|
+
function Mn(e, t) {
|
|
2645
2606
|
let n = Infinity, r = Infinity, i = -Infinity, a = -Infinity;
|
|
2646
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);
|
|
2647
2608
|
isFinite(n) || (n = 0, r = 0, i = 400, a = 300);
|
|
@@ -2651,10 +2612,10 @@ function kn(e, t) {
|
|
|
2651
2612
|
(i - n + 10).toFixed(2),
|
|
2652
2613
|
(a - r + 10).toFixed(2)
|
|
2653
2614
|
].join(" "), s = e.map((e) => {
|
|
2654
|
-
let n = t.filter((t) => t.roomId === e.id), r =
|
|
2655
|
-
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);
|
|
2656
2617
|
return i ? ` <path d="${i}" fill="none" />` : "";
|
|
2657
|
-
}).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>` : "";
|
|
2658
2619
|
return [
|
|
2659
2620
|
` <g id="${e.id}">`,
|
|
2660
2621
|
o,
|
|
@@ -2673,7 +2634,7 @@ function kn(e, t) {
|
|
|
2673
2634
|
"</svg>"
|
|
2674
2635
|
].join("\n");
|
|
2675
2636
|
}
|
|
2676
|
-
function
|
|
2637
|
+
function Nn(e) {
|
|
2677
2638
|
let t = [];
|
|
2678
2639
|
for (let n of e.matchAll(/[ML]\s*([-\d.]+)[,\s]+([-\d.]+)/gi)) t.push({
|
|
2679
2640
|
x: parseFloat(n[1]),
|
|
@@ -2681,14 +2642,14 @@ function An(e) {
|
|
|
2681
2642
|
});
|
|
2682
2643
|
return t;
|
|
2683
2644
|
}
|
|
2684
|
-
function
|
|
2645
|
+
function Pn(e) {
|
|
2685
2646
|
let t = new DOMParser().parseFromString(e, "image/svg+xml"), n = [];
|
|
2686
2647
|
return t.querySelectorAll("[id^=\"room\"]").forEach((e) => {
|
|
2687
2648
|
let t = e.querySelector("[id=\"background\"]");
|
|
2688
2649
|
if (!t) return;
|
|
2689
2650
|
let r = t.getAttribute("d");
|
|
2690
2651
|
if (!r) return;
|
|
2691
|
-
let i =
|
|
2652
|
+
let i = Nn(r);
|
|
2692
2653
|
if (i.length < 3) return;
|
|
2693
2654
|
let a = e.querySelector("text")?.textContent?.trim() ?? "";
|
|
2694
2655
|
n.push({
|
|
@@ -2698,8 +2659,8 @@ function jn(e) {
|
|
|
2698
2659
|
});
|
|
2699
2660
|
}), n;
|
|
2700
2661
|
}
|
|
2701
|
-
function
|
|
2702
|
-
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");
|
|
2703
2664
|
a.href = i, a.download = "room-plan.svg", a.click(), URL.revokeObjectURL(i);
|
|
2704
2665
|
}
|
|
2705
2666
|
var Z = {
|
|
@@ -2774,20 +2735,20 @@ var Z = {
|
|
|
2774
2735
|
polyCloseTarget: "polyCloseTarget_snjYx",
|
|
2775
2736
|
polyVertex: "polyVertex_fw0nX",
|
|
2776
2737
|
vertexHandle: "vertexHandle_-z7g5"
|
|
2777
|
-
},
|
|
2778
|
-
function
|
|
2779
|
-
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}`;
|
|
2780
2741
|
}
|
|
2781
|
-
var
|
|
2742
|
+
var Un = {
|
|
2782
2743
|
select: "Drag inside to move · Drag corner to reshape · Click wall to add corner · Dbl-click corner to remove · Delete to erase",
|
|
2783
2744
|
rect: "Drag to draw a rectangular room",
|
|
2784
2745
|
polygon: "Click to place corners · Click first point or Enter to close · Esc to cancel"
|
|
2785
2746
|
};
|
|
2786
|
-
function
|
|
2787
|
-
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({
|
|
2788
2749
|
x: 0,
|
|
2789
2750
|
y: 0
|
|
2790
|
-
}),
|
|
2751
|
+
}), I = u(null), oe = u(null), se = u(null), ce = u(null), L = u(null), le = u({
|
|
2791
2752
|
rooms: t,
|
|
2792
2753
|
doors: r,
|
|
2793
2754
|
tool: o,
|
|
@@ -2795,7 +2756,7 @@ function Vn({ className: e }) {
|
|
|
2795
2756
|
editingDoorsForRoomId: g,
|
|
2796
2757
|
polyPoints: D,
|
|
2797
2758
|
zoom: j,
|
|
2798
|
-
pan:
|
|
2759
|
+
pan: ae
|
|
2799
2760
|
});
|
|
2800
2761
|
s(() => {
|
|
2801
2762
|
le.current = {
|
|
@@ -2806,12 +2767,12 @@ function Vn({ className: e }) {
|
|
|
2806
2767
|
editingDoorsForRoomId: g,
|
|
2807
2768
|
polyPoints: D,
|
|
2808
2769
|
zoom: j,
|
|
2809
|
-
pan:
|
|
2770
|
+
pan: ae
|
|
2810
2771
|
};
|
|
2811
2772
|
});
|
|
2812
2773
|
function ue(e) {
|
|
2813
2774
|
e.length < 3 || (n((t) => [...t, {
|
|
2814
|
-
id:
|
|
2775
|
+
id: Hn("room"),
|
|
2815
2776
|
name: `Room ${t.length + 1}`,
|
|
2816
2777
|
points: e
|
|
2817
2778
|
}]), O([]), A(null));
|
|
@@ -2821,10 +2782,10 @@ function Vn({ className: e }) {
|
|
|
2821
2782
|
if (!e) return;
|
|
2822
2783
|
function t(e) {
|
|
2823
2784
|
e.preventDefault();
|
|
2824
|
-
let { zoom: t, pan: n } = le.current, r =
|
|
2785
|
+
let { zoom: t, pan: n } = le.current, r = bn(e.clientX, e.clientY, ce.current);
|
|
2825
2786
|
if (!r) return;
|
|
2826
|
-
let i = e.deltaY < 0 ?
|
|
2827
|
-
|
|
2787
|
+
let i = e.deltaY < 0 ? Rn : 1 / Rn, a = Math.max(zn, Math.min(Bn, t * i));
|
|
2788
|
+
F({
|
|
2828
2789
|
x: r.x - (r.x - n.x) * (t / a),
|
|
2829
2790
|
y: r.y - (r.y - n.y) * (t / a)
|
|
2830
2791
|
}), P(a);
|
|
@@ -2846,23 +2807,23 @@ function Vn({ className: e }) {
|
|
|
2846
2807
|
return;
|
|
2847
2808
|
}
|
|
2848
2809
|
if ((e.key === "+" || e.key === "=") && !(e.target instanceof HTMLInputElement)) {
|
|
2849
|
-
let e = Math.max(
|
|
2850
|
-
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({
|
|
2851
2812
|
x: t - 400 / e / 2,
|
|
2852
2813
|
y: n - 300 / e / 2
|
|
2853
2814
|
});
|
|
2854
2815
|
return;
|
|
2855
2816
|
}
|
|
2856
2817
|
if (e.key === "-" && !(e.target instanceof HTMLInputElement)) {
|
|
2857
|
-
let e = Math.max(
|
|
2858
|
-
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({
|
|
2859
2820
|
x: t - 400 / e / 2,
|
|
2860
2821
|
y: n - 300 / e / 2
|
|
2861
2822
|
});
|
|
2862
2823
|
return;
|
|
2863
2824
|
}
|
|
2864
2825
|
if (e.key === "0" && !(e.target instanceof HTMLInputElement)) {
|
|
2865
|
-
P(1),
|
|
2826
|
+
P(1), F({
|
|
2866
2827
|
x: 0,
|
|
2867
2828
|
y: 0
|
|
2868
2829
|
});
|
|
@@ -2872,21 +2833,21 @@ function Vn({ className: e }) {
|
|
|
2872
2833
|
}
|
|
2873
2834
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
2874
2835
|
}, []);
|
|
2875
|
-
function de(e, t = j, n =
|
|
2876
|
-
let r = Math.max(
|
|
2877
|
-
|
|
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({
|
|
2878
2839
|
x: i - 400 / r / 2,
|
|
2879
2840
|
y: a - 300 / r / 2
|
|
2880
2841
|
}), P(r);
|
|
2881
2842
|
}
|
|
2882
2843
|
function fe(e) {
|
|
2883
|
-
return ce.current ?
|
|
2844
|
+
return ce.current ? bn(e.clientX, e.clientY, ce.current) : null;
|
|
2884
2845
|
}
|
|
2885
2846
|
function pe(e, t) {
|
|
2886
2847
|
let n = null;
|
|
2887
2848
|
for (let r = 0; r < t.points.length; r++) {
|
|
2888
|
-
let i =
|
|
2889
|
-
i <=
|
|
2849
|
+
let i = xn(e, t.points[r]);
|
|
2850
|
+
i <= In && (!n || i < n.d) && (n = {
|
|
2890
2851
|
index: r,
|
|
2891
2852
|
d: i
|
|
2892
2853
|
});
|
|
@@ -2896,8 +2857,8 @@ function Vn({ className: e }) {
|
|
|
2896
2857
|
function R(e, t) {
|
|
2897
2858
|
let n = null;
|
|
2898
2859
|
for (let r = 0; r < t.points.length; r++) {
|
|
2899
|
-
let i = t.points[r], a = t.points[(r + 1) % t.points.length], { dist: o, t: s } =
|
|
2900
|
-
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 = {
|
|
2901
2862
|
index: r,
|
|
2902
2863
|
t: s,
|
|
2903
2864
|
d: o
|
|
@@ -2955,7 +2916,7 @@ function Vn({ className: e }) {
|
|
|
2955
2916
|
x: e.clientX,
|
|
2956
2917
|
y: e.clientY
|
|
2957
2918
|
},
|
|
2958
|
-
origPan: { ...
|
|
2919
|
+
origPan: { ...ae },
|
|
2959
2920
|
scaleX: 400 / j / n.width,
|
|
2960
2921
|
scaleY: 300 / j / n.height
|
|
2961
2922
|
};
|
|
@@ -2969,9 +2930,9 @@ function Vn({ className: e }) {
|
|
|
2969
2930
|
if (g) {
|
|
2970
2931
|
let e = t.find((e) => e.id === g);
|
|
2971
2932
|
if (e) {
|
|
2972
|
-
let t =
|
|
2933
|
+
let t = Cn(n, [e]);
|
|
2973
2934
|
t && i((e) => [...e, {
|
|
2974
|
-
id:
|
|
2935
|
+
id: Hn("door"),
|
|
2975
2936
|
roomId: t.roomId,
|
|
2976
2937
|
wallIndex: t.wallIndex,
|
|
2977
2938
|
t: t.t,
|
|
@@ -2985,7 +2946,7 @@ function Vn({ className: e }) {
|
|
|
2985
2946
|
return;
|
|
2986
2947
|
}
|
|
2987
2948
|
if (o === "polygon") {
|
|
2988
|
-
D.length >= 3 &&
|
|
2949
|
+
D.length >= 3 && xn(n, D[0]) <= 8 ? ue(D) : O((e) => [...e, n]);
|
|
2989
2950
|
return;
|
|
2990
2951
|
}
|
|
2991
2952
|
if (o === "select") {
|
|
@@ -2993,7 +2954,7 @@ function Vn({ className: e }) {
|
|
|
2993
2954
|
if (e) {
|
|
2994
2955
|
let t = pe(n, e);
|
|
2995
2956
|
if (t) {
|
|
2996
|
-
|
|
2957
|
+
I.current = {
|
|
2997
2958
|
type: "vertex",
|
|
2998
2959
|
roomId: e.id,
|
|
2999
2960
|
index: t.index,
|
|
@@ -3006,11 +2967,11 @@ function Vn({ className: e }) {
|
|
|
3006
2967
|
if (e) {
|
|
3007
2968
|
let t = R(n, e);
|
|
3008
2969
|
if (t) {
|
|
3009
|
-
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({
|
|
3010
2971
|
x: r.x + (i.x - r.x) * t.t,
|
|
3011
2972
|
y: r.y + (i.y - r.y) * t.t
|
|
3012
2973
|
}), o = me(e.id, t.index, t.t, a);
|
|
3013
|
-
|
|
2974
|
+
I.current = {
|
|
3014
2975
|
type: "vertex",
|
|
3015
2976
|
roomId: e.id,
|
|
3016
2977
|
index: o,
|
|
@@ -3020,9 +2981,9 @@ function Vn({ className: e }) {
|
|
|
3020
2981
|
return;
|
|
3021
2982
|
}
|
|
3022
2983
|
}
|
|
3023
|
-
let r = t.find((e) =>
|
|
2984
|
+
let r = t.find((e) => wn(n, e.points));
|
|
3024
2985
|
if (r) {
|
|
3025
|
-
h(r.id),
|
|
2986
|
+
h(r.id), I.current = {
|
|
3026
2987
|
type: "room",
|
|
3027
2988
|
roomId: r.id,
|
|
3028
2989
|
start: n,
|
|
@@ -3046,7 +3007,7 @@ function Vn({ className: e }) {
|
|
|
3046
3007
|
function ge(e) {
|
|
3047
3008
|
if (se.current) {
|
|
3048
3009
|
let { startClient: t, origPan: n, scaleX: r, scaleY: i } = se.current;
|
|
3049
|
-
|
|
3010
|
+
F({
|
|
3050
3011
|
x: n.x - (e.clientX - t.x) * r,
|
|
3051
3012
|
y: n.y - (e.clientY - t.y) * i
|
|
3052
3013
|
});
|
|
@@ -3057,7 +3018,7 @@ function Vn({ className: e }) {
|
|
|
3057
3018
|
if (oe.current && g) {
|
|
3058
3019
|
let e = t.find((e) => e.id === g);
|
|
3059
3020
|
if (e) {
|
|
3060
|
-
let t =
|
|
3021
|
+
let t = Cn(r, [e]);
|
|
3061
3022
|
t && i((e) => e.map((e) => e.id === oe.current ? {
|
|
3062
3023
|
...e,
|
|
3063
3024
|
wallIndex: t.wallIndex,
|
|
@@ -3074,10 +3035,10 @@ function Vn({ className: e }) {
|
|
|
3074
3035
|
A(r);
|
|
3075
3036
|
return;
|
|
3076
3037
|
}
|
|
3077
|
-
if (o === "select" && !g &&
|
|
3078
|
-
let e =
|
|
3038
|
+
if (o === "select" && !g && I.current) {
|
|
3039
|
+
let e = I.current;
|
|
3079
3040
|
if (e.type === "vertex") {
|
|
3080
|
-
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({
|
|
3081
3042
|
x: e.origPt.x + t,
|
|
3082
3043
|
y: e.origPt.y + i
|
|
3083
3044
|
});
|
|
@@ -3112,12 +3073,12 @@ function Vn({ className: e }) {
|
|
|
3112
3073
|
if (o === "rect" && x) {
|
|
3113
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);
|
|
3114
3075
|
i >= 10 && a >= 10 && n((t) => [...t, {
|
|
3115
|
-
id:
|
|
3076
|
+
id: Hn("room"),
|
|
3116
3077
|
name: `Room ${t.length + 1}`,
|
|
3117
|
-
points:
|
|
3078
|
+
points: En(e, r, i, a)
|
|
3118
3079
|
}]), S(null), ee(null);
|
|
3119
3080
|
}
|
|
3120
|
-
oe.current = null,
|
|
3081
|
+
oe.current = null, I.current = null;
|
|
3121
3082
|
}
|
|
3122
3083
|
}
|
|
3123
3084
|
function ve(e) {
|
|
@@ -3150,11 +3111,11 @@ function Vn({ className: e }) {
|
|
|
3150
3111
|
r.onload = (e) => {
|
|
3151
3112
|
let t = e.target?.result;
|
|
3152
3113
|
if (typeof t != "string") return;
|
|
3153
|
-
let r =
|
|
3114
|
+
let r = Pn(t);
|
|
3154
3115
|
r.length !== 0 && (n(r.map((e) => ({
|
|
3155
3116
|
...e,
|
|
3156
|
-
id:
|
|
3157
|
-
}))), i([]), h(null), _(null), P(1),
|
|
3117
|
+
id: Hn("room")
|
|
3118
|
+
}))), i([]), h(null), _(null), P(1), F({
|
|
3158
3119
|
x: 0,
|
|
3159
3120
|
y: 0
|
|
3160
3121
|
}));
|
|
@@ -3198,15 +3159,15 @@ function Vn({ className: e }) {
|
|
|
3198
3159
|
/* @__PURE__ */ M("button", {
|
|
3199
3160
|
title: "Zoom in (+)",
|
|
3200
3161
|
className: Z.roomDrawerToolbarBtn,
|
|
3201
|
-
onClick: () => de(
|
|
3202
|
-
disabled: j >=
|
|
3162
|
+
onClick: () => de(Rn),
|
|
3163
|
+
disabled: j >= Bn,
|
|
3203
3164
|
children: /* @__PURE__ */ M(p, { icon: E })
|
|
3204
3165
|
}),
|
|
3205
3166
|
/* @__PURE__ */ N("button", {
|
|
3206
3167
|
title: `Reset zoom (0) — ${Math.round(j * 100)}%`,
|
|
3207
3168
|
className: Z.roomDrawerToolbarZoomLabel,
|
|
3208
3169
|
onClick: () => {
|
|
3209
|
-
P(1),
|
|
3170
|
+
P(1), F({
|
|
3210
3171
|
x: 0,
|
|
3211
3172
|
y: 0
|
|
3212
3173
|
});
|
|
@@ -3216,8 +3177,8 @@ function Vn({ className: e }) {
|
|
|
3216
3177
|
/* @__PURE__ */ M("button", {
|
|
3217
3178
|
title: "Zoom out (−)",
|
|
3218
3179
|
className: Z.roomDrawerToolbarBtn,
|
|
3219
|
-
onClick: () => de(1 /
|
|
3220
|
-
disabled: j <=
|
|
3180
|
+
onClick: () => de(1 / Rn),
|
|
3181
|
+
disabled: j <= zn,
|
|
3221
3182
|
children: /* @__PURE__ */ M(p, { icon: T })
|
|
3222
3183
|
}),
|
|
3223
3184
|
/* @__PURE__ */ M("div", { className: Z.roomDrawerToolbarSep }),
|
|
@@ -3230,7 +3191,7 @@ function Vn({ className: e }) {
|
|
|
3230
3191
|
/* @__PURE__ */ M("button", {
|
|
3231
3192
|
title: "Download SVG",
|
|
3232
3193
|
className: Z.roomDrawerToolbarBtn,
|
|
3233
|
-
onClick: () =>
|
|
3194
|
+
onClick: () => Fn(t, r),
|
|
3234
3195
|
disabled: t.length === 0,
|
|
3235
3196
|
children: /* @__PURE__ */ M(p, { icon: y })
|
|
3236
3197
|
}),
|
|
@@ -3246,7 +3207,7 @@ function Vn({ className: e }) {
|
|
|
3246
3207
|
/* @__PURE__ */ N("svg", {
|
|
3247
3208
|
ref: ce,
|
|
3248
3209
|
className: f(Z.roomDrawerCanvas, Oe),
|
|
3249
|
-
viewBox: `${
|
|
3210
|
+
viewBox: `${ae.x} ${ae.y} ${Ee} ${De}`,
|
|
3250
3211
|
onMouseDown: z,
|
|
3251
3212
|
onMouseMove: ge,
|
|
3252
3213
|
onMouseUp: _e,
|
|
@@ -3264,14 +3225,14 @@ function Vn({ className: e }) {
|
|
|
3264
3225
|
})
|
|
3265
3226
|
}) }),
|
|
3266
3227
|
/* @__PURE__ */ M("rect", {
|
|
3267
|
-
x:
|
|
3268
|
-
y:
|
|
3228
|
+
x: ae.x,
|
|
3229
|
+
y: ae.y,
|
|
3269
3230
|
width: Ee,
|
|
3270
3231
|
height: De,
|
|
3271
3232
|
fill: "url(#rd-grid)"
|
|
3272
3233
|
}),
|
|
3273
3234
|
t.map((e) => {
|
|
3274
|
-
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;
|
|
3275
3236
|
return /* @__PURE__ */ N("g", { children: [
|
|
3276
3237
|
/* @__PURE__ */ M("path", {
|
|
3277
3238
|
d: n,
|
|
@@ -3294,7 +3255,7 @@ function Vn({ className: e }) {
|
|
|
3294
3255
|
r.map((e) => {
|
|
3295
3256
|
let n = t.find((t) => t.id === e.roomId);
|
|
3296
3257
|
if (!n) return null;
|
|
3297
|
-
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);
|
|
3298
3259
|
return a ? /* @__PURE__ */ M("line", {
|
|
3299
3260
|
x1: a.p1.x,
|
|
3300
3261
|
y1: a.p1.y,
|
|
@@ -3306,7 +3267,7 @@ function Vn({ className: e }) {
|
|
|
3306
3267
|
g && we.map((e) => {
|
|
3307
3268
|
let n = t.find((t) => t.id === e.roomId);
|
|
3308
3269
|
if (!n) return null;
|
|
3309
|
-
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);
|
|
3310
3271
|
if (!a) return null;
|
|
3311
3272
|
let o = {
|
|
3312
3273
|
x: (a.p1.x + a.p2.x) / 2,
|
|
@@ -3437,26 +3398,26 @@ function Vn({ className: e }) {
|
|
|
3437
3398
|
}),
|
|
3438
3399
|
/* @__PURE__ */ M("div", {
|
|
3439
3400
|
className: Z.roomDrawerHint,
|
|
3440
|
-
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`
|
|
3441
3402
|
})
|
|
3442
3403
|
]
|
|
3443
3404
|
});
|
|
3444
3405
|
}
|
|
3445
|
-
var
|
|
3406
|
+
var Gn = { scrollbarProvider: "scrollbarProvider_IMBFu" };
|
|
3446
3407
|
//#endregion
|
|
3447
3408
|
//#region package/common/scrollbarProvider/scrollbarProvider.tsx
|
|
3448
|
-
function
|
|
3409
|
+
function Kn({ className: e = void 0, children: t = void 0 }) {
|
|
3449
3410
|
return /* @__PURE__ */ M("div", {
|
|
3450
|
-
className: f(
|
|
3411
|
+
className: f(Gn.scrollbarProvider, e),
|
|
3451
3412
|
children: t
|
|
3452
3413
|
});
|
|
3453
3414
|
}
|
|
3454
3415
|
//#endregion
|
|
3455
3416
|
//#region package/common/scrollbarProvider/index.ts
|
|
3456
|
-
var
|
|
3417
|
+
var qn = Kn, Jn = { resultCount: "resultCount_Sn48Q" };
|
|
3457
3418
|
//#endregion
|
|
3458
3419
|
//#region package/common/searchInput/searchInput.tsx
|
|
3459
|
-
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 }) {
|
|
3460
3421
|
let p = u(null);
|
|
3461
3422
|
a(() => () => {
|
|
3462
3423
|
p.current !== null && clearTimeout(p.current);
|
|
@@ -3479,7 +3440,7 @@ function Kn({ value: e, onChange: t, onDebounce: n, placeholder: r, label: i, de
|
|
|
3479
3440
|
value: e,
|
|
3480
3441
|
onChange: m
|
|
3481
3442
|
}), h && /* @__PURE__ */ N("p", {
|
|
3482
|
-
className:
|
|
3443
|
+
className: Jn.resultCount,
|
|
3483
3444
|
children: [
|
|
3484
3445
|
s,
|
|
3485
3446
|
" ",
|
|
@@ -3515,16 +3476,16 @@ var Q = {
|
|
|
3515
3476
|
stepperEntryLabel: "stepper-entry-label_b94eg",
|
|
3516
3477
|
"stepper-entry-label-vertical": "stepper-entry-label-vertical_Zm8i4",
|
|
3517
3478
|
stepperEntryLabelVertical: "stepper-entry-label-vertical_Zm8i4"
|
|
3518
|
-
},
|
|
3479
|
+
}, Xn = class e extends t {
|
|
3519
3480
|
static alignments = {
|
|
3520
3481
|
VERTICAL: "vertical",
|
|
3521
3482
|
HORIZONTAL: "horizontal"
|
|
3522
3483
|
};
|
|
3523
3484
|
static propTypes = {
|
|
3524
|
-
steps:
|
|
3525
|
-
currentStep:
|
|
3526
|
-
alignment:
|
|
3527
|
-
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
|
|
3528
3489
|
};
|
|
3529
3490
|
static defaultProps = {
|
|
3530
3491
|
steps: [],
|
|
@@ -3578,7 +3539,7 @@ var Q = {
|
|
|
3578
3539
|
children: t.map(this.renderStep)
|
|
3579
3540
|
});
|
|
3580
3541
|
}
|
|
3581
|
-
},
|
|
3542
|
+
}, Zn = "https://tenor.googleapis.com/v2", Qn = class {
|
|
3582
3543
|
constructor(e) {
|
|
3583
3544
|
this.key = e;
|
|
3584
3545
|
}
|
|
@@ -3587,14 +3548,14 @@ var Q = {
|
|
|
3587
3548
|
q: e,
|
|
3588
3549
|
key: this.key
|
|
3589
3550
|
});
|
|
3590
|
-
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();
|
|
3591
3552
|
}
|
|
3592
3553
|
async searchSuggestions(e) {
|
|
3593
3554
|
let t = new URLSearchParams({
|
|
3594
3555
|
q: e,
|
|
3595
3556
|
key: this.key
|
|
3596
3557
|
});
|
|
3597
|
-
return (await fetch(`${
|
|
3558
|
+
return (await fetch(`${Zn}/search_suggestions?${t}`)).json();
|
|
3598
3559
|
}
|
|
3599
3560
|
registerShare(e, t) {
|
|
3600
3561
|
let n = new URLSearchParams({
|
|
@@ -3602,91 +3563,58 @@ var Q = {
|
|
|
3602
3563
|
q: e,
|
|
3603
3564
|
key: this.key
|
|
3604
3565
|
});
|
|
3605
|
-
fetch(`${
|
|
3566
|
+
fetch(`${Zn}/registershare?${n}`).catch(() => null);
|
|
3606
3567
|
}
|
|
3607
|
-
},
|
|
3568
|
+
}, $n = {
|
|
3608
3569
|
gifPreview: "gifPreview_-ECUZ",
|
|
3609
3570
|
"gifPreview-image": "gifPreview-image_Aq7-a",
|
|
3610
3571
|
gifPreviewImage: "gifPreview-image_Aq7-a",
|
|
3611
3572
|
"gifPreview-image-container": "gifPreview-image-container_ycypL",
|
|
3612
3573
|
gifPreviewImageContainer: "gifPreview-image-container_ycypL",
|
|
3613
3574
|
gradientBottomLeftToTopRight: "gradientBottomLeftToTopRight_wo6HB"
|
|
3614
|
-
}
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
let { className: e, previewItems: t, onSelect: n } = this.props;
|
|
3637
|
-
return /* @__PURE__ */ M(ie, { children: t.length > 0 && /* @__PURE__ */ M("div", {
|
|
3638
|
-
className: f(Xn.gifPreview, e),
|
|
3639
|
-
onScroll: this.onScroll,
|
|
3640
|
-
children: t.map((e, t) => /* @__PURE__ */ M(Ne, {
|
|
3641
|
-
className: Xn.gifPreviewImageContainer,
|
|
3642
|
-
onClick: () => n(e),
|
|
3643
|
-
children: /* @__PURE__ */ M("div", {
|
|
3644
|
-
className: Xn.gifPreviewImage,
|
|
3645
|
-
style: { backgroundImage: `url(${e.media_formats.tinygif.url})` }
|
|
3646
|
-
})
|
|
3647
|
-
}, `${e.id}_${t}`))
|
|
3648
|
-
}) });
|
|
3649
|
-
}
|
|
3650
|
-
}, 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 = {
|
|
3651
3597
|
gifView: "gifView_Fa2zj",
|
|
3652
3598
|
"gifView-loading": "gifView-loading_LfNJr",
|
|
3653
3599
|
gifViewLoading: "gifView-loading_LfNJr",
|
|
3654
3600
|
gradientBottomLeftToTopRight: "gradientBottomLeftToTopRight_JR6aS"
|
|
3655
|
-
}
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
let { src: t } = e, { src: n } = this.props;
|
|
3673
|
-
console.log(">>SRC", {
|
|
3674
|
-
src: n,
|
|
3675
|
-
prevSrc: t
|
|
3676
|
-
}), n !== t && this.setState({ isLoading: !0 });
|
|
3677
|
-
}
|
|
3678
|
-
render() {
|
|
3679
|
-
let { className: e, src: t } = this.props, { isLoading: n } = this.state;
|
|
3680
|
-
return console.log(">>RENDER", t), /* @__PURE__ */ N("div", {
|
|
3681
|
-
className: f(Qn.gifView, e),
|
|
3682
|
-
children: [/* @__PURE__ */ M("img", {
|
|
3683
|
-
className: Qn.tenorPickerSelected,
|
|
3684
|
-
src: t,
|
|
3685
|
-
onLoad: this.onLoaded
|
|
3686
|
-
}), n && /* @__PURE__ */ M("div", { className: Qn.gifViewLoading })]
|
|
3687
|
-
});
|
|
3688
|
-
}
|
|
3689
|
-
}, 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 = {
|
|
3690
3618
|
"tenorPicker-selected": "tenorPicker-selected_IfR2z",
|
|
3691
3619
|
tenorPickerSelected: "tenorPicker-selected_IfR2z",
|
|
3692
3620
|
"tenorPicker-modal-content": "tenorPicker-modal-content_Vkolf",
|
|
@@ -3698,8 +3626,8 @@ var Q = {
|
|
|
3698
3626
|
};
|
|
3699
3627
|
//#endregion
|
|
3700
3628
|
//#region package/common/tenorPicker/tenorPicker.tsx
|
|
3701
|
-
function
|
|
3702
|
-
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);
|
|
3703
3631
|
async function y(e) {
|
|
3704
3632
|
if (s(e), !e.trim()) {
|
|
3705
3633
|
u([]), m([]), g(null);
|
|
@@ -3725,23 +3653,23 @@ function tr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3725
3653
|
function S() {
|
|
3726
3654
|
return /* @__PURE__ */ M(Ke, {
|
|
3727
3655
|
inline: !0,
|
|
3728
|
-
className:
|
|
3656
|
+
className: rr.tenorPickerSuggestionsContainer,
|
|
3729
3657
|
children: p.map((e) => /* @__PURE__ */ M(Ge, {
|
|
3730
|
-
className:
|
|
3658
|
+
className: rr.tenorPickerSuggestionsItem,
|
|
3731
3659
|
text: e,
|
|
3732
3660
|
onClick: () => y(e)
|
|
3733
3661
|
}, e))
|
|
3734
3662
|
});
|
|
3735
3663
|
}
|
|
3736
3664
|
function C() {
|
|
3737
|
-
return /* @__PURE__ */ M(
|
|
3665
|
+
return /* @__PURE__ */ M(er, {
|
|
3738
3666
|
previewItems: l,
|
|
3739
3667
|
onSelect: x,
|
|
3740
3668
|
onLoadAdditional: b
|
|
3741
3669
|
});
|
|
3742
3670
|
}
|
|
3743
3671
|
function w() {
|
|
3744
|
-
return /* @__PURE__ */ M(
|
|
3672
|
+
return /* @__PURE__ */ M(Yn, {
|
|
3745
3673
|
label: "Pick gif",
|
|
3746
3674
|
value: o,
|
|
3747
3675
|
onDebounce: y,
|
|
@@ -3749,7 +3677,7 @@ function tr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3749
3677
|
});
|
|
3750
3678
|
}
|
|
3751
3679
|
return n ? /* @__PURE__ */ N("div", {
|
|
3752
|
-
className: f(
|
|
3680
|
+
className: f(rr.tenorPicker, e),
|
|
3753
3681
|
children: [
|
|
3754
3682
|
/* @__PURE__ */ N("div", {
|
|
3755
3683
|
className: xe.actionButtons,
|
|
@@ -3762,15 +3690,15 @@ function tr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3762
3690
|
children: "Remove gif"
|
|
3763
3691
|
})]
|
|
3764
3692
|
}),
|
|
3765
|
-
i && /* @__PURE__ */ M(
|
|
3766
|
-
className:
|
|
3693
|
+
i && /* @__PURE__ */ M(nr, {
|
|
3694
|
+
className: rr.tenorPickerSelected,
|
|
3767
3695
|
src: i
|
|
3768
3696
|
}),
|
|
3769
3697
|
/* @__PURE__ */ M(ft, {
|
|
3770
3698
|
isOpen: _,
|
|
3771
3699
|
onClose: () => v(!1),
|
|
3772
3700
|
children: /* @__PURE__ */ N("div", {
|
|
3773
|
-
className:
|
|
3701
|
+
className: rr.tenorPickerModalContent,
|
|
3774
3702
|
children: [
|
|
3775
3703
|
w(),
|
|
3776
3704
|
S(),
|
|
@@ -3780,7 +3708,7 @@ function tr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3780
3708
|
})
|
|
3781
3709
|
]
|
|
3782
3710
|
}) : /* @__PURE__ */ N("div", {
|
|
3783
|
-
className: f(
|
|
3711
|
+
className: f(rr.tenorPicker, e),
|
|
3784
3712
|
children: [
|
|
3785
3713
|
/* @__PURE__ */ M(Xe, {
|
|
3786
3714
|
align: Je.Left,
|
|
@@ -3794,8 +3722,8 @@ function tr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3794
3722
|
onClick: () => x(null),
|
|
3795
3723
|
children: "Remove gif"
|
|
3796
3724
|
}),
|
|
3797
|
-
i && /* @__PURE__ */ M(
|
|
3798
|
-
className:
|
|
3725
|
+
i && /* @__PURE__ */ M(nr, {
|
|
3726
|
+
className: rr.tenorPickerSelected,
|
|
3799
3727
|
src: i
|
|
3800
3728
|
})
|
|
3801
3729
|
]
|
|
@@ -3803,20 +3731,82 @@ function tr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3803
3731
|
}
|
|
3804
3732
|
//#endregion
|
|
3805
3733
|
//#region package/common/textarea/textarea.tsx
|
|
3806
|
-
function
|
|
3734
|
+
function ar(e) {
|
|
3807
3735
|
return /* @__PURE__ */ M($e, {
|
|
3808
3736
|
...e,
|
|
3809
3737
|
multiline: !0
|
|
3810
3738
|
});
|
|
3811
3739
|
}
|
|
3812
|
-
|
|
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 {
|
|
3813
3803
|
constructor(...t) {
|
|
3814
3804
|
super(...t), this.state = {
|
|
3815
3805
|
resolvedVariables: {},
|
|
3816
3806
|
colorFadeActive: !1,
|
|
3817
3807
|
currentThemeColor: null
|
|
3818
3808
|
}, this.colorFadeTimeout = null, this.wrapperRef = e.createRef(), this.themeColorMeta = null, this.createdThemeColorMeta = !1, this.applyTheme = (e) => {
|
|
3819
|
-
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);
|
|
3820
3810
|
this.setState({
|
|
3821
3811
|
resolvedVariables: o,
|
|
3822
3812
|
colorFadeActive: !0
|
|
@@ -3850,15 +3840,15 @@ var rr = { colorFade: "colorFade_eLv2g" }, ir = class extends t {
|
|
|
3850
3840
|
}
|
|
3851
3841
|
}
|
|
3852
3842
|
resolveChain(e) {
|
|
3853
|
-
let
|
|
3854
|
-
return
|
|
3843
|
+
let t = (this.props.themes ?? [or]).find((t) => t.id === e);
|
|
3844
|
+
return t ? [...t.baseThemeId ? this.resolveChain(t.baseThemeId) : [], t.variables] : [];
|
|
3855
3845
|
}
|
|
3856
3846
|
render() {
|
|
3857
3847
|
let { children: e } = this.props, { resolvedVariables: t, colorFadeActive: n } = this.state;
|
|
3858
3848
|
return /* @__PURE__ */ M("div", {
|
|
3859
3849
|
ref: this.wrapperRef,
|
|
3860
3850
|
id: "themeProvider",
|
|
3861
|
-
className: n ?
|
|
3851
|
+
className: n ? sr.colorFade : void 0,
|
|
3862
3852
|
style: t,
|
|
3863
3853
|
children: e
|
|
3864
3854
|
});
|
|
@@ -3866,7 +3856,7 @@ var rr = { colorFade: "colorFade_eLv2g" }, ir = class extends t {
|
|
|
3866
3856
|
};
|
|
3867
3857
|
//#endregion
|
|
3868
3858
|
//#region package/common/themeProvider/useTheme.ts
|
|
3869
|
-
function
|
|
3859
|
+
function lr(e = "default") {
|
|
3870
3860
|
let [t, n] = d(localStorage.getItem("theme") || e);
|
|
3871
3861
|
return {
|
|
3872
3862
|
currentThemeId: t,
|
|
@@ -3875,7 +3865,7 @@ function ar(e = "default") {
|
|
|
3875
3865
|
}
|
|
3876
3866
|
};
|
|
3877
3867
|
}
|
|
3878
|
-
var
|
|
3868
|
+
var ur = {
|
|
3879
3869
|
wizard: "wizard_uRBAN",
|
|
3880
3870
|
"wizard-content": "wizard-content_lcl4C",
|
|
3881
3871
|
wizardContent: "wizard-content_lcl4C",
|
|
@@ -3883,12 +3873,12 @@ var or = {
|
|
|
3883
3873
|
wizardContentOutOfFrame: "wizard-content-outOfFrame_Eks4Y",
|
|
3884
3874
|
"wizard-content-container": "wizard-content-container_yxbCJ",
|
|
3885
3875
|
wizardContentContainer: "wizard-content-container_yxbCJ"
|
|
3886
|
-
},
|
|
3876
|
+
}, dr = class extends t {
|
|
3887
3877
|
static propTypes = {
|
|
3888
|
-
currentStep:
|
|
3889
|
-
stepCount:
|
|
3890
|
-
renderStep:
|
|
3891
|
-
className:
|
|
3878
|
+
currentStep: I.number,
|
|
3879
|
+
stepCount: I.number,
|
|
3880
|
+
renderStep: I.func,
|
|
3881
|
+
className: I.string
|
|
3892
3882
|
};
|
|
3893
3883
|
static defaultProps = {
|
|
3894
3884
|
currentStep: 0,
|
|
@@ -3918,23 +3908,23 @@ var or = {
|
|
|
3918
3908
|
render() {
|
|
3919
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` };
|
|
3920
3910
|
return /* @__PURE__ */ M("div", {
|
|
3921
|
-
className: f(f(
|
|
3911
|
+
className: f(f(ur.wizard, r)),
|
|
3922
3912
|
style: o,
|
|
3923
3913
|
children: /* @__PURE__ */ M("div", {
|
|
3924
|
-
className:
|
|
3914
|
+
className: ur.wizardContentContainer,
|
|
3925
3915
|
style: {
|
|
3926
3916
|
width: `${n * 100}%`,
|
|
3927
3917
|
marginLeft: `-${t * 100}%`
|
|
3928
3918
|
},
|
|
3929
3919
|
children: Array.from(Array(n), () => null).map((r, i) => /* @__PURE__ */ M("div", {
|
|
3930
3920
|
ref: (e) => this.updateCurrentRef(e, i),
|
|
3931
|
-
className:
|
|
3921
|
+
className: ur.wizardContent,
|
|
3932
3922
|
style: {
|
|
3933
3923
|
width: `${100 / n}%`,
|
|
3934
3924
|
marginLeft: `${100 / n * i}%`
|
|
3935
3925
|
},
|
|
3936
3926
|
children: /* @__PURE__ */ M("div", {
|
|
3937
|
-
className: f({ [
|
|
3927
|
+
className: f({ [ur.wizardContentOutOfFrame]: t !== i && !a }),
|
|
3938
3928
|
children: e(i)
|
|
3939
3929
|
})
|
|
3940
3930
|
}, `wizardContent${i}`))
|
|
@@ -3944,20 +3934,20 @@ var or = {
|
|
|
3944
3934
|
};
|
|
3945
3935
|
//#endregion
|
|
3946
3936
|
//#region package/services/formValidation/formValidatorGroup.ts
|
|
3947
|
-
function
|
|
3937
|
+
function fr(e) {
|
|
3948
3938
|
let t = e;
|
|
3949
3939
|
return t?.errors && Array.isArray(t.errors) ? t.errors.flatMap((e) => Object.entries(e).map(([e, t]) => ({
|
|
3950
3940
|
id: e,
|
|
3951
3941
|
message: t
|
|
3952
3942
|
}))) : [];
|
|
3953
3943
|
}
|
|
3954
|
-
var
|
|
3944
|
+
var pr = class {
|
|
3955
3945
|
#e;
|
|
3956
3946
|
#t;
|
|
3957
3947
|
#n;
|
|
3958
3948
|
#r;
|
|
3959
3949
|
#i;
|
|
3960
|
-
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 } = {}) {
|
|
3961
3951
|
this.#t = !1, this.#i = [], this.getFormError = () => {
|
|
3962
3952
|
let e = Object.keys(this.group);
|
|
3963
3953
|
for (let t = 0; t < e.length; t += 1) {
|
|
@@ -4041,7 +4031,7 @@ var lr = class {
|
|
|
4041
4031
|
};
|
|
4042
4032
|
//#endregion
|
|
4043
4033
|
//#region package/services/formValidation/FormValidatorGroupForm.tsx
|
|
4044
|
-
function
|
|
4034
|
+
function mr(e) {
|
|
4045
4035
|
return function({ children: t, ...n }) {
|
|
4046
4036
|
return /* @__PURE__ */ M("form", {
|
|
4047
4037
|
onSubmit: e.submit,
|
|
@@ -4053,11 +4043,11 @@ function ur(e) {
|
|
|
4053
4043
|
}
|
|
4054
4044
|
//#endregion
|
|
4055
4045
|
//#region package/services/formValidation/FormValidatorGroupWithForm.tsx
|
|
4056
|
-
var
|
|
4046
|
+
var hr = class extends pr {
|
|
4057
4047
|
constructor(e, t = null, n) {
|
|
4058
|
-
super(e, t, n), this.Form =
|
|
4048
|
+
super(e, t, n), this.Form = mr(this);
|
|
4059
4049
|
}
|
|
4060
|
-
},
|
|
4050
|
+
}, gr = class {
|
|
4061
4051
|
#e;
|
|
4062
4052
|
#t;
|
|
4063
4053
|
#n;
|
|
@@ -4111,40 +4101,40 @@ var dr = class extends lr {
|
|
|
4111
4101
|
return this.#r;
|
|
4112
4102
|
}
|
|
4113
4103
|
};
|
|
4114
|
-
|
|
4104
|
+
gr.prototype.toString = function() {
|
|
4115
4105
|
return `${this.value}`;
|
|
4116
4106
|
};
|
|
4117
4107
|
//#endregion
|
|
4118
4108
|
//#region package/services/regexp.ts
|
|
4119
|
-
function
|
|
4109
|
+
function _r(e) {
|
|
4120
4110
|
return /^[0-9]+$/.test(e);
|
|
4121
4111
|
}
|
|
4122
|
-
function
|
|
4112
|
+
function vr(e) {
|
|
4123
4113
|
return /^[0-9]{2}.[0-9]{2}.[0-9]{4}$/.test(e);
|
|
4124
4114
|
}
|
|
4125
|
-
function
|
|
4115
|
+
function yr(e) {
|
|
4126
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);
|
|
4127
4117
|
}
|
|
4128
|
-
function
|
|
4118
|
+
function br(e) {
|
|
4129
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);
|
|
4130
4120
|
}
|
|
4131
|
-
function
|
|
4121
|
+
function xr(e) {
|
|
4132
4122
|
return /^[A-Z]{6}[A-Z\d]{2}([A-Z\d]{3})?$/.test(e);
|
|
4133
4123
|
}
|
|
4134
|
-
function
|
|
4124
|
+
function Sr(e) {
|
|
4135
4125
|
return /[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}(\/[-a-zA-Z0-9@:%_+.~#?&//=]*)?$/.test(e);
|
|
4136
4126
|
}
|
|
4137
|
-
function
|
|
4127
|
+
function Cr(e) {
|
|
4138
4128
|
return /^[\w!@#$%^&*?±§~`'"/\\[\]{}\-,.();:><+=|öäüÖÄÜß €μ]{8,}$/.test(e);
|
|
4139
4129
|
}
|
|
4140
|
-
function
|
|
4130
|
+
function wr(e) {
|
|
4141
4131
|
return /^(?=.*[a-zöäüA-ZÖÄÜß])/.test(e);
|
|
4142
4132
|
}
|
|
4143
|
-
function
|
|
4133
|
+
function Tr(e) {
|
|
4144
4134
|
return /^(?=.*\d)/.test(e);
|
|
4145
4135
|
}
|
|
4146
|
-
function
|
|
4147
|
-
return
|
|
4136
|
+
function Er(e) {
|
|
4137
|
+
return Cr(e) && wr(e) && Tr(e);
|
|
4148
4138
|
}
|
|
4149
4139
|
//#endregion
|
|
4150
4140
|
//#region package/services/formValidation/validators.ts
|
|
@@ -4163,7 +4153,7 @@ var $ = { t: (e, t) => ({
|
|
|
4163
4153
|
"garages.errors.bic": "Must be a valid BIC",
|
|
4164
4154
|
"formValidators.minLetters": `Must contain at least ${t?.smart_count} letters`,
|
|
4165
4155
|
"formValidators.minDigits": `Must contain at least ${t?.smart_count} digits`
|
|
4166
|
-
})[e] || e },
|
|
4156
|
+
})[e] || e }, Dr = class e {
|
|
4167
4157
|
static {
|
|
4168
4158
|
this.minLength = (e, t) => (n) => !n || n.length < e ? {
|
|
4169
4159
|
id: "minLength",
|
|
@@ -4177,7 +4167,7 @@ var $ = { t: (e, t) => ({
|
|
|
4177
4167
|
} : null;
|
|
4178
4168
|
}
|
|
4179
4169
|
static {
|
|
4180
|
-
this.email = (e) => (t) => t && !
|
|
4170
|
+
this.email = (e) => (t) => t && !br(t) ? {
|
|
4181
4171
|
id: "email",
|
|
4182
4172
|
message: e || $.t("formValidators.email")
|
|
4183
4173
|
} : null;
|
|
@@ -4220,7 +4210,7 @@ var $ = { t: (e, t) => ({
|
|
|
4220
4210
|
this.multiEmail = (e) => (t) => {
|
|
4221
4211
|
if (t) {
|
|
4222
4212
|
let n = t.replace(/ /g, "").replace(/,/g, ";").split(";");
|
|
4223
|
-
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 {
|
|
4224
4214
|
id: "multiEmail",
|
|
4225
4215
|
message: e || $.t("formValidators.multiEmail")
|
|
4226
4216
|
};
|
|
@@ -4229,7 +4219,7 @@ var $ = { t: (e, t) => ({
|
|
|
4229
4219
|
};
|
|
4230
4220
|
}
|
|
4231
4221
|
static {
|
|
4232
|
-
this.date = (e) => (t) => t && !
|
|
4222
|
+
this.date = (e) => (t) => t && !vr(t) && !yr(t) ? {
|
|
4233
4223
|
id: "date",
|
|
4234
4224
|
message: e || $.t("formValidators.date")
|
|
4235
4225
|
} : null;
|
|
@@ -4241,13 +4231,13 @@ var $ = { t: (e, t) => ({
|
|
|
4241
4231
|
} : null;
|
|
4242
4232
|
}
|
|
4243
4233
|
static {
|
|
4244
|
-
this.website = (e) => (t) => t && !
|
|
4234
|
+
this.website = (e) => (t) => t && !Sr(t) ? {
|
|
4245
4235
|
id: "website",
|
|
4246
4236
|
message: e || $.t("garages.errors.website")
|
|
4247
4237
|
} : null;
|
|
4248
4238
|
}
|
|
4249
4239
|
static {
|
|
4250
|
-
this.bic = (e) => (t) => t && !
|
|
4240
|
+
this.bic = (e) => (t) => t && !xr(t) ? {
|
|
4251
4241
|
id: "bic",
|
|
4252
4242
|
message: e || $.t("garages.errors.bic")
|
|
4253
4243
|
} : null;
|
|
@@ -4273,7 +4263,7 @@ var $ = { t: (e, t) => ({
|
|
|
4273
4263
|
} : r : null;
|
|
4274
4264
|
};
|
|
4275
4265
|
}
|
|
4276
|
-
},
|
|
4266
|
+
}, Or = class extends n {
|
|
4277
4267
|
static {
|
|
4278
4268
|
this.defaultProps = {
|
|
4279
4269
|
formValidator: null,
|
|
@@ -4353,7 +4343,7 @@ var $ = { t: (e, t) => ({
|
|
|
4353
4343
|
};
|
|
4354
4344
|
//#endregion
|
|
4355
4345
|
//#region package/services/formValidation/useFormValidator.ts
|
|
4356
|
-
function
|
|
4346
|
+
function kr(e) {
|
|
4357
4347
|
let [, t] = l((e) => e + 1, 0);
|
|
4358
4348
|
return a(() => {
|
|
4359
4349
|
if (e) return e.registerOnUpdateListener(t), () => e.removeOnUpdateListener(t);
|
|
@@ -4361,9 +4351,9 @@ function Tr(e) {
|
|
|
4361
4351
|
}
|
|
4362
4352
|
//#endregion
|
|
4363
4353
|
//#region package/services/formValidation/useFormValidatorGroup.ts
|
|
4364
|
-
function
|
|
4354
|
+
function Ar(e, { initialValues: t, onSubmit: n, onValidate: r, errorParser: i } = {}) {
|
|
4365
4355
|
let [, o] = l((e) => e + 1, 0), s = u(null);
|
|
4366
|
-
s.current ||= new
|
|
4356
|
+
s.current ||= new hr(e, null, {
|
|
4367
4357
|
initialValues: t,
|
|
4368
4358
|
errorParser: i
|
|
4369
4359
|
});
|
|
@@ -4371,6 +4361,6 @@ function Er(e, { initialValues: t, onSubmit: n, onValidate: r, errorParser: i }
|
|
|
4371
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;
|
|
4372
4362
|
}
|
|
4373
4363
|
//#endregion
|
|
4374
|
-
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 };
|
|
4375
4365
|
|
|
4376
4366
|
//# sourceMappingURL=index.mjs.map
|