@lanaco/lnc-react-ui 3.11.35 → 4.0.2
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/README.md +0 -3
- package/dist/Accordion.cjs +6 -0
- package/dist/Accordion.js +65 -0
- package/dist/AccordionDetails.cjs +7 -0
- package/dist/AccordionDetails.js +32 -0
- package/dist/AccordionSummary.cjs +12 -0
- package/dist/AccordionSummary.js +78 -0
- package/dist/ActionsToolbar.cjs +19 -0
- package/dist/ActionsToolbar.js +225 -0
- package/dist/Alert.cjs +40 -0
- package/dist/Alert.js +138 -0
- package/dist/Avatar.cjs +16 -0
- package/dist/Avatar.js +114 -0
- package/dist/Badge.cjs +17 -0
- package/dist/Badge.js +70 -0
- package/dist/Breadcrumbs.cjs +8 -0
- package/dist/Breadcrumbs.js +131 -0
- package/dist/Button.cjs +127 -0
- package/dist/Button.js +542 -0
- package/dist/ButtonGroup.cjs +44 -0
- package/dist/ButtonGroup.js +112 -0
- package/dist/CheckBoxInput.cjs +118 -0
- package/dist/CheckBoxInput.js +348 -0
- package/dist/Chip.cjs +27 -0
- package/dist/Chip.js +189 -0
- package/dist/ColorInput.cjs +60 -0
- package/dist/ColorInput.js +256 -0
- package/dist/ConfirmationForm.cjs +22 -0
- package/dist/ConfirmationForm.js +169 -0
- package/dist/Content.cjs +1 -0
- package/dist/Content.js +18 -0
- package/dist/CustomStyles-CqlCjTgU.cjs +8 -0
- package/dist/CustomStyles-nfD3J1mi.js +2881 -0
- package/dist/DataView.cjs +1 -0
- package/dist/DataView.js +62 -0
- package/dist/DateInput.cjs +296 -0
- package/dist/DateInput.js +7042 -0
- package/dist/DecimalInput.cjs +54 -0
- package/dist/DecimalInput.js +697 -0
- package/dist/DetailsView.cjs +18 -0
- package/dist/DetailsView.js +243 -0
- package/dist/DoubleRangeSlider.cjs +114 -0
- package/dist/DoubleRangeSlider.js +289 -0
- package/dist/DragAndDropFile.cjs +31 -0
- package/dist/DragAndDropFile.js +2331 -0
- package/dist/DragDropFiles.cjs +14 -0
- package/dist/DragDropFiles.js +175 -0
- package/dist/Drawer.cjs +6 -0
- package/dist/Drawer.js +206 -0
- package/dist/Dropdown.cjs +1 -0
- package/dist/Dropdown.js +266 -0
- package/dist/DropdownItem.cjs +36 -0
- package/dist/DropdownItem.js +241 -0
- package/dist/DropdownLookup.cjs +1 -0
- package/dist/DropdownLookup.js +325 -0
- package/dist/DropdownMenu-B6qr13ik.cjs +19 -0
- package/dist/DropdownMenu-DZi3TJ8Q.js +1547 -0
- package/dist/DropdownMenu.cjs +1 -0
- package/dist/DropdownMenu.js +12 -0
- package/dist/EditableTable.cjs +21 -0
- package/dist/EditableTable.js +462 -0
- package/dist/FileInput.cjs +47 -0
- package/dist/FileInput.js +206 -0
- package/dist/FlexBox.cjs +9 -0
- package/dist/FlexBox.js +97 -0
- package/dist/FlexGrid.cjs +1 -0
- package/dist/FlexGrid.js +78 -0
- package/dist/FlexGridItem.cjs +7 -0
- package/dist/FlexGridItem.js +97 -0
- package/dist/Footer.cjs +1 -0
- package/dist/Footer.js +18 -0
- package/dist/FormField.cjs +11 -0
- package/dist/FormField.js +65 -0
- package/dist/FormView.cjs +13 -0
- package/dist/FormView.js +354 -0
- package/dist/Grid.cjs +13 -0
- package/dist/Grid.js +62 -0
- package/dist/GridItem.cjs +15 -0
- package/dist/GridItem.js +72 -0
- package/dist/Header.cjs +1 -0
- package/dist/Header.js +18 -0
- package/dist/Icon.cjs +8 -0
- package/dist/Icon.js +59 -0
- package/dist/IconButton.cjs +122 -0
- package/dist/IconButton.js +481 -0
- package/dist/Kanban.cjs +85 -0
- package/dist/Kanban.js +4793 -0
- package/dist/KanbanActionsToolbar.cjs +19 -0
- package/dist/KanbanActionsToolbar.js +152 -0
- package/dist/KanbanCard-ConTmu3w.cjs +30 -0
- package/dist/KanbanCard-D9OhU8C6.js +175 -0
- package/dist/KanbanCard.cjs +1 -0
- package/dist/KanbanCard.js +12 -0
- package/dist/KanbanFooter.cjs +5 -0
- package/dist/KanbanFooter.js +84 -0
- package/dist/KanbanHeader.cjs +15 -0
- package/dist/KanbanHeader.js +127 -0
- package/dist/KanbanView.cjs +8 -0
- package/dist/KanbanView.js +255 -0
- package/dist/Link.cjs +15 -0
- package/dist/Link.js +62 -0
- package/dist/MenuItem.cjs +36 -0
- package/dist/MenuItem.js +230 -0
- package/dist/Modal.cjs +84 -0
- package/dist/Modal.js +372 -0
- package/dist/MultiSelectDropdown.cjs +1 -0
- package/dist/MultiSelectDropdown.js +261 -0
- package/dist/MultiSelectDropdownLookup.cjs +1 -0
- package/dist/MultiSelectDropdownLookup.js +274 -0
- package/dist/NestedDropdownItem.cjs +6 -0
- package/dist/NestedDropdownItem.js +102 -0
- package/dist/NestedMenuItem.cjs +6 -0
- package/dist/NestedMenuItem.js +115 -0
- package/dist/Notification.cjs +83 -0
- package/dist/Notification.js +1079 -0
- package/dist/NumberInput.cjs +45 -0
- package/dist/NumberInput.js +241 -0
- package/dist/PageLayout.cjs +26 -0
- package/dist/PageLayout.js +92 -0
- package/dist/PasswordInput.cjs +47 -0
- package/dist/PasswordInput.js +230 -0
- package/dist/ProgressBar.cjs +22 -0
- package/dist/ProgressBar.js +92 -0
- package/dist/RadioGroup.cjs +7 -0
- package/dist/RadioGroup.js +104 -0
- package/dist/RadioInput.cjs +117 -0
- package/dist/RadioInput.js +362 -0
- package/dist/RangeSlider.cjs +72 -0
- package/dist/RangeSlider.js +253 -0
- package/dist/SearchBar.cjs +100 -0
- package/dist/SearchBar.js +994 -0
- package/dist/Separator.cjs +6 -0
- package/dist/Separator.js +37 -0
- package/dist/Sidebar.cjs +39 -0
- package/dist/Sidebar.js +123 -0
- package/dist/Spinner.cjs +38 -0
- package/dist/Spinner.js +114 -0
- package/dist/Surface.cjs +7 -0
- package/dist/Surface.js +60 -0
- package/dist/SwipeableDrawer.cjs +33 -0
- package/dist/SwipeableDrawer.js +213 -0
- package/dist/Table.cjs +170 -0
- package/dist/Table.js +1408 -0
- package/dist/TableView-Cj5_fbSR.js +481 -0
- package/dist/TableView-D8ex512p.cjs +19 -0
- package/dist/TableView.cjs +1 -0
- package/dist/TableView.js +11 -0
- package/dist/Tabs.cjs +7 -0
- package/dist/Tabs.js +72 -0
- package/dist/TextAreaInput.cjs +33 -0
- package/dist/TextAreaInput.js +320 -0
- package/dist/TextInput.cjs +45 -0
- package/dist/TextInput.js +227 -0
- package/dist/ThemeProvider.cjs +113 -0
- package/dist/ThemeProvider.js +1340 -0
- package/dist/TimeInput.cjs +31 -0
- package/dist/TimeInput.js +133 -0
- package/dist/Toggle.cjs +151 -0
- package/dist/Toggle.js +421 -0
- package/dist/TreeMenu.cjs +15 -0
- package/dist/TreeMenu.js +108 -0
- package/dist/TreeMenuSeparator.cjs +6 -0
- package/dist/TreeMenuSeparator.js +40 -0
- package/dist/UploadedFile.cjs +39 -0
- package/dist/UploadedFile.js +192 -0
- package/dist/defineProperty-BHpTtkhC.js +110 -0
- package/dist/defineProperty-DHvxLH8G.cjs +1 -0
- package/dist/emotion-element-5486c51c.browser.esm-CSejtOeT.js +886 -0
- package/dist/emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs +1 -0
- package/dist/emotion-is-prop-valid.esm-BzFBwmJz.js +10 -0
- package/dist/emotion-is-prop-valid.esm-CMrshNb7.cjs +1 -0
- package/dist/emotion-react.browser.esm-DQBL7Wls.cjs +1 -0
- package/dist/emotion-react.browser.esm-OWM-uG8Q.js +94 -0
- package/dist/emotion-styled.browser.esm-BZSYYThs.js +210 -0
- package/dist/emotion-styled.browser.esm-Cbp_XsK4.cjs +1 -0
- package/dist/floating-ui.dom-1F2mTXOe.cjs +1 -0
- package/dist/floating-ui.dom-BdUovkEr.js +938 -0
- package/dist/hoist-non-react-statics.cjs-B8r9S_ak.cjs +15 -0
- package/dist/hoist-non-react-statics.cjs-Drf1aBlk.js +235 -0
- package/dist/index-BLQWNy78.js +109 -0
- package/dist/index-BP5r5zGN.cjs +1 -0
- package/dist/index-B_da1uvD.js +451 -0
- package/dist/index-BjdOz5Ok.cjs +1 -0
- package/dist/index-BklgDeu4.js +42 -0
- package/dist/index-C29T0m2a.cjs +174 -0
- package/dist/index-CZJEA84h.js +19069 -0
- package/dist/index-Cdkz-XH-.js +127 -0
- package/dist/index-D5vEbKUT.js +81 -0
- package/dist/index-DXnSjbfJ.cjs +20 -0
- package/dist/index-Ds9PUTwb.js +667 -0
- package/dist/index-Dzkd2i4n.cjs +1 -0
- package/dist/index-IO9v6o0I.cjs +5 -0
- package/dist/index-P-naJISQ.cjs +1 -0
- package/dist/index.cjs +26 -0
- package/dist/index.js +378 -0
- package/dist/motion-CtkUpWEn.js +3785 -0
- package/dist/motion-Oud-wpUz.cjs +1 -0
- package/dist/objectWithoutPropertiesLoose-Bz3hwpmU.cjs +1 -0
- package/dist/objectWithoutPropertiesLoose-DwEN6RBQ.js +12 -0
- package/dist/setPrototypeOf-4aSEnBDm.cjs +1 -0
- package/dist/setPrototypeOf-a891FLQJ.js +13 -0
- package/dist/style.css +5 -0
- package/dist/tslib.es6-ZNVz5r_T.js +90 -0
- package/dist/tslib.es6-fPwcSa2V.cjs +1 -0
- package/dist/use-isomorphic-layout-effect.browser.esm-CkGv31zs.cjs +1 -0
- package/dist/use-isomorphic-layout-effect.browser.esm-DERp5kr6.js +5 -0
- package/dist/useUpdateEffect-BtMgpgIV.cjs +1 -0
- package/dist/useUpdateEffect-CuYWz7EA.js +15 -0
- package/dist/utils-DEke8iwo.js +10196 -0
- package/dist/utils-hdRGTsQ7.cjs +13 -0
- package/eslint.config.js +38 -0
- package/package.json +137 -58
- package/vite.config.js +135 -0
- package/jest.config.js +0 -7
- package/lib/index.esm.js +0 -84028
- package/lib/index.js +0 -84165
- package/rc1 +0 -0
- package/test/jest/__mocks__/styleMock.js +0 -1
package/dist/Table.js
ADDED
|
@@ -0,0 +1,1408 @@
|
|
|
1
|
+
import { jsx as i, jsxs as z, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import Me, { useLayoutEffect as Xe, useEffect as V, useState as de, useMemo as qe, createElement as O, forwardRef as Je, useImperativeHandle as Ke } from "react";
|
|
3
|
+
import { n as w } from "./emotion-styled.browser.esm-BZSYYThs.js";
|
|
4
|
+
import { c as D, g as J, P as r } from "./index-Ds9PUTwb.js";
|
|
5
|
+
import { k as be, n as Qe, b as f, a as M, s as ce, u as Ze, l as B, r as S, e as A } from "./utils-DEke8iwo.js";
|
|
6
|
+
import { c as ue } from "./index-B_da1uvD.js";
|
|
7
|
+
import { u as v } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
|
|
8
|
+
import { i as er } from "./index-Cdkz-XH-.js";
|
|
9
|
+
import fe from "./CheckBoxInput.js";
|
|
10
|
+
import rr from "./Icon.js";
|
|
11
|
+
import tr from "./Spinner.js";
|
|
12
|
+
var or = be ? Xe : V, he = {
|
|
13
|
+
x: 0,
|
|
14
|
+
y: 0,
|
|
15
|
+
width: 0,
|
|
16
|
+
height: 0,
|
|
17
|
+
top: 0,
|
|
18
|
+
left: 0,
|
|
19
|
+
bottom: 0,
|
|
20
|
+
right: 0
|
|
21
|
+
};
|
|
22
|
+
function nr() {
|
|
23
|
+
var e = de(null), s = e[0], t = e[1], o = de(he), d = o[0], c = o[1], h = qe(function() {
|
|
24
|
+
return new window.ResizeObserver(function(g) {
|
|
25
|
+
if (g[0]) {
|
|
26
|
+
var T = g[0].contentRect, y = T.x, E = T.y, L = T.width, _ = T.height, C = T.top, P = T.left, $ = T.bottom, m = T.right;
|
|
27
|
+
c({ x: y, y: E, width: L, height: _, top: C, left: P, bottom: $, right: m });
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}, []);
|
|
31
|
+
return or(function() {
|
|
32
|
+
if (s)
|
|
33
|
+
return h.observe(s), function() {
|
|
34
|
+
h.disconnect();
|
|
35
|
+
};
|
|
36
|
+
}, [s]), [t, d];
|
|
37
|
+
}
|
|
38
|
+
const lr = be && typeof window.ResizeObserver < "u" ? nr : function() {
|
|
39
|
+
return [Qe, he];
|
|
40
|
+
};
|
|
41
|
+
var ar = typeof D == "object" && D && D.Object === Object && D, ir = typeof self == "object" && self && self.Object === Object && self, sr = ar || ir || Function("return this")(), dr = sr.isFinite;
|
|
42
|
+
function cr(e) {
|
|
43
|
+
return typeof e == "number" && dr(e);
|
|
44
|
+
}
|
|
45
|
+
var ur = cr;
|
|
46
|
+
const mr = /* @__PURE__ */ J(ur);
|
|
47
|
+
function br(e) {
|
|
48
|
+
var s = typeof e;
|
|
49
|
+
return !!e && (s == "object" || s == "function");
|
|
50
|
+
}
|
|
51
|
+
var fr = br;
|
|
52
|
+
const hr = /* @__PURE__ */ J(fr), gr = w.tbody``, K = (e) => {
|
|
53
|
+
const {
|
|
54
|
+
__TYPE__: s = "TABLE_BODY",
|
|
55
|
+
className: t = "",
|
|
56
|
+
size: o = "small",
|
|
57
|
+
color: d = "primary"
|
|
58
|
+
} = e, c = v();
|
|
59
|
+
return /* @__PURE__ */ i(gr, { "data-tbody": !0, ...{
|
|
60
|
+
className: t,
|
|
61
|
+
size: o,
|
|
62
|
+
color: d,
|
|
63
|
+
theme: c
|
|
64
|
+
}, children: e.children });
|
|
65
|
+
};
|
|
66
|
+
K.propTypes = {
|
|
67
|
+
__TYPE__: r.string,
|
|
68
|
+
//----------------------------------------
|
|
69
|
+
className: r.string,
|
|
70
|
+
size: r.oneOf(["small", "medium", "large"]),
|
|
71
|
+
color: r.oneOf([
|
|
72
|
+
"primary",
|
|
73
|
+
"secondary",
|
|
74
|
+
"success",
|
|
75
|
+
"danger",
|
|
76
|
+
"warning",
|
|
77
|
+
"information",
|
|
78
|
+
"neutral",
|
|
79
|
+
"gray"
|
|
80
|
+
])
|
|
81
|
+
};
|
|
82
|
+
K.displayName = "TABLE_BODY";
|
|
83
|
+
const Tr = w.thead`
|
|
84
|
+
border-radius: 0.5rem 0.5rem 0 0;
|
|
85
|
+
`, Q = (e) => {
|
|
86
|
+
const {
|
|
87
|
+
__TYPE__: s = "TABLE_HEAD",
|
|
88
|
+
className: t = "",
|
|
89
|
+
size: o = "small",
|
|
90
|
+
color: d = "primary"
|
|
91
|
+
} = e, c = v();
|
|
92
|
+
return /* @__PURE__ */ i(Tr, { ...{
|
|
93
|
+
className: t,
|
|
94
|
+
size: o,
|
|
95
|
+
color: d,
|
|
96
|
+
theme: c
|
|
97
|
+
}, children: e.children });
|
|
98
|
+
};
|
|
99
|
+
Q.propTypes = {
|
|
100
|
+
__TYPE__: r.string,
|
|
101
|
+
//----------------------------------------
|
|
102
|
+
className: r.string,
|
|
103
|
+
size: r.oneOf(["small", "medium", "large"]),
|
|
104
|
+
color: r.oneOf([
|
|
105
|
+
"primary",
|
|
106
|
+
"secondary",
|
|
107
|
+
"success",
|
|
108
|
+
"warning",
|
|
109
|
+
"danger",
|
|
110
|
+
"information",
|
|
111
|
+
"neutral",
|
|
112
|
+
"gray"
|
|
113
|
+
])
|
|
114
|
+
};
|
|
115
|
+
Q.displayName = "TABLE_HEAD";
|
|
116
|
+
const _r = w.tr`
|
|
117
|
+
${(e) => e.noBorder == !1 && `border-bottom: 1px solid ${f(
|
|
118
|
+
e.theme,
|
|
119
|
+
"TableRow",
|
|
120
|
+
null,
|
|
121
|
+
"enabled",
|
|
122
|
+
"border"
|
|
123
|
+
)};`}
|
|
124
|
+
${(e) => e.noBorder == !1 && `border-left: 1px solid ${f(
|
|
125
|
+
e.theme,
|
|
126
|
+
"TableRow",
|
|
127
|
+
null,
|
|
128
|
+
"enabled",
|
|
129
|
+
"border"
|
|
130
|
+
)};`}
|
|
131
|
+
${(e) => e.noBorder == !1 && `border-right: 1px solid ${f(
|
|
132
|
+
e.theme,
|
|
133
|
+
"TableRow",
|
|
134
|
+
null,
|
|
135
|
+
"enabled",
|
|
136
|
+
"border"
|
|
137
|
+
)};`}
|
|
138
|
+
&:last-of-type > td:first-of-type {
|
|
139
|
+
border-radius: 0 0 0 0.5rem;
|
|
140
|
+
}
|
|
141
|
+
&:last-of-type > td:last-of-type {
|
|
142
|
+
border-radius: 0 0 0.5rem 0;
|
|
143
|
+
}
|
|
144
|
+
${(e) => e.IsSelected !== !0 ? `
|
|
145
|
+
&:hover {
|
|
146
|
+
& > td {
|
|
147
|
+
background-color: ${f(
|
|
148
|
+
e.theme,
|
|
149
|
+
"TableRow",
|
|
150
|
+
null,
|
|
151
|
+
"hover",
|
|
152
|
+
"background"
|
|
153
|
+
)};
|
|
154
|
+
}
|
|
155
|
+
}` : ""}
|
|
156
|
+
${(e) => e.IsSelected === !0 ? `
|
|
157
|
+
& > td {
|
|
158
|
+
background-color: ${f(
|
|
159
|
+
e.theme,
|
|
160
|
+
"TableRow",
|
|
161
|
+
e.color,
|
|
162
|
+
"active",
|
|
163
|
+
"background"
|
|
164
|
+
)};
|
|
165
|
+
}
|
|
166
|
+
` : ""}
|
|
167
|
+
`, Z = (e) => {
|
|
168
|
+
const {
|
|
169
|
+
__TYPE__: s = "TABLE_ROW",
|
|
170
|
+
onRowClick: t = () => {
|
|
171
|
+
},
|
|
172
|
+
RowData: o = {},
|
|
173
|
+
Index: d,
|
|
174
|
+
IsSelected: c = null,
|
|
175
|
+
noBorder: h = !1,
|
|
176
|
+
//----------------
|
|
177
|
+
className: g = "",
|
|
178
|
+
size: T = "small",
|
|
179
|
+
color: y = "primary"
|
|
180
|
+
} = e, E = v();
|
|
181
|
+
return /* @__PURE__ */ O(
|
|
182
|
+
_r,
|
|
183
|
+
{
|
|
184
|
+
...{
|
|
185
|
+
className: g,
|
|
186
|
+
size: T,
|
|
187
|
+
color: y,
|
|
188
|
+
theme: E
|
|
189
|
+
},
|
|
190
|
+
IsSelected: c,
|
|
191
|
+
key: d,
|
|
192
|
+
onClick: (C) => {
|
|
193
|
+
C.stopPropagation(), C.nativeEvent.stopImmediatePropagation(), t && t(C, o);
|
|
194
|
+
},
|
|
195
|
+
noBorder: h
|
|
196
|
+
},
|
|
197
|
+
e.children
|
|
198
|
+
);
|
|
199
|
+
};
|
|
200
|
+
Z.propTypes = {
|
|
201
|
+
__TYPE__: r.string,
|
|
202
|
+
//----------------------------------------
|
|
203
|
+
onRowClick: r.func,
|
|
204
|
+
RowData: r.object,
|
|
205
|
+
//----------------------------------------
|
|
206
|
+
IsSelected: r.bool,
|
|
207
|
+
noBorder: r.bool,
|
|
208
|
+
//----------------------------------------
|
|
209
|
+
className: r.string,
|
|
210
|
+
size: r.oneOf(["small", "medium", "large"]),
|
|
211
|
+
color: r.oneOf([
|
|
212
|
+
"primary",
|
|
213
|
+
"secondary",
|
|
214
|
+
"success",
|
|
215
|
+
"warning",
|
|
216
|
+
"danger",
|
|
217
|
+
"information",
|
|
218
|
+
"neutral",
|
|
219
|
+
"gray"
|
|
220
|
+
])
|
|
221
|
+
};
|
|
222
|
+
Z.displayName = "TABLE_ROW";
|
|
223
|
+
var Er = "[object AsyncFunction]", yr = "[object Function]", pr = "[object GeneratorFunction]", wr = "[object Null]", Cr = "[object Proxy]", Lr = "[object Undefined]", Rr = typeof D == "object" && D && D.Object === Object && D, Sr = typeof self == "object" && self && self.Object === Object && self, Ar = Rr || Sr || Function("return this")(), ge = Object.prototype, Or = ge.hasOwnProperty, Te = ge.toString, me = Ar.Symbol, j = me ? me.toStringTag : void 0;
|
|
224
|
+
function Ir(e) {
|
|
225
|
+
return e == null ? e === void 0 ? Lr : wr : j && j in Object(e) ? Hr(e) : vr(e);
|
|
226
|
+
}
|
|
227
|
+
function Hr(e) {
|
|
228
|
+
var s = Or.call(e, j), t = e[j];
|
|
229
|
+
try {
|
|
230
|
+
e[j] = void 0;
|
|
231
|
+
var o = !0;
|
|
232
|
+
} catch {
|
|
233
|
+
}
|
|
234
|
+
var d = Te.call(e);
|
|
235
|
+
return o && (s ? e[j] = t : delete e[j]), d;
|
|
236
|
+
}
|
|
237
|
+
function vr(e) {
|
|
238
|
+
return Te.call(e);
|
|
239
|
+
}
|
|
240
|
+
function Br(e) {
|
|
241
|
+
if (!Pr(e))
|
|
242
|
+
return !1;
|
|
243
|
+
var s = Ir(e);
|
|
244
|
+
return s == yr || s == pr || s == Er || s == Cr;
|
|
245
|
+
}
|
|
246
|
+
function Pr(e) {
|
|
247
|
+
var s = typeof e;
|
|
248
|
+
return e != null && (s == "object" || s == "function");
|
|
249
|
+
}
|
|
250
|
+
var $r = Br;
|
|
251
|
+
const Nr = /* @__PURE__ */ J($r), xr = w.td`
|
|
252
|
+
white-space: nowrap;
|
|
253
|
+
overflow: hidden;
|
|
254
|
+
text-overflow: ellipsis;
|
|
255
|
+
width: ${(e) => e.width};
|
|
256
|
+
padding: 0.875rem 1.5rem;
|
|
257
|
+
|
|
258
|
+
background-color: ${(e) => f(e.theme, "TableRow", null, "enabled", "background")};
|
|
259
|
+
|
|
260
|
+
${(e) => e.bgColor}
|
|
261
|
+
|
|
262
|
+
${(e) => M(e.theme, "TableCell", e.size, "enabled")};
|
|
263
|
+
`, ee = (e) => {
|
|
264
|
+
const {
|
|
265
|
+
__TYPE__: s = "TABLE_CELL",
|
|
266
|
+
Column: t = {},
|
|
267
|
+
RowData: o = {},
|
|
268
|
+
Index: d = 0,
|
|
269
|
+
EnableSelection: c = !1,
|
|
270
|
+
EnableRowHighlight: h = !1,
|
|
271
|
+
GetRowHighlightColor: g = () => "",
|
|
272
|
+
//----------------
|
|
273
|
+
className: T = "",
|
|
274
|
+
size: y = "small",
|
|
275
|
+
color: E = "primary"
|
|
276
|
+
} = e, L = v(), _ = {
|
|
277
|
+
className: T,
|
|
278
|
+
size: y,
|
|
279
|
+
color: E,
|
|
280
|
+
theme: L
|
|
281
|
+
}, C = (a) => {
|
|
282
|
+
const I = new Option().style;
|
|
283
|
+
return I.color = a, I.color !== "";
|
|
284
|
+
}, P = () => t && t.width ? t.width + "%" : "auto", $ = () => {
|
|
285
|
+
var a = g(o);
|
|
286
|
+
return h === !0 && C(a) ? `
|
|
287
|
+
background-color: ${a};
|
|
288
|
+
` : "";
|
|
289
|
+
}, m = () => {
|
|
290
|
+
if (t.render && Nr(t.render)) {
|
|
291
|
+
var a = t.render(o);
|
|
292
|
+
if (Me.isValidElement(a)) return a;
|
|
293
|
+
console.error(
|
|
294
|
+
`${t.id}/${t.accessor}: invalid render function.`
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
return er(t.accessor) && console.error(
|
|
298
|
+
`${t.index}: accessor property is required when the render function is not suplied`
|
|
299
|
+
), o[t.accessor];
|
|
300
|
+
};
|
|
301
|
+
return /* @__PURE__ */ O(
|
|
302
|
+
xr,
|
|
303
|
+
{
|
|
304
|
+
..._,
|
|
305
|
+
bgColor: $(),
|
|
306
|
+
selection: c,
|
|
307
|
+
width: P(),
|
|
308
|
+
key: d,
|
|
309
|
+
title: o[t.accessor]
|
|
310
|
+
},
|
|
311
|
+
m()
|
|
312
|
+
);
|
|
313
|
+
};
|
|
314
|
+
ee.propTypes = {
|
|
315
|
+
__TYPE__: r.string,
|
|
316
|
+
//----------------------------------------
|
|
317
|
+
Column: r.object,
|
|
318
|
+
RowData: r.object,
|
|
319
|
+
Index: r.number,
|
|
320
|
+
EnableSelection: r.bool,
|
|
321
|
+
EnableRowHighlight: r.bool,
|
|
322
|
+
GetRowHighlightColor: r.func,
|
|
323
|
+
//----------------------------------------
|
|
324
|
+
className: r.string,
|
|
325
|
+
size: r.oneOf(["small", "medium", "large"]),
|
|
326
|
+
color: r.oneOf([
|
|
327
|
+
"primary",
|
|
328
|
+
"secondary",
|
|
329
|
+
"success",
|
|
330
|
+
"warning",
|
|
331
|
+
"danger",
|
|
332
|
+
"information",
|
|
333
|
+
"neutral",
|
|
334
|
+
"gray"
|
|
335
|
+
])
|
|
336
|
+
};
|
|
337
|
+
ee.displayName = "TABLE_CELL";
|
|
338
|
+
const Dr = w.td`
|
|
339
|
+
padding: 0 0 0 1.25rem;
|
|
340
|
+
background-color: ${(e) => f(e.theme, "TableRow", null, "enabled", "background")};
|
|
341
|
+
|
|
342
|
+
width: ${(e) => e.width}%;
|
|
343
|
+
${(e) => e.bgColor}
|
|
344
|
+
`, re = (e) => {
|
|
345
|
+
const {
|
|
346
|
+
__TYPE__: s = "TABLE_SELECTION_CELL",
|
|
347
|
+
RowData: t = {},
|
|
348
|
+
onSelectRow: o = () => {
|
|
349
|
+
},
|
|
350
|
+
IsSelected: d = null,
|
|
351
|
+
Index: c = 0,
|
|
352
|
+
EnableRowHighlight: h = !1,
|
|
353
|
+
GetRowHighlightColor: g = () => "",
|
|
354
|
+
//----------------
|
|
355
|
+
className: T = "",
|
|
356
|
+
size: y = "small",
|
|
357
|
+
color: E = "primary"
|
|
358
|
+
} = e, L = v(), _ = {
|
|
359
|
+
className: T,
|
|
360
|
+
size: y,
|
|
361
|
+
color: E,
|
|
362
|
+
theme: L
|
|
363
|
+
}, C = (m, a) => {
|
|
364
|
+
o(m, t, d);
|
|
365
|
+
}, P = (m) => {
|
|
366
|
+
const a = new Option().style;
|
|
367
|
+
return a.color = m, a.color !== "";
|
|
368
|
+
};
|
|
369
|
+
return /* @__PURE__ */ O(
|
|
370
|
+
Dr,
|
|
371
|
+
{
|
|
372
|
+
bgColor: (() => {
|
|
373
|
+
var m = g(t);
|
|
374
|
+
return h === !0 && P(m) ? `
|
|
375
|
+
background-color: ${m};
|
|
376
|
+
` : "";
|
|
377
|
+
})(),
|
|
378
|
+
..._,
|
|
379
|
+
key: c,
|
|
380
|
+
width: e.width
|
|
381
|
+
},
|
|
382
|
+
/* @__PURE__ */ i(fe, { id: c, checked: d, onChange: C })
|
|
383
|
+
);
|
|
384
|
+
};
|
|
385
|
+
re.propTypes = {
|
|
386
|
+
__TYPE__: r.string,
|
|
387
|
+
//----------------------------------------
|
|
388
|
+
Column: r.object,
|
|
389
|
+
RowData: r.object,
|
|
390
|
+
onSelectRow: r.func,
|
|
391
|
+
Index: r.number,
|
|
392
|
+
SelectedData: r.array,
|
|
393
|
+
IsSelected: r.bool,
|
|
394
|
+
EnableRowHighlight: r.bool,
|
|
395
|
+
GetRowHighlightColor: r.func,
|
|
396
|
+
//----------------------------------------
|
|
397
|
+
className: r.string,
|
|
398
|
+
size: r.oneOf(["small", "medium", "large"]),
|
|
399
|
+
color: r.oneOf([
|
|
400
|
+
"primary",
|
|
401
|
+
"secondary",
|
|
402
|
+
"success",
|
|
403
|
+
"danger",
|
|
404
|
+
"warning",
|
|
405
|
+
"information",
|
|
406
|
+
"neutral",
|
|
407
|
+
"gray"
|
|
408
|
+
])
|
|
409
|
+
};
|
|
410
|
+
re.displayName = "TABLE_SELECTION_CELL";
|
|
411
|
+
const kr = w.tr`
|
|
412
|
+
border-radius: 0.5rem 0.5rem 0 0;
|
|
413
|
+
`, te = (e) => {
|
|
414
|
+
const {
|
|
415
|
+
__TYPE__: s = "TABLE_HEAD_ROW",
|
|
416
|
+
Index: t = 0,
|
|
417
|
+
//-------------
|
|
418
|
+
className: o = "",
|
|
419
|
+
size: d = "small",
|
|
420
|
+
color: c = "primary"
|
|
421
|
+
} = e, h = v();
|
|
422
|
+
return /* @__PURE__ */ O(kr, { ...{
|
|
423
|
+
className: o,
|
|
424
|
+
size: d,
|
|
425
|
+
color: c,
|
|
426
|
+
theme: h
|
|
427
|
+
}, key: t }, e.children);
|
|
428
|
+
};
|
|
429
|
+
te.propTypes = {
|
|
430
|
+
__TYPE__: r.string,
|
|
431
|
+
//----------------------------------------
|
|
432
|
+
Index: r.any,
|
|
433
|
+
//----------------------------------------
|
|
434
|
+
className: r.string,
|
|
435
|
+
size: r.oneOf(["small", "medium", "large"]),
|
|
436
|
+
color: r.oneOf([
|
|
437
|
+
"primary",
|
|
438
|
+
"secondary",
|
|
439
|
+
"success",
|
|
440
|
+
"danger",
|
|
441
|
+
"warning",
|
|
442
|
+
"information",
|
|
443
|
+
"neutral",
|
|
444
|
+
"gray"
|
|
445
|
+
])
|
|
446
|
+
};
|
|
447
|
+
te.displayName = "TABLE_HEAD_ROW";
|
|
448
|
+
const jr = w.th`
|
|
449
|
+
white-space: nowrap;
|
|
450
|
+
overflow: hidden;
|
|
451
|
+
text-overflow: ellipsis;
|
|
452
|
+
text-align: left;
|
|
453
|
+
transition: all 250ms ease;
|
|
454
|
+
padding: 0.875rem 1.5rem;
|
|
455
|
+
cursor: ${(e) => e.ordering ? "pointer" : "default"};
|
|
456
|
+
width: ${(e) => e.width};
|
|
457
|
+
|
|
458
|
+
&:hover {
|
|
459
|
+
${(e) => e.ordering ? `background-color: ${f(
|
|
460
|
+
e.theme,
|
|
461
|
+
"TableHeadCell",
|
|
462
|
+
null,
|
|
463
|
+
"hover",
|
|
464
|
+
"background"
|
|
465
|
+
)};` : ""}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
${(e) => M(
|
|
469
|
+
e.theme,
|
|
470
|
+
"TableHeadCell",
|
|
471
|
+
e.size,
|
|
472
|
+
"enabled"
|
|
473
|
+
)};
|
|
474
|
+
|
|
475
|
+
color: ${(e) => f(e.theme, "TableHeadCell", null, "enabled", "text")}};
|
|
476
|
+
|
|
477
|
+
background-color: ${(e) => f(
|
|
478
|
+
e.theme,
|
|
479
|
+
"TableHeadCell",
|
|
480
|
+
null,
|
|
481
|
+
"enabled",
|
|
482
|
+
"background"
|
|
483
|
+
)}};
|
|
484
|
+
|
|
485
|
+
border-top: ${(e) => "1px solid " + f(
|
|
486
|
+
e.theme,
|
|
487
|
+
"TableHeadCell",
|
|
488
|
+
null,
|
|
489
|
+
"enabled",
|
|
490
|
+
"border"
|
|
491
|
+
)}};
|
|
492
|
+
|
|
493
|
+
border-bottom: ${(e) => "1px solid " + f(
|
|
494
|
+
e.theme,
|
|
495
|
+
"TableHeadCell",
|
|
496
|
+
null,
|
|
497
|
+
"enabled",
|
|
498
|
+
"border"
|
|
499
|
+
)}};
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
&:first-of-type {
|
|
503
|
+
border-radius: 0.5rem 0 0 0;
|
|
504
|
+
border-left: ${(e) => "1px solid " + f(
|
|
505
|
+
e.theme,
|
|
506
|
+
"TableHeadCell",
|
|
507
|
+
null,
|
|
508
|
+
"enabled",
|
|
509
|
+
"border"
|
|
510
|
+
)}};
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
&:last-of-type {
|
|
514
|
+
border-radius: 0 0.5rem 0 0;
|
|
515
|
+
border-right: ${(e) => "1px solid " + f(
|
|
516
|
+
e.theme,
|
|
517
|
+
"TableHeadCell",
|
|
518
|
+
null,
|
|
519
|
+
"enabled",
|
|
520
|
+
"border"
|
|
521
|
+
)}};
|
|
522
|
+
}
|
|
523
|
+
`, zr = w.div`
|
|
524
|
+
display: flex;
|
|
525
|
+
flex-direction: row;
|
|
526
|
+
align-items: center;
|
|
527
|
+
`, Wr = w.span`
|
|
528
|
+
padding-right: 0.25rem;
|
|
529
|
+
white-space: nowrap;
|
|
530
|
+
overflow: hidden;
|
|
531
|
+
text-overflow: ellipsis;
|
|
532
|
+
|
|
533
|
+
color: ${(e) => f(
|
|
534
|
+
e.theme,
|
|
535
|
+
"TableHeadCell",
|
|
536
|
+
e.color,
|
|
537
|
+
"enabled",
|
|
538
|
+
"text"
|
|
539
|
+
)};
|
|
540
|
+
|
|
541
|
+
font-weight: ${(e) => f(
|
|
542
|
+
e.theme,
|
|
543
|
+
"TableHeadCell",
|
|
544
|
+
e.color,
|
|
545
|
+
"enabled",
|
|
546
|
+
"fontWeight"
|
|
547
|
+
)};
|
|
548
|
+
`, Yr = w.span`
|
|
549
|
+
& i {
|
|
550
|
+
color: ${(e) => e.sort ? "transparent" : f(
|
|
551
|
+
e.theme,
|
|
552
|
+
"TableHeadCell",
|
|
553
|
+
e.color,
|
|
554
|
+
"enabled",
|
|
555
|
+
"text"
|
|
556
|
+
)};
|
|
557
|
+
|
|
558
|
+
font-weight: ${(e) => f(
|
|
559
|
+
e.theme,
|
|
560
|
+
"TableHeadCell",
|
|
561
|
+
e.color,
|
|
562
|
+
"enabled",
|
|
563
|
+
"fontWeight"
|
|
564
|
+
)};
|
|
565
|
+
}
|
|
566
|
+
`, oe = (e) => {
|
|
567
|
+
const {
|
|
568
|
+
__TYPE__: s = "TABLE_HEAD_CELL",
|
|
569
|
+
Column: t = {},
|
|
570
|
+
Ordering: o = {},
|
|
571
|
+
Index: d = 0,
|
|
572
|
+
onColumnClick: c = () => {
|
|
573
|
+
},
|
|
574
|
+
EnableSelectAll: h = !1,
|
|
575
|
+
EnableOrdering: g = !1,
|
|
576
|
+
//-----------
|
|
577
|
+
className: T = "",
|
|
578
|
+
size: y = "small",
|
|
579
|
+
color: E = "primary"
|
|
580
|
+
} = e, L = v(), _ = {
|
|
581
|
+
className: T,
|
|
582
|
+
size: y,
|
|
583
|
+
color: E,
|
|
584
|
+
theme: L
|
|
585
|
+
}, C = () => {
|
|
586
|
+
if (t.sortable === !0 && g === !0) {
|
|
587
|
+
let m;
|
|
588
|
+
return o && o.columnId === t.id ? (o.ascending === !0 && (m = "angle-up"), o.descending === !0 && (m = "angle-down"), o.ascending && o.descending && (m = "sort")) : m = "sort", /* @__PURE__ */ i(Yr, { ..._, sort: m === "sort", children: /* @__PURE__ */ i(rr, { ..._, sizeInUnits: "14px", icon: m }) });
|
|
589
|
+
}
|
|
590
|
+
return /* @__PURE__ */ i(R, {});
|
|
591
|
+
}, P = (m) => {
|
|
592
|
+
var a = { columnId: t.id, ascending: !1, descending: !0 };
|
|
593
|
+
g === !0 && t.sortable === !0 && o && o.columnId === t.id && (o.ascending === !0 && (a.ascending = !1, a.descending = !1), o.descending === !0 && (a.ascending = !0, a.descending = !1), o.descending === !1 && o.ascending === !1 && (a.ascending = !1, a.descending = !0), c(m, t, a)), g === !0 && t.sortable === !0 && o && o.columnId !== t.id && c(m, t, a), (t.sortable !== !0 || g !== !0) && c(m, t);
|
|
594
|
+
}, $ = () => t && t.width ? t.width + "%" : "auto";
|
|
595
|
+
return /* @__PURE__ */ O(
|
|
596
|
+
jr,
|
|
597
|
+
{
|
|
598
|
+
onClick: P,
|
|
599
|
+
..._,
|
|
600
|
+
selection: h,
|
|
601
|
+
ordering: g === !0 && t.sortable === !0,
|
|
602
|
+
key: d,
|
|
603
|
+
width: $(),
|
|
604
|
+
title: t.displayName
|
|
605
|
+
},
|
|
606
|
+
/* @__PURE__ */ z(zr, { ..._, children: [
|
|
607
|
+
/* @__PURE__ */ i(Wr, { ..._, children: t.displayName }),
|
|
608
|
+
C()
|
|
609
|
+
] })
|
|
610
|
+
);
|
|
611
|
+
};
|
|
612
|
+
oe.propTypes = {
|
|
613
|
+
__TYPE__: r.string,
|
|
614
|
+
//----------------------------------------
|
|
615
|
+
Columns: r.object,
|
|
616
|
+
Ordering: r.object,
|
|
617
|
+
Index: r.any,
|
|
618
|
+
EnableSelectAll: r.bool,
|
|
619
|
+
EnableOrdering: r.bool,
|
|
620
|
+
onColumnClick: r.func,
|
|
621
|
+
//----------------------------------------
|
|
622
|
+
className: r.string,
|
|
623
|
+
size: r.oneOf(["small", "medium", "large"]),
|
|
624
|
+
color: r.oneOf([
|
|
625
|
+
"primary",
|
|
626
|
+
"secondary",
|
|
627
|
+
"success",
|
|
628
|
+
"danger",
|
|
629
|
+
"warning",
|
|
630
|
+
"information",
|
|
631
|
+
"neutral",
|
|
632
|
+
"gray"
|
|
633
|
+
])
|
|
634
|
+
};
|
|
635
|
+
oe.displayName = "TABLE_HEAD_CELL";
|
|
636
|
+
const Fr = w.th`
|
|
637
|
+
text-align: left;
|
|
638
|
+
width: ${(e) => e.width};
|
|
639
|
+
padding-left: 1.25rem;
|
|
640
|
+
background-color: ${(e) => f(
|
|
641
|
+
e.theme,
|
|
642
|
+
"TableHeadCell",
|
|
643
|
+
null,
|
|
644
|
+
"enabled",
|
|
645
|
+
"background"
|
|
646
|
+
)}};
|
|
647
|
+
border-top: ${(e) => "1px solid " + f(
|
|
648
|
+
e.theme,
|
|
649
|
+
"TableHeadCell",
|
|
650
|
+
null,
|
|
651
|
+
"enabled",
|
|
652
|
+
"border"
|
|
653
|
+
)}};
|
|
654
|
+
|
|
655
|
+
border-bottom: ${(e) => "1px solid " + f(
|
|
656
|
+
e.theme,
|
|
657
|
+
"TableHeadCell",
|
|
658
|
+
null,
|
|
659
|
+
"enabled",
|
|
660
|
+
"border"
|
|
661
|
+
)}};
|
|
662
|
+
|
|
663
|
+
border-radius: 0.5rem 0 0 0;
|
|
664
|
+
`, ne = (e) => {
|
|
665
|
+
const {
|
|
666
|
+
__TYPE__: s = "TABLE_HEAD_SELECTION_CELL",
|
|
667
|
+
EnableSelectAll: t,
|
|
668
|
+
IsSelected: o = null,
|
|
669
|
+
Index: d = 0,
|
|
670
|
+
onSelectAll: c,
|
|
671
|
+
//----------------
|
|
672
|
+
className: h = "",
|
|
673
|
+
size: g = "small",
|
|
674
|
+
color: T = "primary"
|
|
675
|
+
} = e, y = v();
|
|
676
|
+
return /* @__PURE__ */ O(
|
|
677
|
+
Fr,
|
|
678
|
+
{
|
|
679
|
+
...{
|
|
680
|
+
className: h,
|
|
681
|
+
size: g,
|
|
682
|
+
color: T,
|
|
683
|
+
theme: y
|
|
684
|
+
},
|
|
685
|
+
selection: t,
|
|
686
|
+
key: d,
|
|
687
|
+
width: e.width
|
|
688
|
+
},
|
|
689
|
+
t && /* @__PURE__ */ i(
|
|
690
|
+
fe,
|
|
691
|
+
{
|
|
692
|
+
id: d,
|
|
693
|
+
checked: o || !1,
|
|
694
|
+
onChange: (L) => c(L, o)
|
|
695
|
+
}
|
|
696
|
+
)
|
|
697
|
+
);
|
|
698
|
+
};
|
|
699
|
+
ne.propTypes = {
|
|
700
|
+
__TYPE__: r.string,
|
|
701
|
+
//----------------------------------------
|
|
702
|
+
Index: r.number,
|
|
703
|
+
IsSelected: r.bool,
|
|
704
|
+
EnableSelectAll: r.bool,
|
|
705
|
+
//----------------------------------------
|
|
706
|
+
className: r.string,
|
|
707
|
+
size: r.oneOf(["small", "medium", "large"]),
|
|
708
|
+
color: r.oneOf([
|
|
709
|
+
"primary",
|
|
710
|
+
"secondary",
|
|
711
|
+
"success",
|
|
712
|
+
"danger",
|
|
713
|
+
"warning",
|
|
714
|
+
"information",
|
|
715
|
+
"neutral",
|
|
716
|
+
"gray"
|
|
717
|
+
])
|
|
718
|
+
};
|
|
719
|
+
ne.displayName = "TABLE_HEAD_SELECTION_CELL";
|
|
720
|
+
const Gr = w.td`
|
|
721
|
+
white-space: nowrap;
|
|
722
|
+
overflow: hidden;
|
|
723
|
+
text-overflow: ellipsis;
|
|
724
|
+
padding: 0.25rem 0.125rem;
|
|
725
|
+
`, Ur = w.div`
|
|
726
|
+
width: ${(e) => e.width};
|
|
727
|
+
height: 100%;
|
|
728
|
+
border-radius: 100px;
|
|
729
|
+
background-color: ${(e) => e.bgColor} !important;
|
|
730
|
+
`, le = (e) => {
|
|
731
|
+
const {
|
|
732
|
+
__TYPE__: s = "TABLE_ROW_STATUS_INDICATOR_CELL",
|
|
733
|
+
RowData: t = {},
|
|
734
|
+
Index: o,
|
|
735
|
+
GetRowStatusIndicatorColor: d,
|
|
736
|
+
//----------------
|
|
737
|
+
className: c = "",
|
|
738
|
+
size: h = "small",
|
|
739
|
+
color: g = "Primary"
|
|
740
|
+
} = e, T = v(), y = {
|
|
741
|
+
className: c,
|
|
742
|
+
size: h,
|
|
743
|
+
color: g,
|
|
744
|
+
theme: T
|
|
745
|
+
}, E = () => "4px", L = (_) => {
|
|
746
|
+
const C = new Option().style;
|
|
747
|
+
return C.color = _, C.color !== "";
|
|
748
|
+
};
|
|
749
|
+
return /* @__PURE__ */ O(
|
|
750
|
+
Gr,
|
|
751
|
+
{
|
|
752
|
+
...y,
|
|
753
|
+
width: E(),
|
|
754
|
+
key: o,
|
|
755
|
+
bgColor: () => {
|
|
756
|
+
var _ = d(t);
|
|
757
|
+
return L(_) ? _ : ce.NONE;
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
/* @__PURE__ */ i(
|
|
761
|
+
Ur,
|
|
762
|
+
{
|
|
763
|
+
...y,
|
|
764
|
+
width: E(),
|
|
765
|
+
bgColor: () => {
|
|
766
|
+
var _ = d(t);
|
|
767
|
+
return L(_) ? _ : ce.NONE;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
)
|
|
771
|
+
);
|
|
772
|
+
};
|
|
773
|
+
le.propTypes = {
|
|
774
|
+
__TYPE__: r.string,
|
|
775
|
+
//----------------------------------------
|
|
776
|
+
Column: r.object,
|
|
777
|
+
RowData: r.object,
|
|
778
|
+
//----------------------------------------
|
|
779
|
+
className: r.string,
|
|
780
|
+
size: r.oneOf(["small", "medium", "large"]),
|
|
781
|
+
color: r.oneOf([
|
|
782
|
+
"primary",
|
|
783
|
+
"secondary",
|
|
784
|
+
"success",
|
|
785
|
+
"danger",
|
|
786
|
+
"warning",
|
|
787
|
+
"information",
|
|
788
|
+
"neutral",
|
|
789
|
+
"gray"
|
|
790
|
+
])
|
|
791
|
+
};
|
|
792
|
+
le.displayName = "TABLE_ROW_STATUS_INDICATOR_CELL";
|
|
793
|
+
const Vr = w.th`
|
|
794
|
+
padding: 0.125rem;
|
|
795
|
+
width: 8px;
|
|
796
|
+
|
|
797
|
+
background-color: ${(e) => f(
|
|
798
|
+
e.theme,
|
|
799
|
+
"TableHeadCell",
|
|
800
|
+
null,
|
|
801
|
+
"enabled",
|
|
802
|
+
"background"
|
|
803
|
+
)}};
|
|
804
|
+
|
|
805
|
+
border-bottom: ${(e) => "1px solid " + f(
|
|
806
|
+
e.theme,
|
|
807
|
+
"TableHeadCell",
|
|
808
|
+
null,
|
|
809
|
+
"enabled",
|
|
810
|
+
"border"
|
|
811
|
+
)}};
|
|
812
|
+
|
|
813
|
+
border-radius: 0.5rem 0 0 0;
|
|
814
|
+
`, ae = (e) => {
|
|
815
|
+
const {
|
|
816
|
+
__TYPE__: s = "TABLE_HEAD_ROW_STATUS_INDICATOR_CELL",
|
|
817
|
+
Index: t,
|
|
818
|
+
//-----------
|
|
819
|
+
className: o = "",
|
|
820
|
+
size: d = "small",
|
|
821
|
+
color: c = "primary"
|
|
822
|
+
} = e, h = v();
|
|
823
|
+
return /* @__PURE__ */ O(Vr, { ...{
|
|
824
|
+
className: o,
|
|
825
|
+
size: d,
|
|
826
|
+
color: c,
|
|
827
|
+
theme: h
|
|
828
|
+
}, key: t });
|
|
829
|
+
};
|
|
830
|
+
ae.propTypes = {
|
|
831
|
+
__TYPE__: r.string,
|
|
832
|
+
//----------------------------------------
|
|
833
|
+
className: r.string,
|
|
834
|
+
size: r.oneOf(["small", "medium", "large"]),
|
|
835
|
+
color: r.oneOf([
|
|
836
|
+
"primary",
|
|
837
|
+
"secondary",
|
|
838
|
+
"success",
|
|
839
|
+
"warning",
|
|
840
|
+
"danger",
|
|
841
|
+
"information",
|
|
842
|
+
"neutral",
|
|
843
|
+
"gray"
|
|
844
|
+
])
|
|
845
|
+
};
|
|
846
|
+
ae.displayName = "TABLE_HEAD_ROW_STATUS_INDICATOR_CELL";
|
|
847
|
+
const Mr = w.div`
|
|
848
|
+
display: flex;
|
|
849
|
+
flex-direction: column;
|
|
850
|
+
padding: 0.625rem;
|
|
851
|
+
margin: 0.125rem;
|
|
852
|
+
border-radius: 0.125rem;
|
|
853
|
+
overflow-x: ${(e) => e.isLoading ? "hidden" : "auto"};
|
|
854
|
+
white-space: nowrap;
|
|
855
|
+
position: relative;
|
|
856
|
+
|
|
857
|
+
${(e) => M(e.theme, "Table", e.size, "enabled")};
|
|
858
|
+
`, Xr = w.div`
|
|
859
|
+
position: absolute;
|
|
860
|
+
top: 0px;
|
|
861
|
+
right: 0px;
|
|
862
|
+
width: 100%;
|
|
863
|
+
height: 100%;
|
|
864
|
+
overflow: auto;
|
|
865
|
+
z-index: 1000;
|
|
866
|
+
opacity: 0.7;
|
|
867
|
+
background-color: ${(e) => f(
|
|
868
|
+
e.theme,
|
|
869
|
+
"Background",
|
|
870
|
+
"primary",
|
|
871
|
+
"enabled",
|
|
872
|
+
"background"
|
|
873
|
+
)};
|
|
874
|
+
filter: alpha(opacity=10);
|
|
875
|
+
display: flex;
|
|
876
|
+
align-items: center;
|
|
877
|
+
justify-content: center;
|
|
878
|
+
`, qr = w.table`
|
|
879
|
+
height: 1px;
|
|
880
|
+
width: ${(e) => e.tableWidth};
|
|
881
|
+
white-space: nowrap;
|
|
882
|
+
border-collapse: collapse;
|
|
883
|
+
border-radius: 0.5rem;
|
|
884
|
+
border-style: hidden;
|
|
885
|
+
table-layout: fixed;
|
|
886
|
+
${(e) => e.noBorder == !1 && `box-shadow: 0 0 0 0.0625rem ${f(
|
|
887
|
+
e.theme,
|
|
888
|
+
"Table",
|
|
889
|
+
null,
|
|
890
|
+
"enabled",
|
|
891
|
+
"border"
|
|
892
|
+
)};`}
|
|
893
|
+
`, Jr = w.span`
|
|
894
|
+
display: flex;
|
|
895
|
+
align-items: center;
|
|
896
|
+
justify-content: center;
|
|
897
|
+
${(e) => M(e.theme, "Table", e.size, "enabled")};
|
|
898
|
+
padding: 0.5rem;
|
|
899
|
+
`, ct = {
|
|
900
|
+
TableContainer: "TABLE_CONTAINER",
|
|
901
|
+
TableRow: "TABLE_ROW",
|
|
902
|
+
TableCell: "TABLE_CELL",
|
|
903
|
+
TableSelectionCell: "TABLE_SELLECTION_CELL",
|
|
904
|
+
TableHeadRow: "TABLE_HEAD_ROW",
|
|
905
|
+
TableHeadCell: "TABLE_HEAD_CELL",
|
|
906
|
+
TableHeadSelectionCell: "TABLE_HEAD_SELECTION_CELL",
|
|
907
|
+
TableHeader: "TABLE_HEADER",
|
|
908
|
+
TableFooter: "TABLE_FOOTER",
|
|
909
|
+
TableSpecialLastRow: "TABLE_SPECIAL_LAST_ROW",
|
|
910
|
+
TableRowStatusIndicatorCell: "TABLE_ROW_STATUS_INDICATOR_CELL",
|
|
911
|
+
TableHeadRowStatusIndicatorCell: "TABLE_HEAD_ROW_STATUS_INDICATOR_CELL",
|
|
912
|
+
TableLoader: "TABLE_LOADER",
|
|
913
|
+
TableBody: "TABLE_BODY",
|
|
914
|
+
TableHead: "TABLE_HEAD"
|
|
915
|
+
}, _e = Je((e, s) => {
|
|
916
|
+
var {
|
|
917
|
+
__TYPE__: t = "TABLE",
|
|
918
|
+
EnableSelection: o = !1,
|
|
919
|
+
EnableOrdering: d = !1,
|
|
920
|
+
EnableSelectAll: c = !1,
|
|
921
|
+
EnableLoader: h = !1,
|
|
922
|
+
PreRenderedTableBody: g = !1,
|
|
923
|
+
PreRenderedTableHead: T = !1,
|
|
924
|
+
noBorder: y = !1,
|
|
925
|
+
//--------------------
|
|
926
|
+
EnableRowStatusIndicator: E = !1,
|
|
927
|
+
EnableRowHighlight: L = !1,
|
|
928
|
+
GetRowStatusIndicatorColor: _ = () => {
|
|
929
|
+
},
|
|
930
|
+
GetRowHighlightColor: C = () => {
|
|
931
|
+
},
|
|
932
|
+
//--------------------
|
|
933
|
+
NoDataText: P = "No data to show",
|
|
934
|
+
NoDataComponent: $ = null,
|
|
935
|
+
//--------------------
|
|
936
|
+
Loading: m = !1,
|
|
937
|
+
// TODO: add alignText prop to Column object
|
|
938
|
+
Columns: a = [],
|
|
939
|
+
Data: I = [],
|
|
940
|
+
SelectedData: X = [],
|
|
941
|
+
SelectedEntirePage: Ee = !1,
|
|
942
|
+
RowIdentifier: W = "id",
|
|
943
|
+
VisibilityPattern: N = null,
|
|
944
|
+
Ordering: ye = {},
|
|
945
|
+
//--------------------
|
|
946
|
+
onColumnClick: pe = () => {
|
|
947
|
+
},
|
|
948
|
+
onRowClick: we = () => {
|
|
949
|
+
},
|
|
950
|
+
onSelectRow: ie = () => {
|
|
951
|
+
},
|
|
952
|
+
onSelectAll: Ce = () => {
|
|
953
|
+
},
|
|
954
|
+
//--------------------
|
|
955
|
+
tableWidth: Le = "100%",
|
|
956
|
+
className: Re = "",
|
|
957
|
+
style: Kr = {},
|
|
958
|
+
color: Se = "primary",
|
|
959
|
+
size: G = "small"
|
|
960
|
+
} = e;
|
|
961
|
+
const se = v(), p = {
|
|
962
|
+
theme: se,
|
|
963
|
+
color: Se,
|
|
964
|
+
size: G
|
|
965
|
+
};
|
|
966
|
+
Ke(
|
|
967
|
+
s,
|
|
968
|
+
() => ({
|
|
969
|
+
getTableData: () => I
|
|
970
|
+
}),
|
|
971
|
+
[
|
|
972
|
+
I
|
|
973
|
+
// Update functions when certain state changes
|
|
974
|
+
]
|
|
975
|
+
);
|
|
976
|
+
const [Ae, { width: k }] = lr();
|
|
977
|
+
var Oe = Ze();
|
|
978
|
+
V(() => {
|
|
979
|
+
o === !0 && (W === null || W === "") && console.error(
|
|
980
|
+
"Error: Selection is enabled but the 'RowIdentifier' is empty"
|
|
981
|
+
);
|
|
982
|
+
}, []), V(() => {
|
|
983
|
+
(a == null || a.length === 0) && console.error("Error: Columns array must have at least one item.");
|
|
984
|
+
}, [a]), V(() => {
|
|
985
|
+
N && (N.hasOwnProperty(B.XS.type) || console.error(Y(B.XS.type)), N.hasOwnProperty(B.S.type) || console.error(Y(B.S.type)), N.hasOwnProperty(B.M.type) || console.error(Y(B.M.type)), N.hasOwnProperty(B.L.type) || console.error(Y(B.L.type)), N.hasOwnProperty(B.XL.type) || console.error(Y(B.XL.type)));
|
|
986
|
+
}, [N]);
|
|
987
|
+
const Y = (n) => `Error: 'VisibilityPattern' missing property ${n}.`, U = () => {
|
|
988
|
+
let n = [];
|
|
989
|
+
if (hr(N)) {
|
|
990
|
+
var l = 0;
|
|
991
|
+
if (n = N[Oe].map((u) => ({
|
|
992
|
+
...a.find((H) => String(H.id) === String(u.id)),
|
|
993
|
+
...u
|
|
994
|
+
})), o === !0) {
|
|
995
|
+
var l = F() / k * 100 / n.length;
|
|
996
|
+
E === !0 && (l += 3 / k * 100), n = n.map((b) => ({
|
|
997
|
+
...b,
|
|
998
|
+
width: b.width - l
|
|
999
|
+
}));
|
|
1000
|
+
}
|
|
1001
|
+
} else if (n = a.map((u) => ({ ...u })), o === !0) {
|
|
1002
|
+
var l = F() / k * 100 / n.length;
|
|
1003
|
+
E === !0 && (l += 3 / k * 100), n = n.map((b) => ({
|
|
1004
|
+
...b,
|
|
1005
|
+
width: b.width - l
|
|
1006
|
+
}));
|
|
1007
|
+
}
|
|
1008
|
+
return n;
|
|
1009
|
+
}, Ie = (n, l) => {
|
|
1010
|
+
if (n && n.length > 0) {
|
|
1011
|
+
var u = 0, b = n.map((x) => x.width).reduce((x, q) => x + q);
|
|
1012
|
+
o === !0 && (u = F() / k * 100);
|
|
1013
|
+
var H = b + u;
|
|
1014
|
+
mr(H) && (H > 101 || H < 98) && console.error(`Error: Row ${l} - sum of column widths is ${H}.`);
|
|
1015
|
+
}
|
|
1016
|
+
}, He = (n) => {
|
|
1017
|
+
let l = {}, u = X.find(
|
|
1018
|
+
(b) => String(b[W]) === String(n[W])
|
|
1019
|
+
);
|
|
1020
|
+
return u != null ? l.IsSelected = !0 : l.IsSelected = !1, l;
|
|
1021
|
+
}, F = () => G === "small" ? 37 : G === "medium" ? 43 : G === "large" ? 49 : 37, ve = (n = {}, l) => {
|
|
1022
|
+
let u = {};
|
|
1023
|
+
var b = U();
|
|
1024
|
+
Ie(b, l), o === !0 && (u = He(n));
|
|
1025
|
+
var H = {
|
|
1026
|
+
onRowClick: we,
|
|
1027
|
+
onSelectRow: ie,
|
|
1028
|
+
RowData: n,
|
|
1029
|
+
SelectedData: X,
|
|
1030
|
+
EnableSelection: o,
|
|
1031
|
+
Columns: a,
|
|
1032
|
+
ColumnsToRender: b,
|
|
1033
|
+
Index: l,
|
|
1034
|
+
key: l,
|
|
1035
|
+
...p,
|
|
1036
|
+
...u
|
|
1037
|
+
}, x = /* @__PURE__ */ z(R, { children: [
|
|
1038
|
+
E === !0 && We(n),
|
|
1039
|
+
o === !0 && Pe(u.IsSelected, n),
|
|
1040
|
+
b.map((q, Ve) => Be(n, q, Ve, l, b))
|
|
1041
|
+
] });
|
|
1042
|
+
return S(
|
|
1043
|
+
A("TABLE_ROW", e.children),
|
|
1044
|
+
H,
|
|
1045
|
+
x
|
|
1046
|
+
) || /* @__PURE__ */ O(Z, { ...H, key: l, noBorder: y }, x);
|
|
1047
|
+
}, Be = (n, l, u, b, H) => {
|
|
1048
|
+
var x = {
|
|
1049
|
+
RowData: n,
|
|
1050
|
+
Column: l,
|
|
1051
|
+
ColumnsToRender: H,
|
|
1052
|
+
Index: u,
|
|
1053
|
+
RowIndex: b,
|
|
1054
|
+
key: u,
|
|
1055
|
+
EnableSelection: o,
|
|
1056
|
+
RowIdentifier: W,
|
|
1057
|
+
EnableRowHighlight: L,
|
|
1058
|
+
GetRowHighlightColor: C,
|
|
1059
|
+
...p
|
|
1060
|
+
};
|
|
1061
|
+
return S(
|
|
1062
|
+
A("TABLE_CELL", e.children),
|
|
1063
|
+
x
|
|
1064
|
+
) || /* @__PURE__ */ O(ee, { ...x, key: u });
|
|
1065
|
+
}, Pe = (n, l, u = -1) => {
|
|
1066
|
+
var b = {
|
|
1067
|
+
SelectedData: X,
|
|
1068
|
+
RowData: l,
|
|
1069
|
+
onSelectRow: ie,
|
|
1070
|
+
Index: u,
|
|
1071
|
+
key: u,
|
|
1072
|
+
IsSelected: n,
|
|
1073
|
+
EnableRowHighlight: L,
|
|
1074
|
+
GetRowHighlightColor: C,
|
|
1075
|
+
...p
|
|
1076
|
+
};
|
|
1077
|
+
return S(
|
|
1078
|
+
A("TABLE_SELLECTION_CELL", e.children),
|
|
1079
|
+
b
|
|
1080
|
+
) || /* @__PURE__ */ O(
|
|
1081
|
+
re,
|
|
1082
|
+
{
|
|
1083
|
+
...b,
|
|
1084
|
+
key: u,
|
|
1085
|
+
width: F() / k * 100
|
|
1086
|
+
}
|
|
1087
|
+
);
|
|
1088
|
+
}, $e = () => {
|
|
1089
|
+
var n = {
|
|
1090
|
+
Columns: a,
|
|
1091
|
+
...p
|
|
1092
|
+
}, l = /* @__PURE__ */ z(R, { children: [
|
|
1093
|
+
E === !0 && Ye(),
|
|
1094
|
+
o === !0 && xe(),
|
|
1095
|
+
U().map((u, b) => Ne(u, b))
|
|
1096
|
+
] });
|
|
1097
|
+
return S(
|
|
1098
|
+
A("TABLE_HEAD_ROW", e.children),
|
|
1099
|
+
n,
|
|
1100
|
+
l
|
|
1101
|
+
) || /* @__PURE__ */ O(te, { ...n, key: 0 }, l);
|
|
1102
|
+
}, Ne = (n, l, u) => {
|
|
1103
|
+
var b = {
|
|
1104
|
+
Index: l,
|
|
1105
|
+
Column: n,
|
|
1106
|
+
Ordering: ye,
|
|
1107
|
+
EnableOrdering: d,
|
|
1108
|
+
EnableSelectAll: c,
|
|
1109
|
+
onColumnClick: pe,
|
|
1110
|
+
ColumnsToRender: u,
|
|
1111
|
+
...p
|
|
1112
|
+
};
|
|
1113
|
+
return S(
|
|
1114
|
+
A("TABLE_HEAD_CELL", e.children),
|
|
1115
|
+
b
|
|
1116
|
+
) || /* @__PURE__ */ O(oe, { ...b, key: l });
|
|
1117
|
+
}, xe = () => {
|
|
1118
|
+
var n = {
|
|
1119
|
+
Index: -1,
|
|
1120
|
+
IsSelected: Ee,
|
|
1121
|
+
onSelectAll: Ce,
|
|
1122
|
+
EnableSelectAll: c,
|
|
1123
|
+
...p
|
|
1124
|
+
};
|
|
1125
|
+
return S(
|
|
1126
|
+
A("TABLE_HEAD_SELECTION_CELL", e.children),
|
|
1127
|
+
n
|
|
1128
|
+
) || /* @__PURE__ */ O(
|
|
1129
|
+
ne,
|
|
1130
|
+
{
|
|
1131
|
+
...n,
|
|
1132
|
+
key: -1,
|
|
1133
|
+
width: F() / k * 100
|
|
1134
|
+
}
|
|
1135
|
+
);
|
|
1136
|
+
}, De = () => S(A("TABLE_HEADER", e.children), {
|
|
1137
|
+
Data: I,
|
|
1138
|
+
Columns: a,
|
|
1139
|
+
...p
|
|
1140
|
+
}) || /* @__PURE__ */ i(R, {}), ke = () => S(A("TABLE_FOOTER", e.children), {
|
|
1141
|
+
Data: I,
|
|
1142
|
+
Columns: a,
|
|
1143
|
+
...p
|
|
1144
|
+
}) || /* @__PURE__ */ i(R, {}), je = () => S(
|
|
1145
|
+
A("TABLE_SPECIAL_LAST_ROW", e.children),
|
|
1146
|
+
{
|
|
1147
|
+
Data: I,
|
|
1148
|
+
Columns: a,
|
|
1149
|
+
ColumnsToRender: U(),
|
|
1150
|
+
Disabled: m,
|
|
1151
|
+
...p
|
|
1152
|
+
}
|
|
1153
|
+
) || /* @__PURE__ */ i(R, {}), ze = () => {
|
|
1154
|
+
if (I == null || I && I.length === 0) {
|
|
1155
|
+
var n = U().length;
|
|
1156
|
+
return o === !0 && n++, E === !0 && n++, /* @__PURE__ */ i("tr", { children: /* @__PURE__ */ i("td", { colSpan: n, children: $ ? /* @__PURE__ */ i($, {}) : /* @__PURE__ */ i(Jr, { ...p, children: P }) }) });
|
|
1157
|
+
}
|
|
1158
|
+
return /* @__PURE__ */ i(R, {});
|
|
1159
|
+
}, We = (n) => {
|
|
1160
|
+
var l = {
|
|
1161
|
+
...p,
|
|
1162
|
+
key: -1,
|
|
1163
|
+
RowData: n,
|
|
1164
|
+
GetRowStatusIndicatorColor: _
|
|
1165
|
+
};
|
|
1166
|
+
return E === !0 ? /* @__PURE__ */ i(R, { children: S(
|
|
1167
|
+
A("TABLE_ROW_STATUS_INDICATOR_CELL", e.children),
|
|
1168
|
+
l
|
|
1169
|
+
) || /* @__PURE__ */ i(le, { ...l, noBorder: y }) }) : /* @__PURE__ */ i(R, {});
|
|
1170
|
+
}, Ye = () => {
|
|
1171
|
+
var n = {
|
|
1172
|
+
...p,
|
|
1173
|
+
key: -1
|
|
1174
|
+
};
|
|
1175
|
+
return E === !0 ? /* @__PURE__ */ i(R, { children: S(
|
|
1176
|
+
A(
|
|
1177
|
+
"TABLE_HEAD_ROW_STATUS_INDICATOR_CELL",
|
|
1178
|
+
e.children
|
|
1179
|
+
),
|
|
1180
|
+
n
|
|
1181
|
+
) || /* @__PURE__ */ i(ae, { ...n }) }) : /* @__PURE__ */ i(R, {});
|
|
1182
|
+
}, Fe = () => h === !0 && m === !0 ? /* @__PURE__ */ i(R, { children: /* @__PURE__ */ i(Xr, { theme: se, children: S(
|
|
1183
|
+
A("TABLE_LOADER", e.children),
|
|
1184
|
+
{
|
|
1185
|
+
...p,
|
|
1186
|
+
Loading: m
|
|
1187
|
+
}
|
|
1188
|
+
) || /* @__PURE__ */ i(tr, { ...p }) }) }) : /* @__PURE__ */ i(R, {}), Ge = () => {
|
|
1189
|
+
var n = ue(e);
|
|
1190
|
+
delete n.__TYPE__;
|
|
1191
|
+
var l = /* @__PURE__ */ z(R, { children: [
|
|
1192
|
+
I.map((u, b) => ve(u, b)),
|
|
1193
|
+
ze()
|
|
1194
|
+
] });
|
|
1195
|
+
return S(
|
|
1196
|
+
A("TABLE_BODY", e.children),
|
|
1197
|
+
n,
|
|
1198
|
+
g ? l : void 0
|
|
1199
|
+
) || /* @__PURE__ */ i(K, { ...p, children: l });
|
|
1200
|
+
}, Ue = () => {
|
|
1201
|
+
var n = ue(e);
|
|
1202
|
+
delete n.__TYPE__;
|
|
1203
|
+
var l = /* @__PURE__ */ i(R, { children: $e() });
|
|
1204
|
+
return S(
|
|
1205
|
+
A("TABLE_HEAD", e.children),
|
|
1206
|
+
n,
|
|
1207
|
+
T ? l : null
|
|
1208
|
+
) || /* @__PURE__ */ i(Q, { ...p, children: l });
|
|
1209
|
+
};
|
|
1210
|
+
return (() => {
|
|
1211
|
+
var n = {
|
|
1212
|
+
className: Re,
|
|
1213
|
+
Loading: m,
|
|
1214
|
+
...p
|
|
1215
|
+
}, l = /* @__PURE__ */ z(R, { children: [
|
|
1216
|
+
Fe(),
|
|
1217
|
+
De(),
|
|
1218
|
+
/* @__PURE__ */ z(
|
|
1219
|
+
qr,
|
|
1220
|
+
{
|
|
1221
|
+
...p,
|
|
1222
|
+
width: Le || "100%",
|
|
1223
|
+
"data-table": !0,
|
|
1224
|
+
ref: Ae,
|
|
1225
|
+
noBorder: y,
|
|
1226
|
+
children: [
|
|
1227
|
+
Ue(),
|
|
1228
|
+
Ge()
|
|
1229
|
+
]
|
|
1230
|
+
}
|
|
1231
|
+
),
|
|
1232
|
+
je(),
|
|
1233
|
+
ke()
|
|
1234
|
+
] });
|
|
1235
|
+
return S(
|
|
1236
|
+
A("TABLE_CONTAINER", e.children),
|
|
1237
|
+
n,
|
|
1238
|
+
l
|
|
1239
|
+
) || /* @__PURE__ */ i(
|
|
1240
|
+
Mr,
|
|
1241
|
+
{
|
|
1242
|
+
...n,
|
|
1243
|
+
isLoading: h ? m : !1,
|
|
1244
|
+
children: l
|
|
1245
|
+
}
|
|
1246
|
+
);
|
|
1247
|
+
})();
|
|
1248
|
+
});
|
|
1249
|
+
_e.propTypes = {
|
|
1250
|
+
/**
|
|
1251
|
+
* This property determines where the component is rendered.
|
|
1252
|
+
* Should not be overridden!
|
|
1253
|
+
*/
|
|
1254
|
+
__TYPE__: r.string,
|
|
1255
|
+
/**
|
|
1256
|
+
*
|
|
1257
|
+
*/
|
|
1258
|
+
ID: r.string,
|
|
1259
|
+
//----------------------------------------
|
|
1260
|
+
noBorder: r.bool,
|
|
1261
|
+
/**
|
|
1262
|
+
* Show a selection checkbox in the first cell of every row.
|
|
1263
|
+
* Value of the checkbox is determined by the `SelectedData` property.
|
|
1264
|
+
*/
|
|
1265
|
+
EnableSelection: r.bool,
|
|
1266
|
+
/**
|
|
1267
|
+
* Show ordering arrows in header cells.
|
|
1268
|
+
*/
|
|
1269
|
+
EnableOrdering: r.bool,
|
|
1270
|
+
/**
|
|
1271
|
+
* Show a spinner with backdrop on top of the table when `Loading` is set to `true`.
|
|
1272
|
+
*/
|
|
1273
|
+
EnableLoader: r.bool,
|
|
1274
|
+
/**
|
|
1275
|
+
* Show a selection checkbox in the first cell of the table header.
|
|
1276
|
+
* Value of the checkbox is determined by the `SelectedEntirePage` property.
|
|
1277
|
+
*/
|
|
1278
|
+
EnableSelectAll: r.bool,
|
|
1279
|
+
/**
|
|
1280
|
+
* Show a special status indicator cell on the left edge of the row
|
|
1281
|
+
*/
|
|
1282
|
+
EnableRowStatusIndicator: r.bool,
|
|
1283
|
+
/**
|
|
1284
|
+
*
|
|
1285
|
+
*/
|
|
1286
|
+
EnableRowHighlight: r.bool,
|
|
1287
|
+
/**
|
|
1288
|
+
*
|
|
1289
|
+
*/
|
|
1290
|
+
GetRowStatusIndicatorColor: r.func,
|
|
1291
|
+
/**
|
|
1292
|
+
*
|
|
1293
|
+
*/
|
|
1294
|
+
GetRowHighlightColor: r.func,
|
|
1295
|
+
//----------------------------------------
|
|
1296
|
+
/**
|
|
1297
|
+
* Specify the text that is shown when there are 0 rows in the `Data`.
|
|
1298
|
+
*/
|
|
1299
|
+
NoDataText: r.string,
|
|
1300
|
+
/**
|
|
1301
|
+
* React component to show instead of the `NoDataText`
|
|
1302
|
+
*/
|
|
1303
|
+
NoDataComponet: r.node,
|
|
1304
|
+
//--------------------
|
|
1305
|
+
/**
|
|
1306
|
+
* Disables some events and actions when set to `true`. Also triggers the spinner if `EnableLoader` is set to `true`.
|
|
1307
|
+
*/
|
|
1308
|
+
Loading: r.bool,
|
|
1309
|
+
/**
|
|
1310
|
+
* Defines the table columns.
|
|
1311
|
+
* @param id - Column identifier
|
|
1312
|
+
* @param displayName - Text displayed in the header
|
|
1313
|
+
* @param accessor - Access the property in `Data`
|
|
1314
|
+
* @param width - Default column width (overridden by the VisibilityPattern)
|
|
1315
|
+
* @param sortable - Can be sorted
|
|
1316
|
+
*
|
|
1317
|
+
*/
|
|
1318
|
+
Columns: r.arrayOf(r.object),
|
|
1319
|
+
/**
|
|
1320
|
+
* Defines the data displayed in each row.
|
|
1321
|
+
*/
|
|
1322
|
+
Data: r.arrayOf(r.object),
|
|
1323
|
+
/**
|
|
1324
|
+
* Define the selected data.
|
|
1325
|
+
* @param id - Column identifier (mandatory field)
|
|
1326
|
+
*/
|
|
1327
|
+
SelectedData: r.arrayOf(r.object),
|
|
1328
|
+
/**
|
|
1329
|
+
* Value of the `SelectAll` checkbox.
|
|
1330
|
+
*/
|
|
1331
|
+
SelectedEntirePage: r.bool,
|
|
1332
|
+
/**
|
|
1333
|
+
* Defines which field in a data object is the row identifier.
|
|
1334
|
+
*/
|
|
1335
|
+
RowIdentifier: r.string,
|
|
1336
|
+
/**
|
|
1337
|
+
* An object that defines the width and order of columns for different screen sizes.
|
|
1338
|
+
* (`XS`,`S`,`M`,`L`,`XL`)
|
|
1339
|
+
*/
|
|
1340
|
+
VisibilityPattern: r.object,
|
|
1341
|
+
/**
|
|
1342
|
+
* Describe how the data is ordered.
|
|
1343
|
+
* @param columnId - Column identifier, maps to the id on the Column object
|
|
1344
|
+
*/
|
|
1345
|
+
Ordering: r.shape({
|
|
1346
|
+
columnId: r.number,
|
|
1347
|
+
ascending: r.bool,
|
|
1348
|
+
descending: r.bool
|
|
1349
|
+
}),
|
|
1350
|
+
//----------------------------------------
|
|
1351
|
+
/**
|
|
1352
|
+
* Triggered on header cell click.
|
|
1353
|
+
* @param event - event object
|
|
1354
|
+
* @param column - column definition
|
|
1355
|
+
* @param ordering - updated ordering object, or undefined if ordering is not enabled or the column is not sortable
|
|
1356
|
+
*/
|
|
1357
|
+
onColumnClick: r.func,
|
|
1358
|
+
/**
|
|
1359
|
+
* Triggered on table row click.
|
|
1360
|
+
* @param event - event object
|
|
1361
|
+
* @param rowData - row data
|
|
1362
|
+
*/
|
|
1363
|
+
onRowClick: r.func,
|
|
1364
|
+
/**
|
|
1365
|
+
* Triggered on selection checkbox click.
|
|
1366
|
+
* @param event - event object
|
|
1367
|
+
* @param rowData - row data
|
|
1368
|
+
* @param isSelected - the value of selection checkbox
|
|
1369
|
+
*/
|
|
1370
|
+
onSelectRow: r.func,
|
|
1371
|
+
/**
|
|
1372
|
+
* Triggered on select all checkbox click.
|
|
1373
|
+
* @param event - event object
|
|
1374
|
+
* @param isSelected - the value of select all checkbox
|
|
1375
|
+
*/
|
|
1376
|
+
onSelectAll: r.func,
|
|
1377
|
+
//----------------------------------------
|
|
1378
|
+
/**
|
|
1379
|
+
* `width` applied to html table.
|
|
1380
|
+
*/
|
|
1381
|
+
tableWidth: r.string,
|
|
1382
|
+
/**
|
|
1383
|
+
* `className` applied to the component container.
|
|
1384
|
+
*/
|
|
1385
|
+
className: r.string,
|
|
1386
|
+
/**
|
|
1387
|
+
* Defines size of the component (padding, margin, font etc.).
|
|
1388
|
+
*/
|
|
1389
|
+
size: r.oneOf(["small", "medium", "large"]),
|
|
1390
|
+
/**
|
|
1391
|
+
* Defines the palette color for the component.
|
|
1392
|
+
*/
|
|
1393
|
+
color: r.oneOf([
|
|
1394
|
+
"primary",
|
|
1395
|
+
"secondary",
|
|
1396
|
+
"success",
|
|
1397
|
+
"warning",
|
|
1398
|
+
"danger",
|
|
1399
|
+
"information",
|
|
1400
|
+
"neutral",
|
|
1401
|
+
"gray"
|
|
1402
|
+
])
|
|
1403
|
+
};
|
|
1404
|
+
_e.displayName = "TABLE";
|
|
1405
|
+
export {
|
|
1406
|
+
ct as TableComponentOverrides,
|
|
1407
|
+
_e as default
|
|
1408
|
+
};
|