@webitel/ui-sdk 24.6.52 → 24.6.56
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/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +11 -14
- package/dist/ui-sdk.umd.cjs +2 -2
- package/package.json +1 -1
- package/src/api/clients/media/media.js +1 -1
- package/src/components/wt-notification/wt-notification.vue +7 -10
- package/src/components/wt-notifications-bar/wt-notifications-bar.vue +1 -1
- package/src/modules/TableStoreModule/store/TableStoreModule.js +0 -4
- package/src/store/BaseStoreModules/BaseStoreModule.js +7 -1
package/package.json
CHANGED
|
@@ -97,7 +97,7 @@ const addMedia = async (params) => {
|
|
|
97
97
|
try {
|
|
98
98
|
const response = await addMediaInstance.post(url, formData);
|
|
99
99
|
applyTransform(response, [
|
|
100
|
-
notify(() => ({ type: '
|
|
100
|
+
notify(() => ({ type: 'success', text: 'Successfully added' })),
|
|
101
101
|
]);
|
|
102
102
|
return response;
|
|
103
103
|
} catch (err) {
|
|
@@ -22,29 +22,26 @@ export default {
|
|
|
22
22
|
props: {
|
|
23
23
|
type: {
|
|
24
24
|
type: String,
|
|
25
|
-
default: '
|
|
25
|
+
default: 'success',
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
computed: {
|
|
29
29
|
notificationIcon() {
|
|
30
30
|
switch (this.type) {
|
|
31
31
|
case 'info':
|
|
32
|
-
return '
|
|
32
|
+
return 'rounded-info';
|
|
33
33
|
case 'error':
|
|
34
34
|
return 'attention';
|
|
35
|
+
case 'warning':
|
|
36
|
+
return 'attention';
|
|
37
|
+
case 'success':
|
|
38
|
+
return 'done';
|
|
35
39
|
default:
|
|
36
40
|
return '';
|
|
37
41
|
}
|
|
38
42
|
},
|
|
39
43
|
notificationIconColor() {
|
|
40
|
-
|
|
41
|
-
case 'info':
|
|
42
|
-
return 'success';
|
|
43
|
-
case 'error':
|
|
44
|
-
return 'error';
|
|
45
|
-
default:
|
|
46
|
-
return '';
|
|
47
|
-
}
|
|
44
|
+
return this.type || ''
|
|
48
45
|
},
|
|
49
46
|
},
|
|
50
47
|
};
|
|
@@ -37,7 +37,7 @@ export default {
|
|
|
37
37
|
methods: {
|
|
38
38
|
showNotification(notification) {
|
|
39
39
|
this.notifications.unshift(notification);
|
|
40
|
-
|
|
40
|
+
setTimeout(() => this.closeNotification(notification), (notification.timeout * 1000) || this.notificationDuration);
|
|
41
41
|
},
|
|
42
42
|
closeNotification(notification) {
|
|
43
43
|
const index = this.notifications.indexOf(notification);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import set from 'lodash/set.js';
|
|
2
1
|
import {
|
|
3
2
|
queryToSortAdapter,
|
|
4
3
|
sortToQueryAdapter,
|
|
@@ -230,9 +229,6 @@ export default class TableStoreModule extends BaseStoreModule {
|
|
|
230
229
|
};
|
|
231
230
|
|
|
232
231
|
mutations = {
|
|
233
|
-
SET: (state, { path, value }) => {
|
|
234
|
-
return set(state, path, value);
|
|
235
|
-
},
|
|
236
232
|
};
|
|
237
233
|
|
|
238
234
|
constructor({ headers = [] }) {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import set from 'lodash/set.js';
|
|
2
|
+
|
|
1
3
|
export default class BaseStoreModule {
|
|
2
4
|
state = {};
|
|
3
5
|
|
|
@@ -5,7 +7,11 @@ export default class BaseStoreModule {
|
|
|
5
7
|
|
|
6
8
|
actions = {};
|
|
7
9
|
|
|
8
|
-
mutations = {
|
|
10
|
+
mutations = {
|
|
11
|
+
SET: (state, { path, value }) => {
|
|
12
|
+
return set(state, path, value);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
9
15
|
|
|
10
16
|
modules = {};
|
|
11
17
|
|