@ahrowe/ui 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +915 -887
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/package/common/card/Card.d.ts +1 -1
- package/dist/types/package/common/card/card.types.d.ts +6 -0
- package/docs/Card.md +24 -2
- package/docs/Chip.md +14 -2
- package/docs/VirtualList.md +25 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6,14 +6,14 @@ import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
|
6
6
|
import { createPortal as ie } from "react-dom";
|
|
7
7
|
import ae from "downshift";
|
|
8
8
|
import oe from "@mona-health/react-input-mask";
|
|
9
|
-
import { DndContext as U, DragOverlay as se, PointerSensor as W, closestCorners as ce, useDroppable as le, useSensor as
|
|
10
|
-
import { SortableContext as
|
|
11
|
-
import { CSS as
|
|
12
|
-
import { NumericFormat as
|
|
9
|
+
import { DndContext as U, DragOverlay as se, PointerSensor as W, closestCorners as ce, useDroppable as le, useSensor as ue, useSensors as de } from "@dnd-kit/core";
|
|
10
|
+
import { SortableContext as G, arrayMove as fe, useSortable as K, verticalListSortingStrategy as pe } from "@dnd-kit/sortable";
|
|
11
|
+
import { CSS as me } from "@dnd-kit/utilities";
|
|
12
|
+
import { NumericFormat as he } from "react-number-format";
|
|
13
13
|
//#region package/common/accordion/accordion.types.ts
|
|
14
|
-
var
|
|
14
|
+
var ge = /* @__PURE__ */ function(e) {
|
|
15
15
|
return e.Default = "default", e.Primary = "primary", e.Plain = "plain", e;
|
|
16
|
-
}({}),
|
|
16
|
+
}({}), _e = {
|
|
17
17
|
accordion: "accordion_YZt8B",
|
|
18
18
|
"accordion-title": "accordion-title_CGYKY",
|
|
19
19
|
accordionTitle: "accordion-title_CGYKY",
|
|
@@ -33,7 +33,7 @@ var he = /* @__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
|
+
}, ve = {
|
|
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 he = /* @__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
|
+
}, ye = {
|
|
57
57
|
accordion: "accordion_wkZJf",
|
|
58
58
|
"accordion-title": "accordion-title_-qwNy",
|
|
59
59
|
accordionTitle: "accordion-title_-qwNy",
|
|
@@ -71,13 +71,13 @@ var he = /* @__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
|
+
}, be = {
|
|
75
|
+
[ge.Default]: _e,
|
|
76
|
+
[ge.Primary]: ve,
|
|
77
|
+
[ge.Plain]: ye
|
|
78
78
|
};
|
|
79
|
-
function
|
|
80
|
-
let y =
|
|
79
|
+
function xe({ id: e = "", title: t = "", children: n = null, expanded: r = null, onHeaderClicked: i = () => {}, styleType: o = ge.Default, startOpen: s = !1, hideHeader: c = !1, className: l, style: m, classNames: h, styles: _, ...v }) {
|
|
80
|
+
let y = be[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 be({ id: e = "", title: t = "", children: n = null, expanded: r = null,
|
|
|
135
135
|
})]
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
|
-
var
|
|
138
|
+
var Se = {
|
|
139
139
|
actionButtons: "actionButtons_7GybR",
|
|
140
140
|
"actionButtons-margin": "actionButtons-margin_-XoFP",
|
|
141
141
|
actionButtonsMargin: "actionButtons-margin_-XoFP"
|
|
142
|
-
},
|
|
142
|
+
}, q = {
|
|
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 xe = {
|
|
|
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
|
+
}, Ce = {
|
|
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 xe = {
|
|
|
180
180
|
};
|
|
181
181
|
//#endregion
|
|
182
182
|
//#region package/common/loading/spinnerLoading/spinnerLoading.tsx
|
|
183
|
-
function
|
|
183
|
+
function we({ className: e }) {
|
|
184
184
|
return /* @__PURE__ */ V("svg", {
|
|
185
185
|
"data-testid": "spinner",
|
|
186
|
-
className: f(
|
|
186
|
+
className: f(Ce.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 Ce({ className: e }) {
|
|
|
196
196
|
})
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
|
|
199
|
+
we.defaultProps = { className: void 0 };
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region package/common/loading/spinnerLoading/index.ts
|
|
202
|
-
var
|
|
202
|
+
var Te = we, Ee = /* @__PURE__ */ function(e) {
|
|
203
203
|
return e.Primary = "primary", e.Default = "default", e.Delete = "delete", e;
|
|
204
|
-
}({}), Ee = /* @__PURE__ */ function(e) {
|
|
205
|
-
return e.Default = "default", e.Small = "small", e.Medium = "medium", e.Large = "large", e;
|
|
206
204
|
}({}), De = /* @__PURE__ */ function(e) {
|
|
205
|
+
return e.Default = "default", e.Small = "small", e.Medium = "medium", e.Large = "large", e;
|
|
206
|
+
}({}), Oe = /* @__PURE__ */ function(e) {
|
|
207
207
|
return e.Button = "button", e.Reset = "reset", e.Submit = "submit", e;
|
|
208
|
-
}({}),
|
|
208
|
+
}({}), ke = {
|
|
209
209
|
ripple: "ripple_TsvyF",
|
|
210
210
|
"ripple-container": "ripple-container_QzHdC",
|
|
211
211
|
rippleContainer: "ripple-container_QzHdC"
|
|
212
|
-
},
|
|
212
|
+
}, Ae = 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(ke.ripple), p.current?.appendChild(r), setTimeout(() => {
|
|
218
218
|
p.current?.removeChild(r);
|
|
219
219
|
}, s * 1e3 + 50);
|
|
220
220
|
}
|
|
@@ -237,7 +237,7 @@ var we = Ce, Te = /* @__PURE__ */ function(e) {
|
|
|
237
237
|
}, [t, l]);
|
|
238
238
|
let _ = { "--ripple-animation-length": `${s}s` };
|
|
239
239
|
return t === void 0 ? /* @__PURE__ */ V("div", {
|
|
240
|
-
className:
|
|
240
|
+
className: ke.rippleContainer,
|
|
241
241
|
ref: p,
|
|
242
242
|
style: {
|
|
243
243
|
overflow: i ? "hidden" : "visible",
|
|
@@ -253,47 +253,47 @@ var we = Ce, Te = /* @__PURE__ */ function(e) {
|
|
|
253
253
|
...r
|
|
254
254
|
},
|
|
255
255
|
children: [t, /* @__PURE__ */ V("div", {
|
|
256
|
-
className:
|
|
256
|
+
className: ke.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
|
+
}), je = {
|
|
262
|
+
default: q.buttonStyleDefault,
|
|
263
|
+
primary: q.buttonStylePrimary,
|
|
264
|
+
delete: q.buttonStyleDelete
|
|
265
|
+
}, Me = {
|
|
266
|
+
default: q.buttonSizeDefault,
|
|
267
|
+
small: q.buttonSizeSmall,
|
|
268
|
+
medium: q.buttonSizeMedium,
|
|
269
|
+
large: q.buttonSizeLarge
|
|
270
270
|
};
|
|
271
|
-
function
|
|
271
|
+
function Ne({ className: e, style: t, type: n = Oe.Button, styleType: r = Ee.Default, size: i = De.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__ */ V("button", {
|
|
273
273
|
...g,
|
|
274
|
-
className: f(
|
|
274
|
+
className: f(q.button, je[r], Me[i], { [q.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__ */ V(
|
|
281
|
+
children: /* @__PURE__ */ V(Ae, {
|
|
282
282
|
disabled: c || l,
|
|
283
283
|
children: /* @__PURE__ */ V("div", {
|
|
284
|
-
className: f(
|
|
284
|
+
className: f(q.buttonBackground, m?.background),
|
|
285
285
|
style: h?.background,
|
|
286
286
|
children: /* @__PURE__ */ H("div", {
|
|
287
|
-
className: f(
|
|
287
|
+
className: f(q.buttonContent, m?.content),
|
|
288
288
|
style: h?.content,
|
|
289
289
|
children: [c ? /* @__PURE__ */ V("div", {
|
|
290
|
-
className: f(
|
|
290
|
+
className: f(q.buttonLoadingContainer, m?.loadingContainer),
|
|
291
291
|
style: h?.loadingContainer,
|
|
292
|
-
children: /* @__PURE__ */ V(
|
|
292
|
+
children: /* @__PURE__ */ V(Te, { className: q.buttonLoadingIcon })
|
|
293
293
|
}) : null, /* @__PURE__ */ H("div", {
|
|
294
294
|
className: f(m?.label, {
|
|
295
|
-
[
|
|
296
|
-
[
|
|
295
|
+
[q.buttonLoading]: c,
|
|
296
|
+
[q.buttonWithIcon]: !!s
|
|
297
297
|
}),
|
|
298
298
|
style: h?.label,
|
|
299
299
|
children: [s ? /* @__PURE__ */ V(p, { icon: s }) : null, o]
|
|
@@ -303,28 +303,28 @@ function Me({ className: e, style: t, type: n = De.Button, styleType: r = Te.Def
|
|
|
303
303
|
})
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
|
-
|
|
306
|
+
Ne.StyleType = Ee, Ne.Size = De, Ne.Type = Oe;
|
|
307
307
|
//#endregion
|
|
308
308
|
//#region package/common/actionButtons/actionButtons.tsx
|
|
309
|
-
function
|
|
309
|
+
function Pe({ onSubmit: e = () => null, onClose: t = () => null, submitLabel: n = "Save", cancelLabel: r = "Cancel", submitButtonStyle: i = Ee.Primary, isSubmitButtonLoading: a = !1, isSubmitButtonDisabled: o = !1, submitButtonIcon: s = void 0, cancelButtonStyle: c = Ee.Default, isCancelButtonLoading: l = !1, isCancelButtonDisabled: u = !1, cancelButtonIcon: d = void 0, hidePrimaryButton: p = !1, hideSecondaryButton: m = !1, noMargin: h = !1, className: g, style: _, classNames: v, styles: y, ...b }) {
|
|
310
310
|
return /* @__PURE__ */ H("div", {
|
|
311
311
|
...b,
|
|
312
|
-
className: f(
|
|
312
|
+
className: f(Se.actionButtons, !h && Se.actionButtonsMargin, g, v?.root),
|
|
313
313
|
style: {
|
|
314
314
|
..._,
|
|
315
315
|
...y?.root
|
|
316
316
|
},
|
|
317
|
-
children: [!p && /* @__PURE__ */ V(
|
|
317
|
+
children: [!p && /* @__PURE__ */ V(Ne, {
|
|
318
318
|
isLoading: a,
|
|
319
319
|
disabled: o,
|
|
320
320
|
styleType: i,
|
|
321
|
-
type:
|
|
321
|
+
type: Oe.Submit,
|
|
322
322
|
onClick: e,
|
|
323
323
|
className: v?.submitButton,
|
|
324
324
|
style: y?.submitButton,
|
|
325
325
|
icon: s,
|
|
326
326
|
children: n
|
|
327
|
-
}), !m && /* @__PURE__ */ V(
|
|
327
|
+
}), !m && /* @__PURE__ */ V(Ne, {
|
|
328
328
|
isLoading: l,
|
|
329
329
|
disabled: u,
|
|
330
330
|
onClick: t,
|
|
@@ -336,12 +336,12 @@ function Ne({ onSubmit: e = () => null, onClose: t = () => null, submitLabel: n
|
|
|
336
336
|
})]
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
|
-
var
|
|
339
|
+
var Fe = { interactableDiv: "interactableDiv_Ej8Fi" }, Ie = e.forwardRef(({ className: e, children: t, onClick: n, onMouseDown: r, onKeyDown: a, tabIndex: o = 0, title: s, ...c }, l) => {
|
|
340
340
|
let u = i((e) => {
|
|
341
341
|
e.key === "Enter" && n?.(e), a?.(e);
|
|
342
342
|
}, [n, a]);
|
|
343
343
|
return /* @__PURE__ */ V("div", {
|
|
344
|
-
className: f(
|
|
344
|
+
className: f(Fe.interactableDiv, e),
|
|
345
345
|
onClick: n,
|
|
346
346
|
onMouseDown: r,
|
|
347
347
|
tabIndex: o ?? 0,
|
|
@@ -353,16 +353,16 @@ var Pe = { interactableDiv: "interactableDiv_Ej8Fi" }, Fe = e.forwardRef(({ clas
|
|
|
353
353
|
children: t
|
|
354
354
|
});
|
|
355
355
|
});
|
|
356
|
-
|
|
356
|
+
Ie.displayName = "InteractableDiv";
|
|
357
357
|
//#endregion
|
|
358
358
|
//#region package/common/interactableDiv/index.ts
|
|
359
|
-
var
|
|
359
|
+
var Le = Ie, Re = { actionIcon: "actionIcon_ganSq" };
|
|
360
360
|
//#endregion
|
|
361
361
|
//#region package/common/actionIcon/actionIcon.tsx
|
|
362
|
-
function
|
|
363
|
-
return /* @__PURE__ */ V(
|
|
362
|
+
function ze({ icon: e, className: t = "", style: n, title: r = "", onClick: i = () => {}, classNames: a, styles: o, ...s }) {
|
|
363
|
+
return /* @__PURE__ */ V(Le, {
|
|
364
364
|
...s,
|
|
365
|
-
className: f(
|
|
365
|
+
className: f(Re.actionIcon, t, a?.root),
|
|
366
366
|
style: {
|
|
367
367
|
...n,
|
|
368
368
|
...o?.root
|
|
@@ -378,16 +378,24 @@ function Re({ icon: e, className: t = "", style: n, title: r = "", onClick: i =
|
|
|
378
378
|
}
|
|
379
379
|
//#endregion
|
|
380
380
|
//#region package/common/bodyEnd/bodyEnd.tsx
|
|
381
|
-
function
|
|
381
|
+
function Be({ children: e = null }) {
|
|
382
382
|
let t = document.getElementById("bodyEnd");
|
|
383
383
|
return t ? ie(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);
|
|
384
384
|
}
|
|
385
|
-
|
|
385
|
+
//#endregion
|
|
386
|
+
//#region package/common/card/card.types.ts
|
|
387
|
+
var Ve = /* @__PURE__ */ function(e) {
|
|
388
|
+
return e.Elevated = "elevated", e.Outlined = "outlined", e.Filled = "filled", e;
|
|
389
|
+
}({}), J = {
|
|
386
390
|
card: "card_w-6Ki",
|
|
387
391
|
"card-padding": "card-padding_X2-q-",
|
|
388
392
|
cardPadding: "card-padding_X2-q-",
|
|
389
|
-
"card-
|
|
390
|
-
|
|
393
|
+
"card-style-elevated": "card-style-elevated_exvMB",
|
|
394
|
+
cardStyleElevated: "card-style-elevated_exvMB",
|
|
395
|
+
"card-style-outlined": "card-style-outlined_PxZZA",
|
|
396
|
+
cardStyleOutlined: "card-style-outlined_PxZZA",
|
|
397
|
+
"card-style-filled": "card-style-filled_2nhAY",
|
|
398
|
+
cardStyleFilled: "card-style-filled_2nhAY",
|
|
391
399
|
"card-interactable": "card-interactable_az2lE",
|
|
392
400
|
cardInteractable: "card-interactable_az2lE",
|
|
393
401
|
"card-hover": "card-hover_fdS-X",
|
|
@@ -407,19 +415,21 @@ var Be = {
|
|
|
407
415
|
cardHeaderTitlesSub: "cardHeader-titles-sub_2X08b",
|
|
408
416
|
cardMedia: "cardMedia_GZJQF",
|
|
409
417
|
cardActions: "cardActions_uYu-0"
|
|
418
|
+
}, He = {
|
|
419
|
+
elevated: J.cardStyleElevated,
|
|
420
|
+
outlined: J.cardStyleOutlined,
|
|
421
|
+
filled: J.cardStyleFilled
|
|
410
422
|
};
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
children: /* @__PURE__ */ V(ke, {
|
|
422
|
-
disabled: !s,
|
|
423
|
+
function Ue({ className: e = void 0, children: t = null, styleType: n = Ve.Elevated, onClick: r = void 0, tabIndex: i = null, hoverEffect: a = void 0, style: o = void 0, ...s }) {
|
|
424
|
+
let c = !!r;
|
|
425
|
+
return /* @__PURE__ */ V(Le, {
|
|
426
|
+
...s,
|
|
427
|
+
className: f(J.card, J.cardPadding, He[n], c && J.cardInteractable, (c && a !== !1 || a) && J.cardHover, e),
|
|
428
|
+
onClick: r,
|
|
429
|
+
tabIndex: i ?? (c ? 0 : null),
|
|
430
|
+
style: o,
|
|
431
|
+
children: /* @__PURE__ */ V(Ae, {
|
|
432
|
+
disabled: !c,
|
|
423
433
|
overflowHidden: !1,
|
|
424
434
|
children: t
|
|
425
435
|
})
|
|
@@ -427,24 +437,24 @@ function Ve({ className: e = void 0, children: t = null, onClick: n = void 0, ta
|
|
|
427
437
|
}
|
|
428
438
|
//#endregion
|
|
429
439
|
//#region package/common/card/CardHeader.tsx
|
|
430
|
-
function
|
|
440
|
+
function We({ className: e = "", title: t = "", subTitle: n = "", thumbnail: r = "", actions: i = void 0 }) {
|
|
431
441
|
let a = typeof r == "string" && r.startsWith("http") ? r : void 0;
|
|
432
442
|
return /* @__PURE__ */ H("div", {
|
|
433
|
-
className: f(
|
|
443
|
+
className: f(J.cardHeader, e),
|
|
434
444
|
children: [r && /* @__PURE__ */ V("div", {
|
|
435
|
-
className:
|
|
445
|
+
className: J.cardHeaderThumbnail,
|
|
436
446
|
style: a ? { backgroundImage: `url(${a})` } : {},
|
|
437
447
|
children: !a && r
|
|
438
448
|
}), /* @__PURE__ */ H("div", {
|
|
439
|
-
className:
|
|
449
|
+
className: J.cardHeaderTitles,
|
|
440
450
|
children: [/* @__PURE__ */ H("div", {
|
|
441
|
-
className:
|
|
451
|
+
className: J.cardHeaderTitlesMainContainer,
|
|
442
452
|
children: [/* @__PURE__ */ V("div", {
|
|
443
|
-
className:
|
|
453
|
+
className: J.cardHeaderTitlesMain,
|
|
444
454
|
children: t
|
|
445
455
|
}), /* @__PURE__ */ V("div", {
|
|
446
|
-
className:
|
|
447
|
-
children: Array.isArray(i) ? i.map((e, t) => /* @__PURE__ */ V(
|
|
456
|
+
className: J.cardHeaderActions,
|
|
457
|
+
children: Array.isArray(i) ? i.map((e, t) => /* @__PURE__ */ V(ze, {
|
|
448
458
|
title: e.title,
|
|
449
459
|
onClick: e.onClick ? (t) => {
|
|
450
460
|
t.stopPropagation(), e.onClick?.(t);
|
|
@@ -453,7 +463,7 @@ function He({ className: e = "", title: t = "", subTitle: n = "", thumbnail: r =
|
|
|
453
463
|
}, t)) : i
|
|
454
464
|
})]
|
|
455
465
|
}), /* @__PURE__ */ V("div", {
|
|
456
|
-
className:
|
|
466
|
+
className: J.cardHeaderTitlesSub,
|
|
457
467
|
children: n
|
|
458
468
|
})]
|
|
459
469
|
})]
|
|
@@ -461,31 +471,31 @@ function He({ className: e = "", title: t = "", subTitle: n = "", thumbnail: r =
|
|
|
461
471
|
}
|
|
462
472
|
//#endregion
|
|
463
473
|
//#region package/common/card/CardMedia.tsx
|
|
464
|
-
function
|
|
474
|
+
function Ge({ src: e = "", alt: t = "" }) {
|
|
465
475
|
return /* @__PURE__ */ V("img", {
|
|
466
|
-
className:
|
|
476
|
+
className: J.cardMedia,
|
|
467
477
|
src: e,
|
|
468
478
|
alt: t
|
|
469
479
|
});
|
|
470
480
|
}
|
|
471
481
|
//#endregion
|
|
472
482
|
//#region package/common/card/CardContent.tsx
|
|
473
|
-
function
|
|
483
|
+
function Ke({ children: e = null }) {
|
|
474
484
|
return /* @__PURE__ */ V(B, { children: e });
|
|
475
485
|
}
|
|
476
486
|
//#endregion
|
|
477
487
|
//#region package/common/card/CardActions.tsx
|
|
478
|
-
function
|
|
488
|
+
function qe({ className: e = "", actions: t = [], children: n = null }) {
|
|
479
489
|
return /* @__PURE__ */ H("div", {
|
|
480
|
-
className: f(
|
|
481
|
-
children: [t.map(({ id: e, onClick: t, label: n, styleType: r =
|
|
490
|
+
className: f(J.cardActions, e),
|
|
491
|
+
children: [t.map(({ id: e, onClick: t, label: n, styleType: r = Ee.Default }) => /* @__PURE__ */ V("div", { children: /* @__PURE__ */ V(Ne, {
|
|
482
492
|
onClick: t,
|
|
483
493
|
styleType: r,
|
|
484
494
|
children: n
|
|
485
495
|
}) }, e ?? n)), n]
|
|
486
496
|
});
|
|
487
497
|
}
|
|
488
|
-
var
|
|
498
|
+
var Je = {
|
|
489
499
|
checkbox: "checkbox_VO3c2",
|
|
490
500
|
"checkbox-icon": "checkbox-icon_7O0Hm",
|
|
491
501
|
checkboxIcon: "checkbox-icon_7O0Hm",
|
|
@@ -504,7 +514,7 @@ var Ke = {
|
|
|
504
514
|
};
|
|
505
515
|
//#endregion
|
|
506
516
|
//#region package/common/checkbox/checkbox.tsx
|
|
507
|
-
function
|
|
517
|
+
function Ye({ 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 }) {
|
|
508
518
|
let C = u(null), [, w] = d(0);
|
|
509
519
|
a(() => {
|
|
510
520
|
if (!g) return;
|
|
@@ -517,9 +527,9 @@ function qe({ label: e = "", selected: t = !1, onToggle: n = () => {}, className
|
|
|
517
527
|
let E = g ? g.value : t;
|
|
518
528
|
return /* @__PURE__ */ H("div", {
|
|
519
529
|
...S,
|
|
520
|
-
className: f(
|
|
521
|
-
[
|
|
522
|
-
[
|
|
530
|
+
className: f(Je.checkbox, {
|
|
531
|
+
[Je.checkboxDisabled]: o,
|
|
532
|
+
[Je.checkboxPointer]: !p
|
|
523
533
|
}, r),
|
|
524
534
|
style: i,
|
|
525
535
|
onClick: T,
|
|
@@ -531,22 +541,22 @@ function qe({ label: e = "", selected: t = !1, onToggle: n = () => {}, className
|
|
|
531
541
|
tabIndex: l,
|
|
532
542
|
children: [/* @__PURE__ */ V("div", {
|
|
533
543
|
title: c,
|
|
534
|
-
className: f(
|
|
544
|
+
className: f(Je.checkboxIcon, y ? Je.checkboxLoading : null, b?.icon),
|
|
535
545
|
style: x?.icon,
|
|
536
546
|
children: y ? /* @__PURE__ */ V("div", {
|
|
537
547
|
style: {
|
|
538
548
|
width: m,
|
|
539
549
|
height: h
|
|
540
550
|
},
|
|
541
|
-
children: /* @__PURE__ */ V(
|
|
551
|
+
children: /* @__PURE__ */ V(Te, { className: Je.checkboxLoadingSpinner })
|
|
542
552
|
}) : /* @__PURE__ */ H("div", {
|
|
543
553
|
style: {
|
|
544
554
|
width: m,
|
|
545
555
|
height: h,
|
|
546
556
|
...x?.checkmark
|
|
547
557
|
},
|
|
548
|
-
className: f(
|
|
549
|
-
children: [/* @__PURE__ */ V(
|
|
558
|
+
className: f(Je.checkboxCheckmark, E && Je.checkboxCheckmarkChecked, b?.checkmark),
|
|
559
|
+
children: [/* @__PURE__ */ V(Ae, {
|
|
550
560
|
ref: C,
|
|
551
561
|
manualOnly: !0,
|
|
552
562
|
overflowHidden: !1,
|
|
@@ -579,9 +589,9 @@ function qe({ label: e = "", selected: t = !1, onToggle: n = () => {}, className
|
|
|
579
589
|
}
|
|
580
590
|
//#endregion
|
|
581
591
|
//#region package/common/chip/chip.types.ts
|
|
582
|
-
var
|
|
592
|
+
var Xe = /* @__PURE__ */ function(e) {
|
|
583
593
|
return e.Default = "default", e.Primary = "primary", e.Info = "info", e.Warn = "warn", e.Error = "error", e;
|
|
584
|
-
}({}),
|
|
594
|
+
}({}), Ze = {
|
|
585
595
|
chip: "chip_rCTMl",
|
|
586
596
|
"chip-clickable": "chip-clickable_WTVjG",
|
|
587
597
|
chipClickable: "chip-clickable_WTVjG",
|
|
@@ -605,37 +615,37 @@ var Je = /* @__PURE__ */ function(e) {
|
|
|
605
615
|
chipContainer: "chip-container_oNNmF",
|
|
606
616
|
"chip-container-inline": "chip-container-inline_11QHw",
|
|
607
617
|
chipContainerInline: "chip-container-inline_11QHw"
|
|
608
|
-
},
|
|
609
|
-
default:
|
|
610
|
-
primary:
|
|
611
|
-
info:
|
|
612
|
-
warn:
|
|
613
|
-
error:
|
|
618
|
+
}, Qe = {
|
|
619
|
+
default: Ze.chipStyleDefault,
|
|
620
|
+
primary: Ze.chipStylePrimary,
|
|
621
|
+
info: Ze.chipStyleInfo,
|
|
622
|
+
warn: Ze.chipStyleWarn,
|
|
623
|
+
error: Ze.chipStyleError
|
|
614
624
|
};
|
|
615
|
-
function
|
|
625
|
+
function $e({ className: e = "", thumbnail: t = "", text: n = "", styleType: r = Xe.Default, showRemoveIcon: i = !1, onClick: a, onRemove: o, ...s }) {
|
|
616
626
|
let l = c(() => {
|
|
617
627
|
if (typeof t == "string" && t.startsWith("http")) return t;
|
|
618
628
|
}, [t]);
|
|
619
629
|
return /* @__PURE__ */ V("div", {
|
|
620
630
|
...s,
|
|
621
|
-
className: f(
|
|
631
|
+
className: f(Ze.chip, Qe[r], a && Ze.chipClickable, e),
|
|
622
632
|
onClick: a,
|
|
623
|
-
children: /* @__PURE__ */ V(
|
|
633
|
+
children: /* @__PURE__ */ V(Ae, {
|
|
624
634
|
disabled: !a,
|
|
625
635
|
style: { borderRadius: "inherit" },
|
|
626
636
|
children: /* @__PURE__ */ H("div", {
|
|
627
|
-
className:
|
|
637
|
+
className: Ze.chipInner,
|
|
628
638
|
children: [
|
|
629
639
|
t && /* @__PURE__ */ V("div", {
|
|
630
|
-
className:
|
|
640
|
+
className: Ze.chipThumbnail,
|
|
631
641
|
style: l ? { backgroundImage: `url(${l})` } : {},
|
|
632
642
|
children: !l && t
|
|
633
643
|
}),
|
|
634
644
|
/* @__PURE__ */ V("div", {
|
|
635
|
-
className:
|
|
645
|
+
className: Ze.chipText,
|
|
636
646
|
children: n
|
|
637
647
|
}),
|
|
638
|
-
i && /* @__PURE__ */ V(
|
|
648
|
+
i && /* @__PURE__ */ V(ze, {
|
|
639
649
|
icon: re,
|
|
640
650
|
onClick: (e) => {
|
|
641
651
|
e.stopPropagation(), o?.();
|
|
@@ -648,14 +658,14 @@ function Ze({ className: e = "", thumbnail: t = "", text: n = "", styleType: r =
|
|
|
648
658
|
}
|
|
649
659
|
//#endregion
|
|
650
660
|
//#region package/common/chip/chipContainer.tsx
|
|
651
|
-
function
|
|
661
|
+
function et({ className: e = void 0, children: t = null, inline: n = !1, ...r }) {
|
|
652
662
|
return /* @__PURE__ */ V("div", {
|
|
653
663
|
...r,
|
|
654
|
-
className: f(
|
|
664
|
+
className: f(Ze.chipContainer, n && Ze.chipContainerInline, e),
|
|
655
665
|
children: t
|
|
656
666
|
});
|
|
657
667
|
}
|
|
658
|
-
var
|
|
668
|
+
var tt = {
|
|
659
669
|
floatingMenu: "floatingMenu_E1XCy",
|
|
660
670
|
"floatingMenu-content": "floatingMenu-content_AmxkA",
|
|
661
671
|
floatingMenuContent: "floatingMenu-content_AmxkA",
|
|
@@ -678,15 +688,15 @@ var $e = {
|
|
|
678
688
|
"floatingMenu-anim": "floatingMenu-anim_5KB-f",
|
|
679
689
|
floatingMenuAnim: "floatingMenu-anim_5KB-f",
|
|
680
690
|
showMenu: "showMenu_AprCh"
|
|
681
|
-
},
|
|
691
|
+
}, nt = /* @__PURE__ */ function(e) {
|
|
682
692
|
return e.Left = "left", e.Right = "right", e.Center = "center", e;
|
|
683
693
|
}({});
|
|
684
694
|
//#endregion
|
|
685
695
|
//#region package/common/floatingMenu/floatingMenu.tsx
|
|
686
|
-
function
|
|
696
|
+
function rt(e) {
|
|
687
697
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
688
698
|
}
|
|
689
|
-
function
|
|
699
|
+
function it({ align: e = nt.Left, children: t = null, content: n = null, isOpen: r = !1, onOpenChange: i = () => {}, dontCloseOnChildClick: o = !1, className: s, style: c, classNames: l, styles: p, ...m }) {
|
|
690
700
|
let h = u(null), g = u(null), _ = u(i), [v, y] = d(10), [b, x] = d(null);
|
|
691
701
|
a(() => {
|
|
692
702
|
_.current = i;
|
|
@@ -723,19 +733,19 @@ function nt({ align: e = et.Left, children: t = null, content: n = null, isOpen:
|
|
|
723
733
|
return window.addEventListener("mouseup", e), () => window.removeEventListener("mouseup", e);
|
|
724
734
|
}, [r, o]), /* @__PURE__ */ H("div", {
|
|
725
735
|
...m,
|
|
726
|
-
className: f(
|
|
736
|
+
className: f(tt.floatingMenu, s, l?.root),
|
|
727
737
|
style: {
|
|
728
738
|
...c,
|
|
729
739
|
...p?.root
|
|
730
740
|
},
|
|
731
741
|
children: [/* @__PURE__ */ V("div", {
|
|
732
|
-
className: f(
|
|
742
|
+
className: f(tt.floatingMenuContent, l?.trigger),
|
|
733
743
|
style: p?.trigger,
|
|
734
744
|
ref: g,
|
|
735
745
|
onClick: S,
|
|
736
746
|
children: t
|
|
737
747
|
}), r && /* @__PURE__ */ H("div", {
|
|
738
|
-
className: f(
|
|
748
|
+
className: f(tt.floatingMenuAnim, l?.menu),
|
|
739
749
|
style: {
|
|
740
750
|
width: `${v}px`,
|
|
741
751
|
...b && {
|
|
@@ -744,16 +754,16 @@ function nt({ align: e = et.Left, children: t = null, content: n = null, isOpen:
|
|
|
744
754
|
},
|
|
745
755
|
...p?.menu
|
|
746
756
|
},
|
|
747
|
-
children: [/* @__PURE__ */ V("div", { className: f(
|
|
757
|
+
children: [/* @__PURE__ */ V("div", { className: f(tt.floatingMenuContainerFlag, tt[`floatingMenuContainerFlagAlign${rt(e)}`]) }), /* @__PURE__ */ V("div", {
|
|
748
758
|
ref: h,
|
|
749
|
-
className: f(
|
|
759
|
+
className: f(tt.floatingMenuContainer, tt[`floatingMenuContainerAlign${rt(e)}`], l?.menuContainer),
|
|
750
760
|
style: p?.menuContainer,
|
|
751
761
|
children: n
|
|
752
762
|
})]
|
|
753
763
|
})]
|
|
754
764
|
});
|
|
755
765
|
}
|
|
756
|
-
var
|
|
766
|
+
var at = {
|
|
757
767
|
tooltipBubble: "tooltipBubble_uyev0",
|
|
758
768
|
tooltipDetails: "tooltipDetails_R7N16",
|
|
759
769
|
"tooltipDetails-icon": "tooltipDetails-icon_rsjns",
|
|
@@ -762,25 +772,25 @@ var rt = {
|
|
|
762
772
|
};
|
|
763
773
|
//#endregion
|
|
764
774
|
//#region package/common/tooltip/tooltip.tsx
|
|
765
|
-
function
|
|
775
|
+
function ot({ variant: e, message: t = "", isVisible: n = !0, tooltipPosition: r, onClick: i }) {
|
|
766
776
|
let [a, o] = d(!1);
|
|
767
777
|
return e === "info" ? n ? /* @__PURE__ */ V("div", {
|
|
768
|
-
className: f(
|
|
778
|
+
className: f(at.tooltipBubble, r),
|
|
769
779
|
onClick: i,
|
|
770
780
|
children: t
|
|
771
781
|
}) : null : e === "details" ? /* @__PURE__ */ H("div", {
|
|
772
|
-
className:
|
|
782
|
+
className: at.tooltipDetails,
|
|
773
783
|
children: [/* @__PURE__ */ V("span", {
|
|
774
|
-
className:
|
|
784
|
+
className: at.tooltipDetailsIcon,
|
|
775
785
|
onMouseEnter: () => o(!0),
|
|
776
786
|
onMouseLeave: () => o(!1),
|
|
777
787
|
children: "?"
|
|
778
788
|
}), a && /* @__PURE__ */ V("div", {
|
|
779
|
-
className: f(
|
|
789
|
+
className: f(at.tooltipBubble, r),
|
|
780
790
|
children: t
|
|
781
791
|
})]
|
|
782
792
|
}) : e === "error" && n ? /* @__PURE__ */ V("div", {
|
|
783
|
-
className: f(
|
|
793
|
+
className: f(at.tooltipError, r),
|
|
784
794
|
onClick: i,
|
|
785
795
|
children: t
|
|
786
796
|
}) : null;
|
|
@@ -862,185 +872,185 @@ var Y = {
|
|
|
862
872
|
}({});
|
|
863
873
|
//#endregion
|
|
864
874
|
//#region package/common/input/input.tsx
|
|
865
|
-
function
|
|
866
|
-
let [
|
|
867
|
-
let e =
|
|
875
|
+
function st({ name: t = "", label: n = "", errorMessage: r = "", isValid: o = !0, className: s = "", style: c, value: l = "", icon: m = null, onChange: h = () => {}, onFocus: g = null, onBlur: _ = null, onMouseEnter: v = null, onMouseLeave: y = null, isUppercase: b = !1, isRequired: x = !1, tabIndex: S = 0, type: C = void 0, isRow: w = !1, onIconClick: T = null, parse: k = null, formValidator: A = null, autoFocus: j = !1, suffix: M = null, upperRightLabel: N = null, labelInBorder: I = !1, showCancel: te = !1, onClearClicked: L, min: R = null, max: ne = null, placeholder: re = "", useMatLabelStyle: B = !0, autoComplete: ie = null, onClick: ae = () => null, readOnly: oe = !1, customInput: U, alwaysShowCancel: se = !1, multiline: W = !1, rows: ce, autoResize: le = !1, classNames: ue, styles: de, disabled: G = !1, ...fe }) {
|
|
876
|
+
let [K, pe] = d(!1), [me, he] = d(!1), [ge, _e] = d(!1), [, ve] = d(0), ye = u(null), be = u(A), xe = i(() => {
|
|
877
|
+
let e = ye.current;
|
|
868
878
|
!e || !le || (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
869
879
|
}, [le]);
|
|
870
880
|
a(() => {
|
|
871
881
|
setTimeout(() => {
|
|
872
|
-
|
|
873
|
-
}, 1),
|
|
882
|
+
pe(!1), he(!1);
|
|
883
|
+
}, 1), xe();
|
|
874
884
|
}, []), a(() => {
|
|
875
|
-
j &&
|
|
876
|
-
|
|
885
|
+
j && ye.current && setTimeout(() => {
|
|
886
|
+
ye.current?.focus();
|
|
877
887
|
}, 1);
|
|
878
888
|
}, [j]), a(() => {
|
|
879
|
-
|
|
880
|
-
let e =
|
|
889
|
+
be.current = A;
|
|
890
|
+
let e = be.current;
|
|
881
891
|
if (!e) return;
|
|
882
892
|
e.label = n ?? "", e.validate();
|
|
883
|
-
let t = () =>
|
|
893
|
+
let t = () => ve((e) => e + 1);
|
|
884
894
|
return e.registerOnUpdateListener(t), () => {
|
|
885
895
|
e.removeOnUpdateListener(t);
|
|
886
896
|
};
|
|
887
897
|
}, [A, n]);
|
|
888
|
-
let
|
|
889
|
-
|
|
890
|
-
}, Ce = (e) => {
|
|
891
|
-
me(!1), y && y(e);
|
|
898
|
+
let Se = () => A ? A.touched && A.hasError() : !o || !!r, q = () => !!(x || A && A.validators.find((e) => e.validatorId === "required")), Ce = (e) => {
|
|
899
|
+
he(!0), v && v(e);
|
|
892
900
|
}, we = (e) => {
|
|
893
|
-
|
|
901
|
+
he(!1), y && y(e);
|
|
894
902
|
}, Te = (e) => {
|
|
895
|
-
|
|
903
|
+
pe(!0), g && g(e);
|
|
896
904
|
}, Ee = (e) => {
|
|
905
|
+
be.current && (be.current.touched = !0), pe(!1), _ && _(e);
|
|
906
|
+
}, De = (e) => {
|
|
897
907
|
let t, n;
|
|
898
|
-
typeof e == "string" ? n = e : (t = e, n = e.target.value), k && (n = k(n)), A && A.set(n), h && h(n, t),
|
|
899
|
-
},
|
|
900
|
-
if (C !== "email") return C === "password" &&
|
|
901
|
-
},
|
|
908
|
+
typeof e == "string" ? n = e : (t = e, n = e.target.value), k && (n = k(n)), A && A.set(n), h && h(n, t), xe();
|
|
909
|
+
}, Oe = () => {
|
|
910
|
+
if (C !== "email") return C === "password" && ge ? "text" : C;
|
|
911
|
+
}, ke = C && C !== X.Date && C !== X.Iban && C !== X.HasNoIcon, Ae = ke && !B && (C === X.Email || C === X.Phone || C === X.Search), je = {
|
|
902
912
|
className: f(Y.inputFieldIcon, {
|
|
903
913
|
[Y.inputFieldIconNotClickable]: !T,
|
|
904
|
-
[Y.inputFieldIconLeft]:
|
|
914
|
+
[Y.inputFieldIconLeft]: Ae
|
|
905
915
|
}),
|
|
906
916
|
onClick: T ?? void 0
|
|
907
|
-
},
|
|
917
|
+
}, Me = {
|
|
908
918
|
className: f(Y.inputFieldIcon, Y.inputFieldIconPassword),
|
|
909
|
-
onClick: () =>
|
|
910
|
-
},
|
|
911
|
-
|
|
912
|
-
let
|
|
919
|
+
onClick: () => _e(!ge)
|
|
920
|
+
}, Ne = Se(), Pe = n;
|
|
921
|
+
Pe && q() && (Pe = `${Pe} *`);
|
|
922
|
+
let Fe = A ? A.value : l, Ie = B && (K || Fe || C === X.Date);
|
|
913
923
|
return /* @__PURE__ */ H("div", {
|
|
914
924
|
className: f(Y.input, s),
|
|
915
925
|
style: c,
|
|
916
926
|
children: [
|
|
917
927
|
/* @__PURE__ */ H("label", {
|
|
918
928
|
htmlFor: t,
|
|
919
|
-
className: f(Y.inputLabel,
|
|
929
|
+
className: f(Y.inputLabel, ue?.label, {
|
|
920
930
|
[Y.inputLabelColumn]: !w,
|
|
921
931
|
[Y.inputLabelInBorder]: I
|
|
922
932
|
}),
|
|
923
|
-
style:
|
|
933
|
+
style: de?.label,
|
|
924
934
|
children: [
|
|
925
|
-
|
|
935
|
+
Pe && !B ? /* @__PURE__ */ H("span", {
|
|
926
936
|
className: Y.inputLabelText,
|
|
927
|
-
children: [`${
|
|
937
|
+
children: [`${Pe} `, q() ? /* @__PURE__ */ V("span", {
|
|
928
938
|
className: f(Y.isRequired),
|
|
929
939
|
children: "\xA0 *"
|
|
930
940
|
}) : null]
|
|
931
941
|
}) : null,
|
|
932
942
|
N && /* @__PURE__ */ V("div", {
|
|
933
|
-
className: f(Y.inputUpperRightLabel,
|
|
934
|
-
style:
|
|
943
|
+
className: f(Y.inputUpperRightLabel, ue?.upperRightLabel),
|
|
944
|
+
style: de?.upperRightLabel,
|
|
935
945
|
children: N
|
|
936
946
|
}),
|
|
937
947
|
/* @__PURE__ */ H("div", {
|
|
938
|
-
className: f(Y.inputContainer, { [Y.inputContainerMultiline]: W },
|
|
939
|
-
style:
|
|
940
|
-
onMouseEnter:
|
|
941
|
-
onMouseLeave:
|
|
948
|
+
className: f(Y.inputContainer, { [Y.inputContainerMultiline]: W }, ue?.container),
|
|
949
|
+
style: de?.container,
|
|
950
|
+
onMouseEnter: Ce,
|
|
951
|
+
onMouseLeave: we,
|
|
942
952
|
children: [
|
|
943
953
|
m,
|
|
944
954
|
e.cloneElement(U || V(W ? "textarea" : "input", {}), {
|
|
945
|
-
...
|
|
955
|
+
...fe,
|
|
946
956
|
className: f(Y.inputField, {
|
|
947
957
|
[Y.inputFieldUppercase]: b,
|
|
948
958
|
[Y.inputFieldDate]: C === X.Date,
|
|
949
959
|
[Y.inputFieldDefault]: C !== X.Date,
|
|
950
|
-
[Y.inputFieldWithIcon]:
|
|
951
|
-
[Y.inputFieldWithIconLeft]:
|
|
960
|
+
[Y.inputFieldWithIcon]: ke,
|
|
961
|
+
[Y.inputFieldWithIconLeft]: Ae,
|
|
952
962
|
[Y.inputFieldMultiline]: W,
|
|
953
963
|
[Y.inputFieldMultilineAutoResize]: W && le
|
|
954
|
-
},
|
|
964
|
+
}, ue?.input),
|
|
955
965
|
name: t,
|
|
956
966
|
id: t,
|
|
957
967
|
value: A ? A.value : l,
|
|
958
968
|
tabIndex: S,
|
|
959
|
-
ref: U ? void 0 :
|
|
960
|
-
onChange:
|
|
961
|
-
onFocus:
|
|
962
|
-
onBlur:
|
|
969
|
+
ref: U ? void 0 : ye,
|
|
970
|
+
onChange: De,
|
|
971
|
+
onFocus: Te,
|
|
972
|
+
onBlur: Ee,
|
|
963
973
|
placeholder: B ? "" : re,
|
|
964
974
|
autoComplete: ie,
|
|
965
975
|
onClick: ae,
|
|
966
976
|
readOnly: oe,
|
|
967
|
-
disabled:
|
|
977
|
+
disabled: G,
|
|
968
978
|
...!W && {
|
|
969
|
-
type:
|
|
979
|
+
type: Oe(),
|
|
970
980
|
min: R,
|
|
971
981
|
max: ne
|
|
972
982
|
},
|
|
973
983
|
...W && ce !== void 0 && { rows: ce }
|
|
974
984
|
}),
|
|
975
985
|
M && /* @__PURE__ */ V("div", {
|
|
976
|
-
className: f(Y.inputFieldSuffix,
|
|
977
|
-
style:
|
|
986
|
+
className: f(Y.inputFieldSuffix, ue?.suffix),
|
|
987
|
+
style: de?.suffix,
|
|
978
988
|
children: M
|
|
979
989
|
})
|
|
980
990
|
]
|
|
981
991
|
}),
|
|
982
992
|
/* @__PURE__ */ V("fieldset", {
|
|
983
|
-
className: f(Y.inputFieldset,
|
|
984
|
-
[Y.inputContainerBorderFocused]:
|
|
985
|
-
[Y.inputContainerBorderSearchFocused]: C === X.Search && (
|
|
986
|
-
[Y.inputContainerBorderInvalid]:
|
|
987
|
-
[Y.inputContainerBorderError]:
|
|
993
|
+
className: f(Y.inputFieldset, ue?.fieldset, {
|
|
994
|
+
[Y.inputContainerBorderFocused]: K,
|
|
995
|
+
[Y.inputContainerBorderSearchFocused]: C === X.Search && (K || l),
|
|
996
|
+
[Y.inputContainerBorderInvalid]: Ne,
|
|
997
|
+
[Y.inputContainerBorderError]: Ne
|
|
988
998
|
}),
|
|
989
|
-
style:
|
|
999
|
+
style: de?.fieldset,
|
|
990
1000
|
children: /* @__PURE__ */ V("legend", {
|
|
991
|
-
className: f(Y.inputFieldsetLegend, { [Y.inputFieldsetLegendActive]:
|
|
992
|
-
children: /* @__PURE__ */ V("span", { children:
|
|
1001
|
+
className: f(Y.inputFieldsetLegend, { [Y.inputFieldsetLegendActive]: Ie }),
|
|
1002
|
+
children: /* @__PURE__ */ V("span", { children: Pe })
|
|
993
1003
|
})
|
|
994
1004
|
}),
|
|
995
1005
|
B && n && /* @__PURE__ */ V("div", {
|
|
996
1006
|
className: f(Y.inputMatLabel, {
|
|
997
|
-
[Y.inputMatLabelFloating]:
|
|
998
|
-
[Y.inputMatLabelMultiline]: W && !
|
|
1007
|
+
[Y.inputMatLabelFloating]: Ie,
|
|
1008
|
+
[Y.inputMatLabelMultiline]: W && !Ie
|
|
999
1009
|
}),
|
|
1000
|
-
children:
|
|
1010
|
+
children: Pe
|
|
1001
1011
|
}),
|
|
1002
1012
|
B && re && /* @__PURE__ */ V("div", {
|
|
1003
|
-
className: f(Y.inputPlaceholder,
|
|
1013
|
+
className: f(Y.inputPlaceholder, K && !Fe && Y.inputPlaceholderShown, W && Y.inputPlaceholderMultiline),
|
|
1004
1014
|
children: re
|
|
1005
1015
|
}),
|
|
1006
|
-
/* @__PURE__ */ V(
|
|
1016
|
+
/* @__PURE__ */ V(ot, {
|
|
1007
1017
|
variant: "error",
|
|
1008
1018
|
message: A ? A.getCurrentErrorMessage() : r || "",
|
|
1009
|
-
isVisible:
|
|
1019
|
+
isVisible: Ne && (K || me)
|
|
1010
1020
|
})
|
|
1011
1021
|
]
|
|
1012
1022
|
}),
|
|
1013
1023
|
C === X.Phone && /* @__PURE__ */ V(p, {
|
|
1014
1024
|
icon: F,
|
|
1015
|
-
...
|
|
1025
|
+
...je
|
|
1016
1026
|
}),
|
|
1017
1027
|
C === X.Email && /* @__PURE__ */ V(p, {
|
|
1018
1028
|
icon: E,
|
|
1019
|
-
...
|
|
1029
|
+
...je
|
|
1020
1030
|
}),
|
|
1021
1031
|
C === X.Edit && /* @__PURE__ */ V(p, {
|
|
1022
1032
|
icon: P,
|
|
1023
|
-
...
|
|
1033
|
+
...je
|
|
1024
1034
|
}),
|
|
1025
1035
|
C === X.Search && /* @__PURE__ */ V(p, {
|
|
1026
1036
|
icon: ee,
|
|
1027
|
-
...
|
|
1037
|
+
...je
|
|
1028
1038
|
}),
|
|
1029
1039
|
C === X.Password && /* @__PURE__ */ V(p, {
|
|
1030
|
-
icon:
|
|
1031
|
-
...
|
|
1040
|
+
icon: ge ? O : D,
|
|
1041
|
+
...Me
|
|
1032
1042
|
}),
|
|
1033
|
-
(te && l && (
|
|
1043
|
+
(te && l && (K || me) || se) && /* @__PURE__ */ V(p, {
|
|
1034
1044
|
icon: z,
|
|
1035
1045
|
className: Y.inputFieldIcon,
|
|
1036
1046
|
onClick: L ?? void 0,
|
|
1037
|
-
onMouseEnter: () =>
|
|
1038
|
-
onMouseLeave: () =>
|
|
1047
|
+
onMouseEnter: () => he(!0),
|
|
1048
|
+
onMouseLeave: () => he(!1)
|
|
1039
1049
|
})
|
|
1040
1050
|
]
|
|
1041
1051
|
});
|
|
1042
1052
|
}
|
|
1043
|
-
var
|
|
1053
|
+
var ct = {
|
|
1044
1054
|
colorPicker: "colorPicker_Ts3an",
|
|
1045
1055
|
swatch: "swatch_NW78g",
|
|
1046
1056
|
swatchHex: "swatchHex_j7-i5",
|
|
@@ -1055,10 +1065,10 @@ var ot = {
|
|
|
1055
1065
|
};
|
|
1056
1066
|
//#endregion
|
|
1057
1067
|
//#region package/common/colorPicker/colorPicker.tsx
|
|
1058
|
-
function
|
|
1068
|
+
function lt(e) {
|
|
1059
1069
|
return /^#[0-9a-fA-F]{6}$/.test(e) || /^#[0-9a-fA-F]{8}$/.test(e);
|
|
1060
1070
|
}
|
|
1061
|
-
function
|
|
1071
|
+
function ut(e) {
|
|
1062
1072
|
return /^#[0-9a-fA-F]{8}$/.test(e) ? {
|
|
1063
1073
|
hex6: e.slice(0, 7),
|
|
1064
1074
|
alpha: Math.round(parseInt(e.slice(7, 9), 16) / 255 * 100)
|
|
@@ -1067,13 +1077,13 @@ function ct(e) {
|
|
|
1067
1077
|
alpha: 100
|
|
1068
1078
|
};
|
|
1069
1079
|
}
|
|
1070
|
-
function
|
|
1080
|
+
function dt(e, t, n) {
|
|
1071
1081
|
return !n || t >= 100 ? e : `${e}${Math.round(t / 100 * 255).toString(16).padStart(2, "0")}`;
|
|
1072
1082
|
}
|
|
1073
|
-
function
|
|
1083
|
+
function ft(e, t) {
|
|
1074
1084
|
return `rgba(${parseInt(e.slice(1, 3), 16)}, ${parseInt(e.slice(3, 5), 16)}, ${parseInt(e.slice(5, 7), 16)}, ${t / 100})`;
|
|
1075
1085
|
}
|
|
1076
|
-
function
|
|
1086
|
+
function pt(e) {
|
|
1077
1087
|
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;
|
|
1078
1088
|
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));
|
|
1079
1089
|
let s = i === 0 ? 0 : Math.round(a / i * 100), c = Math.round(i * 100);
|
|
@@ -1083,13 +1093,13 @@ function dt(e) {
|
|
|
1083
1093
|
v: c
|
|
1084
1094
|
};
|
|
1085
1095
|
}
|
|
1086
|
-
function
|
|
1096
|
+
function mt(e, t, n) {
|
|
1087
1097
|
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;
|
|
1088
1098
|
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);
|
|
1089
1099
|
let d = (e) => Math.round((e + s) * 255).toString(16).padStart(2, "0");
|
|
1090
1100
|
return `#${d(c)}${d(l)}${d(u)}`;
|
|
1091
1101
|
}
|
|
1092
|
-
function
|
|
1102
|
+
function ht({ hex: e, onChange: t, useInputComponent: n = !1 }) {
|
|
1093
1103
|
let [r, i] = d(e);
|
|
1094
1104
|
a(() => {
|
|
1095
1105
|
i(e);
|
|
@@ -1097,12 +1107,12 @@ function pt({ hex: e, onChange: t, useInputComponent: n = !1 }) {
|
|
|
1097
1107
|
function o(e) {
|
|
1098
1108
|
i(e);
|
|
1099
1109
|
let n = e.startsWith("#") ? e : `#${e}`;
|
|
1100
|
-
|
|
1110
|
+
lt(n) && t(n);
|
|
1101
1111
|
}
|
|
1102
1112
|
function s() {
|
|
1103
|
-
|
|
1113
|
+
lt(r.startsWith("#") ? r : `#${r}`) || i(e);
|
|
1104
1114
|
}
|
|
1105
|
-
return n ? /* @__PURE__ */ V(
|
|
1115
|
+
return n ? /* @__PURE__ */ V(st, {
|
|
1106
1116
|
value: r,
|
|
1107
1117
|
onChange: (e) => o(e),
|
|
1108
1118
|
onBlur: s
|
|
@@ -1111,11 +1121,11 @@ function pt({ hex: e, onChange: t, useInputComponent: n = !1 }) {
|
|
|
1111
1121
|
value: r,
|
|
1112
1122
|
onChange: (e) => o(e.target.value),
|
|
1113
1123
|
onBlur: s,
|
|
1114
|
-
className:
|
|
1124
|
+
className: ct.hexInput,
|
|
1115
1125
|
spellCheck: !1
|
|
1116
1126
|
});
|
|
1117
1127
|
}
|
|
1118
|
-
function
|
|
1128
|
+
function gt({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, onAlphaChange: o, showInput: s = !0, showAlpha: c = !1 }) {
|
|
1119
1129
|
let l = u(null);
|
|
1120
1130
|
function d(e) {
|
|
1121
1131
|
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));
|
|
@@ -1136,20 +1146,20 @@ function mt({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, o
|
|
|
1136
1146
|
window.addEventListener("mousemove", r), window.addEventListener("mouseup", i);
|
|
1137
1147
|
}
|
|
1138
1148
|
function p(e) {
|
|
1139
|
-
let { hex6: t, alpha: n } =
|
|
1149
|
+
let { hex6: t, alpha: n } = ut(e), { h: r, s, v: l } = pt(t);
|
|
1140
1150
|
i(r), a(s, l), c && o(n);
|
|
1141
1151
|
}
|
|
1142
|
-
let m =
|
|
1152
|
+
let m = mt(e, t, n), h = c ? dt(m, r, !0) : m;
|
|
1143
1153
|
return /* @__PURE__ */ H("div", {
|
|
1144
|
-
className:
|
|
1154
|
+
className: ct.panel,
|
|
1145
1155
|
children: [
|
|
1146
1156
|
/* @__PURE__ */ H("div", {
|
|
1147
1157
|
ref: l,
|
|
1148
|
-
className:
|
|
1158
|
+
className: ct.gradientArea,
|
|
1149
1159
|
style: { "--hue": e },
|
|
1150
1160
|
onMouseDown: f,
|
|
1151
|
-
children: [/* @__PURE__ */ V("div", { className:
|
|
1152
|
-
className:
|
|
1161
|
+
children: [/* @__PURE__ */ V("div", { className: ct.gradientOverlay }), /* @__PURE__ */ V("div", {
|
|
1162
|
+
className: ct.cursor,
|
|
1153
1163
|
style: {
|
|
1154
1164
|
left: `${t}%`,
|
|
1155
1165
|
top: `${100 - n}%`
|
|
@@ -1162,7 +1172,7 @@ function mt({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, o
|
|
|
1162
1172
|
max: 359,
|
|
1163
1173
|
value: e,
|
|
1164
1174
|
onChange: (e) => i(Number(e.target.value)),
|
|
1165
|
-
className:
|
|
1175
|
+
className: ct.hueSlider
|
|
1166
1176
|
}),
|
|
1167
1177
|
c && /* @__PURE__ */ V("input", {
|
|
1168
1178
|
type: "range",
|
|
@@ -1170,19 +1180,19 @@ function mt({ hue: e, sat: t, val: n, alpha: r, onHueChange: i, onSVChange: a, o
|
|
|
1170
1180
|
max: 100,
|
|
1171
1181
|
value: r,
|
|
1172
1182
|
onChange: (e) => o(Number(e.target.value)),
|
|
1173
|
-
className:
|
|
1183
|
+
className: ct.alphaSlider,
|
|
1174
1184
|
style: { "--alpha-color": m }
|
|
1175
1185
|
}),
|
|
1176
|
-
s && /* @__PURE__ */ V(
|
|
1186
|
+
s && /* @__PURE__ */ V(ht, {
|
|
1177
1187
|
hex: h,
|
|
1178
1188
|
onChange: p
|
|
1179
1189
|
})
|
|
1180
1190
|
]
|
|
1181
1191
|
});
|
|
1182
1192
|
}
|
|
1183
|
-
var
|
|
1184
|
-
function
|
|
1185
|
-
let [s, c] = d(!1), { hex6: l, alpha: p } =
|
|
1193
|
+
var _t = "#3b82f6";
|
|
1194
|
+
function vt({ className: e, value: t = _t, onChange: n, showInput: r = !1, showAlpha: i = !1, inline: a = !1, ...o }) {
|
|
1195
|
+
let [s, c] = d(!1), { hex6: l, alpha: p } = ut(lt(t) ? t : _t), m = pt(l), [h, g] = d({
|
|
1186
1196
|
h: m.h,
|
|
1187
1197
|
s: m.s,
|
|
1188
1198
|
v: m.v,
|
|
@@ -1190,9 +1200,9 @@ function gt({ className: e, value: t = ht, onChange: n, showInput: r = !1, showA
|
|
|
1190
1200
|
}), _ = u(h), [v, y] = d(t);
|
|
1191
1201
|
if (t !== v) {
|
|
1192
1202
|
y(t);
|
|
1193
|
-
let { hex6: e, alpha: n } =
|
|
1194
|
-
if (e !==
|
|
1195
|
-
let t =
|
|
1203
|
+
let { hex6: e, alpha: n } = ut(lt(t) ? t : _t);
|
|
1204
|
+
if (e !== mt(h.h, h.s, h.v) || n !== h.a) {
|
|
1205
|
+
let t = pt(e);
|
|
1196
1206
|
g({
|
|
1197
1207
|
h: t.h,
|
|
1198
1208
|
s: t.s,
|
|
@@ -1203,7 +1213,7 @@ function gt({ className: e, value: t = ht, onChange: n, showInput: r = !1, showA
|
|
|
1203
1213
|
}
|
|
1204
1214
|
let { h: b, s: x, v: S, a: C } = h;
|
|
1205
1215
|
function w(e, t, r, a) {
|
|
1206
|
-
n?.(
|
|
1216
|
+
n?.(dt(mt(e, t, r), a, i));
|
|
1207
1217
|
}
|
|
1208
1218
|
function T(e) {
|
|
1209
1219
|
_.current.h = e, g((t) => ({
|
|
@@ -1224,7 +1234,7 @@ function gt({ className: e, value: t = ht, onChange: n, showInput: r = !1, showA
|
|
|
1224
1234
|
a: e
|
|
1225
1235
|
})), w(_.current.h, _.current.s, _.current.v, e);
|
|
1226
1236
|
}
|
|
1227
|
-
let O =
|
|
1237
|
+
let O = mt(b, x, S), k = i ? ft(O, C) : O, A = dt(O, C, i), j = {
|
|
1228
1238
|
hue: b,
|
|
1229
1239
|
sat: x,
|
|
1230
1240
|
val: S,
|
|
@@ -1236,38 +1246,38 @@ function gt({ className: e, value: t = ht, onChange: n, showInput: r = !1, showA
|
|
|
1236
1246
|
};
|
|
1237
1247
|
return a ? /* @__PURE__ */ V("div", {
|
|
1238
1248
|
...o,
|
|
1239
|
-
className: f(
|
|
1240
|
-
children: /* @__PURE__ */ V(
|
|
1249
|
+
className: f(ct.colorPicker, e),
|
|
1250
|
+
children: /* @__PURE__ */ V(gt, {
|
|
1241
1251
|
...j,
|
|
1242
1252
|
showInput: r
|
|
1243
1253
|
})
|
|
1244
1254
|
}) : /* @__PURE__ */ H("div", {
|
|
1245
1255
|
...o,
|
|
1246
|
-
className: f(
|
|
1247
|
-
children: [/* @__PURE__ */ V(
|
|
1256
|
+
className: f(ct.colorPicker, e),
|
|
1257
|
+
children: [/* @__PURE__ */ V(it, {
|
|
1248
1258
|
isOpen: s,
|
|
1249
1259
|
onOpenChange: c,
|
|
1250
1260
|
dontCloseOnChildClick: !0,
|
|
1251
|
-
align:
|
|
1252
|
-
content: /* @__PURE__ */ V(
|
|
1253
|
-
children: /* @__PURE__ */ H(
|
|
1254
|
-
className:
|
|
1261
|
+
align: nt.Left,
|
|
1262
|
+
content: /* @__PURE__ */ V(gt, { ...j }),
|
|
1263
|
+
children: /* @__PURE__ */ H(Le, {
|
|
1264
|
+
className: ct.swatch,
|
|
1255
1265
|
children: [/* @__PURE__ */ V("div", {
|
|
1256
|
-
className:
|
|
1266
|
+
className: ct.swatchFill,
|
|
1257
1267
|
style: { background: k }
|
|
1258
1268
|
}), /* @__PURE__ */ V("span", {
|
|
1259
|
-
className:
|
|
1269
|
+
className: ct.swatchHex,
|
|
1260
1270
|
children: A
|
|
1261
1271
|
})]
|
|
1262
1272
|
})
|
|
1263
|
-
}), r && /* @__PURE__ */ V(
|
|
1273
|
+
}), r && /* @__PURE__ */ V(ht, {
|
|
1264
1274
|
hex: A,
|
|
1265
1275
|
onChange: (e) => n?.(e),
|
|
1266
1276
|
useInputComponent: !0
|
|
1267
1277
|
})]
|
|
1268
1278
|
});
|
|
1269
1279
|
}
|
|
1270
|
-
var
|
|
1280
|
+
var yt = {
|
|
1271
1281
|
modal: "modal_L-Fkd",
|
|
1272
1282
|
slideIn: "slideIn_RVIHR",
|
|
1273
1283
|
fadeIn: "fadeIn_XSuIE",
|
|
@@ -1282,26 +1292,26 @@ var _t = {
|
|
|
1282
1292
|
};
|
|
1283
1293
|
//#endregion
|
|
1284
1294
|
//#region package/common/modal/modal.tsx
|
|
1285
|
-
function
|
|
1295
|
+
function bt({ children: e = null, title: t = "", isOpen: n = !1, onClose: r = () => null, className: i = "", style: o, hideHeader: s = !1, classNames: c, styles: l }) {
|
|
1286
1296
|
let [u, m] = d(n), [h, g] = d(n);
|
|
1287
1297
|
return a(() => {
|
|
1288
1298
|
n ? (m(n), setTimeout(() => g(!0), 1)) : (g(!1), setTimeout(() => m(n), 300));
|
|
1289
|
-
}, [n]), u ? /* @__PURE__ */ V(
|
|
1290
|
-
className: f(
|
|
1299
|
+
}, [n]), u ? /* @__PURE__ */ V(Be, { children: /* @__PURE__ */ H("div", {
|
|
1300
|
+
className: f(yt.modalContainer, c?.container),
|
|
1291
1301
|
style: l?.container,
|
|
1292
1302
|
children: [/* @__PURE__ */ V("div", {
|
|
1293
|
-
className: f(
|
|
1303
|
+
className: f(yt.modalWrapper, h && yt.modalWrapperShown, c?.backdrop),
|
|
1294
1304
|
style: l?.backdrop,
|
|
1295
1305
|
onClick: r
|
|
1296
1306
|
}), h && /* @__PURE__ */ H("div", {
|
|
1297
|
-
className: f(
|
|
1307
|
+
className: f(yt.modal, h && yt.modalShown, i, c?.modal),
|
|
1298
1308
|
style: {
|
|
1299
1309
|
...o,
|
|
1300
1310
|
...l?.modal
|
|
1301
1311
|
},
|
|
1302
1312
|
onClick: (e) => e.stopPropagation(),
|
|
1303
1313
|
children: [!s && /* @__PURE__ */ H("div", {
|
|
1304
|
-
className: f(
|
|
1314
|
+
className: f(yt.modalHeader, c?.header),
|
|
1305
1315
|
style: l?.header,
|
|
1306
1316
|
children: [/* @__PURE__ */ V("div", {
|
|
1307
1317
|
className: c?.title,
|
|
@@ -1319,7 +1329,7 @@ function vt({ children: e = null, title: t = "", isOpen: n = !1, onClose: r = ()
|
|
|
1319
1329
|
}
|
|
1320
1330
|
//#endregion
|
|
1321
1331
|
//#region package/common/confirmModal/confirmModal.tsx
|
|
1322
|
-
function
|
|
1332
|
+
function xt({ children: e = null, className: t = "", onClose: n = () => {}, onConfirm: r = () => {}, title: i = "", content: a = null, isOpen: o = void 0, actionButtonsProps: s = {} }) {
|
|
1323
1333
|
let [c, l] = d(!1), [u, f] = d(!1);
|
|
1324
1334
|
function p(e = !1) {
|
|
1325
1335
|
l(!1), n(e);
|
|
@@ -1332,12 +1342,12 @@ function yt({ children: e = null, className: t = "", onClose: n = () => {}, onCo
|
|
|
1332
1342
|
f(!1);
|
|
1333
1343
|
}
|
|
1334
1344
|
}
|
|
1335
|
-
let h = /* @__PURE__ */ H(
|
|
1345
|
+
let h = /* @__PURE__ */ H(bt, {
|
|
1336
1346
|
title: i,
|
|
1337
1347
|
isOpen: o === void 0 ? c : o,
|
|
1338
1348
|
onClose: () => p(),
|
|
1339
1349
|
className: e ? void 0 : t,
|
|
1340
|
-
children: [a, /* @__PURE__ */ V(
|
|
1350
|
+
children: [a, /* @__PURE__ */ V(Pe, {
|
|
1341
1351
|
onClose: () => p(),
|
|
1342
1352
|
onSubmit: m,
|
|
1343
1353
|
submitLabel: "Confirm",
|
|
@@ -1353,7 +1363,7 @@ function yt({ children: e = null, className: t = "", onClose: n = () => {}, onCo
|
|
|
1353
1363
|
}), h]
|
|
1354
1364
|
}) : h;
|
|
1355
1365
|
}
|
|
1356
|
-
var
|
|
1366
|
+
var St = {
|
|
1357
1367
|
"datePickerMonth-item": "datePickerMonth-item_30WWy",
|
|
1358
1368
|
datePickerMonthItem: "datePickerMonth-item_30WWy",
|
|
1359
1369
|
"datePickerMonth-content": "datePickerMonth-content_9bbSs",
|
|
@@ -1372,7 +1382,7 @@ var bt = {
|
|
|
1372
1382
|
datePickerMonthDayDisabled: "datePickerMonth-day-disabled_4t0Ci",
|
|
1373
1383
|
"datePickerMonth-placeholder": "datePickerMonth-placeholder_gy1Yx",
|
|
1374
1384
|
datePickerMonthPlaceholder: "datePickerMonth-placeholder_gy1Yx"
|
|
1375
|
-
},
|
|
1385
|
+
}, Ct = [
|
|
1376
1386
|
"de_AT",
|
|
1377
1387
|
"de_CH",
|
|
1378
1388
|
"de_DE",
|
|
@@ -1380,10 +1390,10 @@ var bt = {
|
|
|
1380
1390
|
"en_GB",
|
|
1381
1391
|
"de",
|
|
1382
1392
|
"en"
|
|
1383
|
-
],
|
|
1384
|
-
let e = navigator.languages[0]?.replace("-", "_") ||
|
|
1385
|
-
return
|
|
1386
|
-
},
|
|
1393
|
+
], wt = "en_US", Tt = () => {
|
|
1394
|
+
let e = navigator.languages[0]?.replace("-", "_") || wt;
|
|
1395
|
+
return Ct.includes(e) ? e === "en_GB" || e === "en" ? "en_US" : e === "de" ? "de_DE" : e : wt;
|
|
1396
|
+
}, Et = (e) => {
|
|
1387
1397
|
switch (e) {
|
|
1388
1398
|
case "en_US":
|
|
1389
1399
|
case "en_GB": return "en";
|
|
@@ -1392,47 +1402,47 @@ var bt = {
|
|
|
1392
1402
|
case "de_AT": return "de";
|
|
1393
1403
|
default: return "de";
|
|
1394
1404
|
}
|
|
1395
|
-
},
|
|
1396
|
-
async function
|
|
1397
|
-
|
|
1405
|
+
}, Dt = Tt();
|
|
1406
|
+
async function Ot(e) {
|
|
1407
|
+
Dt = e;
|
|
1398
1408
|
}
|
|
1399
|
-
function
|
|
1400
|
-
return
|
|
1409
|
+
function kt(e = "_") {
|
|
1410
|
+
return Dt.replace("_", e);
|
|
1401
1411
|
}
|
|
1402
1412
|
//#endregion
|
|
1403
1413
|
//#region package/common/datePicker/dateFunctions.ts
|
|
1404
|
-
function
|
|
1414
|
+
function At(e, t) {
|
|
1405
1415
|
return new Date(t, e, 0).getDate();
|
|
1406
1416
|
}
|
|
1407
|
-
function
|
|
1417
|
+
function jt(e, t, n) {
|
|
1408
1418
|
return new Date(Date.UTC(n, t - 1, e));
|
|
1409
1419
|
}
|
|
1410
|
-
function
|
|
1420
|
+
function Mt(e, t, n, r, i = !1) {
|
|
1411
1421
|
return new Date(Date.UTC(t, n - 1, r)).toLocaleDateString(e, { month: i ? "short" : "long" });
|
|
1412
1422
|
}
|
|
1413
|
-
function
|
|
1414
|
-
return Array.from(Array(12).keys()).map((t) =>
|
|
1423
|
+
function Nt(e = kt("-")) {
|
|
1424
|
+
return Array.from(Array(12).keys()).map((t) => Mt(e, 2023, t + 1, 1));
|
|
1415
1425
|
}
|
|
1416
|
-
function
|
|
1426
|
+
function Pt(e, t = !0) {
|
|
1417
1427
|
let n = new Date(Date.UTC(2023, 3, 10)), r = [];
|
|
1418
1428
|
for (let i = 0; i < 7; i++) r.push(n.toLocaleDateString(e, { weekday: t ? "short" : "long" })), n.setDate(n.getDate() + 1);
|
|
1419
1429
|
return r;
|
|
1420
1430
|
}
|
|
1421
|
-
function
|
|
1431
|
+
function Ft(e, t) {
|
|
1422
1432
|
return new Date(Date.UTC(t, e - 1, 1)).getDay() || 7;
|
|
1423
1433
|
}
|
|
1424
|
-
function
|
|
1434
|
+
function It(e) {
|
|
1425
1435
|
return {
|
|
1426
1436
|
day: e.getDate(),
|
|
1427
1437
|
month: e.getMonth() + 1,
|
|
1428
1438
|
year: e.getFullYear()
|
|
1429
1439
|
};
|
|
1430
1440
|
}
|
|
1431
|
-
function
|
|
1441
|
+
function Lt(e) {
|
|
1432
1442
|
let t = e.getDate(), n = e.getMonth() + 1, r = e.getFullYear();
|
|
1433
1443
|
return `${t < 10 ? `0${t}` : t}.${n < 10 ? `0${n}` : n}.${r}`;
|
|
1434
1444
|
}
|
|
1435
|
-
function
|
|
1445
|
+
function Rt(e, t, n) {
|
|
1436
1446
|
let r = e, i = n;
|
|
1437
1447
|
return r[0] !== "_" && (r[0] > "3" ? (r = `0${r[0]}${t.substring(2)}`, i = {
|
|
1438
1448
|
start: 3,
|
|
@@ -1450,18 +1460,18 @@ function It(e, t, n) {
|
|
|
1450
1460
|
}
|
|
1451
1461
|
//#endregion
|
|
1452
1462
|
//#region package/common/datePicker/components/datePickerMonth/datePickerMonth.tsx
|
|
1453
|
-
function
|
|
1454
|
-
let { day: a, month: o, year: s } = r ?
|
|
1463
|
+
function zt(e, t, n, r, i) {
|
|
1464
|
+
let { day: a, month: o, year: s } = r ? It(r) : {
|
|
1455
1465
|
day: void 0,
|
|
1456
1466
|
month: void 0,
|
|
1457
1467
|
year: void 0
|
|
1458
|
-
}, { day: c, month: l, year: u } = i ?
|
|
1468
|
+
}, { day: c, month: l, year: u } = i ? It(i) : {
|
|
1459
1469
|
day: void 0,
|
|
1460
1470
|
month: void 0,
|
|
1461
1471
|
year: void 0
|
|
1462
|
-
}, d =
|
|
1472
|
+
}, d = jt(e, t, n), f = e === a && t === o && n === s, p = e === c && t === l && n === u, m = !1;
|
|
1463
1473
|
if (a !== void 0 && o !== void 0 && s !== void 0 && c !== void 0 && l !== void 0 && u !== void 0) {
|
|
1464
|
-
let e =
|
|
1474
|
+
let e = jt(a, o, s), t = jt(c, l, u);
|
|
1465
1475
|
m = d.getTime() >= e.getTime() && d.getTime() <= t.getTime();
|
|
1466
1476
|
}
|
|
1467
1477
|
return {
|
|
@@ -1470,54 +1480,54 @@ function Lt(e, t, n, r, i) {
|
|
|
1470
1480
|
isEndDate: p
|
|
1471
1481
|
};
|
|
1472
1482
|
}
|
|
1473
|
-
function
|
|
1474
|
-
let a =
|
|
1483
|
+
function Bt(e, t, n, r, i) {
|
|
1484
|
+
let a = jt(e, t, n);
|
|
1475
1485
|
if (r) {
|
|
1476
|
-
let { day: e, month: t, year: n } =
|
|
1477
|
-
if (a <
|
|
1486
|
+
let { day: e, month: t, year: n } = It(r);
|
|
1487
|
+
if (a < jt(e, t, n)) return !0;
|
|
1478
1488
|
}
|
|
1479
1489
|
if (i) {
|
|
1480
|
-
let { day: e, month: t, year: n } =
|
|
1481
|
-
if (a >
|
|
1490
|
+
let { day: e, month: t, year: n } = It(i);
|
|
1491
|
+
if (a > jt(e, t, n)) return !0;
|
|
1482
1492
|
}
|
|
1483
1493
|
return !1;
|
|
1484
1494
|
}
|
|
1485
|
-
function
|
|
1486
|
-
let { day: r, month: i, year: a } =
|
|
1495
|
+
function Vt(e, t, n) {
|
|
1496
|
+
let { day: r, month: i, year: a } = It(/* @__PURE__ */ new Date());
|
|
1487
1497
|
return e === r && t === i && n === a;
|
|
1488
1498
|
}
|
|
1489
|
-
function
|
|
1490
|
-
let c =
|
|
1499
|
+
function Ht({ 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 }) {
|
|
1500
|
+
let c = kt("-"), l = At(t, n), u = Ft(t, n);
|
|
1491
1501
|
return /* @__PURE__ */ V("div", {
|
|
1492
|
-
className: f(
|
|
1502
|
+
className: f(St.datePickerMonth, e),
|
|
1493
1503
|
children: /* @__PURE__ */ H("div", {
|
|
1494
|
-
className: f(
|
|
1504
|
+
className: f(St.datePickerMonthContent),
|
|
1495
1505
|
children: [
|
|
1496
|
-
|
|
1497
|
-
Array.from(Array(u - 1).keys()).map((e) => /* @__PURE__ */ V("div", { className: f(
|
|
1506
|
+
Pt(c).map((e, t) => /* @__PURE__ */ V("div", { children: e }, t)),
|
|
1507
|
+
Array.from(Array(u - 1).keys()).map((e) => /* @__PURE__ */ V("div", { className: f(St.datePickerMonthItem, St.datePickerMonthPlaceholder) }, e)),
|
|
1498
1508
|
Array.from(Array(l).keys()).map((e) => {
|
|
1499
|
-
let c = e + 1, l =
|
|
1500
|
-
return /* @__PURE__ */ V(
|
|
1501
|
-
onClick: () => u ? null : r(
|
|
1502
|
-
className: f(
|
|
1503
|
-
[
|
|
1504
|
-
[
|
|
1505
|
-
[
|
|
1506
|
-
[
|
|
1507
|
-
[
|
|
1509
|
+
let c = e + 1, l = zt(c, t, n, i, a), u = Bt(c, t, n, o, s), d = Vt(c, t, n);
|
|
1510
|
+
return /* @__PURE__ */ V(Le, {
|
|
1511
|
+
onClick: () => u ? null : r(jt(c, t, n)),
|
|
1512
|
+
className: f(St.datePickerMonthDay, St.datePickerMonthItem, {
|
|
1513
|
+
[St.datePickerMonthDaySelected]: l.isInRange,
|
|
1514
|
+
[St.datePickerMonthDaySelectedStart]: l.isStartDate,
|
|
1515
|
+
[St.datePickerMonthDaySelectedEnd]: l.isEndDate,
|
|
1516
|
+
[St.datePickerMonthDayDisabled]: u,
|
|
1517
|
+
[St.datePickerMonthDayToday]: d
|
|
1508
1518
|
}),
|
|
1509
1519
|
children: c
|
|
1510
1520
|
}, c);
|
|
1511
1521
|
}),
|
|
1512
1522
|
Array.from(Array(42 - (u + l - 1)).keys()).map((e) => /* @__PURE__ */ V("div", {
|
|
1513
|
-
className: f(
|
|
1523
|
+
className: f(St.datePickerMonthItem, St.datePickerMonthPlaceholder),
|
|
1514
1524
|
children: "\xA0"
|
|
1515
1525
|
}, e))
|
|
1516
1526
|
]
|
|
1517
1527
|
})
|
|
1518
1528
|
});
|
|
1519
1529
|
}
|
|
1520
|
-
var
|
|
1530
|
+
var Ut = {
|
|
1521
1531
|
infiniteBlock: "infiniteBlock_dFv-h",
|
|
1522
1532
|
"spinner-wrapper": "spinner-wrapper_hsgWz",
|
|
1523
1533
|
spinnerWrapper: "spinner-wrapper_hsgWz",
|
|
@@ -1525,7 +1535,7 @@ var Vt = {
|
|
|
1525
1535
|
};
|
|
1526
1536
|
//#endregion
|
|
1527
1537
|
//#region package/common/infiniteBlock/infiniteBlock.tsx
|
|
1528
|
-
function
|
|
1538
|
+
function Wt(e, t) {
|
|
1529
1539
|
let n = e;
|
|
1530
1540
|
for (; n.props.children !== null && typeof n.props.children == "object" && !Array.isArray(n.props.children);) n = n.props.children;
|
|
1531
1541
|
let r = n.props.children;
|
|
@@ -1538,11 +1548,11 @@ function Ht(e, t) {
|
|
|
1538
1548
|
}
|
|
1539
1549
|
return String(r).toLowerCase().startsWith(t);
|
|
1540
1550
|
}
|
|
1541
|
-
function
|
|
1551
|
+
function Gt(e, t, n) {
|
|
1542
1552
|
let r = e + t;
|
|
1543
1553
|
return r === n ? 0 : r < -1 ? n - 1 : r;
|
|
1544
1554
|
}
|
|
1545
|
-
function
|
|
1555
|
+
function Kt({ children: t, onScroll: n, className: r = "", isDataLoading: a = !1, setHighlightedIndex: o = () => null }) {
|
|
1546
1556
|
let s = u(null), c = u(!1), [l, p] = d(!1), m = u(-1), h = u(null), g = i(() => {
|
|
1547
1557
|
let e = s.current;
|
|
1548
1558
|
if (!e) return;
|
|
@@ -1556,12 +1566,12 @@ function Wt({ children: t, onScroll: n, className: r = "", isDataLoading: a = !1
|
|
|
1556
1566
|
let i = e.Children.toArray(t), a = m.current;
|
|
1557
1567
|
switch (n.key) {
|
|
1558
1568
|
case "ArrowDown":
|
|
1559
|
-
a =
|
|
1569
|
+
a = Gt(a, 1, i.length);
|
|
1560
1570
|
break;
|
|
1561
1571
|
case "ArrowUp":
|
|
1562
|
-
a =
|
|
1572
|
+
a = Gt(a, -1, i.length);
|
|
1563
1573
|
break;
|
|
1564
|
-
default: for (let e = 0; e < i.length; e++) if (
|
|
1574
|
+
default: for (let e = 0; e < i.length; e++) if (Wt(i[e], n.key)) {
|
|
1565
1575
|
if (a >= e && h.current === n.key) continue;
|
|
1566
1576
|
a = e;
|
|
1567
1577
|
break;
|
|
@@ -1577,17 +1587,17 @@ function Wt({ children: t, onScroll: n, className: r = "", isDataLoading: a = !1
|
|
|
1577
1587
|
}
|
|
1578
1588
|
}, [t, o]);
|
|
1579
1589
|
return /* @__PURE__ */ H("div", {
|
|
1580
|
-
className: f(
|
|
1590
|
+
className: f(Ut.infiniteBlock, r),
|
|
1581
1591
|
onScroll: g,
|
|
1582
1592
|
onKeyDown: _,
|
|
1583
1593
|
tabIndex: 0,
|
|
1584
1594
|
ref: s,
|
|
1585
1595
|
children: [a ? /* @__PURE__ */ V("div", {
|
|
1586
|
-
className:
|
|
1587
|
-
children: /* @__PURE__ */ V(
|
|
1596
|
+
className: Ut.spinnerWrapper,
|
|
1597
|
+
children: /* @__PURE__ */ V(Te, { className: Ut.spinner })
|
|
1588
1598
|
}) : t, l && /* @__PURE__ */ V("div", {
|
|
1589
|
-
className:
|
|
1590
|
-
children: /* @__PURE__ */ V(
|
|
1599
|
+
className: Ut.spinnerWrapper,
|
|
1600
|
+
children: /* @__PURE__ */ V(Te, { className: Ut.spinner })
|
|
1591
1601
|
})]
|
|
1592
1602
|
});
|
|
1593
1603
|
}
|
|
@@ -1661,7 +1671,7 @@ var Z = {
|
|
|
1661
1671
|
};
|
|
1662
1672
|
//#endregion
|
|
1663
1673
|
//#region package/common/dropdown/dropdown.tsx
|
|
1664
|
-
function
|
|
1674
|
+
function qt({ errorMessage: e = "", className: t = "", label: n = "", value: r = "", isValid: i = !0, tabIndex: o = 0, isRequired: s = !1, customProps: c = {}, isRow: l = !1, disabled: m = !1, onScroll: h = () => Promise.resolve(), isListOnTop: _ = !1, onClick: v, onChange: y, onFocus: b = null, onBlur: x = null, onMouseEnter: S = null, onMouseLeave: C = null, dropdownLabel: w, isDropdownListWider: T = !1, inputClassName: E = "", dropDownIconClassName: D = "", dropDownClassName: O = "", formValidator: k = null, labelClassName: A = "", dropDownInputClassName: j = "", items: M = [], useMatLabelStyle: N = !0, placeholder: P = "", plainStyle: F = !1, scrollToSelected: I = !1, reactRef: ee, ...te }) {
|
|
1665
1675
|
let [L, R] = d(!1), [ne, z] = d(!1), [, re] = d(0), B = u(k);
|
|
1666
1676
|
a(() => {
|
|
1667
1677
|
if (B.current = k, !B.current) return;
|
|
@@ -1679,11 +1689,11 @@ function Gt({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1679
1689
|
B.current && (B.current.touched = !0), R(!1), x?.(e);
|
|
1680
1690
|
}, W = () => k ? k.touched && k.hasError() : !i || !!e, ce = () => !!(s || k?.validators.find((e) => e.validatorId === "required")), le = (e) => {
|
|
1681
1691
|
k ? (k.set(e), y?.(k.value, c)) : y?.(e, c);
|
|
1682
|
-
},
|
|
1692
|
+
}, ue = w, de = k ? k.value : r, G = W();
|
|
1683
1693
|
M.forEach((e) => {
|
|
1684
|
-
e.key ===
|
|
1694
|
+
e.key === de && (ue = e.label);
|
|
1685
1695
|
});
|
|
1686
|
-
let
|
|
1696
|
+
let fe = ue || de, K = fe == null || typeof fe == "string" && fe.trim() === "";
|
|
1687
1697
|
return /* @__PURE__ */ H("div", {
|
|
1688
1698
|
...te,
|
|
1689
1699
|
className: f(t, Z.dropdownLabel, Z.dropdown, { [Z.dropdownLabelColumn]: !l }),
|
|
@@ -1693,7 +1703,7 @@ function Gt({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1693
1703
|
/* @__PURE__ */ V(ae, {
|
|
1694
1704
|
onChange: (e) => le((e || { key: "" }).key),
|
|
1695
1705
|
itemToString: (e) => e ? String(e.key) : "",
|
|
1696
|
-
selectedItem: M.find((e) => e.key ===
|
|
1706
|
+
selectedItem: M.find((e) => e.key === de) ?? null,
|
|
1697
1707
|
stateReducer: (e, t) => I && Object.prototype.hasOwnProperty.call(t, "isOpen") ? {
|
|
1698
1708
|
...t,
|
|
1699
1709
|
highlightedIndex: t.isOpen ? M.indexOf(e.selectedItem) : null
|
|
@@ -1717,7 +1727,7 @@ function Gt({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1717
1727
|
t().onClick?.(e), v?.(e);
|
|
1718
1728
|
},
|
|
1719
1729
|
ref: ee,
|
|
1720
|
-
children:
|
|
1730
|
+
children: K ? "\xA0" : fe
|
|
1721
1731
|
}),
|
|
1722
1732
|
/* @__PURE__ */ V("button", {
|
|
1723
1733
|
type: "button",
|
|
@@ -1733,7 +1743,7 @@ function Gt({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1733
1743
|
className: f(Z.dropdownInputButtonIconArrow, { [Z.dropdownInputButtonIconArrowOpen]: r })
|
|
1734
1744
|
})
|
|
1735
1745
|
}),
|
|
1736
|
-
!m && r ? /* @__PURE__ */ V(
|
|
1746
|
+
!m && r ? /* @__PURE__ */ V(Kt, {
|
|
1737
1747
|
onScroll: h,
|
|
1738
1748
|
className: f(Z.dropdownInputList, {
|
|
1739
1749
|
[Z.dropdownInputListOnTop]: _,
|
|
@@ -1758,20 +1768,20 @@ function Gt({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1758
1768
|
className: f(Z.dropdownFieldset, {
|
|
1759
1769
|
[Z.dropdownBorderPlain]: F,
|
|
1760
1770
|
[Z.dropdownBorderFocused]: L,
|
|
1761
|
-
[Z.dropdownBorderInvalid]:
|
|
1762
|
-
[Z.dropdownBorderError]:
|
|
1771
|
+
[Z.dropdownBorderInvalid]: G,
|
|
1772
|
+
[Z.dropdownBorderError]: G
|
|
1763
1773
|
}),
|
|
1764
1774
|
children: /* @__PURE__ */ V("legend", {
|
|
1765
|
-
className: f(Z.dropdownFieldsetLegend, { [Z.dropdownFieldsetLegendActive]: N && (L || !
|
|
1775
|
+
className: f(Z.dropdownFieldsetLegend, { [Z.dropdownFieldsetLegendActive]: N && (L || !K) }),
|
|
1766
1776
|
children: /* @__PURE__ */ V("span", { children: n })
|
|
1767
1777
|
})
|
|
1768
1778
|
}),
|
|
1769
1779
|
N && n && /* @__PURE__ */ V("div", {
|
|
1770
|
-
className: f(Z.dropdownMatLabel, { [Z.dropdownMatLabelFloating]: L || !
|
|
1780
|
+
className: f(Z.dropdownMatLabel, { [Z.dropdownMatLabelFloating]: L || !K }),
|
|
1771
1781
|
children: n
|
|
1772
1782
|
}),
|
|
1773
1783
|
N && P && /* @__PURE__ */ V("div", {
|
|
1774
|
-
className: f(Z.dropdownPlaceholder, L && !
|
|
1784
|
+
className: f(Z.dropdownPlaceholder, L && !ue && Z.dropdownPlaceholderShown),
|
|
1775
1785
|
children: P
|
|
1776
1786
|
})
|
|
1777
1787
|
]
|
|
@@ -1784,15 +1794,15 @@ function Gt({ errorMessage: e = "", className: t = "", label: n = "", value: r =
|
|
|
1784
1794
|
children: "*"
|
|
1785
1795
|
}) : null]
|
|
1786
1796
|
}),
|
|
1787
|
-
/* @__PURE__ */ V(
|
|
1797
|
+
/* @__PURE__ */ V(ot, {
|
|
1788
1798
|
variant: "error",
|
|
1789
1799
|
message: k ? k.getCurrentErrorMessage() : e || "",
|
|
1790
|
-
isVisible:
|
|
1800
|
+
isVisible: G && (L || ne)
|
|
1791
1801
|
})
|
|
1792
1802
|
]
|
|
1793
1803
|
});
|
|
1794
1804
|
}
|
|
1795
|
-
var
|
|
1805
|
+
var Jt = {
|
|
1796
1806
|
datePicker: "datePicker_ZohTp",
|
|
1797
1807
|
"datePicker-header": "datePicker-header_YmSWE",
|
|
1798
1808
|
datePickerHeader: "datePicker-header_YmSWE",
|
|
@@ -1809,23 +1819,23 @@ var Kt = {
|
|
|
1809
1819
|
};
|
|
1810
1820
|
//#endregion
|
|
1811
1821
|
//#region package/common/datePicker/datePicker.tsx
|
|
1812
|
-
function
|
|
1813
|
-
let T = () => r ? r.value : t, E = T() ?? /* @__PURE__ */ new Date(), [D, O] = d(E.getMonth() + 1), [k, A] = d(E.getFullYear()), [j, M] = d(!1), [N, P] = d(() => T() ?
|
|
1822
|
+
function Yt({ 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 }) {
|
|
1823
|
+
let T = () => r ? r.value : t, E = T() ?? /* @__PURE__ */ new Date(), [D, O] = d(E.getMonth() + 1), [k, A] = d(E.getFullYear()), [j, M] = d(!1), [N, P] = d(() => T() ? Lt(E) : ""), [F, I] = d(!1), [ee, te] = d(!1), [, L] = d(0), [R, ne] = d(t), z = u(r);
|
|
1814
1824
|
if (R !== t) {
|
|
1815
1825
|
ne(t);
|
|
1816
1826
|
let e = t ?? /* @__PURE__ */ new Date();
|
|
1817
|
-
O(e.getMonth() + 1), A(e.getFullYear()), P(t ?
|
|
1827
|
+
O(e.getMonth() + 1), A(e.getFullYear()), P(t ? Lt(t) : "");
|
|
1818
1828
|
}
|
|
1819
1829
|
a(() => {
|
|
1820
1830
|
if (z.current = r, !r) return;
|
|
1821
1831
|
let e = () => {
|
|
1822
1832
|
let e = r.value;
|
|
1823
|
-
e ? (O(e.getMonth() + 1), A(e.getFullYear()), P(
|
|
1833
|
+
e ? (O(e.getMonth() + 1), A(e.getFullYear()), P(Lt(e))) : P(""), L((e) => e + 1);
|
|
1824
1834
|
};
|
|
1825
1835
|
return r.registerOnUpdateListener(e), () => r.removeOnUpdateListener(e);
|
|
1826
1836
|
}, [r]);
|
|
1827
1837
|
let re = () => r ? r.touched && r.hasError() : !b || !!x, ie = () => !!(S || r?.validators.find((e) => e.validatorId === "required")), ae = (e) => {
|
|
1828
|
-
P(e ?
|
|
1838
|
+
P(e ? Lt(e) : ""), r && r.set(e), l(e);
|
|
1829
1839
|
}, U = (e) => {
|
|
1830
1840
|
ae(e), n(e), M(!1);
|
|
1831
1841
|
}, se = (e) => {
|
|
@@ -1835,13 +1845,13 @@ function qt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1835
1845
|
});
|
|
1836
1846
|
}, W = (e) => {
|
|
1837
1847
|
if (e.match(/\d{2}\.\d{2}\.\d{4}/gi)) {
|
|
1838
|
-
let [t, n, r] = e.split("."), i =
|
|
1848
|
+
let [t, n, r] = e.split("."), i = jt(Number(t), Number(n), Number(r));
|
|
1839
1849
|
if (i && i.toString() !== "Invalid Date" && (!m || i <= m) && (!p || i >= p)) return i;
|
|
1840
1850
|
}
|
|
1841
1851
|
return null;
|
|
1842
1852
|
}, ce = ({ previousState: e, nextState: t }) => {
|
|
1843
1853
|
if (!e || t.value === e.value) return t;
|
|
1844
|
-
let n =
|
|
1854
|
+
let n = Rt(t.value, e.value, t.selection ?? null), r = W(n.value);
|
|
1845
1855
|
return r && ae(r), n;
|
|
1846
1856
|
}, le = () => {
|
|
1847
1857
|
let e = 400, t = (/* @__PURE__ */ new Date()).getFullYear() - 200;
|
|
@@ -1849,61 +1859,61 @@ function qt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1849
1859
|
key: e + t,
|
|
1850
1860
|
label: e + t
|
|
1851
1861
|
}));
|
|
1852
|
-
},
|
|
1862
|
+
}, ue = T(), de = re(), G = /* @__PURE__ */ H(B, { children: [
|
|
1853
1863
|
o ? null : /* @__PURE__ */ H("div", {
|
|
1854
|
-
className:
|
|
1864
|
+
className: Jt.datePickerHeader,
|
|
1855
1865
|
children: [
|
|
1856
|
-
/* @__PURE__ */ V(
|
|
1866
|
+
/* @__PURE__ */ V(ze, {
|
|
1857
1867
|
icon: _,
|
|
1858
1868
|
onClick: () => se(-1)
|
|
1859
1869
|
}),
|
|
1860
1870
|
/* @__PURE__ */ V("div", {
|
|
1861
|
-
className:
|
|
1871
|
+
className: Jt.datePickerHeaderMonthAndYearContainer,
|
|
1862
1872
|
children: /* @__PURE__ */ H("div", {
|
|
1863
|
-
className:
|
|
1864
|
-
children: [/* @__PURE__ */ V(
|
|
1873
|
+
className: Jt.datePickerHeaderMonthAndYear,
|
|
1874
|
+
children: [/* @__PURE__ */ V(qt, {
|
|
1865
1875
|
plainStyle: !0,
|
|
1866
1876
|
scrollToSelected: !0,
|
|
1867
1877
|
onChange: (e) => O(e),
|
|
1868
|
-
className:
|
|
1869
|
-
value:
|
|
1870
|
-
items:
|
|
1878
|
+
className: Jt.datePickerHeaderMonth,
|
|
1879
|
+
value: Mt(kt("-"), k, D, 1),
|
|
1880
|
+
items: Nt().map((e, t) => ({
|
|
1871
1881
|
key: t + 1,
|
|
1872
1882
|
label: e
|
|
1873
1883
|
}))
|
|
1874
|
-
}), /* @__PURE__ */ V(
|
|
1884
|
+
}), /* @__PURE__ */ V(qt, {
|
|
1875
1885
|
plainStyle: !0,
|
|
1876
1886
|
scrollToSelected: !0,
|
|
1877
1887
|
useMatLabelStyle: !1,
|
|
1878
|
-
className:
|
|
1888
|
+
className: Jt.datePickerHeaderYear,
|
|
1879
1889
|
onChange: (e) => A(e),
|
|
1880
1890
|
value: k,
|
|
1881
1891
|
items: le()
|
|
1882
1892
|
})]
|
|
1883
1893
|
})
|
|
1884
1894
|
}),
|
|
1885
|
-
/* @__PURE__ */ V(
|
|
1895
|
+
/* @__PURE__ */ V(ze, {
|
|
1886
1896
|
icon: v,
|
|
1887
1897
|
onClick: () => se(1)
|
|
1888
1898
|
})
|
|
1889
1899
|
]
|
|
1890
1900
|
}),
|
|
1891
|
-
/* @__PURE__ */ V(
|
|
1892
|
-
className:
|
|
1901
|
+
/* @__PURE__ */ V(Ht, {
|
|
1902
|
+
className: Jt.datePickerMonth,
|
|
1893
1903
|
month: D,
|
|
1894
1904
|
year: k,
|
|
1895
1905
|
onSelect: U,
|
|
1896
|
-
selectionStart: C ??
|
|
1897
|
-
selectionEnd: w ??
|
|
1906
|
+
selectionStart: C ?? ue,
|
|
1907
|
+
selectionEnd: w ?? ue,
|
|
1898
1908
|
minDate: p,
|
|
1899
1909
|
maxDate: m
|
|
1900
1910
|
}),
|
|
1901
|
-
g && /* @__PURE__ */ V(
|
|
1911
|
+
g && /* @__PURE__ */ V(Ne, {
|
|
1902
1912
|
onClick: () => U(null),
|
|
1903
1913
|
children: "Clear"
|
|
1904
1914
|
}),
|
|
1905
1915
|
h
|
|
1906
|
-
] }),
|
|
1916
|
+
] }), fe = i ? null : /* @__PURE__ */ V(st, {
|
|
1907
1917
|
readOnly: s,
|
|
1908
1918
|
label: `${y}${ie() ? " *" : ""}`,
|
|
1909
1919
|
value: N,
|
|
@@ -1920,44 +1930,44 @@ function qt({ className: e = "", selected: t, onSelect: n = () => null, formVali
|
|
|
1920
1930
|
onFocus: () => I(!0),
|
|
1921
1931
|
onMouseEnter: () => te(!0),
|
|
1922
1932
|
onMouseLeave: () => te(!1),
|
|
1923
|
-
isValid: !
|
|
1924
|
-
}),
|
|
1933
|
+
isValid: !de
|
|
1934
|
+
}), K = c ? G : s ? /* @__PURE__ */ V(bt, {
|
|
1925
1935
|
hideHeader: !0,
|
|
1926
1936
|
isOpen: j,
|
|
1927
1937
|
onClose: () => M(!1),
|
|
1928
|
-
children:
|
|
1929
|
-
}) : /* @__PURE__ */ V(
|
|
1938
|
+
children: G
|
|
1939
|
+
}) : /* @__PURE__ */ V(it, {
|
|
1930
1940
|
isOpen: j,
|
|
1931
1941
|
onOpenChange: (e) => M(e),
|
|
1932
|
-
content:
|
|
1933
|
-
align:
|
|
1942
|
+
content: G,
|
|
1943
|
+
align: nt.Left,
|
|
1934
1944
|
dontCloseOnChildClick: !0,
|
|
1935
|
-
children:
|
|
1945
|
+
children: fe
|
|
1936
1946
|
});
|
|
1937
1947
|
return /* @__PURE__ */ H("div", {
|
|
1938
|
-
className: f(
|
|
1948
|
+
className: f(Jt.datePicker, e),
|
|
1939
1949
|
children: [
|
|
1940
|
-
(s || c) &&
|
|
1941
|
-
|
|
1942
|
-
/* @__PURE__ */ V(
|
|
1950
|
+
(s || c) && fe,
|
|
1951
|
+
K,
|
|
1952
|
+
/* @__PURE__ */ V(ot, {
|
|
1943
1953
|
variant: "error",
|
|
1944
1954
|
message: r ? r.getCurrentErrorMessage() : x || "",
|
|
1945
|
-
isVisible:
|
|
1955
|
+
isVisible: de && (F || ee)
|
|
1946
1956
|
})
|
|
1947
1957
|
]
|
|
1948
1958
|
});
|
|
1949
1959
|
}
|
|
1950
|
-
var
|
|
1960
|
+
var Xt = { emptyState: "emptyState_KXOIx" };
|
|
1951
1961
|
//#endregion
|
|
1952
1962
|
//#region package/common/emptyState/emptyState.tsx
|
|
1953
|
-
function
|
|
1963
|
+
function Zt({ className: e, icon: t, children: n, ...r }) {
|
|
1954
1964
|
return /* @__PURE__ */ H("div", {
|
|
1955
1965
|
...r,
|
|
1956
|
-
className: f(
|
|
1966
|
+
className: f(Xt.emptyState, e),
|
|
1957
1967
|
children: [t && /* @__PURE__ */ V(p, { icon: t }), /* @__PURE__ */ V("div", { children: n ?? "No entries available" })]
|
|
1958
1968
|
});
|
|
1959
1969
|
}
|
|
1960
|
-
var
|
|
1970
|
+
var Qt = {
|
|
1961
1971
|
fab: "fab_hyAAa",
|
|
1962
1972
|
"fab-content": "fab-content_IBiXm",
|
|
1963
1973
|
fabContent: "fab-content_IBiXm",
|
|
@@ -1965,25 +1975,25 @@ var Xt = {
|
|
|
1965
1975
|
fabContentContainer: "fab-content-container_FQD1x",
|
|
1966
1976
|
"fab-size-mini": "fab-size-mini_KP9BD",
|
|
1967
1977
|
fabSizeMini: "fab-size-mini_KP9BD"
|
|
1968
|
-
},
|
|
1978
|
+
}, $t = {
|
|
1969
1979
|
default: null,
|
|
1970
|
-
mini:
|
|
1980
|
+
mini: Qt.fabSizeMini
|
|
1971
1981
|
};
|
|
1972
|
-
function
|
|
1973
|
-
return /* @__PURE__ */ V(
|
|
1982
|
+
function en({ children: e = null, size: t = "default", className: n = "", styleType: r = Ee.Primary, onClick: i = () => {} }) {
|
|
1983
|
+
return /* @__PURE__ */ V(Ne, {
|
|
1974
1984
|
styleType: r,
|
|
1975
|
-
className: f(
|
|
1985
|
+
className: f(Qt.fab, $t[t], n),
|
|
1976
1986
|
onClick: i,
|
|
1977
1987
|
children: /* @__PURE__ */ V("div", {
|
|
1978
|
-
className:
|
|
1988
|
+
className: Qt.fabContentContainer,
|
|
1979
1989
|
children: /* @__PURE__ */ V("div", {
|
|
1980
|
-
className:
|
|
1990
|
+
className: Qt.fabContent,
|
|
1981
1991
|
children: e
|
|
1982
1992
|
})
|
|
1983
1993
|
})
|
|
1984
1994
|
});
|
|
1985
1995
|
}
|
|
1986
|
-
var
|
|
1996
|
+
var tn = {
|
|
1987
1997
|
fab: "fab_YI34X",
|
|
1988
1998
|
appear: "appear_DL0wm",
|
|
1989
1999
|
"fab-container": "fab-container_8uoYo",
|
|
@@ -2013,7 +2023,7 @@ var $t = {
|
|
|
2013
2023
|
};
|
|
2014
2024
|
//#endregion
|
|
2015
2025
|
//#region package/common/fab/fab.tsx
|
|
2016
|
-
function
|
|
2026
|
+
function nn({ children: e = null, size: t = "default", menuEntries: n = [], onMenuEntryClicked: r = () => {}, onClick: i = () => {}, closeMenuOnEntryClicked: a = !0, ...o }) {
|
|
2017
2027
|
let [s, c] = d(!1);
|
|
2018
2028
|
function l() {
|
|
2019
2029
|
n.length > 0 && c((e) => !e), i();
|
|
@@ -2023,44 +2033,44 @@ function en({ children: e = null, size: t = "default", menuEntries: n = [], onMe
|
|
|
2023
2033
|
}
|
|
2024
2034
|
return /* @__PURE__ */ H("div", {
|
|
2025
2035
|
...o,
|
|
2026
|
-
className:
|
|
2036
|
+
className: tn.fabContainer,
|
|
2027
2037
|
children: [
|
|
2028
2038
|
/* @__PURE__ */ V("div", {
|
|
2029
|
-
className: f(
|
|
2039
|
+
className: f(tn.fabMenuBackdrop, s && tn.fabMenuBackdropOpen),
|
|
2030
2040
|
onClick: (e) => {
|
|
2031
2041
|
e.stopPropagation(), c(!1);
|
|
2032
2042
|
}
|
|
2033
2043
|
}),
|
|
2034
2044
|
/* @__PURE__ */ V("div", {
|
|
2035
2045
|
onClick: (e) => e.stopPropagation(),
|
|
2036
|
-
children: /* @__PURE__ */ V(
|
|
2037
|
-
className:
|
|
2046
|
+
children: /* @__PURE__ */ V(en, {
|
|
2047
|
+
className: tn.fab,
|
|
2038
2048
|
size: t,
|
|
2039
2049
|
onClick: l,
|
|
2040
2050
|
children: /* @__PURE__ */ H("div", {
|
|
2041
|
-
className: f(
|
|
2051
|
+
className: f(tn.fabIcon, s && tn.fabIconMenuOpen),
|
|
2042
2052
|
children: [/* @__PURE__ */ V("div", {
|
|
2043
|
-
className: f(
|
|
2053
|
+
className: f(tn.fabIconContent, !s && tn.fabIconContentShown),
|
|
2044
2054
|
children: e
|
|
2045
2055
|
}), /* @__PURE__ */ V("div", {
|
|
2046
|
-
className: f(
|
|
2056
|
+
className: f(tn.fabIconContent, s && tn.fabIconContentShown),
|
|
2047
2057
|
children: /* @__PURE__ */ V(p, { icon: I })
|
|
2048
2058
|
})]
|
|
2049
2059
|
})
|
|
2050
2060
|
})
|
|
2051
2061
|
}),
|
|
2052
2062
|
/* @__PURE__ */ V("div", {
|
|
2053
|
-
className:
|
|
2063
|
+
className: tn.fabMenu,
|
|
2054
2064
|
children: n.map(({ id: e, label: t, icon: n }) => /* @__PURE__ */ H("div", {
|
|
2055
|
-
className: f(
|
|
2065
|
+
className: f(tn.fabMenuEntry, s && tn.fabMenuEntryShown),
|
|
2056
2066
|
onClick: (t) => u(t, e),
|
|
2057
2067
|
children: [t && /* @__PURE__ */ V("div", {
|
|
2058
|
-
className:
|
|
2068
|
+
className: tn.fabMenuEntryLabelContainer,
|
|
2059
2069
|
children: /* @__PURE__ */ V("div", {
|
|
2060
|
-
className:
|
|
2070
|
+
className: tn.fabMenuEntryLabel,
|
|
2061
2071
|
children: t
|
|
2062
2072
|
})
|
|
2063
|
-
}), /* @__PURE__ */ V(
|
|
2073
|
+
}), /* @__PURE__ */ V(en, {
|
|
2064
2074
|
size: "mini",
|
|
2065
2075
|
children: /* @__PURE__ */ V(p, { icon: n })
|
|
2066
2076
|
})]
|
|
@@ -2069,7 +2079,7 @@ function en({ children: e = null, size: t = "default", menuEntries: n = [], onMe
|
|
|
2069
2079
|
]
|
|
2070
2080
|
});
|
|
2071
2081
|
}
|
|
2072
|
-
var
|
|
2082
|
+
var rn = {
|
|
2073
2083
|
iconPicker: "iconPicker_xJJmG",
|
|
2074
2084
|
"iconPicker-label": "iconPicker-label_VEB2X",
|
|
2075
2085
|
iconPickerLabel: "iconPicker-label_VEB2X",
|
|
@@ -2084,19 +2094,19 @@ var tn = {
|
|
|
2084
2094
|
};
|
|
2085
2095
|
//#endregion
|
|
2086
2096
|
//#region package/common/iconPicker/iconPicker.tsx
|
|
2087
|
-
function
|
|
2097
|
+
function an(e) {
|
|
2088
2098
|
let { formValidator: t } = e;
|
|
2089
2099
|
return t ? t.touched && t.hasError() : !1;
|
|
2090
2100
|
}
|
|
2091
|
-
function
|
|
2101
|
+
function on(e) {
|
|
2092
2102
|
let { isRequired: t, formValidator: n } = e;
|
|
2093
2103
|
return !!(t || n?.validators.find((e) => e.validatorId === "required"));
|
|
2094
2104
|
}
|
|
2095
|
-
function
|
|
2096
|
-
let d = i ? i.value ?? null : t, m =
|
|
2105
|
+
function sn({ data: e = [], selectedId: t = null, label: n = "", onChange: r, formValidator: i = null, isRequired: a, className: o, style: s, classNames: c, styles: l, ...u }) {
|
|
2106
|
+
let d = i ? i.value ?? null : t, m = an({
|
|
2097
2107
|
formValidator: i,
|
|
2098
2108
|
isRequired: a
|
|
2099
|
-
}), h =
|
|
2109
|
+
}), h = on({
|
|
2100
2110
|
formValidator: i,
|
|
2101
2111
|
isRequired: a
|
|
2102
2112
|
});
|
|
@@ -2105,20 +2115,20 @@ function an({ data: e = [], selectedId: t = null, label: n = "", onChange: r, fo
|
|
|
2105
2115
|
}
|
|
2106
2116
|
return /* @__PURE__ */ H("div", {
|
|
2107
2117
|
...u,
|
|
2108
|
-
className: f(
|
|
2118
|
+
className: f(rn.iconPicker, { [rn.iconPickerError]: m }, c?.root, o),
|
|
2109
2119
|
style: {
|
|
2110
2120
|
...l?.root,
|
|
2111
2121
|
...s
|
|
2112
2122
|
},
|
|
2113
2123
|
children: [n && /* @__PURE__ */ H("div", {
|
|
2114
|
-
className: f(
|
|
2124
|
+
className: f(rn.iconPickerLabel, c?.label),
|
|
2115
2125
|
style: l?.label,
|
|
2116
2126
|
children: [n, h && " *"]
|
|
2117
2127
|
}), /* @__PURE__ */ V("div", {
|
|
2118
|
-
className: f(
|
|
2128
|
+
className: f(rn.iconPickerItemContainer, c?.itemContainer),
|
|
2119
2129
|
style: l?.itemContainer,
|
|
2120
2130
|
children: e.map(({ id: e, label: t, icon: n, customIcon: r }) => /* @__PURE__ */ H("div", {
|
|
2121
|
-
className: f(
|
|
2131
|
+
className: f(rn.iconPickerItem, { [rn.iconPickerItemSelected]: d === e }, c?.item),
|
|
2122
2132
|
style: l?.item,
|
|
2123
2133
|
title: t,
|
|
2124
2134
|
tabIndex: 0,
|
|
@@ -2130,7 +2140,7 @@ function an({ data: e = [], selectedId: t = null, label: n = "", onChange: r, fo
|
|
|
2130
2140
|
children: [
|
|
2131
2141
|
n && /* @__PURE__ */ V(p, { icon: n }),
|
|
2132
2142
|
r ?? null,
|
|
2133
|
-
/* @__PURE__ */ V(
|
|
2143
|
+
/* @__PURE__ */ V(Ae, {})
|
|
2134
2144
|
]
|
|
2135
2145
|
}, e))
|
|
2136
2146
|
})]
|
|
@@ -2138,14 +2148,14 @@ function an({ data: e = [], selectedId: t = null, label: n = "", onChange: r, fo
|
|
|
2138
2148
|
}
|
|
2139
2149
|
//#endregion
|
|
2140
2150
|
//#region package/common/idleManager/idleManager.tsx
|
|
2141
|
-
var
|
|
2151
|
+
var cn = [
|
|
2142
2152
|
"click",
|
|
2143
2153
|
"mousemove",
|
|
2144
2154
|
"keydown",
|
|
2145
2155
|
"scroll",
|
|
2146
2156
|
"touchstart"
|
|
2147
2157
|
];
|
|
2148
|
-
function
|
|
2158
|
+
function ln({ children: e = null, idleAfterSeconds: t = 600, renderCondition: n = !0 }) {
|
|
2149
2159
|
let [r, o] = d(!1), s = u(null), c = i(() => {
|
|
2150
2160
|
s.current !== null && clearTimeout(s.current), o(!1), s.current = setTimeout(() => {
|
|
2151
2161
|
o(!0);
|
|
@@ -2154,14 +2164,14 @@ function sn({ children: e = null, idleAfterSeconds: t = 600, renderCondition: n
|
|
|
2154
2164
|
return a(() => {
|
|
2155
2165
|
c();
|
|
2156
2166
|
}, [c]), a(() => {
|
|
2157
|
-
for (let e of
|
|
2167
|
+
for (let e of cn) document.addEventListener(e, c);
|
|
2158
2168
|
return () => {
|
|
2159
|
-
for (let e of
|
|
2169
|
+
for (let e of cn) document.removeEventListener(e, c);
|
|
2160
2170
|
s.current !== null && clearTimeout(s.current);
|
|
2161
2171
|
};
|
|
2162
2172
|
}, [c]), /* @__PURE__ */ V(B, { children: n && r && e });
|
|
2163
2173
|
}
|
|
2164
|
-
var
|
|
2174
|
+
var un = {
|
|
2165
2175
|
inputDropdown: "inputDropdown_UdYMa",
|
|
2166
2176
|
dropdown: "dropdown_-M5-x",
|
|
2167
2177
|
"dropdown-shown": "dropdown-shown_H2rFU",
|
|
@@ -2175,15 +2185,15 @@ var cn = {
|
|
|
2175
2185
|
};
|
|
2176
2186
|
//#endregion
|
|
2177
2187
|
//#region package/common/inputDropdown/inputDropdown.tsx
|
|
2178
|
-
function
|
|
2188
|
+
function dn(e, t) {
|
|
2179
2189
|
return t ? t.value ?? "" : e ?? "";
|
|
2180
2190
|
}
|
|
2181
|
-
function
|
|
2191
|
+
function fn(e, t) {
|
|
2182
2192
|
let n = t.find((t) => t.value === e);
|
|
2183
2193
|
return n ? n.label ?? n.value : e;
|
|
2184
2194
|
}
|
|
2185
|
-
function
|
|
2186
|
-
let g =
|
|
2195
|
+
function pn({ 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 }) {
|
|
2196
|
+
let g = dn(t, n), [_, v] = d(() => fn(g, r)), [y, b] = d(g), [x, S] = d(!1), [C, w] = d(null), T = u(null);
|
|
2187
2197
|
if (g !== y) {
|
|
2188
2198
|
b(g);
|
|
2189
2199
|
let e = r.find((e) => e.value === g);
|
|
@@ -2210,7 +2220,7 @@ function dn({ label: e = "", value: t = "", formValidator: n = null, items: r =
|
|
|
2210
2220
|
]);
|
|
2211
2221
|
return /* @__PURE__ */ H("div", {
|
|
2212
2222
|
...h,
|
|
2213
|
-
className: f(
|
|
2223
|
+
className: f(un.inputDropdown, s?.root, a),
|
|
2214
2224
|
style: {
|
|
2215
2225
|
...c?.root,
|
|
2216
2226
|
...o
|
|
@@ -2218,7 +2228,7 @@ function dn({ label: e = "", value: t = "", formValidator: n = null, items: r =
|
|
|
2218
2228
|
onFocus: D,
|
|
2219
2229
|
onBlur: O,
|
|
2220
2230
|
onKeyDown: A,
|
|
2221
|
-
children: [/* @__PURE__ */ V(
|
|
2231
|
+
children: [/* @__PURE__ */ V(st, {
|
|
2222
2232
|
label: e,
|
|
2223
2233
|
value: _,
|
|
2224
2234
|
onChange: (e) => {
|
|
@@ -2226,10 +2236,10 @@ function dn({ label: e = "", value: t = "", formValidator: n = null, items: r =
|
|
|
2226
2236
|
},
|
|
2227
2237
|
placeholder: m
|
|
2228
2238
|
}), /* @__PURE__ */ V("div", {
|
|
2229
|
-
className: f(
|
|
2239
|
+
className: f(un.dropdown, { [un.dropdownShown]: x }, s?.dropdown),
|
|
2230
2240
|
style: c?.dropdown,
|
|
2231
2241
|
children: x && E.map((e, t) => /* @__PURE__ */ V("div", {
|
|
2232
|
-
className: f(
|
|
2242
|
+
className: f(un.dropdownItem, C === t && un.dropdownItemHighlighted, s?.item),
|
|
2233
2243
|
style: c?.item,
|
|
2234
2244
|
onClick: () => k(e),
|
|
2235
2245
|
children: e.label ?? e.value
|
|
@@ -2237,7 +2247,7 @@ function dn({ label: e = "", value: t = "", formValidator: n = null, items: r =
|
|
|
2237
2247
|
})]
|
|
2238
2248
|
});
|
|
2239
2249
|
}
|
|
2240
|
-
var
|
|
2250
|
+
var mn = {
|
|
2241
2251
|
board: "board_6KRdw",
|
|
2242
2252
|
column: "column_NrNeF",
|
|
2243
2253
|
"column-empty": "column-empty_5KYsJ",
|
|
@@ -2255,15 +2265,15 @@ var fn = {
|
|
|
2255
2265
|
};
|
|
2256
2266
|
//#endregion
|
|
2257
2267
|
//#region package/common/kanbanBoard/KanbanItem.tsx
|
|
2258
|
-
function
|
|
2259
|
-
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } =
|
|
2268
|
+
function hn({ id: e, children: t }) {
|
|
2269
|
+
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } = K({ id: e });
|
|
2260
2270
|
return /* @__PURE__ */ V("div", {
|
|
2261
2271
|
ref: i,
|
|
2262
2272
|
style: {
|
|
2263
|
-
transform:
|
|
2273
|
+
transform: me.Transform.toString(a),
|
|
2264
2274
|
transition: o
|
|
2265
2275
|
},
|
|
2266
|
-
className: f(
|
|
2276
|
+
className: f(mn.item, s && mn.itemDragging),
|
|
2267
2277
|
...n,
|
|
2268
2278
|
...r,
|
|
2269
2279
|
children: t
|
|
@@ -2271,22 +2281,22 @@ function pn({ id: e, children: t }) {
|
|
|
2271
2281
|
}
|
|
2272
2282
|
//#endregion
|
|
2273
2283
|
//#region package/common/kanbanBoard/KanbanColumn.tsx
|
|
2274
|
-
function
|
|
2284
|
+
function gn({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a, classNames: o, styles: s }) {
|
|
2275
2285
|
let { setNodeRef: c, isOver: l } = le({ id: `column-${e}` });
|
|
2276
2286
|
return /* @__PURE__ */ H("div", {
|
|
2277
|
-
className: f(
|
|
2287
|
+
className: f(mn.column, l && mn.columnOver, n.length === 0 && mn.columnEmpty, a),
|
|
2278
2288
|
children: [/* @__PURE__ */ V("div", {
|
|
2279
|
-
className: f(
|
|
2289
|
+
className: f(mn.columnHeader, o?.header),
|
|
2280
2290
|
style: s?.header,
|
|
2281
2291
|
children: t
|
|
2282
|
-
}), /* @__PURE__ */ V(
|
|
2292
|
+
}), /* @__PURE__ */ V(G, {
|
|
2283
2293
|
items: n,
|
|
2284
|
-
strategy:
|
|
2294
|
+
strategy: pe,
|
|
2285
2295
|
children: /* @__PURE__ */ V("div", {
|
|
2286
2296
|
ref: c,
|
|
2287
|
-
className: f(
|
|
2297
|
+
className: f(mn.columnItems, o?.items),
|
|
2288
2298
|
style: s?.items,
|
|
2289
|
-
children: n.map((e) => /* @__PURE__ */ V(
|
|
2299
|
+
children: n.map((e) => /* @__PURE__ */ V(hn, {
|
|
2290
2300
|
id: e,
|
|
2291
2301
|
children: r[e] === void 0 ? null : i(r[e], e)
|
|
2292
2302
|
}, e))
|
|
@@ -2296,8 +2306,8 @@ function mn({ id: e, title: t, itemIds: n, items: r, renderItem: i, className: a
|
|
|
2296
2306
|
}
|
|
2297
2307
|
//#endregion
|
|
2298
2308
|
//#region package/common/kanbanBoard/KanbanBoard.tsx
|
|
2299
|
-
function
|
|
2300
|
-
let [c, l] = d(null), [u, p] = d(null), m = ue(
|
|
2309
|
+
function _n({ columns: e, items: t, renderItem: n, onChange: r, className: i, style: a, classNames: o, styles: s }) {
|
|
2310
|
+
let [c, l] = d(null), [u, p] = d(null), m = de(ue(W, { activationConstraint: { distance: 8 } })), h = u ?? e;
|
|
2301
2311
|
function g(e, t) {
|
|
2302
2312
|
return e.findIndex((e) => e.itemIds.includes(t));
|
|
2303
2313
|
}
|
|
@@ -2329,7 +2339,7 @@ function hn({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2329
2339
|
let e = n[a], t = e.itemIds.indexOf(r), o = e.itemIds.indexOf(i);
|
|
2330
2340
|
t !== -1 && o !== -1 && t !== o && (n[a] = {
|
|
2331
2341
|
...e,
|
|
2332
|
-
itemIds:
|
|
2342
|
+
itemIds: fe(e.itemIds, t, o)
|
|
2333
2343
|
});
|
|
2334
2344
|
} else {
|
|
2335
2345
|
n[a].itemIds = n[a].itemIds.filter((e) => e !== r);
|
|
@@ -2353,9 +2363,9 @@ function hn({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2353
2363
|
onDragOver: v,
|
|
2354
2364
|
onDragEnd: y,
|
|
2355
2365
|
children: [/* @__PURE__ */ V("div", {
|
|
2356
|
-
className: f(
|
|
2366
|
+
className: f(mn.board, i),
|
|
2357
2367
|
style: a,
|
|
2358
|
-
children: h.map((e) => /* @__PURE__ */ V(
|
|
2368
|
+
children: h.map((e) => /* @__PURE__ */ V(gn, {
|
|
2359
2369
|
id: e.id,
|
|
2360
2370
|
title: e.title,
|
|
2361
2371
|
itemIds: e.itemIds,
|
|
@@ -2363,13 +2373,13 @@ function hn({ columns: e, items: t, renderItem: n, onChange: r, className: i, st
|
|
|
2363
2373
|
renderItem: n
|
|
2364
2374
|
}, e.id))
|
|
2365
2375
|
}), /* @__PURE__ */ V(se, { children: c && t[c] !== void 0 ? /* @__PURE__ */ V("div", {
|
|
2366
|
-
className: f(
|
|
2376
|
+
className: f(mn.dragOverlay, o?.dragOverlay),
|
|
2367
2377
|
style: s?.dragOverlay,
|
|
2368
2378
|
children: n(t[c], c)
|
|
2369
2379
|
}) : null })]
|
|
2370
2380
|
});
|
|
2371
2381
|
}
|
|
2372
|
-
var
|
|
2382
|
+
var vn = {
|
|
2373
2383
|
iconLoading: "iconLoading_wovj4",
|
|
2374
2384
|
"spin-to-oblivion": "spin-to-oblivion_0tZtm",
|
|
2375
2385
|
spinToOblivion: "spin-to-oblivion_0tZtm",
|
|
@@ -2384,39 +2394,39 @@ var gn = {
|
|
|
2384
2394
|
};
|
|
2385
2395
|
//#endregion
|
|
2386
2396
|
//#region package/common/loading/iconLoading/iconLoading.tsx
|
|
2387
|
-
function
|
|
2397
|
+
function yn({ className: e = "" }) {
|
|
2388
2398
|
return /* @__PURE__ */ V("div", {
|
|
2389
|
-
className: f(
|
|
2399
|
+
className: f(vn.iconLoading, e),
|
|
2390
2400
|
children: /* @__PURE__ */ H("svg", {
|
|
2391
2401
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2392
2402
|
viewBox: "-8 -1 16 14",
|
|
2393
2403
|
children: [
|
|
2394
2404
|
/* @__PURE__ */ V("path", {
|
|
2395
|
-
className:
|
|
2405
|
+
className: vn.iconLoadingFirst,
|
|
2396
2406
|
d: "M 0 0 C 3 5 6 5 6 12",
|
|
2397
2407
|
strokeWidth: "1.7",
|
|
2398
2408
|
fill: "none"
|
|
2399
2409
|
}),
|
|
2400
2410
|
/* @__PURE__ */ V("path", {
|
|
2401
|
-
className:
|
|
2411
|
+
className: vn.iconLoadingFirst,
|
|
2402
2412
|
d: "M 0 0 C -3 5 -6 5 -6 12",
|
|
2403
2413
|
strokeWidth: "1.7",
|
|
2404
2414
|
fill: "none"
|
|
2405
2415
|
}),
|
|
2406
2416
|
/* @__PURE__ */ V("path", {
|
|
2407
|
-
className:
|
|
2417
|
+
className: vn.iconLoadingFirst,
|
|
2408
2418
|
d: "M 0 0 L 0 10",
|
|
2409
2419
|
strokeWidth: "1.7",
|
|
2410
2420
|
fill: "none"
|
|
2411
2421
|
}),
|
|
2412
2422
|
/* @__PURE__ */ V("path", {
|
|
2413
|
-
className:
|
|
2423
|
+
className: vn.iconLoadingSecond,
|
|
2414
2424
|
d: "M 0.1 10 C -3 10 -4 10 -6 12",
|
|
2415
2425
|
strokeWidth: "1.7",
|
|
2416
2426
|
fill: "none"
|
|
2417
2427
|
}),
|
|
2418
2428
|
/* @__PURE__ */ V("path", {
|
|
2419
|
-
className:
|
|
2429
|
+
className: vn.iconLoadingSecond,
|
|
2420
2430
|
d: "M -0.1 10 C 3 10 4 10 6 12",
|
|
2421
2431
|
strokeWidth: "1.7",
|
|
2422
2432
|
fill: "none"
|
|
@@ -2427,14 +2437,14 @@ function _n({ className: e = "" }) {
|
|
|
2427
2437
|
}
|
|
2428
2438
|
//#endregion
|
|
2429
2439
|
//#region package/common/loading/iconLoading/index.ts
|
|
2430
|
-
var
|
|
2440
|
+
var bn = yn, xn = {
|
|
2431
2441
|
numberInput: "numberInput_7p2O3",
|
|
2432
2442
|
arrows: "arrows_yjRlc",
|
|
2433
2443
|
arrowBtn: "arrowBtn_DbJoa"
|
|
2434
2444
|
};
|
|
2435
2445
|
//#endregion
|
|
2436
2446
|
//#region package/common/numberInput/numberInput.tsx
|
|
2437
|
-
function
|
|
2447
|
+
function Sn({ value: e, onChange: t, formValidator: n, label: r, error: i, className: a, allowNegative: o = !1, decimalSeparator: s, thousandSeparator: c, prefix: l, suffix: u, decimalScale: d, placeholder: m, sign: h, showArrows: _ = !1, step: v = 1, onKeyDown: b, ...x }) {
|
|
2438
2448
|
let S = n == null ? e : n.value, C = h != null && S != null ? Math.abs(Number(S)) : S, w = C == null ? "" : String(C);
|
|
2439
2449
|
function T(e) {
|
|
2440
2450
|
let r = e;
|
|
@@ -2456,16 +2466,16 @@ function bn({ value: e, onChange: t, formValidator: n, label: r, error: i, class
|
|
|
2456
2466
|
b?.(e);
|
|
2457
2467
|
}
|
|
2458
2468
|
let O = h === "-" ? "-" : h === "+" ? "+" : l, k = _ ? /* @__PURE__ */ H("div", {
|
|
2459
|
-
className:
|
|
2460
|
-
children: [/* @__PURE__ */ V(
|
|
2461
|
-
className:
|
|
2469
|
+
className: xn.arrows,
|
|
2470
|
+
children: [/* @__PURE__ */ V(Le, {
|
|
2471
|
+
className: xn.arrowBtn,
|
|
2462
2472
|
tabIndex: -1,
|
|
2463
2473
|
onMouseDown: (e) => {
|
|
2464
2474
|
e.preventDefault(), E(e.shiftKey ? v * 10 : v);
|
|
2465
2475
|
},
|
|
2466
2476
|
children: /* @__PURE__ */ V(p, { icon: y })
|
|
2467
|
-
}), /* @__PURE__ */ V(
|
|
2468
|
-
className:
|
|
2477
|
+
}), /* @__PURE__ */ V(Le, {
|
|
2478
|
+
className: xn.arrowBtn,
|
|
2469
2479
|
tabIndex: -1,
|
|
2470
2480
|
onMouseDown: (e) => {
|
|
2471
2481
|
e.preventDefault(), E(e.shiftKey ? -v * 10 : -v);
|
|
@@ -2473,9 +2483,9 @@ function bn({ value: e, onChange: t, formValidator: n, label: r, error: i, class
|
|
|
2473
2483
|
children: /* @__PURE__ */ V(p, { icon: g })
|
|
2474
2484
|
})]
|
|
2475
2485
|
}) : null;
|
|
2476
|
-
return /* @__PURE__ */ V(
|
|
2486
|
+
return /* @__PURE__ */ V(st, {
|
|
2477
2487
|
label: r,
|
|
2478
|
-
className: f(
|
|
2488
|
+
className: f(xn.numberInput, a),
|
|
2479
2489
|
value: w,
|
|
2480
2490
|
onChange: () => {},
|
|
2481
2491
|
formValidator: null,
|
|
@@ -2483,7 +2493,7 @@ function bn({ value: e, onChange: t, formValidator: n, label: r, error: i, class
|
|
|
2483
2493
|
errorMessage: n ? n.getCurrentErrorMessage() ?? "" : i ?? "",
|
|
2484
2494
|
placeholder: m,
|
|
2485
2495
|
suffix: k,
|
|
2486
|
-
customInput: /* @__PURE__ */ V(
|
|
2496
|
+
customInput: /* @__PURE__ */ V(he, {
|
|
2487
2497
|
onValueChange: (e) => T(e.floatValue),
|
|
2488
2498
|
allowNegative: h == null ? o : !1,
|
|
2489
2499
|
decimalSeparator: s,
|
|
@@ -2499,7 +2509,7 @@ function bn({ value: e, onChange: t, formValidator: n, label: r, error: i, class
|
|
|
2499
2509
|
}
|
|
2500
2510
|
//#endregion
|
|
2501
2511
|
//#region package/common/numberInput/index.ts
|
|
2502
|
-
var
|
|
2512
|
+
var Cn = Sn, wn = {
|
|
2503
2513
|
optionPicker: "optionPicker_Yx82s",
|
|
2504
2514
|
"optionPicker-chip": "optionPicker-chip_ywtvr",
|
|
2505
2515
|
optionPickerChip: "optionPicker-chip_ywtvr",
|
|
@@ -2510,20 +2520,20 @@ var xn = bn, Sn = {
|
|
|
2510
2520
|
};
|
|
2511
2521
|
//#endregion
|
|
2512
2522
|
//#region package/common/optionPicker/optionPicker.tsx
|
|
2513
|
-
function
|
|
2523
|
+
function Tn({ className: e = void 0, options: t, onChange: n, value: r, ...i }) {
|
|
2514
2524
|
let a = t.findIndex((e) => e.key === r) * 100 / t.length;
|
|
2515
2525
|
return /* @__PURE__ */ H("div", {
|
|
2516
2526
|
...i,
|
|
2517
|
-
className: f(
|
|
2527
|
+
className: f(wn.optionPicker, e),
|
|
2518
2528
|
children: [/* @__PURE__ */ V("div", {
|
|
2519
|
-
className:
|
|
2529
|
+
className: wn.optionPickerChip,
|
|
2520
2530
|
style: {
|
|
2521
2531
|
left: `${a}%`,
|
|
2522
2532
|
width: `${100 / t.length}%`
|
|
2523
2533
|
}
|
|
2524
|
-
}), t.map((e) => /* @__PURE__ */ V(
|
|
2534
|
+
}), t.map((e) => /* @__PURE__ */ V(Le, {
|
|
2525
2535
|
onClick: (t) => n(e.key, t),
|
|
2526
|
-
className: f(
|
|
2536
|
+
className: f(wn.optionPickerOption, e.key === r && wn.optionPickerOptionActive),
|
|
2527
2537
|
tabIndex: e.key === r ? -1 : 0,
|
|
2528
2538
|
children: e.label
|
|
2529
2539
|
}, e.key))]
|
|
@@ -2531,25 +2541,25 @@ function Cn({ className: e = void 0, options: t, onChange: n, value: r, ...i })
|
|
|
2531
2541
|
}
|
|
2532
2542
|
//#endregion
|
|
2533
2543
|
//#region package/hooks/useWindowSize.ts
|
|
2534
|
-
var
|
|
2535
|
-
function
|
|
2544
|
+
var En = 768;
|
|
2545
|
+
function Dn() {
|
|
2536
2546
|
let [e, t] = d(() => ({
|
|
2537
2547
|
width: window.innerWidth,
|
|
2538
2548
|
height: window.innerHeight,
|
|
2539
|
-
isMobileSize: window.innerWidth <
|
|
2549
|
+
isMobileSize: window.innerWidth < En
|
|
2540
2550
|
}));
|
|
2541
2551
|
return a(() => {
|
|
2542
2552
|
function e() {
|
|
2543
2553
|
t({
|
|
2544
2554
|
width: window.innerWidth,
|
|
2545
2555
|
height: window.innerHeight,
|
|
2546
|
-
isMobileSize: window.innerWidth <
|
|
2556
|
+
isMobileSize: window.innerWidth < En
|
|
2547
2557
|
});
|
|
2548
2558
|
}
|
|
2549
2559
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
2550
2560
|
}, []), e;
|
|
2551
2561
|
}
|
|
2552
|
-
var
|
|
2562
|
+
var On = {
|
|
2553
2563
|
overscroll: "overscroll_Ij750",
|
|
2554
2564
|
"overscroll-header": "overscroll-header_S6vYc",
|
|
2555
2565
|
overscrollHeader: "overscroll-header_S6vYc",
|
|
@@ -2560,8 +2570,8 @@ var En = {
|
|
|
2560
2570
|
};
|
|
2561
2571
|
//#endregion
|
|
2562
2572
|
//#region package/common/overscroll/overscroll.tsx
|
|
2563
|
-
function
|
|
2564
|
-
let { isMobileSize: h, height: g } =
|
|
2573
|
+
function kn({ 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 }) {
|
|
2574
|
+
let { isMobileSize: h, height: g } = Dn(), _ = u(null), v = u(null), y = u(null), b = u(!1), x = u(null), S = u(p);
|
|
2565
2575
|
S.current = p;
|
|
2566
2576
|
let C = i((e) => {
|
|
2567
2577
|
let t;
|
|
@@ -2619,15 +2629,15 @@ function Dn({ children: e = null, overscrollContent: t = null, overscrollContent
|
|
|
2619
2629
|
if (d && !h) return n ? /* @__PURE__ */ H("div", { children: [n, e] }) : /* @__PURE__ */ V(B, { children: e });
|
|
2620
2630
|
let k = l === "%" ? `${100 - o}%` : `calc(100% - ${o}px)`;
|
|
2621
2631
|
return /* @__PURE__ */ H("div", {
|
|
2622
|
-
className:
|
|
2632
|
+
className: On.overscroll,
|
|
2623
2633
|
ref: _,
|
|
2624
2634
|
onScroll: O,
|
|
2625
2635
|
children: [/* @__PURE__ */ V("div", {
|
|
2626
|
-
className:
|
|
2636
|
+
className: On.overscrollHeaderContainer,
|
|
2627
2637
|
style: { height: `${s}${l}` },
|
|
2628
2638
|
ref: y,
|
|
2629
2639
|
children: /* @__PURE__ */ V("div", {
|
|
2630
|
-
className: f(
|
|
2640
|
+
className: f(On.overscrollHeader, r && On.overscrollHeaderCentered),
|
|
2631
2641
|
ref: v,
|
|
2632
2642
|
children: t
|
|
2633
2643
|
})
|
|
@@ -2637,7 +2647,7 @@ function Dn({ children: e = null, overscrollContent: t = null, overscrollContent
|
|
|
2637
2647
|
})]
|
|
2638
2648
|
});
|
|
2639
2649
|
}
|
|
2640
|
-
var
|
|
2650
|
+
var An = {
|
|
2641
2651
|
progressBar: "progressBar_LO0sX",
|
|
2642
2652
|
"progressBar-fill": "progressBar-fill_rt32j",
|
|
2643
2653
|
progressBarFill: "progressBar-fill_rt32j",
|
|
@@ -2650,17 +2660,17 @@ var On = {
|
|
|
2650
2660
|
};
|
|
2651
2661
|
//#endregion
|
|
2652
2662
|
//#region package/common/progressBar/progressBar.tsx
|
|
2653
|
-
function
|
|
2663
|
+
function jn(e) {
|
|
2654
2664
|
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);
|
|
2655
2665
|
return (.299 * n + .587 * r + .114 * i) / 255 > .5 ? "#000000" : "#ffffff";
|
|
2656
2666
|
}
|
|
2657
|
-
function
|
|
2667
|
+
function Mn({ className: e = void 0, total: t = 100, progress: n = 0, style: r = void 0, ...i }) {
|
|
2658
2668
|
function a() {
|
|
2659
2669
|
let e = [];
|
|
2660
2670
|
return Array.isArray(n) ? e.push(...n) : typeof n == "object" ? e.push(n) : e.push({ amount: n }), e.map((n, i) => {
|
|
2661
2671
|
let a = t ? n.amount / t * 100 : 0;
|
|
2662
2672
|
return /* @__PURE__ */ V("div", {
|
|
2663
|
-
className: f(
|
|
2673
|
+
className: f(An.progressBarFill, i === e.length - 1 && An.progressBarFillEnd, n.class),
|
|
2664
2674
|
style: {
|
|
2665
2675
|
width: `${a}%`,
|
|
2666
2676
|
background: n.color || void 0,
|
|
@@ -2668,8 +2678,8 @@ function An({ className: e = void 0, total: t = 100, progress: n = 0, style: r =
|
|
|
2668
2678
|
},
|
|
2669
2679
|
title: n.label ? `${n.label}: ${n.amount}` : void 0,
|
|
2670
2680
|
children: n.label && /* @__PURE__ */ V("div", {
|
|
2671
|
-
className:
|
|
2672
|
-
style: n.color ? { color:
|
|
2681
|
+
className: An.progressBarLabel,
|
|
2682
|
+
style: n.color ? { color: jn(n.color) } : {},
|
|
2673
2683
|
children: n.label
|
|
2674
2684
|
})
|
|
2675
2685
|
}, i);
|
|
@@ -2677,21 +2687,21 @@ function An({ className: e = void 0, total: t = 100, progress: n = 0, style: r =
|
|
|
2677
2687
|
}
|
|
2678
2688
|
return /* @__PURE__ */ V("div", {
|
|
2679
2689
|
...i,
|
|
2680
|
-
className: f(
|
|
2690
|
+
className: f(An.progressBar, e),
|
|
2681
2691
|
style: r,
|
|
2682
2692
|
children: a()
|
|
2683
2693
|
});
|
|
2684
2694
|
}
|
|
2685
|
-
function
|
|
2695
|
+
function Nn(e) {
|
|
2686
2696
|
return Math.round(e / 5) * 5;
|
|
2687
2697
|
}
|
|
2688
|
-
function
|
|
2698
|
+
function Pn(e) {
|
|
2689
2699
|
return {
|
|
2690
|
-
x:
|
|
2691
|
-
y:
|
|
2700
|
+
x: Nn(e.x),
|
|
2701
|
+
y: Nn(e.y)
|
|
2692
2702
|
};
|
|
2693
2703
|
}
|
|
2694
|
-
function
|
|
2704
|
+
function Fn(e, t, n) {
|
|
2695
2705
|
let r = n.createSVGPoint();
|
|
2696
2706
|
r.x = e, r.y = t;
|
|
2697
2707
|
let i = n.getScreenCTM();
|
|
@@ -2700,18 +2710,18 @@ function Nn(e, t, n) {
|
|
|
2700
2710
|
y: 0
|
|
2701
2711
|
};
|
|
2702
2712
|
let a = r.matrixTransform(i.inverse());
|
|
2703
|
-
return
|
|
2713
|
+
return Pn({
|
|
2704
2714
|
x: a.x,
|
|
2705
2715
|
y: a.y
|
|
2706
2716
|
});
|
|
2707
2717
|
}
|
|
2708
|
-
function
|
|
2718
|
+
function In(e, t) {
|
|
2709
2719
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
2710
2720
|
}
|
|
2711
|
-
function
|
|
2721
|
+
function Ln(e, t, n) {
|
|
2712
2722
|
let r = n.x - t.x, i = n.y - t.y, a = r * r + i * i;
|
|
2713
2723
|
if (a === 0) return {
|
|
2714
|
-
dist:
|
|
2724
|
+
dist: In(e, t),
|
|
2715
2725
|
t: 0
|
|
2716
2726
|
};
|
|
2717
2727
|
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;
|
|
@@ -2720,12 +2730,12 @@ function Fn(e, t, n) {
|
|
|
2720
2730
|
t: o
|
|
2721
2731
|
};
|
|
2722
2732
|
}
|
|
2723
|
-
function
|
|
2733
|
+
function Rn(e, t) {
|
|
2724
2734
|
let n = null;
|
|
2725
2735
|
for (let r of t) {
|
|
2726
2736
|
let t = r.points;
|
|
2727
2737
|
for (let i = 0; i < t.length; i++) {
|
|
2728
|
-
let a = t[i], o = t[(i + 1) % t.length], { dist: s, t: c } =
|
|
2738
|
+
let a = t[i], o = t[(i + 1) % t.length], { dist: s, t: c } = Ln(e, a, o);
|
|
2729
2739
|
s <= 8 && (!n || s < n.dist) && (n = {
|
|
2730
2740
|
roomId: r.id,
|
|
2731
2741
|
wallIndex: i,
|
|
@@ -2736,7 +2746,7 @@ function In(e, t) {
|
|
|
2736
2746
|
}
|
|
2737
2747
|
return n;
|
|
2738
2748
|
}
|
|
2739
|
-
function
|
|
2749
|
+
function zn(e, t) {
|
|
2740
2750
|
let n = !1;
|
|
2741
2751
|
for (let r = 0, i = t.length - 1; r < t.length; i = r++) {
|
|
2742
2752
|
let a = t[r].x, o = t[r].y, s = t[i].x, c = t[i].y;
|
|
@@ -2744,13 +2754,13 @@ function Ln(e, t) {
|
|
|
2744
2754
|
}
|
|
2745
2755
|
return n;
|
|
2746
2756
|
}
|
|
2747
|
-
function
|
|
2757
|
+
function Bn(e) {
|
|
2748
2758
|
return {
|
|
2749
2759
|
x: e.reduce((e, t) => e + t.x, 0) / e.length,
|
|
2750
2760
|
y: e.reduce((e, t) => e + t.y, 0) / e.length
|
|
2751
2761
|
};
|
|
2752
2762
|
}
|
|
2753
|
-
function
|
|
2763
|
+
function Vn(e, t, n, r) {
|
|
2754
2764
|
return [
|
|
2755
2765
|
{
|
|
2756
2766
|
x: e,
|
|
@@ -2770,7 +2780,7 @@ function zn(e, t, n, r) {
|
|
|
2770
2780
|
}
|
|
2771
2781
|
];
|
|
2772
2782
|
}
|
|
2773
|
-
function
|
|
2783
|
+
function Hn(e, t, n, r) {
|
|
2774
2784
|
let i = t.x - e.x, a = t.y - e.y, o = Math.sqrt(i * i + a * a);
|
|
2775
2785
|
if (o < .001) return null;
|
|
2776
2786
|
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);
|
|
@@ -2789,13 +2799,13 @@ function Bn(e, t, n, r) {
|
|
|
2789
2799
|
}
|
|
2790
2800
|
};
|
|
2791
2801
|
}
|
|
2792
|
-
function
|
|
2802
|
+
function Un(e) {
|
|
2793
2803
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2794
2804
|
}
|
|
2795
|
-
function
|
|
2805
|
+
function Wn(e) {
|
|
2796
2806
|
return e.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(" ") + " Z";
|
|
2797
2807
|
}
|
|
2798
|
-
function
|
|
2808
|
+
function Gn(e, t) {
|
|
2799
2809
|
if (e.length < 2) return [];
|
|
2800
2810
|
if (t.length === 0) return [e.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(" ") + " Z"];
|
|
2801
2811
|
let n = e.length, r = [], i = [`M ${e[0].x.toFixed(2)},${e[0].y.toFixed(2)}`];
|
|
@@ -2818,8 +2828,8 @@ function Un(e, t) {
|
|
|
2818
2828
|
}
|
|
2819
2829
|
return r[0] = [...i, ...r[0].slice(1)], r.map((e) => e.join(" "));
|
|
2820
2830
|
}
|
|
2821
|
-
function
|
|
2822
|
-
let r =
|
|
2831
|
+
function Kn(e, t, n) {
|
|
2832
|
+
let r = Hn(e, t, n.t, n.width);
|
|
2823
2833
|
if (!r) return "";
|
|
2824
2834
|
let { p1: i, p2: a, perp: o } = r, s = {
|
|
2825
2835
|
x: i.x + o.x * n.width,
|
|
@@ -2827,7 +2837,7 @@ function Wn(e, t, n) {
|
|
|
2827
2837
|
};
|
|
2828
2838
|
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(" ");
|
|
2829
2839
|
}
|
|
2830
|
-
function
|
|
2840
|
+
function qn(e, t) {
|
|
2831
2841
|
let n = Infinity, r = Infinity, i = -Infinity, a = -Infinity;
|
|
2832
2842
|
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);
|
|
2833
2843
|
isFinite(n) || (n = 0, r = 0, i = 400, a = 300);
|
|
@@ -2837,10 +2847,10 @@ function Gn(e, t) {
|
|
|
2837
2847
|
(i - n + 10).toFixed(2),
|
|
2838
2848
|
(a - r + 10).toFixed(2)
|
|
2839
2849
|
].join(" "), s = e.map((e) => {
|
|
2840
|
-
let n = t.filter((t) => t.roomId === e.id), r =
|
|
2841
|
-
let n = e.points[t.wallIndex], r = e.points[(t.wallIndex + 1) % e.points.length], i =
|
|
2850
|
+
let n = t.filter((t) => t.roomId === e.id), r = Gn(e.points, n), i = Wn(e.points), a = Bn(e.points), o = r.map((e) => ` <path d="${e}" />`).join("\n"), s = n.map((t) => {
|
|
2851
|
+
let n = e.points[t.wallIndex], r = e.points[(t.wallIndex + 1) % e.points.length], i = Kn(n, r, t);
|
|
2842
2852
|
return i ? ` <path d="${i}" fill="none" />` : "";
|
|
2843
|
-
}).filter(Boolean).join("\n"), c = e.name ? ` <text fontSize="5" x="${a.x.toFixed(1)}" y="${a.y.toFixed(1)}">${
|
|
2853
|
+
}).filter(Boolean).join("\n"), c = e.name ? ` <text fontSize="5" x="${a.x.toFixed(1)}" y="${a.y.toFixed(1)}">${Un(e.name)}</text>` : "";
|
|
2844
2854
|
return [
|
|
2845
2855
|
` <g id="${e.id}">`,
|
|
2846
2856
|
o,
|
|
@@ -2859,7 +2869,7 @@ function Gn(e, t) {
|
|
|
2859
2869
|
"</svg>"
|
|
2860
2870
|
].join("\n");
|
|
2861
2871
|
}
|
|
2862
|
-
function
|
|
2872
|
+
function Jn(e) {
|
|
2863
2873
|
let t = [];
|
|
2864
2874
|
for (let n of e.matchAll(/[ML]\s*([-\d.]+)[,\s]+([-\d.]+)/gi)) t.push({
|
|
2865
2875
|
x: parseFloat(n[1]),
|
|
@@ -2867,14 +2877,14 @@ function Kn(e) {
|
|
|
2867
2877
|
});
|
|
2868
2878
|
return t;
|
|
2869
2879
|
}
|
|
2870
|
-
function
|
|
2880
|
+
function Yn(e) {
|
|
2871
2881
|
let t = new DOMParser().parseFromString(e, "image/svg+xml"), n = [];
|
|
2872
2882
|
return t.querySelectorAll("[id^=\"room\"]").forEach((e) => {
|
|
2873
2883
|
let t = e.querySelector("[id=\"background\"]");
|
|
2874
2884
|
if (!t) return;
|
|
2875
2885
|
let r = t.getAttribute("d");
|
|
2876
2886
|
if (!r) return;
|
|
2877
|
-
let i =
|
|
2887
|
+
let i = Jn(r);
|
|
2878
2888
|
if (i.length < 3) return;
|
|
2879
2889
|
let a = e.querySelector("text")?.textContent?.trim() ?? "";
|
|
2880
2890
|
n.push({
|
|
@@ -2884,8 +2894,8 @@ function qn(e) {
|
|
|
2884
2894
|
});
|
|
2885
2895
|
}), n;
|
|
2886
2896
|
}
|
|
2887
|
-
function
|
|
2888
|
-
let n =
|
|
2897
|
+
function Xn(e, t) {
|
|
2898
|
+
let n = qn(e, t), r = new Blob([n], { type: "image/svg+xml" }), i = URL.createObjectURL(r), a = document.createElement("a");
|
|
2889
2899
|
a.href = i, a.download = "room-plan.svg", a.click(), URL.revokeObjectURL(i);
|
|
2890
2900
|
}
|
|
2891
2901
|
var Q = {
|
|
@@ -2960,16 +2970,16 @@ var Q = {
|
|
|
2960
2970
|
polyCloseTarget: "polyCloseTarget_snjYx",
|
|
2961
2971
|
polyVertex: "polyVertex_fw0nX",
|
|
2962
2972
|
vertexHandle: "vertexHandle_-z7g5"
|
|
2963
|
-
},
|
|
2964
|
-
function
|
|
2965
|
-
return
|
|
2973
|
+
}, Zn = 6, Qn = 5, $n = 1.25, er = .25, tr = 12, nr = 0;
|
|
2974
|
+
function rr(e) {
|
|
2975
|
+
return nr += 1, `${e}${nr}`;
|
|
2966
2976
|
}
|
|
2967
|
-
var
|
|
2977
|
+
var ir = {
|
|
2968
2978
|
select: "Drag inside to move · Drag corner to reshape · Click wall to add corner · Dbl-click corner to remove · Delete to erase",
|
|
2969
2979
|
rect: "Drag to draw a rectangular room",
|
|
2970
2980
|
polygon: "Click to place corners · Click first point or Enter to close · Esc to cancel"
|
|
2971
2981
|
};
|
|
2972
|
-
function
|
|
2982
|
+
function ar({ className: e }) {
|
|
2973
2983
|
let [t, n] = d([]), [r, i] = d([]), [o, c] = d("rect"), [l, m] = d(null), [g, _] = d(null), [v, y] = d(null), [b, x] = d(null), [S, E] = d([]), [D, O] = d(null), [k, j] = d(1), [P, F] = d({
|
|
2974
2984
|
x: 0,
|
|
2975
2985
|
y: 0
|
|
@@ -2997,7 +3007,7 @@ function rr({ className: e }) {
|
|
|
2997
3007
|
});
|
|
2998
3008
|
function ae(e) {
|
|
2999
3009
|
e.length < 3 || (n((t) => [...t, {
|
|
3000
|
-
id:
|
|
3010
|
+
id: rr("room"),
|
|
3001
3011
|
name: `Room ${t.length + 1}`,
|
|
3002
3012
|
points: e
|
|
3003
3013
|
}]), E([]), O(null));
|
|
@@ -3007,9 +3017,9 @@ function rr({ className: e }) {
|
|
|
3007
3017
|
if (!e) return;
|
|
3008
3018
|
function t(e) {
|
|
3009
3019
|
e.preventDefault();
|
|
3010
|
-
let { zoom: t, pan: n } = ie.current, r =
|
|
3020
|
+
let { zoom: t, pan: n } = ie.current, r = Fn(e.clientX, e.clientY, z.current);
|
|
3011
3021
|
if (!r) return;
|
|
3012
|
-
let i = e.deltaY < 0 ?
|
|
3022
|
+
let i = e.deltaY < 0 ? $n : 1 / $n, a = Math.max(er, Math.min(tr, t * i));
|
|
3013
3023
|
F({
|
|
3014
3024
|
x: r.x - (r.x - n.x) * (t / a),
|
|
3015
3025
|
y: r.y - (r.y - n.y) * (t / a)
|
|
@@ -3032,7 +3042,7 @@ function rr({ className: e }) {
|
|
|
3032
3042
|
return;
|
|
3033
3043
|
}
|
|
3034
3044
|
if ((e.key === "+" || e.key === "=") && !(e.target instanceof HTMLInputElement)) {
|
|
3035
|
-
let e = Math.max(
|
|
3045
|
+
let e = Math.max(er, Math.min(tr, s * $n)), t = c.x + 400 / s / 2, n = c.y + 300 / s / 2;
|
|
3036
3046
|
j(e), F({
|
|
3037
3047
|
x: t - 400 / e / 2,
|
|
3038
3048
|
y: n - 300 / e / 2
|
|
@@ -3040,7 +3050,7 @@ function rr({ className: e }) {
|
|
|
3040
3050
|
return;
|
|
3041
3051
|
}
|
|
3042
3052
|
if (e.key === "-" && !(e.target instanceof HTMLInputElement)) {
|
|
3043
|
-
let e = Math.max(
|
|
3053
|
+
let e = Math.max(er, Math.min(tr, s / $n)), t = c.x + 400 / s / 2, n = c.y + 300 / s / 2;
|
|
3044
3054
|
j(e), F({
|
|
3045
3055
|
x: t - 400 / e / 2,
|
|
3046
3056
|
y: n - 300 / e / 2
|
|
@@ -3059,20 +3069,20 @@ function rr({ className: e }) {
|
|
|
3059
3069
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
3060
3070
|
}, []);
|
|
3061
3071
|
function oe(e, t = k, n = P) {
|
|
3062
|
-
let r = Math.max(
|
|
3072
|
+
let r = Math.max(er, Math.min(tr, t * e)), i = n.x + 400 / t / 2, a = n.y + 300 / t / 2;
|
|
3063
3073
|
F({
|
|
3064
3074
|
x: i - 400 / r / 2,
|
|
3065
3075
|
y: a - 300 / r / 2
|
|
3066
3076
|
}), j(r);
|
|
3067
3077
|
}
|
|
3068
3078
|
function U(e) {
|
|
3069
|
-
return z.current ?
|
|
3079
|
+
return z.current ? Fn(e.clientX, e.clientY, z.current) : null;
|
|
3070
3080
|
}
|
|
3071
3081
|
function se(e, t) {
|
|
3072
3082
|
let n = null;
|
|
3073
3083
|
for (let r = 0; r < t.points.length; r++) {
|
|
3074
|
-
let i =
|
|
3075
|
-
i <=
|
|
3084
|
+
let i = In(e, t.points[r]);
|
|
3085
|
+
i <= Zn && (!n || i < n.d) && (n = {
|
|
3076
3086
|
index: r,
|
|
3077
3087
|
d: i
|
|
3078
3088
|
});
|
|
@@ -3082,8 +3092,8 @@ function rr({ className: e }) {
|
|
|
3082
3092
|
function W(e, t) {
|
|
3083
3093
|
let n = null;
|
|
3084
3094
|
for (let r = 0; r < t.points.length; r++) {
|
|
3085
|
-
let i = t.points[r], a = t.points[(r + 1) % t.points.length], { dist: o, t: s } =
|
|
3086
|
-
o <=
|
|
3095
|
+
let i = t.points[r], a = t.points[(r + 1) % t.points.length], { dist: o, t: s } = Ln(e, i, a);
|
|
3096
|
+
o <= Qn && (!n || o < n.d) && (n = {
|
|
3087
3097
|
index: r,
|
|
3088
3098
|
t: s,
|
|
3089
3099
|
d: o
|
|
@@ -3130,7 +3140,7 @@ function rr({ className: e }) {
|
|
|
3130
3140
|
} : t;
|
|
3131
3141
|
}).filter((e) => e.wallIndex !== -1));
|
|
3132
3142
|
}
|
|
3133
|
-
function
|
|
3143
|
+
function ue(e) {
|
|
3134
3144
|
if (e.button === 1) {
|
|
3135
3145
|
e.preventDefault();
|
|
3136
3146
|
let t = z.current;
|
|
@@ -3155,9 +3165,9 @@ function rr({ className: e }) {
|
|
|
3155
3165
|
if (g) {
|
|
3156
3166
|
let e = t.find((e) => e.id === g);
|
|
3157
3167
|
if (e) {
|
|
3158
|
-
let t =
|
|
3168
|
+
let t = Rn(n, [e]);
|
|
3159
3169
|
t && i((e) => [...e, {
|
|
3160
|
-
id:
|
|
3170
|
+
id: rr("door"),
|
|
3161
3171
|
roomId: t.roomId,
|
|
3162
3172
|
wallIndex: t.wallIndex,
|
|
3163
3173
|
t: t.t,
|
|
@@ -3171,7 +3181,7 @@ function rr({ className: e }) {
|
|
|
3171
3181
|
return;
|
|
3172
3182
|
}
|
|
3173
3183
|
if (o === "polygon") {
|
|
3174
|
-
S.length >= 3 &&
|
|
3184
|
+
S.length >= 3 && In(n, S[0]) <= 8 ? ae(S) : E((e) => [...e, n]);
|
|
3175
3185
|
return;
|
|
3176
3186
|
}
|
|
3177
3187
|
if (o === "select") {
|
|
@@ -3192,7 +3202,7 @@ function rr({ className: e }) {
|
|
|
3192
3202
|
if (e) {
|
|
3193
3203
|
let t = W(n, e);
|
|
3194
3204
|
if (t) {
|
|
3195
|
-
let r = e.points[t.index], i = e.points[(t.index + 1) % e.points.length], a =
|
|
3205
|
+
let r = e.points[t.index], i = e.points[(t.index + 1) % e.points.length], a = Pn({
|
|
3196
3206
|
x: r.x + (i.x - r.x) * t.t,
|
|
3197
3207
|
y: r.y + (i.y - r.y) * t.t
|
|
3198
3208
|
}), o = ce(e.id, t.index, t.t, a);
|
|
@@ -3206,7 +3216,7 @@ function rr({ className: e }) {
|
|
|
3206
3216
|
return;
|
|
3207
3217
|
}
|
|
3208
3218
|
}
|
|
3209
|
-
let r = t.find((e) =>
|
|
3219
|
+
let r = t.find((e) => zn(n, e.points));
|
|
3210
3220
|
if (r) {
|
|
3211
3221
|
m(r.id), I.current = {
|
|
3212
3222
|
type: "room",
|
|
@@ -3220,7 +3230,7 @@ function rr({ className: e }) {
|
|
|
3220
3230
|
}
|
|
3221
3231
|
}
|
|
3222
3232
|
}
|
|
3223
|
-
function
|
|
3233
|
+
function de(e) {
|
|
3224
3234
|
if (o !== "select" || g) return;
|
|
3225
3235
|
let n = U(e);
|
|
3226
3236
|
if (!n) return;
|
|
@@ -3229,7 +3239,7 @@ function rr({ className: e }) {
|
|
|
3229
3239
|
let i = se(n, r);
|
|
3230
3240
|
i && (e.preventDefault(), le(r.id, i.index));
|
|
3231
3241
|
}
|
|
3232
|
-
function
|
|
3242
|
+
function G(e) {
|
|
3233
3243
|
if (R.current) {
|
|
3234
3244
|
let { startClient: t, origPan: n, scaleX: r, scaleY: i } = R.current;
|
|
3235
3245
|
F({
|
|
@@ -3243,7 +3253,7 @@ function rr({ className: e }) {
|
|
|
3243
3253
|
if (ee.current && g) {
|
|
3244
3254
|
let e = t.find((e) => e.id === g);
|
|
3245
3255
|
if (e) {
|
|
3246
|
-
let t =
|
|
3256
|
+
let t = Rn(r, [e]);
|
|
3247
3257
|
t && i((e) => e.map((e) => e.id === ee.current ? {
|
|
3248
3258
|
...e,
|
|
3249
3259
|
wallIndex: t.wallIndex,
|
|
@@ -3263,7 +3273,7 @@ function rr({ className: e }) {
|
|
|
3263
3273
|
if (o === "select" && !g && I.current) {
|
|
3264
3274
|
let e = I.current;
|
|
3265
3275
|
if (e.type === "vertex") {
|
|
3266
|
-
let t = r.x - e.start.x, i = r.y - e.start.y, a =
|
|
3276
|
+
let t = r.x - e.start.x, i = r.y - e.start.y, a = Pn({
|
|
3267
3277
|
x: e.origPt.x + t,
|
|
3268
3278
|
y: e.origPt.y + i
|
|
3269
3279
|
});
|
|
@@ -3288,7 +3298,7 @@ function rr({ className: e }) {
|
|
|
3288
3298
|
}
|
|
3289
3299
|
}
|
|
3290
3300
|
}
|
|
3291
|
-
function
|
|
3301
|
+
function fe(e) {
|
|
3292
3302
|
if (R.current) {
|
|
3293
3303
|
R.current = null;
|
|
3294
3304
|
return;
|
|
@@ -3298,37 +3308,37 @@ function rr({ className: e }) {
|
|
|
3298
3308
|
if (o === "rect" && v) {
|
|
3299
3309
|
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);
|
|
3300
3310
|
i >= 10 && a >= 10 && n((t) => [...t, {
|
|
3301
|
-
id:
|
|
3311
|
+
id: rr("room"),
|
|
3302
3312
|
name: `Room ${t.length + 1}`,
|
|
3303
|
-
points:
|
|
3313
|
+
points: Vn(e, r, i, a)
|
|
3304
3314
|
}]), y(null), x(null);
|
|
3305
3315
|
}
|
|
3306
3316
|
ee.current = null, I.current = null;
|
|
3307
3317
|
}
|
|
3308
3318
|
}
|
|
3309
|
-
function
|
|
3319
|
+
function K(e) {
|
|
3310
3320
|
l && n((t) => t.map((t) => t.id === l ? {
|
|
3311
3321
|
...t,
|
|
3312
3322
|
name: e
|
|
3313
3323
|
} : t));
|
|
3314
3324
|
}
|
|
3315
|
-
function
|
|
3325
|
+
function pe(e, t) {
|
|
3316
3326
|
let n = parseFloat(t);
|
|
3317
3327
|
isNaN(n) || n <= 0 || i((t) => t.map((t) => t.id === e ? {
|
|
3318
3328
|
...t,
|
|
3319
3329
|
width: n
|
|
3320
3330
|
} : t));
|
|
3321
3331
|
}
|
|
3322
|
-
function
|
|
3332
|
+
function me() {
|
|
3323
3333
|
l && (n((e) => e.filter((e) => e.id !== l)), i((e) => e.filter((e) => e.roomId !== l)), _(null), m(null));
|
|
3324
3334
|
}
|
|
3325
|
-
function
|
|
3335
|
+
function he(e) {
|
|
3326
3336
|
i((t) => t.filter((t) => t.id !== e));
|
|
3327
3337
|
}
|
|
3328
|
-
function
|
|
3338
|
+
function ge(e) {
|
|
3329
3339
|
c(e), _(null), E([]), O(null), y(null), x(null);
|
|
3330
3340
|
}
|
|
3331
|
-
function
|
|
3341
|
+
function _e(e) {
|
|
3332
3342
|
let t = e.target.files?.[0];
|
|
3333
3343
|
if (!t) return;
|
|
3334
3344
|
e.target.value = "";
|
|
@@ -3336,22 +3346,22 @@ function rr({ className: e }) {
|
|
|
3336
3346
|
r.onload = (e) => {
|
|
3337
3347
|
let t = e.target?.result;
|
|
3338
3348
|
if (typeof t != "string") return;
|
|
3339
|
-
let r =
|
|
3349
|
+
let r = Yn(t);
|
|
3340
3350
|
r.length !== 0 && (n(r.map((e) => ({
|
|
3341
3351
|
...e,
|
|
3342
|
-
id:
|
|
3352
|
+
id: rr("room")
|
|
3343
3353
|
}))), i([]), m(null), _(null), j(1), F({
|
|
3344
3354
|
x: 0,
|
|
3345
3355
|
y: 0
|
|
3346
3356
|
}));
|
|
3347
3357
|
}, r.readAsText(t);
|
|
3348
3358
|
}
|
|
3349
|
-
let
|
|
3359
|
+
let ve = o === "rect" && v && b ? {
|
|
3350
3360
|
x: Math.min(v.x, b.x),
|
|
3351
3361
|
y: Math.min(v.y, b.y),
|
|
3352
3362
|
w: Math.abs(b.x - v.x),
|
|
3353
3363
|
h: Math.abs(b.y - v.y)
|
|
3354
|
-
} : null,
|
|
3364
|
+
} : null, ye = l ? t.find((e) => e.id === l) ?? null : null, be = g ? t.find((e) => e.id === g) ?? null : null, xe = g ? r.filter((e) => e.roomId === g) : [], Se = [
|
|
3355
3365
|
{
|
|
3356
3366
|
t: "select",
|
|
3357
3367
|
icon: A,
|
|
@@ -3367,25 +3377,25 @@ function rr({ className: e }) {
|
|
|
3367
3377
|
icon: T,
|
|
3368
3378
|
label: "Polygon room"
|
|
3369
3379
|
}
|
|
3370
|
-
],
|
|
3380
|
+
], q = 400 / k, Ce = 300 / k, we = g ? Q.roomDrawerCanvasDoor : o === "select" ? Q.roomDrawerCanvasSelect : void 0;
|
|
3371
3381
|
return /* @__PURE__ */ H("div", {
|
|
3372
3382
|
className: f(Q.roomDrawer, e),
|
|
3373
3383
|
children: [
|
|
3374
3384
|
/* @__PURE__ */ H("div", {
|
|
3375
3385
|
className: Q.roomDrawerToolbar,
|
|
3376
3386
|
children: [
|
|
3377
|
-
|
|
3387
|
+
Se.map(({ t: e, icon: t, label: n }) => /* @__PURE__ */ V("button", {
|
|
3378
3388
|
title: n,
|
|
3379
3389
|
className: f(Q.roomDrawerToolbarBtn, e === o && !g && Q.roomDrawerToolbarBtnActive),
|
|
3380
|
-
onClick: () =>
|
|
3390
|
+
onClick: () => ge(e),
|
|
3381
3391
|
children: /* @__PURE__ */ V(p, { icon: t })
|
|
3382
3392
|
}, e)),
|
|
3383
3393
|
/* @__PURE__ */ V("div", { className: Q.roomDrawerToolbarSep }),
|
|
3384
3394
|
/* @__PURE__ */ V("button", {
|
|
3385
3395
|
title: "Zoom in (+)",
|
|
3386
3396
|
className: Q.roomDrawerToolbarBtn,
|
|
3387
|
-
onClick: () => oe(
|
|
3388
|
-
disabled: k >=
|
|
3397
|
+
onClick: () => oe($n),
|
|
3398
|
+
disabled: k >= tr,
|
|
3389
3399
|
children: /* @__PURE__ */ V(p, { icon: N })
|
|
3390
3400
|
}),
|
|
3391
3401
|
/* @__PURE__ */ H("button", {
|
|
@@ -3402,8 +3412,8 @@ function rr({ className: e }) {
|
|
|
3402
3412
|
/* @__PURE__ */ V("button", {
|
|
3403
3413
|
title: "Zoom out (−)",
|
|
3404
3414
|
className: Q.roomDrawerToolbarBtn,
|
|
3405
|
-
onClick: () => oe(1 /
|
|
3406
|
-
disabled: k <=
|
|
3415
|
+
onClick: () => oe(1 / $n),
|
|
3416
|
+
disabled: k <= er,
|
|
3407
3417
|
children: /* @__PURE__ */ V(p, { icon: M })
|
|
3408
3418
|
}),
|
|
3409
3419
|
/* @__PURE__ */ V("div", { className: Q.roomDrawerToolbarSep }),
|
|
@@ -3416,7 +3426,7 @@ function rr({ className: e }) {
|
|
|
3416
3426
|
/* @__PURE__ */ V("button", {
|
|
3417
3427
|
title: "Download SVG",
|
|
3418
3428
|
className: Q.roomDrawerToolbarBtn,
|
|
3419
|
-
onClick: () =>
|
|
3429
|
+
onClick: () => Xn(t, r),
|
|
3420
3430
|
disabled: t.length === 0,
|
|
3421
3431
|
children: /* @__PURE__ */ V(p, { icon: w })
|
|
3422
3432
|
}),
|
|
@@ -3425,18 +3435,18 @@ function rr({ className: e }) {
|
|
|
3425
3435
|
type: "file",
|
|
3426
3436
|
accept: ".svg,image/svg+xml",
|
|
3427
3437
|
style: { display: "none" },
|
|
3428
|
-
onChange:
|
|
3438
|
+
onChange: _e
|
|
3429
3439
|
})
|
|
3430
3440
|
]
|
|
3431
3441
|
}),
|
|
3432
3442
|
/* @__PURE__ */ H("svg", {
|
|
3433
3443
|
ref: z,
|
|
3434
|
-
className: f(Q.roomDrawerCanvas,
|
|
3435
|
-
viewBox: `${P.x} ${P.y} ${
|
|
3436
|
-
onMouseDown:
|
|
3437
|
-
onMouseMove:
|
|
3438
|
-
onMouseUp:
|
|
3439
|
-
onDoubleClick:
|
|
3444
|
+
className: f(Q.roomDrawerCanvas, we),
|
|
3445
|
+
viewBox: `${P.x} ${P.y} ${q} ${Ce}`,
|
|
3446
|
+
onMouseDown: ue,
|
|
3447
|
+
onMouseMove: G,
|
|
3448
|
+
onMouseUp: fe,
|
|
3449
|
+
onDoubleClick: de,
|
|
3440
3450
|
children: [
|
|
3441
3451
|
/* @__PURE__ */ V("defs", { children: /* @__PURE__ */ V("pattern", {
|
|
3442
3452
|
id: "rd-grid",
|
|
@@ -3452,12 +3462,12 @@ function rr({ className: e }) {
|
|
|
3452
3462
|
/* @__PURE__ */ V("rect", {
|
|
3453
3463
|
x: P.x,
|
|
3454
3464
|
y: P.y,
|
|
3455
|
-
width:
|
|
3456
|
-
height:
|
|
3465
|
+
width: q,
|
|
3466
|
+
height: Ce,
|
|
3457
3467
|
fill: "url(#rd-grid)"
|
|
3458
3468
|
}),
|
|
3459
3469
|
t.map((e) => {
|
|
3460
|
-
let t = e.points, n = t.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x},${e.y}`).join(" ") + " Z", i =
|
|
3470
|
+
let t = e.points, n = t.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x},${e.y}`).join(" ") + " Z", i = Gn(t, r.filter((t) => t.roomId === e.id)), a = Bn(t), o = l === e.id, s = g === e.id;
|
|
3461
3471
|
return /* @__PURE__ */ H("g", { children: [
|
|
3462
3472
|
/* @__PURE__ */ V("path", {
|
|
3463
3473
|
d: n,
|
|
@@ -3480,7 +3490,7 @@ function rr({ className: e }) {
|
|
|
3480
3490
|
r.map((e) => {
|
|
3481
3491
|
let n = t.find((t) => t.id === e.roomId);
|
|
3482
3492
|
if (!n) return null;
|
|
3483
|
-
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a =
|
|
3493
|
+
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a = Hn(r, i, e.t, e.width);
|
|
3484
3494
|
return a ? /* @__PURE__ */ V("line", {
|
|
3485
3495
|
x1: a.p1.x,
|
|
3486
3496
|
y1: a.p1.y,
|
|
@@ -3489,10 +3499,10 @@ function rr({ className: e }) {
|
|
|
3489
3499
|
className: Q.doorGap
|
|
3490
3500
|
}, e.id) : null;
|
|
3491
3501
|
}),
|
|
3492
|
-
g &&
|
|
3502
|
+
g && xe.map((e) => {
|
|
3493
3503
|
let n = t.find((t) => t.id === e.roomId);
|
|
3494
3504
|
if (!n) return null;
|
|
3495
|
-
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a =
|
|
3505
|
+
let r = n.points[e.wallIndex], i = n.points[(e.wallIndex + 1) % n.points.length], a = Hn(r, i, e.t, e.width);
|
|
3496
3506
|
if (!a) return null;
|
|
3497
3507
|
let o = {
|
|
3498
3508
|
x: (a.p1.x + a.p2.x) / 2,
|
|
@@ -3508,17 +3518,17 @@ function rr({ className: e }) {
|
|
|
3508
3518
|
}
|
|
3509
3519
|
}, e.id);
|
|
3510
3520
|
}),
|
|
3511
|
-
o === "select" && !g &&
|
|
3521
|
+
o === "select" && !g && ye && ye.points.map((e, t) => /* @__PURE__ */ V("circle", {
|
|
3512
3522
|
cx: e.x,
|
|
3513
3523
|
cy: e.y,
|
|
3514
3524
|
r: 3.5,
|
|
3515
3525
|
className: Q.vertexHandle
|
|
3516
3526
|
}, t)),
|
|
3517
|
-
|
|
3518
|
-
x:
|
|
3519
|
-
y:
|
|
3520
|
-
width:
|
|
3521
|
-
height:
|
|
3527
|
+
ve && /* @__PURE__ */ V("rect", {
|
|
3528
|
+
x: ve.x,
|
|
3529
|
+
y: ve.y,
|
|
3530
|
+
width: ve.w,
|
|
3531
|
+
height: ve.h,
|
|
3522
3532
|
className: Q.preview
|
|
3523
3533
|
}),
|
|
3524
3534
|
o === "polygon" && S.length > 0 && /* @__PURE__ */ H(B, { children: [
|
|
@@ -3541,7 +3551,7 @@ function rr({ className: e }) {
|
|
|
3541
3551
|
] })
|
|
3542
3552
|
]
|
|
3543
3553
|
}),
|
|
3544
|
-
|
|
3554
|
+
ye && !g && /* @__PURE__ */ H("div", {
|
|
3545
3555
|
className: Q.roomDrawerInfo,
|
|
3546
3556
|
children: [
|
|
3547
3557
|
/* @__PURE__ */ V("span", {
|
|
@@ -3550,25 +3560,25 @@ function rr({ className: e }) {
|
|
|
3550
3560
|
}),
|
|
3551
3561
|
/* @__PURE__ */ V("input", {
|
|
3552
3562
|
className: Q.roomDrawerInfoInput,
|
|
3553
|
-
value:
|
|
3554
|
-
onChange: (e) =>
|
|
3563
|
+
value: ye.name,
|
|
3564
|
+
onChange: (e) => K(e.target.value),
|
|
3555
3565
|
placeholder: "Room name"
|
|
3556
3566
|
}),
|
|
3557
3567
|
/* @__PURE__ */ H("button", {
|
|
3558
3568
|
className: Q.roomDrawerInfoDoorsBtn,
|
|
3559
|
-
onClick: () => _(
|
|
3569
|
+
onClick: () => _(ye.id),
|
|
3560
3570
|
title: "Edit doors",
|
|
3561
|
-
children: [/* @__PURE__ */ V(p, { icon: C }), /* @__PURE__ */ V("span", { children: r.filter((e) => e.roomId ===
|
|
3571
|
+
children: [/* @__PURE__ */ V(p, { icon: C }), /* @__PURE__ */ V("span", { children: r.filter((e) => e.roomId === ye.id).length })]
|
|
3562
3572
|
}),
|
|
3563
3573
|
/* @__PURE__ */ V("button", {
|
|
3564
3574
|
className: Q.roomDrawerInfoDelete,
|
|
3565
|
-
onClick:
|
|
3575
|
+
onClick: me,
|
|
3566
3576
|
title: "Delete room",
|
|
3567
3577
|
children: /* @__PURE__ */ V(p, { icon: L })
|
|
3568
3578
|
})
|
|
3569
3579
|
]
|
|
3570
3580
|
}),
|
|
3571
|
-
g &&
|
|
3581
|
+
g && be && /* @__PURE__ */ H("div", {
|
|
3572
3582
|
className: Q.roomDrawerDoorPanel,
|
|
3573
3583
|
children: [/* @__PURE__ */ H("div", {
|
|
3574
3584
|
className: Q.roomDrawerDoorPanelHeader,
|
|
@@ -3579,7 +3589,7 @@ function rr({ className: e }) {
|
|
|
3579
3589
|
}),
|
|
3580
3590
|
/* @__PURE__ */ V("span", {
|
|
3581
3591
|
className: Q.roomDrawerDoorPanelTitle,
|
|
3582
|
-
children:
|
|
3592
|
+
children: be.name ? `Doors · ${be.name}` : "Doors"
|
|
3583
3593
|
}),
|
|
3584
3594
|
/* @__PURE__ */ H("button", {
|
|
3585
3595
|
className: Q.roomDrawerDoorPanelDone,
|
|
@@ -3590,10 +3600,10 @@ function rr({ className: e }) {
|
|
|
3590
3600
|
]
|
|
3591
3601
|
}), /* @__PURE__ */ H("div", {
|
|
3592
3602
|
className: Q.roomDrawerDoorPanelList,
|
|
3593
|
-
children: [
|
|
3603
|
+
children: [xe.length === 0 && /* @__PURE__ */ V("span", {
|
|
3594
3604
|
className: Q.roomDrawerDoorPanelEmpty,
|
|
3595
3605
|
children: "Click on a wall to add a door"
|
|
3596
|
-
}),
|
|
3606
|
+
}), xe.map((e, t) => /* @__PURE__ */ H("div", {
|
|
3597
3607
|
className: Q.roomDrawerDoorPanelItem,
|
|
3598
3608
|
children: [
|
|
3599
3609
|
/* @__PURE__ */ H("span", {
|
|
@@ -3609,11 +3619,11 @@ function rr({ className: e }) {
|
|
|
3609
3619
|
type: "number",
|
|
3610
3620
|
min: 1,
|
|
3611
3621
|
value: e.width,
|
|
3612
|
-
onChange: (t) =>
|
|
3622
|
+
onChange: (t) => pe(e.id, t.target.value)
|
|
3613
3623
|
}),
|
|
3614
3624
|
/* @__PURE__ */ V("button", {
|
|
3615
3625
|
className: Q.roomDrawerInfoDelete,
|
|
3616
|
-
onClick: () =>
|
|
3626
|
+
onClick: () => he(e.id),
|
|
3617
3627
|
title: "Delete door",
|
|
3618
3628
|
children: /* @__PURE__ */ V(p, { icon: L })
|
|
3619
3629
|
})
|
|
@@ -3623,12 +3633,12 @@ function rr({ className: e }) {
|
|
|
3623
3633
|
}),
|
|
3624
3634
|
/* @__PURE__ */ V("div", {
|
|
3625
3635
|
className: Q.roomDrawerHint,
|
|
3626
|
-
children: g ? "Click a wall to add a door · Adjust width or delete from the list · Done or Esc to finish" : `${
|
|
3636
|
+
children: g ? "Click a wall to add a door · Adjust width or delete from the list · Done or Esc to finish" : `${ir[o]} · Scroll to zoom · Middle-drag to pan · 0 to reset`
|
|
3627
3637
|
})
|
|
3628
3638
|
]
|
|
3629
3639
|
});
|
|
3630
3640
|
}
|
|
3631
|
-
var
|
|
3641
|
+
var or = {
|
|
3632
3642
|
"roomViewer-containerLoading": "roomViewer-containerLoading_BL3M-",
|
|
3633
3643
|
roomViewerContainerLoading: "roomViewer-containerLoading_BL3M-",
|
|
3634
3644
|
"roomViewer-container": "roomViewer-container_YlmB8",
|
|
@@ -3646,7 +3656,7 @@ var ir = {
|
|
|
3646
3656
|
};
|
|
3647
3657
|
//#endregion
|
|
3648
3658
|
//#region package/common/roomViewer/roomViewer.tsx
|
|
3649
|
-
function
|
|
3659
|
+
function sr({ data: e = [] }) {
|
|
3650
3660
|
let t = u(null), [, n] = d(null), [r, i] = d(0), [o, s] = d(!0);
|
|
3651
3661
|
a(() => {
|
|
3652
3662
|
let i = new AbortController();
|
|
@@ -3666,15 +3676,15 @@ function ar({ data: e = [] }) {
|
|
|
3666
3676
|
if (n) {
|
|
3667
3677
|
let [e] = t.querySelectorAll(`[id="room${n}"]`);
|
|
3668
3678
|
if (e) {
|
|
3669
|
-
e.classList.remove(
|
|
3679
|
+
e.classList.remove(or.roomViewerSelected, or.roomViewerTint);
|
|
3670
3680
|
let [t] = e.querySelectorAll("[id=\"background\"]");
|
|
3671
|
-
t && t.classList.remove(
|
|
3681
|
+
t && t.classList.remove(or.roomViewerTint);
|
|
3672
3682
|
}
|
|
3673
3683
|
}
|
|
3674
3684
|
if (a) {
|
|
3675
|
-
a.classList.add(
|
|
3685
|
+
a.classList.add(or.roomViewerSelected);
|
|
3676
3686
|
let [e] = a.querySelectorAll("[id=\"background\"]");
|
|
3677
|
-
(e ?? a).classList.add(
|
|
3687
|
+
(e ?? a).classList.add(or.roomViewerTint);
|
|
3678
3688
|
}
|
|
3679
3689
|
return r;
|
|
3680
3690
|
});
|
|
@@ -3687,19 +3697,19 @@ function ar({ data: e = [] }) {
|
|
|
3687
3697
|
}
|
|
3688
3698
|
let m = e[r]?.data ?? null;
|
|
3689
3699
|
return /* @__PURE__ */ H("div", {
|
|
3690
|
-
className:
|
|
3700
|
+
className: or.roomViewer,
|
|
3691
3701
|
ref: t,
|
|
3692
3702
|
children: [
|
|
3693
3703
|
/* @__PURE__ */ V("h3", {
|
|
3694
|
-
className:
|
|
3704
|
+
className: or.roomViewerHeader,
|
|
3695
3705
|
children: e[r]?.label ?? ""
|
|
3696
3706
|
}),
|
|
3697
3707
|
/* @__PURE__ */ V("div", {
|
|
3698
|
-
className: f(
|
|
3708
|
+
className: f(or.roomViewerContainer, o && or.roomViewerContainerLoading),
|
|
3699
3709
|
children: m
|
|
3700
3710
|
}, r),
|
|
3701
3711
|
e.length > 1 && /* @__PURE__ */ H("div", {
|
|
3702
|
-
className:
|
|
3712
|
+
className: or.roomViewerActions,
|
|
3703
3713
|
children: [
|
|
3704
3714
|
/* @__PURE__ */ V(p, {
|
|
3705
3715
|
icon: _,
|
|
@@ -3715,21 +3725,21 @@ function ar({ data: e = [] }) {
|
|
|
3715
3725
|
]
|
|
3716
3726
|
});
|
|
3717
3727
|
}
|
|
3718
|
-
var
|
|
3728
|
+
var cr = { scrollbarProvider: "scrollbarProvider_IMBFu" };
|
|
3719
3729
|
//#endregion
|
|
3720
3730
|
//#region package/common/scrollbarProvider/scrollbarProvider.tsx
|
|
3721
|
-
function
|
|
3731
|
+
function lr({ className: e = void 0, children: t = void 0 }) {
|
|
3722
3732
|
return /* @__PURE__ */ V("div", {
|
|
3723
|
-
className: f(
|
|
3733
|
+
className: f(cr.scrollbarProvider, e),
|
|
3724
3734
|
children: t
|
|
3725
3735
|
});
|
|
3726
3736
|
}
|
|
3727
3737
|
//#endregion
|
|
3728
3738
|
//#region package/common/scrollbarProvider/index.ts
|
|
3729
|
-
var
|
|
3739
|
+
var ur = lr, dr = { resultCount: "resultCount_Sn48Q" };
|
|
3730
3740
|
//#endregion
|
|
3731
3741
|
//#region package/common/searchInput/searchInput.tsx
|
|
3732
|
-
function
|
|
3742
|
+
function fr({ value: e, onChange: t, onDebounce: n, placeholder: r, label: i, debounceMs: o = 500, totalAmount: s, showAmount: c = !0, className: l, width: d, ...f }) {
|
|
3733
3743
|
let p = u(null);
|
|
3734
3744
|
a(() => () => {
|
|
3735
3745
|
p.current !== null && clearTimeout(p.current);
|
|
@@ -3745,14 +3755,14 @@ function ur({ value: e, onChange: t, onDebounce: n, placeholder: r, label: i, de
|
|
|
3745
3755
|
...f,
|
|
3746
3756
|
className: l,
|
|
3747
3757
|
style: d == null ? void 0 : { width: d },
|
|
3748
|
-
children: [/* @__PURE__ */ V(
|
|
3758
|
+
children: [/* @__PURE__ */ V(st, {
|
|
3749
3759
|
type: X.Search,
|
|
3750
3760
|
label: i,
|
|
3751
3761
|
placeholder: r,
|
|
3752
3762
|
value: e,
|
|
3753
3763
|
onChange: m
|
|
3754
3764
|
}), h && /* @__PURE__ */ H("p", {
|
|
3755
|
-
className:
|
|
3765
|
+
className: dr.resultCount,
|
|
3756
3766
|
children: [
|
|
3757
3767
|
s,
|
|
3758
3768
|
" ",
|
|
@@ -3761,7 +3771,7 @@ function ur({ value: e, onChange: t, onDebounce: n, placeholder: r, label: i, de
|
|
|
3761
3771
|
})]
|
|
3762
3772
|
});
|
|
3763
3773
|
}
|
|
3764
|
-
var
|
|
3774
|
+
var pr = {
|
|
3765
3775
|
stepper: "stepper_kiS2A",
|
|
3766
3776
|
"stepper-clickable": "stepper-clickable_Nm6fP",
|
|
3767
3777
|
stepperClickable: "stepper-clickable_Nm6fP",
|
|
@@ -3791,7 +3801,7 @@ var dr = {
|
|
|
3791
3801
|
};
|
|
3792
3802
|
//#endregion
|
|
3793
3803
|
//#region package/common/stepper/stepper.tsx
|
|
3794
|
-
function
|
|
3804
|
+
function mr() {
|
|
3795
3805
|
return /* @__PURE__ */ V("svg", {
|
|
3796
3806
|
strokeLinejoin: "round",
|
|
3797
3807
|
strokeLinecap: "round",
|
|
@@ -3807,26 +3817,26 @@ function fr() {
|
|
|
3807
3817
|
})
|
|
3808
3818
|
});
|
|
3809
3819
|
}
|
|
3810
|
-
function
|
|
3820
|
+
function hr({ 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 }) {
|
|
3811
3821
|
let p = r === "vertical";
|
|
3812
3822
|
return /* @__PURE__ */ V("div", {
|
|
3813
3823
|
...d,
|
|
3814
|
-
className: f(
|
|
3824
|
+
className: f(pr.stepper, { [pr.stepperVertical]: p }, l?.root, s),
|
|
3815
3825
|
style: {
|
|
3816
3826
|
...u?.root,
|
|
3817
3827
|
...c
|
|
3818
3828
|
},
|
|
3819
3829
|
children: t.map((r, s) => {
|
|
3820
|
-
let c = s < n, d = s <= n, m = !!i && (a ? s !== n : c), h = f(
|
|
3821
|
-
className: f(
|
|
3830
|
+
let c = s < n, d = s <= n, m = !!i && (a ? s !== n : c), h = f(pr.stepperEntry, { [pr.stepperEntryActive]: d }, { [pr.stepperEntryDone]: c }, { [pr.stepperClickable]: m }, l?.entry), g = /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("div", {
|
|
3831
|
+
className: f(pr.stepperEntryNumber, { [pr.stepperEntryNumberDone]: c }, l?.entryNumber),
|
|
3822
3832
|
style: u?.entryNumber,
|
|
3823
|
-
children: c ? /* @__PURE__ */ V(
|
|
3833
|
+
children: c ? /* @__PURE__ */ V(mr, {}) : s + 1
|
|
3824
3834
|
}), !o && /* @__PURE__ */ V("div", {
|
|
3825
|
-
className: f(
|
|
3835
|
+
className: f(pr.stepperEntryLabel, { [pr.stepperEntryLabelVertical]: p }, l?.entryLabel),
|
|
3826
3836
|
style: u?.entryLabel,
|
|
3827
3837
|
children: r.label
|
|
3828
3838
|
})] });
|
|
3829
|
-
return /* @__PURE__ */ H(e.Fragment, { children: [m ? /* @__PURE__ */ V(
|
|
3839
|
+
return /* @__PURE__ */ H(e.Fragment, { children: [m ? /* @__PURE__ */ V(Le, {
|
|
3830
3840
|
className: h,
|
|
3831
3841
|
style: u?.entry,
|
|
3832
3842
|
onClick: () => i(s),
|
|
@@ -3838,7 +3848,7 @@ function pr({ steps: t = [], currentStep: n = 0, alignment: r = "horizontal", on
|
|
|
3838
3848
|
"aria-current": s === n ? "step" : void 0,
|
|
3839
3849
|
children: g
|
|
3840
3850
|
}), s < t.length - 1 && /* @__PURE__ */ V("div", {
|
|
3841
|
-
className: f(
|
|
3851
|
+
className: f(pr.stepperConnector, { [pr.stepperConnectorFilled]: c }, { [pr.stepperConnectorVertical]: p }, l?.connector),
|
|
3842
3852
|
style: u?.connector
|
|
3843
3853
|
})] }, s);
|
|
3844
3854
|
})
|
|
@@ -3846,7 +3856,7 @@ function pr({ steps: t = [], currentStep: n = 0, alignment: r = "horizontal", on
|
|
|
3846
3856
|
}
|
|
3847
3857
|
//#endregion
|
|
3848
3858
|
//#region package/services/tenorService.ts
|
|
3849
|
-
var
|
|
3859
|
+
var gr = "https://tenor.googleapis.com/v2", _r = class {
|
|
3850
3860
|
constructor(e) {
|
|
3851
3861
|
this.key = e;
|
|
3852
3862
|
}
|
|
@@ -3855,14 +3865,14 @@ var mr = "https://tenor.googleapis.com/v2", hr = class {
|
|
|
3855
3865
|
q: e,
|
|
3856
3866
|
key: this.key
|
|
3857
3867
|
});
|
|
3858
|
-
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(`${
|
|
3868
|
+
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(`${gr}/search?${n}`)).json();
|
|
3859
3869
|
}
|
|
3860
3870
|
async searchSuggestions(e) {
|
|
3861
3871
|
let t = new URLSearchParams({
|
|
3862
3872
|
q: e,
|
|
3863
3873
|
key: this.key
|
|
3864
3874
|
});
|
|
3865
|
-
return (await fetch(`${
|
|
3875
|
+
return (await fetch(`${gr}/search_suggestions?${t}`)).json();
|
|
3866
3876
|
}
|
|
3867
3877
|
registerShare(e, t) {
|
|
3868
3878
|
let n = new URLSearchParams({
|
|
@@ -3870,9 +3880,9 @@ var mr = "https://tenor.googleapis.com/v2", hr = class {
|
|
|
3870
3880
|
q: e,
|
|
3871
3881
|
key: this.key
|
|
3872
3882
|
});
|
|
3873
|
-
fetch(`${
|
|
3883
|
+
fetch(`${gr}/registershare?${n}`).catch(() => null);
|
|
3874
3884
|
}
|
|
3875
|
-
},
|
|
3885
|
+
}, vr = {
|
|
3876
3886
|
gifPreview: "gifPreview_-ECUZ",
|
|
3877
3887
|
"gifPreview-image": "gifPreview-image_Aq7-a",
|
|
3878
3888
|
gifPreviewImage: "gifPreview-image_Aq7-a",
|
|
@@ -3882,25 +3892,25 @@ var mr = "https://tenor.googleapis.com/v2", hr = class {
|
|
|
3882
3892
|
};
|
|
3883
3893
|
//#endregion
|
|
3884
3894
|
//#region package/common/tenorPicker/components/gifPreview/gifPreview.tsx
|
|
3885
|
-
function
|
|
3895
|
+
function yr({ className: e, previewItems: t = [], onSelect: n, onLoadAdditional: r }) {
|
|
3886
3896
|
function i(e) {
|
|
3887
3897
|
let t = e.currentTarget, n = t.scrollHeight - t.clientHeight * 1.5;
|
|
3888
3898
|
t.scrollTop >= n && r?.();
|
|
3889
3899
|
}
|
|
3890
3900
|
return /* @__PURE__ */ V(B, { children: t.length > 0 && /* @__PURE__ */ V("div", {
|
|
3891
|
-
className: f(
|
|
3901
|
+
className: f(vr.gifPreview, e),
|
|
3892
3902
|
onScroll: i,
|
|
3893
|
-
children: t.map((e, t) => /* @__PURE__ */ V(
|
|
3894
|
-
className:
|
|
3903
|
+
children: t.map((e, t) => /* @__PURE__ */ V(Le, {
|
|
3904
|
+
className: vr.gifPreviewImageContainer,
|
|
3895
3905
|
onClick: () => n?.(e),
|
|
3896
3906
|
children: /* @__PURE__ */ V("div", {
|
|
3897
|
-
className:
|
|
3907
|
+
className: vr.gifPreviewImage,
|
|
3898
3908
|
style: { backgroundImage: `url(${e.media_formats.tinygif.url})` }
|
|
3899
3909
|
})
|
|
3900
3910
|
}, `${e.id}_${t}`))
|
|
3901
3911
|
}) });
|
|
3902
3912
|
}
|
|
3903
|
-
var
|
|
3913
|
+
var br = {
|
|
3904
3914
|
gifView: "gifView_Fa2zj",
|
|
3905
3915
|
"gifView-loading": "gifView-loading_LfNJr",
|
|
3906
3916
|
gifViewLoading: "gifView-loading_LfNJr",
|
|
@@ -3908,20 +3918,20 @@ var vr = {
|
|
|
3908
3918
|
};
|
|
3909
3919
|
//#endregion
|
|
3910
3920
|
//#region package/common/tenorPicker/components/gifView/gifView.tsx
|
|
3911
|
-
function
|
|
3921
|
+
function xr({ className: e, src: t = "" }) {
|
|
3912
3922
|
let [n, r] = d(!0);
|
|
3913
3923
|
return a(() => {
|
|
3914
3924
|
r(!0);
|
|
3915
3925
|
}, [t]), /* @__PURE__ */ H("div", {
|
|
3916
|
-
className: f(
|
|
3926
|
+
className: f(br.gifView, e),
|
|
3917
3927
|
children: [/* @__PURE__ */ V("img", {
|
|
3918
|
-
className:
|
|
3928
|
+
className: br.tenorPickerSelected,
|
|
3919
3929
|
src: t,
|
|
3920
3930
|
onLoad: () => r(!1)
|
|
3921
|
-
}), n && /* @__PURE__ */ V("div", { className:
|
|
3931
|
+
}), n && /* @__PURE__ */ V("div", { className: br.gifViewLoading })]
|
|
3922
3932
|
});
|
|
3923
3933
|
}
|
|
3924
|
-
var
|
|
3934
|
+
var Sr = {
|
|
3925
3935
|
"tenorPicker-selected": "tenorPicker-selected_IfR2z",
|
|
3926
3936
|
tenorPickerSelected: "tenorPicker-selected_IfR2z",
|
|
3927
3937
|
"tenorPicker-modal-content": "tenorPicker-modal-content_Vkolf",
|
|
@@ -3933,8 +3943,8 @@ var br = {
|
|
|
3933
3943
|
};
|
|
3934
3944
|
//#endregion
|
|
3935
3945
|
//#region package/common/tenorPicker/tenorPicker.tsx
|
|
3936
|
-
function
|
|
3937
|
-
let a = c(() => new
|
|
3946
|
+
function Cr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () => void 0, selected: i = null }) {
|
|
3947
|
+
let a = c(() => new _r(t), [t]), [o, s] = d(""), [l, u] = d([]), [p, m] = d([]), [h, g] = d(null), [_, v] = d(!1);
|
|
3938
3948
|
async function y(e) {
|
|
3939
3949
|
if (s(e), !e.trim()) {
|
|
3940
3950
|
u([]), m([]), g(null);
|
|
@@ -3958,25 +3968,25 @@ function xr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3958
3968
|
await r(e), v(!1), e && a.registerShare(o, e.id);
|
|
3959
3969
|
}
|
|
3960
3970
|
function S() {
|
|
3961
|
-
return /* @__PURE__ */ V(
|
|
3971
|
+
return /* @__PURE__ */ V(et, {
|
|
3962
3972
|
inline: !0,
|
|
3963
|
-
className:
|
|
3964
|
-
children: p.map((e) => /* @__PURE__ */ V(
|
|
3965
|
-
className:
|
|
3973
|
+
className: Sr.tenorPickerSuggestionsContainer,
|
|
3974
|
+
children: p.map((e) => /* @__PURE__ */ V($e, {
|
|
3975
|
+
className: Sr.tenorPickerSuggestionsItem,
|
|
3966
3976
|
text: e,
|
|
3967
3977
|
onClick: () => y(e)
|
|
3968
3978
|
}, e))
|
|
3969
3979
|
});
|
|
3970
3980
|
}
|
|
3971
3981
|
function C() {
|
|
3972
|
-
return /* @__PURE__ */ V(
|
|
3982
|
+
return /* @__PURE__ */ V(yr, {
|
|
3973
3983
|
previewItems: l,
|
|
3974
3984
|
onSelect: x,
|
|
3975
3985
|
onLoadAdditional: b
|
|
3976
3986
|
});
|
|
3977
3987
|
}
|
|
3978
3988
|
function w() {
|
|
3979
|
-
return /* @__PURE__ */ V(
|
|
3989
|
+
return /* @__PURE__ */ V(fr, {
|
|
3980
3990
|
label: "Pick gif",
|
|
3981
3991
|
value: o,
|
|
3982
3992
|
onDebounce: y,
|
|
@@ -3984,28 +3994,28 @@ function xr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
3984
3994
|
});
|
|
3985
3995
|
}
|
|
3986
3996
|
return n ? /* @__PURE__ */ H("div", {
|
|
3987
|
-
className: f(
|
|
3997
|
+
className: f(Sr.tenorPicker, e),
|
|
3988
3998
|
children: [
|
|
3989
3999
|
/* @__PURE__ */ H("div", {
|
|
3990
|
-
className:
|
|
3991
|
-
children: [/* @__PURE__ */ V(
|
|
4000
|
+
className: Se.actionButtons,
|
|
4001
|
+
children: [/* @__PURE__ */ V(Ne, {
|
|
3992
4002
|
onClick: () => v(!0),
|
|
3993
4003
|
children: "Pick gif"
|
|
3994
|
-
}), i && /* @__PURE__ */ V(
|
|
3995
|
-
styleType:
|
|
4004
|
+
}), i && /* @__PURE__ */ V(Ne, {
|
|
4005
|
+
styleType: Ee.Delete,
|
|
3996
4006
|
onClick: () => x(null),
|
|
3997
4007
|
children: "Remove gif"
|
|
3998
4008
|
})]
|
|
3999
4009
|
}),
|
|
4000
|
-
i && /* @__PURE__ */ V(
|
|
4001
|
-
className:
|
|
4010
|
+
i && /* @__PURE__ */ V(xr, {
|
|
4011
|
+
className: Sr.tenorPickerSelected,
|
|
4002
4012
|
src: i
|
|
4003
4013
|
}),
|
|
4004
|
-
/* @__PURE__ */ V(
|
|
4014
|
+
/* @__PURE__ */ V(bt, {
|
|
4005
4015
|
isOpen: _,
|
|
4006
4016
|
onClose: () => v(!1),
|
|
4007
4017
|
children: /* @__PURE__ */ H("div", {
|
|
4008
|
-
className:
|
|
4018
|
+
className: Sr.tenorPickerModalContent,
|
|
4009
4019
|
children: [
|
|
4010
4020
|
w(),
|
|
4011
4021
|
S(),
|
|
@@ -4015,22 +4025,22 @@ function xr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
4015
4025
|
})
|
|
4016
4026
|
]
|
|
4017
4027
|
}) : /* @__PURE__ */ H("div", {
|
|
4018
|
-
className: f(
|
|
4028
|
+
className: f(Sr.tenorPicker, e),
|
|
4019
4029
|
children: [
|
|
4020
|
-
/* @__PURE__ */ V(
|
|
4021
|
-
align:
|
|
4030
|
+
/* @__PURE__ */ V(it, {
|
|
4031
|
+
align: nt.Left,
|
|
4022
4032
|
isOpen: l.length > 0 && _,
|
|
4023
4033
|
onOpenChange: v,
|
|
4024
4034
|
content: /* @__PURE__ */ H(B, { children: [S(), C()] }),
|
|
4025
4035
|
children: w()
|
|
4026
4036
|
}),
|
|
4027
|
-
i && /* @__PURE__ */ V(
|
|
4028
|
-
styleType:
|
|
4037
|
+
i && /* @__PURE__ */ V(Ne, {
|
|
4038
|
+
styleType: Ee.Delete,
|
|
4029
4039
|
onClick: () => x(null),
|
|
4030
4040
|
children: "Remove gif"
|
|
4031
4041
|
}),
|
|
4032
|
-
i && /* @__PURE__ */ V(
|
|
4033
|
-
className:
|
|
4042
|
+
i && /* @__PURE__ */ V(xr, {
|
|
4043
|
+
className: Sr.tenorPickerSelected,
|
|
4034
4044
|
src: i
|
|
4035
4045
|
})
|
|
4036
4046
|
]
|
|
@@ -4038,15 +4048,15 @@ function xr({ className: e, token: t = "", isModal: n = !1, onSelect: r = () =>
|
|
|
4038
4048
|
}
|
|
4039
4049
|
//#endregion
|
|
4040
4050
|
//#region package/common/textarea/textarea.tsx
|
|
4041
|
-
function
|
|
4042
|
-
return /* @__PURE__ */ V(
|
|
4051
|
+
function wr(e) {
|
|
4052
|
+
return /* @__PURE__ */ V(st, {
|
|
4043
4053
|
...e,
|
|
4044
4054
|
multiline: !0
|
|
4045
4055
|
});
|
|
4046
4056
|
}
|
|
4047
4057
|
//#endregion
|
|
4048
4058
|
//#region package/common/themeProvider/defaultTheme.ts
|
|
4049
|
-
var
|
|
4059
|
+
var Tr = {
|
|
4050
4060
|
id: "default",
|
|
4051
4061
|
variables: {
|
|
4052
4062
|
"--grey": "#8A8A8A",
|
|
@@ -4106,14 +4116,14 @@ var Cr = {
|
|
|
4106
4116
|
"--spacing-m": "8px",
|
|
4107
4117
|
"--spacing-l": "16px"
|
|
4108
4118
|
}
|
|
4109
|
-
},
|
|
4119
|
+
}, Er = { colorFade: "colorFade_eLv2g" }, Dr = class extends t {
|
|
4110
4120
|
constructor(...t) {
|
|
4111
4121
|
super(...t), this.state = {
|
|
4112
4122
|
resolvedVariables: {},
|
|
4113
4123
|
colorFadeActive: !1,
|
|
4114
4124
|
currentThemeColor: null
|
|
4115
4125
|
}, this.colorFadeTimeout = null, this.wrapperRef = e.createRef(), this.themeColorMeta = null, this.createdThemeColorMeta = !1, this.applyTheme = (e) => {
|
|
4116
|
-
let t = this.props.themes ?? [
|
|
4126
|
+
let t = this.props.themes ?? [Tr], 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);
|
|
4117
4127
|
this.setState({
|
|
4118
4128
|
resolvedVariables: o,
|
|
4119
4129
|
colorFadeActive: !0
|
|
@@ -4147,7 +4157,7 @@ var Cr = {
|
|
|
4147
4157
|
}
|
|
4148
4158
|
}
|
|
4149
4159
|
resolveChain(e) {
|
|
4150
|
-
let t = (this.props.themes ?? [
|
|
4160
|
+
let t = (this.props.themes ?? [Tr]).find((t) => t.id === e);
|
|
4151
4161
|
return t ? [...t.baseThemeId ? this.resolveChain(t.baseThemeId) : [], t.variables] : [];
|
|
4152
4162
|
}
|
|
4153
4163
|
render() {
|
|
@@ -4155,7 +4165,7 @@ var Cr = {
|
|
|
4155
4165
|
return /* @__PURE__ */ V("div", {
|
|
4156
4166
|
ref: this.wrapperRef,
|
|
4157
4167
|
id: "themeProvider",
|
|
4158
|
-
className: n ?
|
|
4168
|
+
className: n ? Er.colorFade : void 0,
|
|
4159
4169
|
style: t,
|
|
4160
4170
|
children: e
|
|
4161
4171
|
});
|
|
@@ -4163,7 +4173,7 @@ var Cr = {
|
|
|
4163
4173
|
};
|
|
4164
4174
|
//#endregion
|
|
4165
4175
|
//#region package/common/themeProvider/useTheme.ts
|
|
4166
|
-
function
|
|
4176
|
+
function Or(e = "default") {
|
|
4167
4177
|
let [t, n] = d(localStorage.getItem("theme") || e);
|
|
4168
4178
|
return {
|
|
4169
4179
|
currentThemeId: t,
|
|
@@ -4172,7 +4182,7 @@ function Er(e = "default") {
|
|
|
4172
4182
|
}
|
|
4173
4183
|
};
|
|
4174
4184
|
}
|
|
4175
|
-
var
|
|
4185
|
+
var kr = {
|
|
4176
4186
|
container: "container_krdsW",
|
|
4177
4187
|
"container-top-left": "container-top-left_zfDTO",
|
|
4178
4188
|
containerTopLeft: "container-top-left_zfDTO",
|
|
@@ -4209,14 +4219,14 @@ var Dr = {
|
|
|
4209
4219
|
toastCloseButton: "toastCloseButton_n-YST",
|
|
4210
4220
|
toastProgressBar: "toastProgressBar_6vBs6",
|
|
4211
4221
|
toastShrink: "toastShrink_h89HS"
|
|
4212
|
-
},
|
|
4222
|
+
}, Ar = {
|
|
4213
4223
|
info: x,
|
|
4214
4224
|
success: b,
|
|
4215
4225
|
error: S,
|
|
4216
4226
|
warn: R,
|
|
4217
4227
|
default: m
|
|
4218
4228
|
};
|
|
4219
|
-
function
|
|
4229
|
+
function jr({ item: e, isBottom: t, onDismiss: n }) {
|
|
4220
4230
|
let { id: r, content: i, options: o, dismissing: s } = e, { duration: c, showRemainingTime: l, showCloseButton: u, type: d, classNames: m, styles: h } = o;
|
|
4221
4231
|
return a(() => {
|
|
4222
4232
|
if (c === 0) return;
|
|
@@ -4227,28 +4237,28 @@ function kr({ item: e, isBottom: t, onDismiss: n }) {
|
|
|
4227
4237
|
c,
|
|
4228
4238
|
n
|
|
4229
4239
|
]), /* @__PURE__ */ H("div", {
|
|
4230
|
-
className: f(
|
|
4240
|
+
className: f(kr.toast, t ? kr.toastBottom : null, kr[`toast-${d}`], s && kr.toastDismissing, m?.root),
|
|
4231
4241
|
style: h?.root,
|
|
4232
4242
|
children: [
|
|
4233
4243
|
/* @__PURE__ */ V(p, {
|
|
4234
|
-
icon:
|
|
4235
|
-
className: f(
|
|
4244
|
+
icon: Ar[d],
|
|
4245
|
+
className: f(kr.toastIcon, m?.icon),
|
|
4236
4246
|
style: h?.icon
|
|
4237
4247
|
}),
|
|
4238
4248
|
/* @__PURE__ */ V("div", {
|
|
4239
|
-
className: f(
|
|
4249
|
+
className: f(kr.toastContent, m?.content),
|
|
4240
4250
|
style: h?.content,
|
|
4241
4251
|
children: i
|
|
4242
4252
|
}),
|
|
4243
|
-
u && /* @__PURE__ */ V(
|
|
4253
|
+
u && /* @__PURE__ */ V(ze, {
|
|
4244
4254
|
icon: z,
|
|
4245
4255
|
onClick: () => n(r),
|
|
4246
|
-
className: f(
|
|
4256
|
+
className: f(kr.toastCloseButton, m?.closeButton),
|
|
4247
4257
|
style: h?.closeButton,
|
|
4248
4258
|
"aria-label": "Close"
|
|
4249
4259
|
}),
|
|
4250
4260
|
l && c > 0 && /* @__PURE__ */ V("div", {
|
|
4251
|
-
className: f(
|
|
4261
|
+
className: f(kr.toastProgressBar, m?.progressBar),
|
|
4252
4262
|
style: {
|
|
4253
4263
|
"--toast-duration": `${c}ms`,
|
|
4254
4264
|
...h?.progressBar
|
|
@@ -4259,40 +4269,40 @@ function kr({ item: e, isBottom: t, onDismiss: n }) {
|
|
|
4259
4269
|
}
|
|
4260
4270
|
//#endregion
|
|
4261
4271
|
//#region package/common/toast/toastService.ts
|
|
4262
|
-
var
|
|
4263
|
-
function
|
|
4264
|
-
|
|
4272
|
+
var Mr = null;
|
|
4273
|
+
function Nr(e) {
|
|
4274
|
+
Mr = e;
|
|
4265
4275
|
}
|
|
4266
|
-
function
|
|
4267
|
-
|
|
4276
|
+
function Pr() {
|
|
4277
|
+
Mr = null;
|
|
4268
4278
|
}
|
|
4269
|
-
function
|
|
4270
|
-
if (!
|
|
4279
|
+
function Fr(e, t) {
|
|
4280
|
+
if (!Mr) {
|
|
4271
4281
|
console.error("[Toast] No ToastProvider found. Wrap your app with <ToastProvider>.");
|
|
4272
4282
|
return;
|
|
4273
4283
|
}
|
|
4274
|
-
|
|
4284
|
+
Mr(e, t);
|
|
4275
4285
|
}
|
|
4276
4286
|
//#endregion
|
|
4277
4287
|
//#region package/common/toast/toastProvider.tsx
|
|
4278
|
-
var
|
|
4288
|
+
var Ir = {
|
|
4279
4289
|
position: "top-right",
|
|
4280
4290
|
duration: 4e3,
|
|
4281
4291
|
showRemainingTime: !0,
|
|
4282
4292
|
showCloseButton: !0,
|
|
4283
4293
|
allowStacking: !0
|
|
4284
|
-
},
|
|
4285
|
-
function
|
|
4286
|
-
return
|
|
4294
|
+
}, Lr = 220;
|
|
4295
|
+
function Rr(e) {
|
|
4296
|
+
return kr[`container-${e}`];
|
|
4287
4297
|
}
|
|
4288
|
-
function
|
|
4298
|
+
function zr({ children: e, position: t = Ir.position, duration: n = Ir.duration, showRemainingTime: r = Ir.showRemainingTime, showCloseButton: o = Ir.showCloseButton, allowStacking: s = Ir.allowStacking }) {
|
|
4289
4299
|
let [c, l] = d([]), p = u(0), m = i((e) => {
|
|
4290
4300
|
l((t) => t.map((t) => t.id === e ? {
|
|
4291
4301
|
...t,
|
|
4292
4302
|
dismissing: !0
|
|
4293
4303
|
} : t)), setTimeout(() => {
|
|
4294
4304
|
l((t) => t.filter((t) => t.id !== e));
|
|
4295
|
-
},
|
|
4305
|
+
}, Lr);
|
|
4296
4306
|
}, []), h = i((e, i) => {
|
|
4297
4307
|
let a = {
|
|
4298
4308
|
position: i?.position ?? t,
|
|
@@ -4312,7 +4322,7 @@ function Lr({ children: e, position: t = Pr.position, duration: n = Pr.duration,
|
|
|
4312
4322
|
};
|
|
4313
4323
|
l((e) => !s && e.length > 0 ? (setTimeout(() => {
|
|
4314
4324
|
l([c]);
|
|
4315
|
-
},
|
|
4325
|
+
}, Lr), e.map((e) => ({
|
|
4316
4326
|
...e,
|
|
4317
4327
|
dismissing: !0
|
|
4318
4328
|
}))) : [...e, c]);
|
|
@@ -4323,14 +4333,14 @@ function Lr({ children: e, position: t = Pr.position, duration: n = Pr.duration,
|
|
|
4323
4333
|
o,
|
|
4324
4334
|
s
|
|
4325
4335
|
]);
|
|
4326
|
-
a(() => (
|
|
4336
|
+
a(() => (Nr(h), () => Pr()), [h]);
|
|
4327
4337
|
let g = c.reduce((e, t) => {
|
|
4328
4338
|
let n = t.options.position;
|
|
4329
4339
|
return e[n] || (e[n] = []), e[n].push(t), e;
|
|
4330
4340
|
}, {});
|
|
4331
|
-
return /* @__PURE__ */ H(B, { children: [e, /* @__PURE__ */ V(
|
|
4332
|
-
className: f(
|
|
4333
|
-
children: t.map((t) => /* @__PURE__ */ V(
|
|
4341
|
+
return /* @__PURE__ */ H(B, { children: [e, /* @__PURE__ */ V(Be, { children: Object.entries(g).map(([e, t]) => /* @__PURE__ */ V("div", {
|
|
4342
|
+
className: f(kr.container, Rr(e)),
|
|
4343
|
+
children: t.map((t) => /* @__PURE__ */ V(jr, {
|
|
4334
4344
|
item: t,
|
|
4335
4345
|
isBottom: e.startsWith("bottom"),
|
|
4336
4346
|
onDismiss: m
|
|
@@ -4392,7 +4402,7 @@ var $ = {
|
|
|
4392
4402
|
};
|
|
4393
4403
|
//#endregion
|
|
4394
4404
|
//#region package/common/virtualList/virtualRow.tsx
|
|
4395
|
-
function
|
|
4405
|
+
function Br({ index: e, top: t, columnTemplate: n, isSelected: r, showDivider: i, hover: a, onClick: o, observer: c, ariaRowIndex: l, ariaPosInSet: d, ariaSetSize: p, rowRole: m, reorderable: h, draggable: g, isDragging: _, reserveToggleGutter: v, onMouseDown: y, onDragStart: b, onDragOver: x, onDragEnd: S, onDrop: C, onTouchStart: w, dropPosition: T, dropIndentPx: E, dropIndicatorClassName: D, dropIndicatorStyle: O, rowClassName: k, rowStyle: A, children: j }) {
|
|
4396
4406
|
let M = u(null);
|
|
4397
4407
|
return s(() => {
|
|
4398
4408
|
let e = M.current;
|
|
@@ -4441,7 +4451,7 @@ function Rr({ index: e, top: t, columnTemplate: n, isSelected: r, showDivider: i
|
|
|
4441
4451
|
}
|
|
4442
4452
|
//#endregion
|
|
4443
4453
|
//#region package/common/virtualList/virtualList.utils.ts
|
|
4444
|
-
function
|
|
4454
|
+
function Vr(e, t, n, r = 0) {
|
|
4445
4455
|
let i = e.length, a = Array(i + 1);
|
|
4446
4456
|
a[0] = 0;
|
|
4447
4457
|
for (let o = 0; o < i; o++) {
|
|
@@ -4453,7 +4463,7 @@ function zr(e, t, n, r = 0) {
|
|
|
4453
4463
|
totalHeight: a[i]
|
|
4454
4464
|
};
|
|
4455
4465
|
}
|
|
4456
|
-
function
|
|
4466
|
+
function Hr(e, t, n) {
|
|
4457
4467
|
if (n <= 0) return 0;
|
|
4458
4468
|
let r = 0, i = n - 1;
|
|
4459
4469
|
for (; r < i;) {
|
|
@@ -4462,34 +4472,34 @@ function Br(e, t, n) {
|
|
|
4462
4472
|
}
|
|
4463
4473
|
return r;
|
|
4464
4474
|
}
|
|
4465
|
-
function
|
|
4475
|
+
function Ur(e, t, n, r, i) {
|
|
4466
4476
|
if (i === 0) return {
|
|
4467
4477
|
startIndex: 0,
|
|
4468
4478
|
endIndex: -1
|
|
4469
4479
|
};
|
|
4470
|
-
let a =
|
|
4480
|
+
let a = Hr(e, t, i), o = a;
|
|
4471
4481
|
for (; o < i && e[o] < t + n;) o++;
|
|
4472
4482
|
return {
|
|
4473
4483
|
startIndex: Math.max(0, a - r),
|
|
4474
4484
|
endIndex: Math.min(i - 1, o + r - 1)
|
|
4475
4485
|
};
|
|
4476
4486
|
}
|
|
4477
|
-
function
|
|
4487
|
+
function Wr(e, t, n, r, i) {
|
|
4478
4488
|
if (e === -1 || e === t) return null;
|
|
4479
4489
|
let a = r + i / 2;
|
|
4480
4490
|
return (t > e ? n >= a : n <= a) ? t : null;
|
|
4481
4491
|
}
|
|
4482
|
-
function
|
|
4492
|
+
function Gr(e, t, n, r) {
|
|
4483
4493
|
if (n <= 0) return "before";
|
|
4484
4494
|
let i = (e - t) / n;
|
|
4485
4495
|
return r ? i < 1 / 3 ? "before" : i > 2 / 3 ? "after" : "inside" : i < .5 ? "before" : "after";
|
|
4486
4496
|
}
|
|
4487
|
-
function
|
|
4497
|
+
function Kr(e, t) {
|
|
4488
4498
|
let n = t[e], r = e + 1;
|
|
4489
4499
|
for (; r < t.length && t[r] > n;) r++;
|
|
4490
4500
|
return r - 1;
|
|
4491
4501
|
}
|
|
4492
|
-
function
|
|
4502
|
+
function qr(e, t) {
|
|
4493
4503
|
return e.length === 0 ? "1fr" : e.map((e) => {
|
|
4494
4504
|
switch (e.width.type) {
|
|
4495
4505
|
case "fixed": return `${e.width.px}px`;
|
|
@@ -4501,11 +4511,11 @@ function Gr(e, t) {
|
|
|
4501
4511
|
}
|
|
4502
4512
|
}).join(" ");
|
|
4503
4513
|
}
|
|
4504
|
-
var
|
|
4505
|
-
function
|
|
4514
|
+
var Jr = "ahroweui:virtuallist:columns:";
|
|
4515
|
+
function Yr(e) {
|
|
4506
4516
|
if (!e || typeof window > "u") return null;
|
|
4507
4517
|
try {
|
|
4508
|
-
let t = window.localStorage.getItem(
|
|
4518
|
+
let t = window.localStorage.getItem(Jr + e);
|
|
4509
4519
|
if (!t) return null;
|
|
4510
4520
|
let n = JSON.parse(t);
|
|
4511
4521
|
if (n && Array.isArray(n.visible) && Array.isArray(n.known)) return {
|
|
@@ -4515,12 +4525,12 @@ function qr(e) {
|
|
|
4515
4525
|
} catch {}
|
|
4516
4526
|
return null;
|
|
4517
4527
|
}
|
|
4518
|
-
function
|
|
4528
|
+
function Xr(e, t) {
|
|
4519
4529
|
return t && t.known.includes(e.key) ? t.visible.includes(e.key) : !e.defaultHidden;
|
|
4520
4530
|
}
|
|
4521
4531
|
//#endregion
|
|
4522
4532
|
//#region package/common/virtualList/useVirtualWindow.ts
|
|
4523
|
-
function
|
|
4533
|
+
function Zr({ items: e, keys: t, getItemKey: n, estimatedRowHeight: r, rowGap: o, overscan: l, onLoadMore: f, loadMoreThreshold: p }) {
|
|
4524
4534
|
let [m, h] = d(0), [g, _] = d(0), [v, y] = d(0), [b, x] = d(/* @__PURE__ */ new Map()), [S, C] = d(!1), w = u(!1), T = u(null), E = u(null), D = u([]), O = u(null), k = u(0), A = u([]), [j] = d(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((e) => {
|
|
4525
4535
|
x((t) => {
|
|
4526
4536
|
let n = null;
|
|
@@ -4557,7 +4567,7 @@ function Yr({ items: e, keys: t, getItemKey: n, estimatedRowHeight: r, rowGap: o
|
|
|
4557
4567
|
}, []), s(() => {
|
|
4558
4568
|
A.current = t;
|
|
4559
4569
|
});
|
|
4560
|
-
let { offsets: N, totalHeight: P } = c(() =>
|
|
4570
|
+
let { offsets: N, totalHeight: P } = c(() => Vr(t, b, r, o), [
|
|
4561
4571
|
t,
|
|
4562
4572
|
b,
|
|
4563
4573
|
r,
|
|
@@ -4568,7 +4578,7 @@ function Yr({ items: e, keys: t, getItemKey: n, estimatedRowHeight: r, rowGap: o
|
|
|
4568
4578
|
if (D.current = N, !t || n.length === 0) return;
|
|
4569
4579
|
let r = t.scrollTop;
|
|
4570
4580
|
if (r <= 0) return;
|
|
4571
|
-
let i =
|
|
4581
|
+
let i = Hr(n, r, n.length - 1);
|
|
4572
4582
|
if (i >= e.length) return;
|
|
4573
4583
|
let a = r - n[i], o = N[i] + a;
|
|
4574
4584
|
Math.abs(o - r) > .5 && (t.scrollTop = o, k.current = o, h(o));
|
|
@@ -4604,7 +4614,7 @@ function Yr({ items: e, keys: t, getItemKey: n, estimatedRowHeight: r, rowGap: o
|
|
|
4604
4614
|
e,
|
|
4605
4615
|
N,
|
|
4606
4616
|
n
|
|
4607
|
-
]), { startIndex: I, endIndex: ee } = c(() =>
|
|
4617
|
+
]), { startIndex: I, endIndex: ee } = c(() => Ur(N, m, g, l, e.length), [
|
|
4608
4618
|
N,
|
|
4609
4619
|
m,
|
|
4610
4620
|
g,
|
|
@@ -4629,34 +4639,49 @@ function Yr({ items: e, keys: t, getItemKey: n, estimatedRowHeight: r, rowGap: o
|
|
|
4629
4639
|
}
|
|
4630
4640
|
//#endregion
|
|
4631
4641
|
//#region package/common/virtualList/useSelection.ts
|
|
4632
|
-
function
|
|
4633
|
-
let a = r !== void 0, [o, s] = d(/* @__PURE__ */ new Set()),
|
|
4634
|
-
function
|
|
4642
|
+
function Qr({ items: e, getKey: t, multiSelect: n, selectedKeys: r, onSelectionChange: i }) {
|
|
4643
|
+
let a = r !== void 0, [o, s] = d(/* @__PURE__ */ new Set()), l = a ? r : o;
|
|
4644
|
+
function u(e) {
|
|
4635
4645
|
a || s(e), i?.(e);
|
|
4636
4646
|
}
|
|
4637
|
-
function
|
|
4638
|
-
let t = new Set(
|
|
4639
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
4647
|
+
function f(e) {
|
|
4648
|
+
let t = new Set(l);
|
|
4649
|
+
t.has(e) ? t.delete(e) : t.add(e), u(t);
|
|
4640
4650
|
}
|
|
4641
|
-
function
|
|
4651
|
+
function p() {
|
|
4642
4652
|
let n = e.map((e, n) => t(e, n));
|
|
4643
|
-
|
|
4653
|
+
u(n.every((e) => l.has(e)) ? /* @__PURE__ */ new Set() : new Set(n));
|
|
4644
4654
|
}
|
|
4645
|
-
let
|
|
4655
|
+
let { allSelected: m, someSelected: h } = c(() => {
|
|
4656
|
+
if (!n || e.length === 0) return {
|
|
4657
|
+
allSelected: !1,
|
|
4658
|
+
someSelected: !1
|
|
4659
|
+
};
|
|
4660
|
+
let r = e.every((e, n) => l.has(t(e, n)));
|
|
4661
|
+
return {
|
|
4662
|
+
allSelected: r,
|
|
4663
|
+
someSelected: !r && e.some((e, n) => l.has(t(e, n)))
|
|
4664
|
+
};
|
|
4665
|
+
}, [
|
|
4666
|
+
n,
|
|
4667
|
+
e,
|
|
4668
|
+
l,
|
|
4669
|
+
t
|
|
4670
|
+
]);
|
|
4646
4671
|
return {
|
|
4647
|
-
effectiveSelectedKeys:
|
|
4648
|
-
handleRowSelect:
|
|
4649
|
-
handleSelectAll:
|
|
4650
|
-
allSelected:
|
|
4651
|
-
someSelected:
|
|
4672
|
+
effectiveSelectedKeys: l,
|
|
4673
|
+
handleRowSelect: f,
|
|
4674
|
+
handleSelectAll: p,
|
|
4675
|
+
allSelected: m,
|
|
4676
|
+
someSelected: h
|
|
4652
4677
|
};
|
|
4653
4678
|
}
|
|
4654
4679
|
//#endregion
|
|
4655
4680
|
//#region package/common/virtualList/useColumns.ts
|
|
4656
|
-
function
|
|
4681
|
+
function $r({ columns: e, items: t, multiSelect: n, visibleColumnKeys: r, onVisibleColumnsChange: o, persistColumnsKey: c, showColumnToggle: l, rootRef: f, startIndex: p, endIndex: m, containerHeight: h, containerWidth: g }) {
|
|
4657
4682
|
let _ = r !== void 0, [v, y] = d(!1), b = u(null), [x, S] = d({}), [C, w] = d(() => {
|
|
4658
|
-
let t =
|
|
4659
|
-
return new Set((e ?? []).filter((e) =>
|
|
4683
|
+
let t = Yr(c);
|
|
4684
|
+
return new Set((e ?? []).filter((e) => Xr(e, t)).map((e) => e.key));
|
|
4660
4685
|
}), T = u(new Set((e ?? []).map((e) => e.key)));
|
|
4661
4686
|
a(() => {
|
|
4662
4687
|
if (_) return;
|
|
@@ -4669,10 +4694,10 @@ function Zr({ columns: e, items: t, multiSelect: n, visibleColumnKeys: r, onVisi
|
|
|
4669
4694
|
}
|
|
4670
4695
|
if (i) return;
|
|
4671
4696
|
T.current = n;
|
|
4672
|
-
let a =
|
|
4697
|
+
let a = Yr(c);
|
|
4673
4698
|
w((e) => {
|
|
4674
4699
|
let n = /* @__PURE__ */ new Set();
|
|
4675
|
-
for (let i of t) r.has(i.key) ? e.has(i.key) && n.add(i.key) :
|
|
4700
|
+
for (let i of t) r.has(i.key) ? e.has(i.key) && n.add(i.key) : Xr(i, a) && n.add(i.key);
|
|
4676
4701
|
return n;
|
|
4677
4702
|
});
|
|
4678
4703
|
}, [
|
|
@@ -4683,7 +4708,7 @@ function Zr({ columns: e, items: t, multiSelect: n, visibleColumnKeys: r, onVisi
|
|
|
4683
4708
|
if (_ || !c || typeof window > "u") return;
|
|
4684
4709
|
let t = e ?? [];
|
|
4685
4710
|
if (!(t.length === 0 || C.size === 0)) try {
|
|
4686
|
-
window.localStorage.setItem(
|
|
4711
|
+
window.localStorage.setItem(Jr + c, JSON.stringify({
|
|
4687
4712
|
visible: [...C],
|
|
4688
4713
|
known: t.map((e) => e.key)
|
|
4689
4714
|
}));
|
|
@@ -4702,42 +4727,42 @@ function Zr({ columns: e, items: t, multiSelect: n, visibleColumnKeys: r, onVisi
|
|
|
4702
4727
|
}
|
|
4703
4728
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
4704
4729
|
}, [v]);
|
|
4705
|
-
let D = !!e?.length, O = D ? e.filter((e) => E.has(e.key)) : [], k = D ? e.filter((e) => !e.defaultHidden && !E.has(e.key)).length : 0, A = D ? `${n && D ? "40px " : ""}${
|
|
4730
|
+
let D = !!e?.length, O = D ? e.filter((e) => E.has(e.key)) : [], k = D ? e.filter((e) => !e.defaultHidden && !E.has(e.key)).length : 0, A = D ? `${n && D ? "40px " : ""}${qr(O, x)}` : void 0, j = l !== !1 && D, M = O.filter((e) => e.width.type === "fit"), N = M.length > 0, P = M.map((e) => e.key).join("|"), [F, I] = d({
|
|
4706
4731
|
key: P,
|
|
4707
4732
|
items: t
|
|
4708
4733
|
});
|
|
4709
4734
|
(F.key !== P || F.items !== t) && (I({
|
|
4710
4735
|
key: P,
|
|
4711
4736
|
items: t
|
|
4712
|
-
}), Object.keys(x).length > 0 && S({}))
|
|
4713
|
-
|
|
4714
|
-
S((e) => Object.keys(e).length > 0 ? {} : e);
|
|
4715
|
-
});
|
|
4716
|
-
return () => cancelAnimationFrame(e);
|
|
4717
|
-
}, []), a(() => {
|
|
4718
|
-
if (typeof document > "u" || !document.fonts?.ready) return;
|
|
4719
|
-
let e = !1;
|
|
4720
|
-
return document.fonts.ready.then(() => {
|
|
4721
|
-
e || S((e) => Object.keys(e).length > 0 ? {} : e);
|
|
4722
|
-
}), () => {
|
|
4723
|
-
e = !0;
|
|
4724
|
-
};
|
|
4725
|
-
}, []), s(() => {
|
|
4726
|
-
if (!N) return;
|
|
4737
|
+
}), Object.keys(x).length > 0 && S({}));
|
|
4738
|
+
let ee = i(() => {
|
|
4727
4739
|
let e = f.current;
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4740
|
+
if (!e) return;
|
|
4741
|
+
let t = /* @__PURE__ */ new Map();
|
|
4742
|
+
e.querySelectorAll("[data-fit-key]").forEach((e) => {
|
|
4743
|
+
let n = e, r = n.getAttribute("data-fit-key");
|
|
4744
|
+
if (!r) return;
|
|
4745
|
+
let i = n.scrollWidth > n.clientWidth && parseFloat(getComputedStyle(n).paddingRight) || 0, a = n.scrollWidth + i;
|
|
4746
|
+
a > (t.get(r) ?? 0) && t.set(r, a);
|
|
4747
|
+
}), t.size !== 0 && S((n) => {
|
|
4748
|
+
let r = !1, i = { ...n };
|
|
4749
|
+
for (let [a, o] of t) {
|
|
4750
|
+
if (o <= 0) continue;
|
|
4751
|
+
let t = Math.min(Math.ceil(o), e.clientWidth);
|
|
4752
|
+
t > (n[a] ?? 0) && (i[a] = t, r = !0);
|
|
4738
4753
|
}
|
|
4739
|
-
return
|
|
4754
|
+
return r ? i : n;
|
|
4740
4755
|
});
|
|
4756
|
+
}, [f]), [te] = d(() => typeof ResizeObserver > "u" ? null : new ResizeObserver(() => ee())), L = u(/* @__PURE__ */ new Set());
|
|
4757
|
+
a(() => () => {
|
|
4758
|
+
te?.disconnect(), L.current.clear();
|
|
4759
|
+
}, [te]), s(() => {
|
|
4760
|
+
if (!N) return;
|
|
4761
|
+
let e = f.current;
|
|
4762
|
+
if (!e || (ee(), !te)) return;
|
|
4763
|
+
let t = new Set(e.querySelectorAll("[data-fit-key]")), n = L.current;
|
|
4764
|
+
for (let e of n) t.has(e) || (te.unobserve(e), n.delete(e));
|
|
4765
|
+
for (let e of t) n.has(e) || (te.observe(e), n.add(e));
|
|
4741
4766
|
}, [
|
|
4742
4767
|
N,
|
|
4743
4768
|
P,
|
|
@@ -4745,10 +4770,13 @@ function Zr({ columns: e, items: t, multiSelect: n, visibleColumnKeys: r, onVisi
|
|
|
4745
4770
|
p,
|
|
4746
4771
|
m,
|
|
4747
4772
|
h,
|
|
4748
|
-
g
|
|
4773
|
+
g,
|
|
4774
|
+
t,
|
|
4775
|
+
ee,
|
|
4776
|
+
te
|
|
4749
4777
|
]);
|
|
4750
|
-
let
|
|
4751
|
-
function
|
|
4778
|
+
let R = i(() => S({}), []);
|
|
4779
|
+
function ne(e) {
|
|
4752
4780
|
let t = new Set(E);
|
|
4753
4781
|
if (t.has(e)) {
|
|
4754
4782
|
if (t.size <= 1) return;
|
|
@@ -4767,13 +4795,13 @@ function Zr({ columns: e, items: t, multiSelect: n, visibleColumnKeys: r, onVisi
|
|
|
4767
4795
|
toggleOpen: v,
|
|
4768
4796
|
setToggleOpen: y,
|
|
4769
4797
|
toggleRef: b,
|
|
4770
|
-
handleToggleColumn:
|
|
4771
|
-
recalculateColumns:
|
|
4798
|
+
handleToggleColumn: ne,
|
|
4799
|
+
recalculateColumns: R
|
|
4772
4800
|
};
|
|
4773
4801
|
}
|
|
4774
4802
|
//#endregion
|
|
4775
4803
|
//#region package/common/virtualList/useRowDrag.ts
|
|
4776
|
-
function
|
|
4804
|
+
function ei({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longPressDelay: o, dragHandle: c, treeIndentPx: l, keys: f, depths: p, isGroupAt: m, rootRef: h, keysRef: g }) {
|
|
4777
4805
|
let _ = u(null), [v, y] = d(null), [b, x] = d(null), S = u(null), C = u(n), w = u(r), T = u(t), E = u(p), D = u(m), O = u(!0), k = u(null), A = u(!1), j = u(null), M = u(0), N = u(0), P = u(null), F = u(!1), I = u(null), ee = u(0), te = u(0), L = u(0), [R] = d(() => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)").matches : !1);
|
|
4778
4806
|
s(() => {
|
|
4779
4807
|
C.current = n, w.current = r, T.current = t, E.current = p, S.current = b, D.current = m;
|
|
@@ -4792,8 +4820,8 @@ function Qr({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
4792
4820
|
let r = _.current;
|
|
4793
4821
|
if (r == null) return null;
|
|
4794
4822
|
let i = f.indexOf(r);
|
|
4795
|
-
if (i !== -1 && e >= i && e <=
|
|
4796
|
-
let a =
|
|
4823
|
+
if (i !== -1 && e >= i && e <= Kr(i, p)) return null;
|
|
4824
|
+
let a = Gr(t, n.top, n.height, m(e));
|
|
4797
4825
|
return {
|
|
4798
4826
|
key: f[e],
|
|
4799
4827
|
position: a
|
|
@@ -4818,7 +4846,7 @@ function Qr({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
4818
4846
|
t.preventDefault();
|
|
4819
4847
|
let r = _.current;
|
|
4820
4848
|
if (r == null) return;
|
|
4821
|
-
let i = f.indexOf(r), a = t.currentTarget.getBoundingClientRect(), o =
|
|
4849
|
+
let i = f.indexOf(r), a = t.currentTarget.getBoundingClientRect(), o = Wr(i, e, t.clientY, a.top, a.height);
|
|
4822
4850
|
o != null && n?.(i, o);
|
|
4823
4851
|
}
|
|
4824
4852
|
function oe() {
|
|
@@ -4834,18 +4862,18 @@ function Qr({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
4834
4862
|
let s = g.current.indexOf(t), c = a.getBoundingClientRect();
|
|
4835
4863
|
if (T.current) {
|
|
4836
4864
|
let e = g.current, t = E.current;
|
|
4837
|
-
if (s !== -1 && o >= s && o <=
|
|
4865
|
+
if (s !== -1 && o >= s && o <= Kr(s, t)) {
|
|
4838
4866
|
x(null);
|
|
4839
4867
|
return;
|
|
4840
4868
|
}
|
|
4841
|
-
let n =
|
|
4869
|
+
let n = Gr(r, c.top, c.height, D.current(o)), i = {
|
|
4842
4870
|
key: e[o],
|
|
4843
4871
|
position: n
|
|
4844
4872
|
};
|
|
4845
4873
|
x((e) => e?.key === i.key && e?.position === i.position ? e : i);
|
|
4846
4874
|
return;
|
|
4847
4875
|
}
|
|
4848
|
-
let l =
|
|
4876
|
+
let l = Wr(s, o, r, c.top, c.height);
|
|
4849
4877
|
l != null && C.current?.(s, l);
|
|
4850
4878
|
}, [h, g]), se = i(() => {
|
|
4851
4879
|
let e = I.current;
|
|
@@ -4877,14 +4905,14 @@ function Qr({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
4877
4905
|
e.cancelable && e.preventDefault(), se(), U(t.clientX);
|
|
4878
4906
|
}
|
|
4879
4907
|
}, [U, se]);
|
|
4880
|
-
function
|
|
4908
|
+
function ue(n, r) {
|
|
4881
4909
|
if (!e && !t || c && !r.target.closest("[data-drag-handle]") || k.current != null || A.current) return;
|
|
4882
4910
|
let i = r.touches[0];
|
|
4883
4911
|
i && (j.current = i.clientY, M.current = i.clientX, N.current = i.clientY, window.addEventListener("touchmove", le, { passive: !1 }), window.addEventListener("touchend", ce), window.addEventListener("touchcancel", ce), k.current = window.setTimeout(() => {
|
|
4884
|
-
k.current = null, A.current = !0, _.current = n, y(n), navigator.vibrate?.(10), document.body.style.touchAction = "none", document.body.style.overscrollBehavior = "none",
|
|
4912
|
+
k.current = null, A.current = !0, _.current = n, y(n), navigator.vibrate?.(10), document.body.style.touchAction = "none", document.body.style.overscrollBehavior = "none", de(n), P.current ??= requestAnimationFrame(W);
|
|
4885
4913
|
}, o));
|
|
4886
4914
|
}
|
|
4887
|
-
function
|
|
4915
|
+
function de(e) {
|
|
4888
4916
|
let t = h.current;
|
|
4889
4917
|
if (!t) return;
|
|
4890
4918
|
let n = g.current.indexOf(e), r = t.querySelector(`[data-index="${n}"]`);
|
|
@@ -4908,37 +4936,37 @@ function Qr({ reorderable: e, treeReorder: t, onReorder: n, onTreeDrop: r, longP
|
|
|
4908
4936
|
}), t.appendChild(a), I.current = a, se();
|
|
4909
4937
|
}
|
|
4910
4938
|
a(() => ce, [ce]);
|
|
4911
|
-
let
|
|
4912
|
-
function
|
|
4939
|
+
let G = e || t;
|
|
4940
|
+
function fe(n, r) {
|
|
4913
4941
|
let i = t && b?.key === r ? b.position : void 0;
|
|
4914
4942
|
return {
|
|
4915
|
-
reorderable:
|
|
4916
|
-
draggable:
|
|
4917
|
-
isDragging:
|
|
4918
|
-
onMouseDown:
|
|
4919
|
-
onDragStart:
|
|
4943
|
+
reorderable: G,
|
|
4944
|
+
draggable: G && !R || void 0,
|
|
4945
|
+
isDragging: G && r === v,
|
|
4946
|
+
onMouseDown: G && c ? ne : void 0,
|
|
4947
|
+
onDragStart: G ? (e) => z(r, e) : void 0,
|
|
4920
4948
|
onDragOver: t ? (e) => B(n, e) : e ? (e) => ae(n, e) : void 0,
|
|
4921
4949
|
onDragEnd: t ? ie : e ? oe : void 0,
|
|
4922
4950
|
onDrop: t ? H : void 0,
|
|
4923
|
-
onTouchStart:
|
|
4951
|
+
onTouchStart: G ? (e) => ue(r, e) : void 0,
|
|
4924
4952
|
dropPosition: i,
|
|
4925
4953
|
dropIndentPx: i ? (p[n] ?? 0) * l : void 0
|
|
4926
4954
|
};
|
|
4927
4955
|
}
|
|
4928
|
-
function
|
|
4956
|
+
function K() {
|
|
4929
4957
|
return F.current ? (F.current = !1, !0) : !1;
|
|
4930
4958
|
}
|
|
4931
4959
|
return {
|
|
4932
4960
|
draggingKey: v,
|
|
4933
|
-
dragEnabled:
|
|
4934
|
-
getRowDragProps:
|
|
4935
|
-
consumeSuppressedClick:
|
|
4961
|
+
dragEnabled: G,
|
|
4962
|
+
getRowDragProps: fe,
|
|
4963
|
+
consumeSuppressedClick: K
|
|
4936
4964
|
};
|
|
4937
4965
|
}
|
|
4938
4966
|
//#endregion
|
|
4939
4967
|
//#region package/common/virtualList/virtualList.tsx
|
|
4940
|
-
function
|
|
4941
|
-
let re = i((e, t) => d ? d(e, t) : t, [d]), ie = c(() => e.map((e, t) => re(e, t)), [e, re]), ae = c(() => A ? e.map((e, t) => A(e, t)) : [], [e, A]), oe = i((t) => j ? j(e[t], t) : !1, [j, e]), U =
|
|
4968
|
+
function ti({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedRowHeight: a = 40, overscan: s = 3, rowGap: l = 0, selectedKey: u, getItemKey: d, onRowClick: m, visibleColumnKeys: h, onVisibleColumnsChange: g, persistColumnsKey: _, showColumnToggle: v, onLoadMore: y, loadMoreThreshold: b = 100, isLoading: x = !1, multiSelect: S = !1, selectedKeys: C, onSelectionChange: w, reorderable: T = !1, onReorder: E, longPressDelay: D = 400, treeReorder: O = !1, getItemDepth: A, isGroup: j, onTreeDrop: M, treeIndentPx: N = 24, dragHandle: P = !1, showDivider: F = !0, rowHover: I = !0, className: ee, style: te, classNames: L, styles: R, ...ne }, z) {
|
|
4969
|
+
let re = i((e, t) => d ? d(e, t) : t, [d]), ie = c(() => e.map((e, t) => re(e, t)), [e, re]), ae = c(() => A ? e.map((e, t) => A(e, t)) : [], [e, A]), oe = i((t) => j ? j(e[t], t) : !1, [j, e]), U = Zr({
|
|
4942
4970
|
items: e,
|
|
4943
4971
|
keys: ie,
|
|
4944
4972
|
getItemKey: d,
|
|
@@ -4947,13 +4975,13 @@ function $r({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4947
4975
|
overscan: s,
|
|
4948
4976
|
onLoadMore: y,
|
|
4949
4977
|
loadMoreThreshold: b
|
|
4950
|
-
}), { rootRef: se, headerRef: W, rowObserver: ce, keysRef: le, offsets:
|
|
4978
|
+
}), { rootRef: se, headerRef: W, rowObserver: ce, keysRef: le, offsets: ue, totalHeight: de, startIndex: G, endIndex: fe } = U, K = Qr({
|
|
4951
4979
|
items: e,
|
|
4952
4980
|
getKey: re,
|
|
4953
4981
|
multiSelect: S,
|
|
4954
4982
|
selectedKeys: C,
|
|
4955
4983
|
onSelectionChange: w
|
|
4956
|
-
}), { effectiveSelectedKeys:
|
|
4984
|
+
}), { effectiveSelectedKeys: pe } = K, { hasColumns: me, visibleColumns: he, columnTemplate: ge, shouldShowToggle: _e, effectiveVisible: ve, manuallyHiddenCount: ye, toggleOpen: be, setToggleOpen: xe, toggleRef: Se, handleToggleColumn: q, recalculateColumns: Ce } = $r({
|
|
4957
4985
|
columns: n,
|
|
4958
4986
|
items: e,
|
|
4959
4987
|
multiSelect: S,
|
|
@@ -4962,16 +4990,16 @@ function $r({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4962
4990
|
persistColumnsKey: _,
|
|
4963
4991
|
showColumnToggle: v,
|
|
4964
4992
|
rootRef: se,
|
|
4965
|
-
startIndex:
|
|
4966
|
-
endIndex:
|
|
4993
|
+
startIndex: G,
|
|
4994
|
+
endIndex: fe,
|
|
4967
4995
|
containerHeight: U.containerHeight,
|
|
4968
4996
|
containerWidth: U.containerWidth
|
|
4969
4997
|
});
|
|
4970
4998
|
o(z, () => ({
|
|
4971
4999
|
...U.scrollApi,
|
|
4972
|
-
recalculateColumns:
|
|
4973
|
-
}), [U.scrollApi,
|
|
4974
|
-
let
|
|
5000
|
+
recalculateColumns: Ce
|
|
5001
|
+
}), [U.scrollApi, Ce]);
|
|
5002
|
+
let we = ei({
|
|
4975
5003
|
reorderable: T,
|
|
4976
5004
|
treeReorder: O,
|
|
4977
5005
|
onReorder: E,
|
|
@@ -4984,40 +5012,40 @@ function $r({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
4984
5012
|
isGroupAt: oe,
|
|
4985
5013
|
rootRef: se,
|
|
4986
5014
|
keysRef: le
|
|
4987
|
-
}),
|
|
4988
|
-
let r = e[n], i = re(r, n), a = u != null && i === u ||
|
|
4989
|
-
return /* @__PURE__ */ V(
|
|
5015
|
+
}), Ee = (n) => {
|
|
5016
|
+
let r = e[n], i = re(r, n), a = u != null && i === u || pe.has(i), o = we.getRowDragProps(n, i);
|
|
5017
|
+
return /* @__PURE__ */ V(Br, {
|
|
4990
5018
|
index: n,
|
|
4991
|
-
top:
|
|
4992
|
-
columnTemplate:
|
|
5019
|
+
top: ue[n],
|
|
5020
|
+
columnTemplate: ge,
|
|
4993
5021
|
isSelected: a,
|
|
4994
5022
|
showDivider: F,
|
|
4995
5023
|
hover: I,
|
|
4996
5024
|
onClick: () => {
|
|
4997
|
-
|
|
5025
|
+
we.consumeSuppressedClick() || m?.(r, n);
|
|
4998
5026
|
},
|
|
4999
5027
|
observer: ce,
|
|
5000
|
-
ariaRowIndex:
|
|
5001
|
-
ariaPosInSet:
|
|
5002
|
-
ariaSetSize:
|
|
5003
|
-
rowRole:
|
|
5004
|
-
reserveToggleGutter:
|
|
5028
|
+
ariaRowIndex: me ? n + 2 : void 0,
|
|
5029
|
+
ariaPosInSet: me ? void 0 : n + 1,
|
|
5030
|
+
ariaSetSize: me ? void 0 : e.length,
|
|
5031
|
+
rowRole: me ? "row" : "listitem",
|
|
5032
|
+
reserveToggleGutter: _e,
|
|
5005
5033
|
...o,
|
|
5006
5034
|
dropIndicatorClassName: L?.dropIndicator,
|
|
5007
5035
|
dropIndicatorStyle: R?.dropIndicator,
|
|
5008
5036
|
rowClassName: L?.row,
|
|
5009
5037
|
rowStyle: R?.row,
|
|
5010
|
-
children:
|
|
5038
|
+
children: me ? /* @__PURE__ */ H(B, { children: [S && /* @__PURE__ */ V("div", {
|
|
5011
5039
|
className: f($.virtualListSelectCell, L?.selectCell),
|
|
5012
5040
|
style: R?.selectCell,
|
|
5013
5041
|
role: "gridcell",
|
|
5014
5042
|
onClick: (e) => e.stopPropagation(),
|
|
5015
|
-
children: /* @__PURE__ */ V(
|
|
5016
|
-
selected:
|
|
5017
|
-
onToggle: () =>
|
|
5043
|
+
children: /* @__PURE__ */ V(Ye, {
|
|
5044
|
+
selected: pe.has(i),
|
|
5045
|
+
onToggle: () => K.handleRowSelect(i),
|
|
5018
5046
|
"aria-label": "Select row"
|
|
5019
5047
|
})
|
|
5020
|
-
}),
|
|
5048
|
+
}), he.map((e) => /* @__PURE__ */ V("div", {
|
|
5021
5049
|
className: f($.virtualListCell, L?.cell),
|
|
5022
5050
|
style: R?.cell,
|
|
5023
5051
|
role: "gridcell",
|
|
@@ -5025,28 +5053,28 @@ function $r({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
5025
5053
|
children: e.renderCell(r, n)
|
|
5026
5054
|
}, e.key))] }) : t?.(r, n)
|
|
5027
5055
|
}, i);
|
|
5028
|
-
},
|
|
5029
|
-
for (let e =
|
|
5030
|
-
let
|
|
5031
|
-
return
|
|
5056
|
+
}, De = [];
|
|
5057
|
+
for (let e = G; e <= fe; e++) De.push(Ee(e));
|
|
5058
|
+
let Oe = we.draggingKey == null ? -1 : ie.indexOf(we.draggingKey);
|
|
5059
|
+
return Oe >= 0 && (Oe < G || Oe > fe) && De.push(Ee(Oe)), /* @__PURE__ */ H("div", {
|
|
5032
5060
|
...ne,
|
|
5033
5061
|
ref: se,
|
|
5034
|
-
className: f($.virtualList,
|
|
5062
|
+
className: f($.virtualList, we.draggingKey != null && $.virtualListReordering, ee, L?.root),
|
|
5035
5063
|
style: {
|
|
5036
5064
|
height: r,
|
|
5037
5065
|
...te,
|
|
5038
5066
|
...R?.root
|
|
5039
5067
|
},
|
|
5040
5068
|
onScroll: U.handleScroll,
|
|
5041
|
-
role:
|
|
5042
|
-
"aria-rowcount":
|
|
5069
|
+
role: me ? "grid" : "list",
|
|
5070
|
+
"aria-rowcount": me ? e.length + 1 : void 0,
|
|
5043
5071
|
children: [
|
|
5044
|
-
|
|
5072
|
+
me && /* @__PURE__ */ H("div", {
|
|
5045
5073
|
ref: W,
|
|
5046
5074
|
className: f($.virtualListHeader, L?.header),
|
|
5047
5075
|
style: {
|
|
5048
|
-
gridTemplateColumns:
|
|
5049
|
-
...
|
|
5076
|
+
gridTemplateColumns: ge,
|
|
5077
|
+
..._e ? { paddingRight: 32 } : {},
|
|
5050
5078
|
...R?.header
|
|
5051
5079
|
},
|
|
5052
5080
|
role: "row",
|
|
@@ -5056,49 +5084,49 @@ function $r({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
5056
5084
|
className: f($.virtualListSelectCell, L?.selectCell),
|
|
5057
5085
|
style: R?.selectCell,
|
|
5058
5086
|
role: "columnheader",
|
|
5059
|
-
children: /* @__PURE__ */ V(
|
|
5060
|
-
selected:
|
|
5061
|
-
onToggle:
|
|
5087
|
+
children: /* @__PURE__ */ V(Ye, {
|
|
5088
|
+
selected: K.allSelected || K.someSelected,
|
|
5089
|
+
onToggle: K.handleSelectAll,
|
|
5062
5090
|
"aria-label": "Select all rows"
|
|
5063
5091
|
})
|
|
5064
5092
|
}),
|
|
5065
|
-
|
|
5093
|
+
he.map((e) => /* @__PURE__ */ V("div", {
|
|
5066
5094
|
className: f($.virtualListHeaderCell, L?.headerCell),
|
|
5067
5095
|
style: R?.headerCell,
|
|
5068
5096
|
role: "columnheader",
|
|
5069
5097
|
"data-fit-key": e.width.type === "fit" ? e.key : void 0,
|
|
5070
5098
|
children: e.label
|
|
5071
5099
|
}, e.key)),
|
|
5072
|
-
|
|
5073
|
-
ref:
|
|
5100
|
+
_e && /* @__PURE__ */ H("div", {
|
|
5101
|
+
ref: Se,
|
|
5074
5102
|
className: $.virtualListToggleWrapper,
|
|
5075
5103
|
children: [
|
|
5076
5104
|
/* @__PURE__ */ V("button", {
|
|
5077
5105
|
type: "button",
|
|
5078
5106
|
className: f($.virtualListHeaderToggle, L?.headerToggle),
|
|
5079
5107
|
style: R?.headerToggle,
|
|
5080
|
-
onClick: () =>
|
|
5108
|
+
onClick: () => xe((e) => !e),
|
|
5081
5109
|
"aria-label": "Toggle column visibility",
|
|
5082
5110
|
children: /* @__PURE__ */ V(p, {
|
|
5083
5111
|
icon: k,
|
|
5084
5112
|
style: R?.headerToggle
|
|
5085
5113
|
})
|
|
5086
5114
|
}),
|
|
5087
|
-
|
|
5115
|
+
ye > 0 && /* @__PURE__ */ V("span", {
|
|
5088
5116
|
className: f($.virtualListColumnChip, L?.columnChip),
|
|
5089
5117
|
style: R?.columnChip,
|
|
5090
|
-
"data-column-hidden-count":
|
|
5091
|
-
"aria-label": `${
|
|
5092
|
-
children:
|
|
5118
|
+
"data-column-hidden-count": ye,
|
|
5119
|
+
"aria-label": `${ye} columns hidden`,
|
|
5120
|
+
children: ye
|
|
5093
5121
|
}),
|
|
5094
|
-
|
|
5122
|
+
be && /* @__PURE__ */ V("div", {
|
|
5095
5123
|
className: f($.virtualListTogglePopover, L?.togglePopover),
|
|
5096
5124
|
style: R?.togglePopover,
|
|
5097
|
-
children: n.map((e) => /* @__PURE__ */ V(
|
|
5125
|
+
children: n.map((e) => /* @__PURE__ */ V(Ye, {
|
|
5098
5126
|
className: f($.virtualListToggleItem, L?.toggleItem),
|
|
5099
5127
|
style: R?.toggleItem,
|
|
5100
|
-
selected:
|
|
5101
|
-
onToggle: () =>
|
|
5128
|
+
selected: ve.has(e.key),
|
|
5129
|
+
onToggle: () => q(e.key),
|
|
5102
5130
|
cursorDefault: !1,
|
|
5103
5131
|
children: e.label
|
|
5104
5132
|
}, e.key))
|
|
@@ -5109,24 +5137,24 @@ function $r({ items: e, renderRow: t, columns: n, height: r = "100%", estimatedR
|
|
|
5109
5137
|
}),
|
|
5110
5138
|
x ? /* @__PURE__ */ V("div", {
|
|
5111
5139
|
className: $.virtualListLoadingFull,
|
|
5112
|
-
children: /* @__PURE__ */ V(
|
|
5140
|
+
children: /* @__PURE__ */ V(Te, { className: $.virtualListSpinner })
|
|
5113
5141
|
}) : /* @__PURE__ */ V("div", {
|
|
5114
5142
|
className: f($.virtualListBody, L?.body),
|
|
5115
5143
|
style: {
|
|
5116
|
-
height:
|
|
5144
|
+
height: de,
|
|
5117
5145
|
...R?.body
|
|
5118
5146
|
},
|
|
5119
|
-
children:
|
|
5147
|
+
children: De
|
|
5120
5148
|
}),
|
|
5121
5149
|
U.showLoadMoreSpinner && /* @__PURE__ */ V("div", {
|
|
5122
5150
|
className: f($.virtualListLoadingIndicator, L?.loadingIndicator),
|
|
5123
5151
|
style: R?.loadingIndicator,
|
|
5124
|
-
children: /* @__PURE__ */ V(
|
|
5152
|
+
children: /* @__PURE__ */ V(Te, { className: $.virtualListSpinner })
|
|
5125
5153
|
})
|
|
5126
5154
|
]
|
|
5127
5155
|
});
|
|
5128
5156
|
}
|
|
5129
|
-
var
|
|
5157
|
+
var ni = e.forwardRef(ti), ri = {
|
|
5130
5158
|
wizard: "wizard_uRBAN",
|
|
5131
5159
|
"wizard-content": "wizard-content_lcl4C",
|
|
5132
5160
|
wizardContent: "wizard-content_lcl4C",
|
|
@@ -5137,7 +5165,7 @@ var ei = e.forwardRef($r), ti = {
|
|
|
5137
5165
|
};
|
|
5138
5166
|
//#endregion
|
|
5139
5167
|
//#region package/common/wizard/wizard.tsx
|
|
5140
|
-
function
|
|
5168
|
+
function ii({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null, className: r, style: i, classNames: o, styles: s, ...c }) {
|
|
5141
5169
|
let [l, p] = d(void 0), [m, h] = d(!1), [g, _] = d(e), v = u([]), y = u(null);
|
|
5142
5170
|
e !== g && (_(e), h(!0)), a(() => {
|
|
5143
5171
|
if (!m) return;
|
|
@@ -5157,10 +5185,10 @@ function ni({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null,
|
|
|
5157
5185
|
};
|
|
5158
5186
|
return /* @__PURE__ */ V("div", {
|
|
5159
5187
|
...c,
|
|
5160
|
-
className: f(
|
|
5188
|
+
className: f(ri.wizard, o?.root, r),
|
|
5161
5189
|
style: b,
|
|
5162
5190
|
children: /* @__PURE__ */ V("div", {
|
|
5163
|
-
className: f(
|
|
5191
|
+
className: f(ri.wizardContentContainer, o?.container),
|
|
5164
5192
|
style: {
|
|
5165
5193
|
width: `${t * 100}%`,
|
|
5166
5194
|
marginLeft: `-${e * 100}%`,
|
|
@@ -5170,14 +5198,14 @@ function ni({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null,
|
|
|
5170
5198
|
ref: (e) => {
|
|
5171
5199
|
v.current[i] = e;
|
|
5172
5200
|
},
|
|
5173
|
-
className: f(
|
|
5201
|
+
className: f(ri.wizardContent, o?.step),
|
|
5174
5202
|
style: {
|
|
5175
5203
|
width: `${100 / t}%`,
|
|
5176
5204
|
marginLeft: `${100 / t * i}%`,
|
|
5177
5205
|
...s?.step
|
|
5178
5206
|
},
|
|
5179
5207
|
children: /* @__PURE__ */ V("div", {
|
|
5180
|
-
className: f({ [
|
|
5208
|
+
className: f({ [ri.wizardContentOutOfFrame]: e !== i && !m }, o?.stepContent),
|
|
5181
5209
|
style: s?.stepContent,
|
|
5182
5210
|
inert: e === i ? void 0 : !0,
|
|
5183
5211
|
children: n(i)
|
|
@@ -5188,20 +5216,20 @@ function ni({ currentStep: e = 0, stepCount: t = 0, renderStep: n = () => null,
|
|
|
5188
5216
|
}
|
|
5189
5217
|
//#endregion
|
|
5190
5218
|
//#region package/services/formValidation/formValidatorGroup.ts
|
|
5191
|
-
function
|
|
5219
|
+
function ai(e) {
|
|
5192
5220
|
let t = e;
|
|
5193
5221
|
return t?.errors && Array.isArray(t.errors) ? t.errors.flatMap((e) => Object.entries(e).map(([e, t]) => ({
|
|
5194
5222
|
id: e,
|
|
5195
5223
|
message: t
|
|
5196
5224
|
}))) : [];
|
|
5197
5225
|
}
|
|
5198
|
-
var
|
|
5226
|
+
var oi = class {
|
|
5199
5227
|
#e;
|
|
5200
5228
|
#t;
|
|
5201
5229
|
#n;
|
|
5202
5230
|
#r;
|
|
5203
5231
|
#i;
|
|
5204
|
-
constructor(e, t = null, { initialValues: n, onSubmit: r = () => void 0, onValidate: i = () => void 0, errorParser: a =
|
|
5232
|
+
constructor(e, t = null, { initialValues: n, onSubmit: r = () => void 0, onValidate: i = () => void 0, errorParser: a = ai, onSubmitError: o = () => void 0 } = {}) {
|
|
5205
5233
|
this.#t = !1, this.#i = [], this.getFormError = () => {
|
|
5206
5234
|
let e = Object.keys(this.group);
|
|
5207
5235
|
for (let t = 0; t < e.length; t += 1) {
|
|
@@ -5291,7 +5319,7 @@ var ii = class {
|
|
|
5291
5319
|
};
|
|
5292
5320
|
//#endregion
|
|
5293
5321
|
//#region package/services/formValidation/FormValidatorGroupForm.tsx
|
|
5294
|
-
function
|
|
5322
|
+
function si(e) {
|
|
5295
5323
|
return function({ children: t, ...n }) {
|
|
5296
5324
|
return /* @__PURE__ */ V("form", {
|
|
5297
5325
|
onSubmit: e.submit,
|
|
@@ -5303,16 +5331,16 @@ function ai(e) {
|
|
|
5303
5331
|
}
|
|
5304
5332
|
//#endregion
|
|
5305
5333
|
//#region package/services/formValidation/FormValidatorGroupWithForm.tsx
|
|
5306
|
-
var
|
|
5307
|
-
|
|
5308
|
-
},
|
|
5334
|
+
var ci = (e) => {
|
|
5335
|
+
Fr(e[0].message, { type: "error" });
|
|
5336
|
+
}, li = class extends oi {
|
|
5309
5337
|
constructor(e, t = null, n) {
|
|
5310
5338
|
super(e, t, {
|
|
5311
5339
|
...n,
|
|
5312
|
-
onSubmitError: n?.onSubmitError ??
|
|
5313
|
-
}), this.Form =
|
|
5340
|
+
onSubmitError: n?.onSubmitError ?? ci
|
|
5341
|
+
}), this.Form = si(this);
|
|
5314
5342
|
}
|
|
5315
|
-
},
|
|
5343
|
+
}, ui = class {
|
|
5316
5344
|
#e;
|
|
5317
5345
|
#t;
|
|
5318
5346
|
#n;
|
|
@@ -5366,44 +5394,44 @@ var oi = (e) => {
|
|
|
5366
5394
|
return this.#r;
|
|
5367
5395
|
}
|
|
5368
5396
|
};
|
|
5369
|
-
|
|
5397
|
+
ui.prototype.toString = function() {
|
|
5370
5398
|
return `${this.value}`;
|
|
5371
5399
|
};
|
|
5372
5400
|
//#endregion
|
|
5373
5401
|
//#region package/services/regexp.ts
|
|
5374
|
-
function
|
|
5402
|
+
function di(e) {
|
|
5375
5403
|
return /^[0-9]+$/.test(e);
|
|
5376
5404
|
}
|
|
5377
|
-
function
|
|
5405
|
+
function fi(e) {
|
|
5378
5406
|
return /^[0-9]{2}.[0-9]{2}.[0-9]{4}$/.test(e);
|
|
5379
5407
|
}
|
|
5380
|
-
function
|
|
5408
|
+
function pi(e) {
|
|
5381
5409
|
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);
|
|
5382
5410
|
}
|
|
5383
|
-
function
|
|
5411
|
+
function mi(e) {
|
|
5384
5412
|
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);
|
|
5385
5413
|
}
|
|
5386
|
-
function
|
|
5414
|
+
function hi(e) {
|
|
5387
5415
|
return /^[A-Z]{6}[A-Z\d]{2}([A-Z\d]{3})?$/.test(e);
|
|
5388
5416
|
}
|
|
5389
|
-
function
|
|
5417
|
+
function gi(e) {
|
|
5390
5418
|
return /[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}(\/[-a-zA-Z0-9@:%_+.~#?&//=]*)?$/.test(e);
|
|
5391
5419
|
}
|
|
5392
|
-
function
|
|
5420
|
+
function _i(e) {
|
|
5393
5421
|
return /^[\w!@#$%^&*?±§~`'"/\\[\]{}\-,.();:><+=|öäüÖÄÜß €μ]{8,}$/.test(e);
|
|
5394
5422
|
}
|
|
5395
|
-
function
|
|
5423
|
+
function vi(e) {
|
|
5396
5424
|
return /^(?=.*[a-zöäüA-ZÖÄÜß])/.test(e);
|
|
5397
5425
|
}
|
|
5398
|
-
function
|
|
5426
|
+
function yi(e) {
|
|
5399
5427
|
return /^(?=.*\d)/.test(e);
|
|
5400
5428
|
}
|
|
5401
|
-
function
|
|
5402
|
-
return
|
|
5429
|
+
function bi(e) {
|
|
5430
|
+
return _i(e) && vi(e) && yi(e);
|
|
5403
5431
|
}
|
|
5404
5432
|
//#endregion
|
|
5405
5433
|
//#region package/services/formValidation/validators.ts
|
|
5406
|
-
var
|
|
5434
|
+
var xi = { t: (e, t) => ({
|
|
5407
5435
|
"formValidators.minLength": `Must be at least ${t?.min} characters long`,
|
|
5408
5436
|
"formValidators.maxLength": `Must be at most ${t?.max} characters long`,
|
|
5409
5437
|
"formValidators.email": "Must be a valid email address",
|
|
@@ -5418,23 +5446,23 @@ var yi = { t: (e, t) => ({
|
|
|
5418
5446
|
"garages.errors.bic": "Must be a valid BIC",
|
|
5419
5447
|
"formValidators.minLetters": `Must contain at least ${t?.smart_count} letters`,
|
|
5420
5448
|
"formValidators.minDigits": `Must contain at least ${t?.smart_count} digits`
|
|
5421
|
-
})[e] || e },
|
|
5449
|
+
})[e] || e }, Si = class e {
|
|
5422
5450
|
static {
|
|
5423
5451
|
this.minLength = (e, t) => (n) => !n || n.length < e ? {
|
|
5424
5452
|
id: "minLength",
|
|
5425
|
-
message: t ||
|
|
5453
|
+
message: t || xi.t("formValidators.minLength", { min: e })
|
|
5426
5454
|
} : null;
|
|
5427
5455
|
}
|
|
5428
5456
|
static {
|
|
5429
5457
|
this.maxLength = (e, t) => (n) => n && n.length > e ? {
|
|
5430
5458
|
id: "maxLength",
|
|
5431
|
-
message: t ||
|
|
5459
|
+
message: t || xi.t("formValidators.maxLength", { max: e })
|
|
5432
5460
|
} : null;
|
|
5433
5461
|
}
|
|
5434
5462
|
static {
|
|
5435
|
-
this.email = (e) => (t) => t && !
|
|
5463
|
+
this.email = (e) => (t) => t && !mi(t) ? {
|
|
5436
5464
|
id: "email",
|
|
5437
|
-
message: e ||
|
|
5465
|
+
message: e || xi.t("formValidators.email")
|
|
5438
5466
|
} : null;
|
|
5439
5467
|
}
|
|
5440
5468
|
static {
|
|
@@ -5442,7 +5470,7 @@ var yi = { t: (e, t) => ({
|
|
|
5442
5470
|
function t(t, n) {
|
|
5443
5471
|
return !t && t !== 0 ? {
|
|
5444
5472
|
id: "required",
|
|
5445
|
-
message: e ||
|
|
5473
|
+
message: e || xi.t("formValidators.required", { label: n || xi.t("formValidators.value") })
|
|
5446
5474
|
} : null;
|
|
5447
5475
|
}
|
|
5448
5476
|
return t.validatorId = "required", t;
|
|
@@ -5451,13 +5479,13 @@ var yi = { t: (e, t) => ({
|
|
|
5451
5479
|
static {
|
|
5452
5480
|
this.mustBeNumber = (e) => (t) => t && Number.isNaN(+t) ? {
|
|
5453
5481
|
id: "mustBeNumber",
|
|
5454
|
-
message: e ||
|
|
5482
|
+
message: e || xi.t("formValidators.mustBeNumber")
|
|
5455
5483
|
} : null;
|
|
5456
5484
|
}
|
|
5457
5485
|
static {
|
|
5458
5486
|
this.oneOf = (e, t) => (n) => n && !e.includes(n) ? {
|
|
5459
5487
|
id: "oneOf",
|
|
5460
|
-
message: t ||
|
|
5488
|
+
message: t || xi.t("formValidators.oneOf", { allowedValues: e })
|
|
5461
5489
|
} : null;
|
|
5462
5490
|
}
|
|
5463
5491
|
static {
|
|
@@ -5475,48 +5503,48 @@ var yi = { t: (e, t) => ({
|
|
|
5475
5503
|
this.multiEmail = (e) => (t) => {
|
|
5476
5504
|
if (t) {
|
|
5477
5505
|
let n = t.replace(/ /g, "").replace(/,/g, ";").split(";");
|
|
5478
|
-
for (let t = 0; t < n.length; t += 1) if (!
|
|
5506
|
+
for (let t = 0; t < n.length; t += 1) if (!mi(n[t])) return {
|
|
5479
5507
|
id: "multiEmail",
|
|
5480
|
-
message: e ||
|
|
5508
|
+
message: e || xi.t("formValidators.multiEmail")
|
|
5481
5509
|
};
|
|
5482
5510
|
}
|
|
5483
5511
|
return null;
|
|
5484
5512
|
};
|
|
5485
5513
|
}
|
|
5486
5514
|
static {
|
|
5487
|
-
this.date = (e) => (t) => t && !
|
|
5515
|
+
this.date = (e) => (t) => t && !fi(t) && !pi(t) ? {
|
|
5488
5516
|
id: "date",
|
|
5489
|
-
message: e ||
|
|
5517
|
+
message: e || xi.t("formValidators.date")
|
|
5490
5518
|
} : null;
|
|
5491
5519
|
}
|
|
5492
5520
|
static {
|
|
5493
5521
|
this.dateObject = (e) => (t) => t && !t.isValid ? {
|
|
5494
5522
|
id: "date",
|
|
5495
|
-
message: e ||
|
|
5523
|
+
message: e || xi.t("formValidators.date")
|
|
5496
5524
|
} : null;
|
|
5497
5525
|
}
|
|
5498
5526
|
static {
|
|
5499
|
-
this.website = (e) => (t) => t && !
|
|
5527
|
+
this.website = (e) => (t) => t && !gi(t) ? {
|
|
5500
5528
|
id: "website",
|
|
5501
|
-
message: e ||
|
|
5529
|
+
message: e || xi.t("garages.errors.website")
|
|
5502
5530
|
} : null;
|
|
5503
5531
|
}
|
|
5504
5532
|
static {
|
|
5505
|
-
this.bic = (e) => (t) => t && !
|
|
5533
|
+
this.bic = (e) => (t) => t && !hi(t) ? {
|
|
5506
5534
|
id: "bic",
|
|
5507
|
-
message: e ||
|
|
5535
|
+
message: e || xi.t("garages.errors.bic")
|
|
5508
5536
|
} : null;
|
|
5509
5537
|
}
|
|
5510
5538
|
static {
|
|
5511
5539
|
this.minLetters = (e, t) => (n) => n && n.replace(/[^a-zöäüA-ZÖÄÜß]/g, "").length < e ? {
|
|
5512
5540
|
id: "minLetters",
|
|
5513
|
-
message: t ||
|
|
5541
|
+
message: t || xi.t("formValidators.minLetters", { smart_count: e })
|
|
5514
5542
|
} : null;
|
|
5515
5543
|
}
|
|
5516
5544
|
static {
|
|
5517
5545
|
this.minDigits = (e, t) => (n) => n && n.replace(/[\D]/g, "").length < e ? {
|
|
5518
5546
|
id: "minDigits",
|
|
5519
|
-
message: t ||
|
|
5547
|
+
message: t || xi.t("formValidators.minDigits", { smart_count: e })
|
|
5520
5548
|
} : null;
|
|
5521
5549
|
}
|
|
5522
5550
|
static {
|
|
@@ -5528,7 +5556,7 @@ var yi = { t: (e, t) => ({
|
|
|
5528
5556
|
} : r : null;
|
|
5529
5557
|
};
|
|
5530
5558
|
}
|
|
5531
|
-
},
|
|
5559
|
+
}, Ci = class extends n {
|
|
5532
5560
|
static {
|
|
5533
5561
|
this.defaultProps = {
|
|
5534
5562
|
formValidator: null,
|
|
@@ -5591,7 +5619,7 @@ var yi = { t: (e, t) => ({
|
|
|
5591
5619
|
}
|
|
5592
5620
|
renderTooltip() {
|
|
5593
5621
|
let { errorMessage: e, formValidator: t } = this.props, { isHovered: n, isFocused: r } = this.state;
|
|
5594
|
-
return /* @__PURE__ */ V(
|
|
5622
|
+
return /* @__PURE__ */ V(ot, {
|
|
5595
5623
|
variant: "error",
|
|
5596
5624
|
message: t ? t.getCurrentErrorMessage() : e || "",
|
|
5597
5625
|
isVisible: this.hasError() && (r || n)
|
|
@@ -5608,7 +5636,7 @@ var yi = { t: (e, t) => ({
|
|
|
5608
5636
|
};
|
|
5609
5637
|
//#endregion
|
|
5610
5638
|
//#region package/services/formValidation/useFormValidator.ts
|
|
5611
|
-
function
|
|
5639
|
+
function wi(e) {
|
|
5612
5640
|
let [, t] = l((e) => e + 1, 0);
|
|
5613
5641
|
return a(() => {
|
|
5614
5642
|
if (e) return e.registerOnUpdateListener(t), () => e.removeOnUpdateListener(t);
|
|
@@ -5616,9 +5644,9 @@ function Si(e) {
|
|
|
5616
5644
|
}
|
|
5617
5645
|
//#endregion
|
|
5618
5646
|
//#region package/services/formValidation/useFormValidatorGroup.ts
|
|
5619
|
-
function
|
|
5647
|
+
function Ti(e, { initialValues: t, onSubmit: n, onValidate: r, errorParser: i, onSubmitError: o } = {}) {
|
|
5620
5648
|
let [, s] = l((e) => e + 1, 0), c = u(null);
|
|
5621
|
-
c.current ||= new
|
|
5649
|
+
c.current ||= new li(e, null, {
|
|
5622
5650
|
initialValues: t,
|
|
5623
5651
|
errorParser: i,
|
|
5624
5652
|
onSubmitError: o
|
|
@@ -5627,6 +5655,6 @@ function Ci(e, { initialValues: t, onSubmit: n, onValidate: r, errorParser: i, o
|
|
|
5627
5655
|
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;
|
|
5628
5656
|
}
|
|
5629
5657
|
//#endregion
|
|
5630
|
-
export {
|
|
5658
|
+
export { xe as Accordion, ge as AccordionStyleType, Pe as ActionButtons, ze as ActionIcon, nt as Align, Be as BodyEnd, Ne as Button, De as ButtonSize, Ee as ButtonStyleType, Oe as ButtonType, Ue as Card, qe as CardActions, Ke as CardContent, We as CardHeader, Ge as CardMedia, Ve as CardStyleType, Ye as Checkbox, $e as Chip, et as ChipContainer, Xe as ChipStyleType, vt as ColorPicker, xt as ConfirmModal, Yt as DatePicker, qt as Dropdown, Zt as EmptyState, nn as Fab, it as FloatingMenu, ui as FormValidator, li as FormValidatorGroup, bn as IconLoading, sn as IconPicker, ln as IdleManager, Kt as InfiniteBlock, st as Input, pn as InputDropdown, X as InputType, Le as InteractableDiv, _n as KanbanBoard, gn as KanbanColumn, bt as Modal, Cn as NumberInput, Tn as OptionPicker, kn as Overscroll, Mn as ProgressBar, Ae as Ripple, ar as RoomDrawer, sr as RoomViewer, ur as ScrollbarProvider, fr as SearchInput, Te as SpinnerLoading, hr as Stepper, Cr as TenorPicker, wr as Textarea, Dr as ThemeProvider, zr as ToastProvider, ot as Tooltip, Ci as ValidatableComponent, Si as Validators, ni as VirtualList, ii as Wizard, Tr as defaultTheme, kt as getLocale, _i as hasEightPasswordChars, yi as hasOnePasswordDigit, vi as hasOnePasswordLetter, hi as isBic, fi as isDate, mi as isEmail, pi as isISODate, di as isNumber, bi as isPassword, gi as isURL, Et as mapLocale, Ot as setLocale, Fr as showToast, wi as useFormValidator, Ti as useFormValidatorGroup, Or as useTheme };
|
|
5631
5659
|
|
|
5632
5660
|
//# sourceMappingURL=index.mjs.map
|