@oliasoft-open-source/react-ui-library 10.0.0-beta-39 → 10.0.0-beta-40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +817 -815
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2820,7 +2820,15 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
2820
2820
|
A,
|
|
2821
2821
|
j
|
|
2822
2822
|
]), N = g(() => {
|
|
2823
|
-
|
|
2823
|
+
let e = /* @__PURE__ */ new Map();
|
|
2824
|
+
for (let t of x) e.set(t.id, t);
|
|
2825
|
+
return e;
|
|
2826
|
+
}, [x]), P = g(() => {
|
|
2827
|
+
if (c) return (Array.isArray(r) ? r : []).filter((e) => e && !Pr(e.value)).map((e) => String(e.value));
|
|
2828
|
+
let e = Array.isArray(r) ? r[0] : r;
|
|
2829
|
+
return Pr(e == null ? void 0 : e.value) ? null : String(e.value);
|
|
2830
|
+
}, [c, r]), F = g(() => c ? Array.isArray(P) ? P : [] : Pr(P) ? [] : [P], [P, c]), I = g(() => {
|
|
2831
|
+
if (d && w && !C.trim()) return F.length === 0 ? [] : x.filter((e) => F.includes(e.id));
|
|
2824
2832
|
let e = d ? C.trim().toLowerCase() : "", t = e ? x.filter((t) => t.searchText.includes(e)) : x;
|
|
2825
2833
|
return f && e ? [...t, {
|
|
2826
2834
|
id: Oc,
|
|
@@ -2834,28 +2842,21 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
2834
2842
|
C,
|
|
2835
2843
|
f,
|
|
2836
2844
|
d,
|
|
2837
|
-
w
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
for (let t of x) e.set(t.id, t);
|
|
2841
|
-
return e;
|
|
2842
|
-
}, [x]), F = g(() => {
|
|
2843
|
-
if (c) return (Array.isArray(r) ? r : []).filter((e) => e && !Pr(e.value)).map((e) => String(e.value));
|
|
2844
|
-
let e = Array.isArray(r) ? r[0] : r;
|
|
2845
|
-
return Pr(e == null ? void 0 : e.value) ? null : String(e.value);
|
|
2846
|
-
}, [c, r]), I = g(() => {
|
|
2845
|
+
w,
|
|
2846
|
+
F
|
|
2847
|
+
]), L = g(() => {
|
|
2847
2848
|
if (c) {
|
|
2848
2849
|
let e = Array.isArray(r) ? r[0] : null;
|
|
2849
2850
|
return Pr(e == null ? void 0 : e.value) ? null : String(e.value);
|
|
2850
2851
|
}
|
|
2851
|
-
return
|
|
2852
|
+
return P;
|
|
2852
2853
|
}, [
|
|
2853
|
-
|
|
2854
|
+
P,
|
|
2854
2855
|
c,
|
|
2855
2856
|
r
|
|
2856
|
-
]),
|
|
2857
|
+
]), R = u((e) => {
|
|
2857
2858
|
n == null || n({ target: {} }, e);
|
|
2858
|
-
}, [n]),
|
|
2859
|
+
}, [n]), z = u((e = S) => {
|
|
2859
2860
|
if (!(!t || !e) && (h.current = !0, t(e), E(), !c)) {
|
|
2860
2861
|
var n;
|
|
2861
2862
|
(n = m.current) == null || n.close();
|
|
@@ -2865,16 +2866,16 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
2865
2866
|
c,
|
|
2866
2867
|
t,
|
|
2867
2868
|
E
|
|
2868
|
-
]),
|
|
2869
|
+
]), B = u((e) => {
|
|
2869
2870
|
if (E(), c) {
|
|
2870
2871
|
let t = Fc(e);
|
|
2871
2872
|
if (t.includes("create")) {
|
|
2872
|
-
|
|
2873
|
+
z();
|
|
2873
2874
|
return;
|
|
2874
2875
|
}
|
|
2875
|
-
let n = Array.isArray(
|
|
2876
|
+
let n = Array.isArray(P) ? P : [];
|
|
2876
2877
|
if (t.length === n.length && t.every((e) => n.includes(e))) return;
|
|
2877
|
-
let r = t.map((e) =>
|
|
2878
|
+
let r = t.map((e) => N.get(e)).filter((e) => !Pr(e) && e.type !== Qa.HEADING).map((e) => ({
|
|
2878
2879
|
value: e.value,
|
|
2879
2880
|
label: e.label,
|
|
2880
2881
|
details: e.details,
|
|
@@ -2882,7 +2883,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
2882
2883
|
actions: e.actions,
|
|
2883
2884
|
testId: e.testId
|
|
2884
2885
|
}));
|
|
2885
|
-
|
|
2886
|
+
R(r);
|
|
2886
2887
|
return;
|
|
2887
2888
|
}
|
|
2888
2889
|
let t = Array.isArray(e) ? e[0] : e;
|
|
@@ -2891,16 +2892,17 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
2891
2892
|
h.current = !1;
|
|
2892
2893
|
return;
|
|
2893
2894
|
}
|
|
2894
|
-
|
|
2895
|
+
if (!Pr(P)) return;
|
|
2896
|
+
R({ value: null });
|
|
2895
2897
|
return;
|
|
2896
2898
|
}
|
|
2897
2899
|
if (String(t) === "create") {
|
|
2898
|
-
|
|
2900
|
+
z();
|
|
2899
2901
|
return;
|
|
2900
2902
|
}
|
|
2901
|
-
if (String(t) ===
|
|
2902
|
-
let n =
|
|
2903
|
-
!n || n.type === Qa.HEADING || n.disabled || n.createAble ||
|
|
2903
|
+
if (String(t) === P) return;
|
|
2904
|
+
let n = N.get(String(t));
|
|
2905
|
+
!n || n.type === Qa.HEADING || n.disabled || n.createAble || R({
|
|
2904
2906
|
value: n.value,
|
|
2905
2907
|
label: n.label,
|
|
2906
2908
|
details: n.details,
|
|
@@ -2910,31 +2912,31 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
2910
2912
|
});
|
|
2911
2913
|
}, [
|
|
2912
2914
|
E,
|
|
2913
|
-
|
|
2914
|
-
L,
|
|
2915
|
+
P,
|
|
2915
2916
|
R,
|
|
2917
|
+
z,
|
|
2916
2918
|
c,
|
|
2917
|
-
|
|
2919
|
+
N
|
|
2918
2920
|
]);
|
|
2919
2921
|
return {
|
|
2920
2922
|
getTriggerWidth: j,
|
|
2921
2923
|
onChangeSearch: T,
|
|
2922
2924
|
onClickClearAll: u(() => {
|
|
2923
|
-
E(),
|
|
2925
|
+
E(), R(c ? [] : { value: null });
|
|
2924
2926
|
}, [
|
|
2925
2927
|
E,
|
|
2926
|
-
|
|
2928
|
+
R,
|
|
2927
2929
|
c
|
|
2928
2930
|
]),
|
|
2929
2931
|
closeLayer: D,
|
|
2930
|
-
handleChange:
|
|
2932
|
+
handleChange: B,
|
|
2931
2933
|
getLayerWidth: M,
|
|
2932
2934
|
searchValue: S,
|
|
2933
2935
|
isOpen: _,
|
|
2934
2936
|
setIsOpen: O,
|
|
2935
|
-
visibleOptions:
|
|
2936
|
-
comboValue:
|
|
2937
|
-
selectedItemId:
|
|
2937
|
+
visibleOptions: I,
|
|
2938
|
+
comboValue: P,
|
|
2939
|
+
selectedItemId: L,
|
|
2938
2940
|
comboBoxStateRef: m
|
|
2939
2941
|
};
|
|
2940
2942
|
}, Lc = ({ items: e, optionsCount: t, selectedItemId: n, width: r, small: i, isMulti: a = !1, closeLayer: o, testId: s }) => {
|
|
@@ -3147,7 +3149,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3147
3149
|
display: "block",
|
|
3148
3150
|
children: A
|
|
3149
3151
|
}) });
|
|
3150
|
-
}, Wc = (e) => {
|
|
3152
|
+
}, Wc = () => !0, Gc = (e) => {
|
|
3151
3153
|
let { multi: t = !1, disabled: n = !1, error: r = null, warning: i = null, tooltip: a = null, options: o, selectedOptions: s, onChange: c, onCreate: l = null, placeholder: u = "", small: f = !1, tabIndex: p = 0, onFocus: m = Ir, onBlur: g = Ir, searchable: _ = !0, clearable: b = !1, maxTooltipWidth: x, closeOnOptionActionClick: S, isInTable: T = !1, groupOrder: E, right: D = !1, width: O = null, autoLayerWidth: k = !1, testId: A } = e, j = d(W), M = n || j, N = v(null), [P, F] = y(0), { getTriggerWidth: I, onChangeSearch: L, onClickClearAll: R, closeLayer: z, handleChange: B, getLayerWidth: ee, searchValue: te, isOpen: ne, setIsOpen: V, visibleOptions: re, comboValue: ie, selectedItemId: ae, comboBoxStateRef: oe } = Ic({
|
|
3152
3154
|
options: o,
|
|
3153
3155
|
onCreate: l,
|
|
@@ -3174,7 +3176,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3174
3176
|
inputValue: te,
|
|
3175
3177
|
onInputChange: _ ? L : void 0,
|
|
3176
3178
|
items: re,
|
|
3177
|
-
defaultFilter:
|
|
3179
|
+
defaultFilter: Wc,
|
|
3178
3180
|
allowsEmptyCollection: !0,
|
|
3179
3181
|
menuTrigger: "manual",
|
|
3180
3182
|
onOpenChange: V,
|
|
@@ -3222,32 +3224,32 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3222
3224
|
})
|
|
3223
3225
|
]
|
|
3224
3226
|
});
|
|
3225
|
-
},
|
|
3227
|
+
}, Kc = (e) => e == null || e === "", qc = (e) => /^-?\d+(\.\d+)?$/.test(e.trim()), Jc = (e) => e instanceof Array, Yc = (e, t) => t && Array.isArray(e) ? e.map((e) => typeof e == "string" || typeof e == "number" ? {
|
|
3226
3228
|
label: e,
|
|
3227
3229
|
value: e
|
|
3228
|
-
} : e) : e,
|
|
3230
|
+
} : e) : e, Xc = (e, t) => {
|
|
3229
3231
|
if (typeof t == "object" && t && t.hasOwnProperty("label") && t.hasOwnProperty("value")) return t;
|
|
3230
3232
|
{
|
|
3231
3233
|
let n = typeof t == "object" && t && t.hasOwnProperty("value") ? t.value : t;
|
|
3232
|
-
return (Array.isArray(e) ? e.filter((e) => e.type !== Qa.HEADING).find((e) => e.value == n) : void 0) || (
|
|
3234
|
+
return (Array.isArray(e) ? e.filter((e) => e.type !== Qa.HEADING).find((e) => e.value == n) : void 0) || (Kc(n) ? void 0 : {
|
|
3233
3235
|
value: n,
|
|
3234
3236
|
label: n
|
|
3235
3237
|
});
|
|
3236
3238
|
}
|
|
3237
|
-
},
|
|
3238
|
-
let n =
|
|
3239
|
+
}, Zc = (e, t) => Jc(t) ? t.map((t) => Xc(e, t)).filter((e) => e !== void 0) : t === null ? void 0 : Xc(e, t), Qc = (e) => Array.isArray(e) && e.some((e) => typeof e == "string" || typeof e == "number"), $c = (e, t) => {
|
|
3240
|
+
let n = Jc(t) ? t : Kc(t) ? [] : [t];
|
|
3239
3241
|
return !(n != null && n.every((t) => (e == null ? void 0 : e.find((e) => (e == null ? void 0 : e.value) === (t == null ? void 0 : t.value))) !== void 0));
|
|
3240
|
-
},
|
|
3241
|
-
let r = Array.isArray(e) ? e : [], i =
|
|
3242
|
+
}, el = (e, t, n) => {
|
|
3243
|
+
let r = Array.isArray(e) ? e : [], i = Jc(t), a = Qc(r), o = Yc(r, a), s = Zc(o, t);
|
|
3242
3244
|
return {
|
|
3243
3245
|
options: o,
|
|
3244
3246
|
selectedOptions: s,
|
|
3245
3247
|
multi: i,
|
|
3246
3248
|
simpleInputs: a,
|
|
3247
|
-
hasNonExistentValue: n && s !== void 0 ?
|
|
3249
|
+
hasNonExistentValue: n && s !== void 0 ? $c(o, s) : !1
|
|
3248
3250
|
};
|
|
3249
|
-
},
|
|
3250
|
-
let { name: t = "", options: n = [], value: r, native: i = !1, onChange: a = bn, warning: o, error: s, checkNonExistentValues: c = !0, closeOnOptionActionClick: l = !0, testId: u, disabled: d, multi: f, ...p } = e, { multi: m, options: h, selectedOptions: g, hasNonExistentValue: _ } =
|
|
3251
|
+
}, tl = (e) => {
|
|
3252
|
+
let { name: t = "", options: n = [], value: r, native: i = !1, onChange: a = bn, warning: o, error: s, checkNonExistentValues: c = !0, closeOnOptionActionClick: l = !0, testId: u, disabled: d, multi: f, ...p } = e, { multi: m, options: h, selectedOptions: g, hasNonExistentValue: _ } = el(n, r, c), v = !m, y = i && v;
|
|
3251
3253
|
i && !v && console.warn("Native select does not support provided props (see stories)");
|
|
3252
3254
|
let b = "Value no longer available for re-selection", x = _ && !d ? o ? /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("div", { children: b }), /* @__PURE__ */ C("div", { children: o })] }) : b : o, S = _ && s && !d ? /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("div", { children: b }), /* @__PURE__ */ C("div", { children: s })] }) : s, T = (e, n) => {
|
|
3253
3255
|
let r = m ? n : n.value;
|
|
@@ -3270,7 +3272,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3270
3272
|
error: S,
|
|
3271
3273
|
testId: u,
|
|
3272
3274
|
disabled: d
|
|
3273
|
-
}) : /* @__PURE__ */ C(
|
|
3275
|
+
}) : /* @__PURE__ */ C(Gc, {
|
|
3274
3276
|
...p,
|
|
3275
3277
|
options: h,
|
|
3276
3278
|
selectedOptions: g,
|
|
@@ -3282,11 +3284,11 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3282
3284
|
disabled: d,
|
|
3283
3285
|
closeOnOptionActionClick: l
|
|
3284
3286
|
});
|
|
3285
|
-
},
|
|
3287
|
+
}, nl = (e, t) => t || e && e.reduce((e, t) => t != null && t.selected ? Number(t == null ? void 0 : t.value) : e, 10) || 10, rl = (e, t) => {
|
|
3286
3288
|
if (!t || !e) return 10;
|
|
3287
3289
|
let { options: n, value: r } = t, i = Number(r);
|
|
3288
|
-
return i === 0 ? 1 : Math.ceil(e /
|
|
3289
|
-
},
|
|
3290
|
+
return i === 0 ? 1 : Math.ceil(e / nl(n, i));
|
|
3291
|
+
}, il = (e, t, n = "Selected page must be a positive whole number between 1 and") => {
|
|
3290
3292
|
let r = `${n} ${t}`, i = {
|
|
3291
3293
|
valid: !0,
|
|
3292
3294
|
error: null
|
|
@@ -3295,40 +3297,40 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3295
3297
|
valid: !1,
|
|
3296
3298
|
error: r
|
|
3297
3299
|
} : i;
|
|
3298
|
-
},
|
|
3300
|
+
}, al = { paginationContainer: "_paginationContainer_1tmz4_1" }, ol = {
|
|
3299
3301
|
addon: "_addon_b4w53_1",
|
|
3300
3302
|
small: "_small_b4w53_12",
|
|
3301
3303
|
groupOrderFirst: "_groupOrderFirst_b4w53_16",
|
|
3302
3304
|
groupOrderMiddle: "_groupOrderMiddle_b4w53_17",
|
|
3303
3305
|
groupOrderLast: "_groupOrderLast_b4w53_21"
|
|
3304
|
-
},
|
|
3306
|
+
}, sl = ({ children: e, groupOrder: t, small: n = !1 }) => {
|
|
3305
3307
|
let r = (() => {
|
|
3306
3308
|
if (t) switch (t) {
|
|
3307
|
-
case H.FIRST: return
|
|
3308
|
-
case H.LAST: return
|
|
3309
|
-
default: return
|
|
3309
|
+
case H.FIRST: return ol.groupOrderFirst;
|
|
3310
|
+
case H.LAST: return ol.groupOrderLast;
|
|
3311
|
+
default: return ol.groupOrderMiddle;
|
|
3310
3312
|
}
|
|
3311
3313
|
return "";
|
|
3312
3314
|
})();
|
|
3313
3315
|
return /* @__PURE__ */ C("span", {
|
|
3314
|
-
className: x(
|
|
3316
|
+
className: x(ol.addon, r, n ? ol.small : ""),
|
|
3315
3317
|
children: e
|
|
3316
3318
|
});
|
|
3317
|
-
},
|
|
3318
|
-
let { rowCount: t, selectedPage: n, small: r, onSelectPage: i, rowsPerPage: a, errorMessageTemplate: o, testIds: s } = e, c = Number(a == null ? void 0 : a.value) === 0, l =
|
|
3319
|
+
}, cl = ({ pagination: e }) => {
|
|
3320
|
+
let { rowCount: t, selectedPage: n, small: r, onSelectPage: i, rowsPerPage: a, errorMessageTemplate: o, testIds: s } = e, c = Number(a == null ? void 0 : a.value) === 0, l = rl(t, a), [u, d] = y(String(n));
|
|
3319
3321
|
f(() => {
|
|
3320
3322
|
d(String(n));
|
|
3321
3323
|
}, [n]);
|
|
3322
|
-
let { error: p } =
|
|
3323
|
-
let { valid: t } =
|
|
3324
|
+
let { error: p } = il(u, l, o), m = (e) => {
|
|
3325
|
+
let { valid: t } = il(e, l, o);
|
|
3324
3326
|
d(e), t && e !== "" && i && i(Number(e));
|
|
3325
3327
|
};
|
|
3326
3328
|
return /* @__PURE__ */ w("div", {
|
|
3327
|
-
className:
|
|
3329
|
+
className: al.paginationContainer,
|
|
3328
3330
|
children: [
|
|
3329
3331
|
a && /* @__PURE__ */ C("div", {
|
|
3330
3332
|
style: { flexShrink: 0 },
|
|
3331
|
-
children: /* @__PURE__ */ C(
|
|
3333
|
+
children: /* @__PURE__ */ C(tl, {
|
|
3332
3334
|
onChange: (e) => {
|
|
3333
3335
|
a.onChange && a.onChange(e), m("1");
|
|
3334
3336
|
},
|
|
@@ -3366,7 +3368,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3366
3368
|
width: "50px",
|
|
3367
3369
|
disabled: c || l <= 1,
|
|
3368
3370
|
error: p
|
|
3369
|
-
}), /* @__PURE__ */ w(
|
|
3371
|
+
}), /* @__PURE__ */ w(sl, { children: ["of ", l] })]
|
|
3370
3372
|
}),
|
|
3371
3373
|
/* @__PURE__ */ C(q, {
|
|
3372
3374
|
small: r,
|
|
@@ -3387,7 +3389,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3387
3389
|
})
|
|
3388
3390
|
]
|
|
3389
3391
|
});
|
|
3390
|
-
},
|
|
3392
|
+
}, ll = ({ pagination: e, actions: t, content: n, testId: r }) => {
|
|
3391
3393
|
let i = t && t.length, a = n != null, o = () => {
|
|
3392
3394
|
if (e) {
|
|
3393
3395
|
var t;
|
|
@@ -3404,19 +3406,19 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3404
3406
|
children: /* @__PURE__ */ C("div", { children: n })
|
|
3405
3407
|
}) : null, i || o() ? /* @__PURE__ */ w("div", {
|
|
3406
3408
|
className: nc.section,
|
|
3407
|
-
children: [e && o() ? /* @__PURE__ */ C(
|
|
3409
|
+
children: [e && o() ? /* @__PURE__ */ C(cl, { pagination: e }) : /* @__PURE__ */ C("div", {}), i && /* @__PURE__ */ C("div", { children: /* @__PURE__ */ C(yo, { actions: t }) })]
|
|
3408
3410
|
}) : null]
|
|
3409
3411
|
}) : null;
|
|
3410
|
-
},
|
|
3412
|
+
}, ul = (e) => {
|
|
3411
3413
|
let t = Math.max(...e.reduce((e, t) => {
|
|
3412
3414
|
let n = t.cells.map((e) => e.colSpan ? e.colSpan : 1).reduce((e, t) => e + t, 0);
|
|
3413
3415
|
return e.concat(n);
|
|
3414
3416
|
}, []));
|
|
3415
3417
|
return isNaN(t) ? 0 : t;
|
|
3416
|
-
},
|
|
3417
|
-
let n = [
|
|
3418
|
+
}, dl = (e, t) => {
|
|
3419
|
+
let n = [ul(t), ul(e)];
|
|
3418
3420
|
return Math.max(...n);
|
|
3419
|
-
},
|
|
3421
|
+
}, fl = (e) => e.reduce((e, t) => t.actions && t.actions.length > 0 ? 1 : e, 0), pl = (e, t) => fl(t) > 0 || fl(e) > 0, ml = {
|
|
3420
3422
|
clickableRow: "_clickableRow_g8hv8_1",
|
|
3421
3423
|
hoverableRow: "_hoverableRow_g8hv8_4",
|
|
3422
3424
|
rowActive: "_rowActive_g8hv8_4",
|
|
@@ -3425,11 +3427,11 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3425
3427
|
dragIconCell: "_dragIconCell_g8hv8_34",
|
|
3426
3428
|
dragIcon: "_dragIcon_g8hv8_34",
|
|
3427
3429
|
dragIconDisabled: "_dragIconDisabled_g8hv8_55"
|
|
3428
|
-
},
|
|
3430
|
+
}, hl = ({ colSpan: e, children: t, flush: n }) => /* @__PURE__ */ C("tr", { children: /* @__PURE__ */ C("td", {
|
|
3429
3431
|
colSpan: e,
|
|
3430
|
-
className: x(
|
|
3432
|
+
className: x(ml.expandableRow, n ? ml.flush : ""),
|
|
3431
3433
|
children: t
|
|
3432
|
-
}) }),
|
|
3434
|
+
}) }), gl = (e, t = {
|
|
3433
3435
|
leftAligned: "",
|
|
3434
3436
|
rightAligned: "",
|
|
3435
3437
|
centerAligned: ""
|
|
@@ -3442,7 +3444,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3442
3444
|
case Fi.CENTER: return n ? Fi.CENTER : t.centerAligned;
|
|
3443
3445
|
default: return n ? Fi.LEFT : t.leftAligned;
|
|
3444
3446
|
}
|
|
3445
|
-
},
|
|
3447
|
+
}, _l = (e, t = !1, n = 0) => {
|
|
3446
3448
|
if (!e || e.length === 0) return [];
|
|
3447
3449
|
let r = e.every((e) => Array.isArray(e)), i = e.every((e) => typeof e == "string");
|
|
3448
3450
|
return r && t ? e[n] || [] : i ? e : (console.warn("getHeaderAlignment: alignments array contains a mix of strings and arrays, returning an empty array."), []);
|
|
@@ -3477,7 +3479,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3477
3479
|
popover: "_popover_g4jsi_211",
|
|
3478
3480
|
disabledPointerEvents: "_disabledPointerEvents_g4jsi_214",
|
|
3479
3481
|
standaloneCheckbox: "_standaloneCheckbox_g4jsi_217"
|
|
3480
|
-
},
|
|
3482
|
+
}, vl = ({ cell: e, columnAlignment: t, testId: n, type: r }) => /* @__PURE__ */ C(Ss, {
|
|
3481
3483
|
name: e.name,
|
|
3482
3484
|
value: e.value,
|
|
3483
3485
|
onChange: (t) => {
|
|
@@ -3502,9 +3504,9 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3502
3504
|
tabIndex: e.disabled ? -1 : 0,
|
|
3503
3505
|
tooltip: e.tooltip,
|
|
3504
3506
|
type: r
|
|
3505
|
-
}),
|
|
3507
|
+
}), yl = (e) => e ? typeof e == "string" ? e : cn(e) ? e[0] : e.fieldName : "", bl = ({ name: e, placeholder: t = "", disabled: n = !1, error: r = !1, left: i = !1, small: a = !1, width: o = "100%", value: s = "", onChange: c = () => {}, onFocus: l = () => {}, onBlur: u = () => {}, selectOnFocus: d = !0, tabIndex: p = 0, testId: m, tooltip: h = null, warning: g = !1, validationCallback: _ = () => {}, allowEmpty: b = !1, isInTable: x, groupOrder: S, enableCosmeticRounding: w = !0, enableDisplayRounding: T = !1, roundDisplayValue: E, disableInternalErrorValidationMessages: D = !1, disableValidationOnFocus: O = !1 }) => {
|
|
3506
3508
|
let k = (e) => {
|
|
3507
|
-
let n = kr(e), r = t &&
|
|
3509
|
+
let n = kr(e), r = t && Kc(e);
|
|
3508
3510
|
return [Infinity, -Infinity].includes(Number(e)) || r ? {
|
|
3509
3511
|
valid: !0,
|
|
3510
3512
|
errors: []
|
|
@@ -3517,7 +3519,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3517
3519
|
var t;
|
|
3518
3520
|
let n = !!(e != null && e.endsWith("0")), r = w && e && !n && (t = k(e)) != null && t.valid ? Sr(e) : e;
|
|
3519
3521
|
return Dr(r);
|
|
3520
|
-
}, j = v(null), [M, N] = y(A(Dr(s))), [P, F] = y(!1), I =
|
|
3522
|
+
}, j = v(null), [M, N] = y(A(Dr(s))), [P, F] = y(!1), I = yl(e), { valid: L, errors: R } = k(M), z = R && R.length && !D ? R[0] : null;
|
|
3521
3523
|
f(() => {
|
|
3522
3524
|
let e = A(Dr(s));
|
|
3523
3525
|
Er(M) !== Er(e) && N(e);
|
|
@@ -3535,7 +3537,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3535
3537
|
let B = (e) => {
|
|
3536
3538
|
var n, r;
|
|
3537
3539
|
let i = "key" in e ? M : e == null || (n = e.target) == null ? void 0 : n.value, a = cr(i.replaceAll(" ", "").replaceAll("|", ""));
|
|
3538
|
-
N(a), ((r = k(a)) != null && r.valid || t &&
|
|
3540
|
+
N(a), ((r = k(a)) != null && r.valid || t && Kc(i)) && c({
|
|
3539
3541
|
...e,
|
|
3540
3542
|
target: {
|
|
3541
3543
|
...e.target,
|
|
@@ -3583,9 +3585,9 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3583
3585
|
tooltip: h,
|
|
3584
3586
|
ref: j
|
|
3585
3587
|
}, I);
|
|
3586
|
-
},
|
|
3588
|
+
}, xl = ({ cell: e, columnAlignment: t, testId: n }) => {
|
|
3587
3589
|
var r;
|
|
3588
|
-
return /* @__PURE__ */ C(
|
|
3590
|
+
return /* @__PURE__ */ C(bl, {
|
|
3589
3591
|
name: e.name,
|
|
3590
3592
|
value: e.value,
|
|
3591
3593
|
onChange: (t) => {
|
|
@@ -3611,7 +3613,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3611
3613
|
roundDisplayValue: e.roundDisplayValue,
|
|
3612
3614
|
disableValidationOnFocus: e.disableValidationOnFocus
|
|
3613
3615
|
});
|
|
3614
|
-
},
|
|
3616
|
+
}, Sl = ({ cell: e, columnAlignment: t, testId: n }) => /* @__PURE__ */ C(tl, {
|
|
3615
3617
|
name: e.name,
|
|
3616
3618
|
options: e.options,
|
|
3617
3619
|
onChange: (t) => {
|
|
@@ -3635,26 +3637,26 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3635
3637
|
right: t === Fi.RIGHT,
|
|
3636
3638
|
testId: n,
|
|
3637
3639
|
tabIndex: e.disabled ? -1 : 0
|
|
3638
|
-
}),
|
|
3640
|
+
}), Cl = ({ cell: e, columnAlignment: t, testId: n }) => /* @__PURE__ */ C("div", {
|
|
3639
3641
|
className: x(X.inputWrapper, e.type === "NumberInput" ? X.numberInputWrapper : ""),
|
|
3640
|
-
children: e.type === "Input" ? /* @__PURE__ */ C(
|
|
3642
|
+
children: e.type === "Input" ? /* @__PURE__ */ C(vl, {
|
|
3641
3643
|
cell: e,
|
|
3642
3644
|
columnAlignment: t,
|
|
3643
3645
|
testId: n
|
|
3644
|
-
}) : e.type === "NumberInput" ? /* @__PURE__ */ C(
|
|
3646
|
+
}) : e.type === "NumberInput" ? /* @__PURE__ */ C(xl, {
|
|
3645
3647
|
cell: e,
|
|
3646
3648
|
columnAlignment: t,
|
|
3647
3649
|
testId: n
|
|
3648
|
-
}) : e.type === "DateInput" ? /* @__PURE__ */ C(
|
|
3650
|
+
}) : e.type === "DateInput" ? /* @__PURE__ */ C(vl, {
|
|
3649
3651
|
cell: e,
|
|
3650
3652
|
testId: n,
|
|
3651
3653
|
type: "date"
|
|
3652
|
-
}) : e.type === "Select" ? /* @__PURE__ */ C(
|
|
3654
|
+
}) : e.type === "Select" ? /* @__PURE__ */ C(Sl, {
|
|
3653
3655
|
cell: e,
|
|
3654
3656
|
columnAlignment: t,
|
|
3655
3657
|
testId: n
|
|
3656
3658
|
}) : null
|
|
3657
|
-
}),
|
|
3659
|
+
}), wl = ({ cell: e, testId: t }) => {
|
|
3658
3660
|
let n = d(W), { error: r, warning: i, tooltip: a, maxTooltipWidth: o } = e, s = (e) => Y(e);
|
|
3659
3661
|
return /* @__PURE__ */ C("div", {
|
|
3660
3662
|
className: X.inputWrapper,
|
|
@@ -3680,7 +3682,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3680
3682
|
})
|
|
3681
3683
|
})
|
|
3682
3684
|
});
|
|
3683
|
-
},
|
|
3685
|
+
}, Tl = ({ cell: e, testId: t }) => /* @__PURE__ */ C("div", {
|
|
3684
3686
|
className: e.label ? "" : X.standaloneCheckbox,
|
|
3685
3687
|
children: /* @__PURE__ */ C(K, {
|
|
3686
3688
|
text: e.tooltip,
|
|
@@ -3696,7 +3698,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3696
3698
|
indeterminate: e.indeterminate
|
|
3697
3699
|
})
|
|
3698
3700
|
})
|
|
3699
|
-
}),
|
|
3701
|
+
}), El = {
|
|
3700
3702
|
container: "_container_3cdfx_1",
|
|
3701
3703
|
small: "_small_3cdfx_9",
|
|
3702
3704
|
vertical: "_vertical_3cdfx_12",
|
|
@@ -3712,17 +3714,17 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3712
3714
|
markActive: "_markActive_3cdfx_146",
|
|
3713
3715
|
sliderDisabled: "_sliderDisabled_3cdfx_149",
|
|
3714
3716
|
label: "_label_3cdfx_161"
|
|
3715
|
-
},
|
|
3717
|
+
}, Dl = (e, t) => xn(cn(e) ? e : [e]).slice(0, t ? 2 : 1), Ol = (e, t) => t ? e : e[0], kl = Xr((e) => e.map(({ label: e, tooltip: t, value: n }) => ({
|
|
3716
3718
|
label: e,
|
|
3717
3719
|
tooltip: t,
|
|
3718
3720
|
value: Number(n)
|
|
3719
|
-
})), Zr),
|
|
3721
|
+
})), Zr), Al = ({ name: e, label: t, width: n = "100%", labelWidth: r = "auto", testId: i, value: a, min: o, max: s, step: c = 1, marks: l = [], showArrows: u = !1, showTooltip: f = !1, tooltipFormatter: p = (e) => e, disabled: m = !1, range: h = !1, small: _ = !1, vertical: v = {
|
|
3720
3722
|
enabled: !1,
|
|
3721
3723
|
width: "100px",
|
|
3722
3724
|
height: "400px"
|
|
3723
3725
|
}, onChange: b, onChangeComplete: T }) => {
|
|
3724
|
-
let E = d(W), D = m || E, [O, k] = y(null), A =
|
|
3725
|
-
let r =
|
|
3726
|
+
let E = d(W), D = m || E, [O, k] = y(null), A = kl(l), j = g(() => Dl(a, h), [h, a]), M = (n) => {
|
|
3727
|
+
let r = Ol(n, h);
|
|
3726
3728
|
return { target: {
|
|
3727
3729
|
name: e == null ? "" : e,
|
|
3728
3730
|
value: r,
|
|
@@ -3735,7 +3737,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3735
3737
|
}, F = (e) => {
|
|
3736
3738
|
N(e), P(e);
|
|
3737
3739
|
}, I = () => /* @__PURE__ */ C("div", {
|
|
3738
|
-
className:
|
|
3740
|
+
className: El.button,
|
|
3739
3741
|
children: /* @__PURE__ */ C(q, {
|
|
3740
3742
|
basic: !0,
|
|
3741
3743
|
small: !0,
|
|
@@ -3749,7 +3751,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3749
3751
|
testId: i ? `${i}-min` : void 0
|
|
3750
3752
|
})
|
|
3751
3753
|
}), L = () => /* @__PURE__ */ C("div", {
|
|
3752
|
-
className:
|
|
3754
|
+
className: El.button,
|
|
3753
3755
|
children: /* @__PURE__ */ C(q, {
|
|
3754
3756
|
basic: !0,
|
|
3755
3757
|
small: !0,
|
|
@@ -3769,7 +3771,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3769
3771
|
if (i) return h ? `${i}-handle-${e}` : `${i}-handle`;
|
|
3770
3772
|
}, ee = (e) => h ? j[0] <= e && e <= j[1] : j[0] >= e, te = (e) => h ? Math.abs(e - j[0]) <= Math.abs(e - j[1]) ? [tn(e, o, j[1]), j[1]] : [j[0], tn(e, j[0], s)] : [tn(e, o, s)];
|
|
3771
3773
|
return /* @__PURE__ */ w("div", {
|
|
3772
|
-
className: x(
|
|
3774
|
+
className: x(El.container, _ ? El.small : "", v.enabled ? El.vertical : ""),
|
|
3773
3775
|
style: v.enabled ? {
|
|
3774
3776
|
width: v.width,
|
|
3775
3777
|
height: v.height
|
|
@@ -3777,7 +3779,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3777
3779
|
children: [
|
|
3778
3780
|
u && (v.enabled ? /* @__PURE__ */ C(L, {}) : /* @__PURE__ */ C(I, {})),
|
|
3779
3781
|
/* @__PURE__ */ w(Yr.Root, {
|
|
3780
|
-
className: x(
|
|
3782
|
+
className: x(El.slider, D && El.sliderDisabled, u && El.hasArrows),
|
|
3781
3783
|
"data-testid": i,
|
|
3782
3784
|
disabled: D,
|
|
3783
3785
|
max: s,
|
|
@@ -3792,14 +3794,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3792
3794
|
step: c,
|
|
3793
3795
|
value: j,
|
|
3794
3796
|
children: [/* @__PURE__ */ w(Yr.Track, {
|
|
3795
|
-
className:
|
|
3796
|
-
children: [/* @__PURE__ */ C(Yr.Range, { className:
|
|
3797
|
-
className:
|
|
3797
|
+
className: El.track,
|
|
3798
|
+
children: [/* @__PURE__ */ C(Yr.Range, { className: El.range }), A.length > 0 && /* @__PURE__ */ C("span", {
|
|
3799
|
+
className: El.marks,
|
|
3798
3800
|
children: A.map(({ label: e, tooltip: t, value: n }) => {
|
|
3799
3801
|
let r = Number(n), i = ee(r), a = { [v.enabled ? "bottom" : "left"]: R(r) };
|
|
3800
3802
|
return /* @__PURE__ */ C("button", {
|
|
3801
3803
|
"aria-label": String(e == null ? n : e),
|
|
3802
|
-
className: x(
|
|
3804
|
+
className: x(El.mark, i && El.markActive),
|
|
3803
3805
|
disabled: D,
|
|
3804
3806
|
onClick: (e) => {
|
|
3805
3807
|
e.stopPropagation(), F(te(r));
|
|
@@ -3813,7 +3815,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3813
3815
|
t ? ": " : "",
|
|
3814
3816
|
e == null ? n : e
|
|
3815
3817
|
] }),
|
|
3816
|
-
children: /* @__PURE__ */ C("span", { className:
|
|
3818
|
+
children: /* @__PURE__ */ C("span", { className: El.dot })
|
|
3817
3819
|
})
|
|
3818
3820
|
}, String(n));
|
|
3819
3821
|
})
|
|
@@ -3822,7 +3824,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3822
3824
|
var i;
|
|
3823
3825
|
return /* @__PURE__ */ C(Yr.Thumb, {
|
|
3824
3826
|
"aria-label": String((i = t == null ? e : t) == null ? "Slider" : i),
|
|
3825
|
-
className:
|
|
3827
|
+
className: El.thumb,
|
|
3826
3828
|
"data-testid": B(r),
|
|
3827
3829
|
onKeyDown: () => k(r),
|
|
3828
3830
|
onKeyUp: () => k(null),
|
|
@@ -3831,7 +3833,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3831
3833
|
style: z(n),
|
|
3832
3834
|
children: f && O === r && /* @__PURE__ */ C(K, {
|
|
3833
3835
|
display: "block",
|
|
3834
|
-
text: p(
|
|
3836
|
+
text: p(Ol(j, h)),
|
|
3835
3837
|
forceOpen: !0,
|
|
3836
3838
|
updateOnAnimationFrame: !0,
|
|
3837
3839
|
triggerStyle: {
|
|
@@ -3844,15 +3846,15 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3844
3846
|
}),
|
|
3845
3847
|
u && (v.enabled ? /* @__PURE__ */ C(I, {}) : /* @__PURE__ */ C(L, {})),
|
|
3846
3848
|
t && /* @__PURE__ */ C("label", {
|
|
3847
|
-
className:
|
|
3849
|
+
className: El.label,
|
|
3848
3850
|
style: { width: r },
|
|
3849
3851
|
children: t
|
|
3850
3852
|
})
|
|
3851
3853
|
]
|
|
3852
3854
|
});
|
|
3853
|
-
},
|
|
3855
|
+
}, jl = ({ cell: e }) => /* @__PURE__ */ C("div", {
|
|
3854
3856
|
className: X.inputWrapper,
|
|
3855
|
-
children: /* @__PURE__ */ C(
|
|
3857
|
+
children: /* @__PURE__ */ C(Al, {
|
|
3856
3858
|
label: e.label,
|
|
3857
3859
|
testId: e.testId,
|
|
3858
3860
|
value: e.value,
|
|
@@ -3866,7 +3868,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3866
3868
|
tooltipFormatter: e.tooltipFormatter,
|
|
3867
3869
|
disabled: e.disabled
|
|
3868
3870
|
})
|
|
3869
|
-
}),
|
|
3871
|
+
}), Ml = ({ cell: e }) => {
|
|
3870
3872
|
let { tooltip: t, icon: n } = e;
|
|
3871
3873
|
return /* @__PURE__ */ C("div", {
|
|
3872
3874
|
className: X.iconCellWrapper,
|
|
@@ -3878,7 +3880,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3878
3880
|
children: /* @__PURE__ */ C(G, { icon: n })
|
|
3879
3881
|
})
|
|
3880
3882
|
});
|
|
3881
|
-
},
|
|
3883
|
+
}, Nl = ({ cell: e }) => /* @__PURE__ */ C(yo, { actions: e.actions }), Pl = ({ cell: e }) => {
|
|
3882
3884
|
let { helpIcon: t } = e;
|
|
3883
3885
|
return t ? /* @__PURE__ */ C("div", {
|
|
3884
3886
|
className: X.icon,
|
|
@@ -3887,7 +3889,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3887
3889
|
text: t.tooltip
|
|
3888
3890
|
})
|
|
3889
3891
|
}) : null;
|
|
3890
|
-
},
|
|
3892
|
+
}, Fl = ({ cell: e }) => {
|
|
3891
3893
|
let { libraryIcon: t } = e;
|
|
3892
3894
|
return t ? /* @__PURE__ */ C("div", {
|
|
3893
3895
|
className: X.icon,
|
|
@@ -3897,7 +3899,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3897
3899
|
icon: U.LIBRARY
|
|
3898
3900
|
})
|
|
3899
3901
|
}) : null;
|
|
3900
|
-
},
|
|
3902
|
+
}, Il = ({ cell: e }) => {
|
|
3901
3903
|
let { hasSort: t, sort: n, sortPriority: r } = e;
|
|
3902
3904
|
return t ? /* @__PURE__ */ w("span", {
|
|
3903
3905
|
className: X.sortingCellIcon,
|
|
@@ -3912,7 +3914,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3912
3914
|
children: /* @__PURE__ */ C(G, { icon: U.SORT_DESCENDING })
|
|
3913
3915
|
}), r && n ? /* @__PURE__ */ C("sup", { children: r }) : null]
|
|
3914
3916
|
}) : null;
|
|
3915
|
-
},
|
|
3917
|
+
}, Ll = ({ cell: e, isHeader: t, testId: n }) => {
|
|
3916
3918
|
let { error: r, warning: i, tooltip: a, maxTooltipWidth: o, hasSort: s, onSort: c, type: l } = e, u = /* @__PURE__ */ w("div", {
|
|
3917
3919
|
className: x(X.staticCellContent, l === "Unit" ? X.unit : ""),
|
|
3918
3920
|
onClick: s ? (e) => c && c(e) : () => {},
|
|
@@ -3920,9 +3922,9 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3920
3922
|
"data-warning": i || null,
|
|
3921
3923
|
"data-testid": n,
|
|
3922
3924
|
children: [e.value, t ? /* @__PURE__ */ w(S, { children: [
|
|
3923
|
-
/* @__PURE__ */ C(Nl, { cell: e }),
|
|
3924
3925
|
/* @__PURE__ */ C(Pl, { cell: e }),
|
|
3925
|
-
/* @__PURE__ */ C(Fl, { cell: e })
|
|
3926
|
+
/* @__PURE__ */ C(Fl, { cell: e }),
|
|
3927
|
+
/* @__PURE__ */ C(Il, { cell: e })
|
|
3926
3928
|
] }) : null]
|
|
3927
3929
|
});
|
|
3928
3930
|
return /* @__PURE__ */ C("div", {
|
|
@@ -3937,7 +3939,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3937
3939
|
children: u
|
|
3938
3940
|
})
|
|
3939
3941
|
});
|
|
3940
|
-
},
|
|
3942
|
+
}, Rl = ({ cell: e, testId: t }) => {
|
|
3941
3943
|
let { content: n, fullWidth: r, closeOnOutsideClick: i, disabled: a } = e;
|
|
3942
3944
|
return /* @__PURE__ */ C(ko, {
|
|
3943
3945
|
content: n,
|
|
@@ -3946,13 +3948,13 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3946
3948
|
disabled: a,
|
|
3947
3949
|
children: /* @__PURE__ */ C("div", {
|
|
3948
3950
|
className: X.popover,
|
|
3949
|
-
children: /* @__PURE__ */ C(
|
|
3951
|
+
children: /* @__PURE__ */ C(Ll, {
|
|
3950
3952
|
cell: e,
|
|
3951
3953
|
testId: t
|
|
3952
3954
|
})
|
|
3953
3955
|
})
|
|
3954
3956
|
});
|
|
3955
|
-
},
|
|
3957
|
+
}, zl = {
|
|
3956
3958
|
inputInTable: "_inputInTable_abetp_1",
|
|
3957
3959
|
inputHover: "_inputHover_abetp_13",
|
|
3958
3960
|
inputFocus: "_inputFocus_abetp_18",
|
|
@@ -3972,18 +3974,18 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
3972
3974
|
control: "_control_abetp_25",
|
|
3973
3975
|
labelText: "_labelText_abetp_151",
|
|
3974
3976
|
isInTable: "_isInTable_abetp_214"
|
|
3975
|
-
},
|
|
3977
|
+
}, Bl = ({ name: e, label: t, value: n = "", selected: r = !1, disabled: i = !1, small: a = !1, onChange: o, noMargin: s = !1, testId: c, helpText: l, onClickHelp: u, textTransform: f = Li.CAPITALIZE }) => {
|
|
3976
3978
|
var p, m;
|
|
3977
3979
|
let h = d(ni) != null, g = l || u, _ = (p = n == null ? void 0 : n.toString()) == null ? "" : p, v = /* @__PURE__ */ w(ei, {
|
|
3978
3980
|
value: _,
|
|
3979
3981
|
isDisabled: i,
|
|
3980
|
-
className:
|
|
3982
|
+
className: zl.radioContainer,
|
|
3981
3983
|
"data-testid": c ? `${c}-field` : void 0,
|
|
3982
3984
|
children: [/* @__PURE__ */ w($r, {
|
|
3983
|
-
className: x(
|
|
3985
|
+
className: x(zl.radio, a && zl.small, s && zl.noMargin, !t && zl.noLabel),
|
|
3984
3986
|
"data-testid": c,
|
|
3985
|
-
children: [/* @__PURE__ */ C("span", { className:
|
|
3986
|
-
className:
|
|
3987
|
+
children: [/* @__PURE__ */ C("span", { className: zl.control }), t && /* @__PURE__ */ C("span", {
|
|
3988
|
+
className: zl.labelText,
|
|
3987
3989
|
style: { textTransform: f },
|
|
3988
3990
|
children: t
|
|
3989
3991
|
})]
|
|
@@ -4005,12 +4007,12 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4005
4007
|
} });
|
|
4006
4008
|
},
|
|
4007
4009
|
isDisabled: i,
|
|
4008
|
-
className:
|
|
4010
|
+
className: zl.radioGroupStandalone,
|
|
4009
4011
|
children: v
|
|
4010
4012
|
});
|
|
4011
|
-
},
|
|
4013
|
+
}, Vl = ({ cell: e, testId: t }) => {
|
|
4012
4014
|
var n;
|
|
4013
|
-
return /* @__PURE__ */ C(
|
|
4015
|
+
return /* @__PURE__ */ C(Bl, {
|
|
4014
4016
|
selected: e.selected,
|
|
4015
4017
|
name: e.name,
|
|
4016
4018
|
value: (n = e.value) == null ? "" : n,
|
|
@@ -4019,42 +4021,42 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4019
4021
|
onChange: (t) => e.onChange(t),
|
|
4020
4022
|
testId: t
|
|
4021
4023
|
});
|
|
4022
|
-
},
|
|
4024
|
+
}, Hl = ({ cell: e, isHeader: t, columnAlignment: n, testId: r }) => {
|
|
4023
4025
|
if (!e) return null;
|
|
4024
4026
|
switch (e.type) {
|
|
4025
4027
|
case "Input":
|
|
4026
4028
|
case "NumberInput":
|
|
4027
4029
|
case "DateInput":
|
|
4028
|
-
case "Select": return /* @__PURE__ */ C(
|
|
4030
|
+
case "Select": return /* @__PURE__ */ C(Cl, {
|
|
4029
4031
|
cell: e,
|
|
4030
4032
|
columnAlignment: n,
|
|
4031
4033
|
testId: r
|
|
4032
4034
|
});
|
|
4033
|
-
case "Link": return /* @__PURE__ */ C(
|
|
4035
|
+
case "Link": return /* @__PURE__ */ C(wl, {
|
|
4034
4036
|
cell: e,
|
|
4035
4037
|
testId: r
|
|
4036
4038
|
});
|
|
4037
|
-
case "CheckBox": return /* @__PURE__ */ C(
|
|
4039
|
+
case "CheckBox": return /* @__PURE__ */ C(Tl, {
|
|
4038
4040
|
cell: e,
|
|
4039
4041
|
testId: r
|
|
4040
4042
|
});
|
|
4041
|
-
case "Radio": return /* @__PURE__ */ C(
|
|
4043
|
+
case "Radio": return /* @__PURE__ */ C(Vl, {
|
|
4042
4044
|
cell: e,
|
|
4043
4045
|
testId: r
|
|
4044
4046
|
});
|
|
4045
|
-
case "Slider": return /* @__PURE__ */ C(
|
|
4046
|
-
case "Icon": return /* @__PURE__ */ C(
|
|
4047
|
-
case "Actions": return /* @__PURE__ */ C(
|
|
4048
|
-
case "Popover": return /* @__PURE__ */ C(
|
|
4049
|
-
default: return /* @__PURE__ */ C(
|
|
4047
|
+
case "Slider": return /* @__PURE__ */ C(jl, { cell: e });
|
|
4048
|
+
case "Icon": return /* @__PURE__ */ C(Ml, { cell: e });
|
|
4049
|
+
case "Actions": return /* @__PURE__ */ C(Nl, { cell: e });
|
|
4050
|
+
case "Popover": return /* @__PURE__ */ C(Rl, { cell: e });
|
|
4051
|
+
default: return /* @__PURE__ */ C(Ll, {
|
|
4050
4052
|
cell: e,
|
|
4051
4053
|
isHeader: t,
|
|
4052
4054
|
testId: r
|
|
4053
4055
|
});
|
|
4054
4056
|
}
|
|
4055
|
-
},
|
|
4057
|
+
}, Ul = /* @__PURE__ */ function(e) {
|
|
4056
4058
|
return e.INPUT = "Input", e.NUMBER_INPUT = "NumberInput", e.SELECT = "Select", e.POPOVER = "Popover", e.SLIDER = "Slider", e.CHECKBOX = "CheckBox", e.RADIO = "Radio", e.ACTIONS = "Actions", e.AUTO_UNIT = "AutoUnit", e.UNIT = "Unit", e.STATIC = "Static", e;
|
|
4057
|
-
}({}),
|
|
4059
|
+
}({}), Wl = ({ cell: e, isHeader: t, columnHeaderAlignment: n, columnAlignment: r = Fi.LEFT, width: i, testId: a }) => {
|
|
4058
4060
|
var o;
|
|
4059
4061
|
if (!e) return null;
|
|
4060
4062
|
let { style: s, colSpan: c, rowSpan: l, width: u, textAlign: d } = e, f = v(null), p = {
|
|
@@ -4062,7 +4064,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4062
4064
|
headerAlignment: n,
|
|
4063
4065
|
textAlign: d,
|
|
4064
4066
|
isHeader: t
|
|
4065
|
-
}, m =
|
|
4067
|
+
}, m = gl(p, X), h = gl(p, X, !0), g = e.type === Ul.INPUT || e.type === Ul.NUMBER_INPUT || e.type === Ul.SELECT || e.type === Ul.POPOVER ? X.inputCell : e.type === Ul.SLIDER ? X.sliderCell : e.type === Ul.CHECKBOX || e.type === Ul.RADIO ? X.checkBoxCell : e.type === Ul.ACTIONS ? X.actionsCell : X.staticCell, _ = x(X.cell, g, e.hasSort ? X.sortingCell : null, m, e.breakWord ? X.breakWord : ""), y = (o = u == null ? i : u) == null ? void 0 : o, b = e.type === Ul.STATIC || !e.type, S = {
|
|
4066
4068
|
width: y,
|
|
4067
4069
|
minWidth: y,
|
|
4068
4070
|
textTransform: t && b ? Li.CAPITALIZE : void 0,
|
|
@@ -4074,40 +4076,40 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4074
4076
|
style: S,
|
|
4075
4077
|
colSpan: c,
|
|
4076
4078
|
rowSpan: l,
|
|
4077
|
-
children: /* @__PURE__ */ C(
|
|
4079
|
+
children: /* @__PURE__ */ C(Hl, {
|
|
4078
4080
|
cell: e,
|
|
4079
4081
|
columnAlignment: h == null ? Fi.RIGHT : h,
|
|
4080
4082
|
isHeader: t,
|
|
4081
4083
|
testId: a
|
|
4082
4084
|
})
|
|
4083
4085
|
});
|
|
4084
|
-
},
|
|
4086
|
+
}, Gl = (e) => e.type === Ul.INPUT || e.type === Ul.NUMBER_INPUT, Kl = ({ event: e, rowIndex: t, cellIndex: n }) => ({
|
|
4085
4087
|
...e,
|
|
4086
4088
|
target: Object.assign(e.target, {
|
|
4087
4089
|
rowIndex: t,
|
|
4088
4090
|
cellIndex: n
|
|
4089
4091
|
})
|
|
4090
|
-
}),
|
|
4091
|
-
if (!
|
|
4092
|
+
}), ql = ({ cell: e, rowIndex: t, cellIndex: n }) => {
|
|
4093
|
+
if (!Gl(e) || typeof e.onChange != "function") return e;
|
|
4092
4094
|
let r = e.onChange;
|
|
4093
4095
|
return {
|
|
4094
4096
|
...e,
|
|
4095
4097
|
onChange: (e) => {
|
|
4096
|
-
r(
|
|
4098
|
+
r(Kl({
|
|
4097
4099
|
event: e,
|
|
4098
4100
|
rowIndex: t,
|
|
4099
4101
|
cellIndex: n
|
|
4100
4102
|
}));
|
|
4101
4103
|
}
|
|
4102
4104
|
};
|
|
4103
|
-
},
|
|
4104
|
-
let h =
|
|
4105
|
-
let i = `${+!n}_${t}_${r}`, a = n ? e :
|
|
4105
|
+
}, Jl = ({ row: e, rowIndex: t, isHeader: n = !1, columnCount: r, colSpan: i, columnHeaderAlignments: a = [], columnAlignment: o = [], hasRowActions: s, draggableTable: c = !1, columnWidths: l, dropDisabled: d = !1, height: f, testId: p, measureRef: m }) => {
|
|
4106
|
+
let h = _l(a, n, t), { onRowClick: g, onRowFocus: _, onRowMouseEnter: v, onRowMouseLeave: y, expandedContent: b, error: T, warning: E, active: D } = e, O = e.cells.map((e, r) => {
|
|
4107
|
+
let i = `${+!n}_${t}_${r}`, a = n ? e : ql({
|
|
4106
4108
|
cell: e,
|
|
4107
4109
|
rowIndex: t,
|
|
4108
4110
|
cellIndex: r
|
|
4109
4111
|
});
|
|
4110
|
-
return /* @__PURE__ */ C(
|
|
4112
|
+
return /* @__PURE__ */ C(Wl, {
|
|
4111
4113
|
cell: a,
|
|
4112
4114
|
isHeader: n,
|
|
4113
4115
|
columnAlignment: o[r],
|
|
@@ -4115,9 +4117,9 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4115
4117
|
width: l ? l[r] : void 0,
|
|
4116
4118
|
testId: e.testId
|
|
4117
4119
|
}, i);
|
|
4118
|
-
}), k = s && /* @__PURE__ */ C(
|
|
4120
|
+
}), k = s && /* @__PURE__ */ C(Wl, {
|
|
4119
4121
|
cell: {
|
|
4120
|
-
type:
|
|
4122
|
+
type: Ul.ACTIONS,
|
|
4121
4123
|
actions: e.actions
|
|
4122
4124
|
},
|
|
4123
4125
|
isHeader: n
|
|
@@ -4142,13 +4144,13 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4142
4144
|
onMouseLeave: y,
|
|
4143
4145
|
onFocus: _,
|
|
4144
4146
|
"data-testid": p,
|
|
4145
|
-
className: x(g ?
|
|
4147
|
+
className: x(g ? ml.clickableRow : null, v ? ml.hoverableRow : null),
|
|
4146
4148
|
children: [
|
|
4147
4149
|
c ? /* @__PURE__ */ C("th", {}) : null,
|
|
4148
4150
|
O,
|
|
4149
4151
|
k
|
|
4150
4152
|
]
|
|
4151
|
-
}, t), b && b.content ? /* @__PURE__ */ C(
|
|
4153
|
+
}, t), b && b.content ? /* @__PURE__ */ C(hl, {
|
|
4152
4154
|
colSpan: i,
|
|
4153
4155
|
flush: b.flush === !0,
|
|
4154
4156
|
children: b.content
|
|
@@ -4158,7 +4160,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4158
4160
|
onMouseEnter: v,
|
|
4159
4161
|
onMouseLeave: y,
|
|
4160
4162
|
onFocus: _,
|
|
4161
|
-
className: x(g && !g.noStyle ?
|
|
4163
|
+
className: x(g && !g.noStyle ? ml.clickableRow : null, v && !v.noStyle ? ml.hoverableRow : null, D ? ml.rowActive : null),
|
|
4162
4164
|
"data-active": D || null,
|
|
4163
4165
|
"data-error": T || null,
|
|
4164
4166
|
"data-warning": E || null,
|
|
@@ -4168,9 +4170,9 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4168
4170
|
style: R,
|
|
4169
4171
|
children: [
|
|
4170
4172
|
c ? e.noDrag ? /* @__PURE__ */ C("td", { "aria-labelledby": "unique-label-id" }) : /* @__PURE__ */ C("td", {
|
|
4171
|
-
className:
|
|
4173
|
+
className: ml.dragIconCell,
|
|
4172
4174
|
children: /* @__PURE__ */ C("div", {
|
|
4173
|
-
className: x(
|
|
4175
|
+
className: x(ml.dragIcon, d ? ml.dragIconDisabled : ""),
|
|
4174
4176
|
...A,
|
|
4175
4177
|
...j,
|
|
4176
4178
|
children: /* @__PURE__ */ C(G, { icon: U.DRAG })
|
|
@@ -4179,12 +4181,12 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4179
4181
|
O,
|
|
4180
4182
|
k
|
|
4181
4183
|
]
|
|
4182
|
-
}, t), b && b.content ? /* @__PURE__ */ C(
|
|
4184
|
+
}, t), b && b.content ? /* @__PURE__ */ C(hl, {
|
|
4183
4185
|
colSpan: i,
|
|
4184
4186
|
flush: b.flush === !0,
|
|
4185
4187
|
children: b.content
|
|
4186
4188
|
}, `${t}_expanded_content`) : null] });
|
|
4187
|
-
},
|
|
4189
|
+
}, Yl = (e) => {
|
|
4188
4190
|
let { children: t, colSpan: n, columnAlignment: r, columnCount: i, draggable: a, onListReorder: o = () => {}, canListReorder: s = () => !0, rowActions: c, rows: l = [], tbodyRef: u } = e, [d, f] = y(null), [p, m] = y(!1), h = g(() => l.map((e, t) => t.toString()), [l]);
|
|
4189
4191
|
return a ? /* @__PURE__ */ w(ii, {
|
|
4190
4192
|
collisionDetection: oi,
|
|
@@ -4219,7 +4221,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4219
4221
|
dropAnimation: null,
|
|
4220
4222
|
children: /* @__PURE__ */ C("table", {
|
|
4221
4223
|
className: x($s.table, $s.dragOverlay),
|
|
4222
|
-
children: /* @__PURE__ */ C("tbody", { children: /* @__PURE__ */ C(
|
|
4224
|
+
children: /* @__PURE__ */ C("tbody", { children: /* @__PURE__ */ C(Jl, {
|
|
4223
4225
|
rowIndex: Number(d),
|
|
4224
4226
|
row: l[Number(d)],
|
|
4225
4227
|
columnCount: i,
|
|
@@ -4239,17 +4241,17 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4239
4241
|
})
|
|
4240
4242
|
}), document.body)]
|
|
4241
4243
|
}) : t({});
|
|
4242
|
-
},
|
|
4244
|
+
}, Xl = 31, Zl = 2, Ql = ({ table: e, children: t }) => {
|
|
4243
4245
|
var n;
|
|
4244
4246
|
let r = v(null), i = v(/* @__PURE__ */ new Map()), { estimateRowHeight: a, rowCount: o, rows: s } = e, c = (n = o == null ? s == null ? void 0 : s.length : o) == null ? 0 : n, l = !!a, u = (e) => {
|
|
4245
4247
|
var t, n;
|
|
4246
|
-
return (t = (n = i.current.get(e)) == null ? a == null ? void 0 : a(e) : n) == null ?
|
|
4248
|
+
return (t = (n = i.current.get(e)) == null ? a == null ? void 0 : a(e) : n) == null ? Xl : t;
|
|
4247
4249
|
}, d = si({
|
|
4248
4250
|
count: c,
|
|
4249
4251
|
getScrollElement: () => r.current,
|
|
4250
|
-
estimateSize: l ? u : () =>
|
|
4252
|
+
estimateSize: l ? u : () => Xl,
|
|
4251
4253
|
...l ? { measureElement: (e) => {
|
|
4252
|
-
let t = e.getAttribute("data-index"), n = t == null ? -1 : Number(t), r = Math.ceil(e.getBoundingClientRect().height), a = n >= 0 ? u(n) :
|
|
4254
|
+
let t = e.getAttribute("data-index"), n = t == null ? -1 : Number(t), r = Math.ceil(e.getBoundingClientRect().height), a = n >= 0 ? u(n) : Xl, o = Math.abs(r - a) <= Zl ? a : r;
|
|
4253
4255
|
return n >= 0 && i.current.set(n, o), o;
|
|
4254
4256
|
} } : {},
|
|
4255
4257
|
overscan: 10
|
|
@@ -4269,7 +4271,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4269
4271
|
})()
|
|
4270
4272
|
})
|
|
4271
4273
|
});
|
|
4272
|
-
},
|
|
4274
|
+
}, $l = ({ activeIndex: e, triggerScrollToActiveRow: t, isVirtualized: n, virtualizer: r }) => (f(() => {
|
|
4273
4275
|
if (t && !(e == null || e < 0)) {
|
|
4274
4276
|
if (n && r) r.scrollToIndex(e, {
|
|
4275
4277
|
behavior: "auto",
|
|
@@ -4288,11 +4290,11 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4288
4290
|
t,
|
|
4289
4291
|
n,
|
|
4290
4292
|
r
|
|
4291
|
-
]), null),
|
|
4293
|
+
]), null), eu = ({ table: e, children: t }) => {
|
|
4292
4294
|
let { infiniteScroll: n = !1, triggerScrollToActiveRow: r = !1, rows: i } = e, a = g(() => typeof e.activeRowIndex == "number" ? e.activeRowIndex : Array.isArray(i) && i.length ? i.findIndex((e) => e && e.active) : -1, [i, e.activeRowIndex]);
|
|
4293
|
-
return n ? /* @__PURE__ */ C(
|
|
4295
|
+
return n ? /* @__PURE__ */ C(Ql, {
|
|
4294
4296
|
table: e,
|
|
4295
|
-
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(
|
|
4297
|
+
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C($l, {
|
|
4296
4298
|
isVirtualized: !0,
|
|
4297
4299
|
virtualizer: e,
|
|
4298
4300
|
activeIndex: a,
|
|
@@ -4304,15 +4306,15 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4304
4306
|
}) : /* @__PURE__ */ w("div", {
|
|
4305
4307
|
id: "scrollWrapper",
|
|
4306
4308
|
className: $s.scroll,
|
|
4307
|
-
children: [/* @__PURE__ */ C(
|
|
4309
|
+
children: [/* @__PURE__ */ C($l, {
|
|
4308
4310
|
isVirtualized: !1,
|
|
4309
4311
|
activeIndex: a,
|
|
4310
4312
|
triggerScrollToActiveRow: r
|
|
4311
4313
|
}), t({})]
|
|
4312
4314
|
});
|
|
4313
|
-
},
|
|
4315
|
+
}, tu = (e) => {
|
|
4314
4316
|
var t, n, r, i, a;
|
|
4315
|
-
let { onListReorder: o = () => {}, canListReorder: s = () => !0, beforeRenderRow: c, table: l } = e, { columnWidths: u, footer: d, name: f, rows: p = [], actions: m, actionsRight: h, columnHeaderAlignments: g, columnAlignment: _, striped: y = !0, testId: b, draggable: S, defaultEmptyRow: T = null, onAddRow: E = null, bordered: D = !0, maxHeight: O, fixedWidth: k } = l, A = v(null), j = sn(e, "table.headers", []), M =
|
|
4317
|
+
let { onListReorder: o = () => {}, canListReorder: s = () => !0, beforeRenderRow: c, table: l } = e, { columnWidths: u, footer: d, name: f, rows: p = [], actions: m, actionsRight: h, columnHeaderAlignments: g, columnAlignment: _, striped: y = !0, testId: b, draggable: S, defaultEmptyRow: T = null, onAddRow: E = null, bordered: D = !0, maxHeight: O, fixedWidth: k } = l, A = v(null), j = sn(e, "table.headers", []), M = dl(p, j), N = pl(p, j), P = M + +!!N, F = !d || (d == null || (t = d.pagination) == null || (t = t.rowsPerPage) == null ? void 0 : t.value) === 0 || Number(d == null || (n = d.pagination) == null ? void 0 : n.selectedPage) >= Number(d == null || (r = d.pagination) == null ? void 0 : r.rowCount) / Number(d == null || (i = d.pagination) == null || (i = i.rowsPerPage) == null ? void 0 : i.value), I = (T == null || (a = T.cells) == null ? void 0 : a.length) && E && F, L = {
|
|
4316
4318
|
cells: I ? T.cells.map((e, t) => (e == null ? void 0 : e.type) === "Input" ? {
|
|
4317
4319
|
...e,
|
|
4318
4320
|
onChange: (e) => {
|
|
@@ -4349,7 +4351,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4349
4351
|
name: f,
|
|
4350
4352
|
testId: b && `${b}-title`
|
|
4351
4353
|
}),
|
|
4352
|
-
/* @__PURE__ */ C(
|
|
4354
|
+
/* @__PURE__ */ C(Yl, {
|
|
4353
4355
|
colSpan: P,
|
|
4354
4356
|
columnAlignment: _,
|
|
4355
4357
|
columnCount: M,
|
|
@@ -4359,13 +4361,13 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4359
4361
|
rows: R,
|
|
4360
4362
|
tbodyRef: A,
|
|
4361
4363
|
canListReorder: s,
|
|
4362
|
-
children: ({ dropDisabled: e }) => /* @__PURE__ */ C(
|
|
4364
|
+
children: ({ dropDisabled: e }) => /* @__PURE__ */ C(eu, {
|
|
4363
4365
|
table: z,
|
|
4364
4366
|
children: ({ virtualizer: t, tableStyle: n }) => /* @__PURE__ */ w("table", {
|
|
4365
4367
|
className: x($s.table, y ? $s.striped : ""),
|
|
4366
4368
|
"data-testid": b,
|
|
4367
4369
|
style: n,
|
|
4368
|
-
children: [/* @__PURE__ */ C("thead", { children: j.map((e, t) => /* @__PURE__ */ C(
|
|
4370
|
+
children: [/* @__PURE__ */ C("thead", { children: j.map((e, t) => /* @__PURE__ */ C(Jl, {
|
|
4369
4371
|
rowIndex: t,
|
|
4370
4372
|
isHeader: !0,
|
|
4371
4373
|
row: e,
|
|
@@ -4383,7 +4385,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4383
4385
|
row: i,
|
|
4384
4386
|
rowIndex: r
|
|
4385
4387
|
}) : i;
|
|
4386
|
-
return /* @__PURE__ */ C(
|
|
4388
|
+
return /* @__PURE__ */ C(Jl, {
|
|
4387
4389
|
rowIndex: r,
|
|
4388
4390
|
row: a,
|
|
4389
4391
|
columnCount: M,
|
|
@@ -4401,7 +4403,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4401
4403
|
row: t,
|
|
4402
4404
|
rowIndex: n
|
|
4403
4405
|
}) : t;
|
|
4404
|
-
return /* @__PURE__ */ C(
|
|
4406
|
+
return /* @__PURE__ */ C(Jl, {
|
|
4405
4407
|
rowIndex: n,
|
|
4406
4408
|
row: r,
|
|
4407
4409
|
columnCount: M,
|
|
@@ -4417,24 +4419,24 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4417
4419
|
})
|
|
4418
4420
|
})
|
|
4419
4421
|
}),
|
|
4420
|
-
d && /* @__PURE__ */ C(
|
|
4422
|
+
d && /* @__PURE__ */ C(ll, {
|
|
4421
4423
|
pagination: d.pagination,
|
|
4422
4424
|
actions: d.actions,
|
|
4423
4425
|
content: d.content
|
|
4424
4426
|
})
|
|
4425
4427
|
]
|
|
4426
4428
|
});
|
|
4427
|
-
},
|
|
4429
|
+
}, nu = "blank", ru = 1e4, iu = (e, t, n, r) => {
|
|
4428
4430
|
let i = `${t} → ${n}:`, a = e.filter((e) => !e.startsWith(i)), o = r ? [...a, `${i} ${r}`] : a;
|
|
4429
4431
|
return {
|
|
4430
4432
|
updatedErrors: o,
|
|
4431
4433
|
isValid: o.length === 0
|
|
4432
4434
|
};
|
|
4433
|
-
},
|
|
4434
|
-
let i = g(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, o] = y(
|
|
4435
|
+
}, au = 20, ou = 1, su = ({ validationRules: e, parsedResult: t, updateState: n, testId: r }) => {
|
|
4436
|
+
let i = g(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, o] = y(au), [s, c] = y(ou), l = v([]), d = (s - 1) * a, p = a === 0 ? t.rows.length : d + a, [m, h] = y([]), _ = g(() => {
|
|
4435
4437
|
let n = e.filter((e) => !e.optionalColumn);
|
|
4436
4438
|
return t.fields.length === n.length ? n : e;
|
|
4437
|
-
}, [e, t.fields.length]), b = u((e, r) => (!l.current.length && t.rows.length && (l.current = t.rows[0].map((e) =>
|
|
4439
|
+
}, [e, t.fields.length]), b = u((e, r) => (!l.current.length && t.rows.length && (l.current = t.rows[0].map((e) => qc(e) ? "NumberInput" : "Input")), {
|
|
4438
4440
|
cells: e.map((e, a) => {
|
|
4439
4441
|
var o, s, c, u, d;
|
|
4440
4442
|
let { columnMessage: f = {}, validator: p = () => null } = (o = _ == null ? void 0 : _[a]) == null ? {} : o, m = i == null || (s = i[a]) == null ? void 0 : s.value, g = `${`Row ${r + 1}`} → ${m}:`, v = p(e), y = (c = t == null || (u = t.errors) == null ? void 0 : u.find((e) => e.startsWith(g))) == null ? null : c, x = v || y || null;
|
|
@@ -4445,7 +4447,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4445
4447
|
disableValidationOnFocus: !0,
|
|
4446
4448
|
error: x,
|
|
4447
4449
|
validationCallback: (e, i) => {
|
|
4448
|
-
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } =
|
|
4450
|
+
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } = iu(t.errors, a, e, i);
|
|
4449
4451
|
n({ parsedResult: {
|
|
4450
4452
|
...t,
|
|
4451
4453
|
errors: o,
|
|
@@ -4454,7 +4456,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4454
4456
|
},
|
|
4455
4457
|
onChange: (e) => {
|
|
4456
4458
|
var i;
|
|
4457
|
-
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } =
|
|
4459
|
+
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } = iu(t.errors, s, m, c), d = t.rows.map((e, t) => t === r ? e.map((e, t) => t === a ? o : e) : e);
|
|
4458
4460
|
n({ parsedResult: {
|
|
4459
4461
|
...t,
|
|
4460
4462
|
rows: d,
|
|
@@ -4496,7 +4498,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4496
4498
|
]);
|
|
4497
4499
|
let x = g(() => t.fields.map((e, r) => {
|
|
4498
4500
|
var a, o, s;
|
|
4499
|
-
let c = _ == null ? void 0 : _[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => Sn(e) ===
|
|
4501
|
+
let c = _ == null ? void 0 : _[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => Sn(e) === nu);
|
|
4500
4502
|
if (!l.length || u) return {};
|
|
4501
4503
|
let d = t == null || (a = t.units) == null ? void 0 : a[r], f = Sn(d), p = l != null && l.some((e) => Sn(e) === f) ? d : (o = c == null ? void 0 : c.defaultUnit) == null ? "" : o;
|
|
4502
4504
|
return {
|
|
@@ -4544,7 +4546,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4544
4546
|
b,
|
|
4545
4547
|
d
|
|
4546
4548
|
]);
|
|
4547
|
-
return /* @__PURE__ */ C(
|
|
4549
|
+
return /* @__PURE__ */ C(tu, {
|
|
4548
4550
|
beforeRenderRow: E,
|
|
4549
4551
|
onListReorder: ({ from: e, to: r }) => {
|
|
4550
4552
|
let i = [...t.rows], [a] = i.splice(e, 1);
|
|
@@ -4607,7 +4609,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4607
4609
|
} }
|
|
4608
4610
|
}
|
|
4609
4611
|
});
|
|
4610
|
-
},
|
|
4612
|
+
}, cu = { listStyle: "_listStyle_yjfjw_1" }, lu = ({ errors: e, t }) => {
|
|
4611
4613
|
var n;
|
|
4612
4614
|
let r = (n = [...e]) == null ? void 0 : n.sort((e, t) => {
|
|
4613
4615
|
let n = (e) => {
|
|
@@ -4623,18 +4625,18 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4623
4625
|
content: t("unableToImportPleaseCorrectError", { rows: e == null ? void 0 : e.length }),
|
|
4624
4626
|
type: "Error",
|
|
4625
4627
|
details: /* @__PURE__ */ C("ul", {
|
|
4626
|
-
className:
|
|
4628
|
+
className: cu.listStyle,
|
|
4627
4629
|
children: r.map((e, t) => /* @__PURE__ */ C("li", { children: e }, t))
|
|
4628
4630
|
})
|
|
4629
4631
|
};
|
|
4630
|
-
},
|
|
4632
|
+
}, uu = ({ errors: e, t }) => e.length ? /* @__PURE__ */ C(Qs, { message: lu({
|
|
4631
4633
|
errors: e,
|
|
4632
4634
|
t
|
|
4633
|
-
}) }) : null,
|
|
4635
|
+
}) }) : null, du = {
|
|
4634
4636
|
empty: "_empty_fe425_1",
|
|
4635
4637
|
text: "_text_fe425_11"
|
|
4636
|
-
},
|
|
4637
|
-
className:
|
|
4638
|
+
}, fu = ({ width: e = "auto", height: t = "auto", text: n = "No data", children: r, testId: i }) => /* @__PURE__ */ w("div", {
|
|
4639
|
+
className: du.empty,
|
|
4638
4640
|
style: {
|
|
4639
4641
|
width: e,
|
|
4640
4642
|
height: t
|
|
@@ -4670,7 +4672,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4670
4672
|
})
|
|
4671
4673
|
}),
|
|
4672
4674
|
n !== "" && /* @__PURE__ */ C("div", {
|
|
4673
|
-
className:
|
|
4675
|
+
className: du.text,
|
|
4674
4676
|
children: /* @__PURE__ */ C(ns, {
|
|
4675
4677
|
faint: !0,
|
|
4676
4678
|
children: n
|
|
@@ -4678,52 +4680,52 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4678
4680
|
}),
|
|
4679
4681
|
r
|
|
4680
4682
|
]
|
|
4681
|
-
}),
|
|
4683
|
+
}), pu = (e) => {
|
|
4682
4684
|
var t;
|
|
4683
4685
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4684
4686
|
let t = e == null ? void 0 : e.match(/[.,]/g);
|
|
4685
4687
|
return t && t.length > 1;
|
|
4686
4688
|
});
|
|
4687
|
-
},
|
|
4689
|
+
}, mu = (e) => {
|
|
4688
4690
|
var t;
|
|
4689
4691
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4690
4692
|
var t;
|
|
4691
4693
|
return !(e != null && e.includes(".")) && (e == null || (t = e.match(/,/g)) == null ? void 0 : t.length) === 1;
|
|
4692
4694
|
});
|
|
4693
|
-
},
|
|
4695
|
+
}, hu = (e, t, n) => e >= t - n, gu = (e) => !!e && e !== "blank" && e.trim() !== "", _u = (e, t, n, r, i, a, o) => {
|
|
4694
4696
|
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;
|
|
4695
|
-
if (i && !
|
|
4697
|
+
if (i && !hu(e.length, l, c) && s.push(o("incorrectNumberOfFieldNameHeaderColumns", { expectedLengthMessage: u })), a) {
|
|
4696
4698
|
var f, p;
|
|
4697
4699
|
let e = r.filter((e) => {
|
|
4698
4700
|
var t;
|
|
4699
|
-
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(
|
|
4701
|
+
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(gu));
|
|
4700
4702
|
}).length;
|
|
4701
|
-
|
|
4703
|
+
hu(t == null || (f = t.filter(gu)) == 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 }));
|
|
4702
4704
|
}
|
|
4703
4705
|
return n.length === 0 ? s.push(o("incorrectNumberOfDataColumns", {
|
|
4704
4706
|
expectedLengthMessage: u,
|
|
4705
4707
|
dataRowStartIndex: d
|
|
4706
4708
|
})) : n.forEach((e, t) => {
|
|
4707
|
-
|
|
4709
|
+
hu(e.length, l, c) || s.push(o("incorrectNumberOfDataColumns", {
|
|
4708
4710
|
expectedLengthMessage: u,
|
|
4709
4711
|
dataRowStartIndex: d + t
|
|
4710
4712
|
}));
|
|
4711
4713
|
}), s;
|
|
4712
|
-
},
|
|
4714
|
+
}, vu = (e) => e.toUpperCase().replace(/\(.*?\)/g, "").replace(/[^A-Z0-9]/g, "").trim(), yu = ({ value: e, defaultAllowedValues: t }) => {
|
|
4713
4715
|
var n;
|
|
4714
|
-
let r =
|
|
4715
|
-
return (n = t == null ? void 0 : t.some((e) =>
|
|
4716
|
-
},
|
|
4716
|
+
let r = vu(e);
|
|
4717
|
+
return (n = t == null ? void 0 : t.some((e) => vu(e).includes(r) || r.includes(vu(e)))) != null && n;
|
|
4718
|
+
}, bu = ({ value: e, defaultAllowedValues: t }) => {
|
|
4717
4719
|
var n;
|
|
4718
4720
|
return (n = t == null ? void 0 : t.includes(e)) != null && n;
|
|
4719
|
-
},
|
|
4721
|
+
}, xu = (e, t, n, r, i, a) => {
|
|
4720
4722
|
let o = [];
|
|
4721
4723
|
if (r) {
|
|
4722
4724
|
let r = n.map((e) => e.fieldName).filter(Boolean);
|
|
4723
4725
|
e.forEach((i, s) => {
|
|
4724
4726
|
var c, l;
|
|
4725
4727
|
let u = n[s];
|
|
4726
|
-
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ?
|
|
4728
|
+
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ? yu : c)({
|
|
4727
4729
|
value: i,
|
|
4728
4730
|
defaultAllowedValues: r,
|
|
4729
4731
|
columnIndex: s,
|
|
@@ -4745,7 +4747,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4745
4747
|
var l, u;
|
|
4746
4748
|
let d = n[c];
|
|
4747
4749
|
if (!d || d != null && d.optionalColumn) return;
|
|
4748
|
-
let f = (l = d.unitsValidator) == null ?
|
|
4750
|
+
let f = (l = d.unitsValidator) == null ? bu : l, p = (u = i == null ? void 0 : i[c]) == null ? [] : u;
|
|
4749
4751
|
f({
|
|
4750
4752
|
value: r,
|
|
4751
4753
|
defaultAllowedValues: p,
|
|
@@ -4761,7 +4763,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4761
4763
|
});
|
|
4762
4764
|
}
|
|
4763
4765
|
return o;
|
|
4764
|
-
},
|
|
4766
|
+
}, Su = (e, t, n) => {
|
|
4765
4767
|
let r = [];
|
|
4766
4768
|
return e.forEach((e, i) => {
|
|
4767
4769
|
e.forEach((e, a) => {
|
|
@@ -4774,91 +4776,91 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4774
4776
|
})}`);
|
|
4775
4777
|
});
|
|
4776
4778
|
}), r;
|
|
4777
|
-
},
|
|
4778
|
-
let s =
|
|
4779
|
-
return s.length === 0 && (s = s.concat(
|
|
4779
|
+
}, Cu = (e, t, n, r, i, a, o) => {
|
|
4780
|
+
let s = _u(e, t, n, r, i, a, o);
|
|
4781
|
+
return s.length === 0 && (s = s.concat(xu(e, t, r, i, a, o), Su(n, r, o))), {
|
|
4780
4782
|
isValid: s.length === 0,
|
|
4781
4783
|
errors: s
|
|
4782
4784
|
};
|
|
4783
|
-
},
|
|
4785
|
+
}, wu = (e, t, n) => {
|
|
4784
4786
|
var r, i, a, o, s, c, l, u, d, f, p, m, h, g;
|
|
4785
4787
|
let _ = (e) => e.replace(/,/g, "."), v = (r = (i = e[0]) == null ? void 0 : i.some((e) => isNaN(Number(_(e))))) != null && r, y = (a = (o = e[1]) == null ? void 0 : o.some((e) => isNaN(Number(_(e))))) != null && a, b = (s = (c = e[0]) == null ? void 0 : c.some((e) => t.includes(e))) != null && s, x = (l = (u = e[0]) == null ? void 0 : u.some((e) => n.includes(e))) != null && l, S = (d = (f = e[1]) == null ? void 0 : f.some((e) => n.includes(e))) != null && d, C = (p = (m = e[0]) == null ? void 0 : m.some((e) => !isNaN(Number(_(e))))) != null && p, w = (h = (g = e[1]) == null ? void 0 : g.some((e) => !isNaN(Number(_(e))))) != null && h;
|
|
4786
4788
|
return {
|
|
4787
4789
|
hasFieldNameHeader: b || v && !x && !C || v && y && !C,
|
|
4788
4790
|
hasUnitHeader: x || S || v && y && !x && !C && !w || v && y && !C && !w
|
|
4789
4791
|
};
|
|
4790
|
-
},
|
|
4792
|
+
}, Tu = (e, { validationRules: t }) => {
|
|
4791
4793
|
var n, r, i;
|
|
4792
4794
|
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) => {
|
|
4793
4795
|
var t;
|
|
4794
4796
|
return (t = e == null ? void 0 : e.defaultUnit) == null ? s(e == null ? void 0 : e.validUnits) : t;
|
|
4795
|
-
}), { hasFieldNameHeader: l, hasUnitHeader: u } =
|
|
4797
|
+
}), { hasFieldNameHeader: l, hasUnitHeader: u } = wu(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());
|
|
4796
4798
|
return l || e == null || e.unshift(o), u || e == null || e.splice(1, 0, c), {
|
|
4797
4799
|
hasFieldNameHeader: l,
|
|
4798
4800
|
hasUnitHeader: u
|
|
4799
4801
|
};
|
|
4800
|
-
},
|
|
4802
|
+
}, Eu = (e) => Math.round(e * 100) / 100, Du = (e) => e.join(", ").replace(/,\s*$/, ""), Ou = {
|
|
4801
4803
|
skipEmptyLines: !0,
|
|
4802
4804
|
delimiter: (e) => {
|
|
4803
4805
|
var t, n;
|
|
4804
4806
|
let r = e.substring(0, 200), i = ((t = r.match(/\t/g)) == null ? [] : t).length, a = ((n = r.match(/;/g)) == null ? [] : n).length;
|
|
4805
4807
|
return i === 0 && a === 0 ? "," : i > a ? " " : ";";
|
|
4806
4808
|
}
|
|
4807
|
-
},
|
|
4809
|
+
}, ku = [
|
|
4808
4810
|
"text/csv",
|
|
4809
4811
|
"text/plain",
|
|
4810
4812
|
"application/json",
|
|
4811
4813
|
"application/vnd.ms-excel"
|
|
4812
|
-
],
|
|
4814
|
+
], Au = (e) => ku.includes(e.type), ju = (e) => e instanceof File, Mu = (e) => e.trim().startsWith("["), Nu = (e) => {
|
|
4813
4815
|
try {
|
|
4814
4816
|
var t;
|
|
4815
4817
|
return !!((t = JSON.parse(e)) != null && t.path);
|
|
4816
4818
|
} catch {
|
|
4817
4819
|
return !1;
|
|
4818
4820
|
}
|
|
4819
|
-
},
|
|
4821
|
+
}, Pu = (e) => new Promise((t, n) => {
|
|
4820
4822
|
let r = new FileReader();
|
|
4821
4823
|
r.onload = () => t(String(r.result)), r.onerror = n, r.readAsText(e);
|
|
4822
|
-
}),
|
|
4824
|
+
}), Fu = async (e, t, n) => {
|
|
4823
4825
|
try {
|
|
4824
|
-
return
|
|
4826
|
+
return Hu({
|
|
4825
4827
|
data: JSON.parse(e),
|
|
4826
4828
|
errors: []
|
|
4827
4829
|
}, t, n);
|
|
4828
4830
|
} catch (e) {
|
|
4829
4831
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4830
4832
|
}
|
|
4831
|
-
},
|
|
4833
|
+
}, Iu = async (e, t, n) => {
|
|
4832
4834
|
try {
|
|
4833
4835
|
let r = JSON.parse(e).path.map((e) => [
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4836
|
+
Eu(e.md),
|
|
4837
|
+
Eu(e.inclination),
|
|
4838
|
+
Eu(e.gridAzimuth)
|
|
4837
4839
|
]);
|
|
4838
4840
|
return r.unshift([
|
|
4839
4841
|
"m",
|
|
4840
4842
|
"deg",
|
|
4841
4843
|
"deg"
|
|
4842
|
-
]),
|
|
4844
|
+
]), Hu({
|
|
4843
4845
|
data: r,
|
|
4844
4846
|
errors: []
|
|
4845
4847
|
}, t, n);
|
|
4846
4848
|
} catch (e) {
|
|
4847
4849
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4848
4850
|
}
|
|
4849
|
-
},
|
|
4851
|
+
}, Lu = (e) => e.replace(",", "."), Ru = (e) => e.map((e) => e.map((e) => Lu(e))), zu = (e, { importLimit: t, ...n }, r) => new Promise((i) => {
|
|
4850
4852
|
ci.parse(e, {
|
|
4851
|
-
...
|
|
4853
|
+
...Ou,
|
|
4852
4854
|
preview: t,
|
|
4853
4855
|
complete: (e) => {
|
|
4854
|
-
let a =
|
|
4856
|
+
let a = Hu(e, {
|
|
4855
4857
|
importLimit: t,
|
|
4856
4858
|
...n
|
|
4857
4859
|
}, r);
|
|
4858
|
-
a.rows =
|
|
4860
|
+
a.rows = Ru(a.rows), i(a);
|
|
4859
4861
|
}
|
|
4860
4862
|
});
|
|
4861
|
-
}),
|
|
4863
|
+
}), Bu = async (e, t, n) => {
|
|
4862
4864
|
let r = {
|
|
4863
4865
|
isValid: !1,
|
|
4864
4866
|
fields: [],
|
|
@@ -4867,13 +4869,13 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4867
4869
|
errors: []
|
|
4868
4870
|
};
|
|
4869
4871
|
try {
|
|
4870
|
-
if (
|
|
4871
|
-
let i =
|
|
4872
|
-
return
|
|
4872
|
+
if (ju(e) && !Au(e)) return r.errors.push(`${n("wrongFileFormatExpectedOneOf")} ${Du(Array.from(ku))}`), r;
|
|
4873
|
+
let i = ju(e) ? await Pu(e) : e;
|
|
4874
|
+
return Mu(i) ? await Fu(i, t, n) : Nu(i) ? await Iu(i, t, n) : await zu(e, t, n);
|
|
4873
4875
|
} catch (e) {
|
|
4874
4876
|
return r.errors.push(e.message), r;
|
|
4875
4877
|
}
|
|
4876
|
-
},
|
|
4878
|
+
}, Vu = (e, t, n, r) => {
|
|
4877
4879
|
var i;
|
|
4878
4880
|
let a = (i = r == null ? void 0 : r.delimiter) == null ? "," : i, o = [
|
|
4879
4881
|
e,
|
|
@@ -4885,7 +4887,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4885
4887
|
header: !0,
|
|
4886
4888
|
delimiter: a
|
|
4887
4889
|
});
|
|
4888
|
-
},
|
|
4890
|
+
}, Hu = (e, t, n) => {
|
|
4889
4891
|
let { data: r, errors: i } = e, a = {
|
|
4890
4892
|
isValid: !1,
|
|
4891
4893
|
fields: [],
|
|
@@ -4894,22 +4896,22 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4894
4896
|
errors: i.map((e) => e.message)
|
|
4895
4897
|
};
|
|
4896
4898
|
if (i.length > 0) return a;
|
|
4897
|
-
let { hasFieldNameHeader: o, hasUnitHeader: s } =
|
|
4899
|
+
let { hasFieldNameHeader: o, hasUnitHeader: s } = Tu(r, t);
|
|
4898
4900
|
a.fields = r[0].map((e) => e.trim()), a.units = r[1].map((e) => e.trim()).filter(Boolean), a.rows = r.slice(2);
|
|
4899
4901
|
let { validationRules: c } = t;
|
|
4900
4902
|
if (c.length) {
|
|
4901
|
-
let { isValid: e, errors: t } =
|
|
4903
|
+
let { isValid: e, errors: t } = Cu(a.fields, a.units, a.rows, c, o, s, n);
|
|
4902
4904
|
a.errors.push(...t), a.isValid = e && t.length === 0;
|
|
4903
4905
|
} else a.isValid = a.errors.length === 0;
|
|
4904
4906
|
return a;
|
|
4905
|
-
},
|
|
4907
|
+
}, Uu = .001, Wu = 0, Gu = (e, t) => e.every((e) => {
|
|
4906
4908
|
let n = e[t];
|
|
4907
4909
|
return n !== void 0 && n.trim() !== "" && fn(Er(n));
|
|
4908
|
-
}),
|
|
4910
|
+
}), Ku = (e, t = {}) => {
|
|
4909
4911
|
var n, r;
|
|
4910
|
-
let { independentColumnIndex: i =
|
|
4911
|
-
if (e.length <= 2 || !
|
|
4912
|
-
let s = (n = (r = Fr(e, (e) => e.length)) == null ? void 0 : r.length) == null ? 0 : n, c = Rr(a == null ? Lr(s) : a).filter((t) => t !== i &&
|
|
4912
|
+
let { independentColumnIndex: i = Wu, dependentColumnIndexes: a, tolerance: o = Uu } = t;
|
|
4913
|
+
if (e.length <= 2 || !Gu(e, i)) return e.slice();
|
|
4914
|
+
let s = (n = (r = Fr(e, (e) => e.length)) == null ? void 0 : r.length) == null ? 0 : n, c = Rr(a == null ? Lr(s) : a).filter((t) => t !== i && Gu(e, t));
|
|
4913
4915
|
if (c.length === 0) return e.slice();
|
|
4914
4916
|
let l = /* @__PURE__ */ new Set();
|
|
4915
4917
|
for (let t of c) {
|
|
@@ -4923,7 +4925,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4923
4925
|
}
|
|
4924
4926
|
}
|
|
4925
4927
|
return e.filter((e, t) => l.has(t));
|
|
4926
|
-
},
|
|
4928
|
+
}, qu = ({ id: e, message: t = {
|
|
4927
4929
|
type: Ks.INFO,
|
|
4928
4930
|
content: ""
|
|
4929
4931
|
}, autoClose: n = 6e3, onClose: r }) => {
|
|
@@ -4964,13 +4966,13 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4964
4966
|
transition: ui,
|
|
4965
4967
|
type: s
|
|
4966
4968
|
});
|
|
4967
|
-
},
|
|
4969
|
+
}, Ju = (e) => {
|
|
4968
4970
|
fi.dismiss(e);
|
|
4969
|
-
},
|
|
4971
|
+
}, Yu = (e, t) => {
|
|
4970
4972
|
t(() => {
|
|
4971
|
-
|
|
4973
|
+
qu({ ...e });
|
|
4972
4974
|
});
|
|
4973
|
-
},
|
|
4975
|
+
}, Xu = {
|
|
4974
4976
|
inputInTable: "_inputInTable_h6wco_1",
|
|
4975
4977
|
inputHover: "_inputHover_h6wco_13",
|
|
4976
4978
|
inputFocus: "_inputFocus_h6wco_18",
|
|
@@ -4986,7 +4988,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4986
4988
|
control: "_control_h6wco_25",
|
|
4987
4989
|
labelText: "_labelText_h6wco_137",
|
|
4988
4990
|
noMargin: "_noMargin_h6wco_201"
|
|
4989
|
-
},
|
|
4991
|
+
}, Zu = ({ name: e, label: t, checked: n = !1, disabled: r, display: i, small: a = !1, onChange: o, noMargin: s = !1, testId: c, helpText: l, onClickHelp: u, textTransform: f = Li.CAPITALIZE }) => {
|
|
4990
4992
|
let p = d(W), m = l || u;
|
|
4991
4993
|
return /* @__PURE__ */ w(mi, {
|
|
4992
4994
|
name: e,
|
|
@@ -4999,14 +5001,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
4999
5001
|
value: t
|
|
5000
5002
|
} });
|
|
5001
5003
|
},
|
|
5002
|
-
className: x(
|
|
5004
|
+
className: x(Xu.toggleContainer, s && Xu.noMargin),
|
|
5003
5005
|
style: { display: i },
|
|
5004
5006
|
"data-testid": c ? `${c}-field` : void 0,
|
|
5005
5007
|
children: [/* @__PURE__ */ w(pi, {
|
|
5006
|
-
className: x(
|
|
5008
|
+
className: x(Xu.toggle, a && Xu.small, !t && Xu.noLabel),
|
|
5007
5009
|
"data-testid": c,
|
|
5008
|
-
children: [/* @__PURE__ */ C("span", { className:
|
|
5009
|
-
className:
|
|
5010
|
+
children: [/* @__PURE__ */ C("span", { className: Xu.control }), t && /* @__PURE__ */ C("span", {
|
|
5011
|
+
className: Xu.labelText,
|
|
5010
5012
|
style: { textTransform: f },
|
|
5011
5013
|
children: t
|
|
5012
5014
|
})]
|
|
@@ -5015,7 +5017,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5015
5017
|
onClick: u
|
|
5016
5018
|
})]
|
|
5017
5019
|
});
|
|
5018
|
-
},
|
|
5020
|
+
}, Qu = ({ config: e, state: t, updateState: n, setModalVisibility: r, onCloseModal: i, readAndParseInput: a, validationRules: o = [], onCompleteImport: s = () => {}, prevalidationConfig: c, t: l, loading: d, startTransition: f, testId: p }) => {
|
|
5019
5021
|
let { modalVisibility: { reviewPasteModal: m, pasteModalHelpVisible: h, helpModal: g } } = t, { warningMessage: _, actionButtonLabel: b, changeRulesAction: x, checkPrevalidationNeed: T } = c == null ? {} : c, E = v(null), [D, O] = y(!1), [k, A] = y({
|
|
5020
5022
|
pastedText: "",
|
|
5021
5023
|
parsedResult: {
|
|
@@ -5036,10 +5038,10 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5036
5038
|
let { pastedText: j, parsedResult: M } = k, N = u((t) => {
|
|
5037
5039
|
if (t) {
|
|
5038
5040
|
var n, r;
|
|
5039
|
-
let t =
|
|
5041
|
+
let t = Ku(M.rows, e.downsampleConfig), i = {
|
|
5040
5042
|
validationRules: o,
|
|
5041
|
-
importLimit: (n = e.importLimit) == null ?
|
|
5042
|
-
}, a =
|
|
5043
|
+
importLimit: (n = e.importLimit) == null ? ru : n
|
|
5044
|
+
}, a = Vu(M.fields, (r = M.units) == null ? [] : r, t, i);
|
|
5043
5045
|
f(() => A({
|
|
5044
5046
|
parsedResult: {
|
|
5045
5047
|
...M,
|
|
@@ -5072,17 +5074,17 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5072
5074
|
}, F = () => {
|
|
5073
5075
|
r("helpModal", !g);
|
|
5074
5076
|
}, I = () => {
|
|
5075
|
-
n(k), s(k.parsedResult), i(),
|
|
5077
|
+
n(k), s(k.parsedResult), i(), Yu({ message: {
|
|
5076
5078
|
type: "Success",
|
|
5077
5079
|
content: l("pasteSuccessful")
|
|
5078
5080
|
} }, f);
|
|
5079
|
-
}, L = T && T(M), { isValid: R, errors: z } = M, B = z.length, ee = j === "", te =
|
|
5081
|
+
}, L = T && T(M), { isValid: R, errors: z } = M, B = z.length, ee = j === "", te = mu(j), ne = pu(j), V = /* @__PURE__ */ w(S, { children: [
|
|
5080
5082
|
/* @__PURE__ */ w("div", {
|
|
5081
5083
|
className: Ws.headerContainer,
|
|
5082
5084
|
children: [
|
|
5083
5085
|
/* @__PURE__ */ C(K, {
|
|
5084
5086
|
text: l("downsampleTooltip"),
|
|
5085
|
-
children: /* @__PURE__ */ C(
|
|
5087
|
+
children: /* @__PURE__ */ C(Zu, {
|
|
5086
5088
|
label: l("downsampled"),
|
|
5087
5089
|
checked: D,
|
|
5088
5090
|
onChange: () => N(!D),
|
|
@@ -5115,7 +5117,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5115
5117
|
}),
|
|
5116
5118
|
ee ? /* @__PURE__ */ C("div", {
|
|
5117
5119
|
className: Ws.resultContainer,
|
|
5118
|
-
children: /* @__PURE__ */ C(
|
|
5120
|
+
children: /* @__PURE__ */ C(fu, {
|
|
5119
5121
|
text: null,
|
|
5120
5122
|
children: /* @__PURE__ */ w("div", {
|
|
5121
5123
|
className: Ws.emptyState,
|
|
@@ -5151,7 +5153,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5151
5153
|
}) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w("div", {
|
|
5152
5154
|
className: Ws.messagesContainer,
|
|
5153
5155
|
children: [
|
|
5154
|
-
B ? /* @__PURE__ */ C(
|
|
5156
|
+
B ? /* @__PURE__ */ C(uu, {
|
|
5155
5157
|
errors: z,
|
|
5156
5158
|
t: l
|
|
5157
5159
|
}) : null,
|
|
@@ -5174,7 +5176,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5174
5176
|
type: "Warning"
|
|
5175
5177
|
} })
|
|
5176
5178
|
]
|
|
5177
|
-
}), /* @__PURE__ */ C(
|
|
5179
|
+
}), /* @__PURE__ */ C(su, {
|
|
5178
5180
|
validationRules: o,
|
|
5179
5181
|
parsedResult: M,
|
|
5180
5182
|
updateState: (e) => A((t) => ({
|
|
@@ -5217,7 +5219,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5217
5219
|
onClose: i
|
|
5218
5220
|
} })
|
|
5219
5221
|
});
|
|
5220
|
-
},
|
|
5222
|
+
}, $u = ({ modals: e = [], modalVisibility: t, onCloseModal: r, testId: i }) => e.length ? /* @__PURE__ */ C(S, { children: e.map(({ name: e, component: a, props: o = {} }) => {
|
|
5221
5223
|
var s;
|
|
5222
5224
|
return /* @__PURE__ */ C(n, { children: /* @__PURE__ */ C(a, {
|
|
5223
5225
|
testId: `${i}-modal-render-${e}`,
|
|
@@ -5225,7 +5227,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5225
5227
|
onClose: () => r({ name: e }),
|
|
5226
5228
|
...o
|
|
5227
5229
|
}) }, e);
|
|
5228
|
-
}) }) : null,
|
|
5230
|
+
}) }) : null, ed = ({ sections: e, iconName: t, testId: n, tooltip: r }) => /* @__PURE__ */ C(_o, {
|
|
5229
5231
|
loading: !0,
|
|
5230
5232
|
menu: {
|
|
5231
5233
|
component: /* @__PURE__ */ C(q, {
|
|
@@ -5241,18 +5243,18 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5241
5243
|
sections: e
|
|
5242
5244
|
},
|
|
5243
5245
|
testId: n
|
|
5244
|
-
}),
|
|
5246
|
+
}), td = (e, t, n) => u(async () => {
|
|
5245
5247
|
if (n) try {
|
|
5246
5248
|
return await n();
|
|
5247
5249
|
} catch (t) {
|
|
5248
|
-
console.error("beforeExportData failed", t),
|
|
5250
|
+
console.error("beforeExportData failed", t), qu({ message: {
|
|
5249
5251
|
type: "Error",
|
|
5250
5252
|
content: e("unableToPrepareExportData")
|
|
5251
5253
|
} });
|
|
5252
5254
|
return;
|
|
5253
5255
|
}
|
|
5254
5256
|
return t;
|
|
5255
|
-
}, [t, n]),
|
|
5257
|
+
}, [t, n]), nd = {
|
|
5256
5258
|
cancel: "Cancel",
|
|
5257
5259
|
chooseFile: "Choose file",
|
|
5258
5260
|
copyDecimalComma: "Copy (decimal comma)",
|
|
@@ -5311,26 +5313,26 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5311
5313
|
smartUpload_description: "Upload image and extract table content using a LLM",
|
|
5312
5314
|
smartUpload_smartUpload: "Smart Upload",
|
|
5313
5315
|
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"
|
|
5314
|
-
},
|
|
5315
|
-
let t = Object.keys(
|
|
5316
|
-
let r =
|
|
5316
|
+
}, rd = (e, t = {}) => e == null ? void 0 : e.replace(/\{\{(\w+)\}\}/g, (e, n) => (t == null ? void 0 : t[n]) === void 0 ? "" : String(t == null ? void 0 : t[n])), id = (e) => g(() => {
|
|
5317
|
+
let t = Object.keys(nd).reduce((t, n) => {
|
|
5318
|
+
let r = nd == null ? void 0 : nd[n], i = e == null ? void 0 : e[n];
|
|
5317
5319
|
return t[n] = i == null ? r : i, t;
|
|
5318
5320
|
}, {});
|
|
5319
5321
|
return (e, n) => {
|
|
5320
5322
|
let r = t[e];
|
|
5321
|
-
return n ?
|
|
5323
|
+
return n ? rd(r, n) : r;
|
|
5322
5324
|
};
|
|
5323
|
-
}, [e]),
|
|
5325
|
+
}, [e]), ad = /^\s*-?\d+(?:[.,]\d+)?(?:e[+-]?\d+)?\s*$/i, od = (e) => {
|
|
5324
5326
|
var t;
|
|
5325
5327
|
return {
|
|
5326
5328
|
...e,
|
|
5327
5329
|
rows: e == null || (t = e.rows) == null ? void 0 : t.map((e) => e.map((e) => {
|
|
5328
5330
|
let t = String(e == null ? "" : e);
|
|
5329
|
-
return
|
|
5331
|
+
return ad.test(t) ? cr(t) : t;
|
|
5330
5332
|
}))
|
|
5331
5333
|
};
|
|
5332
|
-
},
|
|
5333
|
-
let { exportData: a, beforeExportData: o, importLimit: s =
|
|
5334
|
+
}, sd = ({ config: e, state: t, setState: n, smartUploadConfig: r, startTransition: i }) => {
|
|
5335
|
+
let { exportData: a, beforeExportData: o, importLimit: s = ru, validationRules: c = [], translations: l, onImportComplete: d = () => {}, disablePasteSuccessfulToast: f, prevalidationConfig: p, onDeleteRows: m } = e == null ? {} : e, { parsedResult: h } = t, { checkPrevalidationNeed: g } = p == null ? {} : p, _ = id(l), v = td(_, a, o), y = u((e) => {
|
|
5334
5336
|
n((t) => ({
|
|
5335
5337
|
...t,
|
|
5336
5338
|
...e
|
|
@@ -5374,9 +5376,9 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5374
5376
|
let t = {
|
|
5375
5377
|
validationRules: c,
|
|
5376
5378
|
importLimit: s
|
|
5377
|
-
}, n =
|
|
5379
|
+
}, n = od(await Bu(e, t, _));
|
|
5378
5380
|
if (g && g(h)) {
|
|
5379
|
-
let { fields: e, units: r, rows: a } = n, o =
|
|
5381
|
+
let { fields: e, units: r, rows: a } = n, o = Vu(e, r == null ? [] : r, a, t);
|
|
5380
5382
|
return i(() => y({
|
|
5381
5383
|
pastedText: o,
|
|
5382
5384
|
parsedResult: h
|
|
@@ -5402,20 +5404,20 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5402
5404
|
let { fromFile: t, showSuccessToast: n = !0 } = e == null ? {} : e, r;
|
|
5403
5405
|
try {
|
|
5404
5406
|
if (r = t ? await t.text() : await navigator.clipboard.readText(), !r) {
|
|
5405
|
-
|
|
5407
|
+
Yu({ message: {
|
|
5406
5408
|
type: "Error",
|
|
5407
5409
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed")
|
|
5408
5410
|
} }, i);
|
|
5409
5411
|
return;
|
|
5410
5412
|
}
|
|
5411
|
-
let e =
|
|
5413
|
+
let e = od(await Bu(r, {
|
|
5412
5414
|
validationRules: c,
|
|
5413
5415
|
importLimit: s
|
|
5414
5416
|
}, _));
|
|
5415
|
-
return e != null && e.isValid ||
|
|
5417
|
+
return e != null && e.isValid || Yu({ message: {
|
|
5416
5418
|
type: "Error",
|
|
5417
5419
|
content: _("clipboardReadFailed")
|
|
5418
|
-
} }, i), n &&
|
|
5420
|
+
} }, i), n && Yu({ message: {
|
|
5419
5421
|
type: "Success",
|
|
5420
5422
|
content: _("pasteSuccessful")
|
|
5421
5423
|
} }, i), {
|
|
@@ -5423,7 +5425,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5423
5425
|
parsedResult: e
|
|
5424
5426
|
};
|
|
5425
5427
|
} catch (e) {
|
|
5426
|
-
|
|
5428
|
+
Yu({ message: {
|
|
5427
5429
|
type: "Error",
|
|
5428
5430
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed"),
|
|
5429
5431
|
details: e.message
|
|
@@ -5436,10 +5438,10 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5436
5438
|
let n = e == null || (t = e.target) == null || (t = t.files) == null ? void 0 : t[0];
|
|
5437
5439
|
if (!n) return;
|
|
5438
5440
|
let r = await n.text(), a = await C(r);
|
|
5439
|
-
a.isValid ? (f ||
|
|
5441
|
+
a.isValid ? (f || Yu({ message: {
|
|
5440
5442
|
type: "Success",
|
|
5441
5443
|
content: _("pasteSuccessful")
|
|
5442
|
-
} }, i), i(() => d(a))) :
|
|
5444
|
+
} }, i), i(() => d(a))) : Yu({ message: {
|
|
5443
5445
|
type: "Error",
|
|
5444
5446
|
content: _("fileParsingFailed")
|
|
5445
5447
|
} }, i);
|
|
@@ -5453,7 +5455,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5453
5455
|
try {
|
|
5454
5456
|
let t = await navigator.clipboard.readText();
|
|
5455
5457
|
if (!t) {
|
|
5456
|
-
|
|
5458
|
+
Yu({ message: {
|
|
5457
5459
|
type: "Error",
|
|
5458
5460
|
content: _("clipboardIsEmpty")
|
|
5459
5461
|
} }, i);
|
|
@@ -5461,18 +5463,18 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5461
5463
|
}
|
|
5462
5464
|
let n = await C(t);
|
|
5463
5465
|
if (!n.isValid) {
|
|
5464
|
-
|
|
5466
|
+
Yu({ message: {
|
|
5465
5467
|
type: "Error",
|
|
5466
5468
|
content: _("clipboardReadFailed")
|
|
5467
5469
|
} }, i);
|
|
5468
5470
|
return;
|
|
5469
5471
|
}
|
|
5470
|
-
f ||
|
|
5472
|
+
f || Yu({ message: {
|
|
5471
5473
|
type: "Success",
|
|
5472
5474
|
content: _("pasteSuccessful")
|
|
5473
5475
|
} }, i), e && i(() => d(n));
|
|
5474
5476
|
} catch {
|
|
5475
|
-
|
|
5477
|
+
Yu({ message: {
|
|
5476
5478
|
type: "Error",
|
|
5477
5479
|
content: _("clipboardReadNotAllowed")
|
|
5478
5480
|
} }, i);
|
|
@@ -5487,14 +5489,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5487
5489
|
onClickCopyClipboard: u(async (e) => {
|
|
5488
5490
|
let t = await v();
|
|
5489
5491
|
if (!t) return;
|
|
5490
|
-
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e :
|
|
5492
|
+
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e : nu).slice(0, n.length), s = (e, t) => t === "comma" ? e.replace(/\./g, ",") : e, c = Vu(n, o, a.map((t) => t.map((t) => Pr(t) ? "" : s(t.toString(), e))), { delimiter: " " });
|
|
5491
5493
|
try {
|
|
5492
|
-
await navigator.clipboard.writeText(c),
|
|
5494
|
+
await navigator.clipboard.writeText(c), Yu({ message: {
|
|
5493
5495
|
type: "Success",
|
|
5494
5496
|
content: _("copiedToClipboard")
|
|
5495
5497
|
} }, i);
|
|
5496
5498
|
} catch (e) {
|
|
5497
|
-
|
|
5499
|
+
Yu({ message: {
|
|
5498
5500
|
type: "Error",
|
|
5499
5501
|
content: _("unableToCopyToClipboard"),
|
|
5500
5502
|
details: e.message
|
|
@@ -5504,14 +5506,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5504
5506
|
onSmartUploadResult: u((e) => {
|
|
5505
5507
|
let t = _n(e) && vn(e.errorMessage) ? e.errorMessage : void 0;
|
|
5506
5508
|
if (t) {
|
|
5507
|
-
|
|
5509
|
+
Yu({ message: {
|
|
5508
5510
|
type: "Error",
|
|
5509
5511
|
content: t || "Smart upload failed."
|
|
5510
5512
|
} }, i);
|
|
5511
5513
|
return;
|
|
5512
5514
|
}
|
|
5513
5515
|
if (!cn(e) || e.length < 2 || !on(e, (e) => _n(e) && on(Tn(e), vn))) {
|
|
5514
|
-
|
|
5516
|
+
Yu({ message: {
|
|
5515
5517
|
type: "Error",
|
|
5516
5518
|
content: "Smart upload returned unexpected format.",
|
|
5517
5519
|
details: JSON.stringify(e)
|
|
@@ -5543,14 +5545,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5543
5545
|
]),
|
|
5544
5546
|
deleteAllRows: x
|
|
5545
5547
|
};
|
|
5546
|
-
},
|
|
5548
|
+
}, cd = (e, t) => {
|
|
5547
5549
|
var n, r;
|
|
5548
|
-
let { fields: i, rows: a } = e, o =
|
|
5550
|
+
let { fields: i, rows: a } = e, o = Vu(i, (n = (r = e.units) == null ? void 0 : r.map((e) => e || "blank")) == null ? [] : n, a, { delimiter: " " }), s = new Blob([o], { type: "text/plain" }), c = document.createElement("a");
|
|
5549
5551
|
c.href = window.URL.createObjectURL(s), c.download = `${t}.csv`, document.body.appendChild(c), c.click(), document.body.removeChild(c);
|
|
5550
|
-
},
|
|
5552
|
+
}, ld = (e) => gn(e) && "modalKey" in e, ud = (e, t, n) => rn(e, (e) => {
|
|
5551
5553
|
if (cn(e) || !_n(e)) return;
|
|
5552
5554
|
let { modalKey: r } = e == null ? {} : e;
|
|
5553
|
-
if (
|
|
5555
|
+
if (ld(e) && typeof e.onClick != "function") {
|
|
5554
5556
|
let i = () => {
|
|
5555
5557
|
var e;
|
|
5556
5558
|
n(r, !((e = t.modalVisibility) != null && e[r]));
|
|
@@ -5560,7 +5562,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5560
5562
|
onClick: i
|
|
5561
5563
|
};
|
|
5562
5564
|
}
|
|
5563
|
-
}),
|
|
5565
|
+
}), dd = (e, t, n) => ud(e, t, n), fd = {
|
|
5564
5566
|
pastedText: "",
|
|
5565
5567
|
parsedResult: {
|
|
5566
5568
|
isValid: !1,
|
|
@@ -5575,9 +5577,9 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5575
5577
|
reviewPasteModal: !1,
|
|
5576
5578
|
helpModal: !1
|
|
5577
5579
|
}
|
|
5578
|
-
},
|
|
5580
|
+
}, pd = ({ config: e, smartUploadConfig: t, testId: n }) => {
|
|
5579
5581
|
var r, i, a, o;
|
|
5580
|
-
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: m = !0, copyFromClipBoard: h = !0, showDeleteOptions: g = !0, showHelpOption: _ = !0, showUploadFileOption: v = !0, modals: x = [], dynamicOptions: S, onImportComplete: T } = e == null ? {} : e, [E, D] = y(
|
|
5582
|
+
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: m = !0, copyFromClipBoard: h = !0, showDeleteOptions: g = !0, showHelpOption: _ = !0, showUploadFileOption: v = !0, modals: x = [], dynamicOptions: S, onImportComplete: T } = e == null ? {} : e, [E, D] = y(fd), { modalVisibility: { smartUploadModal: O = !1, reviewPasteModal: k = !1, helpModal: A = !1 } } = E, { enabled: j, prompt: M = "", onClose: N, onError: P, service: F = () => Promise.resolve() } = t == null ? {} : t, I = id(f), L = td(I, s, c), [R, z] = b(), B = sd({
|
|
5581
5583
|
config: e,
|
|
5582
5584
|
state: E,
|
|
5583
5585
|
setState: D,
|
|
@@ -5610,14 +5612,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5610
5612
|
onClick: () => V("smartUploadModal", !O),
|
|
5611
5613
|
testId: `${n}-smart-upload`
|
|
5612
5614
|
}] : [],
|
|
5613
|
-
...
|
|
5615
|
+
...dd((r = S == null ? void 0 : S.importOptions) == null ? [] : r, E, V)
|
|
5614
5616
|
] : [], le = [
|
|
5615
5617
|
{
|
|
5616
5618
|
type: "Option",
|
|
5617
5619
|
label: I("downloadFile"),
|
|
5618
5620
|
onClick: async () => {
|
|
5619
5621
|
let e = await L();
|
|
5620
|
-
e && e &&
|
|
5622
|
+
e && e && cd(e, d);
|
|
5621
5623
|
}
|
|
5622
5624
|
},
|
|
5623
5625
|
...p ? [{
|
|
@@ -5642,20 +5644,20 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5642
5644
|
}]
|
|
5643
5645
|
}
|
|
5644
5646
|
}],
|
|
5645
|
-
...
|
|
5647
|
+
...dd((i = S == null ? void 0 : S.exportOptions) == null ? [] : i, E, V)
|
|
5646
5648
|
], ue = g ? [{
|
|
5647
5649
|
type: "Option",
|
|
5648
5650
|
label: I("deleteAllRows"),
|
|
5649
5651
|
onClick: () => se(),
|
|
5650
5652
|
testId: `${n}-delete-all-rows`
|
|
5651
|
-
}, ...
|
|
5653
|
+
}, ...dd((a = S == null ? void 0 : S.deleteOptions) == null ? [] : a, E, V)] : [], de = _ ? [
|
|
5652
5654
|
{ type: "Divider" },
|
|
5653
5655
|
{
|
|
5654
5656
|
type: "Option",
|
|
5655
5657
|
label: I("help"),
|
|
5656
5658
|
onClick: () => V("helpModal", !A)
|
|
5657
5659
|
},
|
|
5658
|
-
...
|
|
5660
|
+
...dd((o = S == null ? void 0 : S.helpOptions) == null ? [] : o, E, V)
|
|
5659
5661
|
] : [], fe = [
|
|
5660
5662
|
...ce.length ? [{
|
|
5661
5663
|
section: [...ce, ...de],
|
|
@@ -5681,13 +5683,13 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5681
5683
|
small: !0,
|
|
5682
5684
|
dark: !0
|
|
5683
5685
|
}),
|
|
5684
|
-
fe.map((e, t) => /* @__PURE__ */ C(
|
|
5686
|
+
fe.map((e, t) => /* @__PURE__ */ C(ed, {
|
|
5685
5687
|
sections: e.section,
|
|
5686
5688
|
iconName: e.iconName,
|
|
5687
5689
|
tooltip: e.tooltip,
|
|
5688
5690
|
testId: `data-${e == null ? void 0 : e.name}-menu`
|
|
5689
5691
|
}, t)),
|
|
5690
|
-
k && /* @__PURE__ */ C(
|
|
5692
|
+
k && /* @__PURE__ */ C(Qu, {
|
|
5691
5693
|
config: e,
|
|
5692
5694
|
state: E,
|
|
5693
5695
|
updateState: te,
|
|
@@ -5723,14 +5725,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5723
5725
|
cancelText: I("cancel"),
|
|
5724
5726
|
testId: n
|
|
5725
5727
|
}),
|
|
5726
|
-
/* @__PURE__ */ C(
|
|
5728
|
+
/* @__PURE__ */ C($u, {
|
|
5727
5729
|
modals: x,
|
|
5728
5730
|
modalVisibility: E == null ? void 0 : E.modalVisibility,
|
|
5729
5731
|
onCloseModal: ne,
|
|
5730
5732
|
testId: n
|
|
5731
5733
|
})
|
|
5732
5734
|
] });
|
|
5733
|
-
},
|
|
5735
|
+
}, md = ({ file: e, accept: t, multi: n, name: r, disabled: i, onChange: a = bn, ...o }) => {
|
|
5734
5736
|
let s = d(W), c = v(null), l = () => {
|
|
5735
5737
|
var e;
|
|
5736
5738
|
i || s || (e = c.current) == null || e.click();
|
|
@@ -5758,12 +5760,12 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5758
5760
|
multiple: n,
|
|
5759
5761
|
onChange: u
|
|
5760
5762
|
})] });
|
|
5761
|
-
},
|
|
5763
|
+
}, hd = {
|
|
5762
5764
|
label: "_label_uxk69_1",
|
|
5763
5765
|
labelLeft: "_labelLeft_uxk69_5",
|
|
5764
5766
|
icons: "_icons_uxk69_13",
|
|
5765
5767
|
small: "_small_uxk69_27"
|
|
5766
|
-
},
|
|
5768
|
+
}, gd = ({ label: e = null, width: t = "auto", helpText: n = "", helpTextMaxWidth: r = "300px", onClickHelp: i = void 0, lock: a = {
|
|
5767
5769
|
visible: !1,
|
|
5768
5770
|
active: !1,
|
|
5769
5771
|
onClick: () => {},
|
|
@@ -5772,14 +5774,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5772
5774
|
}, info: o, libraryIcon: s, labelLeft: c = !1, small: l = !1, textTransform: u = Li.CAPITALIZE }) => {
|
|
5773
5775
|
var d;
|
|
5774
5776
|
return /* @__PURE__ */ C("div", {
|
|
5775
|
-
className: x(
|
|
5777
|
+
className: x(hd.label, c ? hd.labelLeft : "", l ? hd.small : ""),
|
|
5776
5778
|
children: /* @__PURE__ */ w("label", {
|
|
5777
5779
|
style: {
|
|
5778
5780
|
textTransform: u,
|
|
5779
5781
|
width: t || ""
|
|
5780
5782
|
},
|
|
5781
5783
|
children: [e, /* @__PURE__ */ w("div", {
|
|
5782
|
-
className:
|
|
5784
|
+
className: hd.icons,
|
|
5783
5785
|
children: [
|
|
5784
5786
|
(n || i) && /* @__PURE__ */ C(xa, {
|
|
5785
5787
|
text: n,
|
|
@@ -5805,23 +5807,23 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5805
5807
|
})]
|
|
5806
5808
|
})
|
|
5807
5809
|
});
|
|
5808
|
-
},
|
|
5810
|
+
}, _d = {
|
|
5809
5811
|
field: "_field_1xoss_1",
|
|
5810
5812
|
labelLeft: "_labelLeft_1xoss_5",
|
|
5811
5813
|
fieldInput: "_fieldInput_1xoss_9",
|
|
5812
5814
|
formRow: "_formRow_1xoss_12",
|
|
5813
5815
|
"form-row": "_form-row_1xoss_13",
|
|
5814
5816
|
button: "_button_1xoss_22"
|
|
5815
|
-
},
|
|
5817
|
+
}, vd = ({ label: e, labelLeft: t = !1, labelWidth: n = "auto", children: r, helpText: i, helpTextMaxWidth: a = "300px", onClickHelp: o, lock: s = {
|
|
5816
5818
|
visible: !1,
|
|
5817
5819
|
active: !1,
|
|
5818
5820
|
onClick: () => {},
|
|
5819
5821
|
tooltip: "",
|
|
5820
5822
|
testId: void 0
|
|
5821
5823
|
}, info: c, libraryIcon: l, small: u = !1, testId: d, textTransform: f = Li.CAPITALIZE }) => /* @__PURE__ */ w("div", {
|
|
5822
|
-
className: x(
|
|
5824
|
+
className: x(_d.field, t ? _d.labelLeft : ""),
|
|
5823
5825
|
"data-testid": d,
|
|
5824
|
-
children: [(e || t) && /* @__PURE__ */ C(
|
|
5826
|
+
children: [(e || t) && /* @__PURE__ */ C(gd, {
|
|
5825
5827
|
label: e,
|
|
5826
5828
|
width: n,
|
|
5827
5829
|
helpText: i,
|
|
@@ -5834,10 +5836,10 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5834
5836
|
small: u,
|
|
5835
5837
|
textTransform: f
|
|
5836
5838
|
}), /* @__PURE__ */ C("div", {
|
|
5837
|
-
className:
|
|
5839
|
+
className: _d.fieldInput,
|
|
5838
5840
|
children: r
|
|
5839
5841
|
})]
|
|
5840
|
-
}),
|
|
5842
|
+
}), yd = ({ alignItems: e = "initial", justifyContent: t = "initial", direction: n = "initial", height: r = "initial", width: i = "initial", children: a = null, wrap: o = !0, gap: s = !1 }) => /* @__PURE__ */ C("div", {
|
|
5841
5843
|
style: {
|
|
5842
5844
|
display: "flex",
|
|
5843
5845
|
flexDirection: n,
|
|
@@ -5849,8 +5851,8 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5849
5851
|
gap: s === !1 ? 0 : s === !0 ? "var(--padding)" : typeof s == "number" ? `${s}px` : s
|
|
5850
5852
|
},
|
|
5851
5853
|
children: a
|
|
5852
|
-
}),
|
|
5853
|
-
className:
|
|
5854
|
+
}), bd = { formRow: "_formRow_odewu_1" }, xd = ({ children: e }) => /* @__PURE__ */ C("div", {
|
|
5855
|
+
className: bd.formRow,
|
|
5854
5856
|
children: e
|
|
5855
5857
|
}), Z = {
|
|
5856
5858
|
inputInTable: "_inputInTable_15rr3_1",
|
|
@@ -5896,15 +5898,15 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5896
5898
|
hideScrollbar: "_hideScrollbar_15rr3_71",
|
|
5897
5899
|
noPointerEvents: "_noPointerEvents_15rr3_313",
|
|
5898
5900
|
virtualRows: "_virtualRows_15rr3_316"
|
|
5899
|
-
},
|
|
5901
|
+
}, Sd = ({ toggleNarrow: e, onClickToggleNarrow: t }) => e ? /* @__PURE__ */ C("a", {
|
|
5900
5902
|
className: Z.toggleNarrow,
|
|
5901
5903
|
onClick: t,
|
|
5902
5904
|
children: /* @__PURE__ */ C(G, { icon: U.CHEVRON_LEFT })
|
|
5903
|
-
}) : null,
|
|
5905
|
+
}) : null, Cd = o(({ name: e, actions: t = [], toggleNarrow: n = !1, onToggleNarrow: r = () => {}, stickyHeader: i }, a) => /* @__PURE__ */ w("div", {
|
|
5904
5906
|
ref: a,
|
|
5905
5907
|
className: x(Z.header, i ? Z.stickyHeader : ""),
|
|
5906
5908
|
children: [
|
|
5907
|
-
/* @__PURE__ */ C(
|
|
5909
|
+
/* @__PURE__ */ C(Sd, {
|
|
5908
5910
|
toggleNarrow: n,
|
|
5909
5911
|
onClickToggleNarrow: r
|
|
5910
5912
|
}),
|
|
@@ -5924,14 +5926,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5924
5926
|
})
|
|
5925
5927
|
})
|
|
5926
5928
|
]
|
|
5927
|
-
})),
|
|
5929
|
+
})), wd = ({ label: e }) => e ? /* @__PURE__ */ C("span", {
|
|
5928
5930
|
className: Z.label,
|
|
5929
5931
|
children: /* @__PURE__ */ C(lo, {
|
|
5930
5932
|
color: e.color,
|
|
5931
5933
|
title: e.value,
|
|
5932
5934
|
small: e.small
|
|
5933
5935
|
})
|
|
5934
|
-
}) : null,
|
|
5936
|
+
}) : null, Td = ({ name: e, icon: t, testId: n }) => {
|
|
5935
5937
|
let r = t && /* @__PURE__ */ C(G, {
|
|
5936
5938
|
icon: t.icon,
|
|
5937
5939
|
color: t.color || "#db2828"
|
|
@@ -5951,8 +5953,8 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5951
5953
|
children: r
|
|
5952
5954
|
})]
|
|
5953
5955
|
});
|
|
5954
|
-
},
|
|
5955
|
-
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ C(
|
|
5956
|
+
}, Ed = ({ item: e }) => {
|
|
5957
|
+
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ C(Td, {
|
|
5956
5958
|
name: t,
|
|
5957
5959
|
icon: n,
|
|
5958
5960
|
testId: o && `${o}-name`
|
|
@@ -5978,10 +5980,10 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5978
5980
|
})
|
|
5979
5981
|
]
|
|
5980
5982
|
});
|
|
5981
|
-
},
|
|
5983
|
+
}, Dd = ({ item: e }) => e.metaCount === void 0 ? null : /* @__PURE__ */ C(lo, {
|
|
5982
5984
|
color: "rgba(0,0,0,0.25)",
|
|
5983
5985
|
title: e.metaCount
|
|
5984
|
-
}),
|
|
5986
|
+
}), Od = ({ item: e, expanding: t }) => {
|
|
5985
5987
|
let n = (e) => {
|
|
5986
5988
|
e.preventDefault(), e.stopPropagation();
|
|
5987
5989
|
}, r = !!t && !!e.active && !!e.content;
|
|
@@ -5993,7 +5995,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
5993
5995
|
children: e.content
|
|
5994
5996
|
})
|
|
5995
5997
|
});
|
|
5996
|
-
},
|
|
5998
|
+
}, kd = o(({ item: e, index: t }, n) => {
|
|
5997
5999
|
var r;
|
|
5998
6000
|
let i = d(W), { actions: a, disabled: o, expanded: s, onClick: c, title: l, name: u, icon: f, testId: p } = e;
|
|
5999
6001
|
return /* @__PURE__ */ C("div", {
|
|
@@ -6013,13 +6015,13 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6013
6015
|
className: x(Z.expandIcon, s && Z.expanded),
|
|
6014
6016
|
children: /* @__PURE__ */ C(G, { icon: U.CHEVRON_RIGHT })
|
|
6015
6017
|
}),
|
|
6016
|
-
/* @__PURE__ */ C(
|
|
6018
|
+
/* @__PURE__ */ C(Td, {
|
|
6017
6019
|
name: u,
|
|
6018
6020
|
icon: f
|
|
6019
6021
|
}),
|
|
6020
6022
|
/* @__PURE__ */ w("div", {
|
|
6021
6023
|
className: Z.right,
|
|
6022
|
-
children: [/* @__PURE__ */ C(
|
|
6024
|
+
children: [/* @__PURE__ */ C(Dd, { item: e }), !(o || i) && a && /* @__PURE__ */ C("div", {
|
|
6023
6025
|
className: Z.actions,
|
|
6024
6026
|
children: /* @__PURE__ */ C(yo, { actions: (r = e.actions) == null ? [] : r })
|
|
6025
6027
|
})]
|
|
@@ -6027,7 +6029,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6027
6029
|
]
|
|
6028
6030
|
}) })
|
|
6029
6031
|
});
|
|
6030
|
-
}),
|
|
6032
|
+
}), Ad = o(({ item: e, index: t, expanding: n, invokeEditOnRowClick: r, draggable: i }, a) => {
|
|
6031
6033
|
let o = d(W), s = (e, t, s, c, l, u) => {
|
|
6032
6034
|
let d = t.actions && t.actions.find((e) => {
|
|
6033
6035
|
var t;
|
|
@@ -6063,24 +6065,24 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6063
6065
|
className: Z.indentIcon,
|
|
6064
6066
|
children: /* @__PURE__ */ C(G, { icon: U.INDENT })
|
|
6065
6067
|
}) : null,
|
|
6066
|
-
/* @__PURE__ */ C(
|
|
6067
|
-
/* @__PURE__ */ C(
|
|
6068
|
+
/* @__PURE__ */ C(wd, { label: t.label }),
|
|
6069
|
+
/* @__PURE__ */ C(Ed, { item: t }),
|
|
6068
6070
|
/* @__PURE__ */ w("div", {
|
|
6069
6071
|
className: Z.right,
|
|
6070
|
-
children: [/* @__PURE__ */ C(
|
|
6072
|
+
children: [/* @__PURE__ */ C(Dd, { item: t }), !(t.disabled || o) && t.actions && /* @__PURE__ */ C("div", {
|
|
6071
6073
|
className: Z.actions,
|
|
6072
6074
|
children: /* @__PURE__ */ C(yo, { actions: t.actions })
|
|
6073
6075
|
})]
|
|
6074
6076
|
})
|
|
6075
6077
|
]
|
|
6076
|
-
}), /* @__PURE__ */ C(
|
|
6078
|
+
}), /* @__PURE__ */ C(Od, {
|
|
6077
6079
|
item: t,
|
|
6078
6080
|
expanding: n
|
|
6079
6081
|
})]
|
|
6080
6082
|
})
|
|
6081
6083
|
}, e);
|
|
6082
6084
|
};
|
|
6083
|
-
return e.type === "Heading" ? /* @__PURE__ */ C(
|
|
6085
|
+
return e.type === "Heading" ? /* @__PURE__ */ C(kd, {
|
|
6084
6086
|
ref: a,
|
|
6085
6087
|
item: e,
|
|
6086
6088
|
index: t
|
|
@@ -6095,7 +6097,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6095
6097
|
};
|
|
6096
6098
|
return s(e, t, l, n, r, i);
|
|
6097
6099
|
})(t, e) : s(t, e);
|
|
6098
|
-
}),
|
|
6100
|
+
}), jd = ({ children: e, draggable: t, list: n, onListReorder: r }) => {
|
|
6099
6101
|
let [i, a] = y(null), o = (e) => {
|
|
6100
6102
|
a(e.active.id);
|
|
6101
6103
|
}, s = (e) => {
|
|
@@ -6118,7 +6120,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6118
6120
|
dropAnimation: null,
|
|
6119
6121
|
children: /* @__PURE__ */ C("div", {
|
|
6120
6122
|
className: Z.dragOverlay,
|
|
6121
|
-
children: /* @__PURE__ */ C(
|
|
6123
|
+
children: /* @__PURE__ */ C(Ad, {
|
|
6122
6124
|
draggable: t,
|
|
6123
6125
|
item: n.items[Number(i)],
|
|
6124
6126
|
index: Number(i)
|
|
@@ -6126,7 +6128,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6126
6128
|
})
|
|
6127
6129
|
}), document.body)]
|
|
6128
6130
|
}) : e;
|
|
6129
|
-
},
|
|
6131
|
+
}, Md = ({ items: e, scrollDetails: t, children: n }) => {
|
|
6130
6132
|
let { scrollable: r, hideScrollbar: i, triggerScrollToActiveItem: a, infiniteScroll: o } = t, s = v(null), c = si({
|
|
6131
6133
|
count: e.length,
|
|
6132
6134
|
getScrollElement: () => s.current,
|
|
@@ -6159,9 +6161,9 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6159
6161
|
children: n({ virtualizer: c })
|
|
6160
6162
|
})
|
|
6161
6163
|
});
|
|
6162
|
-
},
|
|
6164
|
+
}, Nd = ({ items: e, scrollDetails: t, children: n }) => {
|
|
6163
6165
|
let { scrollable: r, hideScrollbar: i, infiniteScroll: a } = t;
|
|
6164
|
-
return a ? /* @__PURE__ */ C(
|
|
6166
|
+
return a ? /* @__PURE__ */ C(Md, {
|
|
6165
6167
|
items: e,
|
|
6166
6168
|
scrollDetails: t,
|
|
6167
6169
|
children: ({ virtualizer: e }) => n({ virtualizer: e })
|
|
@@ -6172,7 +6174,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6172
6174
|
children: n({})
|
|
6173
6175
|
})
|
|
6174
6176
|
});
|
|
6175
|
-
},
|
|
6177
|
+
}, Pd = ({ list: e, bordered: t = !1, expanding: n = !1, narrow: r = !1, toggleNarrow: i = !1, onToggleNarrow: a = () => {}, invokeEditOnRowClick: o = !0, noHeader: s = !1, stickyHeader: c, draggable: l = !1, onListReorder: u = () => {}, marginBottom: d = 0, height: f, testId: p, scrollDetails: m = {
|
|
6176
6178
|
scrollable: !1,
|
|
6177
6179
|
hideScrollbar: !1,
|
|
6178
6180
|
triggerScrollToActiveItem: !1,
|
|
@@ -6185,17 +6187,17 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6185
6187
|
marginBottom: d
|
|
6186
6188
|
},
|
|
6187
6189
|
id: "scrollableDiv",
|
|
6188
|
-
children: [!s && /* @__PURE__ */ C(
|
|
6190
|
+
children: [!s && /* @__PURE__ */ C(Cd, {
|
|
6189
6191
|
name: e.name,
|
|
6190
6192
|
actions: e.actions,
|
|
6191
6193
|
toggleNarrow: i,
|
|
6192
6194
|
onToggleNarrow: a,
|
|
6193
6195
|
stickyHeader: c
|
|
6194
|
-
}), /* @__PURE__ */ C(
|
|
6196
|
+
}), /* @__PURE__ */ C(jd, {
|
|
6195
6197
|
draggable: l,
|
|
6196
6198
|
list: e,
|
|
6197
6199
|
onListReorder: u,
|
|
6198
|
-
children: /* @__PURE__ */ C(
|
|
6200
|
+
children: /* @__PURE__ */ C(Nd, {
|
|
6199
6201
|
items: e.items,
|
|
6200
6202
|
scrollDetails: m,
|
|
6201
6203
|
children: ({ virtualizer: t }) => t ? t.getVirtualItems().map((r) => /* @__PURE__ */ C("div", {
|
|
@@ -6203,14 +6205,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6203
6205
|
className: Z.virtualRow,
|
|
6204
6206
|
style: { transform: `translateY(${r.start}px)` },
|
|
6205
6207
|
ref: t.measureElement,
|
|
6206
|
-
children: /* @__PURE__ */ C(
|
|
6208
|
+
children: /* @__PURE__ */ C(Ad, {
|
|
6207
6209
|
index: r.index,
|
|
6208
6210
|
draggable: l,
|
|
6209
6211
|
item: e.items[r.index],
|
|
6210
6212
|
expanding: n,
|
|
6211
6213
|
invokeEditOnRowClick: o
|
|
6212
6214
|
})
|
|
6213
|
-
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ C("div", { children: /* @__PURE__ */ C(
|
|
6215
|
+
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ C("div", { children: /* @__PURE__ */ C(Ad, {
|
|
6214
6216
|
index: t,
|
|
6215
6217
|
draggable: l,
|
|
6216
6218
|
item: e,
|
|
@@ -6219,7 +6221,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6219
6221
|
}) }, t))
|
|
6220
6222
|
})
|
|
6221
6223
|
})]
|
|
6222
|
-
}),
|
|
6224
|
+
}), Fd = {
|
|
6223
6225
|
loader: "_loader_477i5_1",
|
|
6224
6226
|
fullViewPortSize: "_fullViewPortSize_477i5_7",
|
|
6225
6227
|
cover: "_cover_477i5_14",
|
|
@@ -6227,33 +6229,33 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6227
6229
|
content: "_content_477i5_44",
|
|
6228
6230
|
text: "_text_477i5_49",
|
|
6229
6231
|
details: "_details_477i5_53"
|
|
6230
|
-
},
|
|
6232
|
+
}, Id = ({ width: e, height: t, text: n = "", details: r = "", fullViewPortSize: i = !1, cover: a = !1, children: o = null, theme: s = Ri.DARK, testId: c = null }) => {
|
|
6231
6233
|
let l = s === Ri.DARK ? Ri.WHITE : Ri.INHERIT, u = s === "white" ? "var(--color-background-raised)" : s === "light" ? "var(--color-background)" : "black";
|
|
6232
6234
|
return /* @__PURE__ */ C("div", {
|
|
6233
|
-
className: x(
|
|
6235
|
+
className: x(Fd.loader, a ? Fd.cover : "", { [Fd.fullViewPortSize]: i }),
|
|
6234
6236
|
style: {
|
|
6235
6237
|
width: e,
|
|
6236
6238
|
height: t
|
|
6237
6239
|
},
|
|
6238
6240
|
"data-testid": c,
|
|
6239
6241
|
children: /* @__PURE__ */ C("div", {
|
|
6240
|
-
className:
|
|
6242
|
+
className: Fd.dimmer,
|
|
6241
6243
|
style: {
|
|
6242
6244
|
background: u,
|
|
6243
6245
|
color: l
|
|
6244
6246
|
},
|
|
6245
6247
|
children: /* @__PURE__ */ w("div", {
|
|
6246
|
-
className:
|
|
6248
|
+
className: Fd.content,
|
|
6247
6249
|
"data-testid": c && `${c}-content`,
|
|
6248
6250
|
children: [
|
|
6249
6251
|
o,
|
|
6250
6252
|
n && /* @__PURE__ */ C("div", {
|
|
6251
|
-
className:
|
|
6253
|
+
className: Fd.text,
|
|
6252
6254
|
"data-testid": c && `${c}-text`,
|
|
6253
6255
|
children: n
|
|
6254
6256
|
}),
|
|
6255
6257
|
r && /* @__PURE__ */ C("div", {
|
|
6256
|
-
className:
|
|
6258
|
+
className: Fd.details,
|
|
6257
6259
|
"data-testid": c && `${c}-details`,
|
|
6258
6260
|
children: r
|
|
6259
6261
|
})
|
|
@@ -6261,15 +6263,15 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6261
6263
|
})
|
|
6262
6264
|
})
|
|
6263
6265
|
});
|
|
6264
|
-
},
|
|
6266
|
+
}, Ld = {
|
|
6265
6267
|
menu: "_menu_12x4u_1",
|
|
6266
6268
|
header: "_header_12x4u_11",
|
|
6267
6269
|
item: "_item_12x4u_27",
|
|
6268
6270
|
heading: "_heading_12x4u_32"
|
|
6269
|
-
},
|
|
6271
|
+
}, Rd = ({ option: e, onChange: t }) => {
|
|
6270
6272
|
let { key: n, selected: r, label: i, disabled: a, testId: o, helpText: s, onClickHelp: c, textTransform: l } = e;
|
|
6271
6273
|
return /* @__PURE__ */ C("div", {
|
|
6272
|
-
className:
|
|
6274
|
+
className: Ld.item,
|
|
6273
6275
|
children: /* @__PURE__ */ C(Sa, {
|
|
6274
6276
|
label: i,
|
|
6275
6277
|
noMargin: !0,
|
|
@@ -6282,21 +6284,21 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6282
6284
|
textTransform: l
|
|
6283
6285
|
})
|
|
6284
6286
|
}, n);
|
|
6285
|
-
},
|
|
6286
|
-
className:
|
|
6287
|
+
}, zd = ({ label: e }) => /* @__PURE__ */ C("div", {
|
|
6288
|
+
className: Ld.heading,
|
|
6287
6289
|
children: e
|
|
6288
|
-
}),
|
|
6290
|
+
}), Bd = /* @__PURE__ */ function(e) {
|
|
6289
6291
|
return e.HEADING = "Heading", e.DIVIDER = "Divider", e.DEFAULT = "Default", e;
|
|
6290
|
-
}({}),
|
|
6291
|
-
className: x("menu",
|
|
6292
|
+
}({}), Vd = (e) => e.type !== Bd.HEADING && e.type !== Bd.DIVIDER && !e.disabled, Hd = ({ options: e, onChangeOptions: t, showHeader: n, maxHeight: r, testId: i }) => /* @__PURE__ */ w("div", {
|
|
6293
|
+
className: x("menu", Ld.menu),
|
|
6292
6294
|
style: { maxHeight: r },
|
|
6293
6295
|
"data-testid": i ? `${i}-option-dropdown-layer` : void 0,
|
|
6294
6296
|
children: [n && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w("div", {
|
|
6295
|
-
className:
|
|
6297
|
+
className: Ld.header,
|
|
6296
6298
|
children: [
|
|
6297
6299
|
/* @__PURE__ */ C("a", {
|
|
6298
6300
|
onClick: (n) => {
|
|
6299
|
-
t(n, e.map((e) =>
|
|
6301
|
+
t(n, e.map((e) => Vd(e) ? {
|
|
6300
6302
|
...e,
|
|
6301
6303
|
selected: !0
|
|
6302
6304
|
} : e));
|
|
@@ -6305,7 +6307,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6305
6307
|
}),
|
|
6306
6308
|
/* @__PURE__ */ C("a", {
|
|
6307
6309
|
onClick: (n) => {
|
|
6308
|
-
t(n, e.map((e) =>
|
|
6310
|
+
t(n, e.map((e) => Vd(e) ? {
|
|
6309
6311
|
...e,
|
|
6310
6312
|
selected: !1
|
|
6311
6313
|
} : e));
|
|
@@ -6314,7 +6316,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6314
6316
|
}),
|
|
6315
6317
|
/* @__PURE__ */ C("a", {
|
|
6316
6318
|
onClick: (n) => {
|
|
6317
|
-
t(n, e.map((e) =>
|
|
6319
|
+
t(n, e.map((e) => Vd(e) ? {
|
|
6318
6320
|
...e,
|
|
6319
6321
|
selected: !e.selected
|
|
6320
6322
|
} : e));
|
|
@@ -6324,19 +6326,19 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6324
6326
|
]
|
|
6325
6327
|
}), /* @__PURE__ */ C(is, { margin: 0 })] }), e.map((n, r) => {
|
|
6326
6328
|
switch (n.type) {
|
|
6327
|
-
case
|
|
6329
|
+
case Bd.HEADING:
|
|
6328
6330
|
var i;
|
|
6329
|
-
return /* @__PURE__ */ C(
|
|
6330
|
-
case
|
|
6331
|
+
return /* @__PURE__ */ C(zd, { label: n.label }, (i = n.key) == null ? r : i);
|
|
6332
|
+
case Bd.DIVIDER:
|
|
6331
6333
|
var a;
|
|
6332
6334
|
return /* @__PURE__ */ C(is, { margin: 0 }, (a = n.key) == null ? r : a);
|
|
6333
6335
|
default:
|
|
6334
6336
|
var o;
|
|
6335
|
-
return /* @__PURE__ */ C(
|
|
6337
|
+
return /* @__PURE__ */ C(Rd, {
|
|
6336
6338
|
option: n,
|
|
6337
6339
|
onChange: (r) => {
|
|
6338
6340
|
let { value: i } = n;
|
|
6339
|
-
t(r, e.map((e) => e.type ===
|
|
6341
|
+
t(r, e.map((e) => e.type === Bd.HEADING || e.type === Bd.DIVIDER || e.value !== i ? e : {
|
|
6340
6342
|
...e,
|
|
6341
6343
|
selected: !e.selected
|
|
6342
6344
|
}));
|
|
@@ -6344,7 +6346,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6344
6346
|
}, (o = n.key) == null ? r : o);
|
|
6345
6347
|
}
|
|
6346
6348
|
})]
|
|
6347
|
-
}),
|
|
6349
|
+
}), Ud = ({ name: e, disabled: t, label: n, options: r, onChange: i, small: a = !1, showHeader: o = !0, maxHeight: s = "40vh", testId: c }) => /* @__PURE__ */ C(_o, {
|
|
6348
6350
|
testId: c,
|
|
6349
6351
|
disabled: t,
|
|
6350
6352
|
menu: {
|
|
@@ -6352,7 +6354,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6352
6354
|
small: a,
|
|
6353
6355
|
label: n,
|
|
6354
6356
|
trigger: Ni.DROP_DOWN_BUTTON,
|
|
6355
|
-
sections: /* @__PURE__ */ C(
|
|
6357
|
+
sections: /* @__PURE__ */ C(Hd, {
|
|
6356
6358
|
testId: c,
|
|
6357
6359
|
options: r,
|
|
6358
6360
|
onChangeOptions: (t, n) => {
|
|
@@ -6362,13 +6364,13 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6362
6364
|
maxHeight: s
|
|
6363
6365
|
})
|
|
6364
6366
|
}
|
|
6365
|
-
}),
|
|
6367
|
+
}), Wd = {
|
|
6366
6368
|
page: "_page_beskc_1",
|
|
6367
6369
|
scroll: "_scroll_beskc_23"
|
|
6368
|
-
},
|
|
6370
|
+
}, Gd = ({ children: e, left: t = "var(--size-sidebar)", padding: n = !0, scroll: r = !0, top: i = "var(--size-topbar)" }) => {
|
|
6369
6371
|
let a = typeof n == "string" ? n : n === !0 ? "var(--padding)" : "0";
|
|
6370
6372
|
return /* @__PURE__ */ C("div", {
|
|
6371
|
-
className: x(
|
|
6373
|
+
className: x(Wd.page, r ? Wd.scroll : ""),
|
|
6372
6374
|
style: {
|
|
6373
6375
|
left: t,
|
|
6374
6376
|
padding: a,
|
|
@@ -6376,19 +6378,19 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6376
6378
|
},
|
|
6377
6379
|
children: e
|
|
6378
6380
|
});
|
|
6379
|
-
},
|
|
6381
|
+
}, Kd = ({ id: e, children: t }) => {
|
|
6380
6382
|
let n = document.querySelector(`#${e}`), [r, i] = y(!1);
|
|
6381
6383
|
return h(() => {
|
|
6382
6384
|
r || i(!0);
|
|
6383
6385
|
}, [e]), n ? ri(t, n) : null;
|
|
6384
|
-
},
|
|
6386
|
+
}, qd = { printHeader: "_printHeader_o7xxx_1" }, Jd = ({ logo: e, alt: t, logoWidth: n = "100px" }) => /* @__PURE__ */ C("img", {
|
|
6385
6387
|
src: e,
|
|
6386
6388
|
alt: t,
|
|
6387
|
-
className:
|
|
6389
|
+
className: qd.printHeader,
|
|
6388
6390
|
style: { width: n }
|
|
6389
|
-
}),
|
|
6391
|
+
}), Yd = ({ name: e, label: t, options: n, value: r, onChange: i, disabled: a = !1, small: o = !1, noMargin: s = !1, inline: c = !1, testId: l }) => {
|
|
6390
6392
|
var u;
|
|
6391
|
-
let f = d(W), { simpleInputs: p, options: m, selectedOptions: h } =
|
|
6393
|
+
let f = d(W), { simpleInputs: p, options: m, selectedOptions: h } = el(n, r), g = h == null ? void 0 : p ? h : h.value, _ = a || f;
|
|
6392
6394
|
return /* @__PURE__ */ w(ti, {
|
|
6393
6395
|
name: e,
|
|
6394
6396
|
"aria-label": t ? void 0 : String(e == null ? "Radio group" : e),
|
|
@@ -6406,15 +6408,15 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6406
6408
|
} });
|
|
6407
6409
|
},
|
|
6408
6410
|
isDisabled: _,
|
|
6409
|
-
className:
|
|
6411
|
+
className: zl.wrapper,
|
|
6410
6412
|
"data-testid": l,
|
|
6411
6413
|
children: [t && /* @__PURE__ */ C(Qr, {
|
|
6412
|
-
className:
|
|
6414
|
+
className: zl.groupLabel,
|
|
6413
6415
|
children: t
|
|
6414
6416
|
}), m.map((e) => {
|
|
6415
6417
|
var t, n;
|
|
6416
6418
|
let r = a || e.disabled || f;
|
|
6417
|
-
return /* @__PURE__ */ C(
|
|
6419
|
+
return /* @__PURE__ */ C(Bl, {
|
|
6418
6420
|
value: e.value,
|
|
6419
6421
|
label: e.label,
|
|
6420
6422
|
disabled: r,
|
|
@@ -6427,40 +6429,40 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6427
6429
|
}, (t = (n = e.value) == null ? void 0 : n.toString()) == null ? "" : t);
|
|
6428
6430
|
})]
|
|
6429
6431
|
});
|
|
6430
|
-
},
|
|
6432
|
+
}, Xd = {
|
|
6431
6433
|
richTextToolbar: "_richTextToolbar_1gbkk_1",
|
|
6432
6434
|
richTextToolbarContainer: "_richTextToolbarContainer_1gbkk_5"
|
|
6433
|
-
},
|
|
6435
|
+
}, Zd = /* @__PURE__ */ function(e) {
|
|
6434
6436
|
return e.BOLD = "bold", e.ITALIC = "italic", e.CODE = "code", e.UL = "ul", e.OL = "ol", e.MENTION = "at", e;
|
|
6435
|
-
}({}),
|
|
6437
|
+
}({}), Qd = ({ editor: e, disabled: t = !1, showMentionButton: n = !1, toolbarComponent: r = null, testId: i }) => {
|
|
6436
6438
|
var a, o, s, c, l;
|
|
6437
6439
|
let u = [
|
|
6438
6440
|
{
|
|
6439
|
-
icon:
|
|
6441
|
+
icon: Zd.BOLD,
|
|
6440
6442
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBold().run(),
|
|
6441
6443
|
active: (a = e == null ? void 0 : e.isActive("bold")) != null && a,
|
|
6442
6444
|
testId: "bold"
|
|
6443
6445
|
},
|
|
6444
6446
|
{
|
|
6445
|
-
icon:
|
|
6447
|
+
icon: Zd.ITALIC,
|
|
6446
6448
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleItalic().run(),
|
|
6447
6449
|
active: (o = e == null ? void 0 : e.isActive("italic")) != null && o,
|
|
6448
6450
|
testId: "italic"
|
|
6449
6451
|
},
|
|
6450
6452
|
{
|
|
6451
|
-
icon:
|
|
6453
|
+
icon: Zd.CODE,
|
|
6452
6454
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleCode().run(),
|
|
6453
6455
|
active: (s = e == null ? void 0 : e.isActive("code")) != null && s,
|
|
6454
6456
|
testId: "code"
|
|
6455
6457
|
},
|
|
6456
6458
|
{
|
|
6457
|
-
icon:
|
|
6459
|
+
icon: Zd.UL,
|
|
6458
6460
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBulletList().run(),
|
|
6459
6461
|
active: (c = e == null ? void 0 : e.isActive("bulletList")) != null && c,
|
|
6460
6462
|
testId: "bulletList"
|
|
6461
6463
|
},
|
|
6462
6464
|
{
|
|
6463
|
-
icon:
|
|
6465
|
+
icon: Zd.OL,
|
|
6464
6466
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleOrderedList().run(),
|
|
6465
6467
|
active: (l = e == null ? void 0 : e.isActive("orderedList")) != null && l,
|
|
6466
6468
|
testId: "orderedList"
|
|
@@ -6469,17 +6471,17 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6469
6471
|
if (n) {
|
|
6470
6472
|
var d;
|
|
6471
6473
|
u.push({
|
|
6472
|
-
icon:
|
|
6474
|
+
icon: Zd.MENTION,
|
|
6473
6475
|
onClick: () => e == null ? void 0 : e.chain().focus().insertContent("@").run(),
|
|
6474
6476
|
active: (d = e == null ? void 0 : e.isActive("mention")) != null && d,
|
|
6475
6477
|
testId: "mention"
|
|
6476
6478
|
});
|
|
6477
6479
|
}
|
|
6478
6480
|
return /* @__PURE__ */ w("div", {
|
|
6479
|
-
className:
|
|
6481
|
+
className: Xd.richTextToolbarContainer,
|
|
6480
6482
|
"data-testid": i,
|
|
6481
6483
|
children: [/* @__PURE__ */ C("div", {
|
|
6482
|
-
className:
|
|
6484
|
+
className: Xd.richTextToolbar,
|
|
6483
6485
|
children: u.map((e, n) => /* @__PURE__ */ C(q, {
|
|
6484
6486
|
small: !0,
|
|
6485
6487
|
round: !0,
|
|
@@ -6493,36 +6495,36 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6493
6495
|
}, n))
|
|
6494
6496
|
}), r]
|
|
6495
6497
|
});
|
|
6496
|
-
},
|
|
6497
|
-
let t =
|
|
6498
|
+
}, $d = 8, ef = /^\[@((?:\\.|[^\\\]])*)\]\(mention:((?:\\.|[^\\)])+)\)/, tf = (e) => e.replace(/[\\\][()]/g, "\\$&"), nf = (e) => e.replace(/\\(.)/g, "$1"), rf = (e) => typeof e == "string" ? e : "", af = (e) => {
|
|
6499
|
+
let t = ef.exec(e);
|
|
6498
6500
|
if (!t) return;
|
|
6499
6501
|
let [n, r, i] = t;
|
|
6500
6502
|
return {
|
|
6501
6503
|
raw: n,
|
|
6502
|
-
id:
|
|
6503
|
-
label:
|
|
6504
|
+
id: nf(i),
|
|
6505
|
+
label: nf(r)
|
|
6504
6506
|
};
|
|
6505
|
-
},
|
|
6507
|
+
}, of = (e) => {
|
|
6506
6508
|
if (!e) return [];
|
|
6507
6509
|
let t = /* @__PURE__ */ new Set();
|
|
6508
6510
|
return e.state.doc.descendants((e) => {
|
|
6509
6511
|
e.type.name === bi.name && typeof e.attrs.id == "string" && t.add(e.attrs.id);
|
|
6510
6512
|
}), [...t];
|
|
6511
|
-
},
|
|
6513
|
+
}, sf = (e, t) => `[@${tf(e)}](mention:${tf(t)})`, cf = (e, t) => bi.extend({
|
|
6512
6514
|
renderMarkdown: (e) => {
|
|
6513
6515
|
var t, n;
|
|
6514
|
-
return
|
|
6516
|
+
return sf(rf((t = e.attrs) == null ? void 0 : t.label), rf((n = e.attrs) == null ? void 0 : n.id));
|
|
6515
6517
|
},
|
|
6516
6518
|
parseMarkdown: (e, t) => t.createNode(bi.name, {
|
|
6517
|
-
id:
|
|
6518
|
-
label:
|
|
6519
|
+
id: rf(e.id),
|
|
6520
|
+
label: rf(e.label)
|
|
6519
6521
|
}),
|
|
6520
6522
|
markdownTokenizer: {
|
|
6521
6523
|
name: bi.name,
|
|
6522
6524
|
level: "inline",
|
|
6523
6525
|
start: (e) => e.indexOf("[@"),
|
|
6524
6526
|
tokenize: (e) => {
|
|
6525
|
-
let t =
|
|
6527
|
+
let t = af(e);
|
|
6526
6528
|
return t && {
|
|
6527
6529
|
type: bi.name,
|
|
6528
6530
|
...t
|
|
@@ -6538,11 +6540,11 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6538
6540
|
var r;
|
|
6539
6541
|
let i = e();
|
|
6540
6542
|
if (!i) return [];
|
|
6541
|
-
let a = new Set(
|
|
6542
|
-
return (await i.getItems(t)).filter(({ id: e }) => !a.has(e)).slice(0, (r = i.maxItems) == null ?
|
|
6543
|
+
let a = new Set(of(n));
|
|
6544
|
+
return (await i.getItems(t)).filter(({ id: e }) => !a.has(e)).slice(0, (r = i.maxItems) == null ? $d : r);
|
|
6543
6545
|
},
|
|
6544
6546
|
render: t
|
|
6545
|
-
} }),
|
|
6547
|
+
} }), lf = {
|
|
6546
6548
|
inputInTable: "_inputInTable_1xhvx_1",
|
|
6547
6549
|
inputHover: "_inputHover_1xhvx_13",
|
|
6548
6550
|
inputFocus: "_inputFocus_1xhvx_18",
|
|
@@ -6557,7 +6559,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6557
6559
|
mentionLayer: "_mentionLayer_1xhvx_133",
|
|
6558
6560
|
mentionOption: "_mentionOption_1xhvx_144",
|
|
6559
6561
|
focused: "_focused_1xhvx_150"
|
|
6560
|
-
},
|
|
6562
|
+
}, uf = o(({ editable: e, getRect: t, items: n, onDismiss: r, onSelect: i }, a) => {
|
|
6561
6563
|
let [o, s] = y(0), c = n.length > 0, l = p(), d = u((e) => `${l}-option-${e}`, [l]), { renderLayer: h, layerProps: _, triggerProps: b } = ha({
|
|
6562
6564
|
isOpen: c,
|
|
6563
6565
|
placement: "bottom-start",
|
|
@@ -6619,14 +6621,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6619
6621
|
i
|
|
6620
6622
|
]), c ? h(/* @__PURE__ */ C("div", {
|
|
6621
6623
|
..._,
|
|
6622
|
-
className:
|
|
6624
|
+
className: lf.mentionLayer,
|
|
6623
6625
|
id: l,
|
|
6624
6626
|
role: "listbox",
|
|
6625
6627
|
children: n.map((e, t) => /* @__PURE__ */ C("div", {
|
|
6626
6628
|
id: d(t),
|
|
6627
6629
|
role: "option",
|
|
6628
6630
|
"aria-selected": t === o,
|
|
6629
|
-
className: x(
|
|
6631
|
+
className: x(lf.mentionOption, { [lf.focused]: t === o }),
|
|
6630
6632
|
onMouseEnter: () => s(t),
|
|
6631
6633
|
onMouseDown: (t) => {
|
|
6632
6634
|
t.preventDefault(), i(e);
|
|
@@ -6634,12 +6636,12 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6634
6636
|
children: e.label
|
|
6635
6637
|
}, e.id))
|
|
6636
6638
|
})) : null;
|
|
6637
|
-
}),
|
|
6639
|
+
}), df = ({ clientRect: e, command: t, editor: n, items: r }) => ({
|
|
6638
6640
|
clientRect: e,
|
|
6639
6641
|
command: t,
|
|
6640
6642
|
items: r,
|
|
6641
6643
|
editable: n.view.dom
|
|
6642
|
-
}),
|
|
6644
|
+
}), ff = c(o(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i, mentions: a, testId: o }, s) => {
|
|
6643
6645
|
var c, l, u, p;
|
|
6644
6646
|
let h = d(W), _ = r || h, b = !!a, x = v(a), S = v(null), T = v(n == null ? "" : n), [E, D] = y(null);
|
|
6645
6647
|
f(() => {
|
|
@@ -6649,9 +6651,9 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6649
6651
|
_i,
|
|
6650
6652
|
vi.configure({ placeholder: e }),
|
|
6651
6653
|
yi,
|
|
6652
|
-
|
|
6653
|
-
onStart: (e) => D(
|
|
6654
|
-
onUpdate: (e) => D(
|
|
6654
|
+
cf(() => x.current, () => ({
|
|
6655
|
+
onStart: (e) => D(df(e)),
|
|
6656
|
+
onUpdate: (e) => D(df(e)),
|
|
6655
6657
|
onExit: () => D(null),
|
|
6656
6658
|
onKeyDown: ({ event: e }) => {
|
|
6657
6659
|
var t, n;
|
|
@@ -6663,9 +6665,9 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6663
6665
|
content: T.current,
|
|
6664
6666
|
contentType: "markdown",
|
|
6665
6667
|
editable: !_,
|
|
6666
|
-
editorProps: { attributes: { class:
|
|
6668
|
+
editorProps: { attributes: { class: lf.editable } },
|
|
6667
6669
|
onUpdate: ({ editor: e }) => {
|
|
6668
|
-
t == null || t(e.getMarkdown(), { mentionedIds:
|
|
6670
|
+
t == null || t(e.getMarkdown(), { mentionedIds: of(e) });
|
|
6669
6671
|
}
|
|
6670
6672
|
});
|
|
6671
6673
|
return f(() => {
|
|
@@ -6678,12 +6680,12 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6678
6680
|
}, [_, k]), m(s, () => ({
|
|
6679
6681
|
clearContent: () => k == null ? void 0 : k.commands.clearContent(!1),
|
|
6680
6682
|
editor: k,
|
|
6681
|
-
getMentionedIds: () =>
|
|
6683
|
+
getMentionedIds: () => of(k)
|
|
6682
6684
|
}), [k]), /* @__PURE__ */ w("div", {
|
|
6683
|
-
className:
|
|
6685
|
+
className: lf.richTextInput,
|
|
6684
6686
|
"data-testid": o,
|
|
6685
6687
|
children: [
|
|
6686
|
-
/* @__PURE__ */ C(
|
|
6688
|
+
/* @__PURE__ */ C(Qd, {
|
|
6687
6689
|
editor: k,
|
|
6688
6690
|
disabled: _,
|
|
6689
6691
|
showMentionButton: b && ((c = a == null ? void 0 : a.showMentionButton) == null || c),
|
|
@@ -6694,7 +6696,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6694
6696
|
editor: k,
|
|
6695
6697
|
"data-testid": o && `${o}-editor`
|
|
6696
6698
|
}),
|
|
6697
|
-
b && /* @__PURE__ */ C(oa, { children: /* @__PURE__ */ C(
|
|
6699
|
+
b && /* @__PURE__ */ C(oa, { children: /* @__PURE__ */ C(uf, {
|
|
6698
6700
|
ref: S,
|
|
6699
6701
|
editable: (l = E == null ? void 0 : E.editable) == null ? null : l,
|
|
6700
6702
|
getRect: (u = E == null ? void 0 : E.clientRect) == null ? null : u,
|
|
@@ -6704,13 +6706,13 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6704
6706
|
}) })
|
|
6705
6707
|
]
|
|
6706
6708
|
});
|
|
6707
|
-
})),
|
|
6708
|
-
className:
|
|
6709
|
+
})), pf = ({ children: e }) => /* @__PURE__ */ C("span", {
|
|
6710
|
+
className: lf.mention,
|
|
6709
6711
|
children: e
|
|
6710
|
-
}),
|
|
6712
|
+
}), mf = { row: "_row_n16je_1" }, hf = ({ alignItems: t = "initial", justifyContent: r = "initial", children: i = null, flex: a = !1, height: o = "auto", marginBottom: c = "0", marginTop: l = "0", spacing: u = "var(--padding)", wrap: d = !1, testId: f = null }) => {
|
|
6711
6713
|
let p = typeof u == "number" ? `${u}px` : u, m = (i === null || i === !1 ? [] : Array.isArray(i) ? i.filter((e) => s(e)) : [i]).map((t, r) => /* @__PURE__ */ C(n, { children: t.type === $o ? e.cloneElement(t, { spacing: p }) : t }, r));
|
|
6712
6714
|
return /* @__PURE__ */ C("div", {
|
|
6713
|
-
className: x(
|
|
6715
|
+
className: x(mf.row),
|
|
6714
6716
|
style: {
|
|
6715
6717
|
alignItems: t,
|
|
6716
6718
|
justifyContent: r,
|
|
@@ -6726,7 +6728,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6726
6728
|
"data-testid": f,
|
|
6727
6729
|
children: m
|
|
6728
6730
|
});
|
|
6729
|
-
},
|
|
6731
|
+
}, gf = {
|
|
6730
6732
|
inputInTable: "_inputInTable_t1w93_1",
|
|
6731
6733
|
inputHover: "_inputHover_t1w93_13",
|
|
6732
6734
|
inputFocus: "_inputFocus_t1w93_18",
|
|
@@ -6746,7 +6748,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6746
6748
|
experimental: "_experimental_t1w93_159",
|
|
6747
6749
|
active: "_active_t1w93_163",
|
|
6748
6750
|
icon: "_icon_t1w93_167"
|
|
6749
|
-
},
|
|
6751
|
+
}, _f = c(({ isOpen: e, label: t, icon: n, invalid: r }) => /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(K, {
|
|
6750
6752
|
text: t,
|
|
6751
6753
|
enabled: !e,
|
|
6752
6754
|
placement: "right-center",
|
|
@@ -6755,7 +6757,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6755
6757
|
padding: "var(--padding-sm)",
|
|
6756
6758
|
display: "block",
|
|
6757
6759
|
children: /* @__PURE__ */ C("span", {
|
|
6758
|
-
className:
|
|
6760
|
+
className: gf.icon,
|
|
6759
6761
|
children: /* @__PURE__ */ C(lo, {
|
|
6760
6762
|
small: !0,
|
|
6761
6763
|
title: r ? "!" : void 0,
|
|
@@ -6764,18 +6766,18 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6764
6766
|
})
|
|
6765
6767
|
})
|
|
6766
6768
|
}), /* @__PURE__ */ C("span", {
|
|
6767
|
-
className:
|
|
6769
|
+
className: gf.label,
|
|
6768
6770
|
children: t
|
|
6769
|
-
})] }), (e, t) => Zr(e, t)),
|
|
6770
|
-
className:
|
|
6771
|
+
})] }), (e, t) => Zr(e, t)), vf = ({ isOpen: e, items: t, sectionIndex: n, onClick: r, testId: i }) => /* @__PURE__ */ C("div", {
|
|
6772
|
+
className: gf.list,
|
|
6771
6773
|
children: t.map((t, a) => {
|
|
6772
6774
|
let o = `${n}_${a}`;
|
|
6773
6775
|
return /* @__PURE__ */ C("a", {
|
|
6774
6776
|
href: t.value,
|
|
6775
|
-
className: x(
|
|
6777
|
+
className: x(gf.item, t.isActive ? gf.active : "", t.isExperimental ? gf.experimental : ""),
|
|
6776
6778
|
onClick: (e) => r(e, t.value, t.label, t.onClick),
|
|
6777
6779
|
"data-testid": i,
|
|
6778
|
-
children: /* @__PURE__ */ C(
|
|
6780
|
+
children: /* @__PURE__ */ C(_f, {
|
|
6779
6781
|
label: t.label,
|
|
6780
6782
|
icon: t.icon,
|
|
6781
6783
|
invalid: t.invalid,
|
|
@@ -6783,16 +6785,16 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6783
6785
|
}, o)
|
|
6784
6786
|
}, o);
|
|
6785
6787
|
})
|
|
6786
|
-
}),
|
|
6787
|
-
className:
|
|
6788
|
+
}), yf = ({ isOpen: t, sections: n, onClick: r }) => /* @__PURE__ */ C(S, { children: n.map((n, i) => /* @__PURE__ */ w(e.Fragment, { children: [/* @__PURE__ */ C("h5", {
|
|
6789
|
+
className: gf.subtitle,
|
|
6788
6790
|
children: n.heading.toUpperCase()
|
|
6789
|
-
}), /* @__PURE__ */ C(
|
|
6791
|
+
}), /* @__PURE__ */ C(vf, {
|
|
6790
6792
|
isOpen: t,
|
|
6791
6793
|
items: n.items,
|
|
6792
6794
|
sectionIndex: i,
|
|
6793
6795
|
onClick: r,
|
|
6794
6796
|
testId: n.testId
|
|
6795
|
-
})] }, i)) }),
|
|
6797
|
+
})] }, i)) }), bf = c(({ options: e, startOpen: t = !1, onShiftClickToggleOpen: n = () => {}, top: r, testId: i }) => {
|
|
6796
6798
|
let [a, o] = y(t), s = (e, t, n, r) => {
|
|
6797
6799
|
e.preventDefault(), typeof r == "function" && (e.currentTarget.value = t, e.currentTarget.label = n, r(e)), o(!1);
|
|
6798
6800
|
}, c = e.sections.length > 0;
|
|
@@ -6815,13 +6817,13 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6815
6817
|
testId: i ? `${i}-toggle` : void 0
|
|
6816
6818
|
}),
|
|
6817
6819
|
children: /* @__PURE__ */ C("div", {
|
|
6818
|
-
className: x(
|
|
6820
|
+
className: x(gf.sidebar, a ? "" : gf.collapsed),
|
|
6819
6821
|
children: c && /* @__PURE__ */ w("div", {
|
|
6820
|
-
className:
|
|
6822
|
+
className: gf.inner,
|
|
6821
6823
|
children: [/* @__PURE__ */ C("h4", {
|
|
6822
|
-
className:
|
|
6824
|
+
className: gf.title,
|
|
6823
6825
|
children: e.title
|
|
6824
|
-
}), /* @__PURE__ */ C(
|
|
6826
|
+
}), /* @__PURE__ */ C(yf, {
|
|
6825
6827
|
isOpen: a,
|
|
6826
6828
|
sections: e.sections,
|
|
6827
6829
|
onClick: s
|
|
@@ -6829,18 +6831,18 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6829
6831
|
})
|
|
6830
6832
|
})
|
|
6831
6833
|
});
|
|
6832
|
-
}, (e, t) => Zr(e, t)),
|
|
6834
|
+
}, (e, t) => Zr(e, t)), xf = {
|
|
6833
6835
|
skeletonContainer: "_skeletonContainer_mcfxp_9",
|
|
6834
6836
|
skeleton: "_skeleton_mcfxp_9"
|
|
6835
|
-
},
|
|
6837
|
+
}, Sf = ({ count: e, width: t, height: n }) => /* @__PURE__ */ C(xi, {
|
|
6836
6838
|
baseColor: "var(--color-skeleton-base)",
|
|
6837
6839
|
highlightColor: "var(--color-skeleton-highlight)",
|
|
6838
|
-
containerClassName:
|
|
6839
|
-
className:
|
|
6840
|
+
containerClassName: xf.skeletonContainer,
|
|
6841
|
+
className: xf.skeleton,
|
|
6840
6842
|
count: e,
|
|
6841
6843
|
width: t,
|
|
6842
6844
|
height: n
|
|
6843
|
-
}),
|
|
6845
|
+
}), Cf = {
|
|
6844
6846
|
wrapper: "_wrapper_j8x9r_1",
|
|
6845
6847
|
label: "_label_j8x9r_5",
|
|
6846
6848
|
input: "_input_j8x9r_9",
|
|
@@ -6848,38 +6850,38 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6848
6850
|
editable: "_editable_j8x9r_22",
|
|
6849
6851
|
inputControl: "_inputControl_j8x9r_25",
|
|
6850
6852
|
actions: "_actions_j8x9r_28"
|
|
6851
|
-
},
|
|
6853
|
+
}, wf = () => {
|
|
6852
6854
|
let e = v(null);
|
|
6853
6855
|
return h(() => {
|
|
6854
6856
|
e.current && (e.current(), e.current = null);
|
|
6855
6857
|
}), (t) => {
|
|
6856
6858
|
e.current = t;
|
|
6857
6859
|
};
|
|
6858
|
-
},
|
|
6860
|
+
}, Tf = (e) => {
|
|
6859
6861
|
let t = v(void 0);
|
|
6860
6862
|
return f(() => {
|
|
6861
6863
|
t.current = e;
|
|
6862
6864
|
}, [e]), t.current;
|
|
6863
|
-
},
|
|
6865
|
+
}, Ef = (e, t) => {
|
|
6864
6866
|
let n = t == null ? void 0 : t[e];
|
|
6865
6867
|
if (!n) {
|
|
6866
6868
|
var r;
|
|
6867
6869
|
return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = Or(e)) == null ? "" : r;
|
|
6868
6870
|
}
|
|
6869
6871
|
return n;
|
|
6870
|
-
},
|
|
6872
|
+
}, Df = /* @__PURE__ */ function(e) {
|
|
6871
6873
|
return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
|
|
6872
|
-
}({}),
|
|
6874
|
+
}({}), Of = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), kf = (e) => {
|
|
6873
6875
|
if (!e) return !1;
|
|
6874
6876
|
let t = fr(e);
|
|
6875
6877
|
return !or.includes(t);
|
|
6876
|
-
},
|
|
6878
|
+
}, Af = ({ value: e, unitkey: t, toUnit: n }) => {
|
|
6877
6879
|
var r;
|
|
6878
6880
|
let i = ar[t];
|
|
6879
6881
|
if (!i || i.length === 0 || !((r = kr(e)) != null && r.valid) || !i.includes(n)) return !1;
|
|
6880
6882
|
let a = fr(String(e));
|
|
6881
6883
|
return !(a && !i.includes(a));
|
|
6882
|
-
},
|
|
6884
|
+
}, jf = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
|
|
6883
6885
|
var o;
|
|
6884
6886
|
let s = vr(e) ? mr(e) : e, c = [Infinity, -Infinity].includes(Number(s));
|
|
6885
6887
|
if (i || c) return {
|
|
@@ -6899,13 +6901,13 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6899
6901
|
value: void 0,
|
|
6900
6902
|
error: "Source unit is missing"
|
|
6901
6903
|
};
|
|
6902
|
-
if (
|
|
6904
|
+
if (Of(s)) return {
|
|
6903
6905
|
value: void 0,
|
|
6904
6906
|
error: "Value is invalid for conversion"
|
|
6905
6907
|
};
|
|
6906
6908
|
try {
|
|
6907
6909
|
let e = jr(s, l);
|
|
6908
|
-
if (
|
|
6910
|
+
if (Af({
|
|
6909
6911
|
value: e,
|
|
6910
6912
|
toUnit: n,
|
|
6911
6913
|
unitkey: t
|
|
@@ -6926,13 +6928,13 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6926
6928
|
error: "Conversion not possible"
|
|
6927
6929
|
};
|
|
6928
6930
|
}
|
|
6929
|
-
},
|
|
6930
|
-
let a = mr(e), o =
|
|
6931
|
-
return !
|
|
6931
|
+
}, Mf = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
|
|
6932
|
+
let a = mr(e), o = Of(a);
|
|
6933
|
+
return !Af({
|
|
6932
6934
|
value: e,
|
|
6933
6935
|
unitkey: n,
|
|
6934
6936
|
toUnit: t
|
|
6935
|
-
}) ||
|
|
6937
|
+
}) || kf(e) || o ? { value: a } : vr(e) ? jf({
|
|
6936
6938
|
value: e,
|
|
6937
6939
|
unitkey: n,
|
|
6938
6940
|
toUnit: t,
|
|
@@ -6940,25 +6942,25 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6940
6942
|
doNotConvertValue: i,
|
|
6941
6943
|
exactPrecision: !0
|
|
6942
6944
|
}) : { value: e };
|
|
6943
|
-
},
|
|
6945
|
+
}, Nf = (e) => gn(e) && !cn(e) && !pn(e) ? sn(e, "fieldName", "") : typeof e == "string" ? e : "", Pf = (e = "") => or == null ? void 0 : or.includes(e), Ff = (e, t) => {
|
|
6944
6946
|
let n = fr(e || "");
|
|
6945
|
-
return
|
|
6946
|
-
},
|
|
6947
|
-
|
|
6948
|
-
},
|
|
6947
|
+
return Pf(t) && Pf(n);
|
|
6948
|
+
}, If = i(null), Lf = () => d(If), Rf = !1, zf = (e) => {
|
|
6949
|
+
Rf || (Rf = !0, If = e);
|
|
6950
|
+
}, Bf = (e) => gr(e) ? e : br(e), Vf = {
|
|
6949
6951
|
predefinedMenuActive: "_predefinedMenuActive_ye9w9_1",
|
|
6950
6952
|
inputWrapper: "_inputWrapper_ye9w9_4"
|
|
6951
|
-
},
|
|
6953
|
+
}, Hf = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUnit: r = !1, error: i = null, left: a = !1, small: o = !1, width: s = "100%", value: c, unitkey: l = "", initUnit: u, noConversion: d = !1, onChange: p = bn, onClick: m = bn, onFocus: h = bn, onSwitchUnit: _ = bn, unitTemplate: v, testId: b, warning: T = null, predefinedOptions: E, initialPredefinedOption: D = !1, shouldLinkAutomaticly: O = !0, selectedPredefinedOptionKey: k, validationCallback: A = () => ({
|
|
6952
6954
|
name: "",
|
|
6953
6955
|
error: null
|
|
6954
6956
|
}), disabledValidation: j = !1, allowEmpty: M = !1, convertBackToStorageUnit: N = !1, enableCosmeticRounding: P = !0, enableDisplayRounding: F = !1, roundDisplayValue: I, selectOnFocus: L = !0, groupOrder: R, tooltip: z = null }) => {
|
|
6955
|
-
let B =
|
|
6957
|
+
let B = Lf(), ee = wf();
|
|
6956
6958
|
typeof c == "number" && (c = `${c}`);
|
|
6957
|
-
let [te = "", ne = ""] = c === void 0 ? [] : wr(c), V = g(() =>
|
|
6959
|
+
let [te = "", ne = ""] = c === void 0 ? [] : wr(c), V = g(() => Ef(l, v || (B == null ? void 0 : B.unitTemplate)), [
|
|
6958
6960
|
l,
|
|
6959
6961
|
v,
|
|
6960
6962
|
B == null ? void 0 : B.unitTemplate
|
|
6961
|
-
]), re =
|
|
6963
|
+
]), re = Ff(c, V), ie = u || V || ne, ae = Tf(ie), { value: oe } = Mf({
|
|
6962
6964
|
value: c,
|
|
6963
6965
|
toUnit: ie,
|
|
6964
6966
|
unitkey: l,
|
|
@@ -6970,10 +6972,10 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6970
6972
|
} : {
|
|
6971
6973
|
value: oe,
|
|
6972
6974
|
unit: ie
|
|
6973
|
-
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = y(D ?
|
|
6975
|
+
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = y(D ? Df.PREDEFINED : Df.CUSTOM), fe = !!(j || n), pe = E && E.find((e) => {
|
|
6974
6976
|
if (!(e != null && e.value)) return;
|
|
6975
6977
|
if (k) return k === e.valueKey;
|
|
6976
|
-
let t = vr(e.value) ? fr(e.value) : "", { value: n = c } =
|
|
6978
|
+
let t = vr(e.value) ? fr(e.value) : "", { value: n = c } = jf({
|
|
6977
6979
|
value: String(c),
|
|
6978
6980
|
unitkey: l,
|
|
6979
6981
|
toUnit: t
|
|
@@ -6982,7 +6984,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6982
6984
|
}), me = () => {
|
|
6983
6985
|
var e;
|
|
6984
6986
|
let t = (e = c) == null ? "" : e, n = se.unit;
|
|
6985
|
-
if (!
|
|
6987
|
+
if (!Af({
|
|
6986
6988
|
value: t,
|
|
6987
6989
|
unitkey: l,
|
|
6988
6990
|
toUnit: n
|
|
@@ -6997,7 +6999,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
6997
6999
|
return null;
|
|
6998
7000
|
}
|
|
6999
7001
|
}, he = (t) => {
|
|
7000
|
-
let n =
|
|
7002
|
+
let n = Nf(e), r = t.target, { value: i, selectionStart: a } = r, o = jr(i, (se == null ? void 0 : se.unit) || "");
|
|
7001
7003
|
p({ target: {
|
|
7002
7004
|
value: N ? jr(lr(o, ne), ne) : o,
|
|
7003
7005
|
name: n
|
|
@@ -7019,7 +7021,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7019
7021
|
if (ie) {
|
|
7020
7022
|
let e, t = "";
|
|
7021
7023
|
if (ae !== ie) {
|
|
7022
|
-
let { value: n } =
|
|
7024
|
+
let { value: n } = Mf({
|
|
7023
7025
|
value: c,
|
|
7024
7026
|
toUnit: ie,
|
|
7025
7027
|
unitkey: l,
|
|
@@ -7028,7 +7030,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7028
7030
|
});
|
|
7029
7031
|
e = n, t = ie;
|
|
7030
7032
|
} else if (jr(se.value, se.unit) !== c) {
|
|
7031
|
-
let { value: n } =
|
|
7033
|
+
let { value: n } = Mf({
|
|
7032
7034
|
value: c,
|
|
7033
7035
|
toUnit: se.unit,
|
|
7034
7036
|
unitkey: l,
|
|
@@ -7040,7 +7042,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7040
7042
|
e !== void 0 && ce({
|
|
7041
7043
|
value: e,
|
|
7042
7044
|
unit: t
|
|
7043
|
-
}), de(E && pe && O ?
|
|
7045
|
+
}), de(E && pe && O ? Df.PREDEFINED : Df.CUSTOM);
|
|
7044
7046
|
}
|
|
7045
7047
|
}, [
|
|
7046
7048
|
ie,
|
|
@@ -7048,14 +7050,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7048
7050
|
i,
|
|
7049
7051
|
O
|
|
7050
7052
|
]);
|
|
7051
|
-
let _e = me(), ve = yr(se.unit) || se.unit || "", ye = d || !_e || _e && _e.length === 1, be =
|
|
7053
|
+
let _e = me(), ve = yr(se.unit) || se.unit || "", ye = d || !_e || _e && _e.length === 1, be = Nf(e), xe, Se = (t) => {
|
|
7052
7054
|
let r = t != null && t.value ? t.value : "", [i = "", a = ""] = vr(r) ? wr(r) : [r], o = Ar(r);
|
|
7053
|
-
if (
|
|
7055
|
+
if (Af({
|
|
7054
7056
|
value: r,
|
|
7055
7057
|
unitkey: l,
|
|
7056
7058
|
toUnit: a
|
|
7057
7059
|
})) {
|
|
7058
|
-
let { value: e = "" } =
|
|
7060
|
+
let { value: e = "" } = Mf({
|
|
7059
7061
|
value: r,
|
|
7060
7062
|
toUnit: V,
|
|
7061
7063
|
unitkey: l,
|
|
@@ -7068,7 +7070,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7068
7070
|
type: Qa.OPTION,
|
|
7069
7071
|
inline: !0,
|
|
7070
7072
|
onClick: () => {
|
|
7071
|
-
kr(i).valid && !n && (de(
|
|
7073
|
+
kr(i).valid && !n && (de(Df.PREDEFINED), p({ target: {
|
|
7072
7074
|
value: r,
|
|
7073
7075
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || "",
|
|
7074
7076
|
predefinedSelected: !0,
|
|
@@ -7080,27 +7082,27 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7080
7082
|
height: "0"
|
|
7081
7083
|
})] }),
|
|
7082
7084
|
description: o,
|
|
7083
|
-
selected: pe === t && ue ===
|
|
7085
|
+
selected: pe === t && ue === Df.PREDEFINED
|
|
7084
7086
|
};
|
|
7085
7087
|
};
|
|
7086
7088
|
if (xe = [{
|
|
7087
7089
|
type: Qa.OPTION,
|
|
7088
7090
|
inline: !0,
|
|
7089
7091
|
onClick: () => {
|
|
7090
|
-
ue !==
|
|
7092
|
+
ue !== Df.CUSTOM && !n && p({ target: {
|
|
7091
7093
|
value: jr(se.value, se.unit),
|
|
7092
7094
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || ""
|
|
7093
7095
|
} });
|
|
7094
7096
|
},
|
|
7095
7097
|
label: "Custom",
|
|
7096
|
-
selected: ue ===
|
|
7098
|
+
selected: ue === Df.CUSTOM
|
|
7097
7099
|
}], E != null && E.length) {
|
|
7098
7100
|
let e = E.map(Se);
|
|
7099
7101
|
xe = [...xe, ...e];
|
|
7100
7102
|
}
|
|
7101
7103
|
let Ce = (e) => {
|
|
7102
7104
|
if (vr(e)) {
|
|
7103
|
-
let t = fr(e), { value: n } =
|
|
7105
|
+
let t = fr(e), { value: n } = Mf({
|
|
7104
7106
|
value: e,
|
|
7105
7107
|
toUnit: se.unit,
|
|
7106
7108
|
unitkey: l,
|
|
@@ -7112,7 +7114,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7112
7114
|
return e;
|
|
7113
7115
|
}, we = !E && (!R || R === H.FIRST) ? H.FIRST : H.MIDDLE, Te = !R || R === H.LAST ? H.LAST : H.MIDDLE;
|
|
7114
7116
|
return /* @__PURE__ */ C("div", {
|
|
7115
|
-
className: ue ===
|
|
7117
|
+
className: ue === Df.PREDEFINED ? x(Vf.predefinedMenuActive) : "",
|
|
7116
7118
|
children: /* @__PURE__ */ w(bs, {
|
|
7117
7119
|
small: o,
|
|
7118
7120
|
width: s,
|
|
@@ -7127,18 +7129,18 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7127
7129
|
trigger: "Component",
|
|
7128
7130
|
component: /* @__PURE__ */ C(q, {
|
|
7129
7131
|
groupOrder: "first",
|
|
7130
|
-
active: ue ===
|
|
7131
|
-
icon: ue ===
|
|
7132
|
+
active: ue === Df.PREDEFINED,
|
|
7133
|
+
icon: ue === Df.PREDEFINED ? "link" : "unlink",
|
|
7132
7134
|
small: o
|
|
7133
7135
|
}),
|
|
7134
7136
|
small: o,
|
|
7135
7137
|
sections: xe
|
|
7136
7138
|
},
|
|
7137
|
-
tooltip: ue ===
|
|
7139
|
+
tooltip: ue === Df.PREDEFINED ? pe == null ? void 0 : pe.label : ""
|
|
7138
7140
|
}),
|
|
7139
7141
|
/* @__PURE__ */ C("div", {
|
|
7140
|
-
className:
|
|
7141
|
-
children: /* @__PURE__ */ C(
|
|
7142
|
+
className: Vf.inputWrapper,
|
|
7143
|
+
children: /* @__PURE__ */ C(bl, {
|
|
7142
7144
|
name: be,
|
|
7143
7145
|
testId: b,
|
|
7144
7146
|
disabled: n,
|
|
@@ -7161,7 +7163,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7161
7163
|
tooltip: z
|
|
7162
7164
|
}, be)
|
|
7163
7165
|
}),
|
|
7164
|
-
ve && (ye || !re ? /* @__PURE__ */ C(
|
|
7166
|
+
ve && (ye || !re ? /* @__PURE__ */ C(sl, {
|
|
7165
7167
|
groupOrder: Te,
|
|
7166
7168
|
small: o,
|
|
7167
7169
|
children: ve
|
|
@@ -7179,7 +7181,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7179
7181
|
let r = n || t || "", i = _r(e) ? e : "";
|
|
7180
7182
|
return {
|
|
7181
7183
|
type: "Option",
|
|
7182
|
-
label: P ?
|
|
7184
|
+
label: P ? Bf(i) : i,
|
|
7183
7185
|
inline: !0,
|
|
7184
7186
|
onClick: (n) => {
|
|
7185
7187
|
n.stopPropagation(), ge(e, t);
|
|
@@ -7194,10 +7196,10 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7194
7196
|
]
|
|
7195
7197
|
})
|
|
7196
7198
|
});
|
|
7197
|
-
},
|
|
7199
|
+
}, Uf = (e, t) => ({ target: {
|
|
7198
7200
|
name: e,
|
|
7199
7201
|
value: t
|
|
7200
|
-
} }),
|
|
7202
|
+
} }), Wf = (e) => `Value cannot be less than ${e}`, Gf = (e) => `Value cannot be greater than ${e}`, Kf = ({ name: e = "", value: t, min: n, max: r, label: i, step: a = .01, onChange: o, onChangeComplete: s, preferredUnit: c = "m", onSwitchUnit: l, enableEditUnitInput: u = !1, disabled: d = !1, showUnitInput: p = !0, showArrows: m = !0, unitkey: h = "length", testId: g, noConversion: _ = !1, small: v = !1, marks: b, minErrorMessage: S = Wf, maxErrorMessage: T = Gf }) => {
|
|
7201
7203
|
let E = jr(t, c), [D, O] = y(E), [k, A] = y(!1), [j, M] = y(c);
|
|
7202
7204
|
f(() => {
|
|
7203
7205
|
k || O(E);
|
|
@@ -7215,7 +7217,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7215
7217
|
}, z = () => {
|
|
7216
7218
|
O(E), A(!1);
|
|
7217
7219
|
}, B = () => {
|
|
7218
|
-
L || I === null || (o(
|
|
7220
|
+
L || I === null || (o(Uf(e, I)), s == null || s(Uf(e, I)), A(!1));
|
|
7219
7221
|
}, ee = (e) => {
|
|
7220
7222
|
M(e), l == null || l(e);
|
|
7221
7223
|
}, te = (e) => {
|
|
@@ -7230,7 +7232,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7230
7232
|
}, ne = (e) => {
|
|
7231
7233
|
e.key === "Enter" && B(), e.key === "Escape" && z();
|
|
7232
7234
|
}, V = d || k, re = /* @__PURE__ */ w("div", {
|
|
7233
|
-
className:
|
|
7235
|
+
className: Cf.actions,
|
|
7234
7236
|
children: [/* @__PURE__ */ C(q, {
|
|
7235
7237
|
icon: "close",
|
|
7236
7238
|
small: !0,
|
|
@@ -7245,18 +7247,18 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7245
7247
|
})]
|
|
7246
7248
|
});
|
|
7247
7249
|
return /* @__PURE__ */ w("div", {
|
|
7248
|
-
className:
|
|
7250
|
+
className: Cf.wrapper,
|
|
7249
7251
|
"data-testid": g && `${g}-wrapper`,
|
|
7250
7252
|
children: [
|
|
7251
7253
|
i && /* @__PURE__ */ C("span", {
|
|
7252
|
-
className:
|
|
7254
|
+
className: Cf.label,
|
|
7253
7255
|
children: /* @__PURE__ */ C(ns, {
|
|
7254
7256
|
small: v,
|
|
7255
7257
|
children: i
|
|
7256
7258
|
})
|
|
7257
7259
|
}),
|
|
7258
7260
|
p && /* @__PURE__ */ C("div", {
|
|
7259
|
-
className: x(
|
|
7261
|
+
className: x(Cf.input, v && Cf.inputSmall, u && !d && Cf.editable),
|
|
7260
7262
|
children: /* @__PURE__ */ C(ko, {
|
|
7261
7263
|
content: re,
|
|
7262
7264
|
isOpen: k,
|
|
@@ -7270,11 +7272,11 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7270
7272
|
testId: g && `${g}-edit-popover`,
|
|
7271
7273
|
toggleOnTriggerClick: !1,
|
|
7272
7274
|
children: /* @__PURE__ */ C("div", {
|
|
7273
|
-
className:
|
|
7275
|
+
className: Cf.inputControl,
|
|
7274
7276
|
"data-testid": g && `${g}-edit-trigger`,
|
|
7275
7277
|
onClick: R,
|
|
7276
7278
|
onKeyDown: ne,
|
|
7277
|
-
children: /* @__PURE__ */ C(
|
|
7279
|
+
children: /* @__PURE__ */ C(Hf, {
|
|
7278
7280
|
name: e,
|
|
7279
7281
|
value: k ? D : E,
|
|
7280
7282
|
unitkey: h,
|
|
@@ -7291,7 +7293,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7291
7293
|
})
|
|
7292
7294
|
})
|
|
7293
7295
|
}),
|
|
7294
|
-
/* @__PURE__ */ C(
|
|
7296
|
+
/* @__PURE__ */ C(Al, {
|
|
7295
7297
|
name: e,
|
|
7296
7298
|
value: t,
|
|
7297
7299
|
min: n,
|
|
@@ -7309,7 +7311,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7309
7311
|
})
|
|
7310
7312
|
]
|
|
7311
7313
|
});
|
|
7312
|
-
},
|
|
7314
|
+
}, qf = ({ label: e, invalid: t, badge: n }) => t ? /* @__PURE__ */ C(lo, {
|
|
7313
7315
|
small: !0,
|
|
7314
7316
|
margin: "-4px",
|
|
7315
7317
|
color: "var(--color-text-error)",
|
|
@@ -7320,7 +7322,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7320
7322
|
margin: "-4px",
|
|
7321
7323
|
title: n == null ? void 0 : n.toString(),
|
|
7322
7324
|
children: e
|
|
7323
|
-
}) : /* @__PURE__ */ C(S, { children: e }),
|
|
7325
|
+
}) : /* @__PURE__ */ C(S, { children: e }), Jf = {
|
|
7324
7326
|
tabs: "_tabs_vkne2_1",
|
|
7325
7327
|
padding: "_padding_vkne2_7",
|
|
7326
7328
|
margin: "_margin_vkne2_11",
|
|
@@ -7329,8 +7331,8 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7329
7331
|
left: "_left_vkne2_64",
|
|
7330
7332
|
right: "_right_vkne2_64",
|
|
7331
7333
|
selectionIndicator: "_selectionIndicator_vkne2_67"
|
|
7332
|
-
},
|
|
7333
|
-
let c = d(W), { simpleInputs: l, options: u, selectedOptions: f } =
|
|
7334
|
+
}, Yf = ({ name: e = void 0, options: t = null, value: n = void 0, onChange: r = bn, padding: i = !1, margin: a = !0, testId: o, linkComponent: s }) => {
|
|
7335
|
+
let c = d(W), { simpleInputs: l, options: u, selectedOptions: f } = el(t, n), p = mn(f) ? void 0 : l ? f : f.value, m = (e) => {
|
|
7334
7336
|
var t;
|
|
7335
7337
|
return (t = e.component) == null ? s : t;
|
|
7336
7338
|
}, h = (e) => !!(e.to && m(e)), g = (t) => {
|
|
@@ -7355,7 +7357,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7355
7357
|
...p ? { href: p } : {},
|
|
7356
7358
|
shouldSelectOnPressUp: !0,
|
|
7357
7359
|
isDisabled: i || c,
|
|
7358
|
-
className: x(
|
|
7360
|
+
className: x(Jf.item, o ? Jf.right : Jf.left),
|
|
7359
7361
|
"data-testid": u,
|
|
7360
7362
|
render: d && f ? (e) => "href" in e ? /* @__PURE__ */ C(f, {
|
|
7361
7363
|
...e,
|
|
@@ -7365,11 +7367,11 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7365
7367
|
(n = e.onClick) == null || n.call(e, t), v(t, a);
|
|
7366
7368
|
}
|
|
7367
7369
|
}) : /* @__PURE__ */ C("div", { ...e }) : void 0,
|
|
7368
|
-
children: [/* @__PURE__ */ C(
|
|
7370
|
+
children: [/* @__PURE__ */ C(qf, {
|
|
7369
7371
|
label: t,
|
|
7370
7372
|
invalid: s,
|
|
7371
7373
|
badge: l
|
|
7372
|
-
}), /* @__PURE__ */ C(Si, { className:
|
|
7374
|
+
}), /* @__PURE__ */ C(Si, { className: Jf.selectionIndicator })]
|
|
7373
7375
|
}, a);
|
|
7374
7376
|
};
|
|
7375
7377
|
if (u) {
|
|
@@ -7379,7 +7381,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7379
7381
|
"data-testid": o,
|
|
7380
7382
|
children: /* @__PURE__ */ C(wi, {
|
|
7381
7383
|
"aria-label": e == null ? "Tabs" : e,
|
|
7382
|
-
className: x(
|
|
7384
|
+
className: x(Jf.tabs, i ? Jf.padding : "", a ? Jf.margin : ""),
|
|
7383
7385
|
children: y.map(S)
|
|
7384
7386
|
})
|
|
7385
7387
|
});
|
|
@@ -7389,7 +7391,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7389
7391
|
}) : t;
|
|
7390
7392
|
}
|
|
7391
7393
|
return null;
|
|
7392
|
-
},
|
|
7394
|
+
}, Xf = ({ children: e, href: t = void 0, target: n = void 0, testId: r, onClick: i, component: a = "a" }) => /* @__PURE__ */ C(a, {
|
|
7393
7395
|
href: t,
|
|
7394
7396
|
to: t,
|
|
7395
7397
|
target: n,
|
|
@@ -7399,7 +7401,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7399
7401
|
link: !0,
|
|
7400
7402
|
children: e
|
|
7401
7403
|
})
|
|
7402
|
-
}),
|
|
7404
|
+
}), Zf = {
|
|
7403
7405
|
inputInTable: "_inputInTable_qbe2o_1",
|
|
7404
7406
|
inputHover: "_inputHover_qbe2o_13",
|
|
7405
7407
|
inputFocus: "_inputFocus_qbe2o_18",
|
|
@@ -7411,9 +7413,9 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7411
7413
|
textarea: "_textarea_qbe2o_81",
|
|
7412
7414
|
small: "_small_qbe2o_120",
|
|
7413
7415
|
monospace: "_monospace_qbe2o_159"
|
|
7414
|
-
},
|
|
7416
|
+
}, Qf = ({ name: e, value: t = "", placeholder: n = "", cols: r, rows: i, disabled: a = !1, onChange: o = bn, onKeyPress: s = bn, onFocus: c = bn, onBlur: l = bn, tabIndex: u = 0, error: f = null, warning: p = null, tooltip: m = null, maxTooltipWidth: h, resize: g, monospace: _ = !1, small: v = !1, testId: y }) => {
|
|
7415
7417
|
let b = d(W), S = /* @__PURE__ */ C("textarea", {
|
|
7416
|
-
className: x(
|
|
7418
|
+
className: x(Zf.textarea, f ? Zf.error : "", p ? Zf.warning : "", _ ? Zf.monospace : "", v ? Zf.small : ""),
|
|
7417
7419
|
name: e,
|
|
7418
7420
|
value: t,
|
|
7419
7421
|
placeholder: n,
|
|
@@ -7455,10 +7457,10 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7455
7457
|
menu: "_menu_oyr59_139",
|
|
7456
7458
|
active: "_active_oyr59_168",
|
|
7457
7459
|
alert: "_alert_oyr59_193"
|
|
7458
|
-
},
|
|
7460
|
+
}, $f = ({ warning: e }) => /* @__PURE__ */ C("div", {
|
|
7459
7461
|
className: Q.alert,
|
|
7460
7462
|
children: e
|
|
7461
|
-
}),
|
|
7463
|
+
}), ep = ({ icon: e, url: t, onClick: n }) => {
|
|
7462
7464
|
let r = /* @__PURE__ */ C(G, { icon: e });
|
|
7463
7465
|
return t ? /* @__PURE__ */ C("a", {
|
|
7464
7466
|
href: t,
|
|
@@ -7470,7 +7472,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7470
7472
|
className: Q.appSwitcher,
|
|
7471
7473
|
children: r
|
|
7472
7474
|
});
|
|
7473
|
-
},
|
|
7475
|
+
}, tp = ({ label: e, logo: t, url: n, version: r, onClick: i }) => {
|
|
7474
7476
|
let a = /* @__PURE__ */ w("div", {
|
|
7475
7477
|
className: Q.title,
|
|
7476
7478
|
children: [
|
|
@@ -7499,9 +7501,9 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7499
7501
|
children: a
|
|
7500
7502
|
})
|
|
7501
7503
|
});
|
|
7502
|
-
},
|
|
7504
|
+
}, np = /* @__PURE__ */ function(e) {
|
|
7503
7505
|
return e.LINK = "Link", e.BUTTON = "Button", e.MENU = "Menu", e.COMPONENT = "Component", e;
|
|
7504
|
-
}({}),
|
|
7506
|
+
}({}), rp = ({ label: e, url: t, icon: n, onClick: r, active: i, disabled: a, testId: o, component: s = "a" }) => {
|
|
7505
7507
|
let c = d(W);
|
|
7506
7508
|
return /* @__PURE__ */ w(s, {
|
|
7507
7509
|
className: x(Q.link, i ? Q.active : ""),
|
|
@@ -7518,11 +7520,11 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7518
7520
|
children: e
|
|
7519
7521
|
})]
|
|
7520
7522
|
});
|
|
7521
|
-
},
|
|
7523
|
+
}, ip = ({ element: e }) => {
|
|
7522
7524
|
switch (e.type) {
|
|
7523
|
-
case
|
|
7525
|
+
case np.LINK: return /* @__PURE__ */ C("div", {
|
|
7524
7526
|
className: Q.item,
|
|
7525
|
-
children: /* @__PURE__ */ C(
|
|
7527
|
+
children: /* @__PURE__ */ C(rp, {
|
|
7526
7528
|
label: e.label,
|
|
7527
7529
|
url: e.url,
|
|
7528
7530
|
icon: e.icon,
|
|
@@ -7533,7 +7535,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7533
7535
|
component: e.component
|
|
7534
7536
|
})
|
|
7535
7537
|
});
|
|
7536
|
-
case
|
|
7538
|
+
case np.BUTTON: return /* @__PURE__ */ C("div", {
|
|
7537
7539
|
className: x(Q.item, Q.button),
|
|
7538
7540
|
children: /* @__PURE__ */ C(q, {
|
|
7539
7541
|
label: e.label,
|
|
@@ -7545,14 +7547,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7545
7547
|
testId: e.testId
|
|
7546
7548
|
})
|
|
7547
7549
|
});
|
|
7548
|
-
case
|
|
7550
|
+
case np.MENU: return /* @__PURE__ */ C("div", {
|
|
7549
7551
|
className: x(Q.item, Q.menu),
|
|
7550
7552
|
children: /* @__PURE__ */ C(_o, {
|
|
7551
7553
|
maxHeight: "100%",
|
|
7552
7554
|
menu: {
|
|
7553
7555
|
trigger: Ni.COMPONENT,
|
|
7554
7556
|
placement: "bottom-start",
|
|
7555
|
-
component: /* @__PURE__ */ C(
|
|
7557
|
+
component: /* @__PURE__ */ C(rp, {
|
|
7556
7558
|
label: e.label,
|
|
7557
7559
|
icon: e.icon,
|
|
7558
7560
|
onClick: e.onClick
|
|
@@ -7561,50 +7563,50 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7561
7563
|
}
|
|
7562
7564
|
})
|
|
7563
7565
|
});
|
|
7564
|
-
case
|
|
7566
|
+
case np.COMPONENT: return /* @__PURE__ */ C("div", {
|
|
7565
7567
|
className: Q.item,
|
|
7566
7568
|
children: e.component
|
|
7567
7569
|
});
|
|
7568
7570
|
default: return null;
|
|
7569
7571
|
}
|
|
7570
|
-
},
|
|
7572
|
+
}, ap = ({ title: e, appSwitcher: t, content: n = [], contentRight: r = [], warning: i = "", height: a = "var(--size-topbar)", fixedPosition: o = !0 }) => /* @__PURE__ */ w("div", { children: [i && /* @__PURE__ */ C($f, { warning: i }), /* @__PURE__ */ w("div", {
|
|
7571
7573
|
className: x(Q.topbar, o ? Q.fixed : ""),
|
|
7572
7574
|
style: { height: a },
|
|
7573
7575
|
children: [
|
|
7574
|
-
!!t && /* @__PURE__ */ C(
|
|
7576
|
+
!!t && /* @__PURE__ */ C(ep, {
|
|
7575
7577
|
icon: t.icon,
|
|
7576
7578
|
url: t.url,
|
|
7577
7579
|
onClick: t.onClick
|
|
7578
7580
|
}),
|
|
7579
7581
|
/* @__PURE__ */ w("div", {
|
|
7580
7582
|
className: Q.left,
|
|
7581
|
-
children: [e && /* @__PURE__ */ C(
|
|
7583
|
+
children: [e && /* @__PURE__ */ C(tp, {
|
|
7582
7584
|
label: e.label,
|
|
7583
7585
|
logo: e.logo,
|
|
7584
7586
|
url: e.url,
|
|
7585
7587
|
version: e.version,
|
|
7586
7588
|
onClick: e.onClick
|
|
7587
|
-
}), n.map((e, t) => e ? /* @__PURE__ */ C(
|
|
7589
|
+
}), n.map((e, t) => e ? /* @__PURE__ */ C(ip, { element: e }, t) : null)]
|
|
7588
7590
|
}),
|
|
7589
7591
|
/* @__PURE__ */ C("div", {
|
|
7590
7592
|
className: Q.right,
|
|
7591
|
-
children: r.map((e, t) => e ? /* @__PURE__ */ C(
|
|
7593
|
+
children: r.map((e, t) => e ? /* @__PURE__ */ C(ip, { element: e }, t) : null)
|
|
7592
7594
|
})
|
|
7593
7595
|
]
|
|
7594
|
-
})] }),
|
|
7596
|
+
})] }), op = {
|
|
7595
7597
|
popConfirm: "_popConfirm_1x6ye_1",
|
|
7596
7598
|
content: "_content_1x6ye_7",
|
|
7597
7599
|
buttons: "_buttons_1x6ye_13"
|
|
7598
|
-
},
|
|
7599
|
-
className:
|
|
7600
|
+
}, sp = ({ title: e, okText: t, onClickOk: n, disableConfirmButton: r, cancelText: i, onClickCancel: a, close: o, testId: s }) => /* @__PURE__ */ w("div", {
|
|
7601
|
+
className: op.popConfirm,
|
|
7600
7602
|
children: [e && /* @__PURE__ */ C("div", {
|
|
7601
|
-
className:
|
|
7603
|
+
className: op.content,
|
|
7602
7604
|
children: /* @__PURE__ */ C(ns, {
|
|
7603
7605
|
small: !0,
|
|
7604
7606
|
children: e
|
|
7605
7607
|
})
|
|
7606
7608
|
}), /* @__PURE__ */ w("div", {
|
|
7607
|
-
className:
|
|
7609
|
+
className: op.buttons,
|
|
7608
7610
|
children: [/* @__PURE__ */ C(q, {
|
|
7609
7611
|
small: !0,
|
|
7610
7612
|
colored: !0,
|
|
@@ -7619,8 +7621,8 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7619
7621
|
testId: `${s}-cancel-button`
|
|
7620
7622
|
})]
|
|
7621
7623
|
})]
|
|
7622
|
-
}),
|
|
7623
|
-
content: /* @__PURE__ */ C(
|
|
7624
|
+
}), cp = ({ children: e, placement: t = "top-center", closeOnOutsideClick: n = !0, fullWidth: r = !1, title: i = "", cancelText: a = "Cancel", onClickCancel: o = (e) => e && e(), okText: s = "Ok", onClickOk: c = () => {}, disableConfirmButton: l = !1, testId: u = void 0 }) => /* @__PURE__ */ C(ko, {
|
|
7625
|
+
content: /* @__PURE__ */ C(sp, {
|
|
7624
7626
|
title: i,
|
|
7625
7627
|
okText: s,
|
|
7626
7628
|
onClickOk: c,
|
|
@@ -7634,14 +7636,14 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7634
7636
|
fullWidth: r,
|
|
7635
7637
|
testId: u,
|
|
7636
7638
|
children: e
|
|
7637
|
-
}),
|
|
7639
|
+
}), lp = {
|
|
7638
7640
|
tree: "_tree_coxxe_1",
|
|
7639
7641
|
toggle: "_toggle_coxxe_8",
|
|
7640
7642
|
dropTarget: "_dropTarget_coxxe_15",
|
|
7641
7643
|
placeholder: "_placeholder_coxxe_30",
|
|
7642
7644
|
draggingSource: "_draggingSource_coxxe_36",
|
|
7643
7645
|
placeholderContainer: "_placeholderContainer_coxxe_39"
|
|
7644
|
-
},
|
|
7646
|
+
}, up = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
|
|
7645
7647
|
let { id: l, data: u } = t, { active: d, disabled: f, testId: p, onClick: m, actions: h = [] } = u, [g, _] = e.useState(!1), [v, y] = e.useState(0), b = (e) => {
|
|
7646
7648
|
e.stopPropagation(), i(l);
|
|
7647
7649
|
}, S = (e) => {
|
|
@@ -7668,7 +7670,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7668
7670
|
className: x(Z.itemHeader, g ? Z.noPointerEvents : ""),
|
|
7669
7671
|
children: [
|
|
7670
7672
|
a && /* @__PURE__ */ C("div", {
|
|
7671
|
-
className:
|
|
7673
|
+
className: lp.toggle,
|
|
7672
7674
|
children: /* @__PURE__ */ C(q, {
|
|
7673
7675
|
basic: !0,
|
|
7674
7676
|
colored: r ? !0 : Pi.MUTED,
|
|
@@ -7682,10 +7684,10 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7682
7684
|
className: Z.drag,
|
|
7683
7685
|
children: /* @__PURE__ */ C(G, { icon: U.DRAG })
|
|
7684
7686
|
}),
|
|
7685
|
-
/* @__PURE__ */ C(
|
|
7687
|
+
/* @__PURE__ */ C(Ed, { item: u }),
|
|
7686
7688
|
/* @__PURE__ */ w("div", {
|
|
7687
7689
|
className: Z.right,
|
|
7688
|
-
children: [/* @__PURE__ */ C(
|
|
7690
|
+
children: [/* @__PURE__ */ C(Dd, { item: u }), !f && h.length > 0 && /* @__PURE__ */ C("div", {
|
|
7689
7691
|
className: Z.actions,
|
|
7690
7692
|
children: /* @__PURE__ */ C(yo, { actions: h })
|
|
7691
7693
|
})]
|
|
@@ -7693,10 +7695,10 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7693
7695
|
]
|
|
7694
7696
|
})
|
|
7695
7697
|
});
|
|
7696
|
-
},
|
|
7697
|
-
className:
|
|
7698
|
+
}, dp = ({ depth: e, indent: t = "var(--size-sm)" }) => /* @__PURE__ */ C("div", {
|
|
7699
|
+
className: lp.placeholder,
|
|
7698
7700
|
style: { left: `calc(${t} * ${e})` }
|
|
7699
|
-
}),
|
|
7701
|
+
}), fp = ({ list: e, canDrop: t, draggable: n = !1, onListReorder: r, onChangeOpen: i, testId: a, isInitialOpen: o = !1, autoOpenActiveItems: s = !1, treeRef: c, itemHasChild: l, onItemToggle: u, icons: d, allowParentReassignment: p, stickyHeader: m, height: h, render: g, placeholderIndent: _ }) => {
|
|
7700
7702
|
var y;
|
|
7701
7703
|
let b = c == null ? v(null) : c, x = (e) => {
|
|
7702
7704
|
i && i(e);
|
|
@@ -7754,7 +7756,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7754
7756
|
"data-testid": a,
|
|
7755
7757
|
className: Z.list,
|
|
7756
7758
|
style: { height: h },
|
|
7757
|
-
children: [e.name && !e.noHeader && /* @__PURE__ */ C(
|
|
7759
|
+
children: [e.name && !e.noHeader && /* @__PURE__ */ C(Cd, {
|
|
7758
7760
|
name: e.name,
|
|
7759
7761
|
actions: e.actions,
|
|
7760
7762
|
stickyHeader: m
|
|
@@ -7781,7 +7783,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7781
7783
|
hasChild: r,
|
|
7782
7784
|
isOpen: a,
|
|
7783
7785
|
onToggle: o
|
|
7784
|
-
}) : /* @__PURE__ */ C(
|
|
7786
|
+
}) : /* @__PURE__ */ C(up, {
|
|
7785
7787
|
hasChild: l ? l(e) : r,
|
|
7786
7788
|
node: e,
|
|
7787
7789
|
depth: t,
|
|
@@ -7797,7 +7799,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7797
7799
|
onDrop: A,
|
|
7798
7800
|
onChangeOpen: x,
|
|
7799
7801
|
dropTargetOffset: 10,
|
|
7800
|
-
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ C(
|
|
7802
|
+
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ C(dp, {
|
|
7801
7803
|
depth: t,
|
|
7802
7804
|
indent: _
|
|
7803
7805
|
}),
|
|
@@ -7805,17 +7807,17 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7805
7807
|
listComponent: "div",
|
|
7806
7808
|
listItemComponent: "div",
|
|
7807
7809
|
classes: {
|
|
7808
|
-
root:
|
|
7809
|
-
draggingSource:
|
|
7810
|
-
dropTarget:
|
|
7811
|
-
placeholder:
|
|
7810
|
+
root: lp.tree,
|
|
7811
|
+
draggingSource: lp.draggingSource,
|
|
7812
|
+
dropTarget: lp.dropTarget,
|
|
7813
|
+
placeholder: lp.placeholderContainer
|
|
7812
7814
|
},
|
|
7813
7815
|
initialOpen: o,
|
|
7814
7816
|
enableAnimateExpand: !0
|
|
7815
7817
|
})
|
|
7816
7818
|
})]
|
|
7817
7819
|
});
|
|
7818
|
-
},
|
|
7820
|
+
}, pp = {
|
|
7819
7821
|
treeTable: "_treeTable_1ywvy_1",
|
|
7820
7822
|
treeTableHeader: "_treeTableHeader_1ywvy_22",
|
|
7821
7823
|
folderCell: "_folderCell_1ywvy_30",
|
|
@@ -7823,48 +7825,48 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7823
7825
|
drag: "_drag_1ywvy_31",
|
|
7824
7826
|
folder: "_folder_1ywvy_30",
|
|
7825
7827
|
active: "_active_1ywvy_61"
|
|
7826
|
-
},
|
|
7828
|
+
}, mp = (e, t) => e.filter((e) => e.parent === t).flatMap((t) => [t.id, ...mp(e, t.id)]), hp = (e, t) => {
|
|
7827
7829
|
let n = new Set(t);
|
|
7828
7830
|
return e.filter((e) => !n.has(e.id)).map((e) => e.id);
|
|
7829
|
-
},
|
|
7831
|
+
}, gp = (e, t, n) => e.filter((e) => n.has(e) || !t.has(e)), _p = (e, t, n, r = []) => {
|
|
7830
7832
|
let i = new Set(n), a = new Set(r), o = e.filter((e) => e.parent === t && !a.has(e.id));
|
|
7831
7833
|
if (o.length === 0) return {
|
|
7832
7834
|
checked: i.has(t),
|
|
7833
7835
|
indeterminate: !1
|
|
7834
7836
|
};
|
|
7835
|
-
let s = o.map((t) =>
|
|
7837
|
+
let s = o.map((t) => _p(e, t.id, n, r)), c = s.filter((e) => e.checked).length, l = s.filter((e) => e.indeterminate).length, u = c === o.length;
|
|
7836
7838
|
return {
|
|
7837
7839
|
checked: u,
|
|
7838
7840
|
indeterminate: c + l > 0 && !u
|
|
7839
7841
|
};
|
|
7840
|
-
},
|
|
7841
|
-
let r =
|
|
7842
|
+
}, vp = (e, t, n = []) => {
|
|
7843
|
+
let r = hp(e, n), i = new Set(t), a = r.filter((e) => i.has(e)).length;
|
|
7842
7844
|
return {
|
|
7843
7845
|
checked: r.length > 0 && a === r.length,
|
|
7844
7846
|
indeterminate: a > 0 && a < r.length
|
|
7845
7847
|
};
|
|
7846
|
-
},
|
|
7848
|
+
}, yp = i(null), bp = () => d(yp), xp = ({ children: e, rowCheckboxes: t, rows: n }) => {
|
|
7847
7849
|
let r = t !== void 0, { checkedIds: i = [], disabledIds: a = [], getTooltip: o, onChange: s } = t == null ? {} : t, c = g(() => new Set(a), [a]), l = g(() => {
|
|
7848
7850
|
if (!r) return null;
|
|
7849
7851
|
let e = /* @__PURE__ */ new Map();
|
|
7850
|
-
for (let t of n) e.set(t.id,
|
|
7852
|
+
for (let t of n) e.set(t.id, _p(n, t.id, i, a));
|
|
7851
7853
|
return e;
|
|
7852
7854
|
}, [
|
|
7853
7855
|
i,
|
|
7854
7856
|
a,
|
|
7855
7857
|
r,
|
|
7856
7858
|
n
|
|
7857
|
-
]), d = g(() => r ?
|
|
7859
|
+
]), d = g(() => r ? vp(n, i, a) : void 0, [
|
|
7858
7860
|
i,
|
|
7859
7861
|
a,
|
|
7860
7862
|
r,
|
|
7861
7863
|
n
|
|
7862
7864
|
]), f = u((e) => l == null ? void 0 : l.get(e), [l]), p = u((e) => c.has(e), [c]), m = u((e) => o == null ? void 0 : o(e), [o]), h = u((e) => {
|
|
7863
7865
|
if (!r || c.has(e)) return;
|
|
7864
|
-
let t =
|
|
7866
|
+
let t = mp(n, e), o = [e, ...t.filter((e) => !c.has(e))], l = [e, ...t], { checked: u } = _p(n, e, i, a);
|
|
7865
7867
|
if (u) {
|
|
7866
7868
|
let e = new Set(l);
|
|
7867
|
-
s == null || s(
|
|
7869
|
+
s == null || s(gp(i, e, c));
|
|
7868
7870
|
} else s == null || s([.../* @__PURE__ */ new Set([...i, ...o])]);
|
|
7869
7871
|
}, [
|
|
7870
7872
|
i,
|
|
@@ -7875,7 +7877,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7875
7877
|
n
|
|
7876
7878
|
]), _ = u(() => {
|
|
7877
7879
|
if (!r) return;
|
|
7878
|
-
let e =
|
|
7880
|
+
let e = hp(n, a), { checked: t } = vp(n, i, a);
|
|
7879
7881
|
t ? s == null || s(i.filter((e) => c.has(e))) : s == null || s([.../* @__PURE__ */ new Set([...i, ...e])]);
|
|
7880
7882
|
}, [
|
|
7881
7883
|
i,
|
|
@@ -7901,12 +7903,12 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7901
7903
|
_,
|
|
7902
7904
|
h
|
|
7903
7905
|
]);
|
|
7904
|
-
return /* @__PURE__ */ C(
|
|
7906
|
+
return /* @__PURE__ */ C(yp.Provider, {
|
|
7905
7907
|
value: v,
|
|
7906
7908
|
children: e
|
|
7907
7909
|
});
|
|
7908
|
-
},
|
|
7909
|
-
let h =
|
|
7910
|
+
}, Sp = ({ 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 }) => {
|
|
7911
|
+
let h = bp(), g = h != null && h.enabled ? h.getRowCheckState(l.id) : void 0, _ = g == null ? void 0 : g.checked, v = g == null ? void 0 : g.indeterminate, y = h == null ? void 0 : h.isRowCheckDisabled(l.id), b = h == null ? void 0 : h.enabled, { data: S, droppable: T } = l, { id: E, cells: D, testId: O, actions: k = [], active: A, onRowClick: j } = S, M = T || a, N = (e) => {
|
|
7910
7912
|
let r = t ? t[e] : void 0;
|
|
7911
7913
|
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${M ? n + 1 : n})`})` : r;
|
|
7912
7914
|
};
|
|
@@ -7919,12 +7921,12 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7919
7921
|
onDragLeave: f,
|
|
7920
7922
|
children: /* @__PURE__ */ C("tbody", { children: /* @__PURE__ */ w("tr", {
|
|
7921
7923
|
onClick: j,
|
|
7922
|
-
className: x(
|
|
7924
|
+
className: x(pp.treeTableRow, A ? pp.active : void 0),
|
|
7923
7925
|
children: [
|
|
7924
|
-
b && /* @__PURE__ */ C(
|
|
7926
|
+
b && /* @__PURE__ */ C(Wl, {
|
|
7925
7927
|
isHeader: !1,
|
|
7926
7928
|
cell: {
|
|
7927
|
-
type:
|
|
7929
|
+
type: Ul.CHECKBOX,
|
|
7928
7930
|
checked: _,
|
|
7929
7931
|
disabled: y,
|
|
7930
7932
|
indeterminate: v,
|
|
@@ -7933,19 +7935,19 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7933
7935
|
}
|
|
7934
7936
|
}),
|
|
7935
7937
|
r && /* @__PURE__ */ C("td", {
|
|
7936
|
-
className:
|
|
7938
|
+
className: pp.dragCell,
|
|
7937
7939
|
children: /* @__PURE__ */ C("div", {
|
|
7938
|
-
className:
|
|
7940
|
+
className: pp.drag,
|
|
7939
7941
|
onClick: (e) => e.stopPropagation(),
|
|
7940
7942
|
ref: i,
|
|
7941
7943
|
children: /* @__PURE__ */ C(G, { icon: U.DRAG })
|
|
7942
7944
|
})
|
|
7943
7945
|
}),
|
|
7944
|
-
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ C("td", { className:
|
|
7946
|
+
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ C("td", { className: pp.folderCell }, t)),
|
|
7945
7947
|
M && /* @__PURE__ */ C("td", {
|
|
7946
|
-
className:
|
|
7948
|
+
className: pp.folderCell,
|
|
7947
7949
|
children: /* @__PURE__ */ C("div", {
|
|
7948
|
-
className:
|
|
7950
|
+
className: pp.folder,
|
|
7949
7951
|
onClick: () => m(E),
|
|
7950
7952
|
onMouseDown: (e) => e.stopPropagation(),
|
|
7951
7953
|
children: /* @__PURE__ */ C(q, {
|
|
@@ -7960,73 +7962,73 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
7960
7962
|
}),
|
|
7961
7963
|
D.map((t, n) => {
|
|
7962
7964
|
let r = N(n), i = e ? e[n] : null;
|
|
7963
|
-
return /* @__PURE__ */ C(
|
|
7965
|
+
return /* @__PURE__ */ C(Wl, {
|
|
7964
7966
|
isHeader: !1,
|
|
7965
7967
|
cell: t,
|
|
7966
7968
|
width: r,
|
|
7967
7969
|
columnAlignment: i
|
|
7968
7970
|
}, n);
|
|
7969
7971
|
}),
|
|
7970
|
-
o && /* @__PURE__ */ C(
|
|
7972
|
+
o && /* @__PURE__ */ C(Wl, {
|
|
7971
7973
|
isHeader: !1,
|
|
7972
7974
|
cell: {
|
|
7973
|
-
type:
|
|
7975
|
+
type: Ul.ACTIONS,
|
|
7974
7976
|
actions: k
|
|
7975
7977
|
}
|
|
7976
7978
|
})
|
|
7977
7979
|
]
|
|
7978
7980
|
}) })
|
|
7979
7981
|
});
|
|
7980
|
-
},
|
|
7981
|
-
let a =
|
|
7982
|
+
}, Cp = ({ columnAlignment: e, columnWidths: t, draggable: n, hasRowActions: r, headers: i }) => {
|
|
7983
|
+
let a = bp(), o = a == null ? void 0 : a.headerCheckState, s = (a == null ? void 0 : a.enabled) && o !== void 0;
|
|
7982
7984
|
return /* @__PURE__ */ C("table", {
|
|
7983
|
-
className: x($s.table,
|
|
7985
|
+
className: x($s.table, pp.treeTableHeader),
|
|
7984
7986
|
children: /* @__PURE__ */ C("thead", { children: i.map((i, c) => /* @__PURE__ */ w("tr", { children: [
|
|
7985
|
-
s && c === 0 ? /* @__PURE__ */ C(
|
|
7987
|
+
s && c === 0 ? /* @__PURE__ */ C(Wl, {
|
|
7986
7988
|
isHeader: !0,
|
|
7987
7989
|
cell: {
|
|
7988
|
-
type:
|
|
7990
|
+
type: Ul.CHECKBOX,
|
|
7989
7991
|
checked: o.checked,
|
|
7990
7992
|
indeterminate: o.indeterminate,
|
|
7991
7993
|
onChange: a.toggleHeaderCheck
|
|
7992
7994
|
}
|
|
7993
7995
|
}) : s ? /* @__PURE__ */ C("td", {}) : null,
|
|
7994
|
-
n && /* @__PURE__ */ C("th", { className:
|
|
7996
|
+
n && /* @__PURE__ */ C("th", { className: pp.dragCell }),
|
|
7995
7997
|
i.cells.map((n, r) => {
|
|
7996
7998
|
let i = t ? t[r] : void 0, a = e ? e[r] : void 0;
|
|
7997
|
-
return /* @__PURE__ */ C(
|
|
7999
|
+
return /* @__PURE__ */ C(Wl, {
|
|
7998
8000
|
isHeader: !0,
|
|
7999
8001
|
cell: n,
|
|
8000
8002
|
width: i,
|
|
8001
8003
|
columnAlignment: a
|
|
8002
8004
|
}, r);
|
|
8003
8005
|
}),
|
|
8004
|
-
r && /* @__PURE__ */ C(
|
|
8006
|
+
r && /* @__PURE__ */ C(Wl, {
|
|
8005
8007
|
isHeader: !0,
|
|
8006
8008
|
cell: {
|
|
8007
|
-
type:
|
|
8009
|
+
type: Ul.ACTIONS,
|
|
8008
8010
|
actions: i.actions,
|
|
8009
8011
|
width: 31
|
|
8010
8012
|
}
|
|
8011
8013
|
})
|
|
8012
8014
|
] }, c)) })
|
|
8013
8015
|
});
|
|
8014
|
-
},
|
|
8015
|
-
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: v = [] } = d, y =
|
|
8016
|
-
return /* @__PURE__ */ C(
|
|
8016
|
+
}, wp = ({ allowParentReassignment: e, autoOpenActiveItems: t = !1, canDrop: n, draggable: r = !1, icons: i, isInitialOpen: a = !1, itemHasChild: o, onItemToggle: s, onListReorder: c, onChangeOpen: l, rowCheckboxes: u, table: d, testId: f, treeRef: p }) => {
|
|
8017
|
+
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: v = [] } = d, y = pl(v, _ == null ? [] : _);
|
|
8018
|
+
return /* @__PURE__ */ C(xp, {
|
|
8017
8019
|
rowCheckboxes: u,
|
|
8018
8020
|
rows: v,
|
|
8019
8021
|
children: /* @__PURE__ */ w("div", {
|
|
8020
|
-
className:
|
|
8022
|
+
className: pp.treeTable,
|
|
8021
8023
|
"data-testid": f,
|
|
8022
8024
|
style: { width: g },
|
|
8023
|
-
children: [!!_ && /* @__PURE__ */ C(
|
|
8025
|
+
children: [!!_ && /* @__PURE__ */ C(Cp, {
|
|
8024
8026
|
columnAlignment: m,
|
|
8025
8027
|
columnWidths: h,
|
|
8026
8028
|
draggable: r,
|
|
8027
8029
|
hasRowActions: y,
|
|
8028
8030
|
headers: _
|
|
8029
|
-
}), /* @__PURE__ */ C(
|
|
8031
|
+
}), /* @__PURE__ */ C(fp, {
|
|
8030
8032
|
allowParentReassignment: e,
|
|
8031
8033
|
autoOpenActiveItems: t,
|
|
8032
8034
|
canDrop: n,
|
|
@@ -8042,7 +8044,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8042
8044
|
onItemToggle: s,
|
|
8043
8045
|
onListReorder: c,
|
|
8044
8046
|
placeholderIndent: "var(--size)",
|
|
8045
|
-
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ C(
|
|
8047
|
+
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ C(Sp, {
|
|
8046
8048
|
node: e,
|
|
8047
8049
|
columnAlignment: m,
|
|
8048
8050
|
columnWidths: h,
|
|
@@ -8059,10 +8061,10 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8059
8061
|
})]
|
|
8060
8062
|
})
|
|
8061
8063
|
});
|
|
8062
|
-
},
|
|
8064
|
+
}, Tp = Object.freeze({
|
|
8063
8065
|
Translations: "translations",
|
|
8064
8066
|
LanguageKey: "languageKey"
|
|
8065
|
-
}),
|
|
8067
|
+
}), Ep = {
|
|
8066
8068
|
unified: "Unified",
|
|
8067
8069
|
split: "Split",
|
|
8068
8070
|
changesTooLarge: "Changes are too large to be shown",
|
|
@@ -8085,29 +8087,29 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8085
8087
|
showAll: "Show all",
|
|
8086
8088
|
unknown: "Unknown",
|
|
8087
8089
|
unexpectedError: "Unexpected error"
|
|
8088
|
-
},
|
|
8090
|
+
}, Dp = (e) => Object.keys(Ep).reduce((t, n) => ({
|
|
8089
8091
|
...t,
|
|
8090
|
-
[n]: (e == null ? void 0 : e[n]) || (
|
|
8091
|
-
}), {}),
|
|
8092
|
-
[
|
|
8093
|
-
[
|
|
8094
|
-
},
|
|
8095
|
-
|
|
8096
|
-
},
|
|
8092
|
+
[n]: (e == null ? void 0 : e[n]) || (Ep == null ? void 0 : Ep[n])
|
|
8093
|
+
}), {}), Op = {
|
|
8094
|
+
[Tp.Translations]: Dp(),
|
|
8095
|
+
[Tp.LanguageKey]: "en"
|
|
8096
|
+
}, kp = (e) => e ? Op[e] : Op, Ap = (e, t) => {
|
|
8097
|
+
Op[e] = t;
|
|
8098
|
+
}, jp = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
|
|
8097
8099
|
var a;
|
|
8098
|
-
let { unitTemplate: o = null } = (a =
|
|
8099
|
-
return e[n] = r == null ?
|
|
8100
|
+
let { unitTemplate: o = null } = (a = Lf()) == null ? {} : a;
|
|
8101
|
+
return e[n] = r == null ? Ef(n, o) : r, t[n] = i, {
|
|
8100
8102
|
preferredUnits: e,
|
|
8101
8103
|
storageUnits: t
|
|
8102
8104
|
};
|
|
8103
8105
|
}, {
|
|
8104
8106
|
preferredUnits: {},
|
|
8105
8107
|
storageUnits: {}
|
|
8106
|
-
}),
|
|
8108
|
+
}), Mp = ({ row: e, selectedUnits: t, storageUnits: n, convertBackToStorageUnit: r, enableCosmeticRounding: i, enableDisplayRounding: a }) => ({
|
|
8107
8109
|
...e,
|
|
8108
8110
|
cells: e.cells.map((e) => {
|
|
8109
8111
|
if ("autoUnit" in e && e.autoUnit && (typeof e.value == "string" || typeof e.value == "number")) {
|
|
8110
|
-
let { unitKey: o, value: s, formatDisplayValue: c } = e, l = a && "roundDisplayValue" in e ? e.roundDisplayValue : null, u = t[o], d = n[o], f = d && u !== d, { value: p = s } =
|
|
8112
|
+
let { unitKey: o, value: s, formatDisplayValue: c } = e, l = a && "roundDisplayValue" in e ? e.roundDisplayValue : null, u = t[o], d = n[o], f = d && u !== d, { value: p = s } = jf({
|
|
8111
8113
|
value: Dr(s),
|
|
8112
8114
|
unitkey: o,
|
|
8113
8115
|
toUnit: u,
|
|
@@ -8121,7 +8123,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8121
8123
|
roundDisplayValue: l,
|
|
8122
8124
|
selectOnFocus: !0,
|
|
8123
8125
|
onChange: (t) => {
|
|
8124
|
-
let n = t, { value: i } = n.target, a = r ? d : u, { value: s = i } =
|
|
8126
|
+
let n = t, { value: i } = n.target, a = r ? d : u, { value: s = i } = jf({
|
|
8125
8127
|
value: String(i),
|
|
8126
8128
|
unitkey: o,
|
|
8127
8129
|
toUnit: a,
|
|
@@ -8140,17 +8142,17 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8140
8142
|
}
|
|
8141
8143
|
return e;
|
|
8142
8144
|
})
|
|
8143
|
-
}),
|
|
8144
|
-
let { translations: i } =
|
|
8145
|
+
}), Np = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
|
|
8146
|
+
let { translations: i } = kp();
|
|
8145
8147
|
return e ? e.map((e) => ({
|
|
8146
8148
|
...e,
|
|
8147
8149
|
cells: e.cells.map((e) => {
|
|
8148
|
-
if (e.type ===
|
|
8150
|
+
if (e.type === Ul.AUTO_UNIT) {
|
|
8149
8151
|
var a;
|
|
8150
8152
|
let { testId: o, unitKey: s, disabled: c = !1, error: l } = e, u = n[s];
|
|
8151
8153
|
return {
|
|
8152
8154
|
value: u && t[s],
|
|
8153
|
-
type:
|
|
8155
|
+
type: Ul.SELECT,
|
|
8154
8156
|
error: !u && (i == null ? void 0 : i.unitIsMissing) || l,
|
|
8155
8157
|
disabled: c || !u,
|
|
8156
8158
|
searchable: !1,
|
|
@@ -8170,8 +8172,8 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8170
8172
|
return e;
|
|
8171
8173
|
})
|
|
8172
8174
|
})) : [];
|
|
8173
|
-
},
|
|
8174
|
-
let { headers: c, ...l } = e, { storageUnits: d, preferredUnits: p } =
|
|
8175
|
+
}, Pp = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: o, beforeRenderRow: s }) => {
|
|
8176
|
+
let { headers: c, ...l } = e, { storageUnits: d, preferredUnits: p } = jp(t), m = Tf(p), [h, g] = y(p), _ = ({ unitKey: e, value: n }) => {
|
|
8175
8177
|
g((t) => ({
|
|
8176
8178
|
...t,
|
|
8177
8179
|
[e]: n
|
|
@@ -8182,7 +8184,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8182
8184
|
newUnit: n,
|
|
8183
8185
|
unitKey: e
|
|
8184
8186
|
});
|
|
8185
|
-
}, v = u(({ row: e, rowIndex: t }) =>
|
|
8187
|
+
}, v = u(({ row: e, rowIndex: t }) => Mp({
|
|
8186
8188
|
row: s ? s({
|
|
8187
8189
|
row: e,
|
|
8188
8190
|
rowIndex: t
|
|
@@ -8207,10 +8209,10 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8207
8209
|
value: n
|
|
8208
8210
|
});
|
|
8209
8211
|
});
|
|
8210
|
-
}, [t]), /* @__PURE__ */ C(
|
|
8212
|
+
}, [t]), /* @__PURE__ */ C(tu, {
|
|
8211
8213
|
table: {
|
|
8212
8214
|
...l,
|
|
8213
|
-
headers:
|
|
8215
|
+
headers: Np({
|
|
8214
8216
|
headers: e.headers,
|
|
8215
8217
|
selectedUnits: h,
|
|
8216
8218
|
storageUnits: d,
|
|
@@ -8221,8 +8223,8 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8221
8223
|
canListReorder: o,
|
|
8222
8224
|
beforeRenderRow: v
|
|
8223
8225
|
});
|
|
8224
|
-
},
|
|
8225
|
-
let { translations: d } =
|
|
8226
|
+
}, Fp = { settingField: "_settingField_1x02n_1" }, Ip = ({ 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 }) => {
|
|
8227
|
+
let { translations: d } = kp(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ w(e.Fragment, { children: [t, /* @__PURE__ */ C("br", {})] }, n)), p = [
|
|
8226
8228
|
...r ? [] : [{
|
|
8227
8229
|
label: d == null ? void 0 : d.allUsers,
|
|
8228
8230
|
value: !1
|
|
@@ -8237,20 +8239,20 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8237
8239
|
}] : []
|
|
8238
8240
|
], m = a !== void 0 && o !== void 0 && !dn(a, o);
|
|
8239
8241
|
return /* @__PURE__ */ w("div", {
|
|
8240
|
-
className:
|
|
8242
|
+
className: Fp.settingField,
|
|
8241
8243
|
"data-testid": u,
|
|
8242
|
-
children: [/* @__PURE__ */ w(
|
|
8244
|
+
children: [/* @__PURE__ */ w(yd, {
|
|
8243
8245
|
justifyContent: "space-between",
|
|
8244
8246
|
wrap: !1,
|
|
8245
8247
|
children: [i, !s && /* @__PURE__ */ C("div", {
|
|
8246
8248
|
style: { flexShrink: 0 },
|
|
8247
|
-
children: /* @__PURE__ */ w(
|
|
8249
|
+
children: /* @__PURE__ */ w(yd, {
|
|
8248
8250
|
gap: "8px",
|
|
8249
8251
|
alignItems: "center",
|
|
8250
8252
|
children: [m && /* @__PURE__ */ C(xa, {
|
|
8251
8253
|
text: kr(o).valid ? `${d == null ? void 0 : d.companySetting}: ${vr(o) ? Ar(o) : o}` : d == null ? void 0 : d.companySettingDifferent,
|
|
8252
8254
|
icon: U.INFO
|
|
8253
|
-
}), /* @__PURE__ */ C(
|
|
8255
|
+
}), /* @__PURE__ */ C(tl, {
|
|
8254
8256
|
small: !0,
|
|
8255
8257
|
searchable: !1,
|
|
8256
8258
|
name: "userType",
|
|
@@ -8269,19 +8271,19 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8269
8271
|
children: f(t)
|
|
8270
8272
|
})]
|
|
8271
8273
|
});
|
|
8272
|
-
},
|
|
8274
|
+
}, Lp = (e, t) => {
|
|
8273
8275
|
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;
|
|
8274
8276
|
return {
|
|
8275
8277
|
added: Math.max(0, i),
|
|
8276
8278
|
removed: Math.max(0, a)
|
|
8277
8279
|
};
|
|
8278
|
-
},
|
|
8280
|
+
}, Rp = "split", zp = "unified", Bp = ({ oldJson: e, newJson: t, viewType: n = Rp }) => {
|
|
8279
8281
|
var r, i;
|
|
8280
|
-
let { translations: a } =
|
|
8281
|
-
value:
|
|
8282
|
+
let { translations: a } = kp(), [o, s] = y(n), c = [{
|
|
8283
|
+
value: Rp,
|
|
8282
8284
|
label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
|
|
8283
8285
|
}, {
|
|
8284
|
-
value:
|
|
8286
|
+
value: zp,
|
|
8285
8287
|
label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
|
|
8286
8288
|
}];
|
|
8287
8289
|
f(() => {
|
|
@@ -8289,10 +8291,10 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8289
8291
|
}, [n]);
|
|
8290
8292
|
let l = ({ target: { value: e } }) => {
|
|
8291
8293
|
s(e);
|
|
8292
|
-
}, { added: u, removed: d } =
|
|
8294
|
+
}, { added: u, removed: d } = Lp(e, t), p = u + d > 3500;
|
|
8293
8295
|
return /* @__PURE__ */ C(S, { children: /* @__PURE__ */ C(Do, {
|
|
8294
8296
|
bordered: !0,
|
|
8295
|
-
heading: /* @__PURE__ */ w(
|
|
8297
|
+
heading: /* @__PURE__ */ w(yd, {
|
|
8296
8298
|
gap: !0,
|
|
8297
8299
|
children: [/* @__PURE__ */ C(ss, { children: /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w(ns, {
|
|
8298
8300
|
success: !0,
|
|
@@ -8304,7 +8306,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8304
8306
|
}), /* @__PURE__ */ w(ns, {
|
|
8305
8307
|
error: !0,
|
|
8306
8308
|
children: ["-", d]
|
|
8307
|
-
})] }) }), !p && /* @__PURE__ */ C(
|
|
8309
|
+
})] }) }), !p && /* @__PURE__ */ C(Yd, {
|
|
8308
8310
|
name: "viewType",
|
|
8309
8311
|
options: c,
|
|
8310
8312
|
value: o,
|
|
@@ -8322,16 +8324,16 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8322
8324
|
}) : /* @__PURE__ */ C(Ai, {
|
|
8323
8325
|
oldValue: e,
|
|
8324
8326
|
newValue: t,
|
|
8325
|
-
splitView: o ===
|
|
8327
|
+
splitView: o === Rp,
|
|
8326
8328
|
compareMethod: ji.WORDS
|
|
8327
8329
|
})
|
|
8328
8330
|
}) });
|
|
8329
|
-
},
|
|
8331
|
+
}, Vp = { backgroundColor: "var(--color-background-error-muted)" }, Hp = { backgroundColor: "var(--color-background-success-muted)" }, Up = { backgroundColor: "var(--color-background-warning-muted)" }, Wp = (e) => typeof e == "object" && e && "value" in e ? e.value : e, Gp = (e) => {
|
|
8330
8332
|
var t;
|
|
8331
8333
|
if (e.id != null) return String(e.id);
|
|
8332
|
-
let n =
|
|
8334
|
+
let n = Wp((t = e.cells) == null || (t = t[0]) == null ? void 0 : t.value);
|
|
8333
8335
|
return n == null ? "" : String(n);
|
|
8334
|
-
},
|
|
8336
|
+
}, Kp = (e, t) => ({
|
|
8335
8337
|
...e,
|
|
8336
8338
|
cells: e.cells.map((e) => ({
|
|
8337
8339
|
...e,
|
|
@@ -8340,7 +8342,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8340
8342
|
...t
|
|
8341
8343
|
}
|
|
8342
8344
|
}))
|
|
8343
|
-
}),
|
|
8345
|
+
}), qp = (e, t) => ({
|
|
8344
8346
|
...e,
|
|
8345
8347
|
cells: e.cells.map((e, n) => {
|
|
8346
8348
|
var r;
|
|
@@ -8349,17 +8351,17 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8349
8351
|
...e,
|
|
8350
8352
|
style: {
|
|
8351
8353
|
...e.style,
|
|
8352
|
-
...
|
|
8354
|
+
...Up
|
|
8353
8355
|
},
|
|
8354
8356
|
tooltip: a
|
|
8355
8357
|
};
|
|
8356
8358
|
})
|
|
8357
|
-
}),
|
|
8359
|
+
}), Jp = (e = [], t = []) => {
|
|
8358
8360
|
let n = /* @__PURE__ */ new Map();
|
|
8359
|
-
for (let e of t) n.set(
|
|
8360
|
-
let r = new Set(e.map(
|
|
8361
|
+
for (let e of t) n.set(Gp(e), e);
|
|
8362
|
+
let r = new Set(e.map(Gp)), i = /* @__PURE__ */ new Map(), a = [], o = null;
|
|
8361
8363
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
8362
|
-
let n = t[e], c =
|
|
8364
|
+
let n = t[e], c = Gp(n);
|
|
8363
8365
|
if (r.has(c)) {
|
|
8364
8366
|
o = c;
|
|
8365
8367
|
continue;
|
|
@@ -8374,7 +8376,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8374
8376
|
a.reverse();
|
|
8375
8377
|
let c = [];
|
|
8376
8378
|
for (let t of e) {
|
|
8377
|
-
let e =
|
|
8379
|
+
let e = Gp(t), r = i.get(e);
|
|
8378
8380
|
if (r) for (let e of r) c.push({
|
|
8379
8381
|
status: "deleted",
|
|
8380
8382
|
row: e
|
|
@@ -8394,17 +8396,17 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8394
8396
|
row: e
|
|
8395
8397
|
});
|
|
8396
8398
|
return c;
|
|
8397
|
-
},
|
|
8398
|
-
let i = g(() =>
|
|
8399
|
+
}, Yp = (e) => e.status === "deleted" ? Kp(e.row, Vp) : e.status === "added" ? Kp(e.row, Hp) : qp(e.row, e.compareRow), Xp = ({ table: e, compareRows: t, beforeRenderRow: n, ...r }) => {
|
|
8400
|
+
let i = g(() => Jp(e.rows, t), [e.rows, t]), a = !!e.infiniteScroll, o = g(() => {
|
|
8399
8401
|
if (!a) return i.map((e) => e.row);
|
|
8400
8402
|
}, [a, i]), s = u(({ row: e, rowIndex: t }) => {
|
|
8401
|
-
let r = i[t], a = r ?
|
|
8403
|
+
let r = i[t], a = r ? Yp(r) : e;
|
|
8402
8404
|
return n ? n({
|
|
8403
8405
|
row: a,
|
|
8404
8406
|
rowIndex: t
|
|
8405
8407
|
}) : a;
|
|
8406
8408
|
}, [i, n]);
|
|
8407
|
-
return /* @__PURE__ */ C(
|
|
8409
|
+
return /* @__PURE__ */ C(tu, {
|
|
8408
8410
|
...r,
|
|
8409
8411
|
beforeRenderRow: s,
|
|
8410
8412
|
table: {
|
|
@@ -8417,7 +8419,7 @@ var Io = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Lo =
|
|
|
8417
8419
|
};
|
|
8418
8420
|
//#endregion
|
|
8419
8421
|
//#region src/helpers/date.ts
|
|
8420
|
-
function
|
|
8422
|
+
function Zp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
8421
8423
|
return e ? new Date(e).toLocaleString(a, {
|
|
8422
8424
|
year: "numeric",
|
|
8423
8425
|
month: "short",
|
|
@@ -8431,28 +8433,28 @@ function Xp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
8431
8433
|
}
|
|
8432
8434
|
//#endregion
|
|
8433
8435
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
8434
|
-
function
|
|
8436
|
+
function Qp(e) {
|
|
8435
8437
|
var t;
|
|
8436
8438
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
8437
8439
|
if (!n) throw Error("Invalid RegExp");
|
|
8438
8440
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
8439
8441
|
}
|
|
8440
|
-
function
|
|
8442
|
+
function $p(e) {
|
|
8441
8443
|
if (typeof e != "object") return e;
|
|
8442
8444
|
if (e === null) return null;
|
|
8443
|
-
if (Array.isArray(e)) return e.map(
|
|
8445
|
+
if (Array.isArray(e)) return e.map($p);
|
|
8444
8446
|
if (e instanceof Date) return new Date(e.getTime());
|
|
8445
|
-
if (e instanceof RegExp) return
|
|
8447
|
+
if (e instanceof RegExp) return Qp(e);
|
|
8446
8448
|
let t = {};
|
|
8447
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
8449
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = $p(e[n]));
|
|
8448
8450
|
return t;
|
|
8449
8451
|
}
|
|
8450
8452
|
//#endregion
|
|
8451
8453
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
8452
|
-
function
|
|
8454
|
+
function em(e, t) {
|
|
8453
8455
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
8454
8456
|
}
|
|
8455
|
-
var
|
|
8457
|
+
var tm = (e) => e[e.length - 1], nm = class {
|
|
8456
8458
|
setResult(e) {
|
|
8457
8459
|
return this.result = e, this.hasResult = !0, this;
|
|
8458
8460
|
}
|
|
@@ -8460,16 +8462,16 @@ var em = (e) => e[e.length - 1], tm = class {
|
|
|
8460
8462
|
return this.exiting = !0, this;
|
|
8461
8463
|
}
|
|
8462
8464
|
push(e, t) {
|
|
8463
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
8465
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (em(this.children), tm(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
8464
8466
|
}
|
|
8465
|
-
},
|
|
8467
|
+
}, rm = class extends nm {
|
|
8466
8468
|
constructor(e, t) {
|
|
8467
8469
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
8468
8470
|
}
|
|
8469
8471
|
prepareDeltaResult(e) {
|
|
8470
8472
|
var t, n, r, i;
|
|
8471
8473
|
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)) {
|
|
8472
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
8474
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : $p;
|
|
8473
8475
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
8474
8476
|
}
|
|
8475
8477
|
return e;
|
|
@@ -8477,15 +8479,15 @@ var em = (e) => e[e.length - 1], tm = class {
|
|
|
8477
8479
|
setResult(e) {
|
|
8478
8480
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
8479
8481
|
}
|
|
8480
|
-
},
|
|
8482
|
+
}, im = class extends nm {
|
|
8481
8483
|
constructor(e, t) {
|
|
8482
8484
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
8483
8485
|
}
|
|
8484
|
-
},
|
|
8486
|
+
}, am = class extends nm {
|
|
8485
8487
|
constructor(e) {
|
|
8486
8488
|
super(), this.delta = e, this.pipe = "reverse";
|
|
8487
8489
|
}
|
|
8488
|
-
},
|
|
8490
|
+
}, om = class {
|
|
8489
8491
|
constructor(e) {
|
|
8490
8492
|
this.name = e, this.filters = [];
|
|
8491
8493
|
}
|
|
@@ -8549,7 +8551,7 @@ var em = (e) => e[e.length - 1], tm = class {
|
|
|
8549
8551
|
}
|
|
8550
8552
|
}), this);
|
|
8551
8553
|
}
|
|
8552
|
-
},
|
|
8554
|
+
}, sm = class {
|
|
8553
8555
|
constructor(e) {
|
|
8554
8556
|
this.selfOptions = e || {}, this.pipes = {};
|
|
8555
8557
|
}
|
|
@@ -8576,7 +8578,7 @@ var em = (e) => e[e.length - 1], tm = class {
|
|
|
8576
8578
|
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);
|
|
8577
8579
|
return n.hasResult ? n.result : void 0;
|
|
8578
8580
|
}
|
|
8579
|
-
},
|
|
8581
|
+
}, cm = (e, t, n, r) => e[n] === t[r], lm = (e, t, n, r) => {
|
|
8580
8582
|
var i, a, o;
|
|
8581
8583
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
8582
8584
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -8592,7 +8594,7 @@ var em = (e) => e[e.length - 1], tm = class {
|
|
|
8592
8594
|
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);
|
|
8593
8595
|
}
|
|
8594
8596
|
return d;
|
|
8595
|
-
},
|
|
8597
|
+
}, um = (e, t, n, r) => {
|
|
8596
8598
|
let i = t.length, a = n.length, o = {
|
|
8597
8599
|
sequence: [],
|
|
8598
8600
|
indices1: [],
|
|
@@ -8614,11 +8616,11 @@ var em = (e) => e[e.length - 1], tm = class {
|
|
|
8614
8616
|
}
|
|
8615
8617
|
}
|
|
8616
8618
|
return o;
|
|
8617
|
-
},
|
|
8619
|
+
}, dm = { get: (e, t, n, r) => {
|
|
8618
8620
|
let i = r || {};
|
|
8619
|
-
return lm(
|
|
8620
|
-
} },
|
|
8621
|
-
function
|
|
8621
|
+
return um(lm(e, t, n || cm, i), e, t, i);
|
|
8622
|
+
} }, fm = 3;
|
|
8623
|
+
function pm(e, t, n, r) {
|
|
8622
8624
|
for (let i = 0; i < n; i++) {
|
|
8623
8625
|
let n = e[i];
|
|
8624
8626
|
for (let e = 0; e < r; e++) {
|
|
@@ -8628,7 +8630,7 @@ function fm(e, t, n, r) {
|
|
|
8628
8630
|
}
|
|
8629
8631
|
return !1;
|
|
8630
8632
|
}
|
|
8631
|
-
function
|
|
8633
|
+
function mm(e, t, n, r, i) {
|
|
8632
8634
|
let a = e[n], o = t[r];
|
|
8633
8635
|
if (a === o) return !0;
|
|
8634
8636
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -8641,15 +8643,15 @@ function pm(e, t, n, r, i) {
|
|
|
8641
8643
|
let l = i.hashCache2[r];
|
|
8642
8644
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l !== void 0 && c === l;
|
|
8643
8645
|
}
|
|
8644
|
-
var
|
|
8646
|
+
var hm = function(e) {
|
|
8645
8647
|
var t, n, r, i, a;
|
|
8646
8648
|
if (!e.leftIsArray) return;
|
|
8647
8649
|
let o = {
|
|
8648
8650
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
8649
8651
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
8650
8652
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
8651
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !
|
|
8652
|
-
for (; c + s < m && c + s < h &&
|
|
8653
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !pm(f, p, m, h)); s < m && s < h && mm(f, p, s, s, o);) l = s, g = new rm(f[l], p[l]), e.push(g, l), s++;
|
|
8654
|
+
for (; c + s < m && c + s < h && mm(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new rm(f[u], p[d]), e.push(g, d), c++;
|
|
8653
8655
|
let _;
|
|
8654
8656
|
if (s + c === m) {
|
|
8655
8657
|
if (m === h) {
|
|
@@ -8673,7 +8675,7 @@ var mm = function(e) {
|
|
|
8673
8675
|
return;
|
|
8674
8676
|
}
|
|
8675
8677
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
8676
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
8678
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = dm.get(v, y, mm, o), x = [];
|
|
8677
8679
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
8678
8680
|
let t = `_${l}`;
|
|
8679
8681
|
_[t] = [
|
|
@@ -8694,8 +8696,8 @@ var mm = function(e) {
|
|
|
8694
8696
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
8695
8697
|
u = x[n];
|
|
8696
8698
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
8697
|
-
if (u !== void 0 && r &&
|
|
8698
|
-
r.splice(1, 2, l,
|
|
8699
|
+
if (u !== void 0 && r && mm(v, y, u - s, l - s, o)) {
|
|
8700
|
+
r.splice(1, 2, l, fm), r.splice(1, 2, l, fm), C || (r[0] = ""), d = l, g = new rm(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
8699
8701
|
break;
|
|
8700
8702
|
}
|
|
8701
8703
|
}
|
|
@@ -8703,20 +8705,20 @@ var mm = function(e) {
|
|
|
8703
8705
|
} else {
|
|
8704
8706
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
8705
8707
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
8706
|
-
d = b.indices2[t] + s, g = new
|
|
8708
|
+
d = b.indices2[t] + s, g = new rm(f[u], p[d]), e.push(g, d);
|
|
8707
8709
|
}
|
|
8708
8710
|
}
|
|
8709
8711
|
e.setResult(_).exit();
|
|
8710
8712
|
};
|
|
8711
|
-
|
|
8712
|
-
var
|
|
8713
|
+
hm.filterName = "arrays";
|
|
8714
|
+
var gm = {
|
|
8713
8715
|
numerically(e, t) {
|
|
8714
8716
|
return e - t;
|
|
8715
8717
|
},
|
|
8716
8718
|
numericallyBy(e) {
|
|
8717
8719
|
return (t, n) => t[e] - n[e];
|
|
8718
8720
|
}
|
|
8719
|
-
},
|
|
8721
|
+
}, _m = function(e) {
|
|
8720
8722
|
var t;
|
|
8721
8723
|
if (!e.nested) return;
|
|
8722
8724
|
let n = e.delta;
|
|
@@ -8725,7 +8727,7 @@ var hm = {
|
|
|
8725
8727
|
for (r in a) if (r !== "_t") {
|
|
8726
8728
|
if (r[0] === "_") {
|
|
8727
8729
|
let e = r;
|
|
8728
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
8730
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === fm)) s.push(Number.parseInt(r.slice(1), 10));
|
|
8729
8731
|
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]}`);
|
|
8730
8732
|
} else {
|
|
8731
8733
|
let e = r;
|
|
@@ -8738,15 +8740,15 @@ var hm = {
|
|
|
8738
8740
|
});
|
|
8739
8741
|
}
|
|
8740
8742
|
}
|
|
8741
|
-
for (s = s.sort(
|
|
8743
|
+
for (s = s.sort(gm.numerically), r = s.length - 1; r >= 0; r--) {
|
|
8742
8744
|
if (i = s[r], i === void 0) continue;
|
|
8743
8745
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
8744
|
-
(e == null ? void 0 : e[2]) ===
|
|
8746
|
+
(e == null ? void 0 : e[2]) === fm && c.push({
|
|
8745
8747
|
index: e[1],
|
|
8746
8748
|
value: t
|
|
8747
8749
|
});
|
|
8748
8750
|
}
|
|
8749
|
-
c = c.sort(
|
|
8751
|
+
c = c.sort(gm.numericallyBy("index"));
|
|
8750
8752
|
let u = c.length;
|
|
8751
8753
|
for (r = 0; r < u; r++) {
|
|
8752
8754
|
let e = c[r];
|
|
@@ -8756,7 +8758,7 @@ var hm = {
|
|
|
8756
8758
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
8757
8759
|
let t = l[r];
|
|
8758
8760
|
if (t === void 0) continue;
|
|
8759
|
-
let n = new
|
|
8761
|
+
let n = new im(o[t.index], t.delta);
|
|
8760
8762
|
e.push(n, t.index);
|
|
8761
8763
|
}
|
|
8762
8764
|
if (!e.children) {
|
|
@@ -8765,8 +8767,8 @@ var hm = {
|
|
|
8765
8767
|
}
|
|
8766
8768
|
e.exit();
|
|
8767
8769
|
};
|
|
8768
|
-
|
|
8769
|
-
var
|
|
8770
|
+
_m.filterName = "arrays";
|
|
8771
|
+
var vm = function(e) {
|
|
8770
8772
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
8771
8773
|
let t = e.left, n = e.children.length;
|
|
8772
8774
|
for (let r = 0; r < n; r++) {
|
|
@@ -8777,16 +8779,16 @@ var _m = function(e) {
|
|
|
8777
8779
|
}
|
|
8778
8780
|
e.setResult(t).exit();
|
|
8779
8781
|
};
|
|
8780
|
-
|
|
8781
|
-
var
|
|
8782
|
+
vm.filterName = "arraysCollectChildren";
|
|
8783
|
+
var ym = function(e) {
|
|
8782
8784
|
if (!e.nested) {
|
|
8783
8785
|
let t = e.delta;
|
|
8784
|
-
if (t[2] ===
|
|
8786
|
+
if (t[2] === fm) {
|
|
8785
8787
|
let n = t;
|
|
8786
8788
|
e.newName = `_${n[1]}`, e.setResult([
|
|
8787
8789
|
n[0],
|
|
8788
8790
|
Number.parseInt(e.childName.substring(1), 10),
|
|
8789
|
-
|
|
8791
|
+
fm
|
|
8790
8792
|
]).exit();
|
|
8791
8793
|
}
|
|
8792
8794
|
return;
|
|
@@ -8796,20 +8798,20 @@ var vm = function(e) {
|
|
|
8796
8798
|
let n = t;
|
|
8797
8799
|
for (let t in n) {
|
|
8798
8800
|
if (t === "_t") continue;
|
|
8799
|
-
let r = new
|
|
8801
|
+
let r = new am(n[t]);
|
|
8800
8802
|
e.push(r, t);
|
|
8801
8803
|
}
|
|
8802
8804
|
e.exit();
|
|
8803
8805
|
};
|
|
8804
|
-
|
|
8805
|
-
var
|
|
8806
|
+
ym.filterName = "arrays";
|
|
8807
|
+
var bm = (e, t, n) => {
|
|
8806
8808
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
8807
8809
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
8808
8810
|
let r = +t;
|
|
8809
8811
|
for (let n in e) {
|
|
8810
8812
|
let i = e[n];
|
|
8811
8813
|
if (Array.isArray(i)) {
|
|
8812
|
-
if (i[2] ===
|
|
8814
|
+
if (i[2] === fm) {
|
|
8813
8815
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
8814
8816
|
if (a === +t) return e;
|
|
8815
8817
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
@@ -8817,7 +8819,7 @@ var ym = (e, t, n) => {
|
|
|
8817
8819
|
}
|
|
8818
8820
|
}
|
|
8819
8821
|
return r;
|
|
8820
|
-
},
|
|
8822
|
+
}, xm = (e) => {
|
|
8821
8823
|
if (!e || !e.children) return;
|
|
8822
8824
|
let t = e.delta;
|
|
8823
8825
|
if (t._t !== "a") return;
|
|
@@ -8828,22 +8830,22 @@ var ym = (e, t, n) => {
|
|
|
8828
8830
|
let a = r.newName;
|
|
8829
8831
|
if (a === void 0) {
|
|
8830
8832
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
8831
|
-
a =
|
|
8833
|
+
a = bm(n, r.childName, r.result);
|
|
8832
8834
|
}
|
|
8833
8835
|
i[a] !== r.result && (i[a] = r.result);
|
|
8834
8836
|
}
|
|
8835
8837
|
e.setResult(i).exit();
|
|
8836
8838
|
};
|
|
8837
|
-
|
|
8839
|
+
xm.filterName = "arraysCollectChildren";
|
|
8838
8840
|
//#endregion
|
|
8839
8841
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
8840
|
-
var
|
|
8842
|
+
var Sm = function(e) {
|
|
8841
8843
|
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();
|
|
8842
8844
|
};
|
|
8843
|
-
|
|
8845
|
+
Sm.filterName = "dates";
|
|
8844
8846
|
//#endregion
|
|
8845
8847
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
8846
|
-
var
|
|
8848
|
+
var Cm = /* @__PURE__ */ new Set(["__proto__"]), wm = (e) => {
|
|
8847
8849
|
if (!e || !e.children) return;
|
|
8848
8850
|
let t = e.children.length, n = e.result;
|
|
8849
8851
|
for (let r = 0; r < t; r++) {
|
|
@@ -8855,18 +8857,18 @@ var Sm = /* @__PURE__ */ new Set(["__proto__"]), Cm = (e) => {
|
|
|
8855
8857
|
}
|
|
8856
8858
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
8857
8859
|
};
|
|
8858
|
-
|
|
8859
|
-
var
|
|
8860
|
+
wm.filterName = "collectChildren";
|
|
8861
|
+
var Tm = (e) => {
|
|
8860
8862
|
var t;
|
|
8861
8863
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
8862
8864
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
8863
8865
|
for (let t in n) {
|
|
8864
8866
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
8865
|
-
let a = new
|
|
8867
|
+
let a = new rm(n[t], r[t]);
|
|
8866
8868
|
e.push(a, t);
|
|
8867
8869
|
}
|
|
8868
8870
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
8869
|
-
let n = new
|
|
8871
|
+
let n = new rm(void 0, r[t]);
|
|
8870
8872
|
e.push(n, t);
|
|
8871
8873
|
}
|
|
8872
8874
|
if (!e.children || e.children.length === 0) {
|
|
@@ -8875,15 +8877,15 @@ var wm = (e) => {
|
|
|
8875
8877
|
}
|
|
8876
8878
|
e.exit();
|
|
8877
8879
|
};
|
|
8878
|
-
|
|
8879
|
-
var
|
|
8880
|
+
Tm.filterName = "objects";
|
|
8881
|
+
var Em = function(e) {
|
|
8880
8882
|
if (!e.nested) return;
|
|
8881
8883
|
let t = e.delta;
|
|
8882
8884
|
if (t._t) return;
|
|
8883
8885
|
let n = t, r = !1;
|
|
8884
8886
|
for (let t in n) {
|
|
8885
|
-
if (
|
|
8886
|
-
let i = e.left, a = new
|
|
8887
|
+
if (Cm.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
8888
|
+
let i = e.left, a = new im(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
8887
8889
|
e.push(a, t), r = !0;
|
|
8888
8890
|
}
|
|
8889
8891
|
if (!r) {
|
|
@@ -8892,8 +8894,8 @@ var Tm = function(e) {
|
|
|
8892
8894
|
}
|
|
8893
8895
|
e.exit();
|
|
8894
8896
|
};
|
|
8895
|
-
|
|
8896
|
-
var
|
|
8897
|
+
Em.filterName = "objects";
|
|
8898
|
+
var Dm = function(e) {
|
|
8897
8899
|
if (!e || !e.children || e.delta._t) return;
|
|
8898
8900
|
if (e.left === null || typeof e.left != "object") {
|
|
8899
8901
|
e.setResult(e.left).exit();
|
|
@@ -8904,17 +8906,17 @@ var Em = function(e) {
|
|
|
8904
8906
|
let n = e.children[r];
|
|
8905
8907
|
if (n === void 0) continue;
|
|
8906
8908
|
let i = n.childName;
|
|
8907
|
-
|
|
8909
|
+
Cm.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
8908
8910
|
}
|
|
8909
8911
|
e.setResult(t).exit();
|
|
8910
8912
|
};
|
|
8911
|
-
|
|
8912
|
-
var
|
|
8913
|
+
Dm.filterName = "collectChildren";
|
|
8914
|
+
var Om = function(e) {
|
|
8913
8915
|
if (!e.nested || e.delta._t) return;
|
|
8914
8916
|
let t = e.delta, n = !1;
|
|
8915
8917
|
for (let r in t) {
|
|
8916
|
-
if (
|
|
8917
|
-
let i = new
|
|
8918
|
+
if (Cm.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
8919
|
+
let i = new am(t[r]);
|
|
8918
8920
|
e.push(i, r), n = !0;
|
|
8919
8921
|
}
|
|
8920
8922
|
if (!n) {
|
|
@@ -8923,25 +8925,25 @@ var Dm = function(e) {
|
|
|
8923
8925
|
}
|
|
8924
8926
|
e.exit();
|
|
8925
8927
|
};
|
|
8926
|
-
|
|
8927
|
-
var
|
|
8928
|
+
Om.filterName = "objects";
|
|
8929
|
+
var km = (e) => {
|
|
8928
8930
|
if (!e || !e.children || e.delta._t) return;
|
|
8929
8931
|
let t = e.children.length, n = {};
|
|
8930
8932
|
for (let r = 0; r < t; r++) {
|
|
8931
8933
|
let t = e.children[r];
|
|
8932
8934
|
if (t === void 0) continue;
|
|
8933
8935
|
let i = t.childName;
|
|
8934
|
-
|
|
8936
|
+
Cm.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
8935
8937
|
}
|
|
8936
8938
|
e.setResult(n).exit();
|
|
8937
8939
|
};
|
|
8938
|
-
|
|
8940
|
+
km.filterName = "collectChildren";
|
|
8939
8941
|
//#endregion
|
|
8940
8942
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
8941
|
-
var
|
|
8942
|
-
function
|
|
8943
|
+
var Am = 2, jm = 60, Mm = null;
|
|
8944
|
+
function Nm(e, t) {
|
|
8943
8945
|
var n;
|
|
8944
|
-
if (!
|
|
8946
|
+
if (!Mm) {
|
|
8945
8947
|
let r;
|
|
8946
8948
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
8947
8949
|
else {
|
|
@@ -8949,7 +8951,7 @@ function Mm(e, t) {
|
|
|
8949
8951
|
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.");
|
|
8950
8952
|
throw e.diff_match_patch_not_found = !0, e;
|
|
8951
8953
|
}
|
|
8952
|
-
|
|
8954
|
+
Mm = {
|
|
8953
8955
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
8954
8956
|
patch: (e, t) => {
|
|
8955
8957
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -8961,17 +8963,17 @@ function Mm(e, t) {
|
|
|
8961
8963
|
}
|
|
8962
8964
|
};
|
|
8963
8965
|
}
|
|
8964
|
-
return
|
|
8966
|
+
return Mm;
|
|
8965
8967
|
}
|
|
8966
|
-
var
|
|
8968
|
+
var Pm = function(e) {
|
|
8967
8969
|
var t, n;
|
|
8968
8970
|
if (e.leftType !== "string") return;
|
|
8969
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
8971
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || jm;
|
|
8970
8972
|
if (r.length < a || i.length < a) {
|
|
8971
8973
|
e.setResult([r, i]).exit();
|
|
8972
8974
|
return;
|
|
8973
8975
|
}
|
|
8974
|
-
let o =
|
|
8976
|
+
let o = Nm(e.options);
|
|
8975
8977
|
if (!o) {
|
|
8976
8978
|
e.setResult([r, i]).exit();
|
|
8977
8979
|
return;
|
|
@@ -8980,19 +8982,19 @@ var Nm = function(e) {
|
|
|
8980
8982
|
e.setResult([
|
|
8981
8983
|
s(r, i),
|
|
8982
8984
|
0,
|
|
8983
|
-
|
|
8985
|
+
Am
|
|
8984
8986
|
]).exit();
|
|
8985
8987
|
};
|
|
8986
|
-
|
|
8987
|
-
var
|
|
8988
|
+
Pm.filterName = "texts";
|
|
8989
|
+
var Fm = function(e) {
|
|
8988
8990
|
if (e.nested) return;
|
|
8989
8991
|
let t = e.delta;
|
|
8990
|
-
if (t[2] !==
|
|
8991
|
-
let n = t, r =
|
|
8992
|
+
if (t[2] !== Am) return;
|
|
8993
|
+
let n = t, r = Nm(e.options, !0).patch;
|
|
8992
8994
|
e.setResult(r(e.left, n[0])).exit();
|
|
8993
8995
|
};
|
|
8994
|
-
|
|
8995
|
-
var
|
|
8996
|
+
Fm.filterName = "texts";
|
|
8997
|
+
var Im = (e) => {
|
|
8996
8998
|
var t, n, r;
|
|
8997
8999
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
8998
9000
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -9013,21 +9015,21 @@ var Fm = (e) => {
|
|
|
9013
9015
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
9014
9016
|
}
|
|
9015
9017
|
return a.join("\n");
|
|
9016
|
-
},
|
|
9018
|
+
}, Lm = function(e) {
|
|
9017
9019
|
if (e.nested) return;
|
|
9018
9020
|
let t = e.delta;
|
|
9019
|
-
if (t[2] !==
|
|
9021
|
+
if (t[2] !== Am) return;
|
|
9020
9022
|
let n = t;
|
|
9021
9023
|
e.setResult([
|
|
9022
|
-
|
|
9024
|
+
Im(n[0]),
|
|
9023
9025
|
0,
|
|
9024
|
-
|
|
9026
|
+
Am
|
|
9025
9027
|
]).exit();
|
|
9026
9028
|
};
|
|
9027
|
-
|
|
9029
|
+
Lm.filterName = "texts";
|
|
9028
9030
|
//#endregion
|
|
9029
9031
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
9030
|
-
var
|
|
9032
|
+
var Rm = function(e) {
|
|
9031
9033
|
if (e.left === e.right) {
|
|
9032
9034
|
e.setResult(void 0).exit();
|
|
9033
9035
|
return;
|
|
@@ -9060,8 +9062,8 @@ var Lm = function(e) {
|
|
|
9060
9062
|
}
|
|
9061
9063
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
9062
9064
|
};
|
|
9063
|
-
|
|
9064
|
-
var
|
|
9065
|
+
Rm.filterName = "trivial";
|
|
9066
|
+
var zm = function(e) {
|
|
9065
9067
|
if (e.delta === void 0) {
|
|
9066
9068
|
e.setResult(e.left).exit();
|
|
9067
9069
|
return;
|
|
@@ -9085,8 +9087,8 @@ var Rm = function(e) {
|
|
|
9085
9087
|
}
|
|
9086
9088
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
9087
9089
|
};
|
|
9088
|
-
|
|
9089
|
-
var
|
|
9090
|
+
zm.filterName = "trivial";
|
|
9091
|
+
var Bm = function(e) {
|
|
9090
9092
|
if (e.delta === void 0) {
|
|
9091
9093
|
e.setResult(e.delta).exit();
|
|
9092
9094
|
return;
|
|
@@ -9107,36 +9109,36 @@ var zm = function(e) {
|
|
|
9107
9109
|
}
|
|
9108
9110
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
9109
9111
|
};
|
|
9110
|
-
|
|
9112
|
+
Bm.filterName = "trivial";
|
|
9111
9113
|
//#endregion
|
|
9112
9114
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
9113
|
-
var
|
|
9115
|
+
var Vm = class {
|
|
9114
9116
|
constructor(e) {
|
|
9115
|
-
this.processor = new
|
|
9117
|
+
this.processor = new sm(e), this.processor.pipe(new om("diff").append(wm, Rm, Sm, Pm, Tm, hm).shouldHaveResult()), this.processor.pipe(new om("patch").append(Dm, vm, zm, Fm, Em, _m).shouldHaveResult()), this.processor.pipe(new om("reverse").append(km, xm, Bm, Lm, Om, ym).shouldHaveResult());
|
|
9116
9118
|
}
|
|
9117
9119
|
options(e) {
|
|
9118
9120
|
return this.processor.options(e);
|
|
9119
9121
|
}
|
|
9120
9122
|
diff(e, t) {
|
|
9121
|
-
return this.processor.process(new
|
|
9123
|
+
return this.processor.process(new rm(e, t));
|
|
9122
9124
|
}
|
|
9123
9125
|
patch(e, t) {
|
|
9124
|
-
return this.processor.process(new
|
|
9126
|
+
return this.processor.process(new im(e, t));
|
|
9125
9127
|
}
|
|
9126
9128
|
reverse(e) {
|
|
9127
|
-
return this.processor.process(new
|
|
9129
|
+
return this.processor.process(new am(e));
|
|
9128
9130
|
}
|
|
9129
9131
|
unpatch(e, t) {
|
|
9130
9132
|
return this.patch(e, this.reverse(t));
|
|
9131
9133
|
}
|
|
9132
9134
|
clone(e) {
|
|
9133
|
-
return
|
|
9135
|
+
return $p(e);
|
|
9134
9136
|
}
|
|
9135
9137
|
};
|
|
9136
9138
|
//#endregion
|
|
9137
9139
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
9138
|
-
function
|
|
9139
|
-
return new
|
|
9140
|
+
function Hm(e) {
|
|
9141
|
+
return new Vm(e);
|
|
9140
9142
|
}
|
|
9141
9143
|
//#endregion
|
|
9142
9144
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -9698,46 +9700,46 @@ $.Diff = function(e, t) {
|
|
|
9698
9700
|
};
|
|
9699
9701
|
//#endregion
|
|
9700
9702
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
9701
|
-
var
|
|
9703
|
+
var Um = (e = {}) => Hm({
|
|
9702
9704
|
...e,
|
|
9703
9705
|
textDiff: {
|
|
9704
9706
|
diffMatchPatch: $,
|
|
9705
9707
|
minLength: 120
|
|
9706
9708
|
},
|
|
9707
9709
|
cloneDiffValues: !0
|
|
9708
|
-
}),
|
|
9710
|
+
}), Wm = ["user", "unittemplate"], Gm = Um(), Km = (e, t, n) => {
|
|
9709
9711
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
9710
9712
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
9711
9713
|
let n = r[t[e]];
|
|
9712
9714
|
if (n) return n;
|
|
9713
9715
|
}
|
|
9714
9716
|
return n || "";
|
|
9715
|
-
},
|
|
9717
|
+
}, qm = (e) => {
|
|
9716
9718
|
let t = (e) => vr(e) ? Ar(e) : String(e);
|
|
9717
9719
|
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);
|
|
9718
|
-
},
|
|
9720
|
+
}, Jm = (e) => {
|
|
9719
9721
|
switch (e.length) {
|
|
9720
9722
|
case 1: {
|
|
9721
9723
|
let [t] = e;
|
|
9722
9724
|
return {
|
|
9723
9725
|
type: "created",
|
|
9724
9726
|
before: "",
|
|
9725
|
-
after:
|
|
9727
|
+
after: qm(t)
|
|
9726
9728
|
};
|
|
9727
9729
|
}
|
|
9728
9730
|
case 2: {
|
|
9729
9731
|
let [t, n] = e;
|
|
9730
9732
|
return {
|
|
9731
9733
|
type: "modified",
|
|
9732
|
-
before:
|
|
9733
|
-
after:
|
|
9734
|
+
before: qm(t),
|
|
9735
|
+
after: qm(n)
|
|
9734
9736
|
};
|
|
9735
9737
|
}
|
|
9736
9738
|
case 3: {
|
|
9737
9739
|
let [t] = e;
|
|
9738
9740
|
return {
|
|
9739
9741
|
type: "deleted",
|
|
9740
|
-
before:
|
|
9742
|
+
before: qm(t),
|
|
9741
9743
|
after: ""
|
|
9742
9744
|
};
|
|
9743
9745
|
}
|
|
@@ -9747,15 +9749,15 @@ var Hm = (e = {}) => Vm({
|
|
|
9747
9749
|
after: ""
|
|
9748
9750
|
};
|
|
9749
9751
|
}
|
|
9750
|
-
},
|
|
9751
|
-
let r =
|
|
9752
|
+
}, Ym = (e) => Array.isArray(e), Xm = (e, t) => t ? Ym(t) ? t.length === 0 ? e : t.reduce((e, t) => Gm.unpatch(nn(e), nn(t)), nn(e)) : Gm.unpatch(nn(e), nn(t)) : e, Zm = (e) => e.createdAt || e.date, Qm = (e, t, n) => {
|
|
9753
|
+
let r = Zm(e);
|
|
9752
9754
|
if (!r) return {
|
|
9753
9755
|
oldJson: "",
|
|
9754
9756
|
newJson: "",
|
|
9755
9757
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
9756
9758
|
};
|
|
9757
9759
|
let i = t.filter((e) => {
|
|
9758
|
-
let t =
|
|
9760
|
+
let t = Zm(e);
|
|
9759
9761
|
return !!(e.diffs && t && t >= r);
|
|
9760
9762
|
}), a = Array.from({ length: i.length + 1 });
|
|
9761
9763
|
a[0] = nn(n);
|
|
@@ -9768,7 +9770,7 @@ var Hm = (e = {}) => Vm({
|
|
|
9768
9770
|
a[e + 1] = a[e];
|
|
9769
9771
|
continue;
|
|
9770
9772
|
}
|
|
9771
|
-
a[e + 1] =
|
|
9773
|
+
a[e + 1] = Xm(a[e], t);
|
|
9772
9774
|
}
|
|
9773
9775
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
9774
9776
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -9783,10 +9785,10 @@ var Hm = (e = {}) => Vm({
|
|
|
9783
9785
|
oldJson: o,
|
|
9784
9786
|
newJson: s
|
|
9785
9787
|
};
|
|
9786
|
-
},
|
|
9788
|
+
}, $m = (e, t, n = {}, r = []) => {
|
|
9787
9789
|
var i;
|
|
9788
9790
|
if (!e) return;
|
|
9789
|
-
let a = [...
|
|
9791
|
+
let a = [...Wm, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
9790
9792
|
Object.keys(e).forEach((i) => {
|
|
9791
9793
|
var o;
|
|
9792
9794
|
let s = e[i];
|
|
@@ -9799,12 +9801,12 @@ var Hm = (e = {}) => Vm({
|
|
|
9799
9801
|
cn(s) ? t.push({
|
|
9800
9802
|
deltaFormat: [...s],
|
|
9801
9803
|
path: c
|
|
9802
|
-
}) : gn(s) &&
|
|
9804
|
+
}) : gn(s) && $m(s, t, n, c);
|
|
9803
9805
|
});
|
|
9804
|
-
},
|
|
9806
|
+
}, eh = (e, t = {}) => {
|
|
9805
9807
|
let n = [];
|
|
9806
|
-
return e ? (
|
|
9807
|
-
},
|
|
9808
|
+
return e ? ($m(e, n, t), n) : [];
|
|
9809
|
+
}, th = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), nh = (e) => {
|
|
9808
9810
|
if (e == null || e === "") return "empty";
|
|
9809
9811
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
9810
9812
|
if (typeof e == "string") return e;
|
|
@@ -9815,35 +9817,35 @@ var Hm = (e = {}) => Vm({
|
|
|
9815
9817
|
} catch {
|
|
9816
9818
|
return String(e);
|
|
9817
9819
|
}
|
|
9818
|
-
},
|
|
9820
|
+
}, rh = (e, t = e.length - 1) => {
|
|
9819
9821
|
if (t >= e.length) return "Value";
|
|
9820
9822
|
let n = e[t];
|
|
9821
|
-
return !n || hr(n) ?
|
|
9822
|
-
},
|
|
9823
|
-
let o =
|
|
9823
|
+
return !n || hr(n) ? rh(e, t - 1) : th(n);
|
|
9824
|
+
}, ih = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
9825
|
+
let o = nh(r), s = nh(i), c = a ? ` in ${a}` : "";
|
|
9824
9826
|
switch (t) {
|
|
9825
9827
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
9826
9828
|
case "created": return `${e} created ${s}${c}.`;
|
|
9827
9829
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
9828
9830
|
default: return `${e} changed ${n}${c}.`;
|
|
9829
9831
|
}
|
|
9830
|
-
},
|
|
9832
|
+
}, ah = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
|
|
9831
9833
|
let i = {
|
|
9832
9834
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
9833
9835
|
rows: n.map((n) => {
|
|
9834
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
9835
|
-
return { cells: [{ value:
|
|
9836
|
+
let { deltaFormat: i, path: a } = n, o = Km(e, a, r), { type: s, before: c, after: l } = Jm(i);
|
|
9837
|
+
return { cells: [{ value: ih({
|
|
9836
9838
|
userName: t,
|
|
9837
9839
|
type: s,
|
|
9838
|
-
property:
|
|
9840
|
+
property: rh(a),
|
|
9839
9841
|
before: c,
|
|
9840
9842
|
after: l,
|
|
9841
9843
|
sectionName: o
|
|
9842
9844
|
}) }] };
|
|
9843
9845
|
})
|
|
9844
9846
|
};
|
|
9845
|
-
return /* @__PURE__ */ C(
|
|
9846
|
-
},
|
|
9847
|
+
return /* @__PURE__ */ C(tu, { table: i });
|
|
9848
|
+
}, oh = Object.freeze({
|
|
9847
9849
|
summary: {
|
|
9848
9850
|
label: "Summary",
|
|
9849
9851
|
value: "summary"
|
|
@@ -9852,13 +9854,13 @@ var Hm = (e = {}) => Vm({
|
|
|
9852
9854
|
label: "Compare",
|
|
9853
9855
|
value: "compare"
|
|
9854
9856
|
}
|
|
9855
|
-
}),
|
|
9856
|
-
let c = [
|
|
9857
|
+
}), sh = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
9858
|
+
let c = [oh.summary, oh.compare].map(({ label: e, value: t }) => ({
|
|
9857
9859
|
label: e,
|
|
9858
9860
|
value: t
|
|
9859
9861
|
})), [l, u] = y(c[0]), { diffs: d = void 0 } = e || {};
|
|
9860
9862
|
if (!d) return null;
|
|
9861
|
-
let { oldJson: f, newJson: p, error: m } =
|
|
9863
|
+
let { oldJson: f, newJson: p, error: m } = Qm(e, t, n);
|
|
9862
9864
|
return /* @__PURE__ */ C(Ms, {
|
|
9863
9865
|
visible: r,
|
|
9864
9866
|
centered: !0,
|
|
@@ -9866,20 +9868,20 @@ var Hm = (e = {}) => Vm({
|
|
|
9866
9868
|
children: /* @__PURE__ */ C(us, { dialog: {
|
|
9867
9869
|
scroll: !0,
|
|
9868
9870
|
heading: "Comparison view",
|
|
9869
|
-
content: /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(
|
|
9871
|
+
content: /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(Yf, {
|
|
9870
9872
|
name: "ViewTab",
|
|
9871
9873
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
9872
9874
|
options: c,
|
|
9873
9875
|
value: l
|
|
9874
|
-
}), l.value === "summary" ? /* @__PURE__ */ C(
|
|
9876
|
+
}), l.value === "summary" ? /* @__PURE__ */ C(ah, {
|
|
9875
9877
|
userName: e.userName,
|
|
9876
9878
|
sectionNames: a,
|
|
9877
|
-
diffs:
|
|
9879
|
+
diffs: eh(d, i),
|
|
9878
9880
|
defaultSectionName: o
|
|
9879
9881
|
}) : m ? /* @__PURE__ */ C("div", {
|
|
9880
9882
|
style: { padding: 16 },
|
|
9881
9883
|
children: m
|
|
9882
|
-
}) : /* @__PURE__ */ C(
|
|
9884
|
+
}) : /* @__PURE__ */ C(Bp, {
|
|
9883
9885
|
oldJson: f,
|
|
9884
9886
|
newJson: p
|
|
9885
9887
|
})] }),
|
|
@@ -9892,7 +9894,7 @@ var Hm = (e = {}) => Vm({
|
|
|
9892
9894
|
height: "90vh"
|
|
9893
9895
|
} })
|
|
9894
9896
|
});
|
|
9895
|
-
},
|
|
9897
|
+
}, ch = [
|
|
9896
9898
|
{
|
|
9897
9899
|
label: "10 / page",
|
|
9898
9900
|
value: 10
|
|
@@ -9905,8 +9907,8 @@ var Hm = (e = {}) => Vm({
|
|
|
9905
9907
|
label: "50 / page",
|
|
9906
9908
|
value: 50
|
|
9907
9909
|
}
|
|
9908
|
-
],
|
|
9909
|
-
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s =
|
|
9910
|
+
], lh = (e, t = {}) => {
|
|
9911
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = eh(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
9910
9912
|
if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
|
|
9911
9913
|
switch (a) {
|
|
9912
9914
|
case "Created": return `Created by ${r}`;
|
|
@@ -9916,7 +9918,7 @@ var Hm = (e = {}) => Vm({
|
|
|
9916
9918
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
9917
9919
|
default: return `Change by ${r}`;
|
|
9918
9920
|
}
|
|
9919
|
-
},
|
|
9921
|
+
}, uh = ({ logs: e, data: t, total: n, loading: r, selectedPage: i, rowsPerPage: a, sectionNames: o, defaultSectionName: s, filterToggles: c = [], transformDiffsConfig: l, onChangeRowsPerPage: u, onSelectPage: d, onClickSnapshot: f, snapshotLoading: p, getActions: m, isLogDisabled: h }) => {
|
|
9920
9922
|
let [g, _] = y(!1), [v, b] = y(null), x = (e) => {
|
|
9921
9923
|
if (e.snapshot) {
|
|
9922
9924
|
f == null || f(e.snapshot, e);
|
|
@@ -9935,7 +9937,7 @@ var Hm = (e = {}) => Vm({
|
|
|
9935
9937
|
return {
|
|
9936
9938
|
cells: [
|
|
9937
9939
|
{
|
|
9938
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
9940
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : lh(e, l),
|
|
9939
9941
|
type: "Link",
|
|
9940
9942
|
disabled: n,
|
|
9941
9943
|
onClick: n ? void 0 : () => x(e),
|
|
@@ -9954,8 +9956,8 @@ var Hm = (e = {}) => Vm({
|
|
|
9954
9956
|
type: "Static"
|
|
9955
9957
|
},
|
|
9956
9958
|
{
|
|
9957
|
-
value:
|
|
9958
|
-
date:
|
|
9959
|
+
value: Zp({
|
|
9960
|
+
date: Zm(e),
|
|
9959
9961
|
showTime: !0
|
|
9960
9962
|
}),
|
|
9961
9963
|
type: "Static"
|
|
@@ -9965,12 +9967,12 @@ var Hm = (e = {}) => Vm({
|
|
|
9965
9967
|
};
|
|
9966
9968
|
});
|
|
9967
9969
|
return /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(Do, {
|
|
9968
|
-
heading: /* @__PURE__ */ w(
|
|
9970
|
+
heading: /* @__PURE__ */ w(yd, {
|
|
9969
9971
|
gap: !0,
|
|
9970
9972
|
wrap: !0,
|
|
9971
9973
|
children: [/* @__PURE__ */ C(ss, { children: "Changes" }), c.map((e) => {
|
|
9972
9974
|
var t;
|
|
9973
|
-
return /* @__PURE__ */ C(
|
|
9975
|
+
return /* @__PURE__ */ C(Zu, {
|
|
9974
9976
|
small: (t = e.small) == null || t,
|
|
9975
9977
|
checked: e.checked,
|
|
9976
9978
|
onChange: e.onChange,
|
|
@@ -9980,11 +9982,11 @@ var Hm = (e = {}) => Vm({
|
|
|
9980
9982
|
})]
|
|
9981
9983
|
}),
|
|
9982
9984
|
padding: !1,
|
|
9983
|
-
children: r ? /* @__PURE__ */ C(
|
|
9985
|
+
children: r ? /* @__PURE__ */ C(Id, {
|
|
9984
9986
|
height: "100px",
|
|
9985
9987
|
theme: Ri.WHITE,
|
|
9986
9988
|
children: /* @__PURE__ */ C(ka, { dark: !0 })
|
|
9987
|
-
}) : /* @__PURE__ */ C(
|
|
9989
|
+
}) : /* @__PURE__ */ C(tu, { table: {
|
|
9988
9990
|
headers: T,
|
|
9989
9991
|
testId: "auditlog-table",
|
|
9990
9992
|
rows: E,
|
|
@@ -9998,14 +10000,14 @@ var Hm = (e = {}) => Vm({
|
|
|
9998
10000
|
onChange: (e) => {
|
|
9999
10001
|
u(Number(e.target.value));
|
|
10000
10002
|
},
|
|
10001
|
-
options:
|
|
10003
|
+
options: ch,
|
|
10002
10004
|
value: a
|
|
10003
10005
|
},
|
|
10004
10006
|
onSelectPage: (e) => d(e),
|
|
10005
10007
|
small: !0
|
|
10006
10008
|
} }
|
|
10007
10009
|
} })
|
|
10008
|
-
}), g && v && v.diffs && /* @__PURE__ */ C(
|
|
10010
|
+
}), g && v && v.diffs && /* @__PURE__ */ C(sh, {
|
|
10009
10011
|
sectionNames: o,
|
|
10010
10012
|
isOpen: g,
|
|
10011
10013
|
onClose: () => _(!1),
|
|
@@ -10015,7 +10017,7 @@ var Hm = (e = {}) => Vm({
|
|
|
10015
10017
|
data: t,
|
|
10016
10018
|
transformDiffsConfig: l
|
|
10017
10019
|
})] });
|
|
10018
|
-
},
|
|
10020
|
+
}, dh = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
10019
10021
|
let i = window.location.href, a = v(i);
|
|
10020
10022
|
return f(() => {
|
|
10021
10023
|
a.current = i;
|
|
@@ -10038,20 +10040,20 @@ var Hm = (e = {}) => Vm({
|
|
|
10038
10040
|
});
|
|
10039
10041
|
};
|
|
10040
10042
|
}, [e, t]), null;
|
|
10041
|
-
},
|
|
10043
|
+
}, fh = {
|
|
10042
10044
|
errorBoundary: "_errorBoundary_hmco0_1",
|
|
10043
10045
|
sidebarErrorBoundary: "_sidebarErrorBoundary_hmco0_5",
|
|
10044
10046
|
rightSidebarErrorBoundary: "_rightSidebarErrorBoundary_hmco0_6"
|
|
10045
|
-
},
|
|
10046
|
-
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } =
|
|
10047
|
+
}, ph = ({ options: e }) => {
|
|
10048
|
+
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } = kp();
|
|
10047
10049
|
if (t) return /* @__PURE__ */ C(t, {});
|
|
10048
10050
|
if (n || r) return /* @__PURE__ */ C("div", {
|
|
10049
|
-
className: x(n ?
|
|
10051
|
+
className: x(n ? fh.sidebarErrorBoundary : "", r ? fh.rightSidebarErrorBoundary : ""),
|
|
10050
10052
|
style: a,
|
|
10051
10053
|
children: o == null ? void 0 : o.unexpectedError
|
|
10052
10054
|
});
|
|
10053
10055
|
let s = /* @__PURE__ */ C("div", {
|
|
10054
|
-
className:
|
|
10056
|
+
className: fh.errorBoundary,
|
|
10055
10057
|
style: a,
|
|
10056
10058
|
children: /* @__PURE__ */ C(Qs, { message: {
|
|
10057
10059
|
icon: !0,
|
|
@@ -10061,24 +10063,24 @@ var Hm = (e = {}) => Vm({
|
|
|
10061
10063
|
width: "100%"
|
|
10062
10064
|
} })
|
|
10063
10065
|
});
|
|
10064
|
-
return i ? /* @__PURE__ */ C(
|
|
10066
|
+
return i ? /* @__PURE__ */ C(Gd, {
|
|
10065
10067
|
scroll: !1,
|
|
10066
10068
|
padding: 0,
|
|
10067
10069
|
children: s
|
|
10068
10070
|
}) : s;
|
|
10069
|
-
},
|
|
10070
|
-
fallback: /* @__PURE__ */ C(
|
|
10071
|
+
}, mh = ({ children: e, options: t }) => /* @__PURE__ */ C(Mi.ErrorBoundary, {
|
|
10072
|
+
fallback: /* @__PURE__ */ C(ph, { options: t }),
|
|
10071
10073
|
onError: (e, t) => {
|
|
10072
10074
|
console.error("Error caught by boundary:", e, t);
|
|
10073
10075
|
},
|
|
10074
10076
|
children: e
|
|
10075
|
-
}),
|
|
10077
|
+
}), hh = (e, t = {}) => (n) => /* @__PURE__ */ C(mh, {
|
|
10076
10078
|
options: t,
|
|
10077
10079
|
children: /* @__PURE__ */ C(e, { ...n })
|
|
10078
|
-
}),
|
|
10079
|
-
|
|
10080
|
-
e ===
|
|
10080
|
+
}), gh = (e = {}) => (t) => hh(t, e), _h = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, vh = (e) => {
|
|
10081
|
+
Ap(Tp.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
10082
|
+
e === Tp.Translations ? Ap(e, Dp(t)) : Ap(e, _h(t) ? t : { ...t });
|
|
10081
10083
|
});
|
|
10082
10084
|
};
|
|
10083
10085
|
//#endregion
|
|
10084
|
-
export { ia as Accordion, Ea as AccordionWithDefaultToggle, yo as Actions, Fi as Align,
|
|
10086
|
+
export { ia as Accordion, Ea as AccordionWithDefaultToggle, yo as Actions, Fi as Align, uh as AuditLog, lo as Badge, Co as Breadcrumb, xo as BreadcrumbLinkType, q as Button, To as ButtonGroup, Ii as ButtonPosition, Aa as ButtonType, Do as Card, Sa as CheckBox, Qi as Chevron, ta as Collapse, Pi as Color, Jo as ColorInput, qo as ColorInputPopover, $o as Column, us as Dialog, Xp as DiffTable, Bp as DiffViewer, W as DisabledContext, is as Divider, _s as Drawer, np as ElementType, fu as Empty, mh as ErrorBoundary, Bi as EventKey, vd as Field, md as FileButton, Ds as FileInput, yd as Flex, xd as FormRow, No as Grid, H as GroupOrder, ss as Heading, xa as HelpIcon, G as Icon, U as IconType, Ss as Input, bs as InputGroup, sl as InputGroupAddon, ws as InputReaderMethods, zi as InputType, gd as Label, Pd as List, Cd as ListHeading, kd as ListSubheading, Id as Loader, pf as Mention, _o as Menu, $a as MenuCarat, Qa as MenuType, Qs as Message, Ks as MessageType, Ms as Modal, ic as NativeSelect, bl as NumberInput, Ud as OptionDropdown, Gd as Page, cl as Pagination, cp as PopConfirm, ko as Popover, Kd as Portal, Jd as PrintHeader, Fs as ProgressBar, Yd as RadioButton, ff as RichTextInput, hf as Row, tl as Select, Ip as SettingField, bf as SideBar, Sf as Skeleton, Al as Slider, Bs as SmartUploadModal, Os as Spacer, ka as Spinner, tu as Table, pd as TableImportExport, Yf as Tabs, ns as Text, Qf as TextArea, Xf as TextLink, Li as TextTransform, Ri as Theme, di as Toaster, Zu as Toggle, K as Tooltip, ap as TopBar, fp as Tree, wp as TreeTable, Ni as TriggerType, Hf as UnitInput, Kf as UnitSlider, Pp as UnitTable, dh as UsageTracker, Ju as dismissToast, zf as initializeContext, vh as initializeGuiLibrary, Ts as readFile, qu as toast, sc as useFocus, ks as useKeyboardEvent, uc as useWindowWidth, gh as withChainableErrorBoundary, hh as withErrorBoundary };
|