@elliemae/ds-datagrids 2.4.2-rc.12 → 2.4.2-rc.15
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/DataGridImpl.js +2 -2
- package/cjs/blockNames.js +2 -2
- package/cjs/columns/IconColumn.js +1 -1
- package/cjs/components/BodyCell.js +5 -6
- package/cjs/components/ColumnVisibilityMenuOption.js +0 -1
- package/cjs/components/ColumnsOptionsMenuSection.js +0 -1
- package/cjs/components/HeaderCell.js +1 -1
- package/cjs/components/renderers/defaultClassedRenderers.js +3 -3
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +4 -4
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js +2 -2
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +1 -1
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js +1 -2
- package/cjs/plugins/column-sizing/getColumnNameFromProperty.js +0 -2
- package/cjs/plugins/column-sizing/useColumnSizeService.js +3 -4
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js +13 -14
- package/cjs/plugins/editable/EditablePlugin.js +0 -1
- package/cjs/plugins/editable/decorateEditable.js +4 -5
- package/cjs/plugins/editable/getEditorComponent.js +1 -3
- package/cjs/plugins/expandable-grid/ExpandableColumn.js +3 -3
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js +0 -1
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +2 -2
- package/cjs/plugins/expandable-grid/useExpandGridState.js +0 -1
- package/cjs/plugins/export-data/ExportDataPlugin.js +7 -11
- package/cjs/plugins/filterable/components/FilterableHeader.js +2 -4
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +2 -3
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +0 -1
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +2 -3
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +2 -7
- package/cjs/plugins/filterable/helper.js +0 -1
- package/cjs/plugins/filterable/useFilterableState.js +1 -2
- package/cjs/plugins/grouping-by/GroupingByPlugin.js +1 -1
- package/cjs/plugins/grouping-grid/GroupingPlugin.js +1 -1
- package/cjs/plugins/grouping-grid/walkStrategy.js +0 -2
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +2 -3
- package/cjs/plugins/pagination/components/Paginator.js +1 -1
- package/cjs/plugins/pagination/usePaginationState.js +1 -2
- package/cjs/plugins/resizable/utils.js +1 -2
- package/cjs/plugins/row-dnd/DndRowsPlugin.js +2 -3
- package/cjs/plugins/selectable/SelectablePlugin.js +2 -1
- package/cjs/plugins/selectable/useSelectableState.js +0 -1
- package/cjs/plugins/sortable/sorter.js +3 -3
- package/cjs/plugins/sortable/useSortableState.js +0 -1
- package/cjs/plugins/toolbar/RowRenderer.js +3 -4
- package/cjs/plugins/toolbar/ToolbarPlugin.js +0 -1
- package/cjs/plugins/toolbar/ToolbarTrigger.js +5 -5
- package/cjs/plugins/virtualization/VirtualizedBody.js +1 -2
- package/cjs/renders/styled.js +14 -2
- package/cjs/utilities/normalizeData.js +0 -1
- package/esm/DataGridImpl.js +2 -2
- package/esm/blockNames.js +2 -2
- package/esm/columns/IconColumn.js +1 -1
- package/esm/components/BodyCell.js +2 -3
- package/esm/components/ColumnVisibilityMenuOption.js +0 -1
- package/esm/components/ColumnsOptionsMenuSection.js +0 -1
- package/esm/components/HeaderCell.js +1 -1
- package/esm/components/renderers/defaultClassedRenderers.js +3 -3
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +4 -4
- package/esm/plugins/column-dnd/DndColumnsPlugin.js +2 -2
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js +1 -1
- package/esm/plugins/column-sizing/ext-points/getTableProps.js +0 -1
- package/esm/plugins/column-sizing/getColumnNameFromProperty.js +0 -2
- package/esm/plugins/column-sizing/useColumnSizeService.js +3 -4
- package/esm/plugins/column-sizing/useStylesheetHelpers.js +13 -14
- package/esm/plugins/editable/EditablePlugin.js +0 -1
- package/esm/plugins/editable/decorateEditable.js +1 -2
- package/esm/plugins/editable/getEditorComponent.js +1 -3
- package/esm/plugins/expandable-grid/ExpandableColumn.js +3 -3
- package/esm/plugins/expandable-grid/ExpandablePlugin.js +2 -3
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js +2 -2
- package/esm/plugins/expandable-grid/useExpandGridState.js +0 -1
- package/esm/plugins/export-data/ExportDataPlugin.js +7 -11
- package/esm/plugins/filterable/components/FilterableHeader.js +2 -4
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +2 -3
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +0 -1
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +2 -3
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +2 -7
- package/esm/plugins/filterable/helper.js +0 -1
- package/esm/plugins/filterable/useFilterableState.js +0 -1
- package/esm/plugins/grouping-by/GroupingByPlugin.js +1 -1
- package/esm/plugins/grouping-grid/GroupingPlugin.js +1 -1
- package/esm/plugins/grouping-grid/walkStrategy.js +0 -2
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +2 -3
- package/esm/plugins/pagination/components/Paginator.js +1 -1
- package/esm/plugins/pagination/usePaginationState.js +0 -1
- package/esm/plugins/resizable/utils.js +1 -2
- package/esm/plugins/row-dnd/DndRowsPlugin.js +2 -3
- package/esm/plugins/selectable/SelectablePlugin.js +2 -1
- package/esm/plugins/selectable/useSelectableState.js +0 -1
- package/esm/plugins/sortable/sorter.js +3 -3
- package/esm/plugins/sortable/useSortableState.js +0 -1
- package/esm/plugins/toolbar/RowRenderer.js +1 -2
- package/esm/plugins/toolbar/ToolbarPlugin.js +0 -1
- package/esm/plugins/toolbar/ToolbarTrigger.js +3 -3
- package/esm/plugins/virtualization/VirtualizedBody.js +1 -2
- package/esm/renders/styled.js +14 -2
- package/esm/utilities/normalizeData.js +2 -3
- package/package.json +20 -20
package/cjs/DataGridImpl.js
CHANGED
|
@@ -19,9 +19,9 @@ require('core-js/modules/esnext.set.reduce.js');
|
|
|
19
19
|
require('core-js/modules/esnext.set.some.js');
|
|
20
20
|
require('core-js/modules/esnext.set.symmetric-difference.js');
|
|
21
21
|
require('core-js/modules/esnext.set.union.js');
|
|
22
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
23
22
|
require('core-js/modules/esnext.async-iterator.map.js');
|
|
24
23
|
require('core-js/modules/esnext.iterator.map.js');
|
|
24
|
+
require('core-js/modules/es.error.cause.js');
|
|
25
25
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
26
26
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
27
27
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
@@ -139,7 +139,7 @@ function DataGridImpl(_ref2) {
|
|
|
139
139
|
const conditionalPagination = pagination && pagination.conditionalPagination === true && rows.length <= otherProps.pagination.perPage;
|
|
140
140
|
const usePagination = paginated && !conditionalPagination;
|
|
141
141
|
return /*#__PURE__*/jsxRuntime.jsxs(defaultClassedRenderers.DatagridWrapper, _objectSpread(_objectSpread({
|
|
142
|
-
className:
|
|
142
|
+
className: `${className} ds-row-size-${rowSize}`,
|
|
143
143
|
classProps: {
|
|
144
144
|
fluidHeight: isFluid({
|
|
145
145
|
autoHeight: otherProps.autoHeight,
|
package/cjs/blockNames.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const dataGridBlockName = 'data-grid';
|
|
6
|
-
const headerBlockName =
|
|
7
|
-
const bodyBlockName =
|
|
6
|
+
const headerBlockName = `${dataGridBlockName}-header`;
|
|
7
|
+
const bodyBlockName = `${dataGridBlockName}-body`;
|
|
8
8
|
|
|
9
9
|
exports.bodyBlockName = bodyBlockName;
|
|
10
10
|
exports.dataGridBlockName = dataGridBlockName;
|
|
@@ -58,7 +58,7 @@ function createColumn(_ref) {
|
|
|
58
58
|
const onClickHandler = e => onClick(e, extraParams);
|
|
59
59
|
|
|
60
60
|
return /*#__PURE__*/_jsx__default["default"](ValueWrapper, {
|
|
61
|
-
className: dsUtilities.cx(
|
|
61
|
+
className: dsUtilities.cx(`icc-${intent}`, isVisited(value, extraParams))
|
|
62
62
|
}, void 0, icon && addColorToIcon(icon, IntentIconColors[intent]), onClick && typeof value !== 'undefined' ? /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
63
63
|
buttonType: "text",
|
|
64
64
|
intent: intent,
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
6
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
3
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
8
4
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
9
5
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
10
6
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
11
7
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
8
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
9
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
10
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
12
11
|
var React = require('react');
|
|
13
12
|
var FocusGridManager = require('@elliemae/ds-shared/FocusGroup/FocusGrid');
|
|
14
13
|
var utils = require('@elliemae/ds-shared/createDataInstance/utils');
|
|
@@ -86,11 +85,11 @@ function BodyCell(_ref) {
|
|
|
86
85
|
value: v
|
|
87
86
|
});
|
|
88
87
|
|
|
89
|
-
const value = rowData[
|
|
88
|
+
const value = rowData[`_${evaluatedProperty}`] || rowData[evaluatedProperty];
|
|
90
89
|
const transformed = utils.evaluateTransforms(transforms, value, extraParameters);
|
|
91
90
|
return /*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
92
91
|
ref: ref,
|
|
93
|
-
"data-testid":
|
|
92
|
+
"data-testid": `column-${property}`,
|
|
94
93
|
tabIndex: -1,
|
|
95
94
|
classProps: classProps
|
|
96
95
|
}, props), cell && cell.props), transformed), {}, {
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
require('core-js/modules/esnext.async-iterator.reduce.js');
|
|
6
6
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
7
|
require('core-js/modules/esnext.iterator.reduce.js');
|
|
8
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
9
8
|
|
|
10
9
|
function getColumnVisibilityMenuOption(_ref) {
|
|
11
10
|
let {
|
|
@@ -4,7 +4,6 @@ var _jsx = require('@babel/runtime/helpers/jsx');
|
|
|
4
4
|
require('core-js/modules/esnext.async-iterator.reduce.js');
|
|
5
5
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
6
6
|
require('core-js/modules/esnext.iterator.reduce.js');
|
|
7
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
8
7
|
require('react');
|
|
9
8
|
var dsMenu = require('@elliemae/ds-menu');
|
|
10
9
|
|
|
@@ -64,7 +64,7 @@ function HeaderCell(_ref) {
|
|
|
64
64
|
classProps: classProps
|
|
65
65
|
}, props), header && header.props), transformedProps), {}, {
|
|
66
66
|
children: transformedProps.children || formattedValue
|
|
67
|
-
}),
|
|
67
|
+
}), `${evaluatedProperty}-header`);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
module.exports = HeaderCell;
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
6
6
|
var blockNames = require('../../blockNames.js');
|
|
7
7
|
|
|
8
|
-
const NoResultsContainer = dsClassnames.aggregatedClasses('div')(
|
|
9
|
-
const SpinnerContainer = dsClassnames.aggregatedClasses('div')(
|
|
10
|
-
const DatagridWrapper = dsClassnames.aggregatedClasses('div')(
|
|
8
|
+
const NoResultsContainer = dsClassnames.aggregatedClasses('div')(`${blockNames.dataGridBlockName}-no-results`);
|
|
9
|
+
const SpinnerContainer = dsClassnames.aggregatedClasses('div')(`${blockNames.dataGridBlockName}-spinner`);
|
|
10
|
+
const DatagridWrapper = dsClassnames.aggregatedClasses('div')(`${blockNames.dataGridBlockName}-wrapper`, null, _ref => {
|
|
11
11
|
let {
|
|
12
12
|
fluidHeight
|
|
13
13
|
} = _ref;
|
|
@@ -69,8 +69,8 @@ const BodySyncHoc = (Component, notPaginated, grid) => _ref2 => {
|
|
|
69
69
|
const t = React.useRef();
|
|
70
70
|
|
|
71
71
|
const repositionToolbarBasedOnBodyScrollPosition = SCROLLBAR_WIDTH => () => {
|
|
72
|
-
grid.refs.body.current.style.setProperty('--toolbar-scroll',
|
|
73
|
-
grid.refs.body.current.style.setProperty('--toolbar-scroll-paginated',
|
|
72
|
+
grid.refs.body.current.style.setProperty('--toolbar-scroll', `${grid.refs.body.current.offsetWidth + grid.refs.body.current.scrollLeft - 15}px`);
|
|
73
|
+
grid.refs.body.current.style.setProperty('--toolbar-scroll-paginated', `${grid.refs.body.current.offsetWidth + grid.refs.body.current.scrollLeft - 19}px`);
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
React.useEffect(() => {
|
|
@@ -118,8 +118,8 @@ const BodySyncHoc = (Component, notPaginated, grid) => _ref2 => {
|
|
|
118
118
|
const TableSyncHoc = Component => props => /*#__PURE__*/_jsx__default["default"](ScrollSync.ScrollSync, {
|
|
119
119
|
proportional: false,
|
|
120
120
|
onScroll: e => {
|
|
121
|
-
e.target.style.setProperty('--toolbar-scroll',
|
|
122
|
-
e.target.style.setProperty('--toolbar-scroll-paginated',
|
|
121
|
+
e.target.style.setProperty('--toolbar-scroll', `${e.target.offsetWidth + e.target.scrollLeft - 15}px`);
|
|
122
|
+
e.target.style.setProperty('--toolbar-scroll-paginated', `${e.target.offsetWidth + e.target.scrollLeft - 19}px`);
|
|
123
123
|
}
|
|
124
124
|
}, void 0, /*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread({}, props)));
|
|
125
125
|
|
|
@@ -58,11 +58,11 @@ const getHeaderRowProps = (props, grid) => {
|
|
|
58
58
|
columnDraggingOffset.current += forward ? newColumnWidth : newColumnWidth * -1;
|
|
59
59
|
newColumn.updateStyle({
|
|
60
60
|
transitionDuration: '300ms',
|
|
61
|
-
transform:
|
|
61
|
+
transform: `translate3d(${columnTranslate}px, 0, 0)`
|
|
62
62
|
});
|
|
63
63
|
oldColumn.updateStyle({
|
|
64
64
|
transitionDuration: '300ms',
|
|
65
|
-
transform:
|
|
65
|
+
transform: `translate3d(${columnDraggingOffset.current}px, 0, 0)`
|
|
66
66
|
});
|
|
67
67
|
sortedColumns.current = dsUtilities.arrayMove(sortedColumns.current, oldIndex, newIndex);
|
|
68
68
|
onMoveColumnOver(params);
|
|
@@ -20,7 +20,7 @@ const getHeaderRowProps = (rowProps, _ref) => {
|
|
|
20
20
|
let {
|
|
21
21
|
rowsStylesheet
|
|
22
22
|
} = _ref;
|
|
23
|
-
rowProps.className =
|
|
23
|
+
rowProps.className = `${rowsStylesheet.getRowClassName()}-header`;
|
|
24
24
|
return rowProps;
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
5
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
8
6
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
9
7
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
10
8
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
11
9
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
12
11
|
var React = require('react');
|
|
13
12
|
var dsUtilities = require('@elliemae/ds-utilities');
|
|
14
13
|
var utils = require('../utils.js');
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
4
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
6
5
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
6
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
@@ -57,7 +56,7 @@ function useColumnSizeService(instance) {
|
|
|
57
56
|
const columnsArray = Object.values(columns.current);
|
|
58
57
|
columnsArray.forEach(column => {
|
|
59
58
|
const columnOffsetWidth = column.node.offsetWidth;
|
|
60
|
-
column.updateBodyHeaderWidth(
|
|
59
|
+
column.updateBodyHeaderWidth(`${columnOffsetWidth}px`, `${columnOffsetWidth}px`);
|
|
61
60
|
});
|
|
62
61
|
};
|
|
63
62
|
|
|
@@ -111,7 +110,7 @@ function useColumnSizeService(instance) {
|
|
|
111
110
|
|
|
112
111
|
if (percentValue) {
|
|
113
112
|
const pxs = gridWidth * percentValue / 100;
|
|
114
|
-
const pxWidths =
|
|
113
|
+
const pxWidths = `${utils.getColumnWidthSize(pxs, minColumnWidth, column)}px`;
|
|
115
114
|
column.updateBodyHeaderWidth(pxWidths, pxWidths);
|
|
116
115
|
columns.current[column.uuid].computedWidth = pxs;
|
|
117
116
|
|
|
@@ -124,7 +123,7 @@ function useColumnSizeService(instance) {
|
|
|
124
123
|
const percentWidth = columnFixWidth / gridWidth * 100;
|
|
125
124
|
const pxs = gridWidth * percentWidth / 100;
|
|
126
125
|
const actualWidthAfterChecks = utils.getColumnWidthSize(pxs, minColumnWidth, column);
|
|
127
|
-
column.updateBodyHeaderWidth(
|
|
126
|
+
column.updateBodyHeaderWidth(`${actualWidthAfterChecks}px`, column.minWidth || minColumnWidth ? `${column.minWidth || minColumnWidth}px` : `${pxs}px`);
|
|
128
127
|
resizedColumns.current[column.uuid] = actualWidthAfterChecks;
|
|
129
128
|
columns.current[column.uuid].computedWidth = actualWidthAfterChecks;
|
|
130
129
|
}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('core-js/modules/esnext.async-iterator.map.js');
|
|
6
6
|
require('core-js/modules/esnext.iterator.map.js');
|
|
7
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
8
7
|
var stylesheet = require('stylesheet-helpers');
|
|
9
8
|
var React = require('react');
|
|
10
9
|
var dsUtilities = require('@elliemae/ds-utilities');
|
|
@@ -43,7 +42,7 @@ const RowStylesheetHelper = _ref => {
|
|
|
43
42
|
} = stylesheet__namespace.create();
|
|
44
43
|
|
|
45
44
|
const update = width => {
|
|
46
|
-
const widths = typeof width === 'string' ? width :
|
|
45
|
+
const widths = typeof width === 'string' ? width : `${width}px`;
|
|
47
46
|
stylesheet__namespace.updateProperties(window, styleSheet, className, width ? {
|
|
48
47
|
width: widths,
|
|
49
48
|
minWidth: widths,
|
|
@@ -56,8 +55,8 @@ const RowStylesheetHelper = _ref => {
|
|
|
56
55
|
const {
|
|
57
56
|
hasScroll
|
|
58
57
|
} = grid.getState();
|
|
59
|
-
const headerWidth =
|
|
60
|
-
stylesheet__namespace.updateProperties(window, styleSheet,
|
|
58
|
+
const headerWidth = `${width + (hasScroll ? SCROLLBAR_WIDTH : 0)}px`;
|
|
59
|
+
stylesheet__namespace.updateProperties(window, styleSheet, `${className}-header`, width ? {
|
|
61
60
|
width: headerWidth,
|
|
62
61
|
minWidth: headerWidth,
|
|
63
62
|
maxWidth: headerWidth
|
|
@@ -86,7 +85,7 @@ const getColumnClassName = _ref2 => {
|
|
|
86
85
|
isHeader = false,
|
|
87
86
|
getId
|
|
88
87
|
} = _ref2;
|
|
89
|
-
return
|
|
88
|
+
return `column-${globalId}-${getId(column)}${isHeader ? '-header' : ''}`;
|
|
90
89
|
};
|
|
91
90
|
|
|
92
91
|
function setWidth(_ref3) {
|
|
@@ -98,15 +97,15 @@ function setWidth(_ref3) {
|
|
|
98
97
|
} = _ref3;
|
|
99
98
|
let widths;
|
|
100
99
|
if (typeof width === 'string') widths = width;
|
|
101
|
-
if (typeof width === 'number') widths =
|
|
100
|
+
if (typeof width === 'number') widths = `${width}px`;
|
|
102
101
|
let minWidths;
|
|
103
102
|
if (typeof minWidth === 'string') minWidths = minWidth;
|
|
104
|
-
if (typeof minWidth === 'number') minWidths =
|
|
103
|
+
if (typeof minWidth === 'number') minWidths = `${minWidth}px`;
|
|
105
104
|
stylesheet__namespace.updateProperties(window, styleSheet, className, {
|
|
106
|
-
width:
|
|
107
|
-
minWidth:
|
|
105
|
+
width: `${widths || minWidths}`,
|
|
106
|
+
minWidth: `${widths || minWidths}`,
|
|
108
107
|
// minWidth: `${minWidths || widths}`,
|
|
109
|
-
maxWidth:
|
|
108
|
+
maxWidth: `${widths || minWidths}`
|
|
110
109
|
});
|
|
111
110
|
}
|
|
112
111
|
|
|
@@ -169,7 +168,7 @@ function columnSizesHelperImpl(_ref5) {
|
|
|
169
168
|
getId,
|
|
170
169
|
column
|
|
171
170
|
});
|
|
172
|
-
const headerClassName =
|
|
171
|
+
const headerClassName = `${cellClassName}-header`;
|
|
173
172
|
dsUtilities.set(column, 'header.props.className', headerClassName);
|
|
174
173
|
dsUtilities.set(column, 'cell.props.className', cellClassName);
|
|
175
174
|
|
|
@@ -224,11 +223,11 @@ function columnSizesHelperImpl(_ref5) {
|
|
|
224
223
|
},
|
|
225
224
|
|
|
226
225
|
getColumnHeaderClassName(column) {
|
|
227
|
-
return
|
|
226
|
+
return `${getColumnClassName({
|
|
228
227
|
globalId,
|
|
229
228
|
getId,
|
|
230
229
|
column
|
|
231
|
-
})
|
|
230
|
+
})}-header`;
|
|
232
231
|
},
|
|
233
232
|
|
|
234
233
|
cleanup() {
|
|
@@ -254,7 +253,7 @@ function useStylesheetHelpers(grid) {
|
|
|
254
253
|
return getColumnNameFromProperty(uuid);
|
|
255
254
|
}
|
|
256
255
|
}));
|
|
257
|
-
const rowClassName =
|
|
256
|
+
const rowClassName = `row-${bindRowSizeTo || grid.uuid}`;
|
|
258
257
|
const [rowsStylesheet] = React.useState(() => RowStylesheetHelper({
|
|
259
258
|
grid,
|
|
260
259
|
className: rowClassName
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
5
|
var dsUtilities = require('@elliemae/ds-utilities');
|
|
7
6
|
var createInstancePlugin = require('@elliemae/ds-shared/createDataInstance/createInstancePlugin');
|
|
8
7
|
var decorateEditable = require('./decorateEditable.js');
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
9
5
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
10
6
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
11
7
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
12
8
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
13
9
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
11
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
12
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
14
13
|
require('react');
|
|
15
14
|
var edit = require('react-edit');
|
|
16
15
|
var dsIcons = require('@elliemae/ds-icons');
|
|
@@ -94,7 +93,7 @@ const addEditableToCell = (_ref2, grid) => {
|
|
|
94
93
|
handlers
|
|
95
94
|
} = _ref2;
|
|
96
95
|
column.cell.transforms.push(config(getEditorComponent(column.customEditor, handlers)));
|
|
97
|
-
column.cell.props.className = dsUtilities.cx(column.cell.props.className,
|
|
96
|
+
column.cell.props.className = dsUtilities.cx(column.cell.props.className, `editable${column.customEditor ? ' customEditor' : ''}`);
|
|
98
97
|
return initColumnDefinition.appendCellFormatter([(value, extraParams) => /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
99
98
|
children: /*#__PURE__*/_jsx__default["default"]("div", {
|
|
100
99
|
onClick: e => {
|
|
@@ -55,10 +55,8 @@ const getEditorComponent = function () {
|
|
|
55
55
|
const Component = components[type];
|
|
56
56
|
|
|
57
57
|
if (type === 'DSComboBox') {
|
|
58
|
-
var _restEditorProps$opti;
|
|
59
|
-
|
|
60
58
|
// TODO: remove this whole condition when combobox v3 is out and fully working without "maxOptions" parameter
|
|
61
|
-
const maxOptions =
|
|
59
|
+
const maxOptions = restEditorProps?.options?.length || 100;
|
|
62
60
|
return /*#__PURE__*/_jsx__default["default"]("div", {
|
|
63
61
|
style: {
|
|
64
62
|
zIndex: 0
|
|
@@ -32,15 +32,15 @@ var _ArrowheadDown, _ArrowheadRight;
|
|
|
32
32
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
33
33
|
|
|
34
34
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
35
|
-
const blockName =
|
|
35
|
+
const blockName = `${blockNames.dataGridBlockName}-expandable-column`; // todo: clean this when we move to css-js
|
|
36
36
|
|
|
37
37
|
const ExpandableColumnWrapper = dsClassnames.aggregatedClasses('div')(blockName);
|
|
38
38
|
const LabelDescriptionWrapper = dsClassnames.aggregatedClasses('div')(blockName, 'label-description-wrapper');
|
|
39
39
|
const Label = dsClassnames.aggregatedClasses('span')(blockName, 'label');
|
|
40
40
|
const Description = dsClassnames.aggregatedClasses('span')(blockName, 'description');
|
|
41
41
|
const ExtraColumnData = dsClassnames.aggregatedClasses('div')(blockName, 'extra-column-data');
|
|
42
|
-
const ExpandableMasterWrapper = dsClassnames.aggregatedClasses('div')(
|
|
43
|
-
const ExpandableDetailsWrapper = dsClassnames.aggregatedClasses('div')(
|
|
42
|
+
const ExpandableMasterWrapper = dsClassnames.aggregatedClasses('div')(`${blockName}-master-wrapper`);
|
|
43
|
+
const ExpandableDetailsWrapper = dsClassnames.aggregatedClasses('div')(`${blockName}-details-wrapper`);
|
|
44
44
|
|
|
45
45
|
function ExpandableColumnCell(_ref) {
|
|
46
46
|
let {
|
|
@@ -12,7 +12,6 @@ require('core-js/modules/esnext.async-iterator.filter.js');
|
|
|
12
12
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
13
13
|
require('core-js/modules/esnext.async-iterator.map.js');
|
|
14
14
|
require('core-js/modules/esnext.iterator.map.js');
|
|
15
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
16
15
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
17
16
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
18
17
|
var React = require('react');
|
|
@@ -25,8 +25,8 @@ var _DSSeparator;
|
|
|
25
25
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
26
26
|
|
|
27
27
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
28
|
-
const blockName =
|
|
29
|
-
const DetailsWrapper = dsClassnames.aggregatedClasses('div')(
|
|
28
|
+
const blockName = `${blockNames.dataGridBlockName}-expanded-row`;
|
|
29
|
+
const DetailsWrapper = dsClassnames.aggregatedClasses('div')(`${blockName}-details-wrapper`, null, () => ({
|
|
30
30
|
'ie-flex-basis-auto': true
|
|
31
31
|
}));
|
|
32
32
|
|
|
@@ -6,14 +6,10 @@ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
|
6
6
|
require('core-js/modules/esnext.async-iterator.reduce.js');
|
|
7
7
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
8
8
|
require('core-js/modules/esnext.iterator.reduce.js');
|
|
9
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
10
9
|
require('core-js/modules/esnext.async-iterator.map.js');
|
|
11
10
|
require('core-js/modules/esnext.iterator.map.js');
|
|
12
11
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
13
12
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
14
|
-
require('core-js/modules/es.string.replace.js');
|
|
15
|
-
require('core-js/modules/web.url.js');
|
|
16
|
-
require('core-js/modules/web.url-search-params.js');
|
|
17
13
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
18
14
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
19
15
|
var dsUtilities = require('@elliemae/ds-utilities');
|
|
@@ -39,12 +35,12 @@ const isVisible = column => {
|
|
|
39
35
|
const getColumnValue = (row, property) => dsUtilities.get(row, property);
|
|
40
36
|
const getVisibleRowData = (row, columns) => columns.reduce((result, column) => {
|
|
41
37
|
const columnProperty = column.property;
|
|
42
|
-
return isVisible(column) ? [...result, getColumnValue(row,
|
|
38
|
+
return isVisible(column) ? [...result, getColumnValue(row, `_${columnProperty}`) || getColumnValue(row, columnProperty)] : result;
|
|
43
39
|
}, []);
|
|
44
40
|
|
|
45
41
|
const defaultOptions = uuid => ({
|
|
46
42
|
sheetName: 'SheetName',
|
|
47
|
-
fileName:
|
|
43
|
+
fileName: `datagrid-${uuid}`,
|
|
48
44
|
type: 'csv',
|
|
49
45
|
onlySelection: false,
|
|
50
46
|
excludedColumns: undefined
|
|
@@ -60,9 +56,9 @@ const getCellValue = cell => {
|
|
|
60
56
|
const getExportedData = (rows, columns, range) => {
|
|
61
57
|
const rowsRanged = range ? rows.slice(...range) : rows;
|
|
62
58
|
const dataToExport = rowsRanged.map(row => getVisibleRowData(row, columns));
|
|
63
|
-
const columnsContent = columns.filter(c => isVisible(c)).reduce((acc, curr, idx) =>
|
|
64
|
-
const rowsContent = dataToExport.map(e => e.map(r => "
|
|
65
|
-
const csvContent =
|
|
59
|
+
const columnsContent = columns.filter(c => isVisible(c)).reduce((acc, curr, idx) => `${acc}${idx === 0 ? '' : ','}${curr.label}`, '');
|
|
60
|
+
const rowsContent = dataToExport.map(e => e.map(r => `"${String(getCellValue(r)).replace(/"/g, '""')}"`).join(',')).join('\r\n');
|
|
61
|
+
const csvContent = `${columnsContent}\r\n${rowsContent}`;
|
|
66
62
|
return csvContent;
|
|
67
63
|
}; // eslint-disable-next-line max-statements
|
|
68
64
|
|
|
@@ -86,7 +82,7 @@ const exportTo = (rows, columns, _ref) => {
|
|
|
86
82
|
|
|
87
83
|
if (navigator.msSaveBlob) {
|
|
88
84
|
// IE 10+
|
|
89
|
-
navigator.msSaveBlob(blob,
|
|
85
|
+
navigator.msSaveBlob(blob, `${fileName}.${type}`);
|
|
90
86
|
} else {
|
|
91
87
|
const link = document.createElement('a');
|
|
92
88
|
|
|
@@ -95,7 +91,7 @@ const exportTo = (rows, columns, _ref) => {
|
|
|
95
91
|
// Browsers that support HTML5 download attribute
|
|
96
92
|
const url = URL.createObjectURL(blob);
|
|
97
93
|
link.setAttribute('href', url);
|
|
98
|
-
link.setAttribute('download',
|
|
94
|
+
link.setAttribute('download', `${fileName}.${type}`);
|
|
99
95
|
link.style.visibility = 'hidden';
|
|
100
96
|
document.body.appendChild(link);
|
|
101
97
|
link.click();
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
5
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
|
-
require('core-js/modules/es.string.replace.js');
|
|
7
3
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
8
4
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
9
5
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
10
6
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
11
7
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
8
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
9
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
12
10
|
var React = require('react');
|
|
13
11
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
14
12
|
var dsUtilities = require('@elliemae/ds-utilities');
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
4
|
var React = require('react');
|
|
6
5
|
var dsControlledForm = require('@elliemae/ds-controlled-form');
|
|
7
6
|
var DSPopper = require('@elliemae/ds-popper');
|
|
@@ -92,8 +91,8 @@ const formatRangeDate = function (_ref2) {
|
|
|
92
91
|
} = _ref2;
|
|
93
92
|
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultDateFormat.DEFAULT_DATE_FORMAT;
|
|
94
93
|
const sameDay = startDate.isSame(endDate, 'day');
|
|
95
|
-
if (sameDay) return
|
|
96
|
-
return
|
|
94
|
+
if (sameDay) return `${endDate.format(format)}`;
|
|
95
|
+
return `${startDate.format(format)} - ${endDate.format(format)}`;
|
|
97
96
|
};
|
|
98
97
|
|
|
99
98
|
function DateRangeFilterMenu(_ref3) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
4
|
var React = require('react');
|
|
6
5
|
var Grid = require('@elliemae/ds-grid');
|
|
7
6
|
var dsControlledForm = require('@elliemae/ds-controlled-form');
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
5
4
|
var React = require('react');
|
|
6
5
|
var dsControlledForm = require('@elliemae/ds-controlled-form');
|
|
7
6
|
var DSPopper = require('@elliemae/ds-basic/Popper');
|
|
@@ -130,8 +129,8 @@ const formatRangeDate = function (_ref2) {
|
|
|
130
129
|
} = _ref2;
|
|
131
130
|
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultDateFormat.DEFAULT_DATE_FORMAT;
|
|
132
131
|
const sameDay = startDate.isSame(endDate, 'day');
|
|
133
|
-
if (sameDay) return
|
|
134
|
-
return
|
|
132
|
+
if (sameDay) return `${endDate.format(format)}`;
|
|
133
|
+
return `${startDate.format(format)} - ${endDate.format(format)}`;
|
|
135
134
|
}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
136
135
|
|
|
137
136
|
|
|
@@ -8,7 +8,6 @@ require('core-js/modules/esnext.iterator.map.js');
|
|
|
8
8
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
9
9
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
10
10
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
11
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
12
11
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
13
12
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
14
13
|
var React = require('react');
|
|
@@ -101,13 +100,11 @@ function TextFilterMenu(_ref) {
|
|
|
101
100
|
selected.forEach(item => {
|
|
102
101
|
// if initialSelectedOptions includes item, then we do nothing
|
|
103
102
|
if (!initialSelectedOptions.includes(item)) {
|
|
104
|
-
var _column$filter;
|
|
105
|
-
|
|
106
103
|
onAddFilter({
|
|
107
104
|
group: filterGroup,
|
|
108
105
|
label: column.label,
|
|
109
106
|
value: item,
|
|
110
|
-
operator:
|
|
107
|
+
operator: column?.filter?.operator || 'contains',
|
|
111
108
|
transformRowValue: column.valueTransformation
|
|
112
109
|
}, column);
|
|
113
110
|
}
|
|
@@ -141,13 +138,11 @@ function TextFilterMenu(_ref) {
|
|
|
141
138
|
minWidth: column.filterMenuMinWidth,
|
|
142
139
|
onSelectMenuItem: selectedValue => {
|
|
143
140
|
if (selectedValue) {
|
|
144
|
-
var _column$filter2;
|
|
145
|
-
|
|
146
141
|
onAddFilter({
|
|
147
142
|
group: column.searchBy || column.property,
|
|
148
143
|
label: column.label,
|
|
149
144
|
value: selectedValue,
|
|
150
|
-
operator:
|
|
145
|
+
operator: column?.filter?.operator || 'contains',
|
|
151
146
|
transformRowValue: column.valueTransformation
|
|
152
147
|
}, column);
|
|
153
148
|
onOpenMenu(false);
|
|
@@ -10,7 +10,6 @@ require('core-js/modules/esnext.async-iterator.map.js');
|
|
|
10
10
|
require('core-js/modules/esnext.iterator.map.js');
|
|
11
11
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
12
12
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
13
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
14
13
|
require('core-js/modules/esnext.async-iterator.reduce.js');
|
|
15
14
|
require('core-js/modules/esnext.iterator.reduce.js');
|
|
16
15
|
var dsUtilities = require('@elliemae/ds-utilities');
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
5
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
8
6
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
9
7
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
10
8
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
11
9
|
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
12
11
|
var React = require('react');
|
|
13
12
|
var uuid = require('uuid');
|
|
14
13
|
var helper = require('./helper.js');
|
|
@@ -14,7 +14,7 @@ var createInstancePlugin__default = /*#__PURE__*/_interopDefaultLegacy(createIns
|
|
|
14
14
|
const groupedByData = (groupedBy, composedRows) => {
|
|
15
15
|
const grouped = lodash.groupBy(composedRows, groupedBy);
|
|
16
16
|
return Object.keys(grouped).map((c, key) => ({
|
|
17
|
-
id:
|
|
17
|
+
id: `grouped-by-${groupedBy}-${key}`,
|
|
18
18
|
key: groupedBy,
|
|
19
19
|
value: c,
|
|
20
20
|
children: grouped[c],
|