@restio/ui 0.0.7-SNAPSHOT → 0.0.8-SNAPSHOT
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/restio-ui.es.js
CHANGED
|
@@ -24211,54 +24211,7 @@ var ZB = {
|
|
|
24211
24211
|
}, jV = ({ content: e }) => e ? /* @__PURE__ */ (0, P.jsx)(jB, {
|
|
24212
24212
|
components: AV,
|
|
24213
24213
|
children: /* @__PURE__ */ (0, P.jsx)(e, { components: AV })
|
|
24214
|
-
}) : null
|
|
24215
|
-
//#endregion
|
|
24216
|
-
//#region src/hooks/useVirtualListScroll.tsx
|
|
24217
|
-
function MV({ items: e, itemHeight: t, containerHeight: n, overscan: r = 5 }) {
|
|
24218
|
-
let [i, a] = y(0), o = v(null), s = e.length * t, c = Math.max(0, Math.floor(i / t) - r), l = Math.min(e.length - 1, Math.floor((i + n) / t) + r), u = [];
|
|
24219
|
-
for (let n = c; n <= l; n++) u.push({
|
|
24220
|
-
item: e[n],
|
|
24221
|
-
index: n,
|
|
24222
|
-
offsetTop: n * t
|
|
24223
|
-
});
|
|
24224
|
-
let f = d((e) => {
|
|
24225
|
-
let t = e.target.scrollTop;
|
|
24226
|
-
a(t);
|
|
24227
|
-
}, []);
|
|
24228
|
-
return {
|
|
24229
|
-
virtualItems: u,
|
|
24230
|
-
containerProps: {
|
|
24231
|
-
ref: o,
|
|
24232
|
-
style: {
|
|
24233
|
-
maxHeight: `${n}px`,
|
|
24234
|
-
overflowY: "auto",
|
|
24235
|
-
position: "relative",
|
|
24236
|
-
willChange: "transform"
|
|
24237
|
-
},
|
|
24238
|
-
onScroll: f
|
|
24239
|
-
},
|
|
24240
|
-
innerProps: { style: {
|
|
24241
|
-
height: `${s}px`,
|
|
24242
|
-
position: "relative",
|
|
24243
|
-
width: "100%"
|
|
24244
|
-
} },
|
|
24245
|
-
scrollInfo: {
|
|
24246
|
-
scrollTop: i,
|
|
24247
|
-
viewportHeight: n,
|
|
24248
|
-
totalHeight: s,
|
|
24249
|
-
startIndex: c,
|
|
24250
|
-
endIndex: l
|
|
24251
|
-
},
|
|
24252
|
-
scrollToIndex: (e) => {
|
|
24253
|
-
if (!o.current) return;
|
|
24254
|
-
let r = e * t, i = r + t, a = o.current, s = a.scrollTop, c = s + n;
|
|
24255
|
-
r < s ? a.scrollTop = r : i > c && (a.scrollTop = i - n);
|
|
24256
|
-
}
|
|
24257
|
-
};
|
|
24258
|
-
}
|
|
24259
|
-
//#endregion
|
|
24260
|
-
//#region src/components/list/list.module.css
|
|
24261
|
-
var NV = {
|
|
24214
|
+
}) : null, MV = {
|
|
24262
24215
|
"rst-list": "_rst-list_19ihv_1",
|
|
24263
24216
|
"rst-list-virtualScroll": "_rst-list-virtualScroll_19ihv_11",
|
|
24264
24217
|
"rst-list-input": "_rst-list-input_19ihv_15",
|
|
@@ -24268,7 +24221,7 @@ var NV = {
|
|
|
24268
24221
|
};
|
|
24269
24222
|
//#endregion
|
|
24270
24223
|
//#region src/components/list/list-utils.tsx
|
|
24271
|
-
function
|
|
24224
|
+
function NV(e, t) {
|
|
24272
24225
|
if (!t) return e;
|
|
24273
24226
|
let n = e.toLowerCase(), r = t.toLowerCase(), i = n.indexOf(r);
|
|
24274
24227
|
if (i === -1) return e;
|
|
@@ -24279,14 +24232,14 @@ function PV(e, t) {
|
|
|
24279
24232
|
s
|
|
24280
24233
|
] });
|
|
24281
24234
|
}
|
|
24282
|
-
var
|
|
24235
|
+
var PV = (e, t) => {
|
|
24283
24236
|
let n = e.filter((e) => e.value.toLowerCase().includes(t.toLowerCase())), r = n.some((e) => e.value.toLowerCase() === t.toLowerCase());
|
|
24284
24237
|
return {
|
|
24285
24238
|
filteredOptions: n,
|
|
24286
24239
|
fullOptions: n,
|
|
24287
24240
|
showCreateItem: !!(t && !r)
|
|
24288
24241
|
};
|
|
24289
|
-
},
|
|
24242
|
+
}, FV = ({ e, localSelectedIndex: t, setLocalSelectedIndex: n, filteredOptions: r, fullOptions: i, onClick: a, onKeyDown: o }) => {
|
|
24290
24243
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
24291
24244
|
e.preventDefault();
|
|
24292
24245
|
let i = t;
|
|
@@ -24296,7 +24249,7 @@ var FV = (e, t) => {
|
|
|
24296
24249
|
a?.(e);
|
|
24297
24250
|
}
|
|
24298
24251
|
o?.(e);
|
|
24299
|
-
},
|
|
24252
|
+
}, IV = {
|
|
24300
24253
|
"rst-inputField-wrapper": "_rst-inputField-wrapper_whc7v_1",
|
|
24301
24254
|
"rst-input-wrapper": "_rst-input-wrapper_whc7v_7",
|
|
24302
24255
|
"rst-input-small": "_rst-input-small_whc7v_23",
|
|
@@ -24304,10 +24257,10 @@ var FV = (e, t) => {
|
|
|
24304
24257
|
"rst-input-large": "_rst-input-large_whc7v_33",
|
|
24305
24258
|
"rst-input": "_rst-input_whc7v_1",
|
|
24306
24259
|
"rst-input-error": "_rst-input-error_whc7v_56"
|
|
24307
|
-
},
|
|
24260
|
+
}, LV = ({ error: e, disabled: t, size: n = "default", leadingIcon: r, trailingIcon: i, className: a, children: o }) => {
|
|
24308
24261
|
let s = m(), c = {
|
|
24309
|
-
fieldWrapper: `${
|
|
24310
|
-
inputWrapper: `${
|
|
24262
|
+
fieldWrapper: `${IV["rst-inputField-wrapper"]} ${a || ""}`,
|
|
24263
|
+
inputWrapper: `${IV["rst-input-wrapper"]} ${n ? IV[`rst-input-${n}`] : ""} ${e ? IV["rst-input-error"] : ""}`
|
|
24311
24264
|
};
|
|
24312
24265
|
return /* @__PURE__ */ (0, P.jsx)("div", {
|
|
24313
24266
|
className: c.fieldWrapper,
|
|
@@ -24329,9 +24282,9 @@ var FV = (e, t) => {
|
|
|
24329
24282
|
]
|
|
24330
24283
|
})
|
|
24331
24284
|
});
|
|
24332
|
-
},
|
|
24285
|
+
}, RV = (e) => {
|
|
24333
24286
|
let { value: t, autoFocus: n, placeholder: r, error: i, leadingIcon: a, trailingIcon: o, size: s, onBlur: c, onKeyDown: l, onChange: u, readOnly: d } = e;
|
|
24334
|
-
return /* @__PURE__ */ (0, P.jsx)(
|
|
24287
|
+
return /* @__PURE__ */ (0, P.jsx)(LV, {
|
|
24335
24288
|
...e,
|
|
24336
24289
|
error: i,
|
|
24337
24290
|
leadingIcon: a,
|
|
@@ -24344,111 +24297,168 @@ var FV = (e, t) => {
|
|
|
24344
24297
|
disabled: i,
|
|
24345
24298
|
autoFocus: n,
|
|
24346
24299
|
placeholder: r,
|
|
24347
|
-
className:
|
|
24300
|
+
className: IV["rst-input"],
|
|
24348
24301
|
onChange: (e) => u(e.target.value),
|
|
24349
24302
|
onBlur: c,
|
|
24350
24303
|
onKeyDown: l,
|
|
24351
24304
|
readOnly: d
|
|
24352
24305
|
})
|
|
24353
24306
|
});
|
|
24354
|
-
}
|
|
24355
|
-
|
|
24307
|
+
};
|
|
24308
|
+
//#endregion
|
|
24309
|
+
//#region src/hooks/useFixedVirtualList.tsx
|
|
24310
|
+
function zV({ items: e, itemHeight: t, containerHeight: n, overscan: r = 5 }) {
|
|
24311
|
+
let [i, a] = y(0), o = v(null), s = e.length * t, { startIndex: c, endIndex: l } = _(() => ({
|
|
24312
|
+
startIndex: Math.max(0, Math.floor(i / t) - r),
|
|
24313
|
+
endIndex: Math.min(e.length - 1, Math.floor((i + n) / t) + r)
|
|
24314
|
+
}), [
|
|
24315
|
+
i,
|
|
24316
|
+
t,
|
|
24317
|
+
n,
|
|
24318
|
+
e.length,
|
|
24319
|
+
r
|
|
24320
|
+
]), u = _(() => {
|
|
24321
|
+
let n = [];
|
|
24322
|
+
for (let r = c; r <= l; r++) n.push({
|
|
24323
|
+
item: e[r],
|
|
24324
|
+
index: r,
|
|
24325
|
+
offsetTop: r * t
|
|
24326
|
+
});
|
|
24327
|
+
return n;
|
|
24328
|
+
}, [
|
|
24329
|
+
e,
|
|
24330
|
+
c,
|
|
24331
|
+
l,
|
|
24332
|
+
t
|
|
24333
|
+
]), f = d((e) => {
|
|
24334
|
+
a(e.currentTarget.scrollTop);
|
|
24335
|
+
}, []), p = d((e) => {
|
|
24336
|
+
let r = o.current;
|
|
24337
|
+
if (!r) return;
|
|
24338
|
+
let i = e * t, a = i + t, s = r.scrollTop, c = s + n;
|
|
24339
|
+
i < s ? r.scrollTop = i : a > c && (r.scrollTop = a - n);
|
|
24340
|
+
}, [t, n]);
|
|
24341
|
+
return {
|
|
24342
|
+
containerProps: {
|
|
24343
|
+
ref: o,
|
|
24344
|
+
onScroll: f,
|
|
24345
|
+
style: {
|
|
24346
|
+
maxHeight: `${n}px`,
|
|
24347
|
+
overflowY: "auto",
|
|
24348
|
+
position: "relative"
|
|
24349
|
+
}
|
|
24350
|
+
},
|
|
24351
|
+
innerProps: { style: {
|
|
24352
|
+
height: `${s}px`,
|
|
24353
|
+
position: "relative",
|
|
24354
|
+
width: "100%"
|
|
24355
|
+
} },
|
|
24356
|
+
virtualItems: u,
|
|
24357
|
+
scrollToIndex: p,
|
|
24358
|
+
scrollTop: i,
|
|
24359
|
+
startIndex: c,
|
|
24360
|
+
endIndex: l
|
|
24361
|
+
};
|
|
24362
|
+
}
|
|
24363
|
+
//#endregion
|
|
24364
|
+
//#region src/components/list/list.tsx
|
|
24365
|
+
var BV = ({ id: e, options: t, ref: n, width: r, onClick: i, onKeyDown: a, multiple: o = !1, selectedIndex: s = -1, activeIndex: c = [] }) => {
|
|
24366
|
+
let [l, u] = y(""), [d, f] = y(s);
|
|
24356
24367
|
p(() => {
|
|
24357
|
-
f(
|
|
24358
|
-
}, [
|
|
24359
|
-
let { filteredOptions: m, fullOptions: h } =
|
|
24360
|
-
items:
|
|
24368
|
+
f(s);
|
|
24369
|
+
}, [s]);
|
|
24370
|
+
let { filteredOptions: m, fullOptions: h } = _(() => PV(t, l), [t, l]), { virtualItems: g, containerProps: v, innerProps: b, scrollToIndex: x } = zV({
|
|
24371
|
+
items: m,
|
|
24361
24372
|
itemHeight: 24,
|
|
24362
24373
|
containerHeight: 200,
|
|
24363
24374
|
overscan: 5
|
|
24364
24375
|
});
|
|
24365
24376
|
p(() => {
|
|
24366
|
-
if (
|
|
24367
|
-
|
|
24368
|
-
|
|
24369
|
-
}
|
|
24377
|
+
if (!c?.length) return;
|
|
24378
|
+
let e = m.findIndex((e) => e.value === c[0]);
|
|
24379
|
+
e !== -1 && x(e);
|
|
24370
24380
|
}, [
|
|
24381
|
+
c,
|
|
24371
24382
|
m,
|
|
24372
|
-
|
|
24373
|
-
b
|
|
24383
|
+
x
|
|
24374
24384
|
]);
|
|
24375
|
-
let
|
|
24376
|
-
wrapper:
|
|
24377
|
-
input:
|
|
24378
|
-
container:
|
|
24379
|
-
virtualScroll:
|
|
24380
|
-
listItem:
|
|
24381
|
-
listItemCreate:
|
|
24382
|
-
noElements:
|
|
24385
|
+
let S = {
|
|
24386
|
+
wrapper: MV["rst-list"],
|
|
24387
|
+
input: MV["rst-list-input"],
|
|
24388
|
+
container: MV["rst-list-container"],
|
|
24389
|
+
virtualScroll: MV["rst-list-virtualScroll"],
|
|
24390
|
+
listItem: MV["rst-list-listItem"],
|
|
24391
|
+
listItemCreate: MV["rst-list-listItem-create"],
|
|
24392
|
+
noElements: MV["rst-list-noElements"]
|
|
24383
24393
|
};
|
|
24384
24394
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
24385
24395
|
id: e,
|
|
24386
24396
|
ref: n,
|
|
24387
|
-
className:
|
|
24397
|
+
className: S.wrapper,
|
|
24388
24398
|
"data-component": "list",
|
|
24389
|
-
style: { width:
|
|
24399
|
+
style: { width: r },
|
|
24390
24400
|
children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
24391
|
-
className:
|
|
24392
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
24401
|
+
className: S.input,
|
|
24402
|
+
children: /* @__PURE__ */ (0, P.jsx)(RV, {
|
|
24393
24403
|
autoFocus: !0,
|
|
24394
24404
|
value: l,
|
|
24395
24405
|
placeholder: "Search...",
|
|
24396
24406
|
onChange: (e) => u(e ?? ""),
|
|
24397
|
-
onKeyDown: (e) =>
|
|
24407
|
+
onKeyDown: (e) => FV({
|
|
24398
24408
|
e,
|
|
24399
24409
|
localSelectedIndex: d,
|
|
24400
24410
|
setLocalSelectedIndex: f,
|
|
24401
24411
|
filteredOptions: m,
|
|
24402
24412
|
fullOptions: h,
|
|
24403
|
-
onClick:
|
|
24404
|
-
onKeyDown:
|
|
24413
|
+
onClick: i,
|
|
24414
|
+
onKeyDown: a
|
|
24405
24415
|
})
|
|
24406
24416
|
})
|
|
24407
24417
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
24408
|
-
...
|
|
24409
|
-
className:
|
|
24418
|
+
...v,
|
|
24419
|
+
className: S.container,
|
|
24410
24420
|
tabIndex: 0,
|
|
24411
24421
|
role: "listbox",
|
|
24412
24422
|
"aria-label": "List",
|
|
24413
|
-
"aria-multiselectable":
|
|
24414
|
-
|
|
24423
|
+
"aria-multiselectable": o,
|
|
24424
|
+
"aria-activedescendant": m[d]?.value,
|
|
24425
|
+
onKeyDown: (e) => FV({
|
|
24415
24426
|
e,
|
|
24416
24427
|
localSelectedIndex: d,
|
|
24417
24428
|
setLocalSelectedIndex: f,
|
|
24418
24429
|
filteredOptions: m,
|
|
24419
24430
|
fullOptions: h,
|
|
24420
|
-
onClick:
|
|
24421
|
-
onKeyDown:
|
|
24431
|
+
onClick: i,
|
|
24432
|
+
onKeyDown: a
|
|
24422
24433
|
}),
|
|
24423
|
-
"aria-activedescendant": d >= 0 && d < m.length ? m[d]?.value : void 0,
|
|
24424
24434
|
children: /* @__PURE__ */ (0, P.jsx)("div", {
|
|
24425
|
-
...
|
|
24426
|
-
className:
|
|
24435
|
+
...b,
|
|
24436
|
+
className: S.virtualScroll,
|
|
24427
24437
|
children: m.length === 0 ? /* @__PURE__ */ (0, P.jsx)("div", {
|
|
24428
|
-
className:
|
|
24438
|
+
className: S.noElements,
|
|
24429
24439
|
children: "No elements"
|
|
24430
24440
|
}) : g.map(({ item: e, index: t, offsetTop: n }) => {
|
|
24431
|
-
let
|
|
24441
|
+
let r = c.includes(e.value), a = d === t;
|
|
24432
24442
|
return /* @__PURE__ */ (0, P.jsxs)("li", {
|
|
24433
24443
|
role: "option",
|
|
24434
24444
|
id: e.value,
|
|
24435
|
-
"aria-selected":
|
|
24445
|
+
"aria-selected": a,
|
|
24436
24446
|
tabIndex: -1,
|
|
24437
|
-
className: `${
|
|
24438
|
-
"aria-label":
|
|
24447
|
+
className: `${S.listItem} ${r ? "selected-item" : ""}`,
|
|
24448
|
+
"aria-label": e.value,
|
|
24439
24449
|
style: {
|
|
24440
|
-
height:
|
|
24441
|
-
lineHeight: "
|
|
24450
|
+
height: 24,
|
|
24451
|
+
lineHeight: "20px",
|
|
24442
24452
|
transform: `translateY(${n}px)`
|
|
24443
24453
|
},
|
|
24444
24454
|
onClick: () => {
|
|
24445
|
-
|
|
24455
|
+
i?.(e), f(t);
|
|
24446
24456
|
},
|
|
24447
24457
|
children: [/* @__PURE__ */ (0, P.jsxs)("span", {
|
|
24448
|
-
className:
|
|
24449
|
-
children: [e.leadingVisual && /* @__PURE__ */ (0, P.jsx)(F, { src: e.leadingVisual }),
|
|
24450
|
-
}),
|
|
24451
|
-
},
|
|
24458
|
+
className: S.listItemCreate,
|
|
24459
|
+
children: [e.leadingVisual && /* @__PURE__ */ (0, P.jsx)(F, { src: e.leadingVisual }), NV(e.value, l)]
|
|
24460
|
+
}), r && /* @__PURE__ */ (0, P.jsx)(F, { src: "check" })]
|
|
24461
|
+
}, e.value);
|
|
24452
24462
|
})
|
|
24453
24463
|
})
|
|
24454
24464
|
})]
|
|
@@ -24573,7 +24583,7 @@ var ZV = ({ data: e, bands: n, color: r, period: i, startDate: a }) => {
|
|
|
24573
24583
|
});
|
|
24574
24584
|
}, QV = (e) => {
|
|
24575
24585
|
let { value: t, placeholder: n, autoFocus: r, min: i, max: a, onBlur: o, onKeyDown: s, onChange: c, error: l } = e;
|
|
24576
|
-
return /* @__PURE__ */ (0, P.jsx)(
|
|
24586
|
+
return /* @__PURE__ */ (0, P.jsx)(LV, {
|
|
24577
24587
|
...e,
|
|
24578
24588
|
error: l,
|
|
24579
24589
|
children: ({ id: e, disabled: l }) => /* @__PURE__ */ (0, P.jsx)("input", {
|
|
@@ -24585,7 +24595,7 @@ var ZV = ({ data: e, bands: n, color: r, period: i, startDate: a }) => {
|
|
|
24585
24595
|
autoFocus: r,
|
|
24586
24596
|
min: i,
|
|
24587
24597
|
max: a,
|
|
24588
|
-
className:
|
|
24598
|
+
className: IV["rst-input"],
|
|
24589
24599
|
onChange: (e) => {
|
|
24590
24600
|
let t = e.target.valueAsNumber;
|
|
24591
24601
|
c(Number.isNaN(t) ? void 0 : t);
|
|
@@ -26836,7 +26846,7 @@ var qU = ({ rangeMode: e, onSelectSingle: t, onSelectRange: n }) => {
|
|
|
26836
26846
|
}, w = () => {
|
|
26837
26847
|
!s && !c && r();
|
|
26838
26848
|
}, T = c || t !== "day";
|
|
26839
|
-
return /* @__PURE__ */ (0, P.jsx)(
|
|
26849
|
+
return /* @__PURE__ */ (0, P.jsx)(LV, {
|
|
26840
26850
|
error: i,
|
|
26841
26851
|
leadingIcon: a,
|
|
26842
26852
|
size: o,
|
|
@@ -26848,7 +26858,7 @@ var qU = ({ rangeMode: e, onSelectSingle: t, onSelectRange: n }) => {
|
|
|
26848
26858
|
type: "text",
|
|
26849
26859
|
placeholder: "DD/MM/YYYY",
|
|
26850
26860
|
value: bU(m),
|
|
26851
|
-
className: `${
|
|
26861
|
+
className: `${IV["rst-input"]} ${Z["rst-date-input"]}`,
|
|
26852
26862
|
onChange: b,
|
|
26853
26863
|
onBlur: S,
|
|
26854
26864
|
disabled: e,
|
|
@@ -26871,7 +26881,7 @@ var qU = ({ rangeMode: e, onSelectSingle: t, onSelectRange: n }) => {
|
|
|
26871
26881
|
type: "text",
|
|
26872
26882
|
placeholder: "DD/MM/YYYY",
|
|
26873
26883
|
value: bU(g),
|
|
26874
|
-
className: `${
|
|
26884
|
+
className: `${IV["rst-input"]} ${Z["rst-date-input"]}`,
|
|
26875
26885
|
onChange: x,
|
|
26876
26886
|
onBlur: C,
|
|
26877
26887
|
disabled: e,
|
|
@@ -26995,7 +27005,7 @@ var qU = ({ rangeMode: e, onSelectSingle: t, onSelectRange: n }) => {
|
|
|
26995
27005
|
}, w = () => {
|
|
26996
27006
|
!l && !u && r();
|
|
26997
27007
|
};
|
|
26998
|
-
return /* @__PURE__ */ (0, P.jsx)(
|
|
27008
|
+
return /* @__PURE__ */ (0, P.jsx)(LV, {
|
|
26999
27009
|
error: o,
|
|
27000
27010
|
leadingIcon: s,
|
|
27001
27011
|
size: c,
|
|
@@ -27009,7 +27019,7 @@ var qU = ({ rangeMode: e, onSelectSingle: t, onSelectRange: n }) => {
|
|
|
27009
27019
|
disabled: n,
|
|
27010
27020
|
autoFocus: i,
|
|
27011
27021
|
placeholder: b,
|
|
27012
|
-
className: `${
|
|
27022
|
+
className: `${IV["rst-input"]} ${Z["rst-date-input"]}`,
|
|
27013
27023
|
onChange: S,
|
|
27014
27024
|
onBlur: C,
|
|
27015
27025
|
onKeyDown: f,
|
|
@@ -27101,7 +27111,7 @@ function $U(e, t, n, r, i, a, o, s, c, l) {
|
|
|
27101
27111
|
className: l,
|
|
27102
27112
|
error: s,
|
|
27103
27113
|
disabled: c
|
|
27104
|
-
}) : /* @__PURE__ */ (0, P.jsx)(
|
|
27114
|
+
}) : /* @__PURE__ */ (0, P.jsx)(RV, {
|
|
27105
27115
|
value: "",
|
|
27106
27116
|
onChange: (e) => n(e),
|
|
27107
27117
|
onBlur: r,
|
|
@@ -27110,7 +27120,7 @@ function $U(e, t, n, r, i, a, o, s, c, l) {
|
|
|
27110
27120
|
className: l,
|
|
27111
27121
|
error: s,
|
|
27112
27122
|
disabled: c
|
|
27113
|
-
}) : typeof e == "string" ? /* @__PURE__ */ (0, P.jsx)(
|
|
27123
|
+
}) : typeof e == "string" ? /* @__PURE__ */ (0, P.jsx)(RV, {
|
|
27114
27124
|
value: e,
|
|
27115
27125
|
onChange: (e) => n(e),
|
|
27116
27126
|
onBlur: r,
|
|
@@ -27151,7 +27161,7 @@ function $U(e, t, n, r, i, a, o, s, c, l) {
|
|
|
27151
27161
|
className: l,
|
|
27152
27162
|
error: s,
|
|
27153
27163
|
disabled: c
|
|
27154
|
-
}) : /* @__PURE__ */ (0, P.jsx)(
|
|
27164
|
+
}) : /* @__PURE__ */ (0, P.jsx)(RV, {
|
|
27155
27165
|
value: e,
|
|
27156
27166
|
onChange: (e) => n(e),
|
|
27157
27167
|
onBlur: r,
|
|
@@ -27701,8 +27711,52 @@ function lW({ row: e, onRowClick: t, isEnableEditing: n = !1, "aria-rowindex": r
|
|
|
27701
27711
|
});
|
|
27702
27712
|
}
|
|
27703
27713
|
//#endregion
|
|
27714
|
+
//#region src/hooks/useVirtualListScroll.tsx
|
|
27715
|
+
function uW({ items: e, itemHeight: t, containerHeight: n, overscan: r = 5 }) {
|
|
27716
|
+
let [i, a] = y(0), o = v(null), s = e.length * t, c = Math.max(0, Math.floor(i / t) - r), l = Math.min(e.length - 1, Math.floor((i + n) / t) + r), u = [];
|
|
27717
|
+
for (let n = c; n <= l; n++) u.push({
|
|
27718
|
+
item: e[n],
|
|
27719
|
+
index: n,
|
|
27720
|
+
offsetTop: n * t
|
|
27721
|
+
});
|
|
27722
|
+
let f = d((e) => {
|
|
27723
|
+
let t = e.target.scrollTop;
|
|
27724
|
+
a(t);
|
|
27725
|
+
}, []);
|
|
27726
|
+
return {
|
|
27727
|
+
virtualItems: u,
|
|
27728
|
+
containerProps: {
|
|
27729
|
+
ref: o,
|
|
27730
|
+
style: {
|
|
27731
|
+
maxHeight: `${n}px`,
|
|
27732
|
+
overflowY: "auto",
|
|
27733
|
+
position: "relative",
|
|
27734
|
+
willChange: "transform"
|
|
27735
|
+
},
|
|
27736
|
+
onScroll: f
|
|
27737
|
+
},
|
|
27738
|
+
innerProps: { style: {
|
|
27739
|
+
height: `${s}px`,
|
|
27740
|
+
position: "relative",
|
|
27741
|
+
width: "100%"
|
|
27742
|
+
} },
|
|
27743
|
+
scrollInfo: {
|
|
27744
|
+
scrollTop: i,
|
|
27745
|
+
viewportHeight: n,
|
|
27746
|
+
totalHeight: s,
|
|
27747
|
+
startIndex: c,
|
|
27748
|
+
endIndex: l
|
|
27749
|
+
},
|
|
27750
|
+
scrollToIndex: (e) => {
|
|
27751
|
+
if (!o.current) return;
|
|
27752
|
+
let r = e * t, i = r + t, a = o.current, s = a.scrollTop, c = s + n;
|
|
27753
|
+
r < s ? a.scrollTop = r : i > c && (a.scrollTop = i - n);
|
|
27754
|
+
}
|
|
27755
|
+
};
|
|
27756
|
+
}
|
|
27757
|
+
//#endregion
|
|
27704
27758
|
//#region src/data-components/table-grid/aggregation/aggregation-utils.ts
|
|
27705
|
-
function
|
|
27759
|
+
function dW(e, t) {
|
|
27706
27760
|
if (e.length === 0) return null;
|
|
27707
27761
|
switch (t) {
|
|
27708
27762
|
case "sum": return e.reduce((e, t) => e + t, 0);
|
|
@@ -27713,19 +27767,19 @@ function uW(e, t) {
|
|
|
27713
27767
|
default: return null;
|
|
27714
27768
|
}
|
|
27715
27769
|
}
|
|
27716
|
-
function
|
|
27770
|
+
function fW(e) {
|
|
27717
27771
|
return e == null ? "—" : typeof e == "string" ? e : Number.isInteger(e) ? String(e) : e.toFixed(2);
|
|
27718
27772
|
}
|
|
27719
27773
|
//#endregion
|
|
27720
27774
|
//#region src/data-components/table-grid/footer/table-grid-footer.tsx
|
|
27721
|
-
function
|
|
27775
|
+
function pW({ columnOffsets: e }) {
|
|
27722
27776
|
let { visibleColumns: t, data: n, options: r } = iU(), { stickyFooter: i, enableSelection: a } = r;
|
|
27723
27777
|
if (!i) return null;
|
|
27724
27778
|
let o = a && JH(e), s = (e) => {
|
|
27725
27779
|
if (typeof e.footer == "function") return e.footer({ column: e });
|
|
27726
27780
|
if (typeof e.footer == "object" && e.footer !== null) {
|
|
27727
27781
|
let { aggregation: t } = e.footer, r = e.accessorKey;
|
|
27728
|
-
return r ? dW(
|
|
27782
|
+
return r ? fW(dW(t === "count" ? n.map(() => 1) : n.map((e) => Number(e[r])).filter((e) => !isNaN(e)), t)) : e.footer.label ?? null;
|
|
27729
27783
|
}
|
|
27730
27784
|
return e.footer ?? null;
|
|
27731
27785
|
};
|
|
@@ -27753,20 +27807,20 @@ function fW({ columnOffsets: e }) {
|
|
|
27753
27807
|
}
|
|
27754
27808
|
//#endregion
|
|
27755
27809
|
//#region src/utility-components/chip/chip.module.css
|
|
27756
|
-
var
|
|
27810
|
+
var mW = {
|
|
27757
27811
|
"rst-chip": "_rst-chip_1wj5n_1",
|
|
27758
27812
|
"rst-chip-variant-default": "_rst-chip-variant-default_1wj5n_20",
|
|
27759
27813
|
"rst-chip-variant-primary": "_rst-chip-variant-primary_1wj5n_26",
|
|
27760
27814
|
"rst-chip-variant-outline": "_rst-chip-variant-outline_1wj5n_31",
|
|
27761
27815
|
"rst-chip-size-small": "_rst-chip-size-small_1wj5n_37",
|
|
27762
27816
|
"rst-chip-size-default": "_rst-chip-size-default_1wj5n_41"
|
|
27763
|
-
},
|
|
27817
|
+
}, hW = t.forwardRef(({ children: e, leadingVisual: t, trailingVisual: n, onRemove: r, variant: i = "default", size: a = "small", className: o, draggable: s, onDragStart: c, onDragOver: l, onDragEnd: u, ...d }, f) => /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
27764
27818
|
"data-component": "chip",
|
|
27765
27819
|
ref: f,
|
|
27766
27820
|
className: [
|
|
27767
|
-
|
|
27768
|
-
|
|
27769
|
-
|
|
27821
|
+
mW["rst-chip"],
|
|
27822
|
+
mW[`rst-chip-variant-${i}`],
|
|
27823
|
+
mW[`rst-chip-size-${a}`],
|
|
27770
27824
|
o
|
|
27771
27825
|
].filter(Boolean).join(" "),
|
|
27772
27826
|
...d,
|
|
@@ -27778,7 +27832,7 @@ var pW = {
|
|
|
27778
27832
|
onDragStart: c,
|
|
27779
27833
|
onDragOver: l,
|
|
27780
27834
|
onDragEnd: u,
|
|
27781
|
-
className:
|
|
27835
|
+
className: mW["drag-handle"],
|
|
27782
27836
|
children: /* @__PURE__ */ (0, P.jsx)(L, {
|
|
27783
27837
|
leadingVisual: "drag",
|
|
27784
27838
|
variant: "invisible",
|
|
@@ -27800,14 +27854,14 @@ var pW = {
|
|
|
27800
27854
|
size: "small"
|
|
27801
27855
|
})
|
|
27802
27856
|
]
|
|
27803
|
-
})),
|
|
27857
|
+
})), gW = {
|
|
27804
27858
|
"rst-group-panel": "_rst-group-panel_19fkn_2",
|
|
27805
27859
|
"rst-group-panel-indicator": "_rst-group-panel-indicator_19fkn_10",
|
|
27806
27860
|
"rst-chip-ghost": "_rst-chip-ghost_19fkn_15"
|
|
27807
27861
|
};
|
|
27808
27862
|
//#endregion
|
|
27809
27863
|
//#region src/data-components/table-grid/header/grouping/group-panel.tsx
|
|
27810
|
-
function
|
|
27864
|
+
function _W({ grouping: e, columns: n, onGroupingChange: r }) {
|
|
27811
27865
|
let [i, a] = y(null), [o, s] = y(null), c = v(null), l = (t) => {
|
|
27812
27866
|
r(e.filter((e) => e !== t));
|
|
27813
27867
|
}, u = (t, r) => {
|
|
@@ -27847,19 +27901,19 @@ function gW({ grouping: e, columns: n, onGroupingChange: r }) {
|
|
|
27847
27901
|
t.splice(n, 0, c), r(t);
|
|
27848
27902
|
}
|
|
27849
27903
|
s(null);
|
|
27850
|
-
}, m = o ? /* @__PURE__ */ (0, P.jsx)(
|
|
27904
|
+
}, m = o ? /* @__PURE__ */ (0, P.jsx)(hW, {
|
|
27851
27905
|
draggable: !0,
|
|
27852
|
-
className:
|
|
27906
|
+
className: gW["rst-chip-ghost"],
|
|
27853
27907
|
children: String(o)
|
|
27854
27908
|
}) : null;
|
|
27855
27909
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
27856
27910
|
ref: c,
|
|
27857
|
-
className:
|
|
27911
|
+
className: gW["rst-group-panel"],
|
|
27858
27912
|
onDrop: p,
|
|
27859
27913
|
onDragOver: f,
|
|
27860
27914
|
children: [
|
|
27861
27915
|
/* @__PURE__ */ (0, P.jsx)("div", {
|
|
27862
|
-
className:
|
|
27916
|
+
className: gW["rst-group-panel-indicator"],
|
|
27863
27917
|
children: e.length === 0 ? /* @__PURE__ */ (0, P.jsx)(I, {
|
|
27864
27918
|
variant: "caption",
|
|
27865
27919
|
children: "(Drag to reorder)"
|
|
@@ -27869,7 +27923,7 @@ function gW({ grouping: e, columns: n, onGroupingChange: r }) {
|
|
|
27869
27923
|
let s = n.find((e) => (e.id || e.accessorKey) === r)?.header || r, c = i?.index === a && o && e.includes(o), f = i?.index === a && (!e.includes(o) || !c);
|
|
27870
27924
|
return /* @__PURE__ */ (0, P.jsxs)(t.Fragment, { children: [
|
|
27871
27925
|
f && m,
|
|
27872
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
27926
|
+
/* @__PURE__ */ (0, P.jsx)(hW, {
|
|
27873
27927
|
"data-chip": !0,
|
|
27874
27928
|
draggable: !0,
|
|
27875
27929
|
onDragStart: (e) => u(e, a),
|
|
@@ -27888,7 +27942,7 @@ function gW({ grouping: e, columns: n, onGroupingChange: r }) {
|
|
|
27888
27942
|
}
|
|
27889
27943
|
//#endregion
|
|
27890
27944
|
//#region src/data-components/table-grid/header/table-grid-header.module.css
|
|
27891
|
-
var
|
|
27945
|
+
var vW = {
|
|
27892
27946
|
"rst-table-header": "_rst-table-header_161qw_1",
|
|
27893
27947
|
"rst-table-header-cell": "_rst-table-header-cell_161qw_5",
|
|
27894
27948
|
"rst-table-header-content": "_rst-table-header-content_161qw_18",
|
|
@@ -27897,14 +27951,14 @@ var _W = {
|
|
|
27897
27951
|
"rst-table-header-cell-pinned-right": "_rst-table-header-cell-pinned-right_161qw_43",
|
|
27898
27952
|
"rst-table-header-cell-drag-over": "_rst-table-header-cell-drag-over_161qw_47",
|
|
27899
27953
|
"rst-table-header-sticky": "_rst-table-header-sticky_161qw_52"
|
|
27900
|
-
},
|
|
27954
|
+
}, yW = {
|
|
27901
27955
|
"rst-anchored-navigation": "_rst-anchored-navigation_9n3ru_1",
|
|
27902
27956
|
"rst-anchored-navigation-header": "_rst-anchored-navigation-header_9n3ru_12",
|
|
27903
27957
|
"rst-anchored-navigation-title": "_rst-anchored-navigation-title_9n3ru_19",
|
|
27904
27958
|
"rst-anchored-navigation-back": "_rst-anchored-navigation-back_9n3ru_25",
|
|
27905
27959
|
"rst-anchored-navigation-close": "_rst-anchored-navigation-close_9n3ru_29",
|
|
27906
27960
|
"rst-anchored-navigation-content": "_rst-anchored-navigation-content_9n3ru_33"
|
|
27907
|
-
},
|
|
27961
|
+
}, bW = ({ items: e, anchor: t, isOpen: n, onClose: r, onItemClick: i, width: a = 320, initialTitle: o = "", isClosingOnSelect: s = !1, variant: c = "stack", position: l, align: u }) => {
|
|
27908
27962
|
let [d, f] = y([{
|
|
27909
27963
|
title: o,
|
|
27910
27964
|
items: e
|
|
@@ -27953,14 +28007,14 @@ var _W = {
|
|
|
27953
28007
|
position: l,
|
|
27954
28008
|
align: u,
|
|
27955
28009
|
target: /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
27956
|
-
className:
|
|
28010
|
+
className: yW["rst-anchored-navigation"],
|
|
27957
28011
|
style: { width: a },
|
|
27958
28012
|
role: "menu",
|
|
27959
28013
|
children: [/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
27960
|
-
className:
|
|
28014
|
+
className: yW["rst-anchored-navigation-header"],
|
|
27961
28015
|
children: [
|
|
27962
28016
|
/* @__PURE__ */ (0, P.jsx)("div", {
|
|
27963
|
-
className:
|
|
28017
|
+
className: yW["rst-anchored-navigation-back"],
|
|
27964
28018
|
children: x ? /* @__PURE__ */ (0, P.jsx)(L, {
|
|
27965
28019
|
leadingVisual: "arrow-left",
|
|
27966
28020
|
variant: "invisible",
|
|
@@ -27969,11 +28023,11 @@ var _W = {
|
|
|
27969
28023
|
}) : /* @__PURE__ */ (0, P.jsx)("div", { style: { width: 16 } })
|
|
27970
28024
|
}),
|
|
27971
28025
|
/* @__PURE__ */ (0, P.jsx)("div", {
|
|
27972
|
-
className:
|
|
28026
|
+
className: yW["rst-anchored-navigation-title"],
|
|
27973
28027
|
children: b
|
|
27974
28028
|
}),
|
|
27975
28029
|
/* @__PURE__ */ (0, P.jsx)("div", {
|
|
27976
|
-
className:
|
|
28030
|
+
className: yW["rst-anchored-navigation-close"],
|
|
27977
28031
|
children: /* @__PURE__ */ (0, P.jsx)(L, {
|
|
27978
28032
|
leadingVisual: "close",
|
|
27979
28033
|
variant: "invisible",
|
|
@@ -27983,7 +28037,7 @@ var _W = {
|
|
|
27983
28037
|
})
|
|
27984
28038
|
]
|
|
27985
28039
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
27986
|
-
className:
|
|
28040
|
+
className: yW["rst-anchored-navigation-content"],
|
|
27987
28041
|
children: c === "stack" ? p.items.map(v) : e.map(_)
|
|
27988
28042
|
})]
|
|
27989
28043
|
})
|
|
@@ -27991,9 +28045,9 @@ var _W = {
|
|
|
27991
28045
|
};
|
|
27992
28046
|
//#endregion
|
|
27993
28047
|
//#region src/data-components/table-grid/header/table-grid-column-menu.tsx
|
|
27994
|
-
function
|
|
28048
|
+
function xW({ columnId: e, isOpen: t, onClose: n, anchor: r }) {
|
|
27995
28049
|
let { state: i, setSorting: a, toggleColumnVisibility: o, setPinColumn: s } = iU();
|
|
27996
|
-
return /* @__PURE__ */ (0, P.jsx)(
|
|
28050
|
+
return /* @__PURE__ */ (0, P.jsx)(bW, {
|
|
27997
28051
|
items: [
|
|
27998
28052
|
{
|
|
27999
28053
|
id: "pin",
|
|
@@ -28091,7 +28145,7 @@ function bW({ columnId: e, isOpen: t, onClose: n, anchor: r }) {
|
|
|
28091
28145
|
}
|
|
28092
28146
|
//#endregion
|
|
28093
28147
|
//#region src/data-components/table-grid/header/table-grid-header.tsx
|
|
28094
|
-
function
|
|
28148
|
+
function SW({ columnOffsets: e, onGroupingChange: t }) {
|
|
28095
28149
|
let { columns: n, visibleColumns: r, state: i, setSorting: a, setGrouping: o, setColumnOrder: s, options: c, toggleAllSelection: l, getAllSelectionState: u } = iU(), { enableSorting: d, enableGrouping: f, stickyHeader: p, columnSizing: m = "auto", enableSelection: h, enableColumnReorder: _ } = c, [b, x] = y(null), [S, C] = y(null), w = v(null), T = v(null);
|
|
28096
28150
|
g(() => {
|
|
28097
28151
|
if (!p || !f) return;
|
|
@@ -28143,7 +28197,7 @@ function xW({ columnOffsets: e, onGroupingChange: t }) {
|
|
|
28143
28197
|
};
|
|
28144
28198
|
return /* @__PURE__ */ (0, P.jsxs)("thead", {
|
|
28145
28199
|
ref: w,
|
|
28146
|
-
className: `${
|
|
28200
|
+
className: `${vW["rst-table-header"]} ${p ? vW["rst-table-header-sticky"] : ""}`,
|
|
28147
28201
|
children: [f && /* @__PURE__ */ (0, P.jsx)("tr", {
|
|
28148
28202
|
ref: T,
|
|
28149
28203
|
children: /* @__PURE__ */ (0, P.jsx)("td", {
|
|
@@ -28152,7 +28206,7 @@ function xW({ columnOffsets: e, onGroupingChange: t }) {
|
|
|
28152
28206
|
padding: 0,
|
|
28153
28207
|
borderBottom: "none"
|
|
28154
28208
|
},
|
|
28155
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
28209
|
+
children: /* @__PURE__ */ (0, P.jsx)(_W, {
|
|
28156
28210
|
grouping: i.grouping,
|
|
28157
28211
|
columns: n,
|
|
28158
28212
|
onGroupingChange: O
|
|
@@ -28160,13 +28214,13 @@ function xW({ columnOffsets: e, onGroupingChange: t }) {
|
|
|
28160
28214
|
})
|
|
28161
28215
|
}), /* @__PURE__ */ (0, P.jsxs)("tr", { children: [h && /* @__PURE__ */ (0, P.jsx)("th", {
|
|
28162
28216
|
className: [
|
|
28163
|
-
|
|
28217
|
+
vW["rst-table-header-cell"],
|
|
28164
28218
|
X["rst-table-selection-cell"],
|
|
28165
|
-
E ?
|
|
28219
|
+
E ? vW["rst-table-header-cell-pinned"] : ""
|
|
28166
28220
|
].filter(Boolean).join(" "),
|
|
28167
28221
|
style: E ? { left: 0 } : void 0,
|
|
28168
28222
|
children: /* @__PURE__ */ (0, P.jsx)("div", {
|
|
28169
|
-
className:
|
|
28223
|
+
className: vW["rst-table-header-content"],
|
|
28170
28224
|
children: /* @__PURE__ */ (0, P.jsx)(fe, {
|
|
28171
28225
|
checked: u() === "checked",
|
|
28172
28226
|
indeterminate: u() === "indeterminate",
|
|
@@ -28181,11 +28235,11 @@ function xW({ columnOffsets: e, onGroupingChange: t }) {
|
|
|
28181
28235
|
} : {};
|
|
28182
28236
|
return /* @__PURE__ */ (0, P.jsx)("th", {
|
|
28183
28237
|
className: [
|
|
28184
|
-
|
|
28185
|
-
s ?
|
|
28186
|
-
a ?
|
|
28187
|
-
o ?
|
|
28188
|
-
b === r ?
|
|
28238
|
+
vW["rst-table-header-cell"],
|
|
28239
|
+
s ? vW["rst-table-header-cell-pinned"] : "",
|
|
28240
|
+
a ? vW["rst-table-header-cell-pinned-left"] : "",
|
|
28241
|
+
o ? vW["rst-table-header-cell-pinned-right"] : "",
|
|
28242
|
+
b === r ? vW["rst-table-header-cell-drag-over"] : ""
|
|
28189
28243
|
].filter(Boolean).join(" "),
|
|
28190
28244
|
style: {
|
|
28191
28245
|
...m === "fixed" ? {
|
|
@@ -28204,17 +28258,17 @@ function xW({ columnOffsets: e, onGroupingChange: t }) {
|
|
|
28204
28258
|
onContextMenu: (e) => {
|
|
28205
28259
|
c || (e.preventDefault(), C(r));
|
|
28206
28260
|
},
|
|
28207
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
28261
|
+
children: /* @__PURE__ */ (0, P.jsx)(xW, {
|
|
28208
28262
|
columnId: r,
|
|
28209
28263
|
isOpen: S === r,
|
|
28210
28264
|
onClose: () => C(null),
|
|
28211
28265
|
anchor: /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
28212
|
-
className:
|
|
28266
|
+
className: vW["rst-table-header-content"],
|
|
28213
28267
|
children: [/* @__PURE__ */ (0, P.jsx)(I, {
|
|
28214
28268
|
variant: "title",
|
|
28215
28269
|
children: t.header || r
|
|
28216
28270
|
}), d && !c && t.enableSorting !== !1 && /* @__PURE__ */ (0, P.jsx)("span", {
|
|
28217
|
-
className:
|
|
28271
|
+
className: vW["rst-table-sort-icon"],
|
|
28218
28272
|
children: N(r)
|
|
28219
28273
|
})]
|
|
28220
28274
|
})
|
|
@@ -28225,7 +28279,7 @@ function xW({ columnOffsets: e, onGroupingChange: t }) {
|
|
|
28225
28279
|
}
|
|
28226
28280
|
//#endregion
|
|
28227
28281
|
//#region src/data-components/table-grid/pivot/pivot-utils.ts
|
|
28228
|
-
function
|
|
28282
|
+
function CW(e) {
|
|
28229
28283
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
28230
28284
|
return e.filter((e) => !e.isRowField).forEach((e) => {
|
|
28231
28285
|
let r = `${e.columnFieldId ?? ""}__${e.columnFieldValue ?? ""}`;
|
|
@@ -28238,20 +28292,20 @@ function SW(e) {
|
|
|
28238
28292
|
...n.get(e)
|
|
28239
28293
|
}));
|
|
28240
28294
|
}
|
|
28241
|
-
function
|
|
28295
|
+
function wW(e, t, n) {
|
|
28242
28296
|
let r = n.find((e) => (e.id || String(e.accessorKey ?? "")) === t);
|
|
28243
28297
|
return r ? r.accessorFn ? r.accessorFn(e) : r.accessorKey ? e[r.accessorKey] : null : null;
|
|
28244
28298
|
}
|
|
28245
|
-
function
|
|
28299
|
+
function TW(e, t) {
|
|
28246
28300
|
let n = t.find((t) => (t.id || String(t.accessorKey ?? "")) === e);
|
|
28247
28301
|
return n && n.header ? String(n.header) : e;
|
|
28248
28302
|
}
|
|
28249
|
-
function
|
|
28303
|
+
function EW(e, t, n) {
|
|
28250
28304
|
let { rowFields: r, columnFields: i, valueFields: a } = t, o = /* @__PURE__ */ new Map();
|
|
28251
28305
|
i.forEach((t) => {
|
|
28252
28306
|
let r = /* @__PURE__ */ new Set();
|
|
28253
28307
|
e.forEach((e) => {
|
|
28254
|
-
let i = String(
|
|
28308
|
+
let i = String(wW(e, t, n) ?? "");
|
|
28255
28309
|
r.add(i);
|
|
28256
28310
|
}), o.set(t, Array.from(r).sort());
|
|
28257
28311
|
});
|
|
@@ -28259,13 +28313,13 @@ function TW(e, t, n) {
|
|
|
28259
28313
|
r.forEach((e) => {
|
|
28260
28314
|
s.push({
|
|
28261
28315
|
id: `row__${e}`,
|
|
28262
|
-
label:
|
|
28316
|
+
label: TW(e, n),
|
|
28263
28317
|
isRowField: !0
|
|
28264
28318
|
});
|
|
28265
28319
|
}), i.length > 0 ? i.forEach((e) => {
|
|
28266
28320
|
(o.get(e) ?? []).forEach((t) => {
|
|
28267
28321
|
a.forEach((r) => {
|
|
28268
|
-
let i = r.label ?? `${
|
|
28322
|
+
let i = r.label ?? `${TW(r.field, n)} (${r.aggregation})`;
|
|
28269
28323
|
s.push({
|
|
28270
28324
|
id: `pivot__${e}__${t}__${r.field}__${r.aggregation}`,
|
|
28271
28325
|
label: t,
|
|
@@ -28278,7 +28332,7 @@ function TW(e, t, n) {
|
|
|
28278
28332
|
});
|
|
28279
28333
|
});
|
|
28280
28334
|
}) : a.forEach((e) => {
|
|
28281
|
-
let t = e.label ?? `${
|
|
28335
|
+
let t = e.label ?? `${TW(e.field, n)} (${e.aggregation})`;
|
|
28282
28336
|
s.push({
|
|
28283
28337
|
id: `pivot__${e.field}__${e.aggregation}`,
|
|
28284
28338
|
label: t,
|
|
@@ -28288,7 +28342,7 @@ function TW(e, t, n) {
|
|
|
28288
28342
|
});
|
|
28289
28343
|
let c = /* @__PURE__ */ new Map();
|
|
28290
28344
|
e.forEach((e) => {
|
|
28291
|
-
let t = r.map((t) => String(
|
|
28345
|
+
let t = r.map((t) => String(wW(e, t, n) ?? "")).join("\0");
|
|
28292
28346
|
c.has(t) || c.set(t, []), c.get(t).push(e);
|
|
28293
28347
|
});
|
|
28294
28348
|
let l = [], u = 0;
|
|
@@ -28305,15 +28359,15 @@ function TW(e, t, n) {
|
|
|
28305
28359
|
c[`row__${e}`] = s[e];
|
|
28306
28360
|
}), i.length > 0 ? i.forEach((e) => {
|
|
28307
28361
|
(o.get(e) ?? []).forEach((r) => {
|
|
28308
|
-
let i = t.filter((t) => String(
|
|
28362
|
+
let i = t.filter((t) => String(wW(t, e, n) ?? "") === r);
|
|
28309
28363
|
a.forEach((t) => {
|
|
28310
28364
|
let a = `pivot__${e}__${r}__${t.field}__${t.aggregation}`;
|
|
28311
|
-
c[a] =
|
|
28365
|
+
c[a] = dW(t.aggregation === "count" ? i.map(() => 1) : i.map((e) => Number(wW(e, t.field, n))).filter((e) => !isNaN(e)), t.aggregation);
|
|
28312
28366
|
});
|
|
28313
28367
|
});
|
|
28314
28368
|
}) : a.forEach((e) => {
|
|
28315
28369
|
let r = `pivot__${e.field}__${e.aggregation}`;
|
|
28316
|
-
c[r] =
|
|
28370
|
+
c[r] = dW(e.aggregation === "count" ? t.map(() => 1) : t.map((t) => Number(wW(t, e.field, n))).filter((e) => !isNaN(e)), e.aggregation);
|
|
28317
28371
|
}), l.push({
|
|
28318
28372
|
id: `pivot-row-${u++}`,
|
|
28319
28373
|
rowValues: s,
|
|
@@ -28326,14 +28380,14 @@ function TW(e, t, n) {
|
|
|
28326
28380
|
}
|
|
28327
28381
|
//#endregion
|
|
28328
28382
|
//#region src/data-components/table-grid/pivot/pivot-config-panel.tsx
|
|
28329
|
-
var
|
|
28383
|
+
var DW = [
|
|
28330
28384
|
"sum",
|
|
28331
28385
|
"count",
|
|
28332
28386
|
"avg",
|
|
28333
28387
|
"min",
|
|
28334
28388
|
"max"
|
|
28335
28389
|
];
|
|
28336
|
-
function
|
|
28390
|
+
function OW({ columns: e, config: t, onConfigChange: n }) {
|
|
28337
28391
|
let [r, i] = y(null), a = (e) => e.id || (e.accessorKey ? String(e.accessorKey) : ""), o = new Set([
|
|
28338
28392
|
...t.rowFields,
|
|
28339
28393
|
...t.columnFields,
|
|
@@ -28395,7 +28449,7 @@ function DW({ columns: e, config: t, onConfigChange: n }) {
|
|
|
28395
28449
|
let r = a?.find((e) => e.field === n);
|
|
28396
28450
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
28397
28451
|
className: X["rst-pivot-chip-wrapper"],
|
|
28398
|
-
children: [/* @__PURE__ */ (0, P.jsx)(
|
|
28452
|
+
children: [/* @__PURE__ */ (0, P.jsx)(hW, {
|
|
28399
28453
|
draggable: !0,
|
|
28400
28454
|
onDragStart: (e) => c(e, {
|
|
28401
28455
|
fieldId: n,
|
|
@@ -28405,13 +28459,13 @@ function DW({ columns: e, config: t, onConfigChange: n }) {
|
|
|
28405
28459
|
onRemove: (e) => {
|
|
28406
28460
|
e.stopPropagation(), d(t, n);
|
|
28407
28461
|
},
|
|
28408
|
-
children:
|
|
28462
|
+
children: TW(n, e)
|
|
28409
28463
|
}), t === "values" && r && /* @__PURE__ */ (0, P.jsx)("select", {
|
|
28410
28464
|
className: X["rst-pivot-agg-select"],
|
|
28411
28465
|
value: r.aggregation,
|
|
28412
28466
|
onChange: (e) => f(n, e.target.value),
|
|
28413
28467
|
onClick: (e) => e.stopPropagation(),
|
|
28414
|
-
children:
|
|
28468
|
+
children: DW.map((e) => /* @__PURE__ */ (0, P.jsx)("option", {
|
|
28415
28469
|
value: e,
|
|
28416
28470
|
children: e
|
|
28417
28471
|
}, e))
|
|
@@ -28432,13 +28486,13 @@ function DW({ columns: e, config: t, onConfigChange: n }) {
|
|
|
28432
28486
|
gap: 1,
|
|
28433
28487
|
align: "center",
|
|
28434
28488
|
wrap: !0,
|
|
28435
|
-
children: [s.map((t) => /* @__PURE__ */ (0, P.jsx)(
|
|
28489
|
+
children: [s.map((t) => /* @__PURE__ */ (0, P.jsx)(hW, {
|
|
28436
28490
|
draggable: !0,
|
|
28437
28491
|
onDragStart: (e) => c(e, {
|
|
28438
28492
|
fieldId: t,
|
|
28439
28493
|
fromZone: "available"
|
|
28440
28494
|
}),
|
|
28441
|
-
children:
|
|
28495
|
+
children: TW(t, e)
|
|
28442
28496
|
}, t)), s.length === 0 && /* @__PURE__ */ (0, P.jsx)("span", {
|
|
28443
28497
|
className: X["rst-pivot-zone-placeholder"],
|
|
28444
28498
|
children: "All fields assigned"
|
|
@@ -28456,8 +28510,8 @@ function DW({ columns: e, config: t, onConfigChange: n }) {
|
|
|
28456
28510
|
}
|
|
28457
28511
|
//#endregion
|
|
28458
28512
|
//#region src/data-components/table-grid/pivot/pivot-table.tsx
|
|
28459
|
-
function
|
|
28460
|
-
let { columns: n, rows: r } = e, i = n.filter((e) => e.isRowField), a = n.filter((e) => !e.isRowField), o = a.some((e) => e.columnFieldId !== void 0), s = o ?
|
|
28513
|
+
function kW({ pivotData: e, className: t }) {
|
|
28514
|
+
let { columns: n, rows: r } = e, i = n.filter((e) => e.isRowField), a = n.filter((e) => !e.isRowField), o = a.some((e) => e.columnFieldId !== void 0), s = o ? CW(n) : [], c = [
|
|
28461
28515
|
X["rst-table-grid"],
|
|
28462
28516
|
X["rst-pivot-table"],
|
|
28463
28517
|
t
|
|
@@ -28467,12 +28521,12 @@ function OW({ pivotData: e, className: t }) {
|
|
|
28467
28521
|
children: /* @__PURE__ */ (0, P.jsxs)("table", {
|
|
28468
28522
|
className: c,
|
|
28469
28523
|
children: [/* @__PURE__ */ (0, P.jsx)("thead", {
|
|
28470
|
-
className:
|
|
28524
|
+
className: vW["rst-table-header"],
|
|
28471
28525
|
children: o ? /* @__PURE__ */ (0, P.jsxs)(P.Fragment, { children: [/* @__PURE__ */ (0, P.jsxs)("tr", { children: [i.map((e) => /* @__PURE__ */ (0, P.jsx)("th", {
|
|
28472
28526
|
rowSpan: 2,
|
|
28473
|
-
className: `${
|
|
28527
|
+
className: `${vW["rst-table-header-cell"]} ${vW["rst-pivot-header-row-field"]}`,
|
|
28474
28528
|
children: /* @__PURE__ */ (0, P.jsx)("div", {
|
|
28475
|
-
className:
|
|
28529
|
+
className: vW["rst-table-header-content"],
|
|
28476
28530
|
children: /* @__PURE__ */ (0, P.jsx)(I, {
|
|
28477
28531
|
variant: "title",
|
|
28478
28532
|
children: e.label
|
|
@@ -28480,27 +28534,27 @@ function OW({ pivotData: e, className: t }) {
|
|
|
28480
28534
|
})
|
|
28481
28535
|
}, e.id)), s.map((e) => /* @__PURE__ */ (0, P.jsx)("th", {
|
|
28482
28536
|
colSpan: e.cols.length,
|
|
28483
|
-
className: `${
|
|
28537
|
+
className: `${vW["rst-table-header-cell"]} ${vW["rst-pivot-header-group"]}`,
|
|
28484
28538
|
children: /* @__PURE__ */ (0, P.jsx)("div", {
|
|
28485
|
-
className:
|
|
28539
|
+
className: vW["rst-table-header-content"],
|
|
28486
28540
|
children: /* @__PURE__ */ (0, P.jsx)(I, {
|
|
28487
28541
|
variant: "title",
|
|
28488
28542
|
children: e.label
|
|
28489
28543
|
})
|
|
28490
28544
|
})
|
|
28491
28545
|
}, e.key))] }), /* @__PURE__ */ (0, P.jsx)("tr", { children: a.map((e) => /* @__PURE__ */ (0, P.jsx)("th", {
|
|
28492
|
-
className: `${
|
|
28546
|
+
className: `${vW["rst-table-header-cell"]} ${vW["rst-pivot-header-value"]}`,
|
|
28493
28547
|
children: /* @__PURE__ */ (0, P.jsx)("div", {
|
|
28494
|
-
className:
|
|
28548
|
+
className: vW["rst-table-header-content"],
|
|
28495
28549
|
children: /* @__PURE__ */ (0, P.jsx)(I, {
|
|
28496
28550
|
variant: "title",
|
|
28497
28551
|
children: e.subLabel ?? e.label
|
|
28498
28552
|
})
|
|
28499
28553
|
})
|
|
28500
28554
|
}, e.id)) })] }) : /* @__PURE__ */ (0, P.jsx)("tr", { children: n.map((e) => /* @__PURE__ */ (0, P.jsx)("th", {
|
|
28501
|
-
className: [
|
|
28555
|
+
className: [vW["rst-table-header-cell"], e.isRowField ? vW["rst-pivot-header-row-field"] : X["rst-pivot-header-value"]].filter(Boolean).join(" "),
|
|
28502
28556
|
children: /* @__PURE__ */ (0, P.jsx)("div", {
|
|
28503
|
-
className:
|
|
28557
|
+
className: vW["rst-table-header-content"],
|
|
28504
28558
|
children: /* @__PURE__ */ (0, P.jsx)(I, {
|
|
28505
28559
|
variant: "title",
|
|
28506
28560
|
children: e.label
|
|
@@ -28521,7 +28575,7 @@ function OW({ pivotData: e, className: t }) {
|
|
|
28521
28575
|
className: [X["rst-table-cell"], t.isRowField ? X["rst-pivot-cell-row-field"] : X["rst-pivot-cell-value"]].filter(Boolean).join(" "),
|
|
28522
28576
|
children: /* @__PURE__ */ (0, P.jsx)("div", {
|
|
28523
28577
|
className: X["rst-table-cell-wrapper"],
|
|
28524
|
-
children:
|
|
28578
|
+
children: fW(n)
|
|
28525
28579
|
})
|
|
28526
28580
|
}, t.id);
|
|
28527
28581
|
})
|
|
@@ -28532,7 +28586,7 @@ function OW({ pivotData: e, className: t }) {
|
|
|
28532
28586
|
}
|
|
28533
28587
|
//#endregion
|
|
28534
28588
|
//#region src/data-components/table-grid/sidebar/table-grid-sidebar.tsx
|
|
28535
|
-
function
|
|
28589
|
+
function AW({ enablePivot: e, enableFormula: t, enableColumnVisibility: n, enableAI: r, onPivotClick: i, onFormulaClick: a, onColumnVisibilityClick: o, onAIClick: s }) {
|
|
28536
28590
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
28537
28591
|
className: X["rst-table-sidebar"],
|
|
28538
28592
|
children: [
|
|
@@ -28569,7 +28623,7 @@ function kW({ enablePivot: e, enableFormula: t, enableColumnVisibility: n, enabl
|
|
|
28569
28623
|
}
|
|
28570
28624
|
//#endregion
|
|
28571
28625
|
//#region src/data-components/table-grid/formula/formula-builder.tsx
|
|
28572
|
-
function
|
|
28626
|
+
function jW({ onSave: e, onCancel: t, existingColumns: n, sampleRow: r }) {
|
|
28573
28627
|
let [i, a] = y(""), [o, s] = y(""), [c, l] = y(null), [u, d] = y(null);
|
|
28574
28628
|
return p(() => {
|
|
28575
28629
|
if (!o || !r) {
|
|
@@ -28593,7 +28647,7 @@ function AW({ onSave: e, onCancel: t, existingColumns: n, sampleRow: r }) {
|
|
|
28593
28647
|
children: [/* @__PURE__ */ (0, P.jsx)(I, {
|
|
28594
28648
|
variant: "label",
|
|
28595
28649
|
children: "Column Header"
|
|
28596
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
28650
|
+
}), /* @__PURE__ */ (0, P.jsx)(RV, {
|
|
28597
28651
|
value: i,
|
|
28598
28652
|
onChange: (e) => a(e ?? ""),
|
|
28599
28653
|
placeholder: "e.g. Profit Margin"
|
|
@@ -28607,7 +28661,7 @@ function AW({ onSave: e, onCancel: t, existingColumns: n, sampleRow: r }) {
|
|
|
28607
28661
|
variant: "label",
|
|
28608
28662
|
children: "Formula"
|
|
28609
28663
|
}),
|
|
28610
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
28664
|
+
/* @__PURE__ */ (0, P.jsx)(RV, {
|
|
28611
28665
|
value: o,
|
|
28612
28666
|
onChange: (e) => s(e ?? ""),
|
|
28613
28667
|
placeholder: "e.g. (revenue - cost) / revenue"
|
|
@@ -28665,17 +28719,17 @@ function AW({ onSave: e, onCancel: t, existingColumns: n, sampleRow: r }) {
|
|
|
28665
28719
|
}
|
|
28666
28720
|
//#endregion
|
|
28667
28721
|
//#region src/data-components/table-grid/ai-assistant/ai-assistant-executor.ts
|
|
28668
|
-
function
|
|
28722
|
+
function MW(e, t) {
|
|
28669
28723
|
let n = Math.min(t.length, 20);
|
|
28670
28724
|
for (let r = 0; r < n; r++) {
|
|
28671
28725
|
let n = e.accessorFn ? e.accessorFn(t[r]) : e.accessorKey ? t[r][e.accessorKey] : void 0;
|
|
28672
28726
|
if (n != null) return n;
|
|
28673
28727
|
}
|
|
28674
28728
|
}
|
|
28675
|
-
function
|
|
28729
|
+
function NW(e, t, n, r) {
|
|
28676
28730
|
let i = n.findIndex((e) => VH(e, n.indexOf(e)) === t);
|
|
28677
28731
|
if (i === -1) return e;
|
|
28678
|
-
let a = n[i], o =
|
|
28732
|
+
let a = n[i], o = MW(a, r);
|
|
28679
28733
|
if (typeof o == "boolean") return typeof e == "boolean" ? e : typeof e == "string" ? e.toLowerCase() === "true" : !!e;
|
|
28680
28734
|
if (o instanceof Date) {
|
|
28681
28735
|
if (e instanceof Date) return e;
|
|
@@ -28694,7 +28748,7 @@ function MW(e, t, n, r) {
|
|
|
28694
28748
|
}
|
|
28695
28749
|
return e;
|
|
28696
28750
|
}
|
|
28697
|
-
function
|
|
28751
|
+
function PW(e, t, n) {
|
|
28698
28752
|
let r = n.find((e) => VH(e, n.indexOf(e)) === t.column);
|
|
28699
28753
|
if (!r) return !1;
|
|
28700
28754
|
let i = sW(r, e), a = t.value;
|
|
@@ -28707,7 +28761,7 @@ function NW(e, t, n) {
|
|
|
28707
28761
|
default: return !1;
|
|
28708
28762
|
}
|
|
28709
28763
|
}
|
|
28710
|
-
function
|
|
28764
|
+
function FW() {
|
|
28711
28765
|
let { data: e, columns: t, getRows: n, setSorting: r, setGrouping: i, setColumnOrder: a, toggleColumnVisibility: o, updateCellValue: s, setSelectedRows: c, setPinColumn: l, addFormulaColumn: u, state: f } = iU();
|
|
28712
28766
|
return { execute: d((d) => {
|
|
28713
28767
|
let p = [];
|
|
@@ -28715,7 +28769,7 @@ function PW() {
|
|
|
28715
28769
|
switch (m.tool) {
|
|
28716
28770
|
case "select_rows": {
|
|
28717
28771
|
let e = m.arguments, r = n(), i = /* @__PURE__ */ new Set();
|
|
28718
|
-
for (let n of r) n.isGroup || e.conditions.every((e) =>
|
|
28772
|
+
for (let n of r) n.isGroup || e.conditions.every((e) => PW(n.data, e, t)) && i.add(n.id);
|
|
28719
28773
|
c(i), p.push({
|
|
28720
28774
|
tool: "select_rows",
|
|
28721
28775
|
success: !0,
|
|
@@ -28764,7 +28818,7 @@ function PW() {
|
|
|
28764
28818
|
case "edit_cells": {
|
|
28765
28819
|
let n = m.arguments, r = 0;
|
|
28766
28820
|
for (let i of n.edits) if (i.rowIndex >= 0 && i.rowIndex < e.length) {
|
|
28767
|
-
let n = e[i.rowIndex], a =
|
|
28821
|
+
let n = e[i.rowIndex], a = NW(i.value, i.column, t, e);
|
|
28768
28822
|
s(n, i.column, a), r++;
|
|
28769
28823
|
}
|
|
28770
28824
|
p.push({
|
|
@@ -28846,7 +28900,7 @@ function PW() {
|
|
|
28846
28900
|
case "fill_column_from_column": {
|
|
28847
28901
|
let n = m.arguments, r = 0;
|
|
28848
28902
|
for (let i of n.edits) if (i.rowIndex >= 0 && i.rowIndex < e.length) {
|
|
28849
|
-
let a = e[i.rowIndex], o =
|
|
28903
|
+
let a = e[i.rowIndex], o = NW(i.value, n.targetColumn, t, e);
|
|
28850
28904
|
s(a, n.targetColumn, o), r++;
|
|
28851
28905
|
}
|
|
28852
28906
|
p.push({
|
|
@@ -28887,35 +28941,35 @@ function PW() {
|
|
|
28887
28941
|
}
|
|
28888
28942
|
//#endregion
|
|
28889
28943
|
//#region src/data-components/table-grid/ai-assistant/ai-assistant-schema.ts
|
|
28890
|
-
function
|
|
28944
|
+
function IW(e) {
|
|
28891
28945
|
return e == null ? "unknown" : typeof e == "boolean" ? "boolean" : typeof e == "number" ? "number" : e instanceof Date ? "date" : typeof e == "string" ? !isNaN(Date.parse(e)) && /^\d{4}-\d{2}-\d{2}/.test(e) ? "date" : "string" : "unknown";
|
|
28892
28946
|
}
|
|
28893
|
-
function
|
|
28947
|
+
function LW(e) {
|
|
28894
28948
|
return e.options && e.options.length > 0 ? "string" : e.cellType === XU.NUMBER ? "number" : (e.cellType === XU.TEXT || e.cellType === XU.SELECT || (e.cellType, XU.BUTTON_GROUP), "string");
|
|
28895
28949
|
}
|
|
28896
|
-
function
|
|
28950
|
+
function RW(e, t) {
|
|
28897
28951
|
let n = Math.min(t.length, 20);
|
|
28898
28952
|
for (let r = 0; r < n; r++) {
|
|
28899
28953
|
let n = t[r], i = e.accessorFn ? e.accessorFn(n) : e.accessorKey ? n[e.accessorKey] : void 0;
|
|
28900
28954
|
if (i != null) return i;
|
|
28901
28955
|
}
|
|
28902
28956
|
}
|
|
28903
|
-
function
|
|
28957
|
+
function zW(e, t) {
|
|
28904
28958
|
return e.map((e) => {
|
|
28905
28959
|
let n = e.id ?? (e.accessorKey ? String(e.accessorKey) : void 0);
|
|
28906
28960
|
if (!n) return null;
|
|
28907
|
-
let r = typeof e.header == "string" ? e.header : n, i =
|
|
28961
|
+
let r = typeof e.header == "string" ? e.header : n, i = IW(RW(e, t));
|
|
28908
28962
|
return {
|
|
28909
28963
|
id: n,
|
|
28910
28964
|
label: r,
|
|
28911
|
-
type: i === "unknown" ?
|
|
28965
|
+
type: i === "unknown" ? LW(e) : i,
|
|
28912
28966
|
...e.options && e.options.length > 0 ? { options: e.options.map((e) => e.value) } : {}
|
|
28913
28967
|
};
|
|
28914
28968
|
}).filter((e) => e !== null);
|
|
28915
28969
|
}
|
|
28916
28970
|
//#endregion
|
|
28917
28971
|
//#region src/data-components/table-grid/ai-assistant/ai-assistant-tools.ts
|
|
28918
|
-
var
|
|
28972
|
+
var BW = [
|
|
28919
28973
|
{
|
|
28920
28974
|
name: "select_rows",
|
|
28921
28975
|
description: "Select rows that match the given conditions. Each condition specifies a column, an operator, and a value. Multiple conditions are combined with AND logic.",
|
|
@@ -29058,13 +29112,13 @@ var zW = [
|
|
|
29058
29112
|
];
|
|
29059
29113
|
//#endregion
|
|
29060
29114
|
//#region src/providers/ai-assistant/ai-assistant-validator.ts
|
|
29061
|
-
function
|
|
29115
|
+
function VW(e, t) {
|
|
29062
29116
|
let n = e.toLowerCase(), r = t.find((e) => e.id.toLowerCase() === n);
|
|
29063
29117
|
if (r) return r.id;
|
|
29064
29118
|
let i = t.find((e) => e.label.toLowerCase() === n);
|
|
29065
29119
|
return i ? i.id : null;
|
|
29066
29120
|
}
|
|
29067
|
-
function
|
|
29121
|
+
function HW(e) {
|
|
29068
29122
|
return {
|
|
29069
29123
|
"=": "equals",
|
|
29070
29124
|
"==": "equals",
|
|
@@ -29085,7 +29139,7 @@ function VW(e) {
|
|
|
29085
29139
|
lt: "less_than"
|
|
29086
29140
|
}[e] ?? "equals";
|
|
29087
29141
|
}
|
|
29088
|
-
function
|
|
29142
|
+
function UW(e, t, n, r) {
|
|
29089
29143
|
let i = [], a = [];
|
|
29090
29144
|
for (let o of e) {
|
|
29091
29145
|
let e = t.find((e) => e.name === o.tool);
|
|
@@ -29114,21 +29168,21 @@ function HW(e, t, n, r) {
|
|
|
29114
29168
|
}
|
|
29115
29169
|
//#endregion
|
|
29116
29170
|
//#region src/data-components/table-grid/ai-assistant/ai-assistant-validator.ts
|
|
29117
|
-
function
|
|
29171
|
+
function WW(e, t) {
|
|
29118
29172
|
let n = [], r = [];
|
|
29119
29173
|
for (let i of e) {
|
|
29120
29174
|
if (typeof i != "object" || !i) {
|
|
29121
29175
|
r.push("Invalid condition: expected an object");
|
|
29122
29176
|
continue;
|
|
29123
29177
|
}
|
|
29124
|
-
let e = i, a = String(e.column ?? ""), o =
|
|
29178
|
+
let e = i, a = String(e.column ?? ""), o = VW(a, t);
|
|
29125
29179
|
if (!o) {
|
|
29126
29180
|
r.push(`Unknown column "${a}"`);
|
|
29127
29181
|
continue;
|
|
29128
29182
|
}
|
|
29129
29183
|
n.push({
|
|
29130
29184
|
column: o,
|
|
29131
|
-
operator:
|
|
29185
|
+
operator: HW(String(e.operator ?? "equals")),
|
|
29132
29186
|
value: e.value
|
|
29133
29187
|
});
|
|
29134
29188
|
}
|
|
@@ -29137,7 +29191,7 @@ function UW(e, t) {
|
|
|
29137
29191
|
errors: r
|
|
29138
29192
|
};
|
|
29139
29193
|
}
|
|
29140
|
-
function
|
|
29194
|
+
function GW(e, t) {
|
|
29141
29195
|
let n = {
|
|
29142
29196
|
...e,
|
|
29143
29197
|
arguments: { ...e.arguments }
|
|
@@ -29149,7 +29203,7 @@ function WW(e, t) {
|
|
|
29149
29203
|
resolved: null,
|
|
29150
29204
|
errors: ["Tool \"select_rows\" requires \"conditions\" to be an array"]
|
|
29151
29205
|
};
|
|
29152
|
-
let i =
|
|
29206
|
+
let i = WW(r, t);
|
|
29153
29207
|
if (i.errors.length > 0) return {
|
|
29154
29208
|
resolved: null,
|
|
29155
29209
|
errors: i.errors
|
|
@@ -29158,7 +29212,7 @@ function WW(e, t) {
|
|
|
29158
29212
|
break;
|
|
29159
29213
|
}
|
|
29160
29214
|
case "sort": {
|
|
29161
|
-
let r = String(e.arguments.column ?? ""), i =
|
|
29215
|
+
let r = String(e.arguments.column ?? ""), i = VW(r, t);
|
|
29162
29216
|
if (!i) return {
|
|
29163
29217
|
resolved: null,
|
|
29164
29218
|
errors: [`Sort: unknown column "${r}"`]
|
|
@@ -29170,7 +29224,7 @@ function WW(e, t) {
|
|
|
29170
29224
|
break;
|
|
29171
29225
|
}
|
|
29172
29226
|
case "column_visibility": {
|
|
29173
|
-
let r = String(e.arguments.column ?? ""), i =
|
|
29227
|
+
let r = String(e.arguments.column ?? ""), i = VW(r, t);
|
|
29174
29228
|
if (!i) return {
|
|
29175
29229
|
resolved: null,
|
|
29176
29230
|
errors: [`Column visibility: unknown column "${r}"`]
|
|
@@ -29187,7 +29241,7 @@ function WW(e, t) {
|
|
|
29187
29241
|
resolved: null,
|
|
29188
29242
|
errors: ["Tool \"column_order\" requires \"order\" to be an array"]
|
|
29189
29243
|
};
|
|
29190
|
-
n.arguments = { order: r.map((e) =>
|
|
29244
|
+
n.arguments = { order: r.map((e) => VW(String(e), t) ?? String(e)) };
|
|
29191
29245
|
break;
|
|
29192
29246
|
}
|
|
29193
29247
|
case "edit_cells": {
|
|
@@ -29198,7 +29252,7 @@ function WW(e, t) {
|
|
|
29198
29252
|
};
|
|
29199
29253
|
let i = [];
|
|
29200
29254
|
for (let e of r) {
|
|
29201
|
-
let n = e, r = String(n.column ?? ""), a =
|
|
29255
|
+
let n = e, r = String(n.column ?? ""), a = VW(r, t);
|
|
29202
29256
|
if (!a) return {
|
|
29203
29257
|
resolved: null,
|
|
29204
29258
|
errors: [`Edit: unknown column "${r}"`]
|
|
@@ -29219,7 +29273,7 @@ function WW(e, t) {
|
|
|
29219
29273
|
};
|
|
29220
29274
|
let i = [];
|
|
29221
29275
|
for (let e of r) {
|
|
29222
|
-
let n =
|
|
29276
|
+
let n = VW(String(e), t);
|
|
29223
29277
|
if (!n) return {
|
|
29224
29278
|
resolved: null,
|
|
29225
29279
|
errors: [`Group by: unknown column "${e}"`]
|
|
@@ -29230,7 +29284,7 @@ function WW(e, t) {
|
|
|
29230
29284
|
break;
|
|
29231
29285
|
}
|
|
29232
29286
|
case "pin_column": {
|
|
29233
|
-
let r = String(e.arguments.column ?? ""), i =
|
|
29287
|
+
let r = String(e.arguments.column ?? ""), i = VW(r, t);
|
|
29234
29288
|
if (!i) return {
|
|
29235
29289
|
resolved: null,
|
|
29236
29290
|
errors: [`Pin column: unknown column "${r}"`]
|
|
@@ -29249,7 +29303,7 @@ function WW(e, t) {
|
|
|
29249
29303
|
};
|
|
29250
29304
|
let i = [];
|
|
29251
29305
|
for (let e of r) {
|
|
29252
|
-
let n = e, r = String(n.column ?? ""), a =
|
|
29306
|
+
let n = e, r = String(n.column ?? ""), a = VW(r, t);
|
|
29253
29307
|
if (!a) return {
|
|
29254
29308
|
resolved: null,
|
|
29255
29309
|
errors: [`Multi sort: unknown column "${r}"`]
|
|
@@ -29274,12 +29328,12 @@ function WW(e, t) {
|
|
|
29274
29328
|
};
|
|
29275
29329
|
break;
|
|
29276
29330
|
case "fill_column_from_column": {
|
|
29277
|
-
let r = String(e.arguments.targetColumn ?? ""), i = String(e.arguments.sourceColumn ?? ""), a =
|
|
29331
|
+
let r = String(e.arguments.targetColumn ?? ""), i = String(e.arguments.sourceColumn ?? ""), a = VW(r, t);
|
|
29278
29332
|
if (!a) return {
|
|
29279
29333
|
resolved: null,
|
|
29280
29334
|
errors: [`Fill column: unknown target column "${r}"`]
|
|
29281
29335
|
};
|
|
29282
|
-
let o =
|
|
29336
|
+
let o = VW(i, t);
|
|
29283
29337
|
if (!o) return {
|
|
29284
29338
|
resolved: null,
|
|
29285
29339
|
errors: [`Fill column: unknown source column "${i}"`]
|
|
@@ -29302,23 +29356,23 @@ function WW(e, t) {
|
|
|
29302
29356
|
errors: r
|
|
29303
29357
|
};
|
|
29304
29358
|
}
|
|
29305
|
-
function
|
|
29306
|
-
return
|
|
29359
|
+
function KW(e, t) {
|
|
29360
|
+
return UW(e, BW, t, GW);
|
|
29307
29361
|
}
|
|
29308
29362
|
//#endregion
|
|
29309
29363
|
//#region src/components/textarea/textarea.module.css
|
|
29310
|
-
var
|
|
29364
|
+
var qW = {
|
|
29311
29365
|
"rst-textareaField-wrapper": "_rst-textareaField-wrapper_lahxa_1",
|
|
29312
29366
|
"rst-textarea-wrapper": "_rst-textarea-wrapper_lahxa_23",
|
|
29313
29367
|
"rst-textarea-small": "_rst-textarea-small_lahxa_29",
|
|
29314
29368
|
"rst-textarea-default": "_rst-textarea-default_lahxa_34",
|
|
29315
29369
|
"rst-textarea-large": "_rst-textarea-large_lahxa_39",
|
|
29316
29370
|
"rst-textarea": "_rst-textarea_lahxa_1"
|
|
29317
|
-
},
|
|
29371
|
+
}, JW = ({ value: e, onChange: t, onKeyDown: n, label: r, helperText: i, placeholder: a, ariaLabel: o, ref: s, disabled: c, size: l, rows: u = 3 }) => {
|
|
29318
29372
|
let d = m(), f = `${d}-helper`, p = {
|
|
29319
|
-
fieldWrapper:
|
|
29320
|
-
textareaWrapper: `${
|
|
29321
|
-
textarea:
|
|
29373
|
+
fieldWrapper: qW["rst-textareaField-wrapper"],
|
|
29374
|
+
textareaWrapper: `${qW["rst-textarea-wrapper"]} ${l ? qW[`rst-textarea-${l}`] : ""}`,
|
|
29375
|
+
textarea: qW["rst-textarea"]
|
|
29322
29376
|
};
|
|
29323
29377
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
29324
29378
|
className: p.fieldWrapper,
|
|
@@ -29350,7 +29404,7 @@ var KW = {
|
|
|
29350
29404
|
})
|
|
29351
29405
|
]
|
|
29352
29406
|
});
|
|
29353
|
-
},
|
|
29407
|
+
}, YW = {
|
|
29354
29408
|
"rst-chat-container": "_rst-chat-container_sqjcv_1",
|
|
29355
29409
|
"rst-chat-messages": "_rst-chat-messages_sqjcv_7",
|
|
29356
29410
|
"rst-chat-message": "_rst-chat-message_sqjcv_7",
|
|
@@ -29376,35 +29430,35 @@ var KW = {
|
|
|
29376
29430
|
};
|
|
29377
29431
|
//#endregion
|
|
29378
29432
|
//#region src/custom-components/chat/chat.tsx
|
|
29379
|
-
function
|
|
29433
|
+
function XW({ messages: e, isProcessing: t, emptyStateText: n = "Ask me something...", inputValue: r, onInputChange: i, onKeyDown: a, onSubmit: o, onConfirm: s, onReject: c, quickActions: l, onQuickAction: u }) {
|
|
29380
29434
|
let d = v(null), f = e.some((e) => e.status === "pending");
|
|
29381
29435
|
return p(() => {
|
|
29382
29436
|
d.current?.scrollIntoView({ behavior: "smooth" });
|
|
29383
29437
|
}, [e]), /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
29384
|
-
className:
|
|
29438
|
+
className: YW["rst-chat-container"],
|
|
29385
29439
|
children: [e.length === 0 ? /* @__PURE__ */ (0, P.jsx)("div", {
|
|
29386
|
-
className:
|
|
29440
|
+
className: YW["rst-chat-empty"],
|
|
29387
29441
|
children: n
|
|
29388
29442
|
}) : /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
29389
|
-
className:
|
|
29443
|
+
className: YW["rst-chat-messages"],
|
|
29390
29444
|
children: [
|
|
29391
29445
|
e.map((e) => /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
29392
|
-
className: `${
|
|
29446
|
+
className: `${YW["rst-chat-message"]} ${YW[`rst-chat-message-${e.role}`]}`,
|
|
29393
29447
|
children: [
|
|
29394
29448
|
/* @__PURE__ */ (0, P.jsx)("div", {
|
|
29395
|
-
className: `${
|
|
29449
|
+
className: `${YW["rst-chat-bubble"]} ${YW[`rst-chat-bubble-${e.role}`]}`,
|
|
29396
29450
|
children: e.content
|
|
29397
29451
|
}),
|
|
29398
29452
|
e.status === "pending" && e.toolCalls && e.toolCalls.length > 0 && /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
29399
|
-
className:
|
|
29453
|
+
className: YW["rst-chat-confirmation"],
|
|
29400
29454
|
children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
29401
|
-
className:
|
|
29455
|
+
className: YW["rst-chat-tool-calls"],
|
|
29402
29456
|
children: e.toolCalls.map((e, t) => /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
29403
|
-
className: `${
|
|
29457
|
+
className: `${YW["rst-chat-tool-call"]} ${YW["rst-chat-tool-call-pending"]}`,
|
|
29404
29458
|
children: [/* @__PURE__ */ (0, P.jsx)("span", { children: "◷" }), /* @__PURE__ */ (0, P.jsx)("span", { children: e.tool.replace(/_/g, " ") })]
|
|
29405
29459
|
}, t))
|
|
29406
29460
|
}), /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
29407
|
-
className:
|
|
29461
|
+
className: YW["rst-chat-confirmation-actions"],
|
|
29408
29462
|
children: [/* @__PURE__ */ (0, P.jsx)(L, {
|
|
29409
29463
|
variant: "primary",
|
|
29410
29464
|
value: "Apply",
|
|
@@ -29417,37 +29471,37 @@ function YW({ messages: e, isProcessing: t, emptyStateText: n = "Ask me somethin
|
|
|
29417
29471
|
})]
|
|
29418
29472
|
}),
|
|
29419
29473
|
e.status !== "pending" && e.executionResults && e.executionResults.length > 0 && /* @__PURE__ */ (0, P.jsx)("div", {
|
|
29420
|
-
className:
|
|
29474
|
+
className: YW["rst-chat-tool-calls"],
|
|
29421
29475
|
children: e.executionResults.map((e, t) => /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
29422
|
-
className: `${
|
|
29476
|
+
className: `${YW["rst-chat-tool-call"]} ${e.success ? YW["rst-chat-tool-call-success"] : YW["rst-chat-tool-call-error"]}`,
|
|
29423
29477
|
children: [/* @__PURE__ */ (0, P.jsx)("span", { children: e.success ? "✓" : "✗" }), /* @__PURE__ */ (0, P.jsx)("span", { children: e.message })]
|
|
29424
29478
|
}, t))
|
|
29425
29479
|
})
|
|
29426
29480
|
]
|
|
29427
29481
|
}, e.id)),
|
|
29428
29482
|
t && /* @__PURE__ */ (0, P.jsx)("div", {
|
|
29429
|
-
className:
|
|
29483
|
+
className: YW["rst-chat-processing"],
|
|
29430
29484
|
children: /* @__PURE__ */ (0, P.jsx)("span", { children: "Processing..." })
|
|
29431
29485
|
}),
|
|
29432
29486
|
/* @__PURE__ */ (0, P.jsx)("div", { ref: d })
|
|
29433
29487
|
]
|
|
29434
29488
|
}), /* @__PURE__ */ (0, P.jsxs)("form", {
|
|
29435
|
-
className:
|
|
29489
|
+
className: YW["rst-chat-input-form"],
|
|
29436
29490
|
onSubmit: o,
|
|
29437
29491
|
children: [
|
|
29438
29492
|
l && l.length > 0 && /* @__PURE__ */ (0, P.jsx)("div", {
|
|
29439
|
-
className:
|
|
29493
|
+
className: YW["rst-chat-quick-actions"],
|
|
29440
29494
|
children: l.map((e, n) => /* @__PURE__ */ (0, P.jsx)("button", {
|
|
29441
29495
|
type: "button",
|
|
29442
|
-
className:
|
|
29496
|
+
className: YW["rst-chat-quick-action"],
|
|
29443
29497
|
disabled: t || !!f,
|
|
29444
29498
|
onClick: () => u?.(e.prompt),
|
|
29445
29499
|
children: e.label
|
|
29446
29500
|
}, n))
|
|
29447
29501
|
}),
|
|
29448
29502
|
/* @__PURE__ */ (0, P.jsx)("div", {
|
|
29449
|
-
className:
|
|
29450
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
29503
|
+
className: YW["rst-chat-input-wrapper"],
|
|
29504
|
+
children: /* @__PURE__ */ (0, P.jsx)(JW, {
|
|
29451
29505
|
value: r,
|
|
29452
29506
|
onChange: i,
|
|
29453
29507
|
onKeyDown: a,
|
|
@@ -29457,7 +29511,7 @@ function YW({ messages: e, isProcessing: t, emptyStateText: n = "Ask me somethin
|
|
|
29457
29511
|
})
|
|
29458
29512
|
}),
|
|
29459
29513
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
29460
|
-
className:
|
|
29514
|
+
className: YW["rst-chat-actions"],
|
|
29461
29515
|
children: [/* @__PURE__ */ (0, P.jsx)(L, {
|
|
29462
29516
|
variant: "invisible",
|
|
29463
29517
|
disabled: !0,
|
|
@@ -29476,7 +29530,7 @@ function YW({ messages: e, isProcessing: t, emptyStateText: n = "Ask me somethin
|
|
|
29476
29530
|
}
|
|
29477
29531
|
//#endregion
|
|
29478
29532
|
//#region src/providers/ai-assistant/ai-chat-panel.tsx
|
|
29479
|
-
function
|
|
29533
|
+
function ZW({ aiProvider: e, toolDefinitions: t, schema: n, tableContext: r, onExecute: i, onValidate: a, emptyStateText: o, requiresConfirmation: s, quickActions: c }) {
|
|
29480
29534
|
let [l, u] = y([]), [f, p] = y(""), [m, h] = y(!1), [g, _] = y(null), v = d(async (o) => {
|
|
29481
29535
|
if (!o || m || g) return;
|
|
29482
29536
|
let c = {
|
|
@@ -29573,7 +29627,7 @@ function XW({ aiProvider: e, toolDefinitions: t, schema: n, tableContext: r, onE
|
|
|
29573
29627
|
}]
|
|
29574
29628
|
} : e)), _(null));
|
|
29575
29629
|
}, [g]);
|
|
29576
|
-
return /* @__PURE__ */ (0, P.jsx)(
|
|
29630
|
+
return /* @__PURE__ */ (0, P.jsx)(XW, {
|
|
29577
29631
|
messages: l,
|
|
29578
29632
|
isProcessing: m,
|
|
29579
29633
|
emptyStateText: o,
|
|
@@ -29591,12 +29645,12 @@ function XW({ aiProvider: e, toolDefinitions: t, schema: n, tableContext: r, onE
|
|
|
29591
29645
|
}
|
|
29592
29646
|
//#endregion
|
|
29593
29647
|
//#region src/data-components/table-grid/ai-assistant/ai-assistant-panel.tsx
|
|
29594
|
-
function
|
|
29595
|
-
let { data: r, columns: i, state: a } = iU(), { execute: o } =
|
|
29596
|
-
return /* @__PURE__ */ (0, P.jsx)(
|
|
29648
|
+
function QW({ aiProvider: e, requiresConfirmation: t, quickActions: n }) {
|
|
29649
|
+
let { data: r, columns: i, state: a } = iU(), { execute: o } = FW();
|
|
29650
|
+
return /* @__PURE__ */ (0, P.jsx)(ZW, {
|
|
29597
29651
|
aiProvider: e,
|
|
29598
|
-
toolDefinitions:
|
|
29599
|
-
schema: _(() =>
|
|
29652
|
+
toolDefinitions: BW,
|
|
29653
|
+
schema: _(() => zW(i, r), [i, r]),
|
|
29600
29654
|
tableContext: _(() => {
|
|
29601
29655
|
let e = {};
|
|
29602
29656
|
for (let [t, n] of Object.entries(a.columnPinning)) (n === "left" || n === "right") && (e[t] = n);
|
|
@@ -29614,7 +29668,7 @@ function ZW({ aiProvider: e, requiresConfirmation: t, quickActions: n }) {
|
|
|
29614
29668
|
};
|
|
29615
29669
|
}, [r, a]),
|
|
29616
29670
|
onExecute: o,
|
|
29617
|
-
onValidate: d((e, t) =>
|
|
29671
|
+
onValidate: d((e, t) => KW(e, t), []),
|
|
29618
29672
|
emptyStateText: "Ask me to sort, select rows, hide columns, reorder columns, edit cells, or fill a column based on another.",
|
|
29619
29673
|
requiresConfirmation: t,
|
|
29620
29674
|
quickActions: n
|
|
@@ -29622,13 +29676,13 @@ function ZW({ aiProvider: e, requiresConfirmation: t, quickActions: n }) {
|
|
|
29622
29676
|
}
|
|
29623
29677
|
//#endregion
|
|
29624
29678
|
//#region src/data-components/table-grid/table-grid.tsx
|
|
29625
|
-
var
|
|
29626
|
-
function
|
|
29679
|
+
var $W = 5;
|
|
29680
|
+
function eG({ className: e, virtualizedRowHeight: t = 40, virtualizedContainerHeight: n = 400, onGroupingChange: r, onRowClick: i, loading: a = !1 }) {
|
|
29627
29681
|
let { visibleColumns: o, getRows: s, options: c, state: l } = iU(), { enableEditing: u = !1, enableVirtualization: d = !0, columnSizing: f = "auto" } = c, p = s(), m = _(() => qH(o, l.columnPinning, c.enableSelection ?? !1), [
|
|
29628
29682
|
o,
|
|
29629
29683
|
l.columnPinning,
|
|
29630
29684
|
c.enableSelection
|
|
29631
|
-
]), { virtualItems: h, containerProps: g, scrollInfo: v } =
|
|
29685
|
+
]), { virtualItems: h, containerProps: g, scrollInfo: v } = uW({
|
|
29632
29686
|
items: d ? p : [],
|
|
29633
29687
|
itemHeight: t,
|
|
29634
29688
|
containerHeight: n,
|
|
@@ -29646,12 +29700,12 @@ function $W({ className: e, virtualizedRowHeight: t = 40, virtualizedContainerHe
|
|
|
29646
29700
|
...S,
|
|
29647
29701
|
children: /* @__PURE__ */ (0, P.jsxs)("table", {
|
|
29648
29702
|
className: x,
|
|
29649
|
-
children: [/* @__PURE__ */ (0, P.jsx)(
|
|
29703
|
+
children: [/* @__PURE__ */ (0, P.jsx)(SW, {
|
|
29650
29704
|
columnOffsets: m,
|
|
29651
29705
|
onGroupingChange: r
|
|
29652
29706
|
}), /* @__PURE__ */ (0, P.jsx)("tbody", {
|
|
29653
29707
|
className: X["rst-table-body"],
|
|
29654
|
-
children: Array.from({ length:
|
|
29708
|
+
children: Array.from({ length: $W }).map((e, t) => /* @__PURE__ */ (0, P.jsxs)("tr", {
|
|
29655
29709
|
className: X["rst-table-skeleton-row"],
|
|
29656
29710
|
children: [c.enableSelection && /* @__PURE__ */ (0, P.jsx)("td", {
|
|
29657
29711
|
className: X["rst-table-skeleton-cell"],
|
|
@@ -29674,7 +29728,7 @@ function $W({ className: e, virtualizedRowHeight: t = 40, virtualizedContainerHe
|
|
|
29674
29728
|
children: /* @__PURE__ */ (0, P.jsxs)("table", {
|
|
29675
29729
|
className: x,
|
|
29676
29730
|
children: [
|
|
29677
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
29731
|
+
/* @__PURE__ */ (0, P.jsx)(SW, {
|
|
29678
29732
|
columnOffsets: m,
|
|
29679
29733
|
onGroupingChange: r
|
|
29680
29734
|
}),
|
|
@@ -29724,12 +29778,12 @@ function $W({ className: e, virtualizedRowHeight: t = 40, virtualizedContainerHe
|
|
|
29724
29778
|
}) })
|
|
29725
29779
|
]
|
|
29726
29780
|
}),
|
|
29727
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
29781
|
+
/* @__PURE__ */ (0, P.jsx)(pW, { columnOffsets: m })
|
|
29728
29782
|
]
|
|
29729
29783
|
})
|
|
29730
29784
|
});
|
|
29731
29785
|
}
|
|
29732
|
-
function
|
|
29786
|
+
function tG({ enablePivot: e, enableFormulaBuilder: t, pivotConfig: n, onPivotConfigChange: r, onFormulaColumnAdd: i, aiProvider: a, requiresConfirmation: o, aiQuickActions: s, className: c, virtualizedRowHeight: l, virtualizedContainerHeight: u, onGroupingChange: f, onRowClick: m, loading: h }) {
|
|
29733
29787
|
let { data: g, columns: v, state: b, options: x, toggleColumnVisibility: S } = iU(), { enableColumnVisibility: C, enableAIAssistant: w } = x, [T, E] = y(!1), [D, O] = y(null), [k, A] = y(n ?? {
|
|
29734
29788
|
rowFields: [],
|
|
29735
29789
|
columnFields: [],
|
|
@@ -29749,7 +29803,7 @@ function eG({ enablePivot: e, enableFormulaBuilder: t, pivotConfig: n, onPivotCo
|
|
|
29749
29803
|
O((e) => e === "ai" ? null : "ai");
|
|
29750
29804
|
}, ne = d((e) => {
|
|
29751
29805
|
A(e), r?.(e);
|
|
29752
|
-
}, [r]), re = k.valueFields.length > 0 || k.rowFields.length > 0 || k.columnFields.length > 0, ie = _(() => !T || !re ? null :
|
|
29806
|
+
}, [r]), re = k.valueFields.length > 0 || k.rowFields.length > 0 || k.columnFields.length > 0, ie = _(() => !T || !re ? null : EW(g, k, v), [
|
|
29753
29807
|
g,
|
|
29754
29808
|
k,
|
|
29755
29809
|
v,
|
|
@@ -29761,10 +29815,10 @@ function eG({ enablePivot: e, enableFormulaBuilder: t, pivotConfig: n, onPivotCo
|
|
|
29761
29815
|
children: [
|
|
29762
29816
|
/* @__PURE__ */ (0, P.jsx)("div", {
|
|
29763
29817
|
className: X["rst-table-outer-content"],
|
|
29764
|
-
children: T ? ie ? /* @__PURE__ */ (0, P.jsx)(
|
|
29818
|
+
children: T ? ie ? /* @__PURE__ */ (0, P.jsx)(kW, { pivotData: ie }) : /* @__PURE__ */ (0, P.jsx)("div", {
|
|
29765
29819
|
className: X["rst-pivot-empty"],
|
|
29766
29820
|
children: "Configure the pivot: drag fields to Rows, Columns, or Values in the panel."
|
|
29767
|
-
}) : /* @__PURE__ */ (0, P.jsx)(
|
|
29821
|
+
}) : /* @__PURE__ */ (0, P.jsx)(eG, {
|
|
29768
29822
|
className: c,
|
|
29769
29823
|
virtualizedRowHeight: l,
|
|
29770
29824
|
virtualizedContainerHeight: u,
|
|
@@ -29773,7 +29827,7 @@ function eG({ enablePivot: e, enableFormulaBuilder: t, pivotConfig: n, onPivotCo
|
|
|
29773
29827
|
loading: h
|
|
29774
29828
|
})
|
|
29775
29829
|
}),
|
|
29776
|
-
j && /* @__PURE__ */ (0, P.jsx)(
|
|
29830
|
+
j && /* @__PURE__ */ (0, P.jsx)(AW, {
|
|
29777
29831
|
enablePivot: e,
|
|
29778
29832
|
enableFormula: t,
|
|
29779
29833
|
enableColumnVisibility: C,
|
|
@@ -29800,7 +29854,7 @@ function eG({ enablePivot: e, enableFormulaBuilder: t, pivotConfig: n, onPivotCo
|
|
|
29800
29854
|
})]
|
|
29801
29855
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
29802
29856
|
className: X["rst-table-tool-panel-body"],
|
|
29803
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
29857
|
+
children: /* @__PURE__ */ (0, P.jsx)(OW, {
|
|
29804
29858
|
columns: v,
|
|
29805
29859
|
config: k,
|
|
29806
29860
|
onConfigChange: ne
|
|
@@ -29822,7 +29876,7 @@ function eG({ enablePivot: e, enableFormulaBuilder: t, pivotConfig: n, onPivotCo
|
|
|
29822
29876
|
})]
|
|
29823
29877
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
29824
29878
|
className: X["rst-table-tool-panel-body"],
|
|
29825
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
29879
|
+
children: /* @__PURE__ */ (0, P.jsx)(jW, {
|
|
29826
29880
|
existingColumns: v,
|
|
29827
29881
|
sampleRow: g[0],
|
|
29828
29882
|
onSave: (e) => {
|
|
@@ -29881,7 +29935,7 @@ function eG({ enablePivot: e, enableFormulaBuilder: t, pivotConfig: n, onPivotCo
|
|
|
29881
29935
|
})]
|
|
29882
29936
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
29883
29937
|
className: X["rst-table-tool-panel-body"],
|
|
29884
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
29938
|
+
children: /* @__PURE__ */ (0, P.jsx)(QW, {
|
|
29885
29939
|
aiProvider: a,
|
|
29886
29940
|
requiresConfirmation: o,
|
|
29887
29941
|
quickActions: s
|
|
@@ -29891,7 +29945,7 @@ function eG({ enablePivot: e, enableFormulaBuilder: t, pivotConfig: n, onPivotCo
|
|
|
29891
29945
|
]
|
|
29892
29946
|
});
|
|
29893
29947
|
}
|
|
29894
|
-
function
|
|
29948
|
+
function nG({ data: e, columns: t, getSubRows: n, onDataChange: r, onSelectionChange: i, enableSorting: a, enableSelection: o, enableEditing: s, enableGrouping: c, enableVirtualization: l, stickyHeader: u, stickyFooter: f, columnSizing: p, enableColumnReorder: m, enableColumnVisibility: h, enableAIAssistant: g, aiProvider: v, onFormulaColumnAdd: b, loading: x, ...S }) {
|
|
29895
29949
|
let C = {
|
|
29896
29950
|
enableSorting: a,
|
|
29897
29951
|
enableSelection: o,
|
|
@@ -29915,7 +29969,7 @@ function tG({ data: e, columns: t, getSubRows: n, onDataChange: r, onSelectionCh
|
|
|
29915
29969
|
onSelectionChange: i,
|
|
29916
29970
|
options: C,
|
|
29917
29971
|
addFormulaColumn: k,
|
|
29918
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
29972
|
+
children: /* @__PURE__ */ (0, P.jsx)(tG, {
|
|
29919
29973
|
...S,
|
|
29920
29974
|
loading: x,
|
|
29921
29975
|
onFormulaColumnAdd: k,
|
|
@@ -29925,7 +29979,7 @@ function tG({ data: e, columns: t, getSubRows: n, onDataChange: r, onSelectionCh
|
|
|
29925
29979
|
}
|
|
29926
29980
|
//#endregion
|
|
29927
29981
|
//#region src/providers/ai-assistant/ai-assistant-prompts.ts
|
|
29928
|
-
function
|
|
29982
|
+
function rG(e, t, n) {
|
|
29929
29983
|
let r = e.map((e) => {
|
|
29930
29984
|
let t = ` - id: "${e.id}", label: "${e.label}", type: ${e.type}`;
|
|
29931
29985
|
return e.options && e.options.length > 0 && (t += `, options: [${e.options.map((e) => `"${e}"`).join(", ")}]`), t;
|
|
@@ -29980,7 +30034,7 @@ You MUST respond with valid JSON in the following format:
|
|
|
29980
30034
|
}
|
|
29981
30035
|
//#endregion
|
|
29982
30036
|
//#region src/data-components/table-grid/ai-assistant/ai-assistant-mock.ts
|
|
29983
|
-
var
|
|
30037
|
+
var iG = class {
|
|
29984
30038
|
delay;
|
|
29985
30039
|
constructor(e = 500) {
|
|
29986
30040
|
this.delay = e;
|
|
@@ -30215,24 +30269,24 @@ var rG = class {
|
|
|
30215
30269
|
}
|
|
30216
30270
|
return null;
|
|
30217
30271
|
}
|
|
30218
|
-
},
|
|
30272
|
+
}, aG = {
|
|
30219
30273
|
"rst-shortcut-tooltip": "_rst-shortcut-tooltip_1w51f_2",
|
|
30220
30274
|
fadeIn: "_fadeIn_1w51f_1",
|
|
30221
30275
|
"rst-shortcut-tooltip-content": "_rst-shortcut-tooltip-content_1w51f_15",
|
|
30222
30276
|
"rst-shortcut-tooltip-progress": "_rst-shortcut-tooltip-progress_1w51f_22",
|
|
30223
30277
|
"rst-shortcut-tooltip-progress-bar": "_rst-shortcut-tooltip-progress-bar_1w51f_31"
|
|
30224
|
-
},
|
|
30278
|
+
}, oG = ({ isVisible: e, shortcut: t, functionName: n, holdDuration: r, holdProgress: i = 0, position: a }) => {
|
|
30225
30279
|
if (!e) return null;
|
|
30226
30280
|
let o = r && i > 0 ? Math.min(i / r * 100, 100) : 0;
|
|
30227
30281
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
30228
|
-
className:
|
|
30282
|
+
className: aG["rst-shortcut-tooltip"],
|
|
30229
30283
|
style: {
|
|
30230
30284
|
left: a.x,
|
|
30231
30285
|
top: a.y,
|
|
30232
30286
|
transform: "translate(-50%, calc(-100% - 8px))"
|
|
30233
30287
|
},
|
|
30234
30288
|
children: [/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
30235
|
-
className:
|
|
30289
|
+
className: aG["rst-shortcut-tooltip-content"],
|
|
30236
30290
|
children: [/* @__PURE__ */ (0, P.jsx)(OH, {
|
|
30237
30291
|
keys: t,
|
|
30238
30292
|
showSeparator: !0
|
|
@@ -30241,9 +30295,9 @@ var rG = class {
|
|
|
30241
30295
|
children: n
|
|
30242
30296
|
})]
|
|
30243
30297
|
}), r && r > 0 && /* @__PURE__ */ (0, P.jsx)("div", {
|
|
30244
|
-
className:
|
|
30298
|
+
className: aG["rst-shortcut-tooltip-progress"],
|
|
30245
30299
|
children: /* @__PURE__ */ (0, P.jsx)("div", {
|
|
30246
|
-
className:
|
|
30300
|
+
className: aG["rst-shortcut-tooltip-progress-bar"],
|
|
30247
30301
|
style: {
|
|
30248
30302
|
width: `${o}%`,
|
|
30249
30303
|
minWidth: o > 0 ? "2px" : "0px"
|
|
@@ -30251,7 +30305,7 @@ var rG = class {
|
|
|
30251
30305
|
})
|
|
30252
30306
|
})]
|
|
30253
30307
|
});
|
|
30254
|
-
},
|
|
30308
|
+
}, sG = o(null), cG = ({ children: e }) => {
|
|
30255
30309
|
let [t] = y(/* @__PURE__ */ new Map()), [n, r] = y(/* @__PURE__ */ new Set()), [i, a] = y({
|
|
30256
30310
|
isVisible: !1,
|
|
30257
30311
|
shortcut: [],
|
|
@@ -30357,12 +30411,12 @@ var rG = class {
|
|
|
30357
30411
|
registerComponent: _,
|
|
30358
30412
|
unregisterComponent: b
|
|
30359
30413
|
};
|
|
30360
|
-
return /* @__PURE__ */ (0, P.jsxs)(
|
|
30414
|
+
return /* @__PURE__ */ (0, P.jsxs)(sG.Provider, {
|
|
30361
30415
|
value: S,
|
|
30362
|
-
children: [e, /* @__PURE__ */ (0, P.jsx)(
|
|
30416
|
+
children: [e, /* @__PURE__ */ (0, P.jsx)(oG, { ...i })]
|
|
30363
30417
|
});
|
|
30364
|
-
},
|
|
30365
|
-
let t = f(
|
|
30418
|
+
}, lG = (e = {}) => {
|
|
30419
|
+
let t = f(sG), n = v([]), { scope: r = "component", enabled: i = !0 } = e, a = m(), o = _(() => r === "component" ? `component-${a}` : void 0, [r, a]);
|
|
30366
30420
|
if (!t) throw Error("useShortcut must be used within a ShortcutProvider");
|
|
30367
30421
|
let { registerShortcut: s, unregisterShortcut: c, triggerShortcut: l, registerComponent: u, unregisterComponent: h } = t, g = d((e, t) => {
|
|
30368
30422
|
i && (s(e, t, o), n.current.push(e));
|
|
@@ -30404,21 +30458,21 @@ var rG = class {
|
|
|
30404
30458
|
activate: b,
|
|
30405
30459
|
deactivate: x
|
|
30406
30460
|
};
|
|
30407
|
-
},
|
|
30408
|
-
let e = f(
|
|
30461
|
+
}, uG = o(null), dG = () => {
|
|
30462
|
+
let e = f(uG);
|
|
30409
30463
|
if (!e) throw Error("useScaffold must be used within a Scaffold component");
|
|
30410
30464
|
return e;
|
|
30411
|
-
},
|
|
30465
|
+
}, fG = {
|
|
30412
30466
|
"rst-appbar": "_rst-appbar_1yrtz_2",
|
|
30413
30467
|
"rst-appbar-title": "_rst-appbar-title_1yrtz_12",
|
|
30414
30468
|
"rst-appbar-actions": "_rst-appbar-actions_1yrtz_22"
|
|
30415
|
-
},
|
|
30416
|
-
className: [
|
|
30469
|
+
}, pG = Object.assign(({ children: e, className: t, ...n }) => /* @__PURE__ */ (0, P.jsx)("header", {
|
|
30470
|
+
className: [fG["rst-appbar"], t].filter(Boolean).join(" "),
|
|
30417
30471
|
...n,
|
|
30418
30472
|
children: e
|
|
30419
30473
|
}), {
|
|
30420
30474
|
Title: ({ children: e, className: t, ...n }) => /* @__PURE__ */ (0, P.jsx)("div", {
|
|
30421
|
-
className: [
|
|
30475
|
+
className: [fG["rst-appbar-title"], t].filter(Boolean).join(" "),
|
|
30422
30476
|
...n,
|
|
30423
30477
|
children: /* @__PURE__ */ (0, P.jsx)(I, {
|
|
30424
30478
|
variant: "heading",
|
|
@@ -30426,12 +30480,12 @@ var rG = class {
|
|
|
30426
30480
|
})
|
|
30427
30481
|
}),
|
|
30428
30482
|
Actions: ({ children: e, className: t, ...n }) => /* @__PURE__ */ (0, P.jsx)("div", {
|
|
30429
|
-
className: [
|
|
30483
|
+
className: [fG["rst-appbar-actions"], t].filter(Boolean).join(" "),
|
|
30430
30484
|
...n,
|
|
30431
30485
|
children: e
|
|
30432
30486
|
}),
|
|
30433
30487
|
MenuButton: ({ onClick: e, "aria-label": t = "Toggle menu", ...n }) => {
|
|
30434
|
-
let { toggleSidebar: r } =
|
|
30488
|
+
let { toggleSidebar: r } = dG();
|
|
30435
30489
|
return /* @__PURE__ */ (0, P.jsx)(L, {
|
|
30436
30490
|
variant: "invisible",
|
|
30437
30491
|
leadingVisual: "menu",
|
|
@@ -30441,17 +30495,17 @@ var rG = class {
|
|
|
30441
30495
|
});
|
|
30442
30496
|
}
|
|
30443
30497
|
});
|
|
30444
|
-
|
|
30498
|
+
pG.displayName = "AppBar";
|
|
30445
30499
|
//#endregion
|
|
30446
30500
|
//#region src/framework-components/breadcrumbs/breadcrumbs.module.css
|
|
30447
|
-
var
|
|
30501
|
+
var mG = {
|
|
30448
30502
|
"rst-breadcrumbs": "_rst-breadcrumbs_1tams_1",
|
|
30449
30503
|
"rst-breadcrumbs-list": "_rst-breadcrumbs-list_1tams_6",
|
|
30450
30504
|
"rst-breadcrumbs-separator": "_rst-breadcrumbs-separator_1tams_16"
|
|
30451
|
-
},
|
|
30505
|
+
}, hG = ({ items: e, collapsThreshold: n = 3, ...r }) => {
|
|
30452
30506
|
let [i, a] = y(!1), o = e.length > n, s = () => {
|
|
30453
30507
|
if (!o) return e.map((n, r) => /* @__PURE__ */ (0, P.jsxs)(t.Fragment, { children: [r > 0 && /* @__PURE__ */ (0, P.jsx)("span", {
|
|
30454
|
-
className:
|
|
30508
|
+
className: mG["rst-breadcrumbs-separator"],
|
|
30455
30509
|
children: "/"
|
|
30456
30510
|
}), r === e.length - 1 ? /* @__PURE__ */ (0, P.jsx)(I, {
|
|
30457
30511
|
variant: "title",
|
|
@@ -30469,7 +30523,7 @@ var pG = {
|
|
|
30469
30523
|
value: n.label
|
|
30470
30524
|
}),
|
|
30471
30525
|
/* @__PURE__ */ (0, P.jsx)("span", {
|
|
30472
|
-
className:
|
|
30526
|
+
className: mG["rst-breadcrumbs-separator"],
|
|
30473
30527
|
children: "/"
|
|
30474
30528
|
}),
|
|
30475
30529
|
/* @__PURE__ */ (0, P.jsx)(me, {
|
|
@@ -30490,7 +30544,7 @@ var pG = {
|
|
|
30490
30544
|
})
|
|
30491
30545
|
}),
|
|
30492
30546
|
/* @__PURE__ */ (0, P.jsx)("span", {
|
|
30493
|
-
className:
|
|
30547
|
+
className: mG["rst-breadcrumbs-separator"],
|
|
30494
30548
|
children: "/"
|
|
30495
30549
|
}),
|
|
30496
30550
|
/* @__PURE__ */ (0, P.jsx)(I, {
|
|
@@ -30500,22 +30554,22 @@ var pG = {
|
|
|
30500
30554
|
] });
|
|
30501
30555
|
};
|
|
30502
30556
|
return /* @__PURE__ */ (0, P.jsx)("nav", {
|
|
30503
|
-
className:
|
|
30557
|
+
className: mG["rst-breadcrumbs"],
|
|
30504
30558
|
"aria-label": "Breadcrumb",
|
|
30505
30559
|
...r,
|
|
30506
30560
|
children: /* @__PURE__ */ (0, P.jsx)("ol", {
|
|
30507
|
-
className:
|
|
30561
|
+
className: mG["rst-breadcrumbs-list"],
|
|
30508
30562
|
children: s()
|
|
30509
30563
|
})
|
|
30510
30564
|
});
|
|
30511
|
-
},
|
|
30512
|
-
let e = f(
|
|
30565
|
+
}, gG = o(void 0), _G = () => {
|
|
30566
|
+
let e = f(gG);
|
|
30513
30567
|
if (!e) throw Error("Sidebar compound components must be used within <Sidebar>");
|
|
30514
30568
|
return e;
|
|
30515
|
-
},
|
|
30516
|
-
let { isOpen: t, setHoveringLogo: n, isHoveringLogo: r, toggle: i } =
|
|
30569
|
+
}, vG = { "rst-logo-container": "_rst-logo-container_66wnp_1" }, yG = ({ logo: e }) => {
|
|
30570
|
+
let { isOpen: t, setHoveringLogo: n, isHoveringLogo: r, toggle: i } = _G();
|
|
30517
30571
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
30518
|
-
className: { logoContainer: `${
|
|
30572
|
+
className: { logoContainer: `${vG["rst-logo-container"]}` }.logoContainer,
|
|
30519
30573
|
children: [!t && r ? /* @__PURE__ */ (0, P.jsx)(L, {
|
|
30520
30574
|
leadingVisual: "dock-right-arrow",
|
|
30521
30575
|
onClick: i
|
|
@@ -30530,13 +30584,13 @@ var pG = {
|
|
|
30530
30584
|
leadingVisual: "dock-left-arrow"
|
|
30531
30585
|
})]
|
|
30532
30586
|
});
|
|
30533
|
-
},
|
|
30587
|
+
}, bG = {
|
|
30534
30588
|
"rst-sidebar": "_rst-sidebar_nmzg6_1",
|
|
30535
30589
|
"rst-sidebar-section": "_rst-sidebar-section_nmzg6_12",
|
|
30536
30590
|
"rst-sidebar-user": "_rst-sidebar-user_nmzg6_19"
|
|
30537
|
-
},
|
|
30538
|
-
let { isSidebarOpen: t, toggleSidebar: n, isHoveringLogo: r, setHoveringLogo: i } =
|
|
30539
|
-
return /* @__PURE__ */ (0, P.jsx)(
|
|
30591
|
+
}, xG = ({ children: e }) => {
|
|
30592
|
+
let { isSidebarOpen: t, toggleSidebar: n, isHoveringLogo: r, setHoveringLogo: i } = dG(), a = n, o = { sidebar: `${bG["rst-sidebar"]}` };
|
|
30593
|
+
return /* @__PURE__ */ (0, P.jsx)(gG.Provider, {
|
|
30540
30594
|
value: {
|
|
30541
30595
|
isOpen: t,
|
|
30542
30596
|
toggle: a,
|
|
@@ -30553,8 +30607,8 @@ var pG = {
|
|
|
30553
30607
|
})
|
|
30554
30608
|
});
|
|
30555
30609
|
};
|
|
30556
|
-
|
|
30557
|
-
let { isOpen: i } =
|
|
30610
|
+
xG.displayName = "Sidebar", xG.Logo = yG, xG.Item = ({ leadingVisual: e, label: t, shortcut: n, onClick: r }) => {
|
|
30611
|
+
let { isOpen: i } = _G();
|
|
30558
30612
|
return i ? /* @__PURE__ */ (0, P.jsx)(MH.Item, {
|
|
30559
30613
|
leadingVisual: e,
|
|
30560
30614
|
"aria-label": t,
|
|
@@ -30567,8 +30621,8 @@ bG.displayName = "Sidebar", bG.Logo = vG, bG.Item = ({ leadingVisual: e, label:
|
|
|
30567
30621
|
variant: "invisible",
|
|
30568
30622
|
onClick: () => r
|
|
30569
30623
|
});
|
|
30570
|
-
},
|
|
30571
|
-
let n = { sectionContainer: `${
|
|
30624
|
+
}, xG.Section = ({ title: e, children: t }) => {
|
|
30625
|
+
let n = { sectionContainer: `${bG["rst-sidebar-section"]}` }, { isOpen: r } = _G();
|
|
30572
30626
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
30573
30627
|
className: n.sectionContainer,
|
|
30574
30628
|
children: [e && r && /* @__PURE__ */ (0, P.jsx)("div", { children: /* @__PURE__ */ (0, P.jsx)(I, {
|
|
@@ -30576,10 +30630,10 @@ bG.displayName = "Sidebar", bG.Logo = vG, bG.Item = ({ leadingVisual: e, label:
|
|
|
30576
30630
|
children: e
|
|
30577
30631
|
}) }), t]
|
|
30578
30632
|
});
|
|
30579
|
-
},
|
|
30580
|
-
let { isOpen: n } =
|
|
30633
|
+
}, xG.User = ({ avatar: e, name: t }) => {
|
|
30634
|
+
let { isOpen: n } = _G();
|
|
30581
30635
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
30582
|
-
className:
|
|
30636
|
+
className: bG["rst-sidebar-user"],
|
|
30583
30637
|
children: [e, n && /* @__PURE__ */ (0, P.jsx)("span", {
|
|
30584
30638
|
style: { marginLeft: 8 },
|
|
30585
30639
|
children: t
|
|
@@ -30588,22 +30642,22 @@ bG.displayName = "Sidebar", bG.Logo = vG, bG.Item = ({ leadingVisual: e, label:
|
|
|
30588
30642
|
};
|
|
30589
30643
|
//#endregion
|
|
30590
30644
|
//#region src/framework-components/scaffold/scaffold.module.css
|
|
30591
|
-
var
|
|
30645
|
+
var SG = {
|
|
30592
30646
|
"rst-scaffold": "_rst-scaffold_10eyy_2",
|
|
30593
30647
|
"rst-scaffold-sidebar": "_rst-scaffold-sidebar_10eyy_9",
|
|
30594
30648
|
"rst-scaffold-content": "_rst-scaffold-content_10eyy_17",
|
|
30595
30649
|
"rst-scaffold-appbar": "_rst-scaffold-appbar_10eyy_26",
|
|
30596
30650
|
"rst-scaffold-main": "_rst-scaffold-main_10eyy_32"
|
|
30597
|
-
},
|
|
30651
|
+
}, CG = (e) => {
|
|
30598
30652
|
if (typeof e.type == "function" || typeof e.type == "object" && e.type !== null && "displayName" in e.type) return e.type.displayName;
|
|
30599
|
-
},
|
|
30653
|
+
}, wG = Object.assign(({ children: e, defaultSidebarOpen: n = !0, className: r, ...i }) => {
|
|
30600
30654
|
let [a, o] = y(n), [s, c] = y(!1), l = d(() => {
|
|
30601
30655
|
o((e) => !e);
|
|
30602
30656
|
}, []), u = d((e) => {
|
|
30603
30657
|
o(e);
|
|
30604
30658
|
}, []), f = t.Children.toArray(e), p = null, m = null, h = null, g = [];
|
|
30605
30659
|
f.forEach((e) => {
|
|
30606
|
-
if (t.isValidElement(e)) switch (
|
|
30660
|
+
if (t.isValidElement(e)) switch (CG(e)) {
|
|
30607
30661
|
case "Sidebar":
|
|
30608
30662
|
p = e;
|
|
30609
30663
|
break;
|
|
@@ -30619,8 +30673,8 @@ var xG = {
|
|
|
30619
30673
|
}
|
|
30620
30674
|
else g.push(e);
|
|
30621
30675
|
});
|
|
30622
|
-
let _ = [
|
|
30623
|
-
return /* @__PURE__ */ (0, P.jsx)(
|
|
30676
|
+
let _ = [SG["rst-scaffold"], r].filter(Boolean).join(" ");
|
|
30677
|
+
return /* @__PURE__ */ (0, P.jsx)(uG.Provider, {
|
|
30624
30678
|
value: {
|
|
30625
30679
|
isSidebarOpen: a,
|
|
30626
30680
|
toggleSidebar: l,
|
|
@@ -30633,16 +30687,16 @@ var xG = {
|
|
|
30633
30687
|
...i,
|
|
30634
30688
|
children: [
|
|
30635
30689
|
p && /* @__PURE__ */ (0, P.jsx)("div", {
|
|
30636
|
-
className:
|
|
30690
|
+
className: SG["rst-scaffold-sidebar"],
|
|
30637
30691
|
children: p
|
|
30638
30692
|
}),
|
|
30639
30693
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
30640
|
-
className:
|
|
30694
|
+
className: SG["rst-scaffold-content"],
|
|
30641
30695
|
children: [h && /* @__PURE__ */ (0, P.jsx)("div", {
|
|
30642
|
-
className:
|
|
30696
|
+
className: SG["rst-scaffold-appbar"],
|
|
30643
30697
|
children: h
|
|
30644
30698
|
}), /* @__PURE__ */ (0, P.jsx)("main", {
|
|
30645
|
-
className:
|
|
30699
|
+
className: SG["rst-scaffold-main"],
|
|
30646
30700
|
children: g
|
|
30647
30701
|
})]
|
|
30648
30702
|
}),
|
|
@@ -30651,10 +30705,10 @@ var xG = {
|
|
|
30651
30705
|
})
|
|
30652
30706
|
});
|
|
30653
30707
|
}, { Content: ({ children: e, className: t, ...n }) => /* @__PURE__ */ (0, P.jsx)("div", {
|
|
30654
|
-
className: [
|
|
30708
|
+
className: [SG["rst-scaffold-content"], t].filter(Boolean).join(" "),
|
|
30655
30709
|
...n,
|
|
30656
30710
|
children: e
|
|
30657
|
-
}) }),
|
|
30711
|
+
}) }), TG = class {
|
|
30658
30712
|
config;
|
|
30659
30713
|
constructor(e) {
|
|
30660
30714
|
this.config = e;
|
|
@@ -30816,7 +30870,7 @@ var xG = {
|
|
|
30816
30870
|
getStartAngle(e) {
|
|
30817
30871
|
return e.parent ? Math.atan2(e.y - e.parent.y, e.x - e.parent.x) - Math.PI : -Math.PI / 2;
|
|
30818
30872
|
}
|
|
30819
|
-
},
|
|
30873
|
+
}, EG = {
|
|
30820
30874
|
"rst-mind-tree": "_rst-mind-tree_11uth_1",
|
|
30821
30875
|
"rst-mind-tree-svg": "_rst-mind-tree-svg_11uth_11",
|
|
30822
30876
|
"rst-mind-tree-container": "_rst-mind-tree-container_11uth_17",
|
|
@@ -30842,7 +30896,7 @@ var xG = {
|
|
|
30842
30896
|
};
|
|
30843
30897
|
//#endregion
|
|
30844
30898
|
//#region src/custom-components/mindmap/mind-tree.tsx
|
|
30845
|
-
function
|
|
30899
|
+
function DG({ data: e, width: n = 800, height: r = 600, nodeSpacing: i = 80, levelSpacing: a = 100, nodeWidth: o = 120, nodeHeight: s = 40, interactive: c = !0, renderNode: l, renderLink: u, onNodeClick: f, onNodeToggle: p, layoutType: m = "hierarchical", className: h }) {
|
|
30846
30900
|
let [g, b] = y(/* @__PURE__ */ new Set()), [x, S] = y({
|
|
30847
30901
|
x: 0,
|
|
30848
30902
|
y: 0,
|
|
@@ -30859,7 +30913,7 @@ function EG({ data: e, width: n = 800, height: r = 600, nodeSpacing: i = 80, lev
|
|
|
30859
30913
|
1.5,
|
|
30860
30914
|
2,
|
|
30861
30915
|
3
|
|
30862
|
-
], []), k = O.findIndex((e) => Math.abs(e - x.scale) < .01) ?? O.reduce((e, t, n) => Math.abs(t - x.scale) < Math.abs(O[e] - x.scale) ? n : e, 0), A = _(() => new
|
|
30916
|
+
], []), k = O.findIndex((e) => Math.abs(e - x.scale) < .01) ?? O.reduce((e, t, n) => Math.abs(t - x.scale) < Math.abs(O[e] - x.scale) ? n : e, 0), A = _(() => new TG({
|
|
30863
30917
|
siblingSpacing: i,
|
|
30864
30918
|
levelSpacing: a,
|
|
30865
30919
|
nodeWidth: o,
|
|
@@ -30968,10 +31022,10 @@ function EG({ data: e, width: n = 800, height: r = 600, nodeSpacing: i = 80, lev
|
|
|
30968
31022
|
}, []), ce = d((t, n) => {
|
|
30969
31023
|
let r = se(e, t.id), i = r?.children && r.children.length > 0, a = g.has(t.id);
|
|
30970
31024
|
return /* @__PURE__ */ (0, P.jsxs)("g", {
|
|
30971
|
-
className:
|
|
31025
|
+
className: EG["rst-mind-tree-node"],
|
|
30972
31026
|
children: [
|
|
30973
31027
|
/* @__PURE__ */ (0, P.jsx)("rect", {
|
|
30974
|
-
className: `${
|
|
31028
|
+
className: `${EG["rst-mind-tree-node-rect"]} ${n ? EG.root : ""}`,
|
|
30975
31029
|
x: -o / 2,
|
|
30976
31030
|
y: -s / 2,
|
|
30977
31031
|
width: o,
|
|
@@ -30979,21 +31033,21 @@ function EG({ data: e, width: n = 800, height: r = 600, nodeSpacing: i = 80, lev
|
|
|
30979
31033
|
onClick: () => N(t)
|
|
30980
31034
|
}),
|
|
30981
31035
|
/* @__PURE__ */ (0, P.jsx)("text", {
|
|
30982
|
-
className: `${
|
|
31036
|
+
className: `${EG["rst-mind-tree-node-text"]} ${n ? EG.root : ""}`,
|
|
30983
31037
|
onClick: () => N(t),
|
|
30984
31038
|
children: t.id
|
|
30985
31039
|
}),
|
|
30986
31040
|
i && /* @__PURE__ */ (0, P.jsxs)("g", {
|
|
30987
|
-
className:
|
|
31041
|
+
className: EG["rst-mind-tree-expand-button"],
|
|
30988
31042
|
transform: `translate(${o / 2 - 10}, 0)`,
|
|
30989
31043
|
onClick: (e) => {
|
|
30990
31044
|
e.stopPropagation(), M(t);
|
|
30991
31045
|
},
|
|
30992
31046
|
children: [/* @__PURE__ */ (0, P.jsx)("circle", {
|
|
30993
|
-
className:
|
|
31047
|
+
className: EG["rst-mind-tree-expand-button-circle"],
|
|
30994
31048
|
r: "8"
|
|
30995
31049
|
}), /* @__PURE__ */ (0, P.jsx)("text", {
|
|
30996
|
-
className:
|
|
31050
|
+
className: EG["rst-mind-tree-expand-button-text"],
|
|
30997
31051
|
children: a ? "+" : "−"
|
|
30998
31052
|
})]
|
|
30999
31053
|
})
|
|
@@ -31011,15 +31065,15 @@ function EG({ data: e, width: n = 800, height: r = 600, nodeSpacing: i = 80, lev
|
|
|
31011
31065
|
let n = e.x, r = e.y + s / 2, i = t.x, a = t.y - s / 2, o = r + (a - r) / 2, c = `M ${n},${r}
|
|
31012
31066
|
C ${n},${o} ${i},${o} ${i},${a}`;
|
|
31013
31067
|
return /* @__PURE__ */ (0, P.jsx)("path", {
|
|
31014
|
-
className:
|
|
31068
|
+
className: EG["rst-mind-tree-link"],
|
|
31015
31069
|
d: c
|
|
31016
31070
|
}, `${e.id}-${t.id}`);
|
|
31017
31071
|
}, [s]);
|
|
31018
31072
|
return A ? /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
31019
|
-
className: `${
|
|
31073
|
+
className: `${EG["rst-mind-tree"]} ${h || ""}`,
|
|
31020
31074
|
children: [/* @__PURE__ */ (0, P.jsx)("svg", {
|
|
31021
31075
|
ref: D,
|
|
31022
|
-
className:
|
|
31076
|
+
className: EG["rst-mind-tree-svg"],
|
|
31023
31077
|
width: n,
|
|
31024
31078
|
height: r,
|
|
31025
31079
|
onMouseDown: ee,
|
|
@@ -31028,7 +31082,7 @@ function EG({ data: e, width: n = 800, height: r = 600, nodeSpacing: i = 80, lev
|
|
|
31028
31082
|
onMouseLeave: ne,
|
|
31029
31083
|
style: { cursor: C ? "grabbing" : "grab" },
|
|
31030
31084
|
children: /* @__PURE__ */ (0, P.jsxs)("g", {
|
|
31031
|
-
className:
|
|
31085
|
+
className: EG["rst-mind-tree-container"],
|
|
31032
31086
|
transform: `translate(${x.x}, ${x.y}) scale(${x.scale})`,
|
|
31033
31087
|
children: [/* @__PURE__ */ (0, P.jsx)("g", { children: A.nodes.map((e) => e.children?.filter((t) => j.has(e.id) && j.has(t.id)).map((t) => u ? u(e, t) : le(e, t)) || []) }), /* @__PURE__ */ (0, P.jsx)("g", { children: A.nodes.filter((e) => j.has(e.id)).map((e) => /* @__PURE__ */ (0, P.jsx)("g", {
|
|
31034
31088
|
transform: `translate(${e.x}, ${e.y})`,
|
|
@@ -31036,10 +31090,10 @@ function EG({ data: e, width: n = 800, height: r = 600, nodeSpacing: i = 80, lev
|
|
|
31036
31090
|
}, e.id)) })]
|
|
31037
31091
|
})
|
|
31038
31092
|
}), c && /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
31039
|
-
className:
|
|
31093
|
+
className: EG["rst-mind-tree-controls"],
|
|
31040
31094
|
children: [
|
|
31041
31095
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
31042
|
-
className:
|
|
31096
|
+
className: EG["rst-mind-tree-zoom-group"],
|
|
31043
31097
|
children: [
|
|
31044
31098
|
/* @__PURE__ */ (0, P.jsx)(L, {
|
|
31045
31099
|
onClick: F,
|
|
@@ -31048,7 +31102,7 @@ function EG({ data: e, width: n = 800, height: r = 600, nodeSpacing: i = 80, lev
|
|
|
31048
31102
|
title: "Zoom Out"
|
|
31049
31103
|
}),
|
|
31050
31104
|
/* @__PURE__ */ (0, P.jsx)("div", {
|
|
31051
|
-
className:
|
|
31105
|
+
className: EG["rst-mind-tree-zoom-slider-container"],
|
|
31052
31106
|
children: /* @__PURE__ */ (0, P.jsxs)(I, {
|
|
31053
31107
|
variant: "body",
|
|
31054
31108
|
children: [Math.round(x.scale * 100), "%"]
|
|
@@ -31078,7 +31132,7 @@ function EG({ data: e, width: n = 800, height: r = 600, nodeSpacing: i = 80, lev
|
|
|
31078
31132
|
}
|
|
31079
31133
|
//#endregion
|
|
31080
31134
|
//#region src/data-components/calendar/calendar.module.css
|
|
31081
|
-
var
|
|
31135
|
+
var OG = {
|
|
31082
31136
|
"rst-calendar": "_rst-calendar_48fkh_1",
|
|
31083
31137
|
"rst-calendar-grid": "_rst-calendar-grid_48fkh_6",
|
|
31084
31138
|
"rst-calendar-cell": "_rst-calendar-cell_48fkh_11",
|
|
@@ -31088,7 +31142,7 @@ var DG = {
|
|
|
31088
31142
|
};
|
|
31089
31143
|
//#endregion
|
|
31090
31144
|
//#region src/data-components/calendar/calendar.tsx
|
|
31091
|
-
function
|
|
31145
|
+
function kG(e) {
|
|
31092
31146
|
if (!e) return null;
|
|
31093
31147
|
if (e instanceof Date) return e;
|
|
31094
31148
|
if (typeof e == "string" || typeof e == "number") {
|
|
@@ -31097,21 +31151,21 @@ function OG(e) {
|
|
|
31097
31151
|
}
|
|
31098
31152
|
return null;
|
|
31099
31153
|
}
|
|
31100
|
-
function
|
|
31154
|
+
function AG(e) {
|
|
31101
31155
|
return new Date(e.getFullYear(), e.getMonth(), 1);
|
|
31102
31156
|
}
|
|
31103
|
-
function
|
|
31157
|
+
function jG(e, t) {
|
|
31104
31158
|
let n = new Date(e);
|
|
31105
31159
|
return n.setDate(n.getDate() + t), n;
|
|
31106
31160
|
}
|
|
31107
|
-
function
|
|
31108
|
-
let a = e[0] ? Object.keys(e[0]) : [], o = t || PH(a), s = _(() =>
|
|
31161
|
+
function MG({ data: e, columns: t, dateColumnId: n, eventColumnId: r, initialMonth: i }) {
|
|
31162
|
+
let a = e[0] ? Object.keys(e[0]) : [], o = t || PH(a), s = _(() => AG(i || /* @__PURE__ */ new Date()), [i]), c = d((e, t) => {
|
|
31109
31163
|
let n = o.find((e) => e.id === String(t) || e.accessorKey === t);
|
|
31110
31164
|
return n ? n.accessorFn ? n.accessorFn(e) : n.accessorKey ? e[n.accessorKey] : e[n.id] ?? e[t] : e[t];
|
|
31111
31165
|
}, [o]), l = _(() => {
|
|
31112
31166
|
let t = /* @__PURE__ */ new Map();
|
|
31113
31167
|
return e.forEach((e) => {
|
|
31114
|
-
let r =
|
|
31168
|
+
let r = kG(c(e, n));
|
|
31115
31169
|
if (!r) return;
|
|
31116
31170
|
let i = r.toISOString().slice(0, 10);
|
|
31117
31171
|
t.has(i) || t.set(i, []), t.get(i).push(e);
|
|
@@ -31121,12 +31175,12 @@ function jG({ data: e, columns: t, dateColumnId: n, eventColumnId: r, initialMon
|
|
|
31121
31175
|
c,
|
|
31122
31176
|
n
|
|
31123
31177
|
]), u = _(() => {
|
|
31124
|
-
let e =
|
|
31125
|
-
return
|
|
31178
|
+
let e = AG(s);
|
|
31179
|
+
return jG(e, -e.getDay());
|
|
31126
31180
|
}, [s]), f = [];
|
|
31127
|
-
for (let e = 0; e < 42; e++) f.push(
|
|
31181
|
+
for (let e = 0; e < 42; e++) f.push(jG(u, e));
|
|
31128
31182
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
31129
|
-
className:
|
|
31183
|
+
className: OG["rst-calendar"],
|
|
31130
31184
|
children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
31131
31185
|
style: {
|
|
31132
31186
|
marginBottom: 8,
|
|
@@ -31137,18 +31191,18 @@ function jG({ data: e, columns: t, dateColumnId: n, eventColumnId: r, initialMon
|
|
|
31137
31191
|
year: "numeric"
|
|
31138
31192
|
})
|
|
31139
31193
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
31140
|
-
className:
|
|
31194
|
+
className: OG["rst-calendar-grid"],
|
|
31141
31195
|
children: f.map((e) => {
|
|
31142
31196
|
let t = e.toISOString().slice(0, 10), n = l.get(t) ?? [], i = e.getMonth() !== s.getMonth();
|
|
31143
31197
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
31144
|
-
className:
|
|
31198
|
+
className: OG["rst-calendar-cell"] + (i ? " " + OG["rst-calendar-cell--otherMonth"] : ""),
|
|
31145
31199
|
children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
31146
|
-
className:
|
|
31200
|
+
className: OG["rst-calendar-date"],
|
|
31147
31201
|
children: e.getDate()
|
|
31148
31202
|
}), /* @__PURE__ */ (0, P.jsx)("div", { children: n.map((e, t) => {
|
|
31149
31203
|
let n = c(e, r), i = typeof n == "string" || typeof n == "number" ? String(n) : JSON.stringify(n);
|
|
31150
31204
|
return /* @__PURE__ */ (0, P.jsx)("div", {
|
|
31151
|
-
className:
|
|
31205
|
+
className: OG["rst-calendar-event"],
|
|
31152
31206
|
title: i,
|
|
31153
31207
|
children: i
|
|
31154
31208
|
}, t);
|
|
@@ -31160,7 +31214,7 @@ function jG({ data: e, columns: t, dateColumnId: n, eventColumnId: r, initialMon
|
|
|
31160
31214
|
}
|
|
31161
31215
|
//#endregion
|
|
31162
31216
|
//#region src/data-components/form/form.module.css
|
|
31163
|
-
var
|
|
31217
|
+
var NG = {
|
|
31164
31218
|
"rst-form": "_rst-form_qdlsq_1",
|
|
31165
31219
|
"rst-form-header": "_rst-form-header_qdlsq_9",
|
|
31166
31220
|
"rst-form-title": "_rst-form-title_qdlsq_13",
|
|
@@ -31172,7 +31226,7 @@ var MG = {
|
|
|
31172
31226
|
};
|
|
31173
31227
|
//#endregion
|
|
31174
31228
|
//#region src/data-components/form/form.tsx
|
|
31175
|
-
function
|
|
31229
|
+
function PG({ data: e, columns: t, layout: n, onSubmit: r, onCancel: i }) {
|
|
31176
31230
|
let [a, o] = y(() => e && e.length > 0 ? { ...e[0] } : {}), s = e[0] ? Object.keys(e[0]) : [], c = t || PH(s), [l, u] = y({});
|
|
31177
31231
|
p(() => {
|
|
31178
31232
|
e && e.length > 0 && o({ ...e[0] });
|
|
@@ -31238,13 +31292,13 @@ function NG({ data: e, columns: t, layout: n, onSubmit: r, onCancel: i }) {
|
|
|
31238
31292
|
}, t);
|
|
31239
31293
|
});
|
|
31240
31294
|
return /* @__PURE__ */ (0, P.jsxs)("form", {
|
|
31241
|
-
className:
|
|
31295
|
+
className: NG["rst-form"],
|
|
31242
31296
|
onSubmit: g,
|
|
31243
31297
|
children: [v ? /* @__PURE__ */ (0, P.jsx)(gH, {
|
|
31244
31298
|
layout: v,
|
|
31245
31299
|
children: b
|
|
31246
31300
|
}) : b, /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
31247
|
-
className:
|
|
31301
|
+
className: NG["rst-form-actions"],
|
|
31248
31302
|
children: [i && /* @__PURE__ */ (0, P.jsx)(L, {
|
|
31249
31303
|
type: "button",
|
|
31250
31304
|
variant: "invisible",
|
|
@@ -31297,7 +31351,7 @@ var Q = {
|
|
|
31297
31351
|
"rst-layout-builder-select": "_rst-layout-builder-select_1dfsp_361",
|
|
31298
31352
|
"rst-layout-builder-block-slot": "_rst-layout-builder-block-slot_1dfsp_378",
|
|
31299
31353
|
"rst-layout-builder-slot-hint": "_rst-layout-builder-slot-hint_1dfsp_389"
|
|
31300
|
-
},
|
|
31354
|
+
}, FG = {
|
|
31301
31355
|
"rst-json-editor": "_rst-json-editor_1so51_1",
|
|
31302
31356
|
"rst-json-editor-toolbar": "_rst-json-editor-toolbar_1so51_11",
|
|
31303
31357
|
"rst-json-editor-label": "_rst-json-editor-label_1so51_22",
|
|
@@ -31323,7 +31377,7 @@ var Q = {
|
|
|
31323
31377
|
"rst-split-view": "_rst-split-view_1so51_187",
|
|
31324
31378
|
"rst-split-view-panel": "_rst-split-view-panel_1so51_194",
|
|
31325
31379
|
"rst-split-view-divider": "_rst-split-view-divider_1so51_201"
|
|
31326
|
-
},
|
|
31380
|
+
}, IG = ({ value: e, onChange: t, errors: n, readOnly: r = !1, height: i, onActivate: a, onDeactivate: o }) => {
|
|
31327
31381
|
let s = v(null), c = v(null), [l, u] = y(e), [f, m] = y(null);
|
|
31328
31382
|
p(() => {
|
|
31329
31383
|
u(e);
|
|
@@ -31363,7 +31417,7 @@ var Q = {
|
|
|
31363
31417
|
}
|
|
31364
31418
|
}, E = n.length === 0;
|
|
31365
31419
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
31366
|
-
className:
|
|
31420
|
+
className: FG["rst-json-editor"],
|
|
31367
31421
|
style: { height: i },
|
|
31368
31422
|
onFocus: a,
|
|
31369
31423
|
onBlur: o,
|
|
@@ -31372,19 +31426,19 @@ var Q = {
|
|
|
31372
31426
|
tabIndex: 0,
|
|
31373
31427
|
children: [
|
|
31374
31428
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
31375
|
-
className:
|
|
31429
|
+
className: FG["rst-json-editor-toolbar"],
|
|
31376
31430
|
children: [/* @__PURE__ */ (0, P.jsxs)(_H, {
|
|
31377
31431
|
direction: "row",
|
|
31378
31432
|
gap: .75,
|
|
31379
31433
|
align: "center",
|
|
31380
31434
|
children: [/* @__PURE__ */ (0, P.jsx)("span", {
|
|
31381
|
-
className:
|
|
31435
|
+
className: FG["rst-json-editor-label"],
|
|
31382
31436
|
children: "JSON Editor"
|
|
31383
31437
|
}), E ? /* @__PURE__ */ (0, P.jsx)("span", {
|
|
31384
|
-
className:
|
|
31438
|
+
className: FG["rst-json-editor-status-valid"],
|
|
31385
31439
|
children: "✓ Valid"
|
|
31386
31440
|
}) : /* @__PURE__ */ (0, P.jsxs)("span", {
|
|
31387
|
-
className:
|
|
31441
|
+
className: FG["rst-json-editor-status-invalid"],
|
|
31388
31442
|
children: [
|
|
31389
31443
|
"✗ ",
|
|
31390
31444
|
n.length,
|
|
@@ -31398,7 +31452,7 @@ var Q = {
|
|
|
31398
31452
|
align: "center",
|
|
31399
31453
|
children: [
|
|
31400
31454
|
f && /* @__PURE__ */ (0, P.jsxs)("span", {
|
|
31401
|
-
className:
|
|
31455
|
+
className: FG["rst-json-editor-cursor"],
|
|
31402
31456
|
children: [
|
|
31403
31457
|
"Ln ",
|
|
31404
31458
|
f.line,
|
|
@@ -31431,17 +31485,17 @@ var Q = {
|
|
|
31431
31485
|
})]
|
|
31432
31486
|
}),
|
|
31433
31487
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
31434
|
-
className:
|
|
31488
|
+
className: FG["rst-json-editor-container"],
|
|
31435
31489
|
children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
31436
31490
|
ref: c,
|
|
31437
|
-
className:
|
|
31491
|
+
className: FG["rst-json-editor-line-numbers"],
|
|
31438
31492
|
children: g.map((e) => /* @__PURE__ */ (0, P.jsx)("div", {
|
|
31439
|
-
className: `${
|
|
31493
|
+
className: `${FG["rst-json-editor-line-number"]} ${_.has(e) ? FG["rst-json-editor-line-error"] : ""}`,
|
|
31440
31494
|
children: e
|
|
31441
31495
|
}, e))
|
|
31442
31496
|
}), /* @__PURE__ */ (0, P.jsx)("textarea", {
|
|
31443
31497
|
ref: s,
|
|
31444
|
-
className: `${
|
|
31498
|
+
className: `${FG["rst-json-editor-textarea"]} ${E ? "" : FG["rst-json-editor-textarea-invalid"]}`,
|
|
31445
31499
|
value: l,
|
|
31446
31500
|
onChange: b,
|
|
31447
31501
|
onScroll: x,
|
|
@@ -31456,29 +31510,29 @@ var Q = {
|
|
|
31456
31510
|
})]
|
|
31457
31511
|
}),
|
|
31458
31512
|
n.length > 0 && /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
31459
|
-
className:
|
|
31513
|
+
className: FG["rst-json-editor-errors"],
|
|
31460
31514
|
children: [/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
31461
|
-
className:
|
|
31515
|
+
className: FG["rst-json-editor-errors-header"],
|
|
31462
31516
|
children: [
|
|
31463
31517
|
"Validation Errors (",
|
|
31464
31518
|
n.length,
|
|
31465
31519
|
")"
|
|
31466
31520
|
]
|
|
31467
31521
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
31468
|
-
className:
|
|
31522
|
+
className: FG["rst-json-editor-errors-list"],
|
|
31469
31523
|
children: n.map((e, t) => /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
31470
|
-
className:
|
|
31524
|
+
className: FG["rst-json-editor-error-item"],
|
|
31471
31525
|
children: [
|
|
31472
31526
|
/* @__PURE__ */ (0, P.jsx)("span", {
|
|
31473
|
-
className:
|
|
31527
|
+
className: FG["rst-json-editor-error-path"],
|
|
31474
31528
|
children: e.path || "(root)"
|
|
31475
31529
|
}),
|
|
31476
31530
|
/* @__PURE__ */ (0, P.jsx)("span", {
|
|
31477
|
-
className:
|
|
31531
|
+
className: FG["rst-json-editor-error-message"],
|
|
31478
31532
|
children: e.message
|
|
31479
31533
|
}),
|
|
31480
31534
|
e.expected && /* @__PURE__ */ (0, P.jsxs)("span", {
|
|
31481
|
-
className:
|
|
31535
|
+
className: FG["rst-json-editor-error-expected"],
|
|
31482
31536
|
children: ["Expected: ", e.expected]
|
|
31483
31537
|
})
|
|
31484
31538
|
]
|
|
@@ -31488,10 +31542,10 @@ var Q = {
|
|
|
31488
31542
|
]
|
|
31489
31543
|
});
|
|
31490
31544
|
};
|
|
31491
|
-
|
|
31545
|
+
IG.displayName = "LayoutJsonEditor";
|
|
31492
31546
|
//#endregion
|
|
31493
31547
|
//#region src/custom-components/layout-builder/layout-builder-schema.ts
|
|
31494
|
-
var
|
|
31548
|
+
var LG = "1.0.0", RG = {
|
|
31495
31549
|
type: "object",
|
|
31496
31550
|
properties: {
|
|
31497
31551
|
columns: {
|
|
@@ -31578,17 +31632,17 @@ var IG = "1.0.0", LG = {
|
|
|
31578
31632
|
required: ["columns", "blocks"],
|
|
31579
31633
|
additionalProperties: !1
|
|
31580
31634
|
};
|
|
31581
|
-
({ ...
|
|
31635
|
+
({ ...RG }), { ...RG }, { ...RG };
|
|
31582
31636
|
//#endregion
|
|
31583
31637
|
//#region src/custom-components/layout-builder/layout-builder-constants.ts
|
|
31584
|
-
var
|
|
31638
|
+
var zG = {
|
|
31585
31639
|
width: 1,
|
|
31586
31640
|
height: 1
|
|
31587
|
-
},
|
|
31641
|
+
}, BG = [
|
|
31588
31642
|
"mobile",
|
|
31589
31643
|
"tablet",
|
|
31590
31644
|
"desktop"
|
|
31591
|
-
],
|
|
31645
|
+
], VG = {
|
|
31592
31646
|
desktop: {
|
|
31593
31647
|
columns: 12,
|
|
31594
31648
|
rows: 12,
|
|
@@ -31607,18 +31661,18 @@ var RG = {
|
|
|
31607
31661
|
};
|
|
31608
31662
|
//#endregion
|
|
31609
31663
|
//#region src/custom-components/layout-builder/layout-builder-validation.ts
|
|
31610
|
-
function
|
|
31664
|
+
function HG(e) {
|
|
31611
31665
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
31612
31666
|
}
|
|
31613
|
-
function
|
|
31667
|
+
function UG(e) {
|
|
31614
31668
|
return typeof e == "number" && Number.isInteger(e);
|
|
31615
31669
|
}
|
|
31616
|
-
function
|
|
31617
|
-
return
|
|
31670
|
+
function WG(e) {
|
|
31671
|
+
return UG(e) && e > 0;
|
|
31618
31672
|
}
|
|
31619
|
-
function
|
|
31673
|
+
function GG(e, t, n, r) {
|
|
31620
31674
|
let i = [];
|
|
31621
|
-
if (!
|
|
31675
|
+
if (!HG(e)) return i.push({
|
|
31622
31676
|
path: t,
|
|
31623
31677
|
message: "Expected an object",
|
|
31624
31678
|
value: e,
|
|
@@ -31629,7 +31683,7 @@ function WG(e, t, n, r) {
|
|
|
31629
31683
|
"row",
|
|
31630
31684
|
"w",
|
|
31631
31685
|
"h"
|
|
31632
|
-
]) n in e ?
|
|
31686
|
+
]) n in e ? WG(e[n]) || i.push({
|
|
31633
31687
|
path: `${t}.${n}`,
|
|
31634
31688
|
message: `'${n}' must be a positive integer`,
|
|
31635
31689
|
value: e[n],
|
|
@@ -31639,17 +31693,17 @@ function WG(e, t, n, r) {
|
|
|
31639
31693
|
message: `Missing required field '${n}'`,
|
|
31640
31694
|
expected: "integer >= 1"
|
|
31641
31695
|
});
|
|
31642
|
-
if (
|
|
31696
|
+
if (WG(e.col) && e.col > n && i.push({
|
|
31643
31697
|
path: `${t}.col`,
|
|
31644
31698
|
message: `Column ${e.col} exceeds grid columns (${n})`,
|
|
31645
31699
|
value: e.col,
|
|
31646
31700
|
expected: `1 <= col <= ${n}`
|
|
31647
|
-
}),
|
|
31701
|
+
}), WG(e.row) && e.row > r && i.push({
|
|
31648
31702
|
path: `${t}.row`,
|
|
31649
31703
|
message: `Row ${e.row} exceeds grid rows (${r})`,
|
|
31650
31704
|
value: e.row,
|
|
31651
31705
|
expected: `1 <= row <= ${r}`
|
|
31652
|
-
}),
|
|
31706
|
+
}), WG(e.col) && WG(e.w)) {
|
|
31653
31707
|
let r = e.col + e.w - 1;
|
|
31654
31708
|
r > n && i.push({
|
|
31655
31709
|
path: `${t}`,
|
|
@@ -31661,7 +31715,7 @@ function WG(e, t, n, r) {
|
|
|
31661
31715
|
expected: `col + w - 1 <= ${n}`
|
|
31662
31716
|
});
|
|
31663
31717
|
}
|
|
31664
|
-
if (
|
|
31718
|
+
if (WG(e.row) && WG(e.h)) {
|
|
31665
31719
|
let n = e.row + e.h - 1;
|
|
31666
31720
|
n > r && i.push({
|
|
31667
31721
|
path: `${t}`,
|
|
@@ -31708,15 +31762,15 @@ function WG(e, t, n, r) {
|
|
|
31708
31762
|
});
|
|
31709
31763
|
return i;
|
|
31710
31764
|
}
|
|
31711
|
-
function
|
|
31765
|
+
function KG(e, t, n) {
|
|
31712
31766
|
let r = [];
|
|
31713
|
-
if (!
|
|
31767
|
+
if (!HG(e)) return r.push({
|
|
31714
31768
|
path: n,
|
|
31715
31769
|
message: "Expected an object",
|
|
31716
31770
|
value: e,
|
|
31717
31771
|
expected: "{ columns, blocks, ... }"
|
|
31718
31772
|
}), r;
|
|
31719
|
-
"columns" in e ? (!
|
|
31773
|
+
"columns" in e ? (!WG(e.columns) || e.columns > 24) && r.push({
|
|
31720
31774
|
path: `${n}.columns`,
|
|
31721
31775
|
message: "'columns' must be an integer between 1 and 24",
|
|
31722
31776
|
value: e.columns,
|
|
@@ -31726,8 +31780,8 @@ function GG(e, t, n) {
|
|
|
31726
31780
|
message: "Missing required field 'columns'",
|
|
31727
31781
|
expected: "integer 1-24"
|
|
31728
31782
|
});
|
|
31729
|
-
let i =
|
|
31730
|
-
if ("rows" in e && e.rows !== void 0 && (!
|
|
31783
|
+
let i = WG(e.rows) ? e.rows : 12;
|
|
31784
|
+
if ("rows" in e && e.rows !== void 0 && (!WG(e.rows) || e.rows > 24) && r.push({
|
|
31731
31785
|
path: `${n}.rows`,
|
|
31732
31786
|
message: "'rows' must be an integer between 1 and 24",
|
|
31733
31787
|
value: e.rows,
|
|
@@ -31755,19 +31809,19 @@ function GG(e, t, n) {
|
|
|
31755
31809
|
message: "Missing required field 'blocks'",
|
|
31756
31810
|
expected: "{ [blockId]: GridPlacement }"
|
|
31757
31811
|
});
|
|
31758
|
-
else if (!
|
|
31812
|
+
else if (!HG(e.blocks)) r.push({
|
|
31759
31813
|
path: `${n}.blocks`,
|
|
31760
31814
|
message: "'blocks' must be an object",
|
|
31761
31815
|
value: e.blocks,
|
|
31762
31816
|
expected: "{ [blockId]: GridPlacement }"
|
|
31763
31817
|
});
|
|
31764
31818
|
else {
|
|
31765
|
-
let t =
|
|
31819
|
+
let t = WG(e.columns) ? e.columns : 12;
|
|
31766
31820
|
for (let [a, o] of Object.entries(e.blocks)) {
|
|
31767
|
-
let e =
|
|
31821
|
+
let e = GG(o, `${n}.blocks.${a}`, t, i);
|
|
31768
31822
|
r.push(...e);
|
|
31769
31823
|
}
|
|
31770
|
-
let a =
|
|
31824
|
+
let a = qG(e.blocks);
|
|
31771
31825
|
for (let e of a) r.push({
|
|
31772
31826
|
path: `${n}.blocks`,
|
|
31773
31827
|
message: `Block collision detected: '${e.block1}' overlaps with '${e.block2}'`,
|
|
@@ -31792,24 +31846,24 @@ function GG(e, t, n) {
|
|
|
31792
31846
|
});
|
|
31793
31847
|
return r;
|
|
31794
31848
|
}
|
|
31795
|
-
function
|
|
31849
|
+
function qG(e) {
|
|
31796
31850
|
let t = [], n = Object.keys(e);
|
|
31797
31851
|
for (let r = 0; r < n.length; r++) for (let i = r + 1; i < n.length; i++) {
|
|
31798
31852
|
let a = n[r], o = n[i], s = e[a], c = e[o];
|
|
31799
|
-
|
|
31853
|
+
JG(s, c) && t.push({
|
|
31800
31854
|
block1: a,
|
|
31801
31855
|
block2: o
|
|
31802
31856
|
});
|
|
31803
31857
|
}
|
|
31804
31858
|
return t;
|
|
31805
31859
|
}
|
|
31806
|
-
function
|
|
31860
|
+
function JG(e, t) {
|
|
31807
31861
|
let n = e.col + e.w - 1, r = e.row + e.h - 1, i = t.col + t.w - 1, a = t.row + t.h - 1, o = e.col <= i && n >= t.col, s = e.row <= a && r >= t.row;
|
|
31808
31862
|
return o && s;
|
|
31809
31863
|
}
|
|
31810
|
-
function
|
|
31864
|
+
function YG(e) {
|
|
31811
31865
|
let t = [];
|
|
31812
|
-
if (!
|
|
31866
|
+
if (!HG(e)) return {
|
|
31813
31867
|
valid: !1,
|
|
31814
31868
|
errors: [{
|
|
31815
31869
|
path: "",
|
|
@@ -31818,13 +31872,13 @@ function JG(e) {
|
|
|
31818
31872
|
expected: "{ mobile, tablet, desktop }"
|
|
31819
31873
|
}]
|
|
31820
31874
|
};
|
|
31821
|
-
for (let n of
|
|
31875
|
+
for (let n of BG) if (!(n in e)) t.push({
|
|
31822
31876
|
path: n,
|
|
31823
31877
|
message: `Missing required breakpoint '${n}'`,
|
|
31824
31878
|
expected: "BreakpointLayout"
|
|
31825
31879
|
});
|
|
31826
31880
|
else {
|
|
31827
|
-
let r =
|
|
31881
|
+
let r = KG(e[n], n, n);
|
|
31828
31882
|
t.push(...r);
|
|
31829
31883
|
}
|
|
31830
31884
|
"version" in e && e.version !== void 0 && (typeof e.version != "string" || !/^\d+\.\d+\.\d+$/.test(e.version)) && t.push({
|
|
@@ -31851,7 +31905,7 @@ function JG(e) {
|
|
|
31851
31905
|
errors: t
|
|
31852
31906
|
};
|
|
31853
31907
|
}
|
|
31854
|
-
function
|
|
31908
|
+
function XG(e) {
|
|
31855
31909
|
let t;
|
|
31856
31910
|
try {
|
|
31857
31911
|
t = JSON.parse(e);
|
|
@@ -31864,7 +31918,7 @@ function YG(e) {
|
|
|
31864
31918
|
}]
|
|
31865
31919
|
};
|
|
31866
31920
|
}
|
|
31867
|
-
let n =
|
|
31921
|
+
let n = YG(t);
|
|
31868
31922
|
return n.valid ? {
|
|
31869
31923
|
layout: t,
|
|
31870
31924
|
errors: []
|
|
@@ -31873,16 +31927,16 @@ function YG(e) {
|
|
|
31873
31927
|
errors: n.errors
|
|
31874
31928
|
};
|
|
31875
31929
|
}
|
|
31876
|
-
function
|
|
31930
|
+
function ZG(e, t = !0) {
|
|
31877
31931
|
let n = {
|
|
31878
|
-
version:
|
|
31932
|
+
version: LG,
|
|
31879
31933
|
...e
|
|
31880
31934
|
};
|
|
31881
31935
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
31882
31936
|
}
|
|
31883
31937
|
//#endregion
|
|
31884
31938
|
//#region src/custom-components/layout-builder/layout-builder-templates.ts
|
|
31885
|
-
var
|
|
31939
|
+
var QG = [
|
|
31886
31940
|
{
|
|
31887
31941
|
id: "single-column",
|
|
31888
31942
|
name: "Single Column",
|
|
@@ -32405,18 +32459,18 @@ var ZG = [
|
|
|
32405
32459
|
}
|
|
32406
32460
|
}
|
|
32407
32461
|
];
|
|
32408
|
-
function
|
|
32409
|
-
return
|
|
32462
|
+
function $G(e) {
|
|
32463
|
+
return QG.find((t) => t.id === e);
|
|
32410
32464
|
}
|
|
32411
32465
|
//#endregion
|
|
32412
32466
|
//#region src/custom-components/layout-builder/layout-builder-utils.ts
|
|
32413
|
-
function
|
|
32467
|
+
function eK(e) {
|
|
32414
32468
|
return e.startsWith("slot_");
|
|
32415
32469
|
}
|
|
32416
|
-
function
|
|
32470
|
+
function tK(e) {
|
|
32417
32471
|
return e === null ? "null" : Array.isArray(e) ? "array" : typeof e;
|
|
32418
32472
|
}
|
|
32419
|
-
function
|
|
32473
|
+
function nK(e, t, n) {
|
|
32420
32474
|
let r = e.col + e.w - 1, i = e.row + e.h - 1;
|
|
32421
32475
|
return Object.entries(t).some(([t, a]) => {
|
|
32422
32476
|
if (n !== void 0 && t === String(n)) return !1;
|
|
@@ -32424,21 +32478,21 @@ function tK(e, t, n) {
|
|
|
32424
32478
|
return c && l;
|
|
32425
32479
|
});
|
|
32426
32480
|
}
|
|
32427
|
-
function
|
|
32481
|
+
function rK(e, t, n) {
|
|
32428
32482
|
for (let [r, i] of Object.entries(n)) {
|
|
32429
32483
|
let n = e >= i.col && e < i.col + i.w, a = t >= i.row && t < i.row + i.h;
|
|
32430
32484
|
if (n && a) return r;
|
|
32431
32485
|
}
|
|
32432
32486
|
return null;
|
|
32433
32487
|
}
|
|
32434
|
-
function
|
|
32435
|
-
let t =
|
|
32488
|
+
function iK(e) {
|
|
32489
|
+
let t = BG.flatMap((t) => Object.keys(e[t].blocks).map((e) => parseInt(e, 10)).filter((e) => !isNaN(e)));
|
|
32436
32490
|
return t.length > 0 ? Math.max(...t) + 1 : 0;
|
|
32437
32491
|
}
|
|
32438
|
-
function
|
|
32439
|
-
return
|
|
32492
|
+
function aK(e, t) {
|
|
32493
|
+
return BG.some((n) => t[n].blocks[e] !== void 0);
|
|
32440
32494
|
}
|
|
32441
|
-
function
|
|
32495
|
+
function oK(e, t, n, r) {
|
|
32442
32496
|
let i = r[t], a = r[n], o = i.rows || 12, s = a.rows || 12, c = a.columns / i.columns, l = s / o, u = Math.max(1, Math.round((e.col - 1) * c) + 1), d = Math.max(1, Math.round((e.row - 1) * l) + 1), f = Math.max(1, Math.round(e.w * c)), p = Math.max(1, Math.round(e.h * l)), m = Math.min(u, a.columns), h = Math.min(d, s);
|
|
32443
32497
|
return {
|
|
32444
32498
|
col: m,
|
|
@@ -32447,11 +32501,11 @@ function aK(e, t, n, r) {
|
|
|
32447
32501
|
h: Math.min(p, s - h + 1)
|
|
32448
32502
|
};
|
|
32449
32503
|
}
|
|
32450
|
-
function
|
|
32504
|
+
function sK(e, t, n, r, i) {
|
|
32451
32505
|
let a = { ...r };
|
|
32452
|
-
for (let o of
|
|
32506
|
+
for (let o of BG) {
|
|
32453
32507
|
if (o === n || i.has(o)) continue;
|
|
32454
|
-
let s =
|
|
32508
|
+
let s = oK(t, n, o, r);
|
|
32455
32509
|
a[o] = {
|
|
32456
32510
|
...a[o],
|
|
32457
32511
|
blocks: {
|
|
@@ -32462,9 +32516,9 @@ function oK(e, t, n, r, i) {
|
|
|
32462
32516
|
}
|
|
32463
32517
|
return a;
|
|
32464
32518
|
}
|
|
32465
|
-
function
|
|
32519
|
+
function cK(e, t, n) {
|
|
32466
32520
|
let r = { ...t };
|
|
32467
|
-
for (let t of
|
|
32521
|
+
for (let t of BG) {
|
|
32468
32522
|
if (n.has(t)) continue;
|
|
32469
32523
|
let i = Object.fromEntries(Object.entries(r[t].blocks).filter(([t]) => t !== String(e)));
|
|
32470
32524
|
r[t] = {
|
|
@@ -32474,9 +32528,9 @@ function sK(e, t, n) {
|
|
|
32474
32528
|
}
|
|
32475
32529
|
return r;
|
|
32476
32530
|
}
|
|
32477
|
-
function
|
|
32531
|
+
function lK(e, t, n) {
|
|
32478
32532
|
let r = { ...t };
|
|
32479
|
-
for (let t of
|
|
32533
|
+
for (let t of BG) {
|
|
32480
32534
|
if (n.has(t)) continue;
|
|
32481
32535
|
let i = { ...r[t].blocks };
|
|
32482
32536
|
for (let t of e) delete i[t];
|
|
@@ -32487,9 +32541,9 @@ function cK(e, t, n) {
|
|
|
32487
32541
|
}
|
|
32488
32542
|
return r;
|
|
32489
32543
|
}
|
|
32490
|
-
function
|
|
32544
|
+
function uK(e, t, n, r) {
|
|
32491
32545
|
let i = { ...n };
|
|
32492
|
-
for (let n of
|
|
32546
|
+
for (let n of BG) {
|
|
32493
32547
|
if (r.has(n)) continue;
|
|
32494
32548
|
let a = i[n].blocks[e];
|
|
32495
32549
|
if (a) {
|
|
@@ -32505,7 +32559,7 @@ function lK(e, t, n, r) {
|
|
|
32505
32559
|
}
|
|
32506
32560
|
return i;
|
|
32507
32561
|
}
|
|
32508
|
-
function
|
|
32562
|
+
function dK(e, t, n) {
|
|
32509
32563
|
let r = { ...e };
|
|
32510
32564
|
r.col = Math.max(1, r.col), r.row = Math.max(1, r.row);
|
|
32511
32565
|
let i = t - r.col + 1;
|
|
@@ -32513,11 +32567,11 @@ function uK(e, t, n) {
|
|
|
32513
32567
|
let a = n - r.row + 1;
|
|
32514
32568
|
return r.h = Math.min(r.h, a), r;
|
|
32515
32569
|
}
|
|
32516
|
-
function
|
|
32570
|
+
function fK(e, t, n) {
|
|
32517
32571
|
let r = e.col + e.w - 1, i = e.row + e.h - 1;
|
|
32518
32572
|
return e.col >= 1 && e.row >= 1 && r <= t && i <= n;
|
|
32519
32573
|
}
|
|
32520
|
-
function
|
|
32574
|
+
function pK(e) {
|
|
32521
32575
|
return {
|
|
32522
32576
|
mobile: {
|
|
32523
32577
|
...e.mobile,
|
|
@@ -32535,17 +32589,17 @@ function fK(e) {
|
|
|
32535
32589
|
}
|
|
32536
32590
|
//#endregion
|
|
32537
32591
|
//#region src/custom-components/layout-builder/layout-builder.tsx
|
|
32538
|
-
var
|
|
32539
|
-
let [a, o] = y(r), [s, c] = y(""), [l, u] = y([]), [f, m] = y(!1), { state: h, setState: g, undo: _, redo: b, canUndo: x, canRedo: S } = EH(e ||
|
|
32592
|
+
var mK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "visual", showViewToggle: i = !0 }) => {
|
|
32593
|
+
let [a, o] = y(r), [s, c] = y(""), [l, u] = y([]), [f, m] = y(!1), { state: h, setState: g, undo: _, redo: b, canUndo: x, canRedo: S } = EH(e || VG, {
|
|
32540
32594
|
maxHistory: 50,
|
|
32541
32595
|
isEqual: (e, t) => JSON.stringify(e) === JSON.stringify(t)
|
|
32542
|
-
}), [C, w] = y("desktop"), [T, E] = y(/* @__PURE__ */ new Set()), [D, O] = y(!1), [k, A] = y(null), [j, M] = y(null), [N, ee] = y(!1), [te, ne] = y(null), [re, ie] = y(!1), [F, ae] = y(null), [oe, se] = y(!1), [ce, le] = y(null), [ue, de] = y(null), [fe, pe] = y(!0), [me, he] = y(/* @__PURE__ */ new Set()), [R, ge] = y(null), [_e, ve] = y({}), ye = v(null), z = h[C], be = z.rows || 12, xe = z.columns, Se = me.has(C), Ce =
|
|
32596
|
+
}), [C, w] = y("desktop"), [T, E] = y(/* @__PURE__ */ new Set()), [D, O] = y(!1), [k, A] = y(null), [j, M] = y(null), [N, ee] = y(!1), [te, ne] = y(null), [re, ie] = y(!1), [F, ae] = y(null), [oe, se] = y(!1), [ce, le] = y(null), [ue, de] = y(null), [fe, pe] = y(!0), [me, he] = y(/* @__PURE__ */ new Set()), [R, ge] = y(null), [_e, ve] = y({}), ye = v(null), z = h[C], be = z.rows || 12, xe = z.columns, Se = me.has(C), Ce = ZG(h);
|
|
32543
32597
|
p(() => {
|
|
32544
32598
|
f || (c(Ce), u([]));
|
|
32545
32599
|
}, [Ce]);
|
|
32546
32600
|
let we = d((e) => {
|
|
32547
32601
|
c(e), m(!0);
|
|
32548
|
-
let n =
|
|
32602
|
+
let n = XG(e);
|
|
32549
32603
|
if (n.errors.length > 0) u(n.errors);
|
|
32550
32604
|
else {
|
|
32551
32605
|
u([]);
|
|
@@ -32553,7 +32607,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
32553
32607
|
g(e), t?.(e), m(!1);
|
|
32554
32608
|
}
|
|
32555
32609
|
}, [g, t]), Te = d(() => {
|
|
32556
|
-
c(
|
|
32610
|
+
c(ZG(h)), u([]), m(!1);
|
|
32557
32611
|
}, [h]), Ee = (e) => {
|
|
32558
32612
|
g(e), t?.(e), m(!1);
|
|
32559
32613
|
}, De = (e) => {
|
|
@@ -32570,21 +32624,21 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
32570
32624
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
32571
32625
|
});
|
|
32572
32626
|
}, ke = (e) => {
|
|
32573
|
-
let t =
|
|
32627
|
+
let t = $G(e);
|
|
32574
32628
|
if (!t) return;
|
|
32575
|
-
let n =
|
|
32629
|
+
let n = pK(t.layout);
|
|
32576
32630
|
ge(e), ve({}), E(/* @__PURE__ */ new Set()), Ee(n);
|
|
32577
32631
|
}, Ae = () => {
|
|
32578
|
-
ge(null), ve({}), E(/* @__PURE__ */ new Set()), Ee(
|
|
32579
|
-
}, je = () => Object.keys(z.blocks).filter(
|
|
32632
|
+
ge(null), ve({}), E(/* @__PURE__ */ new Set()), Ee(VG);
|
|
32633
|
+
}, je = () => Object.keys(z.blocks).filter(eK), Me = () => {
|
|
32580
32634
|
if (!n) return [];
|
|
32581
|
-
let e = new Set(Object.keys(z.blocks).filter((e) =>
|
|
32635
|
+
let e = new Set(Object.keys(z.blocks).filter((e) => !eK(e)));
|
|
32582
32636
|
return Object.keys(n).filter((t) => !e.has(t));
|
|
32583
32637
|
}, B = (e, t) => {
|
|
32584
32638
|
ve({
|
|
32585
32639
|
..._e,
|
|
32586
32640
|
[e]: t
|
|
32587
|
-
}), Ee(
|
|
32641
|
+
}), Ee(uK(e, t, h, me)), E(new Set([t]));
|
|
32588
32642
|
}, Ne = () => {
|
|
32589
32643
|
if (!n) return;
|
|
32590
32644
|
let e = je(), t = Me();
|
|
@@ -32592,26 +32646,26 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
32592
32646
|
let r = { ...h }, i = { ..._e }, a = t.slice(0, e.length);
|
|
32593
32647
|
for (let t = 0; t < a.length; t++) {
|
|
32594
32648
|
let n = a[t], o = e[t];
|
|
32595
|
-
i[o] = n, r =
|
|
32649
|
+
i[o] = n, r = uK(o, n, r, me);
|
|
32596
32650
|
}
|
|
32597
32651
|
ve(i), Ee(r);
|
|
32598
32652
|
}, Pe = (e, t) => {
|
|
32599
32653
|
if (Se) return;
|
|
32600
32654
|
let n = z.blocks[e];
|
|
32601
32655
|
if (!n) return;
|
|
32602
|
-
let r =
|
|
32656
|
+
let r = dK({
|
|
32603
32657
|
...n,
|
|
32604
32658
|
...t
|
|
32605
32659
|
}, xe, be);
|
|
32606
|
-
|
|
32660
|
+
nK(r, z.blocks, e) || De({ blocks: {
|
|
32607
32661
|
...z.blocks,
|
|
32608
32662
|
[e]: r
|
|
32609
32663
|
} });
|
|
32610
32664
|
}, Fe = (e) => {
|
|
32611
|
-
Se || (fe ? Ee(
|
|
32665
|
+
Se || (fe ? Ee(cK(e, h, me)) : De({ blocks: Object.fromEntries(Object.entries(z.blocks).filter(([t]) => t !== String(e))) }), E(/* @__PURE__ */ new Set()));
|
|
32612
32666
|
}, Ie = () => {
|
|
32613
32667
|
if (!(Se || T.size === 0)) {
|
|
32614
|
-
if (fe) Ee(
|
|
32668
|
+
if (fe) Ee(lK(T, h, me));
|
|
32615
32669
|
else {
|
|
32616
32670
|
let e = { ...z.blocks };
|
|
32617
32671
|
for (let t of T) delete e[t];
|
|
@@ -32620,8 +32674,8 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
32620
32674
|
E(/* @__PURE__ */ new Set());
|
|
32621
32675
|
}
|
|
32622
32676
|
}, Le = (e, t) => {
|
|
32623
|
-
if (!(e === t || Se) && !
|
|
32624
|
-
if (fe) Ee(
|
|
32677
|
+
if (!(e === t || Se) && !aK(t, h)) {
|
|
32678
|
+
if (fe) Ee(uK(e, t, h, me));
|
|
32625
32679
|
else {
|
|
32626
32680
|
let n = z.blocks[e];
|
|
32627
32681
|
De({ blocks: {
|
|
@@ -32640,7 +32694,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
32640
32694
|
if (!e) return !1;
|
|
32641
32695
|
let t = e.tagName.toLowerCase();
|
|
32642
32696
|
return t === "input" || t === "textarea" || e.getAttribute("contenteditable") === "true";
|
|
32643
|
-
}, { register: Be, activate: Ve, deactivate: He } =
|
|
32697
|
+
}, { register: Be, activate: Ve, deactivate: He } = lG({ scope: "component" }), { register: Ue, activate: We, deactivate: Ge } = lG({ scope: "component" }), Ke = v(() => {}), qe = v(() => {});
|
|
32644
32698
|
p(() => {
|
|
32645
32699
|
Be("ctrl+z", {
|
|
32646
32700
|
name: "Undo",
|
|
@@ -32720,10 +32774,10 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
32720
32774
|
w: Math.abs(k.col - j.col) + 1,
|
|
32721
32775
|
h: Math.abs(k.row - j.row) + 1
|
|
32722
32776
|
};
|
|
32723
|
-
if (!
|
|
32724
|
-
let t =
|
|
32777
|
+
if (!nK(e, z.blocks)) {
|
|
32778
|
+
let t = iK(h);
|
|
32725
32779
|
if (fe) {
|
|
32726
|
-
let n =
|
|
32780
|
+
let n = sK(t, e, C, h, me);
|
|
32727
32781
|
n[C] = {
|
|
32728
32782
|
...n[C],
|
|
32729
32783
|
blocks: {
|
|
@@ -32745,7 +32799,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
32745
32799
|
w: e,
|
|
32746
32800
|
h: t
|
|
32747
32801
|
};
|
|
32748
|
-
|
|
32802
|
+
nK(n, z.blocks, te) || De({ blocks: {
|
|
32749
32803
|
...z.blocks,
|
|
32750
32804
|
[te]: n
|
|
32751
32805
|
} });
|
|
@@ -32757,7 +32811,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
32757
32811
|
...e,
|
|
32758
32812
|
col: r,
|
|
32759
32813
|
row: i
|
|
32760
|
-
}, o =
|
|
32814
|
+
}, o = fK(a, xe, be), s = nK(a, z.blocks, F);
|
|
32761
32815
|
o && !s && De({ blocks: {
|
|
32762
32816
|
...z.blocks,
|
|
32763
32817
|
[F]: a
|
|
@@ -32791,20 +32845,20 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
32791
32845
|
lt();
|
|
32792
32846
|
return;
|
|
32793
32847
|
}
|
|
32794
|
-
let t =
|
|
32795
|
-
if (t &&
|
|
32848
|
+
let t = rK(ue.col, ue.row, z.blocks);
|
|
32849
|
+
if (t && eK(t)) {
|
|
32796
32850
|
B(t, ce), lt();
|
|
32797
32851
|
return;
|
|
32798
32852
|
}
|
|
32799
32853
|
let n = {
|
|
32800
32854
|
col: ue.col,
|
|
32801
32855
|
row: ue.row,
|
|
32802
|
-
w: Math.min(
|
|
32803
|
-
h: Math.min(
|
|
32856
|
+
w: Math.min(zG.width, xe - ue.col + 1),
|
|
32857
|
+
h: Math.min(zG.height, be - ue.row + 1)
|
|
32804
32858
|
};
|
|
32805
|
-
if (!
|
|
32859
|
+
if (!nK(n, z.blocks)) {
|
|
32806
32860
|
if (fe) {
|
|
32807
|
-
let e =
|
|
32861
|
+
let e = sK(ce, n, C, h, me);
|
|
32808
32862
|
e[C] = {
|
|
32809
32863
|
...e[C],
|
|
32810
32864
|
blocks: {
|
|
@@ -32848,8 +32902,8 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
32848
32902
|
});
|
|
32849
32903
|
}, ht = () => {
|
|
32850
32904
|
if (!oe || !ue || !ce) return null;
|
|
32851
|
-
let e =
|
|
32852
|
-
if (e &&
|
|
32905
|
+
let e = rK(ue.col, ue.row, z.blocks);
|
|
32906
|
+
if (e && eK(e) && e) {
|
|
32853
32907
|
let t = z.blocks[e];
|
|
32854
32908
|
return /* @__PURE__ */ (0, P.jsx)("div", {
|
|
32855
32909
|
className: Q["rst-layout-builder-drop-indicator"],
|
|
@@ -32863,7 +32917,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
32863
32917
|
})
|
|
32864
32918
|
});
|
|
32865
32919
|
}
|
|
32866
|
-
let t = Math.min(
|
|
32920
|
+
let t = Math.min(zG.width, xe - ue.col + 1), n = Math.min(zG.height, be - ue.row + 1), r = nK({
|
|
32867
32921
|
col: ue.col,
|
|
32868
32922
|
row: ue.row,
|
|
32869
32923
|
w: t,
|
|
@@ -32906,7 +32960,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
32906
32960
|
children: e
|
|
32907
32961
|
}), /* @__PURE__ */ (0, P.jsxs)(I, {
|
|
32908
32962
|
variant: "caption",
|
|
32909
|
-
children: [
|
|
32963
|
+
children: [tK(t), n && " • In use"]
|
|
32910
32964
|
})]
|
|
32911
32965
|
}, e);
|
|
32912
32966
|
})
|
|
@@ -32964,7 +33018,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
32964
33018
|
mt(),
|
|
32965
33019
|
ht(),
|
|
32966
33020
|
Object.entries(z.blocks).map(([e, t]) => {
|
|
32967
|
-
let n = at(e), r = n && T.size === 1, i =
|
|
33021
|
+
let n = at(e), r = n && T.size === 1, i = eK(e);
|
|
32968
33022
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
32969
33023
|
className: `${Q["rst-layout-builder-block"]} ${n ? Q["rst-layout-builder-block-selected"] : ""} ${i ? Q["rst-layout-builder-block-slot"] : ""}`,
|
|
32970
33024
|
style: {
|
|
@@ -33044,7 +33098,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33044
33098
|
try {
|
|
33045
33099
|
await navigator.clipboard.writeText(s);
|
|
33046
33100
|
} catch {}
|
|
33047
|
-
}, /* @__PURE__ */ (0, P.jsx)(
|
|
33101
|
+
}, /* @__PURE__ */ (0, P.jsx)(IG, {
|
|
33048
33102
|
value: s,
|
|
33049
33103
|
onChange: we,
|
|
33050
33104
|
errors: l,
|
|
@@ -33069,7 +33123,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33069
33123
|
/* @__PURE__ */ (0, P.jsx)(HV, {
|
|
33070
33124
|
value: R || "",
|
|
33071
33125
|
onChange: (e) => e && ke(e),
|
|
33072
|
-
options: [...
|
|
33126
|
+
options: [...QG.map((e) => ({
|
|
33073
33127
|
value: e.id,
|
|
33074
33128
|
label: `${e.name} - ${e.description}`
|
|
33075
33129
|
}))]
|
|
@@ -33110,15 +33164,15 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33110
33164
|
a === "visual" && vt(),
|
|
33111
33165
|
a === "json" && yt(),
|
|
33112
33166
|
a === "split" && /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
33113
|
-
className:
|
|
33167
|
+
className: FG["rst-split-view"],
|
|
33114
33168
|
children: [
|
|
33115
33169
|
/* @__PURE__ */ (0, P.jsx)("div", {
|
|
33116
|
-
className:
|
|
33170
|
+
className: FG["rst-split-view-panel"],
|
|
33117
33171
|
children: vt()
|
|
33118
33172
|
}),
|
|
33119
|
-
/* @__PURE__ */ (0, P.jsx)("div", { className:
|
|
33173
|
+
/* @__PURE__ */ (0, P.jsx)("div", { className: FG["rst-split-view-divider"] }),
|
|
33120
33174
|
/* @__PURE__ */ (0, P.jsx)("div", {
|
|
33121
|
-
className:
|
|
33175
|
+
className: FG["rst-split-view-panel"],
|
|
33122
33176
|
children: yt()
|
|
33123
33177
|
})
|
|
33124
33178
|
]
|
|
@@ -33176,7 +33230,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33176
33230
|
onChange: (e) => w(e),
|
|
33177
33231
|
value: C,
|
|
33178
33232
|
defaultValue: "desktop",
|
|
33179
|
-
options:
|
|
33233
|
+
options: BG.map((e) => ({
|
|
33180
33234
|
value: e,
|
|
33181
33235
|
id: e,
|
|
33182
33236
|
leadingVisual: me.has(e) ? "lock" : void 0
|
|
@@ -33234,7 +33288,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33234
33288
|
variant: "body",
|
|
33235
33289
|
children: "Block:"
|
|
33236
33290
|
}),
|
|
33237
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
33291
|
+
/* @__PURE__ */ (0, P.jsx)(RV, {
|
|
33238
33292
|
value: String(ot),
|
|
33239
33293
|
onChange: (e) => Le(ot, e)
|
|
33240
33294
|
}),
|
|
@@ -33267,7 +33321,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33267
33321
|
})
|
|
33268
33322
|
]
|
|
33269
33323
|
});
|
|
33270
|
-
},
|
|
33324
|
+
}, hK = {
|
|
33271
33325
|
"rst-file-upload": "_rst-file-upload_thtch_1",
|
|
33272
33326
|
"rst-file-upload-dropzone": "_rst-file-upload-dropzone_thtch_8",
|
|
33273
33327
|
"rst-file-upload-dropzone-active": "_rst-file-upload-dropzone-active_thtch_23",
|
|
@@ -33278,7 +33332,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33278
33332
|
"rst-file-upload-file-item": "_rst-file-upload-file-item_thtch_53",
|
|
33279
33333
|
"rst-file-upload-file-info": "_rst-file-upload-file-info_thtch_63",
|
|
33280
33334
|
"rst-file-upload-hidden-input": "_rst-file-upload-hidden-input_thtch_69"
|
|
33281
|
-
},
|
|
33335
|
+
}, gK = (e, t = 0) => {
|
|
33282
33336
|
if (e === 0) return "0 Bytes";
|
|
33283
33337
|
let n = 1024, r = t < 0 ? 0 : t, i = [
|
|
33284
33338
|
"Bytes",
|
|
@@ -33292,7 +33346,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33292
33346
|
"YB"
|
|
33293
33347
|
], a = Math.floor(Math.log(e) / Math.log(n));
|
|
33294
33348
|
return parseFloat((e / n ** +a).toFixed(r)) + " " + i[a];
|
|
33295
|
-
},
|
|
33349
|
+
}, _K = ({ title: e = "Upload files", acceptedFileTypes: t = [], maxFileSize: n, maxFiles: r, onFilesChange: i, trigger: a, state: o = "base", icon: s = "arrow-up", className: c, ...l }) => {
|
|
33296
33350
|
let [u, d] = y([]), [f, p] = y(!1), [m, h] = y(null), g = v(null), _ = (e) => {
|
|
33297
33351
|
e.preventDefault(), e.stopPropagation(), p(!0);
|
|
33298
33352
|
}, b = (e) => {
|
|
@@ -33329,12 +33383,12 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33329
33383
|
}, D = () => {
|
|
33330
33384
|
g.current?.click();
|
|
33331
33385
|
}, O = [
|
|
33332
|
-
|
|
33333
|
-
f ?
|
|
33334
|
-
m || o === "danger" ?
|
|
33386
|
+
hK["rst-file-upload-dropzone"],
|
|
33387
|
+
f ? hK["rst-file-upload-dropzone-active"] : "",
|
|
33388
|
+
m || o === "danger" ? hK["rst-file-upload-dropzone-error"] : ""
|
|
33335
33389
|
].filter(Boolean).join(" ");
|
|
33336
33390
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
33337
|
-
className: `${
|
|
33391
|
+
className: `${hK["rst-file-upload"]} ${c || ""}`,
|
|
33338
33392
|
...l,
|
|
33339
33393
|
children: [
|
|
33340
33394
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
@@ -33348,13 +33402,13 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33348
33402
|
/* @__PURE__ */ (0, P.jsx)("input", {
|
|
33349
33403
|
type: "file",
|
|
33350
33404
|
ref: g,
|
|
33351
|
-
className:
|
|
33405
|
+
className: hK["rst-file-upload-hidden-input"],
|
|
33352
33406
|
multiple: r !== 1,
|
|
33353
33407
|
accept: t.join(","),
|
|
33354
33408
|
onChange: w
|
|
33355
33409
|
}),
|
|
33356
33410
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
33357
|
-
className:
|
|
33411
|
+
className: hK["rst-file-upload-header"],
|
|
33358
33412
|
children: [/* @__PURE__ */ (0, P.jsx)(DB, {
|
|
33359
33413
|
src: s,
|
|
33360
33414
|
size: "large"
|
|
@@ -33364,7 +33418,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33364
33418
|
})]
|
|
33365
33419
|
}),
|
|
33366
33420
|
t.length > 0 && /* @__PURE__ */ (0, P.jsx)("div", {
|
|
33367
|
-
className:
|
|
33421
|
+
className: hK["rst-file-upload-tags"],
|
|
33368
33422
|
children: t.map((e) => /* @__PURE__ */ (0, P.jsx)(le, {
|
|
33369
33423
|
value: e,
|
|
33370
33424
|
state: "base"
|
|
@@ -33372,7 +33426,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33372
33426
|
}),
|
|
33373
33427
|
(n || r) && /* @__PURE__ */ (0, P.jsx)(I, {
|
|
33374
33428
|
variant: "caption",
|
|
33375
|
-
children: [n ? `Maximum file size: ${
|
|
33429
|
+
children: [n ? `Maximum file size: ${gK(n)}` : null, r ? `Maximum files: ${r}` : null].filter(Boolean).join(" • ")
|
|
33376
33430
|
}),
|
|
33377
33431
|
a ? /* @__PURE__ */ (0, P.jsx)("div", {
|
|
33378
33432
|
onClick: (e) => {
|
|
@@ -33391,11 +33445,11 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33391
33445
|
children: m
|
|
33392
33446
|
}),
|
|
33393
33447
|
u.length > 0 && /* @__PURE__ */ (0, P.jsx)("div", {
|
|
33394
|
-
className:
|
|
33448
|
+
className: hK["rst-file-upload-files"],
|
|
33395
33449
|
children: u.map((e, t) => /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
33396
|
-
className:
|
|
33450
|
+
className: hK["rst-file-upload-file-item"],
|
|
33397
33451
|
children: [/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
33398
|
-
className:
|
|
33452
|
+
className: hK["rst-file-upload-file-info"],
|
|
33399
33453
|
children: [
|
|
33400
33454
|
/* @__PURE__ */ (0, P.jsx)(F, { src: "document-outline" }),
|
|
33401
33455
|
/* @__PURE__ */ (0, P.jsx)(I, {
|
|
@@ -33425,7 +33479,7 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33425
33479
|
})
|
|
33426
33480
|
]
|
|
33427
33481
|
});
|
|
33428
|
-
},
|
|
33482
|
+
}, vK = {
|
|
33429
33483
|
"rst-workflow-node": "_rst-workflow-node_1sk0t_2",
|
|
33430
33484
|
"rst-workflow-node-header": "_rst-workflow-node-header_1sk0t_20",
|
|
33431
33485
|
"rst-workflow-node-title": "_rst-workflow-node-title_1sk0t_27",
|
|
@@ -33436,13 +33490,13 @@ var pK = ({ initialLayout: e, onChange: t, dataModel: n, defaultViewMode: r = "v
|
|
|
33436
33490
|
};
|
|
33437
33491
|
//#endregion
|
|
33438
33492
|
//#region src/custom-components/workflow/node/workflow-node.tsx
|
|
33439
|
-
function
|
|
33493
|
+
function yK({ node: e, onClick: t, className: n }) {
|
|
33440
33494
|
let r = () => {
|
|
33441
33495
|
t && t(e);
|
|
33442
33496
|
};
|
|
33443
33497
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
33444
33498
|
className: [
|
|
33445
|
-
|
|
33499
|
+
vK["rst-workflow-node"],
|
|
33446
33500
|
n,
|
|
33447
33501
|
e.className
|
|
33448
33502
|
].filter(Boolean).join(" "),
|
|
@@ -33459,23 +33513,23 @@ function vK({ node: e, onClick: t, className: n }) {
|
|
|
33459
33513
|
"aria-label": `Workflow node: ${e.label}`,
|
|
33460
33514
|
children: [
|
|
33461
33515
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
33462
|
-
className:
|
|
33516
|
+
className: vK["rst-workflow-node-header"],
|
|
33463
33517
|
children: [e.icon && /* @__PURE__ */ (0, P.jsx)(F, { src: e.icon }), /* @__PURE__ */ (0, P.jsx)(I, {
|
|
33464
33518
|
variant: "title",
|
|
33465
33519
|
children: e.label
|
|
33466
33520
|
})]
|
|
33467
33521
|
}),
|
|
33468
33522
|
e.description && /* @__PURE__ */ (0, P.jsx)("div", {
|
|
33469
|
-
className:
|
|
33523
|
+
className: vK["rst-workflow-node-content"],
|
|
33470
33524
|
children: /* @__PURE__ */ (0, P.jsx)(I, {
|
|
33471
33525
|
variant: "body",
|
|
33472
33526
|
children: e.description
|
|
33473
33527
|
})
|
|
33474
33528
|
}),
|
|
33475
33529
|
e.metadata && Object.keys(e.metadata).length > 0 && /* @__PURE__ */ (0, P.jsx)("div", {
|
|
33476
|
-
className:
|
|
33530
|
+
className: vK["rst-workflow-node-footer"],
|
|
33477
33531
|
children: Object.entries(e.metadata).map(([e, t]) => /* @__PURE__ */ (0, P.jsxs)("span", {
|
|
33478
|
-
className:
|
|
33532
|
+
className: vK["rst-workflow-node-metadata"],
|
|
33479
33533
|
children: [
|
|
33480
33534
|
e,
|
|
33481
33535
|
": ",
|
|
@@ -33488,7 +33542,7 @@ function vK({ node: e, onClick: t, className: n }) {
|
|
|
33488
33542
|
}
|
|
33489
33543
|
//#endregion
|
|
33490
33544
|
//#region src/custom-components/workflow/layout/workflow-layout.ts
|
|
33491
|
-
var
|
|
33545
|
+
var bK = {
|
|
33492
33546
|
direction: "TB",
|
|
33493
33547
|
nodeSpacingX: 120,
|
|
33494
33548
|
nodeSpacingY: 100,
|
|
@@ -33496,7 +33550,7 @@ var yK = {
|
|
|
33496
33550
|
nodeHeight: 75,
|
|
33497
33551
|
padding: 50
|
|
33498
33552
|
};
|
|
33499
|
-
function
|
|
33553
|
+
function xK(e, t) {
|
|
33500
33554
|
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
|
|
33501
33555
|
e.forEach((e) => {
|
|
33502
33556
|
i.set(e.id, 0);
|
|
@@ -33520,11 +33574,11 @@ function bK(e, t) {
|
|
|
33520
33574
|
}
|
|
33521
33575
|
return n;
|
|
33522
33576
|
}
|
|
33523
|
-
function
|
|
33577
|
+
function SK(e, t, n) {
|
|
33524
33578
|
let r = {
|
|
33525
|
-
...
|
|
33579
|
+
...bK,
|
|
33526
33580
|
...n
|
|
33527
|
-
}, i =
|
|
33581
|
+
}, i = xK(e, t), a = /* @__PURE__ */ new Map();
|
|
33528
33582
|
e.forEach((e) => {
|
|
33529
33583
|
let t = i.get(e.id) || 0;
|
|
33530
33584
|
a.has(t) || a.set(t, []), a.get(t).push(e);
|
|
@@ -33540,9 +33594,9 @@ function xK(e, t, n) {
|
|
|
33540
33594
|
level: t
|
|
33541
33595
|
});
|
|
33542
33596
|
});
|
|
33543
|
-
}),
|
|
33597
|
+
}), CK(o, r);
|
|
33544
33598
|
}
|
|
33545
|
-
function
|
|
33599
|
+
function CK(e, t) {
|
|
33546
33600
|
let n = /* @__PURE__ */ new Map();
|
|
33547
33601
|
e.forEach((e) => {
|
|
33548
33602
|
n.has(e.level) || n.set(e.level, []), n.get(e.level).push(e);
|
|
@@ -33559,7 +33613,7 @@ function SK(e, t) {
|
|
|
33559
33613
|
});
|
|
33560
33614
|
}), e;
|
|
33561
33615
|
}
|
|
33562
|
-
function
|
|
33616
|
+
function wK(e, t, n) {
|
|
33563
33617
|
let { x: r, y: i } = e, { nodeWidth: a, nodeHeight: o } = n;
|
|
33564
33618
|
switch (t) {
|
|
33565
33619
|
case "top": return {
|
|
@@ -33584,7 +33638,7 @@ function CK(e, t, n) {
|
|
|
33584
33638
|
};
|
|
33585
33639
|
}
|
|
33586
33640
|
}
|
|
33587
|
-
function
|
|
33641
|
+
function TK(e, t, n) {
|
|
33588
33642
|
return n.direction === "TB" ? t.level > e.level ? {
|
|
33589
33643
|
sourceSide: "bottom",
|
|
33590
33644
|
targetSide: "top"
|
|
@@ -33611,7 +33665,7 @@ function wK(e, t, n) {
|
|
|
33611
33665
|
targetSide: "bottom"
|
|
33612
33666
|
};
|
|
33613
33667
|
}
|
|
33614
|
-
function
|
|
33668
|
+
function EK(e, t) {
|
|
33615
33669
|
let n = Math.abs(t.x - e.x), r = Math.abs(t.y - e.y), i = Math.sqrt(n * n + r * r), a = Math.max(50, i * .4), o = e.x, s = e.y, c = t.x, l = t.y;
|
|
33616
33670
|
switch (e.side) {
|
|
33617
33671
|
case "right":
|
|
@@ -33643,7 +33697,7 @@ function TK(e, t) {
|
|
|
33643
33697
|
}
|
|
33644
33698
|
return `M ${e.x},${e.y} C ${o},${s} ${c},${l} ${t.x},${t.y}`;
|
|
33645
33699
|
}
|
|
33646
|
-
function
|
|
33700
|
+
function DK(e, t) {
|
|
33647
33701
|
if (e.length === 0) return {
|
|
33648
33702
|
width: 0,
|
|
33649
33703
|
height: 0
|
|
@@ -33658,7 +33712,7 @@ function EK(e, t) {
|
|
|
33658
33712
|
}
|
|
33659
33713
|
//#endregion
|
|
33660
33714
|
//#region src/custom-components/workflow/layout/workflow-edge.module.css
|
|
33661
|
-
var
|
|
33715
|
+
var OK = {
|
|
33662
33716
|
"rst-workflow-edges": "_rst-workflow-edges_d1kor_1",
|
|
33663
33717
|
"rst-workflow-edge": "_rst-workflow-edge_d1kor_1",
|
|
33664
33718
|
"rst-workflow-edge-path": "_rst-workflow-edge-path_d1kor_18",
|
|
@@ -33675,13 +33729,13 @@ var DK = {
|
|
|
33675
33729
|
};
|
|
33676
33730
|
//#endregion
|
|
33677
33731
|
//#region src/custom-components/workflow/layout/workflow-edge.tsx
|
|
33678
|
-
function
|
|
33679
|
-
let { sourceSide: o, targetSide: s } =
|
|
33732
|
+
function kK({ edge: e, sourceNode: t, targetNode: n, layout: r, onClick: i, className: a }) {
|
|
33733
|
+
let { sourceSide: o, targetSide: s } = TK(t, n, r), c = wK(t, o, r), l = wK(n, s, r), u = EK(c, l), d = (c.x + l.x) / 2, f = (c.y + l.y) / 2, p = OK[`rst-workflow-edge-${e.type || "default"}`], m = () => {
|
|
33680
33734
|
i && i(e);
|
|
33681
33735
|
};
|
|
33682
33736
|
return /* @__PURE__ */ (0, P.jsxs)("g", {
|
|
33683
33737
|
className: [
|
|
33684
|
-
|
|
33738
|
+
OK["rst-workflow-edge"],
|
|
33685
33739
|
p,
|
|
33686
33740
|
a,
|
|
33687
33741
|
e.className
|
|
@@ -33696,12 +33750,12 @@ function OK({ edge: e, sourceNode: t, targetNode: n, layout: r, onClick: i, clas
|
|
|
33696
33750
|
children: [
|
|
33697
33751
|
/* @__PURE__ */ (0, P.jsx)("path", {
|
|
33698
33752
|
d: u,
|
|
33699
|
-
className:
|
|
33753
|
+
className: OK["rst-workflow-edge-path"],
|
|
33700
33754
|
fill: "none"
|
|
33701
33755
|
}),
|
|
33702
33756
|
/* @__PURE__ */ (0, P.jsx)("path", {
|
|
33703
33757
|
d: u,
|
|
33704
|
-
className:
|
|
33758
|
+
className: OK["rst-workflow-edge-hitbox"],
|
|
33705
33759
|
fill: "none",
|
|
33706
33760
|
strokeWidth: "20",
|
|
33707
33761
|
stroke: "transparent",
|
|
@@ -33711,13 +33765,13 @@ function OK({ edge: e, sourceNode: t, targetNode: n, layout: r, onClick: i, clas
|
|
|
33711
33765
|
cx: c.x,
|
|
33712
33766
|
cy: c.y,
|
|
33713
33767
|
r: "4",
|
|
33714
|
-
className:
|
|
33768
|
+
className: OK["rst-workflow-edge-endpoint-start"]
|
|
33715
33769
|
}),
|
|
33716
33770
|
/* @__PURE__ */ (0, P.jsx)("circle", {
|
|
33717
33771
|
cx: l.x,
|
|
33718
33772
|
cy: l.y,
|
|
33719
33773
|
r: "4",
|
|
33720
|
-
className:
|
|
33774
|
+
className: OK["rst-workflow-edge-endpoint-end"]
|
|
33721
33775
|
}),
|
|
33722
33776
|
e.label && /* @__PURE__ */ (0, P.jsxs)("g", { children: [/* @__PURE__ */ (0, P.jsx)("rect", {
|
|
33723
33777
|
x: d - 30,
|
|
@@ -33725,13 +33779,13 @@ function OK({ edge: e, sourceNode: t, targetNode: n, layout: r, onClick: i, clas
|
|
|
33725
33779
|
width: "60",
|
|
33726
33780
|
height: "24",
|
|
33727
33781
|
rx: "4",
|
|
33728
|
-
className:
|
|
33782
|
+
className: OK["rst-workflow-edge-label-bg"]
|
|
33729
33783
|
}), /* @__PURE__ */ (0, P.jsx)("text", {
|
|
33730
33784
|
x: d,
|
|
33731
33785
|
y: f,
|
|
33732
33786
|
textAnchor: "middle",
|
|
33733
33787
|
dominantBaseline: "middle",
|
|
33734
|
-
className:
|
|
33788
|
+
className: OK["rst-workflow-edge-label"],
|
|
33735
33789
|
children: e.label
|
|
33736
33790
|
})] })
|
|
33737
33791
|
]
|
|
@@ -33739,13 +33793,13 @@ function OK({ edge: e, sourceNode: t, targetNode: n, layout: r, onClick: i, clas
|
|
|
33739
33793
|
}
|
|
33740
33794
|
//#endregion
|
|
33741
33795
|
//#region src/custom-components/workflow/toolbar/workflow-toolbar.module.css
|
|
33742
|
-
var
|
|
33796
|
+
var AK = {
|
|
33743
33797
|
"rst-workflow-toolbar": "_rst-workflow-toolbar_1vjr0_2",
|
|
33744
33798
|
"rst-workflow-toolbar-divider": "_rst-workflow-toolbar-divider_1vjr0_18"
|
|
33745
33799
|
};
|
|
33746
33800
|
//#endregion
|
|
33747
33801
|
//#region src/custom-components/workflow/toolbar/workflow-toolbar.tsx
|
|
33748
|
-
function
|
|
33802
|
+
function jK({ mode: e, onModeChange: t, zoom: n, onZoomChange: r, minZoom: i = .1, maxZoom: a = 2, className: o }) {
|
|
33749
33803
|
let s = () => {
|
|
33750
33804
|
let e = Math.min(n + .1, a);
|
|
33751
33805
|
r(Number(e.toFixed(1)));
|
|
@@ -33756,7 +33810,7 @@ function AK({ mode: e, onModeChange: t, zoom: n, onZoomChange: r, minZoom: i = .
|
|
|
33756
33810
|
r(1);
|
|
33757
33811
|
}, u = Math.round(n * 100);
|
|
33758
33812
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
33759
|
-
className: [
|
|
33813
|
+
className: [AK["rst-workflow-toolbar"], o].filter(Boolean).join(" "),
|
|
33760
33814
|
children: [
|
|
33761
33815
|
/* @__PURE__ */ (0, P.jsx)(L, {
|
|
33762
33816
|
variant: e === "pointer" ? "primary" : "base",
|
|
@@ -33776,7 +33830,7 @@ function AK({ mode: e, onModeChange: t, zoom: n, onZoomChange: r, minZoom: i = .
|
|
|
33776
33830
|
title: "Drag mode - Pan the canvas",
|
|
33777
33831
|
children: "Drag"
|
|
33778
33832
|
}),
|
|
33779
|
-
/* @__PURE__ */ (0, P.jsx)("div", { className:
|
|
33833
|
+
/* @__PURE__ */ (0, P.jsx)("div", { className: AK["rst-workflow-toolbar-divider"] }),
|
|
33780
33834
|
/* @__PURE__ */ (0, P.jsx)(L, {
|
|
33781
33835
|
variant: "base",
|
|
33782
33836
|
size: "small",
|
|
@@ -33845,7 +33899,7 @@ var $ = {
|
|
|
33845
33899
|
};
|
|
33846
33900
|
//#endregion
|
|
33847
33901
|
//#region src/custom-components/workflow/panel/workflow-panel.tsx
|
|
33848
|
-
function
|
|
33902
|
+
function MK({ selectedNode: e, allNodes: t, hasOutputs: n, onCreateNode: r, onConnectNode: i, onClose: a, className: o }) {
|
|
33849
33903
|
let [s, c] = y("default"), [l, u] = y(!1);
|
|
33850
33904
|
if (!e) return null;
|
|
33851
33905
|
let d = t.filter((t) => t.id !== e.id), f = () => {
|
|
@@ -33957,7 +34011,7 @@ function jK({ selectedNode: e, allNodes: t, hasOutputs: n, onCreateNode: r, onCo
|
|
|
33957
34011
|
className: $["rst-workflow-panel-actions"],
|
|
33958
34012
|
children: e.actions.map((e) => /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
33959
34013
|
className: $["rst-workflow-panel-action-item"],
|
|
33960
|
-
children: [/* @__PURE__ */ (0, P.jsx)(F, { src:
|
|
34014
|
+
children: [/* @__PURE__ */ (0, P.jsx)(F, { src: NK(e.type) }), /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
33961
34015
|
className: $["rst-workflow-panel-action-content"],
|
|
33962
34016
|
children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
33963
34017
|
className: $["rst-workflow-panel-action-name"],
|
|
@@ -34096,7 +34150,7 @@ function jK({ selectedNode: e, allNodes: t, hasOutputs: n, onCreateNode: r, onCo
|
|
|
34096
34150
|
})]
|
|
34097
34151
|
});
|
|
34098
34152
|
}
|
|
34099
|
-
function
|
|
34153
|
+
function NK(e) {
|
|
34100
34154
|
return {
|
|
34101
34155
|
api: "globe",
|
|
34102
34156
|
transform: "code",
|
|
@@ -34107,7 +34161,7 @@ function MK(e) {
|
|
|
34107
34161
|
}
|
|
34108
34162
|
//#endregion
|
|
34109
34163
|
//#region src/custom-components/workflow/workflow.module.css
|
|
34110
|
-
var
|
|
34164
|
+
var PK = {
|
|
34111
34165
|
"rst-workflow": "_rst-workflow_3342o_2",
|
|
34112
34166
|
"rst-workflow-viewport": "_rst-workflow-viewport_3342o_12",
|
|
34113
34167
|
"rst-workflow-svg": "_rst-workflow-svg_3342o_20",
|
|
@@ -34117,7 +34171,7 @@ var NK = {
|
|
|
34117
34171
|
};
|
|
34118
34172
|
//#endregion
|
|
34119
34173
|
//#region src/custom-components/workflow/workflow.tsx
|
|
34120
|
-
function
|
|
34174
|
+
function FK({ nodes: e, edges: t, layout: n, showToolbar: r = !0, showPanel: i = !0, defaultZoom: a = 1, minZoom: o = .1, maxZoom: s = 2, onNodeClick: c, onEdgeClick: l, onNodeCreate: u, onNodeConnect: d, className: f, ...p }) {
|
|
34121
34175
|
let [m, h] = y("pointer"), [g, b] = y(a), [x, S] = y({
|
|
34122
34176
|
x: 0,
|
|
34123
34177
|
y: 0
|
|
@@ -34125,13 +34179,13 @@ function PK({ nodes: e, edges: t, layout: n, showToolbar: r = !0, showPanel: i =
|
|
|
34125
34179
|
x: 0,
|
|
34126
34180
|
y: 0
|
|
34127
34181
|
}), [D, O] = y(null), k = v(null), A = _(() => ({
|
|
34128
|
-
...
|
|
34182
|
+
...bK,
|
|
34129
34183
|
...n
|
|
34130
|
-
}), [n]), j = _(() =>
|
|
34184
|
+
}), [n]), j = _(() => SK(e, t, A), [
|
|
34131
34185
|
e,
|
|
34132
34186
|
t,
|
|
34133
34187
|
A
|
|
34134
|
-
]), { width: M, height: N } = _(() =>
|
|
34188
|
+
]), { width: M, height: N } = _(() => DK(j, A), [j, A]), ee = _(() => {
|
|
34135
34189
|
let e = /* @__PURE__ */ new Map();
|
|
34136
34190
|
return j.forEach((t) => {
|
|
34137
34191
|
e.set(t.id, t);
|
|
@@ -34167,7 +34221,7 @@ function PK({ nodes: e, edges: t, layout: n, showToolbar: r = !0, showPanel: i =
|
|
|
34167
34221
|
}, le = m === "drag" ? C ? "grabbing" : "grab" : "default";
|
|
34168
34222
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
34169
34223
|
ref: k,
|
|
34170
|
-
className: [
|
|
34224
|
+
className: [PK["rst-workflow"], f].filter(Boolean).join(" "),
|
|
34171
34225
|
onMouseDown: ae,
|
|
34172
34226
|
onMouseMove: oe,
|
|
34173
34227
|
onMouseUp: se,
|
|
@@ -34176,7 +34230,7 @@ function PK({ nodes: e, edges: t, layout: n, showToolbar: r = !0, showPanel: i =
|
|
|
34176
34230
|
style: { cursor: le },
|
|
34177
34231
|
...p,
|
|
34178
34232
|
children: [
|
|
34179
|
-
r && /* @__PURE__ */ (0, P.jsx)(
|
|
34233
|
+
r && /* @__PURE__ */ (0, P.jsx)(jK, {
|
|
34180
34234
|
mode: m,
|
|
34181
34235
|
onModeChange: h,
|
|
34182
34236
|
zoom: g,
|
|
@@ -34185,13 +34239,13 @@ function PK({ nodes: e, edges: t, layout: n, showToolbar: r = !0, showPanel: i =
|
|
|
34185
34239
|
maxZoom: s
|
|
34186
34240
|
}),
|
|
34187
34241
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
34188
|
-
className:
|
|
34242
|
+
className: PK["rst-workflow-viewport"],
|
|
34189
34243
|
style: {
|
|
34190
34244
|
transform: `translate(${x.x}px, ${x.y}px) scale(${g})`,
|
|
34191
34245
|
transformOrigin: "0 0"
|
|
34192
34246
|
},
|
|
34193
34247
|
children: [/* @__PURE__ */ (0, P.jsxs)("svg", {
|
|
34194
|
-
className:
|
|
34248
|
+
className: PK["rst-workflow-svg"],
|
|
34195
34249
|
width: M,
|
|
34196
34250
|
height: N,
|
|
34197
34251
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34205,13 +34259,13 @@ function PK({ nodes: e, edges: t, layout: n, showToolbar: r = !0, showPanel: i =
|
|
|
34205
34259
|
markerUnits: "strokeWidth",
|
|
34206
34260
|
children: /* @__PURE__ */ (0, P.jsx)("path", {
|
|
34207
34261
|
d: "M0,0 L0,6 L9,3 z",
|
|
34208
|
-
className:
|
|
34262
|
+
className: PK["rst-workflow-arrow"]
|
|
34209
34263
|
})
|
|
34210
34264
|
}) }), /* @__PURE__ */ (0, P.jsx)("g", {
|
|
34211
|
-
className:
|
|
34265
|
+
className: PK["rst-workflow-edges"],
|
|
34212
34266
|
children: t.map((e) => {
|
|
34213
34267
|
let t = ee.get(e.source), n = ee.get(e.target);
|
|
34214
|
-
return !t || !n ? (console.warn(`Edge ${e.id} references non-existent node(s): source=${e.source}, target=${e.target}`), null) : /* @__PURE__ */ (0, P.jsx)(
|
|
34268
|
+
return !t || !n ? (console.warn(`Edge ${e.id} references non-existent node(s): source=${e.source}, target=${e.target}`), null) : /* @__PURE__ */ (0, P.jsx)(kK, {
|
|
34215
34269
|
edge: e,
|
|
34216
34270
|
sourceNode: t,
|
|
34217
34271
|
targetNode: n,
|
|
@@ -34221,18 +34275,18 @@ function PK({ nodes: e, edges: t, layout: n, showToolbar: r = !0, showPanel: i =
|
|
|
34221
34275
|
})
|
|
34222
34276
|
})]
|
|
34223
34277
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
34224
|
-
className:
|
|
34278
|
+
className: PK["rst-workflow-nodes"],
|
|
34225
34279
|
style: {
|
|
34226
34280
|
width: `${M}px`,
|
|
34227
34281
|
height: `${N}px`
|
|
34228
34282
|
},
|
|
34229
|
-
children: j.map((e) => /* @__PURE__ */ (0, P.jsx)(
|
|
34283
|
+
children: j.map((e) => /* @__PURE__ */ (0, P.jsx)(yK, {
|
|
34230
34284
|
node: e,
|
|
34231
34285
|
onClick: ne
|
|
34232
34286
|
}, e.id))
|
|
34233
34287
|
})]
|
|
34234
34288
|
}),
|
|
34235
|
-
i && D && /* @__PURE__ */ (0, P.jsx)(
|
|
34289
|
+
i && D && /* @__PURE__ */ (0, P.jsx)(MK, {
|
|
34236
34290
|
selectedNode: D,
|
|
34237
34291
|
allNodes: e,
|
|
34238
34292
|
hasOutputs: te,
|
|
@@ -34245,15 +34299,15 @@ function PK({ nodes: e, edges: t, layout: n, showToolbar: r = !0, showPanel: i =
|
|
|
34245
34299
|
}
|
|
34246
34300
|
//#endregion
|
|
34247
34301
|
//#region src/custom-components/workflow/utils/workflow-validation.ts
|
|
34248
|
-
function
|
|
34302
|
+
function IK(e, t) {
|
|
34249
34303
|
let n = [], r = [];
|
|
34250
|
-
return
|
|
34304
|
+
return LK(e, t, new Map(e.map((e) => [e.id, e])), n), RK(e, t, n, r), zK(e, t, r), BK(e, t, n), VK(t, r), HK(t, r), {
|
|
34251
34305
|
valid: n.length === 0,
|
|
34252
34306
|
errors: n,
|
|
34253
34307
|
warnings: r
|
|
34254
34308
|
};
|
|
34255
34309
|
}
|
|
34256
|
-
function
|
|
34310
|
+
function LK(e, t, n, r) {
|
|
34257
34311
|
for (let e of t) n.has(e.source) || r.push({
|
|
34258
34312
|
type: "invalid-edge",
|
|
34259
34313
|
message: `Edge ${e.id} references non-existent source node: ${e.source}`,
|
|
@@ -34264,7 +34318,7 @@ function IK(e, t, n, r) {
|
|
|
34264
34318
|
relatedIds: [e.id, e.target]
|
|
34265
34319
|
});
|
|
34266
34320
|
}
|
|
34267
|
-
function
|
|
34321
|
+
function RK(e, t, n, r) {
|
|
34268
34322
|
let i = e.filter((e) => e.nodeType === "start"), a = e.filter((e) => e.nodeType === "end");
|
|
34269
34323
|
if (i.length === 0) {
|
|
34270
34324
|
let r = new Set(t.map((e) => e.target));
|
|
@@ -34287,7 +34341,7 @@ function LK(e, t, n, r) {
|
|
|
34287
34341
|
});
|
|
34288
34342
|
}
|
|
34289
34343
|
}
|
|
34290
|
-
function
|
|
34344
|
+
function zK(e, t, n) {
|
|
34291
34345
|
let r = /* @__PURE__ */ new Set();
|
|
34292
34346
|
for (let e of t) r.add(e.source), r.add(e.target);
|
|
34293
34347
|
let i = e.filter((e) => !r.has(e.id));
|
|
@@ -34297,7 +34351,7 @@ function RK(e, t, n) {
|
|
|
34297
34351
|
relatedIds: i.map((e) => e.id)
|
|
34298
34352
|
});
|
|
34299
34353
|
}
|
|
34300
|
-
function
|
|
34354
|
+
function BK(e, t, n) {
|
|
34301
34355
|
let r = /* @__PURE__ */ new Map();
|
|
34302
34356
|
for (let t of e) r.set(t.id, []);
|
|
34303
34357
|
for (let e of t) {
|
|
@@ -34322,7 +34376,7 @@ function zK(e, t, n) {
|
|
|
34322
34376
|
relatedIds: e
|
|
34323
34377
|
});
|
|
34324
34378
|
}
|
|
34325
|
-
function
|
|
34379
|
+
function VK(e, t) {
|
|
34326
34380
|
let n = e.filter((e) => e.type === "conditional" && !e.condition);
|
|
34327
34381
|
n.length > 0 && t.push({
|
|
34328
34382
|
type: "missing-condition",
|
|
@@ -34330,7 +34384,7 @@ function BK(e, t) {
|
|
|
34330
34384
|
relatedIds: n.map((e) => e.id)
|
|
34331
34385
|
});
|
|
34332
34386
|
}
|
|
34333
|
-
function
|
|
34387
|
+
function HK(e, t) {
|
|
34334
34388
|
let n = /* @__PURE__ */ new Map();
|
|
34335
34389
|
for (let t of e) {
|
|
34336
34390
|
let e = `${t.source}->${t.target}`, r = n.get(e) || [];
|
|
@@ -34342,7 +34396,7 @@ function VK(e, t) {
|
|
|
34342
34396
|
relatedIds: r
|
|
34343
34397
|
});
|
|
34344
34398
|
}
|
|
34345
|
-
function
|
|
34399
|
+
function UK(e, t) {
|
|
34346
34400
|
let n = /* @__PURE__ */ new Set(), r = [e];
|
|
34347
34401
|
for (; r.length > 0;) {
|
|
34348
34402
|
let e = r.shift();
|
|
@@ -34353,7 +34407,7 @@ function HK(e, t) {
|
|
|
34353
34407
|
}
|
|
34354
34408
|
return n;
|
|
34355
34409
|
}
|
|
34356
|
-
function
|
|
34410
|
+
function WK(e, t) {
|
|
34357
34411
|
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
34358
34412
|
for (let t of e) n.set(t.id, []), r.set(t.id, 0);
|
|
34359
34413
|
for (let e of t) {
|
|
@@ -34374,4 +34428,4 @@ function UK(e, t) {
|
|
|
34374
34428
|
return a.length === e.length ? a : null;
|
|
34375
34429
|
}
|
|
34376
34430
|
//#endregion
|
|
34377
|
-
export {
|
|
34431
|
+
export { ZW as AIChatPanel, me as AnchoredOverlay, pG as AppBar, DB as Avatar, ue as Banner, hG as Breadcrumbs, L as Button, MG as Calendar, nW as Cell, XU as CellType, RH as Chart, fe as Checkbox, ZV as ContributionHeatmap, QU as DatePicker, YU as DateRangePicker, _K as FileUpload, PG as Form, vB as Graph, F as Icon, TB as Kbd, eH as Label, gH as Layout, mK as LayoutBuilder, jV as Markdown, MH as Menu, DG as MindTree, iG as MockAIProvider, QV as NumberInput, te as OTP, wG as Scaffold, HV as Select, cG as ShortcutProvider, xG as Sidebar, _H as Stack, nG as TableGrid, lW as TableGridRow, nU as TableProvider, RV as TextInput, mH as Timeline, wH as TourProvider, I as Typography, FK as Workflow, MK as WorkflowPanel, jK as WorkflowToolbar, zW as buildColumnSchema, rG as buildSystemPrompt, UK as getReachableNodes, WK as getTopologicalOrder, BW as tableGridToolDefinitions, EH as useHistory, dG as useScaffold, lG as useShortcut, CH as useTour, TH as useTourManager, UW as validateToolCallsGeneric, IK as validateWorkflow };
|