@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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.12.49",
4
+ "version": "7.12.51",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -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 || type === 'template') && imageCarousel) {
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, contents } = content;
75
+ const { messageTitle = '', type, template, altText } = content;
76
76
  if ([TEMPLATE, FLEX].includes(type)) {
77
- updateCreateNew(!isFullMode ? !!(template || contents) : true);
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 || contents) {
84
+ if (template) {
85
85
  const validCarouselImages = [];
86
- if (template?.type === CAROUSEL || contents?.type === CAROUSEL ) {
87
- const { contents: innerContents = [] } = contents || template || [];
88
- innerContents.forEach((content = {}, index) => { const {
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.contents = contentsLocal;
576
+ messageData.template = contentsLocal;
579
577
  messageData.altText = altText;
580
578
  }
581
579
  if (videoSrc) {