@thzero/library_client_svelte 0.14.2 → 0.14.6
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/package.json +9 -9
- package/utility/index.js +0 -37
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thzero/library_client_svelte",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.6",
|
|
4
4
|
"version_major": 0,
|
|
5
5
|
"version_minor": 14,
|
|
6
|
-
"version_patch":
|
|
7
|
-
"version_date": "
|
|
6
|
+
"version_patch": 6,
|
|
7
|
+
"version_date": "10/02/2021",
|
|
8
8
|
"description": "An opinionated library of common functionality to bootstrap a Svelte based SPA application.",
|
|
9
9
|
"author": "thZero",
|
|
10
10
|
"license": "MIT",
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@thzero/library_common": "^0.
|
|
25
|
+
"@thzero/library_common": "^0.14",
|
|
26
26
|
"@thzero/library_client": "^0.14",
|
|
27
27
|
"async-mutex": "^0.3.2",
|
|
28
28
|
"mitt": "^3.0.0",
|
|
29
|
-
"svelte-i18n": "^3.3.
|
|
29
|
+
"svelte-i18n": "^3.3.12"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@thzero/library_cli": "^0.13.
|
|
32
|
+
"@thzero/library_cli": "^0.13.19"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@alienfast/i18next-loader": "^1
|
|
36
|
-
"@mdi/font": "^
|
|
37
|
-
"material-design-icons-iconfont": "^6
|
|
35
|
+
"@alienfast/i18next-loader": "^1",
|
|
36
|
+
"@mdi/font": "^6",
|
|
37
|
+
"material-design-icons-iconfont": "^6",
|
|
38
38
|
"svelte": "^3"
|
|
39
39
|
}
|
|
40
40
|
}
|
package/utility/index.js
CHANGED
|
@@ -72,43 +72,6 @@ class Utility {
|
|
|
72
72
|
|
|
73
73
|
GlobalUtility.$navRouter.push('/');
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
static randomKeyGen() {
|
|
77
|
-
const high = 100000000000;
|
|
78
|
-
const low = 0;
|
|
79
|
-
return Math.floor(Math.random() * (high - low) + low);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
static selectBlank(array, prompt) {
|
|
83
|
-
if (!array)
|
|
84
|
-
return array;
|
|
85
|
-
|
|
86
|
-
prompt = prompt ? '<' + prompt + '>' : '';
|
|
87
|
-
|
|
88
|
-
const temp = array.slice(0);
|
|
89
|
-
temp.unshift({ id: null, name: prompt });
|
|
90
|
-
return temp;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
static updateArrayById(array, object) {
|
|
94
|
-
if (!object)
|
|
95
|
-
return;
|
|
96
|
-
|
|
97
|
-
// let index = array.findIndex(function(element) {
|
|
98
|
-
// return element && element.id == object.id
|
|
99
|
-
// })
|
|
100
|
-
// if (index === -1)
|
|
101
|
-
// array.push(object)
|
|
102
|
-
// else
|
|
103
|
-
// array[index] = object
|
|
104
|
-
|
|
105
|
-
// return array
|
|
106
|
-
const result = [
|
|
107
|
-
...array.filter(element => element.id !== object.id),
|
|
108
|
-
object
|
|
109
|
-
];
|
|
110
|
-
return result;
|
|
111
|
-
}
|
|
112
75
|
}
|
|
113
76
|
|
|
114
77
|
export default Utility;
|