@webitel/ui-sdk 3.2.80 → 3.2.82
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
CHANGED
|
@@ -136,8 +136,9 @@ export default class TableStoreModule extends BaseStoreModule {
|
|
|
136
136
|
context.commit('PATCH_ITEM_PROPERTY', {
|
|
137
137
|
item, index, prop, value,
|
|
138
138
|
});
|
|
139
|
-
} catch {
|
|
139
|
+
} catch (err) {
|
|
140
140
|
await context.dispatch('LOAD_DATA_LIST');
|
|
141
|
+
throw err;
|
|
141
142
|
}
|
|
142
143
|
},
|
|
143
144
|
DELETE: async (context, deleted) => {
|
|
@@ -11,61 +11,83 @@ export default class ApiStoreModule extends BaseStoreModule {
|
|
|
11
11
|
.GET_LIST = (
|
|
12
12
|
_,
|
|
13
13
|
{ context: callerContext = {}, params = {} },
|
|
14
|
-
) =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
) => {
|
|
15
|
+
if (!api.getList) throw Error('No API "getList" method provided');
|
|
16
|
+
return api.getList({
|
|
17
|
+
...callerContext.state,
|
|
18
|
+
parentId: getParentIdFromContext(callerContext),
|
|
19
|
+
...params,
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
19
23
|
this.actions
|
|
20
24
|
.GET_ITEM = (
|
|
21
25
|
_,
|
|
22
26
|
{ context: callerContext = {}, params = {} } = {},
|
|
23
|
-
) =>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
) => {
|
|
28
|
+
if (!api.get) throw Error('No API "get" method provided');
|
|
29
|
+
return api.get({
|
|
30
|
+
...callerContext.state,
|
|
31
|
+
parentId: getParentIdFromContext(callerContext),
|
|
32
|
+
...params,
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
28
36
|
this.actions
|
|
29
37
|
.POST_ITEM = (
|
|
30
38
|
_,
|
|
31
39
|
{ context: callerContext = {}, ...rest } = {},
|
|
32
|
-
) =>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
) => {
|
|
41
|
+
if (!api.add) throw Error('No API "add" method provided');
|
|
42
|
+
return api.add({
|
|
43
|
+
...callerContext.state,
|
|
44
|
+
parentId: getParentIdFromContext(callerContext),
|
|
45
|
+
...rest,
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
|
|
37
49
|
this.actions
|
|
38
50
|
.PATCH_ITEM = (
|
|
39
51
|
_,
|
|
40
52
|
{ context: callerContext = {}, id, changes, ...rest },
|
|
41
|
-
) =>
|
|
42
|
-
api.patch(
|
|
53
|
+
) => {
|
|
54
|
+
if (!api.patch) throw Error('No API "patch" method provided');
|
|
55
|
+
return api.patch({
|
|
43
56
|
...callerContext.state,
|
|
44
57
|
...rest,
|
|
45
58
|
parentId: getParentIdFromContext(callerContext),
|
|
46
59
|
id,
|
|
47
60
|
changes,
|
|
48
|
-
})
|
|
49
|
-
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
50
64
|
this.actions
|
|
51
65
|
.UPD_ITEM = (
|
|
52
66
|
_,
|
|
53
67
|
{ context: callerContext = {}, ...rest } = {},
|
|
54
|
-
) =>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
) => {
|
|
69
|
+
if (!api.update) throw Error('No API "update" method provided');
|
|
70
|
+
return api.update({
|
|
71
|
+
...callerContext.state,
|
|
72
|
+
parentId: getParentIdFromContext(callerContext),
|
|
73
|
+
...rest,
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
59
77
|
this.actions
|
|
60
78
|
.DELETE_ITEM = (
|
|
61
79
|
_,
|
|
62
80
|
{ context: callerContext = {}, id, ...rest },
|
|
63
|
-
) =>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
81
|
+
) => {
|
|
82
|
+
if (!api.delete) throw Error('No API "delete" method provided');
|
|
83
|
+
return api.delete({
|
|
84
|
+
...callerContext.state,
|
|
85
|
+
parentId: getParentIdFromContext(callerContext),
|
|
86
|
+
...rest,
|
|
87
|
+
id,
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
|
|
69
91
|
return this;
|
|
70
92
|
}
|
|
71
93
|
}
|