@webority/ui-react 0.17.4 → 0.18.1
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/THIRD-PARTY-NOTICES.txt +23 -0
- package/dist/types/components/AppErrorSummary.d.ts +25 -0
- package/dist/types/components/AppFormSection.d.ts +11 -1
- package/dist/types/components/AppPageHeader.d.ts +43 -13
- package/dist/types/components/AppQrCode.d.ts +28 -0
- package/dist/types/components/AppRadioGroup.d.ts +51 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/lib/focusField.d.ts +11 -0
- package/dist/types/lib/qrCode.d.ts +72 -0
- package/dist/ui-react.js +963 -222
- package/package.json +5 -4
package/dist/ui-react.js
CHANGED
|
@@ -3049,17 +3049,62 @@ function mn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
3049
3049
|
});
|
|
3050
3050
|
}
|
|
3051
3051
|
//#endregion
|
|
3052
|
+
//#region src/lib/focusField.js
|
|
3053
|
+
var hn = "input:not([type=\"hidden\"]):not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
3054
|
+
function gn(e) {
|
|
3055
|
+
if (!e) return !1;
|
|
3056
|
+
let t = [document.getElementById(e), ...document.getElementsByName(e)];
|
|
3057
|
+
for (let e of t) {
|
|
3058
|
+
if (!e) continue;
|
|
3059
|
+
let t = e.matches(hn) ? e : e.querySelector(hn);
|
|
3060
|
+
if (t) return t.scrollIntoView?.({ block: "center" }), t.focus({ preventScroll: !0 }), !0;
|
|
3061
|
+
}
|
|
3062
|
+
return !1;
|
|
3063
|
+
}
|
|
3064
|
+
//#endregion
|
|
3065
|
+
//#region src/components/AppErrorSummary.jsx
|
|
3066
|
+
function _n({ errors: e = [], title: t, autoFocus: n = !0, id: r, className: i = "", ...a }) {
|
|
3067
|
+
W("AppErrorSummary", a);
|
|
3068
|
+
let c = s(), l = r || c, u = d(null), f = d(0), p = e.length;
|
|
3069
|
+
return o(() => {
|
|
3070
|
+
n && p > 0 && f.current === 0 && u.current?.focus(), f.current = p;
|
|
3071
|
+
}, [p, n]), p ? /* @__PURE__ */ D("div", {
|
|
3072
|
+
ref: u,
|
|
3073
|
+
className: ["alert alert-danger wui-error-summary", i].filter(Boolean).join(" "),
|
|
3074
|
+
role: "alert",
|
|
3075
|
+
tabIndex: -1,
|
|
3076
|
+
"aria-labelledby": `${l}-title`,
|
|
3077
|
+
id: l,
|
|
3078
|
+
"data-autofocus": n ? "" : void 0,
|
|
3079
|
+
...a,
|
|
3080
|
+
children: [/* @__PURE__ */ E("h2", {
|
|
3081
|
+
className: "wui-error-summary-title",
|
|
3082
|
+
id: `${l}-title`,
|
|
3083
|
+
children: t ?? `Fix ${p} field${p > 1 ? "s" : ""} to continue`
|
|
3084
|
+
}), /* @__PURE__ */ E("ul", {
|
|
3085
|
+
className: "wui-error-summary-list",
|
|
3086
|
+
children: e.map((e) => /* @__PURE__ */ E("li", { children: /* @__PURE__ */ E("a", {
|
|
3087
|
+
href: `#${e.field}`,
|
|
3088
|
+
onClick: (t) => {
|
|
3089
|
+
t.preventDefault(), gn(e.field);
|
|
3090
|
+
},
|
|
3091
|
+
children: e.message
|
|
3092
|
+
}) }, `${e.field}:${e.message}`))
|
|
3093
|
+
})]
|
|
3094
|
+
}) : null;
|
|
3095
|
+
}
|
|
3096
|
+
//#endregion
|
|
3052
3097
|
//#region src/lib/fileItem.js
|
|
3053
|
-
function
|
|
3098
|
+
function vn(e) {
|
|
3054
3099
|
return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
|
|
3055
3100
|
}
|
|
3056
|
-
function
|
|
3101
|
+
function yn(e) {
|
|
3057
3102
|
return e instanceof File ? e.name : e?.name;
|
|
3058
3103
|
}
|
|
3059
|
-
function
|
|
3104
|
+
function bn(e) {
|
|
3060
3105
|
return e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
|
|
3061
3106
|
}
|
|
3062
|
-
function
|
|
3107
|
+
function xn(e, t) {
|
|
3063
3108
|
let [n, r] = f(null);
|
|
3064
3109
|
return o(() => {
|
|
3065
3110
|
if (!t) {
|
|
@@ -3075,8 +3120,8 @@ function vn(e, t) {
|
|
|
3075
3120
|
}
|
|
3076
3121
|
//#endregion
|
|
3077
3122
|
//#region src/lib/FileItemRow.jsx
|
|
3078
|
-
function
|
|
3079
|
-
let i =
|
|
3123
|
+
function Sn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
3124
|
+
let i = xn(e, t), a = yn(e), o = bn(e);
|
|
3080
3125
|
return /* @__PURE__ */ D("div", {
|
|
3081
3126
|
className: "attach-item",
|
|
3082
3127
|
children: [
|
|
@@ -3115,9 +3160,9 @@ function yn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
3115
3160
|
}
|
|
3116
3161
|
//#endregion
|
|
3117
3162
|
//#region src/components/AppFileAttachment.jsx
|
|
3118
|
-
function
|
|
3163
|
+
function Cn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple: i = !1, accept: a = k, maxSizeMb: o = A, optional: c = !1, validate: l = !0, error: u, id: d, ...p }) {
|
|
3119
3164
|
W("AppFileAttachment", p);
|
|
3120
|
-
let m = s(), h = d || m, [g, _] = f(""), v = i && Array.isArray(t) ? t : t ? [t] : [], y = F(a), b = (e) => e instanceof File ? P(e) : y || P(e), x = !i && v.length === 1 && b(v[0]), S =
|
|
3165
|
+
let m = s(), h = d || m, [g, _] = f(""), v = i && Array.isArray(t) ? t : t ? [t] : [], y = F(a), b = (e) => e instanceof File ? P(e) : y || P(e), x = !i && v.length === 1 && b(v[0]), S = wn(a, o);
|
|
3121
3166
|
function C(e) {
|
|
3122
3167
|
let n = Array.from(e.target.files || []);
|
|
3123
3168
|
if (e.target.value = "", !n.length) return;
|
|
@@ -3134,8 +3179,8 @@ function bn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
3134
3179
|
s.push(e);
|
|
3135
3180
|
}
|
|
3136
3181
|
if (_(c), s.length) if (i) {
|
|
3137
|
-
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(
|
|
3138
|
-
r(e.concat(s.filter((e) => !n.has(
|
|
3182
|
+
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(vn));
|
|
3183
|
+
r(e.concat(s.filter((e) => !n.has(vn(e)))));
|
|
3139
3184
|
} else r(s[0]);
|
|
3140
3185
|
}
|
|
3141
3186
|
function w(e) {
|
|
@@ -3190,17 +3235,17 @@ function bn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
3190
3235
|
onChange: C,
|
|
3191
3236
|
...p
|
|
3192
3237
|
})] }),
|
|
3193
|
-
x ? /* @__PURE__ */ E(
|
|
3238
|
+
x ? /* @__PURE__ */ E(Tn, {
|
|
3194
3239
|
item: v[0],
|
|
3195
3240
|
isImage: !0,
|
|
3196
3241
|
onRemove: () => w(0)
|
|
3197
3242
|
}) : v.length > 0 && /* @__PURE__ */ E("div", {
|
|
3198
3243
|
className: "attach-list",
|
|
3199
|
-
children: v.map((e, t) => /* @__PURE__ */ E(
|
|
3244
|
+
children: v.map((e, t) => /* @__PURE__ */ E(Sn, {
|
|
3200
3245
|
item: e,
|
|
3201
3246
|
isImage: b(e),
|
|
3202
3247
|
onRemove: () => w(t)
|
|
3203
|
-
},
|
|
3248
|
+
}, vn(e)))
|
|
3204
3249
|
}),
|
|
3205
3250
|
O && /* @__PURE__ */ E("div", {
|
|
3206
3251
|
className: "field-error",
|
|
@@ -3210,12 +3255,12 @@ function bn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
3210
3255
|
]
|
|
3211
3256
|
});
|
|
3212
3257
|
}
|
|
3213
|
-
function
|
|
3258
|
+
function wn(e, t) {
|
|
3214
3259
|
let n = e?.trim() ? j(e) : "", r = t > 0 ? `up to ${t} MB` : "";
|
|
3215
3260
|
return n && r ? `${n}, ${r}` : r ? `Up to ${t} MB` : n;
|
|
3216
3261
|
}
|
|
3217
|
-
function
|
|
3218
|
-
let r =
|
|
3262
|
+
function Tn({ item: e, isImage: t, onRemove: n }) {
|
|
3263
|
+
let r = xn(e, t), i = yn(e), a = bn(e);
|
|
3219
3264
|
return /* @__PURE__ */ D("div", {
|
|
3220
3265
|
className: "attach-preview",
|
|
3221
3266
|
children: [/* @__PURE__ */ D("div", {
|
|
@@ -3247,7 +3292,7 @@ function Sn({ item: e, isImage: t, onRemove: n }) {
|
|
|
3247
3292
|
}
|
|
3248
3293
|
//#endregion
|
|
3249
3294
|
//#region src/components/AppFilePicker.jsx
|
|
3250
|
-
function
|
|
3295
|
+
function En({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, maxFiles: c, accept: l = ".jpg,.jpeg,.png", maxSizeMb: u = A, required: p, error: m, hint: h, loading: g = !1, className: _ = "", fieldClassName: v = "", style: y, ...b }) {
|
|
3251
3296
|
W("AppFilePicker", b);
|
|
3252
3297
|
let [x, S] = f(null), [C, w] = f(!1), [T, O] = f(""), k = d(null), M = s(), N = r || M;
|
|
3253
3298
|
o(() => {
|
|
@@ -3266,7 +3311,7 @@ function Cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3266
3311
|
}, se = (e) => {
|
|
3267
3312
|
let n = Array.from(e || []);
|
|
3268
3313
|
if (!n.length) return;
|
|
3269
|
-
let r = Array.isArray(t) ? t : t ? [t] : [], a = new Set(r.map(
|
|
3314
|
+
let r = Array.isArray(t) ? t : t ? [t] : [], a = new Set(r.map(vn)), o = "", s = [];
|
|
3270
3315
|
for (let e of n) {
|
|
3271
3316
|
let t = L(e, {
|
|
3272
3317
|
accept: l,
|
|
@@ -3276,7 +3321,7 @@ function Cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3276
3321
|
o ||= t;
|
|
3277
3322
|
continue;
|
|
3278
3323
|
}
|
|
3279
|
-
a.has(
|
|
3324
|
+
a.has(vn(e)) || (a.add(vn(e)), s.push(e));
|
|
3280
3325
|
}
|
|
3281
3326
|
let d = r.concat(s);
|
|
3282
3327
|
c && d.length > c && (d = d.slice(0, c), o ||= `Up to ${c} files.`), O(o), i(d);
|
|
@@ -3421,12 +3466,12 @@ function Cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3421
3466
|
de,
|
|
3422
3467
|
a && I.length > 0 && /* @__PURE__ */ E("div", {
|
|
3423
3468
|
className: "attach-list",
|
|
3424
|
-
children: I.map((e, t) => /* @__PURE__ */ E(
|
|
3469
|
+
children: I.map((e, t) => /* @__PURE__ */ E(Sn, {
|
|
3425
3470
|
item: e,
|
|
3426
3471
|
isImage: e instanceof File ? P(e) : H || P(e),
|
|
3427
3472
|
noun: "file",
|
|
3428
3473
|
onRemove: () => le(t)
|
|
3429
|
-
},
|
|
3474
|
+
}, vn(e)))
|
|
3430
3475
|
})
|
|
3431
3476
|
]
|
|
3432
3477
|
}),
|
|
@@ -3444,7 +3489,7 @@ function Cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3444
3489
|
}
|
|
3445
3490
|
//#endregion
|
|
3446
3491
|
//#region src/components/AppFloatingDock.jsx
|
|
3447
|
-
function
|
|
3492
|
+
function Dn({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation", magnify: r = !0, maxScale: i, radius: a, className: o = "", ...s }) {
|
|
3448
3493
|
return W("AppFloatingDock", s), /* @__PURE__ */ E("wui-dock", {
|
|
3449
3494
|
role: "navigation",
|
|
3450
3495
|
"aria-label": n,
|
|
@@ -3486,7 +3531,7 @@ function wn({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
3486
3531
|
}
|
|
3487
3532
|
//#endregion
|
|
3488
3533
|
//#region src/components/AppFormActions.jsx
|
|
3489
|
-
function
|
|
3534
|
+
function On({ children: e, sticky: t = !1, align: n = "end", className: r = "", ...i }) {
|
|
3490
3535
|
return W("AppFormActions", i), /* @__PURE__ */ E("div", {
|
|
3491
3536
|
className: [
|
|
3492
3537
|
"form-actions",
|
|
@@ -3500,7 +3545,7 @@ function Tn({ children: e, sticky: t = !1, align: n = "end", className: r = "",
|
|
|
3500
3545
|
}
|
|
3501
3546
|
//#endregion
|
|
3502
3547
|
//#region src/components/AppFormRow.jsx
|
|
3503
|
-
function
|
|
3548
|
+
function kn({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
3504
3549
|
W("AppFormRow", r);
|
|
3505
3550
|
let { style: i, ...a } = r;
|
|
3506
3551
|
return /* @__PURE__ */ E("div", {
|
|
@@ -3515,10 +3560,17 @@ function En({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
|
3515
3560
|
}
|
|
3516
3561
|
//#endregion
|
|
3517
3562
|
//#region src/components/AppFormSection.jsx
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3563
|
+
var An = ["stacked", "side"], jn = ["top", "start"], Mn = ["comfortable", "compact"];
|
|
3564
|
+
function Nn({ children: e, title: t, description: n, layout: r = "stacked", labels: i = "top", density: a = "comfortable", className: o = "", ...s }) {
|
|
3565
|
+
return W("AppFormSection", s), G("AppFormSection", "layout", r, An), G("AppFormSection", "labels", i, jn), G("AppFormSection", "density", a, Mn), /* @__PURE__ */ D("section", {
|
|
3566
|
+
className: [
|
|
3567
|
+
"form-section",
|
|
3568
|
+
r === "side" ? "wui-form-side" : "",
|
|
3569
|
+
i === "start" ? "wui-form-labels-start" : "",
|
|
3570
|
+
a === "compact" ? "wui-form-compact" : "",
|
|
3571
|
+
o
|
|
3572
|
+
].filter(Boolean).join(" "),
|
|
3573
|
+
...s,
|
|
3522
3574
|
children: [(t != null || n != null) && /* @__PURE__ */ D("div", {
|
|
3523
3575
|
className: "form-section-head",
|
|
3524
3576
|
children: [t != null && /* @__PURE__ */ E("h3", {
|
|
@@ -3536,7 +3588,7 @@ function Dn({ children: e, title: t, description: n, className: r = "", ...i })
|
|
|
3536
3588
|
}
|
|
3537
3589
|
//#endregion
|
|
3538
3590
|
//#region src/components/AppInfoList.jsx
|
|
3539
|
-
function
|
|
3591
|
+
function Pn({ items: e = [], className: t = "", ...n }) {
|
|
3540
3592
|
return W("AppInfoList", n), /* @__PURE__ */ E("div", {
|
|
3541
3593
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
3542
3594
|
...n,
|
|
@@ -3567,23 +3619,23 @@ function On({ items: e = [], className: t = "", ...n }) {
|
|
|
3567
3619
|
}
|
|
3568
3620
|
//#endregion
|
|
3569
3621
|
//#region src/components/AppKpiTile.jsx
|
|
3570
|
-
var
|
|
3571
|
-
function
|
|
3572
|
-
if (!e || e.length < 2) return `0,${
|
|
3573
|
-
let t = Math.min(...e), n = Math.max(...e) - t, r =
|
|
3574
|
-
return e.map((e, i) => `${i * r},${n === 0 ?
|
|
3622
|
+
var Fn = 48, In = 16;
|
|
3623
|
+
function Ln(e) {
|
|
3624
|
+
if (!e || e.length < 2) return `0,${In / 2} ${Fn},${In / 2}`;
|
|
3625
|
+
let t = Math.min(...e), n = Math.max(...e) - t, r = Fn / (e.length - 1);
|
|
3626
|
+
return e.map((e, i) => `${i * r},${n === 0 ? In / 2 : In - (e - t) / n * In}`).join(" ");
|
|
3575
3627
|
}
|
|
3576
|
-
function
|
|
3628
|
+
function Rn(e) {
|
|
3577
3629
|
if (typeof e != "string") return "flat";
|
|
3578
3630
|
let t = e.trim();
|
|
3579
3631
|
return t.startsWith("+") ? "up" : t.startsWith("-") || t.startsWith("−") ? "down" : "flat";
|
|
3580
3632
|
}
|
|
3581
|
-
function
|
|
3633
|
+
function zn({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, deltaDirection: o, sparkline: s, variant: c = "plain", size: l = "md", valueSize: u, inline: d = !1, attention: f = !1, href: p, linkComponent: m, className: h = "", style: g, iconClassName: _ = "", labelClassName: v = "", valueClassName: y = "", captionClassName: b = "", deltaClassName: x = "", sparklineClassName: S = "", ...C }) {
|
|
3582
3634
|
W("AppKpiTile", C);
|
|
3583
3635
|
let w = `kpi${d ? " kpi-inline" : ""}${c === "filled" ? " kpi-filled" : c === "accent" ? " kpi-accent" : c === "spotlight" ? " kpi-spotlight" : ""}${l === "lg" ? " kpi-lg" : l === "sm" ? " kpi-sm" : ""}${f ? " kpi-attention" : ""}${h ? ` ${h}` : ""}`, T = typeof u == "number" && u > 0 ? {
|
|
3584
3636
|
...g,
|
|
3585
3637
|
"--wui-kpi-value-size": `${u}px`
|
|
3586
|
-
} : g, O = o ??
|
|
3638
|
+
} : g, O = o ?? Rn(a), k = O === "up" ? "arrow-up" : O === "down" ? "arrow-down" : null, A = {};
|
|
3587
3639
|
return p != null && (A = m ? {
|
|
3588
3640
|
as: m,
|
|
3589
3641
|
to: p
|
|
@@ -3621,12 +3673,12 @@ function Nn({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
3621
3673
|
}),
|
|
3622
3674
|
s && s.length > 0 && /* @__PURE__ */ E("svg", {
|
|
3623
3675
|
className: `kpi-sparkline${S ? ` ${S}` : ""}`,
|
|
3624
|
-
width:
|
|
3625
|
-
height:
|
|
3626
|
-
viewBox: `0 0 ${
|
|
3676
|
+
width: Fn,
|
|
3677
|
+
height: In,
|
|
3678
|
+
viewBox: `0 0 ${Fn} ${In}`,
|
|
3627
3679
|
"aria-hidden": "true",
|
|
3628
3680
|
children: /* @__PURE__ */ E("polyline", {
|
|
3629
|
-
points:
|
|
3681
|
+
points: Ln(s),
|
|
3630
3682
|
stroke: "currentColor",
|
|
3631
3683
|
fill: "none"
|
|
3632
3684
|
})
|
|
@@ -3636,11 +3688,11 @@ function Nn({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
3636
3688
|
}
|
|
3637
3689
|
//#endregion
|
|
3638
3690
|
//#region src/components/AppLink.jsx
|
|
3639
|
-
var
|
|
3691
|
+
var Bn = {
|
|
3640
3692
|
sm: 13,
|
|
3641
3693
|
md: 15,
|
|
3642
3694
|
lg: 18
|
|
3643
|
-
},
|
|
3695
|
+
}, Vn = [
|
|
3644
3696
|
"underline",
|
|
3645
3697
|
"underline-center",
|
|
3646
3698
|
"static",
|
|
@@ -3654,35 +3706,35 @@ var Pn = {
|
|
|
3654
3706
|
"shine",
|
|
3655
3707
|
"none"
|
|
3656
3708
|
];
|
|
3657
|
-
function
|
|
3709
|
+
function Hn(e, t, n) {
|
|
3658
3710
|
if (!e) return null;
|
|
3659
3711
|
let r = `wui-link__ic wui-link__ic--${t}`;
|
|
3660
3712
|
return typeof e == "string" ? /* @__PURE__ */ E("span", {
|
|
3661
3713
|
className: r,
|
|
3662
3714
|
children: /* @__PURE__ */ E(Y, {
|
|
3663
3715
|
name: e,
|
|
3664
|
-
size:
|
|
3716
|
+
size: Bn[n] ?? Bn.md
|
|
3665
3717
|
})
|
|
3666
3718
|
}) : /* @__PURE__ */ E("span", {
|
|
3667
3719
|
className: r,
|
|
3668
3720
|
children: e
|
|
3669
3721
|
});
|
|
3670
3722
|
}
|
|
3671
|
-
function
|
|
3672
|
-
W("AppLink", d), G("AppLink", "animation", r,
|
|
3673
|
-
let f =
|
|
3723
|
+
function Un({ children: e, label: t, href: n, animation: r = "underline", leftIcon: i = null, rightIcon: a = null, size: o = "md", external: s = !1, disabled: c = !1, linkComponent: l, className: u = "", ...d }) {
|
|
3724
|
+
W("AppLink", d), G("AppLink", "animation", r, Vn), G("AppLink", "size", o, Object.keys(Bn));
|
|
3725
|
+
let f = Vn.includes(r) ? r : "underline", p = f === "icon" && !a && !i ? "arrow-right" : a, m = [
|
|
3674
3726
|
"wui-link",
|
|
3675
3727
|
`wui-link--${f}`,
|
|
3676
3728
|
o === "md" ? "" : `wui-link--${o}`,
|
|
3677
3729
|
c ? "is-disabled" : "",
|
|
3678
3730
|
u
|
|
3679
3731
|
].filter(Boolean).join(" "), h = /* @__PURE__ */ D(T, { children: [
|
|
3680
|
-
|
|
3732
|
+
Hn(i, "left", o),
|
|
3681
3733
|
/* @__PURE__ */ E("span", {
|
|
3682
3734
|
className: "wui-link__label",
|
|
3683
3735
|
children: e ?? t
|
|
3684
3736
|
}),
|
|
3685
|
-
|
|
3737
|
+
Hn(p, "right", o)
|
|
3686
3738
|
] });
|
|
3687
3739
|
return c ? /* @__PURE__ */ E("span", {
|
|
3688
3740
|
className: m,
|
|
@@ -3705,13 +3757,13 @@ function Ln({ children: e, label: t, href: n, animation: r = "underline", leftIc
|
|
|
3705
3757
|
}
|
|
3706
3758
|
//#endregion
|
|
3707
3759
|
//#region src/components/AppLogoPicker.jsx
|
|
3708
|
-
var
|
|
3760
|
+
var Wn = {
|
|
3709
3761
|
sm: 72,
|
|
3710
3762
|
md: 120,
|
|
3711
3763
|
lg: 160
|
|
3712
3764
|
};
|
|
3713
|
-
function
|
|
3714
|
-
W("AppLogoPicker", k), G("AppLogoPicker", "size", typeof w == "string" ? w : null, Object.keys(
|
|
3765
|
+
function Gn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a = !1, disabled: c = !1, accept: l = "image/png,image/jpeg,image/webp", maxSizeMb: u = A, overlayIcon: p = "image", overlayLabel: m = "Update photo", ariaLabel: h = "Upload photo", label: g, hint: _, error: v, layout: y = "stacked", title: b, subtitle: x, required: S = !1, variant: C = "initials", size: w = "md", shape: T = "circle", className: O = "", ...k }) {
|
|
3766
|
+
W("AppLogoPicker", k), G("AppLogoPicker", "size", typeof w == "string" ? w : null, Object.keys(Wn));
|
|
3715
3767
|
let j = d(null), M = s(), [N, P] = f(null), [F, I] = f(""), [R, z] = f(!1), [B, V] = f(!1);
|
|
3716
3768
|
o(() => () => N && URL.revokeObjectURL(N), [N]), o(() => {
|
|
3717
3769
|
P(null), z(!1);
|
|
@@ -3737,7 +3789,7 @@ function zn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
3737
3789
|
t && ae(t);
|
|
3738
3790
|
}, K = () => {
|
|
3739
3791
|
P(null), I(""), z(!1), j.current && (j.current.value = ""), i?.();
|
|
3740
|
-
}, ce = typeof w == "number" ? w :
|
|
3792
|
+
}, ce = typeof w == "number" ? w : Wn[w] ?? Wn.md, le = Math.max(14, Math.round(ce * .18)), ue = Math.round(ce * .5), de = [
|
|
3741
3793
|
"set-uploader",
|
|
3742
3794
|
C === "avatar" ? "set-uploader--avatar" : "",
|
|
3743
3795
|
T === "rounded" ? "set-uploader--rounded" : T === "square" ? "set-uploader--square" : "",
|
|
@@ -3867,27 +3919,27 @@ function zn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
3867
3919
|
}
|
|
3868
3920
|
//#endregion
|
|
3869
3921
|
//#region src/components/AppMeter.jsx
|
|
3870
|
-
var
|
|
3922
|
+
var Kn = [
|
|
3871
3923
|
"info",
|
|
3872
3924
|
"success",
|
|
3873
3925
|
"warning",
|
|
3874
3926
|
"danger",
|
|
3875
3927
|
"neutral"
|
|
3876
3928
|
];
|
|
3877
|
-
function
|
|
3929
|
+
function qn(e, t, n) {
|
|
3878
3930
|
let r = n - t;
|
|
3879
3931
|
if (!(r > 0)) return 0;
|
|
3880
3932
|
let i = Math.min(100, Math.max(0, (e - t) / r * 100));
|
|
3881
3933
|
return Number(i.toFixed(2));
|
|
3882
3934
|
}
|
|
3883
|
-
function
|
|
3935
|
+
function Jn(e, t, n, r, i) {
|
|
3884
3936
|
if (t == null && n == null) return i;
|
|
3885
3937
|
let a = "mid";
|
|
3886
3938
|
return t != null && e <= t ? a = "low" : n != null && e >= n && (a = "high"), r === "low" ? a === "low" ? "success" : a === "high" ? "danger" : "warning" : a === "high" ? "success" : a === "low" ? "danger" : "warning";
|
|
3887
3939
|
}
|
|
3888
|
-
function
|
|
3940
|
+
function Yn({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum: i = "high", low: a, high: o, size: s = "md", label: c, showLabel: l = !1, className: u = "", ...d }) {
|
|
3889
3941
|
W("AppMeter", d);
|
|
3890
|
-
let f =
|
|
3942
|
+
let f = Jn(e, a, o, i, Kn.includes(r) ? r : "info"), p = qn(e, t, n);
|
|
3891
3943
|
return /* @__PURE__ */ E("div", {
|
|
3892
3944
|
className: `progress${s === "sm" ? " progress-sm" : ""}${u ? ` ${u}` : ""}`,
|
|
3893
3945
|
role: "meter",
|
|
@@ -3905,7 +3957,7 @@ function Un({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
3905
3957
|
}
|
|
3906
3958
|
//#endregion
|
|
3907
3959
|
//#region src/components/AppMultiSelect.jsx
|
|
3908
|
-
var
|
|
3960
|
+
var Xn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Select…", searchPlaceholder: i = "Search…", searchable: a = !0, disabled: c = !1, icon: l, size: u, collapseChips: d = !1, allowCustom: f = !1, validateCustom: p, customPattern: m, customInvalidMessage: h, name: g, id: _, label: v, error: y, hint: b, required: x = !1, help: S, helpLabel: C = "More information", fieldClassName: w = "", ...T }, O) {
|
|
3909
3961
|
W("AppMultiSelect", T);
|
|
3910
3962
|
let k = s(), A = _ || k, { setRef: j, innerRef: M } = Q({
|
|
3911
3963
|
ref: O,
|
|
@@ -3968,7 +4020,7 @@ var Wn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3968
4020
|
}) : null
|
|
3969
4021
|
]
|
|
3970
4022
|
});
|
|
3971
|
-
}),
|
|
4023
|
+
}), Zn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", value: c, onChange: l, min: u, max: d, step: p = 1, precision: m = 0, unit: h, size: g = "md", id: _, name: v, className: b = "", fieldClassName: x = "", disabled: S = !1, ...C }, w) {
|
|
3972
4024
|
W("AppNumberInput", C);
|
|
3973
4025
|
let T = s(), O = _ || T, k = (e) => {
|
|
3974
4026
|
if (m === 0) return Math.round(e);
|
|
@@ -4091,7 +4143,7 @@ var Wn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
4091
4143
|
}) : null
|
|
4092
4144
|
]
|
|
4093
4145
|
});
|
|
4094
|
-
}),
|
|
4146
|
+
}), Qn = i(function({ value: e, onChange: t, onComplete: n, length: r = 6, mode: i = "numeric", label: a, required: o = !1, hint: c, error: l, disabled: u = !1, name: d, id: f, className: p = "", fieldClassName: m = "", ...h }, g) {
|
|
4095
4147
|
W("AppOtpInput", h);
|
|
4096
4148
|
let _ = s(), v = f || _, y = l ? `${v}-error` : void 0, b = c ? `${v}-hint` : void 0, x = y || b, { setRef: S } = Q({
|
|
4097
4149
|
ref: g,
|
|
@@ -4133,69 +4185,74 @@ var Wn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
4133
4185
|
})
|
|
4134
4186
|
]
|
|
4135
4187
|
});
|
|
4136
|
-
})
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4188
|
+
}), $n = [
|
|
4189
|
+
"h1",
|
|
4190
|
+
"h2",
|
|
4191
|
+
"h3",
|
|
4192
|
+
"h4",
|
|
4193
|
+
"h5",
|
|
4194
|
+
"h6"
|
|
4195
|
+
];
|
|
4196
|
+
function er({ title: e, as: t = "h1", subtitle: n, eyebrow: r, icon: i, tone: a = "primary", status: o, breadcrumbs: s, actions: c, size: l = "md", align: u = "start", divider: d = !1, sticky: f = !1, className: p = "", ...m }) {
|
|
4197
|
+
W("AppPageHeader", m), G("AppPageHeader", "as", t, $n);
|
|
4198
|
+
let h = $n.includes(t) ? t : "h1", g = [
|
|
4142
4199
|
"page-header",
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
].filter(Boolean).join(" "),
|
|
4150
|
-
name:
|
|
4200
|
+
l && l !== "md" ? `page-header-${l}` : "",
|
|
4201
|
+
u === "center" ? "page-header-center" : "",
|
|
4202
|
+
d ? "page-header-divider" : "",
|
|
4203
|
+
f ? "page-header-sticky" : "",
|
|
4204
|
+
a && a !== "primary" ? `tone-${a}` : "",
|
|
4205
|
+
p
|
|
4206
|
+
].filter(Boolean).join(" "), _ = i == null ? null : typeof i == "string" ? /* @__PURE__ */ E(Y, {
|
|
4207
|
+
name: i,
|
|
4151
4208
|
size: 20
|
|
4152
|
-
}) :
|
|
4209
|
+
}) : i;
|
|
4153
4210
|
return /* @__PURE__ */ D("div", {
|
|
4154
|
-
className:
|
|
4155
|
-
...
|
|
4156
|
-
children: [
|
|
4211
|
+
className: g,
|
|
4212
|
+
...m,
|
|
4213
|
+
children: [s != null && /* @__PURE__ */ E("div", {
|
|
4157
4214
|
className: "page-breadcrumbs",
|
|
4158
|
-
children:
|
|
4215
|
+
children: s
|
|
4159
4216
|
}), /* @__PURE__ */ D("div", {
|
|
4160
4217
|
className: "page-header-bar",
|
|
4161
4218
|
children: [/* @__PURE__ */ D("div", {
|
|
4162
4219
|
className: "page-header-lead",
|
|
4163
|
-
children: [
|
|
4220
|
+
children: [_ != null && /* @__PURE__ */ E("span", {
|
|
4164
4221
|
className: "page-header-icon",
|
|
4165
|
-
children:
|
|
4222
|
+
children: _
|
|
4166
4223
|
}), /* @__PURE__ */ D("div", {
|
|
4167
4224
|
className: "page-header-titles",
|
|
4168
4225
|
children: [
|
|
4169
|
-
|
|
4226
|
+
r != null && /* @__PURE__ */ E("div", {
|
|
4170
4227
|
className: "page-eyebrow",
|
|
4171
|
-
children:
|
|
4228
|
+
children: r
|
|
4172
4229
|
}),
|
|
4173
4230
|
/* @__PURE__ */ D("div", {
|
|
4174
4231
|
className: "page-titlebar",
|
|
4175
|
-
children: [e != null && /* @__PURE__ */ E(
|
|
4232
|
+
children: [e != null && /* @__PURE__ */ E(h, {
|
|
4176
4233
|
className: "page-title",
|
|
4177
4234
|
children: e
|
|
4178
|
-
}),
|
|
4235
|
+
}), o != null && /* @__PURE__ */ E("span", {
|
|
4179
4236
|
className: "page-status",
|
|
4180
|
-
children:
|
|
4237
|
+
children: o
|
|
4181
4238
|
})]
|
|
4182
4239
|
}),
|
|
4183
|
-
|
|
4240
|
+
n != null && /* @__PURE__ */ E("div", {
|
|
4184
4241
|
className: "page-subtitle",
|
|
4185
|
-
children:
|
|
4242
|
+
children: n
|
|
4186
4243
|
})
|
|
4187
4244
|
]
|
|
4188
4245
|
})]
|
|
4189
|
-
}),
|
|
4246
|
+
}), c != null && /* @__PURE__ */ E("div", {
|
|
4190
4247
|
className: "page-actions",
|
|
4191
|
-
children:
|
|
4248
|
+
children: c
|
|
4192
4249
|
})]
|
|
4193
4250
|
})]
|
|
4194
4251
|
});
|
|
4195
4252
|
}
|
|
4196
4253
|
//#endregion
|
|
4197
4254
|
//#region src/components/AppPagination.jsx
|
|
4198
|
-
function
|
|
4255
|
+
function tr({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
4199
4256
|
if (W("AppPagination", s), t <= 1) return null;
|
|
4200
4257
|
let c = rn(e, t, { siblingCount: r });
|
|
4201
4258
|
return /* @__PURE__ */ E("nav", {
|
|
@@ -4255,7 +4312,7 @@ function Jn({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
4255
4312
|
}
|
|
4256
4313
|
//#endregion
|
|
4257
4314
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
4258
|
-
var
|
|
4315
|
+
var nr = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name: i, id: a, label: o = "Phone number", placeholder: c, required: l = !1, error: u, showFlag: d = !0, showDialCode: f = !0, size: p = "md", fieldClassName: m = "", ...h }, g) {
|
|
4259
4316
|
W("AppPhoneNumberInput", h);
|
|
4260
4317
|
let _ = s(), v = a || _, y = u && v ? `${v}-error` : void 0, { setRef: b } = Q({
|
|
4261
4318
|
ref: g,
|
|
@@ -4296,7 +4353,7 @@ var Yn = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
4296
4353
|
});
|
|
4297
4354
|
//#endregion
|
|
4298
4355
|
//#region src/components/AppPricingCard.jsx
|
|
4299
|
-
function
|
|
4356
|
+
function rr({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a, featured: o = !1, current: s = !1, badge: c = "Most popular", className: l = "", ...u }) {
|
|
4300
4357
|
return W("AppPricingCard", u), /* @__PURE__ */ D("div", {
|
|
4301
4358
|
className: [
|
|
4302
4359
|
"plan-card",
|
|
@@ -4350,21 +4407,21 @@ function Xn({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
4350
4407
|
}
|
|
4351
4408
|
//#endregion
|
|
4352
4409
|
//#region src/components/AppProgress.jsx
|
|
4353
|
-
var
|
|
4410
|
+
var ir = [
|
|
4354
4411
|
"info",
|
|
4355
4412
|
"success",
|
|
4356
4413
|
"warning",
|
|
4357
4414
|
"danger",
|
|
4358
4415
|
"neutral"
|
|
4359
4416
|
];
|
|
4360
|
-
function
|
|
4417
|
+
function ar(e, t) {
|
|
4361
4418
|
if (!(t > 0)) return 0;
|
|
4362
4419
|
let n = Math.min(100, Math.max(0, e / t * 100));
|
|
4363
4420
|
return Number(n.toFixed(2));
|
|
4364
4421
|
}
|
|
4365
|
-
function
|
|
4422
|
+
function or({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", label: i, showLabel: a = !1, striped: o = !1, animated: s = !1, indeterminate: c = !1, className: l = "", ...u }) {
|
|
4366
4423
|
W("AppProgress", u);
|
|
4367
|
-
let d =
|
|
4424
|
+
let d = ir.includes(n) ? n : "info", f = ar(e, t), p = `progress${r === "sm" ? " progress-sm" : ""}${l ? ` ${l}` : ""}`, m = [
|
|
4368
4425
|
"progress-bar",
|
|
4369
4426
|
`wui-progress-${d}`,
|
|
4370
4427
|
o || s ? "progress-bar-striped" : "",
|
|
@@ -4387,8 +4444,619 @@ function $n({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", labe
|
|
|
4387
4444
|
});
|
|
4388
4445
|
}
|
|
4389
4446
|
//#endregion
|
|
4447
|
+
//#region src/lib/qrCode.js
|
|
4448
|
+
var sr = {
|
|
4449
|
+
L: 0,
|
|
4450
|
+
M: 1,
|
|
4451
|
+
Q: 2,
|
|
4452
|
+
H: 3
|
|
4453
|
+
}, cr = [
|
|
4454
|
+
1,
|
|
4455
|
+
0,
|
|
4456
|
+
3,
|
|
4457
|
+
2
|
|
4458
|
+
], lr = [
|
|
4459
|
+
"L",
|
|
4460
|
+
"M",
|
|
4461
|
+
"Q",
|
|
4462
|
+
"H"
|
|
4463
|
+
], ur = 3, dr = 3, fr = 40, pr = 10, mr = [
|
|
4464
|
+
[
|
|
4465
|
+
-1,
|
|
4466
|
+
7,
|
|
4467
|
+
10,
|
|
4468
|
+
15,
|
|
4469
|
+
20,
|
|
4470
|
+
26,
|
|
4471
|
+
18,
|
|
4472
|
+
20,
|
|
4473
|
+
24,
|
|
4474
|
+
30,
|
|
4475
|
+
18,
|
|
4476
|
+
20,
|
|
4477
|
+
24,
|
|
4478
|
+
26,
|
|
4479
|
+
30,
|
|
4480
|
+
22,
|
|
4481
|
+
24,
|
|
4482
|
+
28,
|
|
4483
|
+
30,
|
|
4484
|
+
28,
|
|
4485
|
+
28,
|
|
4486
|
+
28,
|
|
4487
|
+
28,
|
|
4488
|
+
30,
|
|
4489
|
+
30,
|
|
4490
|
+
26,
|
|
4491
|
+
28,
|
|
4492
|
+
30,
|
|
4493
|
+
30,
|
|
4494
|
+
30,
|
|
4495
|
+
30,
|
|
4496
|
+
30,
|
|
4497
|
+
30,
|
|
4498
|
+
30,
|
|
4499
|
+
30,
|
|
4500
|
+
30,
|
|
4501
|
+
30,
|
|
4502
|
+
30,
|
|
4503
|
+
30,
|
|
4504
|
+
30,
|
|
4505
|
+
30
|
|
4506
|
+
],
|
|
4507
|
+
[
|
|
4508
|
+
-1,
|
|
4509
|
+
10,
|
|
4510
|
+
16,
|
|
4511
|
+
26,
|
|
4512
|
+
18,
|
|
4513
|
+
24,
|
|
4514
|
+
16,
|
|
4515
|
+
18,
|
|
4516
|
+
22,
|
|
4517
|
+
22,
|
|
4518
|
+
26,
|
|
4519
|
+
30,
|
|
4520
|
+
22,
|
|
4521
|
+
22,
|
|
4522
|
+
24,
|
|
4523
|
+
24,
|
|
4524
|
+
28,
|
|
4525
|
+
28,
|
|
4526
|
+
26,
|
|
4527
|
+
26,
|
|
4528
|
+
26,
|
|
4529
|
+
26,
|
|
4530
|
+
28,
|
|
4531
|
+
28,
|
|
4532
|
+
28,
|
|
4533
|
+
28,
|
|
4534
|
+
28,
|
|
4535
|
+
28,
|
|
4536
|
+
28,
|
|
4537
|
+
28,
|
|
4538
|
+
28,
|
|
4539
|
+
28,
|
|
4540
|
+
28,
|
|
4541
|
+
28,
|
|
4542
|
+
28,
|
|
4543
|
+
28,
|
|
4544
|
+
28,
|
|
4545
|
+
28,
|
|
4546
|
+
28,
|
|
4547
|
+
28,
|
|
4548
|
+
28
|
|
4549
|
+
],
|
|
4550
|
+
[
|
|
4551
|
+
-1,
|
|
4552
|
+
13,
|
|
4553
|
+
22,
|
|
4554
|
+
18,
|
|
4555
|
+
26,
|
|
4556
|
+
18,
|
|
4557
|
+
24,
|
|
4558
|
+
18,
|
|
4559
|
+
22,
|
|
4560
|
+
20,
|
|
4561
|
+
24,
|
|
4562
|
+
28,
|
|
4563
|
+
26,
|
|
4564
|
+
24,
|
|
4565
|
+
20,
|
|
4566
|
+
30,
|
|
4567
|
+
24,
|
|
4568
|
+
28,
|
|
4569
|
+
28,
|
|
4570
|
+
26,
|
|
4571
|
+
30,
|
|
4572
|
+
28,
|
|
4573
|
+
30,
|
|
4574
|
+
30,
|
|
4575
|
+
30,
|
|
4576
|
+
30,
|
|
4577
|
+
28,
|
|
4578
|
+
30,
|
|
4579
|
+
30,
|
|
4580
|
+
30,
|
|
4581
|
+
30,
|
|
4582
|
+
30,
|
|
4583
|
+
30,
|
|
4584
|
+
30,
|
|
4585
|
+
30,
|
|
4586
|
+
30,
|
|
4587
|
+
30,
|
|
4588
|
+
30,
|
|
4589
|
+
30,
|
|
4590
|
+
30,
|
|
4591
|
+
30
|
|
4592
|
+
],
|
|
4593
|
+
[
|
|
4594
|
+
-1,
|
|
4595
|
+
17,
|
|
4596
|
+
28,
|
|
4597
|
+
22,
|
|
4598
|
+
16,
|
|
4599
|
+
22,
|
|
4600
|
+
28,
|
|
4601
|
+
26,
|
|
4602
|
+
26,
|
|
4603
|
+
24,
|
|
4604
|
+
28,
|
|
4605
|
+
24,
|
|
4606
|
+
28,
|
|
4607
|
+
22,
|
|
4608
|
+
24,
|
|
4609
|
+
24,
|
|
4610
|
+
30,
|
|
4611
|
+
28,
|
|
4612
|
+
28,
|
|
4613
|
+
26,
|
|
4614
|
+
28,
|
|
4615
|
+
30,
|
|
4616
|
+
24,
|
|
4617
|
+
30,
|
|
4618
|
+
30,
|
|
4619
|
+
30,
|
|
4620
|
+
30,
|
|
4621
|
+
30,
|
|
4622
|
+
30,
|
|
4623
|
+
30,
|
|
4624
|
+
30,
|
|
4625
|
+
30,
|
|
4626
|
+
30,
|
|
4627
|
+
30,
|
|
4628
|
+
30,
|
|
4629
|
+
30,
|
|
4630
|
+
30,
|
|
4631
|
+
30,
|
|
4632
|
+
30,
|
|
4633
|
+
30,
|
|
4634
|
+
30
|
|
4635
|
+
]
|
|
4636
|
+
], hr = [
|
|
4637
|
+
[
|
|
4638
|
+
-1,
|
|
4639
|
+
1,
|
|
4640
|
+
1,
|
|
4641
|
+
1,
|
|
4642
|
+
1,
|
|
4643
|
+
1,
|
|
4644
|
+
2,
|
|
4645
|
+
2,
|
|
4646
|
+
2,
|
|
4647
|
+
2,
|
|
4648
|
+
4,
|
|
4649
|
+
4,
|
|
4650
|
+
4,
|
|
4651
|
+
4,
|
|
4652
|
+
4,
|
|
4653
|
+
6,
|
|
4654
|
+
6,
|
|
4655
|
+
6,
|
|
4656
|
+
6,
|
|
4657
|
+
7,
|
|
4658
|
+
8,
|
|
4659
|
+
8,
|
|
4660
|
+
9,
|
|
4661
|
+
9,
|
|
4662
|
+
10,
|
|
4663
|
+
12,
|
|
4664
|
+
12,
|
|
4665
|
+
12,
|
|
4666
|
+
13,
|
|
4667
|
+
14,
|
|
4668
|
+
15,
|
|
4669
|
+
16,
|
|
4670
|
+
17,
|
|
4671
|
+
18,
|
|
4672
|
+
19,
|
|
4673
|
+
19,
|
|
4674
|
+
20,
|
|
4675
|
+
21,
|
|
4676
|
+
22,
|
|
4677
|
+
24,
|
|
4678
|
+
25
|
|
4679
|
+
],
|
|
4680
|
+
[
|
|
4681
|
+
-1,
|
|
4682
|
+
1,
|
|
4683
|
+
1,
|
|
4684
|
+
1,
|
|
4685
|
+
2,
|
|
4686
|
+
2,
|
|
4687
|
+
4,
|
|
4688
|
+
4,
|
|
4689
|
+
4,
|
|
4690
|
+
5,
|
|
4691
|
+
5,
|
|
4692
|
+
5,
|
|
4693
|
+
8,
|
|
4694
|
+
9,
|
|
4695
|
+
9,
|
|
4696
|
+
10,
|
|
4697
|
+
10,
|
|
4698
|
+
11,
|
|
4699
|
+
13,
|
|
4700
|
+
14,
|
|
4701
|
+
16,
|
|
4702
|
+
17,
|
|
4703
|
+
17,
|
|
4704
|
+
18,
|
|
4705
|
+
20,
|
|
4706
|
+
21,
|
|
4707
|
+
23,
|
|
4708
|
+
25,
|
|
4709
|
+
26,
|
|
4710
|
+
28,
|
|
4711
|
+
29,
|
|
4712
|
+
31,
|
|
4713
|
+
33,
|
|
4714
|
+
35,
|
|
4715
|
+
37,
|
|
4716
|
+
38,
|
|
4717
|
+
40,
|
|
4718
|
+
43,
|
|
4719
|
+
45,
|
|
4720
|
+
47,
|
|
4721
|
+
49
|
|
4722
|
+
],
|
|
4723
|
+
[
|
|
4724
|
+
-1,
|
|
4725
|
+
1,
|
|
4726
|
+
1,
|
|
4727
|
+
2,
|
|
4728
|
+
2,
|
|
4729
|
+
4,
|
|
4730
|
+
4,
|
|
4731
|
+
6,
|
|
4732
|
+
6,
|
|
4733
|
+
8,
|
|
4734
|
+
8,
|
|
4735
|
+
8,
|
|
4736
|
+
10,
|
|
4737
|
+
12,
|
|
4738
|
+
16,
|
|
4739
|
+
12,
|
|
4740
|
+
17,
|
|
4741
|
+
16,
|
|
4742
|
+
18,
|
|
4743
|
+
21,
|
|
4744
|
+
20,
|
|
4745
|
+
23,
|
|
4746
|
+
23,
|
|
4747
|
+
25,
|
|
4748
|
+
27,
|
|
4749
|
+
29,
|
|
4750
|
+
34,
|
|
4751
|
+
34,
|
|
4752
|
+
35,
|
|
4753
|
+
38,
|
|
4754
|
+
40,
|
|
4755
|
+
43,
|
|
4756
|
+
45,
|
|
4757
|
+
48,
|
|
4758
|
+
51,
|
|
4759
|
+
53,
|
|
4760
|
+
56,
|
|
4761
|
+
59,
|
|
4762
|
+
62,
|
|
4763
|
+
65,
|
|
4764
|
+
68
|
|
4765
|
+
],
|
|
4766
|
+
[
|
|
4767
|
+
-1,
|
|
4768
|
+
1,
|
|
4769
|
+
1,
|
|
4770
|
+
2,
|
|
4771
|
+
4,
|
|
4772
|
+
4,
|
|
4773
|
+
4,
|
|
4774
|
+
5,
|
|
4775
|
+
6,
|
|
4776
|
+
8,
|
|
4777
|
+
8,
|
|
4778
|
+
11,
|
|
4779
|
+
11,
|
|
4780
|
+
16,
|
|
4781
|
+
16,
|
|
4782
|
+
18,
|
|
4783
|
+
16,
|
|
4784
|
+
19,
|
|
4785
|
+
21,
|
|
4786
|
+
25,
|
|
4787
|
+
25,
|
|
4788
|
+
25,
|
|
4789
|
+
34,
|
|
4790
|
+
30,
|
|
4791
|
+
32,
|
|
4792
|
+
35,
|
|
4793
|
+
37,
|
|
4794
|
+
40,
|
|
4795
|
+
42,
|
|
4796
|
+
45,
|
|
4797
|
+
48,
|
|
4798
|
+
51,
|
|
4799
|
+
54,
|
|
4800
|
+
57,
|
|
4801
|
+
60,
|
|
4802
|
+
63,
|
|
4803
|
+
66,
|
|
4804
|
+
70,
|
|
4805
|
+
74,
|
|
4806
|
+
77,
|
|
4807
|
+
81
|
|
4808
|
+
]
|
|
4809
|
+
];
|
|
4810
|
+
function gr(e, t = "M", { mask: n = -1, boostEcc: r = !0 } = {}) {
|
|
4811
|
+
if (!Object.hasOwn(sr, t)) throw RangeError(`Unknown error correction level "${t}"`);
|
|
4812
|
+
if (!Number.isInteger(n) || n < -1 || n > 7) throw RangeError("Mask must be -1 to 7");
|
|
4813
|
+
let i = new TextEncoder().encode(String(e)), a = sr[t], o = 1, s = 0;
|
|
4814
|
+
for (; s = vr(i.length, o), !(s <= Dr(o, a) * 8); o++) if (o >= 40) throw RangeError(`Data too long for a QR code: ${i.length} bytes`);
|
|
4815
|
+
for (let e = 1; e <= 3; e++) r && s <= Dr(o, e) * 8 && (a = Math.max(a, e));
|
|
4816
|
+
let c = [];
|
|
4817
|
+
Mr(4, 4, c), Mr(i.length, o <= 9 ? 8 : 16, c);
|
|
4818
|
+
for (let e of i) Mr(e, 8, c);
|
|
4819
|
+
let l = Dr(o, a) * 8;
|
|
4820
|
+
Mr(0, Math.min(4, l - c.length), c), Mr(0, (8 - c.length % 8) % 8, c);
|
|
4821
|
+
for (let e = 236; c.length < l; e ^= 253) Mr(e, 8, c);
|
|
4822
|
+
let u = new Uint8Array(c.length / 8);
|
|
4823
|
+
return c.forEach((e, t) => {
|
|
4824
|
+
u[t >>> 3] |= e << 7 - (t & 7);
|
|
4825
|
+
}), yr(o, a, u, n);
|
|
4826
|
+
}
|
|
4827
|
+
function _r(e, t = 4) {
|
|
4828
|
+
let { size: n } = e, r = "";
|
|
4829
|
+
for (let i = 0; i < n; i++) {
|
|
4830
|
+
let a = 0;
|
|
4831
|
+
for (; a < n;) {
|
|
4832
|
+
if (!e.isDark(i, a)) {
|
|
4833
|
+
a++;
|
|
4834
|
+
continue;
|
|
4835
|
+
}
|
|
4836
|
+
let o = a;
|
|
4837
|
+
for (; a < n && e.isDark(i, a);) a++;
|
|
4838
|
+
let s = a - o;
|
|
4839
|
+
r += `M${o + t} ${i + t}h${s}v1h-${s}z`;
|
|
4840
|
+
}
|
|
4841
|
+
}
|
|
4842
|
+
return r;
|
|
4843
|
+
}
|
|
4844
|
+
function vr(e, t) {
|
|
4845
|
+
let n = t <= 9 ? 8 : 16;
|
|
4846
|
+
return e >= 1 << n ? Infinity : 4 + n + e * 8;
|
|
4847
|
+
}
|
|
4848
|
+
function yr(e, t, n, r) {
|
|
4849
|
+
let i = e * 4 + 17, a = new Uint8Array(i * i), o = new Uint8Array(i * i), s = (e, t, n) => {
|
|
4850
|
+
a[t * i + e] = +!!n, o[t * i + e] = 1;
|
|
4851
|
+
}, c = (e) => {
|
|
4852
|
+
let n = cr[t] << 3 | e, r = n;
|
|
4853
|
+
for (let e = 0; e < 10; e++) r = r << 1 ^ (r >>> 9) * 1335;
|
|
4854
|
+
let a = (n << 10 | r) ^ 21522;
|
|
4855
|
+
for (let e = 0; e <= 5; e++) s(8, e, Nr(a, e));
|
|
4856
|
+
s(8, 7, Nr(a, 6)), s(8, 8, Nr(a, 7)), s(7, 8, Nr(a, 8));
|
|
4857
|
+
for (let e = 9; e < 15; e++) s(14 - e, 8, Nr(a, e));
|
|
4858
|
+
for (let e = 0; e < 8; e++) s(i - 1 - e, 8, Nr(a, e));
|
|
4859
|
+
for (let e = 8; e < 15; e++) s(8, i - 15 + e, Nr(a, e));
|
|
4860
|
+
s(8, i - 8, !0);
|
|
4861
|
+
}, l = (e, t) => {
|
|
4862
|
+
for (let n = -4; n <= 4; n++) for (let r = -4; r <= 4; r++) {
|
|
4863
|
+
let a = Math.max(Math.abs(r), Math.abs(n)), o = e + r, c = t + n;
|
|
4864
|
+
o >= 0 && o < i && c >= 0 && c < i && s(o, c, a !== 2 && a !== 4);
|
|
4865
|
+
}
|
|
4866
|
+
}, u = (e, t) => {
|
|
4867
|
+
for (let n = -2; n <= 2; n++) for (let r = -2; r <= 2; r++) s(e + r, t + n, Math.max(Math.abs(r), Math.abs(n)) !== 1);
|
|
4868
|
+
};
|
|
4869
|
+
for (let e = 0; e < i; e++) s(6, e, e % 2 == 0), s(e, 6, e % 2 == 0);
|
|
4870
|
+
l(3, 3), l(i - 4, 3), l(3, i - 4);
|
|
4871
|
+
let d = Tr(e, i), f = d.length;
|
|
4872
|
+
for (let e = 0; e < f; e++) for (let t = 0; t < f; t++) e === 0 && t === 0 || e === 0 && t === f - 1 || e === f - 1 && t === 0 || u(d[e], d[t]);
|
|
4873
|
+
if (c(0), e >= 7) {
|
|
4874
|
+
let t = e;
|
|
4875
|
+
for (let e = 0; e < 12; e++) t = t << 1 ^ (t >>> 11) * 7973;
|
|
4876
|
+
let n = e << 12 | t;
|
|
4877
|
+
for (let e = 0; e < 18; e++) {
|
|
4878
|
+
let t = Nr(n, e), r = i - 11 + e % 3, a = Math.floor(e / 3);
|
|
4879
|
+
s(r, a, t), s(a, r, t);
|
|
4880
|
+
}
|
|
4881
|
+
}
|
|
4882
|
+
let p = Or(n, e, t), m = 0, h = p.length * 8;
|
|
4883
|
+
for (let e = i - 1; e >= 1; e -= 2) {
|
|
4884
|
+
e === 6 && (e = 5);
|
|
4885
|
+
for (let t = 0; t < i; t++) for (let n = 0; n < 2; n++) {
|
|
4886
|
+
let r = e - n, s = e + 1 & 2 ? t : i - 1 - t;
|
|
4887
|
+
!o[s * i + r] && m < h && (a[s * i + r] = +!!Nr(p[m >>> 3], 7 - (m & 7)), m++);
|
|
4888
|
+
}
|
|
4889
|
+
}
|
|
4890
|
+
let g = (e) => {
|
|
4891
|
+
for (let t = 0; t < i; t++) for (let n = 0; n < i; n++) !o[t * i + n] && br(e, n, t) && (a[t * i + n] ^= 1);
|
|
4892
|
+
}, _ = r;
|
|
4893
|
+
if (_ === -1) {
|
|
4894
|
+
let e = Infinity;
|
|
4895
|
+
for (let t = 0; t < 8; t++) {
|
|
4896
|
+
g(t), c(t);
|
|
4897
|
+
let n = xr(a, i);
|
|
4898
|
+
n < e && (_ = t, e = n), g(t);
|
|
4899
|
+
}
|
|
4900
|
+
}
|
|
4901
|
+
return g(_), c(_), Object.freeze({
|
|
4902
|
+
size: i,
|
|
4903
|
+
version: e,
|
|
4904
|
+
ecc: lr[t],
|
|
4905
|
+
mask: _,
|
|
4906
|
+
isDark: (e, t) => e >= 0 && e < i && t >= 0 && t < i && a[e * i + t] === 1
|
|
4907
|
+
});
|
|
4908
|
+
}
|
|
4909
|
+
function br(e, t, n) {
|
|
4910
|
+
switch (e) {
|
|
4911
|
+
case 0: return (t + n) % 2 == 0;
|
|
4912
|
+
case 1: return n % 2 == 0;
|
|
4913
|
+
case 2: return t % 3 == 0;
|
|
4914
|
+
case 3: return (t + n) % 3 == 0;
|
|
4915
|
+
case 4: return (Math.floor(t / 3) + Math.floor(n / 2)) % 2 == 0;
|
|
4916
|
+
case 5: return t * n % 2 + t * n % 3 == 0;
|
|
4917
|
+
case 6: return (t * n % 2 + t * n % 3) % 2 == 0;
|
|
4918
|
+
default: return ((t + n) % 2 + t * n % 3) % 2 == 0;
|
|
4919
|
+
}
|
|
4920
|
+
}
|
|
4921
|
+
function xr(e, t) {
|
|
4922
|
+
let n = 0, r = (n, r) => e[r * t + n] === 1;
|
|
4923
|
+
for (let e = 0; e < 2; e++) for (let i = 0; i < t; i++) {
|
|
4924
|
+
let a = !1, o = 0, s = [
|
|
4925
|
+
0,
|
|
4926
|
+
0,
|
|
4927
|
+
0,
|
|
4928
|
+
0,
|
|
4929
|
+
0,
|
|
4930
|
+
0,
|
|
4931
|
+
0
|
|
4932
|
+
];
|
|
4933
|
+
for (let c = 0; c < t; c++) {
|
|
4934
|
+
let l = e === 0 ? r(c, i) : r(i, c);
|
|
4935
|
+
l === a ? (o++, o === 5 ? n += ur : o > 5 && n++) : (wr(o, s, t), a || (n += Sr(s) * fr), a = l, o = 1);
|
|
4936
|
+
}
|
|
4937
|
+
n += Cr(a, o, s, t) * fr;
|
|
4938
|
+
}
|
|
4939
|
+
for (let e = 0; e < t - 1; e++) for (let i = 0; i < t - 1; i++) {
|
|
4940
|
+
let t = r(i, e);
|
|
4941
|
+
t === r(i + 1, e) && t === r(i, e + 1) && t === r(i + 1, e + 1) && (n += dr);
|
|
4942
|
+
}
|
|
4943
|
+
let i = 0;
|
|
4944
|
+
for (let t of e) i += t;
|
|
4945
|
+
let a = t * t, o = Math.ceil(Math.abs(i * 20 - a * 10) / a) - 1;
|
|
4946
|
+
return n += o * pr, n;
|
|
4947
|
+
}
|
|
4948
|
+
function Sr(e) {
|
|
4949
|
+
let t = e[1], n = t > 0 && e[2] === t && e[3] === t * 3 && e[4] === t && e[5] === t;
|
|
4950
|
+
return (n && e[0] >= t * 4 && e[6] >= t ? 1 : 0) + (n && e[6] >= t * 4 && e[0] >= t ? 1 : 0);
|
|
4951
|
+
}
|
|
4952
|
+
function Cr(e, t, n, r) {
|
|
4953
|
+
let i = t;
|
|
4954
|
+
return e && (wr(i, n, r), i = 0), i += r, wr(i, n, r), Sr(n);
|
|
4955
|
+
}
|
|
4956
|
+
function wr(e, t, n) {
|
|
4957
|
+
let r = t[0] === 0 ? e + n : e;
|
|
4958
|
+
t.pop(), t.unshift(r);
|
|
4959
|
+
}
|
|
4960
|
+
function Tr(e, t) {
|
|
4961
|
+
if (e === 1) return [];
|
|
4962
|
+
let n = Math.floor(e / 7) + 2, r = Math.floor((e * 8 + n * 3 + 5) / (n * 4 - 4)) * 2, i = [6];
|
|
4963
|
+
for (let e = t - 7; i.length < n; e -= r) i.splice(1, 0, e);
|
|
4964
|
+
return i;
|
|
4965
|
+
}
|
|
4966
|
+
function Er(e) {
|
|
4967
|
+
let t = (16 * e + 128) * e + 64;
|
|
4968
|
+
if (e >= 2) {
|
|
4969
|
+
let n = Math.floor(e / 7) + 2;
|
|
4970
|
+
t -= (25 * n - 10) * n - 55, e >= 7 && (t -= 36);
|
|
4971
|
+
}
|
|
4972
|
+
return t;
|
|
4973
|
+
}
|
|
4974
|
+
function Dr(e, t) {
|
|
4975
|
+
return Math.floor(Er(e) / 8) - mr[t][e] * hr[t][e];
|
|
4976
|
+
}
|
|
4977
|
+
function Or(e, t, n) {
|
|
4978
|
+
let r = hr[n][t], i = mr[n][t], a = Math.floor(Er(t) / 8), o = r - a % r, s = Math.floor(a / r), c = [], l = kr(i);
|
|
4979
|
+
for (let t = 0, n = 0; t < r; t++) {
|
|
4980
|
+
let r = Array.from(e.subarray(n, n + s - i + (t < o ? 0 : 1)));
|
|
4981
|
+
n += r.length;
|
|
4982
|
+
let a = Ar(r, l);
|
|
4983
|
+
t < o && r.push(0), c.push(r.concat(a));
|
|
4984
|
+
}
|
|
4985
|
+
let u = [];
|
|
4986
|
+
for (let e = 0; e < c[0].length; e++) c.forEach((t, n) => {
|
|
4987
|
+
(e !== s - i || n >= o) && u.push(t[e]);
|
|
4988
|
+
});
|
|
4989
|
+
return u;
|
|
4990
|
+
}
|
|
4991
|
+
function kr(e) {
|
|
4992
|
+
let t = Array(e).fill(0);
|
|
4993
|
+
t[e - 1] = 1;
|
|
4994
|
+
let n = 1;
|
|
4995
|
+
for (let r = 0; r < e; r++) {
|
|
4996
|
+
for (let e = 0; e < t.length; e++) t[e] = jr(t[e], n), e + 1 < t.length && (t[e] ^= t[e + 1]);
|
|
4997
|
+
n = jr(n, 2);
|
|
4998
|
+
}
|
|
4999
|
+
return t;
|
|
5000
|
+
}
|
|
5001
|
+
function Ar(e, t) {
|
|
5002
|
+
let n = t.map(() => 0);
|
|
5003
|
+
for (let r of e) {
|
|
5004
|
+
let e = r ^ n.shift();
|
|
5005
|
+
n.push(0), t.forEach((t, r) => {
|
|
5006
|
+
n[r] ^= jr(t, e);
|
|
5007
|
+
});
|
|
5008
|
+
}
|
|
5009
|
+
return n;
|
|
5010
|
+
}
|
|
5011
|
+
function jr(e, t) {
|
|
5012
|
+
let n = 0;
|
|
5013
|
+
for (let r = 7; r >= 0; r--) n = n << 1 ^ (n >>> 7) * 285, n ^= (t >>> r & 1) * e;
|
|
5014
|
+
return n;
|
|
5015
|
+
}
|
|
5016
|
+
function Mr(e, t, n) {
|
|
5017
|
+
for (let r = t - 1; r >= 0; r--) n.push(e >>> r & 1);
|
|
5018
|
+
}
|
|
5019
|
+
function Nr(e, t) {
|
|
5020
|
+
return (e >>> t & 1) != 0;
|
|
5021
|
+
}
|
|
5022
|
+
//#endregion
|
|
5023
|
+
//#region src/components/AppQrCode.jsx
|
|
5024
|
+
var Pr = 4;
|
|
5025
|
+
function Fr({ value: e, size: t = 240, title: n = "QR code", className: r, style: i, ...a }) {
|
|
5026
|
+
W("AppQrCode", a);
|
|
5027
|
+
let o = u(() => {
|
|
5028
|
+
if (!e) return null;
|
|
5029
|
+
let t = gr(String(e));
|
|
5030
|
+
return {
|
|
5031
|
+
modules: t.size + Pr * 2,
|
|
5032
|
+
path: _r(t, Pr)
|
|
5033
|
+
};
|
|
5034
|
+
}, [e]);
|
|
5035
|
+
if (!o) return null;
|
|
5036
|
+
let { modules: s, path: c } = o, l = Math.max(1, Math.floor(Number(t) / s) || 1) * s;
|
|
5037
|
+
return /* @__PURE__ */ D("svg", {
|
|
5038
|
+
viewBox: `0 0 ${s} ${s}`,
|
|
5039
|
+
width: l,
|
|
5040
|
+
height: l,
|
|
5041
|
+
role: "img",
|
|
5042
|
+
"aria-label": n,
|
|
5043
|
+
shapeRendering: "crispEdges",
|
|
5044
|
+
className: r || void 0,
|
|
5045
|
+
style: i,
|
|
5046
|
+
...a,
|
|
5047
|
+
children: [/* @__PURE__ */ E("rect", {
|
|
5048
|
+
width: s,
|
|
5049
|
+
height: s,
|
|
5050
|
+
fill: "#ffffff"
|
|
5051
|
+
}), /* @__PURE__ */ E("path", {
|
|
5052
|
+
d: c,
|
|
5053
|
+
fill: "#000000"
|
|
5054
|
+
})]
|
|
5055
|
+
});
|
|
5056
|
+
}
|
|
5057
|
+
//#endregion
|
|
4390
5058
|
//#region src/components/AppRadio.jsx
|
|
4391
|
-
var
|
|
5059
|
+
var Ir = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
4392
5060
|
return W("AppRadio", o), /* @__PURE__ */ E(vt, {
|
|
4393
5061
|
ref: s,
|
|
4394
5062
|
label: e,
|
|
@@ -4403,8 +5071,81 @@ var er = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
4403
5071
|
});
|
|
4404
5072
|
});
|
|
4405
5073
|
//#endregion
|
|
5074
|
+
//#region src/components/AppRadioGroup.jsx
|
|
5075
|
+
function Lr({ label: e, options: t = [], name: n, value: r, defaultValue: i, onChange: a, inline: o = !1, required: c = !1, disabled: l = !1, error: u, hint: d, help: f, helpLabel: p = "More information", id: m, className: h = "", fieldClassName: g = "", style: _, ...v }) {
|
|
5076
|
+
W("AppRadioGroup", v);
|
|
5077
|
+
let y = s(), b = m || y, x = n || b, S = `${b}-error`, C = `${b}-hint`, w = r !== void 0;
|
|
5078
|
+
return /* @__PURE__ */ D("div", {
|
|
5079
|
+
className: `field${g ? ` ${g}` : ""}`,
|
|
5080
|
+
children: [
|
|
5081
|
+
e != null && /* @__PURE__ */ D("span", {
|
|
5082
|
+
className: "label",
|
|
5083
|
+
id: `${b}-label`,
|
|
5084
|
+
children: [
|
|
5085
|
+
e,
|
|
5086
|
+
c && /* @__PURE__ */ E(Z, {}),
|
|
5087
|
+
f && /* @__PURE__ */ E(qe, {
|
|
5088
|
+
label: p,
|
|
5089
|
+
children: f
|
|
5090
|
+
})
|
|
5091
|
+
]
|
|
5092
|
+
}),
|
|
5093
|
+
/* @__PURE__ */ E("div", {
|
|
5094
|
+
className: [
|
|
5095
|
+
"wui-radio-group",
|
|
5096
|
+
o ? "wui-radio-group-inline" : "",
|
|
5097
|
+
h
|
|
5098
|
+
].filter(Boolean).join(" "),
|
|
5099
|
+
style: _,
|
|
5100
|
+
id: b,
|
|
5101
|
+
role: "radiogroup",
|
|
5102
|
+
"aria-labelledby": e == null ? void 0 : `${b}-label`,
|
|
5103
|
+
"aria-required": c ? "true" : void 0,
|
|
5104
|
+
"aria-invalid": u ? "true" : void 0,
|
|
5105
|
+
"aria-describedby": u ? S : d ? C : void 0,
|
|
5106
|
+
...v,
|
|
5107
|
+
children: t.map((e, t) => {
|
|
5108
|
+
let n = `${b}-${t}`;
|
|
5109
|
+
return /* @__PURE__ */ D("div", {
|
|
5110
|
+
className: "form-check",
|
|
5111
|
+
children: [/* @__PURE__ */ E("input", {
|
|
5112
|
+
type: "radio",
|
|
5113
|
+
className: "form-check-input",
|
|
5114
|
+
id: n,
|
|
5115
|
+
name: x,
|
|
5116
|
+
value: e.value,
|
|
5117
|
+
disabled: l || e.disabled || void 0,
|
|
5118
|
+
required: c || void 0,
|
|
5119
|
+
...w ? {
|
|
5120
|
+
checked: r === e.value,
|
|
5121
|
+
onChange: () => a?.(e.value)
|
|
5122
|
+
} : {
|
|
5123
|
+
defaultChecked: i === e.value,
|
|
5124
|
+
onChange: () => a?.(e.value)
|
|
5125
|
+
}
|
|
5126
|
+
}), /* @__PURE__ */ E("label", {
|
|
5127
|
+
className: "form-check-label",
|
|
5128
|
+
htmlFor: n,
|
|
5129
|
+
children: e.label
|
|
5130
|
+
})]
|
|
5131
|
+
}, e.value);
|
|
5132
|
+
})
|
|
5133
|
+
}),
|
|
5134
|
+
u ? /* @__PURE__ */ E("div", {
|
|
5135
|
+
className: "field-error",
|
|
5136
|
+
id: S,
|
|
5137
|
+
children: u
|
|
5138
|
+
}) : d ? /* @__PURE__ */ E("div", {
|
|
5139
|
+
className: "field-hint",
|
|
5140
|
+
id: C,
|
|
5141
|
+
children: d
|
|
5142
|
+
}) : null
|
|
5143
|
+
]
|
|
5144
|
+
});
|
|
5145
|
+
}
|
|
5146
|
+
//#endregion
|
|
4406
5147
|
//#region src/components/AppRepeater.jsx
|
|
4407
|
-
function
|
|
5148
|
+
function Rr({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, addLabel: a = "Add another", addVariant: o = "secondary", removeLabel: s = "Remove row", emptyText: c, min: l = 0, max: u, numbered: d = !0, className: f = "", ...p }) {
|
|
4408
5149
|
W("AppRepeater", p);
|
|
4409
5150
|
let m = typeof u == "number" && e.length >= u, h = !!i && e.length > l;
|
|
4410
5151
|
return /* @__PURE__ */ D("div", {
|
|
@@ -4456,7 +5197,7 @@ function tr({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, ad
|
|
|
4456
5197
|
}
|
|
4457
5198
|
//#endregion
|
|
4458
5199
|
//#region src/components/AppResourceCard.jsx
|
|
4459
|
-
function
|
|
5200
|
+
function zr({ icon: e, title: t, text: n, href: r, external: i = !1, linkComponent: a, className: o = "", ...s }) {
|
|
4460
5201
|
W("AppResourceCard", s);
|
|
4461
5202
|
let c = /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
4462
5203
|
className: "res-card-icon",
|
|
@@ -4490,7 +5231,7 @@ function nr({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
4490
5231
|
}
|
|
4491
5232
|
//#endregion
|
|
4492
5233
|
//#region src/components/AppResult.jsx
|
|
4493
|
-
var
|
|
5234
|
+
var Br = {
|
|
4494
5235
|
success: {
|
|
4495
5236
|
icon: "check-circle",
|
|
4496
5237
|
tone: "success"
|
|
@@ -4511,9 +5252,9 @@ var rr = {
|
|
|
4511
5252
|
404: { tone: "muted" },
|
|
4512
5253
|
500: { tone: "muted" }
|
|
4513
5254
|
};
|
|
4514
|
-
function
|
|
4515
|
-
W("AppResult", s), G("AppResult", "status", e, Object.keys(
|
|
4516
|
-
let c =
|
|
5255
|
+
function Vr({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, children: a, className: o = "", ...s }) {
|
|
5256
|
+
W("AppResult", s), G("AppResult", "status", e, Object.keys(Br));
|
|
5257
|
+
let c = Br[e] || Br.info, l = c.tone, u = /^\d+$/.test(e), d = r ?? (u ? null : c.icon);
|
|
4517
5258
|
return /* @__PURE__ */ D("div", {
|
|
4518
5259
|
className: [
|
|
4519
5260
|
"result",
|
|
@@ -4551,7 +5292,7 @@ function ir({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
4551
5292
|
}
|
|
4552
5293
|
//#endregion
|
|
4553
5294
|
//#region src/components/AppScrollbar.jsx
|
|
4554
|
-
function
|
|
5295
|
+
function Hr({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
4555
5296
|
return W("AppScrollbar", i), /* @__PURE__ */ E("div", {
|
|
4556
5297
|
className: t ? `wui-scroll ${t}` : "wui-scroll",
|
|
4557
5298
|
style: n == null ? r : {
|
|
@@ -4564,7 +5305,7 @@ function ar({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
|
4564
5305
|
}
|
|
4565
5306
|
//#endregion
|
|
4566
5307
|
//#region src/components/AppSearch.jsx
|
|
4567
|
-
function
|
|
5308
|
+
function Ur({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search…", ariaLabel: i, iconSize: a = 18, size: o, loading: s = !1, disabled: c = !1, className: l = "", ...u }) {
|
|
4568
5309
|
W("AppSearch", u);
|
|
4569
5310
|
let d = t || n;
|
|
4570
5311
|
return /* @__PURE__ */ D("div", {
|
|
@@ -4611,17 +5352,17 @@ function or({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
4611
5352
|
}
|
|
4612
5353
|
//#endregion
|
|
4613
5354
|
//#region src/components/AppSegmented.jsx
|
|
4614
|
-
var
|
|
5355
|
+
var Wr = {
|
|
4615
5356
|
sm: "segmented-sm",
|
|
4616
5357
|
md: "",
|
|
4617
5358
|
lg: "segmented-lg",
|
|
4618
5359
|
xl: "wui-segmented-xl"
|
|
4619
5360
|
};
|
|
4620
|
-
function
|
|
4621
|
-
W("AppSegmented", m), G("AppSegmented", "size", a, Object.keys(
|
|
5361
|
+
function Gr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a = "md", fullWidth: c = !1, bordered: u = !0, disabled: f = !1, className: p = "", ...m }) {
|
|
5362
|
+
W("AppSegmented", m), G("AppSegmented", "size", a, Object.keys(Wr));
|
|
4622
5363
|
let h = s(), g = i || h, _ = d(null), v = d(null), y = [
|
|
4623
5364
|
"segmented",
|
|
4624
|
-
|
|
5365
|
+
Wr[a] ?? "",
|
|
4625
5366
|
c ? "segmented-full" : "",
|
|
4626
5367
|
u ? "" : "wui-segmented-borderless",
|
|
4627
5368
|
f ? "is-disabled" : "",
|
|
@@ -4692,7 +5433,7 @@ function cr({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
4692
5433
|
}
|
|
4693
5434
|
//#endregion
|
|
4694
5435
|
//#region src/components/AppSelect.jsx
|
|
4695
|
-
var
|
|
5436
|
+
var Kr = (e) => e == null ? "" : e.label ?? e.text ?? "", qr = i(function({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", searchPlaceholder: i = "Search...", searchable: a = !1, clearable: c = !1, size: l, icon: u, prefix: d, suffix: f, floatingLabel: p = !1, disabled: m, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", "aria-label": T, "aria-labelledby": O, "aria-describedby": k, ...A }, j) {
|
|
4696
5437
|
W("AppSelect", A);
|
|
4697
5438
|
let M = s(), { setRef: N, innerRef: P } = Q({
|
|
4698
5439
|
ref: j,
|
|
@@ -4704,7 +5445,7 @@ var lr = (e) => e == null ? "" : e.label ?? e.text ?? "", ur = i(function({ valu
|
|
|
4704
5445
|
if (!e) return;
|
|
4705
5446
|
let t = n.map((e) => ({
|
|
4706
5447
|
value: e.value,
|
|
4707
|
-
label:
|
|
5448
|
+
label: Kr(e),
|
|
4708
5449
|
icon: e.icon
|
|
4709
5450
|
}));
|
|
4710
5451
|
Ze(t, e.options) || (e.options = t);
|
|
@@ -4778,7 +5519,7 @@ var lr = (e) => e == null ? "" : e.label ?? e.text ?? "", ur = i(function({ valu
|
|
|
4778
5519
|
});
|
|
4779
5520
|
//#endregion
|
|
4780
5521
|
//#region src/components/AppShell.jsx
|
|
4781
|
-
function
|
|
5522
|
+
function Jr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r, sidebarFooter: i, topbarStart: a, topbarEnd: s, footer: c, children: l, collapsed: u, onCollapsedChange: d, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
|
|
4782
5523
|
W("AppShell", _);
|
|
4783
5524
|
let [v, y] = f(!1), [b, x] = f(!1), [S, C] = f(!1), w = u ?? v, T = () => {
|
|
4784
5525
|
let e = !w;
|
|
@@ -4826,7 +5567,7 @@ function dr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
4826
5567
|
children: [e.label && /* @__PURE__ */ E("div", {
|
|
4827
5568
|
className: "app-nav-group-label",
|
|
4828
5569
|
children: e.label
|
|
4829
|
-
}), e.items.map((e) => /* @__PURE__ */ E(
|
|
5570
|
+
}), e.items.map((e) => /* @__PURE__ */ E(Yr, {
|
|
4830
5571
|
item: e,
|
|
4831
5572
|
linkComponent: h,
|
|
4832
5573
|
onNavigate: () => x(!1)
|
|
@@ -4893,7 +5634,7 @@ function dr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
4893
5634
|
]
|
|
4894
5635
|
});
|
|
4895
5636
|
}
|
|
4896
|
-
function
|
|
5637
|
+
function Yr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
4897
5638
|
let i = Array.isArray(e.children) && e.children.length > 0, a = i && e.children.some((e) => e.active), [s, c] = f(a);
|
|
4898
5639
|
o(() => {
|
|
4899
5640
|
a && !s && c(!0);
|
|
@@ -4935,7 +5676,7 @@ function fr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
4935
5676
|
"aria-hidden": !s || void 0,
|
|
4936
5677
|
children: /* @__PURE__ */ E("div", {
|
|
4937
5678
|
className: "app-nav-sub-inner",
|
|
4938
|
-
children: e.children.map((e) => /* @__PURE__ */ E(
|
|
5679
|
+
children: e.children.map((e) => /* @__PURE__ */ E(Yr, {
|
|
4939
5680
|
item: e,
|
|
4940
5681
|
linkComponent: t,
|
|
4941
5682
|
onNavigate: n,
|
|
@@ -4976,7 +5717,7 @@ function fr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
4976
5717
|
}
|
|
4977
5718
|
//#endregion
|
|
4978
5719
|
//#region src/components/AppSidebarMenu.jsx
|
|
4979
|
-
var
|
|
5720
|
+
var Xr = {
|
|
4980
5721
|
left: "start",
|
|
4981
5722
|
right: "end",
|
|
4982
5723
|
start: "start",
|
|
@@ -4984,9 +5725,9 @@ var pr = {
|
|
|
4984
5725
|
top: "top",
|
|
4985
5726
|
bottom: "bottom"
|
|
4986
5727
|
};
|
|
4987
|
-
function
|
|
4988
|
-
W("AppSidebarMenu", v), G("AppSidebarMenu", "side", n, Object.keys(
|
|
4989
|
-
let { style: y, ...b } = v, S =
|
|
5728
|
+
function Zr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, header: a, children: o, footer: s, width: c, maxWidth: l, backdrop: u = !0, scroll: d = !1, keyboard: f = !0, closeButton: p = !0, responsive: m, className: h = "", bodyClassName: g = "", ariaLabel: _, ...v }) {
|
|
5729
|
+
W("AppSidebarMenu", v), G("AppSidebarMenu", "side", n, Object.keys(Xr));
|
|
5730
|
+
let { style: y, ...b } = v, S = Xr[n] || "end", C = c || l || y ? {
|
|
4990
5731
|
...c && { "--asm-width": c },
|
|
4991
5732
|
...l && { "--asm-max-width": l },
|
|
4992
5733
|
...y
|
|
@@ -5047,7 +5788,7 @@ function mr({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
5047
5788
|
}
|
|
5048
5789
|
//#endregion
|
|
5049
5790
|
//#region src/components/AppSlider.jsx
|
|
5050
|
-
var
|
|
5791
|
+
var Qr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, label: a, required: c = !1, hint: l, error: u, name: d, startName: f, endName: p, min: m = 0, max: h = 100, step: g = 1, disabled: _, size: v, showValue: y, unit: b, id: x, ariaLabel: S, className: C = "", fieldClassName: w = "", ...T }, O) {
|
|
5051
5792
|
W("AppSlider", T);
|
|
5052
5793
|
let k = s(), A = x || k, j = r, { setRef: M, innerRef: N } = Q({
|
|
5053
5794
|
ref: O,
|
|
@@ -5108,14 +5849,14 @@ var hr = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
5108
5849
|
})
|
|
5109
5850
|
]
|
|
5110
5851
|
});
|
|
5111
|
-
}),
|
|
5852
|
+
}), $r = {
|
|
5112
5853
|
sm: 44,
|
|
5113
5854
|
md: 56,
|
|
5114
5855
|
lg: 72
|
|
5115
5856
|
};
|
|
5116
|
-
function
|
|
5117
|
-
W("AppSplash", c), G("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(
|
|
5118
|
-
let { style: l, ...u } = c, d = typeof a == "number" ? a :
|
|
5857
|
+
function ei({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", size: a = "md", label: o = "Loading", className: s = "", ...c }) {
|
|
5858
|
+
W("AppSplash", c), G("AppSplash", "size", typeof a == "string" ? a : null, Object.keys($r));
|
|
5859
|
+
let { style: l, ...u } = c, d = typeof a == "number" ? a : $r[a] ?? $r.md, f = i === "ring" ? /* @__PURE__ */ E("span", {
|
|
5119
5860
|
className: "splash-ring",
|
|
5120
5861
|
"aria-hidden": "true"
|
|
5121
5862
|
}) : i === "dots" ? /* @__PURE__ */ D("span", {
|
|
@@ -5162,7 +5903,7 @@ function _r({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
5162
5903
|
}
|
|
5163
5904
|
//#endregion
|
|
5164
5905
|
//#region src/components/AppStatusBadge.jsx
|
|
5165
|
-
function
|
|
5906
|
+
function ti({ label: e, tone: t = "neutral", className: n = "", tooltip: r, tooltipPlacement: i, ...a }) {
|
|
5166
5907
|
return W("AppStatusBadge", a), e == null || e === "" ? "-" : q(/* @__PURE__ */ E("span", {
|
|
5167
5908
|
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
5168
5909
|
...a,
|
|
@@ -5171,7 +5912,7 @@ function vr({ label: e, tone: t = "neutral", className: n = "", tooltip: r, tool
|
|
|
5171
5912
|
}
|
|
5172
5913
|
//#endregion
|
|
5173
5914
|
//#region src/components/AppStepper.jsx
|
|
5174
|
-
function
|
|
5915
|
+
function ni({ steps: e = [], variant: t = "steps", orientation: n = "horizontal", activeStep: r, onStepClick: i, label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
5175
5916
|
W("AppStepper", c);
|
|
5176
5917
|
let l = t === "journey";
|
|
5177
5918
|
return /* @__PURE__ */ E("nav", {
|
|
@@ -5184,7 +5925,7 @@ function yr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
5184
5925
|
"aria-label": a,
|
|
5185
5926
|
...c,
|
|
5186
5927
|
children: e.map((t, n) => {
|
|
5187
|
-
let a = t.status ||
|
|
5928
|
+
let a = t.status || ri(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
5188
5929
|
c = a === "done" ? /* @__PURE__ */ E(Y, {
|
|
5189
5930
|
name: "check",
|
|
5190
5931
|
size: 14
|
|
@@ -5248,12 +5989,12 @@ function yr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
5248
5989
|
})
|
|
5249
5990
|
});
|
|
5250
5991
|
}
|
|
5251
|
-
function
|
|
5992
|
+
function ri(e, t) {
|
|
5252
5993
|
return typeof t == "number" ? e < t ? "done" : e === t ? "active" : "pending" : "pending";
|
|
5253
5994
|
}
|
|
5254
5995
|
//#endregion
|
|
5255
5996
|
//#region src/components/AppSwitch.jsx
|
|
5256
|
-
var
|
|
5997
|
+
var ii = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "round", className: o = "", ...s }, c) {
|
|
5257
5998
|
return W("AppSwitch", s), /* @__PURE__ */ E(vt, {
|
|
5258
5999
|
ref: c,
|
|
5259
6000
|
label: e,
|
|
@@ -5269,7 +6010,7 @@ var xr = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "r
|
|
|
5269
6010
|
});
|
|
5270
6011
|
//#endregion
|
|
5271
6012
|
//#region src/components/AppTableEmptyState.jsx
|
|
5272
|
-
function
|
|
6013
|
+
function ai({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
5273
6014
|
return W("AppTableEmptyState", i), /* @__PURE__ */ D("div", {
|
|
5274
6015
|
className: "tbl-empty",
|
|
5275
6016
|
...i,
|
|
@@ -5295,7 +6036,7 @@ function Sr({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
5295
6036
|
}
|
|
5296
6037
|
//#endregion
|
|
5297
6038
|
//#region src/components/AppTableToolbar.jsx
|
|
5298
|
-
function
|
|
6039
|
+
function oi({ filters: e, actions: t, selectedCount: n = 0, bulkActions: r, onClearSelection: i, className: a = "", ...o }) {
|
|
5299
6040
|
W("AppTableToolbar", o);
|
|
5300
6041
|
let s = n > 0;
|
|
5301
6042
|
return /* @__PURE__ */ D("div", {
|
|
@@ -5333,8 +6074,8 @@ function Cr({ filters: e, actions: t, selectedCount: n = 0, bulkActions: r, onCl
|
|
|
5333
6074
|
}
|
|
5334
6075
|
//#endregion
|
|
5335
6076
|
//#region src/components/AppTabs.jsx
|
|
5336
|
-
var
|
|
5337
|
-
function
|
|
6077
|
+
var si = 1, ci = 28, li = .7;
|
|
6078
|
+
function ui({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "underline", orientation: s = "horizontal", size: c = "md", fitted: u = !1, activation: p = "automatic", ariaLabel: m, className: h = "", style: g, ..._ }) {
|
|
5338
6079
|
W("AppTabs", _);
|
|
5339
6080
|
let v = d(null), y = d(null), b = s === "vertical", [x, S] = f(t);
|
|
5340
6081
|
o(() => {
|
|
@@ -5346,7 +6087,7 @@ function Dr({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5346
6087
|
let e = v.current, t = y.current;
|
|
5347
6088
|
if (!e || !t || b) return;
|
|
5348
6089
|
let n = e.scrollWidth - e.clientWidth;
|
|
5349
|
-
t.classList.toggle("is-overflow-start", e.scrollLeft >
|
|
6090
|
+
t.classList.toggle("is-overflow-start", e.scrollLeft > si), t.classList.toggle("is-overflow-end", n > si && e.scrollLeft < n - si);
|
|
5350
6091
|
}, [b]), M = a(() => {
|
|
5351
6092
|
let n = v.current;
|
|
5352
6093
|
if (!n) return;
|
|
@@ -5362,7 +6103,7 @@ function Dr({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5362
6103
|
if (!e || b) return;
|
|
5363
6104
|
let t = e.querySelector(".app-tab.active");
|
|
5364
6105
|
if (!t) return;
|
|
5365
|
-
let n =
|
|
6106
|
+
let n = ci, r = t.offsetLeft, i = r + t.offsetWidth;
|
|
5366
6107
|
r - n < e.scrollLeft ? e.scrollLeft = Math.max(0, r - n) : i + n > e.scrollLeft + e.clientWidth && (e.scrollLeft = i + n - e.clientWidth);
|
|
5367
6108
|
}, [b]);
|
|
5368
6109
|
l(() => {
|
|
@@ -5397,7 +6138,7 @@ function Dr({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5397
6138
|
}
|
|
5398
6139
|
let I = (e) => {
|
|
5399
6140
|
let t = v.current;
|
|
5400
|
-
t && t.scrollBy({ left: e * t.clientWidth *
|
|
6141
|
+
t && t.scrollBy({ left: e * t.clientWidth * li });
|
|
5401
6142
|
}, L = [
|
|
5402
6143
|
"app-tabs",
|
|
5403
6144
|
i === "pills" ? "app-tabs-pills" : "",
|
|
@@ -5510,7 +6251,7 @@ function Dr({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5510
6251
|
}
|
|
5511
6252
|
//#endregion
|
|
5512
6253
|
//#region src/components/AppTagInput.jsx
|
|
5513
|
-
var
|
|
6254
|
+
var di = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r, label: i, error: a, hint: o, required: c = !1, size: l, maxTags: u, allowDuplicates: d = !1, disabled: f = !1, id: p, ariaLabel: m, className: h = "", fieldClassName: g = "", help: _, helpLabel: v = "More information", ...y }, b) {
|
|
5514
6255
|
W("AppTagInput", y);
|
|
5515
6256
|
let x = s(), S = p || x, { setRef: C } = Q({
|
|
5516
6257
|
ref: b,
|
|
@@ -5561,7 +6302,7 @@ var Or = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5561
6302
|
}) : null
|
|
5562
6303
|
]
|
|
5563
6304
|
});
|
|
5564
|
-
}),
|
|
6305
|
+
}), fi = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: c = "More information", id: u, name: p, rows: m = 4, autoGrow: h = !1, showCount: g = !1, maxLength: _, className: v = "", fieldClassName: b = "", ...x }, S) {
|
|
5565
6306
|
W("AppTextarea", x);
|
|
5566
6307
|
let C = s(), w = u || C, T = [
|
|
5567
6308
|
"textarea",
|
|
@@ -5632,7 +6373,7 @@ var Or = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5632
6373
|
})
|
|
5633
6374
|
]
|
|
5634
6375
|
});
|
|
5635
|
-
}),
|
|
6376
|
+
}), pi = {
|
|
5636
6377
|
done: "check",
|
|
5637
6378
|
current: "clock",
|
|
5638
6379
|
"on-hold": "lock",
|
|
@@ -5641,7 +6382,7 @@ var Or = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5641
6382
|
skipped: "arrow-right",
|
|
5642
6383
|
upcoming: null
|
|
5643
6384
|
};
|
|
5644
|
-
function
|
|
6385
|
+
function mi({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
5645
6386
|
W("AppTimeline", o);
|
|
5646
6387
|
let s = t === "progress", c = `timeline${s ? " timeline--progress" : ""}${n === "horizontal" ? " timeline--horizontal" : ""}${i ? ` ${i}` : ""}`, l = typeof r == "number" && r > 0 ? r : void 0, u = l ? Math.round(l * .54) : s ? 13 : 12;
|
|
5647
6388
|
return /* @__PURE__ */ E("ol", {
|
|
@@ -5652,7 +6393,7 @@ function jr({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
5652
6393
|
} : a,
|
|
5653
6394
|
...o,
|
|
5654
6395
|
children: e.map((e, t) => {
|
|
5655
|
-
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ?
|
|
6396
|
+
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ? pi[n] : void 0) : e.icon || "circle";
|
|
5656
6397
|
return /* @__PURE__ */ D("li", {
|
|
5657
6398
|
className: `timeline-item${r}${i}`,
|
|
5658
6399
|
children: [/* @__PURE__ */ E("span", {
|
|
@@ -5722,7 +6463,7 @@ function jr({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
5722
6463
|
}
|
|
5723
6464
|
//#endregion
|
|
5724
6465
|
//#region src/components/AppTimePicker.jsx
|
|
5725
|
-
var
|
|
6466
|
+
var hi = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, step: u, format: d = "24", placeholder: f = "Select time", disabled: p, size: m, id: h, ariaLabel: g, className: _ = "", fieldClassName: v = "", ...y }, b) {
|
|
5726
6467
|
W("AppTimePicker", y);
|
|
5727
6468
|
let x = s(), S = h || o || x, { setRef: C } = Q({
|
|
5728
6469
|
ref: b,
|
|
@@ -5767,35 +6508,35 @@ var Mr = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
5767
6508
|
})
|
|
5768
6509
|
]
|
|
5769
6510
|
});
|
|
5770
|
-
}),
|
|
5771
|
-
function
|
|
5772
|
-
for (let e of
|
|
6511
|
+
}), gi = 6, $ = [], _i = /* @__PURE__ */ new Set(), vi = /* @__PURE__ */ new Map(), yi = /* @__PURE__ */ new Set(), bi = 0;
|
|
6512
|
+
function xi() {
|
|
6513
|
+
for (let e of _i) e($);
|
|
5773
6514
|
}
|
|
5774
|
-
function
|
|
5775
|
-
let t =
|
|
5776
|
-
t !== void 0 && (clearTimeout(t),
|
|
6515
|
+
function Si(e) {
|
|
6516
|
+
let t = vi.get(e);
|
|
6517
|
+
t !== void 0 && (clearTimeout(t), vi.delete(e));
|
|
5777
6518
|
}
|
|
5778
|
-
function
|
|
5779
|
-
if (e.length <=
|
|
6519
|
+
function Ci(e, t) {
|
|
6520
|
+
if (e.length <= gi) return e;
|
|
5780
6521
|
let n = [...e], r = [];
|
|
5781
|
-
for (; n.length >
|
|
6522
|
+
for (; n.length > gi;) {
|
|
5782
6523
|
let e = n.findIndex((e) => e.id !== t && e.duration !== 0);
|
|
5783
6524
|
r.push(n.splice(e === -1 ? n.findIndex((e) => e.id !== t) : e, 1)[0]);
|
|
5784
6525
|
}
|
|
5785
|
-
for (let e of r)
|
|
6526
|
+
for (let e of r) Si(e.id), yi.delete(e.id);
|
|
5786
6527
|
return n;
|
|
5787
6528
|
}
|
|
5788
|
-
function
|
|
5789
|
-
return
|
|
5790
|
-
if (
|
|
6529
|
+
function wi(e) {
|
|
6530
|
+
return _i.add(e), e($), () => {
|
|
6531
|
+
if (_i.delete(e), _i.size === 0) for (let e of $) e.duration > 0 && !vi.has(e.id) && (yi.delete(e.id), vi.set(e.id, setTimeout(() => Di(e.id), e.duration)));
|
|
5791
6532
|
};
|
|
5792
6533
|
}
|
|
5793
|
-
function
|
|
6534
|
+
function Ti(e, t, n = {}) {
|
|
5794
6535
|
let r = n.id, i = r || typeof e != "string" ? void 0 : `${t}:${e}`;
|
|
5795
6536
|
if (r) {
|
|
5796
6537
|
let i = $.find((e) => e.externalId === r);
|
|
5797
6538
|
if (i) {
|
|
5798
|
-
|
|
6539
|
+
Si(i.id);
|
|
5799
6540
|
let r = n.duration === void 0 ? 5e3 : n.duration;
|
|
5800
6541
|
$ = $.map((a) => a.id === i.id ? {
|
|
5801
6542
|
...a,
|
|
@@ -5808,12 +6549,12 @@ function Hr(e, t, n = {}) {
|
|
|
5808
6549
|
shape: n.shape,
|
|
5809
6550
|
surface: n.surface,
|
|
5810
6551
|
progress: n.progress
|
|
5811
|
-
} : a),
|
|
6552
|
+
} : a), xi(), r > 0 && !yi.has(i.id) && vi.set(i.id, setTimeout(() => Di(i.id), r));
|
|
5812
6553
|
return;
|
|
5813
6554
|
}
|
|
5814
6555
|
} else if (i && $.some((e) => e.key === i)) return;
|
|
5815
|
-
let a = ++
|
|
5816
|
-
$ =
|
|
6556
|
+
let a = ++bi, o = n.duration === void 0 ? 5e3 : n.duration;
|
|
6557
|
+
$ = Ci([...$, {
|
|
5817
6558
|
id: a,
|
|
5818
6559
|
externalId: r,
|
|
5819
6560
|
message: e,
|
|
@@ -5826,25 +6567,25 @@ function Hr(e, t, n = {}) {
|
|
|
5826
6567
|
surface: n.surface,
|
|
5827
6568
|
progress: n.progress,
|
|
5828
6569
|
key: i
|
|
5829
|
-
}], a),
|
|
6570
|
+
}], a), xi(), o > 0 && vi.set(a, setTimeout(() => Di(a), o));
|
|
5830
6571
|
}
|
|
5831
|
-
function
|
|
5832
|
-
|
|
6572
|
+
function Ei(e) {
|
|
6573
|
+
Si(e), yi.add(e);
|
|
5833
6574
|
}
|
|
5834
|
-
function
|
|
5835
|
-
|
|
6575
|
+
function Di(e) {
|
|
6576
|
+
Si(e), yi.delete(e);
|
|
5836
6577
|
let t = $.filter((t) => t.id !== e);
|
|
5837
|
-
t.length !== $.length && ($ = t,
|
|
6578
|
+
t.length !== $.length && ($ = t, xi());
|
|
5838
6579
|
}
|
|
5839
|
-
function
|
|
5840
|
-
if (!($.length === 0 &&
|
|
5841
|
-
for (let e of
|
|
5842
|
-
|
|
6580
|
+
function Oi() {
|
|
6581
|
+
if (!($.length === 0 && vi.size === 0 && yi.size === 0)) {
|
|
6582
|
+
for (let e of vi.values()) clearTimeout(e);
|
|
6583
|
+
vi.clear(), yi.clear(), $.length !== 0 && ($ = [], xi());
|
|
5843
6584
|
}
|
|
5844
6585
|
}
|
|
5845
6586
|
//#endregion
|
|
5846
6587
|
//#region src/components/AppToast.jsx
|
|
5847
|
-
var
|
|
6588
|
+
var ki = {
|
|
5848
6589
|
success: {
|
|
5849
6590
|
icon: "check-circle",
|
|
5850
6591
|
assertive: !1
|
|
@@ -5861,7 +6602,7 @@ var Kr = {
|
|
|
5861
6602
|
icon: "alert-circle",
|
|
5862
6603
|
assertive: !0
|
|
5863
6604
|
}
|
|
5864
|
-
},
|
|
6605
|
+
}, Ai = {
|
|
5865
6606
|
"top-start": "top-0 start-0",
|
|
5866
6607
|
"top-center": "top-0 start-50 translate-middle-x",
|
|
5867
6608
|
"top-end": "top-0 end-0",
|
|
@@ -5869,21 +6610,21 @@ var Kr = {
|
|
|
5869
6610
|
"bottom-start": "bottom-0 start-0",
|
|
5870
6611
|
"bottom-center": "bottom-0 start-50 translate-middle-x",
|
|
5871
6612
|
"bottom-end": "bottom-0 end-0"
|
|
5872
|
-
},
|
|
6613
|
+
}, ji = 64, Mi = /* @__PURE__ */ new Set([
|
|
5873
6614
|
"rise",
|
|
5874
6615
|
"organic",
|
|
5875
6616
|
"jelly",
|
|
5876
6617
|
"spring"
|
|
5877
|
-
]),
|
|
6618
|
+
]), Ni = /* @__PURE__ */ new Set([
|
|
5878
6619
|
"rounded",
|
|
5879
6620
|
"pill",
|
|
5880
6621
|
"sharp"
|
|
5881
|
-
]),
|
|
5882
|
-
function
|
|
5883
|
-
W("AppToast", s), G("AppToast", "position", e, Object.keys(
|
|
6622
|
+
]), Pi = /* @__PURE__ */ new Set(["auto", "inverse"]);
|
|
6623
|
+
function Fi({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "rise", shape: r = "rounded", surface: i = "auto", className: a = "", ...s }) {
|
|
6624
|
+
W("AppToast", s), G("AppToast", "position", e, Object.keys(Ai)), G("AppToast", "animation", n, Mi), G("AppToast", "shape", r, Ni), G("AppToast", "surface", i, Pi);
|
|
5884
6625
|
let [c, l] = f([]);
|
|
5885
|
-
o(() =>
|
|
5886
|
-
let u = Math.max(0, c.length - t), d = u ? c.slice(u) : c, p =
|
|
6626
|
+
o(() => wi(l), []);
|
|
6627
|
+
let u = Math.max(0, c.length - t), d = u ? c.slice(u) : c, p = Ai[e] ?? Ai["bottom-end"];
|
|
5887
6628
|
return /* @__PURE__ */ D("div", {
|
|
5888
6629
|
...s,
|
|
5889
6630
|
className: `wui-toast-container toast-container position-fixed ${p} p-3 ${a}`.trim(),
|
|
@@ -5895,7 +6636,7 @@ function Qr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
5895
6636
|
u,
|
|
5896
6637
|
" more"
|
|
5897
6638
|
]
|
|
5898
|
-
}), d.map((e) => /* @__PURE__ */ E(
|
|
6639
|
+
}), d.map((e) => /* @__PURE__ */ E(Ii, {
|
|
5899
6640
|
toast: e,
|
|
5900
6641
|
defaultAnimation: n,
|
|
5901
6642
|
defaultShape: r,
|
|
@@ -5903,14 +6644,14 @@ function Qr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
5903
6644
|
}, e.id))]
|
|
5904
6645
|
});
|
|
5905
6646
|
}
|
|
5906
|
-
function
|
|
5907
|
-
let i =
|
|
6647
|
+
function Ii({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded", defaultSurface: r = "auto" }) {
|
|
6648
|
+
let i = ki[e.variant] ?? ki.success, a = Mi.has(e.animation) ? e.animation : t, s = Ni.has(e.shape) ? e.shape : n, c = Pi.has(e.surface) ? e.surface : r, l = (a !== "rise" && Mi.has(a) ? ` wui-toast--anim-${a}` : "") + (s !== "rounded" && Ni.has(s) ? ` wui-toast--shape-${s}` : "") + (c === "inverse" ? " wui-toast--surface-inverse" : ""), u = e.duration === 0, [p, m] = f(0), [h, g] = f(!1), _ = d(null), v = () => Di(e.id), y = d(null);
|
|
5908
6649
|
o(() => {
|
|
5909
6650
|
if (e.duration === 0) return;
|
|
5910
|
-
|
|
6651
|
+
Ei(e.id);
|
|
5911
6652
|
let t = y.current, n = t == null ? "" : getComputedStyle(t).animationName;
|
|
5912
6653
|
if (t != null && (typeof t.getAnimations == "function" ? t.getAnimations().length > 0 : n !== "" && n !== "none")) return;
|
|
5913
|
-
let r = setTimeout(() =>
|
|
6654
|
+
let r = setTimeout(() => Di(e.id), e.duration);
|
|
5914
6655
|
return () => clearTimeout(r);
|
|
5915
6656
|
}, [e.id, e.duration]);
|
|
5916
6657
|
let b = (e) => {
|
|
@@ -5922,7 +6663,7 @@ function $r({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
5922
6663
|
}, C = (e) => {
|
|
5923
6664
|
if (_.current === null) return;
|
|
5924
6665
|
let t = e.clientX - _.current;
|
|
5925
|
-
if (Math.abs(t) >
|
|
6666
|
+
if (Math.abs(t) > ji) {
|
|
5926
6667
|
v();
|
|
5927
6668
|
return;
|
|
5928
6669
|
}
|
|
@@ -6006,7 +6747,7 @@ function $r({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
6006
6747
|
}
|
|
6007
6748
|
//#endregion
|
|
6008
6749
|
//#region src/components/AppToolbar.jsx
|
|
6009
|
-
function
|
|
6750
|
+
function Li({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelect: i, label: a, name: o, disabled: c = !1, className: l = "", ...u }) {
|
|
6010
6751
|
W("AppToolbar", u);
|
|
6011
6752
|
let d = s(), p = o || d, [m, h] = f(r), g = n === void 0 ? m : n;
|
|
6012
6753
|
return /* @__PURE__ */ D("div", {
|
|
@@ -6064,7 +6805,7 @@ function ei({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
6064
6805
|
}
|
|
6065
6806
|
//#endregion
|
|
6066
6807
|
//#region src/components/AppWizard.jsx
|
|
6067
|
-
var
|
|
6808
|
+
var Ri = i(function({ steps: t = [], children: n, active: r, defaultActive: i = 0, onStepChange: a, onFinish: s, onSkip: c, beforeNext: l, onInvalid: u, variant: f = "steps", tone: p, orientation: m = "horizontal", skippable: h = !1, nonLinear: g = !1, hideStepper: _ = !1, disabled: v = !1, label: y = "Progress", backLabel: b = "Back", nextLabel: x = "Next", skipLabel: S = "Skip", finishLabel: C = "Finish", className: w = "", ...T }, D) {
|
|
6068
6809
|
W("AppWizard", T);
|
|
6069
6810
|
let O = d(null), k = (e) => {
|
|
6070
6811
|
O.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
@@ -6116,13 +6857,13 @@ var ti = i(function({ steps: t = [], children: n, active: r, defaultActive: i =
|
|
|
6116
6857
|
children: A[t]
|
|
6117
6858
|
}, e.key ?? `${e.label}-${t}`))
|
|
6118
6859
|
});
|
|
6119
|
-
}),
|
|
6860
|
+
}), zi = /* @__PURE__ */ new Set([
|
|
6120
6861
|
"ArrowUp",
|
|
6121
6862
|
"ArrowDown",
|
|
6122
6863
|
"ArrowLeft",
|
|
6123
6864
|
"ArrowRight"
|
|
6124
6865
|
]);
|
|
6125
|
-
function
|
|
6866
|
+
function Bi({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAction: i, linkComponent: a, searchable: s = !1, onCreate: c, canCreate: l = !1, createLabel: p = "Create workspace", compact: m = !1, size: h = "md", ariaLabel: g, ..._ }) {
|
|
6126
6867
|
let { onToggle: y, ...b } = _;
|
|
6127
6868
|
W("AppWorkspaceSwitcher", b);
|
|
6128
6869
|
let [x, S] = f(""), [C, w] = f(!1), T = d(null), O = (e, t) => {
|
|
@@ -6142,7 +6883,7 @@ function ri({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
6142
6883
|
let e = T.current;
|
|
6143
6884
|
if (!e) return;
|
|
6144
6885
|
let t = (e) => {
|
|
6145
|
-
if (
|
|
6886
|
+
if (zi.has(e.key)) {
|
|
6146
6887
|
e.stopPropagation();
|
|
6147
6888
|
return;
|
|
6148
6889
|
}
|
|
@@ -6160,7 +6901,7 @@ function ri({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
6160
6901
|
onToggle: O,
|
|
6161
6902
|
...b,
|
|
6162
6903
|
children: [/* @__PURE__ */ E(v.Toggle, {
|
|
6163
|
-
as:
|
|
6904
|
+
as: Wi,
|
|
6164
6905
|
compact: m,
|
|
6165
6906
|
tenant: k,
|
|
6166
6907
|
"aria-label": M
|
|
@@ -6195,7 +6936,7 @@ function ri({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
6195
6936
|
className: `workspace-switcher-option${e.id === k?.id ? " is-active" : ""}`,
|
|
6196
6937
|
onClick: () => n?.(e),
|
|
6197
6938
|
children: [
|
|
6198
|
-
/* @__PURE__ */ E(
|
|
6939
|
+
/* @__PURE__ */ E(Hi, { tenant: e }),
|
|
6199
6940
|
/* @__PURE__ */ E("span", {
|
|
6200
6941
|
className: "workspace-switcher-option-name",
|
|
6201
6942
|
children: e.name
|
|
@@ -6227,17 +6968,17 @@ function ri({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
6227
6968
|
}) : null,
|
|
6228
6969
|
i ? /* @__PURE__ */ E("div", {
|
|
6229
6970
|
className: "workspace-switcher-footer",
|
|
6230
|
-
children:
|
|
6971
|
+
children: Ui(i, a)
|
|
6231
6972
|
}) : null
|
|
6232
6973
|
]
|
|
6233
6974
|
})]
|
|
6234
6975
|
});
|
|
6235
6976
|
}
|
|
6236
|
-
function
|
|
6977
|
+
function Vi(e) {
|
|
6237
6978
|
let t = String(e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
6238
6979
|
return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
|
|
6239
6980
|
}
|
|
6240
|
-
function
|
|
6981
|
+
function Hi({ tenant: e }) {
|
|
6241
6982
|
return e?.logoUrl ? /* @__PURE__ */ E("img", {
|
|
6242
6983
|
className: "workspace-switcher-mark",
|
|
6243
6984
|
src: e.logoUrl,
|
|
@@ -6245,10 +6986,10 @@ function ai({ tenant: e }) {
|
|
|
6245
6986
|
loading: "lazy"
|
|
6246
6987
|
}) : /* @__PURE__ */ E("span", {
|
|
6247
6988
|
className: "workspace-switcher-mark",
|
|
6248
|
-
children:
|
|
6989
|
+
children: Vi(e?.name)
|
|
6249
6990
|
});
|
|
6250
6991
|
}
|
|
6251
|
-
function
|
|
6992
|
+
function Ui(e, t) {
|
|
6252
6993
|
if (typeof e != "object" || !e || !("label" in e)) return e;
|
|
6253
6994
|
let { label: n, icon: r, href: i } = e;
|
|
6254
6995
|
return /* @__PURE__ */ D(i ? t ?? "a" : "button", {
|
|
@@ -6260,7 +7001,7 @@ function oi(e, t) {
|
|
|
6260
7001
|
}) : null, n]
|
|
6261
7002
|
});
|
|
6262
7003
|
}
|
|
6263
|
-
var
|
|
7004
|
+
var Wi = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i }, a) {
|
|
6264
7005
|
return /* @__PURE__ */ D("button", {
|
|
6265
7006
|
ref: a,
|
|
6266
7007
|
type: "button",
|
|
@@ -6268,7 +7009,7 @@ var si = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
6268
7009
|
"aria-haspopup": "true",
|
|
6269
7010
|
"aria-label": n,
|
|
6270
7011
|
...i,
|
|
6271
|
-
children: [/* @__PURE__ */ E(
|
|
7012
|
+
children: [/* @__PURE__ */ E(Hi, { tenant: t }), e ? null : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
6272
7013
|
className: "workspace-switcher-trigger-name",
|
|
6273
7014
|
children: t?.name
|
|
6274
7015
|
}), /* @__PURE__ */ E(Y, {
|
|
@@ -6280,36 +7021,36 @@ var si = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
6280
7021
|
});
|
|
6281
7022
|
//#endregion
|
|
6282
7023
|
//#region src/components/toast.js
|
|
6283
|
-
function
|
|
6284
|
-
|
|
7024
|
+
function Gi() {
|
|
7025
|
+
Oi();
|
|
6285
7026
|
}
|
|
6286
|
-
var
|
|
7027
|
+
var Ki = /* @__PURE__ */ new Set([
|
|
6287
7028
|
"success",
|
|
6288
7029
|
"info",
|
|
6289
7030
|
"warning",
|
|
6290
7031
|
"danger"
|
|
6291
7032
|
]);
|
|
6292
|
-
function
|
|
7033
|
+
function qi(e, t = "info") {
|
|
6293
7034
|
let n = "info", r = {};
|
|
6294
|
-
typeof t == "string" ? n =
|
|
7035
|
+
typeof t == "string" ? n = Ki.has(t) ? t : "info" : typeof t == "object" && t && (r = t, n = Ki.has(r.variant) ? r.variant : "info"), Ti(e, n, r);
|
|
6295
7036
|
}
|
|
6296
|
-
function
|
|
6297
|
-
|
|
7037
|
+
function Ji(e, t = {}) {
|
|
7038
|
+
Ti(e, "danger", t);
|
|
6298
7039
|
}
|
|
6299
|
-
|
|
7040
|
+
qi.promise = (e, t, n = {}) => {
|
|
6300
7041
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
6301
|
-
return
|
|
7042
|
+
return qi(t.loading || "Loading...", {
|
|
6302
7043
|
...n,
|
|
6303
7044
|
variant: "info",
|
|
6304
7045
|
id: r,
|
|
6305
7046
|
duration: 0
|
|
6306
|
-
}), e.then((e) => (
|
|
7047
|
+
}), e.then((e) => (qi((typeof t.success == "function" ? t.success(e) : t.success) || "Done", {
|
|
6307
7048
|
...n,
|
|
6308
7049
|
variant: "success",
|
|
6309
7050
|
id: r,
|
|
6310
7051
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
6311
7052
|
}), e)).catch((e) => {
|
|
6312
|
-
throw
|
|
7053
|
+
throw qi((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
6313
7054
|
...n,
|
|
6314
7055
|
variant: "danger",
|
|
6315
7056
|
id: r,
|
|
@@ -6319,7 +7060,7 @@ ui.promise = (e, t, n = {}) => {
|
|
|
6319
7060
|
};
|
|
6320
7061
|
//#endregion
|
|
6321
7062
|
//#region src/lib/useCommandPaletteShortcut.js
|
|
6322
|
-
function
|
|
7063
|
+
function Yi(e, { key: t = "k" } = {}) {
|
|
6323
7064
|
let n = d(e);
|
|
6324
7065
|
o(() => {
|
|
6325
7066
|
n.current = e;
|
|
@@ -6332,7 +7073,7 @@ function fi(e, { key: t = "k" } = {}) {
|
|
|
6332
7073
|
}
|
|
6333
7074
|
//#endregion
|
|
6334
7075
|
//#region src/lib/usePagination.js
|
|
6335
|
-
function
|
|
7076
|
+
function Xi(e, t = 10) {
|
|
6336
7077
|
let [n, r] = f(1), [i, a] = f(t), s = e.length, c = Math.max(1, Math.ceil(s / i));
|
|
6337
7078
|
o(() => {
|
|
6338
7079
|
n > c && r(c);
|
|
@@ -6359,10 +7100,10 @@ function pi(e, t = 10) {
|
|
|
6359
7100
|
}
|
|
6360
7101
|
//#endregion
|
|
6361
7102
|
//#region src/lib/useTableView.js
|
|
6362
|
-
var
|
|
6363
|
-
function
|
|
7103
|
+
var Zi = (e) => `wui-view:${e}`;
|
|
7104
|
+
function Qi(e, t) {
|
|
6364
7105
|
try {
|
|
6365
|
-
let n = window.localStorage.getItem(
|
|
7106
|
+
let n = window.localStorage.getItem(Zi(e));
|
|
6366
7107
|
if (!n) return t;
|
|
6367
7108
|
let r = JSON.parse(n);
|
|
6368
7109
|
return {
|
|
@@ -6373,14 +7114,14 @@ function hi(e, t) {
|
|
|
6373
7114
|
return t;
|
|
6374
7115
|
}
|
|
6375
7116
|
}
|
|
6376
|
-
function
|
|
6377
|
-
let [n, r] = f(() =>
|
|
7117
|
+
function $i(e, { sort: t } = {}) {
|
|
7118
|
+
let [n, r] = f(() => Qi(e, {
|
|
6378
7119
|
hidden: [],
|
|
6379
7120
|
sort: t
|
|
6380
7121
|
}));
|
|
6381
7122
|
o(() => {
|
|
6382
7123
|
try {
|
|
6383
|
-
window.localStorage.setItem(
|
|
7124
|
+
window.localStorage.setItem(Zi(e), JSON.stringify(n));
|
|
6384
7125
|
} catch {}
|
|
6385
7126
|
}, [e, n]);
|
|
6386
7127
|
let i = a((e) => r((t) => ({
|
|
@@ -6398,4 +7139,4 @@ function gi(e, { sort: t } = {}) {
|
|
|
6398
7139
|
};
|
|
6399
7140
|
}
|
|
6400
7141
|
//#endregion
|
|
6401
|
-
export { ke as AppAccordion, je as AppActionIcon, Ie as AppAlert, Ue as AppAsyncBlock, nt as AppAutocomplete, ct as AppAvatar, dt as AppAvatarGroup, ft as AppBadge, mt as AppBanner, ht as AppBreadcrumbs, Be as AppButton, _t as AppCard, yt as AppCheckbox, bt as AppChip, wt as AppChoiceCard, Tt as AppChoiceChip, Et as AppColorField, jt as AppColumnMenu, Rt as AppCommandPalette, Ut as AppCompareTable, qt as AppConfirmDialog, Yt as AppConsentBanner, Zt as AppCopyButton, $t as AppCountrySelect, dn as AppDataTable, fn as AppDatePicker, pn as AppDateRangePicker, mn as AppDescriptions, kt as AppDropdown, Ve as AppEmptyState,
|
|
7142
|
+
export { ke as AppAccordion, je as AppActionIcon, Ie as AppAlert, Ue as AppAsyncBlock, nt as AppAutocomplete, ct as AppAvatar, dt as AppAvatarGroup, ft as AppBadge, mt as AppBanner, ht as AppBreadcrumbs, Be as AppButton, _t as AppCard, yt as AppCheckbox, bt as AppChip, wt as AppChoiceCard, Tt as AppChoiceChip, Et as AppColorField, jt as AppColumnMenu, Rt as AppCommandPalette, Ut as AppCompareTable, qt as AppConfirmDialog, Yt as AppConsentBanner, Zt as AppCopyButton, $t as AppCountrySelect, dn as AppDataTable, fn as AppDatePicker, pn as AppDateRangePicker, mn as AppDescriptions, kt as AppDropdown, Ve as AppEmptyState, _n as AppErrorSummary, Cn as AppFileAttachment, En as AppFilePicker, Dn as AppFloatingDock, On as AppFormActions, kn as AppFormRow, Nn as AppFormSection, Y as AppIcon, Pn as AppInfoList, qe as AppInfoTip, Wt as AppInput, zn as AppKpiTile, Un as AppLink, Gn as AppLogoPicker, Yn as AppMeter, It as AppModal, Xn as AppMultiSelect, Zn as AppNumberInput, Qn as AppOtpInput, er as AppPageHeader, tr as AppPagination, nr as AppPhoneNumberInput, Ge as AppPopover, rr as AppPricingCard, or as AppProgress, Fr as AppQrCode, Ir as AppRadio, Lr as AppRadioGroup, Rr as AppRepeater, Z as AppRequiredMark, zr as AppResourceCard, Vr as AppResult, Hr as AppScrollbar, Ur as AppSearch, Gr as AppSegmented, qr as AppSelect, an as AppSelectMini, Jr as AppShell, Zr as AppSidebarMenu, en as AppSkeleton, tn as AppSkeletonRows, Qr as AppSlider, He as AppSpinner, ei as AppSplash, ti as AppStatusBadge, ni as AppStepper, ii as AppSwitch, ai as AppTableEmptyState, sn as AppTablePagination, oi as AppTableToolbar, ui as AppTabs, di as AppTagInput, fi as AppTextarea, hi as AppTimePicker, mi as AppTimeline, Fi as AppToast, Li as AppToolbar, ce as AppTooltip, Ri as AppWizard, Bi as AppWorkspaceSwitcher, Kt as MODAL_ICONS, Gi as dismissAll, Ji as errorToast, Ee as iconNames, Oe as registerIcons, qi as toast, Yi as useCommandPaletteShortcut, Xi as usePagination, $i as useTableView };
|