@oliasoft-open-source/react-ui-library 6.5.1-beta-1 → 6.5.1-beta-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/table/row/row.d.ts.map +1 -1
- package/dist/index.js +610 -597
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3755,7 +3755,23 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3755
3755
|
testId: a
|
|
3756
3756
|
})
|
|
3757
3757
|
});
|
|
3758
|
-
}, hc = ({
|
|
3758
|
+
}, hc = ({ children: e, dropDisabled: t = !1, height: n, rowIndex: r }) => {
|
|
3759
|
+
let { attributes: i, listeners: a, setNodeRef: o, transform: s, transition: c, isDragging: l } = Yn({
|
|
3760
|
+
id: r.toString(),
|
|
3761
|
+
animateLayoutChanges: () => !1
|
|
3762
|
+
});
|
|
3763
|
+
return e({
|
|
3764
|
+
attributes: i,
|
|
3765
|
+
listeners: a,
|
|
3766
|
+
setNodeRef: o,
|
|
3767
|
+
style: {
|
|
3768
|
+
transform: t ? void 0 : Zn.Translate.toString(s),
|
|
3769
|
+
height: n,
|
|
3770
|
+
transition: c,
|
|
3771
|
+
opacity: l ? 0 : void 0
|
|
3772
|
+
}
|
|
3773
|
+
});
|
|
3774
|
+
}, gc = ({ 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
3775
|
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
3776
|
let i = `${+!n}_${t}_${r}`;
|
|
3761
3777
|
return /* @__PURE__ */ v(mc, {
|
|
@@ -3772,24 +3788,30 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3772
3788
|
actions: e.actions
|
|
3773
3789
|
},
|
|
3774
3790
|
isHeader: n
|
|
3775
|
-
}, r),
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
}
|
|
3784
|
-
|
|
3791
|
+
}, r), O = (t, n) => e.noDrag ? /* @__PURE__ */ v("td", { "aria-labelledby": "unique-label-id" }) : /* @__PURE__ */ v("td", {
|
|
3792
|
+
className: Is.dragIconCell,
|
|
3793
|
+
children: /* @__PURE__ */ v("div", {
|
|
3794
|
+
className: g(Is.dragIcon, u ? Is.dragIconDisabled : ""),
|
|
3795
|
+
...t,
|
|
3796
|
+
...n,
|
|
3797
|
+
children: /* @__PURE__ */ v(U, { icon: V.DRAG })
|
|
3798
|
+
})
|
|
3799
|
+
}), k = ({ attributes: e = {}, listeners: n, setNodeRef: r, style: a = { height: d } } = {}) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("tr", {
|
|
3800
|
+
ref: r,
|
|
3785
3801
|
onClick: m,
|
|
3786
3802
|
onMouseEnter: b,
|
|
3787
3803
|
onMouseLeave: x,
|
|
3788
3804
|
onFocus: h,
|
|
3805
|
+
className: g(m && !m.noStyle ? Is.clickableRow : null, b && !b.noStyle ? Is.hoverableRow : null, T ? Is.rowActive : null),
|
|
3806
|
+
"data-active": T || null,
|
|
3807
|
+
"data-error": C || null,
|
|
3808
|
+
"data-warning": w || null,
|
|
3809
|
+
"data-index": t,
|
|
3810
|
+
"data-even": t % 2 == 0,
|
|
3789
3811
|
"data-testid": f,
|
|
3790
|
-
|
|
3812
|
+
style: a,
|
|
3791
3813
|
children: [
|
|
3792
|
-
c ?
|
|
3814
|
+
c ? O(e, n) : null,
|
|
3793
3815
|
E,
|
|
3794
3816
|
D
|
|
3795
3817
|
]
|
|
@@ -3797,30 +3819,16 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3797
3819
|
colSpan: i,
|
|
3798
3820
|
flush: S.flush === !0,
|
|
3799
3821
|
children: S.content
|
|
3800
|
-
}, `${t}_expanded_content`) : null] })
|
|
3801
|
-
|
|
3822
|
+
}, `${t}_expanded_content`) : null] });
|
|
3823
|
+
return n ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("tr", {
|
|
3802
3824
|
onClick: m,
|
|
3803
3825
|
onMouseEnter: b,
|
|
3804
3826
|
onMouseLeave: x,
|
|
3805
3827
|
onFocus: h,
|
|
3806
|
-
className: g(m && !m.noStyle ? Is.clickableRow : null, b && !b.noStyle ? Is.hoverableRow : null, T ? Is.rowActive : null),
|
|
3807
|
-
"data-active": T || null,
|
|
3808
|
-
"data-error": C || null,
|
|
3809
|
-
"data-warning": w || null,
|
|
3810
|
-
"data-index": t,
|
|
3811
|
-
"data-even": t % 2 == 0,
|
|
3812
3828
|
"data-testid": f,
|
|
3813
|
-
|
|
3829
|
+
className: g(m ? Is.clickableRow : null, b ? Is.hoverableRow : null),
|
|
3814
3830
|
children: [
|
|
3815
|
-
c ?
|
|
3816
|
-
className: Is.dragIconCell,
|
|
3817
|
-
children: /* @__PURE__ */ v("div", {
|
|
3818
|
-
className: g(Is.dragIcon, u ? Is.dragIconDisabled : ""),
|
|
3819
|
-
...O,
|
|
3820
|
-
...k,
|
|
3821
|
-
children: /* @__PURE__ */ v(U, { icon: V.DRAG })
|
|
3822
|
-
})
|
|
3823
|
-
}) : null,
|
|
3831
|
+
c ? /* @__PURE__ */ v("th", {}) : null,
|
|
3824
3832
|
E,
|
|
3825
3833
|
D
|
|
3826
3834
|
]
|
|
@@ -3828,8 +3836,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3828
3836
|
colSpan: i,
|
|
3829
3837
|
flush: S.flush === !0,
|
|
3830
3838
|
children: S.content
|
|
3831
|
-
}, `${t}_expanded_content`) : null] })
|
|
3832
|
-
|
|
3839
|
+
}, `${t}_expanded_content`) : null] }) : c && !e.noDrag ? /* @__PURE__ */ v(hc, {
|
|
3840
|
+
dropDisabled: u,
|
|
3841
|
+
height: d,
|
|
3842
|
+
rowIndex: t,
|
|
3843
|
+
children: k
|
|
3844
|
+
}) : k();
|
|
3845
|
+
}, _c = (e) => {
|
|
3833
3846
|
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
3847
|
return a ? /* @__PURE__ */ y(tr, {
|
|
3835
3848
|
collisionDetection: rr,
|
|
@@ -3864,7 +3877,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3864
3877
|
dropAnimation: null,
|
|
3865
3878
|
children: /* @__PURE__ */ v("table", {
|
|
3866
3879
|
className: g(mo.table, mo.dragOverlay),
|
|
3867
|
-
children: /* @__PURE__ */ v("tbody", { children: /* @__PURE__ */ v(
|
|
3880
|
+
children: /* @__PURE__ */ v("tbody", { children: /* @__PURE__ */ v(gc, {
|
|
3868
3881
|
rowIndex: Number(f),
|
|
3869
3882
|
row: l[Number(f)],
|
|
3870
3883
|
columnCount: i,
|
|
@@ -3884,7 +3897,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3884
3897
|
})
|
|
3885
3898
|
}), document.body)]
|
|
3886
3899
|
}) : t({});
|
|
3887
|
-
},
|
|
3900
|
+
}, vc = ({ table: e, children: t }) => {
|
|
3888
3901
|
var n, r, i;
|
|
3889
3902
|
let a = p(null), o = ir({
|
|
3890
3903
|
count: (n = (r = e == null ? void 0 : e.rowCount) == null ? (i = e.rows) == null ? void 0 : i.length : r) == null ? 0 : n,
|
|
@@ -3907,7 +3920,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3907
3920
|
})()
|
|
3908
3921
|
})
|
|
3909
3922
|
});
|
|
3910
|
-
},
|
|
3923
|
+
}, yc = ({ activeIndex: e, triggerScrollToActiveRow: t, isVirtualized: n, virtualizer: r }) => (c(() => {
|
|
3911
3924
|
if (t && !(e == null || e < 0)) {
|
|
3912
3925
|
if (n && r) r.scrollToIndex(e, {
|
|
3913
3926
|
behavior: "auto",
|
|
@@ -3926,11 +3939,11 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3926
3939
|
t,
|
|
3927
3940
|
n,
|
|
3928
3941
|
r
|
|
3929
|
-
]), null),
|
|
3942
|
+
]), null), bc = ({ table: e, children: t }) => {
|
|
3930
3943
|
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(
|
|
3944
|
+
return n ? /* @__PURE__ */ v(vc, {
|
|
3932
3945
|
table: e,
|
|
3933
|
-
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(
|
|
3946
|
+
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(yc, {
|
|
3934
3947
|
isVirtualized: !0,
|
|
3935
3948
|
virtualizer: e,
|
|
3936
3949
|
activeIndex: a,
|
|
@@ -3942,13 +3955,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3942
3955
|
}) : /* @__PURE__ */ y("div", {
|
|
3943
3956
|
id: "scrollWrapper",
|
|
3944
3957
|
className: mo.scroll,
|
|
3945
|
-
children: [/* @__PURE__ */ v(
|
|
3958
|
+
children: [/* @__PURE__ */ v(yc, {
|
|
3946
3959
|
isVirtualized: !1,
|
|
3947
3960
|
activeIndex: a,
|
|
3948
3961
|
triggerScrollToActiveRow: r
|
|
3949
3962
|
}), t({})]
|
|
3950
3963
|
});
|
|
3951
|
-
},
|
|
3964
|
+
}, xc = (e) => {
|
|
3952
3965
|
var t, n, r, i, a;
|
|
3953
3966
|
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
3967
|
cells: I ? T.cells.map((e, t) => (e == null ? void 0 : e.type) === "Input" ? {
|
|
@@ -3987,7 +4000,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3987
4000
|
name: f,
|
|
3988
4001
|
testId: C && `${C}-title`
|
|
3989
4002
|
}),
|
|
3990
|
-
/* @__PURE__ */ v(
|
|
4003
|
+
/* @__PURE__ */ v(_c, {
|
|
3991
4004
|
colSpan: P,
|
|
3992
4005
|
columnAlignment: x,
|
|
3993
4006
|
columnCount: M,
|
|
@@ -3997,13 +4010,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
3997
4010
|
rows: L,
|
|
3998
4011
|
tbodyRef: A,
|
|
3999
4012
|
canListReorder: s,
|
|
4000
|
-
children: ({ dropDisabled: e }) => /* @__PURE__ */ v(
|
|
4013
|
+
children: ({ dropDisabled: e }) => /* @__PURE__ */ v(bc, {
|
|
4001
4014
|
table: te,
|
|
4002
4015
|
children: ({ virtualizer: t, tableStyle: n }) => /* @__PURE__ */ y("table", {
|
|
4003
4016
|
className: g(mo.table, S ? mo.striped : ""),
|
|
4004
4017
|
"data-testid": C,
|
|
4005
4018
|
style: n,
|
|
4006
|
-
children: [/* @__PURE__ */ v("thead", { children: j.map((e, t) => /* @__PURE__ */ v(
|
|
4019
|
+
children: [/* @__PURE__ */ v("thead", { children: j.map((e, t) => /* @__PURE__ */ v(gc, {
|
|
4007
4020
|
rowIndex: t,
|
|
4008
4021
|
isHeader: !0,
|
|
4009
4022
|
row: e,
|
|
@@ -4018,7 +4031,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4018
4031
|
ref: A,
|
|
4019
4032
|
children: t ? t.getVirtualItems().map((t) => {
|
|
4020
4033
|
let n = t.index, r = L[n];
|
|
4021
|
-
return /* @__PURE__ */ v(
|
|
4034
|
+
return /* @__PURE__ */ v(gc, {
|
|
4022
4035
|
rowIndex: n,
|
|
4023
4036
|
row: c ? c({
|
|
4024
4037
|
row: r,
|
|
@@ -4033,7 +4046,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4033
4046
|
height: t.size,
|
|
4034
4047
|
dropDisabled: e
|
|
4035
4048
|
}, `1_${n}`);
|
|
4036
|
-
}) : L.map((t, n) => /* @__PURE__ */ v(
|
|
4049
|
+
}) : L.map((t, n) => /* @__PURE__ */ v(gc, {
|
|
4037
4050
|
rowIndex: n,
|
|
4038
4051
|
row: c ? c({
|
|
4039
4052
|
row: t,
|
|
@@ -4058,14 +4071,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4058
4071
|
})
|
|
4059
4072
|
]
|
|
4060
4073
|
});
|
|
4061
|
-
},
|
|
4074
|
+
}, Sc = "blank", Cc = 1e4, wc = (e, t, n, r) => {
|
|
4062
4075
|
let i = `${t} → ${n}:`, a = e.filter((e) => !e.startsWith(i)), o = r ? [...a, `${i} ${r}`] : a;
|
|
4063
4076
|
return {
|
|
4064
4077
|
updatedErrors: o,
|
|
4065
4078
|
isValid: o.length === 0
|
|
4066
4079
|
};
|
|
4067
|
-
},
|
|
4068
|
-
let i = d(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, s] = m(
|
|
4080
|
+
}, Tc = 20, Ec = 1, Dc = ({ validationRules: e, parsedResult: t, updateState: n, testId: r }) => {
|
|
4081
|
+
let i = d(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, s] = m(Tc), [l, u] = m(Ec), f = p([]), h = (l - 1) * a, g = a === 0 ? t.rows.length : h + a, [_, y] = m([]), b = d(() => {
|
|
4069
4082
|
let n = e.filter((e) => !e.optionalColumn);
|
|
4070
4083
|
return t.fields.length === n.length ? n : e;
|
|
4071
4084
|
}, [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 +4092,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4079
4092
|
disableValidationOnFocus: !0,
|
|
4080
4093
|
error: v,
|
|
4081
4094
|
validationCallback: (e, i) => {
|
|
4082
|
-
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } =
|
|
4095
|
+
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } = wc(t.errors, a, e, i);
|
|
4083
4096
|
n({ parsedResult: {
|
|
4084
4097
|
...t,
|
|
4085
4098
|
errors: o,
|
|
@@ -4088,7 +4101,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4088
4101
|
},
|
|
4089
4102
|
onChange: (e) => {
|
|
4090
4103
|
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 } =
|
|
4104
|
+
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } = wc(t.errors, s, m, c), d = t.rows.map((e, t) => t === r ? e.map((e, t) => t === a ? o : e) : e);
|
|
4092
4105
|
n({ parsedResult: {
|
|
4093
4106
|
...t,
|
|
4094
4107
|
rows: d,
|
|
@@ -4130,7 +4143,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4130
4143
|
]);
|
|
4131
4144
|
let S = d(() => t.fields.map((e, r) => {
|
|
4132
4145
|
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) ===
|
|
4146
|
+
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) === Sc);
|
|
4134
4147
|
if (!l.length || u) return {};
|
|
4135
4148
|
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
4149
|
return {
|
|
@@ -4168,7 +4181,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4168
4181
|
h,
|
|
4169
4182
|
g
|
|
4170
4183
|
]);
|
|
4171
|
-
return /* @__PURE__ */ v(
|
|
4184
|
+
return /* @__PURE__ */ v(xc, {
|
|
4172
4185
|
beforeRenderRow: o(({ rowIndex: e }) => {
|
|
4173
4186
|
let n = h + e, r = t.rows[n];
|
|
4174
4187
|
return r ? x(r, n) : {
|
|
@@ -4241,7 +4254,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4241
4254
|
} }
|
|
4242
4255
|
}
|
|
4243
4256
|
});
|
|
4244
|
-
},
|
|
4257
|
+
}, Oc = { listStyle: "_listStyle_yjfjw_1" }, kc = ({ errors: e, t }) => {
|
|
4245
4258
|
var n;
|
|
4246
4259
|
let r = (n = [...e]) == null ? void 0 : n.sort((e, t) => {
|
|
4247
4260
|
let n = (e) => {
|
|
@@ -4257,18 +4270,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4257
4270
|
content: t("unableToImportPleaseCorrectError", { rows: e == null ? void 0 : e.length }),
|
|
4258
4271
|
type: "Error",
|
|
4259
4272
|
details: /* @__PURE__ */ v("ul", {
|
|
4260
|
-
className:
|
|
4273
|
+
className: Oc.listStyle,
|
|
4261
4274
|
children: r.map((e, t) => /* @__PURE__ */ v("li", { children: e }, t))
|
|
4262
4275
|
})
|
|
4263
4276
|
};
|
|
4264
|
-
},
|
|
4277
|
+
}, Ac = ({ errors: e, t }) => e.length ? /* @__PURE__ */ v(po, { message: kc({
|
|
4265
4278
|
errors: e,
|
|
4266
4279
|
t
|
|
4267
|
-
}) }) : null,
|
|
4280
|
+
}) }) : null, jc = {
|
|
4268
4281
|
empty: "_empty_fe425_1",
|
|
4269
4282
|
text: "_text_fe425_11"
|
|
4270
|
-
},
|
|
4271
|
-
className:
|
|
4283
|
+
}, Mc = ({ width: e = "auto", height: t = "auto", text: n = "No data", children: r, testId: i }) => /* @__PURE__ */ y("div", {
|
|
4284
|
+
className: jc.empty,
|
|
4272
4285
|
style: {
|
|
4273
4286
|
width: e,
|
|
4274
4287
|
height: t
|
|
@@ -4304,7 +4317,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4304
4317
|
})
|
|
4305
4318
|
}),
|
|
4306
4319
|
n !== "" && /* @__PURE__ */ v("div", {
|
|
4307
|
-
className:
|
|
4320
|
+
className: jc.text,
|
|
4308
4321
|
children: /* @__PURE__ */ v(ha, {
|
|
4309
4322
|
faint: !0,
|
|
4310
4323
|
children: n
|
|
@@ -4312,52 +4325,52 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4312
4325
|
}),
|
|
4313
4326
|
r
|
|
4314
4327
|
]
|
|
4315
|
-
}),
|
|
4328
|
+
}), Nc = (e) => {
|
|
4316
4329
|
var t;
|
|
4317
4330
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4318
4331
|
let t = e == null ? void 0 : e.match(/[.,]/g);
|
|
4319
4332
|
return t && t.length > 1;
|
|
4320
4333
|
});
|
|
4321
|
-
},
|
|
4334
|
+
}, Pc = (e) => {
|
|
4322
4335
|
var t;
|
|
4323
4336
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4324
4337
|
var t;
|
|
4325
4338
|
return !(e != null && e.includes(".")) && (e == null || (t = e.match(/,/g)) == null ? void 0 : t.length) === 1;
|
|
4326
4339
|
});
|
|
4327
|
-
},
|
|
4340
|
+
}, Fc = (e, t, n) => e >= t - n, Ic = (e) => !!e && e !== "blank" && e.trim() !== "", Lc = (e, t, n, r, i, a, o) => {
|
|
4328
4341
|
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 && !
|
|
4342
|
+
if (i && !Fc(e.length, l, c) && s.push(o("incorrectNumberOfFieldNameHeaderColumns", { expectedLengthMessage: u })), a) {
|
|
4330
4343
|
var f, p;
|
|
4331
4344
|
let e = r.filter((e) => {
|
|
4332
4345
|
var t;
|
|
4333
|
-
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(
|
|
4346
|
+
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(Ic));
|
|
4334
4347
|
}).length;
|
|
4335
|
-
|
|
4348
|
+
Fc(t == null || (f = t.filter(Ic)) == 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
4349
|
}
|
|
4337
4350
|
return n.length === 0 ? s.push(o("incorrectNumberOfDataColumns", {
|
|
4338
4351
|
expectedLengthMessage: u,
|
|
4339
4352
|
dataRowStartIndex: d
|
|
4340
4353
|
})) : n.forEach((e, t) => {
|
|
4341
|
-
|
|
4354
|
+
Fc(e.length, l, c) || s.push(o("incorrectNumberOfDataColumns", {
|
|
4342
4355
|
expectedLengthMessage: u,
|
|
4343
4356
|
dataRowStartIndex: d + t
|
|
4344
4357
|
}));
|
|
4345
4358
|
}), s;
|
|
4346
|
-
},
|
|
4359
|
+
}, Rc = (e) => e.toUpperCase().replace(/\(.*?\)/g, "").replace(/[^A-Z0-9]/g, "").trim(), zc = ({ value: e, defaultAllowedValues: t }) => {
|
|
4347
4360
|
var n;
|
|
4348
|
-
let r =
|
|
4349
|
-
return (n = t == null ? void 0 : t.some((e) =>
|
|
4350
|
-
},
|
|
4361
|
+
let r = Rc(e);
|
|
4362
|
+
return (n = t == null ? void 0 : t.some((e) => Rc(e).includes(r) || r.includes(Rc(e)))) == null ? !1 : n;
|
|
4363
|
+
}, Bc = ({ value: e, defaultAllowedValues: t }) => {
|
|
4351
4364
|
var n;
|
|
4352
4365
|
return (n = t == null ? void 0 : t.includes(e)) == null ? !1 : n;
|
|
4353
|
-
},
|
|
4366
|
+
}, Vc = (e, t, n, r, i, a) => {
|
|
4354
4367
|
let o = [];
|
|
4355
4368
|
if (r) {
|
|
4356
4369
|
let r = n.map((e) => e.fieldName).filter(Boolean);
|
|
4357
4370
|
e.forEach((i, s) => {
|
|
4358
4371
|
var c, l;
|
|
4359
4372
|
let u = n[s];
|
|
4360
|
-
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ?
|
|
4373
|
+
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ? zc : c)({
|
|
4361
4374
|
value: i,
|
|
4362
4375
|
defaultAllowedValues: r,
|
|
4363
4376
|
columnIndex: s,
|
|
@@ -4379,7 +4392,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4379
4392
|
var l, u;
|
|
4380
4393
|
let d = n[c];
|
|
4381
4394
|
if (!d || d != null && d.optionalColumn) return;
|
|
4382
|
-
let f = (l = d.unitsValidator) == null ?
|
|
4395
|
+
let f = (l = d.unitsValidator) == null ? Bc : l, p = (u = i == null ? void 0 : i[c]) == null ? [] : u;
|
|
4383
4396
|
f({
|
|
4384
4397
|
value: r,
|
|
4385
4398
|
defaultAllowedValues: p,
|
|
@@ -4395,7 +4408,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4395
4408
|
});
|
|
4396
4409
|
}
|
|
4397
4410
|
return o;
|
|
4398
|
-
},
|
|
4411
|
+
}, Hc = (e, t, n) => {
|
|
4399
4412
|
let r = [];
|
|
4400
4413
|
return e.forEach((e, i) => {
|
|
4401
4414
|
e.forEach((e, a) => {
|
|
@@ -4408,91 +4421,91 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4408
4421
|
})}`);
|
|
4409
4422
|
});
|
|
4410
4423
|
}), r;
|
|
4411
|
-
},
|
|
4412
|
-
let s =
|
|
4413
|
-
return s.length === 0 && (s = s.concat(
|
|
4424
|
+
}, Uc = (e, t, n, r, i, a, o) => {
|
|
4425
|
+
let s = Lc(e, t, n, r, i, a, o);
|
|
4426
|
+
return s.length === 0 && (s = s.concat(Vc(e, t, r, i, a, o), Hc(n, r, o))), {
|
|
4414
4427
|
isValid: s.length === 0,
|
|
4415
4428
|
errors: s
|
|
4416
4429
|
};
|
|
4417
|
-
},
|
|
4430
|
+
}, Wc = (e, t, n) => {
|
|
4418
4431
|
var r, i, a, o, s, c, l, u, d, f, p, m, h, g;
|
|
4419
4432
|
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
4433
|
return {
|
|
4421
4434
|
hasFieldNameHeader: b || v && !x && !C || v && y && !C,
|
|
4422
4435
|
hasUnitHeader: x || S || v && y && !x && !C && !w || v && y && !C && !w
|
|
4423
4436
|
};
|
|
4424
|
-
},
|
|
4437
|
+
}, Gc = (e, { validationRules: t }) => {
|
|
4425
4438
|
var n, r, i;
|
|
4426
4439
|
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
4440
|
var t;
|
|
4428
4441
|
return (t = e == null ? void 0 : e.defaultUnit) == null ? s(e == null ? void 0 : e.validUnits) : t;
|
|
4429
|
-
}), { hasFieldNameHeader: l, hasUnitHeader: u } =
|
|
4442
|
+
}), { hasFieldNameHeader: l, hasUnitHeader: u } = Wc(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
4443
|
return l || e == null || e.unshift(o), u || e == null || e.splice(1, 0, c), {
|
|
4431
4444
|
hasFieldNameHeader: l,
|
|
4432
4445
|
hasUnitHeader: u
|
|
4433
4446
|
};
|
|
4434
|
-
},
|
|
4447
|
+
}, Kc = (e) => Math.round(e * 100) / 100, qc = (e) => e.join(", ").replace(/,\s*$/, ""), Jc = {
|
|
4435
4448
|
skipEmptyLines: !0,
|
|
4436
4449
|
delimiter: (e) => {
|
|
4437
4450
|
var t, n;
|
|
4438
4451
|
let r = e.substring(0, 200), i = ((t = r.match(/\t/g)) == null ? [] : t).length, a = ((n = r.match(/;/g)) == null ? [] : n).length;
|
|
4439
4452
|
return i === 0 && a === 0 ? "," : i > a ? " " : ";";
|
|
4440
4453
|
}
|
|
4441
|
-
},
|
|
4454
|
+
}, Yc = [
|
|
4442
4455
|
"text/csv",
|
|
4443
4456
|
"text/plain",
|
|
4444
4457
|
"application/json",
|
|
4445
4458
|
"application/vnd.ms-excel"
|
|
4446
|
-
],
|
|
4459
|
+
], Xc = (e) => Yc.includes(e.type), Zc = (e) => e instanceof File, Qc = (e) => e.trim().startsWith("["), $c = (e) => {
|
|
4447
4460
|
try {
|
|
4448
4461
|
var t;
|
|
4449
4462
|
return !!((t = JSON.parse(e)) != null && t.path);
|
|
4450
4463
|
} catch {
|
|
4451
4464
|
return !1;
|
|
4452
4465
|
}
|
|
4453
|
-
},
|
|
4466
|
+
}, el = (e) => new Promise((t, n) => {
|
|
4454
4467
|
let r = new FileReader();
|
|
4455
4468
|
r.onload = () => t(String(r.result)), r.onerror = n, r.readAsText(e);
|
|
4456
|
-
}),
|
|
4469
|
+
}), tl = async (e, t, n) => {
|
|
4457
4470
|
try {
|
|
4458
|
-
return
|
|
4471
|
+
return cl({
|
|
4459
4472
|
data: JSON.parse(e),
|
|
4460
4473
|
errors: []
|
|
4461
4474
|
}, t, n);
|
|
4462
4475
|
} catch (e) {
|
|
4463
4476
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4464
4477
|
}
|
|
4465
|
-
},
|
|
4478
|
+
}, nl = async (e, t, n) => {
|
|
4466
4479
|
try {
|
|
4467
4480
|
let r = JSON.parse(e).path.map((e) => [
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4481
|
+
Kc(e.md),
|
|
4482
|
+
Kc(e.inclination),
|
|
4483
|
+
Kc(e.gridAzimuth)
|
|
4471
4484
|
]);
|
|
4472
4485
|
return r.unshift([
|
|
4473
4486
|
"m",
|
|
4474
4487
|
"deg",
|
|
4475
4488
|
"deg"
|
|
4476
|
-
]),
|
|
4489
|
+
]), cl({
|
|
4477
4490
|
data: r,
|
|
4478
4491
|
errors: []
|
|
4479
4492
|
}, t, n);
|
|
4480
4493
|
} catch (e) {
|
|
4481
4494
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4482
4495
|
}
|
|
4483
|
-
},
|
|
4496
|
+
}, rl = (e) => e.replace(",", "."), il = (e) => e.map((e) => e.map((e) => rl(e))), al = (e, { importLimit: t, ...n }, r) => new Promise((i) => {
|
|
4484
4497
|
or.parse(e, {
|
|
4485
|
-
...
|
|
4498
|
+
...Jc,
|
|
4486
4499
|
preview: t,
|
|
4487
4500
|
complete: (e) => {
|
|
4488
|
-
let a =
|
|
4501
|
+
let a = cl(e, {
|
|
4489
4502
|
importLimit: t,
|
|
4490
4503
|
...n
|
|
4491
4504
|
}, r);
|
|
4492
|
-
a.rows =
|
|
4505
|
+
a.rows = il(a.rows), i(a);
|
|
4493
4506
|
}
|
|
4494
4507
|
});
|
|
4495
|
-
}),
|
|
4508
|
+
}), ol = async (e, t, n) => {
|
|
4496
4509
|
let r = {
|
|
4497
4510
|
isValid: !1,
|
|
4498
4511
|
fields: [],
|
|
@@ -4501,13 +4514,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4501
4514
|
errors: []
|
|
4502
4515
|
};
|
|
4503
4516
|
try {
|
|
4504
|
-
if (
|
|
4505
|
-
let i =
|
|
4506
|
-
return
|
|
4517
|
+
if (Zc(e) && !Xc(e)) return r.errors.push(`${n("wrongFileFormatExpectedOneOf")} ${qc(Array.from(Yc))}`), r;
|
|
4518
|
+
let i = Zc(e) ? await el(e) : e;
|
|
4519
|
+
return Qc(i) ? await tl(i, t, n) : $c(i) ? await nl(i, t, n) : await al(e, t, n);
|
|
4507
4520
|
} catch (e) {
|
|
4508
4521
|
return r.errors.push(e.message), r;
|
|
4509
4522
|
}
|
|
4510
|
-
},
|
|
4523
|
+
}, sl = (e, t, n, r) => {
|
|
4511
4524
|
var i;
|
|
4512
4525
|
let a = (i = r == null ? void 0 : r.delimiter) == null ? "," : i, o = [
|
|
4513
4526
|
e,
|
|
@@ -4519,7 +4532,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4519
4532
|
header: !0,
|
|
4520
4533
|
delimiter: a
|
|
4521
4534
|
});
|
|
4522
|
-
},
|
|
4535
|
+
}, cl = (e, t, n) => {
|
|
4523
4536
|
let { data: r, errors: i } = e, a = {
|
|
4524
4537
|
isValid: !1,
|
|
4525
4538
|
fields: [],
|
|
@@ -4528,15 +4541,15 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4528
4541
|
errors: i.map((e) => e.message)
|
|
4529
4542
|
};
|
|
4530
4543
|
if (i.length > 0) return a;
|
|
4531
|
-
let { hasFieldNameHeader: o, hasUnitHeader: s } =
|
|
4544
|
+
let { hasFieldNameHeader: o, hasUnitHeader: s } = Gc(r, t);
|
|
4532
4545
|
a.fields = r[0].map((e) => e.trim()), a.units = r[1].map((e) => e.trim()).filter(Boolean), a.rows = r.slice(2);
|
|
4533
4546
|
let { validationRules: c } = t;
|
|
4534
4547
|
if (c.length) {
|
|
4535
|
-
let { isValid: e, errors: t } =
|
|
4548
|
+
let { isValid: e, errors: t } = Uc(a.fields, a.units, a.rows, c, o, s, n);
|
|
4536
4549
|
a.errors.push(...t), a.isValid = e && t.length === 0;
|
|
4537
4550
|
} else a.isValid = a.errors.length === 0;
|
|
4538
4551
|
return a;
|
|
4539
|
-
},
|
|
4552
|
+
}, ll = ({ id: e, message: t = {
|
|
4540
4553
|
type: oo.INFO,
|
|
4541
4554
|
content: ""
|
|
4542
4555
|
}, autoClose: n = 6e3, onClose: r }) => {
|
|
@@ -4577,22 +4590,22 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4577
4590
|
transition: sr,
|
|
4578
4591
|
type: s
|
|
4579
4592
|
});
|
|
4580
|
-
},
|
|
4593
|
+
}, ul = (e) => {
|
|
4581
4594
|
lr.dismiss(e);
|
|
4582
|
-
},
|
|
4595
|
+
}, dl = (e, t) => {
|
|
4583
4596
|
t(() => {
|
|
4584
|
-
|
|
4597
|
+
ll({ ...e });
|
|
4585
4598
|
});
|
|
4586
|
-
},
|
|
4599
|
+
}, fl = {
|
|
4587
4600
|
toggle: "_toggle_18fme_9",
|
|
4588
4601
|
small: "_small_18fme_25",
|
|
4589
4602
|
disabled: "_disabled_18fme_105",
|
|
4590
4603
|
noMargin: "_noMargin_18fme_113",
|
|
4591
4604
|
helpIconEnabled: "_helpIconEnabled_18fme_116"
|
|
4592
|
-
},
|
|
4605
|
+
}, pl = ({ 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
4606
|
let p = s(H), m = u || d, h = r || p;
|
|
4594
4607
|
return /* @__PURE__ */ y("div", {
|
|
4595
|
-
className: g(
|
|
4608
|
+
className: g(fl.toggle, h ? fl.disabled : null, a ? fl.small : null, c ? fl.noMargin : null),
|
|
4596
4609
|
style: { display: i },
|
|
4597
4610
|
onClick: (t) => {
|
|
4598
4611
|
h || (t.target.name = e, t.target.checked = !n, t.target.value = !n, o(t));
|
|
@@ -4612,13 +4625,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4612
4625
|
children: t
|
|
4613
4626
|
}),
|
|
4614
4627
|
m && /* @__PURE__ */ v("div", {
|
|
4615
|
-
className:
|
|
4628
|
+
className: fl.helpIconEnabled,
|
|
4616
4629
|
onClick: d,
|
|
4617
4630
|
children: /* @__PURE__ */ v(si, { text: u })
|
|
4618
4631
|
})
|
|
4619
4632
|
]
|
|
4620
4633
|
});
|
|
4621
|
-
},
|
|
4634
|
+
}, ml = ({ 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
4635
|
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
4636
|
pastedText: "",
|
|
4624
4637
|
parsedResult: {
|
|
@@ -4641,8 +4654,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4641
4654
|
var n, r, i;
|
|
4642
4655
|
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
4656
|
validationRules: s,
|
|
4644
|
-
importLimit: (r = e.importLimit) == null ?
|
|
4645
|
-
}, o =
|
|
4657
|
+
importLimit: (r = e.importLimit) == null ? Cc : r
|
|
4658
|
+
}, o = sl(I.fields.slice(0, 2), ((i = I.units) == null ? [] : i).slice(0, 2), t, a);
|
|
4646
4659
|
f(() => A({
|
|
4647
4660
|
parsedResult: {
|
|
4648
4661
|
...I,
|
|
@@ -4672,17 +4685,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4672
4685
|
}, N = () => {
|
|
4673
4686
|
r("helpModal", !x);
|
|
4674
4687
|
}, P = () => {
|
|
4675
|
-
n(k), c(k.parsedResult), i(),
|
|
4688
|
+
n(k), c(k.parsedResult), i(), dl({ message: {
|
|
4676
4689
|
type: "Success",
|
|
4677
4690
|
content: u("pasteSuccessful")
|
|
4678
4691
|
} }, f);
|
|
4679
|
-
}, { pastedText: F, parsedResult: I } = k, ee = T && T(I), { isValid: L, errors: te } = I, ne = te.length, re = F === "", ie =
|
|
4692
|
+
}, { pastedText: F, parsedResult: I } = k, ee = T && T(I), { isValid: L, errors: te } = I, ne = te.length, re = F === "", ie = Pc(F), ae = Nc(F), R = /* @__PURE__ */ y(_, { children: [
|
|
4680
4693
|
/* @__PURE__ */ y("div", {
|
|
4681
4694
|
className: io.headerContainer,
|
|
4682
4695
|
children: [
|
|
4683
4696
|
/* @__PURE__ */ v(W, {
|
|
4684
4697
|
text: u("downsampleTooltip"),
|
|
4685
|
-
children: /* @__PURE__ */ v(
|
|
4698
|
+
children: /* @__PURE__ */ v(pl, {
|
|
4686
4699
|
label: u("downsampled"),
|
|
4687
4700
|
checked: D,
|
|
4688
4701
|
onChange: () => j(!D),
|
|
@@ -4715,7 +4728,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4715
4728
|
}),
|
|
4716
4729
|
re ? /* @__PURE__ */ v("div", {
|
|
4717
4730
|
className: io.resultContainer,
|
|
4718
|
-
children: /* @__PURE__ */ v(
|
|
4731
|
+
children: /* @__PURE__ */ v(Mc, {
|
|
4719
4732
|
text: null,
|
|
4720
4733
|
children: /* @__PURE__ */ y("div", {
|
|
4721
4734
|
className: io.emptyState,
|
|
@@ -4751,7 +4764,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4751
4764
|
}) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
|
|
4752
4765
|
className: io.messagesContainer,
|
|
4753
4766
|
children: [
|
|
4754
|
-
ne ? /* @__PURE__ */ v(
|
|
4767
|
+
ne ? /* @__PURE__ */ v(Ac, {
|
|
4755
4768
|
errors: te,
|
|
4756
4769
|
t: u
|
|
4757
4770
|
}) : null,
|
|
@@ -4774,7 +4787,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4774
4787
|
type: "Warning"
|
|
4775
4788
|
} })
|
|
4776
4789
|
]
|
|
4777
|
-
}), /* @__PURE__ */ v(
|
|
4790
|
+
}), /* @__PURE__ */ v(Dc, {
|
|
4778
4791
|
validationRules: s,
|
|
4779
4792
|
parsedResult: I,
|
|
4780
4793
|
updateState: (e) => A((t) => ({
|
|
@@ -4816,7 +4829,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4816
4829
|
onClose: i
|
|
4817
4830
|
} })
|
|
4818
4831
|
});
|
|
4819
|
-
},
|
|
4832
|
+
}, hl = ({ modals: e = [], modalVisibility: n, onCloseModal: r, testId: i }) => e.length ? /* @__PURE__ */ v(_, { children: e.map(({ name: e, component: a, props: o = {} }) => {
|
|
4820
4833
|
var s;
|
|
4821
4834
|
return /* @__PURE__ */ v(t, { children: /* @__PURE__ */ v(a, {
|
|
4822
4835
|
testId: `${i}-modal-render-${e}`,
|
|
@@ -4824,7 +4837,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4824
4837
|
onClose: () => r({ name: e }),
|
|
4825
4838
|
...o
|
|
4826
4839
|
}) }, e);
|
|
4827
|
-
}) }) : null,
|
|
4840
|
+
}) }) : null, gl = ({ sections: e, iconName: t, testId: n, tooltip: r }) => /* @__PURE__ */ v(Ki, {
|
|
4828
4841
|
loading: !0,
|
|
4829
4842
|
menu: {
|
|
4830
4843
|
component: /* @__PURE__ */ v(K, {
|
|
@@ -4840,18 +4853,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4840
4853
|
sections: e
|
|
4841
4854
|
},
|
|
4842
4855
|
testId: n
|
|
4843
|
-
}),
|
|
4856
|
+
}), _l = (e, t, n) => o(async () => {
|
|
4844
4857
|
if (n) try {
|
|
4845
4858
|
return await n();
|
|
4846
4859
|
} catch (t) {
|
|
4847
|
-
console.error("beforeExportData failed", t),
|
|
4860
|
+
console.error("beforeExportData failed", t), ll({ message: {
|
|
4848
4861
|
type: "Error",
|
|
4849
4862
|
content: e("unableToPrepareExportData")
|
|
4850
4863
|
} });
|
|
4851
4864
|
return;
|
|
4852
4865
|
}
|
|
4853
4866
|
return t;
|
|
4854
|
-
}, [t, n]),
|
|
4867
|
+
}, [t, n]), vl = {
|
|
4855
4868
|
cancel: "Cancel",
|
|
4856
4869
|
chooseFile: "Choose file",
|
|
4857
4870
|
copyDecimalComma: "Copy (decimal comma)",
|
|
@@ -4910,26 +4923,26 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4910
4923
|
smartUpload_description: "Upload image and extract table content using a LLM",
|
|
4911
4924
|
smartUpload_smartUpload: "Smart Upload",
|
|
4912
4925
|
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 =
|
|
4926
|
+
}, yl = (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])), bl = (e) => d(() => {
|
|
4927
|
+
let t = Object.keys(vl).reduce((t, n) => {
|
|
4928
|
+
let r = vl == null ? void 0 : vl[n], i = e == null ? void 0 : e[n];
|
|
4916
4929
|
return t[n] = i == null ? r : i, t;
|
|
4917
4930
|
}, {});
|
|
4918
4931
|
return (e, n) => {
|
|
4919
4932
|
let r = t[e];
|
|
4920
|
-
return n ?
|
|
4933
|
+
return n ? yl(r, n) : r;
|
|
4921
4934
|
};
|
|
4922
|
-
}, [e]),
|
|
4935
|
+
}, [e]), xl = /^\s*-?\d+(?:[.,]\d+)?(?:e[+-]?\d+)?\s*$/i, Sl = (e) => {
|
|
4923
4936
|
var t;
|
|
4924
4937
|
return {
|
|
4925
4938
|
...e,
|
|
4926
4939
|
rows: e == null || (t = e.rows) == null ? void 0 : t.map((e) => e.map((e) => {
|
|
4927
4940
|
let t = String(e == null ? "" : e);
|
|
4928
|
-
return
|
|
4941
|
+
return xl.test(t) ? Cn(t) : t;
|
|
4929
4942
|
}))
|
|
4930
4943
|
};
|
|
4931
|
-
},
|
|
4932
|
-
let { exportData: a, beforeExportData: s, importLimit: c =
|
|
4944
|
+
}, Cl = ({ config: e, state: t, setState: n, smartUploadConfig: r, startTransition: i }) => {
|
|
4945
|
+
let { exportData: a, beforeExportData: s, importLimit: c = Cc, validationRules: l = [], translations: u, onImportComplete: d = () => {}, disablePasteSuccessfulToast: f, prevalidationConfig: p, onDeleteRows: m } = e == null ? {} : e, { parsedResult: h } = t, { checkPrevalidationNeed: g } = p == null ? {} : p, _ = bl(u), v = _l(_, a, s), y = o((e) => {
|
|
4933
4946
|
n((t) => ({
|
|
4934
4947
|
...t,
|
|
4935
4948
|
...e
|
|
@@ -4973,9 +4986,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
4973
4986
|
let t = {
|
|
4974
4987
|
validationRules: l,
|
|
4975
4988
|
importLimit: c
|
|
4976
|
-
}, n =
|
|
4989
|
+
}, n = Sl(await ol(e, t, _));
|
|
4977
4990
|
if (g && g(h)) {
|
|
4978
|
-
let { fields: e, units: r, rows: a } = n, o =
|
|
4991
|
+
let { fields: e, units: r, rows: a } = n, o = sl(e, r == null ? [] : r, a, t);
|
|
4979
4992
|
return i(() => y({
|
|
4980
4993
|
pastedText: o,
|
|
4981
4994
|
parsedResult: h
|
|
@@ -5001,20 +5014,20 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5001
5014
|
let { fromFile: t, showSuccessToast: n = !0 } = e == null ? {} : e, r;
|
|
5002
5015
|
try {
|
|
5003
5016
|
if (r = t ? await t.text() : await navigator.clipboard.readText(), !r) {
|
|
5004
|
-
|
|
5017
|
+
dl({ message: {
|
|
5005
5018
|
type: "Error",
|
|
5006
5019
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed")
|
|
5007
5020
|
} }, i);
|
|
5008
5021
|
return;
|
|
5009
5022
|
}
|
|
5010
|
-
let e =
|
|
5023
|
+
let e = Sl(await ol(r, {
|
|
5011
5024
|
validationRules: l,
|
|
5012
5025
|
importLimit: c
|
|
5013
5026
|
}, _));
|
|
5014
|
-
return e != null && e.isValid ||
|
|
5027
|
+
return e != null && e.isValid || dl({ message: {
|
|
5015
5028
|
type: "Error",
|
|
5016
5029
|
content: _("clipboardReadFailed")
|
|
5017
|
-
} }, i), n &&
|
|
5030
|
+
} }, i), n && dl({ message: {
|
|
5018
5031
|
type: "Success",
|
|
5019
5032
|
content: _("pasteSuccessful")
|
|
5020
5033
|
} }, i), {
|
|
@@ -5022,7 +5035,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5022
5035
|
parsedResult: e
|
|
5023
5036
|
};
|
|
5024
5037
|
} catch (e) {
|
|
5025
|
-
|
|
5038
|
+
dl({ message: {
|
|
5026
5039
|
type: "Error",
|
|
5027
5040
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed"),
|
|
5028
5041
|
details: e.message
|
|
@@ -5035,10 +5048,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5035
5048
|
let n = e == null || (t = e.target) == null || (t = t.files) == null ? void 0 : t[0];
|
|
5036
5049
|
if (!n) return;
|
|
5037
5050
|
let r = await C(await n.text());
|
|
5038
|
-
r.isValid ? (f ||
|
|
5051
|
+
r.isValid ? (f || dl({ message: {
|
|
5039
5052
|
type: "Success",
|
|
5040
5053
|
content: _("pasteSuccessful")
|
|
5041
|
-
} }, i), i(() => d(r))) :
|
|
5054
|
+
} }, i), i(() => d(r))) : dl({ message: {
|
|
5042
5055
|
type: "Error",
|
|
5043
5056
|
content: _("fileParsingFailed")
|
|
5044
5057
|
} }, i);
|
|
@@ -5052,7 +5065,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5052
5065
|
try {
|
|
5053
5066
|
let t = await navigator.clipboard.readText();
|
|
5054
5067
|
if (!t) {
|
|
5055
|
-
|
|
5068
|
+
dl({ message: {
|
|
5056
5069
|
type: "Error",
|
|
5057
5070
|
content: _("clipboardIsEmpty")
|
|
5058
5071
|
} }, i);
|
|
@@ -5060,18 +5073,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5060
5073
|
}
|
|
5061
5074
|
let n = await C(t);
|
|
5062
5075
|
if (!n.isValid) {
|
|
5063
|
-
|
|
5076
|
+
dl({ message: {
|
|
5064
5077
|
type: "Error",
|
|
5065
5078
|
content: _("clipboardReadFailed")
|
|
5066
5079
|
} }, i);
|
|
5067
5080
|
return;
|
|
5068
5081
|
}
|
|
5069
|
-
f ||
|
|
5082
|
+
f || dl({ message: {
|
|
5070
5083
|
type: "Success",
|
|
5071
5084
|
content: _("pasteSuccessful")
|
|
5072
5085
|
} }, i), e && i(() => d(n));
|
|
5073
5086
|
} catch {
|
|
5074
|
-
|
|
5087
|
+
dl({ message: {
|
|
5075
5088
|
type: "Error",
|
|
5076
5089
|
content: _("clipboardReadNotAllowed")
|
|
5077
5090
|
} }, i);
|
|
@@ -5086,14 +5099,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5086
5099
|
onClickCopyClipboard: o(async (e) => {
|
|
5087
5100
|
let t = await v();
|
|
5088
5101
|
if (!t) return;
|
|
5089
|
-
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e :
|
|
5102
|
+
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e : Sc).slice(0, n.length), s = (e, t) => t === "comma" ? e.replace(/\./g, ",") : e, c = sl(n, o, a.map((t) => t.map((t) => ur(t) ? "" : s(t.toString(), e))), { delimiter: " " });
|
|
5090
5103
|
try {
|
|
5091
|
-
await navigator.clipboard.writeText(c),
|
|
5104
|
+
await navigator.clipboard.writeText(c), dl({ message: {
|
|
5092
5105
|
type: "Success",
|
|
5093
5106
|
content: _("copiedToClipboard")
|
|
5094
5107
|
} }, i);
|
|
5095
5108
|
} catch (e) {
|
|
5096
|
-
|
|
5109
|
+
dl({ message: {
|
|
5097
5110
|
type: "Error",
|
|
5098
5111
|
content: _("unableToCopyToClipboard"),
|
|
5099
5112
|
details: e.message
|
|
@@ -5103,14 +5116,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5103
5116
|
onSmartUploadResult: o((e) => {
|
|
5104
5117
|
let t = un(e) && dn(e.errorMessage) ? e.errorMessage : void 0;
|
|
5105
5118
|
if (t) {
|
|
5106
|
-
|
|
5119
|
+
dl({ message: {
|
|
5107
5120
|
type: "Error",
|
|
5108
5121
|
content: t || "Smart upload failed."
|
|
5109
5122
|
} }, i);
|
|
5110
5123
|
return;
|
|
5111
5124
|
}
|
|
5112
5125
|
if (!tn(e) || e.length < 2 || !$t(e, (e) => un(e) && $t(_n(e), dn))) {
|
|
5113
|
-
|
|
5126
|
+
dl({ message: {
|
|
5114
5127
|
type: "Error",
|
|
5115
5128
|
content: "Smart upload returned unexpected format.",
|
|
5116
5129
|
details: JSON.stringify(e)
|
|
@@ -5142,14 +5155,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5142
5155
|
]),
|
|
5143
5156
|
deleteAllRows: x
|
|
5144
5157
|
};
|
|
5145
|
-
},
|
|
5158
|
+
}, wl = (e, t) => {
|
|
5146
5159
|
var n, r;
|
|
5147
|
-
let { fields: i, rows: a } = e, o =
|
|
5160
|
+
let { fields: i, rows: a } = e, o = sl(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
5161
|
c.href = window.URL.createObjectURL(s), c.download = `${t}.csv`, document.body.appendChild(c), c.click(), document.body.removeChild(c);
|
|
5149
|
-
},
|
|
5162
|
+
}, Tl = (e) => ln(e) && "modalKey" in e, El = (e, t, n) => Zt(e, (e) => {
|
|
5150
5163
|
if (tn(e) || !un(e)) return;
|
|
5151
5164
|
let { modalKey: r } = e == null ? {} : e;
|
|
5152
|
-
if (
|
|
5165
|
+
if (Tl(e) && typeof e.onClick != "function") {
|
|
5153
5166
|
let i = () => {
|
|
5154
5167
|
var e;
|
|
5155
5168
|
n(r, !((e = t.modalVisibility) != null && e[r]));
|
|
@@ -5159,7 +5172,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5159
5172
|
onClick: i
|
|
5160
5173
|
};
|
|
5161
5174
|
}
|
|
5162
|
-
}),
|
|
5175
|
+
}), Dl = (e, t, n) => El(e, t, n), Ol = {
|
|
5163
5176
|
pastedText: "",
|
|
5164
5177
|
parsedResult: {
|
|
5165
5178
|
isValid: !1,
|
|
@@ -5174,9 +5187,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5174
5187
|
reviewPasteModal: !1,
|
|
5175
5188
|
helpModal: !1
|
|
5176
5189
|
}
|
|
5177
|
-
},
|
|
5190
|
+
}, kl = ({ config: e, smartUploadConfig: t, testId: n }) => {
|
|
5178
5191
|
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(
|
|
5192
|
+
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(Ol), { 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 = bl(f), ee = _l(I, s, c), [L, te] = h(), ne = Cl({
|
|
5180
5193
|
config: e,
|
|
5181
5194
|
state: E,
|
|
5182
5195
|
setState: D,
|
|
@@ -5211,14 +5224,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5211
5224
|
onClick: () => R("smartUploadModal", !O),
|
|
5212
5225
|
testId: `${n}-smart-upload`
|
|
5213
5226
|
}] : [],
|
|
5214
|
-
...
|
|
5227
|
+
...Dl((r = w == null ? void 0 : w.importOptions) == null ? [] : r, E, R)
|
|
5215
5228
|
] : [], de = [
|
|
5216
5229
|
{
|
|
5217
5230
|
type: "Option",
|
|
5218
5231
|
label: I("downloadFile"),
|
|
5219
5232
|
onClick: async () => {
|
|
5220
5233
|
let e = await ee();
|
|
5221
|
-
e && e &&
|
|
5234
|
+
e && e && wl(e, d);
|
|
5222
5235
|
}
|
|
5223
5236
|
},
|
|
5224
5237
|
...p ? [{
|
|
@@ -5243,20 +5256,20 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5243
5256
|
}]
|
|
5244
5257
|
}
|
|
5245
5258
|
}],
|
|
5246
|
-
...
|
|
5259
|
+
...Dl((i = w == null ? void 0 : w.exportOptions) == null ? [] : i, E, R)
|
|
5247
5260
|
], fe = b ? [{
|
|
5248
5261
|
type: "Option",
|
|
5249
5262
|
label: I("deleteAllRows"),
|
|
5250
5263
|
onClick: () => z(),
|
|
5251
5264
|
testId: `${n}-delete-all-rows`
|
|
5252
|
-
}, ...
|
|
5265
|
+
}, ...Dl((a = w == null ? void 0 : w.deleteOptions) == null ? [] : a, E, R)] : [], pe = x ? [
|
|
5253
5266
|
{ type: "Divider" },
|
|
5254
5267
|
{
|
|
5255
5268
|
type: "Option",
|
|
5256
5269
|
label: I("help"),
|
|
5257
5270
|
onClick: () => R("helpModal", !A)
|
|
5258
5271
|
},
|
|
5259
|
-
...
|
|
5272
|
+
...Dl((o = w == null ? void 0 : w.helpOptions) == null ? [] : o, E, R)
|
|
5260
5273
|
] : [], me = [
|
|
5261
5274
|
...ue.length ? [{
|
|
5262
5275
|
section: [...ue, ...pe],
|
|
@@ -5282,13 +5295,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5282
5295
|
small: !0,
|
|
5283
5296
|
dark: !0
|
|
5284
5297
|
}),
|
|
5285
|
-
me.map((e, t) => /* @__PURE__ */ v(
|
|
5298
|
+
me.map((e, t) => /* @__PURE__ */ v(gl, {
|
|
5286
5299
|
sections: e.section,
|
|
5287
5300
|
iconName: e.iconName,
|
|
5288
5301
|
tooltip: e.tooltip,
|
|
5289
5302
|
testId: `data-${e == null ? void 0 : e.name}-menu`
|
|
5290
5303
|
}, t)),
|
|
5291
|
-
k && /* @__PURE__ */ v(
|
|
5304
|
+
k && /* @__PURE__ */ v(ml, {
|
|
5292
5305
|
config: e,
|
|
5293
5306
|
state: E,
|
|
5294
5307
|
updateState: ie,
|
|
@@ -5324,14 +5337,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5324
5337
|
cancelText: I("cancel"),
|
|
5325
5338
|
testId: n
|
|
5326
5339
|
}),
|
|
5327
|
-
/* @__PURE__ */ v(
|
|
5340
|
+
/* @__PURE__ */ v(hl, {
|
|
5328
5341
|
modals: C,
|
|
5329
5342
|
modalVisibility: E == null ? void 0 : E.modalVisibility,
|
|
5330
5343
|
onCloseModal: ae,
|
|
5331
5344
|
testId: n
|
|
5332
5345
|
})
|
|
5333
5346
|
] });
|
|
5334
|
-
},
|
|
5347
|
+
}, Al = ({ file: e, accept: t, multi: n, name: r, disabled: i, onChange: a = pn, ...o }) => {
|
|
5335
5348
|
let c = s(H), l = p(null), u = () => {
|
|
5336
5349
|
var e;
|
|
5337
5350
|
i || c || (e = l.current) == null || e.click();
|
|
@@ -5359,12 +5372,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5359
5372
|
multiple: n,
|
|
5360
5373
|
onChange: d
|
|
5361
5374
|
})] });
|
|
5362
|
-
},
|
|
5375
|
+
}, jl = {
|
|
5363
5376
|
label: "_label_uxk69_1",
|
|
5364
5377
|
labelLeft: "_labelLeft_uxk69_5",
|
|
5365
5378
|
icons: "_icons_uxk69_13",
|
|
5366
5379
|
small: "_small_uxk69_27"
|
|
5367
|
-
},
|
|
5380
|
+
}, Ml = ({ label: e = null, width: t = "auto", helpText: n = "", helpTextMaxWidth: r = "300px", onClickHelp: i = void 0, lock: a = {
|
|
5368
5381
|
visible: !1,
|
|
5369
5382
|
active: !1,
|
|
5370
5383
|
onClick: () => {},
|
|
@@ -5373,14 +5386,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5373
5386
|
}, info: o, libraryIcon: s, labelLeft: c = !1, small: l = !1, textTransform: u = Dr.CAPITALIZE }) => {
|
|
5374
5387
|
var d;
|
|
5375
5388
|
return /* @__PURE__ */ v("div", {
|
|
5376
|
-
className: g(
|
|
5389
|
+
className: g(jl.label, c ? jl.labelLeft : "", l ? jl.small : ""),
|
|
5377
5390
|
children: /* @__PURE__ */ y("label", {
|
|
5378
5391
|
style: {
|
|
5379
5392
|
textTransform: u,
|
|
5380
5393
|
width: t || ""
|
|
5381
5394
|
},
|
|
5382
5395
|
children: [e, /* @__PURE__ */ y("div", {
|
|
5383
|
-
className:
|
|
5396
|
+
className: jl.icons,
|
|
5384
5397
|
children: [
|
|
5385
5398
|
(n || i) && /* @__PURE__ */ v(si, {
|
|
5386
5399
|
text: n,
|
|
@@ -5406,23 +5419,23 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5406
5419
|
})]
|
|
5407
5420
|
})
|
|
5408
5421
|
});
|
|
5409
|
-
},
|
|
5422
|
+
}, Nl = {
|
|
5410
5423
|
field: "_field_1xoss_1",
|
|
5411
5424
|
labelLeft: "_labelLeft_1xoss_5",
|
|
5412
5425
|
fieldInput: "_fieldInput_1xoss_9",
|
|
5413
5426
|
formRow: "_formRow_1xoss_12",
|
|
5414
5427
|
"form-row": "_form-row_1xoss_13",
|
|
5415
5428
|
button: "_button_1xoss_22"
|
|
5416
|
-
},
|
|
5429
|
+
}, Pl = ({ label: e, labelLeft: t = !1, labelWidth: n = "auto", children: r, helpText: i, helpTextMaxWidth: a = "300px", onClickHelp: o, lock: s = {
|
|
5417
5430
|
visible: !1,
|
|
5418
5431
|
active: !1,
|
|
5419
5432
|
onClick: () => {},
|
|
5420
5433
|
tooltip: "",
|
|
5421
5434
|
testId: void 0
|
|
5422
5435
|
}, info: c, libraryIcon: l, small: u = !1, testId: d, textTransform: f = Dr.CAPITALIZE }) => /* @__PURE__ */ y("div", {
|
|
5423
|
-
className: g(
|
|
5436
|
+
className: g(Nl.field, t ? Nl.labelLeft : ""),
|
|
5424
5437
|
"data-testid": d,
|
|
5425
|
-
children: [(e || t) && /* @__PURE__ */ v(
|
|
5438
|
+
children: [(e || t) && /* @__PURE__ */ v(Ml, {
|
|
5426
5439
|
label: e,
|
|
5427
5440
|
width: n,
|
|
5428
5441
|
helpText: i,
|
|
@@ -5435,10 +5448,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5435
5448
|
small: u,
|
|
5436
5449
|
textTransform: f
|
|
5437
5450
|
}), /* @__PURE__ */ v("div", {
|
|
5438
|
-
className:
|
|
5451
|
+
className: Nl.fieldInput,
|
|
5439
5452
|
children: r
|
|
5440
5453
|
})]
|
|
5441
|
-
}),
|
|
5454
|
+
}), Fl = ({ 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
5455
|
style: {
|
|
5443
5456
|
display: "flex",
|
|
5444
5457
|
flexDirection: n,
|
|
@@ -5450,20 +5463,20 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5450
5463
|
gap: s === !1 ? 0 : s === !0 ? "var(--padding)" : typeof s == "number" ? `${s}px` : s
|
|
5451
5464
|
},
|
|
5452
5465
|
children: a
|
|
5453
|
-
}),
|
|
5454
|
-
className:
|
|
5466
|
+
}), Il = { formRow: "_formRow_odewu_1" }, Ll = ({ children: e }) => /* @__PURE__ */ v("div", {
|
|
5467
|
+
className: Il.formRow,
|
|
5455
5468
|
children: e
|
|
5456
|
-
}),
|
|
5469
|
+
}), Rl = { grid: "_grid_obkz4_1" }, zl = (e) => typeof e == "boolean" ? e ? "var(--padding)" : "0px" : typeof e == "number" ? `${e}px` : e || "initial", Bl = (e) => typeof e == "number" ? `${e}px` : e || "initial", Vl = ({ rows: e = "initial", columns: t = "initial", columnsTablet: n = null, columnsMobile: r = null, gap: i = !1, height: a = "initial", children: o }) => {
|
|
5457
5470
|
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":
|
|
5471
|
+
"--grid-gap": zl(i),
|
|
5472
|
+
"--grid-rows": Bl(e),
|
|
5473
|
+
"--grid-columns": Bl(t),
|
|
5474
|
+
"--grid-height": Bl(a),
|
|
5475
|
+
...n != null && { "--grid-columns-tablet": Bl(n) },
|
|
5476
|
+
...r != null && { "--grid-columns-mobile": Bl(r) }
|
|
5464
5477
|
};
|
|
5465
5478
|
return /* @__PURE__ */ v("div", {
|
|
5466
|
-
className:
|
|
5479
|
+
className: Rl.grid,
|
|
5467
5480
|
style: s,
|
|
5468
5481
|
children: o
|
|
5469
5482
|
});
|
|
@@ -5510,15 +5523,15 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5510
5523
|
hideScrollbar: "_hideScrollbar_1dcn1_67",
|
|
5511
5524
|
noPointerEvents: "_noPointerEvents_1dcn1_309",
|
|
5512
5525
|
virtualRows: "_virtualRows_1dcn1_312"
|
|
5513
|
-
},
|
|
5526
|
+
}, Hl = ({ toggleNarrow: e, onClickToggleNarrow: t }) => e ? /* @__PURE__ */ v("a", {
|
|
5514
5527
|
className: Z.toggleNarrow,
|
|
5515
5528
|
onClick: t,
|
|
5516
5529
|
children: /* @__PURE__ */ v(U, { icon: V.CHEVRON_LEFT })
|
|
5517
|
-
}) : null,
|
|
5530
|
+
}) : null, Ul = r(({ name: e, actions: t = [], toggleNarrow: n = !1, onToggleNarrow: r = () => {}, stickyHeader: i }, a) => /* @__PURE__ */ y("div", {
|
|
5518
5531
|
ref: a,
|
|
5519
5532
|
className: g(Z.header, i ? Z.stickyHeader : ""),
|
|
5520
5533
|
children: [
|
|
5521
|
-
/* @__PURE__ */ v(
|
|
5534
|
+
/* @__PURE__ */ v(Hl, {
|
|
5522
5535
|
toggleNarrow: n,
|
|
5523
5536
|
onClickToggleNarrow: r
|
|
5524
5537
|
}),
|
|
@@ -5538,14 +5551,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5538
5551
|
})
|
|
5539
5552
|
})
|
|
5540
5553
|
]
|
|
5541
|
-
})),
|
|
5554
|
+
})), Wl = ({ label: e }) => e ? /* @__PURE__ */ v("span", {
|
|
5542
5555
|
className: Z.label,
|
|
5543
5556
|
children: /* @__PURE__ */ v(Pi, {
|
|
5544
5557
|
color: e.color,
|
|
5545
5558
|
title: e.value,
|
|
5546
5559
|
small: e.small
|
|
5547
5560
|
})
|
|
5548
|
-
}) : null,
|
|
5561
|
+
}) : null, Gl = ({ name: e, icon: t, testId: n }) => {
|
|
5549
5562
|
let r = t && /* @__PURE__ */ v(U, {
|
|
5550
5563
|
icon: t.icon,
|
|
5551
5564
|
color: t.color || "#db2828"
|
|
@@ -5565,8 +5578,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5565
5578
|
children: r
|
|
5566
5579
|
})]
|
|
5567
5580
|
});
|
|
5568
|
-
},
|
|
5569
|
-
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ v(
|
|
5581
|
+
}, Kl = ({ item: e }) => {
|
|
5582
|
+
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ v(Gl, {
|
|
5570
5583
|
name: t,
|
|
5571
5584
|
icon: n,
|
|
5572
5585
|
testId: o && `${o}-name`
|
|
@@ -5592,10 +5605,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5592
5605
|
})
|
|
5593
5606
|
]
|
|
5594
5607
|
});
|
|
5595
|
-
},
|
|
5608
|
+
}, ql = ({ item: e }) => e.metaCount === void 0 ? null : /* @__PURE__ */ v(Pi, {
|
|
5596
5609
|
color: "rgba(0,0,0,0.25)",
|
|
5597
5610
|
title: e.metaCount
|
|
5598
|
-
}),
|
|
5611
|
+
}), Jl = ({ item: e, expanding: t }) => /* @__PURE__ */ v(Wr, {
|
|
5599
5612
|
expanded: !!t && !!e.active && !!e.content,
|
|
5600
5613
|
children: /* @__PURE__ */ v("div", {
|
|
5601
5614
|
className: Z.itemContent,
|
|
@@ -5604,7 +5617,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5604
5617
|
},
|
|
5605
5618
|
children: e.content
|
|
5606
5619
|
})
|
|
5607
|
-
}),
|
|
5620
|
+
}), Yl = r(({ item: e, index: t }, n) => {
|
|
5608
5621
|
var r;
|
|
5609
5622
|
let i = s(H), { actions: a, disabled: o, expanded: c, onClick: l, title: u, name: d, icon: f, testId: p } = e;
|
|
5610
5623
|
return /* @__PURE__ */ v("div", {
|
|
@@ -5624,13 +5637,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5624
5637
|
className: g(Z.expandIcon, c && Z.expanded),
|
|
5625
5638
|
children: /* @__PURE__ */ v(U, { icon: V.CHEVRON_RIGHT })
|
|
5626
5639
|
}),
|
|
5627
|
-
/* @__PURE__ */ v(
|
|
5640
|
+
/* @__PURE__ */ v(Gl, {
|
|
5628
5641
|
name: d,
|
|
5629
5642
|
icon: f
|
|
5630
5643
|
}),
|
|
5631
5644
|
/* @__PURE__ */ y("div", {
|
|
5632
5645
|
className: Z.right,
|
|
5633
|
-
children: [/* @__PURE__ */ v(
|
|
5646
|
+
children: [/* @__PURE__ */ v(ql, { item: e }), !(o || i) && a && /* @__PURE__ */ v("div", {
|
|
5634
5647
|
className: Z.actions,
|
|
5635
5648
|
children: /* @__PURE__ */ v(Ji, { actions: (r = e.actions) == null ? [] : r })
|
|
5636
5649
|
})]
|
|
@@ -5638,7 +5651,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5638
5651
|
]
|
|
5639
5652
|
}) })
|
|
5640
5653
|
});
|
|
5641
|
-
}),
|
|
5654
|
+
}), Xl = r(({ item: e, index: t, expanding: n, invokeEditOnRowClick: r, draggable: i }, a) => {
|
|
5642
5655
|
let o = s(H), c = (e, t, s, c, l, u) => {
|
|
5643
5656
|
let d = t.actions && t.actions.find((e) => {
|
|
5644
5657
|
var t;
|
|
@@ -5674,24 +5687,24 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5674
5687
|
className: Z.indentIcon,
|
|
5675
5688
|
children: /* @__PURE__ */ v(U, { icon: V.INDENT })
|
|
5676
5689
|
}) : null,
|
|
5677
|
-
/* @__PURE__ */ v(
|
|
5678
|
-
/* @__PURE__ */ v(
|
|
5690
|
+
/* @__PURE__ */ v(Wl, { label: t.label }),
|
|
5691
|
+
/* @__PURE__ */ v(Kl, { item: t }),
|
|
5679
5692
|
/* @__PURE__ */ y("div", {
|
|
5680
5693
|
className: Z.right,
|
|
5681
|
-
children: [/* @__PURE__ */ v(
|
|
5694
|
+
children: [/* @__PURE__ */ v(ql, { item: t }), !(t.disabled || o) && t.actions && /* @__PURE__ */ v("div", {
|
|
5682
5695
|
className: Z.actions,
|
|
5683
5696
|
children: /* @__PURE__ */ v(Ji, { actions: t.actions })
|
|
5684
5697
|
})]
|
|
5685
5698
|
})
|
|
5686
5699
|
]
|
|
5687
|
-
}), /* @__PURE__ */ v(
|
|
5700
|
+
}), /* @__PURE__ */ v(Jl, {
|
|
5688
5701
|
item: t,
|
|
5689
5702
|
expanding: n
|
|
5690
5703
|
})]
|
|
5691
5704
|
})
|
|
5692
5705
|
}, e);
|
|
5693
5706
|
};
|
|
5694
|
-
return e.type === "Heading" ? /* @__PURE__ */ v(
|
|
5707
|
+
return e.type === "Heading" ? /* @__PURE__ */ v(Yl, {
|
|
5695
5708
|
ref: a,
|
|
5696
5709
|
item: e,
|
|
5697
5710
|
index: t
|
|
@@ -5706,7 +5719,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5706
5719
|
opacity: +!s
|
|
5707
5720
|
}, n, r, i);
|
|
5708
5721
|
})(t, e) : c(t, e);
|
|
5709
|
-
}),
|
|
5722
|
+
}), Zl = ({ children: e, draggable: t, list: n, onListReorder: r }) => {
|
|
5710
5723
|
let [i, a] = m(null), o = (e) => {
|
|
5711
5724
|
a(e.active.id);
|
|
5712
5725
|
}, s = (e) => {
|
|
@@ -5729,7 +5742,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5729
5742
|
dropAnimation: null,
|
|
5730
5743
|
children: /* @__PURE__ */ v("div", {
|
|
5731
5744
|
className: Z.dragOverlay,
|
|
5732
|
-
children: /* @__PURE__ */ v(
|
|
5745
|
+
children: /* @__PURE__ */ v(Xl, {
|
|
5733
5746
|
draggable: t,
|
|
5734
5747
|
item: n.items[Number(i)],
|
|
5735
5748
|
index: Number(i)
|
|
@@ -5737,7 +5750,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5737
5750
|
})
|
|
5738
5751
|
}), document.body)]
|
|
5739
5752
|
}) : e;
|
|
5740
|
-
},
|
|
5753
|
+
}, Ql = ({ items: e, scrollDetails: t, children: n }) => {
|
|
5741
5754
|
let { scrollable: r, hideScrollbar: i, triggerScrollToActiveItem: a, infiniteScroll: s } = t, l = p(null), u = ir({
|
|
5742
5755
|
count: e.length,
|
|
5743
5756
|
getScrollElement: () => l.current,
|
|
@@ -5767,9 +5780,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5767
5780
|
children: n({ virtualizer: u })
|
|
5768
5781
|
})
|
|
5769
5782
|
});
|
|
5770
|
-
},
|
|
5783
|
+
}, $l = ({ items: e, scrollDetails: t, children: n }) => {
|
|
5771
5784
|
let { scrollable: r, hideScrollbar: i, infiniteScroll: a } = t;
|
|
5772
|
-
return a ? /* @__PURE__ */ v(
|
|
5785
|
+
return a ? /* @__PURE__ */ v(Ql, {
|
|
5773
5786
|
items: e,
|
|
5774
5787
|
scrollDetails: t,
|
|
5775
5788
|
children: ({ virtualizer: e }) => n({ virtualizer: e })
|
|
@@ -5780,7 +5793,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5780
5793
|
children: n({})
|
|
5781
5794
|
})
|
|
5782
5795
|
});
|
|
5783
|
-
},
|
|
5796
|
+
}, eu = ({ 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
5797
|
scrollable: !1,
|
|
5785
5798
|
hideScrollbar: !1,
|
|
5786
5799
|
triggerScrollToActiveItem: !1,
|
|
@@ -5793,17 +5806,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5793
5806
|
marginBottom: d
|
|
5794
5807
|
},
|
|
5795
5808
|
id: "scrollableDiv",
|
|
5796
|
-
children: [!s && /* @__PURE__ */ v(
|
|
5809
|
+
children: [!s && /* @__PURE__ */ v(Ul, {
|
|
5797
5810
|
name: e.name,
|
|
5798
5811
|
actions: e.actions,
|
|
5799
5812
|
toggleNarrow: i,
|
|
5800
5813
|
onToggleNarrow: a,
|
|
5801
5814
|
stickyHeader: c
|
|
5802
|
-
}), /* @__PURE__ */ v(
|
|
5815
|
+
}), /* @__PURE__ */ v(Zl, {
|
|
5803
5816
|
draggable: l,
|
|
5804
5817
|
list: e,
|
|
5805
5818
|
onListReorder: u,
|
|
5806
|
-
children: /* @__PURE__ */ v(
|
|
5819
|
+
children: /* @__PURE__ */ v($l, {
|
|
5807
5820
|
items: e.items,
|
|
5808
5821
|
scrollDetails: m,
|
|
5809
5822
|
children: ({ virtualizer: t }) => t ? t.getVirtualItems().map((r) => /* @__PURE__ */ v("div", {
|
|
@@ -5811,14 +5824,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5811
5824
|
className: Z.virtualRow,
|
|
5812
5825
|
style: { transform: `translateY(${r.start}px)` },
|
|
5813
5826
|
ref: t.measureElement,
|
|
5814
|
-
children: /* @__PURE__ */ v(
|
|
5827
|
+
children: /* @__PURE__ */ v(Xl, {
|
|
5815
5828
|
index: r.index,
|
|
5816
5829
|
draggable: l,
|
|
5817
5830
|
item: e.items[r.index],
|
|
5818
5831
|
expanding: n,
|
|
5819
5832
|
invokeEditOnRowClick: o
|
|
5820
5833
|
})
|
|
5821
|
-
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(
|
|
5834
|
+
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(Xl, {
|
|
5822
5835
|
index: t,
|
|
5823
5836
|
draggable: l,
|
|
5824
5837
|
item: e,
|
|
@@ -5827,7 +5840,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5827
5840
|
}) }, t))
|
|
5828
5841
|
})
|
|
5829
5842
|
})]
|
|
5830
|
-
}),
|
|
5843
|
+
}), tu = {
|
|
5831
5844
|
loader: "_loader_477i5_1",
|
|
5832
5845
|
fullViewPortSize: "_fullViewPortSize_477i5_7",
|
|
5833
5846
|
cover: "_cover_477i5_14",
|
|
@@ -5835,33 +5848,33 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5835
5848
|
content: "_content_477i5_44",
|
|
5836
5849
|
text: "_text_477i5_49",
|
|
5837
5850
|
details: "_details_477i5_53"
|
|
5838
|
-
},
|
|
5851
|
+
}, nu = ({ 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
5852
|
let l = s === Or.DARK ? Or.WHITE : Or.INHERIT, u = s === "white" ? "var(--color-background-raised)" : s === "light" ? "var(--color-background)" : "black";
|
|
5840
5853
|
return /* @__PURE__ */ v("div", {
|
|
5841
|
-
className: g(
|
|
5854
|
+
className: g(tu.loader, a ? tu.cover : "", { [tu.fullViewPortSize]: i }),
|
|
5842
5855
|
style: {
|
|
5843
5856
|
width: e,
|
|
5844
5857
|
height: t
|
|
5845
5858
|
},
|
|
5846
5859
|
"data-testid": c,
|
|
5847
5860
|
children: /* @__PURE__ */ v("div", {
|
|
5848
|
-
className:
|
|
5861
|
+
className: tu.dimmer,
|
|
5849
5862
|
style: {
|
|
5850
5863
|
background: u,
|
|
5851
5864
|
color: l
|
|
5852
5865
|
},
|
|
5853
5866
|
children: /* @__PURE__ */ y("div", {
|
|
5854
|
-
className:
|
|
5867
|
+
className: tu.content,
|
|
5855
5868
|
"data-testid": c && `${c}-content`,
|
|
5856
5869
|
children: [
|
|
5857
5870
|
o,
|
|
5858
5871
|
n && /* @__PURE__ */ v("div", {
|
|
5859
|
-
className:
|
|
5872
|
+
className: tu.text,
|
|
5860
5873
|
"data-testid": c && `${c}-text`,
|
|
5861
5874
|
children: n
|
|
5862
5875
|
}),
|
|
5863
5876
|
r && /* @__PURE__ */ v("div", {
|
|
5864
|
-
className:
|
|
5877
|
+
className: tu.details,
|
|
5865
5878
|
"data-testid": c && `${c}-details`,
|
|
5866
5879
|
children: r
|
|
5867
5880
|
})
|
|
@@ -5869,15 +5882,15 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5869
5882
|
})
|
|
5870
5883
|
})
|
|
5871
5884
|
});
|
|
5872
|
-
},
|
|
5885
|
+
}, ru = {
|
|
5873
5886
|
menu: "_menu_12x4u_1",
|
|
5874
5887
|
header: "_header_12x4u_11",
|
|
5875
5888
|
item: "_item_12x4u_27",
|
|
5876
5889
|
heading: "_heading_12x4u_32"
|
|
5877
|
-
},
|
|
5890
|
+
}, iu = ({ option: e, onChange: t }) => {
|
|
5878
5891
|
let { key: n, label: r, selected: i, testId: a } = e == null ? {} : e;
|
|
5879
5892
|
return /* @__PURE__ */ v("div", {
|
|
5880
|
-
className:
|
|
5893
|
+
className: ru.item,
|
|
5881
5894
|
children: /* @__PURE__ */ v(ci, {
|
|
5882
5895
|
label: r,
|
|
5883
5896
|
noMargin: !0,
|
|
@@ -5886,17 +5899,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5886
5899
|
testId: a
|
|
5887
5900
|
})
|
|
5888
5901
|
}, n);
|
|
5889
|
-
},
|
|
5890
|
-
className:
|
|
5902
|
+
}, au = ({ label: e }) => /* @__PURE__ */ v("div", {
|
|
5903
|
+
className: ru.heading,
|
|
5891
5904
|
children: e
|
|
5892
|
-
}),
|
|
5905
|
+
}), ou = /* @__PURE__ */ function(e) {
|
|
5893
5906
|
return e.HEADING = "Heading", e.DIVIDER = "Divider", e.DEFAULT = "Default", e;
|
|
5894
|
-
}({}),
|
|
5895
|
-
className: g("menu",
|
|
5907
|
+
}({}), su = ({ options: e, onChangeOptions: t, showHeader: n, maxHeight: r, testId: i }) => /* @__PURE__ */ y("div", {
|
|
5908
|
+
className: g("menu", ru.menu),
|
|
5896
5909
|
style: { maxHeight: r },
|
|
5897
5910
|
"data-testid": i ? `${i}-option-dropdown-layer` : void 0,
|
|
5898
5911
|
children: [n && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
|
|
5899
|
-
className:
|
|
5912
|
+
className: ru.header,
|
|
5900
5913
|
children: [
|
|
5901
5914
|
/* @__PURE__ */ v("a", {
|
|
5902
5915
|
onClick: (n) => {
|
|
@@ -5928,9 +5941,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5928
5941
|
]
|
|
5929
5942
|
}), /* @__PURE__ */ v(_a, { margin: 0 })] }), e.map((n, r) => {
|
|
5930
5943
|
switch (n.type) {
|
|
5931
|
-
case
|
|
5932
|
-
case
|
|
5933
|
-
default: return /* @__PURE__ */ v(
|
|
5944
|
+
case ou.HEADING: return /* @__PURE__ */ v(au, { label: n.label }, r);
|
|
5945
|
+
case ou.DIVIDER: return /* @__PURE__ */ v(_a, { margin: 0 }, r);
|
|
5946
|
+
default: return /* @__PURE__ */ v(iu, {
|
|
5934
5947
|
option: n,
|
|
5935
5948
|
onChange: (r) => {
|
|
5936
5949
|
let { value: i } = n;
|
|
@@ -5942,7 +5955,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5942
5955
|
}, r);
|
|
5943
5956
|
}
|
|
5944
5957
|
})]
|
|
5945
|
-
}),
|
|
5958
|
+
}), cu = ({ 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
5959
|
testId: c,
|
|
5947
5960
|
disabled: t,
|
|
5948
5961
|
menu: {
|
|
@@ -5951,7 +5964,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5951
5964
|
label: n,
|
|
5952
5965
|
trigger: Cr.DROP_DOWN_BUTTON,
|
|
5953
5966
|
possiblePlacements: ["top-start", "bottom-start"],
|
|
5954
|
-
sections: /* @__PURE__ */ v(
|
|
5967
|
+
sections: /* @__PURE__ */ v(su, {
|
|
5955
5968
|
testId: c,
|
|
5956
5969
|
options: r,
|
|
5957
5970
|
onChangeOptions: (t, n) => {
|
|
@@ -5961,13 +5974,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5961
5974
|
maxHeight: s
|
|
5962
5975
|
})
|
|
5963
5976
|
}
|
|
5964
|
-
}),
|
|
5977
|
+
}), lu = {
|
|
5965
5978
|
page: "_page_beskc_1",
|
|
5966
5979
|
scroll: "_scroll_beskc_23"
|
|
5967
|
-
},
|
|
5980
|
+
}, uu = ({ children: e, left: t = "var(--size-sidebar)", padding: n = !0, scroll: r = !0, top: i = "var(--size-topbar)" }) => {
|
|
5968
5981
|
let a = typeof n == "string" ? n : n === !0 ? "var(--padding)" : "0";
|
|
5969
5982
|
return /* @__PURE__ */ v("div", {
|
|
5970
|
-
className: g(
|
|
5983
|
+
className: g(lu.page, r ? lu.scroll : ""),
|
|
5971
5984
|
style: {
|
|
5972
5985
|
left: t,
|
|
5973
5986
|
padding: a,
|
|
@@ -5975,12 +5988,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
5975
5988
|
},
|
|
5976
5989
|
children: e
|
|
5977
5990
|
});
|
|
5978
|
-
},
|
|
5991
|
+
}, du = { printHeader: "_printHeader_o7xxx_1" }, fu = ({ logo: e, alt: t, logoWidth: n = "100px" }) => /* @__PURE__ */ v("img", {
|
|
5979
5992
|
src: e,
|
|
5980
5993
|
alt: t,
|
|
5981
|
-
className:
|
|
5994
|
+
className: du.printHeader,
|
|
5982
5995
|
style: { width: n }
|
|
5983
|
-
}),
|
|
5996
|
+
}), pu = ({ 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
5997
|
let m = s(H), h = f !== void 0, { simpleInputs: _, options: b, selectedOptions: x } = h ? {
|
|
5985
5998
|
simpleInputs: !1,
|
|
5986
5999
|
options: f,
|
|
@@ -6011,44 +6024,44 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6011
6024
|
}, n);
|
|
6012
6025
|
})]
|
|
6013
6026
|
});
|
|
6014
|
-
},
|
|
6027
|
+
}, mu = {
|
|
6015
6028
|
richTextToolbar: "_richTextToolbar_1gbkk_1",
|
|
6016
6029
|
richTextToolbarContainer: "_richTextToolbarContainer_1gbkk_5"
|
|
6017
|
-
},
|
|
6030
|
+
}, hu = /* @__PURE__ */ function(e) {
|
|
6018
6031
|
return e.BOLD = "bold", e.ITALIC = "italic", e.CODE = "code", e.UL = "ul", e.OL = "ol", e;
|
|
6019
|
-
}({}),
|
|
6032
|
+
}({}), gu = ({ editor: e, disabled: t = !1, toolbarComponent: n = null }) => {
|
|
6020
6033
|
var r, i, a, o, s;
|
|
6021
6034
|
let c = [
|
|
6022
6035
|
{
|
|
6023
|
-
icon:
|
|
6036
|
+
icon: hu.BOLD,
|
|
6024
6037
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBold().run(),
|
|
6025
6038
|
active: (r = e == null ? void 0 : e.isActive("bold")) == null ? !1 : r
|
|
6026
6039
|
},
|
|
6027
6040
|
{
|
|
6028
|
-
icon:
|
|
6041
|
+
icon: hu.ITALIC,
|
|
6029
6042
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleItalic().run(),
|
|
6030
6043
|
active: (i = e == null ? void 0 : e.isActive("italic")) == null ? !1 : i
|
|
6031
6044
|
},
|
|
6032
6045
|
{
|
|
6033
|
-
icon:
|
|
6046
|
+
icon: hu.CODE,
|
|
6034
6047
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleCode().run(),
|
|
6035
6048
|
active: (a = e == null ? void 0 : e.isActive("code")) == null ? !1 : a
|
|
6036
6049
|
},
|
|
6037
6050
|
{
|
|
6038
|
-
icon:
|
|
6051
|
+
icon: hu.UL,
|
|
6039
6052
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBulletList().run(),
|
|
6040
6053
|
active: (o = e == null ? void 0 : e.isActive("bulletList")) == null ? !1 : o
|
|
6041
6054
|
},
|
|
6042
6055
|
{
|
|
6043
|
-
icon:
|
|
6056
|
+
icon: hu.OL,
|
|
6044
6057
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleOrderedList().run(),
|
|
6045
6058
|
active: (s = e == null ? void 0 : e.isActive("orderedList")) == null ? !1 : s
|
|
6046
6059
|
}
|
|
6047
6060
|
];
|
|
6048
6061
|
return /* @__PURE__ */ y("div", {
|
|
6049
|
-
className:
|
|
6062
|
+
className: mu.richTextToolbarContainer,
|
|
6050
6063
|
children: [/* @__PURE__ */ v("div", {
|
|
6051
|
-
className:
|
|
6064
|
+
className: mu.richTextToolbar,
|
|
6052
6065
|
children: c.map((e, n) => /* @__PURE__ */ v(K, {
|
|
6053
6066
|
small: !0,
|
|
6054
6067
|
round: !0,
|
|
@@ -6061,7 +6074,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6061
6074
|
}, n))
|
|
6062
6075
|
}), n]
|
|
6063
6076
|
});
|
|
6064
|
-
},
|
|
6077
|
+
}, _u = {
|
|
6065
6078
|
inputInTable: "_inputInTable_gb097_1",
|
|
6066
6079
|
inputHover: "_inputHover_gb097_13",
|
|
6067
6080
|
inputFocus: "_inputFocus_gb097_18",
|
|
@@ -6070,7 +6083,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6070
6083
|
inputDisabled: "_inputDisabled_gb097_61",
|
|
6071
6084
|
hideScrollbars: "_hideScrollbars_gb097_67",
|
|
6072
6085
|
richTextInput: "_richTextInput_gb097_77"
|
|
6073
|
-
},
|
|
6086
|
+
}, vu = a(r(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i }, a) => {
|
|
6074
6087
|
let o = s(H), u = r || o, d = fr({
|
|
6075
6088
|
extensions: [
|
|
6076
6089
|
pr,
|
|
@@ -6097,17 +6110,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6097
6110
|
clearContent: () => d == null ? void 0 : d.commands.clearContent(!1),
|
|
6098
6111
|
editor: d
|
|
6099
6112
|
}), [d]), /* @__PURE__ */ y("div", {
|
|
6100
|
-
className:
|
|
6101
|
-
children: [/* @__PURE__ */ v(
|
|
6113
|
+
className: _u.richTextInput,
|
|
6114
|
+
children: [/* @__PURE__ */ v(gu, {
|
|
6102
6115
|
editor: d,
|
|
6103
6116
|
disabled: u,
|
|
6104
6117
|
toolbarComponent: i
|
|
6105
6118
|
}), /* @__PURE__ */ v(dr, { editor: d })]
|
|
6106
6119
|
});
|
|
6107
|
-
})),
|
|
6120
|
+
})), yu = { row: "_row_n16je_1" }, bu = ({ 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
6121
|
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
6122
|
return /* @__PURE__ */ v("div", {
|
|
6110
|
-
className: g(
|
|
6123
|
+
className: g(yu.row),
|
|
6111
6124
|
style: {
|
|
6112
6125
|
alignItems: t,
|
|
6113
6126
|
justifyContent: n,
|
|
@@ -6123,7 +6136,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6123
6136
|
"data-testid": d,
|
|
6124
6137
|
children: p
|
|
6125
6138
|
});
|
|
6126
|
-
},
|
|
6139
|
+
}, xu = {
|
|
6127
6140
|
inputInTable: "_inputInTable_1oy1z_1",
|
|
6128
6141
|
inputHover: "_inputHover_1oy1z_13",
|
|
6129
6142
|
inputFocus: "_inputFocus_1oy1z_18",
|
|
@@ -6142,7 +6155,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6142
6155
|
experimental: "_experimental_1oy1z_155",
|
|
6143
6156
|
active: "_active_1oy1z_159",
|
|
6144
6157
|
icon: "_icon_1oy1z_163"
|
|
6145
|
-
},
|
|
6158
|
+
}, Su = a(({ isOpen: e, label: t, icon: n, invalid: r }) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(W, {
|
|
6146
6159
|
text: t,
|
|
6147
6160
|
enabled: !e,
|
|
6148
6161
|
placement: "right-center",
|
|
@@ -6151,7 +6164,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6151
6164
|
padding: "var(--padding-sm)",
|
|
6152
6165
|
display: "block",
|
|
6153
6166
|
children: /* @__PURE__ */ v("span", {
|
|
6154
|
-
className:
|
|
6167
|
+
className: xu.icon,
|
|
6155
6168
|
children: /* @__PURE__ */ v(Pi, {
|
|
6156
6169
|
small: !0,
|
|
6157
6170
|
title: r ? "!" : void 0,
|
|
@@ -6160,18 +6173,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6160
6173
|
})
|
|
6161
6174
|
})
|
|
6162
6175
|
}), /* @__PURE__ */ v("span", {
|
|
6163
|
-
className:
|
|
6176
|
+
className: xu.label,
|
|
6164
6177
|
children: t
|
|
6165
|
-
})] }), (e, t) => er(e, t)),
|
|
6166
|
-
className:
|
|
6178
|
+
})] }), (e, t) => er(e, t)), Cu = ({ isOpen: e, items: t, sectionIndex: n, onClick: r, testId: i }) => /* @__PURE__ */ v("div", {
|
|
6179
|
+
className: xu.list,
|
|
6167
6180
|
children: t.map((t, a) => {
|
|
6168
6181
|
let o = `${n}_${a}`;
|
|
6169
6182
|
return /* @__PURE__ */ v("a", {
|
|
6170
6183
|
href: t.value,
|
|
6171
|
-
className: g(
|
|
6184
|
+
className: g(xu.item, t.isActive ? xu.active : "", t.isExperimental ? xu.experimental : ""),
|
|
6172
6185
|
onClick: (e) => r(e, t.value, t.label, t.onClick),
|
|
6173
6186
|
"data-testid": i,
|
|
6174
|
-
children: /* @__PURE__ */ v(
|
|
6187
|
+
children: /* @__PURE__ */ v(Su, {
|
|
6175
6188
|
label: t.label,
|
|
6176
6189
|
icon: t.icon,
|
|
6177
6190
|
invalid: t.invalid,
|
|
@@ -6179,16 +6192,16 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6179
6192
|
}, o)
|
|
6180
6193
|
}, o);
|
|
6181
6194
|
})
|
|
6182
|
-
}),
|
|
6183
|
-
className:
|
|
6195
|
+
}), wu = ({ isOpen: t, sections: n, onClick: r }) => /* @__PURE__ */ v(_, { children: n.map((n, i) => /* @__PURE__ */ y(e.Fragment, { children: [/* @__PURE__ */ v("h5", {
|
|
6196
|
+
className: xu.subtitle,
|
|
6184
6197
|
children: n.heading.toUpperCase()
|
|
6185
|
-
}), /* @__PURE__ */ v(
|
|
6198
|
+
}), /* @__PURE__ */ v(Cu, {
|
|
6186
6199
|
isOpen: t,
|
|
6187
6200
|
items: n.items,
|
|
6188
6201
|
sectionIndex: i,
|
|
6189
6202
|
onClick: r,
|
|
6190
6203
|
testId: n.testId
|
|
6191
|
-
})] }, i)) }),
|
|
6204
|
+
})] }, i)) }), Tu = a(({ options: e, startOpen: t = !1, onShiftClickToggleOpen: n = () => {}, top: r }) => {
|
|
6192
6205
|
let [i, a] = m(t), o = (e, t, n, r) => {
|
|
6193
6206
|
e.preventDefault(), typeof r == "function" && (e.currentTarget.value = t, e.currentTarget.label = n, r(e)), a(!1);
|
|
6194
6207
|
}, s = e.sections.length > 0;
|
|
@@ -6209,13 +6222,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6209
6222
|
icon: V.LEFT
|
|
6210
6223
|
}),
|
|
6211
6224
|
children: /* @__PURE__ */ v("div", {
|
|
6212
|
-
className: g(
|
|
6225
|
+
className: g(xu.sidebar, i ? "" : xu.collapsed),
|
|
6213
6226
|
children: s && /* @__PURE__ */ y("div", {
|
|
6214
|
-
className:
|
|
6227
|
+
className: xu.inner,
|
|
6215
6228
|
children: [/* @__PURE__ */ v("h4", {
|
|
6216
|
-
className:
|
|
6229
|
+
className: xu.title,
|
|
6217
6230
|
children: e.title
|
|
6218
|
-
}), /* @__PURE__ */ v(
|
|
6231
|
+
}), /* @__PURE__ */ v(wu, {
|
|
6219
6232
|
isOpen: i,
|
|
6220
6233
|
sections: e.sections,
|
|
6221
6234
|
onClick: o
|
|
@@ -6223,18 +6236,18 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6223
6236
|
})
|
|
6224
6237
|
})
|
|
6225
6238
|
});
|
|
6226
|
-
}, (e, t) => er(e, t)),
|
|
6239
|
+
}, (e, t) => er(e, t)), Eu = {
|
|
6227
6240
|
skeletonContainer: "_skeletonContainer_mcfxp_9",
|
|
6228
6241
|
skeleton: "_skeleton_mcfxp_9"
|
|
6229
|
-
},
|
|
6242
|
+
}, Du = ({ count: e, width: t, height: n }) => /* @__PURE__ */ v(gr, {
|
|
6230
6243
|
baseColor: "var(--color-skeleton-base)",
|
|
6231
6244
|
highlightColor: "var(--color-skeleton-highlight)",
|
|
6232
|
-
containerClassName:
|
|
6233
|
-
className:
|
|
6245
|
+
containerClassName: Eu.skeletonContainer,
|
|
6246
|
+
className: Eu.skeleton,
|
|
6234
6247
|
count: e,
|
|
6235
6248
|
width: t,
|
|
6236
6249
|
height: n
|
|
6237
|
-
}),
|
|
6250
|
+
}), Ou = {
|
|
6238
6251
|
tabs: "_tabs_1y79t_1",
|
|
6239
6252
|
padding: "_padding_1y79t_7",
|
|
6240
6253
|
margin: "_margin_1y79t_11",
|
|
@@ -6245,12 +6258,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6245
6258
|
disabled: "_disabled_1y79t_61",
|
|
6246
6259
|
left: "_left_1y79t_65",
|
|
6247
6260
|
right: "_right_1y79t_65"
|
|
6248
|
-
},
|
|
6261
|
+
}, ku = ({ label: e, url: t, hidden: n, disabled: r, active: i, onClick: a, right: o, invalid: s, badge: c, testId: l }) => {
|
|
6249
6262
|
let u = getComputedStyle(document.body).getPropertyValue("--color-text-error");
|
|
6250
6263
|
return /* @__PURE__ */ v("a", {
|
|
6251
6264
|
id: e == null ? void 0 : e.toString(),
|
|
6252
6265
|
href: t,
|
|
6253
|
-
className: g(
|
|
6266
|
+
className: g(Ou.item, i ? Ou.active : "", r ? Ou.disabled : "", n && !i ? Ou.hidden : "", o ? Ou.right : Ou.left),
|
|
6254
6267
|
onClick: a,
|
|
6255
6268
|
"data-testid": l,
|
|
6256
6269
|
children: s ? /* @__PURE__ */ v(Pi, {
|
|
@@ -6266,10 +6279,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6266
6279
|
children: e
|
|
6267
6280
|
}) : e
|
|
6268
6281
|
});
|
|
6269
|
-
},
|
|
6270
|
-
className: g(n ?
|
|
6282
|
+
}, Au = ({ children: e, activeTabIndex: t, contentPadding: n }) => Array.isArray(e) ? /* @__PURE__ */ v("div", {
|
|
6283
|
+
className: g(n ? Ou.contentPadding : ""),
|
|
6271
6284
|
children: e.map((e, n) => t === n && e)
|
|
6272
|
-
}) : null,
|
|
6285
|
+
}) : null, ju = ({ 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
6286
|
let p = s(H), m = l !== void 0, h = n ? n.map((e, t) => {
|
|
6274
6287
|
var n;
|
|
6275
6288
|
return {
|
|
@@ -6293,11 +6306,11 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6293
6306
|
}
|
|
6294
6307
|
};
|
|
6295
6308
|
return b ? /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
|
|
6296
|
-
className: g(
|
|
6309
|
+
className: g(Ou.tabs, a ? Ou.padding : "", o ? Ou.margin : ""),
|
|
6297
6310
|
"data-testid": f,
|
|
6298
6311
|
children: b.map((e, t) => {
|
|
6299
6312
|
let { label: n, url: r, hidden: i, disabled: a, value: o, right: s, invalid: c, badge: l, testId: u } = e;
|
|
6300
|
-
return /* @__PURE__ */ v(
|
|
6313
|
+
return /* @__PURE__ */ v(ku, {
|
|
6301
6314
|
label: n,
|
|
6302
6315
|
url: r,
|
|
6303
6316
|
hidden: i,
|
|
@@ -6310,12 +6323,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6310
6323
|
testId: u
|
|
6311
6324
|
}, t);
|
|
6312
6325
|
})
|
|
6313
|
-
}), /* @__PURE__ */ v(
|
|
6326
|
+
}), /* @__PURE__ */ v(Au, {
|
|
6314
6327
|
activeTabIndex: w == null ? 0 : w,
|
|
6315
6328
|
contentPadding: c,
|
|
6316
6329
|
children: n
|
|
6317
6330
|
})] }) : null;
|
|
6318
|
-
},
|
|
6331
|
+
}, Mu = ({ children: e, href: t = void 0, target: n = void 0, testId: r, onClick: i, component: a = "a" }) => /* @__PURE__ */ v(a, {
|
|
6319
6332
|
href: t,
|
|
6320
6333
|
to: t,
|
|
6321
6334
|
target: n,
|
|
@@ -6325,7 +6338,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6325
6338
|
link: !0,
|
|
6326
6339
|
children: e
|
|
6327
6340
|
})
|
|
6328
|
-
}),
|
|
6341
|
+
}), Nu = {
|
|
6329
6342
|
inputInTable: "_inputInTable_q0tl0_1",
|
|
6330
6343
|
inputHover: "_inputHover_q0tl0_13",
|
|
6331
6344
|
inputFocus: "_inputFocus_q0tl0_18",
|
|
@@ -6336,9 +6349,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6336
6349
|
textarea: "_textarea_q0tl0_77",
|
|
6337
6350
|
small: "_small_q0tl0_116",
|
|
6338
6351
|
monospace: "_monospace_q0tl0_155"
|
|
6339
|
-
},
|
|
6352
|
+
}, Pu = ({ 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
6353
|
let S = s(H), C = /* @__PURE__ */ v("textarea", {
|
|
6341
|
-
className: g(
|
|
6354
|
+
className: g(Nu.textarea, f ? Nu.error : "", p ? Nu.warning : "", y ? Nu.monospace : "", b ? Nu.small : ""),
|
|
6342
6355
|
name: e,
|
|
6343
6356
|
value: t,
|
|
6344
6357
|
placeholder: n,
|
|
@@ -6380,10 +6393,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6380
6393
|
menu: "_menu_oyr59_139",
|
|
6381
6394
|
active: "_active_oyr59_168",
|
|
6382
6395
|
alert: "_alert_oyr59_193"
|
|
6383
|
-
},
|
|
6396
|
+
}, Fu = ({ warning: e }) => /* @__PURE__ */ v("div", {
|
|
6384
6397
|
className: Q.alert,
|
|
6385
6398
|
children: e
|
|
6386
|
-
}),
|
|
6399
|
+
}), Iu = ({ icon: e, url: t, onClick: n }) => {
|
|
6387
6400
|
let r = /* @__PURE__ */ v(U, { icon: e });
|
|
6388
6401
|
return t ? /* @__PURE__ */ v("a", {
|
|
6389
6402
|
href: t,
|
|
@@ -6395,7 +6408,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6395
6408
|
className: Q.appSwitcher,
|
|
6396
6409
|
children: r
|
|
6397
6410
|
});
|
|
6398
|
-
},
|
|
6411
|
+
}, Lu = ({ label: e, logo: t, url: n, version: r, onClick: i }) => {
|
|
6399
6412
|
let a = /* @__PURE__ */ y("div", {
|
|
6400
6413
|
className: Q.title,
|
|
6401
6414
|
children: [
|
|
@@ -6424,9 +6437,9 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6424
6437
|
children: a
|
|
6425
6438
|
})
|
|
6426
6439
|
});
|
|
6427
|
-
},
|
|
6440
|
+
}, Ru = /* @__PURE__ */ function(e) {
|
|
6428
6441
|
return e.LINK = "Link", e.BUTTON = "Button", e.MENU = "Menu", e.COMPONENT = "Component", e;
|
|
6429
|
-
}({}),
|
|
6442
|
+
}({}), zu = ({ label: e, url: t, icon: n, onClick: r, active: i, disabled: a, testId: o, component: c = "a" }) => {
|
|
6430
6443
|
let l = s(H);
|
|
6431
6444
|
return /* @__PURE__ */ y(c, {
|
|
6432
6445
|
className: g(Q.link, i ? Q.active : ""),
|
|
@@ -6443,11 +6456,11 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6443
6456
|
children: e
|
|
6444
6457
|
})]
|
|
6445
6458
|
});
|
|
6446
|
-
},
|
|
6459
|
+
}, Bu = ({ element: e }) => {
|
|
6447
6460
|
switch (e.type) {
|
|
6448
|
-
case
|
|
6461
|
+
case Ru.LINK: return /* @__PURE__ */ v("div", {
|
|
6449
6462
|
className: Q.item,
|
|
6450
|
-
children: /* @__PURE__ */ v(
|
|
6463
|
+
children: /* @__PURE__ */ v(zu, {
|
|
6451
6464
|
label: e.label,
|
|
6452
6465
|
url: e.url,
|
|
6453
6466
|
icon: e.icon,
|
|
@@ -6458,7 +6471,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6458
6471
|
component: e.component
|
|
6459
6472
|
})
|
|
6460
6473
|
});
|
|
6461
|
-
case
|
|
6474
|
+
case Ru.BUTTON: return /* @__PURE__ */ v("div", {
|
|
6462
6475
|
className: g(Q.item, Q.button),
|
|
6463
6476
|
children: /* @__PURE__ */ v(K, {
|
|
6464
6477
|
label: e.label,
|
|
@@ -6470,7 +6483,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6470
6483
|
testId: e.testId
|
|
6471
6484
|
})
|
|
6472
6485
|
});
|
|
6473
|
-
case
|
|
6486
|
+
case Ru.MENU: return /* @__PURE__ */ v("div", {
|
|
6474
6487
|
className: g(Q.item, Q.menu),
|
|
6475
6488
|
children: /* @__PURE__ */ v(Ki, {
|
|
6476
6489
|
maxHeight: "100%",
|
|
@@ -6478,7 +6491,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6478
6491
|
trigger: Cr.COMPONENT,
|
|
6479
6492
|
fullHeightTrigger: !0,
|
|
6480
6493
|
placement: "bottom-start",
|
|
6481
|
-
component: /* @__PURE__ */ v(
|
|
6494
|
+
component: /* @__PURE__ */ v(zu, {
|
|
6482
6495
|
label: e.label,
|
|
6483
6496
|
icon: e.icon,
|
|
6484
6497
|
onClick: e.onClick
|
|
@@ -6487,50 +6500,50 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6487
6500
|
}
|
|
6488
6501
|
})
|
|
6489
6502
|
});
|
|
6490
|
-
case
|
|
6503
|
+
case Ru.COMPONENT: return /* @__PURE__ */ v("div", {
|
|
6491
6504
|
className: Q.item,
|
|
6492
6505
|
children: e.component
|
|
6493
6506
|
});
|
|
6494
6507
|
default: return null;
|
|
6495
6508
|
}
|
|
6496
|
-
},
|
|
6509
|
+
}, Vu = ({ 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(Fu, { warning: i }), /* @__PURE__ */ y("div", {
|
|
6497
6510
|
className: g(Q.topbar, o ? Q.fixed : ""),
|
|
6498
6511
|
style: { height: a },
|
|
6499
6512
|
children: [
|
|
6500
|
-
!!t && /* @__PURE__ */ v(
|
|
6513
|
+
!!t && /* @__PURE__ */ v(Iu, {
|
|
6501
6514
|
icon: t.icon,
|
|
6502
6515
|
url: t.url,
|
|
6503
6516
|
onClick: t.onClick
|
|
6504
6517
|
}),
|
|
6505
6518
|
/* @__PURE__ */ y("div", {
|
|
6506
6519
|
className: Q.left,
|
|
6507
|
-
children: [e && /* @__PURE__ */ v(
|
|
6520
|
+
children: [e && /* @__PURE__ */ v(Lu, {
|
|
6508
6521
|
label: e.label,
|
|
6509
6522
|
logo: e.logo,
|
|
6510
6523
|
url: e.url,
|
|
6511
6524
|
version: e.version,
|
|
6512
6525
|
onClick: e.onClick
|
|
6513
|
-
}), n.map((e, t) => e ? /* @__PURE__ */ v(
|
|
6526
|
+
}), n.map((e, t) => e ? /* @__PURE__ */ v(Bu, { element: e }, t) : null)]
|
|
6514
6527
|
}),
|
|
6515
6528
|
/* @__PURE__ */ v("div", {
|
|
6516
6529
|
className: Q.right,
|
|
6517
|
-
children: r.map((e, t) => e ? /* @__PURE__ */ v(
|
|
6530
|
+
children: r.map((e, t) => e ? /* @__PURE__ */ v(Bu, { element: e }, t) : null)
|
|
6518
6531
|
})
|
|
6519
6532
|
]
|
|
6520
|
-
})] }),
|
|
6533
|
+
})] }), Hu = {
|
|
6521
6534
|
popConfirm: "_popConfirm_1x6ye_1",
|
|
6522
6535
|
content: "_content_1x6ye_7",
|
|
6523
6536
|
buttons: "_buttons_1x6ye_13"
|
|
6524
|
-
},
|
|
6525
|
-
className:
|
|
6537
|
+
}, Uu = ({ title: e, okText: t, onClickOk: n, disableConfirmButton: r, cancelText: i, onClickCancel: a, close: o, testId: s }) => /* @__PURE__ */ y("div", {
|
|
6538
|
+
className: Hu.popConfirm,
|
|
6526
6539
|
children: [e && /* @__PURE__ */ v("div", {
|
|
6527
|
-
className:
|
|
6540
|
+
className: Hu.content,
|
|
6528
6541
|
children: /* @__PURE__ */ v(ha, {
|
|
6529
6542
|
small: !0,
|
|
6530
6543
|
children: e
|
|
6531
6544
|
})
|
|
6532
6545
|
}), /* @__PURE__ */ y("div", {
|
|
6533
|
-
className:
|
|
6546
|
+
className: Hu.buttons,
|
|
6534
6547
|
children: [/* @__PURE__ */ v(K, {
|
|
6535
6548
|
small: !0,
|
|
6536
6549
|
colored: !0,
|
|
@@ -6545,8 +6558,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6545
6558
|
testId: `${s}-cancel-button`
|
|
6546
6559
|
})]
|
|
6547
6560
|
})]
|
|
6548
|
-
}),
|
|
6549
|
-
content: /* @__PURE__ */ v(
|
|
6561
|
+
}), Wu = ({ 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, {
|
|
6562
|
+
content: /* @__PURE__ */ v(Uu, {
|
|
6550
6563
|
title: i,
|
|
6551
6564
|
okText: s,
|
|
6552
6565
|
onClickOk: c,
|
|
@@ -6561,14 +6574,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6561
6574
|
overflowContainer: u,
|
|
6562
6575
|
testId: d,
|
|
6563
6576
|
children: e
|
|
6564
|
-
}),
|
|
6577
|
+
}), Gu = {
|
|
6565
6578
|
tree: "_tree_coxxe_1",
|
|
6566
6579
|
toggle: "_toggle_coxxe_8",
|
|
6567
6580
|
dropTarget: "_dropTarget_coxxe_15",
|
|
6568
6581
|
placeholder: "_placeholder_coxxe_30",
|
|
6569
6582
|
draggingSource: "_draggingSource_coxxe_36",
|
|
6570
6583
|
placeholderContainer: "_placeholderContainer_coxxe_39"
|
|
6571
|
-
},
|
|
6584
|
+
}, Ku = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
|
|
6572
6585
|
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
6586
|
e.stopPropagation(), i(l);
|
|
6574
6587
|
}, w = (e) => {
|
|
@@ -6595,7 +6608,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6595
6608
|
className: g(Z.itemHeader, _ ? Z.noPointerEvents : ""),
|
|
6596
6609
|
children: [
|
|
6597
6610
|
a && /* @__PURE__ */ v("div", {
|
|
6598
|
-
className:
|
|
6611
|
+
className: Gu.toggle,
|
|
6599
6612
|
children: /* @__PURE__ */ v(K, {
|
|
6600
6613
|
basic: !0,
|
|
6601
6614
|
colored: r ? !0 : wr.MUTED,
|
|
@@ -6609,10 +6622,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6609
6622
|
className: Z.drag,
|
|
6610
6623
|
children: /* @__PURE__ */ v(U, { icon: V.DRAG })
|
|
6611
6624
|
}),
|
|
6612
|
-
/* @__PURE__ */ v(
|
|
6625
|
+
/* @__PURE__ */ v(Kl, { item: u }),
|
|
6613
6626
|
/* @__PURE__ */ y("div", {
|
|
6614
6627
|
className: Z.right,
|
|
6615
|
-
children: [/* @__PURE__ */ v(
|
|
6628
|
+
children: [/* @__PURE__ */ v(ql, { item: u }), !f && h.length > 0 && /* @__PURE__ */ v("div", {
|
|
6616
6629
|
className: Z.actions,
|
|
6617
6630
|
children: /* @__PURE__ */ v(Ji, { actions: h })
|
|
6618
6631
|
})]
|
|
@@ -6620,10 +6633,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6620
6633
|
]
|
|
6621
6634
|
})
|
|
6622
6635
|
});
|
|
6623
|
-
},
|
|
6624
|
-
className:
|
|
6636
|
+
}, qu = ({ depth: e, indent: t = "var(--size-sm)" }) => /* @__PURE__ */ v("div", {
|
|
6637
|
+
className: Gu.placeholder,
|
|
6625
6638
|
style: { left: `calc(${t} * ${e})` }
|
|
6626
|
-
}),
|
|
6639
|
+
}), Ju = ({ 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
6640
|
var x;
|
|
6628
6641
|
let S = l == null ? p(null) : l, C = (e) => {
|
|
6629
6642
|
i && i(e);
|
|
@@ -6681,7 +6694,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6681
6694
|
"data-testid": a,
|
|
6682
6695
|
className: Z.list,
|
|
6683
6696
|
style: { height: g },
|
|
6684
|
-
children: [e.name && !e.noHeader && /* @__PURE__ */ v(
|
|
6697
|
+
children: [e.name && !e.noHeader && /* @__PURE__ */ v(Ul, {
|
|
6685
6698
|
name: e.name,
|
|
6686
6699
|
actions: e.actions,
|
|
6687
6700
|
stickyHeader: h
|
|
@@ -6708,7 +6721,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6708
6721
|
hasChild: r,
|
|
6709
6722
|
isOpen: a,
|
|
6710
6723
|
onToggle: o
|
|
6711
|
-
}) : /* @__PURE__ */ v(
|
|
6724
|
+
}) : /* @__PURE__ */ v(Ku, {
|
|
6712
6725
|
hasChild: u ? u(e) : r,
|
|
6713
6726
|
node: e,
|
|
6714
6727
|
depth: t,
|
|
@@ -6724,7 +6737,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6724
6737
|
onDrop: A,
|
|
6725
6738
|
onChangeOpen: C,
|
|
6726
6739
|
dropTargetOffset: 10,
|
|
6727
|
-
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ v(
|
|
6740
|
+
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ v(qu, {
|
|
6728
6741
|
depth: t,
|
|
6729
6742
|
indent: b
|
|
6730
6743
|
}),
|
|
@@ -6732,17 +6745,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6732
6745
|
listComponent: "div",
|
|
6733
6746
|
listItemComponent: "div",
|
|
6734
6747
|
classes: {
|
|
6735
|
-
root:
|
|
6736
|
-
draggingSource:
|
|
6737
|
-
dropTarget:
|
|
6738
|
-
placeholder:
|
|
6748
|
+
root: Gu.tree,
|
|
6749
|
+
draggingSource: Gu.draggingSource,
|
|
6750
|
+
dropTarget: Gu.dropTarget,
|
|
6751
|
+
placeholder: Gu.placeholderContainer
|
|
6739
6752
|
},
|
|
6740
6753
|
initialOpen: o,
|
|
6741
6754
|
enableAnimateExpand: !0
|
|
6742
6755
|
})
|
|
6743
6756
|
})]
|
|
6744
6757
|
});
|
|
6745
|
-
},
|
|
6758
|
+
}, Yu = {
|
|
6746
6759
|
treeTable: "_treeTable_1ywvy_1",
|
|
6747
6760
|
treeTableHeader: "_treeTableHeader_1ywvy_22",
|
|
6748
6761
|
folderCell: "_folderCell_1ywvy_30",
|
|
@@ -6750,40 +6763,40 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6750
6763
|
drag: "_drag_1ywvy_31",
|
|
6751
6764
|
folder: "_folder_1ywvy_30",
|
|
6752
6765
|
active: "_active_1ywvy_61"
|
|
6753
|
-
},
|
|
6766
|
+
}, Xu = (e, t) => e.filter((e) => e.parent === t).flatMap((t) => [t.id, ...Xu(e, t.id)]), Zu = (e, t, n) => {
|
|
6754
6767
|
let r = new Set(n), i = e.filter((e) => e.parent === t);
|
|
6755
6768
|
if (i.length === 0) return {
|
|
6756
6769
|
checked: r.has(t),
|
|
6757
6770
|
indeterminate: !1
|
|
6758
6771
|
};
|
|
6759
|
-
let a = i.map((t) =>
|
|
6772
|
+
let a = i.map((t) => Zu(e, t.id, n)), o = a.filter((e) => e.checked).length, s = a.filter((e) => e.indeterminate).length, c = o === i.length;
|
|
6760
6773
|
return {
|
|
6761
6774
|
checked: c,
|
|
6762
6775
|
indeterminate: o + s > 0 && !c
|
|
6763
6776
|
};
|
|
6764
|
-
},
|
|
6777
|
+
}, Qu = (e, t) => {
|
|
6765
6778
|
let n = t.length;
|
|
6766
6779
|
return {
|
|
6767
6780
|
checked: e.length > 0 && n === e.length,
|
|
6768
6781
|
indeterminate: n > 0 && n < e.length
|
|
6769
6782
|
};
|
|
6770
|
-
},
|
|
6783
|
+
}, $u = n(null), ed = () => s($u), td = ({ checkedRows: e, children: t, onChangeCheckedRows: n, rows: r }) => {
|
|
6771
6784
|
let i = e !== void 0, a = d(() => {
|
|
6772
6785
|
if (!i) return null;
|
|
6773
6786
|
let t = /* @__PURE__ */ new Map();
|
|
6774
|
-
for (let n of r) t.set(n.id,
|
|
6787
|
+
for (let n of r) t.set(n.id, Zu(r, n.id, e));
|
|
6775
6788
|
return t;
|
|
6776
6789
|
}, [
|
|
6777
6790
|
i,
|
|
6778
6791
|
r,
|
|
6779
6792
|
e
|
|
6780
|
-
]), s = d(() => i ?
|
|
6793
|
+
]), s = d(() => i ? Qu(r, e) : void 0, [
|
|
6781
6794
|
i,
|
|
6782
6795
|
r,
|
|
6783
6796
|
e
|
|
6784
6797
|
]), c = o((e) => a == null ? void 0 : a.get(e), [a]), l = o((t) => {
|
|
6785
6798
|
if (!i) return;
|
|
6786
|
-
let a = [t, ...
|
|
6799
|
+
let a = [t, ...Xu(r, t)], { checked: o } = Zu(r, t, e);
|
|
6787
6800
|
if (o) {
|
|
6788
6801
|
let t = new Set(a);
|
|
6789
6802
|
n == null || n(e.filter((e) => !t.has(e)));
|
|
@@ -6795,7 +6808,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6795
6808
|
r
|
|
6796
6809
|
]), u = o(() => {
|
|
6797
6810
|
if (!i) return;
|
|
6798
|
-
let { checked: t } =
|
|
6811
|
+
let { checked: t } = Qu(r, e);
|
|
6799
6812
|
t ? n == null || n([]) : n == null || n(r.map((e) => e.id));
|
|
6800
6813
|
}, [
|
|
6801
6814
|
e,
|
|
@@ -6815,12 +6828,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6815
6828
|
u,
|
|
6816
6829
|
l
|
|
6817
6830
|
]);
|
|
6818
|
-
return /* @__PURE__ */ v(
|
|
6831
|
+
return /* @__PURE__ */ v($u.Provider, {
|
|
6819
6832
|
value: f,
|
|
6820
6833
|
children: t
|
|
6821
6834
|
});
|
|
6822
|
-
},
|
|
6823
|
-
let h =
|
|
6835
|
+
}, nd = ({ 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 }) => {
|
|
6836
|
+
let h = ed(), _ = 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
6837
|
let r = t ? t[e] : void 0;
|
|
6825
6838
|
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${A ? n + 1 : n})`})` : r;
|
|
6826
6839
|
};
|
|
@@ -6833,7 +6846,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6833
6846
|
onDragLeave: f,
|
|
6834
6847
|
children: /* @__PURE__ */ v("tbody", { children: /* @__PURE__ */ y("tr", {
|
|
6835
6848
|
onClick: k,
|
|
6836
|
-
className: g(
|
|
6849
|
+
className: g(Yu.treeTableRow, O ? Yu.active : void 0),
|
|
6837
6850
|
children: [
|
|
6838
6851
|
j && /* @__PURE__ */ v(mc, {
|
|
6839
6852
|
isHeader: !1,
|
|
@@ -6845,19 +6858,19 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6845
6858
|
}
|
|
6846
6859
|
}),
|
|
6847
6860
|
r && /* @__PURE__ */ v("td", {
|
|
6848
|
-
className:
|
|
6861
|
+
className: Yu.dragCell,
|
|
6849
6862
|
children: /* @__PURE__ */ v("div", {
|
|
6850
|
-
className:
|
|
6863
|
+
className: Yu.drag,
|
|
6851
6864
|
onClick: (e) => e.stopPropagation(),
|
|
6852
6865
|
ref: i,
|
|
6853
6866
|
children: /* @__PURE__ */ v(U, { icon: V.DRAG })
|
|
6854
6867
|
})
|
|
6855
6868
|
}),
|
|
6856
|
-
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ v("td", { className:
|
|
6869
|
+
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ v("td", { className: Yu.folderCell }, t)),
|
|
6857
6870
|
A && /* @__PURE__ */ v("td", {
|
|
6858
|
-
className:
|
|
6871
|
+
className: Yu.folderCell,
|
|
6859
6872
|
children: /* @__PURE__ */ v("div", {
|
|
6860
|
-
className:
|
|
6873
|
+
className: Yu.folder,
|
|
6861
6874
|
onClick: () => m(w),
|
|
6862
6875
|
onMouseDown: (e) => e.stopPropagation(),
|
|
6863
6876
|
children: /* @__PURE__ */ v(K, {
|
|
@@ -6886,10 +6899,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6886
6899
|
]
|
|
6887
6900
|
}) })
|
|
6888
6901
|
});
|
|
6889
|
-
},
|
|
6890
|
-
let a =
|
|
6902
|
+
}, rd = ({ columnAlignment: e, columnWidths: t, draggable: n, hasRowActions: r, headers: i }) => {
|
|
6903
|
+
let a = ed(), o = a == null ? void 0 : a.headerCheckState, s = (a == null ? void 0 : a.enabled) && o !== void 0;
|
|
6891
6904
|
return /* @__PURE__ */ v("table", {
|
|
6892
|
-
className: g(mo.table,
|
|
6905
|
+
className: g(mo.table, Yu.treeTableHeader),
|
|
6893
6906
|
children: /* @__PURE__ */ v("thead", { children: i.map((i, c) => /* @__PURE__ */ y("tr", { children: [
|
|
6894
6907
|
s && c === 0 ? /* @__PURE__ */ v(mc, {
|
|
6895
6908
|
isHeader: !0,
|
|
@@ -6900,7 +6913,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6900
6913
|
onChange: a.toggleHeaderCheck
|
|
6901
6914
|
}
|
|
6902
6915
|
}) : s ? /* @__PURE__ */ v("td", {}) : null,
|
|
6903
|
-
n && /* @__PURE__ */ v("th", { className:
|
|
6916
|
+
n && /* @__PURE__ */ v("th", { className: Yu.dragCell }),
|
|
6904
6917
|
i.cells.map((n, r) => /* @__PURE__ */ v(mc, {
|
|
6905
6918
|
isHeader: !0,
|
|
6906
6919
|
cell: n,
|
|
@@ -6917,23 +6930,23 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6917
6930
|
})
|
|
6918
6931
|
] }, c)) })
|
|
6919
6932
|
});
|
|
6920
|
-
},
|
|
6933
|
+
}, id = ({ 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
6934
|
let { columnAlignment: h, columnWidths: g, fixedWidth: _, headers: b, rows: x = [] } = f, S = Fs(x, b == null ? [] : b);
|
|
6922
|
-
return /* @__PURE__ */ v(
|
|
6935
|
+
return /* @__PURE__ */ v(td, {
|
|
6923
6936
|
checkedRows: r,
|
|
6924
6937
|
onChangeCheckedRows: u,
|
|
6925
6938
|
rows: x,
|
|
6926
6939
|
children: /* @__PURE__ */ y("div", {
|
|
6927
|
-
className:
|
|
6940
|
+
className: Yu.treeTable,
|
|
6928
6941
|
"data-testid": p,
|
|
6929
6942
|
style: { width: _ },
|
|
6930
|
-
children: [!!b && /* @__PURE__ */ v(
|
|
6943
|
+
children: [!!b && /* @__PURE__ */ v(rd, {
|
|
6931
6944
|
columnAlignment: h,
|
|
6932
6945
|
columnWidths: g,
|
|
6933
6946
|
draggable: i,
|
|
6934
6947
|
hasRowActions: S,
|
|
6935
6948
|
headers: b
|
|
6936
|
-
}), /* @__PURE__ */ v(
|
|
6949
|
+
}), /* @__PURE__ */ v(Ju, {
|
|
6937
6950
|
allowParentReassignment: e,
|
|
6938
6951
|
autoOpenActiveItems: t,
|
|
6939
6952
|
canDrop: n,
|
|
@@ -6949,7 +6962,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6949
6962
|
onItemToggle: c,
|
|
6950
6963
|
onListReorder: l,
|
|
6951
6964
|
placeholderIndent: "var(--size)",
|
|
6952
|
-
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: i, isOpen: o, onToggle: s }) => /* @__PURE__ */ v(
|
|
6965
|
+
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: i, isOpen: o, onToggle: s }) => /* @__PURE__ */ v(nd, {
|
|
6953
6966
|
node: e,
|
|
6954
6967
|
columnAlignment: h,
|
|
6955
6968
|
columnWidths: g,
|
|
@@ -6966,38 +6979,38 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6966
6979
|
})]
|
|
6967
6980
|
})
|
|
6968
6981
|
});
|
|
6969
|
-
},
|
|
6982
|
+
}, ad = () => {
|
|
6970
6983
|
let e = p(null);
|
|
6971
6984
|
return u(() => {
|
|
6972
6985
|
e.current && (e.current(), e.current = null);
|
|
6973
6986
|
}), (t) => {
|
|
6974
6987
|
e.current = t;
|
|
6975
6988
|
};
|
|
6976
|
-
},
|
|
6989
|
+
}, od = (e) => {
|
|
6977
6990
|
let t = p(void 0);
|
|
6978
6991
|
return c(() => {
|
|
6979
6992
|
t.current = e;
|
|
6980
6993
|
}, [e]), t.current;
|
|
6981
|
-
},
|
|
6994
|
+
}, sd = (e, t) => {
|
|
6982
6995
|
let n = t == null ? void 0 : t[e];
|
|
6983
6996
|
if (!n) {
|
|
6984
6997
|
var r;
|
|
6985
6998
|
return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = Un(e)) == null ? "" : r;
|
|
6986
6999
|
}
|
|
6987
7000
|
return n;
|
|
6988
|
-
},
|
|
7001
|
+
}, cd = /* @__PURE__ */ function(e) {
|
|
6989
7002
|
return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
|
|
6990
|
-
}({}),
|
|
7003
|
+
}({}), ld = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), ud = (e) => {
|
|
6991
7004
|
if (!e) return !1;
|
|
6992
7005
|
let t = Dn(e);
|
|
6993
7006
|
return !xn.includes(t);
|
|
6994
|
-
},
|
|
7007
|
+
}, dd = ({ value: e, unitkey: t, toUnit: n }) => {
|
|
6995
7008
|
var r;
|
|
6996
7009
|
let i = bn[t];
|
|
6997
7010
|
if (!i || i.length === 0 || !((r = Wn(e)) != null && r.valid) || !i.includes(n)) return !1;
|
|
6998
7011
|
let a = Dn(String(e));
|
|
6999
7012
|
return !(a && !i.includes(a));
|
|
7000
|
-
},
|
|
7013
|
+
}, fd = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
|
|
7001
7014
|
var o;
|
|
7002
7015
|
let s = Nn(e) ? kn(e) : e, c = [Infinity, -Infinity].includes(Number(s));
|
|
7003
7016
|
if (i || c) return {
|
|
@@ -7017,13 +7030,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7017
7030
|
value: void 0,
|
|
7018
7031
|
error: "Source unit is missing"
|
|
7019
7032
|
};
|
|
7020
|
-
if (
|
|
7033
|
+
if (ld(s)) return {
|
|
7021
7034
|
value: void 0,
|
|
7022
7035
|
error: "Value is invalid for conversion"
|
|
7023
7036
|
};
|
|
7024
7037
|
try {
|
|
7025
7038
|
let e = Kn(s, l);
|
|
7026
|
-
return
|
|
7039
|
+
return dd({
|
|
7027
7040
|
value: e,
|
|
7028
7041
|
toUnit: n,
|
|
7029
7042
|
unitkey: t
|
|
@@ -7040,13 +7053,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7040
7053
|
error: "Conversion not possible"
|
|
7041
7054
|
};
|
|
7042
7055
|
}
|
|
7043
|
-
},
|
|
7044
|
-
let a = kn(e), o =
|
|
7045
|
-
return !
|
|
7056
|
+
}, pd = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
|
|
7057
|
+
let a = kn(e), o = ld(a);
|
|
7058
|
+
return !dd({
|
|
7046
7059
|
value: e,
|
|
7047
7060
|
unitkey: n,
|
|
7048
7061
|
toUnit: t
|
|
7049
|
-
}) ||
|
|
7062
|
+
}) || ud(e) || o ? { value: a } : Nn(e) ? fd({
|
|
7050
7063
|
value: e,
|
|
7051
7064
|
unitkey: n,
|
|
7052
7065
|
toUnit: t,
|
|
@@ -7054,25 +7067,25 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7054
7067
|
doNotConvertValue: i,
|
|
7055
7068
|
exactPrecision: !0
|
|
7056
7069
|
}) : { value: e };
|
|
7057
|
-
},
|
|
7070
|
+
}, md = (e) => ln(e) && !tn(e) && !on(e) ? en(e, "fieldName", "") : typeof e == "string" ? e : "", hd = (e = "") => xn == null ? void 0 : xn.includes(e), gd = (e, t) => {
|
|
7058
7071
|
let n = Dn(e || "");
|
|
7059
|
-
return
|
|
7060
|
-
},
|
|
7061
|
-
|
|
7062
|
-
},
|
|
7072
|
+
return hd(t) && hd(n);
|
|
7073
|
+
}, _d = n(null), vd = () => s(_d), yd = !1, bd = (e) => {
|
|
7074
|
+
yd || (yd = !0, _d = e);
|
|
7075
|
+
}, xd = (e) => jn(e) ? e : Fn(e), Sd = {
|
|
7063
7076
|
predefinedMenuActive: "_predefinedMenuActive_ye9w9_1",
|
|
7064
7077
|
inputWrapper: "_inputWrapper_ye9w9_4"
|
|
7065
|
-
},
|
|
7078
|
+
}, Cd = ({ 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
7079
|
name: "",
|
|
7067
7080
|
error: null
|
|
7068
7081
|
}), 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 =
|
|
7082
|
+
let ne = vd(), re = ad();
|
|
7070
7083
|
typeof l == "number" && (l = `${l}`);
|
|
7071
|
-
let [ie = "", ae = ""] = l === void 0 ? [] : zn(l), R = d(() =>
|
|
7084
|
+
let [ie = "", ae = ""] = l === void 0 ? [] : zn(l), R = d(() => sd(u, C || (ne == null ? void 0 : ne.unitTemplate)), [
|
|
7072
7085
|
u,
|
|
7073
7086
|
C,
|
|
7074
7087
|
ne == null ? void 0 : ne.unitTemplate
|
|
7075
|
-
]), oe =
|
|
7088
|
+
]), oe = gd(l, R), se = f || R || ae, ce = od(se), { value: le } = pd({
|
|
7076
7089
|
value: l,
|
|
7077
7090
|
toUnit: se,
|
|
7078
7091
|
unitkey: u,
|
|
@@ -7084,10 +7097,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7084
7097
|
} : {
|
|
7085
7098
|
value: le,
|
|
7086
7099
|
unit: se
|
|
7087
|
-
}), de = M || (z == null ? void 0 : z.value) === void 0, [fe, pe] = m(D ?
|
|
7100
|
+
}), de = M || (z == null ? void 0 : z.value) === void 0, [fe, pe] = m(D ? cd.PREDEFINED : cd.CUSTOM), me = !!(j || n), he = E && E.find((e) => {
|
|
7088
7101
|
if (!(e != null && e.value)) return;
|
|
7089
7102
|
if (k) return k === e.valueKey;
|
|
7090
|
-
let t = Nn(e.value) ? Dn(e.value) : "", { value: n = l } =
|
|
7103
|
+
let t = Nn(e.value) ? Dn(e.value) : "", { value: n = l } = fd({
|
|
7091
7104
|
value: String(l),
|
|
7092
7105
|
unitkey: u,
|
|
7093
7106
|
toUnit: t
|
|
@@ -7096,7 +7109,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7096
7109
|
}), ge = () => {
|
|
7097
7110
|
var e;
|
|
7098
7111
|
let t = (e = l) == null ? "" : e, n = z.unit;
|
|
7099
|
-
if (!
|
|
7112
|
+
if (!dd({
|
|
7100
7113
|
value: t,
|
|
7101
7114
|
unitkey: u,
|
|
7102
7115
|
toUnit: n
|
|
@@ -7110,7 +7123,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7110
7123
|
return null;
|
|
7111
7124
|
}
|
|
7112
7125
|
}, _e = (t) => {
|
|
7113
|
-
let n =
|
|
7126
|
+
let n = md(e), r = t.target, { value: i, selectionStart: a } = r, o = Kn(i, (z == null ? void 0 : z.unit) || "");
|
|
7114
7127
|
h({ target: {
|
|
7115
7128
|
value: N ? Kn(wn(o, ae), ae) : o,
|
|
7116
7129
|
name: n
|
|
@@ -7132,7 +7145,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7132
7145
|
if (se) {
|
|
7133
7146
|
let e, t = "";
|
|
7134
7147
|
if (ce !== se) {
|
|
7135
|
-
let { value: n } =
|
|
7148
|
+
let { value: n } = pd({
|
|
7136
7149
|
value: l,
|
|
7137
7150
|
toUnit: se,
|
|
7138
7151
|
unitkey: u,
|
|
@@ -7141,7 +7154,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7141
7154
|
});
|
|
7142
7155
|
e = n, t = se;
|
|
7143
7156
|
} else if (Kn(z.value, z.unit) !== l) {
|
|
7144
|
-
let { value: n } =
|
|
7157
|
+
let { value: n } = pd({
|
|
7145
7158
|
value: l,
|
|
7146
7159
|
toUnit: z.unit,
|
|
7147
7160
|
unitkey: u,
|
|
@@ -7153,7 +7166,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7153
7166
|
e !== void 0 && ue({
|
|
7154
7167
|
value: e,
|
|
7155
7168
|
unit: t
|
|
7156
|
-
}), pe(E && he && O ?
|
|
7169
|
+
}), pe(E && he && O ? cd.PREDEFINED : cd.CUSTOM);
|
|
7157
7170
|
}
|
|
7158
7171
|
}, [
|
|
7159
7172
|
se,
|
|
@@ -7161,14 +7174,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7161
7174
|
i,
|
|
7162
7175
|
O
|
|
7163
7176
|
]);
|
|
7164
|
-
let ye = ge(), be = Pn(z.unit) || z.unit || "", xe = p || !ye || ye && ye.length === 1, Se =
|
|
7177
|
+
let ye = ge(), be = Pn(z.unit) || z.unit || "", xe = p || !ye || ye && ye.length === 1, Se = md(e), Ce, we = (t) => {
|
|
7165
7178
|
let r = t != null && t.value ? t.value : "", [i = "", a = ""] = Nn(r) ? zn(r) : [r], o = Gn(r);
|
|
7166
|
-
if (
|
|
7179
|
+
if (dd({
|
|
7167
7180
|
value: r,
|
|
7168
7181
|
unitkey: u,
|
|
7169
7182
|
toUnit: a
|
|
7170
7183
|
})) {
|
|
7171
|
-
let { value: e = "" } =
|
|
7184
|
+
let { value: e = "" } = pd({
|
|
7172
7185
|
value: r,
|
|
7173
7186
|
toUnit: R,
|
|
7174
7187
|
unitkey: u,
|
|
@@ -7181,7 +7194,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7181
7194
|
type: xi.OPTION,
|
|
7182
7195
|
inline: !0,
|
|
7183
7196
|
onClick: () => {
|
|
7184
|
-
Wn(i).valid && !n && (pe(
|
|
7197
|
+
Wn(i).valid && !n && (pe(cd.PREDEFINED), h({ target: {
|
|
7185
7198
|
value: r,
|
|
7186
7199
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || "",
|
|
7187
7200
|
predefinedSelected: !0,
|
|
@@ -7193,27 +7206,27 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7193
7206
|
height: "0"
|
|
7194
7207
|
})] }),
|
|
7195
7208
|
description: o,
|
|
7196
|
-
selected: he === t && fe ===
|
|
7209
|
+
selected: he === t && fe === cd.PREDEFINED
|
|
7197
7210
|
};
|
|
7198
7211
|
};
|
|
7199
7212
|
if (Ce = [{
|
|
7200
7213
|
type: xi.OPTION,
|
|
7201
7214
|
inline: !0,
|
|
7202
7215
|
onClick: () => {
|
|
7203
|
-
fe !==
|
|
7216
|
+
fe !== cd.CUSTOM && !n && h({ target: {
|
|
7204
7217
|
value: Kn(z.value, z.unit),
|
|
7205
7218
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || ""
|
|
7206
7219
|
} });
|
|
7207
7220
|
},
|
|
7208
7221
|
label: "Custom",
|
|
7209
|
-
selected: fe ===
|
|
7222
|
+
selected: fe === cd.CUSTOM
|
|
7210
7223
|
}], E != null && E.length) {
|
|
7211
7224
|
let e = E.map(we);
|
|
7212
7225
|
Ce = [...Ce, ...e];
|
|
7213
7226
|
}
|
|
7214
7227
|
let Te = (e) => {
|
|
7215
7228
|
if (Nn(e)) {
|
|
7216
|
-
let t = Dn(e), { value: n } =
|
|
7229
|
+
let t = Dn(e), { value: n } = pd({
|
|
7217
7230
|
value: e,
|
|
7218
7231
|
toUnit: z.unit,
|
|
7219
7232
|
unitkey: u,
|
|
@@ -7225,7 +7238,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7225
7238
|
return e;
|
|
7226
7239
|
}, Ee = !E && (!L || L === B.FIRST) ? B.FIRST : B.MIDDLE, De = !L || L === B.LAST ? B.LAST : B.MIDDLE;
|
|
7227
7240
|
return /* @__PURE__ */ v("div", {
|
|
7228
|
-
className: fe ===
|
|
7241
|
+
className: fe === cd.PREDEFINED ? g(Sd.predefinedMenuActive) : "",
|
|
7229
7242
|
children: /* @__PURE__ */ y(Ma, {
|
|
7230
7243
|
small: o,
|
|
7231
7244
|
width: s,
|
|
@@ -7240,17 +7253,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7240
7253
|
trigger: "Component",
|
|
7241
7254
|
component: /* @__PURE__ */ v(K, {
|
|
7242
7255
|
groupOrder: "first",
|
|
7243
|
-
active: fe ===
|
|
7244
|
-
icon: fe ===
|
|
7256
|
+
active: fe === cd.PREDEFINED,
|
|
7257
|
+
icon: fe === cd.PREDEFINED ? "link" : "unlink",
|
|
7245
7258
|
small: o
|
|
7246
7259
|
}),
|
|
7247
7260
|
small: o,
|
|
7248
7261
|
sections: Ce
|
|
7249
7262
|
},
|
|
7250
|
-
tooltip: fe ===
|
|
7263
|
+
tooltip: fe === cd.PREDEFINED ? he == null ? void 0 : he.label : ""
|
|
7251
7264
|
}),
|
|
7252
7265
|
/* @__PURE__ */ v("div", {
|
|
7253
|
-
className:
|
|
7266
|
+
className: Sd.inputWrapper,
|
|
7254
7267
|
children: /* @__PURE__ */ v(Gs, {
|
|
7255
7268
|
name: Se,
|
|
7256
7269
|
testId: w,
|
|
@@ -7292,7 +7305,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7292
7305
|
let r = n || t || "", i = Mn(e) ? e : "";
|
|
7293
7306
|
return {
|
|
7294
7307
|
type: "Option",
|
|
7295
|
-
label: P ?
|
|
7308
|
+
label: P ? xd(i) : i,
|
|
7296
7309
|
inline: !0,
|
|
7297
7310
|
onClick: (n) => {
|
|
7298
7311
|
n.stopPropagation(), ve(e, t);
|
|
@@ -7307,10 +7320,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7307
7320
|
]
|
|
7308
7321
|
})
|
|
7309
7322
|
});
|
|
7310
|
-
},
|
|
7323
|
+
}, wd = Object.freeze({
|
|
7311
7324
|
Translations: "translations",
|
|
7312
7325
|
LanguageKey: "languageKey"
|
|
7313
|
-
}),
|
|
7326
|
+
}), Td = {
|
|
7314
7327
|
unified: "Unified",
|
|
7315
7328
|
split: "Split",
|
|
7316
7329
|
changesTooLarge: "Changes are too large to be shown",
|
|
@@ -7332,29 +7345,29 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7332
7345
|
pluralChanges: "changes",
|
|
7333
7346
|
showAll: "Show all",
|
|
7334
7347
|
unknown: "Unknown"
|
|
7335
|
-
},
|
|
7348
|
+
}, Ed = (e) => Object.keys(Td).reduce((t, n) => ({
|
|
7336
7349
|
...t,
|
|
7337
|
-
[n]: (e == null ? void 0 : e[n]) || (
|
|
7338
|
-
}), {}),
|
|
7339
|
-
[
|
|
7340
|
-
[
|
|
7341
|
-
},
|
|
7342
|
-
|
|
7343
|
-
},
|
|
7350
|
+
[n]: (e == null ? void 0 : e[n]) || (Td == null ? void 0 : Td[n])
|
|
7351
|
+
}), {}), Dd = {
|
|
7352
|
+
[wd.Translations]: Ed(),
|
|
7353
|
+
[wd.LanguageKey]: "en"
|
|
7354
|
+
}, Od = (e) => e ? Dd[e] : Dd, kd = (e, t) => {
|
|
7355
|
+
Dd[e] = t;
|
|
7356
|
+
}, Ad = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
|
|
7344
7357
|
var a;
|
|
7345
|
-
let { unitTemplate: o = null } = (a =
|
|
7346
|
-
return e[n] = r == null ?
|
|
7358
|
+
let { unitTemplate: o = null } = (a = vd()) == null ? {} : a;
|
|
7359
|
+
return e[n] = r == null ? sd(n, o) : r, t[n] = i, {
|
|
7347
7360
|
preferredUnits: e,
|
|
7348
7361
|
storageUnits: t
|
|
7349
7362
|
};
|
|
7350
7363
|
}, {
|
|
7351
7364
|
preferredUnits: {},
|
|
7352
7365
|
storageUnits: {}
|
|
7353
|
-
}),
|
|
7366
|
+
}), jd = ({ row: e, rowIndex: t, selectedUnits: n, storageUnits: r, convertBackToStorageUnit: i, enableCosmeticRounding: a, enableDisplayRounding: o }) => ({
|
|
7354
7367
|
...e,
|
|
7355
7368
|
cells: e.cells.map((e, s) => {
|
|
7356
7369
|
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 } =
|
|
7370
|
+
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 } = fd({
|
|
7358
7371
|
value: Hs(l),
|
|
7359
7372
|
unitkey: c,
|
|
7360
7373
|
toUnit: f,
|
|
@@ -7368,7 +7381,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7368
7381
|
roundDisplayValue: d,
|
|
7369
7382
|
selectOnFocus: !0,
|
|
7370
7383
|
onChange: (n) => {
|
|
7371
|
-
let { value: r } = n.target, a = i ? p : f, { value: o = r } =
|
|
7384
|
+
let { value: r } = n.target, a = i ? p : f, { value: o = r } = fd({
|
|
7372
7385
|
value: String(r),
|
|
7373
7386
|
unitkey: c,
|
|
7374
7387
|
toUnit: a,
|
|
@@ -7392,8 +7405,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7392
7405
|
}
|
|
7393
7406
|
return e;
|
|
7394
7407
|
})
|
|
7395
|
-
}),
|
|
7396
|
-
let { translations: i } =
|
|
7408
|
+
}), Md = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
|
|
7409
|
+
let { translations: i } = Od();
|
|
7397
7410
|
return e ? e.map((e) => ({
|
|
7398
7411
|
...e,
|
|
7399
7412
|
cells: e.cells.map((e) => {
|
|
@@ -7422,8 +7435,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7422
7435
|
return e;
|
|
7423
7436
|
})
|
|
7424
7437
|
})) : [];
|
|
7425
|
-
},
|
|
7426
|
-
let { headers: u, ...d } = e, { storageUnits: f, preferredUnits: p } =
|
|
7438
|
+
}, Nd = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: s, beforeRenderRow: l }) => {
|
|
7439
|
+
let { headers: u, ...d } = e, { storageUnits: f, preferredUnits: p } = Ad(t), h = od(p), [g, _] = m(p), y = ({ unitKey: e, value: n }) => {
|
|
7427
7440
|
_({
|
|
7428
7441
|
...g,
|
|
7429
7442
|
[e]: n
|
|
@@ -7434,7 +7447,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7434
7447
|
newUnit: n,
|
|
7435
7448
|
unitKey: e
|
|
7436
7449
|
});
|
|
7437
|
-
}, b = o(({ row: e, rowIndex: t }) =>
|
|
7450
|
+
}, b = o(({ row: e, rowIndex: t }) => jd({
|
|
7438
7451
|
row: l ? l({
|
|
7439
7452
|
row: e,
|
|
7440
7453
|
rowIndex: t
|
|
@@ -7460,10 +7473,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7460
7473
|
value: n
|
|
7461
7474
|
});
|
|
7462
7475
|
});
|
|
7463
|
-
}, [t]), /* @__PURE__ */ v(
|
|
7476
|
+
}, [t]), /* @__PURE__ */ v(xc, {
|
|
7464
7477
|
table: {
|
|
7465
7478
|
...d,
|
|
7466
|
-
headers:
|
|
7479
|
+
headers: Md({
|
|
7467
7480
|
headers: e.headers,
|
|
7468
7481
|
selectedUnits: g,
|
|
7469
7482
|
storageUnits: f,
|
|
@@ -7474,8 +7487,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7474
7487
|
canListReorder: s,
|
|
7475
7488
|
beforeRenderRow: b
|
|
7476
7489
|
});
|
|
7477
|
-
},
|
|
7478
|
-
let { translations: d } =
|
|
7490
|
+
}, Pd = { settingField: "_settingField_1x02n_1" }, Fd = ({ 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 }) => {
|
|
7491
|
+
let { translations: d } = Od(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ y(e.Fragment, { children: [t, /* @__PURE__ */ v("br", {})] }, n)), p = [
|
|
7479
7492
|
...r ? [] : [{
|
|
7480
7493
|
label: d == null ? void 0 : d.allUsers,
|
|
7481
7494
|
value: !1
|
|
@@ -7490,14 +7503,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7490
7503
|
}] : []
|
|
7491
7504
|
], m = a !== void 0 && o !== void 0 && !an(a, o);
|
|
7492
7505
|
return /* @__PURE__ */ y("div", {
|
|
7493
|
-
className:
|
|
7506
|
+
className: Pd.settingField,
|
|
7494
7507
|
"data-testid": u,
|
|
7495
|
-
children: [/* @__PURE__ */ y(
|
|
7508
|
+
children: [/* @__PURE__ */ y(Fl, {
|
|
7496
7509
|
justifyContent: "space-between",
|
|
7497
7510
|
wrap: !1,
|
|
7498
7511
|
children: [i, !s && /* @__PURE__ */ v("div", {
|
|
7499
7512
|
style: { flexShrink: 0 },
|
|
7500
|
-
children: /* @__PURE__ */ y(
|
|
7513
|
+
children: /* @__PURE__ */ y(Fl, {
|
|
7501
7514
|
gap: "8px",
|
|
7502
7515
|
alignItems: "center",
|
|
7503
7516
|
children: [m && /* @__PURE__ */ v(si, {
|
|
@@ -7522,19 +7535,19 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7522
7535
|
children: f(t)
|
|
7523
7536
|
})]
|
|
7524
7537
|
});
|
|
7525
|
-
},
|
|
7538
|
+
}, Id = (e, t) => {
|
|
7526
7539
|
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
7540
|
return {
|
|
7528
7541
|
added: Math.max(0, i),
|
|
7529
7542
|
removed: Math.max(0, a)
|
|
7530
7543
|
};
|
|
7531
|
-
},
|
|
7544
|
+
}, Ld = "split", Rd = "unified", zd = ({ oldJson: e, newJson: t, viewType: n = Ld }) => {
|
|
7532
7545
|
var r, i;
|
|
7533
|
-
let { translations: a } =
|
|
7534
|
-
value:
|
|
7546
|
+
let { translations: a } = Od(), [o, s] = m(n), l = [{
|
|
7547
|
+
value: Ld,
|
|
7535
7548
|
label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
|
|
7536
7549
|
}, {
|
|
7537
|
-
value:
|
|
7550
|
+
value: Rd,
|
|
7538
7551
|
label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
|
|
7539
7552
|
}];
|
|
7540
7553
|
c(() => {
|
|
@@ -7542,10 +7555,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7542
7555
|
}, [n]);
|
|
7543
7556
|
let u = ({ target: { value: e } }) => {
|
|
7544
7557
|
s(e);
|
|
7545
|
-
}, { added: d, removed: f } =
|
|
7558
|
+
}, { added: d, removed: f } = Id(e, t), p = d + f > 3500;
|
|
7546
7559
|
return /* @__PURE__ */ v(_, { children: /* @__PURE__ */ v(na, {
|
|
7547
7560
|
bordered: !0,
|
|
7548
|
-
heading: /* @__PURE__ */ y(
|
|
7561
|
+
heading: /* @__PURE__ */ y(Fl, {
|
|
7549
7562
|
gap: !0,
|
|
7550
7563
|
children: [/* @__PURE__ */ v(ya, { children: /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y(ha, {
|
|
7551
7564
|
success: !0,
|
|
@@ -7557,7 +7570,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7557
7570
|
}), /* @__PURE__ */ y(ha, {
|
|
7558
7571
|
error: !0,
|
|
7559
7572
|
children: ["-", f]
|
|
7560
|
-
})] }) }), !p && /* @__PURE__ */ v(
|
|
7573
|
+
})] }) }), !p && /* @__PURE__ */ v(pu, {
|
|
7561
7574
|
name: "viewType",
|
|
7562
7575
|
options: l,
|
|
7563
7576
|
value: o,
|
|
@@ -7575,14 +7588,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7575
7588
|
}) : /* @__PURE__ */ v(xr, {
|
|
7576
7589
|
oldValue: e,
|
|
7577
7590
|
newValue: t,
|
|
7578
|
-
splitView: o ===
|
|
7591
|
+
splitView: o === Ld,
|
|
7579
7592
|
compareMethod: Sr.WORDS
|
|
7580
7593
|
})
|
|
7581
7594
|
}) });
|
|
7582
7595
|
};
|
|
7583
7596
|
//#endregion
|
|
7584
7597
|
//#region src/helpers/date.ts
|
|
7585
|
-
function
|
|
7598
|
+
function Bd({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
7586
7599
|
return e ? new Date(e).toLocaleString(a, {
|
|
7587
7600
|
year: "numeric",
|
|
7588
7601
|
month: "short",
|
|
@@ -7596,28 +7609,28 @@ function zd({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
7596
7609
|
}
|
|
7597
7610
|
//#endregion
|
|
7598
7611
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
7599
|
-
function
|
|
7612
|
+
function Vd(e) {
|
|
7600
7613
|
var t;
|
|
7601
7614
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
7602
7615
|
if (!n) throw Error("Invalid RegExp");
|
|
7603
7616
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
7604
7617
|
}
|
|
7605
|
-
function
|
|
7618
|
+
function Hd(e) {
|
|
7606
7619
|
if (typeof e != "object") return e;
|
|
7607
7620
|
if (e === null) return null;
|
|
7608
|
-
if (Array.isArray(e)) return e.map(
|
|
7621
|
+
if (Array.isArray(e)) return e.map(Hd);
|
|
7609
7622
|
if (e instanceof Date) return new Date(e.getTime());
|
|
7610
|
-
if (e instanceof RegExp) return
|
|
7623
|
+
if (e instanceof RegExp) return Vd(e);
|
|
7611
7624
|
let t = {};
|
|
7612
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
7625
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = Hd(e[n]));
|
|
7613
7626
|
return t;
|
|
7614
7627
|
}
|
|
7615
7628
|
//#endregion
|
|
7616
7629
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
7617
|
-
function
|
|
7630
|
+
function Ud(e, t) {
|
|
7618
7631
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
7619
7632
|
}
|
|
7620
|
-
var
|
|
7633
|
+
var Wd = (e) => e[e.length - 1], Gd = class {
|
|
7621
7634
|
setResult(e) {
|
|
7622
7635
|
return this.result = e, this.hasResult = !0, this;
|
|
7623
7636
|
}
|
|
@@ -7625,16 +7638,16 @@ var Ud = (e) => e[e.length - 1], Wd = class {
|
|
|
7625
7638
|
return this.exiting = !0, this;
|
|
7626
7639
|
}
|
|
7627
7640
|
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 ? (
|
|
7641
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (Ud(this.children), Wd(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
7629
7642
|
}
|
|
7630
|
-
},
|
|
7643
|
+
}, Kd = class extends Gd {
|
|
7631
7644
|
constructor(e, t) {
|
|
7632
7645
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
7633
7646
|
}
|
|
7634
7647
|
prepareDeltaResult(e) {
|
|
7635
7648
|
var t, n, r, i;
|
|
7636
7649
|
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 :
|
|
7650
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : Hd;
|
|
7638
7651
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
7639
7652
|
}
|
|
7640
7653
|
return e;
|
|
@@ -7642,15 +7655,15 @@ var Ud = (e) => e[e.length - 1], Wd = class {
|
|
|
7642
7655
|
setResult(e) {
|
|
7643
7656
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
7644
7657
|
}
|
|
7645
|
-
},
|
|
7658
|
+
}, qd = class extends Gd {
|
|
7646
7659
|
constructor(e, t) {
|
|
7647
7660
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
7648
7661
|
}
|
|
7649
|
-
},
|
|
7662
|
+
}, Jd = class extends Gd {
|
|
7650
7663
|
constructor(e) {
|
|
7651
7664
|
super(), this.delta = e, this.pipe = "reverse";
|
|
7652
7665
|
}
|
|
7653
|
-
},
|
|
7666
|
+
}, Yd = class {
|
|
7654
7667
|
constructor(e) {
|
|
7655
7668
|
this.name = e, this.filters = [];
|
|
7656
7669
|
}
|
|
@@ -7714,7 +7727,7 @@ var Ud = (e) => e[e.length - 1], Wd = class {
|
|
|
7714
7727
|
}
|
|
7715
7728
|
}), this);
|
|
7716
7729
|
}
|
|
7717
|
-
},
|
|
7730
|
+
}, Xd = class {
|
|
7718
7731
|
constructor(e) {
|
|
7719
7732
|
this.selfOptions = e || {}, this.pipes = {};
|
|
7720
7733
|
}
|
|
@@ -7741,7 +7754,7 @@ var Ud = (e) => e[e.length - 1], Wd = class {
|
|
|
7741
7754
|
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
7755
|
return n.hasResult ? n.result : void 0;
|
|
7743
7756
|
}
|
|
7744
|
-
},
|
|
7757
|
+
}, Zd = (e, t, n, r) => e[n] === t[r], Qd = (e, t, n, r) => {
|
|
7745
7758
|
var i, a, o;
|
|
7746
7759
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
7747
7760
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -7757,7 +7770,7 @@ var Ud = (e) => e[e.length - 1], Wd = class {
|
|
|
7757
7770
|
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
7771
|
}
|
|
7759
7772
|
return d;
|
|
7760
|
-
},
|
|
7773
|
+
}, $d = (e, t, n, r) => {
|
|
7761
7774
|
let i = t.length, a = n.length, o = {
|
|
7762
7775
|
sequence: [],
|
|
7763
7776
|
indices1: [],
|
|
@@ -7779,11 +7792,11 @@ var Ud = (e) => e[e.length - 1], Wd = class {
|
|
|
7779
7792
|
}
|
|
7780
7793
|
}
|
|
7781
7794
|
return o;
|
|
7782
|
-
},
|
|
7795
|
+
}, ef = { get: (e, t, n, r) => {
|
|
7783
7796
|
let i = r || {};
|
|
7784
|
-
return Qd(
|
|
7785
|
-
} },
|
|
7786
|
-
function
|
|
7797
|
+
return $d(Qd(e, t, n || Zd, i), e, t, i);
|
|
7798
|
+
} }, tf = 3;
|
|
7799
|
+
function nf(e, t, n, r) {
|
|
7787
7800
|
for (let i = 0; i < n; i++) {
|
|
7788
7801
|
let n = e[i];
|
|
7789
7802
|
for (let e = 0; e < r; e++) {
|
|
@@ -7793,7 +7806,7 @@ function tf(e, t, n, r) {
|
|
|
7793
7806
|
}
|
|
7794
7807
|
return !1;
|
|
7795
7808
|
}
|
|
7796
|
-
function
|
|
7809
|
+
function rf(e, t, n, r, i) {
|
|
7797
7810
|
let a = e[n], o = t[r];
|
|
7798
7811
|
if (a === o) return !0;
|
|
7799
7812
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -7806,15 +7819,15 @@ function nf(e, t, n, r, i) {
|
|
|
7806
7819
|
let l = i.hashCache2[r];
|
|
7807
7820
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l === void 0 ? !1 : c === l;
|
|
7808
7821
|
}
|
|
7809
|
-
var
|
|
7822
|
+
var af = function(e) {
|
|
7810
7823
|
var t, n, r, i, a;
|
|
7811
7824
|
if (!e.leftIsArray) return;
|
|
7812
7825
|
let o = {
|
|
7813
7826
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
7814
7827
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
7815
7828
|
}, 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 &&
|
|
7829
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !nf(f, p, m, h)); s < m && s < h && rf(f, p, s, s, o);) l = s, g = new Kd(f[l], p[l]), e.push(g, l), s++;
|
|
7830
|
+
for (; c + s < m && c + s < h && rf(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new Kd(f[u], p[d]), e.push(g, d), c++;
|
|
7818
7831
|
let _;
|
|
7819
7832
|
if (s + c === m) {
|
|
7820
7833
|
if (m === h) {
|
|
@@ -7838,7 +7851,7 @@ var rf = function(e) {
|
|
|
7838
7851
|
return;
|
|
7839
7852
|
}
|
|
7840
7853
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
7841
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
7854
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = ef.get(v, y, rf, o), x = [];
|
|
7842
7855
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
7843
7856
|
let t = `_${l}`;
|
|
7844
7857
|
_[t] = [
|
|
@@ -7859,8 +7872,8 @@ var rf = function(e) {
|
|
|
7859
7872
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
7860
7873
|
u = x[n];
|
|
7861
7874
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
7862
|
-
if (u !== void 0 && r &&
|
|
7863
|
-
r.splice(1, 2, l,
|
|
7875
|
+
if (u !== void 0 && r && rf(v, y, u - s, l - s, o)) {
|
|
7876
|
+
r.splice(1, 2, l, tf), r.splice(1, 2, l, tf), C || (r[0] = ""), d = l, g = new Kd(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
7864
7877
|
break;
|
|
7865
7878
|
}
|
|
7866
7879
|
}
|
|
@@ -7868,20 +7881,20 @@ var rf = function(e) {
|
|
|
7868
7881
|
} else {
|
|
7869
7882
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
7870
7883
|
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
|
|
7884
|
+
d = b.indices2[t] + s, g = new Kd(f[u], p[d]), e.push(g, d);
|
|
7872
7885
|
}
|
|
7873
7886
|
}
|
|
7874
7887
|
e.setResult(_).exit();
|
|
7875
7888
|
};
|
|
7876
|
-
|
|
7877
|
-
var
|
|
7889
|
+
af.filterName = "arrays";
|
|
7890
|
+
var of = {
|
|
7878
7891
|
numerically(e, t) {
|
|
7879
7892
|
return e - t;
|
|
7880
7893
|
},
|
|
7881
7894
|
numericallyBy(e) {
|
|
7882
7895
|
return (t, n) => t[e] - n[e];
|
|
7883
7896
|
}
|
|
7884
|
-
},
|
|
7897
|
+
}, sf = function(e) {
|
|
7885
7898
|
var t;
|
|
7886
7899
|
if (!e.nested) return;
|
|
7887
7900
|
let n = e.delta;
|
|
@@ -7889,7 +7902,7 @@ var af = {
|
|
|
7889
7902
|
let r, i, a = n, o = e.left, s = [], c = [], l = [];
|
|
7890
7903
|
for (r in a) if (r !== "_t") if (r[0] === "_") {
|
|
7891
7904
|
let e = r;
|
|
7892
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
7905
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === tf)) s.push(Number.parseInt(r.slice(1), 10));
|
|
7893
7906
|
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
7907
|
} else {
|
|
7895
7908
|
let e = r;
|
|
@@ -7901,15 +7914,15 @@ var af = {
|
|
|
7901
7914
|
delta: a[e]
|
|
7902
7915
|
});
|
|
7903
7916
|
}
|
|
7904
|
-
for (s = s.sort(
|
|
7917
|
+
for (s = s.sort(of.numerically), r = s.length - 1; r >= 0; r--) {
|
|
7905
7918
|
if (i = s[r], i === void 0) continue;
|
|
7906
7919
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
7907
|
-
(e == null ? void 0 : e[2]) ===
|
|
7920
|
+
(e == null ? void 0 : e[2]) === tf && c.push({
|
|
7908
7921
|
index: e[1],
|
|
7909
7922
|
value: t
|
|
7910
7923
|
});
|
|
7911
7924
|
}
|
|
7912
|
-
c = c.sort(
|
|
7925
|
+
c = c.sort(of.numericallyBy("index"));
|
|
7913
7926
|
let u = c.length;
|
|
7914
7927
|
for (r = 0; r < u; r++) {
|
|
7915
7928
|
let e = c[r];
|
|
@@ -7919,7 +7932,7 @@ var af = {
|
|
|
7919
7932
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
7920
7933
|
let t = l[r];
|
|
7921
7934
|
if (t === void 0) continue;
|
|
7922
|
-
let n = new
|
|
7935
|
+
let n = new qd(o[t.index], t.delta);
|
|
7923
7936
|
e.push(n, t.index);
|
|
7924
7937
|
}
|
|
7925
7938
|
if (!e.children) {
|
|
@@ -7928,8 +7941,8 @@ var af = {
|
|
|
7928
7941
|
}
|
|
7929
7942
|
e.exit();
|
|
7930
7943
|
};
|
|
7931
|
-
|
|
7932
|
-
var
|
|
7944
|
+
sf.filterName = "arrays";
|
|
7945
|
+
var cf = function(e) {
|
|
7933
7946
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
7934
7947
|
let t = e.left, n = e.children.length;
|
|
7935
7948
|
for (let r = 0; r < n; r++) {
|
|
@@ -7940,16 +7953,16 @@ var sf = function(e) {
|
|
|
7940
7953
|
}
|
|
7941
7954
|
e.setResult(t).exit();
|
|
7942
7955
|
};
|
|
7943
|
-
|
|
7944
|
-
var
|
|
7956
|
+
cf.filterName = "arraysCollectChildren";
|
|
7957
|
+
var lf = function(e) {
|
|
7945
7958
|
if (!e.nested) {
|
|
7946
7959
|
let t = e.delta;
|
|
7947
|
-
if (t[2] ===
|
|
7960
|
+
if (t[2] === tf) {
|
|
7948
7961
|
let n = t;
|
|
7949
7962
|
e.newName = `_${n[1]}`, e.setResult([
|
|
7950
7963
|
n[0],
|
|
7951
7964
|
Number.parseInt(e.childName.substring(1), 10),
|
|
7952
|
-
|
|
7965
|
+
tf
|
|
7953
7966
|
]).exit();
|
|
7954
7967
|
}
|
|
7955
7968
|
return;
|
|
@@ -7959,26 +7972,26 @@ var cf = function(e) {
|
|
|
7959
7972
|
let n = t;
|
|
7960
7973
|
for (let t in n) {
|
|
7961
7974
|
if (t === "_t") continue;
|
|
7962
|
-
let r = new
|
|
7975
|
+
let r = new Jd(n[t]);
|
|
7963
7976
|
e.push(r, t);
|
|
7964
7977
|
}
|
|
7965
7978
|
e.exit();
|
|
7966
7979
|
};
|
|
7967
|
-
|
|
7968
|
-
var
|
|
7980
|
+
lf.filterName = "arrays";
|
|
7981
|
+
var uf = (e, t, n) => {
|
|
7969
7982
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
7970
7983
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
7971
7984
|
let r = +t;
|
|
7972
7985
|
for (let n in e) {
|
|
7973
7986
|
let i = e[n];
|
|
7974
|
-
if (Array.isArray(i)) if (i[2] ===
|
|
7987
|
+
if (Array.isArray(i)) if (i[2] === tf) {
|
|
7975
7988
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
7976
7989
|
if (a === +t) return e;
|
|
7977
7990
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
7978
7991
|
} else i[2] === 0 ? Number.parseInt(n.substring(1), 10) <= r && r++ : i.length === 1 && Number.parseInt(n, 10) <= r && r--;
|
|
7979
7992
|
}
|
|
7980
7993
|
return r;
|
|
7981
|
-
},
|
|
7994
|
+
}, df = (e) => {
|
|
7982
7995
|
if (!e || !e.children) return;
|
|
7983
7996
|
let t = e.delta;
|
|
7984
7997
|
if (t._t !== "a") return;
|
|
@@ -7989,22 +8002,22 @@ var lf = (e, t, n) => {
|
|
|
7989
8002
|
let a = r.newName;
|
|
7990
8003
|
if (a === void 0) {
|
|
7991
8004
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
7992
|
-
a =
|
|
8005
|
+
a = uf(n, r.childName, r.result);
|
|
7993
8006
|
}
|
|
7994
8007
|
i[a] !== r.result && (i[a] = r.result);
|
|
7995
8008
|
}
|
|
7996
8009
|
e.setResult(i).exit();
|
|
7997
8010
|
};
|
|
7998
|
-
|
|
8011
|
+
df.filterName = "arraysCollectChildren";
|
|
7999
8012
|
//#endregion
|
|
8000
8013
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
8001
|
-
var
|
|
8014
|
+
var ff = function(e) {
|
|
8002
8015
|
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
8016
|
};
|
|
8004
|
-
|
|
8017
|
+
ff.filterName = "dates";
|
|
8005
8018
|
//#endregion
|
|
8006
8019
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
8007
|
-
var
|
|
8020
|
+
var pf = new Set(["__proto__"]), mf = (e) => {
|
|
8008
8021
|
if (!e || !e.children) return;
|
|
8009
8022
|
let t = e.children.length, n = e.result;
|
|
8010
8023
|
for (let r = 0; r < t; r++) {
|
|
@@ -8016,18 +8029,18 @@ var ff = new Set(["__proto__"]), pf = (e) => {
|
|
|
8016
8029
|
}
|
|
8017
8030
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
8018
8031
|
};
|
|
8019
|
-
|
|
8020
|
-
var
|
|
8032
|
+
mf.filterName = "collectChildren";
|
|
8033
|
+
var hf = (e) => {
|
|
8021
8034
|
var t;
|
|
8022
8035
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
8023
8036
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
8024
8037
|
for (let t in n) {
|
|
8025
8038
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
8026
|
-
let a = new
|
|
8039
|
+
let a = new Kd(n[t], r[t]);
|
|
8027
8040
|
e.push(a, t);
|
|
8028
8041
|
}
|
|
8029
8042
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
8030
|
-
let n = new
|
|
8043
|
+
let n = new Kd(void 0, r[t]);
|
|
8031
8044
|
e.push(n, t);
|
|
8032
8045
|
}
|
|
8033
8046
|
if (!e.children || e.children.length === 0) {
|
|
@@ -8036,15 +8049,15 @@ var mf = (e) => {
|
|
|
8036
8049
|
}
|
|
8037
8050
|
e.exit();
|
|
8038
8051
|
};
|
|
8039
|
-
|
|
8040
|
-
var
|
|
8052
|
+
hf.filterName = "objects";
|
|
8053
|
+
var gf = function(e) {
|
|
8041
8054
|
if (!e.nested) return;
|
|
8042
8055
|
let t = e.delta;
|
|
8043
8056
|
if (t._t) return;
|
|
8044
8057
|
let n = t, r = !1;
|
|
8045
8058
|
for (let t in n) {
|
|
8046
|
-
if (
|
|
8047
|
-
let i = e.left, a = new
|
|
8059
|
+
if (pf.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
8060
|
+
let i = e.left, a = new qd(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
8048
8061
|
e.push(a, t), r = !0;
|
|
8049
8062
|
}
|
|
8050
8063
|
if (!r) {
|
|
@@ -8053,8 +8066,8 @@ var hf = function(e) {
|
|
|
8053
8066
|
}
|
|
8054
8067
|
e.exit();
|
|
8055
8068
|
};
|
|
8056
|
-
|
|
8057
|
-
var
|
|
8069
|
+
gf.filterName = "objects";
|
|
8070
|
+
var _f = function(e) {
|
|
8058
8071
|
if (!e || !e.children || e.delta._t) return;
|
|
8059
8072
|
if (e.left === null || typeof e.left != "object") {
|
|
8060
8073
|
e.setResult(e.left).exit();
|
|
@@ -8065,17 +8078,17 @@ var gf = function(e) {
|
|
|
8065
8078
|
let n = e.children[r];
|
|
8066
8079
|
if (n === void 0) continue;
|
|
8067
8080
|
let i = n.childName;
|
|
8068
|
-
|
|
8081
|
+
pf.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
8082
|
}
|
|
8070
8083
|
e.setResult(t).exit();
|
|
8071
8084
|
};
|
|
8072
|
-
|
|
8073
|
-
var
|
|
8085
|
+
_f.filterName = "collectChildren";
|
|
8086
|
+
var vf = function(e) {
|
|
8074
8087
|
if (!e.nested || e.delta._t) return;
|
|
8075
8088
|
let t = e.delta, n = !1;
|
|
8076
8089
|
for (let r in t) {
|
|
8077
|
-
if (
|
|
8078
|
-
let i = new
|
|
8090
|
+
if (pf.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
8091
|
+
let i = new Jd(t[r]);
|
|
8079
8092
|
e.push(i, r), n = !0;
|
|
8080
8093
|
}
|
|
8081
8094
|
if (!n) {
|
|
@@ -8084,25 +8097,25 @@ var _f = function(e) {
|
|
|
8084
8097
|
}
|
|
8085
8098
|
e.exit();
|
|
8086
8099
|
};
|
|
8087
|
-
|
|
8088
|
-
var
|
|
8100
|
+
vf.filterName = "objects";
|
|
8101
|
+
var yf = (e) => {
|
|
8089
8102
|
if (!e || !e.children || e.delta._t) return;
|
|
8090
8103
|
let t = e.children.length, n = {};
|
|
8091
8104
|
for (let r = 0; r < t; r++) {
|
|
8092
8105
|
let t = e.children[r];
|
|
8093
8106
|
if (t === void 0) continue;
|
|
8094
8107
|
let i = t.childName;
|
|
8095
|
-
|
|
8108
|
+
pf.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
8096
8109
|
}
|
|
8097
8110
|
e.setResult(n).exit();
|
|
8098
8111
|
};
|
|
8099
|
-
|
|
8112
|
+
yf.filterName = "collectChildren";
|
|
8100
8113
|
//#endregion
|
|
8101
8114
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
8102
|
-
var
|
|
8103
|
-
function
|
|
8115
|
+
var bf = 2, xf = 60, Sf = null;
|
|
8116
|
+
function Cf(e, t) {
|
|
8104
8117
|
var n;
|
|
8105
|
-
if (!
|
|
8118
|
+
if (!Sf) {
|
|
8106
8119
|
let r;
|
|
8107
8120
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
8108
8121
|
else {
|
|
@@ -8110,7 +8123,7 @@ function Sf(e, t) {
|
|
|
8110
8123
|
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
8124
|
throw e.diff_match_patch_not_found = !0, e;
|
|
8112
8125
|
}
|
|
8113
|
-
|
|
8126
|
+
Sf = {
|
|
8114
8127
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
8115
8128
|
patch: (e, t) => {
|
|
8116
8129
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -8122,17 +8135,17 @@ function Sf(e, t) {
|
|
|
8122
8135
|
}
|
|
8123
8136
|
};
|
|
8124
8137
|
}
|
|
8125
|
-
return
|
|
8138
|
+
return Sf;
|
|
8126
8139
|
}
|
|
8127
|
-
var
|
|
8140
|
+
var wf = function(e) {
|
|
8128
8141
|
var t, n;
|
|
8129
8142
|
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) ||
|
|
8143
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || xf;
|
|
8131
8144
|
if (r.length < a || i.length < a) {
|
|
8132
8145
|
e.setResult([r, i]).exit();
|
|
8133
8146
|
return;
|
|
8134
8147
|
}
|
|
8135
|
-
let o =
|
|
8148
|
+
let o = Cf(e.options);
|
|
8136
8149
|
if (!o) {
|
|
8137
8150
|
e.setResult([r, i]).exit();
|
|
8138
8151
|
return;
|
|
@@ -8141,19 +8154,19 @@ var Cf = function(e) {
|
|
|
8141
8154
|
e.setResult([
|
|
8142
8155
|
s(r, i),
|
|
8143
8156
|
0,
|
|
8144
|
-
|
|
8157
|
+
bf
|
|
8145
8158
|
]).exit();
|
|
8146
8159
|
};
|
|
8147
|
-
|
|
8148
|
-
var
|
|
8160
|
+
wf.filterName = "texts";
|
|
8161
|
+
var Tf = function(e) {
|
|
8149
8162
|
if (e.nested) return;
|
|
8150
8163
|
let t = e.delta;
|
|
8151
|
-
if (t[2] !==
|
|
8152
|
-
let n = t, r =
|
|
8164
|
+
if (t[2] !== bf) return;
|
|
8165
|
+
let n = t, r = Cf(e.options, !0).patch;
|
|
8153
8166
|
e.setResult(r(e.left, n[0])).exit();
|
|
8154
8167
|
};
|
|
8155
|
-
|
|
8156
|
-
var
|
|
8168
|
+
Tf.filterName = "texts";
|
|
8169
|
+
var Ef = (e) => {
|
|
8157
8170
|
var t, n, r;
|
|
8158
8171
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
8159
8172
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -8174,21 +8187,21 @@ var Tf = (e) => {
|
|
|
8174
8187
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
8175
8188
|
}
|
|
8176
8189
|
return a.join("\n");
|
|
8177
|
-
},
|
|
8190
|
+
}, Df = function(e) {
|
|
8178
8191
|
if (e.nested) return;
|
|
8179
8192
|
let t = e.delta;
|
|
8180
|
-
if (t[2] !==
|
|
8193
|
+
if (t[2] !== bf) return;
|
|
8181
8194
|
let n = t;
|
|
8182
8195
|
e.setResult([
|
|
8183
|
-
|
|
8196
|
+
Ef(n[0]),
|
|
8184
8197
|
0,
|
|
8185
|
-
|
|
8198
|
+
bf
|
|
8186
8199
|
]).exit();
|
|
8187
8200
|
};
|
|
8188
|
-
|
|
8201
|
+
Df.filterName = "texts";
|
|
8189
8202
|
//#endregion
|
|
8190
8203
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
8191
|
-
var
|
|
8204
|
+
var Of = function(e) {
|
|
8192
8205
|
if (e.left === e.right) {
|
|
8193
8206
|
e.setResult(void 0).exit();
|
|
8194
8207
|
return;
|
|
@@ -8221,8 +8234,8 @@ var Df = function(e) {
|
|
|
8221
8234
|
}
|
|
8222
8235
|
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
8236
|
};
|
|
8224
|
-
|
|
8225
|
-
var
|
|
8237
|
+
Of.filterName = "trivial";
|
|
8238
|
+
var kf = function(e) {
|
|
8226
8239
|
if (e.delta === void 0) {
|
|
8227
8240
|
e.setResult(e.left).exit();
|
|
8228
8241
|
return;
|
|
@@ -8246,8 +8259,8 @@ var Of = function(e) {
|
|
|
8246
8259
|
}
|
|
8247
8260
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
8248
8261
|
};
|
|
8249
|
-
|
|
8250
|
-
var
|
|
8262
|
+
kf.filterName = "trivial";
|
|
8263
|
+
var Af = function(e) {
|
|
8251
8264
|
if (e.delta === void 0) {
|
|
8252
8265
|
e.setResult(e.delta).exit();
|
|
8253
8266
|
return;
|
|
@@ -8268,36 +8281,36 @@ var kf = function(e) {
|
|
|
8268
8281
|
}
|
|
8269
8282
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
8270
8283
|
};
|
|
8271
|
-
|
|
8284
|
+
Af.filterName = "trivial";
|
|
8272
8285
|
//#endregion
|
|
8273
8286
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
8274
|
-
var
|
|
8287
|
+
var jf = class {
|
|
8275
8288
|
constructor(e) {
|
|
8276
|
-
this.processor = new
|
|
8289
|
+
this.processor = new Xd(e), this.processor.pipe(new Yd("diff").append(mf, Of, ff, wf, hf, af).shouldHaveResult()), this.processor.pipe(new Yd("patch").append(_f, cf, kf, Tf, gf, sf).shouldHaveResult()), this.processor.pipe(new Yd("reverse").append(yf, df, Af, Df, vf, lf).shouldHaveResult());
|
|
8277
8290
|
}
|
|
8278
8291
|
options(e) {
|
|
8279
8292
|
return this.processor.options(e);
|
|
8280
8293
|
}
|
|
8281
8294
|
diff(e, t) {
|
|
8282
|
-
return this.processor.process(new
|
|
8295
|
+
return this.processor.process(new Kd(e, t));
|
|
8283
8296
|
}
|
|
8284
8297
|
patch(e, t) {
|
|
8285
|
-
return this.processor.process(new
|
|
8298
|
+
return this.processor.process(new qd(e, t));
|
|
8286
8299
|
}
|
|
8287
8300
|
reverse(e) {
|
|
8288
|
-
return this.processor.process(new
|
|
8301
|
+
return this.processor.process(new Jd(e));
|
|
8289
8302
|
}
|
|
8290
8303
|
unpatch(e, t) {
|
|
8291
8304
|
return this.patch(e, this.reverse(t));
|
|
8292
8305
|
}
|
|
8293
8306
|
clone(e) {
|
|
8294
|
-
return
|
|
8307
|
+
return Hd(e);
|
|
8295
8308
|
}
|
|
8296
8309
|
};
|
|
8297
8310
|
//#endregion
|
|
8298
8311
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
8299
|
-
function
|
|
8300
|
-
return new
|
|
8312
|
+
function Mf(e) {
|
|
8313
|
+
return new jf(e);
|
|
8301
8314
|
}
|
|
8302
8315
|
//#endregion
|
|
8303
8316
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -8870,46 +8883,46 @@ $.Diff = function(e, t) {
|
|
|
8870
8883
|
};
|
|
8871
8884
|
//#endregion
|
|
8872
8885
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
8873
|
-
var
|
|
8886
|
+
var Nf = (e = {}) => Mf({
|
|
8874
8887
|
...e,
|
|
8875
8888
|
textDiff: {
|
|
8876
8889
|
diffMatchPatch: $,
|
|
8877
8890
|
minLength: 120
|
|
8878
8891
|
},
|
|
8879
8892
|
cloneDiffValues: !0
|
|
8880
|
-
}),
|
|
8893
|
+
}), Pf = ["user", "unittemplate"], Ff = Nf(), If = (e, t, n) => {
|
|
8881
8894
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
8882
8895
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
8883
8896
|
let n = r[t[e]];
|
|
8884
8897
|
if (n) return n;
|
|
8885
8898
|
}
|
|
8886
8899
|
return n || "";
|
|
8887
|
-
},
|
|
8900
|
+
}, Lf = (e) => {
|
|
8888
8901
|
let t = (e) => Nn(e) ? Gn(e) : String(e);
|
|
8889
8902
|
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
|
-
},
|
|
8903
|
+
}, Rf = (e) => {
|
|
8891
8904
|
switch (e.length) {
|
|
8892
8905
|
case 1: {
|
|
8893
8906
|
let [t] = e;
|
|
8894
8907
|
return {
|
|
8895
8908
|
type: "created",
|
|
8896
8909
|
before: "",
|
|
8897
|
-
after:
|
|
8910
|
+
after: Lf(t)
|
|
8898
8911
|
};
|
|
8899
8912
|
}
|
|
8900
8913
|
case 2: {
|
|
8901
8914
|
let [t, n] = e;
|
|
8902
8915
|
return {
|
|
8903
8916
|
type: "modified",
|
|
8904
|
-
before:
|
|
8905
|
-
after:
|
|
8917
|
+
before: Lf(t),
|
|
8918
|
+
after: Lf(n)
|
|
8906
8919
|
};
|
|
8907
8920
|
}
|
|
8908
8921
|
case 3: {
|
|
8909
8922
|
let [t] = e;
|
|
8910
8923
|
return {
|
|
8911
8924
|
type: "deleted",
|
|
8912
|
-
before:
|
|
8925
|
+
before: Lf(t),
|
|
8913
8926
|
after: ""
|
|
8914
8927
|
};
|
|
8915
8928
|
}
|
|
@@ -8919,15 +8932,15 @@ var Mf = (e = {}) => jf({
|
|
|
8919
8932
|
after: ""
|
|
8920
8933
|
};
|
|
8921
8934
|
}
|
|
8922
|
-
},
|
|
8923
|
-
let r =
|
|
8935
|
+
}, zf = (e) => Array.isArray(e), Bf = (e, t) => t ? zf(t) ? t.length === 0 ? e : t.reduce((e, t) => Ff.unpatch(Xt(e), Xt(t)), Xt(e)) : Ff.unpatch(Xt(e), Xt(t)) : e, Vf = (e) => e.createdAt || e.date, Hf = (e, t, n) => {
|
|
8936
|
+
let r = Vf(e);
|
|
8924
8937
|
if (!r) return {
|
|
8925
8938
|
oldJson: "",
|
|
8926
8939
|
newJson: "",
|
|
8927
8940
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
8928
8941
|
};
|
|
8929
8942
|
let i = t.filter((e) => {
|
|
8930
|
-
let t =
|
|
8943
|
+
let t = Vf(e);
|
|
8931
8944
|
return !!(e.diffs && t && t >= r);
|
|
8932
8945
|
}), a = Array.from({ length: i.length + 1 });
|
|
8933
8946
|
a[0] = Xt(n);
|
|
@@ -8940,7 +8953,7 @@ var Mf = (e = {}) => jf({
|
|
|
8940
8953
|
a[e + 1] = a[e];
|
|
8941
8954
|
continue;
|
|
8942
8955
|
}
|
|
8943
|
-
a[e + 1] =
|
|
8956
|
+
a[e + 1] = Bf(a[e], t);
|
|
8944
8957
|
}
|
|
8945
8958
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
8946
8959
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -8955,10 +8968,10 @@ var Mf = (e = {}) => jf({
|
|
|
8955
8968
|
oldJson: o,
|
|
8956
8969
|
newJson: s
|
|
8957
8970
|
};
|
|
8958
|
-
},
|
|
8971
|
+
}, Uf = (e, t, n = {}, r = []) => {
|
|
8959
8972
|
var i;
|
|
8960
8973
|
if (!e) return;
|
|
8961
|
-
let a = [...
|
|
8974
|
+
let a = [...Pf, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
8962
8975
|
Object.keys(e).forEach((i) => {
|
|
8963
8976
|
var o;
|
|
8964
8977
|
let s = e[i];
|
|
@@ -8971,12 +8984,12 @@ var Mf = (e = {}) => jf({
|
|
|
8971
8984
|
tn(s) ? t.push({
|
|
8972
8985
|
deltaFormat: [...s],
|
|
8973
8986
|
path: c
|
|
8974
|
-
}) : ln(s) &&
|
|
8987
|
+
}) : ln(s) && Uf(s, t, n, c);
|
|
8975
8988
|
});
|
|
8976
|
-
},
|
|
8989
|
+
}, Wf = (e, t = {}) => {
|
|
8977
8990
|
let n = [];
|
|
8978
|
-
return e ? (
|
|
8979
|
-
},
|
|
8991
|
+
return e ? (Uf(e, n, t), n) : [];
|
|
8992
|
+
}, Gf = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), Kf = (e) => {
|
|
8980
8993
|
if (e == null || e === "") return "empty";
|
|
8981
8994
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
8982
8995
|
if (typeof e == "string") return e;
|
|
@@ -8987,32 +9000,32 @@ var Mf = (e = {}) => jf({
|
|
|
8987
9000
|
} catch {
|
|
8988
9001
|
return String(e);
|
|
8989
9002
|
}
|
|
8990
|
-
},
|
|
9003
|
+
}, qf = (e, t = e.length - 1) => {
|
|
8991
9004
|
if (t >= e.length) return "Value";
|
|
8992
9005
|
let n = e[t];
|
|
8993
|
-
return !n || An(n) ?
|
|
8994
|
-
},
|
|
8995
|
-
let o =
|
|
9006
|
+
return !n || An(n) ? qf(e, t - 1) : Gf(n);
|
|
9007
|
+
}, Jf = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
9008
|
+
let o = Kf(r), s = Kf(i), c = a ? ` in ${a}` : "";
|
|
8996
9009
|
switch (t) {
|
|
8997
9010
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
8998
9011
|
case "created": return `${e} created ${s}${c}.`;
|
|
8999
9012
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
9000
9013
|
default: return `${e} changed ${n}${c}.`;
|
|
9001
9014
|
}
|
|
9002
|
-
},
|
|
9015
|
+
}, Yf = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => /* @__PURE__ */ v(xc, { table: {
|
|
9003
9016
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
9004
9017
|
rows: n.map((n) => {
|
|
9005
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
9006
|
-
return { cells: [{ value:
|
|
9018
|
+
let { deltaFormat: i, path: a } = n, o = If(e, a, r), { type: s, before: c, after: l } = Rf(i);
|
|
9019
|
+
return { cells: [{ value: Jf({
|
|
9007
9020
|
userName: t,
|
|
9008
9021
|
type: s,
|
|
9009
|
-
property:
|
|
9022
|
+
property: qf(a),
|
|
9010
9023
|
before: c,
|
|
9011
9024
|
after: l,
|
|
9012
9025
|
sectionName: o
|
|
9013
9026
|
}) }] };
|
|
9014
9027
|
})
|
|
9015
|
-
} }),
|
|
9028
|
+
} }), Xf = Object.freeze({
|
|
9016
9029
|
summary: {
|
|
9017
9030
|
label: "Summary",
|
|
9018
9031
|
value: "summary"
|
|
@@ -9021,33 +9034,33 @@ var Mf = (e = {}) => jf({
|
|
|
9021
9034
|
label: "Compare",
|
|
9022
9035
|
value: "compare"
|
|
9023
9036
|
}
|
|
9024
|
-
}),
|
|
9025
|
-
let c = [
|
|
9037
|
+
}), Zf = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
9038
|
+
let c = [Xf.summary, Xf.compare].map(({ label: e, value: t }) => ({
|
|
9026
9039
|
label: e,
|
|
9027
9040
|
value: t
|
|
9028
9041
|
})), [l, u] = m(c[0]), { diffs: d = void 0 } = e || {};
|
|
9029
9042
|
if (!d) return null;
|
|
9030
|
-
let { oldJson: f, newJson: p, error: h } =
|
|
9043
|
+
let { oldJson: f, newJson: p, error: h } = Hf(e, t, n);
|
|
9031
9044
|
return /* @__PURE__ */ v(Ka, {
|
|
9032
9045
|
visible: r,
|
|
9033
9046
|
centered: !0,
|
|
9034
9047
|
children: /* @__PURE__ */ v(Sa, { dialog: {
|
|
9035
9048
|
scroll: !0,
|
|
9036
9049
|
heading: "Comparison view",
|
|
9037
|
-
content: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(
|
|
9050
|
+
content: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(ju, {
|
|
9038
9051
|
name: "ViewTab",
|
|
9039
9052
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
9040
9053
|
options: c,
|
|
9041
9054
|
value: l
|
|
9042
|
-
}), l.value === "summary" ? /* @__PURE__ */ v(
|
|
9055
|
+
}), l.value === "summary" ? /* @__PURE__ */ v(Yf, {
|
|
9043
9056
|
userName: e.userName,
|
|
9044
9057
|
sectionNames: a,
|
|
9045
|
-
diffs:
|
|
9058
|
+
diffs: Wf(d, i),
|
|
9046
9059
|
defaultSectionName: o
|
|
9047
9060
|
}) : h ? /* @__PURE__ */ v("div", {
|
|
9048
9061
|
style: { padding: 16 },
|
|
9049
9062
|
children: h
|
|
9050
|
-
}) : /* @__PURE__ */ v(
|
|
9063
|
+
}) : /* @__PURE__ */ v(zd, {
|
|
9051
9064
|
oldJson: f,
|
|
9052
9065
|
newJson: p
|
|
9053
9066
|
})] }),
|
|
@@ -9060,7 +9073,7 @@ var Mf = (e = {}) => jf({
|
|
|
9060
9073
|
height: "90vh"
|
|
9061
9074
|
} })
|
|
9062
9075
|
});
|
|
9063
|
-
},
|
|
9076
|
+
}, Qf = [
|
|
9064
9077
|
{
|
|
9065
9078
|
label: "10 / page",
|
|
9066
9079
|
value: 10
|
|
@@ -9073,8 +9086,8 @@ var Mf = (e = {}) => jf({
|
|
|
9073
9086
|
label: "50 / page",
|
|
9074
9087
|
value: 50
|
|
9075
9088
|
}
|
|
9076
|
-
],
|
|
9077
|
-
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s =
|
|
9089
|
+
], $f = (e, t = {}) => {
|
|
9090
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = Wf(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
9078
9091
|
if (i === "API") return a === "Created" ? "Created through API" : "Changed through API";
|
|
9079
9092
|
switch (a) {
|
|
9080
9093
|
case "Created": return `Created by ${r}`;
|
|
@@ -9084,7 +9097,7 @@ var Mf = (e = {}) => jf({
|
|
|
9084
9097
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
9085
9098
|
default: return `Change by ${r}`;
|
|
9086
9099
|
}
|
|
9087
|
-
},
|
|
9100
|
+
}, ep = ({ 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
9101
|
let [b, x] = m(!1), [S, C] = m(null), w = (e) => {
|
|
9089
9102
|
if (e.snapshot) {
|
|
9090
9103
|
f == null || f(e.snapshot, e);
|
|
@@ -9103,7 +9116,7 @@ var Mf = (e = {}) => jf({
|
|
|
9103
9116
|
return {
|
|
9104
9117
|
cells: [
|
|
9105
9118
|
{
|
|
9106
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
9119
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : $f(e, l),
|
|
9107
9120
|
type: "Link",
|
|
9108
9121
|
disabled: n,
|
|
9109
9122
|
onClick: n ? void 0 : () => w(e),
|
|
@@ -9122,8 +9135,8 @@ var Mf = (e = {}) => jf({
|
|
|
9122
9135
|
type: "Static"
|
|
9123
9136
|
},
|
|
9124
9137
|
{
|
|
9125
|
-
value:
|
|
9126
|
-
date:
|
|
9138
|
+
value: Bd({
|
|
9139
|
+
date: Vf(e),
|
|
9127
9140
|
showTime: !0
|
|
9128
9141
|
}),
|
|
9129
9142
|
type: "Static"
|
|
@@ -9133,12 +9146,12 @@ var Mf = (e = {}) => jf({
|
|
|
9133
9146
|
};
|
|
9134
9147
|
});
|
|
9135
9148
|
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(na, {
|
|
9136
|
-
heading: /* @__PURE__ */ y(
|
|
9149
|
+
heading: /* @__PURE__ */ y(Fl, {
|
|
9137
9150
|
gap: !0,
|
|
9138
9151
|
wrap: !0,
|
|
9139
9152
|
children: [/* @__PURE__ */ v(ya, { children: "Changes" }), c.map((e) => {
|
|
9140
9153
|
var t;
|
|
9141
|
-
return /* @__PURE__ */ v(
|
|
9154
|
+
return /* @__PURE__ */ v(pl, {
|
|
9142
9155
|
small: (t = e.small) == null ? !0 : t,
|
|
9143
9156
|
checked: e.checked,
|
|
9144
9157
|
onChange: e.onChange,
|
|
@@ -9148,11 +9161,11 @@ var Mf = (e = {}) => jf({
|
|
|
9148
9161
|
})]
|
|
9149
9162
|
}),
|
|
9150
9163
|
padding: !1,
|
|
9151
|
-
children: r ? /* @__PURE__ */ v(
|
|
9164
|
+
children: r ? /* @__PURE__ */ v(nu, {
|
|
9152
9165
|
height: "100px",
|
|
9153
9166
|
theme: Or.WHITE,
|
|
9154
9167
|
children: /* @__PURE__ */ v(mi, { dark: !0 })
|
|
9155
|
-
}) : /* @__PURE__ */ v(
|
|
9168
|
+
}) : /* @__PURE__ */ v(xc, { table: {
|
|
9156
9169
|
headers: T,
|
|
9157
9170
|
testId: "auditlog-table",
|
|
9158
9171
|
rows: E,
|
|
@@ -9166,14 +9179,14 @@ var Mf = (e = {}) => jf({
|
|
|
9166
9179
|
onChange: (e) => {
|
|
9167
9180
|
u(Number(e.target.value));
|
|
9168
9181
|
},
|
|
9169
|
-
options:
|
|
9182
|
+
options: Qf,
|
|
9170
9183
|
value: a
|
|
9171
9184
|
},
|
|
9172
9185
|
onSelectPage: (e) => d(e),
|
|
9173
9186
|
small: !0
|
|
9174
9187
|
} }
|
|
9175
9188
|
} })
|
|
9176
|
-
}), b && S && S.diffs && /* @__PURE__ */ v(
|
|
9189
|
+
}), b && S && S.diffs && /* @__PURE__ */ v(Zf, {
|
|
9177
9190
|
sectionNames: o,
|
|
9178
9191
|
isOpen: b,
|
|
9179
9192
|
onClose: () => x(!1),
|
|
@@ -9183,7 +9196,7 @@ var Mf = (e = {}) => jf({
|
|
|
9183
9196
|
data: t,
|
|
9184
9197
|
transformDiffsConfig: l
|
|
9185
9198
|
})] });
|
|
9186
|
-
},
|
|
9199
|
+
}, tp = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
9187
9200
|
let i = window.location.href, a = p(i);
|
|
9188
9201
|
return c(() => {
|
|
9189
9202
|
a.current = i;
|
|
@@ -9206,10 +9219,10 @@ var Mf = (e = {}) => jf({
|
|
|
9206
9219
|
});
|
|
9207
9220
|
};
|
|
9208
9221
|
}, [e, t]), null;
|
|
9209
|
-
},
|
|
9210
|
-
|
|
9211
|
-
e ===
|
|
9222
|
+
}, np = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, rp = (e) => {
|
|
9223
|
+
kd(wd.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
9224
|
+
e === wd.Translations ? kd(e, Ed(t)) : kd(e, np(t) ? t : { ...t });
|
|
9212
9225
|
});
|
|
9213
9226
|
};
|
|
9214
9227
|
//#endregion
|
|
9215
|
-
export { qr as Accordion, fi as AccordionWithDefaultToggle, Ji as Actions, Tr as Align,
|
|
9228
|
+
export { qr as Accordion, fi as AccordionWithDefaultToggle, Ji as Actions, Tr as Align, ep 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, zd as DiffViewer, H as DisabledContext, _a as Divider, ka as Drawer, Ru as ElementType, Mc as Empty, Pl as Field, Al as FileButton, za as FileInput, Fl as Flex, Ll as FormRow, Vl 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, Ml as Label, eu as List, Ul as ListHeading, Yl as ListSubheading, nu 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, cu as OptionDropdown, uu as Page, As as Pagination, Wu as PopConfirm, aa as Popover, Ha as Portal, fu as PrintHeader, Ya as ProgressBar, pu as RadioButton, vu as RichTextInput, bu as Row, Cs as Select, Fd as SettingField, Tu as SideBar, Du as Skeleton, ec as Slider, eo as SmartUploadModal, Ba as Spacer, mi as Spinner, xc as Table, kl as TableImportExport, ju as Tabs, ha as Text, Pu as TextArea, Mu as TextLink, Dr as TextTransform, Or as Theme, cr as Toaster, pl as Toggle, W as Tooltip, Vu as TopBar, Ju as Tree, id as TreeTable, Cr as TriggerType, Cd as UnitInput, Nd as UnitTable, tp as UsageTracker, ul as dismissToast, bd as initializeContext, rp as initializeGuiLibrary, La as readFile, ll as toast, bo as useFocus, Va as useKeyboardEvent, Co as useWindowWidth };
|