@capillarytech/creatives-library 8.0.218 → 8.0.219

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/config/app.js CHANGED
@@ -21,6 +21,7 @@ const config = {
21
21
  },
22
22
  development: {
23
23
  api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/creatives',
24
+ // api_endpoint: 'http://localhost:2022/arya/api/v1/creatives',
24
25
  campaigns_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/campaigns',
25
26
  campaigns_api_org_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/org/campaign',
26
27
  auth_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/auth',
@@ -187,3 +187,5 @@ export const LOGOUT_FAILURE = 'cap/LOGOUT_FAILURE';
187
187
  export const JAPANESE_HELP_TEXT = 'ヘルプ :トークンの定義';
188
188
 
189
189
  export const TAG_TRANSLATION_DOC = 'https://docs.capillarytech.com/docs/tags-translation';
190
+
191
+ export const CAPILLARY_LOADING_LOGO = 'https://storage.crm.n.content-cdn.io/capillary/capillary_loading_logo.gif';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.218",
4
+ "version": "8.0.219",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
package/services/api.js CHANGED
@@ -264,6 +264,7 @@ export const getUserData = () => {
264
264
 
265
265
  export const createTemplate = ({template}) => {
266
266
  const url = `${API_ENDPOINT}/templates/SMS`;
267
+ console.log("creating template",template);
267
268
  return request(url, getAPICallObject('POST', template));
268
269
  };
269
270
 
@@ -346,6 +347,7 @@ export const getAllTemplates = async ({channel, queryParams = {}}) => {
346
347
 
347
348
  export const deleteTemplate = ({channel, id}) => {
348
349
  const url = `${API_ENDPOINT}/templates/${id}/${channel}`;
350
+ console.log("deleting template", url);
349
351
  return request(url, getAPICallObject('DELETE'));
350
352
  //return API.deleteResource(url);
351
353
  };
@@ -54,6 +54,7 @@ import { v2ViberSagas } from '../Viber/sagas';
54
54
  import { v2FacebookSagas } from '../Facebook/sagas';
55
55
  import createReducer from '../Line/Container/reducer';
56
56
  import { DAEMON } from '@capillarytech/vulcan-react-sdk/utils/sagaInjectorTypes';
57
+ import {CAPILLARY_LOADING_LOGO} from '../../constants/unified';
57
58
  const gtm = window.dataLayer || [];
58
59
  const {
59
60
  logNewTab,
@@ -510,8 +511,12 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
510
511
  <div className="cap-loader-box">
511
512
  <img
512
513
  className="loader-image"
513
- src="https://s3.amazonaws.com/fileservice.in/intouch_creative_assets/88561f46de9407021cad.gif"
514
- alt="Capillary"/>
514
+ src={CAPILLARY_LOADING_LOGO}
515
+ alt="Capillary"
516
+ loading="lazy"
517
+ data-testid="capillary-logo"
518
+ aria-label="Capillary loading logo"
519
+ />
515
520
  </div> : <>
516
521
  <Helmet
517
522
  titleTemplate="Capillary - %s"
@@ -392,7 +392,9 @@ export function SlideBoxContent(props) {
392
392
  };
393
393
  }
394
394
  default:
395
+ {
395
396
  return get(templateDataObject, `versions.base.content`);
397
+ }
396
398
  }
397
399
  };
398
400
 
@@ -577,6 +577,7 @@ export class Creatives extends React.Component {
577
577
  varMapped,
578
578
  category,
579
579
  language,
580
+ templateId,
580
581
  buttonType = 'NONE',
581
582
  buttons = [],
582
583
  mediaType = 'TEXT',
@@ -635,6 +636,7 @@ export class Creatives extends React.Component {
635
636
  category,
636
637
  varMapped,
637
638
  mediaType,
639
+ templateId,
638
640
  ...mediaParams,
639
641
  buttonType,
640
642
  buttons: modifiedButtons,
@@ -943,6 +945,7 @@ export class Creatives extends React.Component {
943
945
  buttonType = 'NONE',
944
946
  buttons = [],
945
947
  imageUrl = '',
948
+ templateId = '',
946
949
  videoUrl = '',
947
950
  documentUrl = '',
948
951
  videoPreviewImg = '',
@@ -1019,6 +1022,7 @@ export class Creatives extends React.Component {
1019
1022
  name: template?.value?.name,
1020
1023
  template: templateEditor,
1021
1024
  varMapped,
1025
+ templateId,
1022
1026
  category,
1023
1027
  language: languages[0].language,
1024
1028
  ...(mediaType !== WHATSAPP_MEDIA_TYPES.CAROUSEL && {
@@ -1186,6 +1186,7 @@ exports[`Test SlideBoxContent container Should render correct component for what
1186
1186
  ],
1187
1187
  "templateFooterPreview": "",
1188
1188
  "templateHeaderPreview": "",
1189
+ "templateId": "720951875646523",
1189
1190
  "templateMsg": <CapLabel
1190
1191
  type="label5"
1191
1192
  >
@@ -14,6 +14,7 @@ import LoginForm from './components/LoginForm';
14
14
  import * as actions from '../Cap/actions';
15
15
  import { UserIsNotAuthenticated } from '../../utils/authWrapper';
16
16
  const logo = require('./assets/images/capillary_logo.png');
17
+ import {CAPILLARY_LOADING_LOGO} from '../../constants/unified';
17
18
 
18
19
  export class Login extends React.Component { // eslint-disable-line react/prefer-stateless-function
19
20
  constructor(props) {
@@ -65,8 +66,12 @@ export class Login extends React.Component { // eslint-disable-line react/prefer
65
66
  ? <div className="cap-loader-box">
66
67
  <img
67
68
  className="loader-image"
68
- src={"https://storage.crm.n.content-cdn.io/capillary/capillary_loading_logo.gif"}
69
- alt="Capillary"/>
69
+ src={CAPILLARY_LOADING_LOGO}
70
+ alt="Capillary"
71
+ loading="lazy"
72
+ data-testid="capillary-logo"
73
+ aria-label="Capillary loading logo"
74
+ />
70
75
  </div>
71
76
  : <Col className="login-box" style={{textAlign: 'center'}}>
72
77
  <h2 className="ui image header">