@oliasoft-open-source/react-ui-library 9.2.0-beta-1 → 9.2.0-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 +2 -1
- package/dist/components/table/row/row.d.ts.map +1 -1
- package/dist/components/table/table-virtual-scroll-wrapper.d.ts.map +1 -1
- package/dist/components/table/table.stories-data.d.ts +54 -0
- package/dist/components/table/table.stories-data.d.ts.map +1 -1
- package/dist/components/table/table.stories.d.ts +1 -0
- package/dist/components/table/table.stories.d.ts.map +1 -1
- package/dist/components/table/table.viewdata.d.ts +1 -2
- package/dist/components/table/table.viewdata.d.ts.map +1 -1
- package/dist/global.css +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +692 -764
- package/package.json +1 -1
- package/dist/components/diff-table/build-diff-rows.d.ts +0 -26
- package/dist/components/diff-table/build-diff-rows.d.ts.map +0 -1
- package/dist/components/diff-table/diff-table.d.ts +0 -12
- package/dist/components/diff-table/diff-table.d.ts.map +0 -1
- package/dist/components/diff-table/diff-table.stories.d.ts +0 -21
- package/dist/components/diff-table/diff-table.stories.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -2566,21 +2566,21 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
2566
2566
|
]
|
|
2567
2567
|
}) : null });
|
|
2568
2568
|
}, Ks = {
|
|
2569
|
-
inputInTable: "
|
|
2570
|
-
inputHover: "
|
|
2571
|
-
inputFocus: "
|
|
2572
|
-
controlFocusVisible: "
|
|
2573
|
-
inputError: "
|
|
2574
|
-
inputWarning: "
|
|
2575
|
-
inputDisabled: "
|
|
2576
|
-
hideScrollbars: "
|
|
2577
|
-
wrapper: "
|
|
2578
|
-
bordered: "
|
|
2579
|
-
scroll: "
|
|
2580
|
-
table: "
|
|
2581
|
-
dragOverlay: "
|
|
2582
|
-
virtualScroll: "
|
|
2583
|
-
striped: "
|
|
2569
|
+
inputInTable: "_inputInTable_mlaya_1",
|
|
2570
|
+
inputHover: "_inputHover_mlaya_13",
|
|
2571
|
+
inputFocus: "_inputFocus_mlaya_18",
|
|
2572
|
+
controlFocusVisible: "_controlFocusVisible_mlaya_25",
|
|
2573
|
+
inputError: "_inputError_mlaya_29",
|
|
2574
|
+
inputWarning: "_inputWarning_mlaya_30",
|
|
2575
|
+
inputDisabled: "_inputDisabled_mlaya_65",
|
|
2576
|
+
hideScrollbars: "_hideScrollbars_mlaya_71",
|
|
2577
|
+
wrapper: "_wrapper_mlaya_89",
|
|
2578
|
+
bordered: "_bordered_mlaya_97",
|
|
2579
|
+
scroll: "_scroll_mlaya_102",
|
|
2580
|
+
table: "_table_mlaya_114",
|
|
2581
|
+
dragOverlay: "_dragOverlay_mlaya_150",
|
|
2582
|
+
virtualScroll: "_virtualScroll_mlaya_185",
|
|
2583
|
+
striped: "_striped_mlaya_205"
|
|
2584
2584
|
}, qs = { title: "_title_zn5s7_1" }, Js = ({ name: e = null, actions: t = null, actionsRight: n = !1, testId: r }) => {
|
|
2585
2585
|
let i = e !== null, a = t !== null;
|
|
2586
2586
|
return !i && !a ? null : /* @__PURE__ */ C("div", {
|
|
@@ -4170,8 +4170,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4170
4170
|
}));
|
|
4171
4171
|
}
|
|
4172
4172
|
};
|
|
4173
|
-
}, Jl = ({ 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 }) => {
|
|
4174
|
-
let
|
|
4173
|
+
}, Jl = ({ 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, measureRef: p }) => {
|
|
4174
|
+
let m = _l(a, n, t), { onRowClick: h, onRowFocus: g, onRowMouseEnter: _, onRowMouseLeave: v, expandedContent: y, error: w, warning: T, active: E } = e, D = e.cells.map((e, r) => {
|
|
4175
4175
|
let i = `${+!n}_${t}_${r}`, a = n ? e : ql({
|
|
4176
4176
|
cell: e,
|
|
4177
4177
|
rowIndex: t,
|
|
@@ -4181,72 +4181,74 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4181
4181
|
cell: a,
|
|
4182
4182
|
isHeader: n,
|
|
4183
4183
|
columnAlignment: o[r],
|
|
4184
|
-
columnHeaderAlignment:
|
|
4184
|
+
columnHeaderAlignment: m[r],
|
|
4185
4185
|
width: l ? l[r] : void 0,
|
|
4186
4186
|
testId: e.testId
|
|
4187
4187
|
}, i);
|
|
4188
|
-
}),
|
|
4188
|
+
}), O = s && /* @__PURE__ */ S(Wl, {
|
|
4189
4189
|
cell: {
|
|
4190
4190
|
type: Ul.ACTIONS,
|
|
4191
4191
|
actions: e.actions
|
|
4192
4192
|
},
|
|
4193
4193
|
isHeader: n
|
|
4194
|
-
}, r), { attributes:
|
|
4194
|
+
}, r), { attributes: k, listeners: A, setNodeRef: j, transform: M, transition: N, isDragging: P } = Nr({
|
|
4195
4195
|
id: t.toString(),
|
|
4196
4196
|
animateLayoutChanges: () => !1
|
|
4197
|
-
}),
|
|
4198
|
-
|
|
4197
|
+
}), F = (t) => {
|
|
4198
|
+
e.noDrag || j(t), p == null || p(t);
|
|
4199
|
+
}, I = {
|
|
4200
|
+
transform: u ? void 0 : Fr.Translate.toString(M),
|
|
4199
4201
|
height: d,
|
|
4200
|
-
transition:
|
|
4201
|
-
opacity:
|
|
4202
|
+
transition: N,
|
|
4203
|
+
opacity: P ? 0 : void 0
|
|
4202
4204
|
};
|
|
4203
4205
|
return n ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("tr", {
|
|
4204
|
-
onClick:
|
|
4205
|
-
onMouseEnter:
|
|
4206
|
-
onMouseLeave:
|
|
4207
|
-
onFocus:
|
|
4206
|
+
onClick: h,
|
|
4207
|
+
onMouseEnter: _,
|
|
4208
|
+
onMouseLeave: v,
|
|
4209
|
+
onFocus: g,
|
|
4208
4210
|
"data-testid": f,
|
|
4209
|
-
className: b(
|
|
4211
|
+
className: b(h ? ml.clickableRow : null, _ ? ml.hoverableRow : null),
|
|
4210
4212
|
children: [
|
|
4211
4213
|
c ? /* @__PURE__ */ S("th", {}) : null,
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
+
D,
|
|
4215
|
+
O
|
|
4214
4216
|
]
|
|
4215
|
-
}, t),
|
|
4217
|
+
}, t), y && y.content ? /* @__PURE__ */ S(hl, {
|
|
4216
4218
|
colSpan: i,
|
|
4217
|
-
flush:
|
|
4218
|
-
children:
|
|
4219
|
+
flush: y.flush === !0,
|
|
4220
|
+
children: y.content
|
|
4219
4221
|
}, `${t}_expanded_content`) : null] }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("tr", {
|
|
4220
|
-
ref:
|
|
4221
|
-
onClick:
|
|
4222
|
-
onMouseEnter:
|
|
4223
|
-
onMouseLeave:
|
|
4224
|
-
onFocus:
|
|
4225
|
-
className: b(
|
|
4226
|
-
"data-active":
|
|
4227
|
-
"data-error":
|
|
4228
|
-
"data-warning":
|
|
4222
|
+
ref: F,
|
|
4223
|
+
onClick: h,
|
|
4224
|
+
onMouseEnter: _,
|
|
4225
|
+
onMouseLeave: v,
|
|
4226
|
+
onFocus: g,
|
|
4227
|
+
className: b(h && !h.noStyle ? ml.clickableRow : null, _ && !_.noStyle ? ml.hoverableRow : null, E ? ml.rowActive : null),
|
|
4228
|
+
"data-active": E || null,
|
|
4229
|
+
"data-error": w || null,
|
|
4230
|
+
"data-warning": T || null,
|
|
4229
4231
|
"data-index": t,
|
|
4230
4232
|
"data-even": t % 2 == 0,
|
|
4231
4233
|
"data-testid": f,
|
|
4232
|
-
style:
|
|
4234
|
+
style: I,
|
|
4233
4235
|
children: [
|
|
4234
4236
|
c ? e.noDrag ? /* @__PURE__ */ S("td", { "aria-labelledby": "unique-label-id" }) : /* @__PURE__ */ S("td", {
|
|
4235
4237
|
className: ml.dragIconCell,
|
|
4236
4238
|
children: /* @__PURE__ */ S("div", {
|
|
4237
4239
|
className: b(ml.dragIcon, u ? ml.dragIconDisabled : ""),
|
|
4238
|
-
...O,
|
|
4239
4240
|
...k,
|
|
4241
|
+
...A,
|
|
4240
4242
|
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
4241
4243
|
})
|
|
4242
4244
|
}) : null,
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
+
D,
|
|
4246
|
+
O
|
|
4245
4247
|
]
|
|
4246
|
-
}, t),
|
|
4248
|
+
}, t), y && y.content ? /* @__PURE__ */ S(hl, {
|
|
4247
4249
|
colSpan: i,
|
|
4248
|
-
flush:
|
|
4249
|
-
children:
|
|
4250
|
+
flush: y.flush === !0,
|
|
4251
|
+
children: y.content
|
|
4250
4252
|
}, `${t}_expanded_content`) : null] });
|
|
4251
4253
|
}, Yl = (e) => {
|
|
4252
4254
|
let { children: t, colSpan: n, columnAlignment: r, columnCount: i, draggable: a, onListReorder: o = () => {}, canListReorder: s = () => !0, rowActions: c, rows: l = [], tbodyRef: u } = e, [d, f] = v(null), [p, m] = v(!1), g = h(() => l.map((e, t) => t.toString()), [l]);
|
|
@@ -4303,22 +4305,34 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4303
4305
|
})
|
|
4304
4306
|
}), document.body)]
|
|
4305
4307
|
}) : t({});
|
|
4306
|
-
}, Xl = ({ table: e, children: t }) => {
|
|
4308
|
+
}, Xl = 31, Zl = ({ table: e, children: t }) => {
|
|
4307
4309
|
var n, r, i;
|
|
4308
|
-
let a = _(null), o =
|
|
4309
|
-
|
|
4310
|
+
let a = _(null), o = _(Xl), s = _(/* @__PURE__ */ new Map()), c = (n = (r = e == null ? void 0 : e.rowCount) == null ? (i = e.rows) == null ? void 0 : i.length : r) == null ? 0 : n, l = (e, t) => {
|
|
4311
|
+
let n = s.current;
|
|
4312
|
+
if (n.get(e) === t) return;
|
|
4313
|
+
n.set(e, t);
|
|
4314
|
+
for (let e of n.keys()) e >= c && n.delete(e);
|
|
4315
|
+
let r = 0;
|
|
4316
|
+
for (let e of n.values()) r += e;
|
|
4317
|
+
n.size > 0 && (o.current = r / n.size);
|
|
4318
|
+
}, u = Jr({
|
|
4319
|
+
count: c,
|
|
4310
4320
|
getScrollElement: () => a.current,
|
|
4311
|
-
estimateSize: () =>
|
|
4321
|
+
estimateSize: () => o.current,
|
|
4322
|
+
measureElement: (e) => {
|
|
4323
|
+
let t = e.getBoundingClientRect().height, n = e.getAttribute("data-index");
|
|
4324
|
+
return n != null && l(Number(n), t), t;
|
|
4325
|
+
},
|
|
4312
4326
|
overscan: 10
|
|
4313
4327
|
});
|
|
4314
4328
|
return /* @__PURE__ */ S("div", {
|
|
4315
4329
|
id: "scrollWrapper",
|
|
4316
|
-
className:
|
|
4330
|
+
className: Ks.scroll,
|
|
4317
4331
|
ref: a,
|
|
4318
4332
|
children: t({
|
|
4319
|
-
virtualizer:
|
|
4333
|
+
virtualizer: u,
|
|
4320
4334
|
tableStyle: (() => {
|
|
4321
|
-
let e =
|
|
4335
|
+
let e = u.getVirtualItems(), t = e.length > 0 ? e[0].start : 0, n = e.length > 0 ? u.getTotalSize() - e[e.length - 1].end : 0;
|
|
4322
4336
|
return {
|
|
4323
4337
|
"--virtualPaddingTop": t + "px",
|
|
4324
4338
|
"--virtualPaddingBottom": n + "px"
|
|
@@ -4326,7 +4340,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4326
4340
|
})()
|
|
4327
4341
|
})
|
|
4328
4342
|
});
|
|
4329
|
-
},
|
|
4343
|
+
}, Ql = ({ activeIndex: e, triggerScrollToActiveRow: t, isVirtualized: n, virtualizer: r }) => (d(() => {
|
|
4330
4344
|
if (t && !(e == null || e < 0)) {
|
|
4331
4345
|
if (n && r) r.scrollToIndex(e, {
|
|
4332
4346
|
behavior: "auto",
|
|
@@ -4345,11 +4359,11 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4345
4359
|
t,
|
|
4346
4360
|
n,
|
|
4347
4361
|
r
|
|
4348
|
-
]), null),
|
|
4362
|
+
]), null), $l = ({ table: e, children: t }) => {
|
|
4349
4363
|
let { infiniteScroll: n = !1, triggerScrollToActiveRow: r = !1, rows: i } = e, a = h(() => typeof e.activeRowIndex == "number" ? e.activeRowIndex : Array.isArray(i) && i.length ? i.findIndex((e) => e && e.active) : -1, [i, e.activeRowIndex]);
|
|
4350
|
-
return n ? /* @__PURE__ */ S(
|
|
4364
|
+
return n ? /* @__PURE__ */ S(Zl, {
|
|
4351
4365
|
table: e,
|
|
4352
|
-
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(
|
|
4366
|
+
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(Ql, {
|
|
4353
4367
|
isVirtualized: !0,
|
|
4354
4368
|
virtualizer: e,
|
|
4355
4369
|
activeIndex: a,
|
|
@@ -4361,13 +4375,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4361
4375
|
}) : /* @__PURE__ */ C("div", {
|
|
4362
4376
|
id: "scrollWrapper",
|
|
4363
4377
|
className: Ks.scroll,
|
|
4364
|
-
children: [/* @__PURE__ */ S(
|
|
4378
|
+
children: [/* @__PURE__ */ S(Ql, {
|
|
4365
4379
|
isVirtualized: !1,
|
|
4366
4380
|
activeIndex: a,
|
|
4367
4381
|
triggerScrollToActiveRow: r
|
|
4368
4382
|
}), t({})]
|
|
4369
4383
|
});
|
|
4370
|
-
},
|
|
4384
|
+
}, eu = (e) => {
|
|
4371
4385
|
var t, n, r, i, a;
|
|
4372
4386
|
let { onListReorder: o = () => {}, canListReorder: s = () => !0, beforeRenderRow: c, table: l } = e, { columnWidths: u, footer: d, name: f, rows: p = [], actions: m, actionsRight: h, columnHeaderAlignments: g, columnAlignment: v, striped: y = !0, testId: x, draggable: w, defaultEmptyRow: T = null, onAddRow: E = null, bordered: D = !0, maxHeight: O, fixedWidth: k } = l, A = _(null), j = sn(e, "table.headers", []), M = dl(p, j), N = pl(p, j), P = M + +!!N, F = !d || (d == null || (t = d.pagination) == null || (t = t.rowsPerPage) == null ? void 0 : t.value) === 0 || Number(d == null || (n = d.pagination) == null ? void 0 : n.selectedPage) >= Number(d == null || (r = d.pagination) == null ? void 0 : r.rowCount) / Number(d == null || (i = d.pagination) == null || (i = i.rowsPerPage) == null ? void 0 : i.value), I = (T == null || (a = T.cells) == null ? void 0 : a.length) && E && F, L = {
|
|
4373
4387
|
cells: I ? T.cells.map((e, t) => (e == null ? void 0 : e.type) === "Input" ? {
|
|
@@ -4416,7 +4430,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4416
4430
|
rows: R,
|
|
4417
4431
|
tbodyRef: A,
|
|
4418
4432
|
canListReorder: s,
|
|
4419
|
-
children: ({ dropDisabled: e }) => /* @__PURE__ */ S(
|
|
4433
|
+
children: ({ dropDisabled: e }) => /* @__PURE__ */ S($l, {
|
|
4420
4434
|
table: z,
|
|
4421
4435
|
children: ({ virtualizer: t, tableStyle: n }) => /* @__PURE__ */ C("table", {
|
|
4422
4436
|
className: b(Ks.table, y ? Ks.striped : ""),
|
|
@@ -4435,23 +4449,23 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4435
4449
|
draggableTable: w
|
|
4436
4450
|
}, `0_${t}`)) }), /* @__PURE__ */ S("tbody", {
|
|
4437
4451
|
ref: A,
|
|
4438
|
-
children: t ? t.getVirtualItems().map((
|
|
4439
|
-
let
|
|
4440
|
-
row: r,
|
|
4441
|
-
rowIndex: n
|
|
4442
|
-
}) : r;
|
|
4443
|
-
return /* @__PURE__ */ S(Jl, {
|
|
4444
|
-
rowIndex: n,
|
|
4452
|
+
children: t ? t.getVirtualItems().map((n) => {
|
|
4453
|
+
let r = n.index, i = R[r], a = c ? c({
|
|
4445
4454
|
row: i,
|
|
4455
|
+
rowIndex: r
|
|
4456
|
+
}) : i;
|
|
4457
|
+
return /* @__PURE__ */ S(Jl, {
|
|
4458
|
+
rowIndex: r,
|
|
4459
|
+
row: a,
|
|
4446
4460
|
columnCount: M,
|
|
4447
4461
|
columnWidths: u,
|
|
4448
4462
|
colSpan: P,
|
|
4449
4463
|
hasRowActions: N,
|
|
4450
4464
|
columnAlignment: v,
|
|
4451
4465
|
draggableTable: w,
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
}, `1_${
|
|
4466
|
+
dropDisabled: e,
|
|
4467
|
+
measureRef: t.measureElement
|
|
4468
|
+
}, `1_${r}`);
|
|
4455
4469
|
}) : R.map((t, n) => {
|
|
4456
4470
|
let r = c ? c({
|
|
4457
4471
|
row: t,
|
|
@@ -4480,14 +4494,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4480
4494
|
})
|
|
4481
4495
|
]
|
|
4482
4496
|
});
|
|
4483
|
-
},
|
|
4497
|
+
}, tu = "blank", nu = 1e4, ru = (e, t, n, r) => {
|
|
4484
4498
|
let i = `${t} → ${n}:`, a = e.filter((e) => !e.startsWith(i)), o = r ? [...a, `${i} ${r}`] : a;
|
|
4485
4499
|
return {
|
|
4486
4500
|
updatedErrors: o,
|
|
4487
4501
|
isValid: o.length === 0
|
|
4488
4502
|
};
|
|
4489
|
-
},
|
|
4490
|
-
let i = h(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, o] = v(
|
|
4503
|
+
}, iu = 20, au = 1, ou = ({ validationRules: e, parsedResult: t, updateState: n, testId: r }) => {
|
|
4504
|
+
let i = h(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, o] = v(iu), [s, c] = v(au), u = _([]), f = (s - 1) * a, p = a === 0 ? t.rows.length : f + a, [m, g] = v([]), y = h(() => {
|
|
4491
4505
|
let n = e.filter((e) => !e.optionalColumn);
|
|
4492
4506
|
return t.fields.length === n.length ? n : e;
|
|
4493
4507
|
}, [e, t.fields.length]), b = l((e, r) => (!u.current.length && t.rows.length && (u.current = t.rows[0].map((e) => Kc(e) ? "NumberInput" : "Input")), {
|
|
@@ -4501,7 +4515,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4501
4515
|
disableValidationOnFocus: !0,
|
|
4502
4516
|
error: x,
|
|
4503
4517
|
validationCallback: (e, i) => {
|
|
4504
|
-
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } =
|
|
4518
|
+
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } = ru(t.errors, a, e, i);
|
|
4505
4519
|
n({ parsedResult: {
|
|
4506
4520
|
...t,
|
|
4507
4521
|
errors: o,
|
|
@@ -4510,7 +4524,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4510
4524
|
},
|
|
4511
4525
|
onChange: (e) => {
|
|
4512
4526
|
var i;
|
|
4513
|
-
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } =
|
|
4527
|
+
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } = ru(t.errors, s, m, c), d = t.rows.map((e, t) => t === r ? e.map((e, t) => t === a ? o : e) : e);
|
|
4514
4528
|
n({ parsedResult: {
|
|
4515
4529
|
...t,
|
|
4516
4530
|
rows: d,
|
|
@@ -4552,7 +4566,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4552
4566
|
]);
|
|
4553
4567
|
let x = h(() => t.fields.map((e, r) => {
|
|
4554
4568
|
var a, o, s;
|
|
4555
|
-
let c = y == null ? void 0 : y[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => Sn(e) ===
|
|
4569
|
+
let c = y == null ? void 0 : y[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => Sn(e) === tu);
|
|
4556
4570
|
if (!l.length || u) return {};
|
|
4557
4571
|
let d = t == null || (a = t.units) == null ? void 0 : a[r], f = Sn(d), p = l != null && l.some((e) => Sn(e) === f) ? d : (o = c == null ? void 0 : c.defaultUnit) == null ? "" : o;
|
|
4558
4572
|
return {
|
|
@@ -4600,7 +4614,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4600
4614
|
b,
|
|
4601
4615
|
f
|
|
4602
4616
|
]);
|
|
4603
|
-
return /* @__PURE__ */ S(
|
|
4617
|
+
return /* @__PURE__ */ S(eu, {
|
|
4604
4618
|
beforeRenderRow: E,
|
|
4605
4619
|
onListReorder: ({ from: e, to: r }) => {
|
|
4606
4620
|
let i = [...t.rows], [a] = i.splice(e, 1);
|
|
@@ -4663,7 +4677,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4663
4677
|
} }
|
|
4664
4678
|
}
|
|
4665
4679
|
});
|
|
4666
|
-
},
|
|
4680
|
+
}, su = { listStyle: "_listStyle_yjfjw_1" }, cu = ({ errors: e, t }) => {
|
|
4667
4681
|
var n;
|
|
4668
4682
|
let r = (n = [...e]) == null ? void 0 : n.sort((e, t) => {
|
|
4669
4683
|
let n = (e) => {
|
|
@@ -4679,18 +4693,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4679
4693
|
content: t("unableToImportPleaseCorrectError", { rows: e == null ? void 0 : e.length }),
|
|
4680
4694
|
type: "Error",
|
|
4681
4695
|
details: /* @__PURE__ */ S("ul", {
|
|
4682
|
-
className:
|
|
4696
|
+
className: su.listStyle,
|
|
4683
4697
|
children: r.map((e, t) => /* @__PURE__ */ S("li", { children: e }, t))
|
|
4684
4698
|
})
|
|
4685
4699
|
};
|
|
4686
|
-
},
|
|
4700
|
+
}, lu = ({ errors: e, t }) => e.length ? /* @__PURE__ */ S(Gs, { message: cu({
|
|
4687
4701
|
errors: e,
|
|
4688
4702
|
t
|
|
4689
|
-
}) }) : null,
|
|
4703
|
+
}) }) : null, uu = {
|
|
4690
4704
|
empty: "_empty_fe425_1",
|
|
4691
4705
|
text: "_text_fe425_11"
|
|
4692
|
-
},
|
|
4693
|
-
className:
|
|
4706
|
+
}, du = ({ width: e = "auto", height: t = "auto", text: n = "No data", children: r, testId: i }) => /* @__PURE__ */ C("div", {
|
|
4707
|
+
className: uu.empty,
|
|
4694
4708
|
style: {
|
|
4695
4709
|
width: e,
|
|
4696
4710
|
height: t
|
|
@@ -4726,7 +4740,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4726
4740
|
})
|
|
4727
4741
|
}),
|
|
4728
4742
|
n !== "" && /* @__PURE__ */ S("div", {
|
|
4729
|
-
className:
|
|
4743
|
+
className: uu.text,
|
|
4730
4744
|
children: /* @__PURE__ */ S(Yo, {
|
|
4731
4745
|
faint: !0,
|
|
4732
4746
|
children: n
|
|
@@ -4734,52 +4748,52 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4734
4748
|
}),
|
|
4735
4749
|
r
|
|
4736
4750
|
]
|
|
4737
|
-
}),
|
|
4751
|
+
}), fu = (e) => {
|
|
4738
4752
|
var t;
|
|
4739
4753
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4740
4754
|
let t = e == null ? void 0 : e.match(/[.,]/g);
|
|
4741
4755
|
return t && t.length > 1;
|
|
4742
4756
|
});
|
|
4743
|
-
},
|
|
4757
|
+
}, pu = (e) => {
|
|
4744
4758
|
var t;
|
|
4745
4759
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4746
4760
|
var t;
|
|
4747
4761
|
return !(e != null && e.includes(".")) && (e == null || (t = e.match(/,/g)) == null ? void 0 : t.length) === 1;
|
|
4748
4762
|
});
|
|
4749
|
-
},
|
|
4763
|
+
}, mu = (e, t, n) => e >= t - n, hu = (e) => !!e && e !== "blank" && e.trim() !== "", gu = (e, t, n, r, i, a, o) => {
|
|
4750
4764
|
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;
|
|
4751
|
-
if (i && !
|
|
4765
|
+
if (i && !mu(e.length, l, c) && s.push(o("incorrectNumberOfFieldNameHeaderColumns", { expectedLengthMessage: u })), a) {
|
|
4752
4766
|
var f, p;
|
|
4753
4767
|
let e = r.filter((e) => {
|
|
4754
4768
|
var t;
|
|
4755
|
-
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(
|
|
4769
|
+
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(hu));
|
|
4756
4770
|
}).length;
|
|
4757
|
-
|
|
4771
|
+
mu(t == null || (f = t.filter(hu)) == 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 }));
|
|
4758
4772
|
}
|
|
4759
4773
|
return n.length === 0 ? s.push(o("incorrectNumberOfDataColumns", {
|
|
4760
4774
|
expectedLengthMessage: u,
|
|
4761
4775
|
dataRowStartIndex: d
|
|
4762
4776
|
})) : n.forEach((e, t) => {
|
|
4763
|
-
|
|
4777
|
+
mu(e.length, l, c) || s.push(o("incorrectNumberOfDataColumns", {
|
|
4764
4778
|
expectedLengthMessage: u,
|
|
4765
4779
|
dataRowStartIndex: d + t
|
|
4766
4780
|
}));
|
|
4767
4781
|
}), s;
|
|
4768
|
-
},
|
|
4782
|
+
}, _u = (e) => e.toUpperCase().replace(/\(.*?\)/g, "").replace(/[^A-Z0-9]/g, "").trim(), vu = ({ value: e, defaultAllowedValues: t }) => {
|
|
4769
4783
|
var n;
|
|
4770
|
-
let r =
|
|
4771
|
-
return (n = t == null ? void 0 : t.some((e) =>
|
|
4772
|
-
},
|
|
4784
|
+
let r = _u(e);
|
|
4785
|
+
return (n = t == null ? void 0 : t.some((e) => _u(e).includes(r) || r.includes(_u(e)))) != null && n;
|
|
4786
|
+
}, yu = ({ value: e, defaultAllowedValues: t }) => {
|
|
4773
4787
|
var n;
|
|
4774
4788
|
return (n = t == null ? void 0 : t.includes(e)) != null && n;
|
|
4775
|
-
},
|
|
4789
|
+
}, bu = (e, t, n, r, i, a) => {
|
|
4776
4790
|
let o = [];
|
|
4777
4791
|
if (r) {
|
|
4778
4792
|
let r = n.map((e) => e.fieldName).filter(Boolean);
|
|
4779
4793
|
e.forEach((i, s) => {
|
|
4780
4794
|
var c, l;
|
|
4781
4795
|
let u = n[s];
|
|
4782
|
-
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ?
|
|
4796
|
+
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ? vu : c)({
|
|
4783
4797
|
value: i,
|
|
4784
4798
|
defaultAllowedValues: r,
|
|
4785
4799
|
columnIndex: s,
|
|
@@ -4801,7 +4815,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4801
4815
|
var l, u;
|
|
4802
4816
|
let d = n[c];
|
|
4803
4817
|
if (!d || d != null && d.optionalColumn) return;
|
|
4804
|
-
let f = (l = d.unitsValidator) == null ?
|
|
4818
|
+
let f = (l = d.unitsValidator) == null ? yu : l, p = (u = i == null ? void 0 : i[c]) == null ? [] : u;
|
|
4805
4819
|
f({
|
|
4806
4820
|
value: r,
|
|
4807
4821
|
defaultAllowedValues: p,
|
|
@@ -4817,7 +4831,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4817
4831
|
});
|
|
4818
4832
|
}
|
|
4819
4833
|
return o;
|
|
4820
|
-
},
|
|
4834
|
+
}, xu = (e, t, n) => {
|
|
4821
4835
|
let r = [];
|
|
4822
4836
|
return e.forEach((e, i) => {
|
|
4823
4837
|
e.forEach((e, a) => {
|
|
@@ -4830,91 +4844,91 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4830
4844
|
})}`);
|
|
4831
4845
|
});
|
|
4832
4846
|
}), r;
|
|
4833
|
-
},
|
|
4834
|
-
let s =
|
|
4835
|
-
return s.length === 0 && (s = s.concat(
|
|
4847
|
+
}, Su = (e, t, n, r, i, a, o) => {
|
|
4848
|
+
let s = gu(e, t, n, r, i, a, o);
|
|
4849
|
+
return s.length === 0 && (s = s.concat(bu(e, t, r, i, a, o), xu(n, r, o))), {
|
|
4836
4850
|
isValid: s.length === 0,
|
|
4837
4851
|
errors: s
|
|
4838
4852
|
};
|
|
4839
|
-
},
|
|
4853
|
+
}, Cu = (e, t, n) => {
|
|
4840
4854
|
var r, i, a, o, s, c, l, u, d, f, p, m, h, g;
|
|
4841
4855
|
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;
|
|
4842
4856
|
return {
|
|
4843
4857
|
hasFieldNameHeader: b || v && !x && !C || v && y && !C,
|
|
4844
4858
|
hasUnitHeader: x || S || v && y && !x && !C && !w || v && y && !C && !w
|
|
4845
4859
|
};
|
|
4846
|
-
},
|
|
4860
|
+
}, wu = (e, { validationRules: t }) => {
|
|
4847
4861
|
var n, r, i;
|
|
4848
4862
|
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) => {
|
|
4849
4863
|
var t;
|
|
4850
4864
|
return (t = e == null ? void 0 : e.defaultUnit) == null ? s(e == null ? void 0 : e.validUnits) : t;
|
|
4851
|
-
}), { hasFieldNameHeader: l, hasUnitHeader: u } =
|
|
4865
|
+
}), { hasFieldNameHeader: l, hasUnitHeader: u } = Cu(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());
|
|
4852
4866
|
return l || e == null || e.unshift(o), u || e == null || e.splice(1, 0, c), {
|
|
4853
4867
|
hasFieldNameHeader: l,
|
|
4854
4868
|
hasUnitHeader: u
|
|
4855
4869
|
};
|
|
4856
|
-
},
|
|
4870
|
+
}, Tu = (e) => Math.round(e * 100) / 100, Eu = (e) => e.join(", ").replace(/,\s*$/, ""), Du = {
|
|
4857
4871
|
skipEmptyLines: !0,
|
|
4858
4872
|
delimiter: (e) => {
|
|
4859
4873
|
var t, n;
|
|
4860
4874
|
let r = e.substring(0, 200), i = ((t = r.match(/\t/g)) == null ? [] : t).length, a = ((n = r.match(/;/g)) == null ? [] : n).length;
|
|
4861
4875
|
return i === 0 && a === 0 ? "," : i > a ? " " : ";";
|
|
4862
4876
|
}
|
|
4863
|
-
},
|
|
4877
|
+
}, Ou = [
|
|
4864
4878
|
"text/csv",
|
|
4865
4879
|
"text/plain",
|
|
4866
4880
|
"application/json",
|
|
4867
4881
|
"application/vnd.ms-excel"
|
|
4868
|
-
],
|
|
4882
|
+
], ku = (e) => Ou.includes(e.type), Au = (e) => e instanceof File, ju = (e) => e.trim().startsWith("["), Mu = (e) => {
|
|
4869
4883
|
try {
|
|
4870
4884
|
var t;
|
|
4871
4885
|
return !!((t = JSON.parse(e)) != null && t.path);
|
|
4872
4886
|
} catch {
|
|
4873
4887
|
return !1;
|
|
4874
4888
|
}
|
|
4875
|
-
},
|
|
4889
|
+
}, Nu = (e) => new Promise((t, n) => {
|
|
4876
4890
|
let r = new FileReader();
|
|
4877
4891
|
r.onload = () => t(String(r.result)), r.onerror = n, r.readAsText(e);
|
|
4878
|
-
}),
|
|
4892
|
+
}), Pu = async (e, t, n) => {
|
|
4879
4893
|
try {
|
|
4880
|
-
return
|
|
4894
|
+
return Vu({
|
|
4881
4895
|
data: JSON.parse(e),
|
|
4882
4896
|
errors: []
|
|
4883
4897
|
}, t, n);
|
|
4884
4898
|
} catch (e) {
|
|
4885
4899
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4886
4900
|
}
|
|
4887
|
-
},
|
|
4901
|
+
}, Fu = async (e, t, n) => {
|
|
4888
4902
|
try {
|
|
4889
4903
|
let r = JSON.parse(e).path.map((e) => [
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4904
|
+
Tu(e.md),
|
|
4905
|
+
Tu(e.inclination),
|
|
4906
|
+
Tu(e.gridAzimuth)
|
|
4893
4907
|
]);
|
|
4894
4908
|
return r.unshift([
|
|
4895
4909
|
"m",
|
|
4896
4910
|
"deg",
|
|
4897
4911
|
"deg"
|
|
4898
|
-
]),
|
|
4912
|
+
]), Vu({
|
|
4899
4913
|
data: r,
|
|
4900
4914
|
errors: []
|
|
4901
4915
|
}, t, n);
|
|
4902
4916
|
} catch (e) {
|
|
4903
4917
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4904
4918
|
}
|
|
4905
|
-
},
|
|
4919
|
+
}, Iu = (e) => e.replace(",", "."), Lu = (e) => e.map((e) => e.map((e) => Iu(e))), Ru = (e, { importLimit: t, ...n }, r) => new Promise((i) => {
|
|
4906
4920
|
Yr.parse(e, {
|
|
4907
|
-
...
|
|
4921
|
+
...Du,
|
|
4908
4922
|
preview: t,
|
|
4909
4923
|
complete: (e) => {
|
|
4910
|
-
let a =
|
|
4924
|
+
let a = Vu(e, {
|
|
4911
4925
|
importLimit: t,
|
|
4912
4926
|
...n
|
|
4913
4927
|
}, r);
|
|
4914
|
-
a.rows =
|
|
4928
|
+
a.rows = Lu(a.rows), i(a);
|
|
4915
4929
|
}
|
|
4916
4930
|
});
|
|
4917
|
-
}),
|
|
4931
|
+
}), zu = async (e, t, n) => {
|
|
4918
4932
|
let r = {
|
|
4919
4933
|
isValid: !1,
|
|
4920
4934
|
fields: [],
|
|
@@ -4923,13 +4937,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4923
4937
|
errors: []
|
|
4924
4938
|
};
|
|
4925
4939
|
try {
|
|
4926
|
-
if (
|
|
4927
|
-
let i =
|
|
4928
|
-
return
|
|
4940
|
+
if (Au(e) && !ku(e)) return r.errors.push(`${n("wrongFileFormatExpectedOneOf")} ${Eu(Array.from(Ou))}`), r;
|
|
4941
|
+
let i = Au(e) ? await Nu(e) : e;
|
|
4942
|
+
return ju(i) ? await Pu(i, t, n) : Mu(i) ? await Fu(i, t, n) : await Ru(e, t, n);
|
|
4929
4943
|
} catch (e) {
|
|
4930
4944
|
return r.errors.push(e.message), r;
|
|
4931
4945
|
}
|
|
4932
|
-
},
|
|
4946
|
+
}, Bu = (e, t, n, r) => {
|
|
4933
4947
|
var i;
|
|
4934
4948
|
let a = (i = r == null ? void 0 : r.delimiter) == null ? "," : i, o = [
|
|
4935
4949
|
e,
|
|
@@ -4941,7 +4955,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4941
4955
|
header: !0,
|
|
4942
4956
|
delimiter: a
|
|
4943
4957
|
});
|
|
4944
|
-
},
|
|
4958
|
+
}, Vu = (e, t, n) => {
|
|
4945
4959
|
let { data: r, errors: i } = e, a = {
|
|
4946
4960
|
isValid: !1,
|
|
4947
4961
|
fields: [],
|
|
@@ -4950,22 +4964,22 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4950
4964
|
errors: i.map((e) => e.message)
|
|
4951
4965
|
};
|
|
4952
4966
|
if (i.length > 0) return a;
|
|
4953
|
-
let { hasFieldNameHeader: o, hasUnitHeader: s } =
|
|
4967
|
+
let { hasFieldNameHeader: o, hasUnitHeader: s } = wu(r, t);
|
|
4954
4968
|
a.fields = r[0].map((e) => e.trim()), a.units = r[1].map((e) => e.trim()).filter(Boolean), a.rows = r.slice(2);
|
|
4955
4969
|
let { validationRules: c } = t;
|
|
4956
4970
|
if (c.length) {
|
|
4957
|
-
let { isValid: e, errors: t } =
|
|
4971
|
+
let { isValid: e, errors: t } = Su(a.fields, a.units, a.rows, c, o, s, n);
|
|
4958
4972
|
a.errors.push(...t), a.isValid = e && t.length === 0;
|
|
4959
4973
|
} else a.isValid = a.errors.length === 0;
|
|
4960
4974
|
return a;
|
|
4961
|
-
},
|
|
4975
|
+
}, Hu = .001, Uu = 0, Wu = (e, t) => e.every((e) => {
|
|
4962
4976
|
let n = e[t];
|
|
4963
4977
|
return n !== void 0 && n.trim() !== "" && fn(Tr(n));
|
|
4964
|
-
}),
|
|
4978
|
+
}), Gu = (e, t = {}) => {
|
|
4965
4979
|
var n, r;
|
|
4966
|
-
let { independentColumnIndex: i =
|
|
4967
|
-
if (e.length <= 2 || !
|
|
4968
|
-
let s = (n = (r = Qr(e, (e) => e.length)) == null ? void 0 : r.length) == null ? 0 : n, c = ei(a == null ? $r(s) : a).filter((t) => t !== i &&
|
|
4980
|
+
let { independentColumnIndex: i = Uu, dependentColumnIndexes: a, tolerance: o = Hu } = t;
|
|
4981
|
+
if (e.length <= 2 || !Wu(e, i)) return e.slice();
|
|
4982
|
+
let s = (n = (r = Qr(e, (e) => e.length)) == null ? void 0 : r.length) == null ? 0 : n, c = ei(a == null ? $r(s) : a).filter((t) => t !== i && Wu(e, t));
|
|
4969
4983
|
if (c.length === 0) return e.slice();
|
|
4970
4984
|
let l = /* @__PURE__ */ new Set();
|
|
4971
4985
|
for (let t of c) {
|
|
@@ -4979,7 +4993,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4979
4993
|
}
|
|
4980
4994
|
}
|
|
4981
4995
|
return e.filter((e, t) => l.has(t));
|
|
4982
|
-
},
|
|
4996
|
+
}, Ku = ({ id: e, message: t = {
|
|
4983
4997
|
type: zs.INFO,
|
|
4984
4998
|
content: ""
|
|
4985
4999
|
}, autoClose: n = 6e3, onClose: r }) => {
|
|
@@ -5020,13 +5034,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5020
5034
|
transition: ti,
|
|
5021
5035
|
type: s
|
|
5022
5036
|
});
|
|
5023
|
-
},
|
|
5037
|
+
}, qu = (e) => {
|
|
5024
5038
|
ri.dismiss(e);
|
|
5025
|
-
},
|
|
5039
|
+
}, Ju = (e, t) => {
|
|
5026
5040
|
t(() => {
|
|
5027
|
-
|
|
5041
|
+
Ku({ ...e });
|
|
5028
5042
|
});
|
|
5029
|
-
},
|
|
5043
|
+
}, Yu = {
|
|
5030
5044
|
inputInTable: "_inputInTable_h6wco_1",
|
|
5031
5045
|
inputHover: "_inputHover_h6wco_13",
|
|
5032
5046
|
inputFocus: "_inputFocus_h6wco_18",
|
|
@@ -5042,7 +5056,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5042
5056
|
control: "_control_h6wco_25",
|
|
5043
5057
|
labelText: "_labelText_h6wco_137",
|
|
5044
5058
|
noMargin: "_noMargin_h6wco_201"
|
|
5045
|
-
},
|
|
5059
|
+
}, Xu = ({ name: e, label: t, checked: n = !1, disabled: r, display: i, small: a = !1, onChange: o, noMargin: s = !1, testId: c, helpText: l, onClickHelp: d, textTransform: f = Oi.CAPITALIZE }) => {
|
|
5046
5060
|
let p = u(W), m = l || d;
|
|
5047
5061
|
return /* @__PURE__ */ C(ai, {
|
|
5048
5062
|
name: e,
|
|
@@ -5055,14 +5069,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5055
5069
|
value: t
|
|
5056
5070
|
} });
|
|
5057
5071
|
},
|
|
5058
|
-
className: b(
|
|
5072
|
+
className: b(Yu.toggleContainer, s && Yu.noMargin),
|
|
5059
5073
|
style: { display: i },
|
|
5060
5074
|
"data-testid": c ? `${c}-field` : void 0,
|
|
5061
5075
|
children: [/* @__PURE__ */ C(ii, {
|
|
5062
|
-
className: b(
|
|
5076
|
+
className: b(Yu.toggle, a && Yu.small, !t && Yu.noLabel),
|
|
5063
5077
|
"data-testid": c,
|
|
5064
|
-
children: [/* @__PURE__ */ S("span", { className:
|
|
5065
|
-
className:
|
|
5078
|
+
children: [/* @__PURE__ */ S("span", { className: Yu.control }), t && /* @__PURE__ */ S("span", {
|
|
5079
|
+
className: Yu.labelText,
|
|
5066
5080
|
style: { textTransform: f },
|
|
5067
5081
|
children: t
|
|
5068
5082
|
})]
|
|
@@ -5071,7 +5085,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5071
5085
|
onClick: d
|
|
5072
5086
|
})]
|
|
5073
5087
|
});
|
|
5074
|
-
},
|
|
5088
|
+
}, Zu = ({ 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 }) => {
|
|
5075
5089
|
let { modalVisibility: { reviewPasteModal: m, pasteModalHelpVisible: h, helpModal: g } } = t, { warningMessage: y, actionButtonLabel: b, changeRulesAction: w, checkPrevalidationNeed: T } = c == null ? {} : c, E = _(null), [D, O] = v(!1), [k, A] = v({
|
|
5076
5090
|
pastedText: "",
|
|
5077
5091
|
parsedResult: {
|
|
@@ -5092,10 +5106,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5092
5106
|
let { pastedText: j, parsedResult: M } = k, N = l((t) => {
|
|
5093
5107
|
if (t) {
|
|
5094
5108
|
var n, r;
|
|
5095
|
-
let t =
|
|
5109
|
+
let t = Gu(M.rows, e.downsampleConfig), i = {
|
|
5096
5110
|
validationRules: o,
|
|
5097
|
-
importLimit: (n = e.importLimit) == null ?
|
|
5098
|
-
}, a =
|
|
5111
|
+
importLimit: (n = e.importLimit) == null ? nu : n
|
|
5112
|
+
}, a = Bu(M.fields, (r = M.units) == null ? [] : r, t, i);
|
|
5099
5113
|
f(() => A({
|
|
5100
5114
|
parsedResult: {
|
|
5101
5115
|
...M,
|
|
@@ -5128,17 +5142,17 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5128
5142
|
}, F = () => {
|
|
5129
5143
|
r("helpModal", !g);
|
|
5130
5144
|
}, I = () => {
|
|
5131
|
-
n(k), s(k.parsedResult), i(),
|
|
5145
|
+
n(k), s(k.parsedResult), i(), Ju({ message: {
|
|
5132
5146
|
type: "Success",
|
|
5133
5147
|
content: u("pasteSuccessful")
|
|
5134
5148
|
} }, f);
|
|
5135
|
-
}, L = T && T(M), { isValid: R, errors: z } = M, B = z.length, ee = j === "", te =
|
|
5149
|
+
}, L = T && T(M), { isValid: R, errors: z } = M, B = z.length, ee = j === "", te = pu(j), ne = fu(j), V = /* @__PURE__ */ C(x, { children: [
|
|
5136
5150
|
/* @__PURE__ */ C("div", {
|
|
5137
5151
|
className: Ls.headerContainer,
|
|
5138
5152
|
children: [
|
|
5139
5153
|
/* @__PURE__ */ S(K, {
|
|
5140
5154
|
text: u("downsampleTooltip"),
|
|
5141
|
-
children: /* @__PURE__ */ S(
|
|
5155
|
+
children: /* @__PURE__ */ S(Xu, {
|
|
5142
5156
|
label: u("downsampled"),
|
|
5143
5157
|
checked: D,
|
|
5144
5158
|
onChange: () => N(!D),
|
|
@@ -5171,7 +5185,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5171
5185
|
}),
|
|
5172
5186
|
ee ? /* @__PURE__ */ S("div", {
|
|
5173
5187
|
className: Ls.resultContainer,
|
|
5174
|
-
children: /* @__PURE__ */ S(
|
|
5188
|
+
children: /* @__PURE__ */ S(du, {
|
|
5175
5189
|
text: null,
|
|
5176
5190
|
children: /* @__PURE__ */ C("div", {
|
|
5177
5191
|
className: Ls.emptyState,
|
|
@@ -5207,7 +5221,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5207
5221
|
}) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
|
|
5208
5222
|
className: Ls.messagesContainer,
|
|
5209
5223
|
children: [
|
|
5210
|
-
B ? /* @__PURE__ */ S(
|
|
5224
|
+
B ? /* @__PURE__ */ S(lu, {
|
|
5211
5225
|
errors: z,
|
|
5212
5226
|
t: u
|
|
5213
5227
|
}) : null,
|
|
@@ -5230,7 +5244,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5230
5244
|
type: "Warning"
|
|
5231
5245
|
} })
|
|
5232
5246
|
]
|
|
5233
|
-
}), /* @__PURE__ */ S(
|
|
5247
|
+
}), /* @__PURE__ */ S(ou, {
|
|
5234
5248
|
validationRules: o,
|
|
5235
5249
|
parsedResult: M,
|
|
5236
5250
|
updateState: (e) => A((t) => ({
|
|
@@ -5273,7 +5287,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5273
5287
|
onClose: i
|
|
5274
5288
|
} })
|
|
5275
5289
|
});
|
|
5276
|
-
},
|
|
5290
|
+
}, Qu = ({ modals: e = [], modalVisibility: t, onCloseModal: r, testId: i }) => e.length ? /* @__PURE__ */ S(x, { children: e.map(({ name: e, component: a, props: o = {} }) => {
|
|
5277
5291
|
var s;
|
|
5278
5292
|
return /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S(a, {
|
|
5279
5293
|
testId: `${i}-modal-render-${e}`,
|
|
@@ -5281,7 +5295,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5281
5295
|
onClose: () => r({ name: e }),
|
|
5282
5296
|
...o
|
|
5283
5297
|
}) }, e);
|
|
5284
|
-
}) }) : null,
|
|
5298
|
+
}) }) : null, $u = ({ sections: e, iconName: t, testId: n, tooltip: r }) => /* @__PURE__ */ S(lo, {
|
|
5285
5299
|
loading: !0,
|
|
5286
5300
|
menu: {
|
|
5287
5301
|
component: /* @__PURE__ */ S(q, {
|
|
@@ -5297,18 +5311,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5297
5311
|
sections: e
|
|
5298
5312
|
},
|
|
5299
5313
|
testId: n
|
|
5300
|
-
}),
|
|
5314
|
+
}), ed = (e, t, n) => l(async () => {
|
|
5301
5315
|
if (n) try {
|
|
5302
5316
|
return await n();
|
|
5303
5317
|
} catch (t) {
|
|
5304
|
-
console.error("beforeExportData failed", t),
|
|
5318
|
+
console.error("beforeExportData failed", t), Ku({ message: {
|
|
5305
5319
|
type: "Error",
|
|
5306
5320
|
content: e("unableToPrepareExportData")
|
|
5307
5321
|
} });
|
|
5308
5322
|
return;
|
|
5309
5323
|
}
|
|
5310
5324
|
return t;
|
|
5311
|
-
}, [t, n]),
|
|
5325
|
+
}, [t, n]), td = {
|
|
5312
5326
|
cancel: "Cancel",
|
|
5313
5327
|
chooseFile: "Choose file",
|
|
5314
5328
|
copyDecimalComma: "Copy (decimal comma)",
|
|
@@ -5367,26 +5381,26 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5367
5381
|
smartUpload_description: "Upload image and extract table content using a LLM",
|
|
5368
5382
|
smartUpload_smartUpload: "Smart Upload",
|
|
5369
5383
|
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"
|
|
5370
|
-
},
|
|
5371
|
-
let t = Object.keys(
|
|
5372
|
-
let r =
|
|
5384
|
+
}, nd = (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])), rd = (e) => h(() => {
|
|
5385
|
+
let t = Object.keys(td).reduce((t, n) => {
|
|
5386
|
+
let r = td == null ? void 0 : td[n], i = e == null ? void 0 : e[n];
|
|
5373
5387
|
return t[n] = i == null ? r : i, t;
|
|
5374
5388
|
}, {});
|
|
5375
5389
|
return (e, n) => {
|
|
5376
5390
|
let r = t[e];
|
|
5377
|
-
return n ?
|
|
5391
|
+
return n ? nd(r, n) : r;
|
|
5378
5392
|
};
|
|
5379
|
-
}, [e]),
|
|
5393
|
+
}, [e]), id = /^\s*-?\d+(?:[.,]\d+)?(?:e[+-]?\d+)?\s*$/i, ad = (e) => {
|
|
5380
5394
|
var t;
|
|
5381
5395
|
return {
|
|
5382
5396
|
...e,
|
|
5383
5397
|
rows: e == null || (t = e.rows) == null ? void 0 : t.map((e) => e.map((e) => {
|
|
5384
5398
|
let t = String(e == null ? "" : e);
|
|
5385
|
-
return
|
|
5399
|
+
return id.test(t) ? sr(t) : t;
|
|
5386
5400
|
}))
|
|
5387
5401
|
};
|
|
5388
|
-
},
|
|
5389
|
-
let { exportData: a, beforeExportData: o, importLimit: s =
|
|
5402
|
+
}, od = ({ config: e, state: t, setState: n, smartUploadConfig: r, startTransition: i }) => {
|
|
5403
|
+
let { exportData: a, beforeExportData: o, importLimit: s = nu, validationRules: c = [], translations: u, onImportComplete: d = () => {}, disablePasteSuccessfulToast: f, prevalidationConfig: p, onDeleteRows: m } = e == null ? {} : e, { parsedResult: h } = t, { checkPrevalidationNeed: g } = p == null ? {} : p, _ = rd(u), v = ed(_, a, o), y = l((e) => {
|
|
5390
5404
|
n((t) => ({
|
|
5391
5405
|
...t,
|
|
5392
5406
|
...e
|
|
@@ -5430,9 +5444,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5430
5444
|
let t = {
|
|
5431
5445
|
validationRules: c,
|
|
5432
5446
|
importLimit: s
|
|
5433
|
-
}, n =
|
|
5447
|
+
}, n = ad(await zu(e, t, _));
|
|
5434
5448
|
if (g && g(h)) {
|
|
5435
|
-
let { fields: e, units: r, rows: a } = n, o =
|
|
5449
|
+
let { fields: e, units: r, rows: a } = n, o = Bu(e, r == null ? [] : r, a, t);
|
|
5436
5450
|
return i(() => y({
|
|
5437
5451
|
pastedText: o,
|
|
5438
5452
|
parsedResult: h
|
|
@@ -5458,20 +5472,20 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5458
5472
|
let { fromFile: t, showSuccessToast: n = !0 } = e == null ? {} : e, r;
|
|
5459
5473
|
try {
|
|
5460
5474
|
if (r = t ? await t.text() : await navigator.clipboard.readText(), !r) {
|
|
5461
|
-
|
|
5475
|
+
Ju({ message: {
|
|
5462
5476
|
type: "Error",
|
|
5463
5477
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed")
|
|
5464
5478
|
} }, i);
|
|
5465
5479
|
return;
|
|
5466
5480
|
}
|
|
5467
|
-
let e =
|
|
5481
|
+
let e = ad(await zu(r, {
|
|
5468
5482
|
validationRules: c,
|
|
5469
5483
|
importLimit: s
|
|
5470
5484
|
}, _));
|
|
5471
|
-
return e != null && e.isValid ||
|
|
5485
|
+
return e != null && e.isValid || Ju({ message: {
|
|
5472
5486
|
type: "Error",
|
|
5473
5487
|
content: _("clipboardReadFailed")
|
|
5474
|
-
} }, i), n &&
|
|
5488
|
+
} }, i), n && Ju({ message: {
|
|
5475
5489
|
type: "Success",
|
|
5476
5490
|
content: _("pasteSuccessful")
|
|
5477
5491
|
} }, i), {
|
|
@@ -5479,7 +5493,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5479
5493
|
parsedResult: e
|
|
5480
5494
|
};
|
|
5481
5495
|
} catch (e) {
|
|
5482
|
-
|
|
5496
|
+
Ju({ message: {
|
|
5483
5497
|
type: "Error",
|
|
5484
5498
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed"),
|
|
5485
5499
|
details: e.message
|
|
@@ -5492,10 +5506,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5492
5506
|
let n = e == null || (t = e.target) == null || (t = t.files) == null ? void 0 : t[0];
|
|
5493
5507
|
if (!n) return;
|
|
5494
5508
|
let r = await n.text(), a = await C(r);
|
|
5495
|
-
a.isValid ? (f ||
|
|
5509
|
+
a.isValid ? (f || Ju({ message: {
|
|
5496
5510
|
type: "Success",
|
|
5497
5511
|
content: _("pasteSuccessful")
|
|
5498
|
-
} }, i), i(() => d(a))) :
|
|
5512
|
+
} }, i), i(() => d(a))) : Ju({ message: {
|
|
5499
5513
|
type: "Error",
|
|
5500
5514
|
content: _("fileParsingFailed")
|
|
5501
5515
|
} }, i);
|
|
@@ -5509,7 +5523,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5509
5523
|
try {
|
|
5510
5524
|
let t = await navigator.clipboard.readText();
|
|
5511
5525
|
if (!t) {
|
|
5512
|
-
|
|
5526
|
+
Ju({ message: {
|
|
5513
5527
|
type: "Error",
|
|
5514
5528
|
content: _("clipboardIsEmpty")
|
|
5515
5529
|
} }, i);
|
|
@@ -5517,18 +5531,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5517
5531
|
}
|
|
5518
5532
|
let n = await C(t);
|
|
5519
5533
|
if (!n.isValid) {
|
|
5520
|
-
|
|
5534
|
+
Ju({ message: {
|
|
5521
5535
|
type: "Error",
|
|
5522
5536
|
content: _("clipboardReadFailed")
|
|
5523
5537
|
} }, i);
|
|
5524
5538
|
return;
|
|
5525
5539
|
}
|
|
5526
|
-
f ||
|
|
5540
|
+
f || Ju({ message: {
|
|
5527
5541
|
type: "Success",
|
|
5528
5542
|
content: _("pasteSuccessful")
|
|
5529
5543
|
} }, i), e && i(() => d(n));
|
|
5530
5544
|
} catch {
|
|
5531
|
-
|
|
5545
|
+
Ju({ message: {
|
|
5532
5546
|
type: "Error",
|
|
5533
5547
|
content: _("clipboardReadNotAllowed")
|
|
5534
5548
|
} }, i);
|
|
@@ -5543,14 +5557,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5543
5557
|
onClickCopyClipboard: l(async (e) => {
|
|
5544
5558
|
let t = await v();
|
|
5545
5559
|
if (!t) return;
|
|
5546
|
-
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e :
|
|
5560
|
+
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e : tu).slice(0, n.length), s = (e, t) => t === "comma" ? e.replace(/\./g, ",") : e, c = Bu(n, o, a.map((t) => t.map((t) => Zr(t) ? "" : s(t.toString(), e))), { delimiter: " " });
|
|
5547
5561
|
try {
|
|
5548
|
-
await navigator.clipboard.writeText(c),
|
|
5562
|
+
await navigator.clipboard.writeText(c), Ju({ message: {
|
|
5549
5563
|
type: "Success",
|
|
5550
5564
|
content: _("copiedToClipboard")
|
|
5551
5565
|
} }, i);
|
|
5552
5566
|
} catch (e) {
|
|
5553
|
-
|
|
5567
|
+
Ju({ message: {
|
|
5554
5568
|
type: "Error",
|
|
5555
5569
|
content: _("unableToCopyToClipboard"),
|
|
5556
5570
|
details: e.message
|
|
@@ -5560,14 +5574,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5560
5574
|
onSmartUploadResult: l((e) => {
|
|
5561
5575
|
let t = _n(e) && vn(e.errorMessage) ? e.errorMessage : void 0;
|
|
5562
5576
|
if (t) {
|
|
5563
|
-
|
|
5577
|
+
Ju({ message: {
|
|
5564
5578
|
type: "Error",
|
|
5565
5579
|
content: t || "Smart upload failed."
|
|
5566
5580
|
} }, i);
|
|
5567
5581
|
return;
|
|
5568
5582
|
}
|
|
5569
5583
|
if (!cn(e) || e.length < 2 || !on(e, (e) => _n(e) && on(Tn(e), vn))) {
|
|
5570
|
-
|
|
5584
|
+
Ju({ message: {
|
|
5571
5585
|
type: "Error",
|
|
5572
5586
|
content: "Smart upload returned unexpected format.",
|
|
5573
5587
|
details: JSON.stringify(e)
|
|
@@ -5599,14 +5613,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5599
5613
|
]),
|
|
5600
5614
|
deleteAllRows: x
|
|
5601
5615
|
};
|
|
5602
|
-
},
|
|
5616
|
+
}, sd = (e, t) => {
|
|
5603
5617
|
var n, r;
|
|
5604
|
-
let { fields: i, rows: a } = e, o =
|
|
5618
|
+
let { fields: i, rows: a } = e, o = Bu(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");
|
|
5605
5619
|
c.href = window.URL.createObjectURL(s), c.download = `${t}.csv`, document.body.appendChild(c), c.click(), document.body.removeChild(c);
|
|
5606
|
-
},
|
|
5620
|
+
}, cd = (e) => gn(e) && "modalKey" in e, ld = (e, t, n) => rn(e, (e) => {
|
|
5607
5621
|
if (cn(e) || !_n(e)) return;
|
|
5608
5622
|
let { modalKey: r } = e == null ? {} : e;
|
|
5609
|
-
if (
|
|
5623
|
+
if (cd(e) && typeof e.onClick != "function") {
|
|
5610
5624
|
let i = () => {
|
|
5611
5625
|
var e;
|
|
5612
5626
|
n(r, !((e = t.modalVisibility) != null && e[r]));
|
|
@@ -5616,7 +5630,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5616
5630
|
onClick: i
|
|
5617
5631
|
};
|
|
5618
5632
|
}
|
|
5619
|
-
}),
|
|
5633
|
+
}), ud = (e, t, n) => ld(e, t, n), dd = {
|
|
5620
5634
|
pastedText: "",
|
|
5621
5635
|
parsedResult: {
|
|
5622
5636
|
isValid: !1,
|
|
@@ -5631,9 +5645,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5631
5645
|
reviewPasteModal: !1,
|
|
5632
5646
|
helpModal: !1
|
|
5633
5647
|
}
|
|
5634
|
-
},
|
|
5648
|
+
}, fd = ({ config: e, smartUploadConfig: t, testId: n }) => {
|
|
5635
5649
|
var r, i, a, o;
|
|
5636
|
-
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: m = !0, copyFromClipBoard: h = !0, showDeleteOptions: g = !0, showHelpOption: _ = !0, showUploadFileOption: b = !0, modals: x = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = v(
|
|
5650
|
+
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: m = !0, copyFromClipBoard: h = !0, showDeleteOptions: g = !0, showHelpOption: _ = !0, showUploadFileOption: b = !0, modals: x = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = v(dd), { 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 = rd(f), L = ed(I, s, c), [R, z] = y(), B = od({
|
|
5637
5651
|
config: e,
|
|
5638
5652
|
state: E,
|
|
5639
5653
|
setState: D,
|
|
@@ -5666,14 +5680,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5666
5680
|
onClick: () => V("smartUploadModal", !O),
|
|
5667
5681
|
testId: `${n}-smart-upload`
|
|
5668
5682
|
}] : [],
|
|
5669
|
-
...
|
|
5683
|
+
...ud((r = w == null ? void 0 : w.importOptions) == null ? [] : r, E, V)
|
|
5670
5684
|
] : [], le = [
|
|
5671
5685
|
{
|
|
5672
5686
|
type: "Option",
|
|
5673
5687
|
label: I("downloadFile"),
|
|
5674
5688
|
onClick: async () => {
|
|
5675
5689
|
let e = await L();
|
|
5676
|
-
e && e &&
|
|
5690
|
+
e && e && sd(e, d);
|
|
5677
5691
|
}
|
|
5678
5692
|
},
|
|
5679
5693
|
...p ? [{
|
|
@@ -5698,20 +5712,20 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5698
5712
|
}]
|
|
5699
5713
|
}
|
|
5700
5714
|
}],
|
|
5701
|
-
...
|
|
5715
|
+
...ud((i = w == null ? void 0 : w.exportOptions) == null ? [] : i, E, V)
|
|
5702
5716
|
], ue = g ? [{
|
|
5703
5717
|
type: "Option",
|
|
5704
5718
|
label: I("deleteAllRows"),
|
|
5705
5719
|
onClick: () => se(),
|
|
5706
5720
|
testId: `${n}-delete-all-rows`
|
|
5707
|
-
}, ...
|
|
5721
|
+
}, ...ud((a = w == null ? void 0 : w.deleteOptions) == null ? [] : a, E, V)] : [], de = _ ? [
|
|
5708
5722
|
{ type: "Divider" },
|
|
5709
5723
|
{
|
|
5710
5724
|
type: "Option",
|
|
5711
5725
|
label: I("help"),
|
|
5712
5726
|
onClick: () => V("helpModal", !A)
|
|
5713
5727
|
},
|
|
5714
|
-
...
|
|
5728
|
+
...ud((o = w == null ? void 0 : w.helpOptions) == null ? [] : o, E, V)
|
|
5715
5729
|
] : [], fe = [
|
|
5716
5730
|
...ce.length ? [{
|
|
5717
5731
|
section: [...ce, ...de],
|
|
@@ -5737,13 +5751,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5737
5751
|
small: !0,
|
|
5738
5752
|
dark: !0
|
|
5739
5753
|
}),
|
|
5740
|
-
fe.map((e, t) => /* @__PURE__ */ S(
|
|
5754
|
+
fe.map((e, t) => /* @__PURE__ */ S($u, {
|
|
5741
5755
|
sections: e.section,
|
|
5742
5756
|
iconName: e.iconName,
|
|
5743
5757
|
tooltip: e.tooltip,
|
|
5744
5758
|
testId: `data-${e == null ? void 0 : e.name}-menu`
|
|
5745
5759
|
}, t)),
|
|
5746
|
-
k && /* @__PURE__ */ S(
|
|
5760
|
+
k && /* @__PURE__ */ S(Zu, {
|
|
5747
5761
|
config: e,
|
|
5748
5762
|
state: E,
|
|
5749
5763
|
updateState: te,
|
|
@@ -5779,14 +5793,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5779
5793
|
cancelText: I("cancel"),
|
|
5780
5794
|
testId: n
|
|
5781
5795
|
}),
|
|
5782
|
-
/* @__PURE__ */ S(
|
|
5796
|
+
/* @__PURE__ */ S(Qu, {
|
|
5783
5797
|
modals: x,
|
|
5784
5798
|
modalVisibility: E == null ? void 0 : E.modalVisibility,
|
|
5785
5799
|
onCloseModal: ne,
|
|
5786
5800
|
testId: n
|
|
5787
5801
|
})
|
|
5788
5802
|
] });
|
|
5789
|
-
},
|
|
5803
|
+
}, pd = ({ file: e, accept: t, multi: n, name: r, disabled: i, onChange: a = bn, ...o }) => {
|
|
5790
5804
|
let s = u(W), c = _(null), l = () => {
|
|
5791
5805
|
var e;
|
|
5792
5806
|
i || s || (e = c.current) == null || e.click();
|
|
@@ -5814,12 +5828,12 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5814
5828
|
multiple: n,
|
|
5815
5829
|
onChange: d
|
|
5816
5830
|
})] });
|
|
5817
|
-
},
|
|
5831
|
+
}, md = {
|
|
5818
5832
|
label: "_label_uxk69_1",
|
|
5819
5833
|
labelLeft: "_labelLeft_uxk69_5",
|
|
5820
5834
|
icons: "_icons_uxk69_13",
|
|
5821
5835
|
small: "_small_uxk69_27"
|
|
5822
|
-
},
|
|
5836
|
+
}, hd = ({ label: e = null, width: t = "auto", helpText: n = "", helpTextMaxWidth: r = "300px", onClickHelp: i = void 0, lock: a = {
|
|
5823
5837
|
visible: !1,
|
|
5824
5838
|
active: !1,
|
|
5825
5839
|
onClick: () => {},
|
|
@@ -5828,14 +5842,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5828
5842
|
}, info: o, libraryIcon: s, labelLeft: c = !1, small: l = !1, textTransform: u = Oi.CAPITALIZE }) => {
|
|
5829
5843
|
var d;
|
|
5830
5844
|
return /* @__PURE__ */ S("div", {
|
|
5831
|
-
className: b(
|
|
5845
|
+
className: b(md.label, c ? md.labelLeft : "", l ? md.small : ""),
|
|
5832
5846
|
children: /* @__PURE__ */ C("label", {
|
|
5833
5847
|
style: {
|
|
5834
5848
|
textTransform: u,
|
|
5835
5849
|
width: t || ""
|
|
5836
5850
|
},
|
|
5837
5851
|
children: [e, /* @__PURE__ */ C("div", {
|
|
5838
|
-
className:
|
|
5852
|
+
className: md.icons,
|
|
5839
5853
|
children: [
|
|
5840
5854
|
(n || i) && /* @__PURE__ */ S(da, {
|
|
5841
5855
|
text: n,
|
|
@@ -5861,23 +5875,23 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5861
5875
|
})]
|
|
5862
5876
|
})
|
|
5863
5877
|
});
|
|
5864
|
-
},
|
|
5878
|
+
}, gd = {
|
|
5865
5879
|
field: "_field_1xoss_1",
|
|
5866
5880
|
labelLeft: "_labelLeft_1xoss_5",
|
|
5867
5881
|
fieldInput: "_fieldInput_1xoss_9",
|
|
5868
5882
|
formRow: "_formRow_1xoss_12",
|
|
5869
5883
|
"form-row": "_form-row_1xoss_13",
|
|
5870
5884
|
button: "_button_1xoss_22"
|
|
5871
|
-
},
|
|
5885
|
+
}, _d = ({ label: e, labelLeft: t = !1, labelWidth: n = "auto", children: r, helpText: i, helpTextMaxWidth: a = "300px", onClickHelp: o, lock: s = {
|
|
5872
5886
|
visible: !1,
|
|
5873
5887
|
active: !1,
|
|
5874
5888
|
onClick: () => {},
|
|
5875
5889
|
tooltip: "",
|
|
5876
5890
|
testId: void 0
|
|
5877
5891
|
}, info: c, libraryIcon: l, small: u = !1, testId: d, textTransform: f = Oi.CAPITALIZE }) => /* @__PURE__ */ C("div", {
|
|
5878
|
-
className: b(
|
|
5892
|
+
className: b(gd.field, t ? gd.labelLeft : ""),
|
|
5879
5893
|
"data-testid": d,
|
|
5880
|
-
children: [(e || t) && /* @__PURE__ */ S(
|
|
5894
|
+
children: [(e || t) && /* @__PURE__ */ S(hd, {
|
|
5881
5895
|
label: e,
|
|
5882
5896
|
width: n,
|
|
5883
5897
|
helpText: i,
|
|
@@ -5890,10 +5904,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5890
5904
|
small: u,
|
|
5891
5905
|
textTransform: f
|
|
5892
5906
|
}), /* @__PURE__ */ S("div", {
|
|
5893
|
-
className:
|
|
5907
|
+
className: gd.fieldInput,
|
|
5894
5908
|
children: r
|
|
5895
5909
|
})]
|
|
5896
|
-
}),
|
|
5910
|
+
}), vd = ({ alignItems: e = "initial", justifyContent: t = "initial", direction: n = "initial", height: r = "initial", width: i = "initial", children: a = null, wrap: o = !0, gap: s = !1 }) => /* @__PURE__ */ S("div", {
|
|
5897
5911
|
style: {
|
|
5898
5912
|
display: "flex",
|
|
5899
5913
|
flexDirection: n,
|
|
@@ -5905,8 +5919,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5905
5919
|
gap: s === !1 ? 0 : s === !0 ? "var(--padding)" : typeof s == "number" ? `${s}px` : s
|
|
5906
5920
|
},
|
|
5907
5921
|
children: a
|
|
5908
|
-
}),
|
|
5909
|
-
className:
|
|
5922
|
+
}), yd = { formRow: "_formRow_odewu_1" }, bd = ({ children: e }) => /* @__PURE__ */ S("div", {
|
|
5923
|
+
className: yd.formRow,
|
|
5910
5924
|
children: e
|
|
5911
5925
|
}), Z = {
|
|
5912
5926
|
inputInTable: "_inputInTable_15rr3_1",
|
|
@@ -5952,15 +5966,15 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5952
5966
|
hideScrollbar: "_hideScrollbar_15rr3_71",
|
|
5953
5967
|
noPointerEvents: "_noPointerEvents_15rr3_313",
|
|
5954
5968
|
virtualRows: "_virtualRows_15rr3_316"
|
|
5955
|
-
},
|
|
5969
|
+
}, xd = ({ toggleNarrow: e, onClickToggleNarrow: t }) => e ? /* @__PURE__ */ S("a", {
|
|
5956
5970
|
className: Z.toggleNarrow,
|
|
5957
5971
|
onClick: t,
|
|
5958
5972
|
children: /* @__PURE__ */ S(G, { icon: U.CHEVRON_LEFT })
|
|
5959
|
-
}) : null,
|
|
5973
|
+
}) : null, Sd = o(({ name: e, actions: t = [], toggleNarrow: n = !1, onToggleNarrow: r = () => {}, stickyHeader: i }, a) => /* @__PURE__ */ C("div", {
|
|
5960
5974
|
ref: a,
|
|
5961
5975
|
className: b(Z.header, i ? Z.stickyHeader : ""),
|
|
5962
5976
|
children: [
|
|
5963
|
-
/* @__PURE__ */ S(
|
|
5977
|
+
/* @__PURE__ */ S(xd, {
|
|
5964
5978
|
toggleNarrow: n,
|
|
5965
5979
|
onClickToggleNarrow: r
|
|
5966
5980
|
}),
|
|
@@ -5980,14 +5994,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
5980
5994
|
})
|
|
5981
5995
|
})
|
|
5982
5996
|
]
|
|
5983
|
-
})),
|
|
5997
|
+
})), Cd = ({ label: e }) => e ? /* @__PURE__ */ S("span", {
|
|
5984
5998
|
className: Z.label,
|
|
5985
5999
|
children: /* @__PURE__ */ S(no, {
|
|
5986
6000
|
color: e.color,
|
|
5987
6001
|
title: e.value,
|
|
5988
6002
|
small: e.small
|
|
5989
6003
|
})
|
|
5990
|
-
}) : null,
|
|
6004
|
+
}) : null, wd = ({ name: e, icon: t, testId: n }) => {
|
|
5991
6005
|
let r = t && /* @__PURE__ */ S(G, {
|
|
5992
6006
|
icon: t.icon,
|
|
5993
6007
|
color: t.color || "#db2828"
|
|
@@ -6007,8 +6021,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6007
6021
|
children: r
|
|
6008
6022
|
})]
|
|
6009
6023
|
});
|
|
6010
|
-
},
|
|
6011
|
-
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ S(
|
|
6024
|
+
}, Td = ({ item: e }) => {
|
|
6025
|
+
let { name: t, icon: n, details: r, metadata: i, invalid: a, testId: o } = e, s = /* @__PURE__ */ S(wd, {
|
|
6012
6026
|
name: t,
|
|
6013
6027
|
icon: n,
|
|
6014
6028
|
testId: o && `${o}-name`
|
|
@@ -6034,10 +6048,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6034
6048
|
})
|
|
6035
6049
|
]
|
|
6036
6050
|
});
|
|
6037
|
-
},
|
|
6051
|
+
}, Ed = ({ item: e }) => e.metaCount === void 0 ? null : /* @__PURE__ */ S(no, {
|
|
6038
6052
|
color: "rgba(0,0,0,0.25)",
|
|
6039
6053
|
title: e.metaCount
|
|
6040
|
-
}),
|
|
6054
|
+
}), Dd = ({ item: e, expanding: t }) => {
|
|
6041
6055
|
let n = (e) => {
|
|
6042
6056
|
e.preventDefault(), e.stopPropagation();
|
|
6043
6057
|
}, r = !!t && !!e.active && !!e.content;
|
|
@@ -6049,7 +6063,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6049
6063
|
children: e.content
|
|
6050
6064
|
})
|
|
6051
6065
|
});
|
|
6052
|
-
},
|
|
6066
|
+
}, Od = o(({ item: e, index: t }, n) => {
|
|
6053
6067
|
var r;
|
|
6054
6068
|
let i = u(W), { actions: a, disabled: o, expanded: s, onClick: c, title: l, name: d, icon: f, testId: p } = e;
|
|
6055
6069
|
return /* @__PURE__ */ S("div", {
|
|
@@ -6069,13 +6083,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6069
6083
|
className: b(Z.expandIcon, s && Z.expanded),
|
|
6070
6084
|
children: /* @__PURE__ */ S(G, { icon: U.CHEVRON_RIGHT })
|
|
6071
6085
|
}),
|
|
6072
|
-
/* @__PURE__ */ S(
|
|
6086
|
+
/* @__PURE__ */ S(wd, {
|
|
6073
6087
|
name: d,
|
|
6074
6088
|
icon: f
|
|
6075
6089
|
}),
|
|
6076
6090
|
/* @__PURE__ */ C("div", {
|
|
6077
6091
|
className: Z.right,
|
|
6078
|
-
children: [/* @__PURE__ */ S(
|
|
6092
|
+
children: [/* @__PURE__ */ S(Ed, { item: e }), !(o || i) && a && /* @__PURE__ */ S("div", {
|
|
6079
6093
|
className: Z.actions,
|
|
6080
6094
|
children: /* @__PURE__ */ S(fo, { actions: (r = e.actions) == null ? [] : r })
|
|
6081
6095
|
})]
|
|
@@ -6083,7 +6097,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6083
6097
|
]
|
|
6084
6098
|
}) })
|
|
6085
6099
|
});
|
|
6086
|
-
}),
|
|
6100
|
+
}), kd = o(({ item: e, index: t, expanding: n, invokeEditOnRowClick: r, draggable: i }, a) => {
|
|
6087
6101
|
let o = u(W), s = (e, t, s, c, l, u) => {
|
|
6088
6102
|
let d = t.actions && t.actions.find((e) => {
|
|
6089
6103
|
var t;
|
|
@@ -6119,24 +6133,24 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6119
6133
|
className: Z.indentIcon,
|
|
6120
6134
|
children: /* @__PURE__ */ S(G, { icon: U.INDENT })
|
|
6121
6135
|
}) : null,
|
|
6122
|
-
/* @__PURE__ */ S(
|
|
6123
|
-
/* @__PURE__ */ S(
|
|
6136
|
+
/* @__PURE__ */ S(Cd, { label: t.label }),
|
|
6137
|
+
/* @__PURE__ */ S(Td, { item: t }),
|
|
6124
6138
|
/* @__PURE__ */ C("div", {
|
|
6125
6139
|
className: Z.right,
|
|
6126
|
-
children: [/* @__PURE__ */ S(
|
|
6140
|
+
children: [/* @__PURE__ */ S(Ed, { item: t }), !(t.disabled || o) && t.actions && /* @__PURE__ */ S("div", {
|
|
6127
6141
|
className: Z.actions,
|
|
6128
6142
|
children: /* @__PURE__ */ S(fo, { actions: t.actions })
|
|
6129
6143
|
})]
|
|
6130
6144
|
})
|
|
6131
6145
|
]
|
|
6132
|
-
}), /* @__PURE__ */ S(
|
|
6146
|
+
}), /* @__PURE__ */ S(Dd, {
|
|
6133
6147
|
item: t,
|
|
6134
6148
|
expanding: n
|
|
6135
6149
|
})]
|
|
6136
6150
|
})
|
|
6137
6151
|
}, e);
|
|
6138
6152
|
};
|
|
6139
|
-
return e.type === "Heading" ? /* @__PURE__ */ S(
|
|
6153
|
+
return e.type === "Heading" ? /* @__PURE__ */ S(Od, {
|
|
6140
6154
|
ref: a,
|
|
6141
6155
|
item: e,
|
|
6142
6156
|
index: t
|
|
@@ -6151,7 +6165,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6151
6165
|
};
|
|
6152
6166
|
return s(e, t, l, n, r, i);
|
|
6153
6167
|
})(t, e) : s(t, e);
|
|
6154
|
-
}),
|
|
6168
|
+
}), Ad = ({ children: e, draggable: t, list: n, onListReorder: r }) => {
|
|
6155
6169
|
let [i, a] = v(null), o = (e) => {
|
|
6156
6170
|
a(e.active.id);
|
|
6157
6171
|
}, s = (e) => {
|
|
@@ -6174,7 +6188,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6174
6188
|
dropAnimation: null,
|
|
6175
6189
|
children: /* @__PURE__ */ S("div", {
|
|
6176
6190
|
className: Z.dragOverlay,
|
|
6177
|
-
children: /* @__PURE__ */ S(
|
|
6191
|
+
children: /* @__PURE__ */ S(kd, {
|
|
6178
6192
|
draggable: t,
|
|
6179
6193
|
item: n.items[Number(i)],
|
|
6180
6194
|
index: Number(i)
|
|
@@ -6182,7 +6196,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6182
6196
|
})
|
|
6183
6197
|
}), document.body)]
|
|
6184
6198
|
}) : e;
|
|
6185
|
-
},
|
|
6199
|
+
}, jd = ({ items: e, scrollDetails: t, children: n }) => {
|
|
6186
6200
|
let { scrollable: r, hideScrollbar: i, triggerScrollToActiveItem: a, infiniteScroll: o } = t, s = _(null), c = Jr({
|
|
6187
6201
|
count: e.length,
|
|
6188
6202
|
getScrollElement: () => s.current,
|
|
@@ -6215,9 +6229,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6215
6229
|
children: n({ virtualizer: c })
|
|
6216
6230
|
})
|
|
6217
6231
|
});
|
|
6218
|
-
},
|
|
6232
|
+
}, Md = ({ items: e, scrollDetails: t, children: n }) => {
|
|
6219
6233
|
let { scrollable: r, hideScrollbar: i, infiniteScroll: a } = t;
|
|
6220
|
-
return a ? /* @__PURE__ */ S(
|
|
6234
|
+
return a ? /* @__PURE__ */ S(jd, {
|
|
6221
6235
|
items: e,
|
|
6222
6236
|
scrollDetails: t,
|
|
6223
6237
|
children: ({ virtualizer: e }) => n({ virtualizer: e })
|
|
@@ -6228,7 +6242,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6228
6242
|
children: n({})
|
|
6229
6243
|
})
|
|
6230
6244
|
});
|
|
6231
|
-
},
|
|
6245
|
+
}, Nd = ({ 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 = {
|
|
6232
6246
|
scrollable: !1,
|
|
6233
6247
|
hideScrollbar: !1,
|
|
6234
6248
|
triggerScrollToActiveItem: !1,
|
|
@@ -6241,17 +6255,17 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6241
6255
|
marginBottom: d
|
|
6242
6256
|
},
|
|
6243
6257
|
id: "scrollableDiv",
|
|
6244
|
-
children: [!s && /* @__PURE__ */ S(
|
|
6258
|
+
children: [!s && /* @__PURE__ */ S(Sd, {
|
|
6245
6259
|
name: e.name,
|
|
6246
6260
|
actions: e.actions,
|
|
6247
6261
|
toggleNarrow: i,
|
|
6248
6262
|
onToggleNarrow: a,
|
|
6249
6263
|
stickyHeader: c
|
|
6250
|
-
}), /* @__PURE__ */ S(
|
|
6264
|
+
}), /* @__PURE__ */ S(Ad, {
|
|
6251
6265
|
draggable: l,
|
|
6252
6266
|
list: e,
|
|
6253
6267
|
onListReorder: u,
|
|
6254
|
-
children: /* @__PURE__ */ S(
|
|
6268
|
+
children: /* @__PURE__ */ S(Md, {
|
|
6255
6269
|
items: e.items,
|
|
6256
6270
|
scrollDetails: m,
|
|
6257
6271
|
children: ({ virtualizer: t }) => t ? t.getVirtualItems().map((r) => /* @__PURE__ */ S("div", {
|
|
@@ -6259,14 +6273,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6259
6273
|
className: Z.virtualRow,
|
|
6260
6274
|
style: { transform: `translateY(${r.start}px)` },
|
|
6261
6275
|
ref: t.measureElement,
|
|
6262
|
-
children: /* @__PURE__ */ S(
|
|
6276
|
+
children: /* @__PURE__ */ S(kd, {
|
|
6263
6277
|
index: r.index,
|
|
6264
6278
|
draggable: l,
|
|
6265
6279
|
item: e.items[r.index],
|
|
6266
6280
|
expanding: n,
|
|
6267
6281
|
invokeEditOnRowClick: o
|
|
6268
6282
|
})
|
|
6269
|
-
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(
|
|
6283
|
+
}, r.key)) : e.items.map((e, t) => /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(kd, {
|
|
6270
6284
|
index: t,
|
|
6271
6285
|
draggable: l,
|
|
6272
6286
|
item: e,
|
|
@@ -6275,7 +6289,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6275
6289
|
}) }, t))
|
|
6276
6290
|
})
|
|
6277
6291
|
})]
|
|
6278
|
-
}),
|
|
6292
|
+
}), Pd = {
|
|
6279
6293
|
loader: "_loader_477i5_1",
|
|
6280
6294
|
fullViewPortSize: "_fullViewPortSize_477i5_7",
|
|
6281
6295
|
cover: "_cover_477i5_14",
|
|
@@ -6283,33 +6297,33 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6283
6297
|
content: "_content_477i5_44",
|
|
6284
6298
|
text: "_text_477i5_49",
|
|
6285
6299
|
details: "_details_477i5_53"
|
|
6286
|
-
},
|
|
6300
|
+
}, Fd = ({ width: e, height: t, text: n = "", details: r = "", fullViewPortSize: i = !1, cover: a = !1, children: o = null, theme: s = ki.DARK, testId: c = null }) => {
|
|
6287
6301
|
let l = s === ki.DARK ? ki.WHITE : ki.INHERIT, u = s === "white" ? "var(--color-background-raised)" : s === "light" ? "var(--color-background)" : "black";
|
|
6288
6302
|
return /* @__PURE__ */ S("div", {
|
|
6289
|
-
className: b(
|
|
6303
|
+
className: b(Pd.loader, a ? Pd.cover : "", { [Pd.fullViewPortSize]: i }),
|
|
6290
6304
|
style: {
|
|
6291
6305
|
width: e,
|
|
6292
6306
|
height: t
|
|
6293
6307
|
},
|
|
6294
6308
|
"data-testid": c,
|
|
6295
6309
|
children: /* @__PURE__ */ S("div", {
|
|
6296
|
-
className:
|
|
6310
|
+
className: Pd.dimmer,
|
|
6297
6311
|
style: {
|
|
6298
6312
|
background: u,
|
|
6299
6313
|
color: l
|
|
6300
6314
|
},
|
|
6301
6315
|
children: /* @__PURE__ */ C("div", {
|
|
6302
|
-
className:
|
|
6316
|
+
className: Pd.content,
|
|
6303
6317
|
"data-testid": c && `${c}-content`,
|
|
6304
6318
|
children: [
|
|
6305
6319
|
o,
|
|
6306
6320
|
n && /* @__PURE__ */ S("div", {
|
|
6307
|
-
className:
|
|
6321
|
+
className: Pd.text,
|
|
6308
6322
|
"data-testid": c && `${c}-text`,
|
|
6309
6323
|
children: n
|
|
6310
6324
|
}),
|
|
6311
6325
|
r && /* @__PURE__ */ S("div", {
|
|
6312
|
-
className:
|
|
6326
|
+
className: Pd.details,
|
|
6313
6327
|
"data-testid": c && `${c}-details`,
|
|
6314
6328
|
children: r
|
|
6315
6329
|
})
|
|
@@ -6317,15 +6331,15 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6317
6331
|
})
|
|
6318
6332
|
})
|
|
6319
6333
|
});
|
|
6320
|
-
},
|
|
6334
|
+
}, Id = {
|
|
6321
6335
|
menu: "_menu_12x4u_1",
|
|
6322
6336
|
header: "_header_12x4u_11",
|
|
6323
6337
|
item: "_item_12x4u_27",
|
|
6324
6338
|
heading: "_heading_12x4u_32"
|
|
6325
|
-
},
|
|
6339
|
+
}, Ld = ({ option: e, onChange: t }) => {
|
|
6326
6340
|
let { key: n, selected: r, label: i, disabled: a, testId: o, helpText: s, onClickHelp: c, textTransform: l } = e;
|
|
6327
6341
|
return /* @__PURE__ */ S("div", {
|
|
6328
|
-
className:
|
|
6342
|
+
className: Id.item,
|
|
6329
6343
|
children: /* @__PURE__ */ S(fa, {
|
|
6330
6344
|
label: i,
|
|
6331
6345
|
noMargin: !0,
|
|
@@ -6338,21 +6352,21 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6338
6352
|
textTransform: l
|
|
6339
6353
|
})
|
|
6340
6354
|
}, n);
|
|
6341
|
-
},
|
|
6342
|
-
className:
|
|
6355
|
+
}, Rd = ({ label: e }) => /* @__PURE__ */ S("div", {
|
|
6356
|
+
className: Id.heading,
|
|
6343
6357
|
children: e
|
|
6344
|
-
}),
|
|
6358
|
+
}), zd = /* @__PURE__ */ function(e) {
|
|
6345
6359
|
return e.HEADING = "Heading", e.DIVIDER = "Divider", e.DEFAULT = "Default", e;
|
|
6346
|
-
}({}),
|
|
6347
|
-
className: b("menu",
|
|
6360
|
+
}({}), Bd = (e) => e.type !== zd.HEADING && e.type !== zd.DIVIDER && !e.disabled, Vd = ({ options: e, onChangeOptions: t, showHeader: n, maxHeight: r, testId: i }) => /* @__PURE__ */ C("div", {
|
|
6361
|
+
className: b("menu", Id.menu),
|
|
6348
6362
|
style: { maxHeight: r },
|
|
6349
6363
|
"data-testid": i ? `${i}-option-dropdown-layer` : void 0,
|
|
6350
6364
|
children: [n && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
|
|
6351
|
-
className:
|
|
6365
|
+
className: Id.header,
|
|
6352
6366
|
children: [
|
|
6353
6367
|
/* @__PURE__ */ S("a", {
|
|
6354
6368
|
onClick: (n) => {
|
|
6355
|
-
t(n, e.map((e) =>
|
|
6369
|
+
t(n, e.map((e) => Bd(e) ? {
|
|
6356
6370
|
...e,
|
|
6357
6371
|
selected: !0
|
|
6358
6372
|
} : e));
|
|
@@ -6361,7 +6375,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6361
6375
|
}),
|
|
6362
6376
|
/* @__PURE__ */ S("a", {
|
|
6363
6377
|
onClick: (n) => {
|
|
6364
|
-
t(n, e.map((e) =>
|
|
6378
|
+
t(n, e.map((e) => Bd(e) ? {
|
|
6365
6379
|
...e,
|
|
6366
6380
|
selected: !1
|
|
6367
6381
|
} : e));
|
|
@@ -6370,7 +6384,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6370
6384
|
}),
|
|
6371
6385
|
/* @__PURE__ */ S("a", {
|
|
6372
6386
|
onClick: (n) => {
|
|
6373
|
-
t(n, e.map((e) =>
|
|
6387
|
+
t(n, e.map((e) => Bd(e) ? {
|
|
6374
6388
|
...e,
|
|
6375
6389
|
selected: !e.selected
|
|
6376
6390
|
} : e));
|
|
@@ -6380,19 +6394,19 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6380
6394
|
]
|
|
6381
6395
|
}), /* @__PURE__ */ S(Zo, { margin: 0 })] }), e.map((n, r) => {
|
|
6382
6396
|
switch (n.type) {
|
|
6383
|
-
case
|
|
6397
|
+
case zd.HEADING:
|
|
6384
6398
|
var i;
|
|
6385
|
-
return /* @__PURE__ */ S(
|
|
6386
|
-
case
|
|
6399
|
+
return /* @__PURE__ */ S(Rd, { label: n.label }, (i = n.key) == null ? r : i);
|
|
6400
|
+
case zd.DIVIDER:
|
|
6387
6401
|
var a;
|
|
6388
6402
|
return /* @__PURE__ */ S(Zo, { margin: 0 }, (a = n.key) == null ? r : a);
|
|
6389
6403
|
default:
|
|
6390
6404
|
var o;
|
|
6391
|
-
return /* @__PURE__ */ S(
|
|
6405
|
+
return /* @__PURE__ */ S(Ld, {
|
|
6392
6406
|
option: n,
|
|
6393
6407
|
onChange: (r) => {
|
|
6394
6408
|
let { value: i } = n;
|
|
6395
|
-
t(r, e.map((e) => e.type ===
|
|
6409
|
+
t(r, e.map((e) => e.type === zd.HEADING || e.type === zd.DIVIDER || e.value !== i ? e : {
|
|
6396
6410
|
...e,
|
|
6397
6411
|
selected: !e.selected
|
|
6398
6412
|
}));
|
|
@@ -6400,7 +6414,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6400
6414
|
}, (o = n.key) == null ? r : o);
|
|
6401
6415
|
}
|
|
6402
6416
|
})]
|
|
6403
|
-
}),
|
|
6417
|
+
}), Hd = ({ name: e, disabled: t, label: n, options: r, onChange: i, small: a = !1, showHeader: o = !0, maxHeight: s = "40vh", testId: c }) => /* @__PURE__ */ S(lo, {
|
|
6404
6418
|
testId: c,
|
|
6405
6419
|
disabled: t,
|
|
6406
6420
|
menu: {
|
|
@@ -6408,7 +6422,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6408
6422
|
small: a,
|
|
6409
6423
|
label: n,
|
|
6410
6424
|
trigger: wi.DROP_DOWN_BUTTON,
|
|
6411
|
-
sections: /* @__PURE__ */ S(
|
|
6425
|
+
sections: /* @__PURE__ */ S(Vd, {
|
|
6412
6426
|
testId: c,
|
|
6413
6427
|
options: r,
|
|
6414
6428
|
onChangeOptions: (t, n) => {
|
|
@@ -6418,13 +6432,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6418
6432
|
maxHeight: s
|
|
6419
6433
|
})
|
|
6420
6434
|
}
|
|
6421
|
-
}),
|
|
6435
|
+
}), Ud = {
|
|
6422
6436
|
page: "_page_beskc_1",
|
|
6423
6437
|
scroll: "_scroll_beskc_23"
|
|
6424
|
-
},
|
|
6438
|
+
}, Wd = ({ children: e, left: t = "var(--size-sidebar)", padding: n = !0, scroll: r = !0, top: i = "var(--size-topbar)" }) => {
|
|
6425
6439
|
let a = typeof n == "string" ? n : n === !0 ? "var(--padding)" : "0";
|
|
6426
6440
|
return /* @__PURE__ */ S("div", {
|
|
6427
|
-
className: b(
|
|
6441
|
+
className: b(Ud.page, r ? Ud.scroll : ""),
|
|
6428
6442
|
style: {
|
|
6429
6443
|
left: t,
|
|
6430
6444
|
padding: a,
|
|
@@ -6432,17 +6446,17 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6432
6446
|
},
|
|
6433
6447
|
children: e
|
|
6434
6448
|
});
|
|
6435
|
-
},
|
|
6449
|
+
}, Gd = ({ id: e, children: t }) => {
|
|
6436
6450
|
let n = document.querySelector(`#${e}`), [r, i] = v(!1);
|
|
6437
6451
|
return m(() => {
|
|
6438
6452
|
r || i(!0);
|
|
6439
6453
|
}, [e]), n ? Wr(t, n) : null;
|
|
6440
|
-
},
|
|
6454
|
+
}, Kd = { printHeader: "_printHeader_o7xxx_1" }, qd = ({ logo: e, alt: t, logoWidth: n = "100px" }) => /* @__PURE__ */ S("img", {
|
|
6441
6455
|
src: e,
|
|
6442
6456
|
alt: t,
|
|
6443
|
-
className:
|
|
6457
|
+
className: Kd.printHeader,
|
|
6444
6458
|
style: { width: n }
|
|
6445
|
-
}),
|
|
6459
|
+
}), Jd = ({ name: e, label: t, options: n, value: r, onChange: i, disabled: a = !1, small: o = !1, noMargin: s = !1, inline: c = !1, testId: l }) => {
|
|
6446
6460
|
var d;
|
|
6447
6461
|
let f = u(W), { simpleInputs: p, options: m, selectedOptions: h } = el(n, r), g = h == null ? void 0 : p ? h : h.value, _ = a || f;
|
|
6448
6462
|
return /* @__PURE__ */ C(Hr, {
|
|
@@ -6483,36 +6497,36 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6483
6497
|
}, (t = (n = e.value) == null ? void 0 : n.toString()) == null ? "" : t);
|
|
6484
6498
|
})]
|
|
6485
6499
|
});
|
|
6486
|
-
},
|
|
6500
|
+
}, Yd = {
|
|
6487
6501
|
richTextToolbar: "_richTextToolbar_1gbkk_1",
|
|
6488
6502
|
richTextToolbarContainer: "_richTextToolbarContainer_1gbkk_5"
|
|
6489
|
-
},
|
|
6503
|
+
}, Xd = /* @__PURE__ */ function(e) {
|
|
6490
6504
|
return e.BOLD = "bold", e.ITALIC = "italic", e.CODE = "code", e.UL = "ul", e.OL = "ol", e.MENTION = "at", e;
|
|
6491
|
-
}({}),
|
|
6505
|
+
}({}), Zd = ({ editor: e, disabled: t = !1, showMentionButton: n = !1, toolbarComponent: r = null }) => {
|
|
6492
6506
|
var i, a, o, s, c;
|
|
6493
6507
|
let l = [
|
|
6494
6508
|
{
|
|
6495
|
-
icon:
|
|
6509
|
+
icon: Xd.BOLD,
|
|
6496
6510
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBold().run(),
|
|
6497
6511
|
active: (i = e == null ? void 0 : e.isActive("bold")) != null && i
|
|
6498
6512
|
},
|
|
6499
6513
|
{
|
|
6500
|
-
icon:
|
|
6514
|
+
icon: Xd.ITALIC,
|
|
6501
6515
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleItalic().run(),
|
|
6502
6516
|
active: (a = e == null ? void 0 : e.isActive("italic")) != null && a
|
|
6503
6517
|
},
|
|
6504
6518
|
{
|
|
6505
|
-
icon:
|
|
6519
|
+
icon: Xd.CODE,
|
|
6506
6520
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleCode().run(),
|
|
6507
6521
|
active: (o = e == null ? void 0 : e.isActive("code")) != null && o
|
|
6508
6522
|
},
|
|
6509
6523
|
{
|
|
6510
|
-
icon:
|
|
6524
|
+
icon: Xd.UL,
|
|
6511
6525
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBulletList().run(),
|
|
6512
6526
|
active: (s = e == null ? void 0 : e.isActive("bulletList")) != null && s
|
|
6513
6527
|
},
|
|
6514
6528
|
{
|
|
6515
|
-
icon:
|
|
6529
|
+
icon: Xd.OL,
|
|
6516
6530
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleOrderedList().run(),
|
|
6517
6531
|
active: (c = e == null ? void 0 : e.isActive("orderedList")) != null && c
|
|
6518
6532
|
}
|
|
@@ -6520,15 +6534,15 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6520
6534
|
if (n) {
|
|
6521
6535
|
var u;
|
|
6522
6536
|
l.push({
|
|
6523
|
-
icon:
|
|
6537
|
+
icon: Xd.MENTION,
|
|
6524
6538
|
onClick: () => e == null ? void 0 : e.chain().focus().insertContent("@").run(),
|
|
6525
6539
|
active: (u = e == null ? void 0 : e.isActive("mention")) != null && u
|
|
6526
6540
|
});
|
|
6527
6541
|
}
|
|
6528
6542
|
return /* @__PURE__ */ C("div", {
|
|
6529
|
-
className:
|
|
6543
|
+
className: Yd.richTextToolbarContainer,
|
|
6530
6544
|
children: [/* @__PURE__ */ S("div", {
|
|
6531
|
-
className:
|
|
6545
|
+
className: Yd.richTextToolbar,
|
|
6532
6546
|
children: l.map((e, n) => /* @__PURE__ */ S(q, {
|
|
6533
6547
|
small: !0,
|
|
6534
6548
|
round: !0,
|
|
@@ -6541,36 +6555,36 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6541
6555
|
}, n))
|
|
6542
6556
|
}), r]
|
|
6543
6557
|
});
|
|
6544
|
-
},
|
|
6545
|
-
let t =
|
|
6558
|
+
}, Qd = 8, $d = /^\[@((?:\\.|[^\\\]])*)\]\(mention:((?:\\.|[^\\)])+)\)/, ef = (e) => e.replace(/[\\\][()]/g, "\\$&"), tf = (e) => e.replace(/\\(.)/g, "$1"), nf = (e) => typeof e == "string" ? e : "", rf = (e) => {
|
|
6559
|
+
let t = $d.exec(e);
|
|
6546
6560
|
if (!t) return;
|
|
6547
6561
|
let [n, r, i] = t;
|
|
6548
6562
|
return {
|
|
6549
6563
|
raw: n,
|
|
6550
|
-
id:
|
|
6551
|
-
label:
|
|
6564
|
+
id: tf(i),
|
|
6565
|
+
label: tf(r)
|
|
6552
6566
|
};
|
|
6553
|
-
},
|
|
6567
|
+
}, af = (e) => {
|
|
6554
6568
|
if (!e) return [];
|
|
6555
6569
|
let t = /* @__PURE__ */ new Set();
|
|
6556
6570
|
return e.state.doc.descendants((e) => {
|
|
6557
6571
|
e.type.name === di.name && typeof e.attrs.id == "string" && t.add(e.attrs.id);
|
|
6558
6572
|
}), [...t];
|
|
6559
|
-
},
|
|
6573
|
+
}, of = (e, t) => `[@${ef(e)}](mention:${ef(t)})`, sf = (e, t) => di.extend({
|
|
6560
6574
|
renderMarkdown: (e) => {
|
|
6561
6575
|
var t, n;
|
|
6562
|
-
return
|
|
6576
|
+
return of(nf((t = e.attrs) == null ? void 0 : t.label), nf((n = e.attrs) == null ? void 0 : n.id));
|
|
6563
6577
|
},
|
|
6564
6578
|
parseMarkdown: (e, t) => t.createNode(di.name, {
|
|
6565
|
-
id:
|
|
6566
|
-
label:
|
|
6579
|
+
id: nf(e.id),
|
|
6580
|
+
label: nf(e.label)
|
|
6567
6581
|
}),
|
|
6568
6582
|
markdownTokenizer: {
|
|
6569
6583
|
name: di.name,
|
|
6570
6584
|
level: "inline",
|
|
6571
6585
|
start: (e) => e.indexOf("[@"),
|
|
6572
6586
|
tokenize: (e) => {
|
|
6573
|
-
let t =
|
|
6587
|
+
let t = rf(e);
|
|
6574
6588
|
return t && {
|
|
6575
6589
|
type: di.name,
|
|
6576
6590
|
...t
|
|
@@ -6586,11 +6600,11 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6586
6600
|
var r;
|
|
6587
6601
|
let i = e();
|
|
6588
6602
|
if (!i) return [];
|
|
6589
|
-
let a = new Set(
|
|
6590
|
-
return (await i.getItems(t)).filter(({ id: e }) => !a.has(e)).slice(0, (r = i.maxItems) == null ?
|
|
6603
|
+
let a = new Set(af(n));
|
|
6604
|
+
return (await i.getItems(t)).filter(({ id: e }) => !a.has(e)).slice(0, (r = i.maxItems) == null ? Qd : r);
|
|
6591
6605
|
},
|
|
6592
6606
|
render: t
|
|
6593
|
-
} }),
|
|
6607
|
+
} }), cf = {
|
|
6594
6608
|
inputInTable: "_inputInTable_1xhvx_1",
|
|
6595
6609
|
inputHover: "_inputHover_1xhvx_13",
|
|
6596
6610
|
inputFocus: "_inputFocus_1xhvx_18",
|
|
@@ -6605,7 +6619,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6605
6619
|
mentionLayer: "_mentionLayer_1xhvx_133",
|
|
6606
6620
|
mentionOption: "_mentionOption_1xhvx_144",
|
|
6607
6621
|
focused: "_focused_1xhvx_150"
|
|
6608
|
-
},
|
|
6622
|
+
}, lf = o(({ editable: e, getRect: t, items: n, onDismiss: r, onSelect: i }, a) => {
|
|
6609
6623
|
let [o, s] = v(0), c = n.length > 0, u = f(), m = l((e) => `${u}-option-${e}`, [u]), { renderLayer: g, layerProps: y, triggerProps: x } = aa({
|
|
6610
6624
|
isOpen: c,
|
|
6611
6625
|
placement: "bottom-start",
|
|
@@ -6667,14 +6681,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6667
6681
|
i
|
|
6668
6682
|
]), c ? g(/* @__PURE__ */ S("div", {
|
|
6669
6683
|
...y,
|
|
6670
|
-
className:
|
|
6684
|
+
className: cf.mentionLayer,
|
|
6671
6685
|
id: u,
|
|
6672
6686
|
role: "listbox",
|
|
6673
6687
|
children: n.map((e, t) => /* @__PURE__ */ S("div", {
|
|
6674
6688
|
id: m(t),
|
|
6675
6689
|
role: "option",
|
|
6676
6690
|
"aria-selected": t === o,
|
|
6677
|
-
className: b(
|
|
6691
|
+
className: b(cf.mentionOption, { [cf.focused]: t === o }),
|
|
6678
6692
|
onMouseEnter: () => s(t),
|
|
6679
6693
|
onMouseDown: (t) => {
|
|
6680
6694
|
t.preventDefault(), i(e);
|
|
@@ -6682,12 +6696,12 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6682
6696
|
children: e.label
|
|
6683
6697
|
}, e.id))
|
|
6684
6698
|
})) : null;
|
|
6685
|
-
}),
|
|
6699
|
+
}), uf = ({ clientRect: e, command: t, editor: n, items: r }) => ({
|
|
6686
6700
|
clientRect: e,
|
|
6687
6701
|
command: t,
|
|
6688
6702
|
items: r,
|
|
6689
6703
|
editable: n.view.dom
|
|
6690
|
-
}),
|
|
6704
|
+
}), df = c(o(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i, mentions: a }, o) => {
|
|
6691
6705
|
var s, c, l, f;
|
|
6692
6706
|
let m = u(W), g = r || m, y = !!a, b = _(a), x = _(null), w = _(n == null ? "" : n), [T, E] = v(null);
|
|
6693
6707
|
d(() => {
|
|
@@ -6697,9 +6711,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6697
6711
|
ci,
|
|
6698
6712
|
li.configure({ placeholder: e }),
|
|
6699
6713
|
ui,
|
|
6700
|
-
|
|
6701
|
-
onStart: (e) => E(
|
|
6702
|
-
onUpdate: (e) => E(
|
|
6714
|
+
sf(() => b.current, () => ({
|
|
6715
|
+
onStart: (e) => E(uf(e)),
|
|
6716
|
+
onUpdate: (e) => E(uf(e)),
|
|
6703
6717
|
onExit: () => E(null),
|
|
6704
6718
|
onKeyDown: ({ event: e }) => {
|
|
6705
6719
|
var t, n;
|
|
@@ -6711,9 +6725,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6711
6725
|
content: w.current,
|
|
6712
6726
|
contentType: "markdown",
|
|
6713
6727
|
editable: !g,
|
|
6714
|
-
editorProps: { attributes: { class:
|
|
6728
|
+
editorProps: { attributes: { class: cf.editable } },
|
|
6715
6729
|
onUpdate: ({ editor: e }) => {
|
|
6716
|
-
t == null || t(e.getMarkdown(), { mentionedIds:
|
|
6730
|
+
t == null || t(e.getMarkdown(), { mentionedIds: af(e) });
|
|
6717
6731
|
}
|
|
6718
6732
|
});
|
|
6719
6733
|
return d(() => {
|
|
@@ -6726,18 +6740,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6726
6740
|
}, [g, O]), p(o, () => ({
|
|
6727
6741
|
clearContent: () => O == null ? void 0 : O.commands.clearContent(!1),
|
|
6728
6742
|
editor: O,
|
|
6729
|
-
getMentionedIds: () =>
|
|
6743
|
+
getMentionedIds: () => af(O)
|
|
6730
6744
|
}), [O]), /* @__PURE__ */ C("div", {
|
|
6731
|
-
className:
|
|
6745
|
+
className: cf.richTextInput,
|
|
6732
6746
|
children: [
|
|
6733
|
-
/* @__PURE__ */ S(
|
|
6747
|
+
/* @__PURE__ */ S(Zd, {
|
|
6734
6748
|
editor: O,
|
|
6735
6749
|
disabled: g,
|
|
6736
6750
|
showMentionButton: y && ((s = a == null ? void 0 : a.showMentionButton) == null || s),
|
|
6737
6751
|
toolbarComponent: i
|
|
6738
6752
|
}),
|
|
6739
6753
|
/* @__PURE__ */ S(oi, { editor: O }),
|
|
6740
|
-
y && /* @__PURE__ */ S(Xi, { children: /* @__PURE__ */ S(
|
|
6754
|
+
y && /* @__PURE__ */ S(Xi, { children: /* @__PURE__ */ S(lf, {
|
|
6741
6755
|
ref: x,
|
|
6742
6756
|
editable: (c = T == null ? void 0 : T.editable) == null ? null : c,
|
|
6743
6757
|
getRect: (l = T == null ? void 0 : T.clientRect) == null ? null : l,
|
|
@@ -6747,13 +6761,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6747
6761
|
}) })
|
|
6748
6762
|
]
|
|
6749
6763
|
});
|
|
6750
|
-
})),
|
|
6751
|
-
className:
|
|
6764
|
+
})), ff = ({ children: e }) => /* @__PURE__ */ S("span", {
|
|
6765
|
+
className: cf.mention,
|
|
6752
6766
|
children: e
|
|
6753
|
-
}),
|
|
6767
|
+
}), pf = { row: "_row_n16je_1" }, mf = ({ 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 }) => {
|
|
6754
6768
|
let f = typeof l == "number" ? `${l}px` : l, p = (r === null || r === !1 ? [] : Array.isArray(r) ? r.filter((e) => s(e)) : [r]).map((t, n) => /* @__PURE__ */ S(e.Fragment, { children: e.cloneElement(t, { spacing: f }) }, n));
|
|
6755
6769
|
return /* @__PURE__ */ S("div", {
|
|
6756
|
-
className: b(
|
|
6770
|
+
className: b(pf.row),
|
|
6757
6771
|
style: {
|
|
6758
6772
|
alignItems: t,
|
|
6759
6773
|
justifyContent: n,
|
|
@@ -6769,7 +6783,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6769
6783
|
"data-testid": d,
|
|
6770
6784
|
children: p
|
|
6771
6785
|
});
|
|
6772
|
-
},
|
|
6786
|
+
}, hf = {
|
|
6773
6787
|
inputInTable: "_inputInTable_t1w93_1",
|
|
6774
6788
|
inputHover: "_inputHover_t1w93_13",
|
|
6775
6789
|
inputFocus: "_inputFocus_t1w93_18",
|
|
@@ -6789,7 +6803,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6789
6803
|
experimental: "_experimental_t1w93_159",
|
|
6790
6804
|
active: "_active_t1w93_163",
|
|
6791
6805
|
icon: "_icon_t1w93_167"
|
|
6792
|
-
},
|
|
6806
|
+
}, gf = c(({ isOpen: e, label: t, icon: n, invalid: r }) => /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(K, {
|
|
6793
6807
|
text: t,
|
|
6794
6808
|
enabled: !e,
|
|
6795
6809
|
placement: "right-center",
|
|
@@ -6798,7 +6812,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6798
6812
|
padding: "var(--padding-sm)",
|
|
6799
6813
|
display: "block",
|
|
6800
6814
|
children: /* @__PURE__ */ S("span", {
|
|
6801
|
-
className:
|
|
6815
|
+
className: hf.icon,
|
|
6802
6816
|
children: /* @__PURE__ */ S(no, {
|
|
6803
6817
|
small: !0,
|
|
6804
6818
|
title: r ? "!" : void 0,
|
|
@@ -6807,18 +6821,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6807
6821
|
})
|
|
6808
6822
|
})
|
|
6809
6823
|
}), /* @__PURE__ */ S("span", {
|
|
6810
|
-
className:
|
|
6824
|
+
className: hf.label,
|
|
6811
6825
|
children: t
|
|
6812
|
-
})] }), (e, t) => Rr(e, t)),
|
|
6813
|
-
className:
|
|
6826
|
+
})] }), (e, t) => Rr(e, t)), _f = ({ isOpen: e, items: t, sectionIndex: n, onClick: r, testId: i }) => /* @__PURE__ */ S("div", {
|
|
6827
|
+
className: hf.list,
|
|
6814
6828
|
children: t.map((t, a) => {
|
|
6815
6829
|
let o = `${n}_${a}`;
|
|
6816
6830
|
return /* @__PURE__ */ S("a", {
|
|
6817
6831
|
href: t.value,
|
|
6818
|
-
className: b(
|
|
6832
|
+
className: b(hf.item, t.isActive ? hf.active : "", t.isExperimental ? hf.experimental : ""),
|
|
6819
6833
|
onClick: (e) => r(e, t.value, t.label, t.onClick),
|
|
6820
6834
|
"data-testid": i,
|
|
6821
|
-
children: /* @__PURE__ */ S(
|
|
6835
|
+
children: /* @__PURE__ */ S(gf, {
|
|
6822
6836
|
label: t.label,
|
|
6823
6837
|
icon: t.icon,
|
|
6824
6838
|
invalid: t.invalid,
|
|
@@ -6826,16 +6840,16 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6826
6840
|
}, o)
|
|
6827
6841
|
}, o);
|
|
6828
6842
|
})
|
|
6829
|
-
}),
|
|
6830
|
-
className:
|
|
6843
|
+
}), vf = ({ isOpen: t, sections: n, onClick: r }) => /* @__PURE__ */ S(x, { children: n.map((n, i) => /* @__PURE__ */ C(e.Fragment, { children: [/* @__PURE__ */ S("h5", {
|
|
6844
|
+
className: hf.subtitle,
|
|
6831
6845
|
children: n.heading.toUpperCase()
|
|
6832
|
-
}), /* @__PURE__ */ S(
|
|
6846
|
+
}), /* @__PURE__ */ S(_f, {
|
|
6833
6847
|
isOpen: t,
|
|
6834
6848
|
items: n.items,
|
|
6835
6849
|
sectionIndex: i,
|
|
6836
6850
|
onClick: r,
|
|
6837
6851
|
testId: n.testId
|
|
6838
|
-
})] }, i)) }),
|
|
6852
|
+
})] }, i)) }), yf = c(({ options: e, startOpen: t = !1, onShiftClickToggleOpen: n = () => {}, top: r }) => {
|
|
6839
6853
|
let [i, a] = v(t), o = (e, t, n, r) => {
|
|
6840
6854
|
e.preventDefault(), typeof r == "function" && (e.currentTarget.value = t, e.currentTarget.label = n, r(e)), a(!1);
|
|
6841
6855
|
}, s = e.sections.length > 0;
|
|
@@ -6856,13 +6870,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6856
6870
|
icon: U.LEFT
|
|
6857
6871
|
}),
|
|
6858
6872
|
children: /* @__PURE__ */ S("div", {
|
|
6859
|
-
className: b(
|
|
6873
|
+
className: b(hf.sidebar, i ? "" : hf.collapsed),
|
|
6860
6874
|
children: s && /* @__PURE__ */ C("div", {
|
|
6861
|
-
className:
|
|
6875
|
+
className: hf.inner,
|
|
6862
6876
|
children: [/* @__PURE__ */ S("h4", {
|
|
6863
|
-
className:
|
|
6877
|
+
className: hf.title,
|
|
6864
6878
|
children: e.title
|
|
6865
|
-
}), /* @__PURE__ */ S(
|
|
6879
|
+
}), /* @__PURE__ */ S(vf, {
|
|
6866
6880
|
isOpen: i,
|
|
6867
6881
|
sections: e.sections,
|
|
6868
6882
|
onClick: o
|
|
@@ -6870,18 +6884,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6870
6884
|
})
|
|
6871
6885
|
})
|
|
6872
6886
|
});
|
|
6873
|
-
}, (e, t) => Rr(e, t)),
|
|
6887
|
+
}, (e, t) => Rr(e, t)), bf = {
|
|
6874
6888
|
skeletonContainer: "_skeletonContainer_mcfxp_9",
|
|
6875
6889
|
skeleton: "_skeleton_mcfxp_9"
|
|
6876
|
-
},
|
|
6890
|
+
}, xf = ({ count: e, width: t, height: n }) => /* @__PURE__ */ S(fi, {
|
|
6877
6891
|
baseColor: "var(--color-skeleton-base)",
|
|
6878
6892
|
highlightColor: "var(--color-skeleton-highlight)",
|
|
6879
|
-
containerClassName:
|
|
6880
|
-
className:
|
|
6893
|
+
containerClassName: bf.skeletonContainer,
|
|
6894
|
+
className: bf.skeleton,
|
|
6881
6895
|
count: e,
|
|
6882
6896
|
width: t,
|
|
6883
6897
|
height: n
|
|
6884
|
-
}),
|
|
6898
|
+
}), Sf = {
|
|
6885
6899
|
wrapper: "_wrapper_j8x9r_1",
|
|
6886
6900
|
label: "_label_j8x9r_5",
|
|
6887
6901
|
input: "_input_j8x9r_9",
|
|
@@ -6889,38 +6903,38 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6889
6903
|
editable: "_editable_j8x9r_22",
|
|
6890
6904
|
inputControl: "_inputControl_j8x9r_25",
|
|
6891
6905
|
actions: "_actions_j8x9r_28"
|
|
6892
|
-
},
|
|
6906
|
+
}, Cf = () => {
|
|
6893
6907
|
let e = _(null);
|
|
6894
6908
|
return m(() => {
|
|
6895
6909
|
e.current && (e.current(), e.current = null);
|
|
6896
6910
|
}), (t) => {
|
|
6897
6911
|
e.current = t;
|
|
6898
6912
|
};
|
|
6899
|
-
},
|
|
6913
|
+
}, wf = (e) => {
|
|
6900
6914
|
let t = _(void 0);
|
|
6901
6915
|
return d(() => {
|
|
6902
6916
|
t.current = e;
|
|
6903
6917
|
}, [e]), t.current;
|
|
6904
|
-
},
|
|
6918
|
+
}, Tf = (e, t) => {
|
|
6905
6919
|
let n = t == null ? void 0 : t[e];
|
|
6906
6920
|
if (!n) {
|
|
6907
6921
|
var r;
|
|
6908
6922
|
return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = Dr(e)) == null ? "" : r;
|
|
6909
6923
|
}
|
|
6910
6924
|
return n;
|
|
6911
|
-
},
|
|
6925
|
+
}, Ef = /* @__PURE__ */ function(e) {
|
|
6912
6926
|
return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
|
|
6913
|
-
}({}),
|
|
6927
|
+
}({}), Df = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), Of = (e) => {
|
|
6914
6928
|
if (!e) return !1;
|
|
6915
6929
|
let t = dr(e);
|
|
6916
6930
|
return !ar.includes(t);
|
|
6917
|
-
},
|
|
6931
|
+
}, kf = ({ value: e, unitkey: t, toUnit: n }) => {
|
|
6918
6932
|
var r;
|
|
6919
6933
|
let i = ir[t];
|
|
6920
6934
|
if (!i || i.length === 0 || !((r = Or(e)) != null && r.valid) || !i.includes(n)) return !1;
|
|
6921
6935
|
let a = dr(String(e));
|
|
6922
6936
|
return !(a && !i.includes(a));
|
|
6923
|
-
},
|
|
6937
|
+
}, Af = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
|
|
6924
6938
|
var o;
|
|
6925
6939
|
let s = _r(e) ? pr(e) : e, c = [Infinity, -Infinity].includes(Number(s));
|
|
6926
6940
|
if (i || c) return {
|
|
@@ -6940,13 +6954,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6940
6954
|
value: void 0,
|
|
6941
6955
|
error: "Source unit is missing"
|
|
6942
6956
|
};
|
|
6943
|
-
if (
|
|
6957
|
+
if (Df(s)) return {
|
|
6944
6958
|
value: void 0,
|
|
6945
6959
|
error: "Value is invalid for conversion"
|
|
6946
6960
|
};
|
|
6947
6961
|
try {
|
|
6948
6962
|
let e = Ar(s, l);
|
|
6949
|
-
if (
|
|
6963
|
+
if (kf({
|
|
6950
6964
|
value: e,
|
|
6951
6965
|
toUnit: n,
|
|
6952
6966
|
unitkey: t
|
|
@@ -6967,13 +6981,13 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6967
6981
|
error: "Conversion not possible"
|
|
6968
6982
|
};
|
|
6969
6983
|
}
|
|
6970
|
-
},
|
|
6971
|
-
let a = pr(e), o =
|
|
6972
|
-
return !
|
|
6984
|
+
}, jf = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
|
|
6985
|
+
let a = pr(e), o = Df(a);
|
|
6986
|
+
return !kf({
|
|
6973
6987
|
value: e,
|
|
6974
6988
|
unitkey: n,
|
|
6975
6989
|
toUnit: t
|
|
6976
|
-
}) ||
|
|
6990
|
+
}) || Of(e) || o ? { value: a } : _r(e) ? Af({
|
|
6977
6991
|
value: e,
|
|
6978
6992
|
unitkey: n,
|
|
6979
6993
|
toUnit: t,
|
|
@@ -6981,25 +6995,25 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
6981
6995
|
doNotConvertValue: i,
|
|
6982
6996
|
exactPrecision: !0
|
|
6983
6997
|
}) : { value: e };
|
|
6984
|
-
},
|
|
6998
|
+
}, Mf = (e) => gn(e) && !cn(e) && !pn(e) ? sn(e, "fieldName", "") : typeof e == "string" ? e : "", Nf = (e = "") => ar == null ? void 0 : ar.includes(e), Pf = (e, t) => {
|
|
6985
6999
|
let n = dr(e || "");
|
|
6986
|
-
return
|
|
6987
|
-
},
|
|
6988
|
-
|
|
6989
|
-
},
|
|
7000
|
+
return Nf(t) && Nf(n);
|
|
7001
|
+
}, Ff = i(null), If = () => u(Ff), Lf = !1, Rf = (e) => {
|
|
7002
|
+
Lf || (Lf = !0, Ff = e);
|
|
7003
|
+
}, zf = (e) => hr(e) ? e : yr(e), Bf = {
|
|
6990
7004
|
predefinedMenuActive: "_predefinedMenuActive_ye9w9_1",
|
|
6991
7005
|
inputWrapper: "_inputWrapper_ye9w9_4"
|
|
6992
|
-
},
|
|
7006
|
+
}, Vf = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUnit: r = !1, error: i = null, left: a = !1, small: o = !1, width: s = "100%", value: c, unitkey: l = "", initUnit: u, noConversion: f = !1, onChange: p = bn, onClick: m = bn, onFocus: g = bn, onSwitchUnit: _ = bn, unitTemplate: y, testId: w, warning: T = null, predefinedOptions: E, initialPredefinedOption: D = !1, shouldLinkAutomaticly: O = !0, selectedPredefinedOptionKey: k, validationCallback: A = () => ({
|
|
6993
7007
|
name: "",
|
|
6994
7008
|
error: null
|
|
6995
7009
|
}), 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 }) => {
|
|
6996
|
-
let B =
|
|
7010
|
+
let B = If(), ee = Cf();
|
|
6997
7011
|
typeof c == "number" && (c = `${c}`);
|
|
6998
|
-
let [te = "", ne = ""] = c === void 0 ? [] : Cr(c), V = h(() =>
|
|
7012
|
+
let [te = "", ne = ""] = c === void 0 ? [] : Cr(c), V = h(() => Tf(l, y || (B == null ? void 0 : B.unitTemplate)), [
|
|
6999
7013
|
l,
|
|
7000
7014
|
y,
|
|
7001
7015
|
B == null ? void 0 : B.unitTemplate
|
|
7002
|
-
]), re =
|
|
7016
|
+
]), re = Pf(c, V), ie = u || V || ne, ae = wf(ie), { value: oe } = jf({
|
|
7003
7017
|
value: c,
|
|
7004
7018
|
toUnit: ie,
|
|
7005
7019
|
unitkey: l,
|
|
@@ -7011,10 +7025,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7011
7025
|
} : {
|
|
7012
7026
|
value: oe,
|
|
7013
7027
|
unit: ie
|
|
7014
|
-
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = v(D ?
|
|
7028
|
+
}), le = M || (se == null ? void 0 : se.value) === void 0, [ue, de] = v(D ? Ef.PREDEFINED : Ef.CUSTOM), fe = !!(j || n), pe = E && E.find((e) => {
|
|
7015
7029
|
if (!(e != null && e.value)) return;
|
|
7016
7030
|
if (k) return k === e.valueKey;
|
|
7017
|
-
let t = _r(e.value) ? dr(e.value) : "", { value: n = c } =
|
|
7031
|
+
let t = _r(e.value) ? dr(e.value) : "", { value: n = c } = Af({
|
|
7018
7032
|
value: String(c),
|
|
7019
7033
|
unitkey: l,
|
|
7020
7034
|
toUnit: t
|
|
@@ -7023,7 +7037,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7023
7037
|
}), me = () => {
|
|
7024
7038
|
var e;
|
|
7025
7039
|
let t = (e = c) == null ? "" : e, n = se.unit;
|
|
7026
|
-
if (!
|
|
7040
|
+
if (!kf({
|
|
7027
7041
|
value: t,
|
|
7028
7042
|
unitkey: l,
|
|
7029
7043
|
toUnit: n
|
|
@@ -7038,7 +7052,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7038
7052
|
return null;
|
|
7039
7053
|
}
|
|
7040
7054
|
}, he = (t) => {
|
|
7041
|
-
let n =
|
|
7055
|
+
let n = Mf(e), r = t.target, { value: i, selectionStart: a } = r, o = Ar(i, (se == null ? void 0 : se.unit) || "");
|
|
7042
7056
|
p({ target: {
|
|
7043
7057
|
value: N ? Ar(cr(o, ne), ne) : o,
|
|
7044
7058
|
name: n
|
|
@@ -7060,7 +7074,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7060
7074
|
if (ie) {
|
|
7061
7075
|
let e, t = "";
|
|
7062
7076
|
if (ae !== ie) {
|
|
7063
|
-
let { value: n } =
|
|
7077
|
+
let { value: n } = jf({
|
|
7064
7078
|
value: c,
|
|
7065
7079
|
toUnit: ie,
|
|
7066
7080
|
unitkey: l,
|
|
@@ -7069,7 +7083,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7069
7083
|
});
|
|
7070
7084
|
e = n, t = ie;
|
|
7071
7085
|
} else if (Ar(se.value, se.unit) !== c) {
|
|
7072
|
-
let { value: n } =
|
|
7086
|
+
let { value: n } = jf({
|
|
7073
7087
|
value: c,
|
|
7074
7088
|
toUnit: se.unit,
|
|
7075
7089
|
unitkey: l,
|
|
@@ -7081,7 +7095,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7081
7095
|
e !== void 0 && ce({
|
|
7082
7096
|
value: e,
|
|
7083
7097
|
unit: t
|
|
7084
|
-
}), de(E && pe && O ?
|
|
7098
|
+
}), de(E && pe && O ? Ef.PREDEFINED : Ef.CUSTOM);
|
|
7085
7099
|
}
|
|
7086
7100
|
}, [
|
|
7087
7101
|
ie,
|
|
@@ -7089,14 +7103,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7089
7103
|
i,
|
|
7090
7104
|
O
|
|
7091
7105
|
]);
|
|
7092
|
-
let _e = me(), ve = vr(se.unit) || se.unit || "", ye = f || !_e || _e && _e.length === 1, be =
|
|
7106
|
+
let _e = me(), ve = vr(se.unit) || se.unit || "", ye = f || !_e || _e && _e.length === 1, be = Mf(e), xe, Se = (t) => {
|
|
7093
7107
|
let r = t != null && t.value ? t.value : "", [i = "", a = ""] = _r(r) ? Cr(r) : [r], o = kr(r);
|
|
7094
|
-
if (
|
|
7108
|
+
if (kf({
|
|
7095
7109
|
value: r,
|
|
7096
7110
|
unitkey: l,
|
|
7097
7111
|
toUnit: a
|
|
7098
7112
|
})) {
|
|
7099
|
-
let { value: e = "" } =
|
|
7113
|
+
let { value: e = "" } = jf({
|
|
7100
7114
|
value: r,
|
|
7101
7115
|
toUnit: V,
|
|
7102
7116
|
unitkey: l,
|
|
@@ -7109,7 +7123,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7109
7123
|
type: Ga.OPTION,
|
|
7110
7124
|
inline: !0,
|
|
7111
7125
|
onClick: () => {
|
|
7112
|
-
Or(i).valid && !n && (de(
|
|
7126
|
+
Or(i).valid && !n && (de(Ef.PREDEFINED), p({ target: {
|
|
7113
7127
|
value: r,
|
|
7114
7128
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || "",
|
|
7115
7129
|
predefinedSelected: !0,
|
|
@@ -7121,27 +7135,27 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7121
7135
|
height: "0"
|
|
7122
7136
|
})] }),
|
|
7123
7137
|
description: o,
|
|
7124
|
-
selected: pe === t && ue ===
|
|
7138
|
+
selected: pe === t && ue === Ef.PREDEFINED
|
|
7125
7139
|
};
|
|
7126
7140
|
};
|
|
7127
7141
|
if (xe = [{
|
|
7128
7142
|
type: Ga.OPTION,
|
|
7129
7143
|
inline: !0,
|
|
7130
7144
|
onClick: () => {
|
|
7131
|
-
ue !==
|
|
7145
|
+
ue !== Ef.CUSTOM && !n && p({ target: {
|
|
7132
7146
|
value: Ar(se.value, se.unit),
|
|
7133
7147
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || ""
|
|
7134
7148
|
} });
|
|
7135
7149
|
},
|
|
7136
7150
|
label: "Custom",
|
|
7137
|
-
selected: ue ===
|
|
7151
|
+
selected: ue === Ef.CUSTOM
|
|
7138
7152
|
}], E != null && E.length) {
|
|
7139
7153
|
let e = E.map(Se);
|
|
7140
7154
|
xe = [...xe, ...e];
|
|
7141
7155
|
}
|
|
7142
7156
|
let Ce = (e) => {
|
|
7143
7157
|
if (_r(e)) {
|
|
7144
|
-
let t = dr(e), { value: n } =
|
|
7158
|
+
let t = dr(e), { value: n } = jf({
|
|
7145
7159
|
value: e,
|
|
7146
7160
|
toUnit: se.unit,
|
|
7147
7161
|
unitkey: l,
|
|
@@ -7153,7 +7167,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7153
7167
|
return e;
|
|
7154
7168
|
}, we = !E && (!R || R === H.FIRST) ? H.FIRST : H.MIDDLE, Te = !R || R === H.LAST ? H.LAST : H.MIDDLE;
|
|
7155
7169
|
return /* @__PURE__ */ S("div", {
|
|
7156
|
-
className: ue ===
|
|
7170
|
+
className: ue === Ef.PREDEFINED ? b(Bf.predefinedMenuActive) : "",
|
|
7157
7171
|
children: /* @__PURE__ */ C(ps, {
|
|
7158
7172
|
small: o,
|
|
7159
7173
|
width: s,
|
|
@@ -7168,17 +7182,17 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7168
7182
|
trigger: "Component",
|
|
7169
7183
|
component: /* @__PURE__ */ S(q, {
|
|
7170
7184
|
groupOrder: "first",
|
|
7171
|
-
active: ue ===
|
|
7172
|
-
icon: ue ===
|
|
7185
|
+
active: ue === Ef.PREDEFINED,
|
|
7186
|
+
icon: ue === Ef.PREDEFINED ? "link" : "unlink",
|
|
7173
7187
|
small: o
|
|
7174
7188
|
}),
|
|
7175
7189
|
small: o,
|
|
7176
7190
|
sections: xe
|
|
7177
7191
|
},
|
|
7178
|
-
tooltip: ue ===
|
|
7192
|
+
tooltip: ue === Ef.PREDEFINED ? pe == null ? void 0 : pe.label : ""
|
|
7179
7193
|
}),
|
|
7180
7194
|
/* @__PURE__ */ S("div", {
|
|
7181
|
-
className:
|
|
7195
|
+
className: Bf.inputWrapper,
|
|
7182
7196
|
children: /* @__PURE__ */ S(bl, {
|
|
7183
7197
|
name: be,
|
|
7184
7198
|
testId: w,
|
|
@@ -7220,7 +7234,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7220
7234
|
let r = n || t || "", i = gr(e) ? e : "";
|
|
7221
7235
|
return {
|
|
7222
7236
|
type: "Option",
|
|
7223
|
-
label: P ?
|
|
7237
|
+
label: P ? zf(i) : i,
|
|
7224
7238
|
inline: !0,
|
|
7225
7239
|
onClick: (n) => {
|
|
7226
7240
|
n.stopPropagation(), ge(e, t);
|
|
@@ -7235,10 +7249,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7235
7249
|
]
|
|
7236
7250
|
})
|
|
7237
7251
|
});
|
|
7238
|
-
},
|
|
7252
|
+
}, Hf = (e, t) => ({ target: {
|
|
7239
7253
|
name: e,
|
|
7240
7254
|
value: t
|
|
7241
|
-
} }),
|
|
7255
|
+
} }), Uf = (e) => `Value cannot be less than ${e}`, Wf = (e) => `Value cannot be greater than ${e}`, Gf = ({ name: e = "", value: t, min: n, max: r, label: i, step: a = .01, onChange: o, onChangeComplete: s, preferredUnit: c = "m", onSwitchUnit: l, enableEditUnitInput: u = !1, disabled: f = !1, showUnitInput: p = !0, showArrows: m = !0, unitkey: h = "length", testId: g, noConversion: _ = !1, small: y = !1, marks: x, minErrorMessage: w = Uf, maxErrorMessage: T = Wf }) => {
|
|
7242
7256
|
let E = Ar(t, c), [D, O] = v(E), [k, A] = v(!1), [j, M] = v(c);
|
|
7243
7257
|
d(() => {
|
|
7244
7258
|
k || O(E);
|
|
@@ -7256,7 +7270,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7256
7270
|
}, z = () => {
|
|
7257
7271
|
O(E), A(!1);
|
|
7258
7272
|
}, B = () => {
|
|
7259
|
-
L || I === null || (o(
|
|
7273
|
+
L || I === null || (o(Hf(e, I)), s == null || s(Hf(e, I)), A(!1));
|
|
7260
7274
|
}, ee = (e) => {
|
|
7261
7275
|
M(e), l == null || l(e);
|
|
7262
7276
|
}, te = (e) => {
|
|
@@ -7271,7 +7285,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7271
7285
|
}, ne = (e) => {
|
|
7272
7286
|
e.key === "Enter" && B(), e.key === "Escape" && z();
|
|
7273
7287
|
}, V = f || k, re = /* @__PURE__ */ C("div", {
|
|
7274
|
-
className:
|
|
7288
|
+
className: Sf.actions,
|
|
7275
7289
|
children: [/* @__PURE__ */ S(q, {
|
|
7276
7290
|
icon: "close",
|
|
7277
7291
|
small: !0,
|
|
@@ -7286,18 +7300,18 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7286
7300
|
})]
|
|
7287
7301
|
});
|
|
7288
7302
|
return /* @__PURE__ */ C("div", {
|
|
7289
|
-
className:
|
|
7303
|
+
className: Sf.wrapper,
|
|
7290
7304
|
"data-testid": g && `${g}-wrapper`,
|
|
7291
7305
|
children: [
|
|
7292
7306
|
i && /* @__PURE__ */ S("span", {
|
|
7293
|
-
className:
|
|
7307
|
+
className: Sf.label,
|
|
7294
7308
|
children: /* @__PURE__ */ S(Yo, {
|
|
7295
7309
|
small: y,
|
|
7296
7310
|
children: i
|
|
7297
7311
|
})
|
|
7298
7312
|
}),
|
|
7299
7313
|
p && /* @__PURE__ */ S("div", {
|
|
7300
|
-
className: b(
|
|
7314
|
+
className: b(Sf.input, y && Sf.inputSmall, u && !f && Sf.editable),
|
|
7301
7315
|
children: /* @__PURE__ */ S(So, {
|
|
7302
7316
|
content: re,
|
|
7303
7317
|
isOpen: k,
|
|
@@ -7311,11 +7325,11 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7311
7325
|
testId: g && `${g}-edit-popover`,
|
|
7312
7326
|
toggleOnTriggerClick: !1,
|
|
7313
7327
|
children: /* @__PURE__ */ S("div", {
|
|
7314
|
-
className:
|
|
7328
|
+
className: Sf.inputControl,
|
|
7315
7329
|
"data-testid": g && `${g}-edit-trigger`,
|
|
7316
7330
|
onClick: R,
|
|
7317
7331
|
onKeyDown: ne,
|
|
7318
|
-
children: /* @__PURE__ */ S(
|
|
7332
|
+
children: /* @__PURE__ */ S(Vf, {
|
|
7319
7333
|
name: e,
|
|
7320
7334
|
value: k ? D : E,
|
|
7321
7335
|
unitkey: h,
|
|
@@ -7350,7 +7364,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7350
7364
|
})
|
|
7351
7365
|
]
|
|
7352
7366
|
});
|
|
7353
|
-
},
|
|
7367
|
+
}, Kf = ({ label: e, invalid: t, badge: n }) => t ? /* @__PURE__ */ S(no, {
|
|
7354
7368
|
small: !0,
|
|
7355
7369
|
margin: "-4px",
|
|
7356
7370
|
color: "var(--color-text-error)",
|
|
@@ -7361,7 +7375,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7361
7375
|
margin: "-4px",
|
|
7362
7376
|
title: n == null ? void 0 : n.toString(),
|
|
7363
7377
|
children: e
|
|
7364
|
-
}) : /* @__PURE__ */ S(x, { children: e }),
|
|
7378
|
+
}) : /* @__PURE__ */ S(x, { children: e }), qf = {
|
|
7365
7379
|
tabs: "_tabs_1rtn8_1",
|
|
7366
7380
|
padding: "_padding_1rtn8_7",
|
|
7367
7381
|
margin: "_margin_1rtn8_11",
|
|
@@ -7370,7 +7384,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7370
7384
|
left: "_left_1rtn8_64",
|
|
7371
7385
|
right: "_right_1rtn8_64",
|
|
7372
7386
|
selectionIndicator: "_selectionIndicator_1rtn8_67"
|
|
7373
|
-
},
|
|
7387
|
+
}, Jf = ({ name: e = void 0, options: t = null, value: n = void 0, onChange: r = bn, padding: i = !1, margin: a = !0, testId: o, linkComponent: s }) => {
|
|
7374
7388
|
let c = u(W), { simpleInputs: l, options: d, selectedOptions: f } = el(t, n), p = mn(f) ? void 0 : l ? f : f.value, m = (e) => {
|
|
7375
7389
|
var t;
|
|
7376
7390
|
return (t = e.component) == null ? s : t;
|
|
@@ -7391,7 +7405,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7391
7405
|
"data-testid": o,
|
|
7392
7406
|
children: /* @__PURE__ */ S(hi, {
|
|
7393
7407
|
"aria-label": e == null ? "Tabs" : e,
|
|
7394
|
-
className: b(
|
|
7408
|
+
className: b(qf.tabs, i ? qf.padding : "", a ? qf.margin : ""),
|
|
7395
7409
|
children: _.map((e) => {
|
|
7396
7410
|
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);
|
|
7397
7411
|
return /* @__PURE__ */ C(mi, {
|
|
@@ -7399,23 +7413,23 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7399
7413
|
...!d && n ? { href: n } : {},
|
|
7400
7414
|
shouldSelectOnPressUp: !0,
|
|
7401
7415
|
isDisabled: i || c,
|
|
7402
|
-
className: b(
|
|
7416
|
+
className: b(qf.item, o ? qf.right : qf.left),
|
|
7403
7417
|
"data-testid": u,
|
|
7404
7418
|
render: d && f ? (e) => /* @__PURE__ */ S(f, {
|
|
7405
7419
|
...e,
|
|
7406
7420
|
href: r,
|
|
7407
7421
|
to: r
|
|
7408
7422
|
}) : void 0,
|
|
7409
|
-
children: [/* @__PURE__ */ S(
|
|
7423
|
+
children: [/* @__PURE__ */ S(Kf, {
|
|
7410
7424
|
label: t,
|
|
7411
7425
|
invalid: s,
|
|
7412
7426
|
badge: l
|
|
7413
|
-
}), /* @__PURE__ */ S(pi, { className:
|
|
7427
|
+
}), /* @__PURE__ */ S(pi, { className: qf.selectionIndicator })]
|
|
7414
7428
|
}, a);
|
|
7415
7429
|
})
|
|
7416
7430
|
})
|
|
7417
7431
|
}) : null;
|
|
7418
|
-
},
|
|
7432
|
+
}, Yf = ({ children: e, href: t = void 0, target: n = void 0, testId: r, onClick: i, component: a = "a" }) => /* @__PURE__ */ S(a, {
|
|
7419
7433
|
href: t,
|
|
7420
7434
|
to: t,
|
|
7421
7435
|
target: n,
|
|
@@ -7425,7 +7439,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7425
7439
|
link: !0,
|
|
7426
7440
|
children: e
|
|
7427
7441
|
})
|
|
7428
|
-
}),
|
|
7442
|
+
}), Xf = {
|
|
7429
7443
|
inputInTable: "_inputInTable_qbe2o_1",
|
|
7430
7444
|
inputHover: "_inputHover_qbe2o_13",
|
|
7431
7445
|
inputFocus: "_inputFocus_qbe2o_18",
|
|
@@ -7437,9 +7451,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7437
7451
|
textarea: "_textarea_qbe2o_81",
|
|
7438
7452
|
small: "_small_qbe2o_120",
|
|
7439
7453
|
monospace: "_monospace_qbe2o_159"
|
|
7440
|
-
},
|
|
7454
|
+
}, Zf = ({ name: e, value: t = "", placeholder: n = "", cols: r, rows: i, disabled: a = !1, onChange: o = bn, onKeyPress: s = bn, onFocus: c = bn, onBlur: l = bn, tabIndex: d = 0, error: f = null, warning: p = null, tooltip: m = null, maxTooltipWidth: h, resize: g, monospace: _ = !1, small: v = !1, testId: y }) => {
|
|
7441
7455
|
let x = u(W), C = /* @__PURE__ */ S("textarea", {
|
|
7442
|
-
className: b(
|
|
7456
|
+
className: b(Xf.textarea, f ? Xf.error : "", p ? Xf.warning : "", _ ? Xf.monospace : "", v ? Xf.small : ""),
|
|
7443
7457
|
name: e,
|
|
7444
7458
|
value: t,
|
|
7445
7459
|
placeholder: n,
|
|
@@ -7481,10 +7495,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7481
7495
|
menu: "_menu_oyr59_139",
|
|
7482
7496
|
active: "_active_oyr59_168",
|
|
7483
7497
|
alert: "_alert_oyr59_193"
|
|
7484
|
-
},
|
|
7498
|
+
}, Qf = ({ warning: e }) => /* @__PURE__ */ S("div", {
|
|
7485
7499
|
className: Q.alert,
|
|
7486
7500
|
children: e
|
|
7487
|
-
}),
|
|
7501
|
+
}), $f = ({ icon: e, url: t, onClick: n }) => {
|
|
7488
7502
|
let r = /* @__PURE__ */ S(G, { icon: e });
|
|
7489
7503
|
return t ? /* @__PURE__ */ S("a", {
|
|
7490
7504
|
href: t,
|
|
@@ -7496,7 +7510,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7496
7510
|
className: Q.appSwitcher,
|
|
7497
7511
|
children: r
|
|
7498
7512
|
});
|
|
7499
|
-
},
|
|
7513
|
+
}, ep = ({ label: e, logo: t, url: n, version: r, onClick: i }) => {
|
|
7500
7514
|
let a = /* @__PURE__ */ C("div", {
|
|
7501
7515
|
className: Q.title,
|
|
7502
7516
|
children: [
|
|
@@ -7525,9 +7539,9 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7525
7539
|
children: a
|
|
7526
7540
|
})
|
|
7527
7541
|
});
|
|
7528
|
-
},
|
|
7542
|
+
}, tp = /* @__PURE__ */ function(e) {
|
|
7529
7543
|
return e.LINK = "Link", e.BUTTON = "Button", e.MENU = "Menu", e.COMPONENT = "Component", e;
|
|
7530
|
-
}({}),
|
|
7544
|
+
}({}), np = ({ label: e, url: t, icon: n, onClick: r, active: i, disabled: a, testId: o, component: s = "a" }) => {
|
|
7531
7545
|
let c = u(W);
|
|
7532
7546
|
return /* @__PURE__ */ C(s, {
|
|
7533
7547
|
className: b(Q.link, i ? Q.active : ""),
|
|
@@ -7544,11 +7558,11 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7544
7558
|
children: e
|
|
7545
7559
|
})]
|
|
7546
7560
|
});
|
|
7547
|
-
},
|
|
7561
|
+
}, rp = ({ element: e }) => {
|
|
7548
7562
|
switch (e.type) {
|
|
7549
|
-
case
|
|
7563
|
+
case tp.LINK: return /* @__PURE__ */ S("div", {
|
|
7550
7564
|
className: Q.item,
|
|
7551
|
-
children: /* @__PURE__ */ S(
|
|
7565
|
+
children: /* @__PURE__ */ S(np, {
|
|
7552
7566
|
label: e.label,
|
|
7553
7567
|
url: e.url,
|
|
7554
7568
|
icon: e.icon,
|
|
@@ -7559,7 +7573,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7559
7573
|
component: e.component
|
|
7560
7574
|
})
|
|
7561
7575
|
});
|
|
7562
|
-
case
|
|
7576
|
+
case tp.BUTTON: return /* @__PURE__ */ S("div", {
|
|
7563
7577
|
className: b(Q.item, Q.button),
|
|
7564
7578
|
children: /* @__PURE__ */ S(q, {
|
|
7565
7579
|
label: e.label,
|
|
@@ -7571,14 +7585,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7571
7585
|
testId: e.testId
|
|
7572
7586
|
})
|
|
7573
7587
|
});
|
|
7574
|
-
case
|
|
7588
|
+
case tp.MENU: return /* @__PURE__ */ S("div", {
|
|
7575
7589
|
className: b(Q.item, Q.menu),
|
|
7576
7590
|
children: /* @__PURE__ */ S(lo, {
|
|
7577
7591
|
maxHeight: "100%",
|
|
7578
7592
|
menu: {
|
|
7579
7593
|
trigger: wi.COMPONENT,
|
|
7580
7594
|
placement: "bottom-start",
|
|
7581
|
-
component: /* @__PURE__ */ S(
|
|
7595
|
+
component: /* @__PURE__ */ S(np, {
|
|
7582
7596
|
label: e.label,
|
|
7583
7597
|
icon: e.icon,
|
|
7584
7598
|
onClick: e.onClick
|
|
@@ -7587,50 +7601,50 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7587
7601
|
}
|
|
7588
7602
|
})
|
|
7589
7603
|
});
|
|
7590
|
-
case
|
|
7604
|
+
case tp.COMPONENT: return /* @__PURE__ */ S("div", {
|
|
7591
7605
|
className: Q.item,
|
|
7592
7606
|
children: e.component
|
|
7593
7607
|
});
|
|
7594
7608
|
default: return null;
|
|
7595
7609
|
}
|
|
7596
|
-
},
|
|
7610
|
+
}, ip = ({ title: e, appSwitcher: t, content: n = [], contentRight: r = [], warning: i = "", height: a = "var(--size-topbar)", fixedPosition: o = !0 }) => /* @__PURE__ */ C("div", { children: [i && /* @__PURE__ */ S(Qf, { warning: i }), /* @__PURE__ */ C("div", {
|
|
7597
7611
|
className: b(Q.topbar, o ? Q.fixed : ""),
|
|
7598
7612
|
style: { height: a },
|
|
7599
7613
|
children: [
|
|
7600
|
-
!!t && /* @__PURE__ */ S(
|
|
7614
|
+
!!t && /* @__PURE__ */ S($f, {
|
|
7601
7615
|
icon: t.icon,
|
|
7602
7616
|
url: t.url,
|
|
7603
7617
|
onClick: t.onClick
|
|
7604
7618
|
}),
|
|
7605
7619
|
/* @__PURE__ */ C("div", {
|
|
7606
7620
|
className: Q.left,
|
|
7607
|
-
children: [e && /* @__PURE__ */ S(
|
|
7621
|
+
children: [e && /* @__PURE__ */ S(ep, {
|
|
7608
7622
|
label: e.label,
|
|
7609
7623
|
logo: e.logo,
|
|
7610
7624
|
url: e.url,
|
|
7611
7625
|
version: e.version,
|
|
7612
7626
|
onClick: e.onClick
|
|
7613
|
-
}), n.map((e, t) => e ? /* @__PURE__ */ S(
|
|
7627
|
+
}), n.map((e, t) => e ? /* @__PURE__ */ S(rp, { element: e }, t) : null)]
|
|
7614
7628
|
}),
|
|
7615
7629
|
/* @__PURE__ */ S("div", {
|
|
7616
7630
|
className: Q.right,
|
|
7617
|
-
children: r.map((e, t) => e ? /* @__PURE__ */ S(
|
|
7631
|
+
children: r.map((e, t) => e ? /* @__PURE__ */ S(rp, { element: e }, t) : null)
|
|
7618
7632
|
})
|
|
7619
7633
|
]
|
|
7620
|
-
})] }),
|
|
7634
|
+
})] }), ap = {
|
|
7621
7635
|
popConfirm: "_popConfirm_1x6ye_1",
|
|
7622
7636
|
content: "_content_1x6ye_7",
|
|
7623
7637
|
buttons: "_buttons_1x6ye_13"
|
|
7624
|
-
},
|
|
7625
|
-
className:
|
|
7638
|
+
}, op = ({ title: e, okText: t, onClickOk: n, disableConfirmButton: r, cancelText: i, onClickCancel: a, close: o, testId: s }) => /* @__PURE__ */ C("div", {
|
|
7639
|
+
className: ap.popConfirm,
|
|
7626
7640
|
children: [e && /* @__PURE__ */ S("div", {
|
|
7627
|
-
className:
|
|
7641
|
+
className: ap.content,
|
|
7628
7642
|
children: /* @__PURE__ */ S(Yo, {
|
|
7629
7643
|
small: !0,
|
|
7630
7644
|
children: e
|
|
7631
7645
|
})
|
|
7632
7646
|
}), /* @__PURE__ */ C("div", {
|
|
7633
|
-
className:
|
|
7647
|
+
className: ap.buttons,
|
|
7634
7648
|
children: [/* @__PURE__ */ S(q, {
|
|
7635
7649
|
small: !0,
|
|
7636
7650
|
colored: !0,
|
|
@@ -7645,8 +7659,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7645
7659
|
testId: `${s}-cancel-button`
|
|
7646
7660
|
})]
|
|
7647
7661
|
})]
|
|
7648
|
-
}),
|
|
7649
|
-
content: /* @__PURE__ */ S(
|
|
7662
|
+
}), sp = ({ children: e, placement: t = "top-center", closeOnOutsideClick: n = !0, fullWidth: r = !1, title: i = "", cancelText: a = "Cancel", onClickCancel: o = (e) => e && e(), okText: s = "Ok", onClickOk: c = () => {}, disableConfirmButton: l = !1, testId: u = void 0 }) => /* @__PURE__ */ S(So, {
|
|
7663
|
+
content: /* @__PURE__ */ S(op, {
|
|
7650
7664
|
title: i,
|
|
7651
7665
|
okText: s,
|
|
7652
7666
|
onClickOk: c,
|
|
@@ -7660,14 +7674,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7660
7674
|
fullWidth: r,
|
|
7661
7675
|
testId: u,
|
|
7662
7676
|
children: e
|
|
7663
|
-
}),
|
|
7677
|
+
}), cp = {
|
|
7664
7678
|
tree: "_tree_coxxe_1",
|
|
7665
7679
|
toggle: "_toggle_coxxe_8",
|
|
7666
7680
|
dropTarget: "_dropTarget_coxxe_15",
|
|
7667
7681
|
placeholder: "_placeholder_coxxe_30",
|
|
7668
7682
|
draggingSource: "_draggingSource_coxxe_36",
|
|
7669
7683
|
placeholderContainer: "_placeholderContainer_coxxe_39"
|
|
7670
|
-
},
|
|
7684
|
+
}, lp = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
|
|
7671
7685
|
let { id: l, data: u } = t, { active: d, disabled: f, testId: p, onClick: m, actions: h = [] } = u, [g, _] = e.useState(!1), [v, y] = e.useState(0), x = (e) => {
|
|
7672
7686
|
e.stopPropagation(), i(l);
|
|
7673
7687
|
}, w = (e) => {
|
|
@@ -7694,7 +7708,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7694
7708
|
className: b(Z.itemHeader, g ? Z.noPointerEvents : ""),
|
|
7695
7709
|
children: [
|
|
7696
7710
|
a && /* @__PURE__ */ S("div", {
|
|
7697
|
-
className:
|
|
7711
|
+
className: cp.toggle,
|
|
7698
7712
|
children: /* @__PURE__ */ S(q, {
|
|
7699
7713
|
basic: !0,
|
|
7700
7714
|
colored: r ? !0 : Ti.MUTED,
|
|
@@ -7708,10 +7722,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7708
7722
|
className: Z.drag,
|
|
7709
7723
|
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
7710
7724
|
}),
|
|
7711
|
-
/* @__PURE__ */ S(
|
|
7725
|
+
/* @__PURE__ */ S(Td, { item: u }),
|
|
7712
7726
|
/* @__PURE__ */ C("div", {
|
|
7713
7727
|
className: Z.right,
|
|
7714
|
-
children: [/* @__PURE__ */ S(
|
|
7728
|
+
children: [/* @__PURE__ */ S(Ed, { item: u }), !f && h.length > 0 && /* @__PURE__ */ S("div", {
|
|
7715
7729
|
className: Z.actions,
|
|
7716
7730
|
children: /* @__PURE__ */ S(fo, { actions: h })
|
|
7717
7731
|
})]
|
|
@@ -7719,10 +7733,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7719
7733
|
]
|
|
7720
7734
|
})
|
|
7721
7735
|
});
|
|
7722
|
-
},
|
|
7723
|
-
className:
|
|
7736
|
+
}, up = ({ depth: e, indent: t = "var(--size-sm)" }) => /* @__PURE__ */ S("div", {
|
|
7737
|
+
className: cp.placeholder,
|
|
7724
7738
|
style: { left: `calc(${t} * ${e})` }
|
|
7725
|
-
}),
|
|
7739
|
+
}), dp = ({ list: e, canDrop: t, draggable: n = !1, onListReorder: r, onChangeOpen: i, testId: a, isInitialOpen: o = !1, autoOpenActiveItems: s = !1, treeRef: c, itemHasChild: l, onItemToggle: u, icons: f, allowParentReassignment: p, stickyHeader: m, height: h, render: g, placeholderIndent: v }) => {
|
|
7726
7740
|
var y;
|
|
7727
7741
|
let b = c == null ? _(null) : c, x = (e) => {
|
|
7728
7742
|
i && i(e);
|
|
@@ -7780,7 +7794,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7780
7794
|
"data-testid": a,
|
|
7781
7795
|
className: Z.list,
|
|
7782
7796
|
style: { height: h },
|
|
7783
|
-
children: [e.name && !e.noHeader && /* @__PURE__ */ S(
|
|
7797
|
+
children: [e.name && !e.noHeader && /* @__PURE__ */ S(Sd, {
|
|
7784
7798
|
name: e.name,
|
|
7785
7799
|
actions: e.actions,
|
|
7786
7800
|
stickyHeader: m
|
|
@@ -7807,7 +7821,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7807
7821
|
hasChild: r,
|
|
7808
7822
|
isOpen: a,
|
|
7809
7823
|
onToggle: o
|
|
7810
|
-
}) : /* @__PURE__ */ S(
|
|
7824
|
+
}) : /* @__PURE__ */ S(lp, {
|
|
7811
7825
|
hasChild: l ? l(e) : r,
|
|
7812
7826
|
node: e,
|
|
7813
7827
|
depth: t,
|
|
@@ -7823,7 +7837,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7823
7837
|
onDrop: A,
|
|
7824
7838
|
onChangeOpen: x,
|
|
7825
7839
|
dropTargetOffset: 10,
|
|
7826
|
-
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ S(
|
|
7840
|
+
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ S(up, {
|
|
7827
7841
|
depth: t,
|
|
7828
7842
|
indent: v
|
|
7829
7843
|
}),
|
|
@@ -7831,17 +7845,17 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7831
7845
|
listComponent: "div",
|
|
7832
7846
|
listItemComponent: "div",
|
|
7833
7847
|
classes: {
|
|
7834
|
-
root:
|
|
7835
|
-
draggingSource:
|
|
7836
|
-
dropTarget:
|
|
7837
|
-
placeholder:
|
|
7848
|
+
root: cp.tree,
|
|
7849
|
+
draggingSource: cp.draggingSource,
|
|
7850
|
+
dropTarget: cp.dropTarget,
|
|
7851
|
+
placeholder: cp.placeholderContainer
|
|
7838
7852
|
},
|
|
7839
7853
|
initialOpen: o,
|
|
7840
7854
|
enableAnimateExpand: !0
|
|
7841
7855
|
})
|
|
7842
7856
|
})]
|
|
7843
7857
|
});
|
|
7844
|
-
},
|
|
7858
|
+
}, fp = {
|
|
7845
7859
|
treeTable: "_treeTable_1ywvy_1",
|
|
7846
7860
|
treeTableHeader: "_treeTableHeader_1ywvy_22",
|
|
7847
7861
|
folderCell: "_folderCell_1ywvy_30",
|
|
@@ -7849,48 +7863,48 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7849
7863
|
drag: "_drag_1ywvy_31",
|
|
7850
7864
|
folder: "_folder_1ywvy_30",
|
|
7851
7865
|
active: "_active_1ywvy_61"
|
|
7852
|
-
},
|
|
7866
|
+
}, pp = (e, t) => e.filter((e) => e.parent === t).flatMap((t) => [t.id, ...pp(e, t.id)]), mp = (e, t) => {
|
|
7853
7867
|
let n = new Set(t);
|
|
7854
7868
|
return e.filter((e) => !n.has(e.id)).map((e) => e.id);
|
|
7855
|
-
},
|
|
7869
|
+
}, hp = (e, t, n) => e.filter((e) => n.has(e) || !t.has(e)), gp = (e, t, n, r = []) => {
|
|
7856
7870
|
let i = new Set(n), a = new Set(r), o = e.filter((e) => e.parent === t && !a.has(e.id));
|
|
7857
7871
|
if (o.length === 0) return {
|
|
7858
7872
|
checked: i.has(t),
|
|
7859
7873
|
indeterminate: !1
|
|
7860
7874
|
};
|
|
7861
|
-
let s = o.map((t) =>
|
|
7875
|
+
let s = o.map((t) => gp(e, t.id, n, r)), c = s.filter((e) => e.checked).length, l = s.filter((e) => e.indeterminate).length, u = c === o.length;
|
|
7862
7876
|
return {
|
|
7863
7877
|
checked: u,
|
|
7864
7878
|
indeterminate: c + l > 0 && !u
|
|
7865
7879
|
};
|
|
7866
|
-
},
|
|
7867
|
-
let r =
|
|
7880
|
+
}, _p = (e, t, n = []) => {
|
|
7881
|
+
let r = mp(e, n), i = new Set(t), a = r.filter((e) => i.has(e)).length;
|
|
7868
7882
|
return {
|
|
7869
7883
|
checked: r.length > 0 && a === r.length,
|
|
7870
7884
|
indeterminate: a > 0 && a < r.length
|
|
7871
7885
|
};
|
|
7872
|
-
},
|
|
7886
|
+
}, vp = i(null), yp = () => u(vp), bp = ({ children: e, rowCheckboxes: t, rows: n }) => {
|
|
7873
7887
|
let r = t !== void 0, { checkedIds: i = [], disabledIds: a = [], getTooltip: o, onChange: s } = t == null ? {} : t, c = h(() => new Set(a), [a]), u = h(() => {
|
|
7874
7888
|
if (!r) return null;
|
|
7875
7889
|
let e = /* @__PURE__ */ new Map();
|
|
7876
|
-
for (let t of n) e.set(t.id,
|
|
7890
|
+
for (let t of n) e.set(t.id, gp(n, t.id, i, a));
|
|
7877
7891
|
return e;
|
|
7878
7892
|
}, [
|
|
7879
7893
|
i,
|
|
7880
7894
|
a,
|
|
7881
7895
|
r,
|
|
7882
7896
|
n
|
|
7883
|
-
]), d = h(() => r ?
|
|
7897
|
+
]), d = h(() => r ? _p(n, i, a) : void 0, [
|
|
7884
7898
|
i,
|
|
7885
7899
|
a,
|
|
7886
7900
|
r,
|
|
7887
7901
|
n
|
|
7888
7902
|
]), f = l((e) => u == null ? void 0 : u.get(e), [u]), p = l((e) => c.has(e), [c]), m = l((e) => o == null ? void 0 : o(e), [o]), g = l((e) => {
|
|
7889
7903
|
if (!r || c.has(e)) return;
|
|
7890
|
-
let t =
|
|
7904
|
+
let t = pp(n, e), o = [e, ...t.filter((e) => !c.has(e))], l = [e, ...t], { checked: u } = gp(n, e, i, a);
|
|
7891
7905
|
if (u) {
|
|
7892
7906
|
let e = new Set(l);
|
|
7893
|
-
s == null || s(
|
|
7907
|
+
s == null || s(hp(i, e, c));
|
|
7894
7908
|
} else s == null || s([.../* @__PURE__ */ new Set([...i, ...o])]);
|
|
7895
7909
|
}, [
|
|
7896
7910
|
i,
|
|
@@ -7901,7 +7915,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7901
7915
|
n
|
|
7902
7916
|
]), _ = l(() => {
|
|
7903
7917
|
if (!r) return;
|
|
7904
|
-
let e =
|
|
7918
|
+
let e = mp(n, a), { checked: t } = _p(n, i, a);
|
|
7905
7919
|
t ? s == null || s(i.filter((e) => c.has(e))) : s == null || s([.../* @__PURE__ */ new Set([...i, ...e])]);
|
|
7906
7920
|
}, [
|
|
7907
7921
|
i,
|
|
@@ -7927,12 +7941,12 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7927
7941
|
_,
|
|
7928
7942
|
g
|
|
7929
7943
|
]);
|
|
7930
|
-
return /* @__PURE__ */ S(
|
|
7944
|
+
return /* @__PURE__ */ S(vp.Provider, {
|
|
7931
7945
|
value: v,
|
|
7932
7946
|
children: e
|
|
7933
7947
|
});
|
|
7934
|
-
},
|
|
7935
|
-
let h =
|
|
7948
|
+
}, xp = ({ 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 }) => {
|
|
7949
|
+
let h = yp(), g = h != null && h.enabled ? h.getRowCheckState(l.id) : void 0, _ = g == null ? void 0 : g.checked, v = g == null ? void 0 : g.indeterminate, y = h == null ? void 0 : h.isRowCheckDisabled(l.id), x = h == null ? void 0 : h.enabled, { data: w, droppable: T } = l, { id: E, cells: D, testId: O, actions: k = [], active: A, onRowClick: j } = w, M = T || a, N = (e) => {
|
|
7936
7950
|
let r = t ? t[e] : void 0;
|
|
7937
7951
|
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${M ? n + 1 : n})`})` : r;
|
|
7938
7952
|
};
|
|
@@ -7945,7 +7959,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7945
7959
|
onDragLeave: f,
|
|
7946
7960
|
children: /* @__PURE__ */ S("tbody", { children: /* @__PURE__ */ C("tr", {
|
|
7947
7961
|
onClick: j,
|
|
7948
|
-
className: b(
|
|
7962
|
+
className: b(fp.treeTableRow, A ? fp.active : void 0),
|
|
7949
7963
|
children: [
|
|
7950
7964
|
x && /* @__PURE__ */ S(Wl, {
|
|
7951
7965
|
isHeader: !1,
|
|
@@ -7959,19 +7973,19 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
7959
7973
|
}
|
|
7960
7974
|
}),
|
|
7961
7975
|
r && /* @__PURE__ */ S("td", {
|
|
7962
|
-
className:
|
|
7976
|
+
className: fp.dragCell,
|
|
7963
7977
|
children: /* @__PURE__ */ S("div", {
|
|
7964
|
-
className:
|
|
7978
|
+
className: fp.drag,
|
|
7965
7979
|
onClick: (e) => e.stopPropagation(),
|
|
7966
7980
|
ref: i,
|
|
7967
7981
|
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
7968
7982
|
})
|
|
7969
7983
|
}),
|
|
7970
|
-
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ S("td", { className:
|
|
7984
|
+
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ S("td", { className: fp.folderCell }, t)),
|
|
7971
7985
|
M && /* @__PURE__ */ S("td", {
|
|
7972
|
-
className:
|
|
7986
|
+
className: fp.folderCell,
|
|
7973
7987
|
children: /* @__PURE__ */ S("div", {
|
|
7974
|
-
className:
|
|
7988
|
+
className: fp.folder,
|
|
7975
7989
|
onClick: () => m(E),
|
|
7976
7990
|
onMouseDown: (e) => e.stopPropagation(),
|
|
7977
7991
|
children: /* @__PURE__ */ S(q, {
|
|
@@ -8003,10 +8017,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8003
8017
|
]
|
|
8004
8018
|
}) })
|
|
8005
8019
|
});
|
|
8006
|
-
},
|
|
8007
|
-
let a =
|
|
8020
|
+
}, Sp = ({ columnAlignment: e, columnWidths: t, draggable: n, hasRowActions: r, headers: i }) => {
|
|
8021
|
+
let a = yp(), o = a == null ? void 0 : a.headerCheckState, s = (a == null ? void 0 : a.enabled) && o !== void 0;
|
|
8008
8022
|
return /* @__PURE__ */ S("table", {
|
|
8009
|
-
className: b(Ks.table,
|
|
8023
|
+
className: b(Ks.table, fp.treeTableHeader),
|
|
8010
8024
|
children: /* @__PURE__ */ S("thead", { children: i.map((i, c) => /* @__PURE__ */ C("tr", { children: [
|
|
8011
8025
|
s && c === 0 ? /* @__PURE__ */ S(Wl, {
|
|
8012
8026
|
isHeader: !0,
|
|
@@ -8017,7 +8031,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8017
8031
|
onChange: a.toggleHeaderCheck
|
|
8018
8032
|
}
|
|
8019
8033
|
}) : s ? /* @__PURE__ */ S("td", {}) : null,
|
|
8020
|
-
n && /* @__PURE__ */ S("th", { className:
|
|
8034
|
+
n && /* @__PURE__ */ S("th", { className: fp.dragCell }),
|
|
8021
8035
|
i.cells.map((n, r) => {
|
|
8022
8036
|
let i = t ? t[r] : void 0, a = e ? e[r] : void 0;
|
|
8023
8037
|
return /* @__PURE__ */ S(Wl, {
|
|
@@ -8037,22 +8051,22 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8037
8051
|
})
|
|
8038
8052
|
] }, c)) })
|
|
8039
8053
|
});
|
|
8040
|
-
},
|
|
8054
|
+
}, Cp = ({ 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 }) => {
|
|
8041
8055
|
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: v = [] } = d, y = pl(v, _ == null ? [] : _);
|
|
8042
|
-
return /* @__PURE__ */ S(
|
|
8056
|
+
return /* @__PURE__ */ S(bp, {
|
|
8043
8057
|
rowCheckboxes: u,
|
|
8044
8058
|
rows: v,
|
|
8045
8059
|
children: /* @__PURE__ */ C("div", {
|
|
8046
|
-
className:
|
|
8060
|
+
className: fp.treeTable,
|
|
8047
8061
|
"data-testid": f,
|
|
8048
8062
|
style: { width: g },
|
|
8049
|
-
children: [!!_ && /* @__PURE__ */ S(
|
|
8063
|
+
children: [!!_ && /* @__PURE__ */ S(Sp, {
|
|
8050
8064
|
columnAlignment: m,
|
|
8051
8065
|
columnWidths: h,
|
|
8052
8066
|
draggable: r,
|
|
8053
8067
|
hasRowActions: y,
|
|
8054
8068
|
headers: _
|
|
8055
|
-
}), /* @__PURE__ */ S(
|
|
8069
|
+
}), /* @__PURE__ */ S(dp, {
|
|
8056
8070
|
allowParentReassignment: e,
|
|
8057
8071
|
autoOpenActiveItems: t,
|
|
8058
8072
|
canDrop: n,
|
|
@@ -8068,7 +8082,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8068
8082
|
onItemToggle: s,
|
|
8069
8083
|
onListReorder: c,
|
|
8070
8084
|
placeholderIndent: "var(--size)",
|
|
8071
|
-
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ S(
|
|
8085
|
+
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ S(xp, {
|
|
8072
8086
|
node: e,
|
|
8073
8087
|
columnAlignment: m,
|
|
8074
8088
|
columnWidths: h,
|
|
@@ -8085,10 +8099,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8085
8099
|
})]
|
|
8086
8100
|
})
|
|
8087
8101
|
});
|
|
8088
|
-
},
|
|
8102
|
+
}, wp = Object.freeze({
|
|
8089
8103
|
Translations: "translations",
|
|
8090
8104
|
LanguageKey: "languageKey"
|
|
8091
|
-
}),
|
|
8105
|
+
}), Tp = {
|
|
8092
8106
|
unified: "Unified",
|
|
8093
8107
|
split: "Split",
|
|
8094
8108
|
changesTooLarge: "Changes are too large to be shown",
|
|
@@ -8111,29 +8125,29 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8111
8125
|
showAll: "Show all",
|
|
8112
8126
|
unknown: "Unknown",
|
|
8113
8127
|
unexpectedError: "Unexpected error"
|
|
8114
|
-
},
|
|
8128
|
+
}, Ep = (e) => Object.keys(Tp).reduce((t, n) => ({
|
|
8115
8129
|
...t,
|
|
8116
|
-
[n]: (e == null ? void 0 : e[n]) || (
|
|
8117
|
-
}), {}),
|
|
8118
|
-
[
|
|
8119
|
-
[
|
|
8120
|
-
},
|
|
8121
|
-
|
|
8122
|
-
},
|
|
8130
|
+
[n]: (e == null ? void 0 : e[n]) || (Tp == null ? void 0 : Tp[n])
|
|
8131
|
+
}), {}), Dp = {
|
|
8132
|
+
[wp.Translations]: Ep(),
|
|
8133
|
+
[wp.LanguageKey]: "en"
|
|
8134
|
+
}, Op = (e) => e ? Dp[e] : Dp, kp = (e, t) => {
|
|
8135
|
+
Dp[e] = t;
|
|
8136
|
+
}, Ap = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
|
|
8123
8137
|
var a;
|
|
8124
|
-
let { unitTemplate: o = null } = (a =
|
|
8125
|
-
return e[n] = r == null ?
|
|
8138
|
+
let { unitTemplate: o = null } = (a = If()) == null ? {} : a;
|
|
8139
|
+
return e[n] = r == null ? Tf(n, o) : r, t[n] = i, {
|
|
8126
8140
|
preferredUnits: e,
|
|
8127
8141
|
storageUnits: t
|
|
8128
8142
|
};
|
|
8129
8143
|
}, {
|
|
8130
8144
|
preferredUnits: {},
|
|
8131
8145
|
storageUnits: {}
|
|
8132
|
-
}),
|
|
8146
|
+
}), jp = ({ row: e, selectedUnits: t, storageUnits: n, convertBackToStorageUnit: r, enableCosmeticRounding: i, enableDisplayRounding: a }) => ({
|
|
8133
8147
|
...e,
|
|
8134
8148
|
cells: e.cells.map((e) => {
|
|
8135
8149
|
if ("autoUnit" in e && e.autoUnit && (typeof e.value == "string" || typeof e.value == "number")) {
|
|
8136
|
-
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 } =
|
|
8150
|
+
let { unitKey: o, value: s, formatDisplayValue: c } = e, l = a && "roundDisplayValue" in e ? e.roundDisplayValue : null, u = t[o], d = n[o], f = d && u !== d, { value: p = s } = Af({
|
|
8137
8151
|
value: Er(s),
|
|
8138
8152
|
unitkey: o,
|
|
8139
8153
|
toUnit: u,
|
|
@@ -8147,7 +8161,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8147
8161
|
roundDisplayValue: l,
|
|
8148
8162
|
selectOnFocus: !0,
|
|
8149
8163
|
onChange: (t) => {
|
|
8150
|
-
let n = t, { value: i } = n.target, a = r ? d : u, { value: s = i } =
|
|
8164
|
+
let n = t, { value: i } = n.target, a = r ? d : u, { value: s = i } = Af({
|
|
8151
8165
|
value: String(i),
|
|
8152
8166
|
unitkey: o,
|
|
8153
8167
|
toUnit: a,
|
|
@@ -8166,8 +8180,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8166
8180
|
}
|
|
8167
8181
|
return e;
|
|
8168
8182
|
})
|
|
8169
|
-
}),
|
|
8170
|
-
let { translations: i } =
|
|
8183
|
+
}), Mp = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
|
|
8184
|
+
let { translations: i } = Op();
|
|
8171
8185
|
return e ? e.map((e) => ({
|
|
8172
8186
|
...e,
|
|
8173
8187
|
cells: e.cells.map((e) => {
|
|
@@ -8196,8 +8210,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8196
8210
|
return e;
|
|
8197
8211
|
})
|
|
8198
8212
|
})) : [];
|
|
8199
|
-
},
|
|
8200
|
-
let { headers: c, ...u } = e, { storageUnits: f, preferredUnits: p } =
|
|
8213
|
+
}, Np = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: o, beforeRenderRow: s }) => {
|
|
8214
|
+
let { headers: c, ...u } = e, { storageUnits: f, preferredUnits: p } = Ap(t), m = wf(p), [h, g] = v(p), _ = ({ unitKey: e, value: n }) => {
|
|
8201
8215
|
g((t) => ({
|
|
8202
8216
|
...t,
|
|
8203
8217
|
[e]: n
|
|
@@ -8208,7 +8222,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8208
8222
|
newUnit: n,
|
|
8209
8223
|
unitKey: e
|
|
8210
8224
|
});
|
|
8211
|
-
}, y = l(({ row: e, rowIndex: t }) =>
|
|
8225
|
+
}, y = l(({ row: e, rowIndex: t }) => jp({
|
|
8212
8226
|
row: s ? s({
|
|
8213
8227
|
row: e,
|
|
8214
8228
|
rowIndex: t
|
|
@@ -8233,10 +8247,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8233
8247
|
value: n
|
|
8234
8248
|
});
|
|
8235
8249
|
});
|
|
8236
|
-
}, [t]), /* @__PURE__ */ S(
|
|
8250
|
+
}, [t]), /* @__PURE__ */ S(eu, {
|
|
8237
8251
|
table: {
|
|
8238
8252
|
...u,
|
|
8239
|
-
headers:
|
|
8253
|
+
headers: Mp({
|
|
8240
8254
|
headers: e.headers,
|
|
8241
8255
|
selectedUnits: h,
|
|
8242
8256
|
storageUnits: f,
|
|
@@ -8247,8 +8261,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8247
8261
|
canListReorder: o,
|
|
8248
8262
|
beforeRenderRow: y
|
|
8249
8263
|
});
|
|
8250
|
-
},
|
|
8251
|
-
let { translations: d } =
|
|
8264
|
+
}, Pp = { settingField: "_settingField_1x02n_1" }, Fp = ({ 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 }) => {
|
|
8265
|
+
let { translations: d } = Op(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ C(e.Fragment, { children: [t, /* @__PURE__ */ S("br", {})] }, n)), p = [
|
|
8252
8266
|
...r ? [] : [{
|
|
8253
8267
|
label: d == null ? void 0 : d.allUsers,
|
|
8254
8268
|
value: !1
|
|
@@ -8263,14 +8277,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8263
8277
|
}] : []
|
|
8264
8278
|
], m = a !== void 0 && o !== void 0 && !dn(a, o);
|
|
8265
8279
|
return /* @__PURE__ */ C("div", {
|
|
8266
|
-
className:
|
|
8280
|
+
className: Pp.settingField,
|
|
8267
8281
|
"data-testid": u,
|
|
8268
|
-
children: [/* @__PURE__ */ C(
|
|
8282
|
+
children: [/* @__PURE__ */ C(vd, {
|
|
8269
8283
|
justifyContent: "space-between",
|
|
8270
8284
|
wrap: !1,
|
|
8271
8285
|
children: [i, !s && /* @__PURE__ */ S("div", {
|
|
8272
8286
|
style: { flexShrink: 0 },
|
|
8273
|
-
children: /* @__PURE__ */ C(
|
|
8287
|
+
children: /* @__PURE__ */ C(vd, {
|
|
8274
8288
|
gap: "8px",
|
|
8275
8289
|
alignItems: "center",
|
|
8276
8290
|
children: [m && /* @__PURE__ */ S(da, {
|
|
@@ -8295,19 +8309,19 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8295
8309
|
children: f(t)
|
|
8296
8310
|
})]
|
|
8297
8311
|
});
|
|
8298
|
-
},
|
|
8312
|
+
}, Ip = (e, t) => {
|
|
8299
8313
|
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;
|
|
8300
8314
|
return {
|
|
8301
8315
|
added: Math.max(0, i),
|
|
8302
8316
|
removed: Math.max(0, a)
|
|
8303
8317
|
};
|
|
8304
|
-
},
|
|
8318
|
+
}, Lp = "split", Rp = "unified", zp = ({ oldJson: e, newJson: t, viewType: n = Lp }) => {
|
|
8305
8319
|
var r, i;
|
|
8306
|
-
let { translations: a } =
|
|
8307
|
-
value:
|
|
8320
|
+
let { translations: a } = Op(), [o, s] = v(n), c = [{
|
|
8321
|
+
value: Lp,
|
|
8308
8322
|
label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
|
|
8309
8323
|
}, {
|
|
8310
|
-
value:
|
|
8324
|
+
value: Rp,
|
|
8311
8325
|
label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
|
|
8312
8326
|
}];
|
|
8313
8327
|
d(() => {
|
|
@@ -8315,10 +8329,10 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8315
8329
|
}, [n]);
|
|
8316
8330
|
let l = ({ target: { value: e } }) => {
|
|
8317
8331
|
s(e);
|
|
8318
|
-
}, { added: u, removed: f } =
|
|
8332
|
+
}, { added: u, removed: f } = Ip(e, t), p = u + f > 3500;
|
|
8319
8333
|
return /* @__PURE__ */ S(x, { children: /* @__PURE__ */ S(bo, {
|
|
8320
8334
|
bordered: !0,
|
|
8321
|
-
heading: /* @__PURE__ */ C(
|
|
8335
|
+
heading: /* @__PURE__ */ C(vd, {
|
|
8322
8336
|
gap: !0,
|
|
8323
8337
|
children: [/* @__PURE__ */ S(es, { children: /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C(Yo, {
|
|
8324
8338
|
success: !0,
|
|
@@ -8330,7 +8344,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8330
8344
|
}), /* @__PURE__ */ C(Yo, {
|
|
8331
8345
|
error: !0,
|
|
8332
8346
|
children: ["-", f]
|
|
8333
|
-
})] }) }), !p && /* @__PURE__ */ S(
|
|
8347
|
+
})] }) }), !p && /* @__PURE__ */ S(Jd, {
|
|
8334
8348
|
name: "viewType",
|
|
8335
8349
|
options: c,
|
|
8336
8350
|
value: o,
|
|
@@ -8348,100 +8362,14 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
8348
8362
|
}) : /* @__PURE__ */ S(xi, {
|
|
8349
8363
|
oldValue: e,
|
|
8350
8364
|
newValue: t,
|
|
8351
|
-
splitView: o ===
|
|
8365
|
+
splitView: o === Lp,
|
|
8352
8366
|
compareMethod: Si.WORDS
|
|
8353
8367
|
})
|
|
8354
8368
|
}) });
|
|
8355
|
-
}, zp = { backgroundColor: "var(--color-background-error-muted)" }, Bp = { backgroundColor: "var(--color-background-success-muted)" }, Vp = { backgroundColor: "var(--color-background-warning-muted)" }, Hp = (e) => {
|
|
8356
|
-
var t;
|
|
8357
|
-
if (e.id != null) return String(e.id);
|
|
8358
|
-
let n = (t = e.cells) == null || (t = t[0]) == null ? void 0 : t.value;
|
|
8359
|
-
return n == null ? "" : String(n);
|
|
8360
|
-
}, Up = (e, t) => ({
|
|
8361
|
-
...e,
|
|
8362
|
-
cells: e.cells.map((e) => ({
|
|
8363
|
-
...e,
|
|
8364
|
-
style: {
|
|
8365
|
-
...e.style,
|
|
8366
|
-
...t
|
|
8367
|
-
}
|
|
8368
|
-
}))
|
|
8369
|
-
}), Wp = (e, t) => ({
|
|
8370
|
-
...e,
|
|
8371
|
-
cells: e.cells.map((e, n) => {
|
|
8372
|
-
var r;
|
|
8373
|
-
let i = (r = t.cells) == null ? void 0 : r[n], a = i == null ? void 0 : i.value;
|
|
8374
|
-
return !i || dn(e.value, a) ? e : {
|
|
8375
|
-
...e,
|
|
8376
|
-
style: {
|
|
8377
|
-
...e.style,
|
|
8378
|
-
...Vp
|
|
8379
|
-
},
|
|
8380
|
-
tooltip: a
|
|
8381
|
-
};
|
|
8382
|
-
})
|
|
8383
|
-
}), Gp = (e = [], t = []) => {
|
|
8384
|
-
let n = /* @__PURE__ */ new Map();
|
|
8385
|
-
for (let e of t) n.set(Hp(e), e);
|
|
8386
|
-
let r = new Set(e.map(Hp)), i = /* @__PURE__ */ new Map(), a = [], o = null;
|
|
8387
|
-
for (let e = t.length - 1; e >= 0; e--) {
|
|
8388
|
-
let n = t[e], c = Hp(n);
|
|
8389
|
-
if (r.has(c)) {
|
|
8390
|
-
o = c;
|
|
8391
|
-
continue;
|
|
8392
|
-
}
|
|
8393
|
-
if (o === null) a.push(n);
|
|
8394
|
-
else {
|
|
8395
|
-
var s;
|
|
8396
|
-
let e = (s = i.get(o)) == null ? [] : s;
|
|
8397
|
-
e.unshift(n), i.set(o, e);
|
|
8398
|
-
}
|
|
8399
|
-
}
|
|
8400
|
-
a.reverse();
|
|
8401
|
-
let c = [];
|
|
8402
|
-
for (let t of e) {
|
|
8403
|
-
let e = Hp(t), r = i.get(e);
|
|
8404
|
-
if (r) for (let e of r) c.push({
|
|
8405
|
-
status: "deleted",
|
|
8406
|
-
row: e
|
|
8407
|
-
});
|
|
8408
|
-
let a = n.get(e);
|
|
8409
|
-
a ? c.push({
|
|
8410
|
-
status: "matched",
|
|
8411
|
-
row: t,
|
|
8412
|
-
compareRow: a
|
|
8413
|
-
}) : c.push({
|
|
8414
|
-
status: "added",
|
|
8415
|
-
row: t
|
|
8416
|
-
});
|
|
8417
|
-
}
|
|
8418
|
-
for (let e of a) c.push({
|
|
8419
|
-
status: "deleted",
|
|
8420
|
-
row: e
|
|
8421
|
-
});
|
|
8422
|
-
return c;
|
|
8423
|
-
}, Kp = (e) => e.status === "deleted" ? Up(e.row, zp) : e.status === "added" ? Up(e.row, Bp) : Wp(e.row, e.compareRow), qp = ({ table: e, compareRows: t, beforeRenderRow: n, ...r }) => {
|
|
8424
|
-
let i = h(() => Gp(e.rows, t), [e.rows, t]), a = h(() => i.map((e) => e.row), [i]), o = l(({ row: e, rowIndex: t }) => {
|
|
8425
|
-
let r = i[t], a = r ? Kp(r) : e;
|
|
8426
|
-
return n ? n({
|
|
8427
|
-
row: a,
|
|
8428
|
-
rowIndex: t
|
|
8429
|
-
}) : a;
|
|
8430
|
-
}, [i, n]);
|
|
8431
|
-
return /* @__PURE__ */ S($l, {
|
|
8432
|
-
...r,
|
|
8433
|
-
beforeRenderRow: o,
|
|
8434
|
-
table: {
|
|
8435
|
-
...e,
|
|
8436
|
-
rows: a,
|
|
8437
|
-
rowCount: i.length,
|
|
8438
|
-
striped: !1
|
|
8439
|
-
}
|
|
8440
|
-
});
|
|
8441
8369
|
};
|
|
8442
8370
|
//#endregion
|
|
8443
8371
|
//#region src/helpers/date.ts
|
|
8444
|
-
function
|
|
8372
|
+
function Bp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
8445
8373
|
return e ? new Date(e).toLocaleString(a, {
|
|
8446
8374
|
year: "numeric",
|
|
8447
8375
|
month: "short",
|
|
@@ -8455,28 +8383,28 @@ function Jp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
8455
8383
|
}
|
|
8456
8384
|
//#endregion
|
|
8457
8385
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
8458
|
-
function
|
|
8386
|
+
function Vp(e) {
|
|
8459
8387
|
var t;
|
|
8460
8388
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
8461
8389
|
if (!n) throw Error("Invalid RegExp");
|
|
8462
8390
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
8463
8391
|
}
|
|
8464
|
-
function
|
|
8392
|
+
function Hp(e) {
|
|
8465
8393
|
if (typeof e != "object") return e;
|
|
8466
8394
|
if (e === null) return null;
|
|
8467
|
-
if (Array.isArray(e)) return e.map(
|
|
8395
|
+
if (Array.isArray(e)) return e.map(Hp);
|
|
8468
8396
|
if (e instanceof Date) return new Date(e.getTime());
|
|
8469
|
-
if (e instanceof RegExp) return
|
|
8397
|
+
if (e instanceof RegExp) return Vp(e);
|
|
8470
8398
|
let t = {};
|
|
8471
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
8399
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = Hp(e[n]));
|
|
8472
8400
|
return t;
|
|
8473
8401
|
}
|
|
8474
8402
|
//#endregion
|
|
8475
8403
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
8476
|
-
function
|
|
8404
|
+
function Up(e, t) {
|
|
8477
8405
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
8478
8406
|
}
|
|
8479
|
-
var
|
|
8407
|
+
var Wp = (e) => e[e.length - 1], Gp = class {
|
|
8480
8408
|
setResult(e) {
|
|
8481
8409
|
return this.result = e, this.hasResult = !0, this;
|
|
8482
8410
|
}
|
|
@@ -8484,16 +8412,16 @@ var Qp = (e) => e[e.length - 1], $p = class {
|
|
|
8484
8412
|
return this.exiting = !0, this;
|
|
8485
8413
|
}
|
|
8486
8414
|
push(e, t) {
|
|
8487
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
8415
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (Up(this.children), Wp(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
8488
8416
|
}
|
|
8489
|
-
},
|
|
8417
|
+
}, Kp = class extends Gp {
|
|
8490
8418
|
constructor(e, t) {
|
|
8491
8419
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
8492
8420
|
}
|
|
8493
8421
|
prepareDeltaResult(e) {
|
|
8494
8422
|
var t, n, r, i;
|
|
8495
8423
|
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)) {
|
|
8496
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
8424
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : Hp;
|
|
8497
8425
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
8498
8426
|
}
|
|
8499
8427
|
return e;
|
|
@@ -8501,15 +8429,15 @@ var Qp = (e) => e[e.length - 1], $p = class {
|
|
|
8501
8429
|
setResult(e) {
|
|
8502
8430
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
8503
8431
|
}
|
|
8504
|
-
},
|
|
8432
|
+
}, qp = class extends Gp {
|
|
8505
8433
|
constructor(e, t) {
|
|
8506
8434
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
8507
8435
|
}
|
|
8508
|
-
},
|
|
8436
|
+
}, Jp = class extends Gp {
|
|
8509
8437
|
constructor(e) {
|
|
8510
8438
|
super(), this.delta = e, this.pipe = "reverse";
|
|
8511
8439
|
}
|
|
8512
|
-
},
|
|
8440
|
+
}, Yp = class {
|
|
8513
8441
|
constructor(e) {
|
|
8514
8442
|
this.name = e, this.filters = [];
|
|
8515
8443
|
}
|
|
@@ -8573,7 +8501,7 @@ var Qp = (e) => e[e.length - 1], $p = class {
|
|
|
8573
8501
|
}
|
|
8574
8502
|
}), this);
|
|
8575
8503
|
}
|
|
8576
|
-
},
|
|
8504
|
+
}, Xp = class {
|
|
8577
8505
|
constructor(e) {
|
|
8578
8506
|
this.selfOptions = e || {}, this.pipes = {};
|
|
8579
8507
|
}
|
|
@@ -8600,7 +8528,7 @@ var Qp = (e) => e[e.length - 1], $p = class {
|
|
|
8600
8528
|
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);
|
|
8601
8529
|
return n.hasResult ? n.result : void 0;
|
|
8602
8530
|
}
|
|
8603
|
-
},
|
|
8531
|
+
}, Zp = (e, t, n, r) => e[n] === t[r], Qp = (e, t, n, r) => {
|
|
8604
8532
|
var i, a, o;
|
|
8605
8533
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
8606
8534
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -8616,7 +8544,7 @@ var Qp = (e) => e[e.length - 1], $p = class {
|
|
|
8616
8544
|
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);
|
|
8617
8545
|
}
|
|
8618
8546
|
return d;
|
|
8619
|
-
},
|
|
8547
|
+
}, $p = (e, t, n, r) => {
|
|
8620
8548
|
let i = t.length, a = n.length, o = {
|
|
8621
8549
|
sequence: [],
|
|
8622
8550
|
indices1: [],
|
|
@@ -8638,11 +8566,11 @@ var Qp = (e) => e[e.length - 1], $p = class {
|
|
|
8638
8566
|
}
|
|
8639
8567
|
}
|
|
8640
8568
|
return o;
|
|
8641
|
-
},
|
|
8569
|
+
}, em = { get: (e, t, n, r) => {
|
|
8642
8570
|
let i = r || {};
|
|
8643
|
-
return
|
|
8644
|
-
} },
|
|
8645
|
-
function
|
|
8571
|
+
return $p(Qp(e, t, n || Zp, i), e, t, i);
|
|
8572
|
+
} }, tm = 3;
|
|
8573
|
+
function nm(e, t, n, r) {
|
|
8646
8574
|
for (let i = 0; i < n; i++) {
|
|
8647
8575
|
let n = e[i];
|
|
8648
8576
|
for (let e = 0; e < r; e++) {
|
|
@@ -8652,7 +8580,7 @@ function um(e, t, n, r) {
|
|
|
8652
8580
|
}
|
|
8653
8581
|
return !1;
|
|
8654
8582
|
}
|
|
8655
|
-
function
|
|
8583
|
+
function rm(e, t, n, r, i) {
|
|
8656
8584
|
let a = e[n], o = t[r];
|
|
8657
8585
|
if (a === o) return !0;
|
|
8658
8586
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -8665,15 +8593,15 @@ function dm(e, t, n, r, i) {
|
|
|
8665
8593
|
let l = i.hashCache2[r];
|
|
8666
8594
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l !== void 0 && c === l;
|
|
8667
8595
|
}
|
|
8668
|
-
var
|
|
8596
|
+
var im = function(e) {
|
|
8669
8597
|
var t, n, r, i, a;
|
|
8670
8598
|
if (!e.leftIsArray) return;
|
|
8671
8599
|
let o = {
|
|
8672
8600
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
8673
8601
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
8674
8602
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
8675
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !
|
|
8676
|
-
for (; c + s < m && c + s < h &&
|
|
8603
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !nm(f, p, m, h)); s < m && s < h && rm(f, p, s, s, o);) l = s, g = new Kp(f[l], p[l]), e.push(g, l), s++;
|
|
8604
|
+
for (; c + s < m && c + s < h && rm(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new Kp(f[u], p[d]), e.push(g, d), c++;
|
|
8677
8605
|
let _;
|
|
8678
8606
|
if (s + c === m) {
|
|
8679
8607
|
if (m === h) {
|
|
@@ -8697,7 +8625,7 @@ var fm = function(e) {
|
|
|
8697
8625
|
return;
|
|
8698
8626
|
}
|
|
8699
8627
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
8700
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
8628
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = em.get(v, y, rm, o), x = [];
|
|
8701
8629
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
8702
8630
|
let t = `_${l}`;
|
|
8703
8631
|
_[t] = [
|
|
@@ -8718,8 +8646,8 @@ var fm = function(e) {
|
|
|
8718
8646
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
8719
8647
|
u = x[n];
|
|
8720
8648
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
8721
|
-
if (u !== void 0 && r &&
|
|
8722
|
-
r.splice(1, 2, l,
|
|
8649
|
+
if (u !== void 0 && r && rm(v, y, u - s, l - s, o)) {
|
|
8650
|
+
r.splice(1, 2, l, tm), r.splice(1, 2, l, tm), C || (r[0] = ""), d = l, g = new Kp(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
8723
8651
|
break;
|
|
8724
8652
|
}
|
|
8725
8653
|
}
|
|
@@ -8727,20 +8655,20 @@ var fm = function(e) {
|
|
|
8727
8655
|
} else {
|
|
8728
8656
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
8729
8657
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
8730
|
-
d = b.indices2[t] + s, g = new
|
|
8658
|
+
d = b.indices2[t] + s, g = new Kp(f[u], p[d]), e.push(g, d);
|
|
8731
8659
|
}
|
|
8732
8660
|
}
|
|
8733
8661
|
e.setResult(_).exit();
|
|
8734
8662
|
};
|
|
8735
|
-
|
|
8736
|
-
var
|
|
8663
|
+
im.filterName = "arrays";
|
|
8664
|
+
var am = {
|
|
8737
8665
|
numerically(e, t) {
|
|
8738
8666
|
return e - t;
|
|
8739
8667
|
},
|
|
8740
8668
|
numericallyBy(e) {
|
|
8741
8669
|
return (t, n) => t[e] - n[e];
|
|
8742
8670
|
}
|
|
8743
|
-
},
|
|
8671
|
+
}, om = function(e) {
|
|
8744
8672
|
var t;
|
|
8745
8673
|
if (!e.nested) return;
|
|
8746
8674
|
let n = e.delta;
|
|
@@ -8749,7 +8677,7 @@ var pm = {
|
|
|
8749
8677
|
for (r in a) if (r !== "_t") {
|
|
8750
8678
|
if (r[0] === "_") {
|
|
8751
8679
|
let e = r;
|
|
8752
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
8680
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === tm)) s.push(Number.parseInt(r.slice(1), 10));
|
|
8753
8681
|
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]}`);
|
|
8754
8682
|
} else {
|
|
8755
8683
|
let e = r;
|
|
@@ -8762,15 +8690,15 @@ var pm = {
|
|
|
8762
8690
|
});
|
|
8763
8691
|
}
|
|
8764
8692
|
}
|
|
8765
|
-
for (s = s.sort(
|
|
8693
|
+
for (s = s.sort(am.numerically), r = s.length - 1; r >= 0; r--) {
|
|
8766
8694
|
if (i = s[r], i === void 0) continue;
|
|
8767
8695
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
8768
|
-
(e == null ? void 0 : e[2]) ===
|
|
8696
|
+
(e == null ? void 0 : e[2]) === tm && c.push({
|
|
8769
8697
|
index: e[1],
|
|
8770
8698
|
value: t
|
|
8771
8699
|
});
|
|
8772
8700
|
}
|
|
8773
|
-
c = c.sort(
|
|
8701
|
+
c = c.sort(am.numericallyBy("index"));
|
|
8774
8702
|
let u = c.length;
|
|
8775
8703
|
for (r = 0; r < u; r++) {
|
|
8776
8704
|
let e = c[r];
|
|
@@ -8780,7 +8708,7 @@ var pm = {
|
|
|
8780
8708
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
8781
8709
|
let t = l[r];
|
|
8782
8710
|
if (t === void 0) continue;
|
|
8783
|
-
let n = new
|
|
8711
|
+
let n = new qp(o[t.index], t.delta);
|
|
8784
8712
|
e.push(n, t.index);
|
|
8785
8713
|
}
|
|
8786
8714
|
if (!e.children) {
|
|
@@ -8789,8 +8717,8 @@ var pm = {
|
|
|
8789
8717
|
}
|
|
8790
8718
|
e.exit();
|
|
8791
8719
|
};
|
|
8792
|
-
|
|
8793
|
-
var
|
|
8720
|
+
om.filterName = "arrays";
|
|
8721
|
+
var sm = function(e) {
|
|
8794
8722
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
8795
8723
|
let t = e.left, n = e.children.length;
|
|
8796
8724
|
for (let r = 0; r < n; r++) {
|
|
@@ -8801,16 +8729,16 @@ var hm = function(e) {
|
|
|
8801
8729
|
}
|
|
8802
8730
|
e.setResult(t).exit();
|
|
8803
8731
|
};
|
|
8804
|
-
|
|
8805
|
-
var
|
|
8732
|
+
sm.filterName = "arraysCollectChildren";
|
|
8733
|
+
var cm = function(e) {
|
|
8806
8734
|
if (!e.nested) {
|
|
8807
8735
|
let t = e.delta;
|
|
8808
|
-
if (t[2] ===
|
|
8736
|
+
if (t[2] === tm) {
|
|
8809
8737
|
let n = t;
|
|
8810
8738
|
e.newName = `_${n[1]}`, e.setResult([
|
|
8811
8739
|
n[0],
|
|
8812
8740
|
Number.parseInt(e.childName.substring(1), 10),
|
|
8813
|
-
|
|
8741
|
+
tm
|
|
8814
8742
|
]).exit();
|
|
8815
8743
|
}
|
|
8816
8744
|
return;
|
|
@@ -8820,20 +8748,20 @@ var gm = function(e) {
|
|
|
8820
8748
|
let n = t;
|
|
8821
8749
|
for (let t in n) {
|
|
8822
8750
|
if (t === "_t") continue;
|
|
8823
|
-
let r = new
|
|
8751
|
+
let r = new Jp(n[t]);
|
|
8824
8752
|
e.push(r, t);
|
|
8825
8753
|
}
|
|
8826
8754
|
e.exit();
|
|
8827
8755
|
};
|
|
8828
|
-
|
|
8829
|
-
var
|
|
8756
|
+
cm.filterName = "arrays";
|
|
8757
|
+
var lm = (e, t, n) => {
|
|
8830
8758
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
8831
8759
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
8832
8760
|
let r = +t;
|
|
8833
8761
|
for (let n in e) {
|
|
8834
8762
|
let i = e[n];
|
|
8835
8763
|
if (Array.isArray(i)) {
|
|
8836
|
-
if (i[2] ===
|
|
8764
|
+
if (i[2] === tm) {
|
|
8837
8765
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
8838
8766
|
if (a === +t) return e;
|
|
8839
8767
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
@@ -8841,7 +8769,7 @@ var _m = (e, t, n) => {
|
|
|
8841
8769
|
}
|
|
8842
8770
|
}
|
|
8843
8771
|
return r;
|
|
8844
|
-
},
|
|
8772
|
+
}, um = (e) => {
|
|
8845
8773
|
if (!e || !e.children) return;
|
|
8846
8774
|
let t = e.delta;
|
|
8847
8775
|
if (t._t !== "a") return;
|
|
@@ -8852,22 +8780,22 @@ var _m = (e, t, n) => {
|
|
|
8852
8780
|
let a = r.newName;
|
|
8853
8781
|
if (a === void 0) {
|
|
8854
8782
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
8855
|
-
a =
|
|
8783
|
+
a = lm(n, r.childName, r.result);
|
|
8856
8784
|
}
|
|
8857
8785
|
i[a] !== r.result && (i[a] = r.result);
|
|
8858
8786
|
}
|
|
8859
8787
|
e.setResult(i).exit();
|
|
8860
8788
|
};
|
|
8861
|
-
|
|
8789
|
+
um.filterName = "arraysCollectChildren";
|
|
8862
8790
|
//#endregion
|
|
8863
8791
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
8864
|
-
var
|
|
8792
|
+
var dm = function(e) {
|
|
8865
8793
|
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();
|
|
8866
8794
|
};
|
|
8867
|
-
|
|
8795
|
+
dm.filterName = "dates";
|
|
8868
8796
|
//#endregion
|
|
8869
8797
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
8870
|
-
var
|
|
8798
|
+
var fm = /* @__PURE__ */ new Set(["__proto__"]), pm = (e) => {
|
|
8871
8799
|
if (!e || !e.children) return;
|
|
8872
8800
|
let t = e.children.length, n = e.result;
|
|
8873
8801
|
for (let r = 0; r < t; r++) {
|
|
@@ -8879,18 +8807,18 @@ var bm = /* @__PURE__ */ new Set(["__proto__"]), xm = (e) => {
|
|
|
8879
8807
|
}
|
|
8880
8808
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
8881
8809
|
};
|
|
8882
|
-
|
|
8883
|
-
var
|
|
8810
|
+
pm.filterName = "collectChildren";
|
|
8811
|
+
var mm = (e) => {
|
|
8884
8812
|
var t;
|
|
8885
8813
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
8886
8814
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
8887
8815
|
for (let t in n) {
|
|
8888
8816
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
8889
|
-
let a = new
|
|
8817
|
+
let a = new Kp(n[t], r[t]);
|
|
8890
8818
|
e.push(a, t);
|
|
8891
8819
|
}
|
|
8892
8820
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
8893
|
-
let n = new
|
|
8821
|
+
let n = new Kp(void 0, r[t]);
|
|
8894
8822
|
e.push(n, t);
|
|
8895
8823
|
}
|
|
8896
8824
|
if (!e.children || e.children.length === 0) {
|
|
@@ -8899,15 +8827,15 @@ var Sm = (e) => {
|
|
|
8899
8827
|
}
|
|
8900
8828
|
e.exit();
|
|
8901
8829
|
};
|
|
8902
|
-
|
|
8903
|
-
var
|
|
8830
|
+
mm.filterName = "objects";
|
|
8831
|
+
var hm = function(e) {
|
|
8904
8832
|
if (!e.nested) return;
|
|
8905
8833
|
let t = e.delta;
|
|
8906
8834
|
if (t._t) return;
|
|
8907
8835
|
let n = t, r = !1;
|
|
8908
8836
|
for (let t in n) {
|
|
8909
|
-
if (
|
|
8910
|
-
let i = e.left, a = new
|
|
8837
|
+
if (fm.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
8838
|
+
let i = e.left, a = new qp(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
8911
8839
|
e.push(a, t), r = !0;
|
|
8912
8840
|
}
|
|
8913
8841
|
if (!r) {
|
|
@@ -8916,8 +8844,8 @@ var Cm = function(e) {
|
|
|
8916
8844
|
}
|
|
8917
8845
|
e.exit();
|
|
8918
8846
|
};
|
|
8919
|
-
|
|
8920
|
-
var
|
|
8847
|
+
hm.filterName = "objects";
|
|
8848
|
+
var gm = function(e) {
|
|
8921
8849
|
if (!e || !e.children || e.delta._t) return;
|
|
8922
8850
|
if (e.left === null || typeof e.left != "object") {
|
|
8923
8851
|
e.setResult(e.left).exit();
|
|
@@ -8928,17 +8856,17 @@ var wm = function(e) {
|
|
|
8928
8856
|
let n = e.children[r];
|
|
8929
8857
|
if (n === void 0) continue;
|
|
8930
8858
|
let i = n.childName;
|
|
8931
|
-
|
|
8859
|
+
fm.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
8932
8860
|
}
|
|
8933
8861
|
e.setResult(t).exit();
|
|
8934
8862
|
};
|
|
8935
|
-
|
|
8936
|
-
var
|
|
8863
|
+
gm.filterName = "collectChildren";
|
|
8864
|
+
var _m = function(e) {
|
|
8937
8865
|
if (!e.nested || e.delta._t) return;
|
|
8938
8866
|
let t = e.delta, n = !1;
|
|
8939
8867
|
for (let r in t) {
|
|
8940
|
-
if (
|
|
8941
|
-
let i = new
|
|
8868
|
+
if (fm.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
8869
|
+
let i = new Jp(t[r]);
|
|
8942
8870
|
e.push(i, r), n = !0;
|
|
8943
8871
|
}
|
|
8944
8872
|
if (!n) {
|
|
@@ -8947,25 +8875,25 @@ var Tm = function(e) {
|
|
|
8947
8875
|
}
|
|
8948
8876
|
e.exit();
|
|
8949
8877
|
};
|
|
8950
|
-
|
|
8951
|
-
var
|
|
8878
|
+
_m.filterName = "objects";
|
|
8879
|
+
var vm = (e) => {
|
|
8952
8880
|
if (!e || !e.children || e.delta._t) return;
|
|
8953
8881
|
let t = e.children.length, n = {};
|
|
8954
8882
|
for (let r = 0; r < t; r++) {
|
|
8955
8883
|
let t = e.children[r];
|
|
8956
8884
|
if (t === void 0) continue;
|
|
8957
8885
|
let i = t.childName;
|
|
8958
|
-
|
|
8886
|
+
fm.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
8959
8887
|
}
|
|
8960
8888
|
e.setResult(n).exit();
|
|
8961
8889
|
};
|
|
8962
|
-
|
|
8890
|
+
vm.filterName = "collectChildren";
|
|
8963
8891
|
//#endregion
|
|
8964
8892
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
8965
|
-
var
|
|
8966
|
-
function
|
|
8893
|
+
var ym = 2, bm = 60, xm = null;
|
|
8894
|
+
function Sm(e, t) {
|
|
8967
8895
|
var n;
|
|
8968
|
-
if (!
|
|
8896
|
+
if (!xm) {
|
|
8969
8897
|
let r;
|
|
8970
8898
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
8971
8899
|
else {
|
|
@@ -8973,7 +8901,7 @@ function Am(e, t) {
|
|
|
8973
8901
|
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.");
|
|
8974
8902
|
throw e.diff_match_patch_not_found = !0, e;
|
|
8975
8903
|
}
|
|
8976
|
-
|
|
8904
|
+
xm = {
|
|
8977
8905
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
8978
8906
|
patch: (e, t) => {
|
|
8979
8907
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -8985,17 +8913,17 @@ function Am(e, t) {
|
|
|
8985
8913
|
}
|
|
8986
8914
|
};
|
|
8987
8915
|
}
|
|
8988
|
-
return
|
|
8916
|
+
return xm;
|
|
8989
8917
|
}
|
|
8990
|
-
var
|
|
8918
|
+
var Cm = function(e) {
|
|
8991
8919
|
var t, n;
|
|
8992
8920
|
if (e.leftType !== "string") return;
|
|
8993
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
8921
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || bm;
|
|
8994
8922
|
if (r.length < a || i.length < a) {
|
|
8995
8923
|
e.setResult([r, i]).exit();
|
|
8996
8924
|
return;
|
|
8997
8925
|
}
|
|
8998
|
-
let o =
|
|
8926
|
+
let o = Sm(e.options);
|
|
8999
8927
|
if (!o) {
|
|
9000
8928
|
e.setResult([r, i]).exit();
|
|
9001
8929
|
return;
|
|
@@ -9004,19 +8932,19 @@ var jm = function(e) {
|
|
|
9004
8932
|
e.setResult([
|
|
9005
8933
|
s(r, i),
|
|
9006
8934
|
0,
|
|
9007
|
-
|
|
8935
|
+
ym
|
|
9008
8936
|
]).exit();
|
|
9009
8937
|
};
|
|
9010
|
-
|
|
9011
|
-
var
|
|
8938
|
+
Cm.filterName = "texts";
|
|
8939
|
+
var wm = function(e) {
|
|
9012
8940
|
if (e.nested) return;
|
|
9013
8941
|
let t = e.delta;
|
|
9014
|
-
if (t[2] !==
|
|
9015
|
-
let n = t, r =
|
|
8942
|
+
if (t[2] !== ym) return;
|
|
8943
|
+
let n = t, r = Sm(e.options, !0).patch;
|
|
9016
8944
|
e.setResult(r(e.left, n[0])).exit();
|
|
9017
8945
|
};
|
|
9018
|
-
|
|
9019
|
-
var
|
|
8946
|
+
wm.filterName = "texts";
|
|
8947
|
+
var Tm = (e) => {
|
|
9020
8948
|
var t, n, r;
|
|
9021
8949
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
9022
8950
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -9037,21 +8965,21 @@ var Nm = (e) => {
|
|
|
9037
8965
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
9038
8966
|
}
|
|
9039
8967
|
return a.join("\n");
|
|
9040
|
-
},
|
|
8968
|
+
}, Em = function(e) {
|
|
9041
8969
|
if (e.nested) return;
|
|
9042
8970
|
let t = e.delta;
|
|
9043
|
-
if (t[2] !==
|
|
8971
|
+
if (t[2] !== ym) return;
|
|
9044
8972
|
let n = t;
|
|
9045
8973
|
e.setResult([
|
|
9046
|
-
|
|
8974
|
+
Tm(n[0]),
|
|
9047
8975
|
0,
|
|
9048
|
-
|
|
8976
|
+
ym
|
|
9049
8977
|
]).exit();
|
|
9050
8978
|
};
|
|
9051
|
-
|
|
8979
|
+
Em.filterName = "texts";
|
|
9052
8980
|
//#endregion
|
|
9053
8981
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
9054
|
-
var
|
|
8982
|
+
var Dm = function(e) {
|
|
9055
8983
|
if (e.left === e.right) {
|
|
9056
8984
|
e.setResult(void 0).exit();
|
|
9057
8985
|
return;
|
|
@@ -9084,8 +9012,8 @@ var Fm = function(e) {
|
|
|
9084
9012
|
}
|
|
9085
9013
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
9086
9014
|
};
|
|
9087
|
-
|
|
9088
|
-
var
|
|
9015
|
+
Dm.filterName = "trivial";
|
|
9016
|
+
var Om = function(e) {
|
|
9089
9017
|
if (e.delta === void 0) {
|
|
9090
9018
|
e.setResult(e.left).exit();
|
|
9091
9019
|
return;
|
|
@@ -9109,8 +9037,8 @@ var Im = function(e) {
|
|
|
9109
9037
|
}
|
|
9110
9038
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
9111
9039
|
};
|
|
9112
|
-
|
|
9113
|
-
var
|
|
9040
|
+
Om.filterName = "trivial";
|
|
9041
|
+
var km = function(e) {
|
|
9114
9042
|
if (e.delta === void 0) {
|
|
9115
9043
|
e.setResult(e.delta).exit();
|
|
9116
9044
|
return;
|
|
@@ -9131,36 +9059,36 @@ var Lm = function(e) {
|
|
|
9131
9059
|
}
|
|
9132
9060
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
9133
9061
|
};
|
|
9134
|
-
|
|
9062
|
+
km.filterName = "trivial";
|
|
9135
9063
|
//#endregion
|
|
9136
9064
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
9137
|
-
var
|
|
9065
|
+
var Am = class {
|
|
9138
9066
|
constructor(e) {
|
|
9139
|
-
this.processor = new
|
|
9067
|
+
this.processor = new Xp(e), this.processor.pipe(new Yp("diff").append(pm, Dm, dm, Cm, mm, im).shouldHaveResult()), this.processor.pipe(new Yp("patch").append(gm, sm, Om, wm, hm, om).shouldHaveResult()), this.processor.pipe(new Yp("reverse").append(vm, um, km, Em, _m, cm).shouldHaveResult());
|
|
9140
9068
|
}
|
|
9141
9069
|
options(e) {
|
|
9142
9070
|
return this.processor.options(e);
|
|
9143
9071
|
}
|
|
9144
9072
|
diff(e, t) {
|
|
9145
|
-
return this.processor.process(new
|
|
9073
|
+
return this.processor.process(new Kp(e, t));
|
|
9146
9074
|
}
|
|
9147
9075
|
patch(e, t) {
|
|
9148
|
-
return this.processor.process(new
|
|
9076
|
+
return this.processor.process(new qp(e, t));
|
|
9149
9077
|
}
|
|
9150
9078
|
reverse(e) {
|
|
9151
|
-
return this.processor.process(new
|
|
9079
|
+
return this.processor.process(new Jp(e));
|
|
9152
9080
|
}
|
|
9153
9081
|
unpatch(e, t) {
|
|
9154
9082
|
return this.patch(e, this.reverse(t));
|
|
9155
9083
|
}
|
|
9156
9084
|
clone(e) {
|
|
9157
|
-
return
|
|
9085
|
+
return Hp(e);
|
|
9158
9086
|
}
|
|
9159
9087
|
};
|
|
9160
9088
|
//#endregion
|
|
9161
9089
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
9162
|
-
function
|
|
9163
|
-
return new
|
|
9090
|
+
function jm(e) {
|
|
9091
|
+
return new Am(e);
|
|
9164
9092
|
}
|
|
9165
9093
|
//#endregion
|
|
9166
9094
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -9722,46 +9650,46 @@ $.Diff = function(e, t) {
|
|
|
9722
9650
|
};
|
|
9723
9651
|
//#endregion
|
|
9724
9652
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
9725
|
-
var
|
|
9653
|
+
var Mm = (e = {}) => jm({
|
|
9726
9654
|
...e,
|
|
9727
9655
|
textDiff: {
|
|
9728
9656
|
diffMatchPatch: $,
|
|
9729
9657
|
minLength: 120
|
|
9730
9658
|
},
|
|
9731
9659
|
cloneDiffValues: !0
|
|
9732
|
-
}),
|
|
9660
|
+
}), Nm = ["user", "unittemplate"], Pm = Mm(), Fm = (e, t, n) => {
|
|
9733
9661
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
9734
9662
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
9735
9663
|
let n = r[t[e]];
|
|
9736
9664
|
if (n) return n;
|
|
9737
9665
|
}
|
|
9738
9666
|
return n || "";
|
|
9739
|
-
},
|
|
9667
|
+
}, Im = (e) => {
|
|
9740
9668
|
let t = (e) => _r(e) ? kr(e) : String(e);
|
|
9741
9669
|
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);
|
|
9742
|
-
},
|
|
9670
|
+
}, Lm = (e) => {
|
|
9743
9671
|
switch (e.length) {
|
|
9744
9672
|
case 1: {
|
|
9745
9673
|
let [t] = e;
|
|
9746
9674
|
return {
|
|
9747
9675
|
type: "created",
|
|
9748
9676
|
before: "",
|
|
9749
|
-
after:
|
|
9677
|
+
after: Im(t)
|
|
9750
9678
|
};
|
|
9751
9679
|
}
|
|
9752
9680
|
case 2: {
|
|
9753
9681
|
let [t, n] = e;
|
|
9754
9682
|
return {
|
|
9755
9683
|
type: "modified",
|
|
9756
|
-
before:
|
|
9757
|
-
after:
|
|
9684
|
+
before: Im(t),
|
|
9685
|
+
after: Im(n)
|
|
9758
9686
|
};
|
|
9759
9687
|
}
|
|
9760
9688
|
case 3: {
|
|
9761
9689
|
let [t] = e;
|
|
9762
9690
|
return {
|
|
9763
9691
|
type: "deleted",
|
|
9764
|
-
before:
|
|
9692
|
+
before: Im(t),
|
|
9765
9693
|
after: ""
|
|
9766
9694
|
};
|
|
9767
9695
|
}
|
|
@@ -9771,15 +9699,15 @@ var Bm = (e = {}) => zm({
|
|
|
9771
9699
|
after: ""
|
|
9772
9700
|
};
|
|
9773
9701
|
}
|
|
9774
|
-
},
|
|
9775
|
-
let r =
|
|
9702
|
+
}, Rm = (e) => Array.isArray(e), zm = (e, t) => t ? Rm(t) ? t.length === 0 ? e : t.reduce((e, t) => Pm.unpatch(nn(e), nn(t)), nn(e)) : Pm.unpatch(nn(e), nn(t)) : e, Bm = (e) => e.createdAt || e.date, Vm = (e, t, n) => {
|
|
9703
|
+
let r = Bm(e);
|
|
9776
9704
|
if (!r) return {
|
|
9777
9705
|
oldJson: "",
|
|
9778
9706
|
newJson: "",
|
|
9779
9707
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
9780
9708
|
};
|
|
9781
9709
|
let i = t.filter((e) => {
|
|
9782
|
-
let t =
|
|
9710
|
+
let t = Bm(e);
|
|
9783
9711
|
return !!(e.diffs && t && t >= r);
|
|
9784
9712
|
}), a = Array.from({ length: i.length + 1 });
|
|
9785
9713
|
a[0] = nn(n);
|
|
@@ -9792,7 +9720,7 @@ var Bm = (e = {}) => zm({
|
|
|
9792
9720
|
a[e + 1] = a[e];
|
|
9793
9721
|
continue;
|
|
9794
9722
|
}
|
|
9795
|
-
a[e + 1] =
|
|
9723
|
+
a[e + 1] = zm(a[e], t);
|
|
9796
9724
|
}
|
|
9797
9725
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
9798
9726
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -9807,10 +9735,10 @@ var Bm = (e = {}) => zm({
|
|
|
9807
9735
|
oldJson: o,
|
|
9808
9736
|
newJson: s
|
|
9809
9737
|
};
|
|
9810
|
-
},
|
|
9738
|
+
}, Hm = (e, t, n = {}, r = []) => {
|
|
9811
9739
|
var i;
|
|
9812
9740
|
if (!e) return;
|
|
9813
|
-
let a = [...
|
|
9741
|
+
let a = [...Nm, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
9814
9742
|
Object.keys(e).forEach((i) => {
|
|
9815
9743
|
var o;
|
|
9816
9744
|
let s = e[i];
|
|
@@ -9823,12 +9751,12 @@ var Bm = (e = {}) => zm({
|
|
|
9823
9751
|
cn(s) ? t.push({
|
|
9824
9752
|
deltaFormat: [...s],
|
|
9825
9753
|
path: c
|
|
9826
|
-
}) : gn(s) &&
|
|
9754
|
+
}) : gn(s) && Hm(s, t, n, c);
|
|
9827
9755
|
});
|
|
9828
|
-
},
|
|
9756
|
+
}, Um = (e, t = {}) => {
|
|
9829
9757
|
let n = [];
|
|
9830
|
-
return e ? (
|
|
9831
|
-
},
|
|
9758
|
+
return e ? (Hm(e, n, t), n) : [];
|
|
9759
|
+
}, Wm = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), Gm = (e) => {
|
|
9832
9760
|
if (e == null || e === "") return "empty";
|
|
9833
9761
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
9834
9762
|
if (typeof e == "string") return e;
|
|
@@ -9839,35 +9767,35 @@ var Bm = (e = {}) => zm({
|
|
|
9839
9767
|
} catch {
|
|
9840
9768
|
return String(e);
|
|
9841
9769
|
}
|
|
9842
|
-
},
|
|
9770
|
+
}, Km = (e, t = e.length - 1) => {
|
|
9843
9771
|
if (t >= e.length) return "Value";
|
|
9844
9772
|
let n = e[t];
|
|
9845
|
-
return !n || mr(n) ?
|
|
9846
|
-
},
|
|
9847
|
-
let o =
|
|
9773
|
+
return !n || mr(n) ? Km(e, t - 1) : Wm(n);
|
|
9774
|
+
}, qm = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
9775
|
+
let o = Gm(r), s = Gm(i), c = a ? ` in ${a}` : "";
|
|
9848
9776
|
switch (t) {
|
|
9849
9777
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
9850
9778
|
case "created": return `${e} created ${s}${c}.`;
|
|
9851
9779
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
9852
9780
|
default: return `${e} changed ${n}${c}.`;
|
|
9853
9781
|
}
|
|
9854
|
-
},
|
|
9782
|
+
}, Jm = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
|
|
9855
9783
|
let i = {
|
|
9856
9784
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
9857
9785
|
rows: n.map((n) => {
|
|
9858
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
9859
|
-
return { cells: [{ value:
|
|
9786
|
+
let { deltaFormat: i, path: a } = n, o = Fm(e, a, r), { type: s, before: c, after: l } = Lm(i);
|
|
9787
|
+
return { cells: [{ value: qm({
|
|
9860
9788
|
userName: t,
|
|
9861
9789
|
type: s,
|
|
9862
|
-
property:
|
|
9790
|
+
property: Km(a),
|
|
9863
9791
|
before: c,
|
|
9864
9792
|
after: l,
|
|
9865
9793
|
sectionName: o
|
|
9866
9794
|
}) }] };
|
|
9867
9795
|
})
|
|
9868
9796
|
};
|
|
9869
|
-
return /* @__PURE__ */ S(
|
|
9870
|
-
},
|
|
9797
|
+
return /* @__PURE__ */ S(eu, { table: i });
|
|
9798
|
+
}, Ym = Object.freeze({
|
|
9871
9799
|
summary: {
|
|
9872
9800
|
label: "Summary",
|
|
9873
9801
|
value: "summary"
|
|
@@ -9876,13 +9804,13 @@ var Bm = (e = {}) => zm({
|
|
|
9876
9804
|
label: "Compare",
|
|
9877
9805
|
value: "compare"
|
|
9878
9806
|
}
|
|
9879
|
-
}),
|
|
9880
|
-
let c = [
|
|
9807
|
+
}), Xm = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
9808
|
+
let c = [Ym.summary, Ym.compare].map(({ label: e, value: t }) => ({
|
|
9881
9809
|
label: e,
|
|
9882
9810
|
value: t
|
|
9883
9811
|
})), [l, u] = v(c[0]), { diffs: d = void 0 } = e || {};
|
|
9884
9812
|
if (!d) return null;
|
|
9885
|
-
let { oldJson: f, newJson: p, error: m } =
|
|
9813
|
+
let { oldJson: f, newJson: p, error: m } = Vm(e, t, n);
|
|
9886
9814
|
return /* @__PURE__ */ S(Ts, {
|
|
9887
9815
|
visible: r,
|
|
9888
9816
|
centered: !0,
|
|
@@ -9890,20 +9818,20 @@ var Bm = (e = {}) => zm({
|
|
|
9890
9818
|
children: /* @__PURE__ */ S(rs, { dialog: {
|
|
9891
9819
|
scroll: !0,
|
|
9892
9820
|
heading: "Comparison view",
|
|
9893
|
-
content: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(
|
|
9821
|
+
content: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(Jf, {
|
|
9894
9822
|
name: "ViewTab",
|
|
9895
9823
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
9896
9824
|
options: c,
|
|
9897
9825
|
value: l
|
|
9898
|
-
}), l.value === "summary" ? /* @__PURE__ */ S(
|
|
9826
|
+
}), l.value === "summary" ? /* @__PURE__ */ S(Jm, {
|
|
9899
9827
|
userName: e.userName,
|
|
9900
9828
|
sectionNames: a,
|
|
9901
|
-
diffs:
|
|
9829
|
+
diffs: Um(d, i),
|
|
9902
9830
|
defaultSectionName: o
|
|
9903
9831
|
}) : m ? /* @__PURE__ */ S("div", {
|
|
9904
9832
|
style: { padding: 16 },
|
|
9905
9833
|
children: m
|
|
9906
|
-
}) : /* @__PURE__ */ S(
|
|
9834
|
+
}) : /* @__PURE__ */ S(zp, {
|
|
9907
9835
|
oldJson: f,
|
|
9908
9836
|
newJson: p
|
|
9909
9837
|
})] }),
|
|
@@ -9916,7 +9844,7 @@ var Bm = (e = {}) => zm({
|
|
|
9916
9844
|
height: "90vh"
|
|
9917
9845
|
} })
|
|
9918
9846
|
});
|
|
9919
|
-
},
|
|
9847
|
+
}, Zm = [
|
|
9920
9848
|
{
|
|
9921
9849
|
label: "10 / page",
|
|
9922
9850
|
value: 10
|
|
@@ -9929,8 +9857,8 @@ var Bm = (e = {}) => zm({
|
|
|
9929
9857
|
label: "50 / page",
|
|
9930
9858
|
value: 50
|
|
9931
9859
|
}
|
|
9932
|
-
],
|
|
9933
|
-
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s =
|
|
9860
|
+
], Qm = (e, t = {}) => {
|
|
9861
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = Um(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
9934
9862
|
if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
|
|
9935
9863
|
switch (a) {
|
|
9936
9864
|
case "Created": return `Created by ${r}`;
|
|
@@ -9940,7 +9868,7 @@ var Bm = (e = {}) => zm({
|
|
|
9940
9868
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
9941
9869
|
default: return `Change by ${r}`;
|
|
9942
9870
|
}
|
|
9943
|
-
},
|
|
9871
|
+
}, $m = ({ 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 }) => {
|
|
9944
9872
|
let [g, _] = v(!1), [y, b] = v(null), w = (e) => {
|
|
9945
9873
|
if (e.snapshot) {
|
|
9946
9874
|
f == null || f(e.snapshot, e);
|
|
@@ -9959,7 +9887,7 @@ var Bm = (e = {}) => zm({
|
|
|
9959
9887
|
return {
|
|
9960
9888
|
cells: [
|
|
9961
9889
|
{
|
|
9962
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
9890
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : Qm(e, l),
|
|
9963
9891
|
type: "Link",
|
|
9964
9892
|
disabled: n,
|
|
9965
9893
|
onClick: n ? void 0 : () => w(e),
|
|
@@ -9978,8 +9906,8 @@ var Bm = (e = {}) => zm({
|
|
|
9978
9906
|
type: "Static"
|
|
9979
9907
|
},
|
|
9980
9908
|
{
|
|
9981
|
-
value:
|
|
9982
|
-
date:
|
|
9909
|
+
value: Bp({
|
|
9910
|
+
date: Bm(e),
|
|
9983
9911
|
showTime: !0
|
|
9984
9912
|
}),
|
|
9985
9913
|
type: "Static"
|
|
@@ -9989,12 +9917,12 @@ var Bm = (e = {}) => zm({
|
|
|
9989
9917
|
};
|
|
9990
9918
|
});
|
|
9991
9919
|
return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(bo, {
|
|
9992
|
-
heading: /* @__PURE__ */ C(
|
|
9920
|
+
heading: /* @__PURE__ */ C(vd, {
|
|
9993
9921
|
gap: !0,
|
|
9994
9922
|
wrap: !0,
|
|
9995
9923
|
children: [/* @__PURE__ */ S(es, { children: "Changes" }), c.map((e) => {
|
|
9996
9924
|
var t;
|
|
9997
|
-
return /* @__PURE__ */ S(
|
|
9925
|
+
return /* @__PURE__ */ S(Xu, {
|
|
9998
9926
|
small: (t = e.small) == null || t,
|
|
9999
9927
|
checked: e.checked,
|
|
10000
9928
|
onChange: e.onChange,
|
|
@@ -10004,11 +9932,11 @@ var Bm = (e = {}) => zm({
|
|
|
10004
9932
|
})]
|
|
10005
9933
|
}),
|
|
10006
9934
|
padding: !1,
|
|
10007
|
-
children: r ? /* @__PURE__ */ S(
|
|
9935
|
+
children: r ? /* @__PURE__ */ S(Fd, {
|
|
10008
9936
|
height: "100px",
|
|
10009
9937
|
theme: ki.WHITE,
|
|
10010
9938
|
children: /* @__PURE__ */ S(ya, { dark: !0 })
|
|
10011
|
-
}) : /* @__PURE__ */ S(
|
|
9939
|
+
}) : /* @__PURE__ */ S(eu, { table: {
|
|
10012
9940
|
headers: T,
|
|
10013
9941
|
testId: "auditlog-table",
|
|
10014
9942
|
rows: E,
|
|
@@ -10022,14 +9950,14 @@ var Bm = (e = {}) => zm({
|
|
|
10022
9950
|
onChange: (e) => {
|
|
10023
9951
|
u(Number(e.target.value));
|
|
10024
9952
|
},
|
|
10025
|
-
options:
|
|
9953
|
+
options: Zm,
|
|
10026
9954
|
value: a
|
|
10027
9955
|
},
|
|
10028
9956
|
onSelectPage: (e) => d(e),
|
|
10029
9957
|
small: !0
|
|
10030
9958
|
} }
|
|
10031
9959
|
} })
|
|
10032
|
-
}), g && y && y.diffs && /* @__PURE__ */ S(
|
|
9960
|
+
}), g && y && y.diffs && /* @__PURE__ */ S(Xm, {
|
|
10033
9961
|
sectionNames: o,
|
|
10034
9962
|
isOpen: g,
|
|
10035
9963
|
onClose: () => _(!1),
|
|
@@ -10039,7 +9967,7 @@ var Bm = (e = {}) => zm({
|
|
|
10039
9967
|
data: t,
|
|
10040
9968
|
transformDiffsConfig: l
|
|
10041
9969
|
})] });
|
|
10042
|
-
},
|
|
9970
|
+
}, eh = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
10043
9971
|
let i = window.location.href, a = _(i);
|
|
10044
9972
|
return d(() => {
|
|
10045
9973
|
a.current = i;
|
|
@@ -10062,20 +9990,20 @@ var Bm = (e = {}) => zm({
|
|
|
10062
9990
|
});
|
|
10063
9991
|
};
|
|
10064
9992
|
}, [e, t]), null;
|
|
10065
|
-
},
|
|
9993
|
+
}, th = {
|
|
10066
9994
|
errorBoundary: "_errorBoundary_hmco0_1",
|
|
10067
9995
|
sidebarErrorBoundary: "_sidebarErrorBoundary_hmco0_5",
|
|
10068
9996
|
rightSidebarErrorBoundary: "_rightSidebarErrorBoundary_hmco0_6"
|
|
10069
|
-
},
|
|
10070
|
-
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } =
|
|
9997
|
+
}, nh = ({ options: e }) => {
|
|
9998
|
+
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } = Op();
|
|
10071
9999
|
if (t) return /* @__PURE__ */ S(t, {});
|
|
10072
10000
|
if (n || r) return /* @__PURE__ */ S("div", {
|
|
10073
|
-
className: b(n ?
|
|
10001
|
+
className: b(n ? th.sidebarErrorBoundary : "", r ? th.rightSidebarErrorBoundary : ""),
|
|
10074
10002
|
style: a,
|
|
10075
10003
|
children: o == null ? void 0 : o.unexpectedError
|
|
10076
10004
|
});
|
|
10077
10005
|
let s = /* @__PURE__ */ S("div", {
|
|
10078
|
-
className:
|
|
10006
|
+
className: th.errorBoundary,
|
|
10079
10007
|
style: a,
|
|
10080
10008
|
children: /* @__PURE__ */ S(Gs, { message: {
|
|
10081
10009
|
icon: !0,
|
|
@@ -10085,24 +10013,24 @@ var Bm = (e = {}) => zm({
|
|
|
10085
10013
|
width: "100%"
|
|
10086
10014
|
} })
|
|
10087
10015
|
});
|
|
10088
|
-
return i ? /* @__PURE__ */ S(
|
|
10016
|
+
return i ? /* @__PURE__ */ S(Wd, {
|
|
10089
10017
|
scroll: !1,
|
|
10090
10018
|
padding: 0,
|
|
10091
10019
|
children: s
|
|
10092
10020
|
}) : s;
|
|
10093
|
-
},
|
|
10094
|
-
fallback: /* @__PURE__ */ S(
|
|
10021
|
+
}, rh = ({ children: e, options: t }) => /* @__PURE__ */ S(Ci.ErrorBoundary, {
|
|
10022
|
+
fallback: /* @__PURE__ */ S(nh, { options: t }),
|
|
10095
10023
|
onError: (e, t) => {
|
|
10096
10024
|
console.error("Error caught by boundary:", e, t);
|
|
10097
10025
|
},
|
|
10098
10026
|
children: e
|
|
10099
|
-
}),
|
|
10027
|
+
}), ih = (e, t = {}) => (n) => /* @__PURE__ */ S(rh, {
|
|
10100
10028
|
options: t,
|
|
10101
10029
|
children: /* @__PURE__ */ S(e, { ...n })
|
|
10102
|
-
}),
|
|
10103
|
-
|
|
10104
|
-
e ===
|
|
10030
|
+
}), ah = (e = {}) => (t) => ih(t, e), oh = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, sh = (e) => {
|
|
10031
|
+
kp(wp.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
10032
|
+
e === wp.Translations ? kp(e, Ep(t)) : kp(e, oh(t) ? t : { ...t });
|
|
10105
10033
|
});
|
|
10106
10034
|
};
|
|
10107
10035
|
//#endregion
|
|
10108
|
-
export { Ji as Accordion, ga as AccordionWithDefaultToggle, fo as Actions, Ei as Align,
|
|
10036
|
+
export { Ji as Accordion, ga as AccordionWithDefaultToggle, fo as Actions, Ei as Align, $m as AuditLog, no as Badge, go as Breadcrumb, mo as BreadcrumbLinkType, q as Button, vo as ButtonGroup, Di as ButtonPosition, ba as ButtonType, bo as Card, fa as CheckBox, Hi as Chevron, Gi as Collapse, Ti as Color, Vo as ColorInput, Bo as ColorInputPopover, Ko as Column, rs as Dialog, zp as DiffViewer, W as DisabledContext, Zo as Divider, us as Drawer, tp as ElementType, du as Empty, rh as ErrorBoundary, _d as Field, pd as FileButton, bs as FileInput, vd as Flex, bd as FormRow, Eo as Grid, H as GroupOrder, es as Heading, da as HelpIcon, G as Icon, U as IconType, hs as Input, ps as InputGroup, sl as InputGroupAddon, _s as InputReaderMethods, Ai as InputType, hd as Label, Nd as List, Sd as ListHeading, Od as ListSubheading, Fd as Loader, ff as Mention, lo as Menu, Ka as MenuCarat, Ga as MenuType, Gs as Message, zs as MessageType, Ts as Modal, Zs as NativeSelect, bl as NumberInput, Hd as OptionDropdown, Wd as Page, cl as Pagination, sp as PopConfirm, So as Popover, Gd as Portal, qd as PrintHeader, Os as ProgressBar, Jd as RadioButton, df as RichTextInput, mf as Row, tl as Select, Fp as SettingField, yf as SideBar, xf as Skeleton, Al as Slider, Ns as SmartUploadModal, xs as Spacer, ya as Spinner, eu as Table, fd as TableImportExport, Jf as Tabs, Yo as Text, Zf as TextArea, Yf as TextLink, Oi as TextTransform, ki as Theme, ni as Toaster, Xu as Toggle, K as Tooltip, ip as TopBar, dp as Tree, Cp as TreeTable, wi as TriggerType, Vf as UnitInput, Gf as UnitSlider, Np as UnitTable, eh as UsageTracker, qu as dismissToast, Rf as initializeContext, sh as initializeGuiLibrary, vs as readFile, Ku as toast, Qs as useFocus, Ss as useKeyboardEvent, tc as useWindowWidth, ah as withChainableErrorBoundary, ih as withErrorBoundary };
|