@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 +1 -1
- package/v2Containers/CreativesContainer/actions.js +2 -1
- package/v2Containers/CreativesContainer/constants.js +1 -1
- package/v2Containers/CreativesContainer/index.js +3 -0
- package/v2Containers/CreativesContainer/tests/index.test.js +4 -0
- package/v2Containers/Templates/actions.js +6 -0
- package/v2Containers/Templates/constants.js +4 -0
- package/v2Containers/Templates/sagas.js +1 -2
- package/v2Containers/TemplatesV2/actions.js +0 -6
- package/v2Containers/TemplatesV2/constants.js +0 -4
- package/v2Containers/TemplatesV2/index.js +5 -1
package/package.json
CHANGED
|
@@ -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
|
};
|
|
@@ -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
|
}
|
|
@@ -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
|
|
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
|
|