beautiful-grid 1.0.0-rc.1
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/LICENSE +202 -0
- package/NOTICE +6 -0
- package/README.md +977 -0
- package/TRADEMARK.md +17 -0
- package/cjs/BGrid.js +503 -0
- package/cjs/components/CellEditorIcon.js +209 -0
- package/cjs/components/CellNavigationDomSync.js +117 -0
- package/cjs/components/CellTextEditorGateway.js +393 -0
- package/cjs/components/ColResizer.js +144 -0
- package/cjs/components/EditorPortalRoot.js +96 -0
- package/cjs/components/GridOptionalSurfaces.js +47 -0
- package/cjs/components/GripVertical.js +48 -0
- package/cjs/components/Loading.js +76 -0
- package/cjs/components/Pagination.js +93 -0
- package/cjs/components/PluginCellEditor.js +258 -0
- package/cjs/components/RowSelector.js +74 -0
- package/cjs/components/Table.js +2572 -0
- package/cjs/components/TableBody.js +446 -0
- package/cjs/components/TableBodyCell.js +112 -0
- package/cjs/components/TableBodyFrozen.js +44 -0
- package/cjs/components/TableColGroup.js +48 -0
- package/cjs/components/TableColGroupFrozen.js +57 -0
- package/cjs/components/TableFooter.js +70 -0
- package/cjs/components/TableHead.js +195 -0
- package/cjs/components/TableHeadColumn.js +124 -0
- package/cjs/components/TableHeadFrozen.js +165 -0
- package/cjs/components/TableSummary.js +133 -0
- package/cjs/components/TableSummaryFronzen.js +105 -0
- package/cjs/components/columnSortableRuntime.js +46 -0
- package/cjs/components/context-menu/GridContextMenu.js +174 -0
- package/cjs/components/context-menu/index.js +17 -0
- package/cjs/components/scrollbar/CustomScrollbar.js +58 -0
- package/cjs/components/scrollbar/ScrollbarButton.js +69 -0
- package/cjs/components/scrollbar/ScrollbarTrack.js +106 -0
- package/cjs/components/scrollbar/index.js +20 -0
- package/cjs/components/scrollbar/useScrollbarMetrics.js +103 -0
- package/cjs/components/search/GridSearchController.js +170 -0
- package/cjs/components/search/GridSearchPopover.js +163 -0
- package/cjs/components/search/index.js +18 -0
- package/cjs/components/selection/CellSelectionOverlay.js +52 -0
- package/cjs/components/selection/CellSelectionOverlayLayer.js +65 -0
- package/cjs/components/selection/index.js +18 -0
- package/cjs/components/toolbox/TableHeadToolbox.js +308 -0
- package/cjs/components/toolbox/ToolboxCustomSection.js +55 -0
- package/cjs/components/toolbox/ToolboxNumberFilterSection.js +151 -0
- package/cjs/components/toolbox/ToolboxSortSection.js +68 -0
- package/cjs/components/toolbox/ToolboxTextFilterSection.js +114 -0
- package/cjs/components/toolbox/ToolboxValueFilterSection.js +250 -0
- package/cjs/components/toolbox/index.js +22 -0
- package/cjs/components/useColumnSortable.js +70 -0
- package/cjs/editors/createDateEditorPlugin.js +88 -0
- package/cjs/editors/createSelectEditorPlugin.js +98 -0
- package/cjs/editors/defineEditorPlugin.js +17 -0
- package/cjs/editors/index.js +19 -0
- package/cjs/index.js +19 -0
- package/cjs/store/createAppStore.js +1645 -0
- package/cjs/store/index.js +17 -0
- package/cjs/types.js +14 -0
- package/cjs/utils/buildHeaderMatrix.js +265 -0
- package/cjs/utils/cellEditState.js +71 -0
- package/cjs/utils/cellEditTransaction.js +138 -0
- package/cjs/utils/cellSelectionGeometry.js +179 -0
- package/cjs/utils/common.js +154 -0
- package/cjs/utils/coordinate.js +125 -0
- package/cjs/utils/createPivotData.js +271 -0
- package/cjs/utils/delay.js +7 -0
- package/cjs/utils/filterData.js +182 -0
- package/cjs/utils/getCellSelectionAxisState.js +39 -0
- package/cjs/utils/getCellValue.js +21 -0
- package/cjs/utils/getColumnId.js +60 -0
- package/cjs/utils/getFrozenColumnsWidth.js +21 -0
- package/cjs/utils/getLineNumber.js +7 -0
- package/cjs/utils/getVisibleScrollableRowRange.js +24 -0
- package/cjs/utils/gridSearch.js +135 -0
- package/cjs/utils/index.js +39 -0
- package/cjs/utils/mergedCells.js +76 -0
- package/cjs/utils/mouseEventSubscribe.js +119 -0
- package/cjs/utils/number/index.js +19 -0
- package/cjs/utils/number/toFixed.js +6 -0
- package/cjs/utils/number/toMoney.js +13 -0
- package/cjs/utils/number/toNumber.js +12 -0
- package/cjs/utils/processDataQuery.js +126 -0
- package/cjs/utils/rowReorder.js +131 -0
- package/cjs/utils/scrollbar.js +62 -0
- package/cjs/utils/updateDataQuery.js +147 -0
- package/cjs/utils/useBodyData.js +277 -0
- package/cjs/utils/useForceUpdate.js +57 -0
- package/cjs/utils/useRowReorderController.js +666 -0
- package/esm/BGrid.js +466 -0
- package/esm/components/CellEditorIcon.js +115 -0
- package/esm/components/CellNavigationDomSync.js +80 -0
- package/esm/components/CellTextEditorGateway.js +275 -0
- package/esm/components/ColResizer.js +60 -0
- package/esm/components/EditorPortalRoot.js +57 -0
- package/esm/components/GridOptionalSurfaces.js +10 -0
- package/esm/components/GripVertical.js +11 -0
- package/esm/components/Loading.js +24 -0
- package/esm/components/Pagination.js +44 -0
- package/esm/components/PluginCellEditor.js +110 -0
- package/esm/components/RowSelector.js +38 -0
- package/esm/components/Table.js +2347 -0
- package/esm/components/TableBody.js +315 -0
- package/esm/components/TableBodyCell.js +73 -0
- package/esm/components/TableBodyFrozen.js +6 -0
- package/esm/components/TableColGroup.js +10 -0
- package/esm/components/TableColGroupFrozen.js +19 -0
- package/esm/components/TableFooter.js +30 -0
- package/esm/components/TableHead.js +114 -0
- package/esm/components/TableHeadColumn.js +86 -0
- package/esm/components/TableHeadFrozen.js +102 -0
- package/esm/components/TableSummary.js +66 -0
- package/esm/components/TableSummaryFronzen.js +62 -0
- package/esm/components/columnSortableRuntime.js +38 -0
- package/esm/components/context-menu/GridContextMenu.js +115 -0
- package/esm/components/context-menu/index.js +1 -0
- package/esm/components/scrollbar/CustomScrollbar.js +21 -0
- package/esm/components/scrollbar/ScrollbarButton.js +32 -0
- package/esm/components/scrollbar/ScrollbarTrack.js +66 -0
- package/esm/components/scrollbar/index.js +4 -0
- package/esm/components/scrollbar/useScrollbarMetrics.js +74 -0
- package/esm/components/search/GridSearchController.js +98 -0
- package/esm/components/search/GridSearchPopover.js +109 -0
- package/esm/components/search/index.js +2 -0
- package/esm/components/selection/CellSelectionOverlay.js +5 -0
- package/esm/components/selection/CellSelectionOverlayLayer.js +28 -0
- package/esm/components/selection/index.js +2 -0
- package/esm/components/toolbox/TableHeadToolbox.js +223 -0
- package/esm/components/toolbox/ToolboxCustomSection.js +18 -0
- package/esm/components/toolbox/ToolboxNumberFilterSection.js +98 -0
- package/esm/components/toolbox/ToolboxSortSection.js +31 -0
- package/esm/components/toolbox/ToolboxTextFilterSection.js +61 -0
- package/esm/components/toolbox/ToolboxValueFilterSection.js +195 -0
- package/esm/components/toolbox/index.js +6 -0
- package/esm/components/useColumnSortable.js +33 -0
- package/esm/editors/createDateEditorPlugin.js +48 -0
- package/esm/editors/createSelectEditorPlugin.js +60 -0
- package/esm/editors/defineEditorPlugin.js +6 -0
- package/esm/editors/index.js +3 -0
- package/esm/index.js +3 -0
- package/esm/store/createAppStore.js +1483 -0
- package/esm/store/index.js +1 -0
- package/esm/types.js +11 -0
- package/esm/utils/buildHeaderMatrix.js +231 -0
- package/esm/utils/cellEditState.js +32 -0
- package/esm/utils/cellEditTransaction.js +96 -0
- package/esm/utils/cellSelectionGeometry.js +166 -0
- package/esm/utils/common.js +145 -0
- package/esm/utils/coordinate.js +112 -0
- package/esm/utils/createPivotData.js +226 -0
- package/esm/utils/delay.js +1 -0
- package/esm/utils/filterData.js +176 -0
- package/esm/utils/getCellSelectionAxisState.js +34 -0
- package/esm/utils/getCellValue.js +18 -0
- package/esm/utils/getColumnId.js +52 -0
- package/esm/utils/getFrozenColumnsWidth.js +16 -0
- package/esm/utils/getLineNumber.js +3 -0
- package/esm/utils/getVisibleScrollableRowRange.js +20 -0
- package/esm/utils/gridSearch.js +127 -0
- package/esm/utils/index.js +23 -0
- package/esm/utils/mergedCells.js +70 -0
- package/esm/utils/mouseEventSubscribe.js +113 -0
- package/esm/utils/number/index.js +3 -0
- package/esm/utils/number/toFixed.js +3 -0
- package/esm/utils/number/toMoney.js +10 -0
- package/esm/utils/number/toNumber.js +9 -0
- package/esm/utils/processDataQuery.js +119 -0
- package/esm/utils/rowReorder.js +85 -0
- package/esm/utils/scrollbar.js +51 -0
- package/esm/utils/updateDataQuery.js +130 -0
- package/esm/utils/useBodyData.js +153 -0
- package/esm/utils/useForceUpdate.js +5 -0
- package/esm/utils/useRowReorderController.js +603 -0
- package/package.json +54 -0
- package/style.css +2508 -0
- package/types/BGrid.d.ts +3 -0
- package/types/components/CellEditorIcon.d.ts +13 -0
- package/types/components/CellNavigationDomSync.d.ts +17 -0
- package/types/components/CellTextEditorGateway.d.ts +20 -0
- package/types/components/ColResizer.d.ts +12 -0
- package/types/components/EditorPortalRoot.d.ts +8 -0
- package/types/components/GridOptionalSurfaces.d.ts +10 -0
- package/types/components/GripVertical.d.ts +6 -0
- package/types/components/Loading.d.ts +7 -0
- package/types/components/Pagination.d.ts +5 -0
- package/types/components/PluginCellEditor.d.ts +13 -0
- package/types/components/RowSelector.d.ts +10 -0
- package/types/components/Table.d.ts +61 -0
- package/types/components/TableBody.d.ts +39 -0
- package/types/components/TableBodyCell.d.ts +20 -0
- package/types/components/TableBodyFrozen.d.ts +15 -0
- package/types/components/TableColGroup.d.ts +3 -0
- package/types/components/TableColGroupFrozen.d.ts +5 -0
- package/types/components/TableFooter.d.ts +9 -0
- package/types/components/TableHead.d.ts +21 -0
- package/types/components/TableHeadColumn.d.ts +8 -0
- package/types/components/TableHeadFrozen.d.ts +7 -0
- package/types/components/TableSummary.d.ts +13 -0
- package/types/components/TableSummaryFronzen.d.ts +7 -0
- package/types/components/columnSortableRuntime.d.ts +12 -0
- package/types/components/context-menu/GridContextMenu.d.ts +6 -0
- package/types/components/context-menu/index.d.ts +1 -0
- package/types/components/scrollbar/CustomScrollbar.d.ts +11 -0
- package/types/components/scrollbar/ScrollbarButton.d.ts +9 -0
- package/types/components/scrollbar/ScrollbarTrack.d.ts +11 -0
- package/types/components/scrollbar/index.d.ts +4 -0
- package/types/components/scrollbar/useScrollbarMetrics.d.ts +12 -0
- package/types/components/search/GridSearchController.d.ts +1 -0
- package/types/components/search/GridSearchPopover.d.ts +6 -0
- package/types/components/search/index.d.ts +2 -0
- package/types/components/selection/CellSelectionOverlay.d.ts +17 -0
- package/types/components/selection/CellSelectionOverlayLayer.d.ts +18 -0
- package/types/components/selection/index.d.ts +2 -0
- package/types/components/toolbox/TableHeadToolbox.d.ts +13 -0
- package/types/components/toolbox/ToolboxCustomSection.d.ts +11 -0
- package/types/components/toolbox/ToolboxNumberFilterSection.d.ts +8 -0
- package/types/components/toolbox/ToolboxSortSection.d.ts +8 -0
- package/types/components/toolbox/ToolboxTextFilterSection.d.ts +8 -0
- package/types/components/toolbox/ToolboxValueFilterSection.d.ts +8 -0
- package/types/components/toolbox/index.d.ts +6 -0
- package/types/components/useColumnSortable.d.ts +13 -0
- package/types/editors/createDateEditorPlugin.d.ts +8 -0
- package/types/editors/createSelectEditorPlugin.d.ts +15 -0
- package/types/editors/defineEditorPlugin.d.ts +2 -0
- package/types/editors/index.d.ts +3 -0
- package/types/index.d.ts +3 -0
- package/types/store/createAppStore.d.ts +13 -0
- package/types/store/index.d.ts +1 -0
- package/types/types.d.ts +864 -0
- package/types/utils/buildHeaderMatrix.d.ts +32 -0
- package/types/utils/cellEditState.d.ts +12 -0
- package/types/utils/cellEditTransaction.d.ts +14 -0
- package/types/utils/cellSelectionGeometry.d.ts +34 -0
- package/types/utils/common.d.ts +3 -0
- package/types/utils/coordinate.d.ts +29 -0
- package/types/utils/createPivotData.d.ts +12 -0
- package/types/utils/delay.d.ts +1 -0
- package/types/utils/filterData.d.ts +18 -0
- package/types/utils/getCellSelectionAxisState.d.ts +12 -0
- package/types/utils/getCellValue.d.ts +2 -0
- package/types/utils/getColumnId.d.ts +19 -0
- package/types/utils/getFrozenColumnsWidth.d.ts +12 -0
- package/types/utils/getLineNumber.d.ts +6 -0
- package/types/utils/getVisibleScrollableRowRange.d.ts +20 -0
- package/types/utils/gridSearch.d.ts +18 -0
- package/types/utils/index.d.ts +23 -0
- package/types/utils/mergedCells.d.ts +14 -0
- package/types/utils/mouseEventSubscribe.d.ts +18 -0
- package/types/utils/number/index.d.ts +3 -0
- package/types/utils/number/toFixed.d.ts +1 -0
- package/types/utils/number/toMoney.d.ts +1 -0
- package/types/utils/number/toNumber.d.ts +1 -0
- package/types/utils/processDataQuery.d.ts +19 -0
- package/types/utils/rowReorder.d.ts +24 -0
- package/types/utils/scrollbar.d.ts +13 -0
- package/types/utils/updateDataQuery.d.ts +28 -0
- package/types/utils/useBodyData.d.ts +9 -0
- package/types/utils/useForceUpdate.d.ts +1 -0
- package/types/utils/useRowReorderController.d.ts +19 -0
package/TRADEMARK.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# BeautifulGrid trademark policy
|
|
2
|
+
|
|
3
|
+
The Apache License 2.0 applies to the BeautifulGrid source code. It does not grant permission to use AXISJ trademarks, the BeautifulGrid name, logos, or other brand assets in a way that suggests endorsement or an official relationship.
|
|
4
|
+
|
|
5
|
+
You may:
|
|
6
|
+
|
|
7
|
+
- truthfully state that your software uses or is based on BeautifulGrid;
|
|
8
|
+
- use the name to link to the official project or describe compatibility;
|
|
9
|
+
- identify an unmodified distribution as BeautifulGrid.
|
|
10
|
+
|
|
11
|
+
You may not:
|
|
12
|
+
|
|
13
|
+
- present a modified distribution or competing product as the official BeautifulGrid product;
|
|
14
|
+
- use BeautifulGrid branding in a product name, domain, package name, or logo without written permission;
|
|
15
|
+
- imply sponsorship, certification, or endorsement by AXISJ.
|
|
16
|
+
|
|
17
|
+
Forks should use a clearly different product name and visual identity. Questions about permitted trademark use may be sent to tom@axisj.com.
|
package/cjs/BGrid.js
ADDED
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
47
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
48
|
+
if (!m) return o;
|
|
49
|
+
var i = m.call(o), r, ar = [], e;
|
|
50
|
+
try {
|
|
51
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
52
|
+
}
|
|
53
|
+
catch (error) { e = { error: error }; }
|
|
54
|
+
finally {
|
|
55
|
+
try {
|
|
56
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
57
|
+
}
|
|
58
|
+
finally { if (e) throw e.error; }
|
|
59
|
+
}
|
|
60
|
+
return ar;
|
|
61
|
+
};
|
|
62
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
63
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
64
|
+
if (ar || !(i in from)) {
|
|
65
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
66
|
+
ar[i] = from[i];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
70
|
+
};
|
|
71
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
72
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
73
|
+
};
|
|
74
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75
|
+
exports.BGrid = BGrid;
|
|
76
|
+
var React = __importStar(require("react"));
|
|
77
|
+
var Table_1 = __importDefault(require("./components/Table"));
|
|
78
|
+
var utils_1 = require("./utils");
|
|
79
|
+
var store_1 = require("./store");
|
|
80
|
+
function BGrid(_a) {
|
|
81
|
+
var _b, _c, _d;
|
|
82
|
+
var width = _a.width, height = _a.height, _e = _a.headerHeight, headerHeight = _e === void 0 ? 30 : _e, footerHeight = _a.footerHeight, _f = _a.summaryHeight, summaryHeight = _f === void 0 ? 30 : _f, _g = _a.itemHeight, itemHeight = _g === void 0 ? 15 : _g, _h = _a.itemPadding, itemPadding = _h === void 0 ? 7 : _h, columns = _a.columns, columnsGroup = _a.columnsGroup, columnGroups = _a.columnGroups, onChangeColumns = _a.onChangeColumns, _j = _a.frozenColumnIndex, frozenColumnIndex = _j === void 0 ? 0 : _j, _k = _a.frozenRowCount, frozenRowCount = _k === void 0 ? 0 : _k, _l = _a.data, data = _l === void 0 ? [] : _l, page = _a.page, scrollbar = _a.scrollbar, status = _a.status, pagination = _a.pagination, bottomBarHeight = _a.bottomBarHeight, _m = _a.scrollTop, scrollTop = _m === void 0 ? 0 : _m, _o = _a.scrollLeft, scrollLeft = _o === void 0 ? 0 : _o, className = _a.className, style = _a.style, rowChecked = _a.rowChecked, sort = _a.sort, onClick = _a.onClick, _p = _a.loading, loading = _p === void 0 ? false : _p, spinning = _a.spinning, rowKey = _a.rowKey, selectedRowKey = _a.selectedRowKey, editable = _a.editable, onChangeData = _a.onChangeData, showLineNumber = _a.showLineNumber, msg = _a.msg, getRowClassName = _a.getRowClassName, _q = _a.editTrigger, editTrigger = _q === void 0 ? 'dblclick' : _q, cellMergeOptions = _a.cellMergeOptions, cellSelectionOptions = _a.cellSelectionOptions, cellNavigationOptions = _a.cellNavigationOptions, variant = _a.variant, summary = _a.summary, columnSortable = _a.columnSortable, reorder = _a.reorder, pivot = _a.pivot, dataControl = _a.dataControl, icons = _a.icons, searchOptions = _a.searchOptions, contextMenuOptions = _a.contextMenuOptions;
|
|
83
|
+
var warnedSearchControlledRef = React.useRef({ open: false, query: false, pivotContextMenu: false });
|
|
84
|
+
var pivotData = React.useMemo(function () {
|
|
85
|
+
return (0, utils_1.createPivotData)({
|
|
86
|
+
data: data,
|
|
87
|
+
pivot: pivot,
|
|
88
|
+
});
|
|
89
|
+
}, [data, pivot]);
|
|
90
|
+
var pivotEnabled = !!pivotData;
|
|
91
|
+
var resolvedColumns = (_b = pivotData === null || pivotData === void 0 ? void 0 : pivotData.columns) !== null && _b !== void 0 ? _b : columns;
|
|
92
|
+
var resolvedColumnGroups = React.useMemo(function () { return (pivotEnabled ? [] : columnGroups !== null && columnGroups !== void 0 ? columnGroups : []); }, [columnGroups, pivotEnabled]);
|
|
93
|
+
var resolvedColumnsGroup = React.useMemo(function () { var _a; return (_a = pivotData === null || pivotData === void 0 ? void 0 : pivotData.columnsGroup) !== null && _a !== void 0 ? _a : (resolvedColumnGroups.length ? [] : columnsGroup !== null && columnsGroup !== void 0 ? columnsGroup : []); }, [columnsGroup, pivotData === null || pivotData === void 0 ? void 0 : pivotData.columnsGroup, resolvedColumnGroups.length]);
|
|
94
|
+
var resolvedData = (_c = pivotData === null || pivotData === void 0 ? void 0 : pivotData.data) !== null && _c !== void 0 ? _c : data;
|
|
95
|
+
var resolvedPage = pivotEnabled ? undefined : page;
|
|
96
|
+
var resolvedFrozenColumnIndex = pivotEnabled ? 0 : frozenColumnIndex;
|
|
97
|
+
var resolvedRowChecked = pivotEnabled ? undefined : rowChecked;
|
|
98
|
+
var resolvedSort = pivotEnabled ? undefined : sort;
|
|
99
|
+
var resolvedOnClick = pivotEnabled ? undefined : onClick;
|
|
100
|
+
var resolvedOnChangeColumns = pivotEnabled ? undefined : onChangeColumns;
|
|
101
|
+
var resolvedOnChangeData = pivotEnabled ? undefined : onChangeData;
|
|
102
|
+
var resolvedRowKey = pivotEnabled ? undefined : rowKey;
|
|
103
|
+
var resolvedSelectedRowKey = pivotEnabled ? undefined : selectedRowKey;
|
|
104
|
+
var resolvedEditable = pivotEnabled ? false : editable;
|
|
105
|
+
var resolvedShowLineNumber = pivotEnabled ? false : showLineNumber;
|
|
106
|
+
var resolvedGetRowClassName = pivotEnabled ? undefined : getRowClassName;
|
|
107
|
+
var resolvedCellMergeOptions = pivotEnabled ? undefined : cellMergeOptions;
|
|
108
|
+
var resolvedCellSelectionOptions = cellSelectionOptions;
|
|
109
|
+
var resolvedSummary = pivotEnabled ? undefined : summary;
|
|
110
|
+
var resolvedColumnSortable = pivotEnabled ? false : columnSortable;
|
|
111
|
+
var resolvedDataControl = pivotEnabled ? undefined : dataControl;
|
|
112
|
+
var resolvedSearchOptions = pivotEnabled ? undefined : searchOptions;
|
|
113
|
+
var resolvedContextMenuOptions = pivotEnabled ? undefined : contextMenuOptions;
|
|
114
|
+
var hasActiveClientQuery = (resolvedDataControl === null || resolvedDataControl === void 0 ? void 0 : resolvedDataControl.mode) === 'client' &&
|
|
115
|
+
(resolvedDataControl.query.sortParams.length > 0 || resolvedDataControl.query.filterParams.length > 0);
|
|
116
|
+
var resolvedReorder = React.useMemo(function () {
|
|
117
|
+
return pivotEnabled
|
|
118
|
+
? undefined
|
|
119
|
+
: (hasActiveClientQuery || frozenRowCount > 0) && reorder
|
|
120
|
+
? __assign(__assign({}, reorder), { enabled: false }) : reorder;
|
|
121
|
+
}, [frozenRowCount, hasActiveClientQuery, pivotEnabled, reorder]);
|
|
122
|
+
// Development warnings
|
|
123
|
+
React.useEffect(function () {
|
|
124
|
+
var _a, _b;
|
|
125
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
126
|
+
if (resolvedDataControl && resolvedSort) {
|
|
127
|
+
console.warn('[BGrid] Both dataControl and sort props were provided. dataControl will take precedence.');
|
|
128
|
+
}
|
|
129
|
+
if ((resolvedDataControl === null || resolvedDataControl === void 0 ? void 0 : resolvedDataControl.mode) === 'client' && resolvedPage) {
|
|
130
|
+
console.warn('[BGrid] dataControl in "client" mode is used alongside external "page". Filtering is applied only to the current page.');
|
|
131
|
+
}
|
|
132
|
+
if (hasActiveClientQuery && (reorder === null || reorder === void 0 ? void 0 : reorder.enabled)) {
|
|
133
|
+
console.warn('[BGrid] Row reordering is disabled while a client-side sort or filter is active.');
|
|
134
|
+
}
|
|
135
|
+
if (!pivotEnabled && frozenRowCount > 0 && (reorder === null || reorder === void 0 ? void 0 : reorder.enabled)) {
|
|
136
|
+
console.warn('[BGrid] Row reordering is disabled while frozen rows are active.');
|
|
137
|
+
}
|
|
138
|
+
if (((_a = columnGroups === null || columnGroups === void 0 ? void 0 : columnGroups.length) !== null && _a !== void 0 ? _a : 0) > 0 && ((_b = columnsGroup === null || columnsGroup === void 0 ? void 0 : columnsGroup.length) !== null && _b !== void 0 ? _b : 0) > 0) {
|
|
139
|
+
console.warn('[BGrid] Both columnGroups and columnsGroup were provided. columnGroups takes precedence.');
|
|
140
|
+
}
|
|
141
|
+
if (pivotEnabled && frozenRowCount > 0) {
|
|
142
|
+
console.warn('[BGrid] frozenRowCount is disabled while pivot mode is active.');
|
|
143
|
+
}
|
|
144
|
+
if (pivotEnabled && searchOptions && searchOptions.enabled !== false) {
|
|
145
|
+
console.warn('[BGrid] searchOptions is disabled while pivot mode is active.');
|
|
146
|
+
}
|
|
147
|
+
if (pivotEnabled && contextMenuOptions && !warnedSearchControlledRef.current.pivotContextMenu) {
|
|
148
|
+
warnedSearchControlledRef.current.pivotContextMenu = true;
|
|
149
|
+
console.warn('[BGrid] contextMenuOptions is disabled while pivot mode is active.');
|
|
150
|
+
}
|
|
151
|
+
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.open) !== undefined &&
|
|
152
|
+
!searchOptions.onOpenChange &&
|
|
153
|
+
!warnedSearchControlledRef.current.open) {
|
|
154
|
+
warnedSearchControlledRef.current.open = true;
|
|
155
|
+
console.warn('[BGrid] Controlled searchOptions.open requires onOpenChange to respond to user actions.');
|
|
156
|
+
}
|
|
157
|
+
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.query) !== undefined &&
|
|
158
|
+
!searchOptions.onQueryChange &&
|
|
159
|
+
!warnedSearchControlledRef.current.query) {
|
|
160
|
+
warnedSearchControlledRef.current.query = true;
|
|
161
|
+
console.warn('[BGrid] Controlled searchOptions.query requires onQueryChange to respond to user input.');
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}, [
|
|
165
|
+
columnGroups === null || columnGroups === void 0 ? void 0 : columnGroups.length,
|
|
166
|
+
columnsGroup === null || columnsGroup === void 0 ? void 0 : columnsGroup.length,
|
|
167
|
+
frozenRowCount,
|
|
168
|
+
hasActiveClientQuery,
|
|
169
|
+
pivotEnabled,
|
|
170
|
+
reorder === null || reorder === void 0 ? void 0 : reorder.enabled,
|
|
171
|
+
resolvedDataControl,
|
|
172
|
+
resolvedPage,
|
|
173
|
+
resolvedSort,
|
|
174
|
+
contextMenuOptions,
|
|
175
|
+
searchOptions,
|
|
176
|
+
]);
|
|
177
|
+
var duplicateToolboxColumnIds = React.useMemo(function () { return (0, utils_1.findDuplicateColumnIds)(resolvedColumns, true); }, [resolvedColumns]);
|
|
178
|
+
var warnedDuplicateIdsRef = React.useRef(new Set());
|
|
179
|
+
React.useEffect(function () {
|
|
180
|
+
if (process.env.NODE_ENV === 'production')
|
|
181
|
+
return;
|
|
182
|
+
var newDuplicateIds = Array.from(duplicateToolboxColumnIds).filter(function (id) { return !warnedDuplicateIdsRef.current.has(id); });
|
|
183
|
+
if (newDuplicateIds.length === 0)
|
|
184
|
+
return;
|
|
185
|
+
newDuplicateIds.forEach(function (id) { return warnedDuplicateIdsRef.current.add(id); });
|
|
186
|
+
console.warn("[BGrid] Duplicate column IDs detected: ".concat(newDuplicateIds.join(', '), ". Toolbox is disabled for those columns; specify an explicit unique 'id'."));
|
|
187
|
+
}, [duplicateToolboxColumnIds]);
|
|
188
|
+
var computedColumns = React.useMemo(function () {
|
|
189
|
+
var left = 0;
|
|
190
|
+
var prevWidth = 0;
|
|
191
|
+
return __spreadArray(__spreadArray([], __read(resolvedColumns.slice(0, resolvedFrozenColumnIndex).map(function (column) {
|
|
192
|
+
var _a;
|
|
193
|
+
var columnId = (0, utils_1.getColumnId)(column);
|
|
194
|
+
return __assign(__assign({}, column), { columnId: columnId, keyToken: (0, utils_1.getColumnKeyToken)(column.key), toolbox: duplicateToolboxColumnIds.has(columnId) ? false : column.toolbox, left: -1, width: (_a = column.width) !== null && _a !== void 0 ? _a : 100 });
|
|
195
|
+
})), false), __read(resolvedColumns.slice(resolvedFrozenColumnIndex).map(function (column) {
|
|
196
|
+
var _a, _b;
|
|
197
|
+
left += prevWidth;
|
|
198
|
+
prevWidth = (_a = column.width) !== null && _a !== void 0 ? _a : 100;
|
|
199
|
+
var columnId = (0, utils_1.getColumnId)(column);
|
|
200
|
+
return __assign(__assign({}, column), { columnId: columnId, keyToken: (0, utils_1.getColumnKeyToken)(column.key), toolbox: duplicateToolboxColumnIds.has(columnId) ? false : column.toolbox, left: left, width: (_b = column.width) !== null && _b !== void 0 ? _b : 100 });
|
|
201
|
+
})), false);
|
|
202
|
+
}, [duplicateToolboxColumnIds, resolvedColumns, resolvedFrozenColumnIndex]);
|
|
203
|
+
var headerMatrixDiagnostics = React.useMemo(function () {
|
|
204
|
+
return (0, utils_1.buildHeaderMatrix)({
|
|
205
|
+
columns: computedColumns,
|
|
206
|
+
columnsGroup: resolvedColumnsGroup,
|
|
207
|
+
columnGroups: resolvedColumnGroups,
|
|
208
|
+
});
|
|
209
|
+
}, [computedColumns, resolvedColumnGroups, resolvedColumnsGroup]);
|
|
210
|
+
React.useEffect(function () {
|
|
211
|
+
if (process.env.NODE_ENV === 'production')
|
|
212
|
+
return;
|
|
213
|
+
if (headerMatrixDiagnostics.errors.length) {
|
|
214
|
+
console.warn("[BGrid] Invalid column group configuration (".concat(headerMatrixDiagnostics.errors.join(', '), "). The header falls back to a flat layout."));
|
|
215
|
+
}
|
|
216
|
+
var minimumHeaderHeight = headerMatrixDiagnostics.rowCount * 22;
|
|
217
|
+
if (resolvedColumnGroups.length > 0 && headerHeight < minimumHeaderHeight) {
|
|
218
|
+
console.warn("[BGrid] headerHeight ".concat(headerHeight, "px is smaller than the recommended ").concat(minimumHeaderHeight, "px for ").concat(headerMatrixDiagnostics.rowCount, " header rows."));
|
|
219
|
+
}
|
|
220
|
+
}, [headerHeight, headerMatrixDiagnostics, resolvedColumnGroups.length]);
|
|
221
|
+
var unknownQueryColumnIds = React.useMemo(function () {
|
|
222
|
+
if (!resolvedDataControl)
|
|
223
|
+
return [];
|
|
224
|
+
var knownIds = new Set(computedColumns.map(function (column) { return column.columnId; }));
|
|
225
|
+
return Array.from(new Set(__spreadArray(__spreadArray([], __read(resolvedDataControl.query.sortParams.map(function (param) { var _a; return (_a = param.columnId) !== null && _a !== void 0 ? _a : param.key; })), false), __read(resolvedDataControl.query.filterParams.map(function (param) { return param.columnId; })), false).filter(function (id) { return !!id && !knownIds.has(id); })));
|
|
226
|
+
}, [computedColumns, resolvedDataControl]);
|
|
227
|
+
var warnedUnknownQueryIdsRef = React.useRef(new Set());
|
|
228
|
+
React.useEffect(function () {
|
|
229
|
+
if (process.env.NODE_ENV === 'production')
|
|
230
|
+
return;
|
|
231
|
+
var newUnknownIds = unknownQueryColumnIds.filter(function (id) { return !warnedUnknownQueryIdsRef.current.has(id); });
|
|
232
|
+
if (newUnknownIds.length === 0)
|
|
233
|
+
return;
|
|
234
|
+
newUnknownIds.forEach(function (id) { return warnedUnknownQueryIdsRef.current.add(id); });
|
|
235
|
+
console.warn("[BGrid] Query references unknown column IDs: ".concat(newUnknownIds.join(', '), ". Those sort/filter entries are ignored."));
|
|
236
|
+
}, [unknownQueryColumnIds]);
|
|
237
|
+
var resolvedDataQuery = React.useMemo(function () {
|
|
238
|
+
if (resolvedDataControl) {
|
|
239
|
+
return resolvedDataControl.query;
|
|
240
|
+
}
|
|
241
|
+
if (resolvedSort) {
|
|
242
|
+
return {
|
|
243
|
+
sortParams: resolvedSort.sortParams.map(function (s, idx) {
|
|
244
|
+
var _a;
|
|
245
|
+
return (__assign(__assign({}, s), { index: idx, columnId: (_a = s.columnId) !== null && _a !== void 0 ? _a : (s.key ? (Array.isArray(s.key) ? "key:array:".concat(JSON.stringify(s.key)) : "key:string:".concat(s.key)) : undefined) }));
|
|
246
|
+
}),
|
|
247
|
+
filterParams: [],
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
return {
|
|
251
|
+
sortParams: [],
|
|
252
|
+
filterParams: [],
|
|
253
|
+
};
|
|
254
|
+
}, [resolvedDataControl, resolvedSort]);
|
|
255
|
+
// Process data in client mode
|
|
256
|
+
var processedResult = React.useMemo(function () {
|
|
257
|
+
if ((resolvedDataControl === null || resolvedDataControl === void 0 ? void 0 : resolvedDataControl.mode) === 'client') {
|
|
258
|
+
return (0, utils_1.processDataQuery)({
|
|
259
|
+
data: resolvedData,
|
|
260
|
+
columns: computedColumns,
|
|
261
|
+
query: resolvedDataQuery,
|
|
262
|
+
rowKey: resolvedRowKey,
|
|
263
|
+
includeRows: false,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
var sourceIndexByVisibleIndex = resolvedData.map(function (_, i) { return i; });
|
|
267
|
+
var visibleIndexBySourceIndex = new Map(resolvedData.map(function (_, i) { return [i, i]; }));
|
|
268
|
+
return {
|
|
269
|
+
rows: [],
|
|
270
|
+
data: resolvedData,
|
|
271
|
+
sourceIndexByVisibleIndex: sourceIndexByVisibleIndex,
|
|
272
|
+
visibleIndexBySourceIndex: visibleIndexBySourceIndex,
|
|
273
|
+
};
|
|
274
|
+
}, [computedColumns, resolvedData, resolvedDataControl === null || resolvedDataControl === void 0 ? void 0 : resolvedDataControl.mode, resolvedDataQuery, resolvedRowKey]);
|
|
275
|
+
var displayData = processedResult.data;
|
|
276
|
+
var resolvedFrozenRowCount = pivotEnabled
|
|
277
|
+
? 0
|
|
278
|
+
: Math.min(Math.max(Math.floor(frozenRowCount), 0), displayData.length);
|
|
279
|
+
var checkedIndexesMap = React.useMemo(function () {
|
|
280
|
+
if ((resolvedRowChecked === null || resolvedRowChecked === void 0 ? void 0 : resolvedRowChecked.checkedRowKeys) && resolvedRowKey) {
|
|
281
|
+
var map_1 = new Map();
|
|
282
|
+
resolvedRowChecked.checkedRowKeys.forEach(function (key) {
|
|
283
|
+
var fIndex = resolvedData === null || resolvedData === void 0 ? void 0 : resolvedData.findIndex(function (item, index, obj) {
|
|
284
|
+
return (0, utils_1.getCellValueByRowKey)(resolvedRowKey, item.values) === key;
|
|
285
|
+
});
|
|
286
|
+
if (fIndex > -1) {
|
|
287
|
+
map_1.set(fIndex, true);
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
return map_1;
|
|
291
|
+
}
|
|
292
|
+
if (resolvedRowChecked === null || resolvedRowChecked === void 0 ? void 0 : resolvedRowChecked.checkedIndexes) {
|
|
293
|
+
return new Map(resolvedRowChecked === null || resolvedRowChecked === void 0 ? void 0 : resolvedRowChecked.checkedIndexes.map(function (id) { return [id, true]; }));
|
|
294
|
+
}
|
|
295
|
+
return new Map();
|
|
296
|
+
}, [resolvedData, resolvedRowChecked === null || resolvedRowChecked === void 0 ? void 0 : resolvedRowChecked.checkedIndexes, resolvedRowChecked === null || resolvedRowChecked === void 0 ? void 0 : resolvedRowChecked.checkedRowKeys, resolvedRowKey]);
|
|
297
|
+
var sortParams = React.useMemo(function () {
|
|
298
|
+
if (resolvedDataControl) {
|
|
299
|
+
return resolvedDataControl.query.sortParams.reduce(function (acc, cur, currentIndex) {
|
|
300
|
+
var _a;
|
|
301
|
+
var key = (_a = cur.columnId) !== null && _a !== void 0 ? _a : cur.key;
|
|
302
|
+
if (key)
|
|
303
|
+
acc[key] = __assign(__assign({}, cur), { index: currentIndex });
|
|
304
|
+
return acc;
|
|
305
|
+
}, {});
|
|
306
|
+
}
|
|
307
|
+
if (resolvedSort) {
|
|
308
|
+
return resolvedSort.sortParams.reduce(function (acc, cur, currentIndex) {
|
|
309
|
+
if (cur.key)
|
|
310
|
+
acc[cur.key] = __assign(__assign({}, cur), { index: currentIndex });
|
|
311
|
+
return acc;
|
|
312
|
+
}, {});
|
|
313
|
+
}
|
|
314
|
+
return {};
|
|
315
|
+
}, [resolvedDataControl, resolvedSort]);
|
|
316
|
+
var resolvedStatus = React.useMemo(function () { return (0, utils_1.resolveStatusOptions)(status); }, [status]);
|
|
317
|
+
var resolvedPagination = React.useMemo(function () { return (0, utils_1.resolvePaginationViewOptions)(pagination); }, [pagination]);
|
|
318
|
+
var resolvedScrollbar = React.useMemo(function () { return (0, utils_1.resolveScrollbarOptions)(scrollbar); }, [scrollbar]);
|
|
319
|
+
var resolvedBottomBarHeight = (_d = bottomBarHeight !== null && bottomBarHeight !== void 0 ? bottomBarHeight : footerHeight) !== null && _d !== void 0 ? _d : 30;
|
|
320
|
+
var initialShowBottomBar = React.useMemo(function () {
|
|
321
|
+
return (0, utils_1.shouldRenderBottomBar)({
|
|
322
|
+
hasPage: !!resolvedPage,
|
|
323
|
+
scrollbar: resolvedScrollbar,
|
|
324
|
+
status: resolvedStatus,
|
|
325
|
+
pagination: resolvedPagination,
|
|
326
|
+
});
|
|
327
|
+
}, [resolvedPage, resolvedScrollbar, resolvedStatus, resolvedPagination]);
|
|
328
|
+
React.useEffect(function () {
|
|
329
|
+
if (process.env.NODE_ENV !== 'production' && bottomBarHeight !== undefined && footerHeight !== undefined) {
|
|
330
|
+
console.warn('[BGrid] Both bottomBarHeight and footerHeight were provided. bottomBarHeight takes precedence.');
|
|
331
|
+
}
|
|
332
|
+
}, [bottomBarHeight, footerHeight]);
|
|
333
|
+
var initialStoreState = React.useMemo(function () {
|
|
334
|
+
var _a, _b;
|
|
335
|
+
var initialWidth = width !== undefined ? Math.max(width, 100) : 0;
|
|
336
|
+
var initialHeight = height !== undefined ? Math.max(height, 100) : 0;
|
|
337
|
+
var containerBorderWidth = 1;
|
|
338
|
+
var contentBodyHeight = initialHeight > 0
|
|
339
|
+
? Math.max(initialHeight -
|
|
340
|
+
headerHeight -
|
|
341
|
+
(initialShowBottomBar ? resolvedBottomBarHeight : 0) -
|
|
342
|
+
(resolvedSummary ? summaryHeight : 0) -
|
|
343
|
+
containerBorderWidth * 2, 0)
|
|
344
|
+
: 0;
|
|
345
|
+
var displayItemCount = contentBodyHeight > 0 ? Math.ceil(contentBodyHeight / (itemHeight + itemPadding * 2)) : 0;
|
|
346
|
+
var visibleCheckedCount = processedResult.sourceIndexByVisibleIndex.reduce(function (count, sourceIndex) { return count + (checkedIndexesMap.has(sourceIndex) ? 1 : 0); }, 0);
|
|
347
|
+
var checkedAll = displayData.length === 0
|
|
348
|
+
? false
|
|
349
|
+
: visibleCheckedCount === displayData.length
|
|
350
|
+
? true
|
|
351
|
+
: visibleCheckedCount > 0
|
|
352
|
+
? 'indeterminate'
|
|
353
|
+
: false;
|
|
354
|
+
return {
|
|
355
|
+
width: initialWidth,
|
|
356
|
+
height: initialHeight,
|
|
357
|
+
headerHeight: headerHeight,
|
|
358
|
+
footerHeight: footerHeight,
|
|
359
|
+
bottomBarHeight: resolvedBottomBarHeight,
|
|
360
|
+
scrollbar: resolvedScrollbar,
|
|
361
|
+
status: resolvedStatus,
|
|
362
|
+
pagination: resolvedPagination,
|
|
363
|
+
summaryHeight: summaryHeight,
|
|
364
|
+
itemHeight: itemHeight,
|
|
365
|
+
itemPadding: itemPadding,
|
|
366
|
+
frozenColumnIndex: resolvedFrozenColumnIndex,
|
|
367
|
+
frozenRowCount: resolvedFrozenRowCount,
|
|
368
|
+
frozenRowsHeight: resolvedFrozenRowCount * (itemHeight + itemPadding * 2),
|
|
369
|
+
frozenColumnsWidth: (0, utils_1.getFrozenColumnsWidth)({
|
|
370
|
+
showLineNumber: resolvedShowLineNumber,
|
|
371
|
+
rowChecked: resolvedRowChecked,
|
|
372
|
+
itemHeight: itemHeight,
|
|
373
|
+
frozenColumnIndex: resolvedFrozenColumnIndex,
|
|
374
|
+
columns: computedColumns,
|
|
375
|
+
dataLength: displayData.length,
|
|
376
|
+
reorderable: (_a = resolvedReorder === null || resolvedReorder === void 0 ? void 0 : resolvedReorder.enabled) !== null && _a !== void 0 ? _a : false,
|
|
377
|
+
}),
|
|
378
|
+
columns: computedColumns,
|
|
379
|
+
columnsGroup: resolvedColumnsGroup,
|
|
380
|
+
columnGroups: resolvedColumnGroups,
|
|
381
|
+
data: displayData,
|
|
382
|
+
sourceData: resolvedData,
|
|
383
|
+
sourceIndexByVisibleIndex: processedResult.sourceIndexByVisibleIndex,
|
|
384
|
+
visibleIndexBySourceIndex: processedResult.visibleIndexBySourceIndex,
|
|
385
|
+
contentBodyHeight: contentBodyHeight,
|
|
386
|
+
displayItemCount: displayItemCount,
|
|
387
|
+
checkedIndexesMap: checkedIndexesMap,
|
|
388
|
+
checkedAll: checkedAll,
|
|
389
|
+
rowChecked: resolvedRowChecked,
|
|
390
|
+
sort: resolvedSort,
|
|
391
|
+
sortParams: sortParams,
|
|
392
|
+
dataQuery: resolvedDataQuery,
|
|
393
|
+
dataControl: resolvedDataControl,
|
|
394
|
+
icons: icons,
|
|
395
|
+
searchOptions: resolvedSearchOptions,
|
|
396
|
+
contextMenuOptions: resolvedContextMenuOptions,
|
|
397
|
+
page: resolvedPage,
|
|
398
|
+
displayPaginationLength: resolvedPage ? (_b = resolvedPage.displayPaginationLength) !== null && _b !== void 0 ? _b : 5 : 0,
|
|
399
|
+
loading: loading,
|
|
400
|
+
spinning: spinning,
|
|
401
|
+
scrollTop: scrollTop,
|
|
402
|
+
scrollLeft: scrollLeft,
|
|
403
|
+
rowKey: resolvedRowKey,
|
|
404
|
+
selectedRowKey: resolvedSelectedRowKey,
|
|
405
|
+
editable: resolvedEditable,
|
|
406
|
+
editTrigger: editTrigger,
|
|
407
|
+
showLineNumber: resolvedShowLineNumber,
|
|
408
|
+
msg: msg,
|
|
409
|
+
getRowClassName: resolvedGetRowClassName,
|
|
410
|
+
cellMergeOptions: resolvedCellMergeOptions,
|
|
411
|
+
cellNavigationOptions: cellNavigationOptions,
|
|
412
|
+
variant: variant,
|
|
413
|
+
summary: resolvedSummary,
|
|
414
|
+
columnSortable: resolvedColumnSortable,
|
|
415
|
+
reorder: resolvedReorder,
|
|
416
|
+
className: className,
|
|
417
|
+
style: style,
|
|
418
|
+
onClick: resolvedOnClick,
|
|
419
|
+
onChangeColumns: resolvedOnChangeColumns,
|
|
420
|
+
onChangeData: resolvedOnChangeData,
|
|
421
|
+
};
|
|
422
|
+
}, [
|
|
423
|
+
cellNavigationOptions,
|
|
424
|
+
width,
|
|
425
|
+
height,
|
|
426
|
+
headerHeight,
|
|
427
|
+
footerHeight,
|
|
428
|
+
resolvedBottomBarHeight,
|
|
429
|
+
resolvedScrollbar,
|
|
430
|
+
resolvedStatus,
|
|
431
|
+
resolvedPagination,
|
|
432
|
+
summaryHeight,
|
|
433
|
+
itemHeight,
|
|
434
|
+
itemPadding,
|
|
435
|
+
resolvedPage,
|
|
436
|
+
resolvedSummary,
|
|
437
|
+
checkedIndexesMap,
|
|
438
|
+
displayData,
|
|
439
|
+
resolvedData,
|
|
440
|
+
processedResult.sourceIndexByVisibleIndex,
|
|
441
|
+
processedResult.visibleIndexBySourceIndex,
|
|
442
|
+
resolvedFrozenColumnIndex,
|
|
443
|
+
resolvedFrozenRowCount,
|
|
444
|
+
resolvedShowLineNumber,
|
|
445
|
+
resolvedRowChecked,
|
|
446
|
+
computedColumns,
|
|
447
|
+
resolvedReorder,
|
|
448
|
+
resolvedColumnsGroup,
|
|
449
|
+
resolvedColumnGroups,
|
|
450
|
+
resolvedSort,
|
|
451
|
+
sortParams,
|
|
452
|
+
resolvedDataQuery,
|
|
453
|
+
resolvedDataControl,
|
|
454
|
+
icons,
|
|
455
|
+
resolvedSearchOptions,
|
|
456
|
+
resolvedContextMenuOptions,
|
|
457
|
+
loading,
|
|
458
|
+
spinning,
|
|
459
|
+
scrollTop,
|
|
460
|
+
scrollLeft,
|
|
461
|
+
resolvedRowKey,
|
|
462
|
+
resolvedSelectedRowKey,
|
|
463
|
+
resolvedEditable,
|
|
464
|
+
editTrigger,
|
|
465
|
+
msg,
|
|
466
|
+
resolvedGetRowClassName,
|
|
467
|
+
resolvedCellMergeOptions,
|
|
468
|
+
variant,
|
|
469
|
+
resolvedColumnSortable,
|
|
470
|
+
className,
|
|
471
|
+
style,
|
|
472
|
+
resolvedOnClick,
|
|
473
|
+
resolvedOnChangeColumns,
|
|
474
|
+
resolvedOnChangeData,
|
|
475
|
+
initialShowBottomBar,
|
|
476
|
+
]);
|
|
477
|
+
return (React.createElement(store_1.AppStoreProvider, { initialState: initialStoreState },
|
|
478
|
+
React.createElement(Table_1.default, { columns: computedColumns,
|
|
479
|
+
columnsGroup: resolvedColumnsGroup,
|
|
480
|
+
columnGroups: resolvedColumnGroups,
|
|
481
|
+
onChangeColumns: resolvedOnChangeColumns, width: width, height: height, className: className, style: style, loading: loading, spinning: spinning, scrollLeft: scrollLeft, scrollTop: scrollTop, headerHeight: headerHeight, footerHeight: footerHeight, bottomBarHeight: resolvedBottomBarHeight,
|
|
482
|
+
scrollbar: resolvedScrollbar,
|
|
483
|
+
status: resolvedStatus,
|
|
484
|
+
pagination: resolvedPagination, summaryHeight: summaryHeight, itemHeight: itemHeight, itemPadding: itemPadding, frozenColumnIndex: resolvedFrozenColumnIndex,
|
|
485
|
+
frozenRowCount: resolvedFrozenRowCount,
|
|
486
|
+
rowChecked: resolvedRowChecked, checkedIndexesMap: checkedIndexesMap, sort: resolvedSort, sortParams: sortParams, dataQuery: resolvedDataQuery,
|
|
487
|
+
dataControl: resolvedDataControl, icons: icons, searchOptions: resolvedSearchOptions,
|
|
488
|
+
contextMenuOptions: resolvedContextMenuOptions,
|
|
489
|
+
page: resolvedPage,
|
|
490
|
+
data: displayData,
|
|
491
|
+
sourceData: resolvedData,
|
|
492
|
+
sourceIndexByVisibleIndex: processedResult.sourceIndexByVisibleIndex,
|
|
493
|
+
visibleIndexBySourceIndex: processedResult.visibleIndexBySourceIndex,
|
|
494
|
+
onClick: resolvedOnClick,
|
|
495
|
+
rowKey: resolvedRowKey,
|
|
496
|
+
selectedRowKey: resolvedSelectedRowKey,
|
|
497
|
+
editable: resolvedEditable, editTrigger: editTrigger, onChangeData: resolvedOnChangeData,
|
|
498
|
+
showLineNumber: resolvedShowLineNumber, msg: msg, getRowClassName: resolvedGetRowClassName,
|
|
499
|
+
cellMergeOptions: resolvedCellMergeOptions,
|
|
500
|
+
cellSelectionOptions: resolvedCellSelectionOptions, cellNavigationOptions: cellNavigationOptions, variant: variant, summary: resolvedSummary,
|
|
501
|
+
columnSortable: resolvedColumnSortable,
|
|
502
|
+
reorder: resolvedReorder })));
|
|
503
|
+
}
|