@bikdotai/bik-component-library 0.0.419-beta.14 → 0.0.419-beta.16
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/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditor.js +1 -1
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/cjs/components/carousel-preview/CarouselPreview.js +6 -5
- package/dist/cjs/components/carousel-preview/CarouselPreviewCard.d.ts +1 -0
- package/dist/cjs/components/carousel-preview/CarouselPreviewCard.js +4 -4
- package/dist/cjs/components/template-preview/TemplatePreview.d.ts +2 -1
- package/dist/cjs/components/template-preview/TemplatePreview.js +1 -1
- package/dist/cjs/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +1 -1
- package/dist/cjs/components/template-preview/WhatsAppTemplatePreview.d.ts +1 -0
- package/dist/cjs/components/template-preview/WhatsAppTemplatePreview.js +1 -1
- package/dist/cjs/components/template-preview/models/WhatsAppTemplate.d.ts +1 -0
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/esm/components/carousel-preview/CarouselPreview.js +5 -4
- package/dist/esm/components/carousel-preview/CarouselPreviewCard.d.ts +1 -0
- package/dist/esm/components/carousel-preview/CarouselPreviewCard.js +2 -2
- package/dist/esm/components/template-preview/TemplatePreview.d.ts +2 -1
- package/dist/esm/components/template-preview/TemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +1 -1
- package/dist/esm/components/template-preview/WhatsAppTemplatePreview.d.ts +1 -0
- package/dist/esm/components/template-preview/WhatsAppTemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/models/WhatsAppTemplate.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),n=require("../../helpers/BaseWhatsappContentLang.helper.js"),r=require("react"),l=require("../../constants/Theme.js"),o=require("../TypographyStyle.js"),i=require("./CustomEditor.styled.js"),u=require("./WhatsAppTextEditorHeader.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=c(r);const a="Character limit reached",d=new n.BaseWhatsappContentLangHelper,v={[u.EditorActionTypes.BOLD]:"*",[u.EditorActionTypes.ITALIC]:"_",[u.EditorActionTypes.STRIKETHROUGH]:"~"},p=s.default.forwardRef(((n,c)=>{var s,p,{onChange:h,text:f,RightComponent:g,error:x,limit:j,onError:m,rows:C,actions:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),n=require("../../helpers/BaseWhatsappContentLang.helper.js"),r=require("react"),l=require("../../constants/Theme.js"),o=require("../TypographyStyle.js"),i=require("./CustomEditor.styled.js"),u=require("./WhatsAppTextEditorHeader.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=c(r);const a="Character limit reached",d=new n.BaseWhatsappContentLangHelper,v={[u.EditorActionTypes.BOLD]:"*",[u.EditorActionTypes.ITALIC]:"_",[u.EditorActionTypes.STRIKETHROUGH]:"~"},p=s.default.forwardRef(((n,c)=>{var s,p,{onChange:h,text:f,RightComponent:g,error:x,limit:j,onError:m,rows:C,actions:E}=n,T=e.__rest(n,["onChange","text","RightComponent","error","limit","onError","rows","actions"]);const y=r.useRef(null);function O(e){const t=null==y?void 0:y.current;null!=t&&(t.selectionStart?(t.focus(),t.selectionEnd=e):t.focus())}function L(e){var t,n;let r=null!==(n=null===(t=y.current)||void 0===t?void 0:t.value)&&void 0!==n?n:"";if(y.current&&e){const t=y.current.selectionStart,n=y.current.selectionEnd,l=e;if(t===n)return S(l);{r=d.wrappWildcard(t,n,l,r);const e=d.getHTML(r);return y.current.value=r,{text:r,html:e}}}return{text:r,html:r}}function S(e){var t,n;let r=null!==(n=null===(t=y.current)||void 0===t?void 0:t.value)&&void 0!==n?n:"";if(y.current&&e){const t=y.current.selectionStart;if(t===y.current.selectionEnd)return H(e,t)}return{text:r,html:r}}function H(e,t){var n,r;let l=null!==(r=null===(n=y.current)||void 0===n?void 0:n.value)&&void 0!==r?r:"";l=l.slice(0,t)+e+l.slice(t);const o=d.getHTML(l);return y.current.value=l,{text:l,html:o}}return r.useImperativeHandle(c,(()=>({addTextOrWrap:L,addText:S,get(){var e,t;return null!==(t=null===(e=y.current)||void 0===e?void 0:e.value)&&void 0!==t?t:""},setCaretPosition:O}))),r.useEffect((()=>{if(null==y?void 0:y.current){y.current.value=f||"";const e=d.getHTML(f||"");null==h||h(f||"",e)}}),[f]),r.useEffect((()=>{var e,t;(null===(e=null==y?void 0:y.current)||void 0===e?void 0:e.value)&&j&&((null===(t=null==y?void 0:y.current)||void 0===t?void 0:t.value.length)>j?null==m||m(a):null==m||m(null!=x?x:""))}),[null===(s=null==y?void 0:y.current)||void 0===s?void 0:s.value.length]),t.jsxs(i.OuterContainer,{children:[t.jsxs(i.Container,Object.assign({isError:!!x},{children:[t.jsx(u.WhatsAppTextEditorHeader,{actions:E,ref:y,onActionSelect:function(e){if((null==v?void 0:v[e])&&y.current){const t=y.current.selectionStart;if(t===y.current.selectionEnd){H(null==v?void 0:v[e],t);const{text:n,html:r}=H(null==v?void 0:v[e],t);O(t+1),null==h||h(n,r)}else{const{text:t,html:n}=L(null==v?void 0:v[e]);null==h||h(t,n)}}},RightComponent:g,onEmojiClick:function(e){const{text:t,html:n}=S(e);null==h||h(t,n)}}),t.jsx(i.TextSpace,Object.assign({ref:y,onChange:function(e){const t=e.target.value,n=d.getHTML(t);null==h||h(t,n)}},T,{rows:C}))]})),x&&x!==a?t.jsx(o.BodyCaption,Object.assign({style:{color:l.COLORS.content.negative}},{children:x})):t.jsx(t.Fragment,{children:j&&(null==y?void 0:y.current)?t.jsxs(o.BodyCaption,Object.assign({style:{color:x===a||(null===(p=null==y?void 0:y.current)||void 0===p?void 0:p.value.length)>j?l.COLORS.content.negative:l.COLORS.content.secondary}},{children:[y.current.value.length,"/",j]})):t.jsx(t.Fragment,{})})]})}));p.displayName="WhatsAppTextEditor",exports.WhatsAppTextEditor=p;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/chevronLeft.svg.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/chevronLeft.svg.js"),i=require("../../assets/icons/chevronRight.svg.js"),r=require("pure-react-carousel"),o=require("react"),n=require("styled-components"),s=require("./CarouselPreviewCard.js"),a=require("../../constants/Theme.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=d(o),c=d(n);const u=c.default.div`
|
|
2
2
|
background-image: url('https://firebasestorage.googleapis.com/v0/b/bikayi-chat.appspot.com/o/images-uid%2F341dba50-e84e-4457-b5b5-d9d8a0b95a73?alt=media&token=6fd32f23-8bb2-4980-bbee-bef39b38fd9f');
|
|
3
3
|
border-color: ${a.COLORS.stroke.primary};
|
|
4
4
|
border-top-style: solid;
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
background-position: center;
|
|
10
10
|
background-size: cover;
|
|
11
11
|
position: relative;
|
|
12
|
-
|
|
12
|
+
width: 550px;
|
|
13
|
+
// height: 80%;
|
|
13
14
|
overflow-y: auto;
|
|
14
15
|
`,p=c.default.div`
|
|
15
16
|
flex-direction: row;
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
box-shadow: 0px 1.5px 6px 0px #0000001f;
|
|
47
48
|
}
|
|
48
49
|
.slider {
|
|
49
|
-
width:
|
|
50
|
-
height:
|
|
50
|
+
width: 520px;
|
|
51
|
+
height: 520px;
|
|
51
52
|
}
|
|
52
|
-
`,h=
|
|
53
|
+
`,h=l.default.forwardRef(((o,n)=>{let{channel:d,template:l,showSampleValues:c}=o;var h,b,x,g,v;return e.jsxs(u,{children:[e.jsx("div",Object.assign({style:{marginBottom:56}},{children:e.jsx(s.default,{channel:d,template:l,isHeader:!0,carouselCardIndex:-1,contentWrapperStyles:{width:"480px"}})})),e.jsx(r.CarouselProvider,Object.assign({naturalSlideWidth:100,naturalSlideHeight:125,totalSlides:null!==(x=null===(b=null===(h=null==l?void 0:l.components)||void 0===h?void 0:h[1].cards)||void 0===b?void 0:b.length)&&void 0!==x?x:1,orientation:"horizontal",visibleSlides:1.8},{children:e.jsxs(p,{children:[e.jsx(r.ButtonBack,Object.assign({className:"left_button"},{children:e.jsx(t.default,{height:10,width:10,color:a.COLORS.content.primary})})),e.jsx(r.Slider,Object.assign({className:"slider"},{children:null===(v=null===(g=null==l?void 0:l.components)||void 0===g?void 0:g[1].cards)||void 0===v?void 0:v.map(((t,i)=>{var o,n;const a={components:t.components,mapping:null===(n=null===(o=null==l?void 0:l.mapping)||void 0===o?void 0:o.cards)||void 0===n?void 0:n[i]};return e.jsx(r.Slide,Object.assign({index:i},{children:e.jsx(s.default,{channel:d,template:a,isHeader:!1,carouselCardIndex:i},i)}),i)}))})),e.jsx(r.ButtonNext,Object.assign({className:"right_button"},{children:e.jsx(i.default,{height:10,width:10,color:a.COLORS.content.primary})}))]})}))]})}));exports.CarouselPreview=h;
|
|
@@ -6,5 +6,6 @@ declare const CarouselPreviewCard: React.ForwardRefExoticComponent<{
|
|
|
6
6
|
showSampleValues?: boolean | undefined;
|
|
7
7
|
isHeader?: boolean | undefined;
|
|
8
8
|
carouselCardIndex?: number | undefined;
|
|
9
|
+
contentWrapperStyles?: React.CSSProperties | undefined;
|
|
9
10
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
10
11
|
export default CarouselPreviewCard;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("styled-components"),a=require("../template-preview/TemplatePreview.js");require("../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../constants/Theme.js"),require("../template-preview/models/TemplateMeta.js"),require("../template-preview/models/WhatsAppTemplate.js");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("styled-components"),a=require("../template-preview/TemplatePreview.js");require("../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../constants/Theme.js"),require("../template-preview/models/TemplateMeta.js"),require("../template-preview/models/WhatsAppTemplate.js");var s=require("../template-preview/models/Channels.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=l(t),p=l(r);const n=p.default.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
height: ${e=>e.isHeader?"150px":"100%"};
|
|
4
|
-
width: ${e=>e.channel===
|
|
5
|
-
`,
|
|
4
|
+
width: ${e=>e.channel===s.CHANNEL_TYPE.WHATSAPP?"360px":"300px"};
|
|
5
|
+
`,o=p.default.div`
|
|
6
6
|
position: absolute;
|
|
7
7
|
flex: 1;
|
|
8
8
|
scroll-behavior: smooth;
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
top: 8px;
|
|
11
11
|
width: calc(100% - 25px);
|
|
12
12
|
height: calc(100% - 17px);
|
|
13
|
-
`,
|
|
13
|
+
`,u=i.default.forwardRef(((t,r)=>{let{channel:s,template:l,showSampleValues:i,isHeader:p,carouselCardIndex:u,contentWrapperStyles:d}=t;return e.jsx("div",{children:e.jsx(n,Object.assign({channel:s,isHeader:null!=p&&p},{children:e.jsx(o,Object.assign({style:Object.assign({},null!=d?d:{}),ref:r},{children:e.jsx(a.TemplatePreview,{showSampleValues:i,template:l,channel:s,size:"small",hideHeader:!0,carouselCardIndex:u,isWhatsappCarousel:!0})}))}))})}));exports.default=u;
|
|
@@ -18,5 +18,6 @@ export interface TemplatePreviewProps {
|
|
|
18
18
|
templateContainerStyles?: React.CSSProperties;
|
|
19
19
|
showSampleValues?: boolean;
|
|
20
20
|
carouselCardIndex?: number;
|
|
21
|
+
isWhatsappCarousel?: boolean;
|
|
21
22
|
}
|
|
22
|
-
export declare const TemplatePreview: ({ template, channel, whatsAppSpecificMeta, templateCreationsInfo, hideHeader, size, onlyTemplateContent, emailSpecificMeta, smsSpecificMeta, showSampleValues, carouselCardIndex, }: TemplatePreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const TemplatePreview: ({ template, channel, whatsAppSpecificMeta, templateCreationsInfo, hideHeader, size, onlyTemplateContent, emailSpecificMeta, smsSpecificMeta, showSampleValues, carouselCardIndex, isWhatsappCarousel, }: TemplatePreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("../template-context-mapper/context/templateModalContext.js"),t=require("../../utils/StringUtils.js"),a=require("../../constants/Theme.js"),i=require("../TypographyStyle.js"),n=require("./EmailTemplateThumbnailPreview.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("../template-context-mapper/context/templateModalContext.js"),t=require("../../utils/StringUtils.js"),a=require("../../constants/Theme.js"),i=require("../TypographyStyle.js"),n=require("./EmailTemplateThumbnailPreview.js"),s=require("./models/Channels.js"),r=require("./SmsTemplatePreview.js"),o=require("./WhatsAppTemplatePreview.js");const d={WhatsAppWrapper:{backgroundColor:a.COLORS.surface.standard,borderRadius:4,border:`1px solid ${a.COLORS.background.inactive}`,marginTop:16}};exports.TemplatePreview=p=>{let{template:u,channel:m,whatsAppSpecificMeta:c,templateCreationsInfo:v,hideHeader:h,size:C,onlyTemplateContent:j,emailSpecificMeta:S,smsSpecificMeta:x,showSampleValues:g,carouselCardIndex:T,isWhatsappCarousel:b}=p;var y,O;const{setSelectedCarouselIndex:w}=l.useTemplateModalContext();return console.log("template preview: ",T,u),m===s.CHANNEL_TYPE.SMS?e.jsx("div",Object.assign({style:Object.assign({marginTop:v?16:0,border:v?`1px solid ${a.COLORS.stroke.primary}`:"none",borderRadius:4},null==x?void 0:x.templateContainerStyles)},{children:e.jsx(r.default,{template:u,hideHeader:h,onlyTemplateContent:j,size:null!=C?C:"large",variableStore:null==x?void 0:x.smsVariableStore,display_content:null==x?void 0:x.smsDisplayContent})})):m===s.CHANNEL_TYPE.EMAIL?e.jsx("div",Object.assign({style:Object.assign({marginTop:v?16:0},null==S?void 0:S.templateContainerStyles)},{children:e.jsx(n.default,{template:u,handleViewTemplate:()=>{var e;null===(e=null==S?void 0:S.handleViewTemplate)||void 0===e||e.call(S)},hideHeader:h,hideViewButton:null==S?void 0:S.hideViewButtonForEmail,containerStyle:null==S?void 0:S.containerStyle,emailDisplayContent:null==S?void 0:S.emailDisplayContent,emailHtmlContainerId:null==S?void 0:S.emailHtmlContainerId})})):m===s.CHANNEL_TYPE.WHATSAPP?e.jsxs("div",Object.assign({style:Object.assign(Object.assign({},null==c?void 0:c.templateContainerStyles),v?d.WhatsAppWrapper:{}),onClick:()=>{w&&b&&w(null!=T?T:-1)}},{children:[v?e.jsx("div",Object.assign({style:{padding:16}},{children:e.jsx(i.TitleRegular,{children:t.default.convertToTitleCase(null!==(y=null==u?void 0:u.label)&&void 0!==y?y:"")})})):e.jsx(e.Fragment,{}),e.jsx(o.default,{showSampleValues:g,showHeader:null==c?void 0:c.showWhatsAppHeader,extras:null==c?void 0:c.whatsAppExtras,template:u,size:v?"small":null!=C?C:"large",containerStyle:Object.assign({borderWidth:v?0:1,borderTopWidth:1},null!==(O=null==c?void 0:c.containerStyle)&&void 0!==O?O:{}),zeroStateComponent:null==c?void 0:c.zeroStateComponent,usePlaceHolderName:null==c?void 0:c.usePlaceHolderName,carouselCardIndex:T,isWhatsappCarousel:b})]})):e.jsx(e.Fragment,{})};
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
position: relative;
|
|
8
8
|
`,c=d.default(a.TitleRegular)`
|
|
9
9
|
color: ${s.COLORS.content.primary};
|
|
10
|
-
`;exports.WhatsappLikePreviewV2=t=>{const a=i.getPreviewPropLen(t)
|
|
10
|
+
`;exports.WhatsappLikePreviewV2=t=>{const a=i.getPreviewPropLen(t);return r.useTemplateModalContext(),3===a?e.jsx(e.Fragment,{children:t.zeroStateComponent}):e.jsx(e.Fragment,{children:e.jsxs(l,Object.assign({style:Object.assign({},t.containerStyle),showHeader:t.showHeader,isWhatsappCarousel:t.isWhatsappCarousel},{children:[t.showHeader&&e.jsx(o.default,{}),e.jsxs("div",Object.assign({style:{padding:"small"===t.size?"12px 32px 12px 12px":"16px 56px 12px 16px"}},{children:[!t.hidePreviewText&&e.jsx("div",Object.assign({style:{marginBottom:16}},{children:e.jsx(c,{children:"Preview"})})),e.jsx(n.ChatUIV2,Object.assign({showHeader:t.showHeader},t))]}))]}))})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("react"),t=require("../template-context-mapper/context/templateModalContext.js"),a=require("./helpers/TemplateCreatorHelper.js"),i=require("./models/TemplateMeta.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("react"),t=require("../template-context-mapper/context/templateModalContext.js"),a=require("./helpers/TemplateCreatorHelper.js"),i=require("./models/TemplateMeta.js"),o=require("./utils/TemplateHelperUtils.js"),r=require("./WhatsApp/WhatsAppLikePreview.js"),n=require("./WhatsApp/WhatsAppLikePreviewV2.js");exports.default=d=>{let{template:s,extras:p,containerStyle:u,usePlaceHolderName:v,showHeader:m,zeroStateComponent:h,size:x,showSampleValues:c,carouselCardIndex:b,isWhatsappCarousel:T}=d;var y,w,k,C,V,B,N,j,f,A,L,P,S,g,q,F,E,H,O,W,I,U;console.log("template preview 22: ",b,s);const{selectedCarouselIndex:D}=t.useTemplateModalContext(),[M,R]=l.useState(),z=new a.TemplateCreatorHelper,_=new o.TemplateHelperUtils,Y=[];return(null===(w=null===(y=null==M?void 0:M.ctaBtn)||void 0===y?void 0:y.phoneNumber)||void 0===w?void 0:w.isChecked)&&Y.push({type:"phoneNumber",text:null!==(k=M.ctaBtn.phoneNumber.btnText)&&void 0!==k?k:"",extra:null!==(C=M.ctaBtn.phoneNumber.phoneNumber)&&void 0!==C?C:""}),(null===(B=null===(V=null==M?void 0:M.ctaBtn)||void 0===V?void 0:V.websiteLinkBtn)||void 0===B?void 0:B.isChecked)&&Y.push({type:"website",text:null!==(N=M.ctaBtn.websiteLinkBtn.btnText)&&void 0!==N?N:"",extra:null!==(f=null===(j=M.ctaBtn.websiteLinkBtn)||void 0===j?void 0:j.linkOpens)&&void 0!==f?f:"",placeholder:null!==(A=M.ctaBtn.websiteLinkBtn.placeholder)&&void 0!==A?A:""}),l.useEffect((()=>{s&&z.parseUITemplateFromDBFormat({dbFormattedTemplate:s,isDuplicate:!1,showSampleValues:c,isV2:!s.htmlContentUrl}).then((e=>{R(Object.assign({},e))}))}),[s,c]),l.useEffect((()=>{s&&z.parseUITemplateFromDBFormat({dbFormattedTemplate:s,isDuplicate:!1,showSampleValues:c,isV2:!s.htmlContentUrl}).then((e=>{R(Object.assign({},e))}))}),[D]),s?s.htmlContentUrl?e.jsx(r.WhatsappLikePreview,{showHeader:m,containerPadding:"large"===x?"16px 56px 12px 16px":"12px 56px 12px 12px",containerStyle:u,textType:"html",bodyText:_.whatsappOnlyFillVariablesValueInBodyText(null!==(E=null==M?void 0:M.bodyText)&&void 0!==E?E:"",null!==(H=null==M?void 0:M.bodyVariables)&&void 0!==H?H:[],v),footerText:null==M?void 0:M.footerText,headerMediaType:(null==M?void 0:M.headerType)||i.HEADER_TYPES.NONE,headerText:_.fillVariablesValInBodyText(null!==(O=null==M?void 0:M.headerText)&&void 0!==O?O:"",null!==(W=null==M?void 0:M.headerVariables)&&void 0!==W?W:[],v),headerAssetLink:null!==(I=null==M?void 0:M.headerAssetLink)&&void 0!==I?I:"",headerAssetName:null!==(U=null==M?void 0:M.headerAssetName)&&void 0!==U?U:"",quickReplybtn:null==M?void 0:M.quickReply,ctaBtn:Y,actionTypes:null==M?void 0:M.actionsType,extras:p,hidePreviewText:!0,imagePreviewStyles:{objectFit:"cover"},zeroStateComponent:null!=h?h:e.jsx(e.Fragment,{children:" "})}):e.jsx(n.WhatsappLikePreviewV2,{showHeader:m,containerPadding:"large"===x?"16px 56px 12px 16px":"12px 56px 12px 12px",containerStyle:u,textType:"html",bodyText:null==M?void 0:M.bodyText,footerText:null==M?void 0:M.footerText,headerMediaType:(null==M?void 0:M.headerType)||i.HEADER_TYPES.NONE,headerText:null==M?void 0:M.headerText,headerAssetLink:null!==(L=null==M?void 0:M.headerAssetLink)&&void 0!==L?L:"",headerAssetName:null!==(P=null==M?void 0:M.headerAssetName)&&void 0!==P?P:"",quickReplybtn:null==M?void 0:M.quickReply,ctaBtn:Y,actionTypes:null==M?void 0:M.actionsType,extras:p,hidePreviewText:!0,imagePreviewStyles:{objectFit:"cover"},carouselCardIndex:b,zeroStateComponent:null!=h?h:e.jsx(e.Fragment,{children:" "}),bodyVariableList:null!==(g=null===(S=null==M?void 0:M.bodyVariables)||void 0===S?void 0:S.map((e=>{var l;return{placeholder:e.variableName,value:null!==(l=e.variableVal)&&void 0!==l?l:e.variableName}})))&&void 0!==g?g:[],headerVariableList:null!==(F=null===(q=null==M?void 0:M.headerVariables)||void 0===q?void 0:q.map((e=>{var l;return{placeholder:e.variableName,value:null!==(l=e.variableVal)&&void 0!==l?l:e.variableName}})))&&void 0!==F?F:[],buttons:null==M?void 0:M.allButtons,limitedTimeOfferComponent:null==M?void 0:M.limitedTimeOfferComponent,isWhatsappCarousel:T}):e.jsx(e.Fragment,{children:h})};
|
|
@@ -187,6 +187,7 @@ export type WhatsappLikePreviewTypes = {
|
|
|
187
187
|
carouselCardIndex?: number;
|
|
188
188
|
buttons?: WhatsappPreviewButtonType[];
|
|
189
189
|
limitedTimeOfferComponent?: CreateTemplateType['limitedTimeOfferComponent'];
|
|
190
|
+
isWhatsappCarousel?: boolean;
|
|
190
191
|
};
|
|
191
192
|
export type WhatsappPreviewButtonType = {
|
|
192
193
|
type: WhatsappTemplateButtonTypes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as t}from"../../_virtual/_tslib.js";import{jsxs as n,jsx as e,Fragment as r}from"react/jsx-runtime";import{BaseWhatsappContentLangHelper as l}from"../../helpers/BaseWhatsappContentLang.helper.js";import o,{useRef as i,useImperativeHandle as u,useEffect as c}from"react";import{COLORS as s}from"../../constants/Theme.js";import{BodyCaption as a}from"../TypographyStyle.js";import{OuterContainer as d,Container as v,TextSpace as m}from"./CustomEditor.styled.js";import{EditorActionTypes as h,WhatsAppTextEditorHeader as f}from"./WhatsAppTextEditorHeader.js";const p="Character limit reached",g=new l,x={[h.BOLD]:"*",[h.ITALIC]:"_",[h.STRIKETHROUGH]:"~"},T=o.forwardRef(((l,o)=>{var h,T,{onChange:j,text:C,RightComponent:E,error:y,limit:
|
|
1
|
+
import{__rest as t}from"../../_virtual/_tslib.js";import{jsxs as n,jsx as e,Fragment as r}from"react/jsx-runtime";import{BaseWhatsappContentLangHelper as l}from"../../helpers/BaseWhatsappContentLang.helper.js";import o,{useRef as i,useImperativeHandle as u,useEffect as c}from"react";import{COLORS as s}from"../../constants/Theme.js";import{BodyCaption as a}from"../TypographyStyle.js";import{OuterContainer as d,Container as v,TextSpace as m}from"./CustomEditor.styled.js";import{EditorActionTypes as h,WhatsAppTextEditorHeader as f}from"./WhatsAppTextEditorHeader.js";const p="Character limit reached",g=new l,x={[h.BOLD]:"*",[h.ITALIC]:"_",[h.STRIKETHROUGH]:"~"},T=o.forwardRef(((l,o)=>{var h,T,{onChange:j,text:C,RightComponent:E,error:y,limit:H,onError:L,rows:O,actions:S}=l,w=t(l,["onChange","text","RightComponent","error","limit","onError","rows","actions"]);const R=i(null);function b(t){const n=null==R?void 0:R.current;null!=n&&(n.selectionStart?(n.focus(),n.selectionEnd=t):n.focus())}function W(t){var n,e;let r=null!==(e=null===(n=R.current)||void 0===n?void 0:n.value)&&void 0!==e?e:"";if(R.current&&t){const n=R.current.selectionStart,e=R.current.selectionEnd,l=t;if(n===e)return A(l);{r=g.wrappWildcard(n,e,l,r);const t=g.getHTML(r);return R.current.value=r,{text:r,html:t}}}return{text:r,html:r}}function A(t){var n,e;let r=null!==(e=null===(n=R.current)||void 0===n?void 0:n.value)&&void 0!==e?e:"";if(R.current&&t){const n=R.current.selectionStart;if(n===R.current.selectionEnd)return M(t,n)}return{text:r,html:r}}function M(t,n){var e,r;let l=null!==(r=null===(e=R.current)||void 0===e?void 0:e.value)&&void 0!==r?r:"";l=l.slice(0,n)+t+l.slice(n);const o=g.getHTML(l);return R.current.value=l,{text:l,html:o}}return u(o,(()=>({addTextOrWrap:W,addText:A,get(){var t,n;return null!==(n=null===(t=R.current)||void 0===t?void 0:t.value)&&void 0!==n?n:""},setCaretPosition:b}))),c((()=>{if(null==R?void 0:R.current){R.current.value=C||"";const t=g.getHTML(C||"");null==j||j(C||"",t)}}),[C]),c((()=>{var t,n;(null===(t=null==R?void 0:R.current)||void 0===t?void 0:t.value)&&H&&((null===(n=null==R?void 0:R.current)||void 0===n?void 0:n.value.length)>H?null==L||L(p):null==L||L(null!=y?y:""))}),[null===(h=null==R?void 0:R.current)||void 0===h?void 0:h.value.length]),n(d,{children:[n(v,Object.assign({isError:!!y},{children:[e(f,{actions:S,ref:R,onActionSelect:function(t){if((null==x?void 0:x[t])&&R.current){const n=R.current.selectionStart;if(n===R.current.selectionEnd){M(null==x?void 0:x[t],n);const{text:e,html:r}=M(null==x?void 0:x[t],n);b(n+1),null==j||j(e,r)}else{const{text:n,html:e}=W(null==x?void 0:x[t]);null==j||j(n,e)}}},RightComponent:E,onEmojiClick:function(t){const{text:n,html:e}=A(t);null==j||j(n,e)}}),e(m,Object.assign({ref:R,onChange:function(t){const n=t.target.value,e=g.getHTML(n);null==j||j(n,e)}},w,{rows:O}))]})),y&&y!==p?e(a,Object.assign({style:{color:s.content.negative}},{children:y})):e(r,{children:H&&(null==R?void 0:R.current)?n(a,Object.assign({style:{color:y===p||(null===(T=null==R?void 0:R.current)||void 0===T?void 0:T.value.length)>H?s.content.negative:s.content.secondary}},{children:[R.current.value.length,"/",H]})):e(r,{})})]})}));T.displayName="WhatsAppTextEditor";export{T as WhatsAppTextEditor};
|
|
@@ -9,7 +9,8 @@ import{jsxs as e,jsx as o}from"react/jsx-runtime";import t from"../../assets/ico
|
|
|
9
9
|
background-position: center;
|
|
10
10
|
background-size: cover;
|
|
11
11
|
position: relative;
|
|
12
|
-
|
|
12
|
+
width: 550px;
|
|
13
|
+
// height: 80%;
|
|
13
14
|
overflow-y: auto;
|
|
14
15
|
`,b=c.div`
|
|
15
16
|
flex-direction: row;
|
|
@@ -46,7 +47,7 @@ import{jsxs as e,jsx as o}from"react/jsx-runtime";import t from"../../assets/ico
|
|
|
46
47
|
box-shadow: 0px 1.5px 6px 0px #0000001f;
|
|
47
48
|
}
|
|
48
49
|
.slider {
|
|
49
|
-
width:
|
|
50
|
-
height:
|
|
50
|
+
width: 520px;
|
|
51
|
+
height: 520px;
|
|
51
52
|
}
|
|
52
|
-
`,
|
|
53
|
+
`,g=l.forwardRef(((l,c)=>{let{channel:g,template:u,showSampleValues:x}=l;var v,f,w,y,j;return e(m,{children:[o("div",Object.assign({style:{marginBottom:56}},{children:o(p,{channel:g,template:u,isHeader:!0,carouselCardIndex:-1,contentWrapperStyles:{width:"480px"}})})),o(r,Object.assign({naturalSlideWidth:100,naturalSlideHeight:125,totalSlides:null!==(w=null===(f=null===(v=null==u?void 0:u.components)||void 0===v?void 0:v[1].cards)||void 0===f?void 0:f.length)&&void 0!==w?w:1,orientation:"horizontal",visibleSlides:1.8},{children:e(b,{children:[o(n,Object.assign({className:"left_button"},{children:o(t,{height:10,width:10,color:h.content.primary})})),o(a,Object.assign({className:"slider"},{children:null===(j=null===(y=null==u?void 0:u.components)||void 0===y?void 0:y[1].cards)||void 0===j?void 0:j.map(((e,t)=>{var i,r;const n={components:e.components,mapping:null===(r=null===(i=null==u?void 0:u.mapping)||void 0===i?void 0:i.cards)||void 0===r?void 0:r[t]};return o(s,Object.assign({index:t},{children:o(p,{channel:g,template:n,isHeader:!1,carouselCardIndex:t},t)}),t)}))})),o(d,Object.assign({className:"right_button"},{children:o(i,{height:10,width:10,color:h.content.primary})}))]})}))]})}));export{g as CarouselPreview};
|
|
@@ -6,5 +6,6 @@ declare const CarouselPreviewCard: React.ForwardRefExoticComponent<{
|
|
|
6
6
|
showSampleValues?: boolean | undefined;
|
|
7
7
|
isHeader?: boolean | undefined;
|
|
8
8
|
carouselCardIndex?: number | undefined;
|
|
9
|
+
contentWrapperStyles?: React.CSSProperties | undefined;
|
|
9
10
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
10
11
|
export default CarouselPreviewCard;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import t from"react";import p from"styled-components";import{TemplatePreview as a}from"../template-preview/TemplatePreview.js";import"../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../constants/Theme.js";import"../template-preview/models/TemplateMeta.js";import"../template-preview/models/WhatsAppTemplate.js";import{CHANNEL_TYPE as r}from"../template-preview/models/Channels.js";const
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import t from"react";import p from"styled-components";import{TemplatePreview as a}from"../template-preview/TemplatePreview.js";import"../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../constants/Theme.js";import"../template-preview/models/TemplateMeta.js";import"../template-preview/models/WhatsAppTemplate.js";import{CHANNEL_TYPE as r}from"../template-preview/models/Channels.js";const s=p.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
height: ${e=>e.isHeader?"150px":"100%"};
|
|
4
4
|
width: ${e=>e.channel===r.WHATSAPP?"360px":"300px"};
|
|
@@ -10,4 +10,4 @@ import{jsx as e}from"react/jsx-runtime";import t from"react";import p from"style
|
|
|
10
10
|
top: 8px;
|
|
11
11
|
width: calc(100% - 25px);
|
|
12
12
|
height: calc(100% - 17px);
|
|
13
|
-
`,
|
|
13
|
+
`,i=t.forwardRef(((t,p)=>{let{channel:r,template:i,showSampleValues:o,isHeader:m,carouselCardIndex:n,contentWrapperStyles:h}=t;return e("div",{children:e(s,Object.assign({channel:r,isHeader:null!=m&&m},{children:e(l,Object.assign({style:Object.assign({},null!=h?h:{}),ref:p},{children:e(a,{showSampleValues:o,template:i,channel:r,size:"small",hideHeader:!0,carouselCardIndex:n,isWhatsappCarousel:!0})}))}))})}));export{i as default};
|
|
@@ -18,5 +18,6 @@ export interface TemplatePreviewProps {
|
|
|
18
18
|
templateContainerStyles?: React.CSSProperties;
|
|
19
19
|
showSampleValues?: boolean;
|
|
20
20
|
carouselCardIndex?: number;
|
|
21
|
+
isWhatsappCarousel?: boolean;
|
|
21
22
|
}
|
|
22
|
-
export declare const TemplatePreview: ({ template, channel, whatsAppSpecificMeta, templateCreationsInfo, hideHeader, size, onlyTemplateContent, emailSpecificMeta, smsSpecificMeta, showSampleValues, carouselCardIndex, }: TemplatePreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const TemplatePreview: ({ template, channel, whatsAppSpecificMeta, templateCreationsInfo, hideHeader, size, onlyTemplateContent, emailSpecificMeta, smsSpecificMeta, showSampleValues, carouselCardIndex, isWhatsappCarousel, }: TemplatePreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as l,Fragment as t}from"react/jsx-runtime";import{useTemplateModalContext as a}from"../template-context-mapper/context/templateModalContext.js";import i from"../../utils/StringUtils.js";import{COLORS as o}from"../../constants/Theme.js";import{TitleRegular as n}from"../TypographyStyle.js";import r from"./EmailTemplateThumbnailPreview.js";import{CHANNEL_TYPE as s}from"./models/Channels.js";import
|
|
1
|
+
import{jsx as e,jsxs as l,Fragment as t}from"react/jsx-runtime";import{useTemplateModalContext as a}from"../template-context-mapper/context/templateModalContext.js";import i from"../../utils/StringUtils.js";import{COLORS as o}from"../../constants/Theme.js";import{TitleRegular as n}from"../TypographyStyle.js";import r from"./EmailTemplateThumbnailPreview.js";import{CHANNEL_TYPE as s}from"./models/Channels.js";import p from"./SmsTemplatePreview.js";import d from"./WhatsAppTemplatePreview.js";const m=m=>{let{template:u,channel:v,whatsAppSpecificMeta:h,templateCreationsInfo:C,hideHeader:S,size:b,onlyTemplateContent:y,emailSpecificMeta:g,smsSpecificMeta:j,showSampleValues:T,carouselCardIndex:f,isWhatsappCarousel:w}=m;var x,W;const{setSelectedCarouselIndex:H}=a();return console.log("template preview: ",f,u),v===s.SMS?e("div",Object.assign({style:Object.assign({marginTop:C?16:0,border:C?`1px solid ${o.stroke.primary}`:"none",borderRadius:4},null==j?void 0:j.templateContainerStyles)},{children:e(p,{template:u,hideHeader:S,onlyTemplateContent:y,size:null!=b?b:"large",variableStore:null==j?void 0:j.smsVariableStore,display_content:null==j?void 0:j.smsDisplayContent})})):v===s.EMAIL?e("div",Object.assign({style:Object.assign({marginTop:C?16:0},null==g?void 0:g.templateContainerStyles)},{children:e(r,{template:u,handleViewTemplate:()=>{var e;null===(e=null==g?void 0:g.handleViewTemplate)||void 0===e||e.call(g)},hideHeader:S,hideViewButton:null==g?void 0:g.hideViewButtonForEmail,containerStyle:null==g?void 0:g.containerStyle,emailDisplayContent:null==g?void 0:g.emailDisplayContent,emailHtmlContainerId:null==g?void 0:g.emailHtmlContainerId})})):v===s.WHATSAPP?l("div",Object.assign({style:Object.assign(Object.assign({},null==h?void 0:h.templateContainerStyles),C?c.WhatsAppWrapper:{}),onClick:()=>{H&&w&&H(null!=f?f:-1)}},{children:[C?e("div",Object.assign({style:{padding:16}},{children:e(n,{children:i.convertToTitleCase(null!==(x=null==u?void 0:u.label)&&void 0!==x?x:"")})})):e(t,{}),e(d,{showSampleValues:T,showHeader:null==h?void 0:h.showWhatsAppHeader,extras:null==h?void 0:h.whatsAppExtras,template:u,size:C?"small":null!=b?b:"large",containerStyle:Object.assign({borderWidth:C?0:1,borderTopWidth:1},null!==(W=null==h?void 0:h.containerStyle)&&void 0!==W?W:{}),zeroStateComponent:null==h?void 0:h.zeroStateComponent,usePlaceHolderName:null==h?void 0:h.usePlaceHolderName,carouselCardIndex:f,isWhatsappCarousel:w})]})):e(t,{})},c={WhatsAppWrapper:{backgroundColor:o.surface.standard,borderRadius:4,border:`1px solid ${o.background.inactive}`,marginTop:16}};export{m as TemplatePreview};
|
|
@@ -7,4 +7,4 @@ import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import r from"st
|
|
|
7
7
|
position: relative;
|
|
8
8
|
`,c=r(i)`
|
|
9
9
|
color: ${s.content.primary};
|
|
10
|
-
`,l=r=>{const i=p(r)
|
|
10
|
+
`,l=r=>{const i=p(r);return a(),e(t,3===i?{children:r.zeroStateComponent}:{children:o(m,Object.assign({style:Object.assign({},r.containerStyle),showHeader:r.showHeader,isWhatsappCarousel:r.isWhatsappCarousel},{children:[r.showHeader&&e(n,{}),o("div",Object.assign({style:{padding:"small"===r.size?"12px 32px 12px 12px":"16px 56px 12px 16px"}},{children:[!r.hidePreviewText&&e("div",Object.assign({style:{marginBottom:16}},{children:e(c,{children:"Preview"})})),e(d,Object.assign({showHeader:r.showHeader},r))]}))]}))})};export{l as WhatsappLikePreviewV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as l}from"react/jsx-runtime";import{useState as t,useEffect as a}from"react";import{useTemplateModalContext as o}from"../template-context-mapper/context/templateModalContext.js";import{TemplateCreatorHelper as i}from"./helpers/TemplateCreatorHelper.js";import{HEADER_TYPES as n}from"./models/TemplateMeta.js";import{TemplateHelperUtils as r}from"./utils/TemplateHelperUtils.js";import{WhatsappLikePreview as d}from"./WhatsApp/WhatsAppLikePreview.js";import{WhatsappLikePreviewV2 as p}from"./WhatsApp/WhatsAppLikePreviewV2.js";const s=s=>{let{template:u,extras:v,containerStyle:m,usePlaceHolderName:h,showHeader:x,zeroStateComponent:c,size:b,showSampleValues:T,carouselCardIndex:y}=s;var
|
|
1
|
+
import{jsx as e,Fragment as l}from"react/jsx-runtime";import{useState as t,useEffect as a}from"react";import{useTemplateModalContext as o}from"../template-context-mapper/context/templateModalContext.js";import{TemplateCreatorHelper as i}from"./helpers/TemplateCreatorHelper.js";import{HEADER_TYPES as n}from"./models/TemplateMeta.js";import{TemplateHelperUtils as r}from"./utils/TemplateHelperUtils.js";import{WhatsappLikePreview as d}from"./WhatsApp/WhatsAppLikePreview.js";import{WhatsappLikePreviewV2 as p}from"./WhatsApp/WhatsAppLikePreviewV2.js";const s=s=>{let{template:u,extras:v,containerStyle:m,usePlaceHolderName:h,showHeader:x,zeroStateComponent:c,size:b,showSampleValues:T,carouselCardIndex:y,isWhatsappCarousel:w}=s;var f,B,N,V,k,C,A,L,j,S,g,F,P,O,I,H,U,W,q,z,D,M;console.log("template preview 22: ",y,u);const{selectedCarouselIndex:R}=o(),[E,G]=t(),J=new i,K=new r,Q=[];return(null===(B=null===(f=null==E?void 0:E.ctaBtn)||void 0===f?void 0:f.phoneNumber)||void 0===B?void 0:B.isChecked)&&Q.push({type:"phoneNumber",text:null!==(N=E.ctaBtn.phoneNumber.btnText)&&void 0!==N?N:"",extra:null!==(V=E.ctaBtn.phoneNumber.phoneNumber)&&void 0!==V?V:""}),(null===(C=null===(k=null==E?void 0:E.ctaBtn)||void 0===k?void 0:k.websiteLinkBtn)||void 0===C?void 0:C.isChecked)&&Q.push({type:"website",text:null!==(A=E.ctaBtn.websiteLinkBtn.btnText)&&void 0!==A?A:"",extra:null!==(j=null===(L=E.ctaBtn.websiteLinkBtn)||void 0===L?void 0:L.linkOpens)&&void 0!==j?j:"",placeholder:null!==(S=E.ctaBtn.websiteLinkBtn.placeholder)&&void 0!==S?S:""}),a((()=>{u&&J.parseUITemplateFromDBFormat({dbFormattedTemplate:u,isDuplicate:!1,showSampleValues:T,isV2:!u.htmlContentUrl}).then((e=>{G(Object.assign({},e))}))}),[u,T]),a((()=>{u&&J.parseUITemplateFromDBFormat({dbFormattedTemplate:u,isDuplicate:!1,showSampleValues:T,isV2:!u.htmlContentUrl}).then((e=>{G(Object.assign({},e))}))}),[R]),u?u.htmlContentUrl?e(d,{showHeader:x,containerPadding:"large"===b?"16px 56px 12px 16px":"12px 56px 12px 12px",containerStyle:m,textType:"html",bodyText:K.whatsappOnlyFillVariablesValueInBodyText(null!==(U=null==E?void 0:E.bodyText)&&void 0!==U?U:"",null!==(W=null==E?void 0:E.bodyVariables)&&void 0!==W?W:[],h),footerText:null==E?void 0:E.footerText,headerMediaType:(null==E?void 0:E.headerType)||n.NONE,headerText:K.fillVariablesValInBodyText(null!==(q=null==E?void 0:E.headerText)&&void 0!==q?q:"",null!==(z=null==E?void 0:E.headerVariables)&&void 0!==z?z:[],h),headerAssetLink:null!==(D=null==E?void 0:E.headerAssetLink)&&void 0!==D?D:"",headerAssetName:null!==(M=null==E?void 0:E.headerAssetName)&&void 0!==M?M:"",quickReplybtn:null==E?void 0:E.quickReply,ctaBtn:Q,actionTypes:null==E?void 0:E.actionsType,extras:v,hidePreviewText:!0,imagePreviewStyles:{objectFit:"cover"},zeroStateComponent:null!=c?c:e(l,{children:" "})}):e(p,{showHeader:x,containerPadding:"large"===b?"16px 56px 12px 16px":"12px 56px 12px 12px",containerStyle:m,textType:"html",bodyText:null==E?void 0:E.bodyText,footerText:null==E?void 0:E.footerText,headerMediaType:(null==E?void 0:E.headerType)||n.NONE,headerText:null==E?void 0:E.headerText,headerAssetLink:null!==(g=null==E?void 0:E.headerAssetLink)&&void 0!==g?g:"",headerAssetName:null!==(F=null==E?void 0:E.headerAssetName)&&void 0!==F?F:"",quickReplybtn:null==E?void 0:E.quickReply,ctaBtn:Q,actionTypes:null==E?void 0:E.actionsType,extras:v,hidePreviewText:!0,imagePreviewStyles:{objectFit:"cover"},carouselCardIndex:y,zeroStateComponent:null!=c?c:e(l,{children:" "}),bodyVariableList:null!==(O=null===(P=null==E?void 0:E.bodyVariables)||void 0===P?void 0:P.map((e=>{var l;return{placeholder:e.variableName,value:null!==(l=e.variableVal)&&void 0!==l?l:e.variableName}})))&&void 0!==O?O:[],headerVariableList:null!==(H=null===(I=null==E?void 0:E.headerVariables)||void 0===I?void 0:I.map((e=>{var l;return{placeholder:e.variableName,value:null!==(l=e.variableVal)&&void 0!==l?l:e.variableName}})))&&void 0!==H?H:[],buttons:null==E?void 0:E.allButtons,limitedTimeOfferComponent:null==E?void 0:E.limitedTimeOfferComponent,isWhatsappCarousel:w}):e(l,{children:c})};export{s as default};
|
|
@@ -187,6 +187,7 @@ export type WhatsappLikePreviewTypes = {
|
|
|
187
187
|
carouselCardIndex?: number;
|
|
188
188
|
buttons?: WhatsappPreviewButtonType[];
|
|
189
189
|
limitedTimeOfferComponent?: CreateTemplateType['limitedTimeOfferComponent'];
|
|
190
|
+
isWhatsappCarousel?: boolean;
|
|
190
191
|
};
|
|
191
192
|
export type WhatsappPreviewButtonType = {
|
|
192
193
|
type: WhatsappTemplateButtonTypes;
|