@capillarytech/creatives-library 7.12.47 → 7.12.49
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
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) && imageCarousel) {
|
|
619
|
+
if ((type === IMAGE_CAROUSEL || type === TEMPLATE || type === 'template') && imageCarousel) {
|
|
620
620
|
return (
|
|
621
621
|
<div
|
|
622
622
|
style={{
|
|
@@ -72,21 +72,20 @@ export const LineImageCarousel = (props) => {
|
|
|
72
72
|
const [errorTitle, updateErrorTitle] = useState(false);
|
|
73
73
|
|
|
74
74
|
useEffect(() => {
|
|
75
|
-
const { messageTitle = '', type, template, altText } = content;
|
|
75
|
+
const { messageTitle = '', type, template, altText, contents } = content;
|
|
76
76
|
if ([TEMPLATE, FLEX].includes(type)) {
|
|
77
|
-
updateCreateNew(!isFullMode ? !!template : true);
|
|
77
|
+
updateCreateNew(!isFullMode ? !!(template || contents) : 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 || contents) {
|
|
85
85
|
const validCarouselImages = [];
|
|
86
|
-
if (template?.type === CAROUSEL) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const {
|
|
86
|
+
if (template?.type === CAROUSEL || contents?.type === CAROUSEL ) {
|
|
87
|
+
const { contents: innerContents = [] } = contents || template || [];
|
|
88
|
+
innerContents.forEach((content = {}, index) => { const {
|
|
90
89
|
footer: {
|
|
91
90
|
contents: [{
|
|
92
91
|
action: {
|
|
@@ -172,6 +172,7 @@ export const LineContainer = ({
|
|
|
172
172
|
assetType,
|
|
173
173
|
selectedTemplate,
|
|
174
174
|
template,
|
|
175
|
+
contents,
|
|
175
176
|
altText,
|
|
176
177
|
video,
|
|
177
178
|
videoName,
|
|
@@ -189,6 +190,7 @@ export const LineContainer = ({
|
|
|
189
190
|
assetType,
|
|
190
191
|
selectedTemplate,
|
|
191
192
|
template,
|
|
193
|
+
contents,
|
|
192
194
|
altText,
|
|
193
195
|
video,
|
|
194
196
|
videoName,
|
|
@@ -573,7 +575,7 @@ export const LineContainer = ({
|
|
|
573
575
|
});
|
|
574
576
|
contentsLocal.contents = imageContents;
|
|
575
577
|
contentsLocal.type = "carousel";
|
|
576
|
-
messageData.
|
|
578
|
+
messageData.contents = contentsLocal;
|
|
577
579
|
messageData.altText = altText;
|
|
578
580
|
}
|
|
579
581
|
if (videoSrc) {
|