@oliasoft-open-source/react-ui-library 10.3.1-beta-1 → 10.3.1-beta-2
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.js +826 -818
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3260,7 +3260,11 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3260
3260
|
}, Jc = (e, t) => {
|
|
3261
3261
|
let n = Hc(t) ? t : Bc(t) ? [] : [t];
|
|
3262
3262
|
return !(n != null && n.every((t) => (e == null ? void 0 : e.find((e) => (e == null ? void 0 : e.value) === (t == null ? void 0 : t.value))) !== void 0));
|
|
3263
|
-
}, Yc = (e
|
|
3263
|
+
}, Yc = (e) => {
|
|
3264
|
+
if (!Array.isArray(e)) return !1;
|
|
3265
|
+
let t = e.filter((e) => e && e.type !== Va.HEADING).map((e) => String(e.value));
|
|
3266
|
+
return new Set(t).size < t.length;
|
|
3267
|
+
}, Xc = (e, t, n) => {
|
|
3264
3268
|
let r = Array.isArray(e) ? e : [], i = Hc(t), a = Kc(r), o = Uc(r, a), s = qc(r, t), c = Gc(o, t);
|
|
3265
3269
|
return {
|
|
3266
3270
|
options: o,
|
|
@@ -3270,12 +3274,16 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3270
3274
|
firstSelectedOptionIndex: s,
|
|
3271
3275
|
hasNonExistentValue: n && c !== void 0 ? Jc(o, c) : !1
|
|
3272
3276
|
};
|
|
3273
|
-
},
|
|
3274
|
-
let { name: t = "", options: n = [], value: r, native: i = !1, onChange: a = bn, warning: o, error: s, checkNonExistentValues: c = !0, closeOnOptionActionClick: l = !0, testId: u, disabled:
|
|
3275
|
-
i && !
|
|
3276
|
-
let
|
|
3277
|
-
|
|
3278
|
-
|
|
3277
|
+
}, Zc = (e) => {
|
|
3278
|
+
let { name: t = "", options: n = [], value: r, native: i = !1, onChange: a = bn, warning: o, error: s, checkNonExistentValues: c = !0, closeOnOptionActionClick: l = !0, testId: u, disabled: f, multi: p, ...m } = e, { multi: h, options: g, selectedOptions: _, firstSelectedOptionIndex: v, hasNonExistentValue: y } = Xc(n, r, c), b = !h, x = i && b;
|
|
3279
|
+
i && !b && console.warn("Native select does not support provided props (see stories)");
|
|
3280
|
+
let w = Yc(g);
|
|
3281
|
+
d(() => {
|
|
3282
|
+
w && console.error("Select: duplicate option values are not supported. Option values must be unique.");
|
|
3283
|
+
}, [w]);
|
|
3284
|
+
let T = "Value no longer available for re-selection", E = y && !f ? o ? /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("div", { children: T }), /* @__PURE__ */ S("div", { children: o })] }) : T : o, D = y && s && !f ? /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("div", { children: T }), /* @__PURE__ */ S("div", { children: s })] }) : s, O = (e, n) => {
|
|
3285
|
+
let r = !(e instanceof Event), i = h ? n : n.value, o = e.target, s = o instanceof HTMLInputElement;
|
|
3286
|
+
if (r && !s) e.target.name = t, e.target.value = i, h || (e.target.label = n.label), a(e);
|
|
3279
3287
|
else {
|
|
3280
3288
|
let r = {
|
|
3281
3289
|
...e,
|
|
@@ -3283,40 +3291,40 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3283
3291
|
...o,
|
|
3284
3292
|
name: t,
|
|
3285
3293
|
value: i,
|
|
3286
|
-
label:
|
|
3294
|
+
label: h ? void 0 : n.label
|
|
3287
3295
|
}
|
|
3288
3296
|
};
|
|
3289
3297
|
a(r);
|
|
3290
3298
|
}
|
|
3291
3299
|
};
|
|
3292
|
-
return
|
|
3293
|
-
...
|
|
3294
|
-
options:
|
|
3295
|
-
selectedOption:
|
|
3296
|
-
onChange:
|
|
3297
|
-
hasNonExistentValue:
|
|
3298
|
-
warning:
|
|
3299
|
-
error:
|
|
3300
|
+
return x ? /* @__PURE__ */ S(qs, {
|
|
3301
|
+
...m,
|
|
3302
|
+
options: g,
|
|
3303
|
+
selectedOption: _,
|
|
3304
|
+
onChange: O,
|
|
3305
|
+
hasNonExistentValue: y,
|
|
3306
|
+
warning: E,
|
|
3307
|
+
error: D,
|
|
3300
3308
|
testId: u,
|
|
3301
|
-
disabled:
|
|
3309
|
+
disabled: f
|
|
3302
3310
|
}) : /* @__PURE__ */ S(zc, {
|
|
3303
|
-
...
|
|
3304
|
-
options:
|
|
3305
|
-
selectedOptions:
|
|
3306
|
-
onChange:
|
|
3307
|
-
multi:
|
|
3308
|
-
firstSelectedOptionIndex:
|
|
3309
|
-
warning:
|
|
3310
|
-
error:
|
|
3311
|
+
...m,
|
|
3312
|
+
options: g,
|
|
3313
|
+
selectedOptions: _,
|
|
3314
|
+
onChange: O,
|
|
3315
|
+
multi: h,
|
|
3316
|
+
firstSelectedOptionIndex: v,
|
|
3317
|
+
warning: E,
|
|
3318
|
+
error: D,
|
|
3311
3319
|
testId: u,
|
|
3312
|
-
disabled:
|
|
3320
|
+
disabled: f,
|
|
3313
3321
|
closeOnOptionActionClick: l
|
|
3314
3322
|
});
|
|
3315
|
-
},
|
|
3323
|
+
}, Qc = (e, t) => t || e && e.reduce((e, t) => t != null && t.selected ? Number(t == null ? void 0 : t.value) : e, 10) || 10, $c = (e, t) => {
|
|
3316
3324
|
if (!t || !e) return 10;
|
|
3317
3325
|
let { options: n, value: r } = t, i = Number(r);
|
|
3318
|
-
return i === 0 ? 1 : Math.ceil(e /
|
|
3319
|
-
},
|
|
3326
|
+
return i === 0 ? 1 : Math.ceil(e / Qc(n, i));
|
|
3327
|
+
}, el = (e, t, n = "Selected page must be a positive whole number between 1 and") => {
|
|
3320
3328
|
let r = `${n} ${t}`, i = {
|
|
3321
3329
|
valid: !0,
|
|
3322
3330
|
error: null
|
|
@@ -3325,40 +3333,40 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3325
3333
|
valid: !1,
|
|
3326
3334
|
error: r
|
|
3327
3335
|
} : i;
|
|
3328
|
-
},
|
|
3336
|
+
}, tl = { paginationContainer: "_paginationContainer_1tmz4_1" }, nl = {
|
|
3329
3337
|
addon: "_addon_b4w53_1",
|
|
3330
3338
|
small: "_small_b4w53_12",
|
|
3331
3339
|
groupOrderFirst: "_groupOrderFirst_b4w53_16",
|
|
3332
3340
|
groupOrderMiddle: "_groupOrderMiddle_b4w53_17",
|
|
3333
3341
|
groupOrderLast: "_groupOrderLast_b4w53_21"
|
|
3334
|
-
},
|
|
3342
|
+
}, rl = ({ children: e, groupOrder: t, small: n = !1 }) => {
|
|
3335
3343
|
let r = (() => {
|
|
3336
3344
|
if (t) switch (t) {
|
|
3337
|
-
case H.FIRST: return
|
|
3338
|
-
case H.LAST: return
|
|
3339
|
-
default: return
|
|
3345
|
+
case H.FIRST: return nl.groupOrderFirst;
|
|
3346
|
+
case H.LAST: return nl.groupOrderLast;
|
|
3347
|
+
default: return nl.groupOrderMiddle;
|
|
3340
3348
|
}
|
|
3341
3349
|
return "";
|
|
3342
3350
|
})();
|
|
3343
3351
|
return /* @__PURE__ */ S("span", {
|
|
3344
|
-
className: b(
|
|
3352
|
+
className: b(nl.addon, r, n ? nl.small : ""),
|
|
3345
3353
|
children: e
|
|
3346
3354
|
});
|
|
3347
|
-
},
|
|
3348
|
-
let { rowCount: t, selectedPage: n, small: r, onSelectPage: i, rowsPerPage: a, errorMessageTemplate: o, testIds: s } = e, c = Number(a == null ? void 0 : a.value) === 0, l =
|
|
3355
|
+
}, il = ({ pagination: e }) => {
|
|
3356
|
+
let { rowCount: t, selectedPage: n, small: r, onSelectPage: i, rowsPerPage: a, errorMessageTemplate: o, testIds: s } = e, c = Number(a == null ? void 0 : a.value) === 0, l = $c(t, a), [u, f] = v(String(n));
|
|
3349
3357
|
d(() => {
|
|
3350
3358
|
f(String(n));
|
|
3351
3359
|
}, [n]);
|
|
3352
|
-
let { error: p } =
|
|
3353
|
-
let { valid: t } =
|
|
3360
|
+
let { error: p } = el(u, l, o), m = (e) => {
|
|
3361
|
+
let { valid: t } = el(e, l, o);
|
|
3354
3362
|
f(e), t && e !== "" && i && i(Number(e));
|
|
3355
3363
|
};
|
|
3356
3364
|
return /* @__PURE__ */ C("div", {
|
|
3357
|
-
className:
|
|
3365
|
+
className: tl.paginationContainer,
|
|
3358
3366
|
children: [
|
|
3359
3367
|
a && /* @__PURE__ */ S("div", {
|
|
3360
3368
|
style: { flexShrink: 0 },
|
|
3361
|
-
children: /* @__PURE__ */ S(
|
|
3369
|
+
children: /* @__PURE__ */ S(Zc, {
|
|
3362
3370
|
onChange: (e) => {
|
|
3363
3371
|
a.onChange && a.onChange(e), m("1");
|
|
3364
3372
|
},
|
|
@@ -3396,7 +3404,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3396
3404
|
width: "50px",
|
|
3397
3405
|
disabled: c || l <= 1,
|
|
3398
3406
|
error: p
|
|
3399
|
-
}), /* @__PURE__ */ C(
|
|
3407
|
+
}), /* @__PURE__ */ C(rl, { children: ["of ", l] })]
|
|
3400
3408
|
}),
|
|
3401
3409
|
/* @__PURE__ */ S(q, {
|
|
3402
3410
|
small: r,
|
|
@@ -3417,7 +3425,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3417
3425
|
})
|
|
3418
3426
|
]
|
|
3419
3427
|
});
|
|
3420
|
-
},
|
|
3428
|
+
}, al = ({ pagination: e, actions: t, content: n, testId: r }) => {
|
|
3421
3429
|
let i = t && t.length, a = n != null, o = () => {
|
|
3422
3430
|
if (e) {
|
|
3423
3431
|
var t;
|
|
@@ -3434,19 +3442,19 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3434
3442
|
children: /* @__PURE__ */ S("div", { children: n })
|
|
3435
3443
|
}) : null, i || o() ? /* @__PURE__ */ C("div", {
|
|
3436
3444
|
className: Gs.section,
|
|
3437
|
-
children: [e && o() ? /* @__PURE__ */ S(
|
|
3445
|
+
children: [e && o() ? /* @__PURE__ */ S(il, { pagination: e }) : /* @__PURE__ */ S("div", {}), i && /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(so, { actions: t }) })]
|
|
3438
3446
|
}) : null]
|
|
3439
3447
|
}) : null;
|
|
3440
|
-
},
|
|
3448
|
+
}, ol = (e) => {
|
|
3441
3449
|
let t = Math.max(...e.reduce((e, t) => {
|
|
3442
3450
|
let n = t.cells.map((e) => e.colSpan ? e.colSpan : 1).reduce((e, t) => e + t, 0);
|
|
3443
3451
|
return e.concat(n);
|
|
3444
3452
|
}, []));
|
|
3445
3453
|
return isNaN(t) ? 0 : t;
|
|
3446
|
-
},
|
|
3447
|
-
let n = [
|
|
3454
|
+
}, sl = (e, t) => {
|
|
3455
|
+
let n = [ol(t), ol(e)];
|
|
3448
3456
|
return Math.max(...n);
|
|
3449
|
-
},
|
|
3457
|
+
}, cl = (e) => e.reduce((e, t) => t.actions && t.actions.length > 0 ? 1 : e, 0), ll = (e, t) => cl(t) > 0 || cl(e) > 0, ul = {
|
|
3450
3458
|
clickableRow: "_clickableRow_g8hv8_1",
|
|
3451
3459
|
hoverableRow: "_hoverableRow_g8hv8_4",
|
|
3452
3460
|
rowActive: "_rowActive_g8hv8_4",
|
|
@@ -3455,11 +3463,11 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3455
3463
|
dragIconCell: "_dragIconCell_g8hv8_34",
|
|
3456
3464
|
dragIcon: "_dragIcon_g8hv8_34",
|
|
3457
3465
|
dragIconDisabled: "_dragIconDisabled_g8hv8_55"
|
|
3458
|
-
},
|
|
3466
|
+
}, dl = ({ colSpan: e, children: t, flush: n }) => /* @__PURE__ */ S("tr", { children: /* @__PURE__ */ S("td", {
|
|
3459
3467
|
colSpan: e,
|
|
3460
|
-
className: b(
|
|
3468
|
+
className: b(ul.expandableRow, n ? ul.flush : ""),
|
|
3461
3469
|
children: t
|
|
3462
|
-
}) }),
|
|
3470
|
+
}) }), fl = (e, t = {
|
|
3463
3471
|
leftAligned: "",
|
|
3464
3472
|
rightAligned: "",
|
|
3465
3473
|
centerAligned: ""
|
|
@@ -3472,7 +3480,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3472
3480
|
case ji.CENTER: return n ? ji.CENTER : t.centerAligned;
|
|
3473
3481
|
default: return n ? ji.LEFT : t.leftAligned;
|
|
3474
3482
|
}
|
|
3475
|
-
},
|
|
3483
|
+
}, pl = (e, t = !1, n = 0) => {
|
|
3476
3484
|
if (!e || e.length === 0) return [];
|
|
3477
3485
|
let r = e.every((e) => Array.isArray(e)), i = e.every((e) => typeof e == "string");
|
|
3478
3486
|
return r && t ? e[n] || [] : i ? e : (console.warn("getHeaderAlignment: alignments array contains a mix of strings and arrays, returning an empty array."), []);
|
|
@@ -3507,7 +3515,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3507
3515
|
popover: "_popover_g4jsi_211",
|
|
3508
3516
|
disabledPointerEvents: "_disabledPointerEvents_g4jsi_214",
|
|
3509
3517
|
standaloneCheckbox: "_standaloneCheckbox_g4jsi_217"
|
|
3510
|
-
},
|
|
3518
|
+
}, ml = ({ cell: e, columnAlignment: t, testId: n, type: r }) => /* @__PURE__ */ S(ds, {
|
|
3511
3519
|
name: e.name,
|
|
3512
3520
|
value: e.value,
|
|
3513
3521
|
onChange: (t) => {
|
|
@@ -3532,7 +3540,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3532
3540
|
tabIndex: e.disabled ? -1 : 0,
|
|
3533
3541
|
tooltip: e.tooltip,
|
|
3534
3542
|
type: r
|
|
3535
|
-
}),
|
|
3543
|
+
}), hl = (e) => e ? typeof e == "string" ? e : cn(e) ? e[0] : e.fieldName : "", gl = (e) => e.startsWith("."), _l = (e, t) => gl(e) && t === `0${e}` ? e : t, vl = ({ name: e, placeholder: t = "", disabled: n = !1, error: r = !1, left: i = !1, small: a = !1, width: o = "100%", value: s = "", onChange: c = () => {}, onFocus: l = () => {}, onBlur: u = () => {}, selectOnFocus: f = !0, tabIndex: p = 0, testId: m, tooltip: h = null, warning: g = !1, validationCallback: y = () => {}, allowEmpty: b = !1, isInTable: x, groupOrder: C, enableCosmeticRounding: w = !0, enableDisplayRounding: T = !1, roundDisplayValue: E, disableInternalErrorValidationMessages: D = !1, disableValidationOnFocus: O = !1 }) => {
|
|
3536
3544
|
let k = (e) => {
|
|
3537
3545
|
let n = mr(e), r = t && Bc(e);
|
|
3538
3546
|
return [Infinity, -Infinity].includes(Number(e)) || r ? {
|
|
@@ -3547,7 +3555,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3547
3555
|
var t;
|
|
3548
3556
|
let n = !!(e != null && e.endsWith("0")), r = w && e && !n && (t = k(e)) != null && t.valid ? sr(e) : e;
|
|
3549
3557
|
return fr(r);
|
|
3550
|
-
}, j = _(null), [M, N] = v(A(fr(s))), [P, F] = v(!1), I =
|
|
3558
|
+
}, j = _(null), [M, N] = v(A(fr(s))), [P, F] = v(!1), I = hl(e), { valid: L, errors: R } = k(M), z = R && R.length && !D ? R[0] : null;
|
|
3551
3559
|
d(() => {
|
|
3552
3560
|
let e = A(fr(s));
|
|
3553
3561
|
dr(M) !== dr(e) && N(e);
|
|
@@ -3565,7 +3573,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3565
3573
|
let B = (e) => {
|
|
3566
3574
|
var n, r;
|
|
3567
3575
|
let i = "key" in e ? M : e == null || (n = e.target) == null ? void 0 : n.value, a = i.replaceAll(" ", "").replaceAll("|", ""), o = qn(a);
|
|
3568
|
-
N(
|
|
3576
|
+
N(_l(a, o)), ((r = k(o)) != null && r.valid || t && Bc(i)) && c({
|
|
3569
3577
|
...e,
|
|
3570
3578
|
target: {
|
|
3571
3579
|
...e.target,
|
|
@@ -3586,7 +3594,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3586
3594
|
let ee = (e) => {
|
|
3587
3595
|
F(!0), l(e);
|
|
3588
3596
|
}, te = (e) => {
|
|
3589
|
-
F(!1),
|
|
3597
|
+
F(!1), gl(M) && N(qn(M)), u(e);
|
|
3590
3598
|
}, ne = T && !P && L ? E ? fr(E(M)) : ((e) => x ? cr(e, 2) : ar(e, 4))(s) : M;
|
|
3591
3599
|
return /* @__PURE__ */ S(ds, {
|
|
3592
3600
|
type: "text",
|
|
@@ -3613,9 +3621,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3613
3621
|
tooltip: h,
|
|
3614
3622
|
ref: j
|
|
3615
3623
|
}, I);
|
|
3616
|
-
},
|
|
3624
|
+
}, yl = ({ cell: e, columnAlignment: t, testId: n }) => {
|
|
3617
3625
|
var r;
|
|
3618
|
-
return /* @__PURE__ */ S(
|
|
3626
|
+
return /* @__PURE__ */ S(vl, {
|
|
3619
3627
|
name: e.name,
|
|
3620
3628
|
value: e.value,
|
|
3621
3629
|
onChange: (t) => {
|
|
@@ -3641,7 +3649,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3641
3649
|
roundDisplayValue: e.roundDisplayValue,
|
|
3642
3650
|
disableValidationOnFocus: e.disableValidationOnFocus
|
|
3643
3651
|
});
|
|
3644
|
-
},
|
|
3652
|
+
}, bl = ({ cell: e, columnAlignment: t, testId: n }) => /* @__PURE__ */ S(Zc, {
|
|
3645
3653
|
name: e.name,
|
|
3646
3654
|
options: e.options,
|
|
3647
3655
|
onChange: (t) => {
|
|
@@ -3665,26 +3673,26 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3665
3673
|
right: t === ji.RIGHT,
|
|
3666
3674
|
testId: n,
|
|
3667
3675
|
tabIndex: e.disabled ? -1 : 0
|
|
3668
|
-
}),
|
|
3676
|
+
}), xl = ({ cell: e, columnAlignment: t, testId: n }) => /* @__PURE__ */ S("div", {
|
|
3669
3677
|
className: b(X.inputWrapper, e.type === "NumberInput" ? X.numberInputWrapper : ""),
|
|
3670
|
-
children: e.type === "Input" ? /* @__PURE__ */ S(
|
|
3678
|
+
children: e.type === "Input" ? /* @__PURE__ */ S(ml, {
|
|
3671
3679
|
cell: e,
|
|
3672
3680
|
columnAlignment: t,
|
|
3673
3681
|
testId: n
|
|
3674
|
-
}) : e.type === "NumberInput" ? /* @__PURE__ */ S(
|
|
3682
|
+
}) : e.type === "NumberInput" ? /* @__PURE__ */ S(yl, {
|
|
3675
3683
|
cell: e,
|
|
3676
3684
|
columnAlignment: t,
|
|
3677
3685
|
testId: n
|
|
3678
|
-
}) : e.type === "DateInput" ? /* @__PURE__ */ S(
|
|
3686
|
+
}) : e.type === "DateInput" ? /* @__PURE__ */ S(ml, {
|
|
3679
3687
|
cell: e,
|
|
3680
3688
|
testId: n,
|
|
3681
3689
|
type: "date"
|
|
3682
|
-
}) : e.type === "Select" ? /* @__PURE__ */ S(
|
|
3690
|
+
}) : e.type === "Select" ? /* @__PURE__ */ S(bl, {
|
|
3683
3691
|
cell: e,
|
|
3684
3692
|
columnAlignment: t,
|
|
3685
3693
|
testId: n
|
|
3686
3694
|
}) : null
|
|
3687
|
-
}),
|
|
3695
|
+
}), Sl = ({ cell: e, testId: t }) => {
|
|
3688
3696
|
let n = u(W), { error: r, warning: i, tooltip: a, maxTooltipWidth: o } = e, s = (e) => Y(e);
|
|
3689
3697
|
return /* @__PURE__ */ S("div", {
|
|
3690
3698
|
className: X.inputWrapper,
|
|
@@ -3710,7 +3718,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3710
3718
|
})
|
|
3711
3719
|
})
|
|
3712
3720
|
});
|
|
3713
|
-
},
|
|
3721
|
+
}, Cl = ({ cell: e, testId: t }) => /* @__PURE__ */ S("div", {
|
|
3714
3722
|
className: e.label ? "" : X.standaloneCheckbox,
|
|
3715
3723
|
children: /* @__PURE__ */ S(K, {
|
|
3716
3724
|
text: e.tooltip,
|
|
@@ -3726,7 +3734,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3726
3734
|
indeterminate: e.indeterminate
|
|
3727
3735
|
})
|
|
3728
3736
|
})
|
|
3729
|
-
}),
|
|
3737
|
+
}), wl = {
|
|
3730
3738
|
container: "_container_9tr5w_1",
|
|
3731
3739
|
small: "_small_9tr5w_9",
|
|
3732
3740
|
vertical: "_vertical_9tr5w_12",
|
|
@@ -3743,17 +3751,17 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3743
3751
|
markActive: "_markActive_9tr5w_151",
|
|
3744
3752
|
sliderDisabled: "_sliderDisabled_9tr5w_154",
|
|
3745
3753
|
label: "_label_9tr5w_166"
|
|
3746
|
-
},
|
|
3754
|
+
}, Tl = (e, t) => xn(cn(e) ? e : [e]).slice(0, t ? 2 : 1), El = (e, t) => t ? e : e[0], Dl = Er((e) => e.map(({ label: e, tooltip: t, value: n }) => ({
|
|
3747
3755
|
label: e,
|
|
3748
3756
|
tooltip: t,
|
|
3749
3757
|
value: Number(n)
|
|
3750
|
-
})), Dr),
|
|
3758
|
+
})), Dr), Ol = ({ name: e, label: t, width: n = "100%", labelWidth: r = "auto", testId: i, value: a, min: o, max: s, step: c = 1, marks: l = [], showArrows: d = !1, showTooltip: f = !1, tooltipFormatter: p = (e) => e, disabled: m = !1, range: g = !1, small: _ = !1, vertical: y = {
|
|
3751
3759
|
enabled: !1,
|
|
3752
3760
|
width: "100px",
|
|
3753
3761
|
height: "400px"
|
|
3754
3762
|
}, onChange: w, onChangeComplete: T }) => {
|
|
3755
|
-
let E = u(W), D = m || E, [O, k] = v(null), A =
|
|
3756
|
-
let r =
|
|
3763
|
+
let E = u(W), D = m || E, [O, k] = v(null), A = Dl(l), j = h(() => Tl(a, g), [g, a]), M = (n) => {
|
|
3764
|
+
let r = El(n, g);
|
|
3757
3765
|
return { target: {
|
|
3758
3766
|
name: e == null ? "" : e,
|
|
3759
3767
|
value: r,
|
|
@@ -3766,7 +3774,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3766
3774
|
}, F = (e) => {
|
|
3767
3775
|
N(e), P(e);
|
|
3768
3776
|
}, I = () => /* @__PURE__ */ S("div", {
|
|
3769
|
-
className:
|
|
3777
|
+
className: wl.button,
|
|
3770
3778
|
children: /* @__PURE__ */ S(q, {
|
|
3771
3779
|
basic: !0,
|
|
3772
3780
|
small: !0,
|
|
@@ -3780,7 +3788,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3780
3788
|
testId: i ? `${i}-min` : void 0
|
|
3781
3789
|
})
|
|
3782
3790
|
}), L = () => /* @__PURE__ */ S("div", {
|
|
3783
|
-
className:
|
|
3791
|
+
className: wl.button,
|
|
3784
3792
|
children: /* @__PURE__ */ S(q, {
|
|
3785
3793
|
basic: !0,
|
|
3786
3794
|
small: !0,
|
|
@@ -3800,7 +3808,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3800
3808
|
if (i) return g ? `${i}-handle-${e}` : `${i}-handle`;
|
|
3801
3809
|
}, ee = (e) => g ? j[0] <= e && e <= j[1] : j[0] >= e, te = (e) => g ? Math.abs(e - j[0]) <= Math.abs(e - j[1]) ? [tn(e, o, j[1]), j[1]] : [j[0], tn(e, j[0], s)] : [tn(e, o, s)];
|
|
3802
3810
|
return /* @__PURE__ */ C("div", {
|
|
3803
|
-
className: b(
|
|
3811
|
+
className: b(wl.container, _ ? wl.small : "", y.enabled ? wl.vertical : ""),
|
|
3804
3812
|
style: y.enabled ? {
|
|
3805
3813
|
width: y.width,
|
|
3806
3814
|
height: y.height
|
|
@@ -3808,7 +3816,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3808
3816
|
children: [
|
|
3809
3817
|
d && (y.enabled ? /* @__PURE__ */ S(L, {}) : /* @__PURE__ */ S(I, {})),
|
|
3810
3818
|
/* @__PURE__ */ C(Tr.Root, {
|
|
3811
|
-
className: b(
|
|
3819
|
+
className: b(wl.slider, D && wl.sliderDisabled, d && wl.hasArrows),
|
|
3812
3820
|
"data-testid": i,
|
|
3813
3821
|
disabled: D,
|
|
3814
3822
|
max: s,
|
|
@@ -3823,14 +3831,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3823
3831
|
step: c,
|
|
3824
3832
|
value: j,
|
|
3825
3833
|
children: [/* @__PURE__ */ C(Tr.Track, {
|
|
3826
|
-
className:
|
|
3827
|
-
children: [/* @__PURE__ */ S(Tr.Range, { className:
|
|
3828
|
-
className:
|
|
3834
|
+
className: wl.track,
|
|
3835
|
+
children: [/* @__PURE__ */ S(Tr.Range, { className: wl.range }), A.length > 0 && /* @__PURE__ */ S("span", {
|
|
3836
|
+
className: wl.marks,
|
|
3829
3837
|
children: A.map(({ label: e, tooltip: t, value: n }) => {
|
|
3830
3838
|
let r = Number(n), i = ee(r), a = { [y.enabled ? "bottom" : "left"]: R(r) };
|
|
3831
3839
|
return /* @__PURE__ */ S("button", {
|
|
3832
3840
|
"aria-label": String(e == null ? n : e),
|
|
3833
|
-
className: b(
|
|
3841
|
+
className: b(wl.mark, i && wl.markActive),
|
|
3834
3842
|
disabled: D,
|
|
3835
3843
|
onClick: (e) => {
|
|
3836
3844
|
e.stopPropagation(), F(te(r));
|
|
@@ -3844,7 +3852,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3844
3852
|
t ? ": " : "",
|
|
3845
3853
|
e == null ? n : e
|
|
3846
3854
|
] }),
|
|
3847
|
-
children: /* @__PURE__ */ S("span", { className:
|
|
3855
|
+
children: /* @__PURE__ */ S("span", { className: wl.dot })
|
|
3848
3856
|
})
|
|
3849
3857
|
}, String(n));
|
|
3850
3858
|
})
|
|
@@ -3853,7 +3861,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3853
3861
|
var i;
|
|
3854
3862
|
return /* @__PURE__ */ S(Tr.Thumb, {
|
|
3855
3863
|
"aria-label": String((i = t == null ? e : t) == null ? "Slider" : i),
|
|
3856
|
-
className:
|
|
3864
|
+
className: wl.thumb,
|
|
3857
3865
|
"data-testid": B(r),
|
|
3858
3866
|
onKeyDown: () => k(r),
|
|
3859
3867
|
onKeyUp: () => k(null),
|
|
@@ -3862,28 +3870,28 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3862
3870
|
style: z(n),
|
|
3863
3871
|
children: f && O === r && /* @__PURE__ */ S(K, {
|
|
3864
3872
|
display: "block",
|
|
3865
|
-
text: p(
|
|
3873
|
+
text: p(El(j, g)),
|
|
3866
3874
|
forceOpen: !0,
|
|
3867
3875
|
triggerStyle: {
|
|
3868
3876
|
position: "absolute",
|
|
3869
3877
|
inset: 0
|
|
3870
3878
|
},
|
|
3871
|
-
children: /* @__PURE__ */ S("span", { className:
|
|
3879
|
+
children: /* @__PURE__ */ S("span", { className: wl.thumbTooltipTrigger })
|
|
3872
3880
|
})
|
|
3873
3881
|
}, r);
|
|
3874
3882
|
})]
|
|
3875
3883
|
}),
|
|
3876
3884
|
d && (y.enabled ? /* @__PURE__ */ S(I, {}) : /* @__PURE__ */ S(L, {})),
|
|
3877
3885
|
t && /* @__PURE__ */ S("label", {
|
|
3878
|
-
className:
|
|
3886
|
+
className: wl.label,
|
|
3879
3887
|
style: { width: r },
|
|
3880
3888
|
children: t
|
|
3881
3889
|
})
|
|
3882
3890
|
]
|
|
3883
3891
|
});
|
|
3884
|
-
},
|
|
3892
|
+
}, kl = ({ cell: e }) => /* @__PURE__ */ S("div", {
|
|
3885
3893
|
className: X.inputWrapper,
|
|
3886
|
-
children: /* @__PURE__ */ S(
|
|
3894
|
+
children: /* @__PURE__ */ S(Ol, {
|
|
3887
3895
|
label: e.label,
|
|
3888
3896
|
testId: e.testId,
|
|
3889
3897
|
value: e.value,
|
|
@@ -3897,7 +3905,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3897
3905
|
tooltipFormatter: e.tooltipFormatter,
|
|
3898
3906
|
disabled: e.disabled
|
|
3899
3907
|
})
|
|
3900
|
-
}),
|
|
3908
|
+
}), Al = ({ cell: e }) => {
|
|
3901
3909
|
let { tooltip: t, icon: n } = e;
|
|
3902
3910
|
return /* @__PURE__ */ S("div", {
|
|
3903
3911
|
className: X.iconCellWrapper,
|
|
@@ -3909,7 +3917,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3909
3917
|
children: /* @__PURE__ */ S(G, { icon: n })
|
|
3910
3918
|
})
|
|
3911
3919
|
});
|
|
3912
|
-
},
|
|
3920
|
+
}, jl = ({ cell: e }) => /* @__PURE__ */ S(so, { actions: e.actions }), Ml = ({ cell: e }) => {
|
|
3913
3921
|
let { helpIcon: t } = e;
|
|
3914
3922
|
return t ? /* @__PURE__ */ S("div", {
|
|
3915
3923
|
className: X.icon,
|
|
@@ -3918,7 +3926,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3918
3926
|
text: t.tooltip
|
|
3919
3927
|
})
|
|
3920
3928
|
}) : null;
|
|
3921
|
-
},
|
|
3929
|
+
}, Nl = ({ cell: e }) => {
|
|
3922
3930
|
let { libraryIcon: t } = e;
|
|
3923
3931
|
return t ? /* @__PURE__ */ S("div", {
|
|
3924
3932
|
className: X.icon,
|
|
@@ -3928,7 +3936,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3928
3936
|
icon: U.LIBRARY
|
|
3929
3937
|
})
|
|
3930
3938
|
}) : null;
|
|
3931
|
-
},
|
|
3939
|
+
}, Pl = ({ cell: e }) => {
|
|
3932
3940
|
let { hasSort: t, sort: n, sortPriority: r } = e;
|
|
3933
3941
|
return t ? /* @__PURE__ */ C("span", {
|
|
3934
3942
|
className: X.sortingCellIcon,
|
|
@@ -3943,7 +3951,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3943
3951
|
children: /* @__PURE__ */ S(G, { icon: U.SORT_DESCENDING })
|
|
3944
3952
|
}), r && n ? /* @__PURE__ */ S("sup", { children: r }) : null]
|
|
3945
3953
|
}) : null;
|
|
3946
|
-
},
|
|
3954
|
+
}, Fl = ({ cell: e, isHeader: t, testId: n }) => {
|
|
3947
3955
|
let { error: r, warning: i, tooltip: a, maxTooltipWidth: o, hasSort: s, onSort: c, type: l } = e, u = /* @__PURE__ */ C("div", {
|
|
3948
3956
|
className: b(X.staticCellContent, l === "Unit" ? X.unit : ""),
|
|
3949
3957
|
onClick: s ? (e) => c && c(e) : () => {},
|
|
@@ -3951,9 +3959,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3951
3959
|
"data-warning": i || null,
|
|
3952
3960
|
"data-testid": n,
|
|
3953
3961
|
children: [e.value, t ? /* @__PURE__ */ C(x, { children: [
|
|
3954
|
-
/* @__PURE__ */ S(jl, { cell: e }),
|
|
3955
3962
|
/* @__PURE__ */ S(Ml, { cell: e }),
|
|
3956
|
-
/* @__PURE__ */ S(Nl, { cell: e })
|
|
3963
|
+
/* @__PURE__ */ S(Nl, { cell: e }),
|
|
3964
|
+
/* @__PURE__ */ S(Pl, { cell: e })
|
|
3957
3965
|
] }) : null]
|
|
3958
3966
|
});
|
|
3959
3967
|
return /* @__PURE__ */ S("div", {
|
|
@@ -3968,7 +3976,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3968
3976
|
children: u
|
|
3969
3977
|
})
|
|
3970
3978
|
});
|
|
3971
|
-
},
|
|
3979
|
+
}, Il = ({ cell: e, testId: t }) => {
|
|
3972
3980
|
let { content: n, fullWidth: r, closeOnOutsideClick: i, disabled: a } = e;
|
|
3973
3981
|
return /* @__PURE__ */ S(vo, {
|
|
3974
3982
|
content: n,
|
|
@@ -3977,13 +3985,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
3977
3985
|
disabled: a,
|
|
3978
3986
|
children: /* @__PURE__ */ S("div", {
|
|
3979
3987
|
className: X.popover,
|
|
3980
|
-
children: /* @__PURE__ */ S(
|
|
3988
|
+
children: /* @__PURE__ */ S(Fl, {
|
|
3981
3989
|
cell: e,
|
|
3982
3990
|
testId: t
|
|
3983
3991
|
})
|
|
3984
3992
|
})
|
|
3985
3993
|
});
|
|
3986
|
-
},
|
|
3994
|
+
}, Ll = {
|
|
3987
3995
|
inputInTable: "_inputInTable_abetp_1",
|
|
3988
3996
|
inputHover: "_inputHover_abetp_13",
|
|
3989
3997
|
inputFocus: "_inputFocus_abetp_18",
|
|
@@ -4003,18 +4011,18 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4003
4011
|
control: "_control_abetp_25",
|
|
4004
4012
|
labelText: "_labelText_abetp_151",
|
|
4005
4013
|
isInTable: "_isInTable_abetp_214"
|
|
4006
|
-
},
|
|
4014
|
+
}, Rl = ({ name: e, label: t, value: n = "", selected: r = !1, disabled: i = !1, small: a = !1, onChange: o, noMargin: s = !1, testId: c, helpText: l, onClickHelp: d, textTransform: f = Ni.CAPITALIZE }) => {
|
|
4007
4015
|
var p, m;
|
|
4008
4016
|
let h = u(Mr) != null, g = l || d, _ = (p = n == null ? void 0 : n.toString()) == null ? "" : p, v = /* @__PURE__ */ C(Ar, {
|
|
4009
4017
|
value: _,
|
|
4010
4018
|
isDisabled: i,
|
|
4011
|
-
className:
|
|
4019
|
+
className: Ll.radioContainer,
|
|
4012
4020
|
"data-testid": c ? `${c}-field` : void 0,
|
|
4013
4021
|
children: [/* @__PURE__ */ C(kr, {
|
|
4014
|
-
className: b(
|
|
4022
|
+
className: b(Ll.radio, a && Ll.small, s && Ll.noMargin, !t && Ll.noLabel),
|
|
4015
4023
|
"data-testid": c,
|
|
4016
|
-
children: [/* @__PURE__ */ S("span", { className:
|
|
4017
|
-
className:
|
|
4024
|
+
children: [/* @__PURE__ */ S("span", { className: Ll.control }), t && /* @__PURE__ */ S("span", {
|
|
4025
|
+
className: Ll.labelText,
|
|
4018
4026
|
style: { textTransform: f },
|
|
4019
4027
|
children: t
|
|
4020
4028
|
})]
|
|
@@ -4036,12 +4044,12 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4036
4044
|
} });
|
|
4037
4045
|
},
|
|
4038
4046
|
isDisabled: i,
|
|
4039
|
-
className:
|
|
4047
|
+
className: Ll.radioGroupStandalone,
|
|
4040
4048
|
children: v
|
|
4041
4049
|
});
|
|
4042
|
-
},
|
|
4050
|
+
}, zl = ({ cell: e, testId: t }) => {
|
|
4043
4051
|
var n;
|
|
4044
|
-
return /* @__PURE__ */ S(
|
|
4052
|
+
return /* @__PURE__ */ S(Rl, {
|
|
4045
4053
|
selected: e.selected,
|
|
4046
4054
|
name: e.name,
|
|
4047
4055
|
value: (n = e.value) == null ? "" : n,
|
|
@@ -4050,42 +4058,42 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4050
4058
|
onChange: (t) => e.onChange(t),
|
|
4051
4059
|
testId: t
|
|
4052
4060
|
});
|
|
4053
|
-
},
|
|
4061
|
+
}, Bl = ({ cell: e, isHeader: t, columnAlignment: n, testId: r }) => {
|
|
4054
4062
|
if (!e) return null;
|
|
4055
4063
|
switch (e.type) {
|
|
4056
4064
|
case "Input":
|
|
4057
4065
|
case "NumberInput":
|
|
4058
4066
|
case "DateInput":
|
|
4059
|
-
case "Select": return /* @__PURE__ */ S(
|
|
4067
|
+
case "Select": return /* @__PURE__ */ S(xl, {
|
|
4060
4068
|
cell: e,
|
|
4061
4069
|
columnAlignment: n,
|
|
4062
4070
|
testId: r
|
|
4063
4071
|
});
|
|
4064
|
-
case "Link": return /* @__PURE__ */ S(
|
|
4072
|
+
case "Link": return /* @__PURE__ */ S(Sl, {
|
|
4065
4073
|
cell: e,
|
|
4066
4074
|
testId: r
|
|
4067
4075
|
});
|
|
4068
|
-
case "CheckBox": return /* @__PURE__ */ S(
|
|
4076
|
+
case "CheckBox": return /* @__PURE__ */ S(Cl, {
|
|
4069
4077
|
cell: e,
|
|
4070
4078
|
testId: r
|
|
4071
4079
|
});
|
|
4072
|
-
case "Radio": return /* @__PURE__ */ S(
|
|
4080
|
+
case "Radio": return /* @__PURE__ */ S(zl, {
|
|
4073
4081
|
cell: e,
|
|
4074
4082
|
testId: r
|
|
4075
4083
|
});
|
|
4076
|
-
case "Slider": return /* @__PURE__ */ S(
|
|
4077
|
-
case "Icon": return /* @__PURE__ */ S(
|
|
4078
|
-
case "Actions": return /* @__PURE__ */ S(
|
|
4079
|
-
case "Popover": return /* @__PURE__ */ S(
|
|
4080
|
-
default: return /* @__PURE__ */ S(
|
|
4084
|
+
case "Slider": return /* @__PURE__ */ S(kl, { cell: e });
|
|
4085
|
+
case "Icon": return /* @__PURE__ */ S(Al, { cell: e });
|
|
4086
|
+
case "Actions": return /* @__PURE__ */ S(jl, { cell: e });
|
|
4087
|
+
case "Popover": return /* @__PURE__ */ S(Il, { cell: e });
|
|
4088
|
+
default: return /* @__PURE__ */ S(Fl, {
|
|
4081
4089
|
cell: e,
|
|
4082
4090
|
isHeader: t,
|
|
4083
4091
|
testId: r
|
|
4084
4092
|
});
|
|
4085
4093
|
}
|
|
4086
|
-
},
|
|
4094
|
+
}, Vl = /* @__PURE__ */ function(e) {
|
|
4087
4095
|
return e.INPUT = "Input", e.NUMBER_INPUT = "NumberInput", e.SELECT = "Select", e.POPOVER = "Popover", e.SLIDER = "Slider", e.CHECKBOX = "CheckBox", e.RADIO = "Radio", e.ACTIONS = "Actions", e.AUTO_UNIT = "AutoUnit", e.UNIT = "Unit", e.STATIC = "Static", e;
|
|
4088
|
-
}({}),
|
|
4096
|
+
}({}), Hl = ({ cell: e, isHeader: t, columnHeaderAlignment: n, columnAlignment: r = ji.LEFT, width: i, testId: a }) => {
|
|
4089
4097
|
var o;
|
|
4090
4098
|
if (!e) return null;
|
|
4091
4099
|
let { style: s, colSpan: c, rowSpan: l, width: u, textAlign: d } = e, f = _(null), p = {
|
|
@@ -4093,7 +4101,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4093
4101
|
headerAlignment: n,
|
|
4094
4102
|
textAlign: d,
|
|
4095
4103
|
isHeader: t
|
|
4096
|
-
}, m =
|
|
4104
|
+
}, m = fl(p, X), h = fl(p, X, !0), g = e.type === Vl.INPUT || e.type === Vl.NUMBER_INPUT || e.type === Vl.SELECT || e.type === Vl.POPOVER ? X.inputCell : e.type === Vl.SLIDER ? X.sliderCell : e.type === Vl.CHECKBOX || e.type === Vl.RADIO ? X.checkBoxCell : e.type === Vl.ACTIONS ? X.actionsCell : X.staticCell, v = b(X.cell, g, e.hasSort ? X.sortingCell : null, m, e.breakWord ? X.breakWord : ""), y = (o = u == null ? i : u) == null ? void 0 : o, x = e.type === Vl.STATIC || !e.type, C = {
|
|
4097
4105
|
width: y,
|
|
4098
4106
|
minWidth: y,
|
|
4099
4107
|
textTransform: t && x ? Ni.CAPITALIZE : void 0,
|
|
@@ -4105,40 +4113,40 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4105
4113
|
style: C,
|
|
4106
4114
|
colSpan: c,
|
|
4107
4115
|
rowSpan: l,
|
|
4108
|
-
children: /* @__PURE__ */ S(
|
|
4116
|
+
children: /* @__PURE__ */ S(Bl, {
|
|
4109
4117
|
cell: e,
|
|
4110
4118
|
columnAlignment: h == null ? ji.RIGHT : h,
|
|
4111
4119
|
isHeader: t,
|
|
4112
4120
|
testId: a
|
|
4113
4121
|
})
|
|
4114
4122
|
});
|
|
4115
|
-
},
|
|
4123
|
+
}, Ul = (e) => e.type === Vl.INPUT || e.type === Vl.NUMBER_INPUT, Wl = ({ event: e, rowIndex: t, cellIndex: n }) => ({
|
|
4116
4124
|
...e,
|
|
4117
4125
|
target: Object.assign(e.target, {
|
|
4118
4126
|
rowIndex: t,
|
|
4119
4127
|
cellIndex: n
|
|
4120
4128
|
})
|
|
4121
|
-
}),
|
|
4122
|
-
if (!
|
|
4129
|
+
}), Gl = ({ cell: e, rowIndex: t, cellIndex: n }) => {
|
|
4130
|
+
if (!Ul(e) || typeof e.onChange != "function") return e;
|
|
4123
4131
|
let r = e.onChange;
|
|
4124
4132
|
return {
|
|
4125
4133
|
...e,
|
|
4126
4134
|
onChange: (e) => {
|
|
4127
|
-
r(
|
|
4135
|
+
r(Wl({
|
|
4128
4136
|
event: e,
|
|
4129
4137
|
rowIndex: t,
|
|
4130
4138
|
cellIndex: n
|
|
4131
4139
|
}));
|
|
4132
4140
|
}
|
|
4133
4141
|
};
|
|
4134
|
-
},
|
|
4135
|
-
let h =
|
|
4136
|
-
let i = `${+!n}_${t}_${r}`, a = n ? e :
|
|
4142
|
+
}, Kl = ({ row: e, rowIndex: t, isHeader: n = !1, columnCount: r, colSpan: i, columnHeaderAlignments: a = [], columnAlignment: o = [], hasRowActions: s, draggableTable: c = !1, columnWidths: u, dropDisabled: d = !1, height: f, testId: p, measureRef: m }) => {
|
|
4143
|
+
let h = pl(a, n, t), { onRowClick: g, onRowFocus: _, onRowMouseEnter: v, onRowMouseLeave: y, expandedContent: w, error: T, warning: E, active: D } = e, O = e.cells.map((e, r) => {
|
|
4144
|
+
let i = `${+!n}_${t}_${r}`, a = n ? e : Gl({
|
|
4137
4145
|
cell: e,
|
|
4138
4146
|
rowIndex: t,
|
|
4139
4147
|
cellIndex: r
|
|
4140
4148
|
});
|
|
4141
|
-
return /* @__PURE__ */ S(
|
|
4149
|
+
return /* @__PURE__ */ S(Hl, {
|
|
4142
4150
|
cell: a,
|
|
4143
4151
|
isHeader: n,
|
|
4144
4152
|
columnAlignment: o[r],
|
|
@@ -4146,9 +4154,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4146
4154
|
width: u ? u[r] : void 0,
|
|
4147
4155
|
testId: e.testId
|
|
4148
4156
|
}, i);
|
|
4149
|
-
}), k = s && /* @__PURE__ */ S(
|
|
4157
|
+
}), k = s && /* @__PURE__ */ S(Hl, {
|
|
4150
4158
|
cell: {
|
|
4151
|
-
type:
|
|
4159
|
+
type: Vl.ACTIONS,
|
|
4152
4160
|
actions: e.actions
|
|
4153
4161
|
},
|
|
4154
4162
|
isHeader: n
|
|
@@ -4173,13 +4181,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4173
4181
|
onMouseLeave: y,
|
|
4174
4182
|
onFocus: _,
|
|
4175
4183
|
"data-testid": p,
|
|
4176
|
-
className: b(g ?
|
|
4184
|
+
className: b(g ? ul.clickableRow : null, v ? ul.hoverableRow : null),
|
|
4177
4185
|
children: [
|
|
4178
4186
|
c ? /* @__PURE__ */ S("th", {}) : null,
|
|
4179
4187
|
O,
|
|
4180
4188
|
k
|
|
4181
4189
|
]
|
|
4182
|
-
}, t), w && w.content ? /* @__PURE__ */ S(
|
|
4190
|
+
}, t), w && w.content ? /* @__PURE__ */ S(dl, {
|
|
4183
4191
|
colSpan: i,
|
|
4184
4192
|
flush: w.flush === !0,
|
|
4185
4193
|
children: w.content
|
|
@@ -4189,7 +4197,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4189
4197
|
onMouseEnter: v,
|
|
4190
4198
|
onMouseLeave: y,
|
|
4191
4199
|
onFocus: _,
|
|
4192
|
-
className: b(g && !g.noStyle ?
|
|
4200
|
+
className: b(g && !g.noStyle ? ul.clickableRow : null, v && !v.noStyle ? ul.hoverableRow : null, D ? ul.rowActive : null),
|
|
4193
4201
|
"data-active": D || null,
|
|
4194
4202
|
"data-error": T || null,
|
|
4195
4203
|
"data-warning": E || null,
|
|
@@ -4199,9 +4207,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4199
4207
|
style: R,
|
|
4200
4208
|
children: [
|
|
4201
4209
|
c ? e.noDrag ? /* @__PURE__ */ S("td", { "aria-labelledby": "unique-label-id" }) : /* @__PURE__ */ S("td", {
|
|
4202
|
-
className:
|
|
4210
|
+
className: ul.dragIconCell,
|
|
4203
4211
|
children: /* @__PURE__ */ S("div", {
|
|
4204
|
-
className: b(
|
|
4212
|
+
className: b(ul.dragIcon, d ? ul.dragIconDisabled : ""),
|
|
4205
4213
|
...A,
|
|
4206
4214
|
...j,
|
|
4207
4215
|
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
@@ -4210,12 +4218,12 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4210
4218
|
O,
|
|
4211
4219
|
k
|
|
4212
4220
|
]
|
|
4213
|
-
}, t), w && w.content ? /* @__PURE__ */ S(
|
|
4221
|
+
}, t), w && w.content ? /* @__PURE__ */ S(dl, {
|
|
4214
4222
|
colSpan: i,
|
|
4215
4223
|
flush: w.flush === !0,
|
|
4216
4224
|
children: w.content
|
|
4217
4225
|
}, `${t}_expanded_content`) : null] });
|
|
4218
|
-
},
|
|
4226
|
+
}, ql = (e) => {
|
|
4219
4227
|
let { children: t, colSpan: n, columnAlignment: r, columnCount: i, draggable: a, onListReorder: o = () => {}, canListReorder: s = () => !0, rowActions: c, rows: l = [], tbodyRef: u } = e, [d, f] = v(null), [p, m] = v(!1), g = h(() => l.map((e, t) => t.toString()), [l]);
|
|
4220
4228
|
return a ? /* @__PURE__ */ C(Pr, {
|
|
4221
4229
|
collisionDetection: Ir,
|
|
@@ -4250,7 +4258,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4250
4258
|
dropAnimation: null,
|
|
4251
4259
|
children: /* @__PURE__ */ S("table", {
|
|
4252
4260
|
className: b(Hs.table, Hs.dragOverlay),
|
|
4253
|
-
children: /* @__PURE__ */ S("tbody", { children: /* @__PURE__ */ S(
|
|
4261
|
+
children: /* @__PURE__ */ S("tbody", { children: /* @__PURE__ */ S(Kl, {
|
|
4254
4262
|
rowIndex: Number(d),
|
|
4255
4263
|
row: l[Number(d)],
|
|
4256
4264
|
columnCount: i,
|
|
@@ -4270,17 +4278,17 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4270
4278
|
})
|
|
4271
4279
|
}), document.body)]
|
|
4272
4280
|
}) : t({});
|
|
4273
|
-
},
|
|
4281
|
+
}, Jl = 31, Yl = 2, Xl = ({ table: e, children: t }) => {
|
|
4274
4282
|
var n;
|
|
4275
4283
|
let r = _(null), i = _(/* @__PURE__ */ new Map()), { estimateRowHeight: a, rowCount: o, rows: s } = e, c = (n = o == null ? s == null ? void 0 : s.length : o) == null ? 0 : n, l = !!a, u = (e) => {
|
|
4276
4284
|
var t, n;
|
|
4277
|
-
return (t = (n = i.current.get(e)) == null ? a == null ? void 0 : a(e) : n) == null ?
|
|
4285
|
+
return (t = (n = i.current.get(e)) == null ? a == null ? void 0 : a(e) : n) == null ? Jl : t;
|
|
4278
4286
|
}, d = Lr({
|
|
4279
4287
|
count: c,
|
|
4280
4288
|
getScrollElement: () => r.current,
|
|
4281
|
-
estimateSize: l ? u : () =>
|
|
4289
|
+
estimateSize: l ? u : () => Jl,
|
|
4282
4290
|
...l ? { measureElement: (e) => {
|
|
4283
|
-
let t = e.getAttribute("data-index"), n = t == null ? -1 : Number(t), r = Math.ceil(e.getBoundingClientRect().height), a = n >= 0 ? u(n) :
|
|
4291
|
+
let t = e.getAttribute("data-index"), n = t == null ? -1 : Number(t), r = Math.ceil(e.getBoundingClientRect().height), a = n >= 0 ? u(n) : Jl, o = Math.abs(r - a) <= Yl ? a : r;
|
|
4284
4292
|
return n >= 0 && i.current.set(n, o), o;
|
|
4285
4293
|
} } : {},
|
|
4286
4294
|
overscan: 10
|
|
@@ -4300,7 +4308,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4300
4308
|
})()
|
|
4301
4309
|
})
|
|
4302
4310
|
});
|
|
4303
|
-
},
|
|
4311
|
+
}, Zl = ({ activeIndex: e, triggerScrollToActiveRow: t, isVirtualized: n, virtualizer: r }) => (d(() => {
|
|
4304
4312
|
if (t && !(e == null || e < 0)) {
|
|
4305
4313
|
if (n && r) r.scrollToIndex(e, {
|
|
4306
4314
|
behavior: "auto",
|
|
@@ -4319,11 +4327,11 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4319
4327
|
t,
|
|
4320
4328
|
n,
|
|
4321
4329
|
r
|
|
4322
|
-
]), null),
|
|
4330
|
+
]), null), Ql = ({ table: e, children: t }) => {
|
|
4323
4331
|
let { infiniteScroll: n = !1, triggerScrollToActiveRow: r = !1, rows: i } = e, a = h(() => typeof e.activeRowIndex == "number" ? e.activeRowIndex : Array.isArray(i) && i.length ? i.findIndex((e) => e && e.active) : -1, [i, e.activeRowIndex]);
|
|
4324
|
-
return n ? /* @__PURE__ */ S(
|
|
4332
|
+
return n ? /* @__PURE__ */ S(Xl, {
|
|
4325
4333
|
table: e,
|
|
4326
|
-
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(
|
|
4334
|
+
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(Zl, {
|
|
4327
4335
|
isVirtualized: !0,
|
|
4328
4336
|
virtualizer: e,
|
|
4329
4337
|
activeIndex: a,
|
|
@@ -4335,15 +4343,15 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4335
4343
|
}) : /* @__PURE__ */ C("div", {
|
|
4336
4344
|
id: "scrollWrapper",
|
|
4337
4345
|
className: Hs.scroll,
|
|
4338
|
-
children: [/* @__PURE__ */ S(
|
|
4346
|
+
children: [/* @__PURE__ */ S(Zl, {
|
|
4339
4347
|
isVirtualized: !1,
|
|
4340
4348
|
activeIndex: a,
|
|
4341
4349
|
triggerScrollToActiveRow: r
|
|
4342
4350
|
}), t({})]
|
|
4343
4351
|
});
|
|
4344
|
-
},
|
|
4352
|
+
}, $l = (e) => {
|
|
4345
4353
|
var t, n, r, i, a;
|
|
4346
|
-
let { onListReorder: o = () => {}, canListReorder: s = () => !0, beforeRenderRow: c, table: l } = e, { columnWidths: u, footer: d, name: f, rows: p = [], actions: m, actionsRight: h, columnHeaderAlignments: g, columnAlignment: v, striped: y = !0, testId: x, draggable: w, defaultEmptyRow: T = null, onAddRow: E = null, bordered: D = !0, maxHeight: O, fixedWidth: k } = l, A = _(null), j = sn(e, "table.headers", []), M =
|
|
4354
|
+
let { onListReorder: o = () => {}, canListReorder: s = () => !0, beforeRenderRow: c, table: l } = e, { columnWidths: u, footer: d, name: f, rows: p = [], actions: m, actionsRight: h, columnHeaderAlignments: g, columnAlignment: v, striped: y = !0, testId: x, draggable: w, defaultEmptyRow: T = null, onAddRow: E = null, bordered: D = !0, maxHeight: O, fixedWidth: k } = l, A = _(null), j = sn(e, "table.headers", []), M = sl(p, j), N = ll(p, j), P = M + +!!N, F = !d || (d == null || (t = d.pagination) == null || (t = t.rowsPerPage) == null ? void 0 : t.value) === 0 || Number(d == null || (n = d.pagination) == null ? void 0 : n.selectedPage) >= Number(d == null || (r = d.pagination) == null ? void 0 : r.rowCount) / Number(d == null || (i = d.pagination) == null || (i = i.rowsPerPage) == null ? void 0 : i.value), I = (T == null || (a = T.cells) == null ? void 0 : a.length) && E && F, L = {
|
|
4347
4355
|
cells: I ? T.cells.map((e, t) => (e == null ? void 0 : e.type) === "Input" ? {
|
|
4348
4356
|
...e,
|
|
4349
4357
|
onChange: (e) => {
|
|
@@ -4380,7 +4388,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4380
4388
|
name: f,
|
|
4381
4389
|
testId: x && `${x}-title`
|
|
4382
4390
|
}),
|
|
4383
|
-
/* @__PURE__ */ S(
|
|
4391
|
+
/* @__PURE__ */ S(ql, {
|
|
4384
4392
|
colSpan: P,
|
|
4385
4393
|
columnAlignment: v,
|
|
4386
4394
|
columnCount: M,
|
|
@@ -4390,13 +4398,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4390
4398
|
rows: R,
|
|
4391
4399
|
tbodyRef: A,
|
|
4392
4400
|
canListReorder: s,
|
|
4393
|
-
children: ({ dropDisabled: e }) => /* @__PURE__ */ S(
|
|
4401
|
+
children: ({ dropDisabled: e }) => /* @__PURE__ */ S(Ql, {
|
|
4394
4402
|
table: z,
|
|
4395
4403
|
children: ({ virtualizer: t, tableStyle: n }) => /* @__PURE__ */ C("table", {
|
|
4396
4404
|
className: b(Hs.table, y ? Hs.striped : ""),
|
|
4397
4405
|
"data-testid": x,
|
|
4398
4406
|
style: n,
|
|
4399
|
-
children: [/* @__PURE__ */ S("thead", { children: j.map((e, t) => /* @__PURE__ */ S(
|
|
4407
|
+
children: [/* @__PURE__ */ S("thead", { children: j.map((e, t) => /* @__PURE__ */ S(Kl, {
|
|
4400
4408
|
rowIndex: t,
|
|
4401
4409
|
isHeader: !0,
|
|
4402
4410
|
row: e,
|
|
@@ -4414,7 +4422,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4414
4422
|
row: i,
|
|
4415
4423
|
rowIndex: r
|
|
4416
4424
|
}) : i;
|
|
4417
|
-
return /* @__PURE__ */ S(
|
|
4425
|
+
return /* @__PURE__ */ S(Kl, {
|
|
4418
4426
|
rowIndex: r,
|
|
4419
4427
|
row: a,
|
|
4420
4428
|
columnCount: M,
|
|
@@ -4432,7 +4440,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4432
4440
|
row: t,
|
|
4433
4441
|
rowIndex: n
|
|
4434
4442
|
}) : t;
|
|
4435
|
-
return /* @__PURE__ */ S(
|
|
4443
|
+
return /* @__PURE__ */ S(Kl, {
|
|
4436
4444
|
rowIndex: n,
|
|
4437
4445
|
row: r,
|
|
4438
4446
|
columnCount: M,
|
|
@@ -4448,21 +4456,21 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4448
4456
|
})
|
|
4449
4457
|
})
|
|
4450
4458
|
}),
|
|
4451
|
-
d && /* @__PURE__ */ S(
|
|
4459
|
+
d && /* @__PURE__ */ S(al, {
|
|
4452
4460
|
pagination: d.pagination,
|
|
4453
4461
|
actions: d.actions,
|
|
4454
4462
|
content: d.content
|
|
4455
4463
|
})
|
|
4456
4464
|
]
|
|
4457
4465
|
});
|
|
4458
|
-
},
|
|
4466
|
+
}, eu = "blank", tu = 1e4, nu = (e, t, n, r) => {
|
|
4459
4467
|
let i = `${t} → ${n}:`, a = e.filter((e) => !e.startsWith(i)), o = r ? [...a, `${i} ${r}`] : a;
|
|
4460
4468
|
return {
|
|
4461
4469
|
updatedErrors: o,
|
|
4462
4470
|
isValid: o.length === 0
|
|
4463
4471
|
};
|
|
4464
|
-
},
|
|
4465
|
-
let i = h(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, o] = v(
|
|
4472
|
+
}, ru = 20, iu = 1, au = ({ validationRules: e, parsedResult: t, updateState: n, testId: r }) => {
|
|
4473
|
+
let i = h(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, o] = v(ru), [s, c] = v(iu), u = _([]), f = (s - 1) * a, p = a === 0 ? t.rows.length : f + a, [m, g] = v([]), y = h(() => {
|
|
4466
4474
|
let n = e.filter((e) => !e.optionalColumn);
|
|
4467
4475
|
return t.fields.length === n.length ? n : e;
|
|
4468
4476
|
}, [e, t.fields.length]), b = l((e, r) => (!u.current.length && t.rows.length && (u.current = t.rows[0].map((e) => Vc(e) ? "NumberInput" : "Input")), {
|
|
@@ -4476,7 +4484,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4476
4484
|
disableValidationOnFocus: !0,
|
|
4477
4485
|
error: x,
|
|
4478
4486
|
validationCallback: (e, i) => {
|
|
4479
|
-
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } =
|
|
4487
|
+
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } = nu(t.errors, a, e, i);
|
|
4480
4488
|
n({ parsedResult: {
|
|
4481
4489
|
...t,
|
|
4482
4490
|
errors: o,
|
|
@@ -4485,7 +4493,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4485
4493
|
},
|
|
4486
4494
|
onChange: (e) => {
|
|
4487
4495
|
var i;
|
|
4488
|
-
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } =
|
|
4496
|
+
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } = nu(t.errors, s, m, c), d = t.rows.map((e, t) => t === r ? e.map((e, t) => t === a ? o : e) : e);
|
|
4489
4497
|
n({ parsedResult: {
|
|
4490
4498
|
...t,
|
|
4491
4499
|
rows: d,
|
|
@@ -4527,7 +4535,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4527
4535
|
]);
|
|
4528
4536
|
let x = h(() => t.fields.map((e, r) => {
|
|
4529
4537
|
var a, o, s;
|
|
4530
|
-
let c = y == null ? void 0 : y[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => Sn(e) ===
|
|
4538
|
+
let c = y == null ? void 0 : y[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => Sn(e) === eu);
|
|
4531
4539
|
if (!l.length || u) return {};
|
|
4532
4540
|
let d = t == null || (a = t.units) == null ? void 0 : a[r], f = Sn(d), p = l != null && l.some((e) => Sn(e) === f) ? d : (o = c == null ? void 0 : c.defaultUnit) == null ? "" : o;
|
|
4533
4541
|
return {
|
|
@@ -4575,7 +4583,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4575
4583
|
b,
|
|
4576
4584
|
f
|
|
4577
4585
|
]);
|
|
4578
|
-
return /* @__PURE__ */ S(
|
|
4586
|
+
return /* @__PURE__ */ S($l, {
|
|
4579
4587
|
beforeRenderRow: E,
|
|
4580
4588
|
onListReorder: ({ from: e, to: r }) => {
|
|
4581
4589
|
let i = [...t.rows], [a] = i.splice(e, 1);
|
|
@@ -4638,7 +4646,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4638
4646
|
} }
|
|
4639
4647
|
}
|
|
4640
4648
|
});
|
|
4641
|
-
},
|
|
4649
|
+
}, ou = { listStyle: "_listStyle_yjfjw_1" }, su = ({ errors: e, t }) => {
|
|
4642
4650
|
var n;
|
|
4643
4651
|
let r = (n = [...e]) == null ? void 0 : n.sort((e, t) => {
|
|
4644
4652
|
let n = (e) => {
|
|
@@ -4654,18 +4662,18 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4654
4662
|
content: t("unableToImportPleaseCorrectError", { rows: e == null ? void 0 : e.length }),
|
|
4655
4663
|
type: "Error",
|
|
4656
4664
|
details: /* @__PURE__ */ S("ul", {
|
|
4657
|
-
className:
|
|
4665
|
+
className: ou.listStyle,
|
|
4658
4666
|
children: r.map((e, t) => /* @__PURE__ */ S("li", { children: e }, t))
|
|
4659
4667
|
})
|
|
4660
4668
|
};
|
|
4661
|
-
},
|
|
4669
|
+
}, cu = ({ errors: e, t }) => e.length ? /* @__PURE__ */ S(Vs, { message: su({
|
|
4662
4670
|
errors: e,
|
|
4663
4671
|
t
|
|
4664
|
-
}) }) : null,
|
|
4672
|
+
}) }) : null, lu = {
|
|
4665
4673
|
empty: "_empty_fe425_1",
|
|
4666
4674
|
text: "_text_fe425_11"
|
|
4667
|
-
},
|
|
4668
|
-
className:
|
|
4675
|
+
}, uu = ({ width: e = "auto", height: t = "auto", text: n = "No data", children: r, testId: i }) => /* @__PURE__ */ C("div", {
|
|
4676
|
+
className: lu.empty,
|
|
4669
4677
|
style: {
|
|
4670
4678
|
width: e,
|
|
4671
4679
|
height: t
|
|
@@ -4701,7 +4709,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4701
4709
|
})
|
|
4702
4710
|
}),
|
|
4703
4711
|
n !== "" && /* @__PURE__ */ S("div", {
|
|
4704
|
-
className:
|
|
4712
|
+
className: lu.text,
|
|
4705
4713
|
children: /* @__PURE__ */ S(Go, {
|
|
4706
4714
|
faint: !0,
|
|
4707
4715
|
children: n
|
|
@@ -4709,52 +4717,52 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4709
4717
|
}),
|
|
4710
4718
|
r
|
|
4711
4719
|
]
|
|
4712
|
-
}),
|
|
4720
|
+
}), du = (e) => {
|
|
4713
4721
|
var t;
|
|
4714
4722
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4715
4723
|
let t = e == null ? void 0 : e.match(/[.,]/g);
|
|
4716
4724
|
return t && t.length > 1;
|
|
4717
4725
|
});
|
|
4718
|
-
},
|
|
4726
|
+
}, fu = (e) => {
|
|
4719
4727
|
var t;
|
|
4720
4728
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4721
4729
|
var t;
|
|
4722
4730
|
return !(e != null && e.includes(".")) && (e == null || (t = e.match(/,/g)) == null ? void 0 : t.length) === 1;
|
|
4723
4731
|
});
|
|
4724
|
-
},
|
|
4732
|
+
}, pu = (e, t, n) => e >= t - n, mu = (e) => !!e && e !== "blank" && e.trim() !== "", hu = (e, t, n, r, i, a, o) => {
|
|
4725
4733
|
let s = [], c = r.filter((e) => e.optionalColumn).length, l = r.length, u = c ? `${l - c} or ${l}` : `${l}`, d = i && a ? 2 : i || a ? 1 : 0;
|
|
4726
|
-
if (i && !
|
|
4734
|
+
if (i && !pu(e.length, l, c) && s.push(o("incorrectNumberOfFieldNameHeaderColumns", { expectedLengthMessage: u })), a) {
|
|
4727
4735
|
var f, p;
|
|
4728
4736
|
let e = r.filter((e) => {
|
|
4729
4737
|
var t;
|
|
4730
|
-
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(
|
|
4738
|
+
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(mu));
|
|
4731
4739
|
}).length;
|
|
4732
|
-
|
|
4740
|
+
pu(t == null || (f = t.filter(mu)) == null ? void 0 : f.length, e, r == null || (p = r.filter((e) => (e == null ? void 0 : e.optionalColumn) || !Array.isArray(e == null ? void 0 : e.validUnits) || e.validUnits.includes("blank"))) == null ? void 0 : p.length) || s.push(o("incorrectNumberOfUnitHeaderColumns", { expectedLengthMessage: u }));
|
|
4733
4741
|
}
|
|
4734
4742
|
return n.length === 0 ? s.push(o("incorrectNumberOfDataColumns", {
|
|
4735
4743
|
expectedLengthMessage: u,
|
|
4736
4744
|
dataRowStartIndex: d
|
|
4737
4745
|
})) : n.forEach((e, t) => {
|
|
4738
|
-
|
|
4746
|
+
pu(e.length, l, c) || s.push(o("incorrectNumberOfDataColumns", {
|
|
4739
4747
|
expectedLengthMessage: u,
|
|
4740
4748
|
dataRowStartIndex: d + t
|
|
4741
4749
|
}));
|
|
4742
4750
|
}), s;
|
|
4743
|
-
},
|
|
4751
|
+
}, gu = (e) => e.toUpperCase().replace(/\(.*?\)/g, "").replace(/[^A-Z0-9]/g, "").trim(), _u = ({ value: e, defaultAllowedValues: t }) => {
|
|
4744
4752
|
var n;
|
|
4745
|
-
let r =
|
|
4746
|
-
return (n = t == null ? void 0 : t.some((e) =>
|
|
4747
|
-
},
|
|
4753
|
+
let r = gu(e);
|
|
4754
|
+
return (n = t == null ? void 0 : t.some((e) => gu(e).includes(r) || r.includes(gu(e)))) != null && n;
|
|
4755
|
+
}, vu = ({ value: e, defaultAllowedValues: t }) => {
|
|
4748
4756
|
var n;
|
|
4749
4757
|
return (n = t == null ? void 0 : t.includes(e)) != null && n;
|
|
4750
|
-
},
|
|
4758
|
+
}, yu = (e, t, n, r, i, a) => {
|
|
4751
4759
|
let o = [];
|
|
4752
4760
|
if (r) {
|
|
4753
4761
|
let r = n.map((e) => e.fieldName).filter(Boolean);
|
|
4754
4762
|
e.forEach((i, s) => {
|
|
4755
4763
|
var c, l;
|
|
4756
4764
|
let u = n[s];
|
|
4757
|
-
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ?
|
|
4765
|
+
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ? _u : c)({
|
|
4758
4766
|
value: i,
|
|
4759
4767
|
defaultAllowedValues: r,
|
|
4760
4768
|
columnIndex: s,
|
|
@@ -4776,7 +4784,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4776
4784
|
var l, u;
|
|
4777
4785
|
let d = n[c];
|
|
4778
4786
|
if (!d || d != null && d.optionalColumn) return;
|
|
4779
|
-
let f = (l = d.unitsValidator) == null ?
|
|
4787
|
+
let f = (l = d.unitsValidator) == null ? vu : l, p = (u = i == null ? void 0 : i[c]) == null ? [] : u;
|
|
4780
4788
|
f({
|
|
4781
4789
|
value: r,
|
|
4782
4790
|
defaultAllowedValues: p,
|
|
@@ -4792,7 +4800,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4792
4800
|
});
|
|
4793
4801
|
}
|
|
4794
4802
|
return o;
|
|
4795
|
-
},
|
|
4803
|
+
}, bu = (e, t, n) => {
|
|
4796
4804
|
let r = [];
|
|
4797
4805
|
return e.forEach((e, i) => {
|
|
4798
4806
|
e.forEach((e, a) => {
|
|
@@ -4805,91 +4813,91 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4805
4813
|
})}`);
|
|
4806
4814
|
});
|
|
4807
4815
|
}), r;
|
|
4808
|
-
},
|
|
4809
|
-
let s =
|
|
4810
|
-
return s.length === 0 && (s = s.concat(
|
|
4816
|
+
}, xu = (e, t, n, r, i, a, o) => {
|
|
4817
|
+
let s = hu(e, t, n, r, i, a, o);
|
|
4818
|
+
return s.length === 0 && (s = s.concat(yu(e, t, r, i, a, o), bu(n, r, o))), {
|
|
4811
4819
|
isValid: s.length === 0,
|
|
4812
4820
|
errors: s
|
|
4813
4821
|
};
|
|
4814
|
-
},
|
|
4822
|
+
}, Su = (e, t, n) => {
|
|
4815
4823
|
var r, i, a, o, s, c, l, u, d, f, p, m, h, g;
|
|
4816
4824
|
let _ = (e) => e.replace(/,/g, "."), v = (r = (i = e[0]) == null ? void 0 : i.some((e) => isNaN(Number(_(e))))) != null && r, y = (a = (o = e[1]) == null ? void 0 : o.some((e) => isNaN(Number(_(e))))) != null && a, b = (s = (c = e[0]) == null ? void 0 : c.some((e) => t.includes(e))) != null && s, x = (l = (u = e[0]) == null ? void 0 : u.some((e) => n.includes(e))) != null && l, S = (d = (f = e[1]) == null ? void 0 : f.some((e) => n.includes(e))) != null && d, C = (p = (m = e[0]) == null ? void 0 : m.some((e) => !isNaN(Number(_(e))))) != null && p, w = (h = (g = e[1]) == null ? void 0 : g.some((e) => !isNaN(Number(_(e))))) != null && h;
|
|
4817
4825
|
return {
|
|
4818
4826
|
hasFieldNameHeader: b || v && !x && !C || v && y && !C,
|
|
4819
4827
|
hasUnitHeader: x || S || v && y && !x && !C && !w || v && y && !C && !w
|
|
4820
4828
|
};
|
|
4821
|
-
},
|
|
4829
|
+
}, Cu = (e, { validationRules: t }) => {
|
|
4822
4830
|
var n, r, i;
|
|
4823
4831
|
let a = (t == null ? void 0 : t.length) === ((n = e == null || (r = e[0]) == null ? void 0 : r.length) == null ? 0 : n) ? t : t == null ? void 0 : t.filter((e) => !(e != null && e.optionalColumn)), o = a == null ? void 0 : a.map((e) => e == null ? void 0 : e.fieldName), s = (e) => Array.isArray(e) && e.length ? e[0] : "", c = a == null ? void 0 : a.map((e) => {
|
|
4824
4832
|
var t;
|
|
4825
4833
|
return (t = e == null ? void 0 : e.defaultUnit) == null ? s(e == null ? void 0 : e.validUnits) : t;
|
|
4826
|
-
}), { hasFieldNameHeader: l, hasUnitHeader: u } =
|
|
4834
|
+
}), { hasFieldNameHeader: l, hasUnitHeader: u } = Su(e, o, a == null || (i = a.map((e) => e == null ? void 0 : e.validUnits)) == null || (i = i.filter((e) => !!e)) == null ? void 0 : i.flat());
|
|
4827
4835
|
return l || e == null || e.unshift(o), u || e == null || e.splice(1, 0, c), {
|
|
4828
4836
|
hasFieldNameHeader: l,
|
|
4829
4837
|
hasUnitHeader: u
|
|
4830
4838
|
};
|
|
4831
|
-
},
|
|
4839
|
+
}, wu = (e) => Math.round(e * 100) / 100, Tu = (e) => e.join(", ").replace(/,\s*$/, ""), Eu = {
|
|
4832
4840
|
skipEmptyLines: !0,
|
|
4833
4841
|
delimiter: (e) => {
|
|
4834
4842
|
var t, n;
|
|
4835
4843
|
let r = e.substring(0, 200), i = ((t = r.match(/\t/g)) == null ? [] : t).length, a = ((n = r.match(/;/g)) == null ? [] : n).length;
|
|
4836
4844
|
return i === 0 && a === 0 ? "," : i > a ? " " : ";";
|
|
4837
4845
|
}
|
|
4838
|
-
},
|
|
4846
|
+
}, Du = [
|
|
4839
4847
|
"text/csv",
|
|
4840
4848
|
"text/plain",
|
|
4841
4849
|
"application/json",
|
|
4842
4850
|
"application/vnd.ms-excel"
|
|
4843
|
-
],
|
|
4851
|
+
], Ou = (e) => Du.includes(e.type), ku = (e) => e instanceof File, Au = (e) => e.trim().startsWith("["), ju = (e) => {
|
|
4844
4852
|
try {
|
|
4845
4853
|
var t;
|
|
4846
4854
|
return !!((t = JSON.parse(e)) != null && t.path);
|
|
4847
4855
|
} catch {
|
|
4848
4856
|
return !1;
|
|
4849
4857
|
}
|
|
4850
|
-
},
|
|
4858
|
+
}, Mu = (e) => new Promise((t, n) => {
|
|
4851
4859
|
let r = new FileReader();
|
|
4852
4860
|
r.onload = () => t(String(r.result)), r.onerror = n, r.readAsText(e);
|
|
4853
|
-
}),
|
|
4861
|
+
}), Nu = async (e, t, n) => {
|
|
4854
4862
|
try {
|
|
4855
|
-
return
|
|
4863
|
+
return Hu({
|
|
4856
4864
|
data: JSON.parse(e),
|
|
4857
4865
|
errors: []
|
|
4858
4866
|
}, t, n);
|
|
4859
4867
|
} catch (e) {
|
|
4860
4868
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4861
4869
|
}
|
|
4862
|
-
},
|
|
4870
|
+
}, Pu = async (e, t, n) => {
|
|
4863
4871
|
try {
|
|
4864
4872
|
let r = JSON.parse(e).path.map((e) => [
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4873
|
+
wu(e.md),
|
|
4874
|
+
wu(e.inclination),
|
|
4875
|
+
wu(e.gridAzimuth)
|
|
4868
4876
|
]);
|
|
4869
4877
|
return r.unshift([
|
|
4870
4878
|
"m",
|
|
4871
4879
|
"deg",
|
|
4872
4880
|
"deg"
|
|
4873
|
-
]),
|
|
4881
|
+
]), Hu({
|
|
4874
4882
|
data: r,
|
|
4875
4883
|
errors: []
|
|
4876
4884
|
}, t, n);
|
|
4877
4885
|
} catch (e) {
|
|
4878
4886
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4879
4887
|
}
|
|
4880
|
-
},
|
|
4888
|
+
}, Fu = (e) => e.replace(",", "."), Iu = (e) => e.map((e) => e.map((e) => Fu(e))), Lu = (e, { importLimit: t, ...n }, r) => new Promise((i) => {
|
|
4881
4889
|
Rr.parse(e, {
|
|
4882
|
-
...
|
|
4890
|
+
...Eu,
|
|
4883
4891
|
preview: t,
|
|
4884
4892
|
complete: (e) => {
|
|
4885
|
-
let a =
|
|
4893
|
+
let a = Hu(e, {
|
|
4886
4894
|
importLimit: t,
|
|
4887
4895
|
...n
|
|
4888
4896
|
}, r);
|
|
4889
|
-
a.rows =
|
|
4897
|
+
a.rows = Iu(a.rows), i(a);
|
|
4890
4898
|
}
|
|
4891
4899
|
});
|
|
4892
|
-
}),
|
|
4900
|
+
}), Ru = async (e, t, n) => {
|
|
4893
4901
|
let r = {
|
|
4894
4902
|
isValid: !1,
|
|
4895
4903
|
fields: [],
|
|
@@ -4898,16 +4906,16 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4898
4906
|
errors: []
|
|
4899
4907
|
};
|
|
4900
4908
|
try {
|
|
4901
|
-
if (
|
|
4902
|
-
let i =
|
|
4903
|
-
return
|
|
4909
|
+
if (ku(e) && !Ou(e)) return r.errors.push(`${n("wrongFileFormatExpectedOneOf")} ${Tu(Array.from(Du))}`), r;
|
|
4910
|
+
let i = ku(e) ? await Mu(e) : e;
|
|
4911
|
+
return Au(i) ? await Nu(i, t, n) : ju(i) ? await Pu(i, t, n) : await Lu(e, t, n);
|
|
4904
4912
|
} catch (e) {
|
|
4905
4913
|
return r.errors.push(e.message), r;
|
|
4906
4914
|
}
|
|
4907
|
-
},
|
|
4915
|
+
}, zu = (e) => Array.isArray(e[0]) ? e : [e], Bu = (e) => Math.max(0, ...zu(e).map((e) => e.length)), Vu = (e, t, n, r) => {
|
|
4908
4916
|
var i;
|
|
4909
4917
|
let a = (i = r == null ? void 0 : r.delimiter) == null ? "," : i, o = [
|
|
4910
|
-
...
|
|
4918
|
+
...zu(e),
|
|
4911
4919
|
t,
|
|
4912
4920
|
...n
|
|
4913
4921
|
].filter(Boolean);
|
|
@@ -4916,7 +4924,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4916
4924
|
header: !0,
|
|
4917
4925
|
delimiter: a
|
|
4918
4926
|
});
|
|
4919
|
-
},
|
|
4927
|
+
}, Hu = (e, t, n) => {
|
|
4920
4928
|
let { data: r, errors: i } = e, a = {
|
|
4921
4929
|
isValid: !1,
|
|
4922
4930
|
fields: [],
|
|
@@ -4925,22 +4933,22 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4925
4933
|
errors: i.map((e) => e.message)
|
|
4926
4934
|
};
|
|
4927
4935
|
if (i.length > 0) return a;
|
|
4928
|
-
let { hasFieldNameHeader: o, hasUnitHeader: s } =
|
|
4936
|
+
let { hasFieldNameHeader: o, hasUnitHeader: s } = Cu(r, t);
|
|
4929
4937
|
a.fields = r[0].map((e) => e.trim()), a.units = r[1].map((e) => e.trim()).filter(Boolean), a.rows = r.slice(2);
|
|
4930
4938
|
let { validationRules: c } = t;
|
|
4931
4939
|
if (c.length) {
|
|
4932
|
-
let { isValid: e, errors: t } =
|
|
4940
|
+
let { isValid: e, errors: t } = xu(a.fields, a.units, a.rows, c, o, s, n);
|
|
4933
4941
|
a.errors.push(...t), a.isValid = e && t.length === 0;
|
|
4934
4942
|
} else a.isValid = a.errors.length === 0;
|
|
4935
4943
|
return a;
|
|
4936
|
-
},
|
|
4944
|
+
}, Uu = .001, Wu = 0, Gu = (e, t) => e.every((e) => {
|
|
4937
4945
|
let n = e[t];
|
|
4938
4946
|
return n !== void 0 && n.trim() !== "" && fn(dr(n));
|
|
4939
|
-
}),
|
|
4947
|
+
}), Ku = (e, t = {}) => {
|
|
4940
4948
|
var n, r;
|
|
4941
|
-
let { independentColumnIndex: i =
|
|
4942
|
-
if (e.length <= 2 || !
|
|
4943
|
-
let s = (n = (r = Vr(e, (e) => e.length)) == null ? void 0 : r.length) == null ? 0 : n, c = Ur(a == null ? Hr(s) : a).filter((t) => t !== i &&
|
|
4949
|
+
let { independentColumnIndex: i = Wu, dependentColumnIndexes: a, tolerance: o = Uu } = t;
|
|
4950
|
+
if (e.length <= 2 || !Gu(e, i)) return e.slice();
|
|
4951
|
+
let s = (n = (r = Vr(e, (e) => e.length)) == null ? void 0 : r.length) == null ? 0 : n, c = Ur(a == null ? Hr(s) : a).filter((t) => t !== i && Gu(e, t));
|
|
4944
4952
|
if (c.length === 0) return e.slice();
|
|
4945
4953
|
let l = /* @__PURE__ */ new Set();
|
|
4946
4954
|
for (let t of c) {
|
|
@@ -4954,7 +4962,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4954
4962
|
}
|
|
4955
4963
|
}
|
|
4956
4964
|
return e.filter((e, t) => l.has(t));
|
|
4957
|
-
},
|
|
4965
|
+
}, qu = ({ id: e, message: t = {
|
|
4958
4966
|
type: Fs.INFO,
|
|
4959
4967
|
content: ""
|
|
4960
4968
|
}, autoClose: n = 6e3, onClose: r }) => {
|
|
@@ -4995,13 +5003,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
4995
5003
|
transition: Wr,
|
|
4996
5004
|
type: s
|
|
4997
5005
|
});
|
|
4998
|
-
},
|
|
5006
|
+
}, Ju = (e) => {
|
|
4999
5007
|
Kr.dismiss(e);
|
|
5000
|
-
},
|
|
5008
|
+
}, Yu = (e, t) => {
|
|
5001
5009
|
t(() => {
|
|
5002
|
-
|
|
5010
|
+
qu({ ...e });
|
|
5003
5011
|
});
|
|
5004
|
-
},
|
|
5012
|
+
}, Xu = {
|
|
5005
5013
|
inputInTable: "_inputInTable_h6wco_1",
|
|
5006
5014
|
inputHover: "_inputHover_h6wco_13",
|
|
5007
5015
|
inputFocus: "_inputFocus_h6wco_18",
|
|
@@ -5017,7 +5025,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5017
5025
|
control: "_control_h6wco_25",
|
|
5018
5026
|
labelText: "_labelText_h6wco_137",
|
|
5019
5027
|
noMargin: "_noMargin_h6wco_201"
|
|
5020
|
-
},
|
|
5028
|
+
}, Zu = ({ name: e, label: t, checked: n = !1, disabled: r, display: i, small: a = !1, onChange: o, noMargin: s = !1, testId: c, helpText: l, onClickHelp: d, textTransform: f = Ni.CAPITALIZE }) => {
|
|
5021
5029
|
let p = u(W), m = l || d;
|
|
5022
5030
|
return /* @__PURE__ */ C(Jr, {
|
|
5023
5031
|
name: e,
|
|
@@ -5030,14 +5038,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5030
5038
|
value: t
|
|
5031
5039
|
} });
|
|
5032
5040
|
},
|
|
5033
|
-
className: b(
|
|
5041
|
+
className: b(Xu.toggleContainer, s && Xu.noMargin),
|
|
5034
5042
|
style: { display: i },
|
|
5035
5043
|
"data-testid": c ? `${c}-field` : void 0,
|
|
5036
5044
|
children: [/* @__PURE__ */ C(qr, {
|
|
5037
|
-
className: b(
|
|
5045
|
+
className: b(Xu.toggle, a && Xu.small, !t && Xu.noLabel),
|
|
5038
5046
|
"data-testid": c,
|
|
5039
|
-
children: [/* @__PURE__ */ S("span", { className:
|
|
5040
|
-
className:
|
|
5047
|
+
children: [/* @__PURE__ */ S("span", { className: Xu.control }), t && /* @__PURE__ */ S("span", {
|
|
5048
|
+
className: Xu.labelText,
|
|
5041
5049
|
style: { textTransform: f },
|
|
5042
5050
|
children: t
|
|
5043
5051
|
})]
|
|
@@ -5046,7 +5054,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5046
5054
|
onClick: d
|
|
5047
5055
|
})]
|
|
5048
5056
|
});
|
|
5049
|
-
},
|
|
5057
|
+
}, Qu = ({ config: e, state: t, updateState: n, setModalVisibility: r, onCloseModal: i, readAndParseInput: a, validationRules: o = [], onCompleteImport: s = () => {}, prevalidationConfig: c, t: u, loading: d, startTransition: f, testId: p }) => {
|
|
5050
5058
|
let { modalVisibility: { reviewPasteModal: m, pasteModalHelpVisible: h, helpModal: g } } = t, { warningMessage: y, actionButtonLabel: b, changeRulesAction: w, checkPrevalidationNeed: T } = c == null ? {} : c, E = _(null), [D, O] = v(!1), [k, A] = v({
|
|
5051
5059
|
pastedText: "",
|
|
5052
5060
|
parsedResult: {
|
|
@@ -5067,10 +5075,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5067
5075
|
let { pastedText: j, parsedResult: M } = k, N = l((t) => {
|
|
5068
5076
|
if (t) {
|
|
5069
5077
|
var n, r;
|
|
5070
|
-
let t =
|
|
5078
|
+
let t = Ku(M.rows, e.downsampleConfig), i = {
|
|
5071
5079
|
validationRules: o,
|
|
5072
|
-
importLimit: (n = e.importLimit) == null ?
|
|
5073
|
-
}, a =
|
|
5080
|
+
importLimit: (n = e.importLimit) == null ? tu : n
|
|
5081
|
+
}, a = Vu(M.fields, (r = M.units) == null ? [] : r, t, i);
|
|
5074
5082
|
f(() => A({
|
|
5075
5083
|
parsedResult: {
|
|
5076
5084
|
...M,
|
|
@@ -5103,17 +5111,17 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5103
5111
|
}, F = () => {
|
|
5104
5112
|
r("helpModal", !g);
|
|
5105
5113
|
}, I = () => {
|
|
5106
|
-
n(k), s(k.parsedResult), i(),
|
|
5114
|
+
n(k), s(k.parsedResult), i(), Yu({ message: {
|
|
5107
5115
|
type: "Success",
|
|
5108
5116
|
content: u("pasteSuccessful")
|
|
5109
5117
|
} }, f);
|
|
5110
|
-
}, L = T && T(M), { isValid: R, errors: z } = M, B = z.length, ee = j === "", te =
|
|
5118
|
+
}, L = T && T(M), { isValid: R, errors: z } = M, B = z.length, ee = j === "", te = fu(j), ne = du(j), V = /* @__PURE__ */ C(x, { children: [
|
|
5111
5119
|
/* @__PURE__ */ C("div", {
|
|
5112
5120
|
className: Ns.headerContainer,
|
|
5113
5121
|
children: [
|
|
5114
5122
|
/* @__PURE__ */ S(K, {
|
|
5115
5123
|
text: u("downsampleTooltip"),
|
|
5116
|
-
children: /* @__PURE__ */ S(
|
|
5124
|
+
children: /* @__PURE__ */ S(Zu, {
|
|
5117
5125
|
label: u("downsampled"),
|
|
5118
5126
|
checked: D,
|
|
5119
5127
|
onChange: () => N(!D),
|
|
@@ -5146,7 +5154,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5146
5154
|
}),
|
|
5147
5155
|
ee ? /* @__PURE__ */ S("div", {
|
|
5148
5156
|
className: Ns.resultContainer,
|
|
5149
|
-
children: /* @__PURE__ */ S(
|
|
5157
|
+
children: /* @__PURE__ */ S(uu, {
|
|
5150
5158
|
text: null,
|
|
5151
5159
|
children: /* @__PURE__ */ C("div", {
|
|
5152
5160
|
className: Ns.emptyState,
|
|
@@ -5182,7 +5190,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5182
5190
|
}) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
|
|
5183
5191
|
className: Ns.messagesContainer,
|
|
5184
5192
|
children: [
|
|
5185
|
-
B ? /* @__PURE__ */ S(
|
|
5193
|
+
B ? /* @__PURE__ */ S(cu, {
|
|
5186
5194
|
errors: z,
|
|
5187
5195
|
t: u
|
|
5188
5196
|
}) : null,
|
|
@@ -5205,7 +5213,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5205
5213
|
type: "Warning"
|
|
5206
5214
|
} })
|
|
5207
5215
|
]
|
|
5208
|
-
}), /* @__PURE__ */ S(
|
|
5216
|
+
}), /* @__PURE__ */ S(au, {
|
|
5209
5217
|
validationRules: o,
|
|
5210
5218
|
parsedResult: M,
|
|
5211
5219
|
updateState: (e) => A((t) => ({
|
|
@@ -5248,7 +5256,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5248
5256
|
onClose: i
|
|
5249
5257
|
} })
|
|
5250
5258
|
});
|
|
5251
|
-
},
|
|
5259
|
+
}, $u = ({ modals: e = [], modalVisibility: t, onCloseModal: r, testId: i }) => e.length ? /* @__PURE__ */ S(x, { children: e.map(({ name: e, component: a, props: o = {} }) => {
|
|
5252
5260
|
var s;
|
|
5253
5261
|
return /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S(a, {
|
|
5254
5262
|
testId: `${i}-modal-render-${e}`,
|
|
@@ -5256,7 +5264,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5256
5264
|
onClose: () => r({ name: e }),
|
|
5257
5265
|
...o
|
|
5258
5266
|
}) }, e);
|
|
5259
|
-
}) }) : null,
|
|
5267
|
+
}) }) : null, ed = ({ sections: e, iconName: t, testId: n, tooltip: r }) => /* @__PURE__ */ S(ao, {
|
|
5260
5268
|
loading: !0,
|
|
5261
5269
|
menu: {
|
|
5262
5270
|
component: /* @__PURE__ */ S(q, {
|
|
@@ -5272,18 +5280,18 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5272
5280
|
sections: e
|
|
5273
5281
|
},
|
|
5274
5282
|
testId: n
|
|
5275
|
-
}),
|
|
5283
|
+
}), td = (e, t, n) => l(async () => {
|
|
5276
5284
|
if (n) try {
|
|
5277
5285
|
return await n();
|
|
5278
5286
|
} catch (t) {
|
|
5279
|
-
console.error("beforeExportData failed", t),
|
|
5287
|
+
console.error("beforeExportData failed", t), qu({ message: {
|
|
5280
5288
|
type: "Error",
|
|
5281
5289
|
content: e("unableToPrepareExportData")
|
|
5282
5290
|
} });
|
|
5283
5291
|
return;
|
|
5284
5292
|
}
|
|
5285
5293
|
return t;
|
|
5286
|
-
}, [t, n]),
|
|
5294
|
+
}, [t, n]), nd = {
|
|
5287
5295
|
cancel: "Cancel",
|
|
5288
5296
|
chooseFile: "Choose file",
|
|
5289
5297
|
copyDecimalComma: "Copy (decimal comma)",
|
|
@@ -5342,26 +5350,26 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5342
5350
|
smartUpload_description: "Upload image and extract table content using a LLM",
|
|
5343
5351
|
smartUpload_smartUpload: "Smart Upload",
|
|
5344
5352
|
toUploadOrImportFromClipboardMessage: "To upload or import from clipboard please select your preferred unit in the table header and upload or paste numbers only for Depth, Inc, Azi. Follow example below"
|
|
5345
|
-
},
|
|
5346
|
-
let t = Object.keys(
|
|
5347
|
-
let r =
|
|
5353
|
+
}, rd = (e, t = {}) => e == null ? void 0 : e.replace(/\{\{(\w+)\}\}/g, (e, n) => (t == null ? void 0 : t[n]) === void 0 ? "" : String(t == null ? void 0 : t[n])), id = (e) => h(() => {
|
|
5354
|
+
let t = Object.keys(nd).reduce((t, n) => {
|
|
5355
|
+
let r = nd == null ? void 0 : nd[n], i = e == null ? void 0 : e[n];
|
|
5348
5356
|
return t[n] = i == null ? r : i, t;
|
|
5349
5357
|
}, {});
|
|
5350
5358
|
return (e, n) => {
|
|
5351
5359
|
let r = t[e];
|
|
5352
|
-
return n ?
|
|
5360
|
+
return n ? rd(r, n) : r;
|
|
5353
5361
|
};
|
|
5354
|
-
}, [e]),
|
|
5362
|
+
}, [e]), ad = /^\s*-?\d+(?:[.,]\d+)?(?:e[+-]?\d+)?\s*$/i, od = (e) => {
|
|
5355
5363
|
var t;
|
|
5356
5364
|
return {
|
|
5357
5365
|
...e,
|
|
5358
5366
|
rows: e == null || (t = e.rows) == null ? void 0 : t.map((e) => e.map((e) => {
|
|
5359
5367
|
let t = String(e == null ? "" : e);
|
|
5360
|
-
return
|
|
5368
|
+
return ad.test(t) ? qn(t) : t;
|
|
5361
5369
|
}))
|
|
5362
5370
|
};
|
|
5363
|
-
},
|
|
5364
|
-
let { exportData: a, beforeExportData: o, importLimit: s =
|
|
5371
|
+
}, sd = ({ config: e, state: t, setState: n, smartUploadConfig: r, startTransition: i }) => {
|
|
5372
|
+
let { exportData: a, beforeExportData: o, importLimit: s = tu, validationRules: c = [], translations: u, onImportComplete: d = () => {}, disablePasteSuccessfulToast: f, prevalidationConfig: p, onDeleteRows: m } = e == null ? {} : e, { parsedResult: h } = t, { checkPrevalidationNeed: g } = p == null ? {} : p, _ = id(u), v = td(_, a, o), y = l((e) => {
|
|
5365
5373
|
n((t) => ({
|
|
5366
5374
|
...t,
|
|
5367
5375
|
...e
|
|
@@ -5405,9 +5413,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5405
5413
|
let t = {
|
|
5406
5414
|
validationRules: c,
|
|
5407
5415
|
importLimit: s
|
|
5408
|
-
}, n =
|
|
5416
|
+
}, n = od(await Ru(e, t, _));
|
|
5409
5417
|
if (g && g(h)) {
|
|
5410
|
-
let { fields: e, units: r, rows: a } = n, o =
|
|
5418
|
+
let { fields: e, units: r, rows: a } = n, o = Vu(e, r == null ? [] : r, a, t);
|
|
5411
5419
|
return i(() => y({
|
|
5412
5420
|
pastedText: o,
|
|
5413
5421
|
parsedResult: h
|
|
@@ -5433,20 +5441,20 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5433
5441
|
let { fromFile: t, showSuccessToast: n = !0 } = e == null ? {} : e, r;
|
|
5434
5442
|
try {
|
|
5435
5443
|
if (r = t ? await t.text() : await navigator.clipboard.readText(), !r) {
|
|
5436
|
-
|
|
5444
|
+
Yu({ message: {
|
|
5437
5445
|
type: "Error",
|
|
5438
5446
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed")
|
|
5439
5447
|
} }, i);
|
|
5440
5448
|
return;
|
|
5441
5449
|
}
|
|
5442
|
-
let e =
|
|
5450
|
+
let e = od(await Ru(r, {
|
|
5443
5451
|
validationRules: c,
|
|
5444
5452
|
importLimit: s
|
|
5445
5453
|
}, _));
|
|
5446
|
-
return e != null && e.isValid ||
|
|
5454
|
+
return e != null && e.isValid || Yu({ message: {
|
|
5447
5455
|
type: "Error",
|
|
5448
5456
|
content: _("clipboardReadFailed")
|
|
5449
|
-
} }, i), n &&
|
|
5457
|
+
} }, i), n && Yu({ message: {
|
|
5450
5458
|
type: "Success",
|
|
5451
5459
|
content: _("pasteSuccessful")
|
|
5452
5460
|
} }, i), {
|
|
@@ -5454,7 +5462,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5454
5462
|
parsedResult: e
|
|
5455
5463
|
};
|
|
5456
5464
|
} catch (e) {
|
|
5457
|
-
|
|
5465
|
+
Yu({ message: {
|
|
5458
5466
|
type: "Error",
|
|
5459
5467
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed"),
|
|
5460
5468
|
details: e.message
|
|
@@ -5467,10 +5475,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5467
5475
|
let n = e == null || (t = e.target) == null || (t = t.files) == null ? void 0 : t[0];
|
|
5468
5476
|
if (!n) return;
|
|
5469
5477
|
let r = await n.text(), a = await C(r);
|
|
5470
|
-
a.isValid ? (f ||
|
|
5478
|
+
a.isValid ? (f || Yu({ message: {
|
|
5471
5479
|
type: "Success",
|
|
5472
5480
|
content: _("pasteSuccessful")
|
|
5473
|
-
} }, i), i(() => d(a))) :
|
|
5481
|
+
} }, i), i(() => d(a))) : Yu({ message: {
|
|
5474
5482
|
type: "Error",
|
|
5475
5483
|
content: _("fileParsingFailed")
|
|
5476
5484
|
} }, i);
|
|
@@ -5484,7 +5492,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5484
5492
|
try {
|
|
5485
5493
|
let t = await navigator.clipboard.readText();
|
|
5486
5494
|
if (!t) {
|
|
5487
|
-
|
|
5495
|
+
Yu({ message: {
|
|
5488
5496
|
type: "Error",
|
|
5489
5497
|
content: _("clipboardIsEmpty")
|
|
5490
5498
|
} }, i);
|
|
@@ -5492,18 +5500,18 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5492
5500
|
}
|
|
5493
5501
|
let n = await C(t);
|
|
5494
5502
|
if (!n.isValid) {
|
|
5495
|
-
|
|
5503
|
+
Yu({ message: {
|
|
5496
5504
|
type: "Error",
|
|
5497
5505
|
content: _("clipboardReadFailed")
|
|
5498
5506
|
} }, i);
|
|
5499
5507
|
return;
|
|
5500
5508
|
}
|
|
5501
|
-
f ||
|
|
5509
|
+
f || Yu({ message: {
|
|
5502
5510
|
type: "Success",
|
|
5503
5511
|
content: _("pasteSuccessful")
|
|
5504
5512
|
} }, i), e && i(() => d(n));
|
|
5505
5513
|
} catch {
|
|
5506
|
-
|
|
5514
|
+
Yu({ message: {
|
|
5507
5515
|
type: "Error",
|
|
5508
5516
|
content: _("clipboardReadNotAllowed")
|
|
5509
5517
|
} }, i);
|
|
@@ -5518,14 +5526,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5518
5526
|
onClickCopyClipboard: l(async (e) => {
|
|
5519
5527
|
let t = await v();
|
|
5520
5528
|
if (!t) return;
|
|
5521
|
-
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e :
|
|
5529
|
+
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e : eu).slice(0, Bu(n)), s = (e, t) => t === "comma" ? e.replace(/\./g, ",") : e, c = Vu(n, o, a.map((t) => t.map((t) => Br(t) ? "" : s(t.toString(), e))), { delimiter: " " });
|
|
5522
5530
|
try {
|
|
5523
|
-
await navigator.clipboard.writeText(c),
|
|
5531
|
+
await navigator.clipboard.writeText(c), Yu({ message: {
|
|
5524
5532
|
type: "Success",
|
|
5525
5533
|
content: _("copiedToClipboard")
|
|
5526
5534
|
} }, i);
|
|
5527
5535
|
} catch (e) {
|
|
5528
|
-
|
|
5536
|
+
Yu({ message: {
|
|
5529
5537
|
type: "Error",
|
|
5530
5538
|
content: _("unableToCopyToClipboard"),
|
|
5531
5539
|
details: e.message
|
|
@@ -5535,14 +5543,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5535
5543
|
onSmartUploadResult: l((e) => {
|
|
5536
5544
|
let t = _n(e) && vn(e.errorMessage) ? e.errorMessage : void 0;
|
|
5537
5545
|
if (t) {
|
|
5538
|
-
|
|
5546
|
+
Yu({ message: {
|
|
5539
5547
|
type: "Error",
|
|
5540
5548
|
content: t || "Smart upload failed."
|
|
5541
5549
|
} }, i);
|
|
5542
5550
|
return;
|
|
5543
5551
|
}
|
|
5544
5552
|
if (!cn(e) || e.length < 2 || !on(e, (e) => _n(e) && on(Tn(e), vn))) {
|
|
5545
|
-
|
|
5553
|
+
Yu({ message: {
|
|
5546
5554
|
type: "Error",
|
|
5547
5555
|
content: "Smart upload returned unexpected format.",
|
|
5548
5556
|
details: JSON.stringify(e)
|
|
@@ -5574,14 +5582,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5574
5582
|
]),
|
|
5575
5583
|
deleteAllRows: x
|
|
5576
5584
|
};
|
|
5577
|
-
},
|
|
5585
|
+
}, cd = (e, t) => {
|
|
5578
5586
|
var n, r;
|
|
5579
|
-
let { fields: i, rows: a } = e, o =
|
|
5587
|
+
let { fields: i, rows: a } = e, o = Vu(i, (n = (r = e.units) == null ? void 0 : r.map((e) => e || "blank")) == null ? [] : n, a, { delimiter: " " }), s = new Blob([o], { type: "text/plain" }), c = document.createElement("a");
|
|
5580
5588
|
c.href = window.URL.createObjectURL(s), c.download = `${t}.csv`, document.body.appendChild(c), c.click(), document.body.removeChild(c);
|
|
5581
|
-
},
|
|
5589
|
+
}, ld = (e) => gn(e) && "modalKey" in e, ud = (e, t, n) => rn(e, (e) => {
|
|
5582
5590
|
if (cn(e) || !_n(e)) return;
|
|
5583
5591
|
let { modalKey: r } = e == null ? {} : e;
|
|
5584
|
-
if (
|
|
5592
|
+
if (ld(e) && typeof e.onClick != "function") {
|
|
5585
5593
|
let i = () => {
|
|
5586
5594
|
var e;
|
|
5587
5595
|
n(r, !((e = t.modalVisibility) != null && e[r]));
|
|
@@ -5591,7 +5599,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5591
5599
|
onClick: i
|
|
5592
5600
|
};
|
|
5593
5601
|
}
|
|
5594
|
-
}),
|
|
5602
|
+
}), dd = (e, t, n) => ud(e, t, n), fd = {
|
|
5595
5603
|
pastedText: "",
|
|
5596
5604
|
parsedResult: {
|
|
5597
5605
|
isValid: !1,
|
|
@@ -5606,9 +5614,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5606
5614
|
reviewPasteModal: !1,
|
|
5607
5615
|
helpModal: !1
|
|
5608
5616
|
}
|
|
5609
|
-
},
|
|
5617
|
+
}, pd = ({ config: e, smartUploadConfig: t, testId: n }) => {
|
|
5610
5618
|
var r, i, a, o;
|
|
5611
|
-
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: m = !0, copyFromClipBoard: h = !0, showDeleteOptions: g = !0, showHelpOption: _ = !0, showUploadFileOption: b = !0, modals: x = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = v(
|
|
5619
|
+
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: m = !0, copyFromClipBoard: h = !0, showDeleteOptions: g = !0, showHelpOption: _ = !0, showUploadFileOption: b = !0, modals: x = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = v(fd), { modalVisibility: { smartUploadModal: O = !1, reviewPasteModal: k = !1, helpModal: A = !1 } } = E, { enabled: j, prompt: M = "", onClose: N, onError: P, service: F = () => Promise.resolve() } = t == null ? {} : t, I = id(f), L = td(I, s, c), [R, z] = y(), B = sd({
|
|
5612
5620
|
config: e,
|
|
5613
5621
|
state: E,
|
|
5614
5622
|
setState: D,
|
|
@@ -5641,14 +5649,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5641
5649
|
onClick: () => V("smartUploadModal", !O),
|
|
5642
5650
|
testId: `${n}-smart-upload`
|
|
5643
5651
|
}] : [],
|
|
5644
|
-
...
|
|
5652
|
+
...dd((r = w == null ? void 0 : w.importOptions) == null ? [] : r, E, V)
|
|
5645
5653
|
] : [], le = [
|
|
5646
5654
|
{
|
|
5647
5655
|
type: "Option",
|
|
5648
5656
|
label: I("downloadFile"),
|
|
5649
5657
|
onClick: async () => {
|
|
5650
5658
|
let e = await L();
|
|
5651
|
-
e && e &&
|
|
5659
|
+
e && e && cd(e, d);
|
|
5652
5660
|
}
|
|
5653
5661
|
},
|
|
5654
5662
|
...p ? [{
|
|
@@ -5673,20 +5681,20 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5673
5681
|
}]
|
|
5674
5682
|
}
|
|
5675
5683
|
}],
|
|
5676
|
-
...
|
|
5684
|
+
...dd((i = w == null ? void 0 : w.exportOptions) == null ? [] : i, E, V)
|
|
5677
5685
|
], ue = g ? [{
|
|
5678
5686
|
type: "Option",
|
|
5679
5687
|
label: I("deleteAllRows"),
|
|
5680
5688
|
onClick: () => se(),
|
|
5681
5689
|
testId: `${n}-delete-all-rows`
|
|
5682
|
-
}, ...
|
|
5690
|
+
}, ...dd((a = w == null ? void 0 : w.deleteOptions) == null ? [] : a, E, V)] : [], de = _ ? [
|
|
5683
5691
|
{ type: "Divider" },
|
|
5684
5692
|
{
|
|
5685
5693
|
type: "Option",
|
|
5686
5694
|
label: I("help"),
|
|
5687
5695
|
onClick: () => V("helpModal", !A)
|
|
5688
5696
|
},
|
|
5689
|
-
...
|
|
5697
|
+
...dd((o = w == null ? void 0 : w.helpOptions) == null ? [] : o, E, V)
|
|
5690
5698
|
] : [], fe = [
|
|
5691
5699
|
...ce.length ? [{
|
|
5692
5700
|
section: [...ce, ...de],
|
|
@@ -5712,13 +5720,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5712
5720
|
small: !0,
|
|
5713
5721
|
dark: !0
|
|
5714
5722
|
}),
|
|
5715
|
-
fe.map((e, t) => /* @__PURE__ */ S(
|
|
5723
|
+
fe.map((e, t) => /* @__PURE__ */ S(ed, {
|
|
5716
5724
|
sections: e.section,
|
|
5717
5725
|
iconName: e.iconName,
|
|
5718
5726
|
tooltip: e.tooltip,
|
|
5719
5727
|
testId: `data-${e == null ? void 0 : e.name}-menu`
|
|
5720
5728
|
}, t)),
|
|
5721
|
-
k && /* @__PURE__ */ S(
|
|
5729
|
+
k && /* @__PURE__ */ S(Qu, {
|
|
5722
5730
|
config: e,
|
|
5723
5731
|
state: E,
|
|
5724
5732
|
updateState: te,
|
|
@@ -5754,14 +5762,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5754
5762
|
cancelText: I("cancel"),
|
|
5755
5763
|
testId: n
|
|
5756
5764
|
}),
|
|
5757
|
-
/* @__PURE__ */ S(
|
|
5765
|
+
/* @__PURE__ */ S($u, {
|
|
5758
5766
|
modals: x,
|
|
5759
5767
|
modalVisibility: E == null ? void 0 : E.modalVisibility,
|
|
5760
5768
|
onCloseModal: ne,
|
|
5761
5769
|
testId: n
|
|
5762
5770
|
})
|
|
5763
5771
|
] });
|
|
5764
|
-
},
|
|
5772
|
+
}, md = ({ file: e, accept: t, multi: n, name: r, disabled: i, onChange: a = bn, ...o }) => {
|
|
5765
5773
|
let s = u(W), c = _(null), l = () => {
|
|
5766
5774
|
var e;
|
|
5767
5775
|
i || s || (e = c.current) == null || e.click();
|
|
@@ -5789,12 +5797,12 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5789
5797
|
multiple: n,
|
|
5790
5798
|
onChange: d
|
|
5791
5799
|
})] });
|
|
5792
|
-
},
|
|
5800
|
+
}, hd = {
|
|
5793
5801
|
label: "_label_uxk69_1",
|
|
5794
5802
|
labelLeft: "_labelLeft_uxk69_5",
|
|
5795
5803
|
icons: "_icons_uxk69_13",
|
|
5796
5804
|
small: "_small_uxk69_27"
|
|
5797
|
-
},
|
|
5805
|
+
}, gd = ({ label: e = null, width: t = "auto", helpText: n = "", helpTextMaxWidth: r = "300px", onClickHelp: i = void 0, lock: a = {
|
|
5798
5806
|
visible: !1,
|
|
5799
5807
|
active: !1,
|
|
5800
5808
|
onClick: () => {},
|
|
@@ -5803,14 +5811,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5803
5811
|
}, info: o, libraryIcon: s, labelLeft: c = !1, small: l = !1, textTransform: u = Ni.CAPITALIZE }) => {
|
|
5804
5812
|
var d;
|
|
5805
5813
|
return /* @__PURE__ */ S("div", {
|
|
5806
|
-
className: b(
|
|
5814
|
+
className: b(hd.label, c ? hd.labelLeft : "", l ? hd.small : ""),
|
|
5807
5815
|
children: /* @__PURE__ */ C("label", {
|
|
5808
5816
|
style: {
|
|
5809
5817
|
textTransform: u,
|
|
5810
5818
|
width: t || ""
|
|
5811
5819
|
},
|
|
5812
5820
|
children: [e, /* @__PURE__ */ C("div", {
|
|
5813
|
-
className:
|
|
5821
|
+
className: hd.icons,
|
|
5814
5822
|
children: [
|
|
5815
5823
|
(n || i) && /* @__PURE__ */ S(wa, {
|
|
5816
5824
|
text: n,
|
|
@@ -5836,23 +5844,23 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5836
5844
|
})]
|
|
5837
5845
|
})
|
|
5838
5846
|
});
|
|
5839
|
-
},
|
|
5847
|
+
}, _d = {
|
|
5840
5848
|
field: "_field_1xoss_1",
|
|
5841
5849
|
labelLeft: "_labelLeft_1xoss_5",
|
|
5842
5850
|
fieldInput: "_fieldInput_1xoss_9",
|
|
5843
5851
|
formRow: "_formRow_1xoss_12",
|
|
5844
5852
|
"form-row": "_form-row_1xoss_13",
|
|
5845
5853
|
button: "_button_1xoss_22"
|
|
5846
|
-
},
|
|
5854
|
+
}, vd = ({ label: e, labelLeft: t = !1, labelWidth: n = "auto", children: r, helpText: i, helpTextMaxWidth: a = "300px", onClickHelp: o, lock: s = {
|
|
5847
5855
|
visible: !1,
|
|
5848
5856
|
active: !1,
|
|
5849
5857
|
onClick: () => {},
|
|
5850
5858
|
tooltip: "",
|
|
5851
5859
|
testId: void 0
|
|
5852
5860
|
}, info: c, libraryIcon: l, small: u = !1, testId: d, textTransform: f = Ni.CAPITALIZE }) => /* @__PURE__ */ C("div", {
|
|
5853
|
-
className: b(
|
|
5861
|
+
className: b(_d.field, t ? _d.labelLeft : ""),
|
|
5854
5862
|
"data-testid": d,
|
|
5855
|
-
children: [(e || t) && /* @__PURE__ */ S(
|
|
5863
|
+
children: [(e || t) && /* @__PURE__ */ S(gd, {
|
|
5856
5864
|
label: e,
|
|
5857
5865
|
width: n,
|
|
5858
5866
|
helpText: i,
|
|
@@ -5865,10 +5873,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5865
5873
|
small: u,
|
|
5866
5874
|
textTransform: f
|
|
5867
5875
|
}), /* @__PURE__ */ S("div", {
|
|
5868
|
-
className:
|
|
5876
|
+
className: _d.fieldInput,
|
|
5869
5877
|
children: r
|
|
5870
5878
|
})]
|
|
5871
|
-
}),
|
|
5879
|
+
}), yd = ({ alignItems: e = "initial", justifyContent: t = "initial", direction: n = "initial", height: r = "initial", width: i = "initial", children: a = null, wrap: o = !0, gap: s = !1 }) => /* @__PURE__ */ S("div", {
|
|
5872
5880
|
style: {
|
|
5873
5881
|
display: "flex",
|
|
5874
5882
|
flexDirection: n,
|
|
@@ -5880,8 +5888,8 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5880
5888
|
gap: s === !1 ? 0 : s === !0 ? "var(--padding)" : typeof s == "number" ? `${s}px` : s
|
|
5881
5889
|
},
|
|
5882
5890
|
children: a
|
|
5883
|
-
}),
|
|
5884
|
-
className:
|
|
5891
|
+
}), bd = { formRow: "_formRow_odewu_1" }, xd = ({ children: e }) => /* @__PURE__ */ S("div", {
|
|
5892
|
+
className: bd.formRow,
|
|
5885
5893
|
children: e
|
|
5886
5894
|
}), Z = {
|
|
5887
5895
|
inputInTable: "_inputInTable_15rr3_1",
|
|
@@ -5927,15 +5935,15 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5927
5935
|
hideScrollbar: "_hideScrollbar_15rr3_71",
|
|
5928
5936
|
noPointerEvents: "_noPointerEvents_15rr3_313",
|
|
5929
5937
|
virtualRows: "_virtualRows_15rr3_316"
|
|
5930
|
-
},
|
|
5938
|
+
}, Sd = ({ toggleNarrow: e, onClickToggleNarrow: t }) => e ? /* @__PURE__ */ S("a", {
|
|
5931
5939
|
className: Z.toggleNarrow,
|
|
5932
5940
|
onClick: t,
|
|
5933
5941
|
children: /* @__PURE__ */ S(G, { icon: U.CHEVRON_LEFT })
|
|
5934
|
-
}) : null,
|
|
5942
|
+
}) : null, Cd = o(({ name: e, actions: t = [], toggleNarrow: n = !1, onToggleNarrow: r = () => {}, stickyHeader: i }, a) => /* @__PURE__ */ C("div", {
|
|
5935
5943
|
ref: a,
|
|
5936
5944
|
className: b(Z.header, i ? Z.stickyHeader : ""),
|
|
5937
5945
|
children: [
|
|
5938
|
-
/* @__PURE__ */ S(
|
|
5946
|
+
/* @__PURE__ */ S(Sd, {
|
|
5939
5947
|
toggleNarrow: n,
|
|
5940
5948
|
onClickToggleNarrow: r
|
|
5941
5949
|
}),
|
|
@@ -5955,14 +5963,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5955
5963
|
})
|
|
5956
5964
|
})
|
|
5957
5965
|
]
|
|
5958
|
-
})),
|
|
5966
|
+
})), wd = ({ label: e }) => e ? /* @__PURE__ */ S("span", {
|
|
5959
5967
|
className: Z.label,
|
|
5960
5968
|
children: /* @__PURE__ */ S(Qa, {
|
|
5961
5969
|
color: e.color,
|
|
5962
5970
|
title: e.value,
|
|
5963
5971
|
small: e.small
|
|
5964
5972
|
})
|
|
5965
|
-
}) : null,
|
|
5973
|
+
}) : null, Td = ({ name: e, icon: t, testId: n }) => {
|
|
5966
5974
|
let r = t && /* @__PURE__ */ S(G, {
|
|
5967
5975
|
icon: t.icon,
|
|
5968
5976
|
color: t.color || "#db2828"
|
|
@@ -5982,8 +5990,8 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
5982
5990
|
children: r
|
|
5983
5991
|
})]
|
|
5984
5992
|
});
|
|
5985
|
-
},
|
|
5986
|
-
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ S(
|
|
5993
|
+
}, Ed = ({ item: e }) => {
|
|
5994
|
+
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ S(Td, {
|
|
5987
5995
|
name: t,
|
|
5988
5996
|
icon: n,
|
|
5989
5997
|
testId: o && `${o}-name`
|
|
@@ -6009,10 +6017,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6009
6017
|
})
|
|
6010
6018
|
]
|
|
6011
6019
|
});
|
|
6012
|
-
},
|
|
6020
|
+
}, Dd = ({ item: e }) => e.metaCount === void 0 ? null : /* @__PURE__ */ S(Qa, {
|
|
6013
6021
|
color: "rgba(0,0,0,0.25)",
|
|
6014
6022
|
title: e.metaCount
|
|
6015
|
-
}),
|
|
6023
|
+
}), Od = ({ item: e, expanding: t }) => {
|
|
6016
6024
|
let n = (e) => {
|
|
6017
6025
|
e.preventDefault(), e.stopPropagation();
|
|
6018
6026
|
}, r = !!t && !!e.active && !!e.content;
|
|
@@ -6024,7 +6032,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6024
6032
|
children: e.content
|
|
6025
6033
|
})
|
|
6026
6034
|
});
|
|
6027
|
-
},
|
|
6035
|
+
}, kd = o(({ item: e, index: t }, n) => {
|
|
6028
6036
|
var r;
|
|
6029
6037
|
let i = u(W), { actions: a, disabled: o, expanded: s, onClick: c, title: l, name: d, icon: f, testId: p } = e;
|
|
6030
6038
|
return /* @__PURE__ */ S("div", {
|
|
@@ -6044,13 +6052,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6044
6052
|
className: b(Z.expandIcon, s && Z.expanded),
|
|
6045
6053
|
children: /* @__PURE__ */ S(G, { icon: U.CHEVRON_RIGHT })
|
|
6046
6054
|
}),
|
|
6047
|
-
/* @__PURE__ */ S(
|
|
6055
|
+
/* @__PURE__ */ S(Td, {
|
|
6048
6056
|
name: d,
|
|
6049
6057
|
icon: f
|
|
6050
6058
|
}),
|
|
6051
6059
|
/* @__PURE__ */ C("div", {
|
|
6052
6060
|
className: Z.right,
|
|
6053
|
-
children: [/* @__PURE__ */ S(
|
|
6061
|
+
children: [/* @__PURE__ */ S(Dd, { item: e }), !(o || i) && a && /* @__PURE__ */ S("div", {
|
|
6054
6062
|
className: Z.actions,
|
|
6055
6063
|
children: /* @__PURE__ */ S(so, { actions: (r = e.actions) == null ? [] : r })
|
|
6056
6064
|
})]
|
|
@@ -6058,7 +6066,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6058
6066
|
]
|
|
6059
6067
|
}) })
|
|
6060
6068
|
});
|
|
6061
|
-
}),
|
|
6069
|
+
}), Ad = o(({ item: e, index: t, expanding: n, invokeEditOnRowClick: r, draggable: i }, a) => {
|
|
6062
6070
|
let o = u(W), s = (e, t, s, c, l, u) => {
|
|
6063
6071
|
let d = t.actions && t.actions.find((e) => {
|
|
6064
6072
|
var t;
|
|
@@ -6094,24 +6102,24 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6094
6102
|
className: Z.indentIcon,
|
|
6095
6103
|
children: /* @__PURE__ */ S(G, { icon: U.INDENT })
|
|
6096
6104
|
}) : null,
|
|
6097
|
-
/* @__PURE__ */ S(
|
|
6098
|
-
/* @__PURE__ */ S(
|
|
6105
|
+
/* @__PURE__ */ S(wd, { label: t.label }),
|
|
6106
|
+
/* @__PURE__ */ S(Ed, { item: t }),
|
|
6099
6107
|
/* @__PURE__ */ C("div", {
|
|
6100
6108
|
className: Z.right,
|
|
6101
|
-
children: [/* @__PURE__ */ S(
|
|
6109
|
+
children: [/* @__PURE__ */ S(Dd, { item: t }), !(t.disabled || o) && t.actions && /* @__PURE__ */ S("div", {
|
|
6102
6110
|
className: Z.actions,
|
|
6103
6111
|
children: /* @__PURE__ */ S(so, { actions: t.actions })
|
|
6104
6112
|
})]
|
|
6105
6113
|
})
|
|
6106
6114
|
]
|
|
6107
|
-
}), /* @__PURE__ */ S(
|
|
6115
|
+
}), /* @__PURE__ */ S(Od, {
|
|
6108
6116
|
item: t,
|
|
6109
6117
|
expanding: n
|
|
6110
6118
|
})]
|
|
6111
6119
|
})
|
|
6112
6120
|
}, e);
|
|
6113
6121
|
};
|
|
6114
|
-
return e.type === "Heading" ? /* @__PURE__ */ S(
|
|
6122
|
+
return e.type === "Heading" ? /* @__PURE__ */ S(kd, {
|
|
6115
6123
|
ref: a,
|
|
6116
6124
|
item: e,
|
|
6117
6125
|
index: t
|
|
@@ -6126,7 +6134,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6126
6134
|
};
|
|
6127
6135
|
return s(e, t, l, n, r, i);
|
|
6128
6136
|
})(t, e) : s(t, e);
|
|
6129
|
-
}),
|
|
6137
|
+
}), jd = ({ children: e, draggable: t, list: n, onListReorder: r }) => {
|
|
6130
6138
|
let [i, a] = v(null), o = (e) => {
|
|
6131
6139
|
a(e.active.id);
|
|
6132
6140
|
}, s = (e) => {
|
|
@@ -6149,7 +6157,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6149
6157
|
dropAnimation: null,
|
|
6150
6158
|
children: /* @__PURE__ */ S("div", {
|
|
6151
6159
|
className: Z.dragOverlay,
|
|
6152
|
-
children: /* @__PURE__ */ S(
|
|
6160
|
+
children: /* @__PURE__ */ S(Ad, {
|
|
6153
6161
|
draggable: t,
|
|
6154
6162
|
item: n.items[Number(i)],
|
|
6155
6163
|
index: Number(i)
|
|
@@ -6157,7 +6165,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6157
6165
|
})
|
|
6158
6166
|
}), document.body)]
|
|
6159
6167
|
}) : e;
|
|
6160
|
-
},
|
|
6168
|
+
}, Md = ({ items: e, scrollDetails: t, children: n }) => {
|
|
6161
6169
|
let { scrollable: r, hideScrollbar: i, triggerScrollToActiveItem: a, infiniteScroll: o } = t, s = _(null), c = Lr({
|
|
6162
6170
|
count: e.length,
|
|
6163
6171
|
getScrollElement: () => s.current,
|
|
@@ -6190,9 +6198,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6190
6198
|
children: n({ virtualizer: c })
|
|
6191
6199
|
})
|
|
6192
6200
|
});
|
|
6193
|
-
},
|
|
6201
|
+
}, Nd = ({ items: e, scrollDetails: t, children: n }) => {
|
|
6194
6202
|
let { scrollable: r, hideScrollbar: i, infiniteScroll: a } = t;
|
|
6195
|
-
return a ? /* @__PURE__ */ S(
|
|
6203
|
+
return a ? /* @__PURE__ */ S(Md, {
|
|
6196
6204
|
items: e,
|
|
6197
6205
|
scrollDetails: t,
|
|
6198
6206
|
children: ({ virtualizer: e }) => n({ virtualizer: e })
|
|
@@ -6203,7 +6211,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6203
6211
|
children: n({})
|
|
6204
6212
|
})
|
|
6205
6213
|
});
|
|
6206
|
-
},
|
|
6214
|
+
}, Pd = ({ list: e, bordered: t = !1, expanding: n = !1, narrow: r = !1, toggleNarrow: i = !1, onToggleNarrow: a = () => {}, invokeEditOnRowClick: o = !0, noHeader: s = !1, stickyHeader: c, draggable: l = !1, onListReorder: u = () => {}, marginBottom: d = 0, height: f, testId: p, scrollDetails: m = {
|
|
6207
6215
|
scrollable: !1,
|
|
6208
6216
|
hideScrollbar: !1,
|
|
6209
6217
|
triggerScrollToActiveItem: !1,
|
|
@@ -6216,17 +6224,17 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6216
6224
|
marginBottom: d
|
|
6217
6225
|
},
|
|
6218
6226
|
id: "scrollableDiv",
|
|
6219
|
-
children: [!s && /* @__PURE__ */ S(
|
|
6227
|
+
children: [!s && /* @__PURE__ */ S(Cd, {
|
|
6220
6228
|
name: e.name,
|
|
6221
6229
|
actions: e.actions,
|
|
6222
6230
|
toggleNarrow: i,
|
|
6223
6231
|
onToggleNarrow: a,
|
|
6224
6232
|
stickyHeader: c
|
|
6225
|
-
}), /* @__PURE__ */ S(
|
|
6233
|
+
}), /* @__PURE__ */ S(jd, {
|
|
6226
6234
|
draggable: l,
|
|
6227
6235
|
list: e,
|
|
6228
6236
|
onListReorder: u,
|
|
6229
|
-
children: /* @__PURE__ */ S(
|
|
6237
|
+
children: /* @__PURE__ */ S(Nd, {
|
|
6230
6238
|
items: e.items,
|
|
6231
6239
|
scrollDetails: m,
|
|
6232
6240
|
children: ({ virtualizer: t }) => t ? t.getVirtualItems().map((r) => /* @__PURE__ */ S("div", {
|
|
@@ -6234,14 +6242,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6234
6242
|
className: Z.virtualRow,
|
|
6235
6243
|
style: { transform: `translateY(${r.start}px)` },
|
|
6236
6244
|
ref: t.measureElement,
|
|
6237
|
-
children: /* @__PURE__ */ S(
|
|
6245
|
+
children: /* @__PURE__ */ S(Ad, {
|
|
6238
6246
|
index: r.index,
|
|
6239
6247
|
draggable: l,
|
|
6240
6248
|
item: e.items[r.index],
|
|
6241
6249
|
expanding: n,
|
|
6242
6250
|
invokeEditOnRowClick: o
|
|
6243
6251
|
})
|
|
6244
|
-
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(
|
|
6252
|
+
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(Ad, {
|
|
6245
6253
|
index: t,
|
|
6246
6254
|
draggable: l,
|
|
6247
6255
|
item: e,
|
|
@@ -6250,7 +6258,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6250
6258
|
}) }, t))
|
|
6251
6259
|
})
|
|
6252
6260
|
})]
|
|
6253
|
-
}),
|
|
6261
|
+
}), Fd = {
|
|
6254
6262
|
loader: "_loader_477i5_1",
|
|
6255
6263
|
fullViewPortSize: "_fullViewPortSize_477i5_7",
|
|
6256
6264
|
cover: "_cover_477i5_14",
|
|
@@ -6258,33 +6266,33 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6258
6266
|
content: "_content_477i5_44",
|
|
6259
6267
|
text: "_text_477i5_49",
|
|
6260
6268
|
details: "_details_477i5_53"
|
|
6261
|
-
},
|
|
6269
|
+
}, Id = ({ width: e, height: t, text: n = "", details: r = "", fullViewPortSize: i = !1, cover: a = !1, children: o = null, theme: s = Pi.DARK, testId: c = null }) => {
|
|
6262
6270
|
let l = s === Pi.DARK ? Pi.WHITE : Pi.INHERIT, u = s === "white" ? "var(--color-background-raised)" : s === "light" ? "var(--color-background)" : "black";
|
|
6263
6271
|
return /* @__PURE__ */ S("div", {
|
|
6264
|
-
className: b(
|
|
6272
|
+
className: b(Fd.loader, a ? Fd.cover : "", { [Fd.fullViewPortSize]: i }),
|
|
6265
6273
|
style: {
|
|
6266
6274
|
width: e,
|
|
6267
6275
|
height: t
|
|
6268
6276
|
},
|
|
6269
6277
|
"data-testid": c,
|
|
6270
6278
|
children: /* @__PURE__ */ S("div", {
|
|
6271
|
-
className:
|
|
6279
|
+
className: Fd.dimmer,
|
|
6272
6280
|
style: {
|
|
6273
6281
|
background: u,
|
|
6274
6282
|
color: l
|
|
6275
6283
|
},
|
|
6276
6284
|
children: /* @__PURE__ */ C("div", {
|
|
6277
|
-
className:
|
|
6285
|
+
className: Fd.content,
|
|
6278
6286
|
"data-testid": c && `${c}-content`,
|
|
6279
6287
|
children: [
|
|
6280
6288
|
o,
|
|
6281
6289
|
n && /* @__PURE__ */ S("div", {
|
|
6282
|
-
className:
|
|
6290
|
+
className: Fd.text,
|
|
6283
6291
|
"data-testid": c && `${c}-text`,
|
|
6284
6292
|
children: n
|
|
6285
6293
|
}),
|
|
6286
6294
|
r && /* @__PURE__ */ S("div", {
|
|
6287
|
-
className:
|
|
6295
|
+
className: Fd.details,
|
|
6288
6296
|
"data-testid": c && `${c}-details`,
|
|
6289
6297
|
children: r
|
|
6290
6298
|
})
|
|
@@ -6292,15 +6300,15 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6292
6300
|
})
|
|
6293
6301
|
})
|
|
6294
6302
|
});
|
|
6295
|
-
},
|
|
6303
|
+
}, Ld = {
|
|
6296
6304
|
menu: "_menu_12x4u_1",
|
|
6297
6305
|
header: "_header_12x4u_11",
|
|
6298
6306
|
item: "_item_12x4u_27",
|
|
6299
6307
|
heading: "_heading_12x4u_32"
|
|
6300
|
-
},
|
|
6308
|
+
}, Rd = ({ option: e, onChange: t }) => {
|
|
6301
6309
|
let { key: n, selected: r, label: i, disabled: a, testId: o, helpText: s, onClickHelp: c, textTransform: l } = e;
|
|
6302
6310
|
return /* @__PURE__ */ S("div", {
|
|
6303
|
-
className:
|
|
6311
|
+
className: Ld.item,
|
|
6304
6312
|
children: /* @__PURE__ */ S(Ta, {
|
|
6305
6313
|
label: i,
|
|
6306
6314
|
noMargin: !0,
|
|
@@ -6313,21 +6321,21 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6313
6321
|
textTransform: l
|
|
6314
6322
|
})
|
|
6315
6323
|
}, n);
|
|
6316
|
-
},
|
|
6317
|
-
className:
|
|
6324
|
+
}, zd = ({ label: e }) => /* @__PURE__ */ S("div", {
|
|
6325
|
+
className: Ld.heading,
|
|
6318
6326
|
children: e
|
|
6319
|
-
}),
|
|
6327
|
+
}), Bd = /* @__PURE__ */ function(e) {
|
|
6320
6328
|
return e.HEADING = "Heading", e.DIVIDER = "Divider", e.DEFAULT = "Default", e;
|
|
6321
|
-
}({}),
|
|
6322
|
-
className: b("menu",
|
|
6329
|
+
}({}), Vd = (e) => e.type !== Bd.HEADING && e.type !== Bd.DIVIDER && !e.disabled, Hd = ({ options: e, onChangeOptions: t, showHeader: n, maxHeight: r, testId: i }) => /* @__PURE__ */ C("div", {
|
|
6330
|
+
className: b("menu", Ld.menu),
|
|
6323
6331
|
style: { maxHeight: r },
|
|
6324
6332
|
"data-testid": i ? `${i}-option-dropdown-layer` : void 0,
|
|
6325
6333
|
children: [n && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
|
|
6326
|
-
className:
|
|
6334
|
+
className: Ld.header,
|
|
6327
6335
|
children: [
|
|
6328
6336
|
/* @__PURE__ */ S("a", {
|
|
6329
6337
|
onClick: (n) => {
|
|
6330
|
-
t(n, e.map((e) =>
|
|
6338
|
+
t(n, e.map((e) => Vd(e) ? {
|
|
6331
6339
|
...e,
|
|
6332
6340
|
selected: !0
|
|
6333
6341
|
} : e));
|
|
@@ -6336,7 +6344,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6336
6344
|
}),
|
|
6337
6345
|
/* @__PURE__ */ S("a", {
|
|
6338
6346
|
onClick: (n) => {
|
|
6339
|
-
t(n, e.map((e) =>
|
|
6347
|
+
t(n, e.map((e) => Vd(e) ? {
|
|
6340
6348
|
...e,
|
|
6341
6349
|
selected: !1
|
|
6342
6350
|
} : e));
|
|
@@ -6345,7 +6353,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6345
6353
|
}),
|
|
6346
6354
|
/* @__PURE__ */ S("a", {
|
|
6347
6355
|
onClick: (n) => {
|
|
6348
|
-
t(n, e.map((e) =>
|
|
6356
|
+
t(n, e.map((e) => Vd(e) ? {
|
|
6349
6357
|
...e,
|
|
6350
6358
|
selected: !e.selected
|
|
6351
6359
|
} : e));
|
|
@@ -6355,19 +6363,19 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6355
6363
|
]
|
|
6356
6364
|
}), /* @__PURE__ */ S(qo, { margin: 0 })] }), e.map((n, r) => {
|
|
6357
6365
|
switch (n.type) {
|
|
6358
|
-
case
|
|
6366
|
+
case Bd.HEADING:
|
|
6359
6367
|
var i;
|
|
6360
|
-
return /* @__PURE__ */ S(
|
|
6361
|
-
case
|
|
6368
|
+
return /* @__PURE__ */ S(zd, { label: n.label }, (i = n.key) == null ? r : i);
|
|
6369
|
+
case Bd.DIVIDER:
|
|
6362
6370
|
var a;
|
|
6363
6371
|
return /* @__PURE__ */ S(qo, { margin: 0 }, (a = n.key) == null ? r : a);
|
|
6364
6372
|
default:
|
|
6365
6373
|
var o;
|
|
6366
|
-
return /* @__PURE__ */ S(
|
|
6374
|
+
return /* @__PURE__ */ S(Rd, {
|
|
6367
6375
|
option: n,
|
|
6368
6376
|
onChange: (r) => {
|
|
6369
6377
|
let { value: i } = n;
|
|
6370
|
-
t(r, e.map((e) => e.type ===
|
|
6378
|
+
t(r, e.map((e) => e.type === Bd.HEADING || e.type === Bd.DIVIDER || e.value !== i ? e : {
|
|
6371
6379
|
...e,
|
|
6372
6380
|
selected: !e.selected
|
|
6373
6381
|
}));
|
|
@@ -6375,7 +6383,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6375
6383
|
}, (o = n.key) == null ? r : o);
|
|
6376
6384
|
}
|
|
6377
6385
|
})]
|
|
6378
|
-
}),
|
|
6386
|
+
}), Ud = ({ name: e, disabled: t, label: n, options: r, onChange: i, small: a = !1, showHeader: o = !0, maxHeight: s = "40vh", testId: c }) => /* @__PURE__ */ S(ao, {
|
|
6379
6387
|
testId: c,
|
|
6380
6388
|
disabled: t,
|
|
6381
6389
|
menu: {
|
|
@@ -6383,7 +6391,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6383
6391
|
small: a,
|
|
6384
6392
|
label: n,
|
|
6385
6393
|
trigger: ki.DROP_DOWN_BUTTON,
|
|
6386
|
-
sections: /* @__PURE__ */ S(
|
|
6394
|
+
sections: /* @__PURE__ */ S(Hd, {
|
|
6387
6395
|
testId: c,
|
|
6388
6396
|
options: r,
|
|
6389
6397
|
onChangeOptions: (t, n) => {
|
|
@@ -6393,13 +6401,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6393
6401
|
maxHeight: s
|
|
6394
6402
|
})
|
|
6395
6403
|
}
|
|
6396
|
-
}),
|
|
6404
|
+
}), Wd = {
|
|
6397
6405
|
page: "_page_beskc_1",
|
|
6398
6406
|
scroll: "_scroll_beskc_23"
|
|
6399
|
-
},
|
|
6407
|
+
}, Gd = ({ children: e, left: t = "var(--size-sidebar)", padding: n = !0, scroll: r = !0, top: i = "var(--size-topbar)" }) => {
|
|
6400
6408
|
let a = typeof n == "string" ? n : n === !0 ? "var(--padding)" : "0";
|
|
6401
6409
|
return /* @__PURE__ */ S("div", {
|
|
6402
|
-
className: b(
|
|
6410
|
+
className: b(Wd.page, r ? Wd.scroll : ""),
|
|
6403
6411
|
style: {
|
|
6404
6412
|
left: t,
|
|
6405
6413
|
padding: a,
|
|
@@ -6407,19 +6415,19 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6407
6415
|
},
|
|
6408
6416
|
children: e
|
|
6409
6417
|
});
|
|
6410
|
-
},
|
|
6418
|
+
}, Kd = ({ id: e, children: t }) => {
|
|
6411
6419
|
let n = document.querySelector(`#${e}`), [r, i] = v(!1);
|
|
6412
6420
|
return m(() => {
|
|
6413
6421
|
r || i(!0);
|
|
6414
6422
|
}, [e]), n ? Nr(t, n) : null;
|
|
6415
|
-
},
|
|
6423
|
+
}, qd = { printHeader: "_printHeader_o7xxx_1" }, Jd = ({ logo: e, alt: t, logoWidth: n = "100px" }) => /* @__PURE__ */ S("img", {
|
|
6416
6424
|
src: e,
|
|
6417
6425
|
alt: t,
|
|
6418
|
-
className:
|
|
6426
|
+
className: qd.printHeader,
|
|
6419
6427
|
style: { width: n }
|
|
6420
|
-
}),
|
|
6428
|
+
}), Yd = ({ name: e, label: t, options: n, value: r, onChange: i, disabled: a = !1, small: o = !1, noMargin: s = !1, inline: c = !1, testId: l }) => {
|
|
6421
6429
|
var d;
|
|
6422
|
-
let f = u(W), { simpleInputs: p, options: m, selectedOptions: h } =
|
|
6430
|
+
let f = u(W), { simpleInputs: p, options: m, selectedOptions: h } = Xc(n, r), g = h == null ? void 0 : p ? h : h.value, _ = a || f;
|
|
6423
6431
|
return /* @__PURE__ */ C(jr, {
|
|
6424
6432
|
name: e,
|
|
6425
6433
|
"aria-label": t ? void 0 : String(e == null ? "Radio group" : e),
|
|
@@ -6437,15 +6445,15 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6437
6445
|
} });
|
|
6438
6446
|
},
|
|
6439
6447
|
isDisabled: _,
|
|
6440
|
-
className:
|
|
6448
|
+
className: Ll.wrapper,
|
|
6441
6449
|
"data-testid": l,
|
|
6442
6450
|
children: [t && /* @__PURE__ */ S(Or, {
|
|
6443
|
-
className:
|
|
6451
|
+
className: Ll.groupLabel,
|
|
6444
6452
|
children: t
|
|
6445
6453
|
}), m.map((e) => {
|
|
6446
6454
|
var t, n;
|
|
6447
6455
|
let r = a || e.disabled || f;
|
|
6448
|
-
return /* @__PURE__ */ S(
|
|
6456
|
+
return /* @__PURE__ */ S(Rl, {
|
|
6449
6457
|
value: e.value,
|
|
6450
6458
|
label: e.label,
|
|
6451
6459
|
disabled: r,
|
|
@@ -6458,9 +6466,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6458
6466
|
}, (t = (n = e.value) == null ? void 0 : n.toString()) == null ? "" : t);
|
|
6459
6467
|
})]
|
|
6460
6468
|
});
|
|
6461
|
-
},
|
|
6469
|
+
}, Xd = ({ children: e }) => pi() === null ? /* @__PURE__ */ S(ni, { children: e }) : /* @__PURE__ */ S(x, { children: e }), Zd = "bottom-start", Qd = (e, t) => {
|
|
6462
6470
|
t((t) => t && t.width === e.width && t.height === e.height && t.x === e.x && t.y === e.y ? t : e);
|
|
6463
|
-
},
|
|
6471
|
+
}, $d = (e = Zd) => e === "center" ? "bottom" : e.replace("-center", ""), ef = ({ arrowOffset: e, arrowRef: t, containerOffset: n, fallbackPlacements: r, matchReferenceWidth: i, triggerOffset: a }) => [
|
|
6464
6472
|
oi(a),
|
|
6465
6473
|
ai({
|
|
6466
6474
|
fallbackPlacements: r,
|
|
@@ -6477,9 +6485,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6477
6485
|
element: t,
|
|
6478
6486
|
padding: e
|
|
6479
6487
|
})
|
|
6480
|
-
],
|
|
6488
|
+
], tf = ({ isOpen: e, arrowOffset: t = 0, clientPoint: n, containerOffset: r = 10, hover: i, matchReferenceWidth: a = !1, placement: o = Zd, possiblePlacements: s, triggerOffset: c = 0, updateOnAnimationFrame: u = !1, overflowContainer: d = !0, onOpenChange: f, onOutsideClick: p }) => {
|
|
6481
6489
|
var m, g, y, b, x, C, w;
|
|
6482
|
-
let T = _(null), [E, D] = v(null), O = fi(), k =
|
|
6490
|
+
let T = _(null), [E, D] = v(null), O = fi(), k = $d(o), A = h(() => s == null ? void 0 : s.map($d), [s]), j = h(() => ef({
|
|
6483
6491
|
arrowOffset: t,
|
|
6484
6492
|
arrowRef: T,
|
|
6485
6493
|
containerOffset: r,
|
|
@@ -6492,8 +6500,8 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6492
6500
|
A,
|
|
6493
6501
|
a,
|
|
6494
6502
|
c
|
|
6495
|
-
]), M = l((e, t, n) => (
|
|
6496
|
-
|
|
6503
|
+
]), M = l((e, t, n) => (Qd(e.getBoundingClientRect(), D), ii(e, t, () => {
|
|
6504
|
+
Qd(e.getBoundingClientRect(), D), n();
|
|
6497
6505
|
}, { animationFrame: u })), [u]), { context: N, refs: P, floatingStyles: F, isPositioned: I, x: L, y: R } = di({
|
|
6498
6506
|
open: e,
|
|
6499
6507
|
onOpenChange: (e, t, n) => {
|
|
@@ -6507,7 +6515,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6507
6515
|
middleware: j
|
|
6508
6516
|
}), z = l((e) => {
|
|
6509
6517
|
if (P.setReference(e), e) {
|
|
6510
|
-
|
|
6518
|
+
Qd(e.getBoundingClientRect(), D);
|
|
6511
6519
|
return;
|
|
6512
6520
|
}
|
|
6513
6521
|
D(null);
|
|
@@ -6573,40 +6581,40 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6573
6581
|
triggerBounds: E,
|
|
6574
6582
|
triggerProps: ie
|
|
6575
6583
|
};
|
|
6576
|
-
},
|
|
6584
|
+
}, nf = {
|
|
6577
6585
|
richTextToolbar: "_richTextToolbar_1gbkk_1",
|
|
6578
6586
|
richTextToolbarContainer: "_richTextToolbarContainer_1gbkk_5"
|
|
6579
|
-
},
|
|
6587
|
+
}, rf = /* @__PURE__ */ function(e) {
|
|
6580
6588
|
return e.BOLD = "bold", e.ITALIC = "italic", e.CODE = "code", e.UL = "ul", e.OL = "ol", e.MENTION = "at", e;
|
|
6581
|
-
}({}),
|
|
6589
|
+
}({}), af = ({ editor: e, disabled: t = !1, showMentionButton: n = !1, toolbarComponent: r = null, testId: i }) => {
|
|
6582
6590
|
var a, o, s, c, l;
|
|
6583
6591
|
let u = [
|
|
6584
6592
|
{
|
|
6585
|
-
icon:
|
|
6593
|
+
icon: rf.BOLD,
|
|
6586
6594
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBold().run(),
|
|
6587
6595
|
active: (a = e == null ? void 0 : e.isActive("bold")) != null && a,
|
|
6588
6596
|
testId: "bold"
|
|
6589
6597
|
},
|
|
6590
6598
|
{
|
|
6591
|
-
icon:
|
|
6599
|
+
icon: rf.ITALIC,
|
|
6592
6600
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleItalic().run(),
|
|
6593
6601
|
active: (o = e == null ? void 0 : e.isActive("italic")) != null && o,
|
|
6594
6602
|
testId: "italic"
|
|
6595
6603
|
},
|
|
6596
6604
|
{
|
|
6597
|
-
icon:
|
|
6605
|
+
icon: rf.CODE,
|
|
6598
6606
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleCode().run(),
|
|
6599
6607
|
active: (s = e == null ? void 0 : e.isActive("code")) != null && s,
|
|
6600
6608
|
testId: "code"
|
|
6601
6609
|
},
|
|
6602
6610
|
{
|
|
6603
|
-
icon:
|
|
6611
|
+
icon: rf.UL,
|
|
6604
6612
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBulletList().run(),
|
|
6605
6613
|
active: (c = e == null ? void 0 : e.isActive("bulletList")) != null && c,
|
|
6606
6614
|
testId: "bulletList"
|
|
6607
6615
|
},
|
|
6608
6616
|
{
|
|
6609
|
-
icon:
|
|
6617
|
+
icon: rf.OL,
|
|
6610
6618
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleOrderedList().run(),
|
|
6611
6619
|
active: (l = e == null ? void 0 : e.isActive("orderedList")) != null && l,
|
|
6612
6620
|
testId: "orderedList"
|
|
@@ -6615,17 +6623,17 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6615
6623
|
if (n) {
|
|
6616
6624
|
var d;
|
|
6617
6625
|
u.push({
|
|
6618
|
-
icon:
|
|
6626
|
+
icon: rf.MENTION,
|
|
6619
6627
|
onClick: () => e == null ? void 0 : e.chain().focus().insertContent("@").run(),
|
|
6620
6628
|
active: (d = e == null ? void 0 : e.isActive("mention")) != null && d,
|
|
6621
6629
|
testId: "mention"
|
|
6622
6630
|
});
|
|
6623
6631
|
}
|
|
6624
6632
|
return /* @__PURE__ */ C("div", {
|
|
6625
|
-
className:
|
|
6633
|
+
className: nf.richTextToolbarContainer,
|
|
6626
6634
|
"data-testid": i,
|
|
6627
6635
|
children: [/* @__PURE__ */ S("div", {
|
|
6628
|
-
className:
|
|
6636
|
+
className: nf.richTextToolbar,
|
|
6629
6637
|
children: u.map((e, n) => /* @__PURE__ */ S(q, {
|
|
6630
6638
|
small: !0,
|
|
6631
6639
|
round: !0,
|
|
@@ -6639,36 +6647,36 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6639
6647
|
}, n))
|
|
6640
6648
|
}), r]
|
|
6641
6649
|
});
|
|
6642
|
-
},
|
|
6643
|
-
let t =
|
|
6650
|
+
}, of = 8, sf = /^\[@((?:\\.|[^\\\]])*)\]\(mention:((?:\\.|[^\\)])+)\)/, cf = (e) => e.replace(/[\\\][()]/g, "\\$&"), lf = (e) => e.replace(/\\(.)/g, "$1"), uf = (e) => typeof e == "string" ? e : "", df = (e) => {
|
|
6651
|
+
let t = sf.exec(e);
|
|
6644
6652
|
if (!t) return;
|
|
6645
6653
|
let [n, r, i] = t;
|
|
6646
6654
|
return {
|
|
6647
6655
|
raw: n,
|
|
6648
|
-
id:
|
|
6649
|
-
label:
|
|
6656
|
+
id: lf(i),
|
|
6657
|
+
label: lf(r)
|
|
6650
6658
|
};
|
|
6651
|
-
},
|
|
6659
|
+
}, ff = (e) => {
|
|
6652
6660
|
if (!e) return [];
|
|
6653
6661
|
let t = /* @__PURE__ */ new Set();
|
|
6654
6662
|
return e.state.doc.descendants((e) => {
|
|
6655
6663
|
e.type.name === gi.name && typeof e.attrs.id == "string" && t.add(e.attrs.id);
|
|
6656
6664
|
}), [...t];
|
|
6657
|
-
},
|
|
6665
|
+
}, pf = (e, t) => `[@${cf(e)}](mention:${cf(t)})`, mf = (e, t) => gi.extend({
|
|
6658
6666
|
renderMarkdown: (e) => {
|
|
6659
6667
|
var t, n;
|
|
6660
|
-
return
|
|
6668
|
+
return pf(uf((t = e.attrs) == null ? void 0 : t.label), uf((n = e.attrs) == null ? void 0 : n.id));
|
|
6661
6669
|
},
|
|
6662
6670
|
parseMarkdown: (e, t) => t.createNode(gi.name, {
|
|
6663
|
-
id:
|
|
6664
|
-
label:
|
|
6671
|
+
id: uf(e.id),
|
|
6672
|
+
label: uf(e.label)
|
|
6665
6673
|
}),
|
|
6666
6674
|
markdownTokenizer: {
|
|
6667
6675
|
name: gi.name,
|
|
6668
6676
|
level: "inline",
|
|
6669
6677
|
start: (e) => e.indexOf("[@"),
|
|
6670
6678
|
tokenize: (e) => {
|
|
6671
|
-
let t =
|
|
6679
|
+
let t = df(e);
|
|
6672
6680
|
return t && {
|
|
6673
6681
|
type: gi.name,
|
|
6674
6682
|
...t
|
|
@@ -6684,11 +6692,11 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6684
6692
|
var r;
|
|
6685
6693
|
let i = e();
|
|
6686
6694
|
if (!i) return [];
|
|
6687
|
-
let a = new Set(
|
|
6688
|
-
return (await i.getItems(t)).filter(({ id: e }) => !a.has(e)).slice(0, (r = i.maxItems) == null ?
|
|
6695
|
+
let a = new Set(ff(n));
|
|
6696
|
+
return (await i.getItems(t)).filter(({ id: e }) => !a.has(e)).slice(0, (r = i.maxItems) == null ? of : r);
|
|
6689
6697
|
},
|
|
6690
6698
|
render: t
|
|
6691
|
-
} }),
|
|
6699
|
+
} }), hf = {
|
|
6692
6700
|
inputInTable: "_inputInTable_1xhvx_1",
|
|
6693
6701
|
inputHover: "_inputHover_1xhvx_13",
|
|
6694
6702
|
inputFocus: "_inputFocus_1xhvx_18",
|
|
@@ -6703,8 +6711,8 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6703
6711
|
mentionLayer: "_mentionLayer_1xhvx_133",
|
|
6704
6712
|
mentionOption: "_mentionOption_1xhvx_144",
|
|
6705
6713
|
focused: "_focused_1xhvx_150"
|
|
6706
|
-
},
|
|
6707
|
-
let [o, s] = v(0), c = n.length > 0, u = f(), m = l((e) => `${u}-option-${e}`, [u]), { renderLayer: g, layerProps: y, triggerProps: x } =
|
|
6714
|
+
}, gf = o(({ editable: e, getRect: t, items: n, onDismiss: r, onSelect: i }, a) => {
|
|
6715
|
+
let [o, s] = v(0), c = n.length > 0, u = f(), m = l((e) => `${u}-option-${e}`, [u]), { renderLayer: g, layerProps: y, triggerProps: x } = tf({
|
|
6708
6716
|
isOpen: c,
|
|
6709
6717
|
placement: "bottom-start",
|
|
6710
6718
|
triggerOffset: 2,
|
|
@@ -6765,14 +6773,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6765
6773
|
i
|
|
6766
6774
|
]), c ? g(/* @__PURE__ */ S("div", {
|
|
6767
6775
|
...y,
|
|
6768
|
-
className:
|
|
6776
|
+
className: hf.mentionLayer,
|
|
6769
6777
|
id: u,
|
|
6770
6778
|
role: "listbox",
|
|
6771
6779
|
children: n.map((e, t) => /* @__PURE__ */ S("div", {
|
|
6772
6780
|
id: m(t),
|
|
6773
6781
|
role: "option",
|
|
6774
6782
|
"aria-selected": t === o,
|
|
6775
|
-
className: b(
|
|
6783
|
+
className: b(hf.mentionOption, { [hf.focused]: t === o }),
|
|
6776
6784
|
onMouseEnter: () => s(t),
|
|
6777
6785
|
onMouseDown: (t) => {
|
|
6778
6786
|
t.preventDefault(), i(e);
|
|
@@ -6780,12 +6788,12 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6780
6788
|
children: e.label
|
|
6781
6789
|
}, e.id))
|
|
6782
6790
|
})) : null;
|
|
6783
|
-
}),
|
|
6791
|
+
}), _f = ({ clientRect: e, command: t, editor: n, items: r }) => ({
|
|
6784
6792
|
clientRect: e,
|
|
6785
6793
|
command: t,
|
|
6786
6794
|
items: r,
|
|
6787
6795
|
editable: n.view.dom
|
|
6788
|
-
}),
|
|
6796
|
+
}), vf = c(o(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i, mentions: a, testId: o }, s) => {
|
|
6789
6797
|
var c, l, f, m;
|
|
6790
6798
|
let g = u(W), y = r || g, b = !!a, x = _(a), w = _(null), T = _(n == null ? "" : n), [E, D] = v(null);
|
|
6791
6799
|
d(() => {
|
|
@@ -6795,9 +6803,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6795
6803
|
Zr,
|
|
6796
6804
|
Qr.configure({ placeholder: e }),
|
|
6797
6805
|
$r,
|
|
6798
|
-
|
|
6799
|
-
onStart: (e) => D(
|
|
6800
|
-
onUpdate: (e) => D(
|
|
6806
|
+
mf(() => x.current, () => ({
|
|
6807
|
+
onStart: (e) => D(_f(e)),
|
|
6808
|
+
onUpdate: (e) => D(_f(e)),
|
|
6801
6809
|
onExit: () => D(null),
|
|
6802
6810
|
onKeyDown: ({ event: e }) => {
|
|
6803
6811
|
var t, n;
|
|
@@ -6809,9 +6817,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6809
6817
|
content: T.current,
|
|
6810
6818
|
contentType: "markdown",
|
|
6811
6819
|
editable: !y,
|
|
6812
|
-
editorProps: { attributes: { class:
|
|
6820
|
+
editorProps: { attributes: { class: hf.editable } },
|
|
6813
6821
|
onUpdate: ({ editor: e }) => {
|
|
6814
|
-
t == null || t(e.getMarkdown(), { mentionedIds:
|
|
6822
|
+
t == null || t(e.getMarkdown(), { mentionedIds: ff(e) });
|
|
6815
6823
|
}
|
|
6816
6824
|
});
|
|
6817
6825
|
return d(() => {
|
|
@@ -6824,12 +6832,12 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6824
6832
|
}, [y, k]), p(s, () => ({
|
|
6825
6833
|
clearContent: () => k == null ? void 0 : k.commands.clearContent(!1),
|
|
6826
6834
|
editor: k,
|
|
6827
|
-
getMentionedIds: () =>
|
|
6835
|
+
getMentionedIds: () => ff(k)
|
|
6828
6836
|
}), [k]), /* @__PURE__ */ C("div", {
|
|
6829
|
-
className:
|
|
6837
|
+
className: hf.richTextInput,
|
|
6830
6838
|
"data-testid": o,
|
|
6831
6839
|
children: [
|
|
6832
|
-
/* @__PURE__ */ S(
|
|
6840
|
+
/* @__PURE__ */ S(af, {
|
|
6833
6841
|
editor: k,
|
|
6834
6842
|
disabled: y,
|
|
6835
6843
|
showMentionButton: b && ((c = a == null ? void 0 : a.showMentionButton) == null || c),
|
|
@@ -6840,7 +6848,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6840
6848
|
editor: k,
|
|
6841
6849
|
"data-testid": o && `${o}-editor`
|
|
6842
6850
|
}),
|
|
6843
|
-
b && /* @__PURE__ */ S(
|
|
6851
|
+
b && /* @__PURE__ */ S(Xd, { children: /* @__PURE__ */ S(gf, {
|
|
6844
6852
|
ref: w,
|
|
6845
6853
|
editable: (l = E == null ? void 0 : E.editable) == null ? null : l,
|
|
6846
6854
|
getRect: (f = E == null ? void 0 : E.clientRect) == null ? null : f,
|
|
@@ -6850,13 +6858,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6850
6858
|
}) })
|
|
6851
6859
|
]
|
|
6852
6860
|
});
|
|
6853
|
-
})),
|
|
6854
|
-
className:
|
|
6861
|
+
})), yf = ({ children: e }) => /* @__PURE__ */ S("span", {
|
|
6862
|
+
className: hf.mention,
|
|
6855
6863
|
children: e
|
|
6856
|
-
}),
|
|
6864
|
+
}), bf = { row: "_row_n16je_1" }, xf = ({ alignItems: t = "initial", justifyContent: r = "initial", children: i = null, flex: a = !1, height: o = "auto", marginBottom: c = "0", marginTop: l = "0", spacing: u = "var(--padding)", wrap: d = !1, testId: f = null }) => {
|
|
6857
6865
|
let p = typeof u == "number" ? `${u}px` : u, m = (i === null || i === !1 ? [] : Array.isArray(i) ? i.filter((e) => s(e)) : [i]).map((t, r) => /* @__PURE__ */ S(n, { children: t.type === Ho ? e.cloneElement(t, { spacing: p }) : t }, r));
|
|
6858
6866
|
return /* @__PURE__ */ S("div", {
|
|
6859
|
-
className: b(
|
|
6867
|
+
className: b(bf.row),
|
|
6860
6868
|
style: {
|
|
6861
6869
|
alignItems: t,
|
|
6862
6870
|
justifyContent: r,
|
|
@@ -6872,7 +6880,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6872
6880
|
"data-testid": f,
|
|
6873
6881
|
children: m
|
|
6874
6882
|
});
|
|
6875
|
-
},
|
|
6883
|
+
}, Sf = {
|
|
6876
6884
|
inputInTable: "_inputInTable_t1w93_1",
|
|
6877
6885
|
inputHover: "_inputHover_t1w93_13",
|
|
6878
6886
|
inputFocus: "_inputFocus_t1w93_18",
|
|
@@ -6892,7 +6900,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6892
6900
|
experimental: "_experimental_t1w93_159",
|
|
6893
6901
|
active: "_active_t1w93_163",
|
|
6894
6902
|
icon: "_icon_t1w93_167"
|
|
6895
|
-
},
|
|
6903
|
+
}, Cf = c(({ isOpen: e, label: t, icon: n, invalid: r }) => /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(K, {
|
|
6896
6904
|
text: t,
|
|
6897
6905
|
enabled: !e,
|
|
6898
6906
|
placement: "right-center",
|
|
@@ -6901,7 +6909,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6901
6909
|
padding: "var(--padding-sm)",
|
|
6902
6910
|
display: "block",
|
|
6903
6911
|
children: /* @__PURE__ */ S("span", {
|
|
6904
|
-
className:
|
|
6912
|
+
className: Sf.icon,
|
|
6905
6913
|
children: /* @__PURE__ */ S(Qa, {
|
|
6906
6914
|
small: !0,
|
|
6907
6915
|
title: r ? "!" : void 0,
|
|
@@ -6910,18 +6918,18 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6910
6918
|
})
|
|
6911
6919
|
})
|
|
6912
6920
|
}), /* @__PURE__ */ S("span", {
|
|
6913
|
-
className:
|
|
6921
|
+
className: Sf.label,
|
|
6914
6922
|
children: t
|
|
6915
|
-
})] }), (e, t) => Dr(e, t)),
|
|
6916
|
-
className:
|
|
6923
|
+
})] }), (e, t) => Dr(e, t)), wf = ({ isOpen: e, items: t, sectionIndex: n, onClick: r, testId: i }) => /* @__PURE__ */ S("div", {
|
|
6924
|
+
className: Sf.list,
|
|
6917
6925
|
children: t.map((t, a) => {
|
|
6918
6926
|
let o = `${n}_${a}`;
|
|
6919
6927
|
return /* @__PURE__ */ S("a", {
|
|
6920
6928
|
href: t.value,
|
|
6921
|
-
className: b(
|
|
6929
|
+
className: b(Sf.item, t.isActive ? Sf.active : "", t.isExperimental ? Sf.experimental : ""),
|
|
6922
6930
|
onClick: (e) => r(e, t.value, t.label, t.onClick),
|
|
6923
6931
|
"data-testid": i,
|
|
6924
|
-
children: /* @__PURE__ */ S(
|
|
6932
|
+
children: /* @__PURE__ */ S(Cf, {
|
|
6925
6933
|
label: t.label,
|
|
6926
6934
|
icon: t.icon,
|
|
6927
6935
|
invalid: t.invalid,
|
|
@@ -6929,16 +6937,16 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6929
6937
|
}, o)
|
|
6930
6938
|
}, o);
|
|
6931
6939
|
})
|
|
6932
|
-
}),
|
|
6933
|
-
className:
|
|
6940
|
+
}), Tf = ({ isOpen: t, sections: n, onClick: r }) => /* @__PURE__ */ S(x, { children: n.map((n, i) => /* @__PURE__ */ C(e.Fragment, { children: [/* @__PURE__ */ S("h5", {
|
|
6941
|
+
className: Sf.subtitle,
|
|
6934
6942
|
children: n.heading.toUpperCase()
|
|
6935
|
-
}), /* @__PURE__ */ S(
|
|
6943
|
+
}), /* @__PURE__ */ S(wf, {
|
|
6936
6944
|
isOpen: t,
|
|
6937
6945
|
items: n.items,
|
|
6938
6946
|
sectionIndex: i,
|
|
6939
6947
|
onClick: r,
|
|
6940
6948
|
testId: n.testId
|
|
6941
|
-
})] }, i)) }),
|
|
6949
|
+
})] }, i)) }), Ef = c(({ options: e, startOpen: t = !1, onShiftClickToggleOpen: n = () => {}, top: r, testId: i }) => {
|
|
6942
6950
|
let [a, o] = v(t), s = (e, t, n, r) => {
|
|
6943
6951
|
e.preventDefault(), typeof r == "function" && (e.currentTarget.value = t, e.currentTarget.label = n, r(e)), o(!1);
|
|
6944
6952
|
}, c = e.sections.length > 0;
|
|
@@ -6961,13 +6969,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6961
6969
|
testId: i ? `${i}-toggle` : void 0
|
|
6962
6970
|
}),
|
|
6963
6971
|
children: /* @__PURE__ */ S("div", {
|
|
6964
|
-
className: b(
|
|
6972
|
+
className: b(Sf.sidebar, a ? "" : Sf.collapsed),
|
|
6965
6973
|
children: c && /* @__PURE__ */ C("div", {
|
|
6966
|
-
className:
|
|
6974
|
+
className: Sf.inner,
|
|
6967
6975
|
children: [/* @__PURE__ */ S("h4", {
|
|
6968
|
-
className:
|
|
6976
|
+
className: Sf.title,
|
|
6969
6977
|
children: e.title
|
|
6970
|
-
}), /* @__PURE__ */ S(
|
|
6978
|
+
}), /* @__PURE__ */ S(Tf, {
|
|
6971
6979
|
isOpen: a,
|
|
6972
6980
|
sections: e.sections,
|
|
6973
6981
|
onClick: s
|
|
@@ -6975,18 +6983,18 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6975
6983
|
})
|
|
6976
6984
|
})
|
|
6977
6985
|
});
|
|
6978
|
-
}, (e, t) => Dr(e, t)),
|
|
6986
|
+
}, (e, t) => Dr(e, t)), Df = {
|
|
6979
6987
|
skeletonContainer: "_skeletonContainer_mcfxp_9",
|
|
6980
6988
|
skeleton: "_skeleton_mcfxp_9"
|
|
6981
|
-
},
|
|
6989
|
+
}, Of = ({ count: e, width: t, height: n }) => /* @__PURE__ */ S(_i, {
|
|
6982
6990
|
baseColor: "var(--color-skeleton-base)",
|
|
6983
6991
|
highlightColor: "var(--color-skeleton-highlight)",
|
|
6984
|
-
containerClassName:
|
|
6985
|
-
className:
|
|
6992
|
+
containerClassName: Df.skeletonContainer,
|
|
6993
|
+
className: Df.skeleton,
|
|
6986
6994
|
count: e,
|
|
6987
6995
|
width: t,
|
|
6988
6996
|
height: n
|
|
6989
|
-
}),
|
|
6997
|
+
}), kf = {
|
|
6990
6998
|
wrapper: "_wrapper_j8x9r_1",
|
|
6991
6999
|
label: "_label_j8x9r_5",
|
|
6992
7000
|
input: "_input_j8x9r_9",
|
|
@@ -6994,38 +7002,38 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6994
7002
|
editable: "_editable_j8x9r_22",
|
|
6995
7003
|
inputControl: "_inputControl_j8x9r_25",
|
|
6996
7004
|
actions: "_actions_j8x9r_28"
|
|
6997
|
-
},
|
|
7005
|
+
}, Af = () => {
|
|
6998
7006
|
let e = _(null);
|
|
6999
7007
|
return m(() => {
|
|
7000
7008
|
e.current && (e.current(), e.current = null);
|
|
7001
7009
|
}), (t) => {
|
|
7002
7010
|
e.current = t;
|
|
7003
7011
|
};
|
|
7004
|
-
},
|
|
7012
|
+
}, jf = (e) => {
|
|
7005
7013
|
let t = _(void 0);
|
|
7006
7014
|
return d(() => {
|
|
7007
7015
|
t.current = e;
|
|
7008
7016
|
}, [e]), t.current;
|
|
7009
|
-
},
|
|
7017
|
+
}, Mf = (e, t) => {
|
|
7010
7018
|
let n = t == null ? void 0 : t[e];
|
|
7011
7019
|
if (!n) {
|
|
7012
7020
|
var r;
|
|
7013
7021
|
return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = pr(e)) == null ? "" : r;
|
|
7014
7022
|
}
|
|
7015
7023
|
return n;
|
|
7016
|
-
},
|
|
7024
|
+
}, Nf = /* @__PURE__ */ function(e) {
|
|
7017
7025
|
return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
|
|
7018
|
-
}({}),
|
|
7026
|
+
}({}), Pf = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), Ff = (e) => {
|
|
7019
7027
|
if (!e) return !1;
|
|
7020
7028
|
let t = Zn(e);
|
|
7021
7029
|
return !Gn.includes(t);
|
|
7022
|
-
},
|
|
7030
|
+
}, If = ({ value: e, unitkey: t, toUnit: n }) => {
|
|
7023
7031
|
var r;
|
|
7024
7032
|
let i = Wn[t];
|
|
7025
7033
|
if (!i || i.length === 0 || !((r = mr(e)) != null && r.valid) || !i.includes(n)) return !1;
|
|
7026
7034
|
let a = Zn(String(e));
|
|
7027
7035
|
return !(a && !i.includes(a));
|
|
7028
|
-
},
|
|
7036
|
+
}, Lf = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
|
|
7029
7037
|
var o;
|
|
7030
7038
|
let s = rr(e) ? $n(e) : e, c = [Infinity, -Infinity].includes(Number(s));
|
|
7031
7039
|
if (i || c) return {
|
|
@@ -7045,13 +7053,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7045
7053
|
value: void 0,
|
|
7046
7054
|
error: "Source unit is missing"
|
|
7047
7055
|
};
|
|
7048
|
-
if (
|
|
7056
|
+
if (Pf(s)) return {
|
|
7049
7057
|
value: void 0,
|
|
7050
7058
|
error: "Value is invalid for conversion"
|
|
7051
7059
|
};
|
|
7052
7060
|
try {
|
|
7053
7061
|
let e = gr(s, l);
|
|
7054
|
-
if (
|
|
7062
|
+
if (If({
|
|
7055
7063
|
value: e,
|
|
7056
7064
|
toUnit: n,
|
|
7057
7065
|
unitkey: t
|
|
@@ -7072,13 +7080,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7072
7080
|
error: "Conversion not possible"
|
|
7073
7081
|
};
|
|
7074
7082
|
}
|
|
7075
|
-
},
|
|
7076
|
-
let a = $n(e), o =
|
|
7077
|
-
return !
|
|
7083
|
+
}, Rf = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
|
|
7084
|
+
let a = $n(e), o = Pf(a);
|
|
7085
|
+
return !If({
|
|
7078
7086
|
value: e,
|
|
7079
7087
|
unitkey: n,
|
|
7080
7088
|
toUnit: t
|
|
7081
|
-
}) ||
|
|
7089
|
+
}) || Ff(e) || o ? { value: a } : rr(e) ? Lf({
|
|
7082
7090
|
value: e,
|
|
7083
7091
|
unitkey: n,
|
|
7084
7092
|
toUnit: t,
|
|
@@ -7086,25 +7094,25 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7086
7094
|
doNotConvertValue: i,
|
|
7087
7095
|
exactPrecision: !0
|
|
7088
7096
|
}) : { value: e };
|
|
7089
|
-
},
|
|
7097
|
+
}, zf = (e) => gn(e) && !cn(e) && !pn(e) ? sn(e, "fieldName", "") : typeof e == "string" ? e : "", Bf = (e = "") => Gn == null ? void 0 : Gn.includes(e), Vf = (e, t) => {
|
|
7090
7098
|
let n = Zn(e || "");
|
|
7091
|
-
return
|
|
7092
|
-
},
|
|
7093
|
-
|
|
7094
|
-
},
|
|
7099
|
+
return Bf(t) && Bf(n);
|
|
7100
|
+
}, Hf = i(null), Uf = () => u(Hf), Wf = !1, Gf = (e) => {
|
|
7101
|
+
Wf || (Wf = !0, Hf = e);
|
|
7102
|
+
}, Kf = (e) => tr(e) ? e : ar(e), qf = {
|
|
7095
7103
|
predefinedMenuActive: "_predefinedMenuActive_ye9w9_1",
|
|
7096
7104
|
inputWrapper: "_inputWrapper_ye9w9_4"
|
|
7097
|
-
},
|
|
7105
|
+
}, Jf = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUnit: r = !1, error: i = null, left: a = !1, small: o = !1, width: s = "100%", value: c, unitkey: l = "", initUnit: u, noConversion: f = !1, onChange: p = bn, onClick: m = bn, onFocus: g = bn, onSwitchUnit: _ = bn, unitTemplate: y, testId: w, warning: T = null, predefinedOptions: E, initialPredefinedOption: D = !1, shouldLinkAutomaticly: O = !0, selectedPredefinedOptionKey: k, validationCallback: A = () => ({
|
|
7098
7106
|
name: "",
|
|
7099
7107
|
error: null
|
|
7100
7108
|
}), disabledValidation: j = !1, allowEmpty: M = !1, convertBackToStorageUnit: N = !1, enableCosmeticRounding: P = !0, enableDisplayRounding: F = !1, roundDisplayValue: I, selectOnFocus: L = !0, groupOrder: R, tooltip: z = null }) => {
|
|
7101
|
-
let B =
|
|
7109
|
+
let B = Uf(), ee = Af();
|
|
7102
7110
|
typeof c == "number" && (c = `${c}`);
|
|
7103
|
-
let [te = "", ne = ""] = c === void 0 ? [] : lr(c), V = h(() =>
|
|
7111
|
+
let [te = "", ne = ""] = c === void 0 ? [] : lr(c), V = h(() => Mf(l, y || (B == null ? void 0 : B.unitTemplate)), [
|
|
7104
7112
|
l,
|
|
7105
7113
|
y,
|
|
7106
7114
|
B == null ? void 0 : B.unitTemplate
|
|
7107
|
-
]), re =
|
|
7115
|
+
]), re = Vf(c, V), ie = u || V || ne, ae = jf(ie), { value: oe } = Rf({
|
|
7108
7116
|
value: c,
|
|
7109
7117
|
toUnit: ie,
|
|
7110
7118
|
unitkey: l,
|
|
@@ -7116,10 +7124,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7116
7124
|
} : {
|
|
7117
7125
|
value: oe,
|
|
7118
7126
|
unit: ie
|
|
7119
|
-
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = v(D ?
|
|
7127
|
+
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = v(D ? Nf.PREDEFINED : Nf.CUSTOM), fe = !!(j || n), pe = E && E.find((e) => {
|
|
7120
7128
|
if (!(e != null && e.value)) return;
|
|
7121
7129
|
if (k) return k === e.valueKey;
|
|
7122
|
-
let t = rr(e.value) ? Zn(e.value) : "", { value: n = c } =
|
|
7130
|
+
let t = rr(e.value) ? Zn(e.value) : "", { value: n = c } = Lf({
|
|
7123
7131
|
value: String(c),
|
|
7124
7132
|
unitkey: l,
|
|
7125
7133
|
toUnit: t
|
|
@@ -7128,7 +7136,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7128
7136
|
}), me = () => {
|
|
7129
7137
|
var e;
|
|
7130
7138
|
let t = (e = c) == null ? "" : e, n = se.unit;
|
|
7131
|
-
if (!
|
|
7139
|
+
if (!If({
|
|
7132
7140
|
value: t,
|
|
7133
7141
|
unitkey: l,
|
|
7134
7142
|
toUnit: n
|
|
@@ -7143,7 +7151,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7143
7151
|
return null;
|
|
7144
7152
|
}
|
|
7145
7153
|
}, he = (t) => {
|
|
7146
|
-
let n =
|
|
7154
|
+
let n = zf(e), r = t.target, { value: i, selectionStart: a } = r, o = gr(i, (se == null ? void 0 : se.unit) || "");
|
|
7147
7155
|
p({ target: {
|
|
7148
7156
|
value: N ? gr(Jn(o, ne), ne) : o,
|
|
7149
7157
|
name: n
|
|
@@ -7165,7 +7173,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7165
7173
|
let e, t = "";
|
|
7166
7174
|
if (ie) {
|
|
7167
7175
|
if (ae !== ie) {
|
|
7168
|
-
let { value: n } =
|
|
7176
|
+
let { value: n } = Rf({
|
|
7169
7177
|
value: c,
|
|
7170
7178
|
toUnit: ie,
|
|
7171
7179
|
unitkey: l,
|
|
@@ -7174,7 +7182,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7174
7182
|
});
|
|
7175
7183
|
e = n, t = ie;
|
|
7176
7184
|
} else if (gr(se.value, se.unit) !== c) {
|
|
7177
|
-
let { value: n } =
|
|
7185
|
+
let { value: n } = Rf({
|
|
7178
7186
|
value: c,
|
|
7179
7187
|
toUnit: se.unit,
|
|
7180
7188
|
unitkey: l,
|
|
@@ -7187,21 +7195,21 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7187
7195
|
e !== void 0 && ce({
|
|
7188
7196
|
value: e,
|
|
7189
7197
|
unit: t
|
|
7190
|
-
}), de(E && pe && O ?
|
|
7198
|
+
}), de(E && pe && O ? Nf.PREDEFINED : Nf.CUSTOM);
|
|
7191
7199
|
}, [
|
|
7192
7200
|
ie,
|
|
7193
7201
|
c,
|
|
7194
7202
|
i,
|
|
7195
7203
|
O
|
|
7196
7204
|
]);
|
|
7197
|
-
let _e = me(), ve = ir(se.unit) || se.unit || "", ye = f || !_e || _e && _e.length === 1, be =
|
|
7205
|
+
let _e = me(), ve = ir(se.unit) || se.unit || "", ye = f || !_e || _e && _e.length === 1, be = zf(e), xe, Se = (t) => {
|
|
7198
7206
|
let r = t != null && t.value ? t.value : "", [i = "", a = ""] = rr(r) ? lr(r) : [r], o = hr(r);
|
|
7199
|
-
if (
|
|
7207
|
+
if (If({
|
|
7200
7208
|
value: r,
|
|
7201
7209
|
unitkey: l,
|
|
7202
7210
|
toUnit: a
|
|
7203
7211
|
})) {
|
|
7204
|
-
let { value: e = "" } =
|
|
7212
|
+
let { value: e = "" } = Rf({
|
|
7205
7213
|
value: r,
|
|
7206
7214
|
toUnit: V,
|
|
7207
7215
|
unitkey: l,
|
|
@@ -7214,7 +7222,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7214
7222
|
type: Va.OPTION,
|
|
7215
7223
|
inline: !0,
|
|
7216
7224
|
onClick: () => {
|
|
7217
|
-
mr(i).valid && !n && (de(
|
|
7225
|
+
mr(i).valid && !n && (de(Nf.PREDEFINED), p({ target: {
|
|
7218
7226
|
value: r,
|
|
7219
7227
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || "",
|
|
7220
7228
|
predefinedSelected: !0,
|
|
@@ -7226,27 +7234,27 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7226
7234
|
height: "0"
|
|
7227
7235
|
})] }),
|
|
7228
7236
|
description: o,
|
|
7229
|
-
selected: pe === t && ue ===
|
|
7237
|
+
selected: pe === t && ue === Nf.PREDEFINED
|
|
7230
7238
|
};
|
|
7231
7239
|
};
|
|
7232
7240
|
if (xe = [{
|
|
7233
7241
|
type: Va.OPTION,
|
|
7234
7242
|
inline: !0,
|
|
7235
7243
|
onClick: () => {
|
|
7236
|
-
ue !==
|
|
7244
|
+
ue !== Nf.CUSTOM && !n && p({ target: {
|
|
7237
7245
|
value: gr(se.value, se.unit),
|
|
7238
7246
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || ""
|
|
7239
7247
|
} });
|
|
7240
7248
|
},
|
|
7241
7249
|
label: "Custom",
|
|
7242
|
-
selected: ue ===
|
|
7250
|
+
selected: ue === Nf.CUSTOM
|
|
7243
7251
|
}], E != null && E.length) {
|
|
7244
7252
|
let e = E.map(Se);
|
|
7245
7253
|
xe = [...xe, ...e];
|
|
7246
7254
|
}
|
|
7247
7255
|
let Ce = (e) => {
|
|
7248
7256
|
if (rr(e)) {
|
|
7249
|
-
let t = Zn(e), { value: n } =
|
|
7257
|
+
let t = Zn(e), { value: n } = Rf({
|
|
7250
7258
|
value: e,
|
|
7251
7259
|
toUnit: se.unit,
|
|
7252
7260
|
unitkey: l,
|
|
@@ -7258,7 +7266,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7258
7266
|
return e;
|
|
7259
7267
|
}, we = !E && (!R || R === H.FIRST) ? H.FIRST : H.MIDDLE, Te = !R || R === H.LAST ? H.LAST : H.MIDDLE;
|
|
7260
7268
|
return /* @__PURE__ */ S("div", {
|
|
7261
|
-
className: ue ===
|
|
7269
|
+
className: ue === Nf.PREDEFINED ? b(qf.predefinedMenuActive) : "",
|
|
7262
7270
|
children: /* @__PURE__ */ C(ls, {
|
|
7263
7271
|
small: o,
|
|
7264
7272
|
width: s,
|
|
@@ -7273,18 +7281,18 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7273
7281
|
trigger: "Component",
|
|
7274
7282
|
component: /* @__PURE__ */ S(q, {
|
|
7275
7283
|
groupOrder: "first",
|
|
7276
|
-
active: ue ===
|
|
7277
|
-
icon: ue ===
|
|
7284
|
+
active: ue === Nf.PREDEFINED,
|
|
7285
|
+
icon: ue === Nf.PREDEFINED ? "link" : "unlink",
|
|
7278
7286
|
small: o
|
|
7279
7287
|
}),
|
|
7280
7288
|
small: o,
|
|
7281
7289
|
sections: xe
|
|
7282
7290
|
},
|
|
7283
|
-
tooltip: ue ===
|
|
7291
|
+
tooltip: ue === Nf.PREDEFINED ? pe == null ? void 0 : pe.label : ""
|
|
7284
7292
|
}),
|
|
7285
7293
|
/* @__PURE__ */ S("div", {
|
|
7286
|
-
className:
|
|
7287
|
-
children: /* @__PURE__ */ S(
|
|
7294
|
+
className: qf.inputWrapper,
|
|
7295
|
+
children: /* @__PURE__ */ S(vl, {
|
|
7288
7296
|
name: be,
|
|
7289
7297
|
testId: w,
|
|
7290
7298
|
disabled: n,
|
|
@@ -7307,7 +7315,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7307
7315
|
tooltip: z
|
|
7308
7316
|
}, be)
|
|
7309
7317
|
}),
|
|
7310
|
-
ve && (ye || !re ? /* @__PURE__ */ S(
|
|
7318
|
+
ve && (ye || !re ? /* @__PURE__ */ S(rl, {
|
|
7311
7319
|
groupOrder: Te,
|
|
7312
7320
|
small: o,
|
|
7313
7321
|
children: ve
|
|
@@ -7325,7 +7333,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7325
7333
|
let r = n || t || "", i = nr(e) ? e : "";
|
|
7326
7334
|
return {
|
|
7327
7335
|
type: "Option",
|
|
7328
|
-
label: P ?
|
|
7336
|
+
label: P ? Kf(i) : i,
|
|
7329
7337
|
inline: !0,
|
|
7330
7338
|
onClick: (n) => {
|
|
7331
7339
|
n.stopPropagation(), ge(e, t);
|
|
@@ -7340,10 +7348,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7340
7348
|
]
|
|
7341
7349
|
})
|
|
7342
7350
|
});
|
|
7343
|
-
},
|
|
7351
|
+
}, Yf = (e, t) => ({ target: {
|
|
7344
7352
|
name: e,
|
|
7345
7353
|
value: t
|
|
7346
|
-
} }),
|
|
7354
|
+
} }), Xf = (e) => `Value cannot be less than ${e}`, Zf = (e) => `Value cannot be greater than ${e}`, Qf = ({ name: e = "", value: t, min: n, max: r, label: i, step: a = .01, onChange: o, onChangeComplete: s, preferredUnit: c = "m", onSwitchUnit: l, enableEditUnitInput: u = !1, disabled: f = !1, showUnitInput: p = !0, showArrows: m = !0, unitkey: h = "length", testId: g, noConversion: _ = !1, small: y = !1, marks: x, minErrorMessage: w = Xf, maxErrorMessage: T = Zf }) => {
|
|
7347
7355
|
let E = gr(t, c), [D, O] = v(E), [k, A] = v(!1), [j, M] = v(c);
|
|
7348
7356
|
d(() => {
|
|
7349
7357
|
k || O(E);
|
|
@@ -7361,7 +7369,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7361
7369
|
}, z = () => {
|
|
7362
7370
|
O(E), A(!1);
|
|
7363
7371
|
}, B = () => {
|
|
7364
|
-
L || I === null || (o(
|
|
7372
|
+
L || I === null || (o(Yf(e, I)), s == null || s(Yf(e, I)), A(!1));
|
|
7365
7373
|
}, ee = (e) => {
|
|
7366
7374
|
M(e), l == null || l(e);
|
|
7367
7375
|
}, te = (e) => {
|
|
@@ -7376,7 +7384,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7376
7384
|
}, ne = (e) => {
|
|
7377
7385
|
e.key === "Enter" && B(), e.key === "Escape" && z();
|
|
7378
7386
|
}, V = f || k, re = /* @__PURE__ */ C("div", {
|
|
7379
|
-
className:
|
|
7387
|
+
className: kf.actions,
|
|
7380
7388
|
children: [/* @__PURE__ */ S(q, {
|
|
7381
7389
|
icon: "close",
|
|
7382
7390
|
small: !0,
|
|
@@ -7391,18 +7399,18 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7391
7399
|
})]
|
|
7392
7400
|
});
|
|
7393
7401
|
return /* @__PURE__ */ C("div", {
|
|
7394
|
-
className:
|
|
7402
|
+
className: kf.wrapper,
|
|
7395
7403
|
"data-testid": g && `${g}-wrapper`,
|
|
7396
7404
|
children: [
|
|
7397
7405
|
i && /* @__PURE__ */ S("span", {
|
|
7398
|
-
className:
|
|
7406
|
+
className: kf.label,
|
|
7399
7407
|
children: /* @__PURE__ */ S(Go, {
|
|
7400
7408
|
small: y,
|
|
7401
7409
|
children: i
|
|
7402
7410
|
})
|
|
7403
7411
|
}),
|
|
7404
7412
|
p && /* @__PURE__ */ S("div", {
|
|
7405
|
-
className: b(
|
|
7413
|
+
className: b(kf.input, y && kf.inputSmall, u && !f && kf.editable),
|
|
7406
7414
|
children: /* @__PURE__ */ S(vo, {
|
|
7407
7415
|
content: re,
|
|
7408
7416
|
isOpen: k,
|
|
@@ -7416,11 +7424,11 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7416
7424
|
testId: g && `${g}-edit-popover`,
|
|
7417
7425
|
toggleOnTriggerClick: !1,
|
|
7418
7426
|
children: /* @__PURE__ */ S("div", {
|
|
7419
|
-
className:
|
|
7427
|
+
className: kf.inputControl,
|
|
7420
7428
|
"data-testid": g && `${g}-edit-trigger`,
|
|
7421
7429
|
onClick: R,
|
|
7422
7430
|
onKeyDown: ne,
|
|
7423
|
-
children: /* @__PURE__ */ S(
|
|
7431
|
+
children: /* @__PURE__ */ S(Jf, {
|
|
7424
7432
|
name: e,
|
|
7425
7433
|
value: k ? D : E,
|
|
7426
7434
|
unitkey: h,
|
|
@@ -7437,7 +7445,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7437
7445
|
})
|
|
7438
7446
|
})
|
|
7439
7447
|
}),
|
|
7440
|
-
/* @__PURE__ */ S(
|
|
7448
|
+
/* @__PURE__ */ S(Ol, {
|
|
7441
7449
|
name: e,
|
|
7442
7450
|
value: t,
|
|
7443
7451
|
min: n,
|
|
@@ -7455,7 +7463,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7455
7463
|
})
|
|
7456
7464
|
]
|
|
7457
7465
|
});
|
|
7458
|
-
},
|
|
7466
|
+
}, $f = ({ label: e, invalid: t, badge: n }) => t ? /* @__PURE__ */ S(Qa, {
|
|
7459
7467
|
small: !0,
|
|
7460
7468
|
margin: "-4px",
|
|
7461
7469
|
color: "var(--color-text-error)",
|
|
@@ -7466,7 +7474,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7466
7474
|
margin: "-4px",
|
|
7467
7475
|
title: n == null ? void 0 : n.toString(),
|
|
7468
7476
|
children: e
|
|
7469
|
-
}) : /* @__PURE__ */ S(x, { children: e }),
|
|
7477
|
+
}) : /* @__PURE__ */ S(x, { children: e }), ep = {
|
|
7470
7478
|
tabs: "_tabs_vkne2_1",
|
|
7471
7479
|
padding: "_padding_vkne2_7",
|
|
7472
7480
|
margin: "_margin_vkne2_11",
|
|
@@ -7475,8 +7483,8 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7475
7483
|
left: "_left_vkne2_64",
|
|
7476
7484
|
right: "_right_vkne2_64",
|
|
7477
7485
|
selectionIndicator: "_selectionIndicator_vkne2_67"
|
|
7478
|
-
},
|
|
7479
|
-
let c = u(W), { simpleInputs: l, options: d, selectedOptions: f } =
|
|
7486
|
+
}, tp = ({ name: e = void 0, options: t = null, value: n = void 0, onChange: r = bn, padding: i = !1, margin: a = !0, testId: o, linkComponent: s }) => {
|
|
7487
|
+
let c = u(W), { simpleInputs: l, options: d, selectedOptions: f } = Xc(t, n), p = mn(f) ? void 0 : l ? f : f.value, m = (e) => {
|
|
7480
7488
|
var t;
|
|
7481
7489
|
return (t = e.component) == null ? s : t;
|
|
7482
7490
|
}, h = (e) => !!(e.to && m(e)), g = (t) => {
|
|
@@ -7501,7 +7509,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7501
7509
|
...p ? { href: p } : {},
|
|
7502
7510
|
shouldSelectOnPressUp: !0,
|
|
7503
7511
|
isDisabled: i || c,
|
|
7504
|
-
className: b(
|
|
7512
|
+
className: b(ep.item, o ? ep.right : ep.left),
|
|
7505
7513
|
"data-testid": u,
|
|
7506
7514
|
render: d && f ? (e) => "href" in e ? /* @__PURE__ */ S(f, {
|
|
7507
7515
|
...e,
|
|
@@ -7511,11 +7519,11 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7511
7519
|
(n = e.onClick) == null || n.call(e, t), v(t, a);
|
|
7512
7520
|
}
|
|
7513
7521
|
}) : /* @__PURE__ */ S("div", { ...e }) : void 0,
|
|
7514
|
-
children: [/* @__PURE__ */ S(
|
|
7522
|
+
children: [/* @__PURE__ */ S($f, {
|
|
7515
7523
|
label: t,
|
|
7516
7524
|
invalid: s,
|
|
7517
7525
|
badge: l
|
|
7518
|
-
}), /* @__PURE__ */ S(vi, { className:
|
|
7526
|
+
}), /* @__PURE__ */ S(vi, { className: ep.selectionIndicator })]
|
|
7519
7527
|
}, a);
|
|
7520
7528
|
};
|
|
7521
7529
|
if (d) {
|
|
@@ -7525,7 +7533,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7525
7533
|
"data-testid": o,
|
|
7526
7534
|
children: /* @__PURE__ */ S(bi, {
|
|
7527
7535
|
"aria-label": e == null ? "Tabs" : e,
|
|
7528
|
-
className: b(
|
|
7536
|
+
className: b(ep.tabs, i ? ep.padding : "", a ? ep.margin : ""),
|
|
7529
7537
|
children: y.map(w)
|
|
7530
7538
|
})
|
|
7531
7539
|
});
|
|
@@ -7535,7 +7543,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7535
7543
|
}) : t;
|
|
7536
7544
|
}
|
|
7537
7545
|
return null;
|
|
7538
|
-
},
|
|
7546
|
+
}, np = ({ children: e, href: t = void 0, target: n = void 0, testId: r, onClick: i, component: a = "a" }) => /* @__PURE__ */ S(a, {
|
|
7539
7547
|
href: t,
|
|
7540
7548
|
to: t,
|
|
7541
7549
|
target: n,
|
|
@@ -7545,7 +7553,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7545
7553
|
link: !0,
|
|
7546
7554
|
children: e
|
|
7547
7555
|
})
|
|
7548
|
-
}),
|
|
7556
|
+
}), rp = {
|
|
7549
7557
|
inputInTable: "_inputInTable_qbe2o_1",
|
|
7550
7558
|
inputHover: "_inputHover_qbe2o_13",
|
|
7551
7559
|
inputFocus: "_inputFocus_qbe2o_18",
|
|
@@ -7557,9 +7565,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7557
7565
|
textarea: "_textarea_qbe2o_81",
|
|
7558
7566
|
small: "_small_qbe2o_120",
|
|
7559
7567
|
monospace: "_monospace_qbe2o_159"
|
|
7560
|
-
},
|
|
7568
|
+
}, ip = ({ name: e, value: t = "", placeholder: n = "", cols: r, rows: i, disabled: a = !1, onChange: o = bn, onKeyPress: s = bn, onFocus: c = bn, onBlur: l = bn, tabIndex: d = 0, error: f = null, warning: p = null, tooltip: m = null, maxTooltipWidth: h, resize: g, monospace: _ = !1, small: v = !1, testId: y }) => {
|
|
7561
7569
|
let x = u(W), C = /* @__PURE__ */ S("textarea", {
|
|
7562
|
-
className: b(
|
|
7570
|
+
className: b(rp.textarea, f ? rp.error : "", p ? rp.warning : "", _ ? rp.monospace : "", v ? rp.small : ""),
|
|
7563
7571
|
name: e,
|
|
7564
7572
|
value: t,
|
|
7565
7573
|
placeholder: n,
|
|
@@ -7601,10 +7609,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7601
7609
|
menu: "_menu_oyr59_139",
|
|
7602
7610
|
active: "_active_oyr59_168",
|
|
7603
7611
|
alert: "_alert_oyr59_193"
|
|
7604
|
-
},
|
|
7612
|
+
}, ap = ({ warning: e }) => /* @__PURE__ */ S("div", {
|
|
7605
7613
|
className: Q.alert,
|
|
7606
7614
|
children: e
|
|
7607
|
-
}),
|
|
7615
|
+
}), op = ({ icon: e, url: t, onClick: n }) => {
|
|
7608
7616
|
let r = /* @__PURE__ */ S(G, { icon: e });
|
|
7609
7617
|
return t ? /* @__PURE__ */ S("a", {
|
|
7610
7618
|
href: t,
|
|
@@ -7616,7 +7624,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7616
7624
|
className: Q.appSwitcher,
|
|
7617
7625
|
children: r
|
|
7618
7626
|
});
|
|
7619
|
-
},
|
|
7627
|
+
}, sp = ({ label: e, logo: t, url: n, version: r, onClick: i }) => {
|
|
7620
7628
|
let a = /* @__PURE__ */ C("div", {
|
|
7621
7629
|
className: Q.title,
|
|
7622
7630
|
children: [
|
|
@@ -7645,9 +7653,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7645
7653
|
children: a
|
|
7646
7654
|
})
|
|
7647
7655
|
});
|
|
7648
|
-
},
|
|
7656
|
+
}, cp = /* @__PURE__ */ function(e) {
|
|
7649
7657
|
return e.LINK = "Link", e.BUTTON = "Button", e.MENU = "Menu", e.COMPONENT = "Component", e;
|
|
7650
|
-
}({}),
|
|
7658
|
+
}({}), lp = ({ label: e, url: t, icon: n, onClick: r, active: i, disabled: a, testId: o, component: s = "a" }) => {
|
|
7651
7659
|
let c = u(W);
|
|
7652
7660
|
return /* @__PURE__ */ C(s, {
|
|
7653
7661
|
className: b(Q.link, i ? Q.active : ""),
|
|
@@ -7664,11 +7672,11 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7664
7672
|
children: e
|
|
7665
7673
|
})]
|
|
7666
7674
|
});
|
|
7667
|
-
},
|
|
7675
|
+
}, up = ({ element: e }) => {
|
|
7668
7676
|
switch (e.type) {
|
|
7669
|
-
case
|
|
7677
|
+
case cp.LINK: return /* @__PURE__ */ S("div", {
|
|
7670
7678
|
className: Q.item,
|
|
7671
|
-
children: /* @__PURE__ */ S(
|
|
7679
|
+
children: /* @__PURE__ */ S(lp, {
|
|
7672
7680
|
label: e.label,
|
|
7673
7681
|
url: e.url,
|
|
7674
7682
|
icon: e.icon,
|
|
@@ -7679,7 +7687,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7679
7687
|
component: e.component
|
|
7680
7688
|
})
|
|
7681
7689
|
});
|
|
7682
|
-
case
|
|
7690
|
+
case cp.BUTTON: return /* @__PURE__ */ S("div", {
|
|
7683
7691
|
className: b(Q.item, Q.button),
|
|
7684
7692
|
children: /* @__PURE__ */ S(q, {
|
|
7685
7693
|
label: e.label,
|
|
@@ -7691,14 +7699,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7691
7699
|
testId: e.testId
|
|
7692
7700
|
})
|
|
7693
7701
|
});
|
|
7694
|
-
case
|
|
7702
|
+
case cp.MENU: return /* @__PURE__ */ S("div", {
|
|
7695
7703
|
className: b(Q.item, Q.menu),
|
|
7696
7704
|
children: /* @__PURE__ */ S(ao, {
|
|
7697
7705
|
maxHeight: "100%",
|
|
7698
7706
|
menu: {
|
|
7699
7707
|
trigger: ki.COMPONENT,
|
|
7700
7708
|
placement: "bottom-start",
|
|
7701
|
-
component: /* @__PURE__ */ S(
|
|
7709
|
+
component: /* @__PURE__ */ S(lp, {
|
|
7702
7710
|
label: e.label,
|
|
7703
7711
|
icon: e.icon,
|
|
7704
7712
|
onClick: e.onClick
|
|
@@ -7707,50 +7715,50 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7707
7715
|
}
|
|
7708
7716
|
})
|
|
7709
7717
|
});
|
|
7710
|
-
case
|
|
7718
|
+
case cp.COMPONENT: return /* @__PURE__ */ S("div", {
|
|
7711
7719
|
className: Q.item,
|
|
7712
7720
|
children: e.component
|
|
7713
7721
|
});
|
|
7714
7722
|
default: return null;
|
|
7715
7723
|
}
|
|
7716
|
-
},
|
|
7724
|
+
}, dp = ({ title: e, appSwitcher: t, content: n = [], contentRight: r = [], warning: i = "", height: a = "var(--size-topbar)", fixedPosition: o = !0 }) => /* @__PURE__ */ C("div", { children: [i && /* @__PURE__ */ S(ap, { warning: i }), /* @__PURE__ */ C("div", {
|
|
7717
7725
|
className: b(Q.topbar, o ? Q.fixed : ""),
|
|
7718
7726
|
style: { height: a },
|
|
7719
7727
|
children: [
|
|
7720
|
-
!!t && /* @__PURE__ */ S(
|
|
7728
|
+
!!t && /* @__PURE__ */ S(op, {
|
|
7721
7729
|
icon: t.icon,
|
|
7722
7730
|
url: t.url,
|
|
7723
7731
|
onClick: t.onClick
|
|
7724
7732
|
}),
|
|
7725
7733
|
/* @__PURE__ */ C("div", {
|
|
7726
7734
|
className: Q.left,
|
|
7727
|
-
children: [e && /* @__PURE__ */ S(
|
|
7735
|
+
children: [e && /* @__PURE__ */ S(sp, {
|
|
7728
7736
|
label: e.label,
|
|
7729
7737
|
logo: e.logo,
|
|
7730
7738
|
url: e.url,
|
|
7731
7739
|
version: e.version,
|
|
7732
7740
|
onClick: e.onClick
|
|
7733
|
-
}), n.map((e, t) => e ? /* @__PURE__ */ S(
|
|
7741
|
+
}), n.map((e, t) => e ? /* @__PURE__ */ S(up, { element: e }, t) : null)]
|
|
7734
7742
|
}),
|
|
7735
7743
|
/* @__PURE__ */ S("div", {
|
|
7736
7744
|
className: Q.right,
|
|
7737
|
-
children: r.map((e, t) => e ? /* @__PURE__ */ S(
|
|
7745
|
+
children: r.map((e, t) => e ? /* @__PURE__ */ S(up, { element: e }, t) : null)
|
|
7738
7746
|
})
|
|
7739
7747
|
]
|
|
7740
|
-
})] }),
|
|
7748
|
+
})] }), fp = {
|
|
7741
7749
|
popConfirm: "_popConfirm_1x6ye_1",
|
|
7742
7750
|
content: "_content_1x6ye_7",
|
|
7743
7751
|
buttons: "_buttons_1x6ye_13"
|
|
7744
|
-
},
|
|
7745
|
-
className:
|
|
7752
|
+
}, pp = ({ title: e, okText: t, onClickOk: n, disableConfirmButton: r, cancelText: i, onClickCancel: a, close: o, testId: s }) => /* @__PURE__ */ C("div", {
|
|
7753
|
+
className: fp.popConfirm,
|
|
7746
7754
|
children: [e && /* @__PURE__ */ S("div", {
|
|
7747
|
-
className:
|
|
7755
|
+
className: fp.content,
|
|
7748
7756
|
children: /* @__PURE__ */ S(Go, {
|
|
7749
7757
|
small: !0,
|
|
7750
7758
|
children: e
|
|
7751
7759
|
})
|
|
7752
7760
|
}), /* @__PURE__ */ C("div", {
|
|
7753
|
-
className:
|
|
7761
|
+
className: fp.buttons,
|
|
7754
7762
|
children: [/* @__PURE__ */ S(q, {
|
|
7755
7763
|
small: !0,
|
|
7756
7764
|
colored: !0,
|
|
@@ -7765,8 +7773,8 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7765
7773
|
testId: `${s}-cancel-button`
|
|
7766
7774
|
})]
|
|
7767
7775
|
})]
|
|
7768
|
-
}),
|
|
7769
|
-
content: /* @__PURE__ */ S(
|
|
7776
|
+
}), mp = ({ children: e, placement: t = "top-center", closeOnOutsideClick: n = !0, fullWidth: r = !1, title: i = "", cancelText: a = "Cancel", onClickCancel: o = (e) => e && e(), okText: s = "Ok", onClickOk: c = () => {}, disableConfirmButton: l = !1, testId: u = void 0 }) => /* @__PURE__ */ S(vo, {
|
|
7777
|
+
content: /* @__PURE__ */ S(pp, {
|
|
7770
7778
|
title: i,
|
|
7771
7779
|
okText: s,
|
|
7772
7780
|
onClickOk: c,
|
|
@@ -7780,14 +7788,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7780
7788
|
fullWidth: r,
|
|
7781
7789
|
testId: u,
|
|
7782
7790
|
children: e
|
|
7783
|
-
}),
|
|
7791
|
+
}), hp = {
|
|
7784
7792
|
tree: "_tree_coxxe_1",
|
|
7785
7793
|
toggle: "_toggle_coxxe_8",
|
|
7786
7794
|
dropTarget: "_dropTarget_coxxe_15",
|
|
7787
7795
|
placeholder: "_placeholder_coxxe_30",
|
|
7788
7796
|
draggingSource: "_draggingSource_coxxe_36",
|
|
7789
7797
|
placeholderContainer: "_placeholderContainer_coxxe_39"
|
|
7790
|
-
},
|
|
7798
|
+
}, gp = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
|
|
7791
7799
|
let { id: l, data: u } = t, { active: d, disabled: f, testId: p, onClick: m, actions: h = [] } = u, [g, _] = e.useState(!1), [v, y] = e.useState(0), x = (e) => {
|
|
7792
7800
|
e.stopPropagation(), i(l);
|
|
7793
7801
|
}, w = (e) => {
|
|
@@ -7814,7 +7822,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7814
7822
|
className: b(Z.itemHeader, g ? Z.noPointerEvents : ""),
|
|
7815
7823
|
children: [
|
|
7816
7824
|
a && /* @__PURE__ */ S("div", {
|
|
7817
|
-
className:
|
|
7825
|
+
className: hp.toggle,
|
|
7818
7826
|
children: /* @__PURE__ */ S(q, {
|
|
7819
7827
|
basic: !0,
|
|
7820
7828
|
colored: r ? !0 : Ai.MUTED,
|
|
@@ -7828,10 +7836,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7828
7836
|
className: Z.drag,
|
|
7829
7837
|
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
7830
7838
|
}),
|
|
7831
|
-
/* @__PURE__ */ S(
|
|
7839
|
+
/* @__PURE__ */ S(Ed, { item: u }),
|
|
7832
7840
|
/* @__PURE__ */ C("div", {
|
|
7833
7841
|
className: Z.right,
|
|
7834
|
-
children: [/* @__PURE__ */ S(
|
|
7842
|
+
children: [/* @__PURE__ */ S(Dd, { item: u }), !f && h.length > 0 && /* @__PURE__ */ S("div", {
|
|
7835
7843
|
className: Z.actions,
|
|
7836
7844
|
children: /* @__PURE__ */ S(so, { actions: h })
|
|
7837
7845
|
})]
|
|
@@ -7839,13 +7847,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7839
7847
|
]
|
|
7840
7848
|
})
|
|
7841
7849
|
});
|
|
7842
|
-
},
|
|
7843
|
-
className:
|
|
7850
|
+
}, _p = ({ depth: e, indent: t = "var(--size-sm)" }) => /* @__PURE__ */ S("div", {
|
|
7851
|
+
className: hp.placeholder,
|
|
7844
7852
|
style: { left: `calc(${t} * ${e})` }
|
|
7845
|
-
}),
|
|
7853
|
+
}), vp = (e, t) => {
|
|
7846
7854
|
var n;
|
|
7847
7855
|
return e && (t == null || (n = t.data) == null ? void 0 : n.draggable) !== !1;
|
|
7848
|
-
},
|
|
7856
|
+
}, yp = ({ list: e, canDrop: t, draggable: n = !1, onListReorder: r, onChangeOpen: i, testId: a, isInitialOpen: o = !1, autoOpenActiveItems: s = !1, treeRef: c, itemHasChild: l, onItemToggle: u, icons: f, allowParentReassignment: p, stickyHeader: m, height: h, render: g, placeholderIndent: v }) => {
|
|
7849
7857
|
var y, b;
|
|
7850
7858
|
let x = c == null ? _(null) : c, w = (e) => {
|
|
7851
7859
|
i && i(e);
|
|
@@ -7913,7 +7921,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7913
7921
|
"data-testid": a,
|
|
7914
7922
|
className: Z.list,
|
|
7915
7923
|
style: { height: h },
|
|
7916
|
-
children: [e.name && !e.noHeader && /* @__PURE__ */ S(
|
|
7924
|
+
children: [e.name && !e.noHeader && /* @__PURE__ */ S(Cd, {
|
|
7917
7925
|
name: e.name,
|
|
7918
7926
|
actions: e.actions,
|
|
7919
7927
|
stickyHeader: m
|
|
@@ -7926,7 +7934,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7926
7934
|
tree: N,
|
|
7927
7935
|
sort: !1,
|
|
7928
7936
|
insertDroppableFirst: !1,
|
|
7929
|
-
canDrag: (e) =>
|
|
7937
|
+
canDrag: (e) => vp(n, e),
|
|
7930
7938
|
canDrop: t || ((e, { dragSource: t, dropTargetId: n }) => {
|
|
7931
7939
|
if ((t == null ? void 0 : t.parent) === n) return !0;
|
|
7932
7940
|
}),
|
|
@@ -7940,7 +7948,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7940
7948
|
hasChild: n,
|
|
7941
7949
|
isOpen: i,
|
|
7942
7950
|
onToggle: a
|
|
7943
|
-
}) : /* @__PURE__ */ S(
|
|
7951
|
+
}) : /* @__PURE__ */ S(gp, {
|
|
7944
7952
|
hasChild: l ? l(e) : n,
|
|
7945
7953
|
node: e,
|
|
7946
7954
|
depth: t,
|
|
@@ -7956,7 +7964,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7956
7964
|
onDrop: M,
|
|
7957
7965
|
onChangeOpen: w,
|
|
7958
7966
|
dropTargetOffset: 10,
|
|
7959
|
-
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ S(
|
|
7967
|
+
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ S(_p, {
|
|
7960
7968
|
depth: t,
|
|
7961
7969
|
indent: v
|
|
7962
7970
|
}),
|
|
@@ -7964,17 +7972,17 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7964
7972
|
listComponent: "div",
|
|
7965
7973
|
listItemComponent: "div",
|
|
7966
7974
|
classes: {
|
|
7967
|
-
root:
|
|
7968
|
-
draggingSource:
|
|
7969
|
-
dropTarget:
|
|
7970
|
-
placeholder:
|
|
7975
|
+
root: hp.tree,
|
|
7976
|
+
draggingSource: hp.draggingSource,
|
|
7977
|
+
dropTarget: hp.dropTarget,
|
|
7978
|
+
placeholder: hp.placeholderContainer
|
|
7971
7979
|
},
|
|
7972
7980
|
initialOpen: o,
|
|
7973
7981
|
enableAnimateExpand: !0
|
|
7974
7982
|
})
|
|
7975
7983
|
})]
|
|
7976
7984
|
});
|
|
7977
|
-
},
|
|
7985
|
+
}, bp = {
|
|
7978
7986
|
treeTable: "_treeTable_1ywvy_1",
|
|
7979
7987
|
treeTableHeader: "_treeTableHeader_1ywvy_22",
|
|
7980
7988
|
folderCell: "_folderCell_1ywvy_30",
|
|
@@ -7982,48 +7990,48 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7982
7990
|
drag: "_drag_1ywvy_31",
|
|
7983
7991
|
folder: "_folder_1ywvy_30",
|
|
7984
7992
|
active: "_active_1ywvy_61"
|
|
7985
|
-
},
|
|
7993
|
+
}, xp = (e, t) => e.filter((e) => e.parent === t).flatMap((t) => [t.id, ...xp(e, t.id)]), Sp = (e, t) => {
|
|
7986
7994
|
let n = new Set(t);
|
|
7987
7995
|
return e.filter((e) => !n.has(e.id)).map((e) => e.id);
|
|
7988
|
-
},
|
|
7996
|
+
}, Cp = (e, t, n) => e.filter((e) => n.has(e) || !t.has(e)), wp = (e, t, n, r = []) => {
|
|
7989
7997
|
let i = new Set(n), a = new Set(r), o = e.filter((e) => e.parent === t && !a.has(e.id));
|
|
7990
7998
|
if (o.length === 0) return {
|
|
7991
7999
|
checked: i.has(t),
|
|
7992
8000
|
indeterminate: !1
|
|
7993
8001
|
};
|
|
7994
|
-
let s = o.map((t) =>
|
|
8002
|
+
let s = o.map((t) => wp(e, t.id, n, r)), c = s.filter((e) => e.checked).length, l = s.filter((e) => e.indeterminate).length, u = c === o.length;
|
|
7995
8003
|
return {
|
|
7996
8004
|
checked: u,
|
|
7997
8005
|
indeterminate: c + l > 0 && !u
|
|
7998
8006
|
};
|
|
7999
|
-
},
|
|
8000
|
-
let r =
|
|
8007
|
+
}, Tp = (e, t, n = []) => {
|
|
8008
|
+
let r = Sp(e, n), i = new Set(t), a = r.filter((e) => i.has(e)).length;
|
|
8001
8009
|
return {
|
|
8002
8010
|
checked: r.length > 0 && a === r.length,
|
|
8003
8011
|
indeterminate: a > 0 && a < r.length
|
|
8004
8012
|
};
|
|
8005
|
-
},
|
|
8013
|
+
}, Ep = i(null), Dp = () => u(Ep), Op = ({ children: e, rowCheckboxes: t, rows: n }) => {
|
|
8006
8014
|
let r = t !== void 0, { checkedIds: i = [], disabledIds: a = [], getTooltip: o, onChange: s } = t == null ? {} : t, c = h(() => new Set(a), [a]), u = h(() => {
|
|
8007
8015
|
if (!r) return null;
|
|
8008
8016
|
let e = /* @__PURE__ */ new Map();
|
|
8009
|
-
for (let t of n) e.set(t.id,
|
|
8017
|
+
for (let t of n) e.set(t.id, wp(n, t.id, i, a));
|
|
8010
8018
|
return e;
|
|
8011
8019
|
}, [
|
|
8012
8020
|
i,
|
|
8013
8021
|
a,
|
|
8014
8022
|
r,
|
|
8015
8023
|
n
|
|
8016
|
-
]), d = h(() => r ?
|
|
8024
|
+
]), d = h(() => r ? Tp(n, i, a) : void 0, [
|
|
8017
8025
|
i,
|
|
8018
8026
|
a,
|
|
8019
8027
|
r,
|
|
8020
8028
|
n
|
|
8021
8029
|
]), f = l((e) => u == null ? void 0 : u.get(e), [u]), p = l((e) => c.has(e), [c]), m = l((e) => o == null ? void 0 : o(e), [o]), g = l((e) => {
|
|
8022
8030
|
if (!r || c.has(e)) return;
|
|
8023
|
-
let t =
|
|
8031
|
+
let t = xp(n, e), o = [e, ...t.filter((e) => !c.has(e))], l = [e, ...t], { checked: u } = wp(n, e, i, a);
|
|
8024
8032
|
if (u) {
|
|
8025
8033
|
let e = new Set(l);
|
|
8026
|
-
s == null || s(
|
|
8034
|
+
s == null || s(Cp(i, e, c));
|
|
8027
8035
|
} else s == null || s([.../* @__PURE__ */ new Set([...i, ...o])]);
|
|
8028
8036
|
}, [
|
|
8029
8037
|
i,
|
|
@@ -8034,7 +8042,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8034
8042
|
n
|
|
8035
8043
|
]), _ = l(() => {
|
|
8036
8044
|
if (!r) return;
|
|
8037
|
-
let e =
|
|
8045
|
+
let e = Sp(n, a), { checked: t } = Tp(n, i, a);
|
|
8038
8046
|
t ? s == null || s(i.filter((e) => c.has(e))) : s == null || s([.../* @__PURE__ */ new Set([...i, ...e])]);
|
|
8039
8047
|
}, [
|
|
8040
8048
|
i,
|
|
@@ -8060,12 +8068,12 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8060
8068
|
_,
|
|
8061
8069
|
g
|
|
8062
8070
|
]);
|
|
8063
|
-
return /* @__PURE__ */ S(
|
|
8071
|
+
return /* @__PURE__ */ S(Ep.Provider, {
|
|
8064
8072
|
value: v,
|
|
8065
8073
|
children: e
|
|
8066
8074
|
});
|
|
8067
|
-
},
|
|
8068
|
-
let g =
|
|
8075
|
+
}, kp = ({ columnAlignment: e, columnWidths: t, depth: n, draggable: r, handleRef: i, hasChild: a, hasRowActions: o, icons: s, isItemDraggable: c = !0, isOpen: l, node: u, onDragEnter: d, onDragOver: f, onDragLeave: p, onDrop: m, onToggle: h }) => {
|
|
8076
|
+
let g = Dp(), _ = g != null && g.enabled ? g.getRowCheckState(u.id) : void 0, v = _ == null ? void 0 : _.checked, y = _ == null ? void 0 : _.indeterminate, x = g == null ? void 0 : g.isRowCheckDisabled(u.id), w = g == null ? void 0 : g.enabled, { data: T, droppable: E } = u, { id: D, cells: O, testId: k, actions: A = [], active: j, onRowClick: M } = T, N = E || a, P = (e) => {
|
|
8069
8077
|
let r = t ? t[e] : void 0;
|
|
8070
8078
|
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${N ? n + 1 : n})`})` : r;
|
|
8071
8079
|
};
|
|
@@ -8078,12 +8086,12 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8078
8086
|
onDragLeave: p,
|
|
8079
8087
|
children: /* @__PURE__ */ S("tbody", { children: /* @__PURE__ */ C("tr", {
|
|
8080
8088
|
onClick: M,
|
|
8081
|
-
className: b(
|
|
8089
|
+
className: b(bp.treeTableRow, j ? bp.active : void 0),
|
|
8082
8090
|
children: [
|
|
8083
|
-
w && /* @__PURE__ */ S(
|
|
8091
|
+
w && /* @__PURE__ */ S(Hl, {
|
|
8084
8092
|
isHeader: !1,
|
|
8085
8093
|
cell: {
|
|
8086
|
-
type:
|
|
8094
|
+
type: Vl.CHECKBOX,
|
|
8087
8095
|
checked: v,
|
|
8088
8096
|
disabled: x,
|
|
8089
8097
|
indeterminate: y,
|
|
@@ -8092,19 +8100,19 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8092
8100
|
}
|
|
8093
8101
|
}),
|
|
8094
8102
|
r && /* @__PURE__ */ S("td", {
|
|
8095
|
-
className:
|
|
8103
|
+
className: bp.dragCell,
|
|
8096
8104
|
children: c && /* @__PURE__ */ S("div", {
|
|
8097
|
-
className:
|
|
8105
|
+
className: bp.drag,
|
|
8098
8106
|
onClick: (e) => e.stopPropagation(),
|
|
8099
8107
|
ref: i,
|
|
8100
8108
|
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
8101
8109
|
})
|
|
8102
8110
|
}),
|
|
8103
|
-
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ S("td", { className:
|
|
8111
|
+
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ S("td", { className: bp.folderCell }, t)),
|
|
8104
8112
|
N && /* @__PURE__ */ S("td", {
|
|
8105
|
-
className:
|
|
8113
|
+
className: bp.folderCell,
|
|
8106
8114
|
children: /* @__PURE__ */ S("div", {
|
|
8107
|
-
className:
|
|
8115
|
+
className: bp.folder,
|
|
8108
8116
|
onClick: () => h(D),
|
|
8109
8117
|
onMouseDown: (e) => e.stopPropagation(),
|
|
8110
8118
|
children: /* @__PURE__ */ S(q, {
|
|
@@ -8119,73 +8127,73 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8119
8127
|
}),
|
|
8120
8128
|
O.map((t, n) => {
|
|
8121
8129
|
let r = P(n), i = e ? e[n] : null;
|
|
8122
|
-
return /* @__PURE__ */ S(
|
|
8130
|
+
return /* @__PURE__ */ S(Hl, {
|
|
8123
8131
|
isHeader: !1,
|
|
8124
8132
|
cell: t,
|
|
8125
8133
|
width: r,
|
|
8126
8134
|
columnAlignment: i
|
|
8127
8135
|
}, n);
|
|
8128
8136
|
}),
|
|
8129
|
-
o && /* @__PURE__ */ S(
|
|
8137
|
+
o && /* @__PURE__ */ S(Hl, {
|
|
8130
8138
|
isHeader: !1,
|
|
8131
8139
|
cell: {
|
|
8132
|
-
type:
|
|
8140
|
+
type: Vl.ACTIONS,
|
|
8133
8141
|
actions: A
|
|
8134
8142
|
}
|
|
8135
8143
|
})
|
|
8136
8144
|
]
|
|
8137
8145
|
}) })
|
|
8138
8146
|
});
|
|
8139
|
-
},
|
|
8140
|
-
let a =
|
|
8147
|
+
}, Ap = ({ columnAlignment: e, columnWidths: t, draggable: n, hasRowActions: r, headers: i }) => {
|
|
8148
|
+
let a = Dp(), o = a == null ? void 0 : a.headerCheckState, s = (a == null ? void 0 : a.enabled) && o !== void 0;
|
|
8141
8149
|
return /* @__PURE__ */ S("table", {
|
|
8142
|
-
className: b(Hs.table,
|
|
8150
|
+
className: b(Hs.table, bp.treeTableHeader),
|
|
8143
8151
|
children: /* @__PURE__ */ S("thead", { children: i.map((i, c) => /* @__PURE__ */ C("tr", { children: [
|
|
8144
|
-
s && c === 0 ? /* @__PURE__ */ S(
|
|
8152
|
+
s && c === 0 ? /* @__PURE__ */ S(Hl, {
|
|
8145
8153
|
isHeader: !0,
|
|
8146
8154
|
cell: {
|
|
8147
|
-
type:
|
|
8155
|
+
type: Vl.CHECKBOX,
|
|
8148
8156
|
checked: o.checked,
|
|
8149
8157
|
indeterminate: o.indeterminate,
|
|
8150
8158
|
onChange: a.toggleHeaderCheck
|
|
8151
8159
|
}
|
|
8152
8160
|
}) : s ? /* @__PURE__ */ S("td", {}) : null,
|
|
8153
|
-
n && /* @__PURE__ */ S("th", { className:
|
|
8161
|
+
n && /* @__PURE__ */ S("th", { className: bp.dragCell }),
|
|
8154
8162
|
i.cells.map((n, r) => {
|
|
8155
8163
|
let i = t ? t[r] : void 0, a = e ? e[r] : void 0;
|
|
8156
|
-
return /* @__PURE__ */ S(
|
|
8164
|
+
return /* @__PURE__ */ S(Hl, {
|
|
8157
8165
|
isHeader: !0,
|
|
8158
8166
|
cell: n,
|
|
8159
8167
|
width: i,
|
|
8160
8168
|
columnAlignment: a
|
|
8161
8169
|
}, r);
|
|
8162
8170
|
}),
|
|
8163
|
-
r && /* @__PURE__ */ S(
|
|
8171
|
+
r && /* @__PURE__ */ S(Hl, {
|
|
8164
8172
|
isHeader: !0,
|
|
8165
8173
|
cell: {
|
|
8166
|
-
type:
|
|
8174
|
+
type: Vl.ACTIONS,
|
|
8167
8175
|
actions: i.actions,
|
|
8168
8176
|
width: 31
|
|
8169
8177
|
}
|
|
8170
8178
|
})
|
|
8171
8179
|
] }, c)) })
|
|
8172
8180
|
});
|
|
8173
|
-
},
|
|
8174
|
-
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: v = [] } = d, y =
|
|
8175
|
-
return /* @__PURE__ */ S(
|
|
8181
|
+
}, jp = ({ allowParentReassignment: e, autoOpenActiveItems: t = !1, canDrop: n, draggable: r = !1, icons: i, isInitialOpen: a = !1, itemHasChild: o, onItemToggle: s, onListReorder: c, onChangeOpen: l, rowCheckboxes: u, table: d, testId: f, treeRef: p }) => {
|
|
8182
|
+
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: v = [] } = d, y = ll(v, _ == null ? [] : _);
|
|
8183
|
+
return /* @__PURE__ */ S(Op, {
|
|
8176
8184
|
rowCheckboxes: u,
|
|
8177
8185
|
rows: v,
|
|
8178
8186
|
children: /* @__PURE__ */ C("div", {
|
|
8179
|
-
className:
|
|
8187
|
+
className: bp.treeTable,
|
|
8180
8188
|
"data-testid": f,
|
|
8181
8189
|
style: { width: g },
|
|
8182
|
-
children: [!!_ && /* @__PURE__ */ S(
|
|
8190
|
+
children: [!!_ && /* @__PURE__ */ S(Ap, {
|
|
8183
8191
|
columnAlignment: m,
|
|
8184
8192
|
columnWidths: h,
|
|
8185
8193
|
draggable: r,
|
|
8186
8194
|
hasRowActions: y,
|
|
8187
8195
|
headers: _
|
|
8188
|
-
}), /* @__PURE__ */ S(
|
|
8196
|
+
}), /* @__PURE__ */ S(yp, {
|
|
8189
8197
|
allowParentReassignment: e,
|
|
8190
8198
|
autoOpenActiveItems: t,
|
|
8191
8199
|
canDrop: n,
|
|
@@ -8201,7 +8209,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8201
8209
|
onItemToggle: s,
|
|
8202
8210
|
onListReorder: c,
|
|
8203
8211
|
placeholderIndent: "var(--size)",
|
|
8204
|
-
render: (e, { depth: t, draggable: n, handleRef: a, hasChild: o, isOpen: s, onToggle: c }) => /* @__PURE__ */ S(
|
|
8212
|
+
render: (e, { depth: t, draggable: n, handleRef: a, hasChild: o, isOpen: s, onToggle: c }) => /* @__PURE__ */ S(kp, {
|
|
8205
8213
|
node: e,
|
|
8206
8214
|
columnAlignment: m,
|
|
8207
8215
|
columnWidths: h,
|
|
@@ -8219,10 +8227,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8219
8227
|
})]
|
|
8220
8228
|
})
|
|
8221
8229
|
});
|
|
8222
|
-
},
|
|
8230
|
+
}, Mp = Object.freeze({
|
|
8223
8231
|
Translations: "translations",
|
|
8224
8232
|
LanguageKey: "languageKey"
|
|
8225
|
-
}),
|
|
8233
|
+
}), Np = {
|
|
8226
8234
|
unified: "Unified",
|
|
8227
8235
|
split: "Split",
|
|
8228
8236
|
changesTooLarge: "Changes are too large to be shown",
|
|
@@ -8245,39 +8253,39 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8245
8253
|
showAll: "Show all",
|
|
8246
8254
|
unknown: "Unknown",
|
|
8247
8255
|
unexpectedError: "Unexpected error"
|
|
8248
|
-
},
|
|
8256
|
+
}, Pp = (e) => Object.keys(Np).reduce((t, n) => ({
|
|
8249
8257
|
...t,
|
|
8250
|
-
[n]: (e == null ? void 0 : e[n]) || (
|
|
8251
|
-
}), {}),
|
|
8252
|
-
[
|
|
8253
|
-
[
|
|
8254
|
-
},
|
|
8255
|
-
|
|
8256
|
-
},
|
|
8258
|
+
[n]: (e == null ? void 0 : e[n]) || (Np == null ? void 0 : Np[n])
|
|
8259
|
+
}), {}), Fp = {
|
|
8260
|
+
[Mp.Translations]: Pp(),
|
|
8261
|
+
[Mp.LanguageKey]: "en"
|
|
8262
|
+
}, Ip = (e) => e ? Fp[e] : Fp, Lp = (e, t) => {
|
|
8263
|
+
Fp[e] = t;
|
|
8264
|
+
}, Rp = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
|
|
8257
8265
|
var a;
|
|
8258
|
-
let { unitTemplate: o = null } = (a =
|
|
8259
|
-
return e[n] = r == null ?
|
|
8266
|
+
let { unitTemplate: o = null } = (a = Uf()) == null ? {} : a;
|
|
8267
|
+
return e[n] = r == null ? Mf(n, o) : r, t[n] = i, {
|
|
8260
8268
|
preferredUnits: e,
|
|
8261
8269
|
storageUnits: t
|
|
8262
8270
|
};
|
|
8263
8271
|
}, {
|
|
8264
8272
|
preferredUnits: {},
|
|
8265
8273
|
storageUnits: {}
|
|
8266
|
-
}),
|
|
8274
|
+
}), zp = ({ value: e, unitKey: t, selectedUnits: n, storageUnits: r }) => {
|
|
8267
8275
|
let i = n[t], a = r[t];
|
|
8268
8276
|
if (!(a && i !== a) || e === null || e === "") return e;
|
|
8269
|
-
let { value: o = e } =
|
|
8277
|
+
let { value: o = e } = Lf({
|
|
8270
8278
|
value: fr(e),
|
|
8271
8279
|
unitkey: t,
|
|
8272
8280
|
toUnit: i,
|
|
8273
8281
|
fromUnit: a
|
|
8274
8282
|
});
|
|
8275
8283
|
return o;
|
|
8276
|
-
},
|
|
8284
|
+
}, Bp = ({ row: e, selectedUnits: t, storageUnits: n, convertBackToStorageUnit: r, enableCosmeticRounding: i, enableDisplayRounding: a }) => ({
|
|
8277
8285
|
...e,
|
|
8278
8286
|
cells: e.cells.map((e) => {
|
|
8279
8287
|
if ("autoUnit" in e && e.autoUnit && (typeof e.value == "string" || typeof e.value == "number")) {
|
|
8280
|
-
let { unitKey: o, value: s, formatDisplayValue: c } = e, l = a && "roundDisplayValue" in e ? e.roundDisplayValue : null, u = t[o], d = n[o], f = d && u !== d, p =
|
|
8288
|
+
let { unitKey: o, value: s, formatDisplayValue: c } = e, l = a && "roundDisplayValue" in e ? e.roundDisplayValue : null, u = t[o], d = n[o], f = d && u !== d, p = zp({
|
|
8281
8289
|
value: s,
|
|
8282
8290
|
unitKey: o,
|
|
8283
8291
|
selectedUnits: t,
|
|
@@ -8291,7 +8299,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8291
8299
|
roundDisplayValue: l,
|
|
8292
8300
|
selectOnFocus: !0,
|
|
8293
8301
|
onChange: (t) => {
|
|
8294
|
-
let n = t, { value: i } = n.target, a = r ? d : u, { value: s = i } =
|
|
8302
|
+
let n = t, { value: i } = n.target, a = r ? d : u, { value: s = i } = Lf({
|
|
8295
8303
|
value: String(i),
|
|
8296
8304
|
unitkey: o,
|
|
8297
8305
|
toUnit: a,
|
|
@@ -8310,17 +8318,17 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8310
8318
|
}
|
|
8311
8319
|
return e;
|
|
8312
8320
|
})
|
|
8313
|
-
}),
|
|
8314
|
-
let { translations: i } =
|
|
8321
|
+
}), Vp = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
|
|
8322
|
+
let { translations: i } = Ip();
|
|
8315
8323
|
return e ? e.map((e) => ({
|
|
8316
8324
|
...e,
|
|
8317
8325
|
cells: e.cells.map((e) => {
|
|
8318
|
-
if (e.type ===
|
|
8326
|
+
if (e.type === Vl.AUTO_UNIT) {
|
|
8319
8327
|
var a;
|
|
8320
8328
|
let { testId: o, unitKey: s, disabled: c = !1, error: l } = e, u = n[s];
|
|
8321
8329
|
return {
|
|
8322
8330
|
value: u && t[s],
|
|
8323
|
-
type:
|
|
8331
|
+
type: Vl.SELECT,
|
|
8324
8332
|
error: !u && (i == null ? void 0 : i.unitIsMissing) || l,
|
|
8325
8333
|
disabled: c || !u,
|
|
8326
8334
|
searchable: !1,
|
|
@@ -8340,8 +8348,8 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8340
8348
|
return e;
|
|
8341
8349
|
})
|
|
8342
8350
|
})) : [];
|
|
8343
|
-
},
|
|
8344
|
-
let { headers: c, ...u } = e, { storageUnits: f, preferredUnits: p } =
|
|
8351
|
+
}, Hp = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: o, beforeRenderRow: s }) => {
|
|
8352
|
+
let { headers: c, ...u } = e, { storageUnits: f, preferredUnits: p } = Rp(t), m = jf(p), [h, g] = v(p), _ = ({ unitKey: e, value: n }) => {
|
|
8345
8353
|
g((t) => ({
|
|
8346
8354
|
...t,
|
|
8347
8355
|
[e]: n
|
|
@@ -8352,13 +8360,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8352
8360
|
newUnit: n,
|
|
8353
8361
|
unitKey: e
|
|
8354
8362
|
});
|
|
8355
|
-
}, y = l(({ row: e, rowIndex: t }) =>
|
|
8363
|
+
}, y = l(({ row: e, rowIndex: t }) => Bp({
|
|
8356
8364
|
row: s ? s({
|
|
8357
8365
|
row: e,
|
|
8358
8366
|
rowIndex: t,
|
|
8359
8367
|
selectedUnits: h,
|
|
8360
8368
|
storageUnits: f,
|
|
8361
|
-
convertValue: (e, t) =>
|
|
8369
|
+
convertValue: (e, t) => zp({
|
|
8362
8370
|
value: e,
|
|
8363
8371
|
unitKey: t,
|
|
8364
8372
|
selectedUnits: h,
|
|
@@ -8386,10 +8394,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8386
8394
|
value: n
|
|
8387
8395
|
});
|
|
8388
8396
|
});
|
|
8389
|
-
}, [t]), /* @__PURE__ */ S(
|
|
8397
|
+
}, [t]), /* @__PURE__ */ S($l, {
|
|
8390
8398
|
table: {
|
|
8391
8399
|
...u,
|
|
8392
|
-
headers:
|
|
8400
|
+
headers: Vp({
|
|
8393
8401
|
headers: e.headers,
|
|
8394
8402
|
selectedUnits: h,
|
|
8395
8403
|
storageUnits: f,
|
|
@@ -8400,8 +8408,8 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8400
8408
|
canListReorder: o,
|
|
8401
8409
|
beforeRenderRow: y
|
|
8402
8410
|
});
|
|
8403
|
-
},
|
|
8404
|
-
let { translations: d } =
|
|
8411
|
+
}, Up = { settingField: "_settingField_1x02n_1" }, Wp = ({ helpText: t, disabled: n = !1, showCustom: r = !1, children: i, userValue: a = void 0, companyValue: o = void 0, noPermission: s = !1, selectedOption: c, handleSelectChange: l, testId: u }) => {
|
|
8412
|
+
let { translations: d } = Ip(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ C(e.Fragment, { children: [t, /* @__PURE__ */ S("br", {})] }, n)), p = [
|
|
8405
8413
|
...r ? [] : [{
|
|
8406
8414
|
label: d == null ? void 0 : d.allUsers,
|
|
8407
8415
|
value: !1
|
|
@@ -8416,20 +8424,20 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8416
8424
|
}] : []
|
|
8417
8425
|
], m = a !== void 0 && o !== void 0 && !dn(a, o);
|
|
8418
8426
|
return /* @__PURE__ */ C("div", {
|
|
8419
|
-
className:
|
|
8427
|
+
className: Up.settingField,
|
|
8420
8428
|
"data-testid": u,
|
|
8421
|
-
children: [/* @__PURE__ */ C(
|
|
8429
|
+
children: [/* @__PURE__ */ C(yd, {
|
|
8422
8430
|
justifyContent: "space-between",
|
|
8423
8431
|
wrap: !1,
|
|
8424
8432
|
children: [i, !s && /* @__PURE__ */ S("div", {
|
|
8425
8433
|
style: { flexShrink: 0 },
|
|
8426
|
-
children: /* @__PURE__ */ C(
|
|
8434
|
+
children: /* @__PURE__ */ C(yd, {
|
|
8427
8435
|
gap: "8px",
|
|
8428
8436
|
alignItems: "center",
|
|
8429
8437
|
children: [m && /* @__PURE__ */ S(wa, {
|
|
8430
8438
|
text: mr(o).valid ? `${d == null ? void 0 : d.companySetting}: ${rr(o) ? hr(o) : o}` : d == null ? void 0 : d.companySettingDifferent,
|
|
8431
8439
|
icon: U.INFO
|
|
8432
|
-
}), /* @__PURE__ */ S(
|
|
8440
|
+
}), /* @__PURE__ */ S(Zc, {
|
|
8433
8441
|
small: !0,
|
|
8434
8442
|
searchable: !1,
|
|
8435
8443
|
name: "userType",
|
|
@@ -8448,7 +8456,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8448
8456
|
children: f(t)
|
|
8449
8457
|
})]
|
|
8450
8458
|
});
|
|
8451
|
-
},
|
|
8459
|
+
}, Gp = { backgroundColor: "var(--color-background-error-muted)" }, Kp = { backgroundColor: "var(--color-background-success-muted)" }, qp = { backgroundColor: "var(--color-background-warning-muted)" }, Jp = {
|
|
8452
8460
|
addedBackground: "var(--color-diff-added-background)",
|
|
8453
8461
|
addedGutterBackground: "var(--color-diff-added-gutter-background)",
|
|
8454
8462
|
codeFoldBackground: "var(--color-diff-code-fold-background)",
|
|
@@ -8467,10 +8475,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8467
8475
|
removedGutterBackground: "var(--color-diff-removed-gutter-background)",
|
|
8468
8476
|
wordAddedBackground: "var(--color-diff-word-added-background)",
|
|
8469
8477
|
wordRemovedBackground: "var(--color-diff-word-removed-background)"
|
|
8470
|
-
},
|
|
8478
|
+
}, Yp = {
|
|
8471
8479
|
variables: {
|
|
8472
|
-
light:
|
|
8473
|
-
dark:
|
|
8480
|
+
light: Jp,
|
|
8481
|
+
dark: Jp
|
|
8474
8482
|
},
|
|
8475
8483
|
diffContainer: { minWidth: "unset" },
|
|
8476
8484
|
codeFoldGutter: {
|
|
@@ -8485,10 +8493,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8485
8493
|
pre: { opacity: .5 }
|
|
8486
8494
|
} },
|
|
8487
8495
|
marker: { pre: { opacity: .4 } }
|
|
8488
|
-
},
|
|
8496
|
+
}, Xp = { codeOnly: "_codeOnly_1lph2_42" }, Zp = ({ value: e, compareValue: t, splitView: n = !1, showDiffOnly: r = !1, compareMethod: i = Di.LINES, extraLinesSurroundingDiff: a, hideSummary: o = !0, className: s }) => {
|
|
8489
8497
|
let c = t !== void 0, l = c ? t : e, u = i !== Di.WORDS;
|
|
8490
8498
|
return /* @__PURE__ */ S("div", {
|
|
8491
|
-
className: b(s, { [
|
|
8499
|
+
className: b(s, { [Xp.codeOnly]: !c && !n }),
|
|
8492
8500
|
children: /* @__PURE__ */ S(Ei, {
|
|
8493
8501
|
oldValue: l,
|
|
8494
8502
|
newValue: e,
|
|
@@ -8500,22 +8508,22 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8500
8508
|
hideLineNumbers: !1,
|
|
8501
8509
|
hideSummary: o,
|
|
8502
8510
|
disableWorker: !0,
|
|
8503
|
-
styles:
|
|
8511
|
+
styles: Yp
|
|
8504
8512
|
})
|
|
8505
8513
|
});
|
|
8506
|
-
},
|
|
8514
|
+
}, Qp = (e, t) => {
|
|
8507
8515
|
let n = e.replace(/\r\n/g, "\n").split("\n"), r = t.replace(/\r\n/g, "\n").split("\n"), i = r.length - n.length, a = n.length - r.length;
|
|
8508
8516
|
return {
|
|
8509
8517
|
added: Math.max(0, i),
|
|
8510
8518
|
removed: Math.max(0, a)
|
|
8511
8519
|
};
|
|
8512
|
-
},
|
|
8520
|
+
}, $p = "split", em = "unified", tm = ({ oldJson: e, newJson: t, viewType: n = $p }) => {
|
|
8513
8521
|
var r, i;
|
|
8514
|
-
let { translations: a } =
|
|
8515
|
-
value:
|
|
8522
|
+
let { translations: a } = Ip(), [o, s] = v(n), c = [{
|
|
8523
|
+
value: $p,
|
|
8516
8524
|
label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
|
|
8517
8525
|
}, {
|
|
8518
|
-
value:
|
|
8526
|
+
value: em,
|
|
8519
8527
|
label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
|
|
8520
8528
|
}];
|
|
8521
8529
|
d(() => {
|
|
@@ -8523,10 +8531,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8523
8531
|
}, [n]);
|
|
8524
8532
|
let l = ({ target: { value: e } }) => {
|
|
8525
8533
|
s(e);
|
|
8526
|
-
}, { added: u, removed: f } =
|
|
8534
|
+
}, { added: u, removed: f } = Qp(e, t), p = u + f > 3500;
|
|
8527
8535
|
return /* @__PURE__ */ S(x, { children: /* @__PURE__ */ S(go, {
|
|
8528
8536
|
bordered: !0,
|
|
8529
|
-
heading: /* @__PURE__ */ C(
|
|
8537
|
+
heading: /* @__PURE__ */ C(yd, {
|
|
8530
8538
|
gap: !0,
|
|
8531
8539
|
children: [/* @__PURE__ */ S(Xo, { children: /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C(Go, {
|
|
8532
8540
|
success: !0,
|
|
@@ -8538,7 +8546,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8538
8546
|
}), /* @__PURE__ */ C(Go, {
|
|
8539
8547
|
error: !0,
|
|
8540
8548
|
children: ["-", f]
|
|
8541
|
-
})] }) }), !p && /* @__PURE__ */ S(
|
|
8549
|
+
})] }) }), !p && /* @__PURE__ */ S(Yd, {
|
|
8542
8550
|
name: "viewType",
|
|
8543
8551
|
options: c,
|
|
8544
8552
|
value: o,
|
|
@@ -8553,21 +8561,21 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8553
8561
|
muted: !0,
|
|
8554
8562
|
children: a == null ? void 0 : a.changesTooLarge
|
|
8555
8563
|
})
|
|
8556
|
-
}) : /* @__PURE__ */ S(
|
|
8564
|
+
}) : /* @__PURE__ */ S(Zp, {
|
|
8557
8565
|
value: t,
|
|
8558
8566
|
compareValue: e,
|
|
8559
|
-
splitView: o ===
|
|
8567
|
+
splitView: o === $p,
|
|
8560
8568
|
compareMethod: Di.WORDS,
|
|
8561
8569
|
showDiffOnly: !0,
|
|
8562
8570
|
hideSummary: !1
|
|
8563
8571
|
})
|
|
8564
8572
|
}) });
|
|
8565
|
-
},
|
|
8573
|
+
}, nm = (e) => typeof e == "object" && e && "value" in e ? e.value : e, rm = (e) => {
|
|
8566
8574
|
var t;
|
|
8567
8575
|
if (e.id != null) return String(e.id);
|
|
8568
|
-
let n =
|
|
8576
|
+
let n = nm((t = e.cells) == null || (t = t[0]) == null ? void 0 : t.value);
|
|
8569
8577
|
return n == null ? "" : String(n);
|
|
8570
|
-
},
|
|
8578
|
+
}, im = (e, t) => ({
|
|
8571
8579
|
...e,
|
|
8572
8580
|
cells: e.cells.map((e) => ({
|
|
8573
8581
|
...e,
|
|
@@ -8576,7 +8584,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8576
8584
|
...t
|
|
8577
8585
|
}
|
|
8578
8586
|
}))
|
|
8579
|
-
}),
|
|
8587
|
+
}), am = (e, t) => ({
|
|
8580
8588
|
...e,
|
|
8581
8589
|
cells: e.cells.map((e, n) => {
|
|
8582
8590
|
var r;
|
|
@@ -8585,17 +8593,17 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8585
8593
|
...e,
|
|
8586
8594
|
style: {
|
|
8587
8595
|
...e.style,
|
|
8588
|
-
...
|
|
8596
|
+
...qp
|
|
8589
8597
|
},
|
|
8590
8598
|
tooltip: typeof a == "number" ? String(a) : a
|
|
8591
8599
|
};
|
|
8592
8600
|
})
|
|
8593
|
-
}),
|
|
8601
|
+
}), om = (e = [], t = []) => {
|
|
8594
8602
|
let n = /* @__PURE__ */ new Map();
|
|
8595
|
-
for (let e of t) n.set(
|
|
8596
|
-
let r = new Set(e.map(
|
|
8603
|
+
for (let e of t) n.set(rm(e), e);
|
|
8604
|
+
let r = new Set(e.map(rm)), i = /* @__PURE__ */ new Map(), a = [], o = null;
|
|
8597
8605
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
8598
|
-
let n = t[e], c =
|
|
8606
|
+
let n = t[e], c = rm(n);
|
|
8599
8607
|
if (r.has(c)) {
|
|
8600
8608
|
o = c;
|
|
8601
8609
|
continue;
|
|
@@ -8610,7 +8618,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8610
8618
|
a.reverse();
|
|
8611
8619
|
let c = [];
|
|
8612
8620
|
for (let t of e) {
|
|
8613
|
-
let e =
|
|
8621
|
+
let e = rm(t), r = i.get(e);
|
|
8614
8622
|
if (r) for (let e of r) c.push({
|
|
8615
8623
|
status: "deleted",
|
|
8616
8624
|
row: e
|
|
@@ -8630,17 +8638,17 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8630
8638
|
row: e
|
|
8631
8639
|
});
|
|
8632
8640
|
return c;
|
|
8633
|
-
},
|
|
8634
|
-
let i = h(() =>
|
|
8641
|
+
}, sm = (e) => e.status === "deleted" ? im(e.row, Gp) : e.status === "added" ? im(e.row, Kp) : am(e.row, e.compareRow), cm = ({ table: e, compareRows: t, beforeRenderRow: n, ...r }) => {
|
|
8642
|
+
let i = h(() => om(e.rows, t), [e.rows, t]), a = !!e.infiniteScroll, o = h(() => {
|
|
8635
8643
|
if (!a) return i.map((e) => e.row);
|
|
8636
8644
|
}, [a, i]), s = l(({ row: e, rowIndex: t }) => {
|
|
8637
|
-
let r = i[t], a = r ?
|
|
8645
|
+
let r = i[t], a = r ? sm(r) : e;
|
|
8638
8646
|
return n ? n({
|
|
8639
8647
|
row: a,
|
|
8640
8648
|
rowIndex: t
|
|
8641
8649
|
}) : a;
|
|
8642
8650
|
}, [i, n]);
|
|
8643
|
-
return /* @__PURE__ */ S(
|
|
8651
|
+
return /* @__PURE__ */ S($l, {
|
|
8644
8652
|
...r,
|
|
8645
8653
|
beforeRenderRow: s,
|
|
8646
8654
|
table: {
|
|
@@ -8653,7 +8661,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8653
8661
|
};
|
|
8654
8662
|
//#endregion
|
|
8655
8663
|
//#region src/helpers/date.ts
|
|
8656
|
-
function
|
|
8664
|
+
function lm({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
8657
8665
|
return e ? new Date(e).toLocaleString(a, {
|
|
8658
8666
|
year: "numeric",
|
|
8659
8667
|
month: "short",
|
|
@@ -8667,28 +8675,28 @@ function cm({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
8667
8675
|
}
|
|
8668
8676
|
//#endregion
|
|
8669
8677
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
8670
|
-
function
|
|
8678
|
+
function um(e) {
|
|
8671
8679
|
var t;
|
|
8672
8680
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
8673
8681
|
if (!n) throw Error("Invalid RegExp");
|
|
8674
8682
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
8675
8683
|
}
|
|
8676
|
-
function
|
|
8684
|
+
function dm(e) {
|
|
8677
8685
|
if (typeof e != "object") return e;
|
|
8678
8686
|
if (e === null) return null;
|
|
8679
|
-
if (Array.isArray(e)) return e.map(
|
|
8687
|
+
if (Array.isArray(e)) return e.map(dm);
|
|
8680
8688
|
if (e instanceof Date) return new Date(e.getTime());
|
|
8681
|
-
if (e instanceof RegExp) return
|
|
8689
|
+
if (e instanceof RegExp) return um(e);
|
|
8682
8690
|
let t = {};
|
|
8683
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
8691
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = dm(e[n]));
|
|
8684
8692
|
return t;
|
|
8685
8693
|
}
|
|
8686
8694
|
//#endregion
|
|
8687
8695
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
8688
|
-
function
|
|
8696
|
+
function fm(e, t) {
|
|
8689
8697
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
8690
8698
|
}
|
|
8691
|
-
var
|
|
8699
|
+
var pm = (e) => e[e.length - 1], mm = class {
|
|
8692
8700
|
setResult(e) {
|
|
8693
8701
|
return this.result = e, this.hasResult = !0, this;
|
|
8694
8702
|
}
|
|
@@ -8696,16 +8704,16 @@ var fm = (e) => e[e.length - 1], pm = class {
|
|
|
8696
8704
|
return this.exiting = !0, this;
|
|
8697
8705
|
}
|
|
8698
8706
|
push(e, t) {
|
|
8699
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
8707
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (fm(this.children), pm(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
8700
8708
|
}
|
|
8701
|
-
},
|
|
8709
|
+
}, hm = class extends mm {
|
|
8702
8710
|
constructor(e, t) {
|
|
8703
8711
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
8704
8712
|
}
|
|
8705
8713
|
prepareDeltaResult(e) {
|
|
8706
8714
|
var t, n, r, i;
|
|
8707
8715
|
if (typeof e == "object" && ((t = this.options) != null && t.omitRemovedValues && Array.isArray(e) && e.length > 1 && (e.length === 2 || e[2] === 0 || e[2] === 3) && (e[0] = 0), (n = this.options) != null && n.cloneDiffValues)) {
|
|
8708
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
8716
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : dm;
|
|
8709
8717
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
8710
8718
|
}
|
|
8711
8719
|
return e;
|
|
@@ -8713,15 +8721,15 @@ var fm = (e) => e[e.length - 1], pm = class {
|
|
|
8713
8721
|
setResult(e) {
|
|
8714
8722
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
8715
8723
|
}
|
|
8716
|
-
},
|
|
8724
|
+
}, gm = class extends mm {
|
|
8717
8725
|
constructor(e, t) {
|
|
8718
8726
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
8719
8727
|
}
|
|
8720
|
-
},
|
|
8728
|
+
}, _m = class extends mm {
|
|
8721
8729
|
constructor(e) {
|
|
8722
8730
|
super(), this.delta = e, this.pipe = "reverse";
|
|
8723
8731
|
}
|
|
8724
|
-
},
|
|
8732
|
+
}, vm = class {
|
|
8725
8733
|
constructor(e) {
|
|
8726
8734
|
this.name = e, this.filters = [];
|
|
8727
8735
|
}
|
|
@@ -8785,7 +8793,7 @@ var fm = (e) => e[e.length - 1], pm = class {
|
|
|
8785
8793
|
}
|
|
8786
8794
|
}), this);
|
|
8787
8795
|
}
|
|
8788
|
-
},
|
|
8796
|
+
}, ym = class {
|
|
8789
8797
|
constructor(e) {
|
|
8790
8798
|
this.selfOptions = e || {}, this.pipes = {};
|
|
8791
8799
|
}
|
|
@@ -8812,7 +8820,7 @@ var fm = (e) => e[e.length - 1], pm = class {
|
|
|
8812
8820
|
for (; r;) n.nextAfterChildren !== void 0 && (n.next = n.nextAfterChildren, n.nextAfterChildren = null), typeof r == "string" && (r = this.pipe(r)), r.process(n), i = r, r = null, n && n.next && (n = n.next, r = n.pipe || i);
|
|
8813
8821
|
return n.hasResult ? n.result : void 0;
|
|
8814
8822
|
}
|
|
8815
|
-
},
|
|
8823
|
+
}, bm = (e, t, n, r) => e[n] === t[r], xm = (e, t, n, r) => {
|
|
8816
8824
|
var i, a, o;
|
|
8817
8825
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
8818
8826
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -8828,7 +8836,7 @@ var fm = (e) => e[e.length - 1], pm = class {
|
|
|
8828
8836
|
for (u = 1; u < c + 1; u++) n(e, t, l - 1, u - 1, r) ? s[u] = ((i = f[u - 1]) == null ? 0 : i) + 1 : s[u] = Math.max((a = f[u]) == null ? 0 : a, (o = s[u - 1]) == null ? 0 : o);
|
|
8829
8837
|
}
|
|
8830
8838
|
return d;
|
|
8831
|
-
},
|
|
8839
|
+
}, Sm = (e, t, n, r) => {
|
|
8832
8840
|
let i = t.length, a = n.length, o = {
|
|
8833
8841
|
sequence: [],
|
|
8834
8842
|
indices1: [],
|
|
@@ -8850,11 +8858,11 @@ var fm = (e) => e[e.length - 1], pm = class {
|
|
|
8850
8858
|
}
|
|
8851
8859
|
}
|
|
8852
8860
|
return o;
|
|
8853
|
-
},
|
|
8861
|
+
}, Cm = { get: (e, t, n, r) => {
|
|
8854
8862
|
let i = r || {};
|
|
8855
|
-
return xm(
|
|
8856
|
-
} },
|
|
8857
|
-
function
|
|
8863
|
+
return Sm(xm(e, t, n || bm, i), e, t, i);
|
|
8864
|
+
} }, wm = 3;
|
|
8865
|
+
function Tm(e, t, n, r) {
|
|
8858
8866
|
for (let i = 0; i < n; i++) {
|
|
8859
8867
|
let n = e[i];
|
|
8860
8868
|
for (let e = 0; e < r; e++) {
|
|
@@ -8864,7 +8872,7 @@ function wm(e, t, n, r) {
|
|
|
8864
8872
|
}
|
|
8865
8873
|
return !1;
|
|
8866
8874
|
}
|
|
8867
|
-
function
|
|
8875
|
+
function Em(e, t, n, r, i) {
|
|
8868
8876
|
let a = e[n], o = t[r];
|
|
8869
8877
|
if (a === o) return !0;
|
|
8870
8878
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -8877,15 +8885,15 @@ function Tm(e, t, n, r, i) {
|
|
|
8877
8885
|
let l = i.hashCache2[r];
|
|
8878
8886
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l !== void 0 && c === l;
|
|
8879
8887
|
}
|
|
8880
|
-
var
|
|
8888
|
+
var Dm = function(e) {
|
|
8881
8889
|
var t, n, r, i, a;
|
|
8882
8890
|
if (!e.leftIsArray) return;
|
|
8883
8891
|
let o = {
|
|
8884
8892
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
8885
8893
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
8886
8894
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
8887
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !
|
|
8888
|
-
for (; c + s < m && c + s < h &&
|
|
8895
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !Tm(f, p, m, h)); s < m && s < h && Em(f, p, s, s, o);) l = s, g = new hm(f[l], p[l]), e.push(g, l), s++;
|
|
8896
|
+
for (; c + s < m && c + s < h && Em(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new hm(f[u], p[d]), e.push(g, d), c++;
|
|
8889
8897
|
let _;
|
|
8890
8898
|
if (s + c === m) {
|
|
8891
8899
|
if (m === h) {
|
|
@@ -8909,7 +8917,7 @@ var Em = function(e) {
|
|
|
8909
8917
|
return;
|
|
8910
8918
|
}
|
|
8911
8919
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
8912
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
8920
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = Cm.get(v, y, Em, o), x = [];
|
|
8913
8921
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
8914
8922
|
let t = `_${l}`;
|
|
8915
8923
|
_[t] = [
|
|
@@ -8930,8 +8938,8 @@ var Em = function(e) {
|
|
|
8930
8938
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
8931
8939
|
u = x[n];
|
|
8932
8940
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
8933
|
-
if (u !== void 0 && r &&
|
|
8934
|
-
r.splice(1, 2, l,
|
|
8941
|
+
if (u !== void 0 && r && Em(v, y, u - s, l - s, o)) {
|
|
8942
|
+
r.splice(1, 2, l, wm), r.splice(1, 2, l, wm), C || (r[0] = ""), d = l, g = new hm(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
8935
8943
|
break;
|
|
8936
8944
|
}
|
|
8937
8945
|
}
|
|
@@ -8939,20 +8947,20 @@ var Em = function(e) {
|
|
|
8939
8947
|
} else {
|
|
8940
8948
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
8941
8949
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
8942
|
-
d = b.indices2[t] + s, g = new
|
|
8950
|
+
d = b.indices2[t] + s, g = new hm(f[u], p[d]), e.push(g, d);
|
|
8943
8951
|
}
|
|
8944
8952
|
}
|
|
8945
8953
|
e.setResult(_).exit();
|
|
8946
8954
|
};
|
|
8947
|
-
|
|
8948
|
-
var
|
|
8955
|
+
Dm.filterName = "arrays";
|
|
8956
|
+
var Om = {
|
|
8949
8957
|
numerically(e, t) {
|
|
8950
8958
|
return e - t;
|
|
8951
8959
|
},
|
|
8952
8960
|
numericallyBy(e) {
|
|
8953
8961
|
return (t, n) => t[e] - n[e];
|
|
8954
8962
|
}
|
|
8955
|
-
},
|
|
8963
|
+
}, km = function(e) {
|
|
8956
8964
|
var t;
|
|
8957
8965
|
if (!e.nested) return;
|
|
8958
8966
|
let n = e.delta;
|
|
@@ -8961,7 +8969,7 @@ var Dm = {
|
|
|
8961
8969
|
for (r in a) if (r !== "_t") {
|
|
8962
8970
|
if (r[0] === "_") {
|
|
8963
8971
|
let e = r;
|
|
8964
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
8972
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === wm)) s.push(Number.parseInt(r.slice(1), 10));
|
|
8965
8973
|
else throw Error(`only removal or move can be applied at original array indices, invalid diff type: ${(t = a[e]) == null ? void 0 : t[2]}`);
|
|
8966
8974
|
} else {
|
|
8967
8975
|
let e = r;
|
|
@@ -8974,15 +8982,15 @@ var Dm = {
|
|
|
8974
8982
|
});
|
|
8975
8983
|
}
|
|
8976
8984
|
}
|
|
8977
|
-
for (s = s.sort(
|
|
8985
|
+
for (s = s.sort(Om.numerically), r = s.length - 1; r >= 0; r--) {
|
|
8978
8986
|
if (i = s[r], i === void 0) continue;
|
|
8979
8987
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
8980
|
-
(e == null ? void 0 : e[2]) ===
|
|
8988
|
+
(e == null ? void 0 : e[2]) === wm && c.push({
|
|
8981
8989
|
index: e[1],
|
|
8982
8990
|
value: t
|
|
8983
8991
|
});
|
|
8984
8992
|
}
|
|
8985
|
-
c = c.sort(
|
|
8993
|
+
c = c.sort(Om.numericallyBy("index"));
|
|
8986
8994
|
let u = c.length;
|
|
8987
8995
|
for (r = 0; r < u; r++) {
|
|
8988
8996
|
let e = c[r];
|
|
@@ -8992,7 +9000,7 @@ var Dm = {
|
|
|
8992
9000
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
8993
9001
|
let t = l[r];
|
|
8994
9002
|
if (t === void 0) continue;
|
|
8995
|
-
let n = new
|
|
9003
|
+
let n = new gm(o[t.index], t.delta);
|
|
8996
9004
|
e.push(n, t.index);
|
|
8997
9005
|
}
|
|
8998
9006
|
if (!e.children) {
|
|
@@ -9001,8 +9009,8 @@ var Dm = {
|
|
|
9001
9009
|
}
|
|
9002
9010
|
e.exit();
|
|
9003
9011
|
};
|
|
9004
|
-
|
|
9005
|
-
var
|
|
9012
|
+
km.filterName = "arrays";
|
|
9013
|
+
var Am = function(e) {
|
|
9006
9014
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
9007
9015
|
let t = e.left, n = e.children.length;
|
|
9008
9016
|
for (let r = 0; r < n; r++) {
|
|
@@ -9013,16 +9021,16 @@ var km = function(e) {
|
|
|
9013
9021
|
}
|
|
9014
9022
|
e.setResult(t).exit();
|
|
9015
9023
|
};
|
|
9016
|
-
|
|
9017
|
-
var
|
|
9024
|
+
Am.filterName = "arraysCollectChildren";
|
|
9025
|
+
var jm = function(e) {
|
|
9018
9026
|
if (!e.nested) {
|
|
9019
9027
|
let t = e.delta;
|
|
9020
|
-
if (t[2] ===
|
|
9028
|
+
if (t[2] === wm) {
|
|
9021
9029
|
let n = t;
|
|
9022
9030
|
e.newName = `_${n[1]}`, e.setResult([
|
|
9023
9031
|
n[0],
|
|
9024
9032
|
Number.parseInt(e.childName.substring(1), 10),
|
|
9025
|
-
|
|
9033
|
+
wm
|
|
9026
9034
|
]).exit();
|
|
9027
9035
|
}
|
|
9028
9036
|
return;
|
|
@@ -9032,20 +9040,20 @@ var Am = function(e) {
|
|
|
9032
9040
|
let n = t;
|
|
9033
9041
|
for (let t in n) {
|
|
9034
9042
|
if (t === "_t") continue;
|
|
9035
|
-
let r = new
|
|
9043
|
+
let r = new _m(n[t]);
|
|
9036
9044
|
e.push(r, t);
|
|
9037
9045
|
}
|
|
9038
9046
|
e.exit();
|
|
9039
9047
|
};
|
|
9040
|
-
|
|
9041
|
-
var
|
|
9048
|
+
jm.filterName = "arrays";
|
|
9049
|
+
var Mm = (e, t, n) => {
|
|
9042
9050
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
9043
9051
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
9044
9052
|
let r = +t;
|
|
9045
9053
|
for (let n in e) {
|
|
9046
9054
|
let i = e[n];
|
|
9047
9055
|
if (Array.isArray(i)) {
|
|
9048
|
-
if (i[2] ===
|
|
9056
|
+
if (i[2] === wm) {
|
|
9049
9057
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
9050
9058
|
if (a === +t) return e;
|
|
9051
9059
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
@@ -9053,7 +9061,7 @@ var jm = (e, t, n) => {
|
|
|
9053
9061
|
}
|
|
9054
9062
|
}
|
|
9055
9063
|
return r;
|
|
9056
|
-
},
|
|
9064
|
+
}, Nm = (e) => {
|
|
9057
9065
|
if (!e || !e.children) return;
|
|
9058
9066
|
let t = e.delta;
|
|
9059
9067
|
if (t._t !== "a") return;
|
|
@@ -9064,22 +9072,22 @@ var jm = (e, t, n) => {
|
|
|
9064
9072
|
let a = r.newName;
|
|
9065
9073
|
if (a === void 0) {
|
|
9066
9074
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
9067
|
-
a =
|
|
9075
|
+
a = Mm(n, r.childName, r.result);
|
|
9068
9076
|
}
|
|
9069
9077
|
i[a] !== r.result && (i[a] = r.result);
|
|
9070
9078
|
}
|
|
9071
9079
|
e.setResult(i).exit();
|
|
9072
9080
|
};
|
|
9073
|
-
|
|
9081
|
+
Nm.filterName = "arraysCollectChildren";
|
|
9074
9082
|
//#endregion
|
|
9075
9083
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
9076
|
-
var
|
|
9084
|
+
var Pm = function(e) {
|
|
9077
9085
|
e.left instanceof Date ? (e.right instanceof Date && e.left.getTime() === e.right.getTime() ? e.setResult(void 0) : e.setResult([e.left, e.right]), e.exit()) : e.right instanceof Date && e.setResult([e.left, e.right]).exit();
|
|
9078
9086
|
};
|
|
9079
|
-
|
|
9087
|
+
Pm.filterName = "dates";
|
|
9080
9088
|
//#endregion
|
|
9081
9089
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
9082
|
-
var
|
|
9090
|
+
var Fm = /* @__PURE__ */ new Set(["__proto__"]), Im = (e) => {
|
|
9083
9091
|
if (!e || !e.children) return;
|
|
9084
9092
|
let t = e.children.length, n = e.result;
|
|
9085
9093
|
for (let r = 0; r < t; r++) {
|
|
@@ -9091,18 +9099,18 @@ var Pm = /* @__PURE__ */ new Set(["__proto__"]), Fm = (e) => {
|
|
|
9091
9099
|
}
|
|
9092
9100
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
9093
9101
|
};
|
|
9094
|
-
|
|
9095
|
-
var
|
|
9102
|
+
Im.filterName = "collectChildren";
|
|
9103
|
+
var Lm = (e) => {
|
|
9096
9104
|
var t;
|
|
9097
9105
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
9098
9106
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
9099
9107
|
for (let t in n) {
|
|
9100
9108
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
9101
|
-
let a = new
|
|
9109
|
+
let a = new hm(n[t], r[t]);
|
|
9102
9110
|
e.push(a, t);
|
|
9103
9111
|
}
|
|
9104
9112
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
9105
|
-
let n = new
|
|
9113
|
+
let n = new hm(void 0, r[t]);
|
|
9106
9114
|
e.push(n, t);
|
|
9107
9115
|
}
|
|
9108
9116
|
if (!e.children || e.children.length === 0) {
|
|
@@ -9111,15 +9119,15 @@ var Im = (e) => {
|
|
|
9111
9119
|
}
|
|
9112
9120
|
e.exit();
|
|
9113
9121
|
};
|
|
9114
|
-
|
|
9115
|
-
var
|
|
9122
|
+
Lm.filterName = "objects";
|
|
9123
|
+
var Rm = function(e) {
|
|
9116
9124
|
if (!e.nested) return;
|
|
9117
9125
|
let t = e.delta;
|
|
9118
9126
|
if (t._t) return;
|
|
9119
9127
|
let n = t, r = !1;
|
|
9120
9128
|
for (let t in n) {
|
|
9121
|
-
if (
|
|
9122
|
-
let i = e.left, a = new
|
|
9129
|
+
if (Fm.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
9130
|
+
let i = e.left, a = new gm(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
9123
9131
|
e.push(a, t), r = !0;
|
|
9124
9132
|
}
|
|
9125
9133
|
if (!r) {
|
|
@@ -9128,8 +9136,8 @@ var Lm = function(e) {
|
|
|
9128
9136
|
}
|
|
9129
9137
|
e.exit();
|
|
9130
9138
|
};
|
|
9131
|
-
|
|
9132
|
-
var
|
|
9139
|
+
Rm.filterName = "objects";
|
|
9140
|
+
var zm = function(e) {
|
|
9133
9141
|
if (!e || !e.children || e.delta._t) return;
|
|
9134
9142
|
if (e.left === null || typeof e.left != "object") {
|
|
9135
9143
|
e.setResult(e.left).exit();
|
|
@@ -9140,17 +9148,17 @@ var Rm = function(e) {
|
|
|
9140
9148
|
let n = e.children[r];
|
|
9141
9149
|
if (n === void 0) continue;
|
|
9142
9150
|
let i = n.childName;
|
|
9143
|
-
|
|
9151
|
+
Fm.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
9144
9152
|
}
|
|
9145
9153
|
e.setResult(t).exit();
|
|
9146
9154
|
};
|
|
9147
|
-
|
|
9148
|
-
var
|
|
9155
|
+
zm.filterName = "collectChildren";
|
|
9156
|
+
var Bm = function(e) {
|
|
9149
9157
|
if (!e.nested || e.delta._t) return;
|
|
9150
9158
|
let t = e.delta, n = !1;
|
|
9151
9159
|
for (let r in t) {
|
|
9152
|
-
if (
|
|
9153
|
-
let i = new
|
|
9160
|
+
if (Fm.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
9161
|
+
let i = new _m(t[r]);
|
|
9154
9162
|
e.push(i, r), n = !0;
|
|
9155
9163
|
}
|
|
9156
9164
|
if (!n) {
|
|
@@ -9159,25 +9167,25 @@ var zm = function(e) {
|
|
|
9159
9167
|
}
|
|
9160
9168
|
e.exit();
|
|
9161
9169
|
};
|
|
9162
|
-
|
|
9163
|
-
var
|
|
9170
|
+
Bm.filterName = "objects";
|
|
9171
|
+
var Vm = (e) => {
|
|
9164
9172
|
if (!e || !e.children || e.delta._t) return;
|
|
9165
9173
|
let t = e.children.length, n = {};
|
|
9166
9174
|
for (let r = 0; r < t; r++) {
|
|
9167
9175
|
let t = e.children[r];
|
|
9168
9176
|
if (t === void 0) continue;
|
|
9169
9177
|
let i = t.childName;
|
|
9170
|
-
|
|
9178
|
+
Fm.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
9171
9179
|
}
|
|
9172
9180
|
e.setResult(n).exit();
|
|
9173
9181
|
};
|
|
9174
|
-
|
|
9182
|
+
Vm.filterName = "collectChildren";
|
|
9175
9183
|
//#endregion
|
|
9176
9184
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
9177
|
-
var
|
|
9178
|
-
function
|
|
9185
|
+
var Hm = 2, Um = 60, Wm = null;
|
|
9186
|
+
function Gm(e, t) {
|
|
9179
9187
|
var n;
|
|
9180
|
-
if (!
|
|
9188
|
+
if (!Wm) {
|
|
9181
9189
|
let r;
|
|
9182
9190
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
9183
9191
|
else {
|
|
@@ -9185,7 +9193,7 @@ function Wm(e, t) {
|
|
|
9185
9193
|
let e = /* @__PURE__ */ Error("The diff-match-patch library was not provided. Pass the library in through the options or use the `jsondiffpatch/with-text-diffs` entry-point.");
|
|
9186
9194
|
throw e.diff_match_patch_not_found = !0, e;
|
|
9187
9195
|
}
|
|
9188
|
-
|
|
9196
|
+
Wm = {
|
|
9189
9197
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
9190
9198
|
patch: (e, t) => {
|
|
9191
9199
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -9197,17 +9205,17 @@ function Wm(e, t) {
|
|
|
9197
9205
|
}
|
|
9198
9206
|
};
|
|
9199
9207
|
}
|
|
9200
|
-
return
|
|
9208
|
+
return Wm;
|
|
9201
9209
|
}
|
|
9202
|
-
var
|
|
9210
|
+
var Km = function(e) {
|
|
9203
9211
|
var t, n;
|
|
9204
9212
|
if (e.leftType !== "string") return;
|
|
9205
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
9213
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || Um;
|
|
9206
9214
|
if (r.length < a || i.length < a) {
|
|
9207
9215
|
e.setResult([r, i]).exit();
|
|
9208
9216
|
return;
|
|
9209
9217
|
}
|
|
9210
|
-
let o =
|
|
9218
|
+
let o = Gm(e.options);
|
|
9211
9219
|
if (!o) {
|
|
9212
9220
|
e.setResult([r, i]).exit();
|
|
9213
9221
|
return;
|
|
@@ -9216,19 +9224,19 @@ var Gm = function(e) {
|
|
|
9216
9224
|
e.setResult([
|
|
9217
9225
|
s(r, i),
|
|
9218
9226
|
0,
|
|
9219
|
-
|
|
9227
|
+
Hm
|
|
9220
9228
|
]).exit();
|
|
9221
9229
|
};
|
|
9222
|
-
|
|
9223
|
-
var
|
|
9230
|
+
Km.filterName = "texts";
|
|
9231
|
+
var qm = function(e) {
|
|
9224
9232
|
if (e.nested) return;
|
|
9225
9233
|
let t = e.delta;
|
|
9226
|
-
if (t[2] !==
|
|
9227
|
-
let n = t, r =
|
|
9234
|
+
if (t[2] !== Hm) return;
|
|
9235
|
+
let n = t, r = Gm(e.options, !0).patch;
|
|
9228
9236
|
e.setResult(r(e.left, n[0])).exit();
|
|
9229
9237
|
};
|
|
9230
|
-
|
|
9231
|
-
var
|
|
9238
|
+
qm.filterName = "texts";
|
|
9239
|
+
var Jm = (e) => {
|
|
9232
9240
|
var t, n, r;
|
|
9233
9241
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
9234
9242
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -9249,21 +9257,21 @@ var qm = (e) => {
|
|
|
9249
9257
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
9250
9258
|
}
|
|
9251
9259
|
return a.join("\n");
|
|
9252
|
-
},
|
|
9260
|
+
}, Ym = function(e) {
|
|
9253
9261
|
if (e.nested) return;
|
|
9254
9262
|
let t = e.delta;
|
|
9255
|
-
if (t[2] !==
|
|
9263
|
+
if (t[2] !== Hm) return;
|
|
9256
9264
|
let n = t;
|
|
9257
9265
|
e.setResult([
|
|
9258
|
-
|
|
9266
|
+
Jm(n[0]),
|
|
9259
9267
|
0,
|
|
9260
|
-
|
|
9268
|
+
Hm
|
|
9261
9269
|
]).exit();
|
|
9262
9270
|
};
|
|
9263
|
-
|
|
9271
|
+
Ym.filterName = "texts";
|
|
9264
9272
|
//#endregion
|
|
9265
9273
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
9266
|
-
var
|
|
9274
|
+
var Xm = function(e) {
|
|
9267
9275
|
if (e.left === e.right) {
|
|
9268
9276
|
e.setResult(void 0).exit();
|
|
9269
9277
|
return;
|
|
@@ -9296,8 +9304,8 @@ var Ym = function(e) {
|
|
|
9296
9304
|
}
|
|
9297
9305
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
9298
9306
|
};
|
|
9299
|
-
|
|
9300
|
-
var
|
|
9307
|
+
Xm.filterName = "trivial";
|
|
9308
|
+
var Zm = function(e) {
|
|
9301
9309
|
if (e.delta === void 0) {
|
|
9302
9310
|
e.setResult(e.left).exit();
|
|
9303
9311
|
return;
|
|
@@ -9321,8 +9329,8 @@ var Xm = function(e) {
|
|
|
9321
9329
|
}
|
|
9322
9330
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
9323
9331
|
};
|
|
9324
|
-
|
|
9325
|
-
var
|
|
9332
|
+
Zm.filterName = "trivial";
|
|
9333
|
+
var Qm = function(e) {
|
|
9326
9334
|
if (e.delta === void 0) {
|
|
9327
9335
|
e.setResult(e.delta).exit();
|
|
9328
9336
|
return;
|
|
@@ -9343,36 +9351,36 @@ var Zm = function(e) {
|
|
|
9343
9351
|
}
|
|
9344
9352
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
9345
9353
|
};
|
|
9346
|
-
|
|
9354
|
+
Qm.filterName = "trivial";
|
|
9347
9355
|
//#endregion
|
|
9348
9356
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
9349
|
-
var
|
|
9357
|
+
var $m = class {
|
|
9350
9358
|
constructor(e) {
|
|
9351
|
-
this.processor = new
|
|
9359
|
+
this.processor = new ym(e), this.processor.pipe(new vm("diff").append(Im, Xm, Pm, Km, Lm, Dm).shouldHaveResult()), this.processor.pipe(new vm("patch").append(zm, Am, Zm, qm, Rm, km).shouldHaveResult()), this.processor.pipe(new vm("reverse").append(Vm, Nm, Qm, Ym, Bm, jm).shouldHaveResult());
|
|
9352
9360
|
}
|
|
9353
9361
|
options(e) {
|
|
9354
9362
|
return this.processor.options(e);
|
|
9355
9363
|
}
|
|
9356
9364
|
diff(e, t) {
|
|
9357
|
-
return this.processor.process(new
|
|
9365
|
+
return this.processor.process(new hm(e, t));
|
|
9358
9366
|
}
|
|
9359
9367
|
patch(e, t) {
|
|
9360
|
-
return this.processor.process(new
|
|
9368
|
+
return this.processor.process(new gm(e, t));
|
|
9361
9369
|
}
|
|
9362
9370
|
reverse(e) {
|
|
9363
|
-
return this.processor.process(new
|
|
9371
|
+
return this.processor.process(new _m(e));
|
|
9364
9372
|
}
|
|
9365
9373
|
unpatch(e, t) {
|
|
9366
9374
|
return this.patch(e, this.reverse(t));
|
|
9367
9375
|
}
|
|
9368
9376
|
clone(e) {
|
|
9369
|
-
return
|
|
9377
|
+
return dm(e);
|
|
9370
9378
|
}
|
|
9371
9379
|
};
|
|
9372
9380
|
//#endregion
|
|
9373
9381
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
9374
|
-
function
|
|
9375
|
-
return new
|
|
9382
|
+
function eh(e) {
|
|
9383
|
+
return new $m(e);
|
|
9376
9384
|
}
|
|
9377
9385
|
//#endregion
|
|
9378
9386
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -9934,46 +9942,46 @@ $.Diff = function(e, t) {
|
|
|
9934
9942
|
};
|
|
9935
9943
|
//#endregion
|
|
9936
9944
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
9937
|
-
var
|
|
9945
|
+
var th = (e = {}) => eh({
|
|
9938
9946
|
...e,
|
|
9939
9947
|
textDiff: {
|
|
9940
9948
|
diffMatchPatch: $,
|
|
9941
9949
|
minLength: 120
|
|
9942
9950
|
},
|
|
9943
9951
|
cloneDiffValues: !0
|
|
9944
|
-
}),
|
|
9952
|
+
}), nh = ["user", "unittemplate"], rh = th(), ih = (e, t, n) => {
|
|
9945
9953
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
9946
9954
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
9947
9955
|
let n = r[t[e]];
|
|
9948
9956
|
if (n) return n;
|
|
9949
9957
|
}
|
|
9950
9958
|
return n || "";
|
|
9951
|
-
},
|
|
9959
|
+
}, ah = (e) => {
|
|
9952
9960
|
let t = (e) => rr(e) ? hr(e) : String(e);
|
|
9953
9961
|
return Array.isArray(e) ? e.length === 0 ? "" : e.some((e) => e && typeof e == "object") ? "Multiple changes..." : e.map(t).join(", ") : e && typeof e == "object" ? Object.keys(e).length === 0 ? "" : "Multiple changes..." : t(e);
|
|
9954
|
-
},
|
|
9962
|
+
}, oh = (e) => {
|
|
9955
9963
|
switch (e.length) {
|
|
9956
9964
|
case 1: {
|
|
9957
9965
|
let [t] = e;
|
|
9958
9966
|
return {
|
|
9959
9967
|
type: "created",
|
|
9960
9968
|
before: "",
|
|
9961
|
-
after:
|
|
9969
|
+
after: ah(t)
|
|
9962
9970
|
};
|
|
9963
9971
|
}
|
|
9964
9972
|
case 2: {
|
|
9965
9973
|
let [t, n] = e;
|
|
9966
9974
|
return {
|
|
9967
9975
|
type: "modified",
|
|
9968
|
-
before:
|
|
9969
|
-
after:
|
|
9976
|
+
before: ah(t),
|
|
9977
|
+
after: ah(n)
|
|
9970
9978
|
};
|
|
9971
9979
|
}
|
|
9972
9980
|
case 3: {
|
|
9973
9981
|
let [t] = e;
|
|
9974
9982
|
return {
|
|
9975
9983
|
type: "deleted",
|
|
9976
|
-
before:
|
|
9984
|
+
before: ah(t),
|
|
9977
9985
|
after: ""
|
|
9978
9986
|
};
|
|
9979
9987
|
}
|
|
@@ -9983,15 +9991,15 @@ var eh = (e = {}) => $m({
|
|
|
9983
9991
|
after: ""
|
|
9984
9992
|
};
|
|
9985
9993
|
}
|
|
9986
|
-
},
|
|
9987
|
-
let r =
|
|
9994
|
+
}, sh = (e) => Array.isArray(e), ch = (e, t) => t ? sh(t) ? t.length === 0 ? e : t.reduce((e, t) => rh.unpatch(nn(e), nn(t)), nn(e)) : rh.unpatch(nn(e), nn(t)) : e, lh = (e) => e.createdAt || e.date, uh = (e, t, n) => {
|
|
9995
|
+
let r = lh(e);
|
|
9988
9996
|
if (!r) return {
|
|
9989
9997
|
oldJson: "",
|
|
9990
9998
|
newJson: "",
|
|
9991
9999
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
9992
10000
|
};
|
|
9993
10001
|
let i = t.filter((e) => {
|
|
9994
|
-
let t =
|
|
10002
|
+
let t = lh(e);
|
|
9995
10003
|
return !!(e.diffs && t && t >= r);
|
|
9996
10004
|
}), a = Array.from({ length: i.length + 1 });
|
|
9997
10005
|
a[0] = nn(n);
|
|
@@ -10004,7 +10012,7 @@ var eh = (e = {}) => $m({
|
|
|
10004
10012
|
a[e + 1] = a[e];
|
|
10005
10013
|
continue;
|
|
10006
10014
|
}
|
|
10007
|
-
a[e + 1] =
|
|
10015
|
+
a[e + 1] = ch(a[e], t);
|
|
10008
10016
|
}
|
|
10009
10017
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
10010
10018
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -10019,10 +10027,10 @@ var eh = (e = {}) => $m({
|
|
|
10019
10027
|
oldJson: o,
|
|
10020
10028
|
newJson: s
|
|
10021
10029
|
};
|
|
10022
|
-
},
|
|
10030
|
+
}, dh = (e, t, n = {}, r = []) => {
|
|
10023
10031
|
var i;
|
|
10024
10032
|
if (!e) return;
|
|
10025
|
-
let a = [...
|
|
10033
|
+
let a = [...nh, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
10026
10034
|
Object.keys(e).forEach((i) => {
|
|
10027
10035
|
var o;
|
|
10028
10036
|
let s = e[i];
|
|
@@ -10035,12 +10043,12 @@ var eh = (e = {}) => $m({
|
|
|
10035
10043
|
cn(s) ? t.push({
|
|
10036
10044
|
deltaFormat: [...s],
|
|
10037
10045
|
path: c
|
|
10038
|
-
}) : gn(s) &&
|
|
10046
|
+
}) : gn(s) && dh(s, t, n, c);
|
|
10039
10047
|
});
|
|
10040
|
-
},
|
|
10048
|
+
}, fh = (e, t = {}) => {
|
|
10041
10049
|
let n = [];
|
|
10042
|
-
return e ? (
|
|
10043
|
-
},
|
|
10050
|
+
return e ? (dh(e, n, t), n) : [];
|
|
10051
|
+
}, ph = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), mh = (e) => {
|
|
10044
10052
|
if (e == null || e === "") return "empty";
|
|
10045
10053
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
10046
10054
|
if (typeof e == "string") return e;
|
|
@@ -10051,35 +10059,35 @@ var eh = (e = {}) => $m({
|
|
|
10051
10059
|
} catch {
|
|
10052
10060
|
return String(e);
|
|
10053
10061
|
}
|
|
10054
|
-
},
|
|
10062
|
+
}, hh = (e, t = e.length - 1) => {
|
|
10055
10063
|
if (t >= e.length) return "Value";
|
|
10056
10064
|
let n = e[t];
|
|
10057
|
-
return !n || er(n) ?
|
|
10058
|
-
},
|
|
10059
|
-
let o =
|
|
10065
|
+
return !n || er(n) ? hh(e, t - 1) : ph(n);
|
|
10066
|
+
}, gh = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
10067
|
+
let o = mh(r), s = mh(i), c = a ? ` in ${a}` : "";
|
|
10060
10068
|
switch (t) {
|
|
10061
10069
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
10062
10070
|
case "created": return `${e} created ${s}${c}.`;
|
|
10063
10071
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
10064
10072
|
default: return `${e} changed ${n}${c}.`;
|
|
10065
10073
|
}
|
|
10066
|
-
},
|
|
10074
|
+
}, _h = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
|
|
10067
10075
|
let i = {
|
|
10068
10076
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
10069
10077
|
rows: n.map((n) => {
|
|
10070
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
10071
|
-
return { cells: [{ value:
|
|
10078
|
+
let { deltaFormat: i, path: a } = n, o = ih(e, a, r), { type: s, before: c, after: l } = oh(i);
|
|
10079
|
+
return { cells: [{ value: gh({
|
|
10072
10080
|
userName: t,
|
|
10073
10081
|
type: s,
|
|
10074
|
-
property:
|
|
10082
|
+
property: hh(a),
|
|
10075
10083
|
before: c,
|
|
10076
10084
|
after: l,
|
|
10077
10085
|
sectionName: o
|
|
10078
10086
|
}) }] };
|
|
10079
10087
|
})
|
|
10080
10088
|
};
|
|
10081
|
-
return /* @__PURE__ */ S(
|
|
10082
|
-
},
|
|
10089
|
+
return /* @__PURE__ */ S($l, { table: i });
|
|
10090
|
+
}, vh = Object.freeze({
|
|
10083
10091
|
summary: {
|
|
10084
10092
|
label: "Summary",
|
|
10085
10093
|
value: "summary"
|
|
@@ -10088,13 +10096,13 @@ var eh = (e = {}) => $m({
|
|
|
10088
10096
|
label: "Compare",
|
|
10089
10097
|
value: "compare"
|
|
10090
10098
|
}
|
|
10091
|
-
}),
|
|
10092
|
-
let c = [
|
|
10099
|
+
}), yh = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
10100
|
+
let c = [vh.summary, vh.compare].map(({ label: e, value: t }) => ({
|
|
10093
10101
|
label: e,
|
|
10094
10102
|
value: t
|
|
10095
10103
|
})), [l, u] = v(c[0]), { diffs: d = void 0 } = e || {};
|
|
10096
10104
|
if (!d) return null;
|
|
10097
|
-
let { oldJson: f, newJson: p, error: m } =
|
|
10105
|
+
let { oldJson: f, newJson: p, error: m } = uh(e, t, n);
|
|
10098
10106
|
return /* @__PURE__ */ S(xs, {
|
|
10099
10107
|
visible: r,
|
|
10100
10108
|
centered: !0,
|
|
@@ -10102,20 +10110,20 @@ var eh = (e = {}) => $m({
|
|
|
10102
10110
|
children: /* @__PURE__ */ S($o, { dialog: {
|
|
10103
10111
|
scroll: !0,
|
|
10104
10112
|
heading: "Comparison view",
|
|
10105
|
-
content: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(
|
|
10113
|
+
content: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(tp, {
|
|
10106
10114
|
name: "ViewTab",
|
|
10107
10115
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
10108
10116
|
options: c,
|
|
10109
10117
|
value: l
|
|
10110
|
-
}), l.value === "summary" ? /* @__PURE__ */ S(
|
|
10118
|
+
}), l.value === "summary" ? /* @__PURE__ */ S(_h, {
|
|
10111
10119
|
userName: e.userName,
|
|
10112
10120
|
sectionNames: a,
|
|
10113
|
-
diffs:
|
|
10121
|
+
diffs: fh(d, i),
|
|
10114
10122
|
defaultSectionName: o
|
|
10115
10123
|
}) : m ? /* @__PURE__ */ S("div", {
|
|
10116
10124
|
style: { padding: 16 },
|
|
10117
10125
|
children: m
|
|
10118
|
-
}) : /* @__PURE__ */ S(
|
|
10126
|
+
}) : /* @__PURE__ */ S(tm, {
|
|
10119
10127
|
oldJson: f,
|
|
10120
10128
|
newJson: p
|
|
10121
10129
|
})] }),
|
|
@@ -10128,7 +10136,7 @@ var eh = (e = {}) => $m({
|
|
|
10128
10136
|
height: "90vh"
|
|
10129
10137
|
} })
|
|
10130
10138
|
});
|
|
10131
|
-
},
|
|
10139
|
+
}, bh = [
|
|
10132
10140
|
{
|
|
10133
10141
|
label: "10 / page",
|
|
10134
10142
|
value: 10
|
|
@@ -10141,15 +10149,15 @@ var eh = (e = {}) => $m({
|
|
|
10141
10149
|
label: "50 / page",
|
|
10142
10150
|
value: 50
|
|
10143
10151
|
}
|
|
10144
|
-
],
|
|
10145
|
-
let { diffs: r, userName: i, source: a, operation: o, operationMetaData: s } = e, c =
|
|
10152
|
+
], xh = (e, t, n = {}) => {
|
|
10153
|
+
let { diffs: r, userName: i, source: a, operation: o, operationMetaData: s } = e, c = fh(r, n).length, l = c ? `${c} change${c === 1 ? "" : "s"}` : "no field changes";
|
|
10146
10154
|
if (a === "API" && !i) return o === "Created" ? "Created through API" : "Changed through API";
|
|
10147
10155
|
switch (o) {
|
|
10148
10156
|
case "Created": return "Created";
|
|
10149
10157
|
case "Cloned": return `Cloned (from design ID ${s})`;
|
|
10150
10158
|
case "Reverted": {
|
|
10151
|
-
let e = t.find((e) => e.id === s), n = e ?
|
|
10152
|
-
date:
|
|
10159
|
+
let e = t.find((e) => e.id === s), n = e ? lm({
|
|
10160
|
+
date: lh(e),
|
|
10153
10161
|
showTime: !0
|
|
10154
10162
|
}) : null;
|
|
10155
10163
|
return `Reverted${n ? ` (to ${n})` : ""}`;
|
|
@@ -10159,7 +10167,7 @@ var eh = (e = {}) => $m({
|
|
|
10159
10167
|
case "Updated": return `Updated (${l})`;
|
|
10160
10168
|
default: return "Updated";
|
|
10161
10169
|
}
|
|
10162
|
-
},
|
|
10170
|
+
}, Sh = ({ logs: e, data: t, total: n, loading: r, selectedPage: i, rowsPerPage: a, sectionNames: o, defaultSectionName: s, filterToggles: c = [], transformDiffsConfig: l, onChangeRowsPerPage: u, onSelectPage: d, onClickSnapshot: f, snapshotLoading: p, getActions: m, isLogDisabled: h, onClickNavigateToDesgin: g }) => {
|
|
10163
10171
|
let [_, y] = v(!1), [b, w] = v(null), T = (e) => {
|
|
10164
10172
|
if (e.snapshot) {
|
|
10165
10173
|
f == null || f(e.snapshot, e);
|
|
@@ -10178,7 +10186,7 @@ var eh = (e = {}) => $m({
|
|
|
10178
10186
|
return {
|
|
10179
10187
|
cells: [
|
|
10180
10188
|
{
|
|
10181
|
-
value: t.snapshot ? `Snapshot: ${t.snapshot}` :
|
|
10189
|
+
value: t.snapshot ? `Snapshot: ${t.snapshot}` : xh(t, e, l),
|
|
10182
10190
|
type: "Link",
|
|
10183
10191
|
disabled: a,
|
|
10184
10192
|
onClick: a ? void 0 : r && g ? () => g(t.operationMetaData) : () => T(t),
|
|
@@ -10197,8 +10205,8 @@ var eh = (e = {}) => $m({
|
|
|
10197
10205
|
type: "Static"
|
|
10198
10206
|
},
|
|
10199
10207
|
{
|
|
10200
|
-
value:
|
|
10201
|
-
date:
|
|
10208
|
+
value: lm({
|
|
10209
|
+
date: lh(t),
|
|
10202
10210
|
showTime: !0
|
|
10203
10211
|
}),
|
|
10204
10212
|
type: "Static"
|
|
@@ -10208,12 +10216,12 @@ var eh = (e = {}) => $m({
|
|
|
10208
10216
|
};
|
|
10209
10217
|
});
|
|
10210
10218
|
return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(go, {
|
|
10211
|
-
heading: /* @__PURE__ */ C(
|
|
10219
|
+
heading: /* @__PURE__ */ C(yd, {
|
|
10212
10220
|
gap: !0,
|
|
10213
10221
|
wrap: !0,
|
|
10214
10222
|
children: [/* @__PURE__ */ S(Xo, { children: "Changes" }), c.map((e) => {
|
|
10215
10223
|
var t;
|
|
10216
|
-
return /* @__PURE__ */ S(
|
|
10224
|
+
return /* @__PURE__ */ S(Zu, {
|
|
10217
10225
|
small: (t = e.small) == null || t,
|
|
10218
10226
|
checked: e.checked,
|
|
10219
10227
|
onChange: e.onChange,
|
|
@@ -10223,11 +10231,11 @@ var eh = (e = {}) => $m({
|
|
|
10223
10231
|
})]
|
|
10224
10232
|
}),
|
|
10225
10233
|
padding: !1,
|
|
10226
|
-
children: r ? /* @__PURE__ */ S(
|
|
10234
|
+
children: r ? /* @__PURE__ */ S(Id, {
|
|
10227
10235
|
height: "100px",
|
|
10228
10236
|
theme: Pi.WHITE,
|
|
10229
10237
|
children: /* @__PURE__ */ S(Ma, { dark: !0 })
|
|
10230
|
-
}) : /* @__PURE__ */ S(
|
|
10238
|
+
}) : /* @__PURE__ */ S($l, { table: {
|
|
10231
10239
|
headers: E,
|
|
10232
10240
|
testId: "auditlog-table",
|
|
10233
10241
|
rows: D,
|
|
@@ -10241,14 +10249,14 @@ var eh = (e = {}) => $m({
|
|
|
10241
10249
|
onChange: (e) => {
|
|
10242
10250
|
u(Number(e.target.value));
|
|
10243
10251
|
},
|
|
10244
|
-
options:
|
|
10252
|
+
options: bh,
|
|
10245
10253
|
value: a
|
|
10246
10254
|
},
|
|
10247
10255
|
onSelectPage: (e) => d(e),
|
|
10248
10256
|
small: !0
|
|
10249
10257
|
} }
|
|
10250
10258
|
} })
|
|
10251
|
-
}), _ && b && b.diffs && /* @__PURE__ */ S(
|
|
10259
|
+
}), _ && b && b.diffs && /* @__PURE__ */ S(yh, {
|
|
10252
10260
|
sectionNames: o,
|
|
10253
10261
|
isOpen: _,
|
|
10254
10262
|
onClose: () => y(!1),
|
|
@@ -10258,7 +10266,7 @@ var eh = (e = {}) => $m({
|
|
|
10258
10266
|
data: t,
|
|
10259
10267
|
transformDiffsConfig: l
|
|
10260
10268
|
})] });
|
|
10261
|
-
},
|
|
10269
|
+
}, Ch = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
10262
10270
|
let i = window.location.href, a = _(i);
|
|
10263
10271
|
return d(() => {
|
|
10264
10272
|
a.current = i;
|
|
@@ -10281,20 +10289,20 @@ var eh = (e = {}) => $m({
|
|
|
10281
10289
|
});
|
|
10282
10290
|
};
|
|
10283
10291
|
}, [e, t]), null;
|
|
10284
|
-
},
|
|
10292
|
+
}, wh = {
|
|
10285
10293
|
errorBoundary: "_errorBoundary_hmco0_1",
|
|
10286
10294
|
sidebarErrorBoundary: "_sidebarErrorBoundary_hmco0_5",
|
|
10287
10295
|
rightSidebarErrorBoundary: "_rightSidebarErrorBoundary_hmco0_6"
|
|
10288
|
-
},
|
|
10289
|
-
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } =
|
|
10296
|
+
}, Th = ({ options: e }) => {
|
|
10297
|
+
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } = Ip();
|
|
10290
10298
|
if (t) return /* @__PURE__ */ S(t, {});
|
|
10291
10299
|
if (n || r) return /* @__PURE__ */ S("div", {
|
|
10292
|
-
className: b(n ?
|
|
10300
|
+
className: b(n ? wh.sidebarErrorBoundary : "", r ? wh.rightSidebarErrorBoundary : ""),
|
|
10293
10301
|
style: a,
|
|
10294
10302
|
children: o == null ? void 0 : o.unexpectedError
|
|
10295
10303
|
});
|
|
10296
10304
|
let s = /* @__PURE__ */ S("div", {
|
|
10297
|
-
className:
|
|
10305
|
+
className: wh.errorBoundary,
|
|
10298
10306
|
style: a,
|
|
10299
10307
|
children: /* @__PURE__ */ S(Vs, { message: {
|
|
10300
10308
|
icon: !0,
|
|
@@ -10304,24 +10312,24 @@ var eh = (e = {}) => $m({
|
|
|
10304
10312
|
width: "100%"
|
|
10305
10313
|
} })
|
|
10306
10314
|
});
|
|
10307
|
-
return i ? /* @__PURE__ */ S(
|
|
10315
|
+
return i ? /* @__PURE__ */ S(Gd, {
|
|
10308
10316
|
scroll: !1,
|
|
10309
10317
|
padding: 0,
|
|
10310
10318
|
children: s
|
|
10311
10319
|
}) : s;
|
|
10312
|
-
},
|
|
10313
|
-
fallback: /* @__PURE__ */ S(
|
|
10320
|
+
}, Eh = ({ children: e, options: t }) => /* @__PURE__ */ S(Oi.ErrorBoundary, {
|
|
10321
|
+
fallback: /* @__PURE__ */ S(Th, { options: t }),
|
|
10314
10322
|
onError: (e, t) => {
|
|
10315
10323
|
console.error("Error caught by boundary:", e, t);
|
|
10316
10324
|
},
|
|
10317
10325
|
children: e
|
|
10318
|
-
}),
|
|
10326
|
+
}), Dh = (e, t = {}) => (n) => /* @__PURE__ */ S(Eh, {
|
|
10319
10327
|
options: t,
|
|
10320
10328
|
children: /* @__PURE__ */ S(e, { ...n })
|
|
10321
|
-
}),
|
|
10322
|
-
|
|
10323
|
-
e ===
|
|
10329
|
+
}), Oh = (e = {}) => (t) => Dh(t, e), kh = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, Ah = (e) => {
|
|
10330
|
+
Lp(Mp.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
10331
|
+
e === Mp.Translations ? Lp(e, Pp(t)) : Lp(e, kh(t) ? t : { ...t });
|
|
10324
10332
|
});
|
|
10325
10333
|
};
|
|
10326
10334
|
//#endregion
|
|
10327
|
-
export { $i as Accordion, ka as AccordionWithDefaultToggle, so as Actions, ji as Align,
|
|
10335
|
+
export { $i as Accordion, ka as AccordionWithDefaultToggle, so as Actions, ji as Align, Sh as AuditLog, Qa as Badge, fo as Breadcrumb, lo as BreadcrumbLinkType, q as Button, mo as ButtonGroup, Mi as ButtonPosition, Na as ButtonType, go as Card, Ta as CheckBox, qi as Chevron, Xi as Collapse, Ai as Color, Lo as ColorInput, Io as ColorInputPopover, Ho as Column, $o as Dialog, Zp as DiffCode, cm as DiffTable, tm as DiffViewer, W as DisabledContext, qo as Divider, os as Drawer, cp as ElementType, uu as Empty, Eh as ErrorBoundary, vd as Field, md as FileButton, gs as FileInput, yd as Flex, xd as FormRow, So as Grid, H as GroupOrder, Xo as Heading, wa as HelpIcon, G as Icon, U as IconType, ds as Input, ls as InputGroup, rl as InputGroupAddon, ps as InputReaderMethods, Fi as InputType, gd as Label, Pd as List, Cd as ListHeading, kd as ListSubheading, Id as Loader, yf as Mention, ao as Menu, Ha as MenuCarat, Va as MenuType, Vs as Message, Fs as MessageType, xs as Modal, qs as NativeSelect, vl as NumberInput, Ud as OptionDropdown, Gd as Page, il as Pagination, mp as PopConfirm, vo as Popover, Kd as Portal, Jd as PrintHeader, ws as ProgressBar, Yd as RadioButton, vf as RichTextInput, xf as Row, Zc as Select, Wp as SettingField, Ef as SideBar, Of as Skeleton, Ol as Slider, ks as SmartUploadModal, _s as Spacer, Ma as Spinner, $l as Table, pd as TableImportExport, tp as Tabs, Go as Text, ip as TextArea, np as TextLink, Ni as TextTransform, Pi as Theme, Gr as Toaster, Zu as Toggle, K as Tooltip, dp as TopBar, yp as Tree, jp as TreeTable, ki as TriggerType, Jf as UnitInput, Qf as UnitSlider, Hp as UnitTable, Ch as UsageTracker, Ju as dismissToast, Gf as initializeContext, Ah as initializeGuiLibrary, ms as readFile, qu as toast, Js as useFocus, vs as useKeyboardEvent, Zs as useWindowWidth, Oh as withChainableErrorBoundary, Dh as withErrorBoundary };
|