qbs-react-grid 2.2.5 → 2.2.9
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/css/qbs-react-grid.css +1 -1
- package/dist/css/qbs-react-grid.min.css +1 -1
- package/dist/css/qbs-react-grid.min.css.map +1 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -1
- package/es/less/qbs-table.less +58 -4
- package/es/qbsTable/CustomTableCell.js +27 -10
- package/es/qbsTable/QbsTable.js +42 -7
- package/es/qbsTable/TableCardList.js +40 -7
- package/es/qbsTable/Toolbar.js +87 -23
- package/es/qbsTable/commontypes.d.ts +19 -0
- package/es/qbsTable/labels.d.ts +25 -0
- package/es/qbsTable/labels.js +32 -0
- package/es/qbsTable/utilities/ColumShowHide.d.ts +3 -0
- package/es/qbsTable/utilities/ColumShowHide.js +112 -33
- package/es/qbsTable/utilities/VerticalDropDownMenu.d.ts +11 -0
- package/es/qbsTable/utilities/VerticalDropDownMenu.js +182 -0
- package/es/qbsTable/utilities/columnToggleCoordinator.d.ts +5 -0
- package/es/qbsTable/utilities/columnToggleCoordinator.js +9 -0
- package/es/qbsTable/utilities/icons.d.ts +3 -0
- package/es/qbsTable/utilities/icons.js +67 -3
- package/es/qbsTable/utilities/verticalMenuCoordinator.d.ts +5 -0
- package/es/qbsTable/utilities/verticalMenuCoordinator.js +9 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -2
- package/lib/less/qbs-table.less +58 -4
- package/lib/qbsTable/CustomTableCell.js +27 -10
- package/lib/qbsTable/QbsTable.js +42 -7
- package/lib/qbsTable/TableCardList.js +40 -7
- package/lib/qbsTable/Toolbar.js +85 -21
- package/lib/qbsTable/commontypes.d.ts +19 -0
- package/lib/qbsTable/labels.d.ts +25 -0
- package/lib/qbsTable/labels.js +40 -0
- package/lib/qbsTable/utilities/ColumShowHide.d.ts +3 -0
- package/lib/qbsTable/utilities/ColumShowHide.js +112 -32
- package/lib/qbsTable/utilities/VerticalDropDownMenu.d.ts +11 -0
- package/lib/qbsTable/utilities/VerticalDropDownMenu.js +190 -0
- package/lib/qbsTable/utilities/columnToggleCoordinator.d.ts +5 -0
- package/lib/qbsTable/utilities/columnToggleCoordinator.js +15 -0
- package/lib/qbsTable/utilities/icons.d.ts +3 -0
- package/lib/qbsTable/utilities/icons.js +72 -5
- package/lib/qbsTable/utilities/verticalMenuCoordinator.d.ts +5 -0
- package/lib/qbsTable/utilities/verticalMenuCoordinator.js +15 -0
- package/package.json +9 -1
- package/src/index.ts +6 -0
- package/src/less/qbs-table.less +58 -4
- package/src/qbsTable/CustomTableCell.tsx +28 -8
- package/src/qbsTable/QbsTable.tsx +32 -4
- package/src/qbsTable/TableCardList.tsx +30 -4
- package/src/qbsTable/Toolbar.tsx +99 -29
- package/src/qbsTable/commontypes.ts +20 -0
- package/src/qbsTable/labels.ts +55 -0
- package/src/qbsTable/utilities/ColumShowHide.tsx +170 -84
- package/src/qbsTable/utilities/VerticalDropDownMenu.tsx +216 -0
- package/src/qbsTable/utilities/columnToggleCoordinator.ts +14 -0
- package/src/qbsTable/utilities/icons.tsx +76 -3
- package/src/qbsTable/utilities/verticalMenuCoordinator.ts +14 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
export var defaultQbsTableLabels = {
|
|
3
|
+
search: 'Search',
|
|
4
|
+
searchAriaLabel: 'Search',
|
|
5
|
+
clear: 'Clear',
|
|
6
|
+
selectedItems: 'Selected items',
|
|
7
|
+
switchToDefaultView: 'Switch to Default View',
|
|
8
|
+
switchToRelaxedView: 'Switch to Relaxed View',
|
|
9
|
+
switchToFullScreen: 'Switch to Full Screen',
|
|
10
|
+
switchToTableView: 'Switch to Table View',
|
|
11
|
+
switchToCardView: 'Switch to Card View',
|
|
12
|
+
noDataFound: 'No Data Found',
|
|
13
|
+
showingRange: function showingRange(start, end, total) {
|
|
14
|
+
return "Showing " + start + " to " + end + " of " + total;
|
|
15
|
+
},
|
|
16
|
+
itemsPerPage: 'Items per page',
|
|
17
|
+
fixedColumns: 'FIXED COLUMNS',
|
|
18
|
+
visibleColumns: 'VISIBLE COLUMNS',
|
|
19
|
+
availableColumns: 'AVAILABLE COLUMNS',
|
|
20
|
+
resetToDefault: 'Reset to default',
|
|
21
|
+
save: 'Save',
|
|
22
|
+
viewMore: 'View More',
|
|
23
|
+
viewLess: 'View Less',
|
|
24
|
+
actions: 'Actions'
|
|
25
|
+
};
|
|
26
|
+
export var mergeQbsTableLabels = function mergeQbsTableLabels(overrides) {
|
|
27
|
+
return _extends({}, defaultQbsTableLabels, overrides);
|
|
28
|
+
};
|
|
29
|
+
export var formatSelectedItems = function formatSelectedItems(count, labels) {
|
|
30
|
+
var merged = mergeQbsTableLabels(labels);
|
|
31
|
+
return merged.selectedItems + " (" + count + ")";
|
|
32
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { QbsColumnProps } from '../commontypes';
|
|
3
|
+
import type { QbsTableLabels } from '../labels';
|
|
3
4
|
interface ColumnToggleProps {
|
|
4
5
|
columns: QbsColumnProps[];
|
|
5
6
|
onToggle: (columnName: string) => void;
|
|
@@ -9,6 +10,8 @@ interface ColumnToggleProps {
|
|
|
9
10
|
handleColumnToggle?: (columns: QbsColumnProps[]) => void;
|
|
10
11
|
handleResetColumns?: () => void;
|
|
11
12
|
tableHeight?: number;
|
|
13
|
+
labels?: QbsTableLabels;
|
|
14
|
+
rtl?: boolean;
|
|
12
15
|
}
|
|
13
16
|
declare const ColumnToggle: React.FC<ColumnToggleProps>;
|
|
14
17
|
export default ColumnToggle;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
1
|
+
import React, { useCallback, useEffect, useId, useRef, useState } from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import { mergeQbsTableLabels } from '../labels';
|
|
4
|
+
import { closeOtherColumnToggles, COLUMN_TOGGLE_CLOSE_OTHERS } from './columnToggleCoordinator';
|
|
2
5
|
import { SettingsIcon } from './icons';
|
|
3
6
|
var ColumnToggle = function ColumnToggle(_ref) {
|
|
7
|
+
var _document$getElementB;
|
|
4
8
|
var columns = _ref.columns,
|
|
5
9
|
onToggle = _ref.onToggle,
|
|
6
10
|
onReorder = _ref.onReorder,
|
|
@@ -9,14 +13,71 @@ var ColumnToggle = function ColumnToggle(_ref) {
|
|
|
9
13
|
handleResetColumns = _ref.handleResetColumns,
|
|
10
14
|
handleColumnToggle = _ref.handleColumnToggle,
|
|
11
15
|
_ref$tableHeight = _ref.tableHeight,
|
|
12
|
-
tableHeight = _ref$tableHeight === void 0 ? 450 : _ref$tableHeight
|
|
16
|
+
tableHeight = _ref$tableHeight === void 0 ? 450 : _ref$tableHeight,
|
|
17
|
+
labelsProp = _ref.labels,
|
|
18
|
+
_ref$rtl = _ref.rtl,
|
|
19
|
+
rtl = _ref$rtl === void 0 ? false : _ref$rtl;
|
|
20
|
+
var labels = mergeQbsTableLabels(labelsProp);
|
|
21
|
+
var toggleId = useId();
|
|
13
22
|
var _useState = useState(null),
|
|
14
23
|
draggedItem = _useState[0],
|
|
15
24
|
setDraggedItem = _useState[1];
|
|
16
25
|
var popupRef = useRef(null);
|
|
26
|
+
var settingsBtnRef = useRef(null);
|
|
17
27
|
var _useState2 = useState(),
|
|
18
28
|
dragOverPosition = _useState2[0],
|
|
19
29
|
setDragOverPosition = _useState2[1];
|
|
30
|
+
var _useState3 = useState({
|
|
31
|
+
top: 0,
|
|
32
|
+
left: 0
|
|
33
|
+
}),
|
|
34
|
+
position = _useState3[0],
|
|
35
|
+
setPosition = _useState3[1];
|
|
36
|
+
var updatePopupPosition = useCallback(function () {
|
|
37
|
+
var _popupRef$current, _popupRef$current2;
|
|
38
|
+
if (!settingsBtnRef.current) return;
|
|
39
|
+
var rect = settingsBtnRef.current.getBoundingClientRect();
|
|
40
|
+
var viewportPadding = 8;
|
|
41
|
+
var popupWidth = ((_popupRef$current = popupRef.current) === null || _popupRef$current === void 0 ? void 0 : _popupRef$current.offsetWidth) || 272;
|
|
42
|
+
var popupHeight = ((_popupRef$current2 = popupRef.current) === null || _popupRef$current2 === void 0 ? void 0 : _popupRef$current2.offsetHeight) || 320;
|
|
43
|
+
var left = rtl ? rect.left : rect.right - popupWidth;
|
|
44
|
+
if (left + popupWidth > window.innerWidth - viewportPadding) {
|
|
45
|
+
left = Math.max(viewportPadding, window.innerWidth - popupWidth - viewportPadding);
|
|
46
|
+
}
|
|
47
|
+
if (left < viewportPadding) {
|
|
48
|
+
left = viewportPadding;
|
|
49
|
+
}
|
|
50
|
+
var top = rect.bottom + 4;
|
|
51
|
+
if (top + popupHeight > window.innerHeight - viewportPadding) {
|
|
52
|
+
top = Math.max(viewportPadding, rect.top - popupHeight - 4);
|
|
53
|
+
}
|
|
54
|
+
setPosition({
|
|
55
|
+
top: top,
|
|
56
|
+
left: left
|
|
57
|
+
});
|
|
58
|
+
}, [rtl]);
|
|
59
|
+
useEffect(function () {
|
|
60
|
+
var handleCloseOthers = function handleCloseOthers(event) {
|
|
61
|
+
var detail = event.detail;
|
|
62
|
+
if ((detail === null || detail === void 0 ? void 0 : detail.exceptId) !== toggleId) {
|
|
63
|
+
setIsOpen(false);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
document.addEventListener(COLUMN_TOGGLE_CLOSE_OTHERS, handleCloseOthers);
|
|
67
|
+
return function () {
|
|
68
|
+
return document.removeEventListener(COLUMN_TOGGLE_CLOSE_OTHERS, handleCloseOthers);
|
|
69
|
+
};
|
|
70
|
+
}, [setIsOpen, toggleId]);
|
|
71
|
+
useEffect(function () {
|
|
72
|
+
if (!isOpen) return;
|
|
73
|
+
updatePopupPosition();
|
|
74
|
+
var frame = requestAnimationFrame(function () {
|
|
75
|
+
return updatePopupPosition();
|
|
76
|
+
});
|
|
77
|
+
return function () {
|
|
78
|
+
return cancelAnimationFrame(frame);
|
|
79
|
+
};
|
|
80
|
+
}, [isOpen, updatePopupPosition]);
|
|
20
81
|
var handleToggle = useCallback(function (columnName) {
|
|
21
82
|
onToggle(columnName);
|
|
22
83
|
}, [onToggle]);
|
|
@@ -39,18 +100,22 @@ var ColumnToggle = function ColumnToggle(_ref) {
|
|
|
39
100
|
setDragOverPosition(null);
|
|
40
101
|
}
|
|
41
102
|
setDraggedItem(null);
|
|
42
|
-
}, [columns, draggedItem]);
|
|
103
|
+
}, [columns, draggedItem, onReorder]);
|
|
43
104
|
var handleClickOutside = useCallback(function (event) {
|
|
44
|
-
|
|
45
|
-
|
|
105
|
+
var _popupRef$current3, _settingsBtnRef$curre;
|
|
106
|
+
var target = event.target;
|
|
107
|
+
if ((_popupRef$current3 = popupRef.current) !== null && _popupRef$current3 !== void 0 && _popupRef$current3.contains(target) || (_settingsBtnRef$curre = settingsBtnRef.current) !== null && _settingsBtnRef$curre !== void 0 && _settingsBtnRef$curre.contains(target)) {
|
|
108
|
+
return;
|
|
46
109
|
}
|
|
110
|
+
setIsOpen(false);
|
|
47
111
|
}, [setIsOpen]);
|
|
48
112
|
useEffect(function () {
|
|
113
|
+
if (!isOpen) return;
|
|
49
114
|
document.addEventListener('mousedown', handleClickOutside);
|
|
50
115
|
return function () {
|
|
51
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
116
|
+
return document.removeEventListener('mousedown', handleClickOutside);
|
|
52
117
|
};
|
|
53
|
-
}, [handleClickOutside]);
|
|
118
|
+
}, [handleClickOutside, isOpen]);
|
|
54
119
|
var renderFixedColumn = function renderFixedColumn(column, index) {
|
|
55
120
|
return /*#__PURE__*/React.createElement("div", {
|
|
56
121
|
key: column.title,
|
|
@@ -142,79 +207,93 @@ var ColumnToggle = function ColumnToggle(_ref) {
|
|
|
142
207
|
var _columns$filter;
|
|
143
208
|
return ((_columns$filter = columns.filter(function (item) {
|
|
144
209
|
return !item.isVisible;
|
|
145
|
-
})) === null || _columns$filter === void 0 ? void 0 : _columns$filter.length) > 0
|
|
210
|
+
})) === null || _columns$filter === void 0 ? void 0 : _columns$filter.length) > 0;
|
|
146
211
|
};
|
|
147
212
|
var handleColToggle = function handleColToggle() {
|
|
148
213
|
setIsOpen(false);
|
|
149
214
|
handleColumnToggle === null || handleColumnToggle === void 0 ? void 0 : handleColumnToggle(columns);
|
|
150
215
|
};
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
}, /*#__PURE__*/React.createElement(SettingsIcon, null)), isOpen && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
156
|
-
className: "qbs-table-column-popup",
|
|
216
|
+
var portalTarget = (_document$getElementB = document.getElementById('portal-root')) != null ? _document$getElementB : document.body;
|
|
217
|
+
var popupContent = /*#__PURE__*/React.createElement("div", {
|
|
218
|
+
className: "qbs-table-column-popup" + (rtl ? ' qbs-table-column-popup--rtl' : ''),
|
|
157
219
|
style: {
|
|
158
|
-
|
|
220
|
+
position: 'fixed',
|
|
221
|
+
top: position.top,
|
|
222
|
+
left: position.left,
|
|
223
|
+
maxHeight: tableHeight - 40,
|
|
224
|
+
zIndex: 10060
|
|
159
225
|
},
|
|
160
|
-
ref: popupRef
|
|
226
|
+
ref: popupRef,
|
|
227
|
+
dir: rtl ? 'rtl' : 'ltr'
|
|
161
228
|
}, /*#__PURE__*/React.createElement("div", {
|
|
162
229
|
className: "qbs-table-popup-container"
|
|
163
230
|
}, /*#__PURE__*/React.createElement("div", {
|
|
164
231
|
className: "qbs-table-popup-item"
|
|
165
232
|
}, /*#__PURE__*/React.createElement("div", {
|
|
166
233
|
className: "qbs-table-popup-label"
|
|
167
|
-
},
|
|
234
|
+
}, labels.fixedColumns), /*#__PURE__*/React.createElement("div", {
|
|
168
235
|
className: "qbs-table-columns-container"
|
|
169
236
|
}, /*#__PURE__*/React.createElement("div", {
|
|
170
237
|
className: "qbs-table-column"
|
|
171
238
|
}, columns.map(function (column, index) {
|
|
172
|
-
return column.fixed ? renderFixedColumn(column, index) :
|
|
239
|
+
return column.fixed ? renderFixedColumn(column, index) : null;
|
|
173
240
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
174
241
|
className: "qbs-table-divider"
|
|
175
242
|
}), /*#__PURE__*/React.createElement("div", {
|
|
176
243
|
className: "qbs-table-popup-item"
|
|
177
244
|
}, /*#__PURE__*/React.createElement("div", {
|
|
178
245
|
className: "qbs-table-popup-label"
|
|
179
|
-
},
|
|
246
|
+
}, labels.visibleColumns), /*#__PURE__*/React.createElement("div", {
|
|
180
247
|
className: "qbs-table-columns-container"
|
|
181
248
|
}, /*#__PURE__*/React.createElement("div", {
|
|
182
249
|
className: "qbs-table-column"
|
|
183
250
|
}, columns.map(function (column, index) {
|
|
184
|
-
return column.isVisible && !column.fixed ? renderColumn(column, index) :
|
|
251
|
+
return column.isVisible && !column.fixed ? renderColumn(column, index) : null;
|
|
185
252
|
})))), handleAvailableColumns() && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
186
253
|
className: "qbs-table-divider"
|
|
187
254
|
}), /*#__PURE__*/React.createElement("div", {
|
|
188
255
|
className: "qbs-table-popup-item"
|
|
189
256
|
}, /*#__PURE__*/React.createElement("div", {
|
|
190
257
|
className: "qbs-table-popup-label"
|
|
191
|
-
},
|
|
258
|
+
}, labels.availableColumns), /*#__PURE__*/React.createElement("div", {
|
|
192
259
|
className: "qbs-table-columns-container"
|
|
193
260
|
}, /*#__PURE__*/React.createElement("div", {
|
|
194
261
|
className: "qbs-table-column"
|
|
195
262
|
}, columns.map(function (column, index) {
|
|
196
|
-
return !column.isVisible && !column.fixed ? renderFixedColumn(column, index) :
|
|
263
|
+
return !column.isVisible && !column.fixed ? renderFixedColumn(column, index) : null;
|
|
197
264
|
})))))), handleResetColumns && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
198
265
|
className: "qbs-table-divider"
|
|
199
266
|
}), /*#__PURE__*/React.createElement("div", {
|
|
200
|
-
className: "qbs-table-popup-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
flexDirection: 'row',
|
|
204
|
-
justifyContent: 'space-between'
|
|
205
|
-
}
|
|
206
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
267
|
+
className: "qbs-table-popup-footer"
|
|
268
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
269
|
+
type: "button",
|
|
207
270
|
className: "qbs-table-reset-link",
|
|
208
|
-
href: "#",
|
|
209
271
|
onClick: function onClick() {
|
|
210
272
|
return handleResetColumns === null || handleResetColumns === void 0 ? void 0 : handleResetColumns();
|
|
211
273
|
}
|
|
212
|
-
},
|
|
274
|
+
}, labels.resetToDefault), /*#__PURE__*/React.createElement("button", {
|
|
275
|
+
type: "button",
|
|
213
276
|
className: "qbs-table-reset-link",
|
|
214
|
-
href: "#",
|
|
215
277
|
onClick: function onClick() {
|
|
216
278
|
return handleColToggle();
|
|
217
279
|
}
|
|
218
|
-
},
|
|
280
|
+
}, labels.save))));
|
|
281
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
282
|
+
className: "qbs-table-settings-wrapper"
|
|
283
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
284
|
+
type: "button",
|
|
285
|
+
className: "qbs-table-settings-btn",
|
|
286
|
+
ref: settingsBtnRef,
|
|
287
|
+
onClick: function onClick(event) {
|
|
288
|
+
event.stopPropagation();
|
|
289
|
+
if (isOpen) {
|
|
290
|
+
setIsOpen(false);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
closeOtherColumnToggles(toggleId);
|
|
294
|
+
updatePopupPosition();
|
|
295
|
+
setIsOpen(true);
|
|
296
|
+
}
|
|
297
|
+
}, /*#__PURE__*/React.createElement(SettingsIcon, null)), isOpen && portalTarget && /*#__PURE__*/ReactDOM.createPortal(popupContent, portalTarget));
|
|
219
298
|
};
|
|
220
299
|
export default ColumnToggle;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ActionProps } from '../commontypes';
|
|
3
|
+
type VerticalMenuDropdownProps = {
|
|
4
|
+
actionDropDown?: readonly ActionProps[];
|
|
5
|
+
handleMenuActions?: (actions: ActionProps, rowData: any) => void;
|
|
6
|
+
rowData: any;
|
|
7
|
+
tableBodyRef?: React.RefObject<HTMLDivElement>;
|
|
8
|
+
rowIndex?: number;
|
|
9
|
+
};
|
|
10
|
+
declare const VerticalMenuDropdown: React.FC<VerticalMenuDropdownProps>;
|
|
11
|
+
export default VerticalMenuDropdown;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
3
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
4
|
+
import React, { useEffect, useId, useRef, useState } from 'react';
|
|
5
|
+
import ReactDOM from 'react-dom';
|
|
6
|
+
import { ThreeDotIcon } from './icons';
|
|
7
|
+
import TooltipComponent from './ToolTip';
|
|
8
|
+
import { closeOtherVerticalMenus, VERTICAL_MENU_CLOSE_OTHERS } from './verticalMenuCoordinator';
|
|
9
|
+
var VerticalMenuDropdown = function VerticalMenuDropdown(_ref) {
|
|
10
|
+
var _actionDropDown$filte2, _document$getElementB;
|
|
11
|
+
var actionDropDown = _ref.actionDropDown,
|
|
12
|
+
handleMenuActions = _ref.handleMenuActions,
|
|
13
|
+
rowData = _ref.rowData,
|
|
14
|
+
tableBodyRef = _ref.tableBodyRef,
|
|
15
|
+
rowIndex = _ref.rowIndex;
|
|
16
|
+
var _useState = useState(false),
|
|
17
|
+
openMenu = _useState[0],
|
|
18
|
+
setOpenMenu = _useState[1];
|
|
19
|
+
var _useState2 = useState({
|
|
20
|
+
top: 0,
|
|
21
|
+
left: 0
|
|
22
|
+
}),
|
|
23
|
+
position = _useState2[0],
|
|
24
|
+
setPosition = _useState2[1];
|
|
25
|
+
var menuId = useId();
|
|
26
|
+
var menuButtonRef = useRef(null);
|
|
27
|
+
var menuRef = useRef(null);
|
|
28
|
+
useEffect(function () {
|
|
29
|
+
var handleCloseOthers = function handleCloseOthers(event) {
|
|
30
|
+
var detail = event.detail;
|
|
31
|
+
if ((detail === null || detail === void 0 ? void 0 : detail.exceptId) !== menuId) {
|
|
32
|
+
setOpenMenu(false);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
document.addEventListener(VERTICAL_MENU_CLOSE_OTHERS, handleCloseOthers);
|
|
36
|
+
return function () {
|
|
37
|
+
return document.removeEventListener(VERTICAL_MENU_CLOSE_OTHERS, handleCloseOthers);
|
|
38
|
+
};
|
|
39
|
+
}, [menuId]);
|
|
40
|
+
var updateMenuPosition = function updateMenuPosition() {
|
|
41
|
+
var _actionDropDown$filte;
|
|
42
|
+
if (!menuButtonRef.current) return;
|
|
43
|
+
var rect = menuButtonRef.current.getBoundingClientRect();
|
|
44
|
+
var viewportPadding = 8;
|
|
45
|
+
var menuGap = 4;
|
|
46
|
+
var visibleItems = (_actionDropDown$filte = actionDropDown === null || actionDropDown === void 0 ? void 0 : actionDropDown.filter(function (item) {
|
|
47
|
+
var _item$hide$call, _item$hide;
|
|
48
|
+
return !item.hidden && !((_item$hide$call = (_item$hide = item.hide) === null || _item$hide === void 0 ? void 0 : _item$hide.call(item, rowData, rowIndex)) != null ? _item$hide$call : false);
|
|
49
|
+
})) != null ? _actionDropDown$filte : [];
|
|
50
|
+
var menuWidth = menuRef.current && menuRef.current.offsetWidth > 0 ? menuRef.current.offsetWidth : Math.max(120, visibleItems.length * 48);
|
|
51
|
+
var menuHeight = visibleItems.length * 40;
|
|
52
|
+
var spaceBelow = window.innerHeight - rect.bottom;
|
|
53
|
+
var openBelow = spaceBelow >= menuHeight + menuGap;
|
|
54
|
+
var left = rect.left;
|
|
55
|
+
if (left + menuWidth > window.innerWidth - viewportPadding) {
|
|
56
|
+
left = Math.max(viewportPadding, rect.right - menuWidth);
|
|
57
|
+
}
|
|
58
|
+
setPosition({
|
|
59
|
+
top: openBelow ? rect.bottom + menuGap : rect.top - menuHeight - menuGap,
|
|
60
|
+
left: left
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
useEffect(function () {
|
|
64
|
+
if (!openMenu) return;
|
|
65
|
+
updateMenuPosition();
|
|
66
|
+
var frame = requestAnimationFrame(function () {
|
|
67
|
+
return updateMenuPosition();
|
|
68
|
+
});
|
|
69
|
+
var resizeObserver = menuRef.current && typeof ResizeObserver !== 'undefined' ? new ResizeObserver(function () {
|
|
70
|
+
return updateMenuPosition();
|
|
71
|
+
}) : null;
|
|
72
|
+
if (resizeObserver && menuRef.current) {
|
|
73
|
+
resizeObserver.observe(menuRef.current);
|
|
74
|
+
}
|
|
75
|
+
return function () {
|
|
76
|
+
cancelAnimationFrame(frame);
|
|
77
|
+
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
|
|
78
|
+
};
|
|
79
|
+
}, [openMenu]);
|
|
80
|
+
useEffect(function () {
|
|
81
|
+
if (!openMenu) return;
|
|
82
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
83
|
+
var _menuRef$current, _menuButtonRef$curren;
|
|
84
|
+
var target = event.target;
|
|
85
|
+
if ((_menuRef$current = menuRef.current) !== null && _menuRef$current !== void 0 && _menuRef$current.contains(target) || (_menuButtonRef$curren = menuButtonRef.current) !== null && _menuButtonRef$curren !== void 0 && _menuButtonRef$curren.contains(target)) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
setOpenMenu(false);
|
|
89
|
+
};
|
|
90
|
+
var handleScroll = function handleScroll() {
|
|
91
|
+
return setOpenMenu(false);
|
|
92
|
+
};
|
|
93
|
+
document.addEventListener('click', handleClickOutside);
|
|
94
|
+
window.addEventListener('scroll', handleScroll, true);
|
|
95
|
+
return function () {
|
|
96
|
+
document.removeEventListener('click', handleClickOutside);
|
|
97
|
+
window.removeEventListener('scroll', handleScroll, true);
|
|
98
|
+
};
|
|
99
|
+
}, [openMenu]);
|
|
100
|
+
useEffect(function () {
|
|
101
|
+
var scrollbarHandle = document.querySelector('.rs-table-scrollbar-handle');
|
|
102
|
+
if (!scrollbarHandle) return;
|
|
103
|
+
var observer = new MutationObserver(function (mutations) {
|
|
104
|
+
for (var _iterator = _createForOfIteratorHelperLoose(mutations), _step; !(_step = _iterator()).done;) {
|
|
105
|
+
var mutation = _step.value;
|
|
106
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'style') {
|
|
107
|
+
setOpenMenu(false);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
observer.observe(scrollbarHandle, {
|
|
112
|
+
attributes: true,
|
|
113
|
+
attributeFilter: ['style']
|
|
114
|
+
});
|
|
115
|
+
return function () {
|
|
116
|
+
return observer.disconnect();
|
|
117
|
+
};
|
|
118
|
+
}, [openMenu]);
|
|
119
|
+
var handleMenuItemClick = function handleMenuItemClick(slug) {
|
|
120
|
+
var _slug$action;
|
|
121
|
+
handleMenuActions === null || handleMenuActions === void 0 ? void 0 : handleMenuActions(slug, rowData);
|
|
122
|
+
(_slug$action = slug.action) === null || _slug$action === void 0 ? void 0 : _slug$action.call(slug, rowData);
|
|
123
|
+
setOpenMenu(false);
|
|
124
|
+
};
|
|
125
|
+
var visibleCount = (_actionDropDown$filte2 = actionDropDown === null || actionDropDown === void 0 ? void 0 : actionDropDown.filter(function (item) {
|
|
126
|
+
var _item$hide$call2, _item$hide2;
|
|
127
|
+
return !item.hidden && !((_item$hide$call2 = (_item$hide2 = item.hide) === null || _item$hide2 === void 0 ? void 0 : _item$hide2.call(item, rowData, rowIndex)) != null ? _item$hide$call2 : false);
|
|
128
|
+
}).length) != null ? _actionDropDown$filte2 : 0;
|
|
129
|
+
var portalTarget = (_document$getElementB = document.getElementById('portal-root')) != null ? _document$getElementB : document.body;
|
|
130
|
+
var dropdownContent = /*#__PURE__*/React.createElement("div", {
|
|
131
|
+
className: "absolute z-[60] min-w-48 rounded-md vertical-menu-dropdown-content",
|
|
132
|
+
ref: menuRef,
|
|
133
|
+
style: {
|
|
134
|
+
top: position.top,
|
|
135
|
+
left: position.left,
|
|
136
|
+
position: 'fixed',
|
|
137
|
+
minWidth: 120,
|
|
138
|
+
width: 'max-content'
|
|
139
|
+
}
|
|
140
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: "py-1"
|
|
142
|
+
}, actionDropDown === null || actionDropDown === void 0 ? void 0 : actionDropDown.map(function (item) {
|
|
143
|
+
var _item$hide$call3, _item$hide3;
|
|
144
|
+
return !item.hidden && !((_item$hide$call3 = (_item$hide3 = item.hide) === null || _item$hide3 === void 0 ? void 0 : _item$hide3.call(item, rowData, rowIndex)) != null ? _item$hide$call3 : false) ? /*#__PURE__*/React.createElement("div", {
|
|
145
|
+
key: item.title,
|
|
146
|
+
className: "vertical-menu-item px-4 py-2 text-sm text-base-black hover:bg-gray-light-1 cursor-pointer flex items-center gap-2 transition-colors",
|
|
147
|
+
onClick: function onClick(e) {
|
|
148
|
+
var _item$action;
|
|
149
|
+
e.preventDefault();
|
|
150
|
+
(_item$action = item.action) === null || _item$action === void 0 ? void 0 : _item$action.call(item, item);
|
|
151
|
+
handleMenuItemClick(item);
|
|
152
|
+
}
|
|
153
|
+
}, /*#__PURE__*/React.createElement(TooltipComponent, {
|
|
154
|
+
title: item.toolTip,
|
|
155
|
+
tableBodyRef: tableBodyRef
|
|
156
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
157
|
+
className: "vertical-menu-icon-title flex items-center gap-2"
|
|
158
|
+
}, item.icon && /*#__PURE__*/React.createElement("span", {
|
|
159
|
+
className: "vertical-menu-icon"
|
|
160
|
+
}, item.icon), /*#__PURE__*/React.createElement("span", {
|
|
161
|
+
className: "vertical-menu-title"
|
|
162
|
+
}, item.title)))) : null;
|
|
163
|
+
})));
|
|
164
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
165
|
+
className: "inline-block vertical-menu-dropdown-wrapper"
|
|
166
|
+
}, visibleCount > 0 && /*#__PURE__*/React.createElement("button", {
|
|
167
|
+
type: "button",
|
|
168
|
+
className: "vertical-menu-trigger-button p-2 rounded text-base-gray hover:bg-gray-light-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
169
|
+
onClick: function onClick(event) {
|
|
170
|
+
event.stopPropagation();
|
|
171
|
+
if (openMenu) {
|
|
172
|
+
setOpenMenu(false);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
closeOtherVerticalMenus(menuId);
|
|
176
|
+
updateMenuPosition();
|
|
177
|
+
setOpenMenu(true);
|
|
178
|
+
},
|
|
179
|
+
ref: menuButtonRef
|
|
180
|
+
}, /*#__PURE__*/React.createElement(ThreeDotIcon, null))), openMenu && portalTarget && /*#__PURE__*/ReactDOM.createPortal(dropdownContent, portalTarget));
|
|
181
|
+
};
|
|
182
|
+
export default VerticalMenuDropdown;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var COLUMN_TOGGLE_CLOSE_OTHERS = 'qbs-column-toggle-close-others';
|
|
2
|
+
export var closeOtherColumnToggles = function closeOtherColumnToggles(exceptId) {
|
|
3
|
+
if (typeof document === 'undefined') return;
|
|
4
|
+
document.dispatchEvent(new CustomEvent(COLUMN_TOGGLE_CLOSE_OTHERS, {
|
|
5
|
+
detail: {
|
|
6
|
+
exceptId: exceptId
|
|
7
|
+
}
|
|
8
|
+
}));
|
|
9
|
+
};
|
|
@@ -6,3 +6,6 @@ export declare const TableIcon: React.FC<any>;
|
|
|
6
6
|
export declare const CardIcon: React.FC<any>;
|
|
7
7
|
export declare const CardView: React.FC<any>;
|
|
8
8
|
export declare const TableView: React.FC<any>;
|
|
9
|
+
export declare const ExpandIcon: React.FC<any>;
|
|
10
|
+
export declare const ContentView: React.FC<any>;
|
|
11
|
+
export declare const DefaultView: React.FC<any>;
|
|
@@ -8,7 +8,7 @@ export var ThreeDotIcon = function ThreeDotIcon() {
|
|
|
8
8
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9
9
|
}, /*#__PURE__*/React.createElement("path", {
|
|
10
10
|
d: "M2 2.16665L2 2.17498M2 7.99998L2 8.00831M2 13.8333L2 13.8416M2 2.99998C1.53976 2.99998 1.16667 2.62688 1.16667 2.16665C1.16667 1.70641 1.53976 1.33331 2 1.33331C2.46024 1.33331 2.83333 1.70641 2.83333 2.16665C2.83333 2.62688 2.46024 2.99998 2 2.99998ZM2 8.83331C1.53976 8.83331 1.16667 8.46022 1.16667 7.99998C1.16667 7.53974 1.53976 7.16665 2 7.16665C2.46024 7.16665 2.83333 7.53974 2.83333 7.99998C2.83333 8.46022 2.46024 8.83331 2 8.83331ZM2 14.6666C1.53976 14.6666 1.16666 14.2935 1.16666 13.8333C1.16666 13.3731 1.53976 13 2 13C2.46024 13 2.83333 13.3731 2.83333 13.8333C2.83333 14.2935 2.46024 14.6666 2 14.6666Z",
|
|
11
|
-
stroke: "
|
|
11
|
+
stroke: "currentColor",
|
|
12
12
|
strokeWidth: "1.5",
|
|
13
13
|
strokeLinecap: "round",
|
|
14
14
|
strokeLinejoin: "round"
|
|
@@ -25,13 +25,13 @@ export var SettingsIcon = function SettingsIcon() {
|
|
|
25
25
|
fillRule: "evenodd",
|
|
26
26
|
clipRule: "evenodd",
|
|
27
27
|
d: "M10 12.5C8.61929 12.5 7.5 11.3807 7.5 10C7.5 8.61929 8.61929 7.5 10 7.5C11.3807 7.5 12.5 8.61929 12.5 10C12.5 11.3807 11.3807 12.5 10 12.5Z",
|
|
28
|
-
stroke: "
|
|
28
|
+
stroke: "currentColor",
|
|
29
29
|
strokeWidth: "1.5",
|
|
30
30
|
strokeLinecap: "round",
|
|
31
31
|
strokeLinejoin: "round"
|
|
32
32
|
}), /*#__PURE__*/React.createElement("path", {
|
|
33
33
|
d: "M1.66797 9.26718C1.66797 8.40052 2.3763 7.68385 3.2513 7.68385C4.75964 7.68385 5.3763 6.61718 4.61797 5.30885C4.18464 4.55885 4.44297 3.58385 5.2013 3.15052L6.64297 2.32552C7.3013 1.93385 8.1513 2.16718 8.54297 2.82552L8.63463 2.98385C9.38463 4.29218 10.618 4.29218 11.3763 2.98385L11.468 2.82552C11.8596 2.16718 12.7096 1.93385 13.368 2.32552L14.8096 3.15052C15.568 3.58385 15.8263 4.55885 15.393 5.30885C14.6346 6.61718 15.2513 7.68385 16.7596 7.68385C17.6263 7.68385 18.343 8.39218 18.343 9.26718V10.7338C18.343 11.6005 17.6346 12.3172 16.7596 12.3172C15.2513 12.3172 14.6346 13.3838 15.393 14.6922C15.8263 15.4505 15.568 16.4172 14.8096 16.8505L13.368 17.6755C12.7096 18.0672 11.8596 17.8339 11.468 17.1755L11.3763 17.0172C10.6263 15.7089 9.39297 15.7089 8.63463 17.0172L8.54297 17.1755C8.1513 17.8339 7.3013 18.0672 6.64297 17.6755L5.2013 16.8505C4.44297 16.4172 4.18464 15.4422 4.61797 14.6922C5.3763 13.3838 4.75964 12.3172 3.2513 12.3172C2.3763 12.3172 1.66797 11.6005 1.66797 10.7338V9.26718Z",
|
|
34
|
-
stroke: "
|
|
34
|
+
stroke: "currentColor",
|
|
35
35
|
strokeWidth: "1.5",
|
|
36
36
|
strokeLinecap: "round",
|
|
37
37
|
strokeLinejoin: "round"
|
|
@@ -125,4 +125,68 @@ export var TableView = function TableView(_ref5) {
|
|
|
125
125
|
stroke: "currentColor",
|
|
126
126
|
strokeWidth: "1.5"
|
|
127
127
|
}));
|
|
128
|
+
};
|
|
129
|
+
export var ExpandIcon = function ExpandIcon(_ref6) {
|
|
130
|
+
var className = _ref6.className;
|
|
131
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
132
|
+
width: "16",
|
|
133
|
+
height: "16",
|
|
134
|
+
className: className,
|
|
135
|
+
viewBox: "0 0 16 16",
|
|
136
|
+
fill: "none",
|
|
137
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
138
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
139
|
+
d: "M2.66797 5.33073V2.66406M2.66797 2.66406H5.33464M2.66797 2.66406L6.0013 5.9974M13.3346 5.33073V2.66406M13.3346 2.66406H10.668M13.3346 2.66406L10.0013 5.9974M2.66797 10.6641V13.3307M2.66797 13.3307H5.33464M2.66797 13.3307L6.0013 9.9974M13.3346 13.3307L10.0013 9.9974M13.3346 13.3307V10.6641M13.3346 13.3307H10.668",
|
|
140
|
+
stroke: "currentColor",
|
|
141
|
+
strokeWidth: "1.5",
|
|
142
|
+
strokeLinecap: "round",
|
|
143
|
+
strokeLinejoin: "round"
|
|
144
|
+
}));
|
|
145
|
+
};
|
|
146
|
+
export var ContentView = function ContentView(_ref7) {
|
|
147
|
+
var className = _ref7.className;
|
|
148
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
149
|
+
width: "16",
|
|
150
|
+
height: "17",
|
|
151
|
+
className: className,
|
|
152
|
+
viewBox: "0 0 16 17",
|
|
153
|
+
fill: "none",
|
|
154
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
155
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
156
|
+
d: "M4.00344 9.48438C3.24485 9.48438 2.94141 9.80804 2.94141 10.6122V12.6553C2.94141 13.4594 3.24485 13.7831 4.00344 13.7831H11.994C12.7526 13.7831 13.056 13.4594 13.056 12.6553V10.6122C13.056 9.80804 12.7526 9.48438 11.994 9.48438H4.00344Z",
|
|
157
|
+
stroke: "currentColor",
|
|
158
|
+
strokeLinecap: "round",
|
|
159
|
+
strokeLinejoin: "round"
|
|
160
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
161
|
+
d: "M4.00344 3.66406C3.24485 3.66406 2.94141 3.98773 2.94141 4.79184V6.835C2.94141 7.63911 3.24485 7.96278 4.00344 7.96278H11.994C12.7526 7.96278 13.056 7.63911 13.056 6.835V4.79184C13.056 3.98773 12.7526 3.66406 11.994 3.66406H4.00344Z",
|
|
162
|
+
stroke: "currentColor",
|
|
163
|
+
strokeLinecap: "round",
|
|
164
|
+
strokeLinejoin: "round"
|
|
165
|
+
}));
|
|
166
|
+
};
|
|
167
|
+
export var DefaultView = function DefaultView(_ref8) {
|
|
168
|
+
var className = _ref8.className;
|
|
169
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
170
|
+
width: "16",
|
|
171
|
+
height: "17",
|
|
172
|
+
className: className,
|
|
173
|
+
viewBox: "0 0 16 17",
|
|
174
|
+
fill: "none",
|
|
175
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
176
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
177
|
+
fillRule: "evenodd",
|
|
178
|
+
clipRule: "evenodd",
|
|
179
|
+
d: "M2.39844 4.72969C2.39844 4.28786 2.75661 3.92969 3.19844 3.92969H12.7984C13.2403 3.92969 13.5984 4.28786 13.5984 4.72969C13.5984 5.17152 13.2403 5.52969 12.7984 5.52969H3.19844C2.75661 5.52969 2.39844 5.17152 2.39844 4.72969Z",
|
|
180
|
+
fill: "currentColor"
|
|
181
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
182
|
+
fillRule: "evenodd",
|
|
183
|
+
clipRule: "evenodd",
|
|
184
|
+
d: "M2.39844 8.72969C2.39844 8.28786 2.75661 7.92969 3.19844 7.92969H12.7984C13.2403 7.92969 13.5984 8.28786 13.5984 8.72969C13.5984 9.17152 13.2403 9.52969 12.7984 9.52969H3.19844C2.75661 9.52969 2.39844 9.17152 2.39844 8.72969Z",
|
|
185
|
+
fill: "currentColor"
|
|
186
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
187
|
+
fillRule: "evenodd",
|
|
188
|
+
clipRule: "evenodd",
|
|
189
|
+
d: "M2.39844 12.7297C2.39844 12.2879 2.75661 11.9297 3.19844 11.9297H12.7984C13.2403 11.9297 13.5984 12.2879 13.5984 12.7297C13.5984 13.1715 13.2403 13.5297 12.7984 13.5297H3.19844C2.75661 13.5297 2.39844 13.1715 2.39844 12.7297Z",
|
|
190
|
+
fill: "currentColor"
|
|
191
|
+
}));
|
|
128
192
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var VERTICAL_MENU_CLOSE_OTHERS = 'qbs-vertical-menu-close-others';
|
|
2
|
+
export var closeOtherVerticalMenus = function closeOtherVerticalMenus(exceptId) {
|
|
3
|
+
if (typeof document === 'undefined') return;
|
|
4
|
+
document.dispatchEvent(new CustomEvent(VERTICAL_MENU_CLOSE_OTHERS, {
|
|
5
|
+
detail: {
|
|
6
|
+
exceptId: exceptId
|
|
7
|
+
}
|
|
8
|
+
}));
|
|
9
|
+
};
|
package/lib/index.d.ts
CHANGED
|
@@ -12,4 +12,6 @@ export type { CellProps } from './Cell';
|
|
|
12
12
|
export type { HeaderCellProps } from './HeaderCell';
|
|
13
13
|
export type { ColumnGroupProps } from './ColumnGroup';
|
|
14
14
|
export type { QbsTableProps } from './qbsTable/commontypes';
|
|
15
|
+
export type { QbsTableLabels } from './qbsTable/labels';
|
|
16
|
+
export { mergeQbsTableLabels, defaultQbsTableLabels, formatSelectedItems, } from './qbsTable/labels';
|
|
15
17
|
export type { StandardProps, SortType, RowDataType, RowKeyType, TableSizeChangeEventName } from './@types/common';
|
package/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
|
-
exports.Table = exports.QbsTable = exports.Pagination = exports.HeaderCell = exports.ColumnGroup = exports.Column = exports.Cell = void 0;
|
|
5
|
+
exports.mergeQbsTableLabels = exports.formatSelectedItems = exports.defaultQbsTableLabels = exports.Table = exports.QbsTable = exports.Pagination = exports.HeaderCell = exports.ColumnGroup = exports.Column = exports.Cell = void 0;
|
|
6
6
|
var _Table = _interopRequireDefault(require("./Table"));
|
|
7
7
|
exports.Table = _Table["default"];
|
|
8
8
|
var _Column = _interopRequireDefault(require("./Column"));
|
|
@@ -16,4 +16,8 @@ exports.HeaderCell = _HeaderCell["default"];
|
|
|
16
16
|
var _ColumnGroup = _interopRequireDefault(require("./ColumnGroup"));
|
|
17
17
|
exports.ColumnGroup = _ColumnGroup["default"];
|
|
18
18
|
var _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
19
|
-
exports.Pagination = _Pagination["default"];
|
|
19
|
+
exports.Pagination = _Pagination["default"];
|
|
20
|
+
var _labels = require("./qbsTable/labels");
|
|
21
|
+
exports.mergeQbsTableLabels = _labels.mergeQbsTableLabels;
|
|
22
|
+
exports.defaultQbsTableLabels = _labels.defaultQbsTableLabels;
|
|
23
|
+
exports.formatSelectedItems = _labels.formatSelectedItems;
|