@ahrowe/ui 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1106 -1053
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/package/common/card/CardHeader.d.ts +1 -1
- package/dist/types/package/common/card/card.types.d.ts +7 -0
- package/dist/types/package/common/dropdown/dropdown.d.ts +1 -1
- package/dist/types/package/common/dropdown/dropdown.types.d.ts +10 -6
- package/dist/types/package/common/input/input.d.ts +1 -1
- package/dist/types/package/common/input/input.types.d.ts +5 -2
- package/dist/types/package/common/interactableDiv/interactableDiv.d.ts +1 -0
- package/dist/types/package/common/numberInput/numberInput.d.ts +6 -3
- package/dist/types/package/common/themeProvider/theme.types.d.ts +2 -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,
|
|
4
|
+
import { faBell as m, faCheck as h, faChevronDown as g, faChevronLeft as _, faChevronRight as v, faChevronUp as y, faCircleCheck as b, faCircleInfo as x, faCircleXmark as S, faDoorOpen as C, faDownload as w, faDrawPolygon as T, faEnvelope as E, faEye as ee, faEyeSlash as D, faGear as O, faHandPointer as k, faLayerGroup as A, faMagnifyingGlassMinus as te, faMagnifyingGlassPlus as ne, faPen as j, faPhone as M, faPlus as N, faSearch as re, faSquare as ie, faTrash as ae, faTriangleExclamation as oe, faUpload as se, faXmark as P, faXmarkCircle as ce } from "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { DndContext as
|
|
10
|
-
import { SortableContext as
|
|
11
|
-
import { CSS as
|
|
12
|
-
import { NumericFormat as
|
|
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 R, closestCorners as me, useDroppable as he, useSensor as z, useSensors as B } from "@dnd-kit/core";
|
|
10
|
+
import { SortableContext as V, arrayMove as ge, useSortable as _e, verticalListSortingStrategy as ve } from "@dnd-kit/sortable";
|
|
11
|
+
import { CSS as ye } from "@dnd-kit/utilities";
|
|
12
|
+
import { NumericFormat as be } from "react-number-format";
|
|
13
13
|
//#region package/common/accordion/accordion.types.ts
|
|
14
|
-
var
|
|
14
|
+
var xe = /* @__PURE__ */ function(e) {
|
|
15
15
|
return e.Default = "default", e.Primary = "primary", e.Plain = "plain", e;
|
|
16
|
-
}({}),
|
|
16
|
+
}({}), Se = {
|
|
17
17
|
accordion: "accordion_YZt8B",
|
|
18
18
|
"accordion-title": "accordion-title_CGYKY",
|
|
19
19
|
accordionTitle: "accordion-title_CGYKY",
|
|
@@ -33,7 +33,7 @@ var ye = /* @__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
|
+
}, Ce = {
|
|
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 ye = /* @__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
|
+
}, we = {
|
|
57
57
|
accordion: "accordion_wkZJf",
|
|
58
58
|
"accordion-title": "accordion-title_-qwNy",
|
|
59
59
|
accordionTitle: "accordion-title_-qwNy",
|
|
@@ -71,13 +71,13 @@ var ye = /* @__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
|
+
[xe.Default]: Se,
|
|
76
|
+
[xe.Primary]: Ce,
|
|
77
|
+
[xe.Plain]: we
|
|
78
78
|
};
|
|
79
|
-
function
|
|
80
|
-
let y =
|
|
79
|
+
function Ee({ id: e = "", title: t = "", children: n = null, expanded: r = null, onHeaderClicked: i = () => {}, styleType: o = xe.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(() => {
|
|
@@ -135,11 +135,11 @@ function we({ 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
|
+
}, H = {
|
|
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 Te = {
|
|
|
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,10 +180,10 @@ var Te = {
|
|
|
180
180
|
};
|
|
181
181
|
//#endregion
|
|
182
182
|
//#region package/common/loading/spinnerLoading/spinnerLoading.tsx
|
|
183
|
-
function
|
|
183
|
+
function ke({ className: e }) {
|
|
184
184
|
return /* @__PURE__ */ I("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",
|
|
@@ -196,25 +196,25 @@ function De({ 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, je = /* @__PURE__ */ function(e) {
|
|
203
203
|
return e.Primary = "primary", e.Default = "default", e.Delete = "delete", e;
|
|
204
|
-
}({}),
|
|
204
|
+
}({}), Me = /* @__PURE__ */ function(e) {
|
|
205
205
|
return e.Default = "default", e.Small = "small", e.Medium = "medium", e.Large = "large", e;
|
|
206
|
-
}({}),
|
|
206
|
+
}({}), Ne = /* @__PURE__ */ function(e) {
|
|
207
207
|
return e.Button = "button", e.Reset = "reset", e.Submit = "submit", e;
|
|
208
|
-
}({}),
|
|
208
|
+
}({}), Pe = {
|
|
209
209
|
ripple: "ripple_TsvyF",
|
|
210
210
|
"ripple-container": "ripple-container_QzHdC",
|
|
211
211
|
rippleContainer: "ripple-container_QzHdC"
|
|
212
|
-
},
|
|
212
|
+
}, U = 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(Pe.ripple), p.current?.appendChild(r), setTimeout(() => {
|
|
218
218
|
p.current?.removeChild(r);
|
|
219
219
|
}, s * 1e3 + 50);
|
|
220
220
|
}
|
|
@@ -237,7 +237,7 @@ var Oe = De, W = /* @__PURE__ */ function(e) {
|
|
|
237
237
|
}, [t, l]);
|
|
238
238
|
let _ = { "--ripple-animation-length": `${s}s` };
|
|
239
239
|
return t === void 0 ? /* @__PURE__ */ I("div", {
|
|
240
|
-
className:
|
|
240
|
+
className: Pe.rippleContainer,
|
|
241
241
|
ref: p,
|
|
242
242
|
style: {
|
|
243
243
|
overflow: i ? "hidden" : "visible",
|
|
@@ -253,47 +253,47 @@ var Oe = De, W = /* @__PURE__ */ function(e) {
|
|
|
253
253
|
...r
|
|
254
254
|
},
|
|
255
255
|
children: [t, /* @__PURE__ */ I("div", {
|
|
256
|
-
className:
|
|
256
|
+
className: Pe.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
|
+
}), Fe = {
|
|
262
|
+
default: H.buttonStyleDefault,
|
|
263
|
+
primary: H.buttonStylePrimary,
|
|
264
|
+
delete: H.buttonStyleDelete
|
|
265
|
+
}, Ie = {
|
|
266
|
+
default: H.buttonSizeDefault,
|
|
267
|
+
small: H.buttonSizeSmall,
|
|
268
|
+
medium: H.buttonSizeMedium,
|
|
269
|
+
large: H.buttonSizeLarge
|
|
270
270
|
};
|
|
271
|
-
function
|
|
271
|
+
function W({ className: e, style: t, type: n = Ne.Button, styleType: r = je.Default, size: i = Me.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
272
|
return /* @__PURE__ */ I("button", {
|
|
273
273
|
...g,
|
|
274
|
-
className: f(
|
|
274
|
+
className: f(H.button, Fe[r], Ie[i], { [H.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__ */ I(
|
|
281
|
+
children: /* @__PURE__ */ I(U, {
|
|
282
282
|
disabled: c || l,
|
|
283
283
|
children: /* @__PURE__ */ I("div", {
|
|
284
|
-
className: f(
|
|
284
|
+
className: f(H.buttonBackground, m?.background),
|
|
285
285
|
style: h?.background,
|
|
286
286
|
children: /* @__PURE__ */ L("div", {
|
|
287
|
-
className: f(
|
|
287
|
+
className: f(H.buttonContent, m?.content),
|
|
288
288
|
style: h?.content,
|
|
289
289
|
children: [c ? /* @__PURE__ */ I("div", {
|
|
290
|
-
className: f(
|
|
290
|
+
className: f(H.buttonLoadingContainer, m?.loadingContainer),
|
|
291
291
|
style: h?.loadingContainer,
|
|
292
|
-
children: /* @__PURE__ */ I(
|
|
292
|
+
children: /* @__PURE__ */ I(Ae, { className: H.buttonLoadingIcon })
|
|
293
293
|
}) : null, /* @__PURE__ */ L("div", {
|
|
294
294
|
className: f(m?.label, {
|
|
295
|
-
[
|
|
296
|
-
[
|
|
295
|
+
[H.buttonLoading]: c,
|
|
296
|
+
[H.buttonWithIcon]: !!s
|
|
297
297
|
}),
|
|
298
298
|
style: h?.label,
|
|
299
299
|
children: [s ? /* @__PURE__ */ I(p, { icon: s }) : null, o]
|
|
@@ -303,63 +303,64 @@ function G({ className: e, style: t, type: n = Ae.Button, styleType: r = W.Defau
|
|
|
303
303
|
})
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
|
-
|
|
306
|
+
W.StyleType = je, W.Size = Me, W.Type = Ne;
|
|
307
307
|
//#endregion
|
|
308
308
|
//#region package/common/actionButtons/actionButtons.tsx
|
|
309
|
-
function
|
|
309
|
+
function Le({ onSubmit: e = () => null, onClose: t = () => null, submitLabel: n = "Save", cancelLabel: r = "Cancel", submitButtonStyle: i = je.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
310
|
return /* @__PURE__ */ L("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__ */ I(
|
|
317
|
+
children: [!l && /* @__PURE__ */ I(W, {
|
|
318
318
|
isLoading: a,
|
|
319
319
|
disabled: o,
|
|
320
320
|
styleType: i,
|
|
321
|
-
type:
|
|
321
|
+
type: Ne.Submit,
|
|
322
322
|
onClick: e,
|
|
323
323
|
className: h?.submitButton,
|
|
324
324
|
style: g?.submitButton,
|
|
325
325
|
children: n
|
|
326
|
-
}), !u && /* @__PURE__ */ I(
|
|
326
|
+
}), !u && /* @__PURE__ */ I(W, {
|
|
327
327
|
isLoading: s,
|
|
328
328
|
disabled: c,
|
|
329
329
|
onClick: t,
|
|
330
|
-
styleType:
|
|
330
|
+
styleType: je.Default,
|
|
331
331
|
className: h?.cancelButton,
|
|
332
332
|
style: g?.cancelButton,
|
|
333
333
|
children: r
|
|
334
334
|
})]
|
|
335
335
|
});
|
|
336
336
|
}
|
|
337
|
-
var
|
|
338
|
-
let
|
|
339
|
-
e.key === "Enter" && n?.(e),
|
|
340
|
-
}, [n,
|
|
337
|
+
var Re = { interactableDiv: "interactableDiv_Ej8Fi" }, ze = e.forwardRef(({ className: e, children: t, onClick: n, onMouseDown: r, onKeyDown: a, tabIndex: o = 0, title: s, ...c }, l) => {
|
|
338
|
+
let u = i((e) => {
|
|
339
|
+
e.key === "Enter" && n?.(e), a?.(e);
|
|
340
|
+
}, [n, a]);
|
|
341
341
|
return /* @__PURE__ */ I("div", {
|
|
342
|
-
className: f(
|
|
342
|
+
className: f(Re.interactableDiv, e),
|
|
343
343
|
onClick: n,
|
|
344
|
-
|
|
344
|
+
onMouseDown: r,
|
|
345
|
+
tabIndex: o ?? 0,
|
|
345
346
|
role: "button",
|
|
346
|
-
onKeyDown:
|
|
347
|
-
ref:
|
|
348
|
-
title:
|
|
349
|
-
...
|
|
347
|
+
onKeyDown: u,
|
|
348
|
+
ref: l,
|
|
349
|
+
title: s,
|
|
350
|
+
...c,
|
|
350
351
|
children: t
|
|
351
352
|
});
|
|
352
353
|
});
|
|
353
|
-
|
|
354
|
+
ze.displayName = "InteractableDiv";
|
|
354
355
|
//#endregion
|
|
355
356
|
//#region package/common/interactableDiv/index.ts
|
|
356
|
-
var
|
|
357
|
+
var Be = ze, Ve = { actionIcon: "actionIcon_ganSq" };
|
|
357
358
|
//#endregion
|
|
358
359
|
//#region package/common/actionIcon/actionIcon.tsx
|
|
359
|
-
function
|
|
360
|
-
return /* @__PURE__ */ I(
|
|
360
|
+
function He({ icon: e, className: t = "", style: n, title: r = "", onClick: i = () => {}, classNames: a, styles: o, ...s }) {
|
|
361
|
+
return /* @__PURE__ */ I(Be, {
|
|
361
362
|
...s,
|
|
362
|
-
className: f(
|
|
363
|
+
className: f(Ve.actionIcon, t, a?.root),
|
|
363
364
|
style: {
|
|
364
365
|
...n,
|
|
365
366
|
...o?.root
|
|
@@ -375,11 +376,11 @@ function Be({ icon: e, className: t = "", style: n, title: r = "", onClick: i =
|
|
|
375
376
|
}
|
|
376
377
|
//#endregion
|
|
377
378
|
//#region package/common/bodyEnd/bodyEnd.tsx
|
|
378
|
-
function
|
|
379
|
+
function Ue({ children: e = null }) {
|
|
379
380
|
let t = document.getElementById("bodyEnd");
|
|
380
|
-
return t ?
|
|
381
|
+
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
382
|
}
|
|
382
|
-
var
|
|
383
|
+
var G = {
|
|
383
384
|
card: "card_w-6Ki",
|
|
384
385
|
"card-padding": "card-padding_X2-q-",
|
|
385
386
|
cardPadding: "card-padding_X2-q-",
|
|
@@ -392,10 +393,14 @@ var K = {
|
|
|
392
393
|
cardHeader: "cardHeader_HfIlm",
|
|
393
394
|
"cardHeader-thumbnail": "cardHeader-thumbnail_rFw-N",
|
|
394
395
|
cardHeaderThumbnail: "cardHeader-thumbnail_rFw-N",
|
|
396
|
+
"cardHeader-actions": "cardHeader-actions_awD46",
|
|
397
|
+
cardHeaderActions: "cardHeader-actions_awD46",
|
|
395
398
|
"cardHeader-titles": "cardHeader-titles_CAUU3",
|
|
396
399
|
cardHeaderTitles: "cardHeader-titles_CAUU3",
|
|
397
400
|
"cardHeader-titles-main": "cardHeader-titles-main_Z834V",
|
|
398
401
|
cardHeaderTitlesMain: "cardHeader-titles-main_Z834V",
|
|
402
|
+
"cardHeader-titles-main-container": "cardHeader-titles-main-container_1j-od",
|
|
403
|
+
cardHeaderTitlesMainContainer: "cardHeader-titles-main-container_1j-od",
|
|
399
404
|
"cardHeader-titles-sub": "cardHeader-titles-sub_2X08b",
|
|
400
405
|
cardHeaderTitlesSub: "cardHeader-titles-sub_2X08b",
|
|
401
406
|
cardMedia: "cardMedia_GZJQF",
|
|
@@ -403,15 +408,15 @@ var K = {
|
|
|
403
408
|
};
|
|
404
409
|
//#endregion
|
|
405
410
|
//#region package/common/card/Card.tsx
|
|
406
|
-
function
|
|
411
|
+
function We({ className: e = void 0, children: t = null, onClick: n = void 0, tabIndex: r = null, hoverEffect: i = void 0, style: a = void 0, ...o }) {
|
|
407
412
|
let s = !!n;
|
|
408
|
-
return /* @__PURE__ */ I(
|
|
413
|
+
return /* @__PURE__ */ I(Be, {
|
|
409
414
|
...o,
|
|
410
|
-
className: f(
|
|
415
|
+
className: f(G.card, G.cardPadding, G.cardShadow, s && G.cardInteractable, (s && i !== !1 || i) && G.cardHover, e),
|
|
411
416
|
onClick: n,
|
|
412
417
|
tabIndex: r ?? (s ? 0 : null),
|
|
413
418
|
style: a,
|
|
414
|
-
children: /* @__PURE__ */ I(
|
|
419
|
+
children: /* @__PURE__ */ I(U, {
|
|
415
420
|
disabled: !s,
|
|
416
421
|
overflowHidden: !1,
|
|
417
422
|
children: t
|
|
@@ -420,21 +425,31 @@ function He({ className: e = void 0, children: t = null, onClick: n = void 0, ta
|
|
|
420
425
|
}
|
|
421
426
|
//#endregion
|
|
422
427
|
//#region package/common/card/CardHeader.tsx
|
|
423
|
-
function
|
|
424
|
-
let
|
|
428
|
+
function Ge({ className: e = "", title: t = "", subTitle: n = "", thumbnail: r = "", actions: i = void 0 }) {
|
|
429
|
+
let a = typeof r == "string" && r.startsWith("http") ? r : void 0;
|
|
425
430
|
return /* @__PURE__ */ L("div", {
|
|
426
|
-
className: f(
|
|
431
|
+
className: f(G.cardHeader, e),
|
|
427
432
|
children: [r && /* @__PURE__ */ I("div", {
|
|
428
|
-
className:
|
|
429
|
-
style:
|
|
430
|
-
children: !
|
|
433
|
+
className: G.cardHeaderThumbnail,
|
|
434
|
+
style: a ? { backgroundImage: `url(${a})` } : {},
|
|
435
|
+
children: !a && r
|
|
431
436
|
}), /* @__PURE__ */ L("div", {
|
|
432
|
-
className:
|
|
433
|
-
children: [/* @__PURE__ */
|
|
434
|
-
className:
|
|
435
|
-
children:
|
|
437
|
+
className: G.cardHeaderTitles,
|
|
438
|
+
children: [/* @__PURE__ */ L("div", {
|
|
439
|
+
className: G.cardHeaderTitlesMainContainer,
|
|
440
|
+
children: [/* @__PURE__ */ I("div", {
|
|
441
|
+
className: G.cardHeaderTitlesMain,
|
|
442
|
+
children: t
|
|
443
|
+
}), /* @__PURE__ */ I("div", {
|
|
444
|
+
className: G.cardHeaderActions,
|
|
445
|
+
children: Array.isArray(i) ? i.map((e, t) => /* @__PURE__ */ I(He, {
|
|
446
|
+
title: e.title,
|
|
447
|
+
onClick: e.onClick,
|
|
448
|
+
icon: e.icon
|
|
449
|
+
}, t)) : i
|
|
450
|
+
})]
|
|
436
451
|
}), /* @__PURE__ */ I("div", {
|
|
437
|
-
className:
|
|
452
|
+
className: G.cardHeaderTitlesSub,
|
|
438
453
|
children: n
|
|
439
454
|
})]
|
|
440
455
|
})]
|
|
@@ -442,31 +457,31 @@ function Ue({ className: e = "", title: t = "", subTitle: n = "", thumbnail: r =
|
|
|
442
457
|
}
|
|
443
458
|
//#endregion
|
|
444
459
|
//#region package/common/card/CardMedia.tsx
|
|
445
|
-
function
|
|
460
|
+
function Ke({ src: e = "", alt: t = "" }) {
|
|
446
461
|
return /* @__PURE__ */ I("img", {
|
|
447
|
-
className:
|
|
462
|
+
className: G.cardMedia,
|
|
448
463
|
src: e,
|
|
449
464
|
alt: t
|
|
450
465
|
});
|
|
451
466
|
}
|
|
452
467
|
//#endregion
|
|
453
468
|
//#region package/common/card/CardContent.tsx
|
|
454
|
-
function
|
|
469
|
+
function qe({ children: e = null }) {
|
|
455
470
|
return /* @__PURE__ */ I(F, { children: e });
|
|
456
471
|
}
|
|
457
472
|
//#endregion
|
|
458
473
|
//#region package/common/card/CardActions.tsx
|
|
459
|
-
function
|
|
474
|
+
function Je({ className: e = "", actions: t = [], children: n = null }) {
|
|
460
475
|
return /* @__PURE__ */ L("div", {
|
|
461
|
-
className: f(
|
|
462
|
-
children: [t.map(({ id: e, onClick: t, label: n, styleType: r =
|
|
476
|
+
className: f(G.cardActions, e),
|
|
477
|
+
children: [t.map(({ id: e, onClick: t, label: n, styleType: r = je.Default }) => /* @__PURE__ */ I("div", { children: /* @__PURE__ */ I(W, {
|
|
463
478
|
onClick: t,
|
|
464
479
|
styleType: r,
|
|
465
480
|
children: n
|
|
466
481
|
}) }, e ?? n)), n]
|
|
467
482
|
});
|
|
468
483
|
}
|
|
469
|
-
var
|
|
484
|
+
var Ye = {
|
|
470
485
|
checkbox: "checkbox_VO3c2",
|
|
471
486
|
"checkbox-icon": "checkbox-icon_7O0Hm",
|
|
472
487
|
checkboxIcon: "checkbox-icon_7O0Hm",
|
|
@@ -485,7 +500,7 @@ var qe = {
|
|
|
485
500
|
};
|
|
486
501
|
//#endregion
|
|
487
502
|
//#region package/common/checkbox/checkbox.tsx
|
|
488
|
-
function
|
|
503
|
+
function Xe({ label: e = "", selected: t = !1, onToggle: n = () => {}, className: r = "", style: i, disabled: o = !1, lineHeight: s = "", title: c = "", tabIndex: l = 0, cursorDefault: p = !1, width: m = "17px", height: h = "17px", formValidator: g = null, children: _ = null, background: v = null, isLoading: y = !1, classNames: b, styles: x, ...S }) {
|
|
489
504
|
let C = u(null), [, w] = d(0);
|
|
490
505
|
a(() => {
|
|
491
506
|
if (!g) return;
|
|
@@ -498,9 +513,9 @@ function Je({ label: e = "", selected: t = !1, onToggle: n = () => {}, className
|
|
|
498
513
|
let E = g ? g.value : t;
|
|
499
514
|
return /* @__PURE__ */ L("div", {
|
|
500
515
|
...S,
|
|
501
|
-
className: f(
|
|
502
|
-
[
|
|
503
|
-
[
|
|
516
|
+
className: f(Ye.checkbox, {
|
|
517
|
+
[Ye.checkboxDisabled]: o,
|
|
518
|
+
[Ye.checkboxPointer]: !p
|
|
504
519
|
}, r),
|
|
505
520
|
style: i,
|
|
506
521
|
onClick: T,
|
|
@@ -512,22 +527,22 @@ function Je({ label: e = "", selected: t = !1, onToggle: n = () => {}, className
|
|
|
512
527
|
tabIndex: l,
|
|
513
528
|
children: [/* @__PURE__ */ I("div", {
|
|
514
529
|
title: c,
|
|
515
|
-
className: f(
|
|
530
|
+
className: f(Ye.checkboxIcon, y ? Ye.checkboxLoading : null, b?.icon),
|
|
516
531
|
style: x?.icon,
|
|
517
532
|
children: y ? /* @__PURE__ */ I("div", {
|
|
518
533
|
style: {
|
|
519
534
|
width: m,
|
|
520
535
|
height: h
|
|
521
536
|
},
|
|
522
|
-
children: /* @__PURE__ */ I(
|
|
537
|
+
children: /* @__PURE__ */ I(Ae, { className: Ye.checkboxLoadingSpinner })
|
|
523
538
|
}) : /* @__PURE__ */ L("div", {
|
|
524
539
|
style: {
|
|
525
540
|
width: m,
|
|
526
541
|
height: h,
|
|
527
542
|
...x?.checkmark
|
|
528
543
|
},
|
|
529
|
-
className: f(
|
|
530
|
-
children: [/* @__PURE__ */ I(
|
|
544
|
+
className: f(Ye.checkboxCheckmark, E && Ye.checkboxCheckmarkChecked, b?.checkmark),
|
|
545
|
+
children: [/* @__PURE__ */ I(U, {
|
|
531
546
|
ref: C,
|
|
532
547
|
manualOnly: !0,
|
|
533
548
|
overflowHidden: !1,
|
|
@@ -558,7 +573,7 @@ function Je({ label: e = "", selected: t = !1, onToggle: n = () => {}, className
|
|
|
558
573
|
})]
|
|
559
574
|
});
|
|
560
575
|
}
|
|
561
|
-
var
|
|
576
|
+
var Ze = {
|
|
562
577
|
chip: "chip_rCTMl",
|
|
563
578
|
"chip-clickable": "chip-clickable_WTVjG",
|
|
564
579
|
chipClickable: "chip-clickable_WTVjG",
|
|
@@ -575,31 +590,31 @@ var Ye = {
|
|
|
575
590
|
};
|
|
576
591
|
//#endregion
|
|
577
592
|
//#region package/common/chip/chip.tsx
|
|
578
|
-
function
|
|
593
|
+
function Qe({ className: e = "", thumbnail: t = "", text: n = "", showRemoveIcon: r = !1, onClick: i, onRemove: a, ...o }) {
|
|
579
594
|
let s = c(() => {
|
|
580
595
|
if (typeof t == "string" && t.startsWith("http")) return t;
|
|
581
596
|
}, [t]);
|
|
582
597
|
return /* @__PURE__ */ I("div", {
|
|
583
598
|
...o,
|
|
584
|
-
className: f(
|
|
599
|
+
className: f(Ze.chip, i && Ze.chipClickable, e),
|
|
585
600
|
onClick: i,
|
|
586
|
-
children: /* @__PURE__ */ I(
|
|
601
|
+
children: /* @__PURE__ */ I(U, {
|
|
587
602
|
disabled: !i,
|
|
588
603
|
style: { borderRadius: "inherit" },
|
|
589
604
|
children: /* @__PURE__ */ L("div", {
|
|
590
|
-
className:
|
|
605
|
+
className: Ze.chipInner,
|
|
591
606
|
children: [
|
|
592
607
|
t && /* @__PURE__ */ I("div", {
|
|
593
|
-
className:
|
|
608
|
+
className: Ze.chipThumbnail,
|
|
594
609
|
style: s ? { backgroundImage: `url(${s})` } : {},
|
|
595
610
|
children: !s && t
|
|
596
611
|
}),
|
|
597
612
|
/* @__PURE__ */ I("div", {
|
|
598
|
-
className:
|
|
613
|
+
className: Ze.chipText,
|
|
599
614
|
children: n
|
|
600
615
|
}),
|
|
601
|
-
r && /* @__PURE__ */ I(
|
|
602
|
-
icon:
|
|
616
|
+
r && /* @__PURE__ */ I(He, {
|
|
617
|
+
icon: ce,
|
|
603
618
|
onClick: (e) => {
|
|
604
619
|
e.stopPropagation(), a?.();
|
|
605
620
|
}
|
|
@@ -611,14 +626,14 @@ function Xe({ className: e = "", thumbnail: t = "", text: n = "", showRemoveIcon
|
|
|
611
626
|
}
|
|
612
627
|
//#endregion
|
|
613
628
|
//#region package/common/chip/chipContainer.tsx
|
|
614
|
-
function
|
|
629
|
+
function $e({ className: e = void 0, children: t = null, inline: n = !1, ...r }) {
|
|
615
630
|
return /* @__PURE__ */ I("div", {
|
|
616
631
|
...r,
|
|
617
|
-
className: f(
|
|
632
|
+
className: f(Ze.chipContainer, n && Ze.chipContainerInline, e),
|
|
618
633
|
children: t
|
|
619
634
|
});
|
|
620
635
|
}
|
|
621
|
-
var
|
|
636
|
+
var et = {
|
|
622
637
|
floatingMenu: "floatingMenu_E1XCy",
|
|
623
638
|
"floatingMenu-content": "floatingMenu-content_AmxkA",
|
|
624
639
|
floatingMenuContent: "floatingMenu-content_AmxkA",
|
|
@@ -641,15 +656,15 @@ var Qe = {
|
|
|
641
656
|
"floatingMenu-anim": "floatingMenu-anim_5KB-f",
|
|
642
657
|
floatingMenuAnim: "floatingMenu-anim_5KB-f",
|
|
643
658
|
showMenu: "showMenu_AprCh"
|
|
644
|
-
},
|
|
659
|
+
}, tt = /* @__PURE__ */ function(e) {
|
|
645
660
|
return e.Left = "left", e.Right = "right", e.Center = "center", e;
|
|
646
661
|
}({});
|
|
647
662
|
//#endregion
|
|
648
663
|
//#region package/common/floatingMenu/floatingMenu.tsx
|
|
649
|
-
function
|
|
664
|
+
function nt(e) {
|
|
650
665
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
651
666
|
}
|
|
652
|
-
function
|
|
667
|
+
function rt({ align: e = tt.Left, children: t = null, content: n = null, isOpen: r = !1, onOpenChange: i = () => {}, dontCloseOnChildClick: o = !1, className: s, style: c, classNames: l, styles: p, ...m }) {
|
|
653
668
|
let h = u(null), g = u(null), _ = u(i), [v, y] = d(10), [b, x] = d(null);
|
|
654
669
|
a(() => {
|
|
655
670
|
_.current = i;
|
|
@@ -686,19 +701,19 @@ function tt({ align: e = $e.Left, children: t = null, content: n = null, isOpen:
|
|
|
686
701
|
return window.addEventListener("mouseup", e), () => window.removeEventListener("mouseup", e);
|
|
687
702
|
}, [r, o]), /* @__PURE__ */ L("div", {
|
|
688
703
|
...m,
|
|
689
|
-
className: f(
|
|
704
|
+
className: f(et.floatingMenu, s, l?.root),
|
|
690
705
|
style: {
|
|
691
706
|
...c,
|
|
692
707
|
...p?.root
|
|
693
708
|
},
|
|
694
709
|
children: [/* @__PURE__ */ I("div", {
|
|
695
|
-
className: f(
|
|
710
|
+
className: f(et.floatingMenuContent, l?.trigger),
|
|
696
711
|
style: p?.trigger,
|
|
697
712
|
ref: g,
|
|
698
713
|
onClick: S,
|
|
699
714
|
children: t
|
|
700
715
|
}), r && /* @__PURE__ */ L("div", {
|
|
701
|
-
className: f(
|
|
716
|
+
className: f(et.floatingMenuAnim, l?.menu),
|
|
702
717
|
style: {
|
|
703
718
|
width: `${v}px`,
|
|
704
719
|
...b && {
|
|
@@ -707,16 +722,16 @@ function tt({ align: e = $e.Left, children: t = null, content: n = null, isOpen:
|
|
|
707
722
|
},
|
|
708
723
|
...p?.menu
|
|
709
724
|
},
|
|
710
|
-
children: [/* @__PURE__ */ I("div", { className: f(
|
|
725
|
+
children: [/* @__PURE__ */ I("div", { className: f(et.floatingMenuContainerFlag, et[`floatingMenuContainerFlagAlign${nt(e)}`]) }), /* @__PURE__ */ I("div", {
|
|
711
726
|
ref: h,
|
|
712
|
-
className: f(
|
|
727
|
+
className: f(et.floatingMenuContainer, et[`floatingMenuContainerAlign${nt(e)}`], l?.menuContainer),
|
|
713
728
|
style: p?.menuContainer,
|
|
714
729
|
children: n
|
|
715
730
|
})]
|
|
716
731
|
})]
|
|
717
732
|
});
|
|
718
733
|
}
|
|
719
|
-
var
|
|
734
|
+
var it = {
|
|
720
735
|
tooltipBubble: "tooltipBubble_uyev0",
|
|
721
736
|
tooltipDetails: "tooltipDetails_R7N16",
|
|
722
737
|
"tooltipDetails-icon": "tooltipDetails-icon_rsjns",
|
|
@@ -725,30 +740,30 @@ var nt = {
|
|
|
725
740
|
};
|
|
726
741
|
//#endregion
|
|
727
742
|
//#region package/common/tooltip/tooltip.tsx
|
|
728
|
-
function
|
|
743
|
+
function at({ variant: e, message: t = "", isVisible: n = !0, tooltipPosition: r, onClick: i }) {
|
|
729
744
|
let [a, o] = d(!1);
|
|
730
745
|
return e === "info" ? n ? /* @__PURE__ */ I("div", {
|
|
731
|
-
className: f(
|
|
746
|
+
className: f(it.tooltipBubble, r),
|
|
732
747
|
onClick: i,
|
|
733
748
|
children: t
|
|
734
749
|
}) : null : e === "details" ? /* @__PURE__ */ L("div", {
|
|
735
|
-
className:
|
|
750
|
+
className: it.tooltipDetails,
|
|
736
751
|
children: [/* @__PURE__ */ I("span", {
|
|
737
|
-
className:
|
|
752
|
+
className: it.tooltipDetailsIcon,
|
|
738
753
|
onMouseEnter: () => o(!0),
|
|
739
754
|
onMouseLeave: () => o(!1),
|
|
740
755
|
children: "?"
|
|
741
756
|
}), a && /* @__PURE__ */ I("div", {
|
|
742
|
-
className: f(
|
|
757
|
+
className: f(it.tooltipBubble, r),
|
|
743
758
|
children: t
|
|
744
759
|
})]
|
|
745
760
|
}) : e === "error" && n ? /* @__PURE__ */ I("div", {
|
|
746
|
-
className: f(
|
|
761
|
+
className: f(it.tooltipError, r),
|
|
747
762
|
onClick: i,
|
|
748
763
|
children: t
|
|
749
764
|
}) : null;
|
|
750
765
|
}
|
|
751
|
-
var
|
|
766
|
+
var K = {
|
|
752
767
|
"required-mark": "required-mark_xGJdX",
|
|
753
768
|
requiredMark: "required-mark_xGJdX",
|
|
754
769
|
isRequired: "isRequired_Jkn3h",
|
|
@@ -800,10 +815,6 @@ var q = {
|
|
|
800
815
|
inputFieldWithIcon: "input-field-withIcon_VpfmK",
|
|
801
816
|
"input-field-withIcon-left": "input-field-withIcon-left_Io7lU",
|
|
802
817
|
inputFieldWithIconLeft: "input-field-withIcon-left_Io7lU",
|
|
803
|
-
"input-field-field": "input-field-field_u6UjZ",
|
|
804
|
-
inputFieldField: "input-field-field_u6UjZ",
|
|
805
|
-
"input-field-field-default": "input-field-field-default_huHVO",
|
|
806
|
-
inputFieldFieldDefault: "input-field-field-default_huHVO",
|
|
807
818
|
"input-field-suffix": "input-field-suffix_NZpXp",
|
|
808
819
|
inputFieldSuffix: "input-field-suffix_NZpXp",
|
|
809
820
|
"input-field-date": "input-field-date_UHJEZ",
|
|
@@ -824,188 +835,190 @@ var q = {
|
|
|
824
835
|
inputFieldIconNotClickable: "input-field-icon-notClickable_7j24I",
|
|
825
836
|
"input-error": "input-error_LIG23",
|
|
826
837
|
inputError: "input-error_LIG23"
|
|
827
|
-
},
|
|
838
|
+
}, q = /* @__PURE__ */ function(e) {
|
|
828
839
|
return e.Edit = "edit", e.Phone = "phone", e.Email = "email", e.Iban = "iban", e.Date = "date", e.HasNoIcon = "hasNoIcon", e.Search = "searchInput", e.Password = "password", e;
|
|
829
840
|
}({});
|
|
830
841
|
//#endregion
|
|
831
842
|
//#region package/common/input/input.tsx
|
|
832
|
-
function
|
|
833
|
-
let [
|
|
834
|
-
let e =
|
|
843
|
+
function ot({ name: t = "", label: n = "", errorMessage: r = "", isValid: o = !0, className: s = "", style: c, value: l = "", icon: m = null, onChange: h = () => {}, onFocus: g = null, onBlur: _ = null, onMouseEnter: v = null, onMouseLeave: y = null, isUppercase: b = !1, isRequired: x = !1, tabIndex: S = 0, type: C = void 0, isRow: w = !1, onIconClick: T = null, parse: O = null, formValidator: k = null, autoFocus: A = !1, suffix: te = null, upperRightLabel: ne = null, labelInBorder: N = !1, showCancel: ie = !1, onClearClicked: ae, min: oe = null, max: se = null, placeholder: ce = "", useMatLabelStyle: F = !0, autoComplete: le = null, onClick: ue = () => null, readOnly: de = !1, customInput: fe, alwaysShowCancel: pe = !1, multiline: R = !1, rows: me, autoResize: he = !1, classNames: z, styles: B, disabled: V = !1, ...ge }) {
|
|
844
|
+
let [_e, ve] = d(!1), [ye, be] = d(!1), [xe, Se] = d(!1), [, Ce] = d(0), we = u(null), Te = u(k), Ee = i(() => {
|
|
845
|
+
let e = we.current;
|
|
835
846
|
!e || !he || (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
836
847
|
}, [he]);
|
|
837
848
|
a(() => {
|
|
838
849
|
setTimeout(() => {
|
|
839
|
-
|
|
840
|
-
}, 1),
|
|
850
|
+
ve(!1), be(!1);
|
|
851
|
+
}, 1), Ee();
|
|
841
852
|
}, []), a(() => {
|
|
842
|
-
|
|
843
|
-
|
|
853
|
+
A && we.current && setTimeout(() => {
|
|
854
|
+
we.current?.focus();
|
|
844
855
|
}, 1);
|
|
845
|
-
}, [
|
|
846
|
-
|
|
847
|
-
let e =
|
|
856
|
+
}, [A]), a(() => {
|
|
857
|
+
Te.current = k;
|
|
858
|
+
let e = Te.current;
|
|
848
859
|
if (!e) return;
|
|
849
860
|
e.label = n ?? "", e.validate();
|
|
850
|
-
let t = () =>
|
|
861
|
+
let t = () => Ce((e) => e + 1);
|
|
851
862
|
return e.registerOnUpdateListener(t), () => {
|
|
852
863
|
e.removeOnUpdateListener(t);
|
|
853
864
|
};
|
|
854
865
|
}, [k, n]);
|
|
855
|
-
let
|
|
856
|
-
|
|
857
|
-
},
|
|
858
|
-
|
|
859
|
-
},
|
|
860
|
-
|
|
861
|
-
},
|
|
862
|
-
|
|
863
|
-
},
|
|
866
|
+
let De = () => k ? k.touched && k.hasError() : !o || !!r, H = () => !!(x || k && k.validators.find((e) => e.validatorId === "required")), Oe = (e) => {
|
|
867
|
+
be(!0), v && v(e);
|
|
868
|
+
}, ke = (e) => {
|
|
869
|
+
be(!1), y && y(e);
|
|
870
|
+
}, Ae = (e) => {
|
|
871
|
+
ve(!0), g && g(e);
|
|
872
|
+
}, je = (e) => {
|
|
873
|
+
Te.current && (Te.current.touched = !0), ve(!1), _ && _(e);
|
|
874
|
+
}, Me = (e) => {
|
|
864
875
|
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
|
-
},
|
|
869
|
-
className: f(
|
|
870
|
-
[
|
|
871
|
-
[
|
|
876
|
+
typeof e == "string" ? n = e : (t = e, n = e.target.value), O && (n = O(n)), k && k.set(n), h && h(n, t), Ee();
|
|
877
|
+
}, Ne = () => {
|
|
878
|
+
if (C !== "email") return C === "password" && xe ? "text" : C;
|
|
879
|
+
}, Pe = C && C !== q.Date && C !== q.Iban && C !== q.HasNoIcon, U = Pe && !F && (C === q.Email || C === q.Phone || C === q.Search), Fe = {
|
|
880
|
+
className: f(K.inputFieldIcon, {
|
|
881
|
+
[K.inputFieldIconNotClickable]: !T,
|
|
882
|
+
[K.inputFieldIconLeft]: U
|
|
872
883
|
}),
|
|
873
|
-
onClick:
|
|
874
|
-
},
|
|
875
|
-
className: f(
|
|
876
|
-
onClick: () =>
|
|
877
|
-
},
|
|
878
|
-
|
|
879
|
-
let
|
|
884
|
+
onClick: T ?? void 0
|
|
885
|
+
}, Ie = {
|
|
886
|
+
className: f(K.inputFieldIcon, K.inputFieldIconPassword),
|
|
887
|
+
onClick: () => Se(!xe)
|
|
888
|
+
}, W = De(), Le = n;
|
|
889
|
+
Le && H() && (Le = `${Le} *`);
|
|
890
|
+
let Re = k ? k.value : l, ze = F && (_e || Re || C === q.Date);
|
|
880
891
|
return /* @__PURE__ */ L("div", {
|
|
881
|
-
className: f(
|
|
892
|
+
className: f(K.input, s),
|
|
882
893
|
style: c,
|
|
883
894
|
children: [
|
|
884
895
|
/* @__PURE__ */ L("label", {
|
|
885
896
|
htmlFor: t,
|
|
886
|
-
className: f(
|
|
887
|
-
[
|
|
888
|
-
[
|
|
897
|
+
className: f(K.inputLabel, z?.label, {
|
|
898
|
+
[K.inputLabelColumn]: !w,
|
|
899
|
+
[K.inputLabelInBorder]: N
|
|
889
900
|
}),
|
|
890
901
|
style: B?.label,
|
|
891
902
|
children: [
|
|
892
|
-
|
|
893
|
-
className:
|
|
894
|
-
children: [`${
|
|
895
|
-
className: f(
|
|
903
|
+
Le && !F ? /* @__PURE__ */ L("span", {
|
|
904
|
+
className: K.inputLabelText,
|
|
905
|
+
children: [`${Le} `, H() ? /* @__PURE__ */ I("span", {
|
|
906
|
+
className: f(K.isRequired),
|
|
896
907
|
children: "\xA0 *"
|
|
897
908
|
}) : null]
|
|
898
909
|
}) : null,
|
|
899
|
-
|
|
900
|
-
className: f(
|
|
910
|
+
ne && /* @__PURE__ */ I("div", {
|
|
911
|
+
className: f(K.inputUpperRightLabel, z?.upperRightLabel),
|
|
901
912
|
style: B?.upperRightLabel,
|
|
902
|
-
children:
|
|
913
|
+
children: ne
|
|
903
914
|
}),
|
|
904
915
|
/* @__PURE__ */ L("div", {
|
|
905
|
-
className: f(
|
|
916
|
+
className: f(K.inputContainer, { [K.inputContainerMultiline]: R }, z?.container),
|
|
906
917
|
style: B?.container,
|
|
907
|
-
onMouseEnter:
|
|
908
|
-
onMouseLeave:
|
|
918
|
+
onMouseEnter: Oe,
|
|
919
|
+
onMouseLeave: ke,
|
|
909
920
|
children: [
|
|
910
921
|
m,
|
|
911
922
|
e.cloneElement(fe || I(R ? "textarea" : "input", {}), {
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
[
|
|
915
|
-
[
|
|
916
|
-
[
|
|
917
|
-
[
|
|
918
|
-
[
|
|
919
|
-
[
|
|
923
|
+
...ge,
|
|
924
|
+
className: f(K.inputField, {
|
|
925
|
+
[K.inputFieldUppercase]: b,
|
|
926
|
+
[K.inputFieldDate]: C === q.Date,
|
|
927
|
+
[K.inputFieldDefault]: C !== q.Date,
|
|
928
|
+
[K.inputFieldWithIcon]: Pe,
|
|
929
|
+
[K.inputFieldWithIconLeft]: U,
|
|
930
|
+
[K.inputFieldMultiline]: R,
|
|
931
|
+
[K.inputFieldMultilineAutoResize]: R && he
|
|
920
932
|
}, z?.input),
|
|
921
933
|
name: t,
|
|
922
934
|
id: t,
|
|
923
935
|
value: k ? k.value : l,
|
|
924
936
|
tabIndex: S,
|
|
925
|
-
ref: fe ? void 0 :
|
|
926
|
-
onChange:
|
|
927
|
-
onFocus:
|
|
928
|
-
onBlur:
|
|
929
|
-
placeholder:
|
|
937
|
+
ref: fe ? void 0 : we,
|
|
938
|
+
onChange: Me,
|
|
939
|
+
onFocus: Ae,
|
|
940
|
+
onBlur: je,
|
|
941
|
+
placeholder: F ? "" : ce,
|
|
930
942
|
autoComplete: le,
|
|
931
943
|
onClick: ue,
|
|
932
944
|
readOnly: de,
|
|
945
|
+
disabled: V,
|
|
933
946
|
...!R && {
|
|
934
|
-
type:
|
|
947
|
+
type: Ne(),
|
|
935
948
|
min: oe,
|
|
936
|
-
max:
|
|
949
|
+
max: se
|
|
937
950
|
},
|
|
938
951
|
...R && me !== void 0 && { rows: me }
|
|
939
952
|
}),
|
|
940
|
-
|
|
941
|
-
className: f(
|
|
953
|
+
te && /* @__PURE__ */ I("div", {
|
|
954
|
+
className: f(K.inputFieldSuffix, z?.suffix),
|
|
942
955
|
style: B?.suffix,
|
|
943
|
-
children:
|
|
956
|
+
children: te
|
|
944
957
|
})
|
|
945
958
|
]
|
|
946
959
|
}),
|
|
947
960
|
/* @__PURE__ */ I("fieldset", {
|
|
948
|
-
className: f(
|
|
949
|
-
[
|
|
950
|
-
[
|
|
951
|
-
[
|
|
952
|
-
[
|
|
961
|
+
className: f(K.inputFieldset, z?.fieldset, {
|
|
962
|
+
[K.inputContainerBorderFocused]: _e,
|
|
963
|
+
[K.inputContainerBorderSearchFocused]: C === q.Search && (_e || l),
|
|
964
|
+
[K.inputContainerBorderInvalid]: W,
|
|
965
|
+
[K.inputContainerBorderError]: W
|
|
953
966
|
}),
|
|
954
967
|
style: B?.fieldset,
|
|
955
968
|
children: /* @__PURE__ */ I("legend", {
|
|
956
|
-
className: f(
|
|
957
|
-
children: /* @__PURE__ */ I("span", { children:
|
|
969
|
+
className: f(K.inputFieldsetLegend, { [K.inputFieldsetLegendActive]: ze }),
|
|
970
|
+
children: /* @__PURE__ */ I("span", { children: Le })
|
|
958
971
|
})
|
|
959
972
|
}),
|
|
960
|
-
|
|
961
|
-
className: f(
|
|
962
|
-
[
|
|
963
|
-
[
|
|
973
|
+
F && n && /* @__PURE__ */ I("div", {
|
|
974
|
+
className: f(K.inputMatLabel, {
|
|
975
|
+
[K.inputMatLabelFloating]: ze,
|
|
976
|
+
[K.inputMatLabelMultiline]: R && !ze
|
|
964
977
|
}),
|
|
965
|
-
children:
|
|
978
|
+
children: Le
|
|
966
979
|
}),
|
|
967
|
-
|
|
968
|
-
className: f(
|
|
969
|
-
children:
|
|
980
|
+
F && ce && /* @__PURE__ */ I("div", {
|
|
981
|
+
className: f(K.inputPlaceholder, _e && !Re && K.inputPlaceholderShown, R && K.inputPlaceholderMultiline),
|
|
982
|
+
children: ce
|
|
970
983
|
}),
|
|
971
|
-
/* @__PURE__ */ I(
|
|
984
|
+
/* @__PURE__ */ I(at, {
|
|
972
985
|
variant: "error",
|
|
973
986
|
message: k ? k.getCurrentErrorMessage() : r || "",
|
|
974
|
-
isVisible:
|
|
987
|
+
isVisible: W && (_e || ye)
|
|
975
988
|
})
|
|
976
989
|
]
|
|
977
990
|
}),
|
|
978
|
-
C ===
|
|
979
|
-
icon:
|
|
980
|
-
...
|
|
991
|
+
C === q.Phone && /* @__PURE__ */ I(p, {
|
|
992
|
+
icon: M,
|
|
993
|
+
...Fe
|
|
981
994
|
}),
|
|
982
|
-
C ===
|
|
983
|
-
icon:
|
|
984
|
-
...
|
|
995
|
+
C === q.Email && /* @__PURE__ */ I(p, {
|
|
996
|
+
icon: E,
|
|
997
|
+
...Fe
|
|
985
998
|
}),
|
|
986
|
-
C ===
|
|
987
|
-
icon:
|
|
988
|
-
...
|
|
999
|
+
C === q.Edit && /* @__PURE__ */ I(p, {
|
|
1000
|
+
icon: j,
|
|
1001
|
+
...Fe
|
|
989
1002
|
}),
|
|
990
|
-
C ===
|
|
991
|
-
icon:
|
|
992
|
-
...
|
|
1003
|
+
C === q.Search && /* @__PURE__ */ I(p, {
|
|
1004
|
+
icon: re,
|
|
1005
|
+
...Fe
|
|
993
1006
|
}),
|
|
994
|
-
C ===
|
|
995
|
-
icon:
|
|
996
|
-
...
|
|
1007
|
+
C === q.Password && /* @__PURE__ */ I(p, {
|
|
1008
|
+
icon: xe ? D : ee,
|
|
1009
|
+
...Ie
|
|
997
1010
|
}),
|
|
998
|
-
(ie && l && (
|
|
999
|
-
icon:
|
|
1000
|
-
className:
|
|
1011
|
+
(ie && l && (_e || ye) || pe) && /* @__PURE__ */ I(p, {
|
|
1012
|
+
icon: P,
|
|
1013
|
+
className: K.inputFieldIcon,
|
|
1001
1014
|
onClick: ae ?? void 0,
|
|
1002
|
-
onMouseEnter: () =>
|
|
1003
|
-
onMouseLeave: () =>
|
|
1015
|
+
onMouseEnter: () => be(!0),
|
|
1016
|
+
onMouseLeave: () => be(!1)
|
|
1004
1017
|
})
|
|
1005
1018
|
]
|
|
1006
1019
|
});
|
|
1007
1020
|
}
|
|
1008
|
-
var
|
|
1021
|
+
var J = {
|
|
1009
1022
|
colorPicker: "colorPicker_Ts3an",
|
|
1010
1023
|
swatch: "swatch_NW78g",
|
|
1011
1024
|
swatchHex: "swatchHex_j7-i5",
|
|
@@ -1020,10 +1033,10 @@ var Y = {
|
|
|
1020
1033
|
};
|
|
1021
1034
|
//#endregion
|
|
1022
1035
|
//#region package/common/colorPicker/colorPicker.tsx
|
|
1023
|
-
function
|
|
1036
|
+
function st(e) {
|
|
1024
1037
|
return /^#[0-9a-fA-F]{6}$/.test(e) || /^#[0-9a-fA-F]{8}$/.test(e);
|
|
1025
1038
|
}
|
|
1026
|
-
function
|
|
1039
|
+
function ct(e) {
|
|
1027
1040
|
return /^#[0-9a-fA-F]{8}$/.test(e) ? {
|
|
1028
1041
|
hex6: e.slice(0, 7),
|
|
1029
1042
|
alpha: Math.round(parseInt(e.slice(7, 9), 16) / 255 * 100)
|
|
@@ -1032,13 +1045,13 @@ function ot(e) {
|
|
|
1032
1045
|
alpha: 100
|
|
1033
1046
|
};
|
|
1034
1047
|
}
|
|
1035
|
-
function
|
|
1048
|
+
function lt(e, t, n) {
|
|
1036
1049
|
return !n || t >= 100 ? e : `${e}${Math.round(t / 100 * 255).toString(16).padStart(2, "0")}`;
|
|
1037
1050
|
}
|
|
1038
|
-
function
|
|
1051
|
+
function ut(e, t) {
|
|
1039
1052
|
return `rgba(${parseInt(e.slice(1, 3), 16)}, ${parseInt(e.slice(3, 5), 16)}, ${parseInt(e.slice(5, 7), 16)}, ${t / 100})`;
|
|
1040
1053
|
}
|
|
1041
|
-
function
|
|
1054
|
+
function dt(e) {
|
|
1042
1055
|
let t = parseInt(e.slice(1, 3), 16) / 255, n = parseInt(e.slice(3, 5), 16) / 255, r = parseInt(e.slice(5, 7), 16) / 255, i = Math.max(t, n, r), a = i - Math.min(t, n, r), o = 0;
|
|
1043
1056
|
a !== 0 && (o = i === t ? (n - r) / a % 6 : i === n ? (r - t) / a + 2 : (t - n) / a + 4, o = Math.round(o * 60), o < 0 && (o += 360));
|
|
1044
1057
|
let s = i === 0 ? 0 : Math.round(a / i * 100), c = Math.round(i * 100);
|
|
@@ -1048,13 +1061,13 @@ function lt(e) {
|
|
|
1048
1061
|
v: c
|
|
1049
1062
|
};
|
|
1050
1063
|
}
|
|
1051
|
-
function
|
|
1064
|
+
function ft(e, t, n) {
|
|
1052
1065
|
let r = t / 100, i = n / 100, a = i * r, o = a * (1 - Math.abs(e / 60 % 2 - 1)), s = i - a, c = 0, l = 0, u = 0;
|
|
1053
1066
|
e < 60 ? (c = a, l = o, u = 0) : e < 120 ? (c = o, l = a, u = 0) : e < 180 ? (c = 0, l = a, u = o) : e < 240 ? (c = 0, l = o, u = a) : e < 300 ? (c = o, l = 0, u = a) : (c = a, l = 0, u = o);
|
|
1054
1067
|
let d = (e) => Math.round((e + s) * 255).toString(16).padStart(2, "0");
|
|
1055
1068
|
return `#${d(c)}${d(l)}${d(u)}`;
|
|
1056
1069
|
}
|
|
1057
|
-
function
|
|
1070
|
+
function pt({ hex: e, onChange: t, useInputComponent: n = !1 }) {
|
|
1058
1071
|
let [r, i] = d(e);
|
|
1059
1072
|
a(() => {
|
|
1060
1073
|
i(e);
|
|
@@ -1062,12 +1075,12 @@ function dt({ hex: e, onChange: t, useInputComponent: n = !1 }) {
|
|
|
1062
1075
|
function o(e) {
|
|
1063
1076
|
i(e);
|
|
1064
1077
|
let n = e.startsWith("#") ? e : `#${e}`;
|
|
1065
|
-
|
|
1078
|
+
st(n) && t(n);
|
|
1066
1079
|
}
|
|
1067
1080
|
function s() {
|
|
1068
|
-
|
|
1081
|
+
st(r.startsWith("#") ? r : `#${r}`) || i(e);
|
|
1069
1082
|
}
|
|
1070
|
-
return n ? /* @__PURE__ */ I(
|
|
1083
|
+
return n ? /* @__PURE__ */ I(ot, {
|
|
1071
1084
|
value: r,
|
|
1072
1085
|
onChange: (e) => o(e),
|
|
1073
1086
|
onBlur: s
|
|
@@ -1076,11 +1089,11 @@ function dt({ hex: e, onChange: t, useInputComponent: n = !1 }) {
|
|
|
1076
1089
|
value: r,
|
|
1077
1090
|
onChange: (e) => o(e.target.value),
|
|
1078
1091
|
onBlur: s,
|
|
1079
|
-
className:
|
|
1092
|
+
className: J.hexInput,
|
|
1080
1093
|
spellCheck: !1
|
|
1081
1094
|
});
|
|
1082
1095
|
}
|
|
1083
|
-
function
|
|
1096
|
+
function mt({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, onAlphaChange: o, showInput: s = !0, showAlpha: c = !1 }) {
|
|
1084
1097
|
let l = u(null);
|
|
1085
1098
|
function d(e) {
|
|
1086
1099
|
let t = l.current.getBoundingClientRect(), n = Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)), r = Math.max(0, Math.min(1, (e.clientY - t.top) / t.height));
|
|
@@ -1101,20 +1114,20 @@ function ft({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, o
|
|
|
1101
1114
|
window.addEventListener("mousemove", r), window.addEventListener("mouseup", i);
|
|
1102
1115
|
}
|
|
1103
1116
|
function p(e) {
|
|
1104
|
-
let { hex6: t, alpha: n } =
|
|
1117
|
+
let { hex6: t, alpha: n } = ct(e), { h: r, s, v: l } = dt(t);
|
|
1105
1118
|
i(r), a(s, l), c && o(n);
|
|
1106
1119
|
}
|
|
1107
|
-
let m =
|
|
1120
|
+
let m = ft(e, t, n), h = c ? lt(m, r, !0) : m;
|
|
1108
1121
|
return /* @__PURE__ */ L("div", {
|
|
1109
|
-
className:
|
|
1122
|
+
className: J.panel,
|
|
1110
1123
|
children: [
|
|
1111
1124
|
/* @__PURE__ */ L("div", {
|
|
1112
1125
|
ref: l,
|
|
1113
|
-
className:
|
|
1126
|
+
className: J.gradientArea,
|
|
1114
1127
|
style: { "--hue": e },
|
|
1115
1128
|
onMouseDown: f,
|
|
1116
|
-
children: [/* @__PURE__ */ I("div", { className:
|
|
1117
|
-
className:
|
|
1129
|
+
children: [/* @__PURE__ */ I("div", { className: J.gradientOverlay }), /* @__PURE__ */ I("div", {
|
|
1130
|
+
className: J.cursor,
|
|
1118
1131
|
style: {
|
|
1119
1132
|
left: `${t}%`,
|
|
1120
1133
|
top: `${100 - n}%`
|
|
@@ -1127,7 +1140,7 @@ function ft({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, o
|
|
|
1127
1140
|
max: 359,
|
|
1128
1141
|
value: e,
|
|
1129
1142
|
onChange: (e) => i(Number(e.target.value)),
|
|
1130
|
-
className:
|
|
1143
|
+
className: J.hueSlider
|
|
1131
1144
|
}),
|
|
1132
1145
|
c && /* @__PURE__ */ I("input", {
|
|
1133
1146
|
type: "range",
|
|
@@ -1135,19 +1148,19 @@ function ft({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, o
|
|
|
1135
1148
|
max: 100,
|
|
1136
1149
|
value: r,
|
|
1137
1150
|
onChange: (e) => o(Number(e.target.value)),
|
|
1138
|
-
className:
|
|
1151
|
+
className: J.alphaSlider,
|
|
1139
1152
|
style: { "--alpha-color": m }
|
|
1140
1153
|
}),
|
|
1141
|
-
s && /* @__PURE__ */ I(
|
|
1154
|
+
s && /* @__PURE__ */ I(pt, {
|
|
1142
1155
|
hex: h,
|
|
1143
1156
|
onChange: p
|
|
1144
1157
|
})
|
|
1145
1158
|
]
|
|
1146
1159
|
});
|
|
1147
1160
|
}
|
|
1148
|
-
var
|
|
1149
|
-
function
|
|
1150
|
-
let [s, c] = d(!1), { hex6: l, alpha: p } =
|
|
1161
|
+
var ht = "#3b82f6";
|
|
1162
|
+
function gt({ className: e, value: t = ht, onChange: n, showInput: r = !1, showAlpha: i = !1, inline: a = !1, ...o }) {
|
|
1163
|
+
let [s, c] = d(!1), { hex6: l, alpha: p } = ct(st(t) ? t : ht), m = dt(l), [h, g] = d({
|
|
1151
1164
|
h: m.h,
|
|
1152
1165
|
s: m.s,
|
|
1153
1166
|
v: m.v,
|
|
@@ -1155,9 +1168,9 @@ function mt({ className: e, value: t = pt, onChange: n, showInput: r = !1, showA
|
|
|
1155
1168
|
}), _ = u(h), [v, y] = d(t);
|
|
1156
1169
|
if (t !== v) {
|
|
1157
1170
|
y(t);
|
|
1158
|
-
let { hex6: e, alpha: n } =
|
|
1159
|
-
if (e !==
|
|
1160
|
-
let t =
|
|
1171
|
+
let { hex6: e, alpha: n } = ct(st(t) ? t : ht);
|
|
1172
|
+
if (e !== ft(h.h, h.s, h.v) || n !== h.a) {
|
|
1173
|
+
let t = dt(e);
|
|
1161
1174
|
g({
|
|
1162
1175
|
h: t.h,
|
|
1163
1176
|
s: t.s,
|
|
@@ -1168,7 +1181,7 @@ function mt({ className: e, value: t = pt, onChange: n, showInput: r = !1, showA
|
|
|
1168
1181
|
}
|
|
1169
1182
|
let { h: b, s: x, v: S, a: C } = h;
|
|
1170
1183
|
function w(e, t, r, a) {
|
|
1171
|
-
n?.(
|
|
1184
|
+
n?.(lt(ft(e, t, r), a, i));
|
|
1172
1185
|
}
|
|
1173
1186
|
function T(e) {
|
|
1174
1187
|
_.current.h = e, g((t) => ({
|
|
@@ -1189,7 +1202,7 @@ function mt({ className: e, value: t = pt, onChange: n, showInput: r = !1, showA
|
|
|
1189
1202
|
a: e
|
|
1190
1203
|
})), w(_.current.h, _.current.s, _.current.v, e);
|
|
1191
1204
|
}
|
|
1192
|
-
let D =
|
|
1205
|
+
let D = ft(b, x, S), O = i ? ut(D, C) : D, k = lt(D, C, i), A = {
|
|
1193
1206
|
hue: b,
|
|
1194
1207
|
sat: x,
|
|
1195
1208
|
val: S,
|
|
@@ -1201,38 +1214,38 @@ function mt({ className: e, value: t = pt, onChange: n, showInput: r = !1, showA
|
|
|
1201
1214
|
};
|
|
1202
1215
|
return a ? /* @__PURE__ */ I("div", {
|
|
1203
1216
|
...o,
|
|
1204
|
-
className: f(
|
|
1205
|
-
children: /* @__PURE__ */ I(
|
|
1206
|
-
...
|
|
1217
|
+
className: f(J.colorPicker, e),
|
|
1218
|
+
children: /* @__PURE__ */ I(mt, {
|
|
1219
|
+
...A,
|
|
1207
1220
|
showInput: r
|
|
1208
1221
|
})
|
|
1209
1222
|
}) : /* @__PURE__ */ L("div", {
|
|
1210
1223
|
...o,
|
|
1211
|
-
className: f(
|
|
1212
|
-
children: [/* @__PURE__ */ I(
|
|
1224
|
+
className: f(J.colorPicker, e),
|
|
1225
|
+
children: [/* @__PURE__ */ I(rt, {
|
|
1213
1226
|
isOpen: s,
|
|
1214
1227
|
onOpenChange: c,
|
|
1215
1228
|
dontCloseOnChildClick: !0,
|
|
1216
|
-
align:
|
|
1217
|
-
content: /* @__PURE__ */ I(
|
|
1218
|
-
children: /* @__PURE__ */ L(
|
|
1219
|
-
className:
|
|
1229
|
+
align: tt.Left,
|
|
1230
|
+
content: /* @__PURE__ */ I(mt, { ...A }),
|
|
1231
|
+
children: /* @__PURE__ */ L(Be, {
|
|
1232
|
+
className: J.swatch,
|
|
1220
1233
|
children: [/* @__PURE__ */ I("div", {
|
|
1221
|
-
className:
|
|
1234
|
+
className: J.swatchFill,
|
|
1222
1235
|
style: { background: O }
|
|
1223
1236
|
}), /* @__PURE__ */ I("span", {
|
|
1224
|
-
className:
|
|
1237
|
+
className: J.swatchHex,
|
|
1225
1238
|
children: k
|
|
1226
1239
|
})]
|
|
1227
1240
|
})
|
|
1228
|
-
}), r && /* @__PURE__ */ I(
|
|
1241
|
+
}), r && /* @__PURE__ */ I(pt, {
|
|
1229
1242
|
hex: k,
|
|
1230
1243
|
onChange: (e) => n?.(e),
|
|
1231
1244
|
useInputComponent: !0
|
|
1232
1245
|
})]
|
|
1233
1246
|
});
|
|
1234
1247
|
}
|
|
1235
|
-
var
|
|
1248
|
+
var _t = {
|
|
1236
1249
|
modal: "modal_L-Fkd",
|
|
1237
1250
|
slideIn: "slideIn_RVIHR",
|
|
1238
1251
|
fadeIn: "fadeIn_XSuIE",
|
|
@@ -1247,26 +1260,26 @@ var ht = {
|
|
|
1247
1260
|
};
|
|
1248
1261
|
//#endregion
|
|
1249
1262
|
//#region package/common/modal/modal.tsx
|
|
1250
|
-
function
|
|
1263
|
+
function vt({ children: e = null, title: t = "", isOpen: n = !1, onClose: r = () => null, className: i = "", style: o, hideHeader: s = !1, classNames: c, styles: l }) {
|
|
1251
1264
|
let [u, m] = d(n), [h, g] = d(n);
|
|
1252
1265
|
return a(() => {
|
|
1253
1266
|
n ? (m(n), setTimeout(() => g(!0), 1)) : (g(!1), setTimeout(() => m(n), 300));
|
|
1254
|
-
}, [n]), u ? /* @__PURE__ */ I(
|
|
1255
|
-
className: f(
|
|
1267
|
+
}, [n]), u ? /* @__PURE__ */ I(Ue, { children: /* @__PURE__ */ L("div", {
|
|
1268
|
+
className: f(_t.modalContainer, c?.container),
|
|
1256
1269
|
style: l?.container,
|
|
1257
1270
|
children: [/* @__PURE__ */ I("div", {
|
|
1258
|
-
className: f(
|
|
1271
|
+
className: f(_t.modalWrapper, h && _t.modalWrapperShown, c?.backdrop),
|
|
1259
1272
|
style: l?.backdrop,
|
|
1260
1273
|
onClick: r
|
|
1261
1274
|
}), h && /* @__PURE__ */ L("div", {
|
|
1262
|
-
className: f(
|
|
1275
|
+
className: f(_t.modal, h && _t.modalShown, i, c?.modal),
|
|
1263
1276
|
style: {
|
|
1264
1277
|
...o,
|
|
1265
1278
|
...l?.modal
|
|
1266
1279
|
},
|
|
1267
1280
|
onClick: (e) => e.stopPropagation(),
|
|
1268
1281
|
children: [!s && /* @__PURE__ */ L("div", {
|
|
1269
|
-
className: f(
|
|
1282
|
+
className: f(_t.modalHeader, c?.header),
|
|
1270
1283
|
style: l?.header,
|
|
1271
1284
|
children: [/* @__PURE__ */ I("div", {
|
|
1272
1285
|
className: c?.title,
|
|
@@ -1274,7 +1287,7 @@ function gt({ children: e = null, title: t = "", isOpen: n = !1, onClose: r = ()
|
|
|
1274
1287
|
children: t
|
|
1275
1288
|
}), /* @__PURE__ */ I(p, {
|
|
1276
1289
|
onClick: r,
|
|
1277
|
-
icon:
|
|
1290
|
+
icon: P,
|
|
1278
1291
|
className: c?.closeButton,
|
|
1279
1292
|
style: l?.closeButton
|
|
1280
1293
|
})]
|
|
@@ -1284,7 +1297,7 @@ function gt({ children: e = null, title: t = "", isOpen: n = !1, onClose: r = ()
|
|
|
1284
1297
|
}
|
|
1285
1298
|
//#endregion
|
|
1286
1299
|
//#region package/common/confirmModal/confirmModal.tsx
|
|
1287
|
-
function
|
|
1300
|
+
function yt({ children: e = null, className: t = "", onClose: n = () => {}, onConfirm: r = () => {}, title: i = "", content: a = null, isOpen: o = void 0 }) {
|
|
1288
1301
|
let [s, c] = d(!1), [l, u] = d(!1);
|
|
1289
1302
|
function f(e = !1) {
|
|
1290
1303
|
c(!1), n(e);
|
|
@@ -1302,11 +1315,11 @@ function _t({ children: e = null, className: t = "", onClose: n = () => {}, onCo
|
|
|
1302
1315
|
children: [/* @__PURE__ */ I("span", {
|
|
1303
1316
|
onClick: () => c(!0),
|
|
1304
1317
|
children: e
|
|
1305
|
-
}), /* @__PURE__ */ L(
|
|
1318
|
+
}), /* @__PURE__ */ L(vt, {
|
|
1306
1319
|
title: i,
|
|
1307
1320
|
isOpen: o === void 0 ? s : o,
|
|
1308
1321
|
onClose: () => f(),
|
|
1309
|
-
children: [a, /* @__PURE__ */ I(
|
|
1322
|
+
children: [a, /* @__PURE__ */ I(Le, {
|
|
1310
1323
|
onClose: () => f(),
|
|
1311
1324
|
onSubmit: p,
|
|
1312
1325
|
submitLabel: "Confirm",
|
|
@@ -1315,7 +1328,7 @@ function _t({ children: e = null, className: t = "", onClose: n = () => {}, onCo
|
|
|
1315
1328
|
})]
|
|
1316
1329
|
});
|
|
1317
1330
|
}
|
|
1318
|
-
var
|
|
1331
|
+
var bt = {
|
|
1319
1332
|
"datePickerMonth-item": "datePickerMonth-item_30WWy",
|
|
1320
1333
|
datePickerMonthItem: "datePickerMonth-item_30WWy",
|
|
1321
1334
|
"datePickerMonth-content": "datePickerMonth-content_9bbSs",
|
|
@@ -1334,7 +1347,7 @@ var vt = {
|
|
|
1334
1347
|
datePickerMonthDayDisabled: "datePickerMonth-day-disabled_4t0Ci",
|
|
1335
1348
|
"datePickerMonth-placeholder": "datePickerMonth-placeholder_gy1Yx",
|
|
1336
1349
|
datePickerMonthPlaceholder: "datePickerMonth-placeholder_gy1Yx"
|
|
1337
|
-
},
|
|
1350
|
+
}, xt = [
|
|
1338
1351
|
"de_AT",
|
|
1339
1352
|
"de_CH",
|
|
1340
1353
|
"de_DE",
|
|
@@ -1342,10 +1355,10 @@ var vt = {
|
|
|
1342
1355
|
"en_GB",
|
|
1343
1356
|
"de",
|
|
1344
1357
|
"en"
|
|
1345
|
-
],
|
|
1346
|
-
let e = navigator.languages[0]?.replace("-", "_") ||
|
|
1347
|
-
return
|
|
1348
|
-
},
|
|
1358
|
+
], St = "en_US", Ct = () => {
|
|
1359
|
+
let e = navigator.languages[0]?.replace("-", "_") || St;
|
|
1360
|
+
return xt.includes(e) ? e === "en_GB" || e === "en" ? "en_US" : e === "de" ? "de_DE" : e : St;
|
|
1361
|
+
}, wt = (e) => {
|
|
1349
1362
|
switch (e) {
|
|
1350
1363
|
case "en_US":
|
|
1351
1364
|
case "en_GB": return "en";
|
|
@@ -1354,47 +1367,47 @@ var vt = {
|
|
|
1354
1367
|
case "de_AT": return "de";
|
|
1355
1368
|
default: return "de";
|
|
1356
1369
|
}
|
|
1357
|
-
},
|
|
1358
|
-
async function
|
|
1359
|
-
|
|
1370
|
+
}, Tt = Ct();
|
|
1371
|
+
async function Et(e) {
|
|
1372
|
+
Tt = e;
|
|
1360
1373
|
}
|
|
1361
|
-
function
|
|
1362
|
-
return
|
|
1374
|
+
function Dt(e = "_") {
|
|
1375
|
+
return Tt.replace("_", e);
|
|
1363
1376
|
}
|
|
1364
1377
|
//#endregion
|
|
1365
1378
|
//#region package/common/datePicker/dateFunctions.ts
|
|
1366
|
-
function
|
|
1379
|
+
function Ot(e, t) {
|
|
1367
1380
|
return new Date(t, e, 0).getDate();
|
|
1368
1381
|
}
|
|
1369
|
-
function
|
|
1382
|
+
function kt(e, t, n) {
|
|
1370
1383
|
return new Date(Date.UTC(n, t - 1, e));
|
|
1371
1384
|
}
|
|
1372
|
-
function
|
|
1385
|
+
function At(e, t, n, r, i = !1) {
|
|
1373
1386
|
return new Date(Date.UTC(t, n - 1, r)).toLocaleDateString(e, { month: i ? "short" : "long" });
|
|
1374
1387
|
}
|
|
1375
|
-
function
|
|
1376
|
-
return Array.from(Array(12).keys()).map((t) =>
|
|
1388
|
+
function jt(e = Dt("-")) {
|
|
1389
|
+
return Array.from(Array(12).keys()).map((t) => At(e, 2023, t + 1, 1));
|
|
1377
1390
|
}
|
|
1378
|
-
function
|
|
1391
|
+
function Mt(e, t = !0) {
|
|
1379
1392
|
let n = new Date(Date.UTC(2023, 3, 10)), r = [];
|
|
1380
1393
|
for (let i = 0; i < 7; i++) r.push(n.toLocaleDateString(e, { weekday: t ? "short" : "long" })), n.setDate(n.getDate() + 1);
|
|
1381
1394
|
return r;
|
|
1382
1395
|
}
|
|
1383
|
-
function
|
|
1396
|
+
function Nt(e, t) {
|
|
1384
1397
|
return new Date(Date.UTC(t, e - 1, 1)).getDay() || 7;
|
|
1385
1398
|
}
|
|
1386
|
-
function
|
|
1399
|
+
function Pt(e) {
|
|
1387
1400
|
return {
|
|
1388
1401
|
day: e.getDate(),
|
|
1389
1402
|
month: e.getMonth() + 1,
|
|
1390
1403
|
year: e.getFullYear()
|
|
1391
1404
|
};
|
|
1392
1405
|
}
|
|
1393
|
-
function
|
|
1406
|
+
function Ft(e) {
|
|
1394
1407
|
let t = e.getDate(), n = e.getMonth() + 1, r = e.getFullYear();
|
|
1395
1408
|
return `${t < 10 ? `0${t}` : t}.${n < 10 ? `0${n}` : n}.${r}`;
|
|
1396
1409
|
}
|
|
1397
|
-
function
|
|
1410
|
+
function It(e, t, n) {
|
|
1398
1411
|
let r = e, i = n;
|
|
1399
1412
|
return r[0] !== "_" && (r[0] > "3" ? (r = `0${r[0]}${t.substring(2)}`, i = {
|
|
1400
1413
|
start: 3,
|
|
@@ -1412,18 +1425,18 @@ function Pt(e, t, n) {
|
|
|
1412
1425
|
}
|
|
1413
1426
|
//#endregion
|
|
1414
1427
|
//#region package/common/datePicker/components/datePickerMonth/datePickerMonth.tsx
|
|
1415
|
-
function
|
|
1416
|
-
let { day: a, month: o, year: s } = r ?
|
|
1428
|
+
function Lt(e, t, n, r, i) {
|
|
1429
|
+
let { day: a, month: o, year: s } = r ? Pt(r) : {
|
|
1417
1430
|
day: void 0,
|
|
1418
1431
|
month: void 0,
|
|
1419
1432
|
year: void 0
|
|
1420
|
-
}, { day: c, month: l, year: u } = i ?
|
|
1433
|
+
}, { day: c, month: l, year: u } = i ? Pt(i) : {
|
|
1421
1434
|
day: void 0,
|
|
1422
1435
|
month: void 0,
|
|
1423
1436
|
year: void 0
|
|
1424
|
-
}, d =
|
|
1437
|
+
}, d = kt(e, t, n), f = e === a && t === o && n === s, p = e === c && t === l && n === u, m = !1;
|
|
1425
1438
|
if (a !== void 0 && o !== void 0 && s !== void 0 && c !== void 0 && l !== void 0 && u !== void 0) {
|
|
1426
|
-
let e =
|
|
1439
|
+
let e = kt(a, o, s), t = kt(c, l, u);
|
|
1427
1440
|
m = d.getTime() >= e.getTime() && d.getTime() <= t.getTime();
|
|
1428
1441
|
}
|
|
1429
1442
|
return {
|
|
@@ -1432,54 +1445,54 @@ function Ft(e, t, n, r, i) {
|
|
|
1432
1445
|
isEndDate: p
|
|
1433
1446
|
};
|
|
1434
1447
|
}
|
|
1435
|
-
function
|
|
1436
|
-
let a =
|
|
1448
|
+
function Rt(e, t, n, r, i) {
|
|
1449
|
+
let a = kt(e, t, n);
|
|
1437
1450
|
if (r) {
|
|
1438
|
-
let { day: e, month: t, year: n } =
|
|
1439
|
-
if (a <
|
|
1451
|
+
let { day: e, month: t, year: n } = Pt(r);
|
|
1452
|
+
if (a < kt(e, t, n)) return !0;
|
|
1440
1453
|
}
|
|
1441
1454
|
if (i) {
|
|
1442
|
-
let { day: e, month: t, year: n } =
|
|
1443
|
-
if (a >
|
|
1455
|
+
let { day: e, month: t, year: n } = Pt(i);
|
|
1456
|
+
if (a > kt(e, t, n)) return !0;
|
|
1444
1457
|
}
|
|
1445
1458
|
return !1;
|
|
1446
1459
|
}
|
|
1447
|
-
function
|
|
1448
|
-
let { day: r, month: i, year: a } =
|
|
1460
|
+
function zt(e, t, n) {
|
|
1461
|
+
let { day: r, month: i, year: a } = Pt(/* @__PURE__ */ new Date());
|
|
1449
1462
|
return e === r && t === i && n === a;
|
|
1450
1463
|
}
|
|
1451
|
-
function
|
|
1452
|
-
let c =
|
|
1464
|
+
function Bt({ 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 }) {
|
|
1465
|
+
let c = Dt("-"), l = Ot(t, n), u = Nt(t, n);
|
|
1453
1466
|
return /* @__PURE__ */ I("div", {
|
|
1454
|
-
className: f(
|
|
1467
|
+
className: f(bt.datePickerMonth, e),
|
|
1455
1468
|
children: /* @__PURE__ */ L("div", {
|
|
1456
|
-
className: f(
|
|
1469
|
+
className: f(bt.datePickerMonthContent),
|
|
1457
1470
|
children: [
|
|
1458
|
-
|
|
1459
|
-
Array.from(Array(u - 1).keys()).map((e) => /* @__PURE__ */ I("div", { className: f(
|
|
1471
|
+
Mt(c).map((e, t) => /* @__PURE__ */ I("div", { children: e }, t)),
|
|
1472
|
+
Array.from(Array(u - 1).keys()).map((e) => /* @__PURE__ */ I("div", { className: f(bt.datePickerMonthItem, bt.datePickerMonthPlaceholder) }, e)),
|
|
1460
1473
|
Array.from(Array(l).keys()).map((e) => {
|
|
1461
|
-
let c = e + 1, l =
|
|
1462
|
-
return /* @__PURE__ */ I(
|
|
1463
|
-
onClick: () => u ? null : r(
|
|
1464
|
-
className: f(
|
|
1465
|
-
[
|
|
1466
|
-
[
|
|
1467
|
-
[
|
|
1468
|
-
[
|
|
1469
|
-
[
|
|
1474
|
+
let c = e + 1, l = Lt(c, t, n, i, a), u = Rt(c, t, n, o, s), d = zt(c, t, n);
|
|
1475
|
+
return /* @__PURE__ */ I(Be, {
|
|
1476
|
+
onClick: () => u ? null : r(kt(c, t, n)),
|
|
1477
|
+
className: f(bt.datePickerMonthDay, bt.datePickerMonthItem, {
|
|
1478
|
+
[bt.datePickerMonthDaySelected]: l.isInRange,
|
|
1479
|
+
[bt.datePickerMonthDaySelectedStart]: l.isStartDate,
|
|
1480
|
+
[bt.datePickerMonthDaySelectedEnd]: l.isEndDate,
|
|
1481
|
+
[bt.datePickerMonthDayDisabled]: u,
|
|
1482
|
+
[bt.datePickerMonthDayToday]: d
|
|
1470
1483
|
}),
|
|
1471
1484
|
children: c
|
|
1472
1485
|
}, c);
|
|
1473
1486
|
}),
|
|
1474
1487
|
Array.from(Array(42 - (u + l - 1)).keys()).map((e) => /* @__PURE__ */ I("div", {
|
|
1475
|
-
className: f(
|
|
1488
|
+
className: f(bt.datePickerMonthItem, bt.datePickerMonthPlaceholder),
|
|
1476
1489
|
children: "\xA0"
|
|
1477
1490
|
}, e))
|
|
1478
1491
|
]
|
|
1479
1492
|
})
|
|
1480
1493
|
});
|
|
1481
1494
|
}
|
|
1482
|
-
var
|
|
1495
|
+
var Vt = {
|
|
1483
1496
|
infiniteBlock: "infiniteBlock_dFv-h",
|
|
1484
1497
|
"spinner-wrapper": "spinner-wrapper_hsgWz",
|
|
1485
1498
|
spinnerWrapper: "spinner-wrapper_hsgWz",
|
|
@@ -1487,7 +1500,7 @@ var zt = {
|
|
|
1487
1500
|
};
|
|
1488
1501
|
//#endregion
|
|
1489
1502
|
//#region package/common/infiniteBlock/infiniteBlock.tsx
|
|
1490
|
-
function
|
|
1503
|
+
function Ht(e, t) {
|
|
1491
1504
|
let n = e;
|
|
1492
1505
|
for (; n.props.children !== null && typeof n.props.children == "object" && !Array.isArray(n.props.children);) n = n.props.children;
|
|
1493
1506
|
let r = n.props.children;
|
|
@@ -1500,11 +1513,11 @@ function Bt(e, t) {
|
|
|
1500
1513
|
}
|
|
1501
1514
|
return String(r).toLowerCase().startsWith(t);
|
|
1502
1515
|
}
|
|
1503
|
-
function
|
|
1516
|
+
function Ut(e, t, n) {
|
|
1504
1517
|
let r = e + t;
|
|
1505
1518
|
return r === n ? 0 : r < -1 ? n - 1 : r;
|
|
1506
1519
|
}
|
|
1507
|
-
function
|
|
1520
|
+
function Wt({ children: t, onScroll: n, className: r = "", isDataLoading: a = !1, setHighlightedIndex: o = () => null }) {
|
|
1508
1521
|
let s = u(null), c = u(!1), [l, p] = d(!1), m = u(-1), h = u(null), g = i(() => {
|
|
1509
1522
|
let e = s.current;
|
|
1510
1523
|
if (!e) return;
|
|
@@ -1518,12 +1531,12 @@ function Ht({ children: t, onScroll: n, className: r = "", isDataLoading: a = !1
|
|
|
1518
1531
|
let i = e.Children.toArray(t), a = m.current;
|
|
1519
1532
|
switch (n.key) {
|
|
1520
1533
|
case "ArrowDown":
|
|
1521
|
-
a =
|
|
1534
|
+
a = Ut(a, 1, i.length);
|
|
1522
1535
|
break;
|
|
1523
1536
|
case "ArrowUp":
|
|
1524
|
-
a =
|
|
1537
|
+
a = Ut(a, -1, i.length);
|
|
1525
1538
|
break;
|
|
1526
|
-
default: for (let e = 0; e < i.length; e++) if (
|
|
1539
|
+
default: for (let e = 0; e < i.length; e++) if (Ht(i[e], n.key)) {
|
|
1527
1540
|
if (a >= e && h.current === n.key) continue;
|
|
1528
1541
|
a = e;
|
|
1529
1542
|
break;
|
|
@@ -1539,21 +1552,21 @@ function Ht({ children: t, onScroll: n, className: r = "", isDataLoading: a = !1
|
|
|
1539
1552
|
}
|
|
1540
1553
|
}, [t, o]);
|
|
1541
1554
|
return /* @__PURE__ */ L("div", {
|
|
1542
|
-
className: f(
|
|
1555
|
+
className: f(Vt.infiniteBlock, r),
|
|
1543
1556
|
onScroll: g,
|
|
1544
1557
|
onKeyDown: _,
|
|
1545
1558
|
tabIndex: 0,
|
|
1546
1559
|
ref: s,
|
|
1547
1560
|
children: [a ? /* @__PURE__ */ I("div", {
|
|
1548
|
-
className:
|
|
1549
|
-
children: /* @__PURE__ */ I(
|
|
1561
|
+
className: Vt.spinnerWrapper,
|
|
1562
|
+
children: /* @__PURE__ */ I(Ae, { className: Vt.spinner })
|
|
1550
1563
|
}) : t, l && /* @__PURE__ */ I("div", {
|
|
1551
|
-
className:
|
|
1552
|
-
children: /* @__PURE__ */ I(
|
|
1564
|
+
className: Vt.spinnerWrapper,
|
|
1565
|
+
children: /* @__PURE__ */ I(Ae, { className: Vt.spinner })
|
|
1553
1566
|
})]
|
|
1554
1567
|
});
|
|
1555
1568
|
}
|
|
1556
|
-
var
|
|
1569
|
+
var Y = {
|
|
1557
1570
|
"required-mark": "required-mark_fy7Fm",
|
|
1558
1571
|
requiredMark: "required-mark_fy7Fm",
|
|
1559
1572
|
dropdown: "dropdown_XTshY",
|
|
@@ -1621,135 +1634,137 @@ var X = {
|
|
|
1621
1634
|
};
|
|
1622
1635
|
//#endregion
|
|
1623
1636
|
//#region package/common/dropdown/dropdown.tsx
|
|
1624
|
-
function
|
|
1625
|
-
let [
|
|
1637
|
+
function Gt({ 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: A = "", items: te = [], useMatLabelStyle: ne = !0, placeholder: j = "", plainStyle: M = !1, scrollToSelected: N = !1, reactRef: re, ...ie }) {
|
|
1638
|
+
let [ae, oe] = d(!1), [se, P] = d(!1), [, ce] = d(0), F = u(O);
|
|
1626
1639
|
a(() => {
|
|
1627
1640
|
if (F.current = O, !F.current) return;
|
|
1628
1641
|
F.current.label = n ?? "", F.current.validate();
|
|
1629
|
-
let e = () =>
|
|
1642
|
+
let e = () => ce((e) => e + 1);
|
|
1630
1643
|
return F.current.registerOnUpdateListener(e), () => F.current?.removeOnUpdateListener(e);
|
|
1631
1644
|
}, [O, n]);
|
|
1632
|
-
let
|
|
1633
|
-
|
|
1634
|
-
}, ue = (e) => {
|
|
1635
|
-
se(!1), C?.(e);
|
|
1645
|
+
let le = (e) => {
|
|
1646
|
+
P(!0), S?.(e);
|
|
1636
1647
|
}, de = (e) => {
|
|
1637
|
-
|
|
1648
|
+
P(!1), C?.(e);
|
|
1638
1649
|
}, fe = (e) => {
|
|
1639
|
-
|
|
1640
|
-
}, pe = (
|
|
1650
|
+
oe(!0), b?.(e);
|
|
1651
|
+
}, pe = (e) => {
|
|
1652
|
+
F.current && (F.current.touched = !0), oe(!1), x?.(e);
|
|
1653
|
+
}, R = () => O ? O.touched && O.hasError() : !i || !!e, me = () => !!(s || O?.validators.find((e) => e.validatorId === "required")), he = (e) => {
|
|
1641
1654
|
O ? (O.set(e), y?.(O.value, c)) : y?.(e, c);
|
|
1642
|
-
},
|
|
1643
|
-
|
|
1644
|
-
e.key ===
|
|
1645
|
-
})
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1655
|
+
}, z = w, B = O ? O.value : r, V = R();
|
|
1656
|
+
te.forEach((e) => {
|
|
1657
|
+
e.key === B && (z = e.label);
|
|
1658
|
+
});
|
|
1659
|
+
let ge = z || B, _e = ge == null || typeof ge == "string" && ge.trim() === "";
|
|
1660
|
+
return /* @__PURE__ */ L("div", {
|
|
1661
|
+
...ie,
|
|
1662
|
+
className: f(t, Y.dropdownLabel, Y.dropdown, { [Y.dropdownLabelColumn]: !l }),
|
|
1663
|
+
onMouseEnter: le,
|
|
1664
|
+
onMouseLeave: de,
|
|
1649
1665
|
children: [
|
|
1650
|
-
/* @__PURE__ */ I(
|
|
1651
|
-
onChange: (e) =>
|
|
1666
|
+
/* @__PURE__ */ I(ue, {
|
|
1667
|
+
onChange: (e) => he((e || { key: "" }).key),
|
|
1652
1668
|
itemToString: (e) => e ? String(e.key) : "",
|
|
1653
|
-
selectedItem:
|
|
1669
|
+
selectedItem: te.find((e) => e.key === B) ?? null,
|
|
1654
1670
|
stateReducer: (e, t) => N && Object.prototype.hasOwnProperty.call(t, "isOpen") ? {
|
|
1655
1671
|
...t,
|
|
1656
|
-
highlightedIndex: t.isOpen ?
|
|
1672
|
+
highlightedIndex: t.isOpen ? te.indexOf(e.selectedItem) : null
|
|
1657
1673
|
} : t,
|
|
1658
1674
|
children: ({ getItemProps: e, getToggleButtonProps: t, isOpen: r, selectedItem: i, highlightedIndex: a, setHighlightedIndex: s }) => /* @__PURE__ */ I("div", { children: /* @__PURE__ */ L("div", {
|
|
1659
|
-
onFocus:
|
|
1660
|
-
onBlur:
|
|
1661
|
-
className: f(
|
|
1662
|
-
[X.dropdownInputPlain]: M,
|
|
1663
|
-
[X.dropdownInputButtonDisabled]: m
|
|
1664
|
-
}, te),
|
|
1675
|
+
onFocus: fe,
|
|
1676
|
+
onBlur: pe,
|
|
1677
|
+
className: f(Y.dropdownInput, { [Y.dropdownInputPlain]: M }, A),
|
|
1665
1678
|
children: [
|
|
1666
1679
|
/* @__PURE__ */ I("button", {
|
|
1667
1680
|
tabIndex: o,
|
|
1668
1681
|
type: "button",
|
|
1682
|
+
disabled: m,
|
|
1669
1683
|
style: T ? {
|
|
1670
1684
|
padding: "6px",
|
|
1671
1685
|
border: "none"
|
|
1672
1686
|
} : {},
|
|
1673
|
-
className: f(
|
|
1687
|
+
className: f(Y.dropdownInputButton, { [Y.dropdownInputButtonDisabled]: m }, E),
|
|
1674
1688
|
...t(),
|
|
1675
1689
|
onClick: (e) => {
|
|
1676
1690
|
t().onClick?.(e), v?.(e);
|
|
1677
1691
|
},
|
|
1678
1692
|
ref: re,
|
|
1679
|
-
children:
|
|
1693
|
+
children: _e ? "\xA0" : ge
|
|
1680
1694
|
}),
|
|
1681
1695
|
/* @__PURE__ */ I("button", {
|
|
1682
1696
|
type: "button",
|
|
1683
1697
|
tabIndex: -1,
|
|
1684
|
-
|
|
1698
|
+
disabled: m,
|
|
1699
|
+
className: f(Y.dropdownInputButtonIcon, ee),
|
|
1685
1700
|
...t(),
|
|
1686
1701
|
onClick: (e) => {
|
|
1687
1702
|
t().onClick?.(e), v?.(e);
|
|
1688
1703
|
},
|
|
1689
1704
|
children: !m && /* @__PURE__ */ I(p, {
|
|
1690
1705
|
icon: g,
|
|
1691
|
-
className: f(
|
|
1706
|
+
className: f(Y.dropdownInputButtonIconArrow, { [Y.dropdownInputButtonIconArrowOpen]: r })
|
|
1692
1707
|
})
|
|
1693
1708
|
}),
|
|
1694
|
-
!m && r ? /* @__PURE__ */ I(
|
|
1709
|
+
!m && r ? /* @__PURE__ */ I(Wt, {
|
|
1695
1710
|
onScroll: h,
|
|
1696
|
-
className: f(
|
|
1697
|
-
[
|
|
1698
|
-
[
|
|
1711
|
+
className: f(Y.dropdownInputList, {
|
|
1712
|
+
[Y.dropdownInputListOnTop]: _,
|
|
1713
|
+
[Y.dropdownInputListWider]: T
|
|
1699
1714
|
}),
|
|
1700
1715
|
setHighlightedIndex: s,
|
|
1701
|
-
children:
|
|
1716
|
+
children: te.map((t, n) => /* @__PURE__ */ I("div", {
|
|
1702
1717
|
...e({
|
|
1703
1718
|
index: n,
|
|
1704
1719
|
item: t,
|
|
1705
1720
|
disabled: !!t.disabled
|
|
1706
1721
|
}),
|
|
1707
|
-
className: f(
|
|
1708
|
-
[
|
|
1709
|
-
[
|
|
1722
|
+
className: f(Y.dropdownInputListItem, D, {
|
|
1723
|
+
[Y.dropdownInputListItemActive]: a === n,
|
|
1724
|
+
[Y.dropdownInputListItemSelected]: i === t
|
|
1710
1725
|
}),
|
|
1711
1726
|
children: t.label
|
|
1712
1727
|
}, t.key))
|
|
1713
1728
|
}) : null,
|
|
1714
1729
|
/* @__PURE__ */ I("fieldset", {
|
|
1715
|
-
className: f(
|
|
1716
|
-
[
|
|
1717
|
-
[
|
|
1718
|
-
[
|
|
1719
|
-
[
|
|
1730
|
+
className: f(Y.dropdownFieldset, {
|
|
1731
|
+
[Y.dropdownBorderPlain]: M,
|
|
1732
|
+
[Y.dropdownBorderFocused]: ae,
|
|
1733
|
+
[Y.dropdownBorderInvalid]: V,
|
|
1734
|
+
[Y.dropdownBorderError]: V
|
|
1720
1735
|
}),
|
|
1721
1736
|
children: /* @__PURE__ */ I("legend", {
|
|
1722
|
-
className: f(
|
|
1737
|
+
className: f(Y.dropdownFieldsetLegend, { [Y.dropdownFieldsetLegendActive]: ne && (ae || B) }),
|
|
1723
1738
|
children: /* @__PURE__ */ I("span", { children: n })
|
|
1724
1739
|
})
|
|
1725
1740
|
}),
|
|
1726
|
-
|
|
1727
|
-
className: f(
|
|
1741
|
+
ne && n && /* @__PURE__ */ I("div", {
|
|
1742
|
+
className: f(Y.dropdownMatLabel, { [Y.dropdownMatLabelFloating]: ae || B }),
|
|
1728
1743
|
children: n
|
|
1729
1744
|
}),
|
|
1730
|
-
|
|
1731
|
-
className: f(
|
|
1745
|
+
ne && j && /* @__PURE__ */ I("div", {
|
|
1746
|
+
className: f(Y.dropdownPlaceholder, ae && !z && Y.dropdownPlaceholderShown),
|
|
1732
1747
|
children: j
|
|
1733
1748
|
})
|
|
1734
1749
|
]
|
|
1735
1750
|
}) })
|
|
1736
1751
|
}),
|
|
1737
|
-
n && !
|
|
1738
|
-
className: f(
|
|
1739
|
-
children: [n,
|
|
1740
|
-
className:
|
|
1752
|
+
n && !ne && /* @__PURE__ */ L("div", {
|
|
1753
|
+
className: f(Y.dropdownLabelText, k),
|
|
1754
|
+
children: [n, me() ? /* @__PURE__ */ I("div", {
|
|
1755
|
+
className: Y.requiredMark,
|
|
1741
1756
|
children: "*"
|
|
1742
1757
|
}) : null]
|
|
1743
1758
|
}),
|
|
1744
|
-
/* @__PURE__ */ I(
|
|
1759
|
+
/* @__PURE__ */ I(at, {
|
|
1745
1760
|
variant: "error",
|
|
1746
1761
|
message: O ? O.getCurrentErrorMessage() : e || "",
|
|
1747
|
-
isVisible:
|
|
1762
|
+
isVisible: V && (ae || se)
|
|
1748
1763
|
})
|
|
1749
1764
|
]
|
|
1750
1765
|
});
|
|
1751
1766
|
}
|
|
1752
|
-
var
|
|
1767
|
+
var Kt = {
|
|
1753
1768
|
datePicker: "datePicker_ZohTp",
|
|
1754
1769
|
"datePicker-header": "datePicker-header_YmSWE",
|
|
1755
1770
|
datePickerHeader: "datePicker-header_YmSWE",
|
|
@@ -1766,25 +1781,25 @@ var Wt = {
|
|
|
1766
1781
|
};
|
|
1767
1782
|
//#endregion
|
|
1768
1783
|
//#region package/common/datePicker/datePicker.tsx
|
|
1769
|
-
function
|
|
1770
|
-
let T = () => r ? r.value : t, E = T() ?? /* @__PURE__ */ new Date(), [ee, D] = d(E.getMonth() + 1), [O, k] = d(E.getFullYear()), [
|
|
1784
|
+
function qt({ 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 }) {
|
|
1785
|
+
let T = () => r ? r.value : t, E = T() ?? /* @__PURE__ */ new Date(), [ee, D] = d(E.getMonth() + 1), [O, k] = d(E.getFullYear()), [A, te] = d(!1), [ne, j] = d(() => T() ? Ft(E) : ""), [M, N] = d(!1), [re, ie] = d(!1), [, ae] = d(0), [oe, se] = d(t), P = u(r);
|
|
1771
1786
|
if (oe !== t) {
|
|
1772
1787
|
se(t);
|
|
1773
1788
|
let e = t ?? /* @__PURE__ */ new Date();
|
|
1774
|
-
D(e.getMonth() + 1), k(e.getFullYear()), j(t ?
|
|
1789
|
+
D(e.getMonth() + 1), k(e.getFullYear()), j(t ? Ft(t) : "");
|
|
1775
1790
|
}
|
|
1776
1791
|
a(() => {
|
|
1777
1792
|
if (P.current = r, !r) return;
|
|
1778
1793
|
let e = () => {
|
|
1779
1794
|
let e = r.value;
|
|
1780
|
-
e ? (D(e.getMonth() + 1), k(e.getFullYear()), j(
|
|
1795
|
+
e ? (D(e.getMonth() + 1), k(e.getFullYear()), j(Ft(e))) : j(""), ae((e) => e + 1);
|
|
1781
1796
|
};
|
|
1782
1797
|
return r.registerOnUpdateListener(e), () => r.removeOnUpdateListener(e);
|
|
1783
1798
|
}, [r]);
|
|
1784
|
-
let ce = () => r ? r.touched && r.hasError() : !b || !!x, le = () => !!(S || r?.validators.find((e) => e.validatorId === "required")),
|
|
1785
|
-
j(e ?
|
|
1799
|
+
let ce = () => r ? r.touched && r.hasError() : !b || !!x, le = () => !!(S || r?.validators.find((e) => e.validatorId === "required")), ue = (e) => {
|
|
1800
|
+
j(e ? Ft(e) : ""), r && r.set(e), l(e);
|
|
1786
1801
|
}, fe = (e) => {
|
|
1787
|
-
|
|
1802
|
+
ue(e), n(e), te(!1);
|
|
1788
1803
|
}, pe = (e) => {
|
|
1789
1804
|
D((t) => {
|
|
1790
1805
|
let n = t + e;
|
|
@@ -1792,14 +1807,14 @@ function Gt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1792
1807
|
});
|
|
1793
1808
|
}, R = (e) => {
|
|
1794
1809
|
if (e.match(/\d{2}\.\d{2}\.\d{4}/gi)) {
|
|
1795
|
-
let [t, n, r] = e.split("."), i =
|
|
1810
|
+
let [t, n, r] = e.split("."), i = kt(Number(t), Number(n), Number(r));
|
|
1796
1811
|
if (i && i.toString() !== "Invalid Date" && (!m || i <= m) && (!p || i >= p)) return i;
|
|
1797
1812
|
}
|
|
1798
1813
|
return null;
|
|
1799
1814
|
}, me = ({ previousState: e, nextState: t }) => {
|
|
1800
1815
|
if (!e || t.value === e.value) return t;
|
|
1801
|
-
let n =
|
|
1802
|
-
return r &&
|
|
1816
|
+
let n = It(t.value, e.value, t.selection ?? null), r = R(n.value);
|
|
1817
|
+
return r && ue(r), n;
|
|
1803
1818
|
}, he = () => {
|
|
1804
1819
|
let e = 400, t = (/* @__PURE__ */ new Date()).getFullYear() - 200;
|
|
1805
1820
|
return p && (t = p.getFullYear()), m && (e = m.getFullYear() - t + 1), Array.from(Array(e).keys()).map((e) => ({
|
|
@@ -1808,45 +1823,45 @@ function Gt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1808
1823
|
}));
|
|
1809
1824
|
}, z = T(), B = ce(), V = /* @__PURE__ */ L(F, { children: [
|
|
1810
1825
|
o ? null : /* @__PURE__ */ L("div", {
|
|
1811
|
-
className:
|
|
1826
|
+
className: Kt.datePickerHeader,
|
|
1812
1827
|
children: [
|
|
1813
|
-
/* @__PURE__ */ I(
|
|
1828
|
+
/* @__PURE__ */ I(He, {
|
|
1814
1829
|
icon: _,
|
|
1815
1830
|
onClick: () => pe(-1)
|
|
1816
1831
|
}),
|
|
1817
1832
|
/* @__PURE__ */ I("div", {
|
|
1818
|
-
className:
|
|
1833
|
+
className: Kt.datePickerHeaderMonthAndYearContainer,
|
|
1819
1834
|
children: /* @__PURE__ */ L("div", {
|
|
1820
|
-
className:
|
|
1821
|
-
children: [/* @__PURE__ */ I(
|
|
1835
|
+
className: Kt.datePickerHeaderMonthAndYear,
|
|
1836
|
+
children: [/* @__PURE__ */ I(Gt, {
|
|
1822
1837
|
plainStyle: !0,
|
|
1823
1838
|
scrollToSelected: !0,
|
|
1824
1839
|
onChange: (e) => D(e),
|
|
1825
|
-
className:
|
|
1826
|
-
value:
|
|
1827
|
-
items:
|
|
1840
|
+
className: Kt.datePickerHeaderMonth,
|
|
1841
|
+
value: At(Dt("-"), O, ee, 1),
|
|
1842
|
+
items: jt().map((e, t) => ({
|
|
1828
1843
|
key: t + 1,
|
|
1829
1844
|
label: e
|
|
1830
1845
|
}))
|
|
1831
|
-
}), /* @__PURE__ */ I(
|
|
1846
|
+
}), /* @__PURE__ */ I(Gt, {
|
|
1832
1847
|
plainStyle: !0,
|
|
1833
1848
|
scrollToSelected: !0,
|
|
1834
1849
|
useMatLabelStyle: !1,
|
|
1835
|
-
className:
|
|
1850
|
+
className: Kt.datePickerHeaderYear,
|
|
1836
1851
|
onChange: (e) => k(e),
|
|
1837
1852
|
value: O,
|
|
1838
1853
|
items: he()
|
|
1839
1854
|
})]
|
|
1840
1855
|
})
|
|
1841
1856
|
}),
|
|
1842
|
-
/* @__PURE__ */ I(
|
|
1857
|
+
/* @__PURE__ */ I(He, {
|
|
1843
1858
|
icon: v,
|
|
1844
1859
|
onClick: () => pe(1)
|
|
1845
1860
|
})
|
|
1846
1861
|
]
|
|
1847
1862
|
}),
|
|
1848
|
-
/* @__PURE__ */ I(
|
|
1849
|
-
className:
|
|
1863
|
+
/* @__PURE__ */ I(Bt, {
|
|
1864
|
+
className: Kt.datePickerMonth,
|
|
1850
1865
|
month: ee,
|
|
1851
1866
|
year: O,
|
|
1852
1867
|
onSelect: fe,
|
|
@@ -1855,48 +1870,48 @@ function Gt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1855
1870
|
minDate: p,
|
|
1856
1871
|
maxDate: m
|
|
1857
1872
|
}),
|
|
1858
|
-
g && /* @__PURE__ */ I(
|
|
1873
|
+
g && /* @__PURE__ */ I(W, {
|
|
1859
1874
|
onClick: () => fe(null),
|
|
1860
1875
|
children: "Clear"
|
|
1861
1876
|
}),
|
|
1862
1877
|
h
|
|
1863
|
-
] }), ge = i ? null : /* @__PURE__ */ I(
|
|
1878
|
+
] }), ge = i ? null : /* @__PURE__ */ I(ot, {
|
|
1864
1879
|
readOnly: s,
|
|
1865
1880
|
label: `${y}${le() ? " *" : ""}`,
|
|
1866
|
-
value:
|
|
1881
|
+
value: ne,
|
|
1867
1882
|
onChange: (e) => j(e),
|
|
1868
|
-
onClick: () =>
|
|
1869
|
-
customInput: /* @__PURE__ */ I(
|
|
1883
|
+
onClick: () => te(!0),
|
|
1884
|
+
customInput: /* @__PURE__ */ I(de, {
|
|
1870
1885
|
mask: "99.99.9999",
|
|
1871
1886
|
maskPlaceholder: "_",
|
|
1872
1887
|
beforeMaskedStateChange: me
|
|
1873
1888
|
}),
|
|
1874
1889
|
onBlur: () => {
|
|
1875
|
-
P.current && (P.current.touched = !0), N(!1),
|
|
1890
|
+
P.current && (P.current.touched = !0), N(!1), ue(R(ne));
|
|
1876
1891
|
},
|
|
1877
1892
|
onFocus: () => N(!0),
|
|
1878
1893
|
onMouseEnter: () => ie(!0),
|
|
1879
1894
|
onMouseLeave: () => ie(!1),
|
|
1880
1895
|
isValid: !B
|
|
1881
|
-
}), _e = c ? V : s ? /* @__PURE__ */ I(
|
|
1896
|
+
}), _e = c ? V : s ? /* @__PURE__ */ I(vt, {
|
|
1882
1897
|
hideHeader: !0,
|
|
1883
|
-
isOpen:
|
|
1884
|
-
onClose: () =>
|
|
1898
|
+
isOpen: A,
|
|
1899
|
+
onClose: () => te(!1),
|
|
1885
1900
|
children: V
|
|
1886
|
-
}) : /* @__PURE__ */ I(
|
|
1887
|
-
isOpen:
|
|
1888
|
-
onOpenChange: (e) =>
|
|
1901
|
+
}) : /* @__PURE__ */ I(rt, {
|
|
1902
|
+
isOpen: A,
|
|
1903
|
+
onOpenChange: (e) => te(e),
|
|
1889
1904
|
content: V,
|
|
1890
|
-
align:
|
|
1905
|
+
align: tt.Left,
|
|
1891
1906
|
dontCloseOnChildClick: !0,
|
|
1892
1907
|
children: ge
|
|
1893
1908
|
});
|
|
1894
1909
|
return /* @__PURE__ */ L("div", {
|
|
1895
|
-
className: f(
|
|
1910
|
+
className: f(Kt.datePicker, e),
|
|
1896
1911
|
children: [
|
|
1897
1912
|
(s || c) && ge,
|
|
1898
1913
|
_e,
|
|
1899
|
-
/* @__PURE__ */ I(
|
|
1914
|
+
/* @__PURE__ */ I(at, {
|
|
1900
1915
|
variant: "error",
|
|
1901
1916
|
message: r ? r.getCurrentErrorMessage() : x || "",
|
|
1902
1917
|
isVisible: B && (M || re)
|
|
@@ -1904,17 +1919,17 @@ function Gt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1904
1919
|
]
|
|
1905
1920
|
});
|
|
1906
1921
|
}
|
|
1907
|
-
var
|
|
1922
|
+
var Jt = { emptyState: "emptyState_KXOIx" };
|
|
1908
1923
|
//#endregion
|
|
1909
1924
|
//#region package/common/emptyState/emptyState.tsx
|
|
1910
|
-
function
|
|
1925
|
+
function Yt({ className: e, icon: t, children: n, ...r }) {
|
|
1911
1926
|
return /* @__PURE__ */ L("div", {
|
|
1912
1927
|
...r,
|
|
1913
|
-
className: f(
|
|
1928
|
+
className: f(Jt.emptyState, e),
|
|
1914
1929
|
children: [t && /* @__PURE__ */ I(p, { icon: t }), /* @__PURE__ */ I("div", { children: n ?? "No entries available" })]
|
|
1915
1930
|
});
|
|
1916
1931
|
}
|
|
1917
|
-
var
|
|
1932
|
+
var Xt = {
|
|
1918
1933
|
fab: "fab_hyAAa",
|
|
1919
1934
|
"fab-content": "fab-content_IBiXm",
|
|
1920
1935
|
fabContent: "fab-content_IBiXm",
|
|
@@ -1922,25 +1937,25 @@ var Jt = {
|
|
|
1922
1937
|
fabContentContainer: "fab-content-container_FQD1x",
|
|
1923
1938
|
"fab-size-mini": "fab-size-mini_KP9BD",
|
|
1924
1939
|
fabSizeMini: "fab-size-mini_KP9BD"
|
|
1925
|
-
},
|
|
1940
|
+
}, Zt = {
|
|
1926
1941
|
default: null,
|
|
1927
|
-
mini:
|
|
1942
|
+
mini: Xt.fabSizeMini
|
|
1928
1943
|
};
|
|
1929
|
-
function
|
|
1930
|
-
return /* @__PURE__ */ I(
|
|
1944
|
+
function Qt({ children: e = null, size: t = "default", className: n = "", styleType: r = je.Primary, onClick: i = () => {} }) {
|
|
1945
|
+
return /* @__PURE__ */ I(W, {
|
|
1931
1946
|
styleType: r,
|
|
1932
|
-
className: f(
|
|
1947
|
+
className: f(Xt.fab, Zt[t], n),
|
|
1933
1948
|
onClick: i,
|
|
1934
1949
|
children: /* @__PURE__ */ I("div", {
|
|
1935
|
-
className:
|
|
1950
|
+
className: Xt.fabContentContainer,
|
|
1936
1951
|
children: /* @__PURE__ */ I("div", {
|
|
1937
|
-
className:
|
|
1952
|
+
className: Xt.fabContent,
|
|
1938
1953
|
children: e
|
|
1939
1954
|
})
|
|
1940
1955
|
})
|
|
1941
1956
|
});
|
|
1942
1957
|
}
|
|
1943
|
-
var
|
|
1958
|
+
var X = {
|
|
1944
1959
|
fab: "fab_YI34X",
|
|
1945
1960
|
appear: "appear_DL0wm",
|
|
1946
1961
|
"fab-container": "fab-container_8uoYo",
|
|
@@ -1970,7 +1985,7 @@ var Z = {
|
|
|
1970
1985
|
};
|
|
1971
1986
|
//#endregion
|
|
1972
1987
|
//#region package/common/fab/fab.tsx
|
|
1973
|
-
function
|
|
1988
|
+
function $t({ children: e = null, size: t = "default", menuEntries: n = [], onMenuEntryClicked: r = () => {}, onClick: i = () => {}, closeMenuOnEntryClicked: a = !0, ...o }) {
|
|
1974
1989
|
let [s, c] = d(!1);
|
|
1975
1990
|
function l() {
|
|
1976
1991
|
n.length > 0 && c((e) => !e), i();
|
|
@@ -1980,44 +1995,44 @@ function Zt({ children: e = null, size: t = "default", menuEntries: n = [], onMe
|
|
|
1980
1995
|
}
|
|
1981
1996
|
return /* @__PURE__ */ L("div", {
|
|
1982
1997
|
...o,
|
|
1983
|
-
className:
|
|
1998
|
+
className: X.fabContainer,
|
|
1984
1999
|
children: [
|
|
1985
2000
|
/* @__PURE__ */ I("div", {
|
|
1986
|
-
className: f(
|
|
2001
|
+
className: f(X.fabMenuBackdrop, s && X.fabMenuBackdropOpen),
|
|
1987
2002
|
onClick: (e) => {
|
|
1988
2003
|
e.stopPropagation(), c(!1);
|
|
1989
2004
|
}
|
|
1990
2005
|
}),
|
|
1991
2006
|
/* @__PURE__ */ I("div", {
|
|
1992
2007
|
onClick: (e) => e.stopPropagation(),
|
|
1993
|
-
children: /* @__PURE__ */ I(
|
|
1994
|
-
className:
|
|
2008
|
+
children: /* @__PURE__ */ I(Qt, {
|
|
2009
|
+
className: X.fab,
|
|
1995
2010
|
size: t,
|
|
1996
2011
|
onClick: l,
|
|
1997
2012
|
children: /* @__PURE__ */ L("div", {
|
|
1998
|
-
className: f(
|
|
2013
|
+
className: f(X.fabIcon, s && X.fabIconMenuOpen),
|
|
1999
2014
|
children: [/* @__PURE__ */ I("div", {
|
|
2000
|
-
className: f(
|
|
2015
|
+
className: f(X.fabIconContent, !s && X.fabIconContentShown),
|
|
2001
2016
|
children: e
|
|
2002
2017
|
}), /* @__PURE__ */ I("div", {
|
|
2003
|
-
className: f(
|
|
2004
|
-
children: /* @__PURE__ */ I(p, { icon:
|
|
2018
|
+
className: f(X.fabIconContent, s && X.fabIconContentShown),
|
|
2019
|
+
children: /* @__PURE__ */ I(p, { icon: N })
|
|
2005
2020
|
})]
|
|
2006
2021
|
})
|
|
2007
2022
|
})
|
|
2008
2023
|
}),
|
|
2009
2024
|
/* @__PURE__ */ I("div", {
|
|
2010
|
-
className:
|
|
2025
|
+
className: X.fabMenu,
|
|
2011
2026
|
children: n.map(({ id: e, label: t, icon: n }) => /* @__PURE__ */ L("div", {
|
|
2012
|
-
className: f(
|
|
2027
|
+
className: f(X.fabMenuEntry, s && X.fabMenuEntryShown),
|
|
2013
2028
|
onClick: (t) => u(t, e),
|
|
2014
2029
|
children: [t && /* @__PURE__ */ I("div", {
|
|
2015
|
-
className:
|
|
2030
|
+
className: X.fabMenuEntryLabelContainer,
|
|
2016
2031
|
children: /* @__PURE__ */ I("div", {
|
|
2017
|
-
className:
|
|
2032
|
+
className: X.fabMenuEntryLabel,
|
|
2018
2033
|
children: t
|
|
2019
2034
|
})
|
|
2020
|
-
}), /* @__PURE__ */ I(
|
|
2035
|
+
}), /* @__PURE__ */ I(Qt, {
|
|
2021
2036
|
size: "mini",
|
|
2022
2037
|
children: /* @__PURE__ */ I(p, { icon: n })
|
|
2023
2038
|
})]
|
|
@@ -2026,7 +2041,7 @@ function Zt({ children: e = null, size: t = "default", menuEntries: n = [], onMe
|
|
|
2026
2041
|
]
|
|
2027
2042
|
});
|
|
2028
2043
|
}
|
|
2029
|
-
var
|
|
2044
|
+
var en = {
|
|
2030
2045
|
iconPicker: "iconPicker_xJJmG",
|
|
2031
2046
|
"iconPicker-label": "iconPicker-label_VEB2X",
|
|
2032
2047
|
iconPickerLabel: "iconPicker-label_VEB2X",
|
|
@@ -2041,19 +2056,19 @@ var Qt = {
|
|
|
2041
2056
|
};
|
|
2042
2057
|
//#endregion
|
|
2043
2058
|
//#region package/common/iconPicker/iconPicker.tsx
|
|
2044
|
-
function
|
|
2059
|
+
function tn(e) {
|
|
2045
2060
|
let { formValidator: t } = e;
|
|
2046
2061
|
return t ? t.touched && t.hasError() : !1;
|
|
2047
2062
|
}
|
|
2048
|
-
function
|
|
2063
|
+
function nn(e) {
|
|
2049
2064
|
let { isRequired: t, formValidator: n } = e;
|
|
2050
2065
|
return !!(t || n?.validators.find((e) => e.validatorId === "required"));
|
|
2051
2066
|
}
|
|
2052
|
-
function
|
|
2053
|
-
let d = i ? i.value ?? null : t, m =
|
|
2067
|
+
function rn({ data: e = [], selectedId: t = null, label: n = "", onChange: r, formValidator: i = null, isRequired: a, className: o, style: s, classNames: c, styles: l, ...u }) {
|
|
2068
|
+
let d = i ? i.value ?? null : t, m = tn({
|
|
2054
2069
|
formValidator: i,
|
|
2055
2070
|
isRequired: a
|
|
2056
|
-
}), h =
|
|
2071
|
+
}), h = nn({
|
|
2057
2072
|
formValidator: i,
|
|
2058
2073
|
isRequired: a
|
|
2059
2074
|
});
|
|
@@ -2062,20 +2077,20 @@ function tn({ data: e = [], selectedId: t = null, label: n = "", onChange: r, fo
|
|
|
2062
2077
|
}
|
|
2063
2078
|
return /* @__PURE__ */ L("div", {
|
|
2064
2079
|
...u,
|
|
2065
|
-
className: f(
|
|
2080
|
+
className: f(en.iconPicker, { [en.iconPickerError]: m }, c?.root, o),
|
|
2066
2081
|
style: {
|
|
2067
2082
|
...l?.root,
|
|
2068
2083
|
...s
|
|
2069
2084
|
},
|
|
2070
2085
|
children: [n && /* @__PURE__ */ L("div", {
|
|
2071
|
-
className: f(
|
|
2086
|
+
className: f(en.iconPickerLabel, c?.label),
|
|
2072
2087
|
style: l?.label,
|
|
2073
2088
|
children: [n, h && " *"]
|
|
2074
2089
|
}), /* @__PURE__ */ I("div", {
|
|
2075
|
-
className: f(
|
|
2090
|
+
className: f(en.iconPickerItemContainer, c?.itemContainer),
|
|
2076
2091
|
style: l?.itemContainer,
|
|
2077
2092
|
children: e.map(({ id: e, label: t, icon: n, customIcon: r }) => /* @__PURE__ */ L("div", {
|
|
2078
|
-
className: f(
|
|
2093
|
+
className: f(en.iconPickerItem, { [en.iconPickerItemSelected]: d === e }, c?.item),
|
|
2079
2094
|
style: l?.item,
|
|
2080
2095
|
title: t,
|
|
2081
2096
|
tabIndex: 0,
|
|
@@ -2087,7 +2102,7 @@ function tn({ data: e = [], selectedId: t = null, label: n = "", onChange: r, fo
|
|
|
2087
2102
|
children: [
|
|
2088
2103
|
n && /* @__PURE__ */ I(p, { icon: n }),
|
|
2089
2104
|
r ?? null,
|
|
2090
|
-
/* @__PURE__ */ I(
|
|
2105
|
+
/* @__PURE__ */ I(U, {})
|
|
2091
2106
|
]
|
|
2092
2107
|
}, e))
|
|
2093
2108
|
})]
|
|
@@ -2095,14 +2110,14 @@ function tn({ data: e = [], selectedId: t = null, label: n = "", onChange: r, fo
|
|
|
2095
2110
|
}
|
|
2096
2111
|
//#endregion
|
|
2097
2112
|
//#region package/common/idleManager/idleManager.tsx
|
|
2098
|
-
var
|
|
2113
|
+
var an = [
|
|
2099
2114
|
"click",
|
|
2100
2115
|
"mousemove",
|
|
2101
2116
|
"keydown",
|
|
2102
2117
|
"scroll",
|
|
2103
2118
|
"touchstart"
|
|
2104
2119
|
];
|
|
2105
|
-
function
|
|
2120
|
+
function on({ children: e = null, idleAfterSeconds: t = 600, renderCondition: n = !0 }) {
|
|
2106
2121
|
let [r, o] = d(!1), s = u(null), c = i(() => {
|
|
2107
2122
|
s.current !== null && clearTimeout(s.current), o(!1), s.current = setTimeout(() => {
|
|
2108
2123
|
o(!0);
|
|
@@ -2111,14 +2126,14 @@ function rn({ children: e = null, idleAfterSeconds: t = 600, renderCondition: n
|
|
|
2111
2126
|
return a(() => {
|
|
2112
2127
|
c();
|
|
2113
2128
|
}, [c]), a(() => {
|
|
2114
|
-
for (let e of
|
|
2129
|
+
for (let e of an) document.addEventListener(e, c);
|
|
2115
2130
|
return () => {
|
|
2116
|
-
for (let e of
|
|
2131
|
+
for (let e of an) document.removeEventListener(e, c);
|
|
2117
2132
|
s.current !== null && clearTimeout(s.current);
|
|
2118
2133
|
};
|
|
2119
2134
|
}, [c]), /* @__PURE__ */ I(F, { children: n && r && e });
|
|
2120
2135
|
}
|
|
2121
|
-
var
|
|
2136
|
+
var sn = {
|
|
2122
2137
|
inputDropdown: "inputDropdown_UdYMa",
|
|
2123
2138
|
dropdown: "dropdown_-M5-x",
|
|
2124
2139
|
"dropdown-shown": "dropdown-shown_H2rFU",
|
|
@@ -2132,15 +2147,15 @@ var an = {
|
|
|
2132
2147
|
};
|
|
2133
2148
|
//#endregion
|
|
2134
2149
|
//#region package/common/inputDropdown/inputDropdown.tsx
|
|
2135
|
-
function
|
|
2150
|
+
function cn(e, t) {
|
|
2136
2151
|
return t ? t.value ?? "" : e ?? "";
|
|
2137
2152
|
}
|
|
2138
|
-
function
|
|
2153
|
+
function ln(e, t) {
|
|
2139
2154
|
let n = t.find((t) => t.value === e);
|
|
2140
2155
|
return n ? n.label ?? n.value : e;
|
|
2141
2156
|
}
|
|
2142
|
-
function
|
|
2143
|
-
let g =
|
|
2157
|
+
function un({ label: e = "", value: t = "", formValidator: n = null, items: r = [], className: a, style: o, classNames: s, styles: c, onSelect: l = () => null, onChange: p, placeholder: m = "", ...h }) {
|
|
2158
|
+
let g = cn(t, n), [_, v] = d(() => ln(g, r)), [y, b] = d(g), [x, S] = d(!1), [C, w] = d(null), T = u(null);
|
|
2144
2159
|
if (g !== y) {
|
|
2145
2160
|
b(g);
|
|
2146
2161
|
let e = r.find((e) => e.value === g);
|
|
@@ -2167,7 +2182,7 @@ function cn({ label: e = "", value: t = "", formValidator: n = null, items: r =
|
|
|
2167
2182
|
]);
|
|
2168
2183
|
return /* @__PURE__ */ L("div", {
|
|
2169
2184
|
...h,
|
|
2170
|
-
className: f(
|
|
2185
|
+
className: f(sn.inputDropdown, s?.root, a),
|
|
2171
2186
|
style: {
|
|
2172
2187
|
...c?.root,
|
|
2173
2188
|
...o
|
|
@@ -2175,7 +2190,7 @@ function cn({ label: e = "", value: t = "", formValidator: n = null, items: r =
|
|
|
2175
2190
|
onFocus: ee,
|
|
2176
2191
|
onBlur: D,
|
|
2177
2192
|
onKeyDown: k,
|
|
2178
|
-
children: [/* @__PURE__ */ I(
|
|
2193
|
+
children: [/* @__PURE__ */ I(ot, {
|
|
2179
2194
|
label: e,
|
|
2180
2195
|
value: _,
|
|
2181
2196
|
onChange: (e) => {
|
|
@@ -2183,10 +2198,10 @@ function cn({ label: e = "", value: t = "", formValidator: n = null, items: r =
|
|
|
2183
2198
|
},
|
|
2184
2199
|
placeholder: m
|
|
2185
2200
|
}), /* @__PURE__ */ I("div", {
|
|
2186
|
-
className: f(
|
|
2201
|
+
className: f(sn.dropdown, { [sn.dropdownShown]: x }, s?.dropdown),
|
|
2187
2202
|
style: c?.dropdown,
|
|
2188
2203
|
children: x && E.map((e, t) => /* @__PURE__ */ I("div", {
|
|
2189
|
-
className: f(
|
|
2204
|
+
className: f(sn.dropdownItem, C === t && sn.dropdownItemHighlighted, s?.item),
|
|
2190
2205
|
style: c?.item,
|
|
2191
2206
|
onClick: () => O(e),
|
|
2192
2207
|
children: e.label ?? e.value
|
|
@@ -2194,7 +2209,7 @@ function cn({ label: e = "", value: t = "", formValidator: n = null, items: r =
|
|
|
2194
2209
|
})]
|
|
2195
2210
|
});
|
|
2196
2211
|
}
|
|
2197
|
-
var
|
|
2212
|
+
var dn = {
|
|
2198
2213
|
board: "board_6KRdw",
|
|
2199
2214
|
column: "column_NrNeF",
|
|
2200
2215
|
"column-empty": "column-empty_5KYsJ",
|
|
@@ -2212,15 +2227,15 @@ var ln = {
|
|
|
2212
2227
|
};
|
|
2213
2228
|
//#endregion
|
|
2214
2229
|
//#region package/common/kanbanBoard/KanbanItem.tsx
|
|
2215
|
-
function
|
|
2216
|
-
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } =
|
|
2230
|
+
function fn({ id: e, children: t }) {
|
|
2231
|
+
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } = _e({ id: e });
|
|
2217
2232
|
return /* @__PURE__ */ I("div", {
|
|
2218
2233
|
ref: i,
|
|
2219
2234
|
style: {
|
|
2220
|
-
transform:
|
|
2235
|
+
transform: ye.Transform.toString(a),
|
|
2221
2236
|
transition: o
|
|
2222
2237
|
},
|
|
2223
|
-
className: f(
|
|
2238
|
+
className: f(dn.item, s && dn.itemDragging),
|
|
2224
2239
|
...n,
|
|
2225
2240
|
...r,
|
|
2226
2241
|
children: t
|
|
@@ -2228,22 +2243,22 @@ function un({ id: e, children: t }) {
|
|
|
2228
2243
|
}
|
|
2229
2244
|
//#endregion
|
|
2230
2245
|
//#region package/common/kanbanBoard/KanbanColumn.tsx
|
|
2231
|
-
function
|
|
2232
|
-
let { setNodeRef: c, isOver: l } =
|
|
2246
|
+
function pn({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a, classNames: o, styles: s }) {
|
|
2247
|
+
let { setNodeRef: c, isOver: l } = he({ id: `column-${e}` });
|
|
2233
2248
|
return /* @__PURE__ */ L("div", {
|
|
2234
|
-
className: f(
|
|
2249
|
+
className: f(dn.column, l && dn.columnOver, n.length === 0 && dn.columnEmpty, a),
|
|
2235
2250
|
children: [/* @__PURE__ */ I("div", {
|
|
2236
|
-
className: f(
|
|
2251
|
+
className: f(dn.columnHeader, o?.header),
|
|
2237
2252
|
style: s?.header,
|
|
2238
2253
|
children: t
|
|
2239
|
-
}), /* @__PURE__ */ I(
|
|
2254
|
+
}), /* @__PURE__ */ I(V, {
|
|
2240
2255
|
items: n,
|
|
2241
|
-
strategy:
|
|
2256
|
+
strategy: ve,
|
|
2242
2257
|
children: /* @__PURE__ */ I("div", {
|
|
2243
2258
|
ref: c,
|
|
2244
|
-
className: f(
|
|
2259
|
+
className: f(dn.columnItems, o?.items),
|
|
2245
2260
|
style: s?.items,
|
|
2246
|
-
children: n.map((e) => /* @__PURE__ */ I(
|
|
2261
|
+
children: n.map((e) => /* @__PURE__ */ I(fn, {
|
|
2247
2262
|
id: e,
|
|
2248
2263
|
children: r[e] === void 0 ? null : i(r[e], e)
|
|
2249
2264
|
}, e))
|
|
@@ -2253,8 +2268,8 @@ function dn({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a
|
|
|
2253
2268
|
}
|
|
2254
2269
|
//#endregion
|
|
2255
2270
|
//#region package/common/kanbanBoard/KanbanBoard.tsx
|
|
2256
|
-
function
|
|
2257
|
-
let [c, l] = d(null), [u, p] = d(null), m = z(
|
|
2271
|
+
function mn({ columns: e, items: t, renderItem: n, onChange: r, className: i, style: a, classNames: o, styles: s }) {
|
|
2272
|
+
let [c, l] = d(null), [u, p] = d(null), m = B(z(R, { activationConstraint: { distance: 8 } })), h = u ?? e;
|
|
2258
2273
|
function g(e, t) {
|
|
2259
2274
|
return e.findIndex((e) => e.itemIds.includes(t));
|
|
2260
2275
|
}
|
|
@@ -2286,7 +2301,7 @@ function fn({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2286
2301
|
let e = n[a], t = e.itemIds.indexOf(r), o = e.itemIds.indexOf(i);
|
|
2287
2302
|
t !== -1 && o !== -1 && t !== o && (n[a] = {
|
|
2288
2303
|
...e,
|
|
2289
|
-
itemIds:
|
|
2304
|
+
itemIds: ge(e.itemIds, t, o)
|
|
2290
2305
|
});
|
|
2291
2306
|
} else {
|
|
2292
2307
|
n[a].itemIds = n[a].itemIds.filter((e) => e !== r);
|
|
@@ -2303,30 +2318,30 @@ function fn({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2303
2318
|
}
|
|
2304
2319
|
r(u), p(null);
|
|
2305
2320
|
}
|
|
2306
|
-
return /* @__PURE__ */ L(
|
|
2321
|
+
return /* @__PURE__ */ L(fe, {
|
|
2307
2322
|
sensors: m,
|
|
2308
|
-
collisionDetection:
|
|
2323
|
+
collisionDetection: me,
|
|
2309
2324
|
onDragStart: _,
|
|
2310
2325
|
onDragOver: v,
|
|
2311
2326
|
onDragEnd: y,
|
|
2312
2327
|
children: [/* @__PURE__ */ I("div", {
|
|
2313
|
-
className: f(
|
|
2328
|
+
className: f(dn.board, i),
|
|
2314
2329
|
style: a,
|
|
2315
|
-
children: h.map((e) => /* @__PURE__ */ I(
|
|
2330
|
+
children: h.map((e) => /* @__PURE__ */ I(pn, {
|
|
2316
2331
|
id: e.id,
|
|
2317
2332
|
title: e.title,
|
|
2318
2333
|
itemIds: e.itemIds,
|
|
2319
2334
|
items: t,
|
|
2320
2335
|
renderItem: n
|
|
2321
2336
|
}, e.id))
|
|
2322
|
-
}), /* @__PURE__ */ I(
|
|
2323
|
-
className: f(
|
|
2337
|
+
}), /* @__PURE__ */ I(pe, { children: c && t[c] !== void 0 ? /* @__PURE__ */ I("div", {
|
|
2338
|
+
className: f(dn.dragOverlay, o?.dragOverlay),
|
|
2324
2339
|
style: s?.dragOverlay,
|
|
2325
2340
|
children: n(t[c], c)
|
|
2326
2341
|
}) : null })]
|
|
2327
2342
|
});
|
|
2328
2343
|
}
|
|
2329
|
-
var
|
|
2344
|
+
var hn = {
|
|
2330
2345
|
iconLoading: "iconLoading_wovj4",
|
|
2331
2346
|
"spin-to-oblivion": "spin-to-oblivion_0tZtm",
|
|
2332
2347
|
spinToOblivion: "spin-to-oblivion_0tZtm",
|
|
@@ -2341,39 +2356,39 @@ var pn = {
|
|
|
2341
2356
|
};
|
|
2342
2357
|
//#endregion
|
|
2343
2358
|
//#region package/common/loading/iconLoading/iconLoading.tsx
|
|
2344
|
-
function
|
|
2359
|
+
function gn({ className: e = "" }) {
|
|
2345
2360
|
return /* @__PURE__ */ I("div", {
|
|
2346
|
-
className: f(
|
|
2361
|
+
className: f(hn.iconLoading, e),
|
|
2347
2362
|
children: /* @__PURE__ */ L("svg", {
|
|
2348
2363
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2349
2364
|
viewBox: "-8 -1 16 14",
|
|
2350
2365
|
children: [
|
|
2351
2366
|
/* @__PURE__ */ I("path", {
|
|
2352
|
-
className:
|
|
2367
|
+
className: hn.iconLoadingFirst,
|
|
2353
2368
|
d: "M 0 0 C 3 5 6 5 6 12",
|
|
2354
2369
|
strokeWidth: "1.7",
|
|
2355
2370
|
fill: "none"
|
|
2356
2371
|
}),
|
|
2357
2372
|
/* @__PURE__ */ I("path", {
|
|
2358
|
-
className:
|
|
2373
|
+
className: hn.iconLoadingFirst,
|
|
2359
2374
|
d: "M 0 0 C -3 5 -6 5 -6 12",
|
|
2360
2375
|
strokeWidth: "1.7",
|
|
2361
2376
|
fill: "none"
|
|
2362
2377
|
}),
|
|
2363
2378
|
/* @__PURE__ */ I("path", {
|
|
2364
|
-
className:
|
|
2379
|
+
className: hn.iconLoadingFirst,
|
|
2365
2380
|
d: "M 0 0 L 0 10",
|
|
2366
2381
|
strokeWidth: "1.7",
|
|
2367
2382
|
fill: "none"
|
|
2368
2383
|
}),
|
|
2369
2384
|
/* @__PURE__ */ I("path", {
|
|
2370
|
-
className:
|
|
2385
|
+
className: hn.iconLoadingSecond,
|
|
2371
2386
|
d: "M 0.1 10 C -3 10 -4 10 -6 12",
|
|
2372
2387
|
strokeWidth: "1.7",
|
|
2373
2388
|
fill: "none"
|
|
2374
2389
|
}),
|
|
2375
2390
|
/* @__PURE__ */ I("path", {
|
|
2376
|
-
className:
|
|
2391
|
+
className: hn.iconLoadingSecond,
|
|
2377
2392
|
d: "M -0.1 10 C 3 10 4 10 6 12",
|
|
2378
2393
|
strokeWidth: "1.7",
|
|
2379
2394
|
fill: "none"
|
|
@@ -2384,41 +2399,79 @@ function mn({ className: e = "" }) {
|
|
|
2384
2399
|
}
|
|
2385
2400
|
//#endregion
|
|
2386
2401
|
//#region package/common/loading/iconLoading/index.ts
|
|
2387
|
-
var
|
|
2402
|
+
var _n = gn, vn = {
|
|
2403
|
+
numberInput: "numberInput_7p2O3",
|
|
2404
|
+
arrows: "arrows_yjRlc",
|
|
2405
|
+
arrowBtn: "arrowBtn_DbJoa"
|
|
2406
|
+
};
|
|
2388
2407
|
//#endregion
|
|
2389
2408
|
//#region package/common/numberInput/numberInput.tsx
|
|
2390
|
-
function
|
|
2391
|
-
let
|
|
2392
|
-
function
|
|
2409
|
+
function yn({ value: e, onChange: t, formValidator: n, label: r, error: i, className: a, allowNegative: o = !1, decimalSeparator: s, thousandSeparator: c, prefix: l, suffix: u, decimalScale: d, placeholder: m, sign: h, showArrows: _ = !1, step: v = 1, onKeyDown: b, ...x }) {
|
|
2410
|
+
let S = n == null ? e : n.value, C = h != null && S != null ? Math.abs(Number(S)) : S, w = C == null ? "" : String(C);
|
|
2411
|
+
function T(e) {
|
|
2393
2412
|
let r = e;
|
|
2394
|
-
r !== void 0 && (
|
|
2413
|
+
r !== void 0 && (h === "-" && (r = -Math.abs(r)), h === "+" && (r = Math.abs(r))), n?.set(r ?? null), t?.(r);
|
|
2414
|
+
}
|
|
2415
|
+
function E(e) {
|
|
2416
|
+
let t = (S != null && S !== "" ? Number(S) : 0) + e;
|
|
2417
|
+
!o && h !== "-" && (t = Math.max(0, t)), h === "-" && (t = Math.min(0, t)), T(t);
|
|
2395
2418
|
}
|
|
2396
|
-
|
|
2397
|
-
|
|
2419
|
+
function ee(e) {
|
|
2420
|
+
if (e.key === "ArrowUp") {
|
|
2421
|
+
e.preventDefault(), E(e.shiftKey ? v * 10 : v);
|
|
2422
|
+
return;
|
|
2423
|
+
}
|
|
2424
|
+
if (e.key === "ArrowDown") {
|
|
2425
|
+
e.preventDefault(), E(e.shiftKey ? -v * 10 : -v);
|
|
2426
|
+
return;
|
|
2427
|
+
}
|
|
2428
|
+
b?.(e);
|
|
2429
|
+
}
|
|
2430
|
+
let D = h === "-" ? "-" : h === "+" ? "+" : l, O = _ ? /* @__PURE__ */ L("div", {
|
|
2431
|
+
className: vn.arrows,
|
|
2432
|
+
children: [/* @__PURE__ */ I(Be, {
|
|
2433
|
+
className: vn.arrowBtn,
|
|
2434
|
+
tabIndex: -1,
|
|
2435
|
+
onMouseDown: (e) => {
|
|
2436
|
+
e.preventDefault(), E(e.shiftKey ? v * 10 : v);
|
|
2437
|
+
},
|
|
2438
|
+
children: /* @__PURE__ */ I(p, { icon: y })
|
|
2439
|
+
}), /* @__PURE__ */ I(Be, {
|
|
2440
|
+
className: vn.arrowBtn,
|
|
2441
|
+
tabIndex: -1,
|
|
2442
|
+
onMouseDown: (e) => {
|
|
2443
|
+
e.preventDefault(), E(e.shiftKey ? -v * 10 : -v);
|
|
2444
|
+
},
|
|
2445
|
+
children: /* @__PURE__ */ I(p, { icon: g })
|
|
2446
|
+
})]
|
|
2447
|
+
}) : null;
|
|
2448
|
+
return /* @__PURE__ */ I(ot, {
|
|
2398
2449
|
label: r,
|
|
2399
|
-
className: f(
|
|
2400
|
-
value:
|
|
2450
|
+
className: f(vn.numberInput, a),
|
|
2451
|
+
value: w,
|
|
2401
2452
|
onChange: () => {},
|
|
2402
2453
|
formValidator: null,
|
|
2403
2454
|
isValid: n ? n.touched ? !n.hasError() : !0 : !i,
|
|
2404
2455
|
errorMessage: n ? n.getCurrentErrorMessage() ?? "" : i ?? "",
|
|
2405
|
-
placeholder:
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2456
|
+
placeholder: m,
|
|
2457
|
+
suffix: O,
|
|
2458
|
+
customInput: /* @__PURE__ */ I(be, {
|
|
2459
|
+
onValueChange: (e) => T(e.floatValue),
|
|
2460
|
+
allowNegative: h == null ? o : !1,
|
|
2409
2461
|
decimalSeparator: s,
|
|
2410
2462
|
thousandSeparator: c,
|
|
2411
2463
|
decimalScale: d,
|
|
2412
2464
|
fixedDecimalScale: !0,
|
|
2413
|
-
prefix:
|
|
2465
|
+
prefix: D,
|
|
2414
2466
|
suffix: u,
|
|
2415
|
-
|
|
2467
|
+
onKeyDown: _ ? ee : b,
|
|
2468
|
+
...x
|
|
2416
2469
|
})
|
|
2417
2470
|
});
|
|
2418
2471
|
}
|
|
2419
2472
|
//#endregion
|
|
2420
2473
|
//#region package/common/numberInput/index.ts
|
|
2421
|
-
var
|
|
2474
|
+
var bn = yn, xn = {
|
|
2422
2475
|
optionPicker: "optionPicker_Yx82s",
|
|
2423
2476
|
"optionPicker-chip": "optionPicker-chip_ywtvr",
|
|
2424
2477
|
optionPickerChip: "optionPicker-chip_ywtvr",
|
|
@@ -2429,20 +2482,20 @@ var vn = _n, yn = {
|
|
|
2429
2482
|
};
|
|
2430
2483
|
//#endregion
|
|
2431
2484
|
//#region package/common/optionPicker/optionPicker.tsx
|
|
2432
|
-
function
|
|
2485
|
+
function Sn({ className: e = void 0, options: t, onChange: n, value: r, ...i }) {
|
|
2433
2486
|
let a = t.findIndex((e) => e.key === r) * 100 / t.length;
|
|
2434
2487
|
return /* @__PURE__ */ L("div", {
|
|
2435
2488
|
...i,
|
|
2436
|
-
className: f(
|
|
2489
|
+
className: f(xn.optionPicker, e),
|
|
2437
2490
|
children: [/* @__PURE__ */ I("div", {
|
|
2438
|
-
className:
|
|
2491
|
+
className: xn.optionPickerChip,
|
|
2439
2492
|
style: {
|
|
2440
2493
|
left: `${a}%`,
|
|
2441
2494
|
width: `${100 / t.length}%`
|
|
2442
2495
|
}
|
|
2443
|
-
}), t.map((e) => /* @__PURE__ */ I(
|
|
2496
|
+
}), t.map((e) => /* @__PURE__ */ I(Be, {
|
|
2444
2497
|
onClick: (t) => n(e.key, t),
|
|
2445
|
-
className: f(
|
|
2498
|
+
className: f(xn.optionPickerOption, e.key === r && xn.optionPickerOptionActive),
|
|
2446
2499
|
tabIndex: e.key === r ? -1 : 0,
|
|
2447
2500
|
children: e.label
|
|
2448
2501
|
}, e.key))]
|
|
@@ -2450,25 +2503,25 @@ function bn({ className: e = void 0, options: t, onChange: n, value: r, ...i })
|
|
|
2450
2503
|
}
|
|
2451
2504
|
//#endregion
|
|
2452
2505
|
//#region package/hooks/useWindowSize.ts
|
|
2453
|
-
var
|
|
2454
|
-
function
|
|
2506
|
+
var Cn = 768;
|
|
2507
|
+
function wn() {
|
|
2455
2508
|
let [e, t] = d(() => ({
|
|
2456
2509
|
width: window.innerWidth,
|
|
2457
2510
|
height: window.innerHeight,
|
|
2458
|
-
isMobileSize: window.innerWidth <
|
|
2511
|
+
isMobileSize: window.innerWidth < Cn
|
|
2459
2512
|
}));
|
|
2460
2513
|
return a(() => {
|
|
2461
2514
|
function e() {
|
|
2462
2515
|
t({
|
|
2463
2516
|
width: window.innerWidth,
|
|
2464
2517
|
height: window.innerHeight,
|
|
2465
|
-
isMobileSize: window.innerWidth <
|
|
2518
|
+
isMobileSize: window.innerWidth < Cn
|
|
2466
2519
|
});
|
|
2467
2520
|
}
|
|
2468
2521
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
2469
2522
|
}, []), e;
|
|
2470
2523
|
}
|
|
2471
|
-
var
|
|
2524
|
+
var Tn = {
|
|
2472
2525
|
overscroll: "overscroll_Ij750",
|
|
2473
2526
|
"overscroll-header": "overscroll-header_S6vYc",
|
|
2474
2527
|
overscrollHeader: "overscroll-header_S6vYc",
|
|
@@ -2479,8 +2532,8 @@ var Cn = {
|
|
|
2479
2532
|
};
|
|
2480
2533
|
//#endregion
|
|
2481
2534
|
//#region package/common/overscroll/overscroll.tsx
|
|
2482
|
-
function
|
|
2483
|
-
let { isMobileSize: h, height: g } =
|
|
2535
|
+
function En({ children: e = null, overscrollContent: t = null, overscrollContentDesktop: n = null, centerHeader: r = !0, min: o = 10, max: s = 80, start: c = 30, unit: l = "%", mobileOnly: d = !0, onScrollChange: p = () => {}, scrollDisabled: m = !1 }) {
|
|
2536
|
+
let { isMobileSize: h, height: g } = wn(), _ = u(null), v = u(null), y = u(null), b = u(!1), x = u(null), S = u(p);
|
|
2484
2537
|
S.current = p;
|
|
2485
2538
|
let C = i((e) => {
|
|
2486
2539
|
let t;
|
|
@@ -2538,15 +2591,15 @@ function wn({ children: e = null, overscrollContent: t = null, overscrollContent
|
|
|
2538
2591
|
if (d && !h) return n ? /* @__PURE__ */ L("div", { children: [n, e] }) : /* @__PURE__ */ I(F, { children: e });
|
|
2539
2592
|
let O = l === "%" ? `${100 - o}%` : `calc(100% - ${o}px)`;
|
|
2540
2593
|
return /* @__PURE__ */ L("div", {
|
|
2541
|
-
className:
|
|
2594
|
+
className: Tn.overscroll,
|
|
2542
2595
|
ref: _,
|
|
2543
2596
|
onScroll: D,
|
|
2544
2597
|
children: [/* @__PURE__ */ I("div", {
|
|
2545
|
-
className:
|
|
2598
|
+
className: Tn.overscrollHeaderContainer,
|
|
2546
2599
|
style: { height: `${s}${l}` },
|
|
2547
2600
|
ref: y,
|
|
2548
2601
|
children: /* @__PURE__ */ I("div", {
|
|
2549
|
-
className: f(
|
|
2602
|
+
className: f(Tn.overscrollHeader, r && Tn.overscrollHeaderCentered),
|
|
2550
2603
|
ref: v,
|
|
2551
2604
|
children: t
|
|
2552
2605
|
})
|
|
@@ -2556,7 +2609,7 @@ function wn({ children: e = null, overscrollContent: t = null, overscrollContent
|
|
|
2556
2609
|
})]
|
|
2557
2610
|
});
|
|
2558
2611
|
}
|
|
2559
|
-
var
|
|
2612
|
+
var Dn = {
|
|
2560
2613
|
progressBar: "progressBar_LO0sX",
|
|
2561
2614
|
"progressBar-fill": "progressBar-fill_rt32j",
|
|
2562
2615
|
progressBarFill: "progressBar-fill_rt32j",
|
|
@@ -2569,17 +2622,17 @@ var Tn = {
|
|
|
2569
2622
|
};
|
|
2570
2623
|
//#endregion
|
|
2571
2624
|
//#region package/common/progressBar/progressBar.tsx
|
|
2572
|
-
function
|
|
2625
|
+
function On(e) {
|
|
2573
2626
|
let t = e.replace("#", ""), n = parseInt(t.substring(0, 2), 16), r = parseInt(t.substring(2, 4), 16), i = parseInt(t.substring(4, 6), 16);
|
|
2574
2627
|
return (.299 * n + .587 * r + .114 * i) / 255 > .5 ? "#000000" : "#ffffff";
|
|
2575
2628
|
}
|
|
2576
|
-
function
|
|
2629
|
+
function kn({ className: e = void 0, total: t = 100, progress: n = 0, style: r = void 0, ...i }) {
|
|
2577
2630
|
function a() {
|
|
2578
2631
|
let e = [];
|
|
2579
2632
|
return Array.isArray(n) ? e.push(...n) : typeof n == "object" ? e.push(n) : e.push({ amount: n }), e.map((n, i) => {
|
|
2580
2633
|
let a = t ? n.amount / t * 100 : 0;
|
|
2581
2634
|
return /* @__PURE__ */ I("div", {
|
|
2582
|
-
className: f(
|
|
2635
|
+
className: f(Dn.progressBarFill, i === e.length - 1 && Dn.progressBarFillEnd, n.class),
|
|
2583
2636
|
style: {
|
|
2584
2637
|
width: `${a}%`,
|
|
2585
2638
|
background: n.color || void 0,
|
|
@@ -2587,8 +2640,8 @@ function Dn({ className: e = void 0, total: t = 100, progress: n = 0, style: r =
|
|
|
2587
2640
|
},
|
|
2588
2641
|
title: n.label ? `${n.label}: ${n.amount}` : void 0,
|
|
2589
2642
|
children: n.label && /* @__PURE__ */ I("div", {
|
|
2590
|
-
className:
|
|
2591
|
-
style: n.color ? { color:
|
|
2643
|
+
className: Dn.progressBarLabel,
|
|
2644
|
+
style: n.color ? { color: On(n.color) } : {},
|
|
2592
2645
|
children: n.label
|
|
2593
2646
|
})
|
|
2594
2647
|
}, i);
|
|
@@ -2596,21 +2649,21 @@ function Dn({ className: e = void 0, total: t = 100, progress: n = 0, style: r =
|
|
|
2596
2649
|
}
|
|
2597
2650
|
return /* @__PURE__ */ I("div", {
|
|
2598
2651
|
...i,
|
|
2599
|
-
className: f(
|
|
2652
|
+
className: f(Dn.progressBar, e),
|
|
2600
2653
|
style: r,
|
|
2601
2654
|
children: a()
|
|
2602
2655
|
});
|
|
2603
2656
|
}
|
|
2604
|
-
function
|
|
2657
|
+
function An(e) {
|
|
2605
2658
|
return Math.round(e / 5) * 5;
|
|
2606
2659
|
}
|
|
2607
|
-
function
|
|
2660
|
+
function jn(e) {
|
|
2608
2661
|
return {
|
|
2609
|
-
x:
|
|
2610
|
-
y:
|
|
2662
|
+
x: An(e.x),
|
|
2663
|
+
y: An(e.y)
|
|
2611
2664
|
};
|
|
2612
2665
|
}
|
|
2613
|
-
function
|
|
2666
|
+
function Mn(e, t, n) {
|
|
2614
2667
|
let r = n.createSVGPoint();
|
|
2615
2668
|
r.x = e, r.y = t;
|
|
2616
2669
|
let i = n.getScreenCTM();
|
|
@@ -2619,18 +2672,18 @@ function An(e, t, n) {
|
|
|
2619
2672
|
y: 0
|
|
2620
2673
|
};
|
|
2621
2674
|
let a = r.matrixTransform(i.inverse());
|
|
2622
|
-
return
|
|
2675
|
+
return jn({
|
|
2623
2676
|
x: a.x,
|
|
2624
2677
|
y: a.y
|
|
2625
2678
|
});
|
|
2626
2679
|
}
|
|
2627
|
-
function
|
|
2680
|
+
function Nn(e, t) {
|
|
2628
2681
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
2629
2682
|
}
|
|
2630
|
-
function
|
|
2683
|
+
function Pn(e, t, n) {
|
|
2631
2684
|
let r = n.x - t.x, i = n.y - t.y, a = r * r + i * i;
|
|
2632
2685
|
if (a === 0) return {
|
|
2633
|
-
dist:
|
|
2686
|
+
dist: Nn(e, t),
|
|
2634
2687
|
t: 0
|
|
2635
2688
|
};
|
|
2636
2689
|
let o = Math.max(0, Math.min(1, ((e.x - t.x) * r + (e.y - t.y) * i) / a)), s = t.x + o * r, c = t.y + o * i;
|
|
@@ -2639,12 +2692,12 @@ function Mn(e, t, n) {
|
|
|
2639
2692
|
t: o
|
|
2640
2693
|
};
|
|
2641
2694
|
}
|
|
2642
|
-
function
|
|
2695
|
+
function Fn(e, t) {
|
|
2643
2696
|
let n = null;
|
|
2644
2697
|
for (let r of t) {
|
|
2645
2698
|
let t = r.points;
|
|
2646
2699
|
for (let i = 0; i < t.length; i++) {
|
|
2647
|
-
let a = t[i], o = t[(i + 1) % t.length], { dist: s, t: c } =
|
|
2700
|
+
let a = t[i], o = t[(i + 1) % t.length], { dist: s, t: c } = Pn(e, a, o);
|
|
2648
2701
|
s <= 8 && (!n || s < n.dist) && (n = {
|
|
2649
2702
|
roomId: r.id,
|
|
2650
2703
|
wallIndex: i,
|
|
@@ -2655,7 +2708,7 @@ function Nn(e, t) {
|
|
|
2655
2708
|
}
|
|
2656
2709
|
return n;
|
|
2657
2710
|
}
|
|
2658
|
-
function
|
|
2711
|
+
function In(e, t) {
|
|
2659
2712
|
let n = !1;
|
|
2660
2713
|
for (let r = 0, i = t.length - 1; r < t.length; i = r++) {
|
|
2661
2714
|
let a = t[r].x, o = t[r].y, s = t[i].x, c = t[i].y;
|
|
@@ -2663,13 +2716,13 @@ function Pn(e, t) {
|
|
|
2663
2716
|
}
|
|
2664
2717
|
return n;
|
|
2665
2718
|
}
|
|
2666
|
-
function
|
|
2719
|
+
function Ln(e) {
|
|
2667
2720
|
return {
|
|
2668
2721
|
x: e.reduce((e, t) => e + t.x, 0) / e.length,
|
|
2669
2722
|
y: e.reduce((e, t) => e + t.y, 0) / e.length
|
|
2670
2723
|
};
|
|
2671
2724
|
}
|
|
2672
|
-
function
|
|
2725
|
+
function Rn(e, t, n, r) {
|
|
2673
2726
|
return [
|
|
2674
2727
|
{
|
|
2675
2728
|
x: e,
|
|
@@ -2689,7 +2742,7 @@ function In(e, t, n, r) {
|
|
|
2689
2742
|
}
|
|
2690
2743
|
];
|
|
2691
2744
|
}
|
|
2692
|
-
function
|
|
2745
|
+
function zn(e, t, n, r) {
|
|
2693
2746
|
let i = t.x - e.x, a = t.y - e.y, o = Math.sqrt(i * i + a * a);
|
|
2694
2747
|
if (o < .001) return null;
|
|
2695
2748
|
let s = i / o, c = a / o, l = e.x + i * n, u = e.y + a * n, d = Math.min(r / 2, o / 2 - .001);
|
|
@@ -2708,13 +2761,13 @@ function Ln(e, t, n, r) {
|
|
|
2708
2761
|
}
|
|
2709
2762
|
};
|
|
2710
2763
|
}
|
|
2711
|
-
function
|
|
2764
|
+
function Bn(e) {
|
|
2712
2765
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2713
2766
|
}
|
|
2714
|
-
function
|
|
2767
|
+
function Vn(e) {
|
|
2715
2768
|
return e.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(" ") + " Z";
|
|
2716
2769
|
}
|
|
2717
|
-
function
|
|
2770
|
+
function Hn(e, t) {
|
|
2718
2771
|
if (e.length < 2) return [];
|
|
2719
2772
|
if (t.length === 0) return [e.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(" ") + " Z"];
|
|
2720
2773
|
let n = e.length, r = [], i = [`M ${e[0].x.toFixed(2)},${e[0].y.toFixed(2)}`];
|
|
@@ -2737,8 +2790,8 @@ function Bn(e, t) {
|
|
|
2737
2790
|
}
|
|
2738
2791
|
return r[0] = [...i, ...r[0].slice(1)], r.map((e) => e.join(" "));
|
|
2739
2792
|
}
|
|
2740
|
-
function
|
|
2741
|
-
let r =
|
|
2793
|
+
function Un(e, t, n) {
|
|
2794
|
+
let r = zn(e, t, n.t, n.width);
|
|
2742
2795
|
if (!r) return "";
|
|
2743
2796
|
let { p1: i, p2: a, perp: o } = r, s = {
|
|
2744
2797
|
x: i.x + o.x * n.width,
|
|
@@ -2746,7 +2799,7 @@ function Vn(e, t, n) {
|
|
|
2746
2799
|
};
|
|
2747
2800
|
return [`M ${i.x.toFixed(2)},${i.y.toFixed(2)} L ${a.x.toFixed(2)},${a.y.toFixed(2)}`, `M ${i.x.toFixed(2)},${i.y.toFixed(2)} A ${n.width},${n.width} 0 0,1 ${s.x.toFixed(2)},${s.y.toFixed(2)}`].join(" ");
|
|
2748
2801
|
}
|
|
2749
|
-
function
|
|
2802
|
+
function Wn(e, t) {
|
|
2750
2803
|
let n = Infinity, r = Infinity, i = -Infinity, a = -Infinity;
|
|
2751
2804
|
for (let t of e) for (let e of t.points) e.x < n && (n = e.x), e.y < r && (r = e.y), e.x > i && (i = e.x), e.y > a && (a = e.y);
|
|
2752
2805
|
isFinite(n) || (n = 0, r = 0, i = 400, a = 300);
|
|
@@ -2756,10 +2809,10 @@ function Hn(e, t) {
|
|
|
2756
2809
|
(i - n + 10).toFixed(2),
|
|
2757
2810
|
(a - r + 10).toFixed(2)
|
|
2758
2811
|
].join(" "), s = e.map((e) => {
|
|
2759
|
-
let n = t.filter((t) => t.roomId === e.id), r =
|
|
2760
|
-
let n = e.points[t.wallIndex], r = e.points[(t.wallIndex + 1) % e.points.length], i =
|
|
2812
|
+
let n = t.filter((t) => t.roomId === e.id), r = Hn(e.points, n), i = Vn(e.points), a = Ln(e.points), o = r.map((e) => ` <path d="${e}" />`).join("\n"), s = n.map((t) => {
|
|
2813
|
+
let n = e.points[t.wallIndex], r = e.points[(t.wallIndex + 1) % e.points.length], i = Un(n, r, t);
|
|
2761
2814
|
return i ? ` <path d="${i}" fill="none" />` : "";
|
|
2762
|
-
}).filter(Boolean).join("\n"), c = e.name ? ` <text fontSize="5" x="${a.x.toFixed(1)}" y="${a.y.toFixed(1)}">${
|
|
2815
|
+
}).filter(Boolean).join("\n"), c = e.name ? ` <text fontSize="5" x="${a.x.toFixed(1)}" y="${a.y.toFixed(1)}">${Bn(e.name)}</text>` : "";
|
|
2763
2816
|
return [
|
|
2764
2817
|
` <g id="${e.id}">`,
|
|
2765
2818
|
o,
|
|
@@ -2778,7 +2831,7 @@ function Hn(e, t) {
|
|
|
2778
2831
|
"</svg>"
|
|
2779
2832
|
].join("\n");
|
|
2780
2833
|
}
|
|
2781
|
-
function
|
|
2834
|
+
function Gn(e) {
|
|
2782
2835
|
let t = [];
|
|
2783
2836
|
for (let n of e.matchAll(/[ML]\s*([-\d.]+)[,\s]+([-\d.]+)/gi)) t.push({
|
|
2784
2837
|
x: parseFloat(n[1]),
|
|
@@ -2786,14 +2839,14 @@ function Un(e) {
|
|
|
2786
2839
|
});
|
|
2787
2840
|
return t;
|
|
2788
2841
|
}
|
|
2789
|
-
function
|
|
2842
|
+
function Kn(e) {
|
|
2790
2843
|
let t = new DOMParser().parseFromString(e, "image/svg+xml"), n = [];
|
|
2791
2844
|
return t.querySelectorAll("[id^=\"room\"]").forEach((e) => {
|
|
2792
2845
|
let t = e.querySelector("[id=\"background\"]");
|
|
2793
2846
|
if (!t) return;
|
|
2794
2847
|
let r = t.getAttribute("d");
|
|
2795
2848
|
if (!r) return;
|
|
2796
|
-
let i =
|
|
2849
|
+
let i = Gn(r);
|
|
2797
2850
|
if (i.length < 3) return;
|
|
2798
2851
|
let a = e.querySelector("text")?.textContent?.trim() ?? "";
|
|
2799
2852
|
n.push({
|
|
@@ -2803,11 +2856,11 @@ function Wn(e) {
|
|
|
2803
2856
|
});
|
|
2804
2857
|
}), n;
|
|
2805
2858
|
}
|
|
2806
|
-
function
|
|
2807
|
-
let n =
|
|
2859
|
+
function qn(e, t) {
|
|
2860
|
+
let n = Wn(e, t), r = new Blob([n], { type: "image/svg+xml" }), i = URL.createObjectURL(r), a = document.createElement("a");
|
|
2808
2861
|
a.href = i, a.download = "room-plan.svg", a.click(), URL.revokeObjectURL(i);
|
|
2809
2862
|
}
|
|
2810
|
-
var
|
|
2863
|
+
var Z = {
|
|
2811
2864
|
roomDrawer: "roomDrawer_SJj4-",
|
|
2812
2865
|
"roomDrawer-toolbar": "roomDrawer-toolbar_55H5p",
|
|
2813
2866
|
roomDrawerToolbar: "roomDrawer-toolbar_55H5p",
|
|
@@ -2879,27 +2932,27 @@ var Q = {
|
|
|
2879
2932
|
polyCloseTarget: "polyCloseTarget_snjYx",
|
|
2880
2933
|
polyVertex: "polyVertex_fw0nX",
|
|
2881
2934
|
vertexHandle: "vertexHandle_-z7g5"
|
|
2882
|
-
},
|
|
2883
|
-
function
|
|
2884
|
-
return
|
|
2935
|
+
}, Jn = 6, Yn = 5, Xn = 1.25, Zn = .25, Qn = 12, $n = 0;
|
|
2936
|
+
function er(e) {
|
|
2937
|
+
return $n += 1, `${e}${$n}`;
|
|
2885
2938
|
}
|
|
2886
|
-
var
|
|
2939
|
+
var tr = {
|
|
2887
2940
|
select: "Drag inside to move · Drag corner to reshape · Click wall to add corner · Dbl-click corner to remove · Delete to erase",
|
|
2888
2941
|
rect: "Drag to draw a rectangular room",
|
|
2889
2942
|
polygon: "Click to place corners · Click first point or Enter to close · Esc to cancel"
|
|
2890
2943
|
};
|
|
2891
|
-
function
|
|
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), [
|
|
2944
|
+
function nr({ className: e }) {
|
|
2945
|
+
let [t, n] = d([]), [r, i] = d([]), [o, c] = d("rect"), [l, m] = d(null), [g, _] = d(null), [v, y] = d(null), [b, x] = d(null), [S, E] = d([]), [ee, D] = d(null), [O, A] = d(1), [j, M] = d({
|
|
2893
2946
|
x: 0,
|
|
2894
2947
|
y: 0
|
|
2895
|
-
}), N = u(null),
|
|
2948
|
+
}), N = u(null), re = u(null), oe = u(null), P = u(null), ce = u(null), le = u({
|
|
2896
2949
|
rooms: t,
|
|
2897
2950
|
doors: r,
|
|
2898
2951
|
tool: o,
|
|
2899
2952
|
selectedId: l,
|
|
2900
2953
|
editingDoorsForRoomId: g,
|
|
2901
|
-
polyPoints:
|
|
2902
|
-
zoom:
|
|
2954
|
+
polyPoints: S,
|
|
2955
|
+
zoom: O,
|
|
2903
2956
|
pan: j
|
|
2904
2957
|
});
|
|
2905
2958
|
s(() => {
|
|
@@ -2909,14 +2962,14 @@ function er({ className: e }) {
|
|
|
2909
2962
|
tool: o,
|
|
2910
2963
|
selectedId: l,
|
|
2911
2964
|
editingDoorsForRoomId: g,
|
|
2912
|
-
polyPoints:
|
|
2913
|
-
zoom:
|
|
2965
|
+
polyPoints: S,
|
|
2966
|
+
zoom: O,
|
|
2914
2967
|
pan: j
|
|
2915
2968
|
};
|
|
2916
2969
|
});
|
|
2917
2970
|
function ue(e) {
|
|
2918
2971
|
e.length < 3 || (n((t) => [...t, {
|
|
2919
|
-
id:
|
|
2972
|
+
id: er("room"),
|
|
2920
2973
|
name: `Room ${t.length + 1}`,
|
|
2921
2974
|
points: e
|
|
2922
2975
|
}]), E([]), D(null));
|
|
@@ -2926,9 +2979,9 @@ function er({ className: e }) {
|
|
|
2926
2979
|
if (!e) return;
|
|
2927
2980
|
function t(e) {
|
|
2928
2981
|
e.preventDefault();
|
|
2929
|
-
let { zoom: t, pan: n } = le.current, r =
|
|
2982
|
+
let { zoom: t, pan: n } = le.current, r = Mn(e.clientX, e.clientY, P.current);
|
|
2930
2983
|
if (!r) return;
|
|
2931
|
-
let i = e.deltaY < 0 ?
|
|
2984
|
+
let i = e.deltaY < 0 ? Xn : 1 / Xn, a = Math.max(Zn, Math.min(Qn, t * i));
|
|
2932
2985
|
M({
|
|
2933
2986
|
x: r.x - (r.x - n.x) * (t / a),
|
|
2934
2987
|
y: r.y - (r.y - n.y) * (t / a)
|
|
@@ -2951,7 +3004,7 @@ function er({ className: e }) {
|
|
|
2951
3004
|
return;
|
|
2952
3005
|
}
|
|
2953
3006
|
if ((e.key === "+" || e.key === "=") && !(e.target instanceof HTMLInputElement)) {
|
|
2954
|
-
let e = Math.max(
|
|
3007
|
+
let e = Math.max(Zn, Math.min(Qn, s * Xn)), t = c.x + 400 / s / 2, n = c.y + 300 / s / 2;
|
|
2955
3008
|
A(e), M({
|
|
2956
3009
|
x: t - 400 / e / 2,
|
|
2957
3010
|
y: n - 300 / e / 2
|
|
@@ -2959,7 +3012,7 @@ function er({ className: e }) {
|
|
|
2959
3012
|
return;
|
|
2960
3013
|
}
|
|
2961
3014
|
if (e.key === "-" && !(e.target instanceof HTMLInputElement)) {
|
|
2962
|
-
let e = Math.max(
|
|
3015
|
+
let e = Math.max(Zn, Math.min(Qn, s / Xn)), t = c.x + 400 / s / 2, n = c.y + 300 / s / 2;
|
|
2963
3016
|
A(e), M({
|
|
2964
3017
|
x: t - 400 / e / 2,
|
|
2965
3018
|
y: n - 300 / e / 2
|
|
@@ -2977,21 +3030,21 @@ function er({ className: e }) {
|
|
|
2977
3030
|
}
|
|
2978
3031
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
2979
3032
|
}, []);
|
|
2980
|
-
function de(e, t =
|
|
2981
|
-
let r = Math.max(
|
|
3033
|
+
function de(e, t = O, n = j) {
|
|
3034
|
+
let r = Math.max(Zn, Math.min(Qn, t * e)), i = n.x + 400 / t / 2, a = n.y + 300 / t / 2;
|
|
2982
3035
|
M({
|
|
2983
3036
|
x: i - 400 / r / 2,
|
|
2984
3037
|
y: a - 300 / r / 2
|
|
2985
3038
|
}), A(r);
|
|
2986
3039
|
}
|
|
2987
3040
|
function fe(e) {
|
|
2988
|
-
return P.current ?
|
|
3041
|
+
return P.current ? Mn(e.clientX, e.clientY, P.current) : null;
|
|
2989
3042
|
}
|
|
2990
3043
|
function pe(e, t) {
|
|
2991
3044
|
let n = null;
|
|
2992
3045
|
for (let r = 0; r < t.points.length; r++) {
|
|
2993
|
-
let i =
|
|
2994
|
-
i <=
|
|
3046
|
+
let i = Nn(e, t.points[r]);
|
|
3047
|
+
i <= Jn && (!n || i < n.d) && (n = {
|
|
2995
3048
|
index: r,
|
|
2996
3049
|
d: i
|
|
2997
3050
|
});
|
|
@@ -3001,8 +3054,8 @@ function er({ className: e }) {
|
|
|
3001
3054
|
function R(e, t) {
|
|
3002
3055
|
let n = null;
|
|
3003
3056
|
for (let r = 0; r < t.points.length; r++) {
|
|
3004
|
-
let i = t.points[r], a = t.points[(r + 1) % t.points.length], { dist: o, t: s } =
|
|
3005
|
-
o <=
|
|
3057
|
+
let i = t.points[r], a = t.points[(r + 1) % t.points.length], { dist: o, t: s } = Pn(e, i, a);
|
|
3058
|
+
o <= Yn && (!n || o < n.d) && (n = {
|
|
3006
3059
|
index: r,
|
|
3007
3060
|
t: s,
|
|
3008
3061
|
d: o
|
|
@@ -3055,14 +3108,14 @@ function er({ className: e }) {
|
|
|
3055
3108
|
let t = P.current;
|
|
3056
3109
|
if (t) {
|
|
3057
3110
|
let n = t.getBoundingClientRect();
|
|
3058
|
-
|
|
3111
|
+
oe.current = {
|
|
3059
3112
|
startClient: {
|
|
3060
3113
|
x: e.clientX,
|
|
3061
3114
|
y: e.clientY
|
|
3062
3115
|
},
|
|
3063
3116
|
origPan: { ...j },
|
|
3064
|
-
scaleX: 400 /
|
|
3065
|
-
scaleY: 300 /
|
|
3117
|
+
scaleX: 400 / O / n.width,
|
|
3118
|
+
scaleY: 300 / O / n.height
|
|
3066
3119
|
};
|
|
3067
3120
|
}
|
|
3068
3121
|
return;
|
|
@@ -3074,9 +3127,9 @@ function er({ className: e }) {
|
|
|
3074
3127
|
if (g) {
|
|
3075
3128
|
let e = t.find((e) => e.id === g);
|
|
3076
3129
|
if (e) {
|
|
3077
|
-
let t =
|
|
3130
|
+
let t = Fn(n, [e]);
|
|
3078
3131
|
t && i((e) => [...e, {
|
|
3079
|
-
id:
|
|
3132
|
+
id: er("door"),
|
|
3080
3133
|
roomId: t.roomId,
|
|
3081
3134
|
wallIndex: t.wallIndex,
|
|
3082
3135
|
t: t.t,
|
|
@@ -3090,7 +3143,7 @@ function er({ className: e }) {
|
|
|
3090
3143
|
return;
|
|
3091
3144
|
}
|
|
3092
3145
|
if (o === "polygon") {
|
|
3093
|
-
|
|
3146
|
+
S.length >= 3 && Nn(n, S[0]) <= 8 ? ue(S) : E((e) => [...e, n]);
|
|
3094
3147
|
return;
|
|
3095
3148
|
}
|
|
3096
3149
|
if (o === "select") {
|
|
@@ -3111,7 +3164,7 @@ function er({ className: e }) {
|
|
|
3111
3164
|
if (e) {
|
|
3112
3165
|
let t = R(n, e);
|
|
3113
3166
|
if (t) {
|
|
3114
|
-
let r = e.points[t.index], i = e.points[(t.index + 1) % e.points.length], a =
|
|
3167
|
+
let r = e.points[t.index], i = e.points[(t.index + 1) % e.points.length], a = jn({
|
|
3115
3168
|
x: r.x + (i.x - r.x) * t.t,
|
|
3116
3169
|
y: r.y + (i.y - r.y) * t.t
|
|
3117
3170
|
}), o = me(e.id, t.index, t.t, a);
|
|
@@ -3125,7 +3178,7 @@ function er({ className: e }) {
|
|
|
3125
3178
|
return;
|
|
3126
3179
|
}
|
|
3127
3180
|
}
|
|
3128
|
-
let r = t.find((e) =>
|
|
3181
|
+
let r = t.find((e) => In(n, e.points));
|
|
3129
3182
|
if (r) {
|
|
3130
3183
|
m(r.id), N.current = {
|
|
3131
3184
|
type: "room",
|
|
@@ -3149,8 +3202,8 @@ function er({ className: e }) {
|
|
|
3149
3202
|
i && (e.preventDefault(), he(r.id, i.index));
|
|
3150
3203
|
}
|
|
3151
3204
|
function V(e) {
|
|
3152
|
-
if (
|
|
3153
|
-
let { startClient: t, origPan: n, scaleX: r, scaleY: i } =
|
|
3205
|
+
if (oe.current) {
|
|
3206
|
+
let { startClient: t, origPan: n, scaleX: r, scaleY: i } = oe.current;
|
|
3154
3207
|
M({
|
|
3155
3208
|
x: n.x - (e.clientX - t.x) * r,
|
|
3156
3209
|
y: n.y - (e.clientY - t.y) * i
|
|
@@ -3159,11 +3212,11 @@ function er({ className: e }) {
|
|
|
3159
3212
|
}
|
|
3160
3213
|
let r = fe(e);
|
|
3161
3214
|
if (r) {
|
|
3162
|
-
if (
|
|
3215
|
+
if (re.current && g) {
|
|
3163
3216
|
let e = t.find((e) => e.id === g);
|
|
3164
3217
|
if (e) {
|
|
3165
|
-
let t =
|
|
3166
|
-
t && i((e) => e.map((e) => e.id ===
|
|
3218
|
+
let t = Fn(r, [e]);
|
|
3219
|
+
t && i((e) => e.map((e) => e.id === re.current ? {
|
|
3167
3220
|
...e,
|
|
3168
3221
|
wallIndex: t.wallIndex,
|
|
3169
3222
|
t: t.t
|
|
@@ -3182,7 +3235,7 @@ function er({ className: e }) {
|
|
|
3182
3235
|
if (o === "select" && !g && N.current) {
|
|
3183
3236
|
let e = N.current;
|
|
3184
3237
|
if (e.type === "vertex") {
|
|
3185
|
-
let t = r.x - e.start.x, i = r.y - e.start.y, a =
|
|
3238
|
+
let t = r.x - e.start.x, i = r.y - e.start.y, a = jn({
|
|
3186
3239
|
x: e.origPt.x + t,
|
|
3187
3240
|
y: e.origPt.y + i
|
|
3188
3241
|
});
|
|
@@ -3208,8 +3261,8 @@ function er({ className: e }) {
|
|
|
3208
3261
|
}
|
|
3209
3262
|
}
|
|
3210
3263
|
function ge(e) {
|
|
3211
|
-
if (
|
|
3212
|
-
|
|
3264
|
+
if (oe.current) {
|
|
3265
|
+
oe.current = null;
|
|
3213
3266
|
return;
|
|
3214
3267
|
}
|
|
3215
3268
|
let t = fe(e);
|
|
@@ -3217,12 +3270,12 @@ function er({ className: e }) {
|
|
|
3217
3270
|
if (o === "rect" && v) {
|
|
3218
3271
|
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);
|
|
3219
3272
|
i >= 10 && a >= 10 && n((t) => [...t, {
|
|
3220
|
-
id:
|
|
3273
|
+
id: er("room"),
|
|
3221
3274
|
name: `Room ${t.length + 1}`,
|
|
3222
|
-
points:
|
|
3275
|
+
points: Rn(e, r, i, a)
|
|
3223
3276
|
}]), y(null), x(null);
|
|
3224
3277
|
}
|
|
3225
|
-
|
|
3278
|
+
re.current = null, N.current = null;
|
|
3226
3279
|
}
|
|
3227
3280
|
}
|
|
3228
3281
|
function _e(e) {
|
|
@@ -3231,23 +3284,23 @@ function er({ className: e }) {
|
|
|
3231
3284
|
name: e
|
|
3232
3285
|
} : t));
|
|
3233
3286
|
}
|
|
3234
|
-
function
|
|
3287
|
+
function ve(e, t) {
|
|
3235
3288
|
let n = parseFloat(t);
|
|
3236
3289
|
isNaN(n) || n <= 0 || i((t) => t.map((t) => t.id === e ? {
|
|
3237
3290
|
...t,
|
|
3238
3291
|
width: n
|
|
3239
3292
|
} : t));
|
|
3240
3293
|
}
|
|
3241
|
-
function
|
|
3294
|
+
function ye() {
|
|
3242
3295
|
l && (n((e) => e.filter((e) => e.id !== l)), i((e) => e.filter((e) => e.roomId !== l)), _(null), m(null));
|
|
3243
3296
|
}
|
|
3244
|
-
function
|
|
3297
|
+
function be(e) {
|
|
3245
3298
|
i((t) => t.filter((t) => t.id !== e));
|
|
3246
3299
|
}
|
|
3247
|
-
function
|
|
3300
|
+
function xe(e) {
|
|
3248
3301
|
c(e), _(null), E([]), D(null), y(null), x(null);
|
|
3249
3302
|
}
|
|
3250
|
-
function
|
|
3303
|
+
function Se(e) {
|
|
3251
3304
|
let t = e.target.files?.[0];
|
|
3252
3305
|
if (!t) return;
|
|
3253
3306
|
e.target.value = "";
|
|
@@ -3255,103 +3308,103 @@ function er({ className: e }) {
|
|
|
3255
3308
|
r.onload = (e) => {
|
|
3256
3309
|
let t = e.target?.result;
|
|
3257
3310
|
if (typeof t != "string") return;
|
|
3258
|
-
let r =
|
|
3311
|
+
let r = Kn(t);
|
|
3259
3312
|
r.length !== 0 && (n(r.map((e) => ({
|
|
3260
3313
|
...e,
|
|
3261
|
-
id:
|
|
3314
|
+
id: er("room")
|
|
3262
3315
|
}))), i([]), m(null), _(null), A(1), M({
|
|
3263
3316
|
x: 0,
|
|
3264
3317
|
y: 0
|
|
3265
3318
|
}));
|
|
3266
3319
|
}, r.readAsText(t);
|
|
3267
3320
|
}
|
|
3268
|
-
let
|
|
3321
|
+
let Ce = o === "rect" && v && b ? {
|
|
3269
3322
|
x: Math.min(v.x, b.x),
|
|
3270
3323
|
y: Math.min(v.y, b.y),
|
|
3271
3324
|
w: Math.abs(b.x - v.x),
|
|
3272
3325
|
h: Math.abs(b.y - v.y)
|
|
3273
|
-
} : null,
|
|
3326
|
+
} : null, we = l ? t.find((e) => e.id === l) ?? null : null, Te = g ? t.find((e) => e.id === g) ?? null : null, Ee = g ? r.filter((e) => e.roomId === g) : [], De = [
|
|
3274
3327
|
{
|
|
3275
3328
|
t: "select",
|
|
3276
|
-
icon:
|
|
3329
|
+
icon: k,
|
|
3277
3330
|
label: "Select & edit"
|
|
3278
3331
|
},
|
|
3279
3332
|
{
|
|
3280
3333
|
t: "rect",
|
|
3281
|
-
icon:
|
|
3334
|
+
icon: ie,
|
|
3282
3335
|
label: "Rectangle room"
|
|
3283
3336
|
},
|
|
3284
3337
|
{
|
|
3285
3338
|
t: "polygon",
|
|
3286
|
-
icon:
|
|
3339
|
+
icon: T,
|
|
3287
3340
|
label: "Polygon room"
|
|
3288
3341
|
}
|
|
3289
|
-
],
|
|
3342
|
+
], H = 400 / O, Oe = 300 / O, ke = g ? Z.roomDrawerCanvasDoor : o === "select" ? Z.roomDrawerCanvasSelect : void 0;
|
|
3290
3343
|
return /* @__PURE__ */ L("div", {
|
|
3291
|
-
className: f(
|
|
3344
|
+
className: f(Z.roomDrawer, e),
|
|
3292
3345
|
children: [
|
|
3293
3346
|
/* @__PURE__ */ L("div", {
|
|
3294
|
-
className:
|
|
3347
|
+
className: Z.roomDrawerToolbar,
|
|
3295
3348
|
children: [
|
|
3296
|
-
|
|
3349
|
+
De.map(({ t: e, icon: t, label: n }) => /* @__PURE__ */ I("button", {
|
|
3297
3350
|
title: n,
|
|
3298
|
-
className: f(
|
|
3299
|
-
onClick: () =>
|
|
3351
|
+
className: f(Z.roomDrawerToolbarBtn, e === o && !g && Z.roomDrawerToolbarBtnActive),
|
|
3352
|
+
onClick: () => xe(e),
|
|
3300
3353
|
children: /* @__PURE__ */ I(p, { icon: t })
|
|
3301
3354
|
}, e)),
|
|
3302
|
-
/* @__PURE__ */ I("div", { className:
|
|
3355
|
+
/* @__PURE__ */ I("div", { className: Z.roomDrawerToolbarSep }),
|
|
3303
3356
|
/* @__PURE__ */ I("button", {
|
|
3304
3357
|
title: "Zoom in (+)",
|
|
3305
|
-
className:
|
|
3306
|
-
onClick: () => de(
|
|
3307
|
-
disabled:
|
|
3358
|
+
className: Z.roomDrawerToolbarBtn,
|
|
3359
|
+
onClick: () => de(Xn),
|
|
3360
|
+
disabled: O >= Qn,
|
|
3308
3361
|
children: /* @__PURE__ */ I(p, { icon: ne })
|
|
3309
3362
|
}),
|
|
3310
3363
|
/* @__PURE__ */ L("button", {
|
|
3311
|
-
title: `Reset zoom (0) — ${Math.round(
|
|
3312
|
-
className:
|
|
3364
|
+
title: `Reset zoom (0) — ${Math.round(O * 100)}%`,
|
|
3365
|
+
className: Z.roomDrawerToolbarZoomLabel,
|
|
3313
3366
|
onClick: () => {
|
|
3314
3367
|
A(1), M({
|
|
3315
3368
|
x: 0,
|
|
3316
3369
|
y: 0
|
|
3317
3370
|
});
|
|
3318
3371
|
},
|
|
3319
|
-
children: [Math.round(
|
|
3372
|
+
children: [Math.round(O * 100), "%"]
|
|
3320
3373
|
}),
|
|
3321
3374
|
/* @__PURE__ */ I("button", {
|
|
3322
3375
|
title: "Zoom out (−)",
|
|
3323
|
-
className:
|
|
3324
|
-
onClick: () => de(1 /
|
|
3325
|
-
disabled:
|
|
3376
|
+
className: Z.roomDrawerToolbarBtn,
|
|
3377
|
+
onClick: () => de(1 / Xn),
|
|
3378
|
+
disabled: O <= Zn,
|
|
3326
3379
|
children: /* @__PURE__ */ I(p, { icon: te })
|
|
3327
3380
|
}),
|
|
3328
|
-
/* @__PURE__ */ I("div", { className:
|
|
3381
|
+
/* @__PURE__ */ I("div", { className: Z.roomDrawerToolbarSep }),
|
|
3329
3382
|
/* @__PURE__ */ I("button", {
|
|
3330
3383
|
title: "Upload SVG",
|
|
3331
|
-
className:
|
|
3384
|
+
className: Z.roomDrawerToolbarBtn,
|
|
3332
3385
|
onClick: () => ce.current?.click(),
|
|
3333
|
-
children: /* @__PURE__ */ I(p, { icon:
|
|
3386
|
+
children: /* @__PURE__ */ I(p, { icon: se })
|
|
3334
3387
|
}),
|
|
3335
3388
|
/* @__PURE__ */ I("button", {
|
|
3336
3389
|
title: "Download SVG",
|
|
3337
|
-
className:
|
|
3338
|
-
onClick: () =>
|
|
3390
|
+
className: Z.roomDrawerToolbarBtn,
|
|
3391
|
+
onClick: () => qn(t, r),
|
|
3339
3392
|
disabled: t.length === 0,
|
|
3340
|
-
children: /* @__PURE__ */ I(p, { icon:
|
|
3393
|
+
children: /* @__PURE__ */ I(p, { icon: w })
|
|
3341
3394
|
}),
|
|
3342
3395
|
/* @__PURE__ */ I("input", {
|
|
3343
3396
|
ref: ce,
|
|
3344
3397
|
type: "file",
|
|
3345
3398
|
accept: ".svg,image/svg+xml",
|
|
3346
3399
|
style: { display: "none" },
|
|
3347
|
-
onChange:
|
|
3400
|
+
onChange: Se
|
|
3348
3401
|
})
|
|
3349
3402
|
]
|
|
3350
3403
|
}),
|
|
3351
3404
|
/* @__PURE__ */ L("svg", {
|
|
3352
3405
|
ref: P,
|
|
3353
|
-
className: f(
|
|
3354
|
-
viewBox: `${j.x} ${j.y} ${
|
|
3406
|
+
className: f(Z.roomDrawerCanvas, ke),
|
|
3407
|
+
viewBox: `${j.x} ${j.y} ${H} ${Oe}`,
|
|
3355
3408
|
onMouseDown: z,
|
|
3356
3409
|
onMouseMove: V,
|
|
3357
3410
|
onMouseUp: ge,
|
|
@@ -3365,31 +3418,31 @@ function er({ className: e }) {
|
|
|
3365
3418
|
children: /* @__PURE__ */ I("path", {
|
|
3366
3419
|
d: "M 5 0 L 0 0 0 5",
|
|
3367
3420
|
fill: "none",
|
|
3368
|
-
className:
|
|
3421
|
+
className: Z.gridLine
|
|
3369
3422
|
})
|
|
3370
3423
|
}) }),
|
|
3371
3424
|
/* @__PURE__ */ I("rect", {
|
|
3372
3425
|
x: j.x,
|
|
3373
3426
|
y: j.y,
|
|
3374
|
-
width:
|
|
3375
|
-
height:
|
|
3427
|
+
width: H,
|
|
3428
|
+
height: Oe,
|
|
3376
3429
|
fill: "url(#rd-grid)"
|
|
3377
3430
|
}),
|
|
3378
3431
|
t.map((e) => {
|
|
3379
|
-
let t = e.points, n = t.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x},${e.y}`).join(" ") + " Z", i =
|
|
3432
|
+
let t = e.points, n = t.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x},${e.y}`).join(" ") + " Z", i = Hn(t, r.filter((t) => t.roomId === e.id)), a = Ln(t), o = l === e.id, s = g === e.id;
|
|
3380
3433
|
return /* @__PURE__ */ L("g", { children: [
|
|
3381
3434
|
/* @__PURE__ */ I("path", {
|
|
3382
3435
|
d: n,
|
|
3383
|
-
className: f(
|
|
3436
|
+
className: f(Z.roomFill, (o || s) && Z.roomFillSelected)
|
|
3384
3437
|
}),
|
|
3385
3438
|
i.map((e, t) => /* @__PURE__ */ I("path", {
|
|
3386
3439
|
d: e,
|
|
3387
|
-
className: f(
|
|
3440
|
+
className: f(Z.roomStroke, (o || s) && Z.roomStrokeSelected)
|
|
3388
3441
|
}, t)),
|
|
3389
3442
|
e.name && /* @__PURE__ */ I("text", {
|
|
3390
3443
|
x: a.x,
|
|
3391
3444
|
y: a.y,
|
|
3392
|
-
className:
|
|
3445
|
+
className: Z.roomText,
|
|
3393
3446
|
textAnchor: "middle",
|
|
3394
3447
|
dominantBaseline: "middle",
|
|
3395
3448
|
children: e.name
|
|
@@ -3399,19 +3452,19 @@ function er({ className: e }) {
|
|
|
3399
3452
|
r.map((e) => {
|
|
3400
3453
|
let n = t.find((t) => t.id === e.roomId);
|
|
3401
3454
|
if (!n) return null;
|
|
3402
|
-
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a =
|
|
3455
|
+
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a = zn(r, i, e.t, e.width);
|
|
3403
3456
|
return a ? /* @__PURE__ */ I("line", {
|
|
3404
3457
|
x1: a.p1.x,
|
|
3405
3458
|
y1: a.p1.y,
|
|
3406
3459
|
x2: a.p2.x,
|
|
3407
3460
|
y2: a.p2.y,
|
|
3408
|
-
className:
|
|
3461
|
+
className: Z.doorGap
|
|
3409
3462
|
}, e.id) : null;
|
|
3410
3463
|
}),
|
|
3411
|
-
g &&
|
|
3464
|
+
g && Ee.map((e) => {
|
|
3412
3465
|
let n = t.find((t) => t.id === e.roomId);
|
|
3413
3466
|
if (!n) return null;
|
|
3414
|
-
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a =
|
|
3467
|
+
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a = zn(r, i, e.t, e.width);
|
|
3415
3468
|
if (!a) return null;
|
|
3416
3469
|
let o = {
|
|
3417
3470
|
x: (a.p1.x + a.p2.x) / 2,
|
|
@@ -3421,133 +3474,133 @@ function er({ className: e }) {
|
|
|
3421
3474
|
cx: o.x,
|
|
3422
3475
|
cy: o.y,
|
|
3423
3476
|
r: 2.5,
|
|
3424
|
-
className:
|
|
3477
|
+
className: Z.doorMarker,
|
|
3425
3478
|
onMouseDown: (t) => {
|
|
3426
|
-
t.button === 0 && (t.preventDefault(), t.stopPropagation(),
|
|
3479
|
+
t.button === 0 && (t.preventDefault(), t.stopPropagation(), re.current = e.id);
|
|
3427
3480
|
}
|
|
3428
3481
|
}, e.id);
|
|
3429
3482
|
}),
|
|
3430
|
-
o === "select" && !g &&
|
|
3483
|
+
o === "select" && !g && we && we.points.map((e, t) => /* @__PURE__ */ I("circle", {
|
|
3431
3484
|
cx: e.x,
|
|
3432
3485
|
cy: e.y,
|
|
3433
3486
|
r: 3.5,
|
|
3434
|
-
className:
|
|
3487
|
+
className: Z.vertexHandle
|
|
3435
3488
|
}, t)),
|
|
3436
|
-
|
|
3437
|
-
x:
|
|
3438
|
-
y:
|
|
3439
|
-
width:
|
|
3440
|
-
height:
|
|
3441
|
-
className:
|
|
3489
|
+
Ce && /* @__PURE__ */ I("rect", {
|
|
3490
|
+
x: Ce.x,
|
|
3491
|
+
y: Ce.y,
|
|
3492
|
+
width: Ce.w,
|
|
3493
|
+
height: Ce.h,
|
|
3494
|
+
className: Z.preview
|
|
3442
3495
|
}),
|
|
3443
|
-
o === "polygon" &&
|
|
3496
|
+
o === "polygon" && S.length > 0 && /* @__PURE__ */ L(F, { children: [
|
|
3444
3497
|
/* @__PURE__ */ I("polyline", {
|
|
3445
|
-
points: [...
|
|
3446
|
-
className:
|
|
3498
|
+
points: [...S, ee ?? S[S.length - 1]].map((e) => `${e.x},${e.y}`).join(" "),
|
|
3499
|
+
className: Z.preview
|
|
3447
3500
|
}),
|
|
3448
|
-
|
|
3449
|
-
cx:
|
|
3450
|
-
cy:
|
|
3501
|
+
S.length >= 3 && /* @__PURE__ */ I("circle", {
|
|
3502
|
+
cx: S[0].x,
|
|
3503
|
+
cy: S[0].y,
|
|
3451
3504
|
r: 8 / 2,
|
|
3452
|
-
className:
|
|
3505
|
+
className: Z.polyCloseTarget
|
|
3453
3506
|
}),
|
|
3454
|
-
|
|
3507
|
+
S.map((e, t) => /* @__PURE__ */ I("circle", {
|
|
3455
3508
|
cx: e.x,
|
|
3456
3509
|
cy: e.y,
|
|
3457
3510
|
r: 2,
|
|
3458
|
-
className:
|
|
3511
|
+
className: Z.polyVertex
|
|
3459
3512
|
}, t))
|
|
3460
3513
|
] })
|
|
3461
3514
|
]
|
|
3462
3515
|
}),
|
|
3463
|
-
|
|
3464
|
-
className:
|
|
3516
|
+
we && !g && /* @__PURE__ */ L("div", {
|
|
3517
|
+
className: Z.roomDrawerInfo,
|
|
3465
3518
|
children: [
|
|
3466
3519
|
/* @__PURE__ */ I("span", {
|
|
3467
|
-
className:
|
|
3520
|
+
className: Z.roomDrawerInfoLabel,
|
|
3468
3521
|
children: "Name"
|
|
3469
3522
|
}),
|
|
3470
3523
|
/* @__PURE__ */ I("input", {
|
|
3471
|
-
className:
|
|
3472
|
-
value:
|
|
3524
|
+
className: Z.roomDrawerInfoInput,
|
|
3525
|
+
value: we.name,
|
|
3473
3526
|
onChange: (e) => _e(e.target.value),
|
|
3474
3527
|
placeholder: "Room name"
|
|
3475
3528
|
}),
|
|
3476
3529
|
/* @__PURE__ */ L("button", {
|
|
3477
|
-
className:
|
|
3478
|
-
onClick: () => _(
|
|
3530
|
+
className: Z.roomDrawerInfoDoorsBtn,
|
|
3531
|
+
onClick: () => _(we.id),
|
|
3479
3532
|
title: "Edit doors",
|
|
3480
|
-
children: [/* @__PURE__ */ I(p, { icon:
|
|
3533
|
+
children: [/* @__PURE__ */ I(p, { icon: C }), /* @__PURE__ */ I("span", { children: r.filter((e) => e.roomId === we.id).length })]
|
|
3481
3534
|
}),
|
|
3482
3535
|
/* @__PURE__ */ I("button", {
|
|
3483
|
-
className:
|
|
3484
|
-
onClick:
|
|
3536
|
+
className: Z.roomDrawerInfoDelete,
|
|
3537
|
+
onClick: ye,
|
|
3485
3538
|
title: "Delete room",
|
|
3486
|
-
children: /* @__PURE__ */ I(p, { icon:
|
|
3539
|
+
children: /* @__PURE__ */ I(p, { icon: ae })
|
|
3487
3540
|
})
|
|
3488
3541
|
]
|
|
3489
3542
|
}),
|
|
3490
|
-
g &&
|
|
3491
|
-
className:
|
|
3543
|
+
g && Te && /* @__PURE__ */ L("div", {
|
|
3544
|
+
className: Z.roomDrawerDoorPanel,
|
|
3492
3545
|
children: [/* @__PURE__ */ L("div", {
|
|
3493
|
-
className:
|
|
3546
|
+
className: Z.roomDrawerDoorPanelHeader,
|
|
3494
3547
|
children: [
|
|
3495
3548
|
/* @__PURE__ */ I(p, {
|
|
3496
|
-
icon:
|
|
3497
|
-
className:
|
|
3549
|
+
icon: C,
|
|
3550
|
+
className: Z.roomDrawerDoorPanelIcon
|
|
3498
3551
|
}),
|
|
3499
3552
|
/* @__PURE__ */ I("span", {
|
|
3500
|
-
className:
|
|
3501
|
-
children:
|
|
3553
|
+
className: Z.roomDrawerDoorPanelTitle,
|
|
3554
|
+
children: Te.name ? `Doors · ${Te.name}` : "Doors"
|
|
3502
3555
|
}),
|
|
3503
3556
|
/* @__PURE__ */ L("button", {
|
|
3504
|
-
className:
|
|
3557
|
+
className: Z.roomDrawerDoorPanelDone,
|
|
3505
3558
|
onClick: () => _(null),
|
|
3506
3559
|
title: "Done (Esc)",
|
|
3507
3560
|
children: [/* @__PURE__ */ I(p, { icon: h }), "Done"]
|
|
3508
3561
|
})
|
|
3509
3562
|
]
|
|
3510
3563
|
}), /* @__PURE__ */ L("div", {
|
|
3511
|
-
className:
|
|
3512
|
-
children: [
|
|
3513
|
-
className:
|
|
3564
|
+
className: Z.roomDrawerDoorPanelList,
|
|
3565
|
+
children: [Ee.length === 0 && /* @__PURE__ */ I("span", {
|
|
3566
|
+
className: Z.roomDrawerDoorPanelEmpty,
|
|
3514
3567
|
children: "Click on a wall to add a door"
|
|
3515
|
-
}),
|
|
3516
|
-
className:
|
|
3568
|
+
}), Ee.map((e, t) => /* @__PURE__ */ L("div", {
|
|
3569
|
+
className: Z.roomDrawerDoorPanelItem,
|
|
3517
3570
|
children: [
|
|
3518
3571
|
/* @__PURE__ */ L("span", {
|
|
3519
|
-
className:
|
|
3572
|
+
className: Z.roomDrawerDoorPanelLabel,
|
|
3520
3573
|
children: ["Door ", t + 1]
|
|
3521
3574
|
}),
|
|
3522
3575
|
/* @__PURE__ */ I("span", {
|
|
3523
|
-
className:
|
|
3576
|
+
className: Z.roomDrawerDoorPanelWidthLabel,
|
|
3524
3577
|
children: "Width"
|
|
3525
3578
|
}),
|
|
3526
3579
|
/* @__PURE__ */ I("input", {
|
|
3527
|
-
className:
|
|
3580
|
+
className: Z.roomDrawerInfoInput,
|
|
3528
3581
|
type: "number",
|
|
3529
3582
|
min: 1,
|
|
3530
3583
|
value: e.width,
|
|
3531
|
-
onChange: (t) =>
|
|
3584
|
+
onChange: (t) => ve(e.id, t.target.value)
|
|
3532
3585
|
}),
|
|
3533
3586
|
/* @__PURE__ */ I("button", {
|
|
3534
|
-
className:
|
|
3535
|
-
onClick: () =>
|
|
3587
|
+
className: Z.roomDrawerInfoDelete,
|
|
3588
|
+
onClick: () => be(e.id),
|
|
3536
3589
|
title: "Delete door",
|
|
3537
|
-
children: /* @__PURE__ */ I(p, { icon:
|
|
3590
|
+
children: /* @__PURE__ */ I(p, { icon: ae })
|
|
3538
3591
|
})
|
|
3539
3592
|
]
|
|
3540
3593
|
}, e.id))]
|
|
3541
3594
|
})]
|
|
3542
3595
|
}),
|
|
3543
3596
|
/* @__PURE__ */ I("div", {
|
|
3544
|
-
className:
|
|
3545
|
-
children: g ? "Click a wall to add a door · Adjust width or delete from the list · Done or Esc to finish" : `${
|
|
3597
|
+
className: Z.roomDrawerHint,
|
|
3598
|
+
children: g ? "Click a wall to add a door · Adjust width or delete from the list · Done or Esc to finish" : `${tr[o]} · Scroll to zoom · Middle-drag to pan · 0 to reset`
|
|
3546
3599
|
})
|
|
3547
3600
|
]
|
|
3548
3601
|
});
|
|
3549
3602
|
}
|
|
3550
|
-
var
|
|
3603
|
+
var rr = {
|
|
3551
3604
|
"roomViewer-containerLoading": "roomViewer-containerLoading_BL3M-",
|
|
3552
3605
|
roomViewerContainerLoading: "roomViewer-containerLoading_BL3M-",
|
|
3553
3606
|
"roomViewer-container": "roomViewer-container_YlmB8",
|
|
@@ -3565,7 +3618,7 @@ var tr = {
|
|
|
3565
3618
|
};
|
|
3566
3619
|
//#endregion
|
|
3567
3620
|
//#region package/common/roomViewer/roomViewer.tsx
|
|
3568
|
-
function
|
|
3621
|
+
function ir({ data: e = [] }) {
|
|
3569
3622
|
let t = u(null), [, n] = d(null), [r, i] = d(0), [o, s] = d(!0);
|
|
3570
3623
|
a(() => {
|
|
3571
3624
|
let i = new AbortController();
|
|
@@ -3585,15 +3638,15 @@ function nr({ data: e = [] }) {
|
|
|
3585
3638
|
if (n) {
|
|
3586
3639
|
let [e] = t.querySelectorAll(`[id="room${n}"]`);
|
|
3587
3640
|
if (e) {
|
|
3588
|
-
e.classList.remove(
|
|
3641
|
+
e.classList.remove(rr.roomViewerSelected, rr.roomViewerTint);
|
|
3589
3642
|
let [t] = e.querySelectorAll("[id=\"background\"]");
|
|
3590
|
-
t && t.classList.remove(
|
|
3643
|
+
t && t.classList.remove(rr.roomViewerTint);
|
|
3591
3644
|
}
|
|
3592
3645
|
}
|
|
3593
3646
|
if (a) {
|
|
3594
|
-
a.classList.add(
|
|
3647
|
+
a.classList.add(rr.roomViewerSelected);
|
|
3595
3648
|
let [e] = a.querySelectorAll("[id=\"background\"]");
|
|
3596
|
-
(e ?? a).classList.add(
|
|
3649
|
+
(e ?? a).classList.add(rr.roomViewerTint);
|
|
3597
3650
|
}
|
|
3598
3651
|
return r;
|
|
3599
3652
|
});
|
|
@@ -3606,25 +3659,25 @@ function nr({ data: e = [] }) {
|
|
|
3606
3659
|
}
|
|
3607
3660
|
let m = e[r]?.data ?? null;
|
|
3608
3661
|
return /* @__PURE__ */ L("div", {
|
|
3609
|
-
className:
|
|
3662
|
+
className: rr.roomViewer,
|
|
3610
3663
|
ref: t,
|
|
3611
3664
|
children: [
|
|
3612
3665
|
/* @__PURE__ */ I("h3", {
|
|
3613
|
-
className:
|
|
3666
|
+
className: rr.roomViewerHeader,
|
|
3614
3667
|
children: e[r]?.label ?? ""
|
|
3615
3668
|
}),
|
|
3616
3669
|
/* @__PURE__ */ I("div", {
|
|
3617
|
-
className: f(
|
|
3670
|
+
className: f(rr.roomViewerContainer, o && rr.roomViewerContainerLoading),
|
|
3618
3671
|
children: m
|
|
3619
3672
|
}, r),
|
|
3620
3673
|
e.length > 1 && /* @__PURE__ */ L("div", {
|
|
3621
|
-
className:
|
|
3674
|
+
className: rr.roomViewerActions,
|
|
3622
3675
|
children: [
|
|
3623
3676
|
/* @__PURE__ */ I(p, {
|
|
3624
3677
|
icon: _,
|
|
3625
3678
|
onClick: () => l(-1)
|
|
3626
3679
|
}),
|
|
3627
|
-
/* @__PURE__ */ I(p, { icon:
|
|
3680
|
+
/* @__PURE__ */ I(p, { icon: A }),
|
|
3628
3681
|
/* @__PURE__ */ I(p, {
|
|
3629
3682
|
icon: v,
|
|
3630
3683
|
onClick: () => l(1)
|
|
@@ -3634,21 +3687,21 @@ function nr({ data: e = [] }) {
|
|
|
3634
3687
|
]
|
|
3635
3688
|
});
|
|
3636
3689
|
}
|
|
3637
|
-
var
|
|
3690
|
+
var ar = { scrollbarProvider: "scrollbarProvider_IMBFu" };
|
|
3638
3691
|
//#endregion
|
|
3639
3692
|
//#region package/common/scrollbarProvider/scrollbarProvider.tsx
|
|
3640
|
-
function
|
|
3693
|
+
function or({ className: e = void 0, children: t = void 0 }) {
|
|
3641
3694
|
return /* @__PURE__ */ I("div", {
|
|
3642
|
-
className: f(
|
|
3695
|
+
className: f(ar.scrollbarProvider, e),
|
|
3643
3696
|
children: t
|
|
3644
3697
|
});
|
|
3645
3698
|
}
|
|
3646
3699
|
//#endregion
|
|
3647
3700
|
//#region package/common/scrollbarProvider/index.ts
|
|
3648
|
-
var
|
|
3701
|
+
var sr = or, cr = { resultCount: "resultCount_Sn48Q" };
|
|
3649
3702
|
//#endregion
|
|
3650
3703
|
//#region package/common/searchInput/searchInput.tsx
|
|
3651
|
-
function
|
|
3704
|
+
function lr({ value: e, onChange: t, onDebounce: n, placeholder: r, label: i, debounceMs: o = 500, totalAmount: s, showAmount: c = !0, className: l, width: d, ...f }) {
|
|
3652
3705
|
let p = u(null);
|
|
3653
3706
|
a(() => () => {
|
|
3654
3707
|
p.current !== null && clearTimeout(p.current);
|
|
@@ -3664,14 +3717,14 @@ function sr({ value: e, onChange: t, onDebounce: n, placeholder: r, label: i, de
|
|
|
3664
3717
|
...f,
|
|
3665
3718
|
className: l,
|
|
3666
3719
|
style: d == null ? void 0 : { width: d },
|
|
3667
|
-
children: [/* @__PURE__ */ I(
|
|
3668
|
-
type:
|
|
3720
|
+
children: [/* @__PURE__ */ I(ot, {
|
|
3721
|
+
type: q.Search,
|
|
3669
3722
|
label: i,
|
|
3670
3723
|
placeholder: r,
|
|
3671
3724
|
value: e,
|
|
3672
3725
|
onChange: m
|
|
3673
3726
|
}), h && /* @__PURE__ */ L("p", {
|
|
3674
|
-
className:
|
|
3727
|
+
className: cr.resultCount,
|
|
3675
3728
|
children: [
|
|
3676
3729
|
s,
|
|
3677
3730
|
" ",
|
|
@@ -3680,7 +3733,7 @@ function sr({ value: e, onChange: t, onDebounce: n, placeholder: r, label: i, de
|
|
|
3680
3733
|
})]
|
|
3681
3734
|
});
|
|
3682
3735
|
}
|
|
3683
|
-
var
|
|
3736
|
+
var ur = {
|
|
3684
3737
|
stepper: "stepper_kiS2A",
|
|
3685
3738
|
"stepper-clickable": "stepper-clickable_Nm6fP",
|
|
3686
3739
|
stepperClickable: "stepper-clickable_Nm6fP",
|
|
@@ -3710,7 +3763,7 @@ var cr = {
|
|
|
3710
3763
|
};
|
|
3711
3764
|
//#endregion
|
|
3712
3765
|
//#region package/common/stepper/stepper.tsx
|
|
3713
|
-
function
|
|
3766
|
+
function dr() {
|
|
3714
3767
|
return /* @__PURE__ */ I("svg", {
|
|
3715
3768
|
strokeLinejoin: "round",
|
|
3716
3769
|
strokeLinecap: "round",
|
|
@@ -3726,26 +3779,26 @@ function lr() {
|
|
|
3726
3779
|
})
|
|
3727
3780
|
});
|
|
3728
3781
|
}
|
|
3729
|
-
function
|
|
3782
|
+
function fr({ 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
3783
|
let p = r === "vertical";
|
|
3731
3784
|
return /* @__PURE__ */ I("div", {
|
|
3732
3785
|
...d,
|
|
3733
|
-
className: f(
|
|
3786
|
+
className: f(ur.stepper, { [ur.stepperVertical]: p }, l?.root, s),
|
|
3734
3787
|
style: {
|
|
3735
3788
|
...u?.root,
|
|
3736
3789
|
...c
|
|
3737
3790
|
},
|
|
3738
3791
|
children: t.map((r, s) => {
|
|
3739
|
-
let c = s < n, d = s <= n, m = !!i && (a ? s !== n : c), h = f(
|
|
3740
|
-
className: f(
|
|
3792
|
+
let c = s < n, d = s <= n, m = !!i && (a ? s !== n : c), h = f(ur.stepperEntry, { [ur.stepperEntryActive]: d }, { [ur.stepperEntryDone]: c }, { [ur.stepperClickable]: m }, l?.entry), g = /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("div", {
|
|
3793
|
+
className: f(ur.stepperEntryNumber, { [ur.stepperEntryNumberDone]: c }, l?.entryNumber),
|
|
3741
3794
|
style: u?.entryNumber,
|
|
3742
|
-
children: c ? /* @__PURE__ */ I(
|
|
3795
|
+
children: c ? /* @__PURE__ */ I(dr, {}) : s + 1
|
|
3743
3796
|
}), !o && /* @__PURE__ */ I("div", {
|
|
3744
|
-
className: f(
|
|
3797
|
+
className: f(ur.stepperEntryLabel, { [ur.stepperEntryLabelVertical]: p }, l?.entryLabel),
|
|
3745
3798
|
style: u?.entryLabel,
|
|
3746
3799
|
children: r.label
|
|
3747
3800
|
})] });
|
|
3748
|
-
return /* @__PURE__ */ L(e.Fragment, { children: [m ? /* @__PURE__ */ I(
|
|
3801
|
+
return /* @__PURE__ */ L(e.Fragment, { children: [m ? /* @__PURE__ */ I(Be, {
|
|
3749
3802
|
className: h,
|
|
3750
3803
|
style: u?.entry,
|
|
3751
3804
|
onClick: () => i(s),
|
|
@@ -3757,7 +3810,7 @@ function ur({ steps: t = [], currentStep: n = 0, alignment: r = "horizontal", on
|
|
|
3757
3810
|
"aria-current": s === n ? "step" : void 0,
|
|
3758
3811
|
children: g
|
|
3759
3812
|
}), s < t.length - 1 && /* @__PURE__ */ I("div", {
|
|
3760
|
-
className: f(
|
|
3813
|
+
className: f(ur.stepperConnector, { [ur.stepperConnectorFilled]: c }, { [ur.stepperConnectorVertical]: p }, l?.connector),
|
|
3761
3814
|
style: u?.connector
|
|
3762
3815
|
})] }, s);
|
|
3763
3816
|
})
|
|
@@ -3765,7 +3818,7 @@ function ur({ steps: t = [], currentStep: n = 0, alignment: r = "horizontal", on
|
|
|
3765
3818
|
}
|
|
3766
3819
|
//#endregion
|
|
3767
3820
|
//#region package/services/tenorService.ts
|
|
3768
|
-
var
|
|
3821
|
+
var pr = "https://tenor.googleapis.com/v2", mr = class {
|
|
3769
3822
|
constructor(e) {
|
|
3770
3823
|
this.key = e;
|
|
3771
3824
|
}
|
|
@@ -3774,14 +3827,14 @@ var dr = "https://tenor.googleapis.com/v2", fr = class {
|
|
|
3774
3827
|
q: e,
|
|
3775
3828
|
key: this.key
|
|
3776
3829
|
});
|
|
3777
|
-
return t.limit != null && n.set("limit", String(t.limit)), t.contentfilter != null && n.set("contentfilter", t.contentfilter), t.pos != null && n.set("pos", t.pos), (await fetch(`${
|
|
3830
|
+
return t.limit != null && n.set("limit", String(t.limit)), t.contentfilter != null && n.set("contentfilter", t.contentfilter), t.pos != null && n.set("pos", t.pos), (await fetch(`${pr}/search?${n}`)).json();
|
|
3778
3831
|
}
|
|
3779
3832
|
async searchSuggestions(e) {
|
|
3780
3833
|
let t = new URLSearchParams({
|
|
3781
3834
|
q: e,
|
|
3782
3835
|
key: this.key
|
|
3783
3836
|
});
|
|
3784
|
-
return (await fetch(`${
|
|
3837
|
+
return (await fetch(`${pr}/search_suggestions?${t}`)).json();
|
|
3785
3838
|
}
|
|
3786
3839
|
registerShare(e, t) {
|
|
3787
3840
|
let n = new URLSearchParams({
|
|
@@ -3789,9 +3842,9 @@ var dr = "https://tenor.googleapis.com/v2", fr = class {
|
|
|
3789
3842
|
q: e,
|
|
3790
3843
|
key: this.key
|
|
3791
3844
|
});
|
|
3792
|
-
fetch(`${
|
|
3845
|
+
fetch(`${pr}/registershare?${n}`).catch(() => null);
|
|
3793
3846
|
}
|
|
3794
|
-
},
|
|
3847
|
+
}, hr = {
|
|
3795
3848
|
gifPreview: "gifPreview_-ECUZ",
|
|
3796
3849
|
"gifPreview-image": "gifPreview-image_Aq7-a",
|
|
3797
3850
|
gifPreviewImage: "gifPreview-image_Aq7-a",
|
|
@@ -3801,25 +3854,25 @@ var dr = "https://tenor.googleapis.com/v2", fr = class {
|
|
|
3801
3854
|
};
|
|
3802
3855
|
//#endregion
|
|
3803
3856
|
//#region package/common/tenorPicker/components/gifPreview/gifPreview.tsx
|
|
3804
|
-
function
|
|
3857
|
+
function gr({ className: e, previewItems: t = [], onSelect: n, onLoadAdditional: r }) {
|
|
3805
3858
|
function i(e) {
|
|
3806
3859
|
let t = e.currentTarget, n = t.scrollHeight - t.clientHeight * 1.5;
|
|
3807
3860
|
t.scrollTop >= n && r?.();
|
|
3808
3861
|
}
|
|
3809
3862
|
return /* @__PURE__ */ I(F, { children: t.length > 0 && /* @__PURE__ */ I("div", {
|
|
3810
|
-
className: f(
|
|
3863
|
+
className: f(hr.gifPreview, e),
|
|
3811
3864
|
onScroll: i,
|
|
3812
|
-
children: t.map((e, t) => /* @__PURE__ */ I(
|
|
3813
|
-
className:
|
|
3865
|
+
children: t.map((e, t) => /* @__PURE__ */ I(Be, {
|
|
3866
|
+
className: hr.gifPreviewImageContainer,
|
|
3814
3867
|
onClick: () => n?.(e),
|
|
3815
3868
|
children: /* @__PURE__ */ I("div", {
|
|
3816
|
-
className:
|
|
3869
|
+
className: hr.gifPreviewImage,
|
|
3817
3870
|
style: { backgroundImage: `url(${e.media_formats.tinygif.url})` }
|
|
3818
3871
|
})
|
|
3819
3872
|
}, `${e.id}_${t}`))
|
|
3820
3873
|
}) });
|
|
3821
3874
|
}
|
|
3822
|
-
var
|
|
3875
|
+
var _r = {
|
|
3823
3876
|
gifView: "gifView_Fa2zj",
|
|
3824
3877
|
"gifView-loading": "gifView-loading_LfNJr",
|
|
3825
3878
|
gifViewLoading: "gifView-loading_LfNJr",
|
|
@@ -3827,20 +3880,20 @@ var hr = {
|
|
|
3827
3880
|
};
|
|
3828
3881
|
//#endregion
|
|
3829
3882
|
//#region package/common/tenorPicker/components/gifView/gifView.tsx
|
|
3830
|
-
function
|
|
3883
|
+
function vr({ className: e, src: t = "" }) {
|
|
3831
3884
|
let [n, r] = d(!0);
|
|
3832
3885
|
return a(() => {
|
|
3833
3886
|
r(!0);
|
|
3834
3887
|
}, [t]), /* @__PURE__ */ L("div", {
|
|
3835
|
-
className: f(
|
|
3888
|
+
className: f(_r.gifView, e),
|
|
3836
3889
|
children: [/* @__PURE__ */ I("img", {
|
|
3837
|
-
className:
|
|
3890
|
+
className: _r.tenorPickerSelected,
|
|
3838
3891
|
src: t,
|
|
3839
3892
|
onLoad: () => r(!1)
|
|
3840
|
-
}), n && /* @__PURE__ */ I("div", { className:
|
|
3893
|
+
}), n && /* @__PURE__ */ I("div", { className: _r.gifViewLoading })]
|
|
3841
3894
|
});
|
|
3842
3895
|
}
|
|
3843
|
-
var
|
|
3896
|
+
var yr = {
|
|
3844
3897
|
"tenorPicker-selected": "tenorPicker-selected_IfR2z",
|
|
3845
3898
|
tenorPickerSelected: "tenorPicker-selected_IfR2z",
|
|
3846
3899
|
"tenorPicker-modal-content": "tenorPicker-modal-content_Vkolf",
|
|
@@ -3852,8 +3905,8 @@ var _r = {
|
|
|
3852
3905
|
};
|
|
3853
3906
|
//#endregion
|
|
3854
3907
|
//#region package/common/tenorPicker/tenorPicker.tsx
|
|
3855
|
-
function
|
|
3856
|
-
let a = c(() => new
|
|
3908
|
+
function br({ className: e, token: t = "", isModal: n = !1, onSelect: r = () => void 0, selected: i = null }) {
|
|
3909
|
+
let a = c(() => new mr(t), [t]), [o, s] = d(""), [l, u] = d([]), [p, m] = d([]), [h, g] = d(null), [_, v] = d(!1);
|
|
3857
3910
|
async function y(e) {
|
|
3858
3911
|
if (s(e), !e.trim()) {
|
|
3859
3912
|
u([]), m([]), g(null);
|
|
@@ -3877,25 +3930,25 @@ function vr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3877
3930
|
await r(e), v(!1), e && a.registerShare(o, e.id);
|
|
3878
3931
|
}
|
|
3879
3932
|
function S() {
|
|
3880
|
-
return /* @__PURE__ */ I(
|
|
3933
|
+
return /* @__PURE__ */ I($e, {
|
|
3881
3934
|
inline: !0,
|
|
3882
|
-
className:
|
|
3883
|
-
children: p.map((e) => /* @__PURE__ */ I(
|
|
3884
|
-
className:
|
|
3935
|
+
className: yr.tenorPickerSuggestionsContainer,
|
|
3936
|
+
children: p.map((e) => /* @__PURE__ */ I(Qe, {
|
|
3937
|
+
className: yr.tenorPickerSuggestionsItem,
|
|
3885
3938
|
text: e,
|
|
3886
3939
|
onClick: () => y(e)
|
|
3887
3940
|
}, e))
|
|
3888
3941
|
});
|
|
3889
3942
|
}
|
|
3890
3943
|
function C() {
|
|
3891
|
-
return /* @__PURE__ */ I(
|
|
3944
|
+
return /* @__PURE__ */ I(gr, {
|
|
3892
3945
|
previewItems: l,
|
|
3893
3946
|
onSelect: x,
|
|
3894
3947
|
onLoadAdditional: b
|
|
3895
3948
|
});
|
|
3896
3949
|
}
|
|
3897
3950
|
function w() {
|
|
3898
|
-
return /* @__PURE__ */ I(
|
|
3951
|
+
return /* @__PURE__ */ I(lr, {
|
|
3899
3952
|
label: "Pick gif",
|
|
3900
3953
|
value: o,
|
|
3901
3954
|
onDebounce: y,
|
|
@@ -3903,28 +3956,28 @@ function vr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3903
3956
|
});
|
|
3904
3957
|
}
|
|
3905
3958
|
return n ? /* @__PURE__ */ L("div", {
|
|
3906
|
-
className: f(
|
|
3959
|
+
className: f(yr.tenorPicker, e),
|
|
3907
3960
|
children: [
|
|
3908
3961
|
/* @__PURE__ */ L("div", {
|
|
3909
|
-
className:
|
|
3910
|
-
children: [/* @__PURE__ */ I(
|
|
3962
|
+
className: De.actionButtons,
|
|
3963
|
+
children: [/* @__PURE__ */ I(W, {
|
|
3911
3964
|
onClick: () => v(!0),
|
|
3912
3965
|
children: "Pick gif"
|
|
3913
|
-
}), i && /* @__PURE__ */ I(
|
|
3914
|
-
styleType:
|
|
3966
|
+
}), i && /* @__PURE__ */ I(W, {
|
|
3967
|
+
styleType: je.Delete,
|
|
3915
3968
|
onClick: () => x(null),
|
|
3916
3969
|
children: "Remove gif"
|
|
3917
3970
|
})]
|
|
3918
3971
|
}),
|
|
3919
|
-
i && /* @__PURE__ */ I(
|
|
3920
|
-
className:
|
|
3972
|
+
i && /* @__PURE__ */ I(vr, {
|
|
3973
|
+
className: yr.tenorPickerSelected,
|
|
3921
3974
|
src: i
|
|
3922
3975
|
}),
|
|
3923
|
-
/* @__PURE__ */ I(
|
|
3976
|
+
/* @__PURE__ */ I(vt, {
|
|
3924
3977
|
isOpen: _,
|
|
3925
3978
|
onClose: () => v(!1),
|
|
3926
3979
|
children: /* @__PURE__ */ L("div", {
|
|
3927
|
-
className:
|
|
3980
|
+
className: yr.tenorPickerModalContent,
|
|
3928
3981
|
children: [
|
|
3929
3982
|
w(),
|
|
3930
3983
|
S(),
|
|
@@ -3934,22 +3987,22 @@ function vr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3934
3987
|
})
|
|
3935
3988
|
]
|
|
3936
3989
|
}) : /* @__PURE__ */ L("div", {
|
|
3937
|
-
className: f(
|
|
3990
|
+
className: f(yr.tenorPicker, e),
|
|
3938
3991
|
children: [
|
|
3939
|
-
/* @__PURE__ */ I(
|
|
3940
|
-
align:
|
|
3992
|
+
/* @__PURE__ */ I(rt, {
|
|
3993
|
+
align: tt.Left,
|
|
3941
3994
|
isOpen: l.length > 0 && _,
|
|
3942
3995
|
onOpenChange: v,
|
|
3943
3996
|
content: /* @__PURE__ */ L(F, { children: [S(), C()] }),
|
|
3944
3997
|
children: w()
|
|
3945
3998
|
}),
|
|
3946
|
-
i && /* @__PURE__ */ I(
|
|
3947
|
-
styleType:
|
|
3999
|
+
i && /* @__PURE__ */ I(W, {
|
|
4000
|
+
styleType: je.Delete,
|
|
3948
4001
|
onClick: () => x(null),
|
|
3949
4002
|
children: "Remove gif"
|
|
3950
4003
|
}),
|
|
3951
|
-
i && /* @__PURE__ */ I(
|
|
3952
|
-
className:
|
|
4004
|
+
i && /* @__PURE__ */ I(vr, {
|
|
4005
|
+
className: yr.tenorPickerSelected,
|
|
3953
4006
|
src: i
|
|
3954
4007
|
})
|
|
3955
4008
|
]
|
|
@@ -3957,15 +4010,15 @@ function vr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3957
4010
|
}
|
|
3958
4011
|
//#endregion
|
|
3959
4012
|
//#region package/common/textarea/textarea.tsx
|
|
3960
|
-
function
|
|
3961
|
-
return /* @__PURE__ */ I(
|
|
4013
|
+
function xr(e) {
|
|
4014
|
+
return /* @__PURE__ */ I(ot, {
|
|
3962
4015
|
...e,
|
|
3963
4016
|
multiline: !0
|
|
3964
4017
|
});
|
|
3965
4018
|
}
|
|
3966
4019
|
//#endregion
|
|
3967
4020
|
//#region package/common/themeProvider/defaultTheme.ts
|
|
3968
|
-
var
|
|
4021
|
+
var Sr = {
|
|
3969
4022
|
id: "default",
|
|
3970
4023
|
variables: {
|
|
3971
4024
|
"--grey": "#8A8A8A",
|
|
@@ -4025,14 +4078,14 @@ var br = {
|
|
|
4025
4078
|
"--spacing-m": "8px",
|
|
4026
4079
|
"--spacing-l": "16px"
|
|
4027
4080
|
}
|
|
4028
|
-
},
|
|
4081
|
+
}, Cr = { colorFade: "colorFade_eLv2g" }, wr = class extends t {
|
|
4029
4082
|
constructor(...t) {
|
|
4030
4083
|
super(...t), this.state = {
|
|
4031
4084
|
resolvedVariables: {},
|
|
4032
4085
|
colorFadeActive: !1,
|
|
4033
4086
|
currentThemeColor: null
|
|
4034
4087
|
}, this.colorFadeTimeout = null, this.wrapperRef = e.createRef(), this.themeColorMeta = null, this.createdThemeColorMeta = !1, this.applyTheme = (e) => {
|
|
4035
|
-
let t = this.props.themes ?? [
|
|
4088
|
+
let t = this.props.themes ?? [Sr], n = t.find((e) => !e.baseThemeId) ?? t[0], r = n ? n.variables : {}, i = t.find((t) => t.id === e), a = i ? this.resolveChain(i.id) : [], o = Object.assign({}, r, ...a);
|
|
4036
4089
|
this.setState({
|
|
4037
4090
|
resolvedVariables: o,
|
|
4038
4091
|
colorFadeActive: !0
|
|
@@ -4066,7 +4119,7 @@ var br = {
|
|
|
4066
4119
|
}
|
|
4067
4120
|
}
|
|
4068
4121
|
resolveChain(e) {
|
|
4069
|
-
let t = (this.props.themes ?? [
|
|
4122
|
+
let t = (this.props.themes ?? [Sr]).find((t) => t.id === e);
|
|
4070
4123
|
return t ? [...t.baseThemeId ? this.resolveChain(t.baseThemeId) : [], t.variables] : [];
|
|
4071
4124
|
}
|
|
4072
4125
|
render() {
|
|
@@ -4074,7 +4127,7 @@ var br = {
|
|
|
4074
4127
|
return /* @__PURE__ */ I("div", {
|
|
4075
4128
|
ref: this.wrapperRef,
|
|
4076
4129
|
id: "themeProvider",
|
|
4077
|
-
className: n ?
|
|
4130
|
+
className: n ? Cr.colorFade : void 0,
|
|
4078
4131
|
style: t,
|
|
4079
4132
|
children: e
|
|
4080
4133
|
});
|
|
@@ -4082,7 +4135,7 @@ var br = {
|
|
|
4082
4135
|
};
|
|
4083
4136
|
//#endregion
|
|
4084
4137
|
//#region package/common/themeProvider/useTheme.ts
|
|
4085
|
-
function
|
|
4138
|
+
function Tr(e = "default") {
|
|
4086
4139
|
let [t, n] = d(localStorage.getItem("theme") || e);
|
|
4087
4140
|
return {
|
|
4088
4141
|
currentThemeId: t,
|
|
@@ -4091,7 +4144,7 @@ function Cr(e = "default") {
|
|
|
4091
4144
|
}
|
|
4092
4145
|
};
|
|
4093
4146
|
}
|
|
4094
|
-
var
|
|
4147
|
+
var Er = {
|
|
4095
4148
|
container: "container_krdsW",
|
|
4096
4149
|
"container-top-left": "container-top-left_zfDTO",
|
|
4097
4150
|
containerTopLeft: "container-top-left_zfDTO",
|
|
@@ -4128,14 +4181,14 @@ var wr = {
|
|
|
4128
4181
|
toastCloseButton: "toastCloseButton_n-YST",
|
|
4129
4182
|
toastProgressBar: "toastProgressBar_6vBs6",
|
|
4130
4183
|
toastShrink: "toastShrink_h89HS"
|
|
4131
|
-
},
|
|
4132
|
-
info:
|
|
4133
|
-
success:
|
|
4134
|
-
error:
|
|
4135
|
-
warn:
|
|
4184
|
+
}, Dr = {
|
|
4185
|
+
info: x,
|
|
4186
|
+
success: b,
|
|
4187
|
+
error: S,
|
|
4188
|
+
warn: oe,
|
|
4136
4189
|
default: m
|
|
4137
4190
|
};
|
|
4138
|
-
function
|
|
4191
|
+
function Or({ item: e, isBottom: t, onDismiss: n }) {
|
|
4139
4192
|
let { id: r, content: i, options: o, dismissing: s } = e, { duration: c, showRemainingTime: l, showCloseButton: u, type: d, classNames: m, styles: h } = o;
|
|
4140
4193
|
return a(() => {
|
|
4141
4194
|
if (c === 0) return;
|
|
@@ -4146,28 +4199,28 @@ function Er({ item: e, isBottom: t, onDismiss: n }) {
|
|
|
4146
4199
|
c,
|
|
4147
4200
|
n
|
|
4148
4201
|
]), /* @__PURE__ */ L("div", {
|
|
4149
|
-
className: f(
|
|
4202
|
+
className: f(Er.toast, t ? Er.toastBottom : null, Er[`toast-${d}`], s && Er.toastDismissing, m?.root),
|
|
4150
4203
|
style: h?.root,
|
|
4151
4204
|
children: [
|
|
4152
4205
|
/* @__PURE__ */ I(p, {
|
|
4153
|
-
icon:
|
|
4154
|
-
className: f(
|
|
4206
|
+
icon: Dr[d],
|
|
4207
|
+
className: f(Er.toastIcon, m?.icon),
|
|
4155
4208
|
style: h?.icon
|
|
4156
4209
|
}),
|
|
4157
4210
|
/* @__PURE__ */ I("div", {
|
|
4158
|
-
className: f(
|
|
4211
|
+
className: f(Er.toastContent, m?.content),
|
|
4159
4212
|
style: h?.content,
|
|
4160
4213
|
children: i
|
|
4161
4214
|
}),
|
|
4162
|
-
u && /* @__PURE__ */ I(
|
|
4163
|
-
icon:
|
|
4215
|
+
u && /* @__PURE__ */ I(He, {
|
|
4216
|
+
icon: P,
|
|
4164
4217
|
onClick: () => n(r),
|
|
4165
|
-
className: f(
|
|
4218
|
+
className: f(Er.toastCloseButton, m?.closeButton),
|
|
4166
4219
|
style: h?.closeButton,
|
|
4167
4220
|
"aria-label": "Close"
|
|
4168
4221
|
}),
|
|
4169
4222
|
l && c > 0 && /* @__PURE__ */ I("div", {
|
|
4170
|
-
className: f(
|
|
4223
|
+
className: f(Er.toastProgressBar, m?.progressBar),
|
|
4171
4224
|
style: {
|
|
4172
4225
|
"--toast-duration": `${c}ms`,
|
|
4173
4226
|
...h?.progressBar
|
|
@@ -4178,40 +4231,40 @@ function Er({ item: e, isBottom: t, onDismiss: n }) {
|
|
|
4178
4231
|
}
|
|
4179
4232
|
//#endregion
|
|
4180
4233
|
//#region package/common/toast/toastService.ts
|
|
4181
|
-
var
|
|
4182
|
-
function
|
|
4183
|
-
|
|
4234
|
+
var kr = null;
|
|
4235
|
+
function Ar(e) {
|
|
4236
|
+
kr = e;
|
|
4184
4237
|
}
|
|
4185
|
-
function
|
|
4186
|
-
|
|
4238
|
+
function jr() {
|
|
4239
|
+
kr = null;
|
|
4187
4240
|
}
|
|
4188
|
-
function
|
|
4189
|
-
if (!
|
|
4241
|
+
function Mr(e, t) {
|
|
4242
|
+
if (!kr) {
|
|
4190
4243
|
console.error("[Toast] No ToastProvider found. Wrap your app with <ToastProvider>.");
|
|
4191
4244
|
return;
|
|
4192
4245
|
}
|
|
4193
|
-
|
|
4246
|
+
kr(e, t);
|
|
4194
4247
|
}
|
|
4195
4248
|
//#endregion
|
|
4196
4249
|
//#region package/common/toast/toastProvider.tsx
|
|
4197
|
-
var
|
|
4250
|
+
var Nr = {
|
|
4198
4251
|
position: "top-right",
|
|
4199
4252
|
duration: 4e3,
|
|
4200
4253
|
showRemainingTime: !0,
|
|
4201
4254
|
showCloseButton: !0,
|
|
4202
4255
|
allowStacking: !0
|
|
4203
|
-
},
|
|
4204
|
-
function
|
|
4205
|
-
return
|
|
4256
|
+
}, Pr = 220;
|
|
4257
|
+
function Fr(e) {
|
|
4258
|
+
return Er[`container-${e}`];
|
|
4206
4259
|
}
|
|
4207
|
-
function
|
|
4260
|
+
function Ir({ children: e, position: t = Nr.position, duration: n = Nr.duration, showRemainingTime: r = Nr.showRemainingTime, showCloseButton: o = Nr.showCloseButton, allowStacking: s = Nr.allowStacking }) {
|
|
4208
4261
|
let [c, l] = d([]), p = u(0), m = i((e) => {
|
|
4209
4262
|
l((t) => t.map((t) => t.id === e ? {
|
|
4210
4263
|
...t,
|
|
4211
4264
|
dismissing: !0
|
|
4212
4265
|
} : t)), setTimeout(() => {
|
|
4213
4266
|
l((t) => t.filter((t) => t.id !== e));
|
|
4214
|
-
},
|
|
4267
|
+
}, Pr);
|
|
4215
4268
|
}, []), h = i((e, i) => {
|
|
4216
4269
|
let a = {
|
|
4217
4270
|
position: i?.position ?? t,
|
|
@@ -4231,7 +4284,7 @@ function Pr({ children: e, position: t = jr.position, duration: n = jr.duration,
|
|
|
4231
4284
|
};
|
|
4232
4285
|
l((e) => !s && e.length > 0 ? (setTimeout(() => {
|
|
4233
4286
|
l([c]);
|
|
4234
|
-
},
|
|
4287
|
+
}, Pr), e.map((e) => ({
|
|
4235
4288
|
...e,
|
|
4236
4289
|
dismissing: !0
|
|
4237
4290
|
}))) : [...e, c]);
|
|
@@ -4242,21 +4295,21 @@ function Pr({ children: e, position: t = jr.position, duration: n = jr.duration,
|
|
|
4242
4295
|
o,
|
|
4243
4296
|
s
|
|
4244
4297
|
]);
|
|
4245
|
-
a(() => (
|
|
4298
|
+
a(() => (Ar(h), () => jr()), [h]);
|
|
4246
4299
|
let g = c.reduce((e, t) => {
|
|
4247
4300
|
let n = t.options.position;
|
|
4248
4301
|
return e[n] || (e[n] = []), e[n].push(t), e;
|
|
4249
4302
|
}, {});
|
|
4250
|
-
return /* @__PURE__ */ L(F, { children: [e, /* @__PURE__ */ I(
|
|
4251
|
-
className: f(
|
|
4252
|
-
children: t.map((t) => /* @__PURE__ */ I(
|
|
4303
|
+
return /* @__PURE__ */ L(F, { children: [e, /* @__PURE__ */ I(Ue, { children: Object.entries(g).map(([e, t]) => /* @__PURE__ */ I("div", {
|
|
4304
|
+
className: f(Er.container, Fr(e)),
|
|
4305
|
+
children: t.map((t) => /* @__PURE__ */ I(Or, {
|
|
4253
4306
|
item: t,
|
|
4254
4307
|
isBottom: e.startsWith("bottom"),
|
|
4255
4308
|
onDismiss: m
|
|
4256
4309
|
}, t.id))
|
|
4257
4310
|
}, e)) })] });
|
|
4258
4311
|
}
|
|
4259
|
-
var
|
|
4312
|
+
var Q = {
|
|
4260
4313
|
virtualList: "virtualList_qBPNc",
|
|
4261
4314
|
"virtualList-drag-clone": "virtualList-drag-clone_artnC",
|
|
4262
4315
|
virtualListDragClone: "virtualList-drag-clone_artnC",
|
|
@@ -4299,7 +4352,7 @@ var $ = {
|
|
|
4299
4352
|
};
|
|
4300
4353
|
//#endregion
|
|
4301
4354
|
//#region package/common/virtualList/virtualList.tsx
|
|
4302
|
-
function
|
|
4355
|
+
function Lr(e, t, n, r = 0) {
|
|
4303
4356
|
let i = e.length, a = Array(i + 1);
|
|
4304
4357
|
a[0] = 0;
|
|
4305
4358
|
for (let o = 0; o < i; o++) {
|
|
@@ -4311,7 +4364,7 @@ function Fr(e, t, n, r = 0) {
|
|
|
4311
4364
|
totalHeight: a[i]
|
|
4312
4365
|
};
|
|
4313
4366
|
}
|
|
4314
|
-
function
|
|
4367
|
+
function Rr(e, t, n) {
|
|
4315
4368
|
if (n <= 0) return 0;
|
|
4316
4369
|
let r = 0, i = n - 1;
|
|
4317
4370
|
for (; r < i;) {
|
|
@@ -4320,24 +4373,24 @@ function Ir(e, t, n) {
|
|
|
4320
4373
|
}
|
|
4321
4374
|
return r;
|
|
4322
4375
|
}
|
|
4323
|
-
function
|
|
4376
|
+
function zr(e, t, n, r, i) {
|
|
4324
4377
|
if (i === 0) return {
|
|
4325
4378
|
startIndex: 0,
|
|
4326
4379
|
endIndex: -1
|
|
4327
4380
|
};
|
|
4328
|
-
let a =
|
|
4381
|
+
let a = Rr(e, t, i), o = a;
|
|
4329
4382
|
for (; o < i && e[o] < t + n;) o++;
|
|
4330
4383
|
return {
|
|
4331
4384
|
startIndex: Math.max(0, a - r),
|
|
4332
4385
|
endIndex: Math.min(i - 1, o + r - 1)
|
|
4333
4386
|
};
|
|
4334
4387
|
}
|
|
4335
|
-
function
|
|
4388
|
+
function Br(e, t, n, r, i) {
|
|
4336
4389
|
if (e === -1 || e === t) return null;
|
|
4337
4390
|
let a = r + i / 2;
|
|
4338
4391
|
return (t > e ? n >= a : n <= a) ? t : null;
|
|
4339
4392
|
}
|
|
4340
|
-
function
|
|
4393
|
+
function Vr(e) {
|
|
4341
4394
|
return e.length === 0 ? "1fr" : e.map((e) => {
|
|
4342
4395
|
switch (e.width.type) {
|
|
4343
4396
|
case "fixed": return `${e.width.px}px`;
|
|
@@ -4346,7 +4399,7 @@ function zr(e) {
|
|
|
4346
4399
|
}
|
|
4347
4400
|
}).join(" ");
|
|
4348
4401
|
}
|
|
4349
|
-
function
|
|
4402
|
+
function Hr({ index: e, top: t, columnTemplate: n, isSelected: r, showDivider: i, onClick: a, observer: o, ariaRowIndex: c, ariaPosInSet: l, ariaSetSize: d, rowRole: p, reorderable: m, draggable: h, isDragging: g, reserveToggleGutter: _, onDragStart: v, onDragOver: y, onDragEnd: b, onTouchStart: x, rowClassName: S, rowStyle: C, children: w }) {
|
|
4350
4403
|
let T = u(null);
|
|
4351
4404
|
return s(() => {
|
|
4352
4405
|
let e = T.current;
|
|
@@ -4354,7 +4407,7 @@ function Br({ index: e, top: t, columnTemplate: n, isSelected: r, showDivider: i
|
|
|
4354
4407
|
}, [o]), /* @__PURE__ */ I("div", {
|
|
4355
4408
|
ref: T,
|
|
4356
4409
|
"data-index": e,
|
|
4357
|
-
className: f(
|
|
4410
|
+
className: f(Q.virtualListRow, r && Q.virtualListRowSelected, !i && Q.virtualListRowNoDivider, m && Q.virtualListRowDraggable, g && Q.virtualListRowDragging, S),
|
|
4358
4411
|
style: {
|
|
4359
4412
|
position: "absolute",
|
|
4360
4413
|
top: 0,
|
|
@@ -4384,14 +4437,14 @@ function Br({ index: e, top: t, columnTemplate: n, isSelected: r, showDivider: i
|
|
|
4384
4437
|
children: w
|
|
4385
4438
|
});
|
|
4386
4439
|
}
|
|
4387
|
-
function
|
|
4388
|
-
let [ae, oe] = d(0), [se, P] = d(0), [ce, le] = d(/* @__PURE__ */ new Map()), [ue, de] = d(!1), [fe, pe] = d(!1), R = u(!1), me = u(null), [he, z] = d(null), B = u(null), V = u(!1), ge = u(null), _e = u(0),
|
|
4440
|
+
function Ur({ 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: D = !1, onReorder: k, longPressDelay: A = 400, showDivider: te = !0, className: ne, style: j, classNames: M, styles: N, ...re }, ie) {
|
|
4441
|
+
let [ae, oe] = d(0), [se, P] = d(0), [ce, le] = d(/* @__PURE__ */ new Map()), [ue, de] = d(!1), [fe, pe] = d(!1), R = u(!1), me = u(null), [he, z] = d(null), B = u(null), V = u(!1), ge = u(null), _e = u(0), ve = u(0), ye = u(null), be = u(!1), xe = u(k), Se = u(null), Ce = u(0), we = u(0), Te = u(0), [Ee] = d(() => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)").matches : !1), De = E !== void 0, [H, Oe] = d(/* @__PURE__ */ new Set()), ke = De ? E : H, je = y !== void 0, [Me, Ne] = d(() => new Set((n ?? []).filter((e) => !e.defaultHidden).map((e) => e.key))), Pe = je ? new Set(y) : Me, U = u(null), Fe = u(null), Ie = u(null), W = u([]), Le = u(null), Re = u(0), ze = u([]), [Be] = d(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((e) => {
|
|
4389
4442
|
le((t) => {
|
|
4390
4443
|
let n = null;
|
|
4391
4444
|
for (let r of e) {
|
|
4392
4445
|
let e = r.target, i = Number(e.dataset.index);
|
|
4393
4446
|
if (Number.isNaN(i)) continue;
|
|
4394
|
-
let a =
|
|
4447
|
+
let a = ze.current[i];
|
|
4395
4448
|
if (a === void 0) continue;
|
|
4396
4449
|
let o = r.borderBoxSize?.[0], s = o ? Math.round(o.blockSize) : e.offsetHeight;
|
|
4397
4450
|
t.get(a) !== s && (n ||= new Map(t), n.set(a, s));
|
|
@@ -4399,8 +4452,8 @@ function Vr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4399
4452
|
return n ?? t;
|
|
4400
4453
|
});
|
|
4401
4454
|
}));
|
|
4402
|
-
a(() => () =>
|
|
4403
|
-
let e =
|
|
4455
|
+
a(() => () => Be?.disconnect(), [Be]), s(() => {
|
|
4456
|
+
let e = U.current;
|
|
4404
4457
|
if (!e) return;
|
|
4405
4458
|
P(e.clientHeight);
|
|
4406
4459
|
let t = new ResizeObserver(() => P(e.clientHeight));
|
|
@@ -4408,43 +4461,43 @@ function Vr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4408
4461
|
}, []), a(() => {
|
|
4409
4462
|
if (!ue) return;
|
|
4410
4463
|
function e(e) {
|
|
4411
|
-
|
|
4464
|
+
Ie.current && !Ie.current.contains(e.target) && de(!1);
|
|
4412
4465
|
}
|
|
4413
4466
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
4414
4467
|
}, [ue]);
|
|
4415
|
-
let
|
|
4468
|
+
let Ve = i((e) => {
|
|
4416
4469
|
let t = e.currentTarget;
|
|
4417
|
-
|
|
4418
|
-
|
|
4470
|
+
Re.current = t.scrollTop, Le.current ??= requestAnimationFrame(() => {
|
|
4471
|
+
Le.current = null, oe(Re.current);
|
|
4419
4472
|
}), S && !R.current && t.scrollTop + t.clientHeight >= t.scrollHeight - C && (R.current = !0, pe(!0), S().finally(() => {
|
|
4420
4473
|
R.current = !1, pe(!1);
|
|
4421
4474
|
}));
|
|
4422
4475
|
}, [S, C]);
|
|
4423
4476
|
a(() => () => {
|
|
4424
|
-
|
|
4477
|
+
Le.current != null && cancelAnimationFrame(Le.current);
|
|
4425
4478
|
}, []);
|
|
4426
|
-
let
|
|
4479
|
+
let He = c(() => e.map((e, t) => _ ? _(e, t) : t), [e, _]);
|
|
4427
4480
|
s(() => {
|
|
4428
|
-
|
|
4481
|
+
ze.current = He, xe.current = k;
|
|
4429
4482
|
});
|
|
4430
|
-
let { offsets:
|
|
4431
|
-
|
|
4483
|
+
let { offsets: Ue, totalHeight: G } = c(() => Lr(He, ce, l, h), [
|
|
4484
|
+
He,
|
|
4432
4485
|
ce,
|
|
4433
4486
|
l,
|
|
4434
4487
|
h
|
|
4435
4488
|
]);
|
|
4436
4489
|
s(() => {
|
|
4437
|
-
let t =
|
|
4438
|
-
if (
|
|
4490
|
+
let t = U.current, n = W.current;
|
|
4491
|
+
if (W.current = Ue, !t || n.length === 0) return;
|
|
4439
4492
|
let r = t.scrollTop;
|
|
4440
4493
|
if (r <= 0) return;
|
|
4441
|
-
let i =
|
|
4494
|
+
let i = Rr(n, r, n.length - 1);
|
|
4442
4495
|
if (i >= e.length) return;
|
|
4443
|
-
let a = r - n[i], o =
|
|
4444
|
-
Math.abs(o - r) > .5 && (t.scrollTop = o,
|
|
4445
|
-
}, [
|
|
4496
|
+
let a = r - n[i], o = Ue[i] + a;
|
|
4497
|
+
Math.abs(o - r) > .5 && (t.scrollTop = o, Re.current = o, oe(o));
|
|
4498
|
+
}, [Ue, e.length]), o(ie, () => {
|
|
4446
4499
|
function t(e, t) {
|
|
4447
|
-
let n =
|
|
4500
|
+
let n = U.current;
|
|
4448
4501
|
if (!n) return;
|
|
4449
4502
|
let r = Math.max(0, e);
|
|
4450
4503
|
typeof n.scrollTo == "function" ? n.scrollTo({
|
|
@@ -4453,9 +4506,9 @@ function Vr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4453
4506
|
}) : n.scrollTop = r;
|
|
4454
4507
|
}
|
|
4455
4508
|
function n(n, r) {
|
|
4456
|
-
let i =
|
|
4509
|
+
let i = U.current;
|
|
4457
4510
|
if (!i || e.length === 0) return;
|
|
4458
|
-
let a = Math.max(0, Math.min(n, e.length - 1)), o =
|
|
4511
|
+
let a = Math.max(0, Math.min(n, e.length - 1)), o = Ue[a] ?? 0, s = (Ue[a + 1] ?? o) - o, c = Fe.current?.offsetHeight ?? 0, l = Math.max(0, i.clientHeight - c), u = r?.align ?? "start", d = o - c;
|
|
4459
4512
|
u === "center" ? d -= (l - s) / 2 : u === "end" && (d -= l - s), t(d, r?.behavior);
|
|
4460
4513
|
}
|
|
4461
4514
|
return {
|
|
@@ -4467,107 +4520,107 @@ function Vr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4467
4520
|
scrollToTop(e) {
|
|
4468
4521
|
t(0, e?.behavior);
|
|
4469
4522
|
},
|
|
4470
|
-
getScrollElement: () =>
|
|
4523
|
+
getScrollElement: () => U.current
|
|
4471
4524
|
};
|
|
4472
4525
|
}, [
|
|
4473
4526
|
e,
|
|
4474
|
-
|
|
4527
|
+
Ue,
|
|
4475
4528
|
_
|
|
4476
4529
|
]);
|
|
4477
|
-
let { startIndex:
|
|
4478
|
-
|
|
4530
|
+
let { startIndex: We, endIndex: Ge } = c(() => zr(Ue, ae, se, m, e.length), [
|
|
4531
|
+
Ue,
|
|
4479
4532
|
ae,
|
|
4480
4533
|
se,
|
|
4481
4534
|
m,
|
|
4482
4535
|
e.length
|
|
4483
|
-
]),
|
|
4484
|
-
function
|
|
4485
|
-
let t = new Set(
|
|
4536
|
+
]), Ke = !!n?.length, qe = Ke ? n.filter((e) => Pe.has(e.key)) : [], Je = Ke ? `${T && Ke ? "40px " : ""}${Vr(qe)}` : void 0, Ye = x !== !1 && Ke;
|
|
4537
|
+
function Ze(e) {
|
|
4538
|
+
let t = new Set(Pe);
|
|
4486
4539
|
if (t.has(e)) {
|
|
4487
4540
|
if (t.size <= 1) return;
|
|
4488
4541
|
t.delete(e);
|
|
4489
4542
|
} else t.add(e);
|
|
4490
4543
|
let n = [...t];
|
|
4491
|
-
|
|
4544
|
+
je || Ne(t), b?.(n);
|
|
4492
4545
|
}
|
|
4493
|
-
function
|
|
4546
|
+
function Qe(e, t) {
|
|
4494
4547
|
return _ ? _(e, t) : t;
|
|
4495
4548
|
}
|
|
4496
|
-
function Qe(e) {
|
|
4497
|
-
U || De(e), ee?.(e);
|
|
4498
|
-
}
|
|
4499
4549
|
function $e(e) {
|
|
4500
|
-
|
|
4501
|
-
t.has(e) ? t.delete(e) : t.add(e), Qe(t);
|
|
4550
|
+
De || Oe(e), ee?.(e);
|
|
4502
4551
|
}
|
|
4503
|
-
function et() {
|
|
4504
|
-
let t =
|
|
4505
|
-
|
|
4552
|
+
function et(e) {
|
|
4553
|
+
let t = new Set(ke);
|
|
4554
|
+
t.has(e) ? t.delete(e) : t.add(e), $e(t);
|
|
4506
4555
|
}
|
|
4507
|
-
function tt(
|
|
4556
|
+
function tt() {
|
|
4557
|
+
let t = e.map((e, t) => Qe(e, t));
|
|
4558
|
+
$e(t.every((e) => ke.has(e)) ? /* @__PURE__ */ new Set() : new Set(t));
|
|
4559
|
+
}
|
|
4560
|
+
function nt(e) {
|
|
4508
4561
|
me.current = e, z(e);
|
|
4509
4562
|
}
|
|
4510
|
-
function
|
|
4563
|
+
function rt(e, t) {
|
|
4511
4564
|
t.preventDefault();
|
|
4512
4565
|
let n = me.current;
|
|
4513
4566
|
if (n == null) return;
|
|
4514
|
-
let r =
|
|
4567
|
+
let r = He.indexOf(n), i = t.currentTarget.getBoundingClientRect(), a = Br(r, e, t.clientY, i.top, i.height);
|
|
4515
4568
|
a != null && k?.(r, a);
|
|
4516
4569
|
}
|
|
4517
|
-
function
|
|
4570
|
+
function it() {
|
|
4518
4571
|
me.current = null, z(null);
|
|
4519
4572
|
}
|
|
4520
|
-
let
|
|
4521
|
-
let t = me.current, n =
|
|
4573
|
+
let at = i((e) => {
|
|
4574
|
+
let t = me.current, n = U.current;
|
|
4522
4575
|
if (t == null || !n) return;
|
|
4523
|
-
let r =
|
|
4576
|
+
let r = Se.current ? ve.current - Ce.current + Te.current / 2 : ve.current, i = document.elementFromPoint(e, r), a = i && n.contains(i) ? i.closest("[data-index]") : null;
|
|
4524
4577
|
if (!a) return;
|
|
4525
4578
|
let o = Number(a.dataset.index);
|
|
4526
4579
|
if (Number.isNaN(o)) return;
|
|
4527
|
-
let s =
|
|
4528
|
-
l != null &&
|
|
4529
|
-
}, []),
|
|
4530
|
-
let e =
|
|
4531
|
-
e && (e.style.transform = `translate(${
|
|
4532
|
-
}, []),
|
|
4533
|
-
let e =
|
|
4580
|
+
let s = ze.current.indexOf(t), c = a.getBoundingClientRect(), l = Br(s, o, r, c.top, c.height);
|
|
4581
|
+
l != null && xe.current?.(s, l);
|
|
4582
|
+
}, []), K = i(() => {
|
|
4583
|
+
let e = Se.current;
|
|
4584
|
+
e && (e.style.transform = `translate(${we.current}px, ${ve.current - Ce.current}px)`);
|
|
4585
|
+
}, []), q = i(() => {
|
|
4586
|
+
let e = U.current;
|
|
4534
4587
|
if (!e || !V.current) {
|
|
4535
|
-
|
|
4588
|
+
ye.current = null;
|
|
4536
4589
|
return;
|
|
4537
4590
|
}
|
|
4538
|
-
let t = e.getBoundingClientRect(), n = _e.current, r =
|
|
4539
|
-
n >= t.left && n <= t.right && r >= t.top && r <= t.bottom && (r < t.top + 48 ? i = -Math.min(18, Math.ceil((t.top + 48 - r) / 3)) : r > t.bottom - 48 && (i = Math.min(18, Math.ceil((r - (t.bottom - 48)) / 3)))), i !== 0 && (e.scrollTop += i,
|
|
4540
|
-
}, [
|
|
4541
|
-
B.current != null && (clearTimeout(B.current), B.current = null), window.removeEventListener("touchmove",
|
|
4542
|
-
|
|
4591
|
+
let t = e.getBoundingClientRect(), n = _e.current, r = ve.current, i = 0;
|
|
4592
|
+
n >= t.left && n <= t.right && r >= t.top && r <= t.bottom && (r < t.top + 48 ? i = -Math.min(18, Math.ceil((t.top + 48 - r) / 3)) : r > t.bottom - 48 && (i = Math.min(18, Math.ceil((r - (t.bottom - 48)) / 3)))), i !== 0 && (e.scrollTop += i, at(n)), ye.current = requestAnimationFrame(q);
|
|
4593
|
+
}, [at]), ot = i(() => {
|
|
4594
|
+
B.current != null && (clearTimeout(B.current), B.current = null), window.removeEventListener("touchmove", J), window.removeEventListener("touchend", ot), window.removeEventListener("touchcancel", ot), ye.current != null && (cancelAnimationFrame(ye.current), ye.current = null), Se.current &&= (Se.current.remove(), null), document.body.style.touchAction = "", document.body.style.overscrollBehavior = "", V.current && (be.current = !0, setTimeout(() => {
|
|
4595
|
+
be.current = !1;
|
|
4543
4596
|
}, 350)), V.current = !1, ge.current = null, me.current = null, z(null);
|
|
4544
|
-
}, []),
|
|
4597
|
+
}, []), J = i((e) => {
|
|
4545
4598
|
let t = e.touches[0];
|
|
4546
4599
|
if (t) {
|
|
4547
|
-
if (_e.current = t.clientX,
|
|
4600
|
+
if (_e.current = t.clientX, ve.current = t.clientY, !V.current) {
|
|
4548
4601
|
let e = ge.current;
|
|
4549
4602
|
e != null && Math.abs(t.clientY - e) > 10 && B.current != null && (clearTimeout(B.current), B.current = null);
|
|
4550
4603
|
return;
|
|
4551
4604
|
}
|
|
4552
|
-
e.cancelable && e.preventDefault(),
|
|
4605
|
+
e.cancelable && e.preventDefault(), K(), at(t.clientX);
|
|
4553
4606
|
}
|
|
4554
|
-
}, [
|
|
4555
|
-
function
|
|
4556
|
-
if (!
|
|
4607
|
+
}, [at, K]);
|
|
4608
|
+
function st(e, t) {
|
|
4609
|
+
if (!D || B.current != null || V.current) return;
|
|
4557
4610
|
let n = t.touches[0];
|
|
4558
|
-
n && (ge.current = n.clientY, _e.current = n.clientX,
|
|
4559
|
-
B.current = null, V.current = !0, me.current = e, z(e), navigator.vibrate?.(10), document.body.style.touchAction = "none", document.body.style.overscrollBehavior = "none",
|
|
4560
|
-
},
|
|
4611
|
+
n && (ge.current = n.clientY, _e.current = n.clientX, ve.current = n.clientY, window.addEventListener("touchmove", J, { passive: !1 }), window.addEventListener("touchend", ot), window.addEventListener("touchcancel", ot), B.current = window.setTimeout(() => {
|
|
4612
|
+
B.current = null, V.current = !0, me.current = e, z(e), navigator.vibrate?.(10), document.body.style.touchAction = "none", document.body.style.overscrollBehavior = "none", ct(e), ye.current ??= requestAnimationFrame(q);
|
|
4613
|
+
}, A));
|
|
4561
4614
|
}
|
|
4562
|
-
function
|
|
4563
|
-
let t =
|
|
4615
|
+
function ct(e) {
|
|
4616
|
+
let t = U.current;
|
|
4564
4617
|
if (!t) return;
|
|
4565
|
-
let n =
|
|
4618
|
+
let n = ze.current.indexOf(e), r = t.querySelector(`[data-index="${n}"]`);
|
|
4566
4619
|
if (!r) return;
|
|
4567
4620
|
let i = r.getBoundingClientRect();
|
|
4568
|
-
|
|
4621
|
+
Ce.current = ve.current - i.top, we.current = i.left, Te.current = i.height;
|
|
4569
4622
|
let a = r.cloneNode(!0);
|
|
4570
|
-
a.removeAttribute("data-index"), a.setAttribute("data-drag-clone", "true"), a.setAttribute("aria-hidden", "true"), a.classList.add(
|
|
4623
|
+
a.removeAttribute("data-index"), a.setAttribute("data-drag-clone", "true"), a.setAttribute("aria-hidden", "true"), a.classList.add(Q.virtualListDragClone), Object.assign(a.style, {
|
|
4571
4624
|
position: "fixed",
|
|
4572
4625
|
left: "0",
|
|
4573
4626
|
top: "0",
|
|
@@ -4580,77 +4633,77 @@ function Vr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4580
4633
|
background: "var(--background)",
|
|
4581
4634
|
boxShadow: "var(--card-shadow)",
|
|
4582
4635
|
borderRadius: "var(--default-border-radius)"
|
|
4583
|
-
}), t.appendChild(a),
|
|
4636
|
+
}), t.appendChild(a), Se.current = a, K();
|
|
4584
4637
|
}
|
|
4585
|
-
a(() =>
|
|
4586
|
-
let
|
|
4587
|
-
let r = e[n], i =
|
|
4588
|
-
return /* @__PURE__ */ I(
|
|
4638
|
+
a(() => ot, [ot]);
|
|
4639
|
+
let lt = T && e.length > 0 && e.every((e, t) => ke.has(Qe(e, t))), ut = T && !lt && e.some((e, t) => ke.has(Qe(e, t))), dt = (n) => {
|
|
4640
|
+
let r = e[n], i = Qe(r, n), a = g != null && i === g || ke.has(i);
|
|
4641
|
+
return /* @__PURE__ */ I(Hr, {
|
|
4589
4642
|
index: n,
|
|
4590
|
-
top:
|
|
4591
|
-
columnTemplate:
|
|
4643
|
+
top: Ue[n],
|
|
4644
|
+
columnTemplate: Je,
|
|
4592
4645
|
isSelected: a,
|
|
4593
|
-
showDivider:
|
|
4646
|
+
showDivider: te,
|
|
4594
4647
|
onClick: () => {
|
|
4595
|
-
if (
|
|
4596
|
-
|
|
4648
|
+
if (be.current) {
|
|
4649
|
+
be.current = !1;
|
|
4597
4650
|
return;
|
|
4598
4651
|
}
|
|
4599
4652
|
v?.(r, n);
|
|
4600
4653
|
},
|
|
4601
|
-
observer:
|
|
4602
|
-
ariaRowIndex:
|
|
4603
|
-
ariaPosInSet:
|
|
4604
|
-
ariaSetSize:
|
|
4605
|
-
rowRole:
|
|
4606
|
-
reorderable:
|
|
4654
|
+
observer: Be,
|
|
4655
|
+
ariaRowIndex: Ke ? n + 2 : void 0,
|
|
4656
|
+
ariaPosInSet: Ke ? void 0 : n + 1,
|
|
4657
|
+
ariaSetSize: Ke ? void 0 : e.length,
|
|
4658
|
+
rowRole: Ke ? "row" : "listitem",
|
|
4659
|
+
reorderable: D,
|
|
4607
4660
|
reserveToggleGutter: Ye,
|
|
4608
|
-
draggable:
|
|
4609
|
-
isDragging:
|
|
4610
|
-
onDragStart:
|
|
4611
|
-
onDragOver:
|
|
4612
|
-
onDragEnd:
|
|
4613
|
-
onTouchStart:
|
|
4661
|
+
draggable: D && !Ee || void 0,
|
|
4662
|
+
isDragging: D && i === he,
|
|
4663
|
+
onDragStart: D ? () => nt(i) : void 0,
|
|
4664
|
+
onDragOver: D ? (e) => rt(n, e) : void 0,
|
|
4665
|
+
onDragEnd: D ? it : void 0,
|
|
4666
|
+
onTouchStart: D ? (e) => st(i, e) : void 0,
|
|
4614
4667
|
rowClassName: M?.row,
|
|
4615
4668
|
rowStyle: N?.row,
|
|
4616
|
-
children:
|
|
4617
|
-
className: f(
|
|
4669
|
+
children: Ke ? /* @__PURE__ */ L(F, { children: [T && /* @__PURE__ */ I("div", {
|
|
4670
|
+
className: f(Q.virtualListSelectCell, M?.selectCell),
|
|
4618
4671
|
style: N?.selectCell,
|
|
4619
4672
|
role: "gridcell",
|
|
4620
4673
|
onClick: (e) => e.stopPropagation(),
|
|
4621
|
-
children: /* @__PURE__ */ I(
|
|
4622
|
-
selected:
|
|
4623
|
-
onToggle: () =>
|
|
4674
|
+
children: /* @__PURE__ */ I(Xe, {
|
|
4675
|
+
selected: ke.has(i),
|
|
4676
|
+
onToggle: () => et(i),
|
|
4624
4677
|
"aria-label": "Select row"
|
|
4625
4678
|
})
|
|
4626
|
-
}),
|
|
4627
|
-
className: f(
|
|
4679
|
+
}), qe.map((e) => /* @__PURE__ */ I("div", {
|
|
4680
|
+
className: f(Q.virtualListCell, M?.cell),
|
|
4628
4681
|
style: N?.cell,
|
|
4629
4682
|
role: "gridcell",
|
|
4630
4683
|
children: e.renderCell(r, n)
|
|
4631
4684
|
}, e.key))] }) : t?.(r, n)
|
|
4632
4685
|
}, i);
|
|
4633
|
-
},
|
|
4634
|
-
for (let e =
|
|
4635
|
-
let
|
|
4636
|
-
return
|
|
4686
|
+
}, ft = [];
|
|
4687
|
+
for (let e = We; e <= Ge; e++) ft.push(dt(e));
|
|
4688
|
+
let pt = he == null ? -1 : He.indexOf(he);
|
|
4689
|
+
return pt >= 0 && (pt < We || pt > Ge) && ft.push(dt(pt)), /* @__PURE__ */ L("div", {
|
|
4637
4690
|
...re,
|
|
4638
|
-
ref:
|
|
4639
|
-
className: f(
|
|
4691
|
+
ref: U,
|
|
4692
|
+
className: f(Q.virtualList, he != null && Q.virtualListReordering, ne, M?.root),
|
|
4640
4693
|
style: {
|
|
4641
4694
|
height: r,
|
|
4642
4695
|
...j,
|
|
4643
4696
|
...N?.root
|
|
4644
4697
|
},
|
|
4645
|
-
onScroll:
|
|
4646
|
-
role:
|
|
4647
|
-
"aria-rowcount":
|
|
4698
|
+
onScroll: Ve,
|
|
4699
|
+
role: Ke ? "grid" : "list",
|
|
4700
|
+
"aria-rowcount": Ke ? e.length + 1 : void 0,
|
|
4648
4701
|
children: [
|
|
4649
|
-
|
|
4650
|
-
ref:
|
|
4651
|
-
className: f(
|
|
4702
|
+
Ke && /* @__PURE__ */ L("div", {
|
|
4703
|
+
ref: Fe,
|
|
4704
|
+
className: f(Q.virtualListHeader, M?.header),
|
|
4652
4705
|
style: {
|
|
4653
|
-
gridTemplateColumns:
|
|
4706
|
+
gridTemplateColumns: Je,
|
|
4654
4707
|
...Ye ? { paddingRight: 32 } : {},
|
|
4655
4708
|
...N?.header
|
|
4656
4709
|
},
|
|
@@ -4658,42 +4711,42 @@ function Vr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4658
4711
|
"aria-rowindex": 1,
|
|
4659
4712
|
children: [
|
|
4660
4713
|
T && /* @__PURE__ */ I("div", {
|
|
4661
|
-
className: f(
|
|
4714
|
+
className: f(Q.virtualListSelectCell, M?.selectCell),
|
|
4662
4715
|
style: N?.selectCell,
|
|
4663
4716
|
role: "columnheader",
|
|
4664
|
-
children: /* @__PURE__ */ I(
|
|
4665
|
-
selected:
|
|
4666
|
-
onToggle:
|
|
4717
|
+
children: /* @__PURE__ */ I(Xe, {
|
|
4718
|
+
selected: lt || ut,
|
|
4719
|
+
onToggle: tt,
|
|
4667
4720
|
"aria-label": "Select all rows"
|
|
4668
4721
|
})
|
|
4669
4722
|
}),
|
|
4670
|
-
|
|
4671
|
-
className: f(
|
|
4723
|
+
qe.map((e) => /* @__PURE__ */ I("div", {
|
|
4724
|
+
className: f(Q.virtualListHeaderCell, M?.headerCell),
|
|
4672
4725
|
style: N?.headerCell,
|
|
4673
4726
|
role: "columnheader",
|
|
4674
4727
|
children: e.label
|
|
4675
4728
|
}, e.key)),
|
|
4676
4729
|
Ye && /* @__PURE__ */ L("div", {
|
|
4677
|
-
ref:
|
|
4678
|
-
className:
|
|
4730
|
+
ref: Ie,
|
|
4731
|
+
className: Q.virtualListToggleWrapper,
|
|
4679
4732
|
children: [/* @__PURE__ */ I("button", {
|
|
4680
4733
|
type: "button",
|
|
4681
|
-
className: f(
|
|
4734
|
+
className: f(Q.virtualListHeaderToggle, M?.headerToggle),
|
|
4682
4735
|
style: N?.headerToggle,
|
|
4683
4736
|
onClick: () => de((e) => !e),
|
|
4684
4737
|
"aria-label": "Toggle column visibility",
|
|
4685
4738
|
children: /* @__PURE__ */ I(p, {
|
|
4686
|
-
icon:
|
|
4739
|
+
icon: O,
|
|
4687
4740
|
style: N?.headerToggle
|
|
4688
4741
|
})
|
|
4689
4742
|
}), ue && /* @__PURE__ */ I("div", {
|
|
4690
|
-
className: f(
|
|
4743
|
+
className: f(Q.virtualListTogglePopover, M?.togglePopover),
|
|
4691
4744
|
style: N?.togglePopover,
|
|
4692
|
-
children: n.map((e) => /* @__PURE__ */ I(
|
|
4693
|
-
className: f(
|
|
4745
|
+
children: n.map((e) => /* @__PURE__ */ I(Xe, {
|
|
4746
|
+
className: f(Q.virtualListToggleItem, M?.toggleItem),
|
|
4694
4747
|
style: N?.toggleItem,
|
|
4695
|
-
selected:
|
|
4696
|
-
onToggle: () =>
|
|
4748
|
+
selected: Pe.has(e.key),
|
|
4749
|
+
onToggle: () => Ze(e.key),
|
|
4697
4750
|
cursorDefault: !1,
|
|
4698
4751
|
children: e.label
|
|
4699
4752
|
}, e.key))
|
|
@@ -4702,25 +4755,25 @@ function Vr({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4702
4755
|
]
|
|
4703
4756
|
}),
|
|
4704
4757
|
w ? /* @__PURE__ */ I("div", {
|
|
4705
|
-
className:
|
|
4706
|
-
children: /* @__PURE__ */ I(
|
|
4758
|
+
className: Q.virtualListLoadingFull,
|
|
4759
|
+
children: /* @__PURE__ */ I(Ae, { className: Q.virtualListSpinner })
|
|
4707
4760
|
}) : /* @__PURE__ */ I("div", {
|
|
4708
|
-
className: f(
|
|
4761
|
+
className: f(Q.virtualListBody, M?.body),
|
|
4709
4762
|
style: {
|
|
4710
|
-
height:
|
|
4763
|
+
height: G,
|
|
4711
4764
|
...N?.body
|
|
4712
4765
|
},
|
|
4713
|
-
children:
|
|
4766
|
+
children: ft
|
|
4714
4767
|
}),
|
|
4715
4768
|
fe && /* @__PURE__ */ I("div", {
|
|
4716
|
-
className: f(
|
|
4769
|
+
className: f(Q.virtualListLoadingIndicator, M?.loadingIndicator),
|
|
4717
4770
|
style: N?.loadingIndicator,
|
|
4718
|
-
children: /* @__PURE__ */ I(
|
|
4771
|
+
children: /* @__PURE__ */ I(Ae, { className: Q.virtualListSpinner })
|
|
4719
4772
|
})
|
|
4720
4773
|
]
|
|
4721
4774
|
});
|
|
4722
4775
|
}
|
|
4723
|
-
var
|
|
4776
|
+
var Wr = e.forwardRef(Ur), Gr = {
|
|
4724
4777
|
wizard: "wizard_uRBAN",
|
|
4725
4778
|
"wizard-content": "wizard-content_lcl4C",
|
|
4726
4779
|
wizardContent: "wizard-content_lcl4C",
|
|
@@ -4731,7 +4784,7 @@ var Hr = e.forwardRef(Vr), Ur = {
|
|
|
4731
4784
|
};
|
|
4732
4785
|
//#endregion
|
|
4733
4786
|
//#region package/common/wizard/wizard.tsx
|
|
4734
|
-
function
|
|
4787
|
+
function Kr({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null, className: r, style: i, classNames: o, styles: s, ...c }) {
|
|
4735
4788
|
let [l, p] = d(void 0), [m, h] = d(!1), [g, _] = d(e), v = u([]), y = u(null);
|
|
4736
4789
|
e !== g && (_(e), h(!0)), a(() => {
|
|
4737
4790
|
if (!m) return;
|
|
@@ -4751,10 +4804,10 @@ function Wr({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null,
|
|
|
4751
4804
|
};
|
|
4752
4805
|
return /* @__PURE__ */ I("div", {
|
|
4753
4806
|
...c,
|
|
4754
|
-
className: f(
|
|
4807
|
+
className: f(Gr.wizard, o?.root, r),
|
|
4755
4808
|
style: b,
|
|
4756
4809
|
children: /* @__PURE__ */ I("div", {
|
|
4757
|
-
className: f(
|
|
4810
|
+
className: f(Gr.wizardContentContainer, o?.container),
|
|
4758
4811
|
style: {
|
|
4759
4812
|
width: `${t * 100}%`,
|
|
4760
4813
|
marginLeft: `-${e * 100}%`,
|
|
@@ -4764,14 +4817,14 @@ function Wr({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null,
|
|
|
4764
4817
|
ref: (e) => {
|
|
4765
4818
|
v.current[i] = e;
|
|
4766
4819
|
},
|
|
4767
|
-
className: f(
|
|
4820
|
+
className: f(Gr.wizardContent, o?.step),
|
|
4768
4821
|
style: {
|
|
4769
4822
|
width: `${100 / t}%`,
|
|
4770
4823
|
marginLeft: `${100 / t * i}%`,
|
|
4771
4824
|
...s?.step
|
|
4772
4825
|
},
|
|
4773
4826
|
children: /* @__PURE__ */ I("div", {
|
|
4774
|
-
className: f({ [
|
|
4827
|
+
className: f({ [Gr.wizardContentOutOfFrame]: e !== i && !m }, o?.stepContent),
|
|
4775
4828
|
style: s?.stepContent,
|
|
4776
4829
|
inert: e === i ? void 0 : !0,
|
|
4777
4830
|
children: n(i)
|
|
@@ -4782,20 +4835,20 @@ function Wr({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null,
|
|
|
4782
4835
|
}
|
|
4783
4836
|
//#endregion
|
|
4784
4837
|
//#region package/services/formValidation/formValidatorGroup.ts
|
|
4785
|
-
function
|
|
4838
|
+
function qr(e) {
|
|
4786
4839
|
let t = e;
|
|
4787
4840
|
return t?.errors && Array.isArray(t.errors) ? t.errors.flatMap((e) => Object.entries(e).map(([e, t]) => ({
|
|
4788
4841
|
id: e,
|
|
4789
4842
|
message: t
|
|
4790
4843
|
}))) : [];
|
|
4791
4844
|
}
|
|
4792
|
-
var
|
|
4845
|
+
var Jr = class {
|
|
4793
4846
|
#e;
|
|
4794
4847
|
#t;
|
|
4795
4848
|
#n;
|
|
4796
4849
|
#r;
|
|
4797
4850
|
#i;
|
|
4798
|
-
constructor(e, t = null, { initialValues: n, onSubmit: r = () => void 0, onValidate: i = () => void 0, errorParser: a =
|
|
4851
|
+
constructor(e, t = null, { initialValues: n, onSubmit: r = () => void 0, onValidate: i = () => void 0, errorParser: a = qr, onSubmitError: o = () => void 0 } = {}) {
|
|
4799
4852
|
this.#t = !1, this.#i = [], this.getFormError = () => {
|
|
4800
4853
|
let e = Object.keys(this.group);
|
|
4801
4854
|
for (let t = 0; t < e.length; t += 1) {
|
|
@@ -4885,7 +4938,7 @@ var Kr = class {
|
|
|
4885
4938
|
};
|
|
4886
4939
|
//#endregion
|
|
4887
4940
|
//#region package/services/formValidation/FormValidatorGroupForm.tsx
|
|
4888
|
-
function
|
|
4941
|
+
function Yr(e) {
|
|
4889
4942
|
return function({ children: t, ...n }) {
|
|
4890
4943
|
return /* @__PURE__ */ I("form", {
|
|
4891
4944
|
onSubmit: e.submit,
|
|
@@ -4897,16 +4950,16 @@ function qr(e) {
|
|
|
4897
4950
|
}
|
|
4898
4951
|
//#endregion
|
|
4899
4952
|
//#region package/services/formValidation/FormValidatorGroupWithForm.tsx
|
|
4900
|
-
var
|
|
4901
|
-
|
|
4902
|
-
},
|
|
4953
|
+
var Xr = (e) => {
|
|
4954
|
+
Mr(e[0].message, { type: "error" });
|
|
4955
|
+
}, Zr = class extends Jr {
|
|
4903
4956
|
constructor(e, t = null, n) {
|
|
4904
4957
|
super(e, t, {
|
|
4905
4958
|
...n,
|
|
4906
|
-
onSubmitError: n?.onSubmitError ??
|
|
4907
|
-
}), this.Form =
|
|
4959
|
+
onSubmitError: n?.onSubmitError ?? Xr
|
|
4960
|
+
}), this.Form = Yr(this);
|
|
4908
4961
|
}
|
|
4909
|
-
},
|
|
4962
|
+
}, Qr = class {
|
|
4910
4963
|
#e;
|
|
4911
4964
|
#t;
|
|
4912
4965
|
#n;
|
|
@@ -4960,44 +5013,44 @@ var Jr = (e) => {
|
|
|
4960
5013
|
return this.#r;
|
|
4961
5014
|
}
|
|
4962
5015
|
};
|
|
4963
|
-
|
|
5016
|
+
Qr.prototype.toString = function() {
|
|
4964
5017
|
return `${this.value}`;
|
|
4965
5018
|
};
|
|
4966
5019
|
//#endregion
|
|
4967
5020
|
//#region package/services/regexp.ts
|
|
4968
|
-
function
|
|
5021
|
+
function $r(e) {
|
|
4969
5022
|
return /^[0-9]+$/.test(e);
|
|
4970
5023
|
}
|
|
4971
|
-
function
|
|
5024
|
+
function ei(e) {
|
|
4972
5025
|
return /^[0-9]{2}.[0-9]{2}.[0-9]{4}$/.test(e);
|
|
4973
5026
|
}
|
|
4974
|
-
function
|
|
5027
|
+
function ti(e) {
|
|
4975
5028
|
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);
|
|
4976
5029
|
}
|
|
4977
|
-
function
|
|
5030
|
+
function ni(e) {
|
|
4978
5031
|
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);
|
|
4979
5032
|
}
|
|
4980
|
-
function
|
|
5033
|
+
function ri(e) {
|
|
4981
5034
|
return /^[A-Z]{6}[A-Z\d]{2}([A-Z\d]{3})?$/.test(e);
|
|
4982
5035
|
}
|
|
4983
|
-
function
|
|
5036
|
+
function ii(e) {
|
|
4984
5037
|
return /[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}(\/[-a-zA-Z0-9@:%_+.~#?&//=]*)?$/.test(e);
|
|
4985
5038
|
}
|
|
4986
|
-
function
|
|
5039
|
+
function ai(e) {
|
|
4987
5040
|
return /^[\w!@#$%^&*?±§~`'"/\\[\]{}\-,.();:><+=|öäüÖÄÜß €μ]{8,}$/.test(e);
|
|
4988
5041
|
}
|
|
4989
|
-
function
|
|
5042
|
+
function oi(e) {
|
|
4990
5043
|
return /^(?=.*[a-zöäüA-ZÖÄÜß])/.test(e);
|
|
4991
5044
|
}
|
|
4992
|
-
function
|
|
5045
|
+
function si(e) {
|
|
4993
5046
|
return /^(?=.*\d)/.test(e);
|
|
4994
5047
|
}
|
|
4995
|
-
function
|
|
4996
|
-
return
|
|
5048
|
+
function ci(e) {
|
|
5049
|
+
return ai(e) && oi(e) && si(e);
|
|
4997
5050
|
}
|
|
4998
5051
|
//#endregion
|
|
4999
5052
|
//#region package/services/formValidation/validators.ts
|
|
5000
|
-
var
|
|
5053
|
+
var $ = { t: (e, t) => ({
|
|
5001
5054
|
"formValidators.minLength": `Must be at least ${t?.min} characters long`,
|
|
5002
5055
|
"formValidators.maxLength": `Must be at most ${t?.max} characters long`,
|
|
5003
5056
|
"formValidators.email": "Must be a valid email address",
|
|
@@ -5012,23 +5065,23 @@ var si = { t: (e, t) => ({
|
|
|
5012
5065
|
"garages.errors.bic": "Must be a valid BIC",
|
|
5013
5066
|
"formValidators.minLetters": `Must contain at least ${t?.smart_count} letters`,
|
|
5014
5067
|
"formValidators.minDigits": `Must contain at least ${t?.smart_count} digits`
|
|
5015
|
-
})[e] || e },
|
|
5068
|
+
})[e] || e }, li = class e {
|
|
5016
5069
|
static {
|
|
5017
5070
|
this.minLength = (e, t) => (n) => !n || n.length < e ? {
|
|
5018
5071
|
id: "minLength",
|
|
5019
|
-
message: t ||
|
|
5072
|
+
message: t || $.t("formValidators.minLength", { min: e })
|
|
5020
5073
|
} : null;
|
|
5021
5074
|
}
|
|
5022
5075
|
static {
|
|
5023
5076
|
this.maxLength = (e, t) => (n) => n && n.length > e ? {
|
|
5024
5077
|
id: "maxLength",
|
|
5025
|
-
message: t ||
|
|
5078
|
+
message: t || $.t("formValidators.maxLength", { max: e })
|
|
5026
5079
|
} : null;
|
|
5027
5080
|
}
|
|
5028
5081
|
static {
|
|
5029
|
-
this.email = (e) => (t) => t && !
|
|
5082
|
+
this.email = (e) => (t) => t && !ni(t) ? {
|
|
5030
5083
|
id: "email",
|
|
5031
|
-
message: e ||
|
|
5084
|
+
message: e || $.t("formValidators.email")
|
|
5032
5085
|
} : null;
|
|
5033
5086
|
}
|
|
5034
5087
|
static {
|
|
@@ -5036,7 +5089,7 @@ var si = { t: (e, t) => ({
|
|
|
5036
5089
|
function t(t, n) {
|
|
5037
5090
|
return !t && t !== 0 ? {
|
|
5038
5091
|
id: "required",
|
|
5039
|
-
message: e ||
|
|
5092
|
+
message: e || $.t("formValidators.required", { label: n || $.t("formValidators.value") })
|
|
5040
5093
|
} : null;
|
|
5041
5094
|
}
|
|
5042
5095
|
return t.validatorId = "required", t;
|
|
@@ -5045,13 +5098,13 @@ var si = { t: (e, t) => ({
|
|
|
5045
5098
|
static {
|
|
5046
5099
|
this.mustBeNumber = (e) => (t) => t && Number.isNaN(+t) ? {
|
|
5047
5100
|
id: "mustBeNumber",
|
|
5048
|
-
message: e ||
|
|
5101
|
+
message: e || $.t("formValidators.mustBeNumber")
|
|
5049
5102
|
} : null;
|
|
5050
5103
|
}
|
|
5051
5104
|
static {
|
|
5052
5105
|
this.oneOf = (e, t) => (n) => n && !e.includes(n) ? {
|
|
5053
5106
|
id: "oneOf",
|
|
5054
|
-
message: t ||
|
|
5107
|
+
message: t || $.t("formValidators.oneOf", { allowedValues: e })
|
|
5055
5108
|
} : null;
|
|
5056
5109
|
}
|
|
5057
5110
|
static {
|
|
@@ -5069,48 +5122,48 @@ var si = { t: (e, t) => ({
|
|
|
5069
5122
|
this.multiEmail = (e) => (t) => {
|
|
5070
5123
|
if (t) {
|
|
5071
5124
|
let n = t.replace(/ /g, "").replace(/,/g, ";").split(";");
|
|
5072
|
-
for (let t = 0; t < n.length; t += 1) if (!
|
|
5125
|
+
for (let t = 0; t < n.length; t += 1) if (!ni(n[t])) return {
|
|
5073
5126
|
id: "multiEmail",
|
|
5074
|
-
message: e ||
|
|
5127
|
+
message: e || $.t("formValidators.multiEmail")
|
|
5075
5128
|
};
|
|
5076
5129
|
}
|
|
5077
5130
|
return null;
|
|
5078
5131
|
};
|
|
5079
5132
|
}
|
|
5080
5133
|
static {
|
|
5081
|
-
this.date = (e) => (t) => t && !
|
|
5134
|
+
this.date = (e) => (t) => t && !ei(t) && !ti(t) ? {
|
|
5082
5135
|
id: "date",
|
|
5083
|
-
message: e ||
|
|
5136
|
+
message: e || $.t("formValidators.date")
|
|
5084
5137
|
} : null;
|
|
5085
5138
|
}
|
|
5086
5139
|
static {
|
|
5087
5140
|
this.dateObject = (e) => (t) => t && !t.isValid ? {
|
|
5088
5141
|
id: "date",
|
|
5089
|
-
message: e ||
|
|
5142
|
+
message: e || $.t("formValidators.date")
|
|
5090
5143
|
} : null;
|
|
5091
5144
|
}
|
|
5092
5145
|
static {
|
|
5093
|
-
this.website = (e) => (t) => t && !
|
|
5146
|
+
this.website = (e) => (t) => t && !ii(t) ? {
|
|
5094
5147
|
id: "website",
|
|
5095
|
-
message: e ||
|
|
5148
|
+
message: e || $.t("garages.errors.website")
|
|
5096
5149
|
} : null;
|
|
5097
5150
|
}
|
|
5098
5151
|
static {
|
|
5099
|
-
this.bic = (e) => (t) => t && !
|
|
5152
|
+
this.bic = (e) => (t) => t && !ri(t) ? {
|
|
5100
5153
|
id: "bic",
|
|
5101
|
-
message: e ||
|
|
5154
|
+
message: e || $.t("garages.errors.bic")
|
|
5102
5155
|
} : null;
|
|
5103
5156
|
}
|
|
5104
5157
|
static {
|
|
5105
5158
|
this.minLetters = (e, t) => (n) => n && n.replace(/[^a-zöäüA-ZÖÄÜß]/g, "").length < e ? {
|
|
5106
5159
|
id: "minLetters",
|
|
5107
|
-
message: t ||
|
|
5160
|
+
message: t || $.t("formValidators.minLetters", { smart_count: e })
|
|
5108
5161
|
} : null;
|
|
5109
5162
|
}
|
|
5110
5163
|
static {
|
|
5111
5164
|
this.minDigits = (e, t) => (n) => n && n.replace(/[\D]/g, "").length < e ? {
|
|
5112
5165
|
id: "minDigits",
|
|
5113
|
-
message: t ||
|
|
5166
|
+
message: t || $.t("formValidators.minDigits", { smart_count: e })
|
|
5114
5167
|
} : null;
|
|
5115
5168
|
}
|
|
5116
5169
|
static {
|
|
@@ -5122,7 +5175,7 @@ var si = { t: (e, t) => ({
|
|
|
5122
5175
|
} : r : null;
|
|
5123
5176
|
};
|
|
5124
5177
|
}
|
|
5125
|
-
},
|
|
5178
|
+
}, ui = class extends n {
|
|
5126
5179
|
static {
|
|
5127
5180
|
this.defaultProps = {
|
|
5128
5181
|
formValidator: null,
|
|
@@ -5185,7 +5238,7 @@ var si = { t: (e, t) => ({
|
|
|
5185
5238
|
}
|
|
5186
5239
|
renderTooltip() {
|
|
5187
5240
|
let { errorMessage: e, formValidator: t } = this.props, { isHovered: n, isFocused: r } = this.state;
|
|
5188
|
-
return /* @__PURE__ */ I(
|
|
5241
|
+
return /* @__PURE__ */ I(at, {
|
|
5189
5242
|
variant: "error",
|
|
5190
5243
|
message: t ? t.getCurrentErrorMessage() : e || "",
|
|
5191
5244
|
isVisible: this.hasError() && (r || n)
|
|
@@ -5202,7 +5255,7 @@ var si = { t: (e, t) => ({
|
|
|
5202
5255
|
};
|
|
5203
5256
|
//#endregion
|
|
5204
5257
|
//#region package/services/formValidation/useFormValidator.ts
|
|
5205
|
-
function
|
|
5258
|
+
function di(e) {
|
|
5206
5259
|
let [, t] = l((e) => e + 1, 0);
|
|
5207
5260
|
return a(() => {
|
|
5208
5261
|
if (e) return e.registerOnUpdateListener(t), () => e.removeOnUpdateListener(t);
|
|
@@ -5210,9 +5263,9 @@ function ui(e) {
|
|
|
5210
5263
|
}
|
|
5211
5264
|
//#endregion
|
|
5212
5265
|
//#region package/services/formValidation/useFormValidatorGroup.ts
|
|
5213
|
-
function
|
|
5266
|
+
function fi(e, { initialValues: t, onSubmit: n, onValidate: r, errorParser: i, onSubmitError: o } = {}) {
|
|
5214
5267
|
let [, s] = l((e) => e + 1, 0), c = u(null);
|
|
5215
|
-
c.current ||= new
|
|
5268
|
+
c.current ||= new Zr(e, null, {
|
|
5216
5269
|
initialValues: t,
|
|
5217
5270
|
errorParser: i,
|
|
5218
5271
|
onSubmitError: o
|
|
@@ -5221,6 +5274,6 @@ function di(e, { initialValues: t, onSubmit: n, onValidate: r, errorParser: i, o
|
|
|
5221
5274
|
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;
|
|
5222
5275
|
}
|
|
5223
5276
|
//#endregion
|
|
5224
|
-
export {
|
|
5277
|
+
export { Ee as Accordion, xe as AccordionStyleType, Le as ActionButtons, He as ActionIcon, tt as Align, Ue as BodyEnd, W as Button, Me as ButtonSize, je as ButtonStyleType, Ne as ButtonType, We as Card, Je as CardActions, qe as CardContent, Ge as CardHeader, Ke as CardMedia, Xe as Checkbox, Qe as Chip, $e as ChipContainer, gt as ColorPicker, yt as ConfirmModal, qt as DatePicker, Gt as Dropdown, Yt as EmptyState, $t as Fab, rt as FloatingMenu, Qr as FormValidator, Zr as FormValidatorGroup, _n as IconLoading, rn as IconPicker, on as IdleManager, Wt as InfiniteBlock, ot as Input, un as InputDropdown, q as InputType, Be as InteractableDiv, mn as KanbanBoard, pn as KanbanColumn, vt as Modal, bn as NumberInput, Sn as OptionPicker, En as Overscroll, kn as ProgressBar, U as Ripple, nr as RoomDrawer, ir as RoomViewer, sr as ScrollbarProvider, lr as SearchInput, Ae as SpinnerLoading, fr as Stepper, br as TenorPicker, xr as Textarea, wr as ThemeProvider, Ir as ToastProvider, at as Tooltip, ui as ValidatableComponent, li as Validators, Wr as VirtualList, Kr as Wizard, Sr as defaultTheme, Dt as getLocale, ai as hasEightPasswordChars, si as hasOnePasswordDigit, oi as hasOnePasswordLetter, ri as isBic, ei as isDate, ni as isEmail, ti as isISODate, $r as isNumber, ci as isPassword, ii as isURL, wt as mapLocale, Et as setLocale, Mr as showToast, di as useFormValidator, fi as useFormValidatorGroup, Tr as useTheme };
|
|
5225
5278
|
|
|
5226
5279
|
//# sourceMappingURL=index.mjs.map
|