@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,148 +1,166 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
-
import
|
|
2
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
4
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
5
|
+
import 'core-js/modules/esnext.async-iterator.some.js';
|
|
6
|
+
import 'core-js/modules/esnext.iterator.some.js';
|
|
7
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
10
|
+
import 'core-js/modules/esnext.async-iterator.find.js';
|
|
11
|
+
import 'core-js/modules/esnext.iterator.find.js';
|
|
12
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
13
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
14
|
+
import { get } from '@elliemae/ds-utilities';
|
|
3
15
|
import moment from 'moment';
|
|
4
16
|
|
|
5
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; }
|
|
6
18
|
|
|
7
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; }
|
|
8
|
-
const sorter = ({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (realColumn.type === 'DateTime') {
|
|
54
|
-
return moment(resolvedValue);
|
|
55
|
-
}
|
|
20
|
+
const sorter = function () {
|
|
21
|
+
let {
|
|
22
|
+
columns,
|
|
23
|
+
sortingColumns,
|
|
24
|
+
sort,
|
|
25
|
+
emptyLast
|
|
26
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
27
|
+
return data => {
|
|
28
|
+
if (!columns) {
|
|
29
|
+
throw new Error('sort.sorter - Missing "columns" argument!');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (!sort) {
|
|
33
|
+
throw new Error('sort.sorter - Missing "sort" argument!');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (!sortingColumns) {
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const columnIndexList = new Array(sortingColumns.length);
|
|
41
|
+
const orderList = new Array(sortingColumns.length);
|
|
42
|
+
let actualSortFunction = sort;
|
|
43
|
+
|
|
44
|
+
if (emptyLast) {
|
|
45
|
+
actualSortFunction = (innerData, innerColumnIndexList, innerOrderList) => {
|
|
46
|
+
const sortedData = sort(innerData, innerColumnIndexList, innerOrderList);
|
|
47
|
+
const keys = Object.keys(sortingColumns);
|
|
48
|
+
const withData = sortedData.filter(r => keys.some(key => !!r[key]));
|
|
49
|
+
const withoutData = sortedData.filter(r => keys.some(key => !r[key]));
|
|
50
|
+
return [...withData, ...withoutData];
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
Object.keys(sortingColumns).forEach(sortingColumnKey => {
|
|
55
|
+
const realColumn = columns.find(column => column.property === sortingColumnKey);
|
|
56
|
+
if (!realColumn) return;
|
|
57
|
+
|
|
58
|
+
const columnSorter = realColumn.sort || function resolveValue(row) {
|
|
59
|
+
const {
|
|
60
|
+
property,
|
|
61
|
+
sortBy
|
|
62
|
+
} = realColumn;
|
|
63
|
+
const value = row[sortBy || property]; // Pick resolved value by convention
|
|
56
64
|
|
|
57
|
-
|
|
58
|
-
};
|
|
65
|
+
const resolvedValue = get(row, "_".concat(property), value);
|
|
59
66
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
if (realColumn.type === 'DateTime') {
|
|
68
|
+
return moment(resolvedValue);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return typeof resolvedValue === 'string' ? resolvedValue.toLowerCase() : resolvedValue;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const sortingColumn = sortingColumns[sortingColumnKey];
|
|
75
|
+
columnIndexList[sortingColumn.position] = columnSorter;
|
|
76
|
+
orderList[sortingColumn.position] = sortingColumn.direction;
|
|
77
|
+
});
|
|
78
|
+
return actualSortFunction(data, columnIndexList, orderList);
|
|
79
|
+
};
|
|
65
80
|
};
|
|
66
|
-
const sorterGroups = ({
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const orderList = new Array(sortingColumns.length);
|
|
86
|
-
let actualSortFunction = sort;
|
|
87
|
-
|
|
88
|
-
if (emptyLast) {
|
|
89
|
-
actualSortFunction = (innerData, innerColumnIndexList, innerOrderList) => {
|
|
90
|
-
const sortedData = sort(innerData, innerColumnIndexList, innerOrderList);
|
|
91
|
-
const keys = Object.keys(sortingColumns);
|
|
92
|
-
const withData = sortedData.filter(r => keys.some(key => !!r[key]));
|
|
93
|
-
const withoutData = sortedData.filter(r => keys.some(key => !r[key]));
|
|
94
|
-
return [...withData, ...withoutData];
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
Object.keys(sortingColumns).forEach(sortingColumnKey => {
|
|
99
|
-
const realColumn = columns.find(column => column.property === sortingColumnKey);
|
|
100
|
-
if (!realColumn) return;
|
|
101
|
-
|
|
102
|
-
const columnSorter = realColumn.sort || function resolveValue(row) {
|
|
103
|
-
const {
|
|
104
|
-
property,
|
|
105
|
-
sortBy
|
|
106
|
-
} = realColumn;
|
|
107
|
-
const value = row[sortBy || property]; // Pick resolved value by convention
|
|
108
|
-
|
|
109
|
-
const resolvedValue = get(row, `_${property}`, value);
|
|
110
|
-
|
|
111
|
-
if (realColumn.type === 'DateTime') {
|
|
112
|
-
return moment(resolvedValue);
|
|
113
|
-
}
|
|
81
|
+
const sorterGroups = function () {
|
|
82
|
+
let {
|
|
83
|
+
columns,
|
|
84
|
+
sortingColumns,
|
|
85
|
+
sort,
|
|
86
|
+
emptyLast
|
|
87
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
88
|
+
return (data, rowsData) => {
|
|
89
|
+
if (!columns) {
|
|
90
|
+
throw new Error('sort.sorter - Missing "columns" argument!');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (!sort) {
|
|
94
|
+
throw new Error('sort.sorter - Missing "sort" argument!');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (!sortingColumns) {
|
|
98
|
+
return data;
|
|
99
|
+
}
|
|
114
100
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
rowsData.forEach(group => {
|
|
128
|
-
groups[group.id] = {
|
|
129
|
-
children: actualSortFunction(group.children.map(c => _objectSpread({
|
|
130
|
-
parentNode: preserveData[c.id].parentNode,
|
|
131
|
-
data: c
|
|
132
|
-
}, c)), columnIndexList, orderList) // sort internally
|
|
133
|
-
|
|
134
|
-
};
|
|
135
|
-
});
|
|
136
|
-
const sorted = actualSortFunction(data.map(r => _objectSpread(_objectSpread({}, r.data), r)), columnIndexList, orderList); // sort global
|
|
137
|
-
|
|
138
|
-
let ssortGlobal = [];
|
|
139
|
-
sorted.filter(s => !s.isGroup).forEach(sr => {
|
|
140
|
-
if (groups[sr.parentNode.id]) {
|
|
141
|
-
ssortGlobal = [...ssortGlobal, preserveData[sr.parentNode.id], ...groups[sr.parentNode.id].children];
|
|
142
|
-
delete groups[sr.parentNode.id];
|
|
101
|
+
const columnIndexList = new Array(sortingColumns.length);
|
|
102
|
+
const orderList = new Array(sortingColumns.length);
|
|
103
|
+
let actualSortFunction = sort;
|
|
104
|
+
|
|
105
|
+
if (emptyLast) {
|
|
106
|
+
actualSortFunction = (innerData, innerColumnIndexList, innerOrderList) => {
|
|
107
|
+
const sortedData = sort(innerData, innerColumnIndexList, innerOrderList);
|
|
108
|
+
const keys = Object.keys(sortingColumns);
|
|
109
|
+
const withData = sortedData.filter(r => keys.some(key => !!r[key]));
|
|
110
|
+
const withoutData = sortedData.filter(r => keys.some(key => !r[key]));
|
|
111
|
+
return [...withData, ...withoutData];
|
|
112
|
+
};
|
|
143
113
|
}
|
|
144
|
-
|
|
145
|
-
|
|
114
|
+
|
|
115
|
+
Object.keys(sortingColumns).forEach(sortingColumnKey => {
|
|
116
|
+
const realColumn = columns.find(column => column.property === sortingColumnKey);
|
|
117
|
+
if (!realColumn) return;
|
|
118
|
+
|
|
119
|
+
const columnSorter = realColumn.sort || function resolveValue(row) {
|
|
120
|
+
const {
|
|
121
|
+
property,
|
|
122
|
+
sortBy
|
|
123
|
+
} = realColumn;
|
|
124
|
+
const value = row[sortBy || property]; // Pick resolved value by convention
|
|
125
|
+
|
|
126
|
+
const resolvedValue = get(row, "_".concat(property), value);
|
|
127
|
+
|
|
128
|
+
if (realColumn.type === 'DateTime') {
|
|
129
|
+
return moment(resolvedValue);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return typeof resolvedValue === 'string' ? resolvedValue.toLowerCase() : resolvedValue;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const sortingColumn = sortingColumns[sortingColumnKey];
|
|
136
|
+
columnIndexList[sortingColumn.position] = columnSorter;
|
|
137
|
+
orderList[sortingColumn.position] = sortingColumn.direction;
|
|
138
|
+
});
|
|
139
|
+
const groups = {};
|
|
140
|
+
const preserveData = {};
|
|
141
|
+
data.forEach(c => {
|
|
142
|
+
preserveData[c.id] = _objectSpread({}, c);
|
|
143
|
+
});
|
|
144
|
+
rowsData.forEach(group => {
|
|
145
|
+
groups[group.id] = {
|
|
146
|
+
children: actualSortFunction(group.children.map(c => _objectSpread({
|
|
147
|
+
parentNode: preserveData[c.id].parentNode,
|
|
148
|
+
data: c
|
|
149
|
+
}, c)), columnIndexList, orderList) // sort internally
|
|
150
|
+
|
|
151
|
+
};
|
|
152
|
+
});
|
|
153
|
+
const sorted = actualSortFunction(data.map(r => _objectSpread(_objectSpread({}, r.data), r)), columnIndexList, orderList); // sort global
|
|
154
|
+
|
|
155
|
+
let ssortGlobal = [];
|
|
156
|
+
sorted.filter(s => !s.isGroup).forEach(sr => {
|
|
157
|
+
if (groups[sr.parentNode.id]) {
|
|
158
|
+
ssortGlobal = [...ssortGlobal, preserveData[sr.parentNode.id], ...groups[sr.parentNode.id].children];
|
|
159
|
+
delete groups[sr.parentNode.id];
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
return ssortGlobal;
|
|
163
|
+
};
|
|
146
164
|
};
|
|
147
165
|
|
|
148
166
|
export { sorter, sorterGroups };
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
|
+
import 'core-js/modules/esnext.async-iterator.find.js';
|
|
4
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.find.js';
|
|
6
|
+
import 'core-js/modules/esnext.async-iterator.filter.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';
|
|
2
10
|
import * as sortabular from 'sortabular/dist/index.js';
|
|
3
11
|
import useDerivedStateFromProps from '@elliemae/ds-utilities/hooks/useDerivedStateFromProps';
|
|
4
12
|
import { checkIfSortable } from './checkIfSortable.js';
|
|
@@ -1,8 +1,14 @@
|
|
|
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 _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
9
|
import { useRef, useState, useEffect } from 'react';
|
|
4
10
|
import { isEmpty } from 'lodash';
|
|
5
|
-
import { omit } from '@elliemae/ds-utilities
|
|
11
|
+
import { omit } from '@elliemae/ds-utilities';
|
|
6
12
|
import { ToolbarTrigger } from './ToolbarTrigger.js';
|
|
7
13
|
import { RowSizes } from '../../rowSizes.js';
|
|
8
14
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -62,7 +68,7 @@ const RowRenderer = (Row, grid) => {
|
|
|
62
68
|
}, props), {}, {
|
|
63
69
|
style: rowStyle
|
|
64
70
|
})), isEmpty(rowData) && !rowData.index && !rowData.rowIndex ? null : /*#__PURE__*/_jsx("div", {
|
|
65
|
-
className:
|
|
71
|
+
className: "toolbar-trigger-container ".concat(style ? 'move' : 'stay'),
|
|
66
72
|
style: _objectSpread({}, popStyle)
|
|
67
73
|
}, void 0, /*#__PURE__*/_jsx(ToolbarTrigger, {
|
|
68
74
|
grid: grid,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
3
|
import 'react';
|
|
3
4
|
import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
|
|
4
5
|
import { appendCellFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';
|
|
@@ -1,9 +1,15 @@
|
|
|
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 _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
9
|
import { useState } from 'react';
|
|
4
10
|
import styled from 'styled-components';
|
|
5
|
-
import DSButton from '@elliemae/ds-
|
|
6
|
-
import MoreOptionsVert from '@elliemae/ds-icons
|
|
11
|
+
import DSButton from '@elliemae/ds-button';
|
|
12
|
+
import { MoreOptionsVert } from '@elliemae/ds-icons';
|
|
7
13
|
|
|
8
14
|
var _MoreOptionsVert;
|
|
9
15
|
|
|
@@ -15,18 +21,18 @@ const ToolbarBtns = /*#__PURE__*/styled.div.withConfig({
|
|
|
15
21
|
})(["& > .em-ds-toolbar{box-shadow:none;}"]);
|
|
16
22
|
const ToolbarWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
17
23
|
componentId: "sc-pm75g5-1"
|
|
18
|
-
})(["display:flex;align-items:center;height:", ";margin-left:-4px;margin-right:", ";padding-right:4px;pointer-events:all;background:white;", " &:hover{box-shadow:-1px 0px 1px 0px rgba(0,0,0,0.2),1px 0px 2px 0px rgba(0,0,0,0.2);& > .toolbar-trigger{border:none;}}"], props => props.rowSize === 'normal' ? '36px' : '28px', props => props.hasScrollBar ? '0' : '-10px', props => props.showShadow ?
|
|
19
|
-
1px 0px 2px 0px rgba(0, 0, 0, 0.2);` : '');
|
|
24
|
+
})(["display:flex;align-items:center;height:", ";margin-left:-4px;margin-right:", ";padding-right:4px;pointer-events:all;background:white;", " &:hover{box-shadow:-1px 0px 1px 0px rgba(0,0,0,0.2),1px 0px 2px 0px rgba(0,0,0,0.2);& > .toolbar-trigger{border:none;}}"], props => props.rowSize === 'normal' ? '36px' : '28px', props => props.hasScrollBar ? '0' : '-10px', props => props.showShadow ? "box-shadow: -1px 0px 1px 0px rgba(0, 0, 0, 0.2),\n 1px 0px 2px 0px rgba(0, 0, 0, 0.2);" : '');
|
|
20
25
|
const ToolbarPosition = /*#__PURE__*/styled.div.withConfig({
|
|
21
26
|
componentId: "sc-pm75g5-2"
|
|
22
|
-
})(["position:absolute;z-index:10;display:flex;justify-content:flex-end;align-items:center;width:0;pointer-events:none;top:0;height:", ";margin-top:", ";"], props => props.rowRef.current ?
|
|
27
|
+
})(["position:absolute;z-index:10;display:flex;justify-content:flex-end;align-items:center;width:0;pointer-events:none;top:0;height:", ";margin-top:", ";"], props => props.rowRef.current ? "".concat(props.rowRef.current.offsetHeight, "px") : '36px', props => props.rowSize === 'normal' ? '0' : '0'); // eslint-disable-next-line react/prop-types
|
|
23
28
|
|
|
24
|
-
const ToolbarTrigger =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
const ToolbarTrigger = _ref => {
|
|
30
|
+
let {
|
|
31
|
+
grid,
|
|
32
|
+
rowData,
|
|
33
|
+
hasScrollBar,
|
|
34
|
+
rowRef
|
|
35
|
+
} = _ref;
|
|
30
36
|
const {
|
|
31
37
|
props: {
|
|
32
38
|
renderToolbar,
|
|
@@ -1,10 +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 _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
3
8
|
import { forwardRef, useRef } from 'react';
|
|
4
9
|
import { FixedSizeList } from 'react-window';
|
|
5
|
-
import { cx } from '@elliemae/ds-utilities
|
|
6
|
-
import { mergeRefs } from '@elliemae/ds-utilities/system';
|
|
7
|
-
import useWindowScrollerList from '@elliemae/ds-utilities/hooks/useWindowScrollerList';
|
|
10
|
+
import { useWindowScrollerList, mergeRefs, cx } from '@elliemae/ds-utilities';
|
|
8
11
|
import { jsx } from 'react/jsx-runtime';
|
|
9
12
|
|
|
10
13
|
const _excluded = ["itemCount", "className", "innerRef", "itemData", "itemKey", "itemSize", "outerRef", "component"];
|
|
@@ -1,10 +1,14 @@
|
|
|
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 _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
8
|
import { useMemo, useRef } from 'react';
|
|
4
9
|
import { get } from 'lodash';
|
|
5
10
|
import FocusGridManager from '@elliemae/ds-shared/FocusGroup/FocusGrid';
|
|
6
|
-
import { runAll } from '@elliemae/ds-utilities
|
|
7
|
-
import { mergeRefs } from '@elliemae/ds-utilities/system';
|
|
11
|
+
import { mergeRefs, runAll } from '@elliemae/ds-utilities';
|
|
8
12
|
import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
|
|
9
13
|
import VirtualizedBody from './VirtualizedBody.js';
|
|
10
14
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -46,28 +50,31 @@ const VirtualizationPlugin = createInstancePlugin('virtualization', {
|
|
|
46
50
|
|
|
47
51
|
return /*#__PURE__*/_jsx(FocusGridManager, {
|
|
48
52
|
hotKeys: hotKeys,
|
|
49
|
-
keyBindings:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
53
|
+
keyBindings: _ref => {
|
|
54
|
+
let {
|
|
55
|
+
defaultBindings
|
|
56
|
+
} = _ref;
|
|
57
|
+
return _objectSpread(_objectSpread({}, defaultBindings), {}, {
|
|
58
|
+
// todo: this is kind of hacky, since it's virtualized and there's
|
|
59
|
+
// the possibility that the firsts or lasts rows aren't rendered
|
|
60
|
+
Home: runAll(e => {
|
|
61
|
+
if (e.ctrlKey) {
|
|
62
|
+
listRef.current.scrollToItem(0);
|
|
63
|
+
setTimeout(() => defaultBindings.Home(e), 10);
|
|
64
|
+
} else {
|
|
65
|
+
defaultBindings.Home(e);
|
|
66
|
+
}
|
|
67
|
+
}),
|
|
68
|
+
End: runAll(e => {
|
|
69
|
+
if (e.ctrlKey) {
|
|
70
|
+
listRef.current.scrollToItem(rows.length - 1);
|
|
71
|
+
setTimeout(() => defaultBindings.End(e), 10);
|
|
72
|
+
} else {
|
|
73
|
+
defaultBindings.End(e);
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
},
|
|
71
78
|
shouldRefocus: false
|
|
72
79
|
}, void 0, /*#__PURE__*/jsx(VirtualizedBody, _objectSpread(_objectSpread({}, props), {}, {
|
|
73
80
|
autoScrollToId: autoScrollToId,
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
2
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
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/esnext.async-iterator.map.js';
|
|
8
|
+
import 'core-js/modules/esnext.iterator.map.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.for-each.js';
|
|
12
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
3
13
|
import { useState, useRef, useCallback, useEffect, useLayoutEffect } from 'react';
|
|
4
|
-
import { mergeRefs } from '@elliemae/ds-utilities
|
|
5
|
-
import { debounce, isNaN } from '@elliemae/ds-utilities/utils';
|
|
14
|
+
import { debounce, isNaN, mergeRefs } from '@elliemae/ds-utilities';
|
|
6
15
|
import NoResults from '../../components/NoResults.js';
|
|
7
16
|
import VirtualizedBodyRow from './VirtualizedBodyRow.js';
|
|
8
17
|
import { RowSizes } from '../../rowSizes.js';
|
|
@@ -90,9 +99,10 @@ const VirtualizedBody = props => {
|
|
|
90
99
|
useEffect(() => {
|
|
91
100
|
autoScrollTo(visibleHeight);
|
|
92
101
|
}, [autoScrollToId, visibleHeight]);
|
|
93
|
-
const handler = useCallback(debounce(
|
|
94
|
-
|
|
95
|
-
|
|
102
|
+
const handler = useCallback(debounce(_ref => {
|
|
103
|
+
let {
|
|
104
|
+
target
|
|
105
|
+
} = _ref;
|
|
96
106
|
// Update coordinates
|
|
97
107
|
setScrollTop(target.scrollTop || 0);
|
|
98
108
|
}, 100), [setScrollTop]);
|
|
@@ -236,7 +246,7 @@ const VirtualizedBody = props => {
|
|
|
236
246
|
},
|
|
237
247
|
children: /*#__PURE__*/jsx("div", {
|
|
238
248
|
"data-testid": "virtualized-body",
|
|
239
|
-
className:
|
|
249
|
+
className: "virtualized-body".concat(hasScrollBar ? ' with-scrollbar' : ''),
|
|
240
250
|
style: bodyStyle,
|
|
241
251
|
ref: r => {
|
|
242
252
|
mergeRefs(innerBody)(r);
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
3
|
import { get } from 'lodash';
|
|
4
|
-
import
|
|
5
|
-
import DSTruncatedTooltipText from '@elliemae/ds-
|
|
4
|
+
import Grid from '@elliemae/ds-grid';
|
|
5
|
+
import DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';
|
|
6
6
|
import { CellWrapper, ValueWrapper } from './styled.js';
|
|
7
7
|
|
|
8
|
-
const CellWithAddons =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
const CellWithAddons = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
leftAddon,
|
|
11
|
+
keepLeftPadding,
|
|
12
|
+
rightAddon,
|
|
13
|
+
badgeAddon,
|
|
14
|
+
highLight,
|
|
15
|
+
isEdit,
|
|
16
|
+
editComponent,
|
|
17
|
+
value,
|
|
18
|
+
neutralText,
|
|
19
|
+
metaData
|
|
20
|
+
} = _ref;
|
|
20
21
|
const hasLeftAddon = !!leftAddon || keepLeftPadding;
|
|
21
22
|
const hasRightAddon = !!rightAddon && !isEdit;
|
|
22
23
|
const cols = [1];
|
package/esm/renders/styled.js
CHANGED
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import
|
|
2
|
+
import Grid from '@elliemae/ds-grid';
|
|
3
3
|
|
|
4
4
|
const m = '0.61538rem';
|
|
5
5
|
const m2 = '1.23076rem';
|
|
6
6
|
const CellWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
7
7
|
componentId: "sc-1n8exyf-0"
|
|
8
|
-
})(["max-height:36px;height:100%;width:", ";margin-left:", ";margin-right:", ";padding-left:", ";padding-right:", ";", ";", ""], props => props.noPadding ?
|
|
9
|
-
position: relative;
|
|
10
|
-
&::before {
|
|
11
|
-
display: block;
|
|
12
|
-
content: '';
|
|
13
|
-
position: absolute;
|
|
14
|
-
top: 0;
|
|
15
|
-
left:0;
|
|
16
|
-
border-style: solid;
|
|
17
|
-
border-width: ${props.theme.space.xxs} ${props.theme.space.xxs} ${props.theme.space.xxs} 0;
|
|
18
|
-
border-color: ${props.theme.colors.brand['600']} transparent transparent ${props.theme.colors.brand['600']};
|
|
19
|
-
}
|
|
20
|
-
` : '');
|
|
8
|
+
})(["max-height:36px;height:100%;width:", ";margin-left:", ";margin-right:", ";padding-left:", ";padding-right:", ";", ";", ""], props => props.noPadding ? "calc(100% + ".concat(m2, ")") : '100%', props => props.noPadding ? "-".concat(m) : '0', props => props.noPadding ? "-".concat(m) : '0', props => !props.hasLeftAddon && (props.badgeAddon || props.highLight || props.hasRightAddon) ? m : '0', props => !props.hasRightAddon && (props.badgeAddon || props.highLight || props.hasLeftAddon) ? m : '0', props => props.highLight ? "background: ".concat(props.theme.colors.brand['200']) : '', props => props.badgeAddon ? "\n position: relative; \n &::before {\n display: block;\n content: '';\n position: absolute;\n top: 0;\n left:0;\n border-style: solid;\n border-width: ".concat(props.theme.space.xxs, " ").concat(props.theme.space.xxs, " ").concat(props.theme.space.xxs, " 0;\n border-color: ").concat(props.theme.colors.brand['600'], " transparent transparent ").concat(props.theme.colors.brand['600'], ";\n }\n ") : '');
|
|
21
9
|
const ValueWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
22
10
|
componentId: "sc-1n8exyf-1"
|
|
23
|
-
})(["display:flex;align-items:center;overflow:hidden;& > span{display:inline-flex;align-items:center;}", ""], props => props.grayText ?
|
|
11
|
+
})(["display:flex;align-items:center;overflow:hidden;& > span{display:inline-flex;align-items:center;}", ""], props => props.grayText ? "color: ".concat(props.theme.colors.neutral['500'], ";") : '');
|
|
24
12
|
const CellContainer = /*#__PURE__*/styled(Grid).withConfig({
|
|
25
13
|
componentId: "sc-1n8exyf-2"
|
|
26
14
|
})(["padding-left:", ";padding-right:", ";position:relative;"], m, m);
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
4
|
import { DndRowsPlugin } from '../plugins/row-dnd/DndRowsPlugin.js';
|
|
2
5
|
import { DndColumnsPlugin } from '../plugins/column-dnd/DndColumnsPlugin.js';
|
|
3
6
|
import { InfiniteScrollPlugin } from '../plugins/infinite-scrolling/InfiniteScrollPlugin.js';
|
|
@@ -27,7 +30,8 @@ const mapPropToPlugin = {
|
|
|
27
30
|
groupedRows: GroupingPlugin,
|
|
28
31
|
dragAndDropRows: DndRowsPlugin
|
|
29
32
|
};
|
|
30
|
-
function getPluginsFromProps(props
|
|
33
|
+
function getPluginsFromProps(props) {
|
|
34
|
+
let omit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
31
35
|
const plugins = [];
|
|
32
36
|
Object.keys(mapPropToPlugin).forEach(key => {
|
|
33
37
|
if (props[key] && !omit[key]) plugins.push(mapPropToPlugin[key]);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
function getScrollbarWidth(
|
|
1
|
+
function getScrollbarWidth() {
|
|
2
|
+
let compensatePixels = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
2
3
|
// Creating invisible container
|
|
3
4
|
const outer = document.createElement('div');
|
|
4
5
|
outer.style.visibility = 'hidden';
|