@oliasoft-open-source/react-ui-library 6.5.0-beta-2 → 6.5.1-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -3464,72 +3464,72 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3464
3464
|
t == null ? r : t
|
|
3465
3465
|
] }),
|
|
3466
3466
|
children: /* @__PURE__ */ v("div", { className: Zs.dot })
|
|
3467
|
-
}), e), {}), er), $s = ({ 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:
|
|
3467
|
+
}), e), {}), er), $s = (e) => Array.isArray(e) ? `range:${e.length}:${e.join(",")}` : e, 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: f = !1, tooltipFormatter: p = (e) => e, disabled: m = !1, range: h = !1, small: _ = !1, vertical: b = {
|
|
3468
3468
|
enabled: !1,
|
|
3469
3469
|
width: "100px",
|
|
3470
3470
|
height: "400px"
|
|
3471
|
-
}, onChange:
|
|
3472
|
-
let
|
|
3471
|
+
}, onChange: x, onChangeComplete: S }) => {
|
|
3472
|
+
let C = s(H), w = Qs(l), T = d(() => i, [$s(i)]), E = (n) => ({ target: {
|
|
3473
3473
|
name: e == null ? "" : e,
|
|
3474
3474
|
value: n,
|
|
3475
3475
|
label: typeof t == "string" ? t : String(t)
|
|
3476
|
-
} }),
|
|
3477
|
-
|
|
3478
|
-
},
|
|
3479
|
-
|
|
3480
|
-
},
|
|
3476
|
+
} }), D = (e) => {
|
|
3477
|
+
x(E(e));
|
|
3478
|
+
}, O = (e) => {
|
|
3479
|
+
S == null || S(E(e));
|
|
3480
|
+
}, k = () => /* @__PURE__ */ v("div", {
|
|
3481
3481
|
className: Zs.button,
|
|
3482
3482
|
children: /* @__PURE__ */ v(K, {
|
|
3483
3483
|
basic: !0,
|
|
3484
3484
|
small: !0,
|
|
3485
3485
|
round: !0,
|
|
3486
3486
|
onClick: () => {
|
|
3487
|
-
let e =
|
|
3488
|
-
|
|
3487
|
+
let e = h ? [a, i == null ? void 0 : i[1]] : a;
|
|
3488
|
+
D(e), O(e);
|
|
3489
3489
|
},
|
|
3490
|
-
disabled:
|
|
3490
|
+
disabled: m || i === a || C,
|
|
3491
3491
|
icon: V.FAST_BACKWARD
|
|
3492
3492
|
})
|
|
3493
|
-
}),
|
|
3493
|
+
}), A = () => /* @__PURE__ */ v("div", {
|
|
3494
3494
|
className: Zs.button,
|
|
3495
3495
|
children: /* @__PURE__ */ v(K, {
|
|
3496
3496
|
basic: !0,
|
|
3497
3497
|
small: !0,
|
|
3498
3498
|
round: !0,
|
|
3499
3499
|
onClick: () => {
|
|
3500
|
-
let e =
|
|
3501
|
-
|
|
3500
|
+
let e = h ? [i == null ? void 0 : i[0], o] : o;
|
|
3501
|
+
D(e), O(e);
|
|
3502
3502
|
},
|
|
3503
|
-
disabled:
|
|
3503
|
+
disabled: m || i === o || C,
|
|
3504
3504
|
icon: V.FAST_FORWARD
|
|
3505
3505
|
})
|
|
3506
3506
|
});
|
|
3507
3507
|
return /* @__PURE__ */ y("div", {
|
|
3508
|
-
className: g(Zs.container,
|
|
3509
|
-
style:
|
|
3510
|
-
width:
|
|
3511
|
-
height:
|
|
3508
|
+
className: g(Zs.container, _ ? Zs.small : "", b.enabled ? Zs.vertical : ""),
|
|
3509
|
+
style: b.enabled ? {
|
|
3510
|
+
width: b.width,
|
|
3511
|
+
height: b.height
|
|
3512
3512
|
} : { width: n },
|
|
3513
3513
|
children: [
|
|
3514
|
-
u && (
|
|
3514
|
+
u && (b.enabled ? /* @__PURE__ */ v(A, {}) : /* @__PURE__ */ v(k, {})),
|
|
3515
3515
|
/* @__PURE__ */ v(Qn, {
|
|
3516
|
-
range:
|
|
3516
|
+
range: h,
|
|
3517
3517
|
allowCross: !1,
|
|
3518
|
-
className: g((
|
|
3519
|
-
value:
|
|
3518
|
+
className: g((m || C) && Zs.rcSliderDisabled, u && Zs.hasArrows),
|
|
3519
|
+
value: T,
|
|
3520
3520
|
max: o,
|
|
3521
3521
|
min: a,
|
|
3522
3522
|
step: c,
|
|
3523
|
-
marks:
|
|
3524
|
-
onChange: (e) =>
|
|
3525
|
-
onChangeComplete: (e) =>
|
|
3526
|
-
disabled:
|
|
3527
|
-
vertical:
|
|
3523
|
+
marks: w,
|
|
3524
|
+
onChange: (e) => D(e),
|
|
3525
|
+
onChangeComplete: (e) => O(e),
|
|
3526
|
+
disabled: m || C,
|
|
3527
|
+
vertical: b.enabled,
|
|
3528
3528
|
handleRender: (e, t) => /* @__PURE__ */ y("div", {
|
|
3529
3529
|
style: { position: "relative" },
|
|
3530
|
-
children: [e,
|
|
3530
|
+
children: [e, f && t.dragging && /* @__PURE__ */ v(W, {
|
|
3531
3531
|
display: "block",
|
|
3532
|
-
text:
|
|
3532
|
+
text: p(i),
|
|
3533
3533
|
forceOpen: !0,
|
|
3534
3534
|
children: /* @__PURE__ */ v("div", { style: {
|
|
3535
3535
|
position: "absolute",
|
|
@@ -3538,7 +3538,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3538
3538
|
})]
|
|
3539
3539
|
})
|
|
3540
3540
|
}),
|
|
3541
|
-
u && (
|
|
3541
|
+
u && (b.enabled ? /* @__PURE__ */ v(k, {}) : /* @__PURE__ */ v(A, {})),
|
|
3542
3542
|
t && /* @__PURE__ */ v("label", {
|
|
3543
3543
|
className: Zs.label,
|
|
3544
3544
|
style: { width: r },
|
|
@@ -3546,9 +3546,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3546
3546
|
})
|
|
3547
3547
|
]
|
|
3548
3548
|
});
|
|
3549
|
-
},
|
|
3549
|
+
}, tc = ({ cell: e }) => /* @__PURE__ */ v("div", {
|
|
3550
3550
|
className: X.inputWrapper,
|
|
3551
|
-
children: /* @__PURE__ */ v(
|
|
3551
|
+
children: /* @__PURE__ */ v(ec, {
|
|
3552
3552
|
label: e.label,
|
|
3553
3553
|
value: e.value,
|
|
3554
3554
|
min: e.min,
|
|
@@ -3561,7 +3561,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3561
3561
|
tooltipFormatter: e.tooltipFormatter,
|
|
3562
3562
|
disabled: e.disabled
|
|
3563
3563
|
})
|
|
3564
|
-
}),
|
|
3564
|
+
}), nc = ({ cell: e }) => {
|
|
3565
3565
|
let { tooltip: t, icon: n } = e;
|
|
3566
3566
|
return /* @__PURE__ */ v("div", {
|
|
3567
3567
|
className: X.iconCellWrapper,
|
|
@@ -3573,7 +3573,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3573
3573
|
children: /* @__PURE__ */ v(U, { icon: n })
|
|
3574
3574
|
})
|
|
3575
3575
|
});
|
|
3576
|
-
},
|
|
3576
|
+
}, rc = ({ cell: e }) => /* @__PURE__ */ v(Ji, { actions: e.actions }), ic = ({ cell: e }) => {
|
|
3577
3577
|
let { helpIcon: t } = e;
|
|
3578
3578
|
return t ? /* @__PURE__ */ v("div", {
|
|
3579
3579
|
className: X.icon,
|
|
@@ -3582,7 +3582,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3582
3582
|
text: t.tooltip
|
|
3583
3583
|
})
|
|
3584
3584
|
}) : null;
|
|
3585
|
-
},
|
|
3585
|
+
}, ac = ({ cell: e }) => {
|
|
3586
3586
|
let { libraryIcon: t } = e;
|
|
3587
3587
|
return t ? /* @__PURE__ */ v("div", {
|
|
3588
3588
|
className: X.icon,
|
|
@@ -3592,7 +3592,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3592
3592
|
icon: V.LIBRARY
|
|
3593
3593
|
})
|
|
3594
3594
|
}) : null;
|
|
3595
|
-
},
|
|
3595
|
+
}, oc = ({ cell: e }) => {
|
|
3596
3596
|
let { hasSort: t, sort: n, sortPriority: r } = e;
|
|
3597
3597
|
return t ? /* @__PURE__ */ y("span", {
|
|
3598
3598
|
className: X.sortingCellIcon,
|
|
@@ -3607,7 +3607,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3607
3607
|
children: /* @__PURE__ */ v(U, { icon: V.SORT_DESCENDING })
|
|
3608
3608
|
}), r && n ? /* @__PURE__ */ v("sup", { children: r }) : null]
|
|
3609
3609
|
}) : null;
|
|
3610
|
-
},
|
|
3610
|
+
}, sc = ({ cell: e, isHeader: t, testId: n }) => {
|
|
3611
3611
|
let { error: r, warning: i, tooltip: a, maxTooltipWidth: o, hasSort: s, onSort: c, type: l } = e, u = /* @__PURE__ */ y("div", {
|
|
3612
3612
|
className: g(X.staticCellContent, l === "Unit" ? X.unit : ""),
|
|
3613
3613
|
onClick: s ? (e) => c && c(e) : () => {},
|
|
@@ -3615,9 +3615,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3615
3615
|
"data-warning": i || null,
|
|
3616
3616
|
"data-testid": n,
|
|
3617
3617
|
children: [e.value, t ? /* @__PURE__ */ y(_, { children: [
|
|
3618
|
-
/* @__PURE__ */ v(rc, { cell: e }),
|
|
3619
3618
|
/* @__PURE__ */ v(ic, { cell: e }),
|
|
3620
|
-
/* @__PURE__ */ v(ac, { cell: e })
|
|
3619
|
+
/* @__PURE__ */ v(ac, { cell: e }),
|
|
3620
|
+
/* @__PURE__ */ v(oc, { cell: e })
|
|
3621
3621
|
] }) : null]
|
|
3622
3622
|
});
|
|
3623
3623
|
return /* @__PURE__ */ v("div", {
|
|
@@ -3632,7 +3632,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3632
3632
|
children: u
|
|
3633
3633
|
})
|
|
3634
3634
|
});
|
|
3635
|
-
},
|
|
3635
|
+
}, cc = ({ cell: e, testId: t }) => {
|
|
3636
3636
|
let { content: n, fullWidth: r, closeOnOutsideClick: i, disabled: a } = e;
|
|
3637
3637
|
return /* @__PURE__ */ v(aa, {
|
|
3638
3638
|
content: n,
|
|
@@ -3641,13 +3641,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3641
3641
|
disabled: a,
|
|
3642
3642
|
children: /* @__PURE__ */ v("div", {
|
|
3643
3643
|
className: X.popover,
|
|
3644
|
-
children: /* @__PURE__ */ v(
|
|
3644
|
+
children: /* @__PURE__ */ v(sc, {
|
|
3645
3645
|
cell: e,
|
|
3646
3646
|
testId: t
|
|
3647
3647
|
})
|
|
3648
3648
|
})
|
|
3649
3649
|
});
|
|
3650
|
-
},
|
|
3650
|
+
}, lc = {
|
|
3651
3651
|
wrapper: "_wrapper_1u1qo_1",
|
|
3652
3652
|
inline: "_inline_1u1qo_1",
|
|
3653
3653
|
radio: "_radio_1u1qo_5",
|
|
@@ -3658,10 +3658,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3658
3658
|
disabled: "_disabled_1u1qo_98",
|
|
3659
3659
|
isInTable: "_isInTable_1u1qo_114",
|
|
3660
3660
|
helpIconEnabled: "_helpIconEnabled_1u1qo_119"
|
|
3661
|
-
},
|
|
3661
|
+
}, 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 }) => {
|
|
3662
3662
|
let f = l || u;
|
|
3663
3663
|
return /* @__PURE__ */ y("div", {
|
|
3664
|
-
className: g(
|
|
3664
|
+
className: g(lc.radio, i ? lc.disabled : null, a ? lc.small : null, s ? lc.noMargin : null, t ? null : lc.noLabel),
|
|
3665
3665
|
onClick: o,
|
|
3666
3666
|
"data-testid": c,
|
|
3667
3667
|
children: [
|
|
@@ -3679,13 +3679,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3679
3679
|
children: t
|
|
3680
3680
|
}),
|
|
3681
3681
|
f && /* @__PURE__ */ v("div", {
|
|
3682
|
-
className:
|
|
3682
|
+
className: lc.helpIconEnabled,
|
|
3683
3683
|
onClick: u,
|
|
3684
3684
|
children: /* @__PURE__ */ v(si, { text: l })
|
|
3685
3685
|
})
|
|
3686
3686
|
]
|
|
3687
3687
|
});
|
|
3688
|
-
},
|
|
3688
|
+
}, dc = ({ cell: e, testId: t }) => /* @__PURE__ */ v(uc, {
|
|
3689
3689
|
selected: e.selected,
|
|
3690
3690
|
name: e.name,
|
|
3691
3691
|
value: e.value,
|
|
@@ -3693,7 +3693,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3693
3693
|
disabled: e.disabled,
|
|
3694
3694
|
onChange: (t) => e.onChange(t),
|
|
3695
3695
|
testId: t
|
|
3696
|
-
}),
|
|
3696
|
+
}), fc = ({ cell: e, isHeader: t, columnAlignment: n, testId: r }) => {
|
|
3697
3697
|
if (!e) return null;
|
|
3698
3698
|
switch (e.type) {
|
|
3699
3699
|
case "Input":
|
|
@@ -3712,23 +3712,23 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3712
3712
|
cell: e,
|
|
3713
3713
|
testId: r
|
|
3714
3714
|
});
|
|
3715
|
-
case "Radio": return /* @__PURE__ */ v(
|
|
3715
|
+
case "Radio": return /* @__PURE__ */ v(dc, {
|
|
3716
3716
|
cell: e,
|
|
3717
3717
|
testId: r
|
|
3718
3718
|
});
|
|
3719
|
-
case "Slider": return /* @__PURE__ */ v(
|
|
3720
|
-
case "Icon": return /* @__PURE__ */ v(
|
|
3721
|
-
case "Actions": return /* @__PURE__ */ v(
|
|
3722
|
-
case "Popover": return /* @__PURE__ */ v(
|
|
3723
|
-
default: return /* @__PURE__ */ v(
|
|
3719
|
+
case "Slider": return /* @__PURE__ */ v(tc, { cell: e });
|
|
3720
|
+
case "Icon": return /* @__PURE__ */ v(nc, { cell: e });
|
|
3721
|
+
case "Actions": return /* @__PURE__ */ v(rc, { cell: e });
|
|
3722
|
+
case "Popover": return /* @__PURE__ */ v(cc, { cell: e });
|
|
3723
|
+
default: return /* @__PURE__ */ v(sc, {
|
|
3724
3724
|
cell: e,
|
|
3725
3725
|
isHeader: t,
|
|
3726
3726
|
testId: r
|
|
3727
3727
|
});
|
|
3728
3728
|
}
|
|
3729
|
-
},
|
|
3729
|
+
}, pc = /* @__PURE__ */ function(e) {
|
|
3730
3730
|
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;
|
|
3731
|
-
}({}),
|
|
3731
|
+
}({}), mc = ({ cell: e, isHeader: t, columnHeaderAlignment: n, columnAlignment: r = Tr.LEFT, width: i, testId: a }) => {
|
|
3732
3732
|
var o;
|
|
3733
3733
|
if (!e) return null;
|
|
3734
3734
|
let { style: s, colSpan: c, rowSpan: l, width: u, textAlign: d } = e, f = p(null), m = {
|
|
@@ -3736,7 +3736,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3736
3736
|
headerAlignment: n,
|
|
3737
3737
|
textAlign: d,
|
|
3738
3738
|
isHeader: t
|
|
3739
|
-
}, h = Rs(m, X), _ = Rs(m, X, !0), y = e.type ===
|
|
3739
|
+
}, 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 = {
|
|
3740
3740
|
width: x,
|
|
3741
3741
|
minWidth: x,
|
|
3742
3742
|
textTransform: t && S ? Dr.CAPITALIZE : void 0,
|
|
@@ -3748,17 +3748,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3748
3748
|
style: C,
|
|
3749
3749
|
colSpan: c,
|
|
3750
3750
|
rowSpan: l,
|
|
3751
|
-
children: /* @__PURE__ */ v(
|
|
3751
|
+
children: /* @__PURE__ */ v(fc, {
|
|
3752
3752
|
cell: e,
|
|
3753
3753
|
columnAlignment: _ == null ? Tr.RIGHT : _,
|
|
3754
3754
|
isHeader: t,
|
|
3755
3755
|
testId: a
|
|
3756
3756
|
})
|
|
3757
3757
|
});
|
|
3758
|
-
},
|
|
3758
|
+
}, hc = ({ 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 }) => {
|
|
3759
3759
|
let p = zs(a, n, t), { onRowClick: m, onRowFocus: h, onRowMouseEnter: b, onRowMouseLeave: x, expandedContent: S, error: C, warning: w, active: T } = e, E = e.cells.map((e, r) => {
|
|
3760
3760
|
let i = `${+!n}_${t}_${r}`;
|
|
3761
|
-
return /* @__PURE__ */ v(
|
|
3761
|
+
return /* @__PURE__ */ v(mc, {
|
|
3762
3762
|
cell: e,
|
|
3763
3763
|
isHeader: n,
|
|
3764
3764
|
columnAlignment: o[r],
|
|
@@ -3766,9 +3766,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3766
3766
|
width: l ? l[r] : void 0,
|
|
3767
3767
|
testId: e.testId
|
|
3768
3768
|
}, i);
|
|
3769
|
-
}), D = s && /* @__PURE__ */ v(
|
|
3769
|
+
}), D = s && /* @__PURE__ */ v(mc, {
|
|
3770
3770
|
cell: {
|
|
3771
|
-
type:
|
|
3771
|
+
type: pc.ACTIONS,
|
|
3772
3772
|
actions: e.actions
|
|
3773
3773
|
},
|
|
3774
3774
|
isHeader: n
|
|
@@ -3829,7 +3829,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3829
3829
|
flush: S.flush === !0,
|
|
3830
3830
|
children: S.content
|
|
3831
3831
|
}, `${t}_expanded_content`) : null] });
|
|
3832
|
-
},
|
|
3832
|
+
}, gc = (e) => {
|
|
3833
3833
|
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]);
|
|
3834
3834
|
return a ? /* @__PURE__ */ y(tr, {
|
|
3835
3835
|
collisionDetection: rr,
|
|
@@ -3864,7 +3864,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3864
3864
|
dropAnimation: null,
|
|
3865
3865
|
children: /* @__PURE__ */ v("table", {
|
|
3866
3866
|
className: g(mo.table, mo.dragOverlay),
|
|
3867
|
-
children: /* @__PURE__ */ v("tbody", { children: /* @__PURE__ */ v(
|
|
3867
|
+
children: /* @__PURE__ */ v("tbody", { children: /* @__PURE__ */ v(hc, {
|
|
3868
3868
|
rowIndex: Number(f),
|
|
3869
3869
|
row: l[Number(f)],
|
|
3870
3870
|
columnCount: i,
|
|
@@ -3884,7 +3884,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3884
3884
|
})
|
|
3885
3885
|
}), document.body)]
|
|
3886
3886
|
}) : t({});
|
|
3887
|
-
},
|
|
3887
|
+
}, _c = ({ table: e, children: t }) => {
|
|
3888
3888
|
var n, r, i;
|
|
3889
3889
|
let a = p(null), o = ir({
|
|
3890
3890
|
count: (n = (r = e == null ? void 0 : e.rowCount) == null ? (i = e.rows) == null ? void 0 : i.length : r) == null ? 0 : n,
|
|
@@ -3907,7 +3907,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3907
3907
|
})()
|
|
3908
3908
|
})
|
|
3909
3909
|
});
|
|
3910
|
-
},
|
|
3910
|
+
}, vc = ({ activeIndex: e, triggerScrollToActiveRow: t, isVirtualized: n, virtualizer: r }) => (c(() => {
|
|
3911
3911
|
if (t && !(e == null || e < 0)) {
|
|
3912
3912
|
if (n && r) r.scrollToIndex(e, {
|
|
3913
3913
|
behavior: "auto",
|
|
@@ -3926,11 +3926,11 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3926
3926
|
t,
|
|
3927
3927
|
n,
|
|
3928
3928
|
r
|
|
3929
|
-
]), null),
|
|
3929
|
+
]), null), yc = ({ table: e, children: t }) => {
|
|
3930
3930
|
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]);
|
|
3931
|
-
return n ? /* @__PURE__ */ v(
|
|
3931
|
+
return n ? /* @__PURE__ */ v(_c, {
|
|
3932
3932
|
table: e,
|
|
3933
|
-
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(
|
|
3933
|
+
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(vc, {
|
|
3934
3934
|
isVirtualized: !0,
|
|
3935
3935
|
virtualizer: e,
|
|
3936
3936
|
activeIndex: a,
|
|
@@ -3942,13 +3942,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3942
3942
|
}) : /* @__PURE__ */ y("div", {
|
|
3943
3943
|
id: "scrollWrapper",
|
|
3944
3944
|
className: mo.scroll,
|
|
3945
|
-
children: [/* @__PURE__ */ v(
|
|
3945
|
+
children: [/* @__PURE__ */ v(vc, {
|
|
3946
3946
|
isVirtualized: !1,
|
|
3947
3947
|
activeIndex: a,
|
|
3948
3948
|
triggerScrollToActiveRow: r
|
|
3949
3949
|
}), t({})]
|
|
3950
3950
|
});
|
|
3951
|
-
},
|
|
3951
|
+
}, bc = (e) => {
|
|
3952
3952
|
var t, n, r, i, a;
|
|
3953
3953
|
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 = {
|
|
3954
3954
|
cells: I ? T.cells.map((e, t) => (e == null ? void 0 : e.type) === "Input" ? {
|
|
@@ -3987,7 +3987,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3987
3987
|
name: f,
|
|
3988
3988
|
testId: C && `${C}-title`
|
|
3989
3989
|
}),
|
|
3990
|
-
/* @__PURE__ */ v(
|
|
3990
|
+
/* @__PURE__ */ v(gc, {
|
|
3991
3991
|
colSpan: P,
|
|
3992
3992
|
columnAlignment: x,
|
|
3993
3993
|
columnCount: M,
|
|
@@ -3997,13 +3997,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3997
3997
|
rows: L,
|
|
3998
3998
|
tbodyRef: A,
|
|
3999
3999
|
canListReorder: s,
|
|
4000
|
-
children: ({ dropDisabled: e }) => /* @__PURE__ */ v(
|
|
4000
|
+
children: ({ dropDisabled: e }) => /* @__PURE__ */ v(yc, {
|
|
4001
4001
|
table: te,
|
|
4002
4002
|
children: ({ virtualizer: t, tableStyle: n }) => /* @__PURE__ */ y("table", {
|
|
4003
4003
|
className: g(mo.table, S ? mo.striped : ""),
|
|
4004
4004
|
"data-testid": C,
|
|
4005
4005
|
style: n,
|
|
4006
|
-
children: [/* @__PURE__ */ v("thead", { children: j.map((e, t) => /* @__PURE__ */ v(
|
|
4006
|
+
children: [/* @__PURE__ */ v("thead", { children: j.map((e, t) => /* @__PURE__ */ v(hc, {
|
|
4007
4007
|
rowIndex: t,
|
|
4008
4008
|
isHeader: !0,
|
|
4009
4009
|
row: e,
|
|
@@ -4018,7 +4018,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4018
4018
|
ref: A,
|
|
4019
4019
|
children: t ? t.getVirtualItems().map((t) => {
|
|
4020
4020
|
let n = t.index, r = L[n];
|
|
4021
|
-
return /* @__PURE__ */ v(
|
|
4021
|
+
return /* @__PURE__ */ v(hc, {
|
|
4022
4022
|
rowIndex: n,
|
|
4023
4023
|
row: c ? c({
|
|
4024
4024
|
row: r,
|
|
@@ -4033,7 +4033,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4033
4033
|
height: t.size,
|
|
4034
4034
|
dropDisabled: e
|
|
4035
4035
|
}, `1_${n}`);
|
|
4036
|
-
}) : L.map((t, n) => /* @__PURE__ */ v(
|
|
4036
|
+
}) : L.map((t, n) => /* @__PURE__ */ v(hc, {
|
|
4037
4037
|
rowIndex: n,
|
|
4038
4038
|
row: c ? c({
|
|
4039
4039
|
row: t,
|
|
@@ -4058,14 +4058,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4058
4058
|
})
|
|
4059
4059
|
]
|
|
4060
4060
|
});
|
|
4061
|
-
},
|
|
4061
|
+
}, xc = "blank", Sc = 1e4, Cc = (e, t, n, r) => {
|
|
4062
4062
|
let i = `${t} → ${n}:`, a = e.filter((e) => !e.startsWith(i)), o = r ? [...a, `${i} ${r}`] : a;
|
|
4063
4063
|
return {
|
|
4064
4064
|
updatedErrors: o,
|
|
4065
4065
|
isValid: o.length === 0
|
|
4066
4066
|
};
|
|
4067
|
-
},
|
|
4068
|
-
let i = d(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, s] = m(
|
|
4067
|
+
}, wc = 20, Tc = 1, Ec = ({ validationRules: e, parsedResult: t, updateState: n, testId: r }) => {
|
|
4068
|
+
let i = d(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, s] = m(wc), [l, u] = m(Tc), f = p([]), h = (l - 1) * a, g = a === 0 ? t.rows.length : h + a, [_, y] = m([]), b = d(() => {
|
|
4069
4069
|
let n = e.filter((e) => !e.optionalColumn);
|
|
4070
4070
|
return t.fields.length === n.length ? n : e;
|
|
4071
4071
|
}, [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")), {
|
|
@@ -4079,7 +4079,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4079
4079
|
disableValidationOnFocus: !0,
|
|
4080
4080
|
error: v,
|
|
4081
4081
|
validationCallback: (e, i) => {
|
|
4082
|
-
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } =
|
|
4082
|
+
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } = Cc(t.errors, a, e, i);
|
|
4083
4083
|
n({ parsedResult: {
|
|
4084
4084
|
...t,
|
|
4085
4085
|
errors: o,
|
|
@@ -4088,7 +4088,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4088
4088
|
},
|
|
4089
4089
|
onChange: (e) => {
|
|
4090
4090
|
var i;
|
|
4091
|
-
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } =
|
|
4091
|
+
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } = Cc(t.errors, s, m, c), d = t.rows.map((e, t) => t === r ? e.map((e, t) => t === a ? o : e) : e);
|
|
4092
4092
|
n({ parsedResult: {
|
|
4093
4093
|
...t,
|
|
4094
4094
|
rows: d,
|
|
@@ -4130,7 +4130,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4130
4130
|
]);
|
|
4131
4131
|
let S = d(() => t.fields.map((e, r) => {
|
|
4132
4132
|
var a, o, s;
|
|
4133
|
-
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) ===
|
|
4133
|
+
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) === xc);
|
|
4134
4134
|
if (!l.length || u) return {};
|
|
4135
4135
|
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;
|
|
4136
4136
|
return {
|
|
@@ -4168,7 +4168,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4168
4168
|
h,
|
|
4169
4169
|
g
|
|
4170
4170
|
]);
|
|
4171
|
-
return /* @__PURE__ */ v(
|
|
4171
|
+
return /* @__PURE__ */ v(bc, {
|
|
4172
4172
|
beforeRenderRow: o(({ rowIndex: e }) => {
|
|
4173
4173
|
let n = h + e, r = t.rows[n];
|
|
4174
4174
|
return r ? x(r, n) : {
|
|
@@ -4241,7 +4241,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4241
4241
|
} }
|
|
4242
4242
|
}
|
|
4243
4243
|
});
|
|
4244
|
-
},
|
|
4244
|
+
}, Dc = { listStyle: "_listStyle_yjfjw_1" }, Oc = ({ errors: e, t }) => {
|
|
4245
4245
|
var n;
|
|
4246
4246
|
let r = (n = [...e]) == null ? void 0 : n.sort((e, t) => {
|
|
4247
4247
|
let n = (e) => {
|
|
@@ -4257,18 +4257,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4257
4257
|
content: t("unableToImportPleaseCorrectError", { rows: e == null ? void 0 : e.length }),
|
|
4258
4258
|
type: "Error",
|
|
4259
4259
|
details: /* @__PURE__ */ v("ul", {
|
|
4260
|
-
className:
|
|
4260
|
+
className: Dc.listStyle,
|
|
4261
4261
|
children: r.map((e, t) => /* @__PURE__ */ v("li", { children: e }, t))
|
|
4262
4262
|
})
|
|
4263
4263
|
};
|
|
4264
|
-
},
|
|
4264
|
+
}, kc = ({ errors: e, t }) => e.length ? /* @__PURE__ */ v(po, { message: Oc({
|
|
4265
4265
|
errors: e,
|
|
4266
4266
|
t
|
|
4267
|
-
}) }) : null,
|
|
4267
|
+
}) }) : null, Ac = {
|
|
4268
4268
|
empty: "_empty_fe425_1",
|
|
4269
4269
|
text: "_text_fe425_11"
|
|
4270
|
-
},
|
|
4271
|
-
className:
|
|
4270
|
+
}, jc = ({ width: e = "auto", height: t = "auto", text: n = "No data", children: r, testId: i }) => /* @__PURE__ */ y("div", {
|
|
4271
|
+
className: Ac.empty,
|
|
4272
4272
|
style: {
|
|
4273
4273
|
width: e,
|
|
4274
4274
|
height: t
|
|
@@ -4304,7 +4304,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4304
4304
|
})
|
|
4305
4305
|
}),
|
|
4306
4306
|
n !== "" && /* @__PURE__ */ v("div", {
|
|
4307
|
-
className:
|
|
4307
|
+
className: Ac.text,
|
|
4308
4308
|
children: /* @__PURE__ */ v(ha, {
|
|
4309
4309
|
faint: !0,
|
|
4310
4310
|
children: n
|
|
@@ -4312,52 +4312,52 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4312
4312
|
}),
|
|
4313
4313
|
r
|
|
4314
4314
|
]
|
|
4315
|
-
}),
|
|
4315
|
+
}), Mc = (e) => {
|
|
4316
4316
|
var t;
|
|
4317
4317
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4318
4318
|
let t = e == null ? void 0 : e.match(/[.,]/g);
|
|
4319
4319
|
return t && t.length > 1;
|
|
4320
4320
|
});
|
|
4321
|
-
},
|
|
4321
|
+
}, Nc = (e) => {
|
|
4322
4322
|
var t;
|
|
4323
4323
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4324
4324
|
var t;
|
|
4325
4325
|
return !(e != null && e.includes(".")) && (e == null || (t = e.match(/,/g)) == null ? void 0 : t.length) === 1;
|
|
4326
4326
|
});
|
|
4327
|
-
},
|
|
4327
|
+
}, Pc = (e, t, n) => e >= t - n, Fc = (e) => !!e && e !== "blank" && e.trim() !== "", Ic = (e, t, n, r, i, a, o) => {
|
|
4328
4328
|
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;
|
|
4329
|
-
if (i && !
|
|
4329
|
+
if (i && !Pc(e.length, l, c) && s.push(o("incorrectNumberOfFieldNameHeaderColumns", { expectedLengthMessage: u })), a) {
|
|
4330
4330
|
var f, p;
|
|
4331
4331
|
let e = r.filter((e) => {
|
|
4332
4332
|
var t;
|
|
4333
|
-
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(
|
|
4333
|
+
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(Fc));
|
|
4334
4334
|
}).length;
|
|
4335
|
-
|
|
4335
|
+
Pc(t == null || (f = t.filter(Fc)) == 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 }));
|
|
4336
4336
|
}
|
|
4337
4337
|
return n.length === 0 ? s.push(o("incorrectNumberOfDataColumns", {
|
|
4338
4338
|
expectedLengthMessage: u,
|
|
4339
4339
|
dataRowStartIndex: d
|
|
4340
4340
|
})) : n.forEach((e, t) => {
|
|
4341
|
-
|
|
4341
|
+
Pc(e.length, l, c) || s.push(o("incorrectNumberOfDataColumns", {
|
|
4342
4342
|
expectedLengthMessage: u,
|
|
4343
4343
|
dataRowStartIndex: d + t
|
|
4344
4344
|
}));
|
|
4345
4345
|
}), s;
|
|
4346
|
-
},
|
|
4346
|
+
}, Lc = (e) => e.toUpperCase().replace(/\(.*?\)/g, "").replace(/[^A-Z0-9]/g, "").trim(), Rc = ({ value: e, defaultAllowedValues: t }) => {
|
|
4347
4347
|
var n;
|
|
4348
|
-
let r =
|
|
4349
|
-
return (n = t == null ? void 0 : t.some((e) =>
|
|
4350
|
-
},
|
|
4348
|
+
let r = Lc(e);
|
|
4349
|
+
return (n = t == null ? void 0 : t.some((e) => Lc(e).includes(r) || r.includes(Lc(e)))) == null ? !1 : n;
|
|
4350
|
+
}, zc = ({ value: e, defaultAllowedValues: t }) => {
|
|
4351
4351
|
var n;
|
|
4352
4352
|
return (n = t == null ? void 0 : t.includes(e)) == null ? !1 : n;
|
|
4353
|
-
},
|
|
4353
|
+
}, Bc = (e, t, n, r, i, a) => {
|
|
4354
4354
|
let o = [];
|
|
4355
4355
|
if (r) {
|
|
4356
4356
|
let r = n.map((e) => e.fieldName).filter(Boolean);
|
|
4357
4357
|
e.forEach((i, s) => {
|
|
4358
4358
|
var c, l;
|
|
4359
4359
|
let u = n[s];
|
|
4360
|
-
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ?
|
|
4360
|
+
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ? Rc : c)({
|
|
4361
4361
|
value: i,
|
|
4362
4362
|
defaultAllowedValues: r,
|
|
4363
4363
|
columnIndex: s,
|
|
@@ -4379,7 +4379,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4379
4379
|
var l, u;
|
|
4380
4380
|
let d = n[c];
|
|
4381
4381
|
if (!d || d != null && d.optionalColumn) return;
|
|
4382
|
-
let f = (l = d.unitsValidator) == null ?
|
|
4382
|
+
let f = (l = d.unitsValidator) == null ? zc : l, p = (u = i == null ? void 0 : i[c]) == null ? [] : u;
|
|
4383
4383
|
f({
|
|
4384
4384
|
value: r,
|
|
4385
4385
|
defaultAllowedValues: p,
|
|
@@ -4395,7 +4395,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4395
4395
|
});
|
|
4396
4396
|
}
|
|
4397
4397
|
return o;
|
|
4398
|
-
},
|
|
4398
|
+
}, Vc = (e, t, n) => {
|
|
4399
4399
|
let r = [];
|
|
4400
4400
|
return e.forEach((e, i) => {
|
|
4401
4401
|
e.forEach((e, a) => {
|
|
@@ -4408,91 +4408,91 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4408
4408
|
})}`);
|
|
4409
4409
|
});
|
|
4410
4410
|
}), r;
|
|
4411
|
-
},
|
|
4412
|
-
let s =
|
|
4413
|
-
return s.length === 0 && (s = s.concat(
|
|
4411
|
+
}, Hc = (e, t, n, r, i, a, o) => {
|
|
4412
|
+
let s = Ic(e, t, n, r, i, a, o);
|
|
4413
|
+
return s.length === 0 && (s = s.concat(Bc(e, t, r, i, a, o), Vc(n, r, o))), {
|
|
4414
4414
|
isValid: s.length === 0,
|
|
4415
4415
|
errors: s
|
|
4416
4416
|
};
|
|
4417
|
-
},
|
|
4417
|
+
}, Uc = (e, t, n) => {
|
|
4418
4418
|
var r, i, a, o, s, c, l, u, d, f, p, m, h, g;
|
|
4419
4419
|
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;
|
|
4420
4420
|
return {
|
|
4421
4421
|
hasFieldNameHeader: b || v && !x && !C || v && y && !C,
|
|
4422
4422
|
hasUnitHeader: x || S || v && y && !x && !C && !w || v && y && !C && !w
|
|
4423
4423
|
};
|
|
4424
|
-
},
|
|
4424
|
+
}, Wc = (e, { validationRules: t }) => {
|
|
4425
4425
|
var n, r, i;
|
|
4426
4426
|
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) => {
|
|
4427
4427
|
var t;
|
|
4428
4428
|
return (t = e == null ? void 0 : e.defaultUnit) == null ? s(e == null ? void 0 : e.validUnits) : t;
|
|
4429
|
-
}), { hasFieldNameHeader: l, hasUnitHeader: u } =
|
|
4429
|
+
}), { hasFieldNameHeader: l, hasUnitHeader: u } = Uc(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());
|
|
4430
4430
|
return l || e == null || e.unshift(o), u || e == null || e.splice(1, 0, c), {
|
|
4431
4431
|
hasFieldNameHeader: l,
|
|
4432
4432
|
hasUnitHeader: u
|
|
4433
4433
|
};
|
|
4434
|
-
},
|
|
4434
|
+
}, Gc = (e) => Math.round(e * 100) / 100, Kc = (e) => e.join(", ").replace(/,\s*$/, ""), qc = {
|
|
4435
4435
|
skipEmptyLines: !0,
|
|
4436
4436
|
delimiter: (e) => {
|
|
4437
4437
|
var t, n;
|
|
4438
4438
|
let r = e.substring(0, 200), i = ((t = r.match(/\t/g)) == null ? [] : t).length, a = ((n = r.match(/;/g)) == null ? [] : n).length;
|
|
4439
4439
|
return i === 0 && a === 0 ? "," : i > a ? " " : ";";
|
|
4440
4440
|
}
|
|
4441
|
-
},
|
|
4441
|
+
}, Jc = [
|
|
4442
4442
|
"text/csv",
|
|
4443
4443
|
"text/plain",
|
|
4444
4444
|
"application/json",
|
|
4445
4445
|
"application/vnd.ms-excel"
|
|
4446
|
-
],
|
|
4446
|
+
], Yc = (e) => Jc.includes(e.type), Xc = (e) => e instanceof File, Zc = (e) => e.trim().startsWith("["), Qc = (e) => {
|
|
4447
4447
|
try {
|
|
4448
4448
|
var t;
|
|
4449
4449
|
return !!((t = JSON.parse(e)) != null && t.path);
|
|
4450
4450
|
} catch {
|
|
4451
4451
|
return !1;
|
|
4452
4452
|
}
|
|
4453
|
-
},
|
|
4453
|
+
}, $c = (e) => new Promise((t, n) => {
|
|
4454
4454
|
let r = new FileReader();
|
|
4455
4455
|
r.onload = () => t(String(r.result)), r.onerror = n, r.readAsText(e);
|
|
4456
|
-
}),
|
|
4456
|
+
}), el = async (e, t, n) => {
|
|
4457
4457
|
try {
|
|
4458
|
-
return
|
|
4458
|
+
return sl({
|
|
4459
4459
|
data: JSON.parse(e),
|
|
4460
4460
|
errors: []
|
|
4461
4461
|
}, t, n);
|
|
4462
4462
|
} catch (e) {
|
|
4463
4463
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4464
4464
|
}
|
|
4465
|
-
},
|
|
4465
|
+
}, tl = async (e, t, n) => {
|
|
4466
4466
|
try {
|
|
4467
4467
|
let r = JSON.parse(e).path.map((e) => [
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4468
|
+
Gc(e.md),
|
|
4469
|
+
Gc(e.inclination),
|
|
4470
|
+
Gc(e.gridAzimuth)
|
|
4471
4471
|
]);
|
|
4472
4472
|
return r.unshift([
|
|
4473
4473
|
"m",
|
|
4474
4474
|
"deg",
|
|
4475
4475
|
"deg"
|
|
4476
|
-
]),
|
|
4476
|
+
]), sl({
|
|
4477
4477
|
data: r,
|
|
4478
4478
|
errors: []
|
|
4479
4479
|
}, t, n);
|
|
4480
4480
|
} catch (e) {
|
|
4481
4481
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4482
4482
|
}
|
|
4483
|
-
},
|
|
4483
|
+
}, nl = (e) => e.replace(",", "."), rl = (e) => e.map((e) => e.map((e) => nl(e))), il = (e, { importLimit: t, ...n }, r) => new Promise((i) => {
|
|
4484
4484
|
or.parse(e, {
|
|
4485
|
-
...
|
|
4485
|
+
...qc,
|
|
4486
4486
|
preview: t,
|
|
4487
4487
|
complete: (e) => {
|
|
4488
|
-
let a =
|
|
4488
|
+
let a = sl(e, {
|
|
4489
4489
|
importLimit: t,
|
|
4490
4490
|
...n
|
|
4491
4491
|
}, r);
|
|
4492
|
-
a.rows =
|
|
4492
|
+
a.rows = rl(a.rows), i(a);
|
|
4493
4493
|
}
|
|
4494
4494
|
});
|
|
4495
|
-
}),
|
|
4495
|
+
}), al = async (e, t, n) => {
|
|
4496
4496
|
let r = {
|
|
4497
4497
|
isValid: !1,
|
|
4498
4498
|
fields: [],
|
|
@@ -4501,13 +4501,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4501
4501
|
errors: []
|
|
4502
4502
|
};
|
|
4503
4503
|
try {
|
|
4504
|
-
if (
|
|
4505
|
-
let i =
|
|
4506
|
-
return
|
|
4504
|
+
if (Xc(e) && !Yc(e)) return r.errors.push(`${n("wrongFileFormatExpectedOneOf")} ${Kc(Array.from(Jc))}`), r;
|
|
4505
|
+
let i = Xc(e) ? await $c(e) : e;
|
|
4506
|
+
return Zc(i) ? await el(i, t, n) : Qc(i) ? await tl(i, t, n) : await il(e, t, n);
|
|
4507
4507
|
} catch (e) {
|
|
4508
4508
|
return r.errors.push(e.message), r;
|
|
4509
4509
|
}
|
|
4510
|
-
},
|
|
4510
|
+
}, ol = (e, t, n, r) => {
|
|
4511
4511
|
var i;
|
|
4512
4512
|
let a = (i = r == null ? void 0 : r.delimiter) == null ? "," : i, o = [
|
|
4513
4513
|
e,
|
|
@@ -4519,7 +4519,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4519
4519
|
header: !0,
|
|
4520
4520
|
delimiter: a
|
|
4521
4521
|
});
|
|
4522
|
-
},
|
|
4522
|
+
}, sl = (e, t, n) => {
|
|
4523
4523
|
let { data: r, errors: i } = e, a = {
|
|
4524
4524
|
isValid: !1,
|
|
4525
4525
|
fields: [],
|
|
@@ -4528,15 +4528,15 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4528
4528
|
errors: i.map((e) => e.message)
|
|
4529
4529
|
};
|
|
4530
4530
|
if (i.length > 0) return a;
|
|
4531
|
-
let { hasFieldNameHeader: o, hasUnitHeader: s } =
|
|
4531
|
+
let { hasFieldNameHeader: o, hasUnitHeader: s } = Wc(r, t);
|
|
4532
4532
|
a.fields = r[0].map((e) => e.trim()), a.units = r[1].map((e) => e.trim()).filter(Boolean), a.rows = r.slice(2);
|
|
4533
4533
|
let { validationRules: c } = t;
|
|
4534
4534
|
if (c.length) {
|
|
4535
|
-
let { isValid: e, errors: t } =
|
|
4535
|
+
let { isValid: e, errors: t } = Hc(a.fields, a.units, a.rows, c, o, s, n);
|
|
4536
4536
|
a.errors.push(...t), a.isValid = e && t.length === 0;
|
|
4537
4537
|
} else a.isValid = a.errors.length === 0;
|
|
4538
4538
|
return a;
|
|
4539
|
-
},
|
|
4539
|
+
}, cl = ({ id: e, message: t = {
|
|
4540
4540
|
type: oo.INFO,
|
|
4541
4541
|
content: ""
|
|
4542
4542
|
}, autoClose: n = 6e3, onClose: r }) => {
|
|
@@ -4577,22 +4577,22 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4577
4577
|
transition: sr,
|
|
4578
4578
|
type: s
|
|
4579
4579
|
});
|
|
4580
|
-
},
|
|
4580
|
+
}, ll = (e) => {
|
|
4581
4581
|
lr.dismiss(e);
|
|
4582
|
-
},
|
|
4582
|
+
}, ul = (e, t) => {
|
|
4583
4583
|
t(() => {
|
|
4584
|
-
|
|
4584
|
+
cl({ ...e });
|
|
4585
4585
|
});
|
|
4586
|
-
},
|
|
4586
|
+
}, dl = {
|
|
4587
4587
|
toggle: "_toggle_18fme_9",
|
|
4588
4588
|
small: "_small_18fme_25",
|
|
4589
4589
|
disabled: "_disabled_18fme_105",
|
|
4590
4590
|
noMargin: "_noMargin_18fme_113",
|
|
4591
4591
|
helpIconEnabled: "_helpIconEnabled_18fme_116"
|
|
4592
|
-
},
|
|
4592
|
+
}, fl = ({ 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 }) => {
|
|
4593
4593
|
let p = s(H), m = u || d, h = r || p;
|
|
4594
4594
|
return /* @__PURE__ */ y("div", {
|
|
4595
|
-
className: g(
|
|
4595
|
+
className: g(dl.toggle, h ? dl.disabled : null, a ? dl.small : null, c ? dl.noMargin : null),
|
|
4596
4596
|
style: { display: i },
|
|
4597
4597
|
onClick: (t) => {
|
|
4598
4598
|
h || (t.target.name = e, t.target.checked = !n, t.target.value = !n, o(t));
|
|
@@ -4612,13 +4612,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4612
4612
|
children: t
|
|
4613
4613
|
}),
|
|
4614
4614
|
m && /* @__PURE__ */ v("div", {
|
|
4615
|
-
className:
|
|
4615
|
+
className: dl.helpIconEnabled,
|
|
4616
4616
|
onClick: d,
|
|
4617
4617
|
children: /* @__PURE__ */ v(si, { text: u })
|
|
4618
4618
|
})
|
|
4619
4619
|
]
|
|
4620
4620
|
});
|
|
4621
|
-
},
|
|
4621
|
+
}, pl = ({ 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 }) => {
|
|
4622
4622
|
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({
|
|
4623
4623
|
pastedText: "",
|
|
4624
4624
|
parsedResult: {
|
|
@@ -4641,8 +4641,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4641
4641
|
var n, r, i;
|
|
4642
4642
|
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 = {
|
|
4643
4643
|
validationRules: s,
|
|
4644
|
-
importLimit: (r = e.importLimit) == null ?
|
|
4645
|
-
}, o =
|
|
4644
|
+
importLimit: (r = e.importLimit) == null ? Sc : r
|
|
4645
|
+
}, o = ol(I.fields.slice(0, 2), ((i = I.units) == null ? [] : i).slice(0, 2), t, a);
|
|
4646
4646
|
f(() => A({
|
|
4647
4647
|
parsedResult: {
|
|
4648
4648
|
...I,
|
|
@@ -4672,17 +4672,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4672
4672
|
}, N = () => {
|
|
4673
4673
|
r("helpModal", !x);
|
|
4674
4674
|
}, P = () => {
|
|
4675
|
-
n(k), c(k.parsedResult), i(),
|
|
4675
|
+
n(k), c(k.parsedResult), i(), ul({ message: {
|
|
4676
4676
|
type: "Success",
|
|
4677
4677
|
content: u("pasteSuccessful")
|
|
4678
4678
|
} }, f);
|
|
4679
|
-
}, { pastedText: F, parsedResult: I } = k, ee = T && T(I), { isValid: L, errors: te } = I, ne = te.length, re = F === "", ie =
|
|
4679
|
+
}, { pastedText: F, parsedResult: I } = k, ee = T && T(I), { isValid: L, errors: te } = I, ne = te.length, re = F === "", ie = Nc(F), ae = Mc(F), R = /* @__PURE__ */ y(_, { children: [
|
|
4680
4680
|
/* @__PURE__ */ y("div", {
|
|
4681
4681
|
className: io.headerContainer,
|
|
4682
4682
|
children: [
|
|
4683
4683
|
/* @__PURE__ */ v(W, {
|
|
4684
4684
|
text: u("downsampleTooltip"),
|
|
4685
|
-
children: /* @__PURE__ */ v(
|
|
4685
|
+
children: /* @__PURE__ */ v(fl, {
|
|
4686
4686
|
label: u("downsampled"),
|
|
4687
4687
|
checked: D,
|
|
4688
4688
|
onChange: () => j(!D),
|
|
@@ -4715,7 +4715,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4715
4715
|
}),
|
|
4716
4716
|
re ? /* @__PURE__ */ v("div", {
|
|
4717
4717
|
className: io.resultContainer,
|
|
4718
|
-
children: /* @__PURE__ */ v(
|
|
4718
|
+
children: /* @__PURE__ */ v(jc, {
|
|
4719
4719
|
text: null,
|
|
4720
4720
|
children: /* @__PURE__ */ y("div", {
|
|
4721
4721
|
className: io.emptyState,
|
|
@@ -4751,7 +4751,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4751
4751
|
}) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
|
|
4752
4752
|
className: io.messagesContainer,
|
|
4753
4753
|
children: [
|
|
4754
|
-
ne ? /* @__PURE__ */ v(
|
|
4754
|
+
ne ? /* @__PURE__ */ v(kc, {
|
|
4755
4755
|
errors: te,
|
|
4756
4756
|
t: u
|
|
4757
4757
|
}) : null,
|
|
@@ -4774,7 +4774,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4774
4774
|
type: "Warning"
|
|
4775
4775
|
} })
|
|
4776
4776
|
]
|
|
4777
|
-
}), /* @__PURE__ */ v(
|
|
4777
|
+
}), /* @__PURE__ */ v(Ec, {
|
|
4778
4778
|
validationRules: s,
|
|
4779
4779
|
parsedResult: I,
|
|
4780
4780
|
updateState: (e) => A((t) => ({
|
|
@@ -4816,7 +4816,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4816
4816
|
onClose: i
|
|
4817
4817
|
} })
|
|
4818
4818
|
});
|
|
4819
|
-
},
|
|
4819
|
+
}, ml = ({ modals: e = [], modalVisibility: n, onCloseModal: r, testId: i }) => e.length ? /* @__PURE__ */ v(_, { children: e.map(({ name: e, component: a, props: o = {} }) => {
|
|
4820
4820
|
var s;
|
|
4821
4821
|
return /* @__PURE__ */ v(t, { children: /* @__PURE__ */ v(a, {
|
|
4822
4822
|
testId: `${i}-modal-render-${e}`,
|
|
@@ -4824,7 +4824,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4824
4824
|
onClose: () => r({ name: e }),
|
|
4825
4825
|
...o
|
|
4826
4826
|
}) }, e);
|
|
4827
|
-
}) }) : null,
|
|
4827
|
+
}) }) : null, hl = ({ sections: e, iconName: t, testId: n, tooltip: r }) => /* @__PURE__ */ v(Ki, {
|
|
4828
4828
|
loading: !0,
|
|
4829
4829
|
menu: {
|
|
4830
4830
|
component: /* @__PURE__ */ v(K, {
|
|
@@ -4840,18 +4840,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4840
4840
|
sections: e
|
|
4841
4841
|
},
|
|
4842
4842
|
testId: n
|
|
4843
|
-
}),
|
|
4843
|
+
}), gl = (e, t, n) => o(async () => {
|
|
4844
4844
|
if (n) try {
|
|
4845
4845
|
return await n();
|
|
4846
4846
|
} catch (t) {
|
|
4847
|
-
console.error("beforeExportData failed", t),
|
|
4847
|
+
console.error("beforeExportData failed", t), cl({ message: {
|
|
4848
4848
|
type: "Error",
|
|
4849
4849
|
content: e("unableToPrepareExportData")
|
|
4850
4850
|
} });
|
|
4851
4851
|
return;
|
|
4852
4852
|
}
|
|
4853
4853
|
return t;
|
|
4854
|
-
}, [t, n]),
|
|
4854
|
+
}, [t, n]), _l = {
|
|
4855
4855
|
cancel: "Cancel",
|
|
4856
4856
|
chooseFile: "Choose file",
|
|
4857
4857
|
copyDecimalComma: "Copy (decimal comma)",
|
|
@@ -4910,26 +4910,26 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4910
4910
|
smartUpload_description: "Upload image and extract table content using a LLM",
|
|
4911
4911
|
smartUpload_smartUpload: "Smart Upload",
|
|
4912
4912
|
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"
|
|
4913
|
-
},
|
|
4914
|
-
let t = Object.keys(
|
|
4915
|
-
let r =
|
|
4913
|
+
}, vl = (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])), yl = (e) => d(() => {
|
|
4914
|
+
let t = Object.keys(_l).reduce((t, n) => {
|
|
4915
|
+
let r = _l == null ? void 0 : _l[n], i = e == null ? void 0 : e[n];
|
|
4916
4916
|
return t[n] = i == null ? r : i, t;
|
|
4917
4917
|
}, {});
|
|
4918
4918
|
return (e, n) => {
|
|
4919
4919
|
let r = t[e];
|
|
4920
|
-
return n ?
|
|
4920
|
+
return n ? vl(r, n) : r;
|
|
4921
4921
|
};
|
|
4922
|
-
}, [e]),
|
|
4922
|
+
}, [e]), bl = /^\s*-?\d+(?:[.,]\d+)?(?:e[+-]?\d+)?\s*$/i, xl = (e) => {
|
|
4923
4923
|
var t;
|
|
4924
4924
|
return {
|
|
4925
4925
|
...e,
|
|
4926
4926
|
rows: e == null || (t = e.rows) == null ? void 0 : t.map((e) => e.map((e) => {
|
|
4927
4927
|
let t = String(e == null ? "" : e);
|
|
4928
|
-
return
|
|
4928
|
+
return bl.test(t) ? Cn(t) : t;
|
|
4929
4929
|
}))
|
|
4930
4930
|
};
|
|
4931
|
-
},
|
|
4932
|
-
let { exportData: a, beforeExportData: s, importLimit: c =
|
|
4931
|
+
}, Sl = ({ config: e, state: t, setState: n, smartUploadConfig: r, startTransition: i }) => {
|
|
4932
|
+
let { exportData: a, beforeExportData: s, importLimit: c = Sc, validationRules: l = [], translations: u, onImportComplete: d = () => {}, disablePasteSuccessfulToast: f, prevalidationConfig: p, onDeleteRows: m } = e == null ? {} : e, { parsedResult: h } = t, { checkPrevalidationNeed: g } = p == null ? {} : p, _ = yl(u), v = gl(_, a, s), y = o((e) => {
|
|
4933
4933
|
n((t) => ({
|
|
4934
4934
|
...t,
|
|
4935
4935
|
...e
|
|
@@ -4973,9 +4973,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4973
4973
|
let t = {
|
|
4974
4974
|
validationRules: l,
|
|
4975
4975
|
importLimit: c
|
|
4976
|
-
}, n =
|
|
4976
|
+
}, n = xl(await al(e, t, _));
|
|
4977
4977
|
if (g && g(h)) {
|
|
4978
|
-
let { fields: e, units: r, rows: a } = n, o =
|
|
4978
|
+
let { fields: e, units: r, rows: a } = n, o = ol(e, r == null ? [] : r, a, t);
|
|
4979
4979
|
return i(() => y({
|
|
4980
4980
|
pastedText: o,
|
|
4981
4981
|
parsedResult: h
|
|
@@ -5001,20 +5001,20 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5001
5001
|
let { fromFile: t, showSuccessToast: n = !0 } = e == null ? {} : e, r;
|
|
5002
5002
|
try {
|
|
5003
5003
|
if (r = t ? await t.text() : await navigator.clipboard.readText(), !r) {
|
|
5004
|
-
|
|
5004
|
+
ul({ message: {
|
|
5005
5005
|
type: "Error",
|
|
5006
5006
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed")
|
|
5007
5007
|
} }, i);
|
|
5008
5008
|
return;
|
|
5009
5009
|
}
|
|
5010
|
-
let e =
|
|
5010
|
+
let e = xl(await al(r, {
|
|
5011
5011
|
validationRules: l,
|
|
5012
5012
|
importLimit: c
|
|
5013
5013
|
}, _));
|
|
5014
|
-
return e != null && e.isValid ||
|
|
5014
|
+
return e != null && e.isValid || ul({ message: {
|
|
5015
5015
|
type: "Error",
|
|
5016
5016
|
content: _("clipboardReadFailed")
|
|
5017
|
-
} }, i), n &&
|
|
5017
|
+
} }, i), n && ul({ message: {
|
|
5018
5018
|
type: "Success",
|
|
5019
5019
|
content: _("pasteSuccessful")
|
|
5020
5020
|
} }, i), {
|
|
@@ -5022,7 +5022,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5022
5022
|
parsedResult: e
|
|
5023
5023
|
};
|
|
5024
5024
|
} catch (e) {
|
|
5025
|
-
|
|
5025
|
+
ul({ message: {
|
|
5026
5026
|
type: "Error",
|
|
5027
5027
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed"),
|
|
5028
5028
|
details: e.message
|
|
@@ -5035,10 +5035,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5035
5035
|
let n = e == null || (t = e.target) == null || (t = t.files) == null ? void 0 : t[0];
|
|
5036
5036
|
if (!n) return;
|
|
5037
5037
|
let r = await C(await n.text());
|
|
5038
|
-
r.isValid ? (f ||
|
|
5038
|
+
r.isValid ? (f || ul({ message: {
|
|
5039
5039
|
type: "Success",
|
|
5040
5040
|
content: _("pasteSuccessful")
|
|
5041
|
-
} }, i), i(() => d(r))) :
|
|
5041
|
+
} }, i), i(() => d(r))) : ul({ message: {
|
|
5042
5042
|
type: "Error",
|
|
5043
5043
|
content: _("fileParsingFailed")
|
|
5044
5044
|
} }, i);
|
|
@@ -5052,7 +5052,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5052
5052
|
try {
|
|
5053
5053
|
let t = await navigator.clipboard.readText();
|
|
5054
5054
|
if (!t) {
|
|
5055
|
-
|
|
5055
|
+
ul({ message: {
|
|
5056
5056
|
type: "Error",
|
|
5057
5057
|
content: _("clipboardIsEmpty")
|
|
5058
5058
|
} }, i);
|
|
@@ -5060,18 +5060,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5060
5060
|
}
|
|
5061
5061
|
let n = await C(t);
|
|
5062
5062
|
if (!n.isValid) {
|
|
5063
|
-
|
|
5063
|
+
ul({ message: {
|
|
5064
5064
|
type: "Error",
|
|
5065
5065
|
content: _("clipboardReadFailed")
|
|
5066
5066
|
} }, i);
|
|
5067
5067
|
return;
|
|
5068
5068
|
}
|
|
5069
|
-
f ||
|
|
5069
|
+
f || ul({ message: {
|
|
5070
5070
|
type: "Success",
|
|
5071
5071
|
content: _("pasteSuccessful")
|
|
5072
5072
|
} }, i), e && i(() => d(n));
|
|
5073
5073
|
} catch {
|
|
5074
|
-
|
|
5074
|
+
ul({ message: {
|
|
5075
5075
|
type: "Error",
|
|
5076
5076
|
content: _("clipboardReadNotAllowed")
|
|
5077
5077
|
} }, i);
|
|
@@ -5086,14 +5086,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5086
5086
|
onClickCopyClipboard: o(async (e) => {
|
|
5087
5087
|
let t = await v();
|
|
5088
5088
|
if (!t) return;
|
|
5089
|
-
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e :
|
|
5089
|
+
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e : xc).slice(0, n.length), s = (e, t) => t === "comma" ? e.replace(/\./g, ",") : e, c = ol(n, o, a.map((t) => t.map((t) => ur(t) ? "" : s(t.toString(), e))), { delimiter: " " });
|
|
5090
5090
|
try {
|
|
5091
|
-
await navigator.clipboard.writeText(c),
|
|
5091
|
+
await navigator.clipboard.writeText(c), ul({ message: {
|
|
5092
5092
|
type: "Success",
|
|
5093
5093
|
content: _("copiedToClipboard")
|
|
5094
5094
|
} }, i);
|
|
5095
5095
|
} catch (e) {
|
|
5096
|
-
|
|
5096
|
+
ul({ message: {
|
|
5097
5097
|
type: "Error",
|
|
5098
5098
|
content: _("unableToCopyToClipboard"),
|
|
5099
5099
|
details: e.message
|
|
@@ -5103,14 +5103,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5103
5103
|
onSmartUploadResult: o((e) => {
|
|
5104
5104
|
let t = un(e) && dn(e.errorMessage) ? e.errorMessage : void 0;
|
|
5105
5105
|
if (t) {
|
|
5106
|
-
|
|
5106
|
+
ul({ message: {
|
|
5107
5107
|
type: "Error",
|
|
5108
5108
|
content: t || "Smart upload failed."
|
|
5109
5109
|
} }, i);
|
|
5110
5110
|
return;
|
|
5111
5111
|
}
|
|
5112
5112
|
if (!tn(e) || e.length < 2 || !$t(e, (e) => un(e) && $t(_n(e), dn))) {
|
|
5113
|
-
|
|
5113
|
+
ul({ message: {
|
|
5114
5114
|
type: "Error",
|
|
5115
5115
|
content: "Smart upload returned unexpected format.",
|
|
5116
5116
|
details: JSON.stringify(e)
|
|
@@ -5142,14 +5142,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5142
5142
|
]),
|
|
5143
5143
|
deleteAllRows: x
|
|
5144
5144
|
};
|
|
5145
|
-
},
|
|
5145
|
+
}, Cl = (e, t) => {
|
|
5146
5146
|
var n, r;
|
|
5147
|
-
let { fields: i, rows: a } = e, o =
|
|
5147
|
+
let { fields: i, rows: a } = e, o = ol(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");
|
|
5148
5148
|
c.href = window.URL.createObjectURL(s), c.download = `${t}.csv`, document.body.appendChild(c), c.click(), document.body.removeChild(c);
|
|
5149
|
-
},
|
|
5149
|
+
}, wl = (e) => ln(e) && "modalKey" in e, Tl = (e, t, n) => Zt(e, (e) => {
|
|
5150
5150
|
if (tn(e) || !un(e)) return;
|
|
5151
5151
|
let { modalKey: r } = e == null ? {} : e;
|
|
5152
|
-
if (
|
|
5152
|
+
if (wl(e) && typeof e.onClick != "function") {
|
|
5153
5153
|
let i = () => {
|
|
5154
5154
|
var e;
|
|
5155
5155
|
n(r, !((e = t.modalVisibility) != null && e[r]));
|
|
@@ -5159,7 +5159,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5159
5159
|
onClick: i
|
|
5160
5160
|
};
|
|
5161
5161
|
}
|
|
5162
|
-
}),
|
|
5162
|
+
}), El = (e, t, n) => Tl(e, t, n), Dl = {
|
|
5163
5163
|
pastedText: "",
|
|
5164
5164
|
parsedResult: {
|
|
5165
5165
|
isValid: !1,
|
|
@@ -5174,9 +5174,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5174
5174
|
reviewPasteModal: !1,
|
|
5175
5175
|
helpModal: !1
|
|
5176
5176
|
}
|
|
5177
|
-
},
|
|
5177
|
+
}, Ol = ({ config: e, smartUploadConfig: t, testId: n }) => {
|
|
5178
5178
|
var r, i, a, o;
|
|
5179
|
-
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(
|
|
5179
|
+
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(Dl), { 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 = yl(f), ee = gl(I, s, c), [L, te] = h(), ne = Sl({
|
|
5180
5180
|
config: e,
|
|
5181
5181
|
state: E,
|
|
5182
5182
|
setState: D,
|
|
@@ -5211,14 +5211,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5211
5211
|
onClick: () => R("smartUploadModal", !O),
|
|
5212
5212
|
testId: `${n}-smart-upload`
|
|
5213
5213
|
}] : [],
|
|
5214
|
-
...
|
|
5214
|
+
...El((r = w == null ? void 0 : w.importOptions) == null ? [] : r, E, R)
|
|
5215
5215
|
] : [], de = [
|
|
5216
5216
|
{
|
|
5217
5217
|
type: "Option",
|
|
5218
5218
|
label: I("downloadFile"),
|
|
5219
5219
|
onClick: async () => {
|
|
5220
5220
|
let e = await ee();
|
|
5221
|
-
e && e &&
|
|
5221
|
+
e && e && Cl(e, d);
|
|
5222
5222
|
}
|
|
5223
5223
|
},
|
|
5224
5224
|
...p ? [{
|
|
@@ -5243,20 +5243,20 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5243
5243
|
}]
|
|
5244
5244
|
}
|
|
5245
5245
|
}],
|
|
5246
|
-
...
|
|
5246
|
+
...El((i = w == null ? void 0 : w.exportOptions) == null ? [] : i, E, R)
|
|
5247
5247
|
], fe = b ? [{
|
|
5248
5248
|
type: "Option",
|
|
5249
5249
|
label: I("deleteAllRows"),
|
|
5250
5250
|
onClick: () => z(),
|
|
5251
5251
|
testId: `${n}-delete-all-rows`
|
|
5252
|
-
}, ...
|
|
5252
|
+
}, ...El((a = w == null ? void 0 : w.deleteOptions) == null ? [] : a, E, R)] : [], pe = x ? [
|
|
5253
5253
|
{ type: "Divider" },
|
|
5254
5254
|
{
|
|
5255
5255
|
type: "Option",
|
|
5256
5256
|
label: I("help"),
|
|
5257
5257
|
onClick: () => R("helpModal", !A)
|
|
5258
5258
|
},
|
|
5259
|
-
...
|
|
5259
|
+
...El((o = w == null ? void 0 : w.helpOptions) == null ? [] : o, E, R)
|
|
5260
5260
|
] : [], me = [
|
|
5261
5261
|
...ue.length ? [{
|
|
5262
5262
|
section: [...ue, ...pe],
|
|
@@ -5282,13 +5282,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5282
5282
|
small: !0,
|
|
5283
5283
|
dark: !0
|
|
5284
5284
|
}),
|
|
5285
|
-
me.map((e, t) => /* @__PURE__ */ v(
|
|
5285
|
+
me.map((e, t) => /* @__PURE__ */ v(hl, {
|
|
5286
5286
|
sections: e.section,
|
|
5287
5287
|
iconName: e.iconName,
|
|
5288
5288
|
tooltip: e.tooltip,
|
|
5289
5289
|
testId: `data-${e == null ? void 0 : e.name}-menu`
|
|
5290
5290
|
}, t)),
|
|
5291
|
-
k && /* @__PURE__ */ v(
|
|
5291
|
+
k && /* @__PURE__ */ v(pl, {
|
|
5292
5292
|
config: e,
|
|
5293
5293
|
state: E,
|
|
5294
5294
|
updateState: ie,
|
|
@@ -5324,14 +5324,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5324
5324
|
cancelText: I("cancel"),
|
|
5325
5325
|
testId: n
|
|
5326
5326
|
}),
|
|
5327
|
-
/* @__PURE__ */ v(
|
|
5327
|
+
/* @__PURE__ */ v(ml, {
|
|
5328
5328
|
modals: C,
|
|
5329
5329
|
modalVisibility: E == null ? void 0 : E.modalVisibility,
|
|
5330
5330
|
onCloseModal: ae,
|
|
5331
5331
|
testId: n
|
|
5332
5332
|
})
|
|
5333
5333
|
] });
|
|
5334
|
-
},
|
|
5334
|
+
}, kl = ({ file: e, accept: t, multi: n, name: r, disabled: i, onChange: a = pn, ...o }) => {
|
|
5335
5335
|
let c = s(H), l = p(null), u = () => {
|
|
5336
5336
|
var e;
|
|
5337
5337
|
i || c || (e = l.current) == null || e.click();
|
|
@@ -5359,12 +5359,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5359
5359
|
multiple: n,
|
|
5360
5360
|
onChange: d
|
|
5361
5361
|
})] });
|
|
5362
|
-
},
|
|
5362
|
+
}, Al = {
|
|
5363
5363
|
label: "_label_uxk69_1",
|
|
5364
5364
|
labelLeft: "_labelLeft_uxk69_5",
|
|
5365
5365
|
icons: "_icons_uxk69_13",
|
|
5366
5366
|
small: "_small_uxk69_27"
|
|
5367
|
-
},
|
|
5367
|
+
}, jl = ({ label: e = null, width: t = "auto", helpText: n = "", helpTextMaxWidth: r = "300px", onClickHelp: i = void 0, lock: a = {
|
|
5368
5368
|
visible: !1,
|
|
5369
5369
|
active: !1,
|
|
5370
5370
|
onClick: () => {},
|
|
@@ -5373,14 +5373,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5373
5373
|
}, info: o, libraryIcon: s, labelLeft: c = !1, small: l = !1, textTransform: u = Dr.CAPITALIZE }) => {
|
|
5374
5374
|
var d;
|
|
5375
5375
|
return /* @__PURE__ */ v("div", {
|
|
5376
|
-
className: g(
|
|
5376
|
+
className: g(Al.label, c ? Al.labelLeft : "", l ? Al.small : ""),
|
|
5377
5377
|
children: /* @__PURE__ */ y("label", {
|
|
5378
5378
|
style: {
|
|
5379
5379
|
textTransform: u,
|
|
5380
5380
|
width: t || ""
|
|
5381
5381
|
},
|
|
5382
5382
|
children: [e, /* @__PURE__ */ y("div", {
|
|
5383
|
-
className:
|
|
5383
|
+
className: Al.icons,
|
|
5384
5384
|
children: [
|
|
5385
5385
|
(n || i) && /* @__PURE__ */ v(si, {
|
|
5386
5386
|
text: n,
|
|
@@ -5406,23 +5406,23 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5406
5406
|
})]
|
|
5407
5407
|
})
|
|
5408
5408
|
});
|
|
5409
|
-
},
|
|
5409
|
+
}, Ml = {
|
|
5410
5410
|
field: "_field_1xoss_1",
|
|
5411
5411
|
labelLeft: "_labelLeft_1xoss_5",
|
|
5412
5412
|
fieldInput: "_fieldInput_1xoss_9",
|
|
5413
5413
|
formRow: "_formRow_1xoss_12",
|
|
5414
5414
|
"form-row": "_form-row_1xoss_13",
|
|
5415
5415
|
button: "_button_1xoss_22"
|
|
5416
|
-
},
|
|
5416
|
+
}, Nl = ({ label: e, labelLeft: t = !1, labelWidth: n = "auto", children: r, helpText: i, helpTextMaxWidth: a = "300px", onClickHelp: o, lock: s = {
|
|
5417
5417
|
visible: !1,
|
|
5418
5418
|
active: !1,
|
|
5419
5419
|
onClick: () => {},
|
|
5420
5420
|
tooltip: "",
|
|
5421
5421
|
testId: void 0
|
|
5422
5422
|
}, info: c, libraryIcon: l, small: u = !1, testId: d, textTransform: f = Dr.CAPITALIZE }) => /* @__PURE__ */ y("div", {
|
|
5423
|
-
className: g(
|
|
5423
|
+
className: g(Ml.field, t ? Ml.labelLeft : ""),
|
|
5424
5424
|
"data-testid": d,
|
|
5425
|
-
children: [(e || t) && /* @__PURE__ */ v(
|
|
5425
|
+
children: [(e || t) && /* @__PURE__ */ v(jl, {
|
|
5426
5426
|
label: e,
|
|
5427
5427
|
width: n,
|
|
5428
5428
|
helpText: i,
|
|
@@ -5435,10 +5435,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5435
5435
|
small: u,
|
|
5436
5436
|
textTransform: f
|
|
5437
5437
|
}), /* @__PURE__ */ v("div", {
|
|
5438
|
-
className:
|
|
5438
|
+
className: Ml.fieldInput,
|
|
5439
5439
|
children: r
|
|
5440
5440
|
})]
|
|
5441
|
-
}),
|
|
5441
|
+
}), Pl = ({ 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", {
|
|
5442
5442
|
style: {
|
|
5443
5443
|
display: "flex",
|
|
5444
5444
|
flexDirection: n,
|
|
@@ -5450,20 +5450,20 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5450
5450
|
gap: s === !1 ? 0 : s === !0 ? "var(--padding)" : typeof s == "number" ? `${s}px` : s
|
|
5451
5451
|
},
|
|
5452
5452
|
children: a
|
|
5453
|
-
}),
|
|
5454
|
-
className:
|
|
5453
|
+
}), Fl = { formRow: "_formRow_odewu_1" }, Il = ({ children: e }) => /* @__PURE__ */ v("div", {
|
|
5454
|
+
className: Fl.formRow,
|
|
5455
5455
|
children: e
|
|
5456
|
-
}),
|
|
5456
|
+
}), Ll = { grid: "_grid_obkz4_1" }, Rl = (e) => typeof e == "boolean" ? e ? "var(--padding)" : "0px" : typeof e == "number" ? `${e}px` : e || "initial", zl = (e) => typeof e == "number" ? `${e}px` : e || "initial", Bl = ({ rows: e = "initial", columns: t = "initial", columnsTablet: n = null, columnsMobile: r = null, gap: i = !1, height: a = "initial", children: o }) => {
|
|
5457
5457
|
let s = {
|
|
5458
|
-
"--grid-gap":
|
|
5459
|
-
"--grid-rows":
|
|
5460
|
-
"--grid-columns":
|
|
5461
|
-
"--grid-height":
|
|
5462
|
-
...n != null && { "--grid-columns-tablet":
|
|
5463
|
-
...r != null && { "--grid-columns-mobile":
|
|
5458
|
+
"--grid-gap": Rl(i),
|
|
5459
|
+
"--grid-rows": zl(e),
|
|
5460
|
+
"--grid-columns": zl(t),
|
|
5461
|
+
"--grid-height": zl(a),
|
|
5462
|
+
...n != null && { "--grid-columns-tablet": zl(n) },
|
|
5463
|
+
...r != null && { "--grid-columns-mobile": zl(r) }
|
|
5464
5464
|
};
|
|
5465
5465
|
return /* @__PURE__ */ v("div", {
|
|
5466
|
-
className:
|
|
5466
|
+
className: Ll.grid,
|
|
5467
5467
|
style: s,
|
|
5468
5468
|
children: o
|
|
5469
5469
|
});
|
|
@@ -5510,15 +5510,15 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5510
5510
|
hideScrollbar: "_hideScrollbar_1dcn1_67",
|
|
5511
5511
|
noPointerEvents: "_noPointerEvents_1dcn1_309",
|
|
5512
5512
|
virtualRows: "_virtualRows_1dcn1_312"
|
|
5513
|
-
},
|
|
5513
|
+
}, Vl = ({ toggleNarrow: e, onClickToggleNarrow: t }) => e ? /* @__PURE__ */ v("a", {
|
|
5514
5514
|
className: Z.toggleNarrow,
|
|
5515
5515
|
onClick: t,
|
|
5516
5516
|
children: /* @__PURE__ */ v(U, { icon: V.CHEVRON_LEFT })
|
|
5517
|
-
}) : null,
|
|
5517
|
+
}) : null, Hl = r(({ name: e, actions: t = [], toggleNarrow: n = !1, onToggleNarrow: r = () => {}, stickyHeader: i }, a) => /* @__PURE__ */ y("div", {
|
|
5518
5518
|
ref: a,
|
|
5519
5519
|
className: g(Z.header, i ? Z.stickyHeader : ""),
|
|
5520
5520
|
children: [
|
|
5521
|
-
/* @__PURE__ */ v(
|
|
5521
|
+
/* @__PURE__ */ v(Vl, {
|
|
5522
5522
|
toggleNarrow: n,
|
|
5523
5523
|
onClickToggleNarrow: r
|
|
5524
5524
|
}),
|
|
@@ -5538,14 +5538,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5538
5538
|
})
|
|
5539
5539
|
})
|
|
5540
5540
|
]
|
|
5541
|
-
})),
|
|
5541
|
+
})), Ul = ({ label: e }) => e ? /* @__PURE__ */ v("span", {
|
|
5542
5542
|
className: Z.label,
|
|
5543
5543
|
children: /* @__PURE__ */ v(Pi, {
|
|
5544
5544
|
color: e.color,
|
|
5545
5545
|
title: e.value,
|
|
5546
5546
|
small: e.small
|
|
5547
5547
|
})
|
|
5548
|
-
}) : null,
|
|
5548
|
+
}) : null, Wl = ({ name: e, icon: t, testId: n }) => {
|
|
5549
5549
|
let r = t && /* @__PURE__ */ v(U, {
|
|
5550
5550
|
icon: t.icon,
|
|
5551
5551
|
color: t.color || "#db2828"
|
|
@@ -5565,8 +5565,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5565
5565
|
children: r
|
|
5566
5566
|
})]
|
|
5567
5567
|
});
|
|
5568
|
-
},
|
|
5569
|
-
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ v(
|
|
5568
|
+
}, Gl = ({ item: e }) => {
|
|
5569
|
+
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ v(Wl, {
|
|
5570
5570
|
name: t,
|
|
5571
5571
|
icon: n,
|
|
5572
5572
|
testId: o && `${o}-name`
|
|
@@ -5592,10 +5592,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5592
5592
|
})
|
|
5593
5593
|
]
|
|
5594
5594
|
});
|
|
5595
|
-
},
|
|
5595
|
+
}, Kl = ({ item: e }) => e.metaCount === void 0 ? null : /* @__PURE__ */ v(Pi, {
|
|
5596
5596
|
color: "rgba(0,0,0,0.25)",
|
|
5597
5597
|
title: e.metaCount
|
|
5598
|
-
}),
|
|
5598
|
+
}), ql = ({ item: e, expanding: t }) => /* @__PURE__ */ v(Wr, {
|
|
5599
5599
|
expanded: !!t && !!e.active && !!e.content,
|
|
5600
5600
|
children: /* @__PURE__ */ v("div", {
|
|
5601
5601
|
className: Z.itemContent,
|
|
@@ -5604,7 +5604,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5604
5604
|
},
|
|
5605
5605
|
children: e.content
|
|
5606
5606
|
})
|
|
5607
|
-
}),
|
|
5607
|
+
}), Jl = r(({ item: e, index: t }, n) => {
|
|
5608
5608
|
var r;
|
|
5609
5609
|
let i = s(H), { actions: a, disabled: o, expanded: c, onClick: l, title: u, name: d, icon: f, testId: p } = e;
|
|
5610
5610
|
return /* @__PURE__ */ v("div", {
|
|
@@ -5624,13 +5624,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5624
5624
|
className: g(Z.expandIcon, c && Z.expanded),
|
|
5625
5625
|
children: /* @__PURE__ */ v(U, { icon: V.CHEVRON_RIGHT })
|
|
5626
5626
|
}),
|
|
5627
|
-
/* @__PURE__ */ v(
|
|
5627
|
+
/* @__PURE__ */ v(Wl, {
|
|
5628
5628
|
name: d,
|
|
5629
5629
|
icon: f
|
|
5630
5630
|
}),
|
|
5631
5631
|
/* @__PURE__ */ y("div", {
|
|
5632
5632
|
className: Z.right,
|
|
5633
|
-
children: [/* @__PURE__ */ v(
|
|
5633
|
+
children: [/* @__PURE__ */ v(Kl, { item: e }), !(o || i) && a && /* @__PURE__ */ v("div", {
|
|
5634
5634
|
className: Z.actions,
|
|
5635
5635
|
children: /* @__PURE__ */ v(Ji, { actions: (r = e.actions) == null ? [] : r })
|
|
5636
5636
|
})]
|
|
@@ -5638,7 +5638,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5638
5638
|
]
|
|
5639
5639
|
}) })
|
|
5640
5640
|
});
|
|
5641
|
-
}),
|
|
5641
|
+
}), Yl = r(({ item: e, index: t, expanding: n, invokeEditOnRowClick: r, draggable: i }, a) => {
|
|
5642
5642
|
let o = s(H), c = (e, t, s, c, l, u) => {
|
|
5643
5643
|
let d = t.actions && t.actions.find((e) => {
|
|
5644
5644
|
var t;
|
|
@@ -5674,24 +5674,24 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5674
5674
|
className: Z.indentIcon,
|
|
5675
5675
|
children: /* @__PURE__ */ v(U, { icon: V.INDENT })
|
|
5676
5676
|
}) : null,
|
|
5677
|
-
/* @__PURE__ */ v(
|
|
5678
|
-
/* @__PURE__ */ v(
|
|
5677
|
+
/* @__PURE__ */ v(Ul, { label: t.label }),
|
|
5678
|
+
/* @__PURE__ */ v(Gl, { item: t }),
|
|
5679
5679
|
/* @__PURE__ */ y("div", {
|
|
5680
5680
|
className: Z.right,
|
|
5681
|
-
children: [/* @__PURE__ */ v(
|
|
5681
|
+
children: [/* @__PURE__ */ v(Kl, { item: t }), !(t.disabled || o) && t.actions && /* @__PURE__ */ v("div", {
|
|
5682
5682
|
className: Z.actions,
|
|
5683
5683
|
children: /* @__PURE__ */ v(Ji, { actions: t.actions })
|
|
5684
5684
|
})]
|
|
5685
5685
|
})
|
|
5686
5686
|
]
|
|
5687
|
-
}), /* @__PURE__ */ v(
|
|
5687
|
+
}), /* @__PURE__ */ v(ql, {
|
|
5688
5688
|
item: t,
|
|
5689
5689
|
expanding: n
|
|
5690
5690
|
})]
|
|
5691
5691
|
})
|
|
5692
5692
|
}, e);
|
|
5693
5693
|
};
|
|
5694
|
-
return e.type === "Heading" ? /* @__PURE__ */ v(
|
|
5694
|
+
return e.type === "Heading" ? /* @__PURE__ */ v(Jl, {
|
|
5695
5695
|
ref: a,
|
|
5696
5696
|
item: e,
|
|
5697
5697
|
index: t
|
|
@@ -5706,7 +5706,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5706
5706
|
opacity: +!s
|
|
5707
5707
|
}, n, r, i);
|
|
5708
5708
|
})(t, e) : c(t, e);
|
|
5709
|
-
}),
|
|
5709
|
+
}), Xl = ({ children: e, draggable: t, list: n, onListReorder: r }) => {
|
|
5710
5710
|
let [i, a] = m(null), o = (e) => {
|
|
5711
5711
|
a(e.active.id);
|
|
5712
5712
|
}, s = (e) => {
|
|
@@ -5729,7 +5729,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5729
5729
|
dropAnimation: null,
|
|
5730
5730
|
children: /* @__PURE__ */ v("div", {
|
|
5731
5731
|
className: Z.dragOverlay,
|
|
5732
|
-
children: /* @__PURE__ */ v(
|
|
5732
|
+
children: /* @__PURE__ */ v(Yl, {
|
|
5733
5733
|
draggable: t,
|
|
5734
5734
|
item: n.items[Number(i)],
|
|
5735
5735
|
index: Number(i)
|
|
@@ -5737,7 +5737,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5737
5737
|
})
|
|
5738
5738
|
}), document.body)]
|
|
5739
5739
|
}) : e;
|
|
5740
|
-
},
|
|
5740
|
+
}, Zl = ({ items: e, scrollDetails: t, children: n }) => {
|
|
5741
5741
|
let { scrollable: r, hideScrollbar: i, triggerScrollToActiveItem: a, infiniteScroll: s } = t, l = p(null), u = ir({
|
|
5742
5742
|
count: e.length,
|
|
5743
5743
|
getScrollElement: () => l.current,
|
|
@@ -5767,9 +5767,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5767
5767
|
children: n({ virtualizer: u })
|
|
5768
5768
|
})
|
|
5769
5769
|
});
|
|
5770
|
-
},
|
|
5770
|
+
}, Ql = ({ items: e, scrollDetails: t, children: n }) => {
|
|
5771
5771
|
let { scrollable: r, hideScrollbar: i, infiniteScroll: a } = t;
|
|
5772
|
-
return a ? /* @__PURE__ */ v(
|
|
5772
|
+
return a ? /* @__PURE__ */ v(Zl, {
|
|
5773
5773
|
items: e,
|
|
5774
5774
|
scrollDetails: t,
|
|
5775
5775
|
children: ({ virtualizer: e }) => n({ virtualizer: e })
|
|
@@ -5780,7 +5780,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5780
5780
|
children: n({})
|
|
5781
5781
|
})
|
|
5782
5782
|
});
|
|
5783
|
-
},
|
|
5783
|
+
}, $l = ({ 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 = {
|
|
5784
5784
|
scrollable: !1,
|
|
5785
5785
|
hideScrollbar: !1,
|
|
5786
5786
|
triggerScrollToActiveItem: !1,
|
|
@@ -5793,17 +5793,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5793
5793
|
marginBottom: d
|
|
5794
5794
|
},
|
|
5795
5795
|
id: "scrollableDiv",
|
|
5796
|
-
children: [!s && /* @__PURE__ */ v(
|
|
5796
|
+
children: [!s && /* @__PURE__ */ v(Hl, {
|
|
5797
5797
|
name: e.name,
|
|
5798
5798
|
actions: e.actions,
|
|
5799
5799
|
toggleNarrow: i,
|
|
5800
5800
|
onToggleNarrow: a,
|
|
5801
5801
|
stickyHeader: c
|
|
5802
|
-
}), /* @__PURE__ */ v(
|
|
5802
|
+
}), /* @__PURE__ */ v(Xl, {
|
|
5803
5803
|
draggable: l,
|
|
5804
5804
|
list: e,
|
|
5805
5805
|
onListReorder: u,
|
|
5806
|
-
children: /* @__PURE__ */ v(
|
|
5806
|
+
children: /* @__PURE__ */ v(Ql, {
|
|
5807
5807
|
items: e.items,
|
|
5808
5808
|
scrollDetails: m,
|
|
5809
5809
|
children: ({ virtualizer: t }) => t ? t.getVirtualItems().map((r) => /* @__PURE__ */ v("div", {
|
|
@@ -5811,14 +5811,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5811
5811
|
className: Z.virtualRow,
|
|
5812
5812
|
style: { transform: `translateY(${r.start}px)` },
|
|
5813
5813
|
ref: t.measureElement,
|
|
5814
|
-
children: /* @__PURE__ */ v(
|
|
5814
|
+
children: /* @__PURE__ */ v(Yl, {
|
|
5815
5815
|
index: r.index,
|
|
5816
5816
|
draggable: l,
|
|
5817
5817
|
item: e.items[r.index],
|
|
5818
5818
|
expanding: n,
|
|
5819
5819
|
invokeEditOnRowClick: o
|
|
5820
5820
|
})
|
|
5821
|
-
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(
|
|
5821
|
+
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(Yl, {
|
|
5822
5822
|
index: t,
|
|
5823
5823
|
draggable: l,
|
|
5824
5824
|
item: e,
|
|
@@ -5827,7 +5827,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5827
5827
|
}) }, t))
|
|
5828
5828
|
})
|
|
5829
5829
|
})]
|
|
5830
|
-
}),
|
|
5830
|
+
}), eu = {
|
|
5831
5831
|
loader: "_loader_477i5_1",
|
|
5832
5832
|
fullViewPortSize: "_fullViewPortSize_477i5_7",
|
|
5833
5833
|
cover: "_cover_477i5_14",
|
|
@@ -5835,33 +5835,33 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5835
5835
|
content: "_content_477i5_44",
|
|
5836
5836
|
text: "_text_477i5_49",
|
|
5837
5837
|
details: "_details_477i5_53"
|
|
5838
|
-
},
|
|
5838
|
+
}, tu = ({ width: e, height: t, text: n = "", details: r = "", fullViewPortSize: i = !1, cover: a = !1, children: o = null, theme: s = Or.DARK, testId: c = null }) => {
|
|
5839
5839
|
let l = s === Or.DARK ? Or.WHITE : Or.INHERIT, u = s === "white" ? "var(--color-background-raised)" : s === "light" ? "var(--color-background)" : "black";
|
|
5840
5840
|
return /* @__PURE__ */ v("div", {
|
|
5841
|
-
className: g(
|
|
5841
|
+
className: g(eu.loader, a ? eu.cover : "", { [eu.fullViewPortSize]: i }),
|
|
5842
5842
|
style: {
|
|
5843
5843
|
width: e,
|
|
5844
5844
|
height: t
|
|
5845
5845
|
},
|
|
5846
5846
|
"data-testid": c,
|
|
5847
5847
|
children: /* @__PURE__ */ v("div", {
|
|
5848
|
-
className:
|
|
5848
|
+
className: eu.dimmer,
|
|
5849
5849
|
style: {
|
|
5850
5850
|
background: u,
|
|
5851
5851
|
color: l
|
|
5852
5852
|
},
|
|
5853
5853
|
children: /* @__PURE__ */ y("div", {
|
|
5854
|
-
className:
|
|
5854
|
+
className: eu.content,
|
|
5855
5855
|
"data-testid": c && `${c}-content`,
|
|
5856
5856
|
children: [
|
|
5857
5857
|
o,
|
|
5858
5858
|
n && /* @__PURE__ */ v("div", {
|
|
5859
|
-
className:
|
|
5859
|
+
className: eu.text,
|
|
5860
5860
|
"data-testid": c && `${c}-text`,
|
|
5861
5861
|
children: n
|
|
5862
5862
|
}),
|
|
5863
5863
|
r && /* @__PURE__ */ v("div", {
|
|
5864
|
-
className:
|
|
5864
|
+
className: eu.details,
|
|
5865
5865
|
"data-testid": c && `${c}-details`,
|
|
5866
5866
|
children: r
|
|
5867
5867
|
})
|
|
@@ -5869,15 +5869,15 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5869
5869
|
})
|
|
5870
5870
|
})
|
|
5871
5871
|
});
|
|
5872
|
-
},
|
|
5872
|
+
}, nu = {
|
|
5873
5873
|
menu: "_menu_12x4u_1",
|
|
5874
5874
|
header: "_header_12x4u_11",
|
|
5875
5875
|
item: "_item_12x4u_27",
|
|
5876
5876
|
heading: "_heading_12x4u_32"
|
|
5877
|
-
},
|
|
5877
|
+
}, ru = ({ option: e, onChange: t }) => {
|
|
5878
5878
|
let { key: n, label: r, selected: i, testId: a } = e == null ? {} : e;
|
|
5879
5879
|
return /* @__PURE__ */ v("div", {
|
|
5880
|
-
className:
|
|
5880
|
+
className: nu.item,
|
|
5881
5881
|
children: /* @__PURE__ */ v(ci, {
|
|
5882
5882
|
label: r,
|
|
5883
5883
|
noMargin: !0,
|
|
@@ -5886,17 +5886,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5886
5886
|
testId: a
|
|
5887
5887
|
})
|
|
5888
5888
|
}, n);
|
|
5889
|
-
},
|
|
5890
|
-
className:
|
|
5889
|
+
}, iu = ({ label: e }) => /* @__PURE__ */ v("div", {
|
|
5890
|
+
className: nu.heading,
|
|
5891
5891
|
children: e
|
|
5892
|
-
}),
|
|
5892
|
+
}), au = /* @__PURE__ */ function(e) {
|
|
5893
5893
|
return e.HEADING = "Heading", e.DIVIDER = "Divider", e.DEFAULT = "Default", e;
|
|
5894
|
-
}({}),
|
|
5895
|
-
className: g("menu",
|
|
5894
|
+
}({}), ou = ({ options: e, onChangeOptions: t, showHeader: n, maxHeight: r, testId: i }) => /* @__PURE__ */ y("div", {
|
|
5895
|
+
className: g("menu", nu.menu),
|
|
5896
5896
|
style: { maxHeight: r },
|
|
5897
5897
|
"data-testid": i ? `${i}-option-dropdown-layer` : void 0,
|
|
5898
5898
|
children: [n && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
|
|
5899
|
-
className:
|
|
5899
|
+
className: nu.header,
|
|
5900
5900
|
children: [
|
|
5901
5901
|
/* @__PURE__ */ v("a", {
|
|
5902
5902
|
onClick: (n) => {
|
|
@@ -5928,9 +5928,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5928
5928
|
]
|
|
5929
5929
|
}), /* @__PURE__ */ v(_a, { margin: 0 })] }), e.map((n, r) => {
|
|
5930
5930
|
switch (n.type) {
|
|
5931
|
-
case
|
|
5932
|
-
case
|
|
5933
|
-
default: return /* @__PURE__ */ v(
|
|
5931
|
+
case au.HEADING: return /* @__PURE__ */ v(iu, { label: n.label }, r);
|
|
5932
|
+
case au.DIVIDER: return /* @__PURE__ */ v(_a, { margin: 0 }, r);
|
|
5933
|
+
default: return /* @__PURE__ */ v(ru, {
|
|
5934
5934
|
option: n,
|
|
5935
5935
|
onChange: (r) => {
|
|
5936
5936
|
let { value: i } = n;
|
|
@@ -5942,7 +5942,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5942
5942
|
}, r);
|
|
5943
5943
|
}
|
|
5944
5944
|
})]
|
|
5945
|
-
}),
|
|
5945
|
+
}), su = ({ name: e, disabled: t, label: n, options: r, onChange: i, small: a = !1, showHeader: o = !0, maxHeight: s = "40vh", testId: c }) => /* @__PURE__ */ v(Ki, {
|
|
5946
5946
|
testId: c,
|
|
5947
5947
|
disabled: t,
|
|
5948
5948
|
menu: {
|
|
@@ -5951,7 +5951,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5951
5951
|
label: n,
|
|
5952
5952
|
trigger: Cr.DROP_DOWN_BUTTON,
|
|
5953
5953
|
possiblePlacements: ["top-start", "bottom-start"],
|
|
5954
|
-
sections: /* @__PURE__ */ v(
|
|
5954
|
+
sections: /* @__PURE__ */ v(ou, {
|
|
5955
5955
|
testId: c,
|
|
5956
5956
|
options: r,
|
|
5957
5957
|
onChangeOptions: (t, n) => {
|
|
@@ -5961,13 +5961,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5961
5961
|
maxHeight: s
|
|
5962
5962
|
})
|
|
5963
5963
|
}
|
|
5964
|
-
}),
|
|
5964
|
+
}), cu = {
|
|
5965
5965
|
page: "_page_beskc_1",
|
|
5966
5966
|
scroll: "_scroll_beskc_23"
|
|
5967
|
-
},
|
|
5967
|
+
}, lu = ({ children: e, left: t = "var(--size-sidebar)", padding: n = !0, scroll: r = !0, top: i = "var(--size-topbar)" }) => {
|
|
5968
5968
|
let a = typeof n == "string" ? n : n === !0 ? "var(--padding)" : "0";
|
|
5969
5969
|
return /* @__PURE__ */ v("div", {
|
|
5970
|
-
className: g(
|
|
5970
|
+
className: g(cu.page, r ? cu.scroll : ""),
|
|
5971
5971
|
style: {
|
|
5972
5972
|
left: t,
|
|
5973
5973
|
padding: a,
|
|
@@ -5975,25 +5975,25 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5975
5975
|
},
|
|
5976
5976
|
children: e
|
|
5977
5977
|
});
|
|
5978
|
-
},
|
|
5978
|
+
}, uu = { printHeader: "_printHeader_o7xxx_1" }, du = ({ logo: e, alt: t, logoWidth: n = "100px" }) => /* @__PURE__ */ v("img", {
|
|
5979
5979
|
src: e,
|
|
5980
5980
|
alt: t,
|
|
5981
|
-
className:
|
|
5981
|
+
className: uu.printHeader,
|
|
5982
5982
|
style: { width: n }
|
|
5983
|
-
}),
|
|
5983
|
+
}), fu = ({ 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" }) => {
|
|
5984
5984
|
let m = s(H), h = f !== void 0, { simpleInputs: _, options: b, selectedOptions: x } = h ? {
|
|
5985
5985
|
simpleInputs: !1,
|
|
5986
5986
|
options: f,
|
|
5987
5987
|
selectedOptions: void 0
|
|
5988
5988
|
} : Ss(n, r), S = h || x == null ? void 0 : _ ? x : x.value, C = h ? d : t;
|
|
5989
5989
|
return /* @__PURE__ */ y("div", {
|
|
5990
|
-
className: g(
|
|
5990
|
+
className: g(lc.wrapper, u ? lc.inline : null, p === "inline fields" ? lc.inline : null),
|
|
5991
5991
|
children: [d && /* @__PURE__ */ v("label", {
|
|
5992
|
-
className: g(u &&
|
|
5992
|
+
className: g(u && lc.labelMargin),
|
|
5993
5993
|
children: C
|
|
5994
5994
|
}), b.map((t, n) => {
|
|
5995
5995
|
let r = (t == null ? void 0 : t.checked) || (t == null ? void 0 : t.value) === S || !1;
|
|
5996
|
-
return /* @__PURE__ */ v(
|
|
5996
|
+
return /* @__PURE__ */ v(uc, {
|
|
5997
5997
|
name: t.name || t.value,
|
|
5998
5998
|
label: t.label,
|
|
5999
5999
|
value: t.value,
|
|
@@ -6011,44 +6011,44 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6011
6011
|
}, n);
|
|
6012
6012
|
})]
|
|
6013
6013
|
});
|
|
6014
|
-
},
|
|
6014
|
+
}, pu = {
|
|
6015
6015
|
richTextToolbar: "_richTextToolbar_1gbkk_1",
|
|
6016
6016
|
richTextToolbarContainer: "_richTextToolbarContainer_1gbkk_5"
|
|
6017
|
-
},
|
|
6017
|
+
}, mu = /* @__PURE__ */ function(e) {
|
|
6018
6018
|
return e.BOLD = "bold", e.ITALIC = "italic", e.CODE = "code", e.UL = "ul", e.OL = "ol", e;
|
|
6019
|
-
}({}),
|
|
6019
|
+
}({}), hu = ({ editor: e, disabled: t = !1, toolbarComponent: n = null }) => {
|
|
6020
6020
|
var r, i, a, o, s;
|
|
6021
6021
|
let c = [
|
|
6022
6022
|
{
|
|
6023
|
-
icon:
|
|
6023
|
+
icon: mu.BOLD,
|
|
6024
6024
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBold().run(),
|
|
6025
6025
|
active: (r = e == null ? void 0 : e.isActive("bold")) == null ? !1 : r
|
|
6026
6026
|
},
|
|
6027
6027
|
{
|
|
6028
|
-
icon:
|
|
6028
|
+
icon: mu.ITALIC,
|
|
6029
6029
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleItalic().run(),
|
|
6030
6030
|
active: (i = e == null ? void 0 : e.isActive("italic")) == null ? !1 : i
|
|
6031
6031
|
},
|
|
6032
6032
|
{
|
|
6033
|
-
icon:
|
|
6033
|
+
icon: mu.CODE,
|
|
6034
6034
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleCode().run(),
|
|
6035
6035
|
active: (a = e == null ? void 0 : e.isActive("code")) == null ? !1 : a
|
|
6036
6036
|
},
|
|
6037
6037
|
{
|
|
6038
|
-
icon:
|
|
6038
|
+
icon: mu.UL,
|
|
6039
6039
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBulletList().run(),
|
|
6040
6040
|
active: (o = e == null ? void 0 : e.isActive("bulletList")) == null ? !1 : o
|
|
6041
6041
|
},
|
|
6042
6042
|
{
|
|
6043
|
-
icon:
|
|
6043
|
+
icon: mu.OL,
|
|
6044
6044
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleOrderedList().run(),
|
|
6045
6045
|
active: (s = e == null ? void 0 : e.isActive("orderedList")) == null ? !1 : s
|
|
6046
6046
|
}
|
|
6047
6047
|
];
|
|
6048
6048
|
return /* @__PURE__ */ y("div", {
|
|
6049
|
-
className:
|
|
6049
|
+
className: pu.richTextToolbarContainer,
|
|
6050
6050
|
children: [/* @__PURE__ */ v("div", {
|
|
6051
|
-
className:
|
|
6051
|
+
className: pu.richTextToolbar,
|
|
6052
6052
|
children: c.map((e, n) => /* @__PURE__ */ v(K, {
|
|
6053
6053
|
small: !0,
|
|
6054
6054
|
round: !0,
|
|
@@ -6061,7 +6061,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6061
6061
|
}, n))
|
|
6062
6062
|
}), n]
|
|
6063
6063
|
});
|
|
6064
|
-
},
|
|
6064
|
+
}, gu = {
|
|
6065
6065
|
inputInTable: "_inputInTable_gb097_1",
|
|
6066
6066
|
inputHover: "_inputHover_gb097_13",
|
|
6067
6067
|
inputFocus: "_inputFocus_gb097_18",
|
|
@@ -6070,7 +6070,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6070
6070
|
inputDisabled: "_inputDisabled_gb097_61",
|
|
6071
6071
|
hideScrollbars: "_hideScrollbars_gb097_67",
|
|
6072
6072
|
richTextInput: "_richTextInput_gb097_77"
|
|
6073
|
-
},
|
|
6073
|
+
}, _u = a(r(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i }, a) => {
|
|
6074
6074
|
let o = s(H), u = r || o, d = fr({
|
|
6075
6075
|
extensions: [
|
|
6076
6076
|
pr,
|
|
@@ -6097,17 +6097,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6097
6097
|
clearContent: () => d == null ? void 0 : d.commands.clearContent(!1),
|
|
6098
6098
|
editor: d
|
|
6099
6099
|
}), [d]), /* @__PURE__ */ y("div", {
|
|
6100
|
-
className:
|
|
6101
|
-
children: [/* @__PURE__ */ v(
|
|
6100
|
+
className: gu.richTextInput,
|
|
6101
|
+
children: [/* @__PURE__ */ v(hu, {
|
|
6102
6102
|
editor: d,
|
|
6103
6103
|
disabled: u,
|
|
6104
6104
|
toolbarComponent: i
|
|
6105
6105
|
}), /* @__PURE__ */ v(dr, { editor: d })]
|
|
6106
6106
|
});
|
|
6107
|
-
})),
|
|
6107
|
+
})), vu = { row: "_row_n16je_1" }, yu = ({ 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 }) => {
|
|
6108
6108
|
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));
|
|
6109
6109
|
return /* @__PURE__ */ v("div", {
|
|
6110
|
-
className: g(
|
|
6110
|
+
className: g(vu.row),
|
|
6111
6111
|
style: {
|
|
6112
6112
|
alignItems: t,
|
|
6113
6113
|
justifyContent: n,
|
|
@@ -6123,7 +6123,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6123
6123
|
"data-testid": d,
|
|
6124
6124
|
children: p
|
|
6125
6125
|
});
|
|
6126
|
-
},
|
|
6126
|
+
}, bu = {
|
|
6127
6127
|
inputInTable: "_inputInTable_1oy1z_1",
|
|
6128
6128
|
inputHover: "_inputHover_1oy1z_13",
|
|
6129
6129
|
inputFocus: "_inputFocus_1oy1z_18",
|
|
@@ -6142,7 +6142,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6142
6142
|
experimental: "_experimental_1oy1z_155",
|
|
6143
6143
|
active: "_active_1oy1z_159",
|
|
6144
6144
|
icon: "_icon_1oy1z_163"
|
|
6145
|
-
},
|
|
6145
|
+
}, xu = a(({ isOpen: e, label: t, icon: n, invalid: r }) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(W, {
|
|
6146
6146
|
text: t,
|
|
6147
6147
|
enabled: !e,
|
|
6148
6148
|
placement: "right-center",
|
|
@@ -6151,7 +6151,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6151
6151
|
padding: "var(--padding-sm)",
|
|
6152
6152
|
display: "block",
|
|
6153
6153
|
children: /* @__PURE__ */ v("span", {
|
|
6154
|
-
className:
|
|
6154
|
+
className: bu.icon,
|
|
6155
6155
|
children: /* @__PURE__ */ v(Pi, {
|
|
6156
6156
|
small: !0,
|
|
6157
6157
|
title: r ? "!" : void 0,
|
|
@@ -6160,18 +6160,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6160
6160
|
})
|
|
6161
6161
|
})
|
|
6162
6162
|
}), /* @__PURE__ */ v("span", {
|
|
6163
|
-
className:
|
|
6163
|
+
className: bu.label,
|
|
6164
6164
|
children: t
|
|
6165
|
-
})] }), (e, t) => er(e, t)),
|
|
6166
|
-
className:
|
|
6165
|
+
})] }), (e, t) => er(e, t)), Su = ({ isOpen: e, items: t, sectionIndex: n, onClick: r, testId: i }) => /* @__PURE__ */ v("div", {
|
|
6166
|
+
className: bu.list,
|
|
6167
6167
|
children: t.map((t, a) => {
|
|
6168
6168
|
let o = `${n}_${a}`;
|
|
6169
6169
|
return /* @__PURE__ */ v("a", {
|
|
6170
6170
|
href: t.value,
|
|
6171
|
-
className: g(
|
|
6171
|
+
className: g(bu.item, t.isActive ? bu.active : "", t.isExperimental ? bu.experimental : ""),
|
|
6172
6172
|
onClick: (e) => r(e, t.value, t.label, t.onClick),
|
|
6173
6173
|
"data-testid": i,
|
|
6174
|
-
children: /* @__PURE__ */ v(
|
|
6174
|
+
children: /* @__PURE__ */ v(xu, {
|
|
6175
6175
|
label: t.label,
|
|
6176
6176
|
icon: t.icon,
|
|
6177
6177
|
invalid: t.invalid,
|
|
@@ -6179,16 +6179,16 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6179
6179
|
}, o)
|
|
6180
6180
|
}, o);
|
|
6181
6181
|
})
|
|
6182
|
-
}),
|
|
6183
|
-
className:
|
|
6182
|
+
}), Cu = ({ isOpen: t, sections: n, onClick: r }) => /* @__PURE__ */ v(_, { children: n.map((n, i) => /* @__PURE__ */ y(e.Fragment, { children: [/* @__PURE__ */ v("h5", {
|
|
6183
|
+
className: bu.subtitle,
|
|
6184
6184
|
children: n.heading.toUpperCase()
|
|
6185
|
-
}), /* @__PURE__ */ v(
|
|
6185
|
+
}), /* @__PURE__ */ v(Su, {
|
|
6186
6186
|
isOpen: t,
|
|
6187
6187
|
items: n.items,
|
|
6188
6188
|
sectionIndex: i,
|
|
6189
6189
|
onClick: r,
|
|
6190
6190
|
testId: n.testId
|
|
6191
|
-
})] }, i)) }),
|
|
6191
|
+
})] }, i)) }), wu = a(({ options: e, startOpen: t = !1, onShiftClickToggleOpen: n = () => {}, top: r }) => {
|
|
6192
6192
|
let [i, a] = m(t), o = (e, t, n, r) => {
|
|
6193
6193
|
e.preventDefault(), typeof r == "function" && (e.currentTarget.value = t, e.currentTarget.label = n, r(e)), a(!1);
|
|
6194
6194
|
}, s = e.sections.length > 0;
|
|
@@ -6209,13 +6209,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6209
6209
|
icon: V.LEFT
|
|
6210
6210
|
}),
|
|
6211
6211
|
children: /* @__PURE__ */ v("div", {
|
|
6212
|
-
className: g(
|
|
6212
|
+
className: g(bu.sidebar, i ? "" : bu.collapsed),
|
|
6213
6213
|
children: s && /* @__PURE__ */ y("div", {
|
|
6214
|
-
className:
|
|
6214
|
+
className: bu.inner,
|
|
6215
6215
|
children: [/* @__PURE__ */ v("h4", {
|
|
6216
|
-
className:
|
|
6216
|
+
className: bu.title,
|
|
6217
6217
|
children: e.title
|
|
6218
|
-
}), /* @__PURE__ */ v(
|
|
6218
|
+
}), /* @__PURE__ */ v(Cu, {
|
|
6219
6219
|
isOpen: i,
|
|
6220
6220
|
sections: e.sections,
|
|
6221
6221
|
onClick: o
|
|
@@ -6223,18 +6223,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6223
6223
|
})
|
|
6224
6224
|
})
|
|
6225
6225
|
});
|
|
6226
|
-
}, (e, t) => er(e, t)),
|
|
6226
|
+
}, (e, t) => er(e, t)), Tu = {
|
|
6227
6227
|
skeletonContainer: "_skeletonContainer_mcfxp_9",
|
|
6228
6228
|
skeleton: "_skeleton_mcfxp_9"
|
|
6229
|
-
},
|
|
6229
|
+
}, Eu = ({ count: e, width: t, height: n }) => /* @__PURE__ */ v(gr, {
|
|
6230
6230
|
baseColor: "var(--color-skeleton-base)",
|
|
6231
6231
|
highlightColor: "var(--color-skeleton-highlight)",
|
|
6232
|
-
containerClassName:
|
|
6233
|
-
className:
|
|
6232
|
+
containerClassName: Tu.skeletonContainer,
|
|
6233
|
+
className: Tu.skeleton,
|
|
6234
6234
|
count: e,
|
|
6235
6235
|
width: t,
|
|
6236
6236
|
height: n
|
|
6237
|
-
}),
|
|
6237
|
+
}), Du = {
|
|
6238
6238
|
tabs: "_tabs_1y79t_1",
|
|
6239
6239
|
padding: "_padding_1y79t_7",
|
|
6240
6240
|
margin: "_margin_1y79t_11",
|
|
@@ -6245,12 +6245,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6245
6245
|
disabled: "_disabled_1y79t_61",
|
|
6246
6246
|
left: "_left_1y79t_65",
|
|
6247
6247
|
right: "_right_1y79t_65"
|
|
6248
|
-
},
|
|
6248
|
+
}, Ou = ({ label: e, url: t, hidden: n, disabled: r, active: i, onClick: a, right: o, invalid: s, badge: c, testId: l }) => {
|
|
6249
6249
|
let u = getComputedStyle(document.body).getPropertyValue("--color-text-error");
|
|
6250
6250
|
return /* @__PURE__ */ v("a", {
|
|
6251
6251
|
id: e == null ? void 0 : e.toString(),
|
|
6252
6252
|
href: t,
|
|
6253
|
-
className: g(
|
|
6253
|
+
className: g(Du.item, i ? Du.active : "", r ? Du.disabled : "", n && !i ? Du.hidden : "", o ? Du.right : Du.left),
|
|
6254
6254
|
onClick: a,
|
|
6255
6255
|
"data-testid": l,
|
|
6256
6256
|
children: s ? /* @__PURE__ */ v(Pi, {
|
|
@@ -6266,10 +6266,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6266
6266
|
children: e
|
|
6267
6267
|
}) : e
|
|
6268
6268
|
});
|
|
6269
|
-
},
|
|
6270
|
-
className: g(n ?
|
|
6269
|
+
}, ku = ({ children: e, activeTabIndex: t, contentPadding: n }) => Array.isArray(e) ? /* @__PURE__ */ v("div", {
|
|
6270
|
+
className: g(n ? Du.contentPadding : ""),
|
|
6271
6271
|
children: e.map((e, n) => t === n && e)
|
|
6272
|
-
}) : null,
|
|
6272
|
+
}) : null, Au = ({ 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 }) => {
|
|
6273
6273
|
let p = s(H), m = l !== void 0, h = n ? n.map((e, t) => {
|
|
6274
6274
|
var n;
|
|
6275
6275
|
return {
|
|
@@ -6293,11 +6293,11 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6293
6293
|
}
|
|
6294
6294
|
};
|
|
6295
6295
|
return b ? /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
|
|
6296
|
-
className: g(
|
|
6296
|
+
className: g(Du.tabs, a ? Du.padding : "", o ? Du.margin : ""),
|
|
6297
6297
|
"data-testid": f,
|
|
6298
6298
|
children: b.map((e, t) => {
|
|
6299
6299
|
let { label: n, url: r, hidden: i, disabled: a, value: o, right: s, invalid: c, badge: l, testId: u } = e;
|
|
6300
|
-
return /* @__PURE__ */ v(
|
|
6300
|
+
return /* @__PURE__ */ v(Ou, {
|
|
6301
6301
|
label: n,
|
|
6302
6302
|
url: r,
|
|
6303
6303
|
hidden: i,
|
|
@@ -6310,12 +6310,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6310
6310
|
testId: u
|
|
6311
6311
|
}, t);
|
|
6312
6312
|
})
|
|
6313
|
-
}), /* @__PURE__ */ v(
|
|
6313
|
+
}), /* @__PURE__ */ v(ku, {
|
|
6314
6314
|
activeTabIndex: w == null ? 0 : w,
|
|
6315
6315
|
contentPadding: c,
|
|
6316
6316
|
children: n
|
|
6317
6317
|
})] }) : null;
|
|
6318
|
-
},
|
|
6318
|
+
}, ju = ({ children: e, href: t = void 0, target: n = void 0, testId: r, onClick: i, component: a = "a" }) => /* @__PURE__ */ v(a, {
|
|
6319
6319
|
href: t,
|
|
6320
6320
|
to: t,
|
|
6321
6321
|
target: n,
|
|
@@ -6325,7 +6325,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6325
6325
|
link: !0,
|
|
6326
6326
|
children: e
|
|
6327
6327
|
})
|
|
6328
|
-
}),
|
|
6328
|
+
}), Mu = {
|
|
6329
6329
|
inputInTable: "_inputInTable_q0tl0_1",
|
|
6330
6330
|
inputHover: "_inputHover_q0tl0_13",
|
|
6331
6331
|
inputFocus: "_inputFocus_q0tl0_18",
|
|
@@ -6336,9 +6336,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6336
6336
|
textarea: "_textarea_q0tl0_77",
|
|
6337
6337
|
small: "_small_q0tl0_116",
|
|
6338
6338
|
monospace: "_monospace_q0tl0_155"
|
|
6339
|
-
},
|
|
6339
|
+
}, Nu = ({ 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 }) => {
|
|
6340
6340
|
let S = s(H), C = /* @__PURE__ */ v("textarea", {
|
|
6341
|
-
className: g(
|
|
6341
|
+
className: g(Mu.textarea, f ? Mu.error : "", p ? Mu.warning : "", y ? Mu.monospace : "", b ? Mu.small : ""),
|
|
6342
6342
|
name: e,
|
|
6343
6343
|
value: t,
|
|
6344
6344
|
placeholder: n,
|
|
@@ -6380,10 +6380,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6380
6380
|
menu: "_menu_oyr59_139",
|
|
6381
6381
|
active: "_active_oyr59_168",
|
|
6382
6382
|
alert: "_alert_oyr59_193"
|
|
6383
|
-
},
|
|
6383
|
+
}, Pu = ({ warning: e }) => /* @__PURE__ */ v("div", {
|
|
6384
6384
|
className: Q.alert,
|
|
6385
6385
|
children: e
|
|
6386
|
-
}),
|
|
6386
|
+
}), Fu = ({ icon: e, url: t, onClick: n }) => {
|
|
6387
6387
|
let r = /* @__PURE__ */ v(U, { icon: e });
|
|
6388
6388
|
return t ? /* @__PURE__ */ v("a", {
|
|
6389
6389
|
href: t,
|
|
@@ -6395,7 +6395,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6395
6395
|
className: Q.appSwitcher,
|
|
6396
6396
|
children: r
|
|
6397
6397
|
});
|
|
6398
|
-
},
|
|
6398
|
+
}, Iu = ({ label: e, logo: t, url: n, version: r, onClick: i }) => {
|
|
6399
6399
|
let a = /* @__PURE__ */ y("div", {
|
|
6400
6400
|
className: Q.title,
|
|
6401
6401
|
children: [
|
|
@@ -6424,9 +6424,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6424
6424
|
children: a
|
|
6425
6425
|
})
|
|
6426
6426
|
});
|
|
6427
|
-
},
|
|
6427
|
+
}, Lu = /* @__PURE__ */ function(e) {
|
|
6428
6428
|
return e.LINK = "Link", e.BUTTON = "Button", e.MENU = "Menu", e.COMPONENT = "Component", e;
|
|
6429
|
-
}({}),
|
|
6429
|
+
}({}), Ru = ({ label: e, url: t, icon: n, onClick: r, active: i, disabled: a, testId: o, component: c = "a" }) => {
|
|
6430
6430
|
let l = s(H);
|
|
6431
6431
|
return /* @__PURE__ */ y(c, {
|
|
6432
6432
|
className: g(Q.link, i ? Q.active : ""),
|
|
@@ -6443,11 +6443,11 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6443
6443
|
children: e
|
|
6444
6444
|
})]
|
|
6445
6445
|
});
|
|
6446
|
-
},
|
|
6446
|
+
}, zu = ({ element: e }) => {
|
|
6447
6447
|
switch (e.type) {
|
|
6448
|
-
case
|
|
6448
|
+
case Lu.LINK: return /* @__PURE__ */ v("div", {
|
|
6449
6449
|
className: Q.item,
|
|
6450
|
-
children: /* @__PURE__ */ v(
|
|
6450
|
+
children: /* @__PURE__ */ v(Ru, {
|
|
6451
6451
|
label: e.label,
|
|
6452
6452
|
url: e.url,
|
|
6453
6453
|
icon: e.icon,
|
|
@@ -6458,7 +6458,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6458
6458
|
component: e.component
|
|
6459
6459
|
})
|
|
6460
6460
|
});
|
|
6461
|
-
case
|
|
6461
|
+
case Lu.BUTTON: return /* @__PURE__ */ v("div", {
|
|
6462
6462
|
className: g(Q.item, Q.button),
|
|
6463
6463
|
children: /* @__PURE__ */ v(K, {
|
|
6464
6464
|
label: e.label,
|
|
@@ -6470,7 +6470,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6470
6470
|
testId: e.testId
|
|
6471
6471
|
})
|
|
6472
6472
|
});
|
|
6473
|
-
case
|
|
6473
|
+
case Lu.MENU: return /* @__PURE__ */ v("div", {
|
|
6474
6474
|
className: g(Q.item, Q.menu),
|
|
6475
6475
|
children: /* @__PURE__ */ v(Ki, {
|
|
6476
6476
|
maxHeight: "100%",
|
|
@@ -6478,7 +6478,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6478
6478
|
trigger: Cr.COMPONENT,
|
|
6479
6479
|
fullHeightTrigger: !0,
|
|
6480
6480
|
placement: "bottom-start",
|
|
6481
|
-
component: /* @__PURE__ */ v(
|
|
6481
|
+
component: /* @__PURE__ */ v(Ru, {
|
|
6482
6482
|
label: e.label,
|
|
6483
6483
|
icon: e.icon,
|
|
6484
6484
|
onClick: e.onClick
|
|
@@ -6487,50 +6487,50 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6487
6487
|
}
|
|
6488
6488
|
})
|
|
6489
6489
|
});
|
|
6490
|
-
case
|
|
6490
|
+
case Lu.COMPONENT: return /* @__PURE__ */ v("div", {
|
|
6491
6491
|
className: Q.item,
|
|
6492
6492
|
children: e.component
|
|
6493
6493
|
});
|
|
6494
6494
|
default: return null;
|
|
6495
6495
|
}
|
|
6496
|
-
},
|
|
6496
|
+
}, Bu = ({ 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(Pu, { warning: i }), /* @__PURE__ */ y("div", {
|
|
6497
6497
|
className: g(Q.topbar, o ? Q.fixed : ""),
|
|
6498
6498
|
style: { height: a },
|
|
6499
6499
|
children: [
|
|
6500
|
-
!!t && /* @__PURE__ */ v(
|
|
6500
|
+
!!t && /* @__PURE__ */ v(Fu, {
|
|
6501
6501
|
icon: t.icon,
|
|
6502
6502
|
url: t.url,
|
|
6503
6503
|
onClick: t.onClick
|
|
6504
6504
|
}),
|
|
6505
6505
|
/* @__PURE__ */ y("div", {
|
|
6506
6506
|
className: Q.left,
|
|
6507
|
-
children: [e && /* @__PURE__ */ v(
|
|
6507
|
+
children: [e && /* @__PURE__ */ v(Iu, {
|
|
6508
6508
|
label: e.label,
|
|
6509
6509
|
logo: e.logo,
|
|
6510
6510
|
url: e.url,
|
|
6511
6511
|
version: e.version,
|
|
6512
6512
|
onClick: e.onClick
|
|
6513
|
-
}), n.map((e, t) => e ? /* @__PURE__ */ v(
|
|
6513
|
+
}), n.map((e, t) => e ? /* @__PURE__ */ v(zu, { element: e }, t) : null)]
|
|
6514
6514
|
}),
|
|
6515
6515
|
/* @__PURE__ */ v("div", {
|
|
6516
6516
|
className: Q.right,
|
|
6517
|
-
children: r.map((e, t) => e ? /* @__PURE__ */ v(
|
|
6517
|
+
children: r.map((e, t) => e ? /* @__PURE__ */ v(zu, { element: e }, t) : null)
|
|
6518
6518
|
})
|
|
6519
6519
|
]
|
|
6520
|
-
})] }),
|
|
6520
|
+
})] }), Vu = {
|
|
6521
6521
|
popConfirm: "_popConfirm_1x6ye_1",
|
|
6522
6522
|
content: "_content_1x6ye_7",
|
|
6523
6523
|
buttons: "_buttons_1x6ye_13"
|
|
6524
|
-
},
|
|
6525
|
-
className:
|
|
6524
|
+
}, Hu = ({ title: e, okText: t, onClickOk: n, disableConfirmButton: r, cancelText: i, onClickCancel: a, close: o, testId: s }) => /* @__PURE__ */ y("div", {
|
|
6525
|
+
className: Vu.popConfirm,
|
|
6526
6526
|
children: [e && /* @__PURE__ */ v("div", {
|
|
6527
|
-
className:
|
|
6527
|
+
className: Vu.content,
|
|
6528
6528
|
children: /* @__PURE__ */ v(ha, {
|
|
6529
6529
|
small: !0,
|
|
6530
6530
|
children: e
|
|
6531
6531
|
})
|
|
6532
6532
|
}), /* @__PURE__ */ y("div", {
|
|
6533
|
-
className:
|
|
6533
|
+
className: Vu.buttons,
|
|
6534
6534
|
children: [/* @__PURE__ */ v(K, {
|
|
6535
6535
|
small: !0,
|
|
6536
6536
|
colored: !0,
|
|
@@ -6545,8 +6545,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6545
6545
|
testId: `${s}-cancel-button`
|
|
6546
6546
|
})]
|
|
6547
6547
|
})]
|
|
6548
|
-
}),
|
|
6549
|
-
content: /* @__PURE__ */ v(
|
|
6548
|
+
}), Uu = ({ 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, {
|
|
6549
|
+
content: /* @__PURE__ */ v(Hu, {
|
|
6550
6550
|
title: i,
|
|
6551
6551
|
okText: s,
|
|
6552
6552
|
onClickOk: c,
|
|
@@ -6561,14 +6561,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6561
6561
|
overflowContainer: u,
|
|
6562
6562
|
testId: d,
|
|
6563
6563
|
children: e
|
|
6564
|
-
}),
|
|
6564
|
+
}), Wu = {
|
|
6565
6565
|
tree: "_tree_coxxe_1",
|
|
6566
6566
|
toggle: "_toggle_coxxe_8",
|
|
6567
6567
|
dropTarget: "_dropTarget_coxxe_15",
|
|
6568
6568
|
placeholder: "_placeholder_coxxe_30",
|
|
6569
6569
|
draggingSource: "_draggingSource_coxxe_36",
|
|
6570
6570
|
placeholderContainer: "_placeholderContainer_coxxe_39"
|
|
6571
|
-
},
|
|
6571
|
+
}, Gu = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
|
|
6572
6572
|
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) => {
|
|
6573
6573
|
e.stopPropagation(), i(l);
|
|
6574
6574
|
}, w = (e) => {
|
|
@@ -6595,7 +6595,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6595
6595
|
className: g(Z.itemHeader, _ ? Z.noPointerEvents : ""),
|
|
6596
6596
|
children: [
|
|
6597
6597
|
a && /* @__PURE__ */ v("div", {
|
|
6598
|
-
className:
|
|
6598
|
+
className: Wu.toggle,
|
|
6599
6599
|
children: /* @__PURE__ */ v(K, {
|
|
6600
6600
|
basic: !0,
|
|
6601
6601
|
colored: r ? !0 : wr.MUTED,
|
|
@@ -6609,10 +6609,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6609
6609
|
className: Z.drag,
|
|
6610
6610
|
children: /* @__PURE__ */ v(U, { icon: V.DRAG })
|
|
6611
6611
|
}),
|
|
6612
|
-
/* @__PURE__ */ v(
|
|
6612
|
+
/* @__PURE__ */ v(Gl, { item: u }),
|
|
6613
6613
|
/* @__PURE__ */ y("div", {
|
|
6614
6614
|
className: Z.right,
|
|
6615
|
-
children: [/* @__PURE__ */ v(
|
|
6615
|
+
children: [/* @__PURE__ */ v(Kl, { item: u }), !f && h.length > 0 && /* @__PURE__ */ v("div", {
|
|
6616
6616
|
className: Z.actions,
|
|
6617
6617
|
children: /* @__PURE__ */ v(Ji, { actions: h })
|
|
6618
6618
|
})]
|
|
@@ -6620,10 +6620,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6620
6620
|
]
|
|
6621
6621
|
})
|
|
6622
6622
|
});
|
|
6623
|
-
},
|
|
6624
|
-
className:
|
|
6623
|
+
}, Ku = ({ depth: e, indent: t = "var(--size-sm)" }) => /* @__PURE__ */ v("div", {
|
|
6624
|
+
className: Wu.placeholder,
|
|
6625
6625
|
style: { left: `calc(${t} * ${e})` }
|
|
6626
|
-
}),
|
|
6626
|
+
}), qu = ({ 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 }) => {
|
|
6627
6627
|
var x;
|
|
6628
6628
|
let S = l == null ? p(null) : l, C = (e) => {
|
|
6629
6629
|
i && i(e);
|
|
@@ -6681,7 +6681,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6681
6681
|
"data-testid": a,
|
|
6682
6682
|
className: Z.list,
|
|
6683
6683
|
style: { height: g },
|
|
6684
|
-
children: [e.name && !e.noHeader && /* @__PURE__ */ v(
|
|
6684
|
+
children: [e.name && !e.noHeader && /* @__PURE__ */ v(Hl, {
|
|
6685
6685
|
name: e.name,
|
|
6686
6686
|
actions: e.actions,
|
|
6687
6687
|
stickyHeader: h
|
|
@@ -6708,7 +6708,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6708
6708
|
hasChild: r,
|
|
6709
6709
|
isOpen: a,
|
|
6710
6710
|
onToggle: o
|
|
6711
|
-
}) : /* @__PURE__ */ v(
|
|
6711
|
+
}) : /* @__PURE__ */ v(Gu, {
|
|
6712
6712
|
hasChild: u ? u(e) : r,
|
|
6713
6713
|
node: e,
|
|
6714
6714
|
depth: t,
|
|
@@ -6724,7 +6724,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6724
6724
|
onDrop: A,
|
|
6725
6725
|
onChangeOpen: C,
|
|
6726
6726
|
dropTargetOffset: 10,
|
|
6727
|
-
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ v(
|
|
6727
|
+
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ v(Ku, {
|
|
6728
6728
|
depth: t,
|
|
6729
6729
|
indent: b
|
|
6730
6730
|
}),
|
|
@@ -6732,17 +6732,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6732
6732
|
listComponent: "div",
|
|
6733
6733
|
listItemComponent: "div",
|
|
6734
6734
|
classes: {
|
|
6735
|
-
root:
|
|
6736
|
-
draggingSource:
|
|
6737
|
-
dropTarget:
|
|
6738
|
-
placeholder:
|
|
6735
|
+
root: Wu.tree,
|
|
6736
|
+
draggingSource: Wu.draggingSource,
|
|
6737
|
+
dropTarget: Wu.dropTarget,
|
|
6738
|
+
placeholder: Wu.placeholderContainer
|
|
6739
6739
|
},
|
|
6740
6740
|
initialOpen: o,
|
|
6741
6741
|
enableAnimateExpand: !0
|
|
6742
6742
|
})
|
|
6743
6743
|
})]
|
|
6744
6744
|
});
|
|
6745
|
-
},
|
|
6745
|
+
}, Ju = {
|
|
6746
6746
|
treeTable: "_treeTable_1ywvy_1",
|
|
6747
6747
|
treeTableHeader: "_treeTableHeader_1ywvy_22",
|
|
6748
6748
|
folderCell: "_folderCell_1ywvy_30",
|
|
@@ -6750,40 +6750,40 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6750
6750
|
drag: "_drag_1ywvy_31",
|
|
6751
6751
|
folder: "_folder_1ywvy_30",
|
|
6752
6752
|
active: "_active_1ywvy_61"
|
|
6753
|
-
},
|
|
6753
|
+
}, Yu = (e, t) => e.filter((e) => e.parent === t).flatMap((t) => [t.id, ...Yu(e, t.id)]), Xu = (e, t, n) => {
|
|
6754
6754
|
let r = new Set(n), i = e.filter((e) => e.parent === t);
|
|
6755
6755
|
if (i.length === 0) return {
|
|
6756
6756
|
checked: r.has(t),
|
|
6757
6757
|
indeterminate: !1
|
|
6758
6758
|
};
|
|
6759
|
-
let a = i.map((t) =>
|
|
6759
|
+
let a = i.map((t) => Xu(e, t.id, n)), o = a.filter((e) => e.checked).length, s = a.filter((e) => e.indeterminate).length, c = o === i.length;
|
|
6760
6760
|
return {
|
|
6761
6761
|
checked: c,
|
|
6762
6762
|
indeterminate: o + s > 0 && !c
|
|
6763
6763
|
};
|
|
6764
|
-
},
|
|
6764
|
+
}, Zu = (e, t) => {
|
|
6765
6765
|
let n = t.length;
|
|
6766
6766
|
return {
|
|
6767
6767
|
checked: e.length > 0 && n === e.length,
|
|
6768
6768
|
indeterminate: n > 0 && n < e.length
|
|
6769
6769
|
};
|
|
6770
|
-
},
|
|
6770
|
+
}, Qu = n(null), $u = () => s(Qu), ed = ({ checkedRows: e, children: t, onChangeCheckedRows: n, rows: r }) => {
|
|
6771
6771
|
let i = e !== void 0, a = d(() => {
|
|
6772
6772
|
if (!i) return null;
|
|
6773
6773
|
let t = /* @__PURE__ */ new Map();
|
|
6774
|
-
for (let n of r) t.set(n.id,
|
|
6774
|
+
for (let n of r) t.set(n.id, Xu(r, n.id, e));
|
|
6775
6775
|
return t;
|
|
6776
6776
|
}, [
|
|
6777
6777
|
i,
|
|
6778
6778
|
r,
|
|
6779
6779
|
e
|
|
6780
|
-
]), s = d(() => i ?
|
|
6780
|
+
]), s = d(() => i ? Zu(r, e) : void 0, [
|
|
6781
6781
|
i,
|
|
6782
6782
|
r,
|
|
6783
6783
|
e
|
|
6784
6784
|
]), c = o((e) => a == null ? void 0 : a.get(e), [a]), l = o((t) => {
|
|
6785
6785
|
if (!i) return;
|
|
6786
|
-
let a = [t, ...
|
|
6786
|
+
let a = [t, ...Yu(r, t)], { checked: o } = Xu(r, t, e);
|
|
6787
6787
|
if (o) {
|
|
6788
6788
|
let t = new Set(a);
|
|
6789
6789
|
n == null || n(e.filter((e) => !t.has(e)));
|
|
@@ -6795,7 +6795,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6795
6795
|
r
|
|
6796
6796
|
]), u = o(() => {
|
|
6797
6797
|
if (!i) return;
|
|
6798
|
-
let { checked: t } =
|
|
6798
|
+
let { checked: t } = Zu(r, e);
|
|
6799
6799
|
t ? n == null || n([]) : n == null || n(r.map((e) => e.id));
|
|
6800
6800
|
}, [
|
|
6801
6801
|
e,
|
|
@@ -6815,12 +6815,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6815
6815
|
u,
|
|
6816
6816
|
l
|
|
6817
6817
|
]);
|
|
6818
|
-
return /* @__PURE__ */ v(
|
|
6818
|
+
return /* @__PURE__ */ v(Qu.Provider, {
|
|
6819
6819
|
value: f,
|
|
6820
6820
|
children: t
|
|
6821
6821
|
});
|
|
6822
|
-
},
|
|
6823
|
-
let h =
|
|
6822
|
+
}, td = ({ 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 }) => {
|
|
6823
|
+
let h = $u(), _ = h != null && h.enabled ? h.getRowCheckState(l.id) : void 0, b = _ == null ? void 0 : _.checked, x = _ == null ? void 0 : _.indeterminate, { data: S, droppable: C } = l, { id: w, cells: T, testId: E, actions: D = [], active: O, onRowClick: k } = S, A = C || a, j = h == null ? void 0 : h.enabled, M = (e) => {
|
|
6824
6824
|
let r = t ? t[e] : void 0;
|
|
6825
6825
|
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${A ? n + 1 : n})`})` : r;
|
|
6826
6826
|
};
|
|
@@ -6833,31 +6833,31 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6833
6833
|
onDragLeave: f,
|
|
6834
6834
|
children: /* @__PURE__ */ v("tbody", { children: /* @__PURE__ */ y("tr", {
|
|
6835
6835
|
onClick: k,
|
|
6836
|
-
className: g(
|
|
6836
|
+
className: g(Ju.treeTableRow, O ? Ju.active : void 0),
|
|
6837
6837
|
children: [
|
|
6838
|
-
j && /* @__PURE__ */ v(
|
|
6838
|
+
j && /* @__PURE__ */ v(mc, {
|
|
6839
6839
|
isHeader: !1,
|
|
6840
6840
|
cell: {
|
|
6841
|
-
type:
|
|
6841
|
+
type: pc.CHECKBOX,
|
|
6842
6842
|
checked: b,
|
|
6843
6843
|
indeterminate: x,
|
|
6844
6844
|
onChange: () => h == null ? void 0 : h.toggleRowCheck(l.id)
|
|
6845
6845
|
}
|
|
6846
6846
|
}),
|
|
6847
6847
|
r && /* @__PURE__ */ v("td", {
|
|
6848
|
-
className:
|
|
6848
|
+
className: Ju.dragCell,
|
|
6849
6849
|
children: /* @__PURE__ */ v("div", {
|
|
6850
|
-
className:
|
|
6850
|
+
className: Ju.drag,
|
|
6851
6851
|
onClick: (e) => e.stopPropagation(),
|
|
6852
6852
|
ref: i,
|
|
6853
6853
|
children: /* @__PURE__ */ v(U, { icon: V.DRAG })
|
|
6854
6854
|
})
|
|
6855
6855
|
}),
|
|
6856
|
-
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ v("td", { className:
|
|
6856
|
+
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ v("td", { className: Ju.folderCell }, t)),
|
|
6857
6857
|
A && /* @__PURE__ */ v("td", {
|
|
6858
|
-
className:
|
|
6858
|
+
className: Ju.folderCell,
|
|
6859
6859
|
children: /* @__PURE__ */ v("div", {
|
|
6860
|
-
className:
|
|
6860
|
+
className: Ju.folder,
|
|
6861
6861
|
onClick: () => m(w),
|
|
6862
6862
|
onMouseDown: (e) => e.stopPropagation(),
|
|
6863
6863
|
children: /* @__PURE__ */ v(K, {
|
|
@@ -6870,70 +6870,70 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6870
6870
|
})
|
|
6871
6871
|
})
|
|
6872
6872
|
}),
|
|
6873
|
-
T.map((t, n) => /* @__PURE__ */ v(
|
|
6873
|
+
T.map((t, n) => /* @__PURE__ */ v(mc, {
|
|
6874
6874
|
isHeader: !1,
|
|
6875
6875
|
cell: t,
|
|
6876
6876
|
width: M(n),
|
|
6877
6877
|
columnAlignment: e ? e[n] : null
|
|
6878
6878
|
}, n)),
|
|
6879
|
-
o && /* @__PURE__ */ v(
|
|
6879
|
+
o && /* @__PURE__ */ v(mc, {
|
|
6880
6880
|
isHeader: !1,
|
|
6881
6881
|
cell: {
|
|
6882
|
-
type:
|
|
6882
|
+
type: pc.ACTIONS,
|
|
6883
6883
|
actions: D
|
|
6884
6884
|
}
|
|
6885
6885
|
})
|
|
6886
6886
|
]
|
|
6887
6887
|
}) })
|
|
6888
6888
|
});
|
|
6889
|
-
},
|
|
6890
|
-
let a =
|
|
6889
|
+
}, nd = ({ columnAlignment: e, columnWidths: t, draggable: n, hasRowActions: r, headers: i }) => {
|
|
6890
|
+
let a = $u(), o = a == null ? void 0 : a.headerCheckState, s = (a == null ? void 0 : a.enabled) && o !== void 0;
|
|
6891
6891
|
return /* @__PURE__ */ v("table", {
|
|
6892
|
-
className: g(mo.table,
|
|
6892
|
+
className: g(mo.table, Ju.treeTableHeader),
|
|
6893
6893
|
children: /* @__PURE__ */ v("thead", { children: i.map((i, c) => /* @__PURE__ */ y("tr", { children: [
|
|
6894
|
-
s && c === 0 ? /* @__PURE__ */ v(
|
|
6894
|
+
s && c === 0 ? /* @__PURE__ */ v(mc, {
|
|
6895
6895
|
isHeader: !0,
|
|
6896
6896
|
cell: {
|
|
6897
|
-
type:
|
|
6897
|
+
type: pc.CHECKBOX,
|
|
6898
6898
|
checked: o.checked,
|
|
6899
6899
|
indeterminate: o.indeterminate,
|
|
6900
6900
|
onChange: a.toggleHeaderCheck
|
|
6901
6901
|
}
|
|
6902
6902
|
}) : s ? /* @__PURE__ */ v("td", {}) : null,
|
|
6903
|
-
n && /* @__PURE__ */ v("th", { className:
|
|
6904
|
-
i.cells.map((n, r) => /* @__PURE__ */ v(
|
|
6903
|
+
n && /* @__PURE__ */ v("th", { className: Ju.dragCell }),
|
|
6904
|
+
i.cells.map((n, r) => /* @__PURE__ */ v(mc, {
|
|
6905
6905
|
isHeader: !0,
|
|
6906
6906
|
cell: n,
|
|
6907
6907
|
width: t ? t[r] : void 0,
|
|
6908
6908
|
columnAlignment: e ? e[r] : void 0
|
|
6909
6909
|
}, r)),
|
|
6910
|
-
r && /* @__PURE__ */ v(
|
|
6910
|
+
r && /* @__PURE__ */ v(mc, {
|
|
6911
6911
|
isHeader: !0,
|
|
6912
6912
|
cell: {
|
|
6913
|
-
type:
|
|
6913
|
+
type: pc.ACTIONS,
|
|
6914
6914
|
actions: i.actions,
|
|
6915
6915
|
width: 31
|
|
6916
6916
|
}
|
|
6917
6917
|
})
|
|
6918
6918
|
] }, c)) })
|
|
6919
6919
|
});
|
|
6920
|
-
},
|
|
6920
|
+
}, rd = ({ allowParentReassignment: e, autoOpenActiveItems: t = !1, canDrop: n, checkedRows: r, draggable: i = !1, icons: a, isInitialOpen: o = !1, itemHasChild: s, onItemToggle: c, onListReorder: l, onChangeCheckedRows: u, onChangeOpen: d, table: f, testId: p, treeRef: m }) => {
|
|
6921
6921
|
let { columnAlignment: h, columnWidths: g, fixedWidth: _, headers: b, rows: x = [] } = f, S = Fs(x, b == null ? [] : b);
|
|
6922
|
-
return /* @__PURE__ */ v(
|
|
6922
|
+
return /* @__PURE__ */ v(ed, {
|
|
6923
6923
|
checkedRows: r,
|
|
6924
6924
|
onChangeCheckedRows: u,
|
|
6925
6925
|
rows: x,
|
|
6926
6926
|
children: /* @__PURE__ */ y("div", {
|
|
6927
|
-
className:
|
|
6927
|
+
className: Ju.treeTable,
|
|
6928
6928
|
"data-testid": p,
|
|
6929
6929
|
style: { width: _ },
|
|
6930
|
-
children: [!!b && /* @__PURE__ */ v(
|
|
6930
|
+
children: [!!b && /* @__PURE__ */ v(nd, {
|
|
6931
6931
|
columnAlignment: h,
|
|
6932
6932
|
columnWidths: g,
|
|
6933
6933
|
draggable: i,
|
|
6934
6934
|
hasRowActions: S,
|
|
6935
6935
|
headers: b
|
|
6936
|
-
}), /* @__PURE__ */ v(
|
|
6936
|
+
}), /* @__PURE__ */ v(qu, {
|
|
6937
6937
|
allowParentReassignment: e,
|
|
6938
6938
|
autoOpenActiveItems: t,
|
|
6939
6939
|
canDrop: n,
|
|
@@ -6949,7 +6949,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6949
6949
|
onItemToggle: c,
|
|
6950
6950
|
onListReorder: l,
|
|
6951
6951
|
placeholderIndent: "var(--size)",
|
|
6952
|
-
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: i, isOpen: o, onToggle: s }) => /* @__PURE__ */ v(
|
|
6952
|
+
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: i, isOpen: o, onToggle: s }) => /* @__PURE__ */ v(td, {
|
|
6953
6953
|
node: e,
|
|
6954
6954
|
columnAlignment: h,
|
|
6955
6955
|
columnWidths: g,
|
|
@@ -6966,38 +6966,38 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6966
6966
|
})]
|
|
6967
6967
|
})
|
|
6968
6968
|
});
|
|
6969
|
-
},
|
|
6969
|
+
}, id = () => {
|
|
6970
6970
|
let e = p(null);
|
|
6971
6971
|
return u(() => {
|
|
6972
6972
|
e.current && (e.current(), e.current = null);
|
|
6973
6973
|
}), (t) => {
|
|
6974
6974
|
e.current = t;
|
|
6975
6975
|
};
|
|
6976
|
-
},
|
|
6976
|
+
}, ad = (e) => {
|
|
6977
6977
|
let t = p(void 0);
|
|
6978
6978
|
return c(() => {
|
|
6979
6979
|
t.current = e;
|
|
6980
6980
|
}, [e]), t.current;
|
|
6981
|
-
},
|
|
6981
|
+
}, od = (e, t) => {
|
|
6982
6982
|
let n = t == null ? void 0 : t[e];
|
|
6983
6983
|
if (!n) {
|
|
6984
6984
|
var r;
|
|
6985
6985
|
return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = Un(e)) == null ? "" : r;
|
|
6986
6986
|
}
|
|
6987
6987
|
return n;
|
|
6988
|
-
},
|
|
6988
|
+
}, sd = /* @__PURE__ */ function(e) {
|
|
6989
6989
|
return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
|
|
6990
|
-
}({}),
|
|
6990
|
+
}({}), cd = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), ld = (e) => {
|
|
6991
6991
|
if (!e) return !1;
|
|
6992
6992
|
let t = Dn(e);
|
|
6993
6993
|
return !xn.includes(t);
|
|
6994
|
-
},
|
|
6994
|
+
}, ud = ({ value: e, unitkey: t, toUnit: n }) => {
|
|
6995
6995
|
var r;
|
|
6996
6996
|
let i = bn[t];
|
|
6997
6997
|
if (!i || i.length === 0 || !((r = Wn(e)) != null && r.valid) || !i.includes(n)) return !1;
|
|
6998
6998
|
let a = Dn(String(e));
|
|
6999
6999
|
return !(a && !i.includes(a));
|
|
7000
|
-
},
|
|
7000
|
+
}, dd = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
|
|
7001
7001
|
var o;
|
|
7002
7002
|
let s = Nn(e) ? kn(e) : e, c = [Infinity, -Infinity].includes(Number(s));
|
|
7003
7003
|
if (i || c) return {
|
|
@@ -7017,13 +7017,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7017
7017
|
value: void 0,
|
|
7018
7018
|
error: "Source unit is missing"
|
|
7019
7019
|
};
|
|
7020
|
-
if (
|
|
7020
|
+
if (cd(s)) return {
|
|
7021
7021
|
value: void 0,
|
|
7022
7022
|
error: "Value is invalid for conversion"
|
|
7023
7023
|
};
|
|
7024
7024
|
try {
|
|
7025
7025
|
let e = Kn(s, l);
|
|
7026
|
-
return
|
|
7026
|
+
return ud({
|
|
7027
7027
|
value: e,
|
|
7028
7028
|
toUnit: n,
|
|
7029
7029
|
unitkey: t
|
|
@@ -7040,13 +7040,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7040
7040
|
error: "Conversion not possible"
|
|
7041
7041
|
};
|
|
7042
7042
|
}
|
|
7043
|
-
},
|
|
7044
|
-
let a = kn(e), o =
|
|
7045
|
-
return !
|
|
7043
|
+
}, fd = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
|
|
7044
|
+
let a = kn(e), o = cd(a);
|
|
7045
|
+
return !ud({
|
|
7046
7046
|
value: e,
|
|
7047
7047
|
unitkey: n,
|
|
7048
7048
|
toUnit: t
|
|
7049
|
-
}) ||
|
|
7049
|
+
}) || ld(e) || o ? { value: a } : Nn(e) ? dd({
|
|
7050
7050
|
value: e,
|
|
7051
7051
|
unitkey: n,
|
|
7052
7052
|
toUnit: t,
|
|
@@ -7054,25 +7054,25 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7054
7054
|
doNotConvertValue: i,
|
|
7055
7055
|
exactPrecision: !0
|
|
7056
7056
|
}) : { value: e };
|
|
7057
|
-
},
|
|
7057
|
+
}, pd = (e) => ln(e) && !tn(e) && !on(e) ? en(e, "fieldName", "") : typeof e == "string" ? e : "", md = (e = "") => xn == null ? void 0 : xn.includes(e), hd = (e, t) => {
|
|
7058
7058
|
let n = Dn(e || "");
|
|
7059
|
-
return
|
|
7060
|
-
},
|
|
7061
|
-
|
|
7062
|
-
},
|
|
7059
|
+
return md(t) && md(n);
|
|
7060
|
+
}, gd = n(null), _d = () => s(gd), vd = !1, yd = (e) => {
|
|
7061
|
+
vd || (vd = !0, gd = e);
|
|
7062
|
+
}, bd = (e) => jn(e) ? e : Fn(e), xd = {
|
|
7063
7063
|
predefinedMenuActive: "_predefinedMenuActive_ye9w9_1",
|
|
7064
7064
|
inputWrapper: "_inputWrapper_ye9w9_4"
|
|
7065
|
-
},
|
|
7065
|
+
}, Sd = ({ 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 = () => ({
|
|
7066
7066
|
name: "",
|
|
7067
7067
|
error: null
|
|
7068
7068
|
}), 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 }) => {
|
|
7069
|
-
let ne =
|
|
7069
|
+
let ne = _d(), re = id();
|
|
7070
7070
|
typeof l == "number" && (l = `${l}`);
|
|
7071
|
-
let [ie = "", ae = ""] = l === void 0 ? [] : zn(l), R = d(() =>
|
|
7071
|
+
let [ie = "", ae = ""] = l === void 0 ? [] : zn(l), R = d(() => od(u, C || (ne == null ? void 0 : ne.unitTemplate)), [
|
|
7072
7072
|
u,
|
|
7073
7073
|
C,
|
|
7074
7074
|
ne == null ? void 0 : ne.unitTemplate
|
|
7075
|
-
]), oe =
|
|
7075
|
+
]), oe = hd(l, R), se = f || R || ae, ce = ad(se), { value: le } = fd({
|
|
7076
7076
|
value: l,
|
|
7077
7077
|
toUnit: se,
|
|
7078
7078
|
unitkey: u,
|
|
@@ -7084,10 +7084,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7084
7084
|
} : {
|
|
7085
7085
|
value: le,
|
|
7086
7086
|
unit: se
|
|
7087
|
-
}), de = M || (z == null ? void 0 : z.value) === void 0, [fe, pe] = m(D ?
|
|
7087
|
+
}), de = M || (z == null ? void 0 : z.value) === void 0, [fe, pe] = m(D ? sd.PREDEFINED : sd.CUSTOM), me = !!(j || n), he = E && E.find((e) => {
|
|
7088
7088
|
if (!(e != null && e.value)) return;
|
|
7089
7089
|
if (k) return k === e.valueKey;
|
|
7090
|
-
let t = Nn(e.value) ? Dn(e.value) : "", { value: n = l } =
|
|
7090
|
+
let t = Nn(e.value) ? Dn(e.value) : "", { value: n = l } = dd({
|
|
7091
7091
|
value: String(l),
|
|
7092
7092
|
unitkey: u,
|
|
7093
7093
|
toUnit: t
|
|
@@ -7096,7 +7096,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7096
7096
|
}), ge = () => {
|
|
7097
7097
|
var e;
|
|
7098
7098
|
let t = (e = l) == null ? "" : e, n = z.unit;
|
|
7099
|
-
if (!
|
|
7099
|
+
if (!ud({
|
|
7100
7100
|
value: t,
|
|
7101
7101
|
unitkey: u,
|
|
7102
7102
|
toUnit: n
|
|
@@ -7110,7 +7110,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7110
7110
|
return null;
|
|
7111
7111
|
}
|
|
7112
7112
|
}, _e = (t) => {
|
|
7113
|
-
let n =
|
|
7113
|
+
let n = pd(e), r = t.target, { value: i, selectionStart: a } = r, o = Kn(i, (z == null ? void 0 : z.unit) || "");
|
|
7114
7114
|
h({ target: {
|
|
7115
7115
|
value: N ? Kn(wn(o, ae), ae) : o,
|
|
7116
7116
|
name: n
|
|
@@ -7132,7 +7132,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7132
7132
|
if (se) {
|
|
7133
7133
|
let e, t = "";
|
|
7134
7134
|
if (ce !== se) {
|
|
7135
|
-
let { value: n } =
|
|
7135
|
+
let { value: n } = fd({
|
|
7136
7136
|
value: l,
|
|
7137
7137
|
toUnit: se,
|
|
7138
7138
|
unitkey: u,
|
|
@@ -7141,7 +7141,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7141
7141
|
});
|
|
7142
7142
|
e = n, t = se;
|
|
7143
7143
|
} else if (Kn(z.value, z.unit) !== l) {
|
|
7144
|
-
let { value: n } =
|
|
7144
|
+
let { value: n } = fd({
|
|
7145
7145
|
value: l,
|
|
7146
7146
|
toUnit: z.unit,
|
|
7147
7147
|
unitkey: u,
|
|
@@ -7153,7 +7153,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7153
7153
|
e !== void 0 && ue({
|
|
7154
7154
|
value: e,
|
|
7155
7155
|
unit: t
|
|
7156
|
-
}), pe(E && he && O ?
|
|
7156
|
+
}), pe(E && he && O ? sd.PREDEFINED : sd.CUSTOM);
|
|
7157
7157
|
}
|
|
7158
7158
|
}, [
|
|
7159
7159
|
se,
|
|
@@ -7161,14 +7161,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7161
7161
|
i,
|
|
7162
7162
|
O
|
|
7163
7163
|
]);
|
|
7164
|
-
let ye = ge(), be = Pn(z.unit) || z.unit || "", xe = p || !ye || ye && ye.length === 1, Se =
|
|
7164
|
+
let ye = ge(), be = Pn(z.unit) || z.unit || "", xe = p || !ye || ye && ye.length === 1, Se = pd(e), Ce, we = (t) => {
|
|
7165
7165
|
let r = t != null && t.value ? t.value : "", [i = "", a = ""] = Nn(r) ? zn(r) : [r], o = Gn(r);
|
|
7166
|
-
if (
|
|
7166
|
+
if (ud({
|
|
7167
7167
|
value: r,
|
|
7168
7168
|
unitkey: u,
|
|
7169
7169
|
toUnit: a
|
|
7170
7170
|
})) {
|
|
7171
|
-
let { value: e = "" } =
|
|
7171
|
+
let { value: e = "" } = fd({
|
|
7172
7172
|
value: r,
|
|
7173
7173
|
toUnit: R,
|
|
7174
7174
|
unitkey: u,
|
|
@@ -7181,7 +7181,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7181
7181
|
type: xi.OPTION,
|
|
7182
7182
|
inline: !0,
|
|
7183
7183
|
onClick: () => {
|
|
7184
|
-
Wn(i).valid && !n && (pe(
|
|
7184
|
+
Wn(i).valid && !n && (pe(sd.PREDEFINED), h({ target: {
|
|
7185
7185
|
value: r,
|
|
7186
7186
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || "",
|
|
7187
7187
|
predefinedSelected: !0,
|
|
@@ -7193,27 +7193,27 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7193
7193
|
height: "0"
|
|
7194
7194
|
})] }),
|
|
7195
7195
|
description: o,
|
|
7196
|
-
selected: he === t && fe ===
|
|
7196
|
+
selected: he === t && fe === sd.PREDEFINED
|
|
7197
7197
|
};
|
|
7198
7198
|
};
|
|
7199
7199
|
if (Ce = [{
|
|
7200
7200
|
type: xi.OPTION,
|
|
7201
7201
|
inline: !0,
|
|
7202
7202
|
onClick: () => {
|
|
7203
|
-
fe !==
|
|
7203
|
+
fe !== sd.CUSTOM && !n && h({ target: {
|
|
7204
7204
|
value: Kn(z.value, z.unit),
|
|
7205
7205
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || ""
|
|
7206
7206
|
} });
|
|
7207
7207
|
},
|
|
7208
7208
|
label: "Custom",
|
|
7209
|
-
selected: fe ===
|
|
7209
|
+
selected: fe === sd.CUSTOM
|
|
7210
7210
|
}], E != null && E.length) {
|
|
7211
7211
|
let e = E.map(we);
|
|
7212
7212
|
Ce = [...Ce, ...e];
|
|
7213
7213
|
}
|
|
7214
7214
|
let Te = (e) => {
|
|
7215
7215
|
if (Nn(e)) {
|
|
7216
|
-
let t = Dn(e), { value: n } =
|
|
7216
|
+
let t = Dn(e), { value: n } = fd({
|
|
7217
7217
|
value: e,
|
|
7218
7218
|
toUnit: z.unit,
|
|
7219
7219
|
unitkey: u,
|
|
@@ -7225,7 +7225,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7225
7225
|
return e;
|
|
7226
7226
|
}, Ee = !E && (!L || L === B.FIRST) ? B.FIRST : B.MIDDLE, De = !L || L === B.LAST ? B.LAST : B.MIDDLE;
|
|
7227
7227
|
return /* @__PURE__ */ v("div", {
|
|
7228
|
-
className: fe ===
|
|
7228
|
+
className: fe === sd.PREDEFINED ? g(xd.predefinedMenuActive) : "",
|
|
7229
7229
|
children: /* @__PURE__ */ y(Ma, {
|
|
7230
7230
|
small: o,
|
|
7231
7231
|
width: s,
|
|
@@ -7240,17 +7240,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7240
7240
|
trigger: "Component",
|
|
7241
7241
|
component: /* @__PURE__ */ v(K, {
|
|
7242
7242
|
groupOrder: "first",
|
|
7243
|
-
active: fe ===
|
|
7244
|
-
icon: fe ===
|
|
7243
|
+
active: fe === sd.PREDEFINED,
|
|
7244
|
+
icon: fe === sd.PREDEFINED ? "link" : "unlink",
|
|
7245
7245
|
small: o
|
|
7246
7246
|
}),
|
|
7247
7247
|
small: o,
|
|
7248
7248
|
sections: Ce
|
|
7249
7249
|
},
|
|
7250
|
-
tooltip: fe ===
|
|
7250
|
+
tooltip: fe === sd.PREDEFINED ? he == null ? void 0 : he.label : ""
|
|
7251
7251
|
}),
|
|
7252
7252
|
/* @__PURE__ */ v("div", {
|
|
7253
|
-
className:
|
|
7253
|
+
className: xd.inputWrapper,
|
|
7254
7254
|
children: /* @__PURE__ */ v(Gs, {
|
|
7255
7255
|
name: Se,
|
|
7256
7256
|
testId: w,
|
|
@@ -7292,7 +7292,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7292
7292
|
let r = n || t || "", i = Mn(e) ? e : "";
|
|
7293
7293
|
return {
|
|
7294
7294
|
type: "Option",
|
|
7295
|
-
label: P ?
|
|
7295
|
+
label: P ? bd(i) : i,
|
|
7296
7296
|
inline: !0,
|
|
7297
7297
|
onClick: (n) => {
|
|
7298
7298
|
n.stopPropagation(), ve(e, t);
|
|
@@ -7307,10 +7307,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7307
7307
|
]
|
|
7308
7308
|
})
|
|
7309
7309
|
});
|
|
7310
|
-
},
|
|
7310
|
+
}, Cd = Object.freeze({
|
|
7311
7311
|
Translations: "translations",
|
|
7312
7312
|
LanguageKey: "languageKey"
|
|
7313
|
-
}),
|
|
7313
|
+
}), wd = {
|
|
7314
7314
|
unified: "Unified",
|
|
7315
7315
|
split: "Split",
|
|
7316
7316
|
changesTooLarge: "Changes are too large to be shown",
|
|
@@ -7332,29 +7332,29 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7332
7332
|
pluralChanges: "changes",
|
|
7333
7333
|
showAll: "Show all",
|
|
7334
7334
|
unknown: "Unknown"
|
|
7335
|
-
},
|
|
7335
|
+
}, Td = (e) => Object.keys(wd).reduce((t, n) => ({
|
|
7336
7336
|
...t,
|
|
7337
|
-
[n]: (e == null ? void 0 : e[n]) || (
|
|
7338
|
-
}), {}),
|
|
7339
|
-
[
|
|
7340
|
-
[
|
|
7341
|
-
},
|
|
7342
|
-
|
|
7343
|
-
},
|
|
7337
|
+
[n]: (e == null ? void 0 : e[n]) || (wd == null ? void 0 : wd[n])
|
|
7338
|
+
}), {}), Ed = {
|
|
7339
|
+
[Cd.Translations]: Td(),
|
|
7340
|
+
[Cd.LanguageKey]: "en"
|
|
7341
|
+
}, Dd = (e) => e ? Ed[e] : Ed, Od = (e, t) => {
|
|
7342
|
+
Ed[e] = t;
|
|
7343
|
+
}, kd = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
|
|
7344
7344
|
var a;
|
|
7345
|
-
let { unitTemplate: o = null } = (a =
|
|
7346
|
-
return e[n] = r == null ?
|
|
7345
|
+
let { unitTemplate: o = null } = (a = _d()) == null ? {} : a;
|
|
7346
|
+
return e[n] = r == null ? od(n, o) : r, t[n] = i, {
|
|
7347
7347
|
preferredUnits: e,
|
|
7348
7348
|
storageUnits: t
|
|
7349
7349
|
};
|
|
7350
7350
|
}, {
|
|
7351
7351
|
preferredUnits: {},
|
|
7352
7352
|
storageUnits: {}
|
|
7353
|
-
}),
|
|
7353
|
+
}), Ad = ({ row: e, rowIndex: t, selectedUnits: n, storageUnits: r, convertBackToStorageUnit: i, enableCosmeticRounding: a, enableDisplayRounding: o }) => ({
|
|
7354
7354
|
...e,
|
|
7355
7355
|
cells: e.cells.map((e, s) => {
|
|
7356
7356
|
if ("autoUnit" in e && e != null && e.autoUnit && (typeof (e == null ? void 0 : e.value) == "string" || typeof (e == null ? void 0 : e.value) == "number")) {
|
|
7357
|
-
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 } =
|
|
7357
|
+
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 } = dd({
|
|
7358
7358
|
value: Hs(l),
|
|
7359
7359
|
unitkey: c,
|
|
7360
7360
|
toUnit: f,
|
|
@@ -7368,7 +7368,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7368
7368
|
roundDisplayValue: d,
|
|
7369
7369
|
selectOnFocus: !0,
|
|
7370
7370
|
onChange: (n) => {
|
|
7371
|
-
let { value: r } = n.target, a = i ? p : f, { value: o = r } =
|
|
7371
|
+
let { value: r } = n.target, a = i ? p : f, { value: o = r } = dd({
|
|
7372
7372
|
value: String(r),
|
|
7373
7373
|
unitkey: c,
|
|
7374
7374
|
toUnit: a,
|
|
@@ -7392,17 +7392,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7392
7392
|
}
|
|
7393
7393
|
return e;
|
|
7394
7394
|
})
|
|
7395
|
-
}),
|
|
7396
|
-
let { translations: i } =
|
|
7395
|
+
}), jd = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
|
|
7396
|
+
let { translations: i } = Dd();
|
|
7397
7397
|
return e ? e.map((e) => ({
|
|
7398
7398
|
...e,
|
|
7399
7399
|
cells: e.cells.map((e) => {
|
|
7400
|
-
if (e.type ===
|
|
7400
|
+
if (e.type === pc.AUTO_UNIT) {
|
|
7401
7401
|
var a;
|
|
7402
7402
|
let { testId: o, unitKey: s, disabled: c = !1, error: l } = e, u = n[s];
|
|
7403
7403
|
return {
|
|
7404
7404
|
value: u && t[s],
|
|
7405
|
-
type:
|
|
7405
|
+
type: pc.SELECT,
|
|
7406
7406
|
error: !u && (i == null ? void 0 : i.unitIsMissing) || l,
|
|
7407
7407
|
disabled: c || !u,
|
|
7408
7408
|
searchable: !1,
|
|
@@ -7422,8 +7422,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7422
7422
|
return e;
|
|
7423
7423
|
})
|
|
7424
7424
|
})) : [];
|
|
7425
|
-
},
|
|
7426
|
-
let { headers: u, ...d } = e, { storageUnits: f, preferredUnits: p } =
|
|
7425
|
+
}, Md = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: s, beforeRenderRow: l }) => {
|
|
7426
|
+
let { headers: u, ...d } = e, { storageUnits: f, preferredUnits: p } = kd(t), h = ad(p), [g, _] = m(p), y = ({ unitKey: e, value: n }) => {
|
|
7427
7427
|
_({
|
|
7428
7428
|
...g,
|
|
7429
7429
|
[e]: n
|
|
@@ -7434,7 +7434,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7434
7434
|
newUnit: n,
|
|
7435
7435
|
unitKey: e
|
|
7436
7436
|
});
|
|
7437
|
-
}, b = o(({ row: e, rowIndex: t }) =>
|
|
7437
|
+
}, b = o(({ row: e, rowIndex: t }) => Ad({
|
|
7438
7438
|
row: l ? l({
|
|
7439
7439
|
row: e,
|
|
7440
7440
|
rowIndex: t
|
|
@@ -7460,10 +7460,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7460
7460
|
value: n
|
|
7461
7461
|
});
|
|
7462
7462
|
});
|
|
7463
|
-
}, [t]), /* @__PURE__ */ v(
|
|
7463
|
+
}, [t]), /* @__PURE__ */ v(bc, {
|
|
7464
7464
|
table: {
|
|
7465
7465
|
...d,
|
|
7466
|
-
headers:
|
|
7466
|
+
headers: jd({
|
|
7467
7467
|
headers: e.headers,
|
|
7468
7468
|
selectedUnits: g,
|
|
7469
7469
|
storageUnits: f,
|
|
@@ -7474,8 +7474,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7474
7474
|
canListReorder: s,
|
|
7475
7475
|
beforeRenderRow: b
|
|
7476
7476
|
});
|
|
7477
|
-
},
|
|
7478
|
-
let { translations: d } =
|
|
7477
|
+
}, Nd = { settingField: "_settingField_1x02n_1" }, Pd = ({ 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 }) => {
|
|
7478
|
+
let { translations: d } = Dd(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ y(e.Fragment, { children: [t, /* @__PURE__ */ v("br", {})] }, n)), p = [
|
|
7479
7479
|
...r ? [] : [{
|
|
7480
7480
|
label: d == null ? void 0 : d.allUsers,
|
|
7481
7481
|
value: !1
|
|
@@ -7490,14 +7490,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7490
7490
|
}] : []
|
|
7491
7491
|
], m = a !== void 0 && o !== void 0 && !an(a, o);
|
|
7492
7492
|
return /* @__PURE__ */ y("div", {
|
|
7493
|
-
className:
|
|
7493
|
+
className: Nd.settingField,
|
|
7494
7494
|
"data-testid": u,
|
|
7495
|
-
children: [/* @__PURE__ */ y(
|
|
7495
|
+
children: [/* @__PURE__ */ y(Pl, {
|
|
7496
7496
|
justifyContent: "space-between",
|
|
7497
7497
|
wrap: !1,
|
|
7498
7498
|
children: [i, !s && /* @__PURE__ */ v("div", {
|
|
7499
7499
|
style: { flexShrink: 0 },
|
|
7500
|
-
children: /* @__PURE__ */ y(
|
|
7500
|
+
children: /* @__PURE__ */ y(Pl, {
|
|
7501
7501
|
gap: "8px",
|
|
7502
7502
|
alignItems: "center",
|
|
7503
7503
|
children: [m && /* @__PURE__ */ v(si, {
|
|
@@ -7522,19 +7522,19 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7522
7522
|
children: f(t)
|
|
7523
7523
|
})]
|
|
7524
7524
|
});
|
|
7525
|
-
},
|
|
7525
|
+
}, Fd = (e, t) => {
|
|
7526
7526
|
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;
|
|
7527
7527
|
return {
|
|
7528
7528
|
added: Math.max(0, i),
|
|
7529
7529
|
removed: Math.max(0, a)
|
|
7530
7530
|
};
|
|
7531
|
-
},
|
|
7531
|
+
}, Id = "split", Ld = "unified", Rd = ({ oldJson: e, newJson: t, viewType: n = Id }) => {
|
|
7532
7532
|
var r, i;
|
|
7533
|
-
let { translations: a } =
|
|
7534
|
-
value:
|
|
7533
|
+
let { translations: a } = Dd(), [o, s] = m(n), l = [{
|
|
7534
|
+
value: Id,
|
|
7535
7535
|
label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
|
|
7536
7536
|
}, {
|
|
7537
|
-
value:
|
|
7537
|
+
value: Ld,
|
|
7538
7538
|
label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
|
|
7539
7539
|
}];
|
|
7540
7540
|
c(() => {
|
|
@@ -7542,10 +7542,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7542
7542
|
}, [n]);
|
|
7543
7543
|
let u = ({ target: { value: e } }) => {
|
|
7544
7544
|
s(e);
|
|
7545
|
-
}, { added: d, removed: f } =
|
|
7545
|
+
}, { added: d, removed: f } = Fd(e, t), p = d + f > 3500;
|
|
7546
7546
|
return /* @__PURE__ */ v(_, { children: /* @__PURE__ */ v(na, {
|
|
7547
7547
|
bordered: !0,
|
|
7548
|
-
heading: /* @__PURE__ */ y(
|
|
7548
|
+
heading: /* @__PURE__ */ y(Pl, {
|
|
7549
7549
|
gap: !0,
|
|
7550
7550
|
children: [/* @__PURE__ */ v(ya, { children: /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y(ha, {
|
|
7551
7551
|
success: !0,
|
|
@@ -7557,7 +7557,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7557
7557
|
}), /* @__PURE__ */ y(ha, {
|
|
7558
7558
|
error: !0,
|
|
7559
7559
|
children: ["-", f]
|
|
7560
|
-
})] }) }), !p && /* @__PURE__ */ v(
|
|
7560
|
+
})] }) }), !p && /* @__PURE__ */ v(fu, {
|
|
7561
7561
|
name: "viewType",
|
|
7562
7562
|
options: l,
|
|
7563
7563
|
value: o,
|
|
@@ -7575,14 +7575,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7575
7575
|
}) : /* @__PURE__ */ v(xr, {
|
|
7576
7576
|
oldValue: e,
|
|
7577
7577
|
newValue: t,
|
|
7578
|
-
splitView: o ===
|
|
7578
|
+
splitView: o === Id,
|
|
7579
7579
|
compareMethod: Sr.WORDS
|
|
7580
7580
|
})
|
|
7581
7581
|
}) });
|
|
7582
7582
|
};
|
|
7583
7583
|
//#endregion
|
|
7584
7584
|
//#region src/helpers/date.ts
|
|
7585
|
-
function
|
|
7585
|
+
function zd({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
7586
7586
|
return e ? new Date(e).toLocaleString(a, {
|
|
7587
7587
|
year: "numeric",
|
|
7588
7588
|
month: "short",
|
|
@@ -7596,28 +7596,28 @@ function Rd({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
7596
7596
|
}
|
|
7597
7597
|
//#endregion
|
|
7598
7598
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
7599
|
-
function
|
|
7599
|
+
function Bd(e) {
|
|
7600
7600
|
var t;
|
|
7601
7601
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
7602
7602
|
if (!n) throw Error("Invalid RegExp");
|
|
7603
7603
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
7604
7604
|
}
|
|
7605
|
-
function
|
|
7605
|
+
function Vd(e) {
|
|
7606
7606
|
if (typeof e != "object") return e;
|
|
7607
7607
|
if (e === null) return null;
|
|
7608
|
-
if (Array.isArray(e)) return e.map(
|
|
7608
|
+
if (Array.isArray(e)) return e.map(Vd);
|
|
7609
7609
|
if (e instanceof Date) return new Date(e.getTime());
|
|
7610
|
-
if (e instanceof RegExp) return
|
|
7610
|
+
if (e instanceof RegExp) return Bd(e);
|
|
7611
7611
|
let t = {};
|
|
7612
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
7612
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = Vd(e[n]));
|
|
7613
7613
|
return t;
|
|
7614
7614
|
}
|
|
7615
7615
|
//#endregion
|
|
7616
7616
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
7617
|
-
function
|
|
7617
|
+
function Hd(e, t) {
|
|
7618
7618
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
7619
7619
|
}
|
|
7620
|
-
var
|
|
7620
|
+
var Ud = (e) => e[e.length - 1], Wd = class {
|
|
7621
7621
|
setResult(e) {
|
|
7622
7622
|
return this.result = e, this.hasResult = !0, this;
|
|
7623
7623
|
}
|
|
@@ -7625,16 +7625,16 @@ var Hd = (e) => e[e.length - 1], Ud = class {
|
|
|
7625
7625
|
return this.exiting = !0, this;
|
|
7626
7626
|
}
|
|
7627
7627
|
push(e, t) {
|
|
7628
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
7628
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (Hd(this.children), Ud(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
7629
7629
|
}
|
|
7630
|
-
},
|
|
7630
|
+
}, Gd = class extends Wd {
|
|
7631
7631
|
constructor(e, t) {
|
|
7632
7632
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
7633
7633
|
}
|
|
7634
7634
|
prepareDeltaResult(e) {
|
|
7635
7635
|
var t, n, r, i;
|
|
7636
7636
|
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)) {
|
|
7637
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
7637
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : Vd;
|
|
7638
7638
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
7639
7639
|
}
|
|
7640
7640
|
return e;
|
|
@@ -7642,15 +7642,15 @@ var Hd = (e) => e[e.length - 1], Ud = class {
|
|
|
7642
7642
|
setResult(e) {
|
|
7643
7643
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
7644
7644
|
}
|
|
7645
|
-
},
|
|
7645
|
+
}, Kd = class extends Wd {
|
|
7646
7646
|
constructor(e, t) {
|
|
7647
7647
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
7648
7648
|
}
|
|
7649
|
-
},
|
|
7649
|
+
}, qd = class extends Wd {
|
|
7650
7650
|
constructor(e) {
|
|
7651
7651
|
super(), this.delta = e, this.pipe = "reverse";
|
|
7652
7652
|
}
|
|
7653
|
-
},
|
|
7653
|
+
}, Jd = class {
|
|
7654
7654
|
constructor(e) {
|
|
7655
7655
|
this.name = e, this.filters = [];
|
|
7656
7656
|
}
|
|
@@ -7714,7 +7714,7 @@ var Hd = (e) => e[e.length - 1], Ud = class {
|
|
|
7714
7714
|
}
|
|
7715
7715
|
}), this);
|
|
7716
7716
|
}
|
|
7717
|
-
},
|
|
7717
|
+
}, Yd = class {
|
|
7718
7718
|
constructor(e) {
|
|
7719
7719
|
this.selfOptions = e || {}, this.pipes = {};
|
|
7720
7720
|
}
|
|
@@ -7741,7 +7741,7 @@ var Hd = (e) => e[e.length - 1], Ud = class {
|
|
|
7741
7741
|
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);
|
|
7742
7742
|
return n.hasResult ? n.result : void 0;
|
|
7743
7743
|
}
|
|
7744
|
-
},
|
|
7744
|
+
}, Xd = (e, t, n, r) => e[n] === t[r], Zd = (e, t, n, r) => {
|
|
7745
7745
|
var i, a, o;
|
|
7746
7746
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
7747
7747
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -7757,7 +7757,7 @@ var Hd = (e) => e[e.length - 1], Ud = class {
|
|
|
7757
7757
|
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);
|
|
7758
7758
|
}
|
|
7759
7759
|
return d;
|
|
7760
|
-
},
|
|
7760
|
+
}, Qd = (e, t, n, r) => {
|
|
7761
7761
|
let i = t.length, a = n.length, o = {
|
|
7762
7762
|
sequence: [],
|
|
7763
7763
|
indices1: [],
|
|
@@ -7779,11 +7779,11 @@ var Hd = (e) => e[e.length - 1], Ud = class {
|
|
|
7779
7779
|
}
|
|
7780
7780
|
}
|
|
7781
7781
|
return o;
|
|
7782
|
-
},
|
|
7782
|
+
}, $d = { get: (e, t, n, r) => {
|
|
7783
7783
|
let i = r || {};
|
|
7784
|
-
return Zd(
|
|
7785
|
-
} },
|
|
7786
|
-
function
|
|
7784
|
+
return Qd(Zd(e, t, n || Xd, i), e, t, i);
|
|
7785
|
+
} }, ef = 3;
|
|
7786
|
+
function tf(e, t, n, r) {
|
|
7787
7787
|
for (let i = 0; i < n; i++) {
|
|
7788
7788
|
let n = e[i];
|
|
7789
7789
|
for (let e = 0; e < r; e++) {
|
|
@@ -7793,7 +7793,7 @@ function ef(e, t, n, r) {
|
|
|
7793
7793
|
}
|
|
7794
7794
|
return !1;
|
|
7795
7795
|
}
|
|
7796
|
-
function
|
|
7796
|
+
function nf(e, t, n, r, i) {
|
|
7797
7797
|
let a = e[n], o = t[r];
|
|
7798
7798
|
if (a === o) return !0;
|
|
7799
7799
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -7806,15 +7806,15 @@ function tf(e, t, n, r, i) {
|
|
|
7806
7806
|
let l = i.hashCache2[r];
|
|
7807
7807
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l === void 0 ? !1 : c === l;
|
|
7808
7808
|
}
|
|
7809
|
-
var
|
|
7809
|
+
var rf = function(e) {
|
|
7810
7810
|
var t, n, r, i, a;
|
|
7811
7811
|
if (!e.leftIsArray) return;
|
|
7812
7812
|
let o = {
|
|
7813
7813
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
7814
7814
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
7815
7815
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
7816
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !
|
|
7817
|
-
for (; c + s < m && c + s < h &&
|
|
7816
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !tf(f, p, m, h)); s < m && s < h && nf(f, p, s, s, o);) l = s, g = new Gd(f[l], p[l]), e.push(g, l), s++;
|
|
7817
|
+
for (; c + s < m && c + s < h && nf(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new Gd(f[u], p[d]), e.push(g, d), c++;
|
|
7818
7818
|
let _;
|
|
7819
7819
|
if (s + c === m) {
|
|
7820
7820
|
if (m === h) {
|
|
@@ -7838,7 +7838,7 @@ var nf = function(e) {
|
|
|
7838
7838
|
return;
|
|
7839
7839
|
}
|
|
7840
7840
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
7841
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
7841
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = $d.get(v, y, nf, o), x = [];
|
|
7842
7842
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
7843
7843
|
let t = `_${l}`;
|
|
7844
7844
|
_[t] = [
|
|
@@ -7859,8 +7859,8 @@ var nf = function(e) {
|
|
|
7859
7859
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
7860
7860
|
u = x[n];
|
|
7861
7861
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
7862
|
-
if (u !== void 0 && r &&
|
|
7863
|
-
r.splice(1, 2, l,
|
|
7862
|
+
if (u !== void 0 && r && nf(v, y, u - s, l - s, o)) {
|
|
7863
|
+
r.splice(1, 2, l, ef), r.splice(1, 2, l, ef), C || (r[0] = ""), d = l, g = new Gd(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
7864
7864
|
break;
|
|
7865
7865
|
}
|
|
7866
7866
|
}
|
|
@@ -7868,20 +7868,20 @@ var nf = function(e) {
|
|
|
7868
7868
|
} else {
|
|
7869
7869
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
7870
7870
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
7871
|
-
d = b.indices2[t] + s, g = new
|
|
7871
|
+
d = b.indices2[t] + s, g = new Gd(f[u], p[d]), e.push(g, d);
|
|
7872
7872
|
}
|
|
7873
7873
|
}
|
|
7874
7874
|
e.setResult(_).exit();
|
|
7875
7875
|
};
|
|
7876
|
-
|
|
7877
|
-
var
|
|
7876
|
+
rf.filterName = "arrays";
|
|
7877
|
+
var af = {
|
|
7878
7878
|
numerically(e, t) {
|
|
7879
7879
|
return e - t;
|
|
7880
7880
|
},
|
|
7881
7881
|
numericallyBy(e) {
|
|
7882
7882
|
return (t, n) => t[e] - n[e];
|
|
7883
7883
|
}
|
|
7884
|
-
},
|
|
7884
|
+
}, of = function(e) {
|
|
7885
7885
|
var t;
|
|
7886
7886
|
if (!e.nested) return;
|
|
7887
7887
|
let n = e.delta;
|
|
@@ -7889,7 +7889,7 @@ var rf = {
|
|
|
7889
7889
|
let r, i, a = n, o = e.left, s = [], c = [], l = [];
|
|
7890
7890
|
for (r in a) if (r !== "_t") if (r[0] === "_") {
|
|
7891
7891
|
let e = r;
|
|
7892
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
7892
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === ef)) s.push(Number.parseInt(r.slice(1), 10));
|
|
7893
7893
|
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]}`);
|
|
7894
7894
|
} else {
|
|
7895
7895
|
let e = r;
|
|
@@ -7901,15 +7901,15 @@ var rf = {
|
|
|
7901
7901
|
delta: a[e]
|
|
7902
7902
|
});
|
|
7903
7903
|
}
|
|
7904
|
-
for (s = s.sort(
|
|
7904
|
+
for (s = s.sort(af.numerically), r = s.length - 1; r >= 0; r--) {
|
|
7905
7905
|
if (i = s[r], i === void 0) continue;
|
|
7906
7906
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
7907
|
-
(e == null ? void 0 : e[2]) ===
|
|
7907
|
+
(e == null ? void 0 : e[2]) === ef && c.push({
|
|
7908
7908
|
index: e[1],
|
|
7909
7909
|
value: t
|
|
7910
7910
|
});
|
|
7911
7911
|
}
|
|
7912
|
-
c = c.sort(
|
|
7912
|
+
c = c.sort(af.numericallyBy("index"));
|
|
7913
7913
|
let u = c.length;
|
|
7914
7914
|
for (r = 0; r < u; r++) {
|
|
7915
7915
|
let e = c[r];
|
|
@@ -7919,7 +7919,7 @@ var rf = {
|
|
|
7919
7919
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
7920
7920
|
let t = l[r];
|
|
7921
7921
|
if (t === void 0) continue;
|
|
7922
|
-
let n = new
|
|
7922
|
+
let n = new Kd(o[t.index], t.delta);
|
|
7923
7923
|
e.push(n, t.index);
|
|
7924
7924
|
}
|
|
7925
7925
|
if (!e.children) {
|
|
@@ -7928,8 +7928,8 @@ var rf = {
|
|
|
7928
7928
|
}
|
|
7929
7929
|
e.exit();
|
|
7930
7930
|
};
|
|
7931
|
-
|
|
7932
|
-
var
|
|
7931
|
+
of.filterName = "arrays";
|
|
7932
|
+
var sf = function(e) {
|
|
7933
7933
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
7934
7934
|
let t = e.left, n = e.children.length;
|
|
7935
7935
|
for (let r = 0; r < n; r++) {
|
|
@@ -7940,16 +7940,16 @@ var of = function(e) {
|
|
|
7940
7940
|
}
|
|
7941
7941
|
e.setResult(t).exit();
|
|
7942
7942
|
};
|
|
7943
|
-
|
|
7944
|
-
var
|
|
7943
|
+
sf.filterName = "arraysCollectChildren";
|
|
7944
|
+
var cf = function(e) {
|
|
7945
7945
|
if (!e.nested) {
|
|
7946
7946
|
let t = e.delta;
|
|
7947
|
-
if (t[2] ===
|
|
7947
|
+
if (t[2] === ef) {
|
|
7948
7948
|
let n = t;
|
|
7949
7949
|
e.newName = `_${n[1]}`, e.setResult([
|
|
7950
7950
|
n[0],
|
|
7951
7951
|
Number.parseInt(e.childName.substring(1), 10),
|
|
7952
|
-
|
|
7952
|
+
ef
|
|
7953
7953
|
]).exit();
|
|
7954
7954
|
}
|
|
7955
7955
|
return;
|
|
@@ -7959,26 +7959,26 @@ var sf = function(e) {
|
|
|
7959
7959
|
let n = t;
|
|
7960
7960
|
for (let t in n) {
|
|
7961
7961
|
if (t === "_t") continue;
|
|
7962
|
-
let r = new
|
|
7962
|
+
let r = new qd(n[t]);
|
|
7963
7963
|
e.push(r, t);
|
|
7964
7964
|
}
|
|
7965
7965
|
e.exit();
|
|
7966
7966
|
};
|
|
7967
|
-
|
|
7968
|
-
var
|
|
7967
|
+
cf.filterName = "arrays";
|
|
7968
|
+
var lf = (e, t, n) => {
|
|
7969
7969
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
7970
7970
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
7971
7971
|
let r = +t;
|
|
7972
7972
|
for (let n in e) {
|
|
7973
7973
|
let i = e[n];
|
|
7974
|
-
if (Array.isArray(i)) if (i[2] ===
|
|
7974
|
+
if (Array.isArray(i)) if (i[2] === ef) {
|
|
7975
7975
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
7976
7976
|
if (a === +t) return e;
|
|
7977
7977
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
7978
7978
|
} else i[2] === 0 ? Number.parseInt(n.substring(1), 10) <= r && r++ : i.length === 1 && Number.parseInt(n, 10) <= r && r--;
|
|
7979
7979
|
}
|
|
7980
7980
|
return r;
|
|
7981
|
-
},
|
|
7981
|
+
}, uf = (e) => {
|
|
7982
7982
|
if (!e || !e.children) return;
|
|
7983
7983
|
let t = e.delta;
|
|
7984
7984
|
if (t._t !== "a") return;
|
|
@@ -7989,22 +7989,22 @@ var cf = (e, t, n) => {
|
|
|
7989
7989
|
let a = r.newName;
|
|
7990
7990
|
if (a === void 0) {
|
|
7991
7991
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
7992
|
-
a =
|
|
7992
|
+
a = lf(n, r.childName, r.result);
|
|
7993
7993
|
}
|
|
7994
7994
|
i[a] !== r.result && (i[a] = r.result);
|
|
7995
7995
|
}
|
|
7996
7996
|
e.setResult(i).exit();
|
|
7997
7997
|
};
|
|
7998
|
-
|
|
7998
|
+
uf.filterName = "arraysCollectChildren";
|
|
7999
7999
|
//#endregion
|
|
8000
8000
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
8001
|
-
var
|
|
8001
|
+
var df = function(e) {
|
|
8002
8002
|
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();
|
|
8003
8003
|
};
|
|
8004
|
-
|
|
8004
|
+
df.filterName = "dates";
|
|
8005
8005
|
//#endregion
|
|
8006
8006
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
8007
|
-
var
|
|
8007
|
+
var ff = new Set(["__proto__"]), pf = (e) => {
|
|
8008
8008
|
if (!e || !e.children) return;
|
|
8009
8009
|
let t = e.children.length, n = e.result;
|
|
8010
8010
|
for (let r = 0; r < t; r++) {
|
|
@@ -8016,18 +8016,18 @@ var df = new Set(["__proto__"]), ff = (e) => {
|
|
|
8016
8016
|
}
|
|
8017
8017
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
8018
8018
|
};
|
|
8019
|
-
|
|
8020
|
-
var
|
|
8019
|
+
pf.filterName = "collectChildren";
|
|
8020
|
+
var mf = (e) => {
|
|
8021
8021
|
var t;
|
|
8022
8022
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
8023
8023
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
8024
8024
|
for (let t in n) {
|
|
8025
8025
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
8026
|
-
let a = new
|
|
8026
|
+
let a = new Gd(n[t], r[t]);
|
|
8027
8027
|
e.push(a, t);
|
|
8028
8028
|
}
|
|
8029
8029
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
8030
|
-
let n = new
|
|
8030
|
+
let n = new Gd(void 0, r[t]);
|
|
8031
8031
|
e.push(n, t);
|
|
8032
8032
|
}
|
|
8033
8033
|
if (!e.children || e.children.length === 0) {
|
|
@@ -8036,15 +8036,15 @@ var pf = (e) => {
|
|
|
8036
8036
|
}
|
|
8037
8037
|
e.exit();
|
|
8038
8038
|
};
|
|
8039
|
-
|
|
8040
|
-
var
|
|
8039
|
+
mf.filterName = "objects";
|
|
8040
|
+
var hf = function(e) {
|
|
8041
8041
|
if (!e.nested) return;
|
|
8042
8042
|
let t = e.delta;
|
|
8043
8043
|
if (t._t) return;
|
|
8044
8044
|
let n = t, r = !1;
|
|
8045
8045
|
for (let t in n) {
|
|
8046
|
-
if (
|
|
8047
|
-
let i = e.left, a = new
|
|
8046
|
+
if (ff.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
8047
|
+
let i = e.left, a = new Kd(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
8048
8048
|
e.push(a, t), r = !0;
|
|
8049
8049
|
}
|
|
8050
8050
|
if (!r) {
|
|
@@ -8053,8 +8053,8 @@ var mf = function(e) {
|
|
|
8053
8053
|
}
|
|
8054
8054
|
e.exit();
|
|
8055
8055
|
};
|
|
8056
|
-
|
|
8057
|
-
var
|
|
8056
|
+
hf.filterName = "objects";
|
|
8057
|
+
var gf = function(e) {
|
|
8058
8058
|
if (!e || !e.children || e.delta._t) return;
|
|
8059
8059
|
if (e.left === null || typeof e.left != "object") {
|
|
8060
8060
|
e.setResult(e.left).exit();
|
|
@@ -8065,17 +8065,17 @@ var hf = function(e) {
|
|
|
8065
8065
|
let n = e.children[r];
|
|
8066
8066
|
if (n === void 0) continue;
|
|
8067
8067
|
let i = n.childName;
|
|
8068
|
-
|
|
8068
|
+
ff.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
8069
8069
|
}
|
|
8070
8070
|
e.setResult(t).exit();
|
|
8071
8071
|
};
|
|
8072
|
-
|
|
8073
|
-
var
|
|
8072
|
+
gf.filterName = "collectChildren";
|
|
8073
|
+
var _f = function(e) {
|
|
8074
8074
|
if (!e.nested || e.delta._t) return;
|
|
8075
8075
|
let t = e.delta, n = !1;
|
|
8076
8076
|
for (let r in t) {
|
|
8077
|
-
if (
|
|
8078
|
-
let i = new
|
|
8077
|
+
if (ff.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
8078
|
+
let i = new qd(t[r]);
|
|
8079
8079
|
e.push(i, r), n = !0;
|
|
8080
8080
|
}
|
|
8081
8081
|
if (!n) {
|
|
@@ -8084,25 +8084,25 @@ var gf = function(e) {
|
|
|
8084
8084
|
}
|
|
8085
8085
|
e.exit();
|
|
8086
8086
|
};
|
|
8087
|
-
|
|
8088
|
-
var
|
|
8087
|
+
_f.filterName = "objects";
|
|
8088
|
+
var vf = (e) => {
|
|
8089
8089
|
if (!e || !e.children || e.delta._t) return;
|
|
8090
8090
|
let t = e.children.length, n = {};
|
|
8091
8091
|
for (let r = 0; r < t; r++) {
|
|
8092
8092
|
let t = e.children[r];
|
|
8093
8093
|
if (t === void 0) continue;
|
|
8094
8094
|
let i = t.childName;
|
|
8095
|
-
|
|
8095
|
+
ff.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
8096
8096
|
}
|
|
8097
8097
|
e.setResult(n).exit();
|
|
8098
8098
|
};
|
|
8099
|
-
|
|
8099
|
+
vf.filterName = "collectChildren";
|
|
8100
8100
|
//#endregion
|
|
8101
8101
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
8102
|
-
var
|
|
8103
|
-
function
|
|
8102
|
+
var yf = 2, bf = 60, xf = null;
|
|
8103
|
+
function Sf(e, t) {
|
|
8104
8104
|
var n;
|
|
8105
|
-
if (!
|
|
8105
|
+
if (!xf) {
|
|
8106
8106
|
let r;
|
|
8107
8107
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
8108
8108
|
else {
|
|
@@ -8110,7 +8110,7 @@ function xf(e, t) {
|
|
|
8110
8110
|
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.");
|
|
8111
8111
|
throw e.diff_match_patch_not_found = !0, e;
|
|
8112
8112
|
}
|
|
8113
|
-
|
|
8113
|
+
xf = {
|
|
8114
8114
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
8115
8115
|
patch: (e, t) => {
|
|
8116
8116
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -8122,17 +8122,17 @@ function xf(e, t) {
|
|
|
8122
8122
|
}
|
|
8123
8123
|
};
|
|
8124
8124
|
}
|
|
8125
|
-
return
|
|
8125
|
+
return xf;
|
|
8126
8126
|
}
|
|
8127
|
-
var
|
|
8127
|
+
var Cf = function(e) {
|
|
8128
8128
|
var t, n;
|
|
8129
8129
|
if (e.leftType !== "string") return;
|
|
8130
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
8130
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || bf;
|
|
8131
8131
|
if (r.length < a || i.length < a) {
|
|
8132
8132
|
e.setResult([r, i]).exit();
|
|
8133
8133
|
return;
|
|
8134
8134
|
}
|
|
8135
|
-
let o =
|
|
8135
|
+
let o = Sf(e.options);
|
|
8136
8136
|
if (!o) {
|
|
8137
8137
|
e.setResult([r, i]).exit();
|
|
8138
8138
|
return;
|
|
@@ -8141,19 +8141,19 @@ var Sf = function(e) {
|
|
|
8141
8141
|
e.setResult([
|
|
8142
8142
|
s(r, i),
|
|
8143
8143
|
0,
|
|
8144
|
-
|
|
8144
|
+
yf
|
|
8145
8145
|
]).exit();
|
|
8146
8146
|
};
|
|
8147
|
-
|
|
8148
|
-
var
|
|
8147
|
+
Cf.filterName = "texts";
|
|
8148
|
+
var wf = function(e) {
|
|
8149
8149
|
if (e.nested) return;
|
|
8150
8150
|
let t = e.delta;
|
|
8151
|
-
if (t[2] !==
|
|
8152
|
-
let n = t, r =
|
|
8151
|
+
if (t[2] !== yf) return;
|
|
8152
|
+
let n = t, r = Sf(e.options, !0).patch;
|
|
8153
8153
|
e.setResult(r(e.left, n[0])).exit();
|
|
8154
8154
|
};
|
|
8155
|
-
|
|
8156
|
-
var
|
|
8155
|
+
wf.filterName = "texts";
|
|
8156
|
+
var Tf = (e) => {
|
|
8157
8157
|
var t, n, r;
|
|
8158
8158
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
8159
8159
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -8174,21 +8174,21 @@ var wf = (e) => {
|
|
|
8174
8174
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
8175
8175
|
}
|
|
8176
8176
|
return a.join("\n");
|
|
8177
|
-
},
|
|
8177
|
+
}, Ef = function(e) {
|
|
8178
8178
|
if (e.nested) return;
|
|
8179
8179
|
let t = e.delta;
|
|
8180
|
-
if (t[2] !==
|
|
8180
|
+
if (t[2] !== yf) return;
|
|
8181
8181
|
let n = t;
|
|
8182
8182
|
e.setResult([
|
|
8183
|
-
|
|
8183
|
+
Tf(n[0]),
|
|
8184
8184
|
0,
|
|
8185
|
-
|
|
8185
|
+
yf
|
|
8186
8186
|
]).exit();
|
|
8187
8187
|
};
|
|
8188
|
-
|
|
8188
|
+
Ef.filterName = "texts";
|
|
8189
8189
|
//#endregion
|
|
8190
8190
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
8191
|
-
var
|
|
8191
|
+
var Df = function(e) {
|
|
8192
8192
|
if (e.left === e.right) {
|
|
8193
8193
|
e.setResult(void 0).exit();
|
|
8194
8194
|
return;
|
|
@@ -8221,8 +8221,8 @@ var Ef = function(e) {
|
|
|
8221
8221
|
}
|
|
8222
8222
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
8223
8223
|
};
|
|
8224
|
-
|
|
8225
|
-
var
|
|
8224
|
+
Df.filterName = "trivial";
|
|
8225
|
+
var Of = function(e) {
|
|
8226
8226
|
if (e.delta === void 0) {
|
|
8227
8227
|
e.setResult(e.left).exit();
|
|
8228
8228
|
return;
|
|
@@ -8246,8 +8246,8 @@ var Df = function(e) {
|
|
|
8246
8246
|
}
|
|
8247
8247
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
8248
8248
|
};
|
|
8249
|
-
|
|
8250
|
-
var
|
|
8249
|
+
Of.filterName = "trivial";
|
|
8250
|
+
var kf = function(e) {
|
|
8251
8251
|
if (e.delta === void 0) {
|
|
8252
8252
|
e.setResult(e.delta).exit();
|
|
8253
8253
|
return;
|
|
@@ -8268,36 +8268,36 @@ var Of = function(e) {
|
|
|
8268
8268
|
}
|
|
8269
8269
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
8270
8270
|
};
|
|
8271
|
-
|
|
8271
|
+
kf.filterName = "trivial";
|
|
8272
8272
|
//#endregion
|
|
8273
8273
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
8274
|
-
var
|
|
8274
|
+
var Af = class {
|
|
8275
8275
|
constructor(e) {
|
|
8276
|
-
this.processor = new
|
|
8276
|
+
this.processor = new Yd(e), this.processor.pipe(new Jd("diff").append(pf, Df, df, Cf, mf, rf).shouldHaveResult()), this.processor.pipe(new Jd("patch").append(gf, sf, Of, wf, hf, of).shouldHaveResult()), this.processor.pipe(new Jd("reverse").append(vf, uf, kf, Ef, _f, cf).shouldHaveResult());
|
|
8277
8277
|
}
|
|
8278
8278
|
options(e) {
|
|
8279
8279
|
return this.processor.options(e);
|
|
8280
8280
|
}
|
|
8281
8281
|
diff(e, t) {
|
|
8282
|
-
return this.processor.process(new
|
|
8282
|
+
return this.processor.process(new Gd(e, t));
|
|
8283
8283
|
}
|
|
8284
8284
|
patch(e, t) {
|
|
8285
|
-
return this.processor.process(new
|
|
8285
|
+
return this.processor.process(new Kd(e, t));
|
|
8286
8286
|
}
|
|
8287
8287
|
reverse(e) {
|
|
8288
|
-
return this.processor.process(new
|
|
8288
|
+
return this.processor.process(new qd(e));
|
|
8289
8289
|
}
|
|
8290
8290
|
unpatch(e, t) {
|
|
8291
8291
|
return this.patch(e, this.reverse(t));
|
|
8292
8292
|
}
|
|
8293
8293
|
clone(e) {
|
|
8294
|
-
return
|
|
8294
|
+
return Vd(e);
|
|
8295
8295
|
}
|
|
8296
8296
|
};
|
|
8297
8297
|
//#endregion
|
|
8298
8298
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
8299
|
-
function
|
|
8300
|
-
return new
|
|
8299
|
+
function jf(e) {
|
|
8300
|
+
return new Af(e);
|
|
8301
8301
|
}
|
|
8302
8302
|
//#endregion
|
|
8303
8303
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -8870,46 +8870,46 @@ $.Diff = function(e, t) {
|
|
|
8870
8870
|
};
|
|
8871
8871
|
//#endregion
|
|
8872
8872
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
8873
|
-
var
|
|
8873
|
+
var Mf = (e = {}) => jf({
|
|
8874
8874
|
...e,
|
|
8875
8875
|
textDiff: {
|
|
8876
8876
|
diffMatchPatch: $,
|
|
8877
8877
|
minLength: 120
|
|
8878
8878
|
},
|
|
8879
8879
|
cloneDiffValues: !0
|
|
8880
|
-
}),
|
|
8880
|
+
}), Nf = ["user", "unittemplate"], Pf = Mf(), Ff = (e, t, n) => {
|
|
8881
8881
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
8882
8882
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
8883
8883
|
let n = r[t[e]];
|
|
8884
8884
|
if (n) return n;
|
|
8885
8885
|
}
|
|
8886
8886
|
return n || "";
|
|
8887
|
-
},
|
|
8887
|
+
}, If = (e) => {
|
|
8888
8888
|
let t = (e) => Nn(e) ? Gn(e) : String(e);
|
|
8889
8889
|
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);
|
|
8890
|
-
},
|
|
8890
|
+
}, Lf = (e) => {
|
|
8891
8891
|
switch (e.length) {
|
|
8892
8892
|
case 1: {
|
|
8893
8893
|
let [t] = e;
|
|
8894
8894
|
return {
|
|
8895
8895
|
type: "created",
|
|
8896
8896
|
before: "",
|
|
8897
|
-
after:
|
|
8897
|
+
after: If(t)
|
|
8898
8898
|
};
|
|
8899
8899
|
}
|
|
8900
8900
|
case 2: {
|
|
8901
8901
|
let [t, n] = e;
|
|
8902
8902
|
return {
|
|
8903
8903
|
type: "modified",
|
|
8904
|
-
before:
|
|
8905
|
-
after:
|
|
8904
|
+
before: If(t),
|
|
8905
|
+
after: If(n)
|
|
8906
8906
|
};
|
|
8907
8907
|
}
|
|
8908
8908
|
case 3: {
|
|
8909
8909
|
let [t] = e;
|
|
8910
8910
|
return {
|
|
8911
8911
|
type: "deleted",
|
|
8912
|
-
before:
|
|
8912
|
+
before: If(t),
|
|
8913
8913
|
after: ""
|
|
8914
8914
|
};
|
|
8915
8915
|
}
|
|
@@ -8919,15 +8919,15 @@ var jf = (e = {}) => Af({
|
|
|
8919
8919
|
after: ""
|
|
8920
8920
|
};
|
|
8921
8921
|
}
|
|
8922
|
-
},
|
|
8923
|
-
let r =
|
|
8922
|
+
}, Rf = (e) => Array.isArray(e), zf = (e, t) => t ? Rf(t) ? t.length === 0 ? e : t.reduce((e, t) => Pf.unpatch(Xt(e), Xt(t)), Xt(e)) : Pf.unpatch(Xt(e), Xt(t)) : e, Bf = (e) => e.createdAt || e.date, Vf = (e, t, n) => {
|
|
8923
|
+
let r = Bf(e);
|
|
8924
8924
|
if (!r) return {
|
|
8925
8925
|
oldJson: "",
|
|
8926
8926
|
newJson: "",
|
|
8927
8927
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
8928
8928
|
};
|
|
8929
8929
|
let i = t.filter((e) => {
|
|
8930
|
-
let t =
|
|
8930
|
+
let t = Bf(e);
|
|
8931
8931
|
return !!(e.diffs && t && t >= r);
|
|
8932
8932
|
}), a = Array.from({ length: i.length + 1 });
|
|
8933
8933
|
a[0] = Xt(n);
|
|
@@ -8940,7 +8940,7 @@ var jf = (e = {}) => Af({
|
|
|
8940
8940
|
a[e + 1] = a[e];
|
|
8941
8941
|
continue;
|
|
8942
8942
|
}
|
|
8943
|
-
a[e + 1] =
|
|
8943
|
+
a[e + 1] = zf(a[e], t);
|
|
8944
8944
|
}
|
|
8945
8945
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
8946
8946
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -8955,10 +8955,10 @@ var jf = (e = {}) => Af({
|
|
|
8955
8955
|
oldJson: o,
|
|
8956
8956
|
newJson: s
|
|
8957
8957
|
};
|
|
8958
|
-
},
|
|
8958
|
+
}, Hf = (e, t, n = {}, r = []) => {
|
|
8959
8959
|
var i;
|
|
8960
8960
|
if (!e) return;
|
|
8961
|
-
let a = [...
|
|
8961
|
+
let a = [...Nf, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
8962
8962
|
Object.keys(e).forEach((i) => {
|
|
8963
8963
|
var o;
|
|
8964
8964
|
let s = e[i];
|
|
@@ -8971,12 +8971,12 @@ var jf = (e = {}) => Af({
|
|
|
8971
8971
|
tn(s) ? t.push({
|
|
8972
8972
|
deltaFormat: [...s],
|
|
8973
8973
|
path: c
|
|
8974
|
-
}) : ln(s) &&
|
|
8974
|
+
}) : ln(s) && Hf(s, t, n, c);
|
|
8975
8975
|
});
|
|
8976
|
-
},
|
|
8976
|
+
}, Uf = (e, t = {}) => {
|
|
8977
8977
|
let n = [];
|
|
8978
|
-
return e ? (
|
|
8979
|
-
},
|
|
8978
|
+
return e ? (Hf(e, n, t), n) : [];
|
|
8979
|
+
}, Wf = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), Gf = (e) => {
|
|
8980
8980
|
if (e == null || e === "") return "empty";
|
|
8981
8981
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
8982
8982
|
if (typeof e == "string") return e;
|
|
@@ -8987,32 +8987,32 @@ var jf = (e = {}) => Af({
|
|
|
8987
8987
|
} catch {
|
|
8988
8988
|
return String(e);
|
|
8989
8989
|
}
|
|
8990
|
-
},
|
|
8990
|
+
}, Kf = (e, t = e.length - 1) => {
|
|
8991
8991
|
if (t >= e.length) return "Value";
|
|
8992
8992
|
let n = e[t];
|
|
8993
|
-
return !n || An(n) ?
|
|
8994
|
-
},
|
|
8995
|
-
let o =
|
|
8993
|
+
return !n || An(n) ? Kf(e, t - 1) : Wf(n);
|
|
8994
|
+
}, qf = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
8995
|
+
let o = Gf(r), s = Gf(i), c = a ? ` in ${a}` : "";
|
|
8996
8996
|
switch (t) {
|
|
8997
8997
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
8998
8998
|
case "created": return `${e} created ${s}${c}.`;
|
|
8999
8999
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
9000
9000
|
default: return `${e} changed ${n}${c}.`;
|
|
9001
9001
|
}
|
|
9002
|
-
},
|
|
9002
|
+
}, Jf = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => /* @__PURE__ */ v(bc, { table: {
|
|
9003
9003
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
9004
9004
|
rows: n.map((n) => {
|
|
9005
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
9006
|
-
return { cells: [{ value:
|
|
9005
|
+
let { deltaFormat: i, path: a } = n, o = Ff(e, a, r), { type: s, before: c, after: l } = Lf(i);
|
|
9006
|
+
return { cells: [{ value: qf({
|
|
9007
9007
|
userName: t,
|
|
9008
9008
|
type: s,
|
|
9009
|
-
property:
|
|
9009
|
+
property: Kf(a),
|
|
9010
9010
|
before: c,
|
|
9011
9011
|
after: l,
|
|
9012
9012
|
sectionName: o
|
|
9013
9013
|
}) }] };
|
|
9014
9014
|
})
|
|
9015
|
-
} }),
|
|
9015
|
+
} }), Yf = Object.freeze({
|
|
9016
9016
|
summary: {
|
|
9017
9017
|
label: "Summary",
|
|
9018
9018
|
value: "summary"
|
|
@@ -9021,33 +9021,33 @@ var jf = (e = {}) => Af({
|
|
|
9021
9021
|
label: "Compare",
|
|
9022
9022
|
value: "compare"
|
|
9023
9023
|
}
|
|
9024
|
-
}),
|
|
9025
|
-
let c = [
|
|
9024
|
+
}), Xf = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
9025
|
+
let c = [Yf.summary, Yf.compare].map(({ label: e, value: t }) => ({
|
|
9026
9026
|
label: e,
|
|
9027
9027
|
value: t
|
|
9028
9028
|
})), [l, u] = m(c[0]), { diffs: d = void 0 } = e || {};
|
|
9029
9029
|
if (!d) return null;
|
|
9030
|
-
let { oldJson: f, newJson: p, error: h } =
|
|
9030
|
+
let { oldJson: f, newJson: p, error: h } = Vf(e, t, n);
|
|
9031
9031
|
return /* @__PURE__ */ v(Ka, {
|
|
9032
9032
|
visible: r,
|
|
9033
9033
|
centered: !0,
|
|
9034
9034
|
children: /* @__PURE__ */ v(Sa, { dialog: {
|
|
9035
9035
|
scroll: !0,
|
|
9036
9036
|
heading: "Comparison view",
|
|
9037
|
-
content: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(
|
|
9037
|
+
content: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(Au, {
|
|
9038
9038
|
name: "ViewTab",
|
|
9039
9039
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
9040
9040
|
options: c,
|
|
9041
9041
|
value: l
|
|
9042
|
-
}), l.value === "summary" ? /* @__PURE__ */ v(
|
|
9042
|
+
}), l.value === "summary" ? /* @__PURE__ */ v(Jf, {
|
|
9043
9043
|
userName: e.userName,
|
|
9044
9044
|
sectionNames: a,
|
|
9045
|
-
diffs:
|
|
9045
|
+
diffs: Uf(d, i),
|
|
9046
9046
|
defaultSectionName: o
|
|
9047
9047
|
}) : h ? /* @__PURE__ */ v("div", {
|
|
9048
9048
|
style: { padding: 16 },
|
|
9049
9049
|
children: h
|
|
9050
|
-
}) : /* @__PURE__ */ v(
|
|
9050
|
+
}) : /* @__PURE__ */ v(Rd, {
|
|
9051
9051
|
oldJson: f,
|
|
9052
9052
|
newJson: p
|
|
9053
9053
|
})] }),
|
|
@@ -9060,7 +9060,7 @@ var jf = (e = {}) => Af({
|
|
|
9060
9060
|
height: "90vh"
|
|
9061
9061
|
} })
|
|
9062
9062
|
});
|
|
9063
|
-
},
|
|
9063
|
+
}, Zf = [
|
|
9064
9064
|
{
|
|
9065
9065
|
label: "10 / page",
|
|
9066
9066
|
value: 10
|
|
@@ -9073,8 +9073,8 @@ var jf = (e = {}) => Af({
|
|
|
9073
9073
|
label: "50 / page",
|
|
9074
9074
|
value: 50
|
|
9075
9075
|
}
|
|
9076
|
-
],
|
|
9077
|
-
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s =
|
|
9076
|
+
], Qf = (e, t = {}) => {
|
|
9077
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = Uf(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
9078
9078
|
if (i === "API") return a === "Created" ? "Created through API" : "Changed through API";
|
|
9079
9079
|
switch (a) {
|
|
9080
9080
|
case "Created": return `Created by ${r}`;
|
|
@@ -9084,7 +9084,7 @@ var jf = (e = {}) => Af({
|
|
|
9084
9084
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
9085
9085
|
default: return `Change by ${r}`;
|
|
9086
9086
|
}
|
|
9087
|
-
},
|
|
9087
|
+
}, $f = ({ 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 }) => {
|
|
9088
9088
|
let [b, x] = m(!1), [S, C] = m(null), w = (e) => {
|
|
9089
9089
|
if (e.snapshot) {
|
|
9090
9090
|
f == null || f(e.snapshot, e);
|
|
@@ -9103,7 +9103,7 @@ var jf = (e = {}) => Af({
|
|
|
9103
9103
|
return {
|
|
9104
9104
|
cells: [
|
|
9105
9105
|
{
|
|
9106
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
9106
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : Qf(e, l),
|
|
9107
9107
|
type: "Link",
|
|
9108
9108
|
disabled: n,
|
|
9109
9109
|
onClick: n ? void 0 : () => w(e),
|
|
@@ -9122,8 +9122,8 @@ var jf = (e = {}) => Af({
|
|
|
9122
9122
|
type: "Static"
|
|
9123
9123
|
},
|
|
9124
9124
|
{
|
|
9125
|
-
value:
|
|
9126
|
-
date:
|
|
9125
|
+
value: zd({
|
|
9126
|
+
date: Bf(e),
|
|
9127
9127
|
showTime: !0
|
|
9128
9128
|
}),
|
|
9129
9129
|
type: "Static"
|
|
@@ -9133,12 +9133,12 @@ var jf = (e = {}) => Af({
|
|
|
9133
9133
|
};
|
|
9134
9134
|
});
|
|
9135
9135
|
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(na, {
|
|
9136
|
-
heading: /* @__PURE__ */ y(
|
|
9136
|
+
heading: /* @__PURE__ */ y(Pl, {
|
|
9137
9137
|
gap: !0,
|
|
9138
9138
|
wrap: !0,
|
|
9139
9139
|
children: [/* @__PURE__ */ v(ya, { children: "Changes" }), c.map((e) => {
|
|
9140
9140
|
var t;
|
|
9141
|
-
return /* @__PURE__ */ v(
|
|
9141
|
+
return /* @__PURE__ */ v(fl, {
|
|
9142
9142
|
small: (t = e.small) == null ? !0 : t,
|
|
9143
9143
|
checked: e.checked,
|
|
9144
9144
|
onChange: e.onChange,
|
|
@@ -9148,11 +9148,11 @@ var jf = (e = {}) => Af({
|
|
|
9148
9148
|
})]
|
|
9149
9149
|
}),
|
|
9150
9150
|
padding: !1,
|
|
9151
|
-
children: r ? /* @__PURE__ */ v(
|
|
9151
|
+
children: r ? /* @__PURE__ */ v(tu, {
|
|
9152
9152
|
height: "100px",
|
|
9153
9153
|
theme: Or.WHITE,
|
|
9154
9154
|
children: /* @__PURE__ */ v(mi, { dark: !0 })
|
|
9155
|
-
}) : /* @__PURE__ */ v(
|
|
9155
|
+
}) : /* @__PURE__ */ v(bc, { table: {
|
|
9156
9156
|
headers: T,
|
|
9157
9157
|
testId: "auditlog-table",
|
|
9158
9158
|
rows: E,
|
|
@@ -9166,14 +9166,14 @@ var jf = (e = {}) => Af({
|
|
|
9166
9166
|
onChange: (e) => {
|
|
9167
9167
|
u(Number(e.target.value));
|
|
9168
9168
|
},
|
|
9169
|
-
options:
|
|
9169
|
+
options: Zf,
|
|
9170
9170
|
value: a
|
|
9171
9171
|
},
|
|
9172
9172
|
onSelectPage: (e) => d(e),
|
|
9173
9173
|
small: !0
|
|
9174
9174
|
} }
|
|
9175
9175
|
} })
|
|
9176
|
-
}), b && S && S.diffs && /* @__PURE__ */ v(
|
|
9176
|
+
}), b && S && S.diffs && /* @__PURE__ */ v(Xf, {
|
|
9177
9177
|
sectionNames: o,
|
|
9178
9178
|
isOpen: b,
|
|
9179
9179
|
onClose: () => x(!1),
|
|
@@ -9183,7 +9183,7 @@ var jf = (e = {}) => Af({
|
|
|
9183
9183
|
data: t,
|
|
9184
9184
|
transformDiffsConfig: l
|
|
9185
9185
|
})] });
|
|
9186
|
-
},
|
|
9186
|
+
}, ep = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
9187
9187
|
let i = window.location.href, a = p(i);
|
|
9188
9188
|
return c(() => {
|
|
9189
9189
|
a.current = i;
|
|
@@ -9206,10 +9206,10 @@ var jf = (e = {}) => Af({
|
|
|
9206
9206
|
});
|
|
9207
9207
|
};
|
|
9208
9208
|
}, [e, t]), null;
|
|
9209
|
-
},
|
|
9210
|
-
|
|
9211
|
-
e ===
|
|
9209
|
+
}, tp = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, np = (e) => {
|
|
9210
|
+
Od(Cd.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
9211
|
+
e === Cd.Translations ? Od(e, Td(t)) : Od(e, tp(t) ? t : { ...t });
|
|
9212
9212
|
});
|
|
9213
9213
|
};
|
|
9214
9214
|
//#endregion
|
|
9215
|
-
export { qr as Accordion, fi as AccordionWithDefaultToggle, Ji as Actions, Tr as Align,
|
|
9215
|
+
export { qr as Accordion, fi as AccordionWithDefaultToggle, Ji as Actions, Tr as Align, $f 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, Rd as DiffViewer, H as DisabledContext, _a as Divider, ka as Drawer, Lu as ElementType, jc as Empty, Nl as Field, kl as FileButton, za as FileInput, Pl as Flex, Il as FormRow, Bl 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, jl as Label, $l as List, Hl as ListHeading, Jl as ListSubheading, tu 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, su as OptionDropdown, lu as Page, As as Pagination, Uu as PopConfirm, aa as Popover, Ha as Portal, du as PrintHeader, Ya as ProgressBar, fu as RadioButton, _u as RichTextInput, yu as Row, Cs as Select, Pd as SettingField, wu as SideBar, Eu as Skeleton, ec as Slider, eo as SmartUploadModal, Ba as Spacer, mi as Spinner, bc as Table, Ol as TableImportExport, Au as Tabs, ha as Text, Nu as TextArea, ju as TextLink, Dr as TextTransform, Or as Theme, cr as Toaster, fl as Toggle, W as Tooltip, Bu as TopBar, qu as Tree, rd as TreeTable, Cr as TriggerType, Sd as UnitInput, Md as UnitTable, ep as UsageTracker, ll as dismissToast, yd as initializeContext, np as initializeGuiLibrary, La as readFile, cl as toast, bo as useFocus, Va as useKeyboardEvent, Co as useWindowWidth };
|