@capillarytech/creatives-library 7.12.15 → 7.12.16
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/index.js +6 -0
- package/package.json +1 -1
- package/routes.js +7 -2
- package/services/api.js +8 -2
- package/v2Components/CapImageUpload/index.js +24 -11
- package/v2Components/CapImageUpload/index.scss +12 -27
- package/v2Components/CapImageUpload/messages.js +10 -5
- package/v2Components/TemplatePreview/_templatePreview.scss +10 -0
- package/v2Components/TemplatePreview/assets/images/sms_mobile_ios.svg +18 -0
- package/v2Components/TemplatePreview/index.js +41 -1
- package/v2Components/TemplatePreview/tests/__snapshots__/index.test.js.snap +33 -1
- package/v2Components/TemplatePreview/tests/index.test.js +7 -7
- package/v2Containers/App/constants.js +2 -1
- package/v2Containers/Assets/images/addCreativesIllustration.svg +30 -0
- package/v2Containers/Assets/images/rcsIllustration.png +0 -0
- package/v2Containers/Cap/messages.js +20 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +58 -11
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +41 -32
- package/v2Containers/CreativesContainer/constants.js +1 -0
- package/v2Containers/CreativesContainer/index.js +53 -1
- package/v2Containers/CreativesContainer/messages.js +4 -0
- package/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +24 -4
- package/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +23 -4
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +147 -2
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +98 -0
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +71 -0
- package/v2Containers/CreativesContainer/tests/index.test.js +21 -9
- package/v2Containers/Facebook/Advertisement/index.js +4 -2
- package/v2Containers/MobilePush/Edit/index.js +21 -34
- package/v2Containers/Rcs/actions.js +57 -0
- package/v2Containers/Rcs/constants.js +51 -0
- package/v2Containers/Rcs/index.js +1075 -0
- package/v2Containers/Rcs/index.scss +72 -0
- package/v2Containers/Rcs/messages.js +122 -0
- package/v2Containers/Rcs/reducer.js +107 -0
- package/v2Containers/Rcs/sagas.js +141 -0
- package/v2Containers/Rcs/selectors.js +8 -0
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +144496 -0
- package/v2Containers/Rcs/tests/index.test.js +226 -0
- package/v2Containers/Rcs/tests/mockData.js +166 -0
- package/v2Containers/Rcs/utils.js +40 -0
- package/v2Containers/SmsTrai/Edit/index.js +2 -0
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4 -4
- package/v2Containers/Templates/_templates.scss +9 -1
- package/v2Containers/Templates/actions.js +2 -1
- package/v2Containers/Templates/constants.js +1 -0
- package/v2Containers/Templates/index.js +234 -174
- package/v2Containers/Templates/messages.js +20 -0
- package/v2Containers/Templates/reducer.js +2 -0
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +520 -80
- package/v2Containers/TemplatesV2/index.js +13 -4
- package/v2Containers/TemplatesV2/messages.js +4 -0
- package/v2Containers/Whatsapp/index.js +4 -2
- package/v2Containers/Whatsapp/messages.js +0 -13
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +13 -13
- package/v2Containers/Whatsapp/tests/__snapshots__/utils.test.js.snap +32 -26
- package/v2Containers/mockdata.js +1 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { browserHistory } from 'react-router';
|
|
3
|
+
import { Provider } from 'react-redux';
|
|
4
|
+
import configureStore from '../../../store';
|
|
5
|
+
import { mountWithIntl } from '../../../../app/helpers/intl-enzym-test-helpers';
|
|
6
|
+
import { Rcs } from '../index';
|
|
7
|
+
import { mockData } from './mockData';
|
|
8
|
+
|
|
9
|
+
let store;
|
|
10
|
+
beforeAll(() => {
|
|
11
|
+
store = configureStore({}, browserHistory);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
jest.mock('../../CreativesContainer', () => ({
|
|
15
|
+
__esModule: true,
|
|
16
|
+
default: (props) => (
|
|
17
|
+
<div className="creatives-container-mock" {...props}>
|
|
18
|
+
CreativesContainer
|
|
19
|
+
</div>
|
|
20
|
+
),
|
|
21
|
+
}));
|
|
22
|
+
|
|
23
|
+
describe('Creatives rcs test/>', () => {
|
|
24
|
+
let renderedComponent;
|
|
25
|
+
const uploadRcsAsset = jest.fn();
|
|
26
|
+
const clearRcsAsset = jest.fn();
|
|
27
|
+
const createTemplate = jest.fn();
|
|
28
|
+
const clearCreateResponse = jest.fn();
|
|
29
|
+
const getTemplateDetails = jest.fn();
|
|
30
|
+
const editTemplate = jest.fn();
|
|
31
|
+
const clearEditResponse = jest.fn();
|
|
32
|
+
const fetchSchemaForEntity = jest.fn();
|
|
33
|
+
const onCreateComplete = jest.fn();
|
|
34
|
+
const handleClose = jest.fn();
|
|
35
|
+
const formatMessage = jest.fn();
|
|
36
|
+
const params = {
|
|
37
|
+
id: mockData.rcsData1.templateDetails._id,
|
|
38
|
+
};
|
|
39
|
+
const rcsData1 = mockData.rcsData1;
|
|
40
|
+
const rcsData2 = mockData.rcsData2;
|
|
41
|
+
const rcsData3 = mockData.rcsData3;
|
|
42
|
+
|
|
43
|
+
const renderHelper = (args) => {
|
|
44
|
+
renderedComponent = mountWithIntl(
|
|
45
|
+
<Provider store={store}>
|
|
46
|
+
<Rcs
|
|
47
|
+
actions={{
|
|
48
|
+
uploadRcsAsset,
|
|
49
|
+
clearRcsAsset,
|
|
50
|
+
createTemplate,
|
|
51
|
+
clearCreateResponse,
|
|
52
|
+
getTemplateDetails,
|
|
53
|
+
editTemplate,
|
|
54
|
+
clearEditResponse,
|
|
55
|
+
}}
|
|
56
|
+
globalActions={{ fetchSchemaForEntity }}
|
|
57
|
+
onCreateComplete={onCreateComplete}
|
|
58
|
+
handleClose={handleClose}
|
|
59
|
+
intl={{ formatMessage }}
|
|
60
|
+
location={args.isEditFlow ? mockData.location2 : mockData.location1}
|
|
61
|
+
params={args.params}
|
|
62
|
+
rcsData={args.rcsData}
|
|
63
|
+
isFullMode={args.isFullMode || true}
|
|
64
|
+
isEditFlow={args.isEditFlow || false}
|
|
65
|
+
loadingTags={false}
|
|
66
|
+
metaEntities={[]}
|
|
67
|
+
getDefaultTags={true}
|
|
68
|
+
isDltEnabled={args.isDltEnabled || false}
|
|
69
|
+
smsRegister={'DLT'}
|
|
70
|
+
/>
|
|
71
|
+
</Provider>,
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
it('should render create mode', () => {
|
|
76
|
+
renderHelper({});
|
|
77
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it('template name change', () => {
|
|
81
|
+
renderHelper({});
|
|
82
|
+
const templateNameRenderHelper = (val) => {
|
|
83
|
+
let event = { target: { value: val } };
|
|
84
|
+
renderedComponent
|
|
85
|
+
.find('#rcs_template_name_input')
|
|
86
|
+
.last()
|
|
87
|
+
.simulate('change', event);
|
|
88
|
+
};
|
|
89
|
+
templateNameRenderHelper('test_name');
|
|
90
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
91
|
+
templateNameRenderHelper('');
|
|
92
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it('template media change', () => {
|
|
96
|
+
renderHelper({});
|
|
97
|
+
const event = { target: { value: 'IMAGE' } };
|
|
98
|
+
expect(renderedComponent.find('CapRadioGroup').props().value).toBe('NONE');
|
|
99
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
100
|
+
renderedComponent.find('CapRadioGroup').props().onChange(event);
|
|
101
|
+
renderedComponent.update();
|
|
102
|
+
expect(renderedComponent.find('CapRadioGroup').props().value).toBe('IMAGE');
|
|
103
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it('template title change', () => {
|
|
107
|
+
renderHelper({});
|
|
108
|
+
const templateTitleRenderHelper = (val) => {
|
|
109
|
+
let event = { target: { value: val } };
|
|
110
|
+
renderedComponent
|
|
111
|
+
.find('#rcs-template-title-input')
|
|
112
|
+
.last()
|
|
113
|
+
.simulate('change', event);
|
|
114
|
+
};
|
|
115
|
+
templateTitleRenderHelper('test_title');
|
|
116
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
117
|
+
templateTitleRenderHelper('');
|
|
118
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it('template desc change', () => {
|
|
122
|
+
renderHelper({});
|
|
123
|
+
const templateDescRenderHelper = (val) => {
|
|
124
|
+
let event = { target: { value: val } };
|
|
125
|
+
renderedComponent
|
|
126
|
+
.find('#rcs_template_message_textarea')
|
|
127
|
+
.last()
|
|
128
|
+
.simulate('change', event);
|
|
129
|
+
};
|
|
130
|
+
templateDescRenderHelper('test_desc');
|
|
131
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
132
|
+
templateDescRenderHelper('');
|
|
133
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
it('non dlt fallback msg', () => {
|
|
137
|
+
renderHelper({});
|
|
138
|
+
const templateDescRenderHelper = (val) => {
|
|
139
|
+
let event = { target: { value: val } };
|
|
140
|
+
renderedComponent
|
|
141
|
+
.find('#rcs_fallback_message_textarea')
|
|
142
|
+
.last()
|
|
143
|
+
.simulate('change', event);
|
|
144
|
+
};
|
|
145
|
+
templateDescRenderHelper('test_nondlt_fallback');
|
|
146
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
147
|
+
templateDescRenderHelper('');
|
|
148
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
it('create with all data, non dlt org', () => {
|
|
152
|
+
renderHelper({});
|
|
153
|
+
createTemplate.mockImplementation((obj, callback) => {
|
|
154
|
+
callback();
|
|
155
|
+
});
|
|
156
|
+
expect(
|
|
157
|
+
renderedComponent.find('CapButton.rcs-done-btn').first().props().disabled,
|
|
158
|
+
).toBe(true);
|
|
159
|
+
renderedComponent
|
|
160
|
+
.find('#rcs_template_name_input')
|
|
161
|
+
.last()
|
|
162
|
+
.simulate('change', { target: { value: 'final_name' } });
|
|
163
|
+
renderedComponent
|
|
164
|
+
.find('#rcs-template-title-input')
|
|
165
|
+
.last()
|
|
166
|
+
.simulate('change', { target: { value: 'final_title' } });
|
|
167
|
+
renderedComponent
|
|
168
|
+
.find('#rcs_template_message_textarea')
|
|
169
|
+
.last()
|
|
170
|
+
.simulate('change', { target: { value: 'final_desc' } });
|
|
171
|
+
expect(
|
|
172
|
+
renderedComponent.find('CapButton.fallback-preview-btn').first().props()
|
|
173
|
+
.disabled,
|
|
174
|
+
).toBe(true);
|
|
175
|
+
renderedComponent
|
|
176
|
+
.find('#rcs_fallback_message_textarea')
|
|
177
|
+
.last()
|
|
178
|
+
.simulate('change', { target: { value: 'final_fallback' } });
|
|
179
|
+
expect(
|
|
180
|
+
renderedComponent.find('CapButton.fallback-preview-btn').first().props()
|
|
181
|
+
.disabled,
|
|
182
|
+
).toBe(false);
|
|
183
|
+
renderedComponent.find('CapButton.fallback-preview-btn').simulate('click');
|
|
184
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
185
|
+
expect(
|
|
186
|
+
renderedComponent.find('CapButton.rcs-done-btn').first().props().disabled,
|
|
187
|
+
).toBe(false);
|
|
188
|
+
renderedComponent.find('CapButton.rcs-done-btn').simulate('click');
|
|
189
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
it('should render edit mode in various cases', () => {
|
|
193
|
+
//non dlt fallback
|
|
194
|
+
renderHelper({
|
|
195
|
+
params,
|
|
196
|
+
rcsData: rcsData1,
|
|
197
|
+
isEditFlow: true,
|
|
198
|
+
});
|
|
199
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
200
|
+
//dlt enabled but no fallback
|
|
201
|
+
renderHelper({
|
|
202
|
+
params,
|
|
203
|
+
rcsData: rcsData2,
|
|
204
|
+
isEditFlow: true,
|
|
205
|
+
isDltEnabled: true,
|
|
206
|
+
});
|
|
207
|
+
renderedComponent.find('CapButton.add-dlt-btn').simulate('click');
|
|
208
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
it('rcs edit with dlt fallback and save', () => {
|
|
212
|
+
editTemplate.mockImplementation((obj, callback) => {
|
|
213
|
+
callback();
|
|
214
|
+
});
|
|
215
|
+
//dlt fallback
|
|
216
|
+
renderHelper({
|
|
217
|
+
params,
|
|
218
|
+
rcsData: rcsData3,
|
|
219
|
+
isEditFlow: true,
|
|
220
|
+
isDltEnabled: true,
|
|
221
|
+
});
|
|
222
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
223
|
+
renderedComponent.find('CapButton.rcs-done-btn').simulate('click');
|
|
224
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
225
|
+
});
|
|
226
|
+
});
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
export const mockData = {
|
|
2
|
+
rcsData1: {
|
|
3
|
+
templateDetails: {
|
|
4
|
+
_id: '623acf4df971231e66c85882',
|
|
5
|
+
name: 'RCS_TEST1',
|
|
6
|
+
type: 'RCS',
|
|
7
|
+
versions: {
|
|
8
|
+
history: [],
|
|
9
|
+
base: {
|
|
10
|
+
content: {
|
|
11
|
+
RCS: {
|
|
12
|
+
cardContent: [
|
|
13
|
+
{
|
|
14
|
+
title: 'This is RCS title',
|
|
15
|
+
description: 'This is RCS description ',
|
|
16
|
+
mediaType: 'IMAGE',
|
|
17
|
+
media: {
|
|
18
|
+
mediaUrl:
|
|
19
|
+
'https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/62f8c77c-f132-44d8-a822-0e90f57c.jpg',
|
|
20
|
+
height: 'MEDIUM',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
cardSettings: {
|
|
25
|
+
cardOrientation: 'VERTICAL',
|
|
26
|
+
},
|
|
27
|
+
cardType: 'STANDALONE',
|
|
28
|
+
contentType: 'RICHCARD',
|
|
29
|
+
smsFallBackContent: {
|
|
30
|
+
message: 'This is fallback msg ',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
isActive: true,
|
|
37
|
+
orgId: 50146,
|
|
38
|
+
createdBy: '15000449',
|
|
39
|
+
updatedBy: '15000449',
|
|
40
|
+
createdAt: '2022-03-23T07:42:05.226Z',
|
|
41
|
+
updatedAt: '2022-03-30T03:25:24.084Z',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
rcsData2: {
|
|
45
|
+
templateDetails: {
|
|
46
|
+
_id: '62419c0a70387f3eb2f8fdcd',
|
|
47
|
+
name: 'RCS_TEST2',
|
|
48
|
+
type: 'RCS',
|
|
49
|
+
versions: {
|
|
50
|
+
history: [],
|
|
51
|
+
base: {
|
|
52
|
+
content: {
|
|
53
|
+
RCS: {
|
|
54
|
+
cardContent: [
|
|
55
|
+
{
|
|
56
|
+
title: 'Rcs title',
|
|
57
|
+
description: 'Rcs desc',
|
|
58
|
+
mediaType: 'NONE',
|
|
59
|
+
media: {
|
|
60
|
+
mediaUrl: '',
|
|
61
|
+
height: 'MEDIUM',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
cardSettings: {
|
|
66
|
+
cardOrientation: 'VERTICAL',
|
|
67
|
+
},
|
|
68
|
+
cardType: 'STANDALONE',
|
|
69
|
+
contentType: 'RICHCARD',
|
|
70
|
+
smsFallBackContent: {
|
|
71
|
+
message: '',
|
|
72
|
+
templateConfigs: {},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
isActive: true,
|
|
79
|
+
orgId: 1604,
|
|
80
|
+
createdBy: '15000449',
|
|
81
|
+
updatedBy: '15000449',
|
|
82
|
+
createdAt: '2022-03-28T11:29:15.072Z',
|
|
83
|
+
updatedAt: '2022-03-30T03:30:21.273Z',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
rcsData3: {
|
|
87
|
+
templateDetails: {
|
|
88
|
+
_id: '62419c0a70387f3eb2f8fdcd',
|
|
89
|
+
name: 'RCS_TEST3',
|
|
90
|
+
type: 'RCS',
|
|
91
|
+
versions: {
|
|
92
|
+
history: [],
|
|
93
|
+
base: {
|
|
94
|
+
content: {
|
|
95
|
+
RCS: {
|
|
96
|
+
cardContent: [
|
|
97
|
+
{
|
|
98
|
+
title: 'Rcs title',
|
|
99
|
+
description: 'Rcs desc',
|
|
100
|
+
mediaType: 'IMAGE',
|
|
101
|
+
media: {
|
|
102
|
+
mediaUrl:
|
|
103
|
+
'https://s3.amazonaws.com/test_files_cache_bkp/intouch_creative_assets/8fcb2fdce8f92e4a48d4.png',
|
|
104
|
+
height: 'MEDIUM',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
cardSettings: {
|
|
109
|
+
cardOrientation: 'VERTICAL',
|
|
110
|
+
},
|
|
111
|
+
cardType: 'STANDALONE',
|
|
112
|
+
contentType: 'RICHCARD',
|
|
113
|
+
smsFallBackContent: {
|
|
114
|
+
message:
|
|
115
|
+
'Dear Linen Club Rewards member, your Coupon code for Rs test is test. Kindly show it to the cashier before billing. Conditions Apply. test',
|
|
116
|
+
templateConfigs: {
|
|
117
|
+
templateId: '1007983204882734091',
|
|
118
|
+
templateName: 'Coupon Resend',
|
|
119
|
+
template:
|
|
120
|
+
'Dear Linen Club Rewards member, your Coupon code for Rs {#var#} is {#var#}. Kindly show it to the cashier before billing. Conditions Apply. {#var#}',
|
|
121
|
+
registeredSenderIds: ['LINNCL', 'LINNCB'],
|
|
122
|
+
templateVariableMapping: {
|
|
123
|
+
'{#var#}_5': {
|
|
124
|
+
count: 1,
|
|
125
|
+
data: 'test',
|
|
126
|
+
},
|
|
127
|
+
'{#var#}_3': {
|
|
128
|
+
count: 1,
|
|
129
|
+
data: 'test',
|
|
130
|
+
},
|
|
131
|
+
'{#var#}_1': {
|
|
132
|
+
count: 1,
|
|
133
|
+
data: 'test',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
isActive: true,
|
|
143
|
+
orgId: 1604,
|
|
144
|
+
createdBy: '15000449',
|
|
145
|
+
updatedBy: '15000449',
|
|
146
|
+
createdAt: '2022-03-28T11:29:15.072Z',
|
|
147
|
+
updatedAt: '2022-03-30T03:29:30.271Z',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
location1: {
|
|
151
|
+
pathname: '/rcs/create',
|
|
152
|
+
query: {
|
|
153
|
+
type: false,
|
|
154
|
+
module: 'default',
|
|
155
|
+
},
|
|
156
|
+
search: '',
|
|
157
|
+
},
|
|
158
|
+
location2: {
|
|
159
|
+
pathname: '/rcs/edit',
|
|
160
|
+
query: {
|
|
161
|
+
type: false,
|
|
162
|
+
module: 'default',
|
|
163
|
+
},
|
|
164
|
+
search: '',
|
|
165
|
+
},
|
|
166
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CapLabel from '@capillarytech/cap-ui-library/CapLabel';
|
|
3
|
+
import CapImage from '@capillarytech/cap-ui-library/CapImage';
|
|
4
|
+
import { RCS } from '../CreativesContainer/constants';
|
|
5
|
+
import './index.scss';
|
|
6
|
+
export const getRCSContent = (template) => {
|
|
7
|
+
const {
|
|
8
|
+
versions: {
|
|
9
|
+
base: {
|
|
10
|
+
content: {
|
|
11
|
+
[RCS]: {
|
|
12
|
+
cardContent = [{}],
|
|
13
|
+
} = {},
|
|
14
|
+
} = {},
|
|
15
|
+
} = {},
|
|
16
|
+
} = {},
|
|
17
|
+
} = template;
|
|
18
|
+
const { media = {}, description, title } = cardContent[0];
|
|
19
|
+
const { mediaUrl } = media;
|
|
20
|
+
return (
|
|
21
|
+
<div className="cap-rcs-creatives">
|
|
22
|
+
{mediaUrl && (
|
|
23
|
+
<CapImage
|
|
24
|
+
src={mediaUrl}
|
|
25
|
+
className="rcs-listing-image"
|
|
26
|
+
/>
|
|
27
|
+
)}
|
|
28
|
+
<CapLabel
|
|
29
|
+
type="label19"
|
|
30
|
+
className="rcs-listing-content title"
|
|
31
|
+
fontWeight="bold"
|
|
32
|
+
>
|
|
33
|
+
{title}
|
|
34
|
+
</CapLabel>
|
|
35
|
+
<CapLabel type="label19" className="rcs-listing-content desc">
|
|
36
|
+
{description}
|
|
37
|
+
</CapLabel>
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
@@ -70,6 +70,7 @@ export const SmsTraiEdit = (props) => {
|
|
|
70
70
|
isFullMode,
|
|
71
71
|
getFormSubscriptionData,
|
|
72
72
|
templateData = {},
|
|
73
|
+
selectedOfferDetails,
|
|
73
74
|
} = props || {};
|
|
74
75
|
const { formatMessage } = intl;
|
|
75
76
|
const [loading, updateLoading] = useState(true);
|
|
@@ -565,6 +566,7 @@ export const SmsTraiEdit = (props) => {
|
|
|
565
566
|
onContextChange={handleOnTagsContextChange}
|
|
566
567
|
injectedTags={injectedTags || {}}
|
|
567
568
|
hidePopover={disablehandler()}
|
|
569
|
+
selectedOfferDetails={selectedOfferDetails}
|
|
568
570
|
/>
|
|
569
571
|
}
|
|
570
572
|
/>
|
|
@@ -6071,7 +6071,7 @@ FREE GIFTS-
|
|
|
6071
6071
|
/>
|
|
6072
6072
|
</CapImage>
|
|
6073
6073
|
<div
|
|
6074
|
-
className="
|
|
6074
|
+
className="msg-container sms"
|
|
6075
6075
|
>
|
|
6076
6076
|
<div
|
|
6077
6077
|
className="message-pop sms"
|
|
@@ -12754,7 +12754,7 @@ FREE GIFTS-
|
|
|
12754
12754
|
/>
|
|
12755
12755
|
</CapImage>
|
|
12756
12756
|
<div
|
|
12757
|
-
className="
|
|
12757
|
+
className="msg-container sms"
|
|
12758
12758
|
>
|
|
12759
12759
|
<div
|
|
12760
12760
|
className="message-pop sms"
|
|
@@ -19857,7 +19857,7 @@ FREE GIFTS-
|
|
|
19857
19857
|
/>
|
|
19858
19858
|
</CapImage>
|
|
19859
19859
|
<div
|
|
19860
|
-
className="
|
|
19860
|
+
className="msg-container sms"
|
|
19861
19861
|
>
|
|
19862
19862
|
<div
|
|
19863
19863
|
className="message-pop sms"
|
|
@@ -27069,7 +27069,7 @@ FREE GIFTS-
|
|
|
27069
27069
|
/>
|
|
27070
27070
|
</CapImage>
|
|
27071
27071
|
<div
|
|
27072
|
-
className="
|
|
27072
|
+
className="msg-container sms"
|
|
27073
27073
|
>
|
|
27074
27074
|
<div
|
|
27075
27075
|
className="message-pop sms"
|
|
@@ -574,9 +574,17 @@
|
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
|
|
577
|
-
.
|
|
577
|
+
.illustration-desc {
|
|
578
578
|
font-size: 14px;
|
|
579
579
|
color: rgba(0, 0, 0, 0.87);
|
|
580
580
|
margin: 8px 0;
|
|
581
581
|
white-space: pre-wrap;
|
|
582
582
|
}
|
|
583
|
+
.rcs-illustration{
|
|
584
|
+
width: 25%;
|
|
585
|
+
text-align: center;
|
|
586
|
+
}
|
|
587
|
+
.channel-specific-illustration-text{
|
|
588
|
+
text-align: center;
|
|
589
|
+
margin-top: $CAP_SPACE_44;
|
|
590
|
+
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as types from './constants';
|
|
8
|
-
import { LINE, WHATSAPP } from '../CreativesContainer/constants';
|
|
8
|
+
import { LINE, WHATSAPP, RCS } from '../CreativesContainer/constants';
|
|
9
9
|
|
|
10
10
|
export function getAllTemplates(channel, queryParams) {
|
|
11
11
|
return {
|
|
@@ -59,6 +59,7 @@ export function setChannelAccount(channel, account) {
|
|
|
59
59
|
const channelTypeMapping = {
|
|
60
60
|
[LINE]: types.SET_LINE_ACCOUNT,
|
|
61
61
|
[WHATSAPP]: types.SET_WHATSAPP_ACCOUNT,
|
|
62
|
+
[RCS]: types.SET_RCS_ACCOUNT,
|
|
62
63
|
};
|
|
63
64
|
if (channelTypeMapping[channel]) {
|
|
64
65
|
return {
|
|
@@ -46,6 +46,7 @@ export const SET_LINE_ACCOUNT = "app/v2Containers/Templates/SET_LINE_ACCOUNT";
|
|
|
46
46
|
export const SET_VIBER_ACCOUNT = "app/v2Containers/Templates/SET_VIBER_ACCOUNT";
|
|
47
47
|
export const SET_FACEBOOK_ACCOUNT = "app/v2Containers/Templates/SET_FACEBOOK_ACCOUNT";
|
|
48
48
|
export const SET_WHATSAPP_ACCOUNT = "app/v2Containers/Templates/SET_WHATSAPP_ACCOUNT";
|
|
49
|
+
export const SET_RCS_ACCOUNT = "app/v2Containers/Templates/SET_RCS_ACCOUNT";
|
|
49
50
|
|
|
50
51
|
export const GET_DEAFULT_BEE_TEMPLATES_REQUEST = 'app/v2Containers/Templates/GET_DEAFULT_BEE_TEMPLATES_REQUEST';
|
|
51
52
|
export const GET_DEAFULT_BEE_TEMPLATES_SUCCESS = 'app/v2Containers/Templates/GET_DEAFULT_BEE_TEMPLATES_SUCCESS';
|