@iankibetsh/shframework 4.6.8 → 4.6.9
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/dist/dist/library.mjs.css +32 -32
- package/dist/library.js +20 -23
- package/dist/library.mjs +20 -23
- package/package.json +1 -1
|
@@ -1,36 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
.colored-toast.swal2-icon-success {
|
|
3
|
-
background-color: #a5dc86 !important;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.colored-toast.swal2-icon-error {
|
|
7
|
-
background-color: #f27474 !important;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.colored-toast.swal2-icon-warning {
|
|
11
|
-
background-color: #f8bb86 !important;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.colored-toast.swal2-icon-info {
|
|
15
|
-
background-color: #3fc3ee !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.colored-toast.swal2-icon-question {
|
|
19
|
-
background-color: #87adbd !important;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.colored-toast .swal2-title {
|
|
23
|
-
color: white;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.colored-toast .swal2-close {
|
|
27
|
-
color: white;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.colored-toast .swal2-html-container {
|
|
31
|
-
color: white;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
2
|
.sh-phone{
|
|
35
3
|
display: flex;
|
|
36
4
|
width: 100%;
|
|
@@ -63,6 +31,38 @@
|
|
|
63
31
|
opacity: 0.5;
|
|
64
32
|
}
|
|
65
33
|
|
|
34
|
+
.colored-toast.swal2-icon-success {
|
|
35
|
+
background-color: #a5dc86 !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.colored-toast.swal2-icon-error {
|
|
39
|
+
background-color: #f27474 !important;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.colored-toast.swal2-icon-warning {
|
|
43
|
+
background-color: #f8bb86 !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.colored-toast.swal2-icon-info {
|
|
47
|
+
background-color: #3fc3ee !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.colored-toast.swal2-icon-question {
|
|
51
|
+
background-color: #87adbd !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.colored-toast .swal2-title {
|
|
55
|
+
color: white;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.colored-toast .swal2-close {
|
|
59
|
+
color: white;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.colored-toast .swal2-html-container {
|
|
63
|
+
color: white;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
66
|
.permissions-main {
|
|
67
67
|
background: #edeff2;
|
|
68
68
|
}
|
package/dist/library.js
CHANGED
|
@@ -7354,32 +7354,29 @@ const useShFetch = (url, path, cacheKey) => {
|
|
|
7354
7354
|
status.value = 'loading';
|
|
7355
7355
|
if (cacheKey && shStorage.getItem(cacheKey)) {
|
|
7356
7356
|
data.value = shStorage.getItem(cacheKey);
|
|
7357
|
+
}
|
|
7358
|
+
shApis.doGet(dataUrl ?? url).then(response => {
|
|
7357
7359
|
status.value = 'success';
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
if (path) {
|
|
7364
|
-
let pathArr = path.split('.');
|
|
7365
|
-
for (let i = 0; i < pathArr.length; i++) {
|
|
7366
|
-
res = res[pathArr[i]];
|
|
7367
|
-
}
|
|
7368
|
-
}
|
|
7369
|
-
data.value = res;
|
|
7370
|
-
if (cacheKey) {
|
|
7371
|
-
shStorage.setItem(cacheKey, res);
|
|
7360
|
+
let res = response.data;
|
|
7361
|
+
if (path) {
|
|
7362
|
+
let pathArr = path.split('.');
|
|
7363
|
+
for (let i = 0; i < pathArr.length; i++) {
|
|
7364
|
+
res = res[pathArr[i]];
|
|
7372
7365
|
}
|
|
7366
|
+
}
|
|
7367
|
+
data.value = res;
|
|
7368
|
+
if (cacheKey) {
|
|
7369
|
+
shStorage.setItem(cacheKey, res);
|
|
7370
|
+
}
|
|
7371
|
+
})
|
|
7372
|
+
.catch(res => {
|
|
7373
|
+
status.value = 'error';
|
|
7374
|
+
error.value = res.message ? res.message : (res.error ? res.error : 'An unexpected error occurred');
|
|
7375
|
+
shRepo.showToast(error.value, 'error');
|
|
7373
7376
|
})
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
shRepo.showToast(error.value, 'error');
|
|
7378
|
-
})
|
|
7379
|
-
.finally(() => {
|
|
7380
|
-
loading.value = false;
|
|
7381
|
-
});
|
|
7382
|
-
}
|
|
7377
|
+
.finally(() => {
|
|
7378
|
+
loading.value = false;
|
|
7379
|
+
});
|
|
7383
7380
|
};
|
|
7384
7381
|
|
|
7385
7382
|
return {
|
package/dist/library.mjs
CHANGED
|
@@ -7342,32 +7342,29 @@ const useShFetch = (url, path, cacheKey) => {
|
|
|
7342
7342
|
status.value = 'loading';
|
|
7343
7343
|
if (cacheKey && shStorage.getItem(cacheKey)) {
|
|
7344
7344
|
data.value = shStorage.getItem(cacheKey);
|
|
7345
|
+
}
|
|
7346
|
+
shApis.doGet(dataUrl ?? url).then(response => {
|
|
7345
7347
|
status.value = 'success';
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
if (path) {
|
|
7352
|
-
let pathArr = path.split('.');
|
|
7353
|
-
for (let i = 0; i < pathArr.length; i++) {
|
|
7354
|
-
res = res[pathArr[i]];
|
|
7355
|
-
}
|
|
7356
|
-
}
|
|
7357
|
-
data.value = res;
|
|
7358
|
-
if (cacheKey) {
|
|
7359
|
-
shStorage.setItem(cacheKey, res);
|
|
7348
|
+
let res = response.data;
|
|
7349
|
+
if (path) {
|
|
7350
|
+
let pathArr = path.split('.');
|
|
7351
|
+
for (let i = 0; i < pathArr.length; i++) {
|
|
7352
|
+
res = res[pathArr[i]];
|
|
7360
7353
|
}
|
|
7354
|
+
}
|
|
7355
|
+
data.value = res;
|
|
7356
|
+
if (cacheKey) {
|
|
7357
|
+
shStorage.setItem(cacheKey, res);
|
|
7358
|
+
}
|
|
7359
|
+
})
|
|
7360
|
+
.catch(res => {
|
|
7361
|
+
status.value = 'error';
|
|
7362
|
+
error.value = res.message ? res.message : (res.error ? res.error : 'An unexpected error occurred');
|
|
7363
|
+
shRepo.showToast(error.value, 'error');
|
|
7361
7364
|
})
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
shRepo.showToast(error.value, 'error');
|
|
7366
|
-
})
|
|
7367
|
-
.finally(() => {
|
|
7368
|
-
loading.value = false;
|
|
7369
|
-
});
|
|
7370
|
-
}
|
|
7365
|
+
.finally(() => {
|
|
7366
|
+
loading.value = false;
|
|
7367
|
+
});
|
|
7371
7368
|
};
|
|
7372
7369
|
|
|
7373
7370
|
return {
|