@oliasoft-open-source/react-ui-library 6.14.0 → 6.15.0
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/option-dropdown/layer.d.ts +1 -0
- package/dist/components/option-dropdown/layer.d.ts.map +1 -1
- package/dist/components/option-dropdown/option-dropdown.d.ts +1 -0
- package/dist/components/option-dropdown/option-dropdown.d.ts.map +1 -1
- package/dist/components/option-dropdown/option-dropdown.test-case.stories.d.ts +7 -0
- package/dist/components/option-dropdown/option-dropdown.test-case.stories.d.ts.map +1 -0
- package/dist/components/option-dropdown/option.d.ts.map +1 -1
- package/dist/index.js +372 -371
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6110,7 +6110,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6110
6110
|
item: "_item_12x4u_27",
|
|
6111
6111
|
heading: "_heading_12x4u_32"
|
|
6112
6112
|
}, Ku = ({ option: e, onChange: t }) => {
|
|
6113
|
-
let { key: n, label: r, selected: i, testId: a } = e == null ? {} : e;
|
|
6113
|
+
let { key: n, label: r, selected: i, testId: a, disabled: o } = e == null ? {} : e;
|
|
6114
6114
|
return /* @__PURE__ */ y("div", {
|
|
6115
6115
|
className: Gu.item,
|
|
6116
6116
|
children: /* @__PURE__ */ y(Ii, {
|
|
@@ -6118,7 +6118,8 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6118
6118
|
noMargin: !0,
|
|
6119
6119
|
checked: i,
|
|
6120
6120
|
onChange: t,
|
|
6121
|
-
testId: a
|
|
6121
|
+
testId: a,
|
|
6122
|
+
disabled: o
|
|
6122
6123
|
})
|
|
6123
6124
|
}, n);
|
|
6124
6125
|
}, qu = ({ label: e }) => /* @__PURE__ */ y("div", {
|
|
@@ -6126,7 +6127,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6126
6127
|
children: e
|
|
6127
6128
|
}), Ju = /* @__PURE__ */ function(e) {
|
|
6128
6129
|
return e.HEADING = "Heading", e.DIVIDER = "Divider", e.DEFAULT = "Default", e;
|
|
6129
|
-
}({}), Yu = ({ options: e, onChangeOptions: t, showHeader: n, maxHeight: r, testId: i }) => /* @__PURE__ */ b("div", {
|
|
6130
|
+
}({}), Yu = (e) => e.type !== Ju.HEADING && e.type !== Ju.DIVIDER && !e.disabled, Xu = ({ options: e, onChangeOptions: t, showHeader: n, maxHeight: r, testId: i }) => /* @__PURE__ */ b("div", {
|
|
6130
6131
|
className: _("menu", Gu.menu),
|
|
6131
6132
|
style: { maxHeight: r },
|
|
6132
6133
|
"data-testid": i ? `${i}-option-dropdown-layer` : void 0,
|
|
@@ -6135,28 +6136,28 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6135
6136
|
children: [
|
|
6136
6137
|
/* @__PURE__ */ y("a", {
|
|
6137
6138
|
onClick: (n) => {
|
|
6138
|
-
t(n, e.map((e) => ({
|
|
6139
|
+
t(n, e.map((e) => Yu(e) ? {
|
|
6139
6140
|
...e,
|
|
6140
6141
|
selected: !0
|
|
6141
|
-
}))
|
|
6142
|
+
} : e));
|
|
6142
6143
|
},
|
|
6143
6144
|
children: "All"
|
|
6144
6145
|
}),
|
|
6145
6146
|
/* @__PURE__ */ y("a", {
|
|
6146
6147
|
onClick: (n) => {
|
|
6147
|
-
t(n, e.map((e) => ({
|
|
6148
|
+
t(n, e.map((e) => Yu(e) ? {
|
|
6148
6149
|
...e,
|
|
6149
6150
|
selected: !1
|
|
6150
|
-
}))
|
|
6151
|
+
} : e));
|
|
6151
6152
|
},
|
|
6152
6153
|
children: "Clear"
|
|
6153
6154
|
}),
|
|
6154
6155
|
/* @__PURE__ */ y("a", {
|
|
6155
6156
|
onClick: (n) => {
|
|
6156
|
-
t(n, e.map((e) => ({
|
|
6157
|
+
t(n, e.map((e) => Yu(e) ? {
|
|
6157
6158
|
...e,
|
|
6158
6159
|
selected: !(e != null && e.selected)
|
|
6159
|
-
}))
|
|
6160
|
+
} : e));
|
|
6160
6161
|
},
|
|
6161
6162
|
children: "Invert"
|
|
6162
6163
|
})
|
|
@@ -6177,7 +6178,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6177
6178
|
}, r);
|
|
6178
6179
|
}
|
|
6179
6180
|
})]
|
|
6180
|
-
}),
|
|
6181
|
+
}), Zu = ({ name: e, disabled: t, label: n, options: r, onChange: i, small: a = !1, showHeader: o = !0, maxHeight: s = "40vh", testId: c }) => /* @__PURE__ */ y(xa, {
|
|
6181
6182
|
testId: c,
|
|
6182
6183
|
disabled: t,
|
|
6183
6184
|
menu: {
|
|
@@ -6186,7 +6187,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6186
6187
|
label: n,
|
|
6187
6188
|
trigger: qr.DROP_DOWN_BUTTON,
|
|
6188
6189
|
possiblePlacements: ["top-start", "bottom-start"],
|
|
6189
|
-
sections: /* @__PURE__ */ y(
|
|
6190
|
+
sections: /* @__PURE__ */ y(Xu, {
|
|
6190
6191
|
testId: c,
|
|
6191
6192
|
options: r,
|
|
6192
6193
|
onChangeOptions: (t, n) => {
|
|
@@ -6196,13 +6197,13 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6196
6197
|
maxHeight: s
|
|
6197
6198
|
})
|
|
6198
6199
|
}
|
|
6199
|
-
}),
|
|
6200
|
+
}), Qu = {
|
|
6200
6201
|
page: "_page_beskc_1",
|
|
6201
6202
|
scroll: "_scroll_beskc_23"
|
|
6202
|
-
},
|
|
6203
|
+
}, $u = ({ children: e, left: t = "var(--size-sidebar)", padding: n = !0, scroll: r = !0, top: i = "var(--size-topbar)" }) => {
|
|
6203
6204
|
let a = typeof n == "string" ? n : n === !0 ? "var(--padding)" : "0";
|
|
6204
6205
|
return /* @__PURE__ */ y("div", {
|
|
6205
|
-
className: _(
|
|
6206
|
+
className: _(Qu.page, r ? Qu.scroll : ""),
|
|
6206
6207
|
style: {
|
|
6207
6208
|
left: t,
|
|
6208
6209
|
padding: a,
|
|
@@ -6210,17 +6211,17 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6210
6211
|
},
|
|
6211
6212
|
children: e
|
|
6212
6213
|
});
|
|
6213
|
-
},
|
|
6214
|
+
}, ed = ({ id: e, children: t }) => {
|
|
6214
6215
|
let n = document.querySelector(`#${e}`), [r, i] = h(!1);
|
|
6215
6216
|
return d(() => {
|
|
6216
6217
|
r || i(!0);
|
|
6217
6218
|
}, [e]), n ? br(t, n) : null;
|
|
6218
|
-
},
|
|
6219
|
+
}, td = { printHeader: "_printHeader_o7xxx_1" }, nd = ({ logo: e, alt: t, logoWidth: n = "100px" }) => /* @__PURE__ */ y("img", {
|
|
6219
6220
|
src: e,
|
|
6220
6221
|
alt: t,
|
|
6221
|
-
className:
|
|
6222
|
+
className: td.printHeader,
|
|
6222
6223
|
style: { width: n }
|
|
6223
|
-
}),
|
|
6224
|
+
}), rd = ({ name: e, label: t, options: n, value: r, onChange: i, disabled: a = !1, small: o = !1, noMargin: s = !1, onClick: l = () => {}, inline: u = !1, mainLabel: d = "", radioButtonsData: f, classForContainer: p = "grouped fields" }) => {
|
|
6224
6225
|
let m = c(U), h = f !== void 0, { simpleInputs: g, options: v, selectedOptions: x } = h ? {
|
|
6225
6226
|
simpleInputs: !1,
|
|
6226
6227
|
options: f,
|
|
@@ -6251,44 +6252,44 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6251
6252
|
}, n);
|
|
6252
6253
|
})]
|
|
6253
6254
|
});
|
|
6254
|
-
},
|
|
6255
|
+
}, id = {
|
|
6255
6256
|
richTextToolbar: "_richTextToolbar_1gbkk_1",
|
|
6256
6257
|
richTextToolbarContainer: "_richTextToolbarContainer_1gbkk_5"
|
|
6257
|
-
},
|
|
6258
|
+
}, ad = /* @__PURE__ */ function(e) {
|
|
6258
6259
|
return e.BOLD = "bold", e.ITALIC = "italic", e.CODE = "code", e.UL = "ul", e.OL = "ol", e;
|
|
6259
|
-
}({}),
|
|
6260
|
+
}({}), od = ({ editor: e, disabled: t = !1, toolbarComponent: n = null }) => {
|
|
6260
6261
|
var r, i, a, o, s;
|
|
6261
6262
|
let c = [
|
|
6262
6263
|
{
|
|
6263
|
-
icon:
|
|
6264
|
+
icon: ad.BOLD,
|
|
6264
6265
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBold().run(),
|
|
6265
6266
|
active: (r = e == null ? void 0 : e.isActive("bold")) == null ? !1 : r
|
|
6266
6267
|
},
|
|
6267
6268
|
{
|
|
6268
|
-
icon:
|
|
6269
|
+
icon: ad.ITALIC,
|
|
6269
6270
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleItalic().run(),
|
|
6270
6271
|
active: (i = e == null ? void 0 : e.isActive("italic")) == null ? !1 : i
|
|
6271
6272
|
},
|
|
6272
6273
|
{
|
|
6273
|
-
icon:
|
|
6274
|
+
icon: ad.CODE,
|
|
6274
6275
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleCode().run(),
|
|
6275
6276
|
active: (a = e == null ? void 0 : e.isActive("code")) == null ? !1 : a
|
|
6276
6277
|
},
|
|
6277
6278
|
{
|
|
6278
|
-
icon:
|
|
6279
|
+
icon: ad.UL,
|
|
6279
6280
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleBulletList().run(),
|
|
6280
6281
|
active: (o = e == null ? void 0 : e.isActive("bulletList")) == null ? !1 : o
|
|
6281
6282
|
},
|
|
6282
6283
|
{
|
|
6283
|
-
icon:
|
|
6284
|
+
icon: ad.OL,
|
|
6284
6285
|
onClick: () => e == null ? void 0 : e.chain().focus().toggleOrderedList().run(),
|
|
6285
6286
|
active: (s = e == null ? void 0 : e.isActive("orderedList")) == null ? !1 : s
|
|
6286
6287
|
}
|
|
6287
6288
|
];
|
|
6288
6289
|
return /* @__PURE__ */ b("div", {
|
|
6289
|
-
className:
|
|
6290
|
+
className: id.richTextToolbarContainer,
|
|
6290
6291
|
children: [/* @__PURE__ */ y("div", {
|
|
6291
|
-
className:
|
|
6292
|
+
className: id.richTextToolbar,
|
|
6292
6293
|
children: c.map((e, n) => /* @__PURE__ */ y(K, {
|
|
6293
6294
|
small: !0,
|
|
6294
6295
|
round: !0,
|
|
@@ -6301,7 +6302,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6301
6302
|
}, n))
|
|
6302
6303
|
}), n]
|
|
6303
6304
|
});
|
|
6304
|
-
},
|
|
6305
|
+
}, sd = {
|
|
6305
6306
|
inputInTable: "_inputInTable_gb097_1",
|
|
6306
6307
|
inputHover: "_inputHover_gb097_13",
|
|
6307
6308
|
inputFocus: "_inputFocus_gb097_18",
|
|
@@ -6310,7 +6311,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6310
6311
|
inputDisabled: "_inputDisabled_gb097_61",
|
|
6311
6312
|
hideScrollbars: "_hideScrollbars_gb097_67",
|
|
6312
6313
|
richTextInput: "_richTextInput_gb097_77"
|
|
6313
|
-
},
|
|
6314
|
+
}, cd = o(i(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i }, a) => {
|
|
6314
6315
|
let o = c(U), s = r || o, d = Mr({
|
|
6315
6316
|
extensions: [
|
|
6316
6317
|
Nr,
|
|
@@ -6337,17 +6338,17 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6337
6338
|
clearContent: () => d == null ? void 0 : d.commands.clearContent(!1),
|
|
6338
6339
|
editor: d
|
|
6339
6340
|
}), [d]), /* @__PURE__ */ b("div", {
|
|
6340
|
-
className:
|
|
6341
|
-
children: [/* @__PURE__ */ y(
|
|
6341
|
+
className: sd.richTextInput,
|
|
6342
|
+
children: [/* @__PURE__ */ y(od, {
|
|
6342
6343
|
editor: d,
|
|
6343
6344
|
disabled: s,
|
|
6344
6345
|
toolbarComponent: i
|
|
6345
6346
|
}), /* @__PURE__ */ y(jr, { editor: d })]
|
|
6346
6347
|
});
|
|
6347
|
-
})),
|
|
6348
|
+
})), ld = { row: "_row_n16je_1" }, ud = ({ alignItems: t = "initial", justifyContent: n = "initial", children: r = null, flex: i = !1, height: o = "auto", marginBottom: s = "0", marginTop: c = "0", spacing: l = "var(--padding)", wrap: u = !1, testId: d = null }) => {
|
|
6348
6349
|
let f = typeof l == "number" ? `${l}px` : l, p = (r === null || r === !1 ? [] : Array.isArray(r) ? r.filter((e) => a(e)) : [r]).map((t, n) => /* @__PURE__ */ y(e.Fragment, { children: e.cloneElement(t, { spacing: f }) }, n));
|
|
6349
6350
|
return /* @__PURE__ */ y("div", {
|
|
6350
|
-
className: _(
|
|
6351
|
+
className: _(ld.row),
|
|
6351
6352
|
style: {
|
|
6352
6353
|
alignItems: t,
|
|
6353
6354
|
justifyContent: n,
|
|
@@ -6363,7 +6364,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6363
6364
|
"data-testid": d,
|
|
6364
6365
|
children: p
|
|
6365
6366
|
});
|
|
6366
|
-
},
|
|
6367
|
+
}, dd = {
|
|
6367
6368
|
inputInTable: "_inputInTable_1oy1z_1",
|
|
6368
6369
|
inputHover: "_inputHover_1oy1z_13",
|
|
6369
6370
|
inputFocus: "_inputFocus_1oy1z_18",
|
|
@@ -6382,7 +6383,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6382
6383
|
experimental: "_experimental_1oy1z_155",
|
|
6383
6384
|
active: "_active_1oy1z_159",
|
|
6384
6385
|
icon: "_icon_1oy1z_163"
|
|
6385
|
-
},
|
|
6386
|
+
}, fd = o(({ isOpen: e, label: t, icon: n, invalid: r }) => /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(G, {
|
|
6386
6387
|
text: t,
|
|
6387
6388
|
enabled: !e,
|
|
6388
6389
|
placement: "right-center",
|
|
@@ -6391,7 +6392,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6391
6392
|
padding: "var(--padding-sm)",
|
|
6392
6393
|
display: "block",
|
|
6393
6394
|
children: /* @__PURE__ */ y("span", {
|
|
6394
|
-
className:
|
|
6395
|
+
className: dd.icon,
|
|
6395
6396
|
children: /* @__PURE__ */ y(la, {
|
|
6396
6397
|
small: !0,
|
|
6397
6398
|
title: r ? "!" : void 0,
|
|
@@ -6400,18 +6401,18 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6400
6401
|
})
|
|
6401
6402
|
})
|
|
6402
6403
|
}), /* @__PURE__ */ y("span", {
|
|
6403
|
-
className:
|
|
6404
|
+
className: dd.label,
|
|
6404
6405
|
children: t
|
|
6405
|
-
})] }), (e, t) => yr(e, t)),
|
|
6406
|
-
className:
|
|
6406
|
+
})] }), (e, t) => yr(e, t)), pd = ({ isOpen: e, items: t, sectionIndex: n, onClick: r, testId: i }) => /* @__PURE__ */ y("div", {
|
|
6407
|
+
className: dd.list,
|
|
6407
6408
|
children: t.map((t, a) => {
|
|
6408
6409
|
let o = `${n}_${a}`;
|
|
6409
6410
|
return /* @__PURE__ */ y("a", {
|
|
6410
6411
|
href: t.value,
|
|
6411
|
-
className: _(
|
|
6412
|
+
className: _(dd.item, t.isActive ? dd.active : "", t.isExperimental ? dd.experimental : ""),
|
|
6412
6413
|
onClick: (e) => r(e, t.value, t.label, t.onClick),
|
|
6413
6414
|
"data-testid": i,
|
|
6414
|
-
children: /* @__PURE__ */ y(
|
|
6415
|
+
children: /* @__PURE__ */ y(fd, {
|
|
6415
6416
|
label: t.label,
|
|
6416
6417
|
icon: t.icon,
|
|
6417
6418
|
invalid: t.invalid,
|
|
@@ -6419,16 +6420,16 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6419
6420
|
}, o)
|
|
6420
6421
|
}, o);
|
|
6421
6422
|
})
|
|
6422
|
-
}),
|
|
6423
|
-
className:
|
|
6423
|
+
}), md = ({ isOpen: t, sections: n, onClick: r }) => /* @__PURE__ */ y(v, { children: n.map((n, i) => /* @__PURE__ */ b(e.Fragment, { children: [/* @__PURE__ */ y("h5", {
|
|
6424
|
+
className: dd.subtitle,
|
|
6424
6425
|
children: n.heading.toUpperCase()
|
|
6425
|
-
}), /* @__PURE__ */ y(
|
|
6426
|
+
}), /* @__PURE__ */ y(pd, {
|
|
6426
6427
|
isOpen: t,
|
|
6427
6428
|
items: n.items,
|
|
6428
6429
|
sectionIndex: i,
|
|
6429
6430
|
onClick: r,
|
|
6430
6431
|
testId: n.testId
|
|
6431
|
-
})] }, i)) }),
|
|
6432
|
+
})] }, i)) }), hd = o(({ options: e, startOpen: t = !1, onShiftClickToggleOpen: n = () => {}, top: r }) => {
|
|
6432
6433
|
let [i, a] = h(t), o = (e, t, n, r) => {
|
|
6433
6434
|
e.preventDefault(), typeof r == "function" && (e.currentTarget.value = t, e.currentTarget.label = n, r(e)), a(!1);
|
|
6434
6435
|
}, s = e.sections.length > 0;
|
|
@@ -6449,13 +6450,13 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6449
6450
|
icon: H.LEFT
|
|
6450
6451
|
}),
|
|
6451
6452
|
children: /* @__PURE__ */ y("div", {
|
|
6452
|
-
className: _(
|
|
6453
|
+
className: _(dd.sidebar, i ? "" : dd.collapsed),
|
|
6453
6454
|
children: s && /* @__PURE__ */ b("div", {
|
|
6454
|
-
className:
|
|
6455
|
+
className: dd.inner,
|
|
6455
6456
|
children: [/* @__PURE__ */ y("h4", {
|
|
6456
|
-
className:
|
|
6457
|
+
className: dd.title,
|
|
6457
6458
|
children: e.title
|
|
6458
|
-
}), /* @__PURE__ */ y(
|
|
6459
|
+
}), /* @__PURE__ */ y(md, {
|
|
6459
6460
|
isOpen: i,
|
|
6460
6461
|
sections: e.sections,
|
|
6461
6462
|
onClick: o
|
|
@@ -6463,18 +6464,18 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6463
6464
|
})
|
|
6464
6465
|
})
|
|
6465
6466
|
});
|
|
6466
|
-
}, (e, t) => yr(e, t)),
|
|
6467
|
+
}, (e, t) => yr(e, t)), gd = {
|
|
6467
6468
|
skeletonContainer: "_skeletonContainer_mcfxp_9",
|
|
6468
6469
|
skeleton: "_skeleton_mcfxp_9"
|
|
6469
|
-
},
|
|
6470
|
+
}, _d = ({ count: e, width: t, height: n }) => /* @__PURE__ */ y(Ir, {
|
|
6470
6471
|
baseColor: "var(--color-skeleton-base)",
|
|
6471
6472
|
highlightColor: "var(--color-skeleton-highlight)",
|
|
6472
|
-
containerClassName:
|
|
6473
|
-
className:
|
|
6473
|
+
containerClassName: gd.skeletonContainer,
|
|
6474
|
+
className: gd.skeleton,
|
|
6474
6475
|
count: e,
|
|
6475
6476
|
width: t,
|
|
6476
6477
|
height: n
|
|
6477
|
-
}),
|
|
6478
|
+
}), vd = {
|
|
6478
6479
|
wrapper: "_wrapper_j8x9r_1",
|
|
6479
6480
|
label: "_label_j8x9r_5",
|
|
6480
6481
|
input: "_input_j8x9r_9",
|
|
@@ -6482,38 +6483,38 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6482
6483
|
editable: "_editable_j8x9r_22",
|
|
6483
6484
|
inputControl: "_inputControl_j8x9r_25",
|
|
6484
6485
|
actions: "_actions_j8x9r_28"
|
|
6485
|
-
},
|
|
6486
|
+
}, yd = () => {
|
|
6486
6487
|
let e = m(null);
|
|
6487
6488
|
return d(() => {
|
|
6488
6489
|
e.current && (e.current(), e.current = null);
|
|
6489
6490
|
}), (t) => {
|
|
6490
6491
|
e.current = t;
|
|
6491
6492
|
};
|
|
6492
|
-
},
|
|
6493
|
+
}, bd = (e) => {
|
|
6493
6494
|
let t = m(void 0);
|
|
6494
6495
|
return l(() => {
|
|
6495
6496
|
t.current = e;
|
|
6496
6497
|
}, [e]), t.current;
|
|
6497
|
-
},
|
|
6498
|
+
}, xd = (e, t) => {
|
|
6498
6499
|
let n = t == null ? void 0 : t[e];
|
|
6499
6500
|
if (!n) {
|
|
6500
6501
|
var r;
|
|
6501
6502
|
return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = cr(e)) == null ? "" : r;
|
|
6502
6503
|
}
|
|
6503
6504
|
return n;
|
|
6504
|
-
},
|
|
6505
|
+
}, Sd = /* @__PURE__ */ function(e) {
|
|
6505
6506
|
return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
|
|
6506
|
-
}({}),
|
|
6507
|
+
}({}), Cd = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), wd = (e) => {
|
|
6507
6508
|
if (!e) return !1;
|
|
6508
6509
|
let t = Kn(e);
|
|
6509
6510
|
return !Bn.includes(t);
|
|
6510
|
-
},
|
|
6511
|
+
}, Td = ({ value: e, unitkey: t, toUnit: n }) => {
|
|
6511
6512
|
var r;
|
|
6512
6513
|
let i = zn[t];
|
|
6513
6514
|
if (!i || i.length === 0 || !((r = lr(e)) != null && r.valid) || !i.includes(n)) return !1;
|
|
6514
6515
|
let a = Kn(String(e));
|
|
6515
6516
|
return !(a && !i.includes(a));
|
|
6516
|
-
},
|
|
6517
|
+
}, Ed = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
|
|
6517
6518
|
var o;
|
|
6518
6519
|
let s = Qn(e) ? Jn(e) : e, c = [Infinity, -Infinity].includes(Number(s));
|
|
6519
6520
|
if (i || c) return {
|
|
@@ -6533,13 +6534,13 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6533
6534
|
value: void 0,
|
|
6534
6535
|
error: "Source unit is missing"
|
|
6535
6536
|
};
|
|
6536
|
-
if (
|
|
6537
|
+
if (Cd(s)) return {
|
|
6537
6538
|
value: void 0,
|
|
6538
6539
|
error: "Value is invalid for conversion"
|
|
6539
6540
|
};
|
|
6540
6541
|
try {
|
|
6541
6542
|
let e = dr(s, l);
|
|
6542
|
-
return
|
|
6543
|
+
return Td({
|
|
6543
6544
|
value: e,
|
|
6544
6545
|
toUnit: n,
|
|
6545
6546
|
unitkey: t
|
|
@@ -6556,13 +6557,13 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6556
6557
|
error: "Conversion not possible"
|
|
6557
6558
|
};
|
|
6558
6559
|
}
|
|
6559
|
-
},
|
|
6560
|
-
let a = Jn(e), o =
|
|
6561
|
-
return !
|
|
6560
|
+
}, Dd = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
|
|
6561
|
+
let a = Jn(e), o = Cd(a);
|
|
6562
|
+
return !Td({
|
|
6562
6563
|
value: e,
|
|
6563
6564
|
unitkey: n,
|
|
6564
6565
|
toUnit: t
|
|
6565
|
-
}) ||
|
|
6566
|
+
}) || wd(e) || o ? { value: a } : Qn(e) ? Ed({
|
|
6566
6567
|
value: e,
|
|
6567
6568
|
unitkey: n,
|
|
6568
6569
|
toUnit: t,
|
|
@@ -6570,25 +6571,25 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6570
6571
|
doNotConvertValue: i,
|
|
6571
6572
|
exactPrecision: !0
|
|
6572
6573
|
}) : { value: e };
|
|
6573
|
-
},
|
|
6574
|
+
}, Od = (e) => un(e) && !nn(e) && !sn(e) ? tn(e, "fieldName", "") : typeof e == "string" ? e : "", kd = (e = "") => Bn == null ? void 0 : Bn.includes(e), Ad = (e, t) => {
|
|
6574
6575
|
let n = Kn(e || "");
|
|
6575
|
-
return
|
|
6576
|
-
},
|
|
6577
|
-
|
|
6578
|
-
},
|
|
6576
|
+
return kd(t) && kd(n);
|
|
6577
|
+
}, jd = n(null), Md = () => c(jd), Nd = !1, Pd = (e) => {
|
|
6578
|
+
Nd || (Nd = !0, jd = e);
|
|
6579
|
+
}, Fd = (e) => Xn(e) ? e : er(e), Id = {
|
|
6579
6580
|
predefinedMenuActive: "_predefinedMenuActive_ye9w9_1",
|
|
6580
6581
|
inputWrapper: "_inputWrapper_ye9w9_4"
|
|
6581
|
-
},
|
|
6582
|
+
}, Ld = ({ 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: u = "", initUnit: d, noConversion: p = !1, onChange: m = mn, onClick: g = mn, onFocus: x = mn, onSwitchUnit: S = mn, unitTemplate: C, testId: w, warning: T = null, predefinedOptions: E, initialPredefinedOption: D = !1, shouldLinkAutomaticly: O = !0, selectedPredefinedOptionKey: k, validationCallback: A = () => ({
|
|
6582
6583
|
name: "",
|
|
6583
6584
|
error: null
|
|
6584
6585
|
}), 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 }) => {
|
|
6585
|
-
let ee =
|
|
6586
|
+
let ee = Md(), te = yd();
|
|
6586
6587
|
typeof c == "number" && (c = `${c}`);
|
|
6587
|
-
let [ne = "", re = ""] = c === void 0 ? [] : ir(c), B = f(() =>
|
|
6588
|
+
let [ne = "", re = ""] = c === void 0 ? [] : ir(c), B = f(() => xd(u, C || (ee == null ? void 0 : ee.unitTemplate)), [
|
|
6588
6589
|
u,
|
|
6589
6590
|
C,
|
|
6590
6591
|
ee == null ? void 0 : ee.unitTemplate
|
|
6591
|
-
]), ie =
|
|
6592
|
+
]), ie = Ad(c, B), ae = d || B || re, oe = bd(ae), { value: se } = Dd({
|
|
6592
6593
|
value: c,
|
|
6593
6594
|
toUnit: ae,
|
|
6594
6595
|
unitkey: u,
|
|
@@ -6600,10 +6601,10 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6600
6601
|
} : {
|
|
6601
6602
|
value: se,
|
|
6602
6603
|
unit: ae
|
|
6603
|
-
}), ue = M || (ce == null ? void 0 : ce.value) === void 0, [de, fe] = h(D ?
|
|
6604
|
+
}), ue = M || (ce == null ? void 0 : ce.value) === void 0, [de, fe] = h(D ? Sd.PREDEFINED : Sd.CUSTOM), pe = !!(j || n), me = E && E.find((e) => {
|
|
6604
6605
|
if (!(e != null && e.value)) return;
|
|
6605
6606
|
if (k) return k === e.valueKey;
|
|
6606
|
-
let t = Qn(e.value) ? Kn(e.value) : "", { value: n = c } =
|
|
6607
|
+
let t = Qn(e.value) ? Kn(e.value) : "", { value: n = c } = Ed({
|
|
6607
6608
|
value: String(c),
|
|
6608
6609
|
unitkey: u,
|
|
6609
6610
|
toUnit: t
|
|
@@ -6612,7 +6613,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6612
6613
|
}), he = () => {
|
|
6613
6614
|
var e;
|
|
6614
6615
|
let t = (e = c) == null ? "" : e, n = ce.unit;
|
|
6615
|
-
if (!
|
|
6616
|
+
if (!Td({
|
|
6616
6617
|
value: t,
|
|
6617
6618
|
unitkey: u,
|
|
6618
6619
|
toUnit: n
|
|
@@ -6626,7 +6627,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6626
6627
|
return null;
|
|
6627
6628
|
}
|
|
6628
6629
|
}, ge = (t) => {
|
|
6629
|
-
let n =
|
|
6630
|
+
let n = Od(e), r = t.target, { value: i, selectionStart: a } = r, o = dr(i, (ce == null ? void 0 : ce.unit) || "");
|
|
6630
6631
|
m({ target: {
|
|
6631
6632
|
value: N ? dr(Un(o, re), re) : o,
|
|
6632
6633
|
name: n
|
|
@@ -6648,7 +6649,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6648
6649
|
if (ae) {
|
|
6649
6650
|
let e, t = "";
|
|
6650
6651
|
if (oe !== ae) {
|
|
6651
|
-
let { value: n } =
|
|
6652
|
+
let { value: n } = Dd({
|
|
6652
6653
|
value: c,
|
|
6653
6654
|
toUnit: ae,
|
|
6654
6655
|
unitkey: u,
|
|
@@ -6657,7 +6658,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6657
6658
|
});
|
|
6658
6659
|
e = n, t = ae;
|
|
6659
6660
|
} else if (dr(ce.value, ce.unit) !== c) {
|
|
6660
|
-
let { value: n } =
|
|
6661
|
+
let { value: n } = Dd({
|
|
6661
6662
|
value: c,
|
|
6662
6663
|
toUnit: ce.unit,
|
|
6663
6664
|
unitkey: u,
|
|
@@ -6669,7 +6670,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6669
6670
|
e !== void 0 && le({
|
|
6670
6671
|
value: e,
|
|
6671
6672
|
unit: t
|
|
6672
|
-
}), fe(E && me && O ?
|
|
6673
|
+
}), fe(E && me && O ? Sd.PREDEFINED : Sd.CUSTOM);
|
|
6673
6674
|
}
|
|
6674
6675
|
}, [
|
|
6675
6676
|
ae,
|
|
@@ -6677,14 +6678,14 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6677
6678
|
i,
|
|
6678
6679
|
O
|
|
6679
6680
|
]);
|
|
6680
|
-
let ve = he(), ye = $n(ce.unit) || ce.unit || "", be = p || !ve || ve && ve.length === 1, xe =
|
|
6681
|
+
let ve = he(), ye = $n(ce.unit) || ce.unit || "", be = p || !ve || ve && ve.length === 1, xe = Od(e), Se, Ce = (t) => {
|
|
6681
6682
|
let r = t != null && t.value ? t.value : "", [i = "", a = ""] = Qn(r) ? ir(r) : [r], o = ur(r);
|
|
6682
|
-
if (
|
|
6683
|
+
if (Td({
|
|
6683
6684
|
value: r,
|
|
6684
6685
|
unitkey: u,
|
|
6685
6686
|
toUnit: a
|
|
6686
6687
|
})) {
|
|
6687
|
-
let { value: e = "" } =
|
|
6688
|
+
let { value: e = "" } = Dd({
|
|
6688
6689
|
value: r,
|
|
6689
6690
|
toUnit: B,
|
|
6690
6691
|
unitkey: u,
|
|
@@ -6697,7 +6698,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6697
6698
|
type: Xi.OPTION,
|
|
6698
6699
|
inline: !0,
|
|
6699
6700
|
onClick: () => {
|
|
6700
|
-
lr(i).valid && !n && (fe(
|
|
6701
|
+
lr(i).valid && !n && (fe(Sd.PREDEFINED), m({ target: {
|
|
6701
6702
|
value: r,
|
|
6702
6703
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || "",
|
|
6703
6704
|
predefinedSelected: !0,
|
|
@@ -6709,27 +6710,27 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6709
6710
|
height: "0"
|
|
6710
6711
|
})] }),
|
|
6711
6712
|
description: o,
|
|
6712
|
-
selected: me === t && de ===
|
|
6713
|
+
selected: me === t && de === Sd.PREDEFINED
|
|
6713
6714
|
};
|
|
6714
6715
|
};
|
|
6715
6716
|
if (Se = [{
|
|
6716
6717
|
type: Xi.OPTION,
|
|
6717
6718
|
inline: !0,
|
|
6718
6719
|
onClick: () => {
|
|
6719
|
-
de !==
|
|
6720
|
+
de !== Sd.CUSTOM && !n && m({ target: {
|
|
6720
6721
|
value: dr(ce.value, ce.unit),
|
|
6721
6722
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || ""
|
|
6722
6723
|
} });
|
|
6723
6724
|
},
|
|
6724
6725
|
label: "Custom",
|
|
6725
|
-
selected: de ===
|
|
6726
|
+
selected: de === Sd.CUSTOM
|
|
6726
6727
|
}], E != null && E.length) {
|
|
6727
6728
|
let e = E.map(Ce);
|
|
6728
6729
|
Se = [...Se, ...e];
|
|
6729
6730
|
}
|
|
6730
6731
|
let we = (e) => {
|
|
6731
6732
|
if (Qn(e)) {
|
|
6732
|
-
let t = Kn(e), { value: n } =
|
|
6733
|
+
let t = Kn(e), { value: n } = Dd({
|
|
6733
6734
|
value: e,
|
|
6734
6735
|
toUnit: ce.unit,
|
|
6735
6736
|
unitkey: u,
|
|
@@ -6741,7 +6742,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6741
6742
|
return e;
|
|
6742
6743
|
}, Te = !E && (!R || R === V.FIRST) ? V.FIRST : V.MIDDLE, Ee = !R || R === V.LAST ? V.LAST : V.MIDDLE;
|
|
6743
6744
|
return /* @__PURE__ */ y("div", {
|
|
6744
|
-
className: de ===
|
|
6745
|
+
className: de === Sd.PREDEFINED ? _(Id.predefinedMenuActive) : "",
|
|
6745
6746
|
children: /* @__PURE__ */ b(Do, {
|
|
6746
6747
|
small: o,
|
|
6747
6748
|
width: s,
|
|
@@ -6756,17 +6757,17 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6756
6757
|
trigger: "Component",
|
|
6757
6758
|
component: /* @__PURE__ */ y(K, {
|
|
6758
6759
|
groupOrder: "first",
|
|
6759
|
-
active: de ===
|
|
6760
|
-
icon: de ===
|
|
6760
|
+
active: de === Sd.PREDEFINED,
|
|
6761
|
+
icon: de === Sd.PREDEFINED ? "link" : "unlink",
|
|
6761
6762
|
small: o
|
|
6762
6763
|
}),
|
|
6763
6764
|
small: o,
|
|
6764
6765
|
sections: Se
|
|
6765
6766
|
},
|
|
6766
|
-
tooltip: de ===
|
|
6767
|
+
tooltip: de === Sd.PREDEFINED ? me == null ? void 0 : me.label : ""
|
|
6767
6768
|
}),
|
|
6768
6769
|
/* @__PURE__ */ y("div", {
|
|
6769
|
-
className:
|
|
6770
|
+
className: Id.inputWrapper,
|
|
6770
6771
|
children: /* @__PURE__ */ y(Lc, {
|
|
6771
6772
|
name: xe,
|
|
6772
6773
|
testId: w,
|
|
@@ -6808,7 +6809,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6808
6809
|
let r = n || t || "", i = Zn(e) ? e : "";
|
|
6809
6810
|
return {
|
|
6810
6811
|
type: "Option",
|
|
6811
|
-
label: P ?
|
|
6812
|
+
label: P ? Fd(i) : i,
|
|
6812
6813
|
inline: !0,
|
|
6813
6814
|
onClick: (n) => {
|
|
6814
6815
|
n.stopPropagation(), _e(e, t);
|
|
@@ -6823,10 +6824,10 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6823
6824
|
]
|
|
6824
6825
|
})
|
|
6825
6826
|
});
|
|
6826
|
-
},
|
|
6827
|
+
}, Rd = (e, t) => ({ target: {
|
|
6827
6828
|
name: e,
|
|
6828
6829
|
value: t
|
|
6829
|
-
} }),
|
|
6830
|
+
} }), zd = (e) => `Value cannot be less than ${e}`, Bd = (e) => `Value cannot be greater than ${e}`, Vd = ({ name: e = "", value: t, min: n, max: r, label: i, step: a = .01, onChange: o, onChangeComplete: s, preferredUnit: c = "m", enableEditUnitInput: u = !1, disabled: d = !1, showUnitInput: f = !0, showArrows: p = !0, unitkey: m = "length", testId: g, noConversion: v = !1, small: x = !1, marks: S, minErrorMessage: C = zd, maxErrorMessage: w = Bd }) => {
|
|
6830
6831
|
let T = dr(t, c), [E, D] = h(T), [O, k] = h(!1);
|
|
6831
6832
|
l(() => {
|
|
6832
6833
|
O || D(T);
|
|
@@ -6842,11 +6843,11 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6842
6843
|
}, I = () => {
|
|
6843
6844
|
D(T), k(!1);
|
|
6844
6845
|
}, L = () => {
|
|
6845
|
-
P || N === null || (o(
|
|
6846
|
+
P || N === null || (o(Rd(e, N)), s == null || s(Rd(e, N)), k(!1));
|
|
6846
6847
|
}, R = (e) => {
|
|
6847
6848
|
e.key === "Enter" && L(), e.key === "Escape" && I();
|
|
6848
6849
|
}, z = d || O, ee = /* @__PURE__ */ b("div", {
|
|
6849
|
-
className:
|
|
6850
|
+
className: vd.actions,
|
|
6850
6851
|
children: [/* @__PURE__ */ y(K, {
|
|
6851
6852
|
icon: "close",
|
|
6852
6853
|
small: !0,
|
|
@@ -6861,18 +6862,18 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6861
6862
|
})]
|
|
6862
6863
|
});
|
|
6863
6864
|
return /* @__PURE__ */ b("div", {
|
|
6864
|
-
className:
|
|
6865
|
+
className: vd.wrapper,
|
|
6865
6866
|
"data-testid": g && `${g}-wrapper`,
|
|
6866
6867
|
children: [
|
|
6867
6868
|
i && /* @__PURE__ */ y("span", {
|
|
6868
|
-
className:
|
|
6869
|
+
className: vd.label,
|
|
6869
6870
|
children: /* @__PURE__ */ y(so, {
|
|
6870
6871
|
small: x,
|
|
6871
6872
|
children: i
|
|
6872
6873
|
})
|
|
6873
6874
|
}),
|
|
6874
6875
|
f && /* @__PURE__ */ y("div", {
|
|
6875
|
-
className: _(
|
|
6876
|
+
className: _(vd.input, x && vd.inputSmall, u && !d && vd.editable),
|
|
6876
6877
|
children: /* @__PURE__ */ y(Pa, {
|
|
6877
6878
|
content: ee,
|
|
6878
6879
|
isOpen: O,
|
|
@@ -6884,11 +6885,11 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6884
6885
|
testId: g && `${g}-edit-popover`,
|
|
6885
6886
|
toggleOnTriggerClick: !1,
|
|
6886
6887
|
children: /* @__PURE__ */ y("div", {
|
|
6887
|
-
className:
|
|
6888
|
+
className: vd.inputControl,
|
|
6888
6889
|
"data-testid": g && `${g}-edit-trigger`,
|
|
6889
6890
|
onClick: F,
|
|
6890
6891
|
onKeyDown: R,
|
|
6891
|
-
children: /* @__PURE__ */ y(
|
|
6892
|
+
children: /* @__PURE__ */ y(Ld, {
|
|
6892
6893
|
name: e,
|
|
6893
6894
|
value: O ? E : T,
|
|
6894
6895
|
unitkey: m,
|
|
@@ -6922,7 +6923,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6922
6923
|
})
|
|
6923
6924
|
]
|
|
6924
6925
|
});
|
|
6925
|
-
},
|
|
6926
|
+
}, Hd = ({ label: e, invalid: t, badge: n }) => t ? /* @__PURE__ */ y(la, {
|
|
6926
6927
|
small: !0,
|
|
6927
6928
|
margin: "-4px",
|
|
6928
6929
|
color: "var(--color-text-error)",
|
|
@@ -6933,7 +6934,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6933
6934
|
margin: "-4px",
|
|
6934
6935
|
title: n == null ? void 0 : n.toString(),
|
|
6935
6936
|
children: e
|
|
6936
|
-
}) : /* @__PURE__ */ y(v, { children: e }),
|
|
6937
|
+
}) : /* @__PURE__ */ y(v, { children: e }), Ud = {
|
|
6937
6938
|
tabs: "_tabs_1rtn8_1",
|
|
6938
6939
|
padding: "_padding_1rtn8_7",
|
|
6939
6940
|
margin: "_margin_1rtn8_11",
|
|
@@ -6942,7 +6943,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6942
6943
|
left: "_left_1rtn8_64",
|
|
6943
6944
|
right: "_right_1rtn8_64",
|
|
6944
6945
|
selectionIndicator: "_selectionIndicator_1rtn8_67"
|
|
6945
|
-
},
|
|
6946
|
+
}, Wd = ({ name: e = void 0, options: t = null, value: n = void 0, onChange: r = mn, padding: i = !1, margin: a = !0, testId: o, linkComponent: s }) => {
|
|
6946
6947
|
let l = c(U), { simpleInputs: u, options: d, selectedOptions: f } = mc(t, n), p = cn(f) ? void 0 : u ? f : f.value, m = (e) => {
|
|
6947
6948
|
var t;
|
|
6948
6949
|
return (t = e.component) == null ? s : t;
|
|
@@ -6963,7 +6964,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6963
6964
|
"data-testid": o,
|
|
6964
6965
|
children: /* @__PURE__ */ y(zr, {
|
|
6965
6966
|
"aria-label": e == null ? "Tabs" : e,
|
|
6966
|
-
className: _(
|
|
6967
|
+
className: _(Ud.tabs, i ? Ud.padding : "", a ? Ud.margin : ""),
|
|
6967
6968
|
children: v.map((e) => {
|
|
6968
6969
|
let { label: t, url: n, to: r, disabled: i, value: a, right: o, invalid: s, badge: c, testId: u } = e, d = h(e), f = m(e);
|
|
6969
6970
|
return /* @__PURE__ */ b(Rr, {
|
|
@@ -6971,23 +6972,23 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6971
6972
|
...!d && n ? { href: n } : {},
|
|
6972
6973
|
shouldSelectOnPressUp: !0,
|
|
6973
6974
|
isDisabled: i || l,
|
|
6974
|
-
className: _(
|
|
6975
|
+
className: _(Ud.item, o ? Ud.right : Ud.left),
|
|
6975
6976
|
"data-testid": u,
|
|
6976
6977
|
render: d && f ? (e) => /* @__PURE__ */ y(f, {
|
|
6977
6978
|
...e,
|
|
6978
6979
|
href: r,
|
|
6979
6980
|
to: r
|
|
6980
6981
|
}) : void 0,
|
|
6981
|
-
children: [/* @__PURE__ */ y(
|
|
6982
|
+
children: [/* @__PURE__ */ y(Hd, {
|
|
6982
6983
|
label: t,
|
|
6983
6984
|
invalid: s,
|
|
6984
6985
|
badge: c
|
|
6985
|
-
}), /* @__PURE__ */ y(Lr, { className:
|
|
6986
|
+
}), /* @__PURE__ */ y(Lr, { className: Ud.selectionIndicator })]
|
|
6986
6987
|
}, a);
|
|
6987
6988
|
})
|
|
6988
6989
|
})
|
|
6989
6990
|
}) : null;
|
|
6990
|
-
},
|
|
6991
|
+
}, Gd = ({ children: e, href: t = void 0, target: n = void 0, testId: r, onClick: i, component: a = "a" }) => /* @__PURE__ */ y(a, {
|
|
6991
6992
|
href: t,
|
|
6992
6993
|
to: t,
|
|
6993
6994
|
target: n,
|
|
@@ -6997,7 +6998,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
6997
6998
|
link: !0,
|
|
6998
6999
|
children: e
|
|
6999
7000
|
})
|
|
7000
|
-
}),
|
|
7001
|
+
}), Kd = {
|
|
7001
7002
|
inputInTable: "_inputInTable_q0tl0_1",
|
|
7002
7003
|
inputHover: "_inputHover_q0tl0_13",
|
|
7003
7004
|
inputFocus: "_inputFocus_q0tl0_18",
|
|
@@ -7008,9 +7009,9 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7008
7009
|
textarea: "_textarea_q0tl0_77",
|
|
7009
7010
|
small: "_small_q0tl0_116",
|
|
7010
7011
|
monospace: "_monospace_q0tl0_155"
|
|
7011
|
-
},
|
|
7012
|
+
}, qd = ({ name: e, value: t = "", placeholder: n = "", cols: r, rows: i, disabled: a = !1, onChange: o = mn, onKeyPress: s = mn, onFocus: l = mn, onBlur: u = mn, tabIndex: d = 0, error: f = null, warning: p = null, tooltip: m = null, maxTooltipWidth: h, resize: g, monospace: v = !1, small: b = !1, testId: x }) => {
|
|
7012
7013
|
let S = c(U), C = /* @__PURE__ */ y("textarea", {
|
|
7013
|
-
className: _(
|
|
7014
|
+
className: _(Kd.textarea, f ? Kd.error : "", p ? Kd.warning : "", v ? Kd.monospace : "", b ? Kd.small : ""),
|
|
7014
7015
|
name: e,
|
|
7015
7016
|
value: t,
|
|
7016
7017
|
placeholder: n,
|
|
@@ -7052,10 +7053,10 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7052
7053
|
menu: "_menu_oyr59_139",
|
|
7053
7054
|
active: "_active_oyr59_168",
|
|
7054
7055
|
alert: "_alert_oyr59_193"
|
|
7055
|
-
},
|
|
7056
|
+
}, Jd = ({ warning: e }) => /* @__PURE__ */ y("div", {
|
|
7056
7057
|
className: Q.alert,
|
|
7057
7058
|
children: e
|
|
7058
|
-
}),
|
|
7059
|
+
}), Yd = ({ icon: e, url: t, onClick: n }) => {
|
|
7059
7060
|
let r = /* @__PURE__ */ y(W, { icon: e });
|
|
7060
7061
|
return t ? /* @__PURE__ */ y("a", {
|
|
7061
7062
|
href: t,
|
|
@@ -7067,7 +7068,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7067
7068
|
className: Q.appSwitcher,
|
|
7068
7069
|
children: r
|
|
7069
7070
|
});
|
|
7070
|
-
},
|
|
7071
|
+
}, Xd = ({ label: e, logo: t, url: n, version: r, onClick: i }) => {
|
|
7071
7072
|
let a = /* @__PURE__ */ b("div", {
|
|
7072
7073
|
className: Q.title,
|
|
7073
7074
|
children: [
|
|
@@ -7096,9 +7097,9 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7096
7097
|
children: a
|
|
7097
7098
|
})
|
|
7098
7099
|
});
|
|
7099
|
-
},
|
|
7100
|
+
}, Zd = /* @__PURE__ */ function(e) {
|
|
7100
7101
|
return e.LINK = "Link", e.BUTTON = "Button", e.MENU = "Menu", e.COMPONENT = "Component", e;
|
|
7101
|
-
}({}),
|
|
7102
|
+
}({}), Qd = ({ label: e, url: t, icon: n, onClick: r, active: i, disabled: a, testId: o, component: s = "a" }) => {
|
|
7102
7103
|
let l = c(U);
|
|
7103
7104
|
return /* @__PURE__ */ b(s, {
|
|
7104
7105
|
className: _(Q.link, i ? Q.active : ""),
|
|
@@ -7115,11 +7116,11 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7115
7116
|
children: e
|
|
7116
7117
|
})]
|
|
7117
7118
|
});
|
|
7118
|
-
},
|
|
7119
|
+
}, $d = ({ element: e }) => {
|
|
7119
7120
|
switch (e.type) {
|
|
7120
|
-
case
|
|
7121
|
+
case Zd.LINK: return /* @__PURE__ */ y("div", {
|
|
7121
7122
|
className: Q.item,
|
|
7122
|
-
children: /* @__PURE__ */ y(
|
|
7123
|
+
children: /* @__PURE__ */ y(Qd, {
|
|
7123
7124
|
label: e.label,
|
|
7124
7125
|
url: e.url,
|
|
7125
7126
|
icon: e.icon,
|
|
@@ -7130,7 +7131,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7130
7131
|
component: e.component
|
|
7131
7132
|
})
|
|
7132
7133
|
});
|
|
7133
|
-
case
|
|
7134
|
+
case Zd.BUTTON: return /* @__PURE__ */ y("div", {
|
|
7134
7135
|
className: _(Q.item, Q.button),
|
|
7135
7136
|
children: /* @__PURE__ */ y(K, {
|
|
7136
7137
|
label: e.label,
|
|
@@ -7142,7 +7143,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7142
7143
|
testId: e.testId
|
|
7143
7144
|
})
|
|
7144
7145
|
});
|
|
7145
|
-
case
|
|
7146
|
+
case Zd.MENU: return /* @__PURE__ */ y("div", {
|
|
7146
7147
|
className: _(Q.item, Q.menu),
|
|
7147
7148
|
children: /* @__PURE__ */ y(xa, {
|
|
7148
7149
|
maxHeight: "100%",
|
|
@@ -7150,7 +7151,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7150
7151
|
trigger: qr.COMPONENT,
|
|
7151
7152
|
fullHeightTrigger: !0,
|
|
7152
7153
|
placement: "bottom-start",
|
|
7153
|
-
component: /* @__PURE__ */ y(
|
|
7154
|
+
component: /* @__PURE__ */ y(Qd, {
|
|
7154
7155
|
label: e.label,
|
|
7155
7156
|
icon: e.icon,
|
|
7156
7157
|
onClick: e.onClick
|
|
@@ -7159,50 +7160,50 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7159
7160
|
}
|
|
7160
7161
|
})
|
|
7161
7162
|
});
|
|
7162
|
-
case
|
|
7163
|
+
case Zd.COMPONENT: return /* @__PURE__ */ y("div", {
|
|
7163
7164
|
className: Q.item,
|
|
7164
7165
|
children: e.component
|
|
7165
7166
|
});
|
|
7166
7167
|
default: return null;
|
|
7167
7168
|
}
|
|
7168
|
-
},
|
|
7169
|
+
}, ef = ({ title: e, appSwitcher: t, content: n = [], contentRight: r = [], warning: i = "", height: a = "var(--size-topbar)", fixedPosition: o = !0 }) => /* @__PURE__ */ b("div", { children: [i && /* @__PURE__ */ y(Jd, { warning: i }), /* @__PURE__ */ b("div", {
|
|
7169
7170
|
className: _(Q.topbar, o ? Q.fixed : ""),
|
|
7170
7171
|
style: { height: a },
|
|
7171
7172
|
children: [
|
|
7172
|
-
!!t && /* @__PURE__ */ y(
|
|
7173
|
+
!!t && /* @__PURE__ */ y(Yd, {
|
|
7173
7174
|
icon: t.icon,
|
|
7174
7175
|
url: t.url,
|
|
7175
7176
|
onClick: t.onClick
|
|
7176
7177
|
}),
|
|
7177
7178
|
/* @__PURE__ */ b("div", {
|
|
7178
7179
|
className: Q.left,
|
|
7179
|
-
children: [e && /* @__PURE__ */ y(
|
|
7180
|
+
children: [e && /* @__PURE__ */ y(Xd, {
|
|
7180
7181
|
label: e.label,
|
|
7181
7182
|
logo: e.logo,
|
|
7182
7183
|
url: e.url,
|
|
7183
7184
|
version: e.version,
|
|
7184
7185
|
onClick: e.onClick
|
|
7185
|
-
}), n.map((e, t) => e ? /* @__PURE__ */ y(
|
|
7186
|
+
}), n.map((e, t) => e ? /* @__PURE__ */ y($d, { element: e }, t) : null)]
|
|
7186
7187
|
}),
|
|
7187
7188
|
/* @__PURE__ */ y("div", {
|
|
7188
7189
|
className: Q.right,
|
|
7189
|
-
children: r.map((e, t) => e ? /* @__PURE__ */ y(
|
|
7190
|
+
children: r.map((e, t) => e ? /* @__PURE__ */ y($d, { element: e }, t) : null)
|
|
7190
7191
|
})
|
|
7191
7192
|
]
|
|
7192
|
-
})] }),
|
|
7193
|
+
})] }), tf = {
|
|
7193
7194
|
popConfirm: "_popConfirm_1x6ye_1",
|
|
7194
7195
|
content: "_content_1x6ye_7",
|
|
7195
7196
|
buttons: "_buttons_1x6ye_13"
|
|
7196
|
-
},
|
|
7197
|
-
className:
|
|
7197
|
+
}, nf = ({ title: e, okText: t, onClickOk: n, disableConfirmButton: r, cancelText: i, onClickCancel: a, close: o, testId: s }) => /* @__PURE__ */ b("div", {
|
|
7198
|
+
className: tf.popConfirm,
|
|
7198
7199
|
children: [e && /* @__PURE__ */ y("div", {
|
|
7199
|
-
className:
|
|
7200
|
+
className: tf.content,
|
|
7200
7201
|
children: /* @__PURE__ */ y(so, {
|
|
7201
7202
|
small: !0,
|
|
7202
7203
|
children: e
|
|
7203
7204
|
})
|
|
7204
7205
|
}), /* @__PURE__ */ b("div", {
|
|
7205
|
-
className:
|
|
7206
|
+
className: tf.buttons,
|
|
7206
7207
|
children: [/* @__PURE__ */ y(K, {
|
|
7207
7208
|
small: !0,
|
|
7208
7209
|
colored: !0,
|
|
@@ -7217,8 +7218,8 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7217
7218
|
testId: `${s}-cancel-button`
|
|
7218
7219
|
})]
|
|
7219
7220
|
})]
|
|
7220
|
-
}),
|
|
7221
|
-
content: /* @__PURE__ */ y(
|
|
7221
|
+
}), rf = ({ 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, overflowContainer: u = !1, testId: d = void 0 }) => /* @__PURE__ */ y(Pa, {
|
|
7222
|
+
content: /* @__PURE__ */ y(nf, {
|
|
7222
7223
|
title: i,
|
|
7223
7224
|
okText: s,
|
|
7224
7225
|
onClickOk: c,
|
|
@@ -7233,14 +7234,14 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7233
7234
|
overflowContainer: u,
|
|
7234
7235
|
testId: d,
|
|
7235
7236
|
children: e
|
|
7236
|
-
}),
|
|
7237
|
+
}), af = {
|
|
7237
7238
|
tree: "_tree_coxxe_1",
|
|
7238
7239
|
toggle: "_toggle_coxxe_8",
|
|
7239
7240
|
dropTarget: "_dropTarget_coxxe_15",
|
|
7240
7241
|
placeholder: "_placeholder_coxxe_30",
|
|
7241
7242
|
draggingSource: "_draggingSource_coxxe_36",
|
|
7242
7243
|
placeholderContainer: "_placeholderContainer_coxxe_39"
|
|
7243
|
-
},
|
|
7244
|
+
}, of = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
|
|
7244
7245
|
let { id: l, data: u } = t, { active: d, disabled: f, testId: p, onClick: m, actions: h = [] } = u, [g, v] = e.useState(!1), [x, S] = e.useState(0), C = (e) => {
|
|
7245
7246
|
e.stopPropagation(), i(l);
|
|
7246
7247
|
}, w = (e) => {
|
|
@@ -7267,7 +7268,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7267
7268
|
className: _(Z.itemHeader, g ? Z.noPointerEvents : ""),
|
|
7268
7269
|
children: [
|
|
7269
7270
|
a && /* @__PURE__ */ y("div", {
|
|
7270
|
-
className:
|
|
7271
|
+
className: af.toggle,
|
|
7271
7272
|
children: /* @__PURE__ */ y(K, {
|
|
7272
7273
|
basic: !0,
|
|
7273
7274
|
colored: r ? !0 : Jr.MUTED,
|
|
@@ -7292,10 +7293,10 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7292
7293
|
]
|
|
7293
7294
|
})
|
|
7294
7295
|
});
|
|
7295
|
-
},
|
|
7296
|
-
className:
|
|
7296
|
+
}, sf = ({ depth: e, indent: t = "var(--size-sm)" }) => /* @__PURE__ */ y("div", {
|
|
7297
|
+
className: af.placeholder,
|
|
7297
7298
|
style: { left: `calc(${t} * ${e})` }
|
|
7298
|
-
}),
|
|
7299
|
+
}), cf = ({ list: e, canDrop: t, draggable: n = !1, onListReorder: r, onChangeOpen: i, testId: a, isInitialOpen: o = !1, autoOpenActiveItems: s = !1, treeRef: c, itemHasChild: u, onItemToggle: d, icons: f, allowParentReassignment: p, stickyHeader: h, height: g, render: _, placeholderIndent: v }) => {
|
|
7299
7300
|
var x;
|
|
7300
7301
|
let S = c == null ? m(null) : c, C = (e) => {
|
|
7301
7302
|
i && i(e);
|
|
@@ -7380,7 +7381,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7380
7381
|
hasChild: r,
|
|
7381
7382
|
isOpen: a,
|
|
7382
7383
|
onToggle: o
|
|
7383
|
-
}) : /* @__PURE__ */ y(
|
|
7384
|
+
}) : /* @__PURE__ */ y(of, {
|
|
7384
7385
|
hasChild: u ? u(e) : r,
|
|
7385
7386
|
node: e,
|
|
7386
7387
|
depth: t,
|
|
@@ -7396,7 +7397,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7396
7397
|
onDrop: A,
|
|
7397
7398
|
onChangeOpen: C,
|
|
7398
7399
|
dropTargetOffset: 10,
|
|
7399
|
-
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ y(
|
|
7400
|
+
placeholderRender: (e, { depth: t }) => /* @__PURE__ */ y(sf, {
|
|
7400
7401
|
depth: t,
|
|
7401
7402
|
indent: v
|
|
7402
7403
|
}),
|
|
@@ -7404,17 +7405,17 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7404
7405
|
listComponent: "div",
|
|
7405
7406
|
listItemComponent: "div",
|
|
7406
7407
|
classes: {
|
|
7407
|
-
root:
|
|
7408
|
-
draggingSource:
|
|
7409
|
-
dropTarget:
|
|
7410
|
-
placeholder:
|
|
7408
|
+
root: af.tree,
|
|
7409
|
+
draggingSource: af.draggingSource,
|
|
7410
|
+
dropTarget: af.dropTarget,
|
|
7411
|
+
placeholder: af.placeholderContainer
|
|
7411
7412
|
},
|
|
7412
7413
|
initialOpen: o,
|
|
7413
7414
|
enableAnimateExpand: !0
|
|
7414
7415
|
})
|
|
7415
7416
|
})]
|
|
7416
7417
|
});
|
|
7417
|
-
},
|
|
7418
|
+
}, lf = {
|
|
7418
7419
|
treeTable: "_treeTable_1ywvy_1",
|
|
7419
7420
|
treeTableHeader: "_treeTableHeader_1ywvy_22",
|
|
7420
7421
|
folderCell: "_folderCell_1ywvy_30",
|
|
@@ -7422,48 +7423,48 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7422
7423
|
drag: "_drag_1ywvy_31",
|
|
7423
7424
|
folder: "_folder_1ywvy_30",
|
|
7424
7425
|
active: "_active_1ywvy_61"
|
|
7425
|
-
},
|
|
7426
|
+
}, uf = (e, t) => e.filter((e) => e.parent === t).flatMap((t) => [t.id, ...uf(e, t.id)]), df = (e, t) => {
|
|
7426
7427
|
let n = new Set(t);
|
|
7427
7428
|
return e.filter((e) => !n.has(e.id)).map((e) => e.id);
|
|
7428
|
-
},
|
|
7429
|
+
}, ff = (e, t, n) => e.filter((e) => n.has(e) || !t.has(e)), pf = (e, t, n, r = []) => {
|
|
7429
7430
|
let i = new Set(n), a = new Set(r), o = e.filter((e) => e.parent === t && !a.has(e.id));
|
|
7430
7431
|
if (o.length === 0) return {
|
|
7431
7432
|
checked: i.has(t),
|
|
7432
7433
|
indeterminate: !1
|
|
7433
7434
|
};
|
|
7434
|
-
let s = o.map((t) =>
|
|
7435
|
+
let s = o.map((t) => pf(e, t.id, n, r)), c = s.filter((e) => e.checked).length, l = s.filter((e) => e.indeterminate).length, u = c === o.length;
|
|
7435
7436
|
return {
|
|
7436
7437
|
checked: u,
|
|
7437
7438
|
indeterminate: c + l > 0 && !u
|
|
7438
7439
|
};
|
|
7439
|
-
},
|
|
7440
|
-
let r =
|
|
7440
|
+
}, mf = (e, t, n = []) => {
|
|
7441
|
+
let r = df(e, n), i = new Set(t), a = r.filter((e) => i.has(e)).length;
|
|
7441
7442
|
return {
|
|
7442
7443
|
checked: r.length > 0 && a === r.length,
|
|
7443
7444
|
indeterminate: a > 0 && a < r.length
|
|
7444
7445
|
};
|
|
7445
|
-
},
|
|
7446
|
+
}, hf = n(null), gf = () => c(hf), _f = ({ children: e, rowCheckboxes: t, rows: n }) => {
|
|
7446
7447
|
let r = t !== void 0, { checkedIds: i = [], disabledIds: a = [], getTooltip: o, onChange: c } = t == null ? {} : t, l = f(() => new Set(a), [a]), u = f(() => {
|
|
7447
7448
|
if (!r) return null;
|
|
7448
7449
|
let e = /* @__PURE__ */ new Map();
|
|
7449
|
-
for (let t of n) e.set(t.id,
|
|
7450
|
+
for (let t of n) e.set(t.id, pf(n, t.id, i, a));
|
|
7450
7451
|
return e;
|
|
7451
7452
|
}, [
|
|
7452
7453
|
i,
|
|
7453
7454
|
a,
|
|
7454
7455
|
r,
|
|
7455
7456
|
n
|
|
7456
|
-
]), d = f(() => r ?
|
|
7457
|
+
]), d = f(() => r ? mf(n, i, a) : void 0, [
|
|
7457
7458
|
i,
|
|
7458
7459
|
a,
|
|
7459
7460
|
r,
|
|
7460
7461
|
n
|
|
7461
7462
|
]), p = s((e) => u == null ? void 0 : u.get(e), [u]), m = s((e) => l.has(e), [l]), h = s((e) => o == null ? void 0 : o(e), [o]), g = s((e) => {
|
|
7462
7463
|
if (!r || l.has(e)) return;
|
|
7463
|
-
let t =
|
|
7464
|
+
let t = uf(n, e), o = [e, ...t.filter((e) => !l.has(e))], s = [e, ...t], { checked: u } = pf(n, e, i, a);
|
|
7464
7465
|
if (u) {
|
|
7465
7466
|
let e = new Set(s);
|
|
7466
|
-
c == null || c(
|
|
7467
|
+
c == null || c(ff(i, e, l));
|
|
7467
7468
|
} else c == null || c([...new Set([...i, ...o])]);
|
|
7468
7469
|
}, [
|
|
7469
7470
|
i,
|
|
@@ -7474,7 +7475,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7474
7475
|
n
|
|
7475
7476
|
]), _ = s(() => {
|
|
7476
7477
|
if (!r) return;
|
|
7477
|
-
let e =
|
|
7478
|
+
let e = df(n, a), { checked: t } = mf(n, i, a);
|
|
7478
7479
|
t ? c == null || c(i.filter((e) => l.has(e))) : c == null || c([...new Set([...i, ...e])]);
|
|
7479
7480
|
}, [
|
|
7480
7481
|
i,
|
|
@@ -7500,12 +7501,12 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7500
7501
|
_,
|
|
7501
7502
|
g
|
|
7502
7503
|
]);
|
|
7503
|
-
return /* @__PURE__ */ y(
|
|
7504
|
+
return /* @__PURE__ */ y(hf.Provider, {
|
|
7504
7505
|
value: v,
|
|
7505
7506
|
children: e
|
|
7506
7507
|
});
|
|
7507
|
-
},
|
|
7508
|
-
let h =
|
|
7508
|
+
}, vf = ({ 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 }) => {
|
|
7509
|
+
let h = gf(), g = h != null && h.enabled ? h.getRowCheckState(l.id) : void 0, v = g == null ? void 0 : g.checked, x = g == null ? void 0 : g.indeterminate, S = h == null ? void 0 : h.isRowCheckDisabled(l.id), C = h == null ? void 0 : h.enabled, { data: w, droppable: T } = l, { id: E, cells: D, testId: O, actions: k = [], active: A, onRowClick: j } = w, M = T || a, N = (e) => {
|
|
7509
7510
|
let r = t ? t[e] : void 0;
|
|
7510
7511
|
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${M ? n + 1 : n})`})` : r;
|
|
7511
7512
|
};
|
|
@@ -7518,7 +7519,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7518
7519
|
onDragLeave: f,
|
|
7519
7520
|
children: /* @__PURE__ */ y("tbody", { children: /* @__PURE__ */ b("tr", {
|
|
7520
7521
|
onClick: j,
|
|
7521
|
-
className: _(
|
|
7522
|
+
className: _(lf.treeTableRow, A ? lf.active : void 0),
|
|
7522
7523
|
children: [
|
|
7523
7524
|
C && /* @__PURE__ */ y(sl, {
|
|
7524
7525
|
isHeader: !1,
|
|
@@ -7532,19 +7533,19 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7532
7533
|
}
|
|
7533
7534
|
}),
|
|
7534
7535
|
r && /* @__PURE__ */ y("td", {
|
|
7535
|
-
className:
|
|
7536
|
+
className: lf.dragCell,
|
|
7536
7537
|
children: /* @__PURE__ */ y("div", {
|
|
7537
|
-
className:
|
|
7538
|
+
className: lf.drag,
|
|
7538
7539
|
onClick: (e) => e.stopPropagation(),
|
|
7539
7540
|
ref: i,
|
|
7540
7541
|
children: /* @__PURE__ */ y(W, { icon: H.DRAG })
|
|
7541
7542
|
})
|
|
7542
7543
|
}),
|
|
7543
|
-
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ y("td", { className:
|
|
7544
|
+
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ y("td", { className: lf.folderCell }, t)),
|
|
7544
7545
|
M && /* @__PURE__ */ y("td", {
|
|
7545
|
-
className:
|
|
7546
|
+
className: lf.folderCell,
|
|
7546
7547
|
children: /* @__PURE__ */ y("div", {
|
|
7547
|
-
className:
|
|
7548
|
+
className: lf.folder,
|
|
7548
7549
|
onClick: () => m(E),
|
|
7549
7550
|
onMouseDown: (e) => e.stopPropagation(),
|
|
7550
7551
|
children: /* @__PURE__ */ y(K, {
|
|
@@ -7573,10 +7574,10 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7573
7574
|
]
|
|
7574
7575
|
}) })
|
|
7575
7576
|
});
|
|
7576
|
-
},
|
|
7577
|
-
let a =
|
|
7577
|
+
}, yf = ({ columnAlignment: e, columnWidths: t, draggable: n, hasRowActions: r, headers: i }) => {
|
|
7578
|
+
let a = gf(), o = a == null ? void 0 : a.headerCheckState, s = (a == null ? void 0 : a.enabled) && o !== void 0;
|
|
7578
7579
|
return /* @__PURE__ */ y("table", {
|
|
7579
|
-
className: _(os.table,
|
|
7580
|
+
className: _(os.table, lf.treeTableHeader),
|
|
7580
7581
|
children: /* @__PURE__ */ y("thead", { children: i.map((i, c) => /* @__PURE__ */ b("tr", { children: [
|
|
7581
7582
|
s && c === 0 ? /* @__PURE__ */ y(sl, {
|
|
7582
7583
|
isHeader: !0,
|
|
@@ -7587,7 +7588,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7587
7588
|
onChange: a.toggleHeaderCheck
|
|
7588
7589
|
}
|
|
7589
7590
|
}) : s ? /* @__PURE__ */ y("td", {}) : null,
|
|
7590
|
-
n && /* @__PURE__ */ y("th", { className:
|
|
7591
|
+
n && /* @__PURE__ */ y("th", { className: lf.dragCell }),
|
|
7591
7592
|
i.cells.map((n, r) => /* @__PURE__ */ y(sl, {
|
|
7592
7593
|
isHeader: !0,
|
|
7593
7594
|
cell: n,
|
|
@@ -7604,22 +7605,22 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7604
7605
|
})
|
|
7605
7606
|
] }, c)) })
|
|
7606
7607
|
});
|
|
7607
|
-
},
|
|
7608
|
+
}, bf = ({ 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 }) => {
|
|
7608
7609
|
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: v = [] } = d, x = Dc(v, _ == null ? [] : _);
|
|
7609
|
-
return /* @__PURE__ */ y(
|
|
7610
|
+
return /* @__PURE__ */ y(_f, {
|
|
7610
7611
|
rowCheckboxes: u,
|
|
7611
7612
|
rows: v,
|
|
7612
7613
|
children: /* @__PURE__ */ b("div", {
|
|
7613
|
-
className:
|
|
7614
|
+
className: lf.treeTable,
|
|
7614
7615
|
"data-testid": f,
|
|
7615
7616
|
style: { width: g },
|
|
7616
|
-
children: [!!_ && /* @__PURE__ */ y(
|
|
7617
|
+
children: [!!_ && /* @__PURE__ */ y(yf, {
|
|
7617
7618
|
columnAlignment: m,
|
|
7618
7619
|
columnWidths: h,
|
|
7619
7620
|
draggable: r,
|
|
7620
7621
|
hasRowActions: x,
|
|
7621
7622
|
headers: _
|
|
7622
|
-
}), /* @__PURE__ */ y(
|
|
7623
|
+
}), /* @__PURE__ */ y(cf, {
|
|
7623
7624
|
allowParentReassignment: e,
|
|
7624
7625
|
autoOpenActiveItems: t,
|
|
7625
7626
|
canDrop: n,
|
|
@@ -7635,7 +7636,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7635
7636
|
onItemToggle: s,
|
|
7636
7637
|
onListReorder: c,
|
|
7637
7638
|
placeholderIndent: "var(--size)",
|
|
7638
|
-
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ y(
|
|
7639
|
+
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ y(vf, {
|
|
7639
7640
|
node: e,
|
|
7640
7641
|
columnAlignment: m,
|
|
7641
7642
|
columnWidths: h,
|
|
@@ -7652,10 +7653,10 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7652
7653
|
})]
|
|
7653
7654
|
})
|
|
7654
7655
|
});
|
|
7655
|
-
},
|
|
7656
|
+
}, xf = Object.freeze({
|
|
7656
7657
|
Translations: "translations",
|
|
7657
7658
|
LanguageKey: "languageKey"
|
|
7658
|
-
}),
|
|
7659
|
+
}), Sf = {
|
|
7659
7660
|
unified: "Unified",
|
|
7660
7661
|
split: "Split",
|
|
7661
7662
|
changesTooLarge: "Changes are too large to be shown",
|
|
@@ -7677,29 +7678,29 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7677
7678
|
pluralChanges: "changes",
|
|
7678
7679
|
showAll: "Show all",
|
|
7679
7680
|
unknown: "Unknown"
|
|
7680
|
-
},
|
|
7681
|
+
}, Cf = (e) => Object.keys(Sf).reduce((t, n) => ({
|
|
7681
7682
|
...t,
|
|
7682
|
-
[n]: (e == null ? void 0 : e[n]) || (
|
|
7683
|
-
}), {}),
|
|
7684
|
-
[
|
|
7685
|
-
[
|
|
7686
|
-
},
|
|
7687
|
-
|
|
7688
|
-
},
|
|
7683
|
+
[n]: (e == null ? void 0 : e[n]) || (Sf == null ? void 0 : Sf[n])
|
|
7684
|
+
}), {}), wf = {
|
|
7685
|
+
[xf.Translations]: Cf(),
|
|
7686
|
+
[xf.LanguageKey]: "en"
|
|
7687
|
+
}, Tf = (e) => e ? wf[e] : wf, Ef = (e, t) => {
|
|
7688
|
+
wf[e] = t;
|
|
7689
|
+
}, Df = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
|
|
7689
7690
|
var a;
|
|
7690
|
-
let { unitTemplate: o = null } = (a =
|
|
7691
|
-
return e[n] = r == null ?
|
|
7691
|
+
let { unitTemplate: o = null } = (a = Md()) == null ? {} : a;
|
|
7692
|
+
return e[n] = r == null ? xd(n, o) : r, t[n] = i, {
|
|
7692
7693
|
preferredUnits: e,
|
|
7693
7694
|
storageUnits: t
|
|
7694
7695
|
};
|
|
7695
7696
|
}, {
|
|
7696
7697
|
preferredUnits: {},
|
|
7697
7698
|
storageUnits: {}
|
|
7698
|
-
}),
|
|
7699
|
+
}), Of = ({ row: e, rowIndex: t, selectedUnits: n, storageUnits: r, convertBackToStorageUnit: i, enableCosmeticRounding: a, enableDisplayRounding: o }) => ({
|
|
7699
7700
|
...e,
|
|
7700
7701
|
cells: e.cells.map((e, s) => {
|
|
7701
7702
|
if ("autoUnit" in e && e != null && e.autoUnit && (typeof (e == null ? void 0 : e.value) == "string" || typeof (e == null ? void 0 : e.value) == "number")) {
|
|
7702
|
-
let { unitKey: c, value: l, formatDisplayValue: u } = e, d = o && "roundDisplayValue" in e ? e == null ? void 0 : e.roundDisplayValue : null, f = n[c], p = r[c], m = p && f !== p, { value: h = l } =
|
|
7703
|
+
let { unitKey: c, value: l, formatDisplayValue: u } = e, d = o && "roundDisplayValue" in e ? e == null ? void 0 : e.roundDisplayValue : null, f = n[c], p = r[c], m = p && f !== p, { value: h = l } = Ed({
|
|
7703
7704
|
value: Pc(l),
|
|
7704
7705
|
unitkey: c,
|
|
7705
7706
|
toUnit: f,
|
|
@@ -7713,7 +7714,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7713
7714
|
roundDisplayValue: d,
|
|
7714
7715
|
selectOnFocus: !0,
|
|
7715
7716
|
onChange: (n) => {
|
|
7716
|
-
let { value: r } = n.target, a = i ? p : f, { value: o = r } =
|
|
7717
|
+
let { value: r } = n.target, a = i ? p : f, { value: o = r } = Ed({
|
|
7717
7718
|
value: String(r),
|
|
7718
7719
|
unitkey: c,
|
|
7719
7720
|
toUnit: a,
|
|
@@ -7737,8 +7738,8 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7737
7738
|
}
|
|
7738
7739
|
return e;
|
|
7739
7740
|
})
|
|
7740
|
-
}),
|
|
7741
|
-
let { translations: i } =
|
|
7741
|
+
}), kf = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
|
|
7742
|
+
let { translations: i } = Tf();
|
|
7742
7743
|
return e ? e.map((e) => ({
|
|
7743
7744
|
...e,
|
|
7744
7745
|
cells: e.cells.map((e) => {
|
|
@@ -7767,8 +7768,8 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7767
7768
|
return e;
|
|
7768
7769
|
})
|
|
7769
7770
|
})) : [];
|
|
7770
|
-
},
|
|
7771
|
-
let { headers: u, ...d } = e, { storageUnits: f, preferredUnits: p } =
|
|
7771
|
+
}, Af = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: o, beforeRenderRow: c }) => {
|
|
7772
|
+
let { headers: u, ...d } = e, { storageUnits: f, preferredUnits: p } = Df(t), m = bd(p), [g, _] = h(p), v = ({ unitKey: e, value: n }) => {
|
|
7772
7773
|
_({
|
|
7773
7774
|
...g,
|
|
7774
7775
|
[e]: n
|
|
@@ -7779,7 +7780,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7779
7780
|
newUnit: n,
|
|
7780
7781
|
unitKey: e
|
|
7781
7782
|
});
|
|
7782
|
-
}, b = s(({ row: e, rowIndex: t }) =>
|
|
7783
|
+
}, b = s(({ row: e, rowIndex: t }) => Of({
|
|
7783
7784
|
row: c ? c({
|
|
7784
7785
|
row: e,
|
|
7785
7786
|
rowIndex: t
|
|
@@ -7808,7 +7809,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7808
7809
|
}, [t]), /* @__PURE__ */ y(pl, {
|
|
7809
7810
|
table: {
|
|
7810
7811
|
...d,
|
|
7811
|
-
headers:
|
|
7812
|
+
headers: kf({
|
|
7812
7813
|
headers: e.headers,
|
|
7813
7814
|
selectedUnits: g,
|
|
7814
7815
|
storageUnits: f,
|
|
@@ -7819,8 +7820,8 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7819
7820
|
canListReorder: o,
|
|
7820
7821
|
beforeRenderRow: b
|
|
7821
7822
|
});
|
|
7822
|
-
},
|
|
7823
|
-
let { translations: d } =
|
|
7823
|
+
}, jf = { settingField: "_settingField_1x02n_1" }, Mf = ({ 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 }) => {
|
|
7824
|
+
let { translations: d } = Tf(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ b(e.Fragment, { children: [t, /* @__PURE__ */ y("br", {})] }, n)), p = [
|
|
7824
7825
|
...r ? [] : [{
|
|
7825
7826
|
label: d == null ? void 0 : d.allUsers,
|
|
7826
7827
|
value: !1
|
|
@@ -7835,7 +7836,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7835
7836
|
}] : []
|
|
7836
7837
|
], m = a !== void 0 && o !== void 0 && !on(a, o);
|
|
7837
7838
|
return /* @__PURE__ */ b("div", {
|
|
7838
|
-
className:
|
|
7839
|
+
className: jf.settingField,
|
|
7839
7840
|
"data-testid": u,
|
|
7840
7841
|
children: [/* @__PURE__ */ b(Du, {
|
|
7841
7842
|
justifyContent: "space-between",
|
|
@@ -7867,19 +7868,19 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7867
7868
|
children: f(t)
|
|
7868
7869
|
})]
|
|
7869
7870
|
});
|
|
7870
|
-
},
|
|
7871
|
+
}, Nf = (e, t) => {
|
|
7871
7872
|
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;
|
|
7872
7873
|
return {
|
|
7873
7874
|
added: Math.max(0, i),
|
|
7874
7875
|
removed: Math.max(0, a)
|
|
7875
7876
|
};
|
|
7876
|
-
},
|
|
7877
|
+
}, Pf = "split", Ff = "unified", If = ({ oldJson: e, newJson: t, viewType: n = Pf }) => {
|
|
7877
7878
|
var r, i;
|
|
7878
|
-
let { translations: a } =
|
|
7879
|
-
value:
|
|
7879
|
+
let { translations: a } = Tf(), [o, s] = h(n), c = [{
|
|
7880
|
+
value: Pf,
|
|
7880
7881
|
label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
|
|
7881
7882
|
}, {
|
|
7882
|
-
value:
|
|
7883
|
+
value: Ff,
|
|
7883
7884
|
label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
|
|
7884
7885
|
}];
|
|
7885
7886
|
l(() => {
|
|
@@ -7887,7 +7888,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7887
7888
|
}, [n]);
|
|
7888
7889
|
let u = ({ target: { value: e } }) => {
|
|
7889
7890
|
s(e);
|
|
7890
|
-
}, { added: d, removed: f } =
|
|
7891
|
+
}, { added: d, removed: f } = Nf(e, t), p = d + f > 3500;
|
|
7891
7892
|
return /* @__PURE__ */ y(v, { children: /* @__PURE__ */ y(ja, {
|
|
7892
7893
|
bordered: !0,
|
|
7893
7894
|
heading: /* @__PURE__ */ b(Du, {
|
|
@@ -7902,7 +7903,7 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7902
7903
|
}), /* @__PURE__ */ b(so, {
|
|
7903
7904
|
error: !0,
|
|
7904
7905
|
children: ["-", f]
|
|
7905
|
-
})] }) }), !p && /* @__PURE__ */ y(
|
|
7906
|
+
})] }) }), !p && /* @__PURE__ */ y(rd, {
|
|
7906
7907
|
name: "viewType",
|
|
7907
7908
|
options: c,
|
|
7908
7909
|
value: o,
|
|
@@ -7920,14 +7921,14 @@ var Va = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ha =
|
|
|
7920
7921
|
}) : /* @__PURE__ */ y(Gr, {
|
|
7921
7922
|
oldValue: e,
|
|
7922
7923
|
newValue: t,
|
|
7923
|
-
splitView: o ===
|
|
7924
|
+
splitView: o === Pf,
|
|
7924
7925
|
compareMethod: Kr.WORDS
|
|
7925
7926
|
})
|
|
7926
7927
|
}) });
|
|
7927
7928
|
};
|
|
7928
7929
|
//#endregion
|
|
7929
7930
|
//#region src/helpers/date.ts
|
|
7930
|
-
function
|
|
7931
|
+
function Lf({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
7931
7932
|
return e ? new Date(e).toLocaleString(a, {
|
|
7932
7933
|
year: "numeric",
|
|
7933
7934
|
month: "short",
|
|
@@ -7941,28 +7942,28 @@ function If({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
7941
7942
|
}
|
|
7942
7943
|
//#endregion
|
|
7943
7944
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
7944
|
-
function
|
|
7945
|
+
function Rf(e) {
|
|
7945
7946
|
var t;
|
|
7946
7947
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
7947
7948
|
if (!n) throw Error("Invalid RegExp");
|
|
7948
7949
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
7949
7950
|
}
|
|
7950
|
-
function
|
|
7951
|
+
function zf(e) {
|
|
7951
7952
|
if (typeof e != "object") return e;
|
|
7952
7953
|
if (e === null) return null;
|
|
7953
|
-
if (Array.isArray(e)) return e.map(
|
|
7954
|
+
if (Array.isArray(e)) return e.map(zf);
|
|
7954
7955
|
if (e instanceof Date) return new Date(e.getTime());
|
|
7955
|
-
if (e instanceof RegExp) return
|
|
7956
|
+
if (e instanceof RegExp) return Rf(e);
|
|
7956
7957
|
let t = {};
|
|
7957
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
7958
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = zf(e[n]));
|
|
7958
7959
|
return t;
|
|
7959
7960
|
}
|
|
7960
7961
|
//#endregion
|
|
7961
7962
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
7962
|
-
function
|
|
7963
|
+
function Bf(e, t) {
|
|
7963
7964
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
7964
7965
|
}
|
|
7965
|
-
var
|
|
7966
|
+
var Vf = (e) => e[e.length - 1], Hf = class {
|
|
7966
7967
|
setResult(e) {
|
|
7967
7968
|
return this.result = e, this.hasResult = !0, this;
|
|
7968
7969
|
}
|
|
@@ -7970,16 +7971,16 @@ var Bf = (e) => e[e.length - 1], Vf = class {
|
|
|
7970
7971
|
return this.exiting = !0, this;
|
|
7971
7972
|
}
|
|
7972
7973
|
push(e, t) {
|
|
7973
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
7974
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (Bf(this.children), Vf(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
7974
7975
|
}
|
|
7975
|
-
},
|
|
7976
|
+
}, Uf = class extends Hf {
|
|
7976
7977
|
constructor(e, t) {
|
|
7977
7978
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
7978
7979
|
}
|
|
7979
7980
|
prepareDeltaResult(e) {
|
|
7980
7981
|
var t, n, r, i;
|
|
7981
7982
|
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)) {
|
|
7982
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
7983
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : zf;
|
|
7983
7984
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
7984
7985
|
}
|
|
7985
7986
|
return e;
|
|
@@ -7987,15 +7988,15 @@ var Bf = (e) => e[e.length - 1], Vf = class {
|
|
|
7987
7988
|
setResult(e) {
|
|
7988
7989
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
7989
7990
|
}
|
|
7990
|
-
},
|
|
7991
|
+
}, Wf = class extends Hf {
|
|
7991
7992
|
constructor(e, t) {
|
|
7992
7993
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
7993
7994
|
}
|
|
7994
|
-
},
|
|
7995
|
+
}, Gf = class extends Hf {
|
|
7995
7996
|
constructor(e) {
|
|
7996
7997
|
super(), this.delta = e, this.pipe = "reverse";
|
|
7997
7998
|
}
|
|
7998
|
-
},
|
|
7999
|
+
}, Kf = class {
|
|
7999
8000
|
constructor(e) {
|
|
8000
8001
|
this.name = e, this.filters = [];
|
|
8001
8002
|
}
|
|
@@ -8059,7 +8060,7 @@ var Bf = (e) => e[e.length - 1], Vf = class {
|
|
|
8059
8060
|
}
|
|
8060
8061
|
}), this);
|
|
8061
8062
|
}
|
|
8062
|
-
},
|
|
8063
|
+
}, qf = class {
|
|
8063
8064
|
constructor(e) {
|
|
8064
8065
|
this.selfOptions = e || {}, this.pipes = {};
|
|
8065
8066
|
}
|
|
@@ -8086,7 +8087,7 @@ var Bf = (e) => e[e.length - 1], Vf = class {
|
|
|
8086
8087
|
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);
|
|
8087
8088
|
return n.hasResult ? n.result : void 0;
|
|
8088
8089
|
}
|
|
8089
|
-
},
|
|
8090
|
+
}, Jf = (e, t, n, r) => e[n] === t[r], Yf = (e, t, n, r) => {
|
|
8090
8091
|
var i, a, o;
|
|
8091
8092
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
8092
8093
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -8102,7 +8103,7 @@ var Bf = (e) => e[e.length - 1], Vf = class {
|
|
|
8102
8103
|
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);
|
|
8103
8104
|
}
|
|
8104
8105
|
return d;
|
|
8105
|
-
},
|
|
8106
|
+
}, Xf = (e, t, n, r) => {
|
|
8106
8107
|
let i = t.length, a = n.length, o = {
|
|
8107
8108
|
sequence: [],
|
|
8108
8109
|
indices1: [],
|
|
@@ -8124,11 +8125,11 @@ var Bf = (e) => e[e.length - 1], Vf = class {
|
|
|
8124
8125
|
}
|
|
8125
8126
|
}
|
|
8126
8127
|
return o;
|
|
8127
|
-
},
|
|
8128
|
+
}, Zf = { get: (e, t, n, r) => {
|
|
8128
8129
|
let i = r || {};
|
|
8129
|
-
return Yf(
|
|
8130
|
-
} },
|
|
8131
|
-
function
|
|
8130
|
+
return Xf(Yf(e, t, n || Jf, i), e, t, i);
|
|
8131
|
+
} }, Qf = 3;
|
|
8132
|
+
function $f(e, t, n, r) {
|
|
8132
8133
|
for (let i = 0; i < n; i++) {
|
|
8133
8134
|
let n = e[i];
|
|
8134
8135
|
for (let e = 0; e < r; e++) {
|
|
@@ -8138,7 +8139,7 @@ function Qf(e, t, n, r) {
|
|
|
8138
8139
|
}
|
|
8139
8140
|
return !1;
|
|
8140
8141
|
}
|
|
8141
|
-
function
|
|
8142
|
+
function ep(e, t, n, r, i) {
|
|
8142
8143
|
let a = e[n], o = t[r];
|
|
8143
8144
|
if (a === o) return !0;
|
|
8144
8145
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -8151,15 +8152,15 @@ function $f(e, t, n, r, i) {
|
|
|
8151
8152
|
let l = i.hashCache2[r];
|
|
8152
8153
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l === void 0 ? !1 : c === l;
|
|
8153
8154
|
}
|
|
8154
|
-
var
|
|
8155
|
+
var tp = function(e) {
|
|
8155
8156
|
var t, n, r, i, a;
|
|
8156
8157
|
if (!e.leftIsArray) return;
|
|
8157
8158
|
let o = {
|
|
8158
8159
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
8159
8160
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
8160
8161
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
8161
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition =
|
|
8162
|
-
for (; c + s < m && c + s < h &&
|
|
8162
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !$f(f, p, m, h)); s < m && s < h && ep(f, p, s, s, o);) l = s, g = new Uf(f[l], p[l]), e.push(g, l), s++;
|
|
8163
|
+
for (; c + s < m && c + s < h && ep(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new Uf(f[u], p[d]), e.push(g, d), c++;
|
|
8163
8164
|
let _;
|
|
8164
8165
|
if (s + c === m) {
|
|
8165
8166
|
if (m === h) {
|
|
@@ -8183,7 +8184,7 @@ var ep = function(e) {
|
|
|
8183
8184
|
return;
|
|
8184
8185
|
}
|
|
8185
8186
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
8186
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
8187
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = Zf.get(v, y, ep, o), x = [];
|
|
8187
8188
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
8188
8189
|
let t = `_${l}`;
|
|
8189
8190
|
_[t] = [
|
|
@@ -8204,8 +8205,8 @@ var ep = function(e) {
|
|
|
8204
8205
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
8205
8206
|
u = x[n];
|
|
8206
8207
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
8207
|
-
if (u !== void 0 && r &&
|
|
8208
|
-
r.splice(1, 2, l,
|
|
8208
|
+
if (u !== void 0 && r && ep(v, y, u - s, l - s, o)) {
|
|
8209
|
+
r.splice(1, 2, l, Qf), r.splice(1, 2, l, Qf), C || (r[0] = ""), d = l, g = new Uf(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
8209
8210
|
break;
|
|
8210
8211
|
}
|
|
8211
8212
|
}
|
|
@@ -8213,20 +8214,20 @@ var ep = function(e) {
|
|
|
8213
8214
|
} else {
|
|
8214
8215
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
8215
8216
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
8216
|
-
d = b.indices2[t] + s, g = new
|
|
8217
|
+
d = b.indices2[t] + s, g = new Uf(f[u], p[d]), e.push(g, d);
|
|
8217
8218
|
}
|
|
8218
8219
|
}
|
|
8219
8220
|
e.setResult(_).exit();
|
|
8220
8221
|
};
|
|
8221
|
-
|
|
8222
|
-
var
|
|
8222
|
+
tp.filterName = "arrays";
|
|
8223
|
+
var np = {
|
|
8223
8224
|
numerically(e, t) {
|
|
8224
8225
|
return e - t;
|
|
8225
8226
|
},
|
|
8226
8227
|
numericallyBy(e) {
|
|
8227
8228
|
return (t, n) => t[e] - n[e];
|
|
8228
8229
|
}
|
|
8229
|
-
},
|
|
8230
|
+
}, rp = function(e) {
|
|
8230
8231
|
var t;
|
|
8231
8232
|
if (!e.nested) return;
|
|
8232
8233
|
let n = e.delta;
|
|
@@ -8234,7 +8235,7 @@ var tp = {
|
|
|
8234
8235
|
let r, i, a = n, o = e.left, s = [], c = [], l = [];
|
|
8235
8236
|
for (r in a) if (r !== "_t") if (r[0] === "_") {
|
|
8236
8237
|
let e = r;
|
|
8237
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
8238
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === Qf)) s.push(Number.parseInt(r.slice(1), 10));
|
|
8238
8239
|
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]}`);
|
|
8239
8240
|
} else {
|
|
8240
8241
|
let e = r;
|
|
@@ -8246,15 +8247,15 @@ var tp = {
|
|
|
8246
8247
|
delta: a[e]
|
|
8247
8248
|
});
|
|
8248
8249
|
}
|
|
8249
|
-
for (s = s.sort(
|
|
8250
|
+
for (s = s.sort(np.numerically), r = s.length - 1; r >= 0; r--) {
|
|
8250
8251
|
if (i = s[r], i === void 0) continue;
|
|
8251
8252
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
8252
|
-
(e == null ? void 0 : e[2]) ===
|
|
8253
|
+
(e == null ? void 0 : e[2]) === Qf && c.push({
|
|
8253
8254
|
index: e[1],
|
|
8254
8255
|
value: t
|
|
8255
8256
|
});
|
|
8256
8257
|
}
|
|
8257
|
-
c = c.sort(
|
|
8258
|
+
c = c.sort(np.numericallyBy("index"));
|
|
8258
8259
|
let u = c.length;
|
|
8259
8260
|
for (r = 0; r < u; r++) {
|
|
8260
8261
|
let e = c[r];
|
|
@@ -8264,7 +8265,7 @@ var tp = {
|
|
|
8264
8265
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
8265
8266
|
let t = l[r];
|
|
8266
8267
|
if (t === void 0) continue;
|
|
8267
|
-
let n = new
|
|
8268
|
+
let n = new Wf(o[t.index], t.delta);
|
|
8268
8269
|
e.push(n, t.index);
|
|
8269
8270
|
}
|
|
8270
8271
|
if (!e.children) {
|
|
@@ -8273,8 +8274,8 @@ var tp = {
|
|
|
8273
8274
|
}
|
|
8274
8275
|
e.exit();
|
|
8275
8276
|
};
|
|
8276
|
-
|
|
8277
|
-
var
|
|
8277
|
+
rp.filterName = "arrays";
|
|
8278
|
+
var ip = function(e) {
|
|
8278
8279
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
8279
8280
|
let t = e.left, n = e.children.length;
|
|
8280
8281
|
for (let r = 0; r < n; r++) {
|
|
@@ -8285,16 +8286,16 @@ var rp = function(e) {
|
|
|
8285
8286
|
}
|
|
8286
8287
|
e.setResult(t).exit();
|
|
8287
8288
|
};
|
|
8288
|
-
|
|
8289
|
-
var
|
|
8289
|
+
ip.filterName = "arraysCollectChildren";
|
|
8290
|
+
var ap = function(e) {
|
|
8290
8291
|
if (!e.nested) {
|
|
8291
8292
|
let t = e.delta;
|
|
8292
|
-
if (t[2] ===
|
|
8293
|
+
if (t[2] === Qf) {
|
|
8293
8294
|
let n = t;
|
|
8294
8295
|
e.newName = `_${n[1]}`, e.setResult([
|
|
8295
8296
|
n[0],
|
|
8296
8297
|
Number.parseInt(e.childName.substring(1), 10),
|
|
8297
|
-
|
|
8298
|
+
Qf
|
|
8298
8299
|
]).exit();
|
|
8299
8300
|
}
|
|
8300
8301
|
return;
|
|
@@ -8304,26 +8305,26 @@ var ip = function(e) {
|
|
|
8304
8305
|
let n = t;
|
|
8305
8306
|
for (let t in n) {
|
|
8306
8307
|
if (t === "_t") continue;
|
|
8307
|
-
let r = new
|
|
8308
|
+
let r = new Gf(n[t]);
|
|
8308
8309
|
e.push(r, t);
|
|
8309
8310
|
}
|
|
8310
8311
|
e.exit();
|
|
8311
8312
|
};
|
|
8312
|
-
|
|
8313
|
-
var
|
|
8313
|
+
ap.filterName = "arrays";
|
|
8314
|
+
var op = (e, t, n) => {
|
|
8314
8315
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
8315
8316
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
8316
8317
|
let r = +t;
|
|
8317
8318
|
for (let n in e) {
|
|
8318
8319
|
let i = e[n];
|
|
8319
|
-
if (Array.isArray(i)) if (i[2] ===
|
|
8320
|
+
if (Array.isArray(i)) if (i[2] === Qf) {
|
|
8320
8321
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
8321
8322
|
if (a === +t) return e;
|
|
8322
8323
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
8323
8324
|
} else i[2] === 0 ? Number.parseInt(n.substring(1), 10) <= r && r++ : i.length === 1 && Number.parseInt(n, 10) <= r && r--;
|
|
8324
8325
|
}
|
|
8325
8326
|
return r;
|
|
8326
|
-
},
|
|
8327
|
+
}, sp = (e) => {
|
|
8327
8328
|
if (!e || !e.children) return;
|
|
8328
8329
|
let t = e.delta;
|
|
8329
8330
|
if (t._t !== "a") return;
|
|
@@ -8334,22 +8335,22 @@ var ap = (e, t, n) => {
|
|
|
8334
8335
|
let a = r.newName;
|
|
8335
8336
|
if (a === void 0) {
|
|
8336
8337
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
8337
|
-
a =
|
|
8338
|
+
a = op(n, r.childName, r.result);
|
|
8338
8339
|
}
|
|
8339
8340
|
i[a] !== r.result && (i[a] = r.result);
|
|
8340
8341
|
}
|
|
8341
8342
|
e.setResult(i).exit();
|
|
8342
8343
|
};
|
|
8343
|
-
|
|
8344
|
+
sp.filterName = "arraysCollectChildren";
|
|
8344
8345
|
//#endregion
|
|
8345
8346
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
8346
|
-
var
|
|
8347
|
+
var cp = function(e) {
|
|
8347
8348
|
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();
|
|
8348
8349
|
};
|
|
8349
|
-
|
|
8350
|
+
cp.filterName = "dates";
|
|
8350
8351
|
//#endregion
|
|
8351
8352
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
8352
|
-
var
|
|
8353
|
+
var lp = new Set(["__proto__"]), up = (e) => {
|
|
8353
8354
|
if (!e || !e.children) return;
|
|
8354
8355
|
let t = e.children.length, n = e.result;
|
|
8355
8356
|
for (let r = 0; r < t; r++) {
|
|
@@ -8361,18 +8362,18 @@ var cp = new Set(["__proto__"]), lp = (e) => {
|
|
|
8361
8362
|
}
|
|
8362
8363
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
8363
8364
|
};
|
|
8364
|
-
|
|
8365
|
-
var
|
|
8365
|
+
up.filterName = "collectChildren";
|
|
8366
|
+
var dp = (e) => {
|
|
8366
8367
|
var t;
|
|
8367
8368
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
8368
8369
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
8369
8370
|
for (let t in n) {
|
|
8370
8371
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
8371
|
-
let a = new
|
|
8372
|
+
let a = new Uf(n[t], r[t]);
|
|
8372
8373
|
e.push(a, t);
|
|
8373
8374
|
}
|
|
8374
8375
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
8375
|
-
let n = new
|
|
8376
|
+
let n = new Uf(void 0, r[t]);
|
|
8376
8377
|
e.push(n, t);
|
|
8377
8378
|
}
|
|
8378
8379
|
if (!e.children || e.children.length === 0) {
|
|
@@ -8381,15 +8382,15 @@ var up = (e) => {
|
|
|
8381
8382
|
}
|
|
8382
8383
|
e.exit();
|
|
8383
8384
|
};
|
|
8384
|
-
|
|
8385
|
-
var
|
|
8385
|
+
dp.filterName = "objects";
|
|
8386
|
+
var fp = function(e) {
|
|
8386
8387
|
if (!e.nested) return;
|
|
8387
8388
|
let t = e.delta;
|
|
8388
8389
|
if (t._t) return;
|
|
8389
8390
|
let n = t, r = !1;
|
|
8390
8391
|
for (let t in n) {
|
|
8391
|
-
if (
|
|
8392
|
-
let i = e.left, a = new
|
|
8392
|
+
if (lp.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
8393
|
+
let i = e.left, a = new Wf(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
8393
8394
|
e.push(a, t), r = !0;
|
|
8394
8395
|
}
|
|
8395
8396
|
if (!r) {
|
|
@@ -8398,8 +8399,8 @@ var dp = function(e) {
|
|
|
8398
8399
|
}
|
|
8399
8400
|
e.exit();
|
|
8400
8401
|
};
|
|
8401
|
-
|
|
8402
|
-
var
|
|
8402
|
+
fp.filterName = "objects";
|
|
8403
|
+
var pp = function(e) {
|
|
8403
8404
|
if (!e || !e.children || e.delta._t) return;
|
|
8404
8405
|
if (e.left === null || typeof e.left != "object") {
|
|
8405
8406
|
e.setResult(e.left).exit();
|
|
@@ -8410,17 +8411,17 @@ var fp = function(e) {
|
|
|
8410
8411
|
let n = e.children[r];
|
|
8411
8412
|
if (n === void 0) continue;
|
|
8412
8413
|
let i = n.childName;
|
|
8413
|
-
|
|
8414
|
+
lp.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
8414
8415
|
}
|
|
8415
8416
|
e.setResult(t).exit();
|
|
8416
8417
|
};
|
|
8417
|
-
|
|
8418
|
-
var
|
|
8418
|
+
pp.filterName = "collectChildren";
|
|
8419
|
+
var mp = function(e) {
|
|
8419
8420
|
if (!e.nested || e.delta._t) return;
|
|
8420
8421
|
let t = e.delta, n = !1;
|
|
8421
8422
|
for (let r in t) {
|
|
8422
|
-
if (
|
|
8423
|
-
let i = new
|
|
8423
|
+
if (lp.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
8424
|
+
let i = new Gf(t[r]);
|
|
8424
8425
|
e.push(i, r), n = !0;
|
|
8425
8426
|
}
|
|
8426
8427
|
if (!n) {
|
|
@@ -8429,25 +8430,25 @@ var pp = function(e) {
|
|
|
8429
8430
|
}
|
|
8430
8431
|
e.exit();
|
|
8431
8432
|
};
|
|
8432
|
-
|
|
8433
|
-
var
|
|
8433
|
+
mp.filterName = "objects";
|
|
8434
|
+
var hp = (e) => {
|
|
8434
8435
|
if (!e || !e.children || e.delta._t) return;
|
|
8435
8436
|
let t = e.children.length, n = {};
|
|
8436
8437
|
for (let r = 0; r < t; r++) {
|
|
8437
8438
|
let t = e.children[r];
|
|
8438
8439
|
if (t === void 0) continue;
|
|
8439
8440
|
let i = t.childName;
|
|
8440
|
-
|
|
8441
|
+
lp.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
8441
8442
|
}
|
|
8442
8443
|
e.setResult(n).exit();
|
|
8443
8444
|
};
|
|
8444
|
-
|
|
8445
|
+
hp.filterName = "collectChildren";
|
|
8445
8446
|
//#endregion
|
|
8446
8447
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
8447
|
-
var
|
|
8448
|
-
function
|
|
8448
|
+
var gp = 2, _p = 60, vp = null;
|
|
8449
|
+
function yp(e, t) {
|
|
8449
8450
|
var n;
|
|
8450
|
-
if (!
|
|
8451
|
+
if (!vp) {
|
|
8451
8452
|
let r;
|
|
8452
8453
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
8453
8454
|
else {
|
|
@@ -8455,7 +8456,7 @@ function vp(e, t) {
|
|
|
8455
8456
|
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.");
|
|
8456
8457
|
throw e.diff_match_patch_not_found = !0, e;
|
|
8457
8458
|
}
|
|
8458
|
-
|
|
8459
|
+
vp = {
|
|
8459
8460
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
8460
8461
|
patch: (e, t) => {
|
|
8461
8462
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -8467,17 +8468,17 @@ function vp(e, t) {
|
|
|
8467
8468
|
}
|
|
8468
8469
|
};
|
|
8469
8470
|
}
|
|
8470
|
-
return
|
|
8471
|
+
return vp;
|
|
8471
8472
|
}
|
|
8472
|
-
var
|
|
8473
|
+
var bp = function(e) {
|
|
8473
8474
|
var t, n;
|
|
8474
8475
|
if (e.leftType !== "string") return;
|
|
8475
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
8476
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || _p;
|
|
8476
8477
|
if (r.length < a || i.length < a) {
|
|
8477
8478
|
e.setResult([r, i]).exit();
|
|
8478
8479
|
return;
|
|
8479
8480
|
}
|
|
8480
|
-
let o =
|
|
8481
|
+
let o = yp(e.options);
|
|
8481
8482
|
if (!o) {
|
|
8482
8483
|
e.setResult([r, i]).exit();
|
|
8483
8484
|
return;
|
|
@@ -8486,19 +8487,19 @@ var yp = function(e) {
|
|
|
8486
8487
|
e.setResult([
|
|
8487
8488
|
s(r, i),
|
|
8488
8489
|
0,
|
|
8489
|
-
|
|
8490
|
+
gp
|
|
8490
8491
|
]).exit();
|
|
8491
8492
|
};
|
|
8492
|
-
|
|
8493
|
-
var
|
|
8493
|
+
bp.filterName = "texts";
|
|
8494
|
+
var xp = function(e) {
|
|
8494
8495
|
if (e.nested) return;
|
|
8495
8496
|
let t = e.delta;
|
|
8496
|
-
if (t[2] !==
|
|
8497
|
-
let n = t, r =
|
|
8497
|
+
if (t[2] !== gp) return;
|
|
8498
|
+
let n = t, r = yp(e.options, !0).patch;
|
|
8498
8499
|
e.setResult(r(e.left, n[0])).exit();
|
|
8499
8500
|
};
|
|
8500
|
-
|
|
8501
|
-
var
|
|
8501
|
+
xp.filterName = "texts";
|
|
8502
|
+
var Sp = (e) => {
|
|
8502
8503
|
var t, n, r;
|
|
8503
8504
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
8504
8505
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -8519,21 +8520,21 @@ var xp = (e) => {
|
|
|
8519
8520
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
8520
8521
|
}
|
|
8521
8522
|
return a.join("\n");
|
|
8522
|
-
},
|
|
8523
|
+
}, Cp = function(e) {
|
|
8523
8524
|
if (e.nested) return;
|
|
8524
8525
|
let t = e.delta;
|
|
8525
|
-
if (t[2] !==
|
|
8526
|
+
if (t[2] !== gp) return;
|
|
8526
8527
|
let n = t;
|
|
8527
8528
|
e.setResult([
|
|
8528
|
-
|
|
8529
|
+
Sp(n[0]),
|
|
8529
8530
|
0,
|
|
8530
|
-
|
|
8531
|
+
gp
|
|
8531
8532
|
]).exit();
|
|
8532
8533
|
};
|
|
8533
|
-
|
|
8534
|
+
Cp.filterName = "texts";
|
|
8534
8535
|
//#endregion
|
|
8535
8536
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
8536
|
-
var
|
|
8537
|
+
var wp = function(e) {
|
|
8537
8538
|
if (e.left === e.right) {
|
|
8538
8539
|
e.setResult(void 0).exit();
|
|
8539
8540
|
return;
|
|
@@ -8566,8 +8567,8 @@ var Cp = function(e) {
|
|
|
8566
8567
|
}
|
|
8567
8568
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
8568
8569
|
};
|
|
8569
|
-
|
|
8570
|
-
var
|
|
8570
|
+
wp.filterName = "trivial";
|
|
8571
|
+
var Tp = function(e) {
|
|
8571
8572
|
if (e.delta === void 0) {
|
|
8572
8573
|
e.setResult(e.left).exit();
|
|
8573
8574
|
return;
|
|
@@ -8591,8 +8592,8 @@ var wp = function(e) {
|
|
|
8591
8592
|
}
|
|
8592
8593
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
8593
8594
|
};
|
|
8594
|
-
|
|
8595
|
-
var
|
|
8595
|
+
Tp.filterName = "trivial";
|
|
8596
|
+
var Ep = function(e) {
|
|
8596
8597
|
if (e.delta === void 0) {
|
|
8597
8598
|
e.setResult(e.delta).exit();
|
|
8598
8599
|
return;
|
|
@@ -8613,36 +8614,36 @@ var Tp = function(e) {
|
|
|
8613
8614
|
}
|
|
8614
8615
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
8615
8616
|
};
|
|
8616
|
-
|
|
8617
|
+
Ep.filterName = "trivial";
|
|
8617
8618
|
//#endregion
|
|
8618
8619
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
8619
|
-
var
|
|
8620
|
+
var Dp = class {
|
|
8620
8621
|
constructor(e) {
|
|
8621
|
-
this.processor = new
|
|
8622
|
+
this.processor = new qf(e), this.processor.pipe(new Kf("diff").append(up, wp, cp, bp, dp, tp).shouldHaveResult()), this.processor.pipe(new Kf("patch").append(pp, ip, Tp, xp, fp, rp).shouldHaveResult()), this.processor.pipe(new Kf("reverse").append(hp, sp, Ep, Cp, mp, ap).shouldHaveResult());
|
|
8622
8623
|
}
|
|
8623
8624
|
options(e) {
|
|
8624
8625
|
return this.processor.options(e);
|
|
8625
8626
|
}
|
|
8626
8627
|
diff(e, t) {
|
|
8627
|
-
return this.processor.process(new
|
|
8628
|
+
return this.processor.process(new Uf(e, t));
|
|
8628
8629
|
}
|
|
8629
8630
|
patch(e, t) {
|
|
8630
|
-
return this.processor.process(new
|
|
8631
|
+
return this.processor.process(new Wf(e, t));
|
|
8631
8632
|
}
|
|
8632
8633
|
reverse(e) {
|
|
8633
|
-
return this.processor.process(new
|
|
8634
|
+
return this.processor.process(new Gf(e));
|
|
8634
8635
|
}
|
|
8635
8636
|
unpatch(e, t) {
|
|
8636
8637
|
return this.patch(e, this.reverse(t));
|
|
8637
8638
|
}
|
|
8638
8639
|
clone(e) {
|
|
8639
|
-
return
|
|
8640
|
+
return zf(e);
|
|
8640
8641
|
}
|
|
8641
8642
|
};
|
|
8642
8643
|
//#endregion
|
|
8643
8644
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
8644
|
-
function
|
|
8645
|
-
return new
|
|
8645
|
+
function Op(e) {
|
|
8646
|
+
return new Dp(e);
|
|
8646
8647
|
}
|
|
8647
8648
|
//#endregion
|
|
8648
8649
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -9215,46 +9216,46 @@ $.Diff = function(e, t) {
|
|
|
9215
9216
|
};
|
|
9216
9217
|
//#endregion
|
|
9217
9218
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
9218
|
-
var
|
|
9219
|
+
var kp = (e = {}) => Op({
|
|
9219
9220
|
...e,
|
|
9220
9221
|
textDiff: {
|
|
9221
9222
|
diffMatchPatch: $,
|
|
9222
9223
|
minLength: 120
|
|
9223
9224
|
},
|
|
9224
9225
|
cloneDiffValues: !0
|
|
9225
|
-
}),
|
|
9226
|
+
}), Ap = ["user", "unittemplate"], jp = kp(), Mp = (e, t, n) => {
|
|
9226
9227
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
9227
9228
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
9228
9229
|
let n = r[t[e]];
|
|
9229
9230
|
if (n) return n;
|
|
9230
9231
|
}
|
|
9231
9232
|
return n || "";
|
|
9232
|
-
},
|
|
9233
|
+
}, Np = (e) => {
|
|
9233
9234
|
let t = (e) => Qn(e) ? ur(e) : String(e);
|
|
9234
9235
|
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);
|
|
9235
|
-
},
|
|
9236
|
+
}, Pp = (e) => {
|
|
9236
9237
|
switch (e.length) {
|
|
9237
9238
|
case 1: {
|
|
9238
9239
|
let [t] = e;
|
|
9239
9240
|
return {
|
|
9240
9241
|
type: "created",
|
|
9241
9242
|
before: "",
|
|
9242
|
-
after:
|
|
9243
|
+
after: Np(t)
|
|
9243
9244
|
};
|
|
9244
9245
|
}
|
|
9245
9246
|
case 2: {
|
|
9246
9247
|
let [t, n] = e;
|
|
9247
9248
|
return {
|
|
9248
9249
|
type: "modified",
|
|
9249
|
-
before:
|
|
9250
|
-
after:
|
|
9250
|
+
before: Np(t),
|
|
9251
|
+
after: Np(n)
|
|
9251
9252
|
};
|
|
9252
9253
|
}
|
|
9253
9254
|
case 3: {
|
|
9254
9255
|
let [t] = e;
|
|
9255
9256
|
return {
|
|
9256
9257
|
type: "deleted",
|
|
9257
|
-
before:
|
|
9258
|
+
before: Np(t),
|
|
9258
9259
|
after: ""
|
|
9259
9260
|
};
|
|
9260
9261
|
}
|
|
@@ -9264,15 +9265,15 @@ var Op = (e = {}) => Dp({
|
|
|
9264
9265
|
after: ""
|
|
9265
9266
|
};
|
|
9266
9267
|
}
|
|
9267
|
-
},
|
|
9268
|
-
let r =
|
|
9268
|
+
}, Fp = (e) => Array.isArray(e), Ip = (e, t) => t ? Fp(t) ? t.length === 0 ? e : t.reduce((e, t) => jp.unpatch(Zt(e), Zt(t)), Zt(e)) : jp.unpatch(Zt(e), Zt(t)) : e, Lp = (e) => e.createdAt || e.date, Rp = (e, t, n) => {
|
|
9269
|
+
let r = Lp(e);
|
|
9269
9270
|
if (!r) return {
|
|
9270
9271
|
oldJson: "",
|
|
9271
9272
|
newJson: "",
|
|
9272
9273
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
9273
9274
|
};
|
|
9274
9275
|
let i = t.filter((e) => {
|
|
9275
|
-
let t =
|
|
9276
|
+
let t = Lp(e);
|
|
9276
9277
|
return !!(e.diffs && t && t >= r);
|
|
9277
9278
|
}), a = Array.from({ length: i.length + 1 });
|
|
9278
9279
|
a[0] = Zt(n);
|
|
@@ -9285,7 +9286,7 @@ var Op = (e = {}) => Dp({
|
|
|
9285
9286
|
a[e + 1] = a[e];
|
|
9286
9287
|
continue;
|
|
9287
9288
|
}
|
|
9288
|
-
a[e + 1] =
|
|
9289
|
+
a[e + 1] = Ip(a[e], t);
|
|
9289
9290
|
}
|
|
9290
9291
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
9291
9292
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -9300,10 +9301,10 @@ var Op = (e = {}) => Dp({
|
|
|
9300
9301
|
oldJson: o,
|
|
9301
9302
|
newJson: s
|
|
9302
9303
|
};
|
|
9303
|
-
},
|
|
9304
|
+
}, zp = (e, t, n = {}, r = []) => {
|
|
9304
9305
|
var i;
|
|
9305
9306
|
if (!e) return;
|
|
9306
|
-
let a = [...
|
|
9307
|
+
let a = [...Ap, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
9307
9308
|
Object.keys(e).forEach((i) => {
|
|
9308
9309
|
var o;
|
|
9309
9310
|
let s = e[i];
|
|
@@ -9316,12 +9317,12 @@ var Op = (e = {}) => Dp({
|
|
|
9316
9317
|
nn(s) ? t.push({
|
|
9317
9318
|
deltaFormat: [...s],
|
|
9318
9319
|
path: c
|
|
9319
|
-
}) : un(s) &&
|
|
9320
|
+
}) : un(s) && zp(s, t, n, c);
|
|
9320
9321
|
});
|
|
9321
|
-
},
|
|
9322
|
+
}, Bp = (e, t = {}) => {
|
|
9322
9323
|
let n = [];
|
|
9323
|
-
return e ? (
|
|
9324
|
-
},
|
|
9324
|
+
return e ? (zp(e, n, t), n) : [];
|
|
9325
|
+
}, Vp = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), Hp = (e) => {
|
|
9325
9326
|
if (e == null || e === "") return "empty";
|
|
9326
9327
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
9327
9328
|
if (typeof e == "string") return e;
|
|
@@ -9332,32 +9333,32 @@ var Op = (e = {}) => Dp({
|
|
|
9332
9333
|
} catch {
|
|
9333
9334
|
return String(e);
|
|
9334
9335
|
}
|
|
9335
|
-
},
|
|
9336
|
+
}, Up = (e, t = e.length - 1) => {
|
|
9336
9337
|
if (t >= e.length) return "Value";
|
|
9337
9338
|
let n = e[t];
|
|
9338
|
-
return !n || Yn(n) ?
|
|
9339
|
-
},
|
|
9340
|
-
let o =
|
|
9339
|
+
return !n || Yn(n) ? Up(e, t - 1) : Vp(n);
|
|
9340
|
+
}, Wp = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
9341
|
+
let o = Hp(r), s = Hp(i), c = a ? ` in ${a}` : "";
|
|
9341
9342
|
switch (t) {
|
|
9342
9343
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
9343
9344
|
case "created": return `${e} created ${s}${c}.`;
|
|
9344
9345
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
9345
9346
|
default: return `${e} changed ${n}${c}.`;
|
|
9346
9347
|
}
|
|
9347
|
-
},
|
|
9348
|
+
}, Gp = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => /* @__PURE__ */ y(pl, { table: {
|
|
9348
9349
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
9349
9350
|
rows: n.map((n) => {
|
|
9350
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
9351
|
-
return { cells: [{ value:
|
|
9351
|
+
let { deltaFormat: i, path: a } = n, o = Mp(e, a, r), { type: s, before: c, after: l } = Pp(i);
|
|
9352
|
+
return { cells: [{ value: Wp({
|
|
9352
9353
|
userName: t,
|
|
9353
9354
|
type: s,
|
|
9354
|
-
property:
|
|
9355
|
+
property: Up(a),
|
|
9355
9356
|
before: c,
|
|
9356
9357
|
after: l,
|
|
9357
9358
|
sectionName: o
|
|
9358
9359
|
}) }] };
|
|
9359
9360
|
})
|
|
9360
|
-
} }),
|
|
9361
|
+
} }), Kp = Object.freeze({
|
|
9361
9362
|
summary: {
|
|
9362
9363
|
label: "Summary",
|
|
9363
9364
|
value: "summary"
|
|
@@ -9366,33 +9367,33 @@ var Op = (e = {}) => Dp({
|
|
|
9366
9367
|
label: "Compare",
|
|
9367
9368
|
value: "compare"
|
|
9368
9369
|
}
|
|
9369
|
-
}),
|
|
9370
|
-
let c = [
|
|
9370
|
+
}), qp = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
9371
|
+
let c = [Kp.summary, Kp.compare].map(({ label: e, value: t }) => ({
|
|
9371
9372
|
label: e,
|
|
9372
9373
|
value: t
|
|
9373
9374
|
})), [l, u] = h(c[0]), { diffs: d = void 0 } = e || {};
|
|
9374
9375
|
if (!d) return null;
|
|
9375
|
-
let { oldJson: f, newJson: p, error: m } =
|
|
9376
|
+
let { oldJson: f, newJson: p, error: m } = Rp(e, t, n);
|
|
9376
9377
|
return /* @__PURE__ */ y(zo, {
|
|
9377
9378
|
visible: r,
|
|
9378
9379
|
centered: !0,
|
|
9379
9380
|
children: /* @__PURE__ */ y(_o, { dialog: {
|
|
9380
9381
|
scroll: !0,
|
|
9381
9382
|
heading: "Comparison view",
|
|
9382
|
-
content: /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(
|
|
9383
|
+
content: /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(Wd, {
|
|
9383
9384
|
name: "ViewTab",
|
|
9384
9385
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
9385
9386
|
options: c,
|
|
9386
9387
|
value: l
|
|
9387
|
-
}), l.value === "summary" ? /* @__PURE__ */ y(
|
|
9388
|
+
}), l.value === "summary" ? /* @__PURE__ */ y(Gp, {
|
|
9388
9389
|
userName: e.userName,
|
|
9389
9390
|
sectionNames: a,
|
|
9390
|
-
diffs:
|
|
9391
|
+
diffs: Bp(d, i),
|
|
9391
9392
|
defaultSectionName: o
|
|
9392
9393
|
}) : m ? /* @__PURE__ */ y("div", {
|
|
9393
9394
|
style: { padding: 16 },
|
|
9394
9395
|
children: m
|
|
9395
|
-
}) : /* @__PURE__ */ y(
|
|
9396
|
+
}) : /* @__PURE__ */ y(If, {
|
|
9396
9397
|
oldJson: f,
|
|
9397
9398
|
newJson: p
|
|
9398
9399
|
})] }),
|
|
@@ -9405,7 +9406,7 @@ var Op = (e = {}) => Dp({
|
|
|
9405
9406
|
height: "90vh"
|
|
9406
9407
|
} })
|
|
9407
9408
|
});
|
|
9408
|
-
},
|
|
9409
|
+
}, Jp = [
|
|
9409
9410
|
{
|
|
9410
9411
|
label: "10 / page",
|
|
9411
9412
|
value: 10
|
|
@@ -9418,8 +9419,8 @@ var Op = (e = {}) => Dp({
|
|
|
9418
9419
|
label: "50 / page",
|
|
9419
9420
|
value: 50
|
|
9420
9421
|
}
|
|
9421
|
-
],
|
|
9422
|
-
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s =
|
|
9422
|
+
], Yp = (e, t = {}) => {
|
|
9423
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = Bp(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
9423
9424
|
if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
|
|
9424
9425
|
switch (a) {
|
|
9425
9426
|
case "Created": return `Created by ${r}`;
|
|
@@ -9429,7 +9430,7 @@ var Op = (e = {}) => Dp({
|
|
|
9429
9430
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
9430
9431
|
default: return `Change by ${r}`;
|
|
9431
9432
|
}
|
|
9432
|
-
},
|
|
9433
|
+
}, Xp = ({ 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: g }) => {
|
|
9433
9434
|
let [_, x] = h(!1), [S, C] = h(null), w = (e) => {
|
|
9434
9435
|
if (e.snapshot) {
|
|
9435
9436
|
f == null || f(e.snapshot, e);
|
|
@@ -9448,7 +9449,7 @@ var Op = (e = {}) => Dp({
|
|
|
9448
9449
|
return {
|
|
9449
9450
|
cells: [
|
|
9450
9451
|
{
|
|
9451
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
9452
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : Yp(e, l),
|
|
9452
9453
|
type: "Link",
|
|
9453
9454
|
disabled: n,
|
|
9454
9455
|
onClick: n ? void 0 : () => w(e),
|
|
@@ -9467,8 +9468,8 @@ var Op = (e = {}) => Dp({
|
|
|
9467
9468
|
type: "Static"
|
|
9468
9469
|
},
|
|
9469
9470
|
{
|
|
9470
|
-
value:
|
|
9471
|
-
date:
|
|
9471
|
+
value: Lf({
|
|
9472
|
+
date: Lp(e),
|
|
9472
9473
|
showTime: !0
|
|
9473
9474
|
}),
|
|
9474
9475
|
type: "Static"
|
|
@@ -9511,14 +9512,14 @@ var Op = (e = {}) => Dp({
|
|
|
9511
9512
|
onChange: (e) => {
|
|
9512
9513
|
u(Number(e.target.value));
|
|
9513
9514
|
},
|
|
9514
|
-
options:
|
|
9515
|
+
options: Jp,
|
|
9515
9516
|
value: a
|
|
9516
9517
|
},
|
|
9517
9518
|
onSelectPage: (e) => d(e),
|
|
9518
9519
|
small: !0
|
|
9519
9520
|
} }
|
|
9520
9521
|
} })
|
|
9521
|
-
}), _ && S && S.diffs && /* @__PURE__ */ y(
|
|
9522
|
+
}), _ && S && S.diffs && /* @__PURE__ */ y(qp, {
|
|
9522
9523
|
sectionNames: o,
|
|
9523
9524
|
isOpen: _,
|
|
9524
9525
|
onClose: () => x(!1),
|
|
@@ -9528,7 +9529,7 @@ var Op = (e = {}) => Dp({
|
|
|
9528
9529
|
data: t,
|
|
9529
9530
|
transformDiffsConfig: l
|
|
9530
9531
|
})] });
|
|
9531
|
-
},
|
|
9532
|
+
}, Zp = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
9532
9533
|
let i = window.location.href, a = m(i);
|
|
9533
9534
|
return l(() => {
|
|
9534
9535
|
a.current = i;
|
|
@@ -9551,10 +9552,10 @@ var Op = (e = {}) => Dp({
|
|
|
9551
9552
|
});
|
|
9552
9553
|
};
|
|
9553
9554
|
}, [e, t]), null;
|
|
9554
|
-
},
|
|
9555
|
-
|
|
9556
|
-
e ===
|
|
9555
|
+
}, Qp = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, $p = (e) => {
|
|
9556
|
+
Ef(xf.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
9557
|
+
e === xf.Translations ? Ef(e, Cf(t)) : Ef(e, Qp(t) ? t : { ...t });
|
|
9557
9558
|
});
|
|
9558
9559
|
};
|
|
9559
9560
|
//#endregion
|
|
9560
|
-
export { _i as Accordion, Bi as AccordionWithDefaultToggle, Ca as Actions, Yr as Align,
|
|
9561
|
+
export { _i as Accordion, Bi as AccordionWithDefaultToggle, Ca as Actions, Yr as Align, Xp as AuditLog, la as Badge, Da as Breadcrumb, Ta as BreadcrumbLinkType, K as Button, ka as ButtonGroup, Xr as ButtonPosition, Wi as ButtonType, ja as Card, Ii as CheckBox, di as Chevron, mi as Collapse, Jr as Color, $a as ColorInput, Qa as ColorInputPopover, io as Column, _o as Dialog, If as DiffViewer, U as DisabledContext, lo as Divider, wo as Drawer, Zd as ElementType, wl as Empty, Eu as Field, Su as FileButton, Po as FileInput, Du as Flex, ku as FormRow, Ra as Grid, V as GroupOrder, mo as Heading, Fi as HelpIcon, W as Icon, H as IconType, ko as Input, Do as InputGroup, xc as InputGroupAddon, jo as InputReaderMethods, $r as InputType, wu as Label, Hu as List, ju as ListHeading, Lu as ListSubheading, Wu as Loader, xa as Menu, Zi as MenuCarat, Xi as MenuType, as as Message, $o as MessageType, zo as Modal, ds as NativeSelect, Lc as NumberInput, Zu as OptionDropdown, $u as Page, Sc as Pagination, rf as PopConfirm, Pa as Popover, ed as Portal, nd as PrintHeader, Ho as ProgressBar, rd as RadioButton, cd as RichTextInput, ud as Row, hc as Select, Mf as SettingField, hd as SideBar, _d as Skeleton, qc as Slider, qo as SmartUploadModal, Fo as Spacer, Ui as Spinner, pl as Table, xu as TableImportExport, Wd as Tabs, so as Text, qd as TextArea, Gd as TextLink, Zr as TextTransform, Qr as Theme, Or as Toaster, au as Toggle, G as Tooltip, ef as TopBar, cf as Tree, bf as TreeTable, qr as TriggerType, Ld as UnitInput, Vd as UnitSlider, Af as UnitTable, Zp as UsageTracker, nu as dismissToast, Pd as initializeContext, $p as initializeGuiLibrary, Mo as readFile, tu as toast, fs as useFocus, Io as useKeyboardEvent, hs as useWindowWidth };
|