@stenajs-webui/grid 21.33.0 → 21.35.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.es.js +506 -497
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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_cqns6_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-column-z-index: 20;--swui-sticky-head-z-index: 22;--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_cqns6_1 td{border-top:1px solid var(--lhds-color-ui-300);padding:0}._standardTable_cqns6_1 th{padding:0}._standardTable_cqns6_1._relaxed_cqns6_38{--current-row-height: 48px}._standardTable_cqns6_1._condensed_cqns6_42{--current-row-height: 32px}._standardTable_cqns6_1._compact_cqns6_46{--current-row-height: 24px}._standardTableCell_1xzcm_1{outline:none}.
|
|
2
|
-
import { jsx as
|
|
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_cqns6_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-column-z-index: 20;--swui-sticky-head-z-index: 22;--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_cqns6_1 td{border-top:1px solid var(--lhds-color-ui-300);padding:0}._standardTable_cqns6_1 th{padding:0}._standardTable_cqns6_1._relaxed_cqns6_38{--current-row-height: 48px}._standardTable_cqns6_1._condensed_cqns6_42{--current-row-height: 32px}._standardTable_cqns6_1._compact_cqns6_46{--current-row-height: 24px}._standardTableCell_1xzcm_1{outline:none}._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(d){console.error("vite-plugin-css-injected-by-js",d)}})();
|
|
2
|
+
import { jsx as s, Fragment as E, jsxs as C } from "react/jsx-runtime";
|
|
3
3
|
import * as M from "react";
|
|
4
4
|
import { useMemo as b, useRef as de, useState as Se, useCallback as S, useEffect as ft, useContext as $, createContext as A, useReducer as Zt, useId as en } from "react";
|
|
5
5
|
import { InputSpinner as We, Icon as J, stenaExclamationTriangle as Oe, stenaArrowRight as mt, stenaInfoCircle as tn, FlatButton as Ne, stenaDotsVertical as nn, stenaAngleDown as wt, stenaAngleRight as gt, 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 be, Popover as on } from "@stenajs-webui/tooltip";
|
|
8
|
-
import { Text as Z, Indent as W, Space as G, Row as T, Box as le, exhaustSwitchCaseElseThrow as
|
|
8
|
+
import { Text as Z, Indent as W, Space as G, Row as T, Box as le, exhaustSwitchCaseElseThrow as an, Heading as pt, booleanOrNumberToNumber as sn, useArraySet as yt, useOnScreen as cn, Spacing as Me } from "@stenajs-webui/core";
|
|
9
9
|
import { faSortAlphaDown as un } from "@fortawesome/free-solid-svg-icons/faSortAlphaDown";
|
|
10
10
|
import { faSortAlphaUp as dn } from "@fortawesome/free-solid-svg-icons/faSortAlphaUp";
|
|
11
11
|
import { faSortAmountDownAlt as ln } from "@fortawesome/free-solid-svg-icons/faSortAmountDownAlt";
|
|
@@ -20,29 +20,29 @@ import { combineReducers as xn } from "redux";
|
|
|
20
20
|
import { LoadingScreen as kn, ErrorScreen as vn } from "@stenajs-webui/panels";
|
|
21
21
|
import { compact as Sn, upperFirst as Pn, lowerCase as On } from "lodash-es";
|
|
22
22
|
import In from "@emotion/styled";
|
|
23
|
-
const Ct = M.createContext({}),
|
|
23
|
+
const Ct = M.createContext({}), Ua = ({
|
|
24
24
|
children: e,
|
|
25
25
|
numCols: t,
|
|
26
26
|
numRows: n,
|
|
27
27
|
tableId: r,
|
|
28
28
|
wrap: o
|
|
29
29
|
}) => {
|
|
30
|
-
const
|
|
30
|
+
const a = b(
|
|
31
31
|
() => ({ numCols: t, numRows: n, tableId: r, wrap: o }),
|
|
32
32
|
[t, n, r, o]
|
|
33
33
|
);
|
|
34
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ s(Ct.Provider, { value: a, children: e });
|
|
35
35
|
}, Le = (e) => {
|
|
36
|
-
const { loading: t, creating: n, deleting: r, updating: o, hasError:
|
|
37
|
-
return !!(t || n || r || o ||
|
|
36
|
+
const { loading: t, creating: n, deleting: r, updating: o, hasError: a } = e;
|
|
37
|
+
return !!(t || n || r || o || a);
|
|
38
38
|
}, xt = ({ crudStatus: e }) => {
|
|
39
39
|
if (!e || !Le(e))
|
|
40
40
|
return null;
|
|
41
|
-
const { errorMessage: t, hasError: n, loading: r, creating: o, deleting:
|
|
42
|
-
if (r || o ||
|
|
43
|
-
return /* @__PURE__ */
|
|
41
|
+
const { errorMessage: t, hasError: n, loading: r, creating: o, deleting: a, updating: c } = e;
|
|
42
|
+
if (r || o || a || c)
|
|
43
|
+
return /* @__PURE__ */ s(We, { color: V("--lhds-color-ui-500") });
|
|
44
44
|
if (n) {
|
|
45
|
-
const i = /* @__PURE__ */
|
|
45
|
+
const i = /* @__PURE__ */ s(
|
|
46
46
|
J,
|
|
47
47
|
{
|
|
48
48
|
icon: Oe,
|
|
@@ -50,7 +50,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
50
50
|
size: 14
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ s(E, { children: t ? /* @__PURE__ */ s(be, { label: t, children: i }) : i });
|
|
54
54
|
}
|
|
55
55
|
return null;
|
|
56
56
|
}, Tn = ({
|
|
@@ -60,9 +60,9 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
60
60
|
modifiedField: r,
|
|
61
61
|
crudStatus: o
|
|
62
62
|
}) => {
|
|
63
|
-
const
|
|
63
|
+
const a = t && (r == null ? void 0 : r.modified) && (r == null ? void 0 : r.newValue) === "", c = o && Le(o), i = a || c;
|
|
64
64
|
return /* @__PURE__ */ C(E, { children: [
|
|
65
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ s(
|
|
66
66
|
Z,
|
|
67
67
|
{
|
|
68
68
|
color: e ? "var(--swui-primary-action-color)" : void 0,
|
|
@@ -71,18 +71,18 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
71
71
|
}
|
|
72
72
|
),
|
|
73
73
|
(r == null ? void 0 : r.newValue) !== void 0 && /* @__PURE__ */ C(E, { children: [
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ s(W, { children: /* @__PURE__ */ s(J, { icon: mt, size: 12 }) }),
|
|
75
|
+
/* @__PURE__ */ s(Z, { color: "var(--swui-primary-action-color)", variant: "bold", children: r.newValue })
|
|
76
76
|
] }),
|
|
77
|
-
i && /* @__PURE__ */
|
|
78
|
-
|
|
77
|
+
i && /* @__PURE__ */ s(G, {}),
|
|
78
|
+
a ? /* @__PURE__ */ s(be, { label: t, children: /* @__PURE__ */ s(
|
|
79
79
|
J,
|
|
80
80
|
{
|
|
81
81
|
icon: Oe,
|
|
82
82
|
color: V("--lhds-color-orange-600"),
|
|
83
83
|
size: 14
|
|
84
84
|
}
|
|
85
|
-
) }) : /* @__PURE__ */
|
|
85
|
+
) }) : /* @__PURE__ */ s(xt, { crudStatus: o })
|
|
86
86
|
] });
|
|
87
87
|
}, Dn = ({
|
|
88
88
|
alignItems: e = "center",
|
|
@@ -90,7 +90,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
90
90
|
overflow: n = "hidden",
|
|
91
91
|
indent: r = 1,
|
|
92
92
|
...o
|
|
93
|
-
}) => /* @__PURE__ */
|
|
93
|
+
}) => /* @__PURE__ */ s(
|
|
94
94
|
T,
|
|
95
95
|
{
|
|
96
96
|
height: "100%",
|
|
@@ -100,7 +100,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
100
100
|
indent: r,
|
|
101
101
|
...o
|
|
102
102
|
}
|
|
103
|
-
), En = "var(--lhds-color-ui-300)", Mn = "var(--lhds-color-blue-500)", kt = "var(--lhds-color-blue-50)", Rn = "var(--lhds-color-blue-100)", pe = `1px solid ${En}`, Gn = "1px solid transparent", Fe = "var(--swui-expand-highlight-border-width) solid transparent", vt = `var(--swui-expand-highlight-border-width) solid ${Mn}`, He = "40px", Ye = "40px", St = "40px",
|
|
103
|
+
), En = "var(--lhds-color-ui-300)", Mn = "var(--lhds-color-blue-500)", kt = "var(--lhds-color-blue-50)", Rn = "var(--lhds-color-blue-100)", pe = `1px solid ${En}`, Gn = "1px solid transparent", Fe = "var(--swui-expand-highlight-border-width) solid transparent", vt = `var(--swui-expand-highlight-border-width) solid ${Mn}`, He = "40px", Ye = "40px", St = "40px", Ja = (e) => /* @__PURE__ */ s(
|
|
104
104
|
Dn,
|
|
105
105
|
{
|
|
106
106
|
width: St,
|
|
@@ -110,7 +110,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
110
110
|
), Ze = ({
|
|
111
111
|
iconVariant: e = "amount",
|
|
112
112
|
direction: t
|
|
113
|
-
}) => /* @__PURE__ */
|
|
113
|
+
}) => /* @__PURE__ */ s(le, { width: "14px", children: /* @__PURE__ */ s(
|
|
114
114
|
J,
|
|
115
115
|
{
|
|
116
116
|
size: 14,
|
|
@@ -126,7 +126,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
126
126
|
case "amount":
|
|
127
127
|
return e === "up" ? hn : ln;
|
|
128
128
|
default:
|
|
129
|
-
return
|
|
129
|
+
return an(t);
|
|
130
130
|
}
|
|
131
131
|
}, ze = M.memo(
|
|
132
132
|
({
|
|
@@ -135,7 +135,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
135
135
|
onClick: n,
|
|
136
136
|
children: r,
|
|
137
137
|
selected: o,
|
|
138
|
-
popoverContent:
|
|
138
|
+
popoverContent: a,
|
|
139
139
|
loading: c,
|
|
140
140
|
infoIconTooltipAppendTo: i,
|
|
141
141
|
infoIconTooltipText: u,
|
|
@@ -160,49 +160,49 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
160
160
|
children: [
|
|
161
161
|
/* @__PURE__ */ C(T, { alignItems: "center", indent: !0, children: [
|
|
162
162
|
!t && f && /* @__PURE__ */ C(E, { children: [
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ s(G, {}),
|
|
164
|
+
/* @__PURE__ */ s(le, { width: "14px" }),
|
|
165
|
+
/* @__PURE__ */ s(G, { num: 0.5 })
|
|
166
166
|
] }),
|
|
167
167
|
(r || e) && /* @__PURE__ */ C(T, { onClick: n, style: l, alignItems: "center", children: [
|
|
168
168
|
r && /* @__PURE__ */ C(E, { children: [
|
|
169
169
|
r,
|
|
170
|
-
!p && /* @__PURE__ */
|
|
170
|
+
!p && /* @__PURE__ */ s(G, { num: 0.5 })
|
|
171
171
|
] }),
|
|
172
172
|
t && f && /* @__PURE__ */ C(E, { children: [
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ s(G, {}),
|
|
174
|
+
/* @__PURE__ */ s(
|
|
175
175
|
Ze,
|
|
176
176
|
{
|
|
177
177
|
direction: t,
|
|
178
178
|
iconVariant: g
|
|
179
179
|
}
|
|
180
180
|
),
|
|
181
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ s(G, { num: 0.5 })
|
|
182
182
|
] }),
|
|
183
|
-
e && /* @__PURE__ */
|
|
183
|
+
e && /* @__PURE__ */ s(pt, { variant: "h6", style: { textAlign: "left" }, children: e }),
|
|
184
184
|
t && !f && /* @__PURE__ */ C(E, { children: [
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ s(G, { num: 0.5 }),
|
|
186
|
+
/* @__PURE__ */ s(
|
|
187
187
|
Ze,
|
|
188
188
|
{
|
|
189
189
|
direction: t,
|
|
190
190
|
iconVariant: g
|
|
191
191
|
}
|
|
192
192
|
),
|
|
193
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ s(G, {})
|
|
194
194
|
] })
|
|
195
195
|
] }),
|
|
196
196
|
u && /* @__PURE__ */ C(E, { children: [
|
|
197
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ s(G, {}),
|
|
198
198
|
/* @__PURE__ */ C(T, { onClick: (y) => y.stopPropagation(), children: [
|
|
199
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ s(
|
|
200
200
|
be,
|
|
201
201
|
{
|
|
202
202
|
appendTo: i,
|
|
203
203
|
label: u,
|
|
204
204
|
zIndex: h,
|
|
205
|
-
children: /* @__PURE__ */
|
|
205
|
+
children: /* @__PURE__ */ s(
|
|
206
206
|
J,
|
|
207
207
|
{
|
|
208
208
|
icon: tn,
|
|
@@ -212,14 +212,14 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
212
212
|
)
|
|
213
213
|
}
|
|
214
214
|
),
|
|
215
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ s(G, {})
|
|
216
216
|
] })
|
|
217
217
|
] })
|
|
218
218
|
] }),
|
|
219
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ s(T, { children: c ? /* @__PURE__ */ s(We, {}) : a ? /* @__PURE__ */ s(
|
|
220
220
|
on,
|
|
221
221
|
{
|
|
222
|
-
renderTrigger: (y) => /* @__PURE__ */
|
|
222
|
+
renderTrigger: (y) => /* @__PURE__ */ s(
|
|
223
223
|
Ne,
|
|
224
224
|
{
|
|
225
225
|
leftIcon: nn,
|
|
@@ -229,41 +229,41 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
229
229
|
),
|
|
230
230
|
trigger: "click",
|
|
231
231
|
disablePadding: !0,
|
|
232
|
-
children:
|
|
232
|
+
children: a
|
|
233
233
|
}
|
|
234
234
|
) : null }),
|
|
235
235
|
!t && !f && /* @__PURE__ */ C(E, { children: [
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ s(G, {}),
|
|
237
|
+
/* @__PURE__ */ s(le, { width: "14px" }),
|
|
238
|
+
/* @__PURE__ */ s(G, { num: 0.5 })
|
|
239
239
|
] })
|
|
240
240
|
]
|
|
241
241
|
}
|
|
242
242
|
);
|
|
243
243
|
}
|
|
244
|
-
),
|
|
244
|
+
), Za = (e) => /* @__PURE__ */ s(
|
|
245
245
|
ze,
|
|
246
246
|
{
|
|
247
247
|
width: St,
|
|
248
248
|
justifyContent: "center",
|
|
249
249
|
...e
|
|
250
250
|
}
|
|
251
|
-
),
|
|
251
|
+
), es = ({
|
|
252
252
|
label: e,
|
|
253
253
|
flex: t,
|
|
254
254
|
width: n,
|
|
255
255
|
indent: r = 1,
|
|
256
256
|
height: o = Ye
|
|
257
|
-
}) => /* @__PURE__ */
|
|
258
|
-
({ style: e, height: t = Ye, ...n }) => /* @__PURE__ */
|
|
257
|
+
}) => /* @__PURE__ */ s(ze, { width: n, flex: t, height: o, children: /* @__PURE__ */ s(le, { indent: r, spacing: !0, children: /* @__PURE__ */ s(Z, { variant: "bold", children: e }) }) }), ts = M.memo(
|
|
258
|
+
({ style: e, height: t = Ye, ...n }) => /* @__PURE__ */ s(T, { style: e, height: t, ...n })
|
|
259
259
|
), Nn = "_tableRow_1cphw_1", An = {
|
|
260
260
|
tableRow: Nn
|
|
261
|
-
},
|
|
261
|
+
}, ns = ({
|
|
262
262
|
hideBorderTop: e,
|
|
263
263
|
height: t = Ye,
|
|
264
264
|
className: n,
|
|
265
265
|
...r
|
|
266
|
-
}) => /* @__PURE__ */
|
|
266
|
+
}) => /* @__PURE__ */ s(
|
|
267
267
|
T,
|
|
268
268
|
{
|
|
269
269
|
borderTop: e ? Gn : pe,
|
|
@@ -272,29 +272,29 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
272
272
|
...r
|
|
273
273
|
}
|
|
274
274
|
), Bn = (e) => {
|
|
275
|
-
const [t, n] = Se(e), r = de(e), o = de(e),
|
|
275
|
+
const [t, n] = Se(e), r = de(e), o = de(e), a = S(
|
|
276
276
|
(d) => {
|
|
277
277
|
n(d), o.current = d;
|
|
278
278
|
},
|
|
279
279
|
[n, o]
|
|
280
280
|
);
|
|
281
281
|
ft(() => {
|
|
282
|
-
|
|
283
|
-
}, [
|
|
282
|
+
a(e);
|
|
283
|
+
}, [a, e]);
|
|
284
284
|
const c = S(() => {
|
|
285
|
-
r &&
|
|
286
|
-
}, [
|
|
285
|
+
r && a(r.current);
|
|
286
|
+
}, [a, r]), i = S(
|
|
287
287
|
(d) => {
|
|
288
|
-
r.current = t, d &&
|
|
288
|
+
r.current = t, d && a(d);
|
|
289
289
|
},
|
|
290
|
-
[t,
|
|
290
|
+
[t, a]
|
|
291
291
|
), u = S(
|
|
292
292
|
(d) => r.current = d,
|
|
293
293
|
[r]
|
|
294
294
|
), h = S(() => o.current, [o]);
|
|
295
295
|
return {
|
|
296
296
|
value: t,
|
|
297
|
-
setValue:
|
|
297
|
+
setValue: a,
|
|
298
298
|
setRevertValue: u,
|
|
299
299
|
revert: c,
|
|
300
300
|
commit: i,
|
|
@@ -317,7 +317,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
317
317
|
allowedInputType: n = "all",
|
|
318
318
|
onChange: r,
|
|
319
319
|
onStartEditing: o,
|
|
320
|
-
onStopEditing:
|
|
320
|
+
onStopEditing: a,
|
|
321
321
|
transformEnteredValue: c = Fn
|
|
322
322
|
}) => {
|
|
323
323
|
const [i, u] = Se(!1), [h, d] = Se(
|
|
@@ -328,10 +328,10 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
328
328
|
},
|
|
329
329
|
[t, o, l, w, e]
|
|
330
330
|
), y = S(() => {
|
|
331
|
-
t && (u(!1),
|
|
332
|
-
}, [t, r,
|
|
333
|
-
t && (u(!1),
|
|
334
|
-
}, [t,
|
|
331
|
+
t && (u(!1), a && a(), r && r(g()));
|
|
332
|
+
}, [t, r, a, g, u]), v = S(() => {
|
|
333
|
+
t && (u(!1), a && a(), m());
|
|
334
|
+
}, [t, a, m, u]);
|
|
335
335
|
return {
|
|
336
336
|
onKeyDown: b(
|
|
337
337
|
() => Vn(
|
|
@@ -361,20 +361,20 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
361
361
|
stopEditingAndRevert: v,
|
|
362
362
|
onDoubleClick: p
|
|
363
363
|
};
|
|
364
|
-
}, Yn = (e) => e === "all" || e === "numeric" || e === "alphanumeric", zn = (e) => e === "all" || e === "alphanumeric" || e === "letters", qn = (e) => !!e.match(/^[-+*<>]$/), _n = (e) => !!e.match(/^[a-zA-Z0-9]$/), jn = (e) => !isNaN(parseInt(e, 10)), Vn = (e, t, n, r, o,
|
|
364
|
+
}, Yn = (e) => e === "all" || e === "numeric" || e === "alphanumeric", zn = (e) => e === "all" || e === "alphanumeric" || e === "letters", qn = (e) => !!e.match(/^[-+*<>]$/), _n = (e) => !!e.match(/^[a-zA-Z0-9]$/), jn = (e) => !isNaN(parseInt(e, 10)), Vn = (e, t, n, r, o, a, c) => (i) => {
|
|
365
365
|
if (!(i.ctrlKey || i.metaKey || i.shiftKey)) {
|
|
366
366
|
if (i.key === "Enter" && t)
|
|
367
367
|
r(void 0), n(), c.commit(), i.preventDefault(), i.stopPropagation();
|
|
368
368
|
else if (t) {
|
|
369
369
|
const u = Ln(i);
|
|
370
|
-
(jn(i.key) && Yn(o) || _n(i.key) && zn(o) || qn(i.key)) && (n(u), r(u), c.commit(), c.setValue(
|
|
370
|
+
(jn(i.key) && Yn(o) || _n(i.key) && zn(o) || qn(i.key)) && (n(u), r(u), c.commit(), c.setValue(a(u.key)), i.preventDefault(), i.stopPropagation());
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
}, $n = (e, t, n, r) => {
|
|
374
|
-
let o = e,
|
|
375
|
-
return t > r && (
|
|
374
|
+
let o = e, a = t;
|
|
375
|
+
return t > r && (a = 0), t < 0 && (a = r), e > n && (o = 0), e < 0 && (o = n), {
|
|
376
376
|
realX: o,
|
|
377
|
-
realY:
|
|
377
|
+
realY: a
|
|
378
378
|
};
|
|
379
379
|
}, et = (e, t, n) => Math.max(Math.min(e, n), t), Kn = (e, t, n) => ({
|
|
380
380
|
rowIndex: et(e.rowIndex, 0, t),
|
|
@@ -385,9 +385,9 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
385
385
|
rowIndex: r.realY,
|
|
386
386
|
colIndex: r.realX
|
|
387
387
|
};
|
|
388
|
-
}, Xn = (e, t, n, r, o,
|
|
388
|
+
}, Xn = (e, t, n, r, o, a = "clamped") => {
|
|
389
389
|
const c = Un(e, t, o);
|
|
390
|
-
return
|
|
390
|
+
return a === "clamped" ? Kn(c, n - 1, r - 1) : a === "wrapped" ? Qn(c, n - 1, r - 1) : c;
|
|
391
391
|
}, Un = (e, t, n) => n === "up" ? {
|
|
392
392
|
rowIndex: e - 1,
|
|
393
393
|
colIndex: t
|
|
@@ -426,13 +426,13 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
426
426
|
colIndex: n,
|
|
427
427
|
numRows: r,
|
|
428
428
|
numCols: o,
|
|
429
|
-
tableId:
|
|
429
|
+
tableId: a,
|
|
430
430
|
edgeMode: c,
|
|
431
431
|
onCellMove: i,
|
|
432
432
|
onCellNavigation: u
|
|
433
433
|
} = Pt(e), h = b(
|
|
434
434
|
() => tr(
|
|
435
|
-
|
|
435
|
+
a,
|
|
436
436
|
t,
|
|
437
437
|
n,
|
|
438
438
|
r,
|
|
@@ -442,7 +442,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
442
442
|
u
|
|
443
443
|
),
|
|
444
444
|
[
|
|
445
|
-
|
|
445
|
+
a,
|
|
446
446
|
t,
|
|
447
447
|
n,
|
|
448
448
|
r,
|
|
@@ -455,8 +455,8 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
455
455
|
() => nr(h),
|
|
456
456
|
[h]
|
|
457
457
|
), f = b(
|
|
458
|
-
() => Ot(
|
|
459
|
-
[
|
|
458
|
+
() => Ot(a, t, n),
|
|
459
|
+
[a, t, n]
|
|
460
460
|
), g = b(
|
|
461
461
|
() => ({
|
|
462
462
|
tabIndex: 0,
|
|
@@ -470,14 +470,14 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
470
470
|
moveHandler: h,
|
|
471
471
|
requiredProps: g
|
|
472
472
|
};
|
|
473
|
-
}, tr = (e, t, n, r, o,
|
|
473
|
+
}, tr = (e, t, n, r, o, a, c, i) => (u) => {
|
|
474
474
|
const h = Xn(
|
|
475
475
|
t,
|
|
476
476
|
n,
|
|
477
477
|
r,
|
|
478
478
|
o,
|
|
479
479
|
u,
|
|
480
|
-
|
|
480
|
+
a
|
|
481
481
|
), d = n !== h.colIndex, f = t !== h.rowIndex;
|
|
482
482
|
(d || f) && (c && c({
|
|
483
483
|
direction: u,
|
|
@@ -503,19 +503,19 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
503
503
|
);
|
|
504
504
|
n && n.focus();
|
|
505
505
|
}, Ie = (e, t) => {
|
|
506
|
-
const { tableId: n } = Pt(t), r = er(t), o = Hn(e, t),
|
|
506
|
+
const { tableId: n } = Pt(t), r = er(t), o = Hn(e, t), a = b(
|
|
507
507
|
() => ({
|
|
508
508
|
rowIndex: t.rowIndex,
|
|
509
509
|
colIndex: t.colIndex
|
|
510
510
|
}),
|
|
511
511
|
[t.rowIndex, t.colIndex]
|
|
512
512
|
), c = S(() => {
|
|
513
|
-
o.startEditing(), r.focusOnCell(n,
|
|
514
|
-
}, [o, r, n,
|
|
515
|
-
o.stopEditing(), r.focusOnCell(n,
|
|
516
|
-
}, [o, r, n,
|
|
517
|
-
o.stopEditingAndRevert(), r.focusOnCell(n,
|
|
518
|
-
}, [o, r, n,
|
|
513
|
+
o.startEditing(), r.focusOnCell(n, a);
|
|
514
|
+
}, [o, r, n, a]), i = S(() => {
|
|
515
|
+
o.stopEditing(), r.focusOnCell(n, a);
|
|
516
|
+
}, [o, r, n, a]), u = S(() => {
|
|
517
|
+
o.stopEditingAndRevert(), r.focusOnCell(n, a);
|
|
518
|
+
}, [o, r, n, a]), h = S(
|
|
519
519
|
(m) => {
|
|
520
520
|
o.stopEditing(), r.moveHandler(m);
|
|
521
521
|
},
|
|
@@ -551,12 +551,12 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
551
551
|
stopEditingAndRevert: u,
|
|
552
552
|
stopEditingAndMove: h
|
|
553
553
|
};
|
|
554
|
-
},
|
|
554
|
+
}, rs = function({
|
|
555
555
|
allowedInputType: t,
|
|
556
556
|
value: n = "",
|
|
557
557
|
entityId: r,
|
|
558
558
|
isEditable: o,
|
|
559
|
-
rowIndent:
|
|
559
|
+
rowIndent: a,
|
|
560
560
|
crudStatusRedux: c,
|
|
561
561
|
modifiedFieldsRedux: i,
|
|
562
562
|
colIndex: u,
|
|
@@ -621,8 +621,8 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
621
621
|
hoverBackground: "var(--ui7)",
|
|
622
622
|
alignItems: "center",
|
|
623
623
|
children: [
|
|
624
|
-
|
|
625
|
-
/* @__PURE__ */
|
|
624
|
+
a && /* @__PURE__ */ s(W, { num: a }),
|
|
625
|
+
/* @__PURE__ */ s(
|
|
626
626
|
T,
|
|
627
627
|
{
|
|
628
628
|
width: "100%",
|
|
@@ -635,7 +635,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
635
635
|
hoverBorder: O ? void 0 : "var(--ui5) solid 1px;",
|
|
636
636
|
onKeyDown: q,
|
|
637
637
|
...X,
|
|
638
|
-
children: /* @__PURE__ */
|
|
638
|
+
children: /* @__PURE__ */ s(W, { row: !0, alignItems: "center", children: O ? /* @__PURE__ */ s(
|
|
639
639
|
Ae,
|
|
640
640
|
{
|
|
641
641
|
onValueChange: P,
|
|
@@ -647,7 +647,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
647
647
|
onMove: L
|
|
648
648
|
}
|
|
649
649
|
) : /* @__PURE__ */ C(E, { children: [
|
|
650
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ s(
|
|
651
651
|
Z,
|
|
652
652
|
{
|
|
653
653
|
color: o ? "var(--primary-action-color)" : void 0,
|
|
@@ -656,8 +656,8 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
656
656
|
}
|
|
657
657
|
),
|
|
658
658
|
(p == null ? void 0 : p.newValue) !== void 0 && /* @__PURE__ */ C(E, { children: [
|
|
659
|
-
/* @__PURE__ */
|
|
660
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ s(W, { children: /* @__PURE__ */ s(J, { icon: mt, size: 12 }) }),
|
|
660
|
+
/* @__PURE__ */ s(
|
|
661
661
|
Z,
|
|
662
662
|
{
|
|
663
663
|
color: "var(--primary-action-color)",
|
|
@@ -666,19 +666,19 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
666
666
|
}
|
|
667
667
|
)
|
|
668
668
|
] }),
|
|
669
|
-
y && Le(y) && /* @__PURE__ */
|
|
670
|
-
g && (p != null && p.modified) && (p == null ? void 0 : p.newValue) === "" ? /* @__PURE__ */
|
|
669
|
+
y && Le(y) && /* @__PURE__ */ s(G, { num: 2 }),
|
|
670
|
+
g && (p != null && p.modified) && (p == null ? void 0 : p.newValue) === "" ? /* @__PURE__ */ s(be, { label: g, children: /* @__PURE__ */ s(
|
|
671
671
|
J,
|
|
672
672
|
{
|
|
673
673
|
icon: Oe,
|
|
674
674
|
color: "var(--ui-alert1)",
|
|
675
675
|
size: 14
|
|
676
676
|
}
|
|
677
|
-
) }) : /* @__PURE__ */
|
|
677
|
+
) }) : /* @__PURE__ */ s(xt, { crudStatus: y })
|
|
678
678
|
] }) })
|
|
679
679
|
}
|
|
680
680
|
),
|
|
681
|
-
|
|
681
|
+
a && /* @__PURE__ */ s(W, { num: a })
|
|
682
682
|
]
|
|
683
683
|
}
|
|
684
684
|
);
|
|
@@ -704,7 +704,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
704
704
|
), o = ve(
|
|
705
705
|
j(e, "expandedRows"),
|
|
706
706
|
Je(t == null ? void 0 : t.expandedRows)
|
|
707
|
-
),
|
|
707
|
+
), a = ve(
|
|
708
708
|
j(e, "fields"),
|
|
709
709
|
Cn((t == null ? void 0 : t.fields) ?? {})
|
|
710
710
|
);
|
|
@@ -712,9 +712,9 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
712
712
|
sortOrder: n,
|
|
713
713
|
selectedIds: r,
|
|
714
714
|
expandedRows: o,
|
|
715
|
-
fields:
|
|
715
|
+
fields: a
|
|
716
716
|
});
|
|
717
|
-
}, qe = () => $(Tt), I = () => $(Mt),
|
|
717
|
+
}, qe = () => $(Tt), I = () => $(Mt), ae = () => $(Dt), Ce = () => $(Et), Gt = A([]), ee = () => $(
|
|
718
718
|
Gt
|
|
719
719
|
), Wt = () => {
|
|
720
720
|
const e = I(), t = ee();
|
|
@@ -723,7 +723,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
723
723
|
() => t.map((r) => r.groupConfig.columnOrder.length).reduce((r, o) => r + o, 0),
|
|
724
724
|
[t]
|
|
725
725
|
);
|
|
726
|
-
}, Nt = A(void 0),
|
|
726
|
+
}, Nt = A(void 0), ar = () => $(Nt), At = A(void 0), sr = () => $(At), cr = A(void 0), ir = A(!1), ur = A("standard"), Bt = A({}), _e = () => $(Bt), Lt = A(0), je = () => $(Lt), Ft = (e, t, n) => e ? Sn(
|
|
727
727
|
(t == null ? void 0 : t.map((r) => {
|
|
728
728
|
const o = e == null ? void 0 : e[r];
|
|
729
729
|
return {
|
|
@@ -769,11 +769,11 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
769
769
|
groupConfig: n,
|
|
770
770
|
borderFromGroup: r,
|
|
771
771
|
colSpan: o,
|
|
772
|
-
isFirstGroup:
|
|
772
|
+
isFirstGroup: a,
|
|
773
773
|
isLastGroup: c
|
|
774
774
|
}) {
|
|
775
|
-
const { label: i, render: u, contentLeft: h, contentRight: d, loading: f, error: g } = n, { width: m, minWidth: w, zIndex: l, borderLeft: p } = xe(t), y = I(), { stickyHeader: v, headerRowOffsetTop: O } = y, k = "columnGroupOrder" in y ? y.stickyColumnGroups : void 0, R = fr(r, p), P =
|
|
776
|
-
return /* @__PURE__ */
|
|
775
|
+
const { label: i, render: u, contentLeft: h, contentRight: d, loading: f, error: g } = n, { width: m, minWidth: w, zIndex: l, borderLeft: p } = xe(t), y = I(), { stickyHeader: v, headerRowOffsetTop: O } = y, k = "columnGroupOrder" in y ? y.stickyColumnGroups : void 0, R = fr(r, p), P = a && (k === "first" || k === "both"), B = c && (k === "last" || k === "both"), L = P || B || v, Y = P || B;
|
|
776
|
+
return /* @__PURE__ */ s(
|
|
777
777
|
"th",
|
|
778
778
|
{
|
|
779
779
|
colSpan: o,
|
|
@@ -790,19 +790,19 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
790
790
|
zIndex: v && Y ? "var(--swui-sticky-column-group-label-z-index)" : Y ? "var(--swui-sticky-group-group-z-index)" : v ? l ?? "var(--swui-sticky-header-column-group-z-index)" : l ?? 1,
|
|
791
791
|
boxShadow: P ? "var(--swui-sticky-column-shadow-right)" : B ? "var(--swui-sticky-column-shadow-left)" : void 0
|
|
792
792
|
},
|
|
793
|
-
children: /* @__PURE__ */
|
|
793
|
+
children: /* @__PURE__ */ s(T, { alignItems: "center", children: /* @__PURE__ */ C(E, { children: [
|
|
794
794
|
h && /* @__PURE__ */ C(E, { children: [
|
|
795
|
-
/* @__PURE__ */
|
|
795
|
+
/* @__PURE__ */ s(G, {}),
|
|
796
796
|
h,
|
|
797
|
-
/* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ s(G, { num: 0.5 })
|
|
798
798
|
] }),
|
|
799
|
-
u ? u(n) : /* @__PURE__ */
|
|
799
|
+
u ? u(n) : /* @__PURE__ */ s(W, { children: /* @__PURE__ */ s(pt, { variant: "h5", whiteSpace: "nowrap", children: i }) }),
|
|
800
800
|
d && /* @__PURE__ */ C(E, { children: [
|
|
801
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ s(G, { num: 0.5 }),
|
|
802
802
|
d
|
|
803
803
|
] }),
|
|
804
|
-
(g || f) && /* @__PURE__ */
|
|
805
|
-
f ? /* @__PURE__ */
|
|
804
|
+
(g || f) && /* @__PURE__ */ s(W, {}),
|
|
805
|
+
f ? /* @__PURE__ */ s(We, {}) : g ? /* @__PURE__ */ s(be, { label: g, placement: "bottom", children: /* @__PURE__ */ s(
|
|
806
806
|
J,
|
|
807
807
|
{
|
|
808
808
|
icon: Oe,
|
|
@@ -836,7 +836,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
836
836
|
}) {
|
|
837
837
|
const n = ee(), r = I(), {
|
|
838
838
|
showHeaderCheckbox: o,
|
|
839
|
-
enableExpandCollapse:
|
|
839
|
+
enableExpandCollapse: a,
|
|
840
840
|
rowIndent: c,
|
|
841
841
|
zIndex: i,
|
|
842
842
|
stickyHeader: u,
|
|
@@ -856,8 +856,8 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
856
856
|
borderLeft: Fe
|
|
857
857
|
},
|
|
858
858
|
children: [
|
|
859
|
-
c && /* @__PURE__ */
|
|
860
|
-
|
|
859
|
+
c && /* @__PURE__ */ s("th", { style: f }),
|
|
860
|
+
a && /* @__PURE__ */ s(
|
|
861
861
|
"th",
|
|
862
862
|
{
|
|
863
863
|
style: {
|
|
@@ -868,17 +868,17 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
870
|
),
|
|
871
|
-
o && /* @__PURE__ */
|
|
871
|
+
o && /* @__PURE__ */ s(
|
|
872
872
|
"th",
|
|
873
873
|
{
|
|
874
874
|
style: {
|
|
875
875
|
...f,
|
|
876
|
-
left: h &&
|
|
876
|
+
left: h && a ? "var(--swui-expand-cell-width)" : h ? "0px" : void 0,
|
|
877
877
|
zIndex: g
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
880
|
),
|
|
881
|
-
n.map(({ groupConfig: m, groupId: w }, l) => /* @__PURE__ */
|
|
881
|
+
n.map(({ groupConfig: m, groupId: w }, l) => /* @__PURE__ */ s(
|
|
882
882
|
hr,
|
|
883
883
|
{
|
|
884
884
|
isFirstGroup: l === 0,
|
|
@@ -894,8 +894,8 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
894
894
|
},
|
|
895
895
|
w
|
|
896
896
|
)),
|
|
897
|
-
c && /* @__PURE__ */
|
|
898
|
-
/* @__PURE__ */
|
|
897
|
+
c && /* @__PURE__ */ s("th", { style: f }),
|
|
898
|
+
/* @__PURE__ */ s("th", { style: f })
|
|
899
899
|
]
|
|
900
900
|
}
|
|
901
901
|
);
|
|
@@ -907,8 +907,8 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
907
907
|
), n = {};
|
|
908
908
|
let r = 0;
|
|
909
909
|
return e.showRowCheckbox && r++, e.enableExpandCollapse && r++, t.forEach((o) => {
|
|
910
|
-
o.groupConfig.columnOrder.forEach((
|
|
911
|
-
yr(e.columns[
|
|
910
|
+
o.groupConfig.columnOrder.forEach((a) => {
|
|
911
|
+
yr(e.columns[a]) && (n[a] = r++);
|
|
912
912
|
});
|
|
913
913
|
}), {
|
|
914
914
|
columnIndexPerColumnId: n,
|
|
@@ -943,8 +943,8 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
943
943
|
throw new Error(
|
|
944
944
|
"Column group does not exist. Column group id = " + n
|
|
945
945
|
);
|
|
946
|
-
r.columnOrder.forEach((
|
|
947
|
-
if (e.columns[
|
|
946
|
+
r.columnOrder.forEach((a) => {
|
|
947
|
+
if (e.columns[a].width == null)
|
|
948
948
|
throw new Error(
|
|
949
949
|
"All columns in sticky column group must have width set."
|
|
950
950
|
);
|
|
@@ -967,8 +967,8 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
967
967
|
const r = {}, o = [
|
|
968
968
|
n ? "var(--current-left-offset)" : "0px"
|
|
969
969
|
];
|
|
970
|
-
for (let
|
|
971
|
-
const c = e[
|
|
970
|
+
for (let a = 0; a < e.length; a++) {
|
|
971
|
+
const c = e[a], i = t == null ? void 0 : t[c];
|
|
972
972
|
r[c] = kr(o), o.push((i == null ? void 0 : i.width) ?? "0px");
|
|
973
973
|
}
|
|
974
974
|
return r;
|
|
@@ -980,8 +980,8 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
980
980
|
const n = (o = e.columnGroups) == null ? void 0 : o[t];
|
|
981
981
|
return (n == null ? void 0 : n.columnOrder) ?? [];
|
|
982
982
|
}, Sr = (e) => {
|
|
983
|
-
var o,
|
|
984
|
-
const t = (
|
|
983
|
+
var o, a, c;
|
|
984
|
+
const t = (a = e.columnGroupOrder) == null ? void 0 : a[((o = e.columnGroupOrder) == null ? void 0 : o.length) - 1];
|
|
985
985
|
if (!t)
|
|
986
986
|
return [];
|
|
987
987
|
const n = (c = e.columnGroups) == null ? void 0 : c[t];
|
|
@@ -990,21 +990,21 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
990
990
|
const r = [...n.columnOrder];
|
|
991
991
|
return r.reverse(), r;
|
|
992
992
|
}, Pr = (e) => "columnGroups" in e ? Ir(e) : Or(e), Or = (e) => Object.keys(e.columns).reduce((n, r) => {
|
|
993
|
-
const o = e.columns[r],
|
|
993
|
+
const o = e.columns[r], a = !!o.sticky;
|
|
994
994
|
return n[r] = {
|
|
995
|
-
sticky:
|
|
996
|
-
left:
|
|
997
|
-
right:
|
|
995
|
+
sticky: a,
|
|
996
|
+
left: a ? `calc(var(--current-left-offset) + ${o.left ?? "0px"})` : void 0,
|
|
997
|
+
right: a ? o.right : void 0,
|
|
998
998
|
type: "column",
|
|
999
999
|
isFirstColumnInLastGroup: !1,
|
|
1000
1000
|
isLastColumnInFirstGroup: !1
|
|
1001
1001
|
}, n;
|
|
1002
1002
|
}, {}), Ir = (e) => {
|
|
1003
|
-
const t = {}, n = e.columnGroupOrder, r = xr(e), o = e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both",
|
|
1003
|
+
const t = {}, n = e.columnGroupOrder, r = xr(e), o = e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both", a = e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both";
|
|
1004
1004
|
return n.forEach((c, i) => {
|
|
1005
1005
|
const h = e.columnGroups[c].columnOrder;
|
|
1006
1006
|
h.forEach((d, f) => {
|
|
1007
|
-
const g = i === 0, m = i === n.length - 1, w = g && o, l = m &&
|
|
1007
|
+
const g = i === 0, m = i === n.length - 1, w = g && o, l = m && a, p = f === 0 && m, y = f === h.length - 1 && g;
|
|
1008
1008
|
t[d] = {
|
|
1009
1009
|
sticky: w || l,
|
|
1010
1010
|
left: w ? r[d] : void 0,
|
|
@@ -1068,24 +1068,24 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1068
1068
|
}, Er = (e) => (e.rowIndent ? 2 : 0) + (e.enableExpandCollapse ? 1 : 0) + (e.showRowCheckbox ? 1 : 0) + Mr(e), Mr = (e) => {
|
|
1069
1069
|
var t;
|
|
1070
1070
|
return "columnGroupOrder" in e ? e.columnGroupOrder.reduce((n, r) => {
|
|
1071
|
-
var
|
|
1072
|
-
const o = (
|
|
1071
|
+
var a, c;
|
|
1072
|
+
const o = (a = e.columnGroups) == null ? void 0 : a[r];
|
|
1073
1073
|
return n + (((c = o == null ? void 0 : o.columnOrder) == null ? void 0 : c.length) ?? 0);
|
|
1074
1074
|
}, 0) : ((t = e.columnOrder) == null ? void 0 : t.length) ?? 0;
|
|
1075
1075
|
}, Rr = () => {
|
|
1076
|
-
const e = I(), t = ee(), n = e.enableExpandCollapse || e.showRowCheckbox, r =
|
|
1076
|
+
const e = I(), t = ee(), n = e.enableExpandCollapse || e.showRowCheckbox, r = sn(e.rowIndent);
|
|
1077
1077
|
return /* @__PURE__ */ C(E, { children: [
|
|
1078
|
-
r ? /* @__PURE__ */
|
|
1078
|
+
r ? /* @__PURE__ */ s("colgroup", { children: /* @__PURE__ */ s(
|
|
1079
1079
|
"col",
|
|
1080
1080
|
{
|
|
1081
1081
|
style: { width: `calc(var(--swui-metrics-indent) * ${r})` }
|
|
1082
1082
|
}
|
|
1083
1083
|
) }) : null,
|
|
1084
1084
|
n && /* @__PURE__ */ C("colgroup", { children: [
|
|
1085
|
-
e.enableExpandCollapse && /* @__PURE__ */
|
|
1086
|
-
e.showRowCheckbox && /* @__PURE__ */
|
|
1085
|
+
e.enableExpandCollapse && /* @__PURE__ */ s("col", { style: { width: "var(--swui-expand-cell-width)" } }),
|
|
1086
|
+
e.showRowCheckbox && /* @__PURE__ */ s("col", { style: { width: "var(--swui-checkbox-cell-width)" } })
|
|
1087
1087
|
] }),
|
|
1088
|
-
t.map(({ groupConfig: o, groupId:
|
|
1088
|
+
t.map(({ groupConfig: o, groupId: a }) => /* @__PURE__ */ s("colgroup", { children: o.columnOrder.map((c) => /* @__PURE__ */ s(
|
|
1089
1089
|
"col",
|
|
1090
1090
|
{
|
|
1091
1091
|
style: {
|
|
@@ -1094,8 +1094,8 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1094
1094
|
}
|
|
1095
1095
|
},
|
|
1096
1096
|
c
|
|
1097
|
-
)) },
|
|
1098
|
-
r ? /* @__PURE__ */
|
|
1097
|
+
)) }, a)),
|
|
1098
|
+
r ? /* @__PURE__ */ s("colgroup", { children: /* @__PURE__ */ s(
|
|
1099
1099
|
"col",
|
|
1100
1100
|
{
|
|
1101
1101
|
style: { width: `calc(var(--swui-metrics-indent) * ${r})` }
|
|
@@ -1120,7 +1120,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1120
1120
|
onValueChange: n,
|
|
1121
1121
|
colIndex: r,
|
|
1122
1122
|
rowIndex: o,
|
|
1123
|
-
numRows:
|
|
1123
|
+
numRows: a,
|
|
1124
1124
|
disabled: c,
|
|
1125
1125
|
onValueChangeAndShift: i,
|
|
1126
1126
|
shiftPressedRef: u
|
|
@@ -1128,7 +1128,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1128
1128
|
const h = Wt(), d = qe(), f = Ie(!!t, {
|
|
1129
1129
|
colIndex: r,
|
|
1130
1130
|
numCols: h,
|
|
1131
|
-
numRows:
|
|
1131
|
+
numRows: a,
|
|
1132
1132
|
rowIndex: o,
|
|
1133
1133
|
tableId: d
|
|
1134
1134
|
}), { requiredProps: g } = f, m = S(
|
|
@@ -1137,7 +1137,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1137
1137
|
},
|
|
1138
1138
|
[n, i, u]
|
|
1139
1139
|
);
|
|
1140
|
-
return /* @__PURE__ */
|
|
1140
|
+
return /* @__PURE__ */ s(
|
|
1141
1141
|
Be,
|
|
1142
1142
|
{
|
|
1143
1143
|
size: "small",
|
|
@@ -1154,21 +1154,21 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1154
1154
|
const r = e.indexOf(t), o = e.indexOf(n);
|
|
1155
1155
|
if (r < 0 || o < 0)
|
|
1156
1156
|
return;
|
|
1157
|
-
const
|
|
1158
|
-
return e.slice(
|
|
1157
|
+
const a = Math.min(r, o), c = Math.max(r, o);
|
|
1158
|
+
return e.slice(a, c + 1);
|
|
1159
1159
|
}, Yr = (e, t) => {
|
|
1160
1160
|
const { keyResolver: n } = I(), {
|
|
1161
1161
|
selectedIds: { selectedIds: r },
|
|
1162
1162
|
fields: { lastSelectedId: o }
|
|
1163
|
-
} =
|
|
1164
|
-
actions: { setSelectedIds:
|
|
1163
|
+
} = ae(), {
|
|
1164
|
+
actions: { setSelectedIds: a, setLastSelectedId: c },
|
|
1165
1165
|
dispatch: i
|
|
1166
1166
|
} = Ce(), u = b(() => n(e), [n, e]), h = b(
|
|
1167
1167
|
() => r.includes(u),
|
|
1168
1168
|
[r, u]
|
|
1169
1169
|
), { toggle: d, addMultiple: f, removeMultiple: g } = yt(
|
|
1170
1170
|
r,
|
|
1171
|
-
(l) => i(
|
|
1171
|
+
(l) => i(a(l))
|
|
1172
1172
|
), m = S(() => {
|
|
1173
1173
|
if (t && o) {
|
|
1174
1174
|
const l = Hr(
|
|
@@ -1201,20 +1201,20 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1201
1201
|
}, $e = (e) => {
|
|
1202
1202
|
const { keyResolver: t } = I(), {
|
|
1203
1203
|
expandedRows: { selectedIds: n }
|
|
1204
|
-
} =
|
|
1204
|
+
} = ae(), {
|
|
1205
1205
|
actions: { expandByIds: r },
|
|
1206
1206
|
dispatch: o
|
|
1207
|
-
} = Ce(),
|
|
1208
|
-
() => n.includes(
|
|
1209
|
-
[n,
|
|
1207
|
+
} = Ce(), a = b(() => t(e), [t, e]), c = b(
|
|
1208
|
+
() => n.includes(a),
|
|
1209
|
+
[n, a]
|
|
1210
1210
|
), { toggle: i } = yt(
|
|
1211
1211
|
n,
|
|
1212
1212
|
(h) => o(r(h))
|
|
1213
1213
|
);
|
|
1214
1214
|
return {
|
|
1215
1215
|
toggleRowExpanded: S(() => {
|
|
1216
|
-
i(
|
|
1217
|
-
}, [i,
|
|
1216
|
+
i(a);
|
|
1217
|
+
}, [i, a]),
|
|
1218
1218
|
isExpanded: c
|
|
1219
1219
|
};
|
|
1220
1220
|
}, zr = function({
|
|
@@ -1223,14 +1223,14 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1223
1223
|
numRows: n,
|
|
1224
1224
|
rowIndex: r
|
|
1225
1225
|
}) {
|
|
1226
|
-
const o = Wt(),
|
|
1226
|
+
const o = Wt(), a = qe(), c = Ie(!0, {
|
|
1227
1227
|
colIndex: t,
|
|
1228
1228
|
numCols: o,
|
|
1229
1229
|
numRows: n,
|
|
1230
1230
|
rowIndex: r,
|
|
1231
|
-
tableId:
|
|
1231
|
+
tableId: a
|
|
1232
1232
|
}), { requiredProps: i } = c, { expandCollapseDisableResolver: u } = I(), { toggleRowExpanded: h, isExpanded: d } = $e(e), f = b(() => u ? u(e) : !1, [u, e]);
|
|
1233
|
-
return /* @__PURE__ */
|
|
1233
|
+
return /* @__PURE__ */ s(T, { alignItems: "center", justifyContent: "center", indent: !0, children: !f && /* @__PURE__ */ s(
|
|
1234
1234
|
Ne,
|
|
1235
1235
|
{
|
|
1236
1236
|
size: "small",
|
|
@@ -1256,13 +1256,13 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1256
1256
|
children: n,
|
|
1257
1257
|
background: r,
|
|
1258
1258
|
gridCellRequiredProps: o,
|
|
1259
|
-
isEditing:
|
|
1259
|
+
isEditing: a,
|
|
1260
1260
|
justifyContent: c,
|
|
1261
1261
|
onKeyDown: i,
|
|
1262
1262
|
width: u,
|
|
1263
1263
|
minWidth: h
|
|
1264
1264
|
}) {
|
|
1265
|
-
return /* @__PURE__ */
|
|
1265
|
+
return /* @__PURE__ */ s(
|
|
1266
1266
|
T,
|
|
1267
1267
|
{
|
|
1268
1268
|
width: u,
|
|
@@ -1271,7 +1271,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1271
1271
|
background: r,
|
|
1272
1272
|
overflow: "hidden",
|
|
1273
1273
|
onKeyDown: i,
|
|
1274
|
-
children: /* @__PURE__ */
|
|
1274
|
+
children: /* @__PURE__ */ s(
|
|
1275
1275
|
T,
|
|
1276
1276
|
{
|
|
1277
1277
|
border: "1px solid transparent",
|
|
@@ -1281,8 +1281,8 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1281
1281
|
justifyContent: c,
|
|
1282
1282
|
alignItems: "center",
|
|
1283
1283
|
borderRadius: t ? "4px" : void 0,
|
|
1284
|
-
focusBorder: t && !
|
|
1285
|
-
hoverBorder: t && !
|
|
1284
|
+
focusBorder: t && !a ? "1px solid var(--swui-primary-action-color)" : void 0,
|
|
1285
|
+
hoverBorder: t && !a ? "1px solid var(--lhds-color-ui-300)" : void 0,
|
|
1286
1286
|
...t ? o : void 0,
|
|
1287
1287
|
children: n
|
|
1288
1288
|
}
|
|
@@ -1290,23 +1290,32 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1290
1290
|
}
|
|
1291
1291
|
);
|
|
1292
1292
|
}
|
|
1293
|
-
), Xr =
|
|
1294
|
-
textCell: Xr
|
|
1295
|
-
}, Jr = M.memo(function({
|
|
1293
|
+
), Xr = M.memo(function({
|
|
1296
1294
|
label: t,
|
|
1297
1295
|
size: n,
|
|
1298
1296
|
color: r
|
|
1299
1297
|
}) {
|
|
1300
|
-
return /* @__PURE__ */
|
|
1301
|
-
|
|
1298
|
+
return /* @__PURE__ */ s(W, { overflow: "hidden", children: /* @__PURE__ */ s(
|
|
1299
|
+
Z,
|
|
1300
|
+
{
|
|
1301
|
+
title: t,
|
|
1302
|
+
size: n,
|
|
1303
|
+
color: r,
|
|
1304
|
+
whiteSpace: "nowrap",
|
|
1305
|
+
overflow: "hidden",
|
|
1306
|
+
textOverflow: "ellipsis",
|
|
1307
|
+
children: t
|
|
1308
|
+
}
|
|
1309
|
+
) });
|
|
1310
|
+
}), Ur = ({
|
|
1302
1311
|
label: e,
|
|
1303
1312
|
textSize: t
|
|
1304
|
-
}) => /* @__PURE__ */
|
|
1313
|
+
}) => /* @__PURE__ */ s(Xr, { label: e, size: t }), Jr = M.memo(function({
|
|
1305
1314
|
columnId: t,
|
|
1306
1315
|
item: n,
|
|
1307
1316
|
colIndex: r,
|
|
1308
1317
|
rowIndex: o,
|
|
1309
|
-
numRows:
|
|
1318
|
+
numRows: a,
|
|
1310
1319
|
borderFromGroup: c,
|
|
1311
1320
|
disableBorderLeft: i
|
|
1312
1321
|
}) {
|
|
@@ -1314,7 +1323,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1314
1323
|
keyResolver: u,
|
|
1315
1324
|
enableGridCell: h,
|
|
1316
1325
|
gridCellOptions: d
|
|
1317
|
-
} = I(), f =
|
|
1326
|
+
} = I(), f = ae().selectedIds.selectedIds, g = qe(), m = ar(), { numNavigableColumns: w } = Yt(), l = _e(), p = b(() => u(n), [n, u]), y = b(() => f.indexOf(p) >= 0, [p, f]), { defaultCellRenderer: v = Ur, defaultTextSize: O } = I(), {
|
|
1318
1327
|
itemValueResolver: k,
|
|
1319
1328
|
itemLabelFormatter: R,
|
|
1320
1329
|
width: P,
|
|
@@ -1328,7 +1337,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1328
1337
|
onKeyDown: K,
|
|
1329
1338
|
disableGridCell: he,
|
|
1330
1339
|
disableGridCellFocus: te,
|
|
1331
|
-
zIndex:
|
|
1340
|
+
zIndex: se
|
|
1332
1341
|
} = xe(t), _ = b(() => k ? k(n) : t in n ? n[t] : "", [k, n, t]), fe = b(
|
|
1333
1342
|
() => R ? R(_, n) : jr(_),
|
|
1334
1343
|
[_, R, n]
|
|
@@ -1340,14 +1349,14 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1340
1349
|
), ne = Ie(fe, {
|
|
1341
1350
|
colIndex: r,
|
|
1342
1351
|
rowIndex: o,
|
|
1343
|
-
numRows:
|
|
1352
|
+
numRows: a,
|
|
1344
1353
|
numCols: w,
|
|
1345
1354
|
tableId: g,
|
|
1346
1355
|
isEditable: ce,
|
|
1347
1356
|
onChange: F ? (ke) => F(n, ke) : void 0,
|
|
1348
1357
|
...d,
|
|
1349
1358
|
...X
|
|
1350
|
-
}), N = l[t], Qt = _r(t, n) ?? "inherit", Ee = N.sticky ?
|
|
1359
|
+
}), N = l[t], Qt = _r(t, n) ?? "inherit", Ee = N.sticky ? se ?? "var(--swui-sticky-column-z-index)" : se ?? 1, Xt = b(
|
|
1351
1360
|
() => z({
|
|
1352
1361
|
label: fe,
|
|
1353
1362
|
value: _,
|
|
@@ -1376,7 +1385,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1376
1385
|
i,
|
|
1377
1386
|
Y
|
|
1378
1387
|
), Jt = N.sticky && N.type === "last-group" && N.isFirstColumnInLastGroup || N.sticky && N.type === "column" && N.right ? "var(--swui-sticky-column-shadow-left)" : N.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0;
|
|
1379
|
-
return /* @__PURE__ */
|
|
1388
|
+
return /* @__PURE__ */ s(
|
|
1380
1389
|
"td",
|
|
1381
1390
|
{
|
|
1382
1391
|
style: {
|
|
@@ -1389,7 +1398,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1389
1398
|
height: "var(--current-row-height)",
|
|
1390
1399
|
background: Qt
|
|
1391
1400
|
},
|
|
1392
|
-
children: /* @__PURE__ */
|
|
1401
|
+
children: /* @__PURE__ */ s(
|
|
1393
1402
|
Qr,
|
|
1394
1403
|
{
|
|
1395
1404
|
enableGridCell: h && !he && !te,
|
|
@@ -1404,16 +1413,16 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1404
1413
|
)
|
|
1405
1414
|
}
|
|
1406
1415
|
);
|
|
1407
|
-
}),
|
|
1408
|
-
const { renderRowExpansion: n, enableExpandCollapse: r } = I(), { isExpanded: o, toggleRowExpanded:
|
|
1409
|
-
return /* @__PURE__ */
|
|
1416
|
+
}), Zr = function({ item: t }) {
|
|
1417
|
+
const { renderRowExpansion: n, enableExpandCollapse: r } = I(), { isExpanded: o, toggleRowExpanded: a } = $e(t), c = je();
|
|
1418
|
+
return /* @__PURE__ */ s(E, { children: r && n && o && /* @__PURE__ */ s(
|
|
1410
1419
|
"tr",
|
|
1411
1420
|
{
|
|
1412
1421
|
style: {
|
|
1413
1422
|
borderLeft: vt,
|
|
1414
1423
|
background: kt
|
|
1415
1424
|
},
|
|
1416
|
-
children: /* @__PURE__ */
|
|
1425
|
+
children: /* @__PURE__ */ s("td", { colSpan: c, children: n(t, { onRequestCollapse: a }) })
|
|
1417
1426
|
}
|
|
1418
1427
|
) });
|
|
1419
1428
|
}, qt = In.tr`
|
|
@@ -1425,12 +1434,12 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1425
1434
|
background: ${e};
|
|
1426
1435
|
}
|
|
1427
1436
|
` : ""}
|
|
1428
|
-
`,
|
|
1437
|
+
`, eo = M.memo(function({
|
|
1429
1438
|
item: t,
|
|
1430
1439
|
idListForEnabledItems: n,
|
|
1431
1440
|
rowIndex: r,
|
|
1432
1441
|
numRows: o,
|
|
1433
|
-
colIndexOffset:
|
|
1442
|
+
colIndexOffset: a,
|
|
1434
1443
|
alwaysVisible: c,
|
|
1435
1444
|
shiftPressedRef: i
|
|
1436
1445
|
}) {
|
|
@@ -1450,15 +1459,15 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1450
1459
|
}), L = b(
|
|
1451
1460
|
() => w == null ? void 0 : w(t, k),
|
|
1452
1461
|
[k, t, w]
|
|
1453
|
-
), Y =
|
|
1462
|
+
), Y = to(
|
|
1454
1463
|
L,
|
|
1455
1464
|
k,
|
|
1456
1465
|
O
|
|
1457
|
-
), z =
|
|
1466
|
+
), z = no(
|
|
1458
1467
|
L,
|
|
1459
1468
|
k,
|
|
1460
1469
|
O
|
|
1461
|
-
), X =
|
|
1470
|
+
), X = ro(
|
|
1462
1471
|
L,
|
|
1463
1472
|
k,
|
|
1464
1473
|
z
|
|
@@ -1471,18 +1480,18 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1471
1480
|
), he = lr(), te = ot(
|
|
1472
1481
|
he,
|
|
1473
1482
|
t
|
|
1474
|
-
),
|
|
1475
|
-
() => /* @__PURE__ */
|
|
1476
|
-
y && /* @__PURE__ */
|
|
1483
|
+
), se = b(
|
|
1484
|
+
() => /* @__PURE__ */ s(E, { children: /* @__PURE__ */ C(E, { children: [
|
|
1485
|
+
y && /* @__PURE__ */ s(
|
|
1477
1486
|
"td",
|
|
1478
1487
|
{
|
|
1479
1488
|
style: {
|
|
1480
1489
|
background: K
|
|
1481
1490
|
},
|
|
1482
|
-
children: /* @__PURE__ */
|
|
1491
|
+
children: /* @__PURE__ */ s(W, { num: y })
|
|
1483
1492
|
}
|
|
1484
1493
|
),
|
|
1485
|
-
v && /* @__PURE__ */
|
|
1494
|
+
v && /* @__PURE__ */ s(
|
|
1486
1495
|
"td",
|
|
1487
1496
|
{
|
|
1488
1497
|
style: {
|
|
@@ -1492,17 +1501,17 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1492
1501
|
boxShadow: d ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
1493
1502
|
zIndex: d ? "var(--swui-sticky-column-z-index)" : void 0
|
|
1494
1503
|
},
|
|
1495
|
-
children: /* @__PURE__ */
|
|
1504
|
+
children: /* @__PURE__ */ s(
|
|
1496
1505
|
T,
|
|
1497
1506
|
{
|
|
1498
1507
|
width: "var(--swui-expand-cell-width)",
|
|
1499
1508
|
minWidth: "var(--swui-expand-cell-width)",
|
|
1500
1509
|
alignItems: "center",
|
|
1501
1510
|
justifyContent: "center",
|
|
1502
|
-
children: /* @__PURE__ */
|
|
1511
|
+
children: /* @__PURE__ */ s(
|
|
1503
1512
|
zr,
|
|
1504
1513
|
{
|
|
1505
|
-
colIndex:
|
|
1514
|
+
colIndex: a,
|
|
1506
1515
|
rowIndex: p ? r : 0,
|
|
1507
1516
|
numRows: p ? o : 0,
|
|
1508
1517
|
item: t
|
|
@@ -1512,7 +1521,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1512
1521
|
)
|
|
1513
1522
|
}
|
|
1514
1523
|
),
|
|
1515
|
-
m && /* @__PURE__ */
|
|
1524
|
+
m && /* @__PURE__ */ s(
|
|
1516
1525
|
"td",
|
|
1517
1526
|
{
|
|
1518
1527
|
style: {
|
|
@@ -1523,21 +1532,21 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1523
1532
|
boxShadow: d ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
1524
1533
|
zIndex: d ? "var(--swui-sticky-column-z-index)" : void 0
|
|
1525
1534
|
},
|
|
1526
|
-
children: /* @__PURE__ */
|
|
1535
|
+
children: /* @__PURE__ */ s(
|
|
1527
1536
|
T,
|
|
1528
1537
|
{
|
|
1529
1538
|
width: "var(--swui-checkbox-cell-width)",
|
|
1530
1539
|
minWidth: "var(--swui-checkbox-cell-width)",
|
|
1531
1540
|
alignItems: "center",
|
|
1532
1541
|
justifyContent: "center",
|
|
1533
|
-
children: /* @__PURE__ */
|
|
1542
|
+
children: /* @__PURE__ */ s(
|
|
1534
1543
|
Fr,
|
|
1535
1544
|
{
|
|
1536
1545
|
disabled: q,
|
|
1537
1546
|
value: k,
|
|
1538
1547
|
onValueChange: R,
|
|
1539
1548
|
onValueChangeAndShift: P,
|
|
1540
|
-
colIndex:
|
|
1549
|
+
colIndex: a + (v ? 1 : 0),
|
|
1541
1550
|
rowIndex: r,
|
|
1542
1551
|
numRows: o,
|
|
1543
1552
|
shiftPressedRef: i
|
|
@@ -1547,12 +1556,12 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1547
1556
|
)
|
|
1548
1557
|
}
|
|
1549
1558
|
),
|
|
1550
|
-
f.map(({ groupConfig: _, groupId: fe }, ce) => /* @__PURE__ */
|
|
1551
|
-
|
|
1559
|
+
f.map(({ groupConfig: _, groupId: fe }, ce) => /* @__PURE__ */ s(M.Fragment, { children: _.columnOrder.map((me, ne) => /* @__PURE__ */ s(
|
|
1560
|
+
Jr,
|
|
1552
1561
|
{
|
|
1553
1562
|
columnId: me,
|
|
1554
1563
|
item: t,
|
|
1555
|
-
colIndex:
|
|
1564
|
+
colIndex: a + g[me],
|
|
1556
1565
|
rowIndex: r,
|
|
1557
1566
|
numRows: o,
|
|
1558
1567
|
borderFromGroup: Te(
|
|
@@ -1564,19 +1573,19 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1564
1573
|
},
|
|
1565
1574
|
me
|
|
1566
1575
|
)) }, fe)),
|
|
1567
|
-
y && /* @__PURE__ */
|
|
1576
|
+
y && /* @__PURE__ */ s(
|
|
1568
1577
|
"td",
|
|
1569
1578
|
{
|
|
1570
1579
|
style: {
|
|
1571
1580
|
background: te
|
|
1572
1581
|
},
|
|
1573
|
-
children: /* @__PURE__ */
|
|
1582
|
+
children: /* @__PURE__ */ s(W, { num: y })
|
|
1574
1583
|
}
|
|
1575
1584
|
),
|
|
1576
|
-
/* @__PURE__ */
|
|
1585
|
+
/* @__PURE__ */ s("td", {})
|
|
1577
1586
|
] }) }),
|
|
1578
1587
|
[
|
|
1579
|
-
|
|
1588
|
+
a,
|
|
1580
1589
|
g,
|
|
1581
1590
|
q,
|
|
1582
1591
|
v,
|
|
@@ -1597,7 +1606,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1597
1606
|
]
|
|
1598
1607
|
);
|
|
1599
1608
|
return /* @__PURE__ */ C(E, { children: [
|
|
1600
|
-
/* @__PURE__ */
|
|
1609
|
+
/* @__PURE__ */ s(
|
|
1601
1610
|
qt,
|
|
1602
1611
|
{
|
|
1603
1612
|
hoverBackground: z,
|
|
@@ -1605,7 +1614,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1605
1614
|
focusBackground: X,
|
|
1606
1615
|
borderLeft: O ? vt : Fe,
|
|
1607
1616
|
ref: u,
|
|
1608
|
-
children: B || c || O ?
|
|
1617
|
+
children: B || c || O ? se : /* @__PURE__ */ s(
|
|
1609
1618
|
"td",
|
|
1610
1619
|
{
|
|
1611
1620
|
colSpan: h,
|
|
@@ -1614,21 +1623,21 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1614
1623
|
)
|
|
1615
1624
|
}
|
|
1616
1625
|
),
|
|
1617
|
-
/* @__PURE__ */
|
|
1626
|
+
/* @__PURE__ */ s(Zr, { item: t })
|
|
1618
1627
|
] });
|
|
1619
|
-
}),
|
|
1628
|
+
}), to = (e, t, n) => e ? typeof e == "string" ? e : e == null ? void 0 : e.background : t ? V("--lhds-color-blue-100") : n ? kt : "white", no = (e, t, n) => e ? typeof e == "string" ? e : e == null ? void 0 : e.hoverBackground : t ? V("--lhds-color-blue-200") : n ? Rn : V("--lhds-color-ui-200"), ro = (e, t, n) => {
|
|
1620
1629
|
if (t)
|
|
1621
1630
|
return V("--lhds-color-blue-200");
|
|
1622
1631
|
if (e)
|
|
1623
1632
|
return n;
|
|
1624
|
-
},
|
|
1625
|
-
summaryRow:
|
|
1626
|
-
},
|
|
1633
|
+
}, oo = (e) => Object.values(e).some((t) => ao(t)), ao = (e) => !!(e.renderSummaryCell || e.summaryText), so = "_summaryRow_12x8k_1", co = {
|
|
1634
|
+
summaryRow: so
|
|
1635
|
+
}, io = M.memo(function({
|
|
1627
1636
|
columnId: t,
|
|
1628
1637
|
items: n,
|
|
1629
1638
|
disableBorderLeft: r,
|
|
1630
1639
|
borderFromGroup: o,
|
|
1631
|
-
colSpan:
|
|
1640
|
+
colSpan: a
|
|
1632
1641
|
}) {
|
|
1633
1642
|
const c = _e(), {
|
|
1634
1643
|
renderSummaryCell: i,
|
|
@@ -1646,10 +1655,10 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1646
1655
|
() => i == null ? void 0 : i({ items: n, text: v }),
|
|
1647
1656
|
[n, i, v]
|
|
1648
1657
|
);
|
|
1649
|
-
return /* @__PURE__ */
|
|
1658
|
+
return /* @__PURE__ */ s(
|
|
1650
1659
|
"td",
|
|
1651
1660
|
{
|
|
1652
|
-
colSpan:
|
|
1661
|
+
colSpan: a,
|
|
1653
1662
|
style: {
|
|
1654
1663
|
borderLeft: w,
|
|
1655
1664
|
position: l.sticky ? "sticky" : void 0,
|
|
@@ -1659,7 +1668,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1659
1668
|
zIndex: p,
|
|
1660
1669
|
height: "var(--current-row-height)"
|
|
1661
1670
|
},
|
|
1662
|
-
children: /* @__PURE__ */
|
|
1671
|
+
children: /* @__PURE__ */ s(
|
|
1663
1672
|
T,
|
|
1664
1673
|
{
|
|
1665
1674
|
width: f,
|
|
@@ -1668,35 +1677,35 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1668
1677
|
overflow: "hidden",
|
|
1669
1678
|
justifyContent: m,
|
|
1670
1679
|
alignItems: "center",
|
|
1671
|
-
children: i ? O : /* @__PURE__ */
|
|
1680
|
+
children: i ? O : /* @__PURE__ */ s(W, { children: /* @__PURE__ */ s(Z, { variant: "bold", children: v }) })
|
|
1672
1681
|
}
|
|
1673
1682
|
)
|
|
1674
1683
|
}
|
|
1675
1684
|
);
|
|
1676
|
-
}),
|
|
1685
|
+
}), uo = (e, t) => {
|
|
1677
1686
|
const n = [];
|
|
1678
1687
|
for (let r = 0; r < e.length; r++) {
|
|
1679
|
-
const { summaryCellColSpan: o } = t[e[r]],
|
|
1688
|
+
const { summaryCellColSpan: o } = t[e[r]], a = Math.min(
|
|
1680
1689
|
o ?? 1,
|
|
1681
1690
|
e.length - r
|
|
1682
1691
|
);
|
|
1683
|
-
n.push({ columnId: e[r], colSpan:
|
|
1692
|
+
n.push({ columnId: e[r], colSpan: a });
|
|
1684
1693
|
const c = o ?? 1;
|
|
1685
1694
|
c > 1 && (r += c - 1);
|
|
1686
1695
|
}
|
|
1687
1696
|
return n;
|
|
1688
|
-
},
|
|
1697
|
+
}, lo = M.memo(
|
|
1689
1698
|
function({
|
|
1690
1699
|
items: t
|
|
1691
1700
|
}) {
|
|
1692
|
-
const n = ee(), { showRowCheckbox: r, enableExpandCollapse: o, columns:
|
|
1693
|
-
return /* @__PURE__ */ C("tr", { className:
|
|
1694
|
-
c && /* @__PURE__ */
|
|
1695
|
-
o && /* @__PURE__ */
|
|
1696
|
-
r && /* @__PURE__ */
|
|
1697
|
-
n.map(({ groupConfig: i, groupId: u }, h) => /* @__PURE__ */
|
|
1698
|
-
({ columnId: d, colSpan: f }, g) => /* @__PURE__ */
|
|
1699
|
-
|
|
1701
|
+
const n = ee(), { showRowCheckbox: r, enableExpandCollapse: o, columns: a, rowIndent: c } = I();
|
|
1702
|
+
return /* @__PURE__ */ C("tr", { className: co.summaryRow, children: [
|
|
1703
|
+
c && /* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(W, { num: c }) }),
|
|
1704
|
+
o && /* @__PURE__ */ s("td", {}),
|
|
1705
|
+
r && /* @__PURE__ */ s("td", {}),
|
|
1706
|
+
n.map(({ groupConfig: i, groupId: u }, h) => /* @__PURE__ */ s(M.Fragment, { children: uo(i.columnOrder, a).map(
|
|
1707
|
+
({ columnId: d, colSpan: f }, g) => /* @__PURE__ */ s(
|
|
1708
|
+
io,
|
|
1700
1709
|
{
|
|
1701
1710
|
colSpan: f,
|
|
1702
1711
|
columnId: d,
|
|
@@ -1711,26 +1720,26 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1711
1720
|
d
|
|
1712
1721
|
)
|
|
1713
1722
|
) }, u)),
|
|
1714
|
-
c && /* @__PURE__ */
|
|
1715
|
-
/* @__PURE__ */
|
|
1723
|
+
c && /* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(W, { num: c }) }),
|
|
1724
|
+
/* @__PURE__ */ s("td", {})
|
|
1716
1725
|
] });
|
|
1717
1726
|
}
|
|
1718
|
-
),
|
|
1727
|
+
), ho = function({ items: t }) {
|
|
1719
1728
|
const { columns: n } = I();
|
|
1720
|
-
return b(() =>
|
|
1721
|
-
}, _t = (e) => (t) => e == null ? !0 : !e(t),
|
|
1729
|
+
return b(() => oo(n), [n]) ? /* @__PURE__ */ s(lo, { items: t }) : null;
|
|
1730
|
+
}, _t = (e) => (t) => e == null ? !0 : !e(t), fo = M.memo(function({
|
|
1722
1731
|
items: t,
|
|
1723
1732
|
colIndexOffset: n = 0,
|
|
1724
1733
|
rowIndexOffset: r = 0
|
|
1725
1734
|
}) {
|
|
1726
|
-
const o = de(0),
|
|
1735
|
+
const o = de(0), a = de(!1), {
|
|
1727
1736
|
keyResolver: c,
|
|
1728
1737
|
disableInfiniteList: i,
|
|
1729
1738
|
checkboxDisabledResolver: u,
|
|
1730
1739
|
enableExternalSorting: h
|
|
1731
1740
|
} = I(), {
|
|
1732
1741
|
sortOrder: { sortBy: d, desc: f }
|
|
1733
|
-
} =
|
|
1742
|
+
} = ae(), g = Lr(d), m = b(() => {
|
|
1734
1743
|
if (h)
|
|
1735
1744
|
return t ?? [];
|
|
1736
1745
|
if (!t || !t.length)
|
|
@@ -1750,16 +1759,16 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1750
1759
|
);
|
|
1751
1760
|
return ft(() => {
|
|
1752
1761
|
const l = (y) => {
|
|
1753
|
-
y.key === "Shift" && (
|
|
1762
|
+
y.key === "Shift" && (a.current = !1);
|
|
1754
1763
|
}, p = (y) => {
|
|
1755
|
-
y.key === "Shift" && (
|
|
1764
|
+
y.key === "Shift" && (a.current = !0);
|
|
1756
1765
|
};
|
|
1757
1766
|
return document.addEventListener("keyup", l), document.addEventListener("keydown", p), () => {
|
|
1758
1767
|
document.removeEventListener("keyup", l), document.removeEventListener("keydown", p);
|
|
1759
1768
|
};
|
|
1760
1769
|
}, []), /* @__PURE__ */ C(M.Fragment, { children: [
|
|
1761
|
-
m.map((l, p) => /* @__PURE__ */
|
|
1762
|
-
|
|
1770
|
+
m.map((l, p) => /* @__PURE__ */ s(
|
|
1771
|
+
eo,
|
|
1763
1772
|
{
|
|
1764
1773
|
alwaysVisible: i || m.length < 30,
|
|
1765
1774
|
item: l,
|
|
@@ -1767,18 +1776,18 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1767
1776
|
colIndexOffset: n,
|
|
1768
1777
|
rowIndex: p + r,
|
|
1769
1778
|
numRows: m.length,
|
|
1770
|
-
shiftPressedRef:
|
|
1779
|
+
shiftPressedRef: a
|
|
1771
1780
|
},
|
|
1772
1781
|
c(l)
|
|
1773
1782
|
)),
|
|
1774
|
-
/* @__PURE__ */
|
|
1783
|
+
/* @__PURE__ */ s(ho, { items: m })
|
|
1775
1784
|
] }, o.current);
|
|
1776
|
-
}),
|
|
1785
|
+
}), mo = M.memo(function({
|
|
1777
1786
|
error: t,
|
|
1778
1787
|
bannerError: n,
|
|
1779
1788
|
loading: r,
|
|
1780
1789
|
items: o,
|
|
1781
|
-
noItemsLabel:
|
|
1790
|
+
noItemsLabel: a = "There is no data available.",
|
|
1782
1791
|
noItemsContentRight: c,
|
|
1783
1792
|
noItemsContentBottom: i,
|
|
1784
1793
|
noItemsHeader: u,
|
|
@@ -1790,16 +1799,16 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1790
1799
|
renderExtraRowBottom: w
|
|
1791
1800
|
}) {
|
|
1792
1801
|
const l = je();
|
|
1793
|
-
return n ? /* @__PURE__ */
|
|
1802
|
+
return n ? /* @__PURE__ */ s("tbody", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: l, children: /* @__PURE__ */ s(Me, { num: 4, justifyContent: "center", children: /* @__PURE__ */ s(le, { alignItems: "center", children: /* @__PURE__ */ s(rn, { bannerState: n, variant: "error" }) }) }) }) }) }) : t || g ? /* @__PURE__ */ s("tbody", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: l, children: /* @__PURE__ */ s(Me, { num: 4, justifyContent: "center", children: /* @__PURE__ */ s(le, { alignItems: "center", children: /* @__PURE__ */ s(
|
|
1794
1803
|
Ke,
|
|
1795
1804
|
{
|
|
1796
1805
|
headerText: (t ? t.message : g) ?? "Unknown error",
|
|
1797
1806
|
variant: "error"
|
|
1798
1807
|
}
|
|
1799
|
-
) }) }) }) }) }) : r ? /* @__PURE__ */
|
|
1808
|
+
) }) }) }) }) }) : r ? /* @__PURE__ */ s("tbody", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: l, children: /* @__PURE__ */ s(Me, { num: 4, children: /* @__PURE__ */ s(kn, {}) }) }) }) }) : !o || !o.length ? /* @__PURE__ */ s("tbody", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: l, children: /* @__PURE__ */ s(T, { spacing: 4, justifyContent: "center", children: /* @__PURE__ */ s(
|
|
1800
1809
|
Ke,
|
|
1801
1810
|
{
|
|
1802
|
-
text:
|
|
1811
|
+
text: a,
|
|
1803
1812
|
headerText: u,
|
|
1804
1813
|
contentRight: c,
|
|
1805
1814
|
variant: "info",
|
|
@@ -1807,8 +1816,8 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1807
1816
|
}
|
|
1808
1817
|
) }) }) }) }) : /* @__PURE__ */ C("tbody", { children: [
|
|
1809
1818
|
m == null ? void 0 : m(),
|
|
1810
|
-
/* @__PURE__ */
|
|
1811
|
-
|
|
1819
|
+
/* @__PURE__ */ s(
|
|
1820
|
+
fo,
|
|
1812
1821
|
{
|
|
1813
1822
|
variant: f,
|
|
1814
1823
|
items: o,
|
|
@@ -1818,17 +1827,17 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1818
1827
|
),
|
|
1819
1828
|
w == null ? void 0 : w()
|
|
1820
1829
|
] });
|
|
1821
|
-
}),
|
|
1830
|
+
}), wo = (e) => {
|
|
1822
1831
|
const { keyResolver: t, checkboxDisabledResolver: n } = I(), {
|
|
1823
1832
|
selectedIds: { selectedIds: r }
|
|
1824
|
-
} =
|
|
1825
|
-
actions: { setSelectedIds: o, clearSelection:
|
|
1833
|
+
} = ae(), {
|
|
1834
|
+
actions: { setSelectedIds: o, clearSelection: a },
|
|
1826
1835
|
dispatch: c
|
|
1827
1836
|
} = Ce(), i = r.length === 0, u = e ? e.length > 0 && r.length === e.length : !1, h = S(() => {
|
|
1828
1837
|
e && c(
|
|
1829
1838
|
i ? o(
|
|
1830
1839
|
e.filter(_t(n)).map((d) => t(d))
|
|
1831
|
-
) :
|
|
1840
|
+
) : a()
|
|
1832
1841
|
);
|
|
1833
1842
|
}, [
|
|
1834
1843
|
e,
|
|
@@ -1837,25 +1846,25 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1837
1846
|
o,
|
|
1838
1847
|
n,
|
|
1839
1848
|
t,
|
|
1840
|
-
|
|
1849
|
+
a
|
|
1841
1850
|
]);
|
|
1842
1851
|
return {
|
|
1843
1852
|
selectionIsEmpty: i,
|
|
1844
1853
|
allItemsAreSelected: u,
|
|
1845
1854
|
onClickCheckbox: h
|
|
1846
1855
|
};
|
|
1847
|
-
},
|
|
1856
|
+
}, go = (e) => {
|
|
1848
1857
|
const { keyResolver: t } = I(), {
|
|
1849
1858
|
expandedRows: { selectedIds: n }
|
|
1850
|
-
} =
|
|
1859
|
+
} = ae(), {
|
|
1851
1860
|
actions: { collapseAll: r, expandByIds: o },
|
|
1852
|
-
dispatch:
|
|
1861
|
+
dispatch: a
|
|
1853
1862
|
} = Ce(), c = e ? e.length > 0 && n.length === e.length : !1, i = S(() => {
|
|
1854
|
-
e &&
|
|
1863
|
+
e && a(c ? r() : o(e.map((u) => t(u))));
|
|
1855
1864
|
}, [
|
|
1856
1865
|
c,
|
|
1857
1866
|
r,
|
|
1858
|
-
|
|
1867
|
+
a,
|
|
1859
1868
|
e,
|
|
1860
1869
|
t,
|
|
1861
1870
|
o
|
|
@@ -1864,12 +1873,12 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1864
1873
|
allItemsAreExpanded: c,
|
|
1865
1874
|
toggleExpanded: i
|
|
1866
1875
|
};
|
|
1867
|
-
},
|
|
1868
|
-
const { dispatch: t, actions: n } = Ce(), r =
|
|
1869
|
-
sortOrder: { desc: o, sortBy:
|
|
1870
|
-
} =
|
|
1876
|
+
}, po = (e) => {
|
|
1877
|
+
const { dispatch: t, actions: n } = Ce(), r = sr(), {
|
|
1878
|
+
sortOrder: { desc: o, sortBy: a }
|
|
1879
|
+
} = ae();
|
|
1871
1880
|
return b(() => {
|
|
1872
|
-
const c = e ===
|
|
1881
|
+
const c = e === a;
|
|
1873
1882
|
return {
|
|
1874
1883
|
arrow: c ? o ? "up" : "down" : void 0,
|
|
1875
1884
|
selected: c,
|
|
@@ -1879,10 +1888,10 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1879
1888
|
t(n.sortBy(e, i)), r == null || r(e, i);
|
|
1880
1889
|
}
|
|
1881
1890
|
};
|
|
1882
|
-
}, [e,
|
|
1883
|
-
},
|
|
1884
|
-
standardTableHeadTh:
|
|
1885
|
-
},
|
|
1891
|
+
}, [e, a, o, t, n, r]);
|
|
1892
|
+
}, yo = "_standardTableHeadTh_swsxb_8", bo = {
|
|
1893
|
+
standardTableHeadTh: yo
|
|
1894
|
+
}, Co = M.memo(
|
|
1886
1895
|
function({
|
|
1887
1896
|
columnId: t,
|
|
1888
1897
|
borderFromGroup: n,
|
|
@@ -1890,7 +1899,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1890
1899
|
}) {
|
|
1891
1900
|
const {
|
|
1892
1901
|
justifyContentHeader: o,
|
|
1893
|
-
columnLabel:
|
|
1902
|
+
columnLabel: a,
|
|
1894
1903
|
borderLeft: c,
|
|
1895
1904
|
infoIconTooltipText: i,
|
|
1896
1905
|
background: u,
|
|
@@ -1902,15 +1911,15 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1902
1911
|
infoIconTooltipAppendTo: m,
|
|
1903
1912
|
infoIconTooltipZIndex: w,
|
|
1904
1913
|
sortOrderIconVariant: l
|
|
1905
|
-
} = I(), p = _e(), { arrow: y, selected: v, onClickColumnHead: O } =
|
|
1914
|
+
} = I(), p = _e(), { arrow: y, selected: v, onClickColumnHead: O } = po(t), k = typeof a == "string" ? a : Vr(t), R = Ve(
|
|
1906
1915
|
n,
|
|
1907
1916
|
r,
|
|
1908
1917
|
c
|
|
1909
1918
|
), P = p[t];
|
|
1910
|
-
return /* @__PURE__ */
|
|
1919
|
+
return /* @__PURE__ */ s(
|
|
1911
1920
|
"th",
|
|
1912
1921
|
{
|
|
1913
|
-
className:
|
|
1922
|
+
className: bo.standardTableHeadTh,
|
|
1914
1923
|
style: {
|
|
1915
1924
|
background: u ?? "white",
|
|
1916
1925
|
borderLeft: R,
|
|
@@ -1922,7 +1931,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1922
1931
|
width: d,
|
|
1923
1932
|
minWidth: f
|
|
1924
1933
|
},
|
|
1925
|
-
children: /* @__PURE__ */
|
|
1934
|
+
children: /* @__PURE__ */ s(
|
|
1926
1935
|
ze,
|
|
1927
1936
|
{
|
|
1928
1937
|
width: "inherit",
|
|
@@ -1942,23 +1951,23 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1942
1951
|
}
|
|
1943
1952
|
);
|
|
1944
1953
|
}
|
|
1945
|
-
),
|
|
1954
|
+
), xo = M.memo(function({ items: t, height: n = He }) {
|
|
1946
1955
|
const r = ee(), {
|
|
1947
1956
|
showHeaderCheckbox: o,
|
|
1948
|
-
showHeaderExpandCollapse:
|
|
1957
|
+
showHeaderExpandCollapse: a,
|
|
1949
1958
|
enableExpandCollapse: c,
|
|
1950
1959
|
rowIndent: i,
|
|
1951
1960
|
stickyCheckboxColumn: u,
|
|
1952
1961
|
showRowCheckbox: h
|
|
1953
|
-
} = I(), { allItemsAreExpanded: d, toggleExpanded: f } =
|
|
1962
|
+
} = I(), { allItemsAreExpanded: d, toggleExpanded: f } = go(t), { allItemsAreSelected: g, onClickCheckbox: m, selectionIsEmpty: w } = wo(t), l = !t || t.length === 0, p = {
|
|
1954
1963
|
zIndex: u ? "var(--swui-sticky-group-header-z-index)" : void 0,
|
|
1955
1964
|
background: u ? "white" : void 0,
|
|
1956
1965
|
position: u ? "sticky" : void 0,
|
|
1957
1966
|
boxShadow: u ? "var(--swui-sticky-column-shadow-right)" : void 0
|
|
1958
1967
|
};
|
|
1959
1968
|
return /* @__PURE__ */ C(qt, { height: n, borderLeft: Fe, children: [
|
|
1960
|
-
i && /* @__PURE__ */
|
|
1961
|
-
c && /* @__PURE__ */
|
|
1969
|
+
i && /* @__PURE__ */ s("th", { children: /* @__PURE__ */ s(T, { indent: i }) }),
|
|
1970
|
+
c && /* @__PURE__ */ s(
|
|
1962
1971
|
"th",
|
|
1963
1972
|
{
|
|
1964
1973
|
style: {
|
|
@@ -1966,14 +1975,14 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1966
1975
|
left: "0px",
|
|
1967
1976
|
textAlign: "left"
|
|
1968
1977
|
},
|
|
1969
|
-
children: /* @__PURE__ */
|
|
1978
|
+
children: /* @__PURE__ */ s(
|
|
1970
1979
|
T,
|
|
1971
1980
|
{
|
|
1972
1981
|
width: "var(--swui-expand-cell-width)",
|
|
1973
1982
|
minWidth: "var(--swui-expand-cell-width)",
|
|
1974
1983
|
alignItems: "center",
|
|
1975
1984
|
justifyContent: "center",
|
|
1976
|
-
children:
|
|
1985
|
+
children: a && /* @__PURE__ */ s(
|
|
1977
1986
|
Ne,
|
|
1978
1987
|
{
|
|
1979
1988
|
size: "small",
|
|
@@ -1985,7 +1994,7 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1985
1994
|
)
|
|
1986
1995
|
}
|
|
1987
1996
|
),
|
|
1988
|
-
(h || o) && /* @__PURE__ */
|
|
1997
|
+
(h || o) && /* @__PURE__ */ s(
|
|
1989
1998
|
"th",
|
|
1990
1999
|
{
|
|
1991
2000
|
style: {
|
|
@@ -1993,14 +2002,14 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
1993
2002
|
overflow: "hidden",
|
|
1994
2003
|
left: u && c ? "var(--swui-expand-cell-width)" : u ? "0px" : void 0
|
|
1995
2004
|
},
|
|
1996
|
-
children: /* @__PURE__ */
|
|
2005
|
+
children: /* @__PURE__ */ s(
|
|
1997
2006
|
T,
|
|
1998
2007
|
{
|
|
1999
2008
|
width: "var(--swui-checkbox-cell-width)",
|
|
2000
2009
|
minWidth: "var(--swui-checkbox-cell-width)",
|
|
2001
2010
|
alignItems: "center",
|
|
2002
2011
|
justifyContent: "center",
|
|
2003
|
-
children: o && /* @__PURE__ */
|
|
2012
|
+
children: o && /* @__PURE__ */ s(
|
|
2004
2013
|
Be,
|
|
2005
2014
|
{
|
|
2006
2015
|
size: "small",
|
|
@@ -2014,8 +2023,8 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
2014
2023
|
)
|
|
2015
2024
|
}
|
|
2016
2025
|
),
|
|
2017
|
-
r.map(({ groupConfig: y, groupId: v }, O) => /* @__PURE__ */
|
|
2018
|
-
|
|
2026
|
+
r.map(({ groupConfig: y, groupId: v }, O) => /* @__PURE__ */ s(M.Fragment, { children: y.columnOrder.map((k, R) => /* @__PURE__ */ s(
|
|
2027
|
+
Co,
|
|
2019
2028
|
{
|
|
2020
2029
|
columnId: k,
|
|
2021
2030
|
borderFromGroup: Te(
|
|
@@ -2027,15 +2036,15 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
2027
2036
|
},
|
|
2028
2037
|
k
|
|
2029
2038
|
)) }, v)),
|
|
2030
|
-
i && /* @__PURE__ */
|
|
2031
|
-
/* @__PURE__ */
|
|
2039
|
+
i && /* @__PURE__ */ s("th", { children: /* @__PURE__ */ s(T, { indent: i }) }),
|
|
2040
|
+
/* @__PURE__ */ s("th", {})
|
|
2032
2041
|
] });
|
|
2033
|
-
}),
|
|
2042
|
+
}), os = function({
|
|
2034
2043
|
tableContext: t,
|
|
2035
2044
|
config: n,
|
|
2036
2045
|
columnGroupOrder: r,
|
|
2037
2046
|
tableId: o,
|
|
2038
|
-
variant:
|
|
2047
|
+
variant: a = "standard",
|
|
2039
2048
|
onKeyDown: c,
|
|
2040
2049
|
onSortOrderChange: i,
|
|
2041
2050
|
renderExtraHeadRows: u,
|
|
@@ -2078,35 +2087,35 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
2078
2087
|
} catch (_) {
|
|
2079
2088
|
return _ instanceof Error ? _ : new Error("Unknown error");
|
|
2080
2089
|
}
|
|
2081
|
-
}, [n]),
|
|
2090
|
+
}, [n]), se = {
|
|
2082
2091
|
background: p || w ? "white" : void 0,
|
|
2083
2092
|
position: p || w ? "sticky" : void 0,
|
|
2084
2093
|
top: p || w ? l ?? 0 : void 0,
|
|
2085
2094
|
boxShadow: p && w ? "var(--swui-sticky-header-shadow-and-right)" : w ? "var(--swui-sticky-column-shadow-right)" : p ? "var(--swui-sticky-header-shadow)" : void 0,
|
|
2086
2095
|
zIndex: p && w ? "var(--swui-sticky-header-in-sticky-column-z-index)" : w ? "var(--swui-sticky-group-header-z-index)" : p ? "var(--swui-sticky-head-z-index)" : y
|
|
2087
2096
|
};
|
|
2088
|
-
return te ? /* @__PURE__ */
|
|
2097
|
+
return te ? /* @__PURE__ */ s(vn, { text: te.message }) : /* @__PURE__ */ s(
|
|
2089
2098
|
"table",
|
|
2090
2099
|
{
|
|
2091
|
-
className: bt(rt.standardTable, rt[
|
|
2100
|
+
className: bt(rt.standardTable, rt[a]),
|
|
2092
2101
|
style: {
|
|
2093
2102
|
width: "100%",
|
|
2094
2103
|
isolation: "isolate",
|
|
2095
2104
|
"--current-left-offset": m && w ? "calc(var(--swui-expand-cell-width) + var(--swui-checkbox-cell-width))" : w ? "var(--swui-checkbox-cell-width)" : m ? "var(--swui-expand-cell-width)" : "0px"
|
|
2096
2105
|
},
|
|
2097
|
-
children: /* @__PURE__ */
|
|
2106
|
+
children: /* @__PURE__ */ s(Bt.Provider, { value: he, children: /* @__PURE__ */ s(Lt.Provider, { value: K, children: /* @__PURE__ */ s(ur.Provider, { value: a, children: /* @__PURE__ */ s(
|
|
2098
2107
|
Tt.Provider,
|
|
2099
2108
|
{
|
|
2100
2109
|
value: o ?? d,
|
|
2101
|
-
children: /* @__PURE__ */
|
|
2110
|
+
children: /* @__PURE__ */ s(Dt.Provider, { value: k, children: /* @__PURE__ */ s(Et.Provider, { value: B, children: /* @__PURE__ */ s(Mt.Provider, { value: n, children: /* @__PURE__ */ s(
|
|
2102
2111
|
Gt.Provider,
|
|
2103
2112
|
{
|
|
2104
2113
|
value: q,
|
|
2105
|
-
children: /* @__PURE__ */
|
|
2114
|
+
children: /* @__PURE__ */ s(
|
|
2106
2115
|
Ht.Provider,
|
|
2107
2116
|
{
|
|
2108
2117
|
value: F,
|
|
2109
|
-
children: /* @__PURE__ */
|
|
2118
|
+
children: /* @__PURE__ */ s(
|
|
2110
2119
|
ir.Provider,
|
|
2111
2120
|
{
|
|
2112
2121
|
value: L,
|
|
@@ -2115,21 +2124,21 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
2115
2124
|
{
|
|
2116
2125
|
value: "columnGroupOrder" in n ? r ?? n.columnGroupOrder : r,
|
|
2117
2126
|
children: [
|
|
2118
|
-
/* @__PURE__ */
|
|
2119
|
-
/* @__PURE__ */
|
|
2127
|
+
/* @__PURE__ */ s(Rr, {}),
|
|
2128
|
+
/* @__PURE__ */ s(Nt.Provider, { value: c, children: /* @__PURE__ */ C(
|
|
2120
2129
|
At.Provider,
|
|
2121
2130
|
{
|
|
2122
2131
|
value: i,
|
|
2123
2132
|
children: [
|
|
2124
|
-
/* @__PURE__ */ C("thead", { style:
|
|
2125
|
-
(r || "columnGroupOrder" in n) && /* @__PURE__ */
|
|
2133
|
+
/* @__PURE__ */ C("thead", { style: se, children: [
|
|
2134
|
+
(r || "columnGroupOrder" in n) && /* @__PURE__ */ s(
|
|
2126
2135
|
gr,
|
|
2127
2136
|
{
|
|
2128
2137
|
height: "var(--current-row-height)"
|
|
2129
2138
|
}
|
|
2130
2139
|
),
|
|
2131
|
-
/* @__PURE__ */
|
|
2132
|
-
|
|
2140
|
+
/* @__PURE__ */ s(
|
|
2141
|
+
xo,
|
|
2133
2142
|
{
|
|
2134
2143
|
items: h.items,
|
|
2135
2144
|
height: "var(--current-row-height)"
|
|
@@ -2137,10 +2146,10 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
2137
2146
|
),
|
|
2138
2147
|
u == null ? void 0 : u()
|
|
2139
2148
|
] }),
|
|
2140
|
-
/* @__PURE__ */
|
|
2141
|
-
|
|
2149
|
+
/* @__PURE__ */ s(
|
|
2150
|
+
mo,
|
|
2142
2151
|
{
|
|
2143
|
-
variant:
|
|
2152
|
+
variant: a,
|
|
2144
2153
|
...h
|
|
2145
2154
|
}
|
|
2146
2155
|
)
|
|
@@ -2163,33 +2172,33 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
2163
2172
|
}, ie = (e, t) => ({
|
|
2164
2173
|
...t,
|
|
2165
2174
|
itemValueResolver: e
|
|
2166
|
-
}),
|
|
2175
|
+
}), ko = (e) => ({
|
|
2167
2176
|
label: t,
|
|
2168
2177
|
gridCell: {
|
|
2169
2178
|
editorValue: n,
|
|
2170
2179
|
isEditing: r,
|
|
2171
2180
|
setEditorValue: o,
|
|
2172
|
-
stopEditingAndRevert:
|
|
2181
|
+
stopEditingAndRevert: a,
|
|
2173
2182
|
lastKeyEvent: c,
|
|
2174
2183
|
stopEditing: i,
|
|
2175
2184
|
stopEditingAndMove: u
|
|
2176
2185
|
}
|
|
2177
|
-
}) => r ? /* @__PURE__ */
|
|
2186
|
+
}) => r ? /* @__PURE__ */ s(
|
|
2178
2187
|
Ae,
|
|
2179
2188
|
{
|
|
2180
2189
|
onValueChange: o,
|
|
2181
2190
|
value: n,
|
|
2182
2191
|
onDone: i,
|
|
2183
|
-
onEsc:
|
|
2192
|
+
onEsc: a,
|
|
2184
2193
|
autoFocus: !0,
|
|
2185
2194
|
selectAllOnMount: !c,
|
|
2186
2195
|
onMove: u
|
|
2187
2196
|
}
|
|
2188
|
-
) : /* @__PURE__ */
|
|
2197
|
+
) : /* @__PURE__ */ s(W, { children: /* @__PURE__ */ s(Z, { color: "var(--swui-primary-action-color)", size: e, children: t }) }), as = (e, t, n) => ({
|
|
2189
2198
|
label: r,
|
|
2190
2199
|
item: o,
|
|
2191
2200
|
gridCell: {
|
|
2192
|
-
editorValue:
|
|
2201
|
+
editorValue: a,
|
|
2193
2202
|
isEditing: c,
|
|
2194
2203
|
setEditorValue: i,
|
|
2195
2204
|
stopEditingAndRevert: u,
|
|
@@ -2200,18 +2209,18 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
2200
2209
|
isEditable: g
|
|
2201
2210
|
}) => {
|
|
2202
2211
|
const m = typeof e == "function" ? e(o) : e, w = t ? t(o) : void 0, l = n ? n(o) : void 0;
|
|
2203
|
-
return g && c ? /* @__PURE__ */
|
|
2212
|
+
return g && c ? /* @__PURE__ */ s(
|
|
2204
2213
|
Ae,
|
|
2205
2214
|
{
|
|
2206
2215
|
onValueChange: i,
|
|
2207
|
-
value:
|
|
2216
|
+
value: a,
|
|
2208
2217
|
onDone: d,
|
|
2209
2218
|
onEsc: u,
|
|
2210
2219
|
autoFocus: !0,
|
|
2211
2220
|
selectAllOnMount: !h,
|
|
2212
2221
|
onMove: f
|
|
2213
2222
|
}
|
|
2214
|
-
) : /* @__PURE__ */
|
|
2223
|
+
) : /* @__PURE__ */ s(W, { row: !0, alignItems: "center", children: /* @__PURE__ */ s(
|
|
2215
2224
|
Tn,
|
|
2216
2225
|
{
|
|
2217
2226
|
value: r,
|
|
@@ -2221,9 +2230,9 @@ const Ct = M.createContext({}), Zs = ({
|
|
|
2221
2230
|
warningOnEmpty: m
|
|
2222
2231
|
}
|
|
2223
2232
|
) });
|
|
2224
|
-
}, jt = 6048e5,
|
|
2233
|
+
}, jt = 6048e5, vo = 864e5, at = Symbol.for("constructDateFrom");
|
|
2225
2234
|
function Q(e, t) {
|
|
2226
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" &&
|
|
2235
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && at in e ? e[at](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
2227
2236
|
}
|
|
2228
2237
|
function H(e, t) {
|
|
2229
2238
|
return Q(t || e, e);
|
|
@@ -2232,13 +2241,13 @@ function D(e, t, n) {
|
|
|
2232
2241
|
const r = H(e, n == null ? void 0 : n.in);
|
|
2233
2242
|
return isNaN(t) ? Q(e, NaN) : (t && r.setDate(r.getDate() + t), r);
|
|
2234
2243
|
}
|
|
2235
|
-
let
|
|
2244
|
+
let So = {};
|
|
2236
2245
|
function De() {
|
|
2237
|
-
return
|
|
2246
|
+
return So;
|
|
2238
2247
|
}
|
|
2239
2248
|
function ye(e, t) {
|
|
2240
2249
|
var i, u, h, d;
|
|
2241
|
-
const n = De(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((u = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : u.weekStartsOn) ?? n.weekStartsOn ?? ((d = (h = n.locale) == null ? void 0 : h.options) == null ? void 0 : d.weekStartsOn) ?? 0, o = H(e, t == null ? void 0 : t.in),
|
|
2250
|
+
const n = De(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((u = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : u.weekStartsOn) ?? n.weekStartsOn ?? ((d = (h = n.locale) == null ? void 0 : h.options) == null ? void 0 : d.weekStartsOn) ?? 0, o = H(e, t == null ? void 0 : t.in), a = o.getDay(), c = (a < r ? 7 : 0) + a - r;
|
|
2242
2251
|
return o.setDate(o.getDate() - c), o.setHours(0, 0, 0, 0), o;
|
|
2243
2252
|
}
|
|
2244
2253
|
function Pe(e, t) {
|
|
@@ -2247,12 +2256,12 @@ function Pe(e, t) {
|
|
|
2247
2256
|
function Vt(e, t) {
|
|
2248
2257
|
const n = H(e, t == null ? void 0 : t.in), r = n.getFullYear(), o = Q(n, 0);
|
|
2249
2258
|
o.setFullYear(r + 1, 0, 4), o.setHours(0, 0, 0, 0);
|
|
2250
|
-
const
|
|
2259
|
+
const a = Pe(o), c = Q(n, 0);
|
|
2251
2260
|
c.setFullYear(r, 0, 4), c.setHours(0, 0, 0, 0);
|
|
2252
2261
|
const i = Pe(c);
|
|
2253
|
-
return n.getTime() >=
|
|
2262
|
+
return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= i.getTime() ? r : r - 1;
|
|
2254
2263
|
}
|
|
2255
|
-
function
|
|
2264
|
+
function st(e) {
|
|
2256
2265
|
const t = H(e), n = new Date(
|
|
2257
2266
|
Date.UTC(
|
|
2258
2267
|
t.getFullYear(),
|
|
@@ -2266,7 +2275,7 @@ function at(e) {
|
|
|
2266
2275
|
);
|
|
2267
2276
|
return n.setUTCFullYear(t.getFullYear()), +e - +n;
|
|
2268
2277
|
}
|
|
2269
|
-
function
|
|
2278
|
+
function Po(e, ...t) {
|
|
2270
2279
|
const n = Q.bind(
|
|
2271
2280
|
null,
|
|
2272
2281
|
t.find((r) => typeof r == "object")
|
|
@@ -2277,29 +2286,29 @@ function ct(e, t) {
|
|
|
2277
2286
|
const n = H(e, t == null ? void 0 : t.in);
|
|
2278
2287
|
return n.setHours(0, 0, 0, 0), n;
|
|
2279
2288
|
}
|
|
2280
|
-
function
|
|
2281
|
-
const [r, o] =
|
|
2289
|
+
function Oo(e, t, n) {
|
|
2290
|
+
const [r, o] = Po(
|
|
2282
2291
|
n == null ? void 0 : n.in,
|
|
2283
2292
|
e,
|
|
2284
2293
|
t
|
|
2285
|
-
),
|
|
2286
|
-
return Math.round((i - u) /
|
|
2294
|
+
), a = ct(r), c = ct(o), i = +a - st(a), u = +c - st(c);
|
|
2295
|
+
return Math.round((i - u) / vo);
|
|
2287
2296
|
}
|
|
2288
|
-
function
|
|
2297
|
+
function Io(e, t) {
|
|
2289
2298
|
const n = Vt(e, t), r = Q(e, 0);
|
|
2290
2299
|
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), Pe(r);
|
|
2291
2300
|
}
|
|
2292
|
-
function
|
|
2301
|
+
function To(e) {
|
|
2293
2302
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
2294
2303
|
}
|
|
2295
|
-
function
|
|
2296
|
-
return !(!
|
|
2304
|
+
function Do(e) {
|
|
2305
|
+
return !(!To(e) && typeof e != "number" || isNaN(+H(e)));
|
|
2297
2306
|
}
|
|
2298
|
-
function
|
|
2307
|
+
function Eo(e, t) {
|
|
2299
2308
|
const n = H(e, t == null ? void 0 : t.in);
|
|
2300
2309
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
2301
2310
|
}
|
|
2302
|
-
const
|
|
2311
|
+
const Mo = {
|
|
2303
2312
|
lessThanXSeconds: {
|
|
2304
2313
|
one: "less than a second",
|
|
2305
2314
|
other: "less than {{count}} seconds"
|
|
@@ -2361,9 +2370,9 @@ const Go = {
|
|
|
2361
2370
|
one: "almost 1 year",
|
|
2362
2371
|
other: "almost {{count}} years"
|
|
2363
2372
|
}
|
|
2364
|
-
},
|
|
2373
|
+
}, Ro = (e, t, n) => {
|
|
2365
2374
|
let r;
|
|
2366
|
-
const o =
|
|
2375
|
+
const o = Mo[e];
|
|
2367
2376
|
return typeof o == "string" ? r = o : t === 1 ? r = o.one : r = o.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
2368
2377
|
};
|
|
2369
2378
|
function Ge(e) {
|
|
@@ -2372,42 +2381,42 @@ function Ge(e) {
|
|
|
2372
2381
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
2373
2382
|
};
|
|
2374
2383
|
}
|
|
2375
|
-
const
|
|
2384
|
+
const Go = {
|
|
2376
2385
|
full: "EEEE, MMMM do, y",
|
|
2377
2386
|
long: "MMMM do, y",
|
|
2378
2387
|
medium: "MMM d, y",
|
|
2379
2388
|
short: "MM/dd/yyyy"
|
|
2380
|
-
},
|
|
2389
|
+
}, Wo = {
|
|
2381
2390
|
full: "h:mm:ss a zzzz",
|
|
2382
2391
|
long: "h:mm:ss a z",
|
|
2383
2392
|
medium: "h:mm:ss a",
|
|
2384
2393
|
short: "h:mm a"
|
|
2385
|
-
},
|
|
2394
|
+
}, No = {
|
|
2386
2395
|
full: "{{date}} 'at' {{time}}",
|
|
2387
2396
|
long: "{{date}} 'at' {{time}}",
|
|
2388
2397
|
medium: "{{date}}, {{time}}",
|
|
2389
2398
|
short: "{{date}}, {{time}}"
|
|
2390
|
-
},
|
|
2399
|
+
}, Ao = {
|
|
2391
2400
|
date: Ge({
|
|
2392
|
-
formats:
|
|
2401
|
+
formats: Go,
|
|
2393
2402
|
defaultWidth: "full"
|
|
2394
2403
|
}),
|
|
2395
2404
|
time: Ge({
|
|
2396
|
-
formats:
|
|
2405
|
+
formats: Wo,
|
|
2397
2406
|
defaultWidth: "full"
|
|
2398
2407
|
}),
|
|
2399
2408
|
dateTime: Ge({
|
|
2400
|
-
formats:
|
|
2409
|
+
formats: No,
|
|
2401
2410
|
defaultWidth: "full"
|
|
2402
2411
|
})
|
|
2403
|
-
},
|
|
2412
|
+
}, Bo = {
|
|
2404
2413
|
lastWeek: "'last' eeee 'at' p",
|
|
2405
2414
|
yesterday: "'yesterday at' p",
|
|
2406
2415
|
today: "'today at' p",
|
|
2407
2416
|
tomorrow: "'tomorrow at' p",
|
|
2408
2417
|
nextWeek: "eeee 'at' p",
|
|
2409
2418
|
other: "P"
|
|
2410
|
-
},
|
|
2419
|
+
}, Lo = (e, t, n, r) => Bo[e];
|
|
2411
2420
|
function we(e) {
|
|
2412
2421
|
return (t, n) => {
|
|
2413
2422
|
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
@@ -2419,19 +2428,19 @@ function we(e) {
|
|
|
2419
2428
|
const c = e.defaultWidth, i = n != null && n.width ? String(n.width) : e.defaultWidth;
|
|
2420
2429
|
o = e.values[i] || e.values[c];
|
|
2421
2430
|
}
|
|
2422
|
-
const
|
|
2423
|
-
return o[
|
|
2431
|
+
const a = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
2432
|
+
return o[a];
|
|
2424
2433
|
};
|
|
2425
2434
|
}
|
|
2426
|
-
const
|
|
2435
|
+
const Fo = {
|
|
2427
2436
|
narrow: ["B", "A"],
|
|
2428
2437
|
abbreviated: ["BC", "AD"],
|
|
2429
2438
|
wide: ["Before Christ", "Anno Domini"]
|
|
2430
|
-
},
|
|
2439
|
+
}, Ho = {
|
|
2431
2440
|
narrow: ["1", "2", "3", "4"],
|
|
2432
2441
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
2433
2442
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
2434
|
-
},
|
|
2443
|
+
}, Yo = {
|
|
2435
2444
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
2436
2445
|
abbreviated: [
|
|
2437
2446
|
"Jan",
|
|
@@ -2461,7 +2470,7 @@ const Yo = {
|
|
|
2461
2470
|
"November",
|
|
2462
2471
|
"December"
|
|
2463
2472
|
]
|
|
2464
|
-
},
|
|
2473
|
+
}, zo = {
|
|
2465
2474
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
2466
2475
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
2467
2476
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -2474,7 +2483,7 @@ const Yo = {
|
|
|
2474
2483
|
"Friday",
|
|
2475
2484
|
"Saturday"
|
|
2476
2485
|
]
|
|
2477
|
-
},
|
|
2486
|
+
}, qo = {
|
|
2478
2487
|
narrow: {
|
|
2479
2488
|
am: "a",
|
|
2480
2489
|
pm: "p",
|
|
@@ -2505,7 +2514,7 @@ const Yo = {
|
|
|
2505
2514
|
evening: "evening",
|
|
2506
2515
|
night: "night"
|
|
2507
2516
|
}
|
|
2508
|
-
},
|
|
2517
|
+
}, _o = {
|
|
2509
2518
|
narrow: {
|
|
2510
2519
|
am: "a",
|
|
2511
2520
|
pm: "p",
|
|
@@ -2536,7 +2545,7 @@ const Yo = {
|
|
|
2536
2545
|
evening: "in the evening",
|
|
2537
2546
|
night: "at night"
|
|
2538
2547
|
}
|
|
2539
|
-
},
|
|
2548
|
+
}, jo = (e, t) => {
|
|
2540
2549
|
const n = Number(e), r = n % 100;
|
|
2541
2550
|
if (r > 20 || r < 10)
|
|
2542
2551
|
switch (r % 10) {
|
|
@@ -2548,40 +2557,40 @@ const Yo = {
|
|
|
2548
2557
|
return n + "rd";
|
|
2549
2558
|
}
|
|
2550
2559
|
return n + "th";
|
|
2551
|
-
},
|
|
2552
|
-
ordinalNumber:
|
|
2560
|
+
}, Vo = {
|
|
2561
|
+
ordinalNumber: jo,
|
|
2553
2562
|
era: we({
|
|
2554
|
-
values:
|
|
2563
|
+
values: Fo,
|
|
2555
2564
|
defaultWidth: "wide"
|
|
2556
2565
|
}),
|
|
2557
2566
|
quarter: we({
|
|
2558
|
-
values:
|
|
2567
|
+
values: Ho,
|
|
2559
2568
|
defaultWidth: "wide",
|
|
2560
2569
|
argumentCallback: (e) => e - 1
|
|
2561
2570
|
}),
|
|
2562
2571
|
month: we({
|
|
2563
|
-
values:
|
|
2572
|
+
values: Yo,
|
|
2564
2573
|
defaultWidth: "wide"
|
|
2565
2574
|
}),
|
|
2566
2575
|
day: we({
|
|
2567
|
-
values:
|
|
2576
|
+
values: zo,
|
|
2568
2577
|
defaultWidth: "wide"
|
|
2569
2578
|
}),
|
|
2570
2579
|
dayPeriod: we({
|
|
2571
|
-
values:
|
|
2580
|
+
values: qo,
|
|
2572
2581
|
defaultWidth: "wide",
|
|
2573
|
-
formattingValues:
|
|
2582
|
+
formattingValues: _o,
|
|
2574
2583
|
defaultFormattingWidth: "wide"
|
|
2575
2584
|
})
|
|
2576
2585
|
};
|
|
2577
2586
|
function ge(e) {
|
|
2578
2587
|
return (t, n = {}) => {
|
|
2579
|
-
const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth],
|
|
2580
|
-
if (!
|
|
2588
|
+
const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(o);
|
|
2589
|
+
if (!a)
|
|
2581
2590
|
return null;
|
|
2582
|
-
const c =
|
|
2591
|
+
const c = a[0], i = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], u = Array.isArray(i) ? Ko(i, (f) => f.test(c)) : (
|
|
2583
2592
|
// [TODO] -- I challenge you to fix the type
|
|
2584
|
-
|
|
2593
|
+
$o(i, (f) => f.test(c))
|
|
2585
2594
|
);
|
|
2586
2595
|
let h;
|
|
2587
2596
|
h = e.valueCallback ? e.valueCallback(u) : u, h = n.valueCallback ? (
|
|
@@ -2592,45 +2601,45 @@ function ge(e) {
|
|
|
2592
2601
|
return { value: h, rest: d };
|
|
2593
2602
|
};
|
|
2594
2603
|
}
|
|
2595
|
-
function
|
|
2604
|
+
function $o(e, t) {
|
|
2596
2605
|
for (const n in e)
|
|
2597
2606
|
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
2598
2607
|
return n;
|
|
2599
2608
|
}
|
|
2600
|
-
function
|
|
2609
|
+
function Ko(e, t) {
|
|
2601
2610
|
for (let n = 0; n < e.length; n++)
|
|
2602
2611
|
if (t(e[n]))
|
|
2603
2612
|
return n;
|
|
2604
2613
|
}
|
|
2605
|
-
function
|
|
2614
|
+
function Qo(e) {
|
|
2606
2615
|
return (t, n = {}) => {
|
|
2607
2616
|
const r = t.match(e.matchPattern);
|
|
2608
2617
|
if (!r) return null;
|
|
2609
|
-
const o = r[0],
|
|
2610
|
-
if (!
|
|
2611
|
-
let c = e.valueCallback ? e.valueCallback(
|
|
2618
|
+
const o = r[0], a = t.match(e.parsePattern);
|
|
2619
|
+
if (!a) return null;
|
|
2620
|
+
let c = e.valueCallback ? e.valueCallback(a[0]) : a[0];
|
|
2612
2621
|
c = n.valueCallback ? n.valueCallback(c) : c;
|
|
2613
2622
|
const i = t.slice(o.length);
|
|
2614
2623
|
return { value: c, rest: i };
|
|
2615
2624
|
};
|
|
2616
2625
|
}
|
|
2617
|
-
const
|
|
2626
|
+
const Xo = /^(\d+)(th|st|nd|rd)?/i, Uo = /\d+/i, Jo = {
|
|
2618
2627
|
narrow: /^(b|a)/i,
|
|
2619
2628
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
2620
2629
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
2621
|
-
},
|
|
2630
|
+
}, Zo = {
|
|
2622
2631
|
any: [/^b/i, /^(a|c)/i]
|
|
2623
|
-
},
|
|
2632
|
+
}, ea = {
|
|
2624
2633
|
narrow: /^[1234]/i,
|
|
2625
2634
|
abbreviated: /^q[1234]/i,
|
|
2626
2635
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
2627
|
-
},
|
|
2636
|
+
}, ta = {
|
|
2628
2637
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
2629
|
-
},
|
|
2638
|
+
}, na = {
|
|
2630
2639
|
narrow: /^[jfmasond]/i,
|
|
2631
2640
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
2632
2641
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
2633
|
-
},
|
|
2642
|
+
}, ra = {
|
|
2634
2643
|
narrow: [
|
|
2635
2644
|
/^j/i,
|
|
2636
2645
|
/^f/i,
|
|
@@ -2659,18 +2668,18 @@ const Jo = /^(\d+)(th|st|nd|rd)?/i, Zo = /\d+/i, es = {
|
|
|
2659
2668
|
/^n/i,
|
|
2660
2669
|
/^d/i
|
|
2661
2670
|
]
|
|
2662
|
-
},
|
|
2671
|
+
}, oa = {
|
|
2663
2672
|
narrow: /^[smtwf]/i,
|
|
2664
2673
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
2665
2674
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
2666
2675
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
2667
|
-
},
|
|
2676
|
+
}, aa = {
|
|
2668
2677
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
2669
2678
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
2670
|
-
},
|
|
2679
|
+
}, sa = {
|
|
2671
2680
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
2672
2681
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
2673
|
-
},
|
|
2682
|
+
}, ca = {
|
|
2674
2683
|
any: {
|
|
2675
2684
|
am: /^a/i,
|
|
2676
2685
|
pm: /^p/i,
|
|
@@ -2681,79 +2690,79 @@ const Jo = /^(\d+)(th|st|nd|rd)?/i, Zo = /\d+/i, es = {
|
|
|
2681
2690
|
evening: /evening/i,
|
|
2682
2691
|
night: /night/i
|
|
2683
2692
|
}
|
|
2684
|
-
},
|
|
2685
|
-
ordinalNumber:
|
|
2686
|
-
matchPattern:
|
|
2687
|
-
parsePattern:
|
|
2693
|
+
}, ia = {
|
|
2694
|
+
ordinalNumber: Qo({
|
|
2695
|
+
matchPattern: Xo,
|
|
2696
|
+
parsePattern: Uo,
|
|
2688
2697
|
valueCallback: (e) => parseInt(e, 10)
|
|
2689
2698
|
}),
|
|
2690
2699
|
era: ge({
|
|
2691
|
-
matchPatterns:
|
|
2700
|
+
matchPatterns: Jo,
|
|
2692
2701
|
defaultMatchWidth: "wide",
|
|
2693
|
-
parsePatterns:
|
|
2702
|
+
parsePatterns: Zo,
|
|
2694
2703
|
defaultParseWidth: "any"
|
|
2695
2704
|
}),
|
|
2696
2705
|
quarter: ge({
|
|
2697
|
-
matchPatterns:
|
|
2706
|
+
matchPatterns: ea,
|
|
2698
2707
|
defaultMatchWidth: "wide",
|
|
2699
|
-
parsePatterns:
|
|
2708
|
+
parsePatterns: ta,
|
|
2700
2709
|
defaultParseWidth: "any",
|
|
2701
2710
|
valueCallback: (e) => e + 1
|
|
2702
2711
|
}),
|
|
2703
2712
|
month: ge({
|
|
2704
|
-
matchPatterns:
|
|
2713
|
+
matchPatterns: na,
|
|
2705
2714
|
defaultMatchWidth: "wide",
|
|
2706
|
-
parsePatterns:
|
|
2715
|
+
parsePatterns: ra,
|
|
2707
2716
|
defaultParseWidth: "any"
|
|
2708
2717
|
}),
|
|
2709
2718
|
day: ge({
|
|
2710
|
-
matchPatterns:
|
|
2719
|
+
matchPatterns: oa,
|
|
2711
2720
|
defaultMatchWidth: "wide",
|
|
2712
|
-
parsePatterns:
|
|
2721
|
+
parsePatterns: aa,
|
|
2713
2722
|
defaultParseWidth: "any"
|
|
2714
2723
|
}),
|
|
2715
2724
|
dayPeriod: ge({
|
|
2716
|
-
matchPatterns:
|
|
2725
|
+
matchPatterns: sa,
|
|
2717
2726
|
defaultMatchWidth: "any",
|
|
2718
|
-
parsePatterns:
|
|
2727
|
+
parsePatterns: ca,
|
|
2719
2728
|
defaultParseWidth: "any"
|
|
2720
2729
|
})
|
|
2721
|
-
},
|
|
2730
|
+
}, ua = {
|
|
2722
2731
|
code: "en-US",
|
|
2723
|
-
formatDistance:
|
|
2724
|
-
formatLong:
|
|
2725
|
-
formatRelative:
|
|
2726
|
-
localize:
|
|
2727
|
-
match:
|
|
2732
|
+
formatDistance: Ro,
|
|
2733
|
+
formatLong: Ao,
|
|
2734
|
+
formatRelative: Lo,
|
|
2735
|
+
localize: Vo,
|
|
2736
|
+
match: ia,
|
|
2728
2737
|
options: {
|
|
2729
2738
|
weekStartsOn: 0,
|
|
2730
2739
|
firstWeekContainsDate: 1
|
|
2731
2740
|
}
|
|
2732
2741
|
};
|
|
2733
|
-
function
|
|
2742
|
+
function da(e, t) {
|
|
2734
2743
|
const n = H(e, t == null ? void 0 : t.in);
|
|
2735
|
-
return
|
|
2744
|
+
return Oo(n, Eo(n)) + 1;
|
|
2736
2745
|
}
|
|
2737
|
-
function
|
|
2738
|
-
const n = H(e, t == null ? void 0 : t.in), r = +Pe(n) - +
|
|
2746
|
+
function la(e, t) {
|
|
2747
|
+
const n = H(e, t == null ? void 0 : t.in), r = +Pe(n) - +Io(n);
|
|
2739
2748
|
return Math.round(r / jt) + 1;
|
|
2740
2749
|
}
|
|
2741
2750
|
function $t(e, t) {
|
|
2742
2751
|
var d, f, g, m;
|
|
2743
|
-
const n = H(e, t == null ? void 0 : t.in), r = n.getFullYear(), o = De(),
|
|
2744
|
-
c.setFullYear(r + 1, 0,
|
|
2752
|
+
const n = H(e, t == null ? void 0 : t.in), r = n.getFullYear(), o = De(), a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((m = (g = o.locale) == null ? void 0 : g.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, c = Q((t == null ? void 0 : t.in) || e, 0);
|
|
2753
|
+
c.setFullYear(r + 1, 0, a), c.setHours(0, 0, 0, 0);
|
|
2745
2754
|
const i = ye(c, t), u = Q((t == null ? void 0 : t.in) || e, 0);
|
|
2746
|
-
u.setFullYear(r, 0,
|
|
2755
|
+
u.setFullYear(r, 0, a), u.setHours(0, 0, 0, 0);
|
|
2747
2756
|
const h = ye(u, t);
|
|
2748
2757
|
return +n >= +i ? r + 1 : +n >= +h ? r : r - 1;
|
|
2749
2758
|
}
|
|
2750
|
-
function
|
|
2759
|
+
function ha(e, t) {
|
|
2751
2760
|
var i, u, h, d;
|
|
2752
|
-
const n = De(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((u = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : u.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((d = (h = n.locale) == null ? void 0 : h.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o = $t(e, t),
|
|
2753
|
-
return
|
|
2761
|
+
const n = De(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((u = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : u.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((d = (h = n.locale) == null ? void 0 : h.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o = $t(e, t), a = Q((t == null ? void 0 : t.in) || e, 0);
|
|
2762
|
+
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), ye(a, t);
|
|
2754
2763
|
}
|
|
2755
|
-
function
|
|
2756
|
-
const n = H(e, t == null ? void 0 : t.in), r = +ye(n, t) - +
|
|
2764
|
+
function fa(e, t) {
|
|
2765
|
+
const n = H(e, t == null ? void 0 : t.in), r = +ye(n, t) - +ha(n, t);
|
|
2757
2766
|
return Math.round(r / jt) + 1;
|
|
2758
2767
|
}
|
|
2759
2768
|
function x(e, t) {
|
|
@@ -2852,12 +2861,12 @@ const U = {
|
|
|
2852
2861
|
},
|
|
2853
2862
|
// Local week-numbering year
|
|
2854
2863
|
Y: function(e, t, n, r) {
|
|
2855
|
-
const o = $t(e, r),
|
|
2864
|
+
const o = $t(e, r), a = o > 0 ? o : 1 - o;
|
|
2856
2865
|
if (t === "YY") {
|
|
2857
|
-
const c =
|
|
2866
|
+
const c = a % 100;
|
|
2858
2867
|
return x(c, 2);
|
|
2859
2868
|
}
|
|
2860
|
-
return t === "Yo" ? n.ordinalNumber(
|
|
2869
|
+
return t === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : x(a, t.length);
|
|
2861
2870
|
},
|
|
2862
2871
|
// ISO week-numbering year
|
|
2863
2872
|
R: function(e, t) {
|
|
@@ -3006,12 +3015,12 @@ const U = {
|
|
|
3006
3015
|
},
|
|
3007
3016
|
// Local week of year
|
|
3008
3017
|
w: function(e, t, n, r) {
|
|
3009
|
-
const o =
|
|
3018
|
+
const o = fa(e, r);
|
|
3010
3019
|
return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : x(o, t.length);
|
|
3011
3020
|
},
|
|
3012
3021
|
// ISO week of year
|
|
3013
3022
|
I: function(e, t, n) {
|
|
3014
|
-
const r =
|
|
3023
|
+
const r = la(e);
|
|
3015
3024
|
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : x(r, t.length);
|
|
3016
3025
|
},
|
|
3017
3026
|
// Day of the month
|
|
@@ -3020,7 +3029,7 @@ const U = {
|
|
|
3020
3029
|
},
|
|
3021
3030
|
// Day of year
|
|
3022
3031
|
D: function(e, t, n) {
|
|
3023
|
-
const r =
|
|
3032
|
+
const r = da(e);
|
|
3024
3033
|
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : x(r, t.length);
|
|
3025
3034
|
},
|
|
3026
3035
|
// Day of week
|
|
@@ -3058,17 +3067,17 @@ const U = {
|
|
|
3058
3067
|
},
|
|
3059
3068
|
// Local day of week
|
|
3060
3069
|
e: function(e, t, n, r) {
|
|
3061
|
-
const o = e.getDay(),
|
|
3070
|
+
const o = e.getDay(), a = (o - r.weekStartsOn + 8) % 7 || 7;
|
|
3062
3071
|
switch (t) {
|
|
3063
3072
|
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
3064
3073
|
case "e":
|
|
3065
|
-
return String(
|
|
3074
|
+
return String(a);
|
|
3066
3075
|
// Padded numerical value
|
|
3067
3076
|
case "ee":
|
|
3068
|
-
return x(
|
|
3077
|
+
return x(a, 2);
|
|
3069
3078
|
// 1st, 2nd, ..., 7th
|
|
3070
3079
|
case "eo":
|
|
3071
|
-
return n.ordinalNumber(
|
|
3080
|
+
return n.ordinalNumber(a, { unit: "day" });
|
|
3072
3081
|
case "eee":
|
|
3073
3082
|
return n.day(o, {
|
|
3074
3083
|
width: "abbreviated",
|
|
@@ -3097,17 +3106,17 @@ const U = {
|
|
|
3097
3106
|
},
|
|
3098
3107
|
// Stand-alone local day of week
|
|
3099
3108
|
c: function(e, t, n, r) {
|
|
3100
|
-
const o = e.getDay(),
|
|
3109
|
+
const o = e.getDay(), a = (o - r.weekStartsOn + 8) % 7 || 7;
|
|
3101
3110
|
switch (t) {
|
|
3102
3111
|
// Numerical value (same as in `e`)
|
|
3103
3112
|
case "c":
|
|
3104
|
-
return String(
|
|
3113
|
+
return String(a);
|
|
3105
3114
|
// Padded numerical value
|
|
3106
3115
|
case "cc":
|
|
3107
|
-
return x(
|
|
3116
|
+
return x(a, t.length);
|
|
3108
3117
|
// 1st, 2nd, ..., 7th
|
|
3109
3118
|
case "co":
|
|
3110
|
-
return n.ordinalNumber(
|
|
3119
|
+
return n.ordinalNumber(a, { unit: "day" });
|
|
3111
3120
|
case "ccc":
|
|
3112
3121
|
return n.day(o, {
|
|
3113
3122
|
width: "abbreviated",
|
|
@@ -3379,15 +3388,15 @@ const U = {
|
|
|
3379
3388
|
}
|
|
3380
3389
|
};
|
|
3381
3390
|
function ut(e, t = "") {
|
|
3382
|
-
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60),
|
|
3383
|
-
return
|
|
3391
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60), a = r % 60;
|
|
3392
|
+
return a === 0 ? n + String(o) : n + String(o) + t + x(a, 2);
|
|
3384
3393
|
}
|
|
3385
3394
|
function dt(e, t) {
|
|
3386
3395
|
return e % 60 === 0 ? (e > 0 ? "-" : "+") + x(Math.abs(e) / 60, 2) : oe(e, t);
|
|
3387
3396
|
}
|
|
3388
3397
|
function oe(e, t = "") {
|
|
3389
|
-
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = x(Math.trunc(r / 60), 2),
|
|
3390
|
-
return n + o + t +
|
|
3398
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = x(Math.trunc(r / 60), 2), a = x(r % 60, 2);
|
|
3399
|
+
return n + o + t + a;
|
|
3391
3400
|
}
|
|
3392
3401
|
const lt = (e, t) => {
|
|
3393
3402
|
switch (e) {
|
|
@@ -3413,67 +3422,67 @@ const lt = (e, t) => {
|
|
|
3413
3422
|
default:
|
|
3414
3423
|
return t.time({ width: "full" });
|
|
3415
3424
|
}
|
|
3416
|
-
},
|
|
3425
|
+
}, ma = (e, t) => {
|
|
3417
3426
|
const n = e.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
|
|
3418
3427
|
if (!o)
|
|
3419
3428
|
return lt(e, t);
|
|
3420
|
-
let
|
|
3429
|
+
let a;
|
|
3421
3430
|
switch (r) {
|
|
3422
3431
|
case "P":
|
|
3423
|
-
|
|
3432
|
+
a = t.dateTime({ width: "short" });
|
|
3424
3433
|
break;
|
|
3425
3434
|
case "PP":
|
|
3426
|
-
|
|
3435
|
+
a = t.dateTime({ width: "medium" });
|
|
3427
3436
|
break;
|
|
3428
3437
|
case "PPP":
|
|
3429
|
-
|
|
3438
|
+
a = t.dateTime({ width: "long" });
|
|
3430
3439
|
break;
|
|
3431
3440
|
case "PPPP":
|
|
3432
3441
|
default:
|
|
3433
|
-
|
|
3442
|
+
a = t.dateTime({ width: "full" });
|
|
3434
3443
|
break;
|
|
3435
3444
|
}
|
|
3436
|
-
return
|
|
3437
|
-
},
|
|
3445
|
+
return a.replace("{{date}}", lt(r, t)).replace("{{time}}", Kt(o, t));
|
|
3446
|
+
}, wa = {
|
|
3438
3447
|
p: Kt,
|
|
3439
|
-
P:
|
|
3440
|
-
},
|
|
3441
|
-
function
|
|
3442
|
-
return
|
|
3448
|
+
P: ma
|
|
3449
|
+
}, ga = /^D+$/, pa = /^Y+$/, ya = ["D", "DD", "YY", "YYYY"];
|
|
3450
|
+
function ba(e) {
|
|
3451
|
+
return ga.test(e);
|
|
3443
3452
|
}
|
|
3444
|
-
function
|
|
3445
|
-
return
|
|
3453
|
+
function Ca(e) {
|
|
3454
|
+
return pa.test(e);
|
|
3446
3455
|
}
|
|
3447
|
-
function
|
|
3448
|
-
const r =
|
|
3449
|
-
if (console.warn(r),
|
|
3456
|
+
function xa(e, t, n) {
|
|
3457
|
+
const r = ka(e, t, n);
|
|
3458
|
+
if (console.warn(r), ya.includes(e)) throw new RangeError(r);
|
|
3450
3459
|
}
|
|
3451
|
-
function
|
|
3460
|
+
function ka(e, t, n) {
|
|
3452
3461
|
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
3453
3462
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
3454
3463
|
}
|
|
3455
|
-
const
|
|
3456
|
-
function
|
|
3464
|
+
const va = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Sa = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Pa = /^'([^]*?)'?$/, Oa = /''/g, Ia = /[a-zA-Z]/;
|
|
3465
|
+
function Ta(e, t, n) {
|
|
3457
3466
|
var d, f, g, m;
|
|
3458
|
-
const r = De(), o = r.locale ??
|
|
3459
|
-
if (!
|
|
3467
|
+
const r = De(), o = r.locale ?? ua, a = r.firstWeekContainsDate ?? ((f = (d = r.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, c = r.weekStartsOn ?? ((m = (g = r.locale) == null ? void 0 : g.options) == null ? void 0 : m.weekStartsOn) ?? 0, i = H(e, n == null ? void 0 : n.in);
|
|
3468
|
+
if (!Do(i))
|
|
3460
3469
|
throw new RangeError("Invalid time value");
|
|
3461
|
-
let u = t.match(
|
|
3470
|
+
let u = t.match(Sa).map((w) => {
|
|
3462
3471
|
const l = w[0];
|
|
3463
3472
|
if (l === "p" || l === "P") {
|
|
3464
|
-
const p =
|
|
3473
|
+
const p = wa[l];
|
|
3465
3474
|
return p(w, o.formatLong);
|
|
3466
3475
|
}
|
|
3467
3476
|
return w;
|
|
3468
|
-
}).join("").match(
|
|
3477
|
+
}).join("").match(va).map((w) => {
|
|
3469
3478
|
if (w === "''")
|
|
3470
3479
|
return { isToken: !1, value: "'" };
|
|
3471
3480
|
const l = w[0];
|
|
3472
3481
|
if (l === "'")
|
|
3473
|
-
return { isToken: !1, value:
|
|
3482
|
+
return { isToken: !1, value: Da(w) };
|
|
3474
3483
|
if (it[l])
|
|
3475
3484
|
return { isToken: !0, value: w };
|
|
3476
|
-
if (l.match(
|
|
3485
|
+
if (l.match(Ia))
|
|
3477
3486
|
throw new RangeError(
|
|
3478
3487
|
"Format string contains an unescaped latin alphabet character `" + l + "`"
|
|
3479
3488
|
);
|
|
@@ -3481,23 +3490,23 @@ function Es(e, t, n) {
|
|
|
3481
3490
|
});
|
|
3482
3491
|
o.localize.preprocessor && (u = o.localize.preprocessor(i, u));
|
|
3483
3492
|
const h = {
|
|
3484
|
-
firstWeekContainsDate:
|
|
3493
|
+
firstWeekContainsDate: a,
|
|
3485
3494
|
weekStartsOn: c,
|
|
3486
3495
|
locale: o
|
|
3487
3496
|
};
|
|
3488
3497
|
return u.map((w) => {
|
|
3489
3498
|
if (!w.isToken) return w.value;
|
|
3490
3499
|
const l = w.value;
|
|
3491
|
-
(
|
|
3500
|
+
(Ca(l) || ba(l)) && xa(l, t, String(e));
|
|
3492
3501
|
const p = it[l[0]];
|
|
3493
3502
|
return p(i, l, o.localize, h);
|
|
3494
3503
|
}).join("");
|
|
3495
3504
|
}
|
|
3496
|
-
function
|
|
3497
|
-
const t = e.match(
|
|
3498
|
-
return t ? t[1].replace(
|
|
3505
|
+
function Da(e) {
|
|
3506
|
+
const t = e.match(Pa);
|
|
3507
|
+
return t ? t[1].replace(Oa, "'") : e;
|
|
3499
3508
|
}
|
|
3500
|
-
const
|
|
3509
|
+
const Ea = () => [
|
|
3501
3510
|
{
|
|
3502
3511
|
id: "123",
|
|
3503
3512
|
active: !1,
|
|
@@ -3666,7 +3675,7 @@ const Rs = () => [
|
|
|
3666
3675
|
numPassengers: 655,
|
|
3667
3676
|
departure: D(/* @__PURE__ */ new Date(), 5)
|
|
3668
3677
|
}
|
|
3669
|
-
], ht = (e, t, n) => e.map((r) => r.id === t ? { ...r, ...n } : r),
|
|
3678
|
+
], ht = (e, t, n) => e.map((r) => r.id === t ? { ...r, ...n } : r), ss = {
|
|
3670
3679
|
keyResolver: (e) => e.id,
|
|
3671
3680
|
showHeaderCheckbox: !0,
|
|
3672
3681
|
showRowCheckbox: !0,
|
|
@@ -3677,7 +3686,7 @@ const Rs = () => [
|
|
|
3677
3686
|
}),
|
|
3678
3687
|
active: ie((e) => e.active, {
|
|
3679
3688
|
disableGridCellFocus: !0,
|
|
3680
|
-
renderCell: ({ item: e, gridCell: { requiredProps: t } }) => /* @__PURE__ */
|
|
3689
|
+
renderCell: ({ item: e, gridCell: { requiredProps: t } }) => /* @__PURE__ */ s(W, { children: /* @__PURE__ */ s(Be, { value: e.active, ...t }) }),
|
|
3681
3690
|
infoIconTooltipText: "Active means out on the sea."
|
|
3682
3691
|
}),
|
|
3683
3692
|
name: ie((e) => e.name, {
|
|
@@ -3690,7 +3699,7 @@ const Rs = () => [
|
|
|
3690
3699
|
sortOrderIconVariant: "alpha"
|
|
3691
3700
|
}),
|
|
3692
3701
|
numPassengers: ie((e) => e.numPassengers, {
|
|
3693
|
-
renderCell:
|
|
3702
|
+
renderCell: ko(),
|
|
3694
3703
|
isEditable: !0,
|
|
3695
3704
|
onChange: () => {
|
|
3696
3705
|
},
|
|
@@ -3700,25 +3709,25 @@ const Rs = () => [
|
|
|
3700
3709
|
width: "140px"
|
|
3701
3710
|
}),
|
|
3702
3711
|
departure: ie((e) => e.departure, {
|
|
3703
|
-
itemLabelFormatter: (e) =>
|
|
3712
|
+
itemLabelFormatter: (e) => Ta(e, "yyyy-MM-dd"),
|
|
3704
3713
|
borderLeft: !0
|
|
3705
3714
|
})
|
|
3706
3715
|
},
|
|
3707
3716
|
columnOrder: ["id", "active", "name", "ship", "numPassengers", "departure"]
|
|
3708
|
-
},
|
|
3717
|
+
}, cs = Ea(), is = (e) => {
|
|
3709
3718
|
const [t, n] = Se(e), r = S(
|
|
3710
|
-
(
|
|
3719
|
+
(a, c) => {
|
|
3711
3720
|
n(
|
|
3712
|
-
ht(t,
|
|
3721
|
+
ht(t, a.id, {
|
|
3713
3722
|
numPassengers: c ? parseInt(c) : void 0
|
|
3714
3723
|
})
|
|
3715
3724
|
);
|
|
3716
3725
|
},
|
|
3717
3726
|
[t, n]
|
|
3718
3727
|
), o = S(
|
|
3719
|
-
(
|
|
3728
|
+
(a, c) => {
|
|
3720
3729
|
n(
|
|
3721
|
-
ht(t,
|
|
3730
|
+
ht(t, a.id, {
|
|
3722
3731
|
active: c
|
|
3723
3732
|
})
|
|
3724
3733
|
);
|
|
@@ -3733,36 +3742,36 @@ const Rs = () => [
|
|
|
3733
3742
|
};
|
|
3734
3743
|
export {
|
|
3735
3744
|
xt as CrudStatusIndicator,
|
|
3736
|
-
|
|
3745
|
+
rs as EditableTextCellWithCrudAndModified,
|
|
3737
3746
|
Ct as GridHooksContext,
|
|
3738
|
-
|
|
3747
|
+
Ua as GridHooksTable,
|
|
3739
3748
|
Tn as ModifiedField,
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3749
|
+
Ja as SmallTableCell,
|
|
3750
|
+
Za as SmallTableHead,
|
|
3751
|
+
os as StandardTable,
|
|
3743
3752
|
Et as StandardTableActionsContext,
|
|
3744
|
-
|
|
3753
|
+
Jr as StandardTableCell,
|
|
3745
3754
|
Qr as StandardTableCellUi,
|
|
3746
3755
|
Mt as StandardTableConfigContext,
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3756
|
+
mo as StandardTableContent,
|
|
3757
|
+
xo as StandardTableHeadRow,
|
|
3758
|
+
eo as StandardTableRow,
|
|
3750
3759
|
Fr as StandardTableRowCheckbox,
|
|
3751
|
-
|
|
3760
|
+
fo as StandardTableRowList,
|
|
3752
3761
|
Dt as StandardTableStateContext,
|
|
3753
3762
|
Tt as StandardTableTableIdContext,
|
|
3754
3763
|
Dn as TableCell,
|
|
3755
|
-
|
|
3764
|
+
es as TableColumnGroupHead,
|
|
3756
3765
|
ze as TableHeadItem,
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3766
|
+
ts as TableHeadRow,
|
|
3767
|
+
ns as TableRow,
|
|
3768
|
+
Xr as TextCell,
|
|
3760
3769
|
ie as createColumnConfig,
|
|
3761
|
-
|
|
3770
|
+
as as createEditableTextCellWithStatus,
|
|
3762
3771
|
Ft as createGroupConfigAndIdsForRows,
|
|
3763
3772
|
rr as createInternalStandardTableActions,
|
|
3764
|
-
|
|
3765
|
-
|
|
3773
|
+
Ea as createItemsMocks,
|
|
3774
|
+
ko as createStandardEditableTextCell,
|
|
3766
3775
|
Tr as createStandardTableActions,
|
|
3767
3776
|
Rt as createStandardTableInitialState,
|
|
3768
3777
|
or as createStandardTableReducer,
|
|
@@ -3772,11 +3781,11 @@ export {
|
|
|
3772
3781
|
Vr as formatColumnIdToHeaderCellLabel,
|
|
3773
3782
|
jr as formatValueLabel,
|
|
3774
3783
|
Le as hasIndicatorContent,
|
|
3775
|
-
|
|
3784
|
+
cs as mockedItems,
|
|
3776
3785
|
Br as multitypeComparator,
|
|
3777
3786
|
ht as setListItemFields,
|
|
3778
3787
|
St as smallTableRowWidth,
|
|
3779
|
-
|
|
3788
|
+
ss as standardTableConfigForStories,
|
|
3780
3789
|
kt as tableBackgroundColorExpanded,
|
|
3781
3790
|
Rn as tableBackgroundHoverColorExpanded,
|
|
3782
3791
|
pe as tableBorder,
|
|
@@ -3795,15 +3804,15 @@ export {
|
|
|
3795
3804
|
er as useGridNavigation,
|
|
3796
3805
|
Pt as useGridNavigationOptionsFromContext,
|
|
3797
3806
|
lr as useLastColumnConfig,
|
|
3798
|
-
|
|
3807
|
+
is as useListState,
|
|
3799
3808
|
Dr as useLocalStateTableContext,
|
|
3800
3809
|
Bn as useRevertableValue,
|
|
3801
3810
|
Yr as useRowCheckbox,
|
|
3802
3811
|
Ce as useStandardTableActions,
|
|
3803
3812
|
I as useStandardTableConfig,
|
|
3804
3813
|
qe as useStandardTableId,
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3814
|
+
ae as useStandardTableState,
|
|
3815
|
+
wo as useTableHeadCheckbox,
|
|
3816
|
+
po as useTableSortHeader
|
|
3808
3817
|
};
|
|
3809
3818
|
//# sourceMappingURL=index.es.js.map
|