@equinor/stratus-ui 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.js +263 -260
- package/dist/types/components/Select/Select.d.ts +10 -0
- package/dist/types/components/Select/Select.d.ts.map +1 -1
- package/dist/types/components/Select/SelectClearButton.d.ts +2 -1
- package/dist/types/components/Select/SelectClearButton.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13,11 +13,11 @@ import F from "@tiptap/extension-table-header";
|
|
|
13
13
|
import I from "@tiptap/extension-table-row";
|
|
14
14
|
import L from "@tiptap/extension-text-align";
|
|
15
15
|
import { TextStyle as R } from "@tiptap/extension-text-style";
|
|
16
|
-
import { Extension as z, Node as B, callOrReturn as V, createStyleTag as
|
|
16
|
+
import { Extension as z, Node as B, callOrReturn as V, createStyleTag as ee, escapeForRegEx as H, getExtensionField as te, isNodeEmpty as ne, isNodeSelection as re, mergeAttributes as ie } from "@tiptap/core";
|
|
17
17
|
import { EditorContent as ae, ReactRenderer as oe, useEditor as se } from "@tiptap/react";
|
|
18
18
|
import U from "@tiptap/starter-kit";
|
|
19
19
|
import { createPopper as ce } from "@popperjs/core";
|
|
20
|
-
import { addDays as le, addMonths as
|
|
20
|
+
import { addDays as le, addMonths as W, addSeconds as ue, addYears as de, differenceInMilliseconds as fe, eachDayOfInterval as pe, eachMonthOfInterval as me, eachQuarterOfInterval as he, eachWeekOfInterval as ge, eachYearOfInterval as _e, endOfDay as ve, endOfDecade as ye, endOfMonth as be, endOfWeek as xe, endOfYear as Se, format as Ce, getDayOfYear as we, getDecade as Te, getISOWeek as Ee, getQuarter as De, isAfter as Oe, isBefore as ke, isEqual as Ae, isSameDay as je, isSameMonth as Me, isSameQuarter as Ne, isSameWeek as Pe, isSameYear as Fe, isToday as Ie, isWeekend as Le, parse as Re, parseISO as ze, startOfDay as Be, startOfDecade as Ve, startOfMonth as He, startOfWeek as Ue, startOfYear as We, subDays as Ge, subMonths as Ke, subYears as qe, toDate as Je } from "date-fns";
|
|
21
21
|
//#region src/theme/palette.ts
|
|
22
22
|
var Ye = {
|
|
23
23
|
primary: {
|
|
@@ -361,10 +361,10 @@ function ut(e, t, n) {
|
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
var dt = o(({ children: e, className: n, content: i, placement: a = "bottom", trigger: o = ["click", "hover"], open: c, defaultOpen: u = !1, arrow: f = !0, closeOnClickOutside: g = !0, tooltipRef: y, zIndex: w = 1500, maxWidth: T = "300px", fontSize: E = "0.75rem", style: D, container: O, keepMounted: k = !1, disablePortal: A = !1, disabled: j = !1, onOpen: M, onClose: N, onClick: P, onMouseEnter: F, onMouseLeave: I, onContextMenu: L, onClickOutside: R, ...z }, B) => {
|
|
364
|
-
let [V,
|
|
364
|
+
let [V, ee] = v(u), H = _(null), te = _(null), ne = _(void 0), [re, ie] = v(null), ae = c !== void 0, oe = j ? !1 : ae ? c : V, se = _(oe);
|
|
365
365
|
d(() => {
|
|
366
366
|
let e = se.current;
|
|
367
|
-
se.current = oe, j && (clearTimeout(ne.current), ae ||
|
|
367
|
+
se.current = oe, j && (clearTimeout(ne.current), ae || ee(!1), e && N?.(new MouseEvent("click", {
|
|
368
368
|
bubbles: !0,
|
|
369
369
|
cancelable: !0
|
|
370
370
|
})));
|
|
@@ -377,13 +377,13 @@ var dt = o(({ children: e, className: n, content: i, placement: a = "bottom", tr
|
|
|
377
377
|
let U = h(() => Array.isArray(o) ? o : [o], [o]), ce = {};
|
|
378
378
|
for (let e of Object.keys(z)) e.startsWith("data-") && (ce[e] = z[e]);
|
|
379
379
|
let le = l((e) => {
|
|
380
|
-
j || (ae ||
|
|
380
|
+
j || (ae || ee(!0), M?.(e));
|
|
381
381
|
}, [
|
|
382
382
|
j,
|
|
383
383
|
ae,
|
|
384
384
|
M
|
|
385
|
-
]),
|
|
386
|
-
ae ||
|
|
385
|
+
]), W = l((e) => {
|
|
386
|
+
ae || ee(!1), N?.(e);
|
|
387
387
|
}, [ae, N]);
|
|
388
388
|
p(y, () => ({
|
|
389
389
|
open: (e) => {
|
|
@@ -398,46 +398,46 @@ var dt = o(({ children: e, className: n, content: i, placement: a = "bottom", tr
|
|
|
398
398
|
bubbles: !0,
|
|
399
399
|
cancelable: !0
|
|
400
400
|
});
|
|
401
|
-
|
|
401
|
+
W(e ?? t);
|
|
402
402
|
}
|
|
403
403
|
}));
|
|
404
|
-
let
|
|
405
|
-
if (!
|
|
406
|
-
let e =
|
|
404
|
+
let ue = l(() => {
|
|
405
|
+
if (!H.current || !te.current) return;
|
|
406
|
+
let e = H.current.getBoundingClientRect(), t = te.current.getBoundingClientRect();
|
|
407
407
|
ie(ut(e, {
|
|
408
408
|
width: t.width,
|
|
409
409
|
height: t.height
|
|
410
410
|
}, a));
|
|
411
411
|
}, [a]);
|
|
412
412
|
m(() => {
|
|
413
|
-
oe &&
|
|
413
|
+
oe && ue();
|
|
414
414
|
}, [
|
|
415
415
|
oe,
|
|
416
|
-
|
|
416
|
+
ue,
|
|
417
417
|
i
|
|
418
418
|
]), d(() => {
|
|
419
419
|
if (!oe) return;
|
|
420
|
-
let e = () =>
|
|
420
|
+
let e = () => ue();
|
|
421
421
|
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
422
422
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
423
423
|
};
|
|
424
|
-
}, [oe,
|
|
424
|
+
}, [oe, ue]), d(() => {
|
|
425
425
|
if (!oe || !g || !U.includes("click") && !U.includes("contextMenu")) return;
|
|
426
426
|
let e = (e) => {
|
|
427
427
|
let t = e.target;
|
|
428
|
-
|
|
428
|
+
H.current?.contains(t) || te.current?.contains(t) || (W(e), R?.(!1, e));
|
|
429
429
|
};
|
|
430
430
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
431
431
|
}, [
|
|
432
432
|
oe,
|
|
433
433
|
g,
|
|
434
|
-
|
|
434
|
+
W,
|
|
435
435
|
R
|
|
436
436
|
]);
|
|
437
|
-
let
|
|
437
|
+
let de = l((e) => {
|
|
438
438
|
if (!U.includes("click")) return;
|
|
439
439
|
let t = !oe;
|
|
440
|
-
ae ||
|
|
440
|
+
ae || ee(t), P?.(t, e), t ? M?.(e) : N?.(e);
|
|
441
441
|
}, [
|
|
442
442
|
U,
|
|
443
443
|
oe,
|
|
@@ -445,11 +445,11 @@ var dt = o(({ children: e, className: n, content: i, placement: a = "bottom", tr
|
|
|
445
445
|
P,
|
|
446
446
|
M,
|
|
447
447
|
N
|
|
448
|
-
]),
|
|
448
|
+
]), fe = l((e) => {
|
|
449
449
|
if (!U.includes("contextMenu")) return;
|
|
450
450
|
e.preventDefault();
|
|
451
451
|
let t = !oe;
|
|
452
|
-
ae ||
|
|
452
|
+
ae || ee(t), L?.(t, e), t ? M?.(e) : N?.(e);
|
|
453
453
|
}, [
|
|
454
454
|
U,
|
|
455
455
|
oe,
|
|
@@ -457,39 +457,39 @@ var dt = o(({ children: e, className: n, content: i, placement: a = "bottom", tr
|
|
|
457
457
|
L,
|
|
458
458
|
M,
|
|
459
459
|
N
|
|
460
|
-
]),
|
|
460
|
+
]), pe = l((e) => {
|
|
461
461
|
U.includes("hover") && (clearTimeout(ne.current), le(e), F?.(!0, e));
|
|
462
462
|
}, [
|
|
463
463
|
U,
|
|
464
464
|
le,
|
|
465
465
|
F
|
|
466
|
-
]),
|
|
467
|
-
U.includes("hover") && (ne.current = setTimeout(() =>
|
|
466
|
+
]), me = l((e) => {
|
|
467
|
+
U.includes("hover") && (ne.current = setTimeout(() => W(e), 100), I?.(!1, e));
|
|
468
468
|
}, [
|
|
469
469
|
U,
|
|
470
|
-
|
|
470
|
+
W,
|
|
471
471
|
I
|
|
472
|
-
]),
|
|
472
|
+
]), he = l(() => {
|
|
473
473
|
U.includes("hover") && clearTimeout(ne.current);
|
|
474
|
-
}, [U]),
|
|
475
|
-
U.includes("hover") && (
|
|
474
|
+
}, [U]), ge = l((e) => {
|
|
475
|
+
U.includes("hover") && (W(e), I?.(!1, e));
|
|
476
476
|
}, [
|
|
477
477
|
U,
|
|
478
|
-
|
|
478
|
+
W,
|
|
479
479
|
I
|
|
480
|
-
]),
|
|
481
|
-
j || (U.includes("click") && (
|
|
482
|
-
let
|
|
483
|
-
|
|
484
|
-
}, []),
|
|
485
|
-
ref:
|
|
486
|
-
...
|
|
480
|
+
]), _e = {};
|
|
481
|
+
j || (U.includes("click") && (_e.onClick = de), U.includes("contextMenu") && (_e.onContextMenu = fe), U.includes("hover") && (_e.onMouseEnter = pe, _e.onMouseLeave = me));
|
|
482
|
+
let ve = l((e) => {
|
|
483
|
+
H.current = e;
|
|
484
|
+
}, []), ye = () => typeof e == "string" ? /* @__PURE__ */ x("span", {
|
|
485
|
+
ref: ve,
|
|
486
|
+
..._e,
|
|
487
487
|
className: "stratus-tooltip-anchor",
|
|
488
488
|
style: j ? { cursor: "default" } : void 0,
|
|
489
489
|
children: e
|
|
490
490
|
}) : t.map(e, (e) => s(e) ? r(e, {
|
|
491
|
-
ref:
|
|
492
|
-
...
|
|
491
|
+
ref: ve,
|
|
492
|
+
..._e,
|
|
493
493
|
style: {
|
|
494
494
|
display: e.props?.display ?? "inline-block",
|
|
495
495
|
...j ? {} : { cursor: "pointer" },
|
|
@@ -509,8 +509,8 @@ var dt = o(({ children: e, className: n, content: i, placement: a = "bottom", tr
|
|
|
509
509
|
display: oe ? void 0 : "none",
|
|
510
510
|
...!oe && k ? { visibility: "hidden" } : {}
|
|
511
511
|
},
|
|
512
|
-
onMouseEnter:
|
|
513
|
-
onMouseLeave:
|
|
512
|
+
onMouseEnter: he,
|
|
513
|
+
onMouseLeave: ge,
|
|
514
514
|
...ce,
|
|
515
515
|
children: [f && /* @__PURE__ */ x("span", { className: "stratus-tooltip__arrow" }), /* @__PURE__ */ x("div", {
|
|
516
516
|
className: "stratus-tooltip__content",
|
|
@@ -522,7 +522,7 @@ var dt = o(({ children: e, className: n, content: i, placement: a = "bottom", tr
|
|
|
522
522
|
children: i
|
|
523
523
|
})]
|
|
524
524
|
}) : null, we = !A && typeof document < "u" ? O ?? document.body : null;
|
|
525
|
-
return /* @__PURE__ */ S(b, { children: [
|
|
525
|
+
return /* @__PURE__ */ S(b, { children: [ye(), Ce && (we ? C(Ce, we) : Ce)] });
|
|
526
526
|
});
|
|
527
527
|
dt.displayName = "Tooltip";
|
|
528
528
|
//#endregion
|
|
@@ -797,7 +797,7 @@ var Ct = rt((e, t) => {
|
|
|
797
797
|
toggleSelect: R,
|
|
798
798
|
toggleOpen: z,
|
|
799
799
|
onClick: h
|
|
800
|
-
}, V = n ?? "ul",
|
|
800
|
+
}, V = n ?? "ul", ee = G("stratus-menu", `stratus-menu--${i}`, T), H = {
|
|
801
801
|
...E,
|
|
802
802
|
...C
|
|
803
803
|
};
|
|
@@ -806,8 +806,8 @@ var Ct = rt((e, t) => {
|
|
|
806
806
|
children: /* @__PURE__ */ x(V, {
|
|
807
807
|
ref: t,
|
|
808
808
|
role: "menu",
|
|
809
|
-
className:
|
|
810
|
-
style:
|
|
809
|
+
className: ee,
|
|
810
|
+
style: H,
|
|
811
811
|
...D,
|
|
812
812
|
children: r
|
|
813
813
|
})
|
|
@@ -954,7 +954,7 @@ var Nt = {
|
|
|
954
954
|
3: "0 10px 20px var(--stratus-shadow-ambient), 0 3px 6px var(--stratus-shadow-penumbra)"
|
|
955
955
|
};
|
|
956
956
|
function Pt(e, t) {
|
|
957
|
-
let { columns: n, data: r, rowId: i = "id", childrenId: a = "children", compact: o = !1, headerHeight: s, rowHeight: c, dynamicHeight: u = !1, sortable: f = !0, multiSort: m = !1, resizable: g = !0, expandable: y = !1, expandedRowKeys: b, defaultExpandedRowKeys: C, draggable: k = !1, selectable: A = !1, selectRowOnClick: j = !0, stripedRows: M = !1, disabled: N = !1, elevation: P = 0, noDataValue: F, extraColumnsWidth: I, className: L, rowClassName: R, onRowClick: z, onColumnSort: B, onRowSelect: V, onDragEnd:
|
|
957
|
+
let { columns: n, data: r, rowId: i = "id", childrenId: a = "children", compact: o = !1, headerHeight: s, rowHeight: c, dynamicHeight: u = !1, sortable: f = !0, multiSort: m = !1, resizable: g = !0, expandable: y = !1, expandedRowKeys: b, defaultExpandedRowKeys: C, draggable: k = !1, selectable: A = !1, selectRowOnClick: j = !0, stripedRows: M = !1, disabled: N = !1, elevation: P = 0, noDataValue: F, extraColumnsWidth: I, className: L, rowClassName: R, onRowClick: z, onColumnSort: B, onRowSelect: V, onDragEnd: ee, onEndReached: H, style: te } = e, ne = _(null), re = _(null), [ie, ae] = v(0);
|
|
958
958
|
d(() => {
|
|
959
959
|
let e = ne.current;
|
|
960
960
|
if (!e) return;
|
|
@@ -968,9 +968,9 @@ function Pt(e, t) {
|
|
|
968
968
|
let n = typeof e == "function" ? e(t) : e;
|
|
969
969
|
return B?.(Mt(n)), n;
|
|
970
970
|
});
|
|
971
|
-
}, [B, N]), [ce, le] = v(() => C ? At(C) : {}),
|
|
971
|
+
}, [B, N]), [ce, le] = v(() => C ? At(C) : {}), W = h(() => b === void 0 ? ce : At(b), [b, ce]), ue = l((e) => {
|
|
972
972
|
b === void 0 && le((t) => typeof e == "function" ? e(t) : e);
|
|
973
|
-
}, [b]), [
|
|
973
|
+
}, [b]), [de, fe] = v(() => e.defaultSelectedRowsIds ? Object.fromEntries(e.defaultSelectedRowsIds.map((e) => [e, !0])) : {}), [pe, me] = v(null), [he, ge] = v(null), _e = l((e, t) => typeof e == "function" ? Math.max(e(ie, t), 0) : typeof e == "string" ? e.endsWith("%") ? Math.max(parseFloat(e) / 100 * ie, 0) : parseFloat(e) || 150 : e, [ie]), ve = h(() => {
|
|
974
974
|
let e = [];
|
|
975
975
|
if (y) {
|
|
976
976
|
let t = I ? I({
|
|
@@ -1051,7 +1051,7 @@ function Pt(e, t) {
|
|
|
1051
1051
|
});
|
|
1052
1052
|
}
|
|
1053
1053
|
return n.forEach((t, n) => {
|
|
1054
|
-
let r = t.key ?? t.dataKey, i = ie > 0 ?
|
|
1054
|
+
let r = t.key ?? t.dataKey, i = ie > 0 ? _e(t.width, t) : 150, a = t.sortable === void 0 ? f : t.sortable, o = t.resizable === void 0 ? g : t.resizable, s;
|
|
1055
1055
|
if (typeof t.sortType == "function") {
|
|
1056
1056
|
let e = t.sortType, n = t.dataKey;
|
|
1057
1057
|
s = (r, i) => e(r.original, i.original, n, t);
|
|
@@ -1096,24 +1096,24 @@ function Pt(e, t) {
|
|
|
1096
1096
|
f,
|
|
1097
1097
|
g,
|
|
1098
1098
|
I,
|
|
1099
|
-
|
|
1099
|
+
_e,
|
|
1100
1100
|
V
|
|
1101
|
-
]),
|
|
1101
|
+
]), ye = l((e) => String(e[i]), [i]), be = l((e) => {
|
|
1102
1102
|
let t = e[a];
|
|
1103
1103
|
return Array.isArray(t) ? t : void 0;
|
|
1104
1104
|
}, [a]), xe = O({
|
|
1105
1105
|
data: r,
|
|
1106
|
-
columns:
|
|
1106
|
+
columns: ve,
|
|
1107
1107
|
state: {
|
|
1108
1108
|
sorting: oe,
|
|
1109
|
-
expanded:
|
|
1110
|
-
rowSelection:
|
|
1109
|
+
expanded: W,
|
|
1110
|
+
rowSelection: de
|
|
1111
1111
|
},
|
|
1112
|
-
getRowId:
|
|
1112
|
+
getRowId: ye,
|
|
1113
1113
|
getSubRows: y ? be : void 0,
|
|
1114
1114
|
onSortingChange: U,
|
|
1115
|
-
onExpandedChange:
|
|
1116
|
-
onRowSelectionChange:
|
|
1115
|
+
onExpandedChange: ue,
|
|
1116
|
+
onRowSelectionChange: fe,
|
|
1117
1117
|
getCoreRowModel: T(),
|
|
1118
1118
|
getSortedRowModel: D(),
|
|
1119
1119
|
getExpandedRowModel: y ? E() : void 0,
|
|
@@ -1137,7 +1137,7 @@ function Pt(e, t) {
|
|
|
1137
1137
|
se(n), B?.(Mt(n));
|
|
1138
1138
|
},
|
|
1139
1139
|
setSelectedRows: (e) => {
|
|
1140
|
-
|
|
1140
|
+
fe(Object.fromEntries(e.map((e) => [e, !0])));
|
|
1141
1141
|
},
|
|
1142
1142
|
getTableRef: () => ({
|
|
1143
1143
|
scrollToTop: (e) => {
|
|
@@ -1164,27 +1164,27 @@ function Pt(e, t) {
|
|
|
1164
1164
|
b,
|
|
1165
1165
|
B
|
|
1166
1166
|
]), d(() => {
|
|
1167
|
-
if (!
|
|
1167
|
+
if (!H) return;
|
|
1168
1168
|
let e = re.current;
|
|
1169
1169
|
if (!e) return;
|
|
1170
1170
|
let t = () => {
|
|
1171
|
-
e.scrollTop + e.clientHeight >= e.scrollHeight - 50 &&
|
|
1171
|
+
e.scrollTop + e.clientHeight >= e.scrollHeight - 50 && H();
|
|
1172
1172
|
};
|
|
1173
1173
|
return e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
|
|
1174
|
-
}, [
|
|
1174
|
+
}, [H]);
|
|
1175
1175
|
let Se = Array.isArray(s) ? s[0] : s, Ce = c ?? (o ? 32 : 48), we = xe.getRowModel().rows, Te = xe.getHeaderGroups(), Ee = r.length === 0, De = P ? Nt[P] ?? Nt[1] : void 0, Oe = l((e, t) => {
|
|
1176
|
-
!k || N || (
|
|
1176
|
+
!k || N || (me(e.id), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e.id));
|
|
1177
1177
|
}, [k, N]), ke = l((e, t) => {
|
|
1178
|
-
!k || N || (t.preventDefault(), t.dataTransfer.dropEffect = "move",
|
|
1178
|
+
!k || N || (t.preventDefault(), t.dataTransfer.dropEffect = "move", ge(e.id));
|
|
1179
1179
|
}, [k, N]), Ae = l((e, t) => {
|
|
1180
1180
|
if (!k || N) return;
|
|
1181
1181
|
t.preventDefault();
|
|
1182
|
-
let n = t.dataTransfer.getData("text/plain") ||
|
|
1183
|
-
if (
|
|
1182
|
+
let n = t.dataTransfer.getData("text/plain") || pe;
|
|
1183
|
+
if (me(null), ge(null), !n || n === e.id) return;
|
|
1184
1184
|
let r = we.findIndex((e) => e.id === n), i = we.findIndex((t) => t.id === e.id);
|
|
1185
1185
|
if (r < 0 || i < 0) return;
|
|
1186
1186
|
let a = we.map((e) => e.original), [o] = a.splice(r, 1);
|
|
1187
|
-
a.splice(i, 0, o),
|
|
1187
|
+
a.splice(i, 0, o), ee?.({
|
|
1188
1188
|
oldIndex: r,
|
|
1189
1189
|
newIndex: i,
|
|
1190
1190
|
rowData: o,
|
|
@@ -1193,11 +1193,11 @@ function Pt(e, t) {
|
|
|
1193
1193
|
}, [
|
|
1194
1194
|
k,
|
|
1195
1195
|
N,
|
|
1196
|
-
|
|
1196
|
+
pe,
|
|
1197
1197
|
we,
|
|
1198
|
-
|
|
1198
|
+
ee
|
|
1199
1199
|
]), je = l(() => {
|
|
1200
|
-
|
|
1200
|
+
me(null), ge(null);
|
|
1201
1201
|
}, []);
|
|
1202
1202
|
return /* @__PURE__ */ x("div", {
|
|
1203
1203
|
ref: ne,
|
|
@@ -1243,20 +1243,20 @@ function Pt(e, t) {
|
|
|
1243
1243
|
})
|
|
1244
1244
|
}, e.id)) }),
|
|
1245
1245
|
/* @__PURE__ */ x("tbody", { children: Ee ? /* @__PURE__ */ x("tr", { children: /* @__PURE__ */ x("td", {
|
|
1246
|
-
colSpan:
|
|
1246
|
+
colSpan: ve.length,
|
|
1247
1247
|
children: /* @__PURE__ */ x("div", {
|
|
1248
1248
|
className: "stratus-table__empty",
|
|
1249
1249
|
children: F
|
|
1250
1250
|
})
|
|
1251
1251
|
}) }) : we.map((e, t) => {
|
|
1252
|
-
let n = e.original, r =
|
|
1252
|
+
let n = e.original, r = ye(n), i = "";
|
|
1253
1253
|
typeof R == "function" ? i = R({
|
|
1254
1254
|
rowData: n,
|
|
1255
1255
|
rowIndex: t
|
|
1256
1256
|
}) : typeof R == "string" && (i = R);
|
|
1257
|
-
let a = M && t % 2 == 1, o = e.getIsSelected(), s = !!z, c = k &&
|
|
1257
|
+
let a = M && t % 2 == 1, o = e.getIsSelected(), s = !!z, c = k && he === e.id;
|
|
1258
1258
|
return /* @__PURE__ */ x("tr", {
|
|
1259
|
-
className: G(i || void 0, k && "stratus-table__row--draggable",
|
|
1259
|
+
className: G(i || void 0, k && "stratus-table__row--draggable", pe === e.id && "stratus-table__row--dragging", c && "stratus-table__row--drag-over"),
|
|
1260
1260
|
draggable: k && !N,
|
|
1261
1261
|
"data-clickable": s || void 0,
|
|
1262
1262
|
"data-selected": o || void 0,
|
|
@@ -1945,13 +1945,13 @@ function On({ header: e, headerId: t, hasStringHeader: n, closable: r, fullScree
|
|
|
1945
1945
|
//#endregion
|
|
1946
1946
|
//#region src/components/Drawer/Drawer.tsx
|
|
1947
1947
|
var kn = o(function(e, t) {
|
|
1948
|
-
let { open: n = !1, variant: r = "temporary", placement: i = "left", smallScreenSize: a = 425, header: o, closable: s = !1, fullScreen: c = !1, initialFullScreen: u = !1, keepMounted: p = !1, transitionDuration: m = 225, hideBackdrop: h = !1, disablePortal: g = !1, children: y, onClose: w, width: T = 240, ...E } = e, { cssProps: D, otherProps: O } = K(E), { className: k, style: A, ...j } = O, M = an(), N = r === "responsive" ? M < a ? "temporary" : "permanent" : r, P = N === "temporary", F = N === "persistent", I = N === "permanent", [L, R] = v(u), z = l(() => R((e) => !e), []), [B, V] = v(n), [
|
|
1948
|
+
let { open: n = !1, variant: r = "temporary", placement: i = "left", smallScreenSize: a = 425, header: o, closable: s = !1, fullScreen: c = !1, initialFullScreen: u = !1, keepMounted: p = !1, transitionDuration: m = 225, hideBackdrop: h = !1, disablePortal: g = !1, children: y, onClose: w, width: T = 240, ...E } = e, { cssProps: D, otherProps: O } = K(E), { className: k, style: A, ...j } = O, M = an(), N = r === "responsive" ? M < a ? "temporary" : "permanent" : r, P = N === "temporary", F = N === "persistent", I = N === "permanent", [L, R] = v(u), z = l(() => R((e) => !e), []), [B, V] = v(n), [ee, H] = v(!1);
|
|
1949
1949
|
d(() => {
|
|
1950
1950
|
if (n) V(!0), requestAnimationFrame(() => {
|
|
1951
|
-
requestAnimationFrame(() =>
|
|
1951
|
+
requestAnimationFrame(() => H(!0));
|
|
1952
1952
|
});
|
|
1953
1953
|
else {
|
|
1954
|
-
|
|
1954
|
+
H(!1);
|
|
1955
1955
|
let e = setTimeout(() => {
|
|
1956
1956
|
p || V(!1);
|
|
1957
1957
|
}, P || F ? m : 0);
|
|
@@ -2001,7 +2001,7 @@ var kn = o(function(e, t) {
|
|
|
2001
2001
|
"aria-modal": P && n ? !0 : void 0,
|
|
2002
2002
|
"aria-labelledby": P && re ? ne : void 0,
|
|
2003
2003
|
tabIndex: P ? -1 : void 0,
|
|
2004
|
-
className: G("stratus-drawer", `stratus-drawer--${N}`, `stratus-drawer--${i}`,
|
|
2004
|
+
className: G("stratus-drawer", `stratus-drawer--${N}`, `stratus-drawer--${i}`, ee && n || I ? "stratus-drawer--open" : "stratus-drawer--closed", L && "stratus-drawer--fullscreen", k),
|
|
2005
2005
|
style: se,
|
|
2006
2006
|
...j,
|
|
2007
2007
|
children: [U, y]
|
|
@@ -2011,7 +2011,7 @@ var kn = o(function(e, t) {
|
|
|
2011
2011
|
children: ce
|
|
2012
2012
|
});
|
|
2013
2013
|
let le = /* @__PURE__ */ S(b, { children: [!h && /* @__PURE__ */ x("div", {
|
|
2014
|
-
className: G("stratus-drawer-backdrop",
|
|
2014
|
+
className: G("stratus-drawer-backdrop", ee && n && "stratus-drawer-backdrop--open"),
|
|
2015
2015
|
style: { "--stratus-drawer-duration": `${m}ms` },
|
|
2016
2016
|
onClick: (e) => w?.(e),
|
|
2017
2017
|
"aria-hidden": !0
|
|
@@ -2247,7 +2247,7 @@ var Hn = o(function(e, t) {
|
|
|
2247
2247
|
e.target === e.currentTarget && (h?.onClick?.(e), D && g?.(e));
|
|
2248
2248
|
};
|
|
2249
2249
|
if (!(P || u)) return null;
|
|
2250
|
-
let
|
|
2250
|
+
let ee = a != null || r, H = o != null || typeof y == "function" || typeof w == "function", te = {
|
|
2251
2251
|
...M,
|
|
2252
2252
|
...k
|
|
2253
2253
|
}, ne = /* @__PURE__ */ x("div", {
|
|
@@ -2269,7 +2269,7 @@ var Hn = o(function(e, t) {
|
|
|
2269
2269
|
children: /* @__PURE__ */ S("div", {
|
|
2270
2270
|
className: "stratus-modal__container",
|
|
2271
2271
|
children: [
|
|
2272
|
-
|
|
2272
|
+
ee && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("div", {
|
|
2273
2273
|
className: "stratus-modal__header",
|
|
2274
2274
|
children: [a != null && /* @__PURE__ */ x("span", {
|
|
2275
2275
|
id: B ? z : void 0,
|
|
@@ -2290,7 +2290,7 @@ var Hn = o(function(e, t) {
|
|
|
2290
2290
|
children: T
|
|
2291
2291
|
})
|
|
2292
2292
|
}),
|
|
2293
|
-
|
|
2293
|
+
H && /* @__PURE__ */ x(Bn, {
|
|
2294
2294
|
footer: o,
|
|
2295
2295
|
okText: s,
|
|
2296
2296
|
cancelText: c,
|
|
@@ -2450,8 +2450,8 @@ function Jn({ label: e, meta: t, htmlFor: n }) {
|
|
|
2450
2450
|
//#endregion
|
|
2451
2451
|
//#region src/components/Input/Input.tsx
|
|
2452
2452
|
var Yn = o(function(e, t) {
|
|
2453
|
-
let { children: n, className: r, style: i, inputRef: a, inputProps: o = {}, type: s = "text", variant: c = "default", label: u, meta: d, helperText: p, helperIcon: m, value: h, defaultValue: g, placeholder: y, startAdornment: b, endAdornment: C, outlineWidth: w, multiple: T = !1, compact: E = !1, fullWidth: D = !1, forceFocus: O = !1, disabled: k = !1, onChange: A, onFocus: j, onBlur: M, ...N } = e, { cssProps: P, otherProps: F } = K(N), I = f(), L = o.id ?? I, [R, z] = v(g ?? ""), B = h !== void 0, V = B ? h : R,
|
|
2454
|
-
|
|
2453
|
+
let { children: n, className: r, style: i, inputRef: a, inputProps: o = {}, type: s = "text", variant: c = "default", label: u, meta: d, helperText: p, helperIcon: m, value: h, defaultValue: g, placeholder: y, startAdornment: b, endAdornment: C, outlineWidth: w, multiple: T = !1, compact: E = !1, fullWidth: D = !1, forceFocus: O = !1, disabled: k = !1, onChange: A, onFocus: j, onBlur: M, ...N } = e, { cssProps: P, otherProps: F } = K(N), I = f(), L = o.id ?? I, [R, z] = v(g ?? ""), B = h !== void 0, V = B ? h : R, ee = _(null), H = l((e) => {
|
|
2454
|
+
ee.current = e, a && (a.current = e);
|
|
2455
2455
|
}, [a]), te = (e) => {
|
|
2456
2456
|
let t = e.target.value;
|
|
2457
2457
|
B || z(t), A?.(t, e);
|
|
@@ -2484,7 +2484,7 @@ var Yn = o(function(e, t) {
|
|
|
2484
2484
|
}),
|
|
2485
2485
|
n ?? /* @__PURE__ */ x(oe, {
|
|
2486
2486
|
...o,
|
|
2487
|
-
ref:
|
|
2487
|
+
ref: H,
|
|
2488
2488
|
id: L,
|
|
2489
2489
|
type: T ? void 0 : s,
|
|
2490
2490
|
className: G("stratus-input__input", T && "stratus-input__input--textarea", o.className),
|
|
@@ -2684,12 +2684,12 @@ function tr() {
|
|
|
2684
2684
|
}
|
|
2685
2685
|
//#endregion
|
|
2686
2686
|
//#region src/components/Select/SelectClearButton.tsx
|
|
2687
|
-
function nr({ onClear: e }) {
|
|
2687
|
+
function nr({ onClear: e, label: t = "Clear" }) {
|
|
2688
2688
|
return /* @__PURE__ */ x("button", {
|
|
2689
2689
|
type: "button",
|
|
2690
2690
|
className: "stratus-select__clear",
|
|
2691
2691
|
onClick: e,
|
|
2692
|
-
"aria-label":
|
|
2692
|
+
"aria-label": t,
|
|
2693
2693
|
children: "✕"
|
|
2694
2694
|
});
|
|
2695
2695
|
}
|
|
@@ -2788,56 +2788,56 @@ function lr({ tags: e, infield: t, selectedIds: n, allFlat: r, tagMaxCount: i, t
|
|
|
2788
2788
|
//#endregion
|
|
2789
2789
|
//#region src/components/Select/Select.tsx
|
|
2790
2790
|
var ur = o(function(e, t) {
|
|
2791
|
-
let { children: n, className: r, style: i, selectRef: a, inputRef: o, options: s = [], value: c, defaultValue: u, inputValue: m, variant: g = "default", label: y, meta: b, placeholder: C, helperText: w, helperIcon: T, startAdornment: E, endAdornment: D, allowClear: O = !0,
|
|
2792
|
-
|
|
2791
|
+
let { children: n, className: r, style: i, selectRef: a, inputRef: o, options: s = [], value: c, defaultValue: u, inputValue: m, variant: g = "default", label: y, meta: b, placeholder: C, helperText: w, helperIcon: T, startAdornment: E, endAdornment: D, allowClear: O = !0, clearLabel: k, multiple: A = !1, expandable: j = !1, infield: M = !0, tags: N = !1, tagMaxCount: P, tagMaxCountPlaceholder: F, selectedLabel: I = "Selected", filterOption: L = !0, noOptionsText: R = "No Data", hideDropdownWhenEmpty: z = !1, persistInputText: B = !1, compact: V = !1, fullWidth: ee = !1, disabled: H = !1, onSelect: te, onDeselect: ne, onClear: re, onChange: ie, itemGroupRenderer: ae, itemRenderer: oe, ...se } = e, { cssProps: U, otherProps: ce } = K(se), le = f(), [W, ue] = v(!1), [de, fe] = v(() => ar(u)), [pe, me] = v(""), [he, ge] = v(-1), [_e, ve] = v(/* @__PURE__ */ new Set()), ye = c !== void 0, be = ye ? ar(c) : de, xe = m === void 0 ? pe : m, Se = _(null), Ce = _(null), we = _(null), Te = l((e) => {
|
|
2792
|
+
Se.current = e, o && (o.current = e);
|
|
2793
2793
|
}, [o]);
|
|
2794
2794
|
p(a, () => ({
|
|
2795
2795
|
open: () => {
|
|
2796
|
-
ue(!0),
|
|
2796
|
+
ue(!0), Se.current?.focus();
|
|
2797
2797
|
},
|
|
2798
2798
|
close: () => ue(!1)
|
|
2799
2799
|
}), []), d(() => {
|
|
2800
|
-
if (!
|
|
2800
|
+
if (!W) return;
|
|
2801
2801
|
let e = (e) => {
|
|
2802
|
-
|
|
2802
|
+
Ce.current && !Ce.current.contains(e.target) && (ue(!1), me(""));
|
|
2803
2803
|
};
|
|
2804
2804
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
2805
|
-
}, [
|
|
2806
|
-
let
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
]),
|
|
2805
|
+
}, [W]);
|
|
2806
|
+
let Ee = h(() => cr(n), [n]), De = h(() => s.length > 0 ? s : Ee, [s, Ee]), Oe = h(() => or(De), [De]), ke = l((e) => !L || !xe ? !0 : typeof L == "function" ? L(e, xe, be.map(String)) : e.label.toLowerCase().includes(xe.toLowerCase()), [
|
|
2807
|
+
L,
|
|
2808
|
+
xe,
|
|
2809
|
+
be
|
|
2810
|
+
]), Ae = h(() => Oe.filter((e) => !e.disabled && ke(e)), [Oe, ke]);
|
|
2811
2811
|
d(() => {
|
|
2812
2812
|
ge(-1);
|
|
2813
|
-
}, [
|
|
2814
|
-
if (he < 0 || !
|
|
2815
|
-
let e =
|
|
2813
|
+
}, [W, Ae.length]), d(() => {
|
|
2814
|
+
if (he < 0 || !we.current) return;
|
|
2815
|
+
let e = Ae[he];
|
|
2816
2816
|
if (!e) return;
|
|
2817
2817
|
let t = String(e.value ?? e.label);
|
|
2818
|
-
|
|
2819
|
-
}, [he,
|
|
2820
|
-
let
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
]),
|
|
2825
|
-
let n = sr(e), r =
|
|
2826
|
-
if (
|
|
2827
|
-
i =
|
|
2818
|
+
we.current.querySelector(`[data-option-id="${CSS.escape(t)}"]`)?.scrollIntoView({ block: "nearest" });
|
|
2819
|
+
}, [he, Ae]);
|
|
2820
|
+
let je = h(() => A || be.length === 0 ? "" : Oe.find((e) => String(e.value ?? e.label) === String(be[0]))?.label ?? String(be[0]), [
|
|
2821
|
+
A,
|
|
2822
|
+
be,
|
|
2823
|
+
Oe
|
|
2824
|
+
]), Me = l((e, t) => {
|
|
2825
|
+
let n = sr(e), r = be.map(String).includes(String(n)), i;
|
|
2826
|
+
if (A) if (r) {
|
|
2827
|
+
i = be.filter((e) => String(e) !== String(n)), ye || fe(i);
|
|
2828
2828
|
let r = {
|
|
2829
2829
|
selectedValue: i,
|
|
2830
2830
|
deselectedValue: e.value ?? e.label,
|
|
2831
|
-
options:
|
|
2831
|
+
options: Oe.filter((e) => i.map(String).includes(String(sr(e))))
|
|
2832
2832
|
};
|
|
2833
|
-
|
|
2833
|
+
ne?.(r, t);
|
|
2834
2834
|
} else {
|
|
2835
|
-
i = [...
|
|
2835
|
+
i = [...be, e.value ?? e.label], ye || fe(i);
|
|
2836
2836
|
let n = {
|
|
2837
2837
|
selectedValue: i,
|
|
2838
|
-
options:
|
|
2838
|
+
options: Oe.filter((e) => i.map(String).includes(String(sr(e))))
|
|
2839
2839
|
};
|
|
2840
|
-
|
|
2840
|
+
te?.(n, t);
|
|
2841
2841
|
}
|
|
2842
2842
|
else {
|
|
2843
2843
|
i = [e.value ?? e.label], ye || fe(i), ue(!1), me("");
|
|
@@ -2845,70 +2845,70 @@ var ur = o(function(e, t) {
|
|
|
2845
2845
|
selectedValue: e.value ?? e.label,
|
|
2846
2846
|
options: [e]
|
|
2847
2847
|
};
|
|
2848
|
-
|
|
2848
|
+
te?.(n, t);
|
|
2849
2849
|
}
|
|
2850
2850
|
}, [
|
|
2851
|
-
|
|
2852
|
-
|
|
2851
|
+
be,
|
|
2852
|
+
A,
|
|
2853
2853
|
ye,
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
]),
|
|
2854
|
+
Oe,
|
|
2855
|
+
te,
|
|
2856
|
+
ne
|
|
2857
|
+
]), Ne = l((e) => {
|
|
2858
2858
|
if (!H) switch (e.key) {
|
|
2859
2859
|
case "ArrowDown":
|
|
2860
|
-
e.preventDefault(),
|
|
2860
|
+
e.preventDefault(), W ? ge((e) => e < Ae.length - 1 ? e + 1 : 0) : ue(!0);
|
|
2861
2861
|
break;
|
|
2862
2862
|
case "ArrowUp":
|
|
2863
|
-
e.preventDefault(),
|
|
2863
|
+
e.preventDefault(), W && ge((e) => e > 0 ? e - 1 : Ae.length - 1);
|
|
2864
2864
|
break;
|
|
2865
2865
|
case "Enter":
|
|
2866
|
-
if (e.preventDefault(),
|
|
2867
|
-
let t =
|
|
2868
|
-
t &&
|
|
2869
|
-
} else
|
|
2866
|
+
if (e.preventDefault(), W && he >= 0) {
|
|
2867
|
+
let t = Ae[he];
|
|
2868
|
+
t && Me(t, e);
|
|
2869
|
+
} else W || ue(!0);
|
|
2870
2870
|
break;
|
|
2871
2871
|
case "Escape":
|
|
2872
|
-
|
|
2872
|
+
W && (e.preventDefault(), ue(!1));
|
|
2873
2873
|
break;
|
|
2874
2874
|
}
|
|
2875
2875
|
}, [
|
|
2876
2876
|
H,
|
|
2877
|
-
|
|
2877
|
+
W,
|
|
2878
2878
|
he,
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
]),
|
|
2882
|
-
e.stopPropagation(), ye || fe([]), me(""),
|
|
2883
|
-
}, [ye,
|
|
2879
|
+
Ae,
|
|
2880
|
+
Me
|
|
2881
|
+
]), Pe = l((e) => {
|
|
2882
|
+
e.stopPropagation(), ye || fe([]), me(""), re?.(e);
|
|
2883
|
+
}, [ye, re]), Fe = l((e, t) => {
|
|
2884
2884
|
t.stopPropagation();
|
|
2885
|
-
let n =
|
|
2886
|
-
n &&
|
|
2887
|
-
}, [
|
|
2885
|
+
let n = Oe.find((t) => String(sr(t)) === String(e));
|
|
2886
|
+
n && Me(n, t);
|
|
2887
|
+
}, [Oe, Me]), Ie = l((e) => {
|
|
2888
2888
|
ve((t) => {
|
|
2889
2889
|
let n = new Set(t);
|
|
2890
2890
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
2891
2891
|
});
|
|
2892
|
-
}, []),
|
|
2893
|
-
if (!
|
|
2892
|
+
}, []), Le = l((e) => {
|
|
2893
|
+
if (!L) return;
|
|
2894
2894
|
let t = e.target.value;
|
|
2895
|
-
me(t),
|
|
2895
|
+
me(t), ie?.(t), W || ue(!0);
|
|
2896
2896
|
}, [
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2897
|
+
L,
|
|
2898
|
+
W,
|
|
2899
|
+
ie
|
|
2900
2900
|
]);
|
|
2901
|
-
function
|
|
2901
|
+
function Re(e) {
|
|
2902
2902
|
let t = [];
|
|
2903
2903
|
for (let n of e) {
|
|
2904
2904
|
if (n.type === "optgroup" && n.options) {
|
|
2905
|
-
let e =
|
|
2905
|
+
let e = Re(n.options).filter(Boolean);
|
|
2906
2906
|
if (e.length === 0) continue;
|
|
2907
|
-
let r =
|
|
2908
|
-
|
|
2909
|
-
className: G("stratus-select__optgroup-label",
|
|
2910
|
-
onClick:
|
|
2911
|
-
children: [
|
|
2907
|
+
let r = j && _e.has(n.label);
|
|
2908
|
+
ae ? t.push(ae(n, r ? [] : e, xe)) : t.push(/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
|
|
2909
|
+
className: G("stratus-select__optgroup-label", j && "stratus-select__optgroup--expandable"),
|
|
2910
|
+
onClick: j ? () => Ie(n.label) : void 0,
|
|
2911
|
+
children: [j && /* @__PURE__ */ x("span", {
|
|
2912
2912
|
className: G("stratus-select__optgroup-chevron", r && "stratus-select__optgroup-chevron--collapsed"),
|
|
2913
2913
|
children: /* @__PURE__ */ x("svg", {
|
|
2914
2914
|
width: "10",
|
|
@@ -2922,18 +2922,18 @@ var ur = o(function(e, t) {
|
|
|
2922
2922
|
}), !r && e] }, `group-${n.label}`));
|
|
2923
2923
|
continue;
|
|
2924
2924
|
}
|
|
2925
|
-
if (!
|
|
2926
|
-
let e = sr(n), r =
|
|
2927
|
-
|
|
2925
|
+
if (!ke(n)) continue;
|
|
2926
|
+
let e = sr(n), r = be.map(String).includes(String(e)), i = Ae[he] === n;
|
|
2927
|
+
oe ? t.push(/* @__PURE__ */ x("div", {
|
|
2928
2928
|
"data-option-id": e,
|
|
2929
2929
|
className: G(i && "stratus-select__option--highlighted"),
|
|
2930
|
-
onClick: n.disabled ? void 0 : (e) =>
|
|
2931
|
-
children:
|
|
2930
|
+
onClick: n.disabled ? void 0 : (e) => Me(n, e),
|
|
2931
|
+
children: oe(n, xe, be.map(String))
|
|
2932
2932
|
}, e)) : t.push(/* @__PURE__ */ S("div", {
|
|
2933
2933
|
"data-option-id": e,
|
|
2934
2934
|
className: G("stratus-select__option", r && "stratus-select__option--selected", i && "stratus-select__option--highlighted", n.disabled && "stratus-select__option--disabled"),
|
|
2935
|
-
onClick: n.disabled ? void 0 : (e) =>
|
|
2936
|
-
children: [
|
|
2935
|
+
onClick: n.disabled ? void 0 : (e) => Me(n, e),
|
|
2936
|
+
children: [A && /* @__PURE__ */ x("span", {
|
|
2937
2937
|
className: G("stratus-select__checkbox", r && "stratus-select__checkbox--checked", n.disabled && "stratus-select__checkbox--disabled"),
|
|
2938
2938
|
"aria-hidden": "true",
|
|
2939
2939
|
children: r && /* @__PURE__ */ x("svg", {
|
|
@@ -2954,79 +2954,82 @@ var ur = o(function(e, t) {
|
|
|
2954
2954
|
}
|
|
2955
2955
|
return t;
|
|
2956
2956
|
}
|
|
2957
|
-
let
|
|
2957
|
+
let ze = Re(De), Be = ze.length > 0, Ve = G("stratus-select", `stratus-select--${g}`, V && "stratus-select--compact", ee && "stratus-select--full-width", H && "stratus-select--disabled", W && "stratus-select--open", L && "stratus-select--filterable", r), He = {
|
|
2958
2958
|
...i,
|
|
2959
|
-
...
|
|
2960
|
-
},
|
|
2959
|
+
...U
|
|
2960
|
+
}, Ue = be.length > 0 || xe && xe.length > 0;
|
|
2961
2961
|
return /* @__PURE__ */ S("div", {
|
|
2962
2962
|
ref: (e) => {
|
|
2963
|
-
|
|
2963
|
+
Ce.current = e, typeof t == "function" ? t(e) : t && (t.current = e);
|
|
2964
2964
|
},
|
|
2965
|
-
className:
|
|
2966
|
-
style: Object.keys(
|
|
2967
|
-
...
|
|
2965
|
+
className: Ve,
|
|
2966
|
+
style: Object.keys(He).length ? He : void 0,
|
|
2967
|
+
...ce,
|
|
2968
2968
|
children: [
|
|
2969
2969
|
/* @__PURE__ */ x(ir, {
|
|
2970
2970
|
label: y,
|
|
2971
2971
|
meta: b,
|
|
2972
|
-
htmlFor:
|
|
2972
|
+
htmlFor: le
|
|
2973
2973
|
}),
|
|
2974
2974
|
/* @__PURE__ */ S("div", {
|
|
2975
2975
|
className: "stratus-select__input-wrapper",
|
|
2976
2976
|
onClick: () => {
|
|
2977
|
-
H || (ue((e) => !e),
|
|
2977
|
+
H || (ue((e) => !e), Se.current?.focus());
|
|
2978
2978
|
},
|
|
2979
|
-
onKeyDown:
|
|
2979
|
+
onKeyDown: Ne,
|
|
2980
2980
|
children: [
|
|
2981
2981
|
E && /* @__PURE__ */ x("span", {
|
|
2982
2982
|
className: "stratus-input__start-adornment",
|
|
2983
2983
|
children: E
|
|
2984
2984
|
}),
|
|
2985
|
-
|
|
2986
|
-
tags:
|
|
2987
|
-
infield:
|
|
2988
|
-
selectedIds:
|
|
2989
|
-
allFlat:
|
|
2990
|
-
tagMaxCount:
|
|
2991
|
-
tagMaxCountPlaceholder:
|
|
2992
|
-
selectedLabel:
|
|
2993
|
-
onTagRemove:
|
|
2985
|
+
A && N && M && be.length > 0 ? /* @__PURE__ */ x(lr, {
|
|
2986
|
+
tags: N,
|
|
2987
|
+
infield: M,
|
|
2988
|
+
selectedIds: be,
|
|
2989
|
+
allFlat: Oe,
|
|
2990
|
+
tagMaxCount: P,
|
|
2991
|
+
tagMaxCountPlaceholder: F,
|
|
2992
|
+
selectedLabel: I,
|
|
2993
|
+
onTagRemove: Fe
|
|
2994
2994
|
}) : null,
|
|
2995
|
-
|
|
2996
|
-
tags:
|
|
2997
|
-
infield:
|
|
2998
|
-
selectedIds:
|
|
2999
|
-
allFlat:
|
|
3000
|
-
tagMaxCount:
|
|
3001
|
-
tagMaxCountPlaceholder:
|
|
3002
|
-
selectedLabel:
|
|
3003
|
-
onTagRemove:
|
|
2995
|
+
A && !N && M ? /* @__PURE__ */ x(lr, {
|
|
2996
|
+
tags: N,
|
|
2997
|
+
infield: M,
|
|
2998
|
+
selectedIds: be,
|
|
2999
|
+
allFlat: Oe,
|
|
3000
|
+
tagMaxCount: P,
|
|
3001
|
+
tagMaxCountPlaceholder: F,
|
|
3002
|
+
selectedLabel: I,
|
|
3003
|
+
onTagRemove: Fe
|
|
3004
3004
|
}) : null,
|
|
3005
|
-
!(
|
|
3006
|
-
ref:
|
|
3007
|
-
id:
|
|
3005
|
+
!(A && N && M && be.length > 0) && !(A && !N && M) && /* @__PURE__ */ x("input", {
|
|
3006
|
+
ref: Te,
|
|
3007
|
+
id: le,
|
|
3008
3008
|
type: "text",
|
|
3009
3009
|
className: "stratus-select__input",
|
|
3010
|
-
value:
|
|
3011
|
-
placeholder:
|
|
3010
|
+
value: L && xe !== "" && (W || B) ? xe : je,
|
|
3011
|
+
placeholder: be.length > 0 ? void 0 : C,
|
|
3012
3012
|
disabled: H,
|
|
3013
|
-
onChange:
|
|
3013
|
+
onChange: Le,
|
|
3014
3014
|
autoComplete: "off"
|
|
3015
3015
|
}),
|
|
3016
3016
|
D && /* @__PURE__ */ x("span", {
|
|
3017
3017
|
className: "stratus-input__end-adornment",
|
|
3018
3018
|
children: D
|
|
3019
3019
|
}),
|
|
3020
|
-
O &&
|
|
3020
|
+
O && Ue && !H && /* @__PURE__ */ x(nr, {
|
|
3021
|
+
onClear: Pe,
|
|
3022
|
+
label: k
|
|
3023
|
+
}),
|
|
3021
3024
|
/* @__PURE__ */ x(tr, {})
|
|
3022
3025
|
]
|
|
3023
3026
|
}),
|
|
3024
|
-
|
|
3025
|
-
ref:
|
|
3027
|
+
W && !(z && !Be) && /* @__PURE__ */ x("div", {
|
|
3028
|
+
ref: we,
|
|
3026
3029
|
className: "stratus-select__dropdown",
|
|
3027
|
-
children:
|
|
3030
|
+
children: Be ? ze : /* @__PURE__ */ x("div", {
|
|
3028
3031
|
className: "stratus-select__no-data",
|
|
3029
|
-
children:
|
|
3032
|
+
children: R
|
|
3030
3033
|
})
|
|
3031
3034
|
}),
|
|
3032
3035
|
/* @__PURE__ */ x(rr, {
|
|
@@ -15008,7 +15011,7 @@ z.create({
|
|
|
15008
15011
|
},
|
|
15009
15012
|
addProseMirrorPlugins() {
|
|
15010
15013
|
let { editor: e, options: t } = this;
|
|
15011
|
-
return e.options.injectCSS && typeof document < "u" &&
|
|
15014
|
+
return e.options.injectCSS && typeof document < "u" && ee(d_, e.options.injectNonce, "selection"), [new va({
|
|
15012
15015
|
key: new xa("selection"),
|
|
15013
15016
|
props: { decorations(n) {
|
|
15014
15017
|
return n.selection.empty || e.isFocused || !e.isEditable || re(n.selection) || e.view.dragging ? null : Wu.create(n.doc, [Vu.inline(n.selection.from, n.selection.to, { class: t.className })]);
|
|
@@ -15101,7 +15104,7 @@ function h_() {
|
|
|
15101
15104
|
//#endregion
|
|
15102
15105
|
//#region src/components/TipTapEditor/TipTapEditorExtensions.ts
|
|
15103
15106
|
function g_(e) {
|
|
15104
|
-
let { char: t, allowSpaces: n, allowedPrefixes: r, startOfLine: i, $position: a } = e, o =
|
|
15107
|
+
let { char: t, allowSpaces: n, allowedPrefixes: r, startOfLine: i, $position: a } = e, o = H(t), s = RegExp(`\\s${o}$`), c = i ? "^" : "", l = RegExp(n ? `${c}${o}(?!.*\\s{2}).*?(?=\\s${o}|$)` : `${c}(?:^)?${o}[^\\s${o}]*`, "gm"), u = a.nodeBefore?.isText && a.nodeBefore.text;
|
|
15105
15108
|
if (!u) return null;
|
|
15106
15109
|
let d = a.pos - u.length, f = Array.from(u.matchAll(l)).pop();
|
|
15107
15110
|
if (!f || f.input === void 0 || f.index === void 0) return null;
|
|
@@ -16021,7 +16024,7 @@ function bv({ renderToolbar: e = () => /* @__PURE__ */ x(yv, {}), height: t, wid
|
|
|
16021
16024
|
...b,
|
|
16022
16025
|
...n == null ? {} : { width: typeof n == "number" ? `${n}px` : n },
|
|
16023
16026
|
...g == null ? {} : { overflowY: g }
|
|
16024
|
-
},
|
|
16027
|
+
}, ee = t != null && i ? typeof t == "number" ? `${t}px` : t : void 0;
|
|
16025
16028
|
return /* @__PURE__ */ x(m_, {
|
|
16026
16029
|
editor: B,
|
|
16027
16030
|
children: /* @__PURE__ */ S("div", {
|
|
@@ -16035,7 +16038,7 @@ function bv({ renderToolbar: e = () => /* @__PURE__ */ x(yv, {}), height: t, wid
|
|
|
16035
16038
|
spellCheck: c,
|
|
16036
16039
|
editor: B
|
|
16037
16040
|
}),
|
|
16038
|
-
|
|
16041
|
+
ee && /* @__PURE__ */ x("style", { children: `.stratus-tiptap-editor .ProseMirror { height: ${ee}; min-height: ${ee}; overflow-y: auto; }` })
|
|
16039
16042
|
]
|
|
16040
16043
|
})
|
|
16041
16044
|
});
|
|
@@ -16170,19 +16173,19 @@ var Pv = 0, Fv = o(function(e, t) {
|
|
|
16170
16173
|
d(() => {
|
|
16171
16174
|
n && k(kv(n, r));
|
|
16172
16175
|
}, [n, r]);
|
|
16173
|
-
let V = l((e) => D.current ? Av(D.current, e, i, s) : 0, [i, s]),
|
|
16176
|
+
let V = l((e) => D.current ? Av(D.current, e, i, s) : 0, [i, s]), ee = l(() => {
|
|
16174
16177
|
if (!D.current) return [0, 0];
|
|
16175
16178
|
if (O.length === 1) return [0, V(O[0].value) + 6];
|
|
16176
16179
|
let e = O.map((e) => e.value), t = Math.min(...e), n = Math.max(...e), r = V(t);
|
|
16177
16180
|
return [r, V(n) - r + 6];
|
|
16178
|
-
}, [O, V]),
|
|
16181
|
+
}, [O, V]), H = l((e) => {
|
|
16179
16182
|
if (!o || p) return !1;
|
|
16180
|
-
let [t, n] =
|
|
16183
|
+
let [t, n] = ee(), r = V(e);
|
|
16181
16184
|
return t <= r && t + n >= r;
|
|
16182
16185
|
}, [
|
|
16183
16186
|
o,
|
|
16184
16187
|
p,
|
|
16185
|
-
|
|
16188
|
+
ee,
|
|
16186
16189
|
V
|
|
16187
16190
|
]), te = l((e) => {
|
|
16188
16191
|
if (!D.current) return 0;
|
|
@@ -16274,7 +16277,7 @@ var Pv = 0, Fv = o(function(e, t) {
|
|
|
16274
16277
|
...i[r],
|
|
16275
16278
|
value: e
|
|
16276
16279
|
}, k(i), m?.(i.map((e) => e.value).sort((e, t) => e - t), t.nativeEvent), F?.({ index: e }, t.nativeEvent);
|
|
16277
|
-
}, [U, ce] =
|
|
16280
|
+
}, [U, ce] = ee();
|
|
16278
16281
|
return /* @__PURE__ */ S("div", {
|
|
16279
16282
|
ref: t,
|
|
16280
16283
|
className: G("stratus-slider", w),
|
|
@@ -16323,7 +16326,7 @@ var Pv = 0, Fv = o(function(e, t) {
|
|
|
16323
16326
|
onMouseOut: () => !p && A && !N && j(!1),
|
|
16324
16327
|
"aria-disabled": p,
|
|
16325
16328
|
children: o && Object.keys(o).map((e, t) => /* @__PURE__ */ x("span", {
|
|
16326
|
-
className: G("stratus-slider__rail-mark", s && "is-vertical", (A || M || N) && "is-hovering",
|
|
16329
|
+
className: G("stratus-slider__rail-mark", s && "is-vertical", (A || M || N) && "is-hovering", H(+e) && "is-active"),
|
|
16327
16330
|
style: s ? { marginTop: V(+e) } : { marginLeft: V(+e) },
|
|
16328
16331
|
tabIndex: p ? void 0 : 0,
|
|
16329
16332
|
"aria-disabled": p,
|
|
@@ -16444,10 +16447,10 @@ function Kv(e, t) {
|
|
|
16444
16447
|
function qv(e, t) {
|
|
16445
16448
|
switch (e) {
|
|
16446
16449
|
case "date":
|
|
16447
|
-
case "week": return
|
|
16450
|
+
case "week": return W(t, 1);
|
|
16448
16451
|
case "month":
|
|
16449
|
-
case "quarter": return
|
|
16450
|
-
case "year": return Ve(
|
|
16452
|
+
case "quarter": return de(t, 1);
|
|
16453
|
+
case "year": return Ve(de(ye(t), 1));
|
|
16451
16454
|
default: return t;
|
|
16452
16455
|
}
|
|
16453
16456
|
}
|
|
@@ -16455,10 +16458,10 @@ function Jv(e, t, n) {
|
|
|
16455
16458
|
let r = ((t, n) => {
|
|
16456
16459
|
switch (e) {
|
|
16457
16460
|
case "date":
|
|
16458
|
-
case "week": return
|
|
16461
|
+
case "week": return W(t, n);
|
|
16459
16462
|
case "month":
|
|
16460
|
-
case "quarter": return
|
|
16461
|
-
case "year": return Ve(
|
|
16463
|
+
case "quarter": return de(t, n);
|
|
16464
|
+
case "year": return Ve(de(ye(t), n * 10));
|
|
16462
16465
|
default: return t;
|
|
16463
16466
|
}
|
|
16464
16467
|
})(t, n);
|
|
@@ -16468,7 +16471,7 @@ function Jv(e, t, n) {
|
|
|
16468
16471
|
case "month":
|
|
16469
16472
|
case "quarter": return `${r.getFullYear()}`;
|
|
16470
16473
|
case "year": {
|
|
16471
|
-
let e = Ve(r), t =
|
|
16474
|
+
let e = Ve(r), t = ye(r);
|
|
16472
16475
|
return `${e.getFullYear()}-${t.getFullYear()}`;
|
|
16473
16476
|
}
|
|
16474
16477
|
default: return "";
|
|
@@ -16488,26 +16491,26 @@ function Xv({ display: e, rowProps: t = () => ({}), rowClassNames: r = () => "",
|
|
|
16488
16491
|
let { uid: o, type: s, showWeekNumber: c, actualDate: l, selectedDate: d, updateSelectedDate: f, isDisabledDate: p } = u(zv), m = s === "date" || s === "week", g = s === "week" || s === "date" && c, _ = h(() => {
|
|
16489
16492
|
switch (s) {
|
|
16490
16493
|
case "month": {
|
|
16491
|
-
let t =
|
|
16494
|
+
let t = de(l, e).getFullYear();
|
|
16492
16495
|
return Gv(Uv().map((e, n) => /* @__PURE__ */ new Date(`${t}-${n + 1}`)), 3);
|
|
16493
16496
|
}
|
|
16494
16497
|
case "quarter": {
|
|
16495
|
-
let t =
|
|
16496
|
-
return Gv(
|
|
16498
|
+
let t = de(l, e).getFullYear();
|
|
16499
|
+
return Gv(he({
|
|
16497
16500
|
start: /* @__PURE__ */ new Date(`${t}`),
|
|
16498
16501
|
end: /* @__PURE__ */ new Date(`${t}-12-31`)
|
|
16499
16502
|
}), 4);
|
|
16500
16503
|
}
|
|
16501
16504
|
case "year": {
|
|
16502
|
-
let t = Ve(
|
|
16503
|
-
return Gv(
|
|
16504
|
-
start:
|
|
16505
|
-
end: Ve(
|
|
16505
|
+
let t = Ve(de(ye(l), e * 10)), n = Ve(t), r = ye(t);
|
|
16506
|
+
return Gv(_e({
|
|
16507
|
+
start: ye(qe(n, 1)),
|
|
16508
|
+
end: Ve(de(r, 1))
|
|
16506
16509
|
}), 3);
|
|
16507
16510
|
}
|
|
16508
16511
|
default: {
|
|
16509
|
-
let t =
|
|
16510
|
-
return
|
|
16512
|
+
let t = W(l, e);
|
|
16513
|
+
return ge({
|
|
16511
16514
|
start: He(t),
|
|
16512
16515
|
end: be(t)
|
|
16513
16516
|
}, { weekStartsOn: 1 }).map((e) => {
|
|
@@ -16537,9 +16540,9 @@ function Xv({ display: e, rowProps: t = () => ({}), rowClassNames: r = () => "",
|
|
|
16537
16540
|
case "date": return je(e, d);
|
|
16538
16541
|
default: return !1;
|
|
16539
16542
|
}
|
|
16540
|
-
}, b = (e) => s === "week" && d ? Pe(e, d, { weekStartsOn: 1 }) : !1, C = (t) => s !== "date" && s !== "week" ? !1 : !Me(t,
|
|
16543
|
+
}, b = (e) => s === "week" && d ? Pe(e, d, { weekStartsOn: 1 }) : !1, C = (t) => s !== "date" && s !== "week" ? !1 : !Me(t, W(l, e)), w = (t) => {
|
|
16541
16544
|
if (s !== "year") return !1;
|
|
16542
|
-
let n = Ve(
|
|
16545
|
+
let n = Ve(de(ye(l), e * 10));
|
|
16543
16546
|
return Te(t) !== Te(n);
|
|
16544
16547
|
}, T = (e) => () => {
|
|
16545
16548
|
s === "week" && f(e);
|
|
@@ -16620,9 +16623,9 @@ function $v({ display: e }) {
|
|
|
16620
16623
|
//#region src/components/DatePicker/CalendarTime.tsx
|
|
16621
16624
|
function ey() {
|
|
16622
16625
|
let { uid: e, selectedDate: t, updateSelectedDate: n } = u(zv), r = Vv(t), i = r.getHours(), a = r.getMinutes(), o = (e) => {
|
|
16623
|
-
n(
|
|
16626
|
+
n(ue(Be(r), e * 3600 + a * 60));
|
|
16624
16627
|
}, s = (e) => {
|
|
16625
|
-
n(
|
|
16628
|
+
n(ue(Be(r), i * 3600 + e * 60));
|
|
16626
16629
|
};
|
|
16627
16630
|
return /* @__PURE__ */ x("div", {
|
|
16628
16631
|
className: "stratus-calendar-time",
|
|
@@ -16801,7 +16804,7 @@ function ly(e, t, n, r) {
|
|
|
16801
16804
|
//#endregion
|
|
16802
16805
|
//#region src/components/DatePicker/DatePicker.tsx
|
|
16803
16806
|
var uy = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplays: r = 1, allowClear: i = !0, open: a, defaultOpen: o = !1, picker: s = "date", value: c, defaultValue: l, format: u, placeholder: d, showTime: f = !1, showToday: m = !0, showWeekNumber: h = !1, onChange: g, onOpen: _, onClose: y, disabled: b = !1, disabledDates: S, popoverPlacement: C = "bottom-start", inputProps: w = {}, footer: T, style: E, ...D }, O) {
|
|
16804
|
-
let k = c === void 0 ? null : oy(c, u), A = c === void 0 ? l ? oy(l, u) : null : k, [j, M] = v(o), [N, P] = v(A), [F, I] = v(A), [L, R] = v(!1), z = a !== void 0, B = z ? a : j, V = c === void 0 ? F : k,
|
|
16807
|
+
let k = c === void 0 ? null : oy(c, u), A = c === void 0 ? l ? oy(l, u) : null : k, [j, M] = v(o), [N, P] = v(A), [F, I] = v(A), [L, R] = v(!1), z = a !== void 0, B = z ? a : j, V = c === void 0 ? F : k, ee = c !== void 0 && B && !L ? k : F, H = c !== void 0 && !B ? k : ee, te = cy(s, H, u, f), ne = r > 0 ? r : 1, re = (e) => {
|
|
16805
16808
|
z || M(e);
|
|
16806
16809
|
}, ie = (e) => {
|
|
16807
16810
|
b || (P(V), I(V), R(!1), re(!0), _?.(e));
|
|
@@ -16821,7 +16824,7 @@ var uy = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplay
|
|
|
16821
16824
|
text: cy(s, e, u, f),
|
|
16822
16825
|
date: e || null
|
|
16823
16826
|
}), I(e), R(!1), ae(t);
|
|
16824
|
-
}, ce =
|
|
16827
|
+
}, ce = H && i ? /* @__PURE__ */ x(q, {
|
|
16825
16828
|
variant: "ghost",
|
|
16826
16829
|
size: "sm",
|
|
16827
16830
|
className: "stratus-datepicker__clear-btn",
|
|
@@ -16849,7 +16852,7 @@ var uy = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplay
|
|
|
16849
16852
|
showToday: m,
|
|
16850
16853
|
showTime: f,
|
|
16851
16854
|
showWeekNumber: h,
|
|
16852
|
-
initialDate:
|
|
16855
|
+
initialDate: ee || null,
|
|
16853
16856
|
onSelectDate: se,
|
|
16854
16857
|
onChange: U,
|
|
16855
16858
|
disabledDates: S,
|
|
@@ -16866,7 +16869,7 @@ var uy = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplay
|
|
|
16866
16869
|
disabled: b,
|
|
16867
16870
|
onChange: () => g?.({
|
|
16868
16871
|
text: te,
|
|
16869
|
-
date:
|
|
16872
|
+
date: H
|
|
16870
16873
|
}),
|
|
16871
16874
|
style: { width: f ? 200 : 150 },
|
|
16872
16875
|
...w,
|
|
@@ -17050,7 +17053,7 @@ function my({ disabled: e, picker: t, format: n, showTime: r, onChange: i, onCha
|
|
|
17050
17053
|
//#endregion
|
|
17051
17054
|
//#region src/components/DatePicker/DateRangePicker.tsx
|
|
17052
17055
|
var hy = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplays: r = 2, nInputs: i = 1, separator: a = "-", allowClear: o = !0, picker: s = "date", value: c, defaultValue: l, format: u, placeholderStartDate: d = "Start date", placeholderEndDate: f = "End date", showTime: m = !1, showToday: h = !0, showWeekNumber: g = !1, onChange: _, onChangeOnClickOutside: y = !0, disabled: b = !1, disabledDates: S, popoverPlacement: C = "bottom-start", startDateInputProps: w = {}, endDateInputProps: T = {}, footer: E, style: D, ...O }, k) {
|
|
17053
|
-
let A = c ? oy(c[0], u) : null, j = c ? oy(c[1], u) : null, M = c ? A : l ? oy(l[0], u) : null, N = c ? j : l ? oy(l[1], u) : null, [P, F] = v(!1), [I, L] = v(M), [R, z] = v(N), [B, V] = v(M), [
|
|
17056
|
+
let A = c ? oy(c[0], u) : null, j = c ? oy(c[1], u) : null, M = c ? A : l ? oy(l[0], u) : null, N = c ? j : l ? oy(l[1], u) : null, [P, F] = v(!1), [I, L] = v(M), [R, z] = v(N), [B, V] = v(M), [ee, H] = v(N), [te, ne] = v(null), [re, ie] = v(0), ae = c ? A : B, oe = c ? j : ee, se = c && !P ? A : B, U = c && !P ? j : ee, ce = r > 0 ? r : 2, le = i > 1 ? 2 : 1, W = le > 1 ? m ? "190px" : "135px" : m ? "300px" : "220px", ue = cy(s, se, u, m), de = cy(s, U, u, m), { openPicker: fe, closePicker: pe, handleOpenStartDate: me, handleOpenEndDate: he, handleDismiss: ge, handleSelectDate: _e, handleChangeDate: ve, handleClear: ye, getRowClassNames: be, getRowProps: xe, getCellClassNames: Se, getCellProps: Ce } = my({
|
|
17054
17057
|
disabled: b,
|
|
17055
17058
|
picker: s,
|
|
17056
17059
|
format: u,
|
|
@@ -17062,20 +17065,20 @@ var hy = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplay
|
|
|
17062
17065
|
savedStartDate: I,
|
|
17063
17066
|
savedEndDate: R,
|
|
17064
17067
|
startDate: B,
|
|
17065
|
-
endDate:
|
|
17068
|
+
endDate: ee,
|
|
17066
17069
|
hoverDate: te,
|
|
17067
17070
|
focusInput: re,
|
|
17068
17071
|
setOpen: F,
|
|
17069
17072
|
setSavedStartDate: L,
|
|
17070
17073
|
setSavedEndDate: z,
|
|
17071
17074
|
setStartDate: V,
|
|
17072
|
-
setEndDate:
|
|
17075
|
+
setEndDate: H,
|
|
17073
17076
|
setHoverDate: ne,
|
|
17074
17077
|
setFocusInput: ie
|
|
17075
17078
|
});
|
|
17076
17079
|
return p(k, () => ({
|
|
17077
|
-
open: () =>
|
|
17078
|
-
close: () =>
|
|
17080
|
+
open: () => fe(1),
|
|
17081
|
+
close: () => pe()
|
|
17079
17082
|
})), /* @__PURE__ */ x(Kn, {
|
|
17080
17083
|
className: G("stratus-datepicker", "stratus-datepicker--range", t),
|
|
17081
17084
|
open: P,
|
|
@@ -17083,7 +17086,7 @@ var hy = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplay
|
|
|
17083
17086
|
trigger: "click",
|
|
17084
17087
|
tooltipRef: n,
|
|
17085
17088
|
arrow: !1,
|
|
17086
|
-
onClose:
|
|
17089
|
+
onClose: ge,
|
|
17087
17090
|
maxWidth: "none",
|
|
17088
17091
|
content: /* @__PURE__ */ x(iy, {
|
|
17089
17092
|
nDisplays: ce,
|
|
@@ -17091,9 +17094,9 @@ var hy = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplay
|
|
|
17091
17094
|
showToday: h,
|
|
17092
17095
|
showTime: m,
|
|
17093
17096
|
showWeekNumber: g,
|
|
17094
|
-
initialDate: re === 1 ? B || null :
|
|
17095
|
-
onSelectDate:
|
|
17096
|
-
onChange:
|
|
17097
|
+
initialDate: re === 1 ? B || null : ee || null,
|
|
17098
|
+
onSelectDate: _e,
|
|
17099
|
+
onChange: ve,
|
|
17097
17100
|
disabledDates: S,
|
|
17098
17101
|
rowClassNames: be,
|
|
17099
17102
|
rowProps: xe,
|
|
@@ -17113,13 +17116,13 @@ var hy = o(function({ className: e, popoverClassName: t, tooltipRef: n, nDisplay
|
|
|
17113
17116
|
separator: a,
|
|
17114
17117
|
placeholderStartDate: d,
|
|
17115
17118
|
placeholderEndDate: f,
|
|
17116
|
-
startDate:
|
|
17117
|
-
endDate:
|
|
17118
|
-
onClickClear:
|
|
17119
|
-
onClickStartDate:
|
|
17120
|
-
onClickEndDate:
|
|
17119
|
+
startDate: ue || "",
|
|
17120
|
+
endDate: de || "",
|
|
17121
|
+
onClickClear: ye,
|
|
17122
|
+
onClickStartDate: me,
|
|
17123
|
+
onClickEndDate: he,
|
|
17121
17124
|
disabled: b,
|
|
17122
|
-
width:
|
|
17125
|
+
width: W,
|
|
17123
17126
|
startDateInputProps: w,
|
|
17124
17127
|
endDateInputProps: T
|
|
17125
17128
|
})
|
|
@@ -17140,25 +17143,25 @@ function _y(e, t, n = !0) {
|
|
|
17140
17143
|
case "weeks": return n ? Ue(r, { weekStartsOn: 1 }) : xe(r, { weekStartsOn: 1 });
|
|
17141
17144
|
case "months": return n ? He(r) : be(r);
|
|
17142
17145
|
case "years": return n ? We(r) : Se(r);
|
|
17143
|
-
default: return n ? Be(r) :
|
|
17146
|
+
default: return n ? Be(r) : ve(r);
|
|
17144
17147
|
}
|
|
17145
17148
|
}
|
|
17146
17149
|
function vy(e, t, n) {
|
|
17147
17150
|
let r = gy(e), i = gy(t);
|
|
17148
17151
|
switch (n) {
|
|
17149
|
-
case "weeks": return
|
|
17152
|
+
case "weeks": return ge({
|
|
17150
17153
|
start: r,
|
|
17151
17154
|
end: i
|
|
17152
17155
|
}, { weekStartsOn: 1 });
|
|
17153
|
-
case "months": return
|
|
17156
|
+
case "months": return me({
|
|
17154
17157
|
start: r,
|
|
17155
17158
|
end: i
|
|
17156
17159
|
});
|
|
17157
|
-
case "years": return
|
|
17160
|
+
case "years": return _e({
|
|
17158
17161
|
start: r,
|
|
17159
17162
|
end: i
|
|
17160
17163
|
});
|
|
17161
|
-
default: return
|
|
17164
|
+
default: return pe({
|
|
17162
17165
|
start: r,
|
|
17163
17166
|
end: i
|
|
17164
17167
|
});
|
|
@@ -17173,7 +17176,7 @@ function yy(e, t = !1) {
|
|
|
17173
17176
|
}
|
|
17174
17177
|
}
|
|
17175
17178
|
function by(e, t, n, r) {
|
|
17176
|
-
return
|
|
17179
|
+
return fe(r, n) / t * e;
|
|
17177
17180
|
}
|
|
17178
17181
|
function xy(e, t, n, r) {
|
|
17179
17182
|
return !(ke(e, n) && ke(t, n) || Oe(e, r) && Oe(t, r));
|
|
@@ -17199,7 +17202,7 @@ function wy(e, t) {
|
|
|
17199
17202
|
return 150;
|
|
17200
17203
|
}
|
|
17201
17204
|
function Ty(e, t, n, r, i) {
|
|
17202
|
-
let a = _y(t, i, !0), o = _y(n, i, !1), s =
|
|
17205
|
+
let a = _y(t, i, !0), o = _y(n, i, !1), s = fe(o, a);
|
|
17203
17206
|
return e.map((e) => {
|
|
17204
17207
|
let c = gy(e.startDate), l = gy(e.endDate), { children: u, ...d } = e, f = u && u.length > 0 ? Ty(u, t, n, r, i) : void 0;
|
|
17205
17208
|
return {
|
|
@@ -17285,7 +17288,7 @@ function Oy() {
|
|
|
17285
17288
|
function ky({ start: e, end: t, rowWidth: n, groupDatesBy: r }) {
|
|
17286
17289
|
let i = l(() => {
|
|
17287
17290
|
let i = /* @__PURE__ */ new Date(), a = _y(e, r, !0);
|
|
17288
|
-
return by(n,
|
|
17291
|
+
return by(n, fe(_y(t, r, !1), a), a, i);
|
|
17289
17292
|
}, [
|
|
17290
17293
|
e,
|
|
17291
17294
|
t,
|
|
@@ -17329,7 +17332,7 @@ var Ay = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
|
|
|
17329
17332
|
n,
|
|
17330
17333
|
O,
|
|
17331
17334
|
D
|
|
17332
|
-
]),
|
|
17335
|
+
]), ee = h(() => {
|
|
17333
17336
|
let e = L * a / 100, t = i.map((t, n) => {
|
|
17334
17337
|
let r = t.dataKey || t.accessor || t.key || `col_${n}`, i = wy(e, t), a = {
|
|
17335
17338
|
dataKey: r,
|
|
@@ -17425,10 +17428,10 @@ var Ay = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
|
|
|
17425
17428
|
let e = F.current.getTableRef();
|
|
17426
17429
|
if (e) if (A) {
|
|
17427
17430
|
let t = r.findIndex((e) => e.id === A);
|
|
17428
|
-
t !== -1 && (e.scrollToRow(t),
|
|
17429
|
-
} else k &&
|
|
17431
|
+
t !== -1 && (e.scrollToRow(t), H(r[t].startDate));
|
|
17432
|
+
} else k && H(k);
|
|
17430
17433
|
}, [k, A]);
|
|
17431
|
-
function
|
|
17434
|
+
function H(e) {
|
|
17432
17435
|
if (!e || !F.current) return;
|
|
17433
17436
|
let t = gy(e), n = F.current.getTableRef();
|
|
17434
17437
|
if (!n) return;
|
|
@@ -17445,7 +17448,7 @@ var Ay = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
|
|
|
17445
17448
|
let t = F.current.getTableRef();
|
|
17446
17449
|
if (!t) return;
|
|
17447
17450
|
let n = r.findIndex((t) => t.id === e);
|
|
17448
|
-
n !== -1 && (t.scrollToRow(n),
|
|
17451
|
+
n !== -1 && (t.scrollToRow(n), H(r[n].startDate));
|
|
17449
17452
|
}
|
|
17450
17453
|
function ne(e) {
|
|
17451
17454
|
b && setTimeout(() => {
|
|
@@ -17454,7 +17457,7 @@ var Ay = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
|
|
|
17454
17457
|
});
|
|
17455
17458
|
}
|
|
17456
17459
|
p(P, () => ({
|
|
17457
|
-
scrollToDate: (e) => setTimeout(() =>
|
|
17460
|
+
scrollToDate: (e) => setTimeout(() => H(e)),
|
|
17458
17461
|
scrollToTask: (e) => setTimeout(() => te(e)),
|
|
17459
17462
|
clearSortState: () => F.current?.clearSortState(),
|
|
17460
17463
|
setSelectedRows: (e) => F.current?.setSelectedRows(e.map(String)),
|
|
@@ -17482,7 +17485,7 @@ var Ay = o(function({ className: e, start: t, end: n, data: r, columns: i = [],
|
|
|
17482
17485
|
style: { height: "100%" },
|
|
17483
17486
|
children: [/* @__PURE__ */ x(Ft, {
|
|
17484
17487
|
ref: F,
|
|
17485
|
-
columns:
|
|
17488
|
+
columns: ee,
|
|
17486
17489
|
data: V,
|
|
17487
17490
|
rowId: "id",
|
|
17488
17491
|
headerHeight: s,
|