@capillarytech/creatives-library 8.0.139 → 8.0.141
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/containers/Cap/tests/__snapshots__/index.test.js.snap +1 -0
- package/package.json +2 -2
- package/translations/en.json +1 -0
- package/utils/content.js +15 -0
- package/utils/tests/tagValidations.test.js +112 -0
- package/v2Components/FormBuilder/index.js +12 -1
- package/v2Components/FormBuilder/messages.js +4 -0
- package/v2Containers/Cap/constants.js +7 -0
- package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +1 -0
- package/v2Containers/Email/index.js +9 -0
- package/v2Containers/Email/messages.js +4 -0
- package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +5 -0
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +3 -0
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -0
- package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +25 -0
- package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +18 -0
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +111 -0
- package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +4 -0
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +8 -0
- package/v2Containers/Templates/index.js +5 -0
- package/v2Containers/Templates/sagas.js +4 -1
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +132 -0
|
@@ -271,6 +271,7 @@ exports[`Creatives SmsTraiCreate test/> done button should be disabled if blank
|
|
|
271
271
|
"creatives.componentsV2.FTP.message": "Message",
|
|
272
272
|
"creatives.componentsV2.FTP.search": "Search",
|
|
273
273
|
"creatives.componentsV2.Footer.header": "This is the Footer component !",
|
|
274
|
+
"creatives.componentsV2.FormBuilder.base64ImageError": "Base64 images are not allowed. Please upload your image to a gallery and use it, or add the image URL instead.",
|
|
274
275
|
"creatives.componentsV2.FormBuilder.cancel": "Cancel",
|
|
275
276
|
"creatives.componentsV2.FormBuilder.contentNotValidLanguage": "Content is not valid for language:",
|
|
276
277
|
"creatives.componentsV2.FormBuilder.dragAndDrop": "Drag and drop image here",
|
|
@@ -3284,6 +3285,7 @@ exports[`Creatives SmsTraiCreate test/> invalid file drop 1`] = `
|
|
|
3284
3285
|
"creatives.componentsV2.FTP.message": "Message",
|
|
3285
3286
|
"creatives.componentsV2.FTP.search": "Search",
|
|
3286
3287
|
"creatives.componentsV2.Footer.header": "This is the Footer component !",
|
|
3288
|
+
"creatives.componentsV2.FormBuilder.base64ImageError": "Base64 images are not allowed. Please upload your image to a gallery and use it, or add the image URL instead.",
|
|
3287
3289
|
"creatives.componentsV2.FormBuilder.cancel": "Cancel",
|
|
3288
3290
|
"creatives.componentsV2.FormBuilder.contentNotValidLanguage": "Content is not valid for language:",
|
|
3289
3291
|
"creatives.componentsV2.FormBuilder.dragAndDrop": "Drag and drop image here",
|
|
@@ -6297,6 +6299,7 @@ exports[`Creatives SmsTraiCreate test/> renders UI 1`] = `
|
|
|
6297
6299
|
"creatives.componentsV2.FTP.message": "Message",
|
|
6298
6300
|
"creatives.componentsV2.FTP.search": "Search",
|
|
6299
6301
|
"creatives.componentsV2.Footer.header": "This is the Footer component !",
|
|
6302
|
+
"creatives.componentsV2.FormBuilder.base64ImageError": "Base64 images are not allowed. Please upload your image to a gallery and use it, or add the image URL instead.",
|
|
6300
6303
|
"creatives.componentsV2.FormBuilder.cancel": "Cancel",
|
|
6301
6304
|
"creatives.componentsV2.FormBuilder.contentNotValidLanguage": "Content is not valid for language:",
|
|
6302
6305
|
"creatives.componentsV2.FormBuilder.dragAndDrop": "Drag and drop image here",
|
|
@@ -9310,6 +9313,7 @@ exports[`Creatives SmsTraiCreate test/> valid file drop 1`] = `
|
|
|
9310
9313
|
"creatives.componentsV2.FTP.message": "Message",
|
|
9311
9314
|
"creatives.componentsV2.FTP.search": "Search",
|
|
9312
9315
|
"creatives.componentsV2.Footer.header": "This is the Footer component !",
|
|
9316
|
+
"creatives.componentsV2.FormBuilder.base64ImageError": "Base64 images are not allowed. Please upload your image to a gallery and use it, or add the image URL instead.",
|
|
9313
9317
|
"creatives.componentsV2.FormBuilder.cancel": "Cancel",
|
|
9314
9318
|
"creatives.componentsV2.FormBuilder.contentNotValidLanguage": "Content is not valid for language:",
|
|
9315
9319
|
"creatives.componentsV2.FormBuilder.dragAndDrop": "Drag and drop image here",
|
|
@@ -263,6 +263,7 @@ exports[`Creatives SmsTraiEdit test/> should cancel 1`] = `
|
|
|
263
263
|
"creatives.componentsV2.FTP.message": "Message",
|
|
264
264
|
"creatives.componentsV2.FTP.search": "Search",
|
|
265
265
|
"creatives.componentsV2.Footer.header": "This is the Footer component !",
|
|
266
|
+
"creatives.componentsV2.FormBuilder.base64ImageError": "Base64 images are not allowed. Please upload your image to a gallery and use it, or add the image URL instead.",
|
|
266
267
|
"creatives.componentsV2.FormBuilder.cancel": "Cancel",
|
|
267
268
|
"creatives.componentsV2.FormBuilder.contentNotValidLanguage": "Content is not valid for language:",
|
|
268
269
|
"creatives.componentsV2.FormBuilder.dragAndDrop": "Drag and drop image here",
|
|
@@ -4732,6 +4733,7 @@ FREE GIFTS-
|
|
|
4732
4733
|
"creatives.componentsV2.FTP.message": "Message",
|
|
4733
4734
|
"creatives.componentsV2.FTP.search": "Search",
|
|
4734
4735
|
"creatives.componentsV2.Footer.header": "This is the Footer component !",
|
|
4736
|
+
"creatives.componentsV2.FormBuilder.base64ImageError": "Base64 images are not allowed. Please upload your image to a gallery and use it, or add the image URL instead.",
|
|
4735
4737
|
"creatives.componentsV2.FormBuilder.cancel": "Cancel",
|
|
4736
4738
|
"creatives.componentsV2.FormBuilder.contentNotValidLanguage": "Content is not valid for language:",
|
|
4737
4739
|
"creatives.componentsV2.FormBuilder.dragAndDrop": "Drag and drop image here",
|
|
@@ -7315,6 +7317,7 @@ exports[`Creatives SmsTraiEdit test/> should render 1`] = `
|
|
|
7315
7317
|
"creatives.componentsV2.FTP.message": "Message",
|
|
7316
7318
|
"creatives.componentsV2.FTP.search": "Search",
|
|
7317
7319
|
"creatives.componentsV2.Footer.header": "This is the Footer component !",
|
|
7320
|
+
"creatives.componentsV2.FormBuilder.base64ImageError": "Base64 images are not allowed. Please upload your image to a gallery and use it, or add the image URL instead.",
|
|
7318
7321
|
"creatives.componentsV2.FormBuilder.cancel": "Cancel",
|
|
7319
7322
|
"creatives.componentsV2.FormBuilder.contentNotValidLanguage": "Content is not valid for language:",
|
|
7320
7323
|
"creatives.componentsV2.FormBuilder.dragAndDrop": "Drag and drop image here",
|
|
@@ -11618,6 +11621,7 @@ FREE GIFTS-
|
|
|
11618
11621
|
"creatives.componentsV2.FTP.message": "Message",
|
|
11619
11622
|
"creatives.componentsV2.FTP.search": "Search",
|
|
11620
11623
|
"creatives.componentsV2.Footer.header": "This is the Footer component !",
|
|
11624
|
+
"creatives.componentsV2.FormBuilder.base64ImageError": "Base64 images are not allowed. Please upload your image to a gallery and use it, or add the image URL instead.",
|
|
11621
11625
|
"creatives.componentsV2.FormBuilder.cancel": "Cancel",
|
|
11622
11626
|
"creatives.componentsV2.FormBuilder.contentNotValidLanguage": "Content is not valid for language:",
|
|
11623
11627
|
"creatives.componentsV2.FormBuilder.dragAndDrop": "Drag and drop image here",
|
|
@@ -14173,6 +14177,7 @@ exports[`Creatives SmsTraiEdit test/> should render 2`] = `
|
|
|
14173
14177
|
"creatives.componentsV2.FTP.message": "Message",
|
|
14174
14178
|
"creatives.componentsV2.FTP.search": "Search",
|
|
14175
14179
|
"creatives.componentsV2.Footer.header": "This is the Footer component !",
|
|
14180
|
+
"creatives.componentsV2.FormBuilder.base64ImageError": "Base64 images are not allowed. Please upload your image to a gallery and use it, or add the image URL instead.",
|
|
14176
14181
|
"creatives.componentsV2.FormBuilder.cancel": "Cancel",
|
|
14177
14182
|
"creatives.componentsV2.FormBuilder.contentNotValidLanguage": "Content is not valid for language:",
|
|
14178
14183
|
"creatives.componentsV2.FormBuilder.dragAndDrop": "Drag and drop image here",
|
|
@@ -18476,6 +18481,7 @@ FREE GIFTS-
|
|
|
18476
18481
|
"creatives.componentsV2.FTP.message": "Message",
|
|
18477
18482
|
"creatives.componentsV2.FTP.search": "Search",
|
|
18478
18483
|
"creatives.componentsV2.Footer.header": "This is the Footer component !",
|
|
18484
|
+
"creatives.componentsV2.FormBuilder.base64ImageError": "Base64 images are not allowed. Please upload your image to a gallery and use it, or add the image URL instead.",
|
|
18479
18485
|
"creatives.componentsV2.FormBuilder.cancel": "Cancel",
|
|
18480
18486
|
"creatives.componentsV2.FormBuilder.contentNotValidLanguage": "Content is not valid for language:",
|
|
18481
18487
|
"creatives.componentsV2.FormBuilder.dragAndDrop": "Drag and drop image here",
|
|
@@ -21031,6 +21037,7 @@ exports[`Creatives SmsTraiEdit test/> should save 1`] = `
|
|
|
21031
21037
|
"creatives.componentsV2.FTP.message": "Message",
|
|
21032
21038
|
"creatives.componentsV2.FTP.search": "Search",
|
|
21033
21039
|
"creatives.componentsV2.Footer.header": "This is the Footer component !",
|
|
21040
|
+
"creatives.componentsV2.FormBuilder.base64ImageError": "Base64 images are not allowed. Please upload your image to a gallery and use it, or add the image URL instead.",
|
|
21034
21041
|
"creatives.componentsV2.FormBuilder.cancel": "Cancel",
|
|
21035
21042
|
"creatives.componentsV2.FormBuilder.contentNotValidLanguage": "Content is not valid for language:",
|
|
21036
21043
|
"creatives.componentsV2.FormBuilder.dragAndDrop": "Drag and drop image here",
|
|
@@ -25655,6 +25662,7 @@ FREE GIFTS-
|
|
|
25655
25662
|
"creatives.componentsV2.FTP.message": "Message",
|
|
25656
25663
|
"creatives.componentsV2.FTP.search": "Search",
|
|
25657
25664
|
"creatives.componentsV2.Footer.header": "This is the Footer component !",
|
|
25665
|
+
"creatives.componentsV2.FormBuilder.base64ImageError": "Base64 images are not allowed. Please upload your image to a gallery and use it, or add the image URL instead.",
|
|
25658
25666
|
"creatives.componentsV2.FormBuilder.cancel": "Cancel",
|
|
25659
25667
|
"creatives.componentsV2.FormBuilder.contentNotValidLanguage": "Content is not valid for language:",
|
|
25660
25668
|
"creatives.componentsV2.FormBuilder.dragAndDrop": "Drag and drop image here",
|
|
@@ -86,6 +86,7 @@ import { UserIsAuthenticated } from '../../utils/authWrapper';
|
|
|
86
86
|
import { getObjFromQueryParams } from '../../utils/v2common';
|
|
87
87
|
import messages from './messages';
|
|
88
88
|
import {checkUnicode} from '../../utils/smsCharCountV2';
|
|
89
|
+
import { containsBase64Images } from '../../utils/content';
|
|
89
90
|
import CardGrid from '../../v2Components/CardGrid';
|
|
90
91
|
import config from '../../config/app';
|
|
91
92
|
import './_templates.scss';
|
|
@@ -1811,6 +1812,10 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1811
1812
|
const reader = new FileReader();
|
|
1812
1813
|
reader.onload = () => {
|
|
1813
1814
|
const text = reader.result;
|
|
1815
|
+
|
|
1816
|
+
// Check for base64 images in HTML content
|
|
1817
|
+
containsBase64Images({content:text, CapNotification});
|
|
1818
|
+
|
|
1814
1819
|
this.props.actions.handleHtmlUpload(text);
|
|
1815
1820
|
document.getElementById("filename").value = "";
|
|
1816
1821
|
const type = this.props.location.query.type;
|
|
@@ -119,11 +119,14 @@ export function* sendZippedFile({ selectedFile, errorHandler, successHandler })
|
|
|
119
119
|
if (result.status.isError) {
|
|
120
120
|
errorMessage = result.message;
|
|
121
121
|
yield errorHandler(errorMessage);
|
|
122
|
+
return;
|
|
122
123
|
}
|
|
123
124
|
|
|
125
|
+
const htmlContent = decodeURIComponent(result.response.metaEntity.htmlContent);
|
|
126
|
+
|
|
124
127
|
yield put({
|
|
125
128
|
type: types.SEND_ZIPPED_FILE_SUCCESS,
|
|
126
|
-
selectedTemplate:
|
|
129
|
+
selectedTemplate: htmlContent,
|
|
127
130
|
});
|
|
128
131
|
yield successHandler();
|
|
129
132
|
} catch (error) {
|