@webitel/ui-sdk 3.2.73 → 3.2.75

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "3.2.73",
3
+ "version": "3.2.75",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -5,16 +5,18 @@ export const useDeleteConfirmationPopup = () => {
5
5
  const isVisible = ref(false);
6
6
  const deleteCount = ref(null);
7
7
  const deleteCallback = ref(null);
8
+ const deleted = ref(null);
8
9
 
9
10
  function askDeleteConfirmation({ deleted, callback }) {
10
11
  if (Array.isArray(deleted)) deleteCount.value = deleted.length;
11
12
  else deleteCount.value = 1;
12
13
  isVisible.value = true;
13
14
  deleteCallback.value = callback;
15
+ deleted.value = deleted;
14
16
  }
15
17
 
16
18
  function confirmDelete() {
17
- return deleteCallback.value();
19
+ return deleteCallback.value(deleted.value);
18
20
  }
19
21
 
20
22
  function closeDelete() {
@@ -16,25 +16,25 @@ export default class ApiStoreModule extends BaseStoreModule {
16
16
  this.actions
17
17
  .POST_ITEM = (
18
18
  _,
19
- { context: callerContext = {}, params = {} } = {},
20
- ) => api.add({ ...callerContext.state, ...params });
19
+ { context: callerContext = {}, ...rest } = {},
20
+ ) => api.add({ ...callerContext.state, ...rest });
21
21
  this.actions
22
22
  .PATCH_ITEM = (
23
23
  _,
24
- { context: callerContext = {}, params = {}, id, changes },
24
+ { context: callerContext = {}, id, changes, ...rest },
25
25
  ) => (
26
- api.patch({ ...callerContext.state, ...params, id, changes })
26
+ api.patch({ ...callerContext.state, ...rest, id, changes })
27
27
  );
28
28
  this.actions
29
29
  .UPD_ITEM = (
30
30
  _,
31
- { context: callerContext = {}, params = {} } = {},
32
- ) => api.update({ ...callerContext.state, ...params });
31
+ { context: callerContext = {}, ...rest } = {},
32
+ ) => api.update({ ...callerContext.state, ...rest });
33
33
  this.actions
34
34
  .DELETE_ITEM = (
35
35
  _,
36
- { context: callerContext = {}, params = {}, id },
37
- ) => api.delete({ ...callerContext.state, ...params, id });
36
+ { context: callerContext = {}, id, ...rest },
37
+ ) => api.delete({ ...callerContext.state, ...rest, id });
38
38
  return this;
39
39
  }
40
40
  }