@oliasoft-open-source/react-ui-library 10.0.0-beta-2 → 10.0.0-beta-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/select/custom-select/custom-select.d.ts.map +1 -1
- package/dist/components/select/custom-select/hooks/combo-box-bridges.d.ts +0 -4
- package/dist/components/select/custom-select/hooks/combo-box-bridges.d.ts.map +1 -1
- package/dist/components/select/custom-select/layer/layer.d.ts.map +1 -1
- package/dist/components/select/select.test-case.stories.d.ts.map +1 -1
- package/dist/global.css +1 -1
- package/dist/index.js +850 -869
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2673,20 +2673,19 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
2673
2673
|
})
|
|
2674
2674
|
});
|
|
2675
2675
|
}, oc = {
|
|
2676
|
-
|
|
2677
|
-
layerContainer: "
|
|
2678
|
-
layer: "
|
|
2679
|
-
small: "
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
details: "_details_15t5m_151"
|
|
2676
|
+
select: "_select_12pjn_1",
|
|
2677
|
+
layerContainer: "_layerContainer_12pjn_6",
|
|
2678
|
+
layer: "_layer_12pjn_6",
|
|
2679
|
+
small: "_small_12pjn_50",
|
|
2680
|
+
listBoxItem: "_listBoxItem_12pjn_53",
|
|
2681
|
+
heading: "_heading_12pjn_57",
|
|
2682
|
+
option: "_option_12pjn_58",
|
|
2683
|
+
message: "_message_12pjn_59",
|
|
2684
|
+
check: "_check_12pjn_114",
|
|
2685
|
+
optionContent: "_optionContent_12pjn_131",
|
|
2686
|
+
label: "_label_12pjn_136",
|
|
2687
|
+
icon: "_icon_12pjn_143",
|
|
2688
|
+
details: "_details_12pjn_148"
|
|
2690
2689
|
}, sc = ({ triggerRef: e }) => {
|
|
2691
2690
|
let t = u(jr);
|
|
2692
2691
|
return qa({
|
|
@@ -2694,35 +2693,17 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
2694
2693
|
triggerRef: e,
|
|
2695
2694
|
close: () => t == null ? void 0 : t.close()
|
|
2696
2695
|
}), null;
|
|
2697
|
-
}, cc = ({
|
|
2698
|
-
let t = u(jr), n = _(t), r = _(!1), i = !!(t != null && t.isOpen);
|
|
2699
|
-
return m(() => {
|
|
2700
|
-
n.current = t;
|
|
2701
|
-
}), m(() => {
|
|
2702
|
-
if (!i) {
|
|
2703
|
-
r.current = !1;
|
|
2704
|
-
return;
|
|
2705
|
-
}
|
|
2706
|
-
if (r.current || e == null) return;
|
|
2707
|
-
r.current = !0;
|
|
2708
|
-
let t = requestAnimationFrame(() => {
|
|
2709
|
-
var t;
|
|
2710
|
-
let r = (t = n.current) == null ? void 0 : t.selectionManager;
|
|
2711
|
-
r == null || r.setFocused(!0), r == null || r.setFocusedKey(e);
|
|
2712
|
-
});
|
|
2713
|
-
return () => cancelAnimationFrame(t);
|
|
2714
|
-
}, [i, e]), null;
|
|
2715
|
-
}, lc = ({ stateRef: e }) => {
|
|
2696
|
+
}, cc = ({ stateRef: e }) => {
|
|
2716
2697
|
let t = u(jr);
|
|
2717
2698
|
return d(() => {
|
|
2718
2699
|
e.current = t ? { close: () => t.close() } : null;
|
|
2719
2700
|
}, [t, e]), null;
|
|
2720
|
-
},
|
|
2701
|
+
}, lc = () => {
|
|
2721
2702
|
let e = _(null);
|
|
2722
2703
|
return [e, () => {
|
|
2723
2704
|
e.current && e.current.focus();
|
|
2724
2705
|
}];
|
|
2725
|
-
},
|
|
2706
|
+
}, uc = () => {
|
|
2726
2707
|
let [e, t] = v(!1), n = _(!0);
|
|
2727
2708
|
return d(() => () => {
|
|
2728
2709
|
n.current = !1;
|
|
@@ -2733,29 +2714,29 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
2733
2714
|
});
|
|
2734
2715
|
})();
|
|
2735
2716
|
}, []), e;
|
|
2736
|
-
},
|
|
2737
|
-
let [e, t] = v(
|
|
2717
|
+
}, dc = () => window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, fc = () => {
|
|
2718
|
+
let [e, t] = v(dc()), n = rn(() => t(dc()), 150);
|
|
2738
2719
|
return d(() => (window.addEventListener("resize", n), () => {
|
|
2739
2720
|
window.removeEventListener("resize", n);
|
|
2740
2721
|
}), []), e;
|
|
2741
|
-
},
|
|
2722
|
+
}, pc = (e, t) => {
|
|
2742
2723
|
let n = document.createElement("canvas").getContext("2d");
|
|
2743
2724
|
return n ? (n.font = t, n.measureText(e).width) : 0;
|
|
2744
|
-
},
|
|
2745
|
-
let i =
|
|
2725
|
+
}, mc = "13px", hc = "12px", gc = "Roobert", _c = "sans-serif", vc = 12, yc = 8, bc = 30, xc = 24, Sc = 5, Cc = 3, wc = 2, Tc = (e = !1, t = !1) => `${e ? hc : mc} ${t ? gc : _c}`, Ec = (e = !1, t = !1) => (e ? yc : vc) + (e ? xc : bc) + (t ? 17 : 0), Dc = (e, t, n, r) => {
|
|
2726
|
+
let i = Tc(t, n), a = r ? pc(r, i) : 0;
|
|
2746
2727
|
return Math.ceil(e.reduce((e, n) => {
|
|
2747
2728
|
var r, a;
|
|
2748
|
-
let o = ((r = n == null || (a = n.actions) == null ? void 0 : a.length) == null ? 0 : r) * 24, s = n.icon ? parseInt(t ?
|
|
2729
|
+
let o = ((r = n == null || (a = n.actions) == null ? void 0 : a.length) == null ? 0 : r) * 24, s = n.icon ? parseInt(t ? hc : mc) + 7 : 0, c = pc(`${n.label} ${n.details || ""}`, i) + o + s;
|
|
2749
2730
|
return e = c > e ? c : e, e;
|
|
2750
|
-
}, a)) +
|
|
2751
|
-
},
|
|
2752
|
-
let r =
|
|
2753
|
-
return Math.ceil(i + ((t ?
|
|
2754
|
-
},
|
|
2731
|
+
}, a)) + Ec(t, !0);
|
|
2732
|
+
}, Oc = (e, t, n) => {
|
|
2733
|
+
let r = Tc(!0, n), i = pc(e.label, r);
|
|
2734
|
+
return Math.ceil(i + ((t ? Cc : Sc) * 2 + 2 + wc));
|
|
2735
|
+
}, kc = ({ label: e }) => /* @__PURE__ */ S("div", {
|
|
2755
2736
|
onClick: (e) => e.stopPropagation(),
|
|
2756
2737
|
className: oc.heading,
|
|
2757
2738
|
children: e
|
|
2758
|
-
}),
|
|
2739
|
+
}), Ac = ({ details: e, label: t, icon: n, selected: r = !1, actions: i, closeLayer: a }) => /* @__PURE__ */ C(x, { children: [
|
|
2759
2740
|
/* @__PURE__ */ S("div", {
|
|
2760
2741
|
className: oc.optionContent,
|
|
2761
2742
|
children: /* @__PURE__ */ C("span", {
|
|
@@ -2785,7 +2766,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
2785
2766
|
className: oc.check,
|
|
2786
2767
|
children: r ? /* @__PURE__ */ S(G, { icon: U.CHECK }) : null
|
|
2787
2768
|
})
|
|
2788
|
-
] }),
|
|
2769
|
+
] }), jc = "create", Mc = (e, t) => e.type === $a.HEADING ? `heading-${t}` : e.createAble ? jc : String(e.value), Nc = ({ item: e, closeLayer: t }) => {
|
|
2789
2770
|
var n;
|
|
2790
2771
|
let r = u(W), { section: i } = e, a = i.type === $a.HEADING, o = a || !!i.disabled || r;
|
|
2791
2772
|
return /* @__PURE__ */ S(Nr, {
|
|
@@ -2794,7 +2775,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
2794
2775
|
isDisabled: o,
|
|
2795
2776
|
className: b(a ? oc.listBoxItem : oc.option),
|
|
2796
2777
|
"data-testid": i.testId,
|
|
2797
|
-
children: ({ isSelected: e }) => a ? /* @__PURE__ */ S(
|
|
2778
|
+
children: ({ isSelected: e }) => a ? /* @__PURE__ */ S(kc, { label: i.label }) : /* @__PURE__ */ S(Ac, {
|
|
2798
2779
|
closeLayer: t,
|
|
2799
2780
|
actions: i.actions,
|
|
2800
2781
|
label: i.label,
|
|
@@ -2803,19 +2784,19 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
2803
2784
|
selected: e
|
|
2804
2785
|
})
|
|
2805
2786
|
});
|
|
2806
|
-
},
|
|
2787
|
+
}, Pc = (e, t) => {
|
|
2807
2788
|
var n;
|
|
2808
2789
|
return !t || `${String((n = e.label) == null ? "" : n)}${e.details ? String(e.details) : ""}`.toLowerCase().includes(t.toLowerCase());
|
|
2809
|
-
},
|
|
2810
|
-
id:
|
|
2790
|
+
}, Fc = (e, t) => ({
|
|
2791
|
+
id: Mc(e, t),
|
|
2811
2792
|
index: t,
|
|
2812
2793
|
section: e
|
|
2813
|
-
}),
|
|
2814
|
-
let f = r != null, p =
|
|
2794
|
+
}), Ic = (e) => e == null ? [] : Array.isArray(e) ? e.map(String) : typeof e == "object" && Symbol.iterator in e ? [...e].map(String) : [String(e)], Lc = ({ options: e, selectedOptions: t, onChange: n, onCreate: r, isMulti: i, isDisabled: a, small: o, width: s = null, autoLayerWidth: c = !1, placeholder: u = "", closeOnOptionActionClick: d }) => {
|
|
2795
|
+
let f = r != null, p = uc(), m = _(null), g = _(!1), [y, b] = v(""), [x, S] = v(!1), C = l((e) => {
|
|
2815
2796
|
S(e), e || b("");
|
|
2816
2797
|
}, []), w = l((e) => {
|
|
2817
2798
|
x && b(e);
|
|
2818
|
-
}, [x]), T = l(() => s ? s === "auto" ?
|
|
2799
|
+
}, [x]), T = l(() => s ? s === "auto" ? Dc(e, o, p, u == null ? void 0 : u) : s : "100%", [
|
|
2819
2800
|
s,
|
|
2820
2801
|
e,
|
|
2821
2802
|
o,
|
|
@@ -2824,7 +2805,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
2824
2805
|
]), E = l((t) => {
|
|
2825
2806
|
var n;
|
|
2826
2807
|
let r = (n = t == null ? void 0 : t.getBoundingClientRect().width) == null ? typeof T() == "number" ? T() : 0 : n;
|
|
2827
|
-
return c ? Math.max(
|
|
2808
|
+
return c ? Math.max(Dc(e, o, p, u == null ? void 0 : u), r) : r;
|
|
2828
2809
|
}, [
|
|
2829
2810
|
c,
|
|
2830
2811
|
e,
|
|
@@ -2833,8 +2814,8 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
2833
2814
|
u,
|
|
2834
2815
|
T
|
|
2835
2816
|
]), D = h(() => {
|
|
2836
|
-
let t = e.filter((e) =>
|
|
2837
|
-
return f && y && t.push(
|
|
2817
|
+
let t = e.filter((e) => Pc(e, y)).map((e, t) => Fc(e, t));
|
|
2818
|
+
return f && y && t.push(Fc({
|
|
2838
2819
|
label: `Create "${y}"`,
|
|
2839
2820
|
value: y,
|
|
2840
2821
|
createAble: !0
|
|
@@ -2848,7 +2829,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
2848
2829
|
return D.forEach((e) => {
|
|
2849
2830
|
t.set(String(e.id), e.section);
|
|
2850
2831
|
}), e.forEach((e, n) => {
|
|
2851
|
-
let r =
|
|
2832
|
+
let r = Mc(e, n);
|
|
2852
2833
|
t.has(r) || t.set(r, e);
|
|
2853
2834
|
}), t;
|
|
2854
2835
|
}, [D, e]), k = h(() => {
|
|
@@ -2891,7 +2872,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
2891
2872
|
handleChange: l((e) => {
|
|
2892
2873
|
if (a) return;
|
|
2893
2874
|
if (b(""), i) {
|
|
2894
|
-
let r =
|
|
2875
|
+
let r = Ic(e);
|
|
2895
2876
|
if (r.includes("create")) {
|
|
2896
2877
|
var t, n;
|
|
2897
2878
|
M(String((t = (n = O.get("create")) == null ? void 0 : n.value) == null ? "" : t));
|
|
@@ -2957,46 +2938,47 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
2957
2938
|
}, [d]),
|
|
2958
2939
|
comboBoxStateRef: m
|
|
2959
2940
|
};
|
|
2960
|
-
},
|
|
2941
|
+
}, Rc = (e, t, n) => {
|
|
2961
2942
|
!e || !Number.isInteger(t) || t < 0 || (e.scrollTop = t * n);
|
|
2962
|
-
},
|
|
2963
|
-
let s = _(null), c = r ? 24 : 30, l = e.length < 10 ? c * Math.max(e.length, 1) : c * 10;
|
|
2943
|
+
}, zc = ({ items: e, selectedItemId: t, width: n, small: r, isMulti: i = !1, closeLayer: a, testId: o }) => {
|
|
2944
|
+
let s = _(null), c = r ? 24 : 30, l = e.length < 10 ? c * Math.max(e.length, 1) : c * 10, u = b(oc.layer, r && oc.small);
|
|
2964
2945
|
return d(() => {
|
|
2965
2946
|
if (!t) return;
|
|
2966
2947
|
let n = e.findIndex((e) => String(e.id) === t);
|
|
2967
2948
|
if (n < 0) return;
|
|
2968
2949
|
let r = requestAnimationFrame(() => {
|
|
2969
|
-
|
|
2950
|
+
Rc(s.current, n, c);
|
|
2970
2951
|
});
|
|
2971
2952
|
return () => cancelAnimationFrame(r);
|
|
2972
2953
|
}, [
|
|
2973
2954
|
e,
|
|
2974
2955
|
c,
|
|
2975
2956
|
t
|
|
2976
|
-
]), /* @__PURE__ */ S(
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2957
|
+
]), /* @__PURE__ */ S(Fr, {
|
|
2958
|
+
layout: Pr,
|
|
2959
|
+
layoutOptions: { rowSize: c },
|
|
2960
|
+
children: /* @__PURE__ */ S(Mr, {
|
|
2961
|
+
ref: s,
|
|
2962
|
+
"aria-label": "Options",
|
|
2963
|
+
className: u,
|
|
2964
|
+
style: {
|
|
2965
|
+
height: l,
|
|
2966
|
+
width: n
|
|
2967
|
+
},
|
|
2968
|
+
selectionBehavior: i ? "toggle" : "replace",
|
|
2969
|
+
autoFocus: e.length > 0,
|
|
2970
|
+
renderEmptyState: () => /* @__PURE__ */ S("div", {
|
|
2971
|
+
className: oc.message,
|
|
2972
|
+
children: "No matches"
|
|
2973
|
+
}),
|
|
2974
|
+
"data-testid": o,
|
|
2975
|
+
children: (e) => /* @__PURE__ */ S(Nc, {
|
|
2976
|
+
item: e,
|
|
2977
|
+
closeLayer: a
|
|
2993
2978
|
})
|
|
2994
|
-
})
|
|
2995
|
-
className: oc.message,
|
|
2996
|
-
children: "No matches"
|
|
2997
|
-
}) }) })
|
|
2979
|
+
})
|
|
2998
2980
|
});
|
|
2999
|
-
},
|
|
2981
|
+
}, Bc = {
|
|
3000
2982
|
possiblePlacements: ["bottom-start", "top-start"],
|
|
3001
2983
|
placement: "bottom-start"
|
|
3002
2984
|
}, Y = {
|
|
@@ -3031,16 +3013,16 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3031
3013
|
groupOrderMiddle: "_groupOrderMiddle_u52ph_323",
|
|
3032
3014
|
groupOrderLast: "_groupOrderLast_u52ph_327",
|
|
3033
3015
|
detailedLabel: "_detailedLabel_u52ph_332"
|
|
3034
|
-
},
|
|
3016
|
+
}, Vc = (e, t, n, r) => {
|
|
3035
3017
|
let i = [], a = [], o = 0;
|
|
3036
3018
|
return e.forEach((s, c) => {
|
|
3037
|
-
o +=
|
|
3019
|
+
o += Oc(s, n, r), c === e.length - 1 && o < t || o < t - 24 ? i.push(s) : a.push(s);
|
|
3038
3020
|
}), {
|
|
3039
3021
|
displayed: i,
|
|
3040
3022
|
overflow: a
|
|
3041
3023
|
};
|
|
3042
|
-
},
|
|
3043
|
-
let { displayed: i, overflow: a } =
|
|
3024
|
+
}, Hc = ({ selectedOptions: e, small: t, width: n, testId: r }) => {
|
|
3025
|
+
let { displayed: i, overflow: a } = Vc(e, n, t, uc());
|
|
3044
3026
|
return /* @__PURE__ */ C("div", {
|
|
3045
3027
|
className: Y.multiOptions,
|
|
3046
3028
|
"data-testid": r && `${r}-value`,
|
|
@@ -3059,15 +3041,15 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3059
3041
|
})
|
|
3060
3042
|
})]
|
|
3061
3043
|
});
|
|
3062
|
-
},
|
|
3044
|
+
}, Uc = (e, t) => {
|
|
3063
3045
|
let n = e && t, [r, i] = v(!1);
|
|
3064
3046
|
return !n && r && i(!1), d(() => {
|
|
3065
3047
|
if (!n) return;
|
|
3066
3048
|
let e = window.setTimeout(() => i(!0), 0);
|
|
3067
3049
|
return () => window.clearTimeout(e);
|
|
3068
3050
|
}, [n]), n && r;
|
|
3069
|
-
},
|
|
3070
|
-
let l = _(null), u = _(null), [d, f] = v(0), p =
|
|
3051
|
+
}, Wc = ({ selectedOptions: e, searchable: t = !1, searchValue: n, error: r, placeholder: i = "Select...", small: a, isOpen: o = !1, testId: s, tabIndex: c }) => {
|
|
3052
|
+
let l = _(null), u = _(null), [d, f] = v(0), p = Uc(t, o), h = Array.isArray(e), g = h ? e.length > 0 : !!e, y = n ? n.length + 1 : 1;
|
|
3071
3053
|
return m(() => {
|
|
3072
3054
|
var e, t;
|
|
3073
3055
|
if (!h || !g) return;
|
|
@@ -3082,7 +3064,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3082
3064
|
className: Y.triggerInputContainer,
|
|
3083
3065
|
ref: l,
|
|
3084
3066
|
children: [
|
|
3085
|
-
g ? h ? /* @__PURE__ */ S(
|
|
3067
|
+
g ? h ? /* @__PURE__ */ S(Hc, {
|
|
3086
3068
|
selectedOptions: e,
|
|
3087
3069
|
small: a,
|
|
3088
3070
|
width: d,
|
|
@@ -3115,7 +3097,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3115
3097
|
})
|
|
3116
3098
|
]
|
|
3117
3099
|
});
|
|
3118
|
-
},
|
|
3100
|
+
}, Gc = ({ selectedOptions: e, searchValue: t, searchable: n, clearable: r, error: i, warning: a, tooltip: o, small: s, isInTable: c, disabled: l, onClickClear: u, tabIndex: d, isOpen: f, triggerRef: p, onFocus: m, onBlur: h, groupOrder: g, maxTooltipWidth: _, placeholder: v, right: y, testId: w }) => {
|
|
3119
3101
|
var T;
|
|
3120
3102
|
let E = Array.isArray(e) ? e.length > 0 && ((T = e[0]) == null ? void 0 : T.value) != null : (e == null ? void 0 : e.value) != null, D = r && E, O = (() => {
|
|
3121
3103
|
if (g) switch (g) {
|
|
@@ -3142,7 +3124,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3142
3124
|
"data-warning": a || null,
|
|
3143
3125
|
"data-testid": w,
|
|
3144
3126
|
children: [
|
|
3145
|
-
/* @__PURE__ */ S(
|
|
3127
|
+
/* @__PURE__ */ S(Wc, {
|
|
3146
3128
|
selectedOptions: k,
|
|
3147
3129
|
placeholder: v,
|
|
3148
3130
|
searchable: n,
|
|
@@ -3184,8 +3166,8 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3184
3166
|
display: "block",
|
|
3185
3167
|
children: A
|
|
3186
3168
|
}) });
|
|
3187
|
-
},
|
|
3188
|
-
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: d = "", small: f = !1, tabIndex: p = 0, onFocus: h = () => {}, onBlur: g = () => {}, searchable: y = !0, clearable: b = !1, maxTooltipWidth: x, closeOnOptionActionClick: w, isInTable: T = !1, groupOrder: E, right: D = !1, width: O = null, autoLayerWidth: k = !1, testId: A } = e, j = u(W), M = n || j, N = _(null), [P, F] = v(0), { inputValue: I, isOpen: L, setIsOpen: R, handleInputChange: z, collectionItems: B, comboValue: ee, selectedItemId: te, getTriggerWidth: ne, getLayerWidth: V, handleChange: re, handleClear: ie, closeLayer: ae, comboBoxStateRef: oe } =
|
|
3169
|
+
}, Kc = (e) => {
|
|
3170
|
+
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: d = "", small: f = !1, tabIndex: p = 0, onFocus: h = () => {}, onBlur: g = () => {}, searchable: y = !0, clearable: b = !1, maxTooltipWidth: x, closeOnOptionActionClick: w, isInTable: T = !1, groupOrder: E, right: D = !1, width: O = null, autoLayerWidth: k = !1, testId: A } = e, j = u(W), M = n || j, N = _(null), [P, F] = v(0), { inputValue: I, isOpen: L, setIsOpen: R, handleInputChange: z, collectionItems: B, comboValue: ee, selectedItemId: te, getTriggerWidth: ne, getLayerWidth: V, handleChange: re, handleClear: ie, closeLayer: ae, comboBoxStateRef: oe } = Lc({
|
|
3189
3171
|
options: o,
|
|
3190
3172
|
selectedOptions: s,
|
|
3191
3173
|
onChange: c,
|
|
@@ -3202,7 +3184,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3202
3184
|
L && F(V(N.current));
|
|
3203
3185
|
}, [V, L]), /* @__PURE__ */ C(Ar, {
|
|
3204
3186
|
"aria-label": d || "Select",
|
|
3205
|
-
className: oc.
|
|
3187
|
+
className: oc.select,
|
|
3206
3188
|
style: { width: ne() },
|
|
3207
3189
|
isDisabled: M,
|
|
3208
3190
|
selectionMode: t ? "multiple" : "single",
|
|
@@ -3216,10 +3198,9 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3216
3198
|
menuTrigger: "manual",
|
|
3217
3199
|
onOpenChange: R,
|
|
3218
3200
|
children: [
|
|
3219
|
-
/* @__PURE__ */ S(cc, { selectedItemId: te }),
|
|
3220
3201
|
/* @__PURE__ */ S(sc, { triggerRef: N }),
|
|
3221
|
-
/* @__PURE__ */ S(
|
|
3222
|
-
/* @__PURE__ */ S(
|
|
3202
|
+
/* @__PURE__ */ S(cc, { stateRef: oe }),
|
|
3203
|
+
/* @__PURE__ */ S(Gc, {
|
|
3223
3204
|
selectedOptions: s,
|
|
3224
3205
|
searchValue: I,
|
|
3225
3206
|
searchable: y,
|
|
@@ -3244,11 +3225,11 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3244
3225
|
}),
|
|
3245
3226
|
/* @__PURE__ */ S(Ga, {
|
|
3246
3227
|
className: oc.layerContainer,
|
|
3247
|
-
placement:
|
|
3228
|
+
placement: Bc.placement,
|
|
3248
3229
|
portalTriggerRef: N,
|
|
3249
3230
|
triggerRef: N,
|
|
3250
3231
|
offset: 0,
|
|
3251
|
-
children: /* @__PURE__ */ S(
|
|
3232
|
+
children: /* @__PURE__ */ S(zc, {
|
|
3252
3233
|
items: B,
|
|
3253
3234
|
selectedItemId: te,
|
|
3254
3235
|
width: P,
|
|
@@ -3260,32 +3241,32 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3260
3241
|
})
|
|
3261
3242
|
]
|
|
3262
3243
|
});
|
|
3263
|
-
},
|
|
3244
|
+
}, qc = (e) => /* @__PURE__ */ S(Kc, { ...e }), Jc = (e) => e == null || e === "", Yc = (e) => /^-?\d+(\.\d+)?$/.test(e.trim()), Xc = (e) => e instanceof Array, Zc = (e, t) => t && Array.isArray(e) ? e.map((e) => typeof e == "string" || typeof e == "number" ? {
|
|
3264
3245
|
label: e,
|
|
3265
3246
|
value: e
|
|
3266
|
-
} : e) : e,
|
|
3247
|
+
} : e) : e, Qc = (e, t) => {
|
|
3267
3248
|
if (typeof t == "object" && t && t.hasOwnProperty("label") && t.hasOwnProperty("value")) return t;
|
|
3268
3249
|
{
|
|
3269
3250
|
let n = typeof t == "object" && t && t.hasOwnProperty("value") ? t.value : t;
|
|
3270
|
-
return (Array.isArray(e) ? e.filter((e) => e.type !== $a.HEADING).find((e) => e.value == n) : void 0) || (
|
|
3251
|
+
return (Array.isArray(e) ? e.filter((e) => e.type !== $a.HEADING).find((e) => e.value == n) : void 0) || (Jc(n) ? void 0 : {
|
|
3271
3252
|
value: n,
|
|
3272
3253
|
label: n
|
|
3273
3254
|
});
|
|
3274
3255
|
}
|
|
3275
|
-
},
|
|
3276
|
-
let n =
|
|
3256
|
+
}, $c = (e, t) => Xc(t) ? t.map((t) => Qc(e, t)).filter((e) => e !== void 0) : t === null ? void 0 : Qc(e, t), el = (e) => Array.isArray(e) && e.some((e) => typeof e == "string" || typeof e == "number"), tl = (e, t) => {
|
|
3257
|
+
let n = Xc(t) ? t : Jc(t) ? [] : [t];
|
|
3277
3258
|
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));
|
|
3278
|
-
},
|
|
3279
|
-
let r = Array.isArray(e) ? e : [], i =
|
|
3259
|
+
}, nl = (e, t, n) => {
|
|
3260
|
+
let r = Array.isArray(e) ? e : [], i = Xc(t), a = el(r), o = Zc(r, a), s = $c(o, t);
|
|
3280
3261
|
return {
|
|
3281
3262
|
options: o,
|
|
3282
3263
|
selectedOptions: s,
|
|
3283
3264
|
multi: i,
|
|
3284
3265
|
simpleInputs: a,
|
|
3285
|
-
hasNonExistentValue: n && s !== void 0 ?
|
|
3266
|
+
hasNonExistentValue: n && s !== void 0 ? tl(o, s) : !1
|
|
3286
3267
|
};
|
|
3287
|
-
},
|
|
3288
|
-
let { name: t = "", options: n = [], value: r, native: i = !1, onChange: a = yn, deprecatedEventHandler: o = !1, warning: s, error: c, checkNonExistentValues: l = !0, closeOnOptionActionClick: u = !0, testId: d, disabled: f, multi: p, ...m } = e, { multi: h, simpleInputs: g, options: _, selectedOptions: v, hasNonExistentValue: y } =
|
|
3268
|
+
}, rl = (e) => {
|
|
3269
|
+
let { name: t = "", options: n = [], value: r, native: i = !1, onChange: a = yn, deprecatedEventHandler: o = !1, warning: s, error: c, checkNonExistentValues: l = !0, closeOnOptionActionClick: u = !0, testId: d, disabled: f, multi: p, ...m } = e, { multi: h, simpleInputs: g, options: _, selectedOptions: v, hasNonExistentValue: y } = nl(n, r, l), b = !h, x = i && b;
|
|
3289
3270
|
i && !b && console.warn("Native select does not support provided props (see stories)");
|
|
3290
3271
|
let w = "Value no longer available for re-selection", T = y && !f ? s ? /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("div", { children: w }), /* @__PURE__ */ S("div", { children: s })] }) : w : s, E = y && c && !f ? /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("div", { children: w }), /* @__PURE__ */ S("div", { children: c })] }) : c, D = (e, n) => {
|
|
3291
3272
|
if (o) {
|
|
@@ -3313,7 +3294,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3313
3294
|
error: E,
|
|
3314
3295
|
testId: d,
|
|
3315
3296
|
disabled: f
|
|
3316
|
-
}) : /* @__PURE__ */ S(
|
|
3297
|
+
}) : /* @__PURE__ */ S(qc, {
|
|
3317
3298
|
...m,
|
|
3318
3299
|
options: _,
|
|
3319
3300
|
selectedOptions: v,
|
|
@@ -3325,11 +3306,11 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3325
3306
|
disabled: f,
|
|
3326
3307
|
closeOnOptionActionClick: u
|
|
3327
3308
|
});
|
|
3328
|
-
},
|
|
3309
|
+
}, il = (e, t) => t || e && e.reduce((e, t) => t != null && t.selected ? Number(t == null ? void 0 : t.value) : e, 10) || 10, al = (e, t) => {
|
|
3329
3310
|
if (!t || !e) return 10;
|
|
3330
3311
|
let { options: n, value: r } = t, i = Number(r);
|
|
3331
|
-
return i === 0 ? 1 : Math.ceil(e /
|
|
3332
|
-
},
|
|
3312
|
+
return i === 0 ? 1 : Math.ceil(e / il(n, i));
|
|
3313
|
+
}, ol = (e, t, n = "Selected page must be a positive whole number between 1 and") => {
|
|
3333
3314
|
let r = `${n} ${t}`, i = {
|
|
3334
3315
|
valid: !0,
|
|
3335
3316
|
error: null
|
|
@@ -3338,40 +3319,40 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3338
3319
|
valid: !1,
|
|
3339
3320
|
error: r
|
|
3340
3321
|
} : i;
|
|
3341
|
-
},
|
|
3322
|
+
}, sl = { paginationContainer: "_paginationContainer_1tmz4_1" }, cl = {
|
|
3342
3323
|
addon: "_addon_b4w53_1",
|
|
3343
3324
|
small: "_small_b4w53_12",
|
|
3344
3325
|
groupOrderFirst: "_groupOrderFirst_b4w53_16",
|
|
3345
3326
|
groupOrderMiddle: "_groupOrderMiddle_b4w53_17",
|
|
3346
3327
|
groupOrderLast: "_groupOrderLast_b4w53_21"
|
|
3347
|
-
},
|
|
3328
|
+
}, ll = ({ children: e, groupOrder: t, small: n = !1 }) => {
|
|
3348
3329
|
let r = (() => {
|
|
3349
3330
|
if (t) switch (t) {
|
|
3350
|
-
case H.FIRST: return
|
|
3351
|
-
case H.LAST: return
|
|
3352
|
-
default: return
|
|
3331
|
+
case H.FIRST: return cl.groupOrderFirst;
|
|
3332
|
+
case H.LAST: return cl.groupOrderLast;
|
|
3333
|
+
default: return cl.groupOrderMiddle;
|
|
3353
3334
|
}
|
|
3354
3335
|
return "";
|
|
3355
3336
|
})();
|
|
3356
3337
|
return /* @__PURE__ */ S("span", {
|
|
3357
|
-
className: b(
|
|
3338
|
+
className: b(cl.addon, r, n ? cl.small : ""),
|
|
3358
3339
|
children: e
|
|
3359
3340
|
});
|
|
3360
|
-
},
|
|
3361
|
-
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 =
|
|
3341
|
+
}, ul = ({ pagination: e }) => {
|
|
3342
|
+
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 = al(t, a), [u, f] = v(String(n));
|
|
3362
3343
|
d(() => {
|
|
3363
3344
|
f(String(n));
|
|
3364
3345
|
}, [n]);
|
|
3365
|
-
let { error: p } =
|
|
3366
|
-
let { valid: t } =
|
|
3346
|
+
let { error: p } = ol(u, l, o), m = (e) => {
|
|
3347
|
+
let { valid: t } = ol(e, l, o);
|
|
3367
3348
|
f(e), t && e !== "" && i && i(Number(e));
|
|
3368
3349
|
};
|
|
3369
3350
|
return /* @__PURE__ */ C("div", {
|
|
3370
|
-
className:
|
|
3351
|
+
className: sl.paginationContainer,
|
|
3371
3352
|
children: [
|
|
3372
3353
|
a && /* @__PURE__ */ S("div", {
|
|
3373
3354
|
style: { flexShrink: 0 },
|
|
3374
|
-
children: /* @__PURE__ */ S(
|
|
3355
|
+
children: /* @__PURE__ */ S(rl, {
|
|
3375
3356
|
onChange: (e) => {
|
|
3376
3357
|
a.onChange && a.onChange(e), m("1");
|
|
3377
3358
|
},
|
|
@@ -3409,7 +3390,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3409
3390
|
width: "50px",
|
|
3410
3391
|
disabled: c || l <= 1,
|
|
3411
3392
|
error: p
|
|
3412
|
-
}), /* @__PURE__ */ C(
|
|
3393
|
+
}), /* @__PURE__ */ C(ll, { children: ["of ", l] })]
|
|
3413
3394
|
}),
|
|
3414
3395
|
/* @__PURE__ */ S(K, {
|
|
3415
3396
|
small: r,
|
|
@@ -3430,7 +3411,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3430
3411
|
})
|
|
3431
3412
|
]
|
|
3432
3413
|
});
|
|
3433
|
-
},
|
|
3414
|
+
}, dl = ({ pagination: e, actions: t, content: n, testId: r }) => {
|
|
3434
3415
|
let i = t && t.length, a = n != null, o = () => {
|
|
3435
3416
|
if (e) {
|
|
3436
3417
|
var t;
|
|
@@ -3447,19 +3428,19 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3447
3428
|
children: /* @__PURE__ */ S("div", { children: n })
|
|
3448
3429
|
}) : null, i || o() ? /* @__PURE__ */ C("div", {
|
|
3449
3430
|
className: rc.section,
|
|
3450
|
-
children: [e && o() ? /* @__PURE__ */ S(
|
|
3431
|
+
children: [e && o() ? /* @__PURE__ */ S(ul, { pagination: e }) : /* @__PURE__ */ S("div", {}), i && /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(bo, { actions: t }) })]
|
|
3451
3432
|
}) : null]
|
|
3452
3433
|
}) : null;
|
|
3453
|
-
},
|
|
3434
|
+
}, fl = (e) => {
|
|
3454
3435
|
let t = Math.max(...e.reduce((e, t) => {
|
|
3455
3436
|
let n = t.cells.map((e) => e.colSpan ? e.colSpan : 1).reduce((e, t) => e + t, 0);
|
|
3456
3437
|
return e.concat(n);
|
|
3457
3438
|
}, []));
|
|
3458
3439
|
return isNaN(t) ? 0 : t;
|
|
3459
|
-
},
|
|
3460
|
-
let n = [
|
|
3440
|
+
}, pl = (e, t) => {
|
|
3441
|
+
let n = [fl(t), fl(e)];
|
|
3461
3442
|
return Math.max(...n);
|
|
3462
|
-
},
|
|
3443
|
+
}, ml = (e) => e.reduce((e, t) => t.actions && t.actions.length > 0 ? 1 : e, 0), hl = (e, t) => ml(t) > 0 || ml(e) > 0, gl = {
|
|
3463
3444
|
clickableRow: "_clickableRow_g8hv8_1",
|
|
3464
3445
|
hoverableRow: "_hoverableRow_g8hv8_4",
|
|
3465
3446
|
rowActive: "_rowActive_g8hv8_4",
|
|
@@ -3468,11 +3449,11 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3468
3449
|
dragIconCell: "_dragIconCell_g8hv8_34",
|
|
3469
3450
|
dragIcon: "_dragIcon_g8hv8_34",
|
|
3470
3451
|
dragIconDisabled: "_dragIconDisabled_g8hv8_55"
|
|
3471
|
-
},
|
|
3452
|
+
}, _l = ({ colSpan: e, children: t, flush: n }) => /* @__PURE__ */ S("tr", { children: /* @__PURE__ */ S("td", {
|
|
3472
3453
|
colSpan: e,
|
|
3473
|
-
className: b(
|
|
3454
|
+
className: b(gl.expandableRow, n ? gl.flush : ""),
|
|
3474
3455
|
children: t
|
|
3475
|
-
}) }),
|
|
3456
|
+
}) }), vl = (e, t = {
|
|
3476
3457
|
leftAligned: "",
|
|
3477
3458
|
rightAligned: "",
|
|
3478
3459
|
centerAligned: ""
|
|
@@ -3485,7 +3466,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3485
3466
|
case Mi.CENTER: return n ? Mi.CENTER : t.centerAligned;
|
|
3486
3467
|
default: return n ? Mi.LEFT : t.leftAligned;
|
|
3487
3468
|
}
|
|
3488
|
-
},
|
|
3469
|
+
}, yl = (e, t = !1, n = 0) => {
|
|
3489
3470
|
if (!e || e.length === 0) return [];
|
|
3490
3471
|
let r = e.every((e) => Array.isArray(e)), i = e.every((e) => typeof e == "string");
|
|
3491
3472
|
return r && t ? e[n] || [] : i ? e : (console.warn("getHeaderAlignment: alignments array contains a mix of strings and arrays, returning an empty array."), []);
|
|
@@ -3520,7 +3501,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3520
3501
|
popover: "_popover_g4jsi_211",
|
|
3521
3502
|
disabledPointerEvents: "_disabledPointerEvents_g4jsi_214",
|
|
3522
3503
|
standaloneCheckbox: "_standaloneCheckbox_g4jsi_217"
|
|
3523
|
-
},
|
|
3504
|
+
}, bl = ({ cell: e, columnAlignment: t, testId: n, type: r }) => /* @__PURE__ */ S(Cs, {
|
|
3524
3505
|
name: e.name,
|
|
3525
3506
|
value: e.value,
|
|
3526
3507
|
onChange: (t) => {
|
|
@@ -3545,9 +3526,9 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3545
3526
|
tabIndex: e.disabled ? -1 : 0,
|
|
3546
3527
|
tooltip: e.tooltip,
|
|
3547
3528
|
type: r
|
|
3548
|
-
}),
|
|
3529
|
+
}), xl = (e) => e ? typeof e == "string" ? e : sn(e) ? e[0] : e.fieldName : "", Sl = ({ name: e, placeholder: t = "", disabled: n = !1, error: r = !1, left: i = !1, small: a = !1, width: o = "100%", value: s = "", onChange: c = () => {}, onFocus: l = () => {}, onBlur: u = () => {}, selectOnFocus: f = !0, tabIndex: p = 0, testId: m, tooltip: h = null, warning: g = !1, validationCallback: y = () => {}, allowEmpty: b = !1, isInTable: x, groupOrder: C, enableCosmeticRounding: w = !0, enableDisplayRounding: T = !1, roundDisplayValue: E, disableInternalErrorValidationMessages: D = !1, disableValidationOnFocus: O = !1 }) => {
|
|
3549
3530
|
let k = (e) => {
|
|
3550
|
-
let n = Dr(e), r = t &&
|
|
3531
|
+
let n = Dr(e), r = t && Jc(e);
|
|
3551
3532
|
return [Infinity, -Infinity].includes(Number(e)) || r ? {
|
|
3552
3533
|
valid: !0,
|
|
3553
3534
|
errors: []
|
|
@@ -3560,7 +3541,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3560
3541
|
var t;
|
|
3561
3542
|
let n = !!(e != null && e.endsWith("0")), r = w && e && !n && (t = k(e)) != null && t.valid ? br(e) : e;
|
|
3562
3543
|
return Tr(r);
|
|
3563
|
-
}, j = _(null), [M, N] = v(A(Tr(s))), [P, F] = v(!1), I =
|
|
3544
|
+
}, j = _(null), [M, N] = v(A(Tr(s))), [P, F] = v(!1), I = xl(e), { valid: L, errors: R } = k(M), z = R && R.length && !D ? R[0] : null;
|
|
3564
3545
|
d(() => {
|
|
3565
3546
|
let e = A(Tr(s));
|
|
3566
3547
|
wr(M) !== wr(e) && N(e);
|
|
@@ -3578,7 +3559,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3578
3559
|
let B = (e) => {
|
|
3579
3560
|
var n, r;
|
|
3580
3561
|
let i = "key" in e ? M : e == null || (n = e.target) == null ? void 0 : n.value, a = or(i.replaceAll(" ", "").replaceAll("|", ""));
|
|
3581
|
-
N(a), ((r = k(a)) != null && r.valid || t &&
|
|
3562
|
+
N(a), ((r = k(a)) != null && r.valid || t && Jc(i)) && c({
|
|
3582
3563
|
...e,
|
|
3583
3564
|
target: {
|
|
3584
3565
|
...e.target,
|
|
@@ -3626,9 +3607,9 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3626
3607
|
tooltip: h,
|
|
3627
3608
|
ref: j
|
|
3628
3609
|
}, I);
|
|
3629
|
-
},
|
|
3610
|
+
}, Cl = ({ cell: e, columnAlignment: t, testId: n }) => {
|
|
3630
3611
|
var r;
|
|
3631
|
-
return /* @__PURE__ */ S(
|
|
3612
|
+
return /* @__PURE__ */ S(Sl, {
|
|
3632
3613
|
name: e.name,
|
|
3633
3614
|
value: e.value,
|
|
3634
3615
|
onChange: (t) => {
|
|
@@ -3654,7 +3635,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3654
3635
|
roundDisplayValue: e.roundDisplayValue,
|
|
3655
3636
|
disableValidationOnFocus: e.disableValidationOnFocus
|
|
3656
3637
|
});
|
|
3657
|
-
},
|
|
3638
|
+
}, wl = ({ cell: e, columnAlignment: t, testId: n }) => /* @__PURE__ */ S(rl, {
|
|
3658
3639
|
name: e.name,
|
|
3659
3640
|
options: e.options,
|
|
3660
3641
|
onChange: (t) => {
|
|
@@ -3679,26 +3660,26 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3679
3660
|
right: t === Mi.RIGHT,
|
|
3680
3661
|
testId: n,
|
|
3681
3662
|
tabIndex: e.disabled ? -1 : 0
|
|
3682
|
-
}),
|
|
3663
|
+
}), Tl = ({ cell: e, columnAlignment: t, testId: n }) => /* @__PURE__ */ S("div", {
|
|
3683
3664
|
className: b(X.inputWrapper, e.type === "NumberInput" ? X.numberInputWrapper : ""),
|
|
3684
|
-
children: e.type === "Input" ? /* @__PURE__ */ S(
|
|
3665
|
+
children: e.type === "Input" ? /* @__PURE__ */ S(bl, {
|
|
3685
3666
|
cell: e,
|
|
3686
3667
|
columnAlignment: t,
|
|
3687
3668
|
testId: n
|
|
3688
|
-
}) : e.type === "NumberInput" ? /* @__PURE__ */ S(
|
|
3669
|
+
}) : e.type === "NumberInput" ? /* @__PURE__ */ S(Cl, {
|
|
3689
3670
|
cell: e,
|
|
3690
3671
|
columnAlignment: t,
|
|
3691
3672
|
testId: n
|
|
3692
|
-
}) : e.type === "DateInput" ? /* @__PURE__ */ S(
|
|
3673
|
+
}) : e.type === "DateInput" ? /* @__PURE__ */ S(bl, {
|
|
3693
3674
|
cell: e,
|
|
3694
3675
|
testId: n,
|
|
3695
3676
|
type: "date"
|
|
3696
|
-
}) : e.type === "Select" ? /* @__PURE__ */ S(
|
|
3677
|
+
}) : e.type === "Select" ? /* @__PURE__ */ S(wl, {
|
|
3697
3678
|
cell: e,
|
|
3698
3679
|
columnAlignment: t,
|
|
3699
3680
|
testId: n
|
|
3700
3681
|
}) : null
|
|
3701
|
-
}),
|
|
3682
|
+
}), El = ({ cell: e, testId: t }) => {
|
|
3702
3683
|
let n = u(W), { error: r, warning: i, tooltip: a, maxTooltipWidth: o } = e, s = (e) => J(e);
|
|
3703
3684
|
return /* @__PURE__ */ S("div", {
|
|
3704
3685
|
className: X.inputWrapper,
|
|
@@ -3724,7 +3705,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3724
3705
|
})
|
|
3725
3706
|
})
|
|
3726
3707
|
});
|
|
3727
|
-
},
|
|
3708
|
+
}, Dl = ({ cell: e, testId: t }) => /* @__PURE__ */ S("div", {
|
|
3728
3709
|
className: e.label ? "" : X.standaloneCheckbox,
|
|
3729
3710
|
children: /* @__PURE__ */ S(ga, {
|
|
3730
3711
|
text: e.tooltip,
|
|
@@ -3740,7 +3721,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3740
3721
|
indeterminate: e.indeterminate
|
|
3741
3722
|
})
|
|
3742
3723
|
})
|
|
3743
|
-
}),
|
|
3724
|
+
}), Ol = {
|
|
3744
3725
|
container: "_container_3cdfx_1",
|
|
3745
3726
|
small: "_small_3cdfx_9",
|
|
3746
3727
|
vertical: "_vertical_3cdfx_12",
|
|
@@ -3756,17 +3737,17 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3756
3737
|
markActive: "_markActive_3cdfx_146",
|
|
3757
3738
|
sliderDisabled: "_sliderDisabled_3cdfx_149",
|
|
3758
3739
|
label: "_label_3cdfx_161"
|
|
3759
|
-
},
|
|
3740
|
+
}, kl = (e, t) => bn(sn(e) ? e : [e]).slice(0, t ? 2 : 1), Al = (e, t) => t ? e : e[0], jl = Ur((e) => e.map(({ label: e, tooltip: t, value: n }) => ({
|
|
3760
3741
|
label: e,
|
|
3761
3742
|
tooltip: t,
|
|
3762
3743
|
value: Number(n)
|
|
3763
|
-
})), Wr),
|
|
3744
|
+
})), Wr), Ml = ({ name: e, label: t, width: n = "100%", labelWidth: r = "auto", testId: i, value: a, min: o, max: s, step: c = 1, marks: l = [], showArrows: d = !1, showTooltip: f = !1, tooltipFormatter: p = (e) => e, disabled: m = !1, range: g = !1, small: _ = !1, vertical: y = {
|
|
3764
3745
|
enabled: !1,
|
|
3765
3746
|
width: "100px",
|
|
3766
3747
|
height: "400px"
|
|
3767
3748
|
}, onChange: w, onChangeComplete: T }) => {
|
|
3768
|
-
let E = u(W), D = m || E, [O, k] = v(null), A =
|
|
3769
|
-
let r =
|
|
3749
|
+
let E = u(W), D = m || E, [O, k] = v(null), A = jl(l), j = h(() => kl(a, g), [g, a]), M = (n) => {
|
|
3750
|
+
let r = Al(n, g);
|
|
3770
3751
|
return { target: {
|
|
3771
3752
|
name: e == null ? "" : e,
|
|
3772
3753
|
value: r,
|
|
@@ -3779,7 +3760,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3779
3760
|
}, F = (e) => {
|
|
3780
3761
|
N(e), P(e);
|
|
3781
3762
|
}, I = () => /* @__PURE__ */ S("div", {
|
|
3782
|
-
className:
|
|
3763
|
+
className: Ol.button,
|
|
3783
3764
|
children: /* @__PURE__ */ S(K, {
|
|
3784
3765
|
basic: !0,
|
|
3785
3766
|
small: !0,
|
|
@@ -3793,7 +3774,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3793
3774
|
testId: i ? `${i}-min` : void 0
|
|
3794
3775
|
})
|
|
3795
3776
|
}), L = () => /* @__PURE__ */ S("div", {
|
|
3796
|
-
className:
|
|
3777
|
+
className: Ol.button,
|
|
3797
3778
|
children: /* @__PURE__ */ S(K, {
|
|
3798
3779
|
basic: !0,
|
|
3799
3780
|
small: !0,
|
|
@@ -3813,7 +3794,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3813
3794
|
if (i) return g ? `${i}-handle-${e}` : `${i}-handle`;
|
|
3814
3795
|
}, ee = (e) => g ? j[0] <= e && e <= j[1] : j[0] >= e, te = (e) => g ? Math.abs(e - j[0]) <= Math.abs(e - j[1]) ? [en(e, o, j[1]), j[1]] : [j[0], en(e, j[0], s)] : [en(e, o, s)];
|
|
3815
3796
|
return /* @__PURE__ */ C("div", {
|
|
3816
|
-
className: b(
|
|
3797
|
+
className: b(Ol.container, _ ? Ol.small : "", y.enabled ? Ol.vertical : ""),
|
|
3817
3798
|
style: y.enabled ? {
|
|
3818
3799
|
width: y.width,
|
|
3819
3800
|
height: y.height
|
|
@@ -3821,7 +3802,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3821
3802
|
children: [
|
|
3822
3803
|
d && (y.enabled ? /* @__PURE__ */ S(L, {}) : /* @__PURE__ */ S(I, {})),
|
|
3823
3804
|
/* @__PURE__ */ C(Hr.Root, {
|
|
3824
|
-
className: b(
|
|
3805
|
+
className: b(Ol.slider, D && Ol.sliderDisabled, d && Ol.hasArrows),
|
|
3825
3806
|
"data-testid": i,
|
|
3826
3807
|
disabled: D,
|
|
3827
3808
|
max: s,
|
|
@@ -3836,14 +3817,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3836
3817
|
step: c,
|
|
3837
3818
|
value: j,
|
|
3838
3819
|
children: [/* @__PURE__ */ C(Hr.Track, {
|
|
3839
|
-
className:
|
|
3840
|
-
children: [/* @__PURE__ */ S(Hr.Range, { className:
|
|
3841
|
-
className:
|
|
3820
|
+
className: Ol.track,
|
|
3821
|
+
children: [/* @__PURE__ */ S(Hr.Range, { className: Ol.range }), A.length > 0 && /* @__PURE__ */ S("span", {
|
|
3822
|
+
className: Ol.marks,
|
|
3842
3823
|
children: A.map(({ label: e, tooltip: t, value: n }) => {
|
|
3843
3824
|
let r = Number(n), i = ee(r), a = { [y.enabled ? "bottom" : "left"]: R(r) };
|
|
3844
3825
|
return /* @__PURE__ */ S("button", {
|
|
3845
3826
|
"aria-label": String(e == null ? n : e),
|
|
3846
|
-
className: b(
|
|
3827
|
+
className: b(Ol.mark, i && Ol.markActive),
|
|
3847
3828
|
disabled: D,
|
|
3848
3829
|
onClick: (e) => {
|
|
3849
3830
|
e.stopPropagation(), F(te(r));
|
|
@@ -3857,7 +3838,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3857
3838
|
t ? ": " : "",
|
|
3858
3839
|
e == null ? n : e
|
|
3859
3840
|
] }),
|
|
3860
|
-
children: /* @__PURE__ */ S("span", { className:
|
|
3841
|
+
children: /* @__PURE__ */ S("span", { className: Ol.dot })
|
|
3861
3842
|
})
|
|
3862
3843
|
}, String(n));
|
|
3863
3844
|
})
|
|
@@ -3866,7 +3847,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3866
3847
|
var i;
|
|
3867
3848
|
return /* @__PURE__ */ S(Hr.Thumb, {
|
|
3868
3849
|
"aria-label": String((i = t == null ? e : t) == null ? "Slider" : i),
|
|
3869
|
-
className:
|
|
3850
|
+
className: Ol.thumb,
|
|
3870
3851
|
"data-testid": B(r),
|
|
3871
3852
|
onKeyDown: () => k(r),
|
|
3872
3853
|
onKeyUp: () => k(null),
|
|
@@ -3875,7 +3856,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3875
3856
|
style: z(n),
|
|
3876
3857
|
children: f && O === r && /* @__PURE__ */ S(ga, {
|
|
3877
3858
|
display: "block",
|
|
3878
|
-
text: p(
|
|
3859
|
+
text: p(Al(j, g)),
|
|
3879
3860
|
forceOpen: !0,
|
|
3880
3861
|
updateOnAnimationFrame: !0,
|
|
3881
3862
|
triggerStyle: {
|
|
@@ -3888,15 +3869,15 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3888
3869
|
}),
|
|
3889
3870
|
d && (y.enabled ? /* @__PURE__ */ S(I, {}) : /* @__PURE__ */ S(L, {})),
|
|
3890
3871
|
t && /* @__PURE__ */ S("label", {
|
|
3891
|
-
className:
|
|
3872
|
+
className: Ol.label,
|
|
3892
3873
|
style: { width: r },
|
|
3893
3874
|
children: t
|
|
3894
3875
|
})
|
|
3895
3876
|
]
|
|
3896
3877
|
});
|
|
3897
|
-
},
|
|
3878
|
+
}, Nl = ({ cell: e }) => /* @__PURE__ */ S("div", {
|
|
3898
3879
|
className: X.inputWrapper,
|
|
3899
|
-
children: /* @__PURE__ */ S(
|
|
3880
|
+
children: /* @__PURE__ */ S(Ml, {
|
|
3900
3881
|
label: e.label,
|
|
3901
3882
|
testId: e.testId,
|
|
3902
3883
|
value: e.value,
|
|
@@ -3910,7 +3891,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3910
3891
|
tooltipFormatter: e.tooltipFormatter,
|
|
3911
3892
|
disabled: e.disabled
|
|
3912
3893
|
})
|
|
3913
|
-
}),
|
|
3894
|
+
}), Pl = ({ cell: e }) => {
|
|
3914
3895
|
let { tooltip: t, icon: n } = e;
|
|
3915
3896
|
return /* @__PURE__ */ S("div", {
|
|
3916
3897
|
className: X.iconCellWrapper,
|
|
@@ -3922,7 +3903,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3922
3903
|
children: /* @__PURE__ */ S(G, { icon: n })
|
|
3923
3904
|
})
|
|
3924
3905
|
});
|
|
3925
|
-
},
|
|
3906
|
+
}, Fl = ({ cell: e }) => /* @__PURE__ */ S(bo, { actions: e.actions }), Il = ({ cell: e }) => {
|
|
3926
3907
|
let { helpIcon: t } = e;
|
|
3927
3908
|
return t ? /* @__PURE__ */ S("div", {
|
|
3928
3909
|
className: X.icon,
|
|
@@ -3931,7 +3912,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3931
3912
|
text: t.tooltip
|
|
3932
3913
|
})
|
|
3933
3914
|
}) : null;
|
|
3934
|
-
},
|
|
3915
|
+
}, Ll = ({ cell: e }) => {
|
|
3935
3916
|
let { libraryIcon: t } = e;
|
|
3936
3917
|
return t ? /* @__PURE__ */ S("div", {
|
|
3937
3918
|
className: X.icon,
|
|
@@ -3941,7 +3922,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3941
3922
|
icon: U.LIBRARY
|
|
3942
3923
|
})
|
|
3943
3924
|
}) : null;
|
|
3944
|
-
},
|
|
3925
|
+
}, Rl = ({ cell: e }) => {
|
|
3945
3926
|
let { hasSort: t, sort: n, sortPriority: r } = e;
|
|
3946
3927
|
return t ? /* @__PURE__ */ C("span", {
|
|
3947
3928
|
className: X.sortingCellIcon,
|
|
@@ -3956,7 +3937,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3956
3937
|
children: /* @__PURE__ */ S(G, { icon: U.SORT_DESCENDING })
|
|
3957
3938
|
}), r && n ? /* @__PURE__ */ S("sup", { children: r }) : null]
|
|
3958
3939
|
}) : null;
|
|
3959
|
-
},
|
|
3940
|
+
}, zl = ({ cell: e, isHeader: t, testId: n }) => {
|
|
3960
3941
|
let { error: r, warning: i, tooltip: a, maxTooltipWidth: o, hasSort: s, onSort: c, type: l } = e, u = /* @__PURE__ */ C("div", {
|
|
3961
3942
|
className: b(X.staticCellContent, l === "Unit" ? X.unit : ""),
|
|
3962
3943
|
onClick: s ? (e) => c && c(e) : () => {},
|
|
@@ -3964,9 +3945,9 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3964
3945
|
"data-warning": i || null,
|
|
3965
3946
|
"data-testid": n,
|
|
3966
3947
|
children: [e.value, t ? /* @__PURE__ */ C(x, { children: [
|
|
3948
|
+
/* @__PURE__ */ S(Il, { cell: e }),
|
|
3967
3949
|
/* @__PURE__ */ S(Ll, { cell: e }),
|
|
3968
|
-
/* @__PURE__ */ S(Rl, { cell: e })
|
|
3969
|
-
/* @__PURE__ */ S(zl, { cell: e })
|
|
3950
|
+
/* @__PURE__ */ S(Rl, { cell: e })
|
|
3970
3951
|
] }) : null]
|
|
3971
3952
|
});
|
|
3972
3953
|
return /* @__PURE__ */ S("div", {
|
|
@@ -3981,7 +3962,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3981
3962
|
children: u
|
|
3982
3963
|
})
|
|
3983
3964
|
});
|
|
3984
|
-
},
|
|
3965
|
+
}, Bl = ({ cell: e, testId: t }) => {
|
|
3985
3966
|
let { content: n, fullWidth: r, closeOnOutsideClick: i, disabled: a } = e;
|
|
3986
3967
|
return /* @__PURE__ */ S(Ao, {
|
|
3987
3968
|
content: n,
|
|
@@ -3990,13 +3971,13 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
3990
3971
|
disabled: a,
|
|
3991
3972
|
children: /* @__PURE__ */ S("div", {
|
|
3992
3973
|
className: X.popover,
|
|
3993
|
-
children: /* @__PURE__ */ S(
|
|
3974
|
+
children: /* @__PURE__ */ S(zl, {
|
|
3994
3975
|
cell: e,
|
|
3995
3976
|
testId: t
|
|
3996
3977
|
})
|
|
3997
3978
|
})
|
|
3998
3979
|
});
|
|
3999
|
-
},
|
|
3980
|
+
}, Vl = {
|
|
4000
3981
|
inputInTable: "_inputInTable_abetp_1",
|
|
4001
3982
|
inputHover: "_inputHover_abetp_13",
|
|
4002
3983
|
inputFocus: "_inputFocus_abetp_18",
|
|
@@ -4016,18 +3997,18 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4016
3997
|
control: "_control_abetp_25",
|
|
4017
3998
|
labelText: "_labelText_abetp_151",
|
|
4018
3999
|
isInTable: "_isInTable_abetp_214"
|
|
4019
|
-
},
|
|
4000
|
+
}, Hl = ({ name: e, label: t, value: n = "", selected: r = !1, disabled: i = !1, small: a = !1, onChange: o, noMargin: s = !1, testId: c, helpText: l, onClickHelp: d, textTransform: f = Pi.CAPITALIZE }) => {
|
|
4020
4001
|
var p, m;
|
|
4021
4002
|
let h = u(Yr) != null, g = l || d, _ = (p = n == null ? void 0 : n.toString()) == null ? "" : p, v = /* @__PURE__ */ C(qr, {
|
|
4022
4003
|
value: _,
|
|
4023
4004
|
isDisabled: i,
|
|
4024
|
-
className:
|
|
4005
|
+
className: Vl.radioContainer,
|
|
4025
4006
|
"data-testid": c ? `${c}-field` : void 0,
|
|
4026
4007
|
children: [/* @__PURE__ */ C(Kr, {
|
|
4027
|
-
className: b(
|
|
4008
|
+
className: b(Vl.radio, a && Vl.small, s && Vl.noMargin, !t && Vl.noLabel),
|
|
4028
4009
|
"data-testid": c,
|
|
4029
|
-
children: [/* @__PURE__ */ S("span", { className:
|
|
4030
|
-
className:
|
|
4010
|
+
children: [/* @__PURE__ */ S("span", { className: Vl.control }), t && /* @__PURE__ */ S("span", {
|
|
4011
|
+
className: Vl.labelText,
|
|
4031
4012
|
style: { textTransform: f },
|
|
4032
4013
|
children: t
|
|
4033
4014
|
})]
|
|
@@ -4049,12 +4030,12 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4049
4030
|
} });
|
|
4050
4031
|
},
|
|
4051
4032
|
isDisabled: i,
|
|
4052
|
-
className:
|
|
4033
|
+
className: Vl.radioGroupStandalone,
|
|
4053
4034
|
children: v
|
|
4054
4035
|
});
|
|
4055
|
-
},
|
|
4036
|
+
}, Ul = ({ cell: e, testId: t }) => {
|
|
4056
4037
|
var n;
|
|
4057
|
-
return /* @__PURE__ */ S(
|
|
4038
|
+
return /* @__PURE__ */ S(Hl, {
|
|
4058
4039
|
selected: e.selected,
|
|
4059
4040
|
name: e.name,
|
|
4060
4041
|
value: (n = e.value) == null ? "" : n,
|
|
@@ -4063,42 +4044,42 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4063
4044
|
onChange: (t) => e.onChange(t),
|
|
4064
4045
|
testId: t
|
|
4065
4046
|
});
|
|
4066
|
-
},
|
|
4047
|
+
}, Wl = ({ cell: e, isHeader: t, columnAlignment: n, testId: r }) => {
|
|
4067
4048
|
if (!e) return null;
|
|
4068
4049
|
switch (e.type) {
|
|
4069
4050
|
case "Input":
|
|
4070
4051
|
case "NumberInput":
|
|
4071
4052
|
case "DateInput":
|
|
4072
|
-
case "Select": return /* @__PURE__ */ S(
|
|
4053
|
+
case "Select": return /* @__PURE__ */ S(Tl, {
|
|
4073
4054
|
cell: e,
|
|
4074
4055
|
columnAlignment: n,
|
|
4075
4056
|
testId: r
|
|
4076
4057
|
});
|
|
4077
|
-
case "Link": return /* @__PURE__ */ S(
|
|
4058
|
+
case "Link": return /* @__PURE__ */ S(El, {
|
|
4078
4059
|
cell: e,
|
|
4079
4060
|
testId: r
|
|
4080
4061
|
});
|
|
4081
|
-
case "CheckBox": return /* @__PURE__ */ S(
|
|
4062
|
+
case "CheckBox": return /* @__PURE__ */ S(Dl, {
|
|
4082
4063
|
cell: e,
|
|
4083
4064
|
testId: r
|
|
4084
4065
|
});
|
|
4085
|
-
case "Radio": return /* @__PURE__ */ S(
|
|
4066
|
+
case "Radio": return /* @__PURE__ */ S(Ul, {
|
|
4086
4067
|
cell: e,
|
|
4087
4068
|
testId: r
|
|
4088
4069
|
});
|
|
4089
|
-
case "Slider": return /* @__PURE__ */ S(
|
|
4090
|
-
case "Icon": return /* @__PURE__ */ S(
|
|
4091
|
-
case "Actions": return /* @__PURE__ */ S(
|
|
4092
|
-
case "Popover": return /* @__PURE__ */ S(
|
|
4093
|
-
default: return /* @__PURE__ */ S(
|
|
4070
|
+
case "Slider": return /* @__PURE__ */ S(Nl, { cell: e });
|
|
4071
|
+
case "Icon": return /* @__PURE__ */ S(Pl, { cell: e });
|
|
4072
|
+
case "Actions": return /* @__PURE__ */ S(Fl, { cell: e });
|
|
4073
|
+
case "Popover": return /* @__PURE__ */ S(Bl, { cell: e });
|
|
4074
|
+
default: return /* @__PURE__ */ S(zl, {
|
|
4094
4075
|
cell: e,
|
|
4095
4076
|
isHeader: t,
|
|
4096
4077
|
testId: r
|
|
4097
4078
|
});
|
|
4098
4079
|
}
|
|
4099
|
-
},
|
|
4080
|
+
}, Gl = /* @__PURE__ */ function(e) {
|
|
4100
4081
|
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;
|
|
4101
|
-
}({}),
|
|
4082
|
+
}({}), Kl = ({ cell: e, isHeader: t, columnHeaderAlignment: n, columnAlignment: r = Mi.LEFT, width: i, testId: a }) => {
|
|
4102
4083
|
var o;
|
|
4103
4084
|
if (!e) return null;
|
|
4104
4085
|
let { style: s, colSpan: c, rowSpan: l, width: u, textAlign: d } = e, f = _(null), p = {
|
|
@@ -4106,7 +4087,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4106
4087
|
headerAlignment: n,
|
|
4107
4088
|
textAlign: d,
|
|
4108
4089
|
isHeader: t
|
|
4109
|
-
}, m =
|
|
4090
|
+
}, m = vl(p, X), h = vl(p, X, !0), g = e.type === Gl.INPUT || e.type === Gl.NUMBER_INPUT || e.type === Gl.SELECT || e.type === Gl.POPOVER ? X.inputCell : e.type === Gl.SLIDER ? X.sliderCell : e.type === Gl.CHECKBOX || e.type === Gl.RADIO ? X.checkBoxCell : e.type === Gl.ACTIONS ? X.actionsCell : X.staticCell, v = b(X.cell, g, e.hasSort ? X.sortingCell : null, m, e.breakWord ? X.breakWord : ""), y = (o = u == null ? i : u) == null ? void 0 : o, x = e.type === Gl.STATIC || !e.type, C = {
|
|
4110
4091
|
width: y,
|
|
4111
4092
|
minWidth: y,
|
|
4112
4093
|
textTransform: t && x ? Pi.CAPITALIZE : void 0,
|
|
@@ -4118,40 +4099,40 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4118
4099
|
style: C,
|
|
4119
4100
|
colSpan: c,
|
|
4120
4101
|
rowSpan: l,
|
|
4121
|
-
children: /* @__PURE__ */ S(
|
|
4102
|
+
children: /* @__PURE__ */ S(Wl, {
|
|
4122
4103
|
cell: e,
|
|
4123
4104
|
columnAlignment: h == null ? Mi.RIGHT : h,
|
|
4124
4105
|
isHeader: t,
|
|
4125
4106
|
testId: a
|
|
4126
4107
|
})
|
|
4127
4108
|
});
|
|
4128
|
-
},
|
|
4109
|
+
}, ql = (e) => e.type === Gl.INPUT || e.type === Gl.NUMBER_INPUT, Jl = ({ event: e, rowIndex: t, cellIndex: n }) => ({
|
|
4129
4110
|
...e,
|
|
4130
4111
|
target: Object.assign(e.target, {
|
|
4131
4112
|
rowIndex: t,
|
|
4132
4113
|
cellIndex: n
|
|
4133
4114
|
})
|
|
4134
|
-
}),
|
|
4135
|
-
if (!
|
|
4115
|
+
}), Yl = ({ cell: e, rowIndex: t, cellIndex: n }) => {
|
|
4116
|
+
if (!ql(e) || typeof e.onChange != "function") return e;
|
|
4136
4117
|
let r = e.onChange;
|
|
4137
4118
|
return {
|
|
4138
4119
|
...e,
|
|
4139
4120
|
onChange: (e) => {
|
|
4140
|
-
r(
|
|
4121
|
+
r(Jl({
|
|
4141
4122
|
event: e,
|
|
4142
4123
|
rowIndex: t,
|
|
4143
4124
|
cellIndex: n
|
|
4144
4125
|
}));
|
|
4145
4126
|
}
|
|
4146
4127
|
};
|
|
4147
|
-
},
|
|
4148
|
-
let h =
|
|
4149
|
-
let i = `${+!n}_${t}_${r}`, a = n ? e :
|
|
4128
|
+
}, Xl = ({ row: e, rowIndex: t, isHeader: n = !1, columnCount: r, colSpan: i, columnHeaderAlignments: a = [], columnAlignment: o = [], hasRowActions: s, draggableTable: c = !1, columnWidths: u, dropDisabled: d = !1, height: f, testId: p, measureRef: m }) => {
|
|
4129
|
+
let h = yl(a, n, t), { onRowClick: g, onRowFocus: _, onRowMouseEnter: v, onRowMouseLeave: y, expandedContent: w, error: T, warning: E, active: D } = e, O = e.cells.map((e, r) => {
|
|
4130
|
+
let i = `${+!n}_${t}_${r}`, a = n ? e : Yl({
|
|
4150
4131
|
cell: e,
|
|
4151
4132
|
rowIndex: t,
|
|
4152
4133
|
cellIndex: r
|
|
4153
4134
|
});
|
|
4154
|
-
return /* @__PURE__ */ S(
|
|
4135
|
+
return /* @__PURE__ */ S(Kl, {
|
|
4155
4136
|
cell: a,
|
|
4156
4137
|
isHeader: n,
|
|
4157
4138
|
columnAlignment: o[r],
|
|
@@ -4159,9 +4140,9 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4159
4140
|
width: u ? u[r] : void 0,
|
|
4160
4141
|
testId: e.testId
|
|
4161
4142
|
}, i);
|
|
4162
|
-
}), k = s && /* @__PURE__ */ S(
|
|
4143
|
+
}), k = s && /* @__PURE__ */ S(Kl, {
|
|
4163
4144
|
cell: {
|
|
4164
|
-
type:
|
|
4145
|
+
type: Gl.ACTIONS,
|
|
4165
4146
|
actions: e.actions
|
|
4166
4147
|
},
|
|
4167
4148
|
isHeader: n
|
|
@@ -4186,13 +4167,13 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4186
4167
|
onMouseLeave: y,
|
|
4187
4168
|
onFocus: _,
|
|
4188
4169
|
"data-testid": p,
|
|
4189
|
-
className: b(g ?
|
|
4170
|
+
className: b(g ? gl.clickableRow : null, v ? gl.hoverableRow : null),
|
|
4190
4171
|
children: [
|
|
4191
4172
|
c ? /* @__PURE__ */ S("th", {}) : null,
|
|
4192
4173
|
O,
|
|
4193
4174
|
k
|
|
4194
4175
|
]
|
|
4195
|
-
}, t), w && w.content ? /* @__PURE__ */ S(
|
|
4176
|
+
}, t), w && w.content ? /* @__PURE__ */ S(_l, {
|
|
4196
4177
|
colSpan: i,
|
|
4197
4178
|
flush: w.flush === !0,
|
|
4198
4179
|
children: w.content
|
|
@@ -4202,7 +4183,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4202
4183
|
onMouseEnter: v,
|
|
4203
4184
|
onMouseLeave: y,
|
|
4204
4185
|
onFocus: _,
|
|
4205
|
-
className: b(g && !g.noStyle ?
|
|
4186
|
+
className: b(g && !g.noStyle ? gl.clickableRow : null, v && !v.noStyle ? gl.hoverableRow : null, D ? gl.rowActive : null),
|
|
4206
4187
|
"data-active": D || null,
|
|
4207
4188
|
"data-error": T || null,
|
|
4208
4189
|
"data-warning": E || null,
|
|
@@ -4212,9 +4193,9 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4212
4193
|
style: R,
|
|
4213
4194
|
children: [
|
|
4214
4195
|
c ? e.noDrag ? /* @__PURE__ */ S("td", { "aria-labelledby": "unique-label-id" }) : /* @__PURE__ */ S("td", {
|
|
4215
|
-
className:
|
|
4196
|
+
className: gl.dragIconCell,
|
|
4216
4197
|
children: /* @__PURE__ */ S("div", {
|
|
4217
|
-
className: b(
|
|
4198
|
+
className: b(gl.dragIcon, d ? gl.dragIconDisabled : ""),
|
|
4218
4199
|
...A,
|
|
4219
4200
|
...j,
|
|
4220
4201
|
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
@@ -4223,12 +4204,12 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4223
4204
|
O,
|
|
4224
4205
|
k
|
|
4225
4206
|
]
|
|
4226
|
-
}, t), w && w.content ? /* @__PURE__ */ S(
|
|
4207
|
+
}, t), w && w.content ? /* @__PURE__ */ S(_l, {
|
|
4227
4208
|
colSpan: i,
|
|
4228
4209
|
flush: w.flush === !0,
|
|
4229
4210
|
children: w.content
|
|
4230
4211
|
}, `${t}_expanded_content`) : null] });
|
|
4231
|
-
},
|
|
4212
|
+
}, Zl = (e) => {
|
|
4232
4213
|
let { children: t, colSpan: n, columnAlignment: r, columnCount: i, draggable: a, onListReorder: o = () => {}, canListReorder: s = () => !0, rowActions: c, rows: l = [], tbodyRef: u } = e, [d, f] = v(null), [p, m] = v(!1), g = h(() => l.map((e, t) => t.toString()), [l]);
|
|
4233
4214
|
return a ? /* @__PURE__ */ C(Zr, {
|
|
4234
4215
|
collisionDetection: $r,
|
|
@@ -4263,7 +4244,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4263
4244
|
dropAnimation: null,
|
|
4264
4245
|
children: /* @__PURE__ */ S("table", {
|
|
4265
4246
|
className: b(ec.table, ec.dragOverlay),
|
|
4266
|
-
children: /* @__PURE__ */ S("tbody", { children: /* @__PURE__ */ S(
|
|
4247
|
+
children: /* @__PURE__ */ S("tbody", { children: /* @__PURE__ */ S(Xl, {
|
|
4267
4248
|
rowIndex: Number(d),
|
|
4268
4249
|
row: l[Number(d)],
|
|
4269
4250
|
columnCount: i,
|
|
@@ -4283,17 +4264,17 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4283
4264
|
})
|
|
4284
4265
|
}), document.body)]
|
|
4285
4266
|
}) : t({});
|
|
4286
|
-
},
|
|
4267
|
+
}, Ql = 31, $l = 2, eu = ({ table: e, children: t }) => {
|
|
4287
4268
|
var n;
|
|
4288
4269
|
let r = _(null), i = _(/* @__PURE__ */ new Map()), { estimateRowHeight: a, rowCount: o, rows: s } = e, c = (n = o == null ? s == null ? void 0 : s.length : o) == null ? 0 : n, l = !!a, u = (e) => {
|
|
4289
4270
|
var t, n;
|
|
4290
|
-
return (t = (n = i.current.get(e)) == null ? a == null ? void 0 : a(e) : n) == null ?
|
|
4271
|
+
return (t = (n = i.current.get(e)) == null ? a == null ? void 0 : a(e) : n) == null ? Ql : t;
|
|
4291
4272
|
}, d = ei({
|
|
4292
4273
|
count: c,
|
|
4293
4274
|
getScrollElement: () => r.current,
|
|
4294
|
-
estimateSize: l ? u : () =>
|
|
4275
|
+
estimateSize: l ? u : () => Ql,
|
|
4295
4276
|
...l ? { measureElement: (e) => {
|
|
4296
|
-
let t = e.getAttribute("data-index"), n = t == null ? -1 : Number(t), r = Math.ceil(e.getBoundingClientRect().height), a = n >= 0 ? u(n) :
|
|
4277
|
+
let t = e.getAttribute("data-index"), n = t == null ? -1 : Number(t), r = Math.ceil(e.getBoundingClientRect().height), a = n >= 0 ? u(n) : Ql, o = Math.abs(r - a) <= $l ? a : r;
|
|
4297
4278
|
return n >= 0 && i.current.set(n, o), o;
|
|
4298
4279
|
} } : {},
|
|
4299
4280
|
overscan: 10
|
|
@@ -4313,7 +4294,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4313
4294
|
})()
|
|
4314
4295
|
})
|
|
4315
4296
|
});
|
|
4316
|
-
},
|
|
4297
|
+
}, tu = ({ activeIndex: e, triggerScrollToActiveRow: t, isVirtualized: n, virtualizer: r }) => (d(() => {
|
|
4317
4298
|
if (t && !(e == null || e < 0)) {
|
|
4318
4299
|
if (n && r) r.scrollToIndex(e, {
|
|
4319
4300
|
behavior: "auto",
|
|
@@ -4332,11 +4313,11 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4332
4313
|
t,
|
|
4333
4314
|
n,
|
|
4334
4315
|
r
|
|
4335
|
-
]), null),
|
|
4316
|
+
]), null), nu = ({ table: e, children: t }) => {
|
|
4336
4317
|
let { infiniteScroll: n = !1, triggerScrollToActiveRow: r = !1, rows: i } = e, a = h(() => typeof e.activeRowIndex == "number" ? e.activeRowIndex : Array.isArray(i) && i.length ? i.findIndex((e) => e && e.active) : -1, [i, e.activeRowIndex]);
|
|
4337
|
-
return n ? /* @__PURE__ */ S(
|
|
4318
|
+
return n ? /* @__PURE__ */ S(eu, {
|
|
4338
4319
|
table: e,
|
|
4339
|
-
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(
|
|
4320
|
+
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(tu, {
|
|
4340
4321
|
isVirtualized: !0,
|
|
4341
4322
|
virtualizer: e,
|
|
4342
4323
|
activeIndex: a,
|
|
@@ -4348,15 +4329,15 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4348
4329
|
}) : /* @__PURE__ */ C("div", {
|
|
4349
4330
|
id: "scrollWrapper",
|
|
4350
4331
|
className: ec.scroll,
|
|
4351
|
-
children: [/* @__PURE__ */ S(
|
|
4332
|
+
children: [/* @__PURE__ */ S(tu, {
|
|
4352
4333
|
isVirtualized: !1,
|
|
4353
4334
|
activeIndex: a,
|
|
4354
4335
|
triggerScrollToActiveRow: r
|
|
4355
4336
|
}), t({})]
|
|
4356
4337
|
});
|
|
4357
|
-
},
|
|
4338
|
+
}, ru = (e) => {
|
|
4358
4339
|
var t, n, r, i, a;
|
|
4359
|
-
let { onListReorder: o = () => {}, canListReorder: s = () => !0, beforeRenderRow: c, table: l } = e, { columnWidths: u, footer: d, name: f, rows: p = [], actions: m, actionsRight: h, columnHeaderAlignments: g, columnAlignment: v, striped: y = !0, testId: x, draggable: w, defaultEmptyRow: T = null, onAddRow: E = null, bordered: D = !0, maxHeight: O, fixedWidth: k } = l, A = _(null), j = on(e, "table.headers", []), M =
|
|
4340
|
+
let { onListReorder: o = () => {}, canListReorder: s = () => !0, beforeRenderRow: c, table: l } = e, { columnWidths: u, footer: d, name: f, rows: p = [], actions: m, actionsRight: h, columnHeaderAlignments: g, columnAlignment: v, striped: y = !0, testId: x, draggable: w, defaultEmptyRow: T = null, onAddRow: E = null, bordered: D = !0, maxHeight: O, fixedWidth: k } = l, A = _(null), j = on(e, "table.headers", []), M = pl(p, j), N = hl(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 = {
|
|
4360
4341
|
cells: I ? T.cells.map((e, t) => (e == null ? void 0 : e.type) === "Input" ? {
|
|
4361
4342
|
...e,
|
|
4362
4343
|
onChange: (e) => {
|
|
@@ -4393,7 +4374,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4393
4374
|
name: f,
|
|
4394
4375
|
testId: x && `${x}-title`
|
|
4395
4376
|
}),
|
|
4396
|
-
/* @__PURE__ */ S(
|
|
4377
|
+
/* @__PURE__ */ S(Zl, {
|
|
4397
4378
|
colSpan: P,
|
|
4398
4379
|
columnAlignment: v,
|
|
4399
4380
|
columnCount: M,
|
|
@@ -4403,13 +4384,13 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4403
4384
|
rows: R,
|
|
4404
4385
|
tbodyRef: A,
|
|
4405
4386
|
canListReorder: s,
|
|
4406
|
-
children: ({ dropDisabled: e }) => /* @__PURE__ */ S(
|
|
4387
|
+
children: ({ dropDisabled: e }) => /* @__PURE__ */ S(nu, {
|
|
4407
4388
|
table: z,
|
|
4408
4389
|
children: ({ virtualizer: t, tableStyle: n }) => /* @__PURE__ */ C("table", {
|
|
4409
4390
|
className: b(ec.table, y ? ec.striped : ""),
|
|
4410
4391
|
"data-testid": x,
|
|
4411
4392
|
style: n,
|
|
4412
|
-
children: [/* @__PURE__ */ S("thead", { children: j.map((e, t) => /* @__PURE__ */ S(
|
|
4393
|
+
children: [/* @__PURE__ */ S("thead", { children: j.map((e, t) => /* @__PURE__ */ S(Xl, {
|
|
4413
4394
|
rowIndex: t,
|
|
4414
4395
|
isHeader: !0,
|
|
4415
4396
|
row: e,
|
|
@@ -4427,7 +4408,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4427
4408
|
row: i,
|
|
4428
4409
|
rowIndex: r
|
|
4429
4410
|
}) : i;
|
|
4430
|
-
return /* @__PURE__ */ S(
|
|
4411
|
+
return /* @__PURE__ */ S(Xl, {
|
|
4431
4412
|
rowIndex: r,
|
|
4432
4413
|
row: a,
|
|
4433
4414
|
columnCount: M,
|
|
@@ -4445,7 +4426,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4445
4426
|
row: t,
|
|
4446
4427
|
rowIndex: n
|
|
4447
4428
|
}) : t;
|
|
4448
|
-
return /* @__PURE__ */ S(
|
|
4429
|
+
return /* @__PURE__ */ S(Xl, {
|
|
4449
4430
|
rowIndex: n,
|
|
4450
4431
|
row: r,
|
|
4451
4432
|
columnCount: M,
|
|
@@ -4461,24 +4442,24 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4461
4442
|
})
|
|
4462
4443
|
})
|
|
4463
4444
|
}),
|
|
4464
|
-
d && /* @__PURE__ */ S(
|
|
4445
|
+
d && /* @__PURE__ */ S(dl, {
|
|
4465
4446
|
pagination: d.pagination,
|
|
4466
4447
|
actions: d.actions,
|
|
4467
4448
|
content: d.content
|
|
4468
4449
|
})
|
|
4469
4450
|
]
|
|
4470
4451
|
});
|
|
4471
|
-
},
|
|
4452
|
+
}, iu = "blank", au = 1e4, ou = (e, t, n, r) => {
|
|
4472
4453
|
let i = `${t} → ${n}:`, a = e.filter((e) => !e.startsWith(i)), o = r ? [...a, `${i} ${r}`] : a;
|
|
4473
4454
|
return {
|
|
4474
4455
|
updatedErrors: o,
|
|
4475
4456
|
isValid: o.length === 0
|
|
4476
4457
|
};
|
|
4477
|
-
},
|
|
4478
|
-
let i = h(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, o] = v(
|
|
4458
|
+
}, su = 20, cu = 1, lu = ({ validationRules: e, parsedResult: t, updateState: n, testId: r }) => {
|
|
4459
|
+
let i = h(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, o] = v(su), [s, c] = v(cu), u = _([]), f = (s - 1) * a, p = a === 0 ? t.rows.length : f + a, [m, g] = v([]), y = h(() => {
|
|
4479
4460
|
let n = e.filter((e) => !e.optionalColumn);
|
|
4480
4461
|
return t.fields.length === n.length ? n : e;
|
|
4481
|
-
}, [e, t.fields.length]), b = l((e, r) => (!u.current.length && t.rows.length && (u.current = t.rows[0].map((e) =>
|
|
4462
|
+
}, [e, t.fields.length]), b = l((e, r) => (!u.current.length && t.rows.length && (u.current = t.rows[0].map((e) => Yc(e) ? "NumberInput" : "Input")), {
|
|
4482
4463
|
cells: e.map((e, a) => {
|
|
4483
4464
|
var o, s, c, l, d;
|
|
4484
4465
|
let { columnMessage: f = {}, validator: p = () => null } = (o = y == null ? void 0 : y[a]) == null ? {} : o, m = i == null || (s = i[a]) == null ? void 0 : s.value, h = `${`Row ${r + 1}`} → ${m}:`, _ = p(e), v = (c = t == null || (l = t.errors) == null ? void 0 : l.find((e) => e.startsWith(h))) == null ? null : c, x = _ || v || null;
|
|
@@ -4489,7 +4470,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4489
4470
|
disableValidationOnFocus: !0,
|
|
4490
4471
|
error: x,
|
|
4491
4472
|
validationCallback: (e, i) => {
|
|
4492
|
-
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } =
|
|
4473
|
+
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } = ou(t.errors, a, e, i);
|
|
4493
4474
|
n({ parsedResult: {
|
|
4494
4475
|
...t,
|
|
4495
4476
|
errors: o,
|
|
@@ -4498,7 +4479,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4498
4479
|
},
|
|
4499
4480
|
onChange: (e) => {
|
|
4500
4481
|
var i;
|
|
4501
|
-
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } =
|
|
4482
|
+
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } = ou(t.errors, s, m, c), d = t.rows.map((e, t) => t === r ? e.map((e, t) => t === a ? o : e) : e);
|
|
4502
4483
|
n({ parsedResult: {
|
|
4503
4484
|
...t,
|
|
4504
4485
|
rows: d,
|
|
@@ -4540,7 +4521,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4540
4521
|
]);
|
|
4541
4522
|
let x = h(() => t.fields.map((e, r) => {
|
|
4542
4523
|
var a, o, s;
|
|
4543
|
-
let c = y == null ? void 0 : y[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => xn(e) ===
|
|
4524
|
+
let c = y == null ? void 0 : y[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => xn(e) === iu);
|
|
4544
4525
|
if (!l.length || u) return {};
|
|
4545
4526
|
let d = t == null || (a = t.units) == null ? void 0 : a[r], f = xn(d), p = l != null && l.some((e) => xn(e) === f) ? d : (o = c == null ? void 0 : c.defaultUnit) == null ? "" : o;
|
|
4546
4527
|
return {
|
|
@@ -4588,7 +4569,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4588
4569
|
b,
|
|
4589
4570
|
f
|
|
4590
4571
|
]);
|
|
4591
|
-
return /* @__PURE__ */ S(
|
|
4572
|
+
return /* @__PURE__ */ S(ru, {
|
|
4592
4573
|
beforeRenderRow: E,
|
|
4593
4574
|
onListReorder: ({ from: e, to: r }) => {
|
|
4594
4575
|
let i = [...t.rows], [a] = i.splice(e, 1);
|
|
@@ -4651,7 +4632,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4651
4632
|
} }
|
|
4652
4633
|
}
|
|
4653
4634
|
});
|
|
4654
|
-
},
|
|
4635
|
+
}, uu = { listStyle: "_listStyle_yjfjw_1" }, du = ({ errors: e, t }) => {
|
|
4655
4636
|
var n;
|
|
4656
4637
|
let r = (n = [...e]) == null ? void 0 : n.sort((e, t) => {
|
|
4657
4638
|
let n = (e) => {
|
|
@@ -4667,18 +4648,18 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4667
4648
|
content: t("unableToImportPleaseCorrectError", { rows: e == null ? void 0 : e.length }),
|
|
4668
4649
|
type: "Error",
|
|
4669
4650
|
details: /* @__PURE__ */ S("ul", {
|
|
4670
|
-
className:
|
|
4651
|
+
className: uu.listStyle,
|
|
4671
4652
|
children: r.map((e, t) => /* @__PURE__ */ S("li", { children: e }, t))
|
|
4672
4653
|
})
|
|
4673
4654
|
};
|
|
4674
|
-
},
|
|
4655
|
+
}, fu = ({ errors: e, t }) => e.length ? /* @__PURE__ */ S($s, { message: du({
|
|
4675
4656
|
errors: e,
|
|
4676
4657
|
t
|
|
4677
|
-
}) }) : null,
|
|
4658
|
+
}) }) : null, pu = {
|
|
4678
4659
|
empty: "_empty_fe425_1",
|
|
4679
4660
|
text: "_text_fe425_11"
|
|
4680
|
-
},
|
|
4681
|
-
className:
|
|
4661
|
+
}, mu = ({ width: e = "auto", height: t = "auto", text: n = "No data", children: r, testId: i }) => /* @__PURE__ */ C("div", {
|
|
4662
|
+
className: pu.empty,
|
|
4682
4663
|
style: {
|
|
4683
4664
|
width: e,
|
|
4684
4665
|
height: t
|
|
@@ -4714,7 +4695,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4714
4695
|
})
|
|
4715
4696
|
}),
|
|
4716
4697
|
n !== "" && /* @__PURE__ */ S("div", {
|
|
4717
|
-
className:
|
|
4698
|
+
className: pu.text,
|
|
4718
4699
|
children: /* @__PURE__ */ S(rs, {
|
|
4719
4700
|
faint: !0,
|
|
4720
4701
|
children: n
|
|
@@ -4722,52 +4703,52 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4722
4703
|
}),
|
|
4723
4704
|
r
|
|
4724
4705
|
]
|
|
4725
|
-
}),
|
|
4706
|
+
}), hu = (e) => {
|
|
4726
4707
|
var t;
|
|
4727
4708
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4728
4709
|
let t = e == null ? void 0 : e.match(/[.,]/g);
|
|
4729
4710
|
return t && t.length > 1;
|
|
4730
4711
|
});
|
|
4731
|
-
},
|
|
4712
|
+
}, gu = (e) => {
|
|
4732
4713
|
var t;
|
|
4733
4714
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4734
4715
|
var t;
|
|
4735
4716
|
return !(e != null && e.includes(".")) && (e == null || (t = e.match(/,/g)) == null ? void 0 : t.length) === 1;
|
|
4736
4717
|
});
|
|
4737
|
-
},
|
|
4718
|
+
}, _u = (e, t, n) => e >= t - n, vu = (e) => !!e && e !== "blank" && e.trim() !== "", yu = (e, t, n, r, i, a, o) => {
|
|
4738
4719
|
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;
|
|
4739
|
-
if (i && !
|
|
4720
|
+
if (i && !_u(e.length, l, c) && s.push(o("incorrectNumberOfFieldNameHeaderColumns", { expectedLengthMessage: u })), a) {
|
|
4740
4721
|
var f, p;
|
|
4741
4722
|
let e = r.filter((e) => {
|
|
4742
4723
|
var t;
|
|
4743
|
-
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(
|
|
4724
|
+
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(vu));
|
|
4744
4725
|
}).length;
|
|
4745
|
-
|
|
4726
|
+
_u(t == null || (f = t.filter(vu)) == 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 }));
|
|
4746
4727
|
}
|
|
4747
4728
|
return n.length === 0 ? s.push(o("incorrectNumberOfDataColumns", {
|
|
4748
4729
|
expectedLengthMessage: u,
|
|
4749
4730
|
dataRowStartIndex: d
|
|
4750
4731
|
})) : n.forEach((e, t) => {
|
|
4751
|
-
|
|
4732
|
+
_u(e.length, l, c) || s.push(o("incorrectNumberOfDataColumns", {
|
|
4752
4733
|
expectedLengthMessage: u,
|
|
4753
4734
|
dataRowStartIndex: d + t
|
|
4754
4735
|
}));
|
|
4755
4736
|
}), s;
|
|
4756
|
-
},
|
|
4737
|
+
}, bu = (e) => e.toUpperCase().replace(/\(.*?\)/g, "").replace(/[^A-Z0-9]/g, "").trim(), xu = ({ value: e, defaultAllowedValues: t }) => {
|
|
4757
4738
|
var n;
|
|
4758
|
-
let r =
|
|
4759
|
-
return (n = t == null ? void 0 : t.some((e) =>
|
|
4760
|
-
},
|
|
4739
|
+
let r = bu(e);
|
|
4740
|
+
return (n = t == null ? void 0 : t.some((e) => bu(e).includes(r) || r.includes(bu(e)))) != null && n;
|
|
4741
|
+
}, Su = ({ value: e, defaultAllowedValues: t }) => {
|
|
4761
4742
|
var n;
|
|
4762
4743
|
return (n = t == null ? void 0 : t.includes(e)) != null && n;
|
|
4763
|
-
},
|
|
4744
|
+
}, Cu = (e, t, n, r, i, a) => {
|
|
4764
4745
|
let o = [];
|
|
4765
4746
|
if (r) {
|
|
4766
4747
|
let r = n.map((e) => e.fieldName).filter(Boolean);
|
|
4767
4748
|
e.forEach((i, s) => {
|
|
4768
4749
|
var c, l;
|
|
4769
4750
|
let u = n[s];
|
|
4770
|
-
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ?
|
|
4751
|
+
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ? xu : c)({
|
|
4771
4752
|
value: i,
|
|
4772
4753
|
defaultAllowedValues: r,
|
|
4773
4754
|
columnIndex: s,
|
|
@@ -4789,7 +4770,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4789
4770
|
var l, u;
|
|
4790
4771
|
let d = n[c];
|
|
4791
4772
|
if (!d || d != null && d.optionalColumn) return;
|
|
4792
|
-
let f = (l = d.unitsValidator) == null ?
|
|
4773
|
+
let f = (l = d.unitsValidator) == null ? Su : l, p = (u = i == null ? void 0 : i[c]) == null ? [] : u;
|
|
4793
4774
|
f({
|
|
4794
4775
|
value: r,
|
|
4795
4776
|
defaultAllowedValues: p,
|
|
@@ -4805,7 +4786,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4805
4786
|
});
|
|
4806
4787
|
}
|
|
4807
4788
|
return o;
|
|
4808
|
-
},
|
|
4789
|
+
}, wu = (e, t, n) => {
|
|
4809
4790
|
let r = [];
|
|
4810
4791
|
return e.forEach((e, i) => {
|
|
4811
4792
|
e.forEach((e, a) => {
|
|
@@ -4818,91 +4799,91 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4818
4799
|
})}`);
|
|
4819
4800
|
});
|
|
4820
4801
|
}), r;
|
|
4821
|
-
},
|
|
4822
|
-
let s =
|
|
4823
|
-
return s.length === 0 && (s = s.concat(
|
|
4802
|
+
}, Tu = (e, t, n, r, i, a, o) => {
|
|
4803
|
+
let s = yu(e, t, n, r, i, a, o);
|
|
4804
|
+
return s.length === 0 && (s = s.concat(Cu(e, t, r, i, a, o), wu(n, r, o))), {
|
|
4824
4805
|
isValid: s.length === 0,
|
|
4825
4806
|
errors: s
|
|
4826
4807
|
};
|
|
4827
|
-
},
|
|
4808
|
+
}, Eu = (e, t, n) => {
|
|
4828
4809
|
var r, i, a, o, s, c, l, u, d, f, p, m, h, g;
|
|
4829
4810
|
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;
|
|
4830
4811
|
return {
|
|
4831
4812
|
hasFieldNameHeader: b || v && !x && !C || v && y && !C,
|
|
4832
4813
|
hasUnitHeader: x || S || v && y && !x && !C && !w || v && y && !C && !w
|
|
4833
4814
|
};
|
|
4834
|
-
},
|
|
4815
|
+
}, Du = (e, { validationRules: t }) => {
|
|
4835
4816
|
var n, r, i;
|
|
4836
4817
|
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) => {
|
|
4837
4818
|
var t;
|
|
4838
4819
|
return (t = e == null ? void 0 : e.defaultUnit) == null ? s(e == null ? void 0 : e.validUnits) : t;
|
|
4839
|
-
}), { hasFieldNameHeader: l, hasUnitHeader: u } =
|
|
4820
|
+
}), { hasFieldNameHeader: l, hasUnitHeader: u } = Eu(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());
|
|
4840
4821
|
return l || e == null || e.unshift(o), u || e == null || e.splice(1, 0, c), {
|
|
4841
4822
|
hasFieldNameHeader: l,
|
|
4842
4823
|
hasUnitHeader: u
|
|
4843
4824
|
};
|
|
4844
|
-
},
|
|
4825
|
+
}, Ou = (e) => Math.round(e * 100) / 100, ku = (e) => e.join(", ").replace(/,\s*$/, ""), Au = {
|
|
4845
4826
|
skipEmptyLines: !0,
|
|
4846
4827
|
delimiter: (e) => {
|
|
4847
4828
|
var t, n;
|
|
4848
4829
|
let r = e.substring(0, 200), i = ((t = r.match(/\t/g)) == null ? [] : t).length, a = ((n = r.match(/;/g)) == null ? [] : n).length;
|
|
4849
4830
|
return i === 0 && a === 0 ? "," : i > a ? " " : ";";
|
|
4850
4831
|
}
|
|
4851
|
-
},
|
|
4832
|
+
}, ju = [
|
|
4852
4833
|
"text/csv",
|
|
4853
4834
|
"text/plain",
|
|
4854
4835
|
"application/json",
|
|
4855
4836
|
"application/vnd.ms-excel"
|
|
4856
|
-
],
|
|
4837
|
+
], Mu = (e) => ju.includes(e.type), Nu = (e) => e instanceof File, Pu = (e) => e.trim().startsWith("["), Fu = (e) => {
|
|
4857
4838
|
try {
|
|
4858
4839
|
var t;
|
|
4859
4840
|
return !!((t = JSON.parse(e)) != null && t.path);
|
|
4860
4841
|
} catch {
|
|
4861
4842
|
return !1;
|
|
4862
4843
|
}
|
|
4863
|
-
},
|
|
4844
|
+
}, Iu = (e) => new Promise((t, n) => {
|
|
4864
4845
|
let r = new FileReader();
|
|
4865
4846
|
r.onload = () => t(String(r.result)), r.onerror = n, r.readAsText(e);
|
|
4866
|
-
}),
|
|
4847
|
+
}), Lu = async (e, t, n) => {
|
|
4867
4848
|
try {
|
|
4868
|
-
return
|
|
4849
|
+
return Wu({
|
|
4869
4850
|
data: JSON.parse(e),
|
|
4870
4851
|
errors: []
|
|
4871
4852
|
}, t, n);
|
|
4872
4853
|
} catch (e) {
|
|
4873
4854
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4874
4855
|
}
|
|
4875
|
-
},
|
|
4856
|
+
}, Ru = async (e, t, n) => {
|
|
4876
4857
|
try {
|
|
4877
4858
|
let r = JSON.parse(e).path.map((e) => [
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4859
|
+
Ou(e.md),
|
|
4860
|
+
Ou(e.inclination),
|
|
4861
|
+
Ou(e.gridAzimuth)
|
|
4881
4862
|
]);
|
|
4882
4863
|
return r.unshift([
|
|
4883
4864
|
"m",
|
|
4884
4865
|
"deg",
|
|
4885
4866
|
"deg"
|
|
4886
|
-
]),
|
|
4867
|
+
]), Wu({
|
|
4887
4868
|
data: r,
|
|
4888
4869
|
errors: []
|
|
4889
4870
|
}, t, n);
|
|
4890
4871
|
} catch (e) {
|
|
4891
4872
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4892
4873
|
}
|
|
4893
|
-
},
|
|
4874
|
+
}, zu = (e) => e.replace(",", "."), Bu = (e) => e.map((e) => e.map((e) => zu(e))), Vu = (e, { importLimit: t, ...n }, r) => new Promise((i) => {
|
|
4894
4875
|
ti.parse(e, {
|
|
4895
|
-
...
|
|
4876
|
+
...Au,
|
|
4896
4877
|
preview: t,
|
|
4897
4878
|
complete: (e) => {
|
|
4898
|
-
let a =
|
|
4879
|
+
let a = Wu(e, {
|
|
4899
4880
|
importLimit: t,
|
|
4900
4881
|
...n
|
|
4901
4882
|
}, r);
|
|
4902
|
-
a.rows =
|
|
4883
|
+
a.rows = Bu(a.rows), i(a);
|
|
4903
4884
|
}
|
|
4904
4885
|
});
|
|
4905
|
-
}),
|
|
4886
|
+
}), Hu = async (e, t, n) => {
|
|
4906
4887
|
let r = {
|
|
4907
4888
|
isValid: !1,
|
|
4908
4889
|
fields: [],
|
|
@@ -4911,13 +4892,13 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4911
4892
|
errors: []
|
|
4912
4893
|
};
|
|
4913
4894
|
try {
|
|
4914
|
-
if (
|
|
4915
|
-
let i =
|
|
4916
|
-
return
|
|
4895
|
+
if (Nu(e) && !Mu(e)) return r.errors.push(`${n("wrongFileFormatExpectedOneOf")} ${ku(Array.from(ju))}`), r;
|
|
4896
|
+
let i = Nu(e) ? await Iu(e) : e;
|
|
4897
|
+
return Pu(i) ? await Lu(i, t, n) : Fu(i) ? await Ru(i, t, n) : await Vu(e, t, n);
|
|
4917
4898
|
} catch (e) {
|
|
4918
4899
|
return r.errors.push(e.message), r;
|
|
4919
4900
|
}
|
|
4920
|
-
},
|
|
4901
|
+
}, Uu = (e, t, n, r) => {
|
|
4921
4902
|
var i;
|
|
4922
4903
|
let a = (i = r == null ? void 0 : r.delimiter) == null ? "," : i, o = [
|
|
4923
4904
|
e,
|
|
@@ -4929,7 +4910,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4929
4910
|
header: !0,
|
|
4930
4911
|
delimiter: a
|
|
4931
4912
|
});
|
|
4932
|
-
},
|
|
4913
|
+
}, Wu = (e, t, n) => {
|
|
4933
4914
|
let { data: r, errors: i } = e, a = {
|
|
4934
4915
|
isValid: !1,
|
|
4935
4916
|
fields: [],
|
|
@@ -4938,22 +4919,22 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4938
4919
|
errors: i.map((e) => e.message)
|
|
4939
4920
|
};
|
|
4940
4921
|
if (i.length > 0) return a;
|
|
4941
|
-
let { hasFieldNameHeader: o, hasUnitHeader: s } =
|
|
4922
|
+
let { hasFieldNameHeader: o, hasUnitHeader: s } = Du(r, t);
|
|
4942
4923
|
a.fields = r[0].map((e) => e.trim()), a.units = r[1].map((e) => e.trim()).filter(Boolean), a.rows = r.slice(2);
|
|
4943
4924
|
let { validationRules: c } = t;
|
|
4944
4925
|
if (c.length) {
|
|
4945
|
-
let { isValid: e, errors: t } =
|
|
4926
|
+
let { isValid: e, errors: t } = Tu(a.fields, a.units, a.rows, c, o, s, n);
|
|
4946
4927
|
a.errors.push(...t), a.isValid = e && t.length === 0;
|
|
4947
4928
|
} else a.isValid = a.errors.length === 0;
|
|
4948
4929
|
return a;
|
|
4949
|
-
},
|
|
4930
|
+
}, Gu = .001, Ku = 0, qu = (e, t) => e.every((e) => {
|
|
4950
4931
|
let n = e[t];
|
|
4951
4932
|
return n !== void 0 && n.trim() !== "" && dn(wr(n));
|
|
4952
|
-
}),
|
|
4933
|
+
}), Ju = (e, t = {}) => {
|
|
4953
4934
|
var n, r;
|
|
4954
|
-
let { independentColumnIndex: i =
|
|
4955
|
-
if (e.length <= 2 || !
|
|
4956
|
-
let s = (n = (r = ii(e, (e) => e.length)) == null ? void 0 : r.length) == null ? 0 : n, c = oi(a == null ? ai(s) : a).filter((t) => t !== i &&
|
|
4935
|
+
let { independentColumnIndex: i = Ku, dependentColumnIndexes: a, tolerance: o = Gu } = t;
|
|
4936
|
+
if (e.length <= 2 || !qu(e, i)) return e.slice();
|
|
4937
|
+
let s = (n = (r = ii(e, (e) => e.length)) == null ? void 0 : r.length) == null ? 0 : n, c = oi(a == null ? ai(s) : a).filter((t) => t !== i && qu(e, t));
|
|
4957
4938
|
if (c.length === 0) return e.slice();
|
|
4958
4939
|
let l = /* @__PURE__ */ new Set();
|
|
4959
4940
|
for (let t of c) {
|
|
@@ -4967,7 +4948,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
4967
4948
|
}
|
|
4968
4949
|
}
|
|
4969
4950
|
return e.filter((e, t) => l.has(t));
|
|
4970
|
-
},
|
|
4951
|
+
}, Yu = ({ id: e, message: t = {
|
|
4971
4952
|
type: qs.INFO,
|
|
4972
4953
|
content: ""
|
|
4973
4954
|
}, autoClose: n = 6e3, onClose: r }) => {
|
|
@@ -5008,13 +4989,13 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5008
4989
|
transition: si,
|
|
5009
4990
|
type: s
|
|
5010
4991
|
});
|
|
5011
|
-
},
|
|
4992
|
+
}, Xu = (e) => {
|
|
5012
4993
|
li.dismiss(e);
|
|
5013
|
-
},
|
|
4994
|
+
}, Zu = (e, t) => {
|
|
5014
4995
|
t(() => {
|
|
5015
|
-
|
|
4996
|
+
Yu({ ...e });
|
|
5016
4997
|
});
|
|
5017
|
-
},
|
|
4998
|
+
}, Qu = {
|
|
5018
4999
|
inputInTable: "_inputInTable_h6wco_1",
|
|
5019
5000
|
inputHover: "_inputHover_h6wco_13",
|
|
5020
5001
|
inputFocus: "_inputFocus_h6wco_18",
|
|
@@ -5030,7 +5011,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5030
5011
|
control: "_control_h6wco_25",
|
|
5031
5012
|
labelText: "_labelText_h6wco_137",
|
|
5032
5013
|
noMargin: "_noMargin_h6wco_201"
|
|
5033
|
-
},
|
|
5014
|
+
}, $u = ({ name: e, label: t, checked: n = !1, disabled: r, display: i, small: a = !1, onChange: o, noMargin: s = !1, testId: c, helpText: l, onClickHelp: d, textTransform: f = Pi.CAPITALIZE }) => {
|
|
5034
5015
|
let p = u(W), m = l || d;
|
|
5035
5016
|
return /* @__PURE__ */ C(di, {
|
|
5036
5017
|
name: e,
|
|
@@ -5043,14 +5024,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5043
5024
|
value: t
|
|
5044
5025
|
} });
|
|
5045
5026
|
},
|
|
5046
|
-
className: b(
|
|
5027
|
+
className: b(Qu.toggleContainer, s && Qu.noMargin),
|
|
5047
5028
|
style: { display: i },
|
|
5048
5029
|
"data-testid": c ? `${c}-field` : void 0,
|
|
5049
5030
|
children: [/* @__PURE__ */ C(ui, {
|
|
5050
|
-
className: b(
|
|
5031
|
+
className: b(Qu.toggle, a && Qu.small, !t && Qu.noLabel),
|
|
5051
5032
|
"data-testid": c,
|
|
5052
|
-
children: [/* @__PURE__ */ S("span", { className:
|
|
5053
|
-
className:
|
|
5033
|
+
children: [/* @__PURE__ */ S("span", { className: Qu.control }), t && /* @__PURE__ */ S("span", {
|
|
5034
|
+
className: Qu.labelText,
|
|
5054
5035
|
style: { textTransform: f },
|
|
5055
5036
|
children: t
|
|
5056
5037
|
})]
|
|
@@ -5059,7 +5040,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5059
5040
|
onClick: d
|
|
5060
5041
|
})]
|
|
5061
5042
|
});
|
|
5062
|
-
},
|
|
5043
|
+
}, ed = ({ config: e, state: t, updateState: n, setModalVisibility: r, onCloseModal: i, readAndParseInput: a, validationRules: o = [], onCompleteImport: s = () => {}, prevalidationConfig: c, t: u, loading: d, startTransition: f, testId: p }) => {
|
|
5063
5044
|
let { modalVisibility: { reviewPasteModal: m, pasteModalHelpVisible: h, helpModal: g } } = t, { warningMessage: y, actionButtonLabel: b, changeRulesAction: w, checkPrevalidationNeed: T } = c == null ? {} : c, E = _(null), [D, O] = v(!1), [k, A] = v({
|
|
5064
5045
|
pastedText: "",
|
|
5065
5046
|
parsedResult: {
|
|
@@ -5080,10 +5061,10 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5080
5061
|
let { pastedText: j, parsedResult: M } = k, N = l((t) => {
|
|
5081
5062
|
if (t) {
|
|
5082
5063
|
var n, r;
|
|
5083
|
-
let t =
|
|
5064
|
+
let t = Ju(M.rows, e.downsampleConfig), i = {
|
|
5084
5065
|
validationRules: o,
|
|
5085
|
-
importLimit: (n = e.importLimit) == null ?
|
|
5086
|
-
}, a =
|
|
5066
|
+
importLimit: (n = e.importLimit) == null ? au : n
|
|
5067
|
+
}, a = Uu(M.fields, (r = M.units) == null ? [] : r, t, i);
|
|
5087
5068
|
f(() => A({
|
|
5088
5069
|
parsedResult: {
|
|
5089
5070
|
...M,
|
|
@@ -5116,17 +5097,17 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5116
5097
|
}, F = () => {
|
|
5117
5098
|
r("helpModal", !g);
|
|
5118
5099
|
}, I = () => {
|
|
5119
|
-
n(k), s(k.parsedResult), i(),
|
|
5100
|
+
n(k), s(k.parsedResult), i(), Zu({ message: {
|
|
5120
5101
|
type: "Success",
|
|
5121
5102
|
content: u("pasteSuccessful")
|
|
5122
5103
|
} }, f);
|
|
5123
|
-
}, L = T && T(M), { isValid: R, errors: z } = M, B = z.length, ee = j === "", te =
|
|
5104
|
+
}, L = T && T(M), { isValid: R, errors: z } = M, B = z.length, ee = j === "", te = gu(j), ne = hu(j), V = /* @__PURE__ */ C(x, { children: [
|
|
5124
5105
|
/* @__PURE__ */ C("div", {
|
|
5125
5106
|
className: Gs.headerContainer,
|
|
5126
5107
|
children: [
|
|
5127
5108
|
/* @__PURE__ */ S(ga, {
|
|
5128
5109
|
text: u("downsampleTooltip"),
|
|
5129
|
-
children: /* @__PURE__ */ S(
|
|
5110
|
+
children: /* @__PURE__ */ S($u, {
|
|
5130
5111
|
label: u("downsampled"),
|
|
5131
5112
|
checked: D,
|
|
5132
5113
|
onChange: () => N(!D),
|
|
@@ -5159,7 +5140,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5159
5140
|
}),
|
|
5160
5141
|
ee ? /* @__PURE__ */ S("div", {
|
|
5161
5142
|
className: Gs.resultContainer,
|
|
5162
|
-
children: /* @__PURE__ */ S(
|
|
5143
|
+
children: /* @__PURE__ */ S(mu, {
|
|
5163
5144
|
text: null,
|
|
5164
5145
|
children: /* @__PURE__ */ C("div", {
|
|
5165
5146
|
className: Gs.emptyState,
|
|
@@ -5195,7 +5176,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5195
5176
|
}) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
|
|
5196
5177
|
className: Gs.messagesContainer,
|
|
5197
5178
|
children: [
|
|
5198
|
-
B ? /* @__PURE__ */ S(
|
|
5179
|
+
B ? /* @__PURE__ */ S(fu, {
|
|
5199
5180
|
errors: z,
|
|
5200
5181
|
t: u
|
|
5201
5182
|
}) : null,
|
|
@@ -5218,7 +5199,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5218
5199
|
type: "Warning"
|
|
5219
5200
|
} })
|
|
5220
5201
|
]
|
|
5221
|
-
}), /* @__PURE__ */ S(
|
|
5202
|
+
}), /* @__PURE__ */ S(lu, {
|
|
5222
5203
|
validationRules: o,
|
|
5223
5204
|
parsedResult: M,
|
|
5224
5205
|
updateState: (e) => A((t) => ({
|
|
@@ -5261,7 +5242,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5261
5242
|
onClose: i
|
|
5262
5243
|
} })
|
|
5263
5244
|
});
|
|
5264
|
-
},
|
|
5245
|
+
}, td = ({ modals: e = [], modalVisibility: t, onCloseModal: r, testId: i }) => e.length ? /* @__PURE__ */ S(x, { children: e.map(({ name: e, component: a, props: o = {} }) => {
|
|
5265
5246
|
var s;
|
|
5266
5247
|
return /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S(a, {
|
|
5267
5248
|
testId: `${i}-modal-render-${e}`,
|
|
@@ -5269,7 +5250,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5269
5250
|
onClose: () => r({ name: e }),
|
|
5270
5251
|
...o
|
|
5271
5252
|
}) }, e);
|
|
5272
|
-
}) }) : null,
|
|
5253
|
+
}) }) : null, nd = ({ sections: e, iconName: t, testId: n, tooltip: r }) => /* @__PURE__ */ S(vo, {
|
|
5273
5254
|
loading: !0,
|
|
5274
5255
|
menu: {
|
|
5275
5256
|
component: /* @__PURE__ */ S(K, {
|
|
@@ -5285,18 +5266,18 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5285
5266
|
sections: e
|
|
5286
5267
|
},
|
|
5287
5268
|
testId: n
|
|
5288
|
-
}),
|
|
5269
|
+
}), rd = (e, t, n) => l(async () => {
|
|
5289
5270
|
if (n) try {
|
|
5290
5271
|
return await n();
|
|
5291
5272
|
} catch (t) {
|
|
5292
|
-
console.error("beforeExportData failed", t),
|
|
5273
|
+
console.error("beforeExportData failed", t), Yu({ message: {
|
|
5293
5274
|
type: "Error",
|
|
5294
5275
|
content: e("unableToPrepareExportData")
|
|
5295
5276
|
} });
|
|
5296
5277
|
return;
|
|
5297
5278
|
}
|
|
5298
5279
|
return t;
|
|
5299
|
-
}, [t, n]),
|
|
5280
|
+
}, [t, n]), id = {
|
|
5300
5281
|
cancel: "Cancel",
|
|
5301
5282
|
chooseFile: "Choose file",
|
|
5302
5283
|
copyDecimalComma: "Copy (decimal comma)",
|
|
@@ -5355,26 +5336,26 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5355
5336
|
smartUpload_description: "Upload image and extract table content using a LLM",
|
|
5356
5337
|
smartUpload_smartUpload: "Smart Upload",
|
|
5357
5338
|
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"
|
|
5358
|
-
},
|
|
5359
|
-
let t = Object.keys(
|
|
5360
|
-
let r =
|
|
5339
|
+
}, ad = (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])), od = (e) => h(() => {
|
|
5340
|
+
let t = Object.keys(id).reduce((t, n) => {
|
|
5341
|
+
let r = id == null ? void 0 : id[n], i = e == null ? void 0 : e[n];
|
|
5361
5342
|
return t[n] = i == null ? r : i, t;
|
|
5362
5343
|
}, {});
|
|
5363
5344
|
return (e, n) => {
|
|
5364
5345
|
let r = t[e];
|
|
5365
|
-
return n ?
|
|
5346
|
+
return n ? ad(r, n) : r;
|
|
5366
5347
|
};
|
|
5367
|
-
}, [e]),
|
|
5348
|
+
}, [e]), sd = /^\s*-?\d+(?:[.,]\d+)?(?:e[+-]?\d+)?\s*$/i, cd = (e) => {
|
|
5368
5349
|
var t;
|
|
5369
5350
|
return {
|
|
5370
5351
|
...e,
|
|
5371
5352
|
rows: e == null || (t = e.rows) == null ? void 0 : t.map((e) => e.map((e) => {
|
|
5372
5353
|
let t = String(e == null ? "" : e);
|
|
5373
|
-
return
|
|
5354
|
+
return sd.test(t) ? or(t) : t;
|
|
5374
5355
|
}))
|
|
5375
5356
|
};
|
|
5376
|
-
},
|
|
5377
|
-
let { exportData: a, beforeExportData: o, importLimit: s =
|
|
5357
|
+
}, ld = ({ config: e, state: t, setState: n, smartUploadConfig: r, startTransition: i }) => {
|
|
5358
|
+
let { exportData: a, beforeExportData: o, importLimit: s = au, validationRules: c = [], translations: u, onImportComplete: d = () => {}, disablePasteSuccessfulToast: f, prevalidationConfig: p, onDeleteRows: m } = e == null ? {} : e, { parsedResult: h } = t, { checkPrevalidationNeed: g } = p == null ? {} : p, _ = od(u), v = rd(_, a, o), y = l((e) => {
|
|
5378
5359
|
n((t) => ({
|
|
5379
5360
|
...t,
|
|
5380
5361
|
...e
|
|
@@ -5418,9 +5399,9 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5418
5399
|
let t = {
|
|
5419
5400
|
validationRules: c,
|
|
5420
5401
|
importLimit: s
|
|
5421
|
-
}, n =
|
|
5402
|
+
}, n = cd(await Hu(e, t, _));
|
|
5422
5403
|
if (g && g(h)) {
|
|
5423
|
-
let { fields: e, units: r, rows: a } = n, o =
|
|
5404
|
+
let { fields: e, units: r, rows: a } = n, o = Uu(e, r == null ? [] : r, a, t);
|
|
5424
5405
|
return i(() => y({
|
|
5425
5406
|
pastedText: o,
|
|
5426
5407
|
parsedResult: h
|
|
@@ -5446,20 +5427,20 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5446
5427
|
let { fromFile: t, showSuccessToast: n = !0 } = e == null ? {} : e, r;
|
|
5447
5428
|
try {
|
|
5448
5429
|
if (r = t ? await t.text() : await navigator.clipboard.readText(), !r) {
|
|
5449
|
-
|
|
5430
|
+
Zu({ message: {
|
|
5450
5431
|
type: "Error",
|
|
5451
5432
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed")
|
|
5452
5433
|
} }, i);
|
|
5453
5434
|
return;
|
|
5454
5435
|
}
|
|
5455
|
-
let e =
|
|
5436
|
+
let e = cd(await Hu(r, {
|
|
5456
5437
|
validationRules: c,
|
|
5457
5438
|
importLimit: s
|
|
5458
5439
|
}, _));
|
|
5459
|
-
return e != null && e.isValid ||
|
|
5440
|
+
return e != null && e.isValid || Zu({ message: {
|
|
5460
5441
|
type: "Error",
|
|
5461
5442
|
content: _("clipboardReadFailed")
|
|
5462
|
-
} }, i), n &&
|
|
5443
|
+
} }, i), n && Zu({ message: {
|
|
5463
5444
|
type: "Success",
|
|
5464
5445
|
content: _("pasteSuccessful")
|
|
5465
5446
|
} }, i), {
|
|
@@ -5467,7 +5448,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5467
5448
|
parsedResult: e
|
|
5468
5449
|
};
|
|
5469
5450
|
} catch (e) {
|
|
5470
|
-
|
|
5451
|
+
Zu({ message: {
|
|
5471
5452
|
type: "Error",
|
|
5472
5453
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed"),
|
|
5473
5454
|
details: e.message
|
|
@@ -5480,10 +5461,10 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5480
5461
|
let n = e == null || (t = e.target) == null || (t = t.files) == null ? void 0 : t[0];
|
|
5481
5462
|
if (!n) return;
|
|
5482
5463
|
let r = await n.text(), a = await C(r);
|
|
5483
|
-
a.isValid ? (f ||
|
|
5464
|
+
a.isValid ? (f || Zu({ message: {
|
|
5484
5465
|
type: "Success",
|
|
5485
5466
|
content: _("pasteSuccessful")
|
|
5486
|
-
} }, i), i(() => d(a))) :
|
|
5467
|
+
} }, i), i(() => d(a))) : Zu({ message: {
|
|
5487
5468
|
type: "Error",
|
|
5488
5469
|
content: _("fileParsingFailed")
|
|
5489
5470
|
} }, i);
|
|
@@ -5497,7 +5478,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5497
5478
|
try {
|
|
5498
5479
|
let t = await navigator.clipboard.readText();
|
|
5499
5480
|
if (!t) {
|
|
5500
|
-
|
|
5481
|
+
Zu({ message: {
|
|
5501
5482
|
type: "Error",
|
|
5502
5483
|
content: _("clipboardIsEmpty")
|
|
5503
5484
|
} }, i);
|
|
@@ -5505,18 +5486,18 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5505
5486
|
}
|
|
5506
5487
|
let n = await C(t);
|
|
5507
5488
|
if (!n.isValid) {
|
|
5508
|
-
|
|
5489
|
+
Zu({ message: {
|
|
5509
5490
|
type: "Error",
|
|
5510
5491
|
content: _("clipboardReadFailed")
|
|
5511
5492
|
} }, i);
|
|
5512
5493
|
return;
|
|
5513
5494
|
}
|
|
5514
|
-
f ||
|
|
5495
|
+
f || Zu({ message: {
|
|
5515
5496
|
type: "Success",
|
|
5516
5497
|
content: _("pasteSuccessful")
|
|
5517
5498
|
} }, i), e && i(() => d(n));
|
|
5518
5499
|
} catch {
|
|
5519
|
-
|
|
5500
|
+
Zu({ message: {
|
|
5520
5501
|
type: "Error",
|
|
5521
5502
|
content: _("clipboardReadNotAllowed")
|
|
5522
5503
|
} }, i);
|
|
@@ -5531,14 +5512,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5531
5512
|
onClickCopyClipboard: l(async (e) => {
|
|
5532
5513
|
let t = await v();
|
|
5533
5514
|
if (!t) return;
|
|
5534
|
-
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e :
|
|
5515
|
+
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e : iu).slice(0, n.length), s = (e, t) => t === "comma" ? e.replace(/\./g, ",") : e, c = Uu(n, o, a.map((t) => t.map((t) => ri(t) ? "" : s(t.toString(), e))), { delimiter: " " });
|
|
5535
5516
|
try {
|
|
5536
|
-
await navigator.clipboard.writeText(c),
|
|
5517
|
+
await navigator.clipboard.writeText(c), Zu({ message: {
|
|
5537
5518
|
type: "Success",
|
|
5538
5519
|
content: _("copiedToClipboard")
|
|
5539
5520
|
} }, i);
|
|
5540
5521
|
} catch (e) {
|
|
5541
|
-
|
|
5522
|
+
Zu({ message: {
|
|
5542
5523
|
type: "Error",
|
|
5543
5524
|
content: _("unableToCopyToClipboard"),
|
|
5544
5525
|
details: e.message
|
|
@@ -5548,14 +5529,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5548
5529
|
onSmartUploadResult: l((e) => {
|
|
5549
5530
|
let t = gn(e) && _n(e.errorMessage) ? e.errorMessage : void 0;
|
|
5550
5531
|
if (t) {
|
|
5551
|
-
|
|
5532
|
+
Zu({ message: {
|
|
5552
5533
|
type: "Error",
|
|
5553
5534
|
content: t || "Smart upload failed."
|
|
5554
5535
|
} }, i);
|
|
5555
5536
|
return;
|
|
5556
5537
|
}
|
|
5557
5538
|
if (!sn(e) || e.length < 2 || !an(e, (e) => gn(e) && an(wn(e), _n))) {
|
|
5558
|
-
|
|
5539
|
+
Zu({ message: {
|
|
5559
5540
|
type: "Error",
|
|
5560
5541
|
content: "Smart upload returned unexpected format.",
|
|
5561
5542
|
details: JSON.stringify(e)
|
|
@@ -5587,14 +5568,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5587
5568
|
]),
|
|
5588
5569
|
deleteAllRows: x
|
|
5589
5570
|
};
|
|
5590
|
-
},
|
|
5571
|
+
}, ud = (e, t) => {
|
|
5591
5572
|
var n, r;
|
|
5592
|
-
let { fields: i, rows: a } = e, o =
|
|
5573
|
+
let { fields: i, rows: a } = e, o = Uu(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");
|
|
5593
5574
|
c.href = window.URL.createObjectURL(s), c.download = `${t}.csv`, document.body.appendChild(c), c.click(), document.body.removeChild(c);
|
|
5594
|
-
},
|
|
5575
|
+
}, dd = (e) => hn(e) && "modalKey" in e, fd = (e, t, n) => nn(e, (e) => {
|
|
5595
5576
|
if (sn(e) || !gn(e)) return;
|
|
5596
5577
|
let { modalKey: r } = e == null ? {} : e;
|
|
5597
|
-
if (
|
|
5578
|
+
if (dd(e) && typeof e.onClick != "function") {
|
|
5598
5579
|
let i = () => {
|
|
5599
5580
|
var e;
|
|
5600
5581
|
n(r, !((e = t.modalVisibility) != null && e[r]));
|
|
@@ -5604,7 +5585,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5604
5585
|
onClick: i
|
|
5605
5586
|
};
|
|
5606
5587
|
}
|
|
5607
|
-
}),
|
|
5588
|
+
}), pd = (e, t, n) => fd(e, t, n), md = {
|
|
5608
5589
|
pastedText: "",
|
|
5609
5590
|
parsedResult: {
|
|
5610
5591
|
isValid: !1,
|
|
@@ -5619,9 +5600,9 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5619
5600
|
reviewPasteModal: !1,
|
|
5620
5601
|
helpModal: !1
|
|
5621
5602
|
}
|
|
5622
|
-
},
|
|
5603
|
+
}, hd = ({ config: e, smartUploadConfig: t, testId: n }) => {
|
|
5623
5604
|
var r, i, a, o;
|
|
5624
|
-
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: m = !0, copyFromClipBoard: h = !0, showDeleteOptions: g = !0, showHelpOption: _ = !0, showUploadFileOption: b = !0, modals: x = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = v(
|
|
5605
|
+
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: m = !0, copyFromClipBoard: h = !0, showDeleteOptions: g = !0, showHelpOption: _ = !0, showUploadFileOption: b = !0, modals: x = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = v(md), { 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 = od(f), L = rd(I, s, c), [R, z] = y(), B = ld({
|
|
5625
5606
|
config: e,
|
|
5626
5607
|
state: E,
|
|
5627
5608
|
setState: D,
|
|
@@ -5654,14 +5635,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5654
5635
|
onClick: () => V("smartUploadModal", !O),
|
|
5655
5636
|
testId: `${n}-smart-upload`
|
|
5656
5637
|
}] : [],
|
|
5657
|
-
...
|
|
5638
|
+
...pd((r = w == null ? void 0 : w.importOptions) == null ? [] : r, E, V)
|
|
5658
5639
|
] : [], le = [
|
|
5659
5640
|
{
|
|
5660
5641
|
type: "Option",
|
|
5661
5642
|
label: I("downloadFile"),
|
|
5662
5643
|
onClick: async () => {
|
|
5663
5644
|
let e = await L();
|
|
5664
|
-
e && e &&
|
|
5645
|
+
e && e && ud(e, d);
|
|
5665
5646
|
}
|
|
5666
5647
|
},
|
|
5667
5648
|
...p ? [{
|
|
@@ -5686,20 +5667,20 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5686
5667
|
}]
|
|
5687
5668
|
}
|
|
5688
5669
|
}],
|
|
5689
|
-
...
|
|
5670
|
+
...pd((i = w == null ? void 0 : w.exportOptions) == null ? [] : i, E, V)
|
|
5690
5671
|
], ue = g ? [{
|
|
5691
5672
|
type: "Option",
|
|
5692
5673
|
label: I("deleteAllRows"),
|
|
5693
5674
|
onClick: () => se(),
|
|
5694
5675
|
testId: `${n}-delete-all-rows`
|
|
5695
|
-
}, ...
|
|
5676
|
+
}, ...pd((a = w == null ? void 0 : w.deleteOptions) == null ? [] : a, E, V)] : [], de = _ ? [
|
|
5696
5677
|
{ type: "Divider" },
|
|
5697
5678
|
{
|
|
5698
5679
|
type: "Option",
|
|
5699
5680
|
label: I("help"),
|
|
5700
5681
|
onClick: () => V("helpModal", !A)
|
|
5701
5682
|
},
|
|
5702
|
-
...
|
|
5683
|
+
...pd((o = w == null ? void 0 : w.helpOptions) == null ? [] : o, E, V)
|
|
5703
5684
|
] : [], fe = [
|
|
5704
5685
|
...ce.length ? [{
|
|
5705
5686
|
section: [...ce, ...de],
|
|
@@ -5725,13 +5706,13 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5725
5706
|
small: !0,
|
|
5726
5707
|
dark: !0
|
|
5727
5708
|
}),
|
|
5728
|
-
fe.map((e, t) => /* @__PURE__ */ S(
|
|
5709
|
+
fe.map((e, t) => /* @__PURE__ */ S(nd, {
|
|
5729
5710
|
sections: e.section,
|
|
5730
5711
|
iconName: e.iconName,
|
|
5731
5712
|
tooltip: e.tooltip,
|
|
5732
5713
|
testId: `data-${e == null ? void 0 : e.name}-menu`
|
|
5733
5714
|
}, t)),
|
|
5734
|
-
k && /* @__PURE__ */ S(
|
|
5715
|
+
k && /* @__PURE__ */ S(ed, {
|
|
5735
5716
|
config: e,
|
|
5736
5717
|
state: E,
|
|
5737
5718
|
updateState: te,
|
|
@@ -5767,14 +5748,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5767
5748
|
cancelText: I("cancel"),
|
|
5768
5749
|
testId: n
|
|
5769
5750
|
}),
|
|
5770
|
-
/* @__PURE__ */ S(
|
|
5751
|
+
/* @__PURE__ */ S(td, {
|
|
5771
5752
|
modals: x,
|
|
5772
5753
|
modalVisibility: E == null ? void 0 : E.modalVisibility,
|
|
5773
5754
|
onCloseModal: ne,
|
|
5774
5755
|
testId: n
|
|
5775
5756
|
})
|
|
5776
5757
|
] });
|
|
5777
|
-
},
|
|
5758
|
+
}, gd = ({ file: e, accept: t, multi: n, name: r, disabled: i, onChange: a = yn, ...o }) => {
|
|
5778
5759
|
let s = u(W), c = _(null), l = () => {
|
|
5779
5760
|
var e;
|
|
5780
5761
|
i || s || (e = c.current) == null || e.click();
|
|
@@ -5802,12 +5783,12 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5802
5783
|
multiple: n,
|
|
5803
5784
|
onChange: d
|
|
5804
5785
|
})] });
|
|
5805
|
-
},
|
|
5786
|
+
}, _d = {
|
|
5806
5787
|
label: "_label_uxk69_1",
|
|
5807
5788
|
labelLeft: "_labelLeft_uxk69_5",
|
|
5808
5789
|
icons: "_icons_uxk69_13",
|
|
5809
5790
|
small: "_small_uxk69_27"
|
|
5810
|
-
},
|
|
5791
|
+
}, vd = ({ label: e = null, width: t = "auto", helpText: n = "", helpTextMaxWidth: r = "300px", onClickHelp: i = void 0, lock: a = {
|
|
5811
5792
|
visible: !1,
|
|
5812
5793
|
active: !1,
|
|
5813
5794
|
onClick: () => {},
|
|
@@ -5816,14 +5797,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5816
5797
|
}, info: o, libraryIcon: s, labelLeft: c = !1, small: l = !1, textTransform: u = Pi.CAPITALIZE }) => {
|
|
5817
5798
|
var d;
|
|
5818
5799
|
return /* @__PURE__ */ S("div", {
|
|
5819
|
-
className: b(
|
|
5800
|
+
className: b(_d.label, c ? _d.labelLeft : "", l ? _d.small : ""),
|
|
5820
5801
|
children: /* @__PURE__ */ C("label", {
|
|
5821
5802
|
style: {
|
|
5822
5803
|
textTransform: u,
|
|
5823
5804
|
width: t || ""
|
|
5824
5805
|
},
|
|
5825
5806
|
children: [e, /* @__PURE__ */ C("div", {
|
|
5826
|
-
className:
|
|
5807
|
+
className: _d.icons,
|
|
5827
5808
|
children: [
|
|
5828
5809
|
(n || i) && /* @__PURE__ */ S(ya, {
|
|
5829
5810
|
text: n,
|
|
@@ -5849,23 +5830,23 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5849
5830
|
})]
|
|
5850
5831
|
})
|
|
5851
5832
|
});
|
|
5852
|
-
},
|
|
5833
|
+
}, yd = {
|
|
5853
5834
|
field: "_field_1xoss_1",
|
|
5854
5835
|
labelLeft: "_labelLeft_1xoss_5",
|
|
5855
5836
|
fieldInput: "_fieldInput_1xoss_9",
|
|
5856
5837
|
formRow: "_formRow_1xoss_12",
|
|
5857
5838
|
"form-row": "_form-row_1xoss_13",
|
|
5858
5839
|
button: "_button_1xoss_22"
|
|
5859
|
-
},
|
|
5840
|
+
}, bd = ({ label: e, labelLeft: t = !1, labelWidth: n = "auto", children: r, helpText: i, helpTextMaxWidth: a = "300px", onClickHelp: o, lock: s = {
|
|
5860
5841
|
visible: !1,
|
|
5861
5842
|
active: !1,
|
|
5862
5843
|
onClick: () => {},
|
|
5863
5844
|
tooltip: "",
|
|
5864
5845
|
testId: void 0
|
|
5865
5846
|
}, info: c, libraryIcon: l, small: u = !1, testId: d, textTransform: f = Pi.CAPITALIZE }) => /* @__PURE__ */ C("div", {
|
|
5866
|
-
className: b(
|
|
5847
|
+
className: b(yd.field, t ? yd.labelLeft : ""),
|
|
5867
5848
|
"data-testid": d,
|
|
5868
|
-
children: [(e || t) && /* @__PURE__ */ S(
|
|
5849
|
+
children: [(e || t) && /* @__PURE__ */ S(vd, {
|
|
5869
5850
|
label: e,
|
|
5870
5851
|
width: n,
|
|
5871
5852
|
helpText: i,
|
|
@@ -5878,10 +5859,10 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5878
5859
|
small: u,
|
|
5879
5860
|
textTransform: f
|
|
5880
5861
|
}), /* @__PURE__ */ S("div", {
|
|
5881
|
-
className:
|
|
5862
|
+
className: yd.fieldInput,
|
|
5882
5863
|
children: r
|
|
5883
5864
|
})]
|
|
5884
|
-
}),
|
|
5865
|
+
}), xd = ({ alignItems: e = "initial", justifyContent: t = "initial", direction: n = "initial", height: r = "initial", width: i = "initial", children: a = null, wrap: o = !0, gap: s = !1 }) => /* @__PURE__ */ S("div", {
|
|
5885
5866
|
style: {
|
|
5886
5867
|
display: "flex",
|
|
5887
5868
|
flexDirection: n,
|
|
@@ -5893,8 +5874,8 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5893
5874
|
gap: s === !1 ? 0 : s === !0 ? "var(--padding)" : typeof s == "number" ? `${s}px` : s
|
|
5894
5875
|
},
|
|
5895
5876
|
children: a
|
|
5896
|
-
}),
|
|
5897
|
-
className:
|
|
5877
|
+
}), Sd = { formRow: "_formRow_odewu_1" }, Cd = ({ children: e }) => /* @__PURE__ */ S("div", {
|
|
5878
|
+
className: Sd.formRow,
|
|
5898
5879
|
children: e
|
|
5899
5880
|
}), Z = {
|
|
5900
5881
|
inputInTable: "_inputInTable_15rr3_1",
|
|
@@ -5940,15 +5921,15 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5940
5921
|
hideScrollbar: "_hideScrollbar_15rr3_71",
|
|
5941
5922
|
noPointerEvents: "_noPointerEvents_15rr3_313",
|
|
5942
5923
|
virtualRows: "_virtualRows_15rr3_316"
|
|
5943
|
-
},
|
|
5924
|
+
}, wd = ({ toggleNarrow: e, onClickToggleNarrow: t }) => e ? /* @__PURE__ */ S("a", {
|
|
5944
5925
|
className: Z.toggleNarrow,
|
|
5945
5926
|
onClick: t,
|
|
5946
5927
|
children: /* @__PURE__ */ S(G, { icon: U.CHEVRON_LEFT })
|
|
5947
|
-
}) : null,
|
|
5928
|
+
}) : null, Td = o(({ name: e, actions: t = [], toggleNarrow: n = !1, onToggleNarrow: r = () => {}, stickyHeader: i }, a) => /* @__PURE__ */ C("div", {
|
|
5948
5929
|
ref: a,
|
|
5949
5930
|
className: b(Z.header, i ? Z.stickyHeader : ""),
|
|
5950
5931
|
children: [
|
|
5951
|
-
/* @__PURE__ */ S(
|
|
5932
|
+
/* @__PURE__ */ S(wd, {
|
|
5952
5933
|
toggleNarrow: n,
|
|
5953
5934
|
onClickToggleNarrow: r
|
|
5954
5935
|
}),
|
|
@@ -5968,14 +5949,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5968
5949
|
})
|
|
5969
5950
|
})
|
|
5970
5951
|
]
|
|
5971
|
-
})),
|
|
5952
|
+
})), Ed = ({ label: e }) => e ? /* @__PURE__ */ S("span", {
|
|
5972
5953
|
className: Z.label,
|
|
5973
5954
|
children: /* @__PURE__ */ S(uo, {
|
|
5974
5955
|
color: e.color,
|
|
5975
5956
|
title: e.value,
|
|
5976
5957
|
small: e.small
|
|
5977
5958
|
})
|
|
5978
|
-
}) : null,
|
|
5959
|
+
}) : null, Dd = ({ name: e, icon: t, testId: n }) => {
|
|
5979
5960
|
let r = t && /* @__PURE__ */ S(G, {
|
|
5980
5961
|
icon: t.icon,
|
|
5981
5962
|
color: t.color || "#db2828"
|
|
@@ -5995,8 +5976,8 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
5995
5976
|
children: r
|
|
5996
5977
|
})]
|
|
5997
5978
|
});
|
|
5998
|
-
},
|
|
5999
|
-
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ S(
|
|
5979
|
+
}, Od = ({ item: e }) => {
|
|
5980
|
+
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ S(Dd, {
|
|
6000
5981
|
name: t,
|
|
6001
5982
|
icon: n,
|
|
6002
5983
|
testId: o && `${o}-name`
|
|
@@ -6022,10 +6003,10 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6022
6003
|
})
|
|
6023
6004
|
]
|
|
6024
6005
|
});
|
|
6025
|
-
},
|
|
6006
|
+
}, kd = ({ item: e }) => e.metaCount === void 0 ? null : /* @__PURE__ */ S(uo, {
|
|
6026
6007
|
color: "rgba(0,0,0,0.25)",
|
|
6027
6008
|
title: e.metaCount
|
|
6028
|
-
}),
|
|
6009
|
+
}), Ad = ({ item: e, expanding: t }) => {
|
|
6029
6010
|
let n = (e) => {
|
|
6030
6011
|
e.preventDefault(), e.stopPropagation();
|
|
6031
6012
|
}, r = !!t && !!e.active && !!e.content;
|
|
@@ -6037,7 +6018,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6037
6018
|
children: e.content
|
|
6038
6019
|
})
|
|
6039
6020
|
});
|
|
6040
|
-
},
|
|
6021
|
+
}, jd = o(({ item: e, index: t }, n) => {
|
|
6041
6022
|
var r;
|
|
6042
6023
|
let i = u(W), { actions: a, disabled: o, expanded: s, onClick: c, title: l, name: d, icon: f, testId: p } = e;
|
|
6043
6024
|
return /* @__PURE__ */ S("div", {
|
|
@@ -6057,13 +6038,13 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6057
6038
|
className: b(Z.expandIcon, s && Z.expanded),
|
|
6058
6039
|
children: /* @__PURE__ */ S(G, { icon: U.CHEVRON_RIGHT })
|
|
6059
6040
|
}),
|
|
6060
|
-
/* @__PURE__ */ S(
|
|
6041
|
+
/* @__PURE__ */ S(Dd, {
|
|
6061
6042
|
name: d,
|
|
6062
6043
|
icon: f
|
|
6063
6044
|
}),
|
|
6064
6045
|
/* @__PURE__ */ C("div", {
|
|
6065
6046
|
className: Z.right,
|
|
6066
|
-
children: [/* @__PURE__ */ S(
|
|
6047
|
+
children: [/* @__PURE__ */ S(kd, { item: e }), !(o || i) && a && /* @__PURE__ */ S("div", {
|
|
6067
6048
|
className: Z.actions,
|
|
6068
6049
|
children: /* @__PURE__ */ S(bo, { actions: (r = e.actions) == null ? [] : r })
|
|
6069
6050
|
})]
|
|
@@ -6071,7 +6052,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6071
6052
|
]
|
|
6072
6053
|
}) })
|
|
6073
6054
|
});
|
|
6074
|
-
}),
|
|
6055
|
+
}), Md = o(({ item: e, index: t, expanding: n, invokeEditOnRowClick: r, draggable: i }, a) => {
|
|
6075
6056
|
let o = u(W), s = (e, t, s, c, l, u) => {
|
|
6076
6057
|
let d = t.actions && t.actions.find((e) => {
|
|
6077
6058
|
var t;
|
|
@@ -6107,24 +6088,24 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6107
6088
|
className: Z.indentIcon,
|
|
6108
6089
|
children: /* @__PURE__ */ S(G, { icon: U.INDENT })
|
|
6109
6090
|
}) : null,
|
|
6110
|
-
/* @__PURE__ */ S(
|
|
6111
|
-
/* @__PURE__ */ S(
|
|
6091
|
+
/* @__PURE__ */ S(Ed, { label: t.label }),
|
|
6092
|
+
/* @__PURE__ */ S(Od, { item: t }),
|
|
6112
6093
|
/* @__PURE__ */ C("div", {
|
|
6113
6094
|
className: Z.right,
|
|
6114
|
-
children: [/* @__PURE__ */ S(
|
|
6095
|
+
children: [/* @__PURE__ */ S(kd, { item: t }), !(t.disabled || o) && t.actions && /* @__PURE__ */ S("div", {
|
|
6115
6096
|
className: Z.actions,
|
|
6116
6097
|
children: /* @__PURE__ */ S(bo, { actions: t.actions })
|
|
6117
6098
|
})]
|
|
6118
6099
|
})
|
|
6119
6100
|
]
|
|
6120
|
-
}), /* @__PURE__ */ S(
|
|
6101
|
+
}), /* @__PURE__ */ S(Ad, {
|
|
6121
6102
|
item: t,
|
|
6122
6103
|
expanding: n
|
|
6123
6104
|
})]
|
|
6124
6105
|
})
|
|
6125
6106
|
}, e);
|
|
6126
6107
|
};
|
|
6127
|
-
return e.type === "Heading" ? /* @__PURE__ */ S(
|
|
6108
|
+
return e.type === "Heading" ? /* @__PURE__ */ S(jd, {
|
|
6128
6109
|
ref: a,
|
|
6129
6110
|
item: e,
|
|
6130
6111
|
index: t
|
|
@@ -6139,7 +6120,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6139
6120
|
};
|
|
6140
6121
|
return s(e, t, l, n, r, i);
|
|
6141
6122
|
})(t, e) : s(t, e);
|
|
6142
|
-
}),
|
|
6123
|
+
}), Nd = ({ children: e, draggable: t, list: n, onListReorder: r }) => {
|
|
6143
6124
|
let [i, a] = v(null), o = (e) => {
|
|
6144
6125
|
a(e.active.id);
|
|
6145
6126
|
}, s = (e) => {
|
|
@@ -6162,7 +6143,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6162
6143
|
dropAnimation: null,
|
|
6163
6144
|
children: /* @__PURE__ */ S("div", {
|
|
6164
6145
|
className: Z.dragOverlay,
|
|
6165
|
-
children: /* @__PURE__ */ S(
|
|
6146
|
+
children: /* @__PURE__ */ S(Md, {
|
|
6166
6147
|
draggable: t,
|
|
6167
6148
|
item: n.items[Number(i)],
|
|
6168
6149
|
index: Number(i)
|
|
@@ -6170,7 +6151,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6170
6151
|
})
|
|
6171
6152
|
}), document.body)]
|
|
6172
6153
|
}) : e;
|
|
6173
|
-
},
|
|
6154
|
+
}, Pd = ({ items: e, scrollDetails: t, children: n }) => {
|
|
6174
6155
|
let { scrollable: r, hideScrollbar: i, triggerScrollToActiveItem: a, infiniteScroll: o } = t, s = _(null), c = ei({
|
|
6175
6156
|
count: e.length,
|
|
6176
6157
|
getScrollElement: () => s.current,
|
|
@@ -6203,9 +6184,9 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6203
6184
|
children: n({ virtualizer: c })
|
|
6204
6185
|
})
|
|
6205
6186
|
});
|
|
6206
|
-
},
|
|
6187
|
+
}, Fd = ({ items: e, scrollDetails: t, children: n }) => {
|
|
6207
6188
|
let { scrollable: r, hideScrollbar: i, infiniteScroll: a } = t;
|
|
6208
|
-
return a ? /* @__PURE__ */ S(
|
|
6189
|
+
return a ? /* @__PURE__ */ S(Pd, {
|
|
6209
6190
|
items: e,
|
|
6210
6191
|
scrollDetails: t,
|
|
6211
6192
|
children: ({ virtualizer: e }) => n({ virtualizer: e })
|
|
@@ -6216,7 +6197,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6216
6197
|
children: n({})
|
|
6217
6198
|
})
|
|
6218
6199
|
});
|
|
6219
|
-
},
|
|
6200
|
+
}, Id = ({ 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 = {
|
|
6220
6201
|
scrollable: !1,
|
|
6221
6202
|
hideScrollbar: !1,
|
|
6222
6203
|
triggerScrollToActiveItem: !1,
|
|
@@ -6229,17 +6210,17 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6229
6210
|
marginBottom: d
|
|
6230
6211
|
},
|
|
6231
6212
|
id: "scrollableDiv",
|
|
6232
|
-
children: [!s && /* @__PURE__ */ S(
|
|
6213
|
+
children: [!s && /* @__PURE__ */ S(Td, {
|
|
6233
6214
|
name: e.name,
|
|
6234
6215
|
actions: e.actions,
|
|
6235
6216
|
toggleNarrow: i,
|
|
6236
6217
|
onToggleNarrow: a,
|
|
6237
6218
|
stickyHeader: c
|
|
6238
|
-
}), /* @__PURE__ */ S(
|
|
6219
|
+
}), /* @__PURE__ */ S(Nd, {
|
|
6239
6220
|
draggable: l,
|
|
6240
6221
|
list: e,
|
|
6241
6222
|
onListReorder: u,
|
|
6242
|
-
children: /* @__PURE__ */ S(
|
|
6223
|
+
children: /* @__PURE__ */ S(Fd, {
|
|
6243
6224
|
items: e.items,
|
|
6244
6225
|
scrollDetails: m,
|
|
6245
6226
|
children: ({ virtualizer: t }) => t ? t.getVirtualItems().map((r) => /* @__PURE__ */ S("div", {
|
|
@@ -6247,14 +6228,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6247
6228
|
className: Z.virtualRow,
|
|
6248
6229
|
style: { transform: `translateY(${r.start}px)` },
|
|
6249
6230
|
ref: t.measureElement,
|
|
6250
|
-
children: /* @__PURE__ */ S(
|
|
6231
|
+
children: /* @__PURE__ */ S(Md, {
|
|
6251
6232
|
index: r.index,
|
|
6252
6233
|
draggable: l,
|
|
6253
6234
|
item: e.items[r.index],
|
|
6254
6235
|
expanding: n,
|
|
6255
6236
|
invokeEditOnRowClick: o
|
|
6256
6237
|
})
|
|
6257
|
-
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(
|
|
6238
|
+
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(Md, {
|
|
6258
6239
|
index: t,
|
|
6259
6240
|
draggable: l,
|
|
6260
6241
|
item: e,
|
|
@@ -6263,7 +6244,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6263
6244
|
}) }, t))
|
|
6264
6245
|
})
|
|
6265
6246
|
})]
|
|
6266
|
-
}),
|
|
6247
|
+
}), Ld = {
|
|
6267
6248
|
loader: "_loader_477i5_1",
|
|
6268
6249
|
fullViewPortSize: "_fullViewPortSize_477i5_7",
|
|
6269
6250
|
cover: "_cover_477i5_14",
|
|
@@ -6271,33 +6252,33 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6271
6252
|
content: "_content_477i5_44",
|
|
6272
6253
|
text: "_text_477i5_49",
|
|
6273
6254
|
details: "_details_477i5_53"
|
|
6274
|
-
},
|
|
6255
|
+
}, Rd = ({ width: e, height: t, text: n = "", details: r = "", fullViewPortSize: i = !1, cover: a = !1, children: o = null, theme: s = Fi.DARK, testId: c = null }) => {
|
|
6275
6256
|
let l = s === Fi.DARK ? Fi.WHITE : Fi.INHERIT, u = s === "white" ? "var(--color-background-raised)" : s === "light" ? "var(--color-background)" : "black";
|
|
6276
6257
|
return /* @__PURE__ */ S("div", {
|
|
6277
|
-
className: b(
|
|
6258
|
+
className: b(Ld.loader, a ? Ld.cover : "", { [Ld.fullViewPortSize]: i }),
|
|
6278
6259
|
style: {
|
|
6279
6260
|
width: e,
|
|
6280
6261
|
height: t
|
|
6281
6262
|
},
|
|
6282
6263
|
"data-testid": c,
|
|
6283
6264
|
children: /* @__PURE__ */ S("div", {
|
|
6284
|
-
className:
|
|
6265
|
+
className: Ld.dimmer,
|
|
6285
6266
|
style: {
|
|
6286
6267
|
background: u,
|
|
6287
6268
|
color: l
|
|
6288
6269
|
},
|
|
6289
6270
|
children: /* @__PURE__ */ C("div", {
|
|
6290
|
-
className:
|
|
6271
|
+
className: Ld.content,
|
|
6291
6272
|
"data-testid": c && `${c}-content`,
|
|
6292
6273
|
children: [
|
|
6293
6274
|
o,
|
|
6294
6275
|
n && /* @__PURE__ */ S("div", {
|
|
6295
|
-
className:
|
|
6276
|
+
className: Ld.text,
|
|
6296
6277
|
"data-testid": c && `${c}-text`,
|
|
6297
6278
|
children: n
|
|
6298
6279
|
}),
|
|
6299
6280
|
r && /* @__PURE__ */ S("div", {
|
|
6300
|
-
className:
|
|
6281
|
+
className: Ld.details,
|
|
6301
6282
|
"data-testid": c && `${c}-details`,
|
|
6302
6283
|
children: r
|
|
6303
6284
|
})
|
|
@@ -6305,15 +6286,15 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6305
6286
|
})
|
|
6306
6287
|
})
|
|
6307
6288
|
});
|
|
6308
|
-
},
|
|
6289
|
+
}, zd = {
|
|
6309
6290
|
menu: "_menu_12x4u_1",
|
|
6310
6291
|
header: "_header_12x4u_11",
|
|
6311
6292
|
item: "_item_12x4u_27",
|
|
6312
6293
|
heading: "_heading_12x4u_32"
|
|
6313
|
-
},
|
|
6294
|
+
}, Bd = ({ option: e, onChange: t }) => {
|
|
6314
6295
|
let { key: n, selected: r, label: i, disabled: a, testId: o, helpText: s, onClickHelp: c, textTransform: l } = e;
|
|
6315
6296
|
return /* @__PURE__ */ S("div", {
|
|
6316
|
-
className:
|
|
6297
|
+
className: zd.item,
|
|
6317
6298
|
children: /* @__PURE__ */ S(ba, {
|
|
6318
6299
|
label: i,
|
|
6319
6300
|
noMargin: !0,
|
|
@@ -6326,21 +6307,21 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6326
6307
|
textTransform: l
|
|
6327
6308
|
})
|
|
6328
6309
|
}, n);
|
|
6329
|
-
},
|
|
6330
|
-
className:
|
|
6310
|
+
}, Vd = ({ label: e }) => /* @__PURE__ */ S("div", {
|
|
6311
|
+
className: zd.heading,
|
|
6331
6312
|
children: e
|
|
6332
|
-
}),
|
|
6313
|
+
}), Hd = /* @__PURE__ */ function(e) {
|
|
6333
6314
|
return e.HEADING = "Heading", e.DIVIDER = "Divider", e.DEFAULT = "Default", e;
|
|
6334
|
-
}({}),
|
|
6335
|
-
className: b("menu",
|
|
6315
|
+
}({}), Ud = (e) => e.type !== Hd.HEADING && e.type !== Hd.DIVIDER && !e.disabled, Wd = ({ options: e, onChangeOptions: t, showHeader: n, maxHeight: r, testId: i }) => /* @__PURE__ */ C("div", {
|
|
6316
|
+
className: b("menu", zd.menu),
|
|
6336
6317
|
style: { maxHeight: r },
|
|
6337
6318
|
"data-testid": i ? `${i}-option-dropdown-layer` : void 0,
|
|
6338
6319
|
children: [n && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
|
|
6339
|
-
className:
|
|
6320
|
+
className: zd.header,
|
|
6340
6321
|
children: [
|
|
6341
6322
|
/* @__PURE__ */ S("a", {
|
|
6342
6323
|
onClick: (n) => {
|
|
6343
|
-
t(n, e.map((e) =>
|
|
6324
|
+
t(n, e.map((e) => Ud(e) ? {
|
|
6344
6325
|
...e,
|
|
6345
6326
|
selected: !0
|
|
6346
6327
|
} : e));
|
|
@@ -6349,7 +6330,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6349
6330
|
}),
|
|
6350
6331
|
/* @__PURE__ */ S("a", {
|
|
6351
6332
|
onClick: (n) => {
|
|
6352
|
-
t(n, e.map((e) =>
|
|
6333
|
+
t(n, e.map((e) => Ud(e) ? {
|
|
6353
6334
|
...e,
|
|
6354
6335
|
selected: !1
|
|
6355
6336
|
} : e));
|
|
@@ -6358,7 +6339,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6358
6339
|
}),
|
|
6359
6340
|
/* @__PURE__ */ S("a", {
|
|
6360
6341
|
onClick: (n) => {
|
|
6361
|
-
t(n, e.map((e) =>
|
|
6342
|
+
t(n, e.map((e) => Ud(e) ? {
|
|
6362
6343
|
...e,
|
|
6363
6344
|
selected: !e.selected
|
|
6364
6345
|
} : e));
|
|
@@ -6368,19 +6349,19 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6368
6349
|
]
|
|
6369
6350
|
}), /* @__PURE__ */ S(as, { margin: 0 })] }), e.map((n, r) => {
|
|
6370
6351
|
switch (n.type) {
|
|
6371
|
-
case
|
|
6352
|
+
case Hd.HEADING:
|
|
6372
6353
|
var i;
|
|
6373
|
-
return /* @__PURE__ */ S(
|
|
6374
|
-
case
|
|
6354
|
+
return /* @__PURE__ */ S(Vd, { label: n.label }, (i = n.key) == null ? r : i);
|
|
6355
|
+
case Hd.DIVIDER:
|
|
6375
6356
|
var a;
|
|
6376
6357
|
return /* @__PURE__ */ S(as, { margin: 0 }, (a = n.key) == null ? r : a);
|
|
6377
6358
|
default:
|
|
6378
6359
|
var o;
|
|
6379
|
-
return /* @__PURE__ */ S(
|
|
6360
|
+
return /* @__PURE__ */ S(Bd, {
|
|
6380
6361
|
option: n,
|
|
6381
6362
|
onChange: (r) => {
|
|
6382
6363
|
let { value: i } = n;
|
|
6383
|
-
t(r, e.map((e) => e.type ===
|
|
6364
|
+
t(r, e.map((e) => e.type === Hd.HEADING || e.type === Hd.DIVIDER || e.value !== i ? e : {
|
|
6384
6365
|
...e,
|
|
6385
6366
|
selected: !e.selected
|
|
6386
6367
|
}));
|
|
@@ -6388,7 +6369,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6388
6369
|
}, (o = n.key) == null ? r : o);
|
|
6389
6370
|
}
|
|
6390
6371
|
})]
|
|
6391
|
-
}),
|
|
6372
|
+
}), Gd = ({ name: e, disabled: t, label: n, options: r, onChange: i, small: a = !1, showHeader: o = !0, maxHeight: s = "40vh", testId: c }) => /* @__PURE__ */ S(vo, {
|
|
6392
6373
|
testId: c,
|
|
6393
6374
|
disabled: t,
|
|
6394
6375
|
menu: {
|
|
@@ -6396,7 +6377,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6396
6377
|
small: a,
|
|
6397
6378
|
label: n,
|
|
6398
6379
|
trigger: Ai.DROP_DOWN_BUTTON,
|
|
6399
|
-
sections: /* @__PURE__ */ S(
|
|
6380
|
+
sections: /* @__PURE__ */ S(Wd, {
|
|
6400
6381
|
testId: c,
|
|
6401
6382
|
options: r,
|
|
6402
6383
|
onChangeOptions: (t, n) => {
|
|
@@ -6406,13 +6387,13 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6406
6387
|
maxHeight: s
|
|
6407
6388
|
})
|
|
6408
6389
|
}
|
|
6409
|
-
}),
|
|
6390
|
+
}), Kd = {
|
|
6410
6391
|
page: "_page_beskc_1",
|
|
6411
6392
|
scroll: "_scroll_beskc_23"
|
|
6412
|
-
},
|
|
6393
|
+
}, qd = ({ children: e, left: t = "var(--size-sidebar)", padding: n = !0, scroll: r = !0, top: i = "var(--size-topbar)" }) => {
|
|
6413
6394
|
let a = typeof n == "string" ? n : n === !0 ? "var(--padding)" : "0";
|
|
6414
6395
|
return /* @__PURE__ */ S("div", {
|
|
6415
|
-
className: b(
|
|
6396
|
+
className: b(Kd.page, r ? Kd.scroll : ""),
|
|
6416
6397
|
style: {
|
|
6417
6398
|
left: t,
|
|
6418
6399
|
padding: a,
|
|
@@ -6420,19 +6401,19 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6420
6401
|
},
|
|
6421
6402
|
children: e
|
|
6422
6403
|
});
|
|
6423
|
-
},
|
|
6404
|
+
}, Jd = ({ id: e, children: t }) => {
|
|
6424
6405
|
let n = document.querySelector(`#${e}`), [r, i] = v(!1);
|
|
6425
6406
|
return m(() => {
|
|
6426
6407
|
r || i(!0);
|
|
6427
6408
|
}, [e]), n ? Xr(t, n) : null;
|
|
6428
|
-
},
|
|
6409
|
+
}, Yd = { printHeader: "_printHeader_o7xxx_1" }, Xd = ({ logo: e, alt: t, logoWidth: n = "100px" }) => /* @__PURE__ */ S("img", {
|
|
6429
6410
|
src: e,
|
|
6430
6411
|
alt: t,
|
|
6431
|
-
className:
|
|
6412
|
+
className: Yd.printHeader,
|
|
6432
6413
|
style: { width: n }
|
|
6433
|
-
}),
|
|
6414
|
+
}), Zd = ({ name: e, label: t, options: n, value: r, onChange: i, disabled: a = !1, small: o = !1, noMargin: s = !1, inline: c = !1, testId: l }) => {
|
|
6434
6415
|
var d;
|
|
6435
|
-
let f = u(W), { simpleInputs: p, options: m, selectedOptions: h } =
|
|
6416
|
+
let f = u(W), { simpleInputs: p, options: m, selectedOptions: h } = nl(n, r), g = h == null ? void 0 : p ? h : h.value, _ = a || f;
|
|
6436
6417
|
return /* @__PURE__ */ C(Jr, {
|
|
6437
6418
|
name: e,
|
|
6438
6419
|
"aria-label": t ? void 0 : String(e == null ? "Radio group" : e),
|
|
@@ -6450,15 +6431,15 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6450
6431
|
} });
|
|
6451
6432
|
},
|
|
6452
6433
|
isDisabled: _,
|
|
6453
|
-
className:
|
|
6434
|
+
className: Vl.wrapper,
|
|
6454
6435
|
"data-testid": l,
|
|
6455
6436
|
children: [t && /* @__PURE__ */ S(Gr, {
|
|
6456
|
-
className:
|
|
6437
|
+
className: Vl.groupLabel,
|
|
6457
6438
|
children: t
|
|
6458
6439
|
}), m.map((e) => {
|
|
6459
6440
|
var t, n;
|
|
6460
6441
|
let r = a || e.disabled || f;
|
|
6461
|
-
return /* @__PURE__ */ S(
|
|
6442
|
+
return /* @__PURE__ */ S(Hl, {
|
|
6462
6443
|
value: e.value,
|
|
6463
6444
|
label: e.label,
|
|
6464
6445
|
disabled: r,
|
|
@@ -6471,40 +6452,40 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6471
6452
|
}, (t = (n = e.value) == null ? void 0 : n.toString()) == null ? "" : t);
|
|
6472
6453
|
})]
|
|
6473
6454
|
});
|
|
6474
|
-
},
|
|
6455
|
+
}, Qd = {
|
|
6475
6456
|
richTextToolbar: "_richTextToolbar_1gbkk_1",
|
|
6476
6457
|
richTextToolbarContainer: "_richTextToolbarContainer_1gbkk_5"
|
|
6477
|
-
},
|
|
6458
|
+
}, $d = /* @__PURE__ */ function(e) {
|
|
6478
6459
|
return e.BOLD = "bold", e.ITALIC = "italic", e.CODE = "code", e.UL = "ul", e.OL = "ol", e.MENTION = "at", e;
|
|
6479
|
-
}({}),
|
|
6460
|
+
}({}), ef = ({ editor: e, disabled: t = !1, showMentionButton: n = !1, toolbarComponent: r = null, testId: i }) => {
|
|
6480
6461
|
var a, o, s, c, l;
|
|
6481
6462
|
let u = [
|
|
6482
6463
|
{
|
|
6483
|
-
icon:
|
|
6464
|
+
icon: $d.BOLD,
|
|
6484
6465
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBold().run(),
|
|
6485
6466
|
active: (a = e == null ? void 0 : e.isActive("bold")) != null && a,
|
|
6486
6467
|
testId: "bold"
|
|
6487
6468
|
},
|
|
6488
6469
|
{
|
|
6489
|
-
icon:
|
|
6470
|
+
icon: $d.ITALIC,
|
|
6490
6471
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleItalic().run(),
|
|
6491
6472
|
active: (o = e == null ? void 0 : e.isActive("italic")) != null && o,
|
|
6492
6473
|
testId: "italic"
|
|
6493
6474
|
},
|
|
6494
6475
|
{
|
|
6495
|
-
icon:
|
|
6476
|
+
icon: $d.CODE,
|
|
6496
6477
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleCode().run(),
|
|
6497
6478
|
active: (s = e == null ? void 0 : e.isActive("code")) != null && s,
|
|
6498
6479
|
testId: "code"
|
|
6499
6480
|
},
|
|
6500
6481
|
{
|
|
6501
|
-
icon:
|
|
6482
|
+
icon: $d.UL,
|
|
6502
6483
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBulletList().run(),
|
|
6503
6484
|
active: (c = e == null ? void 0 : e.isActive("bulletList")) != null && c,
|
|
6504
6485
|
testId: "bulletList"
|
|
6505
6486
|
},
|
|
6506
6487
|
{
|
|
6507
|
-
icon:
|
|
6488
|
+
icon: $d.OL,
|
|
6508
6489
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleOrderedList().run(),
|
|
6509
6490
|
active: (l = e == null ? void 0 : e.isActive("orderedList")) != null && l,
|
|
6510
6491
|
testId: "orderedList"
|
|
@@ -6513,17 +6494,17 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6513
6494
|
if (n) {
|
|
6514
6495
|
var d;
|
|
6515
6496
|
u.push({
|
|
6516
|
-
icon:
|
|
6497
|
+
icon: $d.MENTION,
|
|
6517
6498
|
onClick: () => e == null ? void 0 : e.chain().focus().insertContent("@").run(),
|
|
6518
6499
|
active: (d = e == null ? void 0 : e.isActive("mention")) != null && d,
|
|
6519
6500
|
testId: "mention"
|
|
6520
6501
|
});
|
|
6521
6502
|
}
|
|
6522
6503
|
return /* @__PURE__ */ C("div", {
|
|
6523
|
-
className:
|
|
6504
|
+
className: Qd.richTextToolbarContainer,
|
|
6524
6505
|
"data-testid": i,
|
|
6525
6506
|
children: [/* @__PURE__ */ S("div", {
|
|
6526
|
-
className:
|
|
6507
|
+
className: Qd.richTextToolbar,
|
|
6527
6508
|
children: u.map((e, n) => /* @__PURE__ */ S(K, {
|
|
6528
6509
|
small: !0,
|
|
6529
6510
|
round: !0,
|
|
@@ -6537,36 +6518,36 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6537
6518
|
}, n))
|
|
6538
6519
|
}), r]
|
|
6539
6520
|
});
|
|
6540
|
-
},
|
|
6541
|
-
let t =
|
|
6521
|
+
}, tf = 8, nf = /^\[@((?:\\.|[^\\\]])*)\]\(mention:((?:\\.|[^\\)])+)\)/, rf = (e) => e.replace(/[\\\][()]/g, "\\$&"), af = (e) => e.replace(/\\(.)/g, "$1"), of = (e) => typeof e == "string" ? e : "", sf = (e) => {
|
|
6522
|
+
let t = nf.exec(e);
|
|
6542
6523
|
if (!t) return;
|
|
6543
6524
|
let [n, r, i] = t;
|
|
6544
6525
|
return {
|
|
6545
6526
|
raw: n,
|
|
6546
|
-
id:
|
|
6547
|
-
label:
|
|
6527
|
+
id: af(i),
|
|
6528
|
+
label: af(r)
|
|
6548
6529
|
};
|
|
6549
|
-
},
|
|
6530
|
+
}, cf = (e) => {
|
|
6550
6531
|
if (!e) return [];
|
|
6551
6532
|
let t = /* @__PURE__ */ new Set();
|
|
6552
6533
|
return e.state.doc.descendants((e) => {
|
|
6553
6534
|
e.type.name === _i.name && typeof e.attrs.id == "string" && t.add(e.attrs.id);
|
|
6554
6535
|
}), [...t];
|
|
6555
|
-
},
|
|
6536
|
+
}, lf = (e, t) => `[@${rf(e)}](mention:${rf(t)})`, uf = (e, t) => _i.extend({
|
|
6556
6537
|
renderMarkdown: (e) => {
|
|
6557
6538
|
var t, n;
|
|
6558
|
-
return
|
|
6539
|
+
return lf(of((t = e.attrs) == null ? void 0 : t.label), of((n = e.attrs) == null ? void 0 : n.id));
|
|
6559
6540
|
},
|
|
6560
6541
|
parseMarkdown: (e, t) => t.createNode(_i.name, {
|
|
6561
|
-
id:
|
|
6562
|
-
label:
|
|
6542
|
+
id: of(e.id),
|
|
6543
|
+
label: of(e.label)
|
|
6563
6544
|
}),
|
|
6564
6545
|
markdownTokenizer: {
|
|
6565
6546
|
name: _i.name,
|
|
6566
6547
|
level: "inline",
|
|
6567
6548
|
start: (e) => e.indexOf("[@"),
|
|
6568
6549
|
tokenize: (e) => {
|
|
6569
|
-
let t =
|
|
6550
|
+
let t = sf(e);
|
|
6570
6551
|
return t && {
|
|
6571
6552
|
type: _i.name,
|
|
6572
6553
|
...t
|
|
@@ -6582,11 +6563,11 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6582
6563
|
var r;
|
|
6583
6564
|
let i = e();
|
|
6584
6565
|
if (!i) return [];
|
|
6585
|
-
let a = new Set(
|
|
6586
|
-
return (await i.getItems(t)).filter(({ id: e }) => !a.has(e)).slice(0, (r = i.maxItems) == null ?
|
|
6566
|
+
let a = new Set(cf(n));
|
|
6567
|
+
return (await i.getItems(t)).filter(({ id: e }) => !a.has(e)).slice(0, (r = i.maxItems) == null ? tf : r);
|
|
6587
6568
|
},
|
|
6588
6569
|
render: t
|
|
6589
|
-
} }),
|
|
6570
|
+
} }), df = {
|
|
6590
6571
|
inputInTable: "_inputInTable_1xhvx_1",
|
|
6591
6572
|
inputHover: "_inputHover_1xhvx_13",
|
|
6592
6573
|
inputFocus: "_inputFocus_1xhvx_18",
|
|
@@ -6601,7 +6582,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6601
6582
|
mentionLayer: "_mentionLayer_1xhvx_133",
|
|
6602
6583
|
mentionOption: "_mentionOption_1xhvx_144",
|
|
6603
6584
|
focused: "_focused_1xhvx_150"
|
|
6604
|
-
},
|
|
6585
|
+
}, ff = o(({ editable: e, getRect: t, items: n, onDismiss: r, onSelect: i }, a) => {
|
|
6605
6586
|
let [o, s] = v(0), c = n.length > 0, u = f(), m = l((e) => `${u}-option-${e}`, [u]), { renderLayer: g, layerProps: y, triggerProps: x } = fa({
|
|
6606
6587
|
isOpen: c,
|
|
6607
6588
|
placement: "bottom-start",
|
|
@@ -6663,14 +6644,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6663
6644
|
i
|
|
6664
6645
|
]), c ? g(/* @__PURE__ */ S("div", {
|
|
6665
6646
|
...y,
|
|
6666
|
-
className:
|
|
6647
|
+
className: df.mentionLayer,
|
|
6667
6648
|
id: u,
|
|
6668
6649
|
role: "listbox",
|
|
6669
6650
|
children: n.map((e, t) => /* @__PURE__ */ S("div", {
|
|
6670
6651
|
id: m(t),
|
|
6671
6652
|
role: "option",
|
|
6672
6653
|
"aria-selected": t === o,
|
|
6673
|
-
className: b(
|
|
6654
|
+
className: b(df.mentionOption, { [df.focused]: t === o }),
|
|
6674
6655
|
onMouseEnter: () => s(t),
|
|
6675
6656
|
onMouseDown: (t) => {
|
|
6676
6657
|
t.preventDefault(), i(e);
|
|
@@ -6678,12 +6659,12 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6678
6659
|
children: e.label
|
|
6679
6660
|
}, e.id))
|
|
6680
6661
|
})) : null;
|
|
6681
|
-
}),
|
|
6662
|
+
}), pf = ({ clientRect: e, command: t, editor: n, items: r }) => ({
|
|
6682
6663
|
clientRect: e,
|
|
6683
6664
|
command: t,
|
|
6684
6665
|
items: r,
|
|
6685
6666
|
editable: n.view.dom
|
|
6686
|
-
}),
|
|
6667
|
+
}), mf = c(o(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i, mentions: a, testId: o }, s) => {
|
|
6687
6668
|
var c, l, f, m;
|
|
6688
6669
|
let g = u(W), y = r || g, b = !!a, x = _(a), w = _(null), T = _(n == null ? "" : n), [E, D] = v(null);
|
|
6689
6670
|
d(() => {
|
|
@@ -6693,9 +6674,9 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6693
6674
|
mi,
|
|
6694
6675
|
hi.configure({ placeholder: e }),
|
|
6695
6676
|
gi,
|
|
6696
|
-
|
|
6697
|
-
onStart: (e) => D(
|
|
6698
|
-
onUpdate: (e) => D(
|
|
6677
|
+
uf(() => x.current, () => ({
|
|
6678
|
+
onStart: (e) => D(pf(e)),
|
|
6679
|
+
onUpdate: (e) => D(pf(e)),
|
|
6699
6680
|
onExit: () => D(null),
|
|
6700
6681
|
onKeyDown: ({ event: e }) => {
|
|
6701
6682
|
var t, n;
|
|
@@ -6707,9 +6688,9 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6707
6688
|
content: T.current,
|
|
6708
6689
|
contentType: "markdown",
|
|
6709
6690
|
editable: !y,
|
|
6710
|
-
editorProps: { attributes: { class:
|
|
6691
|
+
editorProps: { attributes: { class: df.editable } },
|
|
6711
6692
|
onUpdate: ({ editor: e }) => {
|
|
6712
|
-
t == null || t(e.getMarkdown(), { mentionedIds:
|
|
6693
|
+
t == null || t(e.getMarkdown(), { mentionedIds: cf(e) });
|
|
6713
6694
|
}
|
|
6714
6695
|
});
|
|
6715
6696
|
return d(() => {
|
|
@@ -6722,12 +6703,12 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6722
6703
|
}, [y, k]), p(s, () => ({
|
|
6723
6704
|
clearContent: () => k == null ? void 0 : k.commands.clearContent(!1),
|
|
6724
6705
|
editor: k,
|
|
6725
|
-
getMentionedIds: () =>
|
|
6706
|
+
getMentionedIds: () => cf(k)
|
|
6726
6707
|
}), [k]), /* @__PURE__ */ C("div", {
|
|
6727
|
-
className:
|
|
6708
|
+
className: df.richTextInput,
|
|
6728
6709
|
"data-testid": o,
|
|
6729
6710
|
children: [
|
|
6730
|
-
/* @__PURE__ */ S(
|
|
6711
|
+
/* @__PURE__ */ S(ef, {
|
|
6731
6712
|
editor: k,
|
|
6732
6713
|
disabled: y,
|
|
6733
6714
|
showMentionButton: b && ((c = a == null ? void 0 : a.showMentionButton) == null || c),
|
|
@@ -6738,7 +6719,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6738
6719
|
editor: k,
|
|
6739
6720
|
"data-testid": o && `${o}-editor`
|
|
6740
6721
|
}),
|
|
6741
|
-
b && /* @__PURE__ */ S(ra, { children: /* @__PURE__ */ S(
|
|
6722
|
+
b && /* @__PURE__ */ S(ra, { children: /* @__PURE__ */ S(ff, {
|
|
6742
6723
|
ref: w,
|
|
6743
6724
|
editable: (l = E == null ? void 0 : E.editable) == null ? null : l,
|
|
6744
6725
|
getRect: (f = E == null ? void 0 : E.clientRect) == null ? null : f,
|
|
@@ -6748,13 +6729,13 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6748
6729
|
}) })
|
|
6749
6730
|
]
|
|
6750
6731
|
});
|
|
6751
|
-
})),
|
|
6752
|
-
className:
|
|
6732
|
+
})), hf = ({ children: e }) => /* @__PURE__ */ S("span", {
|
|
6733
|
+
className: df.mention,
|
|
6753
6734
|
children: e
|
|
6754
|
-
}),
|
|
6735
|
+
}), gf = { row: "_row_n16je_1" }, _f = ({ alignItems: t = "initial", justifyContent: n = "initial", children: r = null, flex: i = !1, height: a = "auto", marginBottom: o = "0", marginTop: c = "0", spacing: l = "var(--padding)", wrap: u = !1, testId: d = null }) => {
|
|
6755
6736
|
let f = typeof l == "number" ? `${l}px` : l, p = (r === null || r === !1 ? [] : Array.isArray(r) ? r.filter((e) => s(e)) : [r]).map((t, n) => /* @__PURE__ */ S(e.Fragment, { children: e.cloneElement(t, { spacing: f }) }, n));
|
|
6756
6737
|
return /* @__PURE__ */ S("div", {
|
|
6757
|
-
className: b(
|
|
6738
|
+
className: b(gf.row),
|
|
6758
6739
|
style: {
|
|
6759
6740
|
alignItems: t,
|
|
6760
6741
|
justifyContent: n,
|
|
@@ -6770,7 +6751,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6770
6751
|
"data-testid": d,
|
|
6771
6752
|
children: p
|
|
6772
6753
|
});
|
|
6773
|
-
},
|
|
6754
|
+
}, vf = {
|
|
6774
6755
|
inputInTable: "_inputInTable_t1w93_1",
|
|
6775
6756
|
inputHover: "_inputHover_t1w93_13",
|
|
6776
6757
|
inputFocus: "_inputFocus_t1w93_18",
|
|
@@ -6790,7 +6771,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6790
6771
|
experimental: "_experimental_t1w93_159",
|
|
6791
6772
|
active: "_active_t1w93_163",
|
|
6792
6773
|
icon: "_icon_t1w93_167"
|
|
6793
|
-
},
|
|
6774
|
+
}, yf = c(({ isOpen: e, label: t, icon: n, invalid: r }) => /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(ga, {
|
|
6794
6775
|
text: t,
|
|
6795
6776
|
enabled: !e,
|
|
6796
6777
|
placement: "right-center",
|
|
@@ -6799,7 +6780,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6799
6780
|
padding: "var(--padding-sm)",
|
|
6800
6781
|
display: "block",
|
|
6801
6782
|
children: /* @__PURE__ */ S("span", {
|
|
6802
|
-
className:
|
|
6783
|
+
className: vf.icon,
|
|
6803
6784
|
children: /* @__PURE__ */ S(uo, {
|
|
6804
6785
|
small: !0,
|
|
6805
6786
|
title: r ? "!" : void 0,
|
|
@@ -6808,18 +6789,18 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6808
6789
|
})
|
|
6809
6790
|
})
|
|
6810
6791
|
}), /* @__PURE__ */ S("span", {
|
|
6811
|
-
className:
|
|
6792
|
+
className: vf.label,
|
|
6812
6793
|
children: t
|
|
6813
|
-
})] }), (e, t) => Wr(e, t)),
|
|
6814
|
-
className:
|
|
6794
|
+
})] }), (e, t) => Wr(e, t)), bf = ({ isOpen: e, items: t, sectionIndex: n, onClick: r, testId: i }) => /* @__PURE__ */ S("div", {
|
|
6795
|
+
className: vf.list,
|
|
6815
6796
|
children: t.map((t, a) => {
|
|
6816
6797
|
let o = `${n}_${a}`;
|
|
6817
6798
|
return /* @__PURE__ */ S("a", {
|
|
6818
6799
|
href: t.value,
|
|
6819
|
-
className: b(
|
|
6800
|
+
className: b(vf.item, t.isActive ? vf.active : "", t.isExperimental ? vf.experimental : ""),
|
|
6820
6801
|
onClick: (e) => r(e, t.value, t.label, t.onClick),
|
|
6821
6802
|
"data-testid": i,
|
|
6822
|
-
children: /* @__PURE__ */ S(
|
|
6803
|
+
children: /* @__PURE__ */ S(yf, {
|
|
6823
6804
|
label: t.label,
|
|
6824
6805
|
icon: t.icon,
|
|
6825
6806
|
invalid: t.invalid,
|
|
@@ -6827,16 +6808,16 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6827
6808
|
}, o)
|
|
6828
6809
|
}, o);
|
|
6829
6810
|
})
|
|
6830
|
-
}),
|
|
6831
|
-
className:
|
|
6811
|
+
}), xf = ({ isOpen: t, sections: n, onClick: r }) => /* @__PURE__ */ S(x, { children: n.map((n, i) => /* @__PURE__ */ C(e.Fragment, { children: [/* @__PURE__ */ S("h5", {
|
|
6812
|
+
className: vf.subtitle,
|
|
6832
6813
|
children: n.heading.toUpperCase()
|
|
6833
|
-
}), /* @__PURE__ */ S(
|
|
6814
|
+
}), /* @__PURE__ */ S(bf, {
|
|
6834
6815
|
isOpen: t,
|
|
6835
6816
|
items: n.items,
|
|
6836
6817
|
sectionIndex: i,
|
|
6837
6818
|
onClick: r,
|
|
6838
6819
|
testId: n.testId
|
|
6839
|
-
})] }, i)) }),
|
|
6820
|
+
})] }, i)) }), Sf = c(({ options: e, startOpen: t = !1, onShiftClickToggleOpen: n = () => {}, top: r, testId: i }) => {
|
|
6840
6821
|
let [a, o] = v(t), s = (e, t, n, r) => {
|
|
6841
6822
|
e.preventDefault(), typeof r == "function" && (e.currentTarget.value = t, e.currentTarget.label = n, r(e)), o(!1);
|
|
6842
6823
|
}, c = e.sections.length > 0;
|
|
@@ -6859,13 +6840,13 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6859
6840
|
testId: i ? `${i}-toggle` : void 0
|
|
6860
6841
|
}),
|
|
6861
6842
|
children: /* @__PURE__ */ S("div", {
|
|
6862
|
-
className: b(
|
|
6843
|
+
className: b(vf.sidebar, a ? "" : vf.collapsed),
|
|
6863
6844
|
children: c && /* @__PURE__ */ C("div", {
|
|
6864
|
-
className:
|
|
6845
|
+
className: vf.inner,
|
|
6865
6846
|
children: [/* @__PURE__ */ S("h4", {
|
|
6866
|
-
className:
|
|
6847
|
+
className: vf.title,
|
|
6867
6848
|
children: e.title
|
|
6868
|
-
}), /* @__PURE__ */ S(
|
|
6849
|
+
}), /* @__PURE__ */ S(xf, {
|
|
6869
6850
|
isOpen: a,
|
|
6870
6851
|
sections: e.sections,
|
|
6871
6852
|
onClick: s
|
|
@@ -6873,18 +6854,18 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6873
6854
|
})
|
|
6874
6855
|
})
|
|
6875
6856
|
});
|
|
6876
|
-
}, (e, t) => Wr(e, t)),
|
|
6857
|
+
}, (e, t) => Wr(e, t)), Cf = {
|
|
6877
6858
|
skeletonContainer: "_skeletonContainer_mcfxp_9",
|
|
6878
6859
|
skeleton: "_skeleton_mcfxp_9"
|
|
6879
|
-
},
|
|
6860
|
+
}, wf = ({ count: e, width: t, height: n }) => /* @__PURE__ */ S(vi, {
|
|
6880
6861
|
baseColor: "var(--color-skeleton-base)",
|
|
6881
6862
|
highlightColor: "var(--color-skeleton-highlight)",
|
|
6882
|
-
containerClassName:
|
|
6883
|
-
className:
|
|
6863
|
+
containerClassName: Cf.skeletonContainer,
|
|
6864
|
+
className: Cf.skeleton,
|
|
6884
6865
|
count: e,
|
|
6885
6866
|
width: t,
|
|
6886
6867
|
height: n
|
|
6887
|
-
}),
|
|
6868
|
+
}), Tf = {
|
|
6888
6869
|
wrapper: "_wrapper_j8x9r_1",
|
|
6889
6870
|
label: "_label_j8x9r_5",
|
|
6890
6871
|
input: "_input_j8x9r_9",
|
|
@@ -6892,38 +6873,38 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6892
6873
|
editable: "_editable_j8x9r_22",
|
|
6893
6874
|
inputControl: "_inputControl_j8x9r_25",
|
|
6894
6875
|
actions: "_actions_j8x9r_28"
|
|
6895
|
-
},
|
|
6876
|
+
}, Ef = () => {
|
|
6896
6877
|
let e = _(null);
|
|
6897
6878
|
return m(() => {
|
|
6898
6879
|
e.current && (e.current(), e.current = null);
|
|
6899
6880
|
}), (t) => {
|
|
6900
6881
|
e.current = t;
|
|
6901
6882
|
};
|
|
6902
|
-
},
|
|
6883
|
+
}, Df = (e) => {
|
|
6903
6884
|
let t = _(void 0);
|
|
6904
6885
|
return d(() => {
|
|
6905
6886
|
t.current = e;
|
|
6906
6887
|
}, [e]), t.current;
|
|
6907
|
-
},
|
|
6888
|
+
}, Of = (e, t) => {
|
|
6908
6889
|
let n = t == null ? void 0 : t[e];
|
|
6909
6890
|
if (!n) {
|
|
6910
6891
|
var r;
|
|
6911
6892
|
return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = Er(e)) == null ? "" : r;
|
|
6912
6893
|
}
|
|
6913
6894
|
return n;
|
|
6914
|
-
},
|
|
6895
|
+
}, kf = /* @__PURE__ */ function(e) {
|
|
6915
6896
|
return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
|
|
6916
|
-
}({}),
|
|
6897
|
+
}({}), Af = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), jf = (e) => {
|
|
6917
6898
|
if (!e) return !1;
|
|
6918
6899
|
let t = ur(e);
|
|
6919
6900
|
return !ir.includes(t);
|
|
6920
|
-
},
|
|
6901
|
+
}, Mf = ({ value: e, unitkey: t, toUnit: n }) => {
|
|
6921
6902
|
var r;
|
|
6922
6903
|
let i = rr[t];
|
|
6923
6904
|
if (!i || i.length === 0 || !((r = Dr(e)) != null && r.valid) || !i.includes(n)) return !1;
|
|
6924
6905
|
let a = ur(String(e));
|
|
6925
6906
|
return !(a && !i.includes(a));
|
|
6926
|
-
},
|
|
6907
|
+
}, Nf = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
|
|
6927
6908
|
var o;
|
|
6928
6909
|
let s = gr(e) ? fr(e) : e, c = [Infinity, -Infinity].includes(Number(s));
|
|
6929
6910
|
if (i || c) return {
|
|
@@ -6943,13 +6924,13 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6943
6924
|
value: void 0,
|
|
6944
6925
|
error: "Source unit is missing"
|
|
6945
6926
|
};
|
|
6946
|
-
if (
|
|
6927
|
+
if (Af(s)) return {
|
|
6947
6928
|
value: void 0,
|
|
6948
6929
|
error: "Value is invalid for conversion"
|
|
6949
6930
|
};
|
|
6950
6931
|
try {
|
|
6951
6932
|
let e = kr(s, l);
|
|
6952
|
-
if (
|
|
6933
|
+
if (Mf({
|
|
6953
6934
|
value: e,
|
|
6954
6935
|
toUnit: n,
|
|
6955
6936
|
unitkey: t
|
|
@@ -6970,13 +6951,13 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6970
6951
|
error: "Conversion not possible"
|
|
6971
6952
|
};
|
|
6972
6953
|
}
|
|
6973
|
-
},
|
|
6974
|
-
let a = fr(e), o =
|
|
6975
|
-
return !
|
|
6954
|
+
}, Pf = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
|
|
6955
|
+
let a = fr(e), o = Af(a);
|
|
6956
|
+
return !Mf({
|
|
6976
6957
|
value: e,
|
|
6977
6958
|
unitkey: n,
|
|
6978
6959
|
toUnit: t
|
|
6979
|
-
}) ||
|
|
6960
|
+
}) || jf(e) || o ? { value: a } : gr(e) ? Nf({
|
|
6980
6961
|
value: e,
|
|
6981
6962
|
unitkey: n,
|
|
6982
6963
|
toUnit: t,
|
|
@@ -6984,25 +6965,25 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
6984
6965
|
doNotConvertValue: i,
|
|
6985
6966
|
exactPrecision: !0
|
|
6986
6967
|
}) : { value: e };
|
|
6987
|
-
},
|
|
6968
|
+
}, Ff = (e) => hn(e) && !sn(e) && !fn(e) ? on(e, "fieldName", "") : typeof e == "string" ? e : "", If = (e = "") => ir == null ? void 0 : ir.includes(e), Lf = (e, t) => {
|
|
6988
6969
|
let n = ur(e || "");
|
|
6989
|
-
return
|
|
6990
|
-
},
|
|
6991
|
-
|
|
6992
|
-
},
|
|
6970
|
+
return If(t) && If(n);
|
|
6971
|
+
}, Rf = i(null), zf = () => u(Rf), Bf = !1, Vf = (e) => {
|
|
6972
|
+
Bf || (Bf = !0, Rf = e);
|
|
6973
|
+
}, Hf = (e) => mr(e) ? e : vr(e), Uf = {
|
|
6993
6974
|
predefinedMenuActive: "_predefinedMenuActive_ye9w9_1",
|
|
6994
6975
|
inputWrapper: "_inputWrapper_ye9w9_4"
|
|
6995
|
-
},
|
|
6976
|
+
}, Wf = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUnit: r = !1, error: i = null, left: a = !1, small: o = !1, width: s = "100%", value: c, unitkey: l = "", initUnit: u, noConversion: f = !1, onChange: p = yn, onClick: m = yn, onFocus: g = yn, onSwitchUnit: _ = yn, unitTemplate: y, testId: w, warning: T = null, predefinedOptions: E, initialPredefinedOption: D = !1, shouldLinkAutomaticly: O = !0, selectedPredefinedOptionKey: k, validationCallback: A = () => ({
|
|
6996
6977
|
name: "",
|
|
6997
6978
|
error: null
|
|
6998
6979
|
}), 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 }) => {
|
|
6999
|
-
let B =
|
|
6980
|
+
let B = zf(), ee = Ef();
|
|
7000
6981
|
typeof c == "number" && (c = `${c}`);
|
|
7001
|
-
let [te = "", ne = ""] = c === void 0 ? [] : Sr(c), V = h(() =>
|
|
6982
|
+
let [te = "", ne = ""] = c === void 0 ? [] : Sr(c), V = h(() => Of(l, y || (B == null ? void 0 : B.unitTemplate)), [
|
|
7002
6983
|
l,
|
|
7003
6984
|
y,
|
|
7004
6985
|
B == null ? void 0 : B.unitTemplate
|
|
7005
|
-
]), re =
|
|
6986
|
+
]), re = Lf(c, V), ie = u || V || ne, ae = Df(ie), { value: oe } = Pf({
|
|
7006
6987
|
value: c,
|
|
7007
6988
|
toUnit: ie,
|
|
7008
6989
|
unitkey: l,
|
|
@@ -7014,10 +6995,10 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7014
6995
|
} : {
|
|
7015
6996
|
value: oe,
|
|
7016
6997
|
unit: ie
|
|
7017
|
-
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = v(D ?
|
|
6998
|
+
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = v(D ? kf.PREDEFINED : kf.CUSTOM), fe = !!(j || n), pe = E && E.find((e) => {
|
|
7018
6999
|
if (!(e != null && e.value)) return;
|
|
7019
7000
|
if (k) return k === e.valueKey;
|
|
7020
|
-
let t = gr(e.value) ? ur(e.value) : "", { value: n = c } =
|
|
7001
|
+
let t = gr(e.value) ? ur(e.value) : "", { value: n = c } = Nf({
|
|
7021
7002
|
value: String(c),
|
|
7022
7003
|
unitkey: l,
|
|
7023
7004
|
toUnit: t
|
|
@@ -7026,7 +7007,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7026
7007
|
}), me = () => {
|
|
7027
7008
|
var e;
|
|
7028
7009
|
let t = (e = c) == null ? "" : e, n = se.unit;
|
|
7029
|
-
if (!
|
|
7010
|
+
if (!Mf({
|
|
7030
7011
|
value: t,
|
|
7031
7012
|
unitkey: l,
|
|
7032
7013
|
toUnit: n
|
|
@@ -7041,7 +7022,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7041
7022
|
return null;
|
|
7042
7023
|
}
|
|
7043
7024
|
}, he = (t) => {
|
|
7044
|
-
let n =
|
|
7025
|
+
let n = Ff(e), r = t.target, { value: i, selectionStart: a } = r, o = kr(i, (se == null ? void 0 : se.unit) || "");
|
|
7045
7026
|
p({ target: {
|
|
7046
7027
|
value: N ? kr(sr(o, ne), ne) : o,
|
|
7047
7028
|
name: n
|
|
@@ -7063,7 +7044,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7063
7044
|
if (ie) {
|
|
7064
7045
|
let e, t = "";
|
|
7065
7046
|
if (ae !== ie) {
|
|
7066
|
-
let { value: n } =
|
|
7047
|
+
let { value: n } = Pf({
|
|
7067
7048
|
value: c,
|
|
7068
7049
|
toUnit: ie,
|
|
7069
7050
|
unitkey: l,
|
|
@@ -7072,7 +7053,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7072
7053
|
});
|
|
7073
7054
|
e = n, t = ie;
|
|
7074
7055
|
} else if (kr(se.value, se.unit) !== c) {
|
|
7075
|
-
let { value: n } =
|
|
7056
|
+
let { value: n } = Pf({
|
|
7076
7057
|
value: c,
|
|
7077
7058
|
toUnit: se.unit,
|
|
7078
7059
|
unitkey: l,
|
|
@@ -7084,7 +7065,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7084
7065
|
e !== void 0 && ce({
|
|
7085
7066
|
value: e,
|
|
7086
7067
|
unit: t
|
|
7087
|
-
}), de(E && pe && O ?
|
|
7068
|
+
}), de(E && pe && O ? kf.PREDEFINED : kf.CUSTOM);
|
|
7088
7069
|
}
|
|
7089
7070
|
}, [
|
|
7090
7071
|
ie,
|
|
@@ -7092,14 +7073,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7092
7073
|
i,
|
|
7093
7074
|
O
|
|
7094
7075
|
]);
|
|
7095
|
-
let _e = me(), ve = _r(se.unit) || se.unit || "", ye = f || !_e || _e && _e.length === 1, be =
|
|
7076
|
+
let _e = me(), ve = _r(se.unit) || se.unit || "", ye = f || !_e || _e && _e.length === 1, be = Ff(e), xe, Se = (t) => {
|
|
7096
7077
|
let r = t != null && t.value ? t.value : "", [i = "", a = ""] = gr(r) ? Sr(r) : [r], o = Or(r);
|
|
7097
|
-
if (
|
|
7078
|
+
if (Mf({
|
|
7098
7079
|
value: r,
|
|
7099
7080
|
unitkey: l,
|
|
7100
7081
|
toUnit: a
|
|
7101
7082
|
})) {
|
|
7102
|
-
let { value: e = "" } =
|
|
7083
|
+
let { value: e = "" } = Pf({
|
|
7103
7084
|
value: r,
|
|
7104
7085
|
toUnit: V,
|
|
7105
7086
|
unitkey: l,
|
|
@@ -7112,7 +7093,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7112
7093
|
type: $a.OPTION,
|
|
7113
7094
|
inline: !0,
|
|
7114
7095
|
onClick: () => {
|
|
7115
|
-
Dr(i).valid && !n && (de(
|
|
7096
|
+
Dr(i).valid && !n && (de(kf.PREDEFINED), p({ target: {
|
|
7116
7097
|
value: r,
|
|
7117
7098
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || "",
|
|
7118
7099
|
predefinedSelected: !0,
|
|
@@ -7124,27 +7105,27 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7124
7105
|
height: "0"
|
|
7125
7106
|
})] }),
|
|
7126
7107
|
description: o,
|
|
7127
|
-
selected: pe === t && ue ===
|
|
7108
|
+
selected: pe === t && ue === kf.PREDEFINED
|
|
7128
7109
|
};
|
|
7129
7110
|
};
|
|
7130
7111
|
if (xe = [{
|
|
7131
7112
|
type: $a.OPTION,
|
|
7132
7113
|
inline: !0,
|
|
7133
7114
|
onClick: () => {
|
|
7134
|
-
ue !==
|
|
7115
|
+
ue !== kf.CUSTOM && !n && p({ target: {
|
|
7135
7116
|
value: kr(se.value, se.unit),
|
|
7136
7117
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || ""
|
|
7137
7118
|
} });
|
|
7138
7119
|
},
|
|
7139
7120
|
label: "Custom",
|
|
7140
|
-
selected: ue ===
|
|
7121
|
+
selected: ue === kf.CUSTOM
|
|
7141
7122
|
}], E != null && E.length) {
|
|
7142
7123
|
let e = E.map(Se);
|
|
7143
7124
|
xe = [...xe, ...e];
|
|
7144
7125
|
}
|
|
7145
7126
|
let Ce = (e) => {
|
|
7146
7127
|
if (gr(e)) {
|
|
7147
|
-
let t = ur(e), { value: n } =
|
|
7128
|
+
let t = ur(e), { value: n } = Pf({
|
|
7148
7129
|
value: e,
|
|
7149
7130
|
toUnit: se.unit,
|
|
7150
7131
|
unitkey: l,
|
|
@@ -7156,7 +7137,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7156
7137
|
return e;
|
|
7157
7138
|
}, we = !E && (!R || R === H.FIRST) ? H.FIRST : H.MIDDLE, Te = !R || R === H.LAST ? H.LAST : H.MIDDLE;
|
|
7158
7139
|
return /* @__PURE__ */ S("div", {
|
|
7159
|
-
className: ue ===
|
|
7140
|
+
className: ue === kf.PREDEFINED ? b(Uf.predefinedMenuActive) : "",
|
|
7160
7141
|
children: /* @__PURE__ */ C(xs, {
|
|
7161
7142
|
small: o,
|
|
7162
7143
|
width: s,
|
|
@@ -7171,18 +7152,18 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7171
7152
|
trigger: "Component",
|
|
7172
7153
|
component: /* @__PURE__ */ S(K, {
|
|
7173
7154
|
groupOrder: "first",
|
|
7174
|
-
active: ue ===
|
|
7175
|
-
icon: ue ===
|
|
7155
|
+
active: ue === kf.PREDEFINED,
|
|
7156
|
+
icon: ue === kf.PREDEFINED ? "link" : "unlink",
|
|
7176
7157
|
small: o
|
|
7177
7158
|
}),
|
|
7178
7159
|
small: o,
|
|
7179
7160
|
sections: xe
|
|
7180
7161
|
},
|
|
7181
|
-
tooltip: ue ===
|
|
7162
|
+
tooltip: ue === kf.PREDEFINED ? pe == null ? void 0 : pe.label : ""
|
|
7182
7163
|
}),
|
|
7183
7164
|
/* @__PURE__ */ S("div", {
|
|
7184
|
-
className:
|
|
7185
|
-
children: /* @__PURE__ */ S(
|
|
7165
|
+
className: Uf.inputWrapper,
|
|
7166
|
+
children: /* @__PURE__ */ S(Sl, {
|
|
7186
7167
|
name: be,
|
|
7187
7168
|
testId: w,
|
|
7188
7169
|
disabled: n,
|
|
@@ -7205,7 +7186,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7205
7186
|
tooltip: z
|
|
7206
7187
|
}, be)
|
|
7207
7188
|
}),
|
|
7208
|
-
ve && (ye || !re ? /* @__PURE__ */ S(
|
|
7189
|
+
ve && (ye || !re ? /* @__PURE__ */ S(ll, {
|
|
7209
7190
|
groupOrder: Te,
|
|
7210
7191
|
small: o,
|
|
7211
7192
|
children: ve
|
|
@@ -7223,7 +7204,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7223
7204
|
let r = n || t || "", i = hr(e) ? e : "";
|
|
7224
7205
|
return {
|
|
7225
7206
|
type: "Option",
|
|
7226
|
-
label: P ?
|
|
7207
|
+
label: P ? Hf(i) : i,
|
|
7227
7208
|
inline: !0,
|
|
7228
7209
|
onClick: (n) => {
|
|
7229
7210
|
n.stopPropagation(), ge(e, t);
|
|
@@ -7238,10 +7219,10 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7238
7219
|
]
|
|
7239
7220
|
})
|
|
7240
7221
|
});
|
|
7241
|
-
},
|
|
7222
|
+
}, Gf = (e, t) => ({ target: {
|
|
7242
7223
|
name: e,
|
|
7243
7224
|
value: t
|
|
7244
|
-
} }),
|
|
7225
|
+
} }), Kf = (e) => `Value cannot be less than ${e}`, qf = (e) => `Value cannot be greater than ${e}`, Jf = ({ name: e = "", value: t, min: n, max: r, label: i, step: a = .01, onChange: o, onChangeComplete: s, preferredUnit: c = "m", onSwitchUnit: l, enableEditUnitInput: u = !1, disabled: f = !1, showUnitInput: p = !0, showArrows: m = !0, unitkey: h = "length", testId: g, noConversion: _ = !1, small: y = !1, marks: x, minErrorMessage: w = Kf, maxErrorMessage: T = qf }) => {
|
|
7245
7226
|
let E = kr(t, c), [D, O] = v(E), [k, A] = v(!1), [j, M] = v(c);
|
|
7246
7227
|
d(() => {
|
|
7247
7228
|
k || O(E);
|
|
@@ -7259,7 +7240,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7259
7240
|
}, z = () => {
|
|
7260
7241
|
O(E), A(!1);
|
|
7261
7242
|
}, B = () => {
|
|
7262
|
-
L || I === null || (o(
|
|
7243
|
+
L || I === null || (o(Gf(e, I)), s == null || s(Gf(e, I)), A(!1));
|
|
7263
7244
|
}, ee = (e) => {
|
|
7264
7245
|
M(e), l == null || l(e);
|
|
7265
7246
|
}, te = (e) => {
|
|
@@ -7274,7 +7255,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7274
7255
|
}, ne = (e) => {
|
|
7275
7256
|
e.key === "Enter" && B(), e.key === "Escape" && z();
|
|
7276
7257
|
}, V = f || k, re = /* @__PURE__ */ C("div", {
|
|
7277
|
-
className:
|
|
7258
|
+
className: Tf.actions,
|
|
7278
7259
|
children: [/* @__PURE__ */ S(K, {
|
|
7279
7260
|
icon: "close",
|
|
7280
7261
|
small: !0,
|
|
@@ -7289,18 +7270,18 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7289
7270
|
})]
|
|
7290
7271
|
});
|
|
7291
7272
|
return /* @__PURE__ */ C("div", {
|
|
7292
|
-
className:
|
|
7273
|
+
className: Tf.wrapper,
|
|
7293
7274
|
"data-testid": g && `${g}-wrapper`,
|
|
7294
7275
|
children: [
|
|
7295
7276
|
i && /* @__PURE__ */ S("span", {
|
|
7296
|
-
className:
|
|
7277
|
+
className: Tf.label,
|
|
7297
7278
|
children: /* @__PURE__ */ S(rs, {
|
|
7298
7279
|
small: y,
|
|
7299
7280
|
children: i
|
|
7300
7281
|
})
|
|
7301
7282
|
}),
|
|
7302
7283
|
p && /* @__PURE__ */ S("div", {
|
|
7303
|
-
className: b(
|
|
7284
|
+
className: b(Tf.input, y && Tf.inputSmall, u && !f && Tf.editable),
|
|
7304
7285
|
children: /* @__PURE__ */ S(Ao, {
|
|
7305
7286
|
content: re,
|
|
7306
7287
|
isOpen: k,
|
|
@@ -7314,11 +7295,11 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7314
7295
|
testId: g && `${g}-edit-popover`,
|
|
7315
7296
|
toggleOnTriggerClick: !1,
|
|
7316
7297
|
children: /* @__PURE__ */ S("div", {
|
|
7317
|
-
className:
|
|
7298
|
+
className: Tf.inputControl,
|
|
7318
7299
|
"data-testid": g && `${g}-edit-trigger`,
|
|
7319
7300
|
onClick: R,
|
|
7320
7301
|
onKeyDown: ne,
|
|
7321
|
-
children: /* @__PURE__ */ S(
|
|
7302
|
+
children: /* @__PURE__ */ S(Wf, {
|
|
7322
7303
|
name: e,
|
|
7323
7304
|
value: k ? D : E,
|
|
7324
7305
|
unitkey: h,
|
|
@@ -7335,7 +7316,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7335
7316
|
})
|
|
7336
7317
|
})
|
|
7337
7318
|
}),
|
|
7338
|
-
/* @__PURE__ */ S(
|
|
7319
|
+
/* @__PURE__ */ S(Ml, {
|
|
7339
7320
|
name: e,
|
|
7340
7321
|
value: t,
|
|
7341
7322
|
min: n,
|
|
@@ -7353,7 +7334,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7353
7334
|
})
|
|
7354
7335
|
]
|
|
7355
7336
|
});
|
|
7356
|
-
},
|
|
7337
|
+
}, Yf = ({ label: e, invalid: t, badge: n }) => t ? /* @__PURE__ */ S(uo, {
|
|
7357
7338
|
small: !0,
|
|
7358
7339
|
margin: "-4px",
|
|
7359
7340
|
color: "var(--color-text-error)",
|
|
@@ -7364,7 +7345,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7364
7345
|
margin: "-4px",
|
|
7365
7346
|
title: n == null ? void 0 : n.toString(),
|
|
7366
7347
|
children: e
|
|
7367
|
-
}) : /* @__PURE__ */ S(x, { children: e }),
|
|
7348
|
+
}) : /* @__PURE__ */ S(x, { children: e }), Xf = {
|
|
7368
7349
|
tabs: "_tabs_1rtn8_1",
|
|
7369
7350
|
padding: "_padding_1rtn8_7",
|
|
7370
7351
|
margin: "_margin_1rtn8_11",
|
|
@@ -7373,8 +7354,8 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7373
7354
|
left: "_left_1rtn8_64",
|
|
7374
7355
|
right: "_right_1rtn8_64",
|
|
7375
7356
|
selectionIndicator: "_selectionIndicator_1rtn8_67"
|
|
7376
|
-
},
|
|
7377
|
-
let c = u(W), { simpleInputs: l, options: d, selectedOptions: f } =
|
|
7357
|
+
}, Zf = ({ name: e = void 0, options: t = null, value: n = void 0, onChange: r = yn, padding: i = !1, margin: a = !0, testId: o, linkComponent: s }) => {
|
|
7358
|
+
let c = u(W), { simpleInputs: l, options: d, selectedOptions: f } = nl(t, n), p = pn(f) ? void 0 : l ? f : f.value, m = (e) => {
|
|
7378
7359
|
var t;
|
|
7379
7360
|
return (t = e.component) == null ? s : t;
|
|
7380
7361
|
}, h = (e) => !!(e.to && m(e)), g = (t) => {
|
|
@@ -7394,7 +7375,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7394
7375
|
"data-testid": o,
|
|
7395
7376
|
children: /* @__PURE__ */ S(xi, {
|
|
7396
7377
|
"aria-label": e == null ? "Tabs" : e,
|
|
7397
|
-
className: b(
|
|
7378
|
+
className: b(Xf.tabs, i ? Xf.padding : "", a ? Xf.margin : ""),
|
|
7398
7379
|
children: _.map((e) => {
|
|
7399
7380
|
let { label: t, url: n, to: r, disabled: i, value: a, right: o, invalid: s, badge: l, testId: u } = e, d = h(e), f = m(e);
|
|
7400
7381
|
return /* @__PURE__ */ C(bi, {
|
|
@@ -7402,23 +7383,23 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7402
7383
|
...!d && n ? { href: n } : {},
|
|
7403
7384
|
shouldSelectOnPressUp: !0,
|
|
7404
7385
|
isDisabled: i || c,
|
|
7405
|
-
className: b(
|
|
7386
|
+
className: b(Xf.item, o ? Xf.right : Xf.left),
|
|
7406
7387
|
"data-testid": u,
|
|
7407
7388
|
render: d && f ? (e) => /* @__PURE__ */ S(f, {
|
|
7408
7389
|
...e,
|
|
7409
7390
|
href: r,
|
|
7410
7391
|
to: r
|
|
7411
7392
|
}) : void 0,
|
|
7412
|
-
children: [/* @__PURE__ */ S(
|
|
7393
|
+
children: [/* @__PURE__ */ S(Yf, {
|
|
7413
7394
|
label: t,
|
|
7414
7395
|
invalid: s,
|
|
7415
7396
|
badge: l
|
|
7416
|
-
}), /* @__PURE__ */ S(yi, { className:
|
|
7397
|
+
}), /* @__PURE__ */ S(yi, { className: Xf.selectionIndicator })]
|
|
7417
7398
|
}, a);
|
|
7418
7399
|
})
|
|
7419
7400
|
})
|
|
7420
7401
|
}) : null;
|
|
7421
|
-
},
|
|
7402
|
+
}, Qf = ({ children: e, href: t = void 0, target: n = void 0, testId: r, onClick: i, component: a = "a" }) => /* @__PURE__ */ S(a, {
|
|
7422
7403
|
href: t,
|
|
7423
7404
|
to: t,
|
|
7424
7405
|
target: n,
|
|
@@ -7428,7 +7409,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7428
7409
|
link: !0,
|
|
7429
7410
|
children: e
|
|
7430
7411
|
})
|
|
7431
|
-
}),
|
|
7412
|
+
}), $f = {
|
|
7432
7413
|
inputInTable: "_inputInTable_qbe2o_1",
|
|
7433
7414
|
inputHover: "_inputHover_qbe2o_13",
|
|
7434
7415
|
inputFocus: "_inputFocus_qbe2o_18",
|
|
@@ -7440,9 +7421,9 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7440
7421
|
textarea: "_textarea_qbe2o_81",
|
|
7441
7422
|
small: "_small_qbe2o_120",
|
|
7442
7423
|
monospace: "_monospace_qbe2o_159"
|
|
7443
|
-
},
|
|
7424
|
+
}, ep = ({ name: e, value: t = "", placeholder: n = "", cols: r, rows: i, disabled: a = !1, onChange: o = yn, onKeyPress: s = yn, onFocus: c = yn, onBlur: l = yn, tabIndex: d = 0, error: f = null, warning: p = null, tooltip: m = null, maxTooltipWidth: h, resize: g, monospace: _ = !1, small: v = !1, testId: y }) => {
|
|
7444
7425
|
let x = u(W), C = /* @__PURE__ */ S("textarea", {
|
|
7445
|
-
className: b(
|
|
7426
|
+
className: b($f.textarea, f ? $f.error : "", p ? $f.warning : "", _ ? $f.monospace : "", v ? $f.small : ""),
|
|
7446
7427
|
name: e,
|
|
7447
7428
|
value: t,
|
|
7448
7429
|
placeholder: n,
|
|
@@ -7484,10 +7465,10 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7484
7465
|
menu: "_menu_oyr59_139",
|
|
7485
7466
|
active: "_active_oyr59_168",
|
|
7486
7467
|
alert: "_alert_oyr59_193"
|
|
7487
|
-
},
|
|
7468
|
+
}, tp = ({ warning: e }) => /* @__PURE__ */ S("div", {
|
|
7488
7469
|
className: Q.alert,
|
|
7489
7470
|
children: e
|
|
7490
|
-
}),
|
|
7471
|
+
}), np = ({ icon: e, url: t, onClick: n }) => {
|
|
7491
7472
|
let r = /* @__PURE__ */ S(G, { icon: e });
|
|
7492
7473
|
return t ? /* @__PURE__ */ S("a", {
|
|
7493
7474
|
href: t,
|
|
@@ -7499,7 +7480,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7499
7480
|
className: Q.appSwitcher,
|
|
7500
7481
|
children: r
|
|
7501
7482
|
});
|
|
7502
|
-
},
|
|
7483
|
+
}, rp = ({ label: e, logo: t, url: n, version: r, onClick: i }) => {
|
|
7503
7484
|
let a = /* @__PURE__ */ C("div", {
|
|
7504
7485
|
className: Q.title,
|
|
7505
7486
|
children: [
|
|
@@ -7528,9 +7509,9 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7528
7509
|
children: a
|
|
7529
7510
|
})
|
|
7530
7511
|
});
|
|
7531
|
-
},
|
|
7512
|
+
}, ip = /* @__PURE__ */ function(e) {
|
|
7532
7513
|
return e.LINK = "Link", e.BUTTON = "Button", e.MENU = "Menu", e.COMPONENT = "Component", e;
|
|
7533
|
-
}({}),
|
|
7514
|
+
}({}), ap = ({ label: e, url: t, icon: n, onClick: r, active: i, disabled: a, testId: o, component: s = "a" }) => {
|
|
7534
7515
|
let c = u(W);
|
|
7535
7516
|
return /* @__PURE__ */ C(s, {
|
|
7536
7517
|
className: b(Q.link, i ? Q.active : ""),
|
|
@@ -7547,11 +7528,11 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7547
7528
|
children: e
|
|
7548
7529
|
})]
|
|
7549
7530
|
});
|
|
7550
|
-
},
|
|
7531
|
+
}, op = ({ element: e }) => {
|
|
7551
7532
|
switch (e.type) {
|
|
7552
|
-
case
|
|
7533
|
+
case ip.LINK: return /* @__PURE__ */ S("div", {
|
|
7553
7534
|
className: Q.item,
|
|
7554
|
-
children: /* @__PURE__ */ S(
|
|
7535
|
+
children: /* @__PURE__ */ S(ap, {
|
|
7555
7536
|
label: e.label,
|
|
7556
7537
|
url: e.url,
|
|
7557
7538
|
icon: e.icon,
|
|
@@ -7562,7 +7543,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7562
7543
|
component: e.component
|
|
7563
7544
|
})
|
|
7564
7545
|
});
|
|
7565
|
-
case
|
|
7546
|
+
case ip.BUTTON: return /* @__PURE__ */ S("div", {
|
|
7566
7547
|
className: b(Q.item, Q.button),
|
|
7567
7548
|
children: /* @__PURE__ */ S(K, {
|
|
7568
7549
|
label: e.label,
|
|
@@ -7574,14 +7555,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7574
7555
|
testId: e.testId
|
|
7575
7556
|
})
|
|
7576
7557
|
});
|
|
7577
|
-
case
|
|
7558
|
+
case ip.MENU: return /* @__PURE__ */ S("div", {
|
|
7578
7559
|
className: b(Q.item, Q.menu),
|
|
7579
7560
|
children: /* @__PURE__ */ S(vo, {
|
|
7580
7561
|
maxHeight: "100%",
|
|
7581
7562
|
menu: {
|
|
7582
7563
|
trigger: Ai.COMPONENT,
|
|
7583
7564
|
placement: "bottom-start",
|
|
7584
|
-
component: /* @__PURE__ */ S(
|
|
7565
|
+
component: /* @__PURE__ */ S(ap, {
|
|
7585
7566
|
label: e.label,
|
|
7586
7567
|
icon: e.icon,
|
|
7587
7568
|
onClick: e.onClick
|
|
@@ -7590,50 +7571,50 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7590
7571
|
}
|
|
7591
7572
|
})
|
|
7592
7573
|
});
|
|
7593
|
-
case
|
|
7574
|
+
case ip.COMPONENT: return /* @__PURE__ */ S("div", {
|
|
7594
7575
|
className: Q.item,
|
|
7595
7576
|
children: e.component
|
|
7596
7577
|
});
|
|
7597
7578
|
default: return null;
|
|
7598
7579
|
}
|
|
7599
|
-
},
|
|
7580
|
+
}, sp = ({ title: e, appSwitcher: t, content: n = [], contentRight: r = [], warning: i = "", height: a = "var(--size-topbar)", fixedPosition: o = !0 }) => /* @__PURE__ */ C("div", { children: [i && /* @__PURE__ */ S(tp, { warning: i }), /* @__PURE__ */ C("div", {
|
|
7600
7581
|
className: b(Q.topbar, o ? Q.fixed : ""),
|
|
7601
7582
|
style: { height: a },
|
|
7602
7583
|
children: [
|
|
7603
|
-
!!t && /* @__PURE__ */ S(
|
|
7584
|
+
!!t && /* @__PURE__ */ S(np, {
|
|
7604
7585
|
icon: t.icon,
|
|
7605
7586
|
url: t.url,
|
|
7606
7587
|
onClick: t.onClick
|
|
7607
7588
|
}),
|
|
7608
7589
|
/* @__PURE__ */ C("div", {
|
|
7609
7590
|
className: Q.left,
|
|
7610
|
-
children: [e && /* @__PURE__ */ S(
|
|
7591
|
+
children: [e && /* @__PURE__ */ S(rp, {
|
|
7611
7592
|
label: e.label,
|
|
7612
7593
|
logo: e.logo,
|
|
7613
7594
|
url: e.url,
|
|
7614
7595
|
version: e.version,
|
|
7615
7596
|
onClick: e.onClick
|
|
7616
|
-
}), n.map((e, t) => e ? /* @__PURE__ */ S(
|
|
7597
|
+
}), n.map((e, t) => e ? /* @__PURE__ */ S(op, { element: e }, t) : null)]
|
|
7617
7598
|
}),
|
|
7618
7599
|
/* @__PURE__ */ S("div", {
|
|
7619
7600
|
className: Q.right,
|
|
7620
|
-
children: r.map((e, t) => e ? /* @__PURE__ */ S(
|
|
7601
|
+
children: r.map((e, t) => e ? /* @__PURE__ */ S(op, { element: e }, t) : null)
|
|
7621
7602
|
})
|
|
7622
7603
|
]
|
|
7623
|
-
})] }),
|
|
7604
|
+
})] }), cp = {
|
|
7624
7605
|
popConfirm: "_popConfirm_1x6ye_1",
|
|
7625
7606
|
content: "_content_1x6ye_7",
|
|
7626
7607
|
buttons: "_buttons_1x6ye_13"
|
|
7627
|
-
},
|
|
7628
|
-
className:
|
|
7608
|
+
}, lp = ({ title: e, okText: t, onClickOk: n, disableConfirmButton: r, cancelText: i, onClickCancel: a, close: o, testId: s }) => /* @__PURE__ */ C("div", {
|
|
7609
|
+
className: cp.popConfirm,
|
|
7629
7610
|
children: [e && /* @__PURE__ */ S("div", {
|
|
7630
|
-
className:
|
|
7611
|
+
className: cp.content,
|
|
7631
7612
|
children: /* @__PURE__ */ S(rs, {
|
|
7632
7613
|
small: !0,
|
|
7633
7614
|
children: e
|
|
7634
7615
|
})
|
|
7635
7616
|
}), /* @__PURE__ */ C("div", {
|
|
7636
|
-
className:
|
|
7617
|
+
className: cp.buttons,
|
|
7637
7618
|
children: [/* @__PURE__ */ S(K, {
|
|
7638
7619
|
small: !0,
|
|
7639
7620
|
colored: !0,
|
|
@@ -7648,8 +7629,8 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7648
7629
|
testId: `${s}-cancel-button`
|
|
7649
7630
|
})]
|
|
7650
7631
|
})]
|
|
7651
|
-
}),
|
|
7652
|
-
content: /* @__PURE__ */ S(
|
|
7632
|
+
}), up = ({ children: e, placement: t = "top-center", closeOnOutsideClick: n = !0, fullWidth: r = !1, title: i = "", cancelText: a = "Cancel", onClickCancel: o = (e) => e && e(), okText: s = "Ok", onClickOk: c = () => {}, disableConfirmButton: l = !1, testId: u = void 0 }) => /* @__PURE__ */ S(Ao, {
|
|
7633
|
+
content: /* @__PURE__ */ S(lp, {
|
|
7653
7634
|
title: i,
|
|
7654
7635
|
okText: s,
|
|
7655
7636
|
onClickOk: c,
|
|
@@ -7663,14 +7644,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7663
7644
|
fullWidth: r,
|
|
7664
7645
|
testId: u,
|
|
7665
7646
|
children: e
|
|
7666
|
-
}),
|
|
7647
|
+
}), dp = {
|
|
7667
7648
|
tree: "_tree_coxxe_1",
|
|
7668
7649
|
toggle: "_toggle_coxxe_8",
|
|
7669
7650
|
dropTarget: "_dropTarget_coxxe_15",
|
|
7670
7651
|
placeholder: "_placeholder_coxxe_30",
|
|
7671
7652
|
draggingSource: "_draggingSource_coxxe_36",
|
|
7672
7653
|
placeholderContainer: "_placeholderContainer_coxxe_39"
|
|
7673
|
-
},
|
|
7654
|
+
}, fp = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
|
|
7674
7655
|
let { id: l, data: u } = t, { active: d, disabled: f, testId: p, onClick: m, actions: h = [] } = u, [g, _] = e.useState(!1), [v, y] = e.useState(0), x = (e) => {
|
|
7675
7656
|
e.stopPropagation(), i(l);
|
|
7676
7657
|
}, w = (e) => {
|
|
@@ -7697,7 +7678,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7697
7678
|
className: b(Z.itemHeader, g ? Z.noPointerEvents : ""),
|
|
7698
7679
|
children: [
|
|
7699
7680
|
a && /* @__PURE__ */ S("div", {
|
|
7700
|
-
className:
|
|
7681
|
+
className: dp.toggle,
|
|
7701
7682
|
children: /* @__PURE__ */ S(K, {
|
|
7702
7683
|
basic: !0,
|
|
7703
7684
|
colored: r ? !0 : ji.MUTED,
|
|
@@ -7711,10 +7692,10 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7711
7692
|
className: Z.drag,
|
|
7712
7693
|
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
7713
7694
|
}),
|
|
7714
|
-
/* @__PURE__ */ S(
|
|
7695
|
+
/* @__PURE__ */ S(Od, { item: u }),
|
|
7715
7696
|
/* @__PURE__ */ C("div", {
|
|
7716
7697
|
className: Z.right,
|
|
7717
|
-
children: [/* @__PURE__ */ S(
|
|
7698
|
+
children: [/* @__PURE__ */ S(kd, { item: u }), !f && h.length > 0 && /* @__PURE__ */ S("div", {
|
|
7718
7699
|
className: Z.actions,
|
|
7719
7700
|
children: /* @__PURE__ */ S(bo, { actions: h })
|
|
7720
7701
|
})]
|
|
@@ -7722,10 +7703,10 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7722
7703
|
]
|
|
7723
7704
|
})
|
|
7724
7705
|
});
|
|
7725
|
-
},
|
|
7726
|
-
className:
|
|
7706
|
+
}, pp = ({ depth: e, indent: t = "var(--size-sm)" }) => /* @__PURE__ */ S("div", {
|
|
7707
|
+
className: dp.placeholder,
|
|
7727
7708
|
style: { left: `calc(${t} * ${e})` }
|
|
7728
|
-
}),
|
|
7709
|
+
}), mp = ({ list: e, canDrop: t, draggable: n = !1, onListReorder: r, onChangeOpen: i, testId: a, isInitialOpen: o = !1, autoOpenActiveItems: s = !1, treeRef: c, itemHasChild: l, onItemToggle: u, icons: f, allowParentReassignment: p, stickyHeader: m, height: h, render: g, placeholderIndent: v }) => {
|
|
7729
7710
|
var y;
|
|
7730
7711
|
let b = c == null ? _(null) : c, x = (e) => {
|
|
7731
7712
|
i && i(e);
|
|
@@ -7783,7 +7764,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7783
7764
|
"data-testid": a,
|
|
7784
7765
|
className: Z.list,
|
|
7785
7766
|
style: { height: h },
|
|
7786
|
-
children: [e.name && !e.noHeader && /* @__PURE__ */ S(
|
|
7767
|
+
children: [e.name && !e.noHeader && /* @__PURE__ */ S(Td, {
|
|
7787
7768
|
name: e.name,
|
|
7788
7769
|
actions: e.actions,
|
|
7789
7770
|
stickyHeader: m
|
|
@@ -7810,7 +7791,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7810
7791
|
hasChild: r,
|
|
7811
7792
|
isOpen: a,
|
|
7812
7793
|
onToggle: o
|
|
7813
|
-
}) : /* @__PURE__ */ S(
|
|
7794
|
+
}) : /* @__PURE__ */ S(fp, {
|
|
7814
7795
|
hasChild: l ? l(e) : r,
|
|
7815
7796
|
node: e,
|
|
7816
7797
|
depth: t,
|
|
@@ -7826,7 +7807,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7826
7807
|
onDrop: A,
|
|
7827
7808
|
onChangeOpen: x,
|
|
7828
7809
|
dropTargetOffset: 10,
|
|
7829
|
-
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ S(
|
|
7810
|
+
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ S(pp, {
|
|
7830
7811
|
depth: t,
|
|
7831
7812
|
indent: v
|
|
7832
7813
|
}),
|
|
@@ -7834,17 +7815,17 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7834
7815
|
listComponent: "div",
|
|
7835
7816
|
listItemComponent: "div",
|
|
7836
7817
|
classes: {
|
|
7837
|
-
root:
|
|
7838
|
-
draggingSource:
|
|
7839
|
-
dropTarget:
|
|
7840
|
-
placeholder:
|
|
7818
|
+
root: dp.tree,
|
|
7819
|
+
draggingSource: dp.draggingSource,
|
|
7820
|
+
dropTarget: dp.dropTarget,
|
|
7821
|
+
placeholder: dp.placeholderContainer
|
|
7841
7822
|
},
|
|
7842
7823
|
initialOpen: o,
|
|
7843
7824
|
enableAnimateExpand: !0
|
|
7844
7825
|
})
|
|
7845
7826
|
})]
|
|
7846
7827
|
});
|
|
7847
|
-
},
|
|
7828
|
+
}, hp = {
|
|
7848
7829
|
treeTable: "_treeTable_1ywvy_1",
|
|
7849
7830
|
treeTableHeader: "_treeTableHeader_1ywvy_22",
|
|
7850
7831
|
folderCell: "_folderCell_1ywvy_30",
|
|
@@ -7852,48 +7833,48 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7852
7833
|
drag: "_drag_1ywvy_31",
|
|
7853
7834
|
folder: "_folder_1ywvy_30",
|
|
7854
7835
|
active: "_active_1ywvy_61"
|
|
7855
|
-
},
|
|
7836
|
+
}, gp = (e, t) => e.filter((e) => e.parent === t).flatMap((t) => [t.id, ...gp(e, t.id)]), _p = (e, t) => {
|
|
7856
7837
|
let n = new Set(t);
|
|
7857
7838
|
return e.filter((e) => !n.has(e.id)).map((e) => e.id);
|
|
7858
|
-
},
|
|
7839
|
+
}, vp = (e, t, n) => e.filter((e) => n.has(e) || !t.has(e)), yp = (e, t, n, r = []) => {
|
|
7859
7840
|
let i = new Set(n), a = new Set(r), o = e.filter((e) => e.parent === t && !a.has(e.id));
|
|
7860
7841
|
if (o.length === 0) return {
|
|
7861
7842
|
checked: i.has(t),
|
|
7862
7843
|
indeterminate: !1
|
|
7863
7844
|
};
|
|
7864
|
-
let s = o.map((t) =>
|
|
7845
|
+
let s = o.map((t) => yp(e, t.id, n, r)), c = s.filter((e) => e.checked).length, l = s.filter((e) => e.indeterminate).length, u = c === o.length;
|
|
7865
7846
|
return {
|
|
7866
7847
|
checked: u,
|
|
7867
7848
|
indeterminate: c + l > 0 && !u
|
|
7868
7849
|
};
|
|
7869
|
-
},
|
|
7870
|
-
let r =
|
|
7850
|
+
}, bp = (e, t, n = []) => {
|
|
7851
|
+
let r = _p(e, n), i = new Set(t), a = r.filter((e) => i.has(e)).length;
|
|
7871
7852
|
return {
|
|
7872
7853
|
checked: r.length > 0 && a === r.length,
|
|
7873
7854
|
indeterminate: a > 0 && a < r.length
|
|
7874
7855
|
};
|
|
7875
|
-
},
|
|
7856
|
+
}, xp = i(null), Sp = () => u(xp), Cp = ({ children: e, rowCheckboxes: t, rows: n }) => {
|
|
7876
7857
|
let r = t !== void 0, { checkedIds: i = [], disabledIds: a = [], getTooltip: o, onChange: s } = t == null ? {} : t, c = h(() => new Set(a), [a]), u = h(() => {
|
|
7877
7858
|
if (!r) return null;
|
|
7878
7859
|
let e = /* @__PURE__ */ new Map();
|
|
7879
|
-
for (let t of n) e.set(t.id,
|
|
7860
|
+
for (let t of n) e.set(t.id, yp(n, t.id, i, a));
|
|
7880
7861
|
return e;
|
|
7881
7862
|
}, [
|
|
7882
7863
|
i,
|
|
7883
7864
|
a,
|
|
7884
7865
|
r,
|
|
7885
7866
|
n
|
|
7886
|
-
]), d = h(() => r ?
|
|
7867
|
+
]), d = h(() => r ? bp(n, i, a) : void 0, [
|
|
7887
7868
|
i,
|
|
7888
7869
|
a,
|
|
7889
7870
|
r,
|
|
7890
7871
|
n
|
|
7891
7872
|
]), f = l((e) => u == null ? void 0 : u.get(e), [u]), p = l((e) => c.has(e), [c]), m = l((e) => o == null ? void 0 : o(e), [o]), g = l((e) => {
|
|
7892
7873
|
if (!r || c.has(e)) return;
|
|
7893
|
-
let t =
|
|
7874
|
+
let t = gp(n, e), o = [e, ...t.filter((e) => !c.has(e))], l = [e, ...t], { checked: u } = yp(n, e, i, a);
|
|
7894
7875
|
if (u) {
|
|
7895
7876
|
let e = new Set(l);
|
|
7896
|
-
s == null || s(
|
|
7877
|
+
s == null || s(vp(i, e, c));
|
|
7897
7878
|
} else s == null || s([.../* @__PURE__ */ new Set([...i, ...o])]);
|
|
7898
7879
|
}, [
|
|
7899
7880
|
i,
|
|
@@ -7904,7 +7885,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7904
7885
|
n
|
|
7905
7886
|
]), _ = l(() => {
|
|
7906
7887
|
if (!r) return;
|
|
7907
|
-
let e =
|
|
7888
|
+
let e = _p(n, a), { checked: t } = bp(n, i, a);
|
|
7908
7889
|
t ? s == null || s(i.filter((e) => c.has(e))) : s == null || s([.../* @__PURE__ */ new Set([...i, ...e])]);
|
|
7909
7890
|
}, [
|
|
7910
7891
|
i,
|
|
@@ -7930,12 +7911,12 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7930
7911
|
_,
|
|
7931
7912
|
g
|
|
7932
7913
|
]);
|
|
7933
|
-
return /* @__PURE__ */ S(
|
|
7914
|
+
return /* @__PURE__ */ S(xp.Provider, {
|
|
7934
7915
|
value: v,
|
|
7935
7916
|
children: e
|
|
7936
7917
|
});
|
|
7937
|
-
},
|
|
7938
|
-
let h =
|
|
7918
|
+
}, wp = ({ 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 }) => {
|
|
7919
|
+
let h = Sp(), 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), x = h == null ? void 0 : h.enabled, { data: w, droppable: T } = l, { id: E, cells: D, testId: O, actions: k = [], active: A, onRowClick: j } = w, M = T || a, N = (e) => {
|
|
7939
7920
|
let r = t ? t[e] : void 0;
|
|
7940
7921
|
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${M ? n + 1 : n})`})` : r;
|
|
7941
7922
|
};
|
|
@@ -7948,12 +7929,12 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7948
7929
|
onDragLeave: f,
|
|
7949
7930
|
children: /* @__PURE__ */ S("tbody", { children: /* @__PURE__ */ C("tr", {
|
|
7950
7931
|
onClick: j,
|
|
7951
|
-
className: b(
|
|
7932
|
+
className: b(hp.treeTableRow, A ? hp.active : void 0),
|
|
7952
7933
|
children: [
|
|
7953
|
-
x && /* @__PURE__ */ S(
|
|
7934
|
+
x && /* @__PURE__ */ S(Kl, {
|
|
7954
7935
|
isHeader: !1,
|
|
7955
7936
|
cell: {
|
|
7956
|
-
type:
|
|
7937
|
+
type: Gl.CHECKBOX,
|
|
7957
7938
|
checked: _,
|
|
7958
7939
|
disabled: y,
|
|
7959
7940
|
indeterminate: v,
|
|
@@ -7962,19 +7943,19 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7962
7943
|
}
|
|
7963
7944
|
}),
|
|
7964
7945
|
r && /* @__PURE__ */ S("td", {
|
|
7965
|
-
className:
|
|
7946
|
+
className: hp.dragCell,
|
|
7966
7947
|
children: /* @__PURE__ */ S("div", {
|
|
7967
|
-
className:
|
|
7948
|
+
className: hp.drag,
|
|
7968
7949
|
onClick: (e) => e.stopPropagation(),
|
|
7969
7950
|
ref: i,
|
|
7970
7951
|
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
7971
7952
|
})
|
|
7972
7953
|
}),
|
|
7973
|
-
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ S("td", { className:
|
|
7954
|
+
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ S("td", { className: hp.folderCell }, t)),
|
|
7974
7955
|
M && /* @__PURE__ */ S("td", {
|
|
7975
|
-
className:
|
|
7956
|
+
className: hp.folderCell,
|
|
7976
7957
|
children: /* @__PURE__ */ S("div", {
|
|
7977
|
-
className:
|
|
7958
|
+
className: hp.folder,
|
|
7978
7959
|
onClick: () => m(E),
|
|
7979
7960
|
onMouseDown: (e) => e.stopPropagation(),
|
|
7980
7961
|
children: /* @__PURE__ */ S(K, {
|
|
@@ -7989,73 +7970,73 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
7989
7970
|
}),
|
|
7990
7971
|
D.map((t, n) => {
|
|
7991
7972
|
let r = N(n), i = e ? e[n] : null;
|
|
7992
|
-
return /* @__PURE__ */ S(
|
|
7973
|
+
return /* @__PURE__ */ S(Kl, {
|
|
7993
7974
|
isHeader: !1,
|
|
7994
7975
|
cell: t,
|
|
7995
7976
|
width: r,
|
|
7996
7977
|
columnAlignment: i
|
|
7997
7978
|
}, n);
|
|
7998
7979
|
}),
|
|
7999
|
-
o && /* @__PURE__ */ S(
|
|
7980
|
+
o && /* @__PURE__ */ S(Kl, {
|
|
8000
7981
|
isHeader: !1,
|
|
8001
7982
|
cell: {
|
|
8002
|
-
type:
|
|
7983
|
+
type: Gl.ACTIONS,
|
|
8003
7984
|
actions: k
|
|
8004
7985
|
}
|
|
8005
7986
|
})
|
|
8006
7987
|
]
|
|
8007
7988
|
}) })
|
|
8008
7989
|
});
|
|
8009
|
-
},
|
|
8010
|
-
let a =
|
|
7990
|
+
}, Tp = ({ columnAlignment: e, columnWidths: t, draggable: n, hasRowActions: r, headers: i }) => {
|
|
7991
|
+
let a = Sp(), o = a == null ? void 0 : a.headerCheckState, s = (a == null ? void 0 : a.enabled) && o !== void 0;
|
|
8011
7992
|
return /* @__PURE__ */ S("table", {
|
|
8012
|
-
className: b(ec.table,
|
|
7993
|
+
className: b(ec.table, hp.treeTableHeader),
|
|
8013
7994
|
children: /* @__PURE__ */ S("thead", { children: i.map((i, c) => /* @__PURE__ */ C("tr", { children: [
|
|
8014
|
-
s && c === 0 ? /* @__PURE__ */ S(
|
|
7995
|
+
s && c === 0 ? /* @__PURE__ */ S(Kl, {
|
|
8015
7996
|
isHeader: !0,
|
|
8016
7997
|
cell: {
|
|
8017
|
-
type:
|
|
7998
|
+
type: Gl.CHECKBOX,
|
|
8018
7999
|
checked: o.checked,
|
|
8019
8000
|
indeterminate: o.indeterminate,
|
|
8020
8001
|
onChange: a.toggleHeaderCheck
|
|
8021
8002
|
}
|
|
8022
8003
|
}) : s ? /* @__PURE__ */ S("td", {}) : null,
|
|
8023
|
-
n && /* @__PURE__ */ S("th", { className:
|
|
8004
|
+
n && /* @__PURE__ */ S("th", { className: hp.dragCell }),
|
|
8024
8005
|
i.cells.map((n, r) => {
|
|
8025
8006
|
let i = t ? t[r] : void 0, a = e ? e[r] : void 0;
|
|
8026
|
-
return /* @__PURE__ */ S(
|
|
8007
|
+
return /* @__PURE__ */ S(Kl, {
|
|
8027
8008
|
isHeader: !0,
|
|
8028
8009
|
cell: n,
|
|
8029
8010
|
width: i,
|
|
8030
8011
|
columnAlignment: a
|
|
8031
8012
|
}, r);
|
|
8032
8013
|
}),
|
|
8033
|
-
r && /* @__PURE__ */ S(
|
|
8014
|
+
r && /* @__PURE__ */ S(Kl, {
|
|
8034
8015
|
isHeader: !0,
|
|
8035
8016
|
cell: {
|
|
8036
|
-
type:
|
|
8017
|
+
type: Gl.ACTIONS,
|
|
8037
8018
|
actions: i.actions,
|
|
8038
8019
|
width: 31
|
|
8039
8020
|
}
|
|
8040
8021
|
})
|
|
8041
8022
|
] }, c)) })
|
|
8042
8023
|
});
|
|
8043
|
-
},
|
|
8044
|
-
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: v = [] } = d, y =
|
|
8045
|
-
return /* @__PURE__ */ S(
|
|
8024
|
+
}, Ep = ({ 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 }) => {
|
|
8025
|
+
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: v = [] } = d, y = hl(v, _ == null ? [] : _);
|
|
8026
|
+
return /* @__PURE__ */ S(Cp, {
|
|
8046
8027
|
rowCheckboxes: u,
|
|
8047
8028
|
rows: v,
|
|
8048
8029
|
children: /* @__PURE__ */ C("div", {
|
|
8049
|
-
className:
|
|
8030
|
+
className: hp.treeTable,
|
|
8050
8031
|
"data-testid": f,
|
|
8051
8032
|
style: { width: g },
|
|
8052
|
-
children: [!!_ && /* @__PURE__ */ S(
|
|
8033
|
+
children: [!!_ && /* @__PURE__ */ S(Tp, {
|
|
8053
8034
|
columnAlignment: m,
|
|
8054
8035
|
columnWidths: h,
|
|
8055
8036
|
draggable: r,
|
|
8056
8037
|
hasRowActions: y,
|
|
8057
8038
|
headers: _
|
|
8058
|
-
}), /* @__PURE__ */ S(
|
|
8039
|
+
}), /* @__PURE__ */ S(mp, {
|
|
8059
8040
|
allowParentReassignment: e,
|
|
8060
8041
|
autoOpenActiveItems: t,
|
|
8061
8042
|
canDrop: n,
|
|
@@ -8071,7 +8052,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8071
8052
|
onItemToggle: s,
|
|
8072
8053
|
onListReorder: c,
|
|
8073
8054
|
placeholderIndent: "var(--size)",
|
|
8074
|
-
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ S(
|
|
8055
|
+
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ S(wp, {
|
|
8075
8056
|
node: e,
|
|
8076
8057
|
columnAlignment: m,
|
|
8077
8058
|
columnWidths: h,
|
|
@@ -8088,10 +8069,10 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8088
8069
|
})]
|
|
8089
8070
|
})
|
|
8090
8071
|
});
|
|
8091
|
-
},
|
|
8072
|
+
}, Dp = Object.freeze({
|
|
8092
8073
|
Translations: "translations",
|
|
8093
8074
|
LanguageKey: "languageKey"
|
|
8094
|
-
}),
|
|
8075
|
+
}), Op = {
|
|
8095
8076
|
unified: "Unified",
|
|
8096
8077
|
split: "Split",
|
|
8097
8078
|
changesTooLarge: "Changes are too large to be shown",
|
|
@@ -8114,29 +8095,29 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8114
8095
|
showAll: "Show all",
|
|
8115
8096
|
unknown: "Unknown",
|
|
8116
8097
|
unexpectedError: "Unexpected error"
|
|
8117
|
-
},
|
|
8098
|
+
}, kp = (e) => Object.keys(Op).reduce((t, n) => ({
|
|
8118
8099
|
...t,
|
|
8119
|
-
[n]: (e == null ? void 0 : e[n]) || (
|
|
8120
|
-
}), {}),
|
|
8121
|
-
[
|
|
8122
|
-
[
|
|
8123
|
-
},
|
|
8124
|
-
|
|
8125
|
-
},
|
|
8100
|
+
[n]: (e == null ? void 0 : e[n]) || (Op == null ? void 0 : Op[n])
|
|
8101
|
+
}), {}), Ap = {
|
|
8102
|
+
[Dp.Translations]: kp(),
|
|
8103
|
+
[Dp.LanguageKey]: "en"
|
|
8104
|
+
}, jp = (e) => e ? Ap[e] : Ap, Mp = (e, t) => {
|
|
8105
|
+
Ap[e] = t;
|
|
8106
|
+
}, Np = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
|
|
8126
8107
|
var a;
|
|
8127
|
-
let { unitTemplate: o = null } = (a =
|
|
8128
|
-
return e[n] = r == null ?
|
|
8108
|
+
let { unitTemplate: o = null } = (a = zf()) == null ? {} : a;
|
|
8109
|
+
return e[n] = r == null ? Of(n, o) : r, t[n] = i, {
|
|
8129
8110
|
preferredUnits: e,
|
|
8130
8111
|
storageUnits: t
|
|
8131
8112
|
};
|
|
8132
8113
|
}, {
|
|
8133
8114
|
preferredUnits: {},
|
|
8134
8115
|
storageUnits: {}
|
|
8135
|
-
}),
|
|
8116
|
+
}), Pp = ({ row: e, selectedUnits: t, storageUnits: n, convertBackToStorageUnit: r, enableCosmeticRounding: i, enableDisplayRounding: a }) => ({
|
|
8136
8117
|
...e,
|
|
8137
8118
|
cells: e.cells.map((e) => {
|
|
8138
8119
|
if ("autoUnit" in e && e.autoUnit && (typeof e.value == "string" || typeof e.value == "number")) {
|
|
8139
|
-
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 } =
|
|
8120
|
+
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 } = Nf({
|
|
8140
8121
|
value: Tr(s),
|
|
8141
8122
|
unitkey: o,
|
|
8142
8123
|
toUnit: u,
|
|
@@ -8150,7 +8131,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8150
8131
|
roundDisplayValue: l,
|
|
8151
8132
|
selectOnFocus: !0,
|
|
8152
8133
|
onChange: (t) => {
|
|
8153
|
-
let n = t, { value: i } = n.target, a = r ? d : u, { value: s = i } =
|
|
8134
|
+
let n = t, { value: i } = n.target, a = r ? d : u, { value: s = i } = Nf({
|
|
8154
8135
|
value: String(i),
|
|
8155
8136
|
unitkey: o,
|
|
8156
8137
|
toUnit: a,
|
|
@@ -8169,17 +8150,17 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8169
8150
|
}
|
|
8170
8151
|
return e;
|
|
8171
8152
|
})
|
|
8172
|
-
}),
|
|
8173
|
-
let { translations: i } =
|
|
8153
|
+
}), Fp = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
|
|
8154
|
+
let { translations: i } = jp();
|
|
8174
8155
|
return e ? e.map((e) => ({
|
|
8175
8156
|
...e,
|
|
8176
8157
|
cells: e.cells.map((e) => {
|
|
8177
|
-
if (e.type ===
|
|
8158
|
+
if (e.type === Gl.AUTO_UNIT) {
|
|
8178
8159
|
var a;
|
|
8179
8160
|
let { testId: o, unitKey: s, disabled: c = !1, error: l } = e, u = n[s];
|
|
8180
8161
|
return {
|
|
8181
8162
|
value: u && t[s],
|
|
8182
|
-
type:
|
|
8163
|
+
type: Gl.SELECT,
|
|
8183
8164
|
error: !u && (i == null ? void 0 : i.unitIsMissing) || l,
|
|
8184
8165
|
disabled: c || !u,
|
|
8185
8166
|
searchable: !1,
|
|
@@ -8199,8 +8180,8 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8199
8180
|
return e;
|
|
8200
8181
|
})
|
|
8201
8182
|
})) : [];
|
|
8202
|
-
},
|
|
8203
|
-
let { headers: c, ...u } = e, { storageUnits: f, preferredUnits: p } =
|
|
8183
|
+
}, Ip = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: o, beforeRenderRow: s }) => {
|
|
8184
|
+
let { headers: c, ...u } = e, { storageUnits: f, preferredUnits: p } = Np(t), m = Df(p), [h, g] = v(p), _ = ({ unitKey: e, value: n }) => {
|
|
8204
8185
|
g((t) => ({
|
|
8205
8186
|
...t,
|
|
8206
8187
|
[e]: n
|
|
@@ -8211,7 +8192,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8211
8192
|
newUnit: n,
|
|
8212
8193
|
unitKey: e
|
|
8213
8194
|
});
|
|
8214
|
-
}, y = l(({ row: e, rowIndex: t }) =>
|
|
8195
|
+
}, y = l(({ row: e, rowIndex: t }) => Pp({
|
|
8215
8196
|
row: s ? s({
|
|
8216
8197
|
row: e,
|
|
8217
8198
|
rowIndex: t
|
|
@@ -8236,10 +8217,10 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8236
8217
|
value: n
|
|
8237
8218
|
});
|
|
8238
8219
|
});
|
|
8239
|
-
}, [t]), /* @__PURE__ */ S(
|
|
8220
|
+
}, [t]), /* @__PURE__ */ S(ru, {
|
|
8240
8221
|
table: {
|
|
8241
8222
|
...u,
|
|
8242
|
-
headers:
|
|
8223
|
+
headers: Fp({
|
|
8243
8224
|
headers: e.headers,
|
|
8244
8225
|
selectedUnits: h,
|
|
8245
8226
|
storageUnits: f,
|
|
@@ -8250,8 +8231,8 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8250
8231
|
canListReorder: o,
|
|
8251
8232
|
beforeRenderRow: y
|
|
8252
8233
|
});
|
|
8253
|
-
},
|
|
8254
|
-
let { translations: d } =
|
|
8234
|
+
}, Lp = { settingField: "_settingField_1x02n_1" }, Rp = ({ 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 }) => {
|
|
8235
|
+
let { translations: d } = jp(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ C(e.Fragment, { children: [t, /* @__PURE__ */ S("br", {})] }, n)), p = [
|
|
8255
8236
|
...r ? [] : [{
|
|
8256
8237
|
label: d == null ? void 0 : d.allUsers,
|
|
8257
8238
|
value: !1
|
|
@@ -8266,20 +8247,20 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8266
8247
|
}] : []
|
|
8267
8248
|
], m = a !== void 0 && o !== void 0 && !un(a, o);
|
|
8268
8249
|
return /* @__PURE__ */ C("div", {
|
|
8269
|
-
className:
|
|
8250
|
+
className: Lp.settingField,
|
|
8270
8251
|
"data-testid": u,
|
|
8271
|
-
children: [/* @__PURE__ */ C(
|
|
8252
|
+
children: [/* @__PURE__ */ C(xd, {
|
|
8272
8253
|
justifyContent: "space-between",
|
|
8273
8254
|
wrap: !1,
|
|
8274
8255
|
children: [i, !s && /* @__PURE__ */ S("div", {
|
|
8275
8256
|
style: { flexShrink: 0 },
|
|
8276
|
-
children: /* @__PURE__ */ C(
|
|
8257
|
+
children: /* @__PURE__ */ C(xd, {
|
|
8277
8258
|
gap: "8px",
|
|
8278
8259
|
alignItems: "center",
|
|
8279
8260
|
children: [m && /* @__PURE__ */ S(ya, {
|
|
8280
8261
|
text: Dr(o).valid ? `${d == null ? void 0 : d.companySetting}: ${gr(o) ? Or(o) : o}` : d == null ? void 0 : d.companySettingDifferent,
|
|
8281
8262
|
icon: U.INFO
|
|
8282
|
-
}), /* @__PURE__ */ S(
|
|
8263
|
+
}), /* @__PURE__ */ S(rl, {
|
|
8283
8264
|
small: !0,
|
|
8284
8265
|
searchable: !1,
|
|
8285
8266
|
name: "userType",
|
|
@@ -8298,19 +8279,19 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8298
8279
|
children: f(t)
|
|
8299
8280
|
})]
|
|
8300
8281
|
});
|
|
8301
|
-
},
|
|
8282
|
+
}, zp = (e, t) => {
|
|
8302
8283
|
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;
|
|
8303
8284
|
return {
|
|
8304
8285
|
added: Math.max(0, i),
|
|
8305
8286
|
removed: Math.max(0, a)
|
|
8306
8287
|
};
|
|
8307
|
-
},
|
|
8288
|
+
}, Bp = "split", Vp = "unified", Hp = ({ oldJson: e, newJson: t, viewType: n = Bp }) => {
|
|
8308
8289
|
var r, i;
|
|
8309
|
-
let { translations: a } =
|
|
8310
|
-
value:
|
|
8290
|
+
let { translations: a } = jp(), [o, s] = v(n), c = [{
|
|
8291
|
+
value: Bp,
|
|
8311
8292
|
label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
|
|
8312
8293
|
}, {
|
|
8313
|
-
value:
|
|
8294
|
+
value: Vp,
|
|
8314
8295
|
label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
|
|
8315
8296
|
}];
|
|
8316
8297
|
d(() => {
|
|
@@ -8318,10 +8299,10 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8318
8299
|
}, [n]);
|
|
8319
8300
|
let l = ({ target: { value: e } }) => {
|
|
8320
8301
|
s(e);
|
|
8321
|
-
}, { added: u, removed: f } =
|
|
8302
|
+
}, { added: u, removed: f } = zp(e, t), p = u + f > 3500;
|
|
8322
8303
|
return /* @__PURE__ */ S(x, { children: /* @__PURE__ */ S(Oo, {
|
|
8323
8304
|
bordered: !0,
|
|
8324
|
-
heading: /* @__PURE__ */ C(
|
|
8305
|
+
heading: /* @__PURE__ */ C(xd, {
|
|
8325
8306
|
gap: !0,
|
|
8326
8307
|
children: [/* @__PURE__ */ S(cs, { children: /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C(rs, {
|
|
8327
8308
|
success: !0,
|
|
@@ -8333,7 +8314,7 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8333
8314
|
}), /* @__PURE__ */ C(rs, {
|
|
8334
8315
|
error: !0,
|
|
8335
8316
|
children: ["-", f]
|
|
8336
|
-
})] }) }), !p && /* @__PURE__ */ S(
|
|
8317
|
+
})] }) }), !p && /* @__PURE__ */ S(Zd, {
|
|
8337
8318
|
name: "viewType",
|
|
8338
8319
|
options: c,
|
|
8339
8320
|
value: o,
|
|
@@ -8351,14 +8332,14 @@ var Lo = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ro =
|
|
|
8351
8332
|
}) : /* @__PURE__ */ S(Di, {
|
|
8352
8333
|
oldValue: e,
|
|
8353
8334
|
newValue: t,
|
|
8354
|
-
splitView: o ===
|
|
8335
|
+
splitView: o === Bp,
|
|
8355
8336
|
compareMethod: Oi.WORDS
|
|
8356
8337
|
})
|
|
8357
8338
|
}) });
|
|
8358
8339
|
};
|
|
8359
8340
|
//#endregion
|
|
8360
8341
|
//#region src/helpers/date.ts
|
|
8361
|
-
function
|
|
8342
|
+
function Up({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
8362
8343
|
return e ? new Date(e).toLocaleString(a, {
|
|
8363
8344
|
year: "numeric",
|
|
8364
8345
|
month: "short",
|
|
@@ -8372,28 +8353,28 @@ function Wp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
8372
8353
|
}
|
|
8373
8354
|
//#endregion
|
|
8374
8355
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
8375
|
-
function
|
|
8356
|
+
function Wp(e) {
|
|
8376
8357
|
var t;
|
|
8377
8358
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
8378
8359
|
if (!n) throw Error("Invalid RegExp");
|
|
8379
8360
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
8380
8361
|
}
|
|
8381
|
-
function
|
|
8362
|
+
function Gp(e) {
|
|
8382
8363
|
if (typeof e != "object") return e;
|
|
8383
8364
|
if (e === null) return null;
|
|
8384
|
-
if (Array.isArray(e)) return e.map(
|
|
8365
|
+
if (Array.isArray(e)) return e.map(Gp);
|
|
8385
8366
|
if (e instanceof Date) return new Date(e.getTime());
|
|
8386
|
-
if (e instanceof RegExp) return
|
|
8367
|
+
if (e instanceof RegExp) return Wp(e);
|
|
8387
8368
|
let t = {};
|
|
8388
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
8369
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = Gp(e[n]));
|
|
8389
8370
|
return t;
|
|
8390
8371
|
}
|
|
8391
8372
|
//#endregion
|
|
8392
8373
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
8393
|
-
function
|
|
8374
|
+
function Kp(e, t) {
|
|
8394
8375
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
8395
8376
|
}
|
|
8396
|
-
var
|
|
8377
|
+
var qp = (e) => e[e.length - 1], Jp = class {
|
|
8397
8378
|
setResult(e) {
|
|
8398
8379
|
return this.result = e, this.hasResult = !0, this;
|
|
8399
8380
|
}
|
|
@@ -8401,16 +8382,16 @@ var Jp = (e) => e[e.length - 1], Yp = class {
|
|
|
8401
8382
|
return this.exiting = !0, this;
|
|
8402
8383
|
}
|
|
8403
8384
|
push(e, t) {
|
|
8404
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
8385
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (Kp(this.children), qp(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
8405
8386
|
}
|
|
8406
|
-
},
|
|
8387
|
+
}, Yp = class extends Jp {
|
|
8407
8388
|
constructor(e, t) {
|
|
8408
8389
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
8409
8390
|
}
|
|
8410
8391
|
prepareDeltaResult(e) {
|
|
8411
8392
|
var t, n, r, i;
|
|
8412
8393
|
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)) {
|
|
8413
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
8394
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : Gp;
|
|
8414
8395
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
8415
8396
|
}
|
|
8416
8397
|
return e;
|
|
@@ -8418,15 +8399,15 @@ var Jp = (e) => e[e.length - 1], Yp = class {
|
|
|
8418
8399
|
setResult(e) {
|
|
8419
8400
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
8420
8401
|
}
|
|
8421
|
-
},
|
|
8402
|
+
}, Xp = class extends Jp {
|
|
8422
8403
|
constructor(e, t) {
|
|
8423
8404
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
8424
8405
|
}
|
|
8425
|
-
},
|
|
8406
|
+
}, Zp = class extends Jp {
|
|
8426
8407
|
constructor(e) {
|
|
8427
8408
|
super(), this.delta = e, this.pipe = "reverse";
|
|
8428
8409
|
}
|
|
8429
|
-
},
|
|
8410
|
+
}, Qp = class {
|
|
8430
8411
|
constructor(e) {
|
|
8431
8412
|
this.name = e, this.filters = [];
|
|
8432
8413
|
}
|
|
@@ -8490,7 +8471,7 @@ var Jp = (e) => e[e.length - 1], Yp = class {
|
|
|
8490
8471
|
}
|
|
8491
8472
|
}), this);
|
|
8492
8473
|
}
|
|
8493
|
-
},
|
|
8474
|
+
}, $p = class {
|
|
8494
8475
|
constructor(e) {
|
|
8495
8476
|
this.selfOptions = e || {}, this.pipes = {};
|
|
8496
8477
|
}
|
|
@@ -8517,7 +8498,7 @@ var Jp = (e) => e[e.length - 1], Yp = class {
|
|
|
8517
8498
|
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);
|
|
8518
8499
|
return n.hasResult ? n.result : void 0;
|
|
8519
8500
|
}
|
|
8520
|
-
},
|
|
8501
|
+
}, em = (e, t, n, r) => e[n] === t[r], tm = (e, t, n, r) => {
|
|
8521
8502
|
var i, a, o;
|
|
8522
8503
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
8523
8504
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -8533,7 +8514,7 @@ var Jp = (e) => e[e.length - 1], Yp = class {
|
|
|
8533
8514
|
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);
|
|
8534
8515
|
}
|
|
8535
8516
|
return d;
|
|
8536
|
-
},
|
|
8517
|
+
}, nm = (e, t, n, r) => {
|
|
8537
8518
|
let i = t.length, a = n.length, o = {
|
|
8538
8519
|
sequence: [],
|
|
8539
8520
|
indices1: [],
|
|
@@ -8555,11 +8536,11 @@ var Jp = (e) => e[e.length - 1], Yp = class {
|
|
|
8555
8536
|
}
|
|
8556
8537
|
}
|
|
8557
8538
|
return o;
|
|
8558
|
-
},
|
|
8539
|
+
}, rm = { get: (e, t, n, r) => {
|
|
8559
8540
|
let i = r || {};
|
|
8560
|
-
return
|
|
8561
|
-
} },
|
|
8562
|
-
function
|
|
8541
|
+
return nm(tm(e, t, n || em, i), e, t, i);
|
|
8542
|
+
} }, im = 3;
|
|
8543
|
+
function am(e, t, n, r) {
|
|
8563
8544
|
for (let i = 0; i < n; i++) {
|
|
8564
8545
|
let n = e[i];
|
|
8565
8546
|
for (let e = 0; e < r; e++) {
|
|
@@ -8569,7 +8550,7 @@ function om(e, t, n, r) {
|
|
|
8569
8550
|
}
|
|
8570
8551
|
return !1;
|
|
8571
8552
|
}
|
|
8572
|
-
function
|
|
8553
|
+
function om(e, t, n, r, i) {
|
|
8573
8554
|
let a = e[n], o = t[r];
|
|
8574
8555
|
if (a === o) return !0;
|
|
8575
8556
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -8582,15 +8563,15 @@ function sm(e, t, n, r, i) {
|
|
|
8582
8563
|
let l = i.hashCache2[r];
|
|
8583
8564
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l !== void 0 && c === l;
|
|
8584
8565
|
}
|
|
8585
|
-
var
|
|
8566
|
+
var sm = function(e) {
|
|
8586
8567
|
var t, n, r, i, a;
|
|
8587
8568
|
if (!e.leftIsArray) return;
|
|
8588
8569
|
let o = {
|
|
8589
8570
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
8590
8571
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
8591
8572
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
8592
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !
|
|
8593
|
-
for (; c + s < m && c + s < h &&
|
|
8573
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !am(f, p, m, h)); s < m && s < h && om(f, p, s, s, o);) l = s, g = new Yp(f[l], p[l]), e.push(g, l), s++;
|
|
8574
|
+
for (; c + s < m && c + s < h && om(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new Yp(f[u], p[d]), e.push(g, d), c++;
|
|
8594
8575
|
let _;
|
|
8595
8576
|
if (s + c === m) {
|
|
8596
8577
|
if (m === h) {
|
|
@@ -8614,7 +8595,7 @@ var cm = function(e) {
|
|
|
8614
8595
|
return;
|
|
8615
8596
|
}
|
|
8616
8597
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
8617
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
8598
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = rm.get(v, y, om, o), x = [];
|
|
8618
8599
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
8619
8600
|
let t = `_${l}`;
|
|
8620
8601
|
_[t] = [
|
|
@@ -8635,8 +8616,8 @@ var cm = function(e) {
|
|
|
8635
8616
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
8636
8617
|
u = x[n];
|
|
8637
8618
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
8638
|
-
if (u !== void 0 && r &&
|
|
8639
|
-
r.splice(1, 2, l,
|
|
8619
|
+
if (u !== void 0 && r && om(v, y, u - s, l - s, o)) {
|
|
8620
|
+
r.splice(1, 2, l, im), r.splice(1, 2, l, im), C || (r[0] = ""), d = l, g = new Yp(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
8640
8621
|
break;
|
|
8641
8622
|
}
|
|
8642
8623
|
}
|
|
@@ -8644,20 +8625,20 @@ var cm = function(e) {
|
|
|
8644
8625
|
} else {
|
|
8645
8626
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
8646
8627
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
8647
|
-
d = b.indices2[t] + s, g = new
|
|
8628
|
+
d = b.indices2[t] + s, g = new Yp(f[u], p[d]), e.push(g, d);
|
|
8648
8629
|
}
|
|
8649
8630
|
}
|
|
8650
8631
|
e.setResult(_).exit();
|
|
8651
8632
|
};
|
|
8652
|
-
|
|
8653
|
-
var
|
|
8633
|
+
sm.filterName = "arrays";
|
|
8634
|
+
var cm = {
|
|
8654
8635
|
numerically(e, t) {
|
|
8655
8636
|
return e - t;
|
|
8656
8637
|
},
|
|
8657
8638
|
numericallyBy(e) {
|
|
8658
8639
|
return (t, n) => t[e] - n[e];
|
|
8659
8640
|
}
|
|
8660
|
-
},
|
|
8641
|
+
}, lm = function(e) {
|
|
8661
8642
|
var t;
|
|
8662
8643
|
if (!e.nested) return;
|
|
8663
8644
|
let n = e.delta;
|
|
@@ -8666,7 +8647,7 @@ var lm = {
|
|
|
8666
8647
|
for (r in a) if (r !== "_t") {
|
|
8667
8648
|
if (r[0] === "_") {
|
|
8668
8649
|
let e = r;
|
|
8669
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
8650
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === im)) s.push(Number.parseInt(r.slice(1), 10));
|
|
8670
8651
|
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]}`);
|
|
8671
8652
|
} else {
|
|
8672
8653
|
let e = r;
|
|
@@ -8679,15 +8660,15 @@ var lm = {
|
|
|
8679
8660
|
});
|
|
8680
8661
|
}
|
|
8681
8662
|
}
|
|
8682
|
-
for (s = s.sort(
|
|
8663
|
+
for (s = s.sort(cm.numerically), r = s.length - 1; r >= 0; r--) {
|
|
8683
8664
|
if (i = s[r], i === void 0) continue;
|
|
8684
8665
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
8685
|
-
(e == null ? void 0 : e[2]) ===
|
|
8666
|
+
(e == null ? void 0 : e[2]) === im && c.push({
|
|
8686
8667
|
index: e[1],
|
|
8687
8668
|
value: t
|
|
8688
8669
|
});
|
|
8689
8670
|
}
|
|
8690
|
-
c = c.sort(
|
|
8671
|
+
c = c.sort(cm.numericallyBy("index"));
|
|
8691
8672
|
let u = c.length;
|
|
8692
8673
|
for (r = 0; r < u; r++) {
|
|
8693
8674
|
let e = c[r];
|
|
@@ -8697,7 +8678,7 @@ var lm = {
|
|
|
8697
8678
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
8698
8679
|
let t = l[r];
|
|
8699
8680
|
if (t === void 0) continue;
|
|
8700
|
-
let n = new
|
|
8681
|
+
let n = new Xp(o[t.index], t.delta);
|
|
8701
8682
|
e.push(n, t.index);
|
|
8702
8683
|
}
|
|
8703
8684
|
if (!e.children) {
|
|
@@ -8706,8 +8687,8 @@ var lm = {
|
|
|
8706
8687
|
}
|
|
8707
8688
|
e.exit();
|
|
8708
8689
|
};
|
|
8709
|
-
|
|
8710
|
-
var
|
|
8690
|
+
lm.filterName = "arrays";
|
|
8691
|
+
var um = function(e) {
|
|
8711
8692
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
8712
8693
|
let t = e.left, n = e.children.length;
|
|
8713
8694
|
for (let r = 0; r < n; r++) {
|
|
@@ -8718,16 +8699,16 @@ var dm = function(e) {
|
|
|
8718
8699
|
}
|
|
8719
8700
|
e.setResult(t).exit();
|
|
8720
8701
|
};
|
|
8721
|
-
|
|
8722
|
-
var
|
|
8702
|
+
um.filterName = "arraysCollectChildren";
|
|
8703
|
+
var dm = function(e) {
|
|
8723
8704
|
if (!e.nested) {
|
|
8724
8705
|
let t = e.delta;
|
|
8725
|
-
if (t[2] ===
|
|
8706
|
+
if (t[2] === im) {
|
|
8726
8707
|
let n = t;
|
|
8727
8708
|
e.newName = `_${n[1]}`, e.setResult([
|
|
8728
8709
|
n[0],
|
|
8729
8710
|
Number.parseInt(e.childName.substring(1), 10),
|
|
8730
|
-
|
|
8711
|
+
im
|
|
8731
8712
|
]).exit();
|
|
8732
8713
|
}
|
|
8733
8714
|
return;
|
|
@@ -8737,20 +8718,20 @@ var fm = function(e) {
|
|
|
8737
8718
|
let n = t;
|
|
8738
8719
|
for (let t in n) {
|
|
8739
8720
|
if (t === "_t") continue;
|
|
8740
|
-
let r = new
|
|
8721
|
+
let r = new Zp(n[t]);
|
|
8741
8722
|
e.push(r, t);
|
|
8742
8723
|
}
|
|
8743
8724
|
e.exit();
|
|
8744
8725
|
};
|
|
8745
|
-
|
|
8746
|
-
var
|
|
8726
|
+
dm.filterName = "arrays";
|
|
8727
|
+
var fm = (e, t, n) => {
|
|
8747
8728
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
8748
8729
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
8749
8730
|
let r = +t;
|
|
8750
8731
|
for (let n in e) {
|
|
8751
8732
|
let i = e[n];
|
|
8752
8733
|
if (Array.isArray(i)) {
|
|
8753
|
-
if (i[2] ===
|
|
8734
|
+
if (i[2] === im) {
|
|
8754
8735
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
8755
8736
|
if (a === +t) return e;
|
|
8756
8737
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
@@ -8758,7 +8739,7 @@ var pm = (e, t, n) => {
|
|
|
8758
8739
|
}
|
|
8759
8740
|
}
|
|
8760
8741
|
return r;
|
|
8761
|
-
},
|
|
8742
|
+
}, pm = (e) => {
|
|
8762
8743
|
if (!e || !e.children) return;
|
|
8763
8744
|
let t = e.delta;
|
|
8764
8745
|
if (t._t !== "a") return;
|
|
@@ -8769,22 +8750,22 @@ var pm = (e, t, n) => {
|
|
|
8769
8750
|
let a = r.newName;
|
|
8770
8751
|
if (a === void 0) {
|
|
8771
8752
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
8772
|
-
a =
|
|
8753
|
+
a = fm(n, r.childName, r.result);
|
|
8773
8754
|
}
|
|
8774
8755
|
i[a] !== r.result && (i[a] = r.result);
|
|
8775
8756
|
}
|
|
8776
8757
|
e.setResult(i).exit();
|
|
8777
8758
|
};
|
|
8778
|
-
|
|
8759
|
+
pm.filterName = "arraysCollectChildren";
|
|
8779
8760
|
//#endregion
|
|
8780
8761
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
8781
|
-
var
|
|
8762
|
+
var mm = function(e) {
|
|
8782
8763
|
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();
|
|
8783
8764
|
};
|
|
8784
|
-
|
|
8765
|
+
mm.filterName = "dates";
|
|
8785
8766
|
//#endregion
|
|
8786
8767
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
8787
|
-
var
|
|
8768
|
+
var hm = /* @__PURE__ */ new Set(["__proto__"]), gm = (e) => {
|
|
8788
8769
|
if (!e || !e.children) return;
|
|
8789
8770
|
let t = e.children.length, n = e.result;
|
|
8790
8771
|
for (let r = 0; r < t; r++) {
|
|
@@ -8796,18 +8777,18 @@ var gm = /* @__PURE__ */ new Set(["__proto__"]), _m = (e) => {
|
|
|
8796
8777
|
}
|
|
8797
8778
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
8798
8779
|
};
|
|
8799
|
-
|
|
8800
|
-
var
|
|
8780
|
+
gm.filterName = "collectChildren";
|
|
8781
|
+
var _m = (e) => {
|
|
8801
8782
|
var t;
|
|
8802
8783
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
8803
8784
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
8804
8785
|
for (let t in n) {
|
|
8805
8786
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
8806
|
-
let a = new
|
|
8787
|
+
let a = new Yp(n[t], r[t]);
|
|
8807
8788
|
e.push(a, t);
|
|
8808
8789
|
}
|
|
8809
8790
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
8810
|
-
let n = new
|
|
8791
|
+
let n = new Yp(void 0, r[t]);
|
|
8811
8792
|
e.push(n, t);
|
|
8812
8793
|
}
|
|
8813
8794
|
if (!e.children || e.children.length === 0) {
|
|
@@ -8816,15 +8797,15 @@ var vm = (e) => {
|
|
|
8816
8797
|
}
|
|
8817
8798
|
e.exit();
|
|
8818
8799
|
};
|
|
8819
|
-
|
|
8820
|
-
var
|
|
8800
|
+
_m.filterName = "objects";
|
|
8801
|
+
var vm = function(e) {
|
|
8821
8802
|
if (!e.nested) return;
|
|
8822
8803
|
let t = e.delta;
|
|
8823
8804
|
if (t._t) return;
|
|
8824
8805
|
let n = t, r = !1;
|
|
8825
8806
|
for (let t in n) {
|
|
8826
|
-
if (
|
|
8827
|
-
let i = e.left, a = new
|
|
8807
|
+
if (hm.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
8808
|
+
let i = e.left, a = new Xp(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
8828
8809
|
e.push(a, t), r = !0;
|
|
8829
8810
|
}
|
|
8830
8811
|
if (!r) {
|
|
@@ -8833,8 +8814,8 @@ var ym = function(e) {
|
|
|
8833
8814
|
}
|
|
8834
8815
|
e.exit();
|
|
8835
8816
|
};
|
|
8836
|
-
|
|
8837
|
-
var
|
|
8817
|
+
vm.filterName = "objects";
|
|
8818
|
+
var ym = function(e) {
|
|
8838
8819
|
if (!e || !e.children || e.delta._t) return;
|
|
8839
8820
|
if (e.left === null || typeof e.left != "object") {
|
|
8840
8821
|
e.setResult(e.left).exit();
|
|
@@ -8845,17 +8826,17 @@ var bm = function(e) {
|
|
|
8845
8826
|
let n = e.children[r];
|
|
8846
8827
|
if (n === void 0) continue;
|
|
8847
8828
|
let i = n.childName;
|
|
8848
|
-
|
|
8829
|
+
hm.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
8849
8830
|
}
|
|
8850
8831
|
e.setResult(t).exit();
|
|
8851
8832
|
};
|
|
8852
|
-
|
|
8853
|
-
var
|
|
8833
|
+
ym.filterName = "collectChildren";
|
|
8834
|
+
var bm = function(e) {
|
|
8854
8835
|
if (!e.nested || e.delta._t) return;
|
|
8855
8836
|
let t = e.delta, n = !1;
|
|
8856
8837
|
for (let r in t) {
|
|
8857
|
-
if (
|
|
8858
|
-
let i = new
|
|
8838
|
+
if (hm.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
8839
|
+
let i = new Zp(t[r]);
|
|
8859
8840
|
e.push(i, r), n = !0;
|
|
8860
8841
|
}
|
|
8861
8842
|
if (!n) {
|
|
@@ -8864,25 +8845,25 @@ var xm = function(e) {
|
|
|
8864
8845
|
}
|
|
8865
8846
|
e.exit();
|
|
8866
8847
|
};
|
|
8867
|
-
|
|
8868
|
-
var
|
|
8848
|
+
bm.filterName = "objects";
|
|
8849
|
+
var xm = (e) => {
|
|
8869
8850
|
if (!e || !e.children || e.delta._t) return;
|
|
8870
8851
|
let t = e.children.length, n = {};
|
|
8871
8852
|
for (let r = 0; r < t; r++) {
|
|
8872
8853
|
let t = e.children[r];
|
|
8873
8854
|
if (t === void 0) continue;
|
|
8874
8855
|
let i = t.childName;
|
|
8875
|
-
|
|
8856
|
+
hm.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
8876
8857
|
}
|
|
8877
8858
|
e.setResult(n).exit();
|
|
8878
8859
|
};
|
|
8879
|
-
|
|
8860
|
+
xm.filterName = "collectChildren";
|
|
8880
8861
|
//#endregion
|
|
8881
8862
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
8882
|
-
var
|
|
8883
|
-
function
|
|
8863
|
+
var Sm = 2, Cm = 60, wm = null;
|
|
8864
|
+
function Tm(e, t) {
|
|
8884
8865
|
var n;
|
|
8885
|
-
if (!
|
|
8866
|
+
if (!wm) {
|
|
8886
8867
|
let r;
|
|
8887
8868
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
8888
8869
|
else {
|
|
@@ -8890,7 +8871,7 @@ function Em(e, t) {
|
|
|
8890
8871
|
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.");
|
|
8891
8872
|
throw e.diff_match_patch_not_found = !0, e;
|
|
8892
8873
|
}
|
|
8893
|
-
|
|
8874
|
+
wm = {
|
|
8894
8875
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
8895
8876
|
patch: (e, t) => {
|
|
8896
8877
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -8902,17 +8883,17 @@ function Em(e, t) {
|
|
|
8902
8883
|
}
|
|
8903
8884
|
};
|
|
8904
8885
|
}
|
|
8905
|
-
return
|
|
8886
|
+
return wm;
|
|
8906
8887
|
}
|
|
8907
|
-
var
|
|
8888
|
+
var Em = function(e) {
|
|
8908
8889
|
var t, n;
|
|
8909
8890
|
if (e.leftType !== "string") return;
|
|
8910
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
8891
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || Cm;
|
|
8911
8892
|
if (r.length < a || i.length < a) {
|
|
8912
8893
|
e.setResult([r, i]).exit();
|
|
8913
8894
|
return;
|
|
8914
8895
|
}
|
|
8915
|
-
let o =
|
|
8896
|
+
let o = Tm(e.options);
|
|
8916
8897
|
if (!o) {
|
|
8917
8898
|
e.setResult([r, i]).exit();
|
|
8918
8899
|
return;
|
|
@@ -8921,19 +8902,19 @@ var Dm = function(e) {
|
|
|
8921
8902
|
e.setResult([
|
|
8922
8903
|
s(r, i),
|
|
8923
8904
|
0,
|
|
8924
|
-
|
|
8905
|
+
Sm
|
|
8925
8906
|
]).exit();
|
|
8926
8907
|
};
|
|
8927
|
-
|
|
8928
|
-
var
|
|
8908
|
+
Em.filterName = "texts";
|
|
8909
|
+
var Dm = function(e) {
|
|
8929
8910
|
if (e.nested) return;
|
|
8930
8911
|
let t = e.delta;
|
|
8931
|
-
if (t[2] !==
|
|
8932
|
-
let n = t, r =
|
|
8912
|
+
if (t[2] !== Sm) return;
|
|
8913
|
+
let n = t, r = Tm(e.options, !0).patch;
|
|
8933
8914
|
e.setResult(r(e.left, n[0])).exit();
|
|
8934
8915
|
};
|
|
8935
|
-
|
|
8936
|
-
var
|
|
8916
|
+
Dm.filterName = "texts";
|
|
8917
|
+
var Om = (e) => {
|
|
8937
8918
|
var t, n, r;
|
|
8938
8919
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
8939
8920
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -8954,21 +8935,21 @@ var km = (e) => {
|
|
|
8954
8935
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
8955
8936
|
}
|
|
8956
8937
|
return a.join("\n");
|
|
8957
|
-
},
|
|
8938
|
+
}, km = function(e) {
|
|
8958
8939
|
if (e.nested) return;
|
|
8959
8940
|
let t = e.delta;
|
|
8960
|
-
if (t[2] !==
|
|
8941
|
+
if (t[2] !== Sm) return;
|
|
8961
8942
|
let n = t;
|
|
8962
8943
|
e.setResult([
|
|
8963
|
-
|
|
8944
|
+
Om(n[0]),
|
|
8964
8945
|
0,
|
|
8965
|
-
|
|
8946
|
+
Sm
|
|
8966
8947
|
]).exit();
|
|
8967
8948
|
};
|
|
8968
|
-
|
|
8949
|
+
km.filterName = "texts";
|
|
8969
8950
|
//#endregion
|
|
8970
8951
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
8971
|
-
var
|
|
8952
|
+
var Am = function(e) {
|
|
8972
8953
|
if (e.left === e.right) {
|
|
8973
8954
|
e.setResult(void 0).exit();
|
|
8974
8955
|
return;
|
|
@@ -9001,8 +8982,8 @@ var jm = function(e) {
|
|
|
9001
8982
|
}
|
|
9002
8983
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
9003
8984
|
};
|
|
9004
|
-
|
|
9005
|
-
var
|
|
8985
|
+
Am.filterName = "trivial";
|
|
8986
|
+
var jm = function(e) {
|
|
9006
8987
|
if (e.delta === void 0) {
|
|
9007
8988
|
e.setResult(e.left).exit();
|
|
9008
8989
|
return;
|
|
@@ -9026,8 +9007,8 @@ var Mm = function(e) {
|
|
|
9026
9007
|
}
|
|
9027
9008
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
9028
9009
|
};
|
|
9029
|
-
|
|
9030
|
-
var
|
|
9010
|
+
jm.filterName = "trivial";
|
|
9011
|
+
var Mm = function(e) {
|
|
9031
9012
|
if (e.delta === void 0) {
|
|
9032
9013
|
e.setResult(e.delta).exit();
|
|
9033
9014
|
return;
|
|
@@ -9048,36 +9029,36 @@ var Nm = function(e) {
|
|
|
9048
9029
|
}
|
|
9049
9030
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
9050
9031
|
};
|
|
9051
|
-
|
|
9032
|
+
Mm.filterName = "trivial";
|
|
9052
9033
|
//#endregion
|
|
9053
9034
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
9054
|
-
var
|
|
9035
|
+
var Nm = class {
|
|
9055
9036
|
constructor(e) {
|
|
9056
|
-
this.processor = new
|
|
9037
|
+
this.processor = new $p(e), this.processor.pipe(new Qp("diff").append(gm, Am, mm, Em, _m, sm).shouldHaveResult()), this.processor.pipe(new Qp("patch").append(ym, um, jm, Dm, vm, lm).shouldHaveResult()), this.processor.pipe(new Qp("reverse").append(xm, pm, Mm, km, bm, dm).shouldHaveResult());
|
|
9057
9038
|
}
|
|
9058
9039
|
options(e) {
|
|
9059
9040
|
return this.processor.options(e);
|
|
9060
9041
|
}
|
|
9061
9042
|
diff(e, t) {
|
|
9062
|
-
return this.processor.process(new
|
|
9043
|
+
return this.processor.process(new Yp(e, t));
|
|
9063
9044
|
}
|
|
9064
9045
|
patch(e, t) {
|
|
9065
|
-
return this.processor.process(new
|
|
9046
|
+
return this.processor.process(new Xp(e, t));
|
|
9066
9047
|
}
|
|
9067
9048
|
reverse(e) {
|
|
9068
|
-
return this.processor.process(new
|
|
9049
|
+
return this.processor.process(new Zp(e));
|
|
9069
9050
|
}
|
|
9070
9051
|
unpatch(e, t) {
|
|
9071
9052
|
return this.patch(e, this.reverse(t));
|
|
9072
9053
|
}
|
|
9073
9054
|
clone(e) {
|
|
9074
|
-
return
|
|
9055
|
+
return Gp(e);
|
|
9075
9056
|
}
|
|
9076
9057
|
};
|
|
9077
9058
|
//#endregion
|
|
9078
9059
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
9079
|
-
function
|
|
9080
|
-
return new
|
|
9060
|
+
function Pm(e) {
|
|
9061
|
+
return new Nm(e);
|
|
9081
9062
|
}
|
|
9082
9063
|
//#endregion
|
|
9083
9064
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -9639,46 +9620,46 @@ $.Diff = function(e, t) {
|
|
|
9639
9620
|
};
|
|
9640
9621
|
//#endregion
|
|
9641
9622
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
9642
|
-
var
|
|
9623
|
+
var Fm = (e = {}) => Pm({
|
|
9643
9624
|
...e,
|
|
9644
9625
|
textDiff: {
|
|
9645
9626
|
diffMatchPatch: $,
|
|
9646
9627
|
minLength: 120
|
|
9647
9628
|
},
|
|
9648
9629
|
cloneDiffValues: !0
|
|
9649
|
-
}),
|
|
9630
|
+
}), Im = ["user", "unittemplate"], Lm = Fm(), Rm = (e, t, n) => {
|
|
9650
9631
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
9651
9632
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
9652
9633
|
let n = r[t[e]];
|
|
9653
9634
|
if (n) return n;
|
|
9654
9635
|
}
|
|
9655
9636
|
return n || "";
|
|
9656
|
-
},
|
|
9637
|
+
}, zm = (e) => {
|
|
9657
9638
|
let t = (e) => gr(e) ? Or(e) : String(e);
|
|
9658
9639
|
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);
|
|
9659
|
-
},
|
|
9640
|
+
}, Bm = (e) => {
|
|
9660
9641
|
switch (e.length) {
|
|
9661
9642
|
case 1: {
|
|
9662
9643
|
let [t] = e;
|
|
9663
9644
|
return {
|
|
9664
9645
|
type: "created",
|
|
9665
9646
|
before: "",
|
|
9666
|
-
after:
|
|
9647
|
+
after: zm(t)
|
|
9667
9648
|
};
|
|
9668
9649
|
}
|
|
9669
9650
|
case 2: {
|
|
9670
9651
|
let [t, n] = e;
|
|
9671
9652
|
return {
|
|
9672
9653
|
type: "modified",
|
|
9673
|
-
before:
|
|
9674
|
-
after:
|
|
9654
|
+
before: zm(t),
|
|
9655
|
+
after: zm(n)
|
|
9675
9656
|
};
|
|
9676
9657
|
}
|
|
9677
9658
|
case 3: {
|
|
9678
9659
|
let [t] = e;
|
|
9679
9660
|
return {
|
|
9680
9661
|
type: "deleted",
|
|
9681
|
-
before:
|
|
9662
|
+
before: zm(t),
|
|
9682
9663
|
after: ""
|
|
9683
9664
|
};
|
|
9684
9665
|
}
|
|
@@ -9688,15 +9669,15 @@ var Im = (e = {}) => Fm({
|
|
|
9688
9669
|
after: ""
|
|
9689
9670
|
};
|
|
9690
9671
|
}
|
|
9691
|
-
},
|
|
9692
|
-
let r =
|
|
9672
|
+
}, Vm = (e) => Array.isArray(e), Hm = (e, t) => t ? Vm(t) ? t.length === 0 ? e : t.reduce((e, t) => Lm.unpatch(tn(e), tn(t)), tn(e)) : Lm.unpatch(tn(e), tn(t)) : e, Um = (e) => e.createdAt || e.date, Wm = (e, t, n) => {
|
|
9673
|
+
let r = Um(e);
|
|
9693
9674
|
if (!r) return {
|
|
9694
9675
|
oldJson: "",
|
|
9695
9676
|
newJson: "",
|
|
9696
9677
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
9697
9678
|
};
|
|
9698
9679
|
let i = t.filter((e) => {
|
|
9699
|
-
let t =
|
|
9680
|
+
let t = Um(e);
|
|
9700
9681
|
return !!(e.diffs && t && t >= r);
|
|
9701
9682
|
}), a = Array.from({ length: i.length + 1 });
|
|
9702
9683
|
a[0] = tn(n);
|
|
@@ -9709,7 +9690,7 @@ var Im = (e = {}) => Fm({
|
|
|
9709
9690
|
a[e + 1] = a[e];
|
|
9710
9691
|
continue;
|
|
9711
9692
|
}
|
|
9712
|
-
a[e + 1] =
|
|
9693
|
+
a[e + 1] = Hm(a[e], t);
|
|
9713
9694
|
}
|
|
9714
9695
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
9715
9696
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -9724,10 +9705,10 @@ var Im = (e = {}) => Fm({
|
|
|
9724
9705
|
oldJson: o,
|
|
9725
9706
|
newJson: s
|
|
9726
9707
|
};
|
|
9727
|
-
},
|
|
9708
|
+
}, Gm = (e, t, n = {}, r = []) => {
|
|
9728
9709
|
var i;
|
|
9729
9710
|
if (!e) return;
|
|
9730
|
-
let a = [...
|
|
9711
|
+
let a = [...Im, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
9731
9712
|
Object.keys(e).forEach((i) => {
|
|
9732
9713
|
var o;
|
|
9733
9714
|
let s = e[i];
|
|
@@ -9740,12 +9721,12 @@ var Im = (e = {}) => Fm({
|
|
|
9740
9721
|
sn(s) ? t.push({
|
|
9741
9722
|
deltaFormat: [...s],
|
|
9742
9723
|
path: c
|
|
9743
|
-
}) : hn(s) &&
|
|
9724
|
+
}) : hn(s) && Gm(s, t, n, c);
|
|
9744
9725
|
});
|
|
9745
|
-
},
|
|
9726
|
+
}, Km = (e, t = {}) => {
|
|
9746
9727
|
let n = [];
|
|
9747
|
-
return e ? (
|
|
9748
|
-
},
|
|
9728
|
+
return e ? (Gm(e, n, t), n) : [];
|
|
9729
|
+
}, qm = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), Jm = (e) => {
|
|
9749
9730
|
if (e == null || e === "") return "empty";
|
|
9750
9731
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
9751
9732
|
if (typeof e == "string") return e;
|
|
@@ -9756,35 +9737,35 @@ var Im = (e = {}) => Fm({
|
|
|
9756
9737
|
} catch {
|
|
9757
9738
|
return String(e);
|
|
9758
9739
|
}
|
|
9759
|
-
},
|
|
9740
|
+
}, Ym = (e, t = e.length - 1) => {
|
|
9760
9741
|
if (t >= e.length) return "Value";
|
|
9761
9742
|
let n = e[t];
|
|
9762
|
-
return !n || pr(n) ?
|
|
9763
|
-
},
|
|
9764
|
-
let o =
|
|
9743
|
+
return !n || pr(n) ? Ym(e, t - 1) : qm(n);
|
|
9744
|
+
}, Xm = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
9745
|
+
let o = Jm(r), s = Jm(i), c = a ? ` in ${a}` : "";
|
|
9765
9746
|
switch (t) {
|
|
9766
9747
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
9767
9748
|
case "created": return `${e} created ${s}${c}.`;
|
|
9768
9749
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
9769
9750
|
default: return `${e} changed ${n}${c}.`;
|
|
9770
9751
|
}
|
|
9771
|
-
},
|
|
9752
|
+
}, Zm = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
|
|
9772
9753
|
let i = {
|
|
9773
9754
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
9774
9755
|
rows: n.map((n) => {
|
|
9775
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
9776
|
-
return { cells: [{ value:
|
|
9756
|
+
let { deltaFormat: i, path: a } = n, o = Rm(e, a, r), { type: s, before: c, after: l } = Bm(i);
|
|
9757
|
+
return { cells: [{ value: Xm({
|
|
9777
9758
|
userName: t,
|
|
9778
9759
|
type: s,
|
|
9779
|
-
property:
|
|
9760
|
+
property: Ym(a),
|
|
9780
9761
|
before: c,
|
|
9781
9762
|
after: l,
|
|
9782
9763
|
sectionName: o
|
|
9783
9764
|
}) }] };
|
|
9784
9765
|
})
|
|
9785
9766
|
};
|
|
9786
|
-
return /* @__PURE__ */ S(
|
|
9787
|
-
},
|
|
9767
|
+
return /* @__PURE__ */ S(ru, { table: i });
|
|
9768
|
+
}, Qm = Object.freeze({
|
|
9788
9769
|
summary: {
|
|
9789
9770
|
label: "Summary",
|
|
9790
9771
|
value: "summary"
|
|
@@ -9793,13 +9774,13 @@ var Im = (e = {}) => Fm({
|
|
|
9793
9774
|
label: "Compare",
|
|
9794
9775
|
value: "compare"
|
|
9795
9776
|
}
|
|
9796
|
-
}),
|
|
9797
|
-
let c = [
|
|
9777
|
+
}), $m = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
9778
|
+
let c = [Qm.summary, Qm.compare].map(({ label: e, value: t }) => ({
|
|
9798
9779
|
label: e,
|
|
9799
9780
|
value: t
|
|
9800
9781
|
})), [l, u] = v(c[0]), { diffs: d = void 0 } = e || {};
|
|
9801
9782
|
if (!d) return null;
|
|
9802
|
-
let { oldJson: f, newJson: p, error: m } =
|
|
9783
|
+
let { oldJson: f, newJson: p, error: m } = Wm(e, t, n);
|
|
9803
9784
|
return /* @__PURE__ */ S(Ns, {
|
|
9804
9785
|
visible: r,
|
|
9805
9786
|
centered: !0,
|
|
@@ -9807,20 +9788,20 @@ var Im = (e = {}) => Fm({
|
|
|
9807
9788
|
children: /* @__PURE__ */ S(ds, { dialog: {
|
|
9808
9789
|
scroll: !0,
|
|
9809
9790
|
heading: "Comparison view",
|
|
9810
|
-
content: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(
|
|
9791
|
+
content: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(Zf, {
|
|
9811
9792
|
name: "ViewTab",
|
|
9812
9793
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
9813
9794
|
options: c,
|
|
9814
9795
|
value: l
|
|
9815
|
-
}), l.value === "summary" ? /* @__PURE__ */ S(
|
|
9796
|
+
}), l.value === "summary" ? /* @__PURE__ */ S(Zm, {
|
|
9816
9797
|
userName: e.userName,
|
|
9817
9798
|
sectionNames: a,
|
|
9818
|
-
diffs:
|
|
9799
|
+
diffs: Km(d, i),
|
|
9819
9800
|
defaultSectionName: o
|
|
9820
9801
|
}) : m ? /* @__PURE__ */ S("div", {
|
|
9821
9802
|
style: { padding: 16 },
|
|
9822
9803
|
children: m
|
|
9823
|
-
}) : /* @__PURE__ */ S(
|
|
9804
|
+
}) : /* @__PURE__ */ S(Hp, {
|
|
9824
9805
|
oldJson: f,
|
|
9825
9806
|
newJson: p
|
|
9826
9807
|
})] }),
|
|
@@ -9833,7 +9814,7 @@ var Im = (e = {}) => Fm({
|
|
|
9833
9814
|
height: "90vh"
|
|
9834
9815
|
} })
|
|
9835
9816
|
});
|
|
9836
|
-
},
|
|
9817
|
+
}, eh = [
|
|
9837
9818
|
{
|
|
9838
9819
|
label: "10 / page",
|
|
9839
9820
|
value: 10
|
|
@@ -9846,8 +9827,8 @@ var Im = (e = {}) => Fm({
|
|
|
9846
9827
|
label: "50 / page",
|
|
9847
9828
|
value: 50
|
|
9848
9829
|
}
|
|
9849
|
-
],
|
|
9850
|
-
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s =
|
|
9830
|
+
], th = (e, t = {}) => {
|
|
9831
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = Km(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
9851
9832
|
if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
|
|
9852
9833
|
switch (a) {
|
|
9853
9834
|
case "Created": return `Created by ${r}`;
|
|
@@ -9857,7 +9838,7 @@ var Im = (e = {}) => Fm({
|
|
|
9857
9838
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
9858
9839
|
default: return `Change by ${r}`;
|
|
9859
9840
|
}
|
|
9860
|
-
},
|
|
9841
|
+
}, nh = ({ 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 }) => {
|
|
9861
9842
|
let [g, _] = v(!1), [y, b] = v(null), w = (e) => {
|
|
9862
9843
|
if (e.snapshot) {
|
|
9863
9844
|
f == null || f(e.snapshot, e);
|
|
@@ -9876,7 +9857,7 @@ var Im = (e = {}) => Fm({
|
|
|
9876
9857
|
return {
|
|
9877
9858
|
cells: [
|
|
9878
9859
|
{
|
|
9879
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
9860
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : th(e, l),
|
|
9880
9861
|
type: "Link",
|
|
9881
9862
|
disabled: n,
|
|
9882
9863
|
onClick: n ? void 0 : () => w(e),
|
|
@@ -9895,8 +9876,8 @@ var Im = (e = {}) => Fm({
|
|
|
9895
9876
|
type: "Static"
|
|
9896
9877
|
},
|
|
9897
9878
|
{
|
|
9898
|
-
value:
|
|
9899
|
-
date:
|
|
9879
|
+
value: Up({
|
|
9880
|
+
date: Um(e),
|
|
9900
9881
|
showTime: !0
|
|
9901
9882
|
}),
|
|
9902
9883
|
type: "Static"
|
|
@@ -9906,12 +9887,12 @@ var Im = (e = {}) => Fm({
|
|
|
9906
9887
|
};
|
|
9907
9888
|
});
|
|
9908
9889
|
return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(Oo, {
|
|
9909
|
-
heading: /* @__PURE__ */ C(
|
|
9890
|
+
heading: /* @__PURE__ */ C(xd, {
|
|
9910
9891
|
gap: !0,
|
|
9911
9892
|
wrap: !0,
|
|
9912
9893
|
children: [/* @__PURE__ */ S(cs, { children: "Changes" }), c.map((e) => {
|
|
9913
9894
|
var t;
|
|
9914
|
-
return /* @__PURE__ */ S(
|
|
9895
|
+
return /* @__PURE__ */ S($u, {
|
|
9915
9896
|
small: (t = e.small) == null || t,
|
|
9916
9897
|
checked: e.checked,
|
|
9917
9898
|
onChange: e.onChange,
|
|
@@ -9921,11 +9902,11 @@ var Im = (e = {}) => Fm({
|
|
|
9921
9902
|
})]
|
|
9922
9903
|
}),
|
|
9923
9904
|
padding: !1,
|
|
9924
|
-
children: r ? /* @__PURE__ */ S(
|
|
9905
|
+
children: r ? /* @__PURE__ */ S(Rd, {
|
|
9925
9906
|
height: "100px",
|
|
9926
9907
|
theme: Fi.WHITE,
|
|
9927
9908
|
children: /* @__PURE__ */ S(Da, { dark: !0 })
|
|
9928
|
-
}) : /* @__PURE__ */ S(
|
|
9909
|
+
}) : /* @__PURE__ */ S(ru, { table: {
|
|
9929
9910
|
headers: T,
|
|
9930
9911
|
testId: "auditlog-table",
|
|
9931
9912
|
rows: E,
|
|
@@ -9939,14 +9920,14 @@ var Im = (e = {}) => Fm({
|
|
|
9939
9920
|
onChange: (e) => {
|
|
9940
9921
|
u(Number(e.target.value));
|
|
9941
9922
|
},
|
|
9942
|
-
options:
|
|
9923
|
+
options: eh,
|
|
9943
9924
|
value: a
|
|
9944
9925
|
},
|
|
9945
9926
|
onSelectPage: (e) => d(e),
|
|
9946
9927
|
small: !0
|
|
9947
9928
|
} }
|
|
9948
9929
|
} })
|
|
9949
|
-
}), g && y && y.diffs && /* @__PURE__ */ S(
|
|
9930
|
+
}), g && y && y.diffs && /* @__PURE__ */ S($m, {
|
|
9950
9931
|
sectionNames: o,
|
|
9951
9932
|
isOpen: g,
|
|
9952
9933
|
onClose: () => _(!1),
|
|
@@ -9956,7 +9937,7 @@ var Im = (e = {}) => Fm({
|
|
|
9956
9937
|
data: t,
|
|
9957
9938
|
transformDiffsConfig: l
|
|
9958
9939
|
})] });
|
|
9959
|
-
},
|
|
9940
|
+
}, rh = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
9960
9941
|
let i = window.location.href, a = _(i);
|
|
9961
9942
|
return d(() => {
|
|
9962
9943
|
a.current = i;
|
|
@@ -9979,20 +9960,20 @@ var Im = (e = {}) => Fm({
|
|
|
9979
9960
|
});
|
|
9980
9961
|
};
|
|
9981
9962
|
}, [e, t]), null;
|
|
9982
|
-
},
|
|
9963
|
+
}, ih = {
|
|
9983
9964
|
errorBoundary: "_errorBoundary_hmco0_1",
|
|
9984
9965
|
sidebarErrorBoundary: "_sidebarErrorBoundary_hmco0_5",
|
|
9985
9966
|
rightSidebarErrorBoundary: "_rightSidebarErrorBoundary_hmco0_6"
|
|
9986
|
-
},
|
|
9987
|
-
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } =
|
|
9967
|
+
}, ah = ({ options: e }) => {
|
|
9968
|
+
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } = jp();
|
|
9988
9969
|
if (t) return /* @__PURE__ */ S(t, {});
|
|
9989
9970
|
if (n || r) return /* @__PURE__ */ S("div", {
|
|
9990
|
-
className: b(n ?
|
|
9971
|
+
className: b(n ? ih.sidebarErrorBoundary : "", r ? ih.rightSidebarErrorBoundary : ""),
|
|
9991
9972
|
style: a,
|
|
9992
9973
|
children: o == null ? void 0 : o.unexpectedError
|
|
9993
9974
|
});
|
|
9994
9975
|
let s = /* @__PURE__ */ S("div", {
|
|
9995
|
-
className:
|
|
9976
|
+
className: ih.errorBoundary,
|
|
9996
9977
|
style: a,
|
|
9997
9978
|
children: /* @__PURE__ */ S($s, { message: {
|
|
9998
9979
|
icon: !0,
|
|
@@ -10002,24 +9983,24 @@ var Im = (e = {}) => Fm({
|
|
|
10002
9983
|
width: "100%"
|
|
10003
9984
|
} })
|
|
10004
9985
|
});
|
|
10005
|
-
return i ? /* @__PURE__ */ S(
|
|
9986
|
+
return i ? /* @__PURE__ */ S(qd, {
|
|
10006
9987
|
scroll: !1,
|
|
10007
9988
|
padding: 0,
|
|
10008
9989
|
children: s
|
|
10009
9990
|
}) : s;
|
|
10010
|
-
},
|
|
10011
|
-
fallback: /* @__PURE__ */ S(
|
|
9991
|
+
}, oh = ({ children: e, options: t }) => /* @__PURE__ */ S(ki.ErrorBoundary, {
|
|
9992
|
+
fallback: /* @__PURE__ */ S(ah, { options: t }),
|
|
10012
9993
|
onError: (e, t) => {
|
|
10013
9994
|
console.error("Error caught by boundary:", e, t);
|
|
10014
9995
|
},
|
|
10015
9996
|
children: e
|
|
10016
|
-
}),
|
|
9997
|
+
}), sh = (e, t = {}) => (n) => /* @__PURE__ */ S(oh, {
|
|
10017
9998
|
options: t,
|
|
10018
9999
|
children: /* @__PURE__ */ S(e, { ...n })
|
|
10019
|
-
}),
|
|
10020
|
-
|
|
10021
|
-
e ===
|
|
10000
|
+
}), ch = (e = {}) => (t) => sh(t, e), lh = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, uh = (e) => {
|
|
10001
|
+
Mp(Dp.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
10002
|
+
e === Dp.Translations ? Mp(e, kp(t)) : Mp(e, lh(t) ? t : { ...t });
|
|
10022
10003
|
});
|
|
10023
10004
|
};
|
|
10024
10005
|
//#endregion
|
|
10025
|
-
export { ta as Accordion, wa as AccordionWithDefaultToggle, bo as Actions, Mi as Align,
|
|
10006
|
+
export { ta as Accordion, wa as AccordionWithDefaultToggle, bo as Actions, Mi as Align, nh as AuditLog, uo as Badge, wo as Breadcrumb, So as BreadcrumbLinkType, K as Button, Eo as ButtonGroup, Ni as ButtonPosition, Oa as ButtonType, Oo as Card, ba as CheckBox, Yi as Chevron, Qi as Collapse, ji as Color, Yo as ColorInput, Jo as ColorInputPopover, es as Column, ds as Dialog, Hp as DiffViewer, W as DisabledContext, as as Divider, vs as Drawer, ip as ElementType, mu as Empty, oh as ErrorBoundary, Li as EventKey, bd as Field, gd as FileButton, Os as FileInput, xd as Flex, Cd as FormRow, Po as Grid, H as GroupOrder, cs as Heading, ya as HelpIcon, G as Icon, U as IconType, Cs as Input, xs as InputGroup, ll as InputGroupAddon, Ts as InputReaderMethods, Ii as InputType, vd as Label, Id as List, Td as ListHeading, jd as ListSubheading, Rd as Loader, hf as Mention, vo as Menu, eo as MenuCarat, $a as MenuType, $s as Message, qs as MessageType, Ns as Modal, ac as NativeSelect, Sl as NumberInput, Gd as OptionDropdown, qd as Page, ul as Pagination, up as PopConfirm, Ao as Popover, Jd as Portal, Xd as PrintHeader, Is as ProgressBar, Zd as RadioButton, mf as RichTextInput, _f as Row, rl as Select, Rp as SettingField, Sf as SideBar, wf as Skeleton, Ml as Slider, Vs as SmartUploadModal, ks as Spacer, Da as Spinner, ru as Table, hd as TableImportExport, Zf as Tabs, rs as Text, ep as TextArea, Qf as TextLink, Pi as TextTransform, Fi as Theme, ci as Toaster, $u as Toggle, ga as Tooltip, sp as TopBar, mp as Tree, Ep as TreeTable, Ai as TriggerType, Wf as UnitInput, Jf as UnitSlider, Ip as UnitTable, rh as UsageTracker, Xu as dismissToast, Vf as initializeContext, uh as initializeGuiLibrary, Es as readFile, Yu as toast, lc as useFocus, As as useKeyboardEvent, fc as useWindowWidth, ch as withChainableErrorBoundary, sh as withErrorBoundary };
|