@elliemae/ds-datagrids 2.0.0-alpha.1 → 2.0.0-alpha.13
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/cjs/DSDataGrid.js +247 -244
- package/cjs/DataGridImpl.js +22 -13
- package/cjs/PaginatedDataGrid.js +11 -6
- package/cjs/blockNames.js +2 -2
- package/cjs/columns/IconColumn.js +23 -21
- package/cjs/columns/NumberColumn.js +2 -4
- package/cjs/components/BodyCell.js +23 -15
- package/cjs/components/BodyList.js +11 -4
- package/cjs/components/ColumnVisibilityMenuOption.js +12 -6
- package/cjs/components/ColumnsOptionsMenuSection.js +35 -28
- package/cjs/components/EmptyState.js +23 -21
- package/cjs/components/HeaderCell.js +17 -11
- package/cjs/components/List.js +6 -1
- package/cjs/components/ListItem.js +8 -1
- package/cjs/components/NoResults.js +8 -3
- package/cjs/components/RowsLoader.js +6 -5
- package/cjs/components/Table.js +9 -4
- package/cjs/components/TableBody.js +8 -3
- package/cjs/components/TableHeader.js +6 -1
- package/cjs/components/footer/addOptionalFooterComponents.js +6 -5
- package/cjs/components/header/PrimaryControls.js +20 -15
- package/cjs/components/header/addOptionalHeaderComponents.js +5 -4
- package/cjs/components/renderers/defaultClassedRenderers.js +35 -23
- package/cjs/components/renderers/renderRowsLoader.js +1 -1
- package/cjs/components/tableContext.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +54 -43
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js +13 -9
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +3 -4
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +12 -10
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +14 -7
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +3 -3
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js +24 -18
- package/cjs/plugins/column-sizing/useColumnSizeService.js +14 -4
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js +70 -56
- package/cjs/plugins/column-sizing/utils.js +10 -6
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +2 -2
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +11 -6
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +24 -25
- package/cjs/plugins/editable/EditableComponents/ComboBox.js +10 -7
- package/cjs/plugins/editable/EditableComponents/TextBox.js +24 -19
- package/cjs/plugins/editable/EditablePlugin.js +17 -16
- package/cjs/plugins/editable/decorateEditable.js +25 -19
- package/cjs/plugins/editable/getEditorComponent.js +46 -35
- package/cjs/plugins/expandable-grid/ExpandableColumn.js +66 -59
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js +42 -30
- package/cjs/plugins/expandable-grid/ExpandedRow.js +41 -31
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +22 -16
- package/cjs/plugins/expandable-grid/useExpandGridState.js +4 -8
- package/cjs/plugins/export-data/ExportDataPlugin.js +34 -19
- package/cjs/plugins/filterable/FilterablePlugin.js +9 -8
- package/cjs/plugins/filterable/addFilterToColumn.js +6 -1
- package/cjs/plugins/filterable/components/FilterableHeader.js +39 -30
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +52 -45
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +38 -33
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +127 -161
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +38 -29
- package/cjs/plugins/filterable/filterableFormatter.js +16 -11
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +18 -6
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +11 -8
- package/cjs/plugins/filterable/helper.js +18 -8
- package/cjs/plugins/filterable/useFilterableState.js +13 -6
- package/cjs/plugins/grouping-by/GroupingByPlugin.js +4 -2
- package/cjs/plugins/grouping-grid/GroupingPlugin.js +14 -5
- package/cjs/plugins/grouping-grid/walkStrategy.js +13 -9
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +11 -4
- package/cjs/plugins/pagination/PaginationPlugin.js +17 -10
- package/cjs/plugins/pagination/components/Pagination.js +12 -11
- package/cjs/plugins/pagination/components/Paginator.js +23 -22
- package/cjs/plugins/pagination/components/PerPageDropdown.js +24 -17
- package/cjs/plugins/pagination/helper.js +11 -8
- package/cjs/plugins/pagination/usePaginationState.js +9 -4
- package/cjs/plugins/resizable/ResizablePlugin.js +6 -5
- package/cjs/plugins/resizable/decorateResizable.js +16 -10
- package/cjs/plugins/resizable/useResizeHandle.js +21 -16
- package/cjs/plugins/resizable/utils.js +9 -6
- package/cjs/plugins/row-dnd/DndRowsPlugin.js +27 -19
- package/cjs/plugins/selectable/SelectablePlugin.js +13 -12
- package/cjs/plugins/selectable/addSelectableColumn.js +25 -17
- package/cjs/plugins/selectable/helper.js +13 -4
- package/cjs/plugins/selectable/selectableFormatter.js +83 -74
- package/cjs/plugins/selectable/useSelectableState.js +26 -12
- package/cjs/plugins/sortable/SortablePlugin.js +11 -12
- package/cjs/plugins/sortable/checkIfSortable.js +1 -1
- package/cjs/plugins/sortable/sortHeaderFormatter.js +17 -18
- package/cjs/plugins/sortable/sortTree.js +16 -8
- package/cjs/plugins/sortable/sorter.js +153 -135
- package/cjs/plugins/sortable/useSortableState.js +12 -6
- package/cjs/plugins/toolbar/RowRenderer.js +13 -7
- package/cjs/plugins/toolbar/ToolbarPlugin.js +3 -2
- package/cjs/plugins/toolbar/ToolbarTrigger.js +26 -21
- package/cjs/plugins/virtualization/AutoHeightList.js +12 -10
- package/cjs/plugins/virtualization/VirtualizationPlugin.js +35 -28
- package/cjs/plugins/virtualization/VirtualizedBody.js +23 -13
- package/cjs/plugins/virtualization/VirtualizedBodyRow.js +8 -7
- package/cjs/renders/CellWithAddons.js +23 -21
- package/cjs/renders/styled.js +7 -18
- package/cjs/utilities/getPluginsFromProps.js +5 -1
- package/cjs/utilities/getScrollbarSize.js +2 -1
- package/cjs/utilities/normalizeData.js +8 -2
- package/esm/DSDataGrid.js +246 -243
- package/esm/DataGridImpl.js +18 -9
- package/esm/PaginatedDataGrid.js +5 -0
- package/esm/blockNames.js +2 -2
- package/esm/columns/IconColumn.js +19 -17
- package/esm/columns/NumberColumn.js +2 -4
- package/esm/components/BodyCell.js +20 -12
- package/esm/components/BodyList.js +7 -0
- package/esm/components/ColumnVisibilityMenuOption.js +12 -6
- package/esm/components/ColumnsOptionsMenuSection.js +35 -28
- package/esm/components/EmptyState.js +18 -15
- package/esm/components/HeaderCell.js +15 -9
- package/esm/components/List.js +5 -0
- package/esm/components/ListItem.js +7 -0
- package/esm/components/NoResults.js +5 -0
- package/esm/components/RowsLoader.js +5 -4
- package/esm/components/Table.js +5 -0
- package/esm/components/TableBody.js +5 -0
- package/esm/components/TableHeader.js +5 -0
- package/esm/components/footer/addOptionalFooterComponents.js +5 -4
- package/esm/components/header/PrimaryControls.js +20 -14
- package/esm/components/header/addOptionalHeaderComponents.js +4 -3
- package/esm/components/renderers/defaultClassedRenderers.js +35 -23
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +50 -39
- package/esm/plugins/column-dnd/DndColumnsPlugin.js +8 -4
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +1 -1
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js +10 -8
- package/esm/plugins/column-sizing/columnMeasurerTransformer.js +12 -5
- package/esm/plugins/column-sizing/ext-points/decorateColumn.js +1 -1
- package/esm/plugins/column-sizing/ext-points/getTableProps.js +22 -15
- package/esm/plugins/column-sizing/useColumnSizeService.js +13 -3
- package/esm/plugins/column-sizing/useStylesheetHelpers.js +67 -51
- package/esm/plugins/column-sizing/utils.js +8 -4
- package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +6 -1
- package/esm/plugins/custom-cell-renderer/getRendererComponent.js +15 -11
- package/esm/plugins/editable/EditableComponents/ComboBox.js +8 -4
- package/esm/plugins/editable/EditableComponents/TextBox.js +21 -15
- package/esm/plugins/editable/EditablePlugin.js +14 -12
- package/esm/plugins/editable/decorateEditable.js +18 -9
- package/esm/plugins/editable/getEditorComponent.js +49 -38
- package/esm/plugins/expandable-grid/ExpandableColumn.js +59 -50
- package/esm/plugins/expandable-grid/ExpandablePlugin.js +34 -20
- package/esm/plugins/expandable-grid/ExpandedRow.js +27 -17
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js +17 -11
- package/esm/plugins/expandable-grid/useExpandGridState.js +2 -2
- package/esm/plugins/export-data/ExportDataPlugin.js +31 -16
- package/esm/plugins/filterable/FilterablePlugin.js +5 -4
- package/esm/plugins/filterable/addFilterToColumn.js +5 -0
- package/esm/plugins/filterable/components/FilterableHeader.js +32 -22
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +41 -33
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +28 -22
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +121 -154
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +28 -18
- package/esm/plugins/filterable/filterableFormatter.js +15 -10
- package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +14 -2
- package/esm/plugins/filterable/filtering-helper/strategiesOperators.js +7 -4
- package/esm/plugins/filterable/helper.js +11 -1
- package/esm/plugins/filterable/useFilterableState.js +12 -5
- package/esm/plugins/grouping-by/GroupingByPlugin.js +3 -1
- package/esm/plugins/grouping-grid/GroupingPlugin.js +10 -1
- package/esm/plugins/grouping-grid/walkStrategy.js +13 -9
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +8 -1
- package/esm/plugins/pagination/PaginationPlugin.js +8 -1
- package/esm/plugins/pagination/components/Pagination.js +10 -9
- package/esm/plugins/pagination/components/Paginator.js +20 -19
- package/esm/plugins/pagination/components/PerPageDropdown.js +17 -9
- package/esm/plugins/pagination/helper.js +10 -7
- package/esm/plugins/pagination/usePaginationState.js +7 -1
- package/esm/plugins/resizable/ResizablePlugin.js +4 -3
- package/esm/plugins/resizable/decorateResizable.js +14 -8
- package/esm/plugins/resizable/useResizeHandle.js +21 -16
- package/esm/plugins/resizable/utils.js +7 -4
- package/esm/plugins/row-dnd/DndRowsPlugin.js +22 -13
- package/esm/plugins/selectable/SelectablePlugin.js +10 -9
- package/esm/plugins/selectable/addSelectableColumn.js +24 -16
- package/esm/plugins/selectable/helper.js +10 -1
- package/esm/plugins/selectable/selectableFormatter.js +79 -68
- package/esm/plugins/selectable/useSelectableState.js +20 -5
- package/esm/plugins/sortable/SortablePlugin.js +5 -4
- package/esm/plugins/sortable/sortHeaderFormatter.js +12 -11
- package/esm/plugins/sortable/sortTree.js +13 -3
- package/esm/plugins/sortable/sorter.js +152 -134
- package/esm/plugins/sortable/useSortableState.js +8 -0
- package/esm/plugins/toolbar/RowRenderer.js +8 -2
- package/esm/plugins/toolbar/ToolbarPlugin.js +1 -0
- package/esm/plugins/toolbar/ToolbarTrigger.js +17 -11
- package/esm/plugins/virtualization/AutoHeightList.js +6 -3
- package/esm/plugins/virtualization/VirtualizationPlugin.js +31 -24
- package/esm/plugins/virtualization/VirtualizedBody.js +16 -6
- package/esm/plugins/virtualization/VirtualizedBodyRow.js +8 -7
- package/esm/renders/CellWithAddons.js +15 -14
- package/esm/renders/styled.js +3 -15
- package/esm/utilities/getPluginsFromProps.js +5 -1
- package/esm/utilities/getScrollbarSize.js +2 -1
- package/esm/utilities/normalizeData.js +7 -1
- package/package.json +27 -18
- package/types/DSDataGrid.d.ts +744 -105
- package/types/components/BodyCell.d.ts +1 -1
- package/types/components/HeaderCell.d.ts +1 -1
- package/types/plugins/column-sizing/columnMeasurerTransformer.d.ts +1 -1
- package/types/plugins/column-sizing/ext-points/getTableProps.d.ts +1 -1
- package/types/plugins/expandable-grid/ExpandedRowExtra.d.ts +1 -1
- package/types/plugins/expandable-grid/useExpandGridState.d.ts +4 -4
- package/types/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.d.ts +1 -1
- package/types/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.d.ts +1 -1
- package/types/plugins/filterable/components/filterable-menus/TextFilterMenu.d.ts +1 -1
- package/types/plugins/filterable/helper.d.ts +15 -3
- package/types/plugins/pagination/components/Paginator.d.ts +1 -1
- package/types/plugins/pagination/components/PerPageDropdown.d.ts +1 -1
- package/types/plugins/sortable/sorter.d.ts +1 -1
- package/types/renders/styled.d.ts +3 -3
- package/cjs/package.json +0 -7
- package/esm/package.json +0 -7
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
7
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
3
8
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
@@ -16,48 +21,54 @@ const components = {
|
|
|
16
21
|
DSTextBox: TextBox
|
|
17
22
|
};
|
|
18
23
|
|
|
19
|
-
const getEditorComponent = (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (typeof editorComponent === 'function') {
|
|
25
|
-
return editorComponent(_objectSpread({
|
|
24
|
+
const getEditorComponent = function () {
|
|
25
|
+
let editorComponent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
26
|
+
let handlers = arguments.length > 1 ? arguments[1] : undefined;
|
|
27
|
+
return _ref => {
|
|
28
|
+
let {
|
|
26
29
|
value,
|
|
27
30
|
onValue,
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
31
|
+
extraParameters
|
|
32
|
+
} = _ref;
|
|
33
|
+
|
|
34
|
+
if (typeof editorComponent === 'function') {
|
|
35
|
+
return editorComponent(_objectSpread({
|
|
36
|
+
value,
|
|
37
|
+
onValue,
|
|
38
|
+
customHandlers: handlers
|
|
39
|
+
}, extraParameters));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const {
|
|
43
|
+
type = 'DSTextBox'
|
|
44
|
+
} = editorComponent,
|
|
45
|
+
restEditorProps = _objectWithoutProperties(editorComponent, _excluded);
|
|
46
|
+
|
|
47
|
+
const Component = components[type];
|
|
48
|
+
|
|
49
|
+
if (type === 'DSComboBox') {
|
|
50
|
+
var _restEditorProps$opti;
|
|
51
|
+
|
|
52
|
+
// TODO: remove this whole condition when combobox v3 is out and fully working without "maxOptions" parameter
|
|
53
|
+
const maxOptions = (restEditorProps === null || restEditorProps === void 0 ? void 0 : (_restEditorProps$opti = restEditorProps.options) === null || _restEditorProps$opti === void 0 ? void 0 : _restEditorProps$opti.length) || 100;
|
|
54
|
+
return /*#__PURE__*/_jsx("div", {
|
|
55
|
+
style: {
|
|
56
|
+
zIndex: 0
|
|
57
|
+
}
|
|
58
|
+
}, void 0, /*#__PURE__*/jsx(Component, _objectSpread({
|
|
59
|
+
autoFocus: true,
|
|
60
|
+
onValue: onValue,
|
|
61
|
+
value: value,
|
|
62
|
+
maxOptions: maxOptions
|
|
63
|
+
}, restEditorProps)));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return /*#__PURE__*/jsx(Component, _objectSpread({
|
|
49
67
|
autoFocus: true,
|
|
50
68
|
onValue: onValue,
|
|
51
|
-
value: value
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return /*#__PURE__*/jsx(Component, _objectSpread({
|
|
57
|
-
autoFocus: true,
|
|
58
|
-
onValue: onValue,
|
|
59
|
-
value: value
|
|
60
|
-
}, restEditorProps));
|
|
69
|
+
value: value
|
|
70
|
+
}, restEditorProps));
|
|
71
|
+
};
|
|
61
72
|
};
|
|
62
73
|
|
|
63
74
|
export { getEditorComponent as default };
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
3
8
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
4
9
|
import { useRef } from 'react';
|
|
5
|
-
import ArrowheadDown from '@elliemae/ds-icons
|
|
6
|
-
import ArrowheadRight from '@elliemae/ds-icons/ArrowheadRight';
|
|
10
|
+
import { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';
|
|
7
11
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
8
|
-
import DSButton from '@elliemae/ds-
|
|
9
|
-
import DSTruncatedTooltipText from '@elliemae/ds-
|
|
12
|
+
import DSButton from '@elliemae/ds-button';
|
|
13
|
+
import DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';
|
|
10
14
|
import { dataGridBlockName } from '../../blockNames.js';
|
|
11
15
|
import { RowSizes } from '../../rowSizes.js';
|
|
12
16
|
import { jsxs } from 'react/jsx-runtime';
|
|
@@ -18,24 +22,25 @@ var _ArrowheadDown, _ArrowheadRight;
|
|
|
18
22
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
19
23
|
|
|
20
24
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
21
|
-
const blockName =
|
|
25
|
+
const blockName = "".concat(dataGridBlockName, "-expandable-column"); // todo: clean this when we move to css-js
|
|
22
26
|
|
|
23
27
|
const ExpandableColumnWrapper = aggregatedClasses('div')(blockName);
|
|
24
28
|
const LabelDescriptionWrapper = aggregatedClasses('div')(blockName, 'label-description-wrapper');
|
|
25
29
|
const Label = aggregatedClasses('span')(blockName, 'label');
|
|
26
30
|
const Description = aggregatedClasses('span')(blockName, 'description');
|
|
27
31
|
const ExtraColumnData = aggregatedClasses('div')(blockName, 'extra-column-data');
|
|
28
|
-
const ExpandableMasterWrapper = aggregatedClasses('div')(
|
|
29
|
-
const ExpandableDetailsWrapper = aggregatedClasses('div')(
|
|
32
|
+
const ExpandableMasterWrapper = aggregatedClasses('div')("".concat(blockName, "-master-wrapper"));
|
|
33
|
+
const ExpandableDetailsWrapper = aggregatedClasses('div')("".concat(blockName, "-details-wrapper"));
|
|
30
34
|
|
|
31
|
-
function ExpandableColumnCell({
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
function ExpandableColumnCell(_ref) {
|
|
36
|
+
let {
|
|
37
|
+
label,
|
|
38
|
+
description,
|
|
39
|
+
isExpanded,
|
|
40
|
+
expandableDetails,
|
|
41
|
+
extraData,
|
|
42
|
+
onToggleExpand
|
|
43
|
+
} = _ref;
|
|
39
44
|
const ref = useRef();
|
|
40
45
|
return /*#__PURE__*/jsxs(ExpandableColumnWrapper, {
|
|
41
46
|
ref: ref,
|
|
@@ -64,44 +69,48 @@ function ExpandableColumnCell({
|
|
|
64
69
|
});
|
|
65
70
|
}
|
|
66
71
|
|
|
67
|
-
const expandableColumnRenderer =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
description: renderRowDescription({
|
|
88
|
-
rowData
|
|
89
|
-
}),
|
|
90
|
-
expandableDetails: expandableDetails,
|
|
91
|
-
extraData: renderExtraData({
|
|
92
|
-
rowData
|
|
93
|
-
}),
|
|
94
|
-
isExpanded: isExpanded,
|
|
95
|
-
label: renderRowLabel({
|
|
72
|
+
const expandableColumnRenderer = _ref2 => {
|
|
73
|
+
let {
|
|
74
|
+
renderRowLabel,
|
|
75
|
+
renderRowDescription,
|
|
76
|
+
renderExtraData
|
|
77
|
+
} = _ref2;
|
|
78
|
+
return (value, _ref3, grid) => {
|
|
79
|
+
let {
|
|
80
|
+
rowData,
|
|
81
|
+
isExpanded
|
|
82
|
+
} = _ref3;
|
|
83
|
+
const {
|
|
84
|
+
props: {
|
|
85
|
+
renderExpandedDetails
|
|
86
|
+
},
|
|
87
|
+
actions: {
|
|
88
|
+
toggleExpand
|
|
89
|
+
}
|
|
90
|
+
} = grid.getInstance();
|
|
91
|
+
const expandableDetails = renderExpandedDetails({
|
|
96
92
|
rowData
|
|
97
|
-
})
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
});
|
|
94
|
+
return /*#__PURE__*/_jsx(ExpandableColumnCell, {
|
|
95
|
+
description: renderRowDescription({
|
|
96
|
+
rowData
|
|
97
|
+
}),
|
|
98
|
+
expandableDetails: expandableDetails,
|
|
99
|
+
extraData: renderExtraData({
|
|
100
|
+
rowData
|
|
101
|
+
}),
|
|
102
|
+
isExpanded: isExpanded,
|
|
103
|
+
label: renderRowLabel({
|
|
104
|
+
rowData
|
|
105
|
+
}),
|
|
106
|
+
onToggleExpand: () => toggleExpand(rowData)
|
|
107
|
+
});
|
|
108
|
+
};
|
|
100
109
|
};
|
|
101
110
|
|
|
102
111
|
const noop = () => null;
|
|
103
112
|
|
|
104
|
-
function createExpandableColumn(
|
|
113
|
+
function createExpandableColumn(_ref4) {
|
|
105
114
|
let {
|
|
106
115
|
property,
|
|
107
116
|
label,
|
|
@@ -113,8 +122,8 @@ function createExpandableColumn(_ref) {
|
|
|
113
122
|
sortable,
|
|
114
123
|
searchable,
|
|
115
124
|
customRenderer
|
|
116
|
-
} =
|
|
117
|
-
rest = _objectWithoutProperties(
|
|
125
|
+
} = _ref4,
|
|
126
|
+
rest = _objectWithoutProperties(_ref4, _excluded);
|
|
118
127
|
|
|
119
128
|
return _objectSpread(_objectSpread({}, rest), {}, {
|
|
120
129
|
label,
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
2
4
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
5
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
6
|
+
import 'core-js/modules/esnext.async-iterator.some.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
8
|
+
import 'core-js/modules/esnext.iterator.some.js';
|
|
9
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
10
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
11
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
12
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
13
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
14
|
import { useMemo, useRef, useEffect } from 'react';
|
|
5
|
-
import { cx, isFunction } from '@elliemae/ds-utilities
|
|
15
|
+
import { cx, isFunction } from '@elliemae/ds-utilities';
|
|
6
16
|
import { VariableSizeList } from 'react-window';
|
|
7
|
-
import ArrowheadDown from '@elliemae/ds-icons
|
|
8
|
-
import
|
|
9
|
-
import DSButton from '@elliemae/ds-basic/Button';
|
|
17
|
+
import { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';
|
|
18
|
+
import DSButton from '@elliemae/ds-button';
|
|
10
19
|
import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
|
|
11
20
|
import { appendCellFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';
|
|
12
21
|
import ExpandedRow from './ExpandedRow.js';
|
|
@@ -23,12 +32,15 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
23
32
|
|
|
24
33
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
25
34
|
|
|
26
|
-
const getExpandedRowSizeBySubrows =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
const getExpandedRowSizeBySubrows = _ref => {
|
|
36
|
+
let {
|
|
37
|
+
totalAmount,
|
|
38
|
+
amountVisible,
|
|
39
|
+
isShowingAll,
|
|
40
|
+
size = 36
|
|
41
|
+
} = _ref;
|
|
42
|
+
return isShowingAll ? size * (totalAmount + 1) - 6 : size * (amountVisible + 1) + 32;
|
|
43
|
+
};
|
|
32
44
|
|
|
33
45
|
const ExpandedRows = {
|
|
34
46
|
SingleColumn: ExpandedRow,
|
|
@@ -61,10 +73,11 @@ const ExpandablePlugin = createInstancePlugin('expandable', {
|
|
|
61
73
|
const firstColumnIndex = columns.findIndex(column => column.isUserColumn);
|
|
62
74
|
const firstColumn = columns[firstColumnIndex];
|
|
63
75
|
firstColumn.formatExpandable = true;
|
|
64
|
-
return [...columns.slice(0, firstColumnIndex), appendCellFormatter((value, {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
return [...columns.slice(0, firstColumnIndex), appendCellFormatter((value, _ref2) => {
|
|
77
|
+
let {
|
|
78
|
+
isExpanded,
|
|
79
|
+
rowData
|
|
80
|
+
} = _ref2;
|
|
68
81
|
const {
|
|
69
82
|
actions: {
|
|
70
83
|
toggleExpand
|
|
@@ -152,11 +165,11 @@ const ExpandablePlugin = createInstancePlugin('expandable', {
|
|
|
152
165
|
const expandedRowType = isExpandableSingleColumn(grid.decoratedColumns) ? 'SingleColumn' : 'Master';
|
|
153
166
|
const ExpandedRowComponent = createExpandedRow(expandedRowType); // eslint-disable-next-line react/display-name
|
|
154
167
|
|
|
155
|
-
return
|
|
168
|
+
return _ref3 => {
|
|
156
169
|
let {
|
|
157
170
|
isExpanded
|
|
158
|
-
} =
|
|
159
|
-
rowProps = _objectWithoutProperties(
|
|
171
|
+
} = _ref3,
|
|
172
|
+
rowProps = _objectWithoutProperties(_ref3, _excluded);
|
|
160
173
|
|
|
161
174
|
if (isExpanded) {
|
|
162
175
|
const {
|
|
@@ -192,9 +205,10 @@ const ExpandablePlugin = createInstancePlugin('expandable', {
|
|
|
192
205
|
return renderers;
|
|
193
206
|
},
|
|
194
207
|
|
|
195
|
-
getRowProps(rowProps, grid, {
|
|
196
|
-
|
|
197
|
-
|
|
208
|
+
getRowProps(rowProps, grid, _ref4) {
|
|
209
|
+
let {
|
|
210
|
+
rowData
|
|
211
|
+
} = _ref4;
|
|
198
212
|
const {
|
|
199
213
|
props: {
|
|
200
214
|
rowKey
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
3
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
4
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
5
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
6
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
8
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
10
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
11
|
import 'react';
|
|
5
|
-
import DSSeparator from '@elliemae/ds-
|
|
6
|
-
import DSButton from '@elliemae/ds-
|
|
12
|
+
import DSSeparator from '@elliemae/ds-separator';
|
|
13
|
+
import DSButton from '@elliemae/ds-button';
|
|
7
14
|
import styled from 'styled-components';
|
|
8
|
-
import { get } from '@elliemae/ds-utilities
|
|
15
|
+
import { get } from '@elliemae/ds-utilities';
|
|
9
16
|
import deferComponentRender from '@elliemae/ds-shared/defer-render-hoc';
|
|
10
17
|
import useDataGrid from '@elliemae/ds-shared/useDataGrid';
|
|
11
18
|
import { PaginationPlugin } from '../pagination/PaginationPlugin.js';
|
|
@@ -24,11 +31,13 @@ const _excluded = ["instanceRef"],
|
|
|
24
31
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
25
32
|
|
|
26
33
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
27
|
-
const DetailGrid = deferComponentRender(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
const DetailGrid = deferComponentRender(_ref => {
|
|
35
|
+
let {
|
|
36
|
+
parentGrid,
|
|
37
|
+
parentRowData,
|
|
38
|
+
rows
|
|
39
|
+
} = _ref;
|
|
40
|
+
|
|
32
41
|
const _parentGrid$props = parentGrid.props,
|
|
33
42
|
parentProps = _objectWithoutProperties(_parentGrid$props, _excluded);
|
|
34
43
|
|
|
@@ -61,15 +70,16 @@ const DetailGridWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
61
70
|
componentId: "sc-1goa4zy-1"
|
|
62
71
|
})(["display:flex;height:calc(100% - ", "px);width:", "px;margin:12px 0;"], props => props.allRowsVisible ? 18 : 60, props => props.expandableGridDetailWidth);
|
|
63
72
|
|
|
64
|
-
function ExpandedRow({
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
function ExpandedRow(_ref2) {
|
|
74
|
+
let {
|
|
75
|
+
parentGrid,
|
|
76
|
+
detailColumns,
|
|
77
|
+
rowData,
|
|
78
|
+
rows,
|
|
79
|
+
rowProps,
|
|
80
|
+
cellComponent: CellComponent,
|
|
81
|
+
rowComponent: RowComponent
|
|
82
|
+
} = _ref2;
|
|
73
83
|
const {
|
|
74
84
|
decoratedColumns,
|
|
75
85
|
actions: {
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
8
|
import 'react';
|
|
4
|
-
import { cx } from '@elliemae/ds-utilities
|
|
5
|
-
import DSSeparator from '@elliemae/ds-
|
|
9
|
+
import { cx } from '@elliemae/ds-utilities';
|
|
10
|
+
import DSSeparator from '@elliemae/ds-separator';
|
|
6
11
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
7
12
|
import { dataGridBlockName } from '../../blockNames.js';
|
|
8
13
|
import { jsxs } from 'react/jsx-runtime';
|
|
@@ -12,18 +17,19 @@ var _DSSeparator;
|
|
|
12
17
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
13
18
|
|
|
14
19
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
15
|
-
const blockName =
|
|
16
|
-
const DetailsWrapper = aggregatedClasses('div')(
|
|
20
|
+
const blockName = "".concat(dataGridBlockName, "-expanded-row");
|
|
21
|
+
const DetailsWrapper = aggregatedClasses('div')("".concat(blockName, "-details-wrapper"), null, () => ({
|
|
17
22
|
'ie-flex-basis-auto': true
|
|
18
23
|
}));
|
|
19
24
|
|
|
20
|
-
function ExpandedRowExtra({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
function ExpandedRowExtra(_ref) {
|
|
26
|
+
let {
|
|
27
|
+
children,
|
|
28
|
+
rowData,
|
|
29
|
+
rowProps,
|
|
30
|
+
rowComponent: RowComponent,
|
|
31
|
+
renderRowDetails = () => null
|
|
32
|
+
} = _ref;
|
|
27
33
|
return /*#__PURE__*/jsxs(RowComponent, _objectSpread(_objectSpread({}, rowProps), {}, {
|
|
28
34
|
className: cx(rowProps.className, 'expanded-detail-row'),
|
|
29
35
|
children: [/*#__PURE__*/_jsx(RowComponent, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import useExpandState from '@elliemae/ds-utilities
|
|
1
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
|
+
import { useExpandState, isFunction } from '@elliemae/ds-utilities';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
|
|
5
5
|
const useExpandGridState = grid => {
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
3
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
6
|
+
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
7
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
10
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
11
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
2
12
|
import 'core-js/modules/es.string.replace.js';
|
|
3
13
|
import 'core-js/modules/web.url.js';
|
|
4
|
-
import
|
|
14
|
+
import 'core-js/modules/web.url-search-params.js';
|
|
15
|
+
import { get } from '@elliemae/ds-utilities';
|
|
5
16
|
import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
|
|
6
17
|
|
|
7
18
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -19,12 +30,12 @@ const isVisible = column => {
|
|
|
19
30
|
const getColumnValue = (row, property) => get(row, property);
|
|
20
31
|
const getVisibleRowData = (row, columns) => columns.reduce((result, column) => {
|
|
21
32
|
const columnProperty = column.property;
|
|
22
|
-
return isVisible(column) ? [...result, getColumnValue(row,
|
|
33
|
+
return isVisible(column) ? [...result, getColumnValue(row, "_".concat(columnProperty)) || getColumnValue(row, columnProperty)] : result;
|
|
23
34
|
}, []);
|
|
24
35
|
|
|
25
36
|
const defaultOptions = uuid => ({
|
|
26
37
|
sheetName: 'SheetName',
|
|
27
|
-
fileName:
|
|
38
|
+
fileName: "datagrid-".concat(uuid),
|
|
28
39
|
type: 'csv',
|
|
29
40
|
onlySelection: false,
|
|
30
41
|
excludedColumns: undefined
|
|
@@ -40,18 +51,20 @@ const getCellValue = cell => {
|
|
|
40
51
|
const getExportedData = (rows, columns, range) => {
|
|
41
52
|
const rowsRanged = range ? rows.slice(...range) : rows;
|
|
42
53
|
const dataToExport = rowsRanged.map(row => getVisibleRowData(row, columns));
|
|
43
|
-
const columnsContent = columns.filter(c => isVisible(c)).reduce((acc, curr, idx) =>
|
|
44
|
-
const rowsContent = dataToExport.map(e => e.map(r =>
|
|
45
|
-
const csvContent =
|
|
54
|
+
const columnsContent = columns.filter(c => isVisible(c)).reduce((acc, curr, idx) => "".concat(acc).concat(idx === 0 ? '' : ',').concat(curr.label), '');
|
|
55
|
+
const rowsContent = dataToExport.map(e => e.map(r => "\"".concat(String(getCellValue(r)).replace(/"/g, '""'), "\"")).join(',')).join('\r\n');
|
|
56
|
+
const csvContent = "".concat(columnsContent, "\r\n").concat(rowsContent);
|
|
46
57
|
return csvContent;
|
|
47
58
|
}; // eslint-disable-next-line max-statements
|
|
48
59
|
|
|
49
|
-
const exportTo = (rows, columns, {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
60
|
+
const exportTo = (rows, columns, _ref) => {
|
|
61
|
+
let {
|
|
62
|
+
range,
|
|
63
|
+
fileName,
|
|
64
|
+
type,
|
|
65
|
+
excludedColumns
|
|
66
|
+
} = _ref;
|
|
67
|
+
|
|
55
68
|
if (excludedColumns) {
|
|
56
69
|
// eslint-disable-next-line no-param-reassign
|
|
57
70
|
columns = columns.filter(col => !excludedColumns.includes(col.property));
|
|
@@ -64,7 +77,7 @@ const exportTo = (rows, columns, {
|
|
|
64
77
|
|
|
65
78
|
if (navigator.msSaveBlob) {
|
|
66
79
|
// IE 10+
|
|
67
|
-
navigator.msSaveBlob(blob,
|
|
80
|
+
navigator.msSaveBlob(blob, "".concat(fileName, ".").concat(type));
|
|
68
81
|
} else {
|
|
69
82
|
const link = document.createElement('a');
|
|
70
83
|
|
|
@@ -73,7 +86,7 @@ const exportTo = (rows, columns, {
|
|
|
73
86
|
// Browsers that support HTML5 download attribute
|
|
74
87
|
const url = URL.createObjectURL(blob);
|
|
75
88
|
link.setAttribute('href', url);
|
|
76
|
-
link.setAttribute('download',
|
|
89
|
+
link.setAttribute('download', "".concat(fileName, ".").concat(type));
|
|
77
90
|
link.style.visibility = 'hidden';
|
|
78
91
|
document.body.appendChild(link);
|
|
79
92
|
link.click();
|
|
@@ -85,7 +98,8 @@ const exportTo = (rows, columns, {
|
|
|
85
98
|
const ExportDataPlugin = createInstancePlugin('export-data', {
|
|
86
99
|
decorateGrid(instance) {
|
|
87
100
|
return {
|
|
88
|
-
exportRows(
|
|
101
|
+
exportRows() {
|
|
102
|
+
let opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
89
103
|
const {
|
|
90
104
|
composedRows: rows,
|
|
91
105
|
columns,
|
|
@@ -109,7 +123,8 @@ const ExportDataPlugin = createInstancePlugin('export-data', {
|
|
|
109
123
|
exportTo(currentRows, columns, options);
|
|
110
124
|
},
|
|
111
125
|
|
|
112
|
-
exportVisibleRows(
|
|
126
|
+
exportVisibleRows() {
|
|
127
|
+
let opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
113
128
|
const {
|
|
114
129
|
composedRows: rows,
|
|
115
130
|
columns,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { get, isFunction } from '@elliemae/ds-utilities
|
|
1
|
+
import { get, isFunction } from '@elliemae/ds-utilities';
|
|
2
2
|
import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
|
|
3
3
|
import { addFilterToColumn } from './addFilterToColumn.js';
|
|
4
4
|
import filterRowsByQuery, { filterRowsByQueryGroup } from './filtering-helper/filterRowsByQuery.js';
|
|
@@ -54,9 +54,10 @@ const FilterablePlugin = createInstancePlugin('filterable', {
|
|
|
54
54
|
registerHotKeys(grid) {
|
|
55
55
|
return {
|
|
56
56
|
key: 'ctrl+f',
|
|
57
|
-
handler:
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
handler: _ref => {
|
|
58
|
+
let {
|
|
59
|
+
cellIndex
|
|
60
|
+
} = _ref;
|
|
60
61
|
const {
|
|
61
62
|
decoratedColumns
|
|
62
63
|
} = grid.getInstance();
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import { createRef } from 'react';
|
|
3
8
|
import { mergeClassNameToColumnHeader } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';
|