@capillarytech/creatives-library 8.0.61-alpha.0 → 8.0.61
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/hoc/withCreatives.js +0 -1
- package/index.js +2 -2
- package/package.json +1 -1
- package/v2Containers/Cap/reducer.js +9 -4
- package/v2Containers/Zalo/index.js +0 -4
package/hoc/withCreatives.js
CHANGED
package/index.js
CHANGED
|
@@ -93,7 +93,7 @@ import whatsappSaga from './v2Containers/Whatsapp/sagas';
|
|
|
93
93
|
|
|
94
94
|
import Zalo from './v2Containers/Zalo';
|
|
95
95
|
import zaloReducer from './v2Containers/Zalo/reducer';
|
|
96
|
-
import
|
|
96
|
+
import zaloSaga from './v2Containers/Zalo/saga';
|
|
97
97
|
|
|
98
98
|
import InApp from './v2Containers/InApp';
|
|
99
99
|
import inAppReducer from './v2Containers/InApp/reducer';
|
|
@@ -129,7 +129,7 @@ const FacebookPreviewContainer = { FacebookPreview, facebookPreviewReducer, face
|
|
|
129
129
|
const SmsTraiContainer = {SmsTraiCreate, SmsTraiCreateReducer, SmsTraiCreateSaga};
|
|
130
130
|
const WhatsappContainer = { Whatsapp, whatsappReducer, whatsappSaga };
|
|
131
131
|
const RcsContainer = { Rcs, rcsReducer, rcsSaga };
|
|
132
|
-
const ZaloContainer = { Zalo, zaloReducer,
|
|
132
|
+
const ZaloContainer = { Zalo, zaloReducer, zaloSaga };
|
|
133
133
|
const InAppContainer = { InApp, inAppReducer, inAppSaga };
|
|
134
134
|
|
|
135
135
|
const GalleryContainer = {Gallery, galleryReducer, gallerySagas};
|
package/package.json
CHANGED
|
@@ -135,6 +135,7 @@ function capReducer(state = fromJS(initialState.cap), action) {
|
|
|
135
135
|
return state.set('metaEntities', {
|
|
136
136
|
layouts: [],
|
|
137
137
|
tags: [],
|
|
138
|
+
tagLookupMap: {},
|
|
138
139
|
});
|
|
139
140
|
// eslint-disable-next-line no-case-declarations
|
|
140
141
|
case types.HIDE_TAGS:
|
|
@@ -142,7 +143,7 @@ function capReducer(state = fromJS(initialState.cap), action) {
|
|
|
142
143
|
metaEntities.tags.standard = _.filter(state.get('metaEntities').tags.standard, (tag) => action.tagList.indexOf(tag.definition.value) === -1);
|
|
143
144
|
metaEntities.tags.custom = _.filter(state.get('metaEntities').tags.custom, (tag) => action.tagList.indexOf(tag.name) === -1);
|
|
144
145
|
return state.setIn(['metaEntities'], metaEntities);
|
|
145
|
-
case types.SET_INJECTED_TAGS:
|
|
146
|
+
case types.SET_INJECTED_TAGS:
|
|
146
147
|
|
|
147
148
|
// Deep clone the tagLookupMap to avoid direct mutations
|
|
148
149
|
let updatedMetaEntitiesTagLookUp = _.cloneDeep(state.getIn(['metaEntities', 'tagLookupMap']));
|
|
@@ -152,9 +153,13 @@ function capReducer(state = fromJS(initialState.cap), action) {
|
|
|
152
153
|
...formattedInjectedTags || {},
|
|
153
154
|
...updatedMetaEntitiesTagLookUp || {},
|
|
154
155
|
};
|
|
155
|
-
return state
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
return state.set("injectedTags", action.injectedTags).setIn(
|
|
157
|
+
["metaEntities"],
|
|
158
|
+
fromJS({
|
|
159
|
+
...state.get("metaEntities"),
|
|
160
|
+
tagLookupMap: updatedMetaEntitiesTagLookUp
|
|
161
|
+
})
|
|
162
|
+
);
|
|
158
163
|
case types.GET_TOPBAR_MENU_DATA_REQUEST:
|
|
159
164
|
return state.set('topbarMenuData', fromJS({ status: 'request' }));
|
|
160
165
|
case types.GET_TOPBAR_MENU_DATA_SUCCESS:
|
|
@@ -506,8 +506,6 @@ const mapDispatchToProps = (dispatch) => ({
|
|
|
506
506
|
|
|
507
507
|
|
|
508
508
|
const withReducer = injectReducer({ key: 'zalo', reducer: v2ZaloReducer });
|
|
509
|
-
// const withZaloSaga = injectSaga({ key: 'zalo', saga: v2ZaloSagas });
|
|
510
|
-
//
|
|
511
509
|
|
|
512
510
|
export default withCreatives({
|
|
513
511
|
WrappedComponent: Zalo,
|
|
@@ -515,6 +513,4 @@ export default withCreatives({
|
|
|
515
513
|
mapDispatchToProps,
|
|
516
514
|
userAuth: true,
|
|
517
515
|
reducers: [withReducer],
|
|
518
|
-
zaloSaga: true,
|
|
519
|
-
// sagas: [withZaloSaga],
|
|
520
516
|
});
|