@webitel/ui-sdk 24.12.20 → 24.12.22
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/CHANGELOG.md +12 -0
- package/dist/ui-sdk.js +975 -975
- package/dist/ui-sdk.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/modules/TableComponentModule/composables/useTableEmpty.js +3 -3
- package/src/store/new/modules/tableStoreModule/tableStoreModule.js +13 -0
- package/src/store/new/modules/tableStoreModule/useTableStore.js +5 -0
package/package.json
CHANGED
|
@@ -44,9 +44,9 @@ export const useTableEmpty = ({ dataList, filters, error, isLoading }, overrides
|
|
|
44
44
|
empty: t('webitelUI.empty.text.empty'),
|
|
45
45
|
},
|
|
46
46
|
primaryActionText: {
|
|
47
|
-
filters: '',
|
|
48
|
-
error: '',
|
|
49
|
-
empty: '',
|
|
47
|
+
filters: t('reusable.add'),
|
|
48
|
+
error: t('reusable.add'),
|
|
49
|
+
empty: t('reusable.add'),
|
|
50
50
|
},
|
|
51
51
|
secondaryActionText: {
|
|
52
52
|
filters: '',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import deepCopy from 'deep-copy';
|
|
1
2
|
import FilterEvent from '../../../../modules/Filters/enums/FilterEvent.enum.js';
|
|
2
3
|
import {
|
|
3
4
|
queryToSortAdapter,
|
|
@@ -11,6 +12,7 @@ const state = () => ({
|
|
|
11
12
|
error: {},
|
|
12
13
|
isLoading: false,
|
|
13
14
|
isNextPage: false,
|
|
15
|
+
_resettable: {},
|
|
14
16
|
});
|
|
15
17
|
|
|
16
18
|
const getters = {
|
|
@@ -234,10 +236,21 @@ const actions = {
|
|
|
234
236
|
context,
|
|
235
237
|
payload,
|
|
236
238
|
) => context.dispatch('api/DELETE_ITEM', payload),
|
|
239
|
+
|
|
240
|
+
RESET_TABLE_STATE: async (context) => {
|
|
241
|
+
context.commit('RESET_TABLE_STATE');
|
|
242
|
+
},
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
const mutations = {
|
|
246
|
+
RESET_TABLE_STATE: (state) => {
|
|
247
|
+
Object.assign(state, deepCopy(state._resettable));
|
|
248
|
+
},
|
|
237
249
|
};
|
|
238
250
|
|
|
239
251
|
export default () => ({
|
|
240
252
|
state: state(),
|
|
241
253
|
getters,
|
|
242
254
|
actions,
|
|
255
|
+
mutations,
|
|
243
256
|
});
|
|
@@ -46,6 +46,10 @@ export const useTableStore = (namespace) => {
|
|
|
46
46
|
return store.dispatch(`${tableNamespace}/SET_SELECTED`, payload);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
function resetState(payload) {
|
|
50
|
+
return store.dispatch(`${tableNamespace}/RESET_TABLE_STATE`, payload);
|
|
51
|
+
}
|
|
52
|
+
|
|
49
53
|
return {
|
|
50
54
|
namespace: tableNamespace,
|
|
51
55
|
|
|
@@ -62,5 +66,6 @@ export const useTableStore = (namespace) => {
|
|
|
62
66
|
deleteData,
|
|
63
67
|
sort,
|
|
64
68
|
setSelected,
|
|
69
|
+
resetState,
|
|
65
70
|
};
|
|
66
71
|
};
|