@elliemae/ds-datagrids 2.0.0-alpha.4 → 2.0.0-alpha.8
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 +2 -2
- package/cjs/DataGridImpl.js +5 -5
- package/cjs/PaginatedDataGrid.js +6 -6
- package/cjs/columns/IconColumn.js +4 -4
- package/cjs/components/BodyCell.js +3 -3
- package/cjs/components/BodyList.js +4 -4
- package/cjs/components/ColumnsOptionsMenuSection.js +1 -1
- package/cjs/components/EmptyState.js +7 -7
- package/cjs/components/HeaderCell.js +2 -2
- package/cjs/components/List.js +1 -1
- package/cjs/components/ListItem.js +1 -1
- package/cjs/components/NoResults.js +3 -3
- package/cjs/components/RowsLoader.js +1 -1
- package/cjs/components/Table.js +4 -4
- package/cjs/components/TableBody.js +3 -3
- package/cjs/components/TableHeader.js +1 -1
- package/cjs/components/footer/addOptionalFooterComponents.js +1 -1
- package/cjs/components/header/PrimaryControls.js +1 -1
- package/cjs/components/header/addOptionalHeaderComponents.js +1 -1
- 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 +6 -6
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js +2 -2
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +2 -2
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +1 -1
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +1 -1
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js +2 -2
- package/cjs/plugins/column-sizing/useColumnSizeService.js +1 -1
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js +2 -4
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +2 -2
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +2 -2
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +9 -9
- package/cjs/plugins/editable/EditableComponents/ComboBox.js +3 -3
- package/cjs/plugins/editable/EditableComponents/TextBox.js +4 -4
- package/cjs/plugins/editable/EditablePlugin.js +2 -2
- package/cjs/plugins/editable/decorateEditable.js +7 -9
- package/cjs/plugins/editable/getEditorComponent.js +3 -3
- package/cjs/plugins/expandable-grid/ExpandableColumn.js +9 -9
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js +6 -6
- package/cjs/plugins/expandable-grid/ExpandedRow.js +14 -14
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +4 -4
- package/cjs/plugins/expandable-grid/useExpandGridState.js +1 -1
- package/cjs/plugins/export-data/ExportDataPlugin.js +3 -2
- package/cjs/plugins/filterable/FilterablePlugin.js +2 -2
- package/cjs/plugins/filterable/addFilterToColumn.js +1 -1
- package/cjs/plugins/filterable/components/FilterableHeader.js +4 -4
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +12 -12
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +11 -11
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +13 -13
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +9 -9
- package/cjs/plugins/filterable/filterableFormatter.js +1 -1
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +2 -2
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +4 -4
- package/cjs/plugins/filterable/helper.js +1 -1
- package/cjs/plugins/filterable/useFilterableState.js +1 -1
- package/cjs/plugins/grouping-by/GroupingByPlugin.js +1 -1
- package/cjs/plugins/grouping-grid/GroupingPlugin.js +4 -4
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +3 -3
- package/cjs/plugins/pagination/PaginationPlugin.js +8 -8
- package/cjs/plugins/pagination/components/Pagination.js +2 -2
- package/cjs/plugins/pagination/components/Paginator.js +12 -12
- package/cjs/plugins/pagination/components/PerPageDropdown.js +5 -5
- package/cjs/plugins/pagination/helper.js +1 -1
- package/cjs/plugins/pagination/usePaginationState.js +2 -2
- package/cjs/plugins/resizable/ResizablePlugin.js +1 -1
- package/cjs/plugins/resizable/decorateResizable.js +3 -3
- package/cjs/plugins/resizable/useResizeHandle.js +1 -1
- package/cjs/plugins/resizable/utils.js +4 -4
- package/cjs/plugins/row-dnd/DndRowsPlugin.js +4 -4
- package/cjs/plugins/selectable/SelectablePlugin.js +2 -2
- package/cjs/plugins/selectable/addSelectableColumn.js +2 -2
- package/cjs/plugins/selectable/helper.js +1 -1
- package/cjs/plugins/selectable/selectableFormatter.js +7 -7
- package/cjs/plugins/selectable/useSelectableState.js +2 -2
- package/cjs/plugins/sortable/SortablePlugin.js +3 -5
- package/cjs/plugins/sortable/checkIfSortable.js +1 -1
- package/cjs/plugins/sortable/sortHeaderFormatter.js +6 -6
- package/cjs/plugins/sortable/sortTree.js +3 -5
- package/cjs/plugins/sortable/sorter.js +3 -3
- package/cjs/plugins/sortable/useSortableState.js +4 -6
- package/cjs/plugins/toolbar/RowRenderer.js +4 -4
- package/cjs/plugins/toolbar/ToolbarPlugin.js +2 -2
- package/cjs/plugins/toolbar/ToolbarTrigger.js +9 -9
- package/cjs/plugins/virtualization/AutoHeightList.js +3 -3
- package/cjs/plugins/virtualization/VirtualizationPlugin.js +3 -3
- package/cjs/plugins/virtualization/VirtualizedBody.js +3 -3
- package/cjs/renders/CellWithAddons.js +7 -7
- package/cjs/renders/styled.js +3 -3
- package/cjs/utilities/normalizeData.js +1 -1
- package/esm/plugins/export-data/ExportDataPlugin.js +1 -0
- package/package.json +9 -9
|
@@ -17,14 +17,12 @@ function _interopNamespace(e) {
|
|
|
17
17
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
18
|
Object.defineProperty(n, k, d.get ? d : {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return e[k];
|
|
22
|
-
}
|
|
20
|
+
get: function () { return e[k]; }
|
|
23
21
|
});
|
|
24
22
|
}
|
|
25
23
|
});
|
|
26
24
|
}
|
|
27
|
-
n[
|
|
25
|
+
n["default"] = e;
|
|
28
26
|
return Object.freeze(n);
|
|
29
27
|
}
|
|
30
28
|
|
|
@@ -9,9 +9,9 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var createInstancePlugin__default = /*#__PURE__*/_interopDefaultLegacy(createInstancePlugin);
|
|
11
11
|
|
|
12
|
-
const decorateColumn = (column, grid) => addCustomRendererToCell[
|
|
12
|
+
const decorateColumn = (column, grid) => addCustomRendererToCell["default"](grid)(column);
|
|
13
13
|
|
|
14
|
-
const CustomRendererPlugin = createInstancePlugin__default[
|
|
14
|
+
const CustomRendererPlugin = createInstancePlugin__default["default"]('custom-renderer', {
|
|
15
15
|
decorateColumn
|
|
16
16
|
});
|
|
17
17
|
|
|
@@ -13,7 +13,7 @@ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_definePropert
|
|
|
13
13
|
|
|
14
14
|
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; }
|
|
15
15
|
|
|
16
|
-
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__default[
|
|
16
|
+
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__default["default"](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; }
|
|
17
17
|
const getRenderer = (renderer, grid, column) => (value, metaData) => {
|
|
18
18
|
const {
|
|
19
19
|
props: {
|
|
@@ -63,5 +63,5 @@ const addCustomRendererToCell = grid => column => {
|
|
|
63
63
|
return column;
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
exports[
|
|
66
|
+
exports["default"] = addCustomRendererToCell;
|
|
67
67
|
exports.getRenderer = getRenderer;
|
|
@@ -29,15 +29,15 @@ const _excluded = ["type", "handlers"];
|
|
|
29
29
|
|
|
30
30
|
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; }
|
|
31
31
|
|
|
32
|
-
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__default[
|
|
32
|
+
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__default["default"](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; }
|
|
33
33
|
const components = {
|
|
34
|
-
DSButton: DSButton__default[
|
|
35
|
-
DSCheckbox: DSCheckbox__default[
|
|
36
|
-
DSComboBox: DSComboBox__default[
|
|
37
|
-
DSRadio: DSRadio__default[
|
|
38
|
-
DSTextBox: DSTextBox__default[
|
|
39
|
-
DSToggle: DSToggle__default[
|
|
40
|
-
DSDropdownMenu: DSDropdownMenu__default[
|
|
34
|
+
DSButton: DSButton__default["default"],
|
|
35
|
+
DSCheckbox: DSCheckbox__default["default"],
|
|
36
|
+
DSComboBox: DSComboBox__default["default"],
|
|
37
|
+
DSRadio: DSRadio__default["default"],
|
|
38
|
+
DSTextBox: DSTextBox__default["default"],
|
|
39
|
+
DSToggle: DSToggle__default["default"],
|
|
40
|
+
DSDropdownMenu: DSDropdownMenu__default["default"]
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
const getRendererComponent = ({
|
|
@@ -49,7 +49,7 @@ const getRendererComponent = ({
|
|
|
49
49
|
type = 'DSTextBox',
|
|
50
50
|
handlers
|
|
51
51
|
} = _ref,
|
|
52
|
-
rest = _objectWithoutProperties__default[
|
|
52
|
+
rest = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
53
53
|
|
|
54
54
|
const Component = components[type] || index[type];
|
|
55
55
|
const {
|
|
@@ -12,7 +12,7 @@ var DSComboBox__default = /*#__PURE__*/_interopDefaultLegacy(DSComboBox);
|
|
|
12
12
|
|
|
13
13
|
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; }
|
|
14
14
|
|
|
15
|
-
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__default[
|
|
15
|
+
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__default["default"](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
16
|
class ComboBox extends React.Component {
|
|
17
17
|
constructor(props) {
|
|
18
18
|
super(props);
|
|
@@ -50,7 +50,7 @@ class ComboBox extends React.Component {
|
|
|
50
50
|
const {
|
|
51
51
|
value
|
|
52
52
|
} = this.state;
|
|
53
|
-
return /*#__PURE__*/jsxRuntime.jsx(DSComboBox__default[
|
|
53
|
+
return /*#__PURE__*/jsxRuntime.jsx(DSComboBox__default["default"], _objectSpread(_objectSpread({}, this.props), {}, {
|
|
54
54
|
menuIsOpen: true,
|
|
55
55
|
onBlur: this.handleBlur,
|
|
56
56
|
onChange: this.handleChange,
|
|
@@ -61,7 +61,7 @@ class ComboBox extends React.Component {
|
|
|
61
61
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
_defineProperty__default[
|
|
64
|
+
_defineProperty__default["default"](ComboBox, "defaultProps", {
|
|
65
65
|
onValue: () => null
|
|
66
66
|
});
|
|
67
67
|
|
|
@@ -13,11 +13,11 @@ var DSTextBox__default = /*#__PURE__*/_interopDefaultLegacy(DSTextBox);
|
|
|
13
13
|
|
|
14
14
|
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; }
|
|
15
15
|
|
|
16
|
-
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__default[
|
|
16
|
+
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__default["default"](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; }
|
|
17
17
|
class TextBox extends React.Component {
|
|
18
18
|
constructor(props) {
|
|
19
19
|
super(props);
|
|
20
|
-
this.inputRef = /*#__PURE__*/React__default[
|
|
20
|
+
this.inputRef = /*#__PURE__*/React__default["default"].createRef();
|
|
21
21
|
this.state = {
|
|
22
22
|
value: props.value
|
|
23
23
|
};
|
|
@@ -83,7 +83,7 @@ class TextBox extends React.Component {
|
|
|
83
83
|
const {
|
|
84
84
|
value
|
|
85
85
|
} = this.state;
|
|
86
|
-
return /*#__PURE__*/jsxRuntime.jsx(DSTextBox__default[
|
|
86
|
+
return /*#__PURE__*/jsxRuntime.jsx(DSTextBox__default["default"], _objectSpread(_objectSpread({
|
|
87
87
|
"data-testid": "ds-datagrids-editable-text-box"
|
|
88
88
|
}, this.props), {}, {
|
|
89
89
|
innerRef: this.inputRef,
|
|
@@ -98,7 +98,7 @@ class TextBox extends React.Component {
|
|
|
98
98
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
_defineProperty__default[
|
|
101
|
+
_defineProperty__default["default"](TextBox, "defaultProps", {
|
|
102
102
|
onValue: () => null
|
|
103
103
|
});
|
|
104
104
|
|
|
@@ -19,7 +19,7 @@ const registerStateHook = grid => {
|
|
|
19
19
|
onColumnRowEdited,
|
|
20
20
|
onColumnRowEdit
|
|
21
21
|
} = grid.props;
|
|
22
|
-
const [editingRows, setEditingRows] = useDerivedStateFromProps__default[
|
|
22
|
+
const [editingRows, setEditingRows] = useDerivedStateFromProps__default["default"](editingRowsProp || {});
|
|
23
23
|
|
|
24
24
|
const activateEdit = editParams => {
|
|
25
25
|
const {
|
|
@@ -80,7 +80,7 @@ const decorateColumn = (column, grid) => {
|
|
|
80
80
|
}, grid) : column;
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
const EditablePlugin = createInstancePlugin__default[
|
|
83
|
+
const EditablePlugin = createInstancePlugin__default["default"]('editable', {
|
|
84
84
|
registerStateHook,
|
|
85
85
|
decorateColumn,
|
|
86
86
|
|
|
@@ -24,14 +24,12 @@ function _interopNamespace(e) {
|
|
|
24
24
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
25
25
|
Object.defineProperty(n, k, d.get ? d : {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () {
|
|
28
|
-
return e[k];
|
|
29
|
-
}
|
|
27
|
+
get: function () { return e[k]; }
|
|
30
28
|
});
|
|
31
29
|
}
|
|
32
30
|
});
|
|
33
31
|
}
|
|
34
|
-
n[
|
|
32
|
+
n["default"] = e;
|
|
35
33
|
return Object.freeze(n);
|
|
36
34
|
}
|
|
37
35
|
|
|
@@ -47,7 +45,7 @@ const _excluded = ["columnIndex", "rowData", "column"];
|
|
|
47
45
|
|
|
48
46
|
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; }
|
|
49
47
|
|
|
50
|
-
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__default[
|
|
48
|
+
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__default["default"](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; }
|
|
51
49
|
|
|
52
50
|
const makeEditableConfig = grid => edit__namespace.edit({
|
|
53
51
|
isEditing: _ref => {
|
|
@@ -56,7 +54,7 @@ const makeEditableConfig = grid => edit__namespace.edit({
|
|
|
56
54
|
rowData,
|
|
57
55
|
column = {}
|
|
58
56
|
} = _ref,
|
|
59
|
-
rest = _objectWithoutProperties__default[
|
|
57
|
+
rest = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
60
58
|
|
|
61
59
|
const {
|
|
62
60
|
state: {
|
|
@@ -90,7 +88,7 @@ const addEditableToCell = ({
|
|
|
90
88
|
column.cell.transforms.push(config(getEditorComponent(column.customEditor, handlers)));
|
|
91
89
|
column.cell.props.className = utils.cx(column.cell.props.className, `editable${column.customEditor ? ' customEditor' : ''}`);
|
|
92
90
|
return initColumnDefinition.appendCellFormatter([(value, extraParams) => /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
93
|
-
children: /*#__PURE__*/_jsx__default[
|
|
91
|
+
children: /*#__PURE__*/_jsx__default["default"]("div", {
|
|
94
92
|
onClick: e => {
|
|
95
93
|
e.stopPropagation();
|
|
96
94
|
grid.getInstance().actions.activateEdit(extraParams);
|
|
@@ -104,9 +102,9 @@ const addEditableToCell = ({
|
|
|
104
102
|
},
|
|
105
103
|
role: "gridcell",
|
|
106
104
|
tabIndex: 0
|
|
107
|
-
}, void 0, value, _EditPencil || (_EditPencil = /*#__PURE__*/_jsx__default[
|
|
105
|
+
}, void 0, value, _EditPencil || (_EditPencil = /*#__PURE__*/_jsx__default["default"](EditPencil__default["default"], {
|
|
108
106
|
className: "edit-pencil"
|
|
109
|
-
})), _span || (_span = /*#__PURE__*/_jsx__default[
|
|
107
|
+
})), _span || (_span = /*#__PURE__*/_jsx__default["default"]("span", {
|
|
110
108
|
className: "edit-separator"
|
|
111
109
|
}, void 0, " ")))
|
|
112
110
|
})], column);
|
|
@@ -18,7 +18,7 @@ const _excluded = ["type"];
|
|
|
18
18
|
|
|
19
19
|
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; }
|
|
20
20
|
|
|
21
|
-
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__default[
|
|
21
|
+
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__default["default"](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; }
|
|
22
22
|
const components = {
|
|
23
23
|
DSComboBox: ComboBox,
|
|
24
24
|
DSTextBox: TextBox
|
|
@@ -40,7 +40,7 @@ const getEditorComponent = (editorComponent = {}, handlers) => ({
|
|
|
40
40
|
const {
|
|
41
41
|
type = 'DSTextBox'
|
|
42
42
|
} = editorComponent,
|
|
43
|
-
restEditorProps = _objectWithoutProperties__default[
|
|
43
|
+
restEditorProps = _objectWithoutProperties__default["default"](editorComponent, _excluded);
|
|
44
44
|
|
|
45
45
|
const Component = components[type];
|
|
46
46
|
|
|
@@ -49,7 +49,7 @@ const getEditorComponent = (editorComponent = {}, handlers) => ({
|
|
|
49
49
|
|
|
50
50
|
// TODO: remove this whole condition when combobox v3 is out and fully working without "maxOptions" parameter
|
|
51
51
|
const maxOptions = (restEditorProps === null || restEditorProps === void 0 ? void 0 : (_restEditorProps$opti = restEditorProps.options) === null || _restEditorProps$opti === void 0 ? void 0 : _restEditorProps$opti.length) || 100;
|
|
52
|
-
return /*#__PURE__*/_jsx__default[
|
|
52
|
+
return /*#__PURE__*/_jsx__default["default"]("div", {
|
|
53
53
|
style: {
|
|
54
54
|
zIndex: 0
|
|
55
55
|
}
|
|
@@ -29,7 +29,7 @@ var _ArrowheadDown, _ArrowheadRight;
|
|
|
29
29
|
|
|
30
30
|
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; }
|
|
31
31
|
|
|
32
|
-
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__default[
|
|
32
|
+
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__default["default"](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; }
|
|
33
33
|
const blockName = `${blockNames.dataGridBlockName}-expandable-column`; // todo: clean this when we move to css-js
|
|
34
34
|
|
|
35
35
|
const ExpandableColumnWrapper = dsClassnames.aggregatedClasses('div')(blockName);
|
|
@@ -52,14 +52,14 @@ function ExpandableColumnCell({
|
|
|
52
52
|
return /*#__PURE__*/jsxRuntime.jsxs(ExpandableColumnWrapper, {
|
|
53
53
|
ref: ref,
|
|
54
54
|
tabindex: 0,
|
|
55
|
-
children: [/*#__PURE__*/_jsx__default[
|
|
55
|
+
children: [/*#__PURE__*/_jsx__default["default"](ExpandableMasterWrapper, {
|
|
56
56
|
style: {
|
|
57
57
|
height: rowSizes.RowSizes.extend
|
|
58
58
|
}
|
|
59
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
59
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
60
60
|
buttonType: "text",
|
|
61
61
|
className: "expandable-arrow",
|
|
62
|
-
icon: isExpanded ? _ArrowheadDown || (_ArrowheadDown = /*#__PURE__*/_jsx__default[
|
|
62
|
+
icon: isExpanded ? _ArrowheadDown || (_ArrowheadDown = /*#__PURE__*/_jsx__default["default"](ArrowheadDown__default["default"], {})) : _ArrowheadRight || (_ArrowheadRight = /*#__PURE__*/_jsx__default["default"](ArrowheadRight__default["default"], {})),
|
|
63
63
|
onClick: e => {
|
|
64
64
|
onToggleExpand(e);
|
|
65
65
|
|
|
@@ -68,11 +68,11 @@ function ExpandableColumnCell({
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
size: "s"
|
|
71
|
-
}), /*#__PURE__*/_jsx__default[
|
|
71
|
+
}), /*#__PURE__*/_jsx__default["default"](LabelDescriptionWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](Label, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText__default["default"], {
|
|
72
72
|
value: label
|
|
73
|
-
})), /*#__PURE__*/_jsx__default[
|
|
73
|
+
})), /*#__PURE__*/_jsx__default["default"](Description, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText__default["default"], {
|
|
74
74
|
value: description
|
|
75
|
-
}))), /*#__PURE__*/_jsx__default[
|
|
75
|
+
}))), /*#__PURE__*/_jsx__default["default"](ExtraColumnData, {}, void 0, extraData)), isExpanded && /*#__PURE__*/_jsx__default["default"](ExpandableDetailsWrapper, {}, void 0, expandableDetails)]
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -95,7 +95,7 @@ const expandableColumnRenderer = ({
|
|
|
95
95
|
const expandableDetails = renderExpandedDetails({
|
|
96
96
|
rowData
|
|
97
97
|
});
|
|
98
|
-
return /*#__PURE__*/_jsx__default[
|
|
98
|
+
return /*#__PURE__*/_jsx__default["default"](ExpandableColumnCell, {
|
|
99
99
|
description: renderRowDescription({
|
|
100
100
|
rowData
|
|
101
101
|
}),
|
|
@@ -126,7 +126,7 @@ function createExpandableColumn(_ref) {
|
|
|
126
126
|
searchable,
|
|
127
127
|
customRenderer
|
|
128
128
|
} = _ref,
|
|
129
|
-
rest = _objectWithoutProperties__default[
|
|
129
|
+
rest = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
130
130
|
|
|
131
131
|
return _objectSpread(_objectSpread({}, rest), {}, {
|
|
132
132
|
label,
|
|
@@ -35,7 +35,7 @@ var _ArrowheadDown, _ArrowheadRight;
|
|
|
35
35
|
|
|
36
36
|
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; }
|
|
37
37
|
|
|
38
|
-
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__default[
|
|
38
|
+
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__default["default"](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; }
|
|
39
39
|
|
|
40
40
|
const getExpandedRowSizeBySubrows = ({
|
|
41
41
|
totalAmount,
|
|
@@ -53,7 +53,7 @@ const createExpandedRow = type => ExpandedRows[type] || ExpandedRows.Master;
|
|
|
53
53
|
|
|
54
54
|
const isExpandableSingleColumn = columns => columns.some(column => column.expandableColumn);
|
|
55
55
|
|
|
56
|
-
const ExpandablePlugin = createInstancePlugin__default[
|
|
56
|
+
const ExpandablePlugin = createInstancePlugin__default["default"]('expandable', {
|
|
57
57
|
registerStateHook: useExpandGridState.useExpandGridState,
|
|
58
58
|
|
|
59
59
|
decorateGrid(grid) {
|
|
@@ -90,10 +90,10 @@ const ExpandablePlugin = createInstancePlugin__default['default']('expandable',
|
|
|
90
90
|
*/
|
|
91
91
|
|
|
92
92
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
93
|
-
children: [/*#__PURE__*/_jsx__default[
|
|
93
|
+
children: [/*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
94
94
|
buttonType: "text",
|
|
95
95
|
className: "expandable-arrow",
|
|
96
|
-
icon: isExpanded ? _ArrowheadDown || (_ArrowheadDown = /*#__PURE__*/_jsx__default[
|
|
96
|
+
icon: isExpanded ? _ArrowheadDown || (_ArrowheadDown = /*#__PURE__*/_jsx__default["default"](ArrowheadDown__default["default"], {})) : _ArrowheadRight || (_ArrowheadRight = /*#__PURE__*/_jsx__default["default"](ArrowheadRight__default["default"], {})),
|
|
97
97
|
onClick: e => {
|
|
98
98
|
e.stopPropagation();
|
|
99
99
|
toggleExpand(rowData);
|
|
@@ -170,7 +170,7 @@ const ExpandablePlugin = createInstancePlugin__default['default']('expandable',
|
|
|
170
170
|
let {
|
|
171
171
|
isExpanded
|
|
172
172
|
} = _ref,
|
|
173
|
-
rowProps = _objectWithoutProperties__default[
|
|
173
|
+
rowProps = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
174
174
|
|
|
175
175
|
if (isExpanded) {
|
|
176
176
|
const {
|
|
@@ -183,7 +183,7 @@ const ExpandablePlugin = createInstancePlugin__default['default']('expandable',
|
|
|
183
183
|
} = grid.getInstance(); // https://jira.elliemae.io/browse/PUI-1667
|
|
184
184
|
|
|
185
185
|
const rowData = composedRows[rowProps.index] ? composedRows[rowProps.index] : rowProps.rowData;
|
|
186
|
-
return /*#__PURE__*/_jsx__default[
|
|
186
|
+
return /*#__PURE__*/_jsx__default["default"](ExpandedRowComponent, {
|
|
187
187
|
cellComponent: Cell,
|
|
188
188
|
detailColumns: detailColumns,
|
|
189
189
|
parentGrid: grid,
|
|
@@ -36,16 +36,16 @@ const _excluded = ["instanceRef"],
|
|
|
36
36
|
|
|
37
37
|
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; }
|
|
38
38
|
|
|
39
|
-
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__default[
|
|
40
|
-
const DetailGrid = deferComponentRender__default[
|
|
39
|
+
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__default["default"](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; }
|
|
40
|
+
const DetailGrid = deferComponentRender__default["default"](({
|
|
41
41
|
parentGrid,
|
|
42
42
|
parentRowData,
|
|
43
43
|
rows
|
|
44
44
|
}) => {
|
|
45
45
|
const _parentGrid$props = parentGrid.props,
|
|
46
|
-
parentProps = _objectWithoutProperties__default[
|
|
46
|
+
parentProps = _objectWithoutProperties__default["default"](_parentGrid$props, _excluded);
|
|
47
47
|
|
|
48
|
-
const grid = useDataGrid__default[
|
|
48
|
+
const grid = useDataGrid__default["default"](_objectSpread(_objectSpread({
|
|
49
49
|
uuid: parentGrid.getInstance().uuid
|
|
50
50
|
}, parentProps), {}, {
|
|
51
51
|
columns: parentGrid.getInstance().decoratedColumns.filter(col => !col.expandableColumn).map(c => _objectSpread(_objectSpread({}, c), {}, {
|
|
@@ -64,13 +64,13 @@ const DetailGrid = deferComponentRender__default['default'](({
|
|
|
64
64
|
parentRowData
|
|
65
65
|
}));
|
|
66
66
|
return /*#__PURE__*/jsxRuntime.jsx(Table, _objectSpread(_objectSpread({}, grid), {}, {
|
|
67
|
-
children: _TableBody || (_TableBody = /*#__PURE__*/_jsx__default[
|
|
67
|
+
children: _TableBody || (_TableBody = /*#__PURE__*/_jsx__default["default"](TableBody, {}))
|
|
68
68
|
}));
|
|
69
69
|
}, null);
|
|
70
|
-
const DetailsWrapper = /*#__PURE__*/styled__default[
|
|
70
|
+
const DetailsWrapper = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
71
71
|
componentId: "sc-1goa4zy-0"
|
|
72
72
|
})(["flex:1;width:", "px;"], props => props.width);
|
|
73
|
-
const DetailGridWrapper = /*#__PURE__*/styled__default[
|
|
73
|
+
const DetailGridWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
74
74
|
componentId: "sc-1goa4zy-1"
|
|
75
75
|
})(["display:flex;height:calc(100% - ", "px);width:", "px;margin:12px 0;"], props => props.allRowsVisible ? 18 : 60, props => props.expandableGridDetailWidth);
|
|
76
76
|
|
|
@@ -105,10 +105,10 @@ function ExpandedRow({
|
|
|
105
105
|
const {
|
|
106
106
|
showAllRows
|
|
107
107
|
} = rowProps,
|
|
108
|
-
restRowProps = _objectWithoutProperties__default[
|
|
108
|
+
restRowProps = _objectWithoutProperties__default["default"](rowProps, _excluded2);
|
|
109
109
|
|
|
110
110
|
return /*#__PURE__*/jsxRuntime.jsxs(RowComponent, _objectSpread(_objectSpread({}, restRowProps), {}, {
|
|
111
|
-
children: [/*#__PURE__*/_jsx__default[
|
|
111
|
+
children: [/*#__PURE__*/_jsx__default["default"](BodyCell, {
|
|
112
112
|
column: decoratedColumns[0],
|
|
113
113
|
columnIndex: 0,
|
|
114
114
|
component: CellComponent,
|
|
@@ -116,20 +116,20 @@ function ExpandedRow({
|
|
|
116
116
|
rowProps: _objectSpread({
|
|
117
117
|
rowData
|
|
118
118
|
}, rowProps)
|
|
119
|
-
}), /*#__PURE__*/_jsx__default[
|
|
119
|
+
}), /*#__PURE__*/_jsx__default["default"](DetailsWrapper, {
|
|
120
120
|
width: expandableGridDetailWidth
|
|
121
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
121
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](DetailGridWrapper, {
|
|
122
122
|
allRowsVisible: rows.length < expandableSubrowsVisible || utils.get(expandedRows, [rowKey, 'showAllRows']),
|
|
123
123
|
expandableGridDetailWidth: expandableGridDetailWidth
|
|
124
|
-
}, void 0, _DSSeparator || (_DSSeparator = /*#__PURE__*/_jsx__default[
|
|
124
|
+
}, void 0, _DSSeparator || (_DSSeparator = /*#__PURE__*/_jsx__default["default"](DSSeparator__default["default"], {
|
|
125
125
|
dashed: true,
|
|
126
126
|
orientation: "vertical"
|
|
127
|
-
})), /*#__PURE__*/_jsx__default[
|
|
127
|
+
})), /*#__PURE__*/_jsx__default["default"](DetailGrid, {
|
|
128
128
|
detailColumns: detailColumns,
|
|
129
129
|
parentGrid: parentGrid.getInstance(),
|
|
130
130
|
parentRowData: rowData,
|
|
131
131
|
rows: showAllRows ? rows : (rows || []).slice(0, expandableSubrowsVisible)
|
|
132
|
-
})), rows.length > expandableSubrowsVisible && /*#__PURE__*/_jsx__default[
|
|
132
|
+
})), rows.length > expandableSubrowsVisible && /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
133
133
|
buttonType: "text",
|
|
134
134
|
labelText: showAllRows ? showLessRowsText : showMoreRowsText,
|
|
135
135
|
onClick: e => {
|
|
@@ -19,7 +19,7 @@ var _DSSeparator;
|
|
|
19
19
|
|
|
20
20
|
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; }
|
|
21
21
|
|
|
22
|
-
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__default[
|
|
22
|
+
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__default["default"](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; }
|
|
23
23
|
const blockName = `${blockNames.dataGridBlockName}-expanded-row`;
|
|
24
24
|
const DetailsWrapper = dsClassnames.aggregatedClasses('div')(`${blockName}-details-wrapper`, null, () => ({
|
|
25
25
|
'ie-flex-basis-auto': true
|
|
@@ -34,12 +34,12 @@ function ExpandedRowExtra({
|
|
|
34
34
|
}) {
|
|
35
35
|
return /*#__PURE__*/jsxRuntime.jsxs(RowComponent, _objectSpread(_objectSpread({}, rowProps), {}, {
|
|
36
36
|
className: utils.cx(rowProps.className, 'expanded-detail-row'),
|
|
37
|
-
children: [/*#__PURE__*/_jsx__default[
|
|
37
|
+
children: [/*#__PURE__*/_jsx__default["default"](RowComponent, {
|
|
38
38
|
className: "master-row-expanded"
|
|
39
|
-
}, void 0, children), _DSSeparator || (_DSSeparator = /*#__PURE__*/_jsx__default[
|
|
39
|
+
}, void 0, children), _DSSeparator || (_DSSeparator = /*#__PURE__*/_jsx__default["default"](DSSeparator__default["default"], {
|
|
40
40
|
dashed: true,
|
|
41
41
|
margin: "xs"
|
|
42
|
-
})), /*#__PURE__*/_jsx__default[
|
|
42
|
+
})), /*#__PURE__*/_jsx__default["default"](DetailsWrapper, {}, void 0, renderRowDetails({
|
|
43
43
|
rowData
|
|
44
44
|
}))]
|
|
45
45
|
}));
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
6
|
require('core-js/modules/es.string.replace.js');
|
|
7
7
|
require('core-js/modules/web.url.js');
|
|
8
|
+
require('core-js/modules/web.url-search-params.js');
|
|
8
9
|
var utils = require('@elliemae/ds-utilities/utils');
|
|
9
10
|
var createInstancePlugin = require('@elliemae/ds-shared/createDataInstance/createInstancePlugin');
|
|
10
11
|
|
|
@@ -15,7 +16,7 @@ var createInstancePlugin__default = /*#__PURE__*/_interopDefaultLegacy(createIns
|
|
|
15
16
|
|
|
16
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; }
|
|
17
18
|
|
|
18
|
-
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__default[
|
|
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__default["default"](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; }
|
|
19
20
|
|
|
20
21
|
const isVisible = column => {
|
|
21
22
|
if (typeof column === 'undefined') {
|
|
@@ -91,7 +92,7 @@ const exportTo = (rows, columns, {
|
|
|
91
92
|
}
|
|
92
93
|
};
|
|
93
94
|
|
|
94
|
-
const ExportDataPlugin = createInstancePlugin__default[
|
|
95
|
+
const ExportDataPlugin = createInstancePlugin__default["default"]('export-data', {
|
|
95
96
|
decorateGrid(instance) {
|
|
96
97
|
return {
|
|
97
98
|
exportRows(opts = {}) {
|
|
@@ -50,11 +50,11 @@ const composeRows = (rows, grid) => {
|
|
|
50
50
|
},
|
|
51
51
|
composedRows
|
|
52
52
|
} = grid.getInstance();
|
|
53
|
-
const nextRows = !groupedRows ? filterRowsByQuery[
|
|
53
|
+
const nextRows = !groupedRows ? filterRowsByQuery["default"](rows, query) : filterRowsByQuery.filterRowsByQueryGroup(rows, query, composedRows);
|
|
54
54
|
return !isDataFiltered ? nextRows : rows;
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
-
const FilterablePlugin = createInstancePlugin__default[
|
|
57
|
+
const FilterablePlugin = createInstancePlugin__default["default"]('filterable', {
|
|
58
58
|
registerStateHook: useFilterableState.useFilterableState,
|
|
59
59
|
decorateColumn,
|
|
60
60
|
composeRows,
|
|
@@ -13,7 +13,7 @@ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_definePropert
|
|
|
13
13
|
|
|
14
14
|
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; }
|
|
15
15
|
|
|
16
|
-
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__default[
|
|
16
|
+
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__default["default"](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; }
|
|
17
17
|
const addFilterToColumn = (props, column) => {
|
|
18
18
|
const filterMenuRef = /*#__PURE__*/React.createRef();
|
|
19
19
|
column.header.formatters.push(filterableFormatter(_objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -19,7 +19,7 @@ var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObs
|
|
|
19
19
|
|
|
20
20
|
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; }
|
|
21
21
|
|
|
22
|
-
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__default[
|
|
22
|
+
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__default["default"](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; }
|
|
23
23
|
const blockName = 'data-grid-filter-header';
|
|
24
24
|
const Container = dsClassnames.aggregatedClasses('div')(blockName, null, ({
|
|
25
25
|
showFilter
|
|
@@ -70,7 +70,7 @@ function FilterableHeader({
|
|
|
70
70
|
React.useEffect(() => {
|
|
71
71
|
if (!isMenuOpened) onFilterMenuClose(column);else onFilterMenuOpen(column);
|
|
72
72
|
});
|
|
73
|
-
const [ref] = useResizeObserver__default[
|
|
73
|
+
const [ref] = useResizeObserver__default["default"](defineHeaderWidth);
|
|
74
74
|
const handleOpenMenu = React.useCallback(open => {
|
|
75
75
|
setMenuOpened(open);
|
|
76
76
|
if (open) onFilterMenuOpen();
|
|
@@ -81,9 +81,9 @@ function FilterableHeader({
|
|
|
81
81
|
classProps: {
|
|
82
82
|
showFilter: isMenuOpened
|
|
83
83
|
},
|
|
84
|
-
children: [/*#__PURE__*/_jsx__default[
|
|
84
|
+
children: [/*#__PURE__*/_jsx__default["default"](FilterHeaderValue, {
|
|
85
85
|
className: "header-value"
|
|
86
|
-
}, void 0, value), /*#__PURE__*/_jsx__default[
|
|
86
|
+
}, void 0, value), /*#__PURE__*/_jsx__default["default"](FilterHeaderButton, {
|
|
87
87
|
"data-testid": "data-grid-filter-header__button"
|
|
88
88
|
}, void 0, /*#__PURE__*/jsxRuntime.jsx(FilterMenuComponent, _objectSpread({
|
|
89
89
|
className: "filter-header-menu",
|