@react-fabric/data 1.0.0-beta.0 → 1.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/checklist/CheckList.js +143 -0
- package/dist/cjs/histogram/Histogram.js +14 -5
- package/dist/cjs/hooks/useSelectableList.js +54 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/table/AddColumn.js +56 -0
- package/dist/cjs/table/BodyCell.js +47 -6
- package/dist/cjs/table/BodyRow.js +107 -0
- package/dist/cjs/table/CheckboxCell.js +44 -0
- package/dist/cjs/table/Context.js +43 -0
- package/dist/cjs/table/EmptyCell.js +52 -0
- package/dist/cjs/table/HeaderCell.js +78 -32
- package/dist/cjs/table/Table.js +173 -96
- package/dist/cjs/table/types.js +32 -0
- package/dist/cjs/table/useResizer.js +65 -0
- package/dist/cjs/table/useTableColumns.js +45 -8
- package/dist/cjs/table/useVirtualTable.js +56 -25
- package/dist/cjs/tree/TreePanel.js +14 -2
- package/dist/cjs/tree/useTree.js +7 -0
- package/dist/cjs/virtual/Gallery.js +11 -4
- package/dist/cjs/virtual/List.js +11 -4
- package/dist/esm/checklist/CheckList.js +143 -0
- package/dist/esm/histogram/Histogram.js +14 -5
- package/dist/esm/hooks/useSelectableList.js +54 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/table/AddColumn.js +56 -0
- package/dist/esm/table/BodyCell.js +47 -6
- package/dist/esm/table/BodyRow.js +107 -0
- package/dist/esm/table/CheckboxCell.js +44 -0
- package/dist/esm/table/Context.js +42 -0
- package/dist/esm/table/EmptyCell.js +52 -0
- package/dist/esm/table/HeaderCell.js +80 -34
- package/dist/esm/table/Table.js +174 -97
- package/dist/esm/table/types.js +30 -0
- package/dist/esm/table/useResizer.js +65 -0
- package/dist/esm/table/useTableColumns.js +46 -9
- package/dist/esm/table/useVirtualTable.js +57 -26
- package/dist/esm/tree/TreePanel.js +15 -3
- package/dist/esm/tree/useTree.js +7 -0
- package/dist/esm/virtual/Gallery.js +11 -4
- package/dist/esm/virtual/List.js +11 -4
- package/dist/types/checklist/CheckList.d.ts +30 -0
- package/dist/types/histogram/Histogram.d.ts +3 -3
- package/dist/types/hooks/useSelectableList.d.ts +28 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/table/AddColumn.d.ts +5 -0
- package/dist/types/table/BodyCell.d.ts +4 -3
- package/dist/types/table/BodyRow.d.ts +20 -0
- package/dist/types/table/CheckboxCell.d.ts +4 -0
- package/dist/types/table/Context.d.ts +8 -0
- package/dist/types/table/EmptyCell.d.ts +2 -0
- package/dist/types/table/HeaderCell.d.ts +2 -2
- package/dist/types/table/Table.d.ts +1 -1
- package/dist/types/table/types.d.ts +41 -7
- package/dist/types/table/useResizer.d.ts +1 -0
- package/dist/types/table/useTableColumns.d.ts +8 -6
- package/dist/types/table/useVirtualTable.d.ts +13 -1
- package/dist/types/tree/TreePanel.d.ts +1 -1
- package/dist/types/tree/types.d.ts +6 -2
- package/dist/types/tree/useTree.d.ts +1 -0
- package/dist/types/virtual/Gallery.d.ts +3 -2
- package/dist/types/virtual/List.d.ts +3 -2
- package/package.json +6 -5
- package/src/checklist/CheckList.tsx +222 -0
- package/src/histogram/Histogram.tsx +7 -2
- package/src/hooks/useSelectableList.ts +94 -0
- package/src/index.ts +3 -0
- package/src/table/AddColumn.tsx +55 -0
- package/src/table/BodyCell.tsx +47 -6
- package/src/table/BodyRow.tsx +142 -0
- package/src/table/CheckboxCell.tsx +48 -0
- package/src/table/Context.tsx +70 -0
- package/src/table/EmptyCell.tsx +57 -0
- package/src/table/HeaderCell.tsx +93 -25
- package/src/table/Table.tsx +194 -87
- package/src/table/types.ts +42 -6
- package/src/table/useResizer.ts +66 -0
- package/src/table/useTableColumns.ts +52 -19
- package/src/table/useVirtualTable.ts +61 -2
- package/src/tree/TreePanel.tsx +12 -1
- package/src/tree/types.ts +8 -1
- package/src/tree/useTree.ts +5 -0
- package/src/virtual/Gallery.tsx +4 -1
- package/src/virtual/List.tsx +4 -1
|
@@ -1,32 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
3
5
|
var reactVirtual = require('@tanstack/react-virtual');
|
|
4
6
|
var react = require('react');
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
* The MIT License (MIT)
|
|
12
|
-
* Copyright (c) 2024 Adarsh Pastakia
|
|
13
|
-
*
|
|
14
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
|
15
|
-
* and associated documentation files (the "Software"), to deal in the Software without restriction,
|
|
16
|
-
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
17
|
-
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
18
|
-
* subject to the following conditions:
|
|
19
|
-
*
|
|
20
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
21
|
-
* portions of the Software.
|
|
22
|
-
*
|
|
23
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
24
|
-
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
25
|
-
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
26
|
-
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
var useVirtualTable = function useVirtualTable(data) {
|
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
+
var useVirtualTable = function useVirtualTable(data, keyProperty, onCheckChanged) {
|
|
11
|
+
var _virtualizer$range;
|
|
30
12
|
// TODO: refactor data into item list, apply grouping if groupColumn provided
|
|
31
13
|
// TODO: when grouping maintain map of group with children, {___GROUP___:true, label, items, open}
|
|
32
14
|
|
|
@@ -40,6 +22,35 @@ var useVirtualTable = function useVirtualTable(data) {
|
|
|
40
22
|
return 24;
|
|
41
23
|
}
|
|
42
24
|
});
|
|
25
|
+
var _useReducer = react.useReducer(function (state, action) {
|
|
26
|
+
if (action.type === "expand") {
|
|
27
|
+
if (state.expanded.includes(action.key)) state.expanded.splice(state.expanded.indexOf(action.key), 1);else state.expanded.push(action.key);
|
|
28
|
+
}
|
|
29
|
+
if (action.type === "check") {
|
|
30
|
+
if (state.checked.includes(action.key)) state.checked.splice(state.checked.indexOf(action.key), 1);else state.checked.push(action.key);
|
|
31
|
+
onCheckChanged === null || onCheckChanged === void 0 || onCheckChanged(state.checked);
|
|
32
|
+
}
|
|
33
|
+
if (action.type === "checkall") {
|
|
34
|
+
if (state.allChecked !== 0) {
|
|
35
|
+
state.checked = [];
|
|
36
|
+
} else if (keyProperty) {
|
|
37
|
+
state.checked = data.map(function (item) {
|
|
38
|
+
return item[keyProperty];
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
onCheckChanged === null || onCheckChanged === void 0 || onCheckChanged(state.checked);
|
|
42
|
+
}
|
|
43
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
44
|
+
allChecked: state.checked.length === data.length ? 1 : state.checked.length ? 2 : 0
|
|
45
|
+
});
|
|
46
|
+
}, {
|
|
47
|
+
checked: [],
|
|
48
|
+
expanded: [],
|
|
49
|
+
allChecked: 0
|
|
50
|
+
}),
|
|
51
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
52
|
+
state = _useReducer2[0],
|
|
53
|
+
dispatch = _useReducer2[1];
|
|
43
54
|
var virtualItems = virtualizer.getVirtualItems();
|
|
44
55
|
var getData = react.useCallback(function (index) {
|
|
45
56
|
return data[index];
|
|
@@ -47,9 +58,29 @@ var useVirtualTable = function useVirtualTable(data) {
|
|
|
47
58
|
return {
|
|
48
59
|
scrollerRef: scrollerRef,
|
|
49
60
|
items: virtualItems,
|
|
61
|
+
checkState: state,
|
|
50
62
|
getData: getData,
|
|
63
|
+
virtualizer: virtualizer,
|
|
64
|
+
top: (_virtualizer$range = virtualizer.range) === null || _virtualizer$range === void 0 ? void 0 : _virtualizer$range.startIndex,
|
|
51
65
|
totalSize: virtualizer.getTotalSize,
|
|
52
|
-
measureElement: virtualizer.measureElement
|
|
66
|
+
measureElement: virtualizer.measureElement,
|
|
67
|
+
toggleExpand: function toggleExpand(key) {
|
|
68
|
+
return dispatch({
|
|
69
|
+
type: "expand",
|
|
70
|
+
key: key
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
toggleChecked: function toggleChecked(key) {
|
|
74
|
+
return dispatch({
|
|
75
|
+
type: "check",
|
|
76
|
+
key: key
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
toggleAllChecked: function toggleAllChecked() {
|
|
80
|
+
return dispatch({
|
|
81
|
+
type: "checkall"
|
|
82
|
+
});
|
|
83
|
+
}
|
|
53
84
|
};
|
|
54
85
|
};
|
|
55
86
|
|
|
@@ -11,12 +11,13 @@ var types = require('./types.js');
|
|
|
11
11
|
var useTree = require('./useTree.js');
|
|
12
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
13
13
|
|
|
14
|
-
var _excluded = ["items", "selected", "checked", "checkable", "noLines", "renderer", "searchable", "selectable", "matcher", "filterPlaceholder", "defaultLeafIcon", "defaultNodeIcon", "expander", "onChecked", "onLoad", "onSelect"];
|
|
14
|
+
var _excluded = ["ref", "items", "selected", "checked", "checkable", "noLines", "renderer", "searchable", "selectable", "matcher", "filterPlaceholder", "defaultLeafIcon", "defaultNodeIcon", "expander", "onChecked", "onLoad", "onSelect"];
|
|
15
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
17
|
var TreePanel = function TreePanel(_ref) {
|
|
18
18
|
var _virtualItems$;
|
|
19
|
-
var
|
|
19
|
+
var ref = _ref.ref,
|
|
20
|
+
items = _ref.items,
|
|
20
21
|
selected = _ref.selected,
|
|
21
22
|
checked = _ref.checked,
|
|
22
23
|
checkable = _ref.checkable,
|
|
@@ -48,6 +49,7 @@ var TreePanel = function TreePanel(_ref) {
|
|
|
48
49
|
expandAll = _useTree.expandAll,
|
|
49
50
|
collapseAll = _useTree.collapseAll,
|
|
50
51
|
select = _useTree.select,
|
|
52
|
+
expand = _useTree.expand,
|
|
51
53
|
onFilter = _useTree.onFilter;
|
|
52
54
|
var scrollerRef = react.useRef(null);
|
|
53
55
|
var virtualizer = reactVirtual.useVirtualizer({
|
|
@@ -66,6 +68,16 @@ var TreePanel = function TreePanel(_ref) {
|
|
|
66
68
|
if (expander === "folder") return [core.CoreIcons.folderClosed, core.CoreIcons.folderOpen];
|
|
67
69
|
return [core.CoreIcons.expand, core.CoreIcons.collapse];
|
|
68
70
|
}, [expander]);
|
|
71
|
+
react.useImperativeHandle(ref, function () {
|
|
72
|
+
return {
|
|
73
|
+
open: function open(id) {
|
|
74
|
+
return expand(id);
|
|
75
|
+
},
|
|
76
|
+
select: function select(id) {
|
|
77
|
+
return expand(id);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}, []);
|
|
69
81
|
return /*#__PURE__*/jsxRuntime.jsxs(core.Section, {
|
|
70
82
|
children: [/*#__PURE__*/jsxRuntime.jsxs(core.Header, {
|
|
71
83
|
flex: true,
|
package/dist/cjs/tree/useTree.js
CHANGED
|
@@ -151,6 +151,12 @@ var useTree = function useTree(_ref) {
|
|
|
151
151
|
id: id
|
|
152
152
|
});
|
|
153
153
|
}, []);
|
|
154
|
+
var expand = react.useCallback(function (id) {
|
|
155
|
+
dispatch({
|
|
156
|
+
type: "expand",
|
|
157
|
+
id: id
|
|
158
|
+
});
|
|
159
|
+
}, []);
|
|
154
160
|
var expandAll = react.useCallback(function () {
|
|
155
161
|
dispatch({
|
|
156
162
|
type: "expandAll"
|
|
@@ -174,6 +180,7 @@ var useTree = function useTree(_ref) {
|
|
|
174
180
|
collapseAll: collapseAll,
|
|
175
181
|
toggleCheck: toggleCheck,
|
|
176
182
|
select: select,
|
|
183
|
+
expand: expand,
|
|
177
184
|
onFilter: onFilter
|
|
178
185
|
};
|
|
179
186
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
3
4
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
4
6
|
var core = require('@react-fabric/core');
|
|
5
7
|
var utilities = require('@react-fabric/utilities');
|
|
6
8
|
var reactVirtual = require('@tanstack/react-virtual');
|
|
@@ -10,6 +12,9 @@ var react = require('react');
|
|
|
10
12
|
var Scroller = require('./Scroller.js');
|
|
11
13
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
14
|
|
|
15
|
+
var _excluded = ["items", "children", "columns", "padding", "defaultHeight", "defaultWidth", "hideScroller", "initialScroll", "loading", "onLoadMore", "onScroll", "galleryRef"];
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
18
|
var createItemList = memoizeOne(function (items) {
|
|
14
19
|
return items;
|
|
15
20
|
});
|
|
@@ -29,7 +34,8 @@ var _VirtualGallery = function _VirtualGallery(_ref) {
|
|
|
29
34
|
loading = _ref.loading,
|
|
30
35
|
onLoadMore = _ref.onLoadMore,
|
|
31
36
|
onScroll = _ref.onScroll,
|
|
32
|
-
galleryRef = _ref.galleryRef
|
|
37
|
+
galleryRef = _ref.galleryRef,
|
|
38
|
+
aria = _objectWithoutProperties(_ref, _excluded);
|
|
33
39
|
var count = react.useDeferredValue(items.length);
|
|
34
40
|
var extraSize = react.useMemo(function () {
|
|
35
41
|
return onLoadMore ? 64 : 0;
|
|
@@ -163,10 +169,11 @@ var _VirtualGallery = function _VirtualGallery(_ref) {
|
|
|
163
169
|
}
|
|
164
170
|
};
|
|
165
171
|
}, [virtualizer, columnCount]);
|
|
166
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
172
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({
|
|
167
173
|
ref: scrollerRef,
|
|
168
174
|
onScroll: handleScroll,
|
|
169
|
-
className: classNames("area-content bg-base overflow-auto contain-strict")
|
|
175
|
+
className: classNames("area-content bg-base overflow-auto contain-strict")
|
|
176
|
+
}, aria), {}, {
|
|
170
177
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
171
178
|
className: classNames("inline-flex flex-nowrap gap-2 justify-center min-h-full min-w-full"),
|
|
172
179
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -220,7 +227,7 @@ var _VirtualGallery = function _VirtualGallery(_ref) {
|
|
|
220
227
|
})
|
|
221
228
|
})]
|
|
222
229
|
})
|
|
223
|
-
});
|
|
230
|
+
}));
|
|
224
231
|
};
|
|
225
232
|
_VirtualGallery.displayName = "VirtualGallery";
|
|
226
233
|
var GenericMemo = react.memo;
|
package/dist/cjs/virtual/List.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
3
4
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
4
6
|
var core = require('@react-fabric/core');
|
|
5
7
|
var utilities = require('@react-fabric/utilities');
|
|
6
8
|
var reactVirtual = require('@tanstack/react-virtual');
|
|
@@ -10,6 +12,9 @@ var react = require('react');
|
|
|
10
12
|
var Scroller = require('./Scroller.js');
|
|
11
13
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
14
|
|
|
15
|
+
var _excluded = ["items", "children", "fullWidth", "padding", "orientation", "defaultHeight", "defaultWidth", "hideScroller", "initialScroll", "loading", "onLoadMore", "onScroll", "listRef"];
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
18
|
var createItemList = memoizeOne(function (items) {
|
|
14
19
|
return items;
|
|
15
20
|
});
|
|
@@ -31,7 +36,8 @@ var _VirtualList = function _VirtualList(_ref) {
|
|
|
31
36
|
loading = _ref.loading,
|
|
32
37
|
onLoadMore = _ref.onLoadMore,
|
|
33
38
|
onScroll = _ref.onScroll,
|
|
34
|
-
listRef = _ref.listRef
|
|
39
|
+
listRef = _ref.listRef,
|
|
40
|
+
aria = _objectWithoutProperties(_ref, _excluded);
|
|
35
41
|
var count = react.useDeferredValue(items.length);
|
|
36
42
|
var extraSize = react.useMemo(function () {
|
|
37
43
|
return onLoadMore ? 64 : 0;
|
|
@@ -154,10 +160,11 @@ var _VirtualList = function _VirtualList(_ref) {
|
|
|
154
160
|
}
|
|
155
161
|
};
|
|
156
162
|
}, [virtualizer]);
|
|
157
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
163
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({
|
|
158
164
|
ref: scrollerRef,
|
|
159
165
|
onScroll: handleScroll,
|
|
160
|
-
className: classNames("area-content bg-base overflow-auto contain-strict")
|
|
166
|
+
className: classNames("area-content bg-base overflow-auto contain-strict")
|
|
167
|
+
}, aria), {}, {
|
|
161
168
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
162
169
|
className: classNames("inline-flex flex-nowrap gap-2 justify-center min-h-full min-w-full", orientation === "horizontal" && "flex-col"),
|
|
163
170
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -209,7 +216,7 @@ var _VirtualList = function _VirtualList(_ref) {
|
|
|
209
216
|
})
|
|
210
217
|
})]
|
|
211
218
|
})
|
|
212
|
-
});
|
|
219
|
+
}));
|
|
213
220
|
};
|
|
214
221
|
_VirtualList.displayName = "VirtualList";
|
|
215
222
|
var GenericMemo = react.memo;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
4
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
6
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
7
|
+
import { EmptyContent, Icon, CoreIcons, Badge } from '@react-fabric/core';
|
|
8
|
+
import { isString } from '@react-fabric/utilities';
|
|
9
|
+
import { useState, useEffect, useMemo, createElement, Fragment, isValidElement } from 'react';
|
|
10
|
+
import { useTranslation } from 'react-i18next';
|
|
11
|
+
import { useSelectableList } from '../hooks/useSelectableList.js';
|
|
12
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
13
|
+
|
|
14
|
+
var _excluded = ["id", "allowNegative", "selected", "icon", "label", "isDisabled", "onClick", "badge"],
|
|
15
|
+
_excluded2 = ["items", "maxCount", "allowNegative", "emptyMessage", "sortItems", "selected", "nonselected", "onChange", "onClick"];
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
+
var CheckItem = function CheckItem(_ref) {
|
|
19
|
+
var id = _ref.id,
|
|
20
|
+
allowNegative = _ref.allowNegative,
|
|
21
|
+
selected = _ref.selected,
|
|
22
|
+
icon = _ref.icon,
|
|
23
|
+
label = _ref.label,
|
|
24
|
+
isDisabled = _ref.isDisabled,
|
|
25
|
+
_onClick = _ref.onClick,
|
|
26
|
+
badge = _ref.badge,
|
|
27
|
+
aria = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
+
return /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({
|
|
29
|
+
role: "none",
|
|
30
|
+
className: "ax-checkList__item",
|
|
31
|
+
"data-disabled": isDisabled,
|
|
32
|
+
onClick: function onClick() {
|
|
33
|
+
return _onClick(id, false);
|
|
34
|
+
},
|
|
35
|
+
onContextMenu: function onContextMenu(e) {
|
|
36
|
+
return [allowNegative && _onClick(id, true), e.preventDefault()];
|
|
37
|
+
}
|
|
38
|
+
}, aria), {}, {
|
|
39
|
+
children: [!allowNegative && /*#__PURE__*/jsx(Icon, {
|
|
40
|
+
"data-type": "checkbox",
|
|
41
|
+
className: "ax-checkList__checkbox",
|
|
42
|
+
"data-selected": selected === 1,
|
|
43
|
+
icon: selected ? CoreIcons.checkboxInt : CoreIcons.checkboxOff
|
|
44
|
+
}), allowNegative && /*#__PURE__*/jsxs(Fragment, {
|
|
45
|
+
children: [/*#__PURE__*/jsx(Icon, {
|
|
46
|
+
"data-type": "multiple",
|
|
47
|
+
className: "ax-checkList__checkbox",
|
|
48
|
+
icon: selected === 1 ? CoreIcons.expand : selected === -1 ? CoreIcons.collapse : CoreIcons.checkboxOff,
|
|
49
|
+
"data-selected": selected
|
|
50
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
51
|
+
className: "ax-checkList__checkbox",
|
|
52
|
+
children: [/*#__PURE__*/jsx(Icon, {
|
|
53
|
+
"data-type": "positive",
|
|
54
|
+
onClick: function onClick(e) {
|
|
55
|
+
return [(_onClick(id, false), e.stopPropagation())];
|
|
56
|
+
},
|
|
57
|
+
icon: selected === 1 ? CoreIcons.expandActive : CoreIcons.expand,
|
|
58
|
+
"data-selected": selected === 1
|
|
59
|
+
}), /*#__PURE__*/jsx(Icon, {
|
|
60
|
+
"data-type": "negative",
|
|
61
|
+
onClick: function onClick(e) {
|
|
62
|
+
return [(_onClick(id, true), e.stopPropagation())];
|
|
63
|
+
},
|
|
64
|
+
icon: selected === -1 ? CoreIcons.collapseActive : CoreIcons.collapse,
|
|
65
|
+
"data-selected": selected === -1
|
|
66
|
+
})]
|
|
67
|
+
})]
|
|
68
|
+
}), /*#__PURE__*/isValidElement(icon) && icon, isString(icon) && /*#__PURE__*/jsx(Icon, {
|
|
69
|
+
icon: icon
|
|
70
|
+
}), /*#__PURE__*/jsx("label", {
|
|
71
|
+
children: label
|
|
72
|
+
}), /*#__PURE__*/jsx(Badge, _objectSpread({}, badge))]
|
|
73
|
+
}));
|
|
74
|
+
};
|
|
75
|
+
var CheckList = function CheckList(_ref2) {
|
|
76
|
+
var _ref2$items = _ref2.items,
|
|
77
|
+
items = _ref2$items === void 0 ? [] : _ref2$items,
|
|
78
|
+
_ref2$maxCount = _ref2.maxCount,
|
|
79
|
+
maxCount = _ref2$maxCount === void 0 ? 0 : _ref2$maxCount,
|
|
80
|
+
allowNegative = _ref2.allowNegative,
|
|
81
|
+
emptyMessage = _ref2.emptyMessage,
|
|
82
|
+
_ref2$sortItems = _ref2.sortItems,
|
|
83
|
+
sortItems = _ref2$sortItems === void 0 ? true : _ref2$sortItems,
|
|
84
|
+
selected = _ref2.selected,
|
|
85
|
+
nonselected = _ref2.nonselected,
|
|
86
|
+
onChange = _ref2.onChange,
|
|
87
|
+
onClick = _ref2.onClick,
|
|
88
|
+
aria = _objectWithoutProperties(_ref2, _excluded2);
|
|
89
|
+
var _useTranslation = useTranslation("data"),
|
|
90
|
+
t = _useTranslation.t;
|
|
91
|
+
var _useSelectableList = useSelectableList({
|
|
92
|
+
items: items,
|
|
93
|
+
selected: selected,
|
|
94
|
+
nonselected: nonselected,
|
|
95
|
+
onChange: onChange,
|
|
96
|
+
onClick: onClick
|
|
97
|
+
}),
|
|
98
|
+
selection = _useSelectableList.selection,
|
|
99
|
+
toggleSelection = _useSelectableList.toggleSelection;
|
|
100
|
+
var _useState = useState(false),
|
|
101
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
102
|
+
showMore = _useState2[0],
|
|
103
|
+
setShowMore = _useState2[1];
|
|
104
|
+
useEffect(function () {
|
|
105
|
+
setShowMore(false);
|
|
106
|
+
}, [items]);
|
|
107
|
+
var listItems = useMemo(function () {
|
|
108
|
+
return _toConsumableArray(items).sort(function (a, b) {
|
|
109
|
+
if (sortItems && selection[a.id] !== selection[b.id]) {
|
|
110
|
+
if (selection[a.id] === 1) return -1;
|
|
111
|
+
if (selection[b.id] === 1) return 1;
|
|
112
|
+
if (selection[a.id] === -1) return -1;
|
|
113
|
+
if (selection[b.id] === -1) return 1;
|
|
114
|
+
}
|
|
115
|
+
return 0;
|
|
116
|
+
}).slice(0, !showMore && maxCount > 0 ? maxCount : undefined);
|
|
117
|
+
}, [items, selection, maxCount, showMore, sortItems]);
|
|
118
|
+
return /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({}, aria), {}, {
|
|
119
|
+
children: [listItems.map(function (item, index) {
|
|
120
|
+
return /*#__PURE__*/createElement(CheckItem, _objectSpread(_objectSpread({}, item), {}, {
|
|
121
|
+
key: index,
|
|
122
|
+
onClick: toggleSelection,
|
|
123
|
+
allowNegative: allowNegative,
|
|
124
|
+
selected: selection[item.id]
|
|
125
|
+
}));
|
|
126
|
+
}), maxCount > 0 && items.length > maxCount && /*#__PURE__*/jsx("div", {
|
|
127
|
+
className: "ax-moreLink",
|
|
128
|
+
children: /*#__PURE__*/jsxs("span", {
|
|
129
|
+
role: "none",
|
|
130
|
+
className: "link",
|
|
131
|
+
onClick: function onClick() {
|
|
132
|
+
return setShowMore(!showMore);
|
|
133
|
+
},
|
|
134
|
+
children: ["...", t("core:action.".concat(showMore ? "less" : "more"))]
|
|
135
|
+
})
|
|
136
|
+
}), listItems.length === 0 && /*#__PURE__*/jsx(EmptyContent, {
|
|
137
|
+
className: "text-sm",
|
|
138
|
+
message: emptyMessage !== null && emptyMessage !== void 0 ? emptyMessage : t("checkList.empty")
|
|
139
|
+
})]
|
|
140
|
+
}));
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export { CheckList };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
4
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
5
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
6
|
import { EmptyContent, Icon, ActionLabel, Button, CoreIcons } from '@react-fabric/core';
|
|
5
7
|
import { compareValues, Format } from '@react-fabric/utilities';
|
|
6
8
|
import classNames from 'classnames';
|
|
@@ -9,6 +11,9 @@ import { useTranslation } from 'react-i18next';
|
|
|
9
11
|
import classes from './Histogram.module.css';
|
|
10
12
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
13
|
|
|
14
|
+
var _excluded = ["items", "total", "color", "sortBy", "emptyTitle", "emptyMessage", "onClick"];
|
|
15
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
17
|
var emptyIcon = "M20.84 22.73L11.11 13H3V11H9.11L6.11 8H3V6H4.11L1.11 3L2.39 1.73L22.11 21.46L20.84 22.73M15 11H14.2L15 11.8V11M21 8V6H9.2L11.2 8H21M3 18H9V16H3V18Z";
|
|
13
18
|
var Histogram = function Histogram(_ref) {
|
|
14
19
|
var _ref$items = _ref.items,
|
|
@@ -20,7 +25,8 @@ var Histogram = function Histogram(_ref) {
|
|
|
20
25
|
sortBy = _ref$sortBy === void 0 ? "count" : _ref$sortBy,
|
|
21
26
|
emptyTitle = _ref.emptyTitle,
|
|
22
27
|
emptyMessage = _ref.emptyMessage,
|
|
23
|
-
_onClick = _ref.onClick
|
|
28
|
+
_onClick = _ref.onClick,
|
|
29
|
+
aria = _objectWithoutProperties(_ref, _excluded);
|
|
24
30
|
var _useTranslation = useTranslation("data"),
|
|
25
31
|
t = _useTranslation.t;
|
|
26
32
|
var maxTotal = useMemo(function () {
|
|
@@ -32,8 +38,9 @@ var Histogram = function Histogram(_ref) {
|
|
|
32
38
|
var sorted = useMemo(function () {
|
|
33
39
|
return items.sort(compareValues(sortBy === "label" ? "asc" : "desc", sortBy));
|
|
34
40
|
}, [items, sortBy]);
|
|
35
|
-
return /*#__PURE__*/jsxs("div", {
|
|
36
|
-
className: classes.histogram
|
|
41
|
+
return /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({
|
|
42
|
+
className: classes.histogram
|
|
43
|
+
}, aria), {}, {
|
|
37
44
|
style: {
|
|
38
45
|
"--color": "var(--".concat(color, ")")
|
|
39
46
|
},
|
|
@@ -45,10 +52,12 @@ var Histogram = function Histogram(_ref) {
|
|
|
45
52
|
title: emptyTitle,
|
|
46
53
|
message: emptyMessage !== null && emptyMessage !== void 0 ? emptyMessage : t("histogram.empty")
|
|
47
54
|
}), sorted === null || sorted === void 0 ? void 0 : sorted.map(function (item) {
|
|
55
|
+
var _item$total;
|
|
48
56
|
return /*#__PURE__*/jsxs("div", {
|
|
49
57
|
role: "none",
|
|
50
58
|
"data-disabled": item.count === 0 || item.disabled,
|
|
51
|
-
className: classNames("relative cursor-pointer flex flex-nowrap items-center select-none overflow-hidden min-h-6 my-px", classes.histoLabel, (item.count === 0 || item.disabled) && "pointer-events-none"),
|
|
59
|
+
className: classNames("relative cursor-pointer flex flex-nowrap items-center select-none overflow-hidden min-h-6 my-px", classes.histoLabel, (((_item$total = item.total) !== null && _item$total !== void 0 ? _item$total : item.count) === 0 || item.disabled) && "pointer-events-none"),
|
|
60
|
+
"data-testid": item.id,
|
|
52
61
|
onClick: function onClick(e) {
|
|
53
62
|
return [_onClick === null || _onClick === void 0 ? void 0 : _onClick(item.id), e.stopPropagation()];
|
|
54
63
|
},
|
|
@@ -83,7 +92,7 @@ var Histogram = function Histogram(_ref) {
|
|
|
83
92
|
})]
|
|
84
93
|
}, item.id);
|
|
85
94
|
})]
|
|
86
|
-
});
|
|
95
|
+
}));
|
|
87
96
|
};
|
|
88
97
|
|
|
89
98
|
export { Histogram };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
|
+
import { useRef, useState, useTransition, useEffect, useCallback } from 'react';
|
|
6
|
+
|
|
7
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
+
var useSelectableList = function useSelectableList(_ref) {
|
|
10
|
+
var items = _ref.items,
|
|
11
|
+
selected = _ref.selected,
|
|
12
|
+
nonselected = _ref.nonselected,
|
|
13
|
+
onChange = _ref.onChange,
|
|
14
|
+
onClick = _ref.onClick;
|
|
15
|
+
var selectionRef = useRef({});
|
|
16
|
+
var _useState = useState({}),
|
|
17
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
+
selection = _useState2[0],
|
|
19
|
+
setSelection = _useState2[1];
|
|
20
|
+
var _useTransition = useTransition(),
|
|
21
|
+
_useTransition2 = _slicedToArray(_useTransition, 2),
|
|
22
|
+
startTransition = _useTransition2[1];
|
|
23
|
+
useEffect(function () {
|
|
24
|
+
selectionRef.current = items.reduce(function (ret, _ref2) {
|
|
25
|
+
var _selected$includes, _nonselected$includes;
|
|
26
|
+
var id = _ref2.id;
|
|
27
|
+
return _objectSpread(_objectSpread({}, ret), {}, _defineProperty({}, id, selected !== null && selected !== void 0 && (_selected$includes = selected.includes) !== null && _selected$includes !== void 0 && _selected$includes.call(selected, id) ? 1 : nonselected !== null && nonselected !== void 0 && (_nonselected$includes = nonselected.includes) !== null && _nonselected$includes !== void 0 && _nonselected$includes.call(nonselected, id) ? -1 : 0));
|
|
28
|
+
}, {});
|
|
29
|
+
setSelection(_objectSpread({}, selectionRef.current));
|
|
30
|
+
}, [items, selected, nonselected]);
|
|
31
|
+
var toggleSelection = useCallback(function (id) {
|
|
32
|
+
var isNegative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
33
|
+
var check = isNegative ? -1 : 1;
|
|
34
|
+
if (selectionRef.current[id] !== check) selectionRef.current[id] = check;else if (selectionRef.current[id] === check) selectionRef.current[id] = 0;
|
|
35
|
+
var change = [[], []];
|
|
36
|
+
Object.entries(selectionRef.current).forEach(function (_ref3) {
|
|
37
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
38
|
+
id = _ref4[0],
|
|
39
|
+
select = _ref4[1];
|
|
40
|
+
return select === 1 ? change[0].push(id) : select === -1 ? change[1].push(id) : undefined;
|
|
41
|
+
});
|
|
42
|
+
setSelection(_objectSpread({}, selectionRef.current));
|
|
43
|
+
startTransition(function () {
|
|
44
|
+
onClick === null || onClick === void 0 || onClick(id, isNegative);
|
|
45
|
+
onChange === null || onChange === void 0 || onChange(change[0], change[1]);
|
|
46
|
+
});
|
|
47
|
+
}, []);
|
|
48
|
+
return {
|
|
49
|
+
selection: selection,
|
|
50
|
+
toggleSelection: toggleSelection
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export { useSelectableList };
|
package/dist/esm/index.js
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Dropdown, Icon, CoreIcons, Menu, MenuItem } from '@react-fabric/core';
|
|
4
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* React Fabric
|
|
8
|
+
* @version: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* The MIT License (MIT)
|
|
12
|
+
* Copyright (c) 2024 Adarsh Pastakia
|
|
13
|
+
*
|
|
14
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
|
15
|
+
* and associated documentation files (the "Software"), to deal in the Software without restriction,
|
|
16
|
+
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
17
|
+
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
18
|
+
* subject to the following conditions:
|
|
19
|
+
*
|
|
20
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
21
|
+
* portions of the Software.
|
|
22
|
+
*
|
|
23
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
24
|
+
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
25
|
+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
26
|
+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
var AddColumn = function AddColumn(_ref) {
|
|
30
|
+
var columns = _ref.columns,
|
|
31
|
+
onClick = _ref.onClick;
|
|
32
|
+
return /*#__PURE__*/jsx("div", {
|
|
33
|
+
className: "group font-medium w-6 flex flex-nowrap text-start items-end",
|
|
34
|
+
children: /*#__PURE__*/jsxs(Dropdown, {
|
|
35
|
+
placement: "bottom-end",
|
|
36
|
+
children: [/*#__PURE__*/jsx(Icon, {
|
|
37
|
+
icon: CoreIcons.insert,
|
|
38
|
+
className: "p-1 rounded-t rounded-b-none hover:outline"
|
|
39
|
+
}), /*#__PURE__*/jsx(Menu, {
|
|
40
|
+
className: "text-sm",
|
|
41
|
+
onClick: onClick,
|
|
42
|
+
children: columns.map(function (col) {
|
|
43
|
+
var _col$label;
|
|
44
|
+
return /*#__PURE__*/jsx(MenuItem, {
|
|
45
|
+
id: String(col.id),
|
|
46
|
+
"data-dropdown-dismiss": "false",
|
|
47
|
+
label: "".concat((_col$label = col.label) !== null && _col$label !== void 0 ? _col$label : String(col.id)),
|
|
48
|
+
icon: !col.hidden ? CoreIcons.tick : ""
|
|
49
|
+
}, String(col.id));
|
|
50
|
+
})
|
|
51
|
+
})]
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export { AddColumn };
|