@ozen-ui/data-grid 0.77.0 → 0.78.0
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/__inner__/cjs/core/column/store/DataGridStoreColumn.js +5 -4
- package/__inner__/cjs/core/column/store/utils.js +17 -0
- package/__inner__/cjs/core/column/table/DataGridColumn.js +4 -25
- package/__inner__/cjs/core/column/table/utils.js +14 -0
- package/__inner__/cjs/core/filter/store/base/DataGridStoreFilter.js +0 -9
- package/__inner__/cjs/core/filter/table/base/DataGridTableFilter.js +2 -3
- package/__inner__/cjs/core/store/DataGridStore.js +0 -8
- package/__inner__/cjs/core/sub-row/entities/index.js +1 -0
- package/__inner__/cjs/core/sub-row/entities/render.js +2 -0
- package/__inner__/cjs/core/table/DataGridTable.js +0 -1
- package/__inner__/cjs/ui/DataGrid/components/DataGridHeadFoot/DataGridHeadFoot.js +7 -1
- package/__inner__/cjs/ui/DataGrid/components/DataGridPagination/DataGridPagination.js +14 -4
- package/__inner__/cjs/ui/DataGrid/components/DataGridRow/DataGridRow.js +7 -3
- package/__inner__/cjs/ui/DataGrid/components/DataGridSubRow/DataGridSubRow.js +2 -2
- package/__inner__/cjs/ui/DataGridAllFiltersDrawer/DataGridAllFiltersDrawer.js +9 -4
- package/__inner__/cjs/ui/DataGridSettingsDrawer/DataGridSettingsDrawer.js +10 -4
- package/__inner__/cjs/ui/filters/DataGridAutocompleteFilter/DataGridAutocompleteFilter.js +1 -13
- package/__inner__/esm/core/column/store/DataGridStoreColumn.js +5 -4
- package/__inner__/esm/core/column/store/utils.js +12 -0
- package/__inner__/esm/core/column/table/DataGridColumn.js +4 -25
- package/__inner__/esm/core/column/table/utils.js +9 -0
- package/__inner__/esm/core/filter/store/base/DataGridStoreFilter.js +0 -9
- package/__inner__/esm/core/filter/table/base/DataGridTableFilter.js +2 -3
- package/__inner__/esm/core/store/DataGridStore.js +0 -8
- package/__inner__/esm/core/sub-row/entities/index.js +1 -0
- package/__inner__/esm/core/sub-row/entities/render.js +1 -0
- package/__inner__/esm/core/table/DataGridTable.js +0 -1
- package/__inner__/esm/ui/DataGrid/components/DataGridHeadFoot/DataGridHeadFoot.js +7 -1
- package/__inner__/esm/ui/DataGrid/components/DataGridPagination/DataGridPagination.js +14 -4
- package/__inner__/esm/ui/DataGrid/components/DataGridRow/DataGridRow.js +7 -3
- package/__inner__/esm/ui/DataGrid/components/DataGridSubRow/DataGridSubRow.js +2 -2
- package/__inner__/esm/ui/DataGridAllFiltersDrawer/DataGridAllFiltersDrawer.js +10 -4
- package/__inner__/esm/ui/DataGridSettingsDrawer/DataGridSettingsDrawer.js +12 -6
- package/__inner__/esm/ui/filters/DataGridAutocompleteFilter/DataGridAutocompleteFilter.js +1 -13
- package/__inner__/types/core/column/store/DataGridStoreColumn.d.ts +2 -1
- package/__inner__/types/core/column/store/utils.d.ts +5 -0
- package/__inner__/types/core/column/table/DataGridColumn.d.ts +2 -12
- package/__inner__/types/core/column/table/types.d.ts +7 -1
- package/__inner__/types/core/column/table/utils.d.ts +2 -0
- package/__inner__/types/core/entities/cell.d.ts +7 -1
- package/__inner__/types/core/filter/store/base/DataGridStoreFilter.d.ts +0 -3
- package/__inner__/types/core/filter/table/base/DataGridTableFilter.d.ts +1 -3
- package/__inner__/types/core/filter/table/base/types.d.ts +0 -2
- package/__inner__/types/core/sub-row/entities/index.d.ts +1 -0
- package/__inner__/types/core/sub-row/entities/render.d.ts +8 -0
- package/__inner__/types/core/sub-row/store/sub-row/DataGridStoreSubRow.d.ts +2 -2
- package/__inner__/types/core/sub-row/table/DataGridSubRow.d.ts +2 -2
- package/__inner__/types/core/sub-row/table/types.d.ts +2 -2
- package/__inner__/types/ui/DataGrid/components/DataGridPagination/entities/afterText.d.ts +3 -1
- package/__inner__/types/ui/DataGridAllFiltersDrawer/DataGridAllFiltersDrawer.d.ts +16 -4
- package/__inner__/types/ui/DataGridAllFiltersDrawer/types.d.ts +3 -1
- package/__inner__/types/ui/DataGridSettingsDrawer/DataGridSettingsDrawer.d.ts +22 -4
- package/__inner__/types/ui/DataGridSettingsDrawer/types.d.ts +5 -1
- package/package.json +6 -8
|
@@ -4,9 +4,10 @@ exports.DataGridStoreColumn = void 0;
|
|
|
4
4
|
var utils_1 = require("@ozen-ui/kit/utils");
|
|
5
5
|
var mobx_1 = require("mobx");
|
|
6
6
|
var shared_1 = require("../../../shared");
|
|
7
|
+
var utils_2 = require("./utils");
|
|
7
8
|
var DataGridStoreColumn = /** @class */ (function () {
|
|
8
9
|
function DataGridStoreColumn(column, context, root) {
|
|
9
|
-
var _a;
|
|
10
|
+
var _a, _b;
|
|
10
11
|
this.width = 'responsive';
|
|
11
12
|
this.eventBus = new shared_1.EventBus();
|
|
12
13
|
this.rawIsVisible = true;
|
|
@@ -14,14 +15,14 @@ var DataGridStoreColumn = /** @class */ (function () {
|
|
|
14
15
|
this.root = root !== null && root !== void 0 ? root : null;
|
|
15
16
|
this.id = column.id;
|
|
16
17
|
this.cell = column.cell;
|
|
17
|
-
this.
|
|
18
|
+
this.name = (0, utils_2.createDataGridStoreColumnName)(column, this);
|
|
19
|
+
this.header = (_a = column.header) !== null && _a !== void 0 ? _a : this.name;
|
|
18
20
|
this.accessor = column.accessor;
|
|
19
21
|
this.footer = column.footer;
|
|
20
|
-
this.name = column.name;
|
|
21
22
|
this.align = column.align;
|
|
22
23
|
this.sortSettings = column.sortSettings;
|
|
23
24
|
this.sort = null;
|
|
24
|
-
var width = (
|
|
25
|
+
var width = (_b = column.width) !== null && _b !== void 0 ? _b : context.columnsInfo.width;
|
|
25
26
|
this.rawWidth = (function () {
|
|
26
27
|
if ((0, utils_1.isFunction)(width)) {
|
|
27
28
|
return width;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDataGridStoreColumnName = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
var utils_1 = require("@ozen-ui/kit/utils");
|
|
7
|
+
var createDataGridStoreColumnName = function (column, storeColumn) {
|
|
8
|
+
var Component = function () {
|
|
9
|
+
if ((0, utils_1.isFunction)(column.name)) {
|
|
10
|
+
var Component_1 = column.name;
|
|
11
|
+
return react_1.default.createElement(Component_1, { column: storeColumn });
|
|
12
|
+
}
|
|
13
|
+
return column.name;
|
|
14
|
+
};
|
|
15
|
+
return Component;
|
|
16
|
+
};
|
|
17
|
+
exports.createDataGridStoreColumnName = createDataGridStoreColumnName;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DataGridColumn = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
4
|
var utils_1 = require("@ozen-ui/kit/utils");
|
|
6
5
|
var entities_1 = require("../entities");
|
|
6
|
+
var utils_2 = require("./utils");
|
|
7
7
|
var DataGridColumn = /** @class */ (function () {
|
|
8
8
|
function DataGridColumn(_a) {
|
|
9
9
|
var id = _a.id, cell = _a.cell, header = _a.header, accessor = _a.accessor, footer = _a.footer, name = _a.name, align = _a.align, sorting = _a.sorting, width = _a.width;
|
|
10
10
|
this.root = null;
|
|
11
|
-
this.context = null;
|
|
12
11
|
this.rawId = id;
|
|
13
|
-
this.header = header
|
|
14
|
-
this.cell =
|
|
12
|
+
this.header = header;
|
|
13
|
+
this.cell =
|
|
14
|
+
cell !== null && cell !== void 0 ? cell : (0, utils_2.createDataGridColumnDefaultRender)();
|
|
15
15
|
this.footer = footer;
|
|
16
16
|
this.accessor = accessor;
|
|
17
17
|
this.name = name;
|
|
@@ -30,9 +30,6 @@ var DataGridColumn = /** @class */ (function () {
|
|
|
30
30
|
available: availableSorting,
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
DataGridColumn.prototype.setContext = function (context) {
|
|
34
|
-
this.context = context;
|
|
35
|
-
};
|
|
36
33
|
Object.defineProperty(DataGridColumn.prototype, "id", {
|
|
37
34
|
get: function () {
|
|
38
35
|
if (this.root) {
|
|
@@ -46,24 +43,6 @@ var DataGridColumn = /** @class */ (function () {
|
|
|
46
43
|
DataGridColumn.prototype.setRoot = function (root) {
|
|
47
44
|
this.root = root;
|
|
48
45
|
};
|
|
49
|
-
DataGridColumn.prototype.createDateFilter = function (params) {
|
|
50
|
-
return this.context.createDateFilter(tslib_1.__assign(tslib_1.__assign({}, params), { column: this }));
|
|
51
|
-
};
|
|
52
|
-
DataGridColumn.prototype.createSelectFilter = function (params) {
|
|
53
|
-
return this.context.createSelectFilter(tslib_1.__assign(tslib_1.__assign({}, params), { column: this }));
|
|
54
|
-
};
|
|
55
|
-
DataGridColumn.prototype.createNumberFilter = function (params) {
|
|
56
|
-
return this.context.createNumberFilter(tslib_1.__assign(tslib_1.__assign({}, params), { column: this }));
|
|
57
|
-
};
|
|
58
|
-
DataGridColumn.prototype.createStringFilter = function (params) {
|
|
59
|
-
return this.context.createStringFilter(tslib_1.__assign(tslib_1.__assign({}, params), { column: this }));
|
|
60
|
-
};
|
|
61
|
-
DataGridColumn.prototype.createAutocompleteFilter = function (params) {
|
|
62
|
-
return this.context.createAutocompleteFilter(tslib_1.__assign(tslib_1.__assign({}, params), { column: this }));
|
|
63
|
-
};
|
|
64
|
-
DataGridColumn.prototype.createAutocompleteListCardFilter = function (params) {
|
|
65
|
-
return this.context.createAutocompleteListCardFilter(tslib_1.__assign(tslib_1.__assign({}, params), { column: this }));
|
|
66
|
-
};
|
|
67
46
|
Object.defineProperty(DataGridColumn.prototype, "depth", {
|
|
68
47
|
get: function () {
|
|
69
48
|
if (this.root) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDataGridColumnDefaultRender = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
var DataGridCellItem_1 = require("../../../ui/cells/DataGridCellItem");
|
|
7
|
+
var createDataGridColumnDefaultRender = function () {
|
|
8
|
+
var Component = function (_a) {
|
|
9
|
+
var data = _a.data, column = _a.column;
|
|
10
|
+
return (react_1.default.createElement(DataGridCellItem_1.DataGridCellItem, { align: column.align }, String(data)));
|
|
11
|
+
};
|
|
12
|
+
return Component;
|
|
13
|
+
};
|
|
14
|
+
exports.createDataGridColumnDefaultRender = createDataGridColumnDefaultRender;
|
|
@@ -12,17 +12,14 @@ var DataGridStoreFilter = /** @class */ (function () {
|
|
|
12
12
|
this.id = filter.id;
|
|
13
13
|
this.rawName = filter.name;
|
|
14
14
|
this.group = filter.group;
|
|
15
|
-
this.column = null;
|
|
16
15
|
(0, mobx_1.makeObservable)(this, {
|
|
17
16
|
id: mobx_1.observable,
|
|
18
17
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
19
18
|
// @ts-expect-error
|
|
20
19
|
rawName: mobx_1.observable,
|
|
21
|
-
column: mobx_1.observable,
|
|
22
20
|
group: mobx_1.observable,
|
|
23
21
|
context: mobx_1.observable,
|
|
24
22
|
setGroup: mobx_1.action,
|
|
25
|
-
setColumn: mobx_1.action,
|
|
26
23
|
setValue: mobx_1.action,
|
|
27
24
|
setLocalValue: mobx_1.action,
|
|
28
25
|
setAllFilterValue: mobx_1.action,
|
|
@@ -106,9 +103,6 @@ var DataGridStoreFilter = /** @class */ (function () {
|
|
|
106
103
|
DataGridStoreFilter.prototype.setGroup = function (group) {
|
|
107
104
|
this.group = group;
|
|
108
105
|
};
|
|
109
|
-
DataGridStoreFilter.prototype.setColumn = function (column) {
|
|
110
|
-
this.column = column;
|
|
111
|
-
};
|
|
112
106
|
Object.defineProperty(DataGridStoreFilter.prototype, "isEditedLocal", {
|
|
113
107
|
get: function () {
|
|
114
108
|
return !this.isEqualValues(this.localValue, this.value);
|
|
@@ -149,9 +143,6 @@ var DataGridStoreFilter = /** @class */ (function () {
|
|
|
149
143
|
if (this.rawName) {
|
|
150
144
|
return this.rawName;
|
|
151
145
|
}
|
|
152
|
-
if (this.column) {
|
|
153
|
-
return this.column.name;
|
|
154
|
-
}
|
|
155
146
|
return this.id;
|
|
156
147
|
},
|
|
157
148
|
enumerable: false,
|
|
@@ -4,9 +4,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.DataGridTableFilter = void 0;
|
|
5
5
|
var DataGridTableFilter = /** @class */ (function () {
|
|
6
6
|
function DataGridTableFilter(_a) {
|
|
7
|
-
var id = _a.id,
|
|
8
|
-
this.
|
|
9
|
-
this.id = "filter_".concat(this.column ? "".concat(this.column.id, ".") : '').concat(id);
|
|
7
|
+
var id = _a.id, name = _a.name, group = _a.group, render = _a.render;
|
|
8
|
+
this.id = "filter_".concat(id);
|
|
10
9
|
this.name = name !== null && name !== void 0 ? name : null;
|
|
11
10
|
this.group = group !== null && group !== void 0 ? group : 'main';
|
|
12
11
|
this.render = render !== null && render !== void 0 ? render : null;
|
|
@@ -63,14 +63,6 @@ var DataGridStore = /** @class */ (function () {
|
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
_this.filters.addFilter(createdFilter);
|
|
66
|
-
if (!filter.column) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
var storeColumn = _this.findColumn(filter.column);
|
|
70
|
-
if (!storeColumn) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
createdFilter.setColumn(storeColumn);
|
|
74
66
|
});
|
|
75
67
|
this.setData(data);
|
|
76
68
|
this.recalculate();
|
|
@@ -39,7 +39,13 @@ exports.DataGridHeadFoot = (0, core_1.dataGridObserver)(function (_a) {
|
|
|
39
39
|
isSubRowEnabled && store.subRows.isLeft && (react_1.default.createElement(components_1.DataGridHeadFootExpand, null)),
|
|
40
40
|
nodes.map(function (node) {
|
|
41
41
|
var render = isFoot ? node.footer : node.header;
|
|
42
|
-
var rendered = (
|
|
42
|
+
var rendered = (function () {
|
|
43
|
+
if ((0, utils_1.isFunction)(render)) {
|
|
44
|
+
var Component = render;
|
|
45
|
+
return react_1.default.createElement(Component, null);
|
|
46
|
+
}
|
|
47
|
+
return render;
|
|
48
|
+
})();
|
|
43
49
|
var isGroup = node instanceof core_1.DataGridStoreColumnsGroup;
|
|
44
50
|
return (react_1.default.createElement(react_1.Fragment, { key: node.id },
|
|
45
51
|
isGroup &&
|
|
@@ -23,10 +23,20 @@ var UnwrappedDataGridPagination = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
23
23
|
if (!pagination.isEnabled) {
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
|
-
var renderedBeforeText = (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
var renderedBeforeText = (function () {
|
|
27
|
+
if ((0, utils_1.isFunction)(beforeText)) {
|
|
28
|
+
var Component = beforeText;
|
|
29
|
+
return react_1.default.createElement(Component, null);
|
|
30
|
+
}
|
|
31
|
+
return beforeText;
|
|
32
|
+
})();
|
|
33
|
+
var renderedAfterText = (function () {
|
|
34
|
+
if ((0, utils_1.isFunction)(afterText)) {
|
|
35
|
+
var Component = afterText;
|
|
36
|
+
return react_1.default.createElement(Component, { total: pagination.total });
|
|
37
|
+
}
|
|
38
|
+
return afterText;
|
|
39
|
+
})();
|
|
30
40
|
return (react_1.default.createElement(Stack_1.Stack, { ref: ref, className: (0, exports.cnDataGridPagination)('', [className]), justify: "spaceBetween", align: "center", fullWidth: true },
|
|
31
41
|
react_1.default.createElement(Pagination_1.Pagination, { totalCount: pagination.total, page: pagination.index, pageSize: pagination.pageSize, size: "s", onPageChange: function (page) { return pagination.setIndex(page); }, disabled: store.isLoading }),
|
|
32
42
|
pagination.isAvailableSizeEnabled && (react_1.default.createElement(Stack_1.Stack, { gap: "s", align: "center" },
|
|
@@ -23,9 +23,13 @@ exports.DataGridRow = (0, core_1.dataGridObserver)(function (_a) {
|
|
|
23
23
|
store.columns.map(function (column) {
|
|
24
24
|
var cell = column.cell;
|
|
25
25
|
var value = column.accessor(row, index);
|
|
26
|
-
var renderedCell = (
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
var renderedCell = (function () {
|
|
27
|
+
if ((0, utils_1.isFunction)(cell)) {
|
|
28
|
+
var Component = cell;
|
|
29
|
+
return (react_1.default.createElement(Component, { key: "".concat(column.id, "-").concat(index), data: value, item: row, index: index, column: column }));
|
|
30
|
+
}
|
|
31
|
+
return cell;
|
|
32
|
+
})();
|
|
29
33
|
var cellComponent = (function () {
|
|
30
34
|
if ((0, utils_1.isString)(renderedCell) || (0, utils_1.isNumber)(renderedCell)) {
|
|
31
35
|
return (react_1.default.createElement(cells_1.DataGridCellItem, { align: column.align }, renderedCell));
|
|
@@ -27,7 +27,7 @@ exports.DataGridSubRow = (0, core_1.dataGridObserver)(function (_a) {
|
|
|
27
27
|
? store.subRows.getIsExpandedRoot(id)
|
|
28
28
|
: !!((_c = subRow.root) === null || _c === void 0 ? void 0 : _c.getIsExpanded(id));
|
|
29
29
|
var canExpand = subRow.canExpand;
|
|
30
|
-
var
|
|
30
|
+
var Component = subRow.render;
|
|
31
31
|
var expandButton = (react_1.default.createElement(IconButtonNext_1.IconButton, { icon: subRow.getIsExpanded(id) ? icons_1.ChevronUpIcon : icons_1.ChevronDownIcon, size: "s", onClick: function () {
|
|
32
32
|
subRow.toggle(id);
|
|
33
33
|
}, compressed: true }));
|
|
@@ -47,7 +47,7 @@ exports.DataGridSubRow = (0, core_1.dataGridObserver)(function (_a) {
|
|
|
47
47
|
canExpand &&
|
|
48
48
|
store.subRows.isLeft &&
|
|
49
49
|
expandButton,
|
|
50
|
-
|
|
50
|
+
react_1.default.createElement(Component, { subRow: subRow, index: index, item: row }),
|
|
51
51
|
isSomeRowsVisible &&
|
|
52
52
|
canExpand &&
|
|
53
53
|
store.subRows.isRight &&
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DataGridAllFiltersDrawer = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var react_1 = tslib_1.
|
|
5
|
+
var react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
var DrawerNext_1 = require("@ozen-ui/kit/DrawerNext");
|
|
7
7
|
var Stack_1 = require("@ozen-ui/kit/Stack");
|
|
8
8
|
var useEventListener_1 = require("@ozen-ui/kit/useEventListener");
|
|
@@ -10,8 +10,8 @@ var utils_1 = require("@ozen-ui/kit/utils");
|
|
|
10
10
|
var core_1 = require("../../core");
|
|
11
11
|
var filters_1 = require("../filters");
|
|
12
12
|
var components_1 = require("./components");
|
|
13
|
-
|
|
14
|
-
var title = _a.title, subTitle = _a.subTitle, applyButton = _a.applyButton, closeButton = _a.closeButton;
|
|
13
|
+
var NonWrappedDataGridAllFiltersDrawer = (0, react_1.forwardRef)(function (_a, ref) {
|
|
14
|
+
var title = _a.title, subTitle = _a.subTitle, applyButton = _a.applyButton, closeButton = _a.closeButton, onClose = _a.onClose, other = tslib_1.__rest(_a, ["title", "subTitle", "applyButton", "closeButton", "onClose"]);
|
|
15
15
|
var store = (0, core_1.useDataGridStore)();
|
|
16
16
|
var isOpen = store.modals.isOpen('filters');
|
|
17
17
|
var filters = store.filters;
|
|
@@ -25,7 +25,10 @@ exports.DataGridAllFiltersDrawer = (0, core_1.dataGridObserver)(function (_a) {
|
|
|
25
25
|
store.modals.closeFilters();
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
|
-
return (react_1.default.createElement(DrawerNext_1.Drawer, { open: isOpen, onClose: function () {
|
|
28
|
+
return (react_1.default.createElement(DrawerNext_1.Drawer, tslib_1.__assign({}, other, { ref: ref, open: isOpen, onClose: function () {
|
|
29
|
+
store.modals.closeFilters();
|
|
30
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
31
|
+
} }),
|
|
29
32
|
react_1.default.createElement(DrawerNext_1.DrawerHeader, null,
|
|
30
33
|
react_1.default.createElement(DrawerNext_1.DrawerTitle, null, title),
|
|
31
34
|
subTitle && react_1.default.createElement(DrawerNext_1.DrawerSubtitle, null, subTitle)),
|
|
@@ -33,3 +36,5 @@ exports.DataGridAllFiltersDrawer = (0, core_1.dataGridObserver)(function (_a) {
|
|
|
33
36
|
react_1.default.createElement(Stack_1.Stack, { direction: "column", gap: "s", fullWidth: true }, filters.filters.map(function (filter) { return (react_1.default.createElement(filters_1.DataGridFilter, { key: filter.id, filter: filter, type: "allFilter" })); }))),
|
|
34
37
|
react_1.default.createElement(components_1.DataGridAllFiltersDrawerFooter, { applyButton: applyButton, closeButton: closeButton })));
|
|
35
38
|
});
|
|
39
|
+
NonWrappedDataGridAllFiltersDrawer.displayName = 'DataGridAllFiltersDrawer';
|
|
40
|
+
exports.DataGridAllFiltersDrawer = (0, core_1.dataGridObserver)(NonWrappedDataGridAllFiltersDrawer);
|
|
@@ -7,8 +7,8 @@ var CheckboxNext_1 = require("@ozen-ui/kit/CheckboxNext");
|
|
|
7
7
|
var DrawerNext_1 = require("@ozen-ui/kit/DrawerNext");
|
|
8
8
|
var FormGroup_1 = require("@ozen-ui/kit/FormGroup");
|
|
9
9
|
var core_1 = require("../../core");
|
|
10
|
-
|
|
11
|
-
var title = _a.title, subTitle = _a.subTitle, closeButton = _a.closeButton, applyButton = _a.applyButton;
|
|
10
|
+
var NonWrappedDataGridSettingsDrawer = (0, react_1.forwardRef)(function (_a, ref) {
|
|
11
|
+
var title = _a.title, subTitle = _a.subTitle, closeButton = _a.closeButton, applyButton = _a.applyButton, onClose = _a.onClose, other = tslib_1.__rest(_a, ["title", "subTitle", "closeButton", "applyButton", "onClose"]);
|
|
12
12
|
var store = (0, core_1.useDataGridStore)();
|
|
13
13
|
var isOpen = store.modals.isOpen('columns-settings');
|
|
14
14
|
var columns = store.allColumns;
|
|
@@ -37,14 +37,18 @@ exports.DataGridSettingsDrawer = (0, core_1.dataGridObserver)(function (_a) {
|
|
|
37
37
|
setLocalVisible({});
|
|
38
38
|
}
|
|
39
39
|
}, [isOpen]);
|
|
40
|
-
return (react_1.default.createElement(DrawerNext_1.Drawer, { open: isOpen, onClose: function () {
|
|
40
|
+
return (react_1.default.createElement(DrawerNext_1.Drawer, tslib_1.__assign({}, other, { ref: ref, open: isOpen, onClose: function () {
|
|
41
|
+
store.modals.closeColumnsSettings();
|
|
42
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
43
|
+
} }),
|
|
41
44
|
react_1.default.createElement(DrawerNext_1.DrawerHeader, null,
|
|
42
45
|
react_1.default.createElement(DrawerNext_1.DrawerTitle, null, title),
|
|
43
46
|
subTitle && react_1.default.createElement(DrawerNext_1.DrawerSubtitle, null, subTitle)),
|
|
44
47
|
react_1.default.createElement(DrawerNext_1.DrawerBody, null,
|
|
45
48
|
react_1.default.createElement(FormGroup_1.FormGroup, { size: "l", direction: "column" }, columns.map(function (column) {
|
|
46
49
|
var checked = checkIsSelected(column);
|
|
47
|
-
|
|
50
|
+
var NameComponent = column.name;
|
|
51
|
+
return (react_1.default.createElement(CheckboxNext_1.Checkbox, { key: column.id, label: react_1.default.createElement(NameComponent, null), checked: checked, disabled: isLeftAlone && checked, size: "l", onChange: function (event) {
|
|
48
52
|
setLocalVisible(function (previousVisible) {
|
|
49
53
|
var _a;
|
|
50
54
|
return (tslib_1.__assign(tslib_1.__assign({}, previousVisible), (_a = {}, _a[column.id] = event.target.checked, _a)));
|
|
@@ -61,3 +65,5 @@ exports.DataGridSettingsDrawer = (0, core_1.dataGridObserver)(function (_a) {
|
|
|
61
65
|
store.modals.closeColumnsSettings();
|
|
62
66
|
} }, applyButton)))));
|
|
63
67
|
});
|
|
68
|
+
NonWrappedDataGridSettingsDrawer.displayName = 'DataGridSettingsDrawer';
|
|
69
|
+
exports.DataGridSettingsDrawer = (0, core_1.dataGridObserver)(NonWrappedDataGridSettingsDrawer);
|
|
@@ -9,19 +9,7 @@ var utilts_1 = require("./utilts");
|
|
|
9
9
|
exports.DataGridAutocompleteFilter = (0, core_1.dataGridObserver)(function (_a) {
|
|
10
10
|
var filter = _a.filter, type = _a.type, onChange = _a.onChange, onInputChange = _a.onInputChange, style = _a.style, renderMoreTag = _a.renderMoreTag, renderOption = _a.renderOption, searchFunction = _a.searchFunction, other = tslib_1.__rest(_a, ["filter", "type", "onChange", "onInputChange", "style", "renderMoreTag", "renderOption", "searchFunction"]);
|
|
11
11
|
var value = filter.valueByType(type);
|
|
12
|
-
return (react_1.default.createElement(AutocompleteNext_1.Autocomplete, tslib_1.__assign({ disableCloseOnSelect: filter.isMultiple, limitTags: "responsive", label: filter.name }, other, { size: type === 'allFilter' ? 's' : 'xs', options: filter.options, getOptionKey: function (option) { return option.value; }, getOptionLabel: function (option) { return option.label; }, getOptionDisabled: function () { return false; }, multiple: filter.isMultiple, renderMoreTag: renderMoreTag
|
|
13
|
-
? function (props, ref) {
|
|
14
|
-
return renderMoreTag(props, ref);
|
|
15
|
-
}
|
|
16
|
-
: undefined, renderOption: renderOption
|
|
17
|
-
? function (props) {
|
|
18
|
-
return renderOption(props);
|
|
19
|
-
}
|
|
20
|
-
: undefined, searchFunction: searchFunction
|
|
21
|
-
? function (options, searchValue) {
|
|
22
|
-
return searchFunction(options, searchValue);
|
|
23
|
-
}
|
|
24
|
-
: undefined, value: (0, utilts_1.filterValueToAutocomplete)(filter, value), style: tslib_1.__assign(tslib_1.__assign({}, style), { minWidth: 200 }), onInputChange: function (event, _value) {
|
|
12
|
+
return (react_1.default.createElement(AutocompleteNext_1.Autocomplete, tslib_1.__assign({ disableCloseOnSelect: filter.isMultiple, limitTags: "responsive", label: filter.name }, other, { size: type === 'allFilter' ? 's' : 'xs', options: filter.options, getOptionKey: function (option) { return option.value; }, getOptionLabel: function (option) { return option.label; }, getOptionDisabled: function () { return false; }, multiple: filter.isMultiple, renderMoreTag: renderMoreTag, renderOption: renderOption, searchFunction: searchFunction, value: (0, utilts_1.filterValueToAutocomplete)(filter, value), style: tslib_1.__assign(tslib_1.__assign({}, style), { minWidth: 200 }), onInputChange: function (event, _value) {
|
|
25
13
|
var value = _value !== null && _value !== void 0 ? _value : '';
|
|
26
14
|
onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(event, value);
|
|
27
15
|
}, onChange: function (event, _value) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { isFunction, isNumber } from '@ozen-ui/kit/utils';
|
|
2
2
|
import { autorun, makeAutoObservable, reaction, runInAction } from 'mobx';
|
|
3
3
|
import { EventBus } from '../../../shared';
|
|
4
|
+
import { createDataGridStoreColumnName } from './utils';
|
|
4
5
|
var DataGridStoreColumn = /** @class */ (function () {
|
|
5
6
|
function DataGridStoreColumn(column, context, root) {
|
|
6
|
-
var _a;
|
|
7
|
+
var _a, _b;
|
|
7
8
|
this.width = 'responsive';
|
|
8
9
|
this.eventBus = new EventBus();
|
|
9
10
|
this.rawIsVisible = true;
|
|
@@ -11,14 +12,14 @@ var DataGridStoreColumn = /** @class */ (function () {
|
|
|
11
12
|
this.root = root !== null && root !== void 0 ? root : null;
|
|
12
13
|
this.id = column.id;
|
|
13
14
|
this.cell = column.cell;
|
|
14
|
-
this.
|
|
15
|
+
this.name = createDataGridStoreColumnName(column, this);
|
|
16
|
+
this.header = (_a = column.header) !== null && _a !== void 0 ? _a : this.name;
|
|
15
17
|
this.accessor = column.accessor;
|
|
16
18
|
this.footer = column.footer;
|
|
17
|
-
this.name = column.name;
|
|
18
19
|
this.align = column.align;
|
|
19
20
|
this.sortSettings = column.sortSettings;
|
|
20
21
|
this.sort = null;
|
|
21
|
-
var width = (
|
|
22
|
+
var width = (_b = column.width) !== null && _b !== void 0 ? _b : context.columnsInfo.width;
|
|
22
23
|
this.rawWidth = (function () {
|
|
23
24
|
if (isFunction(width)) {
|
|
24
25
|
return width;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { isFunction } from '@ozen-ui/kit/utils';
|
|
3
|
+
export var createDataGridStoreColumnName = function (column, storeColumn) {
|
|
4
|
+
var Component = function () {
|
|
5
|
+
if (isFunction(column.name)) {
|
|
6
|
+
var Component_1 = column.name;
|
|
7
|
+
return React.createElement(Component_1, { column: storeColumn });
|
|
8
|
+
}
|
|
9
|
+
return column.name;
|
|
10
|
+
};
|
|
11
|
+
return Component;
|
|
12
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
import { isArray } from '@ozen-ui/kit/utils';
|
|
3
2
|
import { dataGridColumnSortType } from '../entities';
|
|
3
|
+
import { createDataGridColumnDefaultRender } from './utils';
|
|
4
4
|
var DataGridColumn = /** @class */ (function () {
|
|
5
5
|
function DataGridColumn(_a) {
|
|
6
6
|
var id = _a.id, cell = _a.cell, header = _a.header, accessor = _a.accessor, footer = _a.footer, name = _a.name, align = _a.align, sorting = _a.sorting, width = _a.width;
|
|
7
7
|
this.root = null;
|
|
8
|
-
this.context = null;
|
|
9
8
|
this.rawId = id;
|
|
10
|
-
this.header = header
|
|
11
|
-
this.cell =
|
|
9
|
+
this.header = header;
|
|
10
|
+
this.cell =
|
|
11
|
+
cell !== null && cell !== void 0 ? cell : createDataGridColumnDefaultRender();
|
|
12
12
|
this.footer = footer;
|
|
13
13
|
this.accessor = accessor;
|
|
14
14
|
this.name = name;
|
|
@@ -27,9 +27,6 @@ var DataGridColumn = /** @class */ (function () {
|
|
|
27
27
|
available: availableSorting,
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
DataGridColumn.prototype.setContext = function (context) {
|
|
31
|
-
this.context = context;
|
|
32
|
-
};
|
|
33
30
|
Object.defineProperty(DataGridColumn.prototype, "id", {
|
|
34
31
|
get: function () {
|
|
35
32
|
if (this.root) {
|
|
@@ -43,24 +40,6 @@ var DataGridColumn = /** @class */ (function () {
|
|
|
43
40
|
DataGridColumn.prototype.setRoot = function (root) {
|
|
44
41
|
this.root = root;
|
|
45
42
|
};
|
|
46
|
-
DataGridColumn.prototype.createDateFilter = function (params) {
|
|
47
|
-
return this.context.createDateFilter(__assign(__assign({}, params), { column: this }));
|
|
48
|
-
};
|
|
49
|
-
DataGridColumn.prototype.createSelectFilter = function (params) {
|
|
50
|
-
return this.context.createSelectFilter(__assign(__assign({}, params), { column: this }));
|
|
51
|
-
};
|
|
52
|
-
DataGridColumn.prototype.createNumberFilter = function (params) {
|
|
53
|
-
return this.context.createNumberFilter(__assign(__assign({}, params), { column: this }));
|
|
54
|
-
};
|
|
55
|
-
DataGridColumn.prototype.createStringFilter = function (params) {
|
|
56
|
-
return this.context.createStringFilter(__assign(__assign({}, params), { column: this }));
|
|
57
|
-
};
|
|
58
|
-
DataGridColumn.prototype.createAutocompleteFilter = function (params) {
|
|
59
|
-
return this.context.createAutocompleteFilter(__assign(__assign({}, params), { column: this }));
|
|
60
|
-
};
|
|
61
|
-
DataGridColumn.prototype.createAutocompleteListCardFilter = function (params) {
|
|
62
|
-
return this.context.createAutocompleteListCardFilter(__assign(__assign({}, params), { column: this }));
|
|
63
|
-
};
|
|
64
43
|
Object.defineProperty(DataGridColumn.prototype, "depth", {
|
|
65
44
|
get: function () {
|
|
66
45
|
if (this.root) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DataGridCellItem } from '../../../ui/cells/DataGridCellItem';
|
|
3
|
+
export var createDataGridColumnDefaultRender = function () {
|
|
4
|
+
var Component = function (_a) {
|
|
5
|
+
var data = _a.data, column = _a.column;
|
|
6
|
+
return (React.createElement(DataGridCellItem, { align: column.align }, String(data)));
|
|
7
|
+
};
|
|
8
|
+
return Component;
|
|
9
|
+
};
|
|
@@ -8,17 +8,14 @@ var DataGridStoreFilter = /** @class */ (function () {
|
|
|
8
8
|
this.id = filter.id;
|
|
9
9
|
this.rawName = filter.name;
|
|
10
10
|
this.group = filter.group;
|
|
11
|
-
this.column = null;
|
|
12
11
|
makeObservable(this, {
|
|
13
12
|
id: observable,
|
|
14
13
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
15
14
|
// @ts-expect-error
|
|
16
15
|
rawName: observable,
|
|
17
|
-
column: observable,
|
|
18
16
|
group: observable,
|
|
19
17
|
context: observable,
|
|
20
18
|
setGroup: action,
|
|
21
|
-
setColumn: action,
|
|
22
19
|
setValue: action,
|
|
23
20
|
setLocalValue: action,
|
|
24
21
|
setAllFilterValue: action,
|
|
@@ -102,9 +99,6 @@ var DataGridStoreFilter = /** @class */ (function () {
|
|
|
102
99
|
DataGridStoreFilter.prototype.setGroup = function (group) {
|
|
103
100
|
this.group = group;
|
|
104
101
|
};
|
|
105
|
-
DataGridStoreFilter.prototype.setColumn = function (column) {
|
|
106
|
-
this.column = column;
|
|
107
|
-
};
|
|
108
102
|
Object.defineProperty(DataGridStoreFilter.prototype, "isEditedLocal", {
|
|
109
103
|
get: function () {
|
|
110
104
|
return !this.isEqualValues(this.localValue, this.value);
|
|
@@ -145,9 +139,6 @@ var DataGridStoreFilter = /** @class */ (function () {
|
|
|
145
139
|
if (this.rawName) {
|
|
146
140
|
return this.rawName;
|
|
147
141
|
}
|
|
148
|
-
if (this.column) {
|
|
149
|
-
return this.column.name;
|
|
150
|
-
}
|
|
151
142
|
return this.id;
|
|
152
143
|
},
|
|
153
144
|
enumerable: false,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
var DataGridTableFilter = /** @class */ (function () {
|
|
3
3
|
function DataGridTableFilter(_a) {
|
|
4
|
-
var id = _a.id,
|
|
5
|
-
this.
|
|
6
|
-
this.id = "filter_".concat(this.column ? "".concat(this.column.id, ".") : '').concat(id);
|
|
4
|
+
var id = _a.id, name = _a.name, group = _a.group, render = _a.render;
|
|
5
|
+
this.id = "filter_".concat(id);
|
|
7
6
|
this.name = name !== null && name !== void 0 ? name : null;
|
|
8
7
|
this.group = group !== null && group !== void 0 ? group : 'main';
|
|
9
8
|
this.render = render !== null && render !== void 0 ? render : null;
|
|
@@ -60,14 +60,6 @@ var DataGridStore = /** @class */ (function () {
|
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
_this.filters.addFilter(createdFilter);
|
|
63
|
-
if (!filter.column) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
var storeColumn = _this.findColumn(filter.column);
|
|
67
|
-
if (!storeColumn) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
createdFilter.setColumn(storeColumn);
|
|
71
63
|
});
|
|
72
64
|
this.setData(data);
|
|
73
65
|
this.recalculate();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -35,7 +35,13 @@ export var DataGridHeadFoot = dataGridObserver(function (_a) {
|
|
|
35
35
|
isSubRowEnabled && store.subRows.isLeft && (React.createElement(DataGridHeadFootExpand, null)),
|
|
36
36
|
nodes.map(function (node) {
|
|
37
37
|
var render = isFoot ? node.footer : node.header;
|
|
38
|
-
var rendered =
|
|
38
|
+
var rendered = (function () {
|
|
39
|
+
if (isFunction(render)) {
|
|
40
|
+
var Component = render;
|
|
41
|
+
return React.createElement(Component, null);
|
|
42
|
+
}
|
|
43
|
+
return render;
|
|
44
|
+
})();
|
|
39
45
|
var isGroup = node instanceof DataGridStoreColumnsGroup;
|
|
40
46
|
return (React.createElement(Fragment, { key: node.id },
|
|
41
47
|
isGroup &&
|
|
@@ -20,10 +20,20 @@ var UnwrappedDataGridPagination = forwardRef(function (_a, ref) {
|
|
|
20
20
|
if (!pagination.isEnabled) {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
-
var renderedBeforeText =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
var renderedBeforeText = (function () {
|
|
24
|
+
if (isFunction(beforeText)) {
|
|
25
|
+
var Component = beforeText;
|
|
26
|
+
return React.createElement(Component, null);
|
|
27
|
+
}
|
|
28
|
+
return beforeText;
|
|
29
|
+
})();
|
|
30
|
+
var renderedAfterText = (function () {
|
|
31
|
+
if (isFunction(afterText)) {
|
|
32
|
+
var Component = afterText;
|
|
33
|
+
return React.createElement(Component, { total: pagination.total });
|
|
34
|
+
}
|
|
35
|
+
return afterText;
|
|
36
|
+
})();
|
|
27
37
|
return (React.createElement(Stack, { ref: ref, className: cnDataGridPagination('', [className]), justify: "spaceBetween", align: "center", fullWidth: true },
|
|
28
38
|
React.createElement(Pagination, { totalCount: pagination.total, page: pagination.index, pageSize: pagination.pageSize, size: "s", onPageChange: function (page) { return pagination.setIndex(page); }, disabled: store.isLoading }),
|
|
29
39
|
pagination.isAvailableSizeEnabled && (React.createElement(Stack, { gap: "s", align: "center" },
|
|
@@ -19,9 +19,13 @@ export var DataGridRow = dataGridObserver(function (_a) {
|
|
|
19
19
|
store.columns.map(function (column) {
|
|
20
20
|
var cell = column.cell;
|
|
21
21
|
var value = column.accessor(row, index);
|
|
22
|
-
var renderedCell =
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
var renderedCell = (function () {
|
|
23
|
+
if (isFunction(cell)) {
|
|
24
|
+
var Component = cell;
|
|
25
|
+
return (React.createElement(Component, { key: "".concat(column.id, "-").concat(index), data: value, item: row, index: index, column: column }));
|
|
26
|
+
}
|
|
27
|
+
return cell;
|
|
28
|
+
})();
|
|
25
29
|
var cellComponent = (function () {
|
|
26
30
|
if (isString(renderedCell) || isNumber(renderedCell)) {
|
|
27
31
|
return (React.createElement(DataGridCellItem, { align: column.align }, renderedCell));
|
|
@@ -23,7 +23,7 @@ export var DataGridSubRow = dataGridObserver(function (_a) {
|
|
|
23
23
|
? store.subRows.getIsExpandedRoot(id)
|
|
24
24
|
: !!((_c = subRow.root) === null || _c === void 0 ? void 0 : _c.getIsExpanded(id));
|
|
25
25
|
var canExpand = subRow.canExpand;
|
|
26
|
-
var
|
|
26
|
+
var Component = subRow.render;
|
|
27
27
|
var expandButton = (React.createElement(IconButton, { icon: subRow.getIsExpanded(id) ? ChevronUpIcon : ChevronDownIcon, size: "s", onClick: function () {
|
|
28
28
|
subRow.toggle(id);
|
|
29
29
|
}, compressed: true }));
|
|
@@ -43,7 +43,7 @@ export var DataGridSubRow = dataGridObserver(function (_a) {
|
|
|
43
43
|
canExpand &&
|
|
44
44
|
store.subRows.isLeft &&
|
|
45
45
|
expandButton,
|
|
46
|
-
|
|
46
|
+
React.createElement(Component, { subRow: subRow, index: index, item: row }),
|
|
47
47
|
isSomeRowsVisible &&
|
|
48
48
|
canExpand &&
|
|
49
49
|
store.subRows.isRight &&
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { __assign, __rest } from "tslib";
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
2
3
|
import { Drawer, DrawerBody, DrawerHeader, DrawerSubtitle, DrawerTitle, } from "@ozen-ui/kit/DrawerNext";
|
|
3
4
|
import { Stack } from "@ozen-ui/kit/Stack";
|
|
4
5
|
import { useEventListener } from "@ozen-ui/kit/useEventListener";
|
|
@@ -6,8 +7,8 @@ import { isKey } from '@ozen-ui/kit/utils';
|
|
|
6
7
|
import { dataGridObserver, useDataGridStore } from '../../core';
|
|
7
8
|
import { DataGridFilter } from '../filters';
|
|
8
9
|
import { DataGridAllFiltersDrawerFooter } from './components';
|
|
9
|
-
|
|
10
|
-
var title = _a.title, subTitle = _a.subTitle, applyButton = _a.applyButton, closeButton = _a.closeButton;
|
|
10
|
+
var NonWrappedDataGridAllFiltersDrawer = forwardRef(function (_a, ref) {
|
|
11
|
+
var title = _a.title, subTitle = _a.subTitle, applyButton = _a.applyButton, closeButton = _a.closeButton, onClose = _a.onClose, other = __rest(_a, ["title", "subTitle", "applyButton", "closeButton", "onClose"]);
|
|
11
12
|
var store = useDataGridStore();
|
|
12
13
|
var isOpen = store.modals.isOpen('filters');
|
|
13
14
|
var filters = store.filters;
|
|
@@ -21,7 +22,10 @@ export var DataGridAllFiltersDrawer = dataGridObserver(function (_a) {
|
|
|
21
22
|
store.modals.closeFilters();
|
|
22
23
|
},
|
|
23
24
|
});
|
|
24
|
-
return (React.createElement(Drawer, { open: isOpen, onClose: function () {
|
|
25
|
+
return (React.createElement(Drawer, __assign({}, other, { ref: ref, open: isOpen, onClose: function () {
|
|
26
|
+
store.modals.closeFilters();
|
|
27
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
28
|
+
} }),
|
|
25
29
|
React.createElement(DrawerHeader, null,
|
|
26
30
|
React.createElement(DrawerTitle, null, title),
|
|
27
31
|
subTitle && React.createElement(DrawerSubtitle, null, subTitle)),
|
|
@@ -29,3 +33,5 @@ export var DataGridAllFiltersDrawer = dataGridObserver(function (_a) {
|
|
|
29
33
|
React.createElement(Stack, { direction: "column", gap: "s", fullWidth: true }, filters.filters.map(function (filter) { return (React.createElement(DataGridFilter, { key: filter.id, filter: filter, type: "allFilter" })); }))),
|
|
30
34
|
React.createElement(DataGridAllFiltersDrawerFooter, { applyButton: applyButton, closeButton: closeButton })));
|
|
31
35
|
});
|
|
36
|
+
NonWrappedDataGridAllFiltersDrawer.displayName = 'DataGridAllFiltersDrawer';
|
|
37
|
+
export var DataGridAllFiltersDrawer = dataGridObserver(NonWrappedDataGridAllFiltersDrawer);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { __assign, __read } from "tslib";
|
|
2
|
-
import React, { useMemo, useState } from 'react';
|
|
1
|
+
import { __assign, __read, __rest } from "tslib";
|
|
2
|
+
import React, { forwardRef, useMemo, useState } from 'react';
|
|
3
3
|
import { Checkbox } from "@ozen-ui/kit/CheckboxNext";
|
|
4
4
|
import { Drawer, DrawerBody, DrawerFooter, DrawerFooterButton, DrawerFooterButtonsGroup, DrawerHeader, DrawerSubtitle, DrawerTitle, } from "@ozen-ui/kit/DrawerNext";
|
|
5
5
|
import { FormGroup } from "@ozen-ui/kit/FormGroup";
|
|
6
6
|
import { dataGridObserver, useDataGridStore } from '../../core';
|
|
7
|
-
|
|
8
|
-
var title = _a.title, subTitle = _a.subTitle, closeButton = _a.closeButton, applyButton = _a.applyButton;
|
|
7
|
+
var NonWrappedDataGridSettingsDrawer = forwardRef(function (_a, ref) {
|
|
8
|
+
var title = _a.title, subTitle = _a.subTitle, closeButton = _a.closeButton, applyButton = _a.applyButton, onClose = _a.onClose, other = __rest(_a, ["title", "subTitle", "closeButton", "applyButton", "onClose"]);
|
|
9
9
|
var store = useDataGridStore();
|
|
10
10
|
var isOpen = store.modals.isOpen('columns-settings');
|
|
11
11
|
var columns = store.allColumns;
|
|
@@ -34,14 +34,18 @@ export var DataGridSettingsDrawer = dataGridObserver(function (_a) {
|
|
|
34
34
|
setLocalVisible({});
|
|
35
35
|
}
|
|
36
36
|
}, [isOpen]);
|
|
37
|
-
return (React.createElement(Drawer, { open: isOpen, onClose: function () {
|
|
37
|
+
return (React.createElement(Drawer, __assign({}, other, { ref: ref, open: isOpen, onClose: function () {
|
|
38
|
+
store.modals.closeColumnsSettings();
|
|
39
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
40
|
+
} }),
|
|
38
41
|
React.createElement(DrawerHeader, null,
|
|
39
42
|
React.createElement(DrawerTitle, null, title),
|
|
40
43
|
subTitle && React.createElement(DrawerSubtitle, null, subTitle)),
|
|
41
44
|
React.createElement(DrawerBody, null,
|
|
42
45
|
React.createElement(FormGroup, { size: "l", direction: "column" }, columns.map(function (column) {
|
|
43
46
|
var checked = checkIsSelected(column);
|
|
44
|
-
|
|
47
|
+
var NameComponent = column.name;
|
|
48
|
+
return (React.createElement(Checkbox, { key: column.id, label: React.createElement(NameComponent, null), checked: checked, disabled: isLeftAlone && checked, size: "l", onChange: function (event) {
|
|
45
49
|
setLocalVisible(function (previousVisible) {
|
|
46
50
|
var _a;
|
|
47
51
|
return (__assign(__assign({}, previousVisible), (_a = {}, _a[column.id] = event.target.checked, _a)));
|
|
@@ -58,3 +62,5 @@ export var DataGridSettingsDrawer = dataGridObserver(function (_a) {
|
|
|
58
62
|
store.modals.closeColumnsSettings();
|
|
59
63
|
} }, applyButton)))));
|
|
60
64
|
});
|
|
65
|
+
NonWrappedDataGridSettingsDrawer.displayName = 'DataGridSettingsDrawer';
|
|
66
|
+
export var DataGridSettingsDrawer = dataGridObserver(NonWrappedDataGridSettingsDrawer);
|
|
@@ -6,19 +6,7 @@ import { filterValueToAutocomplete, autocompleteValueToFilter } from './utilts';
|
|
|
6
6
|
export var DataGridAutocompleteFilter = dataGridObserver(function (_a) {
|
|
7
7
|
var filter = _a.filter, type = _a.type, onChange = _a.onChange, onInputChange = _a.onInputChange, style = _a.style, renderMoreTag = _a.renderMoreTag, renderOption = _a.renderOption, searchFunction = _a.searchFunction, other = __rest(_a, ["filter", "type", "onChange", "onInputChange", "style", "renderMoreTag", "renderOption", "searchFunction"]);
|
|
8
8
|
var value = filter.valueByType(type);
|
|
9
|
-
return (React.createElement(Autocomplete, __assign({ disableCloseOnSelect: filter.isMultiple, limitTags: "responsive", label: filter.name }, other, { size: type === 'allFilter' ? 's' : 'xs', options: filter.options, getOptionKey: function (option) { return option.value; }, getOptionLabel: function (option) { return option.label; }, getOptionDisabled: function () { return false; }, multiple: filter.isMultiple, renderMoreTag: renderMoreTag
|
|
10
|
-
? function (props, ref) {
|
|
11
|
-
return renderMoreTag(props, ref);
|
|
12
|
-
}
|
|
13
|
-
: undefined, renderOption: renderOption
|
|
14
|
-
? function (props) {
|
|
15
|
-
return renderOption(props);
|
|
16
|
-
}
|
|
17
|
-
: undefined, searchFunction: searchFunction
|
|
18
|
-
? function (options, searchValue) {
|
|
19
|
-
return searchFunction(options, searchValue);
|
|
20
|
-
}
|
|
21
|
-
: undefined, value: filterValueToAutocomplete(filter, value), style: __assign(__assign({}, style), { minWidth: 200 }), onInputChange: function (event, _value) {
|
|
9
|
+
return (React.createElement(Autocomplete, __assign({ disableCloseOnSelect: filter.isMultiple, limitTags: "responsive", label: filter.name }, other, { size: type === 'allFilter' ? 's' : 'xs', options: filter.options, getOptionKey: function (option) { return option.value; }, getOptionLabel: function (option) { return option.label; }, getOptionDisabled: function () { return false; }, multiple: filter.isMultiple, renderMoreTag: renderMoreTag, renderOption: renderOption, searchFunction: searchFunction, value: filterValueToAutocomplete(filter, value), style: __assign(__assign({}, style), { minWidth: 200 }), onInputChange: function (event, _value) {
|
|
22
10
|
var value = _value !== null && _value !== void 0 ? _value : '';
|
|
23
11
|
onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(event, value);
|
|
24
12
|
}, onChange: function (event, _value) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
import { EventBus } from '../../../shared';
|
|
2
3
|
import type { DataGridStoreColumnsGroup } from '../../columns-group';
|
|
3
4
|
import type { DataGridItem, DataGridColumnCell, DataGridColumnHeader, DataGridColumnAccessor, DataGridColumnFooter } from '../../entities';
|
|
@@ -8,7 +9,7 @@ import type { DataGridStoreColumnEvents, DataGridStoreColumnWidth } from './type
|
|
|
8
9
|
export declare class DataGridStoreColumn<Item extends DataGridItem, AccessorReturn = unknown> {
|
|
9
10
|
id: string;
|
|
10
11
|
cell: DataGridColumnCell<Item, AccessorReturn>;
|
|
11
|
-
name:
|
|
12
|
+
name: () => ReactNode;
|
|
12
13
|
header: DataGridColumnHeader;
|
|
13
14
|
align: DataGridColumnAlign;
|
|
14
15
|
accessor: DataGridColumnAccessor<Item, AccessorReturn>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DataGridItem } from '../../entities';
|
|
3
|
+
import type { DataGridColumn } from '../table';
|
|
4
|
+
import type { DataGridStoreColumn } from './DataGridStoreColumn';
|
|
5
|
+
export declare const createDataGridStoreColumnName: <Item extends DataGridItem, AccessorReturn = unknown>(column: DataGridColumn<Item, AccessorReturn>, storeColumn: DataGridStoreColumn<Item, AccessorReturn>) => () => string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
@@ -1,30 +1,20 @@
|
|
|
1
1
|
import type { DataGridColumnsGroup } from '../../columns-group';
|
|
2
2
|
import type { DataGridColumnAccessor, DataGridColumnCell, DataGridColumnFooter, DataGridColumnHeader, DataGridItem } from '../../entities';
|
|
3
|
-
import type { DataGridFilterOption, DataGridAutocompleteTableFilterParams, DataGridAutocompleteListCardTableFilterParams, DataGridDateTableFilterParams, DataGridNumberTableFilterParams, DataGridStringTableFilterParams, DataGridSelectTableFilterParams } from '../../filter';
|
|
4
|
-
import type { DataGridTable } from '../../table';
|
|
5
3
|
import type { DataGridColumnAlign, DataGridColumnSortSettings, DataGridColumnWidth, DataGridGetColumnWidth } from '../entities';
|
|
6
|
-
import type { DataGridColumnParams } from './types';
|
|
4
|
+
import type { DataGridColumnName, DataGridColumnParams } from './types';
|
|
7
5
|
export declare class DataGridColumn<Item extends DataGridItem, AccessorReturn = unknown> {
|
|
8
6
|
rawId: string;
|
|
9
7
|
header: DataGridColumnHeader;
|
|
10
|
-
name:
|
|
8
|
+
name: DataGridColumnName<Item, AccessorReturn>;
|
|
11
9
|
cell: DataGridColumnCell<Item, AccessorReturn>;
|
|
12
10
|
align: DataGridColumnAlign;
|
|
13
11
|
footer: DataGridColumnFooter | undefined;
|
|
14
12
|
accessor: DataGridColumnAccessor<Item, AccessorReturn>;
|
|
15
13
|
root: DataGridColumnsGroup<Item> | null;
|
|
16
|
-
private context;
|
|
17
14
|
sortSettings: DataGridColumnSortSettings;
|
|
18
15
|
width: DataGridColumnWidth | DataGridGetColumnWidth<Item, AccessorReturn> | null;
|
|
19
16
|
constructor({ id, cell, header, accessor, footer, name, align, sorting, width, }: DataGridColumnParams<Item, AccessorReturn>);
|
|
20
|
-
setContext(context: DataGridTable<Item>): void;
|
|
21
17
|
get id(): string;
|
|
22
18
|
setRoot(root: DataGridColumnsGroup<Item>): void;
|
|
23
|
-
createDateFilter(params: DataGridDateTableFilterParams<Item>): import("../../filter").DataGridDateTableFilter<Item>;
|
|
24
|
-
createSelectFilter<Option extends DataGridFilterOption>(params: DataGridSelectTableFilterParams<Item, Option>): import("../../filter").DataGridSelectTableFilter<Item, Option>;
|
|
25
|
-
createNumberFilter(params: DataGridNumberTableFilterParams<Item>): import("../../filter").DataGridNumberTableFilter<Item>;
|
|
26
|
-
createStringFilter(params: DataGridStringTableFilterParams<Item>): import("../../filter").DataGridStringTableFilter<Item>;
|
|
27
|
-
createAutocompleteFilter<Option extends DataGridFilterOption>(params: DataGridAutocompleteTableFilterParams<Item, Option>): import("../../filter").DataGridAutocompleteTableFilter<Item, Option>;
|
|
28
|
-
createAutocompleteListCardFilter<Option extends DataGridFilterOption>(params: DataGridAutocompleteListCardTableFilterParams<Item, Option>): import("../../filter").DataGridAutocompleteListCardTableFilter<Item, Option>;
|
|
29
19
|
get depth(): number;
|
|
30
20
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
import type { DataGridColumnAccessor, DataGridColumnCell, DataGridColumnFooter, DataGridColumnHeader, DataGridItem } from '../../entities';
|
|
2
3
|
import type { DataGridColumnAlign, DataGridColumnWidth, DataGridGetColumnWidth } from '../entities';
|
|
4
|
+
import type { DataGridStoreColumn } from '../store';
|
|
5
|
+
export type DataGridColumnNameRender<Item extends DataGridItem, AccessorReturn> = (params: {
|
|
6
|
+
column: DataGridStoreColumn<Item, AccessorReturn>;
|
|
7
|
+
}) => ReactNode;
|
|
8
|
+
export type DataGridColumnName<Item extends DataGridItem, AccessorReturn> = ReactNode | DataGridColumnNameRender<Item, AccessorReturn>;
|
|
3
9
|
export type DataGridColumnParams<Item extends DataGridItem, AccessorReturn> = {
|
|
4
10
|
id: string;
|
|
5
11
|
accessor: DataGridColumnAccessor<Item, AccessorReturn>;
|
|
6
|
-
name:
|
|
12
|
+
name: DataGridColumnName<Item, AccessorReturn>;
|
|
7
13
|
header?: DataGridColumnHeader;
|
|
8
14
|
cell?: DataGridColumnCell<Item, AccessorReturn>;
|
|
9
15
|
footer?: DataGridColumnFooter;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { DataGridStoreColumn } from '../column';
|
|
2
3
|
import type { DataGridItem } from './data';
|
|
3
|
-
export type DataGridColumnCellRender<Item extends DataGridItem, AccessorReturn> = (
|
|
4
|
+
export type DataGridColumnCellRender<Item extends DataGridItem, AccessorReturn> = (params: {
|
|
5
|
+
data: AccessorReturn;
|
|
6
|
+
item: Item;
|
|
7
|
+
index: number;
|
|
8
|
+
column: DataGridStoreColumn<Item, AccessorReturn>;
|
|
9
|
+
}) => ReactNode;
|
|
4
10
|
export type DataGridColumnCellNode = ReactNode;
|
|
5
11
|
export type DataGridColumnCell<Item extends DataGridItem, AccessorReturn> = DataGridColumnCellNode | DataGridColumnCellRender<Item, AccessorReturn>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EventBus } from '../../../../shared';
|
|
2
|
-
import type { DataGridStoreColumn } from '../../../column';
|
|
3
2
|
import type { DataGridItem } from '../../../entities';
|
|
4
3
|
import type { DataGridStore } from '../../../store';
|
|
5
4
|
import type { DataGridFilterGroup } from '../../entities';
|
|
@@ -9,7 +8,6 @@ export declare abstract class DataGridStoreFilter<Item extends DataGridItem, Val
|
|
|
9
8
|
id: string;
|
|
10
9
|
protected rawName: string | null;
|
|
11
10
|
protected context: DataGridStore<Item>;
|
|
12
|
-
column: DataGridStoreColumn<Item> | null;
|
|
13
11
|
group: DataGridFilterGroup;
|
|
14
12
|
abstract value: Value;
|
|
15
13
|
abstract localValue: Value;
|
|
@@ -31,7 +29,6 @@ export declare abstract class DataGridStoreFilter<Item extends DataGridItem, Val
|
|
|
31
29
|
setValueByType(value: Value, type: DataGridStoreFilterValueType): void;
|
|
32
30
|
valueByType(type: DataGridStoreFilterValueType): Value;
|
|
33
31
|
setGroup(group: DataGridFilterGroup): void;
|
|
34
|
-
setColumn(column: DataGridStoreColumn<Item>): void;
|
|
35
32
|
get isEditedLocal(): boolean;
|
|
36
33
|
get isEditedAllFilter(): boolean;
|
|
37
34
|
abstract isEqualValues(value1: Value, value2: Value): boolean;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type { DataGridColumn } from '../../../column';
|
|
2
1
|
import type { DataGridItem } from '../../../entities';
|
|
3
2
|
import type { DataGridFilterGroup } from '../../entities';
|
|
4
3
|
import type { DataGridTableFilterParams, DataGridTableFilterRender } from './types';
|
|
5
4
|
export declare abstract class DataGridTableFilter<Item extends DataGridItem, Render extends DataGridTableFilterRender<Item, any> = DataGridTableFilterRender<Item, any>> {
|
|
6
5
|
id: string;
|
|
7
6
|
name: string | null;
|
|
8
|
-
readonly column: DataGridColumn<Item> | null;
|
|
9
7
|
group: DataGridFilterGroup;
|
|
10
8
|
render: Render | null;
|
|
11
|
-
constructor({ id,
|
|
9
|
+
constructor({ id, name, group, render, }: DataGridTableFilterParams<Item, Render>);
|
|
12
10
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { DataGridColumn } from '../../../column';
|
|
3
2
|
import type { DataGridItem } from '../../../entities';
|
|
4
3
|
import type { DataGridStore } from '../../../store';
|
|
5
4
|
import type { DataGridFilterGroup } from '../../entities';
|
|
@@ -13,6 +12,5 @@ export type DataGridTableFilterParams<Item extends DataGridItem, Render extends
|
|
|
13
12
|
id: string;
|
|
14
13
|
group?: DataGridFilterGroup;
|
|
15
14
|
name?: string;
|
|
16
|
-
column?: DataGridColumn<Item>;
|
|
17
15
|
render?: Render;
|
|
18
16
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { DataGridItem } from '../../entities';
|
|
3
|
+
import type { DataGridStoreSubRow } from '../store/sub-row';
|
|
4
|
+
export type DataGridSubRowRender<Item extends DataGridItem> = (params: {
|
|
5
|
+
item: Item;
|
|
6
|
+
index: number;
|
|
7
|
+
subRow: DataGridStoreSubRow<Item>;
|
|
8
|
+
}) => ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
1
|
import { EventBus } from '../../../../shared';
|
|
3
2
|
import type { DataGridItem } from '../../../entities';
|
|
4
3
|
import type { DataGridStore } from '../../../store';
|
|
4
|
+
import type { DataGridSubRowRender } from '../../entities';
|
|
5
5
|
import type { DataGridSubRow } from '../../table';
|
|
6
6
|
import type { DataGridStoreSubRowEvents } from './types';
|
|
7
7
|
export declare class DataGridStoreSubRow<Item extends DataGridItem> {
|
|
@@ -9,7 +9,7 @@ export declare class DataGridStoreSubRow<Item extends DataGridItem> {
|
|
|
9
9
|
root: DataGridStoreSubRow<Item> | null;
|
|
10
10
|
rows: DataGridStoreSubRow<Item>[];
|
|
11
11
|
expandedByRowId: Record<string, boolean>;
|
|
12
|
-
render:
|
|
12
|
+
render: DataGridSubRowRender<Item>;
|
|
13
13
|
context: DataGridStore<Item>;
|
|
14
14
|
eventBus: EventBus<DataGridStoreSubRowEvents<Item>>;
|
|
15
15
|
private readonly getIsVisible;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
1
|
import type { DataGridItem } from '../../entities';
|
|
2
|
+
import type { DataGridSubRowRender } from '../entities';
|
|
3
3
|
import type { DataGridSubRowParams } from './types';
|
|
4
4
|
export declare class DataGridSubRow<Item extends DataGridItem> {
|
|
5
5
|
rawId: string;
|
|
6
6
|
root: DataGridSubRow<Item> | null;
|
|
7
7
|
subRows: DataGridSubRow<Item>[];
|
|
8
|
-
render:
|
|
8
|
+
render: DataGridSubRowRender<Item>;
|
|
9
9
|
isVisible: (item: Item, index: number) => boolean;
|
|
10
10
|
constructor({ id, render, isVisible }: DataGridSubRowParams<Item>);
|
|
11
11
|
get id(): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
1
|
import type { DataGridItem } from '../../entities';
|
|
2
|
+
import type { DataGridSubRowRender } from '../entities';
|
|
3
3
|
export type DataGridSubRowParams<Item extends DataGridItem> = {
|
|
4
4
|
id: string;
|
|
5
|
-
render:
|
|
5
|
+
render: DataGridSubRowRender<Item>;
|
|
6
6
|
isVisible?: (item: Item, index: number) => boolean;
|
|
7
7
|
};
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export declare const DataGridAllFiltersDrawer: React.MemoExoticComponent<React.ForwardRefExoticComponent<(Omit<{
|
|
3
|
+
title: string;
|
|
4
|
+
subTitle?: string;
|
|
5
|
+
closeButton: string;
|
|
6
|
+
applyButton: string;
|
|
7
|
+
} & Omit<import("@ozen-ui/kit/DrawerNext").DrawerDeviceTypeProps<"mobile">, "children" | "open"> & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<{
|
|
8
|
+
title: string;
|
|
9
|
+
subTitle?: string;
|
|
10
|
+
closeButton: string;
|
|
11
|
+
applyButton: string;
|
|
12
|
+
} & Omit<import("@ozen-ui/kit/DrawerNext").DrawerDeviceTypeProps<"desktop">, "children" | "open"> & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<{
|
|
13
|
+
title: string;
|
|
14
|
+
subTitle?: string;
|
|
15
|
+
closeButton: string;
|
|
16
|
+
applyButton: string;
|
|
17
|
+
} & Omit<import("@ozen-ui/kit/DrawerNext").DrawerDeviceTypeProps<undefined>, "children" | "open"> & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>>>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { DrawerRef, DrawerOmittedProps } from "@ozen-ui/kit/DrawerNext";
|
|
2
|
+
export type DataGridAllFiltersDrawerRef = DrawerRef;
|
|
1
3
|
export type DataGridAllFiltersDrawerProps = {
|
|
2
4
|
title: string;
|
|
3
5
|
subTitle?: string;
|
|
4
6
|
closeButton: string;
|
|
5
7
|
applyButton: string;
|
|
6
|
-
}
|
|
8
|
+
} & DrawerOmittedProps<'children' | 'open'>;
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export declare const DataGridSettingsDrawer: React.MemoExoticComponent<React.ForwardRefExoticComponent<(Omit<{
|
|
3
|
+
title: string;
|
|
4
|
+
subTitle?: string;
|
|
5
|
+
closeButton: string;
|
|
6
|
+
applyButton: string;
|
|
7
|
+
open?: never;
|
|
8
|
+
children?: never;
|
|
9
|
+
} & Omit<import("@ozen-ui/kit/DrawerNext").DrawerDeviceTypeProps<"mobile">, "children" | "open"> & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<{
|
|
10
|
+
title: string;
|
|
11
|
+
subTitle?: string;
|
|
12
|
+
closeButton: string;
|
|
13
|
+
applyButton: string;
|
|
14
|
+
open?: never;
|
|
15
|
+
children?: never;
|
|
16
|
+
} & Omit<import("@ozen-ui/kit/DrawerNext").DrawerDeviceTypeProps<"desktop">, "children" | "open"> & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<{
|
|
17
|
+
title: string;
|
|
18
|
+
subTitle?: string;
|
|
19
|
+
closeButton: string;
|
|
20
|
+
applyButton: string;
|
|
21
|
+
open?: never;
|
|
22
|
+
children?: never;
|
|
23
|
+
} & Omit<import("@ozen-ui/kit/DrawerNext").DrawerDeviceTypeProps<undefined>, "children" | "open"> & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>>>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import type { DrawerOmittedProps, DrawerRef } from "@ozen-ui/kit/DrawerNext";
|
|
2
|
+
export type DataGridSettingsDrawerRef = DrawerRef;
|
|
1
3
|
export type DataGridSettingsDrawerProps = {
|
|
2
4
|
title: string;
|
|
3
5
|
subTitle?: string;
|
|
4
6
|
closeButton: string;
|
|
5
7
|
applyButton: string;
|
|
6
|
-
|
|
8
|
+
open?: never;
|
|
9
|
+
children?: never;
|
|
10
|
+
} & DrawerOmittedProps<'children' | 'open'>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ozen-ui/data-grid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.0",
|
|
4
4
|
"description": "React DataGrid library",
|
|
5
5
|
"files": [
|
|
6
6
|
"*"
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"lodash.sortby": "^4.7.0",
|
|
29
29
|
"mobx": "6.13.7",
|
|
30
30
|
"mobx-react-lite": "4.1.0",
|
|
31
|
-
"@ozen-ui/fonts": "0.
|
|
32
|
-
"@ozen-ui/
|
|
33
|
-
"@ozen-ui/
|
|
34
|
-
"@ozen-ui/
|
|
31
|
+
"@ozen-ui/fonts": "0.78.0",
|
|
32
|
+
"@ozen-ui/icons": "0.78.0",
|
|
33
|
+
"@ozen-ui/logger": "0.78.0",
|
|
34
|
+
"@ozen-ui/kit": "0.78.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/lodash.clonedeep": "^4.5.0",
|
|
@@ -40,9 +40,7 @@
|
|
|
40
40
|
"@types/lodash.sortby": "^4.7.9",
|
|
41
41
|
"@types/node": "^20.14.7",
|
|
42
42
|
"@types/react-syntax-highlighter": "15.5.13",
|
|
43
|
-
"fs-extra": "^11.1.1"
|
|
44
|
-
"react-syntax-highlighter": "15.6.1",
|
|
45
|
-
"ts-patch": "3.3.0"
|
|
43
|
+
"fs-extra": "^11.1.1"
|
|
46
44
|
},
|
|
47
45
|
"peerDependencies": {
|
|
48
46
|
"react": ">=18.0.0 <19.0.0",
|