@capillarytech/creatives-library 7.17.40 → 7.17.42

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.40",
4
+ "version": "7.17.42",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -510,11 +510,11 @@
510
510
 
511
511
  .zalo-preview-container-creative {
512
512
  position: fixed;
513
- padding-left: 72px;
514
- padding-right: 110px;
513
+ padding-left: 4.5rem;
514
+ padding-right: 6.875rem;
515
515
  }
516
516
 
517
517
  .zalo-preview-container-campaign {
518
518
  padding-left: 0px;
519
- padding-right: 73px;
519
+ padding-right: 4.563rem;
520
520
  }
@@ -19,6 +19,8 @@ export const VIBER = "VIBER";
19
19
  export const WHATSAPP = "WHATSAPP";
20
20
  export const RCS = "RCS";
21
21
  export const ZALO = "ZALO";
22
+ export const PREVIEW = "preview";
23
+ export const EDIT_TEMPLATE = "editTemplate";
22
24
 
23
25
  export const SHOW_CONTANER_LOADER = "app/CreativesContainer/SHOW_CONTANER_LOADER";
24
26
  export const HIDE_CONTAINER_LOADER = "app/CreativesContainer/HIDE_CONTAINER_LOADER";
@@ -97,7 +97,7 @@ export class Creatives extends React.Component {
97
97
  }
98
98
 
99
99
  onSelectTemplate = (template, fbAdManager) => {
100
- const data = {slidBoxContent: 'editTemplate', templateData: template};
100
+ const data = {slidBoxContent: constants.EDIT_TEMPLATE, templateData: template};
101
101
  if (fbAdManager) {
102
102
  data.fbAdManager = fbAdManager;
103
103
  }
@@ -116,7 +116,7 @@ export class Creatives extends React.Component {
116
116
  const usersList = commonUtil.getMergedUserList(this.props.templateUserList);
117
117
  const userId = parseInt(template.updatedBy, 10);
118
118
  templateData.updatedByName = commonUtil.getUserNameById(userId, usersList );
119
- this.setState({ slidBoxContent: 'preview', templateData });
119
+ this.setState({ slidBoxContent: constants.PREVIEW, templateData });
120
120
  } else {
121
121
  const {
122
122
  name = "",
@@ -813,7 +813,9 @@ export class Creatives extends React.Component {
813
813
  templateData = {
814
814
  ...template.value,
815
815
  };
816
- templateData?.type && delete templateData.type;
816
+ if (templateData?.type) {
817
+ delete templateData.type;
818
+ }
817
819
  }
818
820
  }
819
821
  break;
@@ -40,7 +40,7 @@ import {
40
40
  WARNING_ALERT,
41
41
  ZALO_STATUSES,
42
42
  } from './constants';
43
- import { ZALO } from '../CreativesContainer/constants';
43
+ import { SMS, ZALO } from '../CreativesContainer/constants';
44
44
  import messages from './messages';
45
45
  import globalMessages from '../Cap/messages';
46
46
  import withCreatives from '../../hoc/withCreatives';
@@ -125,10 +125,8 @@ export const Zalo = (props) => {
125
125
 
126
126
  const handleSetValues = (paramsData = []) =>
127
127
  paramsData.map((paramData) => {
128
- // eslint-disable-next-line no-restricted-syntax
129
128
  for (const key in varMapped) {
130
129
  if (paramData?.name === key) {
131
- // eslint-disable-next-line no-param-reassign
132
130
  paramData.value = varMapped[key];
133
131
  }
134
132
  }
@@ -183,7 +181,7 @@ export const Zalo = (props) => {
183
181
  const { type, module } = location?.query || {};
184
182
  const isEmbedded = type === EMBEDDED;
185
183
  const query = {
186
- layout: 'SMS',
184
+ layout: SMS,
187
185
  type: TAG,
188
186
  context: isEmbedded ? module : DEFAULT,
189
187
  embedded: isEmbedded ? type : FULL,
@@ -198,7 +196,7 @@ export const Zalo = (props) => {
198
196
  const { type } = location?.query || {};
199
197
  const isEmbedded = type === EMBEDDED;
200
198
  const query = {
201
- layout: 'SMS',
199
+ layout: SMS,
202
200
  type: TAG,
203
201
  context:
204
202
  (data || '').toLowerCase() === ALL
@@ -454,7 +452,6 @@ export const Zalo = (props) => {
454
452
  <CapButton
455
453
  onClick={saveToMessage}
456
454
  disabled={isEditDoneDisabled()}
457
- className="whatsapp-create-btn"
458
455
  >
459
456
  <FormattedMessage {...globalMessages.done} />
460
457
  </CapButton>