@ackplus/react-tanstack-data-table 1.0.34 → 1.1.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 +21 -0
- package/{src → dist}/index.d.ts +21 -4
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +63 -0
- package/{src → dist}/lib/components/droupdown/menu-dropdown.d.ts +2 -1
- package/dist/lib/components/droupdown/menu-dropdown.d.ts.map +1 -0
- package/{src → dist}/lib/components/droupdown/menu-dropdown.js +38 -7
- package/{src → dist}/lib/components/filters/filter-value-input.d.ts +3 -1
- package/dist/lib/components/filters/filter-value-input.d.ts.map +1 -0
- package/dist/lib/components/filters/filter-value-input.js +83 -0
- package/{src → dist}/lib/components/filters/index.d.ts +1 -0
- package/dist/lib/components/filters/index.d.ts.map +1 -0
- package/dist/lib/components/filters/index.js +142 -0
- package/{src → dist}/lib/components/headers/draggable-header.d.ts +2 -2
- package/dist/lib/components/headers/draggable-header.d.ts.map +1 -0
- package/{src → dist}/lib/components/headers/draggable-header.js +81 -17
- package/dist/lib/components/headers/index.d.ts +6 -0
- package/dist/lib/components/headers/index.d.ts.map +1 -0
- package/dist/lib/components/headers/index.js +21 -0
- package/{src → dist}/lib/components/headers/table-header.d.ts +15 -1
- package/dist/lib/components/headers/table-header.d.ts.map +1 -0
- package/{src → dist}/lib/components/headers/table-header.js +50 -17
- package/{src → dist}/lib/components/index.d.ts +6 -1
- package/dist/lib/components/index.d.ts.map +1 -0
- package/dist/lib/components/index.js +32 -0
- package/{src → dist}/lib/components/pagination/data-table-pagination.d.ts +2 -1
- package/dist/lib/components/pagination/data-table-pagination.d.ts.map +1 -0
- package/{src → dist}/lib/components/pagination/data-table-pagination.js +20 -6
- package/dist/lib/components/pagination/index.d.ts +5 -0
- package/dist/lib/components/pagination/index.d.ts.map +1 -0
- package/dist/lib/components/pagination/index.js +20 -0
- package/{src → dist}/lib/components/rows/data-table-row.d.ts +15 -2
- package/dist/lib/components/rows/data-table-row.d.ts.map +1 -0
- package/{src → dist}/lib/components/rows/data-table-row.js +58 -25
- package/{src → dist}/lib/components/rows/empty-data-row.d.ts +3 -3
- package/dist/lib/components/rows/empty-data-row.d.ts.map +1 -0
- package/{src → dist}/lib/components/rows/empty-data-row.js +12 -4
- package/dist/lib/components/rows/index.d.ts +7 -0
- package/dist/lib/components/rows/index.d.ts.map +1 -0
- package/dist/lib/components/rows/index.js +22 -0
- package/{src → dist}/lib/components/rows/loading-rows.d.ts +3 -1
- package/dist/lib/components/rows/loading-rows.d.ts.map +1 -0
- package/{src → dist}/lib/components/rows/loading-rows.js +27 -19
- package/{src → dist}/lib/components/toolbar/bulk-actions-toolbar.d.ts +4 -3
- package/dist/lib/components/toolbar/bulk-actions-toolbar.d.ts.map +1 -0
- package/dist/lib/components/toolbar/bulk-actions-toolbar.js +49 -0
- package/{src → dist}/lib/components/toolbar/column-filter-control.d.ts +3 -1
- package/dist/lib/components/toolbar/column-filter-control.d.ts.map +1 -0
- package/{src → dist}/lib/components/toolbar/column-filter-control.js +73 -4
- package/{src → dist}/lib/components/toolbar/column-pinning-control.d.ts +2 -1
- package/dist/lib/components/toolbar/column-pinning-control.d.ts.map +1 -0
- package/{src → dist}/lib/components/toolbar/column-pinning-control.js +71 -7
- package/{src → dist}/lib/components/toolbar/column-reset-control.d.ts +3 -1
- package/dist/lib/components/toolbar/column-reset-control.d.ts.map +1 -0
- package/{src → dist}/lib/components/toolbar/column-reset-control.js +9 -3
- package/{src → dist}/lib/components/toolbar/column-visibility-control.d.ts +2 -1
- package/dist/lib/components/toolbar/column-visibility-control.d.ts.map +1 -0
- package/dist/lib/components/toolbar/column-visibility-control.js +77 -0
- package/{src → dist}/lib/components/toolbar/data-table-toolbar.d.ts +3 -2
- package/dist/lib/components/toolbar/data-table-toolbar.d.ts.map +1 -0
- package/{src → dist}/lib/components/toolbar/data-table-toolbar.js +17 -4
- package/{src → dist}/lib/components/toolbar/index.d.ts +4 -0
- package/dist/lib/components/toolbar/index.d.ts.map +1 -0
- package/{src → dist}/lib/components/toolbar/index.js +6 -0
- package/dist/lib/components/toolbar/table-export-control.d.ts +12 -0
- package/dist/lib/components/toolbar/table-export-control.d.ts.map +1 -0
- package/dist/lib/components/toolbar/table-export-control.js +67 -0
- package/{src → dist}/lib/components/toolbar/table-search-control.d.ts +3 -1
- package/dist/lib/components/toolbar/table-search-control.d.ts.map +1 -0
- package/{src → dist}/lib/components/toolbar/table-search-control.js +45 -2
- package/{src → dist}/lib/components/toolbar/table-size-control.d.ts +3 -1
- package/dist/lib/components/toolbar/table-size-control.d.ts.map +1 -0
- package/{src → dist}/lib/components/toolbar/table-size-control.js +20 -8
- package/{src → dist}/lib/contexts/data-table-context.d.ts +6 -2
- package/dist/lib/contexts/data-table-context.d.ts.map +1 -0
- package/{src → dist}/lib/contexts/data-table-context.js +34 -1
- package/dist/lib/data-table.d.ts +5 -0
- package/dist/lib/data-table.d.ts.map +1 -0
- package/{src/lib/components/table → dist/lib}/data-table.js +449 -151
- package/dist/lib/features/column-filter.feature.d.ts +55 -0
- package/dist/lib/features/column-filter.feature.d.ts.map +1 -0
- package/{src → dist}/lib/features/column-filter.feature.js +116 -18
- package/dist/lib/features/index.d.ts +9 -0
- package/dist/lib/features/index.d.ts.map +1 -0
- package/{src → dist}/lib/features/index.js +7 -0
- package/{src → dist}/lib/features/selection.feature.d.ts +8 -1
- package/dist/lib/features/selection.feature.d.ts.map +1 -0
- package/{src → dist}/lib/features/selection.feature.js +76 -15
- package/dist/lib/icons/add-icon.d.ts +4 -0
- package/dist/lib/icons/add-icon.d.ts.map +1 -0
- package/dist/lib/icons/add-icon.js +12 -0
- package/dist/lib/icons/csv-icon.d.ts +4 -0
- package/dist/lib/icons/csv-icon.d.ts.map +1 -0
- package/dist/lib/icons/csv-icon.js +12 -0
- package/dist/lib/icons/delete-icon.d.ts +4 -0
- package/dist/lib/icons/delete-icon.d.ts.map +1 -0
- package/dist/lib/icons/delete-icon.js +12 -0
- package/dist/lib/icons/excel-icon.d.ts +4 -0
- package/dist/lib/icons/excel-icon.d.ts.map +1 -0
- package/dist/lib/icons/excel-icon.js +12 -0
- package/dist/lib/icons/index.d.ts +8 -0
- package/dist/lib/icons/index.d.ts.map +1 -0
- package/dist/lib/icons/unpin-icon.d.ts +4 -0
- package/dist/lib/icons/unpin-icon.d.ts.map +1 -0
- package/dist/lib/icons/unpin-icon.js +12 -0
- package/{src → dist}/lib/icons/view-comfortable-icon.d.ts +3 -1
- package/dist/lib/icons/view-comfortable-icon.d.ts.map +1 -0
- package/dist/lib/icons/view-comfortable-icon.js +12 -0
- package/dist/lib/icons/view-compact-icon.d.ts +4 -0
- package/dist/lib/icons/view-compact-icon.d.ts.map +1 -0
- package/dist/lib/icons/view-compact-icon.js +12 -0
- package/{src → dist}/lib/types/column.types.d.ts +10 -1
- package/dist/lib/types/column.types.d.ts.map +1 -0
- package/{src → dist}/lib/types/data-table-api.d.ts +2 -1
- package/dist/lib/types/data-table-api.d.ts.map +1 -0
- package/{src/lib/components/table → dist/lib/types}/data-table.types.d.ts +10 -10
- package/dist/lib/types/data-table.types.d.ts.map +1 -0
- package/{src → dist}/lib/types/export.types.d.ts +38 -0
- package/dist/lib/types/export.types.d.ts.map +1 -0
- package/dist/lib/types/export.types.js +6 -0
- package/{src → dist}/lib/types/index.d.ts +5 -0
- package/dist/lib/types/index.d.ts.map +1 -0
- package/dist/lib/types/index.js +30 -0
- package/{src → dist}/lib/types/slots.types.d.ts +50 -3
- package/dist/lib/types/slots.types.d.ts.map +1 -0
- package/{src → dist}/lib/types/table.types.d.ts +14 -0
- package/dist/lib/types/table.types.d.ts.map +1 -0
- package/{src → dist}/lib/utils/column-helpers.d.ts +10 -0
- package/dist/lib/utils/column-helpers.d.ts.map +1 -0
- package/{src → dist}/lib/utils/column-helpers.js +20 -4
- package/{src → dist}/lib/utils/debounced-fetch.utils.d.ts +3 -5
- package/dist/lib/utils/debounced-fetch.utils.d.ts.map +1 -0
- package/{src → dist}/lib/utils/debounced-fetch.utils.js +12 -6
- package/{src → dist}/lib/utils/export-utils.d.ts +13 -0
- package/dist/lib/utils/export-utils.d.ts.map +1 -0
- package/dist/lib/utils/export-utils.js +252 -0
- package/{src → dist}/lib/utils/index.d.ts +4 -0
- package/dist/lib/utils/index.d.ts.map +1 -0
- package/dist/lib/utils/index.js +35 -0
- package/{src → dist}/lib/utils/logger.d.ts +43 -0
- package/dist/lib/utils/logger.d.ts.map +1 -0
- package/{src → dist}/lib/utils/logger.js +22 -2
- package/{src → dist}/lib/utils/slot-helpers.d.ts +39 -1
- package/dist/lib/utils/slot-helpers.d.ts.map +1 -0
- package/{src → dist}/lib/utils/slot-helpers.js +55 -6
- package/{src → dist}/lib/utils/special-columns.utils.d.ts +10 -0
- package/dist/lib/utils/special-columns.utils.d.ts.map +1 -0
- package/{src → dist}/lib/utils/special-columns.utils.js +41 -5
- package/{src → dist}/lib/utils/styling-helpers.d.ts +20 -0
- package/dist/lib/utils/styling-helpers.d.ts.map +1 -0
- package/dist/lib/utils/styling-helpers.js +108 -0
- package/{src → dist}/lib/utils/table-helpers.d.ts +25 -0
- package/dist/lib/utils/table-helpers.d.ts.map +1 -0
- package/{src → dist}/lib/utils/table-helpers.js +24 -0
- package/package.json +36 -11
- package/src/index.ts +71 -0
- package/src/lib/components/droupdown/menu-dropdown.tsx +97 -0
- package/src/lib/components/filters/filter-value-input.tsx +225 -0
- package/src/lib/components/filters/{index.js → index.ts} +3 -6
- package/src/lib/components/headers/draggable-header.tsx +326 -0
- package/src/lib/components/headers/{index.d.ts → index.ts} +4 -0
- package/src/lib/components/headers/table-header.tsx +173 -0
- package/src/lib/components/index.ts +21 -0
- package/src/lib/components/pagination/data-table-pagination.tsx +99 -0
- package/src/lib/components/pagination/index.ts +5 -0
- package/src/lib/components/rows/data-table-row.tsx +208 -0
- package/src/lib/components/rows/empty-data-row.tsx +69 -0
- package/src/lib/components/rows/{index.d.ts → index.ts} +4 -0
- package/src/lib/components/rows/loading-rows.tsx +160 -0
- package/src/lib/components/toolbar/bulk-actions-toolbar.tsx +125 -0
- package/src/lib/components/toolbar/column-filter-control.tsx +374 -0
- package/src/lib/components/toolbar/column-pinning-control.tsx +275 -0
- package/src/lib/components/toolbar/column-reset-control.tsx +74 -0
- package/src/lib/components/toolbar/column-visibility-control.tsx +105 -0
- package/src/lib/components/toolbar/data-table-toolbar.tsx +229 -0
- package/src/lib/components/toolbar/index.ts +17 -0
- package/src/lib/components/toolbar/table-export-control.tsx +179 -0
- package/src/lib/components/toolbar/table-search-control.tsx +155 -0
- package/src/lib/components/toolbar/table-size-control.tsx +102 -0
- package/src/lib/contexts/data-table-context.tsx +112 -0
- package/src/lib/data-table.tsx +1911 -0
- package/src/lib/features/README.md +161 -0
- package/src/lib/features/column-filter.feature.ts +456 -0
- package/src/lib/features/index.ts +23 -0
- package/src/lib/features/selection.feature.ts +318 -0
- package/src/lib/icons/add-icon.tsx +23 -0
- package/src/lib/icons/csv-icon.tsx +15 -0
- package/src/lib/icons/delete-icon.tsx +30 -0
- package/src/lib/icons/excel-icon.tsx +15 -0
- package/src/lib/icons/unpin-icon.tsx +18 -0
- package/src/lib/icons/view-comfortable-icon.tsx +45 -0
- package/src/lib/icons/view-compact-icon.tsx +55 -0
- package/src/lib/types/column.types.ts +44 -0
- package/src/lib/types/data-table-api.ts +169 -0
- package/src/lib/types/data-table.types.ts +139 -0
- package/src/lib/types/export.types.ts +154 -0
- package/src/lib/types/index.ts +22 -0
- package/src/lib/types/slots.types.ts +332 -0
- package/src/lib/types/table.types.ts +90 -0
- package/src/lib/utils/column-helpers.ts +72 -0
- package/src/lib/utils/debounced-fetch.utils.ts +54 -0
- package/src/lib/utils/export-utils.ts +285 -0
- package/src/lib/utils/index.ts +27 -0
- package/src/lib/utils/logger.ts +203 -0
- package/src/lib/utils/slot-helpers.tsx +194 -0
- package/src/lib/utils/special-columns.utils.ts +94 -0
- package/src/lib/utils/styling-helpers.ts +126 -0
- package/src/lib/utils/table-helpers.ts +106 -0
- package/src/index.js +0 -27
- package/src/lib/components/filters/filter-value-input.js +0 -41
- package/src/lib/components/headers/index.js +0 -5
- package/src/lib/components/index.js +0 -10
- package/src/lib/components/pagination/index.d.ts +0 -1
- package/src/lib/components/pagination/index.js +0 -4
- package/src/lib/components/rows/index.js +0 -6
- package/src/lib/components/table/data-table.d.ts +0 -4
- package/src/lib/components/table/index.d.ts +0 -2
- package/src/lib/components/table/index.js +0 -5
- package/src/lib/components/toolbar/bulk-actions-toolbar.js +0 -30
- package/src/lib/components/toolbar/column-visibility-control.js +0 -31
- package/src/lib/components/toolbar/table-export-control.d.ts +0 -31
- package/src/lib/components/toolbar/table-export-control.js +0 -56
- package/src/lib/examples/advanced-features-example.d.ts +0 -1
- package/src/lib/examples/advanced-features-example.js +0 -269
- package/src/lib/examples/bulk-actions-test.d.ts +0 -1
- package/src/lib/examples/bulk-actions-test.js +0 -44
- package/src/lib/examples/custom-column-filter-example.d.ts +0 -1
- package/src/lib/examples/custom-column-filter-example.js +0 -60
- package/src/lib/examples/index.d.ts +0 -8
- package/src/lib/examples/index.js +0 -19
- package/src/lib/examples/selection-test-example.d.ts +0 -1
- package/src/lib/examples/selection-test-example.js +0 -101
- package/src/lib/examples/server-side-fetching-example.d.ts +0 -1
- package/src/lib/examples/server-side-fetching-example.js +0 -245
- package/src/lib/examples/server-side-test.d.ts +0 -1
- package/src/lib/examples/server-side-test.js +0 -9
- package/src/lib/examples/simple-local-example.d.ts +0 -1
- package/src/lib/examples/simple-local-example.js +0 -95
- package/src/lib/examples/simple-slots-example.d.ts +0 -1
- package/src/lib/examples/simple-slots-example.js +0 -115
- package/src/lib/features/column-filter.feature.d.ts +0 -45
- package/src/lib/features/index.d.ts +0 -2
- package/src/lib/hooks/index.d.ts +0 -1
- package/src/lib/hooks/index.js +0 -4
- package/src/lib/hooks/use-data-table-api.d.ts +0 -46
- package/src/lib/hooks/use-data-table-api.js +0 -690
- package/src/lib/icons/add-icon.d.ts +0 -2
- package/src/lib/icons/add-icon.js +0 -8
- package/src/lib/icons/csv-icon.d.ts +0 -2
- package/src/lib/icons/csv-icon.js +0 -8
- package/src/lib/icons/delete-icon.d.ts +0 -2
- package/src/lib/icons/delete-icon.js +0 -8
- package/src/lib/icons/excel-icon.d.ts +0 -2
- package/src/lib/icons/excel-icon.js +0 -8
- package/src/lib/icons/unpin-icon.d.ts +0 -2
- package/src/lib/icons/unpin-icon.js +0 -8
- package/src/lib/icons/view-comfortable-icon.js +0 -8
- package/src/lib/icons/view-compact-icon.d.ts +0 -2
- package/src/lib/icons/view-compact-icon.js +0 -8
- package/src/lib/types/export.types.js +0 -2
- package/src/lib/types/index.js +0 -8
- package/src/lib/utils/export-utils.js +0 -175
- package/src/lib/utils/index.js +0 -11
- package/src/lib/utils/styling-helpers.js +0 -70
- package/tsconfig.tsbuildinfo +0 -1
- /package/{src → dist}/lib/icons/index.js +0 -0
- /package/{src → dist}/lib/types/column.types.js +0 -0
- /package/{src → dist}/lib/types/data-table-api.js +0 -0
- /package/{src/lib/components/table → dist/lib/types}/data-table.types.js +0 -0
- /package/{src → dist}/lib/types/slots.types.js +0 -0
- /package/{src → dist}/lib/types/table.types.js +0 -0
- /package/src/lib/icons/{index.d.ts → index.ts} +0 -0
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BulkActionsToolbar = BulkActionsToolbar;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const data_table_context_1 = require("../../contexts/data-table-context");
|
|
9
|
-
const slot_helpers_1 = require("../../utils/slot-helpers");
|
|
10
|
-
function BulkActionsToolbar(props) {
|
|
11
|
-
const { selectionState, selectedRowCount, bulkActions, chipProps, containerSx, leftSectionSx, rightSectionSx, fadeProps, sx } = props, otherProps = tslib_1.__rest(props, ["selectionState", "selectedRowCount", "bulkActions", "chipProps", "containerSx", "leftSectionSx", "rightSectionSx", "fadeProps", "sx"]);
|
|
12
|
-
const { slots, slotProps } = (0, data_table_context_1.useDataTableContext)();
|
|
13
|
-
const toolbarSlotProps = (0, slot_helpers_1.extractSlotProps)(slotProps, 'bulkActionsToolbar');
|
|
14
|
-
const ToolbarSlot = (0, slot_helpers_1.getSlotComponent)(slots, 'bulkActionsToolbar', material_1.Toolbar);
|
|
15
|
-
const renderedBulkActions = (0, react_1.useMemo)(() => {
|
|
16
|
-
if (!bulkActions)
|
|
17
|
-
return null;
|
|
18
|
-
return bulkActions(selectionState);
|
|
19
|
-
}, [bulkActions, selectionState]);
|
|
20
|
-
const mergedToolbarProps = (0, slot_helpers_1.mergeSlotProps)({
|
|
21
|
-
sx: Object.assign(Object.assign({ pl: { sm: 2 }, pr: { xs: 1, sm: 1 }, bgcolor: (theme) => (0, material_1.alpha)(theme.palette.primary.main, 0.05), mb: 1, position: 'relative', zIndex: 1 }, sx), containerSx),
|
|
22
|
-
}, toolbarSlotProps, otherProps);
|
|
23
|
-
const mergedChipProps = (0, slot_helpers_1.mergeSlotProps)({
|
|
24
|
-
label: `${selectedRowCount} selected`,
|
|
25
|
-
size: 'small',
|
|
26
|
-
color: 'primary',
|
|
27
|
-
variant: 'outlined',
|
|
28
|
-
}, chipProps || {});
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Fade, Object.assign({ in: selectedRowCount > 0 }, fadeProps, { children: (0, jsx_runtime_1.jsxs)(ToolbarSlot, Object.assign({}, mergedToolbarProps, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: Object.assign({ flex: '1 1 100%' }, leftSectionSx), children: (0, jsx_runtime_1.jsx)(material_1.Typography, { color: "inherit", variant: "subtitle1", component: "div", children: (0, jsx_runtime_1.jsx)(material_1.Chip, Object.assign({}, mergedChipProps)) }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: Object.assign({ display: 'flex', alignItems: 'center', gap: 1 }, rightSectionSx), children: renderedBulkActions })] })) })));
|
|
30
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ColumnVisibilityControl = ColumnVisibilityControl;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const menu_dropdown_1 = require("../droupdown/menu-dropdown");
|
|
9
|
-
const data_table_context_1 = require("../../contexts/data-table-context");
|
|
10
|
-
const slot_helpers_1 = require("../../utils/slot-helpers");
|
|
11
|
-
function ColumnVisibilityControl(props = {}) {
|
|
12
|
-
const { table, slots, slotProps } = (0, data_table_context_1.useDataTableContext)();
|
|
13
|
-
const iconSlotProps = (0, slot_helpers_1.extractSlotProps)(slotProps, 'columnIcon');
|
|
14
|
-
const ColumnIconSlot = (0, slot_helpers_1.getSlotComponent)(slots, 'columnIcon', icons_material_1.ViewColumnOutlined);
|
|
15
|
-
const columns = (0, react_1.useMemo)(() => {
|
|
16
|
-
var _a, _b, _c;
|
|
17
|
-
if ((_a = slotProps === null || slotProps === void 0 ? void 0 : slotProps.columnsPanel) === null || _a === void 0 ? void 0 : _a.getTogglableColumns) {
|
|
18
|
-
return (_b = slotProps === null || slotProps === void 0 ? void 0 : slotProps.columnsPanel) === null || _b === void 0 ? void 0 : _b.getTogglableColumns((table === null || table === void 0 ? void 0 : table.getAllLeafColumns()) || []);
|
|
19
|
-
}
|
|
20
|
-
return ((_c = table === null || table === void 0 ? void 0 : table.getAllLeafColumns()) === null || _c === void 0 ? void 0 : _c.filter(column => column.getCanHide())) || [];
|
|
21
|
-
}, [slotProps === null || slotProps === void 0 ? void 0 : slotProps.columnsPanel, table]);
|
|
22
|
-
const handleColumnVisibilityChange = ((columnId, visible) => {
|
|
23
|
-
var _a;
|
|
24
|
-
(_a = table === null || table === void 0 ? void 0 : table.getColumn(columnId)) === null || _a === void 0 ? void 0 : _a.toggleVisibility(visible);
|
|
25
|
-
});
|
|
26
|
-
const mergedProps = (0, slot_helpers_1.mergeSlotProps)({
|
|
27
|
-
size: 'small',
|
|
28
|
-
sx: { flexShrink: 0 },
|
|
29
|
-
}, (slotProps === null || slotProps === void 0 ? void 0 : slotProps.columnVisibilityControl) || {}, props);
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)(menu_dropdown_1.MenuDropdown, { anchor: ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: "Column visibility", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({}, mergedProps, { children: (0, jsx_runtime_1.jsx)(ColumnIconSlot, Object.assign({}, iconSlotProps)) })) })), children: ({ handleClose }) => ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: Object.assign({ p: 2, minWidth: 200 }, mergedProps.menuSx), children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle2", sx: Object.assign({ mb: 1 }, mergedProps.titleSx), children: mergedProps.title || 'Show/Hide Columns' }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: { mb: 1 } }), (0, jsx_runtime_1.jsx)(material_1.FormGroup, { children: columns.map((column) => ((0, jsx_runtime_1.jsx)(material_1.FormControlLabel, Object.assign({ control: ((0, jsx_runtime_1.jsx)(material_1.Checkbox, Object.assign({ disabled: !column.getCanHide(), checked: column.getIsVisible(), onChange: (e) => handleColumnVisibilityChange(column.id, e.target.checked), size: "small" }, mergedProps.checkboxProps))), label: typeof column.columnDef.header === 'string' ? column.columnDef.header : column.id }, mergedProps.labelProps), column.id))) })] })) }));
|
|
31
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { IconButtonProps, SxProps } from '@mui/material';
|
|
2
|
-
import { TableFilters } from '../../types';
|
|
3
|
-
import { SelectionState } from '../../features';
|
|
4
|
-
interface TableExportControlProps {
|
|
5
|
-
exportFilename?: string;
|
|
6
|
-
onServerExport?: (filters?: Partial<TableFilters>, selection?: SelectionState) => Promise<{
|
|
7
|
-
data: any[];
|
|
8
|
-
total: number;
|
|
9
|
-
}>;
|
|
10
|
-
onExportProgress?: (progress: {
|
|
11
|
-
processedRows?: number;
|
|
12
|
-
totalRows?: number;
|
|
13
|
-
percentage?: number;
|
|
14
|
-
}) => void;
|
|
15
|
-
onExportComplete?: (result: {
|
|
16
|
-
success: boolean;
|
|
17
|
-
filename: string;
|
|
18
|
-
totalRows: number;
|
|
19
|
-
}) => void;
|
|
20
|
-
onExportError?: (error: {
|
|
21
|
-
message: string;
|
|
22
|
-
code: string;
|
|
23
|
-
}) => void;
|
|
24
|
-
iconButtonProps?: IconButtonProps;
|
|
25
|
-
tooltipProps?: any;
|
|
26
|
-
menuSx?: SxProps;
|
|
27
|
-
menuItemProps?: any;
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
}
|
|
30
|
-
export declare function TableExportControl(props?: TableExportControlProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
export {};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TableExportControl = TableExportControl;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const menu_dropdown_1 = require("../droupdown/menu-dropdown");
|
|
9
|
-
const data_table_context_1 = require("../../contexts/data-table-context");
|
|
10
|
-
const icons_1 = require("../../icons");
|
|
11
|
-
const slot_helpers_1 = require("../../utils/slot-helpers");
|
|
12
|
-
function TableExportControl(props = {}) {
|
|
13
|
-
const { exportFilename: propsExportFilename, onServerExport: propsOnServerExport, onExportProgress: propsOnExportProgress, onExportComplete: propsOnExportComplete, onExportError: propsOnExportError, iconButtonProps, tooltipProps, menuSx, menuItemProps } = props, otherProps = tslib_1.__rest(props, ["exportFilename", "onServerExport", "onExportProgress", "onExportComplete", "onExportError", "iconButtonProps", "tooltipProps", "menuSx", "menuItemProps"]);
|
|
14
|
-
const { apiRef, slots, slotProps, isExporting, exportFilename: contextExportFilename, } = (0, data_table_context_1.useDataTableContext)();
|
|
15
|
-
const exportFilename = propsExportFilename || contextExportFilename || 'export';
|
|
16
|
-
const exportIconSlotProps = (0, slot_helpers_1.extractSlotProps)(slotProps, 'exportIcon');
|
|
17
|
-
const csvIconSlotProps = (0, slot_helpers_1.extractSlotProps)(slotProps, 'csvIcon');
|
|
18
|
-
const excelIconSlotProps = (0, slot_helpers_1.extractSlotProps)(slotProps, 'excelIcon');
|
|
19
|
-
const ExportIconSlot = (0, slot_helpers_1.getSlotComponent)(slots, 'exportIcon', icons_material_1.CloudDownloadOutlined);
|
|
20
|
-
const CsvIconSlot = (0, slot_helpers_1.getSlotComponent)(slots, 'csvIcon', icons_1.CsvIcon);
|
|
21
|
-
const ExcelIconSlot = (0, slot_helpers_1.getSlotComponent)(slots, 'excelIcon', icons_1.ExcelIcon);
|
|
22
|
-
const handleExport = (format) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
if (!(apiRef === null || apiRef === void 0 ? void 0 : apiRef.current))
|
|
24
|
-
return;
|
|
25
|
-
try {
|
|
26
|
-
if (format === 'csv') {
|
|
27
|
-
yield apiRef.current.export.exportCSV({
|
|
28
|
-
filename: exportFilename,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
yield apiRef.current.export.exportExcel({
|
|
33
|
-
filename: exportFilename,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
console.error('Export failed:', error);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
const mergedIconButtonProps = (0, slot_helpers_1.mergeSlotProps)({
|
|
42
|
-
size: 'small',
|
|
43
|
-
disabled: isExporting,
|
|
44
|
-
sx: { flexShrink: 0 },
|
|
45
|
-
}, exportIconSlotProps, iconButtonProps || {});
|
|
46
|
-
const mergedMenuItemProps = (0, slot_helpers_1.mergeSlotProps)({
|
|
47
|
-
sx: { minWidth: 150 },
|
|
48
|
-
}, menuItemProps || {});
|
|
49
|
-
return ((0, jsx_runtime_1.jsx)(menu_dropdown_1.MenuDropdown, { anchor: ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: isExporting ? 'Export in progress...' : 'Export data' }, tooltipProps, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({}, mergedIconButtonProps, { children: (0, jsx_runtime_1.jsx)(ExportIconSlot, Object.assign({}, exportIconSlotProps)) })) }))), children: ({ handleClose }) => ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: Object.assign({ minWidth: 200 }, menuSx), children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle2", sx: { p: 2, pb: 1 }, children: "Export Format" }), (0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ onClick: () => {
|
|
50
|
-
handleExport('csv');
|
|
51
|
-
handleClose();
|
|
52
|
-
}, disabled: isExporting }, mergedMenuItemProps, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(CsvIconSlot, Object.assign({}, csvIconSlotProps)) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: "CSV", secondary: "Comma-separated values" })] })), (0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ onClick: () => {
|
|
53
|
-
handleExport('excel');
|
|
54
|
-
handleClose();
|
|
55
|
-
}, disabled: isExporting }, mergedMenuItemProps, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(ExcelIconSlot, Object.assign({}, excelIconSlotProps)) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: "Excel", secondary: "Microsoft Excel format" })] })), isExporting && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { p: 2, pt: 1 }, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", color: "text.secondary", sx: { display: 'block', textAlign: 'center' }, children: "Export in progress..." }) }))] })) }));
|
|
56
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function AdvancedFeaturesExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdvancedFeaturesExample = AdvancedFeaturesExample;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
8
|
-
const components_1 = require("../components");
|
|
9
|
-
const types_1 = require("../types");
|
|
10
|
-
const generateEmployeeData = () => {
|
|
11
|
-
const departments = [
|
|
12
|
-
{ id: 1, name: 'Engineering', color: '#2196F3' },
|
|
13
|
-
{ id: 2, name: 'Design', color: '#9C27B0' },
|
|
14
|
-
{ id: 3, name: 'Marketing', color: '#FF9800' },
|
|
15
|
-
{ id: 4, name: 'Sales', color: '#4CAF50' },
|
|
16
|
-
{ id: 5, name: 'HR', color: '#F44336' },
|
|
17
|
-
];
|
|
18
|
-
const positions = ['Senior', 'Mid-level', 'Junior', 'Lead', 'Manager'];
|
|
19
|
-
const skills = ['React', 'TypeScript', 'Node.js', 'Python', 'Design', 'Analytics', 'Leadership'];
|
|
20
|
-
const names = ['Alice Johnson', 'Bob Smith', 'Charlie Brown', 'Diana Prince', 'Eva Garcia', 'Frank Miller', 'Grace Lee', 'Henry Davis'];
|
|
21
|
-
return Array.from({ length: 20 }, (_, index) => {
|
|
22
|
-
const dept = departments[index % departments.length];
|
|
23
|
-
const employeeSkills = skills.sort(() => 0.5 - Math.random()).slice(0, Math.floor(Math.random() * 4) + 2);
|
|
24
|
-
return {
|
|
25
|
-
id: index + 1,
|
|
26
|
-
name: names[index % names.length] || `Employee ${index + 1}`,
|
|
27
|
-
email: `employee${index + 1}@company.com`,
|
|
28
|
-
avatar: `https://i.pravatar.cc/40?img=${index + 1}`,
|
|
29
|
-
department: dept,
|
|
30
|
-
position: `${positions[index % positions.length]} ${dept.name.slice(0, -3)}er`,
|
|
31
|
-
salary: 60000 + (index * 5000) + Math.floor(Math.random() * 20000),
|
|
32
|
-
performance: {
|
|
33
|
-
rating: Math.floor(Math.random() * 5) + 1,
|
|
34
|
-
trend: ['up', 'down', 'stable'][Math.floor(Math.random() * 3)],
|
|
35
|
-
score: Math.floor(Math.random() * 40) + 60,
|
|
36
|
-
},
|
|
37
|
-
skills: employeeSkills,
|
|
38
|
-
startDate: new Date(2020 + Math.floor(Math.random() * 4), Math.floor(Math.random() * 12), Math.floor(Math.random() * 28) + 1).toISOString().split('T')[0],
|
|
39
|
-
isActive: Math.random() > 0.1,
|
|
40
|
-
projects: Array.from({ length: Math.floor(Math.random() * 3) + 1 }, (_, projIndex) => ({
|
|
41
|
-
id: projIndex + 1,
|
|
42
|
-
name: `Project ${String.fromCharCode(65 + projIndex)}`,
|
|
43
|
-
progress: Math.floor(Math.random() * 100),
|
|
44
|
-
priority: ['high', 'medium', 'low'][Math.floor(Math.random() * 3)],
|
|
45
|
-
})),
|
|
46
|
-
metadata: {
|
|
47
|
-
lastLogin: new Date(Date.now() - Math.floor(Math.random() * 30) * 24 * 60 * 60 * 1000).toISOString(),
|
|
48
|
-
vacationDays: Math.floor(Math.random() * 25),
|
|
49
|
-
certifications: Math.floor(Math.random() * 8),
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
function AdvancedFeaturesExample() {
|
|
55
|
-
const [employees, setEmployees] = (0, react_1.useState)(generateEmployeeData());
|
|
56
|
-
const [editingRows, setEditingRows] = (0, react_1.useState)(new Set());
|
|
57
|
-
const [showAdvancedFeatures, setShowAdvancedFeatures] = (0, react_1.useState)(true);
|
|
58
|
-
const [showNestedData, setShowNestedData] = (0, react_1.useState)(false);
|
|
59
|
-
const handleStartEdit = (0, react_1.useCallback)((employeeId) => {
|
|
60
|
-
setEditingRows(prev => new Set([...prev, employeeId]));
|
|
61
|
-
}, []);
|
|
62
|
-
const handleSaveEdit = (0, react_1.useCallback)((employeeId) => {
|
|
63
|
-
setEditingRows(prev => {
|
|
64
|
-
const newSet = new Set(prev);
|
|
65
|
-
newSet.delete(employeeId);
|
|
66
|
-
return newSet;
|
|
67
|
-
});
|
|
68
|
-
}, []);
|
|
69
|
-
const handleCancelEdit = (0, react_1.useCallback)((employeeId) => {
|
|
70
|
-
setEditingRows(prev => {
|
|
71
|
-
const newSet = new Set(prev);
|
|
72
|
-
newSet.delete(employeeId);
|
|
73
|
-
return newSet;
|
|
74
|
-
});
|
|
75
|
-
}, []);
|
|
76
|
-
const handleFieldChange = (0, react_1.useCallback)((employeeId, field, value) => {
|
|
77
|
-
setEmployees(prev => prev.map(emp => emp.id === employeeId
|
|
78
|
-
? Object.assign(Object.assign({}, emp), { [field]: value }) : emp));
|
|
79
|
-
}, []);
|
|
80
|
-
const NameCell = ({ row }) => ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', alignItems: 'center', gap: 1 }, children: [(0, jsx_runtime_1.jsx)(material_1.Avatar, { src: row.avatar, sx: { width: 32, height: 32 } }), (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: "medium", children: row.name }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", color: "text.secondary", children: row.email })] })] }));
|
|
81
|
-
const DepartmentCell = ({ row }) => ((0, jsx_runtime_1.jsx)(material_1.Chip, { label: row.department.name, size: "small", sx: {
|
|
82
|
-
backgroundColor: row.department.color,
|
|
83
|
-
color: 'white',
|
|
84
|
-
fontWeight: 'medium',
|
|
85
|
-
} }));
|
|
86
|
-
const SalaryCell = ({ row }) => {
|
|
87
|
-
const isEditing = editingRows.has(row.id);
|
|
88
|
-
if (isEditing) {
|
|
89
|
-
return ((0, jsx_runtime_1.jsx)(material_1.TextField, { size: "small", type: "number", value: row.salary, onChange: (e) => handleFieldChange(row.id, 'salary', parseInt(e.target.value)), sx: { width: 120 } }));
|
|
90
|
-
}
|
|
91
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body2", fontWeight: "medium", children: ["$", row.salary.toLocaleString()] }));
|
|
92
|
-
};
|
|
93
|
-
const PerformanceCell = ({ row }) => {
|
|
94
|
-
const trendIcon = {
|
|
95
|
-
up: (0, jsx_runtime_1.jsx)(icons_material_1.TrendingUp, { sx: { color: 'success.main', fontSize: 16 } }),
|
|
96
|
-
down: (0, jsx_runtime_1.jsx)(icons_material_1.TrendingDown, { sx: { color: 'error.main', fontSize: 16 } }),
|
|
97
|
-
stable: (0, jsx_runtime_1.jsx)(icons_material_1.Star, { sx: { color: 'warning.main', fontSize: 16 } }),
|
|
98
|
-
};
|
|
99
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', alignItems: 'center', gap: 1 }, children: [(0, jsx_runtime_1.jsx)(material_1.Rating, { value: row.performance.rating, size: "small", readOnly: true }), trendIcon[row.performance.trend], (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "caption", children: [row.performance.score, "%"] })] }));
|
|
100
|
-
};
|
|
101
|
-
const SkillsCell = ({ row }) => ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', flexWrap: 'wrap', gap: 0.5, maxWidth: 200 }, children: [row.skills.slice(0, 3).map((skill, index) => ((0, jsx_runtime_1.jsx)(material_1.Chip, { label: skill, size: "small", variant: "outlined", sx: { fontSize: '0.7rem', height: 20 } }, index))), row.skills.length > 3 && ((0, jsx_runtime_1.jsx)(material_1.Chip, { label: `+${row.skills.length - 3}`, size: "small", variant: "filled", sx: { fontSize: '0.7rem', height: 20 } }))] }));
|
|
102
|
-
const ProjectsCell = ({ row }) => ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { minWidth: 150 }, children: row.projects.map((project, index) => ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { mb: 0.5 }, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", fontWeight: "medium", children: project.name }), (0, jsx_runtime_1.jsx)(material_1.Chip, { label: project.priority, size: "small", color: project.priority === 'high' ? 'error' : project.priority === 'medium' ? 'warning' : 'default', sx: { fontSize: '0.6rem', height: 16 } })] }), (0, jsx_runtime_1.jsx)(material_1.LinearProgress, { variant: "determinate", value: project.progress, sx: { height: 4, borderRadius: 2 }, color: project.priority === 'high' ? 'error' : project.priority === 'medium' ? 'warning' : 'primary' })] }, index))) }));
|
|
103
|
-
const ActionsCell = ({ row }) => {
|
|
104
|
-
const isEditing = editingRows.has(row.id);
|
|
105
|
-
if (isEditing) {
|
|
106
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', gap: 0.5 }, children: [(0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: "Save changes", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", onClick: () => handleSaveEdit(row.id), color: "primary", children: (0, jsx_runtime_1.jsx)(icons_material_1.Save, { fontSize: "small" }) }) }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: "Cancel editing", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", onClick: () => handleCancelEdit(row.id), color: "secondary", children: (0, jsx_runtime_1.jsx)(icons_material_1.Cancel, { fontSize: "small" }) }) })] }));
|
|
107
|
-
}
|
|
108
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', gap: 0.5 }, children: [(0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: "Edit employee", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", onClick: () => handleStartEdit(row.id), color: "primary", children: (0, jsx_runtime_1.jsx)(icons_material_1.Edit, { fontSize: "small" }) }) }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: "Delete employee", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", onClick: () => {
|
|
109
|
-
setEmployees(prev => prev.filter(emp => emp.id !== row.id));
|
|
110
|
-
}, color: "error", children: (0, jsx_runtime_1.jsx)(icons_material_1.Delete, { fontSize: "small" }) }) })] }));
|
|
111
|
-
};
|
|
112
|
-
const renderSubComponent = (0, react_1.useCallback)(({ row }) => ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { p: 2, backgroundColor: 'grey.50', borderRadius: 1 }, children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 2, children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, { size: { xs: 12, md: 6 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle2", gutterBottom: true, children: "Contact Information" }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body2", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Email:" }), " ", row.email] }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body2", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Position:" }), " ", row.position] }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body2", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Start Date:" }), " ", new Date(row.startDate).toLocaleDateString()] })] }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { size: { xs: 12, md: 6 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle2", gutterBottom: true, children: "Metadata" }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body2", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Last Login:" }), " ", new Date(row.metadata.lastLogin).toLocaleDateString()] }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body2", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Vacation Days:" }), " ", row.metadata.vacationDays] }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body2", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Certifications:" }), " ", row.metadata.certifications] })] }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { size: { xs: 12 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle2", gutterBottom: true, children: "All Skills" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { display: 'flex', flexWrap: 'wrap', gap: 0.5 }, children: row.skills.map((skill, index) => ((0, jsx_runtime_1.jsx)(material_1.Chip, { label: skill, size: "small", color: "primary", variant: "outlined" }, index))) })] })] }) })), []);
|
|
113
|
-
const columns = (0, react_1.useMemo)(() => {
|
|
114
|
-
const baseColumns = [
|
|
115
|
-
{
|
|
116
|
-
accessorKey: 'name',
|
|
117
|
-
header: 'Employee',
|
|
118
|
-
size: 200,
|
|
119
|
-
cell: ({ row }) => (0, jsx_runtime_1.jsx)(NameCell, { row: row.original }),
|
|
120
|
-
enableSorting: true,
|
|
121
|
-
filterable: true,
|
|
122
|
-
type: 'text',
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
accessorKey: 'department.name',
|
|
126
|
-
header: 'Department',
|
|
127
|
-
size: 120,
|
|
128
|
-
cell: ({ row }) => (0, jsx_runtime_1.jsx)(DepartmentCell, { row: row.original }),
|
|
129
|
-
enableSorting: true,
|
|
130
|
-
filterable: true,
|
|
131
|
-
type: 'select',
|
|
132
|
-
options: [
|
|
133
|
-
{ value: 'Engineering', label: 'Engineering' },
|
|
134
|
-
{ value: 'Design', label: 'Design' },
|
|
135
|
-
{ value: 'Marketing', label: 'Marketing' },
|
|
136
|
-
{ value: 'Sales', label: 'Sales' },
|
|
137
|
-
{ value: 'HR', label: 'HR' },
|
|
138
|
-
],
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
accessorKey: 'salary',
|
|
142
|
-
header: 'Salary',
|
|
143
|
-
size: 120,
|
|
144
|
-
cell: ({ row }) => (0, jsx_runtime_1.jsx)(SalaryCell, { row: row.original }),
|
|
145
|
-
enableSorting: true,
|
|
146
|
-
filterable: true,
|
|
147
|
-
type: 'number',
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
accessorKey: 'startDate',
|
|
151
|
-
header: 'Start Date',
|
|
152
|
-
size: 140,
|
|
153
|
-
enableSorting: true,
|
|
154
|
-
filterable: true,
|
|
155
|
-
type: 'date',
|
|
156
|
-
cell: ({ row }) => ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: new Date(row.original.startDate).toLocaleDateString() })),
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
accessorKey: 'performance.rating',
|
|
160
|
-
header: 'Performance',
|
|
161
|
-
size: 200,
|
|
162
|
-
cell: ({ row }) => (0, jsx_runtime_1.jsx)(PerformanceCell, { row: row.original }),
|
|
163
|
-
enableSorting: true,
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
accessorKey: 'skills',
|
|
167
|
-
header: 'Skills',
|
|
168
|
-
size: 250,
|
|
169
|
-
cell: ({ row }) => (0, jsx_runtime_1.jsx)(SkillsCell, { row: row.original }),
|
|
170
|
-
enableSorting: false,
|
|
171
|
-
},
|
|
172
|
-
];
|
|
173
|
-
if (showNestedData) {
|
|
174
|
-
baseColumns.push({
|
|
175
|
-
accessorKey: 'projects',
|
|
176
|
-
header: 'Projects',
|
|
177
|
-
size: 200,
|
|
178
|
-
cell: ({ row }) => (0, jsx_runtime_1.jsx)(ProjectsCell, { row: row.original }),
|
|
179
|
-
enableSorting: false,
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
if (showAdvancedFeatures) {
|
|
183
|
-
baseColumns.push({
|
|
184
|
-
id: 'actions',
|
|
185
|
-
header: 'Actions',
|
|
186
|
-
size: 100,
|
|
187
|
-
cell: ({ row }) => (0, jsx_runtime_1.jsx)(ActionsCell, { row: row.original }),
|
|
188
|
-
enableSorting: false,
|
|
189
|
-
filterable: false,
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
return baseColumns;
|
|
193
|
-
}, [showAdvancedFeatures, showNestedData, editingRows]);
|
|
194
|
-
const addNewEmployee = (0, react_1.useCallback)(() => {
|
|
195
|
-
const newEmployee = {
|
|
196
|
-
id: Math.max(...employees.map(e => e.id)) + 1,
|
|
197
|
-
name: 'New Employee',
|
|
198
|
-
email: 'new@company.com',
|
|
199
|
-
avatar: 'https://i.pravatar.cc/40?img=1',
|
|
200
|
-
department: { id: 1, name: 'Engineering', color: '#2196F3' },
|
|
201
|
-
position: 'Junior Developer',
|
|
202
|
-
salary: 60000,
|
|
203
|
-
performance: { rating: 3, trend: 'stable', score: 75 },
|
|
204
|
-
skills: ['React'],
|
|
205
|
-
startDate: new Date().toISOString().split('T')[0],
|
|
206
|
-
isActive: true,
|
|
207
|
-
projects: [],
|
|
208
|
-
metadata: {
|
|
209
|
-
lastLogin: new Date().toISOString(),
|
|
210
|
-
vacationDays: 20,
|
|
211
|
-
certifications: 0,
|
|
212
|
-
},
|
|
213
|
-
};
|
|
214
|
-
setEmployees(prev => [...prev, newEmployee]);
|
|
215
|
-
handleStartEdit(newEmployee.id);
|
|
216
|
-
}, [employees, handleStartEdit]);
|
|
217
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { p: 3 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h4", gutterBottom: true, children: "Advanced Features Demo" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", color: "text.secondary", sx: { mb: 3 }, children: "A comprehensive example showcasing inline editing, custom cell renderers, row expansion, dynamic columns, and complex local data operations." }), (0, jsx_runtime_1.jsxs)(material_1.Paper, { sx: { p: 2, mb: 3 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", gutterBottom: true, children: "Feature Controls" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', gap: 2, flexWrap: 'wrap', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Switch, { checked: showAdvancedFeatures, onChange: (e) => setShowAdvancedFeatures(e.target.checked) }), label: "Inline Editing & Actions" }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Switch, { checked: showNestedData, onChange: (e) => setShowNestedData(e.target.checked) }), label: "Show Project Data" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", startIcon: (0, jsx_runtime_1.jsx)(icons_material_1.Add, {}), onClick: addNewEmployee, size: "small", children: "Add Employee" }), (0, jsx_runtime_1.jsx)(material_1.Badge, { badgeContent: editingRows.size, color: "primary", children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: "Editing Rows" }) })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Paper, { sx: { p: 2, mb: 3 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", gutterBottom: true, children: "Statistics" }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 2, children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, { size: { xs: 6, sm: 3 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "Total Employees" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", children: employees.length })] }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { size: { xs: 6, sm: 3 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "Active Employees" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", children: employees.filter(e => e.isActive).length })] }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { size: { xs: 6, sm: 3 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "Avg Salary" }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "h6", children: ["$", Math.round(employees.reduce((sum, e) => sum + e.salary, 0) / employees.length).toLocaleString()] })] }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { size: { xs: 6, sm: 3 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "text.secondary", children: "Currently Editing" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", children: editingRows.size })] })] })] }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: { my: 2 } }), (0, jsx_runtime_1.jsx)(components_1.DataTable, { data: employees, totalRow: employees.length, columns: columns, enableRowSelection: true, enableMultiRowSelection: true, enableSorting: true, enableGlobalFilter: true, enableColumnFilter: true, enableColumnDragging: true, enableColumnPinning: true, enablePagination: true, getRowCanExpand: () => true, renderSubComponent: (row) => renderSubComponent({ row: row.original }), initialState: {
|
|
218
|
-
pagination: {
|
|
219
|
-
pageIndex: 0,
|
|
220
|
-
pageSize: 10,
|
|
221
|
-
},
|
|
222
|
-
columnPinning: {
|
|
223
|
-
left: [types_1.DEFAULT_SELECTION_COLUMN_NAME],
|
|
224
|
-
right: ['actions'],
|
|
225
|
-
},
|
|
226
|
-
columnOrder: ['name', 'department.name', 'salary', 'performance.rating', 'skills'],
|
|
227
|
-
}, tableContainerProps: {
|
|
228
|
-
sx: {
|
|
229
|
-
'& .MuiTableRow-root:hover': {
|
|
230
|
-
backgroundColor: 'action.hover',
|
|
231
|
-
},
|
|
232
|
-
'& .MuiTableCell-root': {
|
|
233
|
-
borderBottom: '1px solid',
|
|
234
|
-
borderColor: 'divider',
|
|
235
|
-
},
|
|
236
|
-
}
|
|
237
|
-
}, enableBulkActions: true, bulkActions: (selectionState) => ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', gap: 1 }, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "outlined", size: "small", onClick: () => {
|
|
238
|
-
let selectedEmployees;
|
|
239
|
-
if (selectionState.type === 'include') {
|
|
240
|
-
selectedEmployees = employees.filter(emp => selectionState.ids.includes(emp.id.toString()));
|
|
241
|
-
}
|
|
242
|
-
else {
|
|
243
|
-
selectedEmployees = employees.filter(emp => !selectionState.ids.includes(emp.id.toString()));
|
|
244
|
-
}
|
|
245
|
-
const avgSalary = selectedEmployees.reduce((sum, emp) => sum + emp.salary, 0) / selectedEmployees.length;
|
|
246
|
-
alert(`Average salary of ${selectedEmployees.length} selected employees: $${Math.round(avgSalary).toLocaleString()}`);
|
|
247
|
-
}, children: "\uD83D\uDCCA Calculate Avg Salary" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "outlined", size: "small", onClick: () => {
|
|
248
|
-
const updatedEmployees = employees.map(emp => {
|
|
249
|
-
const isSelected = selectionState.type === 'include'
|
|
250
|
-
? selectionState.ids.includes(emp.id.toString())
|
|
251
|
-
: !selectionState.ids.includes(emp.id.toString());
|
|
252
|
-
return isSelected
|
|
253
|
-
? Object.assign(Object.assign({}, emp), { performance: Object.assign(Object.assign({}, emp.performance), { rating: 5 }) }) : emp;
|
|
254
|
-
});
|
|
255
|
-
setEmployees(updatedEmployees);
|
|
256
|
-
}, children: "\u2B50 Boost Performance" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "outlined", size: "small", color: "error", onClick: () => {
|
|
257
|
-
let selectedEmployees;
|
|
258
|
-
if (selectionState.type === 'include') {
|
|
259
|
-
selectedEmployees = employees.filter(emp => selectionState.ids.includes(emp.id.toString()));
|
|
260
|
-
}
|
|
261
|
-
else {
|
|
262
|
-
selectedEmployees = employees.filter(emp => !selectionState.ids.includes(emp.id.toString()));
|
|
263
|
-
}
|
|
264
|
-
if (window.confirm(`Delete ${selectedEmployees.length} selected employees?`)) {
|
|
265
|
-
const selectedIds = selectedEmployees.map(emp => emp.id);
|
|
266
|
-
setEmployees(prev => prev.filter(emp => !selectedIds.includes(emp.id)));
|
|
267
|
-
}
|
|
268
|
-
}, children: "\uD83D\uDDD1\uFE0F Delete Selected" })] })), fitToScreen: true }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { mt: 2 }, children: (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body2", color: "text.secondary", children: ["\uD83D\uDCA1 ", (0, jsx_runtime_1.jsx)("strong", { children: "Features demonstrated:" }), (0, jsx_runtime_1.jsx)("br", {}), "\u2022 Inline editing with save/cancel actions", (0, jsx_runtime_1.jsx)("br", {}), "\u2022 Custom cell renderers with rich content (avatars, ratings, progress bars)", (0, jsx_runtime_1.jsx)("br", {}), "\u2022 Row expansion with detailed information", (0, jsx_runtime_1.jsx)("br", {}), "\u2022 Dynamic column configuration", (0, jsx_runtime_1.jsx)("br", {}), "\u2022 Complex nested data structures", (0, jsx_runtime_1.jsx)("br", {}), "\u2022 Real-time statistics and bulk operations", (0, jsx_runtime_1.jsx)("br", {}), "\u2022 Advanced styling and theming"] }) })] }));
|
|
269
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function BulkActionsTest(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BulkActionsTest = BulkActionsTest;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
const components_1 = require("../components");
|
|
8
|
-
const testData = [
|
|
9
|
-
{ id: 1, name: 'Item 1', value: 100 },
|
|
10
|
-
{ id: 2, name: 'Item 2', value: 200 },
|
|
11
|
-
{ id: 3, name: 'Item 3', value: 300 },
|
|
12
|
-
{ id: 4, name: 'Item 4', value: 400 },
|
|
13
|
-
{ id: 5, name: 'Item 5', value: 500 },
|
|
14
|
-
];
|
|
15
|
-
const columns = [
|
|
16
|
-
{
|
|
17
|
-
accessorKey: 'name',
|
|
18
|
-
header: 'Name',
|
|
19
|
-
size: 150,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
accessorKey: 'value',
|
|
23
|
-
header: 'Value',
|
|
24
|
-
size: 100,
|
|
25
|
-
},
|
|
26
|
-
];
|
|
27
|
-
function BulkActionsTest() {
|
|
28
|
-
const [selectionInfo, setSelectionInfo] = (0, react_1.useState)('No selection');
|
|
29
|
-
const handleSelectionChange = (selection) => {
|
|
30
|
-
const count = selection.type === 'include'
|
|
31
|
-
? selection.ids.length
|
|
32
|
-
: testData.length - selection.ids.length;
|
|
33
|
-
setSelectionInfo(`Selected: ${count} items (${selection.type} mode) - IDs: [${selection.ids.join(', ')}]`);
|
|
34
|
-
};
|
|
35
|
-
const bulkActions = (0, react_1.useCallback)((selectionState) => {
|
|
36
|
-
const selectedCount = selectionState.type === 'include'
|
|
37
|
-
? selectionState.ids.length
|
|
38
|
-
: testData.length - selectionState.ids.length;
|
|
39
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { display: 'flex', gap: 1 }, children: (0, jsx_runtime_1.jsxs)(material_1.Button, { variant: "outlined", size: "small", onClick: () => {
|
|
40
|
-
alert(`Action on ${selectedCount} items. Selection state: ${JSON.stringify(selectionState, null, 2)}`);
|
|
41
|
-
}, children: ["Test Action (", selectedCount, ")"] }) }));
|
|
42
|
-
}, []);
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { p: 3 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h4", gutterBottom: true, children: "Bulk Actions Test" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", color: "text.secondary", sx: { mb: 2 }, children: "This example tests that bulk actions work without infinite loops." }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body2", sx: { mb: 3, p: 2, backgroundColor: 'grey.100', borderRadius: 1 }, children: [(0, jsx_runtime_1.jsx)("strong", { children: "Current Selection:" }), " ", selectionInfo] }), (0, jsx_runtime_1.jsx)(components_1.DataTable, { data: testData, totalRow: testData.length, columns: columns, enableRowSelection: true, enableMultiRowSelection: true, enableBulkActions: true, bulkActions: bulkActions, onSelectionChange: handleSelectionChange, enablePagination: false, enableSorting: true, enableGlobalFilter: false, fitToScreen: true }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { mt: 2, p: 2, backgroundColor: 'success.light', borderRadius: 1 }, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: "success.dark", children: "\u2705 If you can see this and select rows without the page freezing, the infinite loop issue is fixed!" }) })] }));
|
|
44
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function CustomColumnFilterExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CustomColumnFilterExample = CustomColumnFilterExample;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
const data_table_1 = require("../components/table/data-table");
|
|
8
|
-
const sampleData = [
|
|
9
|
-
{ id: 1, name: 'John Doe', age: 30, department: 'Engineering', salary: 75000, isActive: true },
|
|
10
|
-
{ id: 2, name: 'Jane Smith', age: 25, department: 'Marketing', salary: 60000, isActive: true },
|
|
11
|
-
{ id: 3, name: 'Bob Johnson', age: 35, department: 'Engineering', salary: 85000, isActive: false },
|
|
12
|
-
{ id: 4, name: 'Alice Brown', age: 28, department: 'HR', salary: 55000, isActive: true },
|
|
13
|
-
{ id: 5, name: 'Charlie Wilson', age: 42, department: 'Sales', salary: 70000, isActive: true },
|
|
14
|
-
];
|
|
15
|
-
const columns = [
|
|
16
|
-
{
|
|
17
|
-
accessorKey: 'name',
|
|
18
|
-
header: 'Name',
|
|
19
|
-
type: 'text',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
accessorKey: 'age',
|
|
23
|
-
header: 'Age',
|
|
24
|
-
type: 'number',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
accessorKey: 'department',
|
|
28
|
-
header: 'Department',
|
|
29
|
-
type: 'select',
|
|
30
|
-
options: [
|
|
31
|
-
{ label: 'Engineering', value: 'Engineering' },
|
|
32
|
-
{ label: 'Marketing', value: 'Marketing' },
|
|
33
|
-
{ label: 'HR', value: 'HR' },
|
|
34
|
-
{ label: 'Sales', value: 'Sales' },
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
accessorKey: 'salary',
|
|
39
|
-
header: 'Salary',
|
|
40
|
-
type: 'number',
|
|
41
|
-
cell: ({ getValue }) => {
|
|
42
|
-
const value = getValue();
|
|
43
|
-
return new Intl.NumberFormat('en-US', {
|
|
44
|
-
style: 'currency',
|
|
45
|
-
currency: 'USD',
|
|
46
|
-
}).format(value);
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
accessorKey: 'isActive',
|
|
51
|
-
header: 'Active',
|
|
52
|
-
type: 'boolean',
|
|
53
|
-
},
|
|
54
|
-
];
|
|
55
|
-
function CustomColumnFilterExample() {
|
|
56
|
-
const [data] = (0, react_1.useState)(sampleData);
|
|
57
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { p: 3 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h4", gutterBottom: true, children: "Custom Column Filter Feature Example" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", sx: { mb: 3 }, children: "Click the filter icon in the toolbar to test the custom column filter feature." }), (0, jsx_runtime_1.jsx)(data_table_1.DataTable, { data: data, columns: columns, enableColumnFilter: true, enableGlobalFilter: true, enablePagination: true, enableSorting: true, onColumnFiltersChange: (filterState) => {
|
|
58
|
-
console.log('Custom Column Filter State Changed:', filterState);
|
|
59
|
-
} })] }));
|
|
60
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { CustomColumnFilterExample } from './custom-column-filter-example';
|
|
2
|
-
export { SelectionTestExample } from './selection-test-example';
|
|
3
|
-
export { AdvancedFeaturesExample } from './advanced-features-example';
|
|
4
|
-
export { SimpleLocalExample } from './simple-local-example';
|
|
5
|
-
export { BulkActionsTest } from './bulk-actions-test';
|
|
6
|
-
export { ServerSideFetchingExample } from './server-side-fetching-example';
|
|
7
|
-
export { SimpleEnhancedSlotsExample } from './simple-slots-example';
|
|
8
|
-
export { ServerSideTest } from './server-side-test';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServerSideTest = exports.SimpleEnhancedSlotsExample = exports.ServerSideFetchingExample = exports.BulkActionsTest = exports.SimpleLocalExample = exports.AdvancedFeaturesExample = exports.SelectionTestExample = exports.CustomColumnFilterExample = void 0;
|
|
4
|
-
var custom_column_filter_example_1 = require("./custom-column-filter-example");
|
|
5
|
-
Object.defineProperty(exports, "CustomColumnFilterExample", { enumerable: true, get: function () { return custom_column_filter_example_1.CustomColumnFilterExample; } });
|
|
6
|
-
var selection_test_example_1 = require("./selection-test-example");
|
|
7
|
-
Object.defineProperty(exports, "SelectionTestExample", { enumerable: true, get: function () { return selection_test_example_1.SelectionTestExample; } });
|
|
8
|
-
var advanced_features_example_1 = require("./advanced-features-example");
|
|
9
|
-
Object.defineProperty(exports, "AdvancedFeaturesExample", { enumerable: true, get: function () { return advanced_features_example_1.AdvancedFeaturesExample; } });
|
|
10
|
-
var simple_local_example_1 = require("./simple-local-example");
|
|
11
|
-
Object.defineProperty(exports, "SimpleLocalExample", { enumerable: true, get: function () { return simple_local_example_1.SimpleLocalExample; } });
|
|
12
|
-
var bulk_actions_test_1 = require("./bulk-actions-test");
|
|
13
|
-
Object.defineProperty(exports, "BulkActionsTest", { enumerable: true, get: function () { return bulk_actions_test_1.BulkActionsTest; } });
|
|
14
|
-
var server_side_fetching_example_1 = require("./server-side-fetching-example");
|
|
15
|
-
Object.defineProperty(exports, "ServerSideFetchingExample", { enumerable: true, get: function () { return server_side_fetching_example_1.ServerSideFetchingExample; } });
|
|
16
|
-
var simple_slots_example_1 = require("./simple-slots-example");
|
|
17
|
-
Object.defineProperty(exports, "SimpleEnhancedSlotsExample", { enumerable: true, get: function () { return simple_slots_example_1.SimpleEnhancedSlotsExample; } });
|
|
18
|
-
var server_side_test_1 = require("./server-side-test");
|
|
19
|
-
Object.defineProperty(exports, "ServerSideTest", { enumerable: true, get: function () { return server_side_test_1.ServerSideTest; } });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function SelectionTestExample(): import("react/jsx-runtime").JSX.Element;
|