@webitel/ui-sdk 3.2.93 → 3.2.94
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,4 +1,5 @@
|
|
|
1
1
|
import deepCopy from 'deep-copy';
|
|
2
|
+
import set from 'lodash/set';
|
|
2
3
|
import BaseStoreModule from '../../../store/BaseStoreModules/BaseStoreModule';
|
|
3
4
|
|
|
4
5
|
export default class CardStoreModule extends BaseStoreModule {
|
|
@@ -34,7 +35,7 @@ export default class CardStoreModule extends BaseStoreModule {
|
|
|
34
35
|
},
|
|
35
36
|
SET_ITEM_PROPERTY: (context, payload) => {
|
|
36
37
|
context.commit('SET_ITEM_PROPERTY', payload);
|
|
37
|
-
context.commit('SET_ITEM_PROPERTY', {
|
|
38
|
+
context.commit('SET_ITEM_PROPERTY', { path: '_dirty', value: true });
|
|
38
39
|
},
|
|
39
40
|
RESET_ITEM_STATE: async (context) => {
|
|
40
41
|
context.commit('RESET_ITEM_STATE');
|
|
@@ -48,8 +49,13 @@ export default class CardStoreModule extends BaseStoreModule {
|
|
|
48
49
|
SET_ITEM_ID: (state, id) => {
|
|
49
50
|
state.itemId = id;
|
|
50
51
|
},
|
|
51
|
-
SET_ITEM_PROPERTY: (state, { prop, value }) => {
|
|
52
|
-
|
|
52
|
+
SET_ITEM_PROPERTY: (state, { prop, value, path }) => {
|
|
53
|
+
if (path) {
|
|
54
|
+
set(state.itemInstance, path, value);
|
|
55
|
+
} else {
|
|
56
|
+
// DEPRECATED, LEGACY CODE
|
|
57
|
+
state.itemInstance[prop] = value;
|
|
58
|
+
}
|
|
53
59
|
},
|
|
54
60
|
SET_ITEM: (state, item) => {
|
|
55
61
|
state.itemInstance = item;
|