@oliasoft-open-source/react-ui-library 10.4.0 → 10.5.0-beta-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/global.css +1 -1
- package/dist/index.d.ts +21 -0
- package/dist/index.js +440 -371
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6881,6 +6881,75 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6881
6881
|
children: m
|
|
6882
6882
|
});
|
|
6883
6883
|
}, Sf = {
|
|
6884
|
+
root: "_root_al93t_7",
|
|
6885
|
+
isResizing: "_isResizing_al93t_11",
|
|
6886
|
+
content: "_content_al93t_14",
|
|
6887
|
+
handle: "_handle_al93t_20",
|
|
6888
|
+
axisX: "_axisX_al93t_39",
|
|
6889
|
+
start: "_start_al93t_45",
|
|
6890
|
+
end: "_end_al93t_48",
|
|
6891
|
+
axisY: "_axisY_al93t_51"
|
|
6892
|
+
}, Cf = {
|
|
6893
|
+
x: {
|
|
6894
|
+
start: "w",
|
|
6895
|
+
end: "e"
|
|
6896
|
+
},
|
|
6897
|
+
y: {
|
|
6898
|
+
start: "n",
|
|
6899
|
+
end: "s"
|
|
6900
|
+
}
|
|
6901
|
+
}, wf = o((e, t) => {
|
|
6902
|
+
let { handleAxis: n, ...r } = e;
|
|
6903
|
+
return /* @__PURE__ */ S("div", {
|
|
6904
|
+
ref: t,
|
|
6905
|
+
className: Sf.handle,
|
|
6906
|
+
...r,
|
|
6907
|
+
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
6908
|
+
});
|
|
6909
|
+
}), Tf = Un, Ef = ({ children: e, axis: t, size: n, onResize: r, minSize: i = 0, maxSize: a = Infinity, handlePosition: o, className: s }) => {
|
|
6910
|
+
let c = _(null), [l, u] = v(!1), [f, p] = v(Infinity), m = o == null ? t === "y" ? "start" : "end" : o, h = t === "x", g = Cf[t][m], y = Math.min(a, f);
|
|
6911
|
+
d(() => {
|
|
6912
|
+
var e;
|
|
6913
|
+
let t = (e = c.current) == null ? void 0 : e.parentElement;
|
|
6914
|
+
if (!t) return;
|
|
6915
|
+
let n = () => {
|
|
6916
|
+
p(h ? t.clientWidth : t.clientHeight);
|
|
6917
|
+
};
|
|
6918
|
+
n();
|
|
6919
|
+
let r = new ResizeObserver(n);
|
|
6920
|
+
return r.observe(t), () => r.disconnect();
|
|
6921
|
+
}, [h]);
|
|
6922
|
+
let x = (e, t) => {
|
|
6923
|
+
r(h ? t.size.width : t.size.height);
|
|
6924
|
+
}, C = h ? {
|
|
6925
|
+
width: n,
|
|
6926
|
+
height: "100%"
|
|
6927
|
+
} : {
|
|
6928
|
+
height: n,
|
|
6929
|
+
width: "100%"
|
|
6930
|
+
};
|
|
6931
|
+
return /* @__PURE__ */ S(Tf, {
|
|
6932
|
+
width: h ? n : 100,
|
|
6933
|
+
height: h ? 100 : n,
|
|
6934
|
+
minConstraints: h ? [i, 0] : [0, i],
|
|
6935
|
+
maxConstraints: h ? [y, Infinity] : [Infinity, y],
|
|
6936
|
+
onResize: x,
|
|
6937
|
+
handle: /* @__PURE__ */ S(wf, {}),
|
|
6938
|
+
resizeHandles: [g],
|
|
6939
|
+
axis: t,
|
|
6940
|
+
onResizeStart: () => u(!0),
|
|
6941
|
+
onResizeStop: () => u(!1),
|
|
6942
|
+
children: /* @__PURE__ */ S("div", {
|
|
6943
|
+
ref: c,
|
|
6944
|
+
className: b(Sf.root, h ? Sf.axisX : Sf.axisY, Sf[m], l && Sf.isResizing),
|
|
6945
|
+
style: C,
|
|
6946
|
+
children: /* @__PURE__ */ S("div", {
|
|
6947
|
+
className: b(Sf.content, s),
|
|
6948
|
+
children: e
|
|
6949
|
+
})
|
|
6950
|
+
})
|
|
6951
|
+
});
|
|
6952
|
+
}, Df = {
|
|
6884
6953
|
inputInTable: "_inputInTable_t1w93_1",
|
|
6885
6954
|
inputHover: "_inputHover_t1w93_13",
|
|
6886
6955
|
inputFocus: "_inputFocus_t1w93_18",
|
|
@@ -6900,7 +6969,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6900
6969
|
experimental: "_experimental_t1w93_159",
|
|
6901
6970
|
active: "_active_t1w93_163",
|
|
6902
6971
|
icon: "_icon_t1w93_167"
|
|
6903
|
-
},
|
|
6972
|
+
}, Of = c(({ isOpen: e, label: t, icon: n, invalid: r }) => /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(K, {
|
|
6904
6973
|
text: t,
|
|
6905
6974
|
enabled: !e,
|
|
6906
6975
|
placement: "right-center",
|
|
@@ -6909,7 +6978,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6909
6978
|
padding: "var(--padding-sm)",
|
|
6910
6979
|
display: "block",
|
|
6911
6980
|
children: /* @__PURE__ */ S("span", {
|
|
6912
|
-
className:
|
|
6981
|
+
className: Df.icon,
|
|
6913
6982
|
children: /* @__PURE__ */ S(Qa, {
|
|
6914
6983
|
small: !0,
|
|
6915
6984
|
title: r ? "!" : void 0,
|
|
@@ -6918,18 +6987,18 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6918
6987
|
})
|
|
6919
6988
|
})
|
|
6920
6989
|
}), /* @__PURE__ */ S("span", {
|
|
6921
|
-
className:
|
|
6990
|
+
className: Df.label,
|
|
6922
6991
|
children: t
|
|
6923
|
-
})] }), (e, t) => Dr(e, t)),
|
|
6924
|
-
className:
|
|
6992
|
+
})] }), (e, t) => Dr(e, t)), kf = ({ isOpen: e, items: t, sectionIndex: n, onClick: r, testId: i }) => /* @__PURE__ */ S("div", {
|
|
6993
|
+
className: Df.list,
|
|
6925
6994
|
children: t.map((t, a) => {
|
|
6926
6995
|
let o = `${n}_${a}`;
|
|
6927
6996
|
return /* @__PURE__ */ S("a", {
|
|
6928
6997
|
href: t.value,
|
|
6929
|
-
className: b(
|
|
6998
|
+
className: b(Df.item, t.isActive ? Df.active : "", t.isExperimental ? Df.experimental : ""),
|
|
6930
6999
|
onClick: (e) => r(e, t.value, t.label, t.onClick),
|
|
6931
7000
|
"data-testid": i,
|
|
6932
|
-
children: /* @__PURE__ */ S(
|
|
7001
|
+
children: /* @__PURE__ */ S(Of, {
|
|
6933
7002
|
label: t.label,
|
|
6934
7003
|
icon: t.icon,
|
|
6935
7004
|
invalid: t.invalid,
|
|
@@ -6937,16 +7006,16 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6937
7006
|
}, o)
|
|
6938
7007
|
}, o);
|
|
6939
7008
|
})
|
|
6940
|
-
}),
|
|
6941
|
-
className:
|
|
7009
|
+
}), Af = ({ isOpen: t, sections: n, onClick: r }) => /* @__PURE__ */ S(x, { children: n.map((n, i) => /* @__PURE__ */ C(e.Fragment, { children: [/* @__PURE__ */ S("h5", {
|
|
7010
|
+
className: Df.subtitle,
|
|
6942
7011
|
children: n.heading.toUpperCase()
|
|
6943
|
-
}), /* @__PURE__ */ S(
|
|
7012
|
+
}), /* @__PURE__ */ S(kf, {
|
|
6944
7013
|
isOpen: t,
|
|
6945
7014
|
items: n.items,
|
|
6946
7015
|
sectionIndex: i,
|
|
6947
7016
|
onClick: r,
|
|
6948
7017
|
testId: n.testId
|
|
6949
|
-
})] }, i)) }),
|
|
7018
|
+
})] }, i)) }), jf = c(({ options: e, startOpen: t = !1, onShiftClickToggleOpen: n = () => {}, top: r, testId: i }) => {
|
|
6950
7019
|
let [a, o] = v(t), s = (e, t, n, r) => {
|
|
6951
7020
|
e.preventDefault(), typeof r == "function" && (e.currentTarget.value = t, e.currentTarget.label = n, r(e)), o(!1);
|
|
6952
7021
|
}, c = e.sections.length > 0;
|
|
@@ -6969,13 +7038,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6969
7038
|
testId: i ? `${i}-toggle` : void 0
|
|
6970
7039
|
}),
|
|
6971
7040
|
children: /* @__PURE__ */ S("div", {
|
|
6972
|
-
className: b(
|
|
7041
|
+
className: b(Df.sidebar, a ? "" : Df.collapsed),
|
|
6973
7042
|
children: c && /* @__PURE__ */ C("div", {
|
|
6974
|
-
className:
|
|
7043
|
+
className: Df.inner,
|
|
6975
7044
|
children: [/* @__PURE__ */ S("h4", {
|
|
6976
|
-
className:
|
|
7045
|
+
className: Df.title,
|
|
6977
7046
|
children: e.title
|
|
6978
|
-
}), /* @__PURE__ */ S(
|
|
7047
|
+
}), /* @__PURE__ */ S(Af, {
|
|
6979
7048
|
isOpen: a,
|
|
6980
7049
|
sections: e.sections,
|
|
6981
7050
|
onClick: s
|
|
@@ -6983,18 +7052,18 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
6983
7052
|
})
|
|
6984
7053
|
})
|
|
6985
7054
|
});
|
|
6986
|
-
}, (e, t) => Dr(e, t)),
|
|
7055
|
+
}, (e, t) => Dr(e, t)), Mf = {
|
|
6987
7056
|
skeletonContainer: "_skeletonContainer_mcfxp_9",
|
|
6988
7057
|
skeleton: "_skeleton_mcfxp_9"
|
|
6989
|
-
},
|
|
7058
|
+
}, Nf = ({ count: e, width: t, height: n }) => /* @__PURE__ */ S(_i, {
|
|
6990
7059
|
baseColor: "var(--color-skeleton-base)",
|
|
6991
7060
|
highlightColor: "var(--color-skeleton-highlight)",
|
|
6992
|
-
containerClassName:
|
|
6993
|
-
className:
|
|
7061
|
+
containerClassName: Mf.skeletonContainer,
|
|
7062
|
+
className: Mf.skeleton,
|
|
6994
7063
|
count: e,
|
|
6995
7064
|
width: t,
|
|
6996
7065
|
height: n
|
|
6997
|
-
}),
|
|
7066
|
+
}), Pf = {
|
|
6998
7067
|
wrapper: "_wrapper_j8x9r_1",
|
|
6999
7068
|
label: "_label_j8x9r_5",
|
|
7000
7069
|
input: "_input_j8x9r_9",
|
|
@@ -7002,38 +7071,38 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7002
7071
|
editable: "_editable_j8x9r_22",
|
|
7003
7072
|
inputControl: "_inputControl_j8x9r_25",
|
|
7004
7073
|
actions: "_actions_j8x9r_28"
|
|
7005
|
-
},
|
|
7074
|
+
}, Ff = () => {
|
|
7006
7075
|
let e = _(null);
|
|
7007
7076
|
return m(() => {
|
|
7008
7077
|
e.current && (e.current(), e.current = null);
|
|
7009
7078
|
}), (t) => {
|
|
7010
7079
|
e.current = t;
|
|
7011
7080
|
};
|
|
7012
|
-
},
|
|
7081
|
+
}, If = (e) => {
|
|
7013
7082
|
let t = _(void 0);
|
|
7014
7083
|
return d(() => {
|
|
7015
7084
|
t.current = e;
|
|
7016
7085
|
}, [e]), t.current;
|
|
7017
|
-
},
|
|
7086
|
+
}, Lf = (e, t) => {
|
|
7018
7087
|
let n = t == null ? void 0 : t[e];
|
|
7019
7088
|
if (!n) {
|
|
7020
7089
|
var r;
|
|
7021
7090
|
return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = pr(e)) == null ? "" : r;
|
|
7022
7091
|
}
|
|
7023
7092
|
return n;
|
|
7024
|
-
},
|
|
7093
|
+
}, Rf = /* @__PURE__ */ function(e) {
|
|
7025
7094
|
return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
|
|
7026
|
-
}({}),
|
|
7095
|
+
}({}), zf = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), Bf = (e) => {
|
|
7027
7096
|
if (!e) return !1;
|
|
7028
7097
|
let t = Zn(e);
|
|
7029
7098
|
return !Gn.includes(t);
|
|
7030
|
-
},
|
|
7099
|
+
}, Vf = ({ value: e, unitkey: t, toUnit: n }) => {
|
|
7031
7100
|
var r;
|
|
7032
7101
|
let i = Wn[t];
|
|
7033
7102
|
if (!i || i.length === 0 || !((r = mr(e)) != null && r.valid) || !i.includes(n)) return !1;
|
|
7034
7103
|
let a = Zn(String(e));
|
|
7035
7104
|
return !(a && !i.includes(a));
|
|
7036
|
-
},
|
|
7105
|
+
}, Hf = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
|
|
7037
7106
|
var o;
|
|
7038
7107
|
let s = rr(e) ? $n(e) : e, c = [Infinity, -Infinity].includes(Number(s));
|
|
7039
7108
|
if (i || c) return {
|
|
@@ -7053,13 +7122,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7053
7122
|
value: void 0,
|
|
7054
7123
|
error: "Source unit is missing"
|
|
7055
7124
|
};
|
|
7056
|
-
if (
|
|
7125
|
+
if (zf(s)) return {
|
|
7057
7126
|
value: void 0,
|
|
7058
7127
|
error: "Value is invalid for conversion"
|
|
7059
7128
|
};
|
|
7060
7129
|
try {
|
|
7061
7130
|
let e = gr(s, l);
|
|
7062
|
-
if (
|
|
7131
|
+
if (Vf({
|
|
7063
7132
|
value: e,
|
|
7064
7133
|
toUnit: n,
|
|
7065
7134
|
unitkey: t
|
|
@@ -7080,13 +7149,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7080
7149
|
error: "Conversion not possible"
|
|
7081
7150
|
};
|
|
7082
7151
|
}
|
|
7083
|
-
},
|
|
7084
|
-
let a = $n(e), o =
|
|
7085
|
-
return !
|
|
7152
|
+
}, Uf = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
|
|
7153
|
+
let a = $n(e), o = zf(a);
|
|
7154
|
+
return !Vf({
|
|
7086
7155
|
value: e,
|
|
7087
7156
|
unitkey: n,
|
|
7088
7157
|
toUnit: t
|
|
7089
|
-
}) ||
|
|
7158
|
+
}) || Bf(e) || o ? { value: a } : rr(e) ? Hf({
|
|
7090
7159
|
value: e,
|
|
7091
7160
|
unitkey: n,
|
|
7092
7161
|
toUnit: t,
|
|
@@ -7094,25 +7163,25 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7094
7163
|
doNotConvertValue: i,
|
|
7095
7164
|
exactPrecision: !0
|
|
7096
7165
|
}) : { value: e };
|
|
7097
|
-
},
|
|
7166
|
+
}, Wf = (e) => gn(e) && !cn(e) && !pn(e) ? sn(e, "fieldName", "") : typeof e == "string" ? e : "", Gf = (e = "") => Gn == null ? void 0 : Gn.includes(e), Kf = (e, t) => {
|
|
7098
7167
|
let n = Zn(e || "");
|
|
7099
|
-
return
|
|
7100
|
-
},
|
|
7101
|
-
|
|
7102
|
-
},
|
|
7168
|
+
return Gf(t) && Gf(n);
|
|
7169
|
+
}, qf = i(null), Jf = () => u(qf), Yf = !1, Xf = (e) => {
|
|
7170
|
+
Yf || (Yf = !0, qf = e);
|
|
7171
|
+
}, Zf = (e) => tr(e) ? e : ar(e), Qf = {
|
|
7103
7172
|
predefinedMenuActive: "_predefinedMenuActive_ye9w9_1",
|
|
7104
7173
|
inputWrapper: "_inputWrapper_ye9w9_4"
|
|
7105
|
-
},
|
|
7174
|
+
}, $f = ({ 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 = bn, onClick: m = bn, onFocus: g = bn, onSwitchUnit: _ = bn, unitTemplate: y, testId: w, warning: T = null, predefinedOptions: E, initialPredefinedOption: D = !1, shouldLinkAutomaticly: O = !0, selectedPredefinedOptionKey: k, validationCallback: A = () => ({
|
|
7106
7175
|
name: "",
|
|
7107
7176
|
error: null
|
|
7108
7177
|
}), 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 }) => {
|
|
7109
|
-
let B =
|
|
7178
|
+
let B = Jf(), ee = Ff();
|
|
7110
7179
|
typeof c == "number" && (c = `${c}`);
|
|
7111
|
-
let [te = "", ne = ""] = c === void 0 ? [] : lr(c), V = h(() =>
|
|
7180
|
+
let [te = "", ne = ""] = c === void 0 ? [] : lr(c), V = h(() => Lf(l, y || (B == null ? void 0 : B.unitTemplate)), [
|
|
7112
7181
|
l,
|
|
7113
7182
|
y,
|
|
7114
7183
|
B == null ? void 0 : B.unitTemplate
|
|
7115
|
-
]), re =
|
|
7184
|
+
]), re = Kf(c, V), ie = u || V || ne, ae = If(ie), { value: oe } = Uf({
|
|
7116
7185
|
value: c,
|
|
7117
7186
|
toUnit: ie,
|
|
7118
7187
|
unitkey: l,
|
|
@@ -7124,10 +7193,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7124
7193
|
} : {
|
|
7125
7194
|
value: oe,
|
|
7126
7195
|
unit: ie
|
|
7127
|
-
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = v(D ?
|
|
7196
|
+
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = v(D ? Rf.PREDEFINED : Rf.CUSTOM), fe = !!(j || n), pe = E && E.find((e) => {
|
|
7128
7197
|
if (!(e != null && e.value)) return;
|
|
7129
7198
|
if (k) return k === e.valueKey;
|
|
7130
|
-
let t = rr(e.value) ? Zn(e.value) : "", { value: n = c } =
|
|
7199
|
+
let t = rr(e.value) ? Zn(e.value) : "", { value: n = c } = Hf({
|
|
7131
7200
|
value: String(c),
|
|
7132
7201
|
unitkey: l,
|
|
7133
7202
|
toUnit: t
|
|
@@ -7136,7 +7205,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7136
7205
|
}), me = () => {
|
|
7137
7206
|
var e;
|
|
7138
7207
|
let t = (e = c) == null ? "" : e, n = se.unit;
|
|
7139
|
-
if (!
|
|
7208
|
+
if (!Vf({
|
|
7140
7209
|
value: t,
|
|
7141
7210
|
unitkey: l,
|
|
7142
7211
|
toUnit: n
|
|
@@ -7151,7 +7220,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7151
7220
|
return null;
|
|
7152
7221
|
}
|
|
7153
7222
|
}, he = (t) => {
|
|
7154
|
-
let n =
|
|
7223
|
+
let n = Wf(e), r = t.target, { value: i, selectionStart: a } = r, o = gr(i, (se == null ? void 0 : se.unit) || "");
|
|
7155
7224
|
p({ target: {
|
|
7156
7225
|
value: N ? gr(Jn(o, ne), ne) : o,
|
|
7157
7226
|
name: n
|
|
@@ -7173,7 +7242,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7173
7242
|
let e, t = "";
|
|
7174
7243
|
if (ie) {
|
|
7175
7244
|
if (ae !== ie) {
|
|
7176
|
-
let { value: n } =
|
|
7245
|
+
let { value: n } = Uf({
|
|
7177
7246
|
value: c,
|
|
7178
7247
|
toUnit: ie,
|
|
7179
7248
|
unitkey: l,
|
|
@@ -7182,7 +7251,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7182
7251
|
});
|
|
7183
7252
|
e = n, t = ie;
|
|
7184
7253
|
} else if (gr(se.value, se.unit) !== c) {
|
|
7185
|
-
let { value: n } =
|
|
7254
|
+
let { value: n } = Uf({
|
|
7186
7255
|
value: c,
|
|
7187
7256
|
toUnit: se.unit,
|
|
7188
7257
|
unitkey: l,
|
|
@@ -7195,21 +7264,21 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7195
7264
|
e !== void 0 && ce({
|
|
7196
7265
|
value: e,
|
|
7197
7266
|
unit: t
|
|
7198
|
-
}), de(E && pe && O ?
|
|
7267
|
+
}), de(E && pe && O ? Rf.PREDEFINED : Rf.CUSTOM);
|
|
7199
7268
|
}, [
|
|
7200
7269
|
ie,
|
|
7201
7270
|
c,
|
|
7202
7271
|
i,
|
|
7203
7272
|
O
|
|
7204
7273
|
]);
|
|
7205
|
-
let _e = me(), ve = ir(se.unit) || se.unit || "", ye = f || !_e || _e && _e.length === 1, be =
|
|
7274
|
+
let _e = me(), ve = ir(se.unit) || se.unit || "", ye = f || !_e || _e && _e.length === 1, be = Wf(e), xe, Se = (t) => {
|
|
7206
7275
|
let r = t != null && t.value ? t.value : "", [i = "", a = ""] = rr(r) ? lr(r) : [r], o = hr(r);
|
|
7207
|
-
if (
|
|
7276
|
+
if (Vf({
|
|
7208
7277
|
value: r,
|
|
7209
7278
|
unitkey: l,
|
|
7210
7279
|
toUnit: a
|
|
7211
7280
|
})) {
|
|
7212
|
-
let { value: e = "" } =
|
|
7281
|
+
let { value: e = "" } = Uf({
|
|
7213
7282
|
value: r,
|
|
7214
7283
|
toUnit: V,
|
|
7215
7284
|
unitkey: l,
|
|
@@ -7222,7 +7291,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7222
7291
|
type: Va.OPTION,
|
|
7223
7292
|
inline: !0,
|
|
7224
7293
|
onClick: () => {
|
|
7225
|
-
mr(i).valid && !n && (de(
|
|
7294
|
+
mr(i).valid && !n && (de(Rf.PREDEFINED), p({ target: {
|
|
7226
7295
|
value: r,
|
|
7227
7296
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || "",
|
|
7228
7297
|
predefinedSelected: !0,
|
|
@@ -7234,27 +7303,27 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7234
7303
|
height: "0"
|
|
7235
7304
|
})] }),
|
|
7236
7305
|
description: o,
|
|
7237
|
-
selected: pe === t && ue ===
|
|
7306
|
+
selected: pe === t && ue === Rf.PREDEFINED
|
|
7238
7307
|
};
|
|
7239
7308
|
};
|
|
7240
7309
|
if (xe = [{
|
|
7241
7310
|
type: Va.OPTION,
|
|
7242
7311
|
inline: !0,
|
|
7243
7312
|
onClick: () => {
|
|
7244
|
-
ue !==
|
|
7313
|
+
ue !== Rf.CUSTOM && !n && p({ target: {
|
|
7245
7314
|
value: gr(se.value, se.unit),
|
|
7246
7315
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || ""
|
|
7247
7316
|
} });
|
|
7248
7317
|
},
|
|
7249
7318
|
label: "Custom",
|
|
7250
|
-
selected: ue ===
|
|
7319
|
+
selected: ue === Rf.CUSTOM
|
|
7251
7320
|
}], E != null && E.length) {
|
|
7252
7321
|
let e = E.map(Se);
|
|
7253
7322
|
xe = [...xe, ...e];
|
|
7254
7323
|
}
|
|
7255
7324
|
let Ce = (e) => {
|
|
7256
7325
|
if (rr(e)) {
|
|
7257
|
-
let t = Zn(e), { value: n } =
|
|
7326
|
+
let t = Zn(e), { value: n } = Uf({
|
|
7258
7327
|
value: e,
|
|
7259
7328
|
toUnit: se.unit,
|
|
7260
7329
|
unitkey: l,
|
|
@@ -7266,7 +7335,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7266
7335
|
return e;
|
|
7267
7336
|
}, we = !E && (!R || R === H.FIRST) ? H.FIRST : H.MIDDLE, Te = !R || R === H.LAST ? H.LAST : H.MIDDLE;
|
|
7268
7337
|
return /* @__PURE__ */ S("div", {
|
|
7269
|
-
className: ue ===
|
|
7338
|
+
className: ue === Rf.PREDEFINED ? b(Qf.predefinedMenuActive) : "",
|
|
7270
7339
|
children: /* @__PURE__ */ C(ls, {
|
|
7271
7340
|
small: o,
|
|
7272
7341
|
width: s,
|
|
@@ -7281,17 +7350,17 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7281
7350
|
trigger: "Component",
|
|
7282
7351
|
component: /* @__PURE__ */ S(q, {
|
|
7283
7352
|
groupOrder: "first",
|
|
7284
|
-
active: ue ===
|
|
7285
|
-
icon: ue ===
|
|
7353
|
+
active: ue === Rf.PREDEFINED,
|
|
7354
|
+
icon: ue === Rf.PREDEFINED ? "link" : "unlink",
|
|
7286
7355
|
small: o
|
|
7287
7356
|
}),
|
|
7288
7357
|
small: o,
|
|
7289
7358
|
sections: xe
|
|
7290
7359
|
},
|
|
7291
|
-
tooltip: ue ===
|
|
7360
|
+
tooltip: ue === Rf.PREDEFINED ? pe == null ? void 0 : pe.label : ""
|
|
7292
7361
|
}),
|
|
7293
7362
|
/* @__PURE__ */ S("div", {
|
|
7294
|
-
className:
|
|
7363
|
+
className: Qf.inputWrapper,
|
|
7295
7364
|
children: /* @__PURE__ */ S(vl, {
|
|
7296
7365
|
name: be,
|
|
7297
7366
|
testId: w,
|
|
@@ -7333,7 +7402,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7333
7402
|
let r = n || t || "", i = nr(e) ? e : "";
|
|
7334
7403
|
return {
|
|
7335
7404
|
type: "Option",
|
|
7336
|
-
label: P ?
|
|
7405
|
+
label: P ? Zf(i) : i,
|
|
7337
7406
|
inline: !0,
|
|
7338
7407
|
onClick: (n) => {
|
|
7339
7408
|
n.stopPropagation(), ge(e, t);
|
|
@@ -7348,10 +7417,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7348
7417
|
]
|
|
7349
7418
|
})
|
|
7350
7419
|
});
|
|
7351
|
-
},
|
|
7420
|
+
}, ep = (e, t) => ({ target: {
|
|
7352
7421
|
name: e,
|
|
7353
7422
|
value: t
|
|
7354
|
-
} }),
|
|
7423
|
+
} }), tp = (e) => `Value cannot be less than ${e}`, np = (e) => `Value cannot be greater than ${e}`, rp = ({ 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 = tp, maxErrorMessage: T = np }) => {
|
|
7355
7424
|
let E = gr(t, c), [D, O] = v(E), [k, A] = v(!1), [j, M] = v(c);
|
|
7356
7425
|
d(() => {
|
|
7357
7426
|
k || O(E);
|
|
@@ -7369,7 +7438,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7369
7438
|
}, z = () => {
|
|
7370
7439
|
O(E), A(!1);
|
|
7371
7440
|
}, B = () => {
|
|
7372
|
-
L || I === null || (o(
|
|
7441
|
+
L || I === null || (o(ep(e, I)), s == null || s(ep(e, I)), A(!1));
|
|
7373
7442
|
}, ee = (e) => {
|
|
7374
7443
|
M(e), l == null || l(e);
|
|
7375
7444
|
}, te = (e) => {
|
|
@@ -7384,7 +7453,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7384
7453
|
}, ne = (e) => {
|
|
7385
7454
|
e.key === "Enter" && B(), e.key === "Escape" && z();
|
|
7386
7455
|
}, V = f || k, re = /* @__PURE__ */ C("div", {
|
|
7387
|
-
className:
|
|
7456
|
+
className: Pf.actions,
|
|
7388
7457
|
children: [/* @__PURE__ */ S(q, {
|
|
7389
7458
|
icon: "close",
|
|
7390
7459
|
small: !0,
|
|
@@ -7399,18 +7468,18 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7399
7468
|
})]
|
|
7400
7469
|
});
|
|
7401
7470
|
return /* @__PURE__ */ C("div", {
|
|
7402
|
-
className:
|
|
7471
|
+
className: Pf.wrapper,
|
|
7403
7472
|
"data-testid": g && `${g}-wrapper`,
|
|
7404
7473
|
children: [
|
|
7405
7474
|
i && /* @__PURE__ */ S("span", {
|
|
7406
|
-
className:
|
|
7475
|
+
className: Pf.label,
|
|
7407
7476
|
children: /* @__PURE__ */ S(Go, {
|
|
7408
7477
|
small: y,
|
|
7409
7478
|
children: i
|
|
7410
7479
|
})
|
|
7411
7480
|
}),
|
|
7412
7481
|
p && /* @__PURE__ */ S("div", {
|
|
7413
|
-
className: b(
|
|
7482
|
+
className: b(Pf.input, y && Pf.inputSmall, u && !f && Pf.editable),
|
|
7414
7483
|
children: /* @__PURE__ */ S(vo, {
|
|
7415
7484
|
content: re,
|
|
7416
7485
|
isOpen: k,
|
|
@@ -7424,11 +7493,11 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7424
7493
|
testId: g && `${g}-edit-popover`,
|
|
7425
7494
|
toggleOnTriggerClick: !1,
|
|
7426
7495
|
children: /* @__PURE__ */ S("div", {
|
|
7427
|
-
className:
|
|
7496
|
+
className: Pf.inputControl,
|
|
7428
7497
|
"data-testid": g && `${g}-edit-trigger`,
|
|
7429
7498
|
onClick: R,
|
|
7430
7499
|
onKeyDown: ne,
|
|
7431
|
-
children: /* @__PURE__ */ S(
|
|
7500
|
+
children: /* @__PURE__ */ S($f, {
|
|
7432
7501
|
name: e,
|
|
7433
7502
|
value: k ? D : E,
|
|
7434
7503
|
unitkey: h,
|
|
@@ -7463,7 +7532,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7463
7532
|
})
|
|
7464
7533
|
]
|
|
7465
7534
|
});
|
|
7466
|
-
},
|
|
7535
|
+
}, ip = ({ label: e, invalid: t, badge: n }) => t ? /* @__PURE__ */ S(Qa, {
|
|
7467
7536
|
small: !0,
|
|
7468
7537
|
margin: "-4px",
|
|
7469
7538
|
color: "var(--color-text-error)",
|
|
@@ -7474,7 +7543,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7474
7543
|
margin: "-4px",
|
|
7475
7544
|
title: n == null ? void 0 : n.toString(),
|
|
7476
7545
|
children: e
|
|
7477
|
-
}) : /* @__PURE__ */ S(x, { children: e }),
|
|
7546
|
+
}) : /* @__PURE__ */ S(x, { children: e }), ap = {
|
|
7478
7547
|
tabs: "_tabs_1olt8_1",
|
|
7479
7548
|
padding: "_padding_1olt8_7",
|
|
7480
7549
|
margin: "_margin_1olt8_11",
|
|
@@ -7484,7 +7553,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7484
7553
|
left: "_left_1olt8_67",
|
|
7485
7554
|
right: "_right_1olt8_67",
|
|
7486
7555
|
selectionIndicator: "_selectionIndicator_1olt8_70"
|
|
7487
|
-
},
|
|
7556
|
+
}, op = ({ name: e = void 0, options: t = null, value: n = void 0, onChange: r = bn, padding: i = !1, margin: a = !0, small: o = !1, testId: s, linkComponent: c }) => {
|
|
7488
7557
|
let l = u(W), { simpleInputs: d, options: f, selectedOptions: p } = Xc(t, n), m = mn(p) ? void 0 : d ? p : p.value, h = (e) => {
|
|
7489
7558
|
var t;
|
|
7490
7559
|
return (t = e.component) == null ? c : t;
|
|
@@ -7510,7 +7579,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7510
7579
|
...m ? { href: m } : {},
|
|
7511
7580
|
shouldSelectOnPressUp: !0,
|
|
7512
7581
|
isDisabled: i || l,
|
|
7513
|
-
className: b(
|
|
7582
|
+
className: b(ap.item, s ? ap.right : ap.left, o ? ap.small : ""),
|
|
7514
7583
|
"data-testid": d,
|
|
7515
7584
|
render: f && p ? (e) => "href" in e ? /* @__PURE__ */ S(p, {
|
|
7516
7585
|
...e,
|
|
@@ -7520,11 +7589,11 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7520
7589
|
(n = e.onClick) == null || n.call(e, t), y(t, a);
|
|
7521
7590
|
}
|
|
7522
7591
|
}) : /* @__PURE__ */ S("div", { ...e }) : void 0,
|
|
7523
|
-
children: [/* @__PURE__ */ S(
|
|
7592
|
+
children: [/* @__PURE__ */ S(ip, {
|
|
7524
7593
|
label: t,
|
|
7525
7594
|
invalid: c,
|
|
7526
7595
|
badge: u
|
|
7527
|
-
}), /* @__PURE__ */ S(vi, { className:
|
|
7596
|
+
}), /* @__PURE__ */ S(vi, { className: ap.selectionIndicator })]
|
|
7528
7597
|
}, a);
|
|
7529
7598
|
};
|
|
7530
7599
|
if (f) {
|
|
@@ -7534,7 +7603,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7534
7603
|
"data-testid": s,
|
|
7535
7604
|
children: /* @__PURE__ */ S(bi, {
|
|
7536
7605
|
"aria-label": e == null ? "Tabs" : e,
|
|
7537
|
-
className: b(
|
|
7606
|
+
className: b(ap.tabs, i ? ap.padding : "", a ? ap.margin : ""),
|
|
7538
7607
|
children: x.map(T)
|
|
7539
7608
|
})
|
|
7540
7609
|
});
|
|
@@ -7544,7 +7613,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7544
7613
|
}) : t;
|
|
7545
7614
|
}
|
|
7546
7615
|
return null;
|
|
7547
|
-
},
|
|
7616
|
+
}, sp = ({ children: e, href: t = void 0, target: n = void 0, testId: r, onClick: i, component: a = "a" }) => /* @__PURE__ */ S(a, {
|
|
7548
7617
|
href: t,
|
|
7549
7618
|
to: t,
|
|
7550
7619
|
target: n,
|
|
@@ -7554,7 +7623,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7554
7623
|
link: !0,
|
|
7555
7624
|
children: e
|
|
7556
7625
|
})
|
|
7557
|
-
}),
|
|
7626
|
+
}), cp = {
|
|
7558
7627
|
inputInTable: "_inputInTable_qbe2o_1",
|
|
7559
7628
|
inputHover: "_inputHover_qbe2o_13",
|
|
7560
7629
|
inputFocus: "_inputFocus_qbe2o_18",
|
|
@@ -7566,9 +7635,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7566
7635
|
textarea: "_textarea_qbe2o_81",
|
|
7567
7636
|
small: "_small_qbe2o_120",
|
|
7568
7637
|
monospace: "_monospace_qbe2o_159"
|
|
7569
|
-
},
|
|
7638
|
+
}, lp = ({ name: e, value: t = "", placeholder: n = "", cols: r, rows: i, disabled: a = !1, onChange: o = bn, onKeyPress: s = bn, onFocus: c = bn, onBlur: l = bn, tabIndex: d = 0, error: f = null, warning: p = null, tooltip: m = null, maxTooltipWidth: h, resize: g, monospace: _ = !1, small: v = !1, testId: y }) => {
|
|
7570
7639
|
let x = u(W), C = /* @__PURE__ */ S("textarea", {
|
|
7571
|
-
className: b(
|
|
7640
|
+
className: b(cp.textarea, f ? cp.error : "", p ? cp.warning : "", _ ? cp.monospace : "", v ? cp.small : ""),
|
|
7572
7641
|
name: e,
|
|
7573
7642
|
value: t,
|
|
7574
7643
|
placeholder: n,
|
|
@@ -7610,10 +7679,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7610
7679
|
menu: "_menu_oyr59_139",
|
|
7611
7680
|
active: "_active_oyr59_168",
|
|
7612
7681
|
alert: "_alert_oyr59_193"
|
|
7613
|
-
},
|
|
7682
|
+
}, up = ({ warning: e }) => /* @__PURE__ */ S("div", {
|
|
7614
7683
|
className: Q.alert,
|
|
7615
7684
|
children: e
|
|
7616
|
-
}),
|
|
7685
|
+
}), dp = ({ icon: e, url: t, onClick: n }) => {
|
|
7617
7686
|
let r = /* @__PURE__ */ S(G, { icon: e });
|
|
7618
7687
|
return t ? /* @__PURE__ */ S("a", {
|
|
7619
7688
|
href: t,
|
|
@@ -7625,7 +7694,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7625
7694
|
className: Q.appSwitcher,
|
|
7626
7695
|
children: r
|
|
7627
7696
|
});
|
|
7628
|
-
},
|
|
7697
|
+
}, fp = ({ label: e, logo: t, url: n, version: r, onClick: i }) => {
|
|
7629
7698
|
let a = /* @__PURE__ */ C("div", {
|
|
7630
7699
|
className: Q.title,
|
|
7631
7700
|
children: [
|
|
@@ -7654,9 +7723,9 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7654
7723
|
children: a
|
|
7655
7724
|
})
|
|
7656
7725
|
});
|
|
7657
|
-
},
|
|
7726
|
+
}, pp = /* @__PURE__ */ function(e) {
|
|
7658
7727
|
return e.LINK = "Link", e.BUTTON = "Button", e.MENU = "Menu", e.COMPONENT = "Component", e;
|
|
7659
|
-
}({}),
|
|
7728
|
+
}({}), mp = ({ label: e, url: t, icon: n, onClick: r, active: i, disabled: a, testId: o, component: s = "a" }) => {
|
|
7660
7729
|
let c = u(W);
|
|
7661
7730
|
return /* @__PURE__ */ C(s, {
|
|
7662
7731
|
className: b(Q.link, i ? Q.active : ""),
|
|
@@ -7673,11 +7742,11 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7673
7742
|
children: e
|
|
7674
7743
|
})]
|
|
7675
7744
|
});
|
|
7676
|
-
},
|
|
7745
|
+
}, hp = ({ element: e }) => {
|
|
7677
7746
|
switch (e.type) {
|
|
7678
|
-
case
|
|
7747
|
+
case pp.LINK: return /* @__PURE__ */ S("div", {
|
|
7679
7748
|
className: Q.item,
|
|
7680
|
-
children: /* @__PURE__ */ S(
|
|
7749
|
+
children: /* @__PURE__ */ S(mp, {
|
|
7681
7750
|
label: e.label,
|
|
7682
7751
|
url: e.url,
|
|
7683
7752
|
icon: e.icon,
|
|
@@ -7688,7 +7757,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7688
7757
|
component: e.component
|
|
7689
7758
|
})
|
|
7690
7759
|
});
|
|
7691
|
-
case
|
|
7760
|
+
case pp.BUTTON: return /* @__PURE__ */ S("div", {
|
|
7692
7761
|
className: b(Q.item, Q.button),
|
|
7693
7762
|
children: /* @__PURE__ */ S(q, {
|
|
7694
7763
|
label: e.label,
|
|
@@ -7700,14 +7769,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7700
7769
|
testId: e.testId
|
|
7701
7770
|
})
|
|
7702
7771
|
});
|
|
7703
|
-
case
|
|
7772
|
+
case pp.MENU: return /* @__PURE__ */ S("div", {
|
|
7704
7773
|
className: b(Q.item, Q.menu),
|
|
7705
7774
|
children: /* @__PURE__ */ S(ao, {
|
|
7706
7775
|
maxHeight: "100%",
|
|
7707
7776
|
menu: {
|
|
7708
7777
|
trigger: ki.COMPONENT,
|
|
7709
7778
|
placement: "bottom-start",
|
|
7710
|
-
component: /* @__PURE__ */ S(
|
|
7779
|
+
component: /* @__PURE__ */ S(mp, {
|
|
7711
7780
|
label: e.label,
|
|
7712
7781
|
icon: e.icon,
|
|
7713
7782
|
onClick: e.onClick
|
|
@@ -7716,50 +7785,50 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7716
7785
|
}
|
|
7717
7786
|
})
|
|
7718
7787
|
});
|
|
7719
|
-
case
|
|
7788
|
+
case pp.COMPONENT: return /* @__PURE__ */ S("div", {
|
|
7720
7789
|
className: Q.item,
|
|
7721
7790
|
children: e.component
|
|
7722
7791
|
});
|
|
7723
7792
|
default: return null;
|
|
7724
7793
|
}
|
|
7725
|
-
},
|
|
7794
|
+
}, gp = ({ 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(up, { warning: i }), /* @__PURE__ */ C("div", {
|
|
7726
7795
|
className: b(Q.topbar, o ? Q.fixed : ""),
|
|
7727
7796
|
style: { height: a },
|
|
7728
7797
|
children: [
|
|
7729
|
-
!!t && /* @__PURE__ */ S(
|
|
7798
|
+
!!t && /* @__PURE__ */ S(dp, {
|
|
7730
7799
|
icon: t.icon,
|
|
7731
7800
|
url: t.url,
|
|
7732
7801
|
onClick: t.onClick
|
|
7733
7802
|
}),
|
|
7734
7803
|
/* @__PURE__ */ C("div", {
|
|
7735
7804
|
className: Q.left,
|
|
7736
|
-
children: [e && /* @__PURE__ */ S(
|
|
7805
|
+
children: [e && /* @__PURE__ */ S(fp, {
|
|
7737
7806
|
label: e.label,
|
|
7738
7807
|
logo: e.logo,
|
|
7739
7808
|
url: e.url,
|
|
7740
7809
|
version: e.version,
|
|
7741
7810
|
onClick: e.onClick
|
|
7742
|
-
}), n.map((e, t) => e ? /* @__PURE__ */ S(
|
|
7811
|
+
}), n.map((e, t) => e ? /* @__PURE__ */ S(hp, { element: e }, t) : null)]
|
|
7743
7812
|
}),
|
|
7744
7813
|
/* @__PURE__ */ S("div", {
|
|
7745
7814
|
className: Q.right,
|
|
7746
|
-
children: r.map((e, t) => e ? /* @__PURE__ */ S(
|
|
7815
|
+
children: r.map((e, t) => e ? /* @__PURE__ */ S(hp, { element: e }, t) : null)
|
|
7747
7816
|
})
|
|
7748
7817
|
]
|
|
7749
|
-
})] }),
|
|
7818
|
+
})] }), _p = {
|
|
7750
7819
|
popConfirm: "_popConfirm_1x6ye_1",
|
|
7751
7820
|
content: "_content_1x6ye_7",
|
|
7752
7821
|
buttons: "_buttons_1x6ye_13"
|
|
7753
|
-
},
|
|
7754
|
-
className:
|
|
7822
|
+
}, vp = ({ title: e, okText: t, onClickOk: n, disableConfirmButton: r, cancelText: i, onClickCancel: a, close: o, testId: s }) => /* @__PURE__ */ C("div", {
|
|
7823
|
+
className: _p.popConfirm,
|
|
7755
7824
|
children: [e && /* @__PURE__ */ S("div", {
|
|
7756
|
-
className:
|
|
7825
|
+
className: _p.content,
|
|
7757
7826
|
children: /* @__PURE__ */ S(Go, {
|
|
7758
7827
|
small: !0,
|
|
7759
7828
|
children: e
|
|
7760
7829
|
})
|
|
7761
7830
|
}), /* @__PURE__ */ C("div", {
|
|
7762
|
-
className:
|
|
7831
|
+
className: _p.buttons,
|
|
7763
7832
|
children: [/* @__PURE__ */ S(q, {
|
|
7764
7833
|
small: !0,
|
|
7765
7834
|
colored: !0,
|
|
@@ -7774,8 +7843,8 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7774
7843
|
testId: `${s}-cancel-button`
|
|
7775
7844
|
})]
|
|
7776
7845
|
})]
|
|
7777
|
-
}),
|
|
7778
|
-
content: /* @__PURE__ */ S(
|
|
7846
|
+
}), yp = ({ 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(vo, {
|
|
7847
|
+
content: /* @__PURE__ */ S(vp, {
|
|
7779
7848
|
title: i,
|
|
7780
7849
|
okText: s,
|
|
7781
7850
|
onClickOk: c,
|
|
@@ -7789,14 +7858,14 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7789
7858
|
fullWidth: r,
|
|
7790
7859
|
testId: u,
|
|
7791
7860
|
children: e
|
|
7792
|
-
}),
|
|
7861
|
+
}), bp = {
|
|
7793
7862
|
tree: "_tree_coxxe_1",
|
|
7794
7863
|
toggle: "_toggle_coxxe_8",
|
|
7795
7864
|
dropTarget: "_dropTarget_coxxe_15",
|
|
7796
7865
|
placeholder: "_placeholder_coxxe_30",
|
|
7797
7866
|
draggingSource: "_draggingSource_coxxe_36",
|
|
7798
7867
|
placeholderContainer: "_placeholderContainer_coxxe_39"
|
|
7799
|
-
},
|
|
7868
|
+
}, xp = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
|
|
7800
7869
|
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) => {
|
|
7801
7870
|
e.stopPropagation(), i(l);
|
|
7802
7871
|
}, w = (e) => {
|
|
@@ -7823,7 +7892,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7823
7892
|
className: b(Z.itemHeader, g ? Z.noPointerEvents : ""),
|
|
7824
7893
|
children: [
|
|
7825
7894
|
a && /* @__PURE__ */ S("div", {
|
|
7826
|
-
className:
|
|
7895
|
+
className: bp.toggle,
|
|
7827
7896
|
children: /* @__PURE__ */ S(q, {
|
|
7828
7897
|
basic: !0,
|
|
7829
7898
|
colored: r ? !0 : Ai.MUTED,
|
|
@@ -7848,13 +7917,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7848
7917
|
]
|
|
7849
7918
|
})
|
|
7850
7919
|
});
|
|
7851
|
-
},
|
|
7852
|
-
className:
|
|
7920
|
+
}, Sp = ({ depth: e, indent: t = "var(--size-sm)" }) => /* @__PURE__ */ S("div", {
|
|
7921
|
+
className: bp.placeholder,
|
|
7853
7922
|
style: { left: `calc(${t} * ${e})` }
|
|
7854
|
-
}),
|
|
7923
|
+
}), Cp = (e, t) => {
|
|
7855
7924
|
var n;
|
|
7856
7925
|
return e && (t == null || (n = t.data) == null ? void 0 : n.draggable) !== !1;
|
|
7857
|
-
},
|
|
7926
|
+
}, wp = ({ 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 }) => {
|
|
7858
7927
|
var y, b;
|
|
7859
7928
|
let x = c == null ? _(null) : c, w = (e) => {
|
|
7860
7929
|
i && i(e);
|
|
@@ -7935,7 +8004,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7935
8004
|
tree: N,
|
|
7936
8005
|
sort: !1,
|
|
7937
8006
|
insertDroppableFirst: !1,
|
|
7938
|
-
canDrag: (e) =>
|
|
8007
|
+
canDrag: (e) => Cp(n, e),
|
|
7939
8008
|
canDrop: t || ((e, { dragSource: t, dropTargetId: n }) => {
|
|
7940
8009
|
if ((t == null ? void 0 : t.parent) === n) return !0;
|
|
7941
8010
|
}),
|
|
@@ -7949,7 +8018,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7949
8018
|
hasChild: n,
|
|
7950
8019
|
isOpen: i,
|
|
7951
8020
|
onToggle: a
|
|
7952
|
-
}) : /* @__PURE__ */ S(
|
|
8021
|
+
}) : /* @__PURE__ */ S(xp, {
|
|
7953
8022
|
hasChild: l ? l(e) : n,
|
|
7954
8023
|
node: e,
|
|
7955
8024
|
depth: t,
|
|
@@ -7965,7 +8034,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7965
8034
|
onDrop: M,
|
|
7966
8035
|
onChangeOpen: w,
|
|
7967
8036
|
dropTargetOffset: 10,
|
|
7968
|
-
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ S(
|
|
8037
|
+
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ S(Sp, {
|
|
7969
8038
|
depth: t,
|
|
7970
8039
|
indent: v
|
|
7971
8040
|
}),
|
|
@@ -7973,17 +8042,17 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7973
8042
|
listComponent: "div",
|
|
7974
8043
|
listItemComponent: "div",
|
|
7975
8044
|
classes: {
|
|
7976
|
-
root:
|
|
7977
|
-
draggingSource:
|
|
7978
|
-
dropTarget:
|
|
7979
|
-
placeholder:
|
|
8045
|
+
root: bp.tree,
|
|
8046
|
+
draggingSource: bp.draggingSource,
|
|
8047
|
+
dropTarget: bp.dropTarget,
|
|
8048
|
+
placeholder: bp.placeholderContainer
|
|
7980
8049
|
},
|
|
7981
8050
|
initialOpen: o,
|
|
7982
8051
|
enableAnimateExpand: !0
|
|
7983
8052
|
})
|
|
7984
8053
|
})]
|
|
7985
8054
|
});
|
|
7986
|
-
},
|
|
8055
|
+
}, Tp = {
|
|
7987
8056
|
treeTable: "_treeTable_1ywvy_1",
|
|
7988
8057
|
treeTableHeader: "_treeTableHeader_1ywvy_22",
|
|
7989
8058
|
folderCell: "_folderCell_1ywvy_30",
|
|
@@ -7991,48 +8060,48 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
7991
8060
|
drag: "_drag_1ywvy_31",
|
|
7992
8061
|
folder: "_folder_1ywvy_30",
|
|
7993
8062
|
active: "_active_1ywvy_61"
|
|
7994
|
-
},
|
|
8063
|
+
}, Ep = (e, t) => e.filter((e) => e.parent === t).flatMap((t) => [t.id, ...Ep(e, t.id)]), Dp = (e, t) => {
|
|
7995
8064
|
let n = new Set(t);
|
|
7996
8065
|
return e.filter((e) => !n.has(e.id)).map((e) => e.id);
|
|
7997
|
-
},
|
|
8066
|
+
}, Op = (e, t, n) => e.filter((e) => n.has(e) || !t.has(e)), kp = (e, t, n, r = []) => {
|
|
7998
8067
|
let i = new Set(n), a = new Set(r), o = e.filter((e) => e.parent === t && !a.has(e.id));
|
|
7999
8068
|
if (o.length === 0) return {
|
|
8000
8069
|
checked: i.has(t),
|
|
8001
8070
|
indeterminate: !1
|
|
8002
8071
|
};
|
|
8003
|
-
let s = o.map((t) =>
|
|
8072
|
+
let s = o.map((t) => kp(e, t.id, n, r)), c = s.filter((e) => e.checked).length, l = s.filter((e) => e.indeterminate).length, u = c === o.length;
|
|
8004
8073
|
return {
|
|
8005
8074
|
checked: u,
|
|
8006
8075
|
indeterminate: c + l > 0 && !u
|
|
8007
8076
|
};
|
|
8008
|
-
},
|
|
8009
|
-
let r =
|
|
8077
|
+
}, Ap = (e, t, n = []) => {
|
|
8078
|
+
let r = Dp(e, n), i = new Set(t), a = r.filter((e) => i.has(e)).length;
|
|
8010
8079
|
return {
|
|
8011
8080
|
checked: r.length > 0 && a === r.length,
|
|
8012
8081
|
indeterminate: a > 0 && a < r.length
|
|
8013
8082
|
};
|
|
8014
|
-
},
|
|
8083
|
+
}, jp = i(null), Mp = () => u(jp), Np = ({ children: e, rowCheckboxes: t, rows: n }) => {
|
|
8015
8084
|
let r = t !== void 0, { checkedIds: i = [], disabledIds: a = [], getTooltip: o, onChange: s } = t == null ? {} : t, c = h(() => new Set(a), [a]), u = h(() => {
|
|
8016
8085
|
if (!r) return null;
|
|
8017
8086
|
let e = /* @__PURE__ */ new Map();
|
|
8018
|
-
for (let t of n) e.set(t.id,
|
|
8087
|
+
for (let t of n) e.set(t.id, kp(n, t.id, i, a));
|
|
8019
8088
|
return e;
|
|
8020
8089
|
}, [
|
|
8021
8090
|
i,
|
|
8022
8091
|
a,
|
|
8023
8092
|
r,
|
|
8024
8093
|
n
|
|
8025
|
-
]), d = h(() => r ?
|
|
8094
|
+
]), d = h(() => r ? Ap(n, i, a) : void 0, [
|
|
8026
8095
|
i,
|
|
8027
8096
|
a,
|
|
8028
8097
|
r,
|
|
8029
8098
|
n
|
|
8030
8099
|
]), 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) => {
|
|
8031
8100
|
if (!r || c.has(e)) return;
|
|
8032
|
-
let t =
|
|
8101
|
+
let t = Ep(n, e), o = [e, ...t.filter((e) => !c.has(e))], l = [e, ...t], { checked: u } = kp(n, e, i, a);
|
|
8033
8102
|
if (u) {
|
|
8034
8103
|
let e = new Set(l);
|
|
8035
|
-
s == null || s(
|
|
8104
|
+
s == null || s(Op(i, e, c));
|
|
8036
8105
|
} else s == null || s([.../* @__PURE__ */ new Set([...i, ...o])]);
|
|
8037
8106
|
}, [
|
|
8038
8107
|
i,
|
|
@@ -8043,7 +8112,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8043
8112
|
n
|
|
8044
8113
|
]), _ = l(() => {
|
|
8045
8114
|
if (!r) return;
|
|
8046
|
-
let e =
|
|
8115
|
+
let e = Dp(n, a), { checked: t } = Ap(n, i, a);
|
|
8047
8116
|
t ? s == null || s(i.filter((e) => c.has(e))) : s == null || s([.../* @__PURE__ */ new Set([...i, ...e])]);
|
|
8048
8117
|
}, [
|
|
8049
8118
|
i,
|
|
@@ -8069,12 +8138,12 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8069
8138
|
_,
|
|
8070
8139
|
g
|
|
8071
8140
|
]);
|
|
8072
|
-
return /* @__PURE__ */ S(
|
|
8141
|
+
return /* @__PURE__ */ S(jp.Provider, {
|
|
8073
8142
|
value: v,
|
|
8074
8143
|
children: e
|
|
8075
8144
|
});
|
|
8076
|
-
},
|
|
8077
|
-
let g =
|
|
8145
|
+
}, Pp = ({ columnAlignment: e, columnWidths: t, depth: n, draggable: r, handleRef: i, hasChild: a, hasRowActions: o, icons: s, isItemDraggable: c = !0, isOpen: l, node: u, onDragEnter: d, onDragOver: f, onDragLeave: p, onDrop: m, onToggle: h }) => {
|
|
8146
|
+
let g = Mp(), _ = g != null && g.enabled ? g.getRowCheckState(u.id) : void 0, v = _ == null ? void 0 : _.checked, y = _ == null ? void 0 : _.indeterminate, x = g == null ? void 0 : g.isRowCheckDisabled(u.id), w = g == null ? void 0 : g.enabled, { data: T, droppable: E } = u, { id: D, cells: O, testId: k, actions: A = [], active: j, onRowClick: M } = T, N = E || a, P = (e) => {
|
|
8078
8147
|
let r = t ? t[e] : void 0;
|
|
8079
8148
|
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${N ? n + 1 : n})`})` : r;
|
|
8080
8149
|
};
|
|
@@ -8087,7 +8156,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8087
8156
|
onDragLeave: p,
|
|
8088
8157
|
children: /* @__PURE__ */ S("tbody", { children: /* @__PURE__ */ C("tr", {
|
|
8089
8158
|
onClick: M,
|
|
8090
|
-
className: b(
|
|
8159
|
+
className: b(Tp.treeTableRow, j ? Tp.active : void 0),
|
|
8091
8160
|
children: [
|
|
8092
8161
|
w && /* @__PURE__ */ S(Hl, {
|
|
8093
8162
|
isHeader: !1,
|
|
@@ -8101,19 +8170,19 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8101
8170
|
}
|
|
8102
8171
|
}),
|
|
8103
8172
|
r && /* @__PURE__ */ S("td", {
|
|
8104
|
-
className:
|
|
8173
|
+
className: Tp.dragCell,
|
|
8105
8174
|
children: c && /* @__PURE__ */ S("div", {
|
|
8106
|
-
className:
|
|
8175
|
+
className: Tp.drag,
|
|
8107
8176
|
onClick: (e) => e.stopPropagation(),
|
|
8108
8177
|
ref: i,
|
|
8109
8178
|
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
8110
8179
|
})
|
|
8111
8180
|
}),
|
|
8112
|
-
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ S("td", { className:
|
|
8181
|
+
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ S("td", { className: Tp.folderCell }, t)),
|
|
8113
8182
|
N && /* @__PURE__ */ S("td", {
|
|
8114
|
-
className:
|
|
8183
|
+
className: Tp.folderCell,
|
|
8115
8184
|
children: /* @__PURE__ */ S("div", {
|
|
8116
|
-
className:
|
|
8185
|
+
className: Tp.folder,
|
|
8117
8186
|
onClick: () => h(D),
|
|
8118
8187
|
onMouseDown: (e) => e.stopPropagation(),
|
|
8119
8188
|
children: /* @__PURE__ */ S(q, {
|
|
@@ -8145,10 +8214,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8145
8214
|
]
|
|
8146
8215
|
}) })
|
|
8147
8216
|
});
|
|
8148
|
-
},
|
|
8149
|
-
let a =
|
|
8217
|
+
}, Fp = ({ columnAlignment: e, columnWidths: t, draggable: n, hasRowActions: r, headers: i }) => {
|
|
8218
|
+
let a = Mp(), o = a == null ? void 0 : a.headerCheckState, s = (a == null ? void 0 : a.enabled) && o !== void 0;
|
|
8150
8219
|
return /* @__PURE__ */ S("table", {
|
|
8151
|
-
className: b(Hs.table,
|
|
8220
|
+
className: b(Hs.table, Tp.treeTableHeader),
|
|
8152
8221
|
children: /* @__PURE__ */ S("thead", { children: i.map((i, c) => /* @__PURE__ */ C("tr", { children: [
|
|
8153
8222
|
s && c === 0 ? /* @__PURE__ */ S(Hl, {
|
|
8154
8223
|
isHeader: !0,
|
|
@@ -8159,7 +8228,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8159
8228
|
onChange: a.toggleHeaderCheck
|
|
8160
8229
|
}
|
|
8161
8230
|
}) : s ? /* @__PURE__ */ S("td", {}) : null,
|
|
8162
|
-
n && /* @__PURE__ */ S("th", { className:
|
|
8231
|
+
n && /* @__PURE__ */ S("th", { className: Tp.dragCell }),
|
|
8163
8232
|
i.cells.map((n, r) => {
|
|
8164
8233
|
let i = t ? t[r] : void 0, a = e ? e[r] : void 0;
|
|
8165
8234
|
return /* @__PURE__ */ S(Hl, {
|
|
@@ -8179,22 +8248,22 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8179
8248
|
})
|
|
8180
8249
|
] }, c)) })
|
|
8181
8250
|
});
|
|
8182
|
-
},
|
|
8251
|
+
}, Ip = ({ 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 }) => {
|
|
8183
8252
|
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: v = [] } = d, y = ll(v, _ == null ? [] : _);
|
|
8184
|
-
return /* @__PURE__ */ S(
|
|
8253
|
+
return /* @__PURE__ */ S(Np, {
|
|
8185
8254
|
rowCheckboxes: u,
|
|
8186
8255
|
rows: v,
|
|
8187
8256
|
children: /* @__PURE__ */ C("div", {
|
|
8188
|
-
className:
|
|
8257
|
+
className: Tp.treeTable,
|
|
8189
8258
|
"data-testid": f,
|
|
8190
8259
|
style: { width: g },
|
|
8191
|
-
children: [!!_ && /* @__PURE__ */ S(
|
|
8260
|
+
children: [!!_ && /* @__PURE__ */ S(Fp, {
|
|
8192
8261
|
columnAlignment: m,
|
|
8193
8262
|
columnWidths: h,
|
|
8194
8263
|
draggable: r,
|
|
8195
8264
|
hasRowActions: y,
|
|
8196
8265
|
headers: _
|
|
8197
|
-
}), /* @__PURE__ */ S(
|
|
8266
|
+
}), /* @__PURE__ */ S(wp, {
|
|
8198
8267
|
allowParentReassignment: e,
|
|
8199
8268
|
autoOpenActiveItems: t,
|
|
8200
8269
|
canDrop: n,
|
|
@@ -8210,7 +8279,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8210
8279
|
onItemToggle: s,
|
|
8211
8280
|
onListReorder: c,
|
|
8212
8281
|
placeholderIndent: "var(--size)",
|
|
8213
|
-
render: (e, { depth: t, draggable: n, handleRef: a, hasChild: o, isOpen: s, onToggle: c }) => /* @__PURE__ */ S(
|
|
8282
|
+
render: (e, { depth: t, draggable: n, handleRef: a, hasChild: o, isOpen: s, onToggle: c }) => /* @__PURE__ */ S(Pp, {
|
|
8214
8283
|
node: e,
|
|
8215
8284
|
columnAlignment: m,
|
|
8216
8285
|
columnWidths: h,
|
|
@@ -8228,10 +8297,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8228
8297
|
})]
|
|
8229
8298
|
})
|
|
8230
8299
|
});
|
|
8231
|
-
},
|
|
8300
|
+
}, Lp = Object.freeze({
|
|
8232
8301
|
Translations: "translations",
|
|
8233
8302
|
LanguageKey: "languageKey"
|
|
8234
|
-
}),
|
|
8303
|
+
}), Rp = {
|
|
8235
8304
|
unified: "Unified",
|
|
8236
8305
|
split: "Split",
|
|
8237
8306
|
changesTooLarge: "Changes are too large to be shown",
|
|
@@ -8254,39 +8323,39 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8254
8323
|
showAll: "Show all",
|
|
8255
8324
|
unknown: "Unknown",
|
|
8256
8325
|
unexpectedError: "Unexpected error"
|
|
8257
|
-
},
|
|
8326
|
+
}, zp = (e) => Object.keys(Rp).reduce((t, n) => ({
|
|
8258
8327
|
...t,
|
|
8259
|
-
[n]: (e == null ? void 0 : e[n]) || (
|
|
8260
|
-
}), {}),
|
|
8261
|
-
[
|
|
8262
|
-
[
|
|
8263
|
-
},
|
|
8264
|
-
|
|
8265
|
-
},
|
|
8328
|
+
[n]: (e == null ? void 0 : e[n]) || (Rp == null ? void 0 : Rp[n])
|
|
8329
|
+
}), {}), Bp = {
|
|
8330
|
+
[Lp.Translations]: zp(),
|
|
8331
|
+
[Lp.LanguageKey]: "en"
|
|
8332
|
+
}, Vp = (e) => e ? Bp[e] : Bp, Hp = (e, t) => {
|
|
8333
|
+
Bp[e] = t;
|
|
8334
|
+
}, Up = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
|
|
8266
8335
|
var a;
|
|
8267
|
-
let { unitTemplate: o = null } = (a =
|
|
8268
|
-
return e[n] = r == null ?
|
|
8336
|
+
let { unitTemplate: o = null } = (a = Jf()) == null ? {} : a;
|
|
8337
|
+
return e[n] = r == null ? Lf(n, o) : r, t[n] = i, {
|
|
8269
8338
|
preferredUnits: e,
|
|
8270
8339
|
storageUnits: t
|
|
8271
8340
|
};
|
|
8272
8341
|
}, {
|
|
8273
8342
|
preferredUnits: {},
|
|
8274
8343
|
storageUnits: {}
|
|
8275
|
-
}),
|
|
8344
|
+
}), Wp = ({ value: e, unitKey: t, selectedUnits: n, storageUnits: r }) => {
|
|
8276
8345
|
let i = n[t], a = r[t];
|
|
8277
8346
|
if (!(a && i !== a) || e === null || e === "") return e;
|
|
8278
|
-
let { value: o = e } =
|
|
8347
|
+
let { value: o = e } = Hf({
|
|
8279
8348
|
value: fr(e),
|
|
8280
8349
|
unitkey: t,
|
|
8281
8350
|
toUnit: i,
|
|
8282
8351
|
fromUnit: a
|
|
8283
8352
|
});
|
|
8284
8353
|
return o;
|
|
8285
|
-
},
|
|
8354
|
+
}, Gp = ({ row: e, selectedUnits: t, storageUnits: n, convertBackToStorageUnit: r, enableCosmeticRounding: i, enableDisplayRounding: a }) => ({
|
|
8286
8355
|
...e,
|
|
8287
8356
|
cells: e.cells.map((e) => {
|
|
8288
8357
|
if ("autoUnit" in e && e.autoUnit && (typeof e.value == "string" || typeof e.value == "number")) {
|
|
8289
|
-
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, p =
|
|
8358
|
+
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, p = Wp({
|
|
8290
8359
|
value: s,
|
|
8291
8360
|
unitKey: o,
|
|
8292
8361
|
selectedUnits: t,
|
|
@@ -8300,7 +8369,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8300
8369
|
roundDisplayValue: l,
|
|
8301
8370
|
selectOnFocus: !0,
|
|
8302
8371
|
onChange: (t) => {
|
|
8303
|
-
let n = t, { value: i } = n.target, a = r ? d : u, { value: s = i } =
|
|
8372
|
+
let n = t, { value: i } = n.target, a = r ? d : u, { value: s = i } = Hf({
|
|
8304
8373
|
value: String(i),
|
|
8305
8374
|
unitkey: o,
|
|
8306
8375
|
toUnit: a,
|
|
@@ -8319,8 +8388,8 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8319
8388
|
}
|
|
8320
8389
|
return e;
|
|
8321
8390
|
})
|
|
8322
|
-
}),
|
|
8323
|
-
let { translations: i } =
|
|
8391
|
+
}), Kp = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
|
|
8392
|
+
let { translations: i } = Vp();
|
|
8324
8393
|
return e ? e.map((e) => ({
|
|
8325
8394
|
...e,
|
|
8326
8395
|
cells: e.cells.map((e) => {
|
|
@@ -8349,8 +8418,8 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8349
8418
|
return e;
|
|
8350
8419
|
})
|
|
8351
8420
|
})) : [];
|
|
8352
|
-
},
|
|
8353
|
-
let { headers: c, ...u } = e, { storageUnits: f, preferredUnits: p } =
|
|
8421
|
+
}, qp = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: o, beforeRenderRow: s }) => {
|
|
8422
|
+
let { headers: c, ...u } = e, { storageUnits: f, preferredUnits: p } = Up(t), m = If(p), [h, g] = v(p), _ = ({ unitKey: e, value: n }) => {
|
|
8354
8423
|
g((t) => ({
|
|
8355
8424
|
...t,
|
|
8356
8425
|
[e]: n
|
|
@@ -8361,13 +8430,13 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8361
8430
|
newUnit: n,
|
|
8362
8431
|
unitKey: e
|
|
8363
8432
|
});
|
|
8364
|
-
}, y = l(({ row: e, rowIndex: t }) =>
|
|
8433
|
+
}, y = l(({ row: e, rowIndex: t }) => Gp({
|
|
8365
8434
|
row: s ? s({
|
|
8366
8435
|
row: e,
|
|
8367
8436
|
rowIndex: t,
|
|
8368
8437
|
selectedUnits: h,
|
|
8369
8438
|
storageUnits: f,
|
|
8370
|
-
convertValue: (e, t) =>
|
|
8439
|
+
convertValue: (e, t) => Wp({
|
|
8371
8440
|
value: e,
|
|
8372
8441
|
unitKey: t,
|
|
8373
8442
|
selectedUnits: h,
|
|
@@ -8398,7 +8467,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8398
8467
|
}, [t]), /* @__PURE__ */ S($l, {
|
|
8399
8468
|
table: {
|
|
8400
8469
|
...u,
|
|
8401
|
-
headers:
|
|
8470
|
+
headers: Kp({
|
|
8402
8471
|
headers: e.headers,
|
|
8403
8472
|
selectedUnits: h,
|
|
8404
8473
|
storageUnits: f,
|
|
@@ -8409,8 +8478,8 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8409
8478
|
canListReorder: o,
|
|
8410
8479
|
beforeRenderRow: y
|
|
8411
8480
|
});
|
|
8412
|
-
},
|
|
8413
|
-
let { translations: d } =
|
|
8481
|
+
}, Jp = { settingField: "_settingField_1x02n_1" }, Yp = ({ 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 }) => {
|
|
8482
|
+
let { translations: d } = Vp(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ C(e.Fragment, { children: [t, /* @__PURE__ */ S("br", {})] }, n)), p = [
|
|
8414
8483
|
...r ? [] : [{
|
|
8415
8484
|
label: d == null ? void 0 : d.allUsers,
|
|
8416
8485
|
value: !1
|
|
@@ -8425,7 +8494,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8425
8494
|
}] : []
|
|
8426
8495
|
], m = a !== void 0 && o !== void 0 && !dn(a, o);
|
|
8427
8496
|
return /* @__PURE__ */ C("div", {
|
|
8428
|
-
className:
|
|
8497
|
+
className: Jp.settingField,
|
|
8429
8498
|
"data-testid": u,
|
|
8430
8499
|
children: [/* @__PURE__ */ C(yd, {
|
|
8431
8500
|
justifyContent: "space-between",
|
|
@@ -8457,7 +8526,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8457
8526
|
children: f(t)
|
|
8458
8527
|
})]
|
|
8459
8528
|
});
|
|
8460
|
-
},
|
|
8529
|
+
}, Xp = { backgroundColor: "var(--color-background-error-muted)" }, Zp = { backgroundColor: "var(--color-background-success-muted)" }, Qp = { backgroundColor: "var(--color-background-warning-muted)" }, $p = {
|
|
8461
8530
|
addedBackground: "var(--color-diff-added-background)",
|
|
8462
8531
|
addedGutterBackground: "var(--color-diff-added-gutter-background)",
|
|
8463
8532
|
codeFoldBackground: "var(--color-diff-code-fold-background)",
|
|
@@ -8476,10 +8545,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8476
8545
|
removedGutterBackground: "var(--color-diff-removed-gutter-background)",
|
|
8477
8546
|
wordAddedBackground: "var(--color-diff-word-added-background)",
|
|
8478
8547
|
wordRemovedBackground: "var(--color-diff-word-removed-background)"
|
|
8479
|
-
},
|
|
8548
|
+
}, em = {
|
|
8480
8549
|
variables: {
|
|
8481
|
-
light:
|
|
8482
|
-
dark:
|
|
8550
|
+
light: $p,
|
|
8551
|
+
dark: $p
|
|
8483
8552
|
},
|
|
8484
8553
|
diffContainer: { minWidth: "unset" },
|
|
8485
8554
|
codeFoldGutter: {
|
|
@@ -8494,10 +8563,10 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8494
8563
|
pre: { opacity: .5 }
|
|
8495
8564
|
} },
|
|
8496
8565
|
marker: { pre: { opacity: .4 } }
|
|
8497
|
-
},
|
|
8566
|
+
}, tm = { codeOnly: "_codeOnly_1lph2_42" }, nm = ({ value: e, compareValue: t, splitView: n = !1, showDiffOnly: r = !1, compareMethod: i = Di.LINES, extraLinesSurroundingDiff: a, hideSummary: o = !0, className: s }) => {
|
|
8498
8567
|
let c = t !== void 0, l = c ? t : e, u = i !== Di.WORDS;
|
|
8499
8568
|
return /* @__PURE__ */ S("div", {
|
|
8500
|
-
className: b(s, { [
|
|
8569
|
+
className: b(s, { [tm.codeOnly]: !c && !n }),
|
|
8501
8570
|
children: /* @__PURE__ */ S(Ei, {
|
|
8502
8571
|
oldValue: l,
|
|
8503
8572
|
newValue: e,
|
|
@@ -8509,22 +8578,22 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8509
8578
|
hideLineNumbers: !1,
|
|
8510
8579
|
hideSummary: o,
|
|
8511
8580
|
disableWorker: !0,
|
|
8512
|
-
styles:
|
|
8581
|
+
styles: em
|
|
8513
8582
|
})
|
|
8514
8583
|
});
|
|
8515
|
-
},
|
|
8584
|
+
}, rm = (e, t) => {
|
|
8516
8585
|
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;
|
|
8517
8586
|
return {
|
|
8518
8587
|
added: Math.max(0, i),
|
|
8519
8588
|
removed: Math.max(0, a)
|
|
8520
8589
|
};
|
|
8521
|
-
},
|
|
8590
|
+
}, im = "split", am = "unified", om = ({ oldJson: e, newJson: t, viewType: n = im }) => {
|
|
8522
8591
|
var r, i;
|
|
8523
|
-
let { translations: a } =
|
|
8524
|
-
value:
|
|
8592
|
+
let { translations: a } = Vp(), [o, s] = v(n), c = [{
|
|
8593
|
+
value: im,
|
|
8525
8594
|
label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
|
|
8526
8595
|
}, {
|
|
8527
|
-
value:
|
|
8596
|
+
value: am,
|
|
8528
8597
|
label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
|
|
8529
8598
|
}];
|
|
8530
8599
|
d(() => {
|
|
@@ -8532,7 +8601,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8532
8601
|
}, [n]);
|
|
8533
8602
|
let l = ({ target: { value: e } }) => {
|
|
8534
8603
|
s(e);
|
|
8535
|
-
}, { added: u, removed: f } =
|
|
8604
|
+
}, { added: u, removed: f } = rm(e, t), p = u + f > 3500;
|
|
8536
8605
|
return /* @__PURE__ */ S(x, { children: /* @__PURE__ */ S(go, {
|
|
8537
8606
|
bordered: !0,
|
|
8538
8607
|
heading: /* @__PURE__ */ C(yd, {
|
|
@@ -8562,21 +8631,21 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8562
8631
|
muted: !0,
|
|
8563
8632
|
children: a == null ? void 0 : a.changesTooLarge
|
|
8564
8633
|
})
|
|
8565
|
-
}) : /* @__PURE__ */ S(
|
|
8634
|
+
}) : /* @__PURE__ */ S(nm, {
|
|
8566
8635
|
value: t,
|
|
8567
8636
|
compareValue: e,
|
|
8568
|
-
splitView: o ===
|
|
8637
|
+
splitView: o === im,
|
|
8569
8638
|
compareMethod: Di.WORDS,
|
|
8570
8639
|
showDiffOnly: !0,
|
|
8571
8640
|
hideSummary: !1
|
|
8572
8641
|
})
|
|
8573
8642
|
}) });
|
|
8574
|
-
},
|
|
8643
|
+
}, sm = (e) => typeof e == "object" && e && "value" in e ? e.value : e, cm = (e) => {
|
|
8575
8644
|
var t;
|
|
8576
8645
|
if (e.id != null) return String(e.id);
|
|
8577
|
-
let n =
|
|
8646
|
+
let n = sm((t = e.cells) == null || (t = t[0]) == null ? void 0 : t.value);
|
|
8578
8647
|
return n == null ? "" : String(n);
|
|
8579
|
-
},
|
|
8648
|
+
}, lm = (e, t) => ({
|
|
8580
8649
|
...e,
|
|
8581
8650
|
cells: e.cells.map((e) => ({
|
|
8582
8651
|
...e,
|
|
@@ -8585,7 +8654,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8585
8654
|
...t
|
|
8586
8655
|
}
|
|
8587
8656
|
}))
|
|
8588
|
-
}),
|
|
8657
|
+
}), um = (e, t) => ({
|
|
8589
8658
|
...e,
|
|
8590
8659
|
cells: e.cells.map((e, n) => {
|
|
8591
8660
|
var r;
|
|
@@ -8594,17 +8663,17 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8594
8663
|
...e,
|
|
8595
8664
|
style: {
|
|
8596
8665
|
...e.style,
|
|
8597
|
-
...
|
|
8666
|
+
...Qp
|
|
8598
8667
|
},
|
|
8599
8668
|
tooltip: typeof a == "number" ? String(a) : a
|
|
8600
8669
|
};
|
|
8601
8670
|
})
|
|
8602
|
-
}),
|
|
8671
|
+
}), dm = (e = [], t = []) => {
|
|
8603
8672
|
let n = /* @__PURE__ */ new Map();
|
|
8604
|
-
for (let e of t) n.set(
|
|
8605
|
-
let r = new Set(e.map(
|
|
8673
|
+
for (let e of t) n.set(cm(e), e);
|
|
8674
|
+
let r = new Set(e.map(cm)), i = /* @__PURE__ */ new Map(), a = [], o = null;
|
|
8606
8675
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
8607
|
-
let n = t[e], c =
|
|
8676
|
+
let n = t[e], c = cm(n);
|
|
8608
8677
|
if (r.has(c)) {
|
|
8609
8678
|
o = c;
|
|
8610
8679
|
continue;
|
|
@@ -8619,7 +8688,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8619
8688
|
a.reverse();
|
|
8620
8689
|
let c = [];
|
|
8621
8690
|
for (let t of e) {
|
|
8622
|
-
let e =
|
|
8691
|
+
let e = cm(t), r = i.get(e);
|
|
8623
8692
|
if (r) for (let e of r) c.push({
|
|
8624
8693
|
status: "deleted",
|
|
8625
8694
|
row: e
|
|
@@ -8639,11 +8708,11 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8639
8708
|
row: e
|
|
8640
8709
|
});
|
|
8641
8710
|
return c;
|
|
8642
|
-
},
|
|
8643
|
-
let i = h(() =>
|
|
8711
|
+
}, fm = (e) => e.status === "deleted" ? lm(e.row, Xp) : e.status === "added" ? lm(e.row, Zp) : um(e.row, e.compareRow), pm = ({ table: e, compareRows: t, beforeRenderRow: n, ...r }) => {
|
|
8712
|
+
let i = h(() => dm(e.rows, t), [e.rows, t]), a = !!e.infiniteScroll, o = h(() => {
|
|
8644
8713
|
if (!a) return i.map((e) => e.row);
|
|
8645
8714
|
}, [a, i]), s = l(({ row: e, rowIndex: t }) => {
|
|
8646
|
-
let r = i[t], a = r ?
|
|
8715
|
+
let r = i[t], a = r ? fm(r) : e;
|
|
8647
8716
|
return n ? n({
|
|
8648
8717
|
row: a,
|
|
8649
8718
|
rowIndex: t
|
|
@@ -8662,7 +8731,7 @@ var To = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Eo =
|
|
|
8662
8731
|
};
|
|
8663
8732
|
//#endregion
|
|
8664
8733
|
//#region src/helpers/date.ts
|
|
8665
|
-
function
|
|
8734
|
+
function mm({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
8666
8735
|
return e ? new Date(e).toLocaleString(a, {
|
|
8667
8736
|
year: "numeric",
|
|
8668
8737
|
month: "short",
|
|
@@ -8676,28 +8745,28 @@ function lm({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
8676
8745
|
}
|
|
8677
8746
|
//#endregion
|
|
8678
8747
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
8679
|
-
function
|
|
8748
|
+
function hm(e) {
|
|
8680
8749
|
var t;
|
|
8681
8750
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
8682
8751
|
if (!n) throw Error("Invalid RegExp");
|
|
8683
8752
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
8684
8753
|
}
|
|
8685
|
-
function
|
|
8754
|
+
function gm(e) {
|
|
8686
8755
|
if (typeof e != "object") return e;
|
|
8687
8756
|
if (e === null) return null;
|
|
8688
|
-
if (Array.isArray(e)) return e.map(
|
|
8757
|
+
if (Array.isArray(e)) return e.map(gm);
|
|
8689
8758
|
if (e instanceof Date) return new Date(e.getTime());
|
|
8690
|
-
if (e instanceof RegExp) return
|
|
8759
|
+
if (e instanceof RegExp) return hm(e);
|
|
8691
8760
|
let t = {};
|
|
8692
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
8761
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = gm(e[n]));
|
|
8693
8762
|
return t;
|
|
8694
8763
|
}
|
|
8695
8764
|
//#endregion
|
|
8696
8765
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
8697
|
-
function
|
|
8766
|
+
function _m(e, t) {
|
|
8698
8767
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
8699
8768
|
}
|
|
8700
|
-
var
|
|
8769
|
+
var vm = (e) => e[e.length - 1], ym = class {
|
|
8701
8770
|
setResult(e) {
|
|
8702
8771
|
return this.result = e, this.hasResult = !0, this;
|
|
8703
8772
|
}
|
|
@@ -8705,16 +8774,16 @@ var pm = (e) => e[e.length - 1], mm = class {
|
|
|
8705
8774
|
return this.exiting = !0, this;
|
|
8706
8775
|
}
|
|
8707
8776
|
push(e, t) {
|
|
8708
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
8777
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (_m(this.children), vm(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
8709
8778
|
}
|
|
8710
|
-
},
|
|
8779
|
+
}, bm = class extends ym {
|
|
8711
8780
|
constructor(e, t) {
|
|
8712
8781
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
8713
8782
|
}
|
|
8714
8783
|
prepareDeltaResult(e) {
|
|
8715
8784
|
var t, n, r, i;
|
|
8716
8785
|
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)) {
|
|
8717
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
8786
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : gm;
|
|
8718
8787
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
8719
8788
|
}
|
|
8720
8789
|
return e;
|
|
@@ -8722,15 +8791,15 @@ var pm = (e) => e[e.length - 1], mm = class {
|
|
|
8722
8791
|
setResult(e) {
|
|
8723
8792
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
8724
8793
|
}
|
|
8725
|
-
},
|
|
8794
|
+
}, xm = class extends ym {
|
|
8726
8795
|
constructor(e, t) {
|
|
8727
8796
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
8728
8797
|
}
|
|
8729
|
-
},
|
|
8798
|
+
}, Sm = class extends ym {
|
|
8730
8799
|
constructor(e) {
|
|
8731
8800
|
super(), this.delta = e, this.pipe = "reverse";
|
|
8732
8801
|
}
|
|
8733
|
-
},
|
|
8802
|
+
}, Cm = class {
|
|
8734
8803
|
constructor(e) {
|
|
8735
8804
|
this.name = e, this.filters = [];
|
|
8736
8805
|
}
|
|
@@ -8794,7 +8863,7 @@ var pm = (e) => e[e.length - 1], mm = class {
|
|
|
8794
8863
|
}
|
|
8795
8864
|
}), this);
|
|
8796
8865
|
}
|
|
8797
|
-
},
|
|
8866
|
+
}, wm = class {
|
|
8798
8867
|
constructor(e) {
|
|
8799
8868
|
this.selfOptions = e || {}, this.pipes = {};
|
|
8800
8869
|
}
|
|
@@ -8821,7 +8890,7 @@ var pm = (e) => e[e.length - 1], mm = class {
|
|
|
8821
8890
|
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);
|
|
8822
8891
|
return n.hasResult ? n.result : void 0;
|
|
8823
8892
|
}
|
|
8824
|
-
},
|
|
8893
|
+
}, Tm = (e, t, n, r) => e[n] === t[r], Em = (e, t, n, r) => {
|
|
8825
8894
|
var i, a, o;
|
|
8826
8895
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
8827
8896
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -8837,7 +8906,7 @@ var pm = (e) => e[e.length - 1], mm = class {
|
|
|
8837
8906
|
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);
|
|
8838
8907
|
}
|
|
8839
8908
|
return d;
|
|
8840
|
-
},
|
|
8909
|
+
}, Dm = (e, t, n, r) => {
|
|
8841
8910
|
let i = t.length, a = n.length, o = {
|
|
8842
8911
|
sequence: [],
|
|
8843
8912
|
indices1: [],
|
|
@@ -8859,11 +8928,11 @@ var pm = (e) => e[e.length - 1], mm = class {
|
|
|
8859
8928
|
}
|
|
8860
8929
|
}
|
|
8861
8930
|
return o;
|
|
8862
|
-
},
|
|
8931
|
+
}, Om = { get: (e, t, n, r) => {
|
|
8863
8932
|
let i = r || {};
|
|
8864
|
-
return
|
|
8865
|
-
} },
|
|
8866
|
-
function
|
|
8933
|
+
return Dm(Em(e, t, n || Tm, i), e, t, i);
|
|
8934
|
+
} }, km = 3;
|
|
8935
|
+
function Am(e, t, n, r) {
|
|
8867
8936
|
for (let i = 0; i < n; i++) {
|
|
8868
8937
|
let n = e[i];
|
|
8869
8938
|
for (let e = 0; e < r; e++) {
|
|
@@ -8873,7 +8942,7 @@ function Tm(e, t, n, r) {
|
|
|
8873
8942
|
}
|
|
8874
8943
|
return !1;
|
|
8875
8944
|
}
|
|
8876
|
-
function
|
|
8945
|
+
function jm(e, t, n, r, i) {
|
|
8877
8946
|
let a = e[n], o = t[r];
|
|
8878
8947
|
if (a === o) return !0;
|
|
8879
8948
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -8886,15 +8955,15 @@ function Em(e, t, n, r, i) {
|
|
|
8886
8955
|
let l = i.hashCache2[r];
|
|
8887
8956
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l !== void 0 && c === l;
|
|
8888
8957
|
}
|
|
8889
|
-
var
|
|
8958
|
+
var Mm = function(e) {
|
|
8890
8959
|
var t, n, r, i, a;
|
|
8891
8960
|
if (!e.leftIsArray) return;
|
|
8892
8961
|
let o = {
|
|
8893
8962
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
8894
8963
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
8895
8964
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
8896
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !
|
|
8897
|
-
for (; c + s < m && c + s < h &&
|
|
8965
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !Am(f, p, m, h)); s < m && s < h && jm(f, p, s, s, o);) l = s, g = new bm(f[l], p[l]), e.push(g, l), s++;
|
|
8966
|
+
for (; c + s < m && c + s < h && jm(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new bm(f[u], p[d]), e.push(g, d), c++;
|
|
8898
8967
|
let _;
|
|
8899
8968
|
if (s + c === m) {
|
|
8900
8969
|
if (m === h) {
|
|
@@ -8918,7 +8987,7 @@ var Dm = function(e) {
|
|
|
8918
8987
|
return;
|
|
8919
8988
|
}
|
|
8920
8989
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
8921
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
8990
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = Om.get(v, y, jm, o), x = [];
|
|
8922
8991
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
8923
8992
|
let t = `_${l}`;
|
|
8924
8993
|
_[t] = [
|
|
@@ -8939,8 +9008,8 @@ var Dm = function(e) {
|
|
|
8939
9008
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
8940
9009
|
u = x[n];
|
|
8941
9010
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
8942
|
-
if (u !== void 0 && r &&
|
|
8943
|
-
r.splice(1, 2, l,
|
|
9011
|
+
if (u !== void 0 && r && jm(v, y, u - s, l - s, o)) {
|
|
9012
|
+
r.splice(1, 2, l, km), r.splice(1, 2, l, km), C || (r[0] = ""), d = l, g = new bm(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
8944
9013
|
break;
|
|
8945
9014
|
}
|
|
8946
9015
|
}
|
|
@@ -8948,20 +9017,20 @@ var Dm = function(e) {
|
|
|
8948
9017
|
} else {
|
|
8949
9018
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
8950
9019
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
8951
|
-
d = b.indices2[t] + s, g = new
|
|
9020
|
+
d = b.indices2[t] + s, g = new bm(f[u], p[d]), e.push(g, d);
|
|
8952
9021
|
}
|
|
8953
9022
|
}
|
|
8954
9023
|
e.setResult(_).exit();
|
|
8955
9024
|
};
|
|
8956
|
-
|
|
8957
|
-
var
|
|
9025
|
+
Mm.filterName = "arrays";
|
|
9026
|
+
var Nm = {
|
|
8958
9027
|
numerically(e, t) {
|
|
8959
9028
|
return e - t;
|
|
8960
9029
|
},
|
|
8961
9030
|
numericallyBy(e) {
|
|
8962
9031
|
return (t, n) => t[e] - n[e];
|
|
8963
9032
|
}
|
|
8964
|
-
},
|
|
9033
|
+
}, Pm = function(e) {
|
|
8965
9034
|
var t;
|
|
8966
9035
|
if (!e.nested) return;
|
|
8967
9036
|
let n = e.delta;
|
|
@@ -8970,7 +9039,7 @@ var Om = {
|
|
|
8970
9039
|
for (r in a) if (r !== "_t") {
|
|
8971
9040
|
if (r[0] === "_") {
|
|
8972
9041
|
let e = r;
|
|
8973
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
9042
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === km)) s.push(Number.parseInt(r.slice(1), 10));
|
|
8974
9043
|
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]}`);
|
|
8975
9044
|
} else {
|
|
8976
9045
|
let e = r;
|
|
@@ -8983,15 +9052,15 @@ var Om = {
|
|
|
8983
9052
|
});
|
|
8984
9053
|
}
|
|
8985
9054
|
}
|
|
8986
|
-
for (s = s.sort(
|
|
9055
|
+
for (s = s.sort(Nm.numerically), r = s.length - 1; r >= 0; r--) {
|
|
8987
9056
|
if (i = s[r], i === void 0) continue;
|
|
8988
9057
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
8989
|
-
(e == null ? void 0 : e[2]) ===
|
|
9058
|
+
(e == null ? void 0 : e[2]) === km && c.push({
|
|
8990
9059
|
index: e[1],
|
|
8991
9060
|
value: t
|
|
8992
9061
|
});
|
|
8993
9062
|
}
|
|
8994
|
-
c = c.sort(
|
|
9063
|
+
c = c.sort(Nm.numericallyBy("index"));
|
|
8995
9064
|
let u = c.length;
|
|
8996
9065
|
for (r = 0; r < u; r++) {
|
|
8997
9066
|
let e = c[r];
|
|
@@ -9001,7 +9070,7 @@ var Om = {
|
|
|
9001
9070
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
9002
9071
|
let t = l[r];
|
|
9003
9072
|
if (t === void 0) continue;
|
|
9004
|
-
let n = new
|
|
9073
|
+
let n = new xm(o[t.index], t.delta);
|
|
9005
9074
|
e.push(n, t.index);
|
|
9006
9075
|
}
|
|
9007
9076
|
if (!e.children) {
|
|
@@ -9010,8 +9079,8 @@ var Om = {
|
|
|
9010
9079
|
}
|
|
9011
9080
|
e.exit();
|
|
9012
9081
|
};
|
|
9013
|
-
|
|
9014
|
-
var
|
|
9082
|
+
Pm.filterName = "arrays";
|
|
9083
|
+
var Fm = function(e) {
|
|
9015
9084
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
9016
9085
|
let t = e.left, n = e.children.length;
|
|
9017
9086
|
for (let r = 0; r < n; r++) {
|
|
@@ -9022,16 +9091,16 @@ var Am = function(e) {
|
|
|
9022
9091
|
}
|
|
9023
9092
|
e.setResult(t).exit();
|
|
9024
9093
|
};
|
|
9025
|
-
|
|
9026
|
-
var
|
|
9094
|
+
Fm.filterName = "arraysCollectChildren";
|
|
9095
|
+
var Im = function(e) {
|
|
9027
9096
|
if (!e.nested) {
|
|
9028
9097
|
let t = e.delta;
|
|
9029
|
-
if (t[2] ===
|
|
9098
|
+
if (t[2] === km) {
|
|
9030
9099
|
let n = t;
|
|
9031
9100
|
e.newName = `_${n[1]}`, e.setResult([
|
|
9032
9101
|
n[0],
|
|
9033
9102
|
Number.parseInt(e.childName.substring(1), 10),
|
|
9034
|
-
|
|
9103
|
+
km
|
|
9035
9104
|
]).exit();
|
|
9036
9105
|
}
|
|
9037
9106
|
return;
|
|
@@ -9041,20 +9110,20 @@ var jm = function(e) {
|
|
|
9041
9110
|
let n = t;
|
|
9042
9111
|
for (let t in n) {
|
|
9043
9112
|
if (t === "_t") continue;
|
|
9044
|
-
let r = new
|
|
9113
|
+
let r = new Sm(n[t]);
|
|
9045
9114
|
e.push(r, t);
|
|
9046
9115
|
}
|
|
9047
9116
|
e.exit();
|
|
9048
9117
|
};
|
|
9049
|
-
|
|
9050
|
-
var
|
|
9118
|
+
Im.filterName = "arrays";
|
|
9119
|
+
var Lm = (e, t, n) => {
|
|
9051
9120
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
9052
9121
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
9053
9122
|
let r = +t;
|
|
9054
9123
|
for (let n in e) {
|
|
9055
9124
|
let i = e[n];
|
|
9056
9125
|
if (Array.isArray(i)) {
|
|
9057
|
-
if (i[2] ===
|
|
9126
|
+
if (i[2] === km) {
|
|
9058
9127
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
9059
9128
|
if (a === +t) return e;
|
|
9060
9129
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
@@ -9062,7 +9131,7 @@ var Mm = (e, t, n) => {
|
|
|
9062
9131
|
}
|
|
9063
9132
|
}
|
|
9064
9133
|
return r;
|
|
9065
|
-
},
|
|
9134
|
+
}, Rm = (e) => {
|
|
9066
9135
|
if (!e || !e.children) return;
|
|
9067
9136
|
let t = e.delta;
|
|
9068
9137
|
if (t._t !== "a") return;
|
|
@@ -9073,22 +9142,22 @@ var Mm = (e, t, n) => {
|
|
|
9073
9142
|
let a = r.newName;
|
|
9074
9143
|
if (a === void 0) {
|
|
9075
9144
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
9076
|
-
a =
|
|
9145
|
+
a = Lm(n, r.childName, r.result);
|
|
9077
9146
|
}
|
|
9078
9147
|
i[a] !== r.result && (i[a] = r.result);
|
|
9079
9148
|
}
|
|
9080
9149
|
e.setResult(i).exit();
|
|
9081
9150
|
};
|
|
9082
|
-
|
|
9151
|
+
Rm.filterName = "arraysCollectChildren";
|
|
9083
9152
|
//#endregion
|
|
9084
9153
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
9085
|
-
var
|
|
9154
|
+
var zm = function(e) {
|
|
9086
9155
|
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();
|
|
9087
9156
|
};
|
|
9088
|
-
|
|
9157
|
+
zm.filterName = "dates";
|
|
9089
9158
|
//#endregion
|
|
9090
9159
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
9091
|
-
var
|
|
9160
|
+
var Bm = /* @__PURE__ */ new Set(["__proto__"]), Vm = (e) => {
|
|
9092
9161
|
if (!e || !e.children) return;
|
|
9093
9162
|
let t = e.children.length, n = e.result;
|
|
9094
9163
|
for (let r = 0; r < t; r++) {
|
|
@@ -9100,18 +9169,18 @@ var Fm = /* @__PURE__ */ new Set(["__proto__"]), Im = (e) => {
|
|
|
9100
9169
|
}
|
|
9101
9170
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
9102
9171
|
};
|
|
9103
|
-
|
|
9104
|
-
var
|
|
9172
|
+
Vm.filterName = "collectChildren";
|
|
9173
|
+
var Hm = (e) => {
|
|
9105
9174
|
var t;
|
|
9106
9175
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
9107
9176
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
9108
9177
|
for (let t in n) {
|
|
9109
9178
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
9110
|
-
let a = new
|
|
9179
|
+
let a = new bm(n[t], r[t]);
|
|
9111
9180
|
e.push(a, t);
|
|
9112
9181
|
}
|
|
9113
9182
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
9114
|
-
let n = new
|
|
9183
|
+
let n = new bm(void 0, r[t]);
|
|
9115
9184
|
e.push(n, t);
|
|
9116
9185
|
}
|
|
9117
9186
|
if (!e.children || e.children.length === 0) {
|
|
@@ -9120,15 +9189,15 @@ var Lm = (e) => {
|
|
|
9120
9189
|
}
|
|
9121
9190
|
e.exit();
|
|
9122
9191
|
};
|
|
9123
|
-
|
|
9124
|
-
var
|
|
9192
|
+
Hm.filterName = "objects";
|
|
9193
|
+
var Um = function(e) {
|
|
9125
9194
|
if (!e.nested) return;
|
|
9126
9195
|
let t = e.delta;
|
|
9127
9196
|
if (t._t) return;
|
|
9128
9197
|
let n = t, r = !1;
|
|
9129
9198
|
for (let t in n) {
|
|
9130
|
-
if (
|
|
9131
|
-
let i = e.left, a = new
|
|
9199
|
+
if (Bm.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
9200
|
+
let i = e.left, a = new xm(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
9132
9201
|
e.push(a, t), r = !0;
|
|
9133
9202
|
}
|
|
9134
9203
|
if (!r) {
|
|
@@ -9137,8 +9206,8 @@ var Rm = function(e) {
|
|
|
9137
9206
|
}
|
|
9138
9207
|
e.exit();
|
|
9139
9208
|
};
|
|
9140
|
-
|
|
9141
|
-
var
|
|
9209
|
+
Um.filterName = "objects";
|
|
9210
|
+
var Wm = function(e) {
|
|
9142
9211
|
if (!e || !e.children || e.delta._t) return;
|
|
9143
9212
|
if (e.left === null || typeof e.left != "object") {
|
|
9144
9213
|
e.setResult(e.left).exit();
|
|
@@ -9149,17 +9218,17 @@ var zm = function(e) {
|
|
|
9149
9218
|
let n = e.children[r];
|
|
9150
9219
|
if (n === void 0) continue;
|
|
9151
9220
|
let i = n.childName;
|
|
9152
|
-
|
|
9221
|
+
Bm.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
9153
9222
|
}
|
|
9154
9223
|
e.setResult(t).exit();
|
|
9155
9224
|
};
|
|
9156
|
-
|
|
9157
|
-
var
|
|
9225
|
+
Wm.filterName = "collectChildren";
|
|
9226
|
+
var Gm = function(e) {
|
|
9158
9227
|
if (!e.nested || e.delta._t) return;
|
|
9159
9228
|
let t = e.delta, n = !1;
|
|
9160
9229
|
for (let r in t) {
|
|
9161
|
-
if (
|
|
9162
|
-
let i = new
|
|
9230
|
+
if (Bm.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
9231
|
+
let i = new Sm(t[r]);
|
|
9163
9232
|
e.push(i, r), n = !0;
|
|
9164
9233
|
}
|
|
9165
9234
|
if (!n) {
|
|
@@ -9168,25 +9237,25 @@ var Bm = function(e) {
|
|
|
9168
9237
|
}
|
|
9169
9238
|
e.exit();
|
|
9170
9239
|
};
|
|
9171
|
-
|
|
9172
|
-
var
|
|
9240
|
+
Gm.filterName = "objects";
|
|
9241
|
+
var Km = (e) => {
|
|
9173
9242
|
if (!e || !e.children || e.delta._t) return;
|
|
9174
9243
|
let t = e.children.length, n = {};
|
|
9175
9244
|
for (let r = 0; r < t; r++) {
|
|
9176
9245
|
let t = e.children[r];
|
|
9177
9246
|
if (t === void 0) continue;
|
|
9178
9247
|
let i = t.childName;
|
|
9179
|
-
|
|
9248
|
+
Bm.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
9180
9249
|
}
|
|
9181
9250
|
e.setResult(n).exit();
|
|
9182
9251
|
};
|
|
9183
|
-
|
|
9252
|
+
Km.filterName = "collectChildren";
|
|
9184
9253
|
//#endregion
|
|
9185
9254
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
9186
|
-
var
|
|
9187
|
-
function
|
|
9255
|
+
var qm = 2, Jm = 60, Ym = null;
|
|
9256
|
+
function Xm(e, t) {
|
|
9188
9257
|
var n;
|
|
9189
|
-
if (!
|
|
9258
|
+
if (!Ym) {
|
|
9190
9259
|
let r;
|
|
9191
9260
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
9192
9261
|
else {
|
|
@@ -9194,7 +9263,7 @@ function Gm(e, t) {
|
|
|
9194
9263
|
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.");
|
|
9195
9264
|
throw e.diff_match_patch_not_found = !0, e;
|
|
9196
9265
|
}
|
|
9197
|
-
|
|
9266
|
+
Ym = {
|
|
9198
9267
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
9199
9268
|
patch: (e, t) => {
|
|
9200
9269
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -9206,17 +9275,17 @@ function Gm(e, t) {
|
|
|
9206
9275
|
}
|
|
9207
9276
|
};
|
|
9208
9277
|
}
|
|
9209
|
-
return
|
|
9278
|
+
return Ym;
|
|
9210
9279
|
}
|
|
9211
|
-
var
|
|
9280
|
+
var Zm = function(e) {
|
|
9212
9281
|
var t, n;
|
|
9213
9282
|
if (e.leftType !== "string") return;
|
|
9214
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
9283
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || Jm;
|
|
9215
9284
|
if (r.length < a || i.length < a) {
|
|
9216
9285
|
e.setResult([r, i]).exit();
|
|
9217
9286
|
return;
|
|
9218
9287
|
}
|
|
9219
|
-
let o =
|
|
9288
|
+
let o = Xm(e.options);
|
|
9220
9289
|
if (!o) {
|
|
9221
9290
|
e.setResult([r, i]).exit();
|
|
9222
9291
|
return;
|
|
@@ -9225,19 +9294,19 @@ var Km = function(e) {
|
|
|
9225
9294
|
e.setResult([
|
|
9226
9295
|
s(r, i),
|
|
9227
9296
|
0,
|
|
9228
|
-
|
|
9297
|
+
qm
|
|
9229
9298
|
]).exit();
|
|
9230
9299
|
};
|
|
9231
|
-
|
|
9232
|
-
var
|
|
9300
|
+
Zm.filterName = "texts";
|
|
9301
|
+
var Qm = function(e) {
|
|
9233
9302
|
if (e.nested) return;
|
|
9234
9303
|
let t = e.delta;
|
|
9235
|
-
if (t[2] !==
|
|
9236
|
-
let n = t, r =
|
|
9304
|
+
if (t[2] !== qm) return;
|
|
9305
|
+
let n = t, r = Xm(e.options, !0).patch;
|
|
9237
9306
|
e.setResult(r(e.left, n[0])).exit();
|
|
9238
9307
|
};
|
|
9239
|
-
|
|
9240
|
-
var
|
|
9308
|
+
Qm.filterName = "texts";
|
|
9309
|
+
var $m = (e) => {
|
|
9241
9310
|
var t, n, r;
|
|
9242
9311
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
9243
9312
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -9258,21 +9327,21 @@ var Jm = (e) => {
|
|
|
9258
9327
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
9259
9328
|
}
|
|
9260
9329
|
return a.join("\n");
|
|
9261
|
-
},
|
|
9330
|
+
}, eh = function(e) {
|
|
9262
9331
|
if (e.nested) return;
|
|
9263
9332
|
let t = e.delta;
|
|
9264
|
-
if (t[2] !==
|
|
9333
|
+
if (t[2] !== qm) return;
|
|
9265
9334
|
let n = t;
|
|
9266
9335
|
e.setResult([
|
|
9267
|
-
|
|
9336
|
+
$m(n[0]),
|
|
9268
9337
|
0,
|
|
9269
|
-
|
|
9338
|
+
qm
|
|
9270
9339
|
]).exit();
|
|
9271
9340
|
};
|
|
9272
|
-
|
|
9341
|
+
eh.filterName = "texts";
|
|
9273
9342
|
//#endregion
|
|
9274
9343
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
9275
|
-
var
|
|
9344
|
+
var th = function(e) {
|
|
9276
9345
|
if (e.left === e.right) {
|
|
9277
9346
|
e.setResult(void 0).exit();
|
|
9278
9347
|
return;
|
|
@@ -9305,8 +9374,8 @@ var Xm = function(e) {
|
|
|
9305
9374
|
}
|
|
9306
9375
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
9307
9376
|
};
|
|
9308
|
-
|
|
9309
|
-
var
|
|
9377
|
+
th.filterName = "trivial";
|
|
9378
|
+
var nh = function(e) {
|
|
9310
9379
|
if (e.delta === void 0) {
|
|
9311
9380
|
e.setResult(e.left).exit();
|
|
9312
9381
|
return;
|
|
@@ -9330,8 +9399,8 @@ var Zm = function(e) {
|
|
|
9330
9399
|
}
|
|
9331
9400
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
9332
9401
|
};
|
|
9333
|
-
|
|
9334
|
-
var
|
|
9402
|
+
nh.filterName = "trivial";
|
|
9403
|
+
var rh = function(e) {
|
|
9335
9404
|
if (e.delta === void 0) {
|
|
9336
9405
|
e.setResult(e.delta).exit();
|
|
9337
9406
|
return;
|
|
@@ -9352,36 +9421,36 @@ var Qm = function(e) {
|
|
|
9352
9421
|
}
|
|
9353
9422
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
9354
9423
|
};
|
|
9355
|
-
|
|
9424
|
+
rh.filterName = "trivial";
|
|
9356
9425
|
//#endregion
|
|
9357
9426
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
9358
|
-
var
|
|
9427
|
+
var ih = class {
|
|
9359
9428
|
constructor(e) {
|
|
9360
|
-
this.processor = new
|
|
9429
|
+
this.processor = new wm(e), this.processor.pipe(new Cm("diff").append(Vm, th, zm, Zm, Hm, Mm).shouldHaveResult()), this.processor.pipe(new Cm("patch").append(Wm, Fm, nh, Qm, Um, Pm).shouldHaveResult()), this.processor.pipe(new Cm("reverse").append(Km, Rm, rh, eh, Gm, Im).shouldHaveResult());
|
|
9361
9430
|
}
|
|
9362
9431
|
options(e) {
|
|
9363
9432
|
return this.processor.options(e);
|
|
9364
9433
|
}
|
|
9365
9434
|
diff(e, t) {
|
|
9366
|
-
return this.processor.process(new
|
|
9435
|
+
return this.processor.process(new bm(e, t));
|
|
9367
9436
|
}
|
|
9368
9437
|
patch(e, t) {
|
|
9369
|
-
return this.processor.process(new
|
|
9438
|
+
return this.processor.process(new xm(e, t));
|
|
9370
9439
|
}
|
|
9371
9440
|
reverse(e) {
|
|
9372
|
-
return this.processor.process(new
|
|
9441
|
+
return this.processor.process(new Sm(e));
|
|
9373
9442
|
}
|
|
9374
9443
|
unpatch(e, t) {
|
|
9375
9444
|
return this.patch(e, this.reverse(t));
|
|
9376
9445
|
}
|
|
9377
9446
|
clone(e) {
|
|
9378
|
-
return
|
|
9447
|
+
return gm(e);
|
|
9379
9448
|
}
|
|
9380
9449
|
};
|
|
9381
9450
|
//#endregion
|
|
9382
9451
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
9383
|
-
function
|
|
9384
|
-
return new
|
|
9452
|
+
function ah(e) {
|
|
9453
|
+
return new ih(e);
|
|
9385
9454
|
}
|
|
9386
9455
|
//#endregion
|
|
9387
9456
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -9943,46 +10012,46 @@ $.Diff = function(e, t) {
|
|
|
9943
10012
|
};
|
|
9944
10013
|
//#endregion
|
|
9945
10014
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
9946
|
-
var
|
|
10015
|
+
var oh = (e = {}) => ah({
|
|
9947
10016
|
...e,
|
|
9948
10017
|
textDiff: {
|
|
9949
10018
|
diffMatchPatch: $,
|
|
9950
10019
|
minLength: 120
|
|
9951
10020
|
},
|
|
9952
10021
|
cloneDiffValues: !0
|
|
9953
|
-
}),
|
|
10022
|
+
}), sh = ["user", "unittemplate"], ch = oh(), lh = (e, t, n) => {
|
|
9954
10023
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
9955
10024
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
9956
10025
|
let n = r[t[e]];
|
|
9957
10026
|
if (n) return n;
|
|
9958
10027
|
}
|
|
9959
10028
|
return n || "";
|
|
9960
|
-
},
|
|
10029
|
+
}, uh = (e) => {
|
|
9961
10030
|
let t = (e) => rr(e) ? hr(e) : String(e);
|
|
9962
10031
|
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);
|
|
9963
|
-
},
|
|
10032
|
+
}, dh = (e) => {
|
|
9964
10033
|
switch (e.length) {
|
|
9965
10034
|
case 1: {
|
|
9966
10035
|
let [t] = e;
|
|
9967
10036
|
return {
|
|
9968
10037
|
type: "created",
|
|
9969
10038
|
before: "",
|
|
9970
|
-
after:
|
|
10039
|
+
after: uh(t)
|
|
9971
10040
|
};
|
|
9972
10041
|
}
|
|
9973
10042
|
case 2: {
|
|
9974
10043
|
let [t, n] = e;
|
|
9975
10044
|
return {
|
|
9976
10045
|
type: "modified",
|
|
9977
|
-
before:
|
|
9978
|
-
after:
|
|
10046
|
+
before: uh(t),
|
|
10047
|
+
after: uh(n)
|
|
9979
10048
|
};
|
|
9980
10049
|
}
|
|
9981
10050
|
case 3: {
|
|
9982
10051
|
let [t] = e;
|
|
9983
10052
|
return {
|
|
9984
10053
|
type: "deleted",
|
|
9985
|
-
before:
|
|
10054
|
+
before: uh(t),
|
|
9986
10055
|
after: ""
|
|
9987
10056
|
};
|
|
9988
10057
|
}
|
|
@@ -9992,15 +10061,15 @@ var th = (e = {}) => eh({
|
|
|
9992
10061
|
after: ""
|
|
9993
10062
|
};
|
|
9994
10063
|
}
|
|
9995
|
-
},
|
|
9996
|
-
let r =
|
|
10064
|
+
}, fh = (e) => Array.isArray(e), ph = (e, t) => t ? fh(t) ? t.length === 0 ? e : t.reduce((e, t) => ch.unpatch(nn(e), nn(t)), nn(e)) : ch.unpatch(nn(e), nn(t)) : e, mh = (e) => e.createdAt || e.date, hh = (e, t, n) => {
|
|
10065
|
+
let r = mh(e);
|
|
9997
10066
|
if (!r) return {
|
|
9998
10067
|
oldJson: "",
|
|
9999
10068
|
newJson: "",
|
|
10000
10069
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
10001
10070
|
};
|
|
10002
10071
|
let i = t.filter((e) => {
|
|
10003
|
-
let t =
|
|
10072
|
+
let t = mh(e);
|
|
10004
10073
|
return !!(e.diffs && t && t >= r);
|
|
10005
10074
|
}), a = Array.from({ length: i.length + 1 });
|
|
10006
10075
|
a[0] = nn(n);
|
|
@@ -10013,7 +10082,7 @@ var th = (e = {}) => eh({
|
|
|
10013
10082
|
a[e + 1] = a[e];
|
|
10014
10083
|
continue;
|
|
10015
10084
|
}
|
|
10016
|
-
a[e + 1] =
|
|
10085
|
+
a[e + 1] = ph(a[e], t);
|
|
10017
10086
|
}
|
|
10018
10087
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
10019
10088
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -10028,10 +10097,10 @@ var th = (e = {}) => eh({
|
|
|
10028
10097
|
oldJson: o,
|
|
10029
10098
|
newJson: s
|
|
10030
10099
|
};
|
|
10031
|
-
},
|
|
10100
|
+
}, gh = (e, t, n = {}, r = []) => {
|
|
10032
10101
|
var i;
|
|
10033
10102
|
if (!e) return;
|
|
10034
|
-
let a = [...
|
|
10103
|
+
let a = [...sh, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
10035
10104
|
Object.keys(e).forEach((i) => {
|
|
10036
10105
|
var o;
|
|
10037
10106
|
let s = e[i];
|
|
@@ -10044,12 +10113,12 @@ var th = (e = {}) => eh({
|
|
|
10044
10113
|
cn(s) ? t.push({
|
|
10045
10114
|
deltaFormat: [...s],
|
|
10046
10115
|
path: c
|
|
10047
|
-
}) : gn(s) &&
|
|
10116
|
+
}) : gn(s) && gh(s, t, n, c);
|
|
10048
10117
|
});
|
|
10049
|
-
},
|
|
10118
|
+
}, _h = (e, t = {}) => {
|
|
10050
10119
|
let n = [];
|
|
10051
|
-
return e ? (
|
|
10052
|
-
},
|
|
10120
|
+
return e ? (gh(e, n, t), n) : [];
|
|
10121
|
+
}, vh = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), yh = (e) => {
|
|
10053
10122
|
if (e == null || e === "") return "empty";
|
|
10054
10123
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
10055
10124
|
if (typeof e == "string") return e;
|
|
@@ -10060,27 +10129,27 @@ var th = (e = {}) => eh({
|
|
|
10060
10129
|
} catch {
|
|
10061
10130
|
return String(e);
|
|
10062
10131
|
}
|
|
10063
|
-
},
|
|
10132
|
+
}, bh = (e, t = e.length - 1) => {
|
|
10064
10133
|
if (t >= e.length) return "Value";
|
|
10065
10134
|
let n = e[t];
|
|
10066
|
-
return !n || er(n) ?
|
|
10067
|
-
},
|
|
10068
|
-
let o =
|
|
10135
|
+
return !n || er(n) ? bh(e, t - 1) : vh(n);
|
|
10136
|
+
}, xh = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
10137
|
+
let o = yh(r), s = yh(i), c = a ? ` in ${a}` : "";
|
|
10069
10138
|
switch (t) {
|
|
10070
10139
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
10071
10140
|
case "created": return `${e} created ${s}${c}.`;
|
|
10072
10141
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
10073
10142
|
default: return `${e} changed ${n}${c}.`;
|
|
10074
10143
|
}
|
|
10075
|
-
},
|
|
10144
|
+
}, Sh = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
|
|
10076
10145
|
let i = {
|
|
10077
10146
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
10078
10147
|
rows: n.map((n) => {
|
|
10079
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
10080
|
-
return { cells: [{ value:
|
|
10148
|
+
let { deltaFormat: i, path: a } = n, o = lh(e, a, r), { type: s, before: c, after: l } = dh(i);
|
|
10149
|
+
return { cells: [{ value: xh({
|
|
10081
10150
|
userName: t,
|
|
10082
10151
|
type: s,
|
|
10083
|
-
property:
|
|
10152
|
+
property: bh(a),
|
|
10084
10153
|
before: c,
|
|
10085
10154
|
after: l,
|
|
10086
10155
|
sectionName: o
|
|
@@ -10088,7 +10157,7 @@ var th = (e = {}) => eh({
|
|
|
10088
10157
|
})
|
|
10089
10158
|
};
|
|
10090
10159
|
return /* @__PURE__ */ S($l, { table: i });
|
|
10091
|
-
},
|
|
10160
|
+
}, Ch = Object.freeze({
|
|
10092
10161
|
summary: {
|
|
10093
10162
|
label: "Summary",
|
|
10094
10163
|
value: "summary"
|
|
@@ -10097,13 +10166,13 @@ var th = (e = {}) => eh({
|
|
|
10097
10166
|
label: "Compare",
|
|
10098
10167
|
value: "compare"
|
|
10099
10168
|
}
|
|
10100
|
-
}),
|
|
10101
|
-
let c = [
|
|
10169
|
+
}), wh = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
10170
|
+
let c = [Ch.summary, Ch.compare].map(({ label: e, value: t }) => ({
|
|
10102
10171
|
label: e,
|
|
10103
10172
|
value: t
|
|
10104
10173
|
})), [l, u] = v(c[0]), { diffs: d = void 0 } = e || {};
|
|
10105
10174
|
if (!d) return null;
|
|
10106
|
-
let { oldJson: f, newJson: p, error: m } =
|
|
10175
|
+
let { oldJson: f, newJson: p, error: m } = hh(e, t, n);
|
|
10107
10176
|
return /* @__PURE__ */ S(xs, {
|
|
10108
10177
|
visible: r,
|
|
10109
10178
|
centered: !0,
|
|
@@ -10111,20 +10180,20 @@ var th = (e = {}) => eh({
|
|
|
10111
10180
|
children: /* @__PURE__ */ S($o, { dialog: {
|
|
10112
10181
|
scroll: !0,
|
|
10113
10182
|
heading: "Comparison view",
|
|
10114
|
-
content: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(
|
|
10183
|
+
content: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(op, {
|
|
10115
10184
|
name: "ViewTab",
|
|
10116
10185
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
10117
10186
|
options: c,
|
|
10118
10187
|
value: l
|
|
10119
|
-
}), l.value === "summary" ? /* @__PURE__ */ S(
|
|
10188
|
+
}), l.value === "summary" ? /* @__PURE__ */ S(Sh, {
|
|
10120
10189
|
userName: e.userName,
|
|
10121
10190
|
sectionNames: a,
|
|
10122
|
-
diffs:
|
|
10191
|
+
diffs: _h(d, i),
|
|
10123
10192
|
defaultSectionName: o
|
|
10124
10193
|
}) : m ? /* @__PURE__ */ S("div", {
|
|
10125
10194
|
style: { padding: 16 },
|
|
10126
10195
|
children: m
|
|
10127
|
-
}) : /* @__PURE__ */ S(
|
|
10196
|
+
}) : /* @__PURE__ */ S(om, {
|
|
10128
10197
|
oldJson: f,
|
|
10129
10198
|
newJson: p
|
|
10130
10199
|
})] }),
|
|
@@ -10137,7 +10206,7 @@ var th = (e = {}) => eh({
|
|
|
10137
10206
|
height: "90vh"
|
|
10138
10207
|
} })
|
|
10139
10208
|
});
|
|
10140
|
-
},
|
|
10209
|
+
}, Th = [
|
|
10141
10210
|
{
|
|
10142
10211
|
label: "10 / page",
|
|
10143
10212
|
value: 10
|
|
@@ -10150,15 +10219,15 @@ var th = (e = {}) => eh({
|
|
|
10150
10219
|
label: "50 / page",
|
|
10151
10220
|
value: 50
|
|
10152
10221
|
}
|
|
10153
|
-
],
|
|
10154
|
-
let { diffs: r, userName: i, source: a, operation: o, operationMetaData: s } = e, c =
|
|
10222
|
+
], Eh = (e, t, n = {}) => {
|
|
10223
|
+
let { diffs: r, userName: i, source: a, operation: o, operationMetaData: s } = e, c = _h(r, n).length, l = c ? `${c} change${c === 1 ? "" : "s"}` : "no field changes";
|
|
10155
10224
|
if (a === "API" && !i) return o === "Created" ? "Created through API" : "Changed through API";
|
|
10156
10225
|
switch (o) {
|
|
10157
10226
|
case "Created": return "Created";
|
|
10158
10227
|
case "Cloned": return `Cloned (from design ID ${s})`;
|
|
10159
10228
|
case "Reverted": {
|
|
10160
|
-
let e = t.find((e) => e.id === s), n = e ?
|
|
10161
|
-
date:
|
|
10229
|
+
let e = t.find((e) => e.id === s), n = e ? mm({
|
|
10230
|
+
date: mh(e),
|
|
10162
10231
|
showTime: !0
|
|
10163
10232
|
}) : null;
|
|
10164
10233
|
return `Reverted${n ? ` (to ${n})` : ""}`;
|
|
@@ -10168,7 +10237,7 @@ var th = (e = {}) => eh({
|
|
|
10168
10237
|
case "Updated": return `Updated (${l})`;
|
|
10169
10238
|
default: return "Updated";
|
|
10170
10239
|
}
|
|
10171
|
-
},
|
|
10240
|
+
}, Dh = ({ 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, onClickNavigateToDesgin: g }) => {
|
|
10172
10241
|
let [_, y] = v(!1), [b, w] = v(null), T = (e) => {
|
|
10173
10242
|
if (e.snapshot) {
|
|
10174
10243
|
f == null || f(e.snapshot, e);
|
|
@@ -10187,7 +10256,7 @@ var th = (e = {}) => eh({
|
|
|
10187
10256
|
return {
|
|
10188
10257
|
cells: [
|
|
10189
10258
|
{
|
|
10190
|
-
value: t.snapshot ? `Snapshot: ${t.snapshot}` :
|
|
10259
|
+
value: t.snapshot ? `Snapshot: ${t.snapshot}` : Eh(t, e, l),
|
|
10191
10260
|
type: "Link",
|
|
10192
10261
|
disabled: a,
|
|
10193
10262
|
onClick: a ? void 0 : r && g ? () => g(t.operationMetaData) : () => T(t),
|
|
@@ -10206,8 +10275,8 @@ var th = (e = {}) => eh({
|
|
|
10206
10275
|
type: "Static"
|
|
10207
10276
|
},
|
|
10208
10277
|
{
|
|
10209
|
-
value:
|
|
10210
|
-
date:
|
|
10278
|
+
value: mm({
|
|
10279
|
+
date: mh(t),
|
|
10211
10280
|
showTime: !0
|
|
10212
10281
|
}),
|
|
10213
10282
|
type: "Static"
|
|
@@ -10250,14 +10319,14 @@ var th = (e = {}) => eh({
|
|
|
10250
10319
|
onChange: (e) => {
|
|
10251
10320
|
u(Number(e.target.value));
|
|
10252
10321
|
},
|
|
10253
|
-
options:
|
|
10322
|
+
options: Th,
|
|
10254
10323
|
value: a
|
|
10255
10324
|
},
|
|
10256
10325
|
onSelectPage: (e) => d(e),
|
|
10257
10326
|
small: !0
|
|
10258
10327
|
} }
|
|
10259
10328
|
} })
|
|
10260
|
-
}), _ && b && b.diffs && /* @__PURE__ */ S(
|
|
10329
|
+
}), _ && b && b.diffs && /* @__PURE__ */ S(wh, {
|
|
10261
10330
|
sectionNames: o,
|
|
10262
10331
|
isOpen: _,
|
|
10263
10332
|
onClose: () => y(!1),
|
|
@@ -10267,7 +10336,7 @@ var th = (e = {}) => eh({
|
|
|
10267
10336
|
data: t,
|
|
10268
10337
|
transformDiffsConfig: l
|
|
10269
10338
|
})] });
|
|
10270
|
-
},
|
|
10339
|
+
}, Oh = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
10271
10340
|
let i = window.location.href, a = _(i);
|
|
10272
10341
|
return d(() => {
|
|
10273
10342
|
a.current = i;
|
|
@@ -10290,20 +10359,20 @@ var th = (e = {}) => eh({
|
|
|
10290
10359
|
});
|
|
10291
10360
|
};
|
|
10292
10361
|
}, [e, t]), null;
|
|
10293
|
-
},
|
|
10362
|
+
}, kh = {
|
|
10294
10363
|
errorBoundary: "_errorBoundary_hmco0_1",
|
|
10295
10364
|
sidebarErrorBoundary: "_sidebarErrorBoundary_hmco0_5",
|
|
10296
10365
|
rightSidebarErrorBoundary: "_rightSidebarErrorBoundary_hmco0_6"
|
|
10297
|
-
},
|
|
10298
|
-
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } =
|
|
10366
|
+
}, Ah = ({ options: e }) => {
|
|
10367
|
+
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } = Vp();
|
|
10299
10368
|
if (t) return /* @__PURE__ */ S(t, {});
|
|
10300
10369
|
if (n || r) return /* @__PURE__ */ S("div", {
|
|
10301
|
-
className: b(n ?
|
|
10370
|
+
className: b(n ? kh.sidebarErrorBoundary : "", r ? kh.rightSidebarErrorBoundary : ""),
|
|
10302
10371
|
style: a,
|
|
10303
10372
|
children: o == null ? void 0 : o.unexpectedError
|
|
10304
10373
|
});
|
|
10305
10374
|
let s = /* @__PURE__ */ S("div", {
|
|
10306
|
-
className:
|
|
10375
|
+
className: kh.errorBoundary,
|
|
10307
10376
|
style: a,
|
|
10308
10377
|
children: /* @__PURE__ */ S(Vs, { message: {
|
|
10309
10378
|
icon: !0,
|
|
@@ -10318,19 +10387,19 @@ var th = (e = {}) => eh({
|
|
|
10318
10387
|
padding: 0,
|
|
10319
10388
|
children: s
|
|
10320
10389
|
}) : s;
|
|
10321
|
-
},
|
|
10322
|
-
fallback: /* @__PURE__ */ S(
|
|
10390
|
+
}, jh = ({ children: e, options: t }) => /* @__PURE__ */ S(Oi.ErrorBoundary, {
|
|
10391
|
+
fallback: /* @__PURE__ */ S(Ah, { options: t }),
|
|
10323
10392
|
onError: (e, t) => {
|
|
10324
10393
|
console.error("Error caught by boundary:", e, t);
|
|
10325
10394
|
},
|
|
10326
10395
|
children: e
|
|
10327
|
-
}),
|
|
10396
|
+
}), Mh = (e, t = {}) => (n) => /* @__PURE__ */ S(jh, {
|
|
10328
10397
|
options: t,
|
|
10329
10398
|
children: /* @__PURE__ */ S(e, { ...n })
|
|
10330
|
-
}),
|
|
10331
|
-
Lp
|
|
10332
|
-
e ===
|
|
10399
|
+
}), Nh = (e = {}) => (t) => Mh(t, e), Ph = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, Fh = (e) => {
|
|
10400
|
+
Hp(Lp.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
10401
|
+
e === Lp.Translations ? Hp(e, zp(t)) : Hp(e, Ph(t) ? t : { ...t });
|
|
10333
10402
|
});
|
|
10334
10403
|
};
|
|
10335
10404
|
//#endregion
|
|
10336
|
-
export { $i as Accordion, ka as AccordionWithDefaultToggle, so as Actions, ji as Align,
|
|
10405
|
+
export { $i as Accordion, ka as AccordionWithDefaultToggle, so as Actions, ji as Align, Dh as AuditLog, Qa as Badge, fo as Breadcrumb, lo as BreadcrumbLinkType, q as Button, mo as ButtonGroup, Mi as ButtonPosition, Na as ButtonType, go as Card, Ta as CheckBox, qi as Chevron, Xi as Collapse, Ai as Color, Lo as ColorInput, Io as ColorInputPopover, Ho as Column, $o as Dialog, nm as DiffCode, pm as DiffTable, om as DiffViewer, W as DisabledContext, qo as Divider, os as Drawer, pp as ElementType, uu as Empty, jh as ErrorBoundary, vd as Field, md as FileButton, gs as FileInput, yd as Flex, xd as FormRow, So as Grid, H as GroupOrder, Xo as Heading, wa as HelpIcon, G as Icon, U as IconType, ds as Input, ls as InputGroup, rl as InputGroupAddon, ps as InputReaderMethods, Fi as InputType, gd as Label, Pd as List, Cd as ListHeading, kd as ListSubheading, Id as Loader, yf as Mention, ao as Menu, Ha as MenuCarat, Va as MenuType, Vs as Message, Fs as MessageType, xs as Modal, qs as NativeSelect, vl as NumberInput, Ud as OptionDropdown, Gd as Page, il as Pagination, yp as PopConfirm, vo as Popover, Kd as Portal, Jd as PrintHeader, ws as ProgressBar, Yd as RadioButton, Ef as Resizable, vf as RichTextInput, xf as Row, Zc as Select, Yp as SettingField, jf as SideBar, Nf as Skeleton, Ol as Slider, ks as SmartUploadModal, _s as Spacer, Ma as Spinner, $l as Table, pd as TableImportExport, op as Tabs, Go as Text, lp as TextArea, sp as TextLink, Ni as TextTransform, Pi as Theme, Gr as Toaster, Zu as Toggle, K as Tooltip, gp as TopBar, wp as Tree, Ip as TreeTable, ki as TriggerType, $f as UnitInput, rp as UnitSlider, qp as UnitTable, Oh as UsageTracker, Ju as dismissToast, Xf as initializeContext, Fh as initializeGuiLibrary, ms as readFile, qu as toast, Js as useFocus, vs as useKeyboardEvent, Zs as useWindowWidth, Nh as withChainableErrorBoundary, Mh as withErrorBoundary };
|