@trackunit/react-core-contexts-api 1.0.4 → 1.0.7
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/index.cjs.js +2 -3
- package/index.esm.js +2 -3
- package/package.json +3 -3
package/index.cjs.js
CHANGED
@@ -22,7 +22,7 @@ const TimeZonePreference = {
|
|
22
22
|
* @returns {*} {Event<T>}
|
23
23
|
*/
|
24
24
|
const createEvent = (event) => ({
|
25
|
-
description: event
|
25
|
+
description: event?.description,
|
26
26
|
properties: {},
|
27
27
|
});
|
28
28
|
|
@@ -83,7 +83,6 @@ const stringToEnum = {
|
|
83
83
|
* @returns {AssetSortByProperty.Activity} The AssetSortByProperty enum value or the default value (AssetSortByProperty.Activity)
|
84
84
|
*/
|
85
85
|
const validateStringAsAssetSortByProperty = (input) => {
|
86
|
-
var _a;
|
87
86
|
const fallback = exports.AssetSortByProperty.Activity;
|
88
87
|
if (!input) {
|
89
88
|
return { sortBy: fallback };
|
@@ -95,7 +94,7 @@ const validateStringAsAssetSortByProperty = (input) => {
|
|
95
94
|
customFieldDefinitionId: input,
|
96
95
|
};
|
97
96
|
}
|
98
|
-
return { sortBy:
|
97
|
+
return { sortBy: stringToEnum[input] ?? fallback };
|
99
98
|
};
|
100
99
|
exports.SortOrder = void 0;
|
101
100
|
(function (SortOrder) {
|
package/index.esm.js
CHANGED
@@ -20,7 +20,7 @@ const TimeZonePreference = {
|
|
20
20
|
* @returns {*} {Event<T>}
|
21
21
|
*/
|
22
22
|
const createEvent = (event) => ({
|
23
|
-
description: event
|
23
|
+
description: event?.description,
|
24
24
|
properties: {},
|
25
25
|
});
|
26
26
|
|
@@ -81,7 +81,6 @@ const stringToEnum = {
|
|
81
81
|
* @returns {AssetSortByProperty.Activity} The AssetSortByProperty enum value or the default value (AssetSortByProperty.Activity)
|
82
82
|
*/
|
83
83
|
const validateStringAsAssetSortByProperty = (input) => {
|
84
|
-
var _a;
|
85
84
|
const fallback = AssetSortByProperty.Activity;
|
86
85
|
if (!input) {
|
87
86
|
return { sortBy: fallback };
|
@@ -93,7 +92,7 @@ const validateStringAsAssetSortByProperty = (input) => {
|
|
93
92
|
customFieldDefinitionId: input,
|
94
93
|
};
|
95
94
|
}
|
96
|
-
return { sortBy:
|
95
|
+
return { sortBy: stringToEnum[input] ?? fallback };
|
97
96
|
};
|
98
97
|
var SortOrder;
|
99
98
|
(function (SortOrder) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@trackunit/react-core-contexts-api",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.7",
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"engines": {
|
@@ -8,8 +8,8 @@
|
|
8
8
|
},
|
9
9
|
"dependencies": {
|
10
10
|
"jest-fetch-mock": "^3.0.3",
|
11
|
-
"@trackunit/shared-utils": "^1.
|
12
|
-
"@trackunit/geo-json-utils": "^1.0.
|
11
|
+
"@trackunit/shared-utils": "^1.1.1",
|
12
|
+
"@trackunit/geo-json-utils": "^1.0.3"
|
13
13
|
},
|
14
14
|
"module": "./index.esm.js",
|
15
15
|
"main": "./index.cjs.js",
|