@oliasoft-open-source/react-ui-library 7.5.2-beta-1 → 7.5.2-beta-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/table/row/row.d.ts +7 -1
- package/dist/components/table/row/row.d.ts.map +1 -1
- package/dist/components/unit-table/unit-table.d.ts +4 -11
- package/dist/components/unit-table/unit-table.d.ts.map +1 -1
- package/dist/components/unit-table/unit-table.stories.d.ts.map +1 -1
- package/dist/index.js +643 -639
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4163,11 +4163,35 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4163
4163
|
testId: a
|
|
4164
4164
|
})
|
|
4165
4165
|
});
|
|
4166
|
-
}, Bl = (
|
|
4166
|
+
}, Bl = (e) => e.type === Rl.INPUT || e.type === Rl.NUMBER_INPUT, Vl = ({ event: e, rowIndex: t, cellIndex: n }) => ({
|
|
4167
|
+
...e,
|
|
4168
|
+
target: {
|
|
4169
|
+
...e.target,
|
|
4170
|
+
rowIndex: t,
|
|
4171
|
+
cellIndex: n
|
|
4172
|
+
}
|
|
4173
|
+
}), Hl = ({ cell: e, rowIndex: t, cellIndex: n }) => {
|
|
4174
|
+
if (!Bl(e) || typeof e.onChange != "function") return e;
|
|
4175
|
+
let r = e.onChange;
|
|
4176
|
+
return {
|
|
4177
|
+
...e,
|
|
4178
|
+
onChange: (e) => {
|
|
4179
|
+
r(Vl({
|
|
4180
|
+
event: e,
|
|
4181
|
+
rowIndex: t,
|
|
4182
|
+
cellIndex: n
|
|
4183
|
+
}));
|
|
4184
|
+
}
|
|
4185
|
+
};
|
|
4186
|
+
}, Ul = ({ row: e, rowIndex: t, isHeader: n = !1, columnCount: r, colSpan: i, columnHeaderAlignments: a = [], columnAlignment: o = [], hasRowActions: s, draggableTable: c = !1, columnWidths: l, dropDisabled: u = !1, height: d, testId: f }) => {
|
|
4167
4187
|
let p = fl(a, n, t), { onRowClick: m, onRowFocus: h, onRowMouseEnter: g, onRowMouseLeave: _, expandedContent: v, error: C, warning: w, active: T } = e, E = e.cells.map((e, r) => {
|
|
4168
|
-
let i = `${+!n}_${t}_${r}
|
|
4169
|
-
return /* @__PURE__ */ x(zl, {
|
|
4188
|
+
let i = `${+!n}_${t}_${r}`, a = n ? e : Hl({
|
|
4170
4189
|
cell: e,
|
|
4190
|
+
rowIndex: t,
|
|
4191
|
+
cellIndex: r
|
|
4192
|
+
});
|
|
4193
|
+
return /* @__PURE__ */ x(zl, {
|
|
4194
|
+
cell: a,
|
|
4171
4195
|
isHeader: n,
|
|
4172
4196
|
columnAlignment: o[r],
|
|
4173
4197
|
columnHeaderAlignment: p[r],
|
|
@@ -4237,7 +4261,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4237
4261
|
flush: v.flush === !0,
|
|
4238
4262
|
children: v.content
|
|
4239
4263
|
}, `${t}_expanded_content`) : null] });
|
|
4240
|
-
},
|
|
4264
|
+
}, Wl = (e) => {
|
|
4241
4265
|
let { children: t, colSpan: n, columnAlignment: r, columnCount: i, draggable: a, onListReorder: o = () => {}, canListReorder: s = () => !0, rowActions: c, rows: l = [], tbodyRef: u } = e, [d, f] = _(null), [p, h] = _(!1), g = m(() => l.map((e, t) => t.toString()), [l]);
|
|
4242
4266
|
return a ? /* @__PURE__ */ S(Fr, {
|
|
4243
4267
|
collisionDetection: Lr,
|
|
@@ -4272,7 +4296,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4272
4296
|
dropAnimation: null,
|
|
4273
4297
|
children: /* @__PURE__ */ x("table", {
|
|
4274
4298
|
className: y(Vs.table, Vs.dragOverlay),
|
|
4275
|
-
children: /* @__PURE__ */ x("tbody", { children: /* @__PURE__ */ x(
|
|
4299
|
+
children: /* @__PURE__ */ x("tbody", { children: /* @__PURE__ */ x(Ul, {
|
|
4276
4300
|
rowIndex: Number(d),
|
|
4277
4301
|
row: l[Number(d)],
|
|
4278
4302
|
columnCount: i,
|
|
@@ -4292,7 +4316,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4292
4316
|
})
|
|
4293
4317
|
}), document.body)]
|
|
4294
4318
|
}) : t({});
|
|
4295
|
-
},
|
|
4319
|
+
}, Gl = ({ table: e, children: t }) => {
|
|
4296
4320
|
var n, r, i;
|
|
4297
4321
|
let a = g(null), o = Rr({
|
|
4298
4322
|
count: (n = (r = e == null ? void 0 : e.rowCount) == null ? (i = e.rows) == null ? void 0 : i.length : r) == null ? 0 : n,
|
|
@@ -4315,7 +4339,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4315
4339
|
})()
|
|
4316
4340
|
})
|
|
4317
4341
|
});
|
|
4318
|
-
},
|
|
4342
|
+
}, Kl = ({ activeIndex: e, triggerScrollToActiveRow: t, isVirtualized: n, virtualizer: r }) => (d(() => {
|
|
4319
4343
|
if (t && !(e == null || e < 0)) {
|
|
4320
4344
|
if (n && r) r.scrollToIndex(e, {
|
|
4321
4345
|
behavior: "auto",
|
|
@@ -4334,11 +4358,11 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4334
4358
|
t,
|
|
4335
4359
|
n,
|
|
4336
4360
|
r
|
|
4337
|
-
]), null),
|
|
4361
|
+
]), null), ql = ({ table: e, children: t }) => {
|
|
4338
4362
|
let { infiniteScroll: n = !1, triggerScrollToActiveRow: r = !1, rows: i } = e, a = m(() => typeof e.activeRowIndex == "number" ? e.activeRowIndex : Array.isArray(i) && i.length ? i.findIndex((e) => e && e.active) : -1, [i, e.activeRowIndex]);
|
|
4339
|
-
return n ? /* @__PURE__ */ x(
|
|
4363
|
+
return n ? /* @__PURE__ */ x(Gl, {
|
|
4340
4364
|
table: e,
|
|
4341
|
-
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(
|
|
4365
|
+
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(Kl, {
|
|
4342
4366
|
isVirtualized: !0,
|
|
4343
4367
|
virtualizer: e,
|
|
4344
4368
|
activeIndex: a,
|
|
@@ -4350,13 +4374,13 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4350
4374
|
}) : /* @__PURE__ */ S("div", {
|
|
4351
4375
|
id: "scrollWrapper",
|
|
4352
4376
|
className: Vs.scroll,
|
|
4353
|
-
children: [/* @__PURE__ */ x(
|
|
4377
|
+
children: [/* @__PURE__ */ x(Kl, {
|
|
4354
4378
|
isVirtualized: !1,
|
|
4355
4379
|
activeIndex: a,
|
|
4356
4380
|
triggerScrollToActiveRow: r
|
|
4357
4381
|
}), t({})]
|
|
4358
4382
|
});
|
|
4359
|
-
},
|
|
4383
|
+
}, Jl = (e) => {
|
|
4360
4384
|
var t, n, r, i, a;
|
|
4361
4385
|
let { onListReorder: o = () => {}, canListReorder: s = () => !0, beforeRenderRow: c, table: l } = e, { columnWidths: u, footer: d, name: f, rows: p = [], actions: m, actionsRight: h, columnHeaderAlignments: _, columnAlignment: v, striped: b = !0, testId: C, draggable: w, defaultEmptyRow: T = null, onAddRow: E = null, bordered: D = !0, maxHeight: O, fixedWidth: k } = l, A = g(null), j = an(e, "table.headers", []), M = ol(p, j), N = cl(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 = {
|
|
4362
4386
|
cells: I ? T.cells.map((e, t) => (e == null ? void 0 : e.type) === "Input" ? {
|
|
@@ -4395,7 +4419,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4395
4419
|
name: f,
|
|
4396
4420
|
testId: C && `${C}-title`
|
|
4397
4421
|
}),
|
|
4398
|
-
/* @__PURE__ */ x(
|
|
4422
|
+
/* @__PURE__ */ x(Wl, {
|
|
4399
4423
|
colSpan: P,
|
|
4400
4424
|
columnAlignment: v,
|
|
4401
4425
|
columnCount: M,
|
|
@@ -4405,13 +4429,13 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4405
4429
|
rows: R,
|
|
4406
4430
|
tbodyRef: A,
|
|
4407
4431
|
canListReorder: s,
|
|
4408
|
-
children: ({ dropDisabled: e }) => /* @__PURE__ */ x(
|
|
4432
|
+
children: ({ dropDisabled: e }) => /* @__PURE__ */ x(ql, {
|
|
4409
4433
|
table: z,
|
|
4410
4434
|
children: ({ virtualizer: t, tableStyle: n }) => /* @__PURE__ */ S("table", {
|
|
4411
4435
|
className: y(Vs.table, b ? Vs.striped : ""),
|
|
4412
4436
|
"data-testid": C,
|
|
4413
4437
|
style: n,
|
|
4414
|
-
children: [/* @__PURE__ */ x("thead", { children: j.map((e, t) => /* @__PURE__ */ x(
|
|
4438
|
+
children: [/* @__PURE__ */ x("thead", { children: j.map((e, t) => /* @__PURE__ */ x(Ul, {
|
|
4415
4439
|
rowIndex: t,
|
|
4416
4440
|
isHeader: !0,
|
|
4417
4441
|
row: e,
|
|
@@ -4429,7 +4453,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4429
4453
|
row: r,
|
|
4430
4454
|
rowIndex: n
|
|
4431
4455
|
}) : r;
|
|
4432
|
-
return /* @__PURE__ */ x(
|
|
4456
|
+
return /* @__PURE__ */ x(Ul, {
|
|
4433
4457
|
rowIndex: n,
|
|
4434
4458
|
row: i,
|
|
4435
4459
|
columnCount: M,
|
|
@@ -4446,7 +4470,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4446
4470
|
row: t,
|
|
4447
4471
|
rowIndex: n
|
|
4448
4472
|
}) : t;
|
|
4449
|
-
return /* @__PURE__ */ x(
|
|
4473
|
+
return /* @__PURE__ */ x(Ul, {
|
|
4450
4474
|
rowIndex: n,
|
|
4451
4475
|
row: r,
|
|
4452
4476
|
columnCount: M,
|
|
@@ -4469,14 +4493,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4469
4493
|
})
|
|
4470
4494
|
]
|
|
4471
4495
|
});
|
|
4472
|
-
},
|
|
4496
|
+
}, Yl = "blank", Xl = 1e4, Zl = (e, t, n, r) => {
|
|
4473
4497
|
let i = `${t} → ${n}:`, a = e.filter((e) => !e.startsWith(i)), o = r ? [...a, `${i} ${r}`] : a;
|
|
4474
4498
|
return {
|
|
4475
4499
|
updatedErrors: o,
|
|
4476
4500
|
isValid: o.length === 0
|
|
4477
4501
|
};
|
|
4478
|
-
},
|
|
4479
|
-
let i = m(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, o] = _(
|
|
4502
|
+
}, Ql = 20, $l = 1, eu = ({ validationRules: e, parsedResult: t, updateState: n, testId: r }) => {
|
|
4503
|
+
let i = m(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, o] = _(Ql), [s, c] = _($l), u = g([]), f = (s - 1) * a, p = a === 0 ? t.rows.length : f + a, [h, v] = _([]), y = m(() => {
|
|
4480
4504
|
let n = e.filter((e) => !e.optionalColumn);
|
|
4481
4505
|
return t.fields.length === n.length ? n : e;
|
|
4482
4506
|
}, [e, t.fields.length]), b = l((e, r) => (!u.current.length && t.rows.length && (u.current = t.rows[0].map((e) => Vc(e) ? "NumberInput" : "Input")), {
|
|
@@ -4490,7 +4514,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4490
4514
|
disableValidationOnFocus: !0,
|
|
4491
4515
|
error: x,
|
|
4492
4516
|
validationCallback: (e, i) => {
|
|
4493
|
-
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } =
|
|
4517
|
+
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } = Zl(t.errors, a, e, i);
|
|
4494
4518
|
n({ parsedResult: {
|
|
4495
4519
|
...t,
|
|
4496
4520
|
errors: o,
|
|
@@ -4499,7 +4523,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4499
4523
|
},
|
|
4500
4524
|
onChange: (e) => {
|
|
4501
4525
|
var i;
|
|
4502
|
-
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } =
|
|
4526
|
+
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } = Zl(t.errors, s, m, c), d = t.rows.map((e, t) => t === r ? e.map((e, t) => t === a ? o : e) : e);
|
|
4503
4527
|
n({ parsedResult: {
|
|
4504
4528
|
...t,
|
|
4505
4529
|
rows: d,
|
|
@@ -4541,7 +4565,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4541
4565
|
]);
|
|
4542
4566
|
let S = m(() => t.fields.map((e, r) => {
|
|
4543
4567
|
var a, o, s;
|
|
4544
|
-
let c = y == null ? void 0 : y[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => xn(e) ===
|
|
4568
|
+
let c = y == null ? void 0 : y[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => xn(e) === Yl);
|
|
4545
4569
|
if (!l.length || u) return {};
|
|
4546
4570
|
let d = t == null || (a = t.units) == null ? void 0 : a[r], f = xn(d), p = l != null && l.some((e) => xn(e) === f) ? d : (o = c == null ? void 0 : c.defaultUnit) == null ? "" : o;
|
|
4547
4571
|
return {
|
|
@@ -4589,7 +4613,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4589
4613
|
b,
|
|
4590
4614
|
f
|
|
4591
4615
|
]);
|
|
4592
|
-
return /* @__PURE__ */ x(
|
|
4616
|
+
return /* @__PURE__ */ x(Jl, {
|
|
4593
4617
|
beforeRenderRow: E,
|
|
4594
4618
|
onListReorder: ({ from: e, to: r }) => {
|
|
4595
4619
|
let i = [...t.rows], [a] = i.splice(e, 1);
|
|
@@ -4652,7 +4676,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4652
4676
|
} }
|
|
4653
4677
|
}
|
|
4654
4678
|
});
|
|
4655
|
-
},
|
|
4679
|
+
}, tu = { listStyle: "_listStyle_yjfjw_1" }, nu = ({ errors: e, t }) => {
|
|
4656
4680
|
var n;
|
|
4657
4681
|
let r = (n = [...e]) == null ? void 0 : n.sort((e, t) => {
|
|
4658
4682
|
let n = (e) => {
|
|
@@ -4668,18 +4692,18 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4668
4692
|
content: t("unableToImportPleaseCorrectError", { rows: e == null ? void 0 : e.length }),
|
|
4669
4693
|
type: "Error",
|
|
4670
4694
|
details: /* @__PURE__ */ x("ul", {
|
|
4671
|
-
className:
|
|
4695
|
+
className: tu.listStyle,
|
|
4672
4696
|
children: r.map((e, t) => /* @__PURE__ */ x("li", { children: e }, t))
|
|
4673
4697
|
})
|
|
4674
4698
|
};
|
|
4675
|
-
},
|
|
4699
|
+
}, ru = ({ errors: e, t }) => e.length ? /* @__PURE__ */ x(Bs, { message: nu({
|
|
4676
4700
|
errors: e,
|
|
4677
4701
|
t
|
|
4678
|
-
}) }) : null,
|
|
4702
|
+
}) }) : null, iu = {
|
|
4679
4703
|
empty: "_empty_fe425_1",
|
|
4680
4704
|
text: "_text_fe425_11"
|
|
4681
|
-
},
|
|
4682
|
-
className:
|
|
4705
|
+
}, au = ({ width: e = "auto", height: t = "auto", text: n = "No data", children: r, testId: i }) => /* @__PURE__ */ S("div", {
|
|
4706
|
+
className: iu.empty,
|
|
4683
4707
|
style: {
|
|
4684
4708
|
width: e,
|
|
4685
4709
|
height: t
|
|
@@ -4715,7 +4739,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4715
4739
|
})
|
|
4716
4740
|
}),
|
|
4717
4741
|
n !== "" && /* @__PURE__ */ x("div", {
|
|
4718
|
-
className:
|
|
4742
|
+
className: iu.text,
|
|
4719
4743
|
children: /* @__PURE__ */ x(Uo, {
|
|
4720
4744
|
faint: !0,
|
|
4721
4745
|
children: n
|
|
@@ -4723,52 +4747,52 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4723
4747
|
}),
|
|
4724
4748
|
r
|
|
4725
4749
|
]
|
|
4726
|
-
}),
|
|
4750
|
+
}), ou = (e) => {
|
|
4727
4751
|
var t;
|
|
4728
4752
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4729
4753
|
let t = e == null ? void 0 : e.match(/[.,]/g);
|
|
4730
4754
|
return t && t.length > 1;
|
|
4731
4755
|
});
|
|
4732
|
-
},
|
|
4756
|
+
}, su = (e) => {
|
|
4733
4757
|
var t;
|
|
4734
4758
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4735
4759
|
var t;
|
|
4736
4760
|
return !(e != null && e.includes(".")) && (e == null || (t = e.match(/,/g)) == null ? void 0 : t.length) === 1;
|
|
4737
4761
|
});
|
|
4738
|
-
},
|
|
4762
|
+
}, cu = (e, t, n) => e >= t - n, lu = (e) => !!e && e !== "blank" && e.trim() !== "", uu = (e, t, n, r, i, a, o) => {
|
|
4739
4763
|
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;
|
|
4740
|
-
if (i && !
|
|
4764
|
+
if (i && !cu(e.length, l, c) && s.push(o("incorrectNumberOfFieldNameHeaderColumns", { expectedLengthMessage: u })), a) {
|
|
4741
4765
|
var f, p;
|
|
4742
4766
|
let e = r.filter((e) => {
|
|
4743
4767
|
var t;
|
|
4744
|
-
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(
|
|
4768
|
+
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(lu));
|
|
4745
4769
|
}).length;
|
|
4746
|
-
|
|
4770
|
+
cu(t == null || (f = t.filter(lu)) == 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 }));
|
|
4747
4771
|
}
|
|
4748
4772
|
return n.length === 0 ? s.push(o("incorrectNumberOfDataColumns", {
|
|
4749
4773
|
expectedLengthMessage: u,
|
|
4750
4774
|
dataRowStartIndex: d
|
|
4751
4775
|
})) : n.forEach((e, t) => {
|
|
4752
|
-
|
|
4776
|
+
cu(e.length, l, c) || s.push(o("incorrectNumberOfDataColumns", {
|
|
4753
4777
|
expectedLengthMessage: u,
|
|
4754
4778
|
dataRowStartIndex: d + t
|
|
4755
4779
|
}));
|
|
4756
4780
|
}), s;
|
|
4757
|
-
},
|
|
4781
|
+
}, du = (e) => e.toUpperCase().replace(/\(.*?\)/g, "").replace(/[^A-Z0-9]/g, "").trim(), fu = ({ value: e, defaultAllowedValues: t }) => {
|
|
4758
4782
|
var n;
|
|
4759
|
-
let r =
|
|
4760
|
-
return (n = t == null ? void 0 : t.some((e) =>
|
|
4761
|
-
},
|
|
4783
|
+
let r = du(e);
|
|
4784
|
+
return (n = t == null ? void 0 : t.some((e) => du(e).includes(r) || r.includes(du(e)))) != null && n;
|
|
4785
|
+
}, pu = ({ value: e, defaultAllowedValues: t }) => {
|
|
4762
4786
|
var n;
|
|
4763
4787
|
return (n = t == null ? void 0 : t.includes(e)) != null && n;
|
|
4764
|
-
},
|
|
4788
|
+
}, mu = (e, t, n, r, i, a) => {
|
|
4765
4789
|
let o = [];
|
|
4766
4790
|
if (r) {
|
|
4767
4791
|
let r = n.map((e) => e.fieldName).filter(Boolean);
|
|
4768
4792
|
e.forEach((i, s) => {
|
|
4769
4793
|
var c, l;
|
|
4770
4794
|
let u = n[s];
|
|
4771
|
-
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ?
|
|
4795
|
+
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ? fu : c)({
|
|
4772
4796
|
value: i,
|
|
4773
4797
|
defaultAllowedValues: r,
|
|
4774
4798
|
columnIndex: s,
|
|
@@ -4790,7 +4814,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4790
4814
|
var l, u;
|
|
4791
4815
|
let d = n[c];
|
|
4792
4816
|
if (!d || d != null && d.optionalColumn) return;
|
|
4793
|
-
let f = (l = d.unitsValidator) == null ?
|
|
4817
|
+
let f = (l = d.unitsValidator) == null ? pu : l, p = (u = i == null ? void 0 : i[c]) == null ? [] : u;
|
|
4794
4818
|
f({
|
|
4795
4819
|
value: r,
|
|
4796
4820
|
defaultAllowedValues: p,
|
|
@@ -4806,7 +4830,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4806
4830
|
});
|
|
4807
4831
|
}
|
|
4808
4832
|
return o;
|
|
4809
|
-
},
|
|
4833
|
+
}, hu = (e, t, n) => {
|
|
4810
4834
|
let r = [];
|
|
4811
4835
|
return e.forEach((e, i) => {
|
|
4812
4836
|
e.forEach((e, a) => {
|
|
@@ -4819,91 +4843,91 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4819
4843
|
})}`);
|
|
4820
4844
|
});
|
|
4821
4845
|
}), r;
|
|
4822
|
-
},
|
|
4823
|
-
let s =
|
|
4824
|
-
return s.length === 0 && (s = s.concat(
|
|
4846
|
+
}, gu = (e, t, n, r, i, a, o) => {
|
|
4847
|
+
let s = uu(e, t, n, r, i, a, o);
|
|
4848
|
+
return s.length === 0 && (s = s.concat(mu(e, t, r, i, a, o), hu(n, r, o))), {
|
|
4825
4849
|
isValid: s.length === 0,
|
|
4826
4850
|
errors: s
|
|
4827
4851
|
};
|
|
4828
|
-
},
|
|
4852
|
+
}, _u = (e, t, n) => {
|
|
4829
4853
|
var r, i, a, o, s, c, l, u, d, f, p, m, h, g;
|
|
4830
4854
|
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;
|
|
4831
4855
|
return {
|
|
4832
4856
|
hasFieldNameHeader: b || v && !x && !C || v && y && !C,
|
|
4833
4857
|
hasUnitHeader: x || S || v && y && !x && !C && !w || v && y && !C && !w
|
|
4834
4858
|
};
|
|
4835
|
-
},
|
|
4859
|
+
}, vu = (e, { validationRules: t }) => {
|
|
4836
4860
|
var n, r, i;
|
|
4837
4861
|
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) => {
|
|
4838
4862
|
var t;
|
|
4839
4863
|
return (t = e == null ? void 0 : e.defaultUnit) == null ? s(e == null ? void 0 : e.validUnits) : t;
|
|
4840
|
-
}), { hasFieldNameHeader: l, hasUnitHeader: u } =
|
|
4864
|
+
}), { hasFieldNameHeader: l, hasUnitHeader: u } = _u(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());
|
|
4841
4865
|
return l || e == null || e.unshift(o), u || e == null || e.splice(1, 0, c), {
|
|
4842
4866
|
hasFieldNameHeader: l,
|
|
4843
4867
|
hasUnitHeader: u
|
|
4844
4868
|
};
|
|
4845
|
-
},
|
|
4869
|
+
}, yu = (e) => Math.round(e * 100) / 100, bu = (e) => e.join(", ").replace(/,\s*$/, ""), xu = {
|
|
4846
4870
|
skipEmptyLines: !0,
|
|
4847
4871
|
delimiter: (e) => {
|
|
4848
4872
|
var t, n;
|
|
4849
4873
|
let r = e.substring(0, 200), i = ((t = r.match(/\t/g)) == null ? [] : t).length, a = ((n = r.match(/;/g)) == null ? [] : n).length;
|
|
4850
4874
|
return i === 0 && a === 0 ? "," : i > a ? " " : ";";
|
|
4851
4875
|
}
|
|
4852
|
-
},
|
|
4876
|
+
}, Su = [
|
|
4853
4877
|
"text/csv",
|
|
4854
4878
|
"text/plain",
|
|
4855
4879
|
"application/json",
|
|
4856
4880
|
"application/vnd.ms-excel"
|
|
4857
|
-
],
|
|
4881
|
+
], Cu = (e) => Su.includes(e.type), wu = (e) => e instanceof File, Tu = (e) => e.trim().startsWith("["), Eu = (e) => {
|
|
4858
4882
|
try {
|
|
4859
4883
|
var t;
|
|
4860
4884
|
return !!((t = JSON.parse(e)) != null && t.path);
|
|
4861
4885
|
} catch {
|
|
4862
4886
|
return !1;
|
|
4863
4887
|
}
|
|
4864
|
-
},
|
|
4888
|
+
}, Du = (e) => new Promise((t, n) => {
|
|
4865
4889
|
let r = new FileReader();
|
|
4866
4890
|
r.onload = () => t(String(r.result)), r.onerror = n, r.readAsText(e);
|
|
4867
|
-
}),
|
|
4891
|
+
}), Ou = async (e, t, n) => {
|
|
4868
4892
|
try {
|
|
4869
|
-
return
|
|
4893
|
+
return Fu({
|
|
4870
4894
|
data: JSON.parse(e),
|
|
4871
4895
|
errors: []
|
|
4872
4896
|
}, t, n);
|
|
4873
4897
|
} catch (e) {
|
|
4874
4898
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4875
4899
|
}
|
|
4876
|
-
},
|
|
4900
|
+
}, ku = async (e, t, n) => {
|
|
4877
4901
|
try {
|
|
4878
4902
|
let r = JSON.parse(e).path.map((e) => [
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4903
|
+
yu(e.md),
|
|
4904
|
+
yu(e.inclination),
|
|
4905
|
+
yu(e.gridAzimuth)
|
|
4882
4906
|
]);
|
|
4883
4907
|
return r.unshift([
|
|
4884
4908
|
"m",
|
|
4885
4909
|
"deg",
|
|
4886
4910
|
"deg"
|
|
4887
|
-
]),
|
|
4911
|
+
]), Fu({
|
|
4888
4912
|
data: r,
|
|
4889
4913
|
errors: []
|
|
4890
4914
|
}, t, n);
|
|
4891
4915
|
} catch (e) {
|
|
4892
4916
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4893
4917
|
}
|
|
4894
|
-
},
|
|
4918
|
+
}, Au = (e) => e.replace(",", "."), ju = (e) => e.map((e) => e.map((e) => Au(e))), Mu = (e, { importLimit: t, ...n }, r) => new Promise((i) => {
|
|
4895
4919
|
zr.parse(e, {
|
|
4896
|
-
...
|
|
4920
|
+
...xu,
|
|
4897
4921
|
preview: t,
|
|
4898
4922
|
complete: (e) => {
|
|
4899
|
-
let a =
|
|
4923
|
+
let a = Fu(e, {
|
|
4900
4924
|
importLimit: t,
|
|
4901
4925
|
...n
|
|
4902
4926
|
}, r);
|
|
4903
|
-
a.rows =
|
|
4927
|
+
a.rows = ju(a.rows), i(a);
|
|
4904
4928
|
}
|
|
4905
4929
|
});
|
|
4906
|
-
}),
|
|
4930
|
+
}), Nu = async (e, t, n) => {
|
|
4907
4931
|
let r = {
|
|
4908
4932
|
isValid: !1,
|
|
4909
4933
|
fields: [],
|
|
@@ -4912,13 +4936,13 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4912
4936
|
errors: []
|
|
4913
4937
|
};
|
|
4914
4938
|
try {
|
|
4915
|
-
if (
|
|
4916
|
-
let i =
|
|
4917
|
-
return
|
|
4939
|
+
if (wu(e) && !Cu(e)) return r.errors.push(`${n("wrongFileFormatExpectedOneOf")} ${bu(Array.from(Su))}`), r;
|
|
4940
|
+
let i = wu(e) ? await Du(e) : e;
|
|
4941
|
+
return Tu(i) ? await Ou(i, t, n) : Eu(i) ? await ku(i, t, n) : await Mu(e, t, n);
|
|
4918
4942
|
} catch (e) {
|
|
4919
4943
|
return r.errors.push(e.message), r;
|
|
4920
4944
|
}
|
|
4921
|
-
},
|
|
4945
|
+
}, Pu = (e, t, n, r) => {
|
|
4922
4946
|
var i;
|
|
4923
4947
|
let a = (i = r == null ? void 0 : r.delimiter) == null ? "," : i, o = [
|
|
4924
4948
|
e,
|
|
@@ -4930,7 +4954,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4930
4954
|
header: !0,
|
|
4931
4955
|
delimiter: a
|
|
4932
4956
|
});
|
|
4933
|
-
},
|
|
4957
|
+
}, Fu = (e, t, n) => {
|
|
4934
4958
|
let { data: r, errors: i } = e, a = {
|
|
4935
4959
|
isValid: !1,
|
|
4936
4960
|
fields: [],
|
|
@@ -4939,22 +4963,22 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4939
4963
|
errors: i.map((e) => e.message)
|
|
4940
4964
|
};
|
|
4941
4965
|
if (i.length > 0) return a;
|
|
4942
|
-
let { hasFieldNameHeader: o, hasUnitHeader: s } =
|
|
4966
|
+
let { hasFieldNameHeader: o, hasUnitHeader: s } = vu(r, t);
|
|
4943
4967
|
a.fields = r[0].map((e) => e.trim()), a.units = r[1].map((e) => e.trim()).filter(Boolean), a.rows = r.slice(2);
|
|
4944
4968
|
let { validationRules: c } = t;
|
|
4945
4969
|
if (c.length) {
|
|
4946
|
-
let { isValid: e, errors: t } =
|
|
4970
|
+
let { isValid: e, errors: t } = gu(a.fields, a.units, a.rows, c, o, s, n);
|
|
4947
4971
|
a.errors.push(...t), a.isValid = e && t.length === 0;
|
|
4948
4972
|
} else a.isValid = a.errors.length === 0;
|
|
4949
4973
|
return a;
|
|
4950
|
-
},
|
|
4974
|
+
}, Iu = .001, Lu = 0, Ru = (e, t) => e.every((e) => {
|
|
4951
4975
|
let n = e[t];
|
|
4952
4976
|
return n !== void 0 && n.trim() !== "" && un(hr(n));
|
|
4953
|
-
}),
|
|
4977
|
+
}), zu = (e, t = {}) => {
|
|
4954
4978
|
var n, r;
|
|
4955
|
-
let { independentColumnIndex: i =
|
|
4956
|
-
if (e.length <= 2 || !
|
|
4957
|
-
let s = (n = (r = Hr(e, (e) => e.length)) == null ? void 0 : r.length) == null ? 0 : n, c = Wr(a == null ? Ur(s) : a).filter((t) => t !== i &&
|
|
4979
|
+
let { independentColumnIndex: i = Lu, dependentColumnIndexes: a, tolerance: o = Iu } = t;
|
|
4980
|
+
if (e.length <= 2 || !Ru(e, i)) return e.slice();
|
|
4981
|
+
let s = (n = (r = Hr(e, (e) => e.length)) == null ? void 0 : r.length) == null ? 0 : n, c = Wr(a == null ? Ur(s) : a).filter((t) => t !== i && Ru(e, t));
|
|
4958
4982
|
if (c.length === 0) return e.slice();
|
|
4959
4983
|
let l = /* @__PURE__ */ new Set();
|
|
4960
4984
|
for (let t of c) {
|
|
@@ -4968,7 +4992,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
4968
4992
|
}
|
|
4969
4993
|
}
|
|
4970
4994
|
return e.filter((e, t) => l.has(t));
|
|
4971
|
-
},
|
|
4995
|
+
}, Bu = ({ id: e, message: t = {
|
|
4972
4996
|
type: Ps.INFO,
|
|
4973
4997
|
content: ""
|
|
4974
4998
|
}, autoClose: n = 6e3, onClose: r }) => {
|
|
@@ -5009,13 +5033,13 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5009
5033
|
transition: Gr,
|
|
5010
5034
|
type: s
|
|
5011
5035
|
});
|
|
5012
|
-
},
|
|
5036
|
+
}, Vu = (e) => {
|
|
5013
5037
|
qr.dismiss(e);
|
|
5014
|
-
},
|
|
5038
|
+
}, Hu = (e, t) => {
|
|
5015
5039
|
t(() => {
|
|
5016
|
-
|
|
5040
|
+
Bu({ ...e });
|
|
5017
5041
|
});
|
|
5018
|
-
},
|
|
5042
|
+
}, Uu = {
|
|
5019
5043
|
inputInTable: "_inputInTable_h6wco_1",
|
|
5020
5044
|
inputHover: "_inputHover_h6wco_13",
|
|
5021
5045
|
inputFocus: "_inputFocus_h6wco_18",
|
|
@@ -5031,7 +5055,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5031
5055
|
control: "_control_h6wco_25",
|
|
5032
5056
|
labelText: "_labelText_h6wco_137",
|
|
5033
5057
|
noMargin: "_noMargin_h6wco_201"
|
|
5034
|
-
},
|
|
5058
|
+
}, Wu = ({ 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 = _i.CAPITALIZE }) => {
|
|
5035
5059
|
let p = u(W), m = l || d;
|
|
5036
5060
|
return /* @__PURE__ */ S(Yr, {
|
|
5037
5061
|
name: e,
|
|
@@ -5044,14 +5068,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5044
5068
|
value: t
|
|
5045
5069
|
} });
|
|
5046
5070
|
},
|
|
5047
|
-
className: y(
|
|
5071
|
+
className: y(Uu.toggleContainer, s && Uu.noMargin),
|
|
5048
5072
|
style: { display: i },
|
|
5049
5073
|
"data-testid": c ? `${c}-field` : void 0,
|
|
5050
5074
|
children: [/* @__PURE__ */ S(Jr, {
|
|
5051
|
-
className: y(
|
|
5075
|
+
className: y(Uu.toggle, a && Uu.small, !t && Uu.noLabel),
|
|
5052
5076
|
"data-testid": c,
|
|
5053
|
-
children: [/* @__PURE__ */ x("span", { className:
|
|
5054
|
-
className:
|
|
5077
|
+
children: [/* @__PURE__ */ x("span", { className: Uu.control }), t && /* @__PURE__ */ x("span", {
|
|
5078
|
+
className: Uu.labelText,
|
|
5055
5079
|
style: { textTransform: f },
|
|
5056
5080
|
children: t
|
|
5057
5081
|
})]
|
|
@@ -5060,7 +5084,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5060
5084
|
onClick: d
|
|
5061
5085
|
})]
|
|
5062
5086
|
});
|
|
5063
|
-
},
|
|
5087
|
+
}, Gu = ({ 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 }) => {
|
|
5064
5088
|
let { modalVisibility: { reviewPasteModal: m, pasteModalHelpVisible: h, helpModal: v } } = t, { warningMessage: y, actionButtonLabel: C, changeRulesAction: w, checkPrevalidationNeed: T } = c == null ? {} : c, E = g(null), [D, O] = _(!1), [k, A] = _({
|
|
5065
5089
|
pastedText: "",
|
|
5066
5090
|
parsedResult: {
|
|
@@ -5081,10 +5105,10 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5081
5105
|
let { pastedText: j, parsedResult: M } = k, N = l((t) => {
|
|
5082
5106
|
if (t) {
|
|
5083
5107
|
var n, r;
|
|
5084
|
-
let t =
|
|
5108
|
+
let t = zu(M.rows, e.downsampleConfig), i = {
|
|
5085
5109
|
validationRules: o,
|
|
5086
|
-
importLimit: (n = e.importLimit) == null ?
|
|
5087
|
-
}, a =
|
|
5110
|
+
importLimit: (n = e.importLimit) == null ? Xl : n
|
|
5111
|
+
}, a = Pu(M.fields, (r = M.units) == null ? [] : r, t, i);
|
|
5088
5112
|
f(() => A({
|
|
5089
5113
|
parsedResult: {
|
|
5090
5114
|
...M,
|
|
@@ -5117,17 +5141,17 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5117
5141
|
}, F = () => {
|
|
5118
5142
|
r("helpModal", !v);
|
|
5119
5143
|
}, I = () => {
|
|
5120
|
-
n(k), s(k.parsedResult), i(),
|
|
5144
|
+
n(k), s(k.parsedResult), i(), Hu({ message: {
|
|
5121
5145
|
type: "Success",
|
|
5122
5146
|
content: u("pasteSuccessful")
|
|
5123
5147
|
} }, f);
|
|
5124
|
-
}, L = T && T(M), { isValid: R, errors: z } = M, B = z.length, ee = j === "", te =
|
|
5148
|
+
}, L = T && T(M), { isValid: R, errors: z } = M, B = z.length, ee = j === "", te = su(j), ne = ou(j), V = /* @__PURE__ */ S(b, { children: [
|
|
5125
5149
|
/* @__PURE__ */ S("div", {
|
|
5126
5150
|
className: Ms.headerContainer,
|
|
5127
5151
|
children: [
|
|
5128
5152
|
/* @__PURE__ */ x(K, {
|
|
5129
5153
|
text: u("downsampleTooltip"),
|
|
5130
|
-
children: /* @__PURE__ */ x(
|
|
5154
|
+
children: /* @__PURE__ */ x(Wu, {
|
|
5131
5155
|
label: u("downsampled"),
|
|
5132
5156
|
checked: D,
|
|
5133
5157
|
onChange: () => N(!D),
|
|
@@ -5160,7 +5184,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5160
5184
|
}),
|
|
5161
5185
|
ee ? /* @__PURE__ */ x("div", {
|
|
5162
5186
|
className: Ms.resultContainer,
|
|
5163
|
-
children: /* @__PURE__ */ x(
|
|
5187
|
+
children: /* @__PURE__ */ x(au, {
|
|
5164
5188
|
text: null,
|
|
5165
5189
|
children: /* @__PURE__ */ S("div", {
|
|
5166
5190
|
className: Ms.emptyState,
|
|
@@ -5196,7 +5220,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5196
5220
|
}) : /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("div", {
|
|
5197
5221
|
className: Ms.messagesContainer,
|
|
5198
5222
|
children: [
|
|
5199
|
-
B ? /* @__PURE__ */ x(
|
|
5223
|
+
B ? /* @__PURE__ */ x(ru, {
|
|
5200
5224
|
errors: z,
|
|
5201
5225
|
t: u
|
|
5202
5226
|
}) : null,
|
|
@@ -5219,7 +5243,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5219
5243
|
type: "Warning"
|
|
5220
5244
|
} })
|
|
5221
5245
|
]
|
|
5222
|
-
}), /* @__PURE__ */ x(
|
|
5246
|
+
}), /* @__PURE__ */ x(eu, {
|
|
5223
5247
|
validationRules: o,
|
|
5224
5248
|
parsedResult: M,
|
|
5225
5249
|
updateState: (e) => A((t) => ({
|
|
@@ -5261,7 +5285,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5261
5285
|
onClose: i
|
|
5262
5286
|
} })
|
|
5263
5287
|
});
|
|
5264
|
-
},
|
|
5288
|
+
}, Ku = ({ modals: e = [], modalVisibility: t, onCloseModal: r, testId: i }) => e.length ? /* @__PURE__ */ x(b, { children: e.map(({ name: e, component: a, props: o = {} }) => {
|
|
5265
5289
|
var s;
|
|
5266
5290
|
return /* @__PURE__ */ x(n, { children: /* @__PURE__ */ x(a, {
|
|
5267
5291
|
testId: `${i}-modal-render-${e}`,
|
|
@@ -5269,7 +5293,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5269
5293
|
onClose: () => r({ name: e }),
|
|
5270
5294
|
...o
|
|
5271
5295
|
}) }, e);
|
|
5272
|
-
}) }) : null,
|
|
5296
|
+
}) }) : null, qu = ({ sections: e, iconName: t, testId: n, tooltip: r }) => /* @__PURE__ */ x(Va, {
|
|
5273
5297
|
loading: !0,
|
|
5274
5298
|
menu: {
|
|
5275
5299
|
component: /* @__PURE__ */ x(q, {
|
|
@@ -5285,18 +5309,18 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5285
5309
|
sections: e
|
|
5286
5310
|
},
|
|
5287
5311
|
testId: n
|
|
5288
|
-
}),
|
|
5312
|
+
}), Ju = (e, t, n) => l(async () => {
|
|
5289
5313
|
if (n) try {
|
|
5290
5314
|
return await n();
|
|
5291
5315
|
} catch (t) {
|
|
5292
|
-
console.error("beforeExportData failed", t),
|
|
5316
|
+
console.error("beforeExportData failed", t), Bu({ message: {
|
|
5293
5317
|
type: "Error",
|
|
5294
5318
|
content: e("unableToPrepareExportData")
|
|
5295
5319
|
} });
|
|
5296
5320
|
return;
|
|
5297
5321
|
}
|
|
5298
5322
|
return t;
|
|
5299
|
-
}, [t, n]),
|
|
5323
|
+
}, [t, n]), Yu = {
|
|
5300
5324
|
cancel: "Cancel",
|
|
5301
5325
|
chooseFile: "Choose file",
|
|
5302
5326
|
copyDecimalComma: "Copy (decimal comma)",
|
|
@@ -5355,26 +5379,26 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5355
5379
|
smartUpload_description: "Upload image and extract table content using a LLM",
|
|
5356
5380
|
smartUpload_smartUpload: "Smart Upload",
|
|
5357
5381
|
toUploadOrImportFromClipboardMessage: "To upload or import from clipboard please select your preferred unit in the table header and upload or paste numbers only for Depth, Inc, Azi. Follow example below"
|
|
5358
|
-
},
|
|
5359
|
-
let t = Object.keys(
|
|
5360
|
-
let r =
|
|
5382
|
+
}, Xu = (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])), Zu = (e) => m(() => {
|
|
5383
|
+
let t = Object.keys(Yu).reduce((t, n) => {
|
|
5384
|
+
let r = Yu == null ? void 0 : Yu[n], i = e == null ? void 0 : e[n];
|
|
5361
5385
|
return t[n] = i == null ? r : i, t;
|
|
5362
5386
|
}, {});
|
|
5363
5387
|
return (e, n) => {
|
|
5364
5388
|
let r = t[e];
|
|
5365
|
-
return n ?
|
|
5389
|
+
return n ? Xu(r, n) : r;
|
|
5366
5390
|
};
|
|
5367
|
-
}, [e]),
|
|
5391
|
+
}, [e]), Qu = /^\s*-?\d+(?:[.,]\d+)?(?:e[+-]?\d+)?\s*$/i, $u = (e) => {
|
|
5368
5392
|
var t;
|
|
5369
5393
|
return {
|
|
5370
5394
|
...e,
|
|
5371
5395
|
rows: e == null || (t = e.rows) == null ? void 0 : t.map((e) => e.map((e) => {
|
|
5372
5396
|
let t = String(e == null ? "" : e);
|
|
5373
|
-
return
|
|
5397
|
+
return Qu.test(t) ? Zn(t) : t;
|
|
5374
5398
|
}))
|
|
5375
5399
|
};
|
|
5376
|
-
},
|
|
5377
|
-
let { exportData: a, beforeExportData: o, importLimit: s =
|
|
5400
|
+
}, ed = ({ config: e, state: t, setState: n, smartUploadConfig: r, startTransition: i }) => {
|
|
5401
|
+
let { exportData: a, beforeExportData: o, importLimit: s = Xl, validationRules: c = [], translations: u, onImportComplete: d = () => {}, disablePasteSuccessfulToast: f, prevalidationConfig: p, onDeleteRows: m } = e == null ? {} : e, { parsedResult: h } = t, { checkPrevalidationNeed: g } = p == null ? {} : p, _ = Zu(u), v = Ju(_, a, o), y = l((e) => {
|
|
5378
5402
|
n((t) => ({
|
|
5379
5403
|
...t,
|
|
5380
5404
|
...e
|
|
@@ -5418,9 +5442,9 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5418
5442
|
let t = {
|
|
5419
5443
|
validationRules: c,
|
|
5420
5444
|
importLimit: s
|
|
5421
|
-
}, n =
|
|
5445
|
+
}, n = $u(await Nu(e, t, _));
|
|
5422
5446
|
if (g && g(h)) {
|
|
5423
|
-
let { fields: e, units: r, rows: a } = n, o =
|
|
5447
|
+
let { fields: e, units: r, rows: a } = n, o = Pu(e, r == null ? [] : r, a, t);
|
|
5424
5448
|
return i(() => y({
|
|
5425
5449
|
pastedText: o,
|
|
5426
5450
|
parsedResult: h
|
|
@@ -5446,20 +5470,20 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5446
5470
|
let { fromFile: t, showSuccessToast: n = !0 } = e == null ? {} : e, r;
|
|
5447
5471
|
try {
|
|
5448
5472
|
if (r = t ? await t.text() : await navigator.clipboard.readText(), !r) {
|
|
5449
|
-
|
|
5473
|
+
Hu({ message: {
|
|
5450
5474
|
type: "Error",
|
|
5451
5475
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed")
|
|
5452
5476
|
} }, i);
|
|
5453
5477
|
return;
|
|
5454
5478
|
}
|
|
5455
|
-
let e =
|
|
5479
|
+
let e = $u(await Nu(r, {
|
|
5456
5480
|
validationRules: c,
|
|
5457
5481
|
importLimit: s
|
|
5458
5482
|
}, _));
|
|
5459
|
-
return e != null && e.isValid ||
|
|
5483
|
+
return e != null && e.isValid || Hu({ message: {
|
|
5460
5484
|
type: "Error",
|
|
5461
5485
|
content: _("clipboardReadFailed")
|
|
5462
|
-
} }, i), n &&
|
|
5486
|
+
} }, i), n && Hu({ message: {
|
|
5463
5487
|
type: "Success",
|
|
5464
5488
|
content: _("pasteSuccessful")
|
|
5465
5489
|
} }, i), {
|
|
@@ -5467,7 +5491,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5467
5491
|
parsedResult: e
|
|
5468
5492
|
};
|
|
5469
5493
|
} catch (e) {
|
|
5470
|
-
|
|
5494
|
+
Hu({ message: {
|
|
5471
5495
|
type: "Error",
|
|
5472
5496
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed"),
|
|
5473
5497
|
details: e.message
|
|
@@ -5480,10 +5504,10 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5480
5504
|
let n = e == null || (t = e.target) == null || (t = t.files) == null ? void 0 : t[0];
|
|
5481
5505
|
if (!n) return;
|
|
5482
5506
|
let r = await n.text(), a = await C(r);
|
|
5483
|
-
a.isValid ? (f ||
|
|
5507
|
+
a.isValid ? (f || Hu({ message: {
|
|
5484
5508
|
type: "Success",
|
|
5485
5509
|
content: _("pasteSuccessful")
|
|
5486
|
-
} }, i), i(() => d(a))) :
|
|
5510
|
+
} }, i), i(() => d(a))) : Hu({ message: {
|
|
5487
5511
|
type: "Error",
|
|
5488
5512
|
content: _("fileParsingFailed")
|
|
5489
5513
|
} }, i);
|
|
@@ -5497,7 +5521,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5497
5521
|
try {
|
|
5498
5522
|
let t = await navigator.clipboard.readText();
|
|
5499
5523
|
if (!t) {
|
|
5500
|
-
|
|
5524
|
+
Hu({ message: {
|
|
5501
5525
|
type: "Error",
|
|
5502
5526
|
content: _("clipboardIsEmpty")
|
|
5503
5527
|
} }, i);
|
|
@@ -5505,18 +5529,18 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5505
5529
|
}
|
|
5506
5530
|
let n = await C(t);
|
|
5507
5531
|
if (!n.isValid) {
|
|
5508
|
-
|
|
5532
|
+
Hu({ message: {
|
|
5509
5533
|
type: "Error",
|
|
5510
5534
|
content: _("clipboardReadFailed")
|
|
5511
5535
|
} }, i);
|
|
5512
5536
|
return;
|
|
5513
5537
|
}
|
|
5514
|
-
f ||
|
|
5538
|
+
f || Hu({ message: {
|
|
5515
5539
|
type: "Success",
|
|
5516
5540
|
content: _("pasteSuccessful")
|
|
5517
5541
|
} }, i), e && i(() => d(n));
|
|
5518
5542
|
} catch {
|
|
5519
|
-
|
|
5543
|
+
Hu({ message: {
|
|
5520
5544
|
type: "Error",
|
|
5521
5545
|
content: _("clipboardReadNotAllowed")
|
|
5522
5546
|
} }, i);
|
|
@@ -5531,14 +5555,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5531
5555
|
onClickCopyClipboard: l(async (e) => {
|
|
5532
5556
|
let t = await v();
|
|
5533
5557
|
if (!t) return;
|
|
5534
|
-
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e :
|
|
5558
|
+
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e : Yl).slice(0, n.length), s = (e, t) => t === "comma" ? e.replace(/\./g, ",") : e, c = Pu(n, o, a.map((t) => t.map((t) => Vr(t) ? "" : s(t.toString(), e))), { delimiter: " " });
|
|
5535
5559
|
try {
|
|
5536
|
-
await navigator.clipboard.writeText(c),
|
|
5560
|
+
await navigator.clipboard.writeText(c), Hu({ message: {
|
|
5537
5561
|
type: "Success",
|
|
5538
5562
|
content: _("copiedToClipboard")
|
|
5539
5563
|
} }, i);
|
|
5540
5564
|
} catch (e) {
|
|
5541
|
-
|
|
5565
|
+
Hu({ message: {
|
|
5542
5566
|
type: "Error",
|
|
5543
5567
|
content: _("unableToCopyToClipboard"),
|
|
5544
5568
|
details: e.message
|
|
@@ -5548,14 +5572,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5548
5572
|
onSmartUploadResult: l((e) => {
|
|
5549
5573
|
let t = hn(e) && gn(e.errorMessage) ? e.errorMessage : void 0;
|
|
5550
5574
|
if (t) {
|
|
5551
|
-
|
|
5575
|
+
Hu({ message: {
|
|
5552
5576
|
type: "Error",
|
|
5553
5577
|
content: t || "Smart upload failed."
|
|
5554
5578
|
} }, i);
|
|
5555
5579
|
return;
|
|
5556
5580
|
}
|
|
5557
5581
|
if (!on(e) || e.length < 2 || !rn(e, (e) => hn(e) && rn(wn(e), gn))) {
|
|
5558
|
-
|
|
5582
|
+
Hu({ message: {
|
|
5559
5583
|
type: "Error",
|
|
5560
5584
|
content: "Smart upload returned unexpected format.",
|
|
5561
5585
|
details: JSON.stringify(e)
|
|
@@ -5587,14 +5611,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5587
5611
|
]),
|
|
5588
5612
|
deleteAllRows: x
|
|
5589
5613
|
};
|
|
5590
|
-
},
|
|
5614
|
+
}, td = (e, t) => {
|
|
5591
5615
|
var n, r;
|
|
5592
|
-
let { fields: i, rows: a } = e, o =
|
|
5616
|
+
let { fields: i, rows: a } = e, o = Pu(i, (n = (r = e.units) == null ? void 0 : r.map((e) => e || "blank")) == null ? [] : n, a, { delimiter: " " }), s = new Blob([o], { type: "text/plain" }), c = document.createElement("a");
|
|
5593
5617
|
c.href = window.URL.createObjectURL(s), c.download = `${t}.csv`, document.body.appendChild(c), c.click(), document.body.removeChild(c);
|
|
5594
|
-
},
|
|
5618
|
+
}, nd = (e) => mn(e) && "modalKey" in e, rd = (e, t, n) => tn(e, (e) => {
|
|
5595
5619
|
if (on(e) || !hn(e)) return;
|
|
5596
5620
|
let { modalKey: r } = e == null ? {} : e;
|
|
5597
|
-
if (
|
|
5621
|
+
if (nd(e) && typeof e.onClick != "function") {
|
|
5598
5622
|
let i = () => {
|
|
5599
5623
|
var e;
|
|
5600
5624
|
n(r, !((e = t.modalVisibility) != null && e[r]));
|
|
@@ -5604,7 +5628,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5604
5628
|
onClick: i
|
|
5605
5629
|
};
|
|
5606
5630
|
}
|
|
5607
|
-
}),
|
|
5631
|
+
}), id = (e, t, n) => rd(e, t, n), ad = {
|
|
5608
5632
|
pastedText: "",
|
|
5609
5633
|
parsedResult: {
|
|
5610
5634
|
isValid: !1,
|
|
@@ -5619,9 +5643,9 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5619
5643
|
reviewPasteModal: !1,
|
|
5620
5644
|
helpModal: !1
|
|
5621
5645
|
}
|
|
5622
|
-
},
|
|
5646
|
+
}, od = ({ config: e, smartUploadConfig: t, testId: n }) => {
|
|
5623
5647
|
var r, i, a, o;
|
|
5624
|
-
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: m = !0, copyFromClipBoard: h = !0, showDeleteOptions: g = !0, showHelpOption: y = !0, showUploadFileOption: b = !0, modals: C = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = _(
|
|
5648
|
+
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: y = !0, showUploadFileOption: b = !0, modals: C = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = _(ad), { 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 = Zu(f), L = Ju(I, s, c), [R, z] = v(), B = ed({
|
|
5625
5649
|
config: e,
|
|
5626
5650
|
state: E,
|
|
5627
5651
|
setState: D,
|
|
@@ -5656,14 +5680,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5656
5680
|
onClick: () => V("smartUploadModal", !O),
|
|
5657
5681
|
testId: `${n}-smart-upload`
|
|
5658
5682
|
}] : [],
|
|
5659
|
-
...
|
|
5683
|
+
...id((r = w == null ? void 0 : w.importOptions) == null ? [] : r, E, V)
|
|
5660
5684
|
] : [], le = [
|
|
5661
5685
|
{
|
|
5662
5686
|
type: "Option",
|
|
5663
5687
|
label: I("downloadFile"),
|
|
5664
5688
|
onClick: async () => {
|
|
5665
5689
|
let e = await L();
|
|
5666
|
-
e && e &&
|
|
5690
|
+
e && e && td(e, d);
|
|
5667
5691
|
}
|
|
5668
5692
|
},
|
|
5669
5693
|
...p ? [{
|
|
@@ -5688,20 +5712,20 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5688
5712
|
}]
|
|
5689
5713
|
}
|
|
5690
5714
|
}],
|
|
5691
|
-
...
|
|
5715
|
+
...id((i = w == null ? void 0 : w.exportOptions) == null ? [] : i, E, V)
|
|
5692
5716
|
], ue = g ? [{
|
|
5693
5717
|
type: "Option",
|
|
5694
5718
|
label: I("deleteAllRows"),
|
|
5695
5719
|
onClick: () => se(),
|
|
5696
5720
|
testId: `${n}-delete-all-rows`
|
|
5697
|
-
}, ...
|
|
5721
|
+
}, ...id((a = w == null ? void 0 : w.deleteOptions) == null ? [] : a, E, V)] : [], de = y ? [
|
|
5698
5722
|
{ type: "Divider" },
|
|
5699
5723
|
{
|
|
5700
5724
|
type: "Option",
|
|
5701
5725
|
label: I("help"),
|
|
5702
5726
|
onClick: () => V("helpModal", !A)
|
|
5703
5727
|
},
|
|
5704
|
-
...
|
|
5728
|
+
...id((o = w == null ? void 0 : w.helpOptions) == null ? [] : o, E, V)
|
|
5705
5729
|
] : [], fe = [
|
|
5706
5730
|
...ce.length ? [{
|
|
5707
5731
|
section: [...ce, ...de],
|
|
@@ -5727,13 +5751,13 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5727
5751
|
small: !0,
|
|
5728
5752
|
dark: !0
|
|
5729
5753
|
}),
|
|
5730
|
-
fe.map((e, t) => /* @__PURE__ */ x(
|
|
5754
|
+
fe.map((e, t) => /* @__PURE__ */ x(qu, {
|
|
5731
5755
|
sections: e.section,
|
|
5732
5756
|
iconName: e.iconName,
|
|
5733
5757
|
tooltip: e.tooltip,
|
|
5734
5758
|
testId: `data-${e == null ? void 0 : e.name}-menu`
|
|
5735
5759
|
}, t)),
|
|
5736
|
-
k && /* @__PURE__ */ x(
|
|
5760
|
+
k && /* @__PURE__ */ x(Gu, {
|
|
5737
5761
|
config: e,
|
|
5738
5762
|
state: E,
|
|
5739
5763
|
updateState: te,
|
|
@@ -5769,14 +5793,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5769
5793
|
cancelText: I("cancel"),
|
|
5770
5794
|
testId: n
|
|
5771
5795
|
}),
|
|
5772
|
-
/* @__PURE__ */ x(
|
|
5796
|
+
/* @__PURE__ */ x(Ku, {
|
|
5773
5797
|
modals: C,
|
|
5774
5798
|
modalVisibility: E == null ? void 0 : E.modalVisibility,
|
|
5775
5799
|
onCloseModal: ne,
|
|
5776
5800
|
testId: n
|
|
5777
5801
|
})
|
|
5778
5802
|
] });
|
|
5779
|
-
},
|
|
5803
|
+
}, sd = ({ file: e, accept: t, multi: n, name: r, disabled: i, onChange: a = vn, ...o }) => {
|
|
5780
5804
|
let s = u(W), c = g(null), l = () => {
|
|
5781
5805
|
var e;
|
|
5782
5806
|
i || s || (e = c.current) == null || e.click();
|
|
@@ -5804,12 +5828,12 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5804
5828
|
multiple: n,
|
|
5805
5829
|
onChange: d
|
|
5806
5830
|
})] });
|
|
5807
|
-
},
|
|
5831
|
+
}, cd = {
|
|
5808
5832
|
label: "_label_uxk69_1",
|
|
5809
5833
|
labelLeft: "_labelLeft_uxk69_5",
|
|
5810
5834
|
icons: "_icons_uxk69_13",
|
|
5811
5835
|
small: "_small_uxk69_27"
|
|
5812
|
-
},
|
|
5836
|
+
}, ld = ({ label: e = null, width: t = "auto", helpText: n = "", helpTextMaxWidth: r = "300px", onClickHelp: i = void 0, lock: a = {
|
|
5813
5837
|
visible: !1,
|
|
5814
5838
|
active: !1,
|
|
5815
5839
|
onClick: () => {},
|
|
@@ -5818,14 +5842,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5818
5842
|
}, info: o, libraryIcon: s, labelLeft: c = !1, small: l = !1, textTransform: u = _i.CAPITALIZE }) => {
|
|
5819
5843
|
var d;
|
|
5820
5844
|
return /* @__PURE__ */ x("div", {
|
|
5821
|
-
className: y(
|
|
5845
|
+
className: y(cd.label, c ? cd.labelLeft : "", l ? cd.small : ""),
|
|
5822
5846
|
children: /* @__PURE__ */ S("label", {
|
|
5823
5847
|
style: {
|
|
5824
5848
|
textTransform: u,
|
|
5825
5849
|
width: t || ""
|
|
5826
5850
|
},
|
|
5827
5851
|
children: [e, /* @__PURE__ */ S("div", {
|
|
5828
|
-
className:
|
|
5852
|
+
className: cd.icons,
|
|
5829
5853
|
children: [
|
|
5830
5854
|
(n || i) && /* @__PURE__ */ x(ta, {
|
|
5831
5855
|
text: n,
|
|
@@ -5851,23 +5875,23 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5851
5875
|
})]
|
|
5852
5876
|
})
|
|
5853
5877
|
});
|
|
5854
|
-
},
|
|
5878
|
+
}, ud = {
|
|
5855
5879
|
field: "_field_1xoss_1",
|
|
5856
5880
|
labelLeft: "_labelLeft_1xoss_5",
|
|
5857
5881
|
fieldInput: "_fieldInput_1xoss_9",
|
|
5858
5882
|
formRow: "_formRow_1xoss_12",
|
|
5859
5883
|
"form-row": "_form-row_1xoss_13",
|
|
5860
5884
|
button: "_button_1xoss_22"
|
|
5861
|
-
},
|
|
5885
|
+
}, dd = ({ label: e, labelLeft: t = !1, labelWidth: n = "auto", children: r, helpText: i, helpTextMaxWidth: a = "300px", onClickHelp: o, lock: s = {
|
|
5862
5886
|
visible: !1,
|
|
5863
5887
|
active: !1,
|
|
5864
5888
|
onClick: () => {},
|
|
5865
5889
|
tooltip: "",
|
|
5866
5890
|
testId: void 0
|
|
5867
5891
|
}, info: c, libraryIcon: l, small: u = !1, testId: d, textTransform: f = _i.CAPITALIZE }) => /* @__PURE__ */ S("div", {
|
|
5868
|
-
className: y(
|
|
5892
|
+
className: y(ud.field, t ? ud.labelLeft : ""),
|
|
5869
5893
|
"data-testid": d,
|
|
5870
|
-
children: [(e || t) && /* @__PURE__ */ x(
|
|
5894
|
+
children: [(e || t) && /* @__PURE__ */ x(ld, {
|
|
5871
5895
|
label: e,
|
|
5872
5896
|
width: n,
|
|
5873
5897
|
helpText: i,
|
|
@@ -5880,10 +5904,10 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5880
5904
|
small: u,
|
|
5881
5905
|
textTransform: f
|
|
5882
5906
|
}), /* @__PURE__ */ x("div", {
|
|
5883
|
-
className:
|
|
5907
|
+
className: ud.fieldInput,
|
|
5884
5908
|
children: r
|
|
5885
5909
|
})]
|
|
5886
|
-
}),
|
|
5910
|
+
}), fd = ({ 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__ */ x("div", {
|
|
5887
5911
|
style: {
|
|
5888
5912
|
display: "flex",
|
|
5889
5913
|
flexDirection: n,
|
|
@@ -5895,8 +5919,8 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5895
5919
|
gap: s === !1 ? 0 : s === !0 ? "var(--padding)" : typeof s == "number" ? `${s}px` : s
|
|
5896
5920
|
},
|
|
5897
5921
|
children: a
|
|
5898
|
-
}),
|
|
5899
|
-
className:
|
|
5922
|
+
}), pd = { formRow: "_formRow_odewu_1" }, md = ({ children: e }) => /* @__PURE__ */ x("div", {
|
|
5923
|
+
className: pd.formRow,
|
|
5900
5924
|
children: e
|
|
5901
5925
|
}), Z = {
|
|
5902
5926
|
inputInTable: "_inputInTable_15rr3_1",
|
|
@@ -5942,15 +5966,15 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5942
5966
|
hideScrollbar: "_hideScrollbar_15rr3_71",
|
|
5943
5967
|
noPointerEvents: "_noPointerEvents_15rr3_313",
|
|
5944
5968
|
virtualRows: "_virtualRows_15rr3_316"
|
|
5945
|
-
},
|
|
5969
|
+
}, hd = ({ toggleNarrow: e, onClickToggleNarrow: t }) => e ? /* @__PURE__ */ x("a", {
|
|
5946
5970
|
className: Z.toggleNarrow,
|
|
5947
5971
|
onClick: t,
|
|
5948
5972
|
children: /* @__PURE__ */ x(G, { icon: U.CHEVRON_LEFT })
|
|
5949
|
-
}) : null,
|
|
5973
|
+
}) : null, gd = o(({ name: e, actions: t = [], toggleNarrow: n = !1, onToggleNarrow: r = () => {}, stickyHeader: i }, a) => /* @__PURE__ */ S("div", {
|
|
5950
5974
|
ref: a,
|
|
5951
5975
|
className: y(Z.header, i ? Z.stickyHeader : ""),
|
|
5952
5976
|
children: [
|
|
5953
|
-
/* @__PURE__ */ x(
|
|
5977
|
+
/* @__PURE__ */ x(hd, {
|
|
5954
5978
|
toggleNarrow: n,
|
|
5955
5979
|
onClickToggleNarrow: r
|
|
5956
5980
|
}),
|
|
@@ -5970,14 +5994,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5970
5994
|
})
|
|
5971
5995
|
})
|
|
5972
5996
|
]
|
|
5973
|
-
})),
|
|
5997
|
+
})), _d = ({ label: e }) => e ? /* @__PURE__ */ x("span", {
|
|
5974
5998
|
className: Z.label,
|
|
5975
5999
|
children: /* @__PURE__ */ x(ka, {
|
|
5976
6000
|
color: e.color,
|
|
5977
6001
|
title: e.value,
|
|
5978
6002
|
small: e.small
|
|
5979
6003
|
})
|
|
5980
|
-
}) : null,
|
|
6004
|
+
}) : null, vd = ({ name: e, icon: t, testId: n }) => {
|
|
5981
6005
|
let r = t && /* @__PURE__ */ x(G, {
|
|
5982
6006
|
icon: t.icon,
|
|
5983
6007
|
color: t.color || "#db2828"
|
|
@@ -5997,8 +6021,8 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
5997
6021
|
children: r
|
|
5998
6022
|
})]
|
|
5999
6023
|
});
|
|
6000
|
-
},
|
|
6001
|
-
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ x(
|
|
6024
|
+
}, yd = ({ item: e }) => {
|
|
6025
|
+
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ x(vd, {
|
|
6002
6026
|
name: t,
|
|
6003
6027
|
icon: n,
|
|
6004
6028
|
testId: o && `${o}-name`
|
|
@@ -6024,10 +6048,10 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6024
6048
|
})
|
|
6025
6049
|
]
|
|
6026
6050
|
});
|
|
6027
|
-
},
|
|
6051
|
+
}, bd = ({ item: e }) => e.metaCount === void 0 ? null : /* @__PURE__ */ x(ka, {
|
|
6028
6052
|
color: "rgba(0,0,0,0.25)",
|
|
6029
6053
|
title: e.metaCount
|
|
6030
|
-
}),
|
|
6054
|
+
}), xd = ({ item: e, expanding: t }) => {
|
|
6031
6055
|
let n = (e) => {
|
|
6032
6056
|
e.preventDefault(), e.stopPropagation();
|
|
6033
6057
|
}, r = !!t && !!e.active && !!e.content;
|
|
@@ -6039,7 +6063,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6039
6063
|
children: e.content
|
|
6040
6064
|
})
|
|
6041
6065
|
});
|
|
6042
|
-
},
|
|
6066
|
+
}, Sd = o(({ item: e, index: t }, n) => {
|
|
6043
6067
|
var r;
|
|
6044
6068
|
let i = u(W), { actions: a, disabled: o, expanded: s, onClick: c, title: l, name: d, icon: f, testId: p } = e;
|
|
6045
6069
|
return /* @__PURE__ */ x("div", {
|
|
@@ -6059,13 +6083,13 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6059
6083
|
className: y(Z.expandIcon, s && Z.expanded),
|
|
6060
6084
|
children: /* @__PURE__ */ x(G, { icon: U.CHEVRON_RIGHT })
|
|
6061
6085
|
}),
|
|
6062
|
-
/* @__PURE__ */ x(
|
|
6086
|
+
/* @__PURE__ */ x(vd, {
|
|
6063
6087
|
name: d,
|
|
6064
6088
|
icon: f
|
|
6065
6089
|
}),
|
|
6066
6090
|
/* @__PURE__ */ S("div", {
|
|
6067
6091
|
className: Z.right,
|
|
6068
|
-
children: [/* @__PURE__ */ x(
|
|
6092
|
+
children: [/* @__PURE__ */ x(bd, { item: e }), !(o || i) && a && /* @__PURE__ */ x("div", {
|
|
6069
6093
|
className: Z.actions,
|
|
6070
6094
|
children: /* @__PURE__ */ x(Ua, { actions: (r = e.actions) == null ? [] : r })
|
|
6071
6095
|
})]
|
|
@@ -6073,7 +6097,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6073
6097
|
]
|
|
6074
6098
|
}) })
|
|
6075
6099
|
});
|
|
6076
|
-
}),
|
|
6100
|
+
}), Cd = o(({ item: e, index: t, expanding: n, invokeEditOnRowClick: r, draggable: i }, a) => {
|
|
6077
6101
|
let o = u(W), s = (e, t, s, c, l, u) => {
|
|
6078
6102
|
let d = t.actions && t.actions.find((e) => {
|
|
6079
6103
|
var t;
|
|
@@ -6109,24 +6133,24 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6109
6133
|
className: Z.indentIcon,
|
|
6110
6134
|
children: /* @__PURE__ */ x(G, { icon: U.INDENT })
|
|
6111
6135
|
}) : null,
|
|
6112
|
-
/* @__PURE__ */ x(
|
|
6113
|
-
/* @__PURE__ */ x(
|
|
6136
|
+
/* @__PURE__ */ x(_d, { label: t.label }),
|
|
6137
|
+
/* @__PURE__ */ x(yd, { item: t }),
|
|
6114
6138
|
/* @__PURE__ */ S("div", {
|
|
6115
6139
|
className: Z.right,
|
|
6116
|
-
children: [/* @__PURE__ */ x(
|
|
6140
|
+
children: [/* @__PURE__ */ x(bd, { item: t }), !(t.disabled || o) && t.actions && /* @__PURE__ */ x("div", {
|
|
6117
6141
|
className: Z.actions,
|
|
6118
6142
|
children: /* @__PURE__ */ x(Ua, { actions: t.actions })
|
|
6119
6143
|
})]
|
|
6120
6144
|
})
|
|
6121
6145
|
]
|
|
6122
|
-
}), /* @__PURE__ */ x(
|
|
6146
|
+
}), /* @__PURE__ */ x(xd, {
|
|
6123
6147
|
item: t,
|
|
6124
6148
|
expanding: n
|
|
6125
6149
|
})]
|
|
6126
6150
|
})
|
|
6127
6151
|
}, e);
|
|
6128
6152
|
};
|
|
6129
|
-
return e.type === "Heading" ? /* @__PURE__ */ x(
|
|
6153
|
+
return e.type === "Heading" ? /* @__PURE__ */ x(Sd, {
|
|
6130
6154
|
ref: a,
|
|
6131
6155
|
item: e,
|
|
6132
6156
|
index: t
|
|
@@ -6141,7 +6165,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6141
6165
|
};
|
|
6142
6166
|
return s(e, t, l, n, r, i);
|
|
6143
6167
|
})(t, e) : s(t, e);
|
|
6144
|
-
}),
|
|
6168
|
+
}), wd = ({ children: e, draggable: t, list: n, onListReorder: r }) => {
|
|
6145
6169
|
let [i, a] = _(null), o = (e) => {
|
|
6146
6170
|
a(e.active.id);
|
|
6147
6171
|
}, s = (e) => {
|
|
@@ -6164,7 +6188,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6164
6188
|
dropAnimation: null,
|
|
6165
6189
|
children: /* @__PURE__ */ x("div", {
|
|
6166
6190
|
className: Z.dragOverlay,
|
|
6167
|
-
children: /* @__PURE__ */ x(
|
|
6191
|
+
children: /* @__PURE__ */ x(Cd, {
|
|
6168
6192
|
draggable: t,
|
|
6169
6193
|
item: n.items[Number(i)],
|
|
6170
6194
|
index: Number(i)
|
|
@@ -6172,7 +6196,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6172
6196
|
})
|
|
6173
6197
|
}), document.body)]
|
|
6174
6198
|
}) : e;
|
|
6175
|
-
},
|
|
6199
|
+
}, Td = ({ items: e, scrollDetails: t, children: n }) => {
|
|
6176
6200
|
let { scrollable: r, hideScrollbar: i, triggerScrollToActiveItem: a, infiniteScroll: o } = t, s = g(null), c = Rr({
|
|
6177
6201
|
count: e.length,
|
|
6178
6202
|
getScrollElement: () => s.current,
|
|
@@ -6205,9 +6229,9 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6205
6229
|
children: n({ virtualizer: c })
|
|
6206
6230
|
})
|
|
6207
6231
|
});
|
|
6208
|
-
},
|
|
6232
|
+
}, Ed = ({ items: e, scrollDetails: t, children: n }) => {
|
|
6209
6233
|
let { scrollable: r, hideScrollbar: i, infiniteScroll: a } = t;
|
|
6210
|
-
return a ? /* @__PURE__ */ x(
|
|
6234
|
+
return a ? /* @__PURE__ */ x(Td, {
|
|
6211
6235
|
items: e,
|
|
6212
6236
|
scrollDetails: t,
|
|
6213
6237
|
children: ({ virtualizer: e }) => n({ virtualizer: e })
|
|
@@ -6218,7 +6242,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6218
6242
|
children: n({})
|
|
6219
6243
|
})
|
|
6220
6244
|
});
|
|
6221
|
-
},
|
|
6245
|
+
}, Dd = ({ 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 = {
|
|
6222
6246
|
scrollable: !1,
|
|
6223
6247
|
hideScrollbar: !1,
|
|
6224
6248
|
triggerScrollToActiveItem: !1,
|
|
@@ -6231,17 +6255,17 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6231
6255
|
marginBottom: d
|
|
6232
6256
|
},
|
|
6233
6257
|
id: "scrollableDiv",
|
|
6234
|
-
children: [!s && /* @__PURE__ */ x(
|
|
6258
|
+
children: [!s && /* @__PURE__ */ x(gd, {
|
|
6235
6259
|
name: e.name,
|
|
6236
6260
|
actions: e.actions,
|
|
6237
6261
|
toggleNarrow: i,
|
|
6238
6262
|
onToggleNarrow: a,
|
|
6239
6263
|
stickyHeader: c
|
|
6240
|
-
}), /* @__PURE__ */ x(
|
|
6264
|
+
}), /* @__PURE__ */ x(wd, {
|
|
6241
6265
|
draggable: l,
|
|
6242
6266
|
list: e,
|
|
6243
6267
|
onListReorder: u,
|
|
6244
|
-
children: /* @__PURE__ */ x(
|
|
6268
|
+
children: /* @__PURE__ */ x(Ed, {
|
|
6245
6269
|
items: e.items,
|
|
6246
6270
|
scrollDetails: m,
|
|
6247
6271
|
children: ({ virtualizer: t }) => t ? t.getVirtualItems().map((r) => /* @__PURE__ */ x("div", {
|
|
@@ -6249,14 +6273,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6249
6273
|
className: Z.virtualRow,
|
|
6250
6274
|
style: { transform: `translateY(${r.start}px)` },
|
|
6251
6275
|
ref: t.measureElement,
|
|
6252
|
-
children: /* @__PURE__ */ x(
|
|
6276
|
+
children: /* @__PURE__ */ x(Cd, {
|
|
6253
6277
|
index: r.index,
|
|
6254
6278
|
draggable: l,
|
|
6255
6279
|
item: e.items[r.index],
|
|
6256
6280
|
expanding: n,
|
|
6257
6281
|
invokeEditOnRowClick: o
|
|
6258
6282
|
})
|
|
6259
|
-
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ x("div", { children: /* @__PURE__ */ x(
|
|
6283
|
+
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ x("div", { children: /* @__PURE__ */ x(Cd, {
|
|
6260
6284
|
index: t,
|
|
6261
6285
|
draggable: l,
|
|
6262
6286
|
item: e,
|
|
@@ -6265,7 +6289,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6265
6289
|
}) }, t))
|
|
6266
6290
|
})
|
|
6267
6291
|
})]
|
|
6268
|
-
}),
|
|
6292
|
+
}), Od = {
|
|
6269
6293
|
loader: "_loader_477i5_1",
|
|
6270
6294
|
fullViewPortSize: "_fullViewPortSize_477i5_7",
|
|
6271
6295
|
cover: "_cover_477i5_14",
|
|
@@ -6273,33 +6297,33 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6273
6297
|
content: "_content_477i5_44",
|
|
6274
6298
|
text: "_text_477i5_49",
|
|
6275
6299
|
details: "_details_477i5_53"
|
|
6276
|
-
},
|
|
6300
|
+
}, kd = ({ width: e, height: t, text: n = "", details: r = "", fullViewPortSize: i = !1, cover: a = !1, children: o = null, theme: s = vi.DARK, testId: c = null }) => {
|
|
6277
6301
|
let l = s === vi.DARK ? vi.WHITE : vi.INHERIT, u = s === "white" ? "var(--color-background-raised)" : s === "light" ? "var(--color-background)" : "black";
|
|
6278
6302
|
return /* @__PURE__ */ x("div", {
|
|
6279
|
-
className: y(
|
|
6303
|
+
className: y(Od.loader, a ? Od.cover : "", { [Od.fullViewPortSize]: i }),
|
|
6280
6304
|
style: {
|
|
6281
6305
|
width: e,
|
|
6282
6306
|
height: t
|
|
6283
6307
|
},
|
|
6284
6308
|
"data-testid": c,
|
|
6285
6309
|
children: /* @__PURE__ */ x("div", {
|
|
6286
|
-
className:
|
|
6310
|
+
className: Od.dimmer,
|
|
6287
6311
|
style: {
|
|
6288
6312
|
background: u,
|
|
6289
6313
|
color: l
|
|
6290
6314
|
},
|
|
6291
6315
|
children: /* @__PURE__ */ S("div", {
|
|
6292
|
-
className:
|
|
6316
|
+
className: Od.content,
|
|
6293
6317
|
"data-testid": c && `${c}-content`,
|
|
6294
6318
|
children: [
|
|
6295
6319
|
o,
|
|
6296
6320
|
n && /* @__PURE__ */ x("div", {
|
|
6297
|
-
className:
|
|
6321
|
+
className: Od.text,
|
|
6298
6322
|
"data-testid": c && `${c}-text`,
|
|
6299
6323
|
children: n
|
|
6300
6324
|
}),
|
|
6301
6325
|
r && /* @__PURE__ */ x("div", {
|
|
6302
|
-
className:
|
|
6326
|
+
className: Od.details,
|
|
6303
6327
|
"data-testid": c && `${c}-details`,
|
|
6304
6328
|
children: r
|
|
6305
6329
|
})
|
|
@@ -6307,15 +6331,15 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6307
6331
|
})
|
|
6308
6332
|
})
|
|
6309
6333
|
});
|
|
6310
|
-
},
|
|
6334
|
+
}, Ad = {
|
|
6311
6335
|
menu: "_menu_12x4u_1",
|
|
6312
6336
|
header: "_header_12x4u_11",
|
|
6313
6337
|
item: "_item_12x4u_27",
|
|
6314
6338
|
heading: "_heading_12x4u_32"
|
|
6315
|
-
},
|
|
6339
|
+
}, jd = ({ option: e, onChange: t }) => {
|
|
6316
6340
|
let { key: n, selected: r, label: i, disabled: a, testId: o, helpText: s, onClickHelp: c, textTransform: l } = e;
|
|
6317
6341
|
return /* @__PURE__ */ x("div", {
|
|
6318
|
-
className:
|
|
6342
|
+
className: Ad.item,
|
|
6319
6343
|
children: /* @__PURE__ */ x(na, {
|
|
6320
6344
|
label: i,
|
|
6321
6345
|
noMargin: !0,
|
|
@@ -6328,21 +6352,21 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6328
6352
|
textTransform: l
|
|
6329
6353
|
})
|
|
6330
6354
|
}, n);
|
|
6331
|
-
},
|
|
6332
|
-
className:
|
|
6355
|
+
}, Md = ({ label: e }) => /* @__PURE__ */ x("div", {
|
|
6356
|
+
className: Ad.heading,
|
|
6333
6357
|
children: e
|
|
6334
|
-
}),
|
|
6358
|
+
}), Nd = /* @__PURE__ */ function(e) {
|
|
6335
6359
|
return e.HEADING = "Heading", e.DIVIDER = "Divider", e.DEFAULT = "Default", e;
|
|
6336
|
-
}({}),
|
|
6337
|
-
className: y("menu",
|
|
6360
|
+
}({}), Pd = (e) => e.type !== Nd.HEADING && e.type !== Nd.DIVIDER && !e.disabled, Fd = ({ options: e, onChangeOptions: t, showHeader: n, maxHeight: r, testId: i }) => /* @__PURE__ */ S("div", {
|
|
6361
|
+
className: y("menu", Ad.menu),
|
|
6338
6362
|
style: { maxHeight: r },
|
|
6339
6363
|
"data-testid": i ? `${i}-option-dropdown-layer` : void 0,
|
|
6340
6364
|
children: [n && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("div", {
|
|
6341
|
-
className:
|
|
6365
|
+
className: Ad.header,
|
|
6342
6366
|
children: [
|
|
6343
6367
|
/* @__PURE__ */ x("a", {
|
|
6344
6368
|
onClick: (n) => {
|
|
6345
|
-
t(n, e.map((e) =>
|
|
6369
|
+
t(n, e.map((e) => Pd(e) ? {
|
|
6346
6370
|
...e,
|
|
6347
6371
|
selected: !0
|
|
6348
6372
|
} : e));
|
|
@@ -6351,7 +6375,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6351
6375
|
}),
|
|
6352
6376
|
/* @__PURE__ */ x("a", {
|
|
6353
6377
|
onClick: (n) => {
|
|
6354
|
-
t(n, e.map((e) =>
|
|
6378
|
+
t(n, e.map((e) => Pd(e) ? {
|
|
6355
6379
|
...e,
|
|
6356
6380
|
selected: !1
|
|
6357
6381
|
} : e));
|
|
@@ -6360,7 +6384,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6360
6384
|
}),
|
|
6361
6385
|
/* @__PURE__ */ x("a", {
|
|
6362
6386
|
onClick: (n) => {
|
|
6363
|
-
t(n, e.map((e) =>
|
|
6387
|
+
t(n, e.map((e) => Pd(e) ? {
|
|
6364
6388
|
...e,
|
|
6365
6389
|
selected: !e.selected
|
|
6366
6390
|
} : e));
|
|
@@ -6370,19 +6394,19 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6370
6394
|
]
|
|
6371
6395
|
}), /* @__PURE__ */ x(Go, { margin: 0 })] }), e.map((n, r) => {
|
|
6372
6396
|
switch (n.type) {
|
|
6373
|
-
case
|
|
6397
|
+
case Nd.HEADING:
|
|
6374
6398
|
var i;
|
|
6375
|
-
return /* @__PURE__ */ x(
|
|
6376
|
-
case
|
|
6399
|
+
return /* @__PURE__ */ x(Md, { label: n.label }, (i = n.key) == null ? r : i);
|
|
6400
|
+
case Nd.DIVIDER:
|
|
6377
6401
|
var a;
|
|
6378
6402
|
return /* @__PURE__ */ x(Go, { margin: 0 }, (a = n.key) == null ? r : a);
|
|
6379
6403
|
default:
|
|
6380
6404
|
var o;
|
|
6381
|
-
return /* @__PURE__ */ x(
|
|
6405
|
+
return /* @__PURE__ */ x(jd, {
|
|
6382
6406
|
option: n,
|
|
6383
6407
|
onChange: (r) => {
|
|
6384
6408
|
let { value: i } = n;
|
|
6385
|
-
t(r, e.map((e) => e.type ===
|
|
6409
|
+
t(r, e.map((e) => e.type === Nd.HEADING || e.type === Nd.DIVIDER || e.value !== i ? e : {
|
|
6386
6410
|
...e,
|
|
6387
6411
|
selected: !e.selected
|
|
6388
6412
|
}));
|
|
@@ -6390,7 +6414,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6390
6414
|
}, (o = n.key) == null ? r : o);
|
|
6391
6415
|
}
|
|
6392
6416
|
})]
|
|
6393
|
-
}),
|
|
6417
|
+
}), Id = ({ name: e, disabled: t, label: n, options: r, onChange: i, small: a = !1, showHeader: o = !0, maxHeight: s = "40vh", testId: c }) => /* @__PURE__ */ x(Va, {
|
|
6394
6418
|
testId: c,
|
|
6395
6419
|
disabled: t,
|
|
6396
6420
|
menu: {
|
|
@@ -6399,7 +6423,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6399
6423
|
label: n,
|
|
6400
6424
|
trigger: pi.DROP_DOWN_BUTTON,
|
|
6401
6425
|
possiblePlacements: ["top-start", "bottom-start"],
|
|
6402
|
-
sections: /* @__PURE__ */ x(
|
|
6426
|
+
sections: /* @__PURE__ */ x(Fd, {
|
|
6403
6427
|
testId: c,
|
|
6404
6428
|
options: r,
|
|
6405
6429
|
onChangeOptions: (t, n) => {
|
|
@@ -6409,13 +6433,13 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6409
6433
|
maxHeight: s
|
|
6410
6434
|
})
|
|
6411
6435
|
}
|
|
6412
|
-
}),
|
|
6436
|
+
}), Ld = {
|
|
6413
6437
|
page: "_page_beskc_1",
|
|
6414
6438
|
scroll: "_scroll_beskc_23"
|
|
6415
|
-
},
|
|
6439
|
+
}, Rd = ({ children: e, left: t = "var(--size-sidebar)", padding: n = !0, scroll: r = !0, top: i = "var(--size-topbar)" }) => {
|
|
6416
6440
|
let a = typeof n == "string" ? n : n === !0 ? "var(--padding)" : "0";
|
|
6417
6441
|
return /* @__PURE__ */ x("div", {
|
|
6418
|
-
className: y(
|
|
6442
|
+
className: y(Ld.page, r ? Ld.scroll : ""),
|
|
6419
6443
|
style: {
|
|
6420
6444
|
left: t,
|
|
6421
6445
|
padding: a,
|
|
@@ -6423,17 +6447,17 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6423
6447
|
},
|
|
6424
6448
|
children: e
|
|
6425
6449
|
});
|
|
6426
|
-
},
|
|
6450
|
+
}, zd = ({ id: e, children: t }) => {
|
|
6427
6451
|
let n = document.querySelector(`#${e}`), [r, i] = _(!1);
|
|
6428
6452
|
return p(() => {
|
|
6429
6453
|
r || i(!0);
|
|
6430
6454
|
}, [e]), n ? Pr(t, n) : null;
|
|
6431
|
-
},
|
|
6455
|
+
}, Bd = { printHeader: "_printHeader_o7xxx_1" }, Vd = ({ logo: e, alt: t, logoWidth: n = "100px" }) => /* @__PURE__ */ x("img", {
|
|
6432
6456
|
src: e,
|
|
6433
6457
|
alt: t,
|
|
6434
|
-
className:
|
|
6458
|
+
className: Bd.printHeader,
|
|
6435
6459
|
style: { width: n }
|
|
6436
|
-
}),
|
|
6460
|
+
}), Hd = ({ name: e, label: t, options: n, value: r, onChange: i, disabled: a = !1, small: o = !1, noMargin: s = !1, inline: c = !1, testId: l }) => {
|
|
6437
6461
|
var d;
|
|
6438
6462
|
let f = u(W), { simpleInputs: p, options: m, selectedOptions: h } = Yc(n, r), g = h == null ? void 0 : p ? h : h.value, _ = a || f;
|
|
6439
6463
|
return /* @__PURE__ */ S(Mr, {
|
|
@@ -6474,44 +6498,44 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6474
6498
|
}, (t = (n = e.value) == null ? void 0 : n.toString()) == null ? "" : t);
|
|
6475
6499
|
})]
|
|
6476
6500
|
});
|
|
6477
|
-
},
|
|
6501
|
+
}, Ud = {
|
|
6478
6502
|
richTextToolbar: "_richTextToolbar_1gbkk_1",
|
|
6479
6503
|
richTextToolbarContainer: "_richTextToolbarContainer_1gbkk_5"
|
|
6480
|
-
},
|
|
6504
|
+
}, Wd = /* @__PURE__ */ function(e) {
|
|
6481
6505
|
return e.BOLD = "bold", e.ITALIC = "italic", e.CODE = "code", e.UL = "ul", e.OL = "ol", e;
|
|
6482
|
-
}({}),
|
|
6506
|
+
}({}), Gd = ({ editor: e, disabled: t = !1, toolbarComponent: n = null }) => {
|
|
6483
6507
|
var r, i, a, o, s;
|
|
6484
6508
|
let c = [
|
|
6485
6509
|
{
|
|
6486
|
-
icon:
|
|
6510
|
+
icon: Wd.BOLD,
|
|
6487
6511
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBold().run(),
|
|
6488
6512
|
active: (r = e == null ? void 0 : e.isActive("bold")) != null && r
|
|
6489
6513
|
},
|
|
6490
6514
|
{
|
|
6491
|
-
icon:
|
|
6515
|
+
icon: Wd.ITALIC,
|
|
6492
6516
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleItalic().run(),
|
|
6493
6517
|
active: (i = e == null ? void 0 : e.isActive("italic")) != null && i
|
|
6494
6518
|
},
|
|
6495
6519
|
{
|
|
6496
|
-
icon:
|
|
6520
|
+
icon: Wd.CODE,
|
|
6497
6521
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleCode().run(),
|
|
6498
6522
|
active: (a = e == null ? void 0 : e.isActive("code")) != null && a
|
|
6499
6523
|
},
|
|
6500
6524
|
{
|
|
6501
|
-
icon:
|
|
6525
|
+
icon: Wd.UL,
|
|
6502
6526
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBulletList().run(),
|
|
6503
6527
|
active: (o = e == null ? void 0 : e.isActive("bulletList")) != null && o
|
|
6504
6528
|
},
|
|
6505
6529
|
{
|
|
6506
|
-
icon:
|
|
6530
|
+
icon: Wd.OL,
|
|
6507
6531
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleOrderedList().run(),
|
|
6508
6532
|
active: (s = e == null ? void 0 : e.isActive("orderedList")) != null && s
|
|
6509
6533
|
}
|
|
6510
6534
|
];
|
|
6511
6535
|
return /* @__PURE__ */ S("div", {
|
|
6512
|
-
className:
|
|
6536
|
+
className: Ud.richTextToolbarContainer,
|
|
6513
6537
|
children: [/* @__PURE__ */ x("div", {
|
|
6514
|
-
className:
|
|
6538
|
+
className: Ud.richTextToolbar,
|
|
6515
6539
|
children: c.map((e, n) => /* @__PURE__ */ x(q, {
|
|
6516
6540
|
small: !0,
|
|
6517
6541
|
round: !0,
|
|
@@ -6524,7 +6548,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6524
6548
|
}, n))
|
|
6525
6549
|
}), n]
|
|
6526
6550
|
});
|
|
6527
|
-
},
|
|
6551
|
+
}, Kd = {
|
|
6528
6552
|
inputInTable: "_inputInTable_1kfcu_1",
|
|
6529
6553
|
inputHover: "_inputHover_1kfcu_13",
|
|
6530
6554
|
inputFocus: "_inputFocus_1kfcu_18",
|
|
@@ -6534,7 +6558,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6534
6558
|
inputDisabled: "_inputDisabled_1kfcu_65",
|
|
6535
6559
|
hideScrollbars: "_hideScrollbars_1kfcu_71",
|
|
6536
6560
|
richTextInput: "_richTextInput_1kfcu_81"
|
|
6537
|
-
},
|
|
6561
|
+
}, qd = c(o(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i }, a) => {
|
|
6538
6562
|
let o = u(W), s = r || o, c = Zr({
|
|
6539
6563
|
extensions: [
|
|
6540
6564
|
Qr,
|
|
@@ -6561,17 +6585,17 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6561
6585
|
clearContent: () => c == null ? void 0 : c.commands.clearContent(!1),
|
|
6562
6586
|
editor: c
|
|
6563
6587
|
}), [c]), /* @__PURE__ */ S("div", {
|
|
6564
|
-
className:
|
|
6565
|
-
children: [/* @__PURE__ */ x(
|
|
6588
|
+
className: Kd.richTextInput,
|
|
6589
|
+
children: [/* @__PURE__ */ x(Gd, {
|
|
6566
6590
|
editor: c,
|
|
6567
6591
|
disabled: s,
|
|
6568
6592
|
toolbarComponent: i
|
|
6569
6593
|
}), /* @__PURE__ */ x(Xr, { editor: c })]
|
|
6570
6594
|
});
|
|
6571
|
-
})),
|
|
6595
|
+
})), Jd = { row: "_row_n16je_1" }, Yd = ({ 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 }) => {
|
|
6572
6596
|
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__ */ x(e.Fragment, { children: e.cloneElement(t, { spacing: f }) }, n));
|
|
6573
6597
|
return /* @__PURE__ */ x("div", {
|
|
6574
|
-
className: y(
|
|
6598
|
+
className: y(Jd.row),
|
|
6575
6599
|
style: {
|
|
6576
6600
|
alignItems: t,
|
|
6577
6601
|
justifyContent: n,
|
|
@@ -6587,7 +6611,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6587
6611
|
"data-testid": d,
|
|
6588
6612
|
children: p
|
|
6589
6613
|
});
|
|
6590
|
-
},
|
|
6614
|
+
}, Xd = {
|
|
6591
6615
|
inputInTable: "_inputInTable_t1w93_1",
|
|
6592
6616
|
inputHover: "_inputHover_t1w93_13",
|
|
6593
6617
|
inputFocus: "_inputFocus_t1w93_18",
|
|
@@ -6607,7 +6631,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6607
6631
|
experimental: "_experimental_t1w93_159",
|
|
6608
6632
|
active: "_active_t1w93_163",
|
|
6609
6633
|
icon: "_icon_t1w93_167"
|
|
6610
|
-
},
|
|
6634
|
+
}, Zd = c(({ isOpen: e, label: t, icon: n, invalid: r }) => /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(K, {
|
|
6611
6635
|
text: t,
|
|
6612
6636
|
enabled: !e,
|
|
6613
6637
|
placement: "right-center",
|
|
@@ -6616,7 +6640,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6616
6640
|
padding: "var(--padding-sm)",
|
|
6617
6641
|
display: "block",
|
|
6618
6642
|
children: /* @__PURE__ */ x("span", {
|
|
6619
|
-
className:
|
|
6643
|
+
className: Xd.icon,
|
|
6620
6644
|
children: /* @__PURE__ */ x(ka, {
|
|
6621
6645
|
small: !0,
|
|
6622
6646
|
title: r ? "!" : void 0,
|
|
@@ -6625,18 +6649,18 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6625
6649
|
})
|
|
6626
6650
|
})
|
|
6627
6651
|
}), /* @__PURE__ */ x("span", {
|
|
6628
|
-
className:
|
|
6652
|
+
className: Xd.label,
|
|
6629
6653
|
children: t
|
|
6630
|
-
})] }), (e, t) => Or(e, t)),
|
|
6631
|
-
className:
|
|
6654
|
+
})] }), (e, t) => Or(e, t)), Qd = ({ isOpen: e, items: t, sectionIndex: n, onClick: r, testId: i }) => /* @__PURE__ */ x("div", {
|
|
6655
|
+
className: Xd.list,
|
|
6632
6656
|
children: t.map((t, a) => {
|
|
6633
6657
|
let o = `${n}_${a}`;
|
|
6634
6658
|
return /* @__PURE__ */ x("a", {
|
|
6635
6659
|
href: t.value,
|
|
6636
|
-
className: y(
|
|
6660
|
+
className: y(Xd.item, t.isActive ? Xd.active : "", t.isExperimental ? Xd.experimental : ""),
|
|
6637
6661
|
onClick: (e) => r(e, t.value, t.label, t.onClick),
|
|
6638
6662
|
"data-testid": i,
|
|
6639
|
-
children: /* @__PURE__ */ x(
|
|
6663
|
+
children: /* @__PURE__ */ x(Zd, {
|
|
6640
6664
|
label: t.label,
|
|
6641
6665
|
icon: t.icon,
|
|
6642
6666
|
invalid: t.invalid,
|
|
@@ -6644,16 +6668,16 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6644
6668
|
}, o)
|
|
6645
6669
|
}, o);
|
|
6646
6670
|
})
|
|
6647
|
-
}),
|
|
6648
|
-
className:
|
|
6671
|
+
}), $d = ({ isOpen: t, sections: n, onClick: r }) => /* @__PURE__ */ x(b, { children: n.map((n, i) => /* @__PURE__ */ S(e.Fragment, { children: [/* @__PURE__ */ x("h5", {
|
|
6672
|
+
className: Xd.subtitle,
|
|
6649
6673
|
children: n.heading.toUpperCase()
|
|
6650
|
-
}), /* @__PURE__ */ x(
|
|
6674
|
+
}), /* @__PURE__ */ x(Qd, {
|
|
6651
6675
|
isOpen: t,
|
|
6652
6676
|
items: n.items,
|
|
6653
6677
|
sectionIndex: i,
|
|
6654
6678
|
onClick: r,
|
|
6655
6679
|
testId: n.testId
|
|
6656
|
-
})] }, i)) }),
|
|
6680
|
+
})] }, i)) }), ef = c(({ options: e, startOpen: t = !1, onShiftClickToggleOpen: n = () => {}, top: r }) => {
|
|
6657
6681
|
let [i, a] = _(t), o = (e, t, n, r) => {
|
|
6658
6682
|
e.preventDefault(), typeof r == "function" && (e.currentTarget.value = t, e.currentTarget.label = n, r(e)), a(!1);
|
|
6659
6683
|
}, s = e.sections.length > 0;
|
|
@@ -6674,13 +6698,13 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6674
6698
|
icon: U.LEFT
|
|
6675
6699
|
}),
|
|
6676
6700
|
children: /* @__PURE__ */ x("div", {
|
|
6677
|
-
className: y(
|
|
6701
|
+
className: y(Xd.sidebar, i ? "" : Xd.collapsed),
|
|
6678
6702
|
children: s && /* @__PURE__ */ S("div", {
|
|
6679
|
-
className:
|
|
6703
|
+
className: Xd.inner,
|
|
6680
6704
|
children: [/* @__PURE__ */ x("h4", {
|
|
6681
|
-
className:
|
|
6705
|
+
className: Xd.title,
|
|
6682
6706
|
children: e.title
|
|
6683
|
-
}), /* @__PURE__ */ x(
|
|
6707
|
+
}), /* @__PURE__ */ x($d, {
|
|
6684
6708
|
isOpen: i,
|
|
6685
6709
|
sections: e.sections,
|
|
6686
6710
|
onClick: o
|
|
@@ -6688,18 +6712,18 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6688
6712
|
})
|
|
6689
6713
|
})
|
|
6690
6714
|
});
|
|
6691
|
-
}, (e, t) => Or(e, t)),
|
|
6715
|
+
}, (e, t) => Or(e, t)), tf = {
|
|
6692
6716
|
skeletonContainer: "_skeletonContainer_mcfxp_9",
|
|
6693
6717
|
skeleton: "_skeleton_mcfxp_9"
|
|
6694
|
-
},
|
|
6718
|
+
}, nf = ({ count: e, width: t, height: n }) => /* @__PURE__ */ x(ti, {
|
|
6695
6719
|
baseColor: "var(--color-skeleton-base)",
|
|
6696
6720
|
highlightColor: "var(--color-skeleton-highlight)",
|
|
6697
|
-
containerClassName:
|
|
6698
|
-
className:
|
|
6721
|
+
containerClassName: tf.skeletonContainer,
|
|
6722
|
+
className: tf.skeleton,
|
|
6699
6723
|
count: e,
|
|
6700
6724
|
width: t,
|
|
6701
6725
|
height: n
|
|
6702
|
-
}),
|
|
6726
|
+
}), rf = {
|
|
6703
6727
|
wrapper: "_wrapper_j8x9r_1",
|
|
6704
6728
|
label: "_label_j8x9r_5",
|
|
6705
6729
|
input: "_input_j8x9r_9",
|
|
@@ -6707,38 +6731,38 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6707
6731
|
editable: "_editable_j8x9r_22",
|
|
6708
6732
|
inputControl: "_inputControl_j8x9r_25",
|
|
6709
6733
|
actions: "_actions_j8x9r_28"
|
|
6710
|
-
},
|
|
6734
|
+
}, af = () => {
|
|
6711
6735
|
let e = g(null);
|
|
6712
6736
|
return p(() => {
|
|
6713
6737
|
e.current && (e.current(), e.current = null);
|
|
6714
6738
|
}), (t) => {
|
|
6715
6739
|
e.current = t;
|
|
6716
6740
|
};
|
|
6717
|
-
},
|
|
6741
|
+
}, of = (e) => {
|
|
6718
6742
|
let t = g(void 0);
|
|
6719
6743
|
return d(() => {
|
|
6720
6744
|
t.current = e;
|
|
6721
6745
|
}, [e]), t.current;
|
|
6722
|
-
},
|
|
6746
|
+
}, sf = (e, t) => {
|
|
6723
6747
|
let n = t == null ? void 0 : t[e];
|
|
6724
6748
|
if (!n) {
|
|
6725
6749
|
var r;
|
|
6726
6750
|
return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = _r(e)) == null ? "" : r;
|
|
6727
6751
|
}
|
|
6728
6752
|
return n;
|
|
6729
|
-
},
|
|
6753
|
+
}, cf = /* @__PURE__ */ function(e) {
|
|
6730
6754
|
return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
|
|
6731
|
-
}({}),
|
|
6755
|
+
}({}), lf = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), uf = (e) => {
|
|
6732
6756
|
if (!e) return !1;
|
|
6733
6757
|
let t = tr(e);
|
|
6734
6758
|
return !Yn.includes(t);
|
|
6735
|
-
},
|
|
6759
|
+
}, df = ({ value: e, unitkey: t, toUnit: n }) => {
|
|
6736
6760
|
var r;
|
|
6737
6761
|
let i = Jn[t];
|
|
6738
6762
|
if (!i || i.length === 0 || !((r = vr(e)) != null && r.valid) || !i.includes(n)) return !1;
|
|
6739
6763
|
let a = tr(String(e));
|
|
6740
6764
|
return !(a && !i.includes(a));
|
|
6741
|
-
},
|
|
6765
|
+
}, ff = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
|
|
6742
6766
|
var o;
|
|
6743
6767
|
let s = sr(e) ? rr(e) : e, c = [Infinity, -Infinity].includes(Number(s));
|
|
6744
6768
|
if (i || c) return {
|
|
@@ -6758,13 +6782,13 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6758
6782
|
value: void 0,
|
|
6759
6783
|
error: "Source unit is missing"
|
|
6760
6784
|
};
|
|
6761
|
-
if (
|
|
6785
|
+
if (lf(s)) return {
|
|
6762
6786
|
value: void 0,
|
|
6763
6787
|
error: "Value is invalid for conversion"
|
|
6764
6788
|
};
|
|
6765
6789
|
try {
|
|
6766
6790
|
let e = br(s, l);
|
|
6767
|
-
if (
|
|
6791
|
+
if (df({
|
|
6768
6792
|
value: e,
|
|
6769
6793
|
toUnit: n,
|
|
6770
6794
|
unitkey: t
|
|
@@ -6785,13 +6809,13 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6785
6809
|
error: "Conversion not possible"
|
|
6786
6810
|
};
|
|
6787
6811
|
}
|
|
6788
|
-
},
|
|
6789
|
-
let a = rr(e), o =
|
|
6790
|
-
return !
|
|
6812
|
+
}, pf = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
|
|
6813
|
+
let a = rr(e), o = lf(a);
|
|
6814
|
+
return !df({
|
|
6791
6815
|
value: e,
|
|
6792
6816
|
unitkey: n,
|
|
6793
6817
|
toUnit: t
|
|
6794
|
-
}) ||
|
|
6818
|
+
}) || uf(e) || o ? { value: a } : sr(e) ? ff({
|
|
6795
6819
|
value: e,
|
|
6796
6820
|
unitkey: n,
|
|
6797
6821
|
toUnit: t,
|
|
@@ -6799,25 +6823,25 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6799
6823
|
doNotConvertValue: i,
|
|
6800
6824
|
exactPrecision: !0
|
|
6801
6825
|
}) : { value: e };
|
|
6802
|
-
},
|
|
6826
|
+
}, mf = (e) => mn(e) && !on(e) && !dn(e) ? an(e, "fieldName", "") : typeof e == "string" ? e : "", hf = (e = "") => Yn == null ? void 0 : Yn.includes(e), gf = (e, t) => {
|
|
6803
6827
|
let n = tr(e || "");
|
|
6804
|
-
return
|
|
6805
|
-
},
|
|
6806
|
-
|
|
6807
|
-
},
|
|
6828
|
+
return hf(t) && hf(n);
|
|
6829
|
+
}, _f = i(null), vf = () => u(_f), yf = !1, bf = (e) => {
|
|
6830
|
+
yf || (yf = !0, _f = e);
|
|
6831
|
+
}, xf = (e) => ar(e) ? e : lr(e), Sf = {
|
|
6808
6832
|
predefinedMenuActive: "_predefinedMenuActive_ye9w9_1",
|
|
6809
6833
|
inputWrapper: "_inputWrapper_ye9w9_4"
|
|
6810
|
-
},
|
|
6834
|
+
}, Cf = ({ 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 = vn, onClick: h = vn, onFocus: g = vn, onSwitchUnit: v = vn, unitTemplate: C, testId: w, warning: T = null, predefinedOptions: E, initialPredefinedOption: D = !1, shouldLinkAutomaticly: O = !0, selectedPredefinedOptionKey: k, validationCallback: A = () => ({
|
|
6811
6835
|
name: "",
|
|
6812
6836
|
error: null
|
|
6813
6837
|
}), 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 }) => {
|
|
6814
|
-
let B =
|
|
6838
|
+
let B = vf(), ee = af();
|
|
6815
6839
|
typeof c == "number" && (c = `${c}`);
|
|
6816
|
-
let [te = "", ne = ""] = c === void 0 ? [] : pr(c), V = m(() =>
|
|
6840
|
+
let [te = "", ne = ""] = c === void 0 ? [] : pr(c), V = m(() => sf(l, C || (B == null ? void 0 : B.unitTemplate)), [
|
|
6817
6841
|
l,
|
|
6818
6842
|
C,
|
|
6819
6843
|
B == null ? void 0 : B.unitTemplate
|
|
6820
|
-
]), re =
|
|
6844
|
+
]), re = gf(c, V), ie = u || V || ne, ae = of(ie), { value: oe } = pf({
|
|
6821
6845
|
value: c,
|
|
6822
6846
|
toUnit: ie,
|
|
6823
6847
|
unitkey: l,
|
|
@@ -6829,10 +6853,10 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6829
6853
|
} : {
|
|
6830
6854
|
value: oe,
|
|
6831
6855
|
unit: ie
|
|
6832
|
-
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = _(D ?
|
|
6856
|
+
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = _(D ? cf.PREDEFINED : cf.CUSTOM), fe = !!(j || n), pe = E && E.find((e) => {
|
|
6833
6857
|
if (!(e != null && e.value)) return;
|
|
6834
6858
|
if (k) return k === e.valueKey;
|
|
6835
|
-
let t = sr(e.value) ? tr(e.value) : "", { value: n = c } =
|
|
6859
|
+
let t = sr(e.value) ? tr(e.value) : "", { value: n = c } = ff({
|
|
6836
6860
|
value: String(c),
|
|
6837
6861
|
unitkey: l,
|
|
6838
6862
|
toUnit: t
|
|
@@ -6841,7 +6865,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6841
6865
|
}), me = () => {
|
|
6842
6866
|
var e;
|
|
6843
6867
|
let t = (e = c) == null ? "" : e, n = se.unit;
|
|
6844
|
-
if (!
|
|
6868
|
+
if (!df({
|
|
6845
6869
|
value: t,
|
|
6846
6870
|
unitkey: l,
|
|
6847
6871
|
toUnit: n
|
|
@@ -6856,7 +6880,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6856
6880
|
return null;
|
|
6857
6881
|
}
|
|
6858
6882
|
}, he = (t) => {
|
|
6859
|
-
let n =
|
|
6883
|
+
let n = mf(e), r = t.target, { value: i, selectionStart: a } = r, o = br(i, (se == null ? void 0 : se.unit) || "");
|
|
6860
6884
|
p({ target: {
|
|
6861
6885
|
value: N ? br(Qn(o, ne), ne) : o,
|
|
6862
6886
|
name: n
|
|
@@ -6878,7 +6902,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6878
6902
|
if (ie) {
|
|
6879
6903
|
let e, t = "";
|
|
6880
6904
|
if (ae !== ie) {
|
|
6881
|
-
let { value: n } =
|
|
6905
|
+
let { value: n } = pf({
|
|
6882
6906
|
value: c,
|
|
6883
6907
|
toUnit: ie,
|
|
6884
6908
|
unitkey: l,
|
|
@@ -6887,7 +6911,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6887
6911
|
});
|
|
6888
6912
|
e = n, t = ie;
|
|
6889
6913
|
} else if (br(se.value, se.unit) !== c) {
|
|
6890
|
-
let { value: n } =
|
|
6914
|
+
let { value: n } = pf({
|
|
6891
6915
|
value: c,
|
|
6892
6916
|
toUnit: se.unit,
|
|
6893
6917
|
unitkey: l,
|
|
@@ -6899,7 +6923,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6899
6923
|
e !== void 0 && ce({
|
|
6900
6924
|
value: e,
|
|
6901
6925
|
unit: t
|
|
6902
|
-
}), de(E && pe && O ?
|
|
6926
|
+
}), de(E && pe && O ? cf.PREDEFINED : cf.CUSTOM);
|
|
6903
6927
|
}
|
|
6904
6928
|
}, [
|
|
6905
6929
|
ie,
|
|
@@ -6907,14 +6931,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6907
6931
|
i,
|
|
6908
6932
|
O
|
|
6909
6933
|
]);
|
|
6910
|
-
let _e = me(), ve = cr(se.unit) || se.unit || "", ye = f || !_e || _e && _e.length === 1, be =
|
|
6934
|
+
let _e = me(), ve = cr(se.unit) || se.unit || "", ye = f || !_e || _e && _e.length === 1, be = mf(e), xe, Se = (t) => {
|
|
6911
6935
|
let r = t != null && t.value ? t.value : "", [i = "", a = ""] = sr(r) ? pr(r) : [r], o = yr(r);
|
|
6912
|
-
if (
|
|
6936
|
+
if (df({
|
|
6913
6937
|
value: r,
|
|
6914
6938
|
unitkey: l,
|
|
6915
6939
|
toUnit: a
|
|
6916
6940
|
})) {
|
|
6917
|
-
let { value: e = "" } =
|
|
6941
|
+
let { value: e = "" } = pf({
|
|
6918
6942
|
value: r,
|
|
6919
6943
|
toUnit: V,
|
|
6920
6944
|
unitkey: l,
|
|
@@ -6927,7 +6951,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6927
6951
|
type: ga.OPTION,
|
|
6928
6952
|
inline: !0,
|
|
6929
6953
|
onClick: () => {
|
|
6930
|
-
vr(i).valid && !n && (de(
|
|
6954
|
+
vr(i).valid && !n && (de(cf.PREDEFINED), p({ target: {
|
|
6931
6955
|
value: r,
|
|
6932
6956
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || "",
|
|
6933
6957
|
predefinedSelected: !0,
|
|
@@ -6939,27 +6963,27 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6939
6963
|
height: "0"
|
|
6940
6964
|
})] }),
|
|
6941
6965
|
description: o,
|
|
6942
|
-
selected: pe === t && ue ===
|
|
6966
|
+
selected: pe === t && ue === cf.PREDEFINED
|
|
6943
6967
|
};
|
|
6944
6968
|
};
|
|
6945
6969
|
if (xe = [{
|
|
6946
6970
|
type: ga.OPTION,
|
|
6947
6971
|
inline: !0,
|
|
6948
6972
|
onClick: () => {
|
|
6949
|
-
ue !==
|
|
6973
|
+
ue !== cf.CUSTOM && !n && p({ target: {
|
|
6950
6974
|
value: br(se.value, se.unit),
|
|
6951
6975
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || ""
|
|
6952
6976
|
} });
|
|
6953
6977
|
},
|
|
6954
6978
|
label: "Custom",
|
|
6955
|
-
selected: ue ===
|
|
6979
|
+
selected: ue === cf.CUSTOM
|
|
6956
6980
|
}], E != null && E.length) {
|
|
6957
6981
|
let e = E.map(Se);
|
|
6958
6982
|
xe = [...xe, ...e];
|
|
6959
6983
|
}
|
|
6960
6984
|
let Ce = (e) => {
|
|
6961
6985
|
if (sr(e)) {
|
|
6962
|
-
let t = tr(e), { value: n } =
|
|
6986
|
+
let t = tr(e), { value: n } = pf({
|
|
6963
6987
|
value: e,
|
|
6964
6988
|
toUnit: se.unit,
|
|
6965
6989
|
unitkey: l,
|
|
@@ -6971,7 +6995,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6971
6995
|
return e;
|
|
6972
6996
|
}, we = !E && (!R || R === H.FIRST) ? H.FIRST : H.MIDDLE, Te = !R || R === H.LAST ? H.LAST : H.MIDDLE;
|
|
6973
6997
|
return /* @__PURE__ */ x("div", {
|
|
6974
|
-
className: ue ===
|
|
6998
|
+
className: ue === cf.PREDEFINED ? y(Sf.predefinedMenuActive) : "",
|
|
6975
6999
|
children: /* @__PURE__ */ S(cs, {
|
|
6976
7000
|
small: o,
|
|
6977
7001
|
width: s,
|
|
@@ -6986,17 +7010,17 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
6986
7010
|
trigger: "Component",
|
|
6987
7011
|
component: /* @__PURE__ */ x(q, {
|
|
6988
7012
|
groupOrder: "first",
|
|
6989
|
-
active: ue ===
|
|
6990
|
-
icon: ue ===
|
|
7013
|
+
active: ue === cf.PREDEFINED,
|
|
7014
|
+
icon: ue === cf.PREDEFINED ? "link" : "unlink",
|
|
6991
7015
|
small: o
|
|
6992
7016
|
}),
|
|
6993
7017
|
small: o,
|
|
6994
7018
|
sections: xe
|
|
6995
7019
|
},
|
|
6996
|
-
tooltip: ue ===
|
|
7020
|
+
tooltip: ue === cf.PREDEFINED ? pe == null ? void 0 : pe.label : ""
|
|
6997
7021
|
}),
|
|
6998
7022
|
/* @__PURE__ */ x("div", {
|
|
6999
|
-
className:
|
|
7023
|
+
className: Sf.inputWrapper,
|
|
7000
7024
|
children: /* @__PURE__ */ x(hl, {
|
|
7001
7025
|
name: be,
|
|
7002
7026
|
testId: w,
|
|
@@ -7038,7 +7062,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7038
7062
|
let r = n || t || "", i = or(e) ? e : "";
|
|
7039
7063
|
return {
|
|
7040
7064
|
type: "Option",
|
|
7041
|
-
label: P ?
|
|
7065
|
+
label: P ? xf(i) : i,
|
|
7042
7066
|
inline: !0,
|
|
7043
7067
|
onClick: (n) => {
|
|
7044
7068
|
n.stopPropagation(), ge(e, t);
|
|
@@ -7053,10 +7077,10 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7053
7077
|
]
|
|
7054
7078
|
})
|
|
7055
7079
|
});
|
|
7056
|
-
},
|
|
7080
|
+
}, wf = (e, t) => ({ target: {
|
|
7057
7081
|
name: e,
|
|
7058
7082
|
value: t
|
|
7059
|
-
} }),
|
|
7083
|
+
} }), Tf = (e) => `Value cannot be less than ${e}`, Ef = (e) => `Value cannot be greater than ${e}`, Df = ({ 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: v = !1, small: b = !1, marks: C, minErrorMessage: w = Tf, maxErrorMessage: T = Ef }) => {
|
|
7060
7084
|
let E = br(t, c), [D, O] = _(E), [k, A] = _(!1), [j, M] = _(c);
|
|
7061
7085
|
d(() => {
|
|
7062
7086
|
k || O(E);
|
|
@@ -7074,7 +7098,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7074
7098
|
}, z = () => {
|
|
7075
7099
|
O(E), A(!1);
|
|
7076
7100
|
}, B = () => {
|
|
7077
|
-
L || I === null || (o(
|
|
7101
|
+
L || I === null || (o(wf(e, I)), s == null || s(wf(e, I)), A(!1));
|
|
7078
7102
|
}, ee = (e) => {
|
|
7079
7103
|
M(e), l == null || l(e);
|
|
7080
7104
|
}, te = (e) => {
|
|
@@ -7089,7 +7113,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7089
7113
|
}, ne = (e) => {
|
|
7090
7114
|
e.key === "Enter" && B(), e.key === "Escape" && z();
|
|
7091
7115
|
}, V = f || k, re = /* @__PURE__ */ S("div", {
|
|
7092
|
-
className:
|
|
7116
|
+
className: rf.actions,
|
|
7093
7117
|
children: [/* @__PURE__ */ x(q, {
|
|
7094
7118
|
icon: "close",
|
|
7095
7119
|
small: !0,
|
|
@@ -7104,18 +7128,18 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7104
7128
|
})]
|
|
7105
7129
|
});
|
|
7106
7130
|
return /* @__PURE__ */ S("div", {
|
|
7107
|
-
className:
|
|
7131
|
+
className: rf.wrapper,
|
|
7108
7132
|
"data-testid": g && `${g}-wrapper`,
|
|
7109
7133
|
children: [
|
|
7110
7134
|
i && /* @__PURE__ */ x("span", {
|
|
7111
|
-
className:
|
|
7135
|
+
className: rf.label,
|
|
7112
7136
|
children: /* @__PURE__ */ x(Uo, {
|
|
7113
7137
|
small: b,
|
|
7114
7138
|
children: i
|
|
7115
7139
|
})
|
|
7116
7140
|
}),
|
|
7117
7141
|
p && /* @__PURE__ */ x("div", {
|
|
7118
|
-
className: y(
|
|
7142
|
+
className: y(rf.input, b && rf.inputSmall, u && !f && rf.editable),
|
|
7119
7143
|
children: /* @__PURE__ */ x(go, {
|
|
7120
7144
|
content: re,
|
|
7121
7145
|
isOpen: k,
|
|
@@ -7129,11 +7153,11 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7129
7153
|
testId: g && `${g}-edit-popover`,
|
|
7130
7154
|
toggleOnTriggerClick: !1,
|
|
7131
7155
|
children: /* @__PURE__ */ x("div", {
|
|
7132
|
-
className:
|
|
7156
|
+
className: rf.inputControl,
|
|
7133
7157
|
"data-testid": g && `${g}-edit-trigger`,
|
|
7134
7158
|
onClick: R,
|
|
7135
7159
|
onKeyDown: ne,
|
|
7136
|
-
children: /* @__PURE__ */ x(
|
|
7160
|
+
children: /* @__PURE__ */ x(Cf, {
|
|
7137
7161
|
name: e,
|
|
7138
7162
|
value: k ? D : E,
|
|
7139
7163
|
unitkey: h,
|
|
@@ -7168,7 +7192,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7168
7192
|
})
|
|
7169
7193
|
]
|
|
7170
7194
|
});
|
|
7171
|
-
},
|
|
7195
|
+
}, Of = ({ label: e, invalid: t, badge: n }) => t ? /* @__PURE__ */ x(ka, {
|
|
7172
7196
|
small: !0,
|
|
7173
7197
|
margin: "-4px",
|
|
7174
7198
|
color: "var(--color-text-error)",
|
|
@@ -7179,7 +7203,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7179
7203
|
margin: "-4px",
|
|
7180
7204
|
title: n == null ? void 0 : n.toString(),
|
|
7181
7205
|
children: e
|
|
7182
|
-
}) : /* @__PURE__ */ x(b, { children: e }),
|
|
7206
|
+
}) : /* @__PURE__ */ x(b, { children: e }), kf = {
|
|
7183
7207
|
tabs: "_tabs_1rtn8_1",
|
|
7184
7208
|
padding: "_padding_1rtn8_7",
|
|
7185
7209
|
margin: "_margin_1rtn8_11",
|
|
@@ -7188,7 +7212,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7188
7212
|
left: "_left_1rtn8_64",
|
|
7189
7213
|
right: "_right_1rtn8_64",
|
|
7190
7214
|
selectionIndicator: "_selectionIndicator_1rtn8_67"
|
|
7191
|
-
},
|
|
7215
|
+
}, Af = ({ name: e = void 0, options: t = null, value: n = void 0, onChange: r = vn, padding: i = !1, margin: a = !0, testId: o, linkComponent: s }) => {
|
|
7192
7216
|
let c = u(W), { simpleInputs: l, options: d, selectedOptions: f } = Yc(t, n), p = fn(f) ? void 0 : l ? f : f.value, m = (e) => {
|
|
7193
7217
|
var t;
|
|
7194
7218
|
return (t = e.component) == null ? s : t;
|
|
@@ -7209,7 +7233,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7209
7233
|
"data-testid": o,
|
|
7210
7234
|
children: /* @__PURE__ */ x(ii, {
|
|
7211
7235
|
"aria-label": e == null ? "Tabs" : e,
|
|
7212
|
-
className: y(
|
|
7236
|
+
className: y(kf.tabs, i ? kf.padding : "", a ? kf.margin : ""),
|
|
7213
7237
|
children: _.map((e) => {
|
|
7214
7238
|
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);
|
|
7215
7239
|
return /* @__PURE__ */ S(ri, {
|
|
@@ -7217,23 +7241,23 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7217
7241
|
...!d && n ? { href: n } : {},
|
|
7218
7242
|
shouldSelectOnPressUp: !0,
|
|
7219
7243
|
isDisabled: i || c,
|
|
7220
|
-
className: y(
|
|
7244
|
+
className: y(kf.item, o ? kf.right : kf.left),
|
|
7221
7245
|
"data-testid": u,
|
|
7222
7246
|
render: d && f ? (e) => /* @__PURE__ */ x(f, {
|
|
7223
7247
|
...e,
|
|
7224
7248
|
href: r,
|
|
7225
7249
|
to: r
|
|
7226
7250
|
}) : void 0,
|
|
7227
|
-
children: [/* @__PURE__ */ x(
|
|
7251
|
+
children: [/* @__PURE__ */ x(Of, {
|
|
7228
7252
|
label: t,
|
|
7229
7253
|
invalid: s,
|
|
7230
7254
|
badge: l
|
|
7231
|
-
}), /* @__PURE__ */ x(ni, { className:
|
|
7255
|
+
}), /* @__PURE__ */ x(ni, { className: kf.selectionIndicator })]
|
|
7232
7256
|
}, a);
|
|
7233
7257
|
})
|
|
7234
7258
|
})
|
|
7235
7259
|
}) : null;
|
|
7236
|
-
},
|
|
7260
|
+
}, jf = ({ children: e, href: t = void 0, target: n = void 0, testId: r, onClick: i, component: a = "a" }) => /* @__PURE__ */ x(a, {
|
|
7237
7261
|
href: t,
|
|
7238
7262
|
to: t,
|
|
7239
7263
|
target: n,
|
|
@@ -7243,7 +7267,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7243
7267
|
link: !0,
|
|
7244
7268
|
children: e
|
|
7245
7269
|
})
|
|
7246
|
-
}),
|
|
7270
|
+
}), Mf = {
|
|
7247
7271
|
inputInTable: "_inputInTable_qbe2o_1",
|
|
7248
7272
|
inputHover: "_inputHover_qbe2o_13",
|
|
7249
7273
|
inputFocus: "_inputFocus_qbe2o_18",
|
|
@@ -7255,9 +7279,9 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7255
7279
|
textarea: "_textarea_qbe2o_81",
|
|
7256
7280
|
small: "_small_qbe2o_120",
|
|
7257
7281
|
monospace: "_monospace_qbe2o_159"
|
|
7258
|
-
},
|
|
7282
|
+
}, Nf = ({ name: e, value: t = "", placeholder: n = "", cols: r, rows: i, disabled: a = !1, onChange: o = vn, onKeyPress: s = vn, onFocus: c = vn, onBlur: l = vn, tabIndex: d = 0, error: f = null, warning: p = null, tooltip: m = null, maxTooltipWidth: h, resize: g, monospace: _ = !1, small: v = !1, testId: b }) => {
|
|
7259
7283
|
let S = u(W), C = /* @__PURE__ */ x("textarea", {
|
|
7260
|
-
className: y(
|
|
7284
|
+
className: y(Mf.textarea, f ? Mf.error : "", p ? Mf.warning : "", _ ? Mf.monospace : "", v ? Mf.small : ""),
|
|
7261
7285
|
name: e,
|
|
7262
7286
|
value: t,
|
|
7263
7287
|
placeholder: n,
|
|
@@ -7299,10 +7323,10 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7299
7323
|
menu: "_menu_oyr59_139",
|
|
7300
7324
|
active: "_active_oyr59_168",
|
|
7301
7325
|
alert: "_alert_oyr59_193"
|
|
7302
|
-
},
|
|
7326
|
+
}, Pf = ({ warning: e }) => /* @__PURE__ */ x("div", {
|
|
7303
7327
|
className: Q.alert,
|
|
7304
7328
|
children: e
|
|
7305
|
-
}),
|
|
7329
|
+
}), Ff = ({ icon: e, url: t, onClick: n }) => {
|
|
7306
7330
|
let r = /* @__PURE__ */ x(G, { icon: e });
|
|
7307
7331
|
return t ? /* @__PURE__ */ x("a", {
|
|
7308
7332
|
href: t,
|
|
@@ -7314,7 +7338,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7314
7338
|
className: Q.appSwitcher,
|
|
7315
7339
|
children: r
|
|
7316
7340
|
});
|
|
7317
|
-
},
|
|
7341
|
+
}, If = ({ label: e, logo: t, url: n, version: r, onClick: i }) => {
|
|
7318
7342
|
let a = /* @__PURE__ */ S("div", {
|
|
7319
7343
|
className: Q.title,
|
|
7320
7344
|
children: [
|
|
@@ -7343,9 +7367,9 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7343
7367
|
children: a
|
|
7344
7368
|
})
|
|
7345
7369
|
});
|
|
7346
|
-
},
|
|
7370
|
+
}, Lf = /* @__PURE__ */ function(e) {
|
|
7347
7371
|
return e.LINK = "Link", e.BUTTON = "Button", e.MENU = "Menu", e.COMPONENT = "Component", e;
|
|
7348
|
-
}({}),
|
|
7372
|
+
}({}), Rf = ({ label: e, url: t, icon: n, onClick: r, active: i, disabled: a, testId: o, component: s = "a" }) => {
|
|
7349
7373
|
let c = u(W);
|
|
7350
7374
|
return /* @__PURE__ */ S(s, {
|
|
7351
7375
|
className: y(Q.link, i ? Q.active : ""),
|
|
@@ -7362,11 +7386,11 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7362
7386
|
children: e
|
|
7363
7387
|
})]
|
|
7364
7388
|
});
|
|
7365
|
-
},
|
|
7389
|
+
}, zf = ({ element: e }) => {
|
|
7366
7390
|
switch (e.type) {
|
|
7367
|
-
case
|
|
7391
|
+
case Lf.LINK: return /* @__PURE__ */ x("div", {
|
|
7368
7392
|
className: Q.item,
|
|
7369
|
-
children: /* @__PURE__ */ x(
|
|
7393
|
+
children: /* @__PURE__ */ x(Rf, {
|
|
7370
7394
|
label: e.label,
|
|
7371
7395
|
url: e.url,
|
|
7372
7396
|
icon: e.icon,
|
|
@@ -7377,7 +7401,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7377
7401
|
component: e.component
|
|
7378
7402
|
})
|
|
7379
7403
|
});
|
|
7380
|
-
case
|
|
7404
|
+
case Lf.BUTTON: return /* @__PURE__ */ x("div", {
|
|
7381
7405
|
className: y(Q.item, Q.button),
|
|
7382
7406
|
children: /* @__PURE__ */ x(q, {
|
|
7383
7407
|
label: e.label,
|
|
@@ -7389,7 +7413,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7389
7413
|
testId: e.testId
|
|
7390
7414
|
})
|
|
7391
7415
|
});
|
|
7392
|
-
case
|
|
7416
|
+
case Lf.MENU: return /* @__PURE__ */ x("div", {
|
|
7393
7417
|
className: y(Q.item, Q.menu),
|
|
7394
7418
|
children: /* @__PURE__ */ x(Va, {
|
|
7395
7419
|
maxHeight: "100%",
|
|
@@ -7397,7 +7421,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7397
7421
|
trigger: pi.COMPONENT,
|
|
7398
7422
|
fullHeightTrigger: !0,
|
|
7399
7423
|
placement: "bottom-start",
|
|
7400
|
-
component: /* @__PURE__ */ x(
|
|
7424
|
+
component: /* @__PURE__ */ x(Rf, {
|
|
7401
7425
|
label: e.label,
|
|
7402
7426
|
icon: e.icon,
|
|
7403
7427
|
onClick: e.onClick
|
|
@@ -7406,50 +7430,50 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7406
7430
|
}
|
|
7407
7431
|
})
|
|
7408
7432
|
});
|
|
7409
|
-
case
|
|
7433
|
+
case Lf.COMPONENT: return /* @__PURE__ */ x("div", {
|
|
7410
7434
|
className: Q.item,
|
|
7411
7435
|
children: e.component
|
|
7412
7436
|
});
|
|
7413
7437
|
default: return null;
|
|
7414
7438
|
}
|
|
7415
|
-
},
|
|
7439
|
+
}, Bf = ({ title: e, appSwitcher: t, content: n = [], contentRight: r = [], warning: i = "", height: a = "var(--size-topbar)", fixedPosition: o = !0 }) => /* @__PURE__ */ S("div", { children: [i && /* @__PURE__ */ x(Pf, { warning: i }), /* @__PURE__ */ S("div", {
|
|
7416
7440
|
className: y(Q.topbar, o ? Q.fixed : ""),
|
|
7417
7441
|
style: { height: a },
|
|
7418
7442
|
children: [
|
|
7419
|
-
!!t && /* @__PURE__ */ x(
|
|
7443
|
+
!!t && /* @__PURE__ */ x(Ff, {
|
|
7420
7444
|
icon: t.icon,
|
|
7421
7445
|
url: t.url,
|
|
7422
7446
|
onClick: t.onClick
|
|
7423
7447
|
}),
|
|
7424
7448
|
/* @__PURE__ */ S("div", {
|
|
7425
7449
|
className: Q.left,
|
|
7426
|
-
children: [e && /* @__PURE__ */ x(
|
|
7450
|
+
children: [e && /* @__PURE__ */ x(If, {
|
|
7427
7451
|
label: e.label,
|
|
7428
7452
|
logo: e.logo,
|
|
7429
7453
|
url: e.url,
|
|
7430
7454
|
version: e.version,
|
|
7431
7455
|
onClick: e.onClick
|
|
7432
|
-
}), n.map((e, t) => e ? /* @__PURE__ */ x(
|
|
7456
|
+
}), n.map((e, t) => e ? /* @__PURE__ */ x(zf, { element: e }, t) : null)]
|
|
7433
7457
|
}),
|
|
7434
7458
|
/* @__PURE__ */ x("div", {
|
|
7435
7459
|
className: Q.right,
|
|
7436
|
-
children: r.map((e, t) => e ? /* @__PURE__ */ x(
|
|
7460
|
+
children: r.map((e, t) => e ? /* @__PURE__ */ x(zf, { element: e }, t) : null)
|
|
7437
7461
|
})
|
|
7438
7462
|
]
|
|
7439
|
-
})] }),
|
|
7463
|
+
})] }), Vf = {
|
|
7440
7464
|
popConfirm: "_popConfirm_1x6ye_1",
|
|
7441
7465
|
content: "_content_1x6ye_7",
|
|
7442
7466
|
buttons: "_buttons_1x6ye_13"
|
|
7443
|
-
},
|
|
7444
|
-
className:
|
|
7467
|
+
}, Hf = ({ title: e, okText: t, onClickOk: n, disableConfirmButton: r, cancelText: i, onClickCancel: a, close: o, testId: s }) => /* @__PURE__ */ S("div", {
|
|
7468
|
+
className: Vf.popConfirm,
|
|
7445
7469
|
children: [e && /* @__PURE__ */ x("div", {
|
|
7446
|
-
className:
|
|
7470
|
+
className: Vf.content,
|
|
7447
7471
|
children: /* @__PURE__ */ x(Uo, {
|
|
7448
7472
|
small: !0,
|
|
7449
7473
|
children: e
|
|
7450
7474
|
})
|
|
7451
7475
|
}), /* @__PURE__ */ S("div", {
|
|
7452
|
-
className:
|
|
7476
|
+
className: Vf.buttons,
|
|
7453
7477
|
children: [/* @__PURE__ */ x(q, {
|
|
7454
7478
|
small: !0,
|
|
7455
7479
|
colored: !0,
|
|
@@ -7464,8 +7488,8 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7464
7488
|
testId: `${s}-cancel-button`
|
|
7465
7489
|
})]
|
|
7466
7490
|
})]
|
|
7467
|
-
}),
|
|
7468
|
-
content: /* @__PURE__ */ x(
|
|
7491
|
+
}), Uf = ({ 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__ */ x(go, {
|
|
7492
|
+
content: /* @__PURE__ */ x(Hf, {
|
|
7469
7493
|
title: i,
|
|
7470
7494
|
okText: s,
|
|
7471
7495
|
onClickOk: c,
|
|
@@ -7479,14 +7503,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7479
7503
|
fullWidth: r,
|
|
7480
7504
|
testId: u,
|
|
7481
7505
|
children: e
|
|
7482
|
-
}),
|
|
7506
|
+
}), Wf = {
|
|
7483
7507
|
tree: "_tree_coxxe_1",
|
|
7484
7508
|
toggle: "_toggle_coxxe_8",
|
|
7485
7509
|
dropTarget: "_dropTarget_coxxe_15",
|
|
7486
7510
|
placeholder: "_placeholder_coxxe_30",
|
|
7487
7511
|
draggingSource: "_draggingSource_coxxe_36",
|
|
7488
7512
|
placeholderContainer: "_placeholderContainer_coxxe_39"
|
|
7489
|
-
},
|
|
7513
|
+
}, Gf = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
|
|
7490
7514
|
let { id: l, data: u } = t, { active: d, disabled: f, testId: p, onClick: m, actions: h = [] } = u, [g, _] = e.useState(!1), [v, b] = e.useState(0), C = (e) => {
|
|
7491
7515
|
e.stopPropagation(), i(l);
|
|
7492
7516
|
}, w = (e) => {
|
|
@@ -7513,7 +7537,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7513
7537
|
className: y(Z.itemHeader, g ? Z.noPointerEvents : ""),
|
|
7514
7538
|
children: [
|
|
7515
7539
|
a && /* @__PURE__ */ x("div", {
|
|
7516
|
-
className:
|
|
7540
|
+
className: Wf.toggle,
|
|
7517
7541
|
children: /* @__PURE__ */ x(q, {
|
|
7518
7542
|
basic: !0,
|
|
7519
7543
|
colored: r ? !0 : mi.MUTED,
|
|
@@ -7527,10 +7551,10 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7527
7551
|
className: Z.drag,
|
|
7528
7552
|
children: /* @__PURE__ */ x(G, { icon: U.DRAG })
|
|
7529
7553
|
}),
|
|
7530
|
-
/* @__PURE__ */ x(
|
|
7554
|
+
/* @__PURE__ */ x(yd, { item: u }),
|
|
7531
7555
|
/* @__PURE__ */ S("div", {
|
|
7532
7556
|
className: Z.right,
|
|
7533
|
-
children: [/* @__PURE__ */ x(
|
|
7557
|
+
children: [/* @__PURE__ */ x(bd, { item: u }), !f && h.length > 0 && /* @__PURE__ */ x("div", {
|
|
7534
7558
|
className: Z.actions,
|
|
7535
7559
|
children: /* @__PURE__ */ x(Ua, { actions: h })
|
|
7536
7560
|
})]
|
|
@@ -7538,10 +7562,10 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7538
7562
|
]
|
|
7539
7563
|
})
|
|
7540
7564
|
});
|
|
7541
|
-
},
|
|
7542
|
-
className:
|
|
7565
|
+
}, Kf = ({ depth: e, indent: t = "var(--size-sm)" }) => /* @__PURE__ */ x("div", {
|
|
7566
|
+
className: Wf.placeholder,
|
|
7543
7567
|
style: { left: `calc(${t} * ${e})` }
|
|
7544
|
-
}),
|
|
7568
|
+
}), qf = ({ 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: _, placeholderIndent: v }) => {
|
|
7545
7569
|
var y;
|
|
7546
7570
|
let b = c == null ? g(null) : c, C = (e) => {
|
|
7547
7571
|
i && i(e);
|
|
@@ -7599,7 +7623,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7599
7623
|
"data-testid": a,
|
|
7600
7624
|
className: Z.list,
|
|
7601
7625
|
style: { height: h },
|
|
7602
|
-
children: [e.name && !e.noHeader && /* @__PURE__ */ x(
|
|
7626
|
+
children: [e.name && !e.noHeader && /* @__PURE__ */ x(gd, {
|
|
7603
7627
|
name: e.name,
|
|
7604
7628
|
actions: e.actions,
|
|
7605
7629
|
stickyHeader: m
|
|
@@ -7626,7 +7650,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7626
7650
|
hasChild: r,
|
|
7627
7651
|
isOpen: a,
|
|
7628
7652
|
onToggle: o
|
|
7629
|
-
}) : /* @__PURE__ */ x(
|
|
7653
|
+
}) : /* @__PURE__ */ x(Gf, {
|
|
7630
7654
|
hasChild: l ? l(e) : r,
|
|
7631
7655
|
node: e,
|
|
7632
7656
|
depth: t,
|
|
@@ -7642,7 +7666,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7642
7666
|
onDrop: A,
|
|
7643
7667
|
onChangeOpen: C,
|
|
7644
7668
|
dropTargetOffset: 10,
|
|
7645
|
-
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ x(
|
|
7669
|
+
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ x(Kf, {
|
|
7646
7670
|
depth: t,
|
|
7647
7671
|
indent: v
|
|
7648
7672
|
}),
|
|
@@ -7650,17 +7674,17 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7650
7674
|
listComponent: "div",
|
|
7651
7675
|
listItemComponent: "div",
|
|
7652
7676
|
classes: {
|
|
7653
|
-
root:
|
|
7654
|
-
draggingSource:
|
|
7655
|
-
dropTarget:
|
|
7656
|
-
placeholder:
|
|
7677
|
+
root: Wf.tree,
|
|
7678
|
+
draggingSource: Wf.draggingSource,
|
|
7679
|
+
dropTarget: Wf.dropTarget,
|
|
7680
|
+
placeholder: Wf.placeholderContainer
|
|
7657
7681
|
},
|
|
7658
7682
|
initialOpen: o,
|
|
7659
7683
|
enableAnimateExpand: !0
|
|
7660
7684
|
})
|
|
7661
7685
|
})]
|
|
7662
7686
|
});
|
|
7663
|
-
},
|
|
7687
|
+
}, Jf = {
|
|
7664
7688
|
treeTable: "_treeTable_1ywvy_1",
|
|
7665
7689
|
treeTableHeader: "_treeTableHeader_1ywvy_22",
|
|
7666
7690
|
folderCell: "_folderCell_1ywvy_30",
|
|
@@ -7668,48 +7692,48 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7668
7692
|
drag: "_drag_1ywvy_31",
|
|
7669
7693
|
folder: "_folder_1ywvy_30",
|
|
7670
7694
|
active: "_active_1ywvy_61"
|
|
7671
|
-
},
|
|
7695
|
+
}, Yf = (e, t) => e.filter((e) => e.parent === t).flatMap((t) => [t.id, ...Yf(e, t.id)]), Xf = (e, t) => {
|
|
7672
7696
|
let n = new Set(t);
|
|
7673
7697
|
return e.filter((e) => !n.has(e.id)).map((e) => e.id);
|
|
7674
|
-
},
|
|
7698
|
+
}, Zf = (e, t, n) => e.filter((e) => n.has(e) || !t.has(e)), Qf = (e, t, n, r = []) => {
|
|
7675
7699
|
let i = new Set(n), a = new Set(r), o = e.filter((e) => e.parent === t && !a.has(e.id));
|
|
7676
7700
|
if (o.length === 0) return {
|
|
7677
7701
|
checked: i.has(t),
|
|
7678
7702
|
indeterminate: !1
|
|
7679
7703
|
};
|
|
7680
|
-
let s = o.map((t) =>
|
|
7704
|
+
let s = o.map((t) => Qf(e, t.id, n, r)), c = s.filter((e) => e.checked).length, l = s.filter((e) => e.indeterminate).length, u = c === o.length;
|
|
7681
7705
|
return {
|
|
7682
7706
|
checked: u,
|
|
7683
7707
|
indeterminate: c + l > 0 && !u
|
|
7684
7708
|
};
|
|
7685
|
-
},
|
|
7686
|
-
let r =
|
|
7709
|
+
}, $f = (e, t, n = []) => {
|
|
7710
|
+
let r = Xf(e, n), i = new Set(t), a = r.filter((e) => i.has(e)).length;
|
|
7687
7711
|
return {
|
|
7688
7712
|
checked: r.length > 0 && a === r.length,
|
|
7689
7713
|
indeterminate: a > 0 && a < r.length
|
|
7690
7714
|
};
|
|
7691
|
-
},
|
|
7715
|
+
}, ep = i(null), tp = () => u(ep), np = ({ children: e, rowCheckboxes: t, rows: n }) => {
|
|
7692
7716
|
let r = t !== void 0, { checkedIds: i = [], disabledIds: a = [], getTooltip: o, onChange: s } = t == null ? {} : t, c = m(() => new Set(a), [a]), u = m(() => {
|
|
7693
7717
|
if (!r) return null;
|
|
7694
7718
|
let e = /* @__PURE__ */ new Map();
|
|
7695
|
-
for (let t of n) e.set(t.id,
|
|
7719
|
+
for (let t of n) e.set(t.id, Qf(n, t.id, i, a));
|
|
7696
7720
|
return e;
|
|
7697
7721
|
}, [
|
|
7698
7722
|
i,
|
|
7699
7723
|
a,
|
|
7700
7724
|
r,
|
|
7701
7725
|
n
|
|
7702
|
-
]), d = m(() => r ?
|
|
7726
|
+
]), d = m(() => r ? $f(n, i, a) : void 0, [
|
|
7703
7727
|
i,
|
|
7704
7728
|
a,
|
|
7705
7729
|
r,
|
|
7706
7730
|
n
|
|
7707
7731
|
]), f = l((e) => u == null ? void 0 : u.get(e), [u]), p = l((e) => c.has(e), [c]), h = l((e) => o == null ? void 0 : o(e), [o]), g = l((e) => {
|
|
7708
7732
|
if (!r || c.has(e)) return;
|
|
7709
|
-
let t =
|
|
7733
|
+
let t = Yf(n, e), o = [e, ...t.filter((e) => !c.has(e))], l = [e, ...t], { checked: u } = Qf(n, e, i, a);
|
|
7710
7734
|
if (u) {
|
|
7711
7735
|
let e = new Set(l);
|
|
7712
|
-
s == null || s(
|
|
7736
|
+
s == null || s(Zf(i, e, c));
|
|
7713
7737
|
} else s == null || s([.../* @__PURE__ */ new Set([...i, ...o])]);
|
|
7714
7738
|
}, [
|
|
7715
7739
|
i,
|
|
@@ -7720,7 +7744,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7720
7744
|
n
|
|
7721
7745
|
]), _ = l(() => {
|
|
7722
7746
|
if (!r) return;
|
|
7723
|
-
let e =
|
|
7747
|
+
let e = Xf(n, a), { checked: t } = $f(n, i, a);
|
|
7724
7748
|
t ? s == null || s(i.filter((e) => c.has(e))) : s == null || s([.../* @__PURE__ */ new Set([...i, ...e])]);
|
|
7725
7749
|
}, [
|
|
7726
7750
|
i,
|
|
@@ -7746,12 +7770,12 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7746
7770
|
_,
|
|
7747
7771
|
g
|
|
7748
7772
|
]);
|
|
7749
|
-
return /* @__PURE__ */ x(
|
|
7773
|
+
return /* @__PURE__ */ x(ep.Provider, {
|
|
7750
7774
|
value: v,
|
|
7751
7775
|
children: e
|
|
7752
7776
|
});
|
|
7753
|
-
},
|
|
7754
|
-
let h =
|
|
7777
|
+
}, rp = ({ 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 }) => {
|
|
7778
|
+
let h = tp(), g = h != null && h.enabled ? h.getRowCheckState(l.id) : void 0, _ = g == null ? void 0 : g.checked, v = g == null ? void 0 : g.indeterminate, b = h == null ? void 0 : h.isRowCheckDisabled(l.id), C = 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) => {
|
|
7755
7779
|
let r = t ? t[e] : void 0;
|
|
7756
7780
|
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${M ? n + 1 : n})`})` : r;
|
|
7757
7781
|
};
|
|
@@ -7764,7 +7788,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7764
7788
|
onDragLeave: f,
|
|
7765
7789
|
children: /* @__PURE__ */ x("tbody", { children: /* @__PURE__ */ S("tr", {
|
|
7766
7790
|
onClick: j,
|
|
7767
|
-
className: y(
|
|
7791
|
+
className: y(Jf.treeTableRow, A ? Jf.active : void 0),
|
|
7768
7792
|
children: [
|
|
7769
7793
|
C && /* @__PURE__ */ x(zl, {
|
|
7770
7794
|
isHeader: !1,
|
|
@@ -7778,19 +7802,19 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7778
7802
|
}
|
|
7779
7803
|
}),
|
|
7780
7804
|
r && /* @__PURE__ */ x("td", {
|
|
7781
|
-
className:
|
|
7805
|
+
className: Jf.dragCell,
|
|
7782
7806
|
children: /* @__PURE__ */ x("div", {
|
|
7783
|
-
className:
|
|
7807
|
+
className: Jf.drag,
|
|
7784
7808
|
onClick: (e) => e.stopPropagation(),
|
|
7785
7809
|
ref: i,
|
|
7786
7810
|
children: /* @__PURE__ */ x(G, { icon: U.DRAG })
|
|
7787
7811
|
})
|
|
7788
7812
|
}),
|
|
7789
|
-
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ x("td", { className:
|
|
7813
|
+
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ x("td", { className: Jf.folderCell }, t)),
|
|
7790
7814
|
M && /* @__PURE__ */ x("td", {
|
|
7791
|
-
className:
|
|
7815
|
+
className: Jf.folderCell,
|
|
7792
7816
|
children: /* @__PURE__ */ x("div", {
|
|
7793
|
-
className:
|
|
7817
|
+
className: Jf.folder,
|
|
7794
7818
|
onClick: () => m(E),
|
|
7795
7819
|
onMouseDown: (e) => e.stopPropagation(),
|
|
7796
7820
|
children: /* @__PURE__ */ x(q, {
|
|
@@ -7822,10 +7846,10 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7822
7846
|
]
|
|
7823
7847
|
}) })
|
|
7824
7848
|
});
|
|
7825
|
-
},
|
|
7826
|
-
let a =
|
|
7849
|
+
}, ip = ({ columnAlignment: e, columnWidths: t, draggable: n, hasRowActions: r, headers: i }) => {
|
|
7850
|
+
let a = tp(), o = a == null ? void 0 : a.headerCheckState, s = (a == null ? void 0 : a.enabled) && o !== void 0;
|
|
7827
7851
|
return /* @__PURE__ */ x("table", {
|
|
7828
|
-
className: y(Vs.table,
|
|
7852
|
+
className: y(Vs.table, Jf.treeTableHeader),
|
|
7829
7853
|
children: /* @__PURE__ */ x("thead", { children: i.map((i, c) => /* @__PURE__ */ S("tr", { children: [
|
|
7830
7854
|
s && c === 0 ? /* @__PURE__ */ x(zl, {
|
|
7831
7855
|
isHeader: !0,
|
|
@@ -7836,7 +7860,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7836
7860
|
onChange: a.toggleHeaderCheck
|
|
7837
7861
|
}
|
|
7838
7862
|
}) : s ? /* @__PURE__ */ x("td", {}) : null,
|
|
7839
|
-
n && /* @__PURE__ */ x("th", { className:
|
|
7863
|
+
n && /* @__PURE__ */ x("th", { className: Jf.dragCell }),
|
|
7840
7864
|
i.cells.map((n, r) => {
|
|
7841
7865
|
let i = t ? t[r] : void 0, a = e ? e[r] : void 0;
|
|
7842
7866
|
return /* @__PURE__ */ x(zl, {
|
|
@@ -7856,22 +7880,22 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7856
7880
|
})
|
|
7857
7881
|
] }, c)) })
|
|
7858
7882
|
});
|
|
7859
|
-
},
|
|
7883
|
+
}, ap = ({ 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 }) => {
|
|
7860
7884
|
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: v = [] } = d, y = cl(v, _ == null ? [] : _);
|
|
7861
|
-
return /* @__PURE__ */ x(
|
|
7885
|
+
return /* @__PURE__ */ x(np, {
|
|
7862
7886
|
rowCheckboxes: u,
|
|
7863
7887
|
rows: v,
|
|
7864
7888
|
children: /* @__PURE__ */ S("div", {
|
|
7865
|
-
className:
|
|
7889
|
+
className: Jf.treeTable,
|
|
7866
7890
|
"data-testid": f,
|
|
7867
7891
|
style: { width: g },
|
|
7868
|
-
children: [!!_ && /* @__PURE__ */ x(
|
|
7892
|
+
children: [!!_ && /* @__PURE__ */ x(ip, {
|
|
7869
7893
|
columnAlignment: m,
|
|
7870
7894
|
columnWidths: h,
|
|
7871
7895
|
draggable: r,
|
|
7872
7896
|
hasRowActions: y,
|
|
7873
7897
|
headers: _
|
|
7874
|
-
}), /* @__PURE__ */ x(
|
|
7898
|
+
}), /* @__PURE__ */ x(qf, {
|
|
7875
7899
|
allowParentReassignment: e,
|
|
7876
7900
|
autoOpenActiveItems: t,
|
|
7877
7901
|
canDrop: n,
|
|
@@ -7887,7 +7911,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7887
7911
|
onItemToggle: s,
|
|
7888
7912
|
onListReorder: c,
|
|
7889
7913
|
placeholderIndent: "var(--size)",
|
|
7890
|
-
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ x(
|
|
7914
|
+
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ x(rp, {
|
|
7891
7915
|
node: e,
|
|
7892
7916
|
columnAlignment: m,
|
|
7893
7917
|
columnWidths: h,
|
|
@@ -7904,10 +7928,10 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7904
7928
|
})]
|
|
7905
7929
|
})
|
|
7906
7930
|
});
|
|
7907
|
-
},
|
|
7931
|
+
}, op = Object.freeze({
|
|
7908
7932
|
Translations: "translations",
|
|
7909
7933
|
LanguageKey: "languageKey"
|
|
7910
|
-
}),
|
|
7934
|
+
}), sp = {
|
|
7911
7935
|
unified: "Unified",
|
|
7912
7936
|
split: "Split",
|
|
7913
7937
|
changesTooLarge: "Changes are too large to be shown",
|
|
@@ -7930,82 +7954,63 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7930
7954
|
showAll: "Show all",
|
|
7931
7955
|
unknown: "Unknown",
|
|
7932
7956
|
unexpectedError: "Unexpected error"
|
|
7933
|
-
},
|
|
7957
|
+
}, cp = (e) => Object.keys(sp).reduce((t, n) => ({
|
|
7934
7958
|
...t,
|
|
7935
|
-
[n]: (e == null ? void 0 : e[n]) || (
|
|
7936
|
-
}), {}),
|
|
7937
|
-
[
|
|
7938
|
-
[
|
|
7939
|
-
},
|
|
7940
|
-
|
|
7941
|
-
},
|
|
7959
|
+
[n]: (e == null ? void 0 : e[n]) || (sp == null ? void 0 : sp[n])
|
|
7960
|
+
}), {}), lp = {
|
|
7961
|
+
[op.Translations]: cp(),
|
|
7962
|
+
[op.LanguageKey]: "en"
|
|
7963
|
+
}, up = (e) => e ? lp[e] : lp, dp = (e, t) => {
|
|
7964
|
+
lp[e] = t;
|
|
7965
|
+
}, fp = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
|
|
7942
7966
|
var a;
|
|
7943
|
-
let { unitTemplate: o = null } = (a =
|
|
7944
|
-
return e[n] = r == null ?
|
|
7967
|
+
let { unitTemplate: o = null } = (a = vf()) == null ? {} : a;
|
|
7968
|
+
return e[n] = r == null ? sf(n, o) : r, t[n] = i, {
|
|
7945
7969
|
preferredUnits: e,
|
|
7946
7970
|
storageUnits: t
|
|
7947
7971
|
};
|
|
7948
7972
|
}, {
|
|
7949
7973
|
preferredUnits: {},
|
|
7950
7974
|
storageUnits: {}
|
|
7951
|
-
}),
|
|
7975
|
+
}), pp = ({ row: e, selectedUnits: t, storageUnits: n, convertBackToStorageUnit: r, enableCosmeticRounding: i, enableDisplayRounding: a }) => ({
|
|
7952
7976
|
...e,
|
|
7953
|
-
|
|
7954
|
-
...e.target,
|
|
7955
|
-
value: r,
|
|
7956
|
-
rowIndex: t,
|
|
7957
|
-
cellIndex: n,
|
|
7958
|
-
...i === void 0 ? {} : { unit: i }
|
|
7959
|
-
}
|
|
7960
|
-
}), dp = (e) => e.type === Rl.INPUT || e.type === Rl.NUMBER_INPUT, fp = ({ row: e, rowIndex: t, selectedUnits: n, storageUnits: r, convertBackToStorageUnit: i, enableCosmeticRounding: a, enableDisplayRounding: o }) => ({
|
|
7961
|
-
...e,
|
|
7962
|
-
cells: e.cells.map((e, s) => {
|
|
7977
|
+
cells: e.cells.map((e) => {
|
|
7963
7978
|
if ("autoUnit" in e && e.autoUnit && (typeof e.value == "string" || typeof e.value == "number")) {
|
|
7964
|
-
let { unitKey:
|
|
7965
|
-
value: gr(
|
|
7966
|
-
unitkey:
|
|
7967
|
-
toUnit:
|
|
7968
|
-
fromUnit:
|
|
7969
|
-
}),
|
|
7979
|
+
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 } = ff({
|
|
7980
|
+
value: gr(s),
|
|
7981
|
+
unitkey: o,
|
|
7982
|
+
toUnit: u,
|
|
7983
|
+
fromUnit: d
|
|
7984
|
+
}), m = f ? p : e.value, h = c ? c(m, u) : m;
|
|
7970
7985
|
return {
|
|
7971
7986
|
...e,
|
|
7972
|
-
value:
|
|
7973
|
-
enableCosmeticRounding:
|
|
7974
|
-
enableDisplayRounding:
|
|
7975
|
-
roundDisplayValue:
|
|
7987
|
+
value: h,
|
|
7988
|
+
enableCosmeticRounding: i,
|
|
7989
|
+
enableDisplayRounding: a,
|
|
7990
|
+
roundDisplayValue: l,
|
|
7976
7991
|
selectOnFocus: !0,
|
|
7977
|
-
onChange: (
|
|
7978
|
-
let { value:
|
|
7979
|
-
value: String(
|
|
7980
|
-
unitkey:
|
|
7992
|
+
onChange: (t) => {
|
|
7993
|
+
let n = t, { value: i } = n.target, a = r ? d : u, { value: s = i } = ff({
|
|
7994
|
+
value: String(i),
|
|
7995
|
+
unitkey: o,
|
|
7981
7996
|
toUnit: a,
|
|
7982
|
-
fromUnit:
|
|
7983
|
-
}),
|
|
7984
|
-
"onChange" in e && typeof e.onChange == "function" && e.onChange(
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
|
|
7990
|
-
|
|
7997
|
+
fromUnit: u
|
|
7998
|
+
}), c = f ? s : i;
|
|
7999
|
+
"onChange" in e && typeof e.onChange == "function" && e.onChange({
|
|
8000
|
+
...n,
|
|
8001
|
+
target: {
|
|
8002
|
+
...n.target,
|
|
8003
|
+
value: String(c),
|
|
8004
|
+
unit: a
|
|
8005
|
+
}
|
|
8006
|
+
});
|
|
7991
8007
|
}
|
|
7992
8008
|
};
|
|
7993
8009
|
}
|
|
7994
|
-
return
|
|
7995
|
-
...e,
|
|
7996
|
-
onChange: (n) => {
|
|
7997
|
-
var r;
|
|
7998
|
-
(r = e.onChange) == null || r.call(e, up({
|
|
7999
|
-
event: n,
|
|
8000
|
-
rowIndex: t,
|
|
8001
|
-
cellIndex: s,
|
|
8002
|
-
value: n.target.value
|
|
8003
|
-
}));
|
|
8004
|
-
}
|
|
8005
|
-
} : e;
|
|
8010
|
+
return e;
|
|
8006
8011
|
})
|
|
8007
|
-
}),
|
|
8008
|
-
let { translations: i } =
|
|
8012
|
+
}), mp = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
|
|
8013
|
+
let { translations: i } = up();
|
|
8009
8014
|
return e ? e.map((e) => ({
|
|
8010
8015
|
...e,
|
|
8011
8016
|
cells: e.cells.map((e) => {
|
|
@@ -8034,8 +8039,8 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8034
8039
|
return e;
|
|
8035
8040
|
})
|
|
8036
8041
|
})) : [];
|
|
8037
|
-
},
|
|
8038
|
-
let { headers: c, ...u } = e, { storageUnits: f, preferredUnits: p } =
|
|
8042
|
+
}, hp = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: o, beforeRenderRow: s }) => {
|
|
8043
|
+
let { headers: c, ...u } = e, { storageUnits: f, preferredUnits: p } = fp(t), m = of(p), [h, g] = _(p), v = ({ unitKey: e, value: n }) => {
|
|
8039
8044
|
g((t) => ({
|
|
8040
8045
|
...t,
|
|
8041
8046
|
[e]: n
|
|
@@ -8046,12 +8051,11 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8046
8051
|
newUnit: n,
|
|
8047
8052
|
unitKey: e
|
|
8048
8053
|
});
|
|
8049
|
-
}, y = l(({ row: e, rowIndex: t }) =>
|
|
8054
|
+
}, y = l(({ row: e, rowIndex: t }) => pp({
|
|
8050
8055
|
row: s ? s({
|
|
8051
8056
|
row: e,
|
|
8052
8057
|
rowIndex: t
|
|
8053
8058
|
}) : e,
|
|
8054
|
-
rowIndex: t,
|
|
8055
8059
|
selectedUnits: h,
|
|
8056
8060
|
storageUnits: f,
|
|
8057
8061
|
convertBackToStorageUnit: n,
|
|
@@ -8072,10 +8076,10 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8072
8076
|
value: n
|
|
8073
8077
|
});
|
|
8074
8078
|
});
|
|
8075
|
-
}, [t]), /* @__PURE__ */ x(
|
|
8079
|
+
}, [t]), /* @__PURE__ */ x(Jl, {
|
|
8076
8080
|
table: {
|
|
8077
8081
|
...u,
|
|
8078
|
-
headers:
|
|
8082
|
+
headers: mp({
|
|
8079
8083
|
headers: e.headers,
|
|
8080
8084
|
selectedUnits: h,
|
|
8081
8085
|
storageUnits: f,
|
|
@@ -8086,8 +8090,8 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8086
8090
|
canListReorder: o,
|
|
8087
8091
|
beforeRenderRow: y
|
|
8088
8092
|
});
|
|
8089
|
-
},
|
|
8090
|
-
let { translations: d } =
|
|
8093
|
+
}, gp = { settingField: "_settingField_1x02n_1" }, _p = ({ 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 }) => {
|
|
8094
|
+
let { translations: d } = up(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ S(e.Fragment, { children: [t, /* @__PURE__ */ x("br", {})] }, n)), p = [
|
|
8091
8095
|
...r ? [] : [{
|
|
8092
8096
|
label: d == null ? void 0 : d.allUsers,
|
|
8093
8097
|
value: !1
|
|
@@ -8102,14 +8106,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8102
8106
|
}] : []
|
|
8103
8107
|
], m = a !== void 0 && o !== void 0 && !ln(a, o);
|
|
8104
8108
|
return /* @__PURE__ */ S("div", {
|
|
8105
|
-
className:
|
|
8109
|
+
className: gp.settingField,
|
|
8106
8110
|
"data-testid": u,
|
|
8107
|
-
children: [/* @__PURE__ */ S(
|
|
8111
|
+
children: [/* @__PURE__ */ S(fd, {
|
|
8108
8112
|
justifyContent: "space-between",
|
|
8109
8113
|
wrap: !1,
|
|
8110
8114
|
children: [i, !s && /* @__PURE__ */ x("div", {
|
|
8111
8115
|
style: { flexShrink: 0 },
|
|
8112
|
-
children: /* @__PURE__ */ S(
|
|
8116
|
+
children: /* @__PURE__ */ S(fd, {
|
|
8113
8117
|
gap: "8px",
|
|
8114
8118
|
alignItems: "center",
|
|
8115
8119
|
children: [m && /* @__PURE__ */ x(ta, {
|
|
@@ -8134,19 +8138,19 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8134
8138
|
children: f(t)
|
|
8135
8139
|
})]
|
|
8136
8140
|
});
|
|
8137
|
-
},
|
|
8141
|
+
}, vp = (e, t) => {
|
|
8138
8142
|
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;
|
|
8139
8143
|
return {
|
|
8140
8144
|
added: Math.max(0, i),
|
|
8141
8145
|
removed: Math.max(0, a)
|
|
8142
8146
|
};
|
|
8143
|
-
},
|
|
8147
|
+
}, yp = "split", bp = "unified", xp = ({ oldJson: e, newJson: t, viewType: n = yp }) => {
|
|
8144
8148
|
var r, i;
|
|
8145
|
-
let { translations: a } =
|
|
8146
|
-
value:
|
|
8149
|
+
let { translations: a } = up(), [o, s] = _(n), c = [{
|
|
8150
|
+
value: yp,
|
|
8147
8151
|
label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
|
|
8148
8152
|
}, {
|
|
8149
|
-
value:
|
|
8153
|
+
value: bp,
|
|
8150
8154
|
label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
|
|
8151
8155
|
}];
|
|
8152
8156
|
d(() => {
|
|
@@ -8154,10 +8158,10 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8154
8158
|
}, [n]);
|
|
8155
8159
|
let l = ({ target: { value: e } }) => {
|
|
8156
8160
|
s(e);
|
|
8157
|
-
}, { added: u, removed: f } =
|
|
8161
|
+
}, { added: u, removed: f } = vp(e, t), p = u + f > 3500;
|
|
8158
8162
|
return /* @__PURE__ */ x(b, { children: /* @__PURE__ */ x(Za, {
|
|
8159
8163
|
bordered: !0,
|
|
8160
|
-
heading: /* @__PURE__ */ S(
|
|
8164
|
+
heading: /* @__PURE__ */ S(fd, {
|
|
8161
8165
|
gap: !0,
|
|
8162
8166
|
children: [/* @__PURE__ */ x(Yo, { children: /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S(Uo, {
|
|
8163
8167
|
success: !0,
|
|
@@ -8169,7 +8173,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8169
8173
|
}), /* @__PURE__ */ S(Uo, {
|
|
8170
8174
|
error: !0,
|
|
8171
8175
|
children: ["-", f]
|
|
8172
|
-
})] }) }), !p && /* @__PURE__ */ x(
|
|
8176
|
+
})] }) }), !p && /* @__PURE__ */ x(Hd, {
|
|
8173
8177
|
name: "viewType",
|
|
8174
8178
|
options: c,
|
|
8175
8179
|
value: o,
|
|
@@ -8187,14 +8191,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8187
8191
|
}) : /* @__PURE__ */ x(ui, {
|
|
8188
8192
|
oldValue: e,
|
|
8189
8193
|
newValue: t,
|
|
8190
|
-
splitView: o ===
|
|
8194
|
+
splitView: o === yp,
|
|
8191
8195
|
compareMethod: di.WORDS
|
|
8192
8196
|
})
|
|
8193
8197
|
}) });
|
|
8194
8198
|
};
|
|
8195
8199
|
//#endregion
|
|
8196
8200
|
//#region src/helpers/date.ts
|
|
8197
|
-
function
|
|
8201
|
+
function Sp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
8198
8202
|
return e ? new Date(e).toLocaleString(a, {
|
|
8199
8203
|
year: "numeric",
|
|
8200
8204
|
month: "short",
|
|
@@ -8208,28 +8212,28 @@ function xp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
8208
8212
|
}
|
|
8209
8213
|
//#endregion
|
|
8210
8214
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
8211
|
-
function
|
|
8215
|
+
function Cp(e) {
|
|
8212
8216
|
var t;
|
|
8213
8217
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
8214
8218
|
if (!n) throw Error("Invalid RegExp");
|
|
8215
8219
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
8216
8220
|
}
|
|
8217
|
-
function
|
|
8221
|
+
function wp(e) {
|
|
8218
8222
|
if (typeof e != "object") return e;
|
|
8219
8223
|
if (e === null) return null;
|
|
8220
|
-
if (Array.isArray(e)) return e.map(
|
|
8224
|
+
if (Array.isArray(e)) return e.map(wp);
|
|
8221
8225
|
if (e instanceof Date) return new Date(e.getTime());
|
|
8222
|
-
if (e instanceof RegExp) return
|
|
8226
|
+
if (e instanceof RegExp) return Cp(e);
|
|
8223
8227
|
let t = {};
|
|
8224
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
8228
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = wp(e[n]));
|
|
8225
8229
|
return t;
|
|
8226
8230
|
}
|
|
8227
8231
|
//#endregion
|
|
8228
8232
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
8229
|
-
function
|
|
8233
|
+
function Tp(e, t) {
|
|
8230
8234
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
8231
8235
|
}
|
|
8232
|
-
var
|
|
8236
|
+
var Ep = (e) => e[e.length - 1], Dp = class {
|
|
8233
8237
|
setResult(e) {
|
|
8234
8238
|
return this.result = e, this.hasResult = !0, this;
|
|
8235
8239
|
}
|
|
@@ -8237,16 +8241,16 @@ var Tp = (e) => e[e.length - 1], Ep = class {
|
|
|
8237
8241
|
return this.exiting = !0, this;
|
|
8238
8242
|
}
|
|
8239
8243
|
push(e, t) {
|
|
8240
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
8244
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (Tp(this.children), Ep(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
8241
8245
|
}
|
|
8242
|
-
},
|
|
8246
|
+
}, Op = class extends Dp {
|
|
8243
8247
|
constructor(e, t) {
|
|
8244
8248
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
8245
8249
|
}
|
|
8246
8250
|
prepareDeltaResult(e) {
|
|
8247
8251
|
var t, n, r, i;
|
|
8248
8252
|
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)) {
|
|
8249
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
8253
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : wp;
|
|
8250
8254
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
8251
8255
|
}
|
|
8252
8256
|
return e;
|
|
@@ -8254,15 +8258,15 @@ var Tp = (e) => e[e.length - 1], Ep = class {
|
|
|
8254
8258
|
setResult(e) {
|
|
8255
8259
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
8256
8260
|
}
|
|
8257
|
-
},
|
|
8261
|
+
}, kp = class extends Dp {
|
|
8258
8262
|
constructor(e, t) {
|
|
8259
8263
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
8260
8264
|
}
|
|
8261
|
-
},
|
|
8265
|
+
}, Ap = class extends Dp {
|
|
8262
8266
|
constructor(e) {
|
|
8263
8267
|
super(), this.delta = e, this.pipe = "reverse";
|
|
8264
8268
|
}
|
|
8265
|
-
},
|
|
8269
|
+
}, jp = class {
|
|
8266
8270
|
constructor(e) {
|
|
8267
8271
|
this.name = e, this.filters = [];
|
|
8268
8272
|
}
|
|
@@ -8326,7 +8330,7 @@ var Tp = (e) => e[e.length - 1], Ep = class {
|
|
|
8326
8330
|
}
|
|
8327
8331
|
}), this);
|
|
8328
8332
|
}
|
|
8329
|
-
},
|
|
8333
|
+
}, Mp = class {
|
|
8330
8334
|
constructor(e) {
|
|
8331
8335
|
this.selfOptions = e || {}, this.pipes = {};
|
|
8332
8336
|
}
|
|
@@ -8353,7 +8357,7 @@ var Tp = (e) => e[e.length - 1], Ep = class {
|
|
|
8353
8357
|
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);
|
|
8354
8358
|
return n.hasResult ? n.result : void 0;
|
|
8355
8359
|
}
|
|
8356
|
-
},
|
|
8360
|
+
}, Np = (e, t, n, r) => e[n] === t[r], Pp = (e, t, n, r) => {
|
|
8357
8361
|
var i, a, o;
|
|
8358
8362
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
8359
8363
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -8369,7 +8373,7 @@ var Tp = (e) => e[e.length - 1], Ep = class {
|
|
|
8369
8373
|
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);
|
|
8370
8374
|
}
|
|
8371
8375
|
return d;
|
|
8372
|
-
},
|
|
8376
|
+
}, Fp = (e, t, n, r) => {
|
|
8373
8377
|
let i = t.length, a = n.length, o = {
|
|
8374
8378
|
sequence: [],
|
|
8375
8379
|
indices1: [],
|
|
@@ -8391,11 +8395,11 @@ var Tp = (e) => e[e.length - 1], Ep = class {
|
|
|
8391
8395
|
}
|
|
8392
8396
|
}
|
|
8393
8397
|
return o;
|
|
8394
|
-
},
|
|
8398
|
+
}, Ip = { get: (e, t, n, r) => {
|
|
8395
8399
|
let i = r || {};
|
|
8396
|
-
return Pp(
|
|
8397
|
-
} },
|
|
8398
|
-
function
|
|
8400
|
+
return Fp(Pp(e, t, n || Np, i), e, t, i);
|
|
8401
|
+
} }, Lp = 3;
|
|
8402
|
+
function Rp(e, t, n, r) {
|
|
8399
8403
|
for (let i = 0; i < n; i++) {
|
|
8400
8404
|
let n = e[i];
|
|
8401
8405
|
for (let e = 0; e < r; e++) {
|
|
@@ -8405,7 +8409,7 @@ function Lp(e, t, n, r) {
|
|
|
8405
8409
|
}
|
|
8406
8410
|
return !1;
|
|
8407
8411
|
}
|
|
8408
|
-
function
|
|
8412
|
+
function zp(e, t, n, r, i) {
|
|
8409
8413
|
let a = e[n], o = t[r];
|
|
8410
8414
|
if (a === o) return !0;
|
|
8411
8415
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -8418,15 +8422,15 @@ function Rp(e, t, n, r, i) {
|
|
|
8418
8422
|
let l = i.hashCache2[r];
|
|
8419
8423
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l !== void 0 && c === l;
|
|
8420
8424
|
}
|
|
8421
|
-
var
|
|
8425
|
+
var Bp = function(e) {
|
|
8422
8426
|
var t, n, r, i, a;
|
|
8423
8427
|
if (!e.leftIsArray) return;
|
|
8424
8428
|
let o = {
|
|
8425
8429
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
8426
8430
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
8427
8431
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
8428
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !
|
|
8429
|
-
for (; c + s < m && c + s < h &&
|
|
8432
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !Rp(f, p, m, h)); s < m && s < h && zp(f, p, s, s, o);) l = s, g = new Op(f[l], p[l]), e.push(g, l), s++;
|
|
8433
|
+
for (; c + s < m && c + s < h && zp(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new Op(f[u], p[d]), e.push(g, d), c++;
|
|
8430
8434
|
let _;
|
|
8431
8435
|
if (s + c === m) {
|
|
8432
8436
|
if (m === h) {
|
|
@@ -8450,7 +8454,7 @@ var zp = function(e) {
|
|
|
8450
8454
|
return;
|
|
8451
8455
|
}
|
|
8452
8456
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
8453
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
8457
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = Ip.get(v, y, zp, o), x = [];
|
|
8454
8458
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
8455
8459
|
let t = `_${l}`;
|
|
8456
8460
|
_[t] = [
|
|
@@ -8471,8 +8475,8 @@ var zp = function(e) {
|
|
|
8471
8475
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
8472
8476
|
u = x[n];
|
|
8473
8477
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
8474
|
-
if (u !== void 0 && r &&
|
|
8475
|
-
r.splice(1, 2, l,
|
|
8478
|
+
if (u !== void 0 && r && zp(v, y, u - s, l - s, o)) {
|
|
8479
|
+
r.splice(1, 2, l, Lp), r.splice(1, 2, l, Lp), C || (r[0] = ""), d = l, g = new Op(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
8476
8480
|
break;
|
|
8477
8481
|
}
|
|
8478
8482
|
}
|
|
@@ -8480,20 +8484,20 @@ var zp = function(e) {
|
|
|
8480
8484
|
} else {
|
|
8481
8485
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
8482
8486
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
8483
|
-
d = b.indices2[t] + s, g = new
|
|
8487
|
+
d = b.indices2[t] + s, g = new Op(f[u], p[d]), e.push(g, d);
|
|
8484
8488
|
}
|
|
8485
8489
|
}
|
|
8486
8490
|
e.setResult(_).exit();
|
|
8487
8491
|
};
|
|
8488
|
-
|
|
8489
|
-
var
|
|
8492
|
+
Bp.filterName = "arrays";
|
|
8493
|
+
var Vp = {
|
|
8490
8494
|
numerically(e, t) {
|
|
8491
8495
|
return e - t;
|
|
8492
8496
|
},
|
|
8493
8497
|
numericallyBy(e) {
|
|
8494
8498
|
return (t, n) => t[e] - n[e];
|
|
8495
8499
|
}
|
|
8496
|
-
},
|
|
8500
|
+
}, Hp = function(e) {
|
|
8497
8501
|
var t;
|
|
8498
8502
|
if (!e.nested) return;
|
|
8499
8503
|
let n = e.delta;
|
|
@@ -8502,7 +8506,7 @@ var Bp = {
|
|
|
8502
8506
|
for (r in a) if (r !== "_t") {
|
|
8503
8507
|
if (r[0] === "_") {
|
|
8504
8508
|
let e = r;
|
|
8505
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
8509
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === Lp)) s.push(Number.parseInt(r.slice(1), 10));
|
|
8506
8510
|
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]}`);
|
|
8507
8511
|
} else {
|
|
8508
8512
|
let e = r;
|
|
@@ -8515,15 +8519,15 @@ var Bp = {
|
|
|
8515
8519
|
});
|
|
8516
8520
|
}
|
|
8517
8521
|
}
|
|
8518
|
-
for (s = s.sort(
|
|
8522
|
+
for (s = s.sort(Vp.numerically), r = s.length - 1; r >= 0; r--) {
|
|
8519
8523
|
if (i = s[r], i === void 0) continue;
|
|
8520
8524
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
8521
|
-
(e == null ? void 0 : e[2]) ===
|
|
8525
|
+
(e == null ? void 0 : e[2]) === Lp && c.push({
|
|
8522
8526
|
index: e[1],
|
|
8523
8527
|
value: t
|
|
8524
8528
|
});
|
|
8525
8529
|
}
|
|
8526
|
-
c = c.sort(
|
|
8530
|
+
c = c.sort(Vp.numericallyBy("index"));
|
|
8527
8531
|
let u = c.length;
|
|
8528
8532
|
for (r = 0; r < u; r++) {
|
|
8529
8533
|
let e = c[r];
|
|
@@ -8533,7 +8537,7 @@ var Bp = {
|
|
|
8533
8537
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
8534
8538
|
let t = l[r];
|
|
8535
8539
|
if (t === void 0) continue;
|
|
8536
|
-
let n = new
|
|
8540
|
+
let n = new kp(o[t.index], t.delta);
|
|
8537
8541
|
e.push(n, t.index);
|
|
8538
8542
|
}
|
|
8539
8543
|
if (!e.children) {
|
|
@@ -8542,8 +8546,8 @@ var Bp = {
|
|
|
8542
8546
|
}
|
|
8543
8547
|
e.exit();
|
|
8544
8548
|
};
|
|
8545
|
-
|
|
8546
|
-
var
|
|
8549
|
+
Hp.filterName = "arrays";
|
|
8550
|
+
var Up = function(e) {
|
|
8547
8551
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
8548
8552
|
let t = e.left, n = e.children.length;
|
|
8549
8553
|
for (let r = 0; r < n; r++) {
|
|
@@ -8554,16 +8558,16 @@ var Hp = function(e) {
|
|
|
8554
8558
|
}
|
|
8555
8559
|
e.setResult(t).exit();
|
|
8556
8560
|
};
|
|
8557
|
-
|
|
8558
|
-
var
|
|
8561
|
+
Up.filterName = "arraysCollectChildren";
|
|
8562
|
+
var Wp = function(e) {
|
|
8559
8563
|
if (!e.nested) {
|
|
8560
8564
|
let t = e.delta;
|
|
8561
|
-
if (t[2] ===
|
|
8565
|
+
if (t[2] === Lp) {
|
|
8562
8566
|
let n = t;
|
|
8563
8567
|
e.newName = `_${n[1]}`, e.setResult([
|
|
8564
8568
|
n[0],
|
|
8565
8569
|
Number.parseInt(e.childName.substring(1), 10),
|
|
8566
|
-
|
|
8570
|
+
Lp
|
|
8567
8571
|
]).exit();
|
|
8568
8572
|
}
|
|
8569
8573
|
return;
|
|
@@ -8573,20 +8577,20 @@ var Up = function(e) {
|
|
|
8573
8577
|
let n = t;
|
|
8574
8578
|
for (let t in n) {
|
|
8575
8579
|
if (t === "_t") continue;
|
|
8576
|
-
let r = new
|
|
8580
|
+
let r = new Ap(n[t]);
|
|
8577
8581
|
e.push(r, t);
|
|
8578
8582
|
}
|
|
8579
8583
|
e.exit();
|
|
8580
8584
|
};
|
|
8581
|
-
|
|
8582
|
-
var
|
|
8585
|
+
Wp.filterName = "arrays";
|
|
8586
|
+
var Gp = (e, t, n) => {
|
|
8583
8587
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
8584
8588
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
8585
8589
|
let r = +t;
|
|
8586
8590
|
for (let n in e) {
|
|
8587
8591
|
let i = e[n];
|
|
8588
8592
|
if (Array.isArray(i)) {
|
|
8589
|
-
if (i[2] ===
|
|
8593
|
+
if (i[2] === Lp) {
|
|
8590
8594
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
8591
8595
|
if (a === +t) return e;
|
|
8592
8596
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
@@ -8594,7 +8598,7 @@ var Wp = (e, t, n) => {
|
|
|
8594
8598
|
}
|
|
8595
8599
|
}
|
|
8596
8600
|
return r;
|
|
8597
|
-
},
|
|
8601
|
+
}, Kp = (e) => {
|
|
8598
8602
|
if (!e || !e.children) return;
|
|
8599
8603
|
let t = e.delta;
|
|
8600
8604
|
if (t._t !== "a") return;
|
|
@@ -8605,22 +8609,22 @@ var Wp = (e, t, n) => {
|
|
|
8605
8609
|
let a = r.newName;
|
|
8606
8610
|
if (a === void 0) {
|
|
8607
8611
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
8608
|
-
a =
|
|
8612
|
+
a = Gp(n, r.childName, r.result);
|
|
8609
8613
|
}
|
|
8610
8614
|
i[a] !== r.result && (i[a] = r.result);
|
|
8611
8615
|
}
|
|
8612
8616
|
e.setResult(i).exit();
|
|
8613
8617
|
};
|
|
8614
|
-
|
|
8618
|
+
Kp.filterName = "arraysCollectChildren";
|
|
8615
8619
|
//#endregion
|
|
8616
8620
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
8617
|
-
var
|
|
8621
|
+
var qp = function(e) {
|
|
8618
8622
|
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();
|
|
8619
8623
|
};
|
|
8620
|
-
|
|
8624
|
+
qp.filterName = "dates";
|
|
8621
8625
|
//#endregion
|
|
8622
8626
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
8623
|
-
var
|
|
8627
|
+
var Jp = /* @__PURE__ */ new Set(["__proto__"]), Yp = (e) => {
|
|
8624
8628
|
if (!e || !e.children) return;
|
|
8625
8629
|
let t = e.children.length, n = e.result;
|
|
8626
8630
|
for (let r = 0; r < t; r++) {
|
|
@@ -8632,18 +8636,18 @@ var qp = /* @__PURE__ */ new Set(["__proto__"]), Jp = (e) => {
|
|
|
8632
8636
|
}
|
|
8633
8637
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
8634
8638
|
};
|
|
8635
|
-
|
|
8636
|
-
var
|
|
8639
|
+
Yp.filterName = "collectChildren";
|
|
8640
|
+
var Xp = (e) => {
|
|
8637
8641
|
var t;
|
|
8638
8642
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
8639
8643
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
8640
8644
|
for (let t in n) {
|
|
8641
8645
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
8642
|
-
let a = new
|
|
8646
|
+
let a = new Op(n[t], r[t]);
|
|
8643
8647
|
e.push(a, t);
|
|
8644
8648
|
}
|
|
8645
8649
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
8646
|
-
let n = new
|
|
8650
|
+
let n = new Op(void 0, r[t]);
|
|
8647
8651
|
e.push(n, t);
|
|
8648
8652
|
}
|
|
8649
8653
|
if (!e.children || e.children.length === 0) {
|
|
@@ -8652,15 +8656,15 @@ var Yp = (e) => {
|
|
|
8652
8656
|
}
|
|
8653
8657
|
e.exit();
|
|
8654
8658
|
};
|
|
8655
|
-
|
|
8656
|
-
var
|
|
8659
|
+
Xp.filterName = "objects";
|
|
8660
|
+
var Zp = function(e) {
|
|
8657
8661
|
if (!e.nested) return;
|
|
8658
8662
|
let t = e.delta;
|
|
8659
8663
|
if (t._t) return;
|
|
8660
8664
|
let n = t, r = !1;
|
|
8661
8665
|
for (let t in n) {
|
|
8662
|
-
if (
|
|
8663
|
-
let i = e.left, a = new
|
|
8666
|
+
if (Jp.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
8667
|
+
let i = e.left, a = new kp(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
8664
8668
|
e.push(a, t), r = !0;
|
|
8665
8669
|
}
|
|
8666
8670
|
if (!r) {
|
|
@@ -8669,8 +8673,8 @@ var Xp = function(e) {
|
|
|
8669
8673
|
}
|
|
8670
8674
|
e.exit();
|
|
8671
8675
|
};
|
|
8672
|
-
|
|
8673
|
-
var
|
|
8676
|
+
Zp.filterName = "objects";
|
|
8677
|
+
var Qp = function(e) {
|
|
8674
8678
|
if (!e || !e.children || e.delta._t) return;
|
|
8675
8679
|
if (e.left === null || typeof e.left != "object") {
|
|
8676
8680
|
e.setResult(e.left).exit();
|
|
@@ -8681,17 +8685,17 @@ var Zp = function(e) {
|
|
|
8681
8685
|
let n = e.children[r];
|
|
8682
8686
|
if (n === void 0) continue;
|
|
8683
8687
|
let i = n.childName;
|
|
8684
|
-
|
|
8688
|
+
Jp.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
8685
8689
|
}
|
|
8686
8690
|
e.setResult(t).exit();
|
|
8687
8691
|
};
|
|
8688
|
-
|
|
8689
|
-
var
|
|
8692
|
+
Qp.filterName = "collectChildren";
|
|
8693
|
+
var $p = function(e) {
|
|
8690
8694
|
if (!e.nested || e.delta._t) return;
|
|
8691
8695
|
let t = e.delta, n = !1;
|
|
8692
8696
|
for (let r in t) {
|
|
8693
|
-
if (
|
|
8694
|
-
let i = new
|
|
8697
|
+
if (Jp.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
8698
|
+
let i = new Ap(t[r]);
|
|
8695
8699
|
e.push(i, r), n = !0;
|
|
8696
8700
|
}
|
|
8697
8701
|
if (!n) {
|
|
@@ -8700,25 +8704,25 @@ var Qp = function(e) {
|
|
|
8700
8704
|
}
|
|
8701
8705
|
e.exit();
|
|
8702
8706
|
};
|
|
8703
|
-
|
|
8704
|
-
var
|
|
8707
|
+
$p.filterName = "objects";
|
|
8708
|
+
var em = (e) => {
|
|
8705
8709
|
if (!e || !e.children || e.delta._t) return;
|
|
8706
8710
|
let t = e.children.length, n = {};
|
|
8707
8711
|
for (let r = 0; r < t; r++) {
|
|
8708
8712
|
let t = e.children[r];
|
|
8709
8713
|
if (t === void 0) continue;
|
|
8710
8714
|
let i = t.childName;
|
|
8711
|
-
|
|
8715
|
+
Jp.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
8712
8716
|
}
|
|
8713
8717
|
e.setResult(n).exit();
|
|
8714
8718
|
};
|
|
8715
|
-
|
|
8719
|
+
em.filterName = "collectChildren";
|
|
8716
8720
|
//#endregion
|
|
8717
8721
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
8718
|
-
var
|
|
8719
|
-
function
|
|
8722
|
+
var tm = 2, nm = 60, rm = null;
|
|
8723
|
+
function im(e, t) {
|
|
8720
8724
|
var n;
|
|
8721
|
-
if (!
|
|
8725
|
+
if (!rm) {
|
|
8722
8726
|
let r;
|
|
8723
8727
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
8724
8728
|
else {
|
|
@@ -8726,7 +8730,7 @@ function rm(e, t) {
|
|
|
8726
8730
|
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.");
|
|
8727
8731
|
throw e.diff_match_patch_not_found = !0, e;
|
|
8728
8732
|
}
|
|
8729
|
-
|
|
8733
|
+
rm = {
|
|
8730
8734
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
8731
8735
|
patch: (e, t) => {
|
|
8732
8736
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -8738,17 +8742,17 @@ function rm(e, t) {
|
|
|
8738
8742
|
}
|
|
8739
8743
|
};
|
|
8740
8744
|
}
|
|
8741
|
-
return
|
|
8745
|
+
return rm;
|
|
8742
8746
|
}
|
|
8743
|
-
var
|
|
8747
|
+
var am = function(e) {
|
|
8744
8748
|
var t, n;
|
|
8745
8749
|
if (e.leftType !== "string") return;
|
|
8746
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
8750
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || nm;
|
|
8747
8751
|
if (r.length < a || i.length < a) {
|
|
8748
8752
|
e.setResult([r, i]).exit();
|
|
8749
8753
|
return;
|
|
8750
8754
|
}
|
|
8751
|
-
let o =
|
|
8755
|
+
let o = im(e.options);
|
|
8752
8756
|
if (!o) {
|
|
8753
8757
|
e.setResult([r, i]).exit();
|
|
8754
8758
|
return;
|
|
@@ -8757,19 +8761,19 @@ var im = function(e) {
|
|
|
8757
8761
|
e.setResult([
|
|
8758
8762
|
s(r, i),
|
|
8759
8763
|
0,
|
|
8760
|
-
|
|
8764
|
+
tm
|
|
8761
8765
|
]).exit();
|
|
8762
8766
|
};
|
|
8763
|
-
|
|
8764
|
-
var
|
|
8767
|
+
am.filterName = "texts";
|
|
8768
|
+
var om = function(e) {
|
|
8765
8769
|
if (e.nested) return;
|
|
8766
8770
|
let t = e.delta;
|
|
8767
|
-
if (t[2] !==
|
|
8768
|
-
let n = t, r =
|
|
8771
|
+
if (t[2] !== tm) return;
|
|
8772
|
+
let n = t, r = im(e.options, !0).patch;
|
|
8769
8773
|
e.setResult(r(e.left, n[0])).exit();
|
|
8770
8774
|
};
|
|
8771
|
-
|
|
8772
|
-
var
|
|
8775
|
+
om.filterName = "texts";
|
|
8776
|
+
var sm = (e) => {
|
|
8773
8777
|
var t, n, r;
|
|
8774
8778
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
8775
8779
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -8790,21 +8794,21 @@ var om = (e) => {
|
|
|
8790
8794
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
8791
8795
|
}
|
|
8792
8796
|
return a.join("\n");
|
|
8793
|
-
},
|
|
8797
|
+
}, cm = function(e) {
|
|
8794
8798
|
if (e.nested) return;
|
|
8795
8799
|
let t = e.delta;
|
|
8796
|
-
if (t[2] !==
|
|
8800
|
+
if (t[2] !== tm) return;
|
|
8797
8801
|
let n = t;
|
|
8798
8802
|
e.setResult([
|
|
8799
|
-
|
|
8803
|
+
sm(n[0]),
|
|
8800
8804
|
0,
|
|
8801
|
-
|
|
8805
|
+
tm
|
|
8802
8806
|
]).exit();
|
|
8803
8807
|
};
|
|
8804
|
-
|
|
8808
|
+
cm.filterName = "texts";
|
|
8805
8809
|
//#endregion
|
|
8806
8810
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
8807
|
-
var
|
|
8811
|
+
var lm = function(e) {
|
|
8808
8812
|
if (e.left === e.right) {
|
|
8809
8813
|
e.setResult(void 0).exit();
|
|
8810
8814
|
return;
|
|
@@ -8837,8 +8841,8 @@ var cm = function(e) {
|
|
|
8837
8841
|
}
|
|
8838
8842
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
8839
8843
|
};
|
|
8840
|
-
|
|
8841
|
-
var
|
|
8844
|
+
lm.filterName = "trivial";
|
|
8845
|
+
var um = function(e) {
|
|
8842
8846
|
if (e.delta === void 0) {
|
|
8843
8847
|
e.setResult(e.left).exit();
|
|
8844
8848
|
return;
|
|
@@ -8862,8 +8866,8 @@ var lm = function(e) {
|
|
|
8862
8866
|
}
|
|
8863
8867
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
8864
8868
|
};
|
|
8865
|
-
|
|
8866
|
-
var
|
|
8869
|
+
um.filterName = "trivial";
|
|
8870
|
+
var dm = function(e) {
|
|
8867
8871
|
if (e.delta === void 0) {
|
|
8868
8872
|
e.setResult(e.delta).exit();
|
|
8869
8873
|
return;
|
|
@@ -8884,36 +8888,36 @@ var um = function(e) {
|
|
|
8884
8888
|
}
|
|
8885
8889
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
8886
8890
|
};
|
|
8887
|
-
|
|
8891
|
+
dm.filterName = "trivial";
|
|
8888
8892
|
//#endregion
|
|
8889
8893
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
8890
|
-
var
|
|
8894
|
+
var fm = class {
|
|
8891
8895
|
constructor(e) {
|
|
8892
|
-
this.processor = new
|
|
8896
|
+
this.processor = new Mp(e), this.processor.pipe(new jp("diff").append(Yp, lm, qp, am, Xp, Bp).shouldHaveResult()), this.processor.pipe(new jp("patch").append(Qp, Up, um, om, Zp, Hp).shouldHaveResult()), this.processor.pipe(new jp("reverse").append(em, Kp, dm, cm, $p, Wp).shouldHaveResult());
|
|
8893
8897
|
}
|
|
8894
8898
|
options(e) {
|
|
8895
8899
|
return this.processor.options(e);
|
|
8896
8900
|
}
|
|
8897
8901
|
diff(e, t) {
|
|
8898
|
-
return this.processor.process(new
|
|
8902
|
+
return this.processor.process(new Op(e, t));
|
|
8899
8903
|
}
|
|
8900
8904
|
patch(e, t) {
|
|
8901
|
-
return this.processor.process(new
|
|
8905
|
+
return this.processor.process(new kp(e, t));
|
|
8902
8906
|
}
|
|
8903
8907
|
reverse(e) {
|
|
8904
|
-
return this.processor.process(new
|
|
8908
|
+
return this.processor.process(new Ap(e));
|
|
8905
8909
|
}
|
|
8906
8910
|
unpatch(e, t) {
|
|
8907
8911
|
return this.patch(e, this.reverse(t));
|
|
8908
8912
|
}
|
|
8909
8913
|
clone(e) {
|
|
8910
|
-
return
|
|
8914
|
+
return wp(e);
|
|
8911
8915
|
}
|
|
8912
8916
|
};
|
|
8913
8917
|
//#endregion
|
|
8914
8918
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
8915
|
-
function
|
|
8916
|
-
return new
|
|
8919
|
+
function pm(e) {
|
|
8920
|
+
return new fm(e);
|
|
8917
8921
|
}
|
|
8918
8922
|
//#endregion
|
|
8919
8923
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -9475,46 +9479,46 @@ $.Diff = function(e, t) {
|
|
|
9475
9479
|
};
|
|
9476
9480
|
//#endregion
|
|
9477
9481
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
9478
|
-
var
|
|
9482
|
+
var mm = (e = {}) => pm({
|
|
9479
9483
|
...e,
|
|
9480
9484
|
textDiff: {
|
|
9481
9485
|
diffMatchPatch: $,
|
|
9482
9486
|
minLength: 120
|
|
9483
9487
|
},
|
|
9484
9488
|
cloneDiffValues: !0
|
|
9485
|
-
}),
|
|
9489
|
+
}), hm = ["user", "unittemplate"], gm = mm(), _m = (e, t, n) => {
|
|
9486
9490
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
9487
9491
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
9488
9492
|
let n = r[t[e]];
|
|
9489
9493
|
if (n) return n;
|
|
9490
9494
|
}
|
|
9491
9495
|
return n || "";
|
|
9492
|
-
},
|
|
9496
|
+
}, vm = (e) => {
|
|
9493
9497
|
let t = (e) => sr(e) ? yr(e) : String(e);
|
|
9494
9498
|
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);
|
|
9495
|
-
},
|
|
9499
|
+
}, ym = (e) => {
|
|
9496
9500
|
switch (e.length) {
|
|
9497
9501
|
case 1: {
|
|
9498
9502
|
let [t] = e;
|
|
9499
9503
|
return {
|
|
9500
9504
|
type: "created",
|
|
9501
9505
|
before: "",
|
|
9502
|
-
after:
|
|
9506
|
+
after: vm(t)
|
|
9503
9507
|
};
|
|
9504
9508
|
}
|
|
9505
9509
|
case 2: {
|
|
9506
9510
|
let [t, n] = e;
|
|
9507
9511
|
return {
|
|
9508
9512
|
type: "modified",
|
|
9509
|
-
before:
|
|
9510
|
-
after:
|
|
9513
|
+
before: vm(t),
|
|
9514
|
+
after: vm(n)
|
|
9511
9515
|
};
|
|
9512
9516
|
}
|
|
9513
9517
|
case 3: {
|
|
9514
9518
|
let [t] = e;
|
|
9515
9519
|
return {
|
|
9516
9520
|
type: "deleted",
|
|
9517
|
-
before:
|
|
9521
|
+
before: vm(t),
|
|
9518
9522
|
after: ""
|
|
9519
9523
|
};
|
|
9520
9524
|
}
|
|
@@ -9524,15 +9528,15 @@ var pm = (e = {}) => fm({
|
|
|
9524
9528
|
after: ""
|
|
9525
9529
|
};
|
|
9526
9530
|
}
|
|
9527
|
-
},
|
|
9528
|
-
let r =
|
|
9531
|
+
}, bm = (e) => Array.isArray(e), xm = (e, t) => t ? bm(t) ? t.length === 0 ? e : t.reduce((e, t) => gm.unpatch(en(e), en(t)), en(e)) : gm.unpatch(en(e), en(t)) : e, Sm = (e) => e.createdAt || e.date, Cm = (e, t, n) => {
|
|
9532
|
+
let r = Sm(e);
|
|
9529
9533
|
if (!r) return {
|
|
9530
9534
|
oldJson: "",
|
|
9531
9535
|
newJson: "",
|
|
9532
9536
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
9533
9537
|
};
|
|
9534
9538
|
let i = t.filter((e) => {
|
|
9535
|
-
let t =
|
|
9539
|
+
let t = Sm(e);
|
|
9536
9540
|
return !!(e.diffs && t && t >= r);
|
|
9537
9541
|
}), a = Array.from({ length: i.length + 1 });
|
|
9538
9542
|
a[0] = en(n);
|
|
@@ -9545,7 +9549,7 @@ var pm = (e = {}) => fm({
|
|
|
9545
9549
|
a[e + 1] = a[e];
|
|
9546
9550
|
continue;
|
|
9547
9551
|
}
|
|
9548
|
-
a[e + 1] =
|
|
9552
|
+
a[e + 1] = xm(a[e], t);
|
|
9549
9553
|
}
|
|
9550
9554
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
9551
9555
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -9560,10 +9564,10 @@ var pm = (e = {}) => fm({
|
|
|
9560
9564
|
oldJson: o,
|
|
9561
9565
|
newJson: s
|
|
9562
9566
|
};
|
|
9563
|
-
},
|
|
9567
|
+
}, wm = (e, t, n = {}, r = []) => {
|
|
9564
9568
|
var i;
|
|
9565
9569
|
if (!e) return;
|
|
9566
|
-
let a = [...
|
|
9570
|
+
let a = [...hm, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
9567
9571
|
Object.keys(e).forEach((i) => {
|
|
9568
9572
|
var o;
|
|
9569
9573
|
let s = e[i];
|
|
@@ -9576,12 +9580,12 @@ var pm = (e = {}) => fm({
|
|
|
9576
9580
|
on(s) ? t.push({
|
|
9577
9581
|
deltaFormat: [...s],
|
|
9578
9582
|
path: c
|
|
9579
|
-
}) : mn(s) &&
|
|
9583
|
+
}) : mn(s) && wm(s, t, n, c);
|
|
9580
9584
|
});
|
|
9581
|
-
},
|
|
9585
|
+
}, Tm = (e, t = {}) => {
|
|
9582
9586
|
let n = [];
|
|
9583
|
-
return e ? (
|
|
9584
|
-
},
|
|
9587
|
+
return e ? (wm(e, n, t), n) : [];
|
|
9588
|
+
}, Em = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), Dm = (e) => {
|
|
9585
9589
|
if (e == null || e === "") return "empty";
|
|
9586
9590
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
9587
9591
|
if (typeof e == "string") return e;
|
|
@@ -9592,35 +9596,35 @@ var pm = (e = {}) => fm({
|
|
|
9592
9596
|
} catch {
|
|
9593
9597
|
return String(e);
|
|
9594
9598
|
}
|
|
9595
|
-
},
|
|
9599
|
+
}, Om = (e, t = e.length - 1) => {
|
|
9596
9600
|
if (t >= e.length) return "Value";
|
|
9597
9601
|
let n = e[t];
|
|
9598
|
-
return !n || ir(n) ?
|
|
9599
|
-
},
|
|
9600
|
-
let o =
|
|
9602
|
+
return !n || ir(n) ? Om(e, t - 1) : Em(n);
|
|
9603
|
+
}, km = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
9604
|
+
let o = Dm(r), s = Dm(i), c = a ? ` in ${a}` : "";
|
|
9601
9605
|
switch (t) {
|
|
9602
9606
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
9603
9607
|
case "created": return `${e} created ${s}${c}.`;
|
|
9604
9608
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
9605
9609
|
default: return `${e} changed ${n}${c}.`;
|
|
9606
9610
|
}
|
|
9607
|
-
},
|
|
9611
|
+
}, Am = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
|
|
9608
9612
|
let i = {
|
|
9609
9613
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
9610
9614
|
rows: n.map((n) => {
|
|
9611
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
9612
|
-
return { cells: [{ value:
|
|
9615
|
+
let { deltaFormat: i, path: a } = n, o = _m(e, a, r), { type: s, before: c, after: l } = ym(i);
|
|
9616
|
+
return { cells: [{ value: km({
|
|
9613
9617
|
userName: t,
|
|
9614
9618
|
type: s,
|
|
9615
|
-
property:
|
|
9619
|
+
property: Om(a),
|
|
9616
9620
|
before: c,
|
|
9617
9621
|
after: l,
|
|
9618
9622
|
sectionName: o
|
|
9619
9623
|
}) }] };
|
|
9620
9624
|
})
|
|
9621
9625
|
};
|
|
9622
|
-
return /* @__PURE__ */ x(
|
|
9623
|
-
},
|
|
9626
|
+
return /* @__PURE__ */ x(Jl, { table: i });
|
|
9627
|
+
}, jm = Object.freeze({
|
|
9624
9628
|
summary: {
|
|
9625
9629
|
label: "Summary",
|
|
9626
9630
|
value: "summary"
|
|
@@ -9629,33 +9633,33 @@ var pm = (e = {}) => fm({
|
|
|
9629
9633
|
label: "Compare",
|
|
9630
9634
|
value: "compare"
|
|
9631
9635
|
}
|
|
9632
|
-
}),
|
|
9633
|
-
let c = [
|
|
9636
|
+
}), Mm = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
9637
|
+
let c = [jm.summary, jm.compare].map(({ label: e, value: t }) => ({
|
|
9634
9638
|
label: e,
|
|
9635
9639
|
value: t
|
|
9636
9640
|
})), [l, u] = _(c[0]), { diffs: d = void 0 } = e || {};
|
|
9637
9641
|
if (!d) return null;
|
|
9638
|
-
let { oldJson: f, newJson: p, error: m } =
|
|
9642
|
+
let { oldJson: f, newJson: p, error: m } = Cm(e, t, n);
|
|
9639
9643
|
return /* @__PURE__ */ x(bs, {
|
|
9640
9644
|
visible: r,
|
|
9641
9645
|
centered: !0,
|
|
9642
9646
|
children: /* @__PURE__ */ x(Qo, { dialog: {
|
|
9643
9647
|
scroll: !0,
|
|
9644
9648
|
heading: "Comparison view",
|
|
9645
|
-
content: /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(
|
|
9649
|
+
content: /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(Af, {
|
|
9646
9650
|
name: "ViewTab",
|
|
9647
9651
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
9648
9652
|
options: c,
|
|
9649
9653
|
value: l
|
|
9650
|
-
}), l.value === "summary" ? /* @__PURE__ */ x(
|
|
9654
|
+
}), l.value === "summary" ? /* @__PURE__ */ x(Am, {
|
|
9651
9655
|
userName: e.userName,
|
|
9652
9656
|
sectionNames: a,
|
|
9653
|
-
diffs:
|
|
9657
|
+
diffs: Tm(d, i),
|
|
9654
9658
|
defaultSectionName: o
|
|
9655
9659
|
}) : m ? /* @__PURE__ */ x("div", {
|
|
9656
9660
|
style: { padding: 16 },
|
|
9657
9661
|
children: m
|
|
9658
|
-
}) : /* @__PURE__ */ x(
|
|
9662
|
+
}) : /* @__PURE__ */ x(xp, {
|
|
9659
9663
|
oldJson: f,
|
|
9660
9664
|
newJson: p
|
|
9661
9665
|
})] }),
|
|
@@ -9668,7 +9672,7 @@ var pm = (e = {}) => fm({
|
|
|
9668
9672
|
height: "90vh"
|
|
9669
9673
|
} })
|
|
9670
9674
|
});
|
|
9671
|
-
},
|
|
9675
|
+
}, Nm = [
|
|
9672
9676
|
{
|
|
9673
9677
|
label: "10 / page",
|
|
9674
9678
|
value: 10
|
|
@@ -9681,8 +9685,8 @@ var pm = (e = {}) => fm({
|
|
|
9681
9685
|
label: "50 / page",
|
|
9682
9686
|
value: 50
|
|
9683
9687
|
}
|
|
9684
|
-
],
|
|
9685
|
-
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s =
|
|
9688
|
+
], Pm = (e, t = {}) => {
|
|
9689
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = Tm(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
9686
9690
|
if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
|
|
9687
9691
|
switch (a) {
|
|
9688
9692
|
case "Created": return `Created by ${r}`;
|
|
@@ -9692,7 +9696,7 @@ var pm = (e = {}) => fm({
|
|
|
9692
9696
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
9693
9697
|
default: return `Change by ${r}`;
|
|
9694
9698
|
}
|
|
9695
|
-
},
|
|
9699
|
+
}, Fm = ({ 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 }) => {
|
|
9696
9700
|
let [g, v] = _(!1), [y, C] = _(null), w = (e) => {
|
|
9697
9701
|
if (e.snapshot) {
|
|
9698
9702
|
f == null || f(e.snapshot, e);
|
|
@@ -9711,7 +9715,7 @@ var pm = (e = {}) => fm({
|
|
|
9711
9715
|
return {
|
|
9712
9716
|
cells: [
|
|
9713
9717
|
{
|
|
9714
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
9718
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : Pm(e, l),
|
|
9715
9719
|
type: "Link",
|
|
9716
9720
|
disabled: n,
|
|
9717
9721
|
onClick: n ? void 0 : () => w(e),
|
|
@@ -9730,8 +9734,8 @@ var pm = (e = {}) => fm({
|
|
|
9730
9734
|
type: "Static"
|
|
9731
9735
|
},
|
|
9732
9736
|
{
|
|
9733
|
-
value:
|
|
9734
|
-
date:
|
|
9737
|
+
value: Sp({
|
|
9738
|
+
date: Sm(e),
|
|
9735
9739
|
showTime: !0
|
|
9736
9740
|
}),
|
|
9737
9741
|
type: "Static"
|
|
@@ -9741,12 +9745,12 @@ var pm = (e = {}) => fm({
|
|
|
9741
9745
|
};
|
|
9742
9746
|
});
|
|
9743
9747
|
return /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(Za, {
|
|
9744
|
-
heading: /* @__PURE__ */ S(
|
|
9748
|
+
heading: /* @__PURE__ */ S(fd, {
|
|
9745
9749
|
gap: !0,
|
|
9746
9750
|
wrap: !0,
|
|
9747
9751
|
children: [/* @__PURE__ */ x(Yo, { children: "Changes" }), c.map((e) => {
|
|
9748
9752
|
var t;
|
|
9749
|
-
return /* @__PURE__ */ x(
|
|
9753
|
+
return /* @__PURE__ */ x(Wu, {
|
|
9750
9754
|
small: (t = e.small) == null || t,
|
|
9751
9755
|
checked: e.checked,
|
|
9752
9756
|
onChange: e.onChange,
|
|
@@ -9756,11 +9760,11 @@ var pm = (e = {}) => fm({
|
|
|
9756
9760
|
})]
|
|
9757
9761
|
}),
|
|
9758
9762
|
padding: !1,
|
|
9759
|
-
children: r ? /* @__PURE__ */ x(
|
|
9763
|
+
children: r ? /* @__PURE__ */ x(kd, {
|
|
9760
9764
|
height: "100px",
|
|
9761
9765
|
theme: vi.WHITE,
|
|
9762
9766
|
children: /* @__PURE__ */ x(la, { dark: !0 })
|
|
9763
|
-
}) : /* @__PURE__ */ x(
|
|
9767
|
+
}) : /* @__PURE__ */ x(Jl, { table: {
|
|
9764
9768
|
headers: T,
|
|
9765
9769
|
testId: "auditlog-table",
|
|
9766
9770
|
rows: E,
|
|
@@ -9774,14 +9778,14 @@ var pm = (e = {}) => fm({
|
|
|
9774
9778
|
onChange: (e) => {
|
|
9775
9779
|
u(Number(e.target.value));
|
|
9776
9780
|
},
|
|
9777
|
-
options:
|
|
9781
|
+
options: Nm,
|
|
9778
9782
|
value: a
|
|
9779
9783
|
},
|
|
9780
9784
|
onSelectPage: (e) => d(e),
|
|
9781
9785
|
small: !0
|
|
9782
9786
|
} }
|
|
9783
9787
|
} })
|
|
9784
|
-
}), g && y && y.diffs && /* @__PURE__ */ x(
|
|
9788
|
+
}), g && y && y.diffs && /* @__PURE__ */ x(Mm, {
|
|
9785
9789
|
sectionNames: o,
|
|
9786
9790
|
isOpen: g,
|
|
9787
9791
|
onClose: () => v(!1),
|
|
@@ -9791,7 +9795,7 @@ var pm = (e = {}) => fm({
|
|
|
9791
9795
|
data: t,
|
|
9792
9796
|
transformDiffsConfig: l
|
|
9793
9797
|
})] });
|
|
9794
|
-
},
|
|
9798
|
+
}, Im = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
9795
9799
|
let i = window.location.href, a = g(i);
|
|
9796
9800
|
return d(() => {
|
|
9797
9801
|
a.current = i;
|
|
@@ -9814,20 +9818,20 @@ var pm = (e = {}) => fm({
|
|
|
9814
9818
|
});
|
|
9815
9819
|
};
|
|
9816
9820
|
}, [e, t]), null;
|
|
9817
|
-
},
|
|
9821
|
+
}, Lm = {
|
|
9818
9822
|
errorBoundary: "_errorBoundary_hmco0_1",
|
|
9819
9823
|
sidebarErrorBoundary: "_sidebarErrorBoundary_hmco0_5",
|
|
9820
9824
|
rightSidebarErrorBoundary: "_rightSidebarErrorBoundary_hmco0_6"
|
|
9821
|
-
},
|
|
9822
|
-
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } =
|
|
9825
|
+
}, Rm = ({ options: e }) => {
|
|
9826
|
+
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } = up();
|
|
9823
9827
|
if (t) return /* @__PURE__ */ x(t, {});
|
|
9824
9828
|
if (n || r) return /* @__PURE__ */ x("div", {
|
|
9825
|
-
className: y(n ?
|
|
9829
|
+
className: y(n ? Lm.sidebarErrorBoundary : "", r ? Lm.rightSidebarErrorBoundary : ""),
|
|
9826
9830
|
style: a,
|
|
9827
9831
|
children: o == null ? void 0 : o.unexpectedError
|
|
9828
9832
|
});
|
|
9829
9833
|
let s = /* @__PURE__ */ x("div", {
|
|
9830
|
-
className:
|
|
9834
|
+
className: Lm.errorBoundary,
|
|
9831
9835
|
style: a,
|
|
9832
9836
|
children: /* @__PURE__ */ x(Bs, { message: {
|
|
9833
9837
|
icon: !0,
|
|
@@ -9837,24 +9841,24 @@ var pm = (e = {}) => fm({
|
|
|
9837
9841
|
width: "100%"
|
|
9838
9842
|
} })
|
|
9839
9843
|
});
|
|
9840
|
-
return i ? /* @__PURE__ */ x(
|
|
9844
|
+
return i ? /* @__PURE__ */ x(Rd, {
|
|
9841
9845
|
scroll: !1,
|
|
9842
9846
|
padding: 0,
|
|
9843
9847
|
children: s
|
|
9844
9848
|
}) : s;
|
|
9845
|
-
},
|
|
9846
|
-
fallback: /* @__PURE__ */ x(
|
|
9849
|
+
}, zm = ({ children: e, options: t }) => /* @__PURE__ */ x(fi.ErrorBoundary, {
|
|
9850
|
+
fallback: /* @__PURE__ */ x(Rm, { options: t }),
|
|
9847
9851
|
onError: (e, t) => {
|
|
9848
9852
|
console.error("Error caught by boundary:", e, t);
|
|
9849
9853
|
},
|
|
9850
9854
|
children: e
|
|
9851
|
-
}),
|
|
9855
|
+
}), Bm = (e, t = {}) => (n) => /* @__PURE__ */ x(zm, {
|
|
9852
9856
|
options: t,
|
|
9853
9857
|
children: /* @__PURE__ */ x(e, { ...n })
|
|
9854
|
-
}),
|
|
9855
|
-
|
|
9856
|
-
e ===
|
|
9858
|
+
}), Vm = (e = {}) => (t) => Bm(t, e), Hm = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, Um = (e) => {
|
|
9859
|
+
dp(op.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
9860
|
+
e === op.Translations ? dp(e, cp(t)) : dp(e, Hm(t) ? t : { ...t });
|
|
9857
9861
|
});
|
|
9858
9862
|
};
|
|
9859
9863
|
//#endregion
|
|
9860
|
-
export { Li as Accordion, oa as AccordionWithDefaultToggle, Ua as Actions, hi as Align,
|
|
9864
|
+
export { Li as Accordion, oa as AccordionWithDefaultToggle, Ua as Actions, hi as Align, Fm as AuditLog, ka as Badge, qa as Breadcrumb, Ga as BreadcrumbLinkType, q as Button, Ya as ButtonGroup, gi as ButtonPosition, ua as ButtonType, Za as Card, na as CheckBox, ji as Chevron, Pi as Collapse, mi as Color, Fo as ColorInput, Po as ColorInputPopover, Bo as Column, Qo as Dialog, xp as DiffViewer, W as DisabledContext, Go as Divider, as as Drawer, Lf as ElementType, au as Empty, zm as ErrorBoundary, dd as Field, sd as FileButton, hs as FileInput, fd as Flex, md as FormRow, bo as Grid, H as GroupOrder, Yo as Heading, ta as HelpIcon, G as Icon, U as IconType, us as Input, cs as InputGroup, nl as InputGroupAddon, fs as InputReaderMethods, yi as InputType, ld as Label, Dd as List, gd as ListHeading, Sd as ListSubheading, kd as Loader, Va as Menu, _a as MenuCarat, ga as MenuType, Bs as Message, Ps as MessageType, bs as Modal, Ks as NativeSelect, hl as NumberInput, Id as OptionDropdown, Rd as Page, rl as Pagination, Uf as PopConfirm, go as Popover, zd as Portal, Vd as PrintHeader, Cs as ProgressBar, Hd as RadioButton, qd as RichTextInput, Yd as Row, Xc as Select, _p as SettingField, ef as SideBar, nf as Skeleton, Tl as Slider, Os as SmartUploadModal, gs as Spacer, la as Spinner, Jl as Table, od as TableImportExport, Af as Tabs, Uo as Text, Nf as TextArea, jf as TextLink, _i as TextTransform, vi as Theme, Kr as Toaster, Wu as Toggle, K as Tooltip, Bf as TopBar, qf as Tree, ap as TreeTable, pi as TriggerType, Cf as UnitInput, Df as UnitSlider, hp as UnitTable, Im as UsageTracker, Vu as dismissToast, bf as initializeContext, Um as initializeGuiLibrary, ps as readFile, Bu as toast, qs as useFocus, _s as useKeyboardEvent, Xs as useWindowWidth, Vm as withChainableErrorBoundary, Bm as withErrorBoundary };
|