@powfix/core-js 0.30.0 → 0.30.1
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.
|
@@ -82,8 +82,8 @@ var SortUtils = /*#__PURE__*/ function(_shared_SortUtils) {
|
|
|
82
82
|
}
|
|
83
83
|
_create_class(SortUtils, null, [
|
|
84
84
|
{
|
|
85
|
-
key: "
|
|
86
|
-
value: function
|
|
85
|
+
key: "toGridSortItem",
|
|
86
|
+
value: function toGridSortItem(item) {
|
|
87
87
|
return {
|
|
88
88
|
field: item.field,
|
|
89
89
|
sort: item.direction
|
|
@@ -91,9 +91,24 @@ var SortUtils = /*#__PURE__*/ function(_shared_SortUtils) {
|
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
|
-
key: "
|
|
95
|
-
value: function
|
|
96
|
-
return items.map(this.
|
|
94
|
+
key: "toGridSortModel",
|
|
95
|
+
value: function toGridSortModel(items) {
|
|
96
|
+
return items.map(this.toGridSortItem);
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
key: "fromGridSortItem",
|
|
101
|
+
value: function fromGridSortItem(item) {
|
|
102
|
+
return {
|
|
103
|
+
field: item.field,
|
|
104
|
+
direction: item.sort
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
key: "fromGridSortModel",
|
|
110
|
+
value: function fromGridSortModel(model) {
|
|
111
|
+
return model.map(this.fromGridSortItem);
|
|
97
112
|
}
|
|
98
113
|
}
|
|
99
114
|
]);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { SortItem, SortUtils as BaseSortUtils } from "../../shared/index.js";
|
|
2
2
|
import type { GridSortModel } from "@mui/x-data-grid";
|
|
3
3
|
export declare class SortUtils extends BaseSortUtils {
|
|
4
|
-
static
|
|
5
|
-
static
|
|
4
|
+
static toGridSortItem<TField extends string = string>(item: SortItem<TField>): GridSortModel[number];
|
|
5
|
+
static toGridSortModel<TField extends string = string>(items: SortItem<TField>[]): GridSortModel;
|
|
6
|
+
static fromGridSortItem(item: GridSortModel[number]): SortItem;
|
|
7
|
+
static fromGridSortModel(model: GridSortModel): SortItem[];
|
|
6
8
|
}
|
|
@@ -82,8 +82,8 @@ var SortUtils = /*#__PURE__*/ function(SortUtils$1) {
|
|
|
82
82
|
}
|
|
83
83
|
_create_class(SortUtils, null, [
|
|
84
84
|
{
|
|
85
|
-
key: "
|
|
86
|
-
value: function
|
|
85
|
+
key: "toGridSortItem",
|
|
86
|
+
value: function toGridSortItem(item) {
|
|
87
87
|
return {
|
|
88
88
|
field: item.field,
|
|
89
89
|
sort: item.direction
|
|
@@ -91,9 +91,24 @@ var SortUtils = /*#__PURE__*/ function(SortUtils$1) {
|
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
|
-
key: "
|
|
95
|
-
value: function
|
|
96
|
-
return items.map(this.
|
|
94
|
+
key: "toGridSortModel",
|
|
95
|
+
value: function toGridSortModel(items) {
|
|
96
|
+
return items.map(this.toGridSortItem);
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
key: "fromGridSortItem",
|
|
101
|
+
value: function fromGridSortItem(item) {
|
|
102
|
+
return {
|
|
103
|
+
field: item.field,
|
|
104
|
+
direction: item.sort
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
key: "fromGridSortModel",
|
|
110
|
+
value: function fromGridSortModel(model) {
|
|
111
|
+
return model.map(this.fromGridSortItem);
|
|
97
112
|
}
|
|
98
113
|
}
|
|
99
114
|
]);
|