@elliemae/ds-datagrids 2.0.0-next.7 → 2.0.0-rc.2
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 +246 -243
- package/cjs/DataGridImpl.js +16 -8
- package/cjs/PaginatedDataGrid.js +5 -0
- package/cjs/columns/IconColumn.js +19 -17
- package/cjs/columns/NumberColumn.js +2 -4
- package/cjs/components/BodyCell.js +17 -10
- package/cjs/components/BodyList.js +7 -0
- package/cjs/components/ColumnVisibilityMenuOption.js +10 -6
- package/cjs/components/ColumnsOptionsMenuSection.js +34 -28
- package/cjs/components/EmptyState.js +19 -17
- package/cjs/components/HeaderCell.js +14 -8
- package/cjs/components/List.js +5 -0
- package/cjs/components/ListItem.js +7 -0
- package/cjs/components/NoResults.js +5 -0
- package/cjs/components/RowsLoader.js +5 -4
- package/cjs/components/Table.js +5 -0
- package/cjs/components/TableBody.js +5 -0
- package/cjs/components/TableHeader.js +5 -0
- package/cjs/components/footer/addOptionalFooterComponents.js +5 -4
- package/cjs/components/header/PrimaryControls.js +20 -15
- package/cjs/components/header/addOptionalHeaderComponents.js +4 -3
- package/cjs/components/renderers/defaultClassedRenderers.js +33 -21
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +46 -35
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js +9 -5
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +2 -3
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +10 -8
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +13 -6
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +3 -3
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js +22 -17
- package/cjs/plugins/column-sizing/useColumnSizeService.js +9 -0
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js +56 -40
- package/cjs/plugins/column-sizing/utils.js +10 -6
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +9 -4
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +20 -21
- package/cjs/plugins/editable/EditableComponents/ComboBox.js +7 -3
- package/cjs/plugins/editable/EditableComponents/TextBox.js +20 -14
- package/cjs/plugins/editable/EditablePlugin.js +15 -15
- package/cjs/plugins/editable/decorateEditable.js +18 -11
- package/cjs/plugins/editable/getEditorComponent.js +45 -34
- package/cjs/plugins/expandable-grid/ExpandableColumn.js +57 -50
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js +37 -26
- package/cjs/plugins/expandable-grid/ExpandedRow.js +28 -18
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +16 -10
- package/cjs/plugins/expandable-grid/useExpandGridState.js +3 -8
- package/cjs/plugins/export-data/ExportDataPlugin.js +23 -10
- package/cjs/plugins/filterable/FilterablePlugin.js +7 -6
- package/cjs/plugins/filterable/addFilterToColumn.js +5 -0
- package/cjs/plugins/filterable/components/FilterableHeader.js +35 -27
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +38 -32
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +26 -22
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +119 -154
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +28 -20
- package/cjs/plugins/filterable/filterableFormatter.js +15 -10
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +16 -4
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +7 -4
- package/cjs/plugins/filterable/helper.js +16 -7
- package/cjs/plugins/filterable/useFilterableState.js +11 -5
- package/cjs/plugins/grouping-by/GroupingByPlugin.js +2 -0
- package/cjs/plugins/grouping-grid/GroupingPlugin.js +9 -0
- package/cjs/plugins/grouping-grid/walkStrategy.js +11 -9
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +7 -1
- package/cjs/plugins/pagination/PaginationPlugin.js +9 -2
- package/cjs/plugins/pagination/components/Pagination.js +10 -9
- package/cjs/plugins/pagination/components/Paginator.js +8 -7
- package/cjs/plugins/pagination/components/PerPageDropdown.js +20 -13
- package/cjs/plugins/pagination/helper.js +10 -7
- package/cjs/plugins/pagination/usePaginationState.js +7 -3
- package/cjs/plugins/resizable/ResizablePlugin.js +5 -4
- package/cjs/plugins/resizable/decorateResizable.js +14 -8
- package/cjs/plugins/resizable/useResizeHandle.js +21 -16
- package/cjs/plugins/resizable/utils.js +8 -5
- package/cjs/plugins/row-dnd/DndRowsPlugin.js +23 -16
- package/cjs/plugins/selectable/SelectablePlugin.js +10 -8
- package/cjs/plugins/selectable/addSelectableColumn.js +24 -16
- package/cjs/plugins/selectable/helper.js +12 -3
- package/cjs/plugins/selectable/selectableFormatter.js +80 -71
- package/cjs/plugins/selectable/useSelectableState.js +24 -11
- package/cjs/plugins/sortable/SortablePlugin.js +8 -7
- package/cjs/plugins/sortable/sortHeaderFormatter.js +14 -15
- package/cjs/plugins/sortable/sortTree.js +13 -3
- package/cjs/plugins/sortable/sorter.js +151 -134
- package/cjs/plugins/sortable/useSortableState.js +7 -0
- package/cjs/plugins/toolbar/RowRenderer.js +7 -2
- package/cjs/plugins/toolbar/ToolbarTrigger.js +15 -10
- package/cjs/plugins/virtualization/AutoHeightList.js +10 -8
- package/cjs/plugins/virtualization/VirtualizationPlugin.js +32 -25
- package/cjs/plugins/virtualization/VirtualizedBody.js +18 -9
- package/cjs/plugins/virtualization/VirtualizedBodyRow.js +8 -7
- package/cjs/renders/CellWithAddons.js +20 -18
- package/cjs/renders/styled.js +3 -2
- package/cjs/utilities/getPluginsFromProps.js +5 -1
- package/cjs/utilities/getScrollbarSize.js +2 -1
- package/cjs/utilities/normalizeData.js +7 -1
- package/esm/DSDataGrid.js +246 -243
- package/esm/DataGridImpl.js +16 -8
- package/esm/PaginatedDataGrid.js +5 -0
- package/esm/columns/IconColumn.js +18 -16
- package/esm/columns/NumberColumn.js +2 -4
- package/esm/components/BodyCell.js +17 -10
- package/esm/components/BodyList.js +7 -0
- package/esm/components/ColumnVisibilityMenuOption.js +10 -6
- package/esm/components/ColumnsOptionsMenuSection.js +34 -28
- package/esm/components/EmptyState.js +18 -15
- package/esm/components/HeaderCell.js +14 -8
- 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 +33 -21
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +46 -35
- package/esm/plugins/column-dnd/DndColumnsPlugin.js +6 -2
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +1 -1
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js +9 -7
- 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 +21 -15
- package/esm/plugins/column-sizing/useColumnSizeService.js +9 -0
- package/esm/plugins/column-sizing/useStylesheetHelpers.js +54 -38
- 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 +6 -1
- package/esm/plugins/editable/EditableComponents/TextBox.js +19 -12
- package/esm/plugins/editable/EditablePlugin.js +13 -12
- package/esm/plugins/editable/decorateEditable.js +16 -8
- package/esm/plugins/editable/getEditorComponent.js +49 -38
- package/esm/plugins/expandable-grid/ExpandableColumn.js +56 -47
- package/esm/plugins/expandable-grid/ExpandablePlugin.js +33 -20
- package/esm/plugins/expandable-grid/ExpandedRow.js +27 -17
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js +15 -9
- package/esm/plugins/expandable-grid/useExpandGridState.js +1 -2
- package/esm/plugins/export-data/ExportDataPlugin.js +22 -9
- package/esm/plugins/filterable/FilterablePlugin.js +5 -4
- package/esm/plugins/filterable/addFilterToColumn.js +5 -0
- package/esm/plugins/filterable/components/FilterableHeader.js +31 -22
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +38 -31
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +26 -21
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +118 -152
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +27 -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 +10 -1
- package/esm/plugins/filterable/useFilterableState.js +11 -5
- package/esm/plugins/grouping-by/GroupingByPlugin.js +2 -0
- package/esm/plugins/grouping-grid/GroupingPlugin.js +9 -0
- package/esm/plugins/grouping-grid/walkStrategy.js +11 -9
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +7 -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 +8 -7
- package/esm/plugins/pagination/components/PerPageDropdown.js +17 -9
- package/esm/plugins/pagination/helper.js +10 -7
- package/esm/plugins/pagination/usePaginationState.js +6 -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 +6 -3
- package/esm/plugins/row-dnd/DndRowsPlugin.js +21 -13
- package/esm/plugins/selectable/SelectablePlugin.js +9 -7
- 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 +19 -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 +151 -134
- package/esm/plugins/sortable/useSortableState.js +7 -0
- package/esm/plugins/toolbar/RowRenderer.js +6 -1
- package/esm/plugins/toolbar/ToolbarTrigger.js +14 -8
- package/esm/plugins/virtualization/AutoHeightList.js +6 -3
- package/esm/plugins/virtualization/VirtualizationPlugin.js +31 -24
- package/esm/plugins/virtualization/VirtualizedBody.js +14 -5
- package/esm/plugins/virtualization/VirtualizedBodyRow.js +8 -7
- package/esm/renders/CellWithAddons.js +15 -14
- package/esm/renders/styled.js +1 -1
- package/esm/utilities/getPluginsFromProps.js +5 -1
- package/esm/utilities/getScrollbarSize.js +2 -1
- package/esm/utilities/normalizeData.js +7 -1
- package/package.json +19 -18
- 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/PerPageDropdown.d.ts +1 -1
|
@@ -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';
|
|
@@ -28,14 +32,15 @@ const ExtraColumnData = aggregatedClasses('div')(blockName, 'extra-column-data')
|
|
|
28
32
|
const ExpandableMasterWrapper = aggregatedClasses('div')("".concat(blockName, "-master-wrapper"));
|
|
29
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,13 +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';
|
|
4
13
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
14
|
import { useMemo, useRef, useEffect } from 'react';
|
|
6
|
-
import { cx, isFunction } from '@elliemae/ds-utilities
|
|
15
|
+
import { cx, isFunction } from '@elliemae/ds-utilities';
|
|
7
16
|
import { VariableSizeList } from 'react-window';
|
|
8
|
-
import ArrowheadDown from '@elliemae/ds-icons
|
|
9
|
-
import
|
|
10
|
-
import DSButton from '@elliemae/ds-basic/Button';
|
|
17
|
+
import { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';
|
|
18
|
+
import DSButton from '@elliemae/ds-button';
|
|
11
19
|
import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
|
|
12
20
|
import { appendCellFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';
|
|
13
21
|
import ExpandedRow from './ExpandedRow.js';
|
|
@@ -24,12 +32,15 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
24
32
|
|
|
25
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; }
|
|
26
34
|
|
|
27
|
-
const getExpandedRowSizeBySubrows =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
+
};
|
|
33
44
|
|
|
34
45
|
const ExpandedRows = {
|
|
35
46
|
SingleColumn: ExpandedRow,
|
|
@@ -62,10 +73,11 @@ const ExpandablePlugin = createInstancePlugin('expandable', {
|
|
|
62
73
|
const firstColumnIndex = columns.findIndex(column => column.isUserColumn);
|
|
63
74
|
const firstColumn = columns[firstColumnIndex];
|
|
64
75
|
firstColumn.formatExpandable = true;
|
|
65
|
-
return [...columns.slice(0, firstColumnIndex), appendCellFormatter((value, {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
return [...columns.slice(0, firstColumnIndex), appendCellFormatter((value, _ref2) => {
|
|
77
|
+
let {
|
|
78
|
+
isExpanded,
|
|
79
|
+
rowData
|
|
80
|
+
} = _ref2;
|
|
69
81
|
const {
|
|
70
82
|
actions: {
|
|
71
83
|
toggleExpand
|
|
@@ -153,11 +165,11 @@ const ExpandablePlugin = createInstancePlugin('expandable', {
|
|
|
153
165
|
const expandedRowType = isExpandableSingleColumn(grid.decoratedColumns) ? 'SingleColumn' : 'Master';
|
|
154
166
|
const ExpandedRowComponent = createExpandedRow(expandedRowType); // eslint-disable-next-line react/display-name
|
|
155
167
|
|
|
156
|
-
return
|
|
168
|
+
return _ref3 => {
|
|
157
169
|
let {
|
|
158
170
|
isExpanded
|
|
159
|
-
} =
|
|
160
|
-
rowProps = _objectWithoutProperties(
|
|
171
|
+
} = _ref3,
|
|
172
|
+
rowProps = _objectWithoutProperties(_ref3, _excluded);
|
|
161
173
|
|
|
162
174
|
if (isExpanded) {
|
|
163
175
|
const {
|
|
@@ -193,9 +205,10 @@ const ExpandablePlugin = createInstancePlugin('expandable', {
|
|
|
193
205
|
return renderers;
|
|
194
206
|
},
|
|
195
207
|
|
|
196
|
-
getRowProps(rowProps, grid, {
|
|
197
|
-
|
|
198
|
-
|
|
208
|
+
getRowProps(rowProps, grid, _ref4) {
|
|
209
|
+
let {
|
|
210
|
+
rowData
|
|
211
|
+
} = _ref4;
|
|
199
212
|
const {
|
|
200
213
|
props: {
|
|
201
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';
|
|
@@ -17,13 +22,14 @@ const DetailsWrapper = aggregatedClasses('div')("".concat(blockName, "-details-w
|
|
|
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,6 +1,5 @@
|
|
|
1
1
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
|
-
import { isFunction } from '@elliemae/ds-utilities
|
|
3
|
-
import useExpandState from '@elliemae/ds-utilities/hooks/useExpandState';
|
|
2
|
+
import { useExpandState, isFunction } from '@elliemae/ds-utilities';
|
|
4
3
|
import { useState } from 'react';
|
|
5
4
|
|
|
6
5
|
const useExpandGridState = grid => {
|
|
@@ -1,9 +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';
|
|
2
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';
|
|
3
12
|
import 'core-js/modules/es.string.replace.js';
|
|
4
13
|
import 'core-js/modules/web.url.js';
|
|
5
14
|
import 'core-js/modules/web.url-search-params.js';
|
|
6
|
-
import { get } from '@elliemae/ds-utilities
|
|
15
|
+
import { get } from '@elliemae/ds-utilities';
|
|
7
16
|
import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
|
|
8
17
|
|
|
9
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; }
|
|
@@ -48,12 +57,14 @@ const getExportedData = (rows, columns, range) => {
|
|
|
48
57
|
return csvContent;
|
|
49
58
|
}; // eslint-disable-next-line max-statements
|
|
50
59
|
|
|
51
|
-
const exportTo = (rows, columns, {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
const exportTo = (rows, columns, _ref) => {
|
|
61
|
+
let {
|
|
62
|
+
range,
|
|
63
|
+
fileName,
|
|
64
|
+
type,
|
|
65
|
+
excludedColumns
|
|
66
|
+
} = _ref;
|
|
67
|
+
|
|
57
68
|
if (excludedColumns) {
|
|
58
69
|
// eslint-disable-next-line no-param-reassign
|
|
59
70
|
columns = columns.filter(col => !excludedColumns.includes(col.property));
|
|
@@ -87,7 +98,8 @@ const exportTo = (rows, columns, {
|
|
|
87
98
|
const ExportDataPlugin = createInstancePlugin('export-data', {
|
|
88
99
|
decorateGrid(instance) {
|
|
89
100
|
return {
|
|
90
|
-
exportRows(
|
|
101
|
+
exportRows() {
|
|
102
|
+
let opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
91
103
|
const {
|
|
92
104
|
composedRows: rows,
|
|
93
105
|
columns,
|
|
@@ -111,7 +123,8 @@ const ExportDataPlugin = createInstancePlugin('export-data', {
|
|
|
111
123
|
exportTo(currentRows, columns, options);
|
|
112
124
|
},
|
|
113
125
|
|
|
114
|
-
exportVisibleRows(
|
|
126
|
+
exportVisibleRows() {
|
|
127
|
+
let opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
115
128
|
const {
|
|
116
129
|
composedRows: rows,
|
|
117
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';
|
|
@@ -2,10 +2,14 @@ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
|
2
2
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
3
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
4
|
import 'core-js/modules/es.string.replace.js';
|
|
5
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
6
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
8
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
5
10
|
import { useState, useEffect, useCallback } from 'react';
|
|
6
11
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
7
|
-
import { debounce, get } from '@elliemae/ds-utilities
|
|
8
|
-
import useResizeObserver from '@elliemae/ds-utilities/hooks/useResizeObserver';
|
|
12
|
+
import { debounce, useResizeObserver, get } from '@elliemae/ds-utilities';
|
|
9
13
|
import { useTheme } from '@elliemae/ds-system';
|
|
10
14
|
import getFilterMenuByType from './filterable-menus/getFilterMenuByType.js';
|
|
11
15
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -14,25 +18,29 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
14
18
|
|
|
15
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; }
|
|
16
20
|
const blockName = 'data-grid-filter-header';
|
|
17
|
-
const Container = aggregatedClasses('div')(blockName, null,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
const Container = aggregatedClasses('div')(blockName, null, _ref => {
|
|
22
|
+
let {
|
|
23
|
+
showFilter
|
|
24
|
+
} = _ref;
|
|
25
|
+
return {
|
|
26
|
+
'show-filter': showFilter
|
|
27
|
+
};
|
|
28
|
+
});
|
|
22
29
|
const FilterHeaderValue = aggregatedClasses('div')(blockName, 'value');
|
|
23
30
|
const FilterHeaderButton = aggregatedClasses('div')(blockName, 'button');
|
|
24
|
-
function FilterableHeader({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
function FilterableHeader(_ref2) {
|
|
32
|
+
let {
|
|
33
|
+
column,
|
|
34
|
+
value,
|
|
35
|
+
columnData,
|
|
36
|
+
onAddFilter,
|
|
37
|
+
onRemoveFilter,
|
|
38
|
+
filterMenuRef,
|
|
39
|
+
onFilterMenuClose,
|
|
40
|
+
onFilterMenuOpen,
|
|
41
|
+
filters,
|
|
42
|
+
isMulti
|
|
43
|
+
} = _ref2;
|
|
36
44
|
const [isMenuOpened, setMenuOpened] = useState(false);
|
|
37
45
|
const [headerWidth, setHeaderWidth] = useState();
|
|
38
46
|
const debouncedWidthSetter = debounce(setHeaderWidth, 200);
|
|
@@ -43,9 +51,10 @@ function FilterableHeader({
|
|
|
43
51
|
const theme = useTheme();
|
|
44
52
|
const dropdownMinWidth = filterMenuMinWidth || Number(theme.space.xl.replace('px', '')) * 2;
|
|
45
53
|
|
|
46
|
-
const defineHeaderWidth =
|
|
47
|
-
|
|
48
|
-
|
|
54
|
+
const defineHeaderWidth = _ref3 => {
|
|
55
|
+
let {
|
|
56
|
+
width
|
|
57
|
+
} = _ref3;
|
|
49
58
|
let nextWidth = width + 16; // todo: use dimsum space once we convert it to JS
|
|
50
59
|
|
|
51
60
|
if (nextWidth < dropdownMinWidth) nextWidth = dropdownMinWidth;
|