@capillarytech/creatives-library 7.12.49 → 7.12.51
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/v2Components/TemplatePreview/index.js +1 -1
- package/v2Containers/Line/Container/ImageCarousel/index.js +7 -6
- package/v2Containers/Line/Container/index.js +1 -3
- package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +6766 -10774
- package/v2Containers/Templates/constants.js +1 -1
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1 -381
- package/v2Containers/Templates/tests/index.test.js +1 -7
package/package.json
CHANGED
|
@@ -616,7 +616,7 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
616
616
|
</div>
|
|
617
617
|
);
|
|
618
618
|
}
|
|
619
|
-
if ((type === IMAGE_CAROUSEL || type === TEMPLATE
|
|
619
|
+
if ((type === IMAGE_CAROUSEL || type === TEMPLATE) && imageCarousel) {
|
|
620
620
|
return (
|
|
621
621
|
<div
|
|
622
622
|
style={{
|
|
@@ -72,20 +72,21 @@ export const LineImageCarousel = (props) => {
|
|
|
72
72
|
const [errorTitle, updateErrorTitle] = useState(false);
|
|
73
73
|
|
|
74
74
|
useEffect(() => {
|
|
75
|
-
const { messageTitle = '', type, template, altText
|
|
75
|
+
const { messageTitle = '', type, template, altText } = content;
|
|
76
76
|
if ([TEMPLATE, FLEX].includes(type)) {
|
|
77
|
-
updateCreateNew(!isFullMode ? !!
|
|
77
|
+
updateCreateNew(!isFullMode ? !!template : true);
|
|
78
78
|
if (messageTitle) {
|
|
79
79
|
updateTextMessageTitle(messageTitle);
|
|
80
80
|
}
|
|
81
81
|
if (altText) {
|
|
82
82
|
updateTitle(altText);
|
|
83
83
|
}
|
|
84
|
-
if (template
|
|
84
|
+
if (template) {
|
|
85
85
|
const validCarouselImages = [];
|
|
86
|
-
if (template?.type === CAROUSEL
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
if (template?.type === CAROUSEL) {
|
|
87
|
+
const { contents = [] } = template;
|
|
88
|
+
contents.forEach((content = {}, index) => {
|
|
89
|
+
const {
|
|
89
90
|
footer: {
|
|
90
91
|
contents: [{
|
|
91
92
|
action: {
|
|
@@ -172,7 +172,6 @@ export const LineContainer = ({
|
|
|
172
172
|
assetType,
|
|
173
173
|
selectedTemplate,
|
|
174
174
|
template,
|
|
175
|
-
contents,
|
|
176
175
|
altText,
|
|
177
176
|
video,
|
|
178
177
|
videoName,
|
|
@@ -190,7 +189,6 @@ export const LineContainer = ({
|
|
|
190
189
|
assetType,
|
|
191
190
|
selectedTemplate,
|
|
192
191
|
template,
|
|
193
|
-
contents,
|
|
194
192
|
altText,
|
|
195
193
|
video,
|
|
196
194
|
videoName,
|
|
@@ -575,7 +573,7 @@ export const LineContainer = ({
|
|
|
575
573
|
});
|
|
576
574
|
contentsLocal.contents = imageContents;
|
|
577
575
|
contentsLocal.type = "carousel";
|
|
578
|
-
messageData.
|
|
576
|
+
messageData.template = contentsLocal;
|
|
579
577
|
messageData.altText = altText;
|
|
580
578
|
}
|
|
581
579
|
if (videoSrc) {
|