@oliasoft-open-source/react-ui-library 6.7.0-beta-1 → 6.7.0-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/components/slider/slider.d.ts +2 -1
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/slider/slider.stories.d.ts +1 -0
- package/dist/components/slider/slider.stories.d.ts.map +1 -1
- package/dist/components/slider/use-coalesced-slider-change.d.ts +13 -0
- package/dist/components/slider/use-coalesced-slider-change.d.ts.map +1 -0
- package/dist/index.js +676 -644
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3461,27 +3461,59 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3461
3461
|
button: "_button_1vgw8_18",
|
|
3462
3462
|
label: "_label_1vgw8_21",
|
|
3463
3463
|
dot: "_dot_1vgw8_32"
|
|
3464
|
-
}, Qs =
|
|
3464
|
+
}, Qs = ({ enabled: e, value: t, onChange: n }) => {
|
|
3465
|
+
let [r, i] = m(t), a = p(t), o = p(t), s = p(null);
|
|
3466
|
+
c(() => {
|
|
3467
|
+
e && (a.current = t, o.current = t, i(t));
|
|
3468
|
+
}, [e, t]), c(() => () => {
|
|
3469
|
+
s.current !== null && cancelAnimationFrame(s.current);
|
|
3470
|
+
}, []);
|
|
3471
|
+
let l = (e) => {
|
|
3472
|
+
o.current = e, n(e);
|
|
3473
|
+
}, u = () => {
|
|
3474
|
+
let e = a.current;
|
|
3475
|
+
i(e), er(e, o.current) || l(e);
|
|
3476
|
+
};
|
|
3477
|
+
return {
|
|
3478
|
+
value: e ? r : t,
|
|
3479
|
+
onChangeValue: (t) => {
|
|
3480
|
+
if (!e) {
|
|
3481
|
+
n(t);
|
|
3482
|
+
return;
|
|
3483
|
+
}
|
|
3484
|
+
a.current = t, s.current === null && (s.current = requestAnimationFrame(() => {
|
|
3485
|
+
s.current = null, u();
|
|
3486
|
+
}));
|
|
3487
|
+
},
|
|
3488
|
+
flushValue: (t) => {
|
|
3489
|
+
e && (a.current = t, s.current !== null && (cancelAnimationFrame(s.current), s.current = null), u());
|
|
3490
|
+
}
|
|
3491
|
+
};
|
|
3492
|
+
}, $s = $n((e) => e.reduce((e, { label: t, tooltip: n, value: r }) => (e[r] = /* @__PURE__ */ v(W, {
|
|
3465
3493
|
text: /* @__PURE__ */ y(_, { children: [
|
|
3466
3494
|
n,
|
|
3467
3495
|
n ? ": " : "",
|
|
3468
3496
|
t == null ? r : t
|
|
3469
3497
|
] }),
|
|
3470
3498
|
children: /* @__PURE__ */ v("div", { className: Zs.dot })
|
|
3471
|
-
}), e), {}), er),
|
|
3499
|
+
}), e), {}), er), ec = ({ name: e, label: t, width: n = "100%", labelWidth: r = "auto", value: i, min: a, max: o, step: c = 1, marks: l = [], showArrows: u = !1, showTooltip: d = !1, tooltipFormatter: f = (e) => e, disabled: p = !1, range: m = !1, small: h = !1, vertical: _ = {
|
|
3472
3500
|
enabled: !1,
|
|
3473
3501
|
width: "100px",
|
|
3474
3502
|
height: "400px"
|
|
3475
|
-
}, onChange: b, onChangeComplete: x }) => {
|
|
3476
|
-
let
|
|
3503
|
+
}, onChange: b, onChangeComplete: x, coalesceOnChange: S = !1 }) => {
|
|
3504
|
+
let C = s(H), w = $s(l), T = (n) => ({ target: {
|
|
3477
3505
|
name: e == null ? "" : e,
|
|
3478
3506
|
value: n,
|
|
3479
3507
|
label: typeof t == "string" ? t : String(t)
|
|
3480
|
-
} }),
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3508
|
+
} }), E = Qs({
|
|
3509
|
+
enabled: S,
|
|
3510
|
+
value: i,
|
|
3511
|
+
onChange: (e) => {
|
|
3512
|
+
b(T(e));
|
|
3513
|
+
}
|
|
3514
|
+
}), D = (e) => {
|
|
3515
|
+
E.flushValue(e), x == null || x(T(e));
|
|
3516
|
+
}, O = () => /* @__PURE__ */ v("div", {
|
|
3485
3517
|
className: Zs.button,
|
|
3486
3518
|
children: /* @__PURE__ */ v(K, {
|
|
3487
3519
|
basic: !0,
|
|
@@ -3489,12 +3521,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3489
3521
|
round: !0,
|
|
3490
3522
|
onClick: () => {
|
|
3491
3523
|
let e = m ? [a, i == null ? void 0 : i[1]] : a;
|
|
3492
|
-
|
|
3524
|
+
E.onChangeValue(e), D(e);
|
|
3493
3525
|
},
|
|
3494
|
-
disabled: p || i === a ||
|
|
3526
|
+
disabled: p || i === a || C,
|
|
3495
3527
|
icon: V.FAST_BACKWARD
|
|
3496
3528
|
})
|
|
3497
|
-
}),
|
|
3529
|
+
}), k = () => /* @__PURE__ */ v("div", {
|
|
3498
3530
|
className: Zs.button,
|
|
3499
3531
|
children: /* @__PURE__ */ v(K, {
|
|
3500
3532
|
basic: !0,
|
|
@@ -3502,9 +3534,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3502
3534
|
round: !0,
|
|
3503
3535
|
onClick: () => {
|
|
3504
3536
|
let e = m ? [i == null ? void 0 : i[0], o] : o;
|
|
3505
|
-
|
|
3537
|
+
E.onChangeValue(e), D(e);
|
|
3506
3538
|
},
|
|
3507
|
-
disabled: p || i === o ||
|
|
3539
|
+
disabled: p || i === o || C,
|
|
3508
3540
|
icon: V.FAST_FORWARD
|
|
3509
3541
|
})
|
|
3510
3542
|
});
|
|
@@ -3515,19 +3547,19 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3515
3547
|
height: _.height
|
|
3516
3548
|
} : { width: n },
|
|
3517
3549
|
children: [
|
|
3518
|
-
u && (_.enabled ? /* @__PURE__ */ v(
|
|
3550
|
+
u && (_.enabled ? /* @__PURE__ */ v(k, {}) : /* @__PURE__ */ v(O, {})),
|
|
3519
3551
|
/* @__PURE__ */ v(Qn, {
|
|
3520
3552
|
range: m,
|
|
3521
3553
|
allowCross: !1,
|
|
3522
|
-
className: g((p ||
|
|
3523
|
-
value:
|
|
3554
|
+
className: g((p || C) && Zs.rcSliderDisabled, u && Zs.hasArrows),
|
|
3555
|
+
value: E.value,
|
|
3524
3556
|
max: o,
|
|
3525
3557
|
min: a,
|
|
3526
3558
|
step: c,
|
|
3527
|
-
marks:
|
|
3528
|
-
onChange: (e) =>
|
|
3529
|
-
onChangeComplete: (e) =>
|
|
3530
|
-
disabled: p ||
|
|
3559
|
+
marks: w,
|
|
3560
|
+
onChange: (e) => E.onChangeValue(e),
|
|
3561
|
+
onChangeComplete: (e) => D(e),
|
|
3562
|
+
disabled: p || C,
|
|
3531
3563
|
vertical: _.enabled,
|
|
3532
3564
|
handleRender: (e, t) => /* @__PURE__ */ y("div", {
|
|
3533
3565
|
style: { position: "relative" },
|
|
@@ -3542,7 +3574,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3542
3574
|
})]
|
|
3543
3575
|
})
|
|
3544
3576
|
}),
|
|
3545
|
-
u && (_.enabled ? /* @__PURE__ */ v(
|
|
3577
|
+
u && (_.enabled ? /* @__PURE__ */ v(O, {}) : /* @__PURE__ */ v(k, {})),
|
|
3546
3578
|
t && /* @__PURE__ */ v("label", {
|
|
3547
3579
|
className: Zs.label,
|
|
3548
3580
|
style: { width: r },
|
|
@@ -3550,9 +3582,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3550
3582
|
})
|
|
3551
3583
|
]
|
|
3552
3584
|
});
|
|
3553
|
-
},
|
|
3585
|
+
}, tc = ({ cell: e }) => /* @__PURE__ */ v("div", {
|
|
3554
3586
|
className: X.inputWrapper,
|
|
3555
|
-
children: /* @__PURE__ */ v(
|
|
3587
|
+
children: /* @__PURE__ */ v(ec, {
|
|
3556
3588
|
label: e.label,
|
|
3557
3589
|
value: e.value,
|
|
3558
3590
|
min: e.min,
|
|
@@ -3565,7 +3597,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3565
3597
|
tooltipFormatter: e.tooltipFormatter,
|
|
3566
3598
|
disabled: e.disabled
|
|
3567
3599
|
})
|
|
3568
|
-
}),
|
|
3600
|
+
}), nc = ({ cell: e }) => {
|
|
3569
3601
|
let { tooltip: t, icon: n } = e;
|
|
3570
3602
|
return /* @__PURE__ */ v("div", {
|
|
3571
3603
|
className: X.iconCellWrapper,
|
|
@@ -3577,7 +3609,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3577
3609
|
children: /* @__PURE__ */ v(U, { icon: n })
|
|
3578
3610
|
})
|
|
3579
3611
|
});
|
|
3580
|
-
},
|
|
3612
|
+
}, rc = ({ cell: e }) => /* @__PURE__ */ v(Ji, { actions: e.actions }), ic = ({ cell: e }) => {
|
|
3581
3613
|
let { helpIcon: t } = e;
|
|
3582
3614
|
return t ? /* @__PURE__ */ v("div", {
|
|
3583
3615
|
className: X.icon,
|
|
@@ -3586,7 +3618,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3586
3618
|
text: t.tooltip
|
|
3587
3619
|
})
|
|
3588
3620
|
}) : null;
|
|
3589
|
-
},
|
|
3621
|
+
}, ac = ({ cell: e }) => {
|
|
3590
3622
|
let { libraryIcon: t } = e;
|
|
3591
3623
|
return t ? /* @__PURE__ */ v("div", {
|
|
3592
3624
|
className: X.icon,
|
|
@@ -3596,7 +3628,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3596
3628
|
icon: V.LIBRARY
|
|
3597
3629
|
})
|
|
3598
3630
|
}) : null;
|
|
3599
|
-
},
|
|
3631
|
+
}, oc = ({ cell: e }) => {
|
|
3600
3632
|
let { hasSort: t, sort: n, sortPriority: r } = e;
|
|
3601
3633
|
return t ? /* @__PURE__ */ y("span", {
|
|
3602
3634
|
className: X.sortingCellIcon,
|
|
@@ -3611,7 +3643,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3611
3643
|
children: /* @__PURE__ */ v(U, { icon: V.SORT_DESCENDING })
|
|
3612
3644
|
}), r && n ? /* @__PURE__ */ v("sup", { children: r }) : null]
|
|
3613
3645
|
}) : null;
|
|
3614
|
-
},
|
|
3646
|
+
}, sc = ({ cell: e, isHeader: t, testId: n }) => {
|
|
3615
3647
|
let { error: r, warning: i, tooltip: a, maxTooltipWidth: o, hasSort: s, onSort: c, type: l } = e, u = /* @__PURE__ */ y("div", {
|
|
3616
3648
|
className: g(X.staticCellContent, l === "Unit" ? X.unit : ""),
|
|
3617
3649
|
onClick: s ? (e) => c && c(e) : () => {},
|
|
@@ -3619,9 +3651,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3619
3651
|
"data-warning": i || null,
|
|
3620
3652
|
"data-testid": n,
|
|
3621
3653
|
children: [e.value, t ? /* @__PURE__ */ y(_, { children: [
|
|
3622
|
-
/* @__PURE__ */ v(rc, { cell: e }),
|
|
3623
3654
|
/* @__PURE__ */ v(ic, { cell: e }),
|
|
3624
|
-
/* @__PURE__ */ v(ac, { cell: e })
|
|
3655
|
+
/* @__PURE__ */ v(ac, { cell: e }),
|
|
3656
|
+
/* @__PURE__ */ v(oc, { cell: e })
|
|
3625
3657
|
] }) : null]
|
|
3626
3658
|
});
|
|
3627
3659
|
return /* @__PURE__ */ v("div", {
|
|
@@ -3636,7 +3668,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3636
3668
|
children: u
|
|
3637
3669
|
})
|
|
3638
3670
|
});
|
|
3639
|
-
},
|
|
3671
|
+
}, cc = ({ cell: e, testId: t }) => {
|
|
3640
3672
|
let { content: n, fullWidth: r, closeOnOutsideClick: i, disabled: a } = e;
|
|
3641
3673
|
return /* @__PURE__ */ v(aa, {
|
|
3642
3674
|
content: n,
|
|
@@ -3645,13 +3677,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3645
3677
|
disabled: a,
|
|
3646
3678
|
children: /* @__PURE__ */ v("div", {
|
|
3647
3679
|
className: X.popover,
|
|
3648
|
-
children: /* @__PURE__ */ v(
|
|
3680
|
+
children: /* @__PURE__ */ v(sc, {
|
|
3649
3681
|
cell: e,
|
|
3650
3682
|
testId: t
|
|
3651
3683
|
})
|
|
3652
3684
|
})
|
|
3653
3685
|
});
|
|
3654
|
-
},
|
|
3686
|
+
}, lc = {
|
|
3655
3687
|
wrapper: "_wrapper_1u1qo_1",
|
|
3656
3688
|
inline: "_inline_1u1qo_1",
|
|
3657
3689
|
radio: "_radio_1u1qo_5",
|
|
@@ -3662,10 +3694,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3662
3694
|
disabled: "_disabled_1u1qo_98",
|
|
3663
3695
|
isInTable: "_isInTable_1u1qo_114",
|
|
3664
3696
|
helpIconEnabled: "_helpIconEnabled_1u1qo_119"
|
|
3665
|
-
},
|
|
3697
|
+
}, uc = ({ name: e, label: t, value: n, selected: r, disabled: i = !1, small: a = !1, onChange: o, noMargin: s = !1, testId: c, helpText: l, onClickHelp: u, textTransform: d = Dr.CAPITALIZE }) => {
|
|
3666
3698
|
let f = l || u;
|
|
3667
3699
|
return /* @__PURE__ */ y("div", {
|
|
3668
|
-
className: g(
|
|
3700
|
+
className: g(lc.radio, i ? lc.disabled : null, a ? lc.small : null, s ? lc.noMargin : null, t ? null : lc.noLabel),
|
|
3669
3701
|
onClick: o,
|
|
3670
3702
|
"data-testid": c,
|
|
3671
3703
|
children: [
|
|
@@ -3683,13 +3715,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3683
3715
|
children: t
|
|
3684
3716
|
}),
|
|
3685
3717
|
f && /* @__PURE__ */ v("div", {
|
|
3686
|
-
className:
|
|
3718
|
+
className: lc.helpIconEnabled,
|
|
3687
3719
|
onClick: u,
|
|
3688
3720
|
children: /* @__PURE__ */ v(si, { text: l })
|
|
3689
3721
|
})
|
|
3690
3722
|
]
|
|
3691
3723
|
});
|
|
3692
|
-
},
|
|
3724
|
+
}, dc = ({ cell: e, testId: t }) => /* @__PURE__ */ v(uc, {
|
|
3693
3725
|
selected: e.selected,
|
|
3694
3726
|
name: e.name,
|
|
3695
3727
|
value: e.value,
|
|
@@ -3697,7 +3729,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3697
3729
|
disabled: e.disabled,
|
|
3698
3730
|
onChange: (t) => e.onChange(t),
|
|
3699
3731
|
testId: t
|
|
3700
|
-
}),
|
|
3732
|
+
}), fc = ({ cell: e, isHeader: t, columnAlignment: n, testId: r }) => {
|
|
3701
3733
|
if (!e) return null;
|
|
3702
3734
|
switch (e.type) {
|
|
3703
3735
|
case "Input":
|
|
@@ -3716,23 +3748,23 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3716
3748
|
cell: e,
|
|
3717
3749
|
testId: r
|
|
3718
3750
|
});
|
|
3719
|
-
case "Radio": return /* @__PURE__ */ v(
|
|
3751
|
+
case "Radio": return /* @__PURE__ */ v(dc, {
|
|
3720
3752
|
cell: e,
|
|
3721
3753
|
testId: r
|
|
3722
3754
|
});
|
|
3723
|
-
case "Slider": return /* @__PURE__ */ v(
|
|
3724
|
-
case "Icon": return /* @__PURE__ */ v(
|
|
3725
|
-
case "Actions": return /* @__PURE__ */ v(
|
|
3726
|
-
case "Popover": return /* @__PURE__ */ v(
|
|
3727
|
-
default: return /* @__PURE__ */ v(
|
|
3755
|
+
case "Slider": return /* @__PURE__ */ v(tc, { cell: e });
|
|
3756
|
+
case "Icon": return /* @__PURE__ */ v(nc, { cell: e });
|
|
3757
|
+
case "Actions": return /* @__PURE__ */ v(rc, { cell: e });
|
|
3758
|
+
case "Popover": return /* @__PURE__ */ v(cc, { cell: e });
|
|
3759
|
+
default: return /* @__PURE__ */ v(sc, {
|
|
3728
3760
|
cell: e,
|
|
3729
3761
|
isHeader: t,
|
|
3730
3762
|
testId: r
|
|
3731
3763
|
});
|
|
3732
3764
|
}
|
|
3733
|
-
},
|
|
3765
|
+
}, pc = /* @__PURE__ */ function(e) {
|
|
3734
3766
|
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;
|
|
3735
|
-
}({}),
|
|
3767
|
+
}({}), mc = ({ cell: e, isHeader: t, columnHeaderAlignment: n, columnAlignment: r = Tr.LEFT, width: i, testId: a }) => {
|
|
3736
3768
|
var o;
|
|
3737
3769
|
if (!e) return null;
|
|
3738
3770
|
let { style: s, colSpan: c, rowSpan: l, width: u, textAlign: d } = e, f = p(null), m = {
|
|
@@ -3740,7 +3772,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3740
3772
|
headerAlignment: n,
|
|
3741
3773
|
textAlign: d,
|
|
3742
3774
|
isHeader: t
|
|
3743
|
-
}, h = Rs(m, X), _ = Rs(m, X, !0), y = e.type ===
|
|
3775
|
+
}, h = Rs(m, X), _ = Rs(m, X, !0), y = e.type === pc.INPUT || e.type === pc.NUMBER_INPUT || e.type === pc.SELECT || e.type === pc.POPOVER ? X.inputCell : e.type === pc.SLIDER ? X.sliderCell : e.type === pc.CHECKBOX || e.type === pc.RADIO ? X.checkBoxCell : e.type === pc.ACTIONS ? X.actionsCell : X.staticCell, b = g(X.cell, y, e.hasSort ? X.sortingCell : null, h, e.breakWord ? X.breakWord : ""), x = (o = u == null ? i : u) == null ? void 0 : o, S = e.type === pc.STATIC || !e.type, C = {
|
|
3744
3776
|
width: x,
|
|
3745
3777
|
minWidth: x,
|
|
3746
3778
|
textTransform: t && S ? Dr.CAPITALIZE : void 0,
|
|
@@ -3752,14 +3784,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3752
3784
|
style: C,
|
|
3753
3785
|
colSpan: c,
|
|
3754
3786
|
rowSpan: l,
|
|
3755
|
-
children: /* @__PURE__ */ v(
|
|
3787
|
+
children: /* @__PURE__ */ v(fc, {
|
|
3756
3788
|
cell: e,
|
|
3757
3789
|
columnAlignment: _ == null ? Tr.RIGHT : _,
|
|
3758
3790
|
isHeader: t,
|
|
3759
3791
|
testId: a
|
|
3760
3792
|
})
|
|
3761
3793
|
});
|
|
3762
|
-
},
|
|
3794
|
+
}, hc = ({ children: e, dropDisabled: t = !1, height: n, rowIndex: r }) => {
|
|
3763
3795
|
let { attributes: i, listeners: a, setNodeRef: o, transform: s, transition: c, isDragging: l } = Yn({
|
|
3764
3796
|
id: r.toString(),
|
|
3765
3797
|
animateLayoutChanges: () => !1
|
|
@@ -3775,7 +3807,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3775
3807
|
opacity: l ? 0 : void 0
|
|
3776
3808
|
}
|
|
3777
3809
|
});
|
|
3778
|
-
},
|
|
3810
|
+
}, gc = ({ attributes: e = {}, dropDisabled: t = !1, listeners: n, noDrag: r = !1 }) => r ? /* @__PURE__ */ v("td", { "aria-labelledby": "unique-label-id" }) : /* @__PURE__ */ v("td", {
|
|
3779
3811
|
className: Is.dragIconCell,
|
|
3780
3812
|
children: /* @__PURE__ */ v("div", {
|
|
3781
3813
|
className: g(Is.dragIcon, t ? Is.dragIconDisabled : ""),
|
|
@@ -3783,7 +3815,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3783
3815
|
...n,
|
|
3784
3816
|
children: /* @__PURE__ */ v(U, { icon: V.DRAG })
|
|
3785
3817
|
})
|
|
3786
|
-
}),
|
|
3818
|
+
}), _c = ({ attributes: e = {}, cells: t, colSpan: n, draggableTable: r, dropDisabled: i = !1, expandedContent: a, height: o, isHeader: s, listeners: c, row: l, rowActions: u, rowIndex: d, setNodeRef: f, style: p = { height: o }, testId: m }) => {
|
|
3787
3819
|
let { onRowClick: h, onRowFocus: b, onRowMouseEnter: x, onRowMouseLeave: S, error: C, warning: w, active: T } = l;
|
|
3788
3820
|
return /* @__PURE__ */ y(_, { children: [s ? /* @__PURE__ */ y("tr", {
|
|
3789
3821
|
onClick: h,
|
|
@@ -3812,7 +3844,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3812
3844
|
"data-testid": m,
|
|
3813
3845
|
style: p,
|
|
3814
3846
|
children: [
|
|
3815
|
-
r ? /* @__PURE__ */ v(
|
|
3847
|
+
r ? /* @__PURE__ */ v(gc, {
|
|
3816
3848
|
attributes: e,
|
|
3817
3849
|
dropDisabled: i,
|
|
3818
3850
|
listeners: c,
|
|
@@ -3826,10 +3858,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3826
3858
|
flush: a.flush === !0,
|
|
3827
3859
|
children: a.content
|
|
3828
3860
|
}, `${d}_expanded_content`) : null] });
|
|
3829
|
-
},
|
|
3861
|
+
}, vc = ({ row: e, rowIndex: t, isHeader: n = !1, columnCount: r, colSpan: i, columnHeaderAlignments: a = [], columnAlignment: o = [], hasRowActions: s, draggableTable: c = !1, columnWidths: l, dropDisabled: u = !1, height: d, testId: f }) => {
|
|
3830
3862
|
let p = zs(a, n, t), { expandedContent: m } = e, h = e.cells.map((e, r) => {
|
|
3831
3863
|
let i = `${+!n}_${t}_${r}`;
|
|
3832
|
-
return /* @__PURE__ */ v(
|
|
3864
|
+
return /* @__PURE__ */ v(mc, {
|
|
3833
3865
|
cell: e,
|
|
3834
3866
|
isHeader: n,
|
|
3835
3867
|
columnAlignment: o[r],
|
|
@@ -3837,14 +3869,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3837
3869
|
width: l ? l[r] : void 0,
|
|
3838
3870
|
testId: e.testId
|
|
3839
3871
|
}, i);
|
|
3840
|
-
}), g = s && /* @__PURE__ */ v(
|
|
3872
|
+
}), g = s && /* @__PURE__ */ v(mc, {
|
|
3841
3873
|
cell: {
|
|
3842
|
-
type:
|
|
3874
|
+
type: pc.ACTIONS,
|
|
3843
3875
|
actions: e.actions
|
|
3844
3876
|
},
|
|
3845
3877
|
isHeader: n
|
|
3846
3878
|
}, r);
|
|
3847
|
-
return n ? /* @__PURE__ */ v(
|
|
3879
|
+
return n ? /* @__PURE__ */ v(_c, {
|
|
3848
3880
|
cells: h,
|
|
3849
3881
|
colSpan: i,
|
|
3850
3882
|
draggableTable: c,
|
|
@@ -3854,11 +3886,11 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3854
3886
|
rowActions: g,
|
|
3855
3887
|
rowIndex: t,
|
|
3856
3888
|
testId: f
|
|
3857
|
-
}) : c && !e.noDrag ? /* @__PURE__ */ v(
|
|
3889
|
+
}) : c && !e.noDrag ? /* @__PURE__ */ v(hc, {
|
|
3858
3890
|
dropDisabled: u,
|
|
3859
3891
|
height: d,
|
|
3860
3892
|
rowIndex: t,
|
|
3861
|
-
children: ({ attributes: n, listeners: r, setNodeRef: a, style: o }) => /* @__PURE__ */ v(
|
|
3893
|
+
children: ({ attributes: n, listeners: r, setNodeRef: a, style: o }) => /* @__PURE__ */ v(_c, {
|
|
3862
3894
|
attributes: n,
|
|
3863
3895
|
cells: h,
|
|
3864
3896
|
colSpan: i,
|
|
@@ -3875,7 +3907,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3875
3907
|
style: o,
|
|
3876
3908
|
testId: f
|
|
3877
3909
|
})
|
|
3878
|
-
}) : /* @__PURE__ */ v(
|
|
3910
|
+
}) : /* @__PURE__ */ v(_c, {
|
|
3879
3911
|
cells: h,
|
|
3880
3912
|
colSpan: i,
|
|
3881
3913
|
draggableTable: c,
|
|
@@ -3887,7 +3919,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3887
3919
|
rowIndex: t,
|
|
3888
3920
|
testId: f
|
|
3889
3921
|
});
|
|
3890
|
-
},
|
|
3922
|
+
}, yc = (e) => {
|
|
3891
3923
|
let { children: t, colSpan: n, columnAlignment: r, columnCount: i, draggable: a, onListReorder: o = () => {}, canListReorder: s = () => !0, rowActions: c, rows: l = [], tbodyRef: u } = e, [f, p] = m(null), [h, _] = m(!1), b = d(() => l.map((e, t) => t.toString()), [l]);
|
|
3892
3924
|
return a ? /* @__PURE__ */ y(tr, {
|
|
3893
3925
|
collisionDetection: rr,
|
|
@@ -3922,7 +3954,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3922
3954
|
dropAnimation: null,
|
|
3923
3955
|
children: /* @__PURE__ */ v("table", {
|
|
3924
3956
|
className: g(mo.table, mo.dragOverlay),
|
|
3925
|
-
children: /* @__PURE__ */ v("tbody", { children: /* @__PURE__ */ v(
|
|
3957
|
+
children: /* @__PURE__ */ v("tbody", { children: /* @__PURE__ */ v(vc, {
|
|
3926
3958
|
rowIndex: Number(f),
|
|
3927
3959
|
row: l[Number(f)],
|
|
3928
3960
|
columnCount: i,
|
|
@@ -3942,7 +3974,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3942
3974
|
})
|
|
3943
3975
|
}), document.body)]
|
|
3944
3976
|
}) : t({});
|
|
3945
|
-
},
|
|
3977
|
+
}, bc = ({ table: e, children: t }) => {
|
|
3946
3978
|
var n, r, i, a;
|
|
3947
3979
|
let o = p(null), s = ir({
|
|
3948
3980
|
count: (n = (r = e == null ? void 0 : e.rowCount) == null ? (i = e.rows) == null ? void 0 : i.length : r) == null ? 0 : n,
|
|
@@ -3965,7 +3997,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3965
3997
|
})()
|
|
3966
3998
|
})
|
|
3967
3999
|
});
|
|
3968
|
-
},
|
|
4000
|
+
}, xc = ({ activeIndex: e, triggerScrollToActiveRow: t, isVirtualized: n, virtualizer: r }) => (c(() => {
|
|
3969
4001
|
if (t && !(e == null || e < 0)) {
|
|
3970
4002
|
if (n && r) r.scrollToIndex(e, {
|
|
3971
4003
|
behavior: "auto",
|
|
@@ -3984,11 +4016,11 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3984
4016
|
t,
|
|
3985
4017
|
n,
|
|
3986
4018
|
r
|
|
3987
|
-
]), null),
|
|
4019
|
+
]), null), Sc = ({ table: e, children: t }) => {
|
|
3988
4020
|
let { infiniteScroll: n = !1, triggerScrollToActiveRow: r = !1, rows: i } = e, a = d(() => typeof e.activeRowIndex == "number" ? e.activeRowIndex : Array.isArray(i) && i.length ? i.findIndex((e) => e && e.active) : -1, [i, e.activeRowIndex]);
|
|
3989
|
-
return n ? /* @__PURE__ */ v(
|
|
4021
|
+
return n ? /* @__PURE__ */ v(bc, {
|
|
3990
4022
|
table: e,
|
|
3991
|
-
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(
|
|
4023
|
+
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(xc, {
|
|
3992
4024
|
isVirtualized: !0,
|
|
3993
4025
|
virtualizer: e,
|
|
3994
4026
|
activeIndex: a,
|
|
@@ -4000,13 +4032,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4000
4032
|
}) : /* @__PURE__ */ y("div", {
|
|
4001
4033
|
id: "scrollWrapper",
|
|
4002
4034
|
className: mo.scroll,
|
|
4003
|
-
children: [/* @__PURE__ */ v(
|
|
4035
|
+
children: [/* @__PURE__ */ v(xc, {
|
|
4004
4036
|
isVirtualized: !1,
|
|
4005
4037
|
activeIndex: a,
|
|
4006
4038
|
triggerScrollToActiveRow: r
|
|
4007
4039
|
}), t({})]
|
|
4008
4040
|
});
|
|
4009
|
-
},
|
|
4041
|
+
}, Cc = (e) => {
|
|
4010
4042
|
var t, n, r, i, a;
|
|
4011
4043
|
let { onListReorder: o = () => {}, canListReorder: s = () => !0, beforeRenderRow: c, table: l } = e, { columnWidths: u, footer: d, name: f, rows: m = [], actions: h, actionsRight: _, columnHeaderAlignments: b, columnAlignment: x, striped: S = !0, testId: C, draggable: w, defaultEmptyRow: T = null, onAddRow: E = null, bordered: D = !0, maxHeight: O, fixedWidth: k } = l, A = p(null), j = en(e, "table.headers", []), M = Ns(m, j), N = Fs(m, 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) : !0, I = (T == null || (a = T.cells) == null ? void 0 : a.length) && E && F, ee = {
|
|
4012
4044
|
cells: I ? T.cells.map((e, t) => (e == null ? void 0 : e.type) === "Input" ? {
|
|
@@ -4045,7 +4077,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4045
4077
|
name: f,
|
|
4046
4078
|
testId: C && `${C}-title`
|
|
4047
4079
|
}),
|
|
4048
|
-
/* @__PURE__ */ v(
|
|
4080
|
+
/* @__PURE__ */ v(yc, {
|
|
4049
4081
|
colSpan: P,
|
|
4050
4082
|
columnAlignment: x,
|
|
4051
4083
|
columnCount: M,
|
|
@@ -4055,13 +4087,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4055
4087
|
rows: L,
|
|
4056
4088
|
tbodyRef: A,
|
|
4057
4089
|
canListReorder: s,
|
|
4058
|
-
children: ({ dropDisabled: e }) => /* @__PURE__ */ v(
|
|
4090
|
+
children: ({ dropDisabled: e }) => /* @__PURE__ */ v(Sc, {
|
|
4059
4091
|
table: te,
|
|
4060
4092
|
children: ({ virtualizer: t, tableStyle: n }) => /* @__PURE__ */ y("table", {
|
|
4061
4093
|
className: g(mo.table, S ? mo.striped : ""),
|
|
4062
4094
|
"data-testid": C,
|
|
4063
4095
|
style: n,
|
|
4064
|
-
children: [/* @__PURE__ */ v("thead", { children: j.map((e, t) => /* @__PURE__ */ v(
|
|
4096
|
+
children: [/* @__PURE__ */ v("thead", { children: j.map((e, t) => /* @__PURE__ */ v(vc, {
|
|
4065
4097
|
rowIndex: t,
|
|
4066
4098
|
isHeader: !0,
|
|
4067
4099
|
row: e,
|
|
@@ -4076,7 +4108,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4076
4108
|
ref: A,
|
|
4077
4109
|
children: t ? t.getVirtualItems().map((t) => {
|
|
4078
4110
|
let n = t.index, r = L[n];
|
|
4079
|
-
return /* @__PURE__ */ v(
|
|
4111
|
+
return /* @__PURE__ */ v(vc, {
|
|
4080
4112
|
rowIndex: n,
|
|
4081
4113
|
row: c ? c({
|
|
4082
4114
|
row: r,
|
|
@@ -4091,7 +4123,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4091
4123
|
height: t.size,
|
|
4092
4124
|
dropDisabled: e
|
|
4093
4125
|
}, `1_${n}`);
|
|
4094
|
-
}) : L.map((t, n) => /* @__PURE__ */ v(
|
|
4126
|
+
}) : L.map((t, n) => /* @__PURE__ */ v(vc, {
|
|
4095
4127
|
rowIndex: n,
|
|
4096
4128
|
row: c ? c({
|
|
4097
4129
|
row: t,
|
|
@@ -4116,14 +4148,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4116
4148
|
})
|
|
4117
4149
|
]
|
|
4118
4150
|
});
|
|
4119
|
-
},
|
|
4151
|
+
}, wc = "blank", Tc = 1e4, Ec = (e, t, n, r) => {
|
|
4120
4152
|
let i = `${t} → ${n}:`, a = e.filter((e) => !e.startsWith(i)), o = r ? [...a, `${i} ${r}`] : a;
|
|
4121
4153
|
return {
|
|
4122
4154
|
updatedErrors: o,
|
|
4123
4155
|
isValid: o.length === 0
|
|
4124
4156
|
};
|
|
4125
|
-
},
|
|
4126
|
-
let i = d(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, s] = m(
|
|
4157
|
+
}, Dc = 20, Oc = 1, kc = ({ validationRules: e, parsedResult: t, updateState: n, testId: r }) => {
|
|
4158
|
+
let i = d(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, s] = m(Dc), [l, u] = m(Oc), f = p([]), h = (l - 1) * a, g = a === 0 ? t.rows.length : h + a, [_, y] = m([]), b = d(() => {
|
|
4127
4159
|
let n = e.filter((e) => !e.optionalColumn);
|
|
4128
4160
|
return t.fields.length === n.length ? n : e;
|
|
4129
4161
|
}, [e, t.fields.length]), x = o((e, r) => (!f.current.length && t.rows.length && (f.current = t.rows[0].map((e) => ms(e) ? "NumberInput" : "Input")), {
|
|
@@ -4137,7 +4169,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4137
4169
|
disableValidationOnFocus: !0,
|
|
4138
4170
|
error: v,
|
|
4139
4171
|
validationCallback: (e, i) => {
|
|
4140
|
-
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } =
|
|
4172
|
+
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } = Ec(t.errors, a, e, i);
|
|
4141
4173
|
n({ parsedResult: {
|
|
4142
4174
|
...t,
|
|
4143
4175
|
errors: o,
|
|
@@ -4146,7 +4178,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4146
4178
|
},
|
|
4147
4179
|
onChange: (e) => {
|
|
4148
4180
|
var i;
|
|
4149
|
-
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } =
|
|
4181
|
+
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } = Ec(t.errors, s, m, c), d = t.rows.map((e, t) => t === r ? e.map((e, t) => t === a ? o : e) : e);
|
|
4150
4182
|
n({ parsedResult: {
|
|
4151
4183
|
...t,
|
|
4152
4184
|
rows: d,
|
|
@@ -4188,7 +4220,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4188
4220
|
]);
|
|
4189
4221
|
let S = d(() => t.fields.map((e, r) => {
|
|
4190
4222
|
var a, o, s;
|
|
4191
|
-
let c = b == null ? void 0 : b[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => hn(e) ===
|
|
4223
|
+
let c = b == null ? void 0 : b[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => hn(e) === wc);
|
|
4192
4224
|
if (!l.length || u) return {};
|
|
4193
4225
|
let d = t == null || (a = t.units) == null ? void 0 : a[r], f = hn(d), p = l != null && l.some((e) => hn(e) === f) ? d : (o = c == null ? void 0 : c.defaultUnit) == null ? "" : o;
|
|
4194
4226
|
return {
|
|
@@ -4226,7 +4258,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4226
4258
|
h,
|
|
4227
4259
|
g
|
|
4228
4260
|
]);
|
|
4229
|
-
return /* @__PURE__ */ v(
|
|
4261
|
+
return /* @__PURE__ */ v(Cc, {
|
|
4230
4262
|
beforeRenderRow: o(({ rowIndex: e }) => {
|
|
4231
4263
|
let n = h + e, r = t.rows[n];
|
|
4232
4264
|
return r ? x(r, n) : {
|
|
@@ -4299,7 +4331,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4299
4331
|
} }
|
|
4300
4332
|
}
|
|
4301
4333
|
});
|
|
4302
|
-
},
|
|
4334
|
+
}, Ac = { listStyle: "_listStyle_yjfjw_1" }, jc = ({ errors: e, t }) => {
|
|
4303
4335
|
var n;
|
|
4304
4336
|
let r = (n = [...e]) == null ? void 0 : n.sort((e, t) => {
|
|
4305
4337
|
let n = (e) => {
|
|
@@ -4315,18 +4347,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4315
4347
|
content: t("unableToImportPleaseCorrectError", { rows: e == null ? void 0 : e.length }),
|
|
4316
4348
|
type: "Error",
|
|
4317
4349
|
details: /* @__PURE__ */ v("ul", {
|
|
4318
|
-
className:
|
|
4350
|
+
className: Ac.listStyle,
|
|
4319
4351
|
children: r.map((e, t) => /* @__PURE__ */ v("li", { children: e }, t))
|
|
4320
4352
|
})
|
|
4321
4353
|
};
|
|
4322
|
-
},
|
|
4354
|
+
}, Mc = ({ errors: e, t }) => e.length ? /* @__PURE__ */ v(po, { message: jc({
|
|
4323
4355
|
errors: e,
|
|
4324
4356
|
t
|
|
4325
|
-
}) }) : null,
|
|
4357
|
+
}) }) : null, Nc = {
|
|
4326
4358
|
empty: "_empty_fe425_1",
|
|
4327
4359
|
text: "_text_fe425_11"
|
|
4328
|
-
},
|
|
4329
|
-
className:
|
|
4360
|
+
}, Pc = ({ width: e = "auto", height: t = "auto", text: n = "No data", children: r, testId: i }) => /* @__PURE__ */ y("div", {
|
|
4361
|
+
className: Nc.empty,
|
|
4330
4362
|
style: {
|
|
4331
4363
|
width: e,
|
|
4332
4364
|
height: t
|
|
@@ -4362,7 +4394,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4362
4394
|
})
|
|
4363
4395
|
}),
|
|
4364
4396
|
n !== "" && /* @__PURE__ */ v("div", {
|
|
4365
|
-
className:
|
|
4397
|
+
className: Nc.text,
|
|
4366
4398
|
children: /* @__PURE__ */ v(ha, {
|
|
4367
4399
|
faint: !0,
|
|
4368
4400
|
children: n
|
|
@@ -4370,52 +4402,52 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4370
4402
|
}),
|
|
4371
4403
|
r
|
|
4372
4404
|
]
|
|
4373
|
-
}),
|
|
4405
|
+
}), Fc = (e) => {
|
|
4374
4406
|
var t;
|
|
4375
4407
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4376
4408
|
let t = e == null ? void 0 : e.match(/[.,]/g);
|
|
4377
4409
|
return t && t.length > 1;
|
|
4378
4410
|
});
|
|
4379
|
-
},
|
|
4411
|
+
}, Ic = (e) => {
|
|
4380
4412
|
var t;
|
|
4381
4413
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4382
4414
|
var t;
|
|
4383
4415
|
return !(e != null && e.includes(".")) && (e == null || (t = e.match(/,/g)) == null ? void 0 : t.length) === 1;
|
|
4384
4416
|
});
|
|
4385
|
-
},
|
|
4417
|
+
}, Lc = (e, t, n) => e >= t - n, Rc = (e) => !!e && e !== "blank" && e.trim() !== "", zc = (e, t, n, r, i, a, o) => {
|
|
4386
4418
|
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;
|
|
4387
|
-
if (i && !
|
|
4419
|
+
if (i && !Lc(e.length, l, c) && s.push(o("incorrectNumberOfFieldNameHeaderColumns", { expectedLengthMessage: u })), a) {
|
|
4388
4420
|
var f, p;
|
|
4389
4421
|
let e = r.filter((e) => {
|
|
4390
4422
|
var t;
|
|
4391
|
-
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(
|
|
4423
|
+
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(Rc));
|
|
4392
4424
|
}).length;
|
|
4393
|
-
|
|
4425
|
+
Lc(t == null || (f = t.filter(Rc)) == 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 }));
|
|
4394
4426
|
}
|
|
4395
4427
|
return n.length === 0 ? s.push(o("incorrectNumberOfDataColumns", {
|
|
4396
4428
|
expectedLengthMessage: u,
|
|
4397
4429
|
dataRowStartIndex: d
|
|
4398
4430
|
})) : n.forEach((e, t) => {
|
|
4399
|
-
|
|
4431
|
+
Lc(e.length, l, c) || s.push(o("incorrectNumberOfDataColumns", {
|
|
4400
4432
|
expectedLengthMessage: u,
|
|
4401
4433
|
dataRowStartIndex: d + t
|
|
4402
4434
|
}));
|
|
4403
4435
|
}), s;
|
|
4404
|
-
},
|
|
4436
|
+
}, Bc = (e) => e.toUpperCase().replace(/\(.*?\)/g, "").replace(/[^A-Z0-9]/g, "").trim(), Vc = ({ value: e, defaultAllowedValues: t }) => {
|
|
4405
4437
|
var n;
|
|
4406
|
-
let r =
|
|
4407
|
-
return (n = t == null ? void 0 : t.some((e) =>
|
|
4408
|
-
},
|
|
4438
|
+
let r = Bc(e);
|
|
4439
|
+
return (n = t == null ? void 0 : t.some((e) => Bc(e).includes(r) || r.includes(Bc(e)))) == null ? !1 : n;
|
|
4440
|
+
}, Hc = ({ value: e, defaultAllowedValues: t }) => {
|
|
4409
4441
|
var n;
|
|
4410
4442
|
return (n = t == null ? void 0 : t.includes(e)) == null ? !1 : n;
|
|
4411
|
-
},
|
|
4443
|
+
}, Uc = (e, t, n, r, i, a) => {
|
|
4412
4444
|
let o = [];
|
|
4413
4445
|
if (r) {
|
|
4414
4446
|
let r = n.map((e) => e.fieldName).filter(Boolean);
|
|
4415
4447
|
e.forEach((i, s) => {
|
|
4416
4448
|
var c, l;
|
|
4417
4449
|
let u = n[s];
|
|
4418
|
-
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ?
|
|
4450
|
+
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ? Vc : c)({
|
|
4419
4451
|
value: i,
|
|
4420
4452
|
defaultAllowedValues: r,
|
|
4421
4453
|
columnIndex: s,
|
|
@@ -4437,7 +4469,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4437
4469
|
var l, u;
|
|
4438
4470
|
let d = n[c];
|
|
4439
4471
|
if (!d || d != null && d.optionalColumn) return;
|
|
4440
|
-
let f = (l = d.unitsValidator) == null ?
|
|
4472
|
+
let f = (l = d.unitsValidator) == null ? Hc : l, p = (u = i == null ? void 0 : i[c]) == null ? [] : u;
|
|
4441
4473
|
f({
|
|
4442
4474
|
value: r,
|
|
4443
4475
|
defaultAllowedValues: p,
|
|
@@ -4453,7 +4485,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4453
4485
|
});
|
|
4454
4486
|
}
|
|
4455
4487
|
return o;
|
|
4456
|
-
},
|
|
4488
|
+
}, Wc = (e, t, n) => {
|
|
4457
4489
|
let r = [];
|
|
4458
4490
|
return e.forEach((e, i) => {
|
|
4459
4491
|
e.forEach((e, a) => {
|
|
@@ -4466,91 +4498,91 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4466
4498
|
})}`);
|
|
4467
4499
|
});
|
|
4468
4500
|
}), r;
|
|
4469
|
-
},
|
|
4470
|
-
let s =
|
|
4471
|
-
return s.length === 0 && (s = s.concat(
|
|
4501
|
+
}, Gc = (e, t, n, r, i, a, o) => {
|
|
4502
|
+
let s = zc(e, t, n, r, i, a, o);
|
|
4503
|
+
return s.length === 0 && (s = s.concat(Uc(e, t, r, i, a, o), Wc(n, r, o))), {
|
|
4472
4504
|
isValid: s.length === 0,
|
|
4473
4505
|
errors: s
|
|
4474
4506
|
};
|
|
4475
|
-
},
|
|
4507
|
+
}, Kc = (e, t, n) => {
|
|
4476
4508
|
var r, i, a, o, s, c, l, u, d, f, p, m, h, g;
|
|
4477
4509
|
let _ = (e) => e.replace(/,/g, "."), v = (r = (i = e[0]) == null ? void 0 : i.some((e) => isNaN(Number(_(e))))) == null ? !1 : r, y = (a = (o = e[1]) == null ? void 0 : o.some((e) => isNaN(Number(_(e))))) == null ? !1 : a, b = (s = (c = e[0]) == null ? void 0 : c.some((e) => t.includes(e))) == null ? !1 : s, x = (l = (u = e[0]) == null ? void 0 : u.some((e) => n.includes(e))) == null ? !1 : l, S = (d = (f = e[1]) == null ? void 0 : f.some((e) => n.includes(e))) == null ? !1 : d, C = (p = (m = e[0]) == null ? void 0 : m.some((e) => !isNaN(Number(_(e))))) == null ? !1 : p, w = (h = (g = e[1]) == null ? void 0 : g.some((e) => !isNaN(Number(_(e))))) == null ? !1 : h;
|
|
4478
4510
|
return {
|
|
4479
4511
|
hasFieldNameHeader: b || v && !x && !C || v && y && !C,
|
|
4480
4512
|
hasUnitHeader: x || S || v && y && !x && !C && !w || v && y && !C && !w
|
|
4481
4513
|
};
|
|
4482
|
-
},
|
|
4514
|
+
}, qc = (e, { validationRules: t }) => {
|
|
4483
4515
|
var n, r, i;
|
|
4484
4516
|
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) => {
|
|
4485
4517
|
var t;
|
|
4486
4518
|
return (t = e == null ? void 0 : e.defaultUnit) == null ? s(e == null ? void 0 : e.validUnits) : t;
|
|
4487
|
-
}), { hasFieldNameHeader: l, hasUnitHeader: u } =
|
|
4519
|
+
}), { hasFieldNameHeader: l, hasUnitHeader: u } = Kc(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());
|
|
4488
4520
|
return l || e == null || e.unshift(o), u || e == null || e.splice(1, 0, c), {
|
|
4489
4521
|
hasFieldNameHeader: l,
|
|
4490
4522
|
hasUnitHeader: u
|
|
4491
4523
|
};
|
|
4492
|
-
},
|
|
4524
|
+
}, Jc = (e) => Math.round(e * 100) / 100, Yc = (e) => e.join(", ").replace(/,\s*$/, ""), Xc = {
|
|
4493
4525
|
skipEmptyLines: !0,
|
|
4494
4526
|
delimiter: (e) => {
|
|
4495
4527
|
var t, n;
|
|
4496
4528
|
let r = e.substring(0, 200), i = ((t = r.match(/\t/g)) == null ? [] : t).length, a = ((n = r.match(/;/g)) == null ? [] : n).length;
|
|
4497
4529
|
return i === 0 && a === 0 ? "," : i > a ? " " : ";";
|
|
4498
4530
|
}
|
|
4499
|
-
},
|
|
4531
|
+
}, Zc = [
|
|
4500
4532
|
"text/csv",
|
|
4501
4533
|
"text/plain",
|
|
4502
4534
|
"application/json",
|
|
4503
4535
|
"application/vnd.ms-excel"
|
|
4504
|
-
],
|
|
4536
|
+
], Qc = (e) => Zc.includes(e.type), $c = (e) => e instanceof File, el = (e) => e.trim().startsWith("["), tl = (e) => {
|
|
4505
4537
|
try {
|
|
4506
4538
|
var t;
|
|
4507
4539
|
return !!((t = JSON.parse(e)) != null && t.path);
|
|
4508
4540
|
} catch {
|
|
4509
4541
|
return !1;
|
|
4510
4542
|
}
|
|
4511
|
-
},
|
|
4543
|
+
}, nl = (e) => new Promise((t, n) => {
|
|
4512
4544
|
let r = new FileReader();
|
|
4513
4545
|
r.onload = () => t(String(r.result)), r.onerror = n, r.readAsText(e);
|
|
4514
|
-
}),
|
|
4546
|
+
}), rl = async (e, t, n) => {
|
|
4515
4547
|
try {
|
|
4516
|
-
return
|
|
4548
|
+
return ul({
|
|
4517
4549
|
data: JSON.parse(e),
|
|
4518
4550
|
errors: []
|
|
4519
4551
|
}, t, n);
|
|
4520
4552
|
} catch (e) {
|
|
4521
4553
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4522
4554
|
}
|
|
4523
|
-
},
|
|
4555
|
+
}, il = async (e, t, n) => {
|
|
4524
4556
|
try {
|
|
4525
4557
|
let r = JSON.parse(e).path.map((e) => [
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4558
|
+
Jc(e.md),
|
|
4559
|
+
Jc(e.inclination),
|
|
4560
|
+
Jc(e.gridAzimuth)
|
|
4529
4561
|
]);
|
|
4530
4562
|
return r.unshift([
|
|
4531
4563
|
"m",
|
|
4532
4564
|
"deg",
|
|
4533
4565
|
"deg"
|
|
4534
|
-
]),
|
|
4566
|
+
]), ul({
|
|
4535
4567
|
data: r,
|
|
4536
4568
|
errors: []
|
|
4537
4569
|
}, t, n);
|
|
4538
4570
|
} catch (e) {
|
|
4539
4571
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4540
4572
|
}
|
|
4541
|
-
},
|
|
4573
|
+
}, al = (e) => e.replace(",", "."), ol = (e) => e.map((e) => e.map((e) => al(e))), sl = (e, { importLimit: t, ...n }, r) => new Promise((i) => {
|
|
4542
4574
|
or.parse(e, {
|
|
4543
|
-
...
|
|
4575
|
+
...Xc,
|
|
4544
4576
|
preview: t,
|
|
4545
4577
|
complete: (e) => {
|
|
4546
|
-
let a =
|
|
4578
|
+
let a = ul(e, {
|
|
4547
4579
|
importLimit: t,
|
|
4548
4580
|
...n
|
|
4549
4581
|
}, r);
|
|
4550
|
-
a.rows =
|
|
4582
|
+
a.rows = ol(a.rows), i(a);
|
|
4551
4583
|
}
|
|
4552
4584
|
});
|
|
4553
|
-
}),
|
|
4585
|
+
}), cl = async (e, t, n) => {
|
|
4554
4586
|
let r = {
|
|
4555
4587
|
isValid: !1,
|
|
4556
4588
|
fields: [],
|
|
@@ -4559,13 +4591,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4559
4591
|
errors: []
|
|
4560
4592
|
};
|
|
4561
4593
|
try {
|
|
4562
|
-
if (
|
|
4563
|
-
let i =
|
|
4564
|
-
return
|
|
4594
|
+
if ($c(e) && !Qc(e)) return r.errors.push(`${n("wrongFileFormatExpectedOneOf")} ${Yc(Array.from(Zc))}`), r;
|
|
4595
|
+
let i = $c(e) ? await nl(e) : e;
|
|
4596
|
+
return el(i) ? await rl(i, t, n) : tl(i) ? await il(i, t, n) : await sl(e, t, n);
|
|
4565
4597
|
} catch (e) {
|
|
4566
4598
|
return r.errors.push(e.message), r;
|
|
4567
4599
|
}
|
|
4568
|
-
},
|
|
4600
|
+
}, ll = (e, t, n, r) => {
|
|
4569
4601
|
var i;
|
|
4570
4602
|
let a = (i = r == null ? void 0 : r.delimiter) == null ? "," : i, o = [
|
|
4571
4603
|
e,
|
|
@@ -4577,7 +4609,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4577
4609
|
header: !0,
|
|
4578
4610
|
delimiter: a
|
|
4579
4611
|
});
|
|
4580
|
-
},
|
|
4612
|
+
}, ul = (e, t, n) => {
|
|
4581
4613
|
let { data: r, errors: i } = e, a = {
|
|
4582
4614
|
isValid: !1,
|
|
4583
4615
|
fields: [],
|
|
@@ -4586,15 +4618,15 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4586
4618
|
errors: i.map((e) => e.message)
|
|
4587
4619
|
};
|
|
4588
4620
|
if (i.length > 0) return a;
|
|
4589
|
-
let { hasFieldNameHeader: o, hasUnitHeader: s } =
|
|
4621
|
+
let { hasFieldNameHeader: o, hasUnitHeader: s } = qc(r, t);
|
|
4590
4622
|
a.fields = r[0].map((e) => e.trim()), a.units = r[1].map((e) => e.trim()).filter(Boolean), a.rows = r.slice(2);
|
|
4591
4623
|
let { validationRules: c } = t;
|
|
4592
4624
|
if (c.length) {
|
|
4593
|
-
let { isValid: e, errors: t } =
|
|
4625
|
+
let { isValid: e, errors: t } = Gc(a.fields, a.units, a.rows, c, o, s, n);
|
|
4594
4626
|
a.errors.push(...t), a.isValid = e && t.length === 0;
|
|
4595
4627
|
} else a.isValid = a.errors.length === 0;
|
|
4596
4628
|
return a;
|
|
4597
|
-
},
|
|
4629
|
+
}, dl = ({ id: e, message: t = {
|
|
4598
4630
|
type: oo.INFO,
|
|
4599
4631
|
content: ""
|
|
4600
4632
|
}, autoClose: n = 6e3, onClose: r }) => {
|
|
@@ -4635,22 +4667,22 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4635
4667
|
transition: sr,
|
|
4636
4668
|
type: s
|
|
4637
4669
|
});
|
|
4638
|
-
},
|
|
4670
|
+
}, fl = (e) => {
|
|
4639
4671
|
lr.dismiss(e);
|
|
4640
|
-
},
|
|
4672
|
+
}, pl = (e, t) => {
|
|
4641
4673
|
t(() => {
|
|
4642
|
-
|
|
4674
|
+
dl({ ...e });
|
|
4643
4675
|
});
|
|
4644
|
-
},
|
|
4676
|
+
}, ml = {
|
|
4645
4677
|
toggle: "_toggle_18fme_9",
|
|
4646
4678
|
small: "_small_18fme_25",
|
|
4647
4679
|
disabled: "_disabled_18fme_105",
|
|
4648
4680
|
noMargin: "_noMargin_18fme_113",
|
|
4649
4681
|
helpIconEnabled: "_helpIconEnabled_18fme_116"
|
|
4650
|
-
},
|
|
4682
|
+
}, hl = ({ name: e, label: t, checked: n = !1, disabled: r, display: i, small: a = !1, onChange: o, noMargin: c = !1, testId: l, helpText: u, onClickHelp: d, textTransform: f = Dr.CAPITALIZE }) => {
|
|
4651
4683
|
let p = s(H), m = u || d, h = r || p;
|
|
4652
4684
|
return /* @__PURE__ */ y("div", {
|
|
4653
|
-
className: g(
|
|
4685
|
+
className: g(ml.toggle, h ? ml.disabled : null, a ? ml.small : null, c ? ml.noMargin : null),
|
|
4654
4686
|
style: { display: i },
|
|
4655
4687
|
onClick: (t) => {
|
|
4656
4688
|
h || (t.target.name = e, t.target.checked = !n, t.target.value = !n, o(t));
|
|
@@ -4670,13 +4702,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4670
4702
|
children: t
|
|
4671
4703
|
}),
|
|
4672
4704
|
m && /* @__PURE__ */ v("div", {
|
|
4673
|
-
className:
|
|
4705
|
+
className: ml.helpIconEnabled,
|
|
4674
4706
|
onClick: d,
|
|
4675
4707
|
children: /* @__PURE__ */ v(si, { text: u })
|
|
4676
4708
|
})
|
|
4677
4709
|
]
|
|
4678
4710
|
});
|
|
4679
|
-
},
|
|
4711
|
+
}, gl = ({ config: e, state: t, updateState: n, setModalVisibility: r, onCloseModal: i, readAndParseInput: a, validationRules: s = [], onCompleteImport: c = () => {}, prevalidationConfig: l, t: u, loading: d, startTransition: f, testId: h }) => {
|
|
4680
4712
|
let { modalVisibility: { reviewPasteModal: g, pasteModalHelpVisible: b, helpModal: x } } = t, { warningMessage: S, actionButtonLabel: C, changeRulesAction: w, checkPrevalidationNeed: T } = l == null ? {} : l, E = p(null), [D, O] = m(!1), [k, A] = m({
|
|
4681
4713
|
pastedText: "",
|
|
4682
4714
|
parsedResult: {
|
|
@@ -4699,8 +4731,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4699
4731
|
var n, r, i;
|
|
4700
4732
|
let t = ar(I == null || (n = I.rows) == null ? void 0 : n.map(([e, t]) => [Number(e), Number(t)]), .001).map(([e, t]) => [e.toString(), t.toString()]), a = {
|
|
4701
4733
|
validationRules: s,
|
|
4702
|
-
importLimit: (r = e.importLimit) == null ?
|
|
4703
|
-
}, o =
|
|
4734
|
+
importLimit: (r = e.importLimit) == null ? Tc : r
|
|
4735
|
+
}, o = ll(I.fields.slice(0, 2), ((i = I.units) == null ? [] : i).slice(0, 2), t, a);
|
|
4704
4736
|
f(() => A({
|
|
4705
4737
|
parsedResult: {
|
|
4706
4738
|
...I,
|
|
@@ -4730,17 +4762,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4730
4762
|
}, N = () => {
|
|
4731
4763
|
r("helpModal", !x);
|
|
4732
4764
|
}, P = () => {
|
|
4733
|
-
n(k), c(k.parsedResult), i(),
|
|
4765
|
+
n(k), c(k.parsedResult), i(), pl({ message: {
|
|
4734
4766
|
type: "Success",
|
|
4735
4767
|
content: u("pasteSuccessful")
|
|
4736
4768
|
} }, f);
|
|
4737
|
-
}, { pastedText: F, parsedResult: I } = k, ee = T && T(I), { isValid: L, errors: te } = I, ne = te.length, re = F === "", ie =
|
|
4769
|
+
}, { pastedText: F, parsedResult: I } = k, ee = T && T(I), { isValid: L, errors: te } = I, ne = te.length, re = F === "", ie = Ic(F), ae = Fc(F), R = /* @__PURE__ */ y(_, { children: [
|
|
4738
4770
|
/* @__PURE__ */ y("div", {
|
|
4739
4771
|
className: io.headerContainer,
|
|
4740
4772
|
children: [
|
|
4741
4773
|
/* @__PURE__ */ v(W, {
|
|
4742
4774
|
text: u("downsampleTooltip"),
|
|
4743
|
-
children: /* @__PURE__ */ v(
|
|
4775
|
+
children: /* @__PURE__ */ v(hl, {
|
|
4744
4776
|
label: u("downsampled"),
|
|
4745
4777
|
checked: D,
|
|
4746
4778
|
onChange: () => j(!D),
|
|
@@ -4773,7 +4805,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4773
4805
|
}),
|
|
4774
4806
|
re ? /* @__PURE__ */ v("div", {
|
|
4775
4807
|
className: io.resultContainer,
|
|
4776
|
-
children: /* @__PURE__ */ v(
|
|
4808
|
+
children: /* @__PURE__ */ v(Pc, {
|
|
4777
4809
|
text: null,
|
|
4778
4810
|
children: /* @__PURE__ */ y("div", {
|
|
4779
4811
|
className: io.emptyState,
|
|
@@ -4809,7 +4841,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4809
4841
|
}) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
|
|
4810
4842
|
className: io.messagesContainer,
|
|
4811
4843
|
children: [
|
|
4812
|
-
ne ? /* @__PURE__ */ v(
|
|
4844
|
+
ne ? /* @__PURE__ */ v(Mc, {
|
|
4813
4845
|
errors: te,
|
|
4814
4846
|
t: u
|
|
4815
4847
|
}) : null,
|
|
@@ -4832,7 +4864,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4832
4864
|
type: "Warning"
|
|
4833
4865
|
} })
|
|
4834
4866
|
]
|
|
4835
|
-
}), /* @__PURE__ */ v(
|
|
4867
|
+
}), /* @__PURE__ */ v(kc, {
|
|
4836
4868
|
validationRules: s,
|
|
4837
4869
|
parsedResult: I,
|
|
4838
4870
|
updateState: (e) => A((t) => ({
|
|
@@ -4874,7 +4906,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4874
4906
|
onClose: i
|
|
4875
4907
|
} })
|
|
4876
4908
|
});
|
|
4877
|
-
},
|
|
4909
|
+
}, _l = ({ modals: e = [], modalVisibility: n, onCloseModal: r, testId: i }) => e.length ? /* @__PURE__ */ v(_, { children: e.map(({ name: e, component: a, props: o = {} }) => {
|
|
4878
4910
|
var s;
|
|
4879
4911
|
return /* @__PURE__ */ v(t, { children: /* @__PURE__ */ v(a, {
|
|
4880
4912
|
testId: `${i}-modal-render-${e}`,
|
|
@@ -4882,7 +4914,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4882
4914
|
onClose: () => r({ name: e }),
|
|
4883
4915
|
...o
|
|
4884
4916
|
}) }, e);
|
|
4885
|
-
}) }) : null,
|
|
4917
|
+
}) }) : null, vl = ({ sections: e, iconName: t, testId: n, tooltip: r }) => /* @__PURE__ */ v(Ki, {
|
|
4886
4918
|
loading: !0,
|
|
4887
4919
|
menu: {
|
|
4888
4920
|
component: /* @__PURE__ */ v(K, {
|
|
@@ -4898,18 +4930,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4898
4930
|
sections: e
|
|
4899
4931
|
},
|
|
4900
4932
|
testId: n
|
|
4901
|
-
}),
|
|
4933
|
+
}), yl = (e, t, n) => o(async () => {
|
|
4902
4934
|
if (n) try {
|
|
4903
4935
|
return await n();
|
|
4904
4936
|
} catch (t) {
|
|
4905
|
-
console.error("beforeExportData failed", t),
|
|
4937
|
+
console.error("beforeExportData failed", t), dl({ message: {
|
|
4906
4938
|
type: "Error",
|
|
4907
4939
|
content: e("unableToPrepareExportData")
|
|
4908
4940
|
} });
|
|
4909
4941
|
return;
|
|
4910
4942
|
}
|
|
4911
4943
|
return t;
|
|
4912
|
-
}, [t, n]),
|
|
4944
|
+
}, [t, n]), bl = {
|
|
4913
4945
|
cancel: "Cancel",
|
|
4914
4946
|
chooseFile: "Choose file",
|
|
4915
4947
|
copyDecimalComma: "Copy (decimal comma)",
|
|
@@ -4968,26 +5000,26 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4968
5000
|
smartUpload_description: "Upload image and extract table content using a LLM",
|
|
4969
5001
|
smartUpload_smartUpload: "Smart Upload",
|
|
4970
5002
|
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"
|
|
4971
|
-
},
|
|
4972
|
-
let t = Object.keys(
|
|
4973
|
-
let r =
|
|
5003
|
+
}, xl = (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])), Sl = (e) => d(() => {
|
|
5004
|
+
let t = Object.keys(bl).reduce((t, n) => {
|
|
5005
|
+
let r = bl == null ? void 0 : bl[n], i = e == null ? void 0 : e[n];
|
|
4974
5006
|
return t[n] = i == null ? r : i, t;
|
|
4975
5007
|
}, {});
|
|
4976
5008
|
return (e, n) => {
|
|
4977
5009
|
let r = t[e];
|
|
4978
|
-
return n ?
|
|
5010
|
+
return n ? xl(r, n) : r;
|
|
4979
5011
|
};
|
|
4980
|
-
}, [e]),
|
|
5012
|
+
}, [e]), Cl = /^\s*-?\d+(?:[.,]\d+)?(?:e[+-]?\d+)?\s*$/i, wl = (e) => {
|
|
4981
5013
|
var t;
|
|
4982
5014
|
return {
|
|
4983
5015
|
...e,
|
|
4984
5016
|
rows: e == null || (t = e.rows) == null ? void 0 : t.map((e) => e.map((e) => {
|
|
4985
5017
|
let t = String(e == null ? "" : e);
|
|
4986
|
-
return
|
|
5018
|
+
return Cl.test(t) ? Cn(t) : t;
|
|
4987
5019
|
}))
|
|
4988
5020
|
};
|
|
4989
|
-
},
|
|
4990
|
-
let { exportData: a, beforeExportData: s, importLimit: c =
|
|
5021
|
+
}, Tl = ({ config: e, state: t, setState: n, smartUploadConfig: r, startTransition: i }) => {
|
|
5022
|
+
let { exportData: a, beforeExportData: s, importLimit: c = Tc, validationRules: l = [], translations: u, onImportComplete: d = () => {}, disablePasteSuccessfulToast: f, prevalidationConfig: p, onDeleteRows: m } = e == null ? {} : e, { parsedResult: h } = t, { checkPrevalidationNeed: g } = p == null ? {} : p, _ = Sl(u), v = yl(_, a, s), y = o((e) => {
|
|
4991
5023
|
n((t) => ({
|
|
4992
5024
|
...t,
|
|
4993
5025
|
...e
|
|
@@ -5031,9 +5063,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5031
5063
|
let t = {
|
|
5032
5064
|
validationRules: l,
|
|
5033
5065
|
importLimit: c
|
|
5034
|
-
}, n =
|
|
5066
|
+
}, n = wl(await cl(e, t, _));
|
|
5035
5067
|
if (g && g(h)) {
|
|
5036
|
-
let { fields: e, units: r, rows: a } = n, o =
|
|
5068
|
+
let { fields: e, units: r, rows: a } = n, o = ll(e, r == null ? [] : r, a, t);
|
|
5037
5069
|
return i(() => y({
|
|
5038
5070
|
pastedText: o,
|
|
5039
5071
|
parsedResult: h
|
|
@@ -5059,20 +5091,20 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5059
5091
|
let { fromFile: t, showSuccessToast: n = !0 } = e == null ? {} : e, r;
|
|
5060
5092
|
try {
|
|
5061
5093
|
if (r = t ? await t.text() : await navigator.clipboard.readText(), !r) {
|
|
5062
|
-
|
|
5094
|
+
pl({ message: {
|
|
5063
5095
|
type: "Error",
|
|
5064
5096
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed")
|
|
5065
5097
|
} }, i);
|
|
5066
5098
|
return;
|
|
5067
5099
|
}
|
|
5068
|
-
let e =
|
|
5100
|
+
let e = wl(await cl(r, {
|
|
5069
5101
|
validationRules: l,
|
|
5070
5102
|
importLimit: c
|
|
5071
5103
|
}, _));
|
|
5072
|
-
return e != null && e.isValid ||
|
|
5104
|
+
return e != null && e.isValid || pl({ message: {
|
|
5073
5105
|
type: "Error",
|
|
5074
5106
|
content: _("clipboardReadFailed")
|
|
5075
|
-
} }, i), n &&
|
|
5107
|
+
} }, i), n && pl({ message: {
|
|
5076
5108
|
type: "Success",
|
|
5077
5109
|
content: _("pasteSuccessful")
|
|
5078
5110
|
} }, i), {
|
|
@@ -5080,7 +5112,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5080
5112
|
parsedResult: e
|
|
5081
5113
|
};
|
|
5082
5114
|
} catch (e) {
|
|
5083
|
-
|
|
5115
|
+
pl({ message: {
|
|
5084
5116
|
type: "Error",
|
|
5085
5117
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed"),
|
|
5086
5118
|
details: e.message
|
|
@@ -5093,10 +5125,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5093
5125
|
let n = e == null || (t = e.target) == null || (t = t.files) == null ? void 0 : t[0];
|
|
5094
5126
|
if (!n) return;
|
|
5095
5127
|
let r = await C(await n.text());
|
|
5096
|
-
r.isValid ? (f ||
|
|
5128
|
+
r.isValid ? (f || pl({ message: {
|
|
5097
5129
|
type: "Success",
|
|
5098
5130
|
content: _("pasteSuccessful")
|
|
5099
|
-
} }, i), i(() => d(r))) :
|
|
5131
|
+
} }, i), i(() => d(r))) : pl({ message: {
|
|
5100
5132
|
type: "Error",
|
|
5101
5133
|
content: _("fileParsingFailed")
|
|
5102
5134
|
} }, i);
|
|
@@ -5110,7 +5142,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5110
5142
|
try {
|
|
5111
5143
|
let t = await navigator.clipboard.readText();
|
|
5112
5144
|
if (!t) {
|
|
5113
|
-
|
|
5145
|
+
pl({ message: {
|
|
5114
5146
|
type: "Error",
|
|
5115
5147
|
content: _("clipboardIsEmpty")
|
|
5116
5148
|
} }, i);
|
|
@@ -5118,18 +5150,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5118
5150
|
}
|
|
5119
5151
|
let n = await C(t);
|
|
5120
5152
|
if (!n.isValid) {
|
|
5121
|
-
|
|
5153
|
+
pl({ message: {
|
|
5122
5154
|
type: "Error",
|
|
5123
5155
|
content: _("clipboardReadFailed")
|
|
5124
5156
|
} }, i);
|
|
5125
5157
|
return;
|
|
5126
5158
|
}
|
|
5127
|
-
f ||
|
|
5159
|
+
f || pl({ message: {
|
|
5128
5160
|
type: "Success",
|
|
5129
5161
|
content: _("pasteSuccessful")
|
|
5130
5162
|
} }, i), e && i(() => d(n));
|
|
5131
5163
|
} catch {
|
|
5132
|
-
|
|
5164
|
+
pl({ message: {
|
|
5133
5165
|
type: "Error",
|
|
5134
5166
|
content: _("clipboardReadNotAllowed")
|
|
5135
5167
|
} }, i);
|
|
@@ -5144,14 +5176,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5144
5176
|
onClickCopyClipboard: o(async (e) => {
|
|
5145
5177
|
let t = await v();
|
|
5146
5178
|
if (!t) return;
|
|
5147
|
-
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e :
|
|
5179
|
+
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e : wc).slice(0, n.length), s = (e, t) => t === "comma" ? e.replace(/\./g, ",") : e, c = ll(n, o, a.map((t) => t.map((t) => ur(t) ? "" : s(t.toString(), e))), { delimiter: " " });
|
|
5148
5180
|
try {
|
|
5149
|
-
await navigator.clipboard.writeText(c),
|
|
5181
|
+
await navigator.clipboard.writeText(c), pl({ message: {
|
|
5150
5182
|
type: "Success",
|
|
5151
5183
|
content: _("copiedToClipboard")
|
|
5152
5184
|
} }, i);
|
|
5153
5185
|
} catch (e) {
|
|
5154
|
-
|
|
5186
|
+
pl({ message: {
|
|
5155
5187
|
type: "Error",
|
|
5156
5188
|
content: _("unableToCopyToClipboard"),
|
|
5157
5189
|
details: e.message
|
|
@@ -5161,14 +5193,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5161
5193
|
onSmartUploadResult: o((e) => {
|
|
5162
5194
|
let t = un(e) && dn(e.errorMessage) ? e.errorMessage : void 0;
|
|
5163
5195
|
if (t) {
|
|
5164
|
-
|
|
5196
|
+
pl({ message: {
|
|
5165
5197
|
type: "Error",
|
|
5166
5198
|
content: t || "Smart upload failed."
|
|
5167
5199
|
} }, i);
|
|
5168
5200
|
return;
|
|
5169
5201
|
}
|
|
5170
5202
|
if (!tn(e) || e.length < 2 || !$t(e, (e) => un(e) && $t(_n(e), dn))) {
|
|
5171
|
-
|
|
5203
|
+
pl({ message: {
|
|
5172
5204
|
type: "Error",
|
|
5173
5205
|
content: "Smart upload returned unexpected format.",
|
|
5174
5206
|
details: JSON.stringify(e)
|
|
@@ -5200,14 +5232,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5200
5232
|
]),
|
|
5201
5233
|
deleteAllRows: x
|
|
5202
5234
|
};
|
|
5203
|
-
},
|
|
5235
|
+
}, El = (e, t) => {
|
|
5204
5236
|
var n, r;
|
|
5205
|
-
let { fields: i, rows: a } = e, o =
|
|
5237
|
+
let { fields: i, rows: a } = e, o = ll(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");
|
|
5206
5238
|
c.href = window.URL.createObjectURL(s), c.download = `${t}.csv`, document.body.appendChild(c), c.click(), document.body.removeChild(c);
|
|
5207
|
-
},
|
|
5239
|
+
}, Dl = (e) => ln(e) && "modalKey" in e, Ol = (e, t, n) => Zt(e, (e) => {
|
|
5208
5240
|
if (tn(e) || !un(e)) return;
|
|
5209
5241
|
let { modalKey: r } = e == null ? {} : e;
|
|
5210
|
-
if (
|
|
5242
|
+
if (Dl(e) && typeof e.onClick != "function") {
|
|
5211
5243
|
let i = () => {
|
|
5212
5244
|
var e;
|
|
5213
5245
|
n(r, !((e = t.modalVisibility) != null && e[r]));
|
|
@@ -5217,7 +5249,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5217
5249
|
onClick: i
|
|
5218
5250
|
};
|
|
5219
5251
|
}
|
|
5220
|
-
}),
|
|
5252
|
+
}), kl = (e, t, n) => Ol(e, t, n), Al = {
|
|
5221
5253
|
pastedText: "",
|
|
5222
5254
|
parsedResult: {
|
|
5223
5255
|
isValid: !1,
|
|
@@ -5232,9 +5264,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5232
5264
|
reviewPasteModal: !1,
|
|
5233
5265
|
helpModal: !1
|
|
5234
5266
|
}
|
|
5235
|
-
},
|
|
5267
|
+
}, jl = ({ config: e, smartUploadConfig: t, testId: n }) => {
|
|
5236
5268
|
var r, i, a, o;
|
|
5237
|
-
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: g = !0, copyFromClipBoard: _ = !0, showDeleteOptions: b = !0, showHelpOption: x = !0, showUploadFileOption: S = !0, modals: C = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = m(
|
|
5269
|
+
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: g = !0, copyFromClipBoard: _ = !0, showDeleteOptions: b = !0, showHelpOption: x = !0, showUploadFileOption: S = !0, modals: C = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = m(Al), { 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 = Sl(f), ee = yl(I, s, c), [L, te] = h(), ne = Tl({
|
|
5238
5270
|
config: e,
|
|
5239
5271
|
state: E,
|
|
5240
5272
|
setState: D,
|
|
@@ -5269,14 +5301,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5269
5301
|
onClick: () => R("smartUploadModal", !O),
|
|
5270
5302
|
testId: `${n}-smart-upload`
|
|
5271
5303
|
}] : [],
|
|
5272
|
-
...
|
|
5304
|
+
...kl((r = w == null ? void 0 : w.importOptions) == null ? [] : r, E, R)
|
|
5273
5305
|
] : [], de = [
|
|
5274
5306
|
{
|
|
5275
5307
|
type: "Option",
|
|
5276
5308
|
label: I("downloadFile"),
|
|
5277
5309
|
onClick: async () => {
|
|
5278
5310
|
let e = await ee();
|
|
5279
|
-
e && e &&
|
|
5311
|
+
e && e && El(e, d);
|
|
5280
5312
|
}
|
|
5281
5313
|
},
|
|
5282
5314
|
...p ? [{
|
|
@@ -5301,20 +5333,20 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5301
5333
|
}]
|
|
5302
5334
|
}
|
|
5303
5335
|
}],
|
|
5304
|
-
...
|
|
5336
|
+
...kl((i = w == null ? void 0 : w.exportOptions) == null ? [] : i, E, R)
|
|
5305
5337
|
], fe = b ? [{
|
|
5306
5338
|
type: "Option",
|
|
5307
5339
|
label: I("deleteAllRows"),
|
|
5308
5340
|
onClick: () => z(),
|
|
5309
5341
|
testId: `${n}-delete-all-rows`
|
|
5310
|
-
}, ...
|
|
5342
|
+
}, ...kl((a = w == null ? void 0 : w.deleteOptions) == null ? [] : a, E, R)] : [], pe = x ? [
|
|
5311
5343
|
{ type: "Divider" },
|
|
5312
5344
|
{
|
|
5313
5345
|
type: "Option",
|
|
5314
5346
|
label: I("help"),
|
|
5315
5347
|
onClick: () => R("helpModal", !A)
|
|
5316
5348
|
},
|
|
5317
|
-
...
|
|
5349
|
+
...kl((o = w == null ? void 0 : w.helpOptions) == null ? [] : o, E, R)
|
|
5318
5350
|
] : [], me = [
|
|
5319
5351
|
...ue.length ? [{
|
|
5320
5352
|
section: [...ue, ...pe],
|
|
@@ -5340,13 +5372,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5340
5372
|
small: !0,
|
|
5341
5373
|
dark: !0
|
|
5342
5374
|
}),
|
|
5343
|
-
me.map((e, t) => /* @__PURE__ */ v(
|
|
5375
|
+
me.map((e, t) => /* @__PURE__ */ v(vl, {
|
|
5344
5376
|
sections: e.section,
|
|
5345
5377
|
iconName: e.iconName,
|
|
5346
5378
|
tooltip: e.tooltip,
|
|
5347
5379
|
testId: `data-${e == null ? void 0 : e.name}-menu`
|
|
5348
5380
|
}, t)),
|
|
5349
|
-
k && /* @__PURE__ */ v(
|
|
5381
|
+
k && /* @__PURE__ */ v(gl, {
|
|
5350
5382
|
config: e,
|
|
5351
5383
|
state: E,
|
|
5352
5384
|
updateState: ie,
|
|
@@ -5382,14 +5414,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5382
5414
|
cancelText: I("cancel"),
|
|
5383
5415
|
testId: n
|
|
5384
5416
|
}),
|
|
5385
|
-
/* @__PURE__ */ v(
|
|
5417
|
+
/* @__PURE__ */ v(_l, {
|
|
5386
5418
|
modals: C,
|
|
5387
5419
|
modalVisibility: E == null ? void 0 : E.modalVisibility,
|
|
5388
5420
|
onCloseModal: ae,
|
|
5389
5421
|
testId: n
|
|
5390
5422
|
})
|
|
5391
5423
|
] });
|
|
5392
|
-
},
|
|
5424
|
+
}, Ml = ({ file: e, accept: t, multi: n, name: r, disabled: i, onChange: a = pn, ...o }) => {
|
|
5393
5425
|
let c = s(H), l = p(null), u = () => {
|
|
5394
5426
|
var e;
|
|
5395
5427
|
i || c || (e = l.current) == null || e.click();
|
|
@@ -5417,12 +5449,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5417
5449
|
multiple: n,
|
|
5418
5450
|
onChange: d
|
|
5419
5451
|
})] });
|
|
5420
|
-
},
|
|
5452
|
+
}, Nl = {
|
|
5421
5453
|
label: "_label_uxk69_1",
|
|
5422
5454
|
labelLeft: "_labelLeft_uxk69_5",
|
|
5423
5455
|
icons: "_icons_uxk69_13",
|
|
5424
5456
|
small: "_small_uxk69_27"
|
|
5425
|
-
},
|
|
5457
|
+
}, Pl = ({ label: e = null, width: t = "auto", helpText: n = "", helpTextMaxWidth: r = "300px", onClickHelp: i = void 0, lock: a = {
|
|
5426
5458
|
visible: !1,
|
|
5427
5459
|
active: !1,
|
|
5428
5460
|
onClick: () => {},
|
|
@@ -5431,14 +5463,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5431
5463
|
}, info: o, libraryIcon: s, labelLeft: c = !1, small: l = !1, textTransform: u = Dr.CAPITALIZE }) => {
|
|
5432
5464
|
var d;
|
|
5433
5465
|
return /* @__PURE__ */ v("div", {
|
|
5434
|
-
className: g(
|
|
5466
|
+
className: g(Nl.label, c ? Nl.labelLeft : "", l ? Nl.small : ""),
|
|
5435
5467
|
children: /* @__PURE__ */ y("label", {
|
|
5436
5468
|
style: {
|
|
5437
5469
|
textTransform: u,
|
|
5438
5470
|
width: t || ""
|
|
5439
5471
|
},
|
|
5440
5472
|
children: [e, /* @__PURE__ */ y("div", {
|
|
5441
|
-
className:
|
|
5473
|
+
className: Nl.icons,
|
|
5442
5474
|
children: [
|
|
5443
5475
|
(n || i) && /* @__PURE__ */ v(si, {
|
|
5444
5476
|
text: n,
|
|
@@ -5464,23 +5496,23 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5464
5496
|
})]
|
|
5465
5497
|
})
|
|
5466
5498
|
});
|
|
5467
|
-
},
|
|
5499
|
+
}, Fl = {
|
|
5468
5500
|
field: "_field_1xoss_1",
|
|
5469
5501
|
labelLeft: "_labelLeft_1xoss_5",
|
|
5470
5502
|
fieldInput: "_fieldInput_1xoss_9",
|
|
5471
5503
|
formRow: "_formRow_1xoss_12",
|
|
5472
5504
|
"form-row": "_form-row_1xoss_13",
|
|
5473
5505
|
button: "_button_1xoss_22"
|
|
5474
|
-
},
|
|
5506
|
+
}, Il = ({ label: e, labelLeft: t = !1, labelWidth: n = "auto", children: r, helpText: i, helpTextMaxWidth: a = "300px", onClickHelp: o, lock: s = {
|
|
5475
5507
|
visible: !1,
|
|
5476
5508
|
active: !1,
|
|
5477
5509
|
onClick: () => {},
|
|
5478
5510
|
tooltip: "",
|
|
5479
5511
|
testId: void 0
|
|
5480
5512
|
}, info: c, libraryIcon: l, small: u = !1, testId: d, textTransform: f = Dr.CAPITALIZE }) => /* @__PURE__ */ y("div", {
|
|
5481
|
-
className: g(
|
|
5513
|
+
className: g(Fl.field, t ? Fl.labelLeft : ""),
|
|
5482
5514
|
"data-testid": d,
|
|
5483
|
-
children: [(e || t) && /* @__PURE__ */ v(
|
|
5515
|
+
children: [(e || t) && /* @__PURE__ */ v(Pl, {
|
|
5484
5516
|
label: e,
|
|
5485
5517
|
width: n,
|
|
5486
5518
|
helpText: i,
|
|
@@ -5493,10 +5525,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5493
5525
|
small: u,
|
|
5494
5526
|
textTransform: f
|
|
5495
5527
|
}), /* @__PURE__ */ v("div", {
|
|
5496
|
-
className:
|
|
5528
|
+
className: Fl.fieldInput,
|
|
5497
5529
|
children: r
|
|
5498
5530
|
})]
|
|
5499
|
-
}),
|
|
5531
|
+
}), Ll = ({ 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__ */ v("div", {
|
|
5500
5532
|
style: {
|
|
5501
5533
|
display: "flex",
|
|
5502
5534
|
flexDirection: n,
|
|
@@ -5508,20 +5540,20 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5508
5540
|
gap: s === !1 ? 0 : s === !0 ? "var(--padding)" : typeof s == "number" ? `${s}px` : s
|
|
5509
5541
|
},
|
|
5510
5542
|
children: a
|
|
5511
|
-
}),
|
|
5512
|
-
className:
|
|
5543
|
+
}), Rl = { formRow: "_formRow_odewu_1" }, zl = ({ children: e }) => /* @__PURE__ */ v("div", {
|
|
5544
|
+
className: Rl.formRow,
|
|
5513
5545
|
children: e
|
|
5514
|
-
}),
|
|
5546
|
+
}), Bl = { grid: "_grid_obkz4_1" }, Vl = (e) => typeof e == "boolean" ? e ? "var(--padding)" : "0px" : typeof e == "number" ? `${e}px` : e || "initial", Hl = (e) => typeof e == "number" ? `${e}px` : e || "initial", Ul = ({ rows: e = "initial", columns: t = "initial", columnsTablet: n = null, columnsMobile: r = null, gap: i = !1, height: a = "initial", children: o }) => {
|
|
5515
5547
|
let s = {
|
|
5516
|
-
"--grid-gap":
|
|
5517
|
-
"--grid-rows":
|
|
5518
|
-
"--grid-columns":
|
|
5519
|
-
"--grid-height":
|
|
5520
|
-
...n != null && { "--grid-columns-tablet":
|
|
5521
|
-
...r != null && { "--grid-columns-mobile":
|
|
5548
|
+
"--grid-gap": Vl(i),
|
|
5549
|
+
"--grid-rows": Hl(e),
|
|
5550
|
+
"--grid-columns": Hl(t),
|
|
5551
|
+
"--grid-height": Hl(a),
|
|
5552
|
+
...n != null && { "--grid-columns-tablet": Hl(n) },
|
|
5553
|
+
...r != null && { "--grid-columns-mobile": Hl(r) }
|
|
5522
5554
|
};
|
|
5523
5555
|
return /* @__PURE__ */ v("div", {
|
|
5524
|
-
className:
|
|
5556
|
+
className: Bl.grid,
|
|
5525
5557
|
style: s,
|
|
5526
5558
|
children: o
|
|
5527
5559
|
});
|
|
@@ -5568,15 +5600,15 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5568
5600
|
hideScrollbar: "_hideScrollbar_1dcn1_67",
|
|
5569
5601
|
noPointerEvents: "_noPointerEvents_1dcn1_309",
|
|
5570
5602
|
virtualRows: "_virtualRows_1dcn1_312"
|
|
5571
|
-
},
|
|
5603
|
+
}, Wl = ({ toggleNarrow: e, onClickToggleNarrow: t }) => e ? /* @__PURE__ */ v("a", {
|
|
5572
5604
|
className: Z.toggleNarrow,
|
|
5573
5605
|
onClick: t,
|
|
5574
5606
|
children: /* @__PURE__ */ v(U, { icon: V.CHEVRON_LEFT })
|
|
5575
|
-
}) : null,
|
|
5607
|
+
}) : null, Gl = r(({ name: e, actions: t = [], toggleNarrow: n = !1, onToggleNarrow: r = () => {}, stickyHeader: i }, a) => /* @__PURE__ */ y("div", {
|
|
5576
5608
|
ref: a,
|
|
5577
5609
|
className: g(Z.header, i ? Z.stickyHeader : ""),
|
|
5578
5610
|
children: [
|
|
5579
|
-
/* @__PURE__ */ v(
|
|
5611
|
+
/* @__PURE__ */ v(Wl, {
|
|
5580
5612
|
toggleNarrow: n,
|
|
5581
5613
|
onClickToggleNarrow: r
|
|
5582
5614
|
}),
|
|
@@ -5596,14 +5628,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5596
5628
|
})
|
|
5597
5629
|
})
|
|
5598
5630
|
]
|
|
5599
|
-
})),
|
|
5631
|
+
})), Kl = ({ label: e }) => e ? /* @__PURE__ */ v("span", {
|
|
5600
5632
|
className: Z.label,
|
|
5601
5633
|
children: /* @__PURE__ */ v(Pi, {
|
|
5602
5634
|
color: e.color,
|
|
5603
5635
|
title: e.value,
|
|
5604
5636
|
small: e.small
|
|
5605
5637
|
})
|
|
5606
|
-
}) : null,
|
|
5638
|
+
}) : null, ql = ({ name: e, icon: t, testId: n }) => {
|
|
5607
5639
|
let r = t && /* @__PURE__ */ v(U, {
|
|
5608
5640
|
icon: t.icon,
|
|
5609
5641
|
color: t.color || "#db2828"
|
|
@@ -5623,8 +5655,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5623
5655
|
children: r
|
|
5624
5656
|
})]
|
|
5625
5657
|
});
|
|
5626
|
-
},
|
|
5627
|
-
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ v(
|
|
5658
|
+
}, Jl = ({ item: e }) => {
|
|
5659
|
+
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ v(ql, {
|
|
5628
5660
|
name: t,
|
|
5629
5661
|
icon: n,
|
|
5630
5662
|
testId: o && `${o}-name`
|
|
@@ -5650,10 +5682,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5650
5682
|
})
|
|
5651
5683
|
]
|
|
5652
5684
|
});
|
|
5653
|
-
},
|
|
5685
|
+
}, Yl = ({ item: e }) => e.metaCount === void 0 ? null : /* @__PURE__ */ v(Pi, {
|
|
5654
5686
|
color: "rgba(0,0,0,0.25)",
|
|
5655
5687
|
title: e.metaCount
|
|
5656
|
-
}),
|
|
5688
|
+
}), Xl = ({ item: e, expanding: t }) => /* @__PURE__ */ v(Wr, {
|
|
5657
5689
|
expanded: !!t && !!e.active && !!e.content,
|
|
5658
5690
|
children: /* @__PURE__ */ v("div", {
|
|
5659
5691
|
className: Z.itemContent,
|
|
@@ -5662,7 +5694,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5662
5694
|
},
|
|
5663
5695
|
children: e.content
|
|
5664
5696
|
})
|
|
5665
|
-
}),
|
|
5697
|
+
}), Zl = r(({ item: e, index: t }, n) => {
|
|
5666
5698
|
var r;
|
|
5667
5699
|
let i = s(H), { actions: a, disabled: o, expanded: c, onClick: l, title: u, name: d, icon: f, testId: p } = e;
|
|
5668
5700
|
return /* @__PURE__ */ v("div", {
|
|
@@ -5682,13 +5714,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5682
5714
|
className: g(Z.expandIcon, c && Z.expanded),
|
|
5683
5715
|
children: /* @__PURE__ */ v(U, { icon: V.CHEVRON_RIGHT })
|
|
5684
5716
|
}),
|
|
5685
|
-
/* @__PURE__ */ v(
|
|
5717
|
+
/* @__PURE__ */ v(ql, {
|
|
5686
5718
|
name: d,
|
|
5687
5719
|
icon: f
|
|
5688
5720
|
}),
|
|
5689
5721
|
/* @__PURE__ */ y("div", {
|
|
5690
5722
|
className: Z.right,
|
|
5691
|
-
children: [/* @__PURE__ */ v(
|
|
5723
|
+
children: [/* @__PURE__ */ v(Yl, { item: e }), !(o || i) && a && /* @__PURE__ */ v("div", {
|
|
5692
5724
|
className: Z.actions,
|
|
5693
5725
|
children: /* @__PURE__ */ v(Ji, { actions: (r = e.actions) == null ? [] : r })
|
|
5694
5726
|
})]
|
|
@@ -5696,7 +5728,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5696
5728
|
]
|
|
5697
5729
|
}) })
|
|
5698
5730
|
});
|
|
5699
|
-
}),
|
|
5731
|
+
}), Ql = r(({ item: e, index: t, expanding: n, invokeEditOnRowClick: r, draggable: i }, a) => {
|
|
5700
5732
|
let o = s(H), c = (e, t, s, c, l, u) => {
|
|
5701
5733
|
let d = t.actions && t.actions.find((e) => {
|
|
5702
5734
|
var t;
|
|
@@ -5732,24 +5764,24 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5732
5764
|
className: Z.indentIcon,
|
|
5733
5765
|
children: /* @__PURE__ */ v(U, { icon: V.INDENT })
|
|
5734
5766
|
}) : null,
|
|
5735
|
-
/* @__PURE__ */ v(
|
|
5736
|
-
/* @__PURE__ */ v(
|
|
5767
|
+
/* @__PURE__ */ v(Kl, { label: t.label }),
|
|
5768
|
+
/* @__PURE__ */ v(Jl, { item: t }),
|
|
5737
5769
|
/* @__PURE__ */ y("div", {
|
|
5738
5770
|
className: Z.right,
|
|
5739
|
-
children: [/* @__PURE__ */ v(
|
|
5771
|
+
children: [/* @__PURE__ */ v(Yl, { item: t }), !(t.disabled || o) && t.actions && /* @__PURE__ */ v("div", {
|
|
5740
5772
|
className: Z.actions,
|
|
5741
5773
|
children: /* @__PURE__ */ v(Ji, { actions: t.actions })
|
|
5742
5774
|
})]
|
|
5743
5775
|
})
|
|
5744
5776
|
]
|
|
5745
|
-
}), /* @__PURE__ */ v(
|
|
5777
|
+
}), /* @__PURE__ */ v(Xl, {
|
|
5746
5778
|
item: t,
|
|
5747
5779
|
expanding: n
|
|
5748
5780
|
})]
|
|
5749
5781
|
})
|
|
5750
5782
|
}, e);
|
|
5751
5783
|
};
|
|
5752
|
-
return e.type === "Heading" ? /* @__PURE__ */ v(
|
|
5784
|
+
return e.type === "Heading" ? /* @__PURE__ */ v(Zl, {
|
|
5753
5785
|
ref: a,
|
|
5754
5786
|
item: e,
|
|
5755
5787
|
index: t
|
|
@@ -5764,7 +5796,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5764
5796
|
opacity: +!s
|
|
5765
5797
|
}, n, r, i);
|
|
5766
5798
|
})(t, e) : c(t, e);
|
|
5767
|
-
}),
|
|
5799
|
+
}), $l = ({ children: e, draggable: t, list: n, onListReorder: r }) => {
|
|
5768
5800
|
let [i, a] = m(null), o = (e) => {
|
|
5769
5801
|
a(e.active.id);
|
|
5770
5802
|
}, s = (e) => {
|
|
@@ -5787,7 +5819,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5787
5819
|
dropAnimation: null,
|
|
5788
5820
|
children: /* @__PURE__ */ v("div", {
|
|
5789
5821
|
className: Z.dragOverlay,
|
|
5790
|
-
children: /* @__PURE__ */ v(
|
|
5822
|
+
children: /* @__PURE__ */ v(Ql, {
|
|
5791
5823
|
draggable: t,
|
|
5792
5824
|
item: n.items[Number(i)],
|
|
5793
5825
|
index: Number(i)
|
|
@@ -5795,7 +5827,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5795
5827
|
})
|
|
5796
5828
|
}), document.body)]
|
|
5797
5829
|
}) : e;
|
|
5798
|
-
},
|
|
5830
|
+
}, eu = ({ items: e, scrollDetails: t, children: n }) => {
|
|
5799
5831
|
let { scrollable: r, hideScrollbar: i, triggerScrollToActiveItem: a, infiniteScroll: s } = t, l = p(null), u = ir({
|
|
5800
5832
|
count: e.length,
|
|
5801
5833
|
getScrollElement: () => l.current,
|
|
@@ -5825,9 +5857,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5825
5857
|
children: n({ virtualizer: u })
|
|
5826
5858
|
})
|
|
5827
5859
|
});
|
|
5828
|
-
},
|
|
5860
|
+
}, tu = ({ items: e, scrollDetails: t, children: n }) => {
|
|
5829
5861
|
let { scrollable: r, hideScrollbar: i, infiniteScroll: a } = t;
|
|
5830
|
-
return a ? /* @__PURE__ */ v(
|
|
5862
|
+
return a ? /* @__PURE__ */ v(eu, {
|
|
5831
5863
|
items: e,
|
|
5832
5864
|
scrollDetails: t,
|
|
5833
5865
|
children: ({ virtualizer: e }) => n({ virtualizer: e })
|
|
@@ -5838,7 +5870,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5838
5870
|
children: n({})
|
|
5839
5871
|
})
|
|
5840
5872
|
});
|
|
5841
|
-
},
|
|
5873
|
+
}, nu = ({ 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 = {
|
|
5842
5874
|
scrollable: !1,
|
|
5843
5875
|
hideScrollbar: !1,
|
|
5844
5876
|
triggerScrollToActiveItem: !1,
|
|
@@ -5851,17 +5883,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5851
5883
|
marginBottom: d
|
|
5852
5884
|
},
|
|
5853
5885
|
id: "scrollableDiv",
|
|
5854
|
-
children: [!s && /* @__PURE__ */ v(
|
|
5886
|
+
children: [!s && /* @__PURE__ */ v(Gl, {
|
|
5855
5887
|
name: e.name,
|
|
5856
5888
|
actions: e.actions,
|
|
5857
5889
|
toggleNarrow: i,
|
|
5858
5890
|
onToggleNarrow: a,
|
|
5859
5891
|
stickyHeader: c
|
|
5860
|
-
}), /* @__PURE__ */ v(
|
|
5892
|
+
}), /* @__PURE__ */ v($l, {
|
|
5861
5893
|
draggable: l,
|
|
5862
5894
|
list: e,
|
|
5863
5895
|
onListReorder: u,
|
|
5864
|
-
children: /* @__PURE__ */ v(
|
|
5896
|
+
children: /* @__PURE__ */ v(tu, {
|
|
5865
5897
|
items: e.items,
|
|
5866
5898
|
scrollDetails: m,
|
|
5867
5899
|
children: ({ virtualizer: t }) => t ? t.getVirtualItems().map((r) => /* @__PURE__ */ v("div", {
|
|
@@ -5869,14 +5901,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5869
5901
|
className: Z.virtualRow,
|
|
5870
5902
|
style: { transform: `translateY(${r.start}px)` },
|
|
5871
5903
|
ref: t.measureElement,
|
|
5872
|
-
children: /* @__PURE__ */ v(
|
|
5904
|
+
children: /* @__PURE__ */ v(Ql, {
|
|
5873
5905
|
index: r.index,
|
|
5874
5906
|
draggable: l,
|
|
5875
5907
|
item: e.items[r.index],
|
|
5876
5908
|
expanding: n,
|
|
5877
5909
|
invokeEditOnRowClick: o
|
|
5878
5910
|
})
|
|
5879
|
-
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(
|
|
5911
|
+
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(Ql, {
|
|
5880
5912
|
index: t,
|
|
5881
5913
|
draggable: l,
|
|
5882
5914
|
item: e,
|
|
@@ -5885,7 +5917,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5885
5917
|
}) }, t))
|
|
5886
5918
|
})
|
|
5887
5919
|
})]
|
|
5888
|
-
}),
|
|
5920
|
+
}), ru = {
|
|
5889
5921
|
loader: "_loader_477i5_1",
|
|
5890
5922
|
fullViewPortSize: "_fullViewPortSize_477i5_7",
|
|
5891
5923
|
cover: "_cover_477i5_14",
|
|
@@ -5893,33 +5925,33 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5893
5925
|
content: "_content_477i5_44",
|
|
5894
5926
|
text: "_text_477i5_49",
|
|
5895
5927
|
details: "_details_477i5_53"
|
|
5896
|
-
},
|
|
5928
|
+
}, iu = ({ width: e, height: t, text: n = "", details: r = "", fullViewPortSize: i = !1, cover: a = !1, children: o = null, theme: s = Or.DARK, testId: c = null }) => {
|
|
5897
5929
|
let l = s === Or.DARK ? Or.WHITE : Or.INHERIT, u = s === "white" ? "var(--color-background-raised)" : s === "light" ? "var(--color-background)" : "black";
|
|
5898
5930
|
return /* @__PURE__ */ v("div", {
|
|
5899
|
-
className: g(
|
|
5931
|
+
className: g(ru.loader, a ? ru.cover : "", { [ru.fullViewPortSize]: i }),
|
|
5900
5932
|
style: {
|
|
5901
5933
|
width: e,
|
|
5902
5934
|
height: t
|
|
5903
5935
|
},
|
|
5904
5936
|
"data-testid": c,
|
|
5905
5937
|
children: /* @__PURE__ */ v("div", {
|
|
5906
|
-
className:
|
|
5938
|
+
className: ru.dimmer,
|
|
5907
5939
|
style: {
|
|
5908
5940
|
background: u,
|
|
5909
5941
|
color: l
|
|
5910
5942
|
},
|
|
5911
5943
|
children: /* @__PURE__ */ y("div", {
|
|
5912
|
-
className:
|
|
5944
|
+
className: ru.content,
|
|
5913
5945
|
"data-testid": c && `${c}-content`,
|
|
5914
5946
|
children: [
|
|
5915
5947
|
o,
|
|
5916
5948
|
n && /* @__PURE__ */ v("div", {
|
|
5917
|
-
className:
|
|
5949
|
+
className: ru.text,
|
|
5918
5950
|
"data-testid": c && `${c}-text`,
|
|
5919
5951
|
children: n
|
|
5920
5952
|
}),
|
|
5921
5953
|
r && /* @__PURE__ */ v("div", {
|
|
5922
|
-
className:
|
|
5954
|
+
className: ru.details,
|
|
5923
5955
|
"data-testid": c && `${c}-details`,
|
|
5924
5956
|
children: r
|
|
5925
5957
|
})
|
|
@@ -5927,15 +5959,15 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5927
5959
|
})
|
|
5928
5960
|
})
|
|
5929
5961
|
});
|
|
5930
|
-
},
|
|
5962
|
+
}, au = {
|
|
5931
5963
|
menu: "_menu_12x4u_1",
|
|
5932
5964
|
header: "_header_12x4u_11",
|
|
5933
5965
|
item: "_item_12x4u_27",
|
|
5934
5966
|
heading: "_heading_12x4u_32"
|
|
5935
|
-
},
|
|
5967
|
+
}, ou = ({ option: e, onChange: t }) => {
|
|
5936
5968
|
let { key: n, label: r, selected: i, testId: a } = e == null ? {} : e;
|
|
5937
5969
|
return /* @__PURE__ */ v("div", {
|
|
5938
|
-
className:
|
|
5970
|
+
className: au.item,
|
|
5939
5971
|
children: /* @__PURE__ */ v(ci, {
|
|
5940
5972
|
label: r,
|
|
5941
5973
|
noMargin: !0,
|
|
@@ -5944,17 +5976,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5944
5976
|
testId: a
|
|
5945
5977
|
})
|
|
5946
5978
|
}, n);
|
|
5947
|
-
},
|
|
5948
|
-
className:
|
|
5979
|
+
}, su = ({ label: e }) => /* @__PURE__ */ v("div", {
|
|
5980
|
+
className: au.heading,
|
|
5949
5981
|
children: e
|
|
5950
|
-
}),
|
|
5982
|
+
}), cu = /* @__PURE__ */ function(e) {
|
|
5951
5983
|
return e.HEADING = "Heading", e.DIVIDER = "Divider", e.DEFAULT = "Default", e;
|
|
5952
|
-
}({}),
|
|
5953
|
-
className: g("menu",
|
|
5984
|
+
}({}), lu = ({ options: e, onChangeOptions: t, showHeader: n, maxHeight: r, testId: i }) => /* @__PURE__ */ y("div", {
|
|
5985
|
+
className: g("menu", au.menu),
|
|
5954
5986
|
style: { maxHeight: r },
|
|
5955
5987
|
"data-testid": i ? `${i}-option-dropdown-layer` : void 0,
|
|
5956
5988
|
children: [n && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
|
|
5957
|
-
className:
|
|
5989
|
+
className: au.header,
|
|
5958
5990
|
children: [
|
|
5959
5991
|
/* @__PURE__ */ v("a", {
|
|
5960
5992
|
onClick: (n) => {
|
|
@@ -5986,9 +6018,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5986
6018
|
]
|
|
5987
6019
|
}), /* @__PURE__ */ v(_a, { margin: 0 })] }), e.map((n, r) => {
|
|
5988
6020
|
switch (n.type) {
|
|
5989
|
-
case
|
|
5990
|
-
case
|
|
5991
|
-
default: return /* @__PURE__ */ v(
|
|
6021
|
+
case cu.HEADING: return /* @__PURE__ */ v(su, { label: n.label }, r);
|
|
6022
|
+
case cu.DIVIDER: return /* @__PURE__ */ v(_a, { margin: 0 }, r);
|
|
6023
|
+
default: return /* @__PURE__ */ v(ou, {
|
|
5992
6024
|
option: n,
|
|
5993
6025
|
onChange: (r) => {
|
|
5994
6026
|
let { value: i } = n;
|
|
@@ -6000,7 +6032,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6000
6032
|
}, r);
|
|
6001
6033
|
}
|
|
6002
6034
|
})]
|
|
6003
|
-
}),
|
|
6035
|
+
}), uu = ({ name: e, disabled: t, label: n, options: r, onChange: i, small: a = !1, showHeader: o = !0, maxHeight: s = "40vh", testId: c }) => /* @__PURE__ */ v(Ki, {
|
|
6004
6036
|
testId: c,
|
|
6005
6037
|
disabled: t,
|
|
6006
6038
|
menu: {
|
|
@@ -6009,7 +6041,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6009
6041
|
label: n,
|
|
6010
6042
|
trigger: Cr.DROP_DOWN_BUTTON,
|
|
6011
6043
|
possiblePlacements: ["top-start", "bottom-start"],
|
|
6012
|
-
sections: /* @__PURE__ */ v(
|
|
6044
|
+
sections: /* @__PURE__ */ v(lu, {
|
|
6013
6045
|
testId: c,
|
|
6014
6046
|
options: r,
|
|
6015
6047
|
onChangeOptions: (t, n) => {
|
|
@@ -6019,13 +6051,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6019
6051
|
maxHeight: s
|
|
6020
6052
|
})
|
|
6021
6053
|
}
|
|
6022
|
-
}),
|
|
6054
|
+
}), du = {
|
|
6023
6055
|
page: "_page_beskc_1",
|
|
6024
6056
|
scroll: "_scroll_beskc_23"
|
|
6025
|
-
},
|
|
6057
|
+
}, fu = ({ children: e, left: t = "var(--size-sidebar)", padding: n = !0, scroll: r = !0, top: i = "var(--size-topbar)" }) => {
|
|
6026
6058
|
let a = typeof n == "string" ? n : n === !0 ? "var(--padding)" : "0";
|
|
6027
6059
|
return /* @__PURE__ */ v("div", {
|
|
6028
|
-
className: g(
|
|
6060
|
+
className: g(du.page, r ? du.scroll : ""),
|
|
6029
6061
|
style: {
|
|
6030
6062
|
left: t,
|
|
6031
6063
|
padding: a,
|
|
@@ -6033,25 +6065,25 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6033
6065
|
},
|
|
6034
6066
|
children: e
|
|
6035
6067
|
});
|
|
6036
|
-
},
|
|
6068
|
+
}, pu = { printHeader: "_printHeader_o7xxx_1" }, mu = ({ logo: e, alt: t, logoWidth: n = "100px" }) => /* @__PURE__ */ v("img", {
|
|
6037
6069
|
src: e,
|
|
6038
6070
|
alt: t,
|
|
6039
|
-
className:
|
|
6071
|
+
className: pu.printHeader,
|
|
6040
6072
|
style: { width: n }
|
|
6041
|
-
}),
|
|
6073
|
+
}), hu = ({ name: e, label: t, options: n, value: r, onChange: i, disabled: a = !1, small: o = !1, noMargin: c = !1, onClick: l = () => {}, inline: u = !1, mainLabel: d = "", radioButtonsData: f, classForContainer: p = "grouped fields" }) => {
|
|
6042
6074
|
let m = s(H), h = f !== void 0, { simpleInputs: _, options: b, selectedOptions: x } = h ? {
|
|
6043
6075
|
simpleInputs: !1,
|
|
6044
6076
|
options: f,
|
|
6045
6077
|
selectedOptions: void 0
|
|
6046
6078
|
} : Ss(n, r), S = h || x == null ? void 0 : _ ? x : x.value, C = h ? d : t;
|
|
6047
6079
|
return /* @__PURE__ */ y("div", {
|
|
6048
|
-
className: g(
|
|
6080
|
+
className: g(lc.wrapper, u ? lc.inline : null, p === "inline fields" ? lc.inline : null),
|
|
6049
6081
|
children: [d && /* @__PURE__ */ v("label", {
|
|
6050
|
-
className: g(u &&
|
|
6082
|
+
className: g(u && lc.labelMargin),
|
|
6051
6083
|
children: C
|
|
6052
6084
|
}), b.map((t, n) => {
|
|
6053
6085
|
let r = (t == null ? void 0 : t.checked) || (t == null ? void 0 : t.value) === S || !1;
|
|
6054
|
-
return /* @__PURE__ */ v(
|
|
6086
|
+
return /* @__PURE__ */ v(uc, {
|
|
6055
6087
|
name: t.name || t.value,
|
|
6056
6088
|
label: t.label,
|
|
6057
6089
|
value: t.value,
|
|
@@ -6069,44 +6101,44 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6069
6101
|
}, n);
|
|
6070
6102
|
})]
|
|
6071
6103
|
});
|
|
6072
|
-
},
|
|
6104
|
+
}, gu = {
|
|
6073
6105
|
richTextToolbar: "_richTextToolbar_1gbkk_1",
|
|
6074
6106
|
richTextToolbarContainer: "_richTextToolbarContainer_1gbkk_5"
|
|
6075
|
-
},
|
|
6107
|
+
}, _u = /* @__PURE__ */ function(e) {
|
|
6076
6108
|
return e.BOLD = "bold", e.ITALIC = "italic", e.CODE = "code", e.UL = "ul", e.OL = "ol", e;
|
|
6077
|
-
}({}),
|
|
6109
|
+
}({}), vu = ({ editor: e, disabled: t = !1, toolbarComponent: n = null }) => {
|
|
6078
6110
|
var r, i, a, o, s;
|
|
6079
6111
|
let c = [
|
|
6080
6112
|
{
|
|
6081
|
-
icon:
|
|
6113
|
+
icon: _u.BOLD,
|
|
6082
6114
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBold().run(),
|
|
6083
6115
|
active: (r = e == null ? void 0 : e.isActive("bold")) == null ? !1 : r
|
|
6084
6116
|
},
|
|
6085
6117
|
{
|
|
6086
|
-
icon:
|
|
6118
|
+
icon: _u.ITALIC,
|
|
6087
6119
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleItalic().run(),
|
|
6088
6120
|
active: (i = e == null ? void 0 : e.isActive("italic")) == null ? !1 : i
|
|
6089
6121
|
},
|
|
6090
6122
|
{
|
|
6091
|
-
icon:
|
|
6123
|
+
icon: _u.CODE,
|
|
6092
6124
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleCode().run(),
|
|
6093
6125
|
active: (a = e == null ? void 0 : e.isActive("code")) == null ? !1 : a
|
|
6094
6126
|
},
|
|
6095
6127
|
{
|
|
6096
|
-
icon:
|
|
6128
|
+
icon: _u.UL,
|
|
6097
6129
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBulletList().run(),
|
|
6098
6130
|
active: (o = e == null ? void 0 : e.isActive("bulletList")) == null ? !1 : o
|
|
6099
6131
|
},
|
|
6100
6132
|
{
|
|
6101
|
-
icon:
|
|
6133
|
+
icon: _u.OL,
|
|
6102
6134
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleOrderedList().run(),
|
|
6103
6135
|
active: (s = e == null ? void 0 : e.isActive("orderedList")) == null ? !1 : s
|
|
6104
6136
|
}
|
|
6105
6137
|
];
|
|
6106
6138
|
return /* @__PURE__ */ y("div", {
|
|
6107
|
-
className:
|
|
6139
|
+
className: gu.richTextToolbarContainer,
|
|
6108
6140
|
children: [/* @__PURE__ */ v("div", {
|
|
6109
|
-
className:
|
|
6141
|
+
className: gu.richTextToolbar,
|
|
6110
6142
|
children: c.map((e, n) => /* @__PURE__ */ v(K, {
|
|
6111
6143
|
small: !0,
|
|
6112
6144
|
round: !0,
|
|
@@ -6119,7 +6151,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6119
6151
|
}, n))
|
|
6120
6152
|
}), n]
|
|
6121
6153
|
});
|
|
6122
|
-
},
|
|
6154
|
+
}, yu = {
|
|
6123
6155
|
inputInTable: "_inputInTable_gb097_1",
|
|
6124
6156
|
inputHover: "_inputHover_gb097_13",
|
|
6125
6157
|
inputFocus: "_inputFocus_gb097_18",
|
|
@@ -6128,7 +6160,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6128
6160
|
inputDisabled: "_inputDisabled_gb097_61",
|
|
6129
6161
|
hideScrollbars: "_hideScrollbars_gb097_67",
|
|
6130
6162
|
richTextInput: "_richTextInput_gb097_77"
|
|
6131
|
-
},
|
|
6163
|
+
}, bu = a(r(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i }, a) => {
|
|
6132
6164
|
let o = s(H), u = r || o, d = fr({
|
|
6133
6165
|
extensions: [
|
|
6134
6166
|
pr,
|
|
@@ -6155,17 +6187,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6155
6187
|
clearContent: () => d == null ? void 0 : d.commands.clearContent(!1),
|
|
6156
6188
|
editor: d
|
|
6157
6189
|
}), [d]), /* @__PURE__ */ y("div", {
|
|
6158
|
-
className:
|
|
6159
|
-
children: [/* @__PURE__ */ v(
|
|
6190
|
+
className: yu.richTextInput,
|
|
6191
|
+
children: [/* @__PURE__ */ v(vu, {
|
|
6160
6192
|
editor: d,
|
|
6161
6193
|
disabled: u,
|
|
6162
6194
|
toolbarComponent: i
|
|
6163
6195
|
}), /* @__PURE__ */ v(dr, { editor: d })]
|
|
6164
6196
|
});
|
|
6165
|
-
})),
|
|
6197
|
+
})), xu = { row: "_row_n16je_1" }, Su = ({ alignItems: t = "initial", justifyContent: n = "initial", children: r = null, flex: a = !1, height: o = "auto", marginBottom: s = "0", marginTop: c = "0", spacing: l = "var(--padding)", wrap: u = !1, testId: d = null }) => {
|
|
6166
6198
|
let f = typeof l == "number" ? `${l}px` : l, p = (r === null || r === !1 ? [] : Array.isArray(r) ? r.filter((e) => i(e)) : [r]).map((t, n) => /* @__PURE__ */ v(e.Fragment, { children: e.cloneElement(t, { spacing: f }) }, n));
|
|
6167
6199
|
return /* @__PURE__ */ v("div", {
|
|
6168
|
-
className: g(
|
|
6200
|
+
className: g(xu.row),
|
|
6169
6201
|
style: {
|
|
6170
6202
|
alignItems: t,
|
|
6171
6203
|
justifyContent: n,
|
|
@@ -6181,7 +6213,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6181
6213
|
"data-testid": d,
|
|
6182
6214
|
children: p
|
|
6183
6215
|
});
|
|
6184
|
-
},
|
|
6216
|
+
}, Cu = {
|
|
6185
6217
|
inputInTable: "_inputInTable_1oy1z_1",
|
|
6186
6218
|
inputHover: "_inputHover_1oy1z_13",
|
|
6187
6219
|
inputFocus: "_inputFocus_1oy1z_18",
|
|
@@ -6200,7 +6232,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6200
6232
|
experimental: "_experimental_1oy1z_155",
|
|
6201
6233
|
active: "_active_1oy1z_159",
|
|
6202
6234
|
icon: "_icon_1oy1z_163"
|
|
6203
|
-
},
|
|
6235
|
+
}, wu = a(({ isOpen: e, label: t, icon: n, invalid: r }) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(W, {
|
|
6204
6236
|
text: t,
|
|
6205
6237
|
enabled: !e,
|
|
6206
6238
|
placement: "right-center",
|
|
@@ -6209,7 +6241,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6209
6241
|
padding: "var(--padding-sm)",
|
|
6210
6242
|
display: "block",
|
|
6211
6243
|
children: /* @__PURE__ */ v("span", {
|
|
6212
|
-
className:
|
|
6244
|
+
className: Cu.icon,
|
|
6213
6245
|
children: /* @__PURE__ */ v(Pi, {
|
|
6214
6246
|
small: !0,
|
|
6215
6247
|
title: r ? "!" : void 0,
|
|
@@ -6218,18 +6250,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6218
6250
|
})
|
|
6219
6251
|
})
|
|
6220
6252
|
}), /* @__PURE__ */ v("span", {
|
|
6221
|
-
className:
|
|
6253
|
+
className: Cu.label,
|
|
6222
6254
|
children: t
|
|
6223
|
-
})] }), (e, t) => er(e, t)),
|
|
6224
|
-
className:
|
|
6255
|
+
})] }), (e, t) => er(e, t)), Tu = ({ isOpen: e, items: t, sectionIndex: n, onClick: r, testId: i }) => /* @__PURE__ */ v("div", {
|
|
6256
|
+
className: Cu.list,
|
|
6225
6257
|
children: t.map((t, a) => {
|
|
6226
6258
|
let o = `${n}_${a}`;
|
|
6227
6259
|
return /* @__PURE__ */ v("a", {
|
|
6228
6260
|
href: t.value,
|
|
6229
|
-
className: g(
|
|
6261
|
+
className: g(Cu.item, t.isActive ? Cu.active : "", t.isExperimental ? Cu.experimental : ""),
|
|
6230
6262
|
onClick: (e) => r(e, t.value, t.label, t.onClick),
|
|
6231
6263
|
"data-testid": i,
|
|
6232
|
-
children: /* @__PURE__ */ v(
|
|
6264
|
+
children: /* @__PURE__ */ v(wu, {
|
|
6233
6265
|
label: t.label,
|
|
6234
6266
|
icon: t.icon,
|
|
6235
6267
|
invalid: t.invalid,
|
|
@@ -6237,16 +6269,16 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6237
6269
|
}, o)
|
|
6238
6270
|
}, o);
|
|
6239
6271
|
})
|
|
6240
|
-
}),
|
|
6241
|
-
className:
|
|
6272
|
+
}), Eu = ({ isOpen: t, sections: n, onClick: r }) => /* @__PURE__ */ v(_, { children: n.map((n, i) => /* @__PURE__ */ y(e.Fragment, { children: [/* @__PURE__ */ v("h5", {
|
|
6273
|
+
className: Cu.subtitle,
|
|
6242
6274
|
children: n.heading.toUpperCase()
|
|
6243
|
-
}), /* @__PURE__ */ v(
|
|
6275
|
+
}), /* @__PURE__ */ v(Tu, {
|
|
6244
6276
|
isOpen: t,
|
|
6245
6277
|
items: n.items,
|
|
6246
6278
|
sectionIndex: i,
|
|
6247
6279
|
onClick: r,
|
|
6248
6280
|
testId: n.testId
|
|
6249
|
-
})] }, i)) }),
|
|
6281
|
+
})] }, i)) }), Du = a(({ options: e, startOpen: t = !1, onShiftClickToggleOpen: n = () => {}, top: r }) => {
|
|
6250
6282
|
let [i, a] = m(t), o = (e, t, n, r) => {
|
|
6251
6283
|
e.preventDefault(), typeof r == "function" && (e.currentTarget.value = t, e.currentTarget.label = n, r(e)), a(!1);
|
|
6252
6284
|
}, s = e.sections.length > 0;
|
|
@@ -6267,13 +6299,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6267
6299
|
icon: V.LEFT
|
|
6268
6300
|
}),
|
|
6269
6301
|
children: /* @__PURE__ */ v("div", {
|
|
6270
|
-
className: g(
|
|
6302
|
+
className: g(Cu.sidebar, i ? "" : Cu.collapsed),
|
|
6271
6303
|
children: s && /* @__PURE__ */ y("div", {
|
|
6272
|
-
className:
|
|
6304
|
+
className: Cu.inner,
|
|
6273
6305
|
children: [/* @__PURE__ */ v("h4", {
|
|
6274
|
-
className:
|
|
6306
|
+
className: Cu.title,
|
|
6275
6307
|
children: e.title
|
|
6276
|
-
}), /* @__PURE__ */ v(
|
|
6308
|
+
}), /* @__PURE__ */ v(Eu, {
|
|
6277
6309
|
isOpen: i,
|
|
6278
6310
|
sections: e.sections,
|
|
6279
6311
|
onClick: o
|
|
@@ -6281,18 +6313,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6281
6313
|
})
|
|
6282
6314
|
})
|
|
6283
6315
|
});
|
|
6284
|
-
}, (e, t) => er(e, t)),
|
|
6316
|
+
}, (e, t) => er(e, t)), Ou = {
|
|
6285
6317
|
skeletonContainer: "_skeletonContainer_mcfxp_9",
|
|
6286
6318
|
skeleton: "_skeleton_mcfxp_9"
|
|
6287
|
-
},
|
|
6319
|
+
}, ku = ({ count: e, width: t, height: n }) => /* @__PURE__ */ v(gr, {
|
|
6288
6320
|
baseColor: "var(--color-skeleton-base)",
|
|
6289
6321
|
highlightColor: "var(--color-skeleton-highlight)",
|
|
6290
|
-
containerClassName:
|
|
6291
|
-
className:
|
|
6322
|
+
containerClassName: Ou.skeletonContainer,
|
|
6323
|
+
className: Ou.skeleton,
|
|
6292
6324
|
count: e,
|
|
6293
6325
|
width: t,
|
|
6294
6326
|
height: n
|
|
6295
|
-
}),
|
|
6327
|
+
}), Au = {
|
|
6296
6328
|
tabs: "_tabs_1y79t_1",
|
|
6297
6329
|
padding: "_padding_1y79t_7",
|
|
6298
6330
|
margin: "_margin_1y79t_11",
|
|
@@ -6303,12 +6335,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6303
6335
|
disabled: "_disabled_1y79t_61",
|
|
6304
6336
|
left: "_left_1y79t_65",
|
|
6305
6337
|
right: "_right_1y79t_65"
|
|
6306
|
-
},
|
|
6338
|
+
}, ju = ({ label: e, url: t, hidden: n, disabled: r, active: i, onClick: a, right: o, invalid: s, badge: c, testId: l }) => {
|
|
6307
6339
|
let u = getComputedStyle(document.body).getPropertyValue("--color-text-error");
|
|
6308
6340
|
return /* @__PURE__ */ v("a", {
|
|
6309
6341
|
id: e == null ? void 0 : e.toString(),
|
|
6310
6342
|
href: t,
|
|
6311
|
-
className: g(
|
|
6343
|
+
className: g(Au.item, i ? Au.active : "", r ? Au.disabled : "", n && !i ? Au.hidden : "", o ? Au.right : Au.left),
|
|
6312
6344
|
onClick: a,
|
|
6313
6345
|
"data-testid": l,
|
|
6314
6346
|
children: s ? /* @__PURE__ */ v(Pi, {
|
|
@@ -6324,10 +6356,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6324
6356
|
children: e
|
|
6325
6357
|
}) : e
|
|
6326
6358
|
});
|
|
6327
|
-
},
|
|
6328
|
-
className: g(n ?
|
|
6359
|
+
}, Mu = ({ children: e, activeTabIndex: t, contentPadding: n }) => Array.isArray(e) ? /* @__PURE__ */ v("div", {
|
|
6360
|
+
className: g(n ? Au.contentPadding : ""),
|
|
6329
6361
|
children: e.map((e, n) => t === n && e)
|
|
6330
|
-
}) : null,
|
|
6362
|
+
}) : null, Nu = ({ name: e = void 0, options: t = null, children: n = null, value: r = void 0, onChange: i = pn, padding: a = !1, margin: o = !0, contentPadding: c = !0, onChangeTab: l, activeTabIndex: u = void 0, tabs: d = void 0, testId: f }) => {
|
|
6331
6363
|
let p = s(H), m = l !== void 0, h = n ? n.map((e, t) => {
|
|
6332
6364
|
var n;
|
|
6333
6365
|
return {
|
|
@@ -6351,11 +6383,11 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6351
6383
|
}
|
|
6352
6384
|
};
|
|
6353
6385
|
return b ? /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
|
|
6354
|
-
className: g(
|
|
6386
|
+
className: g(Au.tabs, a ? Au.padding : "", o ? Au.margin : ""),
|
|
6355
6387
|
"data-testid": f,
|
|
6356
6388
|
children: b.map((e, t) => {
|
|
6357
6389
|
let { label: n, url: r, hidden: i, disabled: a, value: o, right: s, invalid: c, badge: l, testId: u } = e;
|
|
6358
|
-
return /* @__PURE__ */ v(
|
|
6390
|
+
return /* @__PURE__ */ v(ju, {
|
|
6359
6391
|
label: n,
|
|
6360
6392
|
url: r,
|
|
6361
6393
|
hidden: i,
|
|
@@ -6368,12 +6400,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6368
6400
|
testId: u
|
|
6369
6401
|
}, t);
|
|
6370
6402
|
})
|
|
6371
|
-
}), /* @__PURE__ */ v(
|
|
6403
|
+
}), /* @__PURE__ */ v(Mu, {
|
|
6372
6404
|
activeTabIndex: w == null ? 0 : w,
|
|
6373
6405
|
contentPadding: c,
|
|
6374
6406
|
children: n
|
|
6375
6407
|
})] }) : null;
|
|
6376
|
-
},
|
|
6408
|
+
}, Pu = ({ children: e, href: t = void 0, target: n = void 0, testId: r, onClick: i, component: a = "a" }) => /* @__PURE__ */ v(a, {
|
|
6377
6409
|
href: t,
|
|
6378
6410
|
to: t,
|
|
6379
6411
|
target: n,
|
|
@@ -6383,7 +6415,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6383
6415
|
link: !0,
|
|
6384
6416
|
children: e
|
|
6385
6417
|
})
|
|
6386
|
-
}),
|
|
6418
|
+
}), Fu = {
|
|
6387
6419
|
inputInTable: "_inputInTable_q0tl0_1",
|
|
6388
6420
|
inputHover: "_inputHover_q0tl0_13",
|
|
6389
6421
|
inputFocus: "_inputFocus_q0tl0_18",
|
|
@@ -6394,9 +6426,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6394
6426
|
textarea: "_textarea_q0tl0_77",
|
|
6395
6427
|
small: "_small_q0tl0_116",
|
|
6396
6428
|
monospace: "_monospace_q0tl0_155"
|
|
6397
|
-
},
|
|
6429
|
+
}, Iu = ({ name: e, value: t = "", placeholder: n = "", cols: r, rows: i, disabled: a = !1, onChange: o = pn, onKeyPress: c = pn, onFocus: l = pn, onBlur: u = pn, tabIndex: d = 0, error: f = null, warning: p = null, tooltip: m = null, maxTooltipWidth: h, resize: _, monospace: y = !1, small: b = !1, testId: x }) => {
|
|
6398
6430
|
let S = s(H), C = /* @__PURE__ */ v("textarea", {
|
|
6399
|
-
className: g(
|
|
6431
|
+
className: g(Fu.textarea, f ? Fu.error : "", p ? Fu.warning : "", y ? Fu.monospace : "", b ? Fu.small : ""),
|
|
6400
6432
|
name: e,
|
|
6401
6433
|
value: t,
|
|
6402
6434
|
placeholder: n,
|
|
@@ -6438,10 +6470,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6438
6470
|
menu: "_menu_oyr59_139",
|
|
6439
6471
|
active: "_active_oyr59_168",
|
|
6440
6472
|
alert: "_alert_oyr59_193"
|
|
6441
|
-
},
|
|
6473
|
+
}, Lu = ({ warning: e }) => /* @__PURE__ */ v("div", {
|
|
6442
6474
|
className: Q.alert,
|
|
6443
6475
|
children: e
|
|
6444
|
-
}),
|
|
6476
|
+
}), Ru = ({ icon: e, url: t, onClick: n }) => {
|
|
6445
6477
|
let r = /* @__PURE__ */ v(U, { icon: e });
|
|
6446
6478
|
return t ? /* @__PURE__ */ v("a", {
|
|
6447
6479
|
href: t,
|
|
@@ -6453,7 +6485,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6453
6485
|
className: Q.appSwitcher,
|
|
6454
6486
|
children: r
|
|
6455
6487
|
});
|
|
6456
|
-
},
|
|
6488
|
+
}, zu = ({ label: e, logo: t, url: n, version: r, onClick: i }) => {
|
|
6457
6489
|
let a = /* @__PURE__ */ y("div", {
|
|
6458
6490
|
className: Q.title,
|
|
6459
6491
|
children: [
|
|
@@ -6482,9 +6514,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6482
6514
|
children: a
|
|
6483
6515
|
})
|
|
6484
6516
|
});
|
|
6485
|
-
},
|
|
6517
|
+
}, Bu = /* @__PURE__ */ function(e) {
|
|
6486
6518
|
return e.LINK = "Link", e.BUTTON = "Button", e.MENU = "Menu", e.COMPONENT = "Component", e;
|
|
6487
|
-
}({}),
|
|
6519
|
+
}({}), Vu = ({ label: e, url: t, icon: n, onClick: r, active: i, disabled: a, testId: o, component: c = "a" }) => {
|
|
6488
6520
|
let l = s(H);
|
|
6489
6521
|
return /* @__PURE__ */ y(c, {
|
|
6490
6522
|
className: g(Q.link, i ? Q.active : ""),
|
|
@@ -6501,11 +6533,11 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6501
6533
|
children: e
|
|
6502
6534
|
})]
|
|
6503
6535
|
});
|
|
6504
|
-
},
|
|
6536
|
+
}, Hu = ({ element: e }) => {
|
|
6505
6537
|
switch (e.type) {
|
|
6506
|
-
case
|
|
6538
|
+
case Bu.LINK: return /* @__PURE__ */ v("div", {
|
|
6507
6539
|
className: Q.item,
|
|
6508
|
-
children: /* @__PURE__ */ v(
|
|
6540
|
+
children: /* @__PURE__ */ v(Vu, {
|
|
6509
6541
|
label: e.label,
|
|
6510
6542
|
url: e.url,
|
|
6511
6543
|
icon: e.icon,
|
|
@@ -6516,7 +6548,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6516
6548
|
component: e.component
|
|
6517
6549
|
})
|
|
6518
6550
|
});
|
|
6519
|
-
case
|
|
6551
|
+
case Bu.BUTTON: return /* @__PURE__ */ v("div", {
|
|
6520
6552
|
className: g(Q.item, Q.button),
|
|
6521
6553
|
children: /* @__PURE__ */ v(K, {
|
|
6522
6554
|
label: e.label,
|
|
@@ -6528,7 +6560,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6528
6560
|
testId: e.testId
|
|
6529
6561
|
})
|
|
6530
6562
|
});
|
|
6531
|
-
case
|
|
6563
|
+
case Bu.MENU: return /* @__PURE__ */ v("div", {
|
|
6532
6564
|
className: g(Q.item, Q.menu),
|
|
6533
6565
|
children: /* @__PURE__ */ v(Ki, {
|
|
6534
6566
|
maxHeight: "100%",
|
|
@@ -6536,7 +6568,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6536
6568
|
trigger: Cr.COMPONENT,
|
|
6537
6569
|
fullHeightTrigger: !0,
|
|
6538
6570
|
placement: "bottom-start",
|
|
6539
|
-
component: /* @__PURE__ */ v(
|
|
6571
|
+
component: /* @__PURE__ */ v(Vu, {
|
|
6540
6572
|
label: e.label,
|
|
6541
6573
|
icon: e.icon,
|
|
6542
6574
|
onClick: e.onClick
|
|
@@ -6545,50 +6577,50 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6545
6577
|
}
|
|
6546
6578
|
})
|
|
6547
6579
|
});
|
|
6548
|
-
case
|
|
6580
|
+
case Bu.COMPONENT: return /* @__PURE__ */ v("div", {
|
|
6549
6581
|
className: Q.item,
|
|
6550
6582
|
children: e.component
|
|
6551
6583
|
});
|
|
6552
6584
|
default: return null;
|
|
6553
6585
|
}
|
|
6554
|
-
},
|
|
6586
|
+
}, Uu = ({ title: e, appSwitcher: t, content: n = [], contentRight: r = [], warning: i = "", height: a = "var(--size-topbar)", fixedPosition: o = !0 }) => /* @__PURE__ */ y("div", { children: [i && /* @__PURE__ */ v(Lu, { warning: i }), /* @__PURE__ */ y("div", {
|
|
6555
6587
|
className: g(Q.topbar, o ? Q.fixed : ""),
|
|
6556
6588
|
style: { height: a },
|
|
6557
6589
|
children: [
|
|
6558
|
-
!!t && /* @__PURE__ */ v(
|
|
6590
|
+
!!t && /* @__PURE__ */ v(Ru, {
|
|
6559
6591
|
icon: t.icon,
|
|
6560
6592
|
url: t.url,
|
|
6561
6593
|
onClick: t.onClick
|
|
6562
6594
|
}),
|
|
6563
6595
|
/* @__PURE__ */ y("div", {
|
|
6564
6596
|
className: Q.left,
|
|
6565
|
-
children: [e && /* @__PURE__ */ v(
|
|
6597
|
+
children: [e && /* @__PURE__ */ v(zu, {
|
|
6566
6598
|
label: e.label,
|
|
6567
6599
|
logo: e.logo,
|
|
6568
6600
|
url: e.url,
|
|
6569
6601
|
version: e.version,
|
|
6570
6602
|
onClick: e.onClick
|
|
6571
|
-
}), n.map((e, t) => e ? /* @__PURE__ */ v(
|
|
6603
|
+
}), n.map((e, t) => e ? /* @__PURE__ */ v(Hu, { element: e }, t) : null)]
|
|
6572
6604
|
}),
|
|
6573
6605
|
/* @__PURE__ */ v("div", {
|
|
6574
6606
|
className: Q.right,
|
|
6575
|
-
children: r.map((e, t) => e ? /* @__PURE__ */ v(
|
|
6607
|
+
children: r.map((e, t) => e ? /* @__PURE__ */ v(Hu, { element: e }, t) : null)
|
|
6576
6608
|
})
|
|
6577
6609
|
]
|
|
6578
|
-
})] }),
|
|
6610
|
+
})] }), Wu = {
|
|
6579
6611
|
popConfirm: "_popConfirm_1x6ye_1",
|
|
6580
6612
|
content: "_content_1x6ye_7",
|
|
6581
6613
|
buttons: "_buttons_1x6ye_13"
|
|
6582
|
-
},
|
|
6583
|
-
className:
|
|
6614
|
+
}, Gu = ({ title: e, okText: t, onClickOk: n, disableConfirmButton: r, cancelText: i, onClickCancel: a, close: o, testId: s }) => /* @__PURE__ */ y("div", {
|
|
6615
|
+
className: Wu.popConfirm,
|
|
6584
6616
|
children: [e && /* @__PURE__ */ v("div", {
|
|
6585
|
-
className:
|
|
6617
|
+
className: Wu.content,
|
|
6586
6618
|
children: /* @__PURE__ */ v(ha, {
|
|
6587
6619
|
small: !0,
|
|
6588
6620
|
children: e
|
|
6589
6621
|
})
|
|
6590
6622
|
}), /* @__PURE__ */ y("div", {
|
|
6591
|
-
className:
|
|
6623
|
+
className: Wu.buttons,
|
|
6592
6624
|
children: [/* @__PURE__ */ v(K, {
|
|
6593
6625
|
small: !0,
|
|
6594
6626
|
colored: !0,
|
|
@@ -6603,8 +6635,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6603
6635
|
testId: `${s}-cancel-button`
|
|
6604
6636
|
})]
|
|
6605
6637
|
})]
|
|
6606
|
-
}),
|
|
6607
|
-
content: /* @__PURE__ */ v(
|
|
6638
|
+
}), Ku = ({ 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, overflowContainer: u = !1, testId: d = void 0 }) => /* @__PURE__ */ v(aa, {
|
|
6639
|
+
content: /* @__PURE__ */ v(Gu, {
|
|
6608
6640
|
title: i,
|
|
6609
6641
|
okText: s,
|
|
6610
6642
|
onClickOk: c,
|
|
@@ -6619,14 +6651,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6619
6651
|
overflowContainer: u,
|
|
6620
6652
|
testId: d,
|
|
6621
6653
|
children: e
|
|
6622
|
-
}),
|
|
6654
|
+
}), qu = {
|
|
6623
6655
|
tree: "_tree_coxxe_1",
|
|
6624
6656
|
toggle: "_toggle_coxxe_8",
|
|
6625
6657
|
dropTarget: "_dropTarget_coxxe_15",
|
|
6626
6658
|
placeholder: "_placeholder_coxxe_30",
|
|
6627
6659
|
draggingSource: "_draggingSource_coxxe_36",
|
|
6628
6660
|
placeholderContainer: "_placeholderContainer_coxxe_39"
|
|
6629
|
-
},
|
|
6661
|
+
}, Ju = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
|
|
6630
6662
|
let { id: l, data: u } = t, { active: d, disabled: f, testId: p, onClick: m, actions: h = [] } = u, [_, b] = e.useState(!1), [x, S] = e.useState(0), C = (e) => {
|
|
6631
6663
|
e.stopPropagation(), i(l);
|
|
6632
6664
|
}, w = (e) => {
|
|
@@ -6653,7 +6685,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6653
6685
|
className: g(Z.itemHeader, _ ? Z.noPointerEvents : ""),
|
|
6654
6686
|
children: [
|
|
6655
6687
|
a && /* @__PURE__ */ v("div", {
|
|
6656
|
-
className:
|
|
6688
|
+
className: qu.toggle,
|
|
6657
6689
|
children: /* @__PURE__ */ v(K, {
|
|
6658
6690
|
basic: !0,
|
|
6659
6691
|
colored: r ? !0 : wr.MUTED,
|
|
@@ -6667,10 +6699,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6667
6699
|
className: Z.drag,
|
|
6668
6700
|
children: /* @__PURE__ */ v(U, { icon: V.DRAG })
|
|
6669
6701
|
}),
|
|
6670
|
-
/* @__PURE__ */ v(
|
|
6702
|
+
/* @__PURE__ */ v(Jl, { item: u }),
|
|
6671
6703
|
/* @__PURE__ */ y("div", {
|
|
6672
6704
|
className: Z.right,
|
|
6673
|
-
children: [/* @__PURE__ */ v(
|
|
6705
|
+
children: [/* @__PURE__ */ v(Yl, { item: u }), !f && h.length > 0 && /* @__PURE__ */ v("div", {
|
|
6674
6706
|
className: Z.actions,
|
|
6675
6707
|
children: /* @__PURE__ */ v(Ji, { actions: h })
|
|
6676
6708
|
})]
|
|
@@ -6678,10 +6710,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6678
6710
|
]
|
|
6679
6711
|
})
|
|
6680
6712
|
});
|
|
6681
|
-
},
|
|
6682
|
-
className:
|
|
6713
|
+
}, Yu = ({ depth: e, indent: t = "var(--size-sm)" }) => /* @__PURE__ */ v("div", {
|
|
6714
|
+
className: qu.placeholder,
|
|
6683
6715
|
style: { left: `calc(${t} * ${e})` }
|
|
6684
|
-
}),
|
|
6716
|
+
}), Xu = ({ list: e, canDrop: t, draggable: n = !1, onListReorder: r, onChangeOpen: i, testId: a, isInitialOpen: o = !1, autoOpenActiveItems: s = !1, treeRef: l, itemHasChild: u, onItemToggle: d, icons: f, allowParentReassignment: m, stickyHeader: h, height: g, render: _, placeholderIndent: b }) => {
|
|
6685
6717
|
var x;
|
|
6686
6718
|
let S = l == null ? p(null) : l, C = (e) => {
|
|
6687
6719
|
i && i(e);
|
|
@@ -6739,7 +6771,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6739
6771
|
"data-testid": a,
|
|
6740
6772
|
className: Z.list,
|
|
6741
6773
|
style: { height: g },
|
|
6742
|
-
children: [e.name && !e.noHeader && /* @__PURE__ */ v(
|
|
6774
|
+
children: [e.name && !e.noHeader && /* @__PURE__ */ v(Gl, {
|
|
6743
6775
|
name: e.name,
|
|
6744
6776
|
actions: e.actions,
|
|
6745
6777
|
stickyHeader: h
|
|
@@ -6766,7 +6798,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6766
6798
|
hasChild: r,
|
|
6767
6799
|
isOpen: a,
|
|
6768
6800
|
onToggle: o
|
|
6769
|
-
}) : /* @__PURE__ */ v(
|
|
6801
|
+
}) : /* @__PURE__ */ v(Ju, {
|
|
6770
6802
|
hasChild: u ? u(e) : r,
|
|
6771
6803
|
node: e,
|
|
6772
6804
|
depth: t,
|
|
@@ -6782,7 +6814,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6782
6814
|
onDrop: A,
|
|
6783
6815
|
onChangeOpen: C,
|
|
6784
6816
|
dropTargetOffset: 10,
|
|
6785
|
-
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ v(
|
|
6817
|
+
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ v(Yu, {
|
|
6786
6818
|
depth: t,
|
|
6787
6819
|
indent: b
|
|
6788
6820
|
}),
|
|
@@ -6790,17 +6822,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6790
6822
|
listComponent: "div",
|
|
6791
6823
|
listItemComponent: "div",
|
|
6792
6824
|
classes: {
|
|
6793
|
-
root:
|
|
6794
|
-
draggingSource:
|
|
6795
|
-
dropTarget:
|
|
6796
|
-
placeholder:
|
|
6825
|
+
root: qu.tree,
|
|
6826
|
+
draggingSource: qu.draggingSource,
|
|
6827
|
+
dropTarget: qu.dropTarget,
|
|
6828
|
+
placeholder: qu.placeholderContainer
|
|
6797
6829
|
},
|
|
6798
6830
|
initialOpen: o,
|
|
6799
6831
|
enableAnimateExpand: !0
|
|
6800
6832
|
})
|
|
6801
6833
|
})]
|
|
6802
6834
|
});
|
|
6803
|
-
},
|
|
6835
|
+
}, Zu = {
|
|
6804
6836
|
treeTable: "_treeTable_1ywvy_1",
|
|
6805
6837
|
treeTableHeader: "_treeTableHeader_1ywvy_22",
|
|
6806
6838
|
folderCell: "_folderCell_1ywvy_30",
|
|
@@ -6808,48 +6840,48 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6808
6840
|
drag: "_drag_1ywvy_31",
|
|
6809
6841
|
folder: "_folder_1ywvy_30",
|
|
6810
6842
|
active: "_active_1ywvy_61"
|
|
6811
|
-
},
|
|
6843
|
+
}, Qu = (e, t) => e.filter((e) => e.parent === t).flatMap((t) => [t.id, ...Qu(e, t.id)]), $u = (e, t) => {
|
|
6812
6844
|
let n = new Set(t);
|
|
6813
6845
|
return e.filter((e) => !n.has(e.id)).map((e) => e.id);
|
|
6814
|
-
},
|
|
6846
|
+
}, ed = (e, t, n) => e.filter((e) => n.has(e) || !t.has(e)), td = (e, t, n, r = []) => {
|
|
6815
6847
|
let i = new Set(n), a = new Set(r), o = e.filter((e) => e.parent === t && !a.has(e.id));
|
|
6816
6848
|
if (o.length === 0) return {
|
|
6817
6849
|
checked: i.has(t),
|
|
6818
6850
|
indeterminate: !1
|
|
6819
6851
|
};
|
|
6820
|
-
let s = o.map((t) =>
|
|
6852
|
+
let s = o.map((t) => td(e, t.id, n, r)), c = s.filter((e) => e.checked).length, l = s.filter((e) => e.indeterminate).length, u = c === o.length;
|
|
6821
6853
|
return {
|
|
6822
6854
|
checked: u,
|
|
6823
6855
|
indeterminate: c + l > 0 && !u
|
|
6824
6856
|
};
|
|
6825
|
-
},
|
|
6826
|
-
let r =
|
|
6857
|
+
}, nd = (e, t, n = []) => {
|
|
6858
|
+
let r = $u(e, n), i = new Set(t), a = r.filter((e) => i.has(e)).length;
|
|
6827
6859
|
return {
|
|
6828
6860
|
checked: r.length > 0 && a === r.length,
|
|
6829
6861
|
indeterminate: a > 0 && a < r.length
|
|
6830
6862
|
};
|
|
6831
|
-
},
|
|
6863
|
+
}, rd = n(null), id = () => s(rd), ad = ({ children: e, rowCheckboxes: t, rows: n }) => {
|
|
6832
6864
|
let r = t !== void 0, { checkedIds: i = [], disabledIds: a = [], getTooltip: s, onChange: c } = t == null ? {} : t, l = d(() => new Set(a), [a]), u = d(() => {
|
|
6833
6865
|
if (!r) return null;
|
|
6834
6866
|
let e = /* @__PURE__ */ new Map();
|
|
6835
|
-
for (let t of n) e.set(t.id,
|
|
6867
|
+
for (let t of n) e.set(t.id, td(n, t.id, i, a));
|
|
6836
6868
|
return e;
|
|
6837
6869
|
}, [
|
|
6838
6870
|
i,
|
|
6839
6871
|
a,
|
|
6840
6872
|
r,
|
|
6841
6873
|
n
|
|
6842
|
-
]), f = d(() => r ?
|
|
6874
|
+
]), f = d(() => r ? nd(n, i, a) : void 0, [
|
|
6843
6875
|
i,
|
|
6844
6876
|
a,
|
|
6845
6877
|
r,
|
|
6846
6878
|
n
|
|
6847
6879
|
]), p = o((e) => u == null ? void 0 : u.get(e), [u]), m = o((e) => l.has(e), [l]), h = o((e) => s == null ? void 0 : s(e), [s]), g = o((e) => {
|
|
6848
6880
|
if (!r || l.has(e)) return;
|
|
6849
|
-
let t =
|
|
6881
|
+
let t = Qu(n, e), o = [e, ...t.filter((e) => !l.has(e))], s = [e, ...t], { checked: u } = td(n, e, i, a);
|
|
6850
6882
|
if (u) {
|
|
6851
6883
|
let e = new Set(s);
|
|
6852
|
-
c == null || c(
|
|
6884
|
+
c == null || c(ed(i, e, l));
|
|
6853
6885
|
} else c == null || c([...new Set([...i, ...o])]);
|
|
6854
6886
|
}, [
|
|
6855
6887
|
i,
|
|
@@ -6860,7 +6892,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6860
6892
|
n
|
|
6861
6893
|
]), _ = o(() => {
|
|
6862
6894
|
if (!r) return;
|
|
6863
|
-
let e =
|
|
6895
|
+
let e = $u(n, a), { checked: t } = nd(n, i, a);
|
|
6864
6896
|
t ? c == null || c(i.filter((e) => l.has(e))) : c == null || c([...new Set([...i, ...e])]);
|
|
6865
6897
|
}, [
|
|
6866
6898
|
i,
|
|
@@ -6886,12 +6918,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6886
6918
|
_,
|
|
6887
6919
|
g
|
|
6888
6920
|
]);
|
|
6889
|
-
return /* @__PURE__ */ v(
|
|
6921
|
+
return /* @__PURE__ */ v(rd.Provider, {
|
|
6890
6922
|
value: y,
|
|
6891
6923
|
children: e
|
|
6892
6924
|
});
|
|
6893
|
-
},
|
|
6894
|
-
let h =
|
|
6925
|
+
}, od = ({ columnAlignment: e, columnWidths: t, depth: n, draggable: r, handleRef: i, hasChild: a, hasRowActions: o, icons: s, isOpen: c, node: l, onDragEnter: u, onDragOver: d, onDragLeave: f, onDrop: p, onToggle: m }) => {
|
|
6926
|
+
let h = id(), _ = h != null && h.enabled ? h.getRowCheckState(l.id) : void 0, b = _ == null ? void 0 : _.checked, x = _ == null ? void 0 : _.indeterminate, S = h == null ? void 0 : h.isRowCheckDisabled(l.id), C = h == null ? void 0 : h.enabled, { data: w, droppable: T } = l, { id: E, cells: D, testId: O, actions: k = [], active: A, onRowClick: j } = w, M = T || a, N = (e) => {
|
|
6895
6927
|
let r = t ? t[e] : void 0;
|
|
6896
6928
|
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${M ? n + 1 : n})`})` : r;
|
|
6897
6929
|
};
|
|
@@ -6904,12 +6936,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6904
6936
|
onDragLeave: f,
|
|
6905
6937
|
children: /* @__PURE__ */ v("tbody", { children: /* @__PURE__ */ y("tr", {
|
|
6906
6938
|
onClick: j,
|
|
6907
|
-
className: g(
|
|
6939
|
+
className: g(Zu.treeTableRow, A ? Zu.active : void 0),
|
|
6908
6940
|
children: [
|
|
6909
|
-
C && /* @__PURE__ */ v(
|
|
6941
|
+
C && /* @__PURE__ */ v(mc, {
|
|
6910
6942
|
isHeader: !1,
|
|
6911
6943
|
cell: {
|
|
6912
|
-
type:
|
|
6944
|
+
type: pc.CHECKBOX,
|
|
6913
6945
|
checked: b,
|
|
6914
6946
|
disabled: S,
|
|
6915
6947
|
indeterminate: x,
|
|
@@ -6918,19 +6950,19 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6918
6950
|
}
|
|
6919
6951
|
}),
|
|
6920
6952
|
r && /* @__PURE__ */ v("td", {
|
|
6921
|
-
className:
|
|
6953
|
+
className: Zu.dragCell,
|
|
6922
6954
|
children: /* @__PURE__ */ v("div", {
|
|
6923
|
-
className:
|
|
6955
|
+
className: Zu.drag,
|
|
6924
6956
|
onClick: (e) => e.stopPropagation(),
|
|
6925
6957
|
ref: i,
|
|
6926
6958
|
children: /* @__PURE__ */ v(U, { icon: V.DRAG })
|
|
6927
6959
|
})
|
|
6928
6960
|
}),
|
|
6929
|
-
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ v("td", { className:
|
|
6961
|
+
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ v("td", { className: Zu.folderCell }, t)),
|
|
6930
6962
|
M && /* @__PURE__ */ v("td", {
|
|
6931
|
-
className:
|
|
6963
|
+
className: Zu.folderCell,
|
|
6932
6964
|
children: /* @__PURE__ */ v("div", {
|
|
6933
|
-
className:
|
|
6965
|
+
className: Zu.folder,
|
|
6934
6966
|
onClick: () => m(E),
|
|
6935
6967
|
onMouseDown: (e) => e.stopPropagation(),
|
|
6936
6968
|
children: /* @__PURE__ */ v(K, {
|
|
@@ -6943,69 +6975,69 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6943
6975
|
})
|
|
6944
6976
|
})
|
|
6945
6977
|
}),
|
|
6946
|
-
D.map((t, n) => /* @__PURE__ */ v(
|
|
6978
|
+
D.map((t, n) => /* @__PURE__ */ v(mc, {
|
|
6947
6979
|
isHeader: !1,
|
|
6948
6980
|
cell: t,
|
|
6949
6981
|
width: N(n),
|
|
6950
6982
|
columnAlignment: e ? e[n] : null
|
|
6951
6983
|
}, n)),
|
|
6952
|
-
o && /* @__PURE__ */ v(
|
|
6984
|
+
o && /* @__PURE__ */ v(mc, {
|
|
6953
6985
|
isHeader: !1,
|
|
6954
6986
|
cell: {
|
|
6955
|
-
type:
|
|
6987
|
+
type: pc.ACTIONS,
|
|
6956
6988
|
actions: k
|
|
6957
6989
|
}
|
|
6958
6990
|
})
|
|
6959
6991
|
]
|
|
6960
6992
|
}) })
|
|
6961
6993
|
});
|
|
6962
|
-
},
|
|
6963
|
-
let a =
|
|
6994
|
+
}, sd = ({ columnAlignment: e, columnWidths: t, draggable: n, hasRowActions: r, headers: i }) => {
|
|
6995
|
+
let a = id(), o = a == null ? void 0 : a.headerCheckState, s = (a == null ? void 0 : a.enabled) && o !== void 0;
|
|
6964
6996
|
return /* @__PURE__ */ v("table", {
|
|
6965
|
-
className: g(mo.table,
|
|
6997
|
+
className: g(mo.table, Zu.treeTableHeader),
|
|
6966
6998
|
children: /* @__PURE__ */ v("thead", { children: i.map((i, c) => /* @__PURE__ */ y("tr", { children: [
|
|
6967
|
-
s && c === 0 ? /* @__PURE__ */ v(
|
|
6999
|
+
s && c === 0 ? /* @__PURE__ */ v(mc, {
|
|
6968
7000
|
isHeader: !0,
|
|
6969
7001
|
cell: {
|
|
6970
|
-
type:
|
|
7002
|
+
type: pc.CHECKBOX,
|
|
6971
7003
|
checked: o.checked,
|
|
6972
7004
|
indeterminate: o.indeterminate,
|
|
6973
7005
|
onChange: a.toggleHeaderCheck
|
|
6974
7006
|
}
|
|
6975
7007
|
}) : s ? /* @__PURE__ */ v("td", {}) : null,
|
|
6976
|
-
n && /* @__PURE__ */ v("th", { className:
|
|
6977
|
-
i.cells.map((n, r) => /* @__PURE__ */ v(
|
|
7008
|
+
n && /* @__PURE__ */ v("th", { className: Zu.dragCell }),
|
|
7009
|
+
i.cells.map((n, r) => /* @__PURE__ */ v(mc, {
|
|
6978
7010
|
isHeader: !0,
|
|
6979
7011
|
cell: n,
|
|
6980
7012
|
width: t ? t[r] : void 0,
|
|
6981
7013
|
columnAlignment: e ? e[r] : void 0
|
|
6982
7014
|
}, r)),
|
|
6983
|
-
r && /* @__PURE__ */ v(
|
|
7015
|
+
r && /* @__PURE__ */ v(mc, {
|
|
6984
7016
|
isHeader: !0,
|
|
6985
7017
|
cell: {
|
|
6986
|
-
type:
|
|
7018
|
+
type: pc.ACTIONS,
|
|
6987
7019
|
actions: i.actions,
|
|
6988
7020
|
width: 31
|
|
6989
7021
|
}
|
|
6990
7022
|
})
|
|
6991
7023
|
] }, c)) })
|
|
6992
7024
|
});
|
|
6993
|
-
},
|
|
7025
|
+
}, cd = ({ 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 }) => {
|
|
6994
7026
|
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: b = [] } = d, x = Fs(b, _ == null ? [] : _);
|
|
6995
|
-
return /* @__PURE__ */ v(
|
|
7027
|
+
return /* @__PURE__ */ v(ad, {
|
|
6996
7028
|
rowCheckboxes: u,
|
|
6997
7029
|
rows: b,
|
|
6998
7030
|
children: /* @__PURE__ */ y("div", {
|
|
6999
|
-
className:
|
|
7031
|
+
className: Zu.treeTable,
|
|
7000
7032
|
"data-testid": f,
|
|
7001
7033
|
style: { width: g },
|
|
7002
|
-
children: [!!_ && /* @__PURE__ */ v(
|
|
7034
|
+
children: [!!_ && /* @__PURE__ */ v(sd, {
|
|
7003
7035
|
columnAlignment: m,
|
|
7004
7036
|
columnWidths: h,
|
|
7005
7037
|
draggable: r,
|
|
7006
7038
|
hasRowActions: x,
|
|
7007
7039
|
headers: _
|
|
7008
|
-
}), /* @__PURE__ */ v(
|
|
7040
|
+
}), /* @__PURE__ */ v(Xu, {
|
|
7009
7041
|
allowParentReassignment: e,
|
|
7010
7042
|
autoOpenActiveItems: t,
|
|
7011
7043
|
canDrop: n,
|
|
@@ -7021,7 +7053,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7021
7053
|
onItemToggle: s,
|
|
7022
7054
|
onListReorder: c,
|
|
7023
7055
|
placeholderIndent: "var(--size)",
|
|
7024
|
-
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ v(
|
|
7056
|
+
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ v(od, {
|
|
7025
7057
|
node: e,
|
|
7026
7058
|
columnAlignment: m,
|
|
7027
7059
|
columnWidths: h,
|
|
@@ -7038,38 +7070,38 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7038
7070
|
})]
|
|
7039
7071
|
})
|
|
7040
7072
|
});
|
|
7041
|
-
},
|
|
7073
|
+
}, ld = () => {
|
|
7042
7074
|
let e = p(null);
|
|
7043
7075
|
return u(() => {
|
|
7044
7076
|
e.current && (e.current(), e.current = null);
|
|
7045
7077
|
}), (t) => {
|
|
7046
7078
|
e.current = t;
|
|
7047
7079
|
};
|
|
7048
|
-
},
|
|
7080
|
+
}, ud = (e) => {
|
|
7049
7081
|
let t = p(void 0);
|
|
7050
7082
|
return c(() => {
|
|
7051
7083
|
t.current = e;
|
|
7052
7084
|
}, [e]), t.current;
|
|
7053
|
-
},
|
|
7085
|
+
}, dd = (e, t) => {
|
|
7054
7086
|
let n = t == null ? void 0 : t[e];
|
|
7055
7087
|
if (!n) {
|
|
7056
7088
|
var r;
|
|
7057
7089
|
return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = Un(e)) == null ? "" : r;
|
|
7058
7090
|
}
|
|
7059
7091
|
return n;
|
|
7060
|
-
},
|
|
7092
|
+
}, fd = /* @__PURE__ */ function(e) {
|
|
7061
7093
|
return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
|
|
7062
|
-
}({}),
|
|
7094
|
+
}({}), pd = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), md = (e) => {
|
|
7063
7095
|
if (!e) return !1;
|
|
7064
7096
|
let t = Dn(e);
|
|
7065
7097
|
return !xn.includes(t);
|
|
7066
|
-
},
|
|
7098
|
+
}, hd = ({ value: e, unitkey: t, toUnit: n }) => {
|
|
7067
7099
|
var r;
|
|
7068
7100
|
let i = bn[t];
|
|
7069
7101
|
if (!i || i.length === 0 || !((r = Wn(e)) != null && r.valid) || !i.includes(n)) return !1;
|
|
7070
7102
|
let a = Dn(String(e));
|
|
7071
7103
|
return !(a && !i.includes(a));
|
|
7072
|
-
},
|
|
7104
|
+
}, gd = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
|
|
7073
7105
|
var o;
|
|
7074
7106
|
let s = Nn(e) ? kn(e) : e, c = [Infinity, -Infinity].includes(Number(s));
|
|
7075
7107
|
if (i || c) return {
|
|
@@ -7089,13 +7121,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7089
7121
|
value: void 0,
|
|
7090
7122
|
error: "Source unit is missing"
|
|
7091
7123
|
};
|
|
7092
|
-
if (
|
|
7124
|
+
if (pd(s)) return {
|
|
7093
7125
|
value: void 0,
|
|
7094
7126
|
error: "Value is invalid for conversion"
|
|
7095
7127
|
};
|
|
7096
7128
|
try {
|
|
7097
7129
|
let e = Kn(s, l);
|
|
7098
|
-
return
|
|
7130
|
+
return hd({
|
|
7099
7131
|
value: e,
|
|
7100
7132
|
toUnit: n,
|
|
7101
7133
|
unitkey: t
|
|
@@ -7112,13 +7144,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7112
7144
|
error: "Conversion not possible"
|
|
7113
7145
|
};
|
|
7114
7146
|
}
|
|
7115
|
-
},
|
|
7116
|
-
let a = kn(e), o =
|
|
7117
|
-
return !
|
|
7147
|
+
}, _d = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
|
|
7148
|
+
let a = kn(e), o = pd(a);
|
|
7149
|
+
return !hd({
|
|
7118
7150
|
value: e,
|
|
7119
7151
|
unitkey: n,
|
|
7120
7152
|
toUnit: t
|
|
7121
|
-
}) ||
|
|
7153
|
+
}) || md(e) || o ? { value: a } : Nn(e) ? gd({
|
|
7122
7154
|
value: e,
|
|
7123
7155
|
unitkey: n,
|
|
7124
7156
|
toUnit: t,
|
|
@@ -7126,25 +7158,25 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7126
7158
|
doNotConvertValue: i,
|
|
7127
7159
|
exactPrecision: !0
|
|
7128
7160
|
}) : { value: e };
|
|
7129
|
-
},
|
|
7161
|
+
}, vd = (e) => ln(e) && !tn(e) && !on(e) ? en(e, "fieldName", "") : typeof e == "string" ? e : "", yd = (e = "") => xn == null ? void 0 : xn.includes(e), bd = (e, t) => {
|
|
7130
7162
|
let n = Dn(e || "");
|
|
7131
|
-
return
|
|
7132
|
-
},
|
|
7133
|
-
|
|
7134
|
-
},
|
|
7163
|
+
return yd(t) && yd(n);
|
|
7164
|
+
}, xd = n(null), Sd = () => s(xd), Cd = !1, wd = (e) => {
|
|
7165
|
+
Cd || (Cd = !0, xd = e);
|
|
7166
|
+
}, Td = (e) => jn(e) ? e : Fn(e), Ed = {
|
|
7135
7167
|
predefinedMenuActive: "_predefinedMenuActive_ye9w9_1",
|
|
7136
7168
|
inputWrapper: "_inputWrapper_ye9w9_4"
|
|
7137
|
-
},
|
|
7169
|
+
}, Dd = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUnit: r = !1, error: i = null, left: a = !1, small: o = !1, width: s = "100%", value: l, unitkey: u = "", initUnit: f, noConversion: p = !1, onChange: h = pn, onClick: b = pn, onFocus: x = pn, onSwitchUnit: S = pn, unitTemplate: C, testId: w, warning: T = null, predefinedOptions: E, initialPredefinedOption: D = !1, shouldLinkAutomaticly: O = !0, selectedPredefinedOptionKey: k, validationCallback: A = () => ({
|
|
7138
7170
|
name: "",
|
|
7139
7171
|
error: null
|
|
7140
7172
|
}), disabledValidation: j = !1, allowEmpty: M = !1, convertBackToStorageUnit: N = !1, enableCosmeticRounding: P = !0, enableDisplayRounding: F = !1, roundDisplayValue: I, selectOnFocus: ee = !0, groupOrder: L, tooltip: te = null }) => {
|
|
7141
|
-
let ne =
|
|
7173
|
+
let ne = Sd(), re = ld();
|
|
7142
7174
|
typeof l == "number" && (l = `${l}`);
|
|
7143
|
-
let [ie = "", ae = ""] = l === void 0 ? [] : zn(l), R = d(() =>
|
|
7175
|
+
let [ie = "", ae = ""] = l === void 0 ? [] : zn(l), R = d(() => dd(u, C || (ne == null ? void 0 : ne.unitTemplate)), [
|
|
7144
7176
|
u,
|
|
7145
7177
|
C,
|
|
7146
7178
|
ne == null ? void 0 : ne.unitTemplate
|
|
7147
|
-
]), oe =
|
|
7179
|
+
]), oe = bd(l, R), se = f || R || ae, ce = ud(se), { value: le } = _d({
|
|
7148
7180
|
value: l,
|
|
7149
7181
|
toUnit: se,
|
|
7150
7182
|
unitkey: u,
|
|
@@ -7156,10 +7188,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7156
7188
|
} : {
|
|
7157
7189
|
value: le,
|
|
7158
7190
|
unit: se
|
|
7159
|
-
}), de = M || (z == null ? void 0 : z.value) === void 0, [fe, pe] = m(D ?
|
|
7191
|
+
}), de = M || (z == null ? void 0 : z.value) === void 0, [fe, pe] = m(D ? fd.PREDEFINED : fd.CUSTOM), me = !!(j || n), he = E && E.find((e) => {
|
|
7160
7192
|
if (!(e != null && e.value)) return;
|
|
7161
7193
|
if (k) return k === e.valueKey;
|
|
7162
|
-
let t = Nn(e.value) ? Dn(e.value) : "", { value: n = l } =
|
|
7194
|
+
let t = Nn(e.value) ? Dn(e.value) : "", { value: n = l } = gd({
|
|
7163
7195
|
value: String(l),
|
|
7164
7196
|
unitkey: u,
|
|
7165
7197
|
toUnit: t
|
|
@@ -7168,7 +7200,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7168
7200
|
}), ge = () => {
|
|
7169
7201
|
var e;
|
|
7170
7202
|
let t = (e = l) == null ? "" : e, n = z.unit;
|
|
7171
|
-
if (!
|
|
7203
|
+
if (!hd({
|
|
7172
7204
|
value: t,
|
|
7173
7205
|
unitkey: u,
|
|
7174
7206
|
toUnit: n
|
|
@@ -7182,7 +7214,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7182
7214
|
return null;
|
|
7183
7215
|
}
|
|
7184
7216
|
}, _e = (t) => {
|
|
7185
|
-
let n =
|
|
7217
|
+
let n = vd(e), r = t.target, { value: i, selectionStart: a } = r, o = Kn(i, (z == null ? void 0 : z.unit) || "");
|
|
7186
7218
|
h({ target: {
|
|
7187
7219
|
value: N ? Kn(wn(o, ae), ae) : o,
|
|
7188
7220
|
name: n
|
|
@@ -7204,7 +7236,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7204
7236
|
if (se) {
|
|
7205
7237
|
let e, t = "";
|
|
7206
7238
|
if (ce !== se) {
|
|
7207
|
-
let { value: n } =
|
|
7239
|
+
let { value: n } = _d({
|
|
7208
7240
|
value: l,
|
|
7209
7241
|
toUnit: se,
|
|
7210
7242
|
unitkey: u,
|
|
@@ -7213,7 +7245,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7213
7245
|
});
|
|
7214
7246
|
e = n, t = se;
|
|
7215
7247
|
} else if (Kn(z.value, z.unit) !== l) {
|
|
7216
|
-
let { value: n } =
|
|
7248
|
+
let { value: n } = _d({
|
|
7217
7249
|
value: l,
|
|
7218
7250
|
toUnit: z.unit,
|
|
7219
7251
|
unitkey: u,
|
|
@@ -7225,7 +7257,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7225
7257
|
e !== void 0 && ue({
|
|
7226
7258
|
value: e,
|
|
7227
7259
|
unit: t
|
|
7228
|
-
}), pe(E && he && O ?
|
|
7260
|
+
}), pe(E && he && O ? fd.PREDEFINED : fd.CUSTOM);
|
|
7229
7261
|
}
|
|
7230
7262
|
}, [
|
|
7231
7263
|
se,
|
|
@@ -7233,14 +7265,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7233
7265
|
i,
|
|
7234
7266
|
O
|
|
7235
7267
|
]);
|
|
7236
|
-
let ye = ge(), be = Pn(z.unit) || z.unit || "", xe = p || !ye || ye && ye.length === 1, Se =
|
|
7268
|
+
let ye = ge(), be = Pn(z.unit) || z.unit || "", xe = p || !ye || ye && ye.length === 1, Se = vd(e), Ce, we = (t) => {
|
|
7237
7269
|
let r = t != null && t.value ? t.value : "", [i = "", a = ""] = Nn(r) ? zn(r) : [r], o = Gn(r);
|
|
7238
|
-
if (
|
|
7270
|
+
if (hd({
|
|
7239
7271
|
value: r,
|
|
7240
7272
|
unitkey: u,
|
|
7241
7273
|
toUnit: a
|
|
7242
7274
|
})) {
|
|
7243
|
-
let { value: e = "" } =
|
|
7275
|
+
let { value: e = "" } = _d({
|
|
7244
7276
|
value: r,
|
|
7245
7277
|
toUnit: R,
|
|
7246
7278
|
unitkey: u,
|
|
@@ -7253,7 +7285,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7253
7285
|
type: xi.OPTION,
|
|
7254
7286
|
inline: !0,
|
|
7255
7287
|
onClick: () => {
|
|
7256
|
-
Wn(i).valid && !n && (pe(
|
|
7288
|
+
Wn(i).valid && !n && (pe(fd.PREDEFINED), h({ target: {
|
|
7257
7289
|
value: r,
|
|
7258
7290
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || "",
|
|
7259
7291
|
predefinedSelected: !0,
|
|
@@ -7265,27 +7297,27 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7265
7297
|
height: "0"
|
|
7266
7298
|
})] }),
|
|
7267
7299
|
description: o,
|
|
7268
|
-
selected: he === t && fe ===
|
|
7300
|
+
selected: he === t && fe === fd.PREDEFINED
|
|
7269
7301
|
};
|
|
7270
7302
|
};
|
|
7271
7303
|
if (Ce = [{
|
|
7272
7304
|
type: xi.OPTION,
|
|
7273
7305
|
inline: !0,
|
|
7274
7306
|
onClick: () => {
|
|
7275
|
-
fe !==
|
|
7307
|
+
fe !== fd.CUSTOM && !n && h({ target: {
|
|
7276
7308
|
value: Kn(z.value, z.unit),
|
|
7277
7309
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || ""
|
|
7278
7310
|
} });
|
|
7279
7311
|
},
|
|
7280
7312
|
label: "Custom",
|
|
7281
|
-
selected: fe ===
|
|
7313
|
+
selected: fe === fd.CUSTOM
|
|
7282
7314
|
}], E != null && E.length) {
|
|
7283
7315
|
let e = E.map(we);
|
|
7284
7316
|
Ce = [...Ce, ...e];
|
|
7285
7317
|
}
|
|
7286
7318
|
let Te = (e) => {
|
|
7287
7319
|
if (Nn(e)) {
|
|
7288
|
-
let t = Dn(e), { value: n } =
|
|
7320
|
+
let t = Dn(e), { value: n } = _d({
|
|
7289
7321
|
value: e,
|
|
7290
7322
|
toUnit: z.unit,
|
|
7291
7323
|
unitkey: u,
|
|
@@ -7297,7 +7329,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7297
7329
|
return e;
|
|
7298
7330
|
}, Ee = !E && (!L || L === B.FIRST) ? B.FIRST : B.MIDDLE, De = !L || L === B.LAST ? B.LAST : B.MIDDLE;
|
|
7299
7331
|
return /* @__PURE__ */ v("div", {
|
|
7300
|
-
className: fe ===
|
|
7332
|
+
className: fe === fd.PREDEFINED ? g(Ed.predefinedMenuActive) : "",
|
|
7301
7333
|
children: /* @__PURE__ */ y(Ma, {
|
|
7302
7334
|
small: o,
|
|
7303
7335
|
width: s,
|
|
@@ -7312,17 +7344,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7312
7344
|
trigger: "Component",
|
|
7313
7345
|
component: /* @__PURE__ */ v(K, {
|
|
7314
7346
|
groupOrder: "first",
|
|
7315
|
-
active: fe ===
|
|
7316
|
-
icon: fe ===
|
|
7347
|
+
active: fe === fd.PREDEFINED,
|
|
7348
|
+
icon: fe === fd.PREDEFINED ? "link" : "unlink",
|
|
7317
7349
|
small: o
|
|
7318
7350
|
}),
|
|
7319
7351
|
small: o,
|
|
7320
7352
|
sections: Ce
|
|
7321
7353
|
},
|
|
7322
|
-
tooltip: fe ===
|
|
7354
|
+
tooltip: fe === fd.PREDEFINED ? he == null ? void 0 : he.label : ""
|
|
7323
7355
|
}),
|
|
7324
7356
|
/* @__PURE__ */ v("div", {
|
|
7325
|
-
className:
|
|
7357
|
+
className: Ed.inputWrapper,
|
|
7326
7358
|
children: /* @__PURE__ */ v(Gs, {
|
|
7327
7359
|
name: Se,
|
|
7328
7360
|
testId: w,
|
|
@@ -7364,7 +7396,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7364
7396
|
let r = n || t || "", i = Mn(e) ? e : "";
|
|
7365
7397
|
return {
|
|
7366
7398
|
type: "Option",
|
|
7367
|
-
label: P ?
|
|
7399
|
+
label: P ? Td(i) : i,
|
|
7368
7400
|
inline: !0,
|
|
7369
7401
|
onClick: (n) => {
|
|
7370
7402
|
n.stopPropagation(), ve(e, t);
|
|
@@ -7379,10 +7411,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7379
7411
|
]
|
|
7380
7412
|
})
|
|
7381
7413
|
});
|
|
7382
|
-
},
|
|
7414
|
+
}, Od = Object.freeze({
|
|
7383
7415
|
Translations: "translations",
|
|
7384
7416
|
LanguageKey: "languageKey"
|
|
7385
|
-
}),
|
|
7417
|
+
}), kd = {
|
|
7386
7418
|
unified: "Unified",
|
|
7387
7419
|
split: "Split",
|
|
7388
7420
|
changesTooLarge: "Changes are too large to be shown",
|
|
@@ -7404,29 +7436,29 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7404
7436
|
pluralChanges: "changes",
|
|
7405
7437
|
showAll: "Show all",
|
|
7406
7438
|
unknown: "Unknown"
|
|
7407
|
-
},
|
|
7439
|
+
}, Ad = (e) => Object.keys(kd).reduce((t, n) => ({
|
|
7408
7440
|
...t,
|
|
7409
|
-
[n]: (e == null ? void 0 : e[n]) || (
|
|
7410
|
-
}), {}),
|
|
7411
|
-
[
|
|
7412
|
-
[
|
|
7413
|
-
},
|
|
7414
|
-
|
|
7415
|
-
},
|
|
7441
|
+
[n]: (e == null ? void 0 : e[n]) || (kd == null ? void 0 : kd[n])
|
|
7442
|
+
}), {}), jd = {
|
|
7443
|
+
[Od.Translations]: Ad(),
|
|
7444
|
+
[Od.LanguageKey]: "en"
|
|
7445
|
+
}, Md = (e) => e ? jd[e] : jd, Nd = (e, t) => {
|
|
7446
|
+
jd[e] = t;
|
|
7447
|
+
}, Pd = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
|
|
7416
7448
|
var a;
|
|
7417
|
-
let { unitTemplate: o = null } = (a =
|
|
7418
|
-
return e[n] = r == null ?
|
|
7449
|
+
let { unitTemplate: o = null } = (a = Sd()) == null ? {} : a;
|
|
7450
|
+
return e[n] = r == null ? dd(n, o) : r, t[n] = i, {
|
|
7419
7451
|
preferredUnits: e,
|
|
7420
7452
|
storageUnits: t
|
|
7421
7453
|
};
|
|
7422
7454
|
}, {
|
|
7423
7455
|
preferredUnits: {},
|
|
7424
7456
|
storageUnits: {}
|
|
7425
|
-
}),
|
|
7457
|
+
}), Fd = ({ row: e, rowIndex: t, selectedUnits: n, storageUnits: r, convertBackToStorageUnit: i, enableCosmeticRounding: a, enableDisplayRounding: o }) => ({
|
|
7426
7458
|
...e,
|
|
7427
7459
|
cells: e.cells.map((e, s) => {
|
|
7428
7460
|
if ("autoUnit" in e && e != null && e.autoUnit && (typeof (e == null ? void 0 : e.value) == "string" || typeof (e == null ? void 0 : e.value) == "number")) {
|
|
7429
|
-
let { unitKey: c, value: l, formatDisplayValue: u } = e, d = o && "roundDisplayValue" in e ? e == null ? void 0 : e.roundDisplayValue : null, f = n[c], p = r[c], m = p && f !== p, { value: h = l } =
|
|
7461
|
+
let { unitKey: c, value: l, formatDisplayValue: u } = e, d = o && "roundDisplayValue" in e ? e == null ? void 0 : e.roundDisplayValue : null, f = n[c], p = r[c], m = p && f !== p, { value: h = l } = gd({
|
|
7430
7462
|
value: Hs(l),
|
|
7431
7463
|
unitkey: c,
|
|
7432
7464
|
toUnit: f,
|
|
@@ -7440,7 +7472,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7440
7472
|
roundDisplayValue: d,
|
|
7441
7473
|
selectOnFocus: !0,
|
|
7442
7474
|
onChange: (n) => {
|
|
7443
|
-
let { value: r } = n.target, a = i ? p : f, { value: o = r } =
|
|
7475
|
+
let { value: r } = n.target, a = i ? p : f, { value: o = r } = gd({
|
|
7444
7476
|
value: String(r),
|
|
7445
7477
|
unitkey: c,
|
|
7446
7478
|
toUnit: a,
|
|
@@ -7464,17 +7496,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7464
7496
|
}
|
|
7465
7497
|
return e;
|
|
7466
7498
|
})
|
|
7467
|
-
}),
|
|
7468
|
-
let { translations: i } =
|
|
7499
|
+
}), Id = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
|
|
7500
|
+
let { translations: i } = Md();
|
|
7469
7501
|
return e ? e.map((e) => ({
|
|
7470
7502
|
...e,
|
|
7471
7503
|
cells: e.cells.map((e) => {
|
|
7472
|
-
if (e.type ===
|
|
7504
|
+
if (e.type === pc.AUTO_UNIT) {
|
|
7473
7505
|
var a;
|
|
7474
7506
|
let { testId: o, unitKey: s, disabled: c = !1, error: l } = e, u = n[s];
|
|
7475
7507
|
return {
|
|
7476
7508
|
value: u && t[s],
|
|
7477
|
-
type:
|
|
7509
|
+
type: pc.SELECT,
|
|
7478
7510
|
error: !u && (i == null ? void 0 : i.unitIsMissing) || l,
|
|
7479
7511
|
disabled: c || !u,
|
|
7480
7512
|
searchable: !1,
|
|
@@ -7494,8 +7526,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7494
7526
|
return e;
|
|
7495
7527
|
})
|
|
7496
7528
|
})) : [];
|
|
7497
|
-
},
|
|
7498
|
-
let { headers: u, ...d } = e, { storageUnits: f, preferredUnits: p } =
|
|
7529
|
+
}, Ld = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: s, beforeRenderRow: l }) => {
|
|
7530
|
+
let { headers: u, ...d } = e, { storageUnits: f, preferredUnits: p } = Pd(t), h = ud(p), [g, _] = m(p), y = ({ unitKey: e, value: n }) => {
|
|
7499
7531
|
_({
|
|
7500
7532
|
...g,
|
|
7501
7533
|
[e]: n
|
|
@@ -7506,7 +7538,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7506
7538
|
newUnit: n,
|
|
7507
7539
|
unitKey: e
|
|
7508
7540
|
});
|
|
7509
|
-
}, b = o(({ row: e, rowIndex: t }) =>
|
|
7541
|
+
}, b = o(({ row: e, rowIndex: t }) => Fd({
|
|
7510
7542
|
row: l ? l({
|
|
7511
7543
|
row: e,
|
|
7512
7544
|
rowIndex: t
|
|
@@ -7532,10 +7564,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7532
7564
|
value: n
|
|
7533
7565
|
});
|
|
7534
7566
|
});
|
|
7535
|
-
}, [t]), /* @__PURE__ */ v(
|
|
7567
|
+
}, [t]), /* @__PURE__ */ v(Cc, {
|
|
7536
7568
|
table: {
|
|
7537
7569
|
...d,
|
|
7538
|
-
headers:
|
|
7570
|
+
headers: Id({
|
|
7539
7571
|
headers: e.headers,
|
|
7540
7572
|
selectedUnits: g,
|
|
7541
7573
|
storageUnits: f,
|
|
@@ -7546,8 +7578,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7546
7578
|
canListReorder: s,
|
|
7547
7579
|
beforeRenderRow: b
|
|
7548
7580
|
});
|
|
7549
|
-
},
|
|
7550
|
-
let { translations: d } =
|
|
7581
|
+
}, Rd = { settingField: "_settingField_1x02n_1" }, zd = ({ 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 }) => {
|
|
7582
|
+
let { translations: d } = Md(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ y(e.Fragment, { children: [t, /* @__PURE__ */ v("br", {})] }, n)), p = [
|
|
7551
7583
|
...r ? [] : [{
|
|
7552
7584
|
label: d == null ? void 0 : d.allUsers,
|
|
7553
7585
|
value: !1
|
|
@@ -7562,14 +7594,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7562
7594
|
}] : []
|
|
7563
7595
|
], m = a !== void 0 && o !== void 0 && !an(a, o);
|
|
7564
7596
|
return /* @__PURE__ */ y("div", {
|
|
7565
|
-
className:
|
|
7597
|
+
className: Rd.settingField,
|
|
7566
7598
|
"data-testid": u,
|
|
7567
|
-
children: [/* @__PURE__ */ y(
|
|
7599
|
+
children: [/* @__PURE__ */ y(Ll, {
|
|
7568
7600
|
justifyContent: "space-between",
|
|
7569
7601
|
wrap: !1,
|
|
7570
7602
|
children: [i, !s && /* @__PURE__ */ v("div", {
|
|
7571
7603
|
style: { flexShrink: 0 },
|
|
7572
|
-
children: /* @__PURE__ */ y(
|
|
7604
|
+
children: /* @__PURE__ */ y(Ll, {
|
|
7573
7605
|
gap: "8px",
|
|
7574
7606
|
alignItems: "center",
|
|
7575
7607
|
children: [m && /* @__PURE__ */ v(si, {
|
|
@@ -7594,19 +7626,19 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7594
7626
|
children: f(t)
|
|
7595
7627
|
})]
|
|
7596
7628
|
});
|
|
7597
|
-
},
|
|
7629
|
+
}, Bd = (e, t) => {
|
|
7598
7630
|
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;
|
|
7599
7631
|
return {
|
|
7600
7632
|
added: Math.max(0, i),
|
|
7601
7633
|
removed: Math.max(0, a)
|
|
7602
7634
|
};
|
|
7603
|
-
},
|
|
7635
|
+
}, Vd = "split", Hd = "unified", Ud = ({ oldJson: e, newJson: t, viewType: n = Vd }) => {
|
|
7604
7636
|
var r, i;
|
|
7605
|
-
let { translations: a } =
|
|
7606
|
-
value:
|
|
7637
|
+
let { translations: a } = Md(), [o, s] = m(n), l = [{
|
|
7638
|
+
value: Vd,
|
|
7607
7639
|
label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
|
|
7608
7640
|
}, {
|
|
7609
|
-
value:
|
|
7641
|
+
value: Hd,
|
|
7610
7642
|
label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
|
|
7611
7643
|
}];
|
|
7612
7644
|
c(() => {
|
|
@@ -7614,10 +7646,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7614
7646
|
}, [n]);
|
|
7615
7647
|
let u = ({ target: { value: e } }) => {
|
|
7616
7648
|
s(e);
|
|
7617
|
-
}, { added: d, removed: f } =
|
|
7649
|
+
}, { added: d, removed: f } = Bd(e, t), p = d + f > 3500;
|
|
7618
7650
|
return /* @__PURE__ */ v(_, { children: /* @__PURE__ */ v(na, {
|
|
7619
7651
|
bordered: !0,
|
|
7620
|
-
heading: /* @__PURE__ */ y(
|
|
7652
|
+
heading: /* @__PURE__ */ y(Ll, {
|
|
7621
7653
|
gap: !0,
|
|
7622
7654
|
children: [/* @__PURE__ */ v(ya, { children: /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y(ha, {
|
|
7623
7655
|
success: !0,
|
|
@@ -7629,7 +7661,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7629
7661
|
}), /* @__PURE__ */ y(ha, {
|
|
7630
7662
|
error: !0,
|
|
7631
7663
|
children: ["-", f]
|
|
7632
|
-
})] }) }), !p && /* @__PURE__ */ v(
|
|
7664
|
+
})] }) }), !p && /* @__PURE__ */ v(hu, {
|
|
7633
7665
|
name: "viewType",
|
|
7634
7666
|
options: l,
|
|
7635
7667
|
value: o,
|
|
@@ -7647,14 +7679,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7647
7679
|
}) : /* @__PURE__ */ v(xr, {
|
|
7648
7680
|
oldValue: e,
|
|
7649
7681
|
newValue: t,
|
|
7650
|
-
splitView: o ===
|
|
7682
|
+
splitView: o === Vd,
|
|
7651
7683
|
compareMethod: Sr.WORDS
|
|
7652
7684
|
})
|
|
7653
7685
|
}) });
|
|
7654
7686
|
};
|
|
7655
7687
|
//#endregion
|
|
7656
7688
|
//#region src/helpers/date.ts
|
|
7657
|
-
function
|
|
7689
|
+
function Wd({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
7658
7690
|
return e ? new Date(e).toLocaleString(a, {
|
|
7659
7691
|
year: "numeric",
|
|
7660
7692
|
month: "short",
|
|
@@ -7668,28 +7700,28 @@ function Ud({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
7668
7700
|
}
|
|
7669
7701
|
//#endregion
|
|
7670
7702
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
7671
|
-
function
|
|
7703
|
+
function Gd(e) {
|
|
7672
7704
|
var t;
|
|
7673
7705
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
7674
7706
|
if (!n) throw Error("Invalid RegExp");
|
|
7675
7707
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
7676
7708
|
}
|
|
7677
|
-
function
|
|
7709
|
+
function Kd(e) {
|
|
7678
7710
|
if (typeof e != "object") return e;
|
|
7679
7711
|
if (e === null) return null;
|
|
7680
|
-
if (Array.isArray(e)) return e.map(
|
|
7712
|
+
if (Array.isArray(e)) return e.map(Kd);
|
|
7681
7713
|
if (e instanceof Date) return new Date(e.getTime());
|
|
7682
|
-
if (e instanceof RegExp) return
|
|
7714
|
+
if (e instanceof RegExp) return Gd(e);
|
|
7683
7715
|
let t = {};
|
|
7684
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
7716
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = Kd(e[n]));
|
|
7685
7717
|
return t;
|
|
7686
7718
|
}
|
|
7687
7719
|
//#endregion
|
|
7688
7720
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
7689
|
-
function
|
|
7721
|
+
function qd(e, t) {
|
|
7690
7722
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
7691
7723
|
}
|
|
7692
|
-
var
|
|
7724
|
+
var Jd = (e) => e[e.length - 1], Yd = class {
|
|
7693
7725
|
setResult(e) {
|
|
7694
7726
|
return this.result = e, this.hasResult = !0, this;
|
|
7695
7727
|
}
|
|
@@ -7697,16 +7729,16 @@ var qd = (e) => e[e.length - 1], Jd = class {
|
|
|
7697
7729
|
return this.exiting = !0, this;
|
|
7698
7730
|
}
|
|
7699
7731
|
push(e, t) {
|
|
7700
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
7732
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (qd(this.children), Jd(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
7701
7733
|
}
|
|
7702
|
-
},
|
|
7734
|
+
}, Xd = class extends Yd {
|
|
7703
7735
|
constructor(e, t) {
|
|
7704
7736
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
7705
7737
|
}
|
|
7706
7738
|
prepareDeltaResult(e) {
|
|
7707
7739
|
var t, n, r, i;
|
|
7708
7740
|
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)) {
|
|
7709
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
7741
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : Kd;
|
|
7710
7742
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
7711
7743
|
}
|
|
7712
7744
|
return e;
|
|
@@ -7714,15 +7746,15 @@ var qd = (e) => e[e.length - 1], Jd = class {
|
|
|
7714
7746
|
setResult(e) {
|
|
7715
7747
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
7716
7748
|
}
|
|
7717
|
-
},
|
|
7749
|
+
}, Zd = class extends Yd {
|
|
7718
7750
|
constructor(e, t) {
|
|
7719
7751
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
7720
7752
|
}
|
|
7721
|
-
},
|
|
7753
|
+
}, Qd = class extends Yd {
|
|
7722
7754
|
constructor(e) {
|
|
7723
7755
|
super(), this.delta = e, this.pipe = "reverse";
|
|
7724
7756
|
}
|
|
7725
|
-
},
|
|
7757
|
+
}, $d = class {
|
|
7726
7758
|
constructor(e) {
|
|
7727
7759
|
this.name = e, this.filters = [];
|
|
7728
7760
|
}
|
|
@@ -7786,7 +7818,7 @@ var qd = (e) => e[e.length - 1], Jd = class {
|
|
|
7786
7818
|
}
|
|
7787
7819
|
}), this);
|
|
7788
7820
|
}
|
|
7789
|
-
},
|
|
7821
|
+
}, ef = class {
|
|
7790
7822
|
constructor(e) {
|
|
7791
7823
|
this.selfOptions = e || {}, this.pipes = {};
|
|
7792
7824
|
}
|
|
@@ -7813,7 +7845,7 @@ var qd = (e) => e[e.length - 1], Jd = class {
|
|
|
7813
7845
|
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);
|
|
7814
7846
|
return n.hasResult ? n.result : void 0;
|
|
7815
7847
|
}
|
|
7816
|
-
},
|
|
7848
|
+
}, tf = (e, t, n, r) => e[n] === t[r], nf = (e, t, n, r) => {
|
|
7817
7849
|
var i, a, o;
|
|
7818
7850
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
7819
7851
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -7829,7 +7861,7 @@ var qd = (e) => e[e.length - 1], Jd = class {
|
|
|
7829
7861
|
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);
|
|
7830
7862
|
}
|
|
7831
7863
|
return d;
|
|
7832
|
-
},
|
|
7864
|
+
}, rf = (e, t, n, r) => {
|
|
7833
7865
|
let i = t.length, a = n.length, o = {
|
|
7834
7866
|
sequence: [],
|
|
7835
7867
|
indices1: [],
|
|
@@ -7851,11 +7883,11 @@ var qd = (e) => e[e.length - 1], Jd = class {
|
|
|
7851
7883
|
}
|
|
7852
7884
|
}
|
|
7853
7885
|
return o;
|
|
7854
|
-
},
|
|
7886
|
+
}, af = { get: (e, t, n, r) => {
|
|
7855
7887
|
let i = r || {};
|
|
7856
|
-
return nf(
|
|
7857
|
-
} },
|
|
7858
|
-
function
|
|
7888
|
+
return rf(nf(e, t, n || tf, i), e, t, i);
|
|
7889
|
+
} }, of = 3;
|
|
7890
|
+
function sf(e, t, n, r) {
|
|
7859
7891
|
for (let i = 0; i < n; i++) {
|
|
7860
7892
|
let n = e[i];
|
|
7861
7893
|
for (let e = 0; e < r; e++) {
|
|
@@ -7865,7 +7897,7 @@ function of(e, t, n, r) {
|
|
|
7865
7897
|
}
|
|
7866
7898
|
return !1;
|
|
7867
7899
|
}
|
|
7868
|
-
function
|
|
7900
|
+
function cf(e, t, n, r, i) {
|
|
7869
7901
|
let a = e[n], o = t[r];
|
|
7870
7902
|
if (a === o) return !0;
|
|
7871
7903
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -7878,15 +7910,15 @@ function sf(e, t, n, r, i) {
|
|
|
7878
7910
|
let l = i.hashCache2[r];
|
|
7879
7911
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l === void 0 ? !1 : c === l;
|
|
7880
7912
|
}
|
|
7881
|
-
var
|
|
7913
|
+
var lf = function(e) {
|
|
7882
7914
|
var t, n, r, i, a;
|
|
7883
7915
|
if (!e.leftIsArray) return;
|
|
7884
7916
|
let o = {
|
|
7885
7917
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
7886
7918
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
7887
7919
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
7888
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !
|
|
7889
|
-
for (; c + s < m && c + s < h &&
|
|
7920
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !sf(f, p, m, h)); s < m && s < h && cf(f, p, s, s, o);) l = s, g = new Xd(f[l], p[l]), e.push(g, l), s++;
|
|
7921
|
+
for (; c + s < m && c + s < h && cf(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new Xd(f[u], p[d]), e.push(g, d), c++;
|
|
7890
7922
|
let _;
|
|
7891
7923
|
if (s + c === m) {
|
|
7892
7924
|
if (m === h) {
|
|
@@ -7910,7 +7942,7 @@ var cf = function(e) {
|
|
|
7910
7942
|
return;
|
|
7911
7943
|
}
|
|
7912
7944
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
7913
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
7945
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = af.get(v, y, cf, o), x = [];
|
|
7914
7946
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
7915
7947
|
let t = `_${l}`;
|
|
7916
7948
|
_[t] = [
|
|
@@ -7931,8 +7963,8 @@ var cf = function(e) {
|
|
|
7931
7963
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
7932
7964
|
u = x[n];
|
|
7933
7965
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
7934
|
-
if (u !== void 0 && r &&
|
|
7935
|
-
r.splice(1, 2, l,
|
|
7966
|
+
if (u !== void 0 && r && cf(v, y, u - s, l - s, o)) {
|
|
7967
|
+
r.splice(1, 2, l, of), r.splice(1, 2, l, of), C || (r[0] = ""), d = l, g = new Xd(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
7936
7968
|
break;
|
|
7937
7969
|
}
|
|
7938
7970
|
}
|
|
@@ -7940,20 +7972,20 @@ var cf = function(e) {
|
|
|
7940
7972
|
} else {
|
|
7941
7973
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
7942
7974
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
7943
|
-
d = b.indices2[t] + s, g = new
|
|
7975
|
+
d = b.indices2[t] + s, g = new Xd(f[u], p[d]), e.push(g, d);
|
|
7944
7976
|
}
|
|
7945
7977
|
}
|
|
7946
7978
|
e.setResult(_).exit();
|
|
7947
7979
|
};
|
|
7948
|
-
|
|
7949
|
-
var
|
|
7980
|
+
lf.filterName = "arrays";
|
|
7981
|
+
var uf = {
|
|
7950
7982
|
numerically(e, t) {
|
|
7951
7983
|
return e - t;
|
|
7952
7984
|
},
|
|
7953
7985
|
numericallyBy(e) {
|
|
7954
7986
|
return (t, n) => t[e] - n[e];
|
|
7955
7987
|
}
|
|
7956
|
-
},
|
|
7988
|
+
}, df = function(e) {
|
|
7957
7989
|
var t;
|
|
7958
7990
|
if (!e.nested) return;
|
|
7959
7991
|
let n = e.delta;
|
|
@@ -7961,7 +7993,7 @@ var lf = {
|
|
|
7961
7993
|
let r, i, a = n, o = e.left, s = [], c = [], l = [];
|
|
7962
7994
|
for (r in a) if (r !== "_t") if (r[0] === "_") {
|
|
7963
7995
|
let e = r;
|
|
7964
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
7996
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === of)) s.push(Number.parseInt(r.slice(1), 10));
|
|
7965
7997
|
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]}`);
|
|
7966
7998
|
} else {
|
|
7967
7999
|
let e = r;
|
|
@@ -7973,15 +8005,15 @@ var lf = {
|
|
|
7973
8005
|
delta: a[e]
|
|
7974
8006
|
});
|
|
7975
8007
|
}
|
|
7976
|
-
for (s = s.sort(
|
|
8008
|
+
for (s = s.sort(uf.numerically), r = s.length - 1; r >= 0; r--) {
|
|
7977
8009
|
if (i = s[r], i === void 0) continue;
|
|
7978
8010
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
7979
|
-
(e == null ? void 0 : e[2]) ===
|
|
8011
|
+
(e == null ? void 0 : e[2]) === of && c.push({
|
|
7980
8012
|
index: e[1],
|
|
7981
8013
|
value: t
|
|
7982
8014
|
});
|
|
7983
8015
|
}
|
|
7984
|
-
c = c.sort(
|
|
8016
|
+
c = c.sort(uf.numericallyBy("index"));
|
|
7985
8017
|
let u = c.length;
|
|
7986
8018
|
for (r = 0; r < u; r++) {
|
|
7987
8019
|
let e = c[r];
|
|
@@ -7991,7 +8023,7 @@ var lf = {
|
|
|
7991
8023
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
7992
8024
|
let t = l[r];
|
|
7993
8025
|
if (t === void 0) continue;
|
|
7994
|
-
let n = new
|
|
8026
|
+
let n = new Zd(o[t.index], t.delta);
|
|
7995
8027
|
e.push(n, t.index);
|
|
7996
8028
|
}
|
|
7997
8029
|
if (!e.children) {
|
|
@@ -8000,8 +8032,8 @@ var lf = {
|
|
|
8000
8032
|
}
|
|
8001
8033
|
e.exit();
|
|
8002
8034
|
};
|
|
8003
|
-
|
|
8004
|
-
var
|
|
8035
|
+
df.filterName = "arrays";
|
|
8036
|
+
var ff = function(e) {
|
|
8005
8037
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
8006
8038
|
let t = e.left, n = e.children.length;
|
|
8007
8039
|
for (let r = 0; r < n; r++) {
|
|
@@ -8012,16 +8044,16 @@ var df = function(e) {
|
|
|
8012
8044
|
}
|
|
8013
8045
|
e.setResult(t).exit();
|
|
8014
8046
|
};
|
|
8015
|
-
|
|
8016
|
-
var
|
|
8047
|
+
ff.filterName = "arraysCollectChildren";
|
|
8048
|
+
var pf = function(e) {
|
|
8017
8049
|
if (!e.nested) {
|
|
8018
8050
|
let t = e.delta;
|
|
8019
|
-
if (t[2] ===
|
|
8051
|
+
if (t[2] === of) {
|
|
8020
8052
|
let n = t;
|
|
8021
8053
|
e.newName = `_${n[1]}`, e.setResult([
|
|
8022
8054
|
n[0],
|
|
8023
8055
|
Number.parseInt(e.childName.substring(1), 10),
|
|
8024
|
-
|
|
8056
|
+
of
|
|
8025
8057
|
]).exit();
|
|
8026
8058
|
}
|
|
8027
8059
|
return;
|
|
@@ -8031,26 +8063,26 @@ var ff = function(e) {
|
|
|
8031
8063
|
let n = t;
|
|
8032
8064
|
for (let t in n) {
|
|
8033
8065
|
if (t === "_t") continue;
|
|
8034
|
-
let r = new
|
|
8066
|
+
let r = new Qd(n[t]);
|
|
8035
8067
|
e.push(r, t);
|
|
8036
8068
|
}
|
|
8037
8069
|
e.exit();
|
|
8038
8070
|
};
|
|
8039
|
-
|
|
8040
|
-
var
|
|
8071
|
+
pf.filterName = "arrays";
|
|
8072
|
+
var mf = (e, t, n) => {
|
|
8041
8073
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
8042
8074
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
8043
8075
|
let r = +t;
|
|
8044
8076
|
for (let n in e) {
|
|
8045
8077
|
let i = e[n];
|
|
8046
|
-
if (Array.isArray(i)) if (i[2] ===
|
|
8078
|
+
if (Array.isArray(i)) if (i[2] === of) {
|
|
8047
8079
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
8048
8080
|
if (a === +t) return e;
|
|
8049
8081
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
8050
8082
|
} else i[2] === 0 ? Number.parseInt(n.substring(1), 10) <= r && r++ : i.length === 1 && Number.parseInt(n, 10) <= r && r--;
|
|
8051
8083
|
}
|
|
8052
8084
|
return r;
|
|
8053
|
-
},
|
|
8085
|
+
}, hf = (e) => {
|
|
8054
8086
|
if (!e || !e.children) return;
|
|
8055
8087
|
let t = e.delta;
|
|
8056
8088
|
if (t._t !== "a") return;
|
|
@@ -8061,22 +8093,22 @@ var pf = (e, t, n) => {
|
|
|
8061
8093
|
let a = r.newName;
|
|
8062
8094
|
if (a === void 0) {
|
|
8063
8095
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
8064
|
-
a =
|
|
8096
|
+
a = mf(n, r.childName, r.result);
|
|
8065
8097
|
}
|
|
8066
8098
|
i[a] !== r.result && (i[a] = r.result);
|
|
8067
8099
|
}
|
|
8068
8100
|
e.setResult(i).exit();
|
|
8069
8101
|
};
|
|
8070
|
-
|
|
8102
|
+
hf.filterName = "arraysCollectChildren";
|
|
8071
8103
|
//#endregion
|
|
8072
8104
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
8073
|
-
var
|
|
8105
|
+
var gf = function(e) {
|
|
8074
8106
|
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();
|
|
8075
8107
|
};
|
|
8076
|
-
|
|
8108
|
+
gf.filterName = "dates";
|
|
8077
8109
|
//#endregion
|
|
8078
8110
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
8079
|
-
var
|
|
8111
|
+
var _f = new Set(["__proto__"]), vf = (e) => {
|
|
8080
8112
|
if (!e || !e.children) return;
|
|
8081
8113
|
let t = e.children.length, n = e.result;
|
|
8082
8114
|
for (let r = 0; r < t; r++) {
|
|
@@ -8088,18 +8120,18 @@ var gf = new Set(["__proto__"]), _f = (e) => {
|
|
|
8088
8120
|
}
|
|
8089
8121
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
8090
8122
|
};
|
|
8091
|
-
|
|
8092
|
-
var
|
|
8123
|
+
vf.filterName = "collectChildren";
|
|
8124
|
+
var yf = (e) => {
|
|
8093
8125
|
var t;
|
|
8094
8126
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
8095
8127
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
8096
8128
|
for (let t in n) {
|
|
8097
8129
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
8098
|
-
let a = new
|
|
8130
|
+
let a = new Xd(n[t], r[t]);
|
|
8099
8131
|
e.push(a, t);
|
|
8100
8132
|
}
|
|
8101
8133
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
8102
|
-
let n = new
|
|
8134
|
+
let n = new Xd(void 0, r[t]);
|
|
8103
8135
|
e.push(n, t);
|
|
8104
8136
|
}
|
|
8105
8137
|
if (!e.children || e.children.length === 0) {
|
|
@@ -8108,15 +8140,15 @@ var vf = (e) => {
|
|
|
8108
8140
|
}
|
|
8109
8141
|
e.exit();
|
|
8110
8142
|
};
|
|
8111
|
-
|
|
8112
|
-
var
|
|
8143
|
+
yf.filterName = "objects";
|
|
8144
|
+
var bf = function(e) {
|
|
8113
8145
|
if (!e.nested) return;
|
|
8114
8146
|
let t = e.delta;
|
|
8115
8147
|
if (t._t) return;
|
|
8116
8148
|
let n = t, r = !1;
|
|
8117
8149
|
for (let t in n) {
|
|
8118
|
-
if (
|
|
8119
|
-
let i = e.left, a = new
|
|
8150
|
+
if (_f.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
8151
|
+
let i = e.left, a = new Zd(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
8120
8152
|
e.push(a, t), r = !0;
|
|
8121
8153
|
}
|
|
8122
8154
|
if (!r) {
|
|
@@ -8125,8 +8157,8 @@ var yf = function(e) {
|
|
|
8125
8157
|
}
|
|
8126
8158
|
e.exit();
|
|
8127
8159
|
};
|
|
8128
|
-
|
|
8129
|
-
var
|
|
8160
|
+
bf.filterName = "objects";
|
|
8161
|
+
var xf = function(e) {
|
|
8130
8162
|
if (!e || !e.children || e.delta._t) return;
|
|
8131
8163
|
if (e.left === null || typeof e.left != "object") {
|
|
8132
8164
|
e.setResult(e.left).exit();
|
|
@@ -8137,17 +8169,17 @@ var bf = function(e) {
|
|
|
8137
8169
|
let n = e.children[r];
|
|
8138
8170
|
if (n === void 0) continue;
|
|
8139
8171
|
let i = n.childName;
|
|
8140
|
-
|
|
8172
|
+
_f.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
8141
8173
|
}
|
|
8142
8174
|
e.setResult(t).exit();
|
|
8143
8175
|
};
|
|
8144
|
-
|
|
8145
|
-
var
|
|
8176
|
+
xf.filterName = "collectChildren";
|
|
8177
|
+
var Sf = function(e) {
|
|
8146
8178
|
if (!e.nested || e.delta._t) return;
|
|
8147
8179
|
let t = e.delta, n = !1;
|
|
8148
8180
|
for (let r in t) {
|
|
8149
|
-
if (
|
|
8150
|
-
let i = new
|
|
8181
|
+
if (_f.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
8182
|
+
let i = new Qd(t[r]);
|
|
8151
8183
|
e.push(i, r), n = !0;
|
|
8152
8184
|
}
|
|
8153
8185
|
if (!n) {
|
|
@@ -8156,25 +8188,25 @@ var xf = function(e) {
|
|
|
8156
8188
|
}
|
|
8157
8189
|
e.exit();
|
|
8158
8190
|
};
|
|
8159
|
-
|
|
8160
|
-
var
|
|
8191
|
+
Sf.filterName = "objects";
|
|
8192
|
+
var Cf = (e) => {
|
|
8161
8193
|
if (!e || !e.children || e.delta._t) return;
|
|
8162
8194
|
let t = e.children.length, n = {};
|
|
8163
8195
|
for (let r = 0; r < t; r++) {
|
|
8164
8196
|
let t = e.children[r];
|
|
8165
8197
|
if (t === void 0) continue;
|
|
8166
8198
|
let i = t.childName;
|
|
8167
|
-
|
|
8199
|
+
_f.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
8168
8200
|
}
|
|
8169
8201
|
e.setResult(n).exit();
|
|
8170
8202
|
};
|
|
8171
|
-
|
|
8203
|
+
Cf.filterName = "collectChildren";
|
|
8172
8204
|
//#endregion
|
|
8173
8205
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
8174
|
-
var
|
|
8175
|
-
function
|
|
8206
|
+
var wf = 2, Tf = 60, Ef = null;
|
|
8207
|
+
function Df(e, t) {
|
|
8176
8208
|
var n;
|
|
8177
|
-
if (!
|
|
8209
|
+
if (!Ef) {
|
|
8178
8210
|
let r;
|
|
8179
8211
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
8180
8212
|
else {
|
|
@@ -8182,7 +8214,7 @@ function Ef(e, t) {
|
|
|
8182
8214
|
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.");
|
|
8183
8215
|
throw e.diff_match_patch_not_found = !0, e;
|
|
8184
8216
|
}
|
|
8185
|
-
|
|
8217
|
+
Ef = {
|
|
8186
8218
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
8187
8219
|
patch: (e, t) => {
|
|
8188
8220
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -8194,17 +8226,17 @@ function Ef(e, t) {
|
|
|
8194
8226
|
}
|
|
8195
8227
|
};
|
|
8196
8228
|
}
|
|
8197
|
-
return
|
|
8229
|
+
return Ef;
|
|
8198
8230
|
}
|
|
8199
|
-
var
|
|
8231
|
+
var Of = function(e) {
|
|
8200
8232
|
var t, n;
|
|
8201
8233
|
if (e.leftType !== "string") return;
|
|
8202
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
8234
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || Tf;
|
|
8203
8235
|
if (r.length < a || i.length < a) {
|
|
8204
8236
|
e.setResult([r, i]).exit();
|
|
8205
8237
|
return;
|
|
8206
8238
|
}
|
|
8207
|
-
let o =
|
|
8239
|
+
let o = Df(e.options);
|
|
8208
8240
|
if (!o) {
|
|
8209
8241
|
e.setResult([r, i]).exit();
|
|
8210
8242
|
return;
|
|
@@ -8213,19 +8245,19 @@ var Df = function(e) {
|
|
|
8213
8245
|
e.setResult([
|
|
8214
8246
|
s(r, i),
|
|
8215
8247
|
0,
|
|
8216
|
-
|
|
8248
|
+
wf
|
|
8217
8249
|
]).exit();
|
|
8218
8250
|
};
|
|
8219
|
-
|
|
8220
|
-
var
|
|
8251
|
+
Of.filterName = "texts";
|
|
8252
|
+
var kf = function(e) {
|
|
8221
8253
|
if (e.nested) return;
|
|
8222
8254
|
let t = e.delta;
|
|
8223
|
-
if (t[2] !==
|
|
8224
|
-
let n = t, r =
|
|
8255
|
+
if (t[2] !== wf) return;
|
|
8256
|
+
let n = t, r = Df(e.options, !0).patch;
|
|
8225
8257
|
e.setResult(r(e.left, n[0])).exit();
|
|
8226
8258
|
};
|
|
8227
|
-
|
|
8228
|
-
var
|
|
8259
|
+
kf.filterName = "texts";
|
|
8260
|
+
var Af = (e) => {
|
|
8229
8261
|
var t, n, r;
|
|
8230
8262
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
8231
8263
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -8246,21 +8278,21 @@ var kf = (e) => {
|
|
|
8246
8278
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
8247
8279
|
}
|
|
8248
8280
|
return a.join("\n");
|
|
8249
|
-
},
|
|
8281
|
+
}, jf = function(e) {
|
|
8250
8282
|
if (e.nested) return;
|
|
8251
8283
|
let t = e.delta;
|
|
8252
|
-
if (t[2] !==
|
|
8284
|
+
if (t[2] !== wf) return;
|
|
8253
8285
|
let n = t;
|
|
8254
8286
|
e.setResult([
|
|
8255
|
-
|
|
8287
|
+
Af(n[0]),
|
|
8256
8288
|
0,
|
|
8257
|
-
|
|
8289
|
+
wf
|
|
8258
8290
|
]).exit();
|
|
8259
8291
|
};
|
|
8260
|
-
|
|
8292
|
+
jf.filterName = "texts";
|
|
8261
8293
|
//#endregion
|
|
8262
8294
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
8263
|
-
var
|
|
8295
|
+
var Mf = function(e) {
|
|
8264
8296
|
if (e.left === e.right) {
|
|
8265
8297
|
e.setResult(void 0).exit();
|
|
8266
8298
|
return;
|
|
@@ -8293,8 +8325,8 @@ var jf = function(e) {
|
|
|
8293
8325
|
}
|
|
8294
8326
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
8295
8327
|
};
|
|
8296
|
-
|
|
8297
|
-
var
|
|
8328
|
+
Mf.filterName = "trivial";
|
|
8329
|
+
var Nf = function(e) {
|
|
8298
8330
|
if (e.delta === void 0) {
|
|
8299
8331
|
e.setResult(e.left).exit();
|
|
8300
8332
|
return;
|
|
@@ -8318,8 +8350,8 @@ var Mf = function(e) {
|
|
|
8318
8350
|
}
|
|
8319
8351
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
8320
8352
|
};
|
|
8321
|
-
|
|
8322
|
-
var
|
|
8353
|
+
Nf.filterName = "trivial";
|
|
8354
|
+
var Pf = function(e) {
|
|
8323
8355
|
if (e.delta === void 0) {
|
|
8324
8356
|
e.setResult(e.delta).exit();
|
|
8325
8357
|
return;
|
|
@@ -8340,36 +8372,36 @@ var Nf = function(e) {
|
|
|
8340
8372
|
}
|
|
8341
8373
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
8342
8374
|
};
|
|
8343
|
-
|
|
8375
|
+
Pf.filterName = "trivial";
|
|
8344
8376
|
//#endregion
|
|
8345
8377
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
8346
|
-
var
|
|
8378
|
+
var Ff = class {
|
|
8347
8379
|
constructor(e) {
|
|
8348
|
-
this.processor = new
|
|
8380
|
+
this.processor = new ef(e), this.processor.pipe(new $d("diff").append(vf, Mf, gf, Of, yf, lf).shouldHaveResult()), this.processor.pipe(new $d("patch").append(xf, ff, Nf, kf, bf, df).shouldHaveResult()), this.processor.pipe(new $d("reverse").append(Cf, hf, Pf, jf, Sf, pf).shouldHaveResult());
|
|
8349
8381
|
}
|
|
8350
8382
|
options(e) {
|
|
8351
8383
|
return this.processor.options(e);
|
|
8352
8384
|
}
|
|
8353
8385
|
diff(e, t) {
|
|
8354
|
-
return this.processor.process(new
|
|
8386
|
+
return this.processor.process(new Xd(e, t));
|
|
8355
8387
|
}
|
|
8356
8388
|
patch(e, t) {
|
|
8357
|
-
return this.processor.process(new
|
|
8389
|
+
return this.processor.process(new Zd(e, t));
|
|
8358
8390
|
}
|
|
8359
8391
|
reverse(e) {
|
|
8360
|
-
return this.processor.process(new
|
|
8392
|
+
return this.processor.process(new Qd(e));
|
|
8361
8393
|
}
|
|
8362
8394
|
unpatch(e, t) {
|
|
8363
8395
|
return this.patch(e, this.reverse(t));
|
|
8364
8396
|
}
|
|
8365
8397
|
clone(e) {
|
|
8366
|
-
return
|
|
8398
|
+
return Kd(e);
|
|
8367
8399
|
}
|
|
8368
8400
|
};
|
|
8369
8401
|
//#endregion
|
|
8370
8402
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
8371
|
-
function
|
|
8372
|
-
return new
|
|
8403
|
+
function If(e) {
|
|
8404
|
+
return new Ff(e);
|
|
8373
8405
|
}
|
|
8374
8406
|
//#endregion
|
|
8375
8407
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -8942,46 +8974,46 @@ $.Diff = function(e, t) {
|
|
|
8942
8974
|
};
|
|
8943
8975
|
//#endregion
|
|
8944
8976
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
8945
|
-
var
|
|
8977
|
+
var Lf = (e = {}) => If({
|
|
8946
8978
|
...e,
|
|
8947
8979
|
textDiff: {
|
|
8948
8980
|
diffMatchPatch: $,
|
|
8949
8981
|
minLength: 120
|
|
8950
8982
|
},
|
|
8951
8983
|
cloneDiffValues: !0
|
|
8952
|
-
}),
|
|
8984
|
+
}), Rf = ["user", "unittemplate"], zf = Lf(), Bf = (e, t, n) => {
|
|
8953
8985
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
8954
8986
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
8955
8987
|
let n = r[t[e]];
|
|
8956
8988
|
if (n) return n;
|
|
8957
8989
|
}
|
|
8958
8990
|
return n || "";
|
|
8959
|
-
},
|
|
8991
|
+
}, Vf = (e) => {
|
|
8960
8992
|
let t = (e) => Nn(e) ? Gn(e) : String(e);
|
|
8961
8993
|
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);
|
|
8962
|
-
},
|
|
8994
|
+
}, Hf = (e) => {
|
|
8963
8995
|
switch (e.length) {
|
|
8964
8996
|
case 1: {
|
|
8965
8997
|
let [t] = e;
|
|
8966
8998
|
return {
|
|
8967
8999
|
type: "created",
|
|
8968
9000
|
before: "",
|
|
8969
|
-
after:
|
|
9001
|
+
after: Vf(t)
|
|
8970
9002
|
};
|
|
8971
9003
|
}
|
|
8972
9004
|
case 2: {
|
|
8973
9005
|
let [t, n] = e;
|
|
8974
9006
|
return {
|
|
8975
9007
|
type: "modified",
|
|
8976
|
-
before:
|
|
8977
|
-
after:
|
|
9008
|
+
before: Vf(t),
|
|
9009
|
+
after: Vf(n)
|
|
8978
9010
|
};
|
|
8979
9011
|
}
|
|
8980
9012
|
case 3: {
|
|
8981
9013
|
let [t] = e;
|
|
8982
9014
|
return {
|
|
8983
9015
|
type: "deleted",
|
|
8984
|
-
before:
|
|
9016
|
+
before: Vf(t),
|
|
8985
9017
|
after: ""
|
|
8986
9018
|
};
|
|
8987
9019
|
}
|
|
@@ -8991,15 +9023,15 @@ var If = (e = {}) => Ff({
|
|
|
8991
9023
|
after: ""
|
|
8992
9024
|
};
|
|
8993
9025
|
}
|
|
8994
|
-
},
|
|
8995
|
-
let r =
|
|
9026
|
+
}, Uf = (e) => Array.isArray(e), Wf = (e, t) => t ? Uf(t) ? t.length === 0 ? e : t.reduce((e, t) => zf.unpatch(Xt(e), Xt(t)), Xt(e)) : zf.unpatch(Xt(e), Xt(t)) : e, Gf = (e) => e.createdAt || e.date, Kf = (e, t, n) => {
|
|
9027
|
+
let r = Gf(e);
|
|
8996
9028
|
if (!r) return {
|
|
8997
9029
|
oldJson: "",
|
|
8998
9030
|
newJson: "",
|
|
8999
9031
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
9000
9032
|
};
|
|
9001
9033
|
let i = t.filter((e) => {
|
|
9002
|
-
let t =
|
|
9034
|
+
let t = Gf(e);
|
|
9003
9035
|
return !!(e.diffs && t && t >= r);
|
|
9004
9036
|
}), a = Array.from({ length: i.length + 1 });
|
|
9005
9037
|
a[0] = Xt(n);
|
|
@@ -9012,7 +9044,7 @@ var If = (e = {}) => Ff({
|
|
|
9012
9044
|
a[e + 1] = a[e];
|
|
9013
9045
|
continue;
|
|
9014
9046
|
}
|
|
9015
|
-
a[e + 1] =
|
|
9047
|
+
a[e + 1] = Wf(a[e], t);
|
|
9016
9048
|
}
|
|
9017
9049
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
9018
9050
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -9027,10 +9059,10 @@ var If = (e = {}) => Ff({
|
|
|
9027
9059
|
oldJson: o,
|
|
9028
9060
|
newJson: s
|
|
9029
9061
|
};
|
|
9030
|
-
},
|
|
9062
|
+
}, qf = (e, t, n = {}, r = []) => {
|
|
9031
9063
|
var i;
|
|
9032
9064
|
if (!e) return;
|
|
9033
|
-
let a = [...
|
|
9065
|
+
let a = [...Rf, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
9034
9066
|
Object.keys(e).forEach((i) => {
|
|
9035
9067
|
var o;
|
|
9036
9068
|
let s = e[i];
|
|
@@ -9043,12 +9075,12 @@ var If = (e = {}) => Ff({
|
|
|
9043
9075
|
tn(s) ? t.push({
|
|
9044
9076
|
deltaFormat: [...s],
|
|
9045
9077
|
path: c
|
|
9046
|
-
}) : ln(s) &&
|
|
9078
|
+
}) : ln(s) && qf(s, t, n, c);
|
|
9047
9079
|
});
|
|
9048
|
-
},
|
|
9080
|
+
}, Jf = (e, t = {}) => {
|
|
9049
9081
|
let n = [];
|
|
9050
|
-
return e ? (
|
|
9051
|
-
},
|
|
9082
|
+
return e ? (qf(e, n, t), n) : [];
|
|
9083
|
+
}, Yf = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), Xf = (e) => {
|
|
9052
9084
|
if (e == null || e === "") return "empty";
|
|
9053
9085
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
9054
9086
|
if (typeof e == "string") return e;
|
|
@@ -9059,32 +9091,32 @@ var If = (e = {}) => Ff({
|
|
|
9059
9091
|
} catch {
|
|
9060
9092
|
return String(e);
|
|
9061
9093
|
}
|
|
9062
|
-
},
|
|
9094
|
+
}, Zf = (e, t = e.length - 1) => {
|
|
9063
9095
|
if (t >= e.length) return "Value";
|
|
9064
9096
|
let n = e[t];
|
|
9065
|
-
return !n || An(n) ?
|
|
9066
|
-
},
|
|
9067
|
-
let o =
|
|
9097
|
+
return !n || An(n) ? Zf(e, t - 1) : Yf(n);
|
|
9098
|
+
}, Qf = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
9099
|
+
let o = Xf(r), s = Xf(i), c = a ? ` in ${a}` : "";
|
|
9068
9100
|
switch (t) {
|
|
9069
9101
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
9070
9102
|
case "created": return `${e} created ${s}${c}.`;
|
|
9071
9103
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
9072
9104
|
default: return `${e} changed ${n}${c}.`;
|
|
9073
9105
|
}
|
|
9074
|
-
},
|
|
9106
|
+
}, $f = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => /* @__PURE__ */ v(Cc, { table: {
|
|
9075
9107
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
9076
9108
|
rows: n.map((n) => {
|
|
9077
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
9078
|
-
return { cells: [{ value:
|
|
9109
|
+
let { deltaFormat: i, path: a } = n, o = Bf(e, a, r), { type: s, before: c, after: l } = Hf(i);
|
|
9110
|
+
return { cells: [{ value: Qf({
|
|
9079
9111
|
userName: t,
|
|
9080
9112
|
type: s,
|
|
9081
|
-
property:
|
|
9113
|
+
property: Zf(a),
|
|
9082
9114
|
before: c,
|
|
9083
9115
|
after: l,
|
|
9084
9116
|
sectionName: o
|
|
9085
9117
|
}) }] };
|
|
9086
9118
|
})
|
|
9087
|
-
} }),
|
|
9119
|
+
} }), ep = Object.freeze({
|
|
9088
9120
|
summary: {
|
|
9089
9121
|
label: "Summary",
|
|
9090
9122
|
value: "summary"
|
|
@@ -9093,33 +9125,33 @@ var If = (e = {}) => Ff({
|
|
|
9093
9125
|
label: "Compare",
|
|
9094
9126
|
value: "compare"
|
|
9095
9127
|
}
|
|
9096
|
-
}),
|
|
9097
|
-
let c = [
|
|
9128
|
+
}), tp = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
9129
|
+
let c = [ep.summary, ep.compare].map(({ label: e, value: t }) => ({
|
|
9098
9130
|
label: e,
|
|
9099
9131
|
value: t
|
|
9100
9132
|
})), [l, u] = m(c[0]), { diffs: d = void 0 } = e || {};
|
|
9101
9133
|
if (!d) return null;
|
|
9102
|
-
let { oldJson: f, newJson: p, error: h } =
|
|
9134
|
+
let { oldJson: f, newJson: p, error: h } = Kf(e, t, n);
|
|
9103
9135
|
return /* @__PURE__ */ v(Ka, {
|
|
9104
9136
|
visible: r,
|
|
9105
9137
|
centered: !0,
|
|
9106
9138
|
children: /* @__PURE__ */ v(Sa, { dialog: {
|
|
9107
9139
|
scroll: !0,
|
|
9108
9140
|
heading: "Comparison view",
|
|
9109
|
-
content: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(
|
|
9141
|
+
content: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(Nu, {
|
|
9110
9142
|
name: "ViewTab",
|
|
9111
9143
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
9112
9144
|
options: c,
|
|
9113
9145
|
value: l
|
|
9114
|
-
}), l.value === "summary" ? /* @__PURE__ */ v(
|
|
9146
|
+
}), l.value === "summary" ? /* @__PURE__ */ v($f, {
|
|
9115
9147
|
userName: e.userName,
|
|
9116
9148
|
sectionNames: a,
|
|
9117
|
-
diffs:
|
|
9149
|
+
diffs: Jf(d, i),
|
|
9118
9150
|
defaultSectionName: o
|
|
9119
9151
|
}) : h ? /* @__PURE__ */ v("div", {
|
|
9120
9152
|
style: { padding: 16 },
|
|
9121
9153
|
children: h
|
|
9122
|
-
}) : /* @__PURE__ */ v(
|
|
9154
|
+
}) : /* @__PURE__ */ v(Ud, {
|
|
9123
9155
|
oldJson: f,
|
|
9124
9156
|
newJson: p
|
|
9125
9157
|
})] }),
|
|
@@ -9132,7 +9164,7 @@ var If = (e = {}) => Ff({
|
|
|
9132
9164
|
height: "90vh"
|
|
9133
9165
|
} })
|
|
9134
9166
|
});
|
|
9135
|
-
},
|
|
9167
|
+
}, np = [
|
|
9136
9168
|
{
|
|
9137
9169
|
label: "10 / page",
|
|
9138
9170
|
value: 10
|
|
@@ -9145,8 +9177,8 @@ var If = (e = {}) => Ff({
|
|
|
9145
9177
|
label: "50 / page",
|
|
9146
9178
|
value: 50
|
|
9147
9179
|
}
|
|
9148
|
-
],
|
|
9149
|
-
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s =
|
|
9180
|
+
], rp = (e, t = {}) => {
|
|
9181
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = Jf(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
9150
9182
|
if (i === "API") return a === "Created" ? "Created through API" : "Changed through API";
|
|
9151
9183
|
switch (a) {
|
|
9152
9184
|
case "Created": return `Created by ${r}`;
|
|
@@ -9156,7 +9188,7 @@ var If = (e = {}) => Ff({
|
|
|
9156
9188
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
9157
9189
|
default: return `Change by ${r}`;
|
|
9158
9190
|
}
|
|
9159
|
-
},
|
|
9191
|
+
}, ip = ({ 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: h, isLogDisabled: g }) => {
|
|
9160
9192
|
let [b, x] = m(!1), [S, C] = m(null), w = (e) => {
|
|
9161
9193
|
if (e.snapshot) {
|
|
9162
9194
|
f == null || f(e.snapshot, e);
|
|
@@ -9175,7 +9207,7 @@ var If = (e = {}) => Ff({
|
|
|
9175
9207
|
return {
|
|
9176
9208
|
cells: [
|
|
9177
9209
|
{
|
|
9178
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
9210
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : rp(e, l),
|
|
9179
9211
|
type: "Link",
|
|
9180
9212
|
disabled: n,
|
|
9181
9213
|
onClick: n ? void 0 : () => w(e),
|
|
@@ -9194,8 +9226,8 @@ var If = (e = {}) => Ff({
|
|
|
9194
9226
|
type: "Static"
|
|
9195
9227
|
},
|
|
9196
9228
|
{
|
|
9197
|
-
value:
|
|
9198
|
-
date:
|
|
9229
|
+
value: Wd({
|
|
9230
|
+
date: Gf(e),
|
|
9199
9231
|
showTime: !0
|
|
9200
9232
|
}),
|
|
9201
9233
|
type: "Static"
|
|
@@ -9205,12 +9237,12 @@ var If = (e = {}) => Ff({
|
|
|
9205
9237
|
};
|
|
9206
9238
|
});
|
|
9207
9239
|
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(na, {
|
|
9208
|
-
heading: /* @__PURE__ */ y(
|
|
9240
|
+
heading: /* @__PURE__ */ y(Ll, {
|
|
9209
9241
|
gap: !0,
|
|
9210
9242
|
wrap: !0,
|
|
9211
9243
|
children: [/* @__PURE__ */ v(ya, { children: "Changes" }), c.map((e) => {
|
|
9212
9244
|
var t;
|
|
9213
|
-
return /* @__PURE__ */ v(
|
|
9245
|
+
return /* @__PURE__ */ v(hl, {
|
|
9214
9246
|
small: (t = e.small) == null ? !0 : t,
|
|
9215
9247
|
checked: e.checked,
|
|
9216
9248
|
onChange: e.onChange,
|
|
@@ -9220,11 +9252,11 @@ var If = (e = {}) => Ff({
|
|
|
9220
9252
|
})]
|
|
9221
9253
|
}),
|
|
9222
9254
|
padding: !1,
|
|
9223
|
-
children: r ? /* @__PURE__ */ v(
|
|
9255
|
+
children: r ? /* @__PURE__ */ v(iu, {
|
|
9224
9256
|
height: "100px",
|
|
9225
9257
|
theme: Or.WHITE,
|
|
9226
9258
|
children: /* @__PURE__ */ v(mi, { dark: !0 })
|
|
9227
|
-
}) : /* @__PURE__ */ v(
|
|
9259
|
+
}) : /* @__PURE__ */ v(Cc, { table: {
|
|
9228
9260
|
headers: T,
|
|
9229
9261
|
testId: "auditlog-table",
|
|
9230
9262
|
rows: E,
|
|
@@ -9238,14 +9270,14 @@ var If = (e = {}) => Ff({
|
|
|
9238
9270
|
onChange: (e) => {
|
|
9239
9271
|
u(Number(e.target.value));
|
|
9240
9272
|
},
|
|
9241
|
-
options:
|
|
9273
|
+
options: np,
|
|
9242
9274
|
value: a
|
|
9243
9275
|
},
|
|
9244
9276
|
onSelectPage: (e) => d(e),
|
|
9245
9277
|
small: !0
|
|
9246
9278
|
} }
|
|
9247
9279
|
} })
|
|
9248
|
-
}), b && S && S.diffs && /* @__PURE__ */ v(
|
|
9280
|
+
}), b && S && S.diffs && /* @__PURE__ */ v(tp, {
|
|
9249
9281
|
sectionNames: o,
|
|
9250
9282
|
isOpen: b,
|
|
9251
9283
|
onClose: () => x(!1),
|
|
@@ -9255,7 +9287,7 @@ var If = (e = {}) => Ff({
|
|
|
9255
9287
|
data: t,
|
|
9256
9288
|
transformDiffsConfig: l
|
|
9257
9289
|
})] });
|
|
9258
|
-
},
|
|
9290
|
+
}, ap = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
9259
9291
|
let i = window.location.href, a = p(i);
|
|
9260
9292
|
return c(() => {
|
|
9261
9293
|
a.current = i;
|
|
@@ -9278,10 +9310,10 @@ var If = (e = {}) => Ff({
|
|
|
9278
9310
|
});
|
|
9279
9311
|
};
|
|
9280
9312
|
}, [e, t]), null;
|
|
9281
|
-
},
|
|
9282
|
-
|
|
9283
|
-
e ===
|
|
9313
|
+
}, op = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, sp = (e) => {
|
|
9314
|
+
Nd(Od.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
9315
|
+
e === Od.Translations ? Nd(e, Ad(t)) : Nd(e, op(t) ? t : { ...t });
|
|
9284
9316
|
});
|
|
9285
9317
|
};
|
|
9286
9318
|
//#endregion
|
|
9287
|
-
export { qr as Accordion, fi as AccordionWithDefaultToggle, Ji as Actions, Tr as Align,
|
|
9319
|
+
export { qr as Accordion, fi as AccordionWithDefaultToggle, Ji as Actions, Tr as Align, ip as AuditLog, Pi as Badge, Qi as Breadcrumb, Xi as BreadcrumbLinkType, K as Button, ea as ButtonGroup, Er as ButtonPosition, hi as ButtonType, na as Card, ci as CheckBox, Vr as Chevron, Wr as Collapse, wr as Color, sa as ColorInput, fa as Column, Sa as Dialog, Ud as DiffViewer, H as DisabledContext, _a as Divider, ka as Drawer, Bu as ElementType, Pc as Empty, Il as Field, Ml as FileButton, za as FileInput, Ll as Flex, zl as FormRow, Ul as Grid, B as GroupOrder, ya as Heading, si as HelpIcon, U as Icon, V as IconType, Pa as Input, Ma as InputGroup, ks as InputGroupAddon, Ia as InputReaderMethods, kr as InputType, Pl as Label, nu as List, Gl as ListHeading, Zl as ListSubheading, iu as Loader, Ki as Menu, Si as MenuCarat, xi as MenuType, po as Message, oo as MessageType, Ka as Modal, yo as NativeSelect, Gs as NumberInput, uu as OptionDropdown, fu as Page, As as Pagination, Ku as PopConfirm, aa as Popover, Ha as Portal, mu as PrintHeader, Ya as ProgressBar, hu as RadioButton, bu as RichTextInput, Su as Row, Cs as Select, zd as SettingField, Du as SideBar, ku as Skeleton, ec as Slider, eo as SmartUploadModal, Ba as Spacer, mi as Spinner, Cc as Table, jl as TableImportExport, Nu as Tabs, ha as Text, Iu as TextArea, Pu as TextLink, Dr as TextTransform, Or as Theme, cr as Toaster, hl as Toggle, W as Tooltip, Uu as TopBar, Xu as Tree, cd as TreeTable, Cr as TriggerType, Dd as UnitInput, Ld as UnitTable, ap as UsageTracker, fl as dismissToast, wd as initializeContext, sp as initializeGuiLibrary, La as readFile, dl as toast, bo as useFocus, Va as useKeyboardEvent, Co as useWindowWidth };
|