@stenajs-webui/grid 17.13.0 → 17.13.3
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/CHANGELOG.md +12 -0
- package/dist/index.es.js +1850 -2352
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.es.js
CHANGED
|
@@ -1,2660 +1,2096 @@
|
|
|
1
|
-
(function(){ try
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
children,
|
|
30
|
-
numCols,
|
|
31
|
-
numRows,
|
|
32
|
-
tableId,
|
|
33
|
-
wrap
|
|
1
|
+
(function(){"use strict";try{var e=document.createElement("style");e.appendChild(document.createTextNode("._tableRow_1cphw_1:focus-within{background:var(--focus-within-background, var(--lhds-color-blue-50))}._standardTable_1iok0_1{--swui-standard-table-height: 40px;--swui-sticky-header-shadow: 2px 4px 4px 0 rgba(0, 0, 0, .05);--swui-sticky-header-shadow-and-right: var(--swui-sticky-header-shadow), var(--swui-sticky-column-shadow-right);--swui-sticky-header-shadow-and-left: var(--swui-sticky-header-shadow), var(--swui-sticky-column-shadow-left);--swui-sticky-column-shadow-right: 4px 2px 4px 0 rgba(0, 0, 0, .05);--swui-sticky-column-shadow-left: -4px 2px 4px 0 rgba(0, 0, 0, .05);--swui-sticky-header-z-index: 10;--swui-sticky-column-z-index: 20;--swui-sticky-group-group-z-index: 25;--swui-sticky-group-header-z-index: 26;--swui-sticky-header-column-group-z-index: 30;--swui-sticky-column-group-label-z-index: 40;--swui-sticky-header-in-sticky-column-z-index: 50;--swui-sticky-popover-z-index: 60;--swui-expand-cell-width: 45px;--swui-checkbox-cell-width: 45px;--swui-expand-highlight-border-width: 2px;--current-row-height: var(--swui-standard-table-height);--current-left-offset: 0px;border-spacing:0}._standardTable_1iok0_1 td{border-top:1px solid var(--lhds-color-ui-300);padding:0}._standardTable_1iok0_1 th{padding:0}._standardTable_1iok0_1._relaxed_1iok0_37{--current-row-height: 48px}._standardTable_1iok0_1._condensed_1iok0_41{--current-row-height: 32px}._standardTable_1iok0_1._compact_1iok0_45{--current-row-height: 24px}._standardTableCell_1xzcm_1{outline:none}._textCell_1yv6v_1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._summaryRow_12x8k_1 td{border-top:1px solid var(--lhds-color-ui-400)}")),document.head.appendChild(e)}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
+
import * as T from "react";
|
|
3
|
+
import { useMemo as v, useRef as te, useState as ve, useCallback as I, useEffect as je, useContext as V, createContext as $, useReducer as It, useId as Et } from "react";
|
|
4
|
+
import { jsx as r, Fragment as G, jsxs as g } from "react/jsx-runtime";
|
|
5
|
+
import { faExclamationTriangle as ue } from "@fortawesome/free-solid-svg-icons/faExclamationTriangle";
|
|
6
|
+
import { InputSpinner as ye, Icon as F, stenaArrowRight as Rt, stenaInfoCircle as Gt, FlatButton as xe, ResultListBanner as Tt, Banner as Le } from "@stenajs-webui/elements";
|
|
7
|
+
import { cssColor as _ } from "@stenajs-webui/theme";
|
|
8
|
+
import { Tooltip as re, Popover as Ot } from "@stenajs-webui/tooltip";
|
|
9
|
+
import { Text as U, Indent as N, Space as B, Row as E, Box as ne, exhaustSwitchCaseElseThrow as Pt, Heading as We, useArraySet as qe, useOnScreen as At, Spacing as we, booleanOrNumberToNumber as Lt } from "@stenajs-webui/core";
|
|
10
|
+
import { faEllipsisV as Bt } from "@fortawesome/free-solid-svg-icons/faEllipsisV";
|
|
11
|
+
import { faSortAlphaDown as Dt } from "@fortawesome/free-solid-svg-icons/faSortAlphaDown";
|
|
12
|
+
import { faSortAlphaUp as Nt } from "@fortawesome/free-solid-svg-icons/faSortAlphaUp";
|
|
13
|
+
import { faSortAmountDownAlt as zt } from "@fortawesome/free-solid-svg-icons/faSortAmountDownAlt";
|
|
14
|
+
import { faSortAmountUpAlt as Kt } from "@fortawesome/free-solid-svg-icons/faSortAmountUpAlt";
|
|
15
|
+
import { faSortNumericDown as Ht } from "@fortawesome/free-solid-svg-icons/faSortNumericDown";
|
|
16
|
+
import { faSortNumericUp as $t } from "@fortawesome/free-solid-svg-icons/faSortNumericUp";
|
|
17
|
+
import Fe from "classnames";
|
|
18
|
+
import { faArrowRight as Mt } from "@fortawesome/free-solid-svg-icons/faArrowRight";
|
|
19
|
+
import { TextInput as ge, Checkbox as Ue } from "@stenajs-webui/forms";
|
|
20
|
+
import { useDispatch as Vt, useSelector as Be } from "react-redux";
|
|
21
|
+
import { createSortOrderActions as _t, createSelectedIdsActions as De, createEntityActions as jt, createSortOrderReducerInitialState as Wt, createSelectedIdsReducerInitialState as Ne, reducerIdGate as de, createSortOrderReducer as qt, createSelectedIdsReducer as ze, createEntityReducer as Ft, reducerIdGateAction as X } from "@stenajs-webui/redux";
|
|
22
|
+
import { combineReducers as Ut } from "redux";
|
|
23
|
+
import { LoadingScreen as Zt, ErrorScreen as Jt } from "@stenajs-webui/panels";
|
|
24
|
+
import { compact as Xt, upperFirst as Yt, lowerCase as Qt } from "lodash";
|
|
25
|
+
import { faChevronDown as Ze } from "@fortawesome/free-solid-svg-icons/faChevronDown";
|
|
26
|
+
import { faChevronRight as Je } from "@fortawesome/free-solid-svg-icons/faChevronRight";
|
|
27
|
+
import en from "@emotion/styled";
|
|
28
|
+
const Xe = T.createContext({}), xr = ({
|
|
29
|
+
children: e,
|
|
30
|
+
numCols: t,
|
|
31
|
+
numRows: n,
|
|
32
|
+
tableId: o,
|
|
33
|
+
wrap: s
|
|
34
34
|
}) => {
|
|
35
|
-
const
|
|
36
|
-
numCols,
|
|
37
|
-
numRows,
|
|
38
|
-
tableId,
|
|
39
|
-
wrap
|
|
40
|
-
}), [
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
value:
|
|
43
|
-
children
|
|
35
|
+
const c = v(() => ({
|
|
36
|
+
numCols: t,
|
|
37
|
+
numRows: n,
|
|
38
|
+
tableId: o,
|
|
39
|
+
wrap: s
|
|
40
|
+
}), [t, n, o, s]);
|
|
41
|
+
return /* @__PURE__ */ r(Xe.Provider, {
|
|
42
|
+
value: c,
|
|
43
|
+
children: e
|
|
44
44
|
});
|
|
45
|
-
}
|
|
46
|
-
const hasIndicatorContent = (status) => {
|
|
45
|
+
}, be = (e) => {
|
|
47
46
|
const {
|
|
48
|
-
loading,
|
|
49
|
-
creating,
|
|
50
|
-
deleting,
|
|
51
|
-
updating,
|
|
52
|
-
hasError
|
|
53
|
-
} =
|
|
54
|
-
return Boolean(
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
crudStatus
|
|
47
|
+
loading: t,
|
|
48
|
+
creating: n,
|
|
49
|
+
deleting: o,
|
|
50
|
+
updating: s,
|
|
51
|
+
hasError: c
|
|
52
|
+
} = e;
|
|
53
|
+
return Boolean(t || n || o || s || c);
|
|
54
|
+
}, Ye = ({
|
|
55
|
+
crudStatus: e
|
|
58
56
|
}) => {
|
|
59
|
-
if (!
|
|
57
|
+
if (!e || !be(e))
|
|
60
58
|
return null;
|
|
61
|
-
}
|
|
62
59
|
const {
|
|
63
|
-
errorMessage,
|
|
64
|
-
hasError,
|
|
65
|
-
loading,
|
|
66
|
-
creating,
|
|
67
|
-
deleting,
|
|
68
|
-
updating
|
|
69
|
-
} =
|
|
70
|
-
if (
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
color:
|
|
60
|
+
errorMessage: t,
|
|
61
|
+
hasError: n,
|
|
62
|
+
loading: o,
|
|
63
|
+
creating: s,
|
|
64
|
+
deleting: c,
|
|
65
|
+
updating: l
|
|
66
|
+
} = e;
|
|
67
|
+
if (o || s || c || l)
|
|
68
|
+
return /* @__PURE__ */ r(ye, {
|
|
69
|
+
color: _("--lhds-color-ui-500")
|
|
73
70
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
color: cssColor("--lhds-color-orange-600"),
|
|
71
|
+
if (n) {
|
|
72
|
+
const i = /* @__PURE__ */ r(F, {
|
|
73
|
+
icon: ue,
|
|
74
|
+
color: _("--lhds-color-orange-600"),
|
|
79
75
|
size: 14
|
|
80
76
|
});
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
-
children:
|
|
83
|
-
label:
|
|
77
|
+
return /* @__PURE__ */ r(G, {
|
|
78
|
+
children: t ? /* @__PURE__ */ r(re, {
|
|
79
|
+
label: t,
|
|
84
80
|
zIndex: 100,
|
|
85
|
-
children:
|
|
86
|
-
}) :
|
|
81
|
+
children: i
|
|
82
|
+
}) : i
|
|
87
83
|
});
|
|
88
84
|
}
|
|
89
85
|
return null;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
crudStatus
|
|
86
|
+
}, tn = ({
|
|
87
|
+
isEditable: e,
|
|
88
|
+
warningOnEmpty: t,
|
|
89
|
+
value: n,
|
|
90
|
+
modifiedField: o,
|
|
91
|
+
crudStatus: s
|
|
97
92
|
}) => {
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
children:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
109
|
-
icon: stenaArrowRight,
|
|
93
|
+
const c = t && (o == null ? void 0 : o.modified) && (o == null ? void 0 : o.newValue) === "", l = s && be(s), i = c || l;
|
|
94
|
+
return /* @__PURE__ */ g(G, {
|
|
95
|
+
children: [/* @__PURE__ */ r(U, {
|
|
96
|
+
color: e ? "var(--swui-primary-action-color)" : void 0,
|
|
97
|
+
variant: o != null && o.modified ? "bold" : void 0,
|
|
98
|
+
children: n
|
|
99
|
+
}), (o == null ? void 0 : o.newValue) !== void 0 && /* @__PURE__ */ g(G, {
|
|
100
|
+
children: [/* @__PURE__ */ r(N, {
|
|
101
|
+
children: /* @__PURE__ */ r(F, {
|
|
102
|
+
icon: Rt,
|
|
110
103
|
size: 12
|
|
111
104
|
})
|
|
112
|
-
}), /* @__PURE__ */
|
|
105
|
+
}), /* @__PURE__ */ r(U, {
|
|
113
106
|
color: "var(--swui-primary-action-color)",
|
|
114
107
|
variant: "bold",
|
|
115
|
-
children:
|
|
108
|
+
children: o.newValue
|
|
116
109
|
})]
|
|
117
|
-
}),
|
|
118
|
-
label:
|
|
110
|
+
}), i && /* @__PURE__ */ r(B, {}), c ? /* @__PURE__ */ r(re, {
|
|
111
|
+
label: t,
|
|
119
112
|
zIndex: 100,
|
|
120
|
-
children: /* @__PURE__ */
|
|
121
|
-
icon:
|
|
122
|
-
color:
|
|
113
|
+
children: /* @__PURE__ */ r(F, {
|
|
114
|
+
icon: ue,
|
|
115
|
+
color: _("--lhds-color-orange-600"),
|
|
123
116
|
size: 14
|
|
124
117
|
})
|
|
125
|
-
}) : /* @__PURE__ */
|
|
126
|
-
crudStatus
|
|
118
|
+
}) : /* @__PURE__ */ r(Ye, {
|
|
119
|
+
crudStatus: s
|
|
127
120
|
})]
|
|
128
121
|
});
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
return /* @__PURE__ */ jsx(TableCell, {
|
|
159
|
-
width: smallTableRowWidth,
|
|
160
|
-
justifyContent: "center",
|
|
161
|
-
...props
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
const SortOrderIcon = ({
|
|
165
|
-
iconVariant = "amount",
|
|
166
|
-
direction
|
|
167
|
-
}) => {
|
|
168
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
169
|
-
width: "14px",
|
|
170
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
171
|
-
size: 14,
|
|
172
|
-
color: cssColor("--lhds-color-ui-500"),
|
|
173
|
-
icon: getIcon(direction, iconVariant)
|
|
174
|
-
})
|
|
175
|
-
});
|
|
176
|
-
};
|
|
177
|
-
const getIcon = (arrow, iconType) => {
|
|
178
|
-
switch (iconType) {
|
|
122
|
+
}, nn = ({
|
|
123
|
+
alignItems: e = "center",
|
|
124
|
+
justifyContent: t = "flex-start",
|
|
125
|
+
overflow: n = "hidden",
|
|
126
|
+
indent: o = 1,
|
|
127
|
+
...s
|
|
128
|
+
}) => /* @__PURE__ */ r(E, {
|
|
129
|
+
height: "100%",
|
|
130
|
+
alignItems: e,
|
|
131
|
+
justifyContent: t,
|
|
132
|
+
overflow: n,
|
|
133
|
+
indent: o,
|
|
134
|
+
...s
|
|
135
|
+
}), on = "var(--lhds-color-ui-300)", rn = "var(--lhds-color-blue-500)", Qe = "var(--lhds-color-blue-50)", sn = "var(--lhds-color-blue-100)", oe = `1px solid ${on}`, cn = "1px solid transparent", ke = "var(--swui-expand-highlight-border-width) solid transparent", et = `var(--swui-expand-highlight-border-width) solid ${rn}`, Se = "40px", Ie = "40px", tt = "40px", gr = (e) => /* @__PURE__ */ r(nn, {
|
|
136
|
+
width: tt,
|
|
137
|
+
justifyContent: "center",
|
|
138
|
+
...e
|
|
139
|
+
}), Ke = ({
|
|
140
|
+
iconVariant: e = "amount",
|
|
141
|
+
direction: t
|
|
142
|
+
}) => /* @__PURE__ */ r(ne, {
|
|
143
|
+
width: "14px",
|
|
144
|
+
children: /* @__PURE__ */ r(F, {
|
|
145
|
+
size: 14,
|
|
146
|
+
color: _("--lhds-color-ui-500"),
|
|
147
|
+
icon: ln(t, e)
|
|
148
|
+
})
|
|
149
|
+
}), ln = (e, t) => {
|
|
150
|
+
switch (t) {
|
|
179
151
|
case "alpha":
|
|
180
|
-
return
|
|
152
|
+
return e === "up" ? Nt : Dt;
|
|
181
153
|
case "numeric":
|
|
182
|
-
return
|
|
154
|
+
return e === "up" ? $t : Ht;
|
|
183
155
|
case "amount":
|
|
184
|
-
return
|
|
156
|
+
return e === "up" ? Kt : zt;
|
|
185
157
|
default:
|
|
186
|
-
return
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
...boxProps
|
|
158
|
+
return Pt(t);
|
|
159
|
+
}
|
|
160
|
+
}, Ee = T.memo(({
|
|
161
|
+
label: e,
|
|
162
|
+
arrow: t,
|
|
163
|
+
onClick: n,
|
|
164
|
+
children: o,
|
|
165
|
+
selected: s,
|
|
166
|
+
popoverContent: c,
|
|
167
|
+
loading: l,
|
|
168
|
+
infoIconTooltipText: i,
|
|
169
|
+
overflow: d = "hidden",
|
|
170
|
+
alignRight: u,
|
|
171
|
+
sortOrderIconVariant: a,
|
|
172
|
+
...h
|
|
202
173
|
}) => {
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
cursor: "pointer",
|
|
206
|
-
userSelect: "none"
|
|
207
|
-
} : void 0;
|
|
208
|
-
const hasOnlyChildren = !label && !arrow && !infoIconTooltipText;
|
|
209
|
-
return /* @__PURE__ */ jsxs(Row, {
|
|
174
|
+
const m = te(null);
|
|
175
|
+
return /* @__PURE__ */ g(E, {
|
|
210
176
|
height: "100%",
|
|
211
177
|
alignItems: "center",
|
|
212
|
-
ref:
|
|
213
|
-
overflow,
|
|
214
|
-
justifyContent:
|
|
215
|
-
...
|
|
216
|
-
children: [/* @__PURE__ */
|
|
178
|
+
ref: m,
|
|
179
|
+
overflow: d,
|
|
180
|
+
justifyContent: u ? "flex-end" : "flex-start",
|
|
181
|
+
...h,
|
|
182
|
+
children: [/* @__PURE__ */ g(E, {
|
|
217
183
|
alignItems: "center",
|
|
218
|
-
indent:
|
|
219
|
-
children: [!
|
|
220
|
-
children: [/* @__PURE__ */
|
|
184
|
+
indent: !0,
|
|
185
|
+
children: [!t && u && /* @__PURE__ */ g(G, {
|
|
186
|
+
children: [/* @__PURE__ */ r(B, {}), /* @__PURE__ */ r(ne, {
|
|
221
187
|
width: "14px"
|
|
222
|
-
}), /* @__PURE__ */
|
|
188
|
+
}), /* @__PURE__ */ r(B, {
|
|
223
189
|
num: 0.5
|
|
224
190
|
})]
|
|
225
|
-
}), (
|
|
226
|
-
onClick,
|
|
227
|
-
style:
|
|
191
|
+
}), (o || e) && /* @__PURE__ */ g(E, {
|
|
192
|
+
onClick: n,
|
|
193
|
+
style: n ? {
|
|
194
|
+
cursor: "pointer",
|
|
195
|
+
userSelect: "none"
|
|
196
|
+
} : void 0,
|
|
228
197
|
alignItems: "center",
|
|
229
|
-
children: [
|
|
230
|
-
children: [
|
|
198
|
+
children: [o && /* @__PURE__ */ g(G, {
|
|
199
|
+
children: [o, !(!e && !t && !i) && /* @__PURE__ */ r(B, {
|
|
231
200
|
num: 0.5
|
|
232
201
|
})]
|
|
233
|
-
}),
|
|
234
|
-
children: [/* @__PURE__ */
|
|
235
|
-
direction:
|
|
236
|
-
iconVariant:
|
|
237
|
-
}), /* @__PURE__ */
|
|
202
|
+
}), t && u && /* @__PURE__ */ g(G, {
|
|
203
|
+
children: [/* @__PURE__ */ r(B, {}), /* @__PURE__ */ r(Ke, {
|
|
204
|
+
direction: t,
|
|
205
|
+
iconVariant: a
|
|
206
|
+
}), /* @__PURE__ */ r(B, {
|
|
238
207
|
num: 0.5
|
|
239
208
|
})]
|
|
240
|
-
}),
|
|
209
|
+
}), e && /* @__PURE__ */ r(We, {
|
|
241
210
|
variant: "h6",
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
211
|
+
style: {
|
|
212
|
+
textAlign: "left"
|
|
213
|
+
},
|
|
214
|
+
children: e
|
|
215
|
+
}), t && !u && /* @__PURE__ */ g(G, {
|
|
216
|
+
children: [/* @__PURE__ */ r(B, {
|
|
245
217
|
num: 0.5
|
|
246
|
-
}), /* @__PURE__ */
|
|
247
|
-
direction:
|
|
248
|
-
iconVariant:
|
|
249
|
-
}), /* @__PURE__ */
|
|
218
|
+
}), /* @__PURE__ */ r(Ke, {
|
|
219
|
+
direction: t,
|
|
220
|
+
iconVariant: a
|
|
221
|
+
}), /* @__PURE__ */ r(B, {})]
|
|
250
222
|
})]
|
|
251
|
-
}),
|
|
252
|
-
children: [/* @__PURE__ */
|
|
253
|
-
onClick: (
|
|
254
|
-
children: [/* @__PURE__ */
|
|
255
|
-
label:
|
|
223
|
+
}), i && /* @__PURE__ */ g(G, {
|
|
224
|
+
children: [/* @__PURE__ */ r(B, {}), /* @__PURE__ */ g(E, {
|
|
225
|
+
onClick: (p) => p.stopPropagation(),
|
|
226
|
+
children: [/* @__PURE__ */ r(re, {
|
|
227
|
+
label: i,
|
|
256
228
|
zIndex: "var(--swui-sticky-popover-z-index)",
|
|
257
|
-
children: /* @__PURE__ */
|
|
258
|
-
icon:
|
|
229
|
+
children: /* @__PURE__ */ r(F, {
|
|
230
|
+
icon: Gt,
|
|
259
231
|
size: 14,
|
|
260
|
-
color:
|
|
232
|
+
color: _("--lhds-color-blue-400")
|
|
261
233
|
})
|
|
262
|
-
}), /* @__PURE__ */
|
|
234
|
+
}), /* @__PURE__ */ r(B, {})]
|
|
263
235
|
})]
|
|
264
236
|
})]
|
|
265
|
-
}), /* @__PURE__ */
|
|
266
|
-
children:
|
|
267
|
-
content:
|
|
237
|
+
}), /* @__PURE__ */ r(E, {
|
|
238
|
+
children: l ? /* @__PURE__ */ r(ye, {}) : c ? /* @__PURE__ */ r(Ot, {
|
|
239
|
+
content: c,
|
|
268
240
|
trigger: "click",
|
|
269
241
|
zIndex: 1e3,
|
|
270
|
-
disablePadding:
|
|
242
|
+
disablePadding: !0,
|
|
271
243
|
variant: "outlined",
|
|
272
|
-
arrow:
|
|
273
|
-
children: /* @__PURE__ */
|
|
274
|
-
leftIcon:
|
|
244
|
+
arrow: !1,
|
|
245
|
+
children: /* @__PURE__ */ r(xe, {
|
|
246
|
+
leftIcon: Bt,
|
|
275
247
|
size: "small"
|
|
276
248
|
})
|
|
277
249
|
}) : null
|
|
278
|
-
}), !
|
|
279
|
-
children: [/* @__PURE__ */
|
|
250
|
+
}), !t && !u && /* @__PURE__ */ g(G, {
|
|
251
|
+
children: [/* @__PURE__ */ r(B, {}), /* @__PURE__ */ r(ne, {
|
|
280
252
|
width: "14px"
|
|
281
|
-
}), /* @__PURE__ */
|
|
253
|
+
}), /* @__PURE__ */ r(B, {
|
|
282
254
|
num: 0.5
|
|
283
255
|
})]
|
|
284
256
|
})]
|
|
285
257
|
});
|
|
286
|
-
})
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
width,
|
|
298
|
-
|
|
299
|
-
height
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
indent,
|
|
307
|
-
spacing: true,
|
|
308
|
-
children: /* @__PURE__ */ jsx(Text, {
|
|
309
|
-
variant: "bold",
|
|
310
|
-
children: label
|
|
311
|
-
})
|
|
258
|
+
}), br = (e) => /* @__PURE__ */ r(Ee, {
|
|
259
|
+
width: tt,
|
|
260
|
+
justifyContent: "center",
|
|
261
|
+
...e
|
|
262
|
+
}), kr = ({
|
|
263
|
+
label: e,
|
|
264
|
+
flex: t,
|
|
265
|
+
width: n,
|
|
266
|
+
indent: o = 1,
|
|
267
|
+
height: s = Ie
|
|
268
|
+
}) => /* @__PURE__ */ r(Ee, {
|
|
269
|
+
width: n,
|
|
270
|
+
flex: t,
|
|
271
|
+
height: s,
|
|
272
|
+
children: /* @__PURE__ */ r(ne, {
|
|
273
|
+
indent: o,
|
|
274
|
+
spacing: !0,
|
|
275
|
+
children: /* @__PURE__ */ r(U, {
|
|
276
|
+
variant: "bold",
|
|
277
|
+
children: e
|
|
312
278
|
})
|
|
313
|
-
})
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
if (revertValue) {
|
|
356
|
-
setValue(revertValue.current);
|
|
357
|
-
}
|
|
358
|
-
}, [setValue, revertValue]);
|
|
359
|
-
const commit = useCallback((commitValue) => {
|
|
360
|
-
revertValue.current = value;
|
|
361
|
-
if (commitValue) {
|
|
362
|
-
setValue(commitValue);
|
|
363
|
-
}
|
|
364
|
-
}, [value, setValue]);
|
|
365
|
-
const setRevertValue = useCallback((value2) => revertValue.current = value2, [revertValue]);
|
|
366
|
-
const getValue = useCallback(() => valueRef.current, [valueRef]);
|
|
279
|
+
})
|
|
280
|
+
}), Sr = T.memo(({
|
|
281
|
+
style: e,
|
|
282
|
+
height: t = Ie,
|
|
283
|
+
...n
|
|
284
|
+
}) => /* @__PURE__ */ r(E, {
|
|
285
|
+
style: e,
|
|
286
|
+
height: t,
|
|
287
|
+
...n
|
|
288
|
+
})), an = "_tableRow_1cphw_1", dn = {
|
|
289
|
+
tableRow: an
|
|
290
|
+
}, Ir = ({
|
|
291
|
+
hideBorderTop: e,
|
|
292
|
+
height: t = Ie,
|
|
293
|
+
className: n,
|
|
294
|
+
...o
|
|
295
|
+
}) => /* @__PURE__ */ r(E, {
|
|
296
|
+
borderTop: e ? cn : oe,
|
|
297
|
+
height: t,
|
|
298
|
+
className: Fe(dn.tableRow, n),
|
|
299
|
+
...o
|
|
300
|
+
}), un = (e) => {
|
|
301
|
+
const [t, n] = ve(e), o = te(e), s = te(e), c = I(
|
|
302
|
+
(a) => {
|
|
303
|
+
n(a), s.current = a;
|
|
304
|
+
},
|
|
305
|
+
[n, s]
|
|
306
|
+
);
|
|
307
|
+
je(() => {
|
|
308
|
+
c(e);
|
|
309
|
+
}, [c, e]);
|
|
310
|
+
const l = I(() => {
|
|
311
|
+
o && c(o.current);
|
|
312
|
+
}, [c, o]), i = I(
|
|
313
|
+
(a) => {
|
|
314
|
+
o.current = t, a && c(a);
|
|
315
|
+
},
|
|
316
|
+
[t, c]
|
|
317
|
+
), d = I(
|
|
318
|
+
(a) => o.current = a,
|
|
319
|
+
[o]
|
|
320
|
+
), u = I(() => s.current, [s]);
|
|
367
321
|
return {
|
|
368
|
-
value,
|
|
369
|
-
setValue,
|
|
370
|
-
setRevertValue,
|
|
371
|
-
revert,
|
|
372
|
-
commit,
|
|
373
|
-
getValue
|
|
322
|
+
value: t,
|
|
323
|
+
setValue: c,
|
|
324
|
+
setRevertValue: d,
|
|
325
|
+
revert: l,
|
|
326
|
+
commit: i,
|
|
327
|
+
getValue: u
|
|
374
328
|
};
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
onStartEditing,
|
|
395
|
-
onStopEditing,
|
|
396
|
-
transformEnteredValue = defaultTransformEnteredValue
|
|
329
|
+
}, hn = (e) => ({
|
|
330
|
+
altKey: e.altKey,
|
|
331
|
+
charCode: e.charCode,
|
|
332
|
+
ctrlKey: e.ctrlKey,
|
|
333
|
+
key: e.key,
|
|
334
|
+
keyCode: e.keyCode,
|
|
335
|
+
locale: e.locale,
|
|
336
|
+
location: e.location,
|
|
337
|
+
metaKey: e.metaKey,
|
|
338
|
+
repeat: e.repeat,
|
|
339
|
+
shiftKey: e.shiftKey,
|
|
340
|
+
which: e.which
|
|
341
|
+
}), pn = (e) => e, mn = (e, {
|
|
342
|
+
isEditable: t = !1,
|
|
343
|
+
allowedInputType: n = "all",
|
|
344
|
+
onChange: o,
|
|
345
|
+
onStartEditing: s,
|
|
346
|
+
onStopEditing: c,
|
|
347
|
+
transformEnteredValue: l = pn
|
|
397
348
|
}) => {
|
|
398
|
-
const [
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
}
|
|
411
|
-
}, [isEditable, onStartEditing, setRevertValue, setValue, value]);
|
|
412
|
-
const stopEditing = useCallback(() => {
|
|
413
|
-
if (isEditable) {
|
|
414
|
-
setIsEditing(false);
|
|
415
|
-
if (onStopEditing) {
|
|
416
|
-
onStopEditing();
|
|
417
|
-
}
|
|
418
|
-
if (onChange) {
|
|
419
|
-
onChange(getValue());
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
}, [isEditable, onChange, onStopEditing, getValue, setIsEditing]);
|
|
423
|
-
const stopEditingAndRevert = useCallback(() => {
|
|
424
|
-
if (isEditable) {
|
|
425
|
-
setIsEditing(false);
|
|
426
|
-
if (onStopEditing) {
|
|
427
|
-
onStopEditing();
|
|
428
|
-
}
|
|
429
|
-
revert();
|
|
430
|
-
}
|
|
431
|
-
}, [isEditable, onStopEditing, revert, setIsEditing]);
|
|
432
|
-
const onKeyDown = useMemo(() => createKeyDownHandler$1(isEditing, isEditable, startEditing, setLastKeyEvent, allowedInputType, transformEnteredValue, revertableValue), [
|
|
433
|
-
isEditing,
|
|
434
|
-
isEditable,
|
|
435
|
-
startEditing,
|
|
436
|
-
setLastKeyEvent,
|
|
437
|
-
allowedInputType,
|
|
438
|
-
transformEnteredValue,
|
|
439
|
-
revertableValue
|
|
440
|
-
]);
|
|
349
|
+
const [i, d] = ve(!1), [u, a] = ve(
|
|
350
|
+
void 0
|
|
351
|
+
), h = un(e), { getValue: m, revert: f, setValue: w, setRevertValue: p } = h, C = I(
|
|
352
|
+
(y) => {
|
|
353
|
+
t && (w(e), p(e), d(!0), s && s(y));
|
|
354
|
+
},
|
|
355
|
+
[t, s, p, w, e]
|
|
356
|
+
), x = I(() => {
|
|
357
|
+
t && (d(!1), c && c(), o && o(m()));
|
|
358
|
+
}, [t, o, c, m, d]), b = I(() => {
|
|
359
|
+
t && (d(!1), c && c(), f());
|
|
360
|
+
}, [t, c, f, d]);
|
|
441
361
|
return {
|
|
442
|
-
onKeyDown
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
362
|
+
onKeyDown: v(
|
|
363
|
+
() => xn(
|
|
364
|
+
i,
|
|
365
|
+
t,
|
|
366
|
+
C,
|
|
367
|
+
a,
|
|
368
|
+
n,
|
|
369
|
+
l,
|
|
370
|
+
h
|
|
371
|
+
),
|
|
372
|
+
[
|
|
373
|
+
i,
|
|
374
|
+
t,
|
|
375
|
+
C,
|
|
376
|
+
a,
|
|
377
|
+
n,
|
|
378
|
+
l,
|
|
379
|
+
h
|
|
380
|
+
]
|
|
381
|
+
),
|
|
382
|
+
isEditing: i,
|
|
383
|
+
lastKeyEvent: u,
|
|
384
|
+
revertableValue: h,
|
|
385
|
+
startEditing: C,
|
|
386
|
+
stopEditing: x,
|
|
387
|
+
stopEditingAndRevert: b,
|
|
388
|
+
onDoubleClick: C
|
|
450
389
|
};
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
const
|
|
457
|
-
|
|
458
|
-
if (e.ctrlKey || e.metaKey || e.shiftKey) {
|
|
459
|
-
return;
|
|
460
|
-
}
|
|
461
|
-
if (e.key === "Enter" && isEditable) {
|
|
462
|
-
setLastKeyEvent(void 0);
|
|
463
|
-
startEditing();
|
|
464
|
-
revertableValue.commit();
|
|
465
|
-
e.preventDefault();
|
|
466
|
-
e.stopPropagation();
|
|
467
|
-
} else if (isEditable) {
|
|
468
|
-
const lastKeyEvent = createKeyDownEvent(e);
|
|
469
|
-
if (isNumeric(e.key) && allowsNumerics(allowedInputType) || isLetter(e.key) && allowsLetters(allowedInputType) || isCharacter(e.key)) {
|
|
470
|
-
startEditing(lastKeyEvent);
|
|
471
|
-
setLastKeyEvent(lastKeyEvent);
|
|
472
|
-
revertableValue.commit();
|
|
473
|
-
revertableValue.setValue(transformEnteredValue(lastKeyEvent.key));
|
|
474
|
-
e.preventDefault();
|
|
475
|
-
e.stopPropagation();
|
|
390
|
+
}, fn = (e) => e === "all" || e === "numeric" || e === "alphanumeric", wn = (e) => e === "all" || e === "alphanumeric" || e === "letters", Cn = (e) => !!e.match(/^[-+*<>]$/), vn = (e) => !!e.match(/^[a-zA-Z0-9]$/), yn = (e) => !isNaN(parseInt(e, 10)), xn = (e, t, n, o, s, c, l) => (i) => {
|
|
391
|
+
if (!(i.ctrlKey || i.metaKey || i.shiftKey)) {
|
|
392
|
+
if (i.key === "Enter" && t)
|
|
393
|
+
o(void 0), n(), l.commit(), i.preventDefault(), i.stopPropagation();
|
|
394
|
+
else if (t) {
|
|
395
|
+
const d = hn(i);
|
|
396
|
+
(yn(i.key) && fn(s) || vn(i.key) && wn(s) || Cn(i.key)) && (n(d), o(d), l.commit(), l.setValue(c(d.key)), i.preventDefault(), i.stopPropagation());
|
|
476
397
|
}
|
|
477
398
|
}
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
realY = 0;
|
|
484
|
-
}
|
|
485
|
-
if (y < 0) {
|
|
486
|
-
realY = maxY;
|
|
487
|
-
}
|
|
488
|
-
if (x > maxX) {
|
|
489
|
-
realX = 0;
|
|
490
|
-
}
|
|
491
|
-
if (x < 0) {
|
|
492
|
-
realX = maxX;
|
|
493
|
-
}
|
|
494
|
-
return {
|
|
495
|
-
realX,
|
|
496
|
-
realY
|
|
497
|
-
};
|
|
498
|
-
};
|
|
499
|
-
const limitRange = (val, min, max) => {
|
|
500
|
-
return Math.max(Math.min(val, max), min);
|
|
501
|
-
};
|
|
502
|
-
const clampPos = (pos, numRows, numCols) => {
|
|
503
|
-
return {
|
|
504
|
-
rowIndex: limitRange(pos.rowIndex, 0, numRows),
|
|
505
|
-
colIndex: limitRange(pos.colIndex, 0, numCols)
|
|
506
|
-
};
|
|
507
|
-
};
|
|
508
|
-
const wrapPos = (pos, numRows, numCols) => {
|
|
509
|
-
const wrapped = wrapBounds(pos.colIndex, pos.rowIndex, numCols, numRows);
|
|
510
|
-
return {
|
|
511
|
-
rowIndex: wrapped.realY,
|
|
512
|
-
colIndex: wrapped.realX
|
|
399
|
+
}, gn = (e, t, n, o) => {
|
|
400
|
+
let s = e, c = t;
|
|
401
|
+
return t > o && (c = 0), t < 0 && (c = o), e > n && (s = 0), e < 0 && (s = n), {
|
|
402
|
+
realX: s,
|
|
403
|
+
realY: c
|
|
513
404
|
};
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
}
|
|
520
|
-
if (edgeMode === "wrapped") {
|
|
521
|
-
return wrapPos(posNotWrapped, numRows - 1, numCols - 1);
|
|
522
|
-
}
|
|
523
|
-
return posNotWrapped;
|
|
524
|
-
};
|
|
525
|
-
const getNextPosition = (rowIndex, colIndex, direction) => {
|
|
526
|
-
if (direction === "up") {
|
|
527
|
-
return {
|
|
528
|
-
rowIndex: rowIndex - 1,
|
|
529
|
-
colIndex
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
if (direction === "down") {
|
|
533
|
-
return {
|
|
534
|
-
rowIndex: rowIndex + 1,
|
|
535
|
-
colIndex
|
|
536
|
-
};
|
|
537
|
-
}
|
|
538
|
-
if (direction === "left") {
|
|
539
|
-
return {
|
|
540
|
-
rowIndex,
|
|
541
|
-
colIndex: colIndex - 1
|
|
542
|
-
};
|
|
543
|
-
}
|
|
544
|
-
if (direction === "right") {
|
|
545
|
-
return {
|
|
546
|
-
rowIndex,
|
|
547
|
-
colIndex: colIndex + 1
|
|
548
|
-
};
|
|
549
|
-
}
|
|
405
|
+
}, He = (e, t, n) => Math.max(Math.min(e, n), t), bn = (e, t, n) => ({
|
|
406
|
+
rowIndex: He(e.rowIndex, 0, t),
|
|
407
|
+
colIndex: He(e.colIndex, 0, n)
|
|
408
|
+
}), kn = (e, t, n) => {
|
|
409
|
+
const o = gn(e.colIndex, e.rowIndex, n, t);
|
|
550
410
|
return {
|
|
551
|
-
rowIndex,
|
|
552
|
-
colIndex
|
|
411
|
+
rowIndex: o.realY,
|
|
412
|
+
colIndex: o.realX
|
|
553
413
|
};
|
|
554
|
-
}
|
|
555
|
-
const
|
|
556
|
-
return
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
|
|
414
|
+
}, Sn = (e, t, n, o, s, c = "clamped") => {
|
|
415
|
+
const l = In(e, t, s);
|
|
416
|
+
return c === "clamped" ? bn(l, n - 1, o - 1) : c === "wrapped" ? kn(l, n - 1, o - 1) : l;
|
|
417
|
+
}, In = (e, t, n) => n === "up" ? {
|
|
418
|
+
rowIndex: e - 1,
|
|
419
|
+
colIndex: t
|
|
420
|
+
} : n === "down" ? {
|
|
421
|
+
rowIndex: e + 1,
|
|
422
|
+
colIndex: t
|
|
423
|
+
} : n === "left" ? {
|
|
424
|
+
rowIndex: e,
|
|
425
|
+
colIndex: t - 1
|
|
426
|
+
} : n === "right" ? {
|
|
427
|
+
rowIndex: e,
|
|
428
|
+
colIndex: t + 1
|
|
429
|
+
} : {
|
|
430
|
+
rowIndex: e,
|
|
431
|
+
colIndex: t
|
|
432
|
+
}, En = (e) => e.replace(/^[^a-z]+|[^\w:.-]+/gi, ""), Rn = (e) => {
|
|
433
|
+
if (!e.tableId)
|
|
560
434
|
throw new Error("tableId is required.");
|
|
561
|
-
|
|
562
|
-
if (options.numRows == null) {
|
|
435
|
+
if (e.numRows == null)
|
|
563
436
|
throw new Error("numRows is required.");
|
|
564
|
-
|
|
565
|
-
if (options.numCols == null) {
|
|
437
|
+
if (e.numCols == null)
|
|
566
438
|
throw new Error("numCols is required.");
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
439
|
+
return e;
|
|
440
|
+
}, nt = (e) => {
|
|
441
|
+
const t = V(Xe);
|
|
442
|
+
return v(
|
|
443
|
+
() => Rn({
|
|
444
|
+
...t,
|
|
445
|
+
...e
|
|
446
|
+
}),
|
|
447
|
+
[t, e]
|
|
448
|
+
);
|
|
449
|
+
}, Gn = (e) => {
|
|
578
450
|
const {
|
|
579
|
-
rowIndex,
|
|
580
|
-
colIndex,
|
|
581
|
-
numRows,
|
|
582
|
-
numCols,
|
|
583
|
-
tableId,
|
|
584
|
-
edgeMode,
|
|
585
|
-
onCellMove,
|
|
586
|
-
onCellNavigation
|
|
587
|
-
} =
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
451
|
+
rowIndex: t,
|
|
452
|
+
colIndex: n,
|
|
453
|
+
numRows: o,
|
|
454
|
+
numCols: s,
|
|
455
|
+
tableId: c,
|
|
456
|
+
edgeMode: l,
|
|
457
|
+
onCellMove: i,
|
|
458
|
+
onCellNavigation: d
|
|
459
|
+
} = nt(e), u = v(
|
|
460
|
+
() => Tn(
|
|
461
|
+
c,
|
|
462
|
+
t,
|
|
463
|
+
n,
|
|
464
|
+
o,
|
|
465
|
+
s,
|
|
466
|
+
l,
|
|
467
|
+
i,
|
|
468
|
+
d
|
|
469
|
+
),
|
|
470
|
+
[
|
|
471
|
+
c,
|
|
472
|
+
t,
|
|
473
|
+
n,
|
|
474
|
+
o,
|
|
475
|
+
s,
|
|
476
|
+
l,
|
|
477
|
+
i,
|
|
478
|
+
d
|
|
479
|
+
]
|
|
480
|
+
), a = v(
|
|
481
|
+
() => On(u),
|
|
482
|
+
[u]
|
|
483
|
+
), h = v(
|
|
484
|
+
() => ot(c, t, n),
|
|
485
|
+
[c, t, n]
|
|
486
|
+
), m = v(
|
|
487
|
+
() => ({
|
|
488
|
+
tabIndex: 0,
|
|
489
|
+
onKeyDown: a,
|
|
490
|
+
id: h
|
|
491
|
+
}),
|
|
492
|
+
[a, h]
|
|
493
|
+
);
|
|
605
494
|
return {
|
|
606
|
-
focusOnCell,
|
|
607
|
-
moveHandler,
|
|
608
|
-
requiredProps
|
|
495
|
+
focusOnCell: rt,
|
|
496
|
+
moveHandler: u,
|
|
497
|
+
requiredProps: m
|
|
609
498
|
};
|
|
610
|
-
}
|
|
611
|
-
const
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
const
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
const cellCoordinates = useMemo(() => ({
|
|
679
|
-
rowIndex: options.rowIndex,
|
|
680
|
-
colIndex: options.colIndex
|
|
681
|
-
}), [options.rowIndex, options.colIndex]);
|
|
682
|
-
const startEditing = useCallback(() => {
|
|
683
|
-
edit.startEditing();
|
|
684
|
-
nav.focusOnCell(tableId, cellCoordinates);
|
|
685
|
-
}, [edit, nav, tableId, cellCoordinates]);
|
|
686
|
-
const stopEditing = useCallback(() => {
|
|
687
|
-
edit.stopEditing();
|
|
688
|
-
nav.focusOnCell(tableId, cellCoordinates);
|
|
689
|
-
}, [edit, nav, tableId, cellCoordinates]);
|
|
690
|
-
const stopEditingAndRevert = useCallback(() => {
|
|
691
|
-
edit.stopEditingAndRevert();
|
|
692
|
-
nav.focusOnCell(tableId, cellCoordinates);
|
|
693
|
-
}, [edit, nav, tableId, cellCoordinates]);
|
|
694
|
-
const stopEditingAndMove = useCallback((direction) => {
|
|
695
|
-
edit.stopEditing();
|
|
696
|
-
nav.moveHandler(direction);
|
|
697
|
-
}, [edit, nav]);
|
|
698
|
-
const move = useCallback((direction) => {
|
|
699
|
-
nav.moveHandler(direction);
|
|
700
|
-
}, [nav]);
|
|
701
|
-
const onKeyDown = useCallback((e) => {
|
|
702
|
-
if (!edit.isEditing) {
|
|
703
|
-
const consumed = nav.requiredProps.onKeyDown(e);
|
|
704
|
-
if (!consumed) {
|
|
705
|
-
edit.onKeyDown(e);
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
}, [edit, nav.requiredProps]);
|
|
709
|
-
const requiredProps = useMemo(() => ({
|
|
710
|
-
...nav.requiredProps,
|
|
711
|
-
onKeyDown,
|
|
712
|
-
onDoubleClick: edit.onDoubleClick
|
|
713
|
-
}), [onKeyDown, edit.onDoubleClick, nav.requiredProps]);
|
|
499
|
+
}, Tn = (e, t, n, o, s, c, l, i) => (d) => {
|
|
500
|
+
const u = Sn(
|
|
501
|
+
t,
|
|
502
|
+
n,
|
|
503
|
+
o,
|
|
504
|
+
s,
|
|
505
|
+
d,
|
|
506
|
+
c
|
|
507
|
+
), a = n !== u.colIndex, h = t !== u.rowIndex;
|
|
508
|
+
(a || h) && (l && l({
|
|
509
|
+
direction: d,
|
|
510
|
+
fromRowIndex: t,
|
|
511
|
+
fromColIndex: n,
|
|
512
|
+
rowIndex: u.rowIndex,
|
|
513
|
+
colIndex: u.colIndex,
|
|
514
|
+
colDidChange: a,
|
|
515
|
+
rowDidChange: h
|
|
516
|
+
}), rt(e, u)), i && i({
|
|
517
|
+
direction: d,
|
|
518
|
+
fromRowIndex: t,
|
|
519
|
+
fromColIndex: n,
|
|
520
|
+
rowIndex: u.rowIndex,
|
|
521
|
+
colIndex: u.colIndex,
|
|
522
|
+
colDidChange: a,
|
|
523
|
+
rowDidChange: h,
|
|
524
|
+
cellDidChange: a || h
|
|
525
|
+
});
|
|
526
|
+
}, ot = (e, t, n) => En(`table-${e}-${t}-${n}`), On = (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, rt = (e, t) => {
|
|
527
|
+
const n = document.getElementById(
|
|
528
|
+
ot(e, t.rowIndex, t.colIndex)
|
|
529
|
+
);
|
|
530
|
+
n && n.focus();
|
|
531
|
+
}, he = (e, t) => {
|
|
532
|
+
const { tableId: n } = nt(t), o = Gn(t), s = mn(e, t), c = v(
|
|
533
|
+
() => ({
|
|
534
|
+
rowIndex: t.rowIndex,
|
|
535
|
+
colIndex: t.colIndex
|
|
536
|
+
}),
|
|
537
|
+
[t.rowIndex, t.colIndex]
|
|
538
|
+
), l = I(() => {
|
|
539
|
+
s.startEditing(), o.focusOnCell(n, c);
|
|
540
|
+
}, [s, o, n, c]), i = I(() => {
|
|
541
|
+
s.stopEditing(), o.focusOnCell(n, c);
|
|
542
|
+
}, [s, o, n, c]), d = I(() => {
|
|
543
|
+
s.stopEditingAndRevert(), o.focusOnCell(n, c);
|
|
544
|
+
}, [s, o, n, c]), u = I(
|
|
545
|
+
(f) => {
|
|
546
|
+
s.stopEditing(), o.moveHandler(f);
|
|
547
|
+
},
|
|
548
|
+
[s, o]
|
|
549
|
+
), a = I(
|
|
550
|
+
(f) => {
|
|
551
|
+
o.moveHandler(f);
|
|
552
|
+
},
|
|
553
|
+
[o]
|
|
554
|
+
), h = I(
|
|
555
|
+
(f) => {
|
|
556
|
+
s.isEditing || o.requiredProps.onKeyDown(f) || s.onKeyDown(f);
|
|
557
|
+
},
|
|
558
|
+
[s, o.requiredProps]
|
|
559
|
+
), m = v(
|
|
560
|
+
() => ({
|
|
561
|
+
...o.requiredProps,
|
|
562
|
+
onKeyDown: h,
|
|
563
|
+
onDoubleClick: s.onDoubleClick
|
|
564
|
+
}),
|
|
565
|
+
[h, s.onDoubleClick, o.requiredProps]
|
|
566
|
+
);
|
|
714
567
|
return {
|
|
715
|
-
isEditing:
|
|
716
|
-
lastKeyEvent:
|
|
717
|
-
editorValue:
|
|
718
|
-
setEditorValue:
|
|
719
|
-
revertEditorValue:
|
|
720
|
-
requiredProps,
|
|
721
|
-
move,
|
|
722
|
-
startEditing,
|
|
723
|
-
stopEditing,
|
|
724
|
-
stopEditingAndRevert,
|
|
725
|
-
stopEditingAndMove
|
|
568
|
+
isEditing: s.isEditing,
|
|
569
|
+
lastKeyEvent: s.lastKeyEvent,
|
|
570
|
+
editorValue: s.revertableValue.value,
|
|
571
|
+
setEditorValue: s.revertableValue.setValue,
|
|
572
|
+
revertEditorValue: s.revertableValue.revert,
|
|
573
|
+
requiredProps: m,
|
|
574
|
+
move: a,
|
|
575
|
+
startEditing: l,
|
|
576
|
+
stopEditing: i,
|
|
577
|
+
stopEditingAndRevert: d,
|
|
578
|
+
stopEditingAndMove: u
|
|
726
579
|
};
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
warningOnEmpty
|
|
580
|
+
}, Er = function({
|
|
581
|
+
allowedInputType: t,
|
|
582
|
+
value: n = "",
|
|
583
|
+
entityId: o,
|
|
584
|
+
isEditable: s,
|
|
585
|
+
rowIndent: c,
|
|
586
|
+
crudStatusRedux: l,
|
|
587
|
+
modifiedFieldsRedux: i,
|
|
588
|
+
colIndex: d,
|
|
589
|
+
rowIndex: u,
|
|
590
|
+
numCols: a,
|
|
591
|
+
numRows: h,
|
|
592
|
+
warningOnEmpty: m
|
|
741
593
|
}) {
|
|
742
|
-
const
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
}
|
|
758
|
-
}, [dispatch, entityId, modifiedFieldsRedux.actions, value]);
|
|
759
|
-
const {
|
|
760
|
-
isEditing,
|
|
761
|
-
stopEditing,
|
|
762
|
-
editorValue,
|
|
763
|
-
setEditorValue,
|
|
764
|
-
stopEditingAndRevert,
|
|
765
|
-
stopEditingAndMove,
|
|
766
|
-
lastKeyEvent,
|
|
594
|
+
const f = Vt(), w = Be(i.selectors.getState), p = Be(l.selectors.getState), C = w.entities[o], x = p.entities[o], b = I((H = "") => {
|
|
595
|
+
f(H === n ? i.actions.clearEntity(o) : i.actions.setEntity({
|
|
596
|
+
id: o,
|
|
597
|
+
originalValue: n,
|
|
598
|
+
newValue: H,
|
|
599
|
+
modified: !0
|
|
600
|
+
}));
|
|
601
|
+
}, [f, o, i.actions, n]), {
|
|
602
|
+
isEditing: S,
|
|
603
|
+
stopEditing: y,
|
|
604
|
+
editorValue: A,
|
|
605
|
+
setEditorValue: k,
|
|
606
|
+
stopEditingAndRevert: L,
|
|
607
|
+
stopEditingAndMove: O,
|
|
608
|
+
lastKeyEvent: z,
|
|
767
609
|
requiredProps: {
|
|
768
|
-
onKeyDown,
|
|
769
|
-
...
|
|
610
|
+
onKeyDown: D,
|
|
611
|
+
...j
|
|
770
612
|
}
|
|
771
|
-
} =
|
|
772
|
-
rowIndex,
|
|
773
|
-
colIndex,
|
|
774
|
-
numCols,
|
|
775
|
-
numRows,
|
|
613
|
+
} = he(n, {
|
|
614
|
+
rowIndex: u,
|
|
615
|
+
colIndex: d,
|
|
616
|
+
numCols: a,
|
|
617
|
+
numRows: h,
|
|
776
618
|
tableId: "serviceManningMatrixTable",
|
|
777
|
-
onChange:
|
|
778
|
-
isEditable,
|
|
779
|
-
allowedInputType
|
|
780
|
-
})
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
} else {
|
|
789
|
-
onKeyDown(ev);
|
|
790
|
-
}
|
|
791
|
-
}, [onKeyDown, entityId, dispatch, modifiedFieldsRedux.actions, crudStatusRedux.actions]);
|
|
792
|
-
return /* @__PURE__ */ jsxs(Row, {
|
|
793
|
-
height: defaultTableRowHeight,
|
|
619
|
+
onChange: b,
|
|
620
|
+
isEditable: s,
|
|
621
|
+
allowedInputType: t
|
|
622
|
+
}), K = I((H) => {
|
|
623
|
+
H.key === "Delete" ? (f(i.actions.clearEntity(o)), f(l.actions.setEntityFields(o, {
|
|
624
|
+
hasError: !1,
|
|
625
|
+
errorMessage: void 0
|
|
626
|
+
}))) : D(H);
|
|
627
|
+
}, [D, o, f, i.actions, l.actions]);
|
|
628
|
+
return /* @__PURE__ */ g(E, {
|
|
629
|
+
height: Se,
|
|
794
630
|
width: "100%",
|
|
795
|
-
borderBottom:
|
|
631
|
+
borderBottom: oe,
|
|
796
632
|
hoverBackground: "var(--ui7)",
|
|
797
633
|
alignItems: "center",
|
|
798
|
-
children: [
|
|
799
|
-
num:
|
|
800
|
-
}), /* @__PURE__ */
|
|
634
|
+
children: [c && /* @__PURE__ */ r(N, {
|
|
635
|
+
num: c
|
|
636
|
+
}), /* @__PURE__ */ r(E, {
|
|
801
637
|
width: "100%",
|
|
802
638
|
height: "100%",
|
|
803
639
|
justifyContent: "flex-end",
|
|
804
640
|
alignItems: "center",
|
|
805
641
|
border: "1px solid transparent",
|
|
806
642
|
borderRadius: "4px",
|
|
807
|
-
focusBorder:
|
|
808
|
-
hoverBorder:
|
|
809
|
-
onKeyDown:
|
|
810
|
-
...
|
|
811
|
-
children: /* @__PURE__ */
|
|
812
|
-
row:
|
|
643
|
+
focusBorder: S ? void 0 : "1px solid var(--primary-action-color)",
|
|
644
|
+
hoverBorder: S ? void 0 : "var(--ui5) solid 1px;",
|
|
645
|
+
onKeyDown: K,
|
|
646
|
+
...j,
|
|
647
|
+
children: /* @__PURE__ */ r(N, {
|
|
648
|
+
row: !0,
|
|
813
649
|
alignItems: "center",
|
|
814
|
-
children:
|
|
815
|
-
onValueChange:
|
|
816
|
-
value:
|
|
817
|
-
onDone:
|
|
818
|
-
onEsc:
|
|
819
|
-
autoFocus:
|
|
820
|
-
selectAllOnMount: !
|
|
821
|
-
onMove:
|
|
822
|
-
}) : /* @__PURE__ */
|
|
823
|
-
children: [/* @__PURE__ */
|
|
824
|
-
color:
|
|
825
|
-
variant:
|
|
826
|
-
children:
|
|
827
|
-
}), (
|
|
828
|
-
children: [/* @__PURE__ */
|
|
829
|
-
children: /* @__PURE__ */
|
|
830
|
-
icon:
|
|
650
|
+
children: S ? /* @__PURE__ */ r(ge, {
|
|
651
|
+
onValueChange: k,
|
|
652
|
+
value: A,
|
|
653
|
+
onDone: y,
|
|
654
|
+
onEsc: L,
|
|
655
|
+
autoFocus: !0,
|
|
656
|
+
selectAllOnMount: !z,
|
|
657
|
+
onMove: O
|
|
658
|
+
}) : /* @__PURE__ */ g(G, {
|
|
659
|
+
children: [/* @__PURE__ */ r(U, {
|
|
660
|
+
color: s ? "var(--primary-action-color)" : void 0,
|
|
661
|
+
variant: C != null && C.modified ? "bold" : void 0,
|
|
662
|
+
children: n
|
|
663
|
+
}), (C == null ? void 0 : C.newValue) !== void 0 && /* @__PURE__ */ g(G, {
|
|
664
|
+
children: [/* @__PURE__ */ r(N, {
|
|
665
|
+
children: /* @__PURE__ */ r(F, {
|
|
666
|
+
icon: Mt,
|
|
831
667
|
size: 12
|
|
832
668
|
})
|
|
833
|
-
}), /* @__PURE__ */
|
|
669
|
+
}), /* @__PURE__ */ r(U, {
|
|
834
670
|
color: "var(--primary-action-color)",
|
|
835
671
|
variant: "bold",
|
|
836
|
-
children:
|
|
672
|
+
children: C.newValue
|
|
837
673
|
})]
|
|
838
|
-
}),
|
|
674
|
+
}), x && be(x) && /* @__PURE__ */ r(B, {
|
|
839
675
|
num: 2
|
|
840
|
-
}),
|
|
841
|
-
label:
|
|
676
|
+
}), m && (C == null ? void 0 : C.modified) && (C == null ? void 0 : C.newValue) === "" ? /* @__PURE__ */ r(re, {
|
|
677
|
+
label: m,
|
|
842
678
|
zIndex: 100,
|
|
843
|
-
children: /* @__PURE__ */
|
|
844
|
-
icon:
|
|
679
|
+
children: /* @__PURE__ */ r(F, {
|
|
680
|
+
icon: ue,
|
|
845
681
|
color: "var(--ui-alert1)",
|
|
846
682
|
size: 14
|
|
847
683
|
})
|
|
848
|
-
}) : /* @__PURE__ */
|
|
849
|
-
crudStatus
|
|
684
|
+
}) : /* @__PURE__ */ r(Ye, {
|
|
685
|
+
crudStatus: x
|
|
850
686
|
})]
|
|
851
687
|
})
|
|
852
688
|
})
|
|
853
|
-
}),
|
|
854
|
-
num:
|
|
689
|
+
}), c && /* @__PURE__ */ r(N, {
|
|
690
|
+
num: c
|
|
855
691
|
})]
|
|
856
692
|
});
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
const getReducerIdFor = (reducerId, reducerIdSuffix) => `${reducerId}.${reducerIdSuffix}`;
|
|
869
|
-
const createStandardTableInitialState = (sortBy = void 0, desc = false, selectedIds = [], expandedRows = []) => ({
|
|
870
|
-
sortOrder: createSortOrderReducerInitialState(sortBy, desc),
|
|
871
|
-
selectedIds: createSelectedIdsReducerInitialState(selectedIds),
|
|
872
|
-
expandedRows: createSelectedIdsReducerInitialState(expandedRows),
|
|
693
|
+
}, st = $(""), ct = $(
|
|
694
|
+
void 0
|
|
695
|
+
), lt = $(void 0), it = $(void 0), Pn = () => ({
|
|
696
|
+
sortOrder: _t(),
|
|
697
|
+
selectedIds: De(),
|
|
698
|
+
expandedRows: De(),
|
|
699
|
+
fields: jt()
|
|
700
|
+
}), M = (e, t) => `${e}.${t}`, at = (e = void 0, t = !1, n = [], o = []) => ({
|
|
701
|
+
sortOrder: Wt(e, t),
|
|
702
|
+
selectedIds: Ne(n),
|
|
703
|
+
expandedRows: Ne(o),
|
|
873
704
|
fields: { lastSelectedId: void 0 }
|
|
874
|
-
})
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
expandedRows
|
|
885
|
-
|
|
705
|
+
}), An = (e, t) => {
|
|
706
|
+
var l;
|
|
707
|
+
const n = de(
|
|
708
|
+
M(e, "sortOrder"),
|
|
709
|
+
qt(t == null ? void 0 : t.sortOrder)
|
|
710
|
+
), o = de(
|
|
711
|
+
M(e, "selectedIds"),
|
|
712
|
+
ze(t == null ? void 0 : t.selectedIds)
|
|
713
|
+
), s = de(
|
|
714
|
+
M(e, "expandedRows"),
|
|
715
|
+
ze(t == null ? void 0 : t.expandedRows)
|
|
716
|
+
), c = de(
|
|
717
|
+
M(e, "fields"),
|
|
718
|
+
Ft((l = t == null ? void 0 : t.fields) != null ? l : {})
|
|
719
|
+
);
|
|
720
|
+
return Ut({
|
|
721
|
+
sortOrder: n,
|
|
722
|
+
selectedIds: o,
|
|
723
|
+
expandedRows: s,
|
|
724
|
+
fields: c
|
|
886
725
|
});
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
if (config.showRowCheckbox) {
|
|
902
|
-
offset++;
|
|
903
|
-
}
|
|
904
|
-
return offset + useMemo(() => groupConfigsAndIds.map((c) => c.groupConfig.columnOrder.length).reduce((sum, item) => sum + item, 0), [groupConfigsAndIds]);
|
|
905
|
-
};
|
|
906
|
-
const OnKeyDownContext = createContext(void 0);
|
|
907
|
-
const useOnKeyDownContext = () => useContext(OnKeyDownContext);
|
|
908
|
-
const StandardTableColumnGroupOrderContext = createContext(void 0);
|
|
909
|
-
const StandardTableUsingColumnGroupsContext = createContext(false);
|
|
910
|
-
const useColumnGroupOrderContext = () => useContext(StandardTableColumnGroupOrderContext);
|
|
911
|
-
const StandardTableVariantContext = createContext("standard");
|
|
912
|
-
const StickyPropsPerColumnContext = createContext({});
|
|
913
|
-
const useStickyPropsPerColumnContext = () => useContext(StickyPropsPerColumnContext);
|
|
914
|
-
const TotalNumColumnsContext = createContext(0);
|
|
915
|
-
const useTotalNumColumns = () => useContext(TotalNumColumnsContext);
|
|
916
|
-
const createGroupConfigAndIdsForRows = (columnGroups, columnGroupOrder, columnOrder) => {
|
|
917
|
-
var _a;
|
|
918
|
-
if (columnGroups) {
|
|
919
|
-
return compact$1((_a = columnGroupOrder == null ? void 0 : columnGroupOrder.map((groupId) => {
|
|
920
|
-
const groupConfig = columnGroups == null ? void 0 : columnGroups[groupId];
|
|
726
|
+
}, Re = () => V(st), R = () => V(it), Y = () => V(ct), se = () => V(lt), dt = $([]), Z = () => V(
|
|
727
|
+
dt
|
|
728
|
+
), ut = () => {
|
|
729
|
+
const e = R(), t = Z();
|
|
730
|
+
let n = 0;
|
|
731
|
+
return e.enableExpandCollapse && n++, e.showRowCheckbox && n++, n + v(
|
|
732
|
+
() => t.map((o) => o.groupConfig.columnOrder.length).reduce((o, s) => o + s, 0),
|
|
733
|
+
[t]
|
|
734
|
+
);
|
|
735
|
+
}, ht = $(void 0), Ln = () => V(ht), pt = $(void 0), Bn = $(!1), Dn = () => V(pt), Nn = $("standard"), mt = $({}), Ge = () => V(mt), ft = $(0), Te = () => V(ft), wt = (e, t, n) => {
|
|
736
|
+
var o;
|
|
737
|
+
return e ? Xt(
|
|
738
|
+
(o = t == null ? void 0 : t.map((s) => {
|
|
739
|
+
const c = e == null ? void 0 : e[s];
|
|
921
740
|
return {
|
|
922
|
-
groupId,
|
|
923
|
-
groupConfig
|
|
741
|
+
groupId: s,
|
|
742
|
+
groupConfig: c
|
|
924
743
|
};
|
|
925
|
-
})) != null ?
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
}
|
|
930
|
-
|
|
744
|
+
})) != null ? o : []
|
|
745
|
+
).filter((s) => {
|
|
746
|
+
var c, l;
|
|
747
|
+
return ((l = (c = s.groupConfig) == null ? void 0 : c.columnOrder.length) != null ? l : 0) > 0;
|
|
748
|
+
}).map(
|
|
749
|
+
(s) => s
|
|
750
|
+
) : [
|
|
931
751
|
{
|
|
932
752
|
groupId: "virtual",
|
|
933
753
|
groupConfig: {
|
|
934
754
|
label: "",
|
|
935
|
-
columnOrder:
|
|
755
|
+
columnOrder: n != null ? n : []
|
|
936
756
|
}
|
|
937
757
|
}
|
|
938
758
|
];
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
const
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
}
|
|
968
|
-
return void 0;
|
|
969
|
-
};
|
|
970
|
-
const useColumnConfigById = (columnId) => {
|
|
971
|
-
const { columns } = useStandardTableConfig();
|
|
972
|
-
const column = columns[columnId];
|
|
973
|
-
if (!column) {
|
|
974
|
-
throw new Error("No config for column with id=" + columnId);
|
|
975
|
-
}
|
|
976
|
-
return column;
|
|
977
|
-
};
|
|
978
|
-
const useFirstColumnConfig = () => {
|
|
979
|
-
var _a, _b, _c;
|
|
980
|
-
const config = useStandardTableConfig();
|
|
981
|
-
const columnId = (_c = (_b = (_a = useGroupConfigsAndIdsForRows()) == null ? void 0 : _a[0]) == null ? void 0 : _b.groupConfig.columnOrder) == null ? void 0 : _c[0];
|
|
982
|
-
return columnId ? config.columns[columnId] : void 0;
|
|
983
|
-
};
|
|
984
|
-
const useLastColumnConfig = () => {
|
|
985
|
-
var _a;
|
|
986
|
-
const config = useStandardTableConfig();
|
|
987
|
-
const groupConfigsAndIds = useGroupConfigsAndIdsForRows();
|
|
988
|
-
const groupConfigAndId = groupConfigsAndIds[groupConfigsAndIds.length - 1];
|
|
989
|
-
const columnId = (_a = groupConfigAndId == null ? void 0 : groupConfigAndId.groupConfig.columnOrder[groupConfigAndId.groupConfig.columnOrder.length - 1]) != null ? _a : void 0;
|
|
990
|
-
return columnId ? config.columns[columnId] : void 0;
|
|
991
|
-
};
|
|
992
|
-
const ColumnInGroup = function ColumnGroupColumnItem({
|
|
993
|
-
columnId,
|
|
994
|
-
groupConfig,
|
|
995
|
-
borderFromGroup,
|
|
996
|
-
colSpan,
|
|
997
|
-
isFirstGroup,
|
|
998
|
-
isLastGroup
|
|
759
|
+
}, Oe = (e, t, n) => {
|
|
760
|
+
if (e)
|
|
761
|
+
return e === !0 ? oe : e;
|
|
762
|
+
if (!t && !!n)
|
|
763
|
+
return n === !0 ? oe : n;
|
|
764
|
+
}, pe = (e, t, n) => {
|
|
765
|
+
if (!(e === 0 || t !== 0) && n)
|
|
766
|
+
return n === !0 ? oe : n;
|
|
767
|
+
}, ce = (e) => {
|
|
768
|
+
const { columns: t } = R(), n = t[e];
|
|
769
|
+
if (!n)
|
|
770
|
+
throw new Error("No config for column with id=" + e);
|
|
771
|
+
return n;
|
|
772
|
+
}, zn = () => {
|
|
773
|
+
var n, o, s;
|
|
774
|
+
const e = R(), t = (s = (o = (n = Z()) == null ? void 0 : n[0]) == null ? void 0 : o.groupConfig.columnOrder) == null ? void 0 : s[0];
|
|
775
|
+
return t ? e.columns[t] : void 0;
|
|
776
|
+
}, Kn = () => {
|
|
777
|
+
var s;
|
|
778
|
+
const e = R(), t = Z(), n = t[t.length - 1], o = (s = n == null ? void 0 : n.groupConfig.columnOrder[n.groupConfig.columnOrder.length - 1]) != null ? s : void 0;
|
|
779
|
+
return o ? e.columns[o] : void 0;
|
|
780
|
+
}, Hn = function({
|
|
781
|
+
columnId: t,
|
|
782
|
+
groupConfig: n,
|
|
783
|
+
borderFromGroup: o,
|
|
784
|
+
colSpan: s,
|
|
785
|
+
isFirstGroup: c,
|
|
786
|
+
isLastGroup: l
|
|
999
787
|
}) {
|
|
1000
|
-
var
|
|
1001
|
-
const {
|
|
1002
|
-
label,
|
|
1003
|
-
render,
|
|
1004
|
-
contentLeft,
|
|
1005
|
-
contentRight,
|
|
1006
|
-
loading,
|
|
1007
|
-
error
|
|
1008
|
-
} = groupConfig;
|
|
1009
|
-
const {
|
|
1010
|
-
width,
|
|
1011
|
-
minWidth,
|
|
1012
|
-
zIndex,
|
|
1013
|
-
borderLeft
|
|
1014
|
-
} = useColumnConfigById(columnId);
|
|
1015
|
-
const config = useStandardTableConfig();
|
|
788
|
+
var D;
|
|
1016
789
|
const {
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
790
|
+
label: i,
|
|
791
|
+
render: d,
|
|
792
|
+
contentLeft: u,
|
|
793
|
+
contentRight: a,
|
|
794
|
+
loading: h,
|
|
795
|
+
error: m
|
|
796
|
+
} = n, {
|
|
797
|
+
width: f,
|
|
798
|
+
minWidth: w,
|
|
799
|
+
zIndex: p,
|
|
800
|
+
borderLeft: C
|
|
801
|
+
} = ce(t), x = R(), {
|
|
802
|
+
stickyHeader: b,
|
|
803
|
+
headerRowOffsetTop: S
|
|
804
|
+
} = x, y = "columnGroupOrder" in x ? x.stickyColumnGroups : void 0, A = $n(o, C), k = c && (y === "first" || y === "both"), L = l && (y === "last" || y === "both"), O = k || L || b, z = k || L;
|
|
805
|
+
return /* @__PURE__ */ r("th", {
|
|
806
|
+
colSpan: s,
|
|
1028
807
|
style: {
|
|
1029
|
-
position:
|
|
808
|
+
position: O ? "sticky" : void 0,
|
|
1030
809
|
height: "var(--current-row-height)",
|
|
1031
|
-
width,
|
|
1032
|
-
minWidth: (
|
|
1033
|
-
background:
|
|
1034
|
-
left:
|
|
1035
|
-
right:
|
|
1036
|
-
top:
|
|
1037
|
-
borderLeft:
|
|
1038
|
-
zIndex:
|
|
1039
|
-
boxShadow:
|
|
810
|
+
width: f,
|
|
811
|
+
minWidth: (D = w != null ? w : f) != null ? D : "20px",
|
|
812
|
+
background: O ? "white" : "transparent",
|
|
813
|
+
left: k ? "var(--current-left-offset)" : void 0,
|
|
814
|
+
right: L ? "0px" : void 0,
|
|
815
|
+
top: b ? S != null ? S : "0px" : void 0,
|
|
816
|
+
borderLeft: A,
|
|
817
|
+
zIndex: b && z ? "var(--swui-sticky-column-group-label-z-index)" : z ? "var(--swui-sticky-group-group-z-index)" : b ? p != null ? p : "var(--swui-sticky-header-column-group-z-index)" : p != null ? p : 1,
|
|
818
|
+
boxShadow: k ? "var(--swui-sticky-column-shadow-right)" : L ? "var(--swui-sticky-column-shadow-left)" : void 0
|
|
1040
819
|
},
|
|
1041
|
-
children: /* @__PURE__ */
|
|
820
|
+
children: /* @__PURE__ */ r(E, {
|
|
1042
821
|
alignItems: "center",
|
|
1043
|
-
children: /* @__PURE__ */
|
|
1044
|
-
children: [
|
|
1045
|
-
children: [/* @__PURE__ */
|
|
822
|
+
children: /* @__PURE__ */ g(G, {
|
|
823
|
+
children: [u && /* @__PURE__ */ g(G, {
|
|
824
|
+
children: [/* @__PURE__ */ r(B, {}), u, /* @__PURE__ */ r(B, {
|
|
1046
825
|
num: 0.5
|
|
1047
826
|
})]
|
|
1048
|
-
}),
|
|
1049
|
-
children: /* @__PURE__ */
|
|
827
|
+
}), d ? d(n) : /* @__PURE__ */ r(N, {
|
|
828
|
+
children: /* @__PURE__ */ r(We, {
|
|
1050
829
|
variant: "h5",
|
|
1051
830
|
whiteSpace: "nowrap",
|
|
1052
|
-
children:
|
|
831
|
+
children: i
|
|
1053
832
|
})
|
|
1054
|
-
}),
|
|
1055
|
-
children: [/* @__PURE__ */
|
|
833
|
+
}), a && /* @__PURE__ */ g(G, {
|
|
834
|
+
children: [/* @__PURE__ */ r(B, {
|
|
1056
835
|
num: 0.5
|
|
1057
|
-
}),
|
|
1058
|
-
}), (
|
|
1059
|
-
label:
|
|
836
|
+
}), a]
|
|
837
|
+
}), (m || h) && /* @__PURE__ */ r(N, {}), h ? /* @__PURE__ */ r(ye, {}) : m ? /* @__PURE__ */ r(re, {
|
|
838
|
+
label: m,
|
|
1060
839
|
placement: "bottom",
|
|
1061
840
|
appendTo: document.body,
|
|
1062
|
-
children: /* @__PURE__ */
|
|
1063
|
-
icon:
|
|
1064
|
-
color:
|
|
841
|
+
children: /* @__PURE__ */ r(F, {
|
|
842
|
+
icon: ue,
|
|
843
|
+
color: _("--lhds-color-red-500"),
|
|
1065
844
|
size: 14
|
|
1066
845
|
})
|
|
1067
846
|
}) : void 0]
|
|
1068
847
|
})
|
|
1069
848
|
})
|
|
1070
849
|
});
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
}
|
|
1076
|
-
if (borderFromColumn) {
|
|
850
|
+
}, $n = (e, t) => {
|
|
851
|
+
if (e)
|
|
852
|
+
return e;
|
|
853
|
+
if (t)
|
|
1077
854
|
return "1px solid transparent";
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
if (
|
|
1090
|
-
return headerRowOffsetTop;
|
|
1091
|
-
} else if (headerRowOffsetTop) {
|
|
1092
|
-
return headerRowOffsetTop;
|
|
1093
|
-
} else if (stickyHeader) {
|
|
855
|
+
}, Mn = (e, t, n, o) => ({
|
|
856
|
+
top: e ? Vn(e, n) : void 0,
|
|
857
|
+
background: e || t ? "white" : void 0,
|
|
858
|
+
position: e || t ? "sticky" : void 0,
|
|
859
|
+
boxShadow: t ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
860
|
+
zIndex: e || t ? o != null ? o : "var(--swui-sticky-header-z-index)" : o
|
|
861
|
+
}), Vn = (e, t) => {
|
|
862
|
+
if (e && t)
|
|
863
|
+
return t;
|
|
864
|
+
if (t)
|
|
865
|
+
return t;
|
|
866
|
+
if (e)
|
|
1094
867
|
return 0;
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
};
|
|
1098
|
-
const ColumnGroupRow = React.memo(function ColumnGroupRow2({
|
|
1099
|
-
height = defaultTableRowHeight
|
|
868
|
+
}, _n = T.memo(function({
|
|
869
|
+
height: t = Se
|
|
1100
870
|
}) {
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
} = config;
|
|
1112
|
-
const stickyHeaderProps = createStickyHeaderProps(stickyHeader, stickyCheckboxColumn, headerRowOffsetTop, zIndex);
|
|
1113
|
-
const zIndexForCells = stickyHeader ? "var(--swui-sticky-column-group-label-z-index)" : "var(--swui-sticky-group-group-z-index)";
|
|
1114
|
-
return /* @__PURE__ */ jsxs("tr", {
|
|
871
|
+
const n = Z(), o = R(), {
|
|
872
|
+
showHeaderCheckbox: s,
|
|
873
|
+
enableExpandCollapse: c,
|
|
874
|
+
rowIndent: l,
|
|
875
|
+
zIndex: i,
|
|
876
|
+
stickyHeader: d,
|
|
877
|
+
stickyCheckboxColumn: u,
|
|
878
|
+
headerRowOffsetTop: a
|
|
879
|
+
} = o, h = Mn(d, u, a, i), m = d ? "var(--swui-sticky-column-group-label-z-index)" : "var(--swui-sticky-group-group-z-index)";
|
|
880
|
+
return /* @__PURE__ */ g("tr", {
|
|
1115
881
|
style: {
|
|
1116
|
-
height,
|
|
1117
|
-
borderLeft:
|
|
882
|
+
height: t,
|
|
883
|
+
borderLeft: ke
|
|
1118
884
|
},
|
|
1119
|
-
children: [
|
|
1120
|
-
style:
|
|
1121
|
-
}),
|
|
885
|
+
children: [l && /* @__PURE__ */ r("th", {
|
|
886
|
+
style: h
|
|
887
|
+
}), c && /* @__PURE__ */ r("th", {
|
|
1122
888
|
style: {
|
|
1123
|
-
...
|
|
889
|
+
...h,
|
|
1124
890
|
width: "var(--swui-expand-cell-width)",
|
|
1125
|
-
left:
|
|
1126
|
-
zIndex:
|
|
891
|
+
left: u ? "0px" : void 0,
|
|
892
|
+
zIndex: m
|
|
1127
893
|
}
|
|
1128
|
-
}),
|
|
894
|
+
}), s && /* @__PURE__ */ r("th", {
|
|
1129
895
|
style: {
|
|
1130
|
-
...
|
|
1131
|
-
left:
|
|
1132
|
-
zIndex:
|
|
896
|
+
...h,
|
|
897
|
+
left: u && c ? "var(--swui-expand-cell-width)" : u ? "0px" : void 0,
|
|
898
|
+
zIndex: m
|
|
1133
899
|
}
|
|
1134
|
-
}),
|
|
1135
|
-
groupConfig,
|
|
1136
|
-
groupId
|
|
1137
|
-
},
|
|
1138
|
-
isFirstGroup:
|
|
1139
|
-
isLastGroup:
|
|
1140
|
-
groupConfig,
|
|
1141
|
-
columnId:
|
|
1142
|
-
colSpan:
|
|
1143
|
-
borderFromGroup:
|
|
1144
|
-
},
|
|
1145
|
-
style:
|
|
900
|
+
}), n.map(({
|
|
901
|
+
groupConfig: f,
|
|
902
|
+
groupId: w
|
|
903
|
+
}, p) => /* @__PURE__ */ r(Hn, {
|
|
904
|
+
isFirstGroup: p === 0,
|
|
905
|
+
isLastGroup: p === n.length - 1,
|
|
906
|
+
groupConfig: f,
|
|
907
|
+
columnId: f.columnOrder[0],
|
|
908
|
+
colSpan: f.columnOrder.length,
|
|
909
|
+
borderFromGroup: pe(p, 0, f.borderLeft)
|
|
910
|
+
}, w)), l && /* @__PURE__ */ r("th", {
|
|
911
|
+
style: h
|
|
1146
912
|
})]
|
|
1147
913
|
});
|
|
1148
|
-
})
|
|
1149
|
-
const
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
}
|
|
1159
|
-
groupConfigs.forEach((conf) => {
|
|
1160
|
-
conf.groupConfig.columnOrder.forEach((columnId) => {
|
|
1161
|
-
if (isColumnNavigable(config.columns[columnId])) {
|
|
1162
|
-
columnIndexPerColumnId[columnId] = currentIndex++;
|
|
1163
|
-
}
|
|
914
|
+
}), jn = (e) => {
|
|
915
|
+
const t = wt(
|
|
916
|
+
"columnGroups" in e ? e.columnGroups : void 0,
|
|
917
|
+
"columnGroupOrder" in e ? e.columnGroupOrder : void 0,
|
|
918
|
+
"columnOrder" in e ? e.columnOrder : void 0
|
|
919
|
+
);
|
|
920
|
+
let n = {}, o = 0;
|
|
921
|
+
return e.showRowCheckbox && o++, e.enableExpandCollapse && o++, t.forEach((s) => {
|
|
922
|
+
s.groupConfig.columnOrder.forEach((c) => {
|
|
923
|
+
Wn(e.columns[c]) && (n[c] = o++);
|
|
1164
924
|
});
|
|
1165
|
-
})
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
numNavigableColumns: currentIndex
|
|
925
|
+
}), {
|
|
926
|
+
columnIndexPerColumnId: n,
|
|
927
|
+
numNavigableColumns: o
|
|
1169
928
|
};
|
|
1170
|
-
}
|
|
1171
|
-
const isColumnNavigable = (columnConfig) => !columnConfig.disableGridCell;
|
|
1172
|
-
const ColumnIndexPerColumnIdContext = createContext({
|
|
929
|
+
}, Wn = (e) => !e.disableGridCell, Ct = $({
|
|
1173
930
|
columnIndexPerColumnId: {},
|
|
1174
931
|
numNavigableColumns: 0
|
|
1175
|
-
})
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
const ensureNoColumnsAreSticky = (config) => {
|
|
1189
|
-
const columnIds = Object.keys(config.columns);
|
|
1190
|
-
columnIds.forEach((columnId) => {
|
|
1191
|
-
const columnConfig = config.columns[columnId];
|
|
1192
|
-
if (columnConfig.sticky) {
|
|
1193
|
-
throw new Error("Columns can not be sticky when column groups are used. columnId: " + columnId);
|
|
1194
|
-
}
|
|
932
|
+
}), vt = () => V(
|
|
933
|
+
Ct
|
|
934
|
+
), qn = (e) => {
|
|
935
|
+
"columnGroupOrder" in e && (Fn(e), (e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both") && $e(e, 0), (e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both") && $e(
|
|
936
|
+
e,
|
|
937
|
+
e.columnGroupOrder.length - 1
|
|
938
|
+
));
|
|
939
|
+
}, Fn = (e) => {
|
|
940
|
+
Object.keys(e.columns).forEach((n) => {
|
|
941
|
+
if (e.columns[n].sticky)
|
|
942
|
+
throw new Error(
|
|
943
|
+
"Columns can not be sticky when column groups are used. columnId: " + n
|
|
944
|
+
);
|
|
1195
945
|
});
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
const
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
946
|
+
}, $e = (e, t) => {
|
|
947
|
+
var s;
|
|
948
|
+
if (!e.columnGroupOrder || e.columnGroupOrder.length === 0)
|
|
949
|
+
throw new Error(
|
|
950
|
+
"columnGroupOrder required when validating column group fixed width."
|
|
951
|
+
);
|
|
952
|
+
const n = e.columnGroupOrder[t], o = (s = e.columnGroups) == null ? void 0 : s[n];
|
|
953
|
+
if (!o)
|
|
954
|
+
throw new Error(
|
|
955
|
+
"Column group does not exist. Column group id = " + n
|
|
956
|
+
);
|
|
957
|
+
o.columnOrder.forEach((c) => {
|
|
958
|
+
if (e.columns[c].width == null)
|
|
959
|
+
throw new Error(
|
|
960
|
+
"All columns in sticky column group must have width set."
|
|
961
|
+
);
|
|
1212
962
|
});
|
|
1213
|
-
}
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1216
|
-
|
|
963
|
+
}, Un = (e) => {
|
|
964
|
+
const t = e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both" ? Me(
|
|
965
|
+
Jn(e),
|
|
966
|
+
e.columns,
|
|
967
|
+
!0
|
|
968
|
+
) : void 0, n = e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both" ? Me(
|
|
969
|
+
Xn(e),
|
|
970
|
+
e.columns,
|
|
971
|
+
!1
|
|
972
|
+
) : void 0;
|
|
1217
973
|
return {
|
|
1218
|
-
...
|
|
1219
|
-
...
|
|
974
|
+
...t,
|
|
975
|
+
...n
|
|
1220
976
|
};
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
const widths = [
|
|
1226
|
-
includeOffsetForCheckboxAndExpand ? "var(--current-left-offset)" : "0px"
|
|
977
|
+
}, Me = (e, t, n) => {
|
|
978
|
+
var c;
|
|
979
|
+
const o = {}, s = [
|
|
980
|
+
n ? "var(--current-left-offset)" : "0px"
|
|
1227
981
|
];
|
|
1228
|
-
for (let
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
if (widths.length === 0) {
|
|
1238
|
-
return "0px";
|
|
1239
|
-
}
|
|
1240
|
-
if (widths.length === 1) {
|
|
1241
|
-
return widths[0];
|
|
1242
|
-
}
|
|
1243
|
-
return "calc(" + widths.join(" + ") + ")";
|
|
1244
|
-
};
|
|
1245
|
-
const getColumnIdsForLeftSideStickyGroup = (config) => {
|
|
1246
|
-
var _a, _b, _c;
|
|
1247
|
-
const columnGroupId = (_a = config.columnGroupOrder) == null ? void 0 : _a[0];
|
|
1248
|
-
if (!columnGroupId) {
|
|
982
|
+
for (let l = 0; l < e.length; l++) {
|
|
983
|
+
const i = e[l], d = t == null ? void 0 : t[i];
|
|
984
|
+
o[i] = Zn(s), s.push((c = d == null ? void 0 : d.width) != null ? c : "0px");
|
|
985
|
+
}
|
|
986
|
+
return o;
|
|
987
|
+
}, Zn = (e) => e.length === 0 ? "0px" : e.length === 1 ? e[0] : "calc(" + e.join(" + ") + ")", Jn = (e) => {
|
|
988
|
+
var o, s, c;
|
|
989
|
+
const t = (o = e.columnGroupOrder) == null ? void 0 : o[0];
|
|
990
|
+
if (!t)
|
|
1249
991
|
return [];
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
const
|
|
1255
|
-
|
|
1256
|
-
const columnGroupId = (_b = config.columnGroupOrder) == null ? void 0 : _b[((_a = config.columnGroupOrder) == null ? void 0 : _a.length) - 1];
|
|
1257
|
-
if (!columnGroupId) {
|
|
992
|
+
const n = (s = e.columnGroups) == null ? void 0 : s[t];
|
|
993
|
+
return (c = n == null ? void 0 : n.columnOrder) != null ? c : [];
|
|
994
|
+
}, Xn = (e) => {
|
|
995
|
+
var s, c, l;
|
|
996
|
+
const t = (c = e.columnGroupOrder) == null ? void 0 : c[((s = e.columnGroupOrder) == null ? void 0 : s.length) - 1];
|
|
997
|
+
if (!t)
|
|
1258
998
|
return [];
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
if (!columnGroupConfig) {
|
|
999
|
+
const n = (l = e.columnGroups) == null ? void 0 : l[t];
|
|
1000
|
+
if (!n)
|
|
1262
1001
|
return [];
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
const
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
return sum;
|
|
1290
|
-
}, {});
|
|
1291
|
-
};
|
|
1292
|
-
const getStickyPropsPerColumnWithGroups = (config) => {
|
|
1293
|
-
const r = {};
|
|
1294
|
-
const columnGroupIds = config.columnGroupOrder;
|
|
1295
|
-
const stickyGroupOffsets = calculateOffsetForColumnInStickyColumnGroups(config);
|
|
1296
|
-
const firstGroupIsSticky = config.stickyColumnGroups === "first" || config.stickyColumnGroups === "both";
|
|
1297
|
-
const lastGroupIsSticky = config.stickyColumnGroups === "last" || config.stickyColumnGroups === "both";
|
|
1298
|
-
columnGroupIds.forEach((columnGroupId, columnGroupIndex) => {
|
|
1299
|
-
const columnGroup = config.columnGroups[columnGroupId];
|
|
1300
|
-
const columnIds = columnGroup.columnOrder;
|
|
1301
|
-
columnIds.forEach((columnId, columnIndex) => {
|
|
1302
|
-
const isFirstGroup = columnGroupIndex === 0;
|
|
1303
|
-
const isLastGroup = columnGroupIndex === columnGroupIds.length - 1;
|
|
1304
|
-
const isStickyFirst = isFirstGroup && firstGroupIsSticky;
|
|
1305
|
-
const isStickyLast = isLastGroup && lastGroupIsSticky;
|
|
1306
|
-
const isFirstColumnInLastGroup = columnIndex === 0 && isLastGroup;
|
|
1307
|
-
const isLastColumnInFirstGroup = columnIndex === columnIds.length - 1 && isFirstGroup;
|
|
1308
|
-
r[columnId] = {
|
|
1309
|
-
sticky: isStickyFirst || isStickyLast,
|
|
1310
|
-
left: isStickyFirst ? stickyGroupOffsets[columnId] : void 0,
|
|
1311
|
-
right: isStickyLast ? stickyGroupOffsets[columnId] : void 0,
|
|
1312
|
-
type: isStickyFirst ? "first-group" : isStickyLast ? "last-group" : void 0,
|
|
1313
|
-
isFirstColumnInLastGroup,
|
|
1314
|
-
isLastColumnInFirstGroup
|
|
1002
|
+
const o = [...n.columnOrder];
|
|
1003
|
+
return o.reverse(), o;
|
|
1004
|
+
}, Yn = (e) => "columnGroups" in e ? eo(e) : Qn(e), Qn = (e) => Object.keys(e.columns).reduce((n, o) => {
|
|
1005
|
+
var l;
|
|
1006
|
+
const s = e.columns[o], c = Boolean(s.sticky);
|
|
1007
|
+
return n[o] = {
|
|
1008
|
+
sticky: c,
|
|
1009
|
+
left: c ? `calc(var(--current-left-offset) + ${(l = s.left) != null ? l : "0px"})` : void 0,
|
|
1010
|
+
right: c ? s.right : void 0,
|
|
1011
|
+
type: "column",
|
|
1012
|
+
isFirstColumnInLastGroup: !1,
|
|
1013
|
+
isLastColumnInFirstGroup: !1
|
|
1014
|
+
}, n;
|
|
1015
|
+
}, {}), eo = (e) => {
|
|
1016
|
+
const t = {}, n = e.columnGroupOrder, o = Un(e), s = e.stickyColumnGroups === "first" || e.stickyColumnGroups === "both", c = e.stickyColumnGroups === "last" || e.stickyColumnGroups === "both";
|
|
1017
|
+
return n.forEach((l, i) => {
|
|
1018
|
+
const u = e.columnGroups[l].columnOrder;
|
|
1019
|
+
u.forEach((a, h) => {
|
|
1020
|
+
const m = i === 0, f = i === n.length - 1, w = m && s, p = f && c, C = h === 0 && f, x = h === u.length - 1 && m;
|
|
1021
|
+
t[a] = {
|
|
1022
|
+
sticky: w || p,
|
|
1023
|
+
left: w ? o[a] : void 0,
|
|
1024
|
+
right: p ? o[a] : void 0,
|
|
1025
|
+
type: w ? "first-group" : p ? "last-group" : void 0,
|
|
1026
|
+
isFirstColumnInLastGroup: C,
|
|
1027
|
+
isLastColumnInFirstGroup: x
|
|
1315
1028
|
};
|
|
1316
1029
|
});
|
|
1317
|
-
});
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1030
|
+
}), t;
|
|
1031
|
+
}, to = (e, t) => ({
|
|
1032
|
+
setSelectedIds: (n) => X(
|
|
1033
|
+
M(e, "selectedIds"),
|
|
1034
|
+
t.selectedIds.setSelectedIds(n)
|
|
1035
|
+
),
|
|
1036
|
+
clearSelection: () => X(
|
|
1037
|
+
M(e, "selectedIds"),
|
|
1038
|
+
t.selectedIds.clearSelectedIds()
|
|
1039
|
+
),
|
|
1040
|
+
expandByIds: (n) => X(
|
|
1041
|
+
M(e, "expandedRows"),
|
|
1042
|
+
t.expandedRows.setSelectedIds(n)
|
|
1043
|
+
),
|
|
1044
|
+
collapseAll: () => X(
|
|
1045
|
+
M(e, "expandedRows"),
|
|
1046
|
+
t.expandedRows.clearSelectedIds()
|
|
1047
|
+
),
|
|
1048
|
+
sortBy: (n, o) => X(
|
|
1049
|
+
M(e, "sortOrder"),
|
|
1050
|
+
t.sortOrder.sortBy(n, o != null ? o : !1)
|
|
1051
|
+
),
|
|
1052
|
+
clearSortOrder: () => X(
|
|
1053
|
+
M(e, "sortOrder"),
|
|
1054
|
+
t.sortOrder.clearSortOrder()
|
|
1055
|
+
),
|
|
1056
|
+
setLastSelectedId: (n) => X(
|
|
1057
|
+
M(e, "fields"),
|
|
1058
|
+
t.fields.setEntityFields({ lastSelectedId: n })
|
|
1059
|
+
)
|
|
1060
|
+
}), no = (e, t = at()) => {
|
|
1061
|
+
const [n, o] = It(
|
|
1062
|
+
An(e),
|
|
1063
|
+
t
|
|
1064
|
+
), s = v(
|
|
1065
|
+
() => to(
|
|
1066
|
+
e,
|
|
1067
|
+
Pn()
|
|
1068
|
+
),
|
|
1069
|
+
[e]
|
|
1070
|
+
);
|
|
1339
1071
|
return {
|
|
1340
|
-
tableContext
|
|
1072
|
+
tableContext: v(
|
|
1073
|
+
() => ({
|
|
1074
|
+
dispatch: o,
|
|
1075
|
+
actions: s,
|
|
1076
|
+
state: n
|
|
1077
|
+
}),
|
|
1078
|
+
[n, s, o]
|
|
1079
|
+
)
|
|
1341
1080
|
};
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
return
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
}
|
|
1355
|
-
const
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
const
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
return 1;
|
|
1371
|
-
}
|
|
1372
|
-
if (isBothOfType(a, b, "number")) {
|
|
1373
|
-
return Number(a) - Number(b);
|
|
1374
|
-
}
|
|
1375
|
-
if (isBothOfType(a, b, "boolean")) {
|
|
1376
|
-
return Number(b) - Number(a);
|
|
1377
|
-
}
|
|
1378
|
-
if (isBothOfType(a, b, "string")) {
|
|
1379
|
-
return String(a).localeCompare(String(b));
|
|
1380
|
-
}
|
|
1381
|
-
if (a instanceof Date && b instanceof Date) {
|
|
1382
|
-
return a.getTime() - b.getTime();
|
|
1383
|
-
}
|
|
1384
|
-
return 0;
|
|
1385
|
-
};
|
|
1386
|
-
const isBothOfType = (a, b, type) => typeof a === type && typeof b === type;
|
|
1387
|
-
const useColumnValueResolver = (columnId) => {
|
|
1388
|
-
const { columns } = useStandardTableConfig();
|
|
1389
|
-
if (!columnId) {
|
|
1390
|
-
return void 0;
|
|
1391
|
-
}
|
|
1392
|
-
const column = columns[columnId];
|
|
1393
|
-
if (!column) {
|
|
1394
|
-
return void 0;
|
|
1395
|
-
}
|
|
1396
|
-
return column.itemValueResolver;
|
|
1397
|
-
};
|
|
1398
|
-
const StandardTableRowCheckbox = React.memo(function StandardTableRowCheckbox2({
|
|
1399
|
-
value,
|
|
1400
|
-
onValueChange,
|
|
1401
|
-
colIndex,
|
|
1402
|
-
rowIndex,
|
|
1403
|
-
numRows,
|
|
1404
|
-
disabled,
|
|
1405
|
-
onValueChangeAndShift,
|
|
1406
|
-
shiftPressedRef
|
|
1081
|
+
}, oo = (e) => (e.rowIndent ? 2 : 0) + (e.enableExpandCollapse ? 1 : 0) + (e.showRowCheckbox ? 1 : 0) + ro(e), ro = (e) => {
|
|
1082
|
+
var t, n;
|
|
1083
|
+
return "columnGroupOrder" in e ? e.columnGroupOrder.reduce((o, s) => {
|
|
1084
|
+
var l, i, d;
|
|
1085
|
+
const c = (l = e.columnGroups) == null ? void 0 : l[s];
|
|
1086
|
+
return o + ((d = (i = c == null ? void 0 : c.columnOrder) == null ? void 0 : i.length) != null ? d : 0);
|
|
1087
|
+
}, 0) : (n = (t = e.columnOrder) == null ? void 0 : t.length) != null ? n : 0;
|
|
1088
|
+
}, so = "_standardTable_1iok0_1", co = "_relaxed_1iok0_37", lo = "_condensed_1iok0_41", io = "_compact_1iok0_45", Ve = {
|
|
1089
|
+
standardTable: so,
|
|
1090
|
+
relaxed: co,
|
|
1091
|
+
condensed: lo,
|
|
1092
|
+
compact: io
|
|
1093
|
+
}, ao = (e, t) => e != null && t == null ? -1 : e == null && t != null ? 1 : Ce(e, t, "number") ? Number(e) - Number(t) : Ce(e, t, "boolean") ? Number(t) - Number(e) : Ce(e, t, "string") ? String(e).localeCompare(String(t)) : e instanceof Date && t instanceof Date ? e.getTime() - t.getTime() : 0, Ce = (e, t, n) => typeof e === n && typeof t === n, uo = (e) => {
|
|
1094
|
+
const { columns: t } = R();
|
|
1095
|
+
if (!e)
|
|
1096
|
+
return;
|
|
1097
|
+
const n = t[e];
|
|
1098
|
+
if (!!n)
|
|
1099
|
+
return n.itemValueResolver;
|
|
1100
|
+
}, ho = T.memo(function({
|
|
1101
|
+
value: t,
|
|
1102
|
+
onValueChange: n,
|
|
1103
|
+
colIndex: o,
|
|
1104
|
+
rowIndex: s,
|
|
1105
|
+
numRows: c,
|
|
1106
|
+
disabled: l,
|
|
1107
|
+
onValueChangeAndShift: i,
|
|
1108
|
+
shiftPressedRef: d
|
|
1407
1109
|
}) {
|
|
1408
|
-
const
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
})
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
const internalOnValueChange = useCallback((value2) => {
|
|
1421
|
-
if (shiftPressedRef.current) {
|
|
1422
|
-
onValueChangeAndShift == null ? void 0 : onValueChangeAndShift(value2);
|
|
1423
|
-
} else {
|
|
1424
|
-
onValueChange == null ? void 0 : onValueChange(value2);
|
|
1425
|
-
}
|
|
1426
|
-
}, [onValueChange, onValueChangeAndShift, shiftPressedRef]);
|
|
1427
|
-
return /* @__PURE__ */ jsx(Checkbox, {
|
|
1110
|
+
const u = ut(), a = Re(), h = he(Boolean(t), {
|
|
1111
|
+
colIndex: o,
|
|
1112
|
+
numCols: u,
|
|
1113
|
+
numRows: c,
|
|
1114
|
+
rowIndex: s,
|
|
1115
|
+
tableId: a
|
|
1116
|
+
}), {
|
|
1117
|
+
requiredProps: m
|
|
1118
|
+
} = h, f = I((w) => {
|
|
1119
|
+
d.current ? i == null || i(w) : n == null || n(w);
|
|
1120
|
+
}, [n, i, d]);
|
|
1121
|
+
return /* @__PURE__ */ r(Ue, {
|
|
1428
1122
|
size: "small",
|
|
1429
|
-
disabled,
|
|
1430
|
-
value,
|
|
1431
|
-
onValueChange:
|
|
1432
|
-
...
|
|
1123
|
+
disabled: l,
|
|
1124
|
+
value: t,
|
|
1125
|
+
onValueChange: f,
|
|
1126
|
+
...m
|
|
1433
1127
|
});
|
|
1434
|
-
})
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
const
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
const idList = getIdsBetweenSelected(idListForEnabledItems, lastSelectedId, itemKey);
|
|
1467
|
-
if (idList == null ? void 0 : idList.length) {
|
|
1468
|
-
if (isSelected) {
|
|
1469
|
-
removeMultiple(idList);
|
|
1470
|
-
} else {
|
|
1471
|
-
addMultiple(idList);
|
|
1472
|
-
}
|
|
1473
|
-
} else {
|
|
1474
|
-
toggle(itemKey);
|
|
1475
|
-
}
|
|
1476
|
-
} else {
|
|
1477
|
-
toggle(itemKey);
|
|
1478
|
-
}
|
|
1479
|
-
dispatch(setLastSelectedId(itemKey));
|
|
1128
|
+
}), po = (e, t, n) => {
|
|
1129
|
+
if (t == null || n == null || e == null || t === n)
|
|
1130
|
+
return;
|
|
1131
|
+
const o = e.indexOf(t), s = e.indexOf(n);
|
|
1132
|
+
if (o < 0 || s < 0)
|
|
1133
|
+
return;
|
|
1134
|
+
const c = Math.min(o, s), l = Math.max(o, s);
|
|
1135
|
+
return e.slice(c, l + 1);
|
|
1136
|
+
}, mo = (e, t) => {
|
|
1137
|
+
const { keyResolver: n } = R(), {
|
|
1138
|
+
selectedIds: { selectedIds: o },
|
|
1139
|
+
fields: { lastSelectedId: s }
|
|
1140
|
+
} = Y(), {
|
|
1141
|
+
actions: { setSelectedIds: c, setLastSelectedId: l },
|
|
1142
|
+
dispatch: i
|
|
1143
|
+
} = se(), d = v(() => n(e), [n, e]), u = v(
|
|
1144
|
+
() => o.includes(d),
|
|
1145
|
+
[o, d]
|
|
1146
|
+
), { toggle: a, addMultiple: h, removeMultiple: m } = qe(
|
|
1147
|
+
o,
|
|
1148
|
+
(p) => i(c(p))
|
|
1149
|
+
), f = I(() => {
|
|
1150
|
+
if (t && s) {
|
|
1151
|
+
const p = po(
|
|
1152
|
+
t,
|
|
1153
|
+
s,
|
|
1154
|
+
d
|
|
1155
|
+
);
|
|
1156
|
+
p != null && p.length ? u ? m(p) : h(p) : a(d);
|
|
1157
|
+
} else
|
|
1158
|
+
a(d);
|
|
1159
|
+
i(l(d));
|
|
1480
1160
|
}, [
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
])
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
dispatch(setLastSelectedId(itemKey));
|
|
1494
|
-
}, [toggle, itemKey, dispatch, setLastSelectedId]);
|
|
1161
|
+
t,
|
|
1162
|
+
s,
|
|
1163
|
+
i,
|
|
1164
|
+
l,
|
|
1165
|
+
d,
|
|
1166
|
+
u,
|
|
1167
|
+
m,
|
|
1168
|
+
h,
|
|
1169
|
+
a
|
|
1170
|
+
]), w = I(() => {
|
|
1171
|
+
a(d), i(l(d));
|
|
1172
|
+
}, [a, d, i, l]);
|
|
1495
1173
|
return {
|
|
1496
|
-
isSelected,
|
|
1497
|
-
toggleSelected,
|
|
1498
|
-
shiftAndToggleSelected
|
|
1174
|
+
isSelected: u,
|
|
1175
|
+
toggleSelected: w,
|
|
1176
|
+
shiftAndToggleSelected: f
|
|
1499
1177
|
};
|
|
1500
|
-
}
|
|
1501
|
-
const
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
} =
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
const toggleRowExpanded = useCallback(() => {
|
|
1514
|
-
toggle(itemKey);
|
|
1515
|
-
}, [toggle, itemKey]);
|
|
1178
|
+
}, Pe = (e) => {
|
|
1179
|
+
const { keyResolver: t } = R(), {
|
|
1180
|
+
expandedRows: { selectedIds: n }
|
|
1181
|
+
} = Y(), {
|
|
1182
|
+
actions: { expandByIds: o },
|
|
1183
|
+
dispatch: s
|
|
1184
|
+
} = se(), c = v(() => t(e), [t, e]), l = v(
|
|
1185
|
+
() => n.includes(c),
|
|
1186
|
+
[n, c]
|
|
1187
|
+
), { toggle: i } = qe(
|
|
1188
|
+
n,
|
|
1189
|
+
(u) => s(o(u))
|
|
1190
|
+
);
|
|
1516
1191
|
return {
|
|
1517
|
-
toggleRowExpanded
|
|
1518
|
-
|
|
1192
|
+
toggleRowExpanded: I(() => {
|
|
1193
|
+
i(c);
|
|
1194
|
+
}, [i, c]),
|
|
1195
|
+
isExpanded: l
|
|
1519
1196
|
};
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
rowIndex
|
|
1197
|
+
}, fo = function({
|
|
1198
|
+
item: e,
|
|
1199
|
+
colIndex: t,
|
|
1200
|
+
numRows: n,
|
|
1201
|
+
rowIndex: o
|
|
1526
1202
|
}) {
|
|
1527
|
-
const
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
const {
|
|
1543
|
-
toggleRowExpanded,
|
|
1544
|
-
isExpanded
|
|
1545
|
-
} = useExpandCollapseActions(item);
|
|
1546
|
-
const buttonDisabled = useMemo(() => {
|
|
1547
|
-
if (!expandCollapseDisableResolver) {
|
|
1548
|
-
return false;
|
|
1549
|
-
}
|
|
1550
|
-
return expandCollapseDisableResolver(item);
|
|
1551
|
-
}, [expandCollapseDisableResolver, item]);
|
|
1552
|
-
return /* @__PURE__ */ jsx(Row, {
|
|
1203
|
+
const s = ut(), c = Re(), l = he(!0, {
|
|
1204
|
+
colIndex: t,
|
|
1205
|
+
numCols: s,
|
|
1206
|
+
numRows: n,
|
|
1207
|
+
rowIndex: o,
|
|
1208
|
+
tableId: c
|
|
1209
|
+
}), {
|
|
1210
|
+
requiredProps: i
|
|
1211
|
+
} = l, {
|
|
1212
|
+
expandCollapseDisableResolver: d
|
|
1213
|
+
} = R(), {
|
|
1214
|
+
toggleRowExpanded: u,
|
|
1215
|
+
isExpanded: a
|
|
1216
|
+
} = Pe(e), h = v(() => d ? d(e) : !1, [d, e]);
|
|
1217
|
+
return /* @__PURE__ */ r(E, {
|
|
1553
1218
|
alignItems: "center",
|
|
1554
1219
|
justifyContent: "center",
|
|
1555
|
-
indent:
|
|
1556
|
-
children: !
|
|
1220
|
+
indent: !0,
|
|
1221
|
+
children: !h && /* @__PURE__ */ r(xe, {
|
|
1557
1222
|
size: "small",
|
|
1558
|
-
leftIcon:
|
|
1559
|
-
onClick:
|
|
1560
|
-
...
|
|
1223
|
+
leftIcon: a ? Ze : Je,
|
|
1224
|
+
onClick: u,
|
|
1225
|
+
...i
|
|
1561
1226
|
})
|
|
1562
1227
|
});
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
const { background, backgroundResolver } =
|
|
1568
|
-
return
|
|
1569
|
-
}
|
|
1570
|
-
const
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
};
|
|
1585
|
-
const formatColumnIdToHeaderCellLabel = (columnId) => upperFirst(lowerCase(columnId));
|
|
1586
|
-
const standardTableCell = "_standardTableCell_1xzcm_1";
|
|
1587
|
-
var styles$2 = {
|
|
1588
|
-
standardTableCell
|
|
1589
|
-
};
|
|
1590
|
-
const StandardTableCellUi = React.memo(function StandardTableCellUi2({
|
|
1591
|
-
enableGridCell,
|
|
1592
|
-
children,
|
|
1593
|
-
background,
|
|
1594
|
-
gridCellRequiredProps,
|
|
1595
|
-
isEditing,
|
|
1596
|
-
justifyContent,
|
|
1597
|
-
onKeyDown,
|
|
1598
|
-
width,
|
|
1599
|
-
minWidth
|
|
1228
|
+
}, wo = (e, t, n) => e ? e(t) : n, yt = (e, t, n) => v(
|
|
1229
|
+
() => wo(e, t, n),
|
|
1230
|
+
[e, t, n]
|
|
1231
|
+
), Co = (e, t) => {
|
|
1232
|
+
const { background: n, backgroundResolver: o } = ce(e);
|
|
1233
|
+
return yt(o, t, n);
|
|
1234
|
+
}, _e = (e, t) => {
|
|
1235
|
+
const { background: n, backgroundResolver: o } = e != null ? e : {};
|
|
1236
|
+
return yt(o, t, n);
|
|
1237
|
+
}, vo = (e) => e == null ? "" : e instanceof Date ? e.toISOString() : typeof e == "object" ? JSON.stringify(e) : String(e), yo = (e) => Yt(Qt(e)), xo = "_standardTableCell_1xzcm_1", go = {
|
|
1238
|
+
standardTableCell: xo
|
|
1239
|
+
}, bo = T.memo(function({
|
|
1240
|
+
enableGridCell: t,
|
|
1241
|
+
children: n,
|
|
1242
|
+
background: o,
|
|
1243
|
+
gridCellRequiredProps: s,
|
|
1244
|
+
isEditing: c,
|
|
1245
|
+
justifyContent: l,
|
|
1246
|
+
onKeyDown: i,
|
|
1247
|
+
width: d,
|
|
1248
|
+
minWidth: u
|
|
1600
1249
|
}) {
|
|
1601
|
-
return /* @__PURE__ */
|
|
1602
|
-
width,
|
|
1603
|
-
minWidth,
|
|
1250
|
+
return /* @__PURE__ */ r(E, {
|
|
1251
|
+
width: d,
|
|
1252
|
+
minWidth: u,
|
|
1604
1253
|
height: "inherit",
|
|
1605
|
-
background,
|
|
1254
|
+
background: o,
|
|
1606
1255
|
overflow: "hidden",
|
|
1607
|
-
onKeyDown,
|
|
1608
|
-
children: /* @__PURE__ */
|
|
1256
|
+
onKeyDown: i,
|
|
1257
|
+
children: /* @__PURE__ */ r(E, {
|
|
1609
1258
|
border: "1px solid transparent",
|
|
1610
|
-
className:
|
|
1259
|
+
className: go.standardTableCell,
|
|
1611
1260
|
width: "100%",
|
|
1612
1261
|
height: "100%",
|
|
1613
|
-
justifyContent,
|
|
1262
|
+
justifyContent: l,
|
|
1614
1263
|
alignItems: "center",
|
|
1615
|
-
borderRadius:
|
|
1616
|
-
focusBorder:
|
|
1617
|
-
hoverBorder:
|
|
1618
|
-
...
|
|
1619
|
-
children
|
|
1264
|
+
borderRadius: t ? "4px" : void 0,
|
|
1265
|
+
focusBorder: t && !c ? "1px solid var(--swui-primary-action-color)" : void 0,
|
|
1266
|
+
hoverBorder: t && !c ? "1px solid var(--lhds-color-ui-300)" : void 0,
|
|
1267
|
+
...t ? s : void 0,
|
|
1268
|
+
children: n
|
|
1620
1269
|
})
|
|
1621
1270
|
});
|
|
1622
|
-
})
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
};
|
|
1627
|
-
const TextCell = React.memo(function TextCell2({
|
|
1628
|
-
label
|
|
1271
|
+
}), ko = "_textCell_1yv6v_1", So = {
|
|
1272
|
+
textCell: ko
|
|
1273
|
+
}, Io = T.memo(function({
|
|
1274
|
+
label: t
|
|
1629
1275
|
}) {
|
|
1630
|
-
return /* @__PURE__ */
|
|
1276
|
+
return /* @__PURE__ */ r(N, {
|
|
1631
1277
|
overflow: "hidden",
|
|
1632
|
-
children: /* @__PURE__ */
|
|
1633
|
-
className:
|
|
1634
|
-
title:
|
|
1635
|
-
children:
|
|
1278
|
+
children: /* @__PURE__ */ r(U, {
|
|
1279
|
+
className: So.textCell,
|
|
1280
|
+
title: t,
|
|
1281
|
+
children: t
|
|
1636
1282
|
})
|
|
1637
1283
|
});
|
|
1638
|
-
})
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
disableBorderLeft
|
|
1284
|
+
}), Eo = T.memo(function({
|
|
1285
|
+
columnId: t,
|
|
1286
|
+
item: n,
|
|
1287
|
+
colIndex: o,
|
|
1288
|
+
rowIndex: s,
|
|
1289
|
+
numRows: c,
|
|
1290
|
+
borderFromGroup: l,
|
|
1291
|
+
disableBorderLeft: i
|
|
1647
1292
|
}) {
|
|
1648
|
-
var
|
|
1649
|
-
const {
|
|
1650
|
-
keyResolver,
|
|
1651
|
-
enableGridCell,
|
|
1652
|
-
gridCellOptions: gridCellOptionsForTable
|
|
1653
|
-
} = useStandardTableConfig();
|
|
1654
|
-
const selectedIds = useStandardTableState().selectedIds.selectedIds;
|
|
1655
|
-
const tableId = useStandardTableId();
|
|
1656
|
-
const onKeyDownTable = useOnKeyDownContext();
|
|
1293
|
+
var Ae;
|
|
1657
1294
|
const {
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
if (columnId in item) {
|
|
1686
|
-
return item[columnId];
|
|
1687
|
-
}
|
|
1688
|
-
return "";
|
|
1689
|
-
}, [itemValueResolver, item, columnId]);
|
|
1690
|
-
const label = useMemo(() => itemLabelFormatter ? itemLabelFormatter(itemValue, item) : formatValueLabel(itemValue), [itemValue, itemLabelFormatter, item]);
|
|
1691
|
-
const editable = typeof isEditable === "boolean" ? isEditable : isEditable ? isEditable(item) : void 0;
|
|
1692
|
-
const onKeyDownHandler = useCallback((ev) => {
|
|
1693
|
-
onKeyDownCell == null ? void 0 : onKeyDownCell(ev, {
|
|
1694
|
-
columnId,
|
|
1695
|
-
item
|
|
1696
|
-
});
|
|
1697
|
-
onKeyDownTable == null ? void 0 : onKeyDownTable(ev, {
|
|
1698
|
-
columnId,
|
|
1699
|
-
item
|
|
1295
|
+
keyResolver: d,
|
|
1296
|
+
enableGridCell: u,
|
|
1297
|
+
gridCellOptions: a
|
|
1298
|
+
} = R(), h = Y().selectedIds.selectedIds, m = Re(), f = Ln(), {
|
|
1299
|
+
numNavigableColumns: w
|
|
1300
|
+
} = vt(), p = Ge(), C = v(() => d(n), [n, d]), x = v(() => h.indexOf(C) >= 0, [C, h]), {
|
|
1301
|
+
itemValueResolver: b,
|
|
1302
|
+
itemLabelFormatter: S,
|
|
1303
|
+
width: y,
|
|
1304
|
+
minWidth: A,
|
|
1305
|
+
justifyContentCell: k = "flex-start",
|
|
1306
|
+
borderLeft: L,
|
|
1307
|
+
renderCell: O,
|
|
1308
|
+
gridCellOptions: z,
|
|
1309
|
+
isEditable: D,
|
|
1310
|
+
onChange: j,
|
|
1311
|
+
onKeyDown: K,
|
|
1312
|
+
disableGridCell: H,
|
|
1313
|
+
disableGridCellFocus: le,
|
|
1314
|
+
zIndex: W
|
|
1315
|
+
} = ce(t), q = v(() => b ? b(n) : t in n ? n[t] : "", [b, n, t]), Q = v(() => S ? S(q, n) : vo(q), [q, S, n]), ee = typeof D == "boolean" ? D : D ? D(n) : void 0, me = I((ae) => {
|
|
1316
|
+
K == null || K(ae, {
|
|
1317
|
+
columnId: t,
|
|
1318
|
+
item: n
|
|
1319
|
+
}), f == null || f(ae, {
|
|
1320
|
+
columnId: t,
|
|
1321
|
+
item: n
|
|
1700
1322
|
});
|
|
1701
|
-
}, [
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
...
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
itemKey
|
|
1725
|
-
}) : /* @__PURE__ */ jsx(TextCell, {
|
|
1726
|
-
label
|
|
1727
|
-
}), [renderCell, label, itemValue, item, gridCell, editable, isSelected, currentZIndex, itemKey]);
|
|
1728
|
-
const activeBorderLeft = getCellBorder(borderFromGroup, disableBorderLeft, borderLeft);
|
|
1729
|
-
const shadow = stickyProps.sticky && stickyProps.type === "last-group" && stickyProps.isFirstColumnInLastGroup ? "var(--swui-sticky-column-shadow-left)" : stickyProps.sticky && stickyProps.type === "column" && stickyProps.right ? "var(--swui-sticky-column-shadow-left)" : stickyProps.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0;
|
|
1730
|
-
return /* @__PURE__ */ jsx("td", {
|
|
1323
|
+
}, [f, t, n, K]), J = he(Q, {
|
|
1324
|
+
colIndex: o,
|
|
1325
|
+
rowIndex: s,
|
|
1326
|
+
numRows: c,
|
|
1327
|
+
numCols: w,
|
|
1328
|
+
tableId: m,
|
|
1329
|
+
isEditable: ee,
|
|
1330
|
+
onChange: j ? (ae) => j(n, ae) : void 0,
|
|
1331
|
+
...a,
|
|
1332
|
+
...z
|
|
1333
|
+
}), P = p[t], ie = (Ae = Co(t, n)) != null ? Ae : "inherit", fe = P.sticky ? W != null ? W : "var(--swui-sticky-column-z-index)" : W != null ? W : 1, bt = v(() => O ? O({
|
|
1334
|
+
label: Q,
|
|
1335
|
+
value: q,
|
|
1336
|
+
item: n,
|
|
1337
|
+
gridCell: J,
|
|
1338
|
+
isEditable: ee,
|
|
1339
|
+
isSelected: x,
|
|
1340
|
+
zIndex: fe,
|
|
1341
|
+
itemKey: C
|
|
1342
|
+
}) : /* @__PURE__ */ r(Io, {
|
|
1343
|
+
label: Q
|
|
1344
|
+
}), [O, Q, q, n, J, ee, x, fe, C]), kt = Oe(l, i, L), St = P.sticky && P.type === "last-group" && P.isFirstColumnInLastGroup || P.sticky && P.type === "column" && P.right ? "var(--swui-sticky-column-shadow-left)" : P.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0;
|
|
1345
|
+
return /* @__PURE__ */ r("td", {
|
|
1731
1346
|
style: {
|
|
1732
|
-
borderLeft:
|
|
1733
|
-
position:
|
|
1734
|
-
left:
|
|
1735
|
-
right:
|
|
1736
|
-
boxShadow:
|
|
1737
|
-
zIndex:
|
|
1347
|
+
borderLeft: kt,
|
|
1348
|
+
position: P.sticky ? "sticky" : void 0,
|
|
1349
|
+
left: P.sticky ? P.left : void 0,
|
|
1350
|
+
right: P.sticky ? P.right : void 0,
|
|
1351
|
+
boxShadow: St,
|
|
1352
|
+
zIndex: fe,
|
|
1738
1353
|
height: "var(--current-row-height)",
|
|
1739
|
-
background
|
|
1354
|
+
background: ie
|
|
1740
1355
|
},
|
|
1741
|
-
children: /* @__PURE__ */
|
|
1742
|
-
enableGridCell:
|
|
1743
|
-
gridCellRequiredProps:
|
|
1744
|
-
isEditing:
|
|
1745
|
-
width,
|
|
1746
|
-
minWidth,
|
|
1747
|
-
justifyContent:
|
|
1748
|
-
onKeyDown:
|
|
1749
|
-
children:
|
|
1356
|
+
children: /* @__PURE__ */ r(bo, {
|
|
1357
|
+
enableGridCell: u && !H && !le,
|
|
1358
|
+
gridCellRequiredProps: J.requiredProps,
|
|
1359
|
+
isEditing: J.isEditing,
|
|
1360
|
+
width: y,
|
|
1361
|
+
minWidth: A,
|
|
1362
|
+
justifyContent: k,
|
|
1363
|
+
onKeyDown: me,
|
|
1364
|
+
children: bt
|
|
1750
1365
|
})
|
|
1751
1366
|
});
|
|
1752
|
-
})
|
|
1753
|
-
|
|
1754
|
-
item
|
|
1367
|
+
}), Ro = function({
|
|
1368
|
+
item: t
|
|
1755
1369
|
}) {
|
|
1756
1370
|
const {
|
|
1757
|
-
renderRowExpansion,
|
|
1758
|
-
enableExpandCollapse
|
|
1759
|
-
} =
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
return /* @__PURE__ */ jsx(Fragment, {
|
|
1766
|
-
children: enableExpandCollapse && renderRowExpansion && isExpanded && /* @__PURE__ */ jsx("tr", {
|
|
1371
|
+
renderRowExpansion: n,
|
|
1372
|
+
enableExpandCollapse: o
|
|
1373
|
+
} = R(), {
|
|
1374
|
+
isExpanded: s,
|
|
1375
|
+
toggleRowExpanded: c
|
|
1376
|
+
} = Pe(t), l = Te();
|
|
1377
|
+
return /* @__PURE__ */ r(G, {
|
|
1378
|
+
children: o && n && s && /* @__PURE__ */ r("tr", {
|
|
1767
1379
|
style: {
|
|
1768
|
-
borderLeft:
|
|
1769
|
-
background:
|
|
1380
|
+
borderLeft: et,
|
|
1381
|
+
background: Qe
|
|
1770
1382
|
},
|
|
1771
|
-
children: /* @__PURE__ */
|
|
1772
|
-
colSpan:
|
|
1773
|
-
children:
|
|
1774
|
-
onRequestCollapse:
|
|
1383
|
+
children: /* @__PURE__ */ r("td", {
|
|
1384
|
+
colSpan: l,
|
|
1385
|
+
children: n(t, {
|
|
1386
|
+
onRequestCollapse: c
|
|
1775
1387
|
})
|
|
1776
1388
|
})
|
|
1777
1389
|
})
|
|
1778
1390
|
});
|
|
1779
|
-
}
|
|
1780
|
-
const TrWithHoverBackground = styled.tr`
|
|
1391
|
+
}, xt = en.tr`
|
|
1781
1392
|
${({
|
|
1782
|
-
focusBackground
|
|
1783
|
-
}) =>
|
|
1393
|
+
focusBackground: e
|
|
1394
|
+
}) => e ? `--focus-within-background: ${e};` : ""}
|
|
1784
1395
|
${({
|
|
1785
|
-
borderLeft
|
|
1786
|
-
}) =>
|
|
1396
|
+
borderLeft: e
|
|
1397
|
+
}) => e ? `border-left: ${e};` : ""};
|
|
1787
1398
|
${({
|
|
1788
|
-
background
|
|
1789
|
-
}) =>
|
|
1399
|
+
background: e
|
|
1400
|
+
}) => e ? `background: ${e};` : ""};
|
|
1790
1401
|
${({
|
|
1791
|
-
height
|
|
1792
|
-
}) =>
|
|
1402
|
+
height: e
|
|
1403
|
+
}) => e ? `height: ${e};` : ""};
|
|
1793
1404
|
${({
|
|
1794
|
-
hoverBackground
|
|
1795
|
-
}) =>
|
|
1796
|
-
background: ${
|
|
1405
|
+
hoverBackground: e
|
|
1406
|
+
}) => e ? ` &:hover {
|
|
1407
|
+
background: ${e};
|
|
1797
1408
|
}
|
|
1798
1409
|
` : ""}
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
shiftPressedRef
|
|
1410
|
+
`, Go = T.memo(function({
|
|
1411
|
+
item: t,
|
|
1412
|
+
idListForEnabledItems: n,
|
|
1413
|
+
rowIndex: o,
|
|
1414
|
+
numRows: s,
|
|
1415
|
+
colIndexOffset: c,
|
|
1416
|
+
alwaysVisible: l,
|
|
1417
|
+
shiftPressedRef: i
|
|
1808
1418
|
}) {
|
|
1809
|
-
const
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
} =
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
isExpanded
|
|
1828
|
-
} = useExpandCollapseActions(item);
|
|
1829
|
-
const {
|
|
1830
|
-
isSelected,
|
|
1831
|
-
toggleSelected,
|
|
1832
|
-
shiftAndToggleSelected
|
|
1833
|
-
} = useRowCheckbox(item, idListForEnabledItems);
|
|
1834
|
-
const visible = useOnScreen(trRef, {
|
|
1419
|
+
const d = te(null), u = Te(), {
|
|
1420
|
+
stickyCheckboxColumn: a
|
|
1421
|
+
} = R(), h = Z(), {
|
|
1422
|
+
columnIndexPerColumnId: m
|
|
1423
|
+
} = vt(), {
|
|
1424
|
+
showRowCheckbox: f,
|
|
1425
|
+
rowBackgroundResolver: w,
|
|
1426
|
+
checkboxDisabledResolver: p,
|
|
1427
|
+
enableGridCell: C,
|
|
1428
|
+
rowIndent: x,
|
|
1429
|
+
enableExpandCollapse: b
|
|
1430
|
+
} = R(), {
|
|
1431
|
+
isExpanded: S
|
|
1432
|
+
} = Pe(t), {
|
|
1433
|
+
isSelected: y,
|
|
1434
|
+
toggleSelected: A,
|
|
1435
|
+
shiftAndToggleSelected: k
|
|
1436
|
+
} = mo(t, n), L = At(d, {
|
|
1835
1437
|
rootMargin: "400px 0px 400px 0px",
|
|
1836
1438
|
threshold: 0
|
|
1837
|
-
})
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
const hoverBackground = getHoverBackgroundColor(resolvedBackgroundResult, isSelected, isExpanded);
|
|
1841
|
-
const focusBackground = getFocusBackgroundColor(resolvedBackgroundResult, isSelected, hoverBackground);
|
|
1842
|
-
const disabled = useMemo(() => checkboxDisabledResolver == null ? void 0 : checkboxDisabledResolver(item), [item, checkboxDisabledResolver]);
|
|
1843
|
-
const firstColumn = useFirstColumnConfig();
|
|
1844
|
-
const firstColumnBackground = useCellBackgroundByColumnConfig(firstColumn, item);
|
|
1845
|
-
const lastColumn = useLastColumnConfig();
|
|
1846
|
-
const lastColumnBackground = useCellBackgroundByColumnConfig(lastColumn, item);
|
|
1847
|
-
const content = useMemo(() => /* @__PURE__ */ jsx(Fragment, {
|
|
1848
|
-
children: /* @__PURE__ */ jsxs(Fragment, {
|
|
1849
|
-
children: [rowIndent && /* @__PURE__ */ jsx("td", {
|
|
1439
|
+
}), O = v(() => w == null ? void 0 : w(t, y), [y, t, w]), z = To(O, y, S), D = Oo(O, y, S), j = Po(O, y, D), K = v(() => p == null ? void 0 : p(t), [t, p]), H = zn(), le = _e(H, t), W = Kn(), q = _e(W, t), Q = v(() => /* @__PURE__ */ r(G, {
|
|
1440
|
+
children: /* @__PURE__ */ g(G, {
|
|
1441
|
+
children: [x && /* @__PURE__ */ r("td", {
|
|
1850
1442
|
style: {
|
|
1851
|
-
background:
|
|
1443
|
+
background: le
|
|
1852
1444
|
},
|
|
1853
|
-
children: /* @__PURE__ */
|
|
1854
|
-
num:
|
|
1445
|
+
children: /* @__PURE__ */ r(N, {
|
|
1446
|
+
num: x
|
|
1855
1447
|
})
|
|
1856
|
-
}),
|
|
1448
|
+
}), b && /* @__PURE__ */ r("td", {
|
|
1857
1449
|
style: {
|
|
1858
|
-
background:
|
|
1859
|
-
position:
|
|
1860
|
-
left:
|
|
1861
|
-
boxShadow:
|
|
1862
|
-
zIndex:
|
|
1450
|
+
background: a ? "inherit" : void 0,
|
|
1451
|
+
position: a ? "sticky" : void 0,
|
|
1452
|
+
left: a ? "0px" : void 0,
|
|
1453
|
+
boxShadow: a ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
1454
|
+
zIndex: a ? "var(--swui-sticky-column-z-index)" : void 0
|
|
1863
1455
|
},
|
|
1864
|
-
children: /* @__PURE__ */
|
|
1456
|
+
children: /* @__PURE__ */ r(E, {
|
|
1865
1457
|
width: "var(--swui-expand-cell-width)",
|
|
1866
1458
|
minWidth: "var(--swui-expand-cell-width)",
|
|
1867
1459
|
alignItems: "center",
|
|
1868
1460
|
justifyContent: "center",
|
|
1869
|
-
children: /* @__PURE__ */
|
|
1870
|
-
colIndex:
|
|
1871
|
-
rowIndex:
|
|
1872
|
-
numRows:
|
|
1873
|
-
item
|
|
1461
|
+
children: /* @__PURE__ */ r(fo, {
|
|
1462
|
+
colIndex: c,
|
|
1463
|
+
rowIndex: C ? o : 0,
|
|
1464
|
+
numRows: C ? s : 0,
|
|
1465
|
+
item: t
|
|
1874
1466
|
})
|
|
1875
1467
|
})
|
|
1876
|
-
}),
|
|
1468
|
+
}), f && /* @__PURE__ */ r("td", {
|
|
1877
1469
|
style: {
|
|
1878
|
-
background:
|
|
1879
|
-
position:
|
|
1880
|
-
left:
|
|
1470
|
+
background: a ? "inherit" : void 0,
|
|
1471
|
+
position: a ? "sticky" : void 0,
|
|
1472
|
+
left: b && a ? "var(--swui-expand-cell-width)" : a ? "0px" : void 0,
|
|
1881
1473
|
textAlign: "center",
|
|
1882
|
-
boxShadow:
|
|
1883
|
-
zIndex:
|
|
1474
|
+
boxShadow: a ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
1475
|
+
zIndex: a ? "var(--swui-sticky-column-z-index)" : void 0
|
|
1884
1476
|
},
|
|
1885
|
-
children: /* @__PURE__ */
|
|
1477
|
+
children: /* @__PURE__ */ r(E, {
|
|
1886
1478
|
width: "var(--swui-checkbox-cell-width)",
|
|
1887
1479
|
minWidth: "var(--swui-checkbox-cell-width)",
|
|
1888
1480
|
alignItems: "center",
|
|
1889
1481
|
justifyContent: "center",
|
|
1890
|
-
children: /* @__PURE__ */
|
|
1891
|
-
disabled,
|
|
1892
|
-
value:
|
|
1893
|
-
onValueChange:
|
|
1894
|
-
onValueChangeAndShift:
|
|
1895
|
-
colIndex:
|
|
1896
|
-
rowIndex,
|
|
1897
|
-
numRows,
|
|
1898
|
-
shiftPressedRef
|
|
1482
|
+
children: /* @__PURE__ */ r(ho, {
|
|
1483
|
+
disabled: K,
|
|
1484
|
+
value: y,
|
|
1485
|
+
onValueChange: A,
|
|
1486
|
+
onValueChangeAndShift: k,
|
|
1487
|
+
colIndex: c + (b ? 1 : 0),
|
|
1488
|
+
rowIndex: o,
|
|
1489
|
+
numRows: s,
|
|
1490
|
+
shiftPressedRef: i
|
|
1899
1491
|
})
|
|
1900
1492
|
})
|
|
1901
|
-
}),
|
|
1902
|
-
groupConfig,
|
|
1903
|
-
groupId
|
|
1904
|
-
},
|
|
1905
|
-
children:
|
|
1906
|
-
columnId,
|
|
1907
|
-
item,
|
|
1908
|
-
colIndex:
|
|
1909
|
-
rowIndex,
|
|
1910
|
-
numRows,
|
|
1911
|
-
borderFromGroup:
|
|
1912
|
-
disableBorderLeft:
|
|
1913
|
-
},
|
|
1914
|
-
},
|
|
1493
|
+
}), h.map(({
|
|
1494
|
+
groupConfig: ee,
|
|
1495
|
+
groupId: me
|
|
1496
|
+
}, J) => /* @__PURE__ */ r(T.Fragment, {
|
|
1497
|
+
children: ee.columnOrder.map((P, ie) => /* @__PURE__ */ r(Eo, {
|
|
1498
|
+
columnId: P,
|
|
1499
|
+
item: t,
|
|
1500
|
+
colIndex: c + m[P],
|
|
1501
|
+
rowIndex: o,
|
|
1502
|
+
numRows: s,
|
|
1503
|
+
borderFromGroup: pe(J, ie, ee.borderLeft),
|
|
1504
|
+
disableBorderLeft: J === 0 && ie === 0
|
|
1505
|
+
}, P))
|
|
1506
|
+
}, me)), x && /* @__PURE__ */ r("td", {
|
|
1915
1507
|
style: {
|
|
1916
|
-
background:
|
|
1508
|
+
background: q
|
|
1917
1509
|
},
|
|
1918
|
-
children: /* @__PURE__ */
|
|
1919
|
-
num:
|
|
1510
|
+
children: /* @__PURE__ */ r(N, {
|
|
1511
|
+
num: x
|
|
1920
1512
|
})
|
|
1921
|
-
}), /* @__PURE__ */
|
|
1513
|
+
}), /* @__PURE__ */ r("td", {})]
|
|
1922
1514
|
})
|
|
1923
|
-
}), [
|
|
1924
|
-
return /* @__PURE__ */
|
|
1925
|
-
children: [/* @__PURE__ */
|
|
1926
|
-
hoverBackground,
|
|
1927
|
-
background,
|
|
1928
|
-
focusBackground,
|
|
1929
|
-
borderLeft:
|
|
1930
|
-
ref:
|
|
1931
|
-
children:
|
|
1932
|
-
colSpan:
|
|
1515
|
+
}), [c, m, K, b, C, le, h, y, t, q, s, x, o, k, i, f, a, A]);
|
|
1516
|
+
return /* @__PURE__ */ g(G, {
|
|
1517
|
+
children: [/* @__PURE__ */ r(xt, {
|
|
1518
|
+
hoverBackground: D,
|
|
1519
|
+
background: z,
|
|
1520
|
+
focusBackground: j,
|
|
1521
|
+
borderLeft: S ? et : ke,
|
|
1522
|
+
ref: d,
|
|
1523
|
+
children: L || l || S ? Q : /* @__PURE__ */ r("td", {
|
|
1524
|
+
colSpan: u,
|
|
1933
1525
|
style: {
|
|
1934
1526
|
height: "var(--current-row-height)"
|
|
1935
1527
|
}
|
|
1936
1528
|
})
|
|
1937
|
-
}), /* @__PURE__ */
|
|
1938
|
-
item
|
|
1529
|
+
}), /* @__PURE__ */ r(Ro, {
|
|
1530
|
+
item: t
|
|
1939
1531
|
})]
|
|
1940
1532
|
});
|
|
1941
|
-
})
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
const getHoverBackgroundColor = (resolvedBackground, isSelected, isExpanded) => {
|
|
1955
|
-
if (resolvedBackground) {
|
|
1956
|
-
return typeof resolvedBackground === "string" ? resolvedBackground : resolvedBackground == null ? void 0 : resolvedBackground.hoverBackground;
|
|
1957
|
-
}
|
|
1958
|
-
if (isSelected) {
|
|
1959
|
-
return cssColor("--lhds-color-blue-100");
|
|
1960
|
-
}
|
|
1961
|
-
if (isExpanded) {
|
|
1962
|
-
return tableBackgroundHoverColorExpanded;
|
|
1963
|
-
}
|
|
1964
|
-
return cssColor("--lhds-color-ui-100");
|
|
1965
|
-
};
|
|
1966
|
-
const getFocusBackgroundColor = (resolvedBackground, isSelected, hoverBackground) => {
|
|
1967
|
-
if (isSelected) {
|
|
1968
|
-
return cssColor("--lhds-color-blue-100");
|
|
1969
|
-
}
|
|
1970
|
-
if (resolvedBackground) {
|
|
1971
|
-
return hoverBackground;
|
|
1972
|
-
}
|
|
1973
|
-
return void 0;
|
|
1974
|
-
};
|
|
1975
|
-
const isSummaryRowVisible = (columns) => Object.values(columns).some((columnConfig) => columnHasSummaryCell(columnConfig));
|
|
1976
|
-
const columnHasSummaryCell = (columnConfig) => Boolean(columnConfig.renderSummaryCell || columnConfig.summaryText);
|
|
1977
|
-
const summaryRow = "_summaryRow_12x8k_1";
|
|
1978
|
-
var styles = {
|
|
1979
|
-
summaryRow
|
|
1980
|
-
};
|
|
1981
|
-
const SummaryCell = React.memo(function SummaryCell2({
|
|
1982
|
-
columnId,
|
|
1983
|
-
items,
|
|
1984
|
-
disableBorderLeft,
|
|
1985
|
-
borderFromGroup,
|
|
1986
|
-
colSpan
|
|
1533
|
+
}), To = (e, t, n) => e ? typeof e == "string" ? e : e == null ? void 0 : e.background : t ? _("--lhds-color-blue-100") : n ? Qe : "white", Oo = (e, t, n) => e ? typeof e == "string" ? e : e == null ? void 0 : e.hoverBackground : t ? _("--lhds-color-blue-100") : n ? sn : _("--lhds-color-ui-100"), Po = (e, t, n) => {
|
|
1534
|
+
if (t)
|
|
1535
|
+
return _("--lhds-color-blue-100");
|
|
1536
|
+
if (e)
|
|
1537
|
+
return n;
|
|
1538
|
+
}, Ao = (e) => Object.values(e).some((t) => Lo(t)), Lo = (e) => Boolean(e.renderSummaryCell || e.summaryText), Bo = "_summaryRow_12x8k_1", Do = {
|
|
1539
|
+
summaryRow: Bo
|
|
1540
|
+
}, No = T.memo(function({
|
|
1541
|
+
columnId: t,
|
|
1542
|
+
items: n,
|
|
1543
|
+
disableBorderLeft: o,
|
|
1544
|
+
borderFromGroup: s,
|
|
1545
|
+
colSpan: c
|
|
1987
1546
|
}) {
|
|
1988
|
-
const
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
}), [items, summaryText]);
|
|
2005
|
-
const renderResult = useMemo(() => renderSummaryCell == null ? void 0 : renderSummaryCell({
|
|
2006
|
-
items,
|
|
2007
|
-
text
|
|
2008
|
-
}), [items, renderSummaryCell, text]);
|
|
2009
|
-
return /* @__PURE__ */ jsx("td", {
|
|
2010
|
-
colSpan,
|
|
1547
|
+
const l = Ge(), {
|
|
1548
|
+
renderSummaryCell: i,
|
|
1549
|
+
summaryText: d,
|
|
1550
|
+
borderLeft: u,
|
|
1551
|
+
zIndex: a,
|
|
1552
|
+
width: h,
|
|
1553
|
+
minWidth: m,
|
|
1554
|
+
justifyContentCell: f
|
|
1555
|
+
} = ce(t), w = Oe(s, o, u), p = l[t], C = p.sticky ? a != null ? a : "var(--swui-sticky-column-z-index)" : a != null ? a : 1, x = p.sticky && p.type === "last-group" && p.isFirstColumnInLastGroup || p.sticky && p.type === "column" && p.right ? "var(--swui-sticky-column-shadow-left)" : p.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0, b = v(() => d == null ? void 0 : d({
|
|
1556
|
+
items: n
|
|
1557
|
+
}), [n, d]), S = v(() => i == null ? void 0 : i({
|
|
1558
|
+
items: n,
|
|
1559
|
+
text: b
|
|
1560
|
+
}), [n, i, b]);
|
|
1561
|
+
return /* @__PURE__ */ r("td", {
|
|
1562
|
+
colSpan: c,
|
|
2011
1563
|
style: {
|
|
2012
|
-
borderLeft:
|
|
2013
|
-
position:
|
|
2014
|
-
left:
|
|
2015
|
-
right:
|
|
2016
|
-
boxShadow:
|
|
2017
|
-
zIndex:
|
|
1564
|
+
borderLeft: w,
|
|
1565
|
+
position: p.sticky ? "sticky" : void 0,
|
|
1566
|
+
left: p.sticky ? p.left : void 0,
|
|
1567
|
+
right: p.sticky ? p.right : void 0,
|
|
1568
|
+
boxShadow: x,
|
|
1569
|
+
zIndex: C,
|
|
2018
1570
|
height: "var(--current-row-height)"
|
|
2019
1571
|
},
|
|
2020
|
-
children: /* @__PURE__ */
|
|
2021
|
-
width,
|
|
2022
|
-
minWidth,
|
|
1572
|
+
children: /* @__PURE__ */ r(E, {
|
|
1573
|
+
width: h,
|
|
1574
|
+
minWidth: m,
|
|
2023
1575
|
height: "inherit",
|
|
2024
1576
|
overflow: "hidden",
|
|
2025
|
-
justifyContent:
|
|
1577
|
+
justifyContent: f,
|
|
2026
1578
|
alignItems: "center",
|
|
2027
|
-
children:
|
|
2028
|
-
children: /* @__PURE__ */
|
|
1579
|
+
children: i ? S : /* @__PURE__ */ r(N, {
|
|
1580
|
+
children: /* @__PURE__ */ r(U, {
|
|
2029
1581
|
variant: "bold",
|
|
2030
|
-
children:
|
|
1582
|
+
children: b
|
|
2031
1583
|
})
|
|
2032
1584
|
})
|
|
2033
1585
|
})
|
|
2034
1586
|
});
|
|
2035
|
-
})
|
|
2036
|
-
const
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
const StandardTableSummaryRow = React.memo(function StandardTableSummaryRow2({
|
|
2050
|
-
items
|
|
1587
|
+
}), zo = (e, t) => {
|
|
1588
|
+
const n = [];
|
|
1589
|
+
for (let o = 0; o < e.length; o++) {
|
|
1590
|
+
const { summaryCellColSpan: s } = t[e[o]], c = Math.min(
|
|
1591
|
+
s != null ? s : 1,
|
|
1592
|
+
e.length - o
|
|
1593
|
+
);
|
|
1594
|
+
n.push({ columnId: e[o], colSpan: c });
|
|
1595
|
+
const l = s != null ? s : 1;
|
|
1596
|
+
l > 1 && (o += l - 1);
|
|
1597
|
+
}
|
|
1598
|
+
return n;
|
|
1599
|
+
}, Ko = T.memo(function({
|
|
1600
|
+
items: t
|
|
2051
1601
|
}) {
|
|
2052
|
-
const
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
num: rowIndent
|
|
1602
|
+
const n = Z(), {
|
|
1603
|
+
showRowCheckbox: o,
|
|
1604
|
+
enableExpandCollapse: s,
|
|
1605
|
+
columns: c,
|
|
1606
|
+
rowIndent: l
|
|
1607
|
+
} = R();
|
|
1608
|
+
return /* @__PURE__ */ g("tr", {
|
|
1609
|
+
className: Do.summaryRow,
|
|
1610
|
+
children: [l && /* @__PURE__ */ r("td", {
|
|
1611
|
+
children: /* @__PURE__ */ r(N, {
|
|
1612
|
+
num: l
|
|
2064
1613
|
})
|
|
2065
|
-
}),
|
|
2066
|
-
groupConfig,
|
|
2067
|
-
groupId
|
|
2068
|
-
},
|
|
2069
|
-
children:
|
|
2070
|
-
columnId,
|
|
2071
|
-
colSpan
|
|
2072
|
-
},
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
1614
|
+
}), s && /* @__PURE__ */ r("td", {}), o && /* @__PURE__ */ r("td", {}), n.map(({
|
|
1615
|
+
groupConfig: i,
|
|
1616
|
+
groupId: d
|
|
1617
|
+
}, u) => /* @__PURE__ */ r(T.Fragment, {
|
|
1618
|
+
children: zo(i.columnOrder, c).map(({
|
|
1619
|
+
columnId: a,
|
|
1620
|
+
colSpan: h
|
|
1621
|
+
}, m) => /* @__PURE__ */ r(No, {
|
|
1622
|
+
colSpan: h,
|
|
1623
|
+
columnId: a,
|
|
1624
|
+
items: t,
|
|
1625
|
+
borderFromGroup: pe(u, m, i.borderLeft),
|
|
1626
|
+
disableBorderLeft: u === 0 && m === 0
|
|
1627
|
+
}, a))
|
|
1628
|
+
}, d)), l && /* @__PURE__ */ r("td", {
|
|
1629
|
+
children: /* @__PURE__ */ r(N, {
|
|
1630
|
+
num: l
|
|
2080
1631
|
})
|
|
2081
|
-
}
|
|
2082
|
-
children: /* @__PURE__ */ jsx(Indent, {
|
|
2083
|
-
num: rowIndent
|
|
2084
|
-
})
|
|
2085
|
-
}), /* @__PURE__ */ jsx("td", {})]
|
|
1632
|
+
}), /* @__PURE__ */ r("td", {})]
|
|
2086
1633
|
});
|
|
2087
|
-
})
|
|
2088
|
-
|
|
2089
|
-
items
|
|
1634
|
+
}), Ho = function({
|
|
1635
|
+
items: t
|
|
2090
1636
|
}) {
|
|
2091
1637
|
const {
|
|
2092
|
-
columns
|
|
2093
|
-
} =
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
};
|
|
2102
|
-
const filterItemsOnEnabledCheckboxes = (checkboxDisabledResolver) => (item) => (checkboxDisabledResolver == null ? void 0 : checkboxDisabledResolver(item)) ? false : true;
|
|
2103
|
-
const StandardTableRowList = React.memo(function StandardTableRowList2({
|
|
2104
|
-
items,
|
|
2105
|
-
colIndexOffset = 0,
|
|
2106
|
-
rowIndexOffset = 0
|
|
1638
|
+
columns: n
|
|
1639
|
+
} = R();
|
|
1640
|
+
return v(() => Ao(n), [n]) ? /* @__PURE__ */ r(Ko, {
|
|
1641
|
+
items: t
|
|
1642
|
+
}) : null;
|
|
1643
|
+
}, gt = (e) => (t) => !(e != null && e(t)), $o = T.memo(function({
|
|
1644
|
+
items: t,
|
|
1645
|
+
colIndexOffset: n = 0,
|
|
1646
|
+
rowIndexOffset: o = 0
|
|
2107
1647
|
}) {
|
|
2108
|
-
const
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
checkboxDisabledResolver
|
|
2114
|
-
} = useStandardTableConfig();
|
|
2115
|
-
const {
|
|
1648
|
+
const s = te(0), c = te(!1), {
|
|
1649
|
+
keyResolver: l,
|
|
1650
|
+
disableInfiniteList: i,
|
|
1651
|
+
checkboxDisabledResolver: d
|
|
1652
|
+
} = R(), {
|
|
2116
1653
|
sortOrder: {
|
|
2117
|
-
sortBy,
|
|
2118
|
-
desc
|
|
1654
|
+
sortBy: u,
|
|
1655
|
+
desc: a
|
|
2119
1656
|
}
|
|
2120
|
-
} =
|
|
2121
|
-
|
|
2122
|
-
const sortedItems = useMemo(() => {
|
|
2123
|
-
if (!items || !items.length) {
|
|
1657
|
+
} = Y(), h = uo(u), m = v(() => {
|
|
1658
|
+
if (!t || !t.length)
|
|
2124
1659
|
return [];
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
sortCounterRef.current++;
|
|
2136
|
-
}
|
|
2137
|
-
return sortedList;
|
|
2138
|
-
}, [items, valueResolver, desc, disableInfiniteList]);
|
|
2139
|
-
const idListForEnabledItems = useMemo(() => sortedItems.filter(filterItemsOnEnabledCheckboxes(checkboxDisabledResolver)).map((l) => keyResolver(l)), [sortedItems, checkboxDisabledResolver, keyResolver]);
|
|
2140
|
-
useEffect(() => {
|
|
2141
|
-
const keyUp = (ev) => {
|
|
2142
|
-
if (ev.key === "Shift") {
|
|
2143
|
-
shiftPressedRef.current = false;
|
|
2144
|
-
}
|
|
1660
|
+
if (!h)
|
|
1661
|
+
return t;
|
|
1662
|
+
const w = [...t];
|
|
1663
|
+
return w.sort((p, C) => ao(h(p), h(C))), a && w.reverse(), i || s.current++, w;
|
|
1664
|
+
}, [t, h, a, i]), f = v(() => m.filter(gt(d)).map((w) => l(w)), [m, d, l]);
|
|
1665
|
+
return je(() => {
|
|
1666
|
+
const w = (C) => {
|
|
1667
|
+
C.key === "Shift" && (c.current = !1);
|
|
1668
|
+
}, p = (C) => {
|
|
1669
|
+
C.key === "Shift" && (c.current = !0);
|
|
2145
1670
|
};
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
shiftPressedRef.current = true;
|
|
2149
|
-
}
|
|
2150
|
-
};
|
|
2151
|
-
document.addEventListener("keyup", keyUp);
|
|
2152
|
-
document.addEventListener("keydown", keyDown);
|
|
2153
|
-
return () => {
|
|
2154
|
-
document.removeEventListener("keyup", keyUp);
|
|
2155
|
-
document.removeEventListener("keydown", keyDown);
|
|
1671
|
+
return document.addEventListener("keyup", w), document.addEventListener("keydown", p), () => {
|
|
1672
|
+
document.removeEventListener("keyup", w), document.removeEventListener("keydown", p);
|
|
2156
1673
|
};
|
|
2157
|
-
}, [])
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
items: sortedItems
|
|
1674
|
+
}, []), /* @__PURE__ */ g(T.Fragment, {
|
|
1675
|
+
children: [m.map((w, p) => /* @__PURE__ */ r(Go, {
|
|
1676
|
+
alwaysVisible: i || m.length < 30,
|
|
1677
|
+
item: w,
|
|
1678
|
+
idListForEnabledItems: f,
|
|
1679
|
+
colIndexOffset: n,
|
|
1680
|
+
rowIndex: p + o,
|
|
1681
|
+
numRows: m.length,
|
|
1682
|
+
shiftPressedRef: c
|
|
1683
|
+
}, l(w))), /* @__PURE__ */ r(Ho, {
|
|
1684
|
+
items: m
|
|
2169
1685
|
})]
|
|
2170
|
-
},
|
|
2171
|
-
})
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
errorLabel
|
|
1686
|
+
}, s.current);
|
|
1687
|
+
}), Mo = T.memo(function({
|
|
1688
|
+
error: t,
|
|
1689
|
+
bannerError: n,
|
|
1690
|
+
loading: o,
|
|
1691
|
+
items: s,
|
|
1692
|
+
noItemsLabel: c = "There is no data available.",
|
|
1693
|
+
noItemsContentRight: l,
|
|
1694
|
+
noItemsContentBottom: i,
|
|
1695
|
+
noItemsHeader: d,
|
|
1696
|
+
colIndexOffset: u,
|
|
1697
|
+
rowIndexOffset: a,
|
|
1698
|
+
variant: h,
|
|
1699
|
+
errorLabel: m
|
|
2185
1700
|
}) {
|
|
2186
|
-
var
|
|
2187
|
-
const
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
children: /* @__PURE__ */
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
variant: "error"
|
|
2201
|
-
})
|
|
1701
|
+
var w;
|
|
1702
|
+
const f = Te();
|
|
1703
|
+
return n ? /* @__PURE__ */ r("tbody", {
|
|
1704
|
+
children: /* @__PURE__ */ r("tr", {
|
|
1705
|
+
children: /* @__PURE__ */ r("td", {
|
|
1706
|
+
colSpan: f,
|
|
1707
|
+
children: /* @__PURE__ */ r(we, {
|
|
1708
|
+
num: 4,
|
|
1709
|
+
justifyContent: "center",
|
|
1710
|
+
children: /* @__PURE__ */ r(ne, {
|
|
1711
|
+
alignItems: "center",
|
|
1712
|
+
children: /* @__PURE__ */ r(Tt, {
|
|
1713
|
+
bannerState: n,
|
|
1714
|
+
variant: "error"
|
|
2202
1715
|
})
|
|
2203
1716
|
})
|
|
2204
1717
|
})
|
|
2205
1718
|
})
|
|
2206
|
-
})
|
|
2207
|
-
}
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
children: /* @__PURE__ */
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
children: /* @__PURE__ */
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
headerText: (_a = error ? error.message : errorLabel) != null ? _a : "Unknown error",
|
|
2220
|
-
variant: "error"
|
|
2221
|
-
})
|
|
1719
|
+
})
|
|
1720
|
+
}) : t || m ? /* @__PURE__ */ r("tbody", {
|
|
1721
|
+
children: /* @__PURE__ */ r("tr", {
|
|
1722
|
+
children: /* @__PURE__ */ r("td", {
|
|
1723
|
+
colSpan: f,
|
|
1724
|
+
children: /* @__PURE__ */ r(we, {
|
|
1725
|
+
num: 4,
|
|
1726
|
+
justifyContent: "center",
|
|
1727
|
+
children: /* @__PURE__ */ r(ne, {
|
|
1728
|
+
alignItems: "center",
|
|
1729
|
+
children: /* @__PURE__ */ r(Le, {
|
|
1730
|
+
headerText: (w = t ? t.message : m) != null ? w : "Unknown error",
|
|
1731
|
+
variant: "error"
|
|
2222
1732
|
})
|
|
2223
1733
|
})
|
|
2224
1734
|
})
|
|
2225
1735
|
})
|
|
2226
|
-
})
|
|
2227
|
-
}
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
children: /* @__PURE__ */
|
|
2232
|
-
|
|
2233
|
-
children: /* @__PURE__ */
|
|
2234
|
-
num: 4,
|
|
2235
|
-
children: /* @__PURE__ */ jsx(LoadingScreen, {})
|
|
2236
|
-
})
|
|
1736
|
+
})
|
|
1737
|
+
}) : o ? /* @__PURE__ */ r("tbody", {
|
|
1738
|
+
children: /* @__PURE__ */ r("tr", {
|
|
1739
|
+
children: /* @__PURE__ */ r("td", {
|
|
1740
|
+
colSpan: f,
|
|
1741
|
+
children: /* @__PURE__ */ r(we, {
|
|
1742
|
+
num: 4,
|
|
1743
|
+
children: /* @__PURE__ */ r(Zt, {})
|
|
2237
1744
|
})
|
|
2238
1745
|
})
|
|
2239
|
-
})
|
|
2240
|
-
}
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
children: /* @__PURE__ */
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
variant: "info",
|
|
2254
|
-
children: noItemsContentBottom
|
|
2255
|
-
})
|
|
1746
|
+
})
|
|
1747
|
+
}) : !s || !s.length ? /* @__PURE__ */ r("tbody", {
|
|
1748
|
+
children: /* @__PURE__ */ r("tr", {
|
|
1749
|
+
children: /* @__PURE__ */ r("td", {
|
|
1750
|
+
colSpan: f,
|
|
1751
|
+
children: /* @__PURE__ */ r(E, {
|
|
1752
|
+
spacing: 4,
|
|
1753
|
+
justifyContent: "center",
|
|
1754
|
+
children: /* @__PURE__ */ r(Le, {
|
|
1755
|
+
text: c,
|
|
1756
|
+
headerText: d,
|
|
1757
|
+
contentRight: l,
|
|
1758
|
+
variant: "info",
|
|
1759
|
+
children: i
|
|
2256
1760
|
})
|
|
2257
1761
|
})
|
|
2258
1762
|
})
|
|
2259
|
-
})
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
rowIndexOffset
|
|
1763
|
+
})
|
|
1764
|
+
}) : /* @__PURE__ */ r("tbody", {
|
|
1765
|
+
children: /* @__PURE__ */ r($o, {
|
|
1766
|
+
variant: h,
|
|
1767
|
+
items: s,
|
|
1768
|
+
colIndexOffset: u,
|
|
1769
|
+
rowIndexOffset: a
|
|
2267
1770
|
})
|
|
2268
1771
|
});
|
|
2269
|
-
})
|
|
2270
|
-
const
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
const onClickCheckbox = useCallback(() => {
|
|
2282
|
-
if (items) {
|
|
2283
|
-
if (selectionIsEmpty) {
|
|
2284
|
-
dispatch(setSelectedIds(items.filter(filterItemsOnEnabledCheckboxes(checkboxDisabledResolver)).map((item) => keyResolver(item))));
|
|
2285
|
-
} else {
|
|
2286
|
-
dispatch(clearSelection());
|
|
2287
|
-
}
|
|
2288
|
-
}
|
|
1772
|
+
}), Vo = (e) => {
|
|
1773
|
+
const { keyResolver: t, checkboxDisabledResolver: n } = R(), {
|
|
1774
|
+
selectedIds: { selectedIds: o }
|
|
1775
|
+
} = Y(), {
|
|
1776
|
+
actions: { setSelectedIds: s, clearSelection: c },
|
|
1777
|
+
dispatch: l
|
|
1778
|
+
} = se(), i = o.length === 0, d = e ? e.length > 0 && o.length === e.length : !1, u = I(() => {
|
|
1779
|
+
e && l(
|
|
1780
|
+
i ? s(
|
|
1781
|
+
e.filter(gt(n)).map((a) => t(a))
|
|
1782
|
+
) : c()
|
|
1783
|
+
);
|
|
2289
1784
|
}, [
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
1785
|
+
e,
|
|
1786
|
+
i,
|
|
1787
|
+
l,
|
|
1788
|
+
s,
|
|
1789
|
+
n,
|
|
1790
|
+
t,
|
|
1791
|
+
c
|
|
2297
1792
|
]);
|
|
2298
1793
|
return {
|
|
2299
|
-
selectionIsEmpty,
|
|
2300
|
-
allItemsAreSelected,
|
|
2301
|
-
onClickCheckbox
|
|
1794
|
+
selectionIsEmpty: i,
|
|
1795
|
+
allItemsAreSelected: d,
|
|
1796
|
+
onClickCheckbox: u
|
|
2302
1797
|
};
|
|
2303
|
-
}
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
dispatch
|
|
2312
|
-
} = useStandardTableActions();
|
|
2313
|
-
const allItemsAreExpanded = !items ? false : items.length > 0 && selectedIds.length === items.length;
|
|
2314
|
-
const toggleExpanded = useCallback(() => {
|
|
2315
|
-
if (items) {
|
|
2316
|
-
if (allItemsAreExpanded) {
|
|
2317
|
-
dispatch(collapseAll());
|
|
2318
|
-
} else {
|
|
2319
|
-
dispatch(expandByIds(items.map((item) => keyResolver(item))));
|
|
2320
|
-
}
|
|
2321
|
-
}
|
|
1798
|
+
}, _o = (e) => {
|
|
1799
|
+
const { keyResolver: t } = R(), {
|
|
1800
|
+
expandedRows: { selectedIds: n }
|
|
1801
|
+
} = Y(), {
|
|
1802
|
+
actions: { collapseAll: o, expandByIds: s },
|
|
1803
|
+
dispatch: c
|
|
1804
|
+
} = se(), l = e ? e.length > 0 && n.length === e.length : !1, i = I(() => {
|
|
1805
|
+
e && c(l ? o() : s(e.map((d) => t(d))));
|
|
2322
1806
|
}, [
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
1807
|
+
l,
|
|
1808
|
+
o,
|
|
1809
|
+
c,
|
|
1810
|
+
e,
|
|
1811
|
+
t,
|
|
1812
|
+
s
|
|
2329
1813
|
]);
|
|
2330
1814
|
return {
|
|
2331
|
-
allItemsAreExpanded,
|
|
2332
|
-
toggleExpanded
|
|
1815
|
+
allItemsAreExpanded: l,
|
|
1816
|
+
toggleExpanded: i
|
|
2333
1817
|
};
|
|
2334
|
-
}
|
|
2335
|
-
const
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
return useMemo(() => {
|
|
2341
|
-
const selected = columnId === sortBy;
|
|
1818
|
+
}, jo = (e) => {
|
|
1819
|
+
const { dispatch: t, actions: n } = se(), {
|
|
1820
|
+
sortOrder: { desc: o, sortBy: s }
|
|
1821
|
+
} = Y();
|
|
1822
|
+
return v(() => {
|
|
1823
|
+
const c = e === s;
|
|
2342
1824
|
return {
|
|
2343
|
-
arrow:
|
|
2344
|
-
selected,
|
|
2345
|
-
desc,
|
|
1825
|
+
arrow: c ? o ? "up" : "down" : void 0,
|
|
1826
|
+
selected: c,
|
|
1827
|
+
desc: o,
|
|
2346
1828
|
onClickColumnHead: () => {
|
|
2347
|
-
|
|
1829
|
+
t(n.sortBy(e, c ? !o : !1));
|
|
2348
1830
|
}
|
|
2349
1831
|
};
|
|
2350
|
-
}, [
|
|
2351
|
-
}
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
top
|
|
1832
|
+
}, [s, o, n, e, t]);
|
|
1833
|
+
}, Wo = T.memo(function({
|
|
1834
|
+
columnId: t,
|
|
1835
|
+
borderFromGroup: n,
|
|
1836
|
+
disableBorderLeft: o,
|
|
1837
|
+
stickyHeader: s,
|
|
1838
|
+
top: c
|
|
2358
1839
|
}) {
|
|
2359
1840
|
const {
|
|
2360
|
-
justifyContentHeader,
|
|
2361
|
-
columnLabel,
|
|
2362
|
-
borderLeft,
|
|
2363
|
-
infoIconTooltipText,
|
|
2364
|
-
background,
|
|
2365
|
-
zIndex,
|
|
2366
|
-
sortOrderIconVariant,
|
|
2367
|
-
width,
|
|
2368
|
-
minWidth
|
|
2369
|
-
} =
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
onClickColumnHead
|
|
2378
|
-
} = useTableSortHeader(columnId);
|
|
2379
|
-
const label = typeof columnLabel === "string" ? columnLabel : formatColumnIdToHeaderCellLabel(columnId);
|
|
2380
|
-
const activeBorderLeft = getCellBorder(borderFromGroup, disableBorderLeft, borderLeft);
|
|
2381
|
-
const stickyProps = stickyPropsPerColumnContext[columnId];
|
|
2382
|
-
return /* @__PURE__ */ jsx("th", {
|
|
1841
|
+
justifyContentHeader: l,
|
|
1842
|
+
columnLabel: i,
|
|
1843
|
+
borderLeft: d,
|
|
1844
|
+
infoIconTooltipText: u,
|
|
1845
|
+
background: a,
|
|
1846
|
+
zIndex: h,
|
|
1847
|
+
sortOrderIconVariant: m,
|
|
1848
|
+
width: f,
|
|
1849
|
+
minWidth: w
|
|
1850
|
+
} = ce(t), {
|
|
1851
|
+
disableSorting: p,
|
|
1852
|
+
sortOrderIconVariant: C
|
|
1853
|
+
} = R(), x = Ge(), {
|
|
1854
|
+
arrow: b,
|
|
1855
|
+
onClickColumnHead: S
|
|
1856
|
+
} = jo(t), y = typeof i == "string" ? i : yo(t), A = Oe(n, o, d), k = x[t];
|
|
1857
|
+
return /* @__PURE__ */ r("th", {
|
|
2383
1858
|
style: {
|
|
2384
|
-
background:
|
|
2385
|
-
borderLeft:
|
|
2386
|
-
position:
|
|
2387
|
-
left:
|
|
2388
|
-
right:
|
|
2389
|
-
top,
|
|
2390
|
-
boxShadow:
|
|
2391
|
-
zIndex:
|
|
2392
|
-
width,
|
|
2393
|
-
minWidth
|
|
1859
|
+
background: a != null ? a : "white",
|
|
1860
|
+
borderLeft: A,
|
|
1861
|
+
position: s || k.sticky ? "sticky" : void 0,
|
|
1862
|
+
left: k.left,
|
|
1863
|
+
right: k.right,
|
|
1864
|
+
top: c,
|
|
1865
|
+
boxShadow: k.sticky && k.isFirstColumnInLastGroup && s ? "var(--swui-sticky-header-shadow-and-left)" : k.sticky && k.isFirstColumnInLastGroup ? "var(--swui-sticky-column-shadow-left)" : s && k.sticky ? "var(--swui-sticky-header-shadow-and-right)" : s ? "var(--swui-sticky-header-shadow)" : k.sticky ? "var(--swui-sticky-column-shadow-right)" : void 0,
|
|
1866
|
+
zIndex: s && k.sticky ? "var(--swui-sticky-header-in-sticky-column-z-index)" : s ? "var(--swui-sticky-header-z-index)" : k.sticky ? "var(--swui-sticky-group-header-z-index)" : h,
|
|
1867
|
+
width: f,
|
|
1868
|
+
minWidth: w
|
|
2394
1869
|
},
|
|
2395
|
-
children: /* @__PURE__ */
|
|
1870
|
+
children: /* @__PURE__ */ r(Ee, {
|
|
2396
1871
|
width: "inherit",
|
|
2397
1872
|
minWidth: "inherit",
|
|
2398
|
-
arrow: !
|
|
2399
|
-
onClick:
|
|
2400
|
-
label,
|
|
2401
|
-
infoIconTooltipText,
|
|
2402
|
-
alignRight:
|
|
2403
|
-
sortOrderIconVariant:
|
|
1873
|
+
arrow: !p && y ? b : void 0,
|
|
1874
|
+
onClick: p ? void 0 : S,
|
|
1875
|
+
label: y,
|
|
1876
|
+
infoIconTooltipText: u,
|
|
1877
|
+
alignRight: l === "flex-end",
|
|
1878
|
+
sortOrderIconVariant: m != null ? m : C
|
|
2404
1879
|
})
|
|
2405
1880
|
});
|
|
2406
|
-
})
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
} else if (stickyHeader) {
|
|
1881
|
+
}), qo = (e, t, n, o) => {
|
|
1882
|
+
if (e && t !== void 0)
|
|
1883
|
+
return `calc(${e} + ${n})`;
|
|
1884
|
+
if (o && t)
|
|
1885
|
+
return `calc(0px + ${n})`;
|
|
1886
|
+
if (e)
|
|
1887
|
+
return e;
|
|
1888
|
+
if (o)
|
|
2415
1889
|
return 0;
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
const StandardTableHeadRow = React.memo(function StandardTableHeadRow2({
|
|
2420
|
-
items,
|
|
2421
|
-
height = defaultTableRowHeight
|
|
1890
|
+
}, Fo = T.memo(function({
|
|
1891
|
+
items: t,
|
|
1892
|
+
height: n = Se
|
|
2422
1893
|
}) {
|
|
2423
|
-
const
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
const stickyHeaderStyle = {
|
|
2447
|
-
zIndex: stickyHeader && stickyCheckboxColumn ? "var(--swui-sticky-header-in-sticky-column-z-index)" : stickyCheckboxColumn ? "var(--swui-sticky-group-header-z-index)" : stickyHeader ? "var(--swui-sticky-header-z-index)" : zIndex,
|
|
2448
|
-
top: getTopPosition(headerRowOffsetTop, columnGroupOrder, height, stickyHeader),
|
|
2449
|
-
background: stickyHeader || stickyCheckboxColumn ? "white" : void 0,
|
|
2450
|
-
position: stickyHeader || stickyCheckboxColumn ? "sticky" : void 0,
|
|
2451
|
-
boxShadow: stickyHeader && stickyCheckboxColumn ? "var(--swui-sticky-header-shadow-and-right)" : stickyCheckboxColumn ? "var(--swui-sticky-column-shadow-right)" : stickyHeader ? "var(--swui-sticky-header-shadow)" : void 0
|
|
1894
|
+
const o = Z(), {
|
|
1895
|
+
showHeaderCheckbox: s,
|
|
1896
|
+
showHeaderExpandCollapse: c,
|
|
1897
|
+
enableExpandCollapse: l,
|
|
1898
|
+
rowIndent: i,
|
|
1899
|
+
headerRowOffsetTop: d,
|
|
1900
|
+
zIndex: u,
|
|
1901
|
+
stickyHeader: a,
|
|
1902
|
+
stickyCheckboxColumn: h,
|
|
1903
|
+
showRowCheckbox: m
|
|
1904
|
+
} = R(), f = Dn(), {
|
|
1905
|
+
allItemsAreExpanded: w,
|
|
1906
|
+
toggleExpanded: p
|
|
1907
|
+
} = _o(t), {
|
|
1908
|
+
allItemsAreSelected: C,
|
|
1909
|
+
onClickCheckbox: x,
|
|
1910
|
+
selectionIsEmpty: b
|
|
1911
|
+
} = Vo(t), S = !t || t.length === 0, y = {
|
|
1912
|
+
zIndex: a && h ? "var(--swui-sticky-header-in-sticky-column-z-index)" : h ? "var(--swui-sticky-group-header-z-index)" : a ? "var(--swui-sticky-header-z-index)" : u,
|
|
1913
|
+
top: qo(d, f, n, a),
|
|
1914
|
+
background: a || h ? "white" : void 0,
|
|
1915
|
+
position: a || h ? "sticky" : void 0,
|
|
1916
|
+
boxShadow: a && h ? "var(--swui-sticky-header-shadow-and-right)" : h ? "var(--swui-sticky-column-shadow-right)" : a ? "var(--swui-sticky-header-shadow)" : void 0
|
|
2452
1917
|
};
|
|
2453
|
-
return /* @__PURE__ */
|
|
2454
|
-
height,
|
|
2455
|
-
borderLeft:
|
|
2456
|
-
children: [
|
|
2457
|
-
style:
|
|
2458
|
-
children: /* @__PURE__ */
|
|
2459
|
-
indent:
|
|
1918
|
+
return /* @__PURE__ */ g(xt, {
|
|
1919
|
+
height: n,
|
|
1920
|
+
borderLeft: ke,
|
|
1921
|
+
children: [i && /* @__PURE__ */ r("th", {
|
|
1922
|
+
style: y,
|
|
1923
|
+
children: /* @__PURE__ */ r(E, {
|
|
1924
|
+
indent: i
|
|
2460
1925
|
})
|
|
2461
|
-
}),
|
|
1926
|
+
}), l && /* @__PURE__ */ r("th", {
|
|
2462
1927
|
style: {
|
|
2463
|
-
...
|
|
1928
|
+
...y,
|
|
2464
1929
|
left: "0px",
|
|
2465
1930
|
textAlign: "left"
|
|
2466
1931
|
},
|
|
2467
|
-
children: /* @__PURE__ */
|
|
1932
|
+
children: /* @__PURE__ */ r(E, {
|
|
2468
1933
|
width: "var(--swui-expand-cell-width)",
|
|
2469
1934
|
minWidth: "var(--swui-expand-cell-width)",
|
|
2470
1935
|
alignItems: "center",
|
|
2471
1936
|
justifyContent: "center",
|
|
2472
|
-
children:
|
|
1937
|
+
children: c && /* @__PURE__ */ r(xe, {
|
|
2473
1938
|
size: "small",
|
|
2474
|
-
leftIcon:
|
|
2475
|
-
onClick:
|
|
1939
|
+
leftIcon: w ? Ze : Je,
|
|
1940
|
+
onClick: p
|
|
2476
1941
|
})
|
|
2477
1942
|
})
|
|
2478
|
-
}), (
|
|
1943
|
+
}), (m || s) && /* @__PURE__ */ r("th", {
|
|
2479
1944
|
style: {
|
|
2480
|
-
...
|
|
1945
|
+
...y,
|
|
2481
1946
|
overflow: "hidden",
|
|
2482
|
-
left:
|
|
1947
|
+
left: h && l ? "var(--swui-expand-cell-width)" : h ? "0px" : void 0
|
|
2483
1948
|
},
|
|
2484
|
-
children: /* @__PURE__ */
|
|
1949
|
+
children: /* @__PURE__ */ r(E, {
|
|
2485
1950
|
width: "var(--swui-checkbox-cell-width)",
|
|
2486
1951
|
minWidth: "var(--swui-checkbox-cell-width)",
|
|
2487
1952
|
alignItems: "center",
|
|
2488
1953
|
justifyContent: "center",
|
|
2489
|
-
children:
|
|
1954
|
+
children: s && /* @__PURE__ */ r(Ue, {
|
|
2490
1955
|
size: "small",
|
|
2491
|
-
disabled:
|
|
2492
|
-
value:
|
|
2493
|
-
indeterminate: !
|
|
2494
|
-
onValueChange:
|
|
1956
|
+
disabled: S,
|
|
1957
|
+
value: C,
|
|
1958
|
+
indeterminate: !b && !C,
|
|
1959
|
+
onValueChange: x
|
|
2495
1960
|
})
|
|
2496
1961
|
})
|
|
2497
|
-
}),
|
|
2498
|
-
groupConfig,
|
|
2499
|
-
groupId
|
|
2500
|
-
},
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
}), rowIndent && /* @__PURE__ */ jsx("th", {
|
|
2513
|
-
style: stickyHeaderStyle,
|
|
2514
|
-
children: /* @__PURE__ */ jsx(Row, {
|
|
2515
|
-
indent: rowIndent
|
|
1962
|
+
}), o.map(({
|
|
1963
|
+
groupConfig: A,
|
|
1964
|
+
groupId: k
|
|
1965
|
+
}, L) => /* @__PURE__ */ r(T.Fragment, {
|
|
1966
|
+
children: A.columnOrder.map((O, z) => /* @__PURE__ */ r(Wo, {
|
|
1967
|
+
columnId: O,
|
|
1968
|
+
borderFromGroup: pe(L, z, A.borderLeft),
|
|
1969
|
+
disableBorderLeft: L === 0 && z === 0,
|
|
1970
|
+
stickyHeader: a,
|
|
1971
|
+
top: y.top
|
|
1972
|
+
}, O))
|
|
1973
|
+
}, k)), i && /* @__PURE__ */ r("th", {
|
|
1974
|
+
style: y,
|
|
1975
|
+
children: /* @__PURE__ */ r(E, {
|
|
1976
|
+
indent: i
|
|
2516
1977
|
})
|
|
2517
|
-
}), /* @__PURE__ */
|
|
2518
|
-
style:
|
|
1978
|
+
}), /* @__PURE__ */ r("th", {
|
|
1979
|
+
style: y
|
|
2519
1980
|
})]
|
|
2520
1981
|
});
|
|
2521
|
-
})
|
|
2522
|
-
const
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
const rowIndent = booleanOrNumberToNumber(config.rowIndent);
|
|
2527
|
-
return /* @__PURE__ */ jsxs(Fragment, {
|
|
2528
|
-
children: [rowIndent ? /* @__PURE__ */ jsx("colgroup", {
|
|
2529
|
-
children: /* @__PURE__ */ jsx("col", {
|
|
1982
|
+
}), Uo = () => {
|
|
1983
|
+
const e = R(), t = Z(), n = e.enableExpandCollapse || e.showRowCheckbox, o = Lt(e.rowIndent);
|
|
1984
|
+
return /* @__PURE__ */ g(G, {
|
|
1985
|
+
children: [o ? /* @__PURE__ */ r("colgroup", {
|
|
1986
|
+
children: /* @__PURE__ */ r("col", {
|
|
2530
1987
|
style: {
|
|
2531
|
-
width: `calc(var(--swui-metrics-indent) * ${
|
|
1988
|
+
width: `calc(var(--swui-metrics-indent) * ${o})`
|
|
2532
1989
|
}
|
|
2533
1990
|
})
|
|
2534
|
-
}) : null,
|
|
2535
|
-
children: [
|
|
1991
|
+
}) : null, n && /* @__PURE__ */ g("colgroup", {
|
|
1992
|
+
children: [e.enableExpandCollapse && /* @__PURE__ */ r("col", {
|
|
2536
1993
|
style: {
|
|
2537
1994
|
width: "var(--swui-expand-cell-width)"
|
|
2538
1995
|
}
|
|
2539
|
-
}),
|
|
1996
|
+
}), e.showRowCheckbox && /* @__PURE__ */ r("col", {
|
|
2540
1997
|
style: {
|
|
2541
1998
|
width: "var(--swui-checkbox-cell-width)"
|
|
2542
1999
|
}
|
|
2543
2000
|
})]
|
|
2544
|
-
}),
|
|
2545
|
-
groupConfig,
|
|
2546
|
-
groupId
|
|
2547
|
-
}) => /* @__PURE__ */
|
|
2548
|
-
children:
|
|
2001
|
+
}), t.map(({
|
|
2002
|
+
groupConfig: s,
|
|
2003
|
+
groupId: c
|
|
2004
|
+
}) => /* @__PURE__ */ r("colgroup", {
|
|
2005
|
+
children: s.columnOrder.map((l) => /* @__PURE__ */ r("col", {
|
|
2549
2006
|
style: {
|
|
2550
|
-
width:
|
|
2551
|
-
minWidth:
|
|
2007
|
+
width: e.columns[l].width,
|
|
2008
|
+
minWidth: e.columns[l].minWidth
|
|
2552
2009
|
}
|
|
2553
|
-
},
|
|
2554
|
-
},
|
|
2555
|
-
children: /* @__PURE__ */
|
|
2010
|
+
}, l))
|
|
2011
|
+
}, c)), o ? /* @__PURE__ */ r("colgroup", {
|
|
2012
|
+
children: /* @__PURE__ */ r("col", {
|
|
2556
2013
|
style: {
|
|
2557
|
-
width: `calc(var(--swui-metrics-indent) * ${
|
|
2014
|
+
width: `calc(var(--swui-metrics-indent) * ${o})`
|
|
2558
2015
|
}
|
|
2559
2016
|
})
|
|
2560
2017
|
}) : null]
|
|
2561
2018
|
});
|
|
2562
|
-
}
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
...props
|
|
2019
|
+
}, Rr = function({
|
|
2020
|
+
tableContext: t,
|
|
2021
|
+
config: n,
|
|
2022
|
+
columnOrder: o,
|
|
2023
|
+
columnGroupOrder: s,
|
|
2024
|
+
tableId: c,
|
|
2025
|
+
variant: l = "standard",
|
|
2026
|
+
onKeyDown: i,
|
|
2027
|
+
...d
|
|
2572
2028
|
}) {
|
|
2573
|
-
const
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
} = currentTableContext;
|
|
2589
|
-
const actionsContext = useMemo(() => ({
|
|
2590
|
-
actions,
|
|
2591
|
-
dispatch
|
|
2592
|
-
}), [actions, dispatch]);
|
|
2593
|
-
const usingColumnGroups = Boolean(columnGroupOrder != null ? columnGroupOrder : "columnGroupOrder" in config);
|
|
2594
|
-
const columnGroupsFromConfig = "columnGroups" in config ? config.columnGroups : void 0;
|
|
2595
|
-
const columnGroupOrderFromConfig = "columnGroupOrder" in config ? config.columnGroupOrder : void 0;
|
|
2596
|
-
const columnOrderFromConfig = "columnOrder" in config ? config.columnOrder : void 0;
|
|
2597
|
-
const groupConfigsForRows = useMemo(() => createGroupConfigAndIdsForRows(columnGroupsFromConfig, columnGroupOrderFromConfig, columnOrderFromConfig), [columnGroupsFromConfig, columnGroupOrderFromConfig, columnOrderFromConfig]);
|
|
2598
|
-
const columnIndexPerColumnId = useMemo(() => calculateColumnIndexPerColumnId(config), [config]);
|
|
2599
|
-
const totalNumColumns = useMemo(() => getTotalNumColumns(config), [config]);
|
|
2600
|
-
const stickyPropsPerColumnContext = useMemo(() => getStickyPropsPerColumn(config), [config]);
|
|
2601
|
-
const validationError = useMemo(() => {
|
|
2029
|
+
const u = Et(), {
|
|
2030
|
+
initialSortOrderDesc: a,
|
|
2031
|
+
initialSortOrder: h,
|
|
2032
|
+
enableExpandCollapse: m,
|
|
2033
|
+
stickyCheckboxColumn: f
|
|
2034
|
+
} = n, {
|
|
2035
|
+
tableContext: w
|
|
2036
|
+
} = no(c != null ? c : u, at(h, a)), p = t || w, {
|
|
2037
|
+
state: C,
|
|
2038
|
+
actions: x,
|
|
2039
|
+
dispatch: b
|
|
2040
|
+
} = p, S = v(() => ({
|
|
2041
|
+
actions: x,
|
|
2042
|
+
dispatch: b
|
|
2043
|
+
}), [x, b]), y = Boolean(s != null ? s : "columnGroupOrder" in n), A = "columnGroups" in n ? n.columnGroups : void 0, k = "columnGroupOrder" in n ? n.columnGroupOrder : void 0, L = "columnOrder" in n ? n.columnOrder : void 0, O = v(() => wt(A, k, L), [A, k, L]), z = v(() => jn(n), [n]), D = v(() => oo(n), [n]), j = v(() => Yn(n), [n]), K = v(() => {
|
|
2602
2044
|
try {
|
|
2603
|
-
|
|
2604
|
-
return
|
|
2605
|
-
} catch (
|
|
2606
|
-
|
|
2607
|
-
return e;
|
|
2608
|
-
}
|
|
2609
|
-
return new Error("Unknown error");
|
|
2045
|
+
qn(n);
|
|
2046
|
+
return;
|
|
2047
|
+
} catch (H) {
|
|
2048
|
+
return H instanceof Error ? H : new Error("Unknown error");
|
|
2610
2049
|
}
|
|
2611
|
-
}, [
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
}
|
|
2617
|
-
return /* @__PURE__ */ jsx("table", {
|
|
2618
|
-
className: cx(styles$3.standardTable, styles$3[variant]),
|
|
2050
|
+
}, [n]);
|
|
2051
|
+
return K ? /* @__PURE__ */ r(Jt, {
|
|
2052
|
+
text: K.message
|
|
2053
|
+
}) : /* @__PURE__ */ r("table", {
|
|
2054
|
+
className: Fe(Ve.standardTable, Ve[l]),
|
|
2619
2055
|
style: {
|
|
2620
2056
|
width: "100%",
|
|
2621
2057
|
isolation: "isolate",
|
|
2622
|
-
"--current-left-offset":
|
|
2058
|
+
"--current-left-offset": m && f ? "calc(var(--swui-expand-cell-width) + var(--swui-checkbox-cell-width))" : f ? "var(--swui-checkbox-cell-width)" : m ? "var(--swui-expand-cell-width)" : "0px"
|
|
2623
2059
|
},
|
|
2624
|
-
children: /* @__PURE__ */
|
|
2625
|
-
value:
|
|
2626
|
-
children: /* @__PURE__ */
|
|
2627
|
-
value:
|
|
2628
|
-
children: /* @__PURE__ */
|
|
2629
|
-
value:
|
|
2630
|
-
children: /* @__PURE__ */
|
|
2631
|
-
value:
|
|
2632
|
-
children: /* @__PURE__ */
|
|
2633
|
-
value:
|
|
2634
|
-
children: /* @__PURE__ */
|
|
2635
|
-
value:
|
|
2636
|
-
children: /* @__PURE__ */
|
|
2637
|
-
value:
|
|
2638
|
-
children: /* @__PURE__ */
|
|
2639
|
-
value:
|
|
2640
|
-
children: /* @__PURE__ */
|
|
2641
|
-
value:
|
|
2642
|
-
children: /* @__PURE__ */
|
|
2643
|
-
value:
|
|
2644
|
-
children: /* @__PURE__ */
|
|
2645
|
-
value: "columnGroupOrder" in
|
|
2646
|
-
children: [/* @__PURE__ */
|
|
2647
|
-
value:
|
|
2648
|
-
children: [/* @__PURE__ */
|
|
2649
|
-
children: [(
|
|
2060
|
+
children: /* @__PURE__ */ r(mt.Provider, {
|
|
2061
|
+
value: j,
|
|
2062
|
+
children: /* @__PURE__ */ r(ft.Provider, {
|
|
2063
|
+
value: D,
|
|
2064
|
+
children: /* @__PURE__ */ r(Nn.Provider, {
|
|
2065
|
+
value: l,
|
|
2066
|
+
children: /* @__PURE__ */ r(st.Provider, {
|
|
2067
|
+
value: c != null ? c : u,
|
|
2068
|
+
children: /* @__PURE__ */ r(ct.Provider, {
|
|
2069
|
+
value: C,
|
|
2070
|
+
children: /* @__PURE__ */ r(lt.Provider, {
|
|
2071
|
+
value: S,
|
|
2072
|
+
children: /* @__PURE__ */ r(it.Provider, {
|
|
2073
|
+
value: n,
|
|
2074
|
+
children: /* @__PURE__ */ r(dt.Provider, {
|
|
2075
|
+
value: O,
|
|
2076
|
+
children: /* @__PURE__ */ r(Ct.Provider, {
|
|
2077
|
+
value: z,
|
|
2078
|
+
children: /* @__PURE__ */ r(Bn.Provider, {
|
|
2079
|
+
value: y,
|
|
2080
|
+
children: /* @__PURE__ */ g(pt.Provider, {
|
|
2081
|
+
value: "columnGroupOrder" in n ? s != null ? s : n.columnGroupOrder : s,
|
|
2082
|
+
children: [/* @__PURE__ */ r(Uo, {}), /* @__PURE__ */ g(ht.Provider, {
|
|
2083
|
+
value: i,
|
|
2084
|
+
children: [/* @__PURE__ */ g("thead", {
|
|
2085
|
+
children: [(s || "columnGroupOrder" in n) && /* @__PURE__ */ r(_n, {
|
|
2650
2086
|
height: "var(--current-row-height)"
|
|
2651
|
-
}), /* @__PURE__ */
|
|
2652
|
-
items:
|
|
2087
|
+
}), /* @__PURE__ */ r(Fo, {
|
|
2088
|
+
items: d.items,
|
|
2653
2089
|
height: "var(--current-row-height)"
|
|
2654
2090
|
})]
|
|
2655
|
-
}), /* @__PURE__ */
|
|
2656
|
-
variant,
|
|
2657
|
-
...
|
|
2091
|
+
}), /* @__PURE__ */ r(Mo, {
|
|
2092
|
+
variant: l,
|
|
2093
|
+
...d
|
|
2658
2094
|
})]
|
|
2659
2095
|
})]
|
|
2660
2096
|
})
|
|
@@ -2669,74 +2105,136 @@ const StandardTable = function StandardTable2({
|
|
|
2669
2105
|
})
|
|
2670
2106
|
})
|
|
2671
2107
|
});
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
};
|
|
2678
|
-
};
|
|
2679
|
-
const createStandardEditableTextCell = () => ({
|
|
2680
|
-
label,
|
|
2108
|
+
}, Gr = (e, t) => ({
|
|
2109
|
+
...t,
|
|
2110
|
+
itemValueResolver: e
|
|
2111
|
+
}), Tr = () => ({
|
|
2112
|
+
label: e,
|
|
2681
2113
|
gridCell: {
|
|
2682
|
-
editorValue,
|
|
2683
|
-
isEditing,
|
|
2684
|
-
setEditorValue,
|
|
2685
|
-
stopEditingAndRevert,
|
|
2686
|
-
lastKeyEvent,
|
|
2687
|
-
stopEditing,
|
|
2688
|
-
stopEditingAndMove
|
|
2689
|
-
}
|
|
2690
|
-
}) =>
|
|
2691
|
-
onValueChange:
|
|
2692
|
-
value:
|
|
2693
|
-
onDone:
|
|
2694
|
-
onEsc:
|
|
2695
|
-
autoFocus:
|
|
2696
|
-
selectAllOnMount: !
|
|
2697
|
-
onMove:
|
|
2698
|
-
}) : /* @__PURE__ */
|
|
2699
|
-
children: /* @__PURE__ */
|
|
2114
|
+
editorValue: t,
|
|
2115
|
+
isEditing: n,
|
|
2116
|
+
setEditorValue: o,
|
|
2117
|
+
stopEditingAndRevert: s,
|
|
2118
|
+
lastKeyEvent: c,
|
|
2119
|
+
stopEditing: l,
|
|
2120
|
+
stopEditingAndMove: i
|
|
2121
|
+
}
|
|
2122
|
+
}) => n ? /* @__PURE__ */ r(ge, {
|
|
2123
|
+
onValueChange: o,
|
|
2124
|
+
value: t,
|
|
2125
|
+
onDone: l,
|
|
2126
|
+
onEsc: s,
|
|
2127
|
+
autoFocus: !0,
|
|
2128
|
+
selectAllOnMount: !c,
|
|
2129
|
+
onMove: i
|
|
2130
|
+
}) : /* @__PURE__ */ r(N, {
|
|
2131
|
+
children: /* @__PURE__ */ r(U, {
|
|
2700
2132
|
color: "var(--swui-primary-action-color)",
|
|
2701
|
-
children:
|
|
2133
|
+
children: e
|
|
2702
2134
|
})
|
|
2703
|
-
})
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
item,
|
|
2135
|
+
}), Or = (e, t, n) => ({
|
|
2136
|
+
label: o,
|
|
2137
|
+
item: s,
|
|
2707
2138
|
gridCell: {
|
|
2708
|
-
editorValue,
|
|
2709
|
-
isEditing,
|
|
2710
|
-
setEditorValue,
|
|
2711
|
-
stopEditingAndRevert,
|
|
2712
|
-
lastKeyEvent,
|
|
2713
|
-
stopEditing,
|
|
2714
|
-
stopEditingAndMove
|
|
2139
|
+
editorValue: c,
|
|
2140
|
+
isEditing: l,
|
|
2141
|
+
setEditorValue: i,
|
|
2142
|
+
stopEditingAndRevert: d,
|
|
2143
|
+
lastKeyEvent: u,
|
|
2144
|
+
stopEditing: a,
|
|
2145
|
+
stopEditingAndMove: h
|
|
2715
2146
|
},
|
|
2716
|
-
isEditable
|
|
2147
|
+
isEditable: m
|
|
2717
2148
|
}) => {
|
|
2718
|
-
const
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
}) : /* @__PURE__ */ jsx(Indent, {
|
|
2730
|
-
row: true,
|
|
2149
|
+
const f = typeof e == "function" ? e(s) : e, w = t ? t(s) : void 0, p = n ? n(s) : void 0;
|
|
2150
|
+
return m && l ? /* @__PURE__ */ r(ge, {
|
|
2151
|
+
onValueChange: i,
|
|
2152
|
+
value: c,
|
|
2153
|
+
onDone: a,
|
|
2154
|
+
onEsc: d,
|
|
2155
|
+
autoFocus: !0,
|
|
2156
|
+
selectAllOnMount: !u,
|
|
2157
|
+
onMove: h
|
|
2158
|
+
}) : /* @__PURE__ */ r(N, {
|
|
2159
|
+
row: !0,
|
|
2731
2160
|
alignItems: "center",
|
|
2732
|
-
children: /* @__PURE__ */
|
|
2733
|
-
value:
|
|
2734
|
-
modifiedField,
|
|
2735
|
-
crudStatus,
|
|
2736
|
-
isEditable,
|
|
2737
|
-
warningOnEmpty:
|
|
2161
|
+
children: /* @__PURE__ */ r(tn, {
|
|
2162
|
+
value: o,
|
|
2163
|
+
modifiedField: p,
|
|
2164
|
+
crudStatus: w,
|
|
2165
|
+
isEditable: m,
|
|
2166
|
+
warningOnEmpty: f
|
|
2738
2167
|
})
|
|
2739
2168
|
});
|
|
2740
2169
|
};
|
|
2741
|
-
export {
|
|
2170
|
+
export {
|
|
2171
|
+
Ye as CrudStatusIndicator,
|
|
2172
|
+
Er as EditableTextCellWithCrudAndModified,
|
|
2173
|
+
Xe as GridHooksContext,
|
|
2174
|
+
xr as GridHooksTable,
|
|
2175
|
+
tn as ModifiedField,
|
|
2176
|
+
gr as SmallTableCell,
|
|
2177
|
+
br as SmallTableHead,
|
|
2178
|
+
Rr as StandardTable,
|
|
2179
|
+
lt as StandardTableActionsContext,
|
|
2180
|
+
Eo as StandardTableCell,
|
|
2181
|
+
bo as StandardTableCellUi,
|
|
2182
|
+
it as StandardTableConfigContext,
|
|
2183
|
+
Mo as StandardTableContent,
|
|
2184
|
+
Fo as StandardTableHeadRow,
|
|
2185
|
+
Go as StandardTableRow,
|
|
2186
|
+
ho as StandardTableRowCheckbox,
|
|
2187
|
+
$o as StandardTableRowList,
|
|
2188
|
+
ct as StandardTableStateContext,
|
|
2189
|
+
st as StandardTableTableIdContext,
|
|
2190
|
+
nn as TableCell,
|
|
2191
|
+
kr as TableColumnGroupHead,
|
|
2192
|
+
Ee as TableHeadItem,
|
|
2193
|
+
Sr as TableHeadRow,
|
|
2194
|
+
Ir as TableRow,
|
|
2195
|
+
Io as TextCell,
|
|
2196
|
+
Gr as createColumnConfig,
|
|
2197
|
+
Or as createEditableTextCellWithStatus,
|
|
2198
|
+
wt as createGroupConfigAndIdsForRows,
|
|
2199
|
+
Pn as createInternalStandardTableActions,
|
|
2200
|
+
Tr as createStandardEditableTextCell,
|
|
2201
|
+
to as createStandardTableActions,
|
|
2202
|
+
at as createStandardTableInitialState,
|
|
2203
|
+
An as createStandardTableReducer,
|
|
2204
|
+
Ie as defaultTableHeadRowHeight,
|
|
2205
|
+
Se as defaultTableRowHeight,
|
|
2206
|
+
rt as focusOnCell,
|
|
2207
|
+
yo as formatColumnIdToHeaderCellLabel,
|
|
2208
|
+
vo as formatValueLabel,
|
|
2209
|
+
be as hasIndicatorContent,
|
|
2210
|
+
ao as multitypeComparator,
|
|
2211
|
+
tt as smallTableRowWidth,
|
|
2212
|
+
Qe as tableBackgroundColorExpanded,
|
|
2213
|
+
sn as tableBackgroundHoverColorExpanded,
|
|
2214
|
+
oe as tableBorder,
|
|
2215
|
+
on as tableBorderColor,
|
|
2216
|
+
rn as tableBorderColorExpanded,
|
|
2217
|
+
cn as tableBorderHidden,
|
|
2218
|
+
ke as tableBorderLeft,
|
|
2219
|
+
et as tableBorderLeftExpanded,
|
|
2220
|
+
_e as useCellBackgroundByColumnConfig,
|
|
2221
|
+
Co as useCellBackgroundByColumnId,
|
|
2222
|
+
ce as useColumnConfigById,
|
|
2223
|
+
uo as useColumnValueResolver,
|
|
2224
|
+
mn as useEditableCell,
|
|
2225
|
+
zn as useFirstColumnConfig,
|
|
2226
|
+
he as useGridCell,
|
|
2227
|
+
Gn as useGridNavigation,
|
|
2228
|
+
nt as useGridNavigationOptionsFromContext,
|
|
2229
|
+
Kn as useLastColumnConfig,
|
|
2230
|
+
no as useLocalStateTableContext,
|
|
2231
|
+
un as useRevertableValue,
|
|
2232
|
+
mo as useRowCheckbox,
|
|
2233
|
+
se as useStandardTableActions,
|
|
2234
|
+
R as useStandardTableConfig,
|
|
2235
|
+
Re as useStandardTableId,
|
|
2236
|
+
Y as useStandardTableState,
|
|
2237
|
+
Vo as useTableHeadCheckbox,
|
|
2238
|
+
jo as useTableSortHeader
|
|
2239
|
+
};
|
|
2742
2240
|
//# sourceMappingURL=index.es.js.map
|