@k-int/stripes-kint-components 2.1.0 → 2.1.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
## 2.1
|
|
1
|
+
## 2.2.1 2022-03-10
|
|
2
|
+
* Fix -- GenerateQueryParams no longer assumes you want EITHER nsValues filters or options filters, it simply adds both to the params array
|
|
3
|
+
## 2.1.0 2022-03-09
|
|
2
4
|
* Fixes for ActionList
|
|
3
5
|
* When no formatter is present, it no longer crashes
|
|
4
6
|
* Formatting for buttons
|
|
@@ -96,7 +96,9 @@ var generateKiwtQueryParams = function generateKiwtQueryParams(options, nsValues
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
|
-
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (filters) {
|
|
100
102
|
var filterMap = {};
|
|
101
103
|
filters.split(',').forEach(function (filter) {
|
|
102
104
|
var _filter$trim;
|
|
@@ -143,7 +145,9 @@ var generateKiwtQueryParams = function generateKiwtQueryParams(options, nsValues
|
|
|
143
145
|
paramsArray.push("sort=".concat(os.path, ";").concat((_os$direction = os.direction) !== null && _os$direction !== void 0 ? _os$direction : 'asc'));
|
|
144
146
|
}
|
|
145
147
|
});
|
|
146
|
-
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (sort) {
|
|
147
151
|
var _sort$trim;
|
|
148
152
|
|
|
149
153
|
paramsArray.push.apply(paramsArray, _toConsumableArray((_sort$trim = sort.trim()) === null || _sort$trim === void 0 ? void 0 : _sort$trim.split(',').map(function (sortKey) {
|
package/package.json
CHANGED
|
@@ -6,14 +6,12 @@ const generateKiwtQueryParams = (options, nsValues) => {
|
|
|
6
6
|
filterKeys = {},
|
|
7
7
|
sortKeys = {},
|
|
8
8
|
stats = true,
|
|
9
|
-
/*
|
|
10
|
-
* Of the form [{ path: 'this.is.some.path', direction: 'asc'/'desc', value: 'someOverrideValue'}, ...]
|
|
9
|
+
/* Of the form [{ path: 'this.is.some.path', direction: 'asc'/'desc', value: 'someOverrideValue'}, ...]
|
|
11
10
|
* If only path is passed then assume asc.
|
|
12
11
|
* If value is passed then we ignore path/direction and append "sort=${value}" directly
|
|
13
12
|
*/
|
|
14
13
|
sort: optionsSort,
|
|
15
|
-
|
|
16
|
-
* Of the form
|
|
14
|
+
/* Of the form
|
|
17
15
|
[
|
|
18
16
|
{
|
|
19
17
|
path: 'this.is.some.path'
|
|
@@ -62,7 +60,9 @@ const generateKiwtQueryParams = (options, nsValues) => {
|
|
|
62
60
|
}
|
|
63
61
|
}
|
|
64
62
|
});
|
|
65
|
-
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (filters) {
|
|
66
66
|
const filterMap = {};
|
|
67
67
|
filters.split(',').forEach(filter => {
|
|
68
68
|
const [filterName, ...filterRest] = filter.trim()?.split('.');
|
|
@@ -94,7 +94,9 @@ const generateKiwtQueryParams = (options, nsValues) => {
|
|
|
94
94
|
paramsArray.push(`sort=${os.path};${os.direction ?? 'asc'}`);
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
|
-
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (sort) {
|
|
98
100
|
paramsArray.push(...sort.trim()?.split(',').map(sortKey => {
|
|
99
101
|
const descending = sortKey.startsWith('-');
|
|
100
102
|
let term = sortKey.replace('-', '');
|