@capillarytech/creatives-library 6.6.5 → 6.7.1
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.
|
@@ -577,7 +577,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
577
577
|
licenseCode: selectedWeChatAccount.sourceAccountIdentifier,
|
|
578
578
|
};
|
|
579
579
|
if (this.props.location.query && this.props.location.query.module !== 'dvs') {
|
|
580
|
-
obj.definition.mode = this
|
|
580
|
+
obj.definition.mode = _.get(this, 'props.Edit.templateDetails.mode', '');
|
|
581
581
|
}
|
|
582
582
|
const android = {};
|
|
583
583
|
Object.keys(formData[0]).forEach((data) => {
|
package/index.html
CHANGED
|
@@ -10,10 +10,7 @@
|
|
|
10
10
|
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
|
11
11
|
<meta http-equiv="Pragma" content="no-cache" />
|
|
12
12
|
<meta http-equiv="Expires" content="0" />
|
|
13
|
-
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
14
13
|
<script src="https://use.typekit.net/ifw1ntv.js"></script>
|
|
15
|
-
<!-- Roboto Font -->
|
|
16
|
-
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500" rel="stylesheet">
|
|
17
14
|
<!-- Google Tag Manager -->
|
|
18
15
|
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
19
16
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
@@ -43,5 +40,8 @@
|
|
|
43
40
|
</div>
|
|
44
41
|
</div>
|
|
45
42
|
<!-- A lot of magic happens in this file. HtmlWebpackPlugin automatically includes all assets (e.g. bundle.js, main.css) with the correct HTML tags, which is why they are missing in this HTML file. Don't add any assets here! (Check out webpackconfig.js if you want to know more) -->
|
|
43
|
+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons&display=swap" rel="stylesheet">
|
|
44
|
+
<!-- Roboto Font -->
|
|
45
|
+
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap" rel="stylesheet">
|
|
46
46
|
</body>
|
|
47
47
|
</html>
|
package/package.json
CHANGED
package/services/api.js
CHANGED
|
@@ -239,7 +239,7 @@ export const getTemplateDetails = ({id, channel}) => {
|
|
|
239
239
|
|
|
240
240
|
export const getAllTemplates = ({channel, queryParams}) => {
|
|
241
241
|
console.log('in api.js', channel, queryParams);
|
|
242
|
-
const url = `${API_ENDPOINT}/templates/${channel}?query=${JSON.stringify(queryParams)}`;
|
|
242
|
+
const url = `${API_ENDPOINT}/templates/${channel}?query=${encodeURIComponent(JSON.stringify(queryParams))}`;
|
|
243
243
|
return request(url, getAPICallObject('GET'));
|
|
244
244
|
};
|
|
245
245
|
|
|
@@ -2578,8 +2578,13 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2578
2578
|
);
|
|
2579
2579
|
|
|
2580
2580
|
showTestAndPreviewIcons = (action) => {
|
|
2581
|
-
const
|
|
2582
|
-
const
|
|
2581
|
+
const { formData = [] } = this.state;
|
|
2582
|
+
const { selectedLanguages = [] } = formData && formData[0];
|
|
2583
|
+
const previewContent = formData[0] &&
|
|
2584
|
+
selectedLanguages &&
|
|
2585
|
+
formData[0][selectedLanguages[0]] &&
|
|
2586
|
+
formData[0][selectedLanguages[0]]['template-content'];
|
|
2587
|
+
const previewSubject = formData['template-subject'];
|
|
2583
2588
|
const testOrPreviewProps = {channel: EMAIL, content: previewContent, subject: previewSubject};
|
|
2584
2589
|
const { onPreviewContentClicked, onTestContentClicked } = this.props;
|
|
2585
2590
|
return (
|
|
@@ -343,16 +343,16 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
343
343
|
licenseCode: selectedWeChatAccount.sourceAccountIdentifier,
|
|
344
344
|
};
|
|
345
345
|
if (this.props.location.query && this.props.location.query.module !== 'dvs') {
|
|
346
|
-
obj.definition.mode = this
|
|
346
|
+
obj.definition.mode = get(this, 'props.Edit.templateDetails.mode', '') || get(this, 'props.Edit.templateDetails.definition.mode', '');
|
|
347
347
|
}
|
|
348
348
|
const android = {};
|
|
349
|
-
Object.keys(formData[0]).forEach((data) => {
|
|
349
|
+
Object.keys(formData[0] || {}).forEach((data) => {
|
|
350
350
|
if (!!formData[0][data] && data !== "tabKey") {
|
|
351
351
|
android[data] = formData[0][data];
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
354
|
const ios = {};
|
|
355
|
-
Object.keys(formData[1]).forEach((data) => {
|
|
355
|
+
Object.keys(formData[1] || {}).forEach((data) => {
|
|
356
356
|
if (!!formData[1][data] && data !== "tabKey") {
|
|
357
357
|
ios[data] = formData[1][data];
|
|
358
358
|
}
|