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