@webitel/ui-sdk 3.1.0 → 3.1.1
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.common.js +106 -1
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.umd.js +109 -4
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +3 -3
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/index.js +2 -0
- package/src/components/organisms/wt-icon-action/__tests__/WtIconAction.spec.js +9 -0
- package/src/components/organisms/wt-icon-action/_internals/__tests__/WtDeleteIconAction.spec.js +9 -0
- package/src/components/organisms/wt-icon-action/_internals/__tests__/WtEditIconAction.spec.js +9 -0
- package/src/components/organisms/{wt-table/table-cells/wt-table-delete-action.vue → wt-icon-action/_internals/wt-delete-icon-action.vue} +2 -2
- package/src/components/organisms/{wt-table/table-cells/wt-table-edit-action.vue → wt-icon-action/_internals/wt-edit-icon-action.vue} +2 -2
- package/src/components/organisms/wt-icon-action/wt-icon-action.vue +31 -0
- package/src/locale/en/en.js +7 -7
- package/src/locale/es/es.js +265 -265
- package/src/locale/ru/ru.js +9 -8
- package/src/locale/ua/ua.js +9 -8
- package/src/modules/QueryFilters/mixins/_urlControllerMixin/_urlControllerMixin.js +2 -2
- package/src/store/BaseStoreModules/ApiStoreModule.js +6 -6
- package/src/store/BaseStoreModules/TableStoreModule.js +3 -3
- package/src/components/organisms/wt-table/__tests__/WtTableDeleteAction.spec.js +0 -9
- package/src/components/organisms/wt-table/__tests__/WtTableEditAction.spec.js +0 -9
- package/src/store/BaseStoreModules/ObjectStoreModule.js +0 -4
|
@@ -8,22 +8,22 @@ export default class ApiStoreModule extends BaseStoreModule {
|
|
|
8
8
|
.GET_LIST = (
|
|
9
9
|
context,
|
|
10
10
|
params = {},
|
|
11
|
-
) =>
|
|
11
|
+
) => api.getList({ ...context.state, ...params });
|
|
12
12
|
this.actions
|
|
13
13
|
.GET_ITEM = (
|
|
14
14
|
context,
|
|
15
15
|
params = {},
|
|
16
|
-
) =>
|
|
16
|
+
) => api.get({ ...context.state, ...params });
|
|
17
17
|
this.actions
|
|
18
|
-
.POST_ITEM = (context) =>
|
|
18
|
+
.POST_ITEM = (context) => api.add(context.state);
|
|
19
19
|
this.actions
|
|
20
20
|
.PATCH_ITEM = (context, { id, changes }) => (
|
|
21
|
-
|
|
21
|
+
api.patch({ ...context.state, id, changes })
|
|
22
22
|
);
|
|
23
23
|
this.actions
|
|
24
|
-
.UPD_ITEM = (context) =>
|
|
24
|
+
.UPD_ITEM = (context) => api.update(context.state);
|
|
25
25
|
this.actions
|
|
26
|
-
.DELETE_ITEM = (context, id) =>
|
|
26
|
+
.DELETE_ITEM = (context, id) => api.delete({ ...context.state, id });
|
|
27
27
|
return this;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -27,7 +27,7 @@ export default class TableStoreModule extends BaseStoreModule {
|
|
|
27
27
|
let {
|
|
28
28
|
items = [],
|
|
29
29
|
next = false,
|
|
30
|
-
} = await context.dispatch('GET_LIST', query);
|
|
30
|
+
} = await context.dispatch('api/GET_LIST', query);
|
|
31
31
|
/* we should set _isSelected property to all items in tables cause their checkbox selection
|
|
32
32
|
* is based on this property. Previously, this prop was set it api consumers, but now
|
|
33
33
|
* admin-specific were replaced by webitel-sdk consumers and i supposed it will be
|
|
@@ -100,7 +100,7 @@ export default class TableStoreModule extends BaseStoreModule {
|
|
|
100
100
|
const id = item?.id || context.state.dataList[index].id;
|
|
101
101
|
const changes = { [prop]: value };
|
|
102
102
|
try {
|
|
103
|
-
await context.dispatch('PATCH_ITEM', { id, changes });
|
|
103
|
+
await context.dispatch('api/PATCH_ITEM', { id, changes });
|
|
104
104
|
context.commit('PATCH_ITEM_PROPERTY', {
|
|
105
105
|
item, index, prop, value,
|
|
106
106
|
});
|
|
@@ -124,7 +124,7 @@ export default class TableStoreModule extends BaseStoreModule {
|
|
|
124
124
|
},
|
|
125
125
|
DELETE_SINGLE: async (context, { id }) => {
|
|
126
126
|
try {
|
|
127
|
-
await context.dispatch('DELETE_ITEM', id);
|
|
127
|
+
await context.dispatch('api/DELETE_ITEM', id);
|
|
128
128
|
} catch (err) {
|
|
129
129
|
throw err;
|
|
130
130
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import WtTableDeleteAction from '../table-cells/wt-table-delete-action.vue';
|
|
3
|
-
|
|
4
|
-
describe('WtTableDeleteAction', () => {
|
|
5
|
-
it('renders a component', () => {
|
|
6
|
-
const wrapper = shallowMount(WtTableDeleteAction);
|
|
7
|
-
expect(wrapper.exists()).toBe(true);
|
|
8
|
-
});
|
|
9
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import WtTableEditAction from '../table-cells/wt-table-edit-action.vue';
|
|
3
|
-
|
|
4
|
-
describe('WtTableEditAction', () => {
|
|
5
|
-
it('renders a component', () => {
|
|
6
|
-
const wrapper = shallowMount(WtTableEditAction);
|
|
7
|
-
expect(wrapper.exists()).toBe(true);
|
|
8
|
-
});
|
|
9
|
-
});
|