@stenajs-webui/grid 20.14.1 → 20.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/standard-table/components/StandardTable.d.ts +14 -0
- package/dist/features/standard-table/components/StandardTableContent.d.ts +1 -1
- package/dist/index.es.js +131 -125
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._tableRow_1cphw_1:focus-within{background:var(--focus-within-background, var(--lhds-color-blue-50))}._standardTable_1iok0_1{--swui-standard-table-height: 40px;--swui-sticky-header-shadow: 2px 4px 4px 0 rgba(0, 0, 0, .05);--swui-sticky-header-shadow-and-right: var(--swui-sticky-header-shadow), var(--swui-sticky-column-shadow-right);--swui-sticky-header-shadow-and-left: var(--swui-sticky-header-shadow), var(--swui-sticky-column-shadow-left);--swui-sticky-column-shadow-right: 4px 2px 4px 0 rgba(0, 0, 0, .05);--swui-sticky-column-shadow-left: -4px 2px 4px 0 rgba(0, 0, 0, .05);--swui-sticky-header-z-index: 10;--swui-sticky-column-z-index: 20;--swui-sticky-group-group-z-index: 25;--swui-sticky-group-header-z-index: 26;--swui-sticky-header-column-group-z-index: 30;--swui-sticky-column-group-label-z-index: 40;--swui-sticky-header-in-sticky-column-z-index: 50;--swui-sticky-popover-z-index: 60;--swui-expand-cell-width: 45px;--swui-checkbox-cell-width: 45px;--swui-expand-highlight-border-width: 2px;--current-row-height: var(--swui-standard-table-height);--current-left-offset: 0px;border-spacing:0}._standardTable_1iok0_1 td{border-top:1px solid var(--lhds-color-ui-300);padding:0}._standardTable_1iok0_1 th{padding:0}._standardTable_1iok0_1._relaxed_1iok0_37{--current-row-height: 48px}._standardTable_1iok0_1._condensed_1iok0_41{--current-row-height: 32px}._standardTable_1iok0_1._compact_1iok0_45{--current-row-height: 24px}._standardTableCell_1xzcm_1{outline:none}._textCell_1yv6v_1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._summaryRow_12x8k_1 td{border-top:1px solid var(--lhds-color-ui-400)}._standardTableHeadTh_swsxb_8{height:1px}@-moz-document url-prefix(){._standardTableHeadTh_swsxb_8{height:100%}}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
-
import { jsx as a, Fragment as R, jsxs as
|
|
2
|
+
import { jsx as a, Fragment as R, jsxs as v } from "react/jsx-runtime";
|
|
3
3
|
import * as G from "react";
|
|
4
4
|
import { useMemo as y, useRef as ce, useState as ke, useCallback as P, useEffect as ht, useContext as Y, createContext as z, useReducer as Zt, useId as en } from "react";
|
|
5
5
|
import { InputSpinner as We, Icon as X, stenaExclamationTriangle as Pe, stenaArrowRight as mt, stenaInfoCircle as tn, FlatButton as Ne, stenaDotsVertical as nn, stenaAngleDown as ft, stenaAngleRight as pt, ResultListBanner as rn, Banner as Ke } from "@stenajs-webui/elements";
|
|
6
6
|
import { cssColor as V } from "@stenajs-webui/theme";
|
|
7
7
|
import { Tooltip as we, Popover as on } from "@stenajs-webui/tooltip";
|
|
8
|
-
import { Text as U, Indent as
|
|
8
|
+
import { Text as U, Indent as L, Space as N, Row as T, Box as le, exhaustSwitchCaseElseThrow as sn, Heading as wt, booleanOrNumberToNumber as an, useArraySet as gt, useOnScreen as cn, Spacing as Me } from "@stenajs-webui/core";
|
|
9
9
|
import { faSortAlphaDown as ln } from "@fortawesome/free-solid-svg-icons/faSortAlphaDown";
|
|
10
10
|
import { faSortAlphaUp as un } from "@fortawesome/free-solid-svg-icons/faSortAlphaUp";
|
|
11
11
|
import { faSortAmountDownAlt as dn } from "@fortawesome/free-solid-svg-icons/faSortAmountDownAlt";
|
|
@@ -13,7 +13,7 @@ import { faSortAmountUpAlt as hn } from "@fortawesome/free-solid-svg-icons/faSor
|
|
|
13
13
|
import { faSortNumericDown as mn } from "@fortawesome/free-solid-svg-icons/faSortNumericDown";
|
|
14
14
|
import { faSortNumericUp as fn } from "@fortawesome/free-solid-svg-icons/faSortNumericUp";
|
|
15
15
|
import yt from "classnames";
|
|
16
|
-
import { TextInput as
|
|
16
|
+
import { TextInput as Le, Checkbox as Be } from "@stenajs-webui/forms";
|
|
17
17
|
import { useDispatch as pn, useSelector as Qe } from "react-redux";
|
|
18
18
|
import { createSortOrderActions as wn, createSelectedIdsActions as Xe, createEntityActions as gn, createSortOrderReducerInitialState as yn, createSelectedIdsReducerInitialState as Ue, reducerIdGate as xe, createSortOrderReducer as bn, createSelectedIdsReducer as Je, createEntityReducer as vn, reducerIdGateAction as ne } from "@stenajs-webui/redux";
|
|
19
19
|
import { combineReducers as Cn } from "redux";
|
|
@@ -61,7 +61,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
61
61
|
crudStatus: o
|
|
62
62
|
}) => {
|
|
63
63
|
const s = t && (r == null ? void 0 : r.modified) && (r == null ? void 0 : r.newValue) === "", i = o && Ae(o), c = s || i;
|
|
64
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ v(R, { children: [
|
|
65
65
|
/* @__PURE__ */ a(
|
|
66
66
|
U,
|
|
67
67
|
{
|
|
@@ -70,8 +70,8 @@ const bt = G.createContext({}), Zs = ({
|
|
|
70
70
|
children: n
|
|
71
71
|
}
|
|
72
72
|
),
|
|
73
|
-
(r == null ? void 0 : r.newValue) !== void 0 && /* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */ a(
|
|
73
|
+
(r == null ? void 0 : r.newValue) !== void 0 && /* @__PURE__ */ v(R, { children: [
|
|
74
|
+
/* @__PURE__ */ a(L, { children: /* @__PURE__ */ a(X, { icon: mt, size: 12 }) }),
|
|
75
75
|
/* @__PURE__ */ a(U, { color: "var(--swui-primary-action-color)", variant: "bold", children: r.newValue })
|
|
76
76
|
] }),
|
|
77
77
|
c && /* @__PURE__ */ a(N, {}),
|
|
@@ -145,7 +145,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
145
145
|
...p
|
|
146
146
|
}) => {
|
|
147
147
|
const f = ce(null), w = n ? { cursor: "pointer", userSelect: "none" } : void 0, h = !e && !t && !c;
|
|
148
|
-
return /* @__PURE__ */
|
|
148
|
+
return /* @__PURE__ */ v(
|
|
149
149
|
T,
|
|
150
150
|
{
|
|
151
151
|
height: "100%",
|
|
@@ -157,18 +157,18 @@ const bt = G.createContext({}), Zs = ({
|
|
|
157
157
|
borderBottom: `2px solid ${o ? V("--lhds-color-blue-500") : "transparent"}`,
|
|
158
158
|
...p,
|
|
159
159
|
children: [
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
!t && d && /* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ v(T, { alignItems: "center", indent: !0, children: [
|
|
161
|
+
!t && d && /* @__PURE__ */ v(R, { children: [
|
|
162
162
|
/* @__PURE__ */ a(N, {}),
|
|
163
163
|
/* @__PURE__ */ a(le, { width: "14px" }),
|
|
164
164
|
/* @__PURE__ */ a(N, { num: 0.5 })
|
|
165
165
|
] }),
|
|
166
|
-
(r || e) && /* @__PURE__ */
|
|
167
|
-
r && /* @__PURE__ */
|
|
166
|
+
(r || e) && /* @__PURE__ */ v(T, { onClick: n, style: w, alignItems: "center", children: [
|
|
167
|
+
r && /* @__PURE__ */ v(R, { children: [
|
|
168
168
|
r,
|
|
169
169
|
!h && /* @__PURE__ */ a(N, { num: 0.5 })
|
|
170
170
|
] }),
|
|
171
|
-
t && d && /* @__PURE__ */
|
|
171
|
+
t && d && /* @__PURE__ */ v(R, { children: [
|
|
172
172
|
/* @__PURE__ */ a(N, {}),
|
|
173
173
|
/* @__PURE__ */ a(
|
|
174
174
|
Ze,
|
|
@@ -180,7 +180,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
180
180
|
/* @__PURE__ */ a(N, { num: 0.5 })
|
|
181
181
|
] }),
|
|
182
182
|
e && /* @__PURE__ */ a(wt, { variant: "h6", style: { textAlign: "left" }, children: e }),
|
|
183
|
-
t && !d && /* @__PURE__ */
|
|
183
|
+
t && !d && /* @__PURE__ */ v(R, { children: [
|
|
184
184
|
/* @__PURE__ */ a(N, { num: 0.5 }),
|
|
185
185
|
/* @__PURE__ */ a(
|
|
186
186
|
Ze,
|
|
@@ -192,9 +192,9 @@ const bt = G.createContext({}), Zs = ({
|
|
|
192
192
|
/* @__PURE__ */ a(N, {})
|
|
193
193
|
] })
|
|
194
194
|
] }),
|
|
195
|
-
c && /* @__PURE__ */
|
|
195
|
+
c && /* @__PURE__ */ v(R, { children: [
|
|
196
196
|
/* @__PURE__ */ a(N, {}),
|
|
197
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ v(T, { onClick: (g) => g.stopPropagation(), children: [
|
|
198
198
|
/* @__PURE__ */ a(
|
|
199
199
|
we,
|
|
200
200
|
{
|
|
@@ -225,7 +225,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
225
225
|
children: /* @__PURE__ */ a(Ne, { leftIcon: nn, size: "small" })
|
|
226
226
|
}
|
|
227
227
|
) : null }),
|
|
228
|
-
!t && !d && /* @__PURE__ */
|
|
228
|
+
!t && !d && /* @__PURE__ */ v(R, { children: [
|
|
229
229
|
/* @__PURE__ */ a(N, {}),
|
|
230
230
|
/* @__PURE__ */ a(le, { width: "14px" }),
|
|
231
231
|
/* @__PURE__ */ a(N, { num: 0.5 })
|
|
@@ -249,7 +249,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
249
249
|
height: o = ze
|
|
250
250
|
}) => /* @__PURE__ */ a(Ye, { width: n, flex: t, height: o, children: /* @__PURE__ */ a(le, { indent: r, spacing: !0, children: /* @__PURE__ */ a(U, { variant: "bold", children: e }) }) }), ra = G.memo(
|
|
251
251
|
({ style: e, height: t = ze, ...n }) => /* @__PURE__ */ a(T, { style: e, height: t, ...n })
|
|
252
|
-
), Nn = "_tableRow_1cphw_1",
|
|
252
|
+
), Nn = "_tableRow_1cphw_1", Ln = {
|
|
253
253
|
tableRow: Nn
|
|
254
254
|
}, oa = ({
|
|
255
255
|
hideBorderTop: e,
|
|
@@ -261,10 +261,10 @@ const bt = G.createContext({}), Zs = ({
|
|
|
261
261
|
{
|
|
262
262
|
borderTop: e ? Gn : fe,
|
|
263
263
|
height: t,
|
|
264
|
-
className: yt(
|
|
264
|
+
className: yt(Ln.tableRow, n),
|
|
265
265
|
...r
|
|
266
266
|
}
|
|
267
|
-
),
|
|
267
|
+
), Bn = (e) => {
|
|
268
268
|
const [t, n] = ke(e), r = ce(e), o = ce(e), s = P(
|
|
269
269
|
(u) => {
|
|
270
270
|
n(u), o.current = u;
|
|
@@ -315,7 +315,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
315
315
|
}) => {
|
|
316
316
|
const [c, l] = ke(!1), [d, u] = ke(
|
|
317
317
|
void 0
|
|
318
|
-
), m =
|
|
318
|
+
), m = Bn(e), { getValue: p, revert: f, setValue: w, setRevertValue: h } = m, g = P(
|
|
319
319
|
(S) => {
|
|
320
320
|
t && (w(e), h(e), l(!0), o && o(S));
|
|
321
321
|
},
|
|
@@ -577,7 +577,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
577
577
|
setEditorValue: M,
|
|
578
578
|
stopEditingAndRevert: W,
|
|
579
579
|
stopEditingAndMove: x,
|
|
580
|
-
lastKeyEvent:
|
|
580
|
+
lastKeyEvent: B,
|
|
581
581
|
requiredProps: { onKeyDown: A, ...ee }
|
|
582
582
|
} = Oe(n, {
|
|
583
583
|
rowIndex: d,
|
|
@@ -605,7 +605,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
605
605
|
i.actions
|
|
606
606
|
]
|
|
607
607
|
);
|
|
608
|
-
return /* @__PURE__ */
|
|
608
|
+
return /* @__PURE__ */ v(
|
|
609
609
|
T,
|
|
610
610
|
{
|
|
611
611
|
height: He,
|
|
@@ -614,7 +614,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
614
614
|
hoverBackground: "var(--ui7)",
|
|
615
615
|
alignItems: "center",
|
|
616
616
|
children: [
|
|
617
|
-
s && /* @__PURE__ */ a(
|
|
617
|
+
s && /* @__PURE__ */ a(L, { num: s }),
|
|
618
618
|
/* @__PURE__ */ a(
|
|
619
619
|
T,
|
|
620
620
|
{
|
|
@@ -628,18 +628,18 @@ const bt = G.createContext({}), Zs = ({
|
|
|
628
628
|
hoverBorder: O ? void 0 : "var(--ui5) solid 1px;",
|
|
629
629
|
onKeyDown: _,
|
|
630
630
|
...ee,
|
|
631
|
-
children: /* @__PURE__ */ a(
|
|
632
|
-
|
|
631
|
+
children: /* @__PURE__ */ a(L, { row: !0, alignItems: "center", children: O ? /* @__PURE__ */ a(
|
|
632
|
+
Le,
|
|
633
633
|
{
|
|
634
634
|
onValueChange: M,
|
|
635
635
|
value: D,
|
|
636
636
|
onDone: S,
|
|
637
637
|
onEsc: W,
|
|
638
638
|
autoFocus: !0,
|
|
639
|
-
selectAllOnMount: !
|
|
639
|
+
selectAllOnMount: !B,
|
|
640
640
|
onMove: x
|
|
641
641
|
}
|
|
642
|
-
) : /* @__PURE__ */
|
|
642
|
+
) : /* @__PURE__ */ v(R, { children: [
|
|
643
643
|
/* @__PURE__ */ a(
|
|
644
644
|
U,
|
|
645
645
|
{
|
|
@@ -648,8 +648,8 @@ const bt = G.createContext({}), Zs = ({
|
|
|
648
648
|
children: n
|
|
649
649
|
}
|
|
650
650
|
),
|
|
651
|
-
(g == null ? void 0 : g.newValue) !== void 0 && /* @__PURE__ */
|
|
652
|
-
/* @__PURE__ */ a(
|
|
651
|
+
(g == null ? void 0 : g.newValue) !== void 0 && /* @__PURE__ */ v(R, { children: [
|
|
652
|
+
/* @__PURE__ */ a(L, { children: /* @__PURE__ */ a(X, { icon: mt, size: 12 }) }),
|
|
653
653
|
/* @__PURE__ */ a(
|
|
654
654
|
U,
|
|
655
655
|
{
|
|
@@ -671,7 +671,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
671
671
|
] }) })
|
|
672
672
|
}
|
|
673
673
|
),
|
|
674
|
-
s && /* @__PURE__ */ a(
|
|
674
|
+
s && /* @__PURE__ */ a(L, { num: s })
|
|
675
675
|
]
|
|
676
676
|
}
|
|
677
677
|
);
|
|
@@ -716,7 +716,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
716
716
|
() => t.map((r) => r.groupConfig.columnOrder.length).reduce((r, o) => r + o, 0),
|
|
717
717
|
[t]
|
|
718
718
|
);
|
|
719
|
-
}, Wt = z(void 0), sr = () => Y(Wt), Nt = z(void 0), ar = () => Y(Nt),
|
|
719
|
+
}, Wt = z(void 0), sr = () => Y(Wt), Nt = z(void 0), ar = () => Y(Nt), Lt = z(void 0), ir = z(!1), cr = () => Y(Lt), lr = z("standard"), Bt = z({}), _e = () => Y(Bt), At = z(0), je = () => Y(At), Ft = (e, t, n) => e ? Sn(
|
|
720
720
|
(t == null ? void 0 : t.map((r) => {
|
|
721
721
|
const o = e == null ? void 0 : e[r];
|
|
722
722
|
return {
|
|
@@ -765,7 +765,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
765
765
|
isFirstGroup: s,
|
|
766
766
|
isLastGroup: i
|
|
767
767
|
}) {
|
|
768
|
-
const { label: c, render: l, contentLeft: d, contentRight: u, loading: m, error: p } = n, { width: f, minWidth: w, zIndex: h, borderLeft: g } = ye(t), b = I(), { stickyHeader: k, headerRowOffsetTop: O } = b, S = "columnGroupOrder" in b ? b.stickyColumnGroups : void 0, D = mr(r, g), M = s && (S === "first" || S === "both"), W = i && (S === "last" || S === "both"), x = M || W || k,
|
|
768
|
+
const { label: c, render: l, contentLeft: d, contentRight: u, loading: m, error: p } = n, { width: f, minWidth: w, zIndex: h, borderLeft: g } = ye(t), b = I(), { stickyHeader: k, headerRowOffsetTop: O } = b, S = "columnGroupOrder" in b ? b.stickyColumnGroups : void 0, D = mr(r, g), M = s && (S === "first" || S === "both"), W = i && (S === "last" || S === "both"), x = M || W || k, B = M || W;
|
|
769
769
|
return /* @__PURE__ */ a(
|
|
770
770
|
"th",
|
|
771
771
|
{
|
|
@@ -780,21 +780,21 @@ const bt = G.createContext({}), Zs = ({
|
|
|
780
780
|
right: W ? "0px" : void 0,
|
|
781
781
|
top: k ? O ?? "0px" : void 0,
|
|
782
782
|
borderLeft: D,
|
|
783
|
-
zIndex: k &&
|
|
783
|
+
zIndex: k && B ? "var(--swui-sticky-column-group-label-z-index)" : B ? "var(--swui-sticky-group-group-z-index)" : k ? h ?? "var(--swui-sticky-header-column-group-z-index)" : h ?? 1,
|
|
784
784
|
boxShadow: M ? "var(--swui-sticky-column-shadow-right)" : W ? "var(--swui-sticky-column-shadow-left)" : void 0
|
|
785
785
|
},
|
|
786
|
-
children: /* @__PURE__ */ a(T, { alignItems: "center", children: /* @__PURE__ */
|
|
787
|
-
d && /* @__PURE__ */
|
|
786
|
+
children: /* @__PURE__ */ a(T, { alignItems: "center", children: /* @__PURE__ */ v(R, { children: [
|
|
787
|
+
d && /* @__PURE__ */ v(R, { children: [
|
|
788
788
|
/* @__PURE__ */ a(N, {}),
|
|
789
789
|
d,
|
|
790
790
|
/* @__PURE__ */ a(N, { num: 0.5 })
|
|
791
791
|
] }),
|
|
792
|
-
l ? l(n) : /* @__PURE__ */ a(
|
|
793
|
-
u && /* @__PURE__ */
|
|
792
|
+
l ? l(n) : /* @__PURE__ */ a(L, { children: /* @__PURE__ */ a(wt, { variant: "h5", whiteSpace: "nowrap", children: c }) }),
|
|
793
|
+
u && /* @__PURE__ */ v(R, { children: [
|
|
794
794
|
/* @__PURE__ */ a(N, { num: 0.5 }),
|
|
795
795
|
u
|
|
796
796
|
] }),
|
|
797
|
-
(p || m) && /* @__PURE__ */ a(
|
|
797
|
+
(p || m) && /* @__PURE__ */ a(L, {}),
|
|
798
798
|
m ? /* @__PURE__ */ a(We, {}) : p ? /* @__PURE__ */ a(
|
|
799
799
|
we,
|
|
800
800
|
{
|
|
@@ -849,7 +849,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
849
849
|
u,
|
|
850
850
|
c
|
|
851
851
|
), p = l ? "var(--swui-sticky-column-group-label-z-index)" : "var(--swui-sticky-group-group-z-index)";
|
|
852
|
-
return /* @__PURE__ */
|
|
852
|
+
return /* @__PURE__ */ v(
|
|
853
853
|
"tr",
|
|
854
854
|
{
|
|
855
855
|
style: {
|
|
@@ -1075,14 +1075,14 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1075
1075
|
}, 0) : ((t = e.columnOrder) == null ? void 0 : t.length) ?? 0;
|
|
1076
1076
|
}, Rr = () => {
|
|
1077
1077
|
const e = I(), t = Z(), n = e.enableExpandCollapse || e.showRowCheckbox, r = an(e.rowIndent);
|
|
1078
|
-
return /* @__PURE__ */
|
|
1078
|
+
return /* @__PURE__ */ v(R, { children: [
|
|
1079
1079
|
r ? /* @__PURE__ */ a("colgroup", { children: /* @__PURE__ */ a(
|
|
1080
1080
|
"col",
|
|
1081
1081
|
{
|
|
1082
1082
|
style: { width: `calc(var(--swui-metrics-indent) * ${r})` }
|
|
1083
1083
|
}
|
|
1084
1084
|
) }) : null,
|
|
1085
|
-
n && /* @__PURE__ */
|
|
1085
|
+
n && /* @__PURE__ */ v("colgroup", { children: [
|
|
1086
1086
|
e.enableExpandCollapse && /* @__PURE__ */ a("col", { style: { width: "var(--swui-expand-cell-width)" } }),
|
|
1087
1087
|
e.showRowCheckbox && /* @__PURE__ */ a("col", { style: { width: "var(--swui-checkbox-cell-width)" } })
|
|
1088
1088
|
] }),
|
|
@@ -1103,12 +1103,12 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1103
1103
|
}
|
|
1104
1104
|
) }) : null
|
|
1105
1105
|
] });
|
|
1106
|
-
}, Gr = "_standardTable_1iok0_1", Wr = "_relaxed_1iok0_37", Nr = "_condensed_1iok0_41",
|
|
1106
|
+
}, Gr = "_standardTable_1iok0_1", Wr = "_relaxed_1iok0_37", Nr = "_condensed_1iok0_41", Lr = "_compact_1iok0_45", rt = {
|
|
1107
1107
|
standardTable: Gr,
|
|
1108
1108
|
relaxed: Wr,
|
|
1109
1109
|
condensed: Nr,
|
|
1110
|
-
compact:
|
|
1111
|
-
},
|
|
1110
|
+
compact: Lr
|
|
1111
|
+
}, Br = (e, t) => e != null && t == null ? -1 : e == null && t != null ? 1 : Re(e, t, "number") ? Number(e) - Number(t) : Re(e, t, "boolean") ? Number(t) - Number(e) : Re(e, t, "string") ? String(e).localeCompare(String(t)) : e instanceof Date && t instanceof Date ? e.getTime() - t.getTime() : 0, Re = (e, t, n) => typeof e === n && typeof t === n, Ar = (e) => {
|
|
1112
1112
|
const { columns: t } = I();
|
|
1113
1113
|
if (!e)
|
|
1114
1114
|
return;
|
|
@@ -1139,7 +1139,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1139
1139
|
[n, c, l]
|
|
1140
1140
|
);
|
|
1141
1141
|
return /* @__PURE__ */ a(
|
|
1142
|
-
|
|
1142
|
+
Be,
|
|
1143
1143
|
{
|
|
1144
1144
|
size: "small",
|
|
1145
1145
|
disabled: i,
|
|
@@ -1298,7 +1298,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1298
1298
|
size: n,
|
|
1299
1299
|
color: r
|
|
1300
1300
|
}) {
|
|
1301
|
-
return /* @__PURE__ */ a(
|
|
1301
|
+
return /* @__PURE__ */ a(L, { overflow: "hidden", children: /* @__PURE__ */ a(U, { className: Ur.textCell, title: t, size: n, color: r, children: t }) });
|
|
1302
1302
|
}), Zr = ({
|
|
1303
1303
|
label: e,
|
|
1304
1304
|
textSize: t
|
|
@@ -1321,7 +1321,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1321
1321
|
width: M,
|
|
1322
1322
|
minWidth: W,
|
|
1323
1323
|
justifyContentCell: x = "flex-start",
|
|
1324
|
-
borderLeft:
|
|
1324
|
+
borderLeft: B,
|
|
1325
1325
|
renderCell: A = k,
|
|
1326
1326
|
gridCellOptions: ee,
|
|
1327
1327
|
isEditable: _,
|
|
@@ -1375,7 +1375,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1375
1375
|
), Ut = Ve(
|
|
1376
1376
|
i,
|
|
1377
1377
|
c,
|
|
1378
|
-
|
|
1378
|
+
B
|
|
1379
1379
|
), Jt = H.sticky && H.type === "last-group" && H.isFirstColumnInLastGroup || H.sticky && H.type === "column" && H.right ? "var(--swui-sticky-column-shadow-left)" : H.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0;
|
|
1380
1380
|
return /* @__PURE__ */ a(
|
|
1381
1381
|
"td",
|
|
@@ -1451,7 +1451,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1451
1451
|
}), x = y(
|
|
1452
1452
|
() => w == null ? void 0 : w(t, S),
|
|
1453
1453
|
[S, t, w]
|
|
1454
|
-
),
|
|
1454
|
+
), B = ro(
|
|
1455
1455
|
x,
|
|
1456
1456
|
S,
|
|
1457
1457
|
O
|
|
@@ -1473,14 +1473,14 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1473
1473
|
De,
|
|
1474
1474
|
t
|
|
1475
1475
|
), ve = y(
|
|
1476
|
-
() => /* @__PURE__ */ a(R, { children: /* @__PURE__ */
|
|
1476
|
+
() => /* @__PURE__ */ a(R, { children: /* @__PURE__ */ v(R, { children: [
|
|
1477
1477
|
b && /* @__PURE__ */ a(
|
|
1478
1478
|
"td",
|
|
1479
1479
|
{
|
|
1480
1480
|
style: {
|
|
1481
1481
|
background: $
|
|
1482
1482
|
},
|
|
1483
|
-
children: /* @__PURE__ */ a(
|
|
1483
|
+
children: /* @__PURE__ */ a(L, { num: b })
|
|
1484
1484
|
}
|
|
1485
1485
|
),
|
|
1486
1486
|
k && /* @__PURE__ */ a(
|
|
@@ -1571,7 +1571,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1571
1571
|
style: {
|
|
1572
1572
|
background: be
|
|
1573
1573
|
},
|
|
1574
|
-
children: /* @__PURE__ */ a(
|
|
1574
|
+
children: /* @__PURE__ */ a(L, { num: b })
|
|
1575
1575
|
}
|
|
1576
1576
|
),
|
|
1577
1577
|
/* @__PURE__ */ a("td", {})
|
|
@@ -1597,12 +1597,12 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1597
1597
|
D
|
|
1598
1598
|
]
|
|
1599
1599
|
);
|
|
1600
|
-
return /* @__PURE__ */
|
|
1600
|
+
return /* @__PURE__ */ v(R, { children: [
|
|
1601
1601
|
/* @__PURE__ */ a(
|
|
1602
1602
|
qt,
|
|
1603
1603
|
{
|
|
1604
1604
|
hoverBackground: A,
|
|
1605
|
-
background:
|
|
1605
|
+
background: B,
|
|
1606
1606
|
focusBackground: ee,
|
|
1607
1607
|
borderLeft: O ? xt : Fe,
|
|
1608
1608
|
ref: l,
|
|
@@ -1669,7 +1669,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1669
1669
|
overflow: "hidden",
|
|
1670
1670
|
justifyContent: f,
|
|
1671
1671
|
alignItems: "center",
|
|
1672
|
-
children: c ? O : /* @__PURE__ */ a(
|
|
1672
|
+
children: c ? O : /* @__PURE__ */ a(L, { children: /* @__PURE__ */ a(U, { variant: "bold", children: k }) })
|
|
1673
1673
|
}
|
|
1674
1674
|
)
|
|
1675
1675
|
}
|
|
@@ -1691,8 +1691,8 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1691
1691
|
items: t
|
|
1692
1692
|
}) {
|
|
1693
1693
|
const n = Z(), { showRowCheckbox: r, enableExpandCollapse: o, columns: s, rowIndent: i } = I();
|
|
1694
|
-
return /* @__PURE__ */
|
|
1695
|
-
i && /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(
|
|
1694
|
+
return /* @__PURE__ */ v("tr", { className: lo.summaryRow, children: [
|
|
1695
|
+
i && /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(L, { num: i }) }),
|
|
1696
1696
|
o && /* @__PURE__ */ a("td", {}),
|
|
1697
1697
|
r && /* @__PURE__ */ a("td", {}),
|
|
1698
1698
|
n.map(({ groupConfig: c, groupId: l }, d) => /* @__PURE__ */ a(G.Fragment, { children: ho(c.columnOrder, s).map(
|
|
@@ -1712,7 +1712,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1712
1712
|
u
|
|
1713
1713
|
)
|
|
1714
1714
|
) }, l)),
|
|
1715
|
-
i && /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(
|
|
1715
|
+
i && /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(L, { num: i }) }),
|
|
1716
1716
|
/* @__PURE__ */ a("td", {})
|
|
1717
1717
|
] });
|
|
1718
1718
|
}
|
|
@@ -1740,7 +1740,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1740
1740
|
return t;
|
|
1741
1741
|
const h = [...t];
|
|
1742
1742
|
return h.sort(
|
|
1743
|
-
(g, b) =>
|
|
1743
|
+
(g, b) => Br(
|
|
1744
1744
|
p(g),
|
|
1745
1745
|
p(b)
|
|
1746
1746
|
)
|
|
@@ -1758,7 +1758,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1758
1758
|
return document.addEventListener("keyup", h), document.addEventListener("keydown", g), () => {
|
|
1759
1759
|
document.removeEventListener("keyup", h), document.removeEventListener("keydown", g);
|
|
1760
1760
|
};
|
|
1761
|
-
}, []), /* @__PURE__ */
|
|
1761
|
+
}, []), /* @__PURE__ */ v(G.Fragment, { children: [
|
|
1762
1762
|
f.map((h, g) => /* @__PURE__ */ a(
|
|
1763
1763
|
no,
|
|
1764
1764
|
{
|
|
@@ -1786,16 +1786,18 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1786
1786
|
colIndexOffset: d,
|
|
1787
1787
|
rowIndexOffset: u,
|
|
1788
1788
|
variant: m,
|
|
1789
|
-
errorLabel: p
|
|
1789
|
+
errorLabel: p,
|
|
1790
|
+
renderExtraRowTop: f,
|
|
1791
|
+
renderExtraRowBottom: w
|
|
1790
1792
|
}) {
|
|
1791
|
-
const
|
|
1792
|
-
return n ? /* @__PURE__ */ a("tbody", { children: /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan:
|
|
1793
|
+
const h = je();
|
|
1794
|
+
return n ? /* @__PURE__ */ a("tbody", { children: /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: h, children: /* @__PURE__ */ a(Me, { num: 4, justifyContent: "center", children: /* @__PURE__ */ a(le, { alignItems: "center", children: /* @__PURE__ */ a(rn, { bannerState: n, variant: "error" }) }) }) }) }) }) : t || p ? /* @__PURE__ */ a("tbody", { children: /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: h, children: /* @__PURE__ */ a(Me, { num: 4, justifyContent: "center", children: /* @__PURE__ */ a(le, { alignItems: "center", children: /* @__PURE__ */ a(
|
|
1793
1795
|
Ke,
|
|
1794
1796
|
{
|
|
1795
1797
|
headerText: (t ? t.message : p) ?? "Unknown error",
|
|
1796
1798
|
variant: "error"
|
|
1797
1799
|
}
|
|
1798
|
-
) }) }) }) }) }) : r ? /* @__PURE__ */ a("tbody", { children: /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan:
|
|
1800
|
+
) }) }) }) }) }) : r ? /* @__PURE__ */ a("tbody", { children: /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: h, children: /* @__PURE__ */ a(Me, { num: 4, children: /* @__PURE__ */ a(xn, {}) }) }) }) }) : !o || !o.length ? /* @__PURE__ */ a("tbody", { children: /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: h, children: /* @__PURE__ */ a(T, { spacing: 4, justifyContent: "center", children: /* @__PURE__ */ a(
|
|
1799
1801
|
Ke,
|
|
1800
1802
|
{
|
|
1801
1803
|
text: s,
|
|
@@ -1804,15 +1806,19 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1804
1806
|
variant: "info",
|
|
1805
1807
|
children: c
|
|
1806
1808
|
}
|
|
1807
|
-
) }) }) }) }) : /* @__PURE__ */
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1809
|
+
) }) }) }) }) : /* @__PURE__ */ v("tbody", { children: [
|
|
1810
|
+
f == null ? void 0 : f(),
|
|
1811
|
+
/* @__PURE__ */ a(
|
|
1812
|
+
po,
|
|
1813
|
+
{
|
|
1814
|
+
variant: m,
|
|
1815
|
+
items: o,
|
|
1816
|
+
colIndexOffset: d,
|
|
1817
|
+
rowIndexOffset: u
|
|
1818
|
+
}
|
|
1819
|
+
),
|
|
1820
|
+
w == null ? void 0 : w()
|
|
1821
|
+
] });
|
|
1816
1822
|
}), go = (e) => {
|
|
1817
1823
|
const { keyResolver: t, checkboxDisabledResolver: n } = I(), {
|
|
1818
1824
|
selectedIds: { selectedIds: r }
|
|
@@ -1975,7 +1981,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
1975
1981
|
position: m || p ? "sticky" : void 0,
|
|
1976
1982
|
boxShadow: m && p ? "var(--swui-sticky-header-shadow-and-right)" : p ? "var(--swui-sticky-column-shadow-right)" : m ? "var(--swui-sticky-header-shadow)" : void 0
|
|
1977
1983
|
};
|
|
1978
|
-
return /* @__PURE__ */
|
|
1984
|
+
return /* @__PURE__ */ v(qt, { height: r, borderLeft: Fe, children: [
|
|
1979
1985
|
l && /* @__PURE__ */ a("th", { style: D, children: /* @__PURE__ */ a(T, { indent: l }) }),
|
|
1980
1986
|
c && /* @__PURE__ */ a(
|
|
1981
1987
|
"th",
|
|
@@ -2020,7 +2026,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
2020
2026
|
alignItems: "center",
|
|
2021
2027
|
justifyContent: "center",
|
|
2022
2028
|
children: s && /* @__PURE__ */ a(
|
|
2023
|
-
|
|
2029
|
+
Be,
|
|
2024
2030
|
{
|
|
2025
2031
|
size: "small",
|
|
2026
2032
|
disabled: S,
|
|
@@ -2033,10 +2039,10 @@ const bt = G.createContext({}), Zs = ({
|
|
|
2033
2039
|
)
|
|
2034
2040
|
}
|
|
2035
2041
|
),
|
|
2036
|
-
o.map(({ groupConfig: M, groupId: W }, x) => /* @__PURE__ */ a(G.Fragment, { children: M.columnOrder.map((
|
|
2042
|
+
o.map(({ groupConfig: M, groupId: W }, x) => /* @__PURE__ */ a(G.Fragment, { children: M.columnOrder.map((B, A) => /* @__PURE__ */ a(
|
|
2037
2043
|
xo,
|
|
2038
2044
|
{
|
|
2039
|
-
columnId:
|
|
2045
|
+
columnId: B,
|
|
2040
2046
|
borderFromGroup: Ie(
|
|
2041
2047
|
x,
|
|
2042
2048
|
A,
|
|
@@ -2047,7 +2053,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
2047
2053
|
top: D.top,
|
|
2048
2054
|
appendTooltipTo: n
|
|
2049
2055
|
},
|
|
2050
|
-
|
|
2056
|
+
B
|
|
2051
2057
|
)) }, W)),
|
|
2052
2058
|
l && /* @__PURE__ */ a("th", { style: D, children: /* @__PURE__ */ a(T, { indent: l }) }),
|
|
2053
2059
|
/* @__PURE__ */ a("th", { style: D })
|
|
@@ -2077,7 +2083,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
2077
2083
|
dispatch: O
|
|
2078
2084
|
}),
|
|
2079
2085
|
[k, O]
|
|
2080
|
-
), D = !!(r ?? "columnGroupOrder" in n), M = "columnGroups" in n ? n.columnGroups : void 0, W = "columnGroupOrder" in n ? n.columnGroupOrder : void 0, x = "columnOrder" in n ? n.columnOrder : void 0,
|
|
2086
|
+
), D = !!(r ?? "columnGroupOrder" in n), M = "columnGroups" in n ? n.columnGroups : void 0, W = "columnGroupOrder" in n ? n.columnGroupOrder : void 0, x = "columnOrder" in n ? n.columnOrder : void 0, B = y(
|
|
2081
2087
|
() => Ft(
|
|
2082
2088
|
M,
|
|
2083
2089
|
W,
|
|
@@ -2107,14 +2113,14 @@ const bt = G.createContext({}), Zs = ({
|
|
|
2107
2113
|
isolation: "isolate",
|
|
2108
2114
|
"--current-left-offset": f && w ? "calc(var(--swui-expand-cell-width) + var(--swui-checkbox-cell-width))" : w ? "var(--swui-checkbox-cell-width)" : f ? "var(--swui-expand-cell-width)" : "0px"
|
|
2109
2115
|
},
|
|
2110
|
-
children: /* @__PURE__ */ a(
|
|
2116
|
+
children: /* @__PURE__ */ a(Bt.Provider, { value: _, children: /* @__PURE__ */ a(At.Provider, { value: ee, children: /* @__PURE__ */ a(lr.Provider, { value: s, children: /* @__PURE__ */ a(
|
|
2111
2117
|
It.Provider,
|
|
2112
2118
|
{
|
|
2113
2119
|
value: o ?? u,
|
|
2114
2120
|
children: /* @__PURE__ */ a(Tt.Provider, { value: b, children: /* @__PURE__ */ a(Dt.Provider, { value: S, children: /* @__PURE__ */ a(Et.Provider, { value: n, children: /* @__PURE__ */ a(
|
|
2115
2121
|
Rt.Provider,
|
|
2116
2122
|
{
|
|
2117
|
-
value:
|
|
2123
|
+
value: B,
|
|
2118
2124
|
children: /* @__PURE__ */ a(
|
|
2119
2125
|
Ht.Provider,
|
|
2120
2126
|
{
|
|
@@ -2123,18 +2129,18 @@ const bt = G.createContext({}), Zs = ({
|
|
|
2123
2129
|
ir.Provider,
|
|
2124
2130
|
{
|
|
2125
2131
|
value: D,
|
|
2126
|
-
children: /* @__PURE__ */
|
|
2127
|
-
|
|
2132
|
+
children: /* @__PURE__ */ v(
|
|
2133
|
+
Lt.Provider,
|
|
2128
2134
|
{
|
|
2129
2135
|
value: "columnGroupOrder" in n ? r ?? n.columnGroupOrder : r,
|
|
2130
2136
|
children: [
|
|
2131
2137
|
/* @__PURE__ */ a(Rr, {}),
|
|
2132
|
-
/* @__PURE__ */ a(Wt.Provider, { value: i, children: /* @__PURE__ */
|
|
2138
|
+
/* @__PURE__ */ a(Wt.Provider, { value: i, children: /* @__PURE__ */ v(
|
|
2133
2139
|
Nt.Provider,
|
|
2134
2140
|
{
|
|
2135
2141
|
value: c,
|
|
2136
2142
|
children: [
|
|
2137
|
-
/* @__PURE__ */
|
|
2143
|
+
/* @__PURE__ */ v("thead", { children: [
|
|
2138
2144
|
(r || "columnGroupOrder" in n) && /* @__PURE__ */ a(
|
|
2139
2145
|
wr,
|
|
2140
2146
|
{
|
|
@@ -2188,7 +2194,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
2188
2194
|
stopEditingAndMove: l
|
|
2189
2195
|
}
|
|
2190
2196
|
}) => r ? /* @__PURE__ */ a(
|
|
2191
|
-
|
|
2197
|
+
Le,
|
|
2192
2198
|
{
|
|
2193
2199
|
onValueChange: o,
|
|
2194
2200
|
value: n,
|
|
@@ -2198,7 +2204,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
2198
2204
|
selectAllOnMount: !i,
|
|
2199
2205
|
onMove: l
|
|
2200
2206
|
}
|
|
2201
|
-
) : /* @__PURE__ */ a(
|
|
2207
|
+
) : /* @__PURE__ */ a(L, { children: /* @__PURE__ */ a(U, { color: "var(--swui-primary-action-color)", size: e, children: t }) }), ia = (e, t, n) => ({
|
|
2202
2208
|
label: r,
|
|
2203
2209
|
item: o,
|
|
2204
2210
|
gridCell: {
|
|
@@ -2214,7 +2220,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
2214
2220
|
}) => {
|
|
2215
2221
|
const f = typeof e == "function" ? e(o) : e, w = t ? t(o) : void 0, h = n ? n(o) : void 0;
|
|
2216
2222
|
return p && i ? /* @__PURE__ */ a(
|
|
2217
|
-
|
|
2223
|
+
Le,
|
|
2218
2224
|
{
|
|
2219
2225
|
onValueChange: c,
|
|
2220
2226
|
value: s,
|
|
@@ -2224,7 +2230,7 @@ const bt = G.createContext({}), Zs = ({
|
|
|
2224
2230
|
selectAllOnMount: !d,
|
|
2225
2231
|
onMove: m
|
|
2226
2232
|
}
|
|
2227
|
-
) : /* @__PURE__ */ a(
|
|
2233
|
+
) : /* @__PURE__ */ a(L, { row: !0, alignItems: "center", children: /* @__PURE__ */ a(
|
|
2228
2234
|
Tn,
|
|
2229
2235
|
{
|
|
2230
2236
|
value: r,
|
|
@@ -2384,12 +2390,12 @@ const No = {
|
|
|
2384
2390
|
long: "MMMM do, y",
|
|
2385
2391
|
medium: "MMM d, y",
|
|
2386
2392
|
short: "MM/dd/yyyy"
|
|
2387
|
-
},
|
|
2393
|
+
}, Lo = {
|
|
2388
2394
|
full: "h:mm:ss a zzzz",
|
|
2389
2395
|
long: "h:mm:ss a z",
|
|
2390
2396
|
medium: "h:mm:ss a",
|
|
2391
2397
|
short: "h:mm a"
|
|
2392
|
-
},
|
|
2398
|
+
}, Bo = {
|
|
2393
2399
|
full: "{{date}} 'at' {{time}}",
|
|
2394
2400
|
long: "{{date}} 'at' {{time}}",
|
|
2395
2401
|
medium: "{{date}}, {{time}}",
|
|
@@ -2400,11 +2406,11 @@ const No = {
|
|
|
2400
2406
|
defaultWidth: "full"
|
|
2401
2407
|
}),
|
|
2402
2408
|
time: Ge({
|
|
2403
|
-
formats:
|
|
2409
|
+
formats: Lo,
|
|
2404
2410
|
defaultWidth: "full"
|
|
2405
2411
|
}),
|
|
2406
2412
|
dateTime: Ge({
|
|
2407
|
-
formats:
|
|
2413
|
+
formats: Bo,
|
|
2408
2414
|
defaultWidth: "full"
|
|
2409
2415
|
})
|
|
2410
2416
|
}, Fo = {
|
|
@@ -2765,7 +2771,7 @@ function ps(e, t) {
|
|
|
2765
2771
|
const n = q(e), r = +pe(n, t) - +fs(n, t);
|
|
2766
2772
|
return Math.round(r / jt) + 1;
|
|
2767
2773
|
}
|
|
2768
|
-
function
|
|
2774
|
+
function C(e, t) {
|
|
2769
2775
|
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
2770
2776
|
return n + r;
|
|
2771
2777
|
}
|
|
@@ -2773,16 +2779,16 @@ const Q = {
|
|
|
2773
2779
|
// Year
|
|
2774
2780
|
y(e, t) {
|
|
2775
2781
|
const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
2776
|
-
return
|
|
2782
|
+
return C(t === "yy" ? r % 100 : r, t.length);
|
|
2777
2783
|
},
|
|
2778
2784
|
// Month
|
|
2779
2785
|
M(e, t) {
|
|
2780
2786
|
const n = e.getMonth();
|
|
2781
|
-
return t === "M" ? String(n + 1) :
|
|
2787
|
+
return t === "M" ? String(n + 1) : C(n + 1, 2);
|
|
2782
2788
|
},
|
|
2783
2789
|
// Day of the month
|
|
2784
2790
|
d(e, t) {
|
|
2785
|
-
return
|
|
2791
|
+
return C(e.getDate(), t.length);
|
|
2786
2792
|
},
|
|
2787
2793
|
// AM or PM
|
|
2788
2794
|
a(e, t) {
|
|
@@ -2802,26 +2808,26 @@ const Q = {
|
|
|
2802
2808
|
},
|
|
2803
2809
|
// Hour [1-12]
|
|
2804
2810
|
h(e, t) {
|
|
2805
|
-
return
|
|
2811
|
+
return C(e.getHours() % 12 || 12, t.length);
|
|
2806
2812
|
},
|
|
2807
2813
|
// Hour [0-23]
|
|
2808
2814
|
H(e, t) {
|
|
2809
|
-
return
|
|
2815
|
+
return C(e.getHours(), t.length);
|
|
2810
2816
|
},
|
|
2811
2817
|
// Minute
|
|
2812
2818
|
m(e, t) {
|
|
2813
|
-
return
|
|
2819
|
+
return C(e.getMinutes(), t.length);
|
|
2814
2820
|
},
|
|
2815
2821
|
// Second
|
|
2816
2822
|
s(e, t) {
|
|
2817
|
-
return
|
|
2823
|
+
return C(e.getSeconds(), t.length);
|
|
2818
2824
|
},
|
|
2819
2825
|
// Fraction of second
|
|
2820
2826
|
S(e, t) {
|
|
2821
2827
|
const n = t.length, r = e.getMilliseconds(), o = Math.trunc(
|
|
2822
2828
|
r * Math.pow(10, n - 3)
|
|
2823
2829
|
);
|
|
2824
|
-
return
|
|
2830
|
+
return C(o, t.length);
|
|
2825
2831
|
}
|
|
2826
2832
|
}, ie = {
|
|
2827
2833
|
am: "am",
|
|
@@ -2861,14 +2867,14 @@ const Q = {
|
|
|
2861
2867
|
const o = $t(e, r), s = o > 0 ? o : 1 - o;
|
|
2862
2868
|
if (t === "YY") {
|
|
2863
2869
|
const i = s % 100;
|
|
2864
|
-
return
|
|
2870
|
+
return C(i, 2);
|
|
2865
2871
|
}
|
|
2866
|
-
return t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) :
|
|
2872
|
+
return t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : C(s, t.length);
|
|
2867
2873
|
},
|
|
2868
2874
|
// ISO week-numbering year
|
|
2869
2875
|
R: function(e, t) {
|
|
2870
2876
|
const n = Vt(e);
|
|
2871
|
-
return
|
|
2877
|
+
return C(n, t.length);
|
|
2872
2878
|
},
|
|
2873
2879
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
2874
2880
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -2881,7 +2887,7 @@ const Q = {
|
|
|
2881
2887
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
2882
2888
|
u: function(e, t) {
|
|
2883
2889
|
const n = e.getFullYear();
|
|
2884
|
-
return
|
|
2890
|
+
return C(n, t.length);
|
|
2885
2891
|
},
|
|
2886
2892
|
// Quarter
|
|
2887
2893
|
Q: function(e, t, n) {
|
|
@@ -2890,7 +2896,7 @@ const Q = {
|
|
|
2890
2896
|
case "Q":
|
|
2891
2897
|
return String(r);
|
|
2892
2898
|
case "QQ":
|
|
2893
|
-
return
|
|
2899
|
+
return C(r, 2);
|
|
2894
2900
|
case "Qo":
|
|
2895
2901
|
return n.ordinalNumber(r, { unit: "quarter" });
|
|
2896
2902
|
case "QQQ":
|
|
@@ -2918,7 +2924,7 @@ const Q = {
|
|
|
2918
2924
|
case "q":
|
|
2919
2925
|
return String(r);
|
|
2920
2926
|
case "qq":
|
|
2921
|
-
return
|
|
2927
|
+
return C(r, 2);
|
|
2922
2928
|
case "qo":
|
|
2923
2929
|
return n.ordinalNumber(r, { unit: "quarter" });
|
|
2924
2930
|
case "qqq":
|
|
@@ -2970,7 +2976,7 @@ const Q = {
|
|
|
2970
2976
|
case "L":
|
|
2971
2977
|
return String(r + 1);
|
|
2972
2978
|
case "LL":
|
|
2973
|
-
return
|
|
2979
|
+
return C(r + 1, 2);
|
|
2974
2980
|
case "Lo":
|
|
2975
2981
|
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
2976
2982
|
case "LLL":
|
|
@@ -2991,12 +2997,12 @@ const Q = {
|
|
|
2991
2997
|
// Local week of year
|
|
2992
2998
|
w: function(e, t, n, r) {
|
|
2993
2999
|
const o = ps(e, r);
|
|
2994
|
-
return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) :
|
|
3000
|
+
return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : C(o, t.length);
|
|
2995
3001
|
},
|
|
2996
3002
|
// ISO week of year
|
|
2997
3003
|
I: function(e, t, n) {
|
|
2998
3004
|
const r = ms(e);
|
|
2999
|
-
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) :
|
|
3005
|
+
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : C(r, t.length);
|
|
3000
3006
|
},
|
|
3001
3007
|
// Day of the month
|
|
3002
3008
|
d: function(e, t, n) {
|
|
@@ -3005,7 +3011,7 @@ const Q = {
|
|
|
3005
3011
|
// Day of year
|
|
3006
3012
|
D: function(e, t, n) {
|
|
3007
3013
|
const r = hs(e);
|
|
3008
|
-
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) :
|
|
3014
|
+
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : C(r, t.length);
|
|
3009
3015
|
},
|
|
3010
3016
|
// Day of week
|
|
3011
3017
|
E: function(e, t, n) {
|
|
@@ -3043,7 +3049,7 @@ const Q = {
|
|
|
3043
3049
|
case "e":
|
|
3044
3050
|
return String(s);
|
|
3045
3051
|
case "ee":
|
|
3046
|
-
return
|
|
3052
|
+
return C(s, 2);
|
|
3047
3053
|
case "eo":
|
|
3048
3054
|
return n.ordinalNumber(s, { unit: "day" });
|
|
3049
3055
|
case "eee":
|
|
@@ -3076,7 +3082,7 @@ const Q = {
|
|
|
3076
3082
|
case "c":
|
|
3077
3083
|
return String(s);
|
|
3078
3084
|
case "cc":
|
|
3079
|
-
return
|
|
3085
|
+
return C(s, t.length);
|
|
3080
3086
|
case "co":
|
|
3081
3087
|
return n.ordinalNumber(s, { unit: "day" });
|
|
3082
3088
|
case "ccc":
|
|
@@ -3109,7 +3115,7 @@ const Q = {
|
|
|
3109
3115
|
case "i":
|
|
3110
3116
|
return String(o);
|
|
3111
3117
|
case "ii":
|
|
3112
|
-
return
|
|
3118
|
+
return C(o, t.length);
|
|
3113
3119
|
case "io":
|
|
3114
3120
|
return n.ordinalNumber(o, { unit: "day" });
|
|
3115
3121
|
case "iii":
|
|
@@ -3232,12 +3238,12 @@ const Q = {
|
|
|
3232
3238
|
// Hour [0-11]
|
|
3233
3239
|
K: function(e, t, n) {
|
|
3234
3240
|
const r = e.getHours() % 12;
|
|
3235
|
-
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) :
|
|
3241
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : C(r, t.length);
|
|
3236
3242
|
},
|
|
3237
3243
|
// Hour [1-24]
|
|
3238
3244
|
k: function(e, t, n) {
|
|
3239
3245
|
let r = e.getHours();
|
|
3240
|
-
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) :
|
|
3246
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : C(r, t.length);
|
|
3241
3247
|
},
|
|
3242
3248
|
// Minute
|
|
3243
3249
|
m: function(e, t, n) {
|
|
@@ -3312,23 +3318,23 @@ const Q = {
|
|
|
3312
3318
|
// Seconds timestamp
|
|
3313
3319
|
t: function(e, t, n) {
|
|
3314
3320
|
const r = Math.trunc(e.getTime() / 1e3);
|
|
3315
|
-
return
|
|
3321
|
+
return C(r, t.length);
|
|
3316
3322
|
},
|
|
3317
3323
|
// Milliseconds timestamp
|
|
3318
3324
|
T: function(e, t, n) {
|
|
3319
3325
|
const r = e.getTime();
|
|
3320
|
-
return
|
|
3326
|
+
return C(r, t.length);
|
|
3321
3327
|
}
|
|
3322
3328
|
};
|
|
3323
3329
|
function ct(e, t = "") {
|
|
3324
3330
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60), s = r % 60;
|
|
3325
|
-
return s === 0 ? n + String(o) : n + String(o) + t +
|
|
3331
|
+
return s === 0 ? n + String(o) : n + String(o) + t + C(s, 2);
|
|
3326
3332
|
}
|
|
3327
3333
|
function lt(e, t) {
|
|
3328
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") +
|
|
3334
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + C(Math.abs(e) / 60, 2) : re(e, t);
|
|
3329
3335
|
}
|
|
3330
3336
|
function re(e, t = "") {
|
|
3331
|
-
const n = e > 0 ? "-" : "+", r = Math.abs(e), o =
|
|
3337
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = C(Math.trunc(r / 60), 2), s = C(r % 60, 2);
|
|
3332
3338
|
return n + o + t + s;
|
|
3333
3339
|
}
|
|
3334
3340
|
const ut = (e, t) => {
|
|
@@ -3621,7 +3627,7 @@ const Rs = () => [
|
|
|
3621
3627
|
}),
|
|
3622
3628
|
active: ae((e) => e.active, {
|
|
3623
3629
|
disableGridCellFocus: !0,
|
|
3624
|
-
renderCell: ({ item: e, gridCell: { requiredProps: t } }) => /* @__PURE__ */ a(
|
|
3630
|
+
renderCell: ({ item: e, gridCell: { requiredProps: t } }) => /* @__PURE__ */ a(L, { children: /* @__PURE__ */ a(Be, { value: e.active, ...t }) }),
|
|
3625
3631
|
infoIconTooltipText: "Active means out on the sea."
|
|
3626
3632
|
}),
|
|
3627
3633
|
name: ae((e) => e.name, {
|
|
@@ -3717,7 +3723,7 @@ export {
|
|
|
3717
3723
|
jr as formatValueLabel,
|
|
3718
3724
|
Ae as hasIndicatorContent,
|
|
3719
3725
|
la as mockedItems,
|
|
3720
|
-
|
|
3726
|
+
Br as multitypeComparator,
|
|
3721
3727
|
dt as setListItemFields,
|
|
3722
3728
|
kt as smallTableRowWidth,
|
|
3723
3729
|
ca as standardTableConfigForStories,
|
|
@@ -3741,7 +3747,7 @@ export {
|
|
|
3741
3747
|
dr as useLastColumnConfig,
|
|
3742
3748
|
ua as useListState,
|
|
3743
3749
|
Dr as useLocalStateTableContext,
|
|
3744
|
-
|
|
3750
|
+
Bn as useRevertableValue,
|
|
3745
3751
|
zr as useRowCheckbox,
|
|
3746
3752
|
ge as useStandardTableActions,
|
|
3747
3753
|
I as useStandardTableConfig,
|