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