@capillarytech/creatives-library 7.12.107 → 7.12.109

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.12.107",
4
+ "version": "7.12.109",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -8,6 +8,7 @@ import {
8
8
  DEFAULT_ACTION,
9
9
  HIDE_CONTAINER_LOADER,
10
10
  SHOW_CONTANER_LOADER,
11
+ GET_CDN_TRANSFORMATION_CONFIG_REQUEST
11
12
  } from './constants';
12
13
 
13
14
  export function defaultAction() {
@@ -24,4 +25,4 @@ export function hideCreativesContanerLoader() {
24
25
  return {
25
26
  type: HIDE_CONTAINER_LOADER,
26
27
  };
27
- }
28
+ }
@@ -22,4 +22,4 @@ export const RCS = "RCS";
22
22
  export const SHOW_CONTANER_LOADER = "app/CreativesContainer/SHOW_CONTANER_LOADER";
23
23
  export const HIDE_CONTAINER_LOADER = "app/CreativesContainer/HIDE_CONTAINER_LOADER";
24
24
 
25
- export const WHATSAPP_HELP_DOC_LINK = "https://support.capillarytech.com/en/support/solutions/articles/4000180620-create-whatsapp-template";
25
+ export const WHATSAPP_HELP_DOC_LINK = "https://support.capillarytech.com/en/support/solutions/articles/4000180620-create-whatsapp-template";
@@ -77,6 +77,9 @@ export class Creatives extends React.Component {
77
77
 
78
78
  componentDidMount() {
79
79
  GA.timeTracker.startTimer(CREATIVES_CONTAINER);
80
+ if(!this.props?.isFullMode){
81
+ this.props?.templateActions.getCdnTransformationConfig();
82
+ }
80
83
  }
81
84
 
82
85
  onEnterTemplateName = () => {
@@ -26,6 +26,7 @@ jest.mock('../../../v2Components/FormBuilder', () => ({
26
26
  describe('Test SlideBoxContent container', () => {
27
27
  const handleCloseCreatives = jest.fn();
28
28
  const getCreativesData = jest.fn();
29
+ const getCdnTransformationConfig = jest.fn();
29
30
  let renderedComponent;
30
31
 
31
32
  beforeEach(() => {
@@ -41,6 +42,9 @@ describe('Test SlideBoxContent container', () => {
41
42
  templateData={templateData}
42
43
  handleCloseCreatives={handleCloseCreatives}
43
44
  getCreativesData={getCreativesData}
45
+ templateActions={{
46
+ getCdnTransformationConfig
47
+ }}
44
48
  />,
45
49
  );
46
50
  };
@@ -150,3 +150,9 @@ export function getSenderDetails(data = {}) {
150
150
  ...data,
151
151
  };
152
152
  }
153
+
154
+ export function getCdnTransformationConfig() {
155
+ return {
156
+ type: types.GET_CDN_TRANSFORMATION_CONFIG_REQUEST,
157
+ }
158
+ }
@@ -68,3 +68,7 @@ export const GET_SENDER_DETAILS_SUCCESS =
68
68
  'app/v2Containers/Templates/GET_SENDER_DETAILS_SUCCESS';
69
69
  export const GET_SENDER_DETAILS_FAILURE =
70
70
  'app/v2Containers/Templates/GET_SENDER_DETAILS_FAILURE';
71
+
72
+ export const GET_CDN_TRANSFORMATION_CONFIG_REQUEST = 'app/v2Containers/Templates/GET_CDN_TRANSFORMATION_CONFIG_REQUEST';
73
+ export const GET_CDN_TRANSFORMATION_CONFIG_SUCCESS = 'app/v2Containers/Templates/GET_CDN_TRANSFORMATION_CONFIG_SUCCESS';
74
+ export const GET_CDN_TRANSFORMATION_CONFIG_FAILURE = 'app/v2Containers/Templates/GET_CDN_TRANSFORMATION_CONFIG_FAILURE';
@@ -4,7 +4,6 @@ import { LOCATION_CHANGE } from 'react-router-redux';
4
4
  import * as Api from '../../services/api';
5
5
  import * as types from './constants';
6
6
  import { saveCdnConfigs, removeAllCdnLocalStorageItems } from '../../utils/cdnTransformation';
7
- import { GET_CDN_TRANSFORMATION_CONFIG_REQUEST } from '../TemplatesV2/constants';
8
7
 
9
8
  // Individual exports for testing
10
9
  export function* getAllTemplates(channel, queryParams) {
@@ -240,7 +239,7 @@ function* watchGetSenderDetails() {
240
239
 
241
240
  function* watchGetCdnTransformationConfig() {
242
241
  yield takeLatest(
243
- GET_CDN_TRANSFORMATION_CONFIG_REQUEST,
242
+ types.GET_CDN_TRANSFORMATION_CONFIG_REQUEST,
244
243
  getCdnTransformationConfig
245
244
  );
246
245
  }
@@ -14,9 +14,3 @@ export function getTemplates({channel, query}) {
14
14
  query,
15
15
  };
16
16
  }
17
-
18
- export function getCdnTransformationConfig() {
19
- return {
20
- type: types.GET_CDN_TRANSFORMATION_CONFIG_REQUEST,
21
- }
22
- }
@@ -8,7 +8,3 @@ export const DEFAULT_ACTION = 'app/TemplatesV2/DEFAULT_ACTION';
8
8
  export const GET_TEMPLATES_REQUEST = 'app/TemplatesV2/GET_TEMPLATES_REQUEST';
9
9
  export const GET_TEMPLATES_SUCESS = 'app/TemplatesV2/GET_TEMPLATES_SUCESS';
10
10
  export const GET_TEMPLATES_FAILURE = 'app/TemplatesV2/GET_TEMPLATES_FAILURE';
11
-
12
- export const GET_CDN_TRANSFORMATION_CONFIG_REQUEST = 'creatives/GET_CDN_TRANSFORMATION_CONFIG_REQUEST/V2';
13
- export const GET_CDN_TRANSFORMATION_CONFIG_SUCCESS = 'creatives/GET_CDN_TRANSFORMATION_CONFIG_SUCCESS/V2';
14
- export const GET_CDN_TRANSFORMATION_CONFIG_FAILURE = 'creatives/GET_CDN_TRANSFORMATION_CONFIG_FAILURE/V2';
@@ -19,6 +19,7 @@ import { UserIsAuthenticated } from '../../utils/authWrapper';
19
19
  import { makeSelectTemplates, makeSelectTemplatesResponse } from '../Templates/selectors';
20
20
  import messages from './messages';
21
21
  import * as actions from './actions';
22
+ import * as templateActions from '../Templates/actions';
22
23
  import Templates from '../Templates';
23
24
  import CallTask from '../CallTask';
24
25
  import Facebook from '../Facebook';
@@ -139,7 +140,9 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
139
140
  if (queryItems.channel === WHATSAPP) {
140
141
  this.channelChange(WHATSAPP);
141
142
  }
142
- this.props.actions.getCdnTransformationConfig();
143
+ if(this.props?.isFullMode){
144
+ this.props.templateActions.getCdnTransformationConfig();
145
+ }
143
146
  }
144
147
 
145
148
  componentWillReceiveProps(nextProps) {
@@ -351,6 +354,7 @@ const mapStateToProps = createStructuredSelector({
351
354
  function mapDispatchToProps(dispatch) {
352
355
  return {
353
356
  actions: bindActionCreators(actions, dispatch),
357
+ templateActions: bindActionCreators(templateActions, dispatch),
354
358
  };
355
359
  }
356
360