@stenajs-webui/grid 23.21.6 → 23.21.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/standard-table/config/StandardTableColumnConfig.d.ts +1 -1
- package/dist/features/standard-table/context/StandardTableSelectionStoreContext.d.ts +11 -0
- package/dist/features/standard-table/hooks/UseCellBackground.d.ts +2 -2
- package/dist/index.es.js +975 -946
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as s, Fragment as E, jsxs as
|
|
1
|
+
import { jsx as s, Fragment as E, jsxs as C } from "react/jsx-runtime";
|
|
2
2
|
import * as R from "react";
|
|
3
|
-
import { useMemo as b, useRef as
|
|
4
|
-
import { InputSpinner as
|
|
3
|
+
import { useMemo as b, useRef as Q, useState as Se, useCallback as P, useEffect as ft, useContext as N, createContext as F, useLayoutEffect as tn, useSyncExternalStore as nn, useReducer as rn, useId as on } from "react";
|
|
4
|
+
import { InputSpinner as We, Icon as Z, stenaExclamationTriangle as Oe, stenaArrowRight as pt, stenaSortUpMini as sn, stenaSortDownMini as an, stenaInfoCircle as cn, FlatButton as Fe, stenaDotsVertical as ln, stenaAngleDown as gt, stenaAngleRight as wt, ResultListBanner as dn, Banner as Qe } from "@stenajs-webui/elements";
|
|
5
5
|
import { cssColor as j } from "@stenajs-webui/theme";
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { Text as
|
|
8
|
-
import
|
|
9
|
-
import { TextInput as
|
|
10
|
-
import { useDispatch as
|
|
11
|
-
import { createEntityActions as
|
|
12
|
-
import { combineReducers as
|
|
13
|
-
import { LoadingScreen as
|
|
14
|
-
import { compact as
|
|
15
|
-
import
|
|
16
|
-
import './index.css';const
|
|
6
|
+
import { Tooltip as be, Popover as un } from "@stenajs-webui/tooltip";
|
|
7
|
+
import { Text as ee, Indent as G, Space as M, Row as I, Box as ue, Heading as yt, booleanOrNumberToNumber as hn, useArraySet as bt, useOnScreen as mn, Spacing as Re } from "@stenajs-webui/core";
|
|
8
|
+
import vt from "classnames";
|
|
9
|
+
import { TextInput as Be, Checkbox as Le } from "@stenajs-webui/forms";
|
|
10
|
+
import { useDispatch as fn, useSelector as Xe } from "react-redux";
|
|
11
|
+
import { createEntityActions as pn, createSelectedIdsActions as Ue, createSortOrderActions as gn, createSelectedIdsReducerInitialState as Je, createSortOrderReducerInitialState as wn, reducerIdGate as ke, createSortOrderReducer as yn, createSelectedIdsReducer as Ze, createEntityReducer as bn, reducerIdGateAction as oe } from "@stenajs-webui/redux";
|
|
12
|
+
import { combineReducers as vn } from "redux";
|
|
13
|
+
import { LoadingScreen as Cn, ErrorScreen as xn } from "@stenajs-webui/panels";
|
|
14
|
+
import { compact as kn, upperFirst as Sn, lowerCase as Pn } from "lodash-es";
|
|
15
|
+
import On from "@emotion/styled";
|
|
16
|
+
import './index.css';const Ct = R.createContext({}), js = ({
|
|
17
17
|
children: e,
|
|
18
18
|
numCols: t,
|
|
19
19
|
numRows: n,
|
|
@@ -24,60 +24,60 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
24
24
|
() => ({ numCols: t, numRows: n, tableId: r, wrap: o }),
|
|
25
25
|
[t, n, r, o]
|
|
26
26
|
);
|
|
27
|
-
return /* @__PURE__ */ s(
|
|
28
|
-
},
|
|
27
|
+
return /* @__PURE__ */ s(Ct.Provider, { value: a, children: e });
|
|
28
|
+
}, Ae = (e) => {
|
|
29
29
|
const { loading: t, creating: n, deleting: r, updating: o, hasError: a } = e;
|
|
30
30
|
return !!(t || n || r || o || a);
|
|
31
|
-
},
|
|
32
|
-
if (!e || !
|
|
31
|
+
}, xt = ({ crudStatus: e }) => {
|
|
32
|
+
if (!e || !Ae(e))
|
|
33
33
|
return null;
|
|
34
34
|
const { errorMessage: t, hasError: n, loading: r, creating: o, deleting: a, updating: i } = e;
|
|
35
35
|
if (r || o || a || i)
|
|
36
|
-
return /* @__PURE__ */ s(
|
|
36
|
+
return /* @__PURE__ */ s(We, { color: j("--lhds-color-ui-500") });
|
|
37
37
|
if (n) {
|
|
38
38
|
const c = /* @__PURE__ */ s(
|
|
39
|
-
|
|
39
|
+
Z,
|
|
40
40
|
{
|
|
41
|
-
icon:
|
|
41
|
+
icon: Oe,
|
|
42
42
|
color: j("--lhds-color-orange-600"),
|
|
43
43
|
size: 14
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
|
-
return /* @__PURE__ */ s(E, { children: t ? /* @__PURE__ */ s(
|
|
46
|
+
return /* @__PURE__ */ s(E, { children: t ? /* @__PURE__ */ s(be, { label: t, children: c }) : c });
|
|
47
47
|
}
|
|
48
48
|
return null;
|
|
49
|
-
},
|
|
49
|
+
}, In = ({
|
|
50
50
|
isEditable: e,
|
|
51
51
|
warningOnEmpty: t,
|
|
52
52
|
value: n,
|
|
53
53
|
modifiedField: r,
|
|
54
54
|
crudStatus: o
|
|
55
55
|
}) => {
|
|
56
|
-
const a = t && r?.modified && r?.newValue === "", i = o &&
|
|
57
|
-
return /* @__PURE__ */
|
|
56
|
+
const a = t && r?.modified && r?.newValue === "", i = o && Ae(o), c = a || i;
|
|
57
|
+
return /* @__PURE__ */ C(E, { children: [
|
|
58
58
|
/* @__PURE__ */ s(
|
|
59
|
-
|
|
59
|
+
ee,
|
|
60
60
|
{
|
|
61
61
|
color: e ? "var(--swui-primary-action-color)" : void 0,
|
|
62
62
|
variant: r?.modified ? "bold" : void 0,
|
|
63
63
|
children: n
|
|
64
64
|
}
|
|
65
65
|
),
|
|
66
|
-
r?.newValue !== void 0 && /* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(
|
|
68
|
-
/* @__PURE__ */ s(
|
|
66
|
+
r?.newValue !== void 0 && /* @__PURE__ */ C(E, { children: [
|
|
67
|
+
/* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(Z, { icon: pt, size: 12 }) }),
|
|
68
|
+
/* @__PURE__ */ s(ee, { color: "var(--swui-primary-action-color)", variant: "bold", children: r.newValue })
|
|
69
69
|
] }),
|
|
70
70
|
c && /* @__PURE__ */ s(M, {}),
|
|
71
|
-
a ? /* @__PURE__ */ s(
|
|
72
|
-
|
|
71
|
+
a ? /* @__PURE__ */ s(be, { label: t, children: /* @__PURE__ */ s(
|
|
72
|
+
Z,
|
|
73
73
|
{
|
|
74
|
-
icon:
|
|
74
|
+
icon: Oe,
|
|
75
75
|
color: j("--lhds-color-orange-600"),
|
|
76
76
|
size: 14
|
|
77
77
|
}
|
|
78
|
-
) }) : /* @__PURE__ */ s(
|
|
78
|
+
) }) : /* @__PURE__ */ s(xt, { crudStatus: o })
|
|
79
79
|
] });
|
|
80
|
-
},
|
|
80
|
+
}, Tn = ({
|
|
81
81
|
alignItems: e = "center",
|
|
82
82
|
justifyContent: t = "flex-start",
|
|
83
83
|
overflow: n = "hidden",
|
|
@@ -93,21 +93,21 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
93
93
|
indent: r,
|
|
94
94
|
...o
|
|
95
95
|
}
|
|
96
|
-
),
|
|
97
|
-
|
|
96
|
+
), Dn = "var(--lhds-color-ui-300)", En = "var(--lhds-color-blue-500)", kt = "var(--lhds-color-blue-50)", Rn = "var(--lhds-color-blue-100)", we = `1px solid ${Dn}`, Mn = "1px solid transparent", He = "var(--swui-expand-highlight-border-width) solid transparent", St = `var(--swui-expand-highlight-border-width) solid ${En}`, Ne = "40px", Ye = "40px", Pt = "40px", Vs = (e) => /* @__PURE__ */ s(
|
|
97
|
+
Tn,
|
|
98
98
|
{
|
|
99
|
-
width:
|
|
99
|
+
width: Pt,
|
|
100
100
|
justifyContent: "center",
|
|
101
101
|
...e
|
|
102
102
|
}
|
|
103
|
-
),
|
|
104
|
-
|
|
103
|
+
), et = ({ direction: e }) => /* @__PURE__ */ s(ue, { width: "14px", children: /* @__PURE__ */ s(
|
|
104
|
+
Z,
|
|
105
105
|
{
|
|
106
106
|
size: 14,
|
|
107
107
|
color: j("--lhds-color-ui-500"),
|
|
108
|
-
icon: e === "up" ?
|
|
108
|
+
icon: e === "up" ? sn : an
|
|
109
109
|
}
|
|
110
|
-
) }),
|
|
110
|
+
) }), ze = R.memo(
|
|
111
111
|
({
|
|
112
112
|
label: e,
|
|
113
113
|
arrow: t,
|
|
@@ -118,64 +118,64 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
118
118
|
loading: i,
|
|
119
119
|
infoIconTooltipAppendTo: c,
|
|
120
120
|
infoIconTooltipText: l,
|
|
121
|
-
infoIconTooltipZIndex:
|
|
121
|
+
infoIconTooltipZIndex: u,
|
|
122
122
|
columnHeadContent: d,
|
|
123
|
-
overflow:
|
|
123
|
+
overflow: h = "hidden",
|
|
124
124
|
alignRight: f,
|
|
125
125
|
...p
|
|
126
126
|
}) => {
|
|
127
|
-
const g =
|
|
128
|
-
return /* @__PURE__ */
|
|
127
|
+
const g = Q(null), m = n ? { cursor: "pointer", userSelect: "none" } : void 0, w = !e && !t && !l;
|
|
128
|
+
return /* @__PURE__ */ C(
|
|
129
129
|
I,
|
|
130
130
|
{
|
|
131
131
|
height: "100%",
|
|
132
132
|
alignItems: "center",
|
|
133
133
|
ref: g,
|
|
134
|
-
overflow:
|
|
134
|
+
overflow: h,
|
|
135
135
|
justifyContent: f ? "flex-end" : "flex-start",
|
|
136
136
|
borderTop: "2px solid transparent",
|
|
137
137
|
borderBottom: `2px solid ${o ? j("--lhds-color-blue-500") : "transparent"}`,
|
|
138
138
|
...p,
|
|
139
139
|
children: [
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
!t && f && /* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ C(I, { alignItems: "center", indent: !0, children: [
|
|
141
|
+
!t && f && /* @__PURE__ */ C(E, { children: [
|
|
142
142
|
/* @__PURE__ */ s(M, {}),
|
|
143
|
-
/* @__PURE__ */ s(
|
|
143
|
+
/* @__PURE__ */ s(ue, { width: "14px" }),
|
|
144
144
|
/* @__PURE__ */ s(M, { num: 0.5 })
|
|
145
145
|
] }),
|
|
146
|
-
(r || e) && /* @__PURE__ */
|
|
147
|
-
r && /* @__PURE__ */
|
|
146
|
+
(r || e) && /* @__PURE__ */ C(I, { onClick: n, style: m, alignItems: "center", children: [
|
|
147
|
+
r && /* @__PURE__ */ C(E, { children: [
|
|
148
148
|
r,
|
|
149
149
|
!w && /* @__PURE__ */ s(M, { num: 0.5 })
|
|
150
150
|
] }),
|
|
151
|
-
t && f && /* @__PURE__ */
|
|
151
|
+
t && f && /* @__PURE__ */ C(E, { children: [
|
|
152
152
|
/* @__PURE__ */ s(M, {}),
|
|
153
|
-
/* @__PURE__ */ s(
|
|
153
|
+
/* @__PURE__ */ s(et, { direction: t }),
|
|
154
154
|
/* @__PURE__ */ s(M, { num: 0.5 })
|
|
155
155
|
] }),
|
|
156
|
-
e && /* @__PURE__ */ s(
|
|
157
|
-
t && !f && /* @__PURE__ */
|
|
156
|
+
e && /* @__PURE__ */ s(yt, { variant: "h6", style: { textAlign: "left" }, children: e }),
|
|
157
|
+
t && !f && /* @__PURE__ */ C(E, { children: [
|
|
158
158
|
/* @__PURE__ */ s(M, { num: 0.5 }),
|
|
159
|
-
/* @__PURE__ */ s(
|
|
159
|
+
/* @__PURE__ */ s(et, { direction: t }),
|
|
160
160
|
/* @__PURE__ */ s(M, {})
|
|
161
161
|
] })
|
|
162
162
|
] }),
|
|
163
|
-
d && /* @__PURE__ */
|
|
163
|
+
d && /* @__PURE__ */ C(E, { children: [
|
|
164
164
|
/* @__PURE__ */ s(M, {}),
|
|
165
165
|
/* @__PURE__ */ s(I, { children: d })
|
|
166
166
|
] }),
|
|
167
|
-
l && /* @__PURE__ */
|
|
167
|
+
l && /* @__PURE__ */ C(E, { children: [
|
|
168
168
|
/* @__PURE__ */ s(M, {}),
|
|
169
169
|
/* @__PURE__ */ s(I, { onClick: (y) => y.stopPropagation(), children: /* @__PURE__ */ s(
|
|
170
|
-
|
|
170
|
+
be,
|
|
171
171
|
{
|
|
172
172
|
appendTo: c,
|
|
173
173
|
label: l,
|
|
174
|
-
zIndex:
|
|
174
|
+
zIndex: u,
|
|
175
175
|
children: /* @__PURE__ */ s(
|
|
176
|
-
|
|
176
|
+
Z,
|
|
177
177
|
{
|
|
178
|
-
icon:
|
|
178
|
+
icon: cn,
|
|
179
179
|
size: 14,
|
|
180
180
|
color: j("--lhds-color-blue-400")
|
|
181
181
|
}
|
|
@@ -185,13 +185,13 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
185
185
|
] }),
|
|
186
186
|
(d || l) && /* @__PURE__ */ s(M, {})
|
|
187
187
|
] }),
|
|
188
|
-
/* @__PURE__ */ s(I, { children: i ? /* @__PURE__ */ s(
|
|
189
|
-
|
|
188
|
+
/* @__PURE__ */ s(I, { children: i ? /* @__PURE__ */ s(We, {}) : a ? /* @__PURE__ */ s(
|
|
189
|
+
un,
|
|
190
190
|
{
|
|
191
191
|
renderTrigger: (y) => /* @__PURE__ */ s(
|
|
192
|
-
|
|
192
|
+
Fe,
|
|
193
193
|
{
|
|
194
|
-
leftIcon:
|
|
194
|
+
leftIcon: ln,
|
|
195
195
|
size: "small",
|
|
196
196
|
...y
|
|
197
197
|
}
|
|
@@ -201,53 +201,53 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
201
201
|
children: a
|
|
202
202
|
}
|
|
203
203
|
) : null }),
|
|
204
|
-
!t && !f && /* @__PURE__ */
|
|
204
|
+
!t && !f && /* @__PURE__ */ C(E, { children: [
|
|
205
205
|
/* @__PURE__ */ s(M, {}),
|
|
206
|
-
/* @__PURE__ */ s(
|
|
206
|
+
/* @__PURE__ */ s(ue, { width: "14px" }),
|
|
207
207
|
/* @__PURE__ */ s(M, { num: 0.5 })
|
|
208
208
|
] })
|
|
209
209
|
]
|
|
210
210
|
}
|
|
211
211
|
);
|
|
212
212
|
}
|
|
213
|
-
),
|
|
214
|
-
|
|
213
|
+
), Ks = (e) => /* @__PURE__ */ s(
|
|
214
|
+
ze,
|
|
215
215
|
{
|
|
216
|
-
width:
|
|
216
|
+
width: Pt,
|
|
217
217
|
justifyContent: "center",
|
|
218
218
|
...e
|
|
219
219
|
}
|
|
220
|
-
),
|
|
220
|
+
), $s = ({
|
|
221
221
|
label: e,
|
|
222
222
|
flex: t,
|
|
223
223
|
width: n,
|
|
224
224
|
indent: r = 1,
|
|
225
|
-
height: o =
|
|
226
|
-
}) => /* @__PURE__ */ s(
|
|
227
|
-
({ style: e, height: t =
|
|
228
|
-
),
|
|
229
|
-
tableRow:
|
|
230
|
-
},
|
|
225
|
+
height: o = Ye
|
|
226
|
+
}) => /* @__PURE__ */ s(ze, { width: n, flex: t, height: o, children: /* @__PURE__ */ s(ue, { indent: r, spacing: !0, children: /* @__PURE__ */ s(ee, { variant: "bold", children: e }) }) }), Qs = R.memo(
|
|
227
|
+
({ style: e, height: t = Ye, ...n }) => /* @__PURE__ */ s(I, { style: e, height: t, ...n })
|
|
228
|
+
), Gn = "_tableRow_1cphw_1", Wn = {
|
|
229
|
+
tableRow: Gn
|
|
230
|
+
}, Xs = ({
|
|
231
231
|
hideBorderTop: e,
|
|
232
|
-
height: t =
|
|
232
|
+
height: t = Ye,
|
|
233
233
|
className: n,
|
|
234
234
|
...r
|
|
235
235
|
}) => /* @__PURE__ */ s(
|
|
236
236
|
I,
|
|
237
237
|
{
|
|
238
|
-
borderTop: e ?
|
|
238
|
+
borderTop: e ? Mn : we,
|
|
239
239
|
height: t,
|
|
240
|
-
className:
|
|
240
|
+
className: vt(Wn.tableRow, n),
|
|
241
241
|
...r
|
|
242
242
|
}
|
|
243
|
-
),
|
|
244
|
-
const [t, n] =
|
|
243
|
+
), Fn = (e) => {
|
|
244
|
+
const [t, n] = Se(e), r = Q(e), o = Q(e), a = P(
|
|
245
245
|
(d) => {
|
|
246
246
|
n(d), o.current = d;
|
|
247
247
|
},
|
|
248
248
|
[n, o]
|
|
249
249
|
);
|
|
250
|
-
|
|
250
|
+
ft(() => {
|
|
251
251
|
a(e);
|
|
252
252
|
}, [a, e]);
|
|
253
253
|
const i = P(() => {
|
|
@@ -260,16 +260,16 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
260
260
|
), l = P(
|
|
261
261
|
(d) => r.current = d,
|
|
262
262
|
[r]
|
|
263
|
-
),
|
|
263
|
+
), u = P(() => o.current, [o]);
|
|
264
264
|
return {
|
|
265
265
|
value: t,
|
|
266
266
|
setValue: a,
|
|
267
267
|
setRevertValue: l,
|
|
268
268
|
revert: i,
|
|
269
269
|
commit: c,
|
|
270
|
-
getValue:
|
|
270
|
+
getValue: u
|
|
271
271
|
};
|
|
272
|
-
},
|
|
272
|
+
}, Bn = (e) => ({
|
|
273
273
|
altKey: e.altKey,
|
|
274
274
|
charCode: e.charCode,
|
|
275
275
|
ctrlKey: e.ctrlKey,
|
|
@@ -281,36 +281,36 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
281
281
|
repeat: e.repeat,
|
|
282
282
|
shiftKey: e.shiftKey,
|
|
283
283
|
which: e.which
|
|
284
|
-
}),
|
|
284
|
+
}), Ln = (e) => e, An = (e, {
|
|
285
285
|
isEditable: t = !1,
|
|
286
286
|
allowedInputType: n = "all",
|
|
287
287
|
onChange: r,
|
|
288
288
|
onStartEditing: o,
|
|
289
289
|
onStopEditing: a,
|
|
290
|
-
transformEnteredValue: i =
|
|
290
|
+
transformEnteredValue: i = Ln
|
|
291
291
|
}) => {
|
|
292
|
-
const [c, l] =
|
|
292
|
+
const [c, l] = Se(!1), [u, d] = Se(
|
|
293
293
|
void 0
|
|
294
|
-
),
|
|
295
|
-
(
|
|
296
|
-
t && (g(e), m(e), l(!0), o && o(
|
|
294
|
+
), h = Fn(e), { getValue: f, revert: p, setValue: g, setRevertValue: m } = h, w = P(
|
|
295
|
+
(v) => {
|
|
296
|
+
t && (g(e), m(e), l(!0), o && o(v));
|
|
297
297
|
},
|
|
298
298
|
[t, o, m, g, e]
|
|
299
299
|
), y = P(() => {
|
|
300
300
|
t && (l(!1), a && a(), r && r(f()));
|
|
301
|
-
}, [t, r, a, f, l]),
|
|
301
|
+
}, [t, r, a, f, l]), k = P(() => {
|
|
302
302
|
t && (l(!1), a && a(), p());
|
|
303
303
|
}, [t, a, p, l]);
|
|
304
304
|
return {
|
|
305
305
|
onKeyDown: b(
|
|
306
|
-
() =>
|
|
306
|
+
() => _n(
|
|
307
307
|
c,
|
|
308
308
|
t,
|
|
309
309
|
w,
|
|
310
310
|
d,
|
|
311
311
|
n,
|
|
312
312
|
i,
|
|
313
|
-
|
|
313
|
+
h
|
|
314
314
|
),
|
|
315
315
|
[
|
|
316
316
|
c,
|
|
@@ -319,45 +319,45 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
319
319
|
d,
|
|
320
320
|
n,
|
|
321
321
|
i,
|
|
322
|
-
|
|
322
|
+
h
|
|
323
323
|
]
|
|
324
324
|
),
|
|
325
325
|
isEditing: c,
|
|
326
|
-
lastKeyEvent:
|
|
327
|
-
revertableValue:
|
|
326
|
+
lastKeyEvent: u,
|
|
327
|
+
revertableValue: h,
|
|
328
328
|
startEditing: w,
|
|
329
329
|
stopEditing: y,
|
|
330
|
-
stopEditingAndRevert:
|
|
330
|
+
stopEditingAndRevert: k,
|
|
331
331
|
onDoubleClick: w
|
|
332
332
|
};
|
|
333
|
-
},
|
|
333
|
+
}, Hn = (e) => e === "all" || e === "numeric" || e === "alphanumeric", Nn = (e) => e === "all" || e === "alphanumeric" || e === "letters", Yn = (e) => !!e.match(/^[-+*<>]$/), zn = (e) => !!e.match(/^[a-zA-Z0-9]$/), qn = (e) => !isNaN(parseInt(e, 10)), _n = (e, t, n, r, o, a, i) => (c) => {
|
|
334
334
|
if (!(c.ctrlKey || c.metaKey || c.shiftKey)) {
|
|
335
335
|
if (c.key === "Enter" && t)
|
|
336
336
|
r(void 0), n(), i.commit(), c.preventDefault(), c.stopPropagation();
|
|
337
337
|
else if (t) {
|
|
338
|
-
const l =
|
|
339
|
-
(
|
|
338
|
+
const l = Bn(c);
|
|
339
|
+
(qn(c.key) && Hn(o) || zn(c.key) && Nn(o) || Yn(c.key)) && (n(l), r(l), i.commit(), i.setValue(a(l.key)), c.preventDefault(), c.stopPropagation());
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
},
|
|
342
|
+
}, jn = (e, t, n, r) => {
|
|
343
343
|
let o = e, a = t;
|
|
344
344
|
return t > r && (a = 0), t < 0 && (a = r), e > n && (o = 0), e < 0 && (o = n), {
|
|
345
345
|
realX: o,
|
|
346
346
|
realY: a
|
|
347
347
|
};
|
|
348
|
-
},
|
|
349
|
-
rowIndex:
|
|
350
|
-
colIndex:
|
|
351
|
-
}),
|
|
352
|
-
const r =
|
|
348
|
+
}, tt = (e, t, n) => Math.max(Math.min(e, n), t), Vn = (e, t, n) => ({
|
|
349
|
+
rowIndex: tt(e.rowIndex, 0, t),
|
|
350
|
+
colIndex: tt(e.colIndex, 0, n)
|
|
351
|
+
}), Kn = (e, t, n) => {
|
|
352
|
+
const r = jn(e.colIndex, e.rowIndex, n, t);
|
|
353
353
|
return {
|
|
354
354
|
rowIndex: r.realY,
|
|
355
355
|
colIndex: r.realX
|
|
356
356
|
};
|
|
357
|
-
},
|
|
358
|
-
const i =
|
|
359
|
-
return a === "clamped" ?
|
|
360
|
-
},
|
|
357
|
+
}, $n = (e, t, n, r, o, a = "clamped") => {
|
|
358
|
+
const i = Qn(e, t, o);
|
|
359
|
+
return a === "clamped" ? Vn(i, n - 1, r - 1) : a === "wrapped" ? Kn(i, n - 1, r - 1) : i;
|
|
360
|
+
}, Qn = (e, t, n) => n === "up" ? {
|
|
361
361
|
rowIndex: e - 1,
|
|
362
362
|
colIndex: t
|
|
363
363
|
} : n === "down" ? {
|
|
@@ -372,7 +372,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
372
372
|
} : {
|
|
373
373
|
rowIndex: e,
|
|
374
374
|
colIndex: t
|
|
375
|
-
},
|
|
375
|
+
}, Xn = (e) => e.replace(/^[^a-z]+|[^\w:.-]+/gi, ""), Un = (e) => {
|
|
376
376
|
if (!e.tableId)
|
|
377
377
|
throw new Error("tableId is required.");
|
|
378
378
|
if (e.numRows == null)
|
|
@@ -380,16 +380,16 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
380
380
|
if (e.numCols == null)
|
|
381
381
|
throw new Error("numCols is required.");
|
|
382
382
|
return e;
|
|
383
|
-
},
|
|
384
|
-
const t =
|
|
383
|
+
}, Ot = (e) => {
|
|
384
|
+
const t = N(Ct);
|
|
385
385
|
return b(
|
|
386
|
-
() =>
|
|
386
|
+
() => Un({
|
|
387
387
|
...t,
|
|
388
388
|
...e
|
|
389
389
|
}),
|
|
390
390
|
[t, e]
|
|
391
391
|
);
|
|
392
|
-
},
|
|
392
|
+
}, Jn = (e) => {
|
|
393
393
|
const {
|
|
394
394
|
rowIndex: t,
|
|
395
395
|
colIndex: n,
|
|
@@ -399,8 +399,8 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
399
399
|
edgeMode: i,
|
|
400
400
|
onCellMove: c,
|
|
401
401
|
onCellNavigation: l
|
|
402
|
-
} =
|
|
403
|
-
() =>
|
|
402
|
+
} = Ot(e), u = b(
|
|
403
|
+
() => Zn(
|
|
404
404
|
a,
|
|
405
405
|
t,
|
|
406
406
|
n,
|
|
@@ -421,58 +421,58 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
421
421
|
l
|
|
422
422
|
]
|
|
423
423
|
), d = b(
|
|
424
|
-
() =>
|
|
425
|
-
[
|
|
426
|
-
),
|
|
427
|
-
() =>
|
|
424
|
+
() => er(u),
|
|
425
|
+
[u]
|
|
426
|
+
), h = b(
|
|
427
|
+
() => It(a, t, n),
|
|
428
428
|
[a, t, n]
|
|
429
429
|
), f = b(
|
|
430
430
|
() => ({
|
|
431
431
|
tabIndex: 0,
|
|
432
432
|
onKeyDown: d,
|
|
433
|
-
id:
|
|
433
|
+
id: h
|
|
434
434
|
}),
|
|
435
|
-
[d,
|
|
435
|
+
[d, h]
|
|
436
436
|
);
|
|
437
437
|
return {
|
|
438
|
-
focusOnCell:
|
|
439
|
-
moveHandler:
|
|
438
|
+
focusOnCell: Tt,
|
|
439
|
+
moveHandler: u,
|
|
440
440
|
requiredProps: f
|
|
441
441
|
};
|
|
442
|
-
},
|
|
443
|
-
const
|
|
442
|
+
}, Zn = (e, t, n, r, o, a, i, c) => (l) => {
|
|
443
|
+
const u = $n(
|
|
444
444
|
t,
|
|
445
445
|
n,
|
|
446
446
|
r,
|
|
447
447
|
o,
|
|
448
448
|
l,
|
|
449
449
|
a
|
|
450
|
-
), d = n !==
|
|
451
|
-
(d ||
|
|
450
|
+
), d = n !== u.colIndex, h = t !== u.rowIndex;
|
|
451
|
+
(d || h) && (i && i({
|
|
452
452
|
direction: l,
|
|
453
453
|
fromRowIndex: t,
|
|
454
454
|
fromColIndex: n,
|
|
455
|
-
rowIndex:
|
|
456
|
-
colIndex:
|
|
455
|
+
rowIndex: u.rowIndex,
|
|
456
|
+
colIndex: u.colIndex,
|
|
457
457
|
colDidChange: d,
|
|
458
|
-
rowDidChange:
|
|
459
|
-
}),
|
|
458
|
+
rowDidChange: h
|
|
459
|
+
}), Tt(e, u)), c && c({
|
|
460
460
|
direction: l,
|
|
461
461
|
fromRowIndex: t,
|
|
462
462
|
fromColIndex: n,
|
|
463
|
-
rowIndex:
|
|
464
|
-
colIndex:
|
|
463
|
+
rowIndex: u.rowIndex,
|
|
464
|
+
colIndex: u.colIndex,
|
|
465
465
|
colDidChange: d,
|
|
466
|
-
rowDidChange:
|
|
467
|
-
cellDidChange: d ||
|
|
466
|
+
rowDidChange: h,
|
|
467
|
+
cellDidChange: d || h
|
|
468
468
|
});
|
|
469
|
-
},
|
|
469
|
+
}, It = (e, t, n) => Xn(`table-${e}-${t}-${n}`), er = (e) => (t) => t.key === "ArrowLeft" ? (e("left"), t.preventDefault(), t.stopPropagation(), !0) : t.key === "ArrowUp" ? (e("up"), t.preventDefault(), t.stopPropagation(), !0) : t.key === "ArrowRight" ? (e("right"), t.preventDefault(), t.stopPropagation(), !0) : t.key === "ArrowDown" ? (e("down"), t.preventDefault(), t.stopPropagation(), !0) : !1, Tt = (e, t) => {
|
|
470
470
|
const n = document.getElementById(
|
|
471
|
-
|
|
471
|
+
It(e, t.rowIndex, t.colIndex)
|
|
472
472
|
);
|
|
473
473
|
n && n.focus();
|
|
474
|
-
},
|
|
475
|
-
const { tableId: n } =
|
|
474
|
+
}, Ie = (e, t) => {
|
|
475
|
+
const { tableId: n } = Ot(t), r = Jn(t), o = An(e, t), a = b(
|
|
476
476
|
() => ({
|
|
477
477
|
rowIndex: t.rowIndex,
|
|
478
478
|
colIndex: t.colIndex
|
|
@@ -484,7 +484,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
484
484
|
o.stopEditing(), r.focusOnCell(n, a);
|
|
485
485
|
}, [o, r, n, a]), l = P(() => {
|
|
486
486
|
o.stopEditingAndRevert(), r.focusOnCell(n, a);
|
|
487
|
-
}, [o, r, n, a]),
|
|
487
|
+
}, [o, r, n, a]), u = P(
|
|
488
488
|
(p) => {
|
|
489
489
|
o.stopEditing(), r.moveHandler(p);
|
|
490
490
|
},
|
|
@@ -494,7 +494,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
494
494
|
r.moveHandler(p);
|
|
495
495
|
},
|
|
496
496
|
[r]
|
|
497
|
-
),
|
|
497
|
+
), h = P(
|
|
498
498
|
(p) => {
|
|
499
499
|
o.isEditing || r.requiredProps.onKeyDown(p) || o.onKeyDown(p);
|
|
500
500
|
},
|
|
@@ -502,10 +502,10 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
502
502
|
), f = b(
|
|
503
503
|
() => ({
|
|
504
504
|
...r.requiredProps,
|
|
505
|
-
onKeyDown:
|
|
505
|
+
onKeyDown: h,
|
|
506
506
|
onDoubleClick: o.onDoubleClick
|
|
507
507
|
}),
|
|
508
|
-
[
|
|
508
|
+
[h, o.onDoubleClick, r.requiredProps]
|
|
509
509
|
);
|
|
510
510
|
return {
|
|
511
511
|
isEditing: o.isEditing,
|
|
@@ -518,9 +518,9 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
518
518
|
startEditing: i,
|
|
519
519
|
stopEditing: c,
|
|
520
520
|
stopEditingAndRevert: l,
|
|
521
|
-
stopEditingAndMove:
|
|
521
|
+
stopEditingAndMove: u
|
|
522
522
|
};
|
|
523
|
-
},
|
|
523
|
+
}, Us = function({
|
|
524
524
|
allowedInputType: t,
|
|
525
525
|
value: n = "",
|
|
526
526
|
entityId: r,
|
|
@@ -529,14 +529,14 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
529
529
|
crudStatusRedux: i,
|
|
530
530
|
modifiedFieldsRedux: c,
|
|
531
531
|
colIndex: l,
|
|
532
|
-
rowIndex:
|
|
532
|
+
rowIndex: u,
|
|
533
533
|
numCols: d,
|
|
534
|
-
numRows:
|
|
534
|
+
numRows: h,
|
|
535
535
|
warningOnEmpty: f
|
|
536
536
|
}) {
|
|
537
|
-
const p =
|
|
537
|
+
const p = fn(), g = Xe(
|
|
538
538
|
c.selectors.getState
|
|
539
|
-
), m =
|
|
539
|
+
), m = Xe(i.selectors.getState), w = g.entities[r], y = m.entities[r], k = P(
|
|
540
540
|
(H = "") => {
|
|
541
541
|
p(H === n ? c.actions.clearEntity(r) : c.actions.setEntity({
|
|
542
542
|
id: r,
|
|
@@ -547,46 +547,46 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
547
547
|
},
|
|
548
548
|
[p, r, c.actions, n]
|
|
549
549
|
), {
|
|
550
|
-
isEditing:
|
|
551
|
-
stopEditing:
|
|
552
|
-
editorValue:
|
|
550
|
+
isEditing: S,
|
|
551
|
+
stopEditing: v,
|
|
552
|
+
editorValue: O,
|
|
553
553
|
setEditorValue: W,
|
|
554
554
|
stopEditingAndRevert: L,
|
|
555
555
|
stopEditingAndMove: A,
|
|
556
|
-
lastKeyEvent:
|
|
557
|
-
requiredProps: { onKeyDown:
|
|
558
|
-
} =
|
|
559
|
-
rowIndex:
|
|
556
|
+
lastKeyEvent: z,
|
|
557
|
+
requiredProps: { onKeyDown: V, ...q }
|
|
558
|
+
} = Ie(n, {
|
|
559
|
+
rowIndex: u,
|
|
560
560
|
colIndex: l,
|
|
561
561
|
numCols: d,
|
|
562
|
-
numRows:
|
|
562
|
+
numRows: h,
|
|
563
563
|
tableId: "serviceManningMatrixTable",
|
|
564
|
-
onChange:
|
|
564
|
+
onChange: k,
|
|
565
565
|
isEditable: o,
|
|
566
566
|
allowedInputType: t
|
|
567
|
-
}),
|
|
567
|
+
}), K = P(
|
|
568
568
|
(H) => {
|
|
569
569
|
H.key === "Delete" ? (p(c.actions.clearEntity(r)), p(
|
|
570
570
|
i.actions.setEntityFields(r, {
|
|
571
571
|
hasError: !1,
|
|
572
572
|
errorMessage: void 0
|
|
573
573
|
})
|
|
574
|
-
)) :
|
|
574
|
+
)) : V(H);
|
|
575
575
|
},
|
|
576
576
|
[
|
|
577
|
-
|
|
577
|
+
V,
|
|
578
578
|
r,
|
|
579
579
|
p,
|
|
580
580
|
c.actions,
|
|
581
581
|
i.actions
|
|
582
582
|
]
|
|
583
583
|
);
|
|
584
|
-
return /* @__PURE__ */
|
|
584
|
+
return /* @__PURE__ */ C(
|
|
585
585
|
I,
|
|
586
586
|
{
|
|
587
|
-
height:
|
|
587
|
+
height: Ne,
|
|
588
588
|
width: "100%",
|
|
589
|
-
borderBottom:
|
|
589
|
+
borderBottom: we,
|
|
590
590
|
hoverBackground: "var(--ui7)",
|
|
591
591
|
alignItems: "center",
|
|
592
592
|
children: [
|
|
@@ -600,34 +600,34 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
600
600
|
alignItems: "center",
|
|
601
601
|
border: "1px solid transparent",
|
|
602
602
|
borderRadius: "4px",
|
|
603
|
-
focusBorder:
|
|
604
|
-
hoverBorder:
|
|
605
|
-
onKeyDown:
|
|
606
|
-
|
|
607
|
-
children: /* @__PURE__ */ s(G, { row: !0, alignItems: "center", children:
|
|
608
|
-
|
|
603
|
+
focusBorder: S ? void 0 : "1px solid var(--primary-action-color)",
|
|
604
|
+
hoverBorder: S ? void 0 : "var(--ui5) solid 1px;",
|
|
605
|
+
onKeyDown: K,
|
|
606
|
+
...q,
|
|
607
|
+
children: /* @__PURE__ */ s(G, { row: !0, alignItems: "center", children: S ? /* @__PURE__ */ s(
|
|
608
|
+
Be,
|
|
609
609
|
{
|
|
610
610
|
onValueChange: W,
|
|
611
|
-
value:
|
|
612
|
-
onDone:
|
|
611
|
+
value: O,
|
|
612
|
+
onDone: v,
|
|
613
613
|
onEsc: L,
|
|
614
614
|
autoFocus: !0,
|
|
615
|
-
selectAllOnMount: !
|
|
615
|
+
selectAllOnMount: !z,
|
|
616
616
|
onMove: A
|
|
617
617
|
}
|
|
618
|
-
) : /* @__PURE__ */
|
|
618
|
+
) : /* @__PURE__ */ C(E, { children: [
|
|
619
619
|
/* @__PURE__ */ s(
|
|
620
|
-
|
|
620
|
+
ee,
|
|
621
621
|
{
|
|
622
622
|
color: o ? "var(--primary-action-color)" : void 0,
|
|
623
623
|
variant: w?.modified ? "bold" : void 0,
|
|
624
624
|
children: n
|
|
625
625
|
}
|
|
626
626
|
),
|
|
627
|
-
w?.newValue !== void 0 && /* @__PURE__ */
|
|
628
|
-
/* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(
|
|
627
|
+
w?.newValue !== void 0 && /* @__PURE__ */ C(E, { children: [
|
|
628
|
+
/* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(Z, { icon: pt, size: 12 }) }),
|
|
629
629
|
/* @__PURE__ */ s(
|
|
630
|
-
|
|
630
|
+
ee,
|
|
631
631
|
{
|
|
632
632
|
color: "var(--primary-action-color)",
|
|
633
633
|
variant: "bold",
|
|
@@ -635,15 +635,15 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
635
635
|
}
|
|
636
636
|
)
|
|
637
637
|
] }),
|
|
638
|
-
y &&
|
|
639
|
-
f && w?.modified && w?.newValue === "" ? /* @__PURE__ */ s(
|
|
640
|
-
|
|
638
|
+
y && Ae(y) && /* @__PURE__ */ s(M, { num: 2 }),
|
|
639
|
+
f && w?.modified && w?.newValue === "" ? /* @__PURE__ */ s(be, { label: f, children: /* @__PURE__ */ s(
|
|
640
|
+
Z,
|
|
641
641
|
{
|
|
642
|
-
icon:
|
|
642
|
+
icon: Oe,
|
|
643
643
|
color: "var(--ui-alert1)",
|
|
644
644
|
size: 14
|
|
645
645
|
}
|
|
646
|
-
) }) : /* @__PURE__ */ s(
|
|
646
|
+
) }) : /* @__PURE__ */ s(xt, { crudStatus: y })
|
|
647
647
|
] }) })
|
|
648
648
|
}
|
|
649
649
|
),
|
|
@@ -651,48 +651,67 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
651
651
|
]
|
|
652
652
|
}
|
|
653
653
|
);
|
|
654
|
-
},
|
|
654
|
+
}, Dt = F(""), Et = F(
|
|
655
655
|
void 0
|
|
656
|
-
),
|
|
657
|
-
sortOrder:
|
|
658
|
-
selectedIds:
|
|
659
|
-
expandedRows:
|
|
660
|
-
fields:
|
|
661
|
-
}), _ = (e, t) => `${e}.${t}`,
|
|
662
|
-
sortOrder:
|
|
663
|
-
selectedIds:
|
|
664
|
-
expandedRows:
|
|
656
|
+
), Rt = F(void 0), Mt = F(void 0), tr = () => ({
|
|
657
|
+
sortOrder: gn(),
|
|
658
|
+
selectedIds: Ue(),
|
|
659
|
+
expandedRows: Ue(),
|
|
660
|
+
fields: pn()
|
|
661
|
+
}), _ = (e, t) => `${e}.${t}`, Gt = (e = void 0, t = !1, n = [], r = []) => ({
|
|
662
|
+
sortOrder: wn(e, t),
|
|
663
|
+
selectedIds: Je(n),
|
|
664
|
+
expandedRows: Je(r),
|
|
665
665
|
fields: { lastSelectedId: void 0 }
|
|
666
|
-
}),
|
|
667
|
-
const n =
|
|
666
|
+
}), nr = (e, t) => {
|
|
667
|
+
const n = ke(
|
|
668
668
|
_(e, "sortOrder"),
|
|
669
|
-
|
|
670
|
-
), r =
|
|
669
|
+
yn(t?.sortOrder)
|
|
670
|
+
), r = ke(
|
|
671
671
|
_(e, "selectedIds"),
|
|
672
|
-
|
|
673
|
-
), o =
|
|
672
|
+
Ze(t?.selectedIds)
|
|
673
|
+
), o = ke(
|
|
674
674
|
_(e, "expandedRows"),
|
|
675
|
-
|
|
676
|
-
), a =
|
|
675
|
+
Ze(t?.expandedRows)
|
|
676
|
+
), a = ke(
|
|
677
677
|
_(e, "fields"),
|
|
678
|
-
|
|
678
|
+
bn(t?.fields ?? {})
|
|
679
679
|
);
|
|
680
|
-
return
|
|
680
|
+
return vn({
|
|
681
681
|
sortOrder: n,
|
|
682
682
|
selectedIds: r,
|
|
683
683
|
expandedRows: o,
|
|
684
684
|
fields: a
|
|
685
685
|
});
|
|
686
|
-
},
|
|
687
|
-
|
|
688
|
-
),
|
|
689
|
-
const e = T(), t =
|
|
686
|
+
}, qe = () => N(Dt), T = () => N(Mt), he = () => N(Et), ve = () => N(Rt), Wt = F([]), te = () => N(
|
|
687
|
+
Wt
|
|
688
|
+
), Ft = () => {
|
|
689
|
+
const e = T(), t = te();
|
|
690
690
|
let n = 0;
|
|
691
691
|
return e.enableExpandCollapse && n++, e.showRowCheckbox && n++, n + b(
|
|
692
692
|
() => t.map((r) => r.groupConfig.columnOrder.length).reduce((r, o) => r + o, 0),
|
|
693
693
|
[t]
|
|
694
694
|
);
|
|
695
|
-
},
|
|
695
|
+
}, Bt = F(void 0), rr = () => N(Bt), Lt = F(void 0), or = () => N(Lt), sr = F(void 0), ar = F(!1), At = F(void 0), ir = (e) => {
|
|
696
|
+
const t = Q(/* @__PURE__ */ new Set()), n = Q(void 0), r = Q(void 0);
|
|
697
|
+
return n.current !== e && (n.current = e, r.current = new Set(e)), tn(() => {
|
|
698
|
+
t.current.forEach((o) => o());
|
|
699
|
+
}, [e]), b(
|
|
700
|
+
() => ({
|
|
701
|
+
subscribe: (o) => (t.current.add(o), () => {
|
|
702
|
+
t.current.delete(o);
|
|
703
|
+
}),
|
|
704
|
+
getSelectedIdsSet: () => r.current ?? /* @__PURE__ */ new Set()
|
|
705
|
+
}),
|
|
706
|
+
[]
|
|
707
|
+
);
|
|
708
|
+
}, cr = (e) => {
|
|
709
|
+
const t = N(At);
|
|
710
|
+
return nn(
|
|
711
|
+
t.subscribe,
|
|
712
|
+
() => t.getSelectedIdsSet().has(e)
|
|
713
|
+
);
|
|
714
|
+
}, lr = F("standard"), Ht = F({}), _e = () => N(Ht), Nt = F(0), je = () => N(Nt), Yt = (e, t, n) => e ? kn(
|
|
696
715
|
t?.map((r) => {
|
|
697
716
|
const o = e?.[r];
|
|
698
717
|
return {
|
|
@@ -710,26 +729,26 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
710
729
|
columnOrder: n ?? []
|
|
711
730
|
}
|
|
712
731
|
}
|
|
713
|
-
],
|
|
732
|
+
], Ve = (e, t, n) => {
|
|
714
733
|
if (e)
|
|
715
|
-
return e === !0 ?
|
|
734
|
+
return e === !0 ? we : e;
|
|
716
735
|
if (!t && n)
|
|
717
|
-
return n === !0 ?
|
|
718
|
-
},
|
|
736
|
+
return n === !0 ? we : n;
|
|
737
|
+
}, Te = (e, t, n) => {
|
|
719
738
|
if (!(e === 0 || t !== 0) && n)
|
|
720
|
-
return n === !0 ?
|
|
721
|
-
},
|
|
739
|
+
return n === !0 ? we : n;
|
|
740
|
+
}, Ce = (e) => {
|
|
722
741
|
const { columns: t } = T(), n = t[e];
|
|
723
742
|
if (!n)
|
|
724
743
|
throw new Error("No config for column with id=" + e);
|
|
725
744
|
return n;
|
|
726
|
-
},
|
|
727
|
-
const e = T(), t =
|
|
745
|
+
}, dr = () => {
|
|
746
|
+
const e = T(), t = te()?.[0]?.groupConfig.columnOrder?.[0];
|
|
728
747
|
return t ? e.columns[t] : void 0;
|
|
729
|
-
},
|
|
730
|
-
const e = T(), t =
|
|
748
|
+
}, ur = () => {
|
|
749
|
+
const e = T(), t = te(), n = t[t.length - 1], r = n?.groupConfig.columnOrder[n.groupConfig.columnOrder.length - 1] ?? void 0;
|
|
731
750
|
return r ? e.columns[r] : void 0;
|
|
732
|
-
},
|
|
751
|
+
}, hr = function({
|
|
733
752
|
columnId: t,
|
|
734
753
|
groupConfig: n,
|
|
735
754
|
borderFromGroup: r,
|
|
@@ -737,7 +756,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
737
756
|
isFirstGroup: a,
|
|
738
757
|
isLastGroup: i
|
|
739
758
|
}) {
|
|
740
|
-
const { label: c, render: l, contentLeft:
|
|
759
|
+
const { label: c, render: l, contentLeft: u, contentRight: d, loading: h, error: f } = n, { width: p, minWidth: g, zIndex: m, borderLeft: w } = Ce(t), y = T(), { stickyHeader: k, headerRowOffsetTop: S } = y, v = "columnGroupOrder" in y ? y.stickyColumnGroups : void 0, O = mr(r, w), W = a && (v === "first" || v === "both"), L = i && (v === "last" || v === "both"), A = W || L || k, z = W || L;
|
|
741
760
|
return /* @__PURE__ */ s(
|
|
742
761
|
"th",
|
|
743
762
|
{
|
|
@@ -750,27 +769,27 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
750
769
|
background: A ? "white" : "transparent",
|
|
751
770
|
left: W ? "var(--current-left-offset)" : void 0,
|
|
752
771
|
right: L ? "0px" : void 0,
|
|
753
|
-
top:
|
|
754
|
-
borderLeft:
|
|
755
|
-
zIndex:
|
|
772
|
+
top: k ? S ?? "0px" : void 0,
|
|
773
|
+
borderLeft: O,
|
|
774
|
+
zIndex: k && z ? "var(--swui-sticky-column-group-label-z-index)" : z ? "var(--swui-sticky-group-group-z-index)" : k ? m ?? "var(--swui-sticky-header-column-group-z-index)" : m ?? 1,
|
|
756
775
|
boxShadow: W ? "var(--swui-sticky-column-shadow-right)" : L ? "var(--swui-sticky-column-shadow-left)" : void 0
|
|
757
776
|
},
|
|
758
|
-
children: /* @__PURE__ */ s(I, { alignItems: "center", children: /* @__PURE__ */
|
|
759
|
-
|
|
777
|
+
children: /* @__PURE__ */ s(I, { alignItems: "center", children: /* @__PURE__ */ C(E, { children: [
|
|
778
|
+
u && /* @__PURE__ */ C(E, { children: [
|
|
760
779
|
/* @__PURE__ */ s(M, {}),
|
|
761
|
-
|
|
780
|
+
u,
|
|
762
781
|
/* @__PURE__ */ s(M, { num: 0.5 })
|
|
763
782
|
] }),
|
|
764
|
-
l ? l(n) : /* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(
|
|
765
|
-
d && /* @__PURE__ */
|
|
783
|
+
l ? l(n) : /* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(yt, { variant: "h5", whiteSpace: "nowrap", children: c }) }),
|
|
784
|
+
d && /* @__PURE__ */ C(E, { children: [
|
|
766
785
|
/* @__PURE__ */ s(M, { num: 0.5 }),
|
|
767
786
|
d
|
|
768
787
|
] }),
|
|
769
|
-
(f ||
|
|
770
|
-
|
|
771
|
-
|
|
788
|
+
(f || h) && /* @__PURE__ */ s(G, {}),
|
|
789
|
+
h ? /* @__PURE__ */ s(We, {}) : f ? /* @__PURE__ */ s(be, { label: f, placement: "bottom", children: /* @__PURE__ */ s(
|
|
790
|
+
Z,
|
|
772
791
|
{
|
|
773
|
-
icon:
|
|
792
|
+
icon: Oe,
|
|
774
793
|
color: j("--lhds-color-red-500"),
|
|
775
794
|
size: 14
|
|
776
795
|
}
|
|
@@ -778,57 +797,57 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
778
797
|
] }) })
|
|
779
798
|
}
|
|
780
799
|
);
|
|
781
|
-
},
|
|
800
|
+
}, mr = (e, t) => {
|
|
782
801
|
if (e)
|
|
783
802
|
return e;
|
|
784
803
|
if (t)
|
|
785
804
|
return "1px solid transparent";
|
|
786
|
-
},
|
|
787
|
-
top: e ?
|
|
805
|
+
}, fr = (e, t, n, r) => ({
|
|
806
|
+
top: e ? pr(e, n) : void 0,
|
|
788
807
|
background: e || t ? "white" : void 0,
|
|
789
808
|
position: e || t ? "sticky" : void 0,
|
|
790
809
|
boxShadow: t ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
791
810
|
zIndex: e || t ? r ?? "var(--swui-sticky-header-z-index)" : r
|
|
792
|
-
}),
|
|
811
|
+
}), pr = (e, t) => {
|
|
793
812
|
if (e && t)
|
|
794
813
|
return t;
|
|
795
814
|
if (t)
|
|
796
815
|
return t;
|
|
797
816
|
if (e)
|
|
798
817
|
return 0;
|
|
799
|
-
},
|
|
800
|
-
height: t =
|
|
818
|
+
}, gr = R.memo(function({
|
|
819
|
+
height: t = Ne
|
|
801
820
|
}) {
|
|
802
|
-
const n =
|
|
821
|
+
const n = te(), r = T(), {
|
|
803
822
|
showHeaderCheckbox: o,
|
|
804
823
|
enableExpandCollapse: a,
|
|
805
824
|
rowIndent: i,
|
|
806
825
|
zIndex: c,
|
|
807
826
|
stickyHeader: l,
|
|
808
|
-
stickyCheckboxColumn:
|
|
827
|
+
stickyCheckboxColumn: u,
|
|
809
828
|
headerRowOffsetTop: d
|
|
810
|
-
} = r,
|
|
829
|
+
} = r, h = fr(
|
|
811
830
|
l,
|
|
812
|
-
|
|
831
|
+
u,
|
|
813
832
|
d,
|
|
814
833
|
c
|
|
815
834
|
), f = l ? "var(--swui-sticky-column-group-label-z-index)" : "var(--swui-sticky-group-group-z-index)";
|
|
816
|
-
return /* @__PURE__ */
|
|
835
|
+
return /* @__PURE__ */ C(
|
|
817
836
|
"tr",
|
|
818
837
|
{
|
|
819
838
|
style: {
|
|
820
839
|
height: t,
|
|
821
|
-
borderLeft:
|
|
840
|
+
borderLeft: He
|
|
822
841
|
},
|
|
823
842
|
children: [
|
|
824
|
-
i && /* @__PURE__ */ s("th", { style:
|
|
843
|
+
i && /* @__PURE__ */ s("th", { style: h }),
|
|
825
844
|
a && /* @__PURE__ */ s(
|
|
826
845
|
"th",
|
|
827
846
|
{
|
|
828
847
|
style: {
|
|
829
|
-
...
|
|
848
|
+
...h,
|
|
830
849
|
width: "var(--swui-expand-cell-width)",
|
|
831
|
-
left:
|
|
850
|
+
left: u ? "0px" : void 0,
|
|
832
851
|
zIndex: f
|
|
833
852
|
}
|
|
834
853
|
}
|
|
@@ -837,21 +856,21 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
837
856
|
"th",
|
|
838
857
|
{
|
|
839
858
|
style: {
|
|
840
|
-
...
|
|
841
|
-
left:
|
|
859
|
+
...h,
|
|
860
|
+
left: u && a ? "var(--swui-expand-cell-width)" : u ? "0px" : void 0,
|
|
842
861
|
zIndex: f
|
|
843
862
|
}
|
|
844
863
|
}
|
|
845
864
|
),
|
|
846
865
|
n.map(({ groupConfig: p, groupId: g }, m) => /* @__PURE__ */ s(
|
|
847
|
-
|
|
866
|
+
hr,
|
|
848
867
|
{
|
|
849
868
|
isFirstGroup: m === 0,
|
|
850
869
|
isLastGroup: m === n.length - 1,
|
|
851
870
|
groupConfig: p,
|
|
852
871
|
columnId: p.columnOrder[0],
|
|
853
872
|
colSpan: p.columnOrder.length,
|
|
854
|
-
borderFromGroup:
|
|
873
|
+
borderFromGroup: Te(
|
|
855
874
|
m,
|
|
856
875
|
0,
|
|
857
876
|
p.borderLeft
|
|
@@ -859,12 +878,12 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
859
878
|
},
|
|
860
879
|
g
|
|
861
880
|
)),
|
|
862
|
-
i && /* @__PURE__ */ s("th", { style:
|
|
863
|
-
/* @__PURE__ */ s("th", { style:
|
|
881
|
+
i && /* @__PURE__ */ s("th", { style: h }),
|
|
882
|
+
/* @__PURE__ */ s("th", { style: h })
|
|
864
883
|
]
|
|
865
884
|
}
|
|
866
885
|
);
|
|
867
|
-
}),
|
|
886
|
+
}), wr = (e) => {
|
|
868
887
|
const t = Yt(
|
|
869
888
|
"columnGroups" in e ? e.columnGroups : void 0,
|
|
870
889
|
"columnGroupOrder" in e ? e.columnGroupOrder : void 0,
|
|
@@ -873,23 +892,23 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
873
892
|
let r = 0;
|
|
874
893
|
return e.showRowCheckbox && r++, e.enableExpandCollapse && r++, t.forEach((o) => {
|
|
875
894
|
o.groupConfig.columnOrder.forEach((a) => {
|
|
876
|
-
|
|
895
|
+
yr(e.columns[a]) && (n[a] = r++);
|
|
877
896
|
});
|
|
878
897
|
}), {
|
|
879
898
|
columnIndexPerColumnId: n,
|
|
880
899
|
numNavigableColumns: r
|
|
881
900
|
};
|
|
882
|
-
},
|
|
901
|
+
}, yr = (e) => !e.disableGridCell, zt = F({
|
|
883
902
|
columnIndexPerColumnId: {},
|
|
884
903
|
numNavigableColumns: 0
|
|
885
|
-
}), qt = () =>
|
|
904
|
+
}), qt = () => N(
|
|
886
905
|
zt
|
|
887
|
-
),
|
|
888
|
-
"columnGroupOrder" in e && (
|
|
906
|
+
), br = (e) => {
|
|
907
|
+
"columnGroupOrder" in e && (vr(e), (e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both") && nt(e, 0), (e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both") && nt(
|
|
889
908
|
e,
|
|
890
909
|
e.columnGroupOrder.length - 1
|
|
891
910
|
));
|
|
892
|
-
},
|
|
911
|
+
}, vr = (e) => {
|
|
893
912
|
Object.keys(e.columns).forEach((n) => {
|
|
894
913
|
const r = e.columns[n];
|
|
895
914
|
if ("sticky" in r && r.sticky)
|
|
@@ -897,7 +916,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
897
916
|
"Columns can not be sticky when column groups are used. columnId: " + n
|
|
898
917
|
);
|
|
899
918
|
});
|
|
900
|
-
},
|
|
919
|
+
}, nt = (e, t) => {
|
|
901
920
|
if (!e.columnGroupOrder || e.columnGroupOrder.length === 0)
|
|
902
921
|
throw new Error(
|
|
903
922
|
"columnGroupOrder required when validating column group fixed width."
|
|
@@ -913,13 +932,13 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
913
932
|
"All columns in sticky column group must have width set."
|
|
914
933
|
);
|
|
915
934
|
});
|
|
916
|
-
},
|
|
917
|
-
const t = e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both" ?
|
|
918
|
-
|
|
935
|
+
}, Cr = (e) => {
|
|
936
|
+
const t = e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both" ? rt(
|
|
937
|
+
kr(e),
|
|
919
938
|
e.columns,
|
|
920
939
|
!0
|
|
921
|
-
) : void 0, n = e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both" ?
|
|
922
|
-
|
|
940
|
+
) : void 0, n = e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both" ? rt(
|
|
941
|
+
Sr(e),
|
|
923
942
|
e.columns,
|
|
924
943
|
!1
|
|
925
944
|
) : void 0;
|
|
@@ -927,19 +946,19 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
927
946
|
...t,
|
|
928
947
|
...n
|
|
929
948
|
};
|
|
930
|
-
},
|
|
949
|
+
}, rt = (e, t, n) => {
|
|
931
950
|
const r = {}, o = [
|
|
932
951
|
n ? "var(--current-left-offset)" : "0px"
|
|
933
952
|
];
|
|
934
953
|
for (let a = 0; a < e.length; a++) {
|
|
935
954
|
const i = e[a], c = t?.[i];
|
|
936
|
-
r[i] =
|
|
955
|
+
r[i] = xr(o), o.push(c?.width ?? "0px");
|
|
937
956
|
}
|
|
938
957
|
return r;
|
|
939
|
-
},
|
|
958
|
+
}, xr = (e) => e.length === 0 ? "0px" : e.length === 1 ? e[0] : "calc(" + e.join(" + ") + ")", kr = (e) => {
|
|
940
959
|
const t = e.columnGroupOrder?.[0];
|
|
941
960
|
return t ? e.columnGroups?.[t]?.columnOrder ?? [] : [];
|
|
942
|
-
},
|
|
961
|
+
}, Sr = (e) => {
|
|
943
962
|
const t = e.columnGroupOrder?.[e.columnGroupOrder?.length - 1];
|
|
944
963
|
if (!t)
|
|
945
964
|
return [];
|
|
@@ -948,7 +967,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
948
967
|
return [];
|
|
949
968
|
const r = [...n.columnOrder];
|
|
950
969
|
return r.reverse(), r;
|
|
951
|
-
},
|
|
970
|
+
}, Pr = (e) => "columnGroups" in e ? Ir(e) : Or(e), Or = (e) => Object.keys(e.columns).reduce((n, r) => {
|
|
952
971
|
const o = e.columns[r], a = !!o.sticky;
|
|
953
972
|
return n[r] = {
|
|
954
973
|
sticky: a,
|
|
@@ -958,12 +977,12 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
958
977
|
isFirstColumnInLastGroup: !1,
|
|
959
978
|
isLastColumnInFirstGroup: !1
|
|
960
979
|
}, n;
|
|
961
|
-
}, {}),
|
|
962
|
-
const t = {}, n = e.columnGroupOrder, r =
|
|
980
|
+
}, {}), Ir = (e) => {
|
|
981
|
+
const t = {}, n = e.columnGroupOrder, r = Cr(e), o = e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both", a = e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both";
|
|
963
982
|
return n.forEach((i, c) => {
|
|
964
|
-
const
|
|
965
|
-
|
|
966
|
-
const f = c === 0, p = c === n.length - 1, g = f && o, m = p && a, w =
|
|
983
|
+
const u = e.columnGroups[i].columnOrder;
|
|
984
|
+
u.forEach((d, h) => {
|
|
985
|
+
const f = c === 0, p = c === n.length - 1, g = f && o, m = p && a, w = h === 0 && p, y = h === u.length - 1 && f;
|
|
967
986
|
t[d] = {
|
|
968
987
|
sticky: g || m,
|
|
969
988
|
left: g ? r[d] : void 0,
|
|
@@ -974,7 +993,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
974
993
|
};
|
|
975
994
|
});
|
|
976
995
|
}), t;
|
|
977
|
-
},
|
|
996
|
+
}, Tr = (e, t) => ({
|
|
978
997
|
setSelectedIds: (n) => oe(
|
|
979
998
|
_(e, "selectedIds"),
|
|
980
999
|
t.selectedIds.setSelectedIds(n)
|
|
@@ -1003,14 +1022,14 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1003
1022
|
_(e, "fields"),
|
|
1004
1023
|
t.fields.setEntityFields({ lastSelectedId: n })
|
|
1005
1024
|
)
|
|
1006
|
-
}),
|
|
1007
|
-
const [n, r] =
|
|
1008
|
-
|
|
1025
|
+
}), Dr = (e, t = Gt()) => {
|
|
1026
|
+
const [n, r] = rn(
|
|
1027
|
+
nr(e),
|
|
1009
1028
|
t
|
|
1010
1029
|
), o = b(
|
|
1011
|
-
() =>
|
|
1030
|
+
() => Tr(
|
|
1012
1031
|
e,
|
|
1013
|
-
|
|
1032
|
+
tr()
|
|
1014
1033
|
),
|
|
1015
1034
|
[e]
|
|
1016
1035
|
);
|
|
@@ -1024,19 +1043,19 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1024
1043
|
[n, o, r]
|
|
1025
1044
|
)
|
|
1026
1045
|
};
|
|
1027
|
-
},
|
|
1046
|
+
}, Er = (e) => (e.rowIndent ? 2 : 0) + (e.enableExpandCollapse ? 1 : 0) + (e.showRowCheckbox ? 1 : 0) + Rr(e), Rr = (e) => "columnGroupOrder" in e ? e.columnGroupOrder.reduce((t, n) => {
|
|
1028
1047
|
const r = e.columnGroups?.[n];
|
|
1029
1048
|
return t + (r?.columnOrder?.length ?? 0);
|
|
1030
|
-
}, 0) : e.columnOrder?.length ?? 0,
|
|
1031
|
-
const e = T(), t =
|
|
1032
|
-
return /* @__PURE__ */
|
|
1049
|
+
}, 0) : e.columnOrder?.length ?? 0, Mr = () => {
|
|
1050
|
+
const e = T(), t = te(), n = e.enableExpandCollapse || e.showRowCheckbox, r = hn(e.rowIndent);
|
|
1051
|
+
return /* @__PURE__ */ C(E, { children: [
|
|
1033
1052
|
r ? /* @__PURE__ */ s("colgroup", { children: /* @__PURE__ */ s(
|
|
1034
1053
|
"col",
|
|
1035
1054
|
{
|
|
1036
1055
|
style: { width: `calc(var(--swui-metrics-indent) * ${r})` }
|
|
1037
1056
|
}
|
|
1038
1057
|
) }) : null,
|
|
1039
|
-
n && /* @__PURE__ */
|
|
1058
|
+
n && /* @__PURE__ */ C("colgroup", { children: [
|
|
1040
1059
|
e.enableExpandCollapse && /* @__PURE__ */ s("col", { style: { width: "var(--swui-expand-cell-width)" } }),
|
|
1041
1060
|
e.showRowCheckbox && /* @__PURE__ */ s("col", { style: { width: "var(--swui-checkbox-cell-width)" } })
|
|
1042
1061
|
] }),
|
|
@@ -1057,19 +1076,19 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1057
1076
|
}
|
|
1058
1077
|
) }) : null
|
|
1059
1078
|
] });
|
|
1060
|
-
},
|
|
1061
|
-
standardTable:
|
|
1062
|
-
relaxed:
|
|
1063
|
-
condensed:
|
|
1064
|
-
compact:
|
|
1065
|
-
},
|
|
1079
|
+
}, Gr = "_standardTable_d7cgg_1", Wr = "_relaxed_d7cgg_39", Fr = "_condensed_d7cgg_43", Br = "_compact_d7cgg_47", ot = {
|
|
1080
|
+
standardTable: Gr,
|
|
1081
|
+
relaxed: Wr,
|
|
1082
|
+
condensed: Fr,
|
|
1083
|
+
compact: Br
|
|
1084
|
+
}, Lr = (e, t) => e != null && t == null ? -1 : e == null && t != null ? 1 : Me(e, t, "number") ? Number(e) - Number(t) : Me(e, t, "boolean") ? Number(t) - Number(e) : Me(e, t, "string") ? String(e).localeCompare(String(t)) : e instanceof Date && t instanceof Date ? e.getTime() - t.getTime() : 0, Me = (e, t, n) => typeof e === n && typeof t === n, Ar = (e) => {
|
|
1066
1085
|
const { columns: t } = T();
|
|
1067
1086
|
if (!e)
|
|
1068
1087
|
return;
|
|
1069
1088
|
const n = t[e];
|
|
1070
1089
|
if (n)
|
|
1071
1090
|
return n.itemValueResolver;
|
|
1072
|
-
},
|
|
1091
|
+
}, Hr = R.memo(
|
|
1073
1092
|
function({
|
|
1074
1093
|
value: t,
|
|
1075
1094
|
onValueChange: n,
|
|
@@ -1080,20 +1099,20 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1080
1099
|
onValueChangeAndShift: c,
|
|
1081
1100
|
shiftPressedRef: l
|
|
1082
1101
|
}) {
|
|
1083
|
-
const
|
|
1102
|
+
const u = Ft(), d = qe(), h = Ie(!!t, {
|
|
1084
1103
|
colIndex: r,
|
|
1085
|
-
numCols:
|
|
1104
|
+
numCols: u,
|
|
1086
1105
|
numRows: a,
|
|
1087
1106
|
rowIndex: o,
|
|
1088
1107
|
tableId: d
|
|
1089
|
-
}), { requiredProps: f } =
|
|
1108
|
+
}), { requiredProps: f } = h, p = P(
|
|
1090
1109
|
(g) => {
|
|
1091
1110
|
l.current ? c?.(g) : n?.(g);
|
|
1092
1111
|
},
|
|
1093
1112
|
[n, c, l]
|
|
1094
1113
|
);
|
|
1095
1114
|
return /* @__PURE__ */ s(
|
|
1096
|
-
|
|
1115
|
+
Le,
|
|
1097
1116
|
{
|
|
1098
1117
|
size: "small",
|
|
1099
1118
|
disabled: i,
|
|
@@ -1103,7 +1122,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1103
1122
|
}
|
|
1104
1123
|
);
|
|
1105
1124
|
}
|
|
1106
|
-
),
|
|
1125
|
+
), Nr = (e, t, n) => {
|
|
1107
1126
|
if (t == null || n == null || e == null || t === n)
|
|
1108
1127
|
return;
|
|
1109
1128
|
const r = e.indexOf(t), o = e.indexOf(n);
|
|
@@ -1111,27 +1130,27 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1111
1130
|
return;
|
|
1112
1131
|
const a = Math.min(r, o), i = Math.max(r, o);
|
|
1113
1132
|
return e.slice(a, i + 1);
|
|
1114
|
-
},
|
|
1133
|
+
}, Yr = (e, t) => {
|
|
1115
1134
|
const { keyResolver: n } = T(), {
|
|
1116
1135
|
selectedIds: { selectedIds: r },
|
|
1117
1136
|
fields: { lastSelectedId: o }
|
|
1118
|
-
} =
|
|
1137
|
+
} = he(), {
|
|
1119
1138
|
actions: { setSelectedIds: a, setLastSelectedId: i },
|
|
1120
1139
|
dispatch: c
|
|
1121
|
-
} =
|
|
1140
|
+
} = ve(), l = b(() => n(e), [n, e]), u = b(
|
|
1122
1141
|
() => r.includes(l),
|
|
1123
1142
|
[r, l]
|
|
1124
|
-
), { toggle: d, addMultiple:
|
|
1143
|
+
), { toggle: d, addMultiple: h, removeMultiple: f } = bt(
|
|
1125
1144
|
r,
|
|
1126
1145
|
(m) => c(a(m))
|
|
1127
1146
|
), p = P(() => {
|
|
1128
1147
|
if (t && o) {
|
|
1129
|
-
const m =
|
|
1148
|
+
const m = Nr(
|
|
1130
1149
|
t,
|
|
1131
1150
|
o,
|
|
1132
1151
|
l
|
|
1133
1152
|
);
|
|
1134
|
-
m?.length ?
|
|
1153
|
+
m?.length ? u ? f(m) : h(m) : d(l);
|
|
1135
1154
|
} else
|
|
1136
1155
|
d(l);
|
|
1137
1156
|
c(i(l));
|
|
@@ -1141,30 +1160,30 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1141
1160
|
c,
|
|
1142
1161
|
i,
|
|
1143
1162
|
l,
|
|
1144
|
-
h,
|
|
1145
|
-
f,
|
|
1146
1163
|
u,
|
|
1164
|
+
f,
|
|
1165
|
+
h,
|
|
1147
1166
|
d
|
|
1148
1167
|
]), g = P(() => {
|
|
1149
1168
|
d(l), c(i(l));
|
|
1150
1169
|
}, [d, l, c, i]);
|
|
1151
1170
|
return {
|
|
1152
|
-
isSelected:
|
|
1171
|
+
isSelected: u,
|
|
1153
1172
|
toggleSelected: g,
|
|
1154
1173
|
shiftAndToggleSelected: p
|
|
1155
1174
|
};
|
|
1156
|
-
},
|
|
1175
|
+
}, Ke = (e) => {
|
|
1157
1176
|
const { keyResolver: t } = T(), {
|
|
1158
1177
|
expandedRows: { selectedIds: n }
|
|
1159
|
-
} =
|
|
1178
|
+
} = he(), {
|
|
1160
1179
|
actions: { expandByIds: r },
|
|
1161
1180
|
dispatch: o
|
|
1162
|
-
} =
|
|
1181
|
+
} = ve(), a = b(() => t(e), [t, e]), i = b(
|
|
1163
1182
|
() => n.includes(a),
|
|
1164
1183
|
[n, a]
|
|
1165
|
-
), { toggle: c } =
|
|
1184
|
+
), { toggle: c } = bt(
|
|
1166
1185
|
n,
|
|
1167
|
-
(
|
|
1186
|
+
(u) => o(r(u))
|
|
1168
1187
|
);
|
|
1169
1188
|
return {
|
|
1170
1189
|
toggleRowExpanded: P(() => {
|
|
@@ -1172,40 +1191,40 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1172
1191
|
}, [c, a]),
|
|
1173
1192
|
isExpanded: i
|
|
1174
1193
|
};
|
|
1175
|
-
},
|
|
1194
|
+
}, zr = function({
|
|
1176
1195
|
item: e,
|
|
1177
1196
|
colIndex: t,
|
|
1178
1197
|
numRows: n,
|
|
1179
1198
|
rowIndex: r
|
|
1180
1199
|
}) {
|
|
1181
|
-
const o =
|
|
1200
|
+
const o = Ft(), a = qe(), i = Ie(!0, {
|
|
1182
1201
|
colIndex: t,
|
|
1183
1202
|
numCols: o,
|
|
1184
1203
|
numRows: n,
|
|
1185
1204
|
rowIndex: r,
|
|
1186
1205
|
tableId: a
|
|
1187
|
-
}), { requiredProps: c } = i, { expandCollapseDisableResolver: l } = T(), { toggleRowExpanded:
|
|
1188
|
-
return /* @__PURE__ */ s(I, { alignItems: "center", justifyContent: "center", indent: !0, children: !
|
|
1189
|
-
|
|
1206
|
+
}), { requiredProps: c } = i, { expandCollapseDisableResolver: l } = T(), { toggleRowExpanded: u, isExpanded: d } = Ke(e), h = b(() => l ? l(e) : !1, [l, e]);
|
|
1207
|
+
return /* @__PURE__ */ s(I, { alignItems: "center", justifyContent: "center", indent: !0, children: !h && /* @__PURE__ */ s(
|
|
1208
|
+
Fe,
|
|
1190
1209
|
{
|
|
1191
1210
|
size: "small",
|
|
1192
|
-
leftIcon: d ?
|
|
1193
|
-
onClick:
|
|
1211
|
+
leftIcon: d ? gt : wt,
|
|
1212
|
+
onClick: u,
|
|
1194
1213
|
...c
|
|
1195
1214
|
}
|
|
1196
1215
|
) });
|
|
1197
|
-
},
|
|
1198
|
-
() =>
|
|
1199
|
-
[e, t, n]
|
|
1200
|
-
),
|
|
1201
|
-
const { background:
|
|
1202
|
-
return _t(
|
|
1203
|
-
},
|
|
1204
|
-
const { background:
|
|
1205
|
-
return _t(
|
|
1206
|
-
},
|
|
1207
|
-
standardTableCell:
|
|
1208
|
-
},
|
|
1216
|
+
}, qr = (e, t, n, r) => e ? e(t, r) : n, _t = (e, t, n, r) => b(
|
|
1217
|
+
() => qr(e, t, n, r),
|
|
1218
|
+
[e, t, n, r]
|
|
1219
|
+
), _r = (e, t, n) => {
|
|
1220
|
+
const { background: r, backgroundResolver: o } = Ce(e);
|
|
1221
|
+
return _t(o, t, r, n);
|
|
1222
|
+
}, st = (e, t, n) => {
|
|
1223
|
+
const { background: r, backgroundResolver: o } = e ?? {};
|
|
1224
|
+
return _t(o, t, r, n);
|
|
1225
|
+
}, jr = (e) => e == null ? "" : e instanceof Date ? e.toISOString() : typeof e == "object" ? JSON.stringify(e) : String(e), Vr = (e) => Sn(Pn(e)), Kr = "_standardTableCell_1xzcm_1", $r = {
|
|
1226
|
+
standardTableCell: Kr
|
|
1227
|
+
}, Qr = R.memo(
|
|
1209
1228
|
function({
|
|
1210
1229
|
enableGridCell: t,
|
|
1211
1230
|
children: n,
|
|
@@ -1215,13 +1234,13 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1215
1234
|
justifyContent: i,
|
|
1216
1235
|
onKeyDown: c,
|
|
1217
1236
|
width: l,
|
|
1218
|
-
minWidth:
|
|
1237
|
+
minWidth: u
|
|
1219
1238
|
}) {
|
|
1220
1239
|
return /* @__PURE__ */ s(
|
|
1221
1240
|
I,
|
|
1222
1241
|
{
|
|
1223
1242
|
width: l,
|
|
1224
|
-
minWidth:
|
|
1243
|
+
minWidth: u,
|
|
1225
1244
|
height: "inherit",
|
|
1226
1245
|
background: r,
|
|
1227
1246
|
overflow: "hidden",
|
|
@@ -1230,7 +1249,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1230
1249
|
I,
|
|
1231
1250
|
{
|
|
1232
1251
|
border: "1px solid transparent",
|
|
1233
|
-
className:
|
|
1252
|
+
className: $r.standardTableCell,
|
|
1234
1253
|
width: "100%",
|
|
1235
1254
|
height: "100%",
|
|
1236
1255
|
justifyContent: i,
|
|
@@ -1245,13 +1264,13 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1245
1264
|
}
|
|
1246
1265
|
);
|
|
1247
1266
|
}
|
|
1248
|
-
),
|
|
1267
|
+
), Xr = R.memo(function({
|
|
1249
1268
|
label: t,
|
|
1250
1269
|
size: n,
|
|
1251
1270
|
color: r
|
|
1252
1271
|
}) {
|
|
1253
1272
|
return /* @__PURE__ */ s(G, { overflow: "hidden", children: /* @__PURE__ */ s(
|
|
1254
|
-
|
|
1273
|
+
ee,
|
|
1255
1274
|
{
|
|
1256
1275
|
title: t,
|
|
1257
1276
|
size: n,
|
|
@@ -1262,10 +1281,10 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1262
1281
|
children: t
|
|
1263
1282
|
}
|
|
1264
1283
|
) });
|
|
1265
|
-
}),
|
|
1284
|
+
}), Ur = ({
|
|
1266
1285
|
label: e,
|
|
1267
1286
|
textSize: t
|
|
1268
|
-
}) => /* @__PURE__ */ s(
|
|
1287
|
+
}) => /* @__PURE__ */ s(Xr, { label: e, size: t }), Jr = R.memo(function({
|
|
1269
1288
|
columnId: t,
|
|
1270
1289
|
item: n,
|
|
1271
1290
|
colIndex: r,
|
|
@@ -1276,114 +1295,114 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1276
1295
|
}) {
|
|
1277
1296
|
const {
|
|
1278
1297
|
keyResolver: l,
|
|
1279
|
-
enableGridCell:
|
|
1298
|
+
enableGridCell: u,
|
|
1280
1299
|
gridCellOptions: d
|
|
1281
|
-
} = T(),
|
|
1282
|
-
itemValueResolver:
|
|
1283
|
-
itemLabelFormatter:
|
|
1284
|
-
width:
|
|
1285
|
-
minWidth:
|
|
1286
|
-
justifyContentCell:
|
|
1287
|
-
borderLeft:
|
|
1288
|
-
renderCell: z =
|
|
1289
|
-
gridCellOptions:
|
|
1300
|
+
} = T(), h = qe(), f = rr(), { numNavigableColumns: p } = qt(), g = _e(), m = b(() => l(n), [n, l]), w = cr(m), { defaultCellRenderer: y = Ur, defaultTextSize: k } = T(), {
|
|
1301
|
+
itemValueResolver: S,
|
|
1302
|
+
itemLabelFormatter: v,
|
|
1303
|
+
width: O,
|
|
1304
|
+
minWidth: W,
|
|
1305
|
+
justifyContentCell: L = "flex-start",
|
|
1306
|
+
borderLeft: A,
|
|
1307
|
+
renderCell: z = y,
|
|
1308
|
+
gridCellOptions: V,
|
|
1290
1309
|
isEditable: q,
|
|
1291
|
-
onChange:
|
|
1292
|
-
onKeyDown:
|
|
1293
|
-
disableGridCell:
|
|
1294
|
-
disableGridCellFocus:
|
|
1295
|
-
zIndex:
|
|
1296
|
-
height:
|
|
1297
|
-
} =
|
|
1298
|
-
() =>
|
|
1299
|
-
[
|
|
1300
|
-
),
|
|
1301
|
-
(
|
|
1302
|
-
|
|
1310
|
+
onChange: K,
|
|
1311
|
+
onKeyDown: H,
|
|
1312
|
+
disableGridCell: ae,
|
|
1313
|
+
disableGridCellFocus: me,
|
|
1314
|
+
zIndex: ne,
|
|
1315
|
+
height: ie
|
|
1316
|
+
} = Ce(t), $ = b(() => S ? S(n) : t in n ? n[t] : "", [S, n, t]), U = b(
|
|
1317
|
+
() => v ? v($, n) : jr($),
|
|
1318
|
+
[$, v, n]
|
|
1319
|
+
), ce = typeof q == "boolean" ? q : q ? q(n) : void 0, fe = P(
|
|
1320
|
+
(xe) => {
|
|
1321
|
+
H?.(xe, { columnId: t, item: n }), f?.(xe, { columnId: t, item: n });
|
|
1303
1322
|
},
|
|
1304
|
-
[
|
|
1305
|
-
),
|
|
1323
|
+
[f, t, n, H]
|
|
1324
|
+
), re = Ie(U, {
|
|
1306
1325
|
colIndex: r,
|
|
1307
1326
|
rowIndex: o,
|
|
1308
1327
|
numRows: a,
|
|
1309
|
-
numCols:
|
|
1310
|
-
tableId:
|
|
1311
|
-
isEditable:
|
|
1312
|
-
onChange:
|
|
1328
|
+
numCols: p,
|
|
1329
|
+
tableId: h,
|
|
1330
|
+
isEditable: ce,
|
|
1331
|
+
onChange: K ? (xe) => K(n, xe) : void 0,
|
|
1313
1332
|
...d,
|
|
1314
|
-
|
|
1315
|
-
}),
|
|
1333
|
+
...V
|
|
1334
|
+
}), B = g[t], Ut = _r(t, n, w) ?? "inherit", Ee = B.sticky ? ne ?? "var(--swui-sticky-column-z-index)" : ne ?? 1, $e = ie ?? "var(--current-row-height)", Jt = b(
|
|
1316
1335
|
() => z({
|
|
1317
|
-
label:
|
|
1318
|
-
value:
|
|
1336
|
+
label: U,
|
|
1337
|
+
value: $,
|
|
1319
1338
|
item: n,
|
|
1320
|
-
gridCell:
|
|
1321
|
-
isEditable:
|
|
1322
|
-
isSelected:
|
|
1323
|
-
zIndex:
|
|
1324
|
-
textSize:
|
|
1325
|
-
itemKey:
|
|
1326
|
-
height:
|
|
1339
|
+
gridCell: re,
|
|
1340
|
+
isEditable: ce,
|
|
1341
|
+
isSelected: w,
|
|
1342
|
+
zIndex: Ee,
|
|
1343
|
+
textSize: k,
|
|
1344
|
+
itemKey: m,
|
|
1345
|
+
height: $e
|
|
1327
1346
|
}),
|
|
1328
1347
|
[
|
|
1329
1348
|
z,
|
|
1330
|
-
|
|
1331
|
-
|
|
1349
|
+
U,
|
|
1350
|
+
$,
|
|
1332
1351
|
n,
|
|
1333
|
-
xe,
|
|
1334
1352
|
re,
|
|
1335
|
-
|
|
1336
|
-
Re,
|
|
1353
|
+
ce,
|
|
1337
1354
|
w,
|
|
1338
|
-
|
|
1339
|
-
|
|
1355
|
+
Ee,
|
|
1356
|
+
m,
|
|
1357
|
+
k,
|
|
1358
|
+
$e
|
|
1340
1359
|
]
|
|
1341
|
-
), Zt =
|
|
1360
|
+
), Zt = Ve(
|
|
1342
1361
|
i,
|
|
1343
1362
|
c,
|
|
1344
|
-
|
|
1345
|
-
), en =
|
|
1363
|
+
A
|
|
1364
|
+
), en = B.sticky && B.type === "last-group" && B.isFirstColumnInLastGroup || B.sticky && B.type === "column" && B.right ? "var(--swui-sticky-column-shadow-left)" : B.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0;
|
|
1346
1365
|
return /* @__PURE__ */ s(
|
|
1347
1366
|
"td",
|
|
1348
1367
|
{
|
|
1349
1368
|
style: {
|
|
1350
1369
|
borderLeft: Zt,
|
|
1351
|
-
position:
|
|
1352
|
-
left:
|
|
1353
|
-
right:
|
|
1370
|
+
position: B.sticky ? "sticky" : void 0,
|
|
1371
|
+
left: B.sticky ? B.left : void 0,
|
|
1372
|
+
right: B.sticky ? B.right : void 0,
|
|
1354
1373
|
boxShadow: en,
|
|
1355
|
-
zIndex:
|
|
1374
|
+
zIndex: Ee,
|
|
1356
1375
|
height: "var(--current-row-height)",
|
|
1357
1376
|
background: Ut
|
|
1358
1377
|
},
|
|
1359
1378
|
children: /* @__PURE__ */ s(
|
|
1360
|
-
|
|
1379
|
+
Qr,
|
|
1361
1380
|
{
|
|
1362
|
-
enableGridCell:
|
|
1363
|
-
gridCellRequiredProps:
|
|
1364
|
-
isEditing:
|
|
1365
|
-
width:
|
|
1366
|
-
minWidth:
|
|
1367
|
-
justifyContent:
|
|
1368
|
-
onKeyDown:
|
|
1381
|
+
enableGridCell: u && !ae && !me,
|
|
1382
|
+
gridCellRequiredProps: re.requiredProps,
|
|
1383
|
+
isEditing: re.isEditing,
|
|
1384
|
+
width: O,
|
|
1385
|
+
minWidth: W,
|
|
1386
|
+
justifyContent: L,
|
|
1387
|
+
onKeyDown: fe,
|
|
1369
1388
|
children: Jt
|
|
1370
1389
|
}
|
|
1371
1390
|
)
|
|
1372
1391
|
}
|
|
1373
1392
|
);
|
|
1374
|
-
}),
|
|
1375
|
-
const { renderRowExpansion: n, enableExpandCollapse: r } = T(), { isExpanded: o, toggleRowExpanded: a } =
|
|
1393
|
+
}), Zr = function({ item: t }) {
|
|
1394
|
+
const { renderRowExpansion: n, enableExpandCollapse: r } = T(), { isExpanded: o, toggleRowExpanded: a } = Ke(t), i = je();
|
|
1376
1395
|
return /* @__PURE__ */ s(E, { children: r && n && o && /* @__PURE__ */ s(
|
|
1377
1396
|
"tr",
|
|
1378
1397
|
{
|
|
1379
1398
|
style: {
|
|
1380
|
-
borderLeft:
|
|
1381
|
-
background:
|
|
1399
|
+
borderLeft: St,
|
|
1400
|
+
background: kt
|
|
1382
1401
|
},
|
|
1383
1402
|
children: /* @__PURE__ */ s("td", { colSpan: i, children: n(t, { onRequestCollapse: a }) })
|
|
1384
1403
|
}
|
|
1385
1404
|
) });
|
|
1386
|
-
}, jt =
|
|
1405
|
+
}, jt = On.tr`
|
|
1387
1406
|
${({ focusBackground: e }) => e ? `--focus-within-background: ${e};` : ""}
|
|
1388
1407
|
${({ borderLeft: e }) => e ? `border-left: ${e};` : ""};
|
|
1389
1408
|
${({ background: e }) => e ? `background: ${e};` : ""};
|
|
@@ -1392,7 +1411,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1392
1411
|
background: ${e};
|
|
1393
1412
|
}
|
|
1394
1413
|
` : ""}
|
|
1395
|
-
`,
|
|
1414
|
+
`, eo = R.memo(function({
|
|
1396
1415
|
item: t,
|
|
1397
1416
|
idListForEnabledItems: n,
|
|
1398
1417
|
rowIndex: r,
|
|
@@ -1401,55 +1420,57 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1401
1420
|
alwaysVisible: i,
|
|
1402
1421
|
shiftPressedRef: c
|
|
1403
1422
|
}) {
|
|
1404
|
-
const l =
|
|
1423
|
+
const l = Q(null), u = je(), { stickyCheckboxColumn: d } = T(), h = te(), { columnIndexPerColumnId: f } = qt(), {
|
|
1405
1424
|
showRowCheckbox: p,
|
|
1406
1425
|
rowBackgroundResolver: g,
|
|
1407
1426
|
checkboxDisabledResolver: m,
|
|
1408
1427
|
enableGridCell: w,
|
|
1409
1428
|
rowIndent: y,
|
|
1410
|
-
enableExpandCollapse:
|
|
1411
|
-
} = T(), { isExpanded:
|
|
1429
|
+
enableExpandCollapse: k
|
|
1430
|
+
} = T(), { isExpanded: S } = Ke(t), { isSelected: v, toggleSelected: O, shiftAndToggleSelected: W } = Yr(
|
|
1412
1431
|
t,
|
|
1413
1432
|
n
|
|
1414
|
-
), L =
|
|
1433
|
+
), L = mn(l, {
|
|
1415
1434
|
rootMargin: "400px 0px 400px 0px",
|
|
1416
1435
|
threshold: 0
|
|
1417
1436
|
}), A = b(
|
|
1418
|
-
() => g?.(t,
|
|
1419
|
-
[
|
|
1420
|
-
),
|
|
1437
|
+
() => g?.(t, v),
|
|
1438
|
+
[v, t, g]
|
|
1439
|
+
), z = to(
|
|
1421
1440
|
A,
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
),
|
|
1441
|
+
v,
|
|
1442
|
+
S
|
|
1443
|
+
), V = no(
|
|
1425
1444
|
A,
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
),
|
|
1445
|
+
v,
|
|
1446
|
+
S
|
|
1447
|
+
), q = ro(
|
|
1429
1448
|
A,
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
),
|
|
1449
|
+
v,
|
|
1450
|
+
V
|
|
1451
|
+
), K = b(
|
|
1433
1452
|
() => m?.(t),
|
|
1434
1453
|
[t, m]
|
|
1435
|
-
), H =
|
|
1454
|
+
), H = dr(), ae = st(
|
|
1436
1455
|
H,
|
|
1437
|
-
t
|
|
1438
|
-
|
|
1456
|
+
t,
|
|
1457
|
+
v
|
|
1458
|
+
), me = ur(), ne = st(
|
|
1439
1459
|
me,
|
|
1440
|
-
t
|
|
1460
|
+
t,
|
|
1461
|
+
v
|
|
1441
1462
|
), ie = b(
|
|
1442
|
-
() => /* @__PURE__ */ s(E, { children: /* @__PURE__ */
|
|
1463
|
+
() => /* @__PURE__ */ s(E, { children: /* @__PURE__ */ C(E, { children: [
|
|
1443
1464
|
y && /* @__PURE__ */ s(
|
|
1444
1465
|
"td",
|
|
1445
1466
|
{
|
|
1446
1467
|
style: {
|
|
1447
|
-
background:
|
|
1468
|
+
background: ae
|
|
1448
1469
|
},
|
|
1449
1470
|
children: /* @__PURE__ */ s(G, { num: y })
|
|
1450
1471
|
}
|
|
1451
1472
|
),
|
|
1452
|
-
|
|
1473
|
+
k && /* @__PURE__ */ s(
|
|
1453
1474
|
"td",
|
|
1454
1475
|
{
|
|
1455
1476
|
style: {
|
|
@@ -1467,7 +1488,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1467
1488
|
alignItems: "center",
|
|
1468
1489
|
justifyContent: "center",
|
|
1469
1490
|
children: /* @__PURE__ */ s(
|
|
1470
|
-
|
|
1491
|
+
zr,
|
|
1471
1492
|
{
|
|
1472
1493
|
colIndex: a,
|
|
1473
1494
|
rowIndex: w ? r : 0,
|
|
@@ -1485,7 +1506,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1485
1506
|
style: {
|
|
1486
1507
|
background: d ? "inherit" : void 0,
|
|
1487
1508
|
position: d ? "sticky" : void 0,
|
|
1488
|
-
left:
|
|
1509
|
+
left: k && d ? "var(--swui-expand-cell-width)" : d ? "0px" : void 0,
|
|
1489
1510
|
textAlign: "center",
|
|
1490
1511
|
boxShadow: d ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
1491
1512
|
zIndex: d ? "var(--swui-sticky-column-z-index)" : void 0
|
|
@@ -1498,13 +1519,13 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1498
1519
|
alignItems: "center",
|
|
1499
1520
|
justifyContent: "center",
|
|
1500
1521
|
children: /* @__PURE__ */ s(
|
|
1501
|
-
|
|
1522
|
+
Hr,
|
|
1502
1523
|
{
|
|
1503
|
-
disabled:
|
|
1504
|
-
value:
|
|
1505
|
-
onValueChange:
|
|
1524
|
+
disabled: K,
|
|
1525
|
+
value: v,
|
|
1526
|
+
onValueChange: O,
|
|
1506
1527
|
onValueChangeAndShift: W,
|
|
1507
|
-
colIndex: a + (
|
|
1528
|
+
colIndex: a + (k ? 1 : 0),
|
|
1508
1529
|
rowIndex: r,
|
|
1509
1530
|
numRows: o,
|
|
1510
1531
|
shiftPressedRef: c
|
|
@@ -1514,28 +1535,28 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1514
1535
|
)
|
|
1515
1536
|
}
|
|
1516
1537
|
),
|
|
1517
|
-
|
|
1518
|
-
|
|
1538
|
+
h.map(({ groupConfig: $, groupId: U }, ce) => /* @__PURE__ */ s(R.Fragment, { children: $.columnOrder.map((fe, re) => /* @__PURE__ */ s(
|
|
1539
|
+
Jr,
|
|
1519
1540
|
{
|
|
1520
|
-
columnId:
|
|
1541
|
+
columnId: fe,
|
|
1521
1542
|
item: t,
|
|
1522
|
-
colIndex: a + f[
|
|
1543
|
+
colIndex: a + f[fe],
|
|
1523
1544
|
rowIndex: r,
|
|
1524
1545
|
numRows: o,
|
|
1525
|
-
borderFromGroup:
|
|
1546
|
+
borderFromGroup: Te(
|
|
1526
1547
|
ce,
|
|
1527
|
-
|
|
1528
|
-
|
|
1548
|
+
re,
|
|
1549
|
+
$.borderLeft
|
|
1529
1550
|
),
|
|
1530
|
-
disableBorderLeft: ce === 0 &&
|
|
1551
|
+
disableBorderLeft: ce === 0 && re === 0
|
|
1531
1552
|
},
|
|
1532
|
-
|
|
1533
|
-
)) },
|
|
1553
|
+
fe
|
|
1554
|
+
)) }, U)),
|
|
1534
1555
|
y && /* @__PURE__ */ s(
|
|
1535
1556
|
"td",
|
|
1536
1557
|
{
|
|
1537
1558
|
style: {
|
|
1538
|
-
background:
|
|
1559
|
+
background: ne
|
|
1539
1560
|
},
|
|
1540
1561
|
children: /* @__PURE__ */ s(G, { num: y })
|
|
1541
1562
|
}
|
|
@@ -1545,14 +1566,14 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1545
1566
|
[
|
|
1546
1567
|
a,
|
|
1547
1568
|
f,
|
|
1548
|
-
|
|
1549
|
-
|
|
1569
|
+
K,
|
|
1570
|
+
k,
|
|
1550
1571
|
w,
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1572
|
+
ae,
|
|
1573
|
+
h,
|
|
1574
|
+
v,
|
|
1554
1575
|
t,
|
|
1555
|
-
|
|
1576
|
+
ne,
|
|
1556
1577
|
o,
|
|
1557
1578
|
y,
|
|
1558
1579
|
r,
|
|
@@ -1560,58 +1581,58 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1560
1581
|
c,
|
|
1561
1582
|
p,
|
|
1562
1583
|
d,
|
|
1563
|
-
|
|
1584
|
+
O
|
|
1564
1585
|
]
|
|
1565
1586
|
);
|
|
1566
|
-
return /* @__PURE__ */
|
|
1587
|
+
return /* @__PURE__ */ C(E, { children: [
|
|
1567
1588
|
/* @__PURE__ */ s(
|
|
1568
1589
|
jt,
|
|
1569
1590
|
{
|
|
1570
|
-
hoverBackground:
|
|
1571
|
-
background:
|
|
1572
|
-
focusBackground:
|
|
1573
|
-
borderLeft:
|
|
1591
|
+
hoverBackground: V,
|
|
1592
|
+
background: z,
|
|
1593
|
+
focusBackground: q,
|
|
1594
|
+
borderLeft: S ? St : He,
|
|
1574
1595
|
ref: l,
|
|
1575
|
-
children: L || i ||
|
|
1596
|
+
children: L || i || S ? ie : /* @__PURE__ */ s(
|
|
1576
1597
|
"td",
|
|
1577
1598
|
{
|
|
1578
|
-
colSpan:
|
|
1599
|
+
colSpan: u,
|
|
1579
1600
|
style: { height: "var(--current-row-height)" }
|
|
1580
1601
|
}
|
|
1581
1602
|
)
|
|
1582
1603
|
}
|
|
1583
1604
|
),
|
|
1584
|
-
/* @__PURE__ */ s(
|
|
1605
|
+
/* @__PURE__ */ s(Zr, { item: t })
|
|
1585
1606
|
] });
|
|
1586
|
-
}),
|
|
1607
|
+
}), to = (e, t, n) => e ? typeof e == "string" ? e : e?.background : t ? j("--lhds-color-blue-100") : n ? kt : "white", no = (e, t, n) => e ? typeof e == "string" ? e : e?.hoverBackground : t ? j("--lhds-color-blue-200") : n ? Rn : j("--lhds-color-ui-200"), ro = (e, t, n) => {
|
|
1587
1608
|
if (t)
|
|
1588
1609
|
return j("--lhds-color-blue-200");
|
|
1589
1610
|
if (e)
|
|
1590
1611
|
return n;
|
|
1591
|
-
},
|
|
1592
|
-
summaryRow:
|
|
1593
|
-
},
|
|
1612
|
+
}, oo = (e) => Object.values(e).some((t) => so(t)), so = (e) => !!(e.renderSummaryCell || e.summaryText), ao = "_summaryRow_12x8k_1", io = {
|
|
1613
|
+
summaryRow: ao
|
|
1614
|
+
}, co = R.memo(function({
|
|
1594
1615
|
columnId: t,
|
|
1595
1616
|
items: n,
|
|
1596
1617
|
disableBorderLeft: r,
|
|
1597
1618
|
borderFromGroup: o,
|
|
1598
1619
|
colSpan: a
|
|
1599
1620
|
}) {
|
|
1600
|
-
const i =
|
|
1621
|
+
const i = _e(), {
|
|
1601
1622
|
renderSummaryCell: c,
|
|
1602
1623
|
summaryText: l,
|
|
1603
|
-
borderLeft:
|
|
1624
|
+
borderLeft: u,
|
|
1604
1625
|
zIndex: d,
|
|
1605
|
-
width:
|
|
1626
|
+
width: h,
|
|
1606
1627
|
minWidth: f,
|
|
1607
1628
|
justifyContentCell: p
|
|
1608
|
-
} =
|
|
1629
|
+
} = Ce(t), g = Ve(
|
|
1609
1630
|
o,
|
|
1610
1631
|
r,
|
|
1611
|
-
|
|
1612
|
-
), m = i[t], w = m.sticky ? d ?? "var(--swui-sticky-column-z-index)" : d ?? 1, y = m.sticky && m.type === "last-group" && m.isFirstColumnInLastGroup || m.sticky && m.type === "column" && m.right ? "var(--swui-sticky-column-shadow-left)" : m.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
1613
|
-
() => c?.({ items: n, text:
|
|
1614
|
-
[n, c,
|
|
1632
|
+
u
|
|
1633
|
+
), m = i[t], w = m.sticky ? d ?? "var(--swui-sticky-column-z-index)" : d ?? 1, y = m.sticky && m.type === "last-group" && m.isFirstColumnInLastGroup || m.sticky && m.type === "column" && m.right ? "var(--swui-sticky-column-shadow-left)" : m.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0, k = b(() => l?.({ items: n }), [n, l]), S = b(
|
|
1634
|
+
() => c?.({ items: n, text: k }),
|
|
1635
|
+
[n, c, k]
|
|
1615
1636
|
);
|
|
1616
1637
|
return /* @__PURE__ */ s(
|
|
1617
1638
|
"td",
|
|
@@ -1629,18 +1650,18 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1629
1650
|
children: /* @__PURE__ */ s(
|
|
1630
1651
|
I,
|
|
1631
1652
|
{
|
|
1632
|
-
width:
|
|
1653
|
+
width: h,
|
|
1633
1654
|
minWidth: f,
|
|
1634
1655
|
height: "inherit",
|
|
1635
1656
|
overflow: "hidden",
|
|
1636
1657
|
justifyContent: p,
|
|
1637
1658
|
alignItems: "center",
|
|
1638
|
-
children: c ?
|
|
1659
|
+
children: c ? S : /* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(ee, { variant: "bold", children: k }) })
|
|
1639
1660
|
}
|
|
1640
1661
|
)
|
|
1641
1662
|
}
|
|
1642
1663
|
);
|
|
1643
|
-
}),
|
|
1664
|
+
}), lo = (e, t) => {
|
|
1644
1665
|
const n = [];
|
|
1645
1666
|
for (let r = 0; r < e.length; r++) {
|
|
1646
1667
|
const { summaryCellColSpan: o } = t[e[r]], a = Math.min(
|
|
@@ -1652,28 +1673,28 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1652
1673
|
i > 1 && (r += i - 1);
|
|
1653
1674
|
}
|
|
1654
1675
|
return n;
|
|
1655
|
-
},
|
|
1676
|
+
}, uo = R.memo(
|
|
1656
1677
|
function({
|
|
1657
1678
|
items: t
|
|
1658
1679
|
}) {
|
|
1659
|
-
const n =
|
|
1660
|
-
return /* @__PURE__ */
|
|
1680
|
+
const n = te(), { showRowCheckbox: r, enableExpandCollapse: o, columns: a, rowIndent: i } = T();
|
|
1681
|
+
return /* @__PURE__ */ C("tr", { className: io.summaryRow, children: [
|
|
1661
1682
|
i && /* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(G, { num: i }) }),
|
|
1662
1683
|
o && /* @__PURE__ */ s("td", {}),
|
|
1663
1684
|
r && /* @__PURE__ */ s("td", {}),
|
|
1664
|
-
n.map(({ groupConfig: c, groupId: l },
|
|
1665
|
-
({ columnId: d, colSpan:
|
|
1666
|
-
|
|
1685
|
+
n.map(({ groupConfig: c, groupId: l }, u) => /* @__PURE__ */ s(R.Fragment, { children: lo(c.columnOrder, a).map(
|
|
1686
|
+
({ columnId: d, colSpan: h }, f) => /* @__PURE__ */ s(
|
|
1687
|
+
co,
|
|
1667
1688
|
{
|
|
1668
|
-
colSpan:
|
|
1689
|
+
colSpan: h,
|
|
1669
1690
|
columnId: d,
|
|
1670
1691
|
items: t,
|
|
1671
|
-
borderFromGroup:
|
|
1672
|
-
|
|
1692
|
+
borderFromGroup: Te(
|
|
1693
|
+
u,
|
|
1673
1694
|
f,
|
|
1674
1695
|
c.borderLeft
|
|
1675
1696
|
),
|
|
1676
|
-
disableBorderLeft:
|
|
1697
|
+
disableBorderLeft: u === 0 && f === 0
|
|
1677
1698
|
},
|
|
1678
1699
|
d
|
|
1679
1700
|
)
|
|
@@ -1682,23 +1703,23 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1682
1703
|
/* @__PURE__ */ s("td", {})
|
|
1683
1704
|
] });
|
|
1684
1705
|
}
|
|
1685
|
-
),
|
|
1706
|
+
), ho = function({ items: t }) {
|
|
1686
1707
|
const { columns: n } = T();
|
|
1687
|
-
return b(() =>
|
|
1688
|
-
}, Vt = (e) => (t) => e == null ? !0 : !e(t),
|
|
1708
|
+
return b(() => oo(n), [n]) ? /* @__PURE__ */ s(uo, { items: t }) : null;
|
|
1709
|
+
}, Vt = (e) => (t) => e == null ? !0 : !e(t), mo = R.memo(function({
|
|
1689
1710
|
items: t,
|
|
1690
1711
|
colIndexOffset: n = 0,
|
|
1691
1712
|
rowIndexOffset: r = 0
|
|
1692
1713
|
}) {
|
|
1693
|
-
const o =
|
|
1714
|
+
const o = Q(0), a = Q(!1), {
|
|
1694
1715
|
keyResolver: i,
|
|
1695
1716
|
disableInfiniteList: c,
|
|
1696
1717
|
checkboxDisabledResolver: l,
|
|
1697
|
-
enableExternalSorting:
|
|
1718
|
+
enableExternalSorting: u
|
|
1698
1719
|
} = T(), {
|
|
1699
|
-
sortOrder: { sortBy: d, desc:
|
|
1700
|
-
} =
|
|
1701
|
-
if (
|
|
1720
|
+
sortOrder: { sortBy: d, desc: h }
|
|
1721
|
+
} = he(), f = Ar(d), p = b(() => {
|
|
1722
|
+
if (u)
|
|
1702
1723
|
return t ?? [];
|
|
1703
1724
|
if (!t || !t.length)
|
|
1704
1725
|
return [];
|
|
@@ -1706,16 +1727,16 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1706
1727
|
return t;
|
|
1707
1728
|
const m = [...t];
|
|
1708
1729
|
return m.sort(
|
|
1709
|
-
(w, y) =>
|
|
1730
|
+
(w, y) => Lr(
|
|
1710
1731
|
f(w),
|
|
1711
1732
|
f(y)
|
|
1712
1733
|
)
|
|
1713
|
-
),
|
|
1714
|
-
}, [
|
|
1734
|
+
), h && m.reverse(), c || o.current++, m;
|
|
1735
|
+
}, [u, t, f, h, c]), g = b(
|
|
1715
1736
|
() => p.filter(Vt(l)).map((m) => i(m)),
|
|
1716
1737
|
[p, l, i]
|
|
1717
1738
|
);
|
|
1718
|
-
return
|
|
1739
|
+
return ft(() => {
|
|
1719
1740
|
const m = (y) => {
|
|
1720
1741
|
y.key === "Shift" && (a.current = !1);
|
|
1721
1742
|
}, w = (y) => {
|
|
@@ -1724,9 +1745,9 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1724
1745
|
return document.addEventListener("keyup", m), document.addEventListener("keydown", w), () => {
|
|
1725
1746
|
document.removeEventListener("keyup", m), document.removeEventListener("keydown", w);
|
|
1726
1747
|
};
|
|
1727
|
-
}, []), /* @__PURE__ */
|
|
1748
|
+
}, []), /* @__PURE__ */ C(R.Fragment, { children: [
|
|
1728
1749
|
p.map((m, w) => /* @__PURE__ */ s(
|
|
1729
|
-
|
|
1750
|
+
eo,
|
|
1730
1751
|
{
|
|
1731
1752
|
alwaysVisible: c || p.length < 30,
|
|
1732
1753
|
item: m,
|
|
@@ -1738,9 +1759,9 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1738
1759
|
},
|
|
1739
1760
|
i(m)
|
|
1740
1761
|
)),
|
|
1741
|
-
/* @__PURE__ */ s(
|
|
1762
|
+
/* @__PURE__ */ s(ho, { items: p })
|
|
1742
1763
|
] }, o.current);
|
|
1743
|
-
}),
|
|
1764
|
+
}), fo = R.memo(function({
|
|
1744
1765
|
error: t,
|
|
1745
1766
|
bannerError: n,
|
|
1746
1767
|
loading: r,
|
|
@@ -1749,22 +1770,22 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1749
1770
|
noItemsContentRight: i,
|
|
1750
1771
|
noItemsContentBottom: c,
|
|
1751
1772
|
noItemsHeader: l,
|
|
1752
|
-
colIndexOffset:
|
|
1773
|
+
colIndexOffset: u,
|
|
1753
1774
|
rowIndexOffset: d,
|
|
1754
|
-
variant:
|
|
1775
|
+
variant: h,
|
|
1755
1776
|
errorLabel: f,
|
|
1756
1777
|
renderExtraRowTop: p,
|
|
1757
1778
|
renderExtraRowBottom: g
|
|
1758
1779
|
}) {
|
|
1759
|
-
const m =
|
|
1760
|
-
return n ? /* @__PURE__ */ s("tbody", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: m, children: /* @__PURE__ */ s(
|
|
1761
|
-
|
|
1780
|
+
const m = je();
|
|
1781
|
+
return n ? /* @__PURE__ */ s("tbody", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: m, children: /* @__PURE__ */ s(Re, { num: 4, justifyContent: "center", children: /* @__PURE__ */ s(ue, { alignItems: "center", children: /* @__PURE__ */ s(dn, { bannerState: n, variant: "error" }) }) }) }) }) }) : t || f ? /* @__PURE__ */ s("tbody", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: m, children: /* @__PURE__ */ s(Re, { num: 4, justifyContent: "center", children: /* @__PURE__ */ s(ue, { alignItems: "center", children: /* @__PURE__ */ s(
|
|
1782
|
+
Qe,
|
|
1762
1783
|
{
|
|
1763
1784
|
headerText: (t ? t.message : f) ?? "Unknown error",
|
|
1764
1785
|
variant: "error"
|
|
1765
1786
|
}
|
|
1766
|
-
) }) }) }) }) }) : r ? /* @__PURE__ */ s("tbody", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: m, children: /* @__PURE__ */ s(
|
|
1767
|
-
|
|
1787
|
+
) }) }) }) }) }) : r ? /* @__PURE__ */ s("tbody", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: m, children: /* @__PURE__ */ s(Re, { num: 4, children: /* @__PURE__ */ s(Cn, {}) }) }) }) }) : !o || !o.length ? /* @__PURE__ */ s("tbody", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: m, children: /* @__PURE__ */ s(I, { spacing: 4, justifyContent: "center", children: /* @__PURE__ */ s(
|
|
1788
|
+
Qe,
|
|
1768
1789
|
{
|
|
1769
1790
|
text: a,
|
|
1770
1791
|
headerText: l,
|
|
@@ -1772,26 +1793,26 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1772
1793
|
variant: "info",
|
|
1773
1794
|
children: c
|
|
1774
1795
|
}
|
|
1775
|
-
) }) }) }) }) : /* @__PURE__ */
|
|
1796
|
+
) }) }) }) }) : /* @__PURE__ */ C("tbody", { children: [
|
|
1776
1797
|
p?.(),
|
|
1777
1798
|
/* @__PURE__ */ s(
|
|
1778
|
-
|
|
1799
|
+
mo,
|
|
1779
1800
|
{
|
|
1780
|
-
variant:
|
|
1801
|
+
variant: h,
|
|
1781
1802
|
items: o,
|
|
1782
|
-
colIndexOffset:
|
|
1803
|
+
colIndexOffset: u,
|
|
1783
1804
|
rowIndexOffset: d
|
|
1784
1805
|
}
|
|
1785
1806
|
),
|
|
1786
1807
|
g?.()
|
|
1787
1808
|
] });
|
|
1788
|
-
}),
|
|
1809
|
+
}), po = (e) => {
|
|
1789
1810
|
const { keyResolver: t, checkboxDisabledResolver: n } = T(), {
|
|
1790
1811
|
selectedIds: { selectedIds: r }
|
|
1791
|
-
} =
|
|
1812
|
+
} = he(), {
|
|
1792
1813
|
actions: { setSelectedIds: o, clearSelection: a },
|
|
1793
1814
|
dispatch: i
|
|
1794
|
-
} =
|
|
1815
|
+
} = ve(), c = r.length === 0, l = e ? e.length > 0 && r.length === e.length : !1, u = P(() => {
|
|
1795
1816
|
e && i(
|
|
1796
1817
|
c ? o(
|
|
1797
1818
|
e.filter(Vt(n)).map((d) => t(d))
|
|
@@ -1809,15 +1830,15 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1809
1830
|
return {
|
|
1810
1831
|
selectionIsEmpty: c,
|
|
1811
1832
|
allItemsAreSelected: l,
|
|
1812
|
-
onClickCheckbox:
|
|
1833
|
+
onClickCheckbox: u
|
|
1813
1834
|
};
|
|
1814
|
-
},
|
|
1835
|
+
}, go = (e) => {
|
|
1815
1836
|
const { keyResolver: t } = T(), {
|
|
1816
1837
|
expandedRows: { selectedIds: n }
|
|
1817
|
-
} =
|
|
1838
|
+
} = he(), {
|
|
1818
1839
|
actions: { collapseAll: r, expandByIds: o },
|
|
1819
1840
|
dispatch: a
|
|
1820
|
-
} =
|
|
1841
|
+
} = ve(), i = e ? e.length > 0 && n.length === e.length : !1, c = P(() => {
|
|
1821
1842
|
e && a(i ? r() : o(e.map((l) => t(l))));
|
|
1822
1843
|
}, [
|
|
1823
1844
|
i,
|
|
@@ -1831,10 +1852,10 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1831
1852
|
allItemsAreExpanded: i,
|
|
1832
1853
|
toggleExpanded: c
|
|
1833
1854
|
};
|
|
1834
|
-
},
|
|
1835
|
-
const { dispatch: t, actions: n } =
|
|
1855
|
+
}, wo = (e) => {
|
|
1856
|
+
const { dispatch: t, actions: n } = ve(), r = or(), {
|
|
1836
1857
|
sortOrder: { desc: o, sortBy: a }
|
|
1837
|
-
} =
|
|
1858
|
+
} = he();
|
|
1838
1859
|
return b(() => {
|
|
1839
1860
|
const i = e === a;
|
|
1840
1861
|
return {
|
|
@@ -1847,9 +1868,9 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1847
1868
|
}
|
|
1848
1869
|
};
|
|
1849
1870
|
}, [e, a, o, t, n, r]);
|
|
1850
|
-
},
|
|
1851
|
-
standardTableHeadTh:
|
|
1852
|
-
},
|
|
1871
|
+
}, yo = "_standardTableHeadTh_swsxb_8", bo = {
|
|
1872
|
+
standardTableHeadTh: yo
|
|
1873
|
+
}, vo = R.memo(
|
|
1853
1874
|
function({
|
|
1854
1875
|
columnId: t,
|
|
1855
1876
|
borderFromGroup: n,
|
|
@@ -1861,37 +1882,37 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1861
1882
|
borderLeft: i,
|
|
1862
1883
|
infoIconTooltipText: c,
|
|
1863
1884
|
columnHeadContent: l,
|
|
1864
|
-
background:
|
|
1885
|
+
background: u,
|
|
1865
1886
|
width: d,
|
|
1866
|
-
minWidth:
|
|
1867
|
-
} =
|
|
1887
|
+
minWidth: h
|
|
1888
|
+
} = Ce(t), { disableSorting: f, infoIconTooltipAppendTo: p, infoIconTooltipZIndex: g } = T(), m = _e(), { arrow: w, selected: y, onClickColumnHead: k } = wo(t), S = typeof a == "string" ? a : Vr(t), v = Ve(
|
|
1868
1889
|
n,
|
|
1869
1890
|
r,
|
|
1870
1891
|
i
|
|
1871
|
-
),
|
|
1892
|
+
), O = m[t];
|
|
1872
1893
|
return /* @__PURE__ */ s(
|
|
1873
1894
|
"th",
|
|
1874
1895
|
{
|
|
1875
|
-
className:
|
|
1896
|
+
className: bo.standardTableHeadTh,
|
|
1876
1897
|
style: {
|
|
1877
|
-
background:
|
|
1878
|
-
borderLeft:
|
|
1879
|
-
position:
|
|
1880
|
-
left:
|
|
1881
|
-
right:
|
|
1882
|
-
boxShadow:
|
|
1883
|
-
zIndex:
|
|
1898
|
+
background: u ?? "white",
|
|
1899
|
+
borderLeft: v,
|
|
1900
|
+
position: O.sticky ? "sticky" : void 0,
|
|
1901
|
+
left: O.left,
|
|
1902
|
+
right: O.right,
|
|
1903
|
+
boxShadow: O.sticky && O.isFirstColumnInLastGroup && O.sticky && O.isFirstColumnInLastGroup ? "var(--swui-sticky-column-shadow-left)" : O.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
1904
|
+
zIndex: O.sticky ? "var(--swui-sticky-group-header-z-index)" : void 0,
|
|
1884
1905
|
width: d,
|
|
1885
|
-
minWidth:
|
|
1906
|
+
minWidth: h
|
|
1886
1907
|
},
|
|
1887
1908
|
children: /* @__PURE__ */ s(
|
|
1888
|
-
|
|
1909
|
+
ze,
|
|
1889
1910
|
{
|
|
1890
1911
|
width: "inherit",
|
|
1891
1912
|
minWidth: "inherit",
|
|
1892
|
-
arrow: !f &&
|
|
1893
|
-
onClick: f ? void 0 :
|
|
1894
|
-
label:
|
|
1913
|
+
arrow: !f && S ? w : void 0,
|
|
1914
|
+
onClick: f ? void 0 : k,
|
|
1915
|
+
label: S,
|
|
1895
1916
|
infoIconTooltipAppendTo: p,
|
|
1896
1917
|
infoIconTooltipText: c,
|
|
1897
1918
|
infoIconTooltipZIndex: g,
|
|
@@ -1904,21 +1925,21 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1904
1925
|
}
|
|
1905
1926
|
);
|
|
1906
1927
|
}
|
|
1907
|
-
),
|
|
1908
|
-
const r =
|
|
1928
|
+
), Co = R.memo(function({ items: t, height: n = Ne }) {
|
|
1929
|
+
const r = te(), {
|
|
1909
1930
|
showHeaderCheckbox: o,
|
|
1910
1931
|
showHeaderExpandCollapse: a,
|
|
1911
1932
|
enableExpandCollapse: i,
|
|
1912
1933
|
rowIndent: c,
|
|
1913
1934
|
stickyCheckboxColumn: l,
|
|
1914
|
-
showRowCheckbox:
|
|
1915
|
-
} = T(), { allItemsAreExpanded: d, toggleExpanded:
|
|
1935
|
+
showRowCheckbox: u
|
|
1936
|
+
} = T(), { allItemsAreExpanded: d, toggleExpanded: h } = go(t), { allItemsAreSelected: f, onClickCheckbox: p, selectionIsEmpty: g } = po(t), m = !t || t.length === 0, w = {
|
|
1916
1937
|
zIndex: l ? "var(--swui-sticky-group-header-z-index)" : void 0,
|
|
1917
1938
|
background: l ? "white" : void 0,
|
|
1918
1939
|
position: l ? "sticky" : void 0,
|
|
1919
1940
|
boxShadow: l ? "var(--swui-sticky-column-shadow-right)" : void 0
|
|
1920
1941
|
};
|
|
1921
|
-
return /* @__PURE__ */
|
|
1942
|
+
return /* @__PURE__ */ C(jt, { height: n, borderLeft: He, children: [
|
|
1922
1943
|
c && /* @__PURE__ */ s("th", { children: /* @__PURE__ */ s(I, { indent: c }) }),
|
|
1923
1944
|
i && /* @__PURE__ */ s(
|
|
1924
1945
|
"th",
|
|
@@ -1936,18 +1957,18 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1936
1957
|
alignItems: "center",
|
|
1937
1958
|
justifyContent: "center",
|
|
1938
1959
|
children: a && /* @__PURE__ */ s(
|
|
1939
|
-
|
|
1960
|
+
Fe,
|
|
1940
1961
|
{
|
|
1941
1962
|
size: "small",
|
|
1942
|
-
leftIcon: d ?
|
|
1943
|
-
onClick:
|
|
1963
|
+
leftIcon: d ? gt : wt,
|
|
1964
|
+
onClick: h
|
|
1944
1965
|
}
|
|
1945
1966
|
)
|
|
1946
1967
|
}
|
|
1947
1968
|
)
|
|
1948
1969
|
}
|
|
1949
1970
|
),
|
|
1950
|
-
(
|
|
1971
|
+
(u || o) && /* @__PURE__ */ s(
|
|
1951
1972
|
"th",
|
|
1952
1973
|
{
|
|
1953
1974
|
style: {
|
|
@@ -1963,7 +1984,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1963
1984
|
alignItems: "center",
|
|
1964
1985
|
justifyContent: "center",
|
|
1965
1986
|
children: o && /* @__PURE__ */ s(
|
|
1966
|
-
|
|
1987
|
+
Le,
|
|
1967
1988
|
{
|
|
1968
1989
|
size: "small",
|
|
1969
1990
|
disabled: m,
|
|
@@ -1976,23 +1997,23 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
1976
1997
|
)
|
|
1977
1998
|
}
|
|
1978
1999
|
),
|
|
1979
|
-
r.map(({ groupConfig: y, groupId:
|
|
1980
|
-
|
|
2000
|
+
r.map(({ groupConfig: y, groupId: k }, S) => /* @__PURE__ */ s(R.Fragment, { children: y.columnOrder.map((v, O) => /* @__PURE__ */ s(
|
|
2001
|
+
vo,
|
|
1981
2002
|
{
|
|
1982
|
-
columnId:
|
|
1983
|
-
borderFromGroup:
|
|
2003
|
+
columnId: v,
|
|
2004
|
+
borderFromGroup: Te(
|
|
2005
|
+
S,
|
|
1984
2006
|
O,
|
|
1985
|
-
k,
|
|
1986
2007
|
y.borderLeft
|
|
1987
2008
|
),
|
|
1988
|
-
disableBorderLeft:
|
|
2009
|
+
disableBorderLeft: S === 0 && O === 0
|
|
1989
2010
|
},
|
|
1990
|
-
|
|
1991
|
-
)) },
|
|
2011
|
+
v
|
|
2012
|
+
)) }, k)),
|
|
1992
2013
|
c && /* @__PURE__ */ s("th", { children: /* @__PURE__ */ s(I, { indent: c }) }),
|
|
1993
2014
|
/* @__PURE__ */ s("th", {})
|
|
1994
2015
|
] });
|
|
1995
|
-
}),
|
|
2016
|
+
}), Js = function({
|
|
1996
2017
|
tableContext: t,
|
|
1997
2018
|
config: n,
|
|
1998
2019
|
columnGroupOrder: r,
|
|
@@ -2001,123 +2022,131 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
2001
2022
|
onKeyDown: i,
|
|
2002
2023
|
onSortOrderChange: c,
|
|
2003
2024
|
renderExtraHeadRows: l,
|
|
2004
|
-
...
|
|
2025
|
+
...u
|
|
2005
2026
|
}) {
|
|
2006
|
-
const d =
|
|
2007
|
-
initialSortOrderDesc:
|
|
2027
|
+
const d = on(), {
|
|
2028
|
+
initialSortOrderDesc: h,
|
|
2008
2029
|
initialSortOrder: f,
|
|
2009
2030
|
enableExpandCollapse: p,
|
|
2010
2031
|
stickyCheckboxColumn: g,
|
|
2011
2032
|
headerRowOffsetTop: m,
|
|
2012
2033
|
stickyHeader: w,
|
|
2013
2034
|
zIndex: y
|
|
2014
|
-
} = n, { tableContext:
|
|
2035
|
+
} = n, { tableContext: k } = Dr(
|
|
2015
2036
|
o ?? d,
|
|
2016
|
-
|
|
2017
|
-
),
|
|
2037
|
+
Gt(f, h)
|
|
2038
|
+
), S = t || k, { state: v, actions: O, dispatch: W } = S, L = ir(
|
|
2039
|
+
v.selectedIds.selectedIds
|
|
2040
|
+
), A = b(
|
|
2018
2041
|
() => ({
|
|
2019
|
-
actions:
|
|
2042
|
+
actions: O,
|
|
2020
2043
|
dispatch: W
|
|
2021
2044
|
}),
|
|
2022
|
-
[
|
|
2023
|
-
),
|
|
2045
|
+
[O, W]
|
|
2046
|
+
), z = !!(r ?? "columnGroupOrder" in n), V = "columnGroups" in n ? n.columnGroups : void 0, q = "columnGroupOrder" in n ? n.columnGroupOrder : void 0, K = "columnOrder" in n ? n.columnOrder : void 0, H = b(
|
|
2024
2047
|
() => Yt(
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2048
|
+
V,
|
|
2049
|
+
q,
|
|
2050
|
+
K
|
|
2028
2051
|
),
|
|
2029
|
-
[
|
|
2030
|
-
),
|
|
2031
|
-
() =>
|
|
2052
|
+
[V, q, K]
|
|
2053
|
+
), ae = b(
|
|
2054
|
+
() => wr(n),
|
|
2032
2055
|
[n]
|
|
2033
|
-
),
|
|
2034
|
-
() =>
|
|
2056
|
+
), me = b(() => Er(n), [n]), ne = b(
|
|
2057
|
+
() => Pr(n),
|
|
2035
2058
|
[n]
|
|
2036
|
-
),
|
|
2059
|
+
), ie = b(() => {
|
|
2037
2060
|
try {
|
|
2038
|
-
|
|
2061
|
+
br(n);
|
|
2039
2062
|
return;
|
|
2040
|
-
} catch (
|
|
2041
|
-
return
|
|
2063
|
+
} catch (U) {
|
|
2064
|
+
return U instanceof Error ? U : new Error("Unknown error");
|
|
2042
2065
|
}
|
|
2043
|
-
}, [n]),
|
|
2066
|
+
}, [n]), $ = {
|
|
2044
2067
|
background: w || g ? "white" : void 0,
|
|
2045
2068
|
position: w || g ? "sticky" : void 0,
|
|
2046
2069
|
top: w || g ? m ?? 0 : void 0,
|
|
2047
2070
|
boxShadow: w && g ? "var(--swui-sticky-header-shadow-and-right)" : g ? "var(--swui-sticky-column-shadow-right)" : w ? "var(--swui-sticky-header-shadow)" : void 0,
|
|
2048
2071
|
zIndex: w && g ? "var(--swui-sticky-header-in-sticky-column-z-index)" : g ? "var(--swui-sticky-group-header-z-index)" : w ? "var(--swui-sticky-head-z-index)" : y
|
|
2049
2072
|
};
|
|
2050
|
-
return
|
|
2073
|
+
return ie ? /* @__PURE__ */ s(xn, { text: ie.message }) : /* @__PURE__ */ s(
|
|
2051
2074
|
"table",
|
|
2052
2075
|
{
|
|
2053
|
-
className:
|
|
2076
|
+
className: vt(ot.standardTable, ot[a]),
|
|
2054
2077
|
style: {
|
|
2055
2078
|
width: "100%",
|
|
2056
2079
|
isolation: "isolate",
|
|
2057
2080
|
"--current-left-offset": p && g ? "calc(var(--swui-expand-cell-width) + var(--swui-checkbox-cell-width))" : g ? "var(--swui-checkbox-cell-width)" : p ? "var(--swui-expand-cell-width)" : "0px"
|
|
2058
2081
|
},
|
|
2059
|
-
children: /* @__PURE__ */ s(Ht.Provider, { value:
|
|
2060
|
-
|
|
2082
|
+
children: /* @__PURE__ */ s(Ht.Provider, { value: ne, children: /* @__PURE__ */ s(Nt.Provider, { value: me, children: /* @__PURE__ */ s(lr.Provider, { value: a, children: /* @__PURE__ */ s(
|
|
2083
|
+
Dt.Provider,
|
|
2061
2084
|
{
|
|
2062
2085
|
value: o ?? d,
|
|
2063
|
-
children: /* @__PURE__ */ s(
|
|
2064
|
-
|
|
2086
|
+
children: /* @__PURE__ */ s(Et.Provider, { value: v, children: /* @__PURE__ */ s(
|
|
2087
|
+
At.Provider,
|
|
2065
2088
|
{
|
|
2066
|
-
value:
|
|
2067
|
-
children: /* @__PURE__ */ s(
|
|
2068
|
-
|
|
2089
|
+
value: L,
|
|
2090
|
+
children: /* @__PURE__ */ s(Rt.Provider, { value: A, children: /* @__PURE__ */ s(Mt.Provider, { value: n, children: /* @__PURE__ */ s(
|
|
2091
|
+
Wt.Provider,
|
|
2069
2092
|
{
|
|
2070
2093
|
value: H,
|
|
2071
2094
|
children: /* @__PURE__ */ s(
|
|
2072
|
-
|
|
2095
|
+
zt.Provider,
|
|
2073
2096
|
{
|
|
2074
|
-
value:
|
|
2075
|
-
children: /* @__PURE__ */
|
|
2076
|
-
|
|
2097
|
+
value: ae,
|
|
2098
|
+
children: /* @__PURE__ */ s(
|
|
2099
|
+
ar.Provider,
|
|
2077
2100
|
{
|
|
2078
|
-
value:
|
|
2079
|
-
children:
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
children:
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2101
|
+
value: z,
|
|
2102
|
+
children: /* @__PURE__ */ C(
|
|
2103
|
+
sr.Provider,
|
|
2104
|
+
{
|
|
2105
|
+
value: "columnGroupOrder" in n ? r ?? n.columnGroupOrder : r,
|
|
2106
|
+
children: [
|
|
2107
|
+
/* @__PURE__ */ s(Mr, {}),
|
|
2108
|
+
/* @__PURE__ */ s(Bt.Provider, { value: i, children: /* @__PURE__ */ C(
|
|
2109
|
+
Lt.Provider,
|
|
2110
|
+
{
|
|
2111
|
+
value: c,
|
|
2112
|
+
children: [
|
|
2113
|
+
/* @__PURE__ */ C("thead", { style: $, children: [
|
|
2114
|
+
(r || "columnGroupOrder" in n) && /* @__PURE__ */ s(
|
|
2115
|
+
gr,
|
|
2116
|
+
{
|
|
2117
|
+
height: "var(--current-row-height)"
|
|
2118
|
+
}
|
|
2119
|
+
),
|
|
2120
|
+
/* @__PURE__ */ s(
|
|
2121
|
+
Co,
|
|
2122
|
+
{
|
|
2123
|
+
items: u.items,
|
|
2124
|
+
height: "var(--current-row-height)"
|
|
2125
|
+
}
|
|
2126
|
+
),
|
|
2127
|
+
l?.()
|
|
2128
|
+
] }),
|
|
2129
|
+
/* @__PURE__ */ s(
|
|
2130
|
+
fo,
|
|
2131
|
+
{
|
|
2132
|
+
variant: a,
|
|
2133
|
+
...u
|
|
2134
|
+
}
|
|
2135
|
+
)
|
|
2136
|
+
]
|
|
2137
|
+
}
|
|
2138
|
+
) })
|
|
2139
|
+
]
|
|
2140
|
+
}
|
|
2141
|
+
)
|
|
2113
2142
|
}
|
|
2114
2143
|
)
|
|
2115
2144
|
}
|
|
2116
2145
|
)
|
|
2117
2146
|
}
|
|
2118
|
-
)
|
|
2147
|
+
) }) })
|
|
2119
2148
|
}
|
|
2120
|
-
) })
|
|
2149
|
+
) })
|
|
2121
2150
|
}
|
|
2122
2151
|
) }) }) })
|
|
2123
2152
|
}
|
|
@@ -2125,7 +2154,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
2125
2154
|
}, le = (e, t) => ({
|
|
2126
2155
|
...t,
|
|
2127
2156
|
itemValueResolver: e
|
|
2128
|
-
}),
|
|
2157
|
+
}), xo = (e) => ({
|
|
2129
2158
|
label: t,
|
|
2130
2159
|
gridCell: {
|
|
2131
2160
|
editorValue: n,
|
|
@@ -2137,7 +2166,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
2137
2166
|
stopEditingAndMove: l
|
|
2138
2167
|
}
|
|
2139
2168
|
}) => r ? /* @__PURE__ */ s(
|
|
2140
|
-
|
|
2169
|
+
Be,
|
|
2141
2170
|
{
|
|
2142
2171
|
onValueChange: o,
|
|
2143
2172
|
value: n,
|
|
@@ -2147,7 +2176,7 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
2147
2176
|
selectAllOnMount: !i,
|
|
2148
2177
|
onMove: l
|
|
2149
2178
|
}
|
|
2150
|
-
) : /* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(
|
|
2179
|
+
) : /* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(ee, { color: "var(--swui-primary-action-color)", size: e, children: t }) }), Zs = (e, t, n) => ({
|
|
2151
2180
|
label: r,
|
|
2152
2181
|
item: o,
|
|
2153
2182
|
gridCell: {
|
|
@@ -2155,26 +2184,26 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
2155
2184
|
isEditing: i,
|
|
2156
2185
|
setEditorValue: c,
|
|
2157
2186
|
stopEditingAndRevert: l,
|
|
2158
|
-
lastKeyEvent:
|
|
2187
|
+
lastKeyEvent: u,
|
|
2159
2188
|
stopEditing: d,
|
|
2160
|
-
stopEditingAndMove:
|
|
2189
|
+
stopEditingAndMove: h
|
|
2161
2190
|
},
|
|
2162
2191
|
isEditable: f
|
|
2163
2192
|
}) => {
|
|
2164
2193
|
const p = typeof e == "function" ? e(o) : e, g = t ? t(o) : void 0, m = n ? n(o) : void 0;
|
|
2165
2194
|
return f && i ? /* @__PURE__ */ s(
|
|
2166
|
-
|
|
2195
|
+
Be,
|
|
2167
2196
|
{
|
|
2168
2197
|
onValueChange: c,
|
|
2169
2198
|
value: a,
|
|
2170
2199
|
onDone: d,
|
|
2171
2200
|
onEsc: l,
|
|
2172
2201
|
autoFocus: !0,
|
|
2173
|
-
selectAllOnMount: !
|
|
2174
|
-
onMove:
|
|
2202
|
+
selectAllOnMount: !u,
|
|
2203
|
+
onMove: h
|
|
2175
2204
|
}
|
|
2176
2205
|
) : /* @__PURE__ */ s(G, { row: !0, alignItems: "center", children: /* @__PURE__ */ s(
|
|
2177
|
-
|
|
2206
|
+
In,
|
|
2178
2207
|
{
|
|
2179
2208
|
value: r,
|
|
2180
2209
|
modifiedField: m,
|
|
@@ -2183,38 +2212,38 @@ import './index.css';const xt = R.createContext({}), Ys = ({
|
|
|
2183
2212
|
warningOnEmpty: p
|
|
2184
2213
|
}
|
|
2185
2214
|
) });
|
|
2186
|
-
}, Kt = 6048e5,
|
|
2187
|
-
function
|
|
2188
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" &&
|
|
2215
|
+
}, Kt = 6048e5, ko = 864e5, at = Symbol.for("constructDateFrom");
|
|
2216
|
+
function X(e, t) {
|
|
2217
|
+
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);
|
|
2189
2218
|
}
|
|
2190
|
-
function
|
|
2191
|
-
return
|
|
2219
|
+
function Y(e, t) {
|
|
2220
|
+
return X(t || e, e);
|
|
2192
2221
|
}
|
|
2193
2222
|
function D(e, t, n) {
|
|
2194
|
-
const r =
|
|
2195
|
-
return isNaN(t) ?
|
|
2223
|
+
const r = Y(e, n?.in);
|
|
2224
|
+
return isNaN(t) ? X(e, NaN) : (t && r.setDate(r.getDate() + t), r);
|
|
2196
2225
|
}
|
|
2197
|
-
let
|
|
2198
|
-
function
|
|
2199
|
-
return
|
|
2226
|
+
let So = {};
|
|
2227
|
+
function De() {
|
|
2228
|
+
return So;
|
|
2200
2229
|
}
|
|
2201
|
-
function
|
|
2202
|
-
const n =
|
|
2230
|
+
function ye(e, t) {
|
|
2231
|
+
const n = De(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = Y(e, t?.in), a = o.getDay(), i = (a < r ? 7 : 0) + a - r;
|
|
2203
2232
|
return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
|
|
2204
2233
|
}
|
|
2205
|
-
function
|
|
2206
|
-
return
|
|
2234
|
+
function Pe(e, t) {
|
|
2235
|
+
return ye(e, { ...t, weekStartsOn: 1 });
|
|
2207
2236
|
}
|
|
2208
2237
|
function $t(e, t) {
|
|
2209
|
-
const n =
|
|
2238
|
+
const n = Y(e, t?.in), r = n.getFullYear(), o = X(n, 0);
|
|
2210
2239
|
o.setFullYear(r + 1, 0, 4), o.setHours(0, 0, 0, 0);
|
|
2211
|
-
const a =
|
|
2240
|
+
const a = Pe(o), i = X(n, 0);
|
|
2212
2241
|
i.setFullYear(r, 0, 4), i.setHours(0, 0, 0, 0);
|
|
2213
|
-
const c =
|
|
2242
|
+
const c = Pe(i);
|
|
2214
2243
|
return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= c.getTime() ? r : r - 1;
|
|
2215
2244
|
}
|
|
2216
|
-
function
|
|
2217
|
-
const t =
|
|
2245
|
+
function it(e) {
|
|
2246
|
+
const t = Y(e), n = new Date(
|
|
2218
2247
|
Date.UTC(
|
|
2219
2248
|
t.getFullYear(),
|
|
2220
2249
|
t.getMonth(),
|
|
@@ -2227,40 +2256,40 @@ function ct(e) {
|
|
|
2227
2256
|
);
|
|
2228
2257
|
return n.setUTCFullYear(t.getFullYear()), +e - +n;
|
|
2229
2258
|
}
|
|
2230
|
-
function
|
|
2231
|
-
const n =
|
|
2259
|
+
function Po(e, ...t) {
|
|
2260
|
+
const n = X.bind(
|
|
2232
2261
|
null,
|
|
2233
2262
|
t.find((r) => typeof r == "object")
|
|
2234
2263
|
);
|
|
2235
2264
|
return t.map(n);
|
|
2236
2265
|
}
|
|
2237
|
-
function
|
|
2238
|
-
const n =
|
|
2266
|
+
function ct(e, t) {
|
|
2267
|
+
const n = Y(e, t?.in);
|
|
2239
2268
|
return n.setHours(0, 0, 0, 0), n;
|
|
2240
2269
|
}
|
|
2241
|
-
function
|
|
2242
|
-
const [r, o] =
|
|
2270
|
+
function Oo(e, t, n) {
|
|
2271
|
+
const [r, o] = Po(
|
|
2243
2272
|
n?.in,
|
|
2244
2273
|
e,
|
|
2245
2274
|
t
|
|
2246
|
-
), a =
|
|
2247
|
-
return Math.round((c - l) /
|
|
2275
|
+
), a = ct(r), i = ct(o), c = +a - it(a), l = +i - it(i);
|
|
2276
|
+
return Math.round((c - l) / ko);
|
|
2248
2277
|
}
|
|
2249
|
-
function
|
|
2250
|
-
const n = $t(e, t), r =
|
|
2251
|
-
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0),
|
|
2278
|
+
function Io(e, t) {
|
|
2279
|
+
const n = $t(e, t), r = X(e, 0);
|
|
2280
|
+
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), Pe(r);
|
|
2252
2281
|
}
|
|
2253
|
-
function
|
|
2282
|
+
function To(e) {
|
|
2254
2283
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
2255
2284
|
}
|
|
2256
|
-
function
|
|
2257
|
-
return !(!
|
|
2285
|
+
function Do(e) {
|
|
2286
|
+
return !(!To(e) && typeof e != "number" || isNaN(+Y(e)));
|
|
2258
2287
|
}
|
|
2259
|
-
function
|
|
2260
|
-
const n =
|
|
2288
|
+
function Eo(e, t) {
|
|
2289
|
+
const n = Y(e, t?.in);
|
|
2261
2290
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
2262
2291
|
}
|
|
2263
|
-
const
|
|
2292
|
+
const Ro = {
|
|
2264
2293
|
lessThanXSeconds: {
|
|
2265
2294
|
one: "less than a second",
|
|
2266
2295
|
other: "less than {{count}} seconds"
|
|
@@ -2322,54 +2351,54 @@ const Io = {
|
|
|
2322
2351
|
one: "almost 1 year",
|
|
2323
2352
|
other: "almost {{count}} years"
|
|
2324
2353
|
}
|
|
2325
|
-
},
|
|
2354
|
+
}, Mo = (e, t, n) => {
|
|
2326
2355
|
let r;
|
|
2327
|
-
const o =
|
|
2356
|
+
const o = Ro[e];
|
|
2328
2357
|
return typeof o == "string" ? r = o : t === 1 ? r = o.one : r = o.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
2329
2358
|
};
|
|
2330
|
-
function
|
|
2359
|
+
function Ge(e) {
|
|
2331
2360
|
return (t = {}) => {
|
|
2332
2361
|
const n = t.width ? String(t.width) : e.defaultWidth;
|
|
2333
2362
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
2334
2363
|
};
|
|
2335
2364
|
}
|
|
2336
|
-
const
|
|
2365
|
+
const Go = {
|
|
2337
2366
|
full: "EEEE, MMMM do, y",
|
|
2338
2367
|
long: "MMMM do, y",
|
|
2339
2368
|
medium: "MMM d, y",
|
|
2340
2369
|
short: "MM/dd/yyyy"
|
|
2341
|
-
},
|
|
2370
|
+
}, Wo = {
|
|
2342
2371
|
full: "h:mm:ss a zzzz",
|
|
2343
2372
|
long: "h:mm:ss a z",
|
|
2344
2373
|
medium: "h:mm:ss a",
|
|
2345
2374
|
short: "h:mm a"
|
|
2346
|
-
},
|
|
2375
|
+
}, Fo = {
|
|
2347
2376
|
full: "{{date}} 'at' {{time}}",
|
|
2348
2377
|
long: "{{date}} 'at' {{time}}",
|
|
2349
2378
|
medium: "{{date}}, {{time}}",
|
|
2350
2379
|
short: "{{date}}, {{time}}"
|
|
2351
|
-
},
|
|
2352
|
-
date:
|
|
2353
|
-
formats:
|
|
2380
|
+
}, Bo = {
|
|
2381
|
+
date: Ge({
|
|
2382
|
+
formats: Go,
|
|
2354
2383
|
defaultWidth: "full"
|
|
2355
2384
|
}),
|
|
2356
|
-
time:
|
|
2357
|
-
formats:
|
|
2385
|
+
time: Ge({
|
|
2386
|
+
formats: Wo,
|
|
2358
2387
|
defaultWidth: "full"
|
|
2359
2388
|
}),
|
|
2360
|
-
dateTime:
|
|
2361
|
-
formats:
|
|
2389
|
+
dateTime: Ge({
|
|
2390
|
+
formats: Fo,
|
|
2362
2391
|
defaultWidth: "full"
|
|
2363
2392
|
})
|
|
2364
|
-
},
|
|
2393
|
+
}, Lo = {
|
|
2365
2394
|
lastWeek: "'last' eeee 'at' p",
|
|
2366
2395
|
yesterday: "'yesterday at' p",
|
|
2367
2396
|
today: "'today at' p",
|
|
2368
2397
|
tomorrow: "'tomorrow at' p",
|
|
2369
2398
|
nextWeek: "eeee 'at' p",
|
|
2370
2399
|
other: "P"
|
|
2371
|
-
},
|
|
2372
|
-
function
|
|
2400
|
+
}, Ao = (e, t, n, r) => Lo[e];
|
|
2401
|
+
function pe(e) {
|
|
2373
2402
|
return (t, n) => {
|
|
2374
2403
|
const r = n?.context ? String(n.context) : "standalone";
|
|
2375
2404
|
let o;
|
|
@@ -2384,15 +2413,15 @@ function fe(e) {
|
|
|
2384
2413
|
return o[a];
|
|
2385
2414
|
};
|
|
2386
2415
|
}
|
|
2387
|
-
const
|
|
2416
|
+
const Ho = {
|
|
2388
2417
|
narrow: ["B", "A"],
|
|
2389
2418
|
abbreviated: ["BC", "AD"],
|
|
2390
2419
|
wide: ["Before Christ", "Anno Domini"]
|
|
2391
|
-
},
|
|
2420
|
+
}, No = {
|
|
2392
2421
|
narrow: ["1", "2", "3", "4"],
|
|
2393
2422
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
2394
2423
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
2395
|
-
},
|
|
2424
|
+
}, Yo = {
|
|
2396
2425
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
2397
2426
|
abbreviated: [
|
|
2398
2427
|
"Jan",
|
|
@@ -2422,7 +2451,7 @@ const Fo = {
|
|
|
2422
2451
|
"November",
|
|
2423
2452
|
"December"
|
|
2424
2453
|
]
|
|
2425
|
-
},
|
|
2454
|
+
}, zo = {
|
|
2426
2455
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
2427
2456
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
2428
2457
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -2435,7 +2464,7 @@ const Fo = {
|
|
|
2435
2464
|
"Friday",
|
|
2436
2465
|
"Saturday"
|
|
2437
2466
|
]
|
|
2438
|
-
},
|
|
2467
|
+
}, qo = {
|
|
2439
2468
|
narrow: {
|
|
2440
2469
|
am: "a",
|
|
2441
2470
|
pm: "p",
|
|
@@ -2466,7 +2495,7 @@ const Fo = {
|
|
|
2466
2495
|
evening: "evening",
|
|
2467
2496
|
night: "night"
|
|
2468
2497
|
}
|
|
2469
|
-
},
|
|
2498
|
+
}, _o = {
|
|
2470
2499
|
narrow: {
|
|
2471
2500
|
am: "a",
|
|
2472
2501
|
pm: "p",
|
|
@@ -2497,7 +2526,7 @@ const Fo = {
|
|
|
2497
2526
|
evening: "in the evening",
|
|
2498
2527
|
night: "at night"
|
|
2499
2528
|
}
|
|
2500
|
-
},
|
|
2529
|
+
}, jo = (e, t) => {
|
|
2501
2530
|
const n = Number(e), r = n % 100;
|
|
2502
2531
|
if (r > 20 || r < 10)
|
|
2503
2532
|
switch (r % 10) {
|
|
@@ -2509,61 +2538,61 @@ const Fo = {
|
|
|
2509
2538
|
return n + "rd";
|
|
2510
2539
|
}
|
|
2511
2540
|
return n + "th";
|
|
2512
|
-
},
|
|
2513
|
-
ordinalNumber:
|
|
2514
|
-
era:
|
|
2515
|
-
values:
|
|
2541
|
+
}, Vo = {
|
|
2542
|
+
ordinalNumber: jo,
|
|
2543
|
+
era: pe({
|
|
2544
|
+
values: Ho,
|
|
2516
2545
|
defaultWidth: "wide"
|
|
2517
2546
|
}),
|
|
2518
|
-
quarter:
|
|
2519
|
-
values:
|
|
2547
|
+
quarter: pe({
|
|
2548
|
+
values: No,
|
|
2520
2549
|
defaultWidth: "wide",
|
|
2521
2550
|
argumentCallback: (e) => e - 1
|
|
2522
2551
|
}),
|
|
2523
|
-
month:
|
|
2524
|
-
values:
|
|
2552
|
+
month: pe({
|
|
2553
|
+
values: Yo,
|
|
2525
2554
|
defaultWidth: "wide"
|
|
2526
2555
|
}),
|
|
2527
|
-
day:
|
|
2528
|
-
values:
|
|
2556
|
+
day: pe({
|
|
2557
|
+
values: zo,
|
|
2529
2558
|
defaultWidth: "wide"
|
|
2530
2559
|
}),
|
|
2531
|
-
dayPeriod:
|
|
2532
|
-
values:
|
|
2560
|
+
dayPeriod: pe({
|
|
2561
|
+
values: qo,
|
|
2533
2562
|
defaultWidth: "wide",
|
|
2534
|
-
formattingValues:
|
|
2563
|
+
formattingValues: _o,
|
|
2535
2564
|
defaultFormattingWidth: "wide"
|
|
2536
2565
|
})
|
|
2537
2566
|
};
|
|
2538
|
-
function
|
|
2567
|
+
function ge(e) {
|
|
2539
2568
|
return (t, n = {}) => {
|
|
2540
2569
|
const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(o);
|
|
2541
2570
|
if (!a)
|
|
2542
2571
|
return null;
|
|
2543
|
-
const i = a[0], c = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], l = Array.isArray(c) ?
|
|
2572
|
+
const i = a[0], c = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], l = Array.isArray(c) ? $o(c, (h) => h.test(i)) : (
|
|
2544
2573
|
// [TODO] -- I challenge you to fix the type
|
|
2545
|
-
|
|
2574
|
+
Ko(c, (h) => h.test(i))
|
|
2546
2575
|
);
|
|
2547
|
-
let
|
|
2548
|
-
|
|
2576
|
+
let u;
|
|
2577
|
+
u = e.valueCallback ? e.valueCallback(l) : l, u = n.valueCallback ? (
|
|
2549
2578
|
// [TODO] -- I challenge you to fix the type
|
|
2550
|
-
n.valueCallback(
|
|
2551
|
-
) :
|
|
2579
|
+
n.valueCallback(u)
|
|
2580
|
+
) : u;
|
|
2552
2581
|
const d = t.slice(i.length);
|
|
2553
|
-
return { value:
|
|
2582
|
+
return { value: u, rest: d };
|
|
2554
2583
|
};
|
|
2555
2584
|
}
|
|
2556
|
-
function
|
|
2585
|
+
function Ko(e, t) {
|
|
2557
2586
|
for (const n in e)
|
|
2558
2587
|
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
2559
2588
|
return n;
|
|
2560
2589
|
}
|
|
2561
|
-
function
|
|
2590
|
+
function $o(e, t) {
|
|
2562
2591
|
for (let n = 0; n < e.length; n++)
|
|
2563
2592
|
if (t(e[n]))
|
|
2564
2593
|
return n;
|
|
2565
2594
|
}
|
|
2566
|
-
function
|
|
2595
|
+
function Qo(e) {
|
|
2567
2596
|
return (t, n = {}) => {
|
|
2568
2597
|
const r = t.match(e.matchPattern);
|
|
2569
2598
|
if (!r) return null;
|
|
@@ -2575,23 +2604,23 @@ function jo(e) {
|
|
|
2575
2604
|
return { value: i, rest: c };
|
|
2576
2605
|
};
|
|
2577
2606
|
}
|
|
2578
|
-
const
|
|
2607
|
+
const Xo = /^(\d+)(th|st|nd|rd)?/i, Uo = /\d+/i, Jo = {
|
|
2579
2608
|
narrow: /^(b|a)/i,
|
|
2580
2609
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
2581
2610
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
2582
|
-
},
|
|
2611
|
+
}, Zo = {
|
|
2583
2612
|
any: [/^b/i, /^(a|c)/i]
|
|
2584
|
-
},
|
|
2613
|
+
}, es = {
|
|
2585
2614
|
narrow: /^[1234]/i,
|
|
2586
2615
|
abbreviated: /^q[1234]/i,
|
|
2587
2616
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
2588
|
-
},
|
|
2617
|
+
}, ts = {
|
|
2589
2618
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
2590
|
-
},
|
|
2619
|
+
}, ns = {
|
|
2591
2620
|
narrow: /^[jfmasond]/i,
|
|
2592
2621
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
2593
2622
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
2594
|
-
},
|
|
2623
|
+
}, rs = {
|
|
2595
2624
|
narrow: [
|
|
2596
2625
|
/^j/i,
|
|
2597
2626
|
/^f/i,
|
|
@@ -2620,18 +2649,18 @@ const Vo = /^(\d+)(th|st|nd|rd)?/i, Ko = /\d+/i, $o = {
|
|
|
2620
2649
|
/^n/i,
|
|
2621
2650
|
/^d/i
|
|
2622
2651
|
]
|
|
2623
|
-
},
|
|
2652
|
+
}, os = {
|
|
2624
2653
|
narrow: /^[smtwf]/i,
|
|
2625
2654
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
2626
2655
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
2627
2656
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
2628
|
-
},
|
|
2657
|
+
}, ss = {
|
|
2629
2658
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
2630
2659
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
2631
|
-
},
|
|
2660
|
+
}, as = {
|
|
2632
2661
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
2633
2662
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
2634
|
-
},
|
|
2663
|
+
}, is = {
|
|
2635
2664
|
any: {
|
|
2636
2665
|
am: /^a/i,
|
|
2637
2666
|
pm: /^p/i,
|
|
@@ -2642,97 +2671,97 @@ const Vo = /^(\d+)(th|st|nd|rd)?/i, Ko = /\d+/i, $o = {
|
|
|
2642
2671
|
evening: /evening/i,
|
|
2643
2672
|
night: /night/i
|
|
2644
2673
|
}
|
|
2645
|
-
},
|
|
2646
|
-
ordinalNumber:
|
|
2647
|
-
matchPattern:
|
|
2648
|
-
parsePattern:
|
|
2674
|
+
}, cs = {
|
|
2675
|
+
ordinalNumber: Qo({
|
|
2676
|
+
matchPattern: Xo,
|
|
2677
|
+
parsePattern: Uo,
|
|
2649
2678
|
valueCallback: (e) => parseInt(e, 10)
|
|
2650
2679
|
}),
|
|
2651
|
-
era:
|
|
2652
|
-
matchPatterns:
|
|
2680
|
+
era: ge({
|
|
2681
|
+
matchPatterns: Jo,
|
|
2653
2682
|
defaultMatchWidth: "wide",
|
|
2654
|
-
parsePatterns:
|
|
2683
|
+
parsePatterns: Zo,
|
|
2655
2684
|
defaultParseWidth: "any"
|
|
2656
2685
|
}),
|
|
2657
|
-
quarter:
|
|
2658
|
-
matchPatterns:
|
|
2686
|
+
quarter: ge({
|
|
2687
|
+
matchPatterns: es,
|
|
2659
2688
|
defaultMatchWidth: "wide",
|
|
2660
|
-
parsePatterns:
|
|
2689
|
+
parsePatterns: ts,
|
|
2661
2690
|
defaultParseWidth: "any",
|
|
2662
2691
|
valueCallback: (e) => e + 1
|
|
2663
2692
|
}),
|
|
2664
|
-
month:
|
|
2665
|
-
matchPatterns:
|
|
2693
|
+
month: ge({
|
|
2694
|
+
matchPatterns: ns,
|
|
2666
2695
|
defaultMatchWidth: "wide",
|
|
2667
|
-
parsePatterns:
|
|
2696
|
+
parsePatterns: rs,
|
|
2668
2697
|
defaultParseWidth: "any"
|
|
2669
2698
|
}),
|
|
2670
|
-
day:
|
|
2671
|
-
matchPatterns:
|
|
2699
|
+
day: ge({
|
|
2700
|
+
matchPatterns: os,
|
|
2672
2701
|
defaultMatchWidth: "wide",
|
|
2673
|
-
parsePatterns:
|
|
2702
|
+
parsePatterns: ss,
|
|
2674
2703
|
defaultParseWidth: "any"
|
|
2675
2704
|
}),
|
|
2676
|
-
dayPeriod:
|
|
2677
|
-
matchPatterns:
|
|
2705
|
+
dayPeriod: ge({
|
|
2706
|
+
matchPatterns: as,
|
|
2678
2707
|
defaultMatchWidth: "any",
|
|
2679
|
-
parsePatterns:
|
|
2708
|
+
parsePatterns: is,
|
|
2680
2709
|
defaultParseWidth: "any"
|
|
2681
2710
|
})
|
|
2682
|
-
},
|
|
2711
|
+
}, ls = {
|
|
2683
2712
|
code: "en-US",
|
|
2684
|
-
formatDistance:
|
|
2685
|
-
formatLong:
|
|
2686
|
-
formatRelative:
|
|
2687
|
-
localize:
|
|
2688
|
-
match:
|
|
2713
|
+
formatDistance: Mo,
|
|
2714
|
+
formatLong: Bo,
|
|
2715
|
+
formatRelative: Ao,
|
|
2716
|
+
localize: Vo,
|
|
2717
|
+
match: cs,
|
|
2689
2718
|
options: {
|
|
2690
2719
|
weekStartsOn: 0,
|
|
2691
2720
|
firstWeekContainsDate: 1
|
|
2692
2721
|
}
|
|
2693
2722
|
};
|
|
2694
|
-
function
|
|
2695
|
-
const n =
|
|
2696
|
-
return
|
|
2723
|
+
function ds(e, t) {
|
|
2724
|
+
const n = Y(e, t?.in);
|
|
2725
|
+
return Oo(n, Eo(n)) + 1;
|
|
2697
2726
|
}
|
|
2698
|
-
function
|
|
2699
|
-
const n =
|
|
2727
|
+
function us(e, t) {
|
|
2728
|
+
const n = Y(e, t?.in), r = +Pe(n) - +Io(n);
|
|
2700
2729
|
return Math.round(r / Kt) + 1;
|
|
2701
2730
|
}
|
|
2702
2731
|
function Qt(e, t) {
|
|
2703
|
-
const n =
|
|
2732
|
+
const n = Y(e, t?.in), r = n.getFullYear(), o = De(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, i = X(t?.in || e, 0);
|
|
2704
2733
|
i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
|
|
2705
|
-
const c =
|
|
2734
|
+
const c = ye(i, t), l = X(t?.in || e, 0);
|
|
2706
2735
|
l.setFullYear(r, 0, a), l.setHours(0, 0, 0, 0);
|
|
2707
|
-
const
|
|
2708
|
-
return +n >= +c ? r + 1 : +n >= +
|
|
2736
|
+
const u = ye(l, t);
|
|
2737
|
+
return +n >= +c ? r + 1 : +n >= +u ? r : r - 1;
|
|
2709
2738
|
}
|
|
2710
|
-
function
|
|
2711
|
-
const n =
|
|
2712
|
-
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0),
|
|
2739
|
+
function hs(e, t) {
|
|
2740
|
+
const n = De(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o = Qt(e, t), a = X(t?.in || e, 0);
|
|
2741
|
+
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), ye(a, t);
|
|
2713
2742
|
}
|
|
2714
|
-
function
|
|
2715
|
-
const n =
|
|
2743
|
+
function ms(e, t) {
|
|
2744
|
+
const n = Y(e, t?.in), r = +ye(n, t) - +hs(n, t);
|
|
2716
2745
|
return Math.round(r / Kt) + 1;
|
|
2717
2746
|
}
|
|
2718
|
-
function
|
|
2747
|
+
function x(e, t) {
|
|
2719
2748
|
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
2720
2749
|
return n + r;
|
|
2721
2750
|
}
|
|
2722
|
-
const
|
|
2751
|
+
const J = {
|
|
2723
2752
|
// Year
|
|
2724
2753
|
y(e, t) {
|
|
2725
2754
|
const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
2726
|
-
return
|
|
2755
|
+
return x(t === "yy" ? r % 100 : r, t.length);
|
|
2727
2756
|
},
|
|
2728
2757
|
// Month
|
|
2729
2758
|
M(e, t) {
|
|
2730
2759
|
const n = e.getMonth();
|
|
2731
|
-
return t === "M" ? String(n + 1) :
|
|
2760
|
+
return t === "M" ? String(n + 1) : x(n + 1, 2);
|
|
2732
2761
|
},
|
|
2733
2762
|
// Day of the month
|
|
2734
2763
|
d(e, t) {
|
|
2735
|
-
return
|
|
2764
|
+
return x(e.getDate(), t.length);
|
|
2736
2765
|
},
|
|
2737
2766
|
// AM or PM
|
|
2738
2767
|
a(e, t) {
|
|
@@ -2752,26 +2781,26 @@ const Q = {
|
|
|
2752
2781
|
},
|
|
2753
2782
|
// Hour [1-12]
|
|
2754
2783
|
h(e, t) {
|
|
2755
|
-
return
|
|
2784
|
+
return x(e.getHours() % 12 || 12, t.length);
|
|
2756
2785
|
},
|
|
2757
2786
|
// Hour [0-23]
|
|
2758
2787
|
H(e, t) {
|
|
2759
|
-
return
|
|
2788
|
+
return x(e.getHours(), t.length);
|
|
2760
2789
|
},
|
|
2761
2790
|
// Minute
|
|
2762
2791
|
m(e, t) {
|
|
2763
|
-
return
|
|
2792
|
+
return x(e.getMinutes(), t.length);
|
|
2764
2793
|
},
|
|
2765
2794
|
// Second
|
|
2766
2795
|
s(e, t) {
|
|
2767
|
-
return
|
|
2796
|
+
return x(e.getSeconds(), t.length);
|
|
2768
2797
|
},
|
|
2769
2798
|
// Fraction of second
|
|
2770
2799
|
S(e, t) {
|
|
2771
2800
|
const n = t.length, r = e.getMilliseconds(), o = Math.trunc(
|
|
2772
2801
|
r * Math.pow(10, n - 3)
|
|
2773
2802
|
);
|
|
2774
|
-
return
|
|
2803
|
+
return x(o, t.length);
|
|
2775
2804
|
}
|
|
2776
2805
|
}, de = {
|
|
2777
2806
|
midnight: "midnight",
|
|
@@ -2780,7 +2809,7 @@ const Q = {
|
|
|
2780
2809
|
afternoon: "afternoon",
|
|
2781
2810
|
evening: "evening",
|
|
2782
2811
|
night: "night"
|
|
2783
|
-
},
|
|
2812
|
+
}, lt = {
|
|
2784
2813
|
// Era
|
|
2785
2814
|
G: function(e, t, n) {
|
|
2786
2815
|
const r = e.getFullYear() > 0 ? 1 : 0;
|
|
@@ -2805,21 +2834,21 @@ const Q = {
|
|
|
2805
2834
|
const r = e.getFullYear(), o = r > 0 ? r : 1 - r;
|
|
2806
2835
|
return n.ordinalNumber(o, { unit: "year" });
|
|
2807
2836
|
}
|
|
2808
|
-
return
|
|
2837
|
+
return J.y(e, t);
|
|
2809
2838
|
},
|
|
2810
2839
|
// Local week-numbering year
|
|
2811
2840
|
Y: function(e, t, n, r) {
|
|
2812
2841
|
const o = Qt(e, r), a = o > 0 ? o : 1 - o;
|
|
2813
2842
|
if (t === "YY") {
|
|
2814
2843
|
const i = a % 100;
|
|
2815
|
-
return
|
|
2844
|
+
return x(i, 2);
|
|
2816
2845
|
}
|
|
2817
|
-
return t === "Yo" ? n.ordinalNumber(a, { unit: "year" }) :
|
|
2846
|
+
return t === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : x(a, t.length);
|
|
2818
2847
|
},
|
|
2819
2848
|
// ISO week-numbering year
|
|
2820
2849
|
R: function(e, t) {
|
|
2821
2850
|
const n = $t(e);
|
|
2822
|
-
return
|
|
2851
|
+
return x(n, t.length);
|
|
2823
2852
|
},
|
|
2824
2853
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
2825
2854
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -2832,7 +2861,7 @@ const Q = {
|
|
|
2832
2861
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
2833
2862
|
u: function(e, t) {
|
|
2834
2863
|
const n = e.getFullYear();
|
|
2835
|
-
return
|
|
2864
|
+
return x(n, t.length);
|
|
2836
2865
|
},
|
|
2837
2866
|
// Quarter
|
|
2838
2867
|
Q: function(e, t, n) {
|
|
@@ -2843,7 +2872,7 @@ const Q = {
|
|
|
2843
2872
|
return String(r);
|
|
2844
2873
|
// 01, 02, 03, 04
|
|
2845
2874
|
case "QQ":
|
|
2846
|
-
return
|
|
2875
|
+
return x(r, 2);
|
|
2847
2876
|
// 1st, 2nd, 3rd, 4th
|
|
2848
2877
|
case "Qo":
|
|
2849
2878
|
return n.ordinalNumber(r, { unit: "quarter" });
|
|
@@ -2877,7 +2906,7 @@ const Q = {
|
|
|
2877
2906
|
return String(r);
|
|
2878
2907
|
// 01, 02, 03, 04
|
|
2879
2908
|
case "qq":
|
|
2880
|
-
return
|
|
2909
|
+
return x(r, 2);
|
|
2881
2910
|
// 1st, 2nd, 3rd, 4th
|
|
2882
2911
|
case "qo":
|
|
2883
2912
|
return n.ordinalNumber(r, { unit: "quarter" });
|
|
@@ -2908,7 +2937,7 @@ const Q = {
|
|
|
2908
2937
|
switch (t) {
|
|
2909
2938
|
case "M":
|
|
2910
2939
|
case "MM":
|
|
2911
|
-
return
|
|
2940
|
+
return J.M(e, t);
|
|
2912
2941
|
// 1st, 2nd, ..., 12th
|
|
2913
2942
|
case "Mo":
|
|
2914
2943
|
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
@@ -2939,7 +2968,7 @@ const Q = {
|
|
|
2939
2968
|
return String(r + 1);
|
|
2940
2969
|
// 01, 02, ..., 12
|
|
2941
2970
|
case "LL":
|
|
2942
|
-
return
|
|
2971
|
+
return x(r + 1, 2);
|
|
2943
2972
|
// 1st, 2nd, ..., 12th
|
|
2944
2973
|
case "Lo":
|
|
2945
2974
|
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
@@ -2963,22 +2992,22 @@ const Q = {
|
|
|
2963
2992
|
},
|
|
2964
2993
|
// Local week of year
|
|
2965
2994
|
w: function(e, t, n, r) {
|
|
2966
|
-
const o =
|
|
2967
|
-
return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) :
|
|
2995
|
+
const o = ms(e, r);
|
|
2996
|
+
return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : x(o, t.length);
|
|
2968
2997
|
},
|
|
2969
2998
|
// ISO week of year
|
|
2970
2999
|
I: function(e, t, n) {
|
|
2971
|
-
const r =
|
|
2972
|
-
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) :
|
|
3000
|
+
const r = us(e);
|
|
3001
|
+
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : x(r, t.length);
|
|
2973
3002
|
},
|
|
2974
3003
|
// Day of the month
|
|
2975
3004
|
d: function(e, t, n) {
|
|
2976
|
-
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) :
|
|
3005
|
+
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : J.d(e, t);
|
|
2977
3006
|
},
|
|
2978
3007
|
// Day of year
|
|
2979
3008
|
D: function(e, t, n) {
|
|
2980
|
-
const r =
|
|
2981
|
-
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) :
|
|
3009
|
+
const r = ds(e);
|
|
3010
|
+
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : x(r, t.length);
|
|
2982
3011
|
},
|
|
2983
3012
|
// Day of week
|
|
2984
3013
|
E: function(e, t, n) {
|
|
@@ -3022,7 +3051,7 @@ const Q = {
|
|
|
3022
3051
|
return String(a);
|
|
3023
3052
|
// Padded numerical value
|
|
3024
3053
|
case "ee":
|
|
3025
|
-
return
|
|
3054
|
+
return x(a, 2);
|
|
3026
3055
|
// 1st, 2nd, ..., 7th
|
|
3027
3056
|
case "eo":
|
|
3028
3057
|
return n.ordinalNumber(a, { unit: "day" });
|
|
@@ -3061,7 +3090,7 @@ const Q = {
|
|
|
3061
3090
|
return String(a);
|
|
3062
3091
|
// Padded numerical value
|
|
3063
3092
|
case "cc":
|
|
3064
|
-
return
|
|
3093
|
+
return x(a, t.length);
|
|
3065
3094
|
// 1st, 2nd, ..., 7th
|
|
3066
3095
|
case "co":
|
|
3067
3096
|
return n.ordinalNumber(a, { unit: "day" });
|
|
@@ -3100,7 +3129,7 @@ const Q = {
|
|
|
3100
3129
|
return String(o);
|
|
3101
3130
|
// 02
|
|
3102
3131
|
case "ii":
|
|
3103
|
-
return
|
|
3132
|
+
return x(o, t.length);
|
|
3104
3133
|
// 2nd
|
|
3105
3134
|
case "io":
|
|
3106
3135
|
return n.ordinalNumber(o, { unit: "day" });
|
|
@@ -3219,33 +3248,33 @@ const Q = {
|
|
|
3219
3248
|
let r = e.getHours() % 12;
|
|
3220
3249
|
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
3221
3250
|
}
|
|
3222
|
-
return
|
|
3251
|
+
return J.h(e, t);
|
|
3223
3252
|
},
|
|
3224
3253
|
// Hour [0-23]
|
|
3225
3254
|
H: function(e, t, n) {
|
|
3226
|
-
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) :
|
|
3255
|
+
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : J.H(e, t);
|
|
3227
3256
|
},
|
|
3228
3257
|
// Hour [0-11]
|
|
3229
3258
|
K: function(e, t, n) {
|
|
3230
3259
|
const r = e.getHours() % 12;
|
|
3231
|
-
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) :
|
|
3260
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : x(r, t.length);
|
|
3232
3261
|
},
|
|
3233
3262
|
// Hour [1-24]
|
|
3234
3263
|
k: function(e, t, n) {
|
|
3235
3264
|
let r = e.getHours();
|
|
3236
|
-
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) :
|
|
3265
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : x(r, t.length);
|
|
3237
3266
|
},
|
|
3238
3267
|
// Minute
|
|
3239
3268
|
m: function(e, t, n) {
|
|
3240
|
-
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) :
|
|
3269
|
+
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : J.m(e, t);
|
|
3241
3270
|
},
|
|
3242
3271
|
// Second
|
|
3243
3272
|
s: function(e, t, n) {
|
|
3244
|
-
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) :
|
|
3273
|
+
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : J.s(e, t);
|
|
3245
3274
|
},
|
|
3246
3275
|
// Fraction of second
|
|
3247
3276
|
S: function(e, t) {
|
|
3248
|
-
return
|
|
3277
|
+
return J.S(e, t);
|
|
3249
3278
|
},
|
|
3250
3279
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
3251
3280
|
X: function(e, t, n) {
|
|
@@ -3255,7 +3284,7 @@ const Q = {
|
|
|
3255
3284
|
switch (t) {
|
|
3256
3285
|
// Hours and optional minutes
|
|
3257
3286
|
case "X":
|
|
3258
|
-
return
|
|
3287
|
+
return ut(r);
|
|
3259
3288
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
3260
3289
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
3261
3290
|
// so this token always has the same output as `XX`
|
|
@@ -3278,7 +3307,7 @@ const Q = {
|
|
|
3278
3307
|
switch (t) {
|
|
3279
3308
|
// Hours and optional minutes
|
|
3280
3309
|
case "x":
|
|
3281
|
-
return
|
|
3310
|
+
return ut(r);
|
|
3282
3311
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
3283
3312
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
3284
3313
|
// so this token always has the same output as `xx`
|
|
@@ -3303,7 +3332,7 @@ const Q = {
|
|
|
3303
3332
|
case "O":
|
|
3304
3333
|
case "OO":
|
|
3305
3334
|
case "OOO":
|
|
3306
|
-
return "GMT" +
|
|
3335
|
+
return "GMT" + dt(r, ":");
|
|
3307
3336
|
// Long
|
|
3308
3337
|
case "OOOO":
|
|
3309
3338
|
default:
|
|
@@ -3318,7 +3347,7 @@ const Q = {
|
|
|
3318
3347
|
case "z":
|
|
3319
3348
|
case "zz":
|
|
3320
3349
|
case "zzz":
|
|
3321
|
-
return "GMT" +
|
|
3350
|
+
return "GMT" + dt(r, ":");
|
|
3322
3351
|
// Long
|
|
3323
3352
|
case "zzzz":
|
|
3324
3353
|
default:
|
|
@@ -3328,25 +3357,25 @@ const Q = {
|
|
|
3328
3357
|
// Seconds timestamp
|
|
3329
3358
|
t: function(e, t, n) {
|
|
3330
3359
|
const r = Math.trunc(+e / 1e3);
|
|
3331
|
-
return
|
|
3360
|
+
return x(r, t.length);
|
|
3332
3361
|
},
|
|
3333
3362
|
// Milliseconds timestamp
|
|
3334
3363
|
T: function(e, t, n) {
|
|
3335
|
-
return
|
|
3364
|
+
return x(+e, t.length);
|
|
3336
3365
|
}
|
|
3337
3366
|
};
|
|
3338
|
-
function
|
|
3367
|
+
function dt(e, t = "") {
|
|
3339
3368
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60), a = r % 60;
|
|
3340
|
-
return a === 0 ? n + String(o) : n + String(o) + t +
|
|
3369
|
+
return a === 0 ? n + String(o) : n + String(o) + t + x(a, 2);
|
|
3341
3370
|
}
|
|
3342
|
-
function
|
|
3343
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") +
|
|
3371
|
+
function ut(e, t) {
|
|
3372
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + x(Math.abs(e) / 60, 2) : se(e, t);
|
|
3344
3373
|
}
|
|
3345
3374
|
function se(e, t = "") {
|
|
3346
|
-
const n = e > 0 ? "-" : "+", r = Math.abs(e), o =
|
|
3375
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = x(Math.trunc(r / 60), 2), a = x(r % 60, 2);
|
|
3347
3376
|
return n + o + t + a;
|
|
3348
3377
|
}
|
|
3349
|
-
const
|
|
3378
|
+
const ht = (e, t) => {
|
|
3350
3379
|
switch (e) {
|
|
3351
3380
|
case "P":
|
|
3352
3381
|
return t.date({ width: "short" });
|
|
@@ -3370,10 +3399,10 @@ const mt = (e, t) => {
|
|
|
3370
3399
|
default:
|
|
3371
3400
|
return t.time({ width: "full" });
|
|
3372
3401
|
}
|
|
3373
|
-
},
|
|
3402
|
+
}, fs = (e, t) => {
|
|
3374
3403
|
const n = e.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
|
|
3375
3404
|
if (!o)
|
|
3376
|
-
return
|
|
3405
|
+
return ht(e, t);
|
|
3377
3406
|
let a;
|
|
3378
3407
|
switch (r) {
|
|
3379
3408
|
case "P":
|
|
@@ -3390,70 +3419,70 @@ const mt = (e, t) => {
|
|
|
3390
3419
|
a = t.dateTime({ width: "full" });
|
|
3391
3420
|
break;
|
|
3392
3421
|
}
|
|
3393
|
-
return a.replace("{{date}}",
|
|
3394
|
-
},
|
|
3422
|
+
return a.replace("{{date}}", ht(r, t)).replace("{{time}}", Xt(o, t));
|
|
3423
|
+
}, ps = {
|
|
3395
3424
|
p: Xt,
|
|
3396
|
-
P:
|
|
3397
|
-
},
|
|
3398
|
-
function
|
|
3399
|
-
return
|
|
3425
|
+
P: fs
|
|
3426
|
+
}, gs = /^D+$/, ws = /^Y+$/, ys = ["D", "DD", "YY", "YYYY"];
|
|
3427
|
+
function bs(e) {
|
|
3428
|
+
return gs.test(e);
|
|
3400
3429
|
}
|
|
3401
|
-
function
|
|
3402
|
-
return
|
|
3430
|
+
function vs(e) {
|
|
3431
|
+
return ws.test(e);
|
|
3403
3432
|
}
|
|
3404
|
-
function
|
|
3405
|
-
const r =
|
|
3406
|
-
if (console.warn(r),
|
|
3433
|
+
function Cs(e, t, n) {
|
|
3434
|
+
const r = xs(e, t, n);
|
|
3435
|
+
if (console.warn(r), ys.includes(e)) throw new RangeError(r);
|
|
3407
3436
|
}
|
|
3408
|
-
function
|
|
3437
|
+
function xs(e, t, n) {
|
|
3409
3438
|
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
3410
3439
|
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`;
|
|
3411
3440
|
}
|
|
3412
|
-
const
|
|
3413
|
-
function
|
|
3414
|
-
const r =
|
|
3415
|
-
if (!
|
|
3441
|
+
const ks = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ss = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ps = /^'([^]*?)'?$/, Os = /''/g, Is = /[a-zA-Z]/;
|
|
3442
|
+
function Ts(e, t, n) {
|
|
3443
|
+
const r = De(), o = r.locale ?? ls, a = r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, c = Y(e, n?.in);
|
|
3444
|
+
if (!Do(c))
|
|
3416
3445
|
throw new RangeError("Invalid time value");
|
|
3417
|
-
let l = t.match(
|
|
3418
|
-
const
|
|
3419
|
-
if (
|
|
3420
|
-
const f =
|
|
3446
|
+
let l = t.match(Ss).map((d) => {
|
|
3447
|
+
const h = d[0];
|
|
3448
|
+
if (h === "p" || h === "P") {
|
|
3449
|
+
const f = ps[h];
|
|
3421
3450
|
return f(d, o.formatLong);
|
|
3422
3451
|
}
|
|
3423
3452
|
return d;
|
|
3424
|
-
}).join("").match(
|
|
3453
|
+
}).join("").match(ks).map((d) => {
|
|
3425
3454
|
if (d === "''")
|
|
3426
3455
|
return { isToken: !1, value: "'" };
|
|
3427
|
-
const
|
|
3428
|
-
if (
|
|
3429
|
-
return { isToken: !1, value:
|
|
3430
|
-
if (
|
|
3456
|
+
const h = d[0];
|
|
3457
|
+
if (h === "'")
|
|
3458
|
+
return { isToken: !1, value: Ds(d) };
|
|
3459
|
+
if (lt[h])
|
|
3431
3460
|
return { isToken: !0, value: d };
|
|
3432
|
-
if (
|
|
3461
|
+
if (h.match(Is))
|
|
3433
3462
|
throw new RangeError(
|
|
3434
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
3463
|
+
"Format string contains an unescaped latin alphabet character `" + h + "`"
|
|
3435
3464
|
);
|
|
3436
3465
|
return { isToken: !1, value: d };
|
|
3437
3466
|
});
|
|
3438
3467
|
o.localize.preprocessor && (l = o.localize.preprocessor(c, l));
|
|
3439
|
-
const
|
|
3468
|
+
const u = {
|
|
3440
3469
|
firstWeekContainsDate: a,
|
|
3441
3470
|
weekStartsOn: i,
|
|
3442
3471
|
locale: o
|
|
3443
3472
|
};
|
|
3444
3473
|
return l.map((d) => {
|
|
3445
3474
|
if (!d.isToken) return d.value;
|
|
3446
|
-
const
|
|
3447
|
-
(
|
|
3448
|
-
const f =
|
|
3449
|
-
return f(c,
|
|
3475
|
+
const h = d.value;
|
|
3476
|
+
(vs(h) || bs(h)) && Cs(h, t, String(e));
|
|
3477
|
+
const f = lt[h[0]];
|
|
3478
|
+
return f(c, h, o.localize, u);
|
|
3450
3479
|
}).join("");
|
|
3451
3480
|
}
|
|
3452
|
-
function
|
|
3453
|
-
const t = e.match(
|
|
3454
|
-
return t ? t[1].replace(
|
|
3481
|
+
function Ds(e) {
|
|
3482
|
+
const t = e.match(Ps);
|
|
3483
|
+
return t ? t[1].replace(Os, "'") : e;
|
|
3455
3484
|
}
|
|
3456
|
-
const
|
|
3485
|
+
const Es = () => [
|
|
3457
3486
|
{
|
|
3458
3487
|
id: "123",
|
|
3459
3488
|
active: !1,
|
|
@@ -3622,7 +3651,7 @@ const Os = () => [
|
|
|
3622
3651
|
numPassengers: 655,
|
|
3623
3652
|
departure: D(/* @__PURE__ */ new Date(), 5)
|
|
3624
3653
|
}
|
|
3625
|
-
],
|
|
3654
|
+
], mt = (e, t, n) => e.map((r) => r.id === t ? { ...r, ...n } : r), ea = {
|
|
3626
3655
|
keyResolver: (e) => e.id,
|
|
3627
3656
|
showHeaderCheckbox: !0,
|
|
3628
3657
|
showRowCheckbox: !0,
|
|
@@ -3631,7 +3660,7 @@ const Os = () => [
|
|
|
3631
3660
|
id: le((e) => e.id),
|
|
3632
3661
|
active: le((e) => e.active, {
|
|
3633
3662
|
disableGridCellFocus: !0,
|
|
3634
|
-
renderCell: ({ item: e, gridCell: { requiredProps: t } }) => /* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(
|
|
3663
|
+
renderCell: ({ item: e, gridCell: { requiredProps: t } }) => /* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(Le, { value: e.active, ...t }) }),
|
|
3635
3664
|
infoIconTooltipText: "Active means out on the sea."
|
|
3636
3665
|
}),
|
|
3637
3666
|
name: le((e) => e.name, {
|
|
@@ -3641,7 +3670,7 @@ const Os = () => [
|
|
|
3641
3670
|
}),
|
|
3642
3671
|
ship: le((e) => e.ship, {}),
|
|
3643
3672
|
numPassengers: le((e) => e.numPassengers, {
|
|
3644
|
-
renderCell:
|
|
3673
|
+
renderCell: xo(),
|
|
3645
3674
|
isEditable: !0,
|
|
3646
3675
|
onChange: () => {
|
|
3647
3676
|
},
|
|
@@ -3650,16 +3679,16 @@ const Os = () => [
|
|
|
3650
3679
|
width: "140px"
|
|
3651
3680
|
}),
|
|
3652
3681
|
departure: le((e) => e.departure, {
|
|
3653
|
-
itemLabelFormatter: (e) =>
|
|
3682
|
+
itemLabelFormatter: (e) => Ts(e, "yyyy-MM-dd"),
|
|
3654
3683
|
borderLeft: !0
|
|
3655
3684
|
})
|
|
3656
3685
|
},
|
|
3657
3686
|
columnOrder: ["id", "active", "name", "ship", "numPassengers", "departure"]
|
|
3658
|
-
},
|
|
3659
|
-
const [t, n] =
|
|
3687
|
+
}, ta = Es(), na = (e) => {
|
|
3688
|
+
const [t, n] = Se(e), r = P(
|
|
3660
3689
|
(a, i) => {
|
|
3661
3690
|
n(
|
|
3662
|
-
|
|
3691
|
+
mt(t, a.id, {
|
|
3663
3692
|
numPassengers: i ? parseInt(i) : void 0
|
|
3664
3693
|
})
|
|
3665
3694
|
);
|
|
@@ -3668,7 +3697,7 @@ const Os = () => [
|
|
|
3668
3697
|
), o = P(
|
|
3669
3698
|
(a, i) => {
|
|
3670
3699
|
n(
|
|
3671
|
-
|
|
3700
|
+
mt(t, a.id, {
|
|
3672
3701
|
active: i
|
|
3673
3702
|
})
|
|
3674
3703
|
);
|
|
@@ -3682,78 +3711,78 @@ const Os = () => [
|
|
|
3682
3711
|
};
|
|
3683
3712
|
};
|
|
3684
3713
|
export {
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3714
|
+
xt as CrudStatusIndicator,
|
|
3715
|
+
Us as EditableTextCellWithCrudAndModified,
|
|
3716
|
+
Ct as GridHooksContext,
|
|
3717
|
+
js as GridHooksTable,
|
|
3718
|
+
In as ModifiedField,
|
|
3719
|
+
Vs as SmallTableCell,
|
|
3720
|
+
Ks as SmallTableHead,
|
|
3721
|
+
Js as StandardTable,
|
|
3722
|
+
Rt as StandardTableActionsContext,
|
|
3723
|
+
Jr as StandardTableCell,
|
|
3724
|
+
Qr as StandardTableCellUi,
|
|
3725
|
+
Mt as StandardTableConfigContext,
|
|
3726
|
+
fo as StandardTableContent,
|
|
3727
|
+
Co as StandardTableHeadRow,
|
|
3728
|
+
eo as StandardTableRow,
|
|
3729
|
+
Hr as StandardTableRowCheckbox,
|
|
3730
|
+
mo as StandardTableRowList,
|
|
3731
|
+
Et as StandardTableStateContext,
|
|
3732
|
+
Dt as StandardTableTableIdContext,
|
|
3733
|
+
Tn as TableCell,
|
|
3734
|
+
$s as TableColumnGroupHead,
|
|
3735
|
+
ze as TableHeadItem,
|
|
3736
|
+
Qs as TableHeadRow,
|
|
3737
|
+
Xs as TableRow,
|
|
3738
|
+
Xr as TextCell,
|
|
3710
3739
|
le as createColumnConfig,
|
|
3711
|
-
|
|
3740
|
+
Zs as createEditableTextCellWithStatus,
|
|
3712
3741
|
Yt as createGroupConfigAndIdsForRows,
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3742
|
+
tr as createInternalStandardTableActions,
|
|
3743
|
+
Es as createItemsMocks,
|
|
3744
|
+
xo as createStandardEditableTextCell,
|
|
3745
|
+
Tr as createStandardTableActions,
|
|
3746
|
+
Gt as createStandardTableInitialState,
|
|
3747
|
+
nr as createStandardTableReducer,
|
|
3748
|
+
Ye as defaultTableHeadRowHeight,
|
|
3749
|
+
Ne as defaultTableRowHeight,
|
|
3750
|
+
Tt as focusOnCell,
|
|
3751
|
+
Vr as formatColumnIdToHeaderCellLabel,
|
|
3752
|
+
jr as formatValueLabel,
|
|
3753
|
+
Ae as hasIndicatorContent,
|
|
3754
|
+
ta as mockedItems,
|
|
3755
|
+
Lr as multitypeComparator,
|
|
3756
|
+
mt as setListItemFields,
|
|
3757
|
+
Pt as smallTableRowWidth,
|
|
3758
|
+
ea as standardTableConfigForStories,
|
|
3759
|
+
kt as tableBackgroundColorExpanded,
|
|
3760
|
+
Rn as tableBackgroundHoverColorExpanded,
|
|
3761
|
+
we as tableBorder,
|
|
3762
|
+
Dn as tableBorderColor,
|
|
3763
|
+
En as tableBorderColorExpanded,
|
|
3764
|
+
Mn as tableBorderHidden,
|
|
3765
|
+
He as tableBorderLeft,
|
|
3766
|
+
St as tableBorderLeftExpanded,
|
|
3767
|
+
st as useCellBackgroundByColumnConfig,
|
|
3768
|
+
_r as useCellBackgroundByColumnId,
|
|
3769
|
+
Ce as useColumnConfigById,
|
|
3770
|
+
Ar as useColumnValueResolver,
|
|
3771
|
+
An as useEditableCell,
|
|
3772
|
+
dr as useFirstColumnConfig,
|
|
3773
|
+
Ie as useGridCell,
|
|
3774
|
+
Jn as useGridNavigation,
|
|
3775
|
+
Ot as useGridNavigationOptionsFromContext,
|
|
3776
|
+
ur as useLastColumnConfig,
|
|
3777
|
+
na as useListState,
|
|
3778
|
+
Dr as useLocalStateTableContext,
|
|
3779
|
+
Fn as useRevertableValue,
|
|
3780
|
+
Yr as useRowCheckbox,
|
|
3781
|
+
ve as useStandardTableActions,
|
|
3753
3782
|
T as useStandardTableConfig,
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3783
|
+
qe as useStandardTableId,
|
|
3784
|
+
he as useStandardTableState,
|
|
3785
|
+
po as useTableHeadCheckbox,
|
|
3786
|
+
wo as useTableSortHeader
|
|
3758
3787
|
};
|
|
3759
3788
|
//# sourceMappingURL=index.es.js.map
|