@capillarytech/creatives-library 8.0.59 → 8.0.60-alpha.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.59",
4
+ "version": "8.0.60-alpha.1",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -142,7 +142,19 @@ function capReducer(state = fromJS(initialState.cap), action) {
142
142
  metaEntities.tags.custom = _.filter(state.get('metaEntities').tags.custom, (tag) => action.tagList.indexOf(tag.name) === -1);
143
143
  return state.setIn(['metaEntities'], metaEntities);
144
144
  case types.SET_INJECTED_TAGS:
145
- return state.set('injectedTags', action.injectedTags);
145
+ console.log('SET_INJECTED_TAGS',action.injectedTags,getTagMapValue(action?.injectedTags));
146
+ // Deep clone the tagLookupMap to avoid direct mutations
147
+ let updatedMetaEntitiesTagLookUp = _.cloneDeep(state.getIn(['metaEntities', 'tagLookupMap']));
148
+ const formattedInjuectedTags = getTagMapValue(action?.injectedTags);
149
+ // Merge the injectedTags with the existing tagLookupMap
150
+ updatedMetaEntitiesTagLookUp = {
151
+ ...formattedInjuectedTags|| {},
152
+ ...updatedMetaEntitiesTagLookUp || {},
153
+ };
154
+ console.log('updatedMetaEntitiesTagLookUp',fromJS(updatedMetaEntitiesTagLookUp));
155
+ return state
156
+ .set('injectedTags', action.injectedTags)
157
+ .setIn(['metaEntities', 'tagLookupMap'], fromJS(updatedMetaEntitiesTagLookUp));
146
158
  case types.GET_TOPBAR_MENU_DATA_REQUEST:
147
159
  return state.set('topbarMenuData', fromJS({ status: 'request' }));
148
160
  case types.GET_TOPBAR_MENU_DATA_SUCCESS: