@capillarytech/creatives-library 2.0.9 → 2.0.10

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.
@@ -6,7 +6,7 @@ import _ from 'lodash';
6
6
  import * as types from './constants';
7
7
  import initialState from '../../initialState';
8
8
 
9
- function capReducer(state = fromJS(initialState), action) {
9
+ function capReducer(state = fromJS(initialState.cap), action) {
10
10
  switch (action.type) {
11
11
  case types.LOGIN_REQUEST:
12
12
  return state.set('login_progress', true);
@@ -95,11 +95,12 @@ function capReducer(state = fromJS(initialState), action) {
95
95
  layouts: [],
96
96
  tags: [],
97
97
  });
98
- case types.HIDE_TAGS:
98
+ case types.HIDE_TAGS: {
99
99
  const metaEntities = {tags: {}, layouts: state.get('metaEntities').layouts};
100
100
  metaEntities.tags.standard = _.filter(state.get('metaEntities').tags.standard, (tag) => action.tagList.indexOf(tag.definition.value) === -1);
101
101
  metaEntities.tags.custom = _.filter(state.get('metaEntities').tags.custom, (tag) => action.tagList.indexOf(tag.name) === -1);
102
102
  return state.setIn(['metaEntities'], metaEntities);
103
+ }
103
104
  default:
104
105
  return state;
105
106
  }
@@ -123,8 +123,7 @@ class Creatives extends React.Component {
123
123
  this.setState({ isGetFormData: true });
124
124
  };
125
125
  render() {
126
- const {slidBoxContent, isGetFormData, showSlideBox} = this.state;
127
- const { templateData } = this.state;
126
+ const {slidBoxContent, isGetFormData, showSlideBox, templateData} = this.state;
128
127
  return (
129
128
  <div className={classnames(`${classPrefix}`)}>
130
129
  <CapSlideBox
@@ -2523,14 +2523,18 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2523
2523
  }
2524
2524
  if (containerInputFieldCol.id === 'add-language-button' && !ifLangSupported) {
2525
2525
  const newContainerInputFieldCol = containerInputFieldCol;
2526
- newContainerInputFieldCol.colStyle.display = "none";
2526
+ if (newContainerInputFieldCol.colStyle.display !== "none") {
2527
+ newContainerInputFieldCol.colStyle.display = "none";
2528
+ }
2527
2529
  hideLang = true;
2528
2530
  } else if (containerInputFieldCol.id === 'add-language-button') {
2529
2531
  hideLang = true;
2530
2532
  }
2531
2533
  if (containerInputFieldCol.id === "mark-final-version-label") {
2532
2534
  const newContainerInputFieldCol = containerInputFieldCol;
2533
- newContainerInputFieldCol.colStyle.display = "none";
2535
+ if (newContainerInputFieldCol.colStyle.display !== "none") {
2536
+ newContainerInputFieldCol.colStyle.display = "none";
2537
+ }
2534
2538
  }
2535
2539
  // if (containerInputFieldCol.id === "tab-options-popover") {
2536
2540
  // const newContainerInputFieldCol = containerInputFieldCol;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "2.0.9",
4
+ "version": "2.0.10",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",