@capillarytech/creatives-library 7.17.208 → 7.17.209

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": "7.17.208",
4
+ "version": "7.17.209",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -97,7 +97,7 @@ function capReducer(state = fromJS(initialState.cap), action) {
97
97
  return state
98
98
  .set('fetchingLiquidTags', false)
99
99
  case types.GET_SCHEMA_FOR_ENTITY_SUCCESS: {
100
- //Process standard tags (same as before)
100
+ //Process standard tags
101
101
  const standardTagMapInitial = _.keyBy(
102
102
  action?.data?.metaEntities?.standard,
103
103
  item => item?.definition?.value
@@ -22,3 +22,4 @@ export const GET_IOS_CTAS = 'app/v2Containers/PushMessage/Create/GET_IOS_CTAS';
22
22
  export const GET_IOS_CTAS_SUCCESS = 'app/v2Containers/PushMessage/Create/GET_IOS_CTAS_SUCCESS';
23
23
  export const GET_IOS_CTAS_FAILURE = 'app/v2Containers/PushMessage/Create/GET_IOS_CTAS_FAILURE';
24
24
  export const RESET_STORE = 'app/v2Containers/PushMessage/Create/RESET_STORE';
25
+ export const EXTERNAL_LINK_LOWERCASE = 'external link';
@@ -32,6 +32,7 @@ import { CREATE, TRACK_CREATE_MPUSH } from '../../App/constants';
32
32
  import { MOBILE_PUSH } from '../../CreativesContainer/constants';
33
33
  import { getContent } from '../commonMethods';
34
34
  import { getCdnUrl } from '../../../utils/cdnTransformation';
35
+ import { EXTERNAL_LINK_LOWERCASE } from './constants';
35
36
 
36
37
  const PrefixWrapper = styled.div`
37
38
  margin-right: 16px;
@@ -196,11 +197,25 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
196
197
  newFormData[0]["add-sec-cta-2"] = false;
197
198
  }
198
199
  }
199
- this.setState({formData: newFormData, tabCount, isSchemaChanged: !this.state.isSchemaChanged}, () => {
200
- if (isFullMode && showTemplateName) {
201
- showTemplateName({formData: this.state.formData, onFormDataChange: this.onFormDataChange});
200
+ const compareValue =
201
+ newFormData?.[this.state?.currentTab - 1]?.[inputField?.id] || "";
202
+ this.setState(
203
+ {
204
+ formData: newFormData,
205
+ tabCount,
206
+ isSchemaChanged:
207
+ compareValue.toLowerCase() === EXTERNAL_LINK_LOWERCASE ||
208
+ !this.state?.isSchemaChanged,
209
+ },
210
+ () => {
211
+ if (isFullMode && showTemplateName) {
212
+ showTemplateName({
213
+ formData: this.state?.formData,
214
+ onFormDataChange: this.onFormDataChange,
215
+ });
216
+ }
202
217
  }
203
- });
218
+ );
204
219
  };
205
220
 
206
221
  onTagSelect = (data, currentTab, srcComp) => {