@oliasoft-open-source/react-ui-library 9.2.0-beta-4 → 9.2.0-beta-6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/table/table-virtual-scroll-wrapper.d.ts.map +1 -1
- package/dist/components/table/table.d.ts +1 -0
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.stories-data.d.ts +56 -0
- package/dist/components/table/table.stories-data.d.ts.map +1 -1
- package/dist/components/table/table.stories.d.ts +1 -0
- package/dist/components/table/table.stories.d.ts.map +1 -1
- package/dist/index.js +623 -627
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4305,30 +4305,25 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4305
4305
|
})
|
|
4306
4306
|
}), document.body)]
|
|
4307
4307
|
}) : t({});
|
|
4308
|
-
}, Xl = 31, Zl = ({ table: e, children: t }) => {
|
|
4309
|
-
var n
|
|
4310
|
-
let
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
n.set(e, t);
|
|
4314
|
-
for (let e of n.keys()) e >= c && n.delete(e);
|
|
4315
|
-
let r = 0;
|
|
4316
|
-
for (let e of n.values()) r += e;
|
|
4317
|
-
n.size > 0 && (o.current = r / n.size);
|
|
4308
|
+
}, Xl = 31, Zl = 2, Ql = ({ table: e, children: t }) => {
|
|
4309
|
+
var n;
|
|
4310
|
+
let r = _(null), i = _(/* @__PURE__ */ new Map()), { estimateRowHeight: a, rowCount: o, rows: s } = e, c = (n = o == null ? s == null ? void 0 : s.length : o) == null ? 0 : n, l = (e) => {
|
|
4311
|
+
var t, n;
|
|
4312
|
+
return (t = (n = i.current.get(e)) == null ? a == null ? void 0 : a(e) : n) == null ? Xl : t;
|
|
4318
4313
|
}, u = Jr({
|
|
4319
4314
|
count: c,
|
|
4320
|
-
getScrollElement: () =>
|
|
4321
|
-
estimateSize:
|
|
4315
|
+
getScrollElement: () => r.current,
|
|
4316
|
+
estimateSize: l,
|
|
4322
4317
|
measureElement: (e) => {
|
|
4323
|
-
let t = e.getBoundingClientRect().height, n =
|
|
4324
|
-
return n
|
|
4318
|
+
let t = e.getAttribute("data-index"), n = t == null ? -1 : Number(t), r = Math.ceil(e.getBoundingClientRect().height), a = n >= 0 ? l(n) : Xl, o = Math.abs(r - a) <= Zl ? a : r;
|
|
4319
|
+
return n >= 0 && i.current.set(n, o), o;
|
|
4325
4320
|
},
|
|
4326
4321
|
overscan: 10
|
|
4327
4322
|
});
|
|
4328
|
-
return /* @__PURE__ */ S("div", {
|
|
4323
|
+
return u.shouldAdjustScrollPositionOnItemSizeChange = () => !1, /* @__PURE__ */ S("div", {
|
|
4329
4324
|
id: "scrollWrapper",
|
|
4330
4325
|
className: b(Ks.scroll, Ks.virtualScroll),
|
|
4331
|
-
ref:
|
|
4326
|
+
ref: r,
|
|
4332
4327
|
children: t({
|
|
4333
4328
|
virtualizer: u,
|
|
4334
4329
|
tableStyle: (() => {
|
|
@@ -4340,7 +4335,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4340
4335
|
})()
|
|
4341
4336
|
})
|
|
4342
4337
|
});
|
|
4343
|
-
},
|
|
4338
|
+
}, $l = ({ activeIndex: e, triggerScrollToActiveRow: t, isVirtualized: n, virtualizer: r }) => (d(() => {
|
|
4344
4339
|
if (t && !(e == null || e < 0)) {
|
|
4345
4340
|
if (n && r) r.scrollToIndex(e, {
|
|
4346
4341
|
behavior: "auto",
|
|
@@ -4359,11 +4354,11 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4359
4354
|
t,
|
|
4360
4355
|
n,
|
|
4361
4356
|
r
|
|
4362
|
-
]), null),
|
|
4357
|
+
]), null), eu = ({ table: e, children: t }) => {
|
|
4363
4358
|
let { infiniteScroll: n = !1, triggerScrollToActiveRow: r = !1, rows: i } = e, a = h(() => typeof e.activeRowIndex == "number" ? e.activeRowIndex : Array.isArray(i) && i.length ? i.findIndex((e) => e && e.active) : -1, [i, e.activeRowIndex]);
|
|
4364
|
-
return n ? /* @__PURE__ */ S(
|
|
4359
|
+
return n ? /* @__PURE__ */ S(Ql, {
|
|
4365
4360
|
table: e,
|
|
4366
|
-
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(
|
|
4361
|
+
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S($l, {
|
|
4367
4362
|
isVirtualized: !0,
|
|
4368
4363
|
virtualizer: e,
|
|
4369
4364
|
activeIndex: a,
|
|
@@ -4375,13 +4370,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4375
4370
|
}) : /* @__PURE__ */ C("div", {
|
|
4376
4371
|
id: "scrollWrapper",
|
|
4377
4372
|
className: Ks.scroll,
|
|
4378
|
-
children: [/* @__PURE__ */ S(
|
|
4373
|
+
children: [/* @__PURE__ */ S($l, {
|
|
4379
4374
|
isVirtualized: !1,
|
|
4380
4375
|
activeIndex: a,
|
|
4381
4376
|
triggerScrollToActiveRow: r
|
|
4382
4377
|
}), t({})]
|
|
4383
4378
|
});
|
|
4384
|
-
},
|
|
4379
|
+
}, tu = (e) => {
|
|
4385
4380
|
var t, n, r, i, a;
|
|
4386
4381
|
let { onListReorder: o = () => {}, canListReorder: s = () => !0, beforeRenderRow: c, table: l } = e, { columnWidths: u, footer: d, name: f, rows: p = [], actions: m, actionsRight: h, columnHeaderAlignments: g, columnAlignment: v, striped: y = !0, testId: x, draggable: w, defaultEmptyRow: T = null, onAddRow: E = null, bordered: D = !0, maxHeight: O, fixedWidth: k } = l, A = _(null), j = sn(e, "table.headers", []), M = dl(p, j), N = pl(p, j), P = M + +!!N, F = !d || (d == null || (t = d.pagination) == null || (t = t.rowsPerPage) == null ? void 0 : t.value) === 0 || Number(d == null || (n = d.pagination) == null ? void 0 : n.selectedPage) >= Number(d == null || (r = d.pagination) == null ? void 0 : r.rowCount) / Number(d == null || (i = d.pagination) == null || (i = i.rowsPerPage) == null ? void 0 : i.value), I = (T == null || (a = T.cells) == null ? void 0 : a.length) && E && F, L = {
|
|
4387
4382
|
cells: I ? T.cells.map((e, t) => (e == null ? void 0 : e.type) === "Input" ? {
|
|
@@ -4430,7 +4425,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4430
4425
|
rows: R,
|
|
4431
4426
|
tbodyRef: A,
|
|
4432
4427
|
canListReorder: s,
|
|
4433
|
-
children: ({ dropDisabled: e }) => /* @__PURE__ */ S(
|
|
4428
|
+
children: ({ dropDisabled: e }) => /* @__PURE__ */ S(eu, {
|
|
4434
4429
|
table: z,
|
|
4435
4430
|
children: ({ virtualizer: t, tableStyle: n }) => /* @__PURE__ */ C("table", {
|
|
4436
4431
|
className: b(Ks.table, y ? Ks.striped : ""),
|
|
@@ -4463,6 +4458,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4463
4458
|
hasRowActions: N,
|
|
4464
4459
|
columnAlignment: v,
|
|
4465
4460
|
draggableTable: w,
|
|
4461
|
+
height: n.size,
|
|
4466
4462
|
dropDisabled: e,
|
|
4467
4463
|
measureRef: t.measureElement
|
|
4468
4464
|
}, `1_${r}`);
|
|
@@ -4494,14 +4490,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4494
4490
|
})
|
|
4495
4491
|
]
|
|
4496
4492
|
});
|
|
4497
|
-
},
|
|
4493
|
+
}, nu = "blank", ru = 1e4, iu = (e, t, n, r) => {
|
|
4498
4494
|
let i = `${t} → ${n}:`, a = e.filter((e) => !e.startsWith(i)), o = r ? [...a, `${i} ${r}`] : a;
|
|
4499
4495
|
return {
|
|
4500
4496
|
updatedErrors: o,
|
|
4501
4497
|
isValid: o.length === 0
|
|
4502
4498
|
};
|
|
4503
|
-
},
|
|
4504
|
-
let i = h(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, o] = v(
|
|
4499
|
+
}, au = 20, ou = 1, su = ({ validationRules: e, parsedResult: t, updateState: n, testId: r }) => {
|
|
4500
|
+
let i = h(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, o] = v(au), [s, c] = v(ou), u = _([]), f = (s - 1) * a, p = a === 0 ? t.rows.length : f + a, [m, g] = v([]), y = h(() => {
|
|
4505
4501
|
let n = e.filter((e) => !e.optionalColumn);
|
|
4506
4502
|
return t.fields.length === n.length ? n : e;
|
|
4507
4503
|
}, [e, t.fields.length]), b = l((e, r) => (!u.current.length && t.rows.length && (u.current = t.rows[0].map((e) => Kc(e) ? "NumberInput" : "Input")), {
|
|
@@ -4515,7 +4511,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4515
4511
|
disableValidationOnFocus: !0,
|
|
4516
4512
|
error: x,
|
|
4517
4513
|
validationCallback: (e, i) => {
|
|
4518
|
-
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } =
|
|
4514
|
+
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } = iu(t.errors, a, e, i);
|
|
4519
4515
|
n({ parsedResult: {
|
|
4520
4516
|
...t,
|
|
4521
4517
|
errors: o,
|
|
@@ -4524,7 +4520,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4524
4520
|
},
|
|
4525
4521
|
onChange: (e) => {
|
|
4526
4522
|
var i;
|
|
4527
|
-
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } =
|
|
4523
|
+
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } = iu(t.errors, s, m, c), d = t.rows.map((e, t) => t === r ? e.map((e, t) => t === a ? o : e) : e);
|
|
4528
4524
|
n({ parsedResult: {
|
|
4529
4525
|
...t,
|
|
4530
4526
|
rows: d,
|
|
@@ -4566,7 +4562,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4566
4562
|
]);
|
|
4567
4563
|
let x = h(() => t.fields.map((e, r) => {
|
|
4568
4564
|
var a, o, s;
|
|
4569
|
-
let c = y == null ? void 0 : y[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => Sn(e) ===
|
|
4565
|
+
let c = y == null ? void 0 : y[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => Sn(e) === nu);
|
|
4570
4566
|
if (!l.length || u) return {};
|
|
4571
4567
|
let d = t == null || (a = t.units) == null ? void 0 : a[r], f = Sn(d), p = l != null && l.some((e) => Sn(e) === f) ? d : (o = c == null ? void 0 : c.defaultUnit) == null ? "" : o;
|
|
4572
4568
|
return {
|
|
@@ -4614,7 +4610,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4614
4610
|
b,
|
|
4615
4611
|
f
|
|
4616
4612
|
]);
|
|
4617
|
-
return /* @__PURE__ */ S(
|
|
4613
|
+
return /* @__PURE__ */ S(tu, {
|
|
4618
4614
|
beforeRenderRow: E,
|
|
4619
4615
|
onListReorder: ({ from: e, to: r }) => {
|
|
4620
4616
|
let i = [...t.rows], [a] = i.splice(e, 1);
|
|
@@ -4677,7 +4673,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4677
4673
|
} }
|
|
4678
4674
|
}
|
|
4679
4675
|
});
|
|
4680
|
-
},
|
|
4676
|
+
}, cu = { listStyle: "_listStyle_yjfjw_1" }, lu = ({ errors: e, t }) => {
|
|
4681
4677
|
var n;
|
|
4682
4678
|
let r = (n = [...e]) == null ? void 0 : n.sort((e, t) => {
|
|
4683
4679
|
let n = (e) => {
|
|
@@ -4693,18 +4689,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4693
4689
|
content: t("unableToImportPleaseCorrectError", { rows: e == null ? void 0 : e.length }),
|
|
4694
4690
|
type: "Error",
|
|
4695
4691
|
details: /* @__PURE__ */ S("ul", {
|
|
4696
|
-
className:
|
|
4692
|
+
className: cu.listStyle,
|
|
4697
4693
|
children: r.map((e, t) => /* @__PURE__ */ S("li", { children: e }, t))
|
|
4698
4694
|
})
|
|
4699
4695
|
};
|
|
4700
|
-
},
|
|
4696
|
+
}, uu = ({ errors: e, t }) => e.length ? /* @__PURE__ */ S(Gs, { message: lu({
|
|
4701
4697
|
errors: e,
|
|
4702
4698
|
t
|
|
4703
|
-
}) }) : null,
|
|
4699
|
+
}) }) : null, du = {
|
|
4704
4700
|
empty: "_empty_fe425_1",
|
|
4705
4701
|
text: "_text_fe425_11"
|
|
4706
|
-
},
|
|
4707
|
-
className:
|
|
4702
|
+
}, fu = ({ width: e = "auto", height: t = "auto", text: n = "No data", children: r, testId: i }) => /* @__PURE__ */ C("div", {
|
|
4703
|
+
className: du.empty,
|
|
4708
4704
|
style: {
|
|
4709
4705
|
width: e,
|
|
4710
4706
|
height: t
|
|
@@ -4740,7 +4736,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4740
4736
|
})
|
|
4741
4737
|
}),
|
|
4742
4738
|
n !== "" && /* @__PURE__ */ S("div", {
|
|
4743
|
-
className:
|
|
4739
|
+
className: du.text,
|
|
4744
4740
|
children: /* @__PURE__ */ S(Yo, {
|
|
4745
4741
|
faint: !0,
|
|
4746
4742
|
children: n
|
|
@@ -4748,52 +4744,52 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4748
4744
|
}),
|
|
4749
4745
|
r
|
|
4750
4746
|
]
|
|
4751
|
-
}),
|
|
4747
|
+
}), pu = (e) => {
|
|
4752
4748
|
var t;
|
|
4753
4749
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4754
4750
|
let t = e == null ? void 0 : e.match(/[.,]/g);
|
|
4755
4751
|
return t && t.length > 1;
|
|
4756
4752
|
});
|
|
4757
|
-
},
|
|
4753
|
+
}, mu = (e) => {
|
|
4758
4754
|
var t;
|
|
4759
4755
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4760
4756
|
var t;
|
|
4761
4757
|
return !(e != null && e.includes(".")) && (e == null || (t = e.match(/,/g)) == null ? void 0 : t.length) === 1;
|
|
4762
4758
|
});
|
|
4763
|
-
},
|
|
4759
|
+
}, hu = (e, t, n) => e >= t - n, gu = (e) => !!e && e !== "blank" && e.trim() !== "", _u = (e, t, n, r, i, a, o) => {
|
|
4764
4760
|
let s = [], c = r.filter((e) => e.optionalColumn).length, l = r.length, u = c ? `${l - c} or ${l}` : `${l}`, d = i && a ? 2 : i || a ? 1 : 0;
|
|
4765
|
-
if (i && !
|
|
4761
|
+
if (i && !hu(e.length, l, c) && s.push(o("incorrectNumberOfFieldNameHeaderColumns", { expectedLengthMessage: u })), a) {
|
|
4766
4762
|
var f, p;
|
|
4767
4763
|
let e = r.filter((e) => {
|
|
4768
4764
|
var t;
|
|
4769
|
-
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(
|
|
4765
|
+
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(gu));
|
|
4770
4766
|
}).length;
|
|
4771
|
-
|
|
4767
|
+
hu(t == null || (f = t.filter(gu)) == null ? void 0 : f.length, e, r == null || (p = r.filter((e) => (e == null ? void 0 : e.optionalColumn) || !Array.isArray(e == null ? void 0 : e.validUnits) || e.validUnits.includes("blank"))) == null ? void 0 : p.length) || s.push(o("incorrectNumberOfUnitHeaderColumns", { expectedLengthMessage: u }));
|
|
4772
4768
|
}
|
|
4773
4769
|
return n.length === 0 ? s.push(o("incorrectNumberOfDataColumns", {
|
|
4774
4770
|
expectedLengthMessage: u,
|
|
4775
4771
|
dataRowStartIndex: d
|
|
4776
4772
|
})) : n.forEach((e, t) => {
|
|
4777
|
-
|
|
4773
|
+
hu(e.length, l, c) || s.push(o("incorrectNumberOfDataColumns", {
|
|
4778
4774
|
expectedLengthMessage: u,
|
|
4779
4775
|
dataRowStartIndex: d + t
|
|
4780
4776
|
}));
|
|
4781
4777
|
}), s;
|
|
4782
|
-
},
|
|
4778
|
+
}, vu = (e) => e.toUpperCase().replace(/\(.*?\)/g, "").replace(/[^A-Z0-9]/g, "").trim(), yu = ({ value: e, defaultAllowedValues: t }) => {
|
|
4783
4779
|
var n;
|
|
4784
|
-
let r =
|
|
4785
|
-
return (n = t == null ? void 0 : t.some((e) =>
|
|
4786
|
-
},
|
|
4780
|
+
let r = vu(e);
|
|
4781
|
+
return (n = t == null ? void 0 : t.some((e) => vu(e).includes(r) || r.includes(vu(e)))) != null && n;
|
|
4782
|
+
}, bu = ({ value: e, defaultAllowedValues: t }) => {
|
|
4787
4783
|
var n;
|
|
4788
4784
|
return (n = t == null ? void 0 : t.includes(e)) != null && n;
|
|
4789
|
-
},
|
|
4785
|
+
}, xu = (e, t, n, r, i, a) => {
|
|
4790
4786
|
let o = [];
|
|
4791
4787
|
if (r) {
|
|
4792
4788
|
let r = n.map((e) => e.fieldName).filter(Boolean);
|
|
4793
4789
|
e.forEach((i, s) => {
|
|
4794
4790
|
var c, l;
|
|
4795
4791
|
let u = n[s];
|
|
4796
|
-
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ?
|
|
4792
|
+
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ? yu : c)({
|
|
4797
4793
|
value: i,
|
|
4798
4794
|
defaultAllowedValues: r,
|
|
4799
4795
|
columnIndex: s,
|
|
@@ -4815,7 +4811,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4815
4811
|
var l, u;
|
|
4816
4812
|
let d = n[c];
|
|
4817
4813
|
if (!d || d != null && d.optionalColumn) return;
|
|
4818
|
-
let f = (l = d.unitsValidator) == null ?
|
|
4814
|
+
let f = (l = d.unitsValidator) == null ? bu : l, p = (u = i == null ? void 0 : i[c]) == null ? [] : u;
|
|
4819
4815
|
f({
|
|
4820
4816
|
value: r,
|
|
4821
4817
|
defaultAllowedValues: p,
|
|
@@ -4831,7 +4827,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4831
4827
|
});
|
|
4832
4828
|
}
|
|
4833
4829
|
return o;
|
|
4834
|
-
},
|
|
4830
|
+
}, Su = (e, t, n) => {
|
|
4835
4831
|
let r = [];
|
|
4836
4832
|
return e.forEach((e, i) => {
|
|
4837
4833
|
e.forEach((e, a) => {
|
|
@@ -4844,91 +4840,91 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4844
4840
|
})}`);
|
|
4845
4841
|
});
|
|
4846
4842
|
}), r;
|
|
4847
|
-
},
|
|
4848
|
-
let s =
|
|
4849
|
-
return s.length === 0 && (s = s.concat(
|
|
4843
|
+
}, Cu = (e, t, n, r, i, a, o) => {
|
|
4844
|
+
let s = _u(e, t, n, r, i, a, o);
|
|
4845
|
+
return s.length === 0 && (s = s.concat(xu(e, t, r, i, a, o), Su(n, r, o))), {
|
|
4850
4846
|
isValid: s.length === 0,
|
|
4851
4847
|
errors: s
|
|
4852
4848
|
};
|
|
4853
|
-
},
|
|
4849
|
+
}, wu = (e, t, n) => {
|
|
4854
4850
|
var r, i, a, o, s, c, l, u, d, f, p, m, h, g;
|
|
4855
4851
|
let _ = (e) => e.replace(/,/g, "."), v = (r = (i = e[0]) == null ? void 0 : i.some((e) => isNaN(Number(_(e))))) != null && r, y = (a = (o = e[1]) == null ? void 0 : o.some((e) => isNaN(Number(_(e))))) != null && a, b = (s = (c = e[0]) == null ? void 0 : c.some((e) => t.includes(e))) != null && s, x = (l = (u = e[0]) == null ? void 0 : u.some((e) => n.includes(e))) != null && l, S = (d = (f = e[1]) == null ? void 0 : f.some((e) => n.includes(e))) != null && d, C = (p = (m = e[0]) == null ? void 0 : m.some((e) => !isNaN(Number(_(e))))) != null && p, w = (h = (g = e[1]) == null ? void 0 : g.some((e) => !isNaN(Number(_(e))))) != null && h;
|
|
4856
4852
|
return {
|
|
4857
4853
|
hasFieldNameHeader: b || v && !x && !C || v && y && !C,
|
|
4858
4854
|
hasUnitHeader: x || S || v && y && !x && !C && !w || v && y && !C && !w
|
|
4859
4855
|
};
|
|
4860
|
-
},
|
|
4856
|
+
}, Tu = (e, { validationRules: t }) => {
|
|
4861
4857
|
var n, r, i;
|
|
4862
4858
|
let a = (t == null ? void 0 : t.length) === ((n = e == null || (r = e[0]) == null ? void 0 : r.length) == null ? 0 : n) ? t : t == null ? void 0 : t.filter((e) => !(e != null && e.optionalColumn)), o = a == null ? void 0 : a.map((e) => e == null ? void 0 : e.fieldName), s = (e) => Array.isArray(e) && e.length ? e[0] : "", c = a == null ? void 0 : a.map((e) => {
|
|
4863
4859
|
var t;
|
|
4864
4860
|
return (t = e == null ? void 0 : e.defaultUnit) == null ? s(e == null ? void 0 : e.validUnits) : t;
|
|
4865
|
-
}), { hasFieldNameHeader: l, hasUnitHeader: u } =
|
|
4861
|
+
}), { hasFieldNameHeader: l, hasUnitHeader: u } = wu(e, o, a == null || (i = a.map((e) => e == null ? void 0 : e.validUnits)) == null || (i = i.filter((e) => !!e)) == null ? void 0 : i.flat());
|
|
4866
4862
|
return l || e == null || e.unshift(o), u || e == null || e.splice(1, 0, c), {
|
|
4867
4863
|
hasFieldNameHeader: l,
|
|
4868
4864
|
hasUnitHeader: u
|
|
4869
4865
|
};
|
|
4870
|
-
},
|
|
4866
|
+
}, Eu = (e) => Math.round(e * 100) / 100, Du = (e) => e.join(", ").replace(/,\s*$/, ""), Ou = {
|
|
4871
4867
|
skipEmptyLines: !0,
|
|
4872
4868
|
delimiter: (e) => {
|
|
4873
4869
|
var t, n;
|
|
4874
4870
|
let r = e.substring(0, 200), i = ((t = r.match(/\t/g)) == null ? [] : t).length, a = ((n = r.match(/;/g)) == null ? [] : n).length;
|
|
4875
4871
|
return i === 0 && a === 0 ? "," : i > a ? " " : ";";
|
|
4876
4872
|
}
|
|
4877
|
-
},
|
|
4873
|
+
}, ku = [
|
|
4878
4874
|
"text/csv",
|
|
4879
4875
|
"text/plain",
|
|
4880
4876
|
"application/json",
|
|
4881
4877
|
"application/vnd.ms-excel"
|
|
4882
|
-
],
|
|
4878
|
+
], Au = (e) => ku.includes(e.type), ju = (e) => e instanceof File, Mu = (e) => e.trim().startsWith("["), Nu = (e) => {
|
|
4883
4879
|
try {
|
|
4884
4880
|
var t;
|
|
4885
4881
|
return !!((t = JSON.parse(e)) != null && t.path);
|
|
4886
4882
|
} catch {
|
|
4887
4883
|
return !1;
|
|
4888
4884
|
}
|
|
4889
|
-
},
|
|
4885
|
+
}, Pu = (e) => new Promise((t, n) => {
|
|
4890
4886
|
let r = new FileReader();
|
|
4891
4887
|
r.onload = () => t(String(r.result)), r.onerror = n, r.readAsText(e);
|
|
4892
|
-
}),
|
|
4888
|
+
}), Fu = async (e, t, n) => {
|
|
4893
4889
|
try {
|
|
4894
|
-
return
|
|
4890
|
+
return Hu({
|
|
4895
4891
|
data: JSON.parse(e),
|
|
4896
4892
|
errors: []
|
|
4897
4893
|
}, t, n);
|
|
4898
4894
|
} catch (e) {
|
|
4899
4895
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4900
4896
|
}
|
|
4901
|
-
},
|
|
4897
|
+
}, Iu = async (e, t, n) => {
|
|
4902
4898
|
try {
|
|
4903
4899
|
let r = JSON.parse(e).path.map((e) => [
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4900
|
+
Eu(e.md),
|
|
4901
|
+
Eu(e.inclination),
|
|
4902
|
+
Eu(e.gridAzimuth)
|
|
4907
4903
|
]);
|
|
4908
4904
|
return r.unshift([
|
|
4909
4905
|
"m",
|
|
4910
4906
|
"deg",
|
|
4911
4907
|
"deg"
|
|
4912
|
-
]),
|
|
4908
|
+
]), Hu({
|
|
4913
4909
|
data: r,
|
|
4914
4910
|
errors: []
|
|
4915
4911
|
}, t, n);
|
|
4916
4912
|
} catch (e) {
|
|
4917
4913
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4918
4914
|
}
|
|
4919
|
-
},
|
|
4915
|
+
}, Lu = (e) => e.replace(",", "."), Ru = (e) => e.map((e) => e.map((e) => Lu(e))), zu = (e, { importLimit: t, ...n }, r) => new Promise((i) => {
|
|
4920
4916
|
Yr.parse(e, {
|
|
4921
|
-
...
|
|
4917
|
+
...Ou,
|
|
4922
4918
|
preview: t,
|
|
4923
4919
|
complete: (e) => {
|
|
4924
|
-
let a =
|
|
4920
|
+
let a = Hu(e, {
|
|
4925
4921
|
importLimit: t,
|
|
4926
4922
|
...n
|
|
4927
4923
|
}, r);
|
|
4928
|
-
a.rows =
|
|
4924
|
+
a.rows = Ru(a.rows), i(a);
|
|
4929
4925
|
}
|
|
4930
4926
|
});
|
|
4931
|
-
}),
|
|
4927
|
+
}), Bu = async (e, t, n) => {
|
|
4932
4928
|
let r = {
|
|
4933
4929
|
isValid: !1,
|
|
4934
4930
|
fields: [],
|
|
@@ -4937,13 +4933,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4937
4933
|
errors: []
|
|
4938
4934
|
};
|
|
4939
4935
|
try {
|
|
4940
|
-
if (
|
|
4941
|
-
let i =
|
|
4942
|
-
return
|
|
4936
|
+
if (ju(e) && !Au(e)) return r.errors.push(`${n("wrongFileFormatExpectedOneOf")} ${Du(Array.from(ku))}`), r;
|
|
4937
|
+
let i = ju(e) ? await Pu(e) : e;
|
|
4938
|
+
return Mu(i) ? await Fu(i, t, n) : Nu(i) ? await Iu(i, t, n) : await zu(e, t, n);
|
|
4943
4939
|
} catch (e) {
|
|
4944
4940
|
return r.errors.push(e.message), r;
|
|
4945
4941
|
}
|
|
4946
|
-
},
|
|
4942
|
+
}, Vu = (e, t, n, r) => {
|
|
4947
4943
|
var i;
|
|
4948
4944
|
let a = (i = r == null ? void 0 : r.delimiter) == null ? "," : i, o = [
|
|
4949
4945
|
e,
|
|
@@ -4955,7 +4951,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4955
4951
|
header: !0,
|
|
4956
4952
|
delimiter: a
|
|
4957
4953
|
});
|
|
4958
|
-
},
|
|
4954
|
+
}, Hu = (e, t, n) => {
|
|
4959
4955
|
let { data: r, errors: i } = e, a = {
|
|
4960
4956
|
isValid: !1,
|
|
4961
4957
|
fields: [],
|
|
@@ -4964,22 +4960,22 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4964
4960
|
errors: i.map((e) => e.message)
|
|
4965
4961
|
};
|
|
4966
4962
|
if (i.length > 0) return a;
|
|
4967
|
-
let { hasFieldNameHeader: o, hasUnitHeader: s } =
|
|
4963
|
+
let { hasFieldNameHeader: o, hasUnitHeader: s } = Tu(r, t);
|
|
4968
4964
|
a.fields = r[0].map((e) => e.trim()), a.units = r[1].map((e) => e.trim()).filter(Boolean), a.rows = r.slice(2);
|
|
4969
4965
|
let { validationRules: c } = t;
|
|
4970
4966
|
if (c.length) {
|
|
4971
|
-
let { isValid: e, errors: t } =
|
|
4967
|
+
let { isValid: e, errors: t } = Cu(a.fields, a.units, a.rows, c, o, s, n);
|
|
4972
4968
|
a.errors.push(...t), a.isValid = e && t.length === 0;
|
|
4973
4969
|
} else a.isValid = a.errors.length === 0;
|
|
4974
4970
|
return a;
|
|
4975
|
-
},
|
|
4971
|
+
}, Uu = .001, Wu = 0, Gu = (e, t) => e.every((e) => {
|
|
4976
4972
|
let n = e[t];
|
|
4977
4973
|
return n !== void 0 && n.trim() !== "" && fn(Tr(n));
|
|
4978
|
-
}),
|
|
4974
|
+
}), Ku = (e, t = {}) => {
|
|
4979
4975
|
var n, r;
|
|
4980
|
-
let { independentColumnIndex: i =
|
|
4981
|
-
if (e.length <= 2 || !
|
|
4982
|
-
let s = (n = (r = Qr(e, (e) => e.length)) == null ? void 0 : r.length) == null ? 0 : n, c = ei(a == null ? $r(s) : a).filter((t) => t !== i &&
|
|
4976
|
+
let { independentColumnIndex: i = Wu, dependentColumnIndexes: a, tolerance: o = Uu } = t;
|
|
4977
|
+
if (e.length <= 2 || !Gu(e, i)) return e.slice();
|
|
4978
|
+
let s = (n = (r = Qr(e, (e) => e.length)) == null ? void 0 : r.length) == null ? 0 : n, c = ei(a == null ? $r(s) : a).filter((t) => t !== i && Gu(e, t));
|
|
4983
4979
|
if (c.length === 0) return e.slice();
|
|
4984
4980
|
let l = /* @__PURE__ */ new Set();
|
|
4985
4981
|
for (let t of c) {
|
|
@@ -4993,7 +4989,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4993
4989
|
}
|
|
4994
4990
|
}
|
|
4995
4991
|
return e.filter((e, t) => l.has(t));
|
|
4996
|
-
},
|
|
4992
|
+
}, qu = ({ id: e, message: t = {
|
|
4997
4993
|
type: zs.INFO,
|
|
4998
4994
|
content: ""
|
|
4999
4995
|
}, autoClose: n = 6e3, onClose: r }) => {
|
|
@@ -5034,13 +5030,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5034
5030
|
transition: ti,
|
|
5035
5031
|
type: s
|
|
5036
5032
|
});
|
|
5037
|
-
},
|
|
5033
|
+
}, Ju = (e) => {
|
|
5038
5034
|
ri.dismiss(e);
|
|
5039
|
-
},
|
|
5035
|
+
}, Yu = (e, t) => {
|
|
5040
5036
|
t(() => {
|
|
5041
|
-
|
|
5037
|
+
qu({ ...e });
|
|
5042
5038
|
});
|
|
5043
|
-
},
|
|
5039
|
+
}, Xu = {
|
|
5044
5040
|
inputInTable: "_inputInTable_h6wco_1",
|
|
5045
5041
|
inputHover: "_inputHover_h6wco_13",
|
|
5046
5042
|
inputFocus: "_inputFocus_h6wco_18",
|
|
@@ -5056,7 +5052,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5056
5052
|
control: "_control_h6wco_25",
|
|
5057
5053
|
labelText: "_labelText_h6wco_137",
|
|
5058
5054
|
noMargin: "_noMargin_h6wco_201"
|
|
5059
|
-
},
|
|
5055
|
+
}, Zu = ({ name: e, label: t, checked: n = !1, disabled: r, display: i, small: a = !1, onChange: o, noMargin: s = !1, testId: c, helpText: l, onClickHelp: d, textTransform: f = Oi.CAPITALIZE }) => {
|
|
5060
5056
|
let p = u(W), m = l || d;
|
|
5061
5057
|
return /* @__PURE__ */ C(ai, {
|
|
5062
5058
|
name: e,
|
|
@@ -5069,14 +5065,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5069
5065
|
value: t
|
|
5070
5066
|
} });
|
|
5071
5067
|
},
|
|
5072
|
-
className: b(
|
|
5068
|
+
className: b(Xu.toggleContainer, s && Xu.noMargin),
|
|
5073
5069
|
style: { display: i },
|
|
5074
5070
|
"data-testid": c ? `${c}-field` : void 0,
|
|
5075
5071
|
children: [/* @__PURE__ */ C(ii, {
|
|
5076
|
-
className: b(
|
|
5072
|
+
className: b(Xu.toggle, a && Xu.small, !t && Xu.noLabel),
|
|
5077
5073
|
"data-testid": c,
|
|
5078
|
-
children: [/* @__PURE__ */ S("span", { className:
|
|
5079
|
-
className:
|
|
5074
|
+
children: [/* @__PURE__ */ S("span", { className: Xu.control }), t && /* @__PURE__ */ S("span", {
|
|
5075
|
+
className: Xu.labelText,
|
|
5080
5076
|
style: { textTransform: f },
|
|
5081
5077
|
children: t
|
|
5082
5078
|
})]
|
|
@@ -5085,7 +5081,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5085
5081
|
onClick: d
|
|
5086
5082
|
})]
|
|
5087
5083
|
});
|
|
5088
|
-
},
|
|
5084
|
+
}, Qu = ({ config: e, state: t, updateState: n, setModalVisibility: r, onCloseModal: i, readAndParseInput: a, validationRules: o = [], onCompleteImport: s = () => {}, prevalidationConfig: c, t: u, loading: d, startTransition: f, testId: p }) => {
|
|
5089
5085
|
let { modalVisibility: { reviewPasteModal: m, pasteModalHelpVisible: h, helpModal: g } } = t, { warningMessage: y, actionButtonLabel: b, changeRulesAction: w, checkPrevalidationNeed: T } = c == null ? {} : c, E = _(null), [D, O] = v(!1), [k, A] = v({
|
|
5090
5086
|
pastedText: "",
|
|
5091
5087
|
parsedResult: {
|
|
@@ -5106,10 +5102,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5106
5102
|
let { pastedText: j, parsedResult: M } = k, N = l((t) => {
|
|
5107
5103
|
if (t) {
|
|
5108
5104
|
var n, r;
|
|
5109
|
-
let t =
|
|
5105
|
+
let t = Ku(M.rows, e.downsampleConfig), i = {
|
|
5110
5106
|
validationRules: o,
|
|
5111
|
-
importLimit: (n = e.importLimit) == null ?
|
|
5112
|
-
}, a =
|
|
5107
|
+
importLimit: (n = e.importLimit) == null ? ru : n
|
|
5108
|
+
}, a = Vu(M.fields, (r = M.units) == null ? [] : r, t, i);
|
|
5113
5109
|
f(() => A({
|
|
5114
5110
|
parsedResult: {
|
|
5115
5111
|
...M,
|
|
@@ -5142,17 +5138,17 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5142
5138
|
}, F = () => {
|
|
5143
5139
|
r("helpModal", !g);
|
|
5144
5140
|
}, I = () => {
|
|
5145
|
-
n(k), s(k.parsedResult), i(),
|
|
5141
|
+
n(k), s(k.parsedResult), i(), Yu({ message: {
|
|
5146
5142
|
type: "Success",
|
|
5147
5143
|
content: u("pasteSuccessful")
|
|
5148
5144
|
} }, f);
|
|
5149
|
-
}, L = T && T(M), { isValid: R, errors: z } = M, B = z.length, ee = j === "", te =
|
|
5145
|
+
}, L = T && T(M), { isValid: R, errors: z } = M, B = z.length, ee = j === "", te = mu(j), ne = pu(j), V = /* @__PURE__ */ C(x, { children: [
|
|
5150
5146
|
/* @__PURE__ */ C("div", {
|
|
5151
5147
|
className: Ls.headerContainer,
|
|
5152
5148
|
children: [
|
|
5153
5149
|
/* @__PURE__ */ S(K, {
|
|
5154
5150
|
text: u("downsampleTooltip"),
|
|
5155
|
-
children: /* @__PURE__ */ S(
|
|
5151
|
+
children: /* @__PURE__ */ S(Zu, {
|
|
5156
5152
|
label: u("downsampled"),
|
|
5157
5153
|
checked: D,
|
|
5158
5154
|
onChange: () => N(!D),
|
|
@@ -5185,7 +5181,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5185
5181
|
}),
|
|
5186
5182
|
ee ? /* @__PURE__ */ S("div", {
|
|
5187
5183
|
className: Ls.resultContainer,
|
|
5188
|
-
children: /* @__PURE__ */ S(
|
|
5184
|
+
children: /* @__PURE__ */ S(fu, {
|
|
5189
5185
|
text: null,
|
|
5190
5186
|
children: /* @__PURE__ */ C("div", {
|
|
5191
5187
|
className: Ls.emptyState,
|
|
@@ -5221,7 +5217,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5221
5217
|
}) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
|
|
5222
5218
|
className: Ls.messagesContainer,
|
|
5223
5219
|
children: [
|
|
5224
|
-
B ? /* @__PURE__ */ S(
|
|
5220
|
+
B ? /* @__PURE__ */ S(uu, {
|
|
5225
5221
|
errors: z,
|
|
5226
5222
|
t: u
|
|
5227
5223
|
}) : null,
|
|
@@ -5244,7 +5240,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5244
5240
|
type: "Warning"
|
|
5245
5241
|
} })
|
|
5246
5242
|
]
|
|
5247
|
-
}), /* @__PURE__ */ S(
|
|
5243
|
+
}), /* @__PURE__ */ S(su, {
|
|
5248
5244
|
validationRules: o,
|
|
5249
5245
|
parsedResult: M,
|
|
5250
5246
|
updateState: (e) => A((t) => ({
|
|
@@ -5287,7 +5283,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5287
5283
|
onClose: i
|
|
5288
5284
|
} })
|
|
5289
5285
|
});
|
|
5290
|
-
},
|
|
5286
|
+
}, $u = ({ modals: e = [], modalVisibility: t, onCloseModal: r, testId: i }) => e.length ? /* @__PURE__ */ S(x, { children: e.map(({ name: e, component: a, props: o = {} }) => {
|
|
5291
5287
|
var s;
|
|
5292
5288
|
return /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S(a, {
|
|
5293
5289
|
testId: `${i}-modal-render-${e}`,
|
|
@@ -5295,7 +5291,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5295
5291
|
onClose: () => r({ name: e }),
|
|
5296
5292
|
...o
|
|
5297
5293
|
}) }, e);
|
|
5298
|
-
}) }) : null,
|
|
5294
|
+
}) }) : null, ed = ({ sections: e, iconName: t, testId: n, tooltip: r }) => /* @__PURE__ */ S(lo, {
|
|
5299
5295
|
loading: !0,
|
|
5300
5296
|
menu: {
|
|
5301
5297
|
component: /* @__PURE__ */ S(q, {
|
|
@@ -5311,18 +5307,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5311
5307
|
sections: e
|
|
5312
5308
|
},
|
|
5313
5309
|
testId: n
|
|
5314
|
-
}),
|
|
5310
|
+
}), td = (e, t, n) => l(async () => {
|
|
5315
5311
|
if (n) try {
|
|
5316
5312
|
return await n();
|
|
5317
5313
|
} catch (t) {
|
|
5318
|
-
console.error("beforeExportData failed", t),
|
|
5314
|
+
console.error("beforeExportData failed", t), qu({ message: {
|
|
5319
5315
|
type: "Error",
|
|
5320
5316
|
content: e("unableToPrepareExportData")
|
|
5321
5317
|
} });
|
|
5322
5318
|
return;
|
|
5323
5319
|
}
|
|
5324
5320
|
return t;
|
|
5325
|
-
}, [t, n]),
|
|
5321
|
+
}, [t, n]), nd = {
|
|
5326
5322
|
cancel: "Cancel",
|
|
5327
5323
|
chooseFile: "Choose file",
|
|
5328
5324
|
copyDecimalComma: "Copy (decimal comma)",
|
|
@@ -5381,26 +5377,26 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5381
5377
|
smartUpload_description: "Upload image and extract table content using a LLM",
|
|
5382
5378
|
smartUpload_smartUpload: "Smart Upload",
|
|
5383
5379
|
toUploadOrImportFromClipboardMessage: "To upload or import from clipboard please select your preferred unit in the table header and upload or paste numbers only for Depth, Inc, Azi. Follow example below"
|
|
5384
|
-
},
|
|
5385
|
-
let t = Object.keys(
|
|
5386
|
-
let r =
|
|
5380
|
+
}, rd = (e, t = {}) => e == null ? void 0 : e.replace(/\{\{(\w+)\}\}/g, (e, n) => (t == null ? void 0 : t[n]) === void 0 ? "" : String(t == null ? void 0 : t[n])), id = (e) => h(() => {
|
|
5381
|
+
let t = Object.keys(nd).reduce((t, n) => {
|
|
5382
|
+
let r = nd == null ? void 0 : nd[n], i = e == null ? void 0 : e[n];
|
|
5387
5383
|
return t[n] = i == null ? r : i, t;
|
|
5388
5384
|
}, {});
|
|
5389
5385
|
return (e, n) => {
|
|
5390
5386
|
let r = t[e];
|
|
5391
|
-
return n ?
|
|
5387
|
+
return n ? rd(r, n) : r;
|
|
5392
5388
|
};
|
|
5393
|
-
}, [e]),
|
|
5389
|
+
}, [e]), ad = /^\s*-?\d+(?:[.,]\d+)?(?:e[+-]?\d+)?\s*$/i, od = (e) => {
|
|
5394
5390
|
var t;
|
|
5395
5391
|
return {
|
|
5396
5392
|
...e,
|
|
5397
5393
|
rows: e == null || (t = e.rows) == null ? void 0 : t.map((e) => e.map((e) => {
|
|
5398
5394
|
let t = String(e == null ? "" : e);
|
|
5399
|
-
return
|
|
5395
|
+
return ad.test(t) ? sr(t) : t;
|
|
5400
5396
|
}))
|
|
5401
5397
|
};
|
|
5402
|
-
},
|
|
5403
|
-
let { exportData: a, beforeExportData: o, importLimit: s =
|
|
5398
|
+
}, sd = ({ config: e, state: t, setState: n, smartUploadConfig: r, startTransition: i }) => {
|
|
5399
|
+
let { exportData: a, beforeExportData: o, importLimit: s = ru, validationRules: c = [], translations: u, onImportComplete: d = () => {}, disablePasteSuccessfulToast: f, prevalidationConfig: p, onDeleteRows: m } = e == null ? {} : e, { parsedResult: h } = t, { checkPrevalidationNeed: g } = p == null ? {} : p, _ = id(u), v = td(_, a, o), y = l((e) => {
|
|
5404
5400
|
n((t) => ({
|
|
5405
5401
|
...t,
|
|
5406
5402
|
...e
|
|
@@ -5444,9 +5440,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5444
5440
|
let t = {
|
|
5445
5441
|
validationRules: c,
|
|
5446
5442
|
importLimit: s
|
|
5447
|
-
}, n =
|
|
5443
|
+
}, n = od(await Bu(e, t, _));
|
|
5448
5444
|
if (g && g(h)) {
|
|
5449
|
-
let { fields: e, units: r, rows: a } = n, o =
|
|
5445
|
+
let { fields: e, units: r, rows: a } = n, o = Vu(e, r == null ? [] : r, a, t);
|
|
5450
5446
|
return i(() => y({
|
|
5451
5447
|
pastedText: o,
|
|
5452
5448
|
parsedResult: h
|
|
@@ -5472,20 +5468,20 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5472
5468
|
let { fromFile: t, showSuccessToast: n = !0 } = e == null ? {} : e, r;
|
|
5473
5469
|
try {
|
|
5474
5470
|
if (r = t ? await t.text() : await navigator.clipboard.readText(), !r) {
|
|
5475
|
-
|
|
5471
|
+
Yu({ message: {
|
|
5476
5472
|
type: "Error",
|
|
5477
5473
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed")
|
|
5478
5474
|
} }, i);
|
|
5479
5475
|
return;
|
|
5480
5476
|
}
|
|
5481
|
-
let e =
|
|
5477
|
+
let e = od(await Bu(r, {
|
|
5482
5478
|
validationRules: c,
|
|
5483
5479
|
importLimit: s
|
|
5484
5480
|
}, _));
|
|
5485
|
-
return e != null && e.isValid ||
|
|
5481
|
+
return e != null && e.isValid || Yu({ message: {
|
|
5486
5482
|
type: "Error",
|
|
5487
5483
|
content: _("clipboardReadFailed")
|
|
5488
|
-
} }, i), n &&
|
|
5484
|
+
} }, i), n && Yu({ message: {
|
|
5489
5485
|
type: "Success",
|
|
5490
5486
|
content: _("pasteSuccessful")
|
|
5491
5487
|
} }, i), {
|
|
@@ -5493,7 +5489,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5493
5489
|
parsedResult: e
|
|
5494
5490
|
};
|
|
5495
5491
|
} catch (e) {
|
|
5496
|
-
|
|
5492
|
+
Yu({ message: {
|
|
5497
5493
|
type: "Error",
|
|
5498
5494
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed"),
|
|
5499
5495
|
details: e.message
|
|
@@ -5506,10 +5502,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5506
5502
|
let n = e == null || (t = e.target) == null || (t = t.files) == null ? void 0 : t[0];
|
|
5507
5503
|
if (!n) return;
|
|
5508
5504
|
let r = await n.text(), a = await C(r);
|
|
5509
|
-
a.isValid ? (f ||
|
|
5505
|
+
a.isValid ? (f || Yu({ message: {
|
|
5510
5506
|
type: "Success",
|
|
5511
5507
|
content: _("pasteSuccessful")
|
|
5512
|
-
} }, i), i(() => d(a))) :
|
|
5508
|
+
} }, i), i(() => d(a))) : Yu({ message: {
|
|
5513
5509
|
type: "Error",
|
|
5514
5510
|
content: _("fileParsingFailed")
|
|
5515
5511
|
} }, i);
|
|
@@ -5523,7 +5519,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5523
5519
|
try {
|
|
5524
5520
|
let t = await navigator.clipboard.readText();
|
|
5525
5521
|
if (!t) {
|
|
5526
|
-
|
|
5522
|
+
Yu({ message: {
|
|
5527
5523
|
type: "Error",
|
|
5528
5524
|
content: _("clipboardIsEmpty")
|
|
5529
5525
|
} }, i);
|
|
@@ -5531,18 +5527,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5531
5527
|
}
|
|
5532
5528
|
let n = await C(t);
|
|
5533
5529
|
if (!n.isValid) {
|
|
5534
|
-
|
|
5530
|
+
Yu({ message: {
|
|
5535
5531
|
type: "Error",
|
|
5536
5532
|
content: _("clipboardReadFailed")
|
|
5537
5533
|
} }, i);
|
|
5538
5534
|
return;
|
|
5539
5535
|
}
|
|
5540
|
-
f ||
|
|
5536
|
+
f || Yu({ message: {
|
|
5541
5537
|
type: "Success",
|
|
5542
5538
|
content: _("pasteSuccessful")
|
|
5543
5539
|
} }, i), e && i(() => d(n));
|
|
5544
5540
|
} catch {
|
|
5545
|
-
|
|
5541
|
+
Yu({ message: {
|
|
5546
5542
|
type: "Error",
|
|
5547
5543
|
content: _("clipboardReadNotAllowed")
|
|
5548
5544
|
} }, i);
|
|
@@ -5557,14 +5553,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5557
5553
|
onClickCopyClipboard: l(async (e) => {
|
|
5558
5554
|
let t = await v();
|
|
5559
5555
|
if (!t) return;
|
|
5560
|
-
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e :
|
|
5556
|
+
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e : nu).slice(0, n.length), s = (e, t) => t === "comma" ? e.replace(/\./g, ",") : e, c = Vu(n, o, a.map((t) => t.map((t) => Zr(t) ? "" : s(t.toString(), e))), { delimiter: " " });
|
|
5561
5557
|
try {
|
|
5562
|
-
await navigator.clipboard.writeText(c),
|
|
5558
|
+
await navigator.clipboard.writeText(c), Yu({ message: {
|
|
5563
5559
|
type: "Success",
|
|
5564
5560
|
content: _("copiedToClipboard")
|
|
5565
5561
|
} }, i);
|
|
5566
5562
|
} catch (e) {
|
|
5567
|
-
|
|
5563
|
+
Yu({ message: {
|
|
5568
5564
|
type: "Error",
|
|
5569
5565
|
content: _("unableToCopyToClipboard"),
|
|
5570
5566
|
details: e.message
|
|
@@ -5574,14 +5570,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5574
5570
|
onSmartUploadResult: l((e) => {
|
|
5575
5571
|
let t = _n(e) && vn(e.errorMessage) ? e.errorMessage : void 0;
|
|
5576
5572
|
if (t) {
|
|
5577
|
-
|
|
5573
|
+
Yu({ message: {
|
|
5578
5574
|
type: "Error",
|
|
5579
5575
|
content: t || "Smart upload failed."
|
|
5580
5576
|
} }, i);
|
|
5581
5577
|
return;
|
|
5582
5578
|
}
|
|
5583
5579
|
if (!cn(e) || e.length < 2 || !on(e, (e) => _n(e) && on(Tn(e), vn))) {
|
|
5584
|
-
|
|
5580
|
+
Yu({ message: {
|
|
5585
5581
|
type: "Error",
|
|
5586
5582
|
content: "Smart upload returned unexpected format.",
|
|
5587
5583
|
details: JSON.stringify(e)
|
|
@@ -5613,14 +5609,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5613
5609
|
]),
|
|
5614
5610
|
deleteAllRows: x
|
|
5615
5611
|
};
|
|
5616
|
-
},
|
|
5612
|
+
}, cd = (e, t) => {
|
|
5617
5613
|
var n, r;
|
|
5618
|
-
let { fields: i, rows: a } = e, o =
|
|
5614
|
+
let { fields: i, rows: a } = e, o = Vu(i, (n = (r = e.units) == null ? void 0 : r.map((e) => e || "blank")) == null ? [] : n, a, { delimiter: " " }), s = new Blob([o], { type: "text/plain" }), c = document.createElement("a");
|
|
5619
5615
|
c.href = window.URL.createObjectURL(s), c.download = `${t}.csv`, document.body.appendChild(c), c.click(), document.body.removeChild(c);
|
|
5620
|
-
},
|
|
5616
|
+
}, ld = (e) => gn(e) && "modalKey" in e, ud = (e, t, n) => rn(e, (e) => {
|
|
5621
5617
|
if (cn(e) || !_n(e)) return;
|
|
5622
5618
|
let { modalKey: r } = e == null ? {} : e;
|
|
5623
|
-
if (
|
|
5619
|
+
if (ld(e) && typeof e.onClick != "function") {
|
|
5624
5620
|
let i = () => {
|
|
5625
5621
|
var e;
|
|
5626
5622
|
n(r, !((e = t.modalVisibility) != null && e[r]));
|
|
@@ -5630,7 +5626,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5630
5626
|
onClick: i
|
|
5631
5627
|
};
|
|
5632
5628
|
}
|
|
5633
|
-
}),
|
|
5629
|
+
}), dd = (e, t, n) => ud(e, t, n), fd = {
|
|
5634
5630
|
pastedText: "",
|
|
5635
5631
|
parsedResult: {
|
|
5636
5632
|
isValid: !1,
|
|
@@ -5645,9 +5641,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5645
5641
|
reviewPasteModal: !1,
|
|
5646
5642
|
helpModal: !1
|
|
5647
5643
|
}
|
|
5648
|
-
},
|
|
5644
|
+
}, pd = ({ config: e, smartUploadConfig: t, testId: n }) => {
|
|
5649
5645
|
var r, i, a, o;
|
|
5650
|
-
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: m = !0, copyFromClipBoard: h = !0, showDeleteOptions: g = !0, showHelpOption: _ = !0, showUploadFileOption: b = !0, modals: x = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = v(
|
|
5646
|
+
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: m = !0, copyFromClipBoard: h = !0, showDeleteOptions: g = !0, showHelpOption: _ = !0, showUploadFileOption: b = !0, modals: x = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = v(fd), { modalVisibility: { smartUploadModal: O = !1, reviewPasteModal: k = !1, helpModal: A = !1 } } = E, { enabled: j, prompt: M = "", onClose: N, onError: P, service: F = () => Promise.resolve() } = t == null ? {} : t, I = id(f), L = td(I, s, c), [R, z] = y(), B = sd({
|
|
5651
5647
|
config: e,
|
|
5652
5648
|
state: E,
|
|
5653
5649
|
setState: D,
|
|
@@ -5680,14 +5676,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5680
5676
|
onClick: () => V("smartUploadModal", !O),
|
|
5681
5677
|
testId: `${n}-smart-upload`
|
|
5682
5678
|
}] : [],
|
|
5683
|
-
...
|
|
5679
|
+
...dd((r = w == null ? void 0 : w.importOptions) == null ? [] : r, E, V)
|
|
5684
5680
|
] : [], le = [
|
|
5685
5681
|
{
|
|
5686
5682
|
type: "Option",
|
|
5687
5683
|
label: I("downloadFile"),
|
|
5688
5684
|
onClick: async () => {
|
|
5689
5685
|
let e = await L();
|
|
5690
|
-
e && e &&
|
|
5686
|
+
e && e && cd(e, d);
|
|
5691
5687
|
}
|
|
5692
5688
|
},
|
|
5693
5689
|
...p ? [{
|
|
@@ -5712,20 +5708,20 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5712
5708
|
}]
|
|
5713
5709
|
}
|
|
5714
5710
|
}],
|
|
5715
|
-
...
|
|
5711
|
+
...dd((i = w == null ? void 0 : w.exportOptions) == null ? [] : i, E, V)
|
|
5716
5712
|
], ue = g ? [{
|
|
5717
5713
|
type: "Option",
|
|
5718
5714
|
label: I("deleteAllRows"),
|
|
5719
5715
|
onClick: () => se(),
|
|
5720
5716
|
testId: `${n}-delete-all-rows`
|
|
5721
|
-
}, ...
|
|
5717
|
+
}, ...dd((a = w == null ? void 0 : w.deleteOptions) == null ? [] : a, E, V)] : [], de = _ ? [
|
|
5722
5718
|
{ type: "Divider" },
|
|
5723
5719
|
{
|
|
5724
5720
|
type: "Option",
|
|
5725
5721
|
label: I("help"),
|
|
5726
5722
|
onClick: () => V("helpModal", !A)
|
|
5727
5723
|
},
|
|
5728
|
-
...
|
|
5724
|
+
...dd((o = w == null ? void 0 : w.helpOptions) == null ? [] : o, E, V)
|
|
5729
5725
|
] : [], fe = [
|
|
5730
5726
|
...ce.length ? [{
|
|
5731
5727
|
section: [...ce, ...de],
|
|
@@ -5751,13 +5747,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5751
5747
|
small: !0,
|
|
5752
5748
|
dark: !0
|
|
5753
5749
|
}),
|
|
5754
|
-
fe.map((e, t) => /* @__PURE__ */ S(
|
|
5750
|
+
fe.map((e, t) => /* @__PURE__ */ S(ed, {
|
|
5755
5751
|
sections: e.section,
|
|
5756
5752
|
iconName: e.iconName,
|
|
5757
5753
|
tooltip: e.tooltip,
|
|
5758
5754
|
testId: `data-${e == null ? void 0 : e.name}-menu`
|
|
5759
5755
|
}, t)),
|
|
5760
|
-
k && /* @__PURE__ */ S(
|
|
5756
|
+
k && /* @__PURE__ */ S(Qu, {
|
|
5761
5757
|
config: e,
|
|
5762
5758
|
state: E,
|
|
5763
5759
|
updateState: te,
|
|
@@ -5793,14 +5789,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5793
5789
|
cancelText: I("cancel"),
|
|
5794
5790
|
testId: n
|
|
5795
5791
|
}),
|
|
5796
|
-
/* @__PURE__ */ S(
|
|
5792
|
+
/* @__PURE__ */ S($u, {
|
|
5797
5793
|
modals: x,
|
|
5798
5794
|
modalVisibility: E == null ? void 0 : E.modalVisibility,
|
|
5799
5795
|
onCloseModal: ne,
|
|
5800
5796
|
testId: n
|
|
5801
5797
|
})
|
|
5802
5798
|
] });
|
|
5803
|
-
},
|
|
5799
|
+
}, md = ({ file: e, accept: t, multi: n, name: r, disabled: i, onChange: a = bn, ...o }) => {
|
|
5804
5800
|
let s = u(W), c = _(null), l = () => {
|
|
5805
5801
|
var e;
|
|
5806
5802
|
i || s || (e = c.current) == null || e.click();
|
|
@@ -5828,12 +5824,12 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5828
5824
|
multiple: n,
|
|
5829
5825
|
onChange: d
|
|
5830
5826
|
})] });
|
|
5831
|
-
},
|
|
5827
|
+
}, hd = {
|
|
5832
5828
|
label: "_label_uxk69_1",
|
|
5833
5829
|
labelLeft: "_labelLeft_uxk69_5",
|
|
5834
5830
|
icons: "_icons_uxk69_13",
|
|
5835
5831
|
small: "_small_uxk69_27"
|
|
5836
|
-
},
|
|
5832
|
+
}, gd = ({ label: e = null, width: t = "auto", helpText: n = "", helpTextMaxWidth: r = "300px", onClickHelp: i = void 0, lock: a = {
|
|
5837
5833
|
visible: !1,
|
|
5838
5834
|
active: !1,
|
|
5839
5835
|
onClick: () => {},
|
|
@@ -5842,14 +5838,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5842
5838
|
}, info: o, libraryIcon: s, labelLeft: c = !1, small: l = !1, textTransform: u = Oi.CAPITALIZE }) => {
|
|
5843
5839
|
var d;
|
|
5844
5840
|
return /* @__PURE__ */ S("div", {
|
|
5845
|
-
className: b(
|
|
5841
|
+
className: b(hd.label, c ? hd.labelLeft : "", l ? hd.small : ""),
|
|
5846
5842
|
children: /* @__PURE__ */ C("label", {
|
|
5847
5843
|
style: {
|
|
5848
5844
|
textTransform: u,
|
|
5849
5845
|
width: t || ""
|
|
5850
5846
|
},
|
|
5851
5847
|
children: [e, /* @__PURE__ */ C("div", {
|
|
5852
|
-
className:
|
|
5848
|
+
className: hd.icons,
|
|
5853
5849
|
children: [
|
|
5854
5850
|
(n || i) && /* @__PURE__ */ S(da, {
|
|
5855
5851
|
text: n,
|
|
@@ -5875,23 +5871,23 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5875
5871
|
})]
|
|
5876
5872
|
})
|
|
5877
5873
|
});
|
|
5878
|
-
},
|
|
5874
|
+
}, _d = {
|
|
5879
5875
|
field: "_field_1xoss_1",
|
|
5880
5876
|
labelLeft: "_labelLeft_1xoss_5",
|
|
5881
5877
|
fieldInput: "_fieldInput_1xoss_9",
|
|
5882
5878
|
formRow: "_formRow_1xoss_12",
|
|
5883
5879
|
"form-row": "_form-row_1xoss_13",
|
|
5884
5880
|
button: "_button_1xoss_22"
|
|
5885
|
-
},
|
|
5881
|
+
}, vd = ({ label: e, labelLeft: t = !1, labelWidth: n = "auto", children: r, helpText: i, helpTextMaxWidth: a = "300px", onClickHelp: o, lock: s = {
|
|
5886
5882
|
visible: !1,
|
|
5887
5883
|
active: !1,
|
|
5888
5884
|
onClick: () => {},
|
|
5889
5885
|
tooltip: "",
|
|
5890
5886
|
testId: void 0
|
|
5891
5887
|
}, info: c, libraryIcon: l, small: u = !1, testId: d, textTransform: f = Oi.CAPITALIZE }) => /* @__PURE__ */ C("div", {
|
|
5892
|
-
className: b(
|
|
5888
|
+
className: b(_d.field, t ? _d.labelLeft : ""),
|
|
5893
5889
|
"data-testid": d,
|
|
5894
|
-
children: [(e || t) && /* @__PURE__ */ S(
|
|
5890
|
+
children: [(e || t) && /* @__PURE__ */ S(gd, {
|
|
5895
5891
|
label: e,
|
|
5896
5892
|
width: n,
|
|
5897
5893
|
helpText: i,
|
|
@@ -5904,10 +5900,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5904
5900
|
small: u,
|
|
5905
5901
|
textTransform: f
|
|
5906
5902
|
}), /* @__PURE__ */ S("div", {
|
|
5907
|
-
className:
|
|
5903
|
+
className: _d.fieldInput,
|
|
5908
5904
|
children: r
|
|
5909
5905
|
})]
|
|
5910
|
-
}),
|
|
5906
|
+
}), yd = ({ alignItems: e = "initial", justifyContent: t = "initial", direction: n = "initial", height: r = "initial", width: i = "initial", children: a = null, wrap: o = !0, gap: s = !1 }) => /* @__PURE__ */ S("div", {
|
|
5911
5907
|
style: {
|
|
5912
5908
|
display: "flex",
|
|
5913
5909
|
flexDirection: n,
|
|
@@ -5919,8 +5915,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5919
5915
|
gap: s === !1 ? 0 : s === !0 ? "var(--padding)" : typeof s == "number" ? `${s}px` : s
|
|
5920
5916
|
},
|
|
5921
5917
|
children: a
|
|
5922
|
-
}),
|
|
5923
|
-
className:
|
|
5918
|
+
}), bd = { formRow: "_formRow_odewu_1" }, xd = ({ children: e }) => /* @__PURE__ */ S("div", {
|
|
5919
|
+
className: bd.formRow,
|
|
5924
5920
|
children: e
|
|
5925
5921
|
}), Z = {
|
|
5926
5922
|
inputInTable: "_inputInTable_15rr3_1",
|
|
@@ -5966,15 +5962,15 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5966
5962
|
hideScrollbar: "_hideScrollbar_15rr3_71",
|
|
5967
5963
|
noPointerEvents: "_noPointerEvents_15rr3_313",
|
|
5968
5964
|
virtualRows: "_virtualRows_15rr3_316"
|
|
5969
|
-
},
|
|
5965
|
+
}, Sd = ({ toggleNarrow: e, onClickToggleNarrow: t }) => e ? /* @__PURE__ */ S("a", {
|
|
5970
5966
|
className: Z.toggleNarrow,
|
|
5971
5967
|
onClick: t,
|
|
5972
5968
|
children: /* @__PURE__ */ S(G, { icon: U.CHEVRON_LEFT })
|
|
5973
|
-
}) : null,
|
|
5969
|
+
}) : null, Cd = o(({ name: e, actions: t = [], toggleNarrow: n = !1, onToggleNarrow: r = () => {}, stickyHeader: i }, a) => /* @__PURE__ */ C("div", {
|
|
5974
5970
|
ref: a,
|
|
5975
5971
|
className: b(Z.header, i ? Z.stickyHeader : ""),
|
|
5976
5972
|
children: [
|
|
5977
|
-
/* @__PURE__ */ S(
|
|
5973
|
+
/* @__PURE__ */ S(Sd, {
|
|
5978
5974
|
toggleNarrow: n,
|
|
5979
5975
|
onClickToggleNarrow: r
|
|
5980
5976
|
}),
|
|
@@ -5994,14 +5990,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5994
5990
|
})
|
|
5995
5991
|
})
|
|
5996
5992
|
]
|
|
5997
|
-
})),
|
|
5993
|
+
})), wd = ({ label: e }) => e ? /* @__PURE__ */ S("span", {
|
|
5998
5994
|
className: Z.label,
|
|
5999
5995
|
children: /* @__PURE__ */ S(no, {
|
|
6000
5996
|
color: e.color,
|
|
6001
5997
|
title: e.value,
|
|
6002
5998
|
small: e.small
|
|
6003
5999
|
})
|
|
6004
|
-
}) : null,
|
|
6000
|
+
}) : null, Td = ({ name: e, icon: t, testId: n }) => {
|
|
6005
6001
|
let r = t && /* @__PURE__ */ S(G, {
|
|
6006
6002
|
icon: t.icon,
|
|
6007
6003
|
color: t.color || "#db2828"
|
|
@@ -6021,8 +6017,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6021
6017
|
children: r
|
|
6022
6018
|
})]
|
|
6023
6019
|
});
|
|
6024
|
-
},
|
|
6025
|
-
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ S(
|
|
6020
|
+
}, Ed = ({ item: e }) => {
|
|
6021
|
+
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ S(Td, {
|
|
6026
6022
|
name: t,
|
|
6027
6023
|
icon: n,
|
|
6028
6024
|
testId: o && `${o}-name`
|
|
@@ -6048,10 +6044,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6048
6044
|
})
|
|
6049
6045
|
]
|
|
6050
6046
|
});
|
|
6051
|
-
},
|
|
6047
|
+
}, Dd = ({ item: e }) => e.metaCount === void 0 ? null : /* @__PURE__ */ S(no, {
|
|
6052
6048
|
color: "rgba(0,0,0,0.25)",
|
|
6053
6049
|
title: e.metaCount
|
|
6054
|
-
}),
|
|
6050
|
+
}), Od = ({ item: e, expanding: t }) => {
|
|
6055
6051
|
let n = (e) => {
|
|
6056
6052
|
e.preventDefault(), e.stopPropagation();
|
|
6057
6053
|
}, r = !!t && !!e.active && !!e.content;
|
|
@@ -6063,7 +6059,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6063
6059
|
children: e.content
|
|
6064
6060
|
})
|
|
6065
6061
|
});
|
|
6066
|
-
},
|
|
6062
|
+
}, kd = o(({ item: e, index: t }, n) => {
|
|
6067
6063
|
var r;
|
|
6068
6064
|
let i = u(W), { actions: a, disabled: o, expanded: s, onClick: c, title: l, name: d, icon: f, testId: p } = e;
|
|
6069
6065
|
return /* @__PURE__ */ S("div", {
|
|
@@ -6083,13 +6079,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6083
6079
|
className: b(Z.expandIcon, s && Z.expanded),
|
|
6084
6080
|
children: /* @__PURE__ */ S(G, { icon: U.CHEVRON_RIGHT })
|
|
6085
6081
|
}),
|
|
6086
|
-
/* @__PURE__ */ S(
|
|
6082
|
+
/* @__PURE__ */ S(Td, {
|
|
6087
6083
|
name: d,
|
|
6088
6084
|
icon: f
|
|
6089
6085
|
}),
|
|
6090
6086
|
/* @__PURE__ */ C("div", {
|
|
6091
6087
|
className: Z.right,
|
|
6092
|
-
children: [/* @__PURE__ */ S(
|
|
6088
|
+
children: [/* @__PURE__ */ S(Dd, { item: e }), !(o || i) && a && /* @__PURE__ */ S("div", {
|
|
6093
6089
|
className: Z.actions,
|
|
6094
6090
|
children: /* @__PURE__ */ S(fo, { actions: (r = e.actions) == null ? [] : r })
|
|
6095
6091
|
})]
|
|
@@ -6097,7 +6093,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6097
6093
|
]
|
|
6098
6094
|
}) })
|
|
6099
6095
|
});
|
|
6100
|
-
}),
|
|
6096
|
+
}), Ad = o(({ item: e, index: t, expanding: n, invokeEditOnRowClick: r, draggable: i }, a) => {
|
|
6101
6097
|
let o = u(W), s = (e, t, s, c, l, u) => {
|
|
6102
6098
|
let d = t.actions && t.actions.find((e) => {
|
|
6103
6099
|
var t;
|
|
@@ -6133,24 +6129,24 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6133
6129
|
className: Z.indentIcon,
|
|
6134
6130
|
children: /* @__PURE__ */ S(G, { icon: U.INDENT })
|
|
6135
6131
|
}) : null,
|
|
6136
|
-
/* @__PURE__ */ S(
|
|
6137
|
-
/* @__PURE__ */ S(
|
|
6132
|
+
/* @__PURE__ */ S(wd, { label: t.label }),
|
|
6133
|
+
/* @__PURE__ */ S(Ed, { item: t }),
|
|
6138
6134
|
/* @__PURE__ */ C("div", {
|
|
6139
6135
|
className: Z.right,
|
|
6140
|
-
children: [/* @__PURE__ */ S(
|
|
6136
|
+
children: [/* @__PURE__ */ S(Dd, { item: t }), !(t.disabled || o) && t.actions && /* @__PURE__ */ S("div", {
|
|
6141
6137
|
className: Z.actions,
|
|
6142
6138
|
children: /* @__PURE__ */ S(fo, { actions: t.actions })
|
|
6143
6139
|
})]
|
|
6144
6140
|
})
|
|
6145
6141
|
]
|
|
6146
|
-
}), /* @__PURE__ */ S(
|
|
6142
|
+
}), /* @__PURE__ */ S(Od, {
|
|
6147
6143
|
item: t,
|
|
6148
6144
|
expanding: n
|
|
6149
6145
|
})]
|
|
6150
6146
|
})
|
|
6151
6147
|
}, e);
|
|
6152
6148
|
};
|
|
6153
|
-
return e.type === "Heading" ? /* @__PURE__ */ S(
|
|
6149
|
+
return e.type === "Heading" ? /* @__PURE__ */ S(kd, {
|
|
6154
6150
|
ref: a,
|
|
6155
6151
|
item: e,
|
|
6156
6152
|
index: t
|
|
@@ -6165,7 +6161,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6165
6161
|
};
|
|
6166
6162
|
return s(e, t, l, n, r, i);
|
|
6167
6163
|
})(t, e) : s(t, e);
|
|
6168
|
-
}),
|
|
6164
|
+
}), jd = ({ children: e, draggable: t, list: n, onListReorder: r }) => {
|
|
6169
6165
|
let [i, a] = v(null), o = (e) => {
|
|
6170
6166
|
a(e.active.id);
|
|
6171
6167
|
}, s = (e) => {
|
|
@@ -6188,7 +6184,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6188
6184
|
dropAnimation: null,
|
|
6189
6185
|
children: /* @__PURE__ */ S("div", {
|
|
6190
6186
|
className: Z.dragOverlay,
|
|
6191
|
-
children: /* @__PURE__ */ S(
|
|
6187
|
+
children: /* @__PURE__ */ S(Ad, {
|
|
6192
6188
|
draggable: t,
|
|
6193
6189
|
item: n.items[Number(i)],
|
|
6194
6190
|
index: Number(i)
|
|
@@ -6196,7 +6192,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6196
6192
|
})
|
|
6197
6193
|
}), document.body)]
|
|
6198
6194
|
}) : e;
|
|
6199
|
-
},
|
|
6195
|
+
}, Md = ({ items: e, scrollDetails: t, children: n }) => {
|
|
6200
6196
|
let { scrollable: r, hideScrollbar: i, triggerScrollToActiveItem: a, infiniteScroll: o } = t, s = _(null), c = Jr({
|
|
6201
6197
|
count: e.length,
|
|
6202
6198
|
getScrollElement: () => s.current,
|
|
@@ -6229,9 +6225,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6229
6225
|
children: n({ virtualizer: c })
|
|
6230
6226
|
})
|
|
6231
6227
|
});
|
|
6232
|
-
},
|
|
6228
|
+
}, Nd = ({ items: e, scrollDetails: t, children: n }) => {
|
|
6233
6229
|
let { scrollable: r, hideScrollbar: i, infiniteScroll: a } = t;
|
|
6234
|
-
return a ? /* @__PURE__ */ S(
|
|
6230
|
+
return a ? /* @__PURE__ */ S(Md, {
|
|
6235
6231
|
items: e,
|
|
6236
6232
|
scrollDetails: t,
|
|
6237
6233
|
children: ({ virtualizer: e }) => n({ virtualizer: e })
|
|
@@ -6242,7 +6238,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6242
6238
|
children: n({})
|
|
6243
6239
|
})
|
|
6244
6240
|
});
|
|
6245
|
-
},
|
|
6241
|
+
}, Pd = ({ list: e, bordered: t = !1, expanding: n = !1, narrow: r = !1, toggleNarrow: i = !1, onToggleNarrow: a = () => {}, invokeEditOnRowClick: o = !0, noHeader: s = !1, stickyHeader: c, draggable: l = !1, onListReorder: u = () => {}, marginBottom: d = 0, height: f, testId: p, scrollDetails: m = {
|
|
6246
6242
|
scrollable: !1,
|
|
6247
6243
|
hideScrollbar: !1,
|
|
6248
6244
|
triggerScrollToActiveItem: !1,
|
|
@@ -6255,17 +6251,17 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6255
6251
|
marginBottom: d
|
|
6256
6252
|
},
|
|
6257
6253
|
id: "scrollableDiv",
|
|
6258
|
-
children: [!s && /* @__PURE__ */ S(
|
|
6254
|
+
children: [!s && /* @__PURE__ */ S(Cd, {
|
|
6259
6255
|
name: e.name,
|
|
6260
6256
|
actions: e.actions,
|
|
6261
6257
|
toggleNarrow: i,
|
|
6262
6258
|
onToggleNarrow: a,
|
|
6263
6259
|
stickyHeader: c
|
|
6264
|
-
}), /* @__PURE__ */ S(
|
|
6260
|
+
}), /* @__PURE__ */ S(jd, {
|
|
6265
6261
|
draggable: l,
|
|
6266
6262
|
list: e,
|
|
6267
6263
|
onListReorder: u,
|
|
6268
|
-
children: /* @__PURE__ */ S(
|
|
6264
|
+
children: /* @__PURE__ */ S(Nd, {
|
|
6269
6265
|
items: e.items,
|
|
6270
6266
|
scrollDetails: m,
|
|
6271
6267
|
children: ({ virtualizer: t }) => t ? t.getVirtualItems().map((r) => /* @__PURE__ */ S("div", {
|
|
@@ -6273,14 +6269,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6273
6269
|
className: Z.virtualRow,
|
|
6274
6270
|
style: { transform: `translateY(${r.start}px)` },
|
|
6275
6271
|
ref: t.measureElement,
|
|
6276
|
-
children: /* @__PURE__ */ S(
|
|
6272
|
+
children: /* @__PURE__ */ S(Ad, {
|
|
6277
6273
|
index: r.index,
|
|
6278
6274
|
draggable: l,
|
|
6279
6275
|
item: e.items[r.index],
|
|
6280
6276
|
expanding: n,
|
|
6281
6277
|
invokeEditOnRowClick: o
|
|
6282
6278
|
})
|
|
6283
|
-
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(
|
|
6279
|
+
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(Ad, {
|
|
6284
6280
|
index: t,
|
|
6285
6281
|
draggable: l,
|
|
6286
6282
|
item: e,
|
|
@@ -6289,7 +6285,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6289
6285
|
}) }, t))
|
|
6290
6286
|
})
|
|
6291
6287
|
})]
|
|
6292
|
-
}),
|
|
6288
|
+
}), Fd = {
|
|
6293
6289
|
loader: "_loader_477i5_1",
|
|
6294
6290
|
fullViewPortSize: "_fullViewPortSize_477i5_7",
|
|
6295
6291
|
cover: "_cover_477i5_14",
|
|
@@ -6297,33 +6293,33 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6297
6293
|
content: "_content_477i5_44",
|
|
6298
6294
|
text: "_text_477i5_49",
|
|
6299
6295
|
details: "_details_477i5_53"
|
|
6300
|
-
},
|
|
6296
|
+
}, Id = ({ width: e, height: t, text: n = "", details: r = "", fullViewPortSize: i = !1, cover: a = !1, children: o = null, theme: s = ki.DARK, testId: c = null }) => {
|
|
6301
6297
|
let l = s === ki.DARK ? ki.WHITE : ki.INHERIT, u = s === "white" ? "var(--color-background-raised)" : s === "light" ? "var(--color-background)" : "black";
|
|
6302
6298
|
return /* @__PURE__ */ S("div", {
|
|
6303
|
-
className: b(
|
|
6299
|
+
className: b(Fd.loader, a ? Fd.cover : "", { [Fd.fullViewPortSize]: i }),
|
|
6304
6300
|
style: {
|
|
6305
6301
|
width: e,
|
|
6306
6302
|
height: t
|
|
6307
6303
|
},
|
|
6308
6304
|
"data-testid": c,
|
|
6309
6305
|
children: /* @__PURE__ */ S("div", {
|
|
6310
|
-
className:
|
|
6306
|
+
className: Fd.dimmer,
|
|
6311
6307
|
style: {
|
|
6312
6308
|
background: u,
|
|
6313
6309
|
color: l
|
|
6314
6310
|
},
|
|
6315
6311
|
children: /* @__PURE__ */ C("div", {
|
|
6316
|
-
className:
|
|
6312
|
+
className: Fd.content,
|
|
6317
6313
|
"data-testid": c && `${c}-content`,
|
|
6318
6314
|
children: [
|
|
6319
6315
|
o,
|
|
6320
6316
|
n && /* @__PURE__ */ S("div", {
|
|
6321
|
-
className:
|
|
6317
|
+
className: Fd.text,
|
|
6322
6318
|
"data-testid": c && `${c}-text`,
|
|
6323
6319
|
children: n
|
|
6324
6320
|
}),
|
|
6325
6321
|
r && /* @__PURE__ */ S("div", {
|
|
6326
|
-
className:
|
|
6322
|
+
className: Fd.details,
|
|
6327
6323
|
"data-testid": c && `${c}-details`,
|
|
6328
6324
|
children: r
|
|
6329
6325
|
})
|
|
@@ -6331,15 +6327,15 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6331
6327
|
})
|
|
6332
6328
|
})
|
|
6333
6329
|
});
|
|
6334
|
-
},
|
|
6330
|
+
}, Ld = {
|
|
6335
6331
|
menu: "_menu_12x4u_1",
|
|
6336
6332
|
header: "_header_12x4u_11",
|
|
6337
6333
|
item: "_item_12x4u_27",
|
|
6338
6334
|
heading: "_heading_12x4u_32"
|
|
6339
|
-
},
|
|
6335
|
+
}, Rd = ({ option: e, onChange: t }) => {
|
|
6340
6336
|
let { key: n, selected: r, label: i, disabled: a, testId: o, helpText: s, onClickHelp: c, textTransform: l } = e;
|
|
6341
6337
|
return /* @__PURE__ */ S("div", {
|
|
6342
|
-
className:
|
|
6338
|
+
className: Ld.item,
|
|
6343
6339
|
children: /* @__PURE__ */ S(fa, {
|
|
6344
6340
|
label: i,
|
|
6345
6341
|
noMargin: !0,
|
|
@@ -6352,21 +6348,21 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6352
6348
|
textTransform: l
|
|
6353
6349
|
})
|
|
6354
6350
|
}, n);
|
|
6355
|
-
},
|
|
6356
|
-
className:
|
|
6351
|
+
}, zd = ({ label: e }) => /* @__PURE__ */ S("div", {
|
|
6352
|
+
className: Ld.heading,
|
|
6357
6353
|
children: e
|
|
6358
|
-
}),
|
|
6354
|
+
}), Bd = /* @__PURE__ */ function(e) {
|
|
6359
6355
|
return e.HEADING = "Heading", e.DIVIDER = "Divider", e.DEFAULT = "Default", e;
|
|
6360
|
-
}({}),
|
|
6361
|
-
className: b("menu",
|
|
6356
|
+
}({}), Vd = (e) => e.type !== Bd.HEADING && e.type !== Bd.DIVIDER && !e.disabled, Hd = ({ options: e, onChangeOptions: t, showHeader: n, maxHeight: r, testId: i }) => /* @__PURE__ */ C("div", {
|
|
6357
|
+
className: b("menu", Ld.menu),
|
|
6362
6358
|
style: { maxHeight: r },
|
|
6363
6359
|
"data-testid": i ? `${i}-option-dropdown-layer` : void 0,
|
|
6364
6360
|
children: [n && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
|
|
6365
|
-
className:
|
|
6361
|
+
className: Ld.header,
|
|
6366
6362
|
children: [
|
|
6367
6363
|
/* @__PURE__ */ S("a", {
|
|
6368
6364
|
onClick: (n) => {
|
|
6369
|
-
t(n, e.map((e) =>
|
|
6365
|
+
t(n, e.map((e) => Vd(e) ? {
|
|
6370
6366
|
...e,
|
|
6371
6367
|
selected: !0
|
|
6372
6368
|
} : e));
|
|
@@ -6375,7 +6371,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6375
6371
|
}),
|
|
6376
6372
|
/* @__PURE__ */ S("a", {
|
|
6377
6373
|
onClick: (n) => {
|
|
6378
|
-
t(n, e.map((e) =>
|
|
6374
|
+
t(n, e.map((e) => Vd(e) ? {
|
|
6379
6375
|
...e,
|
|
6380
6376
|
selected: !1
|
|
6381
6377
|
} : e));
|
|
@@ -6384,7 +6380,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6384
6380
|
}),
|
|
6385
6381
|
/* @__PURE__ */ S("a", {
|
|
6386
6382
|
onClick: (n) => {
|
|
6387
|
-
t(n, e.map((e) =>
|
|
6383
|
+
t(n, e.map((e) => Vd(e) ? {
|
|
6388
6384
|
...e,
|
|
6389
6385
|
selected: !e.selected
|
|
6390
6386
|
} : e));
|
|
@@ -6394,19 +6390,19 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6394
6390
|
]
|
|
6395
6391
|
}), /* @__PURE__ */ S(Zo, { margin: 0 })] }), e.map((n, r) => {
|
|
6396
6392
|
switch (n.type) {
|
|
6397
|
-
case
|
|
6393
|
+
case Bd.HEADING:
|
|
6398
6394
|
var i;
|
|
6399
|
-
return /* @__PURE__ */ S(
|
|
6400
|
-
case
|
|
6395
|
+
return /* @__PURE__ */ S(zd, { label: n.label }, (i = n.key) == null ? r : i);
|
|
6396
|
+
case Bd.DIVIDER:
|
|
6401
6397
|
var a;
|
|
6402
6398
|
return /* @__PURE__ */ S(Zo, { margin: 0 }, (a = n.key) == null ? r : a);
|
|
6403
6399
|
default:
|
|
6404
6400
|
var o;
|
|
6405
|
-
return /* @__PURE__ */ S(
|
|
6401
|
+
return /* @__PURE__ */ S(Rd, {
|
|
6406
6402
|
option: n,
|
|
6407
6403
|
onChange: (r) => {
|
|
6408
6404
|
let { value: i } = n;
|
|
6409
|
-
t(r, e.map((e) => e.type ===
|
|
6405
|
+
t(r, e.map((e) => e.type === Bd.HEADING || e.type === Bd.DIVIDER || e.value !== i ? e : {
|
|
6410
6406
|
...e,
|
|
6411
6407
|
selected: !e.selected
|
|
6412
6408
|
}));
|
|
@@ -6414,7 +6410,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6414
6410
|
}, (o = n.key) == null ? r : o);
|
|
6415
6411
|
}
|
|
6416
6412
|
})]
|
|
6417
|
-
}),
|
|
6413
|
+
}), Ud = ({ name: e, disabled: t, label: n, options: r, onChange: i, small: a = !1, showHeader: o = !0, maxHeight: s = "40vh", testId: c }) => /* @__PURE__ */ S(lo, {
|
|
6418
6414
|
testId: c,
|
|
6419
6415
|
disabled: t,
|
|
6420
6416
|
menu: {
|
|
@@ -6422,7 +6418,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6422
6418
|
small: a,
|
|
6423
6419
|
label: n,
|
|
6424
6420
|
trigger: wi.DROP_DOWN_BUTTON,
|
|
6425
|
-
sections: /* @__PURE__ */ S(
|
|
6421
|
+
sections: /* @__PURE__ */ S(Hd, {
|
|
6426
6422
|
testId: c,
|
|
6427
6423
|
options: r,
|
|
6428
6424
|
onChangeOptions: (t, n) => {
|
|
@@ -6432,13 +6428,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6432
6428
|
maxHeight: s
|
|
6433
6429
|
})
|
|
6434
6430
|
}
|
|
6435
|
-
}),
|
|
6431
|
+
}), Wd = {
|
|
6436
6432
|
page: "_page_beskc_1",
|
|
6437
6433
|
scroll: "_scroll_beskc_23"
|
|
6438
|
-
},
|
|
6434
|
+
}, Gd = ({ children: e, left: t = "var(--size-sidebar)", padding: n = !0, scroll: r = !0, top: i = "var(--size-topbar)" }) => {
|
|
6439
6435
|
let a = typeof n == "string" ? n : n === !0 ? "var(--padding)" : "0";
|
|
6440
6436
|
return /* @__PURE__ */ S("div", {
|
|
6441
|
-
className: b(
|
|
6437
|
+
className: b(Wd.page, r ? Wd.scroll : ""),
|
|
6442
6438
|
style: {
|
|
6443
6439
|
left: t,
|
|
6444
6440
|
padding: a,
|
|
@@ -6446,17 +6442,17 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6446
6442
|
},
|
|
6447
6443
|
children: e
|
|
6448
6444
|
});
|
|
6449
|
-
},
|
|
6445
|
+
}, Kd = ({ id: e, children: t }) => {
|
|
6450
6446
|
let n = document.querySelector(`#${e}`), [r, i] = v(!1);
|
|
6451
6447
|
return m(() => {
|
|
6452
6448
|
r || i(!0);
|
|
6453
6449
|
}, [e]), n ? Wr(t, n) : null;
|
|
6454
|
-
},
|
|
6450
|
+
}, qd = { printHeader: "_printHeader_o7xxx_1" }, Jd = ({ logo: e, alt: t, logoWidth: n = "100px" }) => /* @__PURE__ */ S("img", {
|
|
6455
6451
|
src: e,
|
|
6456
6452
|
alt: t,
|
|
6457
|
-
className:
|
|
6453
|
+
className: qd.printHeader,
|
|
6458
6454
|
style: { width: n }
|
|
6459
|
-
}),
|
|
6455
|
+
}), Yd = ({ name: e, label: t, options: n, value: r, onChange: i, disabled: a = !1, small: o = !1, noMargin: s = !1, inline: c = !1, testId: l }) => {
|
|
6460
6456
|
var d;
|
|
6461
6457
|
let f = u(W), { simpleInputs: p, options: m, selectedOptions: h } = el(n, r), g = h == null ? void 0 : p ? h : h.value, _ = a || f;
|
|
6462
6458
|
return /* @__PURE__ */ C(Hr, {
|
|
@@ -6497,36 +6493,36 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6497
6493
|
}, (t = (n = e.value) == null ? void 0 : n.toString()) == null ? "" : t);
|
|
6498
6494
|
})]
|
|
6499
6495
|
});
|
|
6500
|
-
},
|
|
6496
|
+
}, Xd = {
|
|
6501
6497
|
richTextToolbar: "_richTextToolbar_1gbkk_1",
|
|
6502
6498
|
richTextToolbarContainer: "_richTextToolbarContainer_1gbkk_5"
|
|
6503
|
-
},
|
|
6499
|
+
}, Zd = /* @__PURE__ */ function(e) {
|
|
6504
6500
|
return e.BOLD = "bold", e.ITALIC = "italic", e.CODE = "code", e.UL = "ul", e.OL = "ol", e.MENTION = "at", e;
|
|
6505
|
-
}({}),
|
|
6501
|
+
}({}), Qd = ({ editor: e, disabled: t = !1, showMentionButton: n = !1, toolbarComponent: r = null }) => {
|
|
6506
6502
|
var i, a, o, s, c;
|
|
6507
6503
|
let l = [
|
|
6508
6504
|
{
|
|
6509
|
-
icon:
|
|
6505
|
+
icon: Zd.BOLD,
|
|
6510
6506
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBold().run(),
|
|
6511
6507
|
active: (i = e == null ? void 0 : e.isActive("bold")) != null && i
|
|
6512
6508
|
},
|
|
6513
6509
|
{
|
|
6514
|
-
icon:
|
|
6510
|
+
icon: Zd.ITALIC,
|
|
6515
6511
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleItalic().run(),
|
|
6516
6512
|
active: (a = e == null ? void 0 : e.isActive("italic")) != null && a
|
|
6517
6513
|
},
|
|
6518
6514
|
{
|
|
6519
|
-
icon:
|
|
6515
|
+
icon: Zd.CODE,
|
|
6520
6516
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleCode().run(),
|
|
6521
6517
|
active: (o = e == null ? void 0 : e.isActive("code")) != null && o
|
|
6522
6518
|
},
|
|
6523
6519
|
{
|
|
6524
|
-
icon:
|
|
6520
|
+
icon: Zd.UL,
|
|
6525
6521
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBulletList().run(),
|
|
6526
6522
|
active: (s = e == null ? void 0 : e.isActive("bulletList")) != null && s
|
|
6527
6523
|
},
|
|
6528
6524
|
{
|
|
6529
|
-
icon:
|
|
6525
|
+
icon: Zd.OL,
|
|
6530
6526
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleOrderedList().run(),
|
|
6531
6527
|
active: (c = e == null ? void 0 : e.isActive("orderedList")) != null && c
|
|
6532
6528
|
}
|
|
@@ -6534,15 +6530,15 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6534
6530
|
if (n) {
|
|
6535
6531
|
var u;
|
|
6536
6532
|
l.push({
|
|
6537
|
-
icon:
|
|
6533
|
+
icon: Zd.MENTION,
|
|
6538
6534
|
onClick: () => e == null ? void 0 : e.chain().focus().insertContent("@").run(),
|
|
6539
6535
|
active: (u = e == null ? void 0 : e.isActive("mention")) != null && u
|
|
6540
6536
|
});
|
|
6541
6537
|
}
|
|
6542
6538
|
return /* @__PURE__ */ C("div", {
|
|
6543
|
-
className:
|
|
6539
|
+
className: Xd.richTextToolbarContainer,
|
|
6544
6540
|
children: [/* @__PURE__ */ S("div", {
|
|
6545
|
-
className:
|
|
6541
|
+
className: Xd.richTextToolbar,
|
|
6546
6542
|
children: l.map((e, n) => /* @__PURE__ */ S(q, {
|
|
6547
6543
|
small: !0,
|
|
6548
6544
|
round: !0,
|
|
@@ -6555,36 +6551,36 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6555
6551
|
}, n))
|
|
6556
6552
|
}), r]
|
|
6557
6553
|
});
|
|
6558
|
-
},
|
|
6559
|
-
let t =
|
|
6554
|
+
}, $d = 8, ef = /^\[@((?:\\.|[^\\\]])*)\]\(mention:((?:\\.|[^\\)])+)\)/, tf = (e) => e.replace(/[\\\][()]/g, "\\$&"), nf = (e) => e.replace(/\\(.)/g, "$1"), rf = (e) => typeof e == "string" ? e : "", af = (e) => {
|
|
6555
|
+
let t = ef.exec(e);
|
|
6560
6556
|
if (!t) return;
|
|
6561
6557
|
let [n, r, i] = t;
|
|
6562
6558
|
return {
|
|
6563
6559
|
raw: n,
|
|
6564
|
-
id:
|
|
6565
|
-
label:
|
|
6560
|
+
id: nf(i),
|
|
6561
|
+
label: nf(r)
|
|
6566
6562
|
};
|
|
6567
|
-
},
|
|
6563
|
+
}, of = (e) => {
|
|
6568
6564
|
if (!e) return [];
|
|
6569
6565
|
let t = /* @__PURE__ */ new Set();
|
|
6570
6566
|
return e.state.doc.descendants((e) => {
|
|
6571
6567
|
e.type.name === di.name && typeof e.attrs.id == "string" && t.add(e.attrs.id);
|
|
6572
6568
|
}), [...t];
|
|
6573
|
-
},
|
|
6569
|
+
}, sf = (e, t) => `[@${tf(e)}](mention:${tf(t)})`, cf = (e, t) => di.extend({
|
|
6574
6570
|
renderMarkdown: (e) => {
|
|
6575
6571
|
var t, n;
|
|
6576
|
-
return
|
|
6572
|
+
return sf(rf((t = e.attrs) == null ? void 0 : t.label), rf((n = e.attrs) == null ? void 0 : n.id));
|
|
6577
6573
|
},
|
|
6578
6574
|
parseMarkdown: (e, t) => t.createNode(di.name, {
|
|
6579
|
-
id:
|
|
6580
|
-
label:
|
|
6575
|
+
id: rf(e.id),
|
|
6576
|
+
label: rf(e.label)
|
|
6581
6577
|
}),
|
|
6582
6578
|
markdownTokenizer: {
|
|
6583
6579
|
name: di.name,
|
|
6584
6580
|
level: "inline",
|
|
6585
6581
|
start: (e) => e.indexOf("[@"),
|
|
6586
6582
|
tokenize: (e) => {
|
|
6587
|
-
let t =
|
|
6583
|
+
let t = af(e);
|
|
6588
6584
|
return t && {
|
|
6589
6585
|
type: di.name,
|
|
6590
6586
|
...t
|
|
@@ -6600,11 +6596,11 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6600
6596
|
var r;
|
|
6601
6597
|
let i = e();
|
|
6602
6598
|
if (!i) return [];
|
|
6603
|
-
let a = new Set(
|
|
6604
|
-
return (await i.getItems(t)).filter(({ id: e }) => !a.has(e)).slice(0, (r = i.maxItems) == null ?
|
|
6599
|
+
let a = new Set(of(n));
|
|
6600
|
+
return (await i.getItems(t)).filter(({ id: e }) => !a.has(e)).slice(0, (r = i.maxItems) == null ? $d : r);
|
|
6605
6601
|
},
|
|
6606
6602
|
render: t
|
|
6607
|
-
} }),
|
|
6603
|
+
} }), lf = {
|
|
6608
6604
|
inputInTable: "_inputInTable_1xhvx_1",
|
|
6609
6605
|
inputHover: "_inputHover_1xhvx_13",
|
|
6610
6606
|
inputFocus: "_inputFocus_1xhvx_18",
|
|
@@ -6619,7 +6615,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6619
6615
|
mentionLayer: "_mentionLayer_1xhvx_133",
|
|
6620
6616
|
mentionOption: "_mentionOption_1xhvx_144",
|
|
6621
6617
|
focused: "_focused_1xhvx_150"
|
|
6622
|
-
},
|
|
6618
|
+
}, uf = o(({ editable: e, getRect: t, items: n, onDismiss: r, onSelect: i }, a) => {
|
|
6623
6619
|
let [o, s] = v(0), c = n.length > 0, u = f(), m = l((e) => `${u}-option-${e}`, [u]), { renderLayer: g, layerProps: y, triggerProps: x } = aa({
|
|
6624
6620
|
isOpen: c,
|
|
6625
6621
|
placement: "bottom-start",
|
|
@@ -6681,14 +6677,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6681
6677
|
i
|
|
6682
6678
|
]), c ? g(/* @__PURE__ */ S("div", {
|
|
6683
6679
|
...y,
|
|
6684
|
-
className:
|
|
6680
|
+
className: lf.mentionLayer,
|
|
6685
6681
|
id: u,
|
|
6686
6682
|
role: "listbox",
|
|
6687
6683
|
children: n.map((e, t) => /* @__PURE__ */ S("div", {
|
|
6688
6684
|
id: m(t),
|
|
6689
6685
|
role: "option",
|
|
6690
6686
|
"aria-selected": t === o,
|
|
6691
|
-
className: b(
|
|
6687
|
+
className: b(lf.mentionOption, { [lf.focused]: t === o }),
|
|
6692
6688
|
onMouseEnter: () => s(t),
|
|
6693
6689
|
onMouseDown: (t) => {
|
|
6694
6690
|
t.preventDefault(), i(e);
|
|
@@ -6696,12 +6692,12 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6696
6692
|
children: e.label
|
|
6697
6693
|
}, e.id))
|
|
6698
6694
|
})) : null;
|
|
6699
|
-
}),
|
|
6695
|
+
}), df = ({ clientRect: e, command: t, editor: n, items: r }) => ({
|
|
6700
6696
|
clientRect: e,
|
|
6701
6697
|
command: t,
|
|
6702
6698
|
items: r,
|
|
6703
6699
|
editable: n.view.dom
|
|
6704
|
-
}),
|
|
6700
|
+
}), ff = c(o(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i, mentions: a }, o) => {
|
|
6705
6701
|
var s, c, l, f;
|
|
6706
6702
|
let m = u(W), g = r || m, y = !!a, b = _(a), x = _(null), w = _(n == null ? "" : n), [T, E] = v(null);
|
|
6707
6703
|
d(() => {
|
|
@@ -6711,9 +6707,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6711
6707
|
ci,
|
|
6712
6708
|
li.configure({ placeholder: e }),
|
|
6713
6709
|
ui,
|
|
6714
|
-
|
|
6715
|
-
onStart: (e) => E(
|
|
6716
|
-
onUpdate: (e) => E(
|
|
6710
|
+
cf(() => b.current, () => ({
|
|
6711
|
+
onStart: (e) => E(df(e)),
|
|
6712
|
+
onUpdate: (e) => E(df(e)),
|
|
6717
6713
|
onExit: () => E(null),
|
|
6718
6714
|
onKeyDown: ({ event: e }) => {
|
|
6719
6715
|
var t, n;
|
|
@@ -6725,9 +6721,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6725
6721
|
content: w.current,
|
|
6726
6722
|
contentType: "markdown",
|
|
6727
6723
|
editable: !g,
|
|
6728
|
-
editorProps: { attributes: { class:
|
|
6724
|
+
editorProps: { attributes: { class: lf.editable } },
|
|
6729
6725
|
onUpdate: ({ editor: e }) => {
|
|
6730
|
-
t == null || t(e.getMarkdown(), { mentionedIds:
|
|
6726
|
+
t == null || t(e.getMarkdown(), { mentionedIds: of(e) });
|
|
6731
6727
|
}
|
|
6732
6728
|
});
|
|
6733
6729
|
return d(() => {
|
|
@@ -6740,18 +6736,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6740
6736
|
}, [g, O]), p(o, () => ({
|
|
6741
6737
|
clearContent: () => O == null ? void 0 : O.commands.clearContent(!1),
|
|
6742
6738
|
editor: O,
|
|
6743
|
-
getMentionedIds: () =>
|
|
6739
|
+
getMentionedIds: () => of(O)
|
|
6744
6740
|
}), [O]), /* @__PURE__ */ C("div", {
|
|
6745
|
-
className:
|
|
6741
|
+
className: lf.richTextInput,
|
|
6746
6742
|
children: [
|
|
6747
|
-
/* @__PURE__ */ S(
|
|
6743
|
+
/* @__PURE__ */ S(Qd, {
|
|
6748
6744
|
editor: O,
|
|
6749
6745
|
disabled: g,
|
|
6750
6746
|
showMentionButton: y && ((s = a == null ? void 0 : a.showMentionButton) == null || s),
|
|
6751
6747
|
toolbarComponent: i
|
|
6752
6748
|
}),
|
|
6753
6749
|
/* @__PURE__ */ S(oi, { editor: O }),
|
|
6754
|
-
y && /* @__PURE__ */ S(Xi, { children: /* @__PURE__ */ S(
|
|
6750
|
+
y && /* @__PURE__ */ S(Xi, { children: /* @__PURE__ */ S(uf, {
|
|
6755
6751
|
ref: x,
|
|
6756
6752
|
editable: (c = T == null ? void 0 : T.editable) == null ? null : c,
|
|
6757
6753
|
getRect: (l = T == null ? void 0 : T.clientRect) == null ? null : l,
|
|
@@ -6761,13 +6757,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6761
6757
|
}) })
|
|
6762
6758
|
]
|
|
6763
6759
|
});
|
|
6764
|
-
})),
|
|
6765
|
-
className:
|
|
6760
|
+
})), pf = ({ children: e }) => /* @__PURE__ */ S("span", {
|
|
6761
|
+
className: lf.mention,
|
|
6766
6762
|
children: e
|
|
6767
|
-
}),
|
|
6763
|
+
}), mf = { row: "_row_n16je_1" }, hf = ({ alignItems: t = "initial", justifyContent: n = "initial", children: r = null, flex: i = !1, height: a = "auto", marginBottom: o = "0", marginTop: c = "0", spacing: l = "var(--padding)", wrap: u = !1, testId: d = null }) => {
|
|
6768
6764
|
let f = typeof l == "number" ? `${l}px` : l, p = (r === null || r === !1 ? [] : Array.isArray(r) ? r.filter((e) => s(e)) : [r]).map((t, n) => /* @__PURE__ */ S(e.Fragment, { children: e.cloneElement(t, { spacing: f }) }, n));
|
|
6769
6765
|
return /* @__PURE__ */ S("div", {
|
|
6770
|
-
className: b(
|
|
6766
|
+
className: b(mf.row),
|
|
6771
6767
|
style: {
|
|
6772
6768
|
alignItems: t,
|
|
6773
6769
|
justifyContent: n,
|
|
@@ -6783,7 +6779,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6783
6779
|
"data-testid": d,
|
|
6784
6780
|
children: p
|
|
6785
6781
|
});
|
|
6786
|
-
},
|
|
6782
|
+
}, gf = {
|
|
6787
6783
|
inputInTable: "_inputInTable_t1w93_1",
|
|
6788
6784
|
inputHover: "_inputHover_t1w93_13",
|
|
6789
6785
|
inputFocus: "_inputFocus_t1w93_18",
|
|
@@ -6803,7 +6799,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6803
6799
|
experimental: "_experimental_t1w93_159",
|
|
6804
6800
|
active: "_active_t1w93_163",
|
|
6805
6801
|
icon: "_icon_t1w93_167"
|
|
6806
|
-
},
|
|
6802
|
+
}, _f = c(({ isOpen: e, label: t, icon: n, invalid: r }) => /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(K, {
|
|
6807
6803
|
text: t,
|
|
6808
6804
|
enabled: !e,
|
|
6809
6805
|
placement: "right-center",
|
|
@@ -6812,7 +6808,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6812
6808
|
padding: "var(--padding-sm)",
|
|
6813
6809
|
display: "block",
|
|
6814
6810
|
children: /* @__PURE__ */ S("span", {
|
|
6815
|
-
className:
|
|
6811
|
+
className: gf.icon,
|
|
6816
6812
|
children: /* @__PURE__ */ S(no, {
|
|
6817
6813
|
small: !0,
|
|
6818
6814
|
title: r ? "!" : void 0,
|
|
@@ -6821,18 +6817,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6821
6817
|
})
|
|
6822
6818
|
})
|
|
6823
6819
|
}), /* @__PURE__ */ S("span", {
|
|
6824
|
-
className:
|
|
6820
|
+
className: gf.label,
|
|
6825
6821
|
children: t
|
|
6826
|
-
})] }), (e, t) => Rr(e, t)),
|
|
6827
|
-
className:
|
|
6822
|
+
})] }), (e, t) => Rr(e, t)), vf = ({ isOpen: e, items: t, sectionIndex: n, onClick: r, testId: i }) => /* @__PURE__ */ S("div", {
|
|
6823
|
+
className: gf.list,
|
|
6828
6824
|
children: t.map((t, a) => {
|
|
6829
6825
|
let o = `${n}_${a}`;
|
|
6830
6826
|
return /* @__PURE__ */ S("a", {
|
|
6831
6827
|
href: t.value,
|
|
6832
|
-
className: b(
|
|
6828
|
+
className: b(gf.item, t.isActive ? gf.active : "", t.isExperimental ? gf.experimental : ""),
|
|
6833
6829
|
onClick: (e) => r(e, t.value, t.label, t.onClick),
|
|
6834
6830
|
"data-testid": i,
|
|
6835
|
-
children: /* @__PURE__ */ S(
|
|
6831
|
+
children: /* @__PURE__ */ S(_f, {
|
|
6836
6832
|
label: t.label,
|
|
6837
6833
|
icon: t.icon,
|
|
6838
6834
|
invalid: t.invalid,
|
|
@@ -6840,16 +6836,16 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6840
6836
|
}, o)
|
|
6841
6837
|
}, o);
|
|
6842
6838
|
})
|
|
6843
|
-
}),
|
|
6844
|
-
className:
|
|
6839
|
+
}), yf = ({ isOpen: t, sections: n, onClick: r }) => /* @__PURE__ */ S(x, { children: n.map((n, i) => /* @__PURE__ */ C(e.Fragment, { children: [/* @__PURE__ */ S("h5", {
|
|
6840
|
+
className: gf.subtitle,
|
|
6845
6841
|
children: n.heading.toUpperCase()
|
|
6846
|
-
}), /* @__PURE__ */ S(
|
|
6842
|
+
}), /* @__PURE__ */ S(vf, {
|
|
6847
6843
|
isOpen: t,
|
|
6848
6844
|
items: n.items,
|
|
6849
6845
|
sectionIndex: i,
|
|
6850
6846
|
onClick: r,
|
|
6851
6847
|
testId: n.testId
|
|
6852
|
-
})] }, i)) }),
|
|
6848
|
+
})] }, i)) }), bf = c(({ options: e, startOpen: t = !1, onShiftClickToggleOpen: n = () => {}, top: r }) => {
|
|
6853
6849
|
let [i, a] = v(t), o = (e, t, n, r) => {
|
|
6854
6850
|
e.preventDefault(), typeof r == "function" && (e.currentTarget.value = t, e.currentTarget.label = n, r(e)), a(!1);
|
|
6855
6851
|
}, s = e.sections.length > 0;
|
|
@@ -6870,13 +6866,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6870
6866
|
icon: U.LEFT
|
|
6871
6867
|
}),
|
|
6872
6868
|
children: /* @__PURE__ */ S("div", {
|
|
6873
|
-
className: b(
|
|
6869
|
+
className: b(gf.sidebar, i ? "" : gf.collapsed),
|
|
6874
6870
|
children: s && /* @__PURE__ */ C("div", {
|
|
6875
|
-
className:
|
|
6871
|
+
className: gf.inner,
|
|
6876
6872
|
children: [/* @__PURE__ */ S("h4", {
|
|
6877
|
-
className:
|
|
6873
|
+
className: gf.title,
|
|
6878
6874
|
children: e.title
|
|
6879
|
-
}), /* @__PURE__ */ S(
|
|
6875
|
+
}), /* @__PURE__ */ S(yf, {
|
|
6880
6876
|
isOpen: i,
|
|
6881
6877
|
sections: e.sections,
|
|
6882
6878
|
onClick: o
|
|
@@ -6884,18 +6880,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6884
6880
|
})
|
|
6885
6881
|
})
|
|
6886
6882
|
});
|
|
6887
|
-
}, (e, t) => Rr(e, t)),
|
|
6883
|
+
}, (e, t) => Rr(e, t)), xf = {
|
|
6888
6884
|
skeletonContainer: "_skeletonContainer_mcfxp_9",
|
|
6889
6885
|
skeleton: "_skeleton_mcfxp_9"
|
|
6890
|
-
},
|
|
6886
|
+
}, Sf = ({ count: e, width: t, height: n }) => /* @__PURE__ */ S(fi, {
|
|
6891
6887
|
baseColor: "var(--color-skeleton-base)",
|
|
6892
6888
|
highlightColor: "var(--color-skeleton-highlight)",
|
|
6893
|
-
containerClassName:
|
|
6894
|
-
className:
|
|
6889
|
+
containerClassName: xf.skeletonContainer,
|
|
6890
|
+
className: xf.skeleton,
|
|
6895
6891
|
count: e,
|
|
6896
6892
|
width: t,
|
|
6897
6893
|
height: n
|
|
6898
|
-
}),
|
|
6894
|
+
}), Cf = {
|
|
6899
6895
|
wrapper: "_wrapper_j8x9r_1",
|
|
6900
6896
|
label: "_label_j8x9r_5",
|
|
6901
6897
|
input: "_input_j8x9r_9",
|
|
@@ -6903,38 +6899,38 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6903
6899
|
editable: "_editable_j8x9r_22",
|
|
6904
6900
|
inputControl: "_inputControl_j8x9r_25",
|
|
6905
6901
|
actions: "_actions_j8x9r_28"
|
|
6906
|
-
},
|
|
6902
|
+
}, wf = () => {
|
|
6907
6903
|
let e = _(null);
|
|
6908
6904
|
return m(() => {
|
|
6909
6905
|
e.current && (e.current(), e.current = null);
|
|
6910
6906
|
}), (t) => {
|
|
6911
6907
|
e.current = t;
|
|
6912
6908
|
};
|
|
6913
|
-
},
|
|
6909
|
+
}, Tf = (e) => {
|
|
6914
6910
|
let t = _(void 0);
|
|
6915
6911
|
return d(() => {
|
|
6916
6912
|
t.current = e;
|
|
6917
6913
|
}, [e]), t.current;
|
|
6918
|
-
},
|
|
6914
|
+
}, Ef = (e, t) => {
|
|
6919
6915
|
let n = t == null ? void 0 : t[e];
|
|
6920
6916
|
if (!n) {
|
|
6921
6917
|
var r;
|
|
6922
6918
|
return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = Dr(e)) == null ? "" : r;
|
|
6923
6919
|
}
|
|
6924
6920
|
return n;
|
|
6925
|
-
},
|
|
6921
|
+
}, Df = /* @__PURE__ */ function(e) {
|
|
6926
6922
|
return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
|
|
6927
|
-
}({}),
|
|
6923
|
+
}({}), Of = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), kf = (e) => {
|
|
6928
6924
|
if (!e) return !1;
|
|
6929
6925
|
let t = dr(e);
|
|
6930
6926
|
return !ar.includes(t);
|
|
6931
|
-
},
|
|
6927
|
+
}, Af = ({ value: e, unitkey: t, toUnit: n }) => {
|
|
6932
6928
|
var r;
|
|
6933
6929
|
let i = ir[t];
|
|
6934
6930
|
if (!i || i.length === 0 || !((r = Or(e)) != null && r.valid) || !i.includes(n)) return !1;
|
|
6935
6931
|
let a = dr(String(e));
|
|
6936
6932
|
return !(a && !i.includes(a));
|
|
6937
|
-
},
|
|
6933
|
+
}, jf = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
|
|
6938
6934
|
var o;
|
|
6939
6935
|
let s = _r(e) ? pr(e) : e, c = [Infinity, -Infinity].includes(Number(s));
|
|
6940
6936
|
if (i || c) return {
|
|
@@ -6954,13 +6950,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6954
6950
|
value: void 0,
|
|
6955
6951
|
error: "Source unit is missing"
|
|
6956
6952
|
};
|
|
6957
|
-
if (
|
|
6953
|
+
if (Of(s)) return {
|
|
6958
6954
|
value: void 0,
|
|
6959
6955
|
error: "Value is invalid for conversion"
|
|
6960
6956
|
};
|
|
6961
6957
|
try {
|
|
6962
6958
|
let e = Ar(s, l);
|
|
6963
|
-
if (
|
|
6959
|
+
if (Af({
|
|
6964
6960
|
value: e,
|
|
6965
6961
|
toUnit: n,
|
|
6966
6962
|
unitkey: t
|
|
@@ -6981,13 +6977,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6981
6977
|
error: "Conversion not possible"
|
|
6982
6978
|
};
|
|
6983
6979
|
}
|
|
6984
|
-
},
|
|
6985
|
-
let a = pr(e), o =
|
|
6986
|
-
return !
|
|
6980
|
+
}, Mf = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
|
|
6981
|
+
let a = pr(e), o = Of(a);
|
|
6982
|
+
return !Af({
|
|
6987
6983
|
value: e,
|
|
6988
6984
|
unitkey: n,
|
|
6989
6985
|
toUnit: t
|
|
6990
|
-
}) ||
|
|
6986
|
+
}) || kf(e) || o ? { value: a } : _r(e) ? jf({
|
|
6991
6987
|
value: e,
|
|
6992
6988
|
unitkey: n,
|
|
6993
6989
|
toUnit: t,
|
|
@@ -6995,25 +6991,25 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6995
6991
|
doNotConvertValue: i,
|
|
6996
6992
|
exactPrecision: !0
|
|
6997
6993
|
}) : { value: e };
|
|
6998
|
-
},
|
|
6994
|
+
}, Nf = (e) => gn(e) && !cn(e) && !pn(e) ? sn(e, "fieldName", "") : typeof e == "string" ? e : "", Pf = (e = "") => ar == null ? void 0 : ar.includes(e), Ff = (e, t) => {
|
|
6999
6995
|
let n = dr(e || "");
|
|
7000
|
-
return
|
|
7001
|
-
},
|
|
7002
|
-
|
|
7003
|
-
},
|
|
6996
|
+
return Pf(t) && Pf(n);
|
|
6997
|
+
}, If = i(null), Lf = () => u(If), Rf = !1, zf = (e) => {
|
|
6998
|
+
Rf || (Rf = !0, If = e);
|
|
6999
|
+
}, Bf = (e) => hr(e) ? e : yr(e), Vf = {
|
|
7004
7000
|
predefinedMenuActive: "_predefinedMenuActive_ye9w9_1",
|
|
7005
7001
|
inputWrapper: "_inputWrapper_ye9w9_4"
|
|
7006
|
-
},
|
|
7002
|
+
}, Hf = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUnit: r = !1, error: i = null, left: a = !1, small: o = !1, width: s = "100%", value: c, unitkey: l = "", initUnit: u, noConversion: 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 = () => ({
|
|
7007
7003
|
name: "",
|
|
7008
7004
|
error: null
|
|
7009
7005
|
}), 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 }) => {
|
|
7010
|
-
let B =
|
|
7006
|
+
let B = Lf(), ee = wf();
|
|
7011
7007
|
typeof c == "number" && (c = `${c}`);
|
|
7012
|
-
let [te = "", ne = ""] = c === void 0 ? [] : Cr(c), V = h(() =>
|
|
7008
|
+
let [te = "", ne = ""] = c === void 0 ? [] : Cr(c), V = h(() => Ef(l, y || (B == null ? void 0 : B.unitTemplate)), [
|
|
7013
7009
|
l,
|
|
7014
7010
|
y,
|
|
7015
7011
|
B == null ? void 0 : B.unitTemplate
|
|
7016
|
-
]), re =
|
|
7012
|
+
]), re = Ff(c, V), ie = u || V || ne, ae = Tf(ie), { value: oe } = Mf({
|
|
7017
7013
|
value: c,
|
|
7018
7014
|
toUnit: ie,
|
|
7019
7015
|
unitkey: l,
|
|
@@ -7025,10 +7021,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7025
7021
|
} : {
|
|
7026
7022
|
value: oe,
|
|
7027
7023
|
unit: ie
|
|
7028
|
-
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = v(D ?
|
|
7024
|
+
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = v(D ? Df.PREDEFINED : Df.CUSTOM), fe = !!(j || n), pe = E && E.find((e) => {
|
|
7029
7025
|
if (!(e != null && e.value)) return;
|
|
7030
7026
|
if (k) return k === e.valueKey;
|
|
7031
|
-
let t = _r(e.value) ? dr(e.value) : "", { value: n = c } =
|
|
7027
|
+
let t = _r(e.value) ? dr(e.value) : "", { value: n = c } = jf({
|
|
7032
7028
|
value: String(c),
|
|
7033
7029
|
unitkey: l,
|
|
7034
7030
|
toUnit: t
|
|
@@ -7037,7 +7033,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7037
7033
|
}), me = () => {
|
|
7038
7034
|
var e;
|
|
7039
7035
|
let t = (e = c) == null ? "" : e, n = se.unit;
|
|
7040
|
-
if (!
|
|
7036
|
+
if (!Af({
|
|
7041
7037
|
value: t,
|
|
7042
7038
|
unitkey: l,
|
|
7043
7039
|
toUnit: n
|
|
@@ -7052,7 +7048,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7052
7048
|
return null;
|
|
7053
7049
|
}
|
|
7054
7050
|
}, he = (t) => {
|
|
7055
|
-
let n =
|
|
7051
|
+
let n = Nf(e), r = t.target, { value: i, selectionStart: a } = r, o = Ar(i, (se == null ? void 0 : se.unit) || "");
|
|
7056
7052
|
p({ target: {
|
|
7057
7053
|
value: N ? Ar(cr(o, ne), ne) : o,
|
|
7058
7054
|
name: n
|
|
@@ -7074,7 +7070,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7074
7070
|
if (ie) {
|
|
7075
7071
|
let e, t = "";
|
|
7076
7072
|
if (ae !== ie) {
|
|
7077
|
-
let { value: n } =
|
|
7073
|
+
let { value: n } = Mf({
|
|
7078
7074
|
value: c,
|
|
7079
7075
|
toUnit: ie,
|
|
7080
7076
|
unitkey: l,
|
|
@@ -7083,7 +7079,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7083
7079
|
});
|
|
7084
7080
|
e = n, t = ie;
|
|
7085
7081
|
} else if (Ar(se.value, se.unit) !== c) {
|
|
7086
|
-
let { value: n } =
|
|
7082
|
+
let { value: n } = Mf({
|
|
7087
7083
|
value: c,
|
|
7088
7084
|
toUnit: se.unit,
|
|
7089
7085
|
unitkey: l,
|
|
@@ -7095,7 +7091,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7095
7091
|
e !== void 0 && ce({
|
|
7096
7092
|
value: e,
|
|
7097
7093
|
unit: t
|
|
7098
|
-
}), de(E && pe && O ?
|
|
7094
|
+
}), de(E && pe && O ? Df.PREDEFINED : Df.CUSTOM);
|
|
7099
7095
|
}
|
|
7100
7096
|
}, [
|
|
7101
7097
|
ie,
|
|
@@ -7103,14 +7099,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7103
7099
|
i,
|
|
7104
7100
|
O
|
|
7105
7101
|
]);
|
|
7106
|
-
let _e = me(), ve = vr(se.unit) || se.unit || "", ye = f || !_e || _e && _e.length === 1, be =
|
|
7102
|
+
let _e = me(), ve = vr(se.unit) || se.unit || "", ye = f || !_e || _e && _e.length === 1, be = Nf(e), xe, Se = (t) => {
|
|
7107
7103
|
let r = t != null && t.value ? t.value : "", [i = "", a = ""] = _r(r) ? Cr(r) : [r], o = kr(r);
|
|
7108
|
-
if (
|
|
7104
|
+
if (Af({
|
|
7109
7105
|
value: r,
|
|
7110
7106
|
unitkey: l,
|
|
7111
7107
|
toUnit: a
|
|
7112
7108
|
})) {
|
|
7113
|
-
let { value: e = "" } =
|
|
7109
|
+
let { value: e = "" } = Mf({
|
|
7114
7110
|
value: r,
|
|
7115
7111
|
toUnit: V,
|
|
7116
7112
|
unitkey: l,
|
|
@@ -7123,7 +7119,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7123
7119
|
type: Ga.OPTION,
|
|
7124
7120
|
inline: !0,
|
|
7125
7121
|
onClick: () => {
|
|
7126
|
-
Or(i).valid && !n && (de(
|
|
7122
|
+
Or(i).valid && !n && (de(Df.PREDEFINED), p({ target: {
|
|
7127
7123
|
value: r,
|
|
7128
7124
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || "",
|
|
7129
7125
|
predefinedSelected: !0,
|
|
@@ -7135,27 +7131,27 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7135
7131
|
height: "0"
|
|
7136
7132
|
})] }),
|
|
7137
7133
|
description: o,
|
|
7138
|
-
selected: pe === t && ue ===
|
|
7134
|
+
selected: pe === t && ue === Df.PREDEFINED
|
|
7139
7135
|
};
|
|
7140
7136
|
};
|
|
7141
7137
|
if (xe = [{
|
|
7142
7138
|
type: Ga.OPTION,
|
|
7143
7139
|
inline: !0,
|
|
7144
7140
|
onClick: () => {
|
|
7145
|
-
ue !==
|
|
7141
|
+
ue !== Df.CUSTOM && !n && p({ target: {
|
|
7146
7142
|
value: Ar(se.value, se.unit),
|
|
7147
7143
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || ""
|
|
7148
7144
|
} });
|
|
7149
7145
|
},
|
|
7150
7146
|
label: "Custom",
|
|
7151
|
-
selected: ue ===
|
|
7147
|
+
selected: ue === Df.CUSTOM
|
|
7152
7148
|
}], E != null && E.length) {
|
|
7153
7149
|
let e = E.map(Se);
|
|
7154
7150
|
xe = [...xe, ...e];
|
|
7155
7151
|
}
|
|
7156
7152
|
let Ce = (e) => {
|
|
7157
7153
|
if (_r(e)) {
|
|
7158
|
-
let t = dr(e), { value: n } =
|
|
7154
|
+
let t = dr(e), { value: n } = Mf({
|
|
7159
7155
|
value: e,
|
|
7160
7156
|
toUnit: se.unit,
|
|
7161
7157
|
unitkey: l,
|
|
@@ -7167,7 +7163,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7167
7163
|
return e;
|
|
7168
7164
|
}, we = !E && (!R || R === H.FIRST) ? H.FIRST : H.MIDDLE, Te = !R || R === H.LAST ? H.LAST : H.MIDDLE;
|
|
7169
7165
|
return /* @__PURE__ */ S("div", {
|
|
7170
|
-
className: ue ===
|
|
7166
|
+
className: ue === Df.PREDEFINED ? b(Vf.predefinedMenuActive) : "",
|
|
7171
7167
|
children: /* @__PURE__ */ C(ps, {
|
|
7172
7168
|
small: o,
|
|
7173
7169
|
width: s,
|
|
@@ -7182,17 +7178,17 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7182
7178
|
trigger: "Component",
|
|
7183
7179
|
component: /* @__PURE__ */ S(q, {
|
|
7184
7180
|
groupOrder: "first",
|
|
7185
|
-
active: ue ===
|
|
7186
|
-
icon: ue ===
|
|
7181
|
+
active: ue === Df.PREDEFINED,
|
|
7182
|
+
icon: ue === Df.PREDEFINED ? "link" : "unlink",
|
|
7187
7183
|
small: o
|
|
7188
7184
|
}),
|
|
7189
7185
|
small: o,
|
|
7190
7186
|
sections: xe
|
|
7191
7187
|
},
|
|
7192
|
-
tooltip: ue ===
|
|
7188
|
+
tooltip: ue === Df.PREDEFINED ? pe == null ? void 0 : pe.label : ""
|
|
7193
7189
|
}),
|
|
7194
7190
|
/* @__PURE__ */ S("div", {
|
|
7195
|
-
className:
|
|
7191
|
+
className: Vf.inputWrapper,
|
|
7196
7192
|
children: /* @__PURE__ */ S(bl, {
|
|
7197
7193
|
name: be,
|
|
7198
7194
|
testId: w,
|
|
@@ -7234,7 +7230,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7234
7230
|
let r = n || t || "", i = gr(e) ? e : "";
|
|
7235
7231
|
return {
|
|
7236
7232
|
type: "Option",
|
|
7237
|
-
label: P ?
|
|
7233
|
+
label: P ? Bf(i) : i,
|
|
7238
7234
|
inline: !0,
|
|
7239
7235
|
onClick: (n) => {
|
|
7240
7236
|
n.stopPropagation(), ge(e, t);
|
|
@@ -7249,10 +7245,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7249
7245
|
]
|
|
7250
7246
|
})
|
|
7251
7247
|
});
|
|
7252
|
-
},
|
|
7248
|
+
}, Uf = (e, t) => ({ target: {
|
|
7253
7249
|
name: e,
|
|
7254
7250
|
value: t
|
|
7255
|
-
} }),
|
|
7251
|
+
} }), Wf = (e) => `Value cannot be less than ${e}`, Gf = (e) => `Value cannot be greater than ${e}`, Kf = ({ name: e = "", value: t, min: n, max: r, label: i, step: a = .01, onChange: o, onChangeComplete: s, preferredUnit: c = "m", onSwitchUnit: l, enableEditUnitInput: u = !1, disabled: f = !1, showUnitInput: p = !0, showArrows: m = !0, unitkey: h = "length", testId: g, noConversion: _ = !1, small: y = !1, marks: x, minErrorMessage: w = Wf, maxErrorMessage: T = Gf }) => {
|
|
7256
7252
|
let E = Ar(t, c), [D, O] = v(E), [k, A] = v(!1), [j, M] = v(c);
|
|
7257
7253
|
d(() => {
|
|
7258
7254
|
k || O(E);
|
|
@@ -7270,7 +7266,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7270
7266
|
}, z = () => {
|
|
7271
7267
|
O(E), A(!1);
|
|
7272
7268
|
}, B = () => {
|
|
7273
|
-
L || I === null || (o(
|
|
7269
|
+
L || I === null || (o(Uf(e, I)), s == null || s(Uf(e, I)), A(!1));
|
|
7274
7270
|
}, ee = (e) => {
|
|
7275
7271
|
M(e), l == null || l(e);
|
|
7276
7272
|
}, te = (e) => {
|
|
@@ -7285,7 +7281,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7285
7281
|
}, ne = (e) => {
|
|
7286
7282
|
e.key === "Enter" && B(), e.key === "Escape" && z();
|
|
7287
7283
|
}, V = f || k, re = /* @__PURE__ */ C("div", {
|
|
7288
|
-
className:
|
|
7284
|
+
className: Cf.actions,
|
|
7289
7285
|
children: [/* @__PURE__ */ S(q, {
|
|
7290
7286
|
icon: "close",
|
|
7291
7287
|
small: !0,
|
|
@@ -7300,18 +7296,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7300
7296
|
})]
|
|
7301
7297
|
});
|
|
7302
7298
|
return /* @__PURE__ */ C("div", {
|
|
7303
|
-
className:
|
|
7299
|
+
className: Cf.wrapper,
|
|
7304
7300
|
"data-testid": g && `${g}-wrapper`,
|
|
7305
7301
|
children: [
|
|
7306
7302
|
i && /* @__PURE__ */ S("span", {
|
|
7307
|
-
className:
|
|
7303
|
+
className: Cf.label,
|
|
7308
7304
|
children: /* @__PURE__ */ S(Yo, {
|
|
7309
7305
|
small: y,
|
|
7310
7306
|
children: i
|
|
7311
7307
|
})
|
|
7312
7308
|
}),
|
|
7313
7309
|
p && /* @__PURE__ */ S("div", {
|
|
7314
|
-
className: b(
|
|
7310
|
+
className: b(Cf.input, y && Cf.inputSmall, u && !f && Cf.editable),
|
|
7315
7311
|
children: /* @__PURE__ */ S(So, {
|
|
7316
7312
|
content: re,
|
|
7317
7313
|
isOpen: k,
|
|
@@ -7325,11 +7321,11 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7325
7321
|
testId: g && `${g}-edit-popover`,
|
|
7326
7322
|
toggleOnTriggerClick: !1,
|
|
7327
7323
|
children: /* @__PURE__ */ S("div", {
|
|
7328
|
-
className:
|
|
7324
|
+
className: Cf.inputControl,
|
|
7329
7325
|
"data-testid": g && `${g}-edit-trigger`,
|
|
7330
7326
|
onClick: R,
|
|
7331
7327
|
onKeyDown: ne,
|
|
7332
|
-
children: /* @__PURE__ */ S(
|
|
7328
|
+
children: /* @__PURE__ */ S(Hf, {
|
|
7333
7329
|
name: e,
|
|
7334
7330
|
value: k ? D : E,
|
|
7335
7331
|
unitkey: h,
|
|
@@ -7364,7 +7360,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7364
7360
|
})
|
|
7365
7361
|
]
|
|
7366
7362
|
});
|
|
7367
|
-
},
|
|
7363
|
+
}, qf = ({ label: e, invalid: t, badge: n }) => t ? /* @__PURE__ */ S(no, {
|
|
7368
7364
|
small: !0,
|
|
7369
7365
|
margin: "-4px",
|
|
7370
7366
|
color: "var(--color-text-error)",
|
|
@@ -7375,7 +7371,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7375
7371
|
margin: "-4px",
|
|
7376
7372
|
title: n == null ? void 0 : n.toString(),
|
|
7377
7373
|
children: e
|
|
7378
|
-
}) : /* @__PURE__ */ S(x, { children: e }),
|
|
7374
|
+
}) : /* @__PURE__ */ S(x, { children: e }), Jf = {
|
|
7379
7375
|
tabs: "_tabs_1rtn8_1",
|
|
7380
7376
|
padding: "_padding_1rtn8_7",
|
|
7381
7377
|
margin: "_margin_1rtn8_11",
|
|
@@ -7384,7 +7380,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7384
7380
|
left: "_left_1rtn8_64",
|
|
7385
7381
|
right: "_right_1rtn8_64",
|
|
7386
7382
|
selectionIndicator: "_selectionIndicator_1rtn8_67"
|
|
7387
|
-
},
|
|
7383
|
+
}, Yf = ({ name: e = void 0, options: t = null, value: n = void 0, onChange: r = bn, padding: i = !1, margin: a = !0, testId: o, linkComponent: s }) => {
|
|
7388
7384
|
let c = u(W), { simpleInputs: l, options: d, selectedOptions: f } = el(t, n), p = mn(f) ? void 0 : l ? f : f.value, m = (e) => {
|
|
7389
7385
|
var t;
|
|
7390
7386
|
return (t = e.component) == null ? s : t;
|
|
@@ -7405,7 +7401,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7405
7401
|
"data-testid": o,
|
|
7406
7402
|
children: /* @__PURE__ */ S(hi, {
|
|
7407
7403
|
"aria-label": e == null ? "Tabs" : e,
|
|
7408
|
-
className: b(
|
|
7404
|
+
className: b(Jf.tabs, i ? Jf.padding : "", a ? Jf.margin : ""),
|
|
7409
7405
|
children: _.map((e) => {
|
|
7410
7406
|
let { label: t, url: n, to: r, disabled: i, value: a, right: o, invalid: s, badge: l, testId: u } = e, d = h(e), f = m(e);
|
|
7411
7407
|
return /* @__PURE__ */ C(mi, {
|
|
@@ -7413,23 +7409,23 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7413
7409
|
...!d && n ? { href: n } : {},
|
|
7414
7410
|
shouldSelectOnPressUp: !0,
|
|
7415
7411
|
isDisabled: i || c,
|
|
7416
|
-
className: b(
|
|
7412
|
+
className: b(Jf.item, o ? Jf.right : Jf.left),
|
|
7417
7413
|
"data-testid": u,
|
|
7418
7414
|
render: d && f ? (e) => /* @__PURE__ */ S(f, {
|
|
7419
7415
|
...e,
|
|
7420
7416
|
href: r,
|
|
7421
7417
|
to: r
|
|
7422
7418
|
}) : void 0,
|
|
7423
|
-
children: [/* @__PURE__ */ S(
|
|
7419
|
+
children: [/* @__PURE__ */ S(qf, {
|
|
7424
7420
|
label: t,
|
|
7425
7421
|
invalid: s,
|
|
7426
7422
|
badge: l
|
|
7427
|
-
}), /* @__PURE__ */ S(pi, { className:
|
|
7423
|
+
}), /* @__PURE__ */ S(pi, { className: Jf.selectionIndicator })]
|
|
7428
7424
|
}, a);
|
|
7429
7425
|
})
|
|
7430
7426
|
})
|
|
7431
7427
|
}) : null;
|
|
7432
|
-
},
|
|
7428
|
+
}, Xf = ({ children: e, href: t = void 0, target: n = void 0, testId: r, onClick: i, component: a = "a" }) => /* @__PURE__ */ S(a, {
|
|
7433
7429
|
href: t,
|
|
7434
7430
|
to: t,
|
|
7435
7431
|
target: n,
|
|
@@ -7439,7 +7435,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7439
7435
|
link: !0,
|
|
7440
7436
|
children: e
|
|
7441
7437
|
})
|
|
7442
|
-
}),
|
|
7438
|
+
}), Zf = {
|
|
7443
7439
|
inputInTable: "_inputInTable_qbe2o_1",
|
|
7444
7440
|
inputHover: "_inputHover_qbe2o_13",
|
|
7445
7441
|
inputFocus: "_inputFocus_qbe2o_18",
|
|
@@ -7451,9 +7447,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7451
7447
|
textarea: "_textarea_qbe2o_81",
|
|
7452
7448
|
small: "_small_qbe2o_120",
|
|
7453
7449
|
monospace: "_monospace_qbe2o_159"
|
|
7454
|
-
},
|
|
7450
|
+
}, Qf = ({ name: e, value: t = "", placeholder: n = "", cols: r, rows: i, disabled: a = !1, onChange: o = bn, onKeyPress: s = bn, onFocus: c = bn, onBlur: l = bn, tabIndex: d = 0, error: f = null, warning: p = null, tooltip: m = null, maxTooltipWidth: h, resize: g, monospace: _ = !1, small: v = !1, testId: y }) => {
|
|
7455
7451
|
let x = u(W), C = /* @__PURE__ */ S("textarea", {
|
|
7456
|
-
className: b(
|
|
7452
|
+
className: b(Zf.textarea, f ? Zf.error : "", p ? Zf.warning : "", _ ? Zf.monospace : "", v ? Zf.small : ""),
|
|
7457
7453
|
name: e,
|
|
7458
7454
|
value: t,
|
|
7459
7455
|
placeholder: n,
|
|
@@ -7495,10 +7491,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7495
7491
|
menu: "_menu_oyr59_139",
|
|
7496
7492
|
active: "_active_oyr59_168",
|
|
7497
7493
|
alert: "_alert_oyr59_193"
|
|
7498
|
-
},
|
|
7494
|
+
}, $f = ({ warning: e }) => /* @__PURE__ */ S("div", {
|
|
7499
7495
|
className: Q.alert,
|
|
7500
7496
|
children: e
|
|
7501
|
-
}),
|
|
7497
|
+
}), ep = ({ icon: e, url: t, onClick: n }) => {
|
|
7502
7498
|
let r = /* @__PURE__ */ S(G, { icon: e });
|
|
7503
7499
|
return t ? /* @__PURE__ */ S("a", {
|
|
7504
7500
|
href: t,
|
|
@@ -7510,7 +7506,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7510
7506
|
className: Q.appSwitcher,
|
|
7511
7507
|
children: r
|
|
7512
7508
|
});
|
|
7513
|
-
},
|
|
7509
|
+
}, tp = ({ label: e, logo: t, url: n, version: r, onClick: i }) => {
|
|
7514
7510
|
let a = /* @__PURE__ */ C("div", {
|
|
7515
7511
|
className: Q.title,
|
|
7516
7512
|
children: [
|
|
@@ -7539,9 +7535,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7539
7535
|
children: a
|
|
7540
7536
|
})
|
|
7541
7537
|
});
|
|
7542
|
-
},
|
|
7538
|
+
}, np = /* @__PURE__ */ function(e) {
|
|
7543
7539
|
return e.LINK = "Link", e.BUTTON = "Button", e.MENU = "Menu", e.COMPONENT = "Component", e;
|
|
7544
|
-
}({}),
|
|
7540
|
+
}({}), rp = ({ label: e, url: t, icon: n, onClick: r, active: i, disabled: a, testId: o, component: s = "a" }) => {
|
|
7545
7541
|
let c = u(W);
|
|
7546
7542
|
return /* @__PURE__ */ C(s, {
|
|
7547
7543
|
className: b(Q.link, i ? Q.active : ""),
|
|
@@ -7558,11 +7554,11 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7558
7554
|
children: e
|
|
7559
7555
|
})]
|
|
7560
7556
|
});
|
|
7561
|
-
},
|
|
7557
|
+
}, ip = ({ element: e }) => {
|
|
7562
7558
|
switch (e.type) {
|
|
7563
|
-
case
|
|
7559
|
+
case np.LINK: return /* @__PURE__ */ S("div", {
|
|
7564
7560
|
className: Q.item,
|
|
7565
|
-
children: /* @__PURE__ */ S(
|
|
7561
|
+
children: /* @__PURE__ */ S(rp, {
|
|
7566
7562
|
label: e.label,
|
|
7567
7563
|
url: e.url,
|
|
7568
7564
|
icon: e.icon,
|
|
@@ -7573,7 +7569,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7573
7569
|
component: e.component
|
|
7574
7570
|
})
|
|
7575
7571
|
});
|
|
7576
|
-
case
|
|
7572
|
+
case np.BUTTON: return /* @__PURE__ */ S("div", {
|
|
7577
7573
|
className: b(Q.item, Q.button),
|
|
7578
7574
|
children: /* @__PURE__ */ S(q, {
|
|
7579
7575
|
label: e.label,
|
|
@@ -7585,14 +7581,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7585
7581
|
testId: e.testId
|
|
7586
7582
|
})
|
|
7587
7583
|
});
|
|
7588
|
-
case
|
|
7584
|
+
case np.MENU: return /* @__PURE__ */ S("div", {
|
|
7589
7585
|
className: b(Q.item, Q.menu),
|
|
7590
7586
|
children: /* @__PURE__ */ S(lo, {
|
|
7591
7587
|
maxHeight: "100%",
|
|
7592
7588
|
menu: {
|
|
7593
7589
|
trigger: wi.COMPONENT,
|
|
7594
7590
|
placement: "bottom-start",
|
|
7595
|
-
component: /* @__PURE__ */ S(
|
|
7591
|
+
component: /* @__PURE__ */ S(rp, {
|
|
7596
7592
|
label: e.label,
|
|
7597
7593
|
icon: e.icon,
|
|
7598
7594
|
onClick: e.onClick
|
|
@@ -7601,50 +7597,50 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7601
7597
|
}
|
|
7602
7598
|
})
|
|
7603
7599
|
});
|
|
7604
|
-
case
|
|
7600
|
+
case np.COMPONENT: return /* @__PURE__ */ S("div", {
|
|
7605
7601
|
className: Q.item,
|
|
7606
7602
|
children: e.component
|
|
7607
7603
|
});
|
|
7608
7604
|
default: return null;
|
|
7609
7605
|
}
|
|
7610
|
-
},
|
|
7606
|
+
}, ap = ({ 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($f, { warning: i }), /* @__PURE__ */ C("div", {
|
|
7611
7607
|
className: b(Q.topbar, o ? Q.fixed : ""),
|
|
7612
7608
|
style: { height: a },
|
|
7613
7609
|
children: [
|
|
7614
|
-
!!t && /* @__PURE__ */ S(
|
|
7610
|
+
!!t && /* @__PURE__ */ S(ep, {
|
|
7615
7611
|
icon: t.icon,
|
|
7616
7612
|
url: t.url,
|
|
7617
7613
|
onClick: t.onClick
|
|
7618
7614
|
}),
|
|
7619
7615
|
/* @__PURE__ */ C("div", {
|
|
7620
7616
|
className: Q.left,
|
|
7621
|
-
children: [e && /* @__PURE__ */ S(
|
|
7617
|
+
children: [e && /* @__PURE__ */ S(tp, {
|
|
7622
7618
|
label: e.label,
|
|
7623
7619
|
logo: e.logo,
|
|
7624
7620
|
url: e.url,
|
|
7625
7621
|
version: e.version,
|
|
7626
7622
|
onClick: e.onClick
|
|
7627
|
-
}), n.map((e, t) => e ? /* @__PURE__ */ S(
|
|
7623
|
+
}), n.map((e, t) => e ? /* @__PURE__ */ S(ip, { element: e }, t) : null)]
|
|
7628
7624
|
}),
|
|
7629
7625
|
/* @__PURE__ */ S("div", {
|
|
7630
7626
|
className: Q.right,
|
|
7631
|
-
children: r.map((e, t) => e ? /* @__PURE__ */ S(
|
|
7627
|
+
children: r.map((e, t) => e ? /* @__PURE__ */ S(ip, { element: e }, t) : null)
|
|
7632
7628
|
})
|
|
7633
7629
|
]
|
|
7634
|
-
})] }),
|
|
7630
|
+
})] }), op = {
|
|
7635
7631
|
popConfirm: "_popConfirm_1x6ye_1",
|
|
7636
7632
|
content: "_content_1x6ye_7",
|
|
7637
7633
|
buttons: "_buttons_1x6ye_13"
|
|
7638
|
-
},
|
|
7639
|
-
className:
|
|
7634
|
+
}, sp = ({ title: e, okText: t, onClickOk: n, disableConfirmButton: r, cancelText: i, onClickCancel: a, close: o, testId: s }) => /* @__PURE__ */ C("div", {
|
|
7635
|
+
className: op.popConfirm,
|
|
7640
7636
|
children: [e && /* @__PURE__ */ S("div", {
|
|
7641
|
-
className:
|
|
7637
|
+
className: op.content,
|
|
7642
7638
|
children: /* @__PURE__ */ S(Yo, {
|
|
7643
7639
|
small: !0,
|
|
7644
7640
|
children: e
|
|
7645
7641
|
})
|
|
7646
7642
|
}), /* @__PURE__ */ C("div", {
|
|
7647
|
-
className:
|
|
7643
|
+
className: op.buttons,
|
|
7648
7644
|
children: [/* @__PURE__ */ S(q, {
|
|
7649
7645
|
small: !0,
|
|
7650
7646
|
colored: !0,
|
|
@@ -7659,8 +7655,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7659
7655
|
testId: `${s}-cancel-button`
|
|
7660
7656
|
})]
|
|
7661
7657
|
})]
|
|
7662
|
-
}),
|
|
7663
|
-
content: /* @__PURE__ */ S(
|
|
7658
|
+
}), cp = ({ children: e, placement: t = "top-center", closeOnOutsideClick: n = !0, fullWidth: r = !1, title: i = "", cancelText: a = "Cancel", onClickCancel: o = (e) => e && e(), okText: s = "Ok", onClickOk: c = () => {}, disableConfirmButton: l = !1, testId: u = void 0 }) => /* @__PURE__ */ S(So, {
|
|
7659
|
+
content: /* @__PURE__ */ S(sp, {
|
|
7664
7660
|
title: i,
|
|
7665
7661
|
okText: s,
|
|
7666
7662
|
onClickOk: c,
|
|
@@ -7674,14 +7670,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7674
7670
|
fullWidth: r,
|
|
7675
7671
|
testId: u,
|
|
7676
7672
|
children: e
|
|
7677
|
-
}),
|
|
7673
|
+
}), lp = {
|
|
7678
7674
|
tree: "_tree_coxxe_1",
|
|
7679
7675
|
toggle: "_toggle_coxxe_8",
|
|
7680
7676
|
dropTarget: "_dropTarget_coxxe_15",
|
|
7681
7677
|
placeholder: "_placeholder_coxxe_30",
|
|
7682
7678
|
draggingSource: "_draggingSource_coxxe_36",
|
|
7683
7679
|
placeholderContainer: "_placeholderContainer_coxxe_39"
|
|
7684
|
-
},
|
|
7680
|
+
}, up = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
|
|
7685
7681
|
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) => {
|
|
7686
7682
|
e.stopPropagation(), i(l);
|
|
7687
7683
|
}, w = (e) => {
|
|
@@ -7708,7 +7704,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7708
7704
|
className: b(Z.itemHeader, g ? Z.noPointerEvents : ""),
|
|
7709
7705
|
children: [
|
|
7710
7706
|
a && /* @__PURE__ */ S("div", {
|
|
7711
|
-
className:
|
|
7707
|
+
className: lp.toggle,
|
|
7712
7708
|
children: /* @__PURE__ */ S(q, {
|
|
7713
7709
|
basic: !0,
|
|
7714
7710
|
colored: r ? !0 : Ti.MUTED,
|
|
@@ -7722,10 +7718,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7722
7718
|
className: Z.drag,
|
|
7723
7719
|
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
7724
7720
|
}),
|
|
7725
|
-
/* @__PURE__ */ S(
|
|
7721
|
+
/* @__PURE__ */ S(Ed, { item: u }),
|
|
7726
7722
|
/* @__PURE__ */ C("div", {
|
|
7727
7723
|
className: Z.right,
|
|
7728
|
-
children: [/* @__PURE__ */ S(
|
|
7724
|
+
children: [/* @__PURE__ */ S(Dd, { item: u }), !f && h.length > 0 && /* @__PURE__ */ S("div", {
|
|
7729
7725
|
className: Z.actions,
|
|
7730
7726
|
children: /* @__PURE__ */ S(fo, { actions: h })
|
|
7731
7727
|
})]
|
|
@@ -7733,10 +7729,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7733
7729
|
]
|
|
7734
7730
|
})
|
|
7735
7731
|
});
|
|
7736
|
-
},
|
|
7737
|
-
className:
|
|
7732
|
+
}, dp = ({ depth: e, indent: t = "var(--size-sm)" }) => /* @__PURE__ */ S("div", {
|
|
7733
|
+
className: lp.placeholder,
|
|
7738
7734
|
style: { left: `calc(${t} * ${e})` }
|
|
7739
|
-
}),
|
|
7735
|
+
}), fp = ({ list: e, canDrop: t, draggable: n = !1, onListReorder: r, onChangeOpen: i, testId: a, isInitialOpen: o = !1, autoOpenActiveItems: s = !1, treeRef: c, itemHasChild: l, onItemToggle: u, icons: f, allowParentReassignment: p, stickyHeader: m, height: h, render: g, placeholderIndent: v }) => {
|
|
7740
7736
|
var y;
|
|
7741
7737
|
let b = c == null ? _(null) : c, x = (e) => {
|
|
7742
7738
|
i && i(e);
|
|
@@ -7794,7 +7790,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7794
7790
|
"data-testid": a,
|
|
7795
7791
|
className: Z.list,
|
|
7796
7792
|
style: { height: h },
|
|
7797
|
-
children: [e.name && !e.noHeader && /* @__PURE__ */ S(
|
|
7793
|
+
children: [e.name && !e.noHeader && /* @__PURE__ */ S(Cd, {
|
|
7798
7794
|
name: e.name,
|
|
7799
7795
|
actions: e.actions,
|
|
7800
7796
|
stickyHeader: m
|
|
@@ -7821,7 +7817,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7821
7817
|
hasChild: r,
|
|
7822
7818
|
isOpen: a,
|
|
7823
7819
|
onToggle: o
|
|
7824
|
-
}) : /* @__PURE__ */ S(
|
|
7820
|
+
}) : /* @__PURE__ */ S(up, {
|
|
7825
7821
|
hasChild: l ? l(e) : r,
|
|
7826
7822
|
node: e,
|
|
7827
7823
|
depth: t,
|
|
@@ -7837,7 +7833,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7837
7833
|
onDrop: A,
|
|
7838
7834
|
onChangeOpen: x,
|
|
7839
7835
|
dropTargetOffset: 10,
|
|
7840
|
-
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ S(
|
|
7836
|
+
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ S(dp, {
|
|
7841
7837
|
depth: t,
|
|
7842
7838
|
indent: v
|
|
7843
7839
|
}),
|
|
@@ -7845,17 +7841,17 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7845
7841
|
listComponent: "div",
|
|
7846
7842
|
listItemComponent: "div",
|
|
7847
7843
|
classes: {
|
|
7848
|
-
root:
|
|
7849
|
-
draggingSource:
|
|
7850
|
-
dropTarget:
|
|
7851
|
-
placeholder:
|
|
7844
|
+
root: lp.tree,
|
|
7845
|
+
draggingSource: lp.draggingSource,
|
|
7846
|
+
dropTarget: lp.dropTarget,
|
|
7847
|
+
placeholder: lp.placeholderContainer
|
|
7852
7848
|
},
|
|
7853
7849
|
initialOpen: o,
|
|
7854
7850
|
enableAnimateExpand: !0
|
|
7855
7851
|
})
|
|
7856
7852
|
})]
|
|
7857
7853
|
});
|
|
7858
|
-
},
|
|
7854
|
+
}, pp = {
|
|
7859
7855
|
treeTable: "_treeTable_1ywvy_1",
|
|
7860
7856
|
treeTableHeader: "_treeTableHeader_1ywvy_22",
|
|
7861
7857
|
folderCell: "_folderCell_1ywvy_30",
|
|
@@ -7863,48 +7859,48 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7863
7859
|
drag: "_drag_1ywvy_31",
|
|
7864
7860
|
folder: "_folder_1ywvy_30",
|
|
7865
7861
|
active: "_active_1ywvy_61"
|
|
7866
|
-
},
|
|
7862
|
+
}, mp = (e, t) => e.filter((e) => e.parent === t).flatMap((t) => [t.id, ...mp(e, t.id)]), hp = (e, t) => {
|
|
7867
7863
|
let n = new Set(t);
|
|
7868
7864
|
return e.filter((e) => !n.has(e.id)).map((e) => e.id);
|
|
7869
|
-
},
|
|
7865
|
+
}, gp = (e, t, n) => e.filter((e) => n.has(e) || !t.has(e)), _p = (e, t, n, r = []) => {
|
|
7870
7866
|
let i = new Set(n), a = new Set(r), o = e.filter((e) => e.parent === t && !a.has(e.id));
|
|
7871
7867
|
if (o.length === 0) return {
|
|
7872
7868
|
checked: i.has(t),
|
|
7873
7869
|
indeterminate: !1
|
|
7874
7870
|
};
|
|
7875
|
-
let s = o.map((t) =>
|
|
7871
|
+
let s = o.map((t) => _p(e, t.id, n, r)), c = s.filter((e) => e.checked).length, l = s.filter((e) => e.indeterminate).length, u = c === o.length;
|
|
7876
7872
|
return {
|
|
7877
7873
|
checked: u,
|
|
7878
7874
|
indeterminate: c + l > 0 && !u
|
|
7879
7875
|
};
|
|
7880
|
-
},
|
|
7881
|
-
let r =
|
|
7876
|
+
}, vp = (e, t, n = []) => {
|
|
7877
|
+
let r = hp(e, n), i = new Set(t), a = r.filter((e) => i.has(e)).length;
|
|
7882
7878
|
return {
|
|
7883
7879
|
checked: r.length > 0 && a === r.length,
|
|
7884
7880
|
indeterminate: a > 0 && a < r.length
|
|
7885
7881
|
};
|
|
7886
|
-
},
|
|
7882
|
+
}, yp = i(null), bp = () => u(yp), xp = ({ children: e, rowCheckboxes: t, rows: n }) => {
|
|
7887
7883
|
let r = t !== void 0, { checkedIds: i = [], disabledIds: a = [], getTooltip: o, onChange: s } = t == null ? {} : t, c = h(() => new Set(a), [a]), u = h(() => {
|
|
7888
7884
|
if (!r) return null;
|
|
7889
7885
|
let e = /* @__PURE__ */ new Map();
|
|
7890
|
-
for (let t of n) e.set(t.id,
|
|
7886
|
+
for (let t of n) e.set(t.id, _p(n, t.id, i, a));
|
|
7891
7887
|
return e;
|
|
7892
7888
|
}, [
|
|
7893
7889
|
i,
|
|
7894
7890
|
a,
|
|
7895
7891
|
r,
|
|
7896
7892
|
n
|
|
7897
|
-
]), d = h(() => r ?
|
|
7893
|
+
]), d = h(() => r ? vp(n, i, a) : void 0, [
|
|
7898
7894
|
i,
|
|
7899
7895
|
a,
|
|
7900
7896
|
r,
|
|
7901
7897
|
n
|
|
7902
7898
|
]), 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) => {
|
|
7903
7899
|
if (!r || c.has(e)) return;
|
|
7904
|
-
let t =
|
|
7900
|
+
let t = mp(n, e), o = [e, ...t.filter((e) => !c.has(e))], l = [e, ...t], { checked: u } = _p(n, e, i, a);
|
|
7905
7901
|
if (u) {
|
|
7906
7902
|
let e = new Set(l);
|
|
7907
|
-
s == null || s(
|
|
7903
|
+
s == null || s(gp(i, e, c));
|
|
7908
7904
|
} else s == null || s([.../* @__PURE__ */ new Set([...i, ...o])]);
|
|
7909
7905
|
}, [
|
|
7910
7906
|
i,
|
|
@@ -7915,7 +7911,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7915
7911
|
n
|
|
7916
7912
|
]), _ = l(() => {
|
|
7917
7913
|
if (!r) return;
|
|
7918
|
-
let e =
|
|
7914
|
+
let e = hp(n, a), { checked: t } = vp(n, i, a);
|
|
7919
7915
|
t ? s == null || s(i.filter((e) => c.has(e))) : s == null || s([.../* @__PURE__ */ new Set([...i, ...e])]);
|
|
7920
7916
|
}, [
|
|
7921
7917
|
i,
|
|
@@ -7941,12 +7937,12 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7941
7937
|
_,
|
|
7942
7938
|
g
|
|
7943
7939
|
]);
|
|
7944
|
-
return /* @__PURE__ */ S(
|
|
7940
|
+
return /* @__PURE__ */ S(yp.Provider, {
|
|
7945
7941
|
value: v,
|
|
7946
7942
|
children: e
|
|
7947
7943
|
});
|
|
7948
|
-
},
|
|
7949
|
-
let h =
|
|
7944
|
+
}, Sp = ({ columnAlignment: e, columnWidths: t, depth: n, draggable: r, handleRef: i, hasChild: a, hasRowActions: o, icons: s, isOpen: c, node: l, onDragEnter: u, onDragOver: d, onDragLeave: f, onDrop: p, onToggle: m }) => {
|
|
7945
|
+
let h = bp(), g = h != null && h.enabled ? h.getRowCheckState(l.id) : void 0, _ = g == null ? void 0 : g.checked, v = g == null ? void 0 : g.indeterminate, y = h == null ? void 0 : h.isRowCheckDisabled(l.id), x = h == null ? void 0 : h.enabled, { data: w, droppable: T } = l, { id: E, cells: D, testId: O, actions: k = [], active: A, onRowClick: j } = w, M = T || a, N = (e) => {
|
|
7950
7946
|
let r = t ? t[e] : void 0;
|
|
7951
7947
|
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${M ? n + 1 : n})`})` : r;
|
|
7952
7948
|
};
|
|
@@ -7959,7 +7955,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7959
7955
|
onDragLeave: f,
|
|
7960
7956
|
children: /* @__PURE__ */ S("tbody", { children: /* @__PURE__ */ C("tr", {
|
|
7961
7957
|
onClick: j,
|
|
7962
|
-
className: b(
|
|
7958
|
+
className: b(pp.treeTableRow, A ? pp.active : void 0),
|
|
7963
7959
|
children: [
|
|
7964
7960
|
x && /* @__PURE__ */ S(Wl, {
|
|
7965
7961
|
isHeader: !1,
|
|
@@ -7973,19 +7969,19 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7973
7969
|
}
|
|
7974
7970
|
}),
|
|
7975
7971
|
r && /* @__PURE__ */ S("td", {
|
|
7976
|
-
className:
|
|
7972
|
+
className: pp.dragCell,
|
|
7977
7973
|
children: /* @__PURE__ */ S("div", {
|
|
7978
|
-
className:
|
|
7974
|
+
className: pp.drag,
|
|
7979
7975
|
onClick: (e) => e.stopPropagation(),
|
|
7980
7976
|
ref: i,
|
|
7981
7977
|
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
7982
7978
|
})
|
|
7983
7979
|
}),
|
|
7984
|
-
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ S("td", { className:
|
|
7980
|
+
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ S("td", { className: pp.folderCell }, t)),
|
|
7985
7981
|
M && /* @__PURE__ */ S("td", {
|
|
7986
|
-
className:
|
|
7982
|
+
className: pp.folderCell,
|
|
7987
7983
|
children: /* @__PURE__ */ S("div", {
|
|
7988
|
-
className:
|
|
7984
|
+
className: pp.folder,
|
|
7989
7985
|
onClick: () => m(E),
|
|
7990
7986
|
onMouseDown: (e) => e.stopPropagation(),
|
|
7991
7987
|
children: /* @__PURE__ */ S(q, {
|
|
@@ -8017,10 +8013,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8017
8013
|
]
|
|
8018
8014
|
}) })
|
|
8019
8015
|
});
|
|
8020
|
-
},
|
|
8021
|
-
let a =
|
|
8016
|
+
}, Cp = ({ columnAlignment: e, columnWidths: t, draggable: n, hasRowActions: r, headers: i }) => {
|
|
8017
|
+
let a = bp(), o = a == null ? void 0 : a.headerCheckState, s = (a == null ? void 0 : a.enabled) && o !== void 0;
|
|
8022
8018
|
return /* @__PURE__ */ S("table", {
|
|
8023
|
-
className: b(Ks.table,
|
|
8019
|
+
className: b(Ks.table, pp.treeTableHeader),
|
|
8024
8020
|
children: /* @__PURE__ */ S("thead", { children: i.map((i, c) => /* @__PURE__ */ C("tr", { children: [
|
|
8025
8021
|
s && c === 0 ? /* @__PURE__ */ S(Wl, {
|
|
8026
8022
|
isHeader: !0,
|
|
@@ -8031,7 +8027,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8031
8027
|
onChange: a.toggleHeaderCheck
|
|
8032
8028
|
}
|
|
8033
8029
|
}) : s ? /* @__PURE__ */ S("td", {}) : null,
|
|
8034
|
-
n && /* @__PURE__ */ S("th", { className:
|
|
8030
|
+
n && /* @__PURE__ */ S("th", { className: pp.dragCell }),
|
|
8035
8031
|
i.cells.map((n, r) => {
|
|
8036
8032
|
let i = t ? t[r] : void 0, a = e ? e[r] : void 0;
|
|
8037
8033
|
return /* @__PURE__ */ S(Wl, {
|
|
@@ -8051,22 +8047,22 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8051
8047
|
})
|
|
8052
8048
|
] }, c)) })
|
|
8053
8049
|
});
|
|
8054
|
-
},
|
|
8050
|
+
}, wp = ({ allowParentReassignment: e, autoOpenActiveItems: t = !1, canDrop: n, draggable: r = !1, icons: i, isInitialOpen: a = !1, itemHasChild: o, onItemToggle: s, onListReorder: c, onChangeOpen: l, rowCheckboxes: u, table: d, testId: f, treeRef: p }) => {
|
|
8055
8051
|
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: v = [] } = d, y = pl(v, _ == null ? [] : _);
|
|
8056
|
-
return /* @__PURE__ */ S(
|
|
8052
|
+
return /* @__PURE__ */ S(xp, {
|
|
8057
8053
|
rowCheckboxes: u,
|
|
8058
8054
|
rows: v,
|
|
8059
8055
|
children: /* @__PURE__ */ C("div", {
|
|
8060
|
-
className:
|
|
8056
|
+
className: pp.treeTable,
|
|
8061
8057
|
"data-testid": f,
|
|
8062
8058
|
style: { width: g },
|
|
8063
|
-
children: [!!_ && /* @__PURE__ */ S(
|
|
8059
|
+
children: [!!_ && /* @__PURE__ */ S(Cp, {
|
|
8064
8060
|
columnAlignment: m,
|
|
8065
8061
|
columnWidths: h,
|
|
8066
8062
|
draggable: r,
|
|
8067
8063
|
hasRowActions: y,
|
|
8068
8064
|
headers: _
|
|
8069
|
-
}), /* @__PURE__ */ S(
|
|
8065
|
+
}), /* @__PURE__ */ S(fp, {
|
|
8070
8066
|
allowParentReassignment: e,
|
|
8071
8067
|
autoOpenActiveItems: t,
|
|
8072
8068
|
canDrop: n,
|
|
@@ -8082,7 +8078,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8082
8078
|
onItemToggle: s,
|
|
8083
8079
|
onListReorder: c,
|
|
8084
8080
|
placeholderIndent: "var(--size)",
|
|
8085
|
-
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ S(
|
|
8081
|
+
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ S(Sp, {
|
|
8086
8082
|
node: e,
|
|
8087
8083
|
columnAlignment: m,
|
|
8088
8084
|
columnWidths: h,
|
|
@@ -8099,10 +8095,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8099
8095
|
})]
|
|
8100
8096
|
})
|
|
8101
8097
|
});
|
|
8102
|
-
},
|
|
8098
|
+
}, Tp = Object.freeze({
|
|
8103
8099
|
Translations: "translations",
|
|
8104
8100
|
LanguageKey: "languageKey"
|
|
8105
|
-
}),
|
|
8101
|
+
}), Ep = {
|
|
8106
8102
|
unified: "Unified",
|
|
8107
8103
|
split: "Split",
|
|
8108
8104
|
changesTooLarge: "Changes are too large to be shown",
|
|
@@ -8125,29 +8121,29 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8125
8121
|
showAll: "Show all",
|
|
8126
8122
|
unknown: "Unknown",
|
|
8127
8123
|
unexpectedError: "Unexpected error"
|
|
8128
|
-
},
|
|
8124
|
+
}, Dp = (e) => Object.keys(Ep).reduce((t, n) => ({
|
|
8129
8125
|
...t,
|
|
8130
|
-
[n]: (e == null ? void 0 : e[n]) || (
|
|
8131
|
-
}), {}),
|
|
8132
|
-
[
|
|
8133
|
-
[
|
|
8134
|
-
},
|
|
8135
|
-
|
|
8136
|
-
},
|
|
8126
|
+
[n]: (e == null ? void 0 : e[n]) || (Ep == null ? void 0 : Ep[n])
|
|
8127
|
+
}), {}), Op = {
|
|
8128
|
+
[Tp.Translations]: Dp(),
|
|
8129
|
+
[Tp.LanguageKey]: "en"
|
|
8130
|
+
}, kp = (e) => e ? Op[e] : Op, Ap = (e, t) => {
|
|
8131
|
+
Op[e] = t;
|
|
8132
|
+
}, jp = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
|
|
8137
8133
|
var a;
|
|
8138
|
-
let { unitTemplate: o = null } = (a =
|
|
8139
|
-
return e[n] = r == null ?
|
|
8134
|
+
let { unitTemplate: o = null } = (a = Lf()) == null ? {} : a;
|
|
8135
|
+
return e[n] = r == null ? Ef(n, o) : r, t[n] = i, {
|
|
8140
8136
|
preferredUnits: e,
|
|
8141
8137
|
storageUnits: t
|
|
8142
8138
|
};
|
|
8143
8139
|
}, {
|
|
8144
8140
|
preferredUnits: {},
|
|
8145
8141
|
storageUnits: {}
|
|
8146
|
-
}),
|
|
8142
|
+
}), Mp = ({ row: e, selectedUnits: t, storageUnits: n, convertBackToStorageUnit: r, enableCosmeticRounding: i, enableDisplayRounding: a }) => ({
|
|
8147
8143
|
...e,
|
|
8148
8144
|
cells: e.cells.map((e) => {
|
|
8149
8145
|
if ("autoUnit" in e && e.autoUnit && (typeof e.value == "string" || typeof e.value == "number")) {
|
|
8150
|
-
let { unitKey: o, value: s, formatDisplayValue: c } = e, l = a && "roundDisplayValue" in e ? e.roundDisplayValue : null, u = t[o], d = n[o], f = d && u !== d, { value: p = s } =
|
|
8146
|
+
let { unitKey: o, value: s, formatDisplayValue: c } = e, l = a && "roundDisplayValue" in e ? e.roundDisplayValue : null, u = t[o], d = n[o], f = d && u !== d, { value: p = s } = jf({
|
|
8151
8147
|
value: Er(s),
|
|
8152
8148
|
unitkey: o,
|
|
8153
8149
|
toUnit: u,
|
|
@@ -8161,7 +8157,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8161
8157
|
roundDisplayValue: l,
|
|
8162
8158
|
selectOnFocus: !0,
|
|
8163
8159
|
onChange: (t) => {
|
|
8164
|
-
let n = t, { value: i } = n.target, a = r ? d : u, { value: s = i } =
|
|
8160
|
+
let n = t, { value: i } = n.target, a = r ? d : u, { value: s = i } = jf({
|
|
8165
8161
|
value: String(i),
|
|
8166
8162
|
unitkey: o,
|
|
8167
8163
|
toUnit: a,
|
|
@@ -8180,8 +8176,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8180
8176
|
}
|
|
8181
8177
|
return e;
|
|
8182
8178
|
})
|
|
8183
|
-
}),
|
|
8184
|
-
let { translations: i } =
|
|
8179
|
+
}), Np = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
|
|
8180
|
+
let { translations: i } = kp();
|
|
8185
8181
|
return e ? e.map((e) => ({
|
|
8186
8182
|
...e,
|
|
8187
8183
|
cells: e.cells.map((e) => {
|
|
@@ -8210,8 +8206,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8210
8206
|
return e;
|
|
8211
8207
|
})
|
|
8212
8208
|
})) : [];
|
|
8213
|
-
},
|
|
8214
|
-
let { headers: c, ...u } = e, { storageUnits: f, preferredUnits: p } =
|
|
8209
|
+
}, Pp = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: o, beforeRenderRow: s }) => {
|
|
8210
|
+
let { headers: c, ...u } = e, { storageUnits: f, preferredUnits: p } = jp(t), m = Tf(p), [h, g] = v(p), _ = ({ unitKey: e, value: n }) => {
|
|
8215
8211
|
g((t) => ({
|
|
8216
8212
|
...t,
|
|
8217
8213
|
[e]: n
|
|
@@ -8222,7 +8218,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8222
8218
|
newUnit: n,
|
|
8223
8219
|
unitKey: e
|
|
8224
8220
|
});
|
|
8225
|
-
}, y = l(({ row: e, rowIndex: t }) =>
|
|
8221
|
+
}, y = l(({ row: e, rowIndex: t }) => Mp({
|
|
8226
8222
|
row: s ? s({
|
|
8227
8223
|
row: e,
|
|
8228
8224
|
rowIndex: t
|
|
@@ -8247,10 +8243,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8247
8243
|
value: n
|
|
8248
8244
|
});
|
|
8249
8245
|
});
|
|
8250
|
-
}, [t]), /* @__PURE__ */ S(
|
|
8246
|
+
}, [t]), /* @__PURE__ */ S(tu, {
|
|
8251
8247
|
table: {
|
|
8252
8248
|
...u,
|
|
8253
|
-
headers:
|
|
8249
|
+
headers: Np({
|
|
8254
8250
|
headers: e.headers,
|
|
8255
8251
|
selectedUnits: h,
|
|
8256
8252
|
storageUnits: f,
|
|
@@ -8261,8 +8257,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8261
8257
|
canListReorder: o,
|
|
8262
8258
|
beforeRenderRow: y
|
|
8263
8259
|
});
|
|
8264
|
-
},
|
|
8265
|
-
let { translations: d } =
|
|
8260
|
+
}, Fp = { settingField: "_settingField_1x02n_1" }, Ip = ({ helpText: t, disabled: n = !1, showCustom: r = !1, children: i, userValue: a = void 0, companyValue: o = void 0, noPermission: s = !1, selectedOption: c, handleSelectChange: l, testId: u }) => {
|
|
8261
|
+
let { translations: d } = kp(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ C(e.Fragment, { children: [t, /* @__PURE__ */ S("br", {})] }, n)), p = [
|
|
8266
8262
|
...r ? [] : [{
|
|
8267
8263
|
label: d == null ? void 0 : d.allUsers,
|
|
8268
8264
|
value: !1
|
|
@@ -8277,14 +8273,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8277
8273
|
}] : []
|
|
8278
8274
|
], m = a !== void 0 && o !== void 0 && !dn(a, o);
|
|
8279
8275
|
return /* @__PURE__ */ C("div", {
|
|
8280
|
-
className:
|
|
8276
|
+
className: Fp.settingField,
|
|
8281
8277
|
"data-testid": u,
|
|
8282
|
-
children: [/* @__PURE__ */ C(
|
|
8278
|
+
children: [/* @__PURE__ */ C(yd, {
|
|
8283
8279
|
justifyContent: "space-between",
|
|
8284
8280
|
wrap: !1,
|
|
8285
8281
|
children: [i, !s && /* @__PURE__ */ S("div", {
|
|
8286
8282
|
style: { flexShrink: 0 },
|
|
8287
|
-
children: /* @__PURE__ */ C(
|
|
8283
|
+
children: /* @__PURE__ */ C(yd, {
|
|
8288
8284
|
gap: "8px",
|
|
8289
8285
|
alignItems: "center",
|
|
8290
8286
|
children: [m && /* @__PURE__ */ S(da, {
|
|
@@ -8309,19 +8305,19 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8309
8305
|
children: f(t)
|
|
8310
8306
|
})]
|
|
8311
8307
|
});
|
|
8312
|
-
},
|
|
8308
|
+
}, Lp = (e, t) => {
|
|
8313
8309
|
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;
|
|
8314
8310
|
return {
|
|
8315
8311
|
added: Math.max(0, i),
|
|
8316
8312
|
removed: Math.max(0, a)
|
|
8317
8313
|
};
|
|
8318
|
-
},
|
|
8314
|
+
}, Rp = "split", zp = "unified", Bp = ({ oldJson: e, newJson: t, viewType: n = Rp }) => {
|
|
8319
8315
|
var r, i;
|
|
8320
|
-
let { translations: a } =
|
|
8321
|
-
value:
|
|
8316
|
+
let { translations: a } = kp(), [o, s] = v(n), c = [{
|
|
8317
|
+
value: Rp,
|
|
8322
8318
|
label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
|
|
8323
8319
|
}, {
|
|
8324
|
-
value:
|
|
8320
|
+
value: zp,
|
|
8325
8321
|
label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
|
|
8326
8322
|
}];
|
|
8327
8323
|
d(() => {
|
|
@@ -8329,10 +8325,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8329
8325
|
}, [n]);
|
|
8330
8326
|
let l = ({ target: { value: e } }) => {
|
|
8331
8327
|
s(e);
|
|
8332
|
-
}, { added: u, removed: f } =
|
|
8328
|
+
}, { added: u, removed: f } = Lp(e, t), p = u + f > 3500;
|
|
8333
8329
|
return /* @__PURE__ */ S(x, { children: /* @__PURE__ */ S(bo, {
|
|
8334
8330
|
bordered: !0,
|
|
8335
|
-
heading: /* @__PURE__ */ C(
|
|
8331
|
+
heading: /* @__PURE__ */ C(yd, {
|
|
8336
8332
|
gap: !0,
|
|
8337
8333
|
children: [/* @__PURE__ */ S(es, { children: /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C(Yo, {
|
|
8338
8334
|
success: !0,
|
|
@@ -8344,7 +8340,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8344
8340
|
}), /* @__PURE__ */ C(Yo, {
|
|
8345
8341
|
error: !0,
|
|
8346
8342
|
children: ["-", f]
|
|
8347
|
-
})] }) }), !p && /* @__PURE__ */ S(
|
|
8343
|
+
})] }) }), !p && /* @__PURE__ */ S(Yd, {
|
|
8348
8344
|
name: "viewType",
|
|
8349
8345
|
options: c,
|
|
8350
8346
|
value: o,
|
|
@@ -8362,14 +8358,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8362
8358
|
}) : /* @__PURE__ */ S(xi, {
|
|
8363
8359
|
oldValue: e,
|
|
8364
8360
|
newValue: t,
|
|
8365
|
-
splitView: o ===
|
|
8361
|
+
splitView: o === Rp,
|
|
8366
8362
|
compareMethod: Si.WORDS
|
|
8367
8363
|
})
|
|
8368
8364
|
}) });
|
|
8369
8365
|
};
|
|
8370
8366
|
//#endregion
|
|
8371
8367
|
//#region src/helpers/date.ts
|
|
8372
|
-
function
|
|
8368
|
+
function Vp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
8373
8369
|
return e ? new Date(e).toLocaleString(a, {
|
|
8374
8370
|
year: "numeric",
|
|
8375
8371
|
month: "short",
|
|
@@ -8383,28 +8379,28 @@ function Bp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
8383
8379
|
}
|
|
8384
8380
|
//#endregion
|
|
8385
8381
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
8386
|
-
function
|
|
8382
|
+
function Hp(e) {
|
|
8387
8383
|
var t;
|
|
8388
8384
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
8389
8385
|
if (!n) throw Error("Invalid RegExp");
|
|
8390
8386
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
8391
8387
|
}
|
|
8392
|
-
function
|
|
8388
|
+
function Up(e) {
|
|
8393
8389
|
if (typeof e != "object") return e;
|
|
8394
8390
|
if (e === null) return null;
|
|
8395
|
-
if (Array.isArray(e)) return e.map(
|
|
8391
|
+
if (Array.isArray(e)) return e.map(Up);
|
|
8396
8392
|
if (e instanceof Date) return new Date(e.getTime());
|
|
8397
|
-
if (e instanceof RegExp) return
|
|
8393
|
+
if (e instanceof RegExp) return Hp(e);
|
|
8398
8394
|
let t = {};
|
|
8399
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
8395
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = Up(e[n]));
|
|
8400
8396
|
return t;
|
|
8401
8397
|
}
|
|
8402
8398
|
//#endregion
|
|
8403
8399
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
8404
|
-
function
|
|
8400
|
+
function Wp(e, t) {
|
|
8405
8401
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
8406
8402
|
}
|
|
8407
|
-
var
|
|
8403
|
+
var Gp = (e) => e[e.length - 1], Kp = class {
|
|
8408
8404
|
setResult(e) {
|
|
8409
8405
|
return this.result = e, this.hasResult = !0, this;
|
|
8410
8406
|
}
|
|
@@ -8412,16 +8408,16 @@ var Wp = (e) => e[e.length - 1], Gp = class {
|
|
|
8412
8408
|
return this.exiting = !0, this;
|
|
8413
8409
|
}
|
|
8414
8410
|
push(e, t) {
|
|
8415
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
8411
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (Wp(this.children), Gp(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
8416
8412
|
}
|
|
8417
|
-
},
|
|
8413
|
+
}, qp = class extends Kp {
|
|
8418
8414
|
constructor(e, t) {
|
|
8419
8415
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
8420
8416
|
}
|
|
8421
8417
|
prepareDeltaResult(e) {
|
|
8422
8418
|
var t, n, r, i;
|
|
8423
8419
|
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)) {
|
|
8424
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
8420
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : Up;
|
|
8425
8421
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
8426
8422
|
}
|
|
8427
8423
|
return e;
|
|
@@ -8429,15 +8425,15 @@ var Wp = (e) => e[e.length - 1], Gp = class {
|
|
|
8429
8425
|
setResult(e) {
|
|
8430
8426
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
8431
8427
|
}
|
|
8432
|
-
},
|
|
8428
|
+
}, Jp = class extends Kp {
|
|
8433
8429
|
constructor(e, t) {
|
|
8434
8430
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
8435
8431
|
}
|
|
8436
|
-
},
|
|
8432
|
+
}, Yp = class extends Kp {
|
|
8437
8433
|
constructor(e) {
|
|
8438
8434
|
super(), this.delta = e, this.pipe = "reverse";
|
|
8439
8435
|
}
|
|
8440
|
-
},
|
|
8436
|
+
}, Xp = class {
|
|
8441
8437
|
constructor(e) {
|
|
8442
8438
|
this.name = e, this.filters = [];
|
|
8443
8439
|
}
|
|
@@ -8501,7 +8497,7 @@ var Wp = (e) => e[e.length - 1], Gp = class {
|
|
|
8501
8497
|
}
|
|
8502
8498
|
}), this);
|
|
8503
8499
|
}
|
|
8504
|
-
},
|
|
8500
|
+
}, Zp = class {
|
|
8505
8501
|
constructor(e) {
|
|
8506
8502
|
this.selfOptions = e || {}, this.pipes = {};
|
|
8507
8503
|
}
|
|
@@ -8528,7 +8524,7 @@ var Wp = (e) => e[e.length - 1], Gp = class {
|
|
|
8528
8524
|
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);
|
|
8529
8525
|
return n.hasResult ? n.result : void 0;
|
|
8530
8526
|
}
|
|
8531
|
-
},
|
|
8527
|
+
}, Qp = (e, t, n, r) => e[n] === t[r], $p = (e, t, n, r) => {
|
|
8532
8528
|
var i, a, o;
|
|
8533
8529
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
8534
8530
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -8544,7 +8540,7 @@ var Wp = (e) => e[e.length - 1], Gp = class {
|
|
|
8544
8540
|
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);
|
|
8545
8541
|
}
|
|
8546
8542
|
return d;
|
|
8547
|
-
},
|
|
8543
|
+
}, em = (e, t, n, r) => {
|
|
8548
8544
|
let i = t.length, a = n.length, o = {
|
|
8549
8545
|
sequence: [],
|
|
8550
8546
|
indices1: [],
|
|
@@ -8566,11 +8562,11 @@ var Wp = (e) => e[e.length - 1], Gp = class {
|
|
|
8566
8562
|
}
|
|
8567
8563
|
}
|
|
8568
8564
|
return o;
|
|
8569
|
-
},
|
|
8565
|
+
}, tm = { get: (e, t, n, r) => {
|
|
8570
8566
|
let i = r || {};
|
|
8571
|
-
return $p(
|
|
8572
|
-
} },
|
|
8573
|
-
function
|
|
8567
|
+
return em($p(e, t, n || Qp, i), e, t, i);
|
|
8568
|
+
} }, nm = 3;
|
|
8569
|
+
function rm(e, t, n, r) {
|
|
8574
8570
|
for (let i = 0; i < n; i++) {
|
|
8575
8571
|
let n = e[i];
|
|
8576
8572
|
for (let e = 0; e < r; e++) {
|
|
@@ -8580,7 +8576,7 @@ function nm(e, t, n, r) {
|
|
|
8580
8576
|
}
|
|
8581
8577
|
return !1;
|
|
8582
8578
|
}
|
|
8583
|
-
function
|
|
8579
|
+
function im(e, t, n, r, i) {
|
|
8584
8580
|
let a = e[n], o = t[r];
|
|
8585
8581
|
if (a === o) return !0;
|
|
8586
8582
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -8593,15 +8589,15 @@ function rm(e, t, n, r, i) {
|
|
|
8593
8589
|
let l = i.hashCache2[r];
|
|
8594
8590
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l !== void 0 && c === l;
|
|
8595
8591
|
}
|
|
8596
|
-
var
|
|
8592
|
+
var am = function(e) {
|
|
8597
8593
|
var t, n, r, i, a;
|
|
8598
8594
|
if (!e.leftIsArray) return;
|
|
8599
8595
|
let o = {
|
|
8600
8596
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
8601
8597
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
8602
8598
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
8603
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !
|
|
8604
|
-
for (; c + s < m && c + s < h &&
|
|
8599
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !rm(f, p, m, h)); s < m && s < h && im(f, p, s, s, o);) l = s, g = new qp(f[l], p[l]), e.push(g, l), s++;
|
|
8600
|
+
for (; c + s < m && c + s < h && im(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new qp(f[u], p[d]), e.push(g, d), c++;
|
|
8605
8601
|
let _;
|
|
8606
8602
|
if (s + c === m) {
|
|
8607
8603
|
if (m === h) {
|
|
@@ -8625,7 +8621,7 @@ var im = function(e) {
|
|
|
8625
8621
|
return;
|
|
8626
8622
|
}
|
|
8627
8623
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
8628
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
8624
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = tm.get(v, y, im, o), x = [];
|
|
8629
8625
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
8630
8626
|
let t = `_${l}`;
|
|
8631
8627
|
_[t] = [
|
|
@@ -8646,8 +8642,8 @@ var im = function(e) {
|
|
|
8646
8642
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
8647
8643
|
u = x[n];
|
|
8648
8644
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
8649
|
-
if (u !== void 0 && r &&
|
|
8650
|
-
r.splice(1, 2, l,
|
|
8645
|
+
if (u !== void 0 && r && im(v, y, u - s, l - s, o)) {
|
|
8646
|
+
r.splice(1, 2, l, nm), r.splice(1, 2, l, nm), C || (r[0] = ""), d = l, g = new qp(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
8651
8647
|
break;
|
|
8652
8648
|
}
|
|
8653
8649
|
}
|
|
@@ -8655,20 +8651,20 @@ var im = function(e) {
|
|
|
8655
8651
|
} else {
|
|
8656
8652
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
8657
8653
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
8658
|
-
d = b.indices2[t] + s, g = new
|
|
8654
|
+
d = b.indices2[t] + s, g = new qp(f[u], p[d]), e.push(g, d);
|
|
8659
8655
|
}
|
|
8660
8656
|
}
|
|
8661
8657
|
e.setResult(_).exit();
|
|
8662
8658
|
};
|
|
8663
|
-
|
|
8664
|
-
var
|
|
8659
|
+
am.filterName = "arrays";
|
|
8660
|
+
var om = {
|
|
8665
8661
|
numerically(e, t) {
|
|
8666
8662
|
return e - t;
|
|
8667
8663
|
},
|
|
8668
8664
|
numericallyBy(e) {
|
|
8669
8665
|
return (t, n) => t[e] - n[e];
|
|
8670
8666
|
}
|
|
8671
|
-
},
|
|
8667
|
+
}, sm = function(e) {
|
|
8672
8668
|
var t;
|
|
8673
8669
|
if (!e.nested) return;
|
|
8674
8670
|
let n = e.delta;
|
|
@@ -8677,7 +8673,7 @@ var am = {
|
|
|
8677
8673
|
for (r in a) if (r !== "_t") {
|
|
8678
8674
|
if (r[0] === "_") {
|
|
8679
8675
|
let e = r;
|
|
8680
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
8676
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === nm)) s.push(Number.parseInt(r.slice(1), 10));
|
|
8681
8677
|
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]}`);
|
|
8682
8678
|
} else {
|
|
8683
8679
|
let e = r;
|
|
@@ -8690,15 +8686,15 @@ var am = {
|
|
|
8690
8686
|
});
|
|
8691
8687
|
}
|
|
8692
8688
|
}
|
|
8693
|
-
for (s = s.sort(
|
|
8689
|
+
for (s = s.sort(om.numerically), r = s.length - 1; r >= 0; r--) {
|
|
8694
8690
|
if (i = s[r], i === void 0) continue;
|
|
8695
8691
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
8696
|
-
(e == null ? void 0 : e[2]) ===
|
|
8692
|
+
(e == null ? void 0 : e[2]) === nm && c.push({
|
|
8697
8693
|
index: e[1],
|
|
8698
8694
|
value: t
|
|
8699
8695
|
});
|
|
8700
8696
|
}
|
|
8701
|
-
c = c.sort(
|
|
8697
|
+
c = c.sort(om.numericallyBy("index"));
|
|
8702
8698
|
let u = c.length;
|
|
8703
8699
|
for (r = 0; r < u; r++) {
|
|
8704
8700
|
let e = c[r];
|
|
@@ -8708,7 +8704,7 @@ var am = {
|
|
|
8708
8704
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
8709
8705
|
let t = l[r];
|
|
8710
8706
|
if (t === void 0) continue;
|
|
8711
|
-
let n = new
|
|
8707
|
+
let n = new Jp(o[t.index], t.delta);
|
|
8712
8708
|
e.push(n, t.index);
|
|
8713
8709
|
}
|
|
8714
8710
|
if (!e.children) {
|
|
@@ -8717,8 +8713,8 @@ var am = {
|
|
|
8717
8713
|
}
|
|
8718
8714
|
e.exit();
|
|
8719
8715
|
};
|
|
8720
|
-
|
|
8721
|
-
var
|
|
8716
|
+
sm.filterName = "arrays";
|
|
8717
|
+
var cm = function(e) {
|
|
8722
8718
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
8723
8719
|
let t = e.left, n = e.children.length;
|
|
8724
8720
|
for (let r = 0; r < n; r++) {
|
|
@@ -8729,16 +8725,16 @@ var sm = function(e) {
|
|
|
8729
8725
|
}
|
|
8730
8726
|
e.setResult(t).exit();
|
|
8731
8727
|
};
|
|
8732
|
-
|
|
8733
|
-
var
|
|
8728
|
+
cm.filterName = "arraysCollectChildren";
|
|
8729
|
+
var lm = function(e) {
|
|
8734
8730
|
if (!e.nested) {
|
|
8735
8731
|
let t = e.delta;
|
|
8736
|
-
if (t[2] ===
|
|
8732
|
+
if (t[2] === nm) {
|
|
8737
8733
|
let n = t;
|
|
8738
8734
|
e.newName = `_${n[1]}`, e.setResult([
|
|
8739
8735
|
n[0],
|
|
8740
8736
|
Number.parseInt(e.childName.substring(1), 10),
|
|
8741
|
-
|
|
8737
|
+
nm
|
|
8742
8738
|
]).exit();
|
|
8743
8739
|
}
|
|
8744
8740
|
return;
|
|
@@ -8748,20 +8744,20 @@ var cm = function(e) {
|
|
|
8748
8744
|
let n = t;
|
|
8749
8745
|
for (let t in n) {
|
|
8750
8746
|
if (t === "_t") continue;
|
|
8751
|
-
let r = new
|
|
8747
|
+
let r = new Yp(n[t]);
|
|
8752
8748
|
e.push(r, t);
|
|
8753
8749
|
}
|
|
8754
8750
|
e.exit();
|
|
8755
8751
|
};
|
|
8756
|
-
|
|
8757
|
-
var
|
|
8752
|
+
lm.filterName = "arrays";
|
|
8753
|
+
var um = (e, t, n) => {
|
|
8758
8754
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
8759
8755
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
8760
8756
|
let r = +t;
|
|
8761
8757
|
for (let n in e) {
|
|
8762
8758
|
let i = e[n];
|
|
8763
8759
|
if (Array.isArray(i)) {
|
|
8764
|
-
if (i[2] ===
|
|
8760
|
+
if (i[2] === nm) {
|
|
8765
8761
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
8766
8762
|
if (a === +t) return e;
|
|
8767
8763
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
@@ -8769,7 +8765,7 @@ var lm = (e, t, n) => {
|
|
|
8769
8765
|
}
|
|
8770
8766
|
}
|
|
8771
8767
|
return r;
|
|
8772
|
-
},
|
|
8768
|
+
}, dm = (e) => {
|
|
8773
8769
|
if (!e || !e.children) return;
|
|
8774
8770
|
let t = e.delta;
|
|
8775
8771
|
if (t._t !== "a") return;
|
|
@@ -8780,22 +8776,22 @@ var lm = (e, t, n) => {
|
|
|
8780
8776
|
let a = r.newName;
|
|
8781
8777
|
if (a === void 0) {
|
|
8782
8778
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
8783
|
-
a =
|
|
8779
|
+
a = um(n, r.childName, r.result);
|
|
8784
8780
|
}
|
|
8785
8781
|
i[a] !== r.result && (i[a] = r.result);
|
|
8786
8782
|
}
|
|
8787
8783
|
e.setResult(i).exit();
|
|
8788
8784
|
};
|
|
8789
|
-
|
|
8785
|
+
dm.filterName = "arraysCollectChildren";
|
|
8790
8786
|
//#endregion
|
|
8791
8787
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
8792
|
-
var
|
|
8788
|
+
var fm = function(e) {
|
|
8793
8789
|
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();
|
|
8794
8790
|
};
|
|
8795
|
-
|
|
8791
|
+
fm.filterName = "dates";
|
|
8796
8792
|
//#endregion
|
|
8797
8793
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
8798
|
-
var
|
|
8794
|
+
var pm = /* @__PURE__ */ new Set(["__proto__"]), mm = (e) => {
|
|
8799
8795
|
if (!e || !e.children) return;
|
|
8800
8796
|
let t = e.children.length, n = e.result;
|
|
8801
8797
|
for (let r = 0; r < t; r++) {
|
|
@@ -8807,18 +8803,18 @@ var fm = /* @__PURE__ */ new Set(["__proto__"]), pm = (e) => {
|
|
|
8807
8803
|
}
|
|
8808
8804
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
8809
8805
|
};
|
|
8810
|
-
|
|
8811
|
-
var
|
|
8806
|
+
mm.filterName = "collectChildren";
|
|
8807
|
+
var hm = (e) => {
|
|
8812
8808
|
var t;
|
|
8813
8809
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
8814
8810
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
8815
8811
|
for (let t in n) {
|
|
8816
8812
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
8817
|
-
let a = new
|
|
8813
|
+
let a = new qp(n[t], r[t]);
|
|
8818
8814
|
e.push(a, t);
|
|
8819
8815
|
}
|
|
8820
8816
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
8821
|
-
let n = new
|
|
8817
|
+
let n = new qp(void 0, r[t]);
|
|
8822
8818
|
e.push(n, t);
|
|
8823
8819
|
}
|
|
8824
8820
|
if (!e.children || e.children.length === 0) {
|
|
@@ -8827,15 +8823,15 @@ var mm = (e) => {
|
|
|
8827
8823
|
}
|
|
8828
8824
|
e.exit();
|
|
8829
8825
|
};
|
|
8830
|
-
|
|
8831
|
-
var
|
|
8826
|
+
hm.filterName = "objects";
|
|
8827
|
+
var gm = function(e) {
|
|
8832
8828
|
if (!e.nested) return;
|
|
8833
8829
|
let t = e.delta;
|
|
8834
8830
|
if (t._t) return;
|
|
8835
8831
|
let n = t, r = !1;
|
|
8836
8832
|
for (let t in n) {
|
|
8837
|
-
if (
|
|
8838
|
-
let i = e.left, a = new
|
|
8833
|
+
if (pm.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
8834
|
+
let i = e.left, a = new Jp(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
8839
8835
|
e.push(a, t), r = !0;
|
|
8840
8836
|
}
|
|
8841
8837
|
if (!r) {
|
|
@@ -8844,8 +8840,8 @@ var hm = function(e) {
|
|
|
8844
8840
|
}
|
|
8845
8841
|
e.exit();
|
|
8846
8842
|
};
|
|
8847
|
-
|
|
8848
|
-
var
|
|
8843
|
+
gm.filterName = "objects";
|
|
8844
|
+
var _m = function(e) {
|
|
8849
8845
|
if (!e || !e.children || e.delta._t) return;
|
|
8850
8846
|
if (e.left === null || typeof e.left != "object") {
|
|
8851
8847
|
e.setResult(e.left).exit();
|
|
@@ -8856,17 +8852,17 @@ var gm = function(e) {
|
|
|
8856
8852
|
let n = e.children[r];
|
|
8857
8853
|
if (n === void 0) continue;
|
|
8858
8854
|
let i = n.childName;
|
|
8859
|
-
|
|
8855
|
+
pm.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
8860
8856
|
}
|
|
8861
8857
|
e.setResult(t).exit();
|
|
8862
8858
|
};
|
|
8863
|
-
|
|
8864
|
-
var
|
|
8859
|
+
_m.filterName = "collectChildren";
|
|
8860
|
+
var vm = function(e) {
|
|
8865
8861
|
if (!e.nested || e.delta._t) return;
|
|
8866
8862
|
let t = e.delta, n = !1;
|
|
8867
8863
|
for (let r in t) {
|
|
8868
|
-
if (
|
|
8869
|
-
let i = new
|
|
8864
|
+
if (pm.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
8865
|
+
let i = new Yp(t[r]);
|
|
8870
8866
|
e.push(i, r), n = !0;
|
|
8871
8867
|
}
|
|
8872
8868
|
if (!n) {
|
|
@@ -8875,25 +8871,25 @@ var _m = function(e) {
|
|
|
8875
8871
|
}
|
|
8876
8872
|
e.exit();
|
|
8877
8873
|
};
|
|
8878
|
-
|
|
8879
|
-
var
|
|
8874
|
+
vm.filterName = "objects";
|
|
8875
|
+
var ym = (e) => {
|
|
8880
8876
|
if (!e || !e.children || e.delta._t) return;
|
|
8881
8877
|
let t = e.children.length, n = {};
|
|
8882
8878
|
for (let r = 0; r < t; r++) {
|
|
8883
8879
|
let t = e.children[r];
|
|
8884
8880
|
if (t === void 0) continue;
|
|
8885
8881
|
let i = t.childName;
|
|
8886
|
-
|
|
8882
|
+
pm.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
8887
8883
|
}
|
|
8888
8884
|
e.setResult(n).exit();
|
|
8889
8885
|
};
|
|
8890
|
-
|
|
8886
|
+
ym.filterName = "collectChildren";
|
|
8891
8887
|
//#endregion
|
|
8892
8888
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
8893
|
-
var
|
|
8894
|
-
function
|
|
8889
|
+
var bm = 2, xm = 60, Sm = null;
|
|
8890
|
+
function Cm(e, t) {
|
|
8895
8891
|
var n;
|
|
8896
|
-
if (!
|
|
8892
|
+
if (!Sm) {
|
|
8897
8893
|
let r;
|
|
8898
8894
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
8899
8895
|
else {
|
|
@@ -8901,7 +8897,7 @@ function Sm(e, t) {
|
|
|
8901
8897
|
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.");
|
|
8902
8898
|
throw e.diff_match_patch_not_found = !0, e;
|
|
8903
8899
|
}
|
|
8904
|
-
|
|
8900
|
+
Sm = {
|
|
8905
8901
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
8906
8902
|
patch: (e, t) => {
|
|
8907
8903
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -8913,17 +8909,17 @@ function Sm(e, t) {
|
|
|
8913
8909
|
}
|
|
8914
8910
|
};
|
|
8915
8911
|
}
|
|
8916
|
-
return
|
|
8912
|
+
return Sm;
|
|
8917
8913
|
}
|
|
8918
|
-
var
|
|
8914
|
+
var wm = function(e) {
|
|
8919
8915
|
var t, n;
|
|
8920
8916
|
if (e.leftType !== "string") return;
|
|
8921
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
8917
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || xm;
|
|
8922
8918
|
if (r.length < a || i.length < a) {
|
|
8923
8919
|
e.setResult([r, i]).exit();
|
|
8924
8920
|
return;
|
|
8925
8921
|
}
|
|
8926
|
-
let o =
|
|
8922
|
+
let o = Cm(e.options);
|
|
8927
8923
|
if (!o) {
|
|
8928
8924
|
e.setResult([r, i]).exit();
|
|
8929
8925
|
return;
|
|
@@ -8932,19 +8928,19 @@ var Cm = function(e) {
|
|
|
8932
8928
|
e.setResult([
|
|
8933
8929
|
s(r, i),
|
|
8934
8930
|
0,
|
|
8935
|
-
|
|
8931
|
+
bm
|
|
8936
8932
|
]).exit();
|
|
8937
8933
|
};
|
|
8938
|
-
|
|
8939
|
-
var
|
|
8934
|
+
wm.filterName = "texts";
|
|
8935
|
+
var Tm = function(e) {
|
|
8940
8936
|
if (e.nested) return;
|
|
8941
8937
|
let t = e.delta;
|
|
8942
|
-
if (t[2] !==
|
|
8943
|
-
let n = t, r =
|
|
8938
|
+
if (t[2] !== bm) return;
|
|
8939
|
+
let n = t, r = Cm(e.options, !0).patch;
|
|
8944
8940
|
e.setResult(r(e.left, n[0])).exit();
|
|
8945
8941
|
};
|
|
8946
|
-
|
|
8947
|
-
var
|
|
8942
|
+
Tm.filterName = "texts";
|
|
8943
|
+
var Em = (e) => {
|
|
8948
8944
|
var t, n, r;
|
|
8949
8945
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
8950
8946
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -8965,21 +8961,21 @@ var Tm = (e) => {
|
|
|
8965
8961
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
8966
8962
|
}
|
|
8967
8963
|
return a.join("\n");
|
|
8968
|
-
},
|
|
8964
|
+
}, Dm = function(e) {
|
|
8969
8965
|
if (e.nested) return;
|
|
8970
8966
|
let t = e.delta;
|
|
8971
|
-
if (t[2] !==
|
|
8967
|
+
if (t[2] !== bm) return;
|
|
8972
8968
|
let n = t;
|
|
8973
8969
|
e.setResult([
|
|
8974
|
-
|
|
8970
|
+
Em(n[0]),
|
|
8975
8971
|
0,
|
|
8976
|
-
|
|
8972
|
+
bm
|
|
8977
8973
|
]).exit();
|
|
8978
8974
|
};
|
|
8979
|
-
|
|
8975
|
+
Dm.filterName = "texts";
|
|
8980
8976
|
//#endregion
|
|
8981
8977
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
8982
|
-
var
|
|
8978
|
+
var Om = function(e) {
|
|
8983
8979
|
if (e.left === e.right) {
|
|
8984
8980
|
e.setResult(void 0).exit();
|
|
8985
8981
|
return;
|
|
@@ -9012,8 +9008,8 @@ var Dm = function(e) {
|
|
|
9012
9008
|
}
|
|
9013
9009
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
9014
9010
|
};
|
|
9015
|
-
|
|
9016
|
-
var
|
|
9011
|
+
Om.filterName = "trivial";
|
|
9012
|
+
var km = function(e) {
|
|
9017
9013
|
if (e.delta === void 0) {
|
|
9018
9014
|
e.setResult(e.left).exit();
|
|
9019
9015
|
return;
|
|
@@ -9037,8 +9033,8 @@ var Om = function(e) {
|
|
|
9037
9033
|
}
|
|
9038
9034
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
9039
9035
|
};
|
|
9040
|
-
|
|
9041
|
-
var
|
|
9036
|
+
km.filterName = "trivial";
|
|
9037
|
+
var Am = function(e) {
|
|
9042
9038
|
if (e.delta === void 0) {
|
|
9043
9039
|
e.setResult(e.delta).exit();
|
|
9044
9040
|
return;
|
|
@@ -9059,36 +9055,36 @@ var km = function(e) {
|
|
|
9059
9055
|
}
|
|
9060
9056
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
9061
9057
|
};
|
|
9062
|
-
|
|
9058
|
+
Am.filterName = "trivial";
|
|
9063
9059
|
//#endregion
|
|
9064
9060
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
9065
|
-
var
|
|
9061
|
+
var jm = class {
|
|
9066
9062
|
constructor(e) {
|
|
9067
|
-
this.processor = new
|
|
9063
|
+
this.processor = new Zp(e), this.processor.pipe(new Xp("diff").append(mm, Om, fm, wm, hm, am).shouldHaveResult()), this.processor.pipe(new Xp("patch").append(_m, cm, km, Tm, gm, sm).shouldHaveResult()), this.processor.pipe(new Xp("reverse").append(ym, dm, Am, Dm, vm, lm).shouldHaveResult());
|
|
9068
9064
|
}
|
|
9069
9065
|
options(e) {
|
|
9070
9066
|
return this.processor.options(e);
|
|
9071
9067
|
}
|
|
9072
9068
|
diff(e, t) {
|
|
9073
|
-
return this.processor.process(new
|
|
9069
|
+
return this.processor.process(new qp(e, t));
|
|
9074
9070
|
}
|
|
9075
9071
|
patch(e, t) {
|
|
9076
|
-
return this.processor.process(new
|
|
9072
|
+
return this.processor.process(new Jp(e, t));
|
|
9077
9073
|
}
|
|
9078
9074
|
reverse(e) {
|
|
9079
|
-
return this.processor.process(new
|
|
9075
|
+
return this.processor.process(new Yp(e));
|
|
9080
9076
|
}
|
|
9081
9077
|
unpatch(e, t) {
|
|
9082
9078
|
return this.patch(e, this.reverse(t));
|
|
9083
9079
|
}
|
|
9084
9080
|
clone(e) {
|
|
9085
|
-
return
|
|
9081
|
+
return Up(e);
|
|
9086
9082
|
}
|
|
9087
9083
|
};
|
|
9088
9084
|
//#endregion
|
|
9089
9085
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
9090
|
-
function
|
|
9091
|
-
return new
|
|
9086
|
+
function Mm(e) {
|
|
9087
|
+
return new jm(e);
|
|
9092
9088
|
}
|
|
9093
9089
|
//#endregion
|
|
9094
9090
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -9650,46 +9646,46 @@ $.Diff = function(e, t) {
|
|
|
9650
9646
|
};
|
|
9651
9647
|
//#endregion
|
|
9652
9648
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
9653
|
-
var
|
|
9649
|
+
var Nm = (e = {}) => Mm({
|
|
9654
9650
|
...e,
|
|
9655
9651
|
textDiff: {
|
|
9656
9652
|
diffMatchPatch: $,
|
|
9657
9653
|
minLength: 120
|
|
9658
9654
|
},
|
|
9659
9655
|
cloneDiffValues: !0
|
|
9660
|
-
}),
|
|
9656
|
+
}), Pm = ["user", "unittemplate"], Fm = Nm(), Im = (e, t, n) => {
|
|
9661
9657
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
9662
9658
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
9663
9659
|
let n = r[t[e]];
|
|
9664
9660
|
if (n) return n;
|
|
9665
9661
|
}
|
|
9666
9662
|
return n || "";
|
|
9667
|
-
},
|
|
9663
|
+
}, Lm = (e) => {
|
|
9668
9664
|
let t = (e) => _r(e) ? kr(e) : String(e);
|
|
9669
9665
|
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);
|
|
9670
|
-
},
|
|
9666
|
+
}, Rm = (e) => {
|
|
9671
9667
|
switch (e.length) {
|
|
9672
9668
|
case 1: {
|
|
9673
9669
|
let [t] = e;
|
|
9674
9670
|
return {
|
|
9675
9671
|
type: "created",
|
|
9676
9672
|
before: "",
|
|
9677
|
-
after:
|
|
9673
|
+
after: Lm(t)
|
|
9678
9674
|
};
|
|
9679
9675
|
}
|
|
9680
9676
|
case 2: {
|
|
9681
9677
|
let [t, n] = e;
|
|
9682
9678
|
return {
|
|
9683
9679
|
type: "modified",
|
|
9684
|
-
before:
|
|
9685
|
-
after:
|
|
9680
|
+
before: Lm(t),
|
|
9681
|
+
after: Lm(n)
|
|
9686
9682
|
};
|
|
9687
9683
|
}
|
|
9688
9684
|
case 3: {
|
|
9689
9685
|
let [t] = e;
|
|
9690
9686
|
return {
|
|
9691
9687
|
type: "deleted",
|
|
9692
|
-
before:
|
|
9688
|
+
before: Lm(t),
|
|
9693
9689
|
after: ""
|
|
9694
9690
|
};
|
|
9695
9691
|
}
|
|
@@ -9699,15 +9695,15 @@ var Mm = (e = {}) => jm({
|
|
|
9699
9695
|
after: ""
|
|
9700
9696
|
};
|
|
9701
9697
|
}
|
|
9702
|
-
},
|
|
9703
|
-
let r =
|
|
9698
|
+
}, zm = (e) => Array.isArray(e), Bm = (e, t) => t ? zm(t) ? t.length === 0 ? e : t.reduce((e, t) => Fm.unpatch(nn(e), nn(t)), nn(e)) : Fm.unpatch(nn(e), nn(t)) : e, Vm = (e) => e.createdAt || e.date, Hm = (e, t, n) => {
|
|
9699
|
+
let r = Vm(e);
|
|
9704
9700
|
if (!r) return {
|
|
9705
9701
|
oldJson: "",
|
|
9706
9702
|
newJson: "",
|
|
9707
9703
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
9708
9704
|
};
|
|
9709
9705
|
let i = t.filter((e) => {
|
|
9710
|
-
let t =
|
|
9706
|
+
let t = Vm(e);
|
|
9711
9707
|
return !!(e.diffs && t && t >= r);
|
|
9712
9708
|
}), a = Array.from({ length: i.length + 1 });
|
|
9713
9709
|
a[0] = nn(n);
|
|
@@ -9720,7 +9716,7 @@ var Mm = (e = {}) => jm({
|
|
|
9720
9716
|
a[e + 1] = a[e];
|
|
9721
9717
|
continue;
|
|
9722
9718
|
}
|
|
9723
|
-
a[e + 1] =
|
|
9719
|
+
a[e + 1] = Bm(a[e], t);
|
|
9724
9720
|
}
|
|
9725
9721
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
9726
9722
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -9735,10 +9731,10 @@ var Mm = (e = {}) => jm({
|
|
|
9735
9731
|
oldJson: o,
|
|
9736
9732
|
newJson: s
|
|
9737
9733
|
};
|
|
9738
|
-
},
|
|
9734
|
+
}, Um = (e, t, n = {}, r = []) => {
|
|
9739
9735
|
var i;
|
|
9740
9736
|
if (!e) return;
|
|
9741
|
-
let a = [...
|
|
9737
|
+
let a = [...Pm, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
9742
9738
|
Object.keys(e).forEach((i) => {
|
|
9743
9739
|
var o;
|
|
9744
9740
|
let s = e[i];
|
|
@@ -9751,12 +9747,12 @@ var Mm = (e = {}) => jm({
|
|
|
9751
9747
|
cn(s) ? t.push({
|
|
9752
9748
|
deltaFormat: [...s],
|
|
9753
9749
|
path: c
|
|
9754
|
-
}) : gn(s) &&
|
|
9750
|
+
}) : gn(s) && Um(s, t, n, c);
|
|
9755
9751
|
});
|
|
9756
|
-
},
|
|
9752
|
+
}, Wm = (e, t = {}) => {
|
|
9757
9753
|
let n = [];
|
|
9758
|
-
return e ? (
|
|
9759
|
-
},
|
|
9754
|
+
return e ? (Um(e, n, t), n) : [];
|
|
9755
|
+
}, Gm = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), Km = (e) => {
|
|
9760
9756
|
if (e == null || e === "") return "empty";
|
|
9761
9757
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
9762
9758
|
if (typeof e == "string") return e;
|
|
@@ -9767,35 +9763,35 @@ var Mm = (e = {}) => jm({
|
|
|
9767
9763
|
} catch {
|
|
9768
9764
|
return String(e);
|
|
9769
9765
|
}
|
|
9770
|
-
},
|
|
9766
|
+
}, qm = (e, t = e.length - 1) => {
|
|
9771
9767
|
if (t >= e.length) return "Value";
|
|
9772
9768
|
let n = e[t];
|
|
9773
|
-
return !n || mr(n) ?
|
|
9774
|
-
},
|
|
9775
|
-
let o =
|
|
9769
|
+
return !n || mr(n) ? qm(e, t - 1) : Gm(n);
|
|
9770
|
+
}, Jm = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
9771
|
+
let o = Km(r), s = Km(i), c = a ? ` in ${a}` : "";
|
|
9776
9772
|
switch (t) {
|
|
9777
9773
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
9778
9774
|
case "created": return `${e} created ${s}${c}.`;
|
|
9779
9775
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
9780
9776
|
default: return `${e} changed ${n}${c}.`;
|
|
9781
9777
|
}
|
|
9782
|
-
},
|
|
9778
|
+
}, Ym = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
|
|
9783
9779
|
let i = {
|
|
9784
9780
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
9785
9781
|
rows: n.map((n) => {
|
|
9786
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
9787
|
-
return { cells: [{ value:
|
|
9782
|
+
let { deltaFormat: i, path: a } = n, o = Im(e, a, r), { type: s, before: c, after: l } = Rm(i);
|
|
9783
|
+
return { cells: [{ value: Jm({
|
|
9788
9784
|
userName: t,
|
|
9789
9785
|
type: s,
|
|
9790
|
-
property:
|
|
9786
|
+
property: qm(a),
|
|
9791
9787
|
before: c,
|
|
9792
9788
|
after: l,
|
|
9793
9789
|
sectionName: o
|
|
9794
9790
|
}) }] };
|
|
9795
9791
|
})
|
|
9796
9792
|
};
|
|
9797
|
-
return /* @__PURE__ */ S(
|
|
9798
|
-
},
|
|
9793
|
+
return /* @__PURE__ */ S(tu, { table: i });
|
|
9794
|
+
}, Xm = Object.freeze({
|
|
9799
9795
|
summary: {
|
|
9800
9796
|
label: "Summary",
|
|
9801
9797
|
value: "summary"
|
|
@@ -9804,13 +9800,13 @@ var Mm = (e = {}) => jm({
|
|
|
9804
9800
|
label: "Compare",
|
|
9805
9801
|
value: "compare"
|
|
9806
9802
|
}
|
|
9807
|
-
}),
|
|
9808
|
-
let c = [
|
|
9803
|
+
}), Zm = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
9804
|
+
let c = [Xm.summary, Xm.compare].map(({ label: e, value: t }) => ({
|
|
9809
9805
|
label: e,
|
|
9810
9806
|
value: t
|
|
9811
9807
|
})), [l, u] = v(c[0]), { diffs: d = void 0 } = e || {};
|
|
9812
9808
|
if (!d) return null;
|
|
9813
|
-
let { oldJson: f, newJson: p, error: m } =
|
|
9809
|
+
let { oldJson: f, newJson: p, error: m } = Hm(e, t, n);
|
|
9814
9810
|
return /* @__PURE__ */ S(Ts, {
|
|
9815
9811
|
visible: r,
|
|
9816
9812
|
centered: !0,
|
|
@@ -9818,20 +9814,20 @@ var Mm = (e = {}) => jm({
|
|
|
9818
9814
|
children: /* @__PURE__ */ S(rs, { dialog: {
|
|
9819
9815
|
scroll: !0,
|
|
9820
9816
|
heading: "Comparison view",
|
|
9821
|
-
content: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(
|
|
9817
|
+
content: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(Yf, {
|
|
9822
9818
|
name: "ViewTab",
|
|
9823
9819
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
9824
9820
|
options: c,
|
|
9825
9821
|
value: l
|
|
9826
|
-
}), l.value === "summary" ? /* @__PURE__ */ S(
|
|
9822
|
+
}), l.value === "summary" ? /* @__PURE__ */ S(Ym, {
|
|
9827
9823
|
userName: e.userName,
|
|
9828
9824
|
sectionNames: a,
|
|
9829
|
-
diffs:
|
|
9825
|
+
diffs: Wm(d, i),
|
|
9830
9826
|
defaultSectionName: o
|
|
9831
9827
|
}) : m ? /* @__PURE__ */ S("div", {
|
|
9832
9828
|
style: { padding: 16 },
|
|
9833
9829
|
children: m
|
|
9834
|
-
}) : /* @__PURE__ */ S(
|
|
9830
|
+
}) : /* @__PURE__ */ S(Bp, {
|
|
9835
9831
|
oldJson: f,
|
|
9836
9832
|
newJson: p
|
|
9837
9833
|
})] }),
|
|
@@ -9844,7 +9840,7 @@ var Mm = (e = {}) => jm({
|
|
|
9844
9840
|
height: "90vh"
|
|
9845
9841
|
} })
|
|
9846
9842
|
});
|
|
9847
|
-
},
|
|
9843
|
+
}, Qm = [
|
|
9848
9844
|
{
|
|
9849
9845
|
label: "10 / page",
|
|
9850
9846
|
value: 10
|
|
@@ -9857,8 +9853,8 @@ var Mm = (e = {}) => jm({
|
|
|
9857
9853
|
label: "50 / page",
|
|
9858
9854
|
value: 50
|
|
9859
9855
|
}
|
|
9860
|
-
],
|
|
9861
|
-
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s =
|
|
9856
|
+
], $m = (e, t = {}) => {
|
|
9857
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = Wm(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
9862
9858
|
if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
|
|
9863
9859
|
switch (a) {
|
|
9864
9860
|
case "Created": return `Created by ${r}`;
|
|
@@ -9868,7 +9864,7 @@ var Mm = (e = {}) => jm({
|
|
|
9868
9864
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
9869
9865
|
default: return `Change by ${r}`;
|
|
9870
9866
|
}
|
|
9871
|
-
},
|
|
9867
|
+
}, eh = ({ 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 }) => {
|
|
9872
9868
|
let [g, _] = v(!1), [y, b] = v(null), w = (e) => {
|
|
9873
9869
|
if (e.snapshot) {
|
|
9874
9870
|
f == null || f(e.snapshot, e);
|
|
@@ -9887,7 +9883,7 @@ var Mm = (e = {}) => jm({
|
|
|
9887
9883
|
return {
|
|
9888
9884
|
cells: [
|
|
9889
9885
|
{
|
|
9890
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
9886
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : $m(e, l),
|
|
9891
9887
|
type: "Link",
|
|
9892
9888
|
disabled: n,
|
|
9893
9889
|
onClick: n ? void 0 : () => w(e),
|
|
@@ -9906,8 +9902,8 @@ var Mm = (e = {}) => jm({
|
|
|
9906
9902
|
type: "Static"
|
|
9907
9903
|
},
|
|
9908
9904
|
{
|
|
9909
|
-
value:
|
|
9910
|
-
date:
|
|
9905
|
+
value: Vp({
|
|
9906
|
+
date: Vm(e),
|
|
9911
9907
|
showTime: !0
|
|
9912
9908
|
}),
|
|
9913
9909
|
type: "Static"
|
|
@@ -9917,12 +9913,12 @@ var Mm = (e = {}) => jm({
|
|
|
9917
9913
|
};
|
|
9918
9914
|
});
|
|
9919
9915
|
return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(bo, {
|
|
9920
|
-
heading: /* @__PURE__ */ C(
|
|
9916
|
+
heading: /* @__PURE__ */ C(yd, {
|
|
9921
9917
|
gap: !0,
|
|
9922
9918
|
wrap: !0,
|
|
9923
9919
|
children: [/* @__PURE__ */ S(es, { children: "Changes" }), c.map((e) => {
|
|
9924
9920
|
var t;
|
|
9925
|
-
return /* @__PURE__ */ S(
|
|
9921
|
+
return /* @__PURE__ */ S(Zu, {
|
|
9926
9922
|
small: (t = e.small) == null || t,
|
|
9927
9923
|
checked: e.checked,
|
|
9928
9924
|
onChange: e.onChange,
|
|
@@ -9932,11 +9928,11 @@ var Mm = (e = {}) => jm({
|
|
|
9932
9928
|
})]
|
|
9933
9929
|
}),
|
|
9934
9930
|
padding: !1,
|
|
9935
|
-
children: r ? /* @__PURE__ */ S(
|
|
9931
|
+
children: r ? /* @__PURE__ */ S(Id, {
|
|
9936
9932
|
height: "100px",
|
|
9937
9933
|
theme: ki.WHITE,
|
|
9938
9934
|
children: /* @__PURE__ */ S(ya, { dark: !0 })
|
|
9939
|
-
}) : /* @__PURE__ */ S(
|
|
9935
|
+
}) : /* @__PURE__ */ S(tu, { table: {
|
|
9940
9936
|
headers: T,
|
|
9941
9937
|
testId: "auditlog-table",
|
|
9942
9938
|
rows: E,
|
|
@@ -9950,14 +9946,14 @@ var Mm = (e = {}) => jm({
|
|
|
9950
9946
|
onChange: (e) => {
|
|
9951
9947
|
u(Number(e.target.value));
|
|
9952
9948
|
},
|
|
9953
|
-
options:
|
|
9949
|
+
options: Qm,
|
|
9954
9950
|
value: a
|
|
9955
9951
|
},
|
|
9956
9952
|
onSelectPage: (e) => d(e),
|
|
9957
9953
|
small: !0
|
|
9958
9954
|
} }
|
|
9959
9955
|
} })
|
|
9960
|
-
}), g && y && y.diffs && /* @__PURE__ */ S(
|
|
9956
|
+
}), g && y && y.diffs && /* @__PURE__ */ S(Zm, {
|
|
9961
9957
|
sectionNames: o,
|
|
9962
9958
|
isOpen: g,
|
|
9963
9959
|
onClose: () => _(!1),
|
|
@@ -9967,7 +9963,7 @@ var Mm = (e = {}) => jm({
|
|
|
9967
9963
|
data: t,
|
|
9968
9964
|
transformDiffsConfig: l
|
|
9969
9965
|
})] });
|
|
9970
|
-
},
|
|
9966
|
+
}, th = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
9971
9967
|
let i = window.location.href, a = _(i);
|
|
9972
9968
|
return d(() => {
|
|
9973
9969
|
a.current = i;
|
|
@@ -9990,20 +9986,20 @@ var Mm = (e = {}) => jm({
|
|
|
9990
9986
|
});
|
|
9991
9987
|
};
|
|
9992
9988
|
}, [e, t]), null;
|
|
9993
|
-
},
|
|
9989
|
+
}, nh = {
|
|
9994
9990
|
errorBoundary: "_errorBoundary_hmco0_1",
|
|
9995
9991
|
sidebarErrorBoundary: "_sidebarErrorBoundary_hmco0_5",
|
|
9996
9992
|
rightSidebarErrorBoundary: "_rightSidebarErrorBoundary_hmco0_6"
|
|
9997
|
-
},
|
|
9998
|
-
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } =
|
|
9993
|
+
}, rh = ({ options: e }) => {
|
|
9994
|
+
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } = kp();
|
|
9999
9995
|
if (t) return /* @__PURE__ */ S(t, {});
|
|
10000
9996
|
if (n || r) return /* @__PURE__ */ S("div", {
|
|
10001
|
-
className: b(n ?
|
|
9997
|
+
className: b(n ? nh.sidebarErrorBoundary : "", r ? nh.rightSidebarErrorBoundary : ""),
|
|
10002
9998
|
style: a,
|
|
10003
9999
|
children: o == null ? void 0 : o.unexpectedError
|
|
10004
10000
|
});
|
|
10005
10001
|
let s = /* @__PURE__ */ S("div", {
|
|
10006
|
-
className:
|
|
10002
|
+
className: nh.errorBoundary,
|
|
10007
10003
|
style: a,
|
|
10008
10004
|
children: /* @__PURE__ */ S(Gs, { message: {
|
|
10009
10005
|
icon: !0,
|
|
@@ -10013,24 +10009,24 @@ var Mm = (e = {}) => jm({
|
|
|
10013
10009
|
width: "100%"
|
|
10014
10010
|
} })
|
|
10015
10011
|
});
|
|
10016
|
-
return i ? /* @__PURE__ */ S(
|
|
10012
|
+
return i ? /* @__PURE__ */ S(Gd, {
|
|
10017
10013
|
scroll: !1,
|
|
10018
10014
|
padding: 0,
|
|
10019
10015
|
children: s
|
|
10020
10016
|
}) : s;
|
|
10021
|
-
},
|
|
10022
|
-
fallback: /* @__PURE__ */ S(
|
|
10017
|
+
}, ih = ({ children: e, options: t }) => /* @__PURE__ */ S(Ci.ErrorBoundary, {
|
|
10018
|
+
fallback: /* @__PURE__ */ S(rh, { options: t }),
|
|
10023
10019
|
onError: (e, t) => {
|
|
10024
10020
|
console.error("Error caught by boundary:", e, t);
|
|
10025
10021
|
},
|
|
10026
10022
|
children: e
|
|
10027
|
-
}),
|
|
10023
|
+
}), ah = (e, t = {}) => (n) => /* @__PURE__ */ S(ih, {
|
|
10028
10024
|
options: t,
|
|
10029
10025
|
children: /* @__PURE__ */ S(e, { ...n })
|
|
10030
|
-
}),
|
|
10031
|
-
|
|
10032
|
-
e ===
|
|
10026
|
+
}), oh = (e = {}) => (t) => ah(t, e), sh = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, ch = (e) => {
|
|
10027
|
+
Ap(Tp.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
10028
|
+
e === Tp.Translations ? Ap(e, Dp(t)) : Ap(e, sh(t) ? t : { ...t });
|
|
10033
10029
|
});
|
|
10034
10030
|
};
|
|
10035
10031
|
//#endregion
|
|
10036
|
-
export { Ji as Accordion, ga as AccordionWithDefaultToggle, fo as Actions, Ei as Align,
|
|
10032
|
+
export { Ji as Accordion, ga as AccordionWithDefaultToggle, fo as Actions, Ei as Align, eh as AuditLog, no as Badge, go as Breadcrumb, mo as BreadcrumbLinkType, q as Button, vo as ButtonGroup, Di as ButtonPosition, ba as ButtonType, bo as Card, fa as CheckBox, Hi as Chevron, Gi as Collapse, Ti as Color, Vo as ColorInput, Bo as ColorInputPopover, Ko as Column, rs as Dialog, Bp as DiffViewer, W as DisabledContext, Zo as Divider, us as Drawer, np as ElementType, fu as Empty, ih as ErrorBoundary, vd as Field, md as FileButton, bs as FileInput, yd as Flex, xd as FormRow, Eo as Grid, H as GroupOrder, es as Heading, da as HelpIcon, G as Icon, U as IconType, hs as Input, ps as InputGroup, sl as InputGroupAddon, _s as InputReaderMethods, Ai as InputType, gd as Label, Pd as List, Cd as ListHeading, kd as ListSubheading, Id as Loader, pf as Mention, lo as Menu, Ka as MenuCarat, Ga as MenuType, Gs as Message, zs as MessageType, Ts as Modal, Zs as NativeSelect, bl as NumberInput, Ud as OptionDropdown, Gd as Page, cl as Pagination, cp as PopConfirm, So as Popover, Kd as Portal, Jd as PrintHeader, Os as ProgressBar, Yd as RadioButton, ff as RichTextInput, hf as Row, tl as Select, Ip as SettingField, bf as SideBar, Sf as Skeleton, Al as Slider, Ns as SmartUploadModal, xs as Spacer, ya as Spinner, tu as Table, pd as TableImportExport, Yf as Tabs, Yo as Text, Qf as TextArea, Xf as TextLink, Oi as TextTransform, ki as Theme, ni as Toaster, Zu as Toggle, K as Tooltip, ap as TopBar, fp as Tree, wp as TreeTable, wi as TriggerType, Hf as UnitInput, Kf as UnitSlider, Pp as UnitTable, th as UsageTracker, Ju as dismissToast, zf as initializeContext, ch as initializeGuiLibrary, vs as readFile, qu as toast, Qs as useFocus, Ss as useKeyboardEvent, tc as useWindowWidth, oh as withChainableErrorBoundary, ah as withErrorBoundary };
|