@ahrowe/ui 0.1.8 → 0.1.9
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 +959 -869
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/package/common/virtualList/virtualList.d.ts +15 -3
- package/dist/types/package/common/virtualList/virtualList.types.d.ts +28 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import e, { Component as t, PureComponent as n, forwardRef as r, useCallback as i, useEffect as a, useImperativeHandle as o, useLayoutEffect as s, useMemo as c, useReducer as l, useRef as u, useState as d } from "react";
|
|
2
2
|
import f from "classnames";
|
|
3
3
|
import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
|
|
4
|
-
import { faBell as m, faCheck as h, faChevronDown as g, faChevronLeft as _, faChevronRight as v, faCircleCheck as y, faCircleInfo as b, faCircleXmark as x, faDoorOpen as S, faDownload as C, faDrawPolygon as w, faEnvelope as T, faEye as E, faEyeSlash as ee, faGear as D, faHandPointer as O, faLayerGroup as k, faMagnifyingGlassMinus as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { DndContext as
|
|
10
|
-
import { SortableContext as
|
|
11
|
-
import { CSS as
|
|
12
|
-
import { NumericFormat as
|
|
4
|
+
import { faBell as m, faCheck as h, faChevronDown as g, faChevronLeft as _, faChevronRight as v, faCircleCheck as y, faCircleInfo as b, faCircleXmark as x, faDoorOpen as S, faDownload as C, faDrawPolygon as w, faEnvelope as T, faEye as E, faEyeSlash as ee, faGear as D, faHandPointer as O, faLayerGroup as k, faMagnifyingGlassMinus as te, faMagnifyingGlassPlus as ne, faPen as A, faPhone as j, faPlus as M, faSearch as re, faSquare as ie, faTrash as ae, faTriangleExclamation as oe, faUpload as se, faXmark as ce, faXmarkCircle as N } from "@fortawesome/free-solid-svg-icons";
|
|
5
|
+
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
6
|
+
import { createPortal as le } from "react-dom";
|
|
7
|
+
import ue from "downshift";
|
|
8
|
+
import de from "@mona-health/react-input-mask";
|
|
9
|
+
import { DndContext as fe, DragOverlay as pe, PointerSensor as me, closestCorners as L, useDroppable as he, useSensor as ge, useSensors as R } from "@dnd-kit/core";
|
|
10
|
+
import { SortableContext as _e, arrayMove as ve, useSortable as z, verticalListSortingStrategy as ye } from "@dnd-kit/sortable";
|
|
11
|
+
import { CSS as be } from "@dnd-kit/utilities";
|
|
12
|
+
import { NumericFormat as xe } from "react-number-format";
|
|
13
13
|
//#region package/common/accordion/accordion.types.ts
|
|
14
|
-
var
|
|
14
|
+
var Se = /* @__PURE__ */ function(e) {
|
|
15
15
|
return e.Default = "default", e.Primary = "primary", e.Plain = "plain", e;
|
|
16
|
-
}({}),
|
|
16
|
+
}({}), Ce = {
|
|
17
17
|
accordion: "accordion_YZt8B",
|
|
18
18
|
"accordion-title": "accordion-title_CGYKY",
|
|
19
19
|
accordionTitle: "accordion-title_CGYKY",
|
|
@@ -33,7 +33,7 @@ var ve = /* @__PURE__ */ function(e) {
|
|
|
33
33
|
accordionIcon: "accordion-icon_kLqp-",
|
|
34
34
|
"accordion-icon-active": "accordion-icon-active_lJwG8",
|
|
35
35
|
accordionIconActive: "accordion-icon-active_lJwG8"
|
|
36
|
-
},
|
|
36
|
+
}, we = {
|
|
37
37
|
accordion: "accordion_X64Nz",
|
|
38
38
|
"accordion-title": "accordion-title_2q-FF",
|
|
39
39
|
accordionTitle: "accordion-title_2q-FF",
|
|
@@ -53,7 +53,7 @@ var ve = /* @__PURE__ */ function(e) {
|
|
|
53
53
|
accordionIcon: "accordion-icon_W1mz5",
|
|
54
54
|
"accordion-icon-active": "accordion-icon-active_LI98q",
|
|
55
55
|
accordionIconActive: "accordion-icon-active_LI98q"
|
|
56
|
-
},
|
|
56
|
+
}, B = {
|
|
57
57
|
accordion: "accordion_wkZJf",
|
|
58
58
|
"accordion-title": "accordion-title_-qwNy",
|
|
59
59
|
accordionTitle: "accordion-title_-qwNy",
|
|
@@ -71,13 +71,13 @@ var ve = /* @__PURE__ */ function(e) {
|
|
|
71
71
|
accordionIcon: "accordion-icon_kHxym",
|
|
72
72
|
"accordion-icon-active": "accordion-icon-active_-L8BH",
|
|
73
73
|
accordionIconActive: "accordion-icon-active_-L8BH"
|
|
74
|
-
},
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
74
|
+
}, Te = {
|
|
75
|
+
[Se.Default]: Ce,
|
|
76
|
+
[Se.Primary]: we,
|
|
77
|
+
[Se.Plain]: B
|
|
78
78
|
};
|
|
79
|
-
function
|
|
80
|
-
let y =
|
|
79
|
+
function Ee({ id: e = "", title: t = "", children: n = null, expanded: r = null, onHeaderClicked: i = () => {}, styleType: o = Se.Default, startOpen: s = !1, hideHeader: c = !1, className: l, style: m, classNames: h, styles: _, ...v }) {
|
|
80
|
+
let y = Te[o], b = u(null), [x, S] = d(r ?? s), [C, w] = d(null);
|
|
81
81
|
a(() => {
|
|
82
82
|
r !== null && S(r);
|
|
83
83
|
}, [r]), a(() => {
|
|
@@ -91,7 +91,7 @@ function Se({ id: e = "", title: t = "", children: n = null, expanded: r = null,
|
|
|
91
91
|
i(e, t), r === null && S(t);
|
|
92
92
|
}
|
|
93
93
|
let E = { height: `${x ? 32 : 24}px` }, ee = { height: x ? C ?? "auto" : "0px" };
|
|
94
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ I("div", {
|
|
95
95
|
...v,
|
|
96
96
|
id: e || void 0,
|
|
97
97
|
className: f(y.accordion, x && y.accordionActive, l, h?.root),
|
|
@@ -99,7 +99,7 @@ function Se({ id: e = "", title: t = "", children: n = null, expanded: r = null,
|
|
|
99
99
|
...m,
|
|
100
100
|
..._?.root
|
|
101
101
|
},
|
|
102
|
-
children: [!c && /* @__PURE__ */
|
|
102
|
+
children: [!c && /* @__PURE__ */ I("div", {
|
|
103
103
|
className: f(y.accordionHeader, x && y.accordionHeaderActive, h?.header),
|
|
104
104
|
style: {
|
|
105
105
|
...E,
|
|
@@ -111,22 +111,22 @@ function Se({ id: e = "", title: t = "", children: n = null, expanded: r = null,
|
|
|
111
111
|
onKeyDown: ({ key: e }) => {
|
|
112
112
|
e === "Enter" && T();
|
|
113
113
|
},
|
|
114
|
-
children: [/* @__PURE__ */
|
|
114
|
+
children: [/* @__PURE__ */ F("div", {
|
|
115
115
|
className: f(y.accordionTitle, h?.title),
|
|
116
116
|
style: _?.title,
|
|
117
117
|
children: t
|
|
118
|
-
}), /* @__PURE__ */
|
|
118
|
+
}), /* @__PURE__ */ F(p, {
|
|
119
119
|
icon: g,
|
|
120
120
|
className: f(y.accordionIcon, x && y.accordionIconActive, h?.icon),
|
|
121
121
|
style: _?.icon
|
|
122
122
|
})]
|
|
123
|
-
}), /* @__PURE__ */
|
|
123
|
+
}), /* @__PURE__ */ F("div", {
|
|
124
124
|
className: f(y.accordionBody, x && y.accordionBodyActive, h?.body),
|
|
125
125
|
style: {
|
|
126
126
|
...ee,
|
|
127
127
|
..._?.body
|
|
128
128
|
},
|
|
129
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ F("div", {
|
|
130
130
|
className: f(y.accordionBodyInner, h?.bodyInner),
|
|
131
131
|
style: _?.bodyInner,
|
|
132
132
|
ref: b,
|
|
@@ -135,11 +135,11 @@ function Se({ id: e = "", title: t = "", children: n = null, expanded: r = null,
|
|
|
135
135
|
})]
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
|
-
var
|
|
138
|
+
var De = {
|
|
139
139
|
actionButtons: "actionButtons_7GybR",
|
|
140
140
|
"actionButtons-margin": "actionButtons-margin_-XoFP",
|
|
141
141
|
actionButtonsMargin: "actionButtons-margin_-XoFP"
|
|
142
|
-
},
|
|
142
|
+
}, V = {
|
|
143
143
|
button: "button_wYLPJ",
|
|
144
144
|
"button-notAllowed": "button-notAllowed_xGT-E",
|
|
145
145
|
buttonNotAllowed: "button-notAllowed_xGT-E",
|
|
@@ -171,7 +171,7 @@ var Ce = {
|
|
|
171
171
|
buttonSizeMedium: "button-size-medium_gNVDM",
|
|
172
172
|
"button-size-large": "button-size-large_xSIcS",
|
|
173
173
|
buttonSizeLarge: "button-size-large_xSIcS"
|
|
174
|
-
},
|
|
174
|
+
}, Oe = {
|
|
175
175
|
"spinner-loading": "spinner-loading_qbxX-",
|
|
176
176
|
spinnerLoading: "spinner-loading_qbxX-",
|
|
177
177
|
"animate-spinner": "animate-spinner_6HoVF",
|
|
@@ -180,15 +180,15 @@ var Ce = {
|
|
|
180
180
|
};
|
|
181
181
|
//#endregion
|
|
182
182
|
//#region package/common/loading/spinnerLoading/spinnerLoading.tsx
|
|
183
|
-
function
|
|
184
|
-
return /* @__PURE__ */
|
|
183
|
+
function ke({ className: e }) {
|
|
184
|
+
return /* @__PURE__ */ F("svg", {
|
|
185
185
|
"data-testid": "spinner",
|
|
186
|
-
className: f(
|
|
186
|
+
className: f(Oe.spinnerLoading, e),
|
|
187
187
|
xmlns: "http://www.w3.org/2000/svg",
|
|
188
188
|
viewBox: "0 0 100 100",
|
|
189
189
|
fill: "none",
|
|
190
190
|
stroke: "var(--primary-color)",
|
|
191
|
-
children: /* @__PURE__ */
|
|
191
|
+
children: /* @__PURE__ */ F("circle", {
|
|
192
192
|
cx: "50",
|
|
193
193
|
cy: "50",
|
|
194
194
|
r: "45",
|
|
@@ -196,25 +196,25 @@ function Te({ className: e }) {
|
|
|
196
196
|
})
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
|
|
199
|
+
ke.defaultProps = { className: void 0 };
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region package/common/loading/spinnerLoading/index.ts
|
|
202
|
-
var
|
|
202
|
+
var Ae = ke, H = /* @__PURE__ */ function(e) {
|
|
203
203
|
return e.Primary = "primary", e.Default = "default", e.Delete = "delete", e;
|
|
204
|
-
}({}),
|
|
204
|
+
}({}), U = /* @__PURE__ */ function(e) {
|
|
205
205
|
return e.Default = "default", e.Small = "small", e.Medium = "medium", e.Large = "large", e;
|
|
206
|
-
}({}),
|
|
206
|
+
}({}), je = /* @__PURE__ */ function(e) {
|
|
207
207
|
return e.Button = "button", e.Reset = "reset", e.Submit = "submit", e;
|
|
208
|
-
}({}),
|
|
208
|
+
}({}), Me = {
|
|
209
209
|
ripple: "ripple_TsvyF",
|
|
210
210
|
"ripple-container": "ripple-container_QzHdC",
|
|
211
211
|
rippleContainer: "ripple-container_QzHdC"
|
|
212
|
-
},
|
|
212
|
+
}, Ne = r(function({ disabled: e = !1, children: t, className: n, style: r, overflowHidden: i = !0, rippleAnimationLength: s = .6, rippleBackground: c = "rgba(255, 255, 255, 0.2)", manualOnly: l = !1, ...d }, f) {
|
|
213
213
|
let p = u(null), m = u(null);
|
|
214
214
|
function h(t, n) {
|
|
215
215
|
if (e) return;
|
|
216
216
|
let r = document.createElement("div");
|
|
217
|
-
r.style.left = `${t}px`, r.style.top = `${n}px`, r.style.background = c, r.classList.add(
|
|
217
|
+
r.style.left = `${t}px`, r.style.top = `${n}px`, r.style.background = c, r.classList.add(Me.ripple), p.current?.appendChild(r), setTimeout(() => {
|
|
218
218
|
p.current?.removeChild(r);
|
|
219
219
|
}, s * 1e3 + 50);
|
|
220
220
|
}
|
|
@@ -236,14 +236,14 @@ var Ee = Te, De = /* @__PURE__ */ function(e) {
|
|
|
236
236
|
return e.addEventListener("click", n), () => e.removeEventListener("click", n);
|
|
237
237
|
}, [t, l]);
|
|
238
238
|
let _ = { "--ripple-animation-length": `${s}s` };
|
|
239
|
-
return t === void 0 ? /* @__PURE__ */
|
|
240
|
-
className:
|
|
239
|
+
return t === void 0 ? /* @__PURE__ */ F("div", {
|
|
240
|
+
className: Me.rippleContainer,
|
|
241
241
|
ref: p,
|
|
242
242
|
style: {
|
|
243
243
|
overflow: i ? "hidden" : "visible",
|
|
244
244
|
..._
|
|
245
245
|
}
|
|
246
|
-
}) : /* @__PURE__ */
|
|
246
|
+
}) : /* @__PURE__ */ I("div", {
|
|
247
247
|
...d,
|
|
248
248
|
className: n,
|
|
249
249
|
onClick: l ? void 0 : (e) => g(e),
|
|
@@ -252,94 +252,94 @@ var Ee = Te, De = /* @__PURE__ */ function(e) {
|
|
|
252
252
|
overflow: i ? "hidden" : "visible",
|
|
253
253
|
...r
|
|
254
254
|
},
|
|
255
|
-
children: [t, /* @__PURE__ */
|
|
256
|
-
className:
|
|
255
|
+
children: [t, /* @__PURE__ */ F("div", {
|
|
256
|
+
className: Me.rippleContainer,
|
|
257
257
|
ref: p,
|
|
258
258
|
style: _
|
|
259
259
|
})]
|
|
260
260
|
});
|
|
261
|
-
}),
|
|
262
|
-
default:
|
|
263
|
-
primary:
|
|
264
|
-
delete:
|
|
265
|
-
},
|
|
266
|
-
default:
|
|
267
|
-
small:
|
|
268
|
-
medium:
|
|
269
|
-
large:
|
|
261
|
+
}), W = {
|
|
262
|
+
default: V.buttonStyleDefault,
|
|
263
|
+
primary: V.buttonStylePrimary,
|
|
264
|
+
delete: V.buttonStyleDelete
|
|
265
|
+
}, Pe = {
|
|
266
|
+
default: V.buttonSizeDefault,
|
|
267
|
+
small: V.buttonSizeSmall,
|
|
268
|
+
medium: V.buttonSizeMedium,
|
|
269
|
+
large: V.buttonSizeLarge
|
|
270
270
|
};
|
|
271
|
-
function
|
|
272
|
-
return /* @__PURE__ */
|
|
271
|
+
function G({ className: e, style: t, type: n = je.Button, styleType: r = H.Default, size: i = U.Default, onClick: a = () => {}, children: o, icon: s, isLoading: c = !1, disabled: l = !1, title: u = void 0, ref: d, classNames: m, styles: h, ...g }) {
|
|
272
|
+
return /* @__PURE__ */ F("button", {
|
|
273
273
|
...g,
|
|
274
|
-
className: f(
|
|
274
|
+
className: f(V.button, W[r], Pe[i], { [V.buttonNotAllowed]: c || l }, e),
|
|
275
275
|
style: t,
|
|
276
276
|
type: n,
|
|
277
277
|
onClick: a,
|
|
278
278
|
disabled: l || c,
|
|
279
279
|
title: u,
|
|
280
280
|
ref: d,
|
|
281
|
-
children: /* @__PURE__ */
|
|
281
|
+
children: /* @__PURE__ */ F(Ne, {
|
|
282
282
|
disabled: c || l,
|
|
283
|
-
children: /* @__PURE__ */
|
|
284
|
-
className: f(
|
|
283
|
+
children: /* @__PURE__ */ F("div", {
|
|
284
|
+
className: f(V.buttonBackground, m?.background),
|
|
285
285
|
style: h?.background,
|
|
286
|
-
children: /* @__PURE__ */
|
|
287
|
-
className: f(
|
|
286
|
+
children: /* @__PURE__ */ I("div", {
|
|
287
|
+
className: f(V.buttonContent, m?.content),
|
|
288
288
|
style: h?.content,
|
|
289
|
-
children: [c ? /* @__PURE__ */
|
|
290
|
-
className: f(
|
|
289
|
+
children: [c ? /* @__PURE__ */ F("div", {
|
|
290
|
+
className: f(V.buttonLoadingContainer, m?.loadingContainer),
|
|
291
291
|
style: h?.loadingContainer,
|
|
292
|
-
children: /* @__PURE__ */
|
|
293
|
-
}) : null, /* @__PURE__ */
|
|
292
|
+
children: /* @__PURE__ */ F(Ae, { className: V.buttonLoadingIcon })
|
|
293
|
+
}) : null, /* @__PURE__ */ I("div", {
|
|
294
294
|
className: f(m?.label, {
|
|
295
|
-
[
|
|
296
|
-
[
|
|
295
|
+
[V.buttonLoading]: c,
|
|
296
|
+
[V.buttonWithIcon]: !!s
|
|
297
297
|
}),
|
|
298
298
|
style: h?.label,
|
|
299
|
-
children: [s ? /* @__PURE__ */
|
|
299
|
+
children: [s ? /* @__PURE__ */ F(p, { icon: s }) : null, o]
|
|
300
300
|
})]
|
|
301
301
|
})
|
|
302
302
|
})
|
|
303
303
|
})
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
|
-
|
|
306
|
+
G.StyleType = H, G.Size = U, G.Type = je;
|
|
307
307
|
//#endregion
|
|
308
308
|
//#region package/common/actionButtons/actionButtons.tsx
|
|
309
|
-
function
|
|
310
|
-
return /* @__PURE__ */
|
|
309
|
+
function Fe({ onSubmit: e = () => null, onClose: t = () => null, submitLabel: n = "Save", cancelLabel: r = "Cancel", submitButtonStyle: i = H.Primary, isSubmitButtonLoading: a = !1, isSubmitButtonDisabled: o = !1, isCancelButtonLoading: s = !1, isCancelButtonDisabled: c = !1, hidePrimaryButton: l = !1, hideSecondaryButton: u = !1, noMargin: d = !1, className: p, style: m, classNames: h, styles: g, ..._ }) {
|
|
310
|
+
return /* @__PURE__ */ I("div", {
|
|
311
311
|
..._,
|
|
312
|
-
className: f(
|
|
312
|
+
className: f(De.actionButtons, !d && De.actionButtonsMargin, p, h?.root),
|
|
313
313
|
style: {
|
|
314
314
|
...m,
|
|
315
315
|
...g?.root
|
|
316
316
|
},
|
|
317
|
-
children: [!l && /* @__PURE__ */
|
|
317
|
+
children: [!l && /* @__PURE__ */ F(G, {
|
|
318
318
|
isLoading: a,
|
|
319
319
|
disabled: o,
|
|
320
320
|
styleType: i,
|
|
321
|
-
type:
|
|
321
|
+
type: je.Submit,
|
|
322
322
|
onClick: e,
|
|
323
323
|
className: h?.submitButton,
|
|
324
324
|
style: g?.submitButton,
|
|
325
325
|
children: n
|
|
326
|
-
}), !u && /* @__PURE__ */
|
|
326
|
+
}), !u && /* @__PURE__ */ F(G, {
|
|
327
327
|
isLoading: s,
|
|
328
328
|
disabled: c,
|
|
329
329
|
onClick: t,
|
|
330
|
-
styleType:
|
|
330
|
+
styleType: H.Default,
|
|
331
331
|
className: h?.cancelButton,
|
|
332
332
|
style: g?.cancelButton,
|
|
333
333
|
children: r
|
|
334
334
|
})]
|
|
335
335
|
});
|
|
336
336
|
}
|
|
337
|
-
var
|
|
337
|
+
var Ie = { interactableDiv: "interactableDiv_Ej8Fi" }, Le = e.forwardRef(({ className: e, children: t, onClick: n, onKeyDown: r, tabIndex: a = 0, title: o, ...s }, c) => {
|
|
338
338
|
let l = i((e) => {
|
|
339
339
|
e.key === "Enter" && n?.(e), r?.(e);
|
|
340
340
|
}, [n, r]);
|
|
341
|
-
return /* @__PURE__ */
|
|
342
|
-
className: f(
|
|
341
|
+
return /* @__PURE__ */ F("div", {
|
|
342
|
+
className: f(Ie.interactableDiv, e),
|
|
343
343
|
onClick: n,
|
|
344
344
|
tabIndex: a ?? 0,
|
|
345
345
|
role: "button",
|
|
@@ -350,23 +350,23 @@ var Fe = { interactableDiv: "interactableDiv_Ej8Fi" }, Ie = e.forwardRef(({ clas
|
|
|
350
350
|
children: t
|
|
351
351
|
});
|
|
352
352
|
});
|
|
353
|
-
|
|
353
|
+
Le.displayName = "InteractableDiv";
|
|
354
354
|
//#endregion
|
|
355
355
|
//#region package/common/interactableDiv/index.ts
|
|
356
|
-
var
|
|
356
|
+
var Re = Le, ze = { actionIcon: "actionIcon_ganSq" };
|
|
357
357
|
//#endregion
|
|
358
358
|
//#region package/common/actionIcon/actionIcon.tsx
|
|
359
|
-
function
|
|
360
|
-
return /* @__PURE__ */
|
|
359
|
+
function Be({ icon: e, className: t = "", style: n, title: r = "", onClick: i = () => {}, classNames: a, styles: o, ...s }) {
|
|
360
|
+
return /* @__PURE__ */ F(Re, {
|
|
361
361
|
...s,
|
|
362
|
-
className: f(
|
|
362
|
+
className: f(ze.actionIcon, t, a?.root),
|
|
363
363
|
style: {
|
|
364
364
|
...n,
|
|
365
365
|
...o?.root
|
|
366
366
|
},
|
|
367
367
|
title: r,
|
|
368
368
|
onClick: i,
|
|
369
|
-
children: /* @__PURE__ */
|
|
369
|
+
children: /* @__PURE__ */ F(p, {
|
|
370
370
|
icon: e,
|
|
371
371
|
className: a?.icon,
|
|
372
372
|
style: o?.icon
|
|
@@ -375,11 +375,11 @@ function ze({ icon: e, className: t = "", style: n, title: r = "", onClick: i =
|
|
|
375
375
|
}
|
|
376
376
|
//#endregion
|
|
377
377
|
//#region package/common/bodyEnd/bodyEnd.tsx
|
|
378
|
-
function
|
|
378
|
+
function Ve({ children: e = null }) {
|
|
379
379
|
let t = document.getElementById("bodyEnd");
|
|
380
|
-
return t ?
|
|
380
|
+
return t ? le(e, t) : (typeof process < "u" && process.env.NODE_ENV !== "production" && console.error("[BodyEnd] No element with id=\"bodyEnd\" found. Add <div id=\"bodyEnd\"></div> to your app root."), null);
|
|
381
381
|
}
|
|
382
|
-
var
|
|
382
|
+
var K = {
|
|
383
383
|
card: "card_w-6Ki",
|
|
384
384
|
"card-padding": "card-padding_X2-q-",
|
|
385
385
|
cardPadding: "card-padding_X2-q-",
|
|
@@ -405,13 +405,13 @@ var Ve = {
|
|
|
405
405
|
//#region package/common/card/Card.tsx
|
|
406
406
|
function He({ className: e = void 0, children: t = null, onClick: n = void 0, tabIndex: r = null, hoverEffect: i = void 0, style: a = void 0, ...o }) {
|
|
407
407
|
let s = !!n;
|
|
408
|
-
return /* @__PURE__ */
|
|
408
|
+
return /* @__PURE__ */ F(Re, {
|
|
409
409
|
...o,
|
|
410
|
-
className: f(
|
|
410
|
+
className: f(K.card, K.cardPadding, K.cardShadow, s && K.cardInteractable, (s && i !== !1 || i) && K.cardHover, e),
|
|
411
411
|
onClick: n,
|
|
412
412
|
tabIndex: r ?? (s ? 0 : null),
|
|
413
413
|
style: a,
|
|
414
|
-
children: /* @__PURE__ */
|
|
414
|
+
children: /* @__PURE__ */ F(Ne, {
|
|
415
415
|
disabled: !s,
|
|
416
416
|
overflowHidden: !1,
|
|
417
417
|
children: t
|
|
@@ -422,19 +422,19 @@ function He({ className: e = void 0, children: t = null, onClick: n = void 0, ta
|
|
|
422
422
|
//#region package/common/card/CardHeader.tsx
|
|
423
423
|
function Ue({ className: e = "", title: t = "", subTitle: n = "", thumbnail: r = "" }) {
|
|
424
424
|
let i = typeof r == "string" && r.startsWith("http") ? r : void 0;
|
|
425
|
-
return /* @__PURE__ */
|
|
426
|
-
className: f(
|
|
427
|
-
children: [r && /* @__PURE__ */
|
|
428
|
-
className:
|
|
425
|
+
return /* @__PURE__ */ I("div", {
|
|
426
|
+
className: f(K.cardHeader, e),
|
|
427
|
+
children: [r && /* @__PURE__ */ F("div", {
|
|
428
|
+
className: K.cardHeaderThumbnail,
|
|
429
429
|
style: i ? { backgroundImage: `url(${i})` } : {},
|
|
430
430
|
children: !i && r
|
|
431
|
-
}), /* @__PURE__ */
|
|
432
|
-
className:
|
|
433
|
-
children: [/* @__PURE__ */
|
|
434
|
-
className:
|
|
431
|
+
}), /* @__PURE__ */ I("div", {
|
|
432
|
+
className: K.cardHeaderTitles,
|
|
433
|
+
children: [/* @__PURE__ */ F("div", {
|
|
434
|
+
className: K.cardHeaderTitlesMain,
|
|
435
435
|
children: t
|
|
436
|
-
}), /* @__PURE__ */
|
|
437
|
-
className:
|
|
436
|
+
}), /* @__PURE__ */ F("div", {
|
|
437
|
+
className: K.cardHeaderTitlesSub,
|
|
438
438
|
children: n
|
|
439
439
|
})]
|
|
440
440
|
})]
|
|
@@ -443,8 +443,8 @@ function Ue({ className: e = "", title: t = "", subTitle: n = "", thumbnail: r =
|
|
|
443
443
|
//#endregion
|
|
444
444
|
//#region package/common/card/CardMedia.tsx
|
|
445
445
|
function We({ src: e = "", alt: t = "" }) {
|
|
446
|
-
return /* @__PURE__ */
|
|
447
|
-
className:
|
|
446
|
+
return /* @__PURE__ */ F("img", {
|
|
447
|
+
className: K.cardMedia,
|
|
448
448
|
src: e,
|
|
449
449
|
alt: t
|
|
450
450
|
});
|
|
@@ -452,14 +452,14 @@ function We({ src: e = "", alt: t = "" }) {
|
|
|
452
452
|
//#endregion
|
|
453
453
|
//#region package/common/card/CardContent.tsx
|
|
454
454
|
function Ge({ children: e = null }) {
|
|
455
|
-
return /* @__PURE__ */
|
|
455
|
+
return /* @__PURE__ */ F(P, { children: e });
|
|
456
456
|
}
|
|
457
457
|
//#endregion
|
|
458
458
|
//#region package/common/card/CardActions.tsx
|
|
459
459
|
function Ke({ className: e = "", actions: t = [], children: n = null }) {
|
|
460
|
-
return /* @__PURE__ */
|
|
461
|
-
className: f(
|
|
462
|
-
children: [t.map(({ id: e, onClick: t, label: n, styleType: r =
|
|
460
|
+
return /* @__PURE__ */ I("div", {
|
|
461
|
+
className: f(K.cardActions, e),
|
|
462
|
+
children: [t.map(({ id: e, onClick: t, label: n, styleType: r = H.Default }) => /* @__PURE__ */ F("div", { children: /* @__PURE__ */ F(G, {
|
|
463
463
|
onClick: t,
|
|
464
464
|
styleType: r,
|
|
465
465
|
children: n
|
|
@@ -496,7 +496,7 @@ function Je({ label: e = "", selected: t = !1, onToggle: n = () => {}, className
|
|
|
496
496
|
o || y || (C.current?.addRipple(), g && g.set(!g.value), n(!t, e));
|
|
497
497
|
}
|
|
498
498
|
let E = g ? g.value : t;
|
|
499
|
-
return /* @__PURE__ */
|
|
499
|
+
return /* @__PURE__ */ I("div", {
|
|
500
500
|
...S,
|
|
501
501
|
className: f(qe.checkbox, {
|
|
502
502
|
[qe.checkboxDisabled]: o,
|
|
@@ -510,30 +510,30 @@ function Je({ label: e = "", selected: t = !1, onToggle: n = () => {}, className
|
|
|
510
510
|
role: "checkbox",
|
|
511
511
|
"aria-checked": E,
|
|
512
512
|
tabIndex: l,
|
|
513
|
-
children: [/* @__PURE__ */
|
|
513
|
+
children: [/* @__PURE__ */ F("div", {
|
|
514
514
|
title: c,
|
|
515
515
|
className: f(qe.checkboxIcon, y ? qe.checkboxLoading : null, b?.icon),
|
|
516
516
|
style: x?.icon,
|
|
517
|
-
children: y ? /* @__PURE__ */
|
|
517
|
+
children: y ? /* @__PURE__ */ F("div", {
|
|
518
518
|
style: {
|
|
519
519
|
width: m,
|
|
520
520
|
height: h
|
|
521
521
|
},
|
|
522
|
-
children: /* @__PURE__ */
|
|
523
|
-
}) : /* @__PURE__ */
|
|
522
|
+
children: /* @__PURE__ */ F(Ae, { className: qe.checkboxLoadingSpinner })
|
|
523
|
+
}) : /* @__PURE__ */ I("div", {
|
|
524
524
|
style: {
|
|
525
525
|
width: m,
|
|
526
526
|
height: h,
|
|
527
527
|
...x?.checkmark
|
|
528
528
|
},
|
|
529
529
|
className: f(qe.checkboxCheckmark, E && qe.checkboxCheckmarkChecked, b?.checkmark),
|
|
530
|
-
children: [/* @__PURE__ */
|
|
530
|
+
children: [/* @__PURE__ */ F(Ne, {
|
|
531
531
|
ref: C,
|
|
532
532
|
manualOnly: !0,
|
|
533
533
|
overflowHidden: !1,
|
|
534
534
|
rippleAnimationLength: .3,
|
|
535
535
|
rippleBackground: "radial-gradient(transparent, var(--primary-color))"
|
|
536
|
-
}), /* @__PURE__ */
|
|
536
|
+
}), /* @__PURE__ */ F("svg", {
|
|
537
537
|
strokeLinejoin: "round",
|
|
538
538
|
strokeLinecap: "round",
|
|
539
539
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -541,14 +541,14 @@ function Je({ label: e = "", selected: t = !1, onToggle: n = () => {}, className
|
|
|
541
541
|
width: `calc(${m} + 1px)`,
|
|
542
542
|
height: `calc(${h} + 1px)`,
|
|
543
543
|
...v ? { style: { background: v } } : {},
|
|
544
|
-
children: /* @__PURE__ */
|
|
544
|
+
children: /* @__PURE__ */ F("path", {
|
|
545
545
|
d: "M 0 0 l 1 1 l 2 -2",
|
|
546
546
|
strokeWidth: "0.4",
|
|
547
547
|
fill: "none"
|
|
548
548
|
})
|
|
549
549
|
})]
|
|
550
550
|
})
|
|
551
|
-
}), /* @__PURE__ */
|
|
551
|
+
}), /* @__PURE__ */ F("div", {
|
|
552
552
|
className: b?.label,
|
|
553
553
|
style: {
|
|
554
554
|
lineHeight: s || "100%",
|
|
@@ -579,27 +579,27 @@ function Xe({ className: e = "", thumbnail: t = "", text: n = "", showRemoveIcon
|
|
|
579
579
|
let s = c(() => {
|
|
580
580
|
if (typeof t == "string" && t.startsWith("http")) return t;
|
|
581
581
|
}, [t]);
|
|
582
|
-
return /* @__PURE__ */
|
|
582
|
+
return /* @__PURE__ */ F("div", {
|
|
583
583
|
...o,
|
|
584
584
|
className: f(Ye.chip, i && Ye.chipClickable, e),
|
|
585
585
|
onClick: i,
|
|
586
|
-
children: /* @__PURE__ */
|
|
586
|
+
children: /* @__PURE__ */ F(Ne, {
|
|
587
587
|
disabled: !i,
|
|
588
588
|
style: { borderRadius: "inherit" },
|
|
589
|
-
children: /* @__PURE__ */
|
|
589
|
+
children: /* @__PURE__ */ I("div", {
|
|
590
590
|
className: Ye.chipInner,
|
|
591
591
|
children: [
|
|
592
|
-
t && /* @__PURE__ */
|
|
592
|
+
t && /* @__PURE__ */ F("div", {
|
|
593
593
|
className: Ye.chipThumbnail,
|
|
594
594
|
style: s ? { backgroundImage: `url(${s})` } : {},
|
|
595
595
|
children: !s && t
|
|
596
596
|
}),
|
|
597
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ F("div", {
|
|
598
598
|
className: Ye.chipText,
|
|
599
599
|
children: n
|
|
600
600
|
}),
|
|
601
|
-
r && /* @__PURE__ */
|
|
602
|
-
icon:
|
|
601
|
+
r && /* @__PURE__ */ F(Be, {
|
|
602
|
+
icon: N,
|
|
603
603
|
onClick: (e) => {
|
|
604
604
|
e.stopPropagation(), a?.();
|
|
605
605
|
}
|
|
@@ -612,7 +612,7 @@ function Xe({ className: e = "", thumbnail: t = "", text: n = "", showRemoveIcon
|
|
|
612
612
|
//#endregion
|
|
613
613
|
//#region package/common/chip/chipContainer.tsx
|
|
614
614
|
function Ze({ className: e = void 0, children: t = null, inline: n = !1, ...r }) {
|
|
615
|
-
return /* @__PURE__ */
|
|
615
|
+
return /* @__PURE__ */ F("div", {
|
|
616
616
|
...r,
|
|
617
617
|
className: f(Ye.chipContainer, n && Ye.chipContainerInline, e),
|
|
618
618
|
children: t
|
|
@@ -684,20 +684,20 @@ function tt({ align: e = $e.Left, children: t = null, content: n = null, isOpen:
|
|
|
684
684
|
!r && !i && setTimeout(() => _.current(!1), 1);
|
|
685
685
|
}
|
|
686
686
|
return window.addEventListener("mouseup", e), () => window.removeEventListener("mouseup", e);
|
|
687
|
-
}, [r, o]), /* @__PURE__ */
|
|
687
|
+
}, [r, o]), /* @__PURE__ */ I("div", {
|
|
688
688
|
...m,
|
|
689
689
|
className: f(Qe.floatingMenu, s, l?.root),
|
|
690
690
|
style: {
|
|
691
691
|
...c,
|
|
692
692
|
...p?.root
|
|
693
693
|
},
|
|
694
|
-
children: [/* @__PURE__ */
|
|
694
|
+
children: [/* @__PURE__ */ F("div", {
|
|
695
695
|
className: f(Qe.floatingMenuContent, l?.trigger),
|
|
696
696
|
style: p?.trigger,
|
|
697
697
|
ref: g,
|
|
698
698
|
onClick: S,
|
|
699
699
|
children: t
|
|
700
|
-
}), r && /* @__PURE__ */
|
|
700
|
+
}), r && /* @__PURE__ */ I("div", {
|
|
701
701
|
className: f(Qe.floatingMenuAnim, l?.menu),
|
|
702
702
|
style: {
|
|
703
703
|
width: `${v}px`,
|
|
@@ -707,7 +707,7 @@ function tt({ align: e = $e.Left, children: t = null, content: n = null, isOpen:
|
|
|
707
707
|
},
|
|
708
708
|
...p?.menu
|
|
709
709
|
},
|
|
710
|
-
children: [/* @__PURE__ */
|
|
710
|
+
children: [/* @__PURE__ */ F("div", { className: f(Qe.floatingMenuContainerFlag, Qe[`floatingMenuContainerFlagAlign${et(e)}`]) }), /* @__PURE__ */ F("div", {
|
|
711
711
|
ref: h,
|
|
712
712
|
className: f(Qe.floatingMenuContainer, Qe[`floatingMenuContainerAlign${et(e)}`], l?.menuContainer),
|
|
713
713
|
style: p?.menuContainer,
|
|
@@ -727,22 +727,22 @@ var nt = {
|
|
|
727
727
|
//#region package/common/tooltip/tooltip.tsx
|
|
728
728
|
function rt({ variant: e, message: t = "", isVisible: n = !0, tooltipPosition: r, onClick: i }) {
|
|
729
729
|
let [a, o] = d(!1);
|
|
730
|
-
return e === "info" ? n ? /* @__PURE__ */
|
|
730
|
+
return e === "info" ? n ? /* @__PURE__ */ F("div", {
|
|
731
731
|
className: f(nt.tooltipBubble, r),
|
|
732
732
|
onClick: i,
|
|
733
733
|
children: t
|
|
734
|
-
}) : null : e === "details" ? /* @__PURE__ */
|
|
734
|
+
}) : null : e === "details" ? /* @__PURE__ */ I("div", {
|
|
735
735
|
className: nt.tooltipDetails,
|
|
736
|
-
children: [/* @__PURE__ */
|
|
736
|
+
children: [/* @__PURE__ */ F("span", {
|
|
737
737
|
className: nt.tooltipDetailsIcon,
|
|
738
738
|
onMouseEnter: () => o(!0),
|
|
739
739
|
onMouseLeave: () => o(!1),
|
|
740
740
|
children: "?"
|
|
741
|
-
}), a && /* @__PURE__ */
|
|
741
|
+
}), a && /* @__PURE__ */ F("div", {
|
|
742
742
|
className: f(nt.tooltipBubble, r),
|
|
743
743
|
children: t
|
|
744
744
|
})]
|
|
745
|
-
}) : e === "error" && n ? /* @__PURE__ */
|
|
745
|
+
}) : e === "error" && n ? /* @__PURE__ */ F("div", {
|
|
746
746
|
className: f(nt.tooltipError, r),
|
|
747
747
|
onClick: i,
|
|
748
748
|
children: t
|
|
@@ -829,178 +829,178 @@ var q = {
|
|
|
829
829
|
}({});
|
|
830
830
|
//#endregion
|
|
831
831
|
//#region package/common/input/input.tsx
|
|
832
|
-
function it({ name: t = "", label: n = "", errorMessage: r = "", isValid: o = !0, className: s = "", style: c, value: l = "", icon: m = null, onChange: h = () => {}, onFocus: g = null, onBlur: _ = null, onMouseEnter: v = null, onMouseLeave: y = null, isUppercase: b = !1, isRequired: x = !1, tabIndex: S = 0, type: C = void 0, isRow: w = !1, onIconClick: D = null, parse: O = null, formValidator: k = null, autoFocus:
|
|
833
|
-
let [
|
|
834
|
-
let e =
|
|
835
|
-
!e || !
|
|
836
|
-
}, [
|
|
832
|
+
function it({ name: t = "", label: n = "", errorMessage: r = "", isValid: o = !0, className: s = "", style: c, value: l = "", icon: m = null, onChange: h = () => {}, onFocus: g = null, onBlur: _ = null, onMouseEnter: v = null, onMouseLeave: y = null, isUppercase: b = !1, isRequired: x = !1, tabIndex: S = 0, type: C = void 0, isRow: w = !1, onIconClick: D = null, parse: O = null, formValidator: k = null, autoFocus: te = !1, suffix: ne = null, upperRightLabel: M = null, labelInBorder: ie = !1, showCancel: ae = !1, onClearClicked: oe, min: se = null, max: N = null, placeholder: P = "", useMatLabelStyle: le = !0, autoComplete: ue = null, onClick: de = () => null, readOnly: fe = !1, customInput: pe, alwaysShowCancel: me = !1, multiline: L = !1, rows: he, autoResize: ge = !1, classNames: R, styles: _e }) {
|
|
833
|
+
let [ve, z] = d(!1), [ye, be] = d(!1), [xe, Se] = d(!1), [, Ce] = d(0), we = u(null), B = u(k), Te = i(() => {
|
|
834
|
+
let e = we.current;
|
|
835
|
+
!e || !ge || (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
836
|
+
}, [ge]);
|
|
837
837
|
a(() => {
|
|
838
838
|
setTimeout(() => {
|
|
839
|
-
|
|
840
|
-
}, 1),
|
|
839
|
+
z(!1), be(!1);
|
|
840
|
+
}, 1), Te();
|
|
841
841
|
}, []), a(() => {
|
|
842
|
-
|
|
843
|
-
|
|
842
|
+
te && we.current && setTimeout(() => {
|
|
843
|
+
we.current?.focus();
|
|
844
844
|
}, 1);
|
|
845
|
-
}, [
|
|
846
|
-
|
|
847
|
-
let e =
|
|
845
|
+
}, [te]), a(() => {
|
|
846
|
+
B.current = k;
|
|
847
|
+
let e = B.current;
|
|
848
848
|
if (!e) return;
|
|
849
849
|
e.label = n ?? "", e.validate();
|
|
850
|
-
let t = () =>
|
|
850
|
+
let t = () => Ce((e) => e + 1);
|
|
851
851
|
return e.registerOnUpdateListener(t), () => {
|
|
852
852
|
e.removeOnUpdateListener(t);
|
|
853
853
|
};
|
|
854
854
|
}, [k, n]);
|
|
855
|
-
let
|
|
856
|
-
|
|
857
|
-
},
|
|
858
|
-
|
|
859
|
-
},
|
|
860
|
-
|
|
861
|
-
},
|
|
862
|
-
|
|
863
|
-
},
|
|
855
|
+
let Ee = () => k ? k.touched && k.hasError() : !o || !!r, De = () => !!(x || k && k.validators.find((e) => e.validatorId === "required")), V = (e) => {
|
|
856
|
+
be(!0), v && v(e);
|
|
857
|
+
}, Oe = (e) => {
|
|
858
|
+
be(!1), y && y(e);
|
|
859
|
+
}, ke = (e) => {
|
|
860
|
+
z(!0), g && g(e);
|
|
861
|
+
}, Ae = (e) => {
|
|
862
|
+
B.current && (B.current.touched = !0), z(!1), _ && _(e);
|
|
863
|
+
}, H = (e) => {
|
|
864
864
|
let t, n;
|
|
865
|
-
typeof e == "string" ? n = e : (t = e, n = e.target.value), O && (n = O(n)), k && k.set(n), h && h(n, t),
|
|
866
|
-
},
|
|
867
|
-
if (C !== "email") return C === "password" &&
|
|
868
|
-
},
|
|
865
|
+
typeof e == "string" ? n = e : (t = e, n = e.target.value), O && (n = O(n)), k && k.set(n), h && h(n, t), Te();
|
|
866
|
+
}, U = () => {
|
|
867
|
+
if (C !== "email") return C === "password" && xe ? "text" : C;
|
|
868
|
+
}, je = C && C !== J.Date && C !== J.Iban && C !== J.HasNoIcon, Me = je && !le && (C === J.Email || C === J.Phone || C === J.Search), Ne = {
|
|
869
869
|
className: f(q.inputFieldIcon, {
|
|
870
870
|
[q.inputFieldIconNotClickable]: !D,
|
|
871
|
-
[q.inputFieldIconLeft]:
|
|
871
|
+
[q.inputFieldIconLeft]: Me
|
|
872
872
|
}),
|
|
873
873
|
onClick: D ?? void 0
|
|
874
|
-
},
|
|
874
|
+
}, W = {
|
|
875
875
|
className: f(q.inputFieldIcon, q.inputFieldIconPassword),
|
|
876
|
-
onClick: () =>
|
|
877
|
-
},
|
|
878
|
-
|
|
879
|
-
let
|
|
880
|
-
return /* @__PURE__ */
|
|
876
|
+
onClick: () => Se(!xe)
|
|
877
|
+
}, Pe = Ee(), G = n;
|
|
878
|
+
G && De() && (G = `${G} *`);
|
|
879
|
+
let Fe = k ? k.value : l, Ie = le && (ve || Fe || C === J.Date);
|
|
880
|
+
return /* @__PURE__ */ I("div", {
|
|
881
881
|
className: f(q.input, s),
|
|
882
882
|
style: c,
|
|
883
883
|
children: [
|
|
884
|
-
/* @__PURE__ */
|
|
884
|
+
/* @__PURE__ */ I("label", {
|
|
885
885
|
htmlFor: t,
|
|
886
|
-
className: f(q.inputLabel,
|
|
886
|
+
className: f(q.inputLabel, R?.label, {
|
|
887
887
|
[q.inputLabelColumn]: !w,
|
|
888
|
-
[q.inputLabelInBorder]:
|
|
888
|
+
[q.inputLabelInBorder]: ie
|
|
889
889
|
}),
|
|
890
|
-
style:
|
|
890
|
+
style: _e?.label,
|
|
891
891
|
children: [
|
|
892
|
-
|
|
892
|
+
G && !le ? /* @__PURE__ */ I("span", {
|
|
893
893
|
className: q.inputLabelText,
|
|
894
|
-
children: [`${
|
|
894
|
+
children: [`${G} `, De() ? /* @__PURE__ */ F("span", {
|
|
895
895
|
className: f(q.isRequired),
|
|
896
896
|
children: "\xA0 *"
|
|
897
897
|
}) : null]
|
|
898
898
|
}) : null,
|
|
899
|
-
|
|
900
|
-
className: f(q.inputUpperRightLabel,
|
|
901
|
-
style:
|
|
902
|
-
children:
|
|
899
|
+
M && /* @__PURE__ */ F("div", {
|
|
900
|
+
className: f(q.inputUpperRightLabel, R?.upperRightLabel),
|
|
901
|
+
style: _e?.upperRightLabel,
|
|
902
|
+
children: M
|
|
903
903
|
}),
|
|
904
|
-
/* @__PURE__ */
|
|
905
|
-
className: f(q.inputContainer, { [q.inputContainerMultiline]:
|
|
906
|
-
style:
|
|
907
|
-
onMouseEnter:
|
|
908
|
-
onMouseLeave:
|
|
904
|
+
/* @__PURE__ */ I("div", {
|
|
905
|
+
className: f(q.inputContainer, { [q.inputContainerMultiline]: L }, R?.container),
|
|
906
|
+
style: _e?.container,
|
|
907
|
+
onMouseEnter: V,
|
|
908
|
+
onMouseLeave: Oe,
|
|
909
909
|
children: [
|
|
910
910
|
m,
|
|
911
|
-
e.cloneElement(
|
|
911
|
+
e.cloneElement(pe || F(L ? "textarea" : "input", {}), {
|
|
912
912
|
className: f(q.inputField, {
|
|
913
913
|
[q.inputFieldUppercase]: b,
|
|
914
914
|
[q.inputFieldDate]: C === J.Date,
|
|
915
915
|
[q.inputFieldDefault]: C !== J.Date,
|
|
916
|
-
[q.inputFieldWithIcon]:
|
|
917
|
-
[q.inputFieldWithIconLeft]:
|
|
918
|
-
[q.inputFieldMultiline]:
|
|
919
|
-
[q.inputFieldMultilineAutoResize]:
|
|
920
|
-
},
|
|
916
|
+
[q.inputFieldWithIcon]: je,
|
|
917
|
+
[q.inputFieldWithIconLeft]: Me,
|
|
918
|
+
[q.inputFieldMultiline]: L,
|
|
919
|
+
[q.inputFieldMultilineAutoResize]: L && ge
|
|
920
|
+
}, R?.input),
|
|
921
921
|
name: t,
|
|
922
922
|
id: t,
|
|
923
923
|
value: k ? k.value : l,
|
|
924
924
|
tabIndex: S,
|
|
925
|
-
ref:
|
|
926
|
-
onChange:
|
|
927
|
-
onFocus:
|
|
928
|
-
onBlur:
|
|
929
|
-
placeholder:
|
|
930
|
-
autoComplete:
|
|
931
|
-
onClick:
|
|
932
|
-
readOnly:
|
|
933
|
-
...!
|
|
934
|
-
type:
|
|
935
|
-
min:
|
|
936
|
-
max:
|
|
925
|
+
ref: pe ? void 0 : we,
|
|
926
|
+
onChange: H,
|
|
927
|
+
onFocus: ke,
|
|
928
|
+
onBlur: Ae,
|
|
929
|
+
placeholder: le ? "" : P,
|
|
930
|
+
autoComplete: ue,
|
|
931
|
+
onClick: de,
|
|
932
|
+
readOnly: fe,
|
|
933
|
+
...!L && {
|
|
934
|
+
type: U(),
|
|
935
|
+
min: se,
|
|
936
|
+
max: N
|
|
937
937
|
},
|
|
938
|
-
...
|
|
938
|
+
...L && he !== void 0 && { rows: he }
|
|
939
939
|
}),
|
|
940
|
-
|
|
941
|
-
className: f(q.inputFieldSuffix,
|
|
942
|
-
style:
|
|
943
|
-
children:
|
|
940
|
+
ne && /* @__PURE__ */ F("div", {
|
|
941
|
+
className: f(q.inputFieldSuffix, R?.suffix),
|
|
942
|
+
style: _e?.suffix,
|
|
943
|
+
children: ne
|
|
944
944
|
})
|
|
945
945
|
]
|
|
946
946
|
}),
|
|
947
|
-
/* @__PURE__ */
|
|
948
|
-
className: f(q.inputFieldset,
|
|
949
|
-
[q.inputContainerBorderFocused]:
|
|
950
|
-
[q.inputContainerBorderSearchFocused]: C === J.Search && (
|
|
951
|
-
[q.inputContainerBorderInvalid]:
|
|
952
|
-
[q.inputContainerBorderError]:
|
|
947
|
+
/* @__PURE__ */ F("fieldset", {
|
|
948
|
+
className: f(q.inputFieldset, R?.fieldset, {
|
|
949
|
+
[q.inputContainerBorderFocused]: ve,
|
|
950
|
+
[q.inputContainerBorderSearchFocused]: C === J.Search && (ve || l),
|
|
951
|
+
[q.inputContainerBorderInvalid]: Pe,
|
|
952
|
+
[q.inputContainerBorderError]: Pe
|
|
953
953
|
}),
|
|
954
|
-
style:
|
|
955
|
-
children: /* @__PURE__ */
|
|
956
|
-
className: f(q.inputFieldsetLegend, { [q.inputFieldsetLegendActive]:
|
|
957
|
-
children: /* @__PURE__ */
|
|
954
|
+
style: _e?.fieldset,
|
|
955
|
+
children: /* @__PURE__ */ F("legend", {
|
|
956
|
+
className: f(q.inputFieldsetLegend, { [q.inputFieldsetLegendActive]: Ie }),
|
|
957
|
+
children: /* @__PURE__ */ F("span", { children: G })
|
|
958
958
|
})
|
|
959
959
|
}),
|
|
960
|
-
|
|
960
|
+
le && n && /* @__PURE__ */ F("div", {
|
|
961
961
|
className: f(q.inputMatLabel, {
|
|
962
|
-
[q.inputMatLabelFloating]:
|
|
963
|
-
[q.inputMatLabelMultiline]:
|
|
962
|
+
[q.inputMatLabelFloating]: Ie,
|
|
963
|
+
[q.inputMatLabelMultiline]: L && !Ie
|
|
964
964
|
}),
|
|
965
|
-
children:
|
|
965
|
+
children: G
|
|
966
966
|
}),
|
|
967
|
-
|
|
968
|
-
className: f(q.inputPlaceholder,
|
|
969
|
-
children:
|
|
967
|
+
le && P && /* @__PURE__ */ F("div", {
|
|
968
|
+
className: f(q.inputPlaceholder, ve && !Fe && q.inputPlaceholderShown, L && q.inputPlaceholderMultiline),
|
|
969
|
+
children: P
|
|
970
970
|
}),
|
|
971
|
-
/* @__PURE__ */
|
|
971
|
+
/* @__PURE__ */ F(rt, {
|
|
972
972
|
variant: "error",
|
|
973
973
|
message: k ? k.getCurrentErrorMessage() : r || "",
|
|
974
|
-
isVisible:
|
|
974
|
+
isVisible: Pe && (ve || ye)
|
|
975
975
|
})
|
|
976
976
|
]
|
|
977
977
|
}),
|
|
978
|
-
C === J.Phone && /* @__PURE__ */
|
|
979
|
-
icon:
|
|
980
|
-
...
|
|
978
|
+
C === J.Phone && /* @__PURE__ */ F(p, {
|
|
979
|
+
icon: j,
|
|
980
|
+
...Ne
|
|
981
981
|
}),
|
|
982
|
-
C === J.Email && /* @__PURE__ */
|
|
982
|
+
C === J.Email && /* @__PURE__ */ F(p, {
|
|
983
983
|
icon: T,
|
|
984
|
-
...
|
|
984
|
+
...Ne
|
|
985
985
|
}),
|
|
986
|
-
C === J.Edit && /* @__PURE__ */
|
|
987
|
-
icon:
|
|
988
|
-
...
|
|
986
|
+
C === J.Edit && /* @__PURE__ */ F(p, {
|
|
987
|
+
icon: A,
|
|
988
|
+
...Ne
|
|
989
989
|
}),
|
|
990
|
-
C === J.Search && /* @__PURE__ */
|
|
991
|
-
icon:
|
|
992
|
-
...
|
|
990
|
+
C === J.Search && /* @__PURE__ */ F(p, {
|
|
991
|
+
icon: re,
|
|
992
|
+
...Ne
|
|
993
993
|
}),
|
|
994
|
-
C === J.Password && /* @__PURE__ */
|
|
995
|
-
icon:
|
|
996
|
-
...
|
|
994
|
+
C === J.Password && /* @__PURE__ */ F(p, {
|
|
995
|
+
icon: xe ? ee : E,
|
|
996
|
+
...W
|
|
997
997
|
}),
|
|
998
|
-
(
|
|
999
|
-
icon:
|
|
998
|
+
(ae && l && (ve || ye) || me) && /* @__PURE__ */ F(p, {
|
|
999
|
+
icon: ce,
|
|
1000
1000
|
className: q.inputFieldIcon,
|
|
1001
|
-
onClick:
|
|
1002
|
-
onMouseEnter: () =>
|
|
1003
|
-
onMouseLeave: () =>
|
|
1001
|
+
onClick: oe ?? void 0,
|
|
1002
|
+
onMouseEnter: () => be(!0),
|
|
1003
|
+
onMouseLeave: () => be(!1)
|
|
1004
1004
|
})
|
|
1005
1005
|
]
|
|
1006
1006
|
});
|
|
@@ -1067,11 +1067,11 @@ function ft({ hex: e, onChange: t, useInputComponent: n = !1 }) {
|
|
|
1067
1067
|
function s() {
|
|
1068
1068
|
ot(r.startsWith("#") ? r : `#${r}`) || i(e);
|
|
1069
1069
|
}
|
|
1070
|
-
return n ? /* @__PURE__ */
|
|
1070
|
+
return n ? /* @__PURE__ */ F(it, {
|
|
1071
1071
|
value: r,
|
|
1072
1072
|
onChange: (e) => o(e),
|
|
1073
1073
|
onBlur: s
|
|
1074
|
-
}) : /* @__PURE__ */
|
|
1074
|
+
}) : /* @__PURE__ */ F("input", {
|
|
1075
1075
|
type: "text",
|
|
1076
1076
|
value: r,
|
|
1077
1077
|
onChange: (e) => o(e.target.value),
|
|
@@ -1105,15 +1105,15 @@ function pt({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, o
|
|
|
1105
1105
|
i(r), a(s, l), c && o(n);
|
|
1106
1106
|
}
|
|
1107
1107
|
let m = dt(e, t, n), h = c ? ct(m, r, !0) : m;
|
|
1108
|
-
return /* @__PURE__ */
|
|
1108
|
+
return /* @__PURE__ */ I("div", {
|
|
1109
1109
|
className: at.panel,
|
|
1110
1110
|
children: [
|
|
1111
|
-
/* @__PURE__ */
|
|
1111
|
+
/* @__PURE__ */ I("div", {
|
|
1112
1112
|
ref: l,
|
|
1113
1113
|
className: at.gradientArea,
|
|
1114
1114
|
style: { "--hue": e },
|
|
1115
1115
|
onMouseDown: f,
|
|
1116
|
-
children: [/* @__PURE__ */
|
|
1116
|
+
children: [/* @__PURE__ */ F("div", { className: at.gradientOverlay }), /* @__PURE__ */ F("div", {
|
|
1117
1117
|
className: at.cursor,
|
|
1118
1118
|
style: {
|
|
1119
1119
|
left: `${t}%`,
|
|
@@ -1121,7 +1121,7 @@ function pt({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, o
|
|
|
1121
1121
|
}
|
|
1122
1122
|
})]
|
|
1123
1123
|
}),
|
|
1124
|
-
/* @__PURE__ */
|
|
1124
|
+
/* @__PURE__ */ F("input", {
|
|
1125
1125
|
type: "range",
|
|
1126
1126
|
min: 0,
|
|
1127
1127
|
max: 359,
|
|
@@ -1129,7 +1129,7 @@ function pt({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, o
|
|
|
1129
1129
|
onChange: (e) => i(Number(e.target.value)),
|
|
1130
1130
|
className: at.hueSlider
|
|
1131
1131
|
}),
|
|
1132
|
-
c && /* @__PURE__ */
|
|
1132
|
+
c && /* @__PURE__ */ F("input", {
|
|
1133
1133
|
type: "range",
|
|
1134
1134
|
min: 0,
|
|
1135
1135
|
max: 100,
|
|
@@ -1138,7 +1138,7 @@ function pt({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, o
|
|
|
1138
1138
|
className: at.alphaSlider,
|
|
1139
1139
|
style: { "--alpha-color": m }
|
|
1140
1140
|
}),
|
|
1141
|
-
s && /* @__PURE__ */
|
|
1141
|
+
s && /* @__PURE__ */ F(ft, {
|
|
1142
1142
|
hex: h,
|
|
1143
1143
|
onChange: p
|
|
1144
1144
|
})
|
|
@@ -1189,7 +1189,7 @@ function ht({ className: e, value: t = mt, onChange: n, showInput: r = !1, showA
|
|
|
1189
1189
|
a: e
|
|
1190
1190
|
})), w(_.current.h, _.current.s, _.current.v, e);
|
|
1191
1191
|
}
|
|
1192
|
-
let D = dt(b, x, S), O = i ? lt(D, C) : D, k = ct(D, C, i),
|
|
1192
|
+
let D = dt(b, x, S), O = i ? lt(D, C) : D, k = ct(D, C, i), te = {
|
|
1193
1193
|
hue: b,
|
|
1194
1194
|
sat: x,
|
|
1195
1195
|
val: S,
|
|
@@ -1199,33 +1199,33 @@ function ht({ className: e, value: t = mt, onChange: n, showInput: r = !1, showA
|
|
|
1199
1199
|
onAlphaChange: ee,
|
|
1200
1200
|
showAlpha: i
|
|
1201
1201
|
};
|
|
1202
|
-
return a ? /* @__PURE__ */
|
|
1202
|
+
return a ? /* @__PURE__ */ F("div", {
|
|
1203
1203
|
...o,
|
|
1204
1204
|
className: f(at.colorPicker, e),
|
|
1205
|
-
children: /* @__PURE__ */
|
|
1206
|
-
...
|
|
1205
|
+
children: /* @__PURE__ */ F(pt, {
|
|
1206
|
+
...te,
|
|
1207
1207
|
showInput: r
|
|
1208
1208
|
})
|
|
1209
|
-
}) : /* @__PURE__ */
|
|
1209
|
+
}) : /* @__PURE__ */ I("div", {
|
|
1210
1210
|
...o,
|
|
1211
1211
|
className: f(at.colorPicker, e),
|
|
1212
|
-
children: [/* @__PURE__ */
|
|
1212
|
+
children: [/* @__PURE__ */ F(tt, {
|
|
1213
1213
|
isOpen: s,
|
|
1214
1214
|
onOpenChange: c,
|
|
1215
1215
|
dontCloseOnChildClick: !0,
|
|
1216
1216
|
align: $e.Left,
|
|
1217
|
-
content: /* @__PURE__ */
|
|
1218
|
-
children: /* @__PURE__ */
|
|
1217
|
+
content: /* @__PURE__ */ F(pt, { ...te }),
|
|
1218
|
+
children: /* @__PURE__ */ I(Re, {
|
|
1219
1219
|
className: at.swatch,
|
|
1220
|
-
children: [/* @__PURE__ */
|
|
1220
|
+
children: [/* @__PURE__ */ F("div", {
|
|
1221
1221
|
className: at.swatchFill,
|
|
1222
1222
|
style: { background: O }
|
|
1223
|
-
}), /* @__PURE__ */
|
|
1223
|
+
}), /* @__PURE__ */ F("span", {
|
|
1224
1224
|
className: at.swatchHex,
|
|
1225
1225
|
children: k
|
|
1226
1226
|
})]
|
|
1227
1227
|
})
|
|
1228
|
-
}), r && /* @__PURE__ */
|
|
1228
|
+
}), r && /* @__PURE__ */ F(ft, {
|
|
1229
1229
|
hex: k,
|
|
1230
1230
|
onChange: (e) => n?.(e),
|
|
1231
1231
|
useInputComponent: !0
|
|
@@ -1251,30 +1251,30 @@ function _t({ children: e = null, title: t = "", isOpen: n = !1, onClose: r = ()
|
|
|
1251
1251
|
let [u, m] = d(n), [h, g] = d(n);
|
|
1252
1252
|
return a(() => {
|
|
1253
1253
|
n ? (m(n), setTimeout(() => g(!0), 1)) : (g(!1), setTimeout(() => m(n), 300));
|
|
1254
|
-
}, [n]), u ? /* @__PURE__ */
|
|
1254
|
+
}, [n]), u ? /* @__PURE__ */ F(Ve, { children: /* @__PURE__ */ I("div", {
|
|
1255
1255
|
className: f(gt.modalContainer, c?.container),
|
|
1256
1256
|
style: l?.container,
|
|
1257
|
-
children: [/* @__PURE__ */
|
|
1257
|
+
children: [/* @__PURE__ */ F("div", {
|
|
1258
1258
|
className: f(gt.modalWrapper, h && gt.modalWrapperShown, c?.backdrop),
|
|
1259
1259
|
style: l?.backdrop,
|
|
1260
1260
|
onClick: r
|
|
1261
|
-
}), h && /* @__PURE__ */
|
|
1261
|
+
}), h && /* @__PURE__ */ I("div", {
|
|
1262
1262
|
className: f(gt.modal, h && gt.modalShown, i, c?.modal),
|
|
1263
1263
|
style: {
|
|
1264
1264
|
...o,
|
|
1265
1265
|
...l?.modal
|
|
1266
1266
|
},
|
|
1267
1267
|
onClick: (e) => e.stopPropagation(),
|
|
1268
|
-
children: [!s && /* @__PURE__ */
|
|
1268
|
+
children: [!s && /* @__PURE__ */ I("div", {
|
|
1269
1269
|
className: f(gt.modalHeader, c?.header),
|
|
1270
1270
|
style: l?.header,
|
|
1271
|
-
children: [/* @__PURE__ */
|
|
1271
|
+
children: [/* @__PURE__ */ F("div", {
|
|
1272
1272
|
className: c?.title,
|
|
1273
1273
|
style: l?.title,
|
|
1274
1274
|
children: t
|
|
1275
|
-
}), /* @__PURE__ */
|
|
1275
|
+
}), /* @__PURE__ */ F(p, {
|
|
1276
1276
|
onClick: r,
|
|
1277
|
-
icon:
|
|
1277
|
+
icon: ce,
|
|
1278
1278
|
className: c?.closeButton,
|
|
1279
1279
|
style: l?.closeButton
|
|
1280
1280
|
})]
|
|
@@ -1297,16 +1297,16 @@ function vt({ children: e = null, className: t = "", onClose: n = () => {}, onCo
|
|
|
1297
1297
|
u(!1);
|
|
1298
1298
|
}
|
|
1299
1299
|
}
|
|
1300
|
-
return /* @__PURE__ */
|
|
1300
|
+
return /* @__PURE__ */ I("div", {
|
|
1301
1301
|
className: t,
|
|
1302
|
-
children: [/* @__PURE__ */
|
|
1302
|
+
children: [/* @__PURE__ */ F("span", {
|
|
1303
1303
|
onClick: () => c(!0),
|
|
1304
1304
|
children: e
|
|
1305
|
-
}), /* @__PURE__ */
|
|
1305
|
+
}), /* @__PURE__ */ I(_t, {
|
|
1306
1306
|
title: i,
|
|
1307
1307
|
isOpen: o === void 0 ? s : o,
|
|
1308
1308
|
onClose: () => f(),
|
|
1309
|
-
children: [a, /* @__PURE__ */
|
|
1309
|
+
children: [a, /* @__PURE__ */ F(Fe, {
|
|
1310
1310
|
onClose: () => f(),
|
|
1311
1311
|
onSubmit: p,
|
|
1312
1312
|
submitLabel: "Confirm",
|
|
@@ -1450,16 +1450,16 @@ function Rt(e, t, n) {
|
|
|
1450
1450
|
}
|
|
1451
1451
|
function zt({ className: e = "", month: t = (/* @__PURE__ */ new Date()).getMonth() + 1, year: n = (/* @__PURE__ */ new Date()).getFullYear(), onSelect: r = () => null, selectionStart: i, selectionEnd: a, minDate: o = null, maxDate: s = null }) {
|
|
1452
1452
|
let c = Et("-"), l = Dt(t, n), u = Mt(t, n);
|
|
1453
|
-
return /* @__PURE__ */
|
|
1453
|
+
return /* @__PURE__ */ F("div", {
|
|
1454
1454
|
className: f(yt.datePickerMonth, e),
|
|
1455
|
-
children: /* @__PURE__ */
|
|
1455
|
+
children: /* @__PURE__ */ I("div", {
|
|
1456
1456
|
className: f(yt.datePickerMonthContent),
|
|
1457
1457
|
children: [
|
|
1458
|
-
jt(c).map((e, t) => /* @__PURE__ */
|
|
1459
|
-
Array.from(Array(u - 1).keys()).map((e) => /* @__PURE__ */
|
|
1458
|
+
jt(c).map((e, t) => /* @__PURE__ */ F("div", { children: e }, t)),
|
|
1459
|
+
Array.from(Array(u - 1).keys()).map((e) => /* @__PURE__ */ F("div", { className: f(yt.datePickerMonthItem, yt.datePickerMonthPlaceholder) }, e)),
|
|
1460
1460
|
Array.from(Array(l).keys()).map((e) => {
|
|
1461
1461
|
let c = e + 1, l = It(c, t, n, i, a), u = Lt(c, t, n, o, s), d = Rt(c, t, n);
|
|
1462
|
-
return /* @__PURE__ */
|
|
1462
|
+
return /* @__PURE__ */ F(Re, {
|
|
1463
1463
|
onClick: () => u ? null : r(Ot(c, t, n)),
|
|
1464
1464
|
className: f(yt.datePickerMonthDay, yt.datePickerMonthItem, {
|
|
1465
1465
|
[yt.datePickerMonthDaySelected]: l.isInRange,
|
|
@@ -1471,7 +1471,7 @@ function zt({ className: e = "", month: t = (/* @__PURE__ */ new Date()).getMont
|
|
|
1471
1471
|
children: c
|
|
1472
1472
|
}, c);
|
|
1473
1473
|
}),
|
|
1474
|
-
Array.from(Array(42 - (u + l - 1)).keys()).map((e) => /* @__PURE__ */
|
|
1474
|
+
Array.from(Array(42 - (u + l - 1)).keys()).map((e) => /* @__PURE__ */ F("div", {
|
|
1475
1475
|
className: f(yt.datePickerMonthItem, yt.datePickerMonthPlaceholder),
|
|
1476
1476
|
children: "\xA0"
|
|
1477
1477
|
}, e))
|
|
@@ -1538,18 +1538,18 @@ function Ut({ children: t, onScroll: n, className: r = "", isDataLoading: a = !1
|
|
|
1538
1538
|
o(a);
|
|
1539
1539
|
}
|
|
1540
1540
|
}, [t, o]);
|
|
1541
|
-
return /* @__PURE__ */
|
|
1541
|
+
return /* @__PURE__ */ I("div", {
|
|
1542
1542
|
className: f(Bt.infiniteBlock, r),
|
|
1543
1543
|
onScroll: g,
|
|
1544
1544
|
onKeyDown: _,
|
|
1545
1545
|
tabIndex: 0,
|
|
1546
1546
|
ref: s,
|
|
1547
|
-
children: [a ? /* @__PURE__ */
|
|
1547
|
+
children: [a ? /* @__PURE__ */ F("div", {
|
|
1548
1548
|
className: Bt.spinnerWrapper,
|
|
1549
|
-
children: /* @__PURE__ */
|
|
1550
|
-
}) : t, l && /* @__PURE__ */
|
|
1549
|
+
children: /* @__PURE__ */ F(Ae, { className: Bt.spinner })
|
|
1550
|
+
}) : t, l && /* @__PURE__ */ F("div", {
|
|
1551
1551
|
className: Bt.spinnerWrapper,
|
|
1552
|
-
children: /* @__PURE__ */
|
|
1552
|
+
children: /* @__PURE__ */ F(Ae, { className: Bt.spinner })
|
|
1553
1553
|
})]
|
|
1554
1554
|
});
|
|
1555
1555
|
}
|
|
@@ -1621,49 +1621,49 @@ var Y = {
|
|
|
1621
1621
|
};
|
|
1622
1622
|
//#endregion
|
|
1623
1623
|
//#region package/common/dropdown/dropdown.tsx
|
|
1624
|
-
function Wt({ errorMessage: e = "", className: t = "", label: n = "", value: r = "", isValid: i = !0, tabIndex: o = 0, isRequired: s = !1, customProps: c = {}, isRow: l = !1, disabled: m = !1, onScroll: h = () => Promise.resolve(), isListOnTop: _ = !1, onClick: v, onChange: y, onFocus: b = null, onBlur: x = null, onMouseEnter: S = null, onMouseLeave: C = null, dropdownLabel: w, isDropdownListWider: T = !1, inputClassName: E = "", dropDownIconClassName: ee = "", dropDownClassName: D = "", formValidator: O = null, labelClassName: k = "", dropDownInputClassName:
|
|
1625
|
-
let [
|
|
1624
|
+
function Wt({ errorMessage: e = "", className: t = "", label: n = "", value: r = "", isValid: i = !0, tabIndex: o = 0, isRequired: s = !1, customProps: c = {}, isRow: l = !1, disabled: m = !1, onScroll: h = () => Promise.resolve(), isListOnTop: _ = !1, onClick: v, onChange: y, onFocus: b = null, onBlur: x = null, onMouseEnter: S = null, onMouseLeave: C = null, dropdownLabel: w, isDropdownListWider: T = !1, inputClassName: E = "", dropDownIconClassName: ee = "", dropDownClassName: D = "", formValidator: O = null, labelClassName: k = "", dropDownInputClassName: te = "", items: ne = [], useMatLabelStyle: A = !0, placeholder: j = "", plainStyle: M = !1, scrollToSelected: re = !1, reactRef: ie }) {
|
|
1625
|
+
let [ae, oe] = d(!1), [se, ce] = d(!1), [, N] = d(0), P = u(O);
|
|
1626
1626
|
a(() => {
|
|
1627
|
-
if (
|
|
1628
|
-
|
|
1629
|
-
let e = () =>
|
|
1630
|
-
return
|
|
1627
|
+
if (P.current = O, !P.current) return;
|
|
1628
|
+
P.current.label = n ?? "", P.current.validate();
|
|
1629
|
+
let e = () => N((e) => e + 1);
|
|
1630
|
+
return P.current.registerOnUpdateListener(e), () => P.current?.removeOnUpdateListener(e);
|
|
1631
1631
|
}, [O, n]);
|
|
1632
|
-
let
|
|
1633
|
-
|
|
1634
|
-
},
|
|
1635
|
-
|
|
1636
|
-
},
|
|
1637
|
-
|
|
1638
|
-
},
|
|
1639
|
-
|
|
1640
|
-
},
|
|
1632
|
+
let le = (e) => {
|
|
1633
|
+
ce(!0), S?.(e);
|
|
1634
|
+
}, de = (e) => {
|
|
1635
|
+
ce(!1), C?.(e);
|
|
1636
|
+
}, fe = (e) => {
|
|
1637
|
+
oe(!0), b?.(e);
|
|
1638
|
+
}, pe = (e) => {
|
|
1639
|
+
P.current && (P.current.touched = !0), oe(!1), x?.(e);
|
|
1640
|
+
}, me = () => O ? O.touched && O.hasError() : !i || !!e, L = () => !!(s || O?.validators.find((e) => e.validatorId === "required")), he = (e) => {
|
|
1641
1641
|
O ? (O.set(e), y?.(O.value, c)) : y?.(e, c);
|
|
1642
|
-
},
|
|
1643
|
-
return
|
|
1644
|
-
e.key ===
|
|
1645
|
-
}), /* @__PURE__ */
|
|
1642
|
+
}, ge = w, R = O ? O.value : r, _e = me();
|
|
1643
|
+
return ne.forEach((e) => {
|
|
1644
|
+
e.key === R && (ge = e.label);
|
|
1645
|
+
}), /* @__PURE__ */ I("div", {
|
|
1646
1646
|
className: f(t, Y.dropdownLabel, Y.dropdown, { [Y.dropdownLabelColumn]: !l }),
|
|
1647
|
-
onMouseEnter:
|
|
1648
|
-
onMouseLeave:
|
|
1647
|
+
onMouseEnter: le,
|
|
1648
|
+
onMouseLeave: de,
|
|
1649
1649
|
children: [
|
|
1650
|
-
/* @__PURE__ */
|
|
1651
|
-
onChange: (e) =>
|
|
1650
|
+
/* @__PURE__ */ F(ue, {
|
|
1651
|
+
onChange: (e) => he((e || { key: "" }).key),
|
|
1652
1652
|
itemToString: (e) => e ? String(e.key) : "",
|
|
1653
|
-
selectedItem:
|
|
1654
|
-
stateReducer: (e, t) =>
|
|
1653
|
+
selectedItem: ne.find((e) => e.key === R) ?? null,
|
|
1654
|
+
stateReducer: (e, t) => re && Object.prototype.hasOwnProperty.call(t, "isOpen") ? {
|
|
1655
1655
|
...t,
|
|
1656
|
-
highlightedIndex: t.isOpen ?
|
|
1656
|
+
highlightedIndex: t.isOpen ? ne.indexOf(e.selectedItem) : null
|
|
1657
1657
|
} : t,
|
|
1658
|
-
children: ({ getItemProps: e, getToggleButtonProps: t, isOpen: r, selectedItem: i, highlightedIndex: a, setHighlightedIndex: s }) => /* @__PURE__ */
|
|
1659
|
-
onFocus:
|
|
1660
|
-
onBlur:
|
|
1658
|
+
children: ({ getItemProps: e, getToggleButtonProps: t, isOpen: r, selectedItem: i, highlightedIndex: a, setHighlightedIndex: s }) => /* @__PURE__ */ F("div", { children: /* @__PURE__ */ I("div", {
|
|
1659
|
+
onFocus: fe,
|
|
1660
|
+
onBlur: pe,
|
|
1661
1661
|
className: f(Y.dropdownInput, {
|
|
1662
|
-
[Y.dropdownInputPlain]:
|
|
1662
|
+
[Y.dropdownInputPlain]: M,
|
|
1663
1663
|
[Y.dropdownInputButtonDisabled]: m
|
|
1664
|
-
},
|
|
1664
|
+
}, te),
|
|
1665
1665
|
children: [
|
|
1666
|
-
/* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ F("button", {
|
|
1667
1667
|
tabIndex: o,
|
|
1668
1668
|
type: "button",
|
|
1669
1669
|
style: T ? {
|
|
@@ -1675,10 +1675,10 @@ function Wt({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1675
1675
|
onClick: (e) => {
|
|
1676
1676
|
t().onClick?.(e), v?.(e);
|
|
1677
1677
|
},
|
|
1678
|
-
ref:
|
|
1679
|
-
children:
|
|
1678
|
+
ref: ie,
|
|
1679
|
+
children: ge || R || /* @__PURE__ */ F("div", { children: "\xA0" })
|
|
1680
1680
|
}),
|
|
1681
|
-
/* @__PURE__ */
|
|
1681
|
+
/* @__PURE__ */ F("button", {
|
|
1682
1682
|
type: "button",
|
|
1683
1683
|
tabIndex: -1,
|
|
1684
1684
|
className: f(Y.dropdownInputButtonIcon, ee),
|
|
@@ -1686,19 +1686,19 @@ function Wt({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1686
1686
|
onClick: (e) => {
|
|
1687
1687
|
t().onClick?.(e), v?.(e);
|
|
1688
1688
|
},
|
|
1689
|
-
children: !m && /* @__PURE__ */
|
|
1689
|
+
children: !m && /* @__PURE__ */ F(p, {
|
|
1690
1690
|
icon: g,
|
|
1691
1691
|
className: f(Y.dropdownInputButtonIconArrow, { [Y.dropdownInputButtonIconArrowOpen]: r })
|
|
1692
1692
|
})
|
|
1693
1693
|
}),
|
|
1694
|
-
!m && r ? /* @__PURE__ */
|
|
1694
|
+
!m && r ? /* @__PURE__ */ F(Ut, {
|
|
1695
1695
|
onScroll: h,
|
|
1696
1696
|
className: f(Y.dropdownInputList, {
|
|
1697
1697
|
[Y.dropdownInputListOnTop]: _,
|
|
1698
1698
|
[Y.dropdownInputListWider]: T
|
|
1699
1699
|
}),
|
|
1700
1700
|
setHighlightedIndex: s,
|
|
1701
|
-
children:
|
|
1701
|
+
children: ne.map((t, n) => /* @__PURE__ */ F("div", {
|
|
1702
1702
|
...e({
|
|
1703
1703
|
index: n,
|
|
1704
1704
|
item: t,
|
|
@@ -1711,40 +1711,40 @@ function Wt({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1711
1711
|
children: t.label
|
|
1712
1712
|
}, t.key))
|
|
1713
1713
|
}) : null,
|
|
1714
|
-
/* @__PURE__ */
|
|
1714
|
+
/* @__PURE__ */ F("fieldset", {
|
|
1715
1715
|
className: f(Y.dropdownFieldset, {
|
|
1716
|
-
[Y.dropdownBorderPlain]:
|
|
1717
|
-
[Y.dropdownBorderFocused]:
|
|
1718
|
-
[Y.dropdownBorderInvalid]:
|
|
1719
|
-
[Y.dropdownBorderError]:
|
|
1716
|
+
[Y.dropdownBorderPlain]: M,
|
|
1717
|
+
[Y.dropdownBorderFocused]: ae,
|
|
1718
|
+
[Y.dropdownBorderInvalid]: _e,
|
|
1719
|
+
[Y.dropdownBorderError]: _e
|
|
1720
1720
|
}),
|
|
1721
|
-
children: /* @__PURE__ */
|
|
1722
|
-
className: f(Y.dropdownFieldsetLegend, { [Y.dropdownFieldsetLegendActive]:
|
|
1723
|
-
children: /* @__PURE__ */
|
|
1721
|
+
children: /* @__PURE__ */ F("legend", {
|
|
1722
|
+
className: f(Y.dropdownFieldsetLegend, { [Y.dropdownFieldsetLegendActive]: A && (ae || R) }),
|
|
1723
|
+
children: /* @__PURE__ */ F("span", { children: n })
|
|
1724
1724
|
})
|
|
1725
1725
|
}),
|
|
1726
|
-
|
|
1727
|
-
className: f(Y.dropdownMatLabel, { [Y.dropdownMatLabelFloating]:
|
|
1726
|
+
A && n && /* @__PURE__ */ F("div", {
|
|
1727
|
+
className: f(Y.dropdownMatLabel, { [Y.dropdownMatLabelFloating]: ae || R }),
|
|
1728
1728
|
children: n
|
|
1729
1729
|
}),
|
|
1730
|
-
|
|
1731
|
-
className: f(Y.dropdownPlaceholder,
|
|
1732
|
-
children:
|
|
1730
|
+
A && j && /* @__PURE__ */ F("div", {
|
|
1731
|
+
className: f(Y.dropdownPlaceholder, ae && !ge && Y.dropdownPlaceholderShown),
|
|
1732
|
+
children: j
|
|
1733
1733
|
})
|
|
1734
1734
|
]
|
|
1735
1735
|
}) })
|
|
1736
1736
|
}),
|
|
1737
|
-
n && !
|
|
1737
|
+
n && !A && /* @__PURE__ */ I("div", {
|
|
1738
1738
|
className: f(Y.dropdownLabelText, k),
|
|
1739
|
-
children: [n,
|
|
1739
|
+
children: [n, L() ? /* @__PURE__ */ F("div", {
|
|
1740
1740
|
className: Y.requiredMark,
|
|
1741
1741
|
children: "*"
|
|
1742
1742
|
}) : null]
|
|
1743
1743
|
}),
|
|
1744
|
-
/* @__PURE__ */
|
|
1744
|
+
/* @__PURE__ */ F(rt, {
|
|
1745
1745
|
variant: "error",
|
|
1746
1746
|
message: O ? O.getCurrentErrorMessage() : e || "",
|
|
1747
|
-
isVisible:
|
|
1747
|
+
isVisible: _e && (ae || se)
|
|
1748
1748
|
})
|
|
1749
1749
|
]
|
|
1750
1750
|
});
|
|
@@ -1767,58 +1767,58 @@ var Gt = {
|
|
|
1767
1767
|
//#endregion
|
|
1768
1768
|
//#region package/common/datePicker/datePicker.tsx
|
|
1769
1769
|
function Kt({ className: e = "", selected: t, onSelect: n = () => null, formValidator: r = null, noInput: i = !1, noHeader: o = !1, isModal: s = !1, isInline: c = !1, onChange: l = () => null, minDate: p = null, maxDate: m = null, children: h = null, showClearButton: g = !1, label: y = "", isValid: b = !0, errorMessage: x = "", isRequired: S = !1, startDate: C, endDate: w }) {
|
|
1770
|
-
let T = () => r ? r.value : t, E = T() ?? /* @__PURE__ */ new Date(), [ee, D] = d(E.getMonth() + 1), [O, k] = d(E.getFullYear()), [
|
|
1771
|
-
if (
|
|
1772
|
-
|
|
1770
|
+
let T = () => r ? r.value : t, E = T() ?? /* @__PURE__ */ new Date(), [ee, D] = d(E.getMonth() + 1), [O, k] = d(E.getFullYear()), [te, ne] = d(!1), [A, j] = d(() => T() ? Pt(E) : ""), [M, re] = d(!1), [ie, ae] = d(!1), [, oe] = d(0), [se, ce] = d(t), N = u(r);
|
|
1771
|
+
if (se !== t) {
|
|
1772
|
+
ce(t);
|
|
1773
1773
|
let e = t ?? /* @__PURE__ */ new Date();
|
|
1774
|
-
D(e.getMonth() + 1), k(e.getFullYear()),
|
|
1774
|
+
D(e.getMonth() + 1), k(e.getFullYear()), j(t ? Pt(t) : "");
|
|
1775
1775
|
}
|
|
1776
1776
|
a(() => {
|
|
1777
|
-
if (
|
|
1777
|
+
if (N.current = r, !r) return;
|
|
1778
1778
|
let e = () => {
|
|
1779
1779
|
let e = r.value;
|
|
1780
|
-
e ? (D(e.getMonth() + 1), k(e.getFullYear()),
|
|
1780
|
+
e ? (D(e.getMonth() + 1), k(e.getFullYear()), j(Pt(e))) : j(""), oe((e) => e + 1);
|
|
1781
1781
|
};
|
|
1782
1782
|
return r.registerOnUpdateListener(e), () => r.removeOnUpdateListener(e);
|
|
1783
1783
|
}, [r]);
|
|
1784
|
-
let
|
|
1785
|
-
|
|
1786
|
-
},
|
|
1787
|
-
|
|
1788
|
-
},
|
|
1784
|
+
let le = () => r ? r.touched && r.hasError() : !b || !!x, ue = () => !!(S || r?.validators.find((e) => e.validatorId === "required")), fe = (e) => {
|
|
1785
|
+
j(e ? Pt(e) : ""), r && r.set(e), l(e);
|
|
1786
|
+
}, pe = (e) => {
|
|
1787
|
+
fe(e), n(e), ne(!1);
|
|
1788
|
+
}, me = (e) => {
|
|
1789
1789
|
D((t) => {
|
|
1790
1790
|
let n = t + e;
|
|
1791
1791
|
return n < 1 ? (n = 12, k((e) => e - 1)) : n > 12 && (n = 1, k((e) => e + 1)), n;
|
|
1792
1792
|
});
|
|
1793
|
-
},
|
|
1793
|
+
}, L = (e) => {
|
|
1794
1794
|
if (e.match(/\d{2}\.\d{2}\.\d{4}/gi)) {
|
|
1795
1795
|
let [t, n, r] = e.split("."), i = Ot(Number(t), Number(n), Number(r));
|
|
1796
1796
|
if (i && i.toString() !== "Invalid Date" && (!m || i <= m) && (!p || i >= p)) return i;
|
|
1797
1797
|
}
|
|
1798
1798
|
return null;
|
|
1799
|
-
},
|
|
1799
|
+
}, he = ({ previousState: e, nextState: t }) => {
|
|
1800
1800
|
if (!e || t.value === e.value) return t;
|
|
1801
|
-
let n = Ft(t.value, e.value, t.selection ?? null), r =
|
|
1802
|
-
return r &&
|
|
1803
|
-
},
|
|
1801
|
+
let n = Ft(t.value, e.value, t.selection ?? null), r = L(n.value);
|
|
1802
|
+
return r && fe(r), n;
|
|
1803
|
+
}, ge = () => {
|
|
1804
1804
|
let e = 400, t = (/* @__PURE__ */ new Date()).getFullYear() - 200;
|
|
1805
1805
|
return p && (t = p.getFullYear()), m && (e = m.getFullYear() - t + 1), Array.from(Array(e).keys()).map((e) => ({
|
|
1806
1806
|
key: e + t,
|
|
1807
1807
|
label: e + t
|
|
1808
1808
|
}));
|
|
1809
|
-
},
|
|
1810
|
-
o ? null : /* @__PURE__ */
|
|
1809
|
+
}, R = T(), _e = le(), ve = /* @__PURE__ */ I(P, { children: [
|
|
1810
|
+
o ? null : /* @__PURE__ */ I("div", {
|
|
1811
1811
|
className: Gt.datePickerHeader,
|
|
1812
1812
|
children: [
|
|
1813
|
-
/* @__PURE__ */
|
|
1813
|
+
/* @__PURE__ */ F(Be, {
|
|
1814
1814
|
icon: _,
|
|
1815
|
-
onClick: () =>
|
|
1815
|
+
onClick: () => me(-1)
|
|
1816
1816
|
}),
|
|
1817
|
-
/* @__PURE__ */
|
|
1817
|
+
/* @__PURE__ */ F("div", {
|
|
1818
1818
|
className: Gt.datePickerHeaderMonthAndYearContainer,
|
|
1819
|
-
children: /* @__PURE__ */
|
|
1819
|
+
children: /* @__PURE__ */ I("div", {
|
|
1820
1820
|
className: Gt.datePickerHeaderMonthAndYear,
|
|
1821
|
-
children: [/* @__PURE__ */
|
|
1821
|
+
children: [/* @__PURE__ */ F(Wt, {
|
|
1822
1822
|
plainStyle: !0,
|
|
1823
1823
|
scrollToSelected: !0,
|
|
1824
1824
|
onChange: (e) => D(e),
|
|
@@ -1828,78 +1828,78 @@ function Kt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1828
1828
|
key: t + 1,
|
|
1829
1829
|
label: e
|
|
1830
1830
|
}))
|
|
1831
|
-
}), /* @__PURE__ */
|
|
1831
|
+
}), /* @__PURE__ */ F(Wt, {
|
|
1832
1832
|
plainStyle: !0,
|
|
1833
1833
|
scrollToSelected: !0,
|
|
1834
1834
|
useMatLabelStyle: !1,
|
|
1835
1835
|
className: Gt.datePickerHeaderYear,
|
|
1836
1836
|
onChange: (e) => k(e),
|
|
1837
1837
|
value: O,
|
|
1838
|
-
items:
|
|
1838
|
+
items: ge()
|
|
1839
1839
|
})]
|
|
1840
1840
|
})
|
|
1841
1841
|
}),
|
|
1842
|
-
/* @__PURE__ */
|
|
1842
|
+
/* @__PURE__ */ F(Be, {
|
|
1843
1843
|
icon: v,
|
|
1844
|
-
onClick: () =>
|
|
1844
|
+
onClick: () => me(1)
|
|
1845
1845
|
})
|
|
1846
1846
|
]
|
|
1847
1847
|
}),
|
|
1848
|
-
/* @__PURE__ */
|
|
1848
|
+
/* @__PURE__ */ F(zt, {
|
|
1849
1849
|
className: Gt.datePickerMonth,
|
|
1850
1850
|
month: ee,
|
|
1851
1851
|
year: O,
|
|
1852
|
-
onSelect:
|
|
1853
|
-
selectionStart: C ??
|
|
1854
|
-
selectionEnd: w ??
|
|
1852
|
+
onSelect: pe,
|
|
1853
|
+
selectionStart: C ?? R,
|
|
1854
|
+
selectionEnd: w ?? R,
|
|
1855
1855
|
minDate: p,
|
|
1856
1856
|
maxDate: m
|
|
1857
1857
|
}),
|
|
1858
|
-
g && /* @__PURE__ */
|
|
1859
|
-
onClick: () =>
|
|
1858
|
+
g && /* @__PURE__ */ F(G, {
|
|
1859
|
+
onClick: () => pe(null),
|
|
1860
1860
|
children: "Clear"
|
|
1861
1861
|
}),
|
|
1862
1862
|
h
|
|
1863
|
-
] }),
|
|
1863
|
+
] }), z = i ? null : /* @__PURE__ */ F(it, {
|
|
1864
1864
|
readOnly: s,
|
|
1865
|
-
label: `${y}${
|
|
1866
|
-
value:
|
|
1867
|
-
onChange: (e) =>
|
|
1868
|
-
onClick: () =>
|
|
1869
|
-
customInput: /* @__PURE__ */
|
|
1865
|
+
label: `${y}${ue() ? " *" : ""}`,
|
|
1866
|
+
value: A,
|
|
1867
|
+
onChange: (e) => j(e),
|
|
1868
|
+
onClick: () => ne(!0),
|
|
1869
|
+
customInput: /* @__PURE__ */ F(de, {
|
|
1870
1870
|
mask: "99.99.9999",
|
|
1871
1871
|
maskPlaceholder: "_",
|
|
1872
|
-
beforeMaskedStateChange:
|
|
1872
|
+
beforeMaskedStateChange: he
|
|
1873
1873
|
}),
|
|
1874
1874
|
onBlur: () => {
|
|
1875
|
-
|
|
1875
|
+
N.current && (N.current.touched = !0), re(!1), fe(L(A));
|
|
1876
1876
|
},
|
|
1877
|
-
onFocus: () =>
|
|
1878
|
-
onMouseEnter: () =>
|
|
1879
|
-
onMouseLeave: () =>
|
|
1880
|
-
isValid: !
|
|
1881
|
-
}),
|
|
1877
|
+
onFocus: () => re(!0),
|
|
1878
|
+
onMouseEnter: () => ae(!0),
|
|
1879
|
+
onMouseLeave: () => ae(!1),
|
|
1880
|
+
isValid: !_e
|
|
1881
|
+
}), ye = c ? ve : s ? /* @__PURE__ */ F(_t, {
|
|
1882
1882
|
hideHeader: !0,
|
|
1883
|
-
isOpen:
|
|
1884
|
-
onClose: () =>
|
|
1885
|
-
children:
|
|
1886
|
-
}) : /* @__PURE__ */
|
|
1887
|
-
isOpen:
|
|
1888
|
-
onOpenChange: (e) =>
|
|
1889
|
-
content:
|
|
1883
|
+
isOpen: te,
|
|
1884
|
+
onClose: () => ne(!1),
|
|
1885
|
+
children: ve
|
|
1886
|
+
}) : /* @__PURE__ */ F(tt, {
|
|
1887
|
+
isOpen: te,
|
|
1888
|
+
onOpenChange: (e) => ne(e),
|
|
1889
|
+
content: ve,
|
|
1890
1890
|
align: $e.Left,
|
|
1891
1891
|
dontCloseOnChildClick: !0,
|
|
1892
|
-
children:
|
|
1892
|
+
children: z
|
|
1893
1893
|
});
|
|
1894
|
-
return /* @__PURE__ */
|
|
1894
|
+
return /* @__PURE__ */ I("div", {
|
|
1895
1895
|
className: f(Gt.datePicker, e),
|
|
1896
1896
|
children: [
|
|
1897
|
-
(s || c) &&
|
|
1898
|
-
|
|
1899
|
-
/* @__PURE__ */
|
|
1897
|
+
(s || c) && z,
|
|
1898
|
+
ye,
|
|
1899
|
+
/* @__PURE__ */ F(rt, {
|
|
1900
1900
|
variant: "error",
|
|
1901
1901
|
message: r ? r.getCurrentErrorMessage() : x || "",
|
|
1902
|
-
isVisible:
|
|
1902
|
+
isVisible: _e && (M || ie)
|
|
1903
1903
|
})
|
|
1904
1904
|
]
|
|
1905
1905
|
});
|
|
@@ -1908,10 +1908,10 @@ var qt = { emptyState: "emptyState_KXOIx" };
|
|
|
1908
1908
|
//#endregion
|
|
1909
1909
|
//#region package/common/emptyState/emptyState.tsx
|
|
1910
1910
|
function Jt({ className: e, icon: t, children: n, ...r }) {
|
|
1911
|
-
return /* @__PURE__ */
|
|
1911
|
+
return /* @__PURE__ */ I("div", {
|
|
1912
1912
|
...r,
|
|
1913
1913
|
className: f(qt.emptyState, e),
|
|
1914
|
-
children: [t && /* @__PURE__ */
|
|
1914
|
+
children: [t && /* @__PURE__ */ F(p, { icon: t }), /* @__PURE__ */ F("div", { children: n ?? "No entries available" })]
|
|
1915
1915
|
});
|
|
1916
1916
|
}
|
|
1917
1917
|
var Yt = {
|
|
@@ -1926,14 +1926,14 @@ var Yt = {
|
|
|
1926
1926
|
default: null,
|
|
1927
1927
|
mini: Yt.fabSizeMini
|
|
1928
1928
|
};
|
|
1929
|
-
function Zt({ children: e = null, size: t = "default", className: n = "", styleType: r =
|
|
1930
|
-
return /* @__PURE__ */
|
|
1929
|
+
function Zt({ children: e = null, size: t = "default", className: n = "", styleType: r = H.Primary, onClick: i = () => {} }) {
|
|
1930
|
+
return /* @__PURE__ */ F(G, {
|
|
1931
1931
|
styleType: r,
|
|
1932
1932
|
className: f(Yt.fab, Xt[t], n),
|
|
1933
1933
|
onClick: i,
|
|
1934
|
-
children: /* @__PURE__ */
|
|
1934
|
+
children: /* @__PURE__ */ F("div", {
|
|
1935
1935
|
className: Yt.fabContentContainer,
|
|
1936
|
-
children: /* @__PURE__ */
|
|
1936
|
+
children: /* @__PURE__ */ F("div", {
|
|
1937
1937
|
className: Yt.fabContent,
|
|
1938
1938
|
children: e
|
|
1939
1939
|
})
|
|
@@ -1978,48 +1978,48 @@ function Qt({ children: e = null, size: t = "default", menuEntries: n = [], onMe
|
|
|
1978
1978
|
function u(e, t) {
|
|
1979
1979
|
e.stopPropagation(), a && c(!1), r(t);
|
|
1980
1980
|
}
|
|
1981
|
-
return /* @__PURE__ */
|
|
1981
|
+
return /* @__PURE__ */ I("div", {
|
|
1982
1982
|
...o,
|
|
1983
1983
|
className: X.fabContainer,
|
|
1984
1984
|
children: [
|
|
1985
|
-
/* @__PURE__ */
|
|
1985
|
+
/* @__PURE__ */ F("div", {
|
|
1986
1986
|
className: f(X.fabMenuBackdrop, s && X.fabMenuBackdropOpen),
|
|
1987
1987
|
onClick: (e) => {
|
|
1988
1988
|
e.stopPropagation(), c(!1);
|
|
1989
1989
|
}
|
|
1990
1990
|
}),
|
|
1991
|
-
/* @__PURE__ */
|
|
1991
|
+
/* @__PURE__ */ F("div", {
|
|
1992
1992
|
onClick: (e) => e.stopPropagation(),
|
|
1993
|
-
children: /* @__PURE__ */
|
|
1993
|
+
children: /* @__PURE__ */ F(Zt, {
|
|
1994
1994
|
className: X.fab,
|
|
1995
1995
|
size: t,
|
|
1996
1996
|
onClick: l,
|
|
1997
|
-
children: /* @__PURE__ */
|
|
1997
|
+
children: /* @__PURE__ */ I("div", {
|
|
1998
1998
|
className: f(X.fabIcon, s && X.fabIconMenuOpen),
|
|
1999
|
-
children: [/* @__PURE__ */
|
|
1999
|
+
children: [/* @__PURE__ */ F("div", {
|
|
2000
2000
|
className: f(X.fabIconContent, !s && X.fabIconContentShown),
|
|
2001
2001
|
children: e
|
|
2002
|
-
}), /* @__PURE__ */
|
|
2002
|
+
}), /* @__PURE__ */ F("div", {
|
|
2003
2003
|
className: f(X.fabIconContent, s && X.fabIconContentShown),
|
|
2004
|
-
children: /* @__PURE__ */
|
|
2004
|
+
children: /* @__PURE__ */ F(p, { icon: M })
|
|
2005
2005
|
})]
|
|
2006
2006
|
})
|
|
2007
2007
|
})
|
|
2008
2008
|
}),
|
|
2009
|
-
/* @__PURE__ */
|
|
2009
|
+
/* @__PURE__ */ F("div", {
|
|
2010
2010
|
className: X.fabMenu,
|
|
2011
|
-
children: n.map(({ id: e, label: t, icon: n }) => /* @__PURE__ */
|
|
2011
|
+
children: n.map(({ id: e, label: t, icon: n }) => /* @__PURE__ */ I("div", {
|
|
2012
2012
|
className: f(X.fabMenuEntry, s && X.fabMenuEntryShown),
|
|
2013
2013
|
onClick: (t) => u(t, e),
|
|
2014
|
-
children: [t && /* @__PURE__ */
|
|
2014
|
+
children: [t && /* @__PURE__ */ F("div", {
|
|
2015
2015
|
className: X.fabMenuEntryLabelContainer,
|
|
2016
|
-
children: /* @__PURE__ */
|
|
2016
|
+
children: /* @__PURE__ */ F("div", {
|
|
2017
2017
|
className: X.fabMenuEntryLabel,
|
|
2018
2018
|
children: t
|
|
2019
2019
|
})
|
|
2020
|
-
}), /* @__PURE__ */
|
|
2020
|
+
}), /* @__PURE__ */ F(Zt, {
|
|
2021
2021
|
size: "mini",
|
|
2022
|
-
children: /* @__PURE__ */
|
|
2022
|
+
children: /* @__PURE__ */ F(p, { icon: n })
|
|
2023
2023
|
})]
|
|
2024
2024
|
}, e))
|
|
2025
2025
|
})
|
|
@@ -2060,21 +2060,21 @@ function nn({ data: e = [], selectedId: t = null, label: n = "", onChange: r, fo
|
|
|
2060
2060
|
function g(e) {
|
|
2061
2061
|
i && i.set(e), r?.(e);
|
|
2062
2062
|
}
|
|
2063
|
-
return /* @__PURE__ */
|
|
2063
|
+
return /* @__PURE__ */ I("div", {
|
|
2064
2064
|
...u,
|
|
2065
2065
|
className: f($t.iconPicker, { [$t.iconPickerError]: m }, c?.root, o),
|
|
2066
2066
|
style: {
|
|
2067
2067
|
...l?.root,
|
|
2068
2068
|
...s
|
|
2069
2069
|
},
|
|
2070
|
-
children: [n && /* @__PURE__ */
|
|
2070
|
+
children: [n && /* @__PURE__ */ I("div", {
|
|
2071
2071
|
className: f($t.iconPickerLabel, c?.label),
|
|
2072
2072
|
style: l?.label,
|
|
2073
2073
|
children: [n, h && " *"]
|
|
2074
|
-
}), /* @__PURE__ */
|
|
2074
|
+
}), /* @__PURE__ */ F("div", {
|
|
2075
2075
|
className: f($t.iconPickerItemContainer, c?.itemContainer),
|
|
2076
2076
|
style: l?.itemContainer,
|
|
2077
|
-
children: e.map(({ id: e, label: t, icon: n, customIcon: r }) => /* @__PURE__ */
|
|
2077
|
+
children: e.map(({ id: e, label: t, icon: n, customIcon: r }) => /* @__PURE__ */ I("div", {
|
|
2078
2078
|
className: f($t.iconPickerItem, { [$t.iconPickerItemSelected]: d === e }, c?.item),
|
|
2079
2079
|
style: l?.item,
|
|
2080
2080
|
title: t,
|
|
@@ -2085,9 +2085,9 @@ function nn({ data: e = [], selectedId: t = null, label: n = "", onChange: r, fo
|
|
|
2085
2085
|
t === "Enter" && g(e);
|
|
2086
2086
|
},
|
|
2087
2087
|
children: [
|
|
2088
|
-
n && /* @__PURE__ */
|
|
2088
|
+
n && /* @__PURE__ */ F(p, { icon: n }),
|
|
2089
2089
|
r ?? null,
|
|
2090
|
-
/* @__PURE__ */
|
|
2090
|
+
/* @__PURE__ */ F(Ne, {})
|
|
2091
2091
|
]
|
|
2092
2092
|
}, e))
|
|
2093
2093
|
})]
|
|
@@ -2116,7 +2116,7 @@ function an({ children: e = null, idleAfterSeconds: t = 600, renderCondition: n
|
|
|
2116
2116
|
for (let e of rn) document.removeEventListener(e, c);
|
|
2117
2117
|
s.current !== null && clearTimeout(s.current);
|
|
2118
2118
|
};
|
|
2119
|
-
}, [c]), /* @__PURE__ */
|
|
2119
|
+
}, [c]), /* @__PURE__ */ F(P, { children: n && r && e });
|
|
2120
2120
|
}
|
|
2121
2121
|
var on = {
|
|
2122
2122
|
inputDropdown: "inputDropdown_UdYMa",
|
|
@@ -2165,7 +2165,7 @@ function ln({ label: e = "", value: t = "", formValidator: n = null, items: r =
|
|
|
2165
2165
|
C,
|
|
2166
2166
|
O
|
|
2167
2167
|
]);
|
|
2168
|
-
return /* @__PURE__ */
|
|
2168
|
+
return /* @__PURE__ */ I("div", {
|
|
2169
2169
|
...h,
|
|
2170
2170
|
className: f(on.inputDropdown, s?.root, a),
|
|
2171
2171
|
style: {
|
|
@@ -2175,17 +2175,17 @@ function ln({ label: e = "", value: t = "", formValidator: n = null, items: r =
|
|
|
2175
2175
|
onFocus: ee,
|
|
2176
2176
|
onBlur: D,
|
|
2177
2177
|
onKeyDown: k,
|
|
2178
|
-
children: [/* @__PURE__ */
|
|
2178
|
+
children: [/* @__PURE__ */ F(it, {
|
|
2179
2179
|
label: e,
|
|
2180
2180
|
value: _,
|
|
2181
2181
|
onChange: (e) => {
|
|
2182
2182
|
v(e), w(null);
|
|
2183
2183
|
},
|
|
2184
2184
|
placeholder: m
|
|
2185
|
-
}), /* @__PURE__ */
|
|
2185
|
+
}), /* @__PURE__ */ F("div", {
|
|
2186
2186
|
className: f(on.dropdown, { [on.dropdownShown]: x }, s?.dropdown),
|
|
2187
2187
|
style: c?.dropdown,
|
|
2188
|
-
children: x && E.map((e, t) => /* @__PURE__ */
|
|
2188
|
+
children: x && E.map((e, t) => /* @__PURE__ */ F("div", {
|
|
2189
2189
|
className: f(on.dropdownItem, C === t && on.dropdownItemHighlighted, s?.item),
|
|
2190
2190
|
style: c?.item,
|
|
2191
2191
|
onClick: () => O(e),
|
|
@@ -2213,11 +2213,11 @@ var un = {
|
|
|
2213
2213
|
//#endregion
|
|
2214
2214
|
//#region package/common/kanbanBoard/KanbanItem.tsx
|
|
2215
2215
|
function dn({ id: e, children: t }) {
|
|
2216
|
-
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } =
|
|
2217
|
-
return /* @__PURE__ */
|
|
2216
|
+
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } = z({ id: e });
|
|
2217
|
+
return /* @__PURE__ */ F("div", {
|
|
2218
2218
|
ref: i,
|
|
2219
2219
|
style: {
|
|
2220
|
-
transform:
|
|
2220
|
+
transform: be.Transform.toString(a),
|
|
2221
2221
|
transition: o
|
|
2222
2222
|
},
|
|
2223
2223
|
className: f(un.item, s && un.itemDragging),
|
|
@@ -2229,21 +2229,21 @@ function dn({ id: e, children: t }) {
|
|
|
2229
2229
|
//#endregion
|
|
2230
2230
|
//#region package/common/kanbanBoard/KanbanColumn.tsx
|
|
2231
2231
|
function fn({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a, classNames: o, styles: s }) {
|
|
2232
|
-
let { setNodeRef: c, isOver: l } =
|
|
2233
|
-
return /* @__PURE__ */
|
|
2232
|
+
let { setNodeRef: c, isOver: l } = he({ id: `column-${e}` });
|
|
2233
|
+
return /* @__PURE__ */ I("div", {
|
|
2234
2234
|
className: f(un.column, l && un.columnOver, n.length === 0 && un.columnEmpty, a),
|
|
2235
|
-
children: [/* @__PURE__ */
|
|
2235
|
+
children: [/* @__PURE__ */ F("div", {
|
|
2236
2236
|
className: f(un.columnHeader, o?.header),
|
|
2237
2237
|
style: s?.header,
|
|
2238
2238
|
children: t
|
|
2239
|
-
}), /* @__PURE__ */
|
|
2239
|
+
}), /* @__PURE__ */ F(_e, {
|
|
2240
2240
|
items: n,
|
|
2241
|
-
strategy:
|
|
2242
|
-
children: /* @__PURE__ */
|
|
2241
|
+
strategy: ye,
|
|
2242
|
+
children: /* @__PURE__ */ F("div", {
|
|
2243
2243
|
ref: c,
|
|
2244
2244
|
className: f(un.columnItems, o?.items),
|
|
2245
2245
|
style: s?.items,
|
|
2246
|
-
children: n.map((e) => /* @__PURE__ */
|
|
2246
|
+
children: n.map((e) => /* @__PURE__ */ F(dn, {
|
|
2247
2247
|
id: e,
|
|
2248
2248
|
children: r[e] === void 0 ? null : i(r[e], e)
|
|
2249
2249
|
}, e))
|
|
@@ -2254,7 +2254,7 @@ function fn({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a
|
|
|
2254
2254
|
//#endregion
|
|
2255
2255
|
//#region package/common/kanbanBoard/KanbanBoard.tsx
|
|
2256
2256
|
function pn({ columns: e, items: t, renderItem: n, onChange: r, className: i, style: a, classNames: o, styles: s }) {
|
|
2257
|
-
let [c, l] = d(null), [u, p] = d(null), m =
|
|
2257
|
+
let [c, l] = d(null), [u, p] = d(null), m = R(ge(me, { activationConstraint: { distance: 8 } })), h = u ?? e;
|
|
2258
2258
|
function g(e, t) {
|
|
2259
2259
|
return e.findIndex((e) => e.itemIds.includes(t));
|
|
2260
2260
|
}
|
|
@@ -2286,7 +2286,7 @@ function pn({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2286
2286
|
let e = n[a], t = e.itemIds.indexOf(r), o = e.itemIds.indexOf(i);
|
|
2287
2287
|
t !== -1 && o !== -1 && t !== o && (n[a] = {
|
|
2288
2288
|
...e,
|
|
2289
|
-
itemIds:
|
|
2289
|
+
itemIds: ve(e.itemIds, t, o)
|
|
2290
2290
|
});
|
|
2291
2291
|
} else {
|
|
2292
2292
|
n[a].itemIds = n[a].itemIds.filter((e) => e !== r);
|
|
@@ -2303,23 +2303,23 @@ function pn({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2303
2303
|
}
|
|
2304
2304
|
r(u), p(null);
|
|
2305
2305
|
}
|
|
2306
|
-
return /* @__PURE__ */
|
|
2306
|
+
return /* @__PURE__ */ I(fe, {
|
|
2307
2307
|
sensors: m,
|
|
2308
|
-
collisionDetection:
|
|
2308
|
+
collisionDetection: L,
|
|
2309
2309
|
onDragStart: _,
|
|
2310
2310
|
onDragOver: v,
|
|
2311
2311
|
onDragEnd: y,
|
|
2312
|
-
children: [/* @__PURE__ */
|
|
2312
|
+
children: [/* @__PURE__ */ F("div", {
|
|
2313
2313
|
className: f(un.board, i),
|
|
2314
2314
|
style: a,
|
|
2315
|
-
children: h.map((e) => /* @__PURE__ */
|
|
2315
|
+
children: h.map((e) => /* @__PURE__ */ F(fn, {
|
|
2316
2316
|
id: e.id,
|
|
2317
2317
|
title: e.title,
|
|
2318
2318
|
itemIds: e.itemIds,
|
|
2319
2319
|
items: t,
|
|
2320
2320
|
renderItem: n
|
|
2321
2321
|
}, e.id))
|
|
2322
|
-
}), /* @__PURE__ */
|
|
2322
|
+
}), /* @__PURE__ */ F(pe, { children: c && t[c] !== void 0 ? /* @__PURE__ */ F("div", {
|
|
2323
2323
|
className: f(un.dragOverlay, o?.dragOverlay),
|
|
2324
2324
|
style: s?.dragOverlay,
|
|
2325
2325
|
children: n(t[c], c)
|
|
@@ -2342,37 +2342,37 @@ var mn = {
|
|
|
2342
2342
|
//#endregion
|
|
2343
2343
|
//#region package/common/loading/iconLoading/iconLoading.tsx
|
|
2344
2344
|
function hn({ className: e = "" }) {
|
|
2345
|
-
return /* @__PURE__ */
|
|
2345
|
+
return /* @__PURE__ */ F("div", {
|
|
2346
2346
|
className: f(mn.iconLoading, e),
|
|
2347
|
-
children: /* @__PURE__ */
|
|
2347
|
+
children: /* @__PURE__ */ I("svg", {
|
|
2348
2348
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2349
2349
|
viewBox: "-8 -1 16 14",
|
|
2350
2350
|
children: [
|
|
2351
|
-
/* @__PURE__ */
|
|
2351
|
+
/* @__PURE__ */ F("path", {
|
|
2352
2352
|
className: mn.iconLoadingFirst,
|
|
2353
2353
|
d: "M 0 0 C 3 5 6 5 6 12",
|
|
2354
2354
|
strokeWidth: "1.7",
|
|
2355
2355
|
fill: "none"
|
|
2356
2356
|
}),
|
|
2357
|
-
/* @__PURE__ */
|
|
2357
|
+
/* @__PURE__ */ F("path", {
|
|
2358
2358
|
className: mn.iconLoadingFirst,
|
|
2359
2359
|
d: "M 0 0 C -3 5 -6 5 -6 12",
|
|
2360
2360
|
strokeWidth: "1.7",
|
|
2361
2361
|
fill: "none"
|
|
2362
2362
|
}),
|
|
2363
|
-
/* @__PURE__ */
|
|
2363
|
+
/* @__PURE__ */ F("path", {
|
|
2364
2364
|
className: mn.iconLoadingFirst,
|
|
2365
2365
|
d: "M 0 0 L 0 10",
|
|
2366
2366
|
strokeWidth: "1.7",
|
|
2367
2367
|
fill: "none"
|
|
2368
2368
|
}),
|
|
2369
|
-
/* @__PURE__ */
|
|
2369
|
+
/* @__PURE__ */ F("path", {
|
|
2370
2370
|
className: mn.iconLoadingSecond,
|
|
2371
2371
|
d: "M 0.1 10 C -3 10 -4 10 -6 12",
|
|
2372
2372
|
strokeWidth: "1.7",
|
|
2373
2373
|
fill: "none"
|
|
2374
2374
|
}),
|
|
2375
|
-
/* @__PURE__ */
|
|
2375
|
+
/* @__PURE__ */ F("path", {
|
|
2376
2376
|
className: mn.iconLoadingSecond,
|
|
2377
2377
|
d: "M -0.1 10 C 3 10 4 10 6 12",
|
|
2378
2378
|
strokeWidth: "1.7",
|
|
@@ -2394,7 +2394,7 @@ function vn({ value: e, onChange: t, formValidator: n, label: r, error: i, class
|
|
|
2394
2394
|
r !== void 0 && (m === "-" && (r = -Math.abs(r)), m === "+" && (r = Math.abs(r))), n?.set(r ?? null), t?.(r);
|
|
2395
2395
|
}
|
|
2396
2396
|
let b = m === "-" ? "-" : m === "+" ? "+" : l;
|
|
2397
|
-
return /* @__PURE__ */
|
|
2397
|
+
return /* @__PURE__ */ F(it, {
|
|
2398
2398
|
label: r,
|
|
2399
2399
|
className: f(_n.numberInput, a),
|
|
2400
2400
|
value: v,
|
|
@@ -2403,7 +2403,7 @@ function vn({ value: e, onChange: t, formValidator: n, label: r, error: i, class
|
|
|
2403
2403
|
isValid: n ? n.touched ? !n.hasError() : !0 : !i,
|
|
2404
2404
|
errorMessage: n ? n.getCurrentErrorMessage() ?? "" : i ?? "",
|
|
2405
2405
|
placeholder: p,
|
|
2406
|
-
customInput: /* @__PURE__ */
|
|
2406
|
+
customInput: /* @__PURE__ */ F(xe, {
|
|
2407
2407
|
onValueChange: (e) => y(e.floatValue),
|
|
2408
2408
|
allowNegative: m == null ? o : !1,
|
|
2409
2409
|
decimalSeparator: s,
|
|
@@ -2431,16 +2431,16 @@ var yn = vn, bn = {
|
|
|
2431
2431
|
//#region package/common/optionPicker/optionPicker.tsx
|
|
2432
2432
|
function xn({ className: e = void 0, options: t, onChange: n, value: r, ...i }) {
|
|
2433
2433
|
let a = t.findIndex((e) => e.key === r) * 100 / t.length;
|
|
2434
|
-
return /* @__PURE__ */
|
|
2434
|
+
return /* @__PURE__ */ I("div", {
|
|
2435
2435
|
...i,
|
|
2436
2436
|
className: f(bn.optionPicker, e),
|
|
2437
|
-
children: [/* @__PURE__ */
|
|
2437
|
+
children: [/* @__PURE__ */ F("div", {
|
|
2438
2438
|
className: bn.optionPickerChip,
|
|
2439
2439
|
style: {
|
|
2440
2440
|
left: `${a}%`,
|
|
2441
2441
|
width: `${100 / t.length}%`
|
|
2442
2442
|
}
|
|
2443
|
-
}), t.map((e) => /* @__PURE__ */
|
|
2443
|
+
}), t.map((e) => /* @__PURE__ */ F(Re, {
|
|
2444
2444
|
onClick: (t) => n(e.key, t),
|
|
2445
2445
|
className: f(bn.optionPickerOption, e.key === r && bn.optionPickerOptionActive),
|
|
2446
2446
|
tabIndex: e.key === r ? -1 : 0,
|
|
@@ -2535,22 +2535,22 @@ function Tn({ children: e = null, overscrollContent: t = null, overscrollContent
|
|
|
2535
2535
|
x.current = null, b.current = !1, S.current(!1);
|
|
2536
2536
|
}, 500);
|
|
2537
2537
|
}
|
|
2538
|
-
if (d && !h) return n ? /* @__PURE__ */
|
|
2538
|
+
if (d && !h) return n ? /* @__PURE__ */ I("div", { children: [n, e] }) : /* @__PURE__ */ F(P, { children: e });
|
|
2539
2539
|
let O = l === "%" ? `${100 - o}%` : `calc(100% - ${o}px)`;
|
|
2540
|
-
return /* @__PURE__ */
|
|
2540
|
+
return /* @__PURE__ */ I("div", {
|
|
2541
2541
|
className: wn.overscroll,
|
|
2542
2542
|
ref: _,
|
|
2543
2543
|
onScroll: D,
|
|
2544
|
-
children: [/* @__PURE__ */
|
|
2544
|
+
children: [/* @__PURE__ */ F("div", {
|
|
2545
2545
|
className: wn.overscrollHeaderContainer,
|
|
2546
2546
|
style: { height: `${s}${l}` },
|
|
2547
2547
|
ref: y,
|
|
2548
|
-
children: /* @__PURE__ */
|
|
2548
|
+
children: /* @__PURE__ */ F("div", {
|
|
2549
2549
|
className: f(wn.overscrollHeader, r && wn.overscrollHeaderCentered),
|
|
2550
2550
|
ref: v,
|
|
2551
2551
|
children: t
|
|
2552
2552
|
})
|
|
2553
|
-
}), /* @__PURE__ */
|
|
2553
|
+
}), /* @__PURE__ */ F("div", {
|
|
2554
2554
|
style: { minHeight: O },
|
|
2555
2555
|
children: e
|
|
2556
2556
|
})]
|
|
@@ -2578,7 +2578,7 @@ function On({ className: e = void 0, total: t = 100, progress: n = 0, style: r =
|
|
|
2578
2578
|
let e = [];
|
|
2579
2579
|
return Array.isArray(n) ? e.push(...n) : typeof n == "object" ? e.push(n) : e.push({ amount: n }), e.map((n, i) => {
|
|
2580
2580
|
let a = t ? n.amount / t * 100 : 0;
|
|
2581
|
-
return /* @__PURE__ */
|
|
2581
|
+
return /* @__PURE__ */ F("div", {
|
|
2582
2582
|
className: f(En.progressBarFill, i === e.length - 1 && En.progressBarFillEnd, n.class),
|
|
2583
2583
|
style: {
|
|
2584
2584
|
width: `${a}%`,
|
|
@@ -2586,7 +2586,7 @@ function On({ className: e = void 0, total: t = 100, progress: n = 0, style: r =
|
|
|
2586
2586
|
...r || {}
|
|
2587
2587
|
},
|
|
2588
2588
|
title: n.label ? `${n.label}: ${n.amount}` : void 0,
|
|
2589
|
-
children: n.label && /* @__PURE__ */
|
|
2589
|
+
children: n.label && /* @__PURE__ */ F("div", {
|
|
2590
2590
|
className: En.progressBarLabel,
|
|
2591
2591
|
style: n.color ? { color: Dn(n.color) } : {},
|
|
2592
2592
|
children: n.label
|
|
@@ -2594,7 +2594,7 @@ function On({ className: e = void 0, total: t = 100, progress: n = 0, style: r =
|
|
|
2594
2594
|
}, i);
|
|
2595
2595
|
});
|
|
2596
2596
|
}
|
|
2597
|
-
return /* @__PURE__ */
|
|
2597
|
+
return /* @__PURE__ */ F("div", {
|
|
2598
2598
|
...i,
|
|
2599
2599
|
className: f(En.progressBar, e),
|
|
2600
2600
|
style: r,
|
|
@@ -2889,10 +2889,10 @@ var er = {
|
|
|
2889
2889
|
polygon: "Click to place corners · Click first point or Enter to close · Esc to cancel"
|
|
2890
2890
|
};
|
|
2891
2891
|
function tr({ className: e }) {
|
|
2892
|
-
let [t, n] = d([]), [r, i] = d([]), [o, c] = d("rect"), [l, m] = d(null), [g, _] = d(null), [v, y] = d(null), [b, x] = d(null), [T, E] = d([]), [ee, D] = d(null), [k,
|
|
2892
|
+
let [t, n] = d([]), [r, i] = d([]), [o, c] = d("rect"), [l, m] = d(null), [g, _] = d(null), [v, y] = d(null), [b, x] = d(null), [T, E] = d([]), [ee, D] = d(null), [k, A] = d(1), [j, M] = d({
|
|
2893
2893
|
x: 0,
|
|
2894
2894
|
y: 0
|
|
2895
|
-
}),
|
|
2895
|
+
}), re = u(null), oe = u(null), ce = u(null), N = u(null), le = u(null), ue = u({
|
|
2896
2896
|
rooms: t,
|
|
2897
2897
|
doors: r,
|
|
2898
2898
|
tool: o,
|
|
@@ -2900,10 +2900,10 @@ function tr({ className: e }) {
|
|
|
2900
2900
|
editingDoorsForRoomId: g,
|
|
2901
2901
|
polyPoints: T,
|
|
2902
2902
|
zoom: k,
|
|
2903
|
-
pan:
|
|
2903
|
+
pan: j
|
|
2904
2904
|
});
|
|
2905
2905
|
s(() => {
|
|
2906
|
-
|
|
2906
|
+
ue.current = {
|
|
2907
2907
|
rooms: t,
|
|
2908
2908
|
doors: r,
|
|
2909
2909
|
tool: o,
|
|
@@ -2911,10 +2911,10 @@ function tr({ className: e }) {
|
|
|
2911
2911
|
editingDoorsForRoomId: g,
|
|
2912
2912
|
polyPoints: T,
|
|
2913
2913
|
zoom: k,
|
|
2914
|
-
pan:
|
|
2914
|
+
pan: j
|
|
2915
2915
|
};
|
|
2916
2916
|
});
|
|
2917
|
-
function
|
|
2917
|
+
function de(e) {
|
|
2918
2918
|
e.length < 3 || (n((t) => [...t, {
|
|
2919
2919
|
id: $n("room"),
|
|
2920
2920
|
name: `Room ${t.length + 1}`,
|
|
@@ -2922,22 +2922,22 @@ function tr({ className: e }) {
|
|
|
2922
2922
|
}]), E([]), D(null));
|
|
2923
2923
|
}
|
|
2924
2924
|
a(() => {
|
|
2925
|
-
let e =
|
|
2925
|
+
let e = N.current;
|
|
2926
2926
|
if (!e) return;
|
|
2927
2927
|
function t(e) {
|
|
2928
2928
|
e.preventDefault();
|
|
2929
|
-
let { zoom: t, pan: n } =
|
|
2929
|
+
let { zoom: t, pan: n } = ue.current, r = jn(e.clientX, e.clientY, N.current);
|
|
2930
2930
|
if (!r) return;
|
|
2931
2931
|
let i = e.deltaY < 0 ? Yn : 1 / Yn, a = Math.max(Xn, Math.min(Zn, t * i));
|
|
2932
|
-
|
|
2932
|
+
M({
|
|
2933
2933
|
x: r.x - (r.x - n.x) * (t / a),
|
|
2934
2934
|
y: r.y - (r.y - n.y) * (t / a)
|
|
2935
|
-
}),
|
|
2935
|
+
}), A(a);
|
|
2936
2936
|
}
|
|
2937
2937
|
return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
|
|
2938
2938
|
}, []), a(() => {
|
|
2939
2939
|
function e(e) {
|
|
2940
|
-
let { tool: t, selectedId: r, editingDoorsForRoomId: a, polyPoints: o, zoom: s, pan: c } =
|
|
2940
|
+
let { tool: t, selectedId: r, editingDoorsForRoomId: a, polyPoints: o, zoom: s, pan: c } = ue.current;
|
|
2941
2941
|
if (e.key === "Escape") {
|
|
2942
2942
|
if (a) {
|
|
2943
2943
|
_(null);
|
|
@@ -2947,12 +2947,12 @@ function tr({ className: e }) {
|
|
|
2947
2947
|
return;
|
|
2948
2948
|
}
|
|
2949
2949
|
if (e.key === "Enter" && t === "polygon" && o.length >= 3) {
|
|
2950
|
-
|
|
2950
|
+
de(o);
|
|
2951
2951
|
return;
|
|
2952
2952
|
}
|
|
2953
2953
|
if ((e.key === "+" || e.key === "=") && !(e.target instanceof HTMLInputElement)) {
|
|
2954
2954
|
let e = Math.max(Xn, Math.min(Zn, s * Yn)), t = c.x + 400 / s / 2, n = c.y + 300 / s / 2;
|
|
2955
|
-
|
|
2955
|
+
A(e), M({
|
|
2956
2956
|
x: t - 400 / e / 2,
|
|
2957
2957
|
y: n - 300 / e / 2
|
|
2958
2958
|
});
|
|
@@ -2960,14 +2960,14 @@ function tr({ className: e }) {
|
|
|
2960
2960
|
}
|
|
2961
2961
|
if (e.key === "-" && !(e.target instanceof HTMLInputElement)) {
|
|
2962
2962
|
let e = Math.max(Xn, Math.min(Zn, s / Yn)), t = c.x + 400 / s / 2, n = c.y + 300 / s / 2;
|
|
2963
|
-
|
|
2963
|
+
A(e), M({
|
|
2964
2964
|
x: t - 400 / e / 2,
|
|
2965
2965
|
y: n - 300 / e / 2
|
|
2966
2966
|
});
|
|
2967
2967
|
return;
|
|
2968
2968
|
}
|
|
2969
2969
|
if (e.key === "0" && !(e.target instanceof HTMLInputElement)) {
|
|
2970
|
-
|
|
2970
|
+
A(1), M({
|
|
2971
2971
|
x: 0,
|
|
2972
2972
|
y: 0
|
|
2973
2973
|
});
|
|
@@ -2977,17 +2977,17 @@ function tr({ className: e }) {
|
|
|
2977
2977
|
}
|
|
2978
2978
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
2979
2979
|
}, []);
|
|
2980
|
-
function
|
|
2980
|
+
function fe(e, t = k, n = j) {
|
|
2981
2981
|
let r = Math.max(Xn, Math.min(Zn, t * e)), i = n.x + 400 / t / 2, a = n.y + 300 / t / 2;
|
|
2982
|
-
|
|
2982
|
+
M({
|
|
2983
2983
|
x: i - 400 / r / 2,
|
|
2984
2984
|
y: a - 300 / r / 2
|
|
2985
|
-
}),
|
|
2985
|
+
}), A(r);
|
|
2986
2986
|
}
|
|
2987
|
-
function
|
|
2988
|
-
return
|
|
2987
|
+
function pe(e) {
|
|
2988
|
+
return N.current ? jn(e.clientX, e.clientY, N.current) : null;
|
|
2989
2989
|
}
|
|
2990
|
-
function
|
|
2990
|
+
function me(e, t) {
|
|
2991
2991
|
let n = null;
|
|
2992
2992
|
for (let r = 0; r < t.points.length; r++) {
|
|
2993
2993
|
let i = Mn(e, t.points[r]);
|
|
@@ -2998,7 +2998,7 @@ function tr({ className: e }) {
|
|
|
2998
2998
|
}
|
|
2999
2999
|
return n;
|
|
3000
3000
|
}
|
|
3001
|
-
function
|
|
3001
|
+
function L(e, t) {
|
|
3002
3002
|
let n = null;
|
|
3003
3003
|
for (let r = 0; r < t.points.length; r++) {
|
|
3004
3004
|
let i = t.points[r], a = t.points[(r + 1) % t.points.length], { dist: o, t: s } = Nn(e, i, a);
|
|
@@ -3010,7 +3010,7 @@ function tr({ className: e }) {
|
|
|
3010
3010
|
}
|
|
3011
3011
|
return n;
|
|
3012
3012
|
}
|
|
3013
|
-
function
|
|
3013
|
+
function he(e, t, r, a) {
|
|
3014
3014
|
return n((n) => n.map((n) => {
|
|
3015
3015
|
if (n.id !== e) return n;
|
|
3016
3016
|
let r = [...n.points];
|
|
@@ -3030,7 +3030,7 @@ function tr({ className: e }) {
|
|
|
3030
3030
|
wallIndex: n.wallIndex + 1
|
|
3031
3031
|
} : n : n)), t + 1;
|
|
3032
3032
|
}
|
|
3033
|
-
function
|
|
3033
|
+
function ge(e, r) {
|
|
3034
3034
|
let a = t.find((t) => t.id === e);
|
|
3035
3035
|
if (!a || a.points.length <= 3) return;
|
|
3036
3036
|
let o = a.points.length;
|
|
@@ -3049,18 +3049,18 @@ function tr({ className: e }) {
|
|
|
3049
3049
|
} : t;
|
|
3050
3050
|
}).filter((e) => e.wallIndex !== -1));
|
|
3051
3051
|
}
|
|
3052
|
-
function
|
|
3052
|
+
function R(e) {
|
|
3053
3053
|
if (e.button === 1) {
|
|
3054
3054
|
e.preventDefault();
|
|
3055
|
-
let t =
|
|
3055
|
+
let t = N.current;
|
|
3056
3056
|
if (t) {
|
|
3057
3057
|
let n = t.getBoundingClientRect();
|
|
3058
|
-
|
|
3058
|
+
ce.current = {
|
|
3059
3059
|
startClient: {
|
|
3060
3060
|
x: e.clientX,
|
|
3061
3061
|
y: e.clientY
|
|
3062
3062
|
},
|
|
3063
|
-
origPan: { ...
|
|
3063
|
+
origPan: { ...j },
|
|
3064
3064
|
scaleX: 400 / k / n.width,
|
|
3065
3065
|
scaleY: 300 / k / n.height
|
|
3066
3066
|
};
|
|
@@ -3069,7 +3069,7 @@ function tr({ className: e }) {
|
|
|
3069
3069
|
}
|
|
3070
3070
|
if (e.button !== 0) return;
|
|
3071
3071
|
e.preventDefault();
|
|
3072
|
-
let n =
|
|
3072
|
+
let n = pe(e);
|
|
3073
3073
|
if (n) {
|
|
3074
3074
|
if (g) {
|
|
3075
3075
|
let e = t.find((e) => e.id === g);
|
|
@@ -3090,15 +3090,15 @@ function tr({ className: e }) {
|
|
|
3090
3090
|
return;
|
|
3091
3091
|
}
|
|
3092
3092
|
if (o === "polygon") {
|
|
3093
|
-
T.length >= 3 && Mn(n, T[0]) <= 8 ?
|
|
3093
|
+
T.length >= 3 && Mn(n, T[0]) <= 8 ? de(T) : E((e) => [...e, n]);
|
|
3094
3094
|
return;
|
|
3095
3095
|
}
|
|
3096
3096
|
if (o === "select") {
|
|
3097
3097
|
let e = t.find((e) => e.id === l) ?? null;
|
|
3098
3098
|
if (e) {
|
|
3099
|
-
let t =
|
|
3099
|
+
let t = me(n, e);
|
|
3100
3100
|
if (t) {
|
|
3101
|
-
|
|
3101
|
+
re.current = {
|
|
3102
3102
|
type: "vertex",
|
|
3103
3103
|
roomId: e.id,
|
|
3104
3104
|
index: t.index,
|
|
@@ -3109,13 +3109,13 @@ function tr({ className: e }) {
|
|
|
3109
3109
|
}
|
|
3110
3110
|
}
|
|
3111
3111
|
if (e) {
|
|
3112
|
-
let t =
|
|
3112
|
+
let t = L(n, e);
|
|
3113
3113
|
if (t) {
|
|
3114
3114
|
let r = e.points[t.index], i = e.points[(t.index + 1) % e.points.length], a = An({
|
|
3115
3115
|
x: r.x + (i.x - r.x) * t.t,
|
|
3116
3116
|
y: r.y + (i.y - r.y) * t.t
|
|
3117
|
-
}), o =
|
|
3118
|
-
|
|
3117
|
+
}), o = he(e.id, t.index, t.t, a);
|
|
3118
|
+
re.current = {
|
|
3119
3119
|
type: "vertex",
|
|
3120
3120
|
roomId: e.id,
|
|
3121
3121
|
index: o,
|
|
@@ -3127,7 +3127,7 @@ function tr({ className: e }) {
|
|
|
3127
3127
|
}
|
|
3128
3128
|
let r = t.find((e) => Fn(n, e.points));
|
|
3129
3129
|
if (r) {
|
|
3130
|
-
m(r.id),
|
|
3130
|
+
m(r.id), re.current = {
|
|
3131
3131
|
type: "room",
|
|
3132
3132
|
roomId: r.id,
|
|
3133
3133
|
start: n,
|
|
@@ -3139,31 +3139,31 @@ function tr({ className: e }) {
|
|
|
3139
3139
|
}
|
|
3140
3140
|
}
|
|
3141
3141
|
}
|
|
3142
|
-
function
|
|
3142
|
+
function _e(e) {
|
|
3143
3143
|
if (o !== "select" || g) return;
|
|
3144
|
-
let n =
|
|
3144
|
+
let n = pe(e);
|
|
3145
3145
|
if (!n) return;
|
|
3146
3146
|
let r = t.find((e) => e.id === l);
|
|
3147
3147
|
if (!r) return;
|
|
3148
|
-
let i =
|
|
3149
|
-
i && (e.preventDefault(),
|
|
3148
|
+
let i = me(n, r);
|
|
3149
|
+
i && (e.preventDefault(), ge(r.id, i.index));
|
|
3150
3150
|
}
|
|
3151
|
-
function
|
|
3152
|
-
if (
|
|
3153
|
-
let { startClient: t, origPan: n, scaleX: r, scaleY: i } =
|
|
3154
|
-
|
|
3151
|
+
function ve(e) {
|
|
3152
|
+
if (ce.current) {
|
|
3153
|
+
let { startClient: t, origPan: n, scaleX: r, scaleY: i } = ce.current;
|
|
3154
|
+
M({
|
|
3155
3155
|
x: n.x - (e.clientX - t.x) * r,
|
|
3156
3156
|
y: n.y - (e.clientY - t.y) * i
|
|
3157
3157
|
});
|
|
3158
3158
|
return;
|
|
3159
3159
|
}
|
|
3160
|
-
let r =
|
|
3160
|
+
let r = pe(e);
|
|
3161
3161
|
if (r) {
|
|
3162
|
-
if (
|
|
3162
|
+
if (oe.current && g) {
|
|
3163
3163
|
let e = t.find((e) => e.id === g);
|
|
3164
3164
|
if (e) {
|
|
3165
3165
|
let t = Pn(r, [e]);
|
|
3166
|
-
t && i((e) => e.map((e) => e.id ===
|
|
3166
|
+
t && i((e) => e.map((e) => e.id === oe.current ? {
|
|
3167
3167
|
...e,
|
|
3168
3168
|
wallIndex: t.wallIndex,
|
|
3169
3169
|
t: t.t
|
|
@@ -3179,8 +3179,8 @@ function tr({ className: e }) {
|
|
|
3179
3179
|
D(r);
|
|
3180
3180
|
return;
|
|
3181
3181
|
}
|
|
3182
|
-
if (o === "select" && !g &&
|
|
3183
|
-
let e =
|
|
3182
|
+
if (o === "select" && !g && re.current) {
|
|
3183
|
+
let e = re.current;
|
|
3184
3184
|
if (e.type === "vertex") {
|
|
3185
3185
|
let t = r.x - e.start.x, i = r.y - e.start.y, a = An({
|
|
3186
3186
|
x: e.origPt.x + t,
|
|
@@ -3207,12 +3207,12 @@ function tr({ className: e }) {
|
|
|
3207
3207
|
}
|
|
3208
3208
|
}
|
|
3209
3209
|
}
|
|
3210
|
-
function
|
|
3211
|
-
if (
|
|
3212
|
-
|
|
3210
|
+
function z(e) {
|
|
3211
|
+
if (ce.current) {
|
|
3212
|
+
ce.current = null;
|
|
3213
3213
|
return;
|
|
3214
3214
|
}
|
|
3215
|
-
let t =
|
|
3215
|
+
let t = pe(e);
|
|
3216
3216
|
if (t) {
|
|
3217
3217
|
if (o === "rect" && v) {
|
|
3218
3218
|
let e = Math.min(v.x, t.x), r = Math.min(v.y, t.y), i = Math.abs(t.x - v.x), a = Math.abs(t.y - v.y);
|
|
@@ -3222,32 +3222,32 @@ function tr({ className: e }) {
|
|
|
3222
3222
|
points: Ln(e, r, i, a)
|
|
3223
3223
|
}]), y(null), x(null);
|
|
3224
3224
|
}
|
|
3225
|
-
|
|
3225
|
+
oe.current = null, re.current = null;
|
|
3226
3226
|
}
|
|
3227
3227
|
}
|
|
3228
|
-
function
|
|
3228
|
+
function ye(e) {
|
|
3229
3229
|
l && n((t) => t.map((t) => t.id === l ? {
|
|
3230
3230
|
...t,
|
|
3231
3231
|
name: e
|
|
3232
3232
|
} : t));
|
|
3233
3233
|
}
|
|
3234
|
-
function
|
|
3234
|
+
function be(e, t) {
|
|
3235
3235
|
let n = parseFloat(t);
|
|
3236
3236
|
isNaN(n) || n <= 0 || i((t) => t.map((t) => t.id === e ? {
|
|
3237
3237
|
...t,
|
|
3238
3238
|
width: n
|
|
3239
3239
|
} : t));
|
|
3240
3240
|
}
|
|
3241
|
-
function
|
|
3241
|
+
function xe() {
|
|
3242
3242
|
l && (n((e) => e.filter((e) => e.id !== l)), i((e) => e.filter((e) => e.roomId !== l)), _(null), m(null));
|
|
3243
3243
|
}
|
|
3244
|
-
function
|
|
3244
|
+
function Se(e) {
|
|
3245
3245
|
i((t) => t.filter((t) => t.id !== e));
|
|
3246
3246
|
}
|
|
3247
|
-
function
|
|
3247
|
+
function Ce(e) {
|
|
3248
3248
|
c(e), _(null), E([]), D(null), y(null), x(null);
|
|
3249
3249
|
}
|
|
3250
|
-
function
|
|
3250
|
+
function we(e) {
|
|
3251
3251
|
let t = e.target.files?.[0];
|
|
3252
3252
|
if (!t) return;
|
|
3253
3253
|
e.target.value = "";
|
|
@@ -3259,18 +3259,18 @@ function tr({ className: e }) {
|
|
|
3259
3259
|
r.length !== 0 && (n(r.map((e) => ({
|
|
3260
3260
|
...e,
|
|
3261
3261
|
id: $n("room")
|
|
3262
|
-
}))), i([]), m(null), _(null),
|
|
3262
|
+
}))), i([]), m(null), _(null), A(1), M({
|
|
3263
3263
|
x: 0,
|
|
3264
3264
|
y: 0
|
|
3265
3265
|
}));
|
|
3266
3266
|
}, r.readAsText(t);
|
|
3267
3267
|
}
|
|
3268
|
-
let
|
|
3268
|
+
let B = o === "rect" && v && b ? {
|
|
3269
3269
|
x: Math.min(v.x, b.x),
|
|
3270
3270
|
y: Math.min(v.y, b.y),
|
|
3271
3271
|
w: Math.abs(b.x - v.x),
|
|
3272
3272
|
h: Math.abs(b.y - v.y)
|
|
3273
|
-
} : null,
|
|
3273
|
+
} : null, Te = l ? t.find((e) => e.id === l) ?? null : null, Ee = g ? t.find((e) => e.id === g) ?? null : null, De = g ? r.filter((e) => e.roomId === g) : [], V = [
|
|
3274
3274
|
{
|
|
3275
3275
|
t: "select",
|
|
3276
3276
|
icon: O,
|
|
@@ -3278,7 +3278,7 @@ function tr({ className: e }) {
|
|
|
3278
3278
|
},
|
|
3279
3279
|
{
|
|
3280
3280
|
t: "rect",
|
|
3281
|
-
icon:
|
|
3281
|
+
icon: ie,
|
|
3282
3282
|
label: "Rectangle room"
|
|
3283
3283
|
},
|
|
3284
3284
|
{
|
|
@@ -3286,107 +3286,107 @@ function tr({ className: e }) {
|
|
|
3286
3286
|
icon: w,
|
|
3287
3287
|
label: "Polygon room"
|
|
3288
3288
|
}
|
|
3289
|
-
],
|
|
3290
|
-
return /* @__PURE__ */
|
|
3289
|
+
], Oe = 400 / k, ke = 300 / k, Ae = g ? Z.roomDrawerCanvasDoor : o === "select" ? Z.roomDrawerCanvasSelect : void 0;
|
|
3290
|
+
return /* @__PURE__ */ I("div", {
|
|
3291
3291
|
className: f(Z.roomDrawer, e),
|
|
3292
3292
|
children: [
|
|
3293
|
-
/* @__PURE__ */
|
|
3293
|
+
/* @__PURE__ */ I("div", {
|
|
3294
3294
|
className: Z.roomDrawerToolbar,
|
|
3295
3295
|
children: [
|
|
3296
|
-
|
|
3296
|
+
V.map(({ t: e, icon: t, label: n }) => /* @__PURE__ */ F("button", {
|
|
3297
3297
|
title: n,
|
|
3298
3298
|
className: f(Z.roomDrawerToolbarBtn, e === o && !g && Z.roomDrawerToolbarBtnActive),
|
|
3299
|
-
onClick: () =>
|
|
3300
|
-
children: /* @__PURE__ */
|
|
3299
|
+
onClick: () => Ce(e),
|
|
3300
|
+
children: /* @__PURE__ */ F(p, { icon: t })
|
|
3301
3301
|
}, e)),
|
|
3302
|
-
/* @__PURE__ */
|
|
3303
|
-
/* @__PURE__ */
|
|
3302
|
+
/* @__PURE__ */ F("div", { className: Z.roomDrawerToolbarSep }),
|
|
3303
|
+
/* @__PURE__ */ F("button", {
|
|
3304
3304
|
title: "Zoom in (+)",
|
|
3305
3305
|
className: Z.roomDrawerToolbarBtn,
|
|
3306
|
-
onClick: () =>
|
|
3306
|
+
onClick: () => fe(Yn),
|
|
3307
3307
|
disabled: k >= Zn,
|
|
3308
|
-
children: /* @__PURE__ */
|
|
3308
|
+
children: /* @__PURE__ */ F(p, { icon: ne })
|
|
3309
3309
|
}),
|
|
3310
|
-
/* @__PURE__ */
|
|
3310
|
+
/* @__PURE__ */ I("button", {
|
|
3311
3311
|
title: `Reset zoom (0) — ${Math.round(k * 100)}%`,
|
|
3312
3312
|
className: Z.roomDrawerToolbarZoomLabel,
|
|
3313
3313
|
onClick: () => {
|
|
3314
|
-
|
|
3314
|
+
A(1), M({
|
|
3315
3315
|
x: 0,
|
|
3316
3316
|
y: 0
|
|
3317
3317
|
});
|
|
3318
3318
|
},
|
|
3319
3319
|
children: [Math.round(k * 100), "%"]
|
|
3320
3320
|
}),
|
|
3321
|
-
/* @__PURE__ */
|
|
3321
|
+
/* @__PURE__ */ F("button", {
|
|
3322
3322
|
title: "Zoom out (−)",
|
|
3323
3323
|
className: Z.roomDrawerToolbarBtn,
|
|
3324
|
-
onClick: () =>
|
|
3324
|
+
onClick: () => fe(1 / Yn),
|
|
3325
3325
|
disabled: k <= Xn,
|
|
3326
|
-
children: /* @__PURE__ */
|
|
3326
|
+
children: /* @__PURE__ */ F(p, { icon: te })
|
|
3327
3327
|
}),
|
|
3328
|
-
/* @__PURE__ */
|
|
3329
|
-
/* @__PURE__ */
|
|
3328
|
+
/* @__PURE__ */ F("div", { className: Z.roomDrawerToolbarSep }),
|
|
3329
|
+
/* @__PURE__ */ F("button", {
|
|
3330
3330
|
title: "Upload SVG",
|
|
3331
3331
|
className: Z.roomDrawerToolbarBtn,
|
|
3332
|
-
onClick: () =>
|
|
3333
|
-
children: /* @__PURE__ */
|
|
3332
|
+
onClick: () => le.current?.click(),
|
|
3333
|
+
children: /* @__PURE__ */ F(p, { icon: se })
|
|
3334
3334
|
}),
|
|
3335
|
-
/* @__PURE__ */
|
|
3335
|
+
/* @__PURE__ */ F("button", {
|
|
3336
3336
|
title: "Download SVG",
|
|
3337
3337
|
className: Z.roomDrawerToolbarBtn,
|
|
3338
3338
|
onClick: () => Kn(t, r),
|
|
3339
3339
|
disabled: t.length === 0,
|
|
3340
|
-
children: /* @__PURE__ */
|
|
3340
|
+
children: /* @__PURE__ */ F(p, { icon: C })
|
|
3341
3341
|
}),
|
|
3342
|
-
/* @__PURE__ */
|
|
3343
|
-
ref:
|
|
3342
|
+
/* @__PURE__ */ F("input", {
|
|
3343
|
+
ref: le,
|
|
3344
3344
|
type: "file",
|
|
3345
3345
|
accept: ".svg,image/svg+xml",
|
|
3346
3346
|
style: { display: "none" },
|
|
3347
|
-
onChange:
|
|
3347
|
+
onChange: we
|
|
3348
3348
|
})
|
|
3349
3349
|
]
|
|
3350
3350
|
}),
|
|
3351
|
-
/* @__PURE__ */
|
|
3352
|
-
ref:
|
|
3353
|
-
className: f(Z.roomDrawerCanvas,
|
|
3354
|
-
viewBox: `${
|
|
3355
|
-
onMouseDown:
|
|
3356
|
-
onMouseMove:
|
|
3357
|
-
onMouseUp:
|
|
3358
|
-
onDoubleClick:
|
|
3351
|
+
/* @__PURE__ */ I("svg", {
|
|
3352
|
+
ref: N,
|
|
3353
|
+
className: f(Z.roomDrawerCanvas, Ae),
|
|
3354
|
+
viewBox: `${j.x} ${j.y} ${Oe} ${ke}`,
|
|
3355
|
+
onMouseDown: R,
|
|
3356
|
+
onMouseMove: ve,
|
|
3357
|
+
onMouseUp: z,
|
|
3358
|
+
onDoubleClick: _e,
|
|
3359
3359
|
children: [
|
|
3360
|
-
/* @__PURE__ */
|
|
3360
|
+
/* @__PURE__ */ F("defs", { children: /* @__PURE__ */ F("pattern", {
|
|
3361
3361
|
id: "rd-grid",
|
|
3362
3362
|
width: 5,
|
|
3363
3363
|
height: 5,
|
|
3364
3364
|
patternUnits: "userSpaceOnUse",
|
|
3365
|
-
children: /* @__PURE__ */
|
|
3365
|
+
children: /* @__PURE__ */ F("path", {
|
|
3366
3366
|
d: "M 5 0 L 0 0 0 5",
|
|
3367
3367
|
fill: "none",
|
|
3368
3368
|
className: Z.gridLine
|
|
3369
3369
|
})
|
|
3370
3370
|
}) }),
|
|
3371
|
-
/* @__PURE__ */
|
|
3372
|
-
x:
|
|
3373
|
-
y:
|
|
3374
|
-
width:
|
|
3375
|
-
height:
|
|
3371
|
+
/* @__PURE__ */ F("rect", {
|
|
3372
|
+
x: j.x,
|
|
3373
|
+
y: j.y,
|
|
3374
|
+
width: Oe,
|
|
3375
|
+
height: ke,
|
|
3376
3376
|
fill: "url(#rd-grid)"
|
|
3377
3377
|
}),
|
|
3378
3378
|
t.map((e) => {
|
|
3379
3379
|
let t = e.points, n = t.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x},${e.y}`).join(" ") + " Z", i = Vn(t, r.filter((t) => t.roomId === e.id)), a = In(t), o = l === e.id, s = g === e.id;
|
|
3380
|
-
return /* @__PURE__ */
|
|
3381
|
-
/* @__PURE__ */
|
|
3380
|
+
return /* @__PURE__ */ I("g", { children: [
|
|
3381
|
+
/* @__PURE__ */ F("path", {
|
|
3382
3382
|
d: n,
|
|
3383
3383
|
className: f(Z.roomFill, (o || s) && Z.roomFillSelected)
|
|
3384
3384
|
}),
|
|
3385
|
-
i.map((e, t) => /* @__PURE__ */
|
|
3385
|
+
i.map((e, t) => /* @__PURE__ */ F("path", {
|
|
3386
3386
|
d: e,
|
|
3387
3387
|
className: f(Z.roomStroke, (o || s) && Z.roomStrokeSelected)
|
|
3388
3388
|
}, t)),
|
|
3389
|
-
e.name && /* @__PURE__ */
|
|
3389
|
+
e.name && /* @__PURE__ */ F("text", {
|
|
3390
3390
|
x: a.x,
|
|
3391
3391
|
y: a.y,
|
|
3392
3392
|
className: Z.roomText,
|
|
@@ -3400,7 +3400,7 @@ function tr({ className: e }) {
|
|
|
3400
3400
|
let n = t.find((t) => t.id === e.roomId);
|
|
3401
3401
|
if (!n) return null;
|
|
3402
3402
|
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a = Rn(r, i, e.t, e.width);
|
|
3403
|
-
return a ? /* @__PURE__ */
|
|
3403
|
+
return a ? /* @__PURE__ */ F("line", {
|
|
3404
3404
|
x1: a.p1.x,
|
|
3405
3405
|
y1: a.p1.y,
|
|
3406
3406
|
x2: a.p2.x,
|
|
@@ -3408,7 +3408,7 @@ function tr({ className: e }) {
|
|
|
3408
3408
|
className: Z.doorGap
|
|
3409
3409
|
}, e.id) : null;
|
|
3410
3410
|
}),
|
|
3411
|
-
g &&
|
|
3411
|
+
g && De.map((e) => {
|
|
3412
3412
|
let n = t.find((t) => t.id === e.roomId);
|
|
3413
3413
|
if (!n) return null;
|
|
3414
3414
|
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a = Rn(r, i, e.t, e.width);
|
|
@@ -3417,41 +3417,41 @@ function tr({ className: e }) {
|
|
|
3417
3417
|
x: (a.p1.x + a.p2.x) / 2,
|
|
3418
3418
|
y: (a.p1.y + a.p2.y) / 2
|
|
3419
3419
|
};
|
|
3420
|
-
return /* @__PURE__ */
|
|
3420
|
+
return /* @__PURE__ */ F("circle", {
|
|
3421
3421
|
cx: o.x,
|
|
3422
3422
|
cy: o.y,
|
|
3423
3423
|
r: 2.5,
|
|
3424
3424
|
className: Z.doorMarker,
|
|
3425
3425
|
onMouseDown: (t) => {
|
|
3426
|
-
t.button === 0 && (t.preventDefault(), t.stopPropagation(),
|
|
3426
|
+
t.button === 0 && (t.preventDefault(), t.stopPropagation(), oe.current = e.id);
|
|
3427
3427
|
}
|
|
3428
3428
|
}, e.id);
|
|
3429
3429
|
}),
|
|
3430
|
-
o === "select" && !g &&
|
|
3430
|
+
o === "select" && !g && Te && Te.points.map((e, t) => /* @__PURE__ */ F("circle", {
|
|
3431
3431
|
cx: e.x,
|
|
3432
3432
|
cy: e.y,
|
|
3433
3433
|
r: 3.5,
|
|
3434
3434
|
className: Z.vertexHandle
|
|
3435
3435
|
}, t)),
|
|
3436
|
-
|
|
3437
|
-
x:
|
|
3438
|
-
y:
|
|
3439
|
-
width:
|
|
3440
|
-
height:
|
|
3436
|
+
B && /* @__PURE__ */ F("rect", {
|
|
3437
|
+
x: B.x,
|
|
3438
|
+
y: B.y,
|
|
3439
|
+
width: B.w,
|
|
3440
|
+
height: B.h,
|
|
3441
3441
|
className: Z.preview
|
|
3442
3442
|
}),
|
|
3443
|
-
o === "polygon" && T.length > 0 && /* @__PURE__ */
|
|
3444
|
-
/* @__PURE__ */
|
|
3443
|
+
o === "polygon" && T.length > 0 && /* @__PURE__ */ I(P, { children: [
|
|
3444
|
+
/* @__PURE__ */ F("polyline", {
|
|
3445
3445
|
points: [...T, ee ?? T[T.length - 1]].map((e) => `${e.x},${e.y}`).join(" "),
|
|
3446
3446
|
className: Z.preview
|
|
3447
3447
|
}),
|
|
3448
|
-
T.length >= 3 && /* @__PURE__ */
|
|
3448
|
+
T.length >= 3 && /* @__PURE__ */ F("circle", {
|
|
3449
3449
|
cx: T[0].x,
|
|
3450
3450
|
cy: T[0].y,
|
|
3451
3451
|
r: 8 / 2,
|
|
3452
3452
|
className: Z.polyCloseTarget
|
|
3453
3453
|
}),
|
|
3454
|
-
T.map((e, t) => /* @__PURE__ */
|
|
3454
|
+
T.map((e, t) => /* @__PURE__ */ F("circle", {
|
|
3455
3455
|
cx: e.x,
|
|
3456
3456
|
cy: e.y,
|
|
3457
3457
|
r: 2,
|
|
@@ -3460,87 +3460,87 @@ function tr({ className: e }) {
|
|
|
3460
3460
|
] })
|
|
3461
3461
|
]
|
|
3462
3462
|
}),
|
|
3463
|
-
|
|
3463
|
+
Te && !g && /* @__PURE__ */ I("div", {
|
|
3464
3464
|
className: Z.roomDrawerInfo,
|
|
3465
3465
|
children: [
|
|
3466
|
-
/* @__PURE__ */
|
|
3466
|
+
/* @__PURE__ */ F("span", {
|
|
3467
3467
|
className: Z.roomDrawerInfoLabel,
|
|
3468
3468
|
children: "Name"
|
|
3469
3469
|
}),
|
|
3470
|
-
/* @__PURE__ */
|
|
3470
|
+
/* @__PURE__ */ F("input", {
|
|
3471
3471
|
className: Z.roomDrawerInfoInput,
|
|
3472
|
-
value:
|
|
3473
|
-
onChange: (e) =>
|
|
3472
|
+
value: Te.name,
|
|
3473
|
+
onChange: (e) => ye(e.target.value),
|
|
3474
3474
|
placeholder: "Room name"
|
|
3475
3475
|
}),
|
|
3476
|
-
/* @__PURE__ */
|
|
3476
|
+
/* @__PURE__ */ I("button", {
|
|
3477
3477
|
className: Z.roomDrawerInfoDoorsBtn,
|
|
3478
|
-
onClick: () => _(
|
|
3478
|
+
onClick: () => _(Te.id),
|
|
3479
3479
|
title: "Edit doors",
|
|
3480
|
-
children: [/* @__PURE__ */
|
|
3480
|
+
children: [/* @__PURE__ */ F(p, { icon: S }), /* @__PURE__ */ F("span", { children: r.filter((e) => e.roomId === Te.id).length })]
|
|
3481
3481
|
}),
|
|
3482
|
-
/* @__PURE__ */
|
|
3482
|
+
/* @__PURE__ */ F("button", {
|
|
3483
3483
|
className: Z.roomDrawerInfoDelete,
|
|
3484
|
-
onClick:
|
|
3484
|
+
onClick: xe,
|
|
3485
3485
|
title: "Delete room",
|
|
3486
|
-
children: /* @__PURE__ */
|
|
3486
|
+
children: /* @__PURE__ */ F(p, { icon: ae })
|
|
3487
3487
|
})
|
|
3488
3488
|
]
|
|
3489
3489
|
}),
|
|
3490
|
-
g &&
|
|
3490
|
+
g && Ee && /* @__PURE__ */ I("div", {
|
|
3491
3491
|
className: Z.roomDrawerDoorPanel,
|
|
3492
|
-
children: [/* @__PURE__ */
|
|
3492
|
+
children: [/* @__PURE__ */ I("div", {
|
|
3493
3493
|
className: Z.roomDrawerDoorPanelHeader,
|
|
3494
3494
|
children: [
|
|
3495
|
-
/* @__PURE__ */
|
|
3495
|
+
/* @__PURE__ */ F(p, {
|
|
3496
3496
|
icon: S,
|
|
3497
3497
|
className: Z.roomDrawerDoorPanelIcon
|
|
3498
3498
|
}),
|
|
3499
|
-
/* @__PURE__ */
|
|
3499
|
+
/* @__PURE__ */ F("span", {
|
|
3500
3500
|
className: Z.roomDrawerDoorPanelTitle,
|
|
3501
|
-
children:
|
|
3501
|
+
children: Ee.name ? `Doors · ${Ee.name}` : "Doors"
|
|
3502
3502
|
}),
|
|
3503
|
-
/* @__PURE__ */
|
|
3503
|
+
/* @__PURE__ */ I("button", {
|
|
3504
3504
|
className: Z.roomDrawerDoorPanelDone,
|
|
3505
3505
|
onClick: () => _(null),
|
|
3506
3506
|
title: "Done (Esc)",
|
|
3507
|
-
children: [/* @__PURE__ */
|
|
3507
|
+
children: [/* @__PURE__ */ F(p, { icon: h }), "Done"]
|
|
3508
3508
|
})
|
|
3509
3509
|
]
|
|
3510
|
-
}), /* @__PURE__ */
|
|
3510
|
+
}), /* @__PURE__ */ I("div", {
|
|
3511
3511
|
className: Z.roomDrawerDoorPanelList,
|
|
3512
|
-
children: [
|
|
3512
|
+
children: [De.length === 0 && /* @__PURE__ */ F("span", {
|
|
3513
3513
|
className: Z.roomDrawerDoorPanelEmpty,
|
|
3514
3514
|
children: "Click on a wall to add a door"
|
|
3515
|
-
}),
|
|
3515
|
+
}), De.map((e, t) => /* @__PURE__ */ I("div", {
|
|
3516
3516
|
className: Z.roomDrawerDoorPanelItem,
|
|
3517
3517
|
children: [
|
|
3518
|
-
/* @__PURE__ */
|
|
3518
|
+
/* @__PURE__ */ I("span", {
|
|
3519
3519
|
className: Z.roomDrawerDoorPanelLabel,
|
|
3520
3520
|
children: ["Door ", t + 1]
|
|
3521
3521
|
}),
|
|
3522
|
-
/* @__PURE__ */
|
|
3522
|
+
/* @__PURE__ */ F("span", {
|
|
3523
3523
|
className: Z.roomDrawerDoorPanelWidthLabel,
|
|
3524
3524
|
children: "Width"
|
|
3525
3525
|
}),
|
|
3526
|
-
/* @__PURE__ */
|
|
3526
|
+
/* @__PURE__ */ F("input", {
|
|
3527
3527
|
className: Z.roomDrawerInfoInput,
|
|
3528
3528
|
type: "number",
|
|
3529
3529
|
min: 1,
|
|
3530
3530
|
value: e.width,
|
|
3531
|
-
onChange: (t) =>
|
|
3531
|
+
onChange: (t) => be(e.id, t.target.value)
|
|
3532
3532
|
}),
|
|
3533
|
-
/* @__PURE__ */
|
|
3533
|
+
/* @__PURE__ */ F("button", {
|
|
3534
3534
|
className: Z.roomDrawerInfoDelete,
|
|
3535
|
-
onClick: () =>
|
|
3535
|
+
onClick: () => Se(e.id),
|
|
3536
3536
|
title: "Delete door",
|
|
3537
|
-
children: /* @__PURE__ */
|
|
3537
|
+
children: /* @__PURE__ */ F(p, { icon: ae })
|
|
3538
3538
|
})
|
|
3539
3539
|
]
|
|
3540
3540
|
}, e.id))]
|
|
3541
3541
|
})]
|
|
3542
3542
|
}),
|
|
3543
|
-
/* @__PURE__ */
|
|
3543
|
+
/* @__PURE__ */ F("div", {
|
|
3544
3544
|
className: Z.roomDrawerHint,
|
|
3545
3545
|
children: g ? "Click a wall to add a door · Adjust width or delete from the list · Done or Esc to finish" : `${er[o]} · Scroll to zoom · Middle-drag to pan · 0 to reset`
|
|
3546
3546
|
})
|
|
@@ -3605,27 +3605,27 @@ function rr({ data: e = [] }) {
|
|
|
3605
3605
|
});
|
|
3606
3606
|
}
|
|
3607
3607
|
let m = e[r]?.data ?? null;
|
|
3608
|
-
return /* @__PURE__ */
|
|
3608
|
+
return /* @__PURE__ */ I("div", {
|
|
3609
3609
|
className: nr.roomViewer,
|
|
3610
3610
|
ref: t,
|
|
3611
3611
|
children: [
|
|
3612
|
-
/* @__PURE__ */
|
|
3612
|
+
/* @__PURE__ */ F("h3", {
|
|
3613
3613
|
className: nr.roomViewerHeader,
|
|
3614
3614
|
children: e[r]?.label ?? ""
|
|
3615
3615
|
}),
|
|
3616
|
-
/* @__PURE__ */
|
|
3616
|
+
/* @__PURE__ */ F("div", {
|
|
3617
3617
|
className: f(nr.roomViewerContainer, o && nr.roomViewerContainerLoading),
|
|
3618
3618
|
children: m
|
|
3619
3619
|
}, r),
|
|
3620
|
-
e.length > 1 && /* @__PURE__ */
|
|
3620
|
+
e.length > 1 && /* @__PURE__ */ I("div", {
|
|
3621
3621
|
className: nr.roomViewerActions,
|
|
3622
3622
|
children: [
|
|
3623
|
-
/* @__PURE__ */
|
|
3623
|
+
/* @__PURE__ */ F(p, {
|
|
3624
3624
|
icon: _,
|
|
3625
3625
|
onClick: () => l(-1)
|
|
3626
3626
|
}),
|
|
3627
|
-
/* @__PURE__ */
|
|
3628
|
-
/* @__PURE__ */
|
|
3627
|
+
/* @__PURE__ */ F(p, { icon: k }),
|
|
3628
|
+
/* @__PURE__ */ F(p, {
|
|
3629
3629
|
icon: v,
|
|
3630
3630
|
onClick: () => l(1)
|
|
3631
3631
|
})
|
|
@@ -3638,7 +3638,7 @@ var ir = { scrollbarProvider: "scrollbarProvider_IMBFu" };
|
|
|
3638
3638
|
//#endregion
|
|
3639
3639
|
//#region package/common/scrollbarProvider/scrollbarProvider.tsx
|
|
3640
3640
|
function ar({ className: e = void 0, children: t = void 0 }) {
|
|
3641
|
-
return /* @__PURE__ */
|
|
3641
|
+
return /* @__PURE__ */ F("div", {
|
|
3642
3642
|
className: f(ir.scrollbarProvider, e),
|
|
3643
3643
|
children: t
|
|
3644
3644
|
});
|
|
@@ -3660,17 +3660,17 @@ function cr({ value: e, onChange: t, onDebounce: n, placeholder: r, label: i, de
|
|
|
3660
3660
|
}, o);
|
|
3661
3661
|
}
|
|
3662
3662
|
let h = c && typeof s == "number" && !Number.isNaN(s);
|
|
3663
|
-
return /* @__PURE__ */
|
|
3663
|
+
return /* @__PURE__ */ I("div", {
|
|
3664
3664
|
...f,
|
|
3665
3665
|
className: l,
|
|
3666
3666
|
style: d == null ? void 0 : { width: d },
|
|
3667
|
-
children: [/* @__PURE__ */
|
|
3667
|
+
children: [/* @__PURE__ */ F(it, {
|
|
3668
3668
|
type: J.Search,
|
|
3669
3669
|
label: i,
|
|
3670
3670
|
placeholder: r,
|
|
3671
3671
|
value: e,
|
|
3672
3672
|
onChange: m
|
|
3673
|
-
}), h && /* @__PURE__ */
|
|
3673
|
+
}), h && /* @__PURE__ */ I("p", {
|
|
3674
3674
|
className: sr.resultCount,
|
|
3675
3675
|
children: [
|
|
3676
3676
|
s,
|
|
@@ -3711,14 +3711,14 @@ var lr = {
|
|
|
3711
3711
|
//#endregion
|
|
3712
3712
|
//#region package/common/stepper/stepper.tsx
|
|
3713
3713
|
function ur() {
|
|
3714
|
-
return /* @__PURE__ */
|
|
3714
|
+
return /* @__PURE__ */ F("svg", {
|
|
3715
3715
|
strokeLinejoin: "round",
|
|
3716
3716
|
strokeLinecap: "round",
|
|
3717
3717
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3718
3718
|
viewBox: "-0.2 -1.2 3.4 2",
|
|
3719
3719
|
height: "20px",
|
|
3720
3720
|
width: "20px",
|
|
3721
|
-
children: /* @__PURE__ */
|
|
3721
|
+
children: /* @__PURE__ */ F("path", {
|
|
3722
3722
|
d: "M 0 0 l 1 1 l 2 -2",
|
|
3723
3723
|
stroke: "white",
|
|
3724
3724
|
strokeWidth: "0.4",
|
|
@@ -3728,7 +3728,7 @@ function ur() {
|
|
|
3728
3728
|
}
|
|
3729
3729
|
function dr({ steps: t = [], currentStep: n = 0, alignment: r = "horizontal", onStepClicked: i = null, nonLinear: a = !1, hideLabels: o = !1, className: s, style: c, classNames: l, styles: u, ...d }) {
|
|
3730
3730
|
let p = r === "vertical";
|
|
3731
|
-
return /* @__PURE__ */
|
|
3731
|
+
return /* @__PURE__ */ F("div", {
|
|
3732
3732
|
...d,
|
|
3733
3733
|
className: f(lr.stepper, { [lr.stepperVertical]: p }, l?.root, s),
|
|
3734
3734
|
style: {
|
|
@@ -3736,27 +3736,27 @@ function dr({ steps: t = [], currentStep: n = 0, alignment: r = "horizontal", on
|
|
|
3736
3736
|
...c
|
|
3737
3737
|
},
|
|
3738
3738
|
children: t.map((r, s) => {
|
|
3739
|
-
let c = s < n, d = s <= n, m = !!i && (a ? s !== n : c), h = f(lr.stepperEntry, { [lr.stepperEntryActive]: d }, { [lr.stepperEntryDone]: c }, { [lr.stepperClickable]: m }, l?.entry), g = /* @__PURE__ */
|
|
3739
|
+
let c = s < n, d = s <= n, m = !!i && (a ? s !== n : c), h = f(lr.stepperEntry, { [lr.stepperEntryActive]: d }, { [lr.stepperEntryDone]: c }, { [lr.stepperClickable]: m }, l?.entry), g = /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("div", {
|
|
3740
3740
|
className: f(lr.stepperEntryNumber, { [lr.stepperEntryNumberDone]: c }, l?.entryNumber),
|
|
3741
3741
|
style: u?.entryNumber,
|
|
3742
|
-
children: c ? /* @__PURE__ */
|
|
3743
|
-
}), !o && /* @__PURE__ */
|
|
3742
|
+
children: c ? /* @__PURE__ */ F(ur, {}) : s + 1
|
|
3743
|
+
}), !o && /* @__PURE__ */ F("div", {
|
|
3744
3744
|
className: f(lr.stepperEntryLabel, { [lr.stepperEntryLabelVertical]: p }, l?.entryLabel),
|
|
3745
3745
|
style: u?.entryLabel,
|
|
3746
3746
|
children: r.label
|
|
3747
3747
|
})] });
|
|
3748
|
-
return /* @__PURE__ */
|
|
3748
|
+
return /* @__PURE__ */ I(e.Fragment, { children: [m ? /* @__PURE__ */ F(Re, {
|
|
3749
3749
|
className: h,
|
|
3750
3750
|
style: u?.entry,
|
|
3751
3751
|
onClick: () => i(s),
|
|
3752
3752
|
"aria-current": s === n ? "step" : void 0,
|
|
3753
3753
|
children: g
|
|
3754
|
-
}) : /* @__PURE__ */
|
|
3754
|
+
}) : /* @__PURE__ */ F("div", {
|
|
3755
3755
|
className: h,
|
|
3756
3756
|
style: u?.entry,
|
|
3757
3757
|
"aria-current": s === n ? "step" : void 0,
|
|
3758
3758
|
children: g
|
|
3759
|
-
}), s < t.length - 1 && /* @__PURE__ */
|
|
3759
|
+
}), s < t.length - 1 && /* @__PURE__ */ F("div", {
|
|
3760
3760
|
className: f(lr.stepperConnector, { [lr.stepperConnectorFilled]: c }, { [lr.stepperConnectorVertical]: p }, l?.connector),
|
|
3761
3761
|
style: u?.connector
|
|
3762
3762
|
})] }, s);
|
|
@@ -3806,13 +3806,13 @@ function hr({ className: e, previewItems: t = [], onSelect: n, onLoadAdditional:
|
|
|
3806
3806
|
let t = e.currentTarget, n = t.scrollHeight - t.clientHeight * 1.5;
|
|
3807
3807
|
t.scrollTop >= n && r?.();
|
|
3808
3808
|
}
|
|
3809
|
-
return /* @__PURE__ */
|
|
3809
|
+
return /* @__PURE__ */ F(P, { children: t.length > 0 && /* @__PURE__ */ F("div", {
|
|
3810
3810
|
className: f(mr.gifPreview, e),
|
|
3811
3811
|
onScroll: i,
|
|
3812
|
-
children: t.map((e, t) => /* @__PURE__ */
|
|
3812
|
+
children: t.map((e, t) => /* @__PURE__ */ F(Re, {
|
|
3813
3813
|
className: mr.gifPreviewImageContainer,
|
|
3814
3814
|
onClick: () => n?.(e),
|
|
3815
|
-
children: /* @__PURE__ */
|
|
3815
|
+
children: /* @__PURE__ */ F("div", {
|
|
3816
3816
|
className: mr.gifPreviewImage,
|
|
3817
3817
|
style: { backgroundImage: `url(${e.media_formats.tinygif.url})` }
|
|
3818
3818
|
})
|
|
@@ -3831,13 +3831,13 @@ function _r({ className: e, src: t = "" }) {
|
|
|
3831
3831
|
let [n, r] = d(!0);
|
|
3832
3832
|
return a(() => {
|
|
3833
3833
|
r(!0);
|
|
3834
|
-
}, [t]), /* @__PURE__ */
|
|
3834
|
+
}, [t]), /* @__PURE__ */ I("div", {
|
|
3835
3835
|
className: f(gr.gifView, e),
|
|
3836
|
-
children: [/* @__PURE__ */
|
|
3836
|
+
children: [/* @__PURE__ */ F("img", {
|
|
3837
3837
|
className: gr.tenorPickerSelected,
|
|
3838
3838
|
src: t,
|
|
3839
3839
|
onLoad: () => r(!1)
|
|
3840
|
-
}), n && /* @__PURE__ */
|
|
3840
|
+
}), n && /* @__PURE__ */ F("div", { className: gr.gifViewLoading })]
|
|
3841
3841
|
});
|
|
3842
3842
|
}
|
|
3843
3843
|
var vr = {
|
|
@@ -3877,10 +3877,10 @@ function yr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3877
3877
|
await r(e), v(!1), e && a.registerShare(o, e.id);
|
|
3878
3878
|
}
|
|
3879
3879
|
function S() {
|
|
3880
|
-
return /* @__PURE__ */
|
|
3880
|
+
return /* @__PURE__ */ F(Ze, {
|
|
3881
3881
|
inline: !0,
|
|
3882
3882
|
className: vr.tenorPickerSuggestionsContainer,
|
|
3883
|
-
children: p.map((e) => /* @__PURE__ */
|
|
3883
|
+
children: p.map((e) => /* @__PURE__ */ F(Xe, {
|
|
3884
3884
|
className: vr.tenorPickerSuggestionsItem,
|
|
3885
3885
|
text: e,
|
|
3886
3886
|
onClick: () => y(e)
|
|
@@ -3888,42 +3888,42 @@ function yr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3888
3888
|
});
|
|
3889
3889
|
}
|
|
3890
3890
|
function C() {
|
|
3891
|
-
return /* @__PURE__ */
|
|
3891
|
+
return /* @__PURE__ */ F(hr, {
|
|
3892
3892
|
previewItems: l,
|
|
3893
3893
|
onSelect: x,
|
|
3894
3894
|
onLoadAdditional: b
|
|
3895
3895
|
});
|
|
3896
3896
|
}
|
|
3897
3897
|
function w() {
|
|
3898
|
-
return /* @__PURE__ */
|
|
3898
|
+
return /* @__PURE__ */ F(cr, {
|
|
3899
3899
|
label: "Pick gif",
|
|
3900
3900
|
value: o,
|
|
3901
3901
|
onDebounce: y,
|
|
3902
3902
|
onChange: s
|
|
3903
3903
|
});
|
|
3904
3904
|
}
|
|
3905
|
-
return n ? /* @__PURE__ */
|
|
3905
|
+
return n ? /* @__PURE__ */ I("div", {
|
|
3906
3906
|
className: f(vr.tenorPicker, e),
|
|
3907
3907
|
children: [
|
|
3908
|
-
/* @__PURE__ */
|
|
3909
|
-
className:
|
|
3910
|
-
children: [/* @__PURE__ */
|
|
3908
|
+
/* @__PURE__ */ I("div", {
|
|
3909
|
+
className: De.actionButtons,
|
|
3910
|
+
children: [/* @__PURE__ */ F(G, {
|
|
3911
3911
|
onClick: () => v(!0),
|
|
3912
3912
|
children: "Pick gif"
|
|
3913
|
-
}), i && /* @__PURE__ */
|
|
3914
|
-
styleType:
|
|
3913
|
+
}), i && /* @__PURE__ */ F(G, {
|
|
3914
|
+
styleType: H.Delete,
|
|
3915
3915
|
onClick: () => x(null),
|
|
3916
3916
|
children: "Remove gif"
|
|
3917
3917
|
})]
|
|
3918
3918
|
}),
|
|
3919
|
-
i && /* @__PURE__ */
|
|
3919
|
+
i && /* @__PURE__ */ F(_r, {
|
|
3920
3920
|
className: vr.tenorPickerSelected,
|
|
3921
3921
|
src: i
|
|
3922
3922
|
}),
|
|
3923
|
-
/* @__PURE__ */
|
|
3923
|
+
/* @__PURE__ */ F(_t, {
|
|
3924
3924
|
isOpen: _,
|
|
3925
3925
|
onClose: () => v(!1),
|
|
3926
|
-
children: /* @__PURE__ */
|
|
3926
|
+
children: /* @__PURE__ */ I("div", {
|
|
3927
3927
|
className: vr.tenorPickerModalContent,
|
|
3928
3928
|
children: [
|
|
3929
3929
|
w(),
|
|
@@ -3933,22 +3933,22 @@ function yr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3933
3933
|
})
|
|
3934
3934
|
})
|
|
3935
3935
|
]
|
|
3936
|
-
}) : /* @__PURE__ */
|
|
3936
|
+
}) : /* @__PURE__ */ I("div", {
|
|
3937
3937
|
className: f(vr.tenorPicker, e),
|
|
3938
3938
|
children: [
|
|
3939
|
-
/* @__PURE__ */
|
|
3939
|
+
/* @__PURE__ */ F(tt, {
|
|
3940
3940
|
align: $e.Left,
|
|
3941
3941
|
isOpen: l.length > 0 && _,
|
|
3942
3942
|
onOpenChange: v,
|
|
3943
|
-
content: /* @__PURE__ */
|
|
3943
|
+
content: /* @__PURE__ */ I(P, { children: [S(), C()] }),
|
|
3944
3944
|
children: w()
|
|
3945
3945
|
}),
|
|
3946
|
-
i && /* @__PURE__ */
|
|
3947
|
-
styleType:
|
|
3946
|
+
i && /* @__PURE__ */ F(G, {
|
|
3947
|
+
styleType: H.Delete,
|
|
3948
3948
|
onClick: () => x(null),
|
|
3949
3949
|
children: "Remove gif"
|
|
3950
3950
|
}),
|
|
3951
|
-
i && /* @__PURE__ */
|
|
3951
|
+
i && /* @__PURE__ */ F(_r, {
|
|
3952
3952
|
className: vr.tenorPickerSelected,
|
|
3953
3953
|
src: i
|
|
3954
3954
|
})
|
|
@@ -3958,7 +3958,7 @@ function yr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3958
3958
|
//#endregion
|
|
3959
3959
|
//#region package/common/textarea/textarea.tsx
|
|
3960
3960
|
function br(e) {
|
|
3961
|
-
return /* @__PURE__ */
|
|
3961
|
+
return /* @__PURE__ */ F(it, {
|
|
3962
3962
|
...e,
|
|
3963
3963
|
multiline: !0
|
|
3964
3964
|
});
|
|
@@ -4071,7 +4071,7 @@ var xr = {
|
|
|
4071
4071
|
}
|
|
4072
4072
|
render() {
|
|
4073
4073
|
let { children: e } = this.props, { resolvedVariables: t, colorFadeActive: n } = this.state;
|
|
4074
|
-
return /* @__PURE__ */
|
|
4074
|
+
return /* @__PURE__ */ F("div", {
|
|
4075
4075
|
ref: this.wrapperRef,
|
|
4076
4076
|
id: "themeProvider",
|
|
4077
4077
|
className: n ? Sr.colorFade : void 0,
|
|
@@ -4132,7 +4132,7 @@ var Tr = {
|
|
|
4132
4132
|
info: b,
|
|
4133
4133
|
success: y,
|
|
4134
4134
|
error: x,
|
|
4135
|
-
warn:
|
|
4135
|
+
warn: oe,
|
|
4136
4136
|
default: m
|
|
4137
4137
|
};
|
|
4138
4138
|
function Dr({ item: e, isBottom: t, onDismiss: n }) {
|
|
@@ -4145,28 +4145,28 @@ function Dr({ item: e, isBottom: t, onDismiss: n }) {
|
|
|
4145
4145
|
r,
|
|
4146
4146
|
c,
|
|
4147
4147
|
n
|
|
4148
|
-
]), /* @__PURE__ */
|
|
4148
|
+
]), /* @__PURE__ */ I("div", {
|
|
4149
4149
|
className: f(Tr.toast, t ? Tr.toastBottom : null, Tr[`toast-${d}`], s && Tr.toastDismissing, m?.root),
|
|
4150
4150
|
style: h?.root,
|
|
4151
4151
|
children: [
|
|
4152
|
-
/* @__PURE__ */
|
|
4152
|
+
/* @__PURE__ */ F(p, {
|
|
4153
4153
|
icon: Er[d],
|
|
4154
4154
|
className: f(Tr.toastIcon, m?.icon),
|
|
4155
4155
|
style: h?.icon
|
|
4156
4156
|
}),
|
|
4157
|
-
/* @__PURE__ */
|
|
4157
|
+
/* @__PURE__ */ F("div", {
|
|
4158
4158
|
className: f(Tr.toastContent, m?.content),
|
|
4159
4159
|
style: h?.content,
|
|
4160
4160
|
children: i
|
|
4161
4161
|
}),
|
|
4162
|
-
u && /* @__PURE__ */
|
|
4163
|
-
icon:
|
|
4162
|
+
u && /* @__PURE__ */ F(Be, {
|
|
4163
|
+
icon: ce,
|
|
4164
4164
|
onClick: () => n(r),
|
|
4165
4165
|
className: f(Tr.toastCloseButton, m?.closeButton),
|
|
4166
4166
|
style: h?.closeButton,
|
|
4167
4167
|
"aria-label": "Close"
|
|
4168
4168
|
}),
|
|
4169
|
-
l && c > 0 && /* @__PURE__ */
|
|
4169
|
+
l && c > 0 && /* @__PURE__ */ F("div", {
|
|
4170
4170
|
className: f(Tr.toastProgressBar, m?.progressBar),
|
|
4171
4171
|
style: {
|
|
4172
4172
|
"--toast-duration": `${c}ms`,
|
|
@@ -4247,9 +4247,9 @@ function Fr({ children: e, position: t = Mr.position, duration: n = Mr.duration,
|
|
|
4247
4247
|
let n = t.options.position;
|
|
4248
4248
|
return e[n] || (e[n] = []), e[n].push(t), e;
|
|
4249
4249
|
}, {});
|
|
4250
|
-
return /* @__PURE__ */
|
|
4250
|
+
return /* @__PURE__ */ I(P, { children: [e, /* @__PURE__ */ F(Ve, { children: Object.entries(g).map(([e, t]) => /* @__PURE__ */ F("div", {
|
|
4251
4251
|
className: f(Tr.container, Pr(e)),
|
|
4252
|
-
children: t.map((t) => /* @__PURE__ */
|
|
4252
|
+
children: t.map((t) => /* @__PURE__ */ F(Dr, {
|
|
4253
4253
|
item: t,
|
|
4254
4254
|
isBottom: e.startsWith("bottom"),
|
|
4255
4255
|
onDismiss: m
|
|
@@ -4280,6 +4280,12 @@ var Q = {
|
|
|
4280
4280
|
virtualListRowNoDivider: "virtualList-row-no-divider_Ct0gV",
|
|
4281
4281
|
"virtualList-row-selected": "virtualList-row-selected_hwEN-",
|
|
4282
4282
|
virtualListRowSelected: "virtualList-row-selected_hwEN-",
|
|
4283
|
+
"virtualList-row-draggable": "virtualList-row-draggable_I86ha",
|
|
4284
|
+
virtualListRowDraggable: "virtualList-row-draggable_I86ha",
|
|
4285
|
+
"virtualList-row-dragging": "virtualList-row-dragging_6T5tQ",
|
|
4286
|
+
virtualListRowDragging: "virtualList-row-dragging_6T5tQ",
|
|
4287
|
+
"virtualList-reordering": "virtualList-reordering_Rt9E3",
|
|
4288
|
+
virtualListReordering: "virtualList-reordering_Rt9E3",
|
|
4283
4289
|
"virtualList-cell": "virtualList-cell_H0zBv",
|
|
4284
4290
|
virtualListCell: "virtualList-cell_H0zBv",
|
|
4285
4291
|
"virtualList-loading-full": "virtualList-loading-full_wzZNM",
|
|
@@ -4292,35 +4298,44 @@ var Q = {
|
|
|
4292
4298
|
//#endregion
|
|
4293
4299
|
//#region package/common/virtualList/virtualList.tsx
|
|
4294
4300
|
function Ir(e, t, n, r = 0) {
|
|
4295
|
-
let i = Array(
|
|
4296
|
-
|
|
4297
|
-
for (let
|
|
4298
|
-
let
|
|
4299
|
-
|
|
4301
|
+
let i = e.length, a = Array(i + 1);
|
|
4302
|
+
a[0] = 0;
|
|
4303
|
+
for (let o = 0; o < i; o++) {
|
|
4304
|
+
let s = o < i - 1 ? r : 0;
|
|
4305
|
+
a[o + 1] = a[o] + (t.get(e[o]) ?? n) + s;
|
|
4300
4306
|
}
|
|
4301
4307
|
return {
|
|
4302
|
-
offsets:
|
|
4303
|
-
totalHeight: i
|
|
4308
|
+
offsets: a,
|
|
4309
|
+
totalHeight: a[i]
|
|
4304
4310
|
};
|
|
4305
4311
|
}
|
|
4306
|
-
function Lr(e, t, n
|
|
4312
|
+
function Lr(e, t, n) {
|
|
4313
|
+
if (n <= 0) return 0;
|
|
4314
|
+
let r = 0, i = n - 1;
|
|
4315
|
+
for (; r < i;) {
|
|
4316
|
+
let n = r + i >> 1;
|
|
4317
|
+
e[n + 1] <= t ? r = n + 1 : i = n;
|
|
4318
|
+
}
|
|
4319
|
+
return r;
|
|
4320
|
+
}
|
|
4321
|
+
function Rr(e, t, n, r, i) {
|
|
4307
4322
|
if (i === 0) return {
|
|
4308
4323
|
startIndex: 0,
|
|
4309
4324
|
endIndex: -1
|
|
4310
4325
|
};
|
|
4311
|
-
let a =
|
|
4312
|
-
for (;
|
|
4313
|
-
let n = a + o >> 1;
|
|
4314
|
-
e[n + 1] <= t ? a = n + 1 : o = n;
|
|
4315
|
-
}
|
|
4316
|
-
let s = a;
|
|
4317
|
-
for (; s < i && e[s] < t + n;) s++;
|
|
4326
|
+
let a = Lr(e, t, i), o = a;
|
|
4327
|
+
for (; o < i && e[o] < t + n;) o++;
|
|
4318
4328
|
return {
|
|
4319
4329
|
startIndex: Math.max(0, a - r),
|
|
4320
|
-
endIndex: Math.min(i - 1,
|
|
4330
|
+
endIndex: Math.min(i - 1, o + r - 1)
|
|
4321
4331
|
};
|
|
4322
4332
|
}
|
|
4323
|
-
function
|
|
4333
|
+
function zr(e, t, n, r, i) {
|
|
4334
|
+
if (e === -1 || e === t) return null;
|
|
4335
|
+
let a = r + i / 2;
|
|
4336
|
+
return (t > e ? n >= a : n <= a) ? t : null;
|
|
4337
|
+
}
|
|
4338
|
+
function Br(e) {
|
|
4324
4339
|
return e.length === 0 ? "1fr" : e.map((e) => {
|
|
4325
4340
|
switch (e.width.type) {
|
|
4326
4341
|
case "fixed": return `${e.width.px}px`;
|
|
@@ -4329,200 +4344,275 @@ function Rr(e) {
|
|
|
4329
4344
|
}
|
|
4330
4345
|
}).join(" ");
|
|
4331
4346
|
}
|
|
4332
|
-
function
|
|
4333
|
-
let
|
|
4334
|
-
return
|
|
4335
|
-
let
|
|
4336
|
-
if (!
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
className: f(Q.virtualListRow, r && Q.virtualListRowSelected, !i && Q.virtualListRowNoDivider, c),
|
|
4347
|
+
function Vr({ index: e, top: t, columnTemplate: n, isSelected: r, showDivider: i, onClick: a, observer: o, ariaRowIndex: c, ariaPosInSet: l, ariaSetSize: d, rowRole: p, draggable: m, isDragging: h, onDragStart: g, onDragOver: _, onDragEnd: v, rowClassName: y, rowStyle: b, children: x }) {
|
|
4348
|
+
let S = u(null);
|
|
4349
|
+
return s(() => {
|
|
4350
|
+
let e = S.current;
|
|
4351
|
+
if (!(!e || !o)) return o.observe(e), () => o.unobserve(e);
|
|
4352
|
+
}, [o]), /* @__PURE__ */ F("div", {
|
|
4353
|
+
ref: S,
|
|
4354
|
+
"data-index": e,
|
|
4355
|
+
className: f(Q.virtualListRow, r && Q.virtualListRowSelected, !i && Q.virtualListRowNoDivider, m && Q.virtualListRowDraggable, h && Q.virtualListRowDragging, y),
|
|
4342
4356
|
style: {
|
|
4343
4357
|
position: "absolute",
|
|
4344
|
-
top:
|
|
4358
|
+
top: 0,
|
|
4345
4359
|
left: 0,
|
|
4346
4360
|
right: 0,
|
|
4361
|
+
transform: `translateY(${t}px)`,
|
|
4347
4362
|
...n ? {
|
|
4348
4363
|
display: "grid",
|
|
4349
4364
|
gridTemplateColumns: n
|
|
4350
4365
|
} : {},
|
|
4351
|
-
...
|
|
4366
|
+
...b
|
|
4352
4367
|
},
|
|
4353
|
-
onClick:
|
|
4368
|
+
onClick: a,
|
|
4369
|
+
draggable: m,
|
|
4370
|
+
onDragStart: g,
|
|
4371
|
+
onDragOver: _,
|
|
4372
|
+
onDragEnd: v,
|
|
4373
|
+
onDrop: m ? (e) => e.preventDefault() : void 0,
|
|
4354
4374
|
"aria-selected": r,
|
|
4355
|
-
|
|
4356
|
-
|
|
4375
|
+
"aria-rowindex": c,
|
|
4376
|
+
"aria-posinset": l,
|
|
4377
|
+
"aria-setsize": d,
|
|
4378
|
+
role: p,
|
|
4379
|
+
children: x
|
|
4357
4380
|
});
|
|
4358
4381
|
}
|
|
4359
|
-
function
|
|
4360
|
-
let [
|
|
4361
|
-
|
|
4362
|
-
|
|
4382
|
+
function Hr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedRowHeight: l = 40, overscan: m = 3, rowGap: h = 0, selectedKey: g, getItemKey: _, onRowClick: v, visibleColumnKeys: y, onVisibleColumnsChange: b, showColumnToggle: x, onLoadMore: S, loadMoreThreshold: C = 100, isLoading: w = !1, multiSelect: T = !1, selectedKeys: E, onSelectionChange: ee, reorderable: O = !1, onReorder: k, showDivider: te = !0, className: ne, style: A, classNames: j, styles: M, ...re }, ie) {
|
|
4383
|
+
let [ae, oe] = d(0), [se, ce] = d(0), [N, le] = d(/* @__PURE__ */ new Map()), [ue, de] = d(!1), [fe, pe] = d(!1), me = u(!1), L = u(null), [he, ge] = d(null), R = E !== void 0, [_e, ve] = d(/* @__PURE__ */ new Set()), z = R ? E : _e, ye = y !== void 0, [be, xe] = d(() => new Set((n ?? []).filter((e) => !e.defaultHidden).map((e) => e.key))), Se = ye ? new Set(y) : be, Ce = u(null), we = u(null), B = u(null), Te = u([]), Ee = u(null), De = u(0), V = u([]), [Oe] = d(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((e) => {
|
|
4384
|
+
le((t) => {
|
|
4385
|
+
let n = null;
|
|
4386
|
+
for (let r of e) {
|
|
4387
|
+
let e = r.target, i = Number(e.dataset.index);
|
|
4388
|
+
if (Number.isNaN(i)) continue;
|
|
4389
|
+
let a = V.current[i];
|
|
4390
|
+
if (a === void 0) continue;
|
|
4391
|
+
let o = r.borderBoxSize?.[0], s = o ? Math.round(o.blockSize) : e.offsetHeight;
|
|
4392
|
+
t.get(a) !== s && (n ||= new Map(t), n.set(a, s));
|
|
4393
|
+
}
|
|
4394
|
+
return n ?? t;
|
|
4395
|
+
});
|
|
4396
|
+
}));
|
|
4397
|
+
a(() => () => Oe?.disconnect(), [Oe]), s(() => {
|
|
4398
|
+
let e = Ce.current;
|
|
4363
4399
|
if (!e) return;
|
|
4364
|
-
|
|
4365
|
-
|
|
4400
|
+
ce(e.clientHeight);
|
|
4401
|
+
let t = new ResizeObserver(() => ce(e.clientHeight));
|
|
4402
|
+
return t.observe(e), () => t.disconnect();
|
|
4366
4403
|
}, []), a(() => {
|
|
4367
|
-
if (!
|
|
4404
|
+
if (!ue) return;
|
|
4368
4405
|
function e(e) {
|
|
4369
|
-
|
|
4406
|
+
B.current && !B.current.contains(e.target) && de(!1);
|
|
4370
4407
|
}
|
|
4371
4408
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
4372
|
-
}, [
|
|
4373
|
-
let
|
|
4409
|
+
}, [ue]);
|
|
4410
|
+
let ke = i((e) => {
|
|
4374
4411
|
let t = e.currentTarget;
|
|
4375
|
-
|
|
4376
|
-
|
|
4412
|
+
De.current = t.scrollTop, Ee.current ??= requestAnimationFrame(() => {
|
|
4413
|
+
Ee.current = null, oe(De.current);
|
|
4414
|
+
}), S && !me.current && t.scrollTop + t.clientHeight >= t.scrollHeight - C && (me.current = !0, pe(!0), S().finally(() => {
|
|
4415
|
+
me.current = !1, pe(!1);
|
|
4377
4416
|
}));
|
|
4378
|
-
}, [
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4417
|
+
}, [S, C]);
|
|
4418
|
+
a(() => () => {
|
|
4419
|
+
Ee.current != null && cancelAnimationFrame(Ee.current);
|
|
4420
|
+
}, []);
|
|
4421
|
+
let H = c(() => e.map((e, t) => _ ? _(e, t) : t), [e, _]);
|
|
4422
|
+
s(() => {
|
|
4423
|
+
V.current = H;
|
|
4424
|
+
}, [H]);
|
|
4425
|
+
let { offsets: U, totalHeight: je } = c(() => Ir(H, N, l, h), [
|
|
4426
|
+
H,
|
|
4427
|
+
N,
|
|
4428
|
+
l,
|
|
4429
|
+
h
|
|
4389
4430
|
]);
|
|
4390
4431
|
s(() => {
|
|
4391
|
-
let
|
|
4392
|
-
if (
|
|
4393
|
-
|
|
4394
|
-
|
|
4432
|
+
let t = Ce.current, n = Te.current;
|
|
4433
|
+
if (Te.current = U, !t || n.length === 0) return;
|
|
4434
|
+
let r = t.scrollTop;
|
|
4435
|
+
if (r <= 0) return;
|
|
4436
|
+
let i = Lr(n, r, n.length - 1);
|
|
4437
|
+
if (i >= e.length) return;
|
|
4438
|
+
let a = r - n[i], o = U[i] + a;
|
|
4439
|
+
Math.abs(o - r) > .5 && (t.scrollTop = o, De.current = o, oe(o));
|
|
4440
|
+
}, [U, e.length]), o(ie, () => {
|
|
4441
|
+
function t(e, t) {
|
|
4442
|
+
let n = Ce.current;
|
|
4443
|
+
if (!n) return;
|
|
4444
|
+
let r = Math.max(0, e);
|
|
4445
|
+
typeof n.scrollTo == "function" ? n.scrollTo({
|
|
4446
|
+
top: r,
|
|
4447
|
+
behavior: t ?? "auto"
|
|
4448
|
+
}) : n.scrollTop = r;
|
|
4395
4449
|
}
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4450
|
+
function n(n, r) {
|
|
4451
|
+
let i = Ce.current;
|
|
4452
|
+
if (!i || e.length === 0) return;
|
|
4453
|
+
let a = Math.max(0, Math.min(n, e.length - 1)), o = U[a] ?? 0, s = (U[a + 1] ?? o) - o, c = we.current?.offsetHeight ?? 0, l = Math.max(0, i.clientHeight - c), u = r?.align ?? "start", d = o - c;
|
|
4454
|
+
u === "center" ? d -= (l - s) / 2 : u === "end" && (d -= l - s), t(d, r?.behavior);
|
|
4400
4455
|
}
|
|
4401
|
-
|
|
4456
|
+
return {
|
|
4457
|
+
scrollToIndex: n,
|
|
4458
|
+
scrollToKey(t, r) {
|
|
4459
|
+
let i = e.findIndex((e, n) => (_ ? _(e, n) : n) === t);
|
|
4460
|
+
i >= 0 && n(i, r);
|
|
4461
|
+
},
|
|
4462
|
+
scrollToTop(e) {
|
|
4463
|
+
t(0, e?.behavior);
|
|
4464
|
+
},
|
|
4465
|
+
getScrollElement: () => Ce.current
|
|
4466
|
+
};
|
|
4402
4467
|
}, [
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4468
|
+
e,
|
|
4469
|
+
U,
|
|
4470
|
+
_
|
|
4406
4471
|
]);
|
|
4407
|
-
let { startIndex:
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4472
|
+
let { startIndex: Me, endIndex: Ne } = c(() => Rr(U, ae, se, m, e.length), [
|
|
4473
|
+
U,
|
|
4474
|
+
ae,
|
|
4475
|
+
se,
|
|
4476
|
+
m,
|
|
4412
4477
|
e.length
|
|
4413
|
-
]), W = !!n?.length,
|
|
4414
|
-
function
|
|
4415
|
-
let t = new Set(
|
|
4478
|
+
]), W = !!n?.length, Pe = W ? n.filter((e) => Se.has(e.key)) : [], G = W ? `${T && W ? "40px " : ""}${Br(Pe)}` : void 0, Fe = x !== !1 && W;
|
|
4479
|
+
function Ie(e) {
|
|
4480
|
+
let t = new Set(Se);
|
|
4416
4481
|
if (t.has(e)) {
|
|
4417
4482
|
if (t.size <= 1) return;
|
|
4418
4483
|
t.delete(e);
|
|
4419
4484
|
} else t.add(e);
|
|
4420
4485
|
let n = [...t];
|
|
4421
|
-
|
|
4486
|
+
ye || xe(t), b?.(n);
|
|
4487
|
+
}
|
|
4488
|
+
function Le(e, t) {
|
|
4489
|
+
return _ ? _(e, t) : t;
|
|
4422
4490
|
}
|
|
4423
|
-
function
|
|
4424
|
-
|
|
4491
|
+
function Re(e) {
|
|
4492
|
+
R || ve(e), ee?.(e);
|
|
4425
4493
|
}
|
|
4426
|
-
function
|
|
4427
|
-
|
|
4494
|
+
function ze(e) {
|
|
4495
|
+
let t = new Set(z);
|
|
4496
|
+
t.has(e) ? t.delete(e) : t.add(e), Re(t);
|
|
4428
4497
|
}
|
|
4429
|
-
function
|
|
4430
|
-
let t =
|
|
4431
|
-
t.
|
|
4498
|
+
function Be() {
|
|
4499
|
+
let t = e.map((e, t) => Le(e, t));
|
|
4500
|
+
Re(t.every((e) => z.has(e)) ? /* @__PURE__ */ new Set() : new Set(t));
|
|
4432
4501
|
}
|
|
4433
|
-
function
|
|
4434
|
-
|
|
4435
|
-
De(t.every((e) => de.has(e)) ? /* @__PURE__ */ new Set() : new Set(t));
|
|
4502
|
+
function Ve(e) {
|
|
4503
|
+
L.current = e, ge(e);
|
|
4436
4504
|
}
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
let
|
|
4440
|
-
|
|
4505
|
+
function K(e, t) {
|
|
4506
|
+
t.preventDefault();
|
|
4507
|
+
let n = L.current;
|
|
4508
|
+
if (n == null) return;
|
|
4509
|
+
let r = H.indexOf(n), i = t.currentTarget.getBoundingClientRect(), a = zr(r, e, t.clientY, i.top, i.height);
|
|
4510
|
+
a != null && k?.(r, a);
|
|
4511
|
+
}
|
|
4512
|
+
function He() {
|
|
4513
|
+
L.current = null, ge(null);
|
|
4514
|
+
}
|
|
4515
|
+
let Ue = T && e.length > 0 && e.every((e, t) => z.has(Le(e, t))), We = T && !Ue && e.some((e, t) => z.has(Le(e, t))), Ge = [];
|
|
4516
|
+
for (let n = Me; n <= Ne; n++) {
|
|
4517
|
+
let r = e[n], i = Le(r, n), a = g != null && i === g || z.has(i);
|
|
4518
|
+
Ge.push(/* @__PURE__ */ F(Vr, {
|
|
4441
4519
|
index: n,
|
|
4442
|
-
top:
|
|
4443
|
-
columnTemplate:
|
|
4520
|
+
top: U[n],
|
|
4521
|
+
columnTemplate: G,
|
|
4444
4522
|
isSelected: a,
|
|
4445
|
-
showDivider:
|
|
4446
|
-
onClick: () =>
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4523
|
+
showDivider: te,
|
|
4524
|
+
onClick: () => v?.(r, n),
|
|
4525
|
+
observer: Oe,
|
|
4526
|
+
ariaRowIndex: W ? n + 2 : void 0,
|
|
4527
|
+
ariaPosInSet: W ? void 0 : n + 1,
|
|
4528
|
+
ariaSetSize: W ? void 0 : e.length,
|
|
4529
|
+
rowRole: W ? "row" : "listitem",
|
|
4530
|
+
draggable: O || void 0,
|
|
4531
|
+
isDragging: O && i === he,
|
|
4532
|
+
onDragStart: O ? () => Ve(i) : void 0,
|
|
4533
|
+
onDragOver: O ? (e) => K(n, e) : void 0,
|
|
4534
|
+
onDragEnd: O ? He : void 0,
|
|
4535
|
+
rowClassName: j?.row,
|
|
4536
|
+
rowStyle: M?.row,
|
|
4537
|
+
children: W ? /* @__PURE__ */ I(P, { children: [T && /* @__PURE__ */ F("div", {
|
|
4538
|
+
className: f(Q.virtualListSelectCell, j?.selectCell),
|
|
4539
|
+
style: M?.selectCell,
|
|
4453
4540
|
role: "gridcell",
|
|
4454
4541
|
onClick: (e) => e.stopPropagation(),
|
|
4455
|
-
children: /* @__PURE__ */
|
|
4456
|
-
selected:
|
|
4457
|
-
onToggle: () =>
|
|
4542
|
+
children: /* @__PURE__ */ F(Je, {
|
|
4543
|
+
selected: z.has(i),
|
|
4544
|
+
onToggle: () => ze(i),
|
|
4458
4545
|
"aria-label": "Select row"
|
|
4459
4546
|
})
|
|
4460
|
-
}),
|
|
4461
|
-
className: f(Q.virtualListCell,
|
|
4462
|
-
style:
|
|
4547
|
+
}), Pe.map((e) => /* @__PURE__ */ F("div", {
|
|
4548
|
+
className: f(Q.virtualListCell, j?.cell),
|
|
4549
|
+
style: M?.cell,
|
|
4463
4550
|
role: "gridcell",
|
|
4464
4551
|
children: e.renderCell(r, n)
|
|
4465
4552
|
}, e.key))] }) : t?.(r, n)
|
|
4466
4553
|
}, i));
|
|
4467
4554
|
}
|
|
4468
|
-
return /* @__PURE__ */
|
|
4469
|
-
...
|
|
4470
|
-
ref:
|
|
4471
|
-
className: f(Q.virtualList,
|
|
4555
|
+
return /* @__PURE__ */ I("div", {
|
|
4556
|
+
...re,
|
|
4557
|
+
ref: Ce,
|
|
4558
|
+
className: f(Q.virtualList, he != null && Q.virtualListReordering, ne, j?.root),
|
|
4472
4559
|
style: {
|
|
4473
4560
|
height: r,
|
|
4474
|
-
...
|
|
4475
|
-
...
|
|
4561
|
+
...A,
|
|
4562
|
+
...M?.root
|
|
4476
4563
|
},
|
|
4477
|
-
onScroll:
|
|
4564
|
+
onScroll: ke,
|
|
4478
4565
|
role: W ? "grid" : "list",
|
|
4566
|
+
"aria-rowcount": W ? e.length + 1 : void 0,
|
|
4479
4567
|
children: [
|
|
4480
|
-
W && /* @__PURE__ */
|
|
4481
|
-
|
|
4568
|
+
W && /* @__PURE__ */ I("div", {
|
|
4569
|
+
ref: we,
|
|
4570
|
+
className: f(Q.virtualListHeader, j?.header),
|
|
4482
4571
|
style: {
|
|
4483
|
-
gridTemplateColumns:
|
|
4484
|
-
...
|
|
4485
|
-
...
|
|
4572
|
+
gridTemplateColumns: G,
|
|
4573
|
+
...Fe ? { paddingRight: 32 } : {},
|
|
4574
|
+
...M?.header
|
|
4486
4575
|
},
|
|
4487
4576
|
role: "row",
|
|
4577
|
+
"aria-rowindex": 1,
|
|
4488
4578
|
children: [
|
|
4489
|
-
|
|
4490
|
-
className: f(Q.virtualListSelectCell,
|
|
4491
|
-
style:
|
|
4579
|
+
T && /* @__PURE__ */ F("div", {
|
|
4580
|
+
className: f(Q.virtualListSelectCell, j?.selectCell),
|
|
4581
|
+
style: M?.selectCell,
|
|
4492
4582
|
role: "columnheader",
|
|
4493
|
-
children: /* @__PURE__ */
|
|
4494
|
-
selected:
|
|
4495
|
-
onToggle:
|
|
4583
|
+
children: /* @__PURE__ */ F(Je, {
|
|
4584
|
+
selected: Ue || We,
|
|
4585
|
+
onToggle: Be,
|
|
4496
4586
|
"aria-label": "Select all rows"
|
|
4497
4587
|
})
|
|
4498
4588
|
}),
|
|
4499
|
-
|
|
4500
|
-
className: f(Q.virtualListHeaderCell,
|
|
4501
|
-
style:
|
|
4589
|
+
Pe.map((e) => /* @__PURE__ */ F("div", {
|
|
4590
|
+
className: f(Q.virtualListHeaderCell, j?.headerCell),
|
|
4591
|
+
style: M?.headerCell,
|
|
4502
4592
|
role: "columnheader",
|
|
4503
4593
|
children: e.label
|
|
4504
4594
|
}, e.key)),
|
|
4505
|
-
|
|
4506
|
-
ref:
|
|
4595
|
+
Fe && /* @__PURE__ */ I("div", {
|
|
4596
|
+
ref: B,
|
|
4507
4597
|
className: Q.virtualListToggleWrapper,
|
|
4508
|
-
children: [/* @__PURE__ */
|
|
4598
|
+
children: [/* @__PURE__ */ F("button", {
|
|
4509
4599
|
type: "button",
|
|
4510
|
-
className: f(Q.virtualListHeaderToggle,
|
|
4511
|
-
style:
|
|
4512
|
-
onClick: () =>
|
|
4600
|
+
className: f(Q.virtualListHeaderToggle, j?.headerToggle),
|
|
4601
|
+
style: M?.headerToggle,
|
|
4602
|
+
onClick: () => de((e) => !e),
|
|
4513
4603
|
"aria-label": "Toggle column visibility",
|
|
4514
|
-
children: /* @__PURE__ */
|
|
4604
|
+
children: /* @__PURE__ */ F(p, {
|
|
4515
4605
|
icon: D,
|
|
4516
|
-
style:
|
|
4606
|
+
style: M?.headerToggle
|
|
4517
4607
|
})
|
|
4518
|
-
}),
|
|
4519
|
-
className: f(Q.virtualListTogglePopover,
|
|
4520
|
-
style:
|
|
4521
|
-
children: n.map((e) => /* @__PURE__ */
|
|
4522
|
-
className: f(Q.virtualListToggleItem,
|
|
4523
|
-
style:
|
|
4524
|
-
selected:
|
|
4525
|
-
onToggle: () =>
|
|
4608
|
+
}), ue && /* @__PURE__ */ F("div", {
|
|
4609
|
+
className: f(Q.virtualListTogglePopover, j?.togglePopover),
|
|
4610
|
+
style: M?.togglePopover,
|
|
4611
|
+
children: n.map((e) => /* @__PURE__ */ F(Je, {
|
|
4612
|
+
className: f(Q.virtualListToggleItem, j?.toggleItem),
|
|
4613
|
+
style: M?.toggleItem,
|
|
4614
|
+
selected: Se.has(e.key),
|
|
4615
|
+
onToggle: () => Ie(e.key),
|
|
4526
4616
|
cursorDefault: !1,
|
|
4527
4617
|
children: e.label
|
|
4528
4618
|
}, e.key))
|
|
@@ -4530,26 +4620,26 @@ function Br({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4530
4620
|
})
|
|
4531
4621
|
]
|
|
4532
4622
|
}),
|
|
4533
|
-
|
|
4623
|
+
w ? /* @__PURE__ */ F("div", {
|
|
4534
4624
|
className: Q.virtualListLoadingFull,
|
|
4535
|
-
children: /* @__PURE__ */
|
|
4536
|
-
}) : /* @__PURE__ */
|
|
4537
|
-
className: f(Q.virtualListBody,
|
|
4625
|
+
children: /* @__PURE__ */ F(Ae, { className: Q.virtualListSpinner })
|
|
4626
|
+
}) : /* @__PURE__ */ F("div", {
|
|
4627
|
+
className: f(Q.virtualListBody, j?.body),
|
|
4538
4628
|
style: {
|
|
4539
|
-
height:
|
|
4540
|
-
...
|
|
4629
|
+
height: je,
|
|
4630
|
+
...M?.body
|
|
4541
4631
|
},
|
|
4542
|
-
children:
|
|
4632
|
+
children: Ge
|
|
4543
4633
|
}),
|
|
4544
|
-
|
|
4545
|
-
className: f(Q.virtualListLoadingIndicator,
|
|
4546
|
-
style:
|
|
4547
|
-
children: /* @__PURE__ */
|
|
4634
|
+
fe && /* @__PURE__ */ F("div", {
|
|
4635
|
+
className: f(Q.virtualListLoadingIndicator, j?.loadingIndicator),
|
|
4636
|
+
style: M?.loadingIndicator,
|
|
4637
|
+
children: /* @__PURE__ */ F(Ae, { className: Q.virtualListSpinner })
|
|
4548
4638
|
})
|
|
4549
4639
|
]
|
|
4550
4640
|
});
|
|
4551
4641
|
}
|
|
4552
|
-
var
|
|
4642
|
+
var Ur = e.forwardRef(Hr), Wr = {
|
|
4553
4643
|
wizard: "wizard_uRBAN",
|
|
4554
4644
|
"wizard-content": "wizard-content_lcl4C",
|
|
4555
4645
|
wizardContent: "wizard-content_lcl4C",
|
|
@@ -4560,7 +4650,7 @@ var Vr = {
|
|
|
4560
4650
|
};
|
|
4561
4651
|
//#endregion
|
|
4562
4652
|
//#region package/common/wizard/wizard.tsx
|
|
4563
|
-
function
|
|
4653
|
+
function Gr({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null, className: r, style: i, classNames: o, styles: s, ...c }) {
|
|
4564
4654
|
let [l, p] = d(void 0), [m, h] = d(!1), [g, _] = d(e), v = u([]), y = u(null);
|
|
4565
4655
|
e !== g && (_(e), h(!0)), a(() => {
|
|
4566
4656
|
if (!m) return;
|
|
@@ -4578,29 +4668,29 @@ function Hr({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null,
|
|
|
4578
4668
|
...s?.root,
|
|
4579
4669
|
...i
|
|
4580
4670
|
};
|
|
4581
|
-
return /* @__PURE__ */
|
|
4671
|
+
return /* @__PURE__ */ F("div", {
|
|
4582
4672
|
...c,
|
|
4583
|
-
className: f(
|
|
4673
|
+
className: f(Wr.wizard, o?.root, r),
|
|
4584
4674
|
style: b,
|
|
4585
|
-
children: /* @__PURE__ */
|
|
4586
|
-
className: f(
|
|
4675
|
+
children: /* @__PURE__ */ F("div", {
|
|
4676
|
+
className: f(Wr.wizardContentContainer, o?.container),
|
|
4587
4677
|
style: {
|
|
4588
4678
|
width: `${t * 100}%`,
|
|
4589
4679
|
marginLeft: `-${e * 100}%`,
|
|
4590
4680
|
...s?.container
|
|
4591
4681
|
},
|
|
4592
|
-
children: Array.from({ length: t }, (r, i) => /* @__PURE__ */
|
|
4682
|
+
children: Array.from({ length: t }, (r, i) => /* @__PURE__ */ F("div", {
|
|
4593
4683
|
ref: (e) => {
|
|
4594
4684
|
v.current[i] = e;
|
|
4595
4685
|
},
|
|
4596
|
-
className: f(
|
|
4686
|
+
className: f(Wr.wizardContent, o?.step),
|
|
4597
4687
|
style: {
|
|
4598
4688
|
width: `${100 / t}%`,
|
|
4599
4689
|
marginLeft: `${100 / t * i}%`,
|
|
4600
4690
|
...s?.step
|
|
4601
4691
|
},
|
|
4602
|
-
children: /* @__PURE__ */
|
|
4603
|
-
className: f({ [
|
|
4692
|
+
children: /* @__PURE__ */ F("div", {
|
|
4693
|
+
className: f({ [Wr.wizardContentOutOfFrame]: e !== i && !m }, o?.stepContent),
|
|
4604
4694
|
style: s?.stepContent,
|
|
4605
4695
|
inert: e === i ? void 0 : !0,
|
|
4606
4696
|
children: n(i)
|
|
@@ -4611,20 +4701,20 @@ function Hr({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null,
|
|
|
4611
4701
|
}
|
|
4612
4702
|
//#endregion
|
|
4613
4703
|
//#region package/services/formValidation/formValidatorGroup.ts
|
|
4614
|
-
function
|
|
4704
|
+
function Kr(e) {
|
|
4615
4705
|
let t = e;
|
|
4616
4706
|
return t?.errors && Array.isArray(t.errors) ? t.errors.flatMap((e) => Object.entries(e).map(([e, t]) => ({
|
|
4617
4707
|
id: e,
|
|
4618
4708
|
message: t
|
|
4619
4709
|
}))) : [];
|
|
4620
4710
|
}
|
|
4621
|
-
var
|
|
4711
|
+
var qr = class {
|
|
4622
4712
|
#e;
|
|
4623
4713
|
#t;
|
|
4624
4714
|
#n;
|
|
4625
4715
|
#r;
|
|
4626
4716
|
#i;
|
|
4627
|
-
constructor(e, t = null, { initialValues: n, onSubmit: r = () => void 0, onValidate: i = () => void 0, errorParser: a =
|
|
4717
|
+
constructor(e, t = null, { initialValues: n, onSubmit: r = () => void 0, onValidate: i = () => void 0, errorParser: a = Kr, onSubmitError: o = () => void 0 } = {}) {
|
|
4628
4718
|
this.#t = !1, this.#i = [], this.getFormError = () => {
|
|
4629
4719
|
let e = Object.keys(this.group);
|
|
4630
4720
|
for (let t = 0; t < e.length; t += 1) {
|
|
@@ -4714,9 +4804,9 @@ var Wr = class {
|
|
|
4714
4804
|
};
|
|
4715
4805
|
//#endregion
|
|
4716
4806
|
//#region package/services/formValidation/FormValidatorGroupForm.tsx
|
|
4717
|
-
function
|
|
4807
|
+
function Jr(e) {
|
|
4718
4808
|
return function({ children: t, ...n }) {
|
|
4719
|
-
return /* @__PURE__ */
|
|
4809
|
+
return /* @__PURE__ */ F("form", {
|
|
4720
4810
|
onSubmit: e.submit,
|
|
4721
4811
|
noValidate: !0,
|
|
4722
4812
|
...n,
|
|
@@ -4726,16 +4816,16 @@ function Gr(e) {
|
|
|
4726
4816
|
}
|
|
4727
4817
|
//#endregion
|
|
4728
4818
|
//#region package/services/formValidation/FormValidatorGroupWithForm.tsx
|
|
4729
|
-
var
|
|
4819
|
+
var Yr = (e) => {
|
|
4730
4820
|
jr(e[0].message, { type: "error" });
|
|
4731
|
-
},
|
|
4821
|
+
}, Xr = class extends qr {
|
|
4732
4822
|
constructor(e, t = null, n) {
|
|
4733
4823
|
super(e, t, {
|
|
4734
4824
|
...n,
|
|
4735
|
-
onSubmitError: n?.onSubmitError ??
|
|
4736
|
-
}), this.Form =
|
|
4825
|
+
onSubmitError: n?.onSubmitError ?? Yr
|
|
4826
|
+
}), this.Form = Jr(this);
|
|
4737
4827
|
}
|
|
4738
|
-
},
|
|
4828
|
+
}, Zr = class {
|
|
4739
4829
|
#e;
|
|
4740
4830
|
#t;
|
|
4741
4831
|
#n;
|
|
@@ -4789,40 +4879,40 @@ var Kr = (e) => {
|
|
|
4789
4879
|
return this.#r;
|
|
4790
4880
|
}
|
|
4791
4881
|
};
|
|
4792
|
-
|
|
4882
|
+
Zr.prototype.toString = function() {
|
|
4793
4883
|
return `${this.value}`;
|
|
4794
4884
|
};
|
|
4795
4885
|
//#endregion
|
|
4796
4886
|
//#region package/services/regexp.ts
|
|
4797
|
-
function
|
|
4887
|
+
function Qr(e) {
|
|
4798
4888
|
return /^[0-9]+$/.test(e);
|
|
4799
4889
|
}
|
|
4800
|
-
function
|
|
4890
|
+
function $r(e) {
|
|
4801
4891
|
return /^[0-9]{2}.[0-9]{2}.[0-9]{4}$/.test(e);
|
|
4802
4892
|
}
|
|
4803
|
-
function
|
|
4893
|
+
function ei(e) {
|
|
4804
4894
|
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);
|
|
4805
4895
|
}
|
|
4806
|
-
function
|
|
4896
|
+
function ti(e) {
|
|
4807
4897
|
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);
|
|
4808
4898
|
}
|
|
4809
|
-
function
|
|
4899
|
+
function ni(e) {
|
|
4810
4900
|
return /^[A-Z]{6}[A-Z\d]{2}([A-Z\d]{3})?$/.test(e);
|
|
4811
4901
|
}
|
|
4812
|
-
function
|
|
4902
|
+
function ri(e) {
|
|
4813
4903
|
return /[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}(\/[-a-zA-Z0-9@:%_+.~#?&//=]*)?$/.test(e);
|
|
4814
4904
|
}
|
|
4815
|
-
function
|
|
4905
|
+
function ii(e) {
|
|
4816
4906
|
return /^[\w!@#$%^&*?±§~`'"/\\[\]{}\-,.();:><+=|öäüÖÄÜß €μ]{8,}$/.test(e);
|
|
4817
4907
|
}
|
|
4818
|
-
function
|
|
4908
|
+
function ai(e) {
|
|
4819
4909
|
return /^(?=.*[a-zöäüA-ZÖÄÜß])/.test(e);
|
|
4820
4910
|
}
|
|
4821
|
-
function
|
|
4911
|
+
function oi(e) {
|
|
4822
4912
|
return /^(?=.*\d)/.test(e);
|
|
4823
4913
|
}
|
|
4824
|
-
function
|
|
4825
|
-
return
|
|
4914
|
+
function si(e) {
|
|
4915
|
+
return ii(e) && ai(e) && oi(e);
|
|
4826
4916
|
}
|
|
4827
4917
|
//#endregion
|
|
4828
4918
|
//#region package/services/formValidation/validators.ts
|
|
@@ -4841,7 +4931,7 @@ var $ = { t: (e, t) => ({
|
|
|
4841
4931
|
"garages.errors.bic": "Must be a valid BIC",
|
|
4842
4932
|
"formValidators.minLetters": `Must contain at least ${t?.smart_count} letters`,
|
|
4843
4933
|
"formValidators.minDigits": `Must contain at least ${t?.smart_count} digits`
|
|
4844
|
-
})[e] || e },
|
|
4934
|
+
})[e] || e }, ci = class e {
|
|
4845
4935
|
static {
|
|
4846
4936
|
this.minLength = (e, t) => (n) => !n || n.length < e ? {
|
|
4847
4937
|
id: "minLength",
|
|
@@ -4855,7 +4945,7 @@ var $ = { t: (e, t) => ({
|
|
|
4855
4945
|
} : null;
|
|
4856
4946
|
}
|
|
4857
4947
|
static {
|
|
4858
|
-
this.email = (e) => (t) => t && !
|
|
4948
|
+
this.email = (e) => (t) => t && !ti(t) ? {
|
|
4859
4949
|
id: "email",
|
|
4860
4950
|
message: e || $.t("formValidators.email")
|
|
4861
4951
|
} : null;
|
|
@@ -4898,7 +4988,7 @@ var $ = { t: (e, t) => ({
|
|
|
4898
4988
|
this.multiEmail = (e) => (t) => {
|
|
4899
4989
|
if (t) {
|
|
4900
4990
|
let n = t.replace(/ /g, "").replace(/,/g, ";").split(";");
|
|
4901
|
-
for (let t = 0; t < n.length; t += 1) if (!
|
|
4991
|
+
for (let t = 0; t < n.length; t += 1) if (!ti(n[t])) return {
|
|
4902
4992
|
id: "multiEmail",
|
|
4903
4993
|
message: e || $.t("formValidators.multiEmail")
|
|
4904
4994
|
};
|
|
@@ -4907,7 +4997,7 @@ var $ = { t: (e, t) => ({
|
|
|
4907
4997
|
};
|
|
4908
4998
|
}
|
|
4909
4999
|
static {
|
|
4910
|
-
this.date = (e) => (t) => t &&
|
|
5000
|
+
this.date = (e) => (t) => t && !$r(t) && !ei(t) ? {
|
|
4911
5001
|
id: "date",
|
|
4912
5002
|
message: e || $.t("formValidators.date")
|
|
4913
5003
|
} : null;
|
|
@@ -4919,13 +5009,13 @@ var $ = { t: (e, t) => ({
|
|
|
4919
5009
|
} : null;
|
|
4920
5010
|
}
|
|
4921
5011
|
static {
|
|
4922
|
-
this.website = (e) => (t) => t && !
|
|
5012
|
+
this.website = (e) => (t) => t && !ri(t) ? {
|
|
4923
5013
|
id: "website",
|
|
4924
5014
|
message: e || $.t("garages.errors.website")
|
|
4925
5015
|
} : null;
|
|
4926
5016
|
}
|
|
4927
5017
|
static {
|
|
4928
|
-
this.bic = (e) => (t) => t &&
|
|
5018
|
+
this.bic = (e) => (t) => t && !ni(t) ? {
|
|
4929
5019
|
id: "bic",
|
|
4930
5020
|
message: e || $.t("garages.errors.bic")
|
|
4931
5021
|
} : null;
|
|
@@ -4951,7 +5041,7 @@ var $ = { t: (e, t) => ({
|
|
|
4951
5041
|
} : r : null;
|
|
4952
5042
|
};
|
|
4953
5043
|
}
|
|
4954
|
-
},
|
|
5044
|
+
}, li = class extends n {
|
|
4955
5045
|
static {
|
|
4956
5046
|
this.defaultProps = {
|
|
4957
5047
|
formValidator: null,
|
|
@@ -5014,7 +5104,7 @@ var $ = { t: (e, t) => ({
|
|
|
5014
5104
|
}
|
|
5015
5105
|
renderTooltip() {
|
|
5016
5106
|
let { errorMessage: e, formValidator: t } = this.props, { isHovered: n, isFocused: r } = this.state;
|
|
5017
|
-
return /* @__PURE__ */
|
|
5107
|
+
return /* @__PURE__ */ F(rt, {
|
|
5018
5108
|
variant: "error",
|
|
5019
5109
|
message: t ? t.getCurrentErrorMessage() : e || "",
|
|
5020
5110
|
isVisible: this.hasError() && (r || n)
|
|
@@ -5031,7 +5121,7 @@ var $ = { t: (e, t) => ({
|
|
|
5031
5121
|
};
|
|
5032
5122
|
//#endregion
|
|
5033
5123
|
//#region package/services/formValidation/useFormValidator.ts
|
|
5034
|
-
function
|
|
5124
|
+
function ui(e) {
|
|
5035
5125
|
let [, t] = l((e) => e + 1, 0);
|
|
5036
5126
|
return a(() => {
|
|
5037
5127
|
if (e) return e.registerOnUpdateListener(t), () => e.removeOnUpdateListener(t);
|
|
@@ -5039,9 +5129,9 @@ function si(e) {
|
|
|
5039
5129
|
}
|
|
5040
5130
|
//#endregion
|
|
5041
5131
|
//#region package/services/formValidation/useFormValidatorGroup.ts
|
|
5042
|
-
function
|
|
5132
|
+
function di(e, { initialValues: t, onSubmit: n, onValidate: r, errorParser: i, onSubmitError: o } = {}) {
|
|
5043
5133
|
let [, s] = l((e) => e + 1, 0), c = u(null);
|
|
5044
|
-
c.current ||= new
|
|
5134
|
+
c.current ||= new Xr(e, null, {
|
|
5045
5135
|
initialValues: t,
|
|
5046
5136
|
errorParser: i,
|
|
5047
5137
|
onSubmitError: o
|
|
@@ -5050,6 +5140,6 @@ function ci(e, { initialValues: t, onSubmit: n, onValidate: r, errorParser: i, o
|
|
|
5050
5140
|
return f.current = n, p.current = r, a(() => (n !== void 0 && (d.onSubmitCallback = (...e) => f.current?.(...e)), r !== void 0 && (d.onValidateCallback = (...e) => p.current?.(...e)), d.registerOnUpdateListener(s), () => d.removeOnUpdateListener(s)), []), d;
|
|
5051
5141
|
}
|
|
5052
5142
|
//#endregion
|
|
5053
|
-
export {
|
|
5143
|
+
export { Ee as Accordion, Se as AccordionStyleType, Fe as ActionButtons, Be as ActionIcon, $e as Align, Ve as BodyEnd, G as Button, U as ButtonSize, H as ButtonStyleType, je as ButtonType, He as Card, Ke as CardActions, Ge as CardContent, Ue as CardHeader, We as CardMedia, Je as Checkbox, Xe as Chip, Ze as ChipContainer, ht as ColorPicker, vt as ConfirmModal, Kt as DatePicker, Wt as Dropdown, Jt as EmptyState, Qt as Fab, tt as FloatingMenu, Zr as FormValidator, Xr as FormValidatorGroup, gn as IconLoading, nn as IconPicker, an as IdleManager, Ut as InfiniteBlock, it as Input, ln as InputDropdown, J as InputType, Re as InteractableDiv, pn as KanbanBoard, fn as KanbanColumn, _t as Modal, yn as NumberInput, xn as OptionPicker, Tn as Overscroll, On as ProgressBar, Ne as Ripple, tr as RoomDrawer, rr as RoomViewer, or as ScrollbarProvider, cr as SearchInput, Ae as SpinnerLoading, dr as Stepper, yr as TenorPicker, br as Textarea, Cr as ThemeProvider, Fr as ToastProvider, rt as Tooltip, li as ValidatableComponent, ci as Validators, Ur as VirtualList, Gr as Wizard, xr as defaultTheme, Et as getLocale, ii as hasEightPasswordChars, oi as hasOnePasswordDigit, ai as hasOnePasswordLetter, ni as isBic, $r as isDate, ti as isEmail, ei as isISODate, Qr as isNumber, si as isPassword, ri as isURL, Ct as mapLocale, Tt as setLocale, jr as showToast, ui as useFormValidator, di as useFormValidatorGroup, wr as useTheme };
|
|
5054
5144
|
|
|
5055
5145
|
//# sourceMappingURL=index.mjs.map
|