@bikdotai/bik-component-library 0.0.445-beta.4 → 0.0.445-beta.5

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.
Files changed (29) hide show
  1. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  2. package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
  3. package/dist/cjs/components/carousel-preview/CarouselPreview.d.ts +0 -1
  4. package/dist/cjs/components/carousel-preview/CarouselPreview.js +1 -52
  5. package/dist/cjs/components/carousel-preview/CarouselPreview.style.d.ts +4 -0
  6. package/dist/cjs/components/carousel-preview/CarouselPreview.style.js +52 -0
  7. package/dist/cjs/components/carousel-preview/CarouselPreviewCard.d.ts +1 -1
  8. package/dist/cjs/components/carousel-preview/CarouselPreviewCard.js +1 -1
  9. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -47
  10. package/dist/cjs/components/template-context-mapper/modalElements/ProductBox.d.ts +7 -0
  11. package/dist/cjs/components/template-context-mapper/modalElements/ProductBox.js +47 -0
  12. package/dist/cjs/components/template-preview/WhatsApp/LimitedTimeOffer/LimitedTimeOffer.index.js +1 -1
  13. package/dist/cjs/components/template-preview/WhatsApp/MediaCard.js +1 -1
  14. package/dist/cjs/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +3 -3
  15. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  16. package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
  17. package/dist/esm/components/carousel-preview/CarouselPreview.d.ts +0 -1
  18. package/dist/esm/components/carousel-preview/CarouselPreview.js +1 -52
  19. package/dist/esm/components/carousel-preview/CarouselPreview.style.d.ts +4 -0
  20. package/dist/esm/components/carousel-preview/CarouselPreview.style.js +52 -0
  21. package/dist/esm/components/carousel-preview/CarouselPreviewCard.d.ts +1 -1
  22. package/dist/esm/components/carousel-preview/CarouselPreviewCard.js +1 -1
  23. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -47
  24. package/dist/esm/components/template-context-mapper/modalElements/ProductBox.d.ts +7 -0
  25. package/dist/esm/components/template-context-mapper/modalElements/ProductBox.js +47 -0
  26. package/dist/esm/components/template-preview/WhatsApp/LimitedTimeOffer/LimitedTimeOffer.index.js +1 -1
  27. package/dist/esm/components/template-preview/WhatsApp/MediaCard.js +1 -1
  28. package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +3 -3
  29. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),r=require("react/jsx-runtime"),i=require("../../../../utils/StringUtils.js"),t=require("../../../../constants/Theme.js");require("../../../../constants/zindex.js");var g=require("react");require("../../../checkBox/CheckBox.styled.js");var s=require("../../../TypographyStyle.js");require("../../../list-item/ListItem.js"),require("../../../pagination/Pagination.js"),require("../../../radioButton/RadioButton.styled.js"),require("react-dom"),require("react-toastify"),require("../../../toaster/Toaster.styled.js"),require("../../../tooltips/Tooltip.js"),require("../../../spinner/Spinner.js"),require("../../../stepper/Stepper.styled.js"),require("../../../tag/Tag.js"),require("../../../icon-button/IconButton.js"),require("../../../template-preview/TemplatePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../../curtain/CurtainHelper.js"),require("../../../template-preview/models/TemplateMeta.js"),require("../../../template-preview/models/WhatsAppTemplate.js"),require("../../../modals/styledModal.js"),require("../../../template-preview/models/Channels.js"),require("../../../template-context-mapper/context/templateModalContext.js"),require("../../../template-context-mapper/modalElements/Footer.js"),require("../../../template-context-mapper/modalElements/Body.js"),require("../../../template-context-mapper/modalElements/Header.js"),require("../../../zeroState/ZeroState.js"),require("../../../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../../../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../../../button/Button.js"),require("../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../../../input/Input.js"),require("react-bootstrap"),require("../../../floating-action-button/FloatingActionButton.styles.js"),require("../../../image-compress/ImageCompress.js"),require("../../../progress-bar/ProgressBarComponent.js"),require("../../../QueryBuilder/QueryBuilder.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),require("../../../QueryBuilder/constants/connectorPosition.js"),require("../../../QueryBuilder/constants/connector.js"),require("../../../QueryBuilder/types/QueryBuilder.type.js"),require("../../../dropdown/Dropdown.js"),require("../../../QueryBuilder/components/InputLoader.js"),require("../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js"),require("react-chips"),require("../../../input/ChipInput.styled.js"),require("../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js"),require("../../../QueryBuilder/components/Connectors/Components/IgPicker.js"),require("../../../QueryBuilder/components/Connectors/Components/InTheLast.js"),require("../../../QueryBuilder/components/Connectors/Components/InTwoLast.js"),require("react-calendar"),require("../../../../utils/DateUtils.js"),require("../../../datePicker/DatePickerWrapper.styled.js"),require("../../../QueryBuilder/components/Connectors/Connector.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js"),require("../../../QueryBuilder/redux/queryBuilder.reducer.js"),require("../../../QueryBuilder/redux/queryBuilderCache.reducer.js"),require("../../../QueryBuilder/types/QueryBuilderOperator.type.js"),require("../../../dropdown/DropdownPopover/index.js"),require("../../../dropdown/ChipDropdown.js"),require("../../../dropdown/MenuItem/MenuItem.js"),require("../../../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../../analytics-card/AnalyticsCard.styled.js"),require("../../CommonStyles.js"),require("../../../datePicker/DatePicker.styled.js"),require("../../AnalyticsMetric.js"),require("../LineChart/LineChart.js"),require("../linearChipGroupedChart/LinearChipGroupedChart.styled.js");var I=require("./PieChart.js");require("../HorizontalBarGraph/HorizontalGraph.js"),require("../StackedBarChart/StackedBarChart.js"),require("../VerticalBarGraph/VerticalGraph.js"),require("../heatmap/HeatMap.js"),require("../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),require("../../../avatar/Avatar.js"),require("../../../avatar/AvatarHelper.js"),require("../../../alerts/Alert.styled.js"),require("../../../alerts/AlertHelper.js"),require("../../../thumbnail/Thumbnail.js"),require("../../../curtain/Curtain.styled.js"),require("../../../switch/Switch.js"),require("../../../plans/SubscriptionPlanStyled.js"),require("../../../plans/SubscriptionPlanSelector.js"),require("../../../plans/SubscriptionPlansCollected.js"),require("../../../tabs/Tabs.js"),require("../../../TablePagination/TablePagination.styled.js"),require("../../../TablePagination/TablePaginationCard.js"),require("../../../states/StateComponent.js"),require("../../../../_virtual/_tslib.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditor.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),require("../../../card-selection-modal/CardSelectionModal.styled.js"),require("react-image-crop"),require("../../../buttonGroup/ButtonGroupStyle.js"),require("../../../accordion/Accordion.style.js"),require("../../../accordion/AccordionArrow.js"),require("../../../file-uploader/FileUploaderStyle.js"),require("../../../colourInput/ColourInput.styled.js"),require("../../../bik-layout/CommonStyles.js"),require("../../../navigation-hyperlink/NavigationHyperlink.js"),require("../../../bik-layout/SidebarStyles.js"),require("date-fns"),require("react-popper"),require("../../../dropdown/Common.styled.js"),require("../../../custom-date-time/CustomDateTime.styled.js"),require("../../../../node_modules/lodash.debounce/index.js"),require("../../../product-picker/ProductPicker.styled.js"),require("../../../discount-modal/type.js"),require("../../../product-picker-v2/modal.js"),require("../../../discount-modal/DiscountModal.styled.js"),require("../../../discount-modal/DynamicCoupon/DynamicCoupon.js"),require("../../../discount-modal/CouponExpiration/CouponExpiration.js"),require("../../../country-code-picker/CountryCodePicker.styled.js"),require("../../../carousel/carousel.js"),require("../../../carousel-secondary/CarouselSecondary.style.js"),require("../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js"),require("../../../radioList/RadioList.styled.js"),require("../../../checkList/CheckList.styled.js"),require("../../../postPicker/postPicker.js"),require("../../../dropdown-button/DropdownButton.style.js"),require("../../../side-modal/SideModal.style.js"),require("../../../add-variableV2/AddVariableV2.styled.js"),require("../../../modals/modal.styled.js"),require("../../../SearchFilter/types/SearchFilter.type.js"),require("../../../SearchFilter/components/DatePickerButton.js"),require("../../../SearchFilter/components/DateRangeOnlyButton.js"),require("../../../input-with-vars/InputWithVariables.js"),require("../../../star-rating/StarRating.js"),require("../../../dashboard-review-popup/components/FiveStar.styled.js"),require("../../../dashboard-review-popup/components/Form.styled.js"),require("../../../dashboard-review-popup/components/ZeroState.js"),require("../../../dashboard-review-popup/DashboardReviewPopUp.styled.js"),require("../../../testimonial-card/TestimonialCard.style.js"),require("../../../slider/slider.js"),require("../../../carousel-preview/CarouselPreview.js");var C=require("chart.js"),o=require("react-chartjs-2");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=c(e);C.Chart.register(C.ArcElement,C.Legend);const l={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:e=>{if(!e.label)return" 0%";const r=e.dataset.data.reduce(((e,r)=>e+r),0),i=parseFloat((e.raw/r*100).toFixed(1));return` ${e.label}: ${i}%`}}}}},A=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],d=a.default("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(e=>t.COLORS.surface.standard),";border:1px solid ",(e=>t.COLORS.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/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Rvb2x0aXA6IHtcclxuICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2tzOiB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbDogKHRvb2x0aXBJdGVtKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9OiAke3BlcmNlbnRhZ2V9JWA7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG59O1xyXG5jb25zdCBHUkFQSF9DT0xPUlMgPSBbXHJcbiAgICAnIzVFMDdCQicsXHJcbiAgICAnIzlFNzdFRCcsXHJcbiAgICAnI0QyQUVGRicsXHJcbiAgICAnI0NERTFGRicsXHJcbiAgICAnIzkyQUZGQScsXHJcbiAgICAnIzM5MzVFMScsXHJcbl07XHJcbmNvbnN0IENhcnRTdHlsZWQgPSBzdHlsZWQuZGl2IGBcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpb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XRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */"));exports.Card=e=>r.jsx(d,Object.assign({style:{padding:24}},{children:e.children})),exports.PieChartAnalytics=e=>{let{title:t,slices:C,size:c}=e;const[a,d]=g.useState([]),[u,n]=g.useState();return g.useEffect((()=>{const e=C.reduce(((e,r)=>e+r.count),0);let r=[];if(r=Object.keys(C).map(((e,r)=>Object.assign({color:A[r%A.length]},C[e]))),d([...r]),0===e){n({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const e={labels:C.map((e=>i.default.capitalize(e.name))),datasets:[{data:C.map((e=>e.count)),backgroundColor:C.map(((e,r)=>{var i;return null!==(i=e.color)&&void 0!==i?i:A[r%A.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};n(e)}}),[C]),u?r.jsxs(r.Fragment,{children:[t&&r.jsx(s.TitleMedium,Object.assign({style:{marginBottom:16}},{children:t})),r.jsxs("div",Object.assign({className:"row"},{children:[r.jsx("div",Object.assign({className:"col-6"},{children:r.jsx("div",Object.assign({style:{width:c,height:c}},{children:r.jsx(o.Doughnut,{data:u,options:Object.assign(Object.assign({},l),{maintainAspectRatio:!c})})}))})),r.jsx("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:r.jsx(I.PieChart,{slices:a})}))]}))]}):r.jsx(r.Fragment,{})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),r=require("react/jsx-runtime"),i=require("../../../../utils/StringUtils.js"),t=require("../../../../constants/Theme.js");require("../../../../constants/zindex.js");var g=require("react");require("../../../checkBox/CheckBox.styled.js");var s=require("../../../TypographyStyle.js");require("../../../list-item/ListItem.js"),require("../../../pagination/Pagination.js"),require("../../../radioButton/RadioButton.styled.js"),require("react-dom"),require("react-toastify"),require("../../../toaster/Toaster.styled.js"),require("../../../tooltips/Tooltip.js"),require("../../../spinner/Spinner.js"),require("../../../stepper/Stepper.styled.js"),require("../../../tag/Tag.js"),require("../../../icon-button/IconButton.js"),require("../../../template-preview/TemplatePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../../curtain/CurtainHelper.js"),require("../../../template-preview/models/TemplateMeta.js"),require("../../../template-preview/models/WhatsAppTemplate.js"),require("../../../modals/styledModal.js"),require("../../../template-preview/models/Channels.js"),require("../../../template-context-mapper/context/templateModalContext.js"),require("../../../template-context-mapper/modalElements/Footer.js"),require("../../../template-context-mapper/modalElements/Body.js"),require("../../../template-context-mapper/modalElements/Header.js"),require("../../../zeroState/ZeroState.js"),require("../../../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../../../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../../../button/Button.js"),require("../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../../../input/Input.js"),require("react-bootstrap"),require("../../../floating-action-button/FloatingActionButton.styles.js"),require("../../../image-compress/ImageCompress.js"),require("../../../progress-bar/ProgressBarComponent.js"),require("../../../QueryBuilder/QueryBuilder.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),require("../../../QueryBuilder/constants/connectorPosition.js"),require("../../../QueryBuilder/constants/connector.js"),require("../../../QueryBuilder/types/QueryBuilder.type.js"),require("../../../dropdown/Dropdown.js"),require("../../../QueryBuilder/components/InputLoader.js"),require("../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js"),require("react-chips"),require("../../../input/ChipInput.styled.js"),require("../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js"),require("../../../QueryBuilder/components/Connectors/Components/IgPicker.js"),require("../../../QueryBuilder/components/Connectors/Components/InTheLast.js"),require("../../../QueryBuilder/components/Connectors/Components/InTwoLast.js"),require("react-calendar"),require("../../../../utils/DateUtils.js"),require("../../../datePicker/DatePickerWrapper.styled.js"),require("../../../QueryBuilder/components/Connectors/Connector.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js"),require("../../../QueryBuilder/redux/queryBuilder.reducer.js"),require("../../../QueryBuilder/redux/queryBuilderCache.reducer.js"),require("../../../QueryBuilder/types/QueryBuilderOperator.type.js"),require("../../../dropdown/DropdownPopover/index.js"),require("../../../dropdown/ChipDropdown.js"),require("../../../dropdown/MenuItem/MenuItem.js"),require("../../../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../../analytics-card/AnalyticsCard.styled.js"),require("../../CommonStyles.js"),require("../../../datePicker/DatePicker.styled.js"),require("../../AnalyticsMetric.js"),require("../LineChart/LineChart.js"),require("../linearChipGroupedChart/LinearChipGroupedChart.styled.js");var I=require("./PieChart.js");require("../HorizontalBarGraph/HorizontalGraph.js"),require("../StackedBarChart/StackedBarChart.js"),require("../VerticalBarGraph/VerticalGraph.js"),require("../heatmap/HeatMap.js"),require("../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),require("../../../avatar/Avatar.js"),require("../../../avatar/AvatarHelper.js"),require("../../../alerts/Alert.styled.js"),require("../../../alerts/AlertHelper.js"),require("../../../thumbnail/Thumbnail.js"),require("../../../curtain/Curtain.styled.js"),require("../../../switch/Switch.js"),require("../../../plans/SubscriptionPlanStyled.js"),require("../../../plans/SubscriptionPlanSelector.js"),require("../../../plans/SubscriptionPlansCollected.js"),require("../../../tabs/Tabs.js"),require("../../../TablePagination/TablePagination.styled.js"),require("../../../TablePagination/TablePaginationCard.js"),require("../../../states/StateComponent.js"),require("../../../../_virtual/_tslib.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditor.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),require("../../../card-selection-modal/CardSelectionModal.styled.js"),require("react-image-crop"),require("../../../buttonGroup/ButtonGroupStyle.js"),require("../../../accordion/Accordion.style.js"),require("../../../accordion/AccordionArrow.js"),require("../../../file-uploader/FileUploaderStyle.js"),require("../../../colourInput/ColourInput.styled.js"),require("../../../bik-layout/CommonStyles.js"),require("../../../navigation-hyperlink/NavigationHyperlink.js"),require("../../../bik-layout/SidebarStyles.js"),require("date-fns"),require("react-popper"),require("../../../dropdown/Common.styled.js"),require("../../../custom-date-time/CustomDateTime.styled.js"),require("../../../../node_modules/lodash.debounce/index.js"),require("../../../product-picker/ProductPicker.styled.js"),require("../../../discount-modal/type.js"),require("../../../product-picker-v2/modal.js"),require("../../../discount-modal/DiscountModal.styled.js"),require("../../../discount-modal/DynamicCoupon/DynamicCoupon.js"),require("../../../discount-modal/CouponExpiration/CouponExpiration.js"),require("../../../country-code-picker/CountryCodePicker.styled.js"),require("../../../carousel/carousel.js"),require("../../../carousel-secondary/CarouselSecondary.style.js"),require("../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js"),require("../../../radioList/RadioList.styled.js"),require("../../../checkList/CheckList.styled.js"),require("../../../postPicker/postPicker.js"),require("../../../dropdown-button/DropdownButton.style.js"),require("../../../side-modal/SideModal.style.js"),require("../../../add-variableV2/AddVariableV2.styled.js"),require("../../../modals/modal.styled.js"),require("../../../SearchFilter/types/SearchFilter.type.js"),require("../../../SearchFilter/components/DatePickerButton.js"),require("../../../SearchFilter/components/DateRangeOnlyButton.js"),require("../../../input-with-vars/InputWithVariables.js"),require("../../../star-rating/StarRating.js"),require("../../../dashboard-review-popup/components/FiveStar.styled.js"),require("../../../dashboard-review-popup/components/Form.styled.js"),require("../../../dashboard-review-popup/components/ZeroState.js"),require("../../../dashboard-review-popup/DashboardReviewPopUp.styled.js"),require("../../../testimonial-card/TestimonialCard.style.js"),require("../../../slider/slider.js"),require("pure-react-carousel"),require("../../../carousel-preview/CarouselPreview.style.js");var C=require("chart.js"),o=require("react-chartjs-2");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=c(e);C.Chart.register(C.ArcElement,C.Legend);const l={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:e=>{if(!e.label)return" 0%";const r=e.dataset.data.reduce(((e,r)=>e+r),0),i=parseFloat((e.raw/r*100).toFixed(1));return` ${e.label}: ${i}%`}}}}},A=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],d=a.default("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(e=>t.COLORS.surface.standard),";border:1px solid ",(e=>t.COLORS.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzL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hY2tzOiB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbDogKHRvb2x0aXBJdGVtKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9OiAke3BlcmNlbnRhZ2V9JWA7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG59O1xyXG5jb25zdCBHUkFQSF9DT0xPUlMgPSBbXHJcbiAgICAnIzVFMDdCQicsXHJcbiAgICAnIzlFNzdFRCcsXHJcbiAgICAnI0QyQUVGRicsXHJcbiAgICAnI0NERTFGRicsXHJcbiAgICAnIzkyQUZGQScsXHJcbiAgICAnIzM5MzVFMScsXHJcbl07XHJcbmNvbnN0IENhcnRTdHlsZWQgPSBzdHlsZWQuZGl2IGBcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDYXJkID0gKH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ogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAg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c3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */"));exports.Card=e=>r.jsx(d,Object.assign({style:{padding:24}},{children:e.children})),exports.PieChartAnalytics=e=>{let{title:t,slices:C,size:c}=e;const[a,d]=g.useState([]),[u,n]=g.useState();return g.useEffect((()=>{const e=C.reduce(((e,r)=>e+r.count),0);let r=[];if(r=Object.keys(C).map(((e,r)=>Object.assign({color:A[r%A.length]},C[e]))),d([...r]),0===e){n({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const e={labels:C.map((e=>i.default.capitalize(e.name))),datasets:[{data:C.map((e=>e.count)),backgroundColor:C.map(((e,r)=>{var i;return null!==(i=e.color)&&void 0!==i?i:A[r%A.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};n(e)}}),[C]),u?r.jsxs(r.Fragment,{children:[t&&r.jsx(s.TitleMedium,Object.assign({style:{marginBottom:16}},{children:t})),r.jsxs("div",Object.assign({className:"row"},{children:[r.jsx("div",Object.assign({className:"col-6"},{children:r.jsx("div",Object.assign({style:{width:c,height:c}},{children:r.jsx(o.Doughnut,{data:u,options:Object.assign(Object.assign({},l),{maintainAspectRatio:!c})})}))})),r.jsx("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:r.jsx(I.PieChart,{slices:a})}))]}))]}):r.jsx(r.Fragment,{})};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
@@ -10,5 +10,4 @@ export declare const CarouselPreview: React.ForwardRefExoticComponent<{
10
10
  template: WhatsAppTemplate | EmailTemplateType | SMSTemplateType | WhatsAppCarouselTemplate | null;
11
11
  showSampleValues?: boolean | undefined;
12
12
  isPreview?: boolean | undefined;
13
- cardWidth?: number | undefined;
14
13
  } & React.RefAttributes<HTMLDivElement>>;
@@ -1,52 +1 @@
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 l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(o),c=l(n);const u=c.default.div`
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
- border-color: ${a.COLORS.stroke.primary};
4
- border-top-style: solid;
5
- border-bottom-style: solid;
6
- border-top-width: 1px;
7
- border-bottom-width: 1px;
8
- background-repeat: no-repeat;
9
- background-position: center;
10
- background-size: cover;
11
- position: relative;
12
- height: 500px;
13
- overflow-y: auto;
14
- `,p=c.default.div`
15
- flex-direction: row;
16
- display: flex;
17
- align-items: center;
18
- .left_button {
19
- border-radius: 50%;
20
- width: 24px;
21
- height: 24px;
22
- align-items: center;
23
- justify-content: center;
24
- display: flex;
25
- position: absolute;
26
- left: 0;
27
- z-index: 10;
28
- margin-left: 4px;
29
- border: none;
30
- background-color: white;
31
- box-shadow: 0px 1.5px 6px 0px #0000001f;
32
- }
33
- .right_button {
34
- border-radius: 50%;
35
- width: 24px;
36
- height: 24px;
37
- align-items: center;
38
- justify-content: center;
39
- display: flex;
40
- position: absolute;
41
- right: 0;
42
- z-index: 10;
43
- margin-right: 4px;
44
- border: none;
45
- background-color: white;
46
- box-shadow: 0px 1.5px 6px 0px #0000001f;
47
- }
48
- .slider {
49
- width: 100%;
50
- height: 480px;
51
- }
52
- `,h=d.default.forwardRef(((o,n)=>{let{channel:l,template:d,showSampleValues:c,isPreview:h,cardWidth:b}=o;var x,g,v,f;const m=null===(x=null==d?void 0:d.components)||void 0===x?void 0:x[1].cards;return e.jsxs(u,{children:[e.jsx(s.default,{channel:l,template:d,carouselCardIndex:-1,isPreview:h,width:b}),!!(null==m?void 0:m.length)&&e.jsx(r.CarouselProvider,Object.assign({naturalSlideWidth:100,naturalSlideHeight:125,totalSlides:null!==(g=null==m?void 0:m.length)&&void 0!==g?g:1,orientation:"horizontal",visibleSlides:1.3,dragEnabled:!0,touchEnabled:!0},{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===(f=null===(v=null==d?void 0:d.components)||void 0===v?void 0:v[1].cards)||void 0===f?void 0:f.map(((t,i)=>{var o,n;const a={components:t.components,mapping:null===(n=null===(o=null==d?void 0:d.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:l,template:a,carouselCardIndex:i,isPreview:h,width:b},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;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../assets/icons/chevronLeft.svg.js"),t=require("../../assets/icons/chevronRight.svg.js"),i=require("pure-react-carousel"),n=require("react"),s=require("./CarouselPreview.style.js"),l=require("./CarouselPreviewCard.js"),a=require("../../constants/Theme.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const d=o(n).default.forwardRef(((n,o)=>{let{channel:d,template:u,showSampleValues:c,isPreview:v}=n;var h,j,p,m;const x=null===(h=null==u?void 0:u.components)||void 0===h?void 0:h[1].cards;return e.jsxs(s.Container,{children:[e.jsx(l.default,{channel:d,template:u,carouselCardIndex:-1,isPreview:v,width:"77%"}),!!(null==x?void 0:x.length)&&e.jsx(i.CarouselProvider,Object.assign({naturalSlideWidth:100,naturalSlideHeight:125,totalSlides:null!==(j=null==x?void 0:x.length)&&void 0!==j?j:1,orientation:"horizontal",visibleSlides:1.3,dragEnabled:!0,touchEnabled:!0},{children:e.jsxs(s.CarouselContainer,{children:[e.jsx(i.ButtonBack,Object.assign({className:"left_button"},{children:e.jsx(r.default,{height:10,width:10,color:a.COLORS.content.primary})})),e.jsx(i.Slider,Object.assign({className:"slider"},{children:null===(m=null===(p=null==u?void 0:u.components)||void 0===p?void 0:p[1].cards)||void 0===m?void 0:m.map(((r,t)=>{var n,s;const a={components:r.components,mapping:null===(s=null===(n=null==u?void 0:u.mapping)||void 0===n?void 0:n.cards)||void 0===s?void 0:s[t]};return e.jsx(i.Slide,Object.assign({index:t},{children:e.jsx(l.default,{channel:d,template:a,carouselCardIndex:t,isPreview:v,width:"100%"},t)}),t)}))})),e.jsx(i.ButtonNext,Object.assign({className:"right_button"},{children:e.jsx(t.default,{height:10,width:10,color:a.COLORS.content.primary})}))]})}))]})}));exports.CarouselPreview=d;
@@ -0,0 +1,4 @@
1
+ export declare const Container: import("styled-components").StyledComponent<"div", any, {
2
+ showHeader?: boolean | undefined;
3
+ }, never>;
4
+ export declare const CarouselContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,52 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../constants/Theme.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(e);const i=r.default.div`
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
+ border-color: ${t.COLORS.stroke.primary};
4
+ border-top-style: solid;
5
+ border-bottom-style: solid;
6
+ border-top-width: 1px;
7
+ border-bottom-width: 1px;
8
+ background-repeat: no-repeat;
9
+ background-position: center;
10
+ background-size: cover;
11
+ position: relative;
12
+ height: 500px;
13
+ overflow-y: auto;
14
+ `,n=r.default.div`
15
+ flex-direction: row;
16
+ display: flex;
17
+ align-items: center;
18
+ .left_button {
19
+ border-radius: 50%;
20
+ width: 24px;
21
+ height: 24px;
22
+ align-items: center;
23
+ justify-content: center;
24
+ display: flex;
25
+ position: absolute;
26
+ left: 0;
27
+ z-index: 10;
28
+ margin-left: 4px;
29
+ border: none;
30
+ background-color: white;
31
+ box-shadow: 0px 1.5px 6px 0px #0000001f;
32
+ }
33
+ .right_button {
34
+ border-radius: 50%;
35
+ width: 24px;
36
+ height: 24px;
37
+ align-items: center;
38
+ justify-content: center;
39
+ display: flex;
40
+ position: absolute;
41
+ right: 0;
42
+ z-index: 10;
43
+ margin-right: 4px;
44
+ border: none;
45
+ background-color: white;
46
+ box-shadow: 0px 1.5px 6px 0px #0000001f;
47
+ }
48
+ .slider {
49
+ width: 100%;
50
+ height: 480px;
51
+ }
52
+ `;exports.CarouselContainer=n,exports.Container=i;
@@ -6,6 +6,6 @@ declare const CarouselPreviewCard: React.ForwardRefExoticComponent<{
6
6
  showSampleValues?: boolean | undefined;
7
7
  carouselCardIndex?: number | undefined;
8
8
  isPreview?: boolean | undefined;
9
- width?: number | undefined;
9
+ width?: string | undefined;
10
10
  } & React.RefAttributes<HTMLDivElement>>;
11
11
  export default CarouselPreviewCard;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../template-context-mapper/context/templateModalContext.js"),a=require("../template-preview/TemplatePreview.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../constants/Theme.js"),require("../curtain/CurtainHelper.js"),require("../template-preview/models/TemplateMeta.js"),require("../template-preview/models/WhatsAppTemplate.js");const i=s(t).default.forwardRef((t=>{let{channel:s,template:i,showSampleValues:p,carouselCardIndex:l,isPreview:u,width:n}=t;const{cardWidth:o}=r.useTemplateModalContext();return e.jsx("div",Object.assign({style:{width:n||(o||360)}},{children:e.jsx(a.TemplatePreview,{showSampleValues:p,template:i,channel:s,size:"small",hideHeader:!0,carouselCardIndex:l,isWhatsappCarousel:!0,isPreview:u})}))}));exports.default=i;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../template-context-mapper/context/templateModalContext.js"),a=require("../template-preview/TemplatePreview.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../constants/Theme.js"),require("../curtain/CurtainHelper.js"),require("../template-preview/models/TemplateMeta.js"),require("../template-preview/models/WhatsAppTemplate.js");const i=s(t).default.forwardRef((t=>{let{channel:s,template:i,showSampleValues:p,carouselCardIndex:l,isPreview:u,width:n}=t;const{cardWidth:o}=r.useTemplateModalContext();return e.jsx("div",Object.assign({style:{width:n||o}},{children:e.jsx(a.TemplatePreview,{showSampleValues:p,template:i,channel:s,size:"small",hideHeader:!0,carouselCardIndex:l,isWhatsappCarousel:!0,isPreview:u})}))}));exports.default=i;
@@ -1,47 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/PlusIcon.js"),i=require("lodash"),s=require("react"),r=require("styled-components"),l=require("../../add-variableV2/AddVariableV2SideModal.js");require("../../../_virtual/_tslib.js"),require("../../add-variableV2/AddVariableV2.styled.js");var a=require("../../button/Button.js"),o=require("../../icon-button/IconButton.js");require("../../input/Input.js"),require("../../tooltips/Tooltip.js");var n=require("../../../constants/Theme.js");require("../../modals/modal.styled.js"),require("../../switch/Switch.js");var d=require("../../TypographyStyle.js"),c=require("../../product-picker-v2/modal.js"),u=require("../context/templateModalContext.js"),p=require("./EditWhatsAppTemplateV2.js");require("../../template-preview/TemplatePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../curtain/CurtainHelper.js"),require("../../template-preview/models/TemplateMeta.js");var m=require("../../template-preview/models/WhatsAppTemplate.js"),h=require("../../../assets/icons/box.svg.js"),f=require("../../../assets/icons/delete.svg.js"),g=require("../../../assets/icons/edit.svg.js");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const j=t=>{const{cardBody:i,deleteItem:s,editItem:r}=t;return e.jsxs(y,Object.assign({width:"100%"},{children:[e.jsx("div",Object.assign({style:{width:36,height:36}},{children:e.jsx(h.default,{})})),e.jsx("div",Object.assign({className:"card-body"},{children:e.jsx(d.TitleRegular,{children:i})})),e.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center"}},{children:[r&&e.jsx(o.IconButton,{style:{display:"flex"},Icon:g.default,onClick:e=>{r(),e.stopPropagation()}}),e.jsx(o.IconButton,{style:{display:"flex",color:"#919191"},Icon:f.default,onClick:e=>{s(),e.stopPropagation()}})]}))]}))},y=x(r).default.div`
2
- width: ${e=>e.width};
3
- padding: 12px;
4
- display: flex;
5
- flex-direction: row;
6
- column-gap: 14px;
7
- justify-content: center;
8
- align-items: center;
9
- background: #ffffff;
10
-
11
- border: 1px solid #e0e0e0;
12
- border-radius: 4px;
13
-
14
- .card-body {
15
- width: 256px;
16
- display: flex;
17
- flex-direction: column;
18
- justify-content: center;
19
-
20
- &__dynamic {
21
- font-family: 'Inter';
22
- font-style: normal;
23
- font-weight: 400;
24
- font-size: 16px;
25
- line-height: 24px;
26
- color: #731dcf;
27
-
28
- &__desc {
29
- font-family: 'Inter';
30
- font-style: normal;
31
- font-weight: 400;
32
- font-size: 12px;
33
- line-height: 16px;
34
- color: #616161;
35
- }
36
- }
37
-
38
- &__simple {
39
- font-family: 'Inter';
40
- font-style: normal;
41
- font-weight: 400;
42
- font-size: 16px;
43
- line-height: 24px;
44
- color: #000000;
45
- }
46
- }
47
- `;exports.default=r=>{let{template:o,whatsappSpecificPickerMeta:h,showVariableModal:f,variableList:g,variableListForImage:x,discountCode:y,setDiscountCode:v}=r;var b,I;const{selectedCarouselIndex:C,setTemplate:w,pickerConf:q,isProductCarouselType:O,pod:P,cardCount:T,carouselProducts:k,setCarouselProducts:S,isError:B,cardImages:V,disableEditVariable:A,onDeleteSelectedProducts:L}=u.useTemplateModalContext(),[M,E]=s.useState(-1==C?"First Message (Step 1/2)":"Carousel Cards (Step 2/2)"),[_,D]=s.useState(!1),[F,W]=s.useState(!1),[z,R]=s.useState(!1);s.useEffect((()=>{E(-1==C?"First Message (Step 1/2)":"Carousel Cards (Step 2/2)")}),[C]);return e.jsxs("div",{children:[e.jsx(d.TitleMedium,Object.assign({style:{marginLeft:10,marginBottom:10}},{children:M})),O&&(null!==(b=null==k?void 0:k.length)&&void 0!==b?b:0)>0&&null!=C&&C>=0&&e.jsxs("div",Object.assign({style:{display:"flex",rowGap:16,marginBottom:16,flexDirection:"column"}},{children:[e.jsx(j,{editItem:()=>D(!_),cardBody:`${null==k?void 0:k.length} Products Selected`,deleteItem:()=>{const e=i.cloneDeep(Object.assign({},o));e&&(null==V||V.forEach(((t,i)=>{var s;e.components[1].cards[i].components[0].example.header_handle=[null!==(s=V[i])&&void 0!==s?s:""]})),null==w||w(e)),null==S||S([]),null==L||L()}}),e.jsx(a.Button,{disabled:(null!==(I=null==k?void 0:k.length)&&void 0!==I?I:0)<=1,style:{alignSelf:"flex-end",background:n.COLORS.surface.subdued},onClick:()=>{W(!0),D(!0)},buttonText:"Rearrange Products",buttonType:"tertiary"})]})),!A&&O&&0===(null==k?void 0:k.length)&&null!=C&&C>=0&&e.jsxs("div",Object.assign({style:{marginTop:16,marginBottom:16,marginLeft:12,marginRight:12,flexDirection:"column",display:"flex",alignItems:"center"}},{children:[e.jsx(a.Button,{matchParentWidth:!0,style:{flex:1,display:"flex",width:"100%",marginBottom:12,border:B?`2px dashed ${n.COLORS.content.negative}`:void 0},size:"medium",buttonText:"Add Product(s)",buttonType:B?"tertiaryGray":"dashBold",LeadingIcon:t.default,onClick:e=>{D(!0)}}),P===m.POD.CHATBOT&&e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{display:"flex",flex:1,alignItems:"center",justifyContent:"space-between",flexDirection:"row",width:"100%"}},{children:[e.jsx("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginRight:8}}),e.jsx(d.BodyCaption,Object.assign({style:{color:"#616161",overflow:"unset"}},{children:"OR"})),e.jsx("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginLeft:8}})]})),e.jsx(a.Button,{matchParentWidth:!0,style:{flex:1,display:"flex",marginTop:12,width:"100%"},size:"medium",buttonText:"Add Product(s) Variable",buttonType:"dashBold",LeadingIcon:t.default,onClick:e=>{R(!0)}})]})]})),e.jsx(p.default,{whatsappSpecificPickerMeta:h,template:o,onTemplateChange:e=>{null==w||w(e)},showVariableModal:f,variableList:g,variableListForImage:x,discountCode:y,setDiscountCode:v}),_&&q&&e.jsx(c.ProductPickerModal,{zIndex:200,rearrangeEnabled:F,limit:null!=T?T:1,storeId:q.storeId,selectedItems:(e=>{if(e.length>0){const t={};for(const i of e){const e=null==i?void 0:i.collectionId,s=i.productId,r=i.variantId;e in t||(t[e]={products:{},name:"",image:"",isSmartCollection:!1}),s in t[e].products||(t[e].products[s]={variants:{},name:(null==i?void 0:i.productName)||"",image:(null==i?void 0:i.productImage)||""}),t[e].products[s].variants[r]={name:(null==i?void 0:i.name)||"",price:"",image:(null==i?void 0:i.image)||"",quantity:i.quantity||0,displayOrder:i.displayOrder}}return t}return{}})(null!=k?k:[]),collectionFetcher:q.fetchCollections,productFetcher:q.fetchProducts,onAdd:(e,t)=>{W(!1);const s=[];delete e.isCustom;for(const t of Object.keys(e)){const i=e[t].products;if(void 0!==i&&Object.keys(i).length)for(const e of Object.keys(i)){const r=i[e].variants;if(void 0!==r&&Object.keys(r).length)for(const l of Object.keys(r)){const{name:a,image:o,quantity:n,displayOrder:d}=r[l],c={name:a,image:o,quantity:n,variantId:l,productId:e,displayOrder:d,collectionId:t,productName:i[e].name,productImage:i[e].image};s.push(c)}}}const r=s.sort(((e,t)=>e.displayOrder-t.displayOrder)),l=s.map((e=>e.image)),a=i.cloneDeep(Object.assign({},o));a&&(l.forEach(((e,t)=>{var i;a.components[1].cards[t].components[0].example.header_handle=e?[e]:[null!==(i=null==V?void 0:V[t])&&void 0!==i?i:""]})),null==w||w(a)),null==S||S(r),D(!1)},searchInCollectionFetcher:q.searchInCollection,searchFetcher:q.searchProducts,visible:_,onClose:()=>{D(!1)},exactLimit:null!=T?T:1}),z&&e.jsx(l.AddVariableV2SideModal,{zIndex:2e3,data:null!=g?g:[],showVariable:z,setShowVariable:R,placeholder:"Add a variable",customTrigger:e=>{}})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/PlusIcon.js"),r=require("lodash"),a=require("react"),i=require("../../add-variableV2/AddVariableV2SideModal.js");require("../../../_virtual/_tslib.js"),require("../../add-variableV2/AddVariableV2.styled.js");var s=require("../../button/Button.js");require("../../icon-button/IconButton.js"),require("../../input/Input.js"),require("../../tooltips/Tooltip.js");var l=require("../../../constants/Theme.js");require("../../modals/modal.styled.js"),require("../../switch/Switch.js");var o=require("../../TypographyStyle.js"),n=require("../../product-picker-v2/modal.js"),d=require("../context/templateModalContext.js"),c=require("./EditWhatsAppTemplateV2.js"),u=require("./ProductBox.js");require("../../template-preview/TemplatePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../curtain/CurtainHelper.js"),require("../../template-preview/models/TemplateMeta.js");var p=require("../../template-preview/models/WhatsAppTemplate.js");exports.default=m=>{let{template:h,whatsappSpecificPickerMeta:g,showVariableModal:v,variableList:j,variableListForImage:b,discountCode:x,setDiscountCode:y}=m;var f,C;const{selectedCarouselIndex:q,setTemplate:I,pickerConf:O,isProductCarouselType:w,pod:P,cardCount:T,carouselProducts:S,setCarouselProducts:k,isError:B,cardImages:V,disableEditVariable:A,onDeleteSelectedProducts:L}=d.useTemplateModalContext(),[M,E]=a.useState(-1==q?"First Message (Step 1/2)":"Carousel Cards (Step 2/2)"),[D,F]=a.useState(!1),[W,R]=a.useState(!1),[_,z]=a.useState(!1);a.useEffect((()=>{E(-1==q?"First Message (Step 1/2)":"Carousel Cards (Step 2/2)")}),[q]);return e.jsxs("div",{children:[e.jsx(o.TitleMedium,Object.assign({style:{marginLeft:10,marginBottom:10}},{children:M})),w&&(null!==(f=null==S?void 0:S.length)&&void 0!==f?f:0)>0&&null!=q&&q>=0&&e.jsxs("div",Object.assign({style:{display:"flex",rowGap:16,marginBottom:16,flexDirection:"column"}},{children:[e.jsx(u.ProductBox,{editItem:()=>F(!D),cardBody:`${null==S?void 0:S.length} Products Selected`,deleteItem:()=>{const e=r.cloneDeep(Object.assign({},h));e&&(null==V||V.forEach(((t,r)=>{var a;e.components[1].cards[r].components[0].example.header_handle=[null!==(a=V[r])&&void 0!==a?a:""]})),null==I||I(e)),null==k||k([]),null==L||L()}}),e.jsx(s.Button,{disabled:(null!==(C=null==S?void 0:S.length)&&void 0!==C?C:0)<=1,style:{alignSelf:"flex-end",background:l.COLORS.surface.subdued},onClick:()=>{R(!0),F(!0)},buttonText:"Rearrange Products",buttonType:"tertiary"})]})),!A&&w&&0===(null==S?void 0:S.length)&&null!=q&&q>=0&&e.jsxs("div",Object.assign({style:{marginTop:16,marginBottom:16,marginLeft:12,marginRight:12,flexDirection:"column",display:"flex",alignItems:"center"}},{children:[e.jsx(s.Button,{matchParentWidth:!0,style:{flex:1,display:"flex",width:"100%",marginBottom:12,border:B?`2px dashed ${l.COLORS.content.negative}`:void 0},size:"medium",buttonText:"Add Product(s)",buttonType:B?"tertiaryGray":"dashBold",LeadingIcon:t.default,onClick:e=>{F(!0)}}),P===p.POD.CHATBOT&&e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{display:"flex",flex:1,alignItems:"center",justifyContent:"space-between",flexDirection:"row",width:"100%"}},{children:[e.jsx("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginRight:8}}),e.jsx(o.BodyCaption,Object.assign({style:{color:"#616161",overflow:"unset"}},{children:"OR"})),e.jsx("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginLeft:8}})]})),e.jsx(s.Button,{matchParentWidth:!0,style:{flex:1,display:"flex",marginTop:12,width:"100%"},size:"medium",buttonText:"Add Product(s) Variable",buttonType:"dashBold",LeadingIcon:t.default,onClick:e=>{z(!0)}})]})]})),e.jsx(c.default,{whatsappSpecificPickerMeta:g,template:h,onTemplateChange:e=>{null==I||I(e)},showVariableModal:v,variableList:j,variableListForImage:b,discountCode:x,setDiscountCode:y}),D&&O&&e.jsx(n.ProductPickerModal,{zIndex:200,rearrangeEnabled:W,storeId:O.storeId,selectedItems:(e=>{if(e.length>0){const t={};for(const r of e){const e=null==r?void 0:r.collectionId,a=r.productId,i=r.variantId;e in t||(t[e]={products:{},name:"",image:"",isSmartCollection:!1}),a in t[e].products||(t[e].products[a]={variants:{},name:(null==r?void 0:r.productName)||"",image:(null==r?void 0:r.productImage)||""}),t[e].products[a].variants[i]={name:(null==r?void 0:r.name)||"",price:"",image:(null==r?void 0:r.image)||"",quantity:r.quantity||0,displayOrder:r.displayOrder}}return t}return{}})(null!=S?S:[]),collectionFetcher:O.fetchCollections,productFetcher:O.fetchProducts,onAdd:(e,t)=>{R(!1);const a=[];delete e.isCustom;for(const t of Object.keys(e)){const r=e[t].products;if(void 0!==r&&Object.keys(r).length)for(const e of Object.keys(r)){const i=r[e].variants;if(void 0!==i&&Object.keys(i).length)for(const s of Object.keys(i)){const{name:l,image:o,quantity:n,displayOrder:d}=i[s],c={name:l,image:o,quantity:n,variantId:s,productId:e,displayOrder:d,collectionId:t,productName:r[e].name,productImage:r[e].image};a.push(c)}}}const i=a.sort(((e,t)=>e.displayOrder-t.displayOrder)),s=a.map((e=>e.image)),l=r.cloneDeep(Object.assign({},h));l&&(s.forEach(((e,t)=>{var r;l.components[1].cards[t].components[0].example.header_handle=e?[e]:[null!==(r=null==V?void 0:V[t])&&void 0!==r?r:""]})),null==I||I(l)),null==k||k(i),F(!1)},searchInCollectionFetcher:O.searchInCollection,searchFetcher:O.searchProducts,visible:D,onClose:()=>{F(!1)},exactLimit:null!=T?T:1}),_&&e.jsx(i.AddVariableV2SideModal,{zIndex:2e3,data:null!=j?j:[],showVariable:_,setShowVariable:z,placeholder:"Add a variable",customTrigger:e=>{}})]})};
@@ -0,0 +1,7 @@
1
+ interface ProductBoxProps {
2
+ cardBody: string;
3
+ deleteItem: any;
4
+ editItem?: any;
5
+ }
6
+ export declare const ProductBox: (props: ProductBoxProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,47 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/box.svg.js"),i=require("../../../assets/icons/delete.svg.js"),n=require("../../../assets/icons/edit.svg.js"),s=require("styled-components"),o=require("../../icon-button/IconButton.js"),r=require("../../TypographyStyle.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const c=l(s).default.div`
2
+ width: ${e=>e.width};
3
+ padding: 12px;
4
+ display: flex;
5
+ flex-direction: row;
6
+ column-gap: 14px;
7
+ justify-content: center;
8
+ align-items: center;
9
+ background: #ffffff;
10
+
11
+ border: 1px solid #e0e0e0;
12
+ border-radius: 4px;
13
+
14
+ .card-body {
15
+ width: 256px;
16
+ display: flex;
17
+ flex-direction: column;
18
+ justify-content: center;
19
+
20
+ &__dynamic {
21
+ font-family: 'Inter';
22
+ font-style: normal;
23
+ font-weight: 400;
24
+ font-size: 16px;
25
+ line-height: 24px;
26
+ color: #731dcf;
27
+
28
+ &__desc {
29
+ font-family: 'Inter';
30
+ font-style: normal;
31
+ font-weight: 400;
32
+ font-size: 12px;
33
+ line-height: 16px;
34
+ color: #616161;
35
+ }
36
+ }
37
+
38
+ &__simple {
39
+ font-family: 'Inter';
40
+ font-style: normal;
41
+ font-weight: 400;
42
+ font-size: 16px;
43
+ line-height: 24px;
44
+ color: #000000;
45
+ }
46
+ }
47
+ `;exports.ProductBox=s=>{const{cardBody:l,deleteItem:d,editItem:a}=s;return e.jsxs(c,Object.assign({width:"100%"},{children:[e.jsx("div",Object.assign({style:{width:36,height:36}},{children:e.jsx(t.default,{})})),e.jsx("div",Object.assign({className:"card-body"},{children:e.jsx(r.TitleRegular,{children:l})})),e.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center"}},{children:[a&&e.jsx(o.IconButton,{style:{display:"flex"},Icon:n.default,onClick:e=>{a(),e.stopPropagation()}}),e.jsx(o.IconButton,{style:{display:"flex",color:"#919191"},Icon:i.default,onClick:e=>{d(),e.stopPropagation()}})]}))]}))};
@@ -18,4 +18,4 @@
18
18
  display: flex;
19
19
  flex-direction: column;
20
20
  flex: 1;
21
- `;exports.LimitedTimeOffer=r=>{const{text:s,dateTime:o,code:a}=r;return e.jsxs(d,{children:[e.jsx(l,{children:e.jsx(t.default,{width:24,height:24,style:{display:"flex"}})}),e.jsxs(c,{children:[e.jsx(n.BodySecondary,Object.assign({numberOfLines:2,color:i.COLORS.content.primary},{children:s})),e.jsxs(n.BodyTiny,Object.assign({numberOfLines:3,style:{overflowWrap:"anywhere"},color:i.COLORS.content.secondary},{children:["Ends on ",o]})),e.jsxs(n.BodyTiny,Object.assign({numberOfLines:2,color:i.COLORS.content.placeholder},{children:["Code ",a]}))]})]})},exports.StyledLimitedOfferTime=d,exports.StyledLtoIcon=l,exports.StyledLtoText=c;
21
+ `;exports.LimitedTimeOffer=r=>{const{text:s,dateTime:o,code:a}=r;return e.jsxs(d,{children:[e.jsx(l,{children:e.jsx(t.default,{width:24,height:24,style:{display:"flex"}})}),e.jsxs(c,{children:[e.jsx(n.BodySecondary,Object.assign({numberOfLines:2,color:i.COLORS.content.primary},{children:s})),e.jsxs(n.BodyTiny,Object.assign({numberOfLines:3,style:{overflowWrap:"anywhere"},color:i.COLORS.content.secondary},{children:["Offer Ends on ",o]})),e.jsxs(n.BodyTiny,Object.assign({numberOfLines:2,color:i.COLORS.content.placeholder},{children:["Code ",a]}))]})]})},exports.StyledLimitedOfferTime=d,exports.StyledLtoIcon=l,exports.StyledLtoText=c;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../../assets/icons/filePdf.svg.js"),r=require("../../../assets/icons/image.svg.js"),i=require("../../../assets/icons/videoRecorder.svg.js"),t=require("../../TypographyStyle.js"),a=require("../../../constants/Theme.js"),d=require("../models/TemplateMeta.js"),n=require("./ChatUI.style.js"),o=require("../../shimmer-image/ShimmerImage.js");const c=o=>{let{headerAssetName:c,mediaType:l}=o;const m=l===d.HEADER_TYPES.IMAGE?r.default:l===d.HEADER_TYPES.VIDEO?i.default:s.default;return e.jsxs(n.MediaContainer,{children:[e.jsx(m,{height:40,width:40,color:a.COLORS.icon.placeholder}),!!c&&e.jsx(t.BodySecondary,Object.assign({style:{color:a.COLORS.content.secondary,marginTop:8}},{children:c}))]})};exports.MediaCard=s=>{let{headerAssetLink:r,headerAssetName:i,mediaType:t,imagePreviewStyles:a}=s;if(!r||t===d.HEADER_TYPES.DOCUMENT)return e.jsx(c,Object.assign({},{headerAssetLink:r,headerAssetName:i,mediaType:t}));return e.jsx(n.MediaContainer,{children:t===d.HEADER_TYPES.IMAGE?e.jsx(o.ShimmerImage,{imageUrl:r,alt:r,width:"100%",height:156,borderRadius:8}):t===d.HEADER_TYPES.VIDEO?e.jsx("video",Object.assign({src:r,style:{width:"100%",minHeight:"156px",borderRadius:8},controls:!0},{children:e.jsx("track",{default:!0,kind:"captions",srcLang:"en",src:r})})):e.jsx(e.Fragment,{})})},exports.NoMediaCard=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../../assets/icons/filePdf.svg.js"),r=require("../../../assets/icons/image.svg.js"),i=require("../../../assets/icons/videoRecorder.svg.js"),t=require("../../TypographyStyle.js"),a=require("../../../constants/Theme.js"),d=require("../models/TemplateMeta.js"),n=require("./ChatUI.style.js"),o=require("../../shimmer-image/ShimmerImage.js");const c=o=>{let{headerAssetName:c,mediaType:l}=o;const h=l===d.HEADER_TYPES.IMAGE?r.default:l===d.HEADER_TYPES.VIDEO?i.default:s.default;return e.jsxs(n.MediaContainer,{children:[e.jsx(h,{height:40,width:40,color:a.COLORS.icon.placeholder}),!!c&&e.jsx(t.BodySecondary,Object.assign({style:{color:a.COLORS.content.secondary,marginTop:8}},{children:c}))]})};exports.MediaCard=s=>{let{headerAssetLink:r,headerAssetName:i,mediaType:t,imagePreviewStyles:a}=s;if(!r||t===d.HEADER_TYPES.DOCUMENT)return e.jsx(c,Object.assign({},{headerAssetLink:r,headerAssetName:i,mediaType:t}));return e.jsx(n.MediaContainer,{children:t===d.HEADER_TYPES.IMAGE?e.jsx(o.ShimmerImage,{imageUrl:r,alt:r,width:"100%",height:240,borderRadius:8}):t===d.HEADER_TYPES.VIDEO?e.jsx("video",Object.assign({src:r,style:{width:"100%",minHeight:"240px",height:"240px",borderRadius:8},controls:!0},{children:e.jsx("track",{default:!0,kind:"captions",srcLang:"en",src:r})})):e.jsx(e.Fragment,{})})},exports.NoMediaCard=c;
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("styled-components"),a=require("../../TypographyStyle.js"),s=require("../../../constants/Theme.js"),t=require("../utils/getPreviewPropLen.js"),i=require("./ChatHeader.js"),o=require("./ChatUiV2.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=n(r);const d=p.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("styled-components"),a=require("../../TypographyStyle.js"),s=require("../../../constants/Theme.js"),t=require("../utils/getPreviewPropLen.js"),i=require("./ChatHeader.js"),o=require("./ChatUiV2.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=p(r);const d=n.default.div`
2
2
  background-image: url(${e=>e.isWhatsappCarousel?void 0:"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-radius: 4px;
4
4
  background-repeat: no-repeat;
5
5
  background-position: center;
6
6
  background-size: cover;
7
7
  position: relative;
8
- `,l=p.default(a.TitleRegular)`
8
+ `,l=n.default(a.TitleRegular)`
9
9
  color: ${s.COLORS.content.primary};
10
- `;exports.WhatsappLikePreviewV2=r=>3===t.getPreviewPropLen(r)?e.jsx(e.Fragment,{children:r.zeroStateComponent}):e.jsx(e.Fragment,{children:e.jsxs(d,Object.assign({style:r.containerStyle,showHeader:r.showHeader,isWhatsappCarousel:r.isWhatsappCarousel},{children:[r.showHeader&&e.jsx(i.default,{}),e.jsxs("div",Object.assign({style:{padding:"small"===r.size?"12px 32px 12px 12px":`16px ${r.isWhatsappCarousel?"0px":"56px"} 12px 16px`}},{children:[!r.hidePreviewText&&e.jsx("div",Object.assign({style:{marginBottom:16}},{children:e.jsx(l,{children:"Preview"})})),e.jsx(o.ChatUIV2,Object.assign({showHeader:r.showHeader},r))]}))]}))});
10
+ `;exports.WhatsappLikePreviewV2=r=>3===t.getPreviewPropLen(r)?e.jsx(e.Fragment,{children:r.zeroStateComponent}):e.jsx(e.Fragment,{children:e.jsxs(d,Object.assign({style:r.containerStyle,showHeader:r.showHeader,isWhatsappCarousel:r.isWhatsappCarousel},{children:[r.showHeader&&e.jsx(i.default,{}),e.jsxs("div",Object.assign({style:{padding:"small"===r.size?"12px 32px 12px 12px":`16px ${r.isWhatsappCarousel?"0px":"56px"} ${r.isWhatsappCarousel?"2px":"16px"} 16px`}},{children:[!r.hidePreviewText&&e.jsx("div",Object.assign({style:{marginBottom:16}},{children:e.jsx(l,{children:"Preview"})})),e.jsx(o.ChatUIV2,Object.assign({showHeader:r.showHeader},r))]}))]}))});
@@ -1 +1 @@
1
- import t from"@emotion/styled/base";import{jsx as o,Fragment as e,jsxs as i}from"react/jsx-runtime";import r from"../../../../utils/StringUtils.js";import{COLORS as g}from"../../../../constants/Theme.js";import"../../../../constants/zindex.js";import{useState as I,useEffect as s}from"react";import"../../../checkBox/CheckBox.styled.js";import{TitleMedium as C}from"../../../TypographyStyle.js";import"../../../list-item/ListItem.js";import"../../../pagination/Pagination.js";import"../../../radioButton/RadioButton.styled.js";import"react-dom";import"react-toastify";import"../../../toaster/Toaster.styled.js";import"../../../tooltips/Tooltip.js";import"../../../spinner/Spinner.js";import"../../../stepper/Stepper.styled.js";import"../../../tag/Tag.js";import"../../../icon-button/IconButton.js";import"../../../template-preview/TemplatePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../../curtain/CurtainHelper.js";import"../../../template-preview/models/TemplateMeta.js";import"../../../template-preview/models/WhatsAppTemplate.js";import"../../../modals/styledModal.js";import"../../../template-preview/models/Channels.js";import"../../../template-context-mapper/context/templateModalContext.js";import"../../../template-context-mapper/modalElements/Footer.js";import"../../../template-context-mapper/modalElements/Body.js";import"../../../template-context-mapper/modalElements/Header.js";import"../../../zeroState/ZeroState.js";import"../../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../../button/Button.js";import"../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../../input/Input.js";import"react-bootstrap";import"../../../floating-action-button/FloatingActionButton.styles.js";import"../../../image-compress/ImageCompress.js";import"../../../progress-bar/ProgressBarComponent.js";import"../../../QueryBuilder/QueryBuilder.js";import"../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";import"../../../QueryBuilder/constants/connectorPosition.js";import"../../../QueryBuilder/constants/connector.js";import"../../../QueryBuilder/types/QueryBuilder.type.js";import"../../../dropdown/Dropdown.js";import"../../../QueryBuilder/components/InputLoader.js";import"../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js";import"react-chips";import"../../../input/ChipInput.styled.js";import"../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js";import"../../../QueryBuilder/components/Connectors/Components/IgPicker.js";import"../../../QueryBuilder/components/Connectors/Components/InTheLast.js";import"../../../QueryBuilder/components/Connectors/Components/InTwoLast.js";import"react-calendar";import"../../../../utils/DateUtils.js";import"../../../datePicker/DatePickerWrapper.styled.js";import"../../../QueryBuilder/components/Connectors/Connector.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js";import"../../../QueryBuilder/redux/queryBuilder.reducer.js";import"../../../QueryBuilder/redux/queryBuilderCache.reducer.js";import"../../../QueryBuilder/types/QueryBuilderOperator.type.js";import"../../../dropdown/DropdownPopover/index.js";import"../../../dropdown/ChipDropdown.js";import"../../../dropdown/MenuItem/MenuItem.js";import"../../../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../../analytics-card/AnalyticsCard.styled.js";import"../../CommonStyles.js";import"../../../datePicker/DatePicker.styled.js";import"../../AnalyticsMetric.js";import"../LineChart/LineChart.js";import"../linearChipGroupedChart/LinearChipGroupedChart.styled.js";import{PieChart as p}from"./PieChart.js";import"../HorizontalBarGraph/HorizontalGraph.js";import"../StackedBarChart/StackedBarChart.js";import"../VerticalBarGraph/VerticalGraph.js";import"../heatmap/HeatMap.js";import"../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import"../../../avatar/Avatar.js";import"../../../avatar/AvatarHelper.js";import"../../../alerts/Alert.styled.js";import"../../../alerts/AlertHelper.js";import"../../../thumbnail/Thumbnail.js";import"../../../curtain/Curtain.styled.js";import"../../../switch/Switch.js";import"../../../plans/SubscriptionPlanStyled.js";import"../../../plans/SubscriptionPlanSelector.js";import"../../../plans/SubscriptionPlansCollected.js";import"../../../tabs/Tabs.js";import"../../../TablePagination/TablePagination.styled.js";import"../../../TablePagination/TablePaginationCard.js";import"../../../states/StateComponent.js";import"../../../../_virtual/_tslib.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditor.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js";import"../../../card-selection-modal/CardSelectionModal.styled.js";import"react-image-crop";import"../../../buttonGroup/ButtonGroupStyle.js";import"../../../accordion/Accordion.style.js";import"../../../accordion/AccordionArrow.js";import"../../../file-uploader/FileUploaderStyle.js";import"../../../colourInput/ColourInput.styled.js";import"../../../bik-layout/CommonStyles.js";import"../../../navigation-hyperlink/NavigationHyperlink.js";import"../../../bik-layout/SidebarStyles.js";import"date-fns";import"react-popper";import"../../../dropdown/Common.styled.js";import"../../../custom-date-time/CustomDateTime.styled.js";import"../../../../node_modules/lodash.debounce/index.js";import"../../../product-picker/ProductPicker.styled.js";import"../../../discount-modal/type.js";import"../../../product-picker-v2/modal.js";import"../../../discount-modal/DiscountModal.styled.js";import"../../../discount-modal/DynamicCoupon/DynamicCoupon.js";import"../../../discount-modal/CouponExpiration/CouponExpiration.js";import"../../../country-code-picker/CountryCodePicker.styled.js";import"../../../carousel/carousel.js";import"../../../carousel-secondary/CarouselSecondary.style.js";import"../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js";import"../../../radioList/RadioList.styled.js";import"../../../checkList/CheckList.styled.js";import"../../../postPicker/postPicker.js";import"../../../dropdown-button/DropdownButton.style.js";import"../../../side-modal/SideModal.style.js";import"../../../add-variableV2/AddVariableV2.styled.js";import"../../../modals/modal.styled.js";import"../../../SearchFilter/types/SearchFilter.type.js";import"../../../SearchFilter/components/DatePickerButton.js";import"../../../SearchFilter/components/DateRangeOnlyButton.js";import"../../../input-with-vars/InputWithVariables.js";import"../../../star-rating/StarRating.js";import"../../../dashboard-review-popup/components/FiveStar.styled.js";import"../../../dashboard-review-popup/components/Form.styled.js";import"../../../dashboard-review-popup/components/ZeroState.js";import"../../../dashboard-review-popup/DashboardReviewPopUp.styled.js";import"../../../testimonial-card/TestimonialCard.style.js";import"../../../slider/slider.js";import"../../../carousel-preview/CarouselPreview.js";import{Chart as c,ArcElement as a,Legend as l}from"chart.js";import{Doughnut as A}from"react-chartjs-2";c.register(a,l);const d={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:t=>{if(!t.label)return" 0%";const o=t.dataset.data.reduce(((t,o)=>t+o),0),e=parseFloat((t.raw/o*100).toFixed(1));return` ${t.label}: ${e}%`}}}}},n=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],m=t("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(t=>g.surface.standard),";border:1px solid ",(t=>g.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBTdHJpbmdVdGlscyB9IGZyb20gXCIuLi8uLi8uLi8uLi9pbmRleFwiO1xyXG5pbXBvcnQgeyBBcmNFbGVtZW50LCBDaGFydCBhcyBDaGFydEpTLCBMZWdlbmQgfSBmcm9tICdjaGFydC5qcyc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XHJcbmltcG9ydCB7IERvdWdobnV0IH0gZnJvbSAncmVhY3QtY2hhcnRqcy0yJztcclxuaW1wb3J0IHsgVGl0bGVNZWRpdW0gfSBmcm9tIFwiLi4vLi4vLi4vVHlwb2dyYXBoeVN0eWxlXCI7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi8uLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgUGllQ2hhcnQgfSBmcm9tICcuL1BpZUNoYXJ0JztcclxuQ2hhcnRKUy5yZWdpc3RlcihBcmNFbGVtZW50LCBMZWdlbmQpO1xyXG5jb25zdCBvcHRpb25zID0ge1xyXG4gICAgcGx1Z2luczoge1xyXG4gICAgICAgIGxlZ2VuZDoge1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBmYWxzZSxcclxuICAgICAgICB9LFxyXG4gICAgICAgIHRvb2x0aXA6IHtcclxuICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2tzOiB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbDogKHRvb2x0aXBJdGVtKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9OiAke3BlcmNlbnRhZ2V9JWA7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG59O1xyXG5jb25zdCBHUkFQSF9DT0xPUlMgPSBbXHJcbiAgICAnIzVFMDdCQicsXHJcbiAgICAnIzlFNzdFRCcsXHJcbiAgICAnI0QyQUVGRicsXHJcbiAgICAnI0NERTFGRicsXHJcbiAgICAnIzkyQUZGQScsXHJcbiAgICAnIzM5MzVFMScsXHJcbl07XHJcbmNvbnN0IENhcnRTdHlsZWQgPSBzdHlsZWQuZGl2IGBcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZ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gICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */")),b=t=>o(m,Object.assign({style:{padding:24}},{children:t.children})),u=t=>{let{title:g,slices:c,size:a}=t;const[l,m]=I([]),[b,u]=I();return s((()=>{const t=c.reduce(((t,o)=>t+o.count),0);let o=[];if(o=Object.keys(c).map(((t,o)=>Object.assign({color:n[o%n.length]},c[t]))),m([...o]),0===t){u({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const t={labels:c.map((t=>r.capitalize(t.name))),datasets:[{data:c.map((t=>t.count)),backgroundColor:c.map(((t,o)=>{var e;return null!==(e=t.color)&&void 0!==e?e:n[o%n.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};u(t)}}),[c]),b?i(e,{children:[g&&o(C,Object.assign({style:{marginBottom:16}},{children:g})),i("div",Object.assign({className:"row"},{children:[o("div",Object.assign({className:"col-6"},{children:o("div",Object.assign({style:{width:a,height:a}},{children:o(A,{data:b,options:Object.assign(Object.assign({},d),{maintainAspectRatio:!a})})}))})),o("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:o(p,{slices:l})}))]}))]}):o(e,{})};export{b as Card,u as PieChartAnalytics};
1
+ import t from"@emotion/styled/base";import{jsx as o,Fragment as e,jsxs as i}from"react/jsx-runtime";import r from"../../../../utils/StringUtils.js";import{COLORS as g}from"../../../../constants/Theme.js";import"../../../../constants/zindex.js";import{useState as I,useEffect as s}from"react";import"../../../checkBox/CheckBox.styled.js";import{TitleMedium as p}from"../../../TypographyStyle.js";import"../../../list-item/ListItem.js";import"../../../pagination/Pagination.js";import"../../../radioButton/RadioButton.styled.js";import"react-dom";import"react-toastify";import"../../../toaster/Toaster.styled.js";import"../../../tooltips/Tooltip.js";import"../../../spinner/Spinner.js";import"../../../stepper/Stepper.styled.js";import"../../../tag/Tag.js";import"../../../icon-button/IconButton.js";import"../../../template-preview/TemplatePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../../curtain/CurtainHelper.js";import"../../../template-preview/models/TemplateMeta.js";import"../../../template-preview/models/WhatsAppTemplate.js";import"../../../modals/styledModal.js";import"../../../template-preview/models/Channels.js";import"../../../template-context-mapper/context/templateModalContext.js";import"../../../template-context-mapper/modalElements/Footer.js";import"../../../template-context-mapper/modalElements/Body.js";import"../../../template-context-mapper/modalElements/Header.js";import"../../../zeroState/ZeroState.js";import"../../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../../button/Button.js";import"../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../../input/Input.js";import"react-bootstrap";import"../../../floating-action-button/FloatingActionButton.styles.js";import"../../../image-compress/ImageCompress.js";import"../../../progress-bar/ProgressBarComponent.js";import"../../../QueryBuilder/QueryBuilder.js";import"../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";import"../../../QueryBuilder/constants/connectorPosition.js";import"../../../QueryBuilder/constants/connector.js";import"../../../QueryBuilder/types/QueryBuilder.type.js";import"../../../dropdown/Dropdown.js";import"../../../QueryBuilder/components/InputLoader.js";import"../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js";import"react-chips";import"../../../input/ChipInput.styled.js";import"../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js";import"../../../QueryBuilder/components/Connectors/Components/IgPicker.js";import"../../../QueryBuilder/components/Connectors/Components/InTheLast.js";import"../../../QueryBuilder/components/Connectors/Components/InTwoLast.js";import"react-calendar";import"../../../../utils/DateUtils.js";import"../../../datePicker/DatePickerWrapper.styled.js";import"../../../QueryBuilder/components/Connectors/Connector.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js";import"../../../QueryBuilder/redux/queryBuilder.reducer.js";import"../../../QueryBuilder/redux/queryBuilderCache.reducer.js";import"../../../QueryBuilder/types/QueryBuilderOperator.type.js";import"../../../dropdown/DropdownPopover/index.js";import"../../../dropdown/ChipDropdown.js";import"../../../dropdown/MenuItem/MenuItem.js";import"../../../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../../analytics-card/AnalyticsCard.styled.js";import"../../CommonStyles.js";import"../../../datePicker/DatePicker.styled.js";import"../../AnalyticsMetric.js";import"../LineChart/LineChart.js";import"../linearChipGroupedChart/LinearChipGroupedChart.styled.js";import{PieChart as C}from"./PieChart.js";import"../HorizontalBarGraph/HorizontalGraph.js";import"../StackedBarChart/StackedBarChart.js";import"../VerticalBarGraph/VerticalGraph.js";import"../heatmap/HeatMap.js";import"../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import"../../../avatar/Avatar.js";import"../../../avatar/AvatarHelper.js";import"../../../alerts/Alert.styled.js";import"../../../alerts/AlertHelper.js";import"../../../thumbnail/Thumbnail.js";import"../../../curtain/Curtain.styled.js";import"../../../switch/Switch.js";import"../../../plans/SubscriptionPlanStyled.js";import"../../../plans/SubscriptionPlanSelector.js";import"../../../plans/SubscriptionPlansCollected.js";import"../../../tabs/Tabs.js";import"../../../TablePagination/TablePagination.styled.js";import"../../../TablePagination/TablePaginationCard.js";import"../../../states/StateComponent.js";import"../../../../_virtual/_tslib.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditor.js";import"../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js";import"../../../card-selection-modal/CardSelectionModal.styled.js";import"react-image-crop";import"../../../buttonGroup/ButtonGroupStyle.js";import"../../../accordion/Accordion.style.js";import"../../../accordion/AccordionArrow.js";import"../../../file-uploader/FileUploaderStyle.js";import"../../../colourInput/ColourInput.styled.js";import"../../../bik-layout/CommonStyles.js";import"../../../navigation-hyperlink/NavigationHyperlink.js";import"../../../bik-layout/SidebarStyles.js";import"date-fns";import"react-popper";import"../../../dropdown/Common.styled.js";import"../../../custom-date-time/CustomDateTime.styled.js";import"../../../../node_modules/lodash.debounce/index.js";import"../../../product-picker/ProductPicker.styled.js";import"../../../discount-modal/type.js";import"../../../product-picker-v2/modal.js";import"../../../discount-modal/DiscountModal.styled.js";import"../../../discount-modal/DynamicCoupon/DynamicCoupon.js";import"../../../discount-modal/CouponExpiration/CouponExpiration.js";import"../../../country-code-picker/CountryCodePicker.styled.js";import"../../../carousel/carousel.js";import"../../../carousel-secondary/CarouselSecondary.style.js";import"../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js";import"../../../radioList/RadioList.styled.js";import"../../../checkList/CheckList.styled.js";import"../../../postPicker/postPicker.js";import"../../../dropdown-button/DropdownButton.style.js";import"../../../side-modal/SideModal.style.js";import"../../../add-variableV2/AddVariableV2.styled.js";import"../../../modals/modal.styled.js";import"../../../SearchFilter/types/SearchFilter.type.js";import"../../../SearchFilter/components/DatePickerButton.js";import"../../../SearchFilter/components/DateRangeOnlyButton.js";import"../../../input-with-vars/InputWithVariables.js";import"../../../star-rating/StarRating.js";import"../../../dashboard-review-popup/components/FiveStar.styled.js";import"../../../dashboard-review-popup/components/Form.styled.js";import"../../../dashboard-review-popup/components/ZeroState.js";import"../../../dashboard-review-popup/DashboardReviewPopUp.styled.js";import"../../../testimonial-card/TestimonialCard.style.js";import"../../../slider/slider.js";import"pure-react-carousel";import"../../../carousel-preview/CarouselPreview.style.js";import{Chart as c,ArcElement as a,Legend as l}from"chart.js";import{Doughnut as A}from"react-chartjs-2";c.register(a,l);const d={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:t=>{if(!t.label)return" 0%";const o=t.dataset.data.reduce(((t,o)=>t+o),0),e=parseFloat((t.raw/o*100).toFixed(1));return` ${t.label}: ${e}%`}}}}},n=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],m=t("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(t=>g.surface.standard),";border:1px solid ",(t=>g.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2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gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */")),u=t=>o(m,Object.assign({style:{padding:24}},{children:t.children})),b=t=>{let{title:g,slices:c,size:a}=t;const[l,m]=I([]),[u,b]=I();return s((()=>{const t=c.reduce(((t,o)=>t+o.count),0);let o=[];if(o=Object.keys(c).map(((t,o)=>Object.assign({color:n[o%n.length]},c[t]))),m([...o]),0===t){b({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const t={labels:c.map((t=>r.capitalize(t.name))),datasets:[{data:c.map((t=>t.count)),backgroundColor:c.map(((t,o)=>{var e;return null!==(e=t.color)&&void 0!==e?e:n[o%n.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};b(t)}}),[c]),u?i(e,{children:[g&&o(p,Object.assign({style:{marginBottom:16}},{children:g})),i("div",Object.assign({className:"row"},{children:[o("div",Object.assign({className:"col-6"},{children:o("div",Object.assign({style:{width:a,height:a}},{children:o(A,{data:u,options:Object.assign(Object.assign({},d),{maintainAspectRatio:!a})})}))})),o("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:o(C,{slices:l})}))]}))]}):o(e,{})};export{u as Card,b as PieChartAnalytics};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
@@ -10,5 +10,4 @@ export declare const CarouselPreview: React.ForwardRefExoticComponent<{
10
10
  template: WhatsAppTemplate | EmailTemplateType | SMSTemplateType | WhatsAppCarouselTemplate | null;
11
11
  showSampleValues?: boolean | undefined;
12
12
  isPreview?: boolean | undefined;
13
- cardWidth?: number | undefined;
14
13
  } & React.RefAttributes<HTMLDivElement>>;
@@ -1,52 +1 @@
1
- import{jsxs as e,jsx as o}from"react/jsx-runtime";import t from"../../assets/icons/chevronLeft.svg.js";import i from"../../assets/icons/chevronRight.svg.js";import{CarouselProvider as r,ButtonBack as n,Slider as a,Slide as d,ButtonNext as l}from"pure-react-carousel";import s from"react";import c from"styled-components";import p from"./CarouselPreviewCard.js";import{COLORS as h}from"../../constants/Theme.js";const m=c.div`
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
- border-color: ${h.stroke.primary};
4
- border-top-style: solid;
5
- border-bottom-style: solid;
6
- border-top-width: 1px;
7
- border-bottom-width: 1px;
8
- background-repeat: no-repeat;
9
- background-position: center;
10
- background-size: cover;
11
- position: relative;
12
- height: 500px;
13
- overflow-y: auto;
14
- `,b=c.div`
15
- flex-direction: row;
16
- display: flex;
17
- align-items: center;
18
- .left_button {
19
- border-radius: 50%;
20
- width: 24px;
21
- height: 24px;
22
- align-items: center;
23
- justify-content: center;
24
- display: flex;
25
- position: absolute;
26
- left: 0;
27
- z-index: 10;
28
- margin-left: 4px;
29
- border: none;
30
- background-color: white;
31
- box-shadow: 0px 1.5px 6px 0px #0000001f;
32
- }
33
- .right_button {
34
- border-radius: 50%;
35
- width: 24px;
36
- height: 24px;
37
- align-items: center;
38
- justify-content: center;
39
- display: flex;
40
- position: absolute;
41
- right: 0;
42
- z-index: 10;
43
- margin-right: 4px;
44
- border: none;
45
- background-color: white;
46
- box-shadow: 0px 1.5px 6px 0px #0000001f;
47
- }
48
- .slider {
49
- width: 100%;
50
- height: 480px;
51
- }
52
- `,u=s.forwardRef(((s,c)=>{let{channel:u,template:g,showSampleValues:v,isPreview:x,cardWidth:f}=s;var w,y,j,k;const O=null===(w=null==g?void 0:g.components)||void 0===w?void 0:w[1].cards;return e(m,{children:[o(p,{channel:u,template:g,carouselCardIndex:-1,isPreview:x,width:f}),!!(null==O?void 0:O.length)&&o(r,Object.assign({naturalSlideWidth:100,naturalSlideHeight:125,totalSlides:null!==(y=null==O?void 0:O.length)&&void 0!==y?y:1,orientation:"horizontal",visibleSlides:1.3,dragEnabled:!0,touchEnabled:!0},{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===(k=null===(j=null==g?void 0:g.components)||void 0===j?void 0:j[1].cards)||void 0===k?void 0:k.map(((e,t)=>{var i,r;const n={components:e.components,mapping:null===(r=null===(i=null==g?void 0:g.mapping)||void 0===i?void 0:i.cards)||void 0===r?void 0:r[t]};return o(d,Object.assign({index:t},{children:o(p,{channel:u,template:n,carouselCardIndex:t,isPreview:x,width:f},t)}),t)}))})),o(l,Object.assign({className:"right_button"},{children:o(i,{height:10,width:10,color:h.content.primary})}))]})}))]})}));export{u as CarouselPreview};
1
+ import{jsxs as e,jsx as i}from"react/jsx-runtime";import o from"../../assets/icons/chevronLeft.svg.js";import n from"../../assets/icons/chevronRight.svg.js";import{CarouselProvider as t,ButtonBack as r,Slider as l,Slide as s,ButtonNext as a}from"pure-react-carousel";import d from"react";import{Container as c,CarouselContainer as m}from"./CarouselPreview.style.js";import h from"./CarouselPreviewCard.js";import{COLORS as v}from"../../constants/Theme.js";const u=d.forwardRef(((d,u)=>{let{channel:p,template:g,showSampleValues:f,isPreview:j}=d;var w,b,x,C;const O=null===(w=null==g?void 0:g.components)||void 0===w?void 0:w[1].cards;return e(c,{children:[i(h,{channel:p,template:g,carouselCardIndex:-1,isPreview:j,width:"77%"}),!!(null==O?void 0:O.length)&&i(t,Object.assign({naturalSlideWidth:100,naturalSlideHeight:125,totalSlides:null!==(b=null==O?void 0:O.length)&&void 0!==b?b:1,orientation:"horizontal",visibleSlides:1.3,dragEnabled:!0,touchEnabled:!0},{children:e(m,{children:[i(r,Object.assign({className:"left_button"},{children:i(o,{height:10,width:10,color:v.content.primary})})),i(l,Object.assign({className:"slider"},{children:null===(C=null===(x=null==g?void 0:g.components)||void 0===x?void 0:x[1].cards)||void 0===C?void 0:C.map(((e,o)=>{var n,t;const r={components:e.components,mapping:null===(t=null===(n=null==g?void 0:g.mapping)||void 0===n?void 0:n.cards)||void 0===t?void 0:t[o]};return i(s,Object.assign({index:o},{children:i(h,{channel:p,template:r,carouselCardIndex:o,isPreview:j,width:"100%"},o)}),o)}))})),i(a,Object.assign({className:"right_button"},{children:i(n,{height:10,width:10,color:v.content.primary})}))]})}))]})}));export{u as CarouselPreview};
@@ -0,0 +1,4 @@
1
+ export declare const Container: import("styled-components").StyledComponent<"div", any, {
2
+ showHeader?: boolean | undefined;
3
+ }, never>;
4
+ export declare const CarouselContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,52 @@
1
+ import e from"styled-components";import{COLORS as o}from"../../constants/Theme.js";const t=e.div`
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
+ border-color: ${o.stroke.primary};
4
+ border-top-style: solid;
5
+ border-bottom-style: solid;
6
+ border-top-width: 1px;
7
+ border-bottom-width: 1px;
8
+ background-repeat: no-repeat;
9
+ background-position: center;
10
+ background-size: cover;
11
+ position: relative;
12
+ height: 500px;
13
+ overflow-y: auto;
14
+ `,i=e.div`
15
+ flex-direction: row;
16
+ display: flex;
17
+ align-items: center;
18
+ .left_button {
19
+ border-radius: 50%;
20
+ width: 24px;
21
+ height: 24px;
22
+ align-items: center;
23
+ justify-content: center;
24
+ display: flex;
25
+ position: absolute;
26
+ left: 0;
27
+ z-index: 10;
28
+ margin-left: 4px;
29
+ border: none;
30
+ background-color: white;
31
+ box-shadow: 0px 1.5px 6px 0px #0000001f;
32
+ }
33
+ .right_button {
34
+ border-radius: 50%;
35
+ width: 24px;
36
+ height: 24px;
37
+ align-items: center;
38
+ justify-content: center;
39
+ display: flex;
40
+ position: absolute;
41
+ right: 0;
42
+ z-index: 10;
43
+ margin-right: 4px;
44
+ border: none;
45
+ background-color: white;
46
+ box-shadow: 0px 1.5px 6px 0px #0000001f;
47
+ }
48
+ .slider {
49
+ width: 100%;
50
+ height: 480px;
51
+ }
52
+ `;export{i as CarouselContainer,t as Container};
@@ -6,6 +6,6 @@ declare const CarouselPreviewCard: React.ForwardRefExoticComponent<{
6
6
  showSampleValues?: boolean | undefined;
7
7
  carouselCardIndex?: number | undefined;
8
8
  isPreview?: boolean | undefined;
9
- width?: number | undefined;
9
+ width?: string | undefined;
10
10
  } & React.RefAttributes<HTMLDivElement>>;
11
11
  export default CarouselPreviewCard;
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import t from"react";import{useTemplateModalContext as a}from"../template-context-mapper/context/templateModalContext.js";import{TemplatePreview as p}from"../template-preview/TemplatePreview.js";import"../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../constants/Theme.js";import"../curtain/CurtainHelper.js";import"../template-preview/models/TemplateMeta.js";import"../template-preview/models/WhatsAppTemplate.js";const r=t.forwardRef((t=>{let{channel:r,template:s,showSampleValues:i,carouselCardIndex:m,isPreview:l,width:o}=t;const{cardWidth:n}=a();return e("div",Object.assign({style:{width:o||(n||360)}},{children:e(p,{showSampleValues:i,template:s,channel:r,size:"small",hideHeader:!0,carouselCardIndex:m,isWhatsappCarousel:!0,isPreview:l})}))}));export{r as default};
1
+ import{jsx as e}from"react/jsx-runtime";import t from"react";import{useTemplateModalContext as a}from"../template-context-mapper/context/templateModalContext.js";import{TemplatePreview as p}from"../template-preview/TemplatePreview.js";import"../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../constants/Theme.js";import"../curtain/CurtainHelper.js";import"../template-preview/models/TemplateMeta.js";import"../template-preview/models/WhatsAppTemplate.js";const r=t.forwardRef((t=>{let{channel:r,template:s,showSampleValues:i,carouselCardIndex:m,isPreview:l,width:o}=t;const{cardWidth:n}=a();return e("div",Object.assign({style:{width:o||n}},{children:e(p,{showSampleValues:i,template:s,channel:r,size:"small",hideHeader:!0,carouselCardIndex:m,isWhatsappCarousel:!0,isPreview:l})}))}));export{r as default};
@@ -1,47 +1 @@
1
- import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import i from"../../../assets/icons/PlusIcon.js";import{cloneDeep as r}from"lodash";import{useState as l,useEffect as s}from"react";import a from"styled-components";import{AddVariableV2SideModal as n}from"../../add-variableV2/AddVariableV2SideModal.js";import"../../../_virtual/_tslib.js";import"../../add-variableV2/AddVariableV2.styled.js";import{Button as d}from"../../button/Button.js";import{IconButton as c}from"../../icon-button/IconButton.js";import"../../input/Input.js";import"../../tooltips/Tooltip.js";import{COLORS as p}from"../../../constants/Theme.js";import"../../modals/modal.styled.js";import"../../switch/Switch.js";import{TitleMedium as m,BodyCaption as u,TitleRegular as h}from"../../TypographyStyle.js";import{ProductPickerModal as f}from"../../product-picker-v2/modal.js";import{useTemplateModalContext as g}from"../context/templateModalContext.js";import y from"./EditWhatsAppTemplateV2.js";import"../../template-preview/TemplatePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../curtain/CurtainHelper.js";import"../../template-preview/models/TemplateMeta.js";import{POD as v}from"../../template-preview/models/WhatsAppTemplate.js";import b from"../../../assets/icons/box.svg.js";import x from"../../../assets/icons/delete.svg.js";import j from"../../../assets/icons/edit.svg.js";const I=a=>{let{template:c,whatsappSpecificPickerMeta:h,showVariableModal:b,variableList:x,variableListForImage:j,discountCode:I,setDiscountCode:C}=a;var O,T;const{selectedCarouselIndex:k,setTemplate:P,pickerConf:S,isProductCarouselType:V,pod:A,cardCount:E,carouselProducts:L,setCarouselProducts:B,isError:_,cardImages:M,disableEditVariable:F,onDeleteSelectedProducts:W}=g(),[z,D]=l(-1==k?"First Message (Step 1/2)":"Carousel Cards (Step 2/2)"),[q,R]=l(!1),[N,$]=l(!1),[G,H]=l(!1);s((()=>{D(-1==k?"First Message (Step 1/2)":"Carousel Cards (Step 2/2)")}),[k]);return e("div",{children:[t(m,Object.assign({style:{marginLeft:10,marginBottom:10}},{children:z})),V&&(null!==(O=null==L?void 0:L.length)&&void 0!==O?O:0)>0&&null!=k&&k>=0&&e("div",Object.assign({style:{display:"flex",rowGap:16,marginBottom:16,flexDirection:"column"}},{children:[t(w,{editItem:()=>R(!q),cardBody:`${null==L?void 0:L.length} Products Selected`,deleteItem:()=>{const e=r(Object.assign({},c));e&&(null==M||M.forEach(((t,o)=>{var i;e.components[1].cards[o].components[0].example.header_handle=[null!==(i=M[o])&&void 0!==i?i:""]})),null==P||P(e)),null==B||B([]),null==W||W()}}),t(d,{disabled:(null!==(T=null==L?void 0:L.length)&&void 0!==T?T:0)<=1,style:{alignSelf:"flex-end",background:p.surface.subdued},onClick:()=>{$(!0),R(!0)},buttonText:"Rearrange Products",buttonType:"tertiary"})]})),!F&&V&&0===(null==L?void 0:L.length)&&null!=k&&k>=0&&e("div",Object.assign({style:{marginTop:16,marginBottom:16,marginLeft:12,marginRight:12,flexDirection:"column",display:"flex",alignItems:"center"}},{children:[t(d,{matchParentWidth:!0,style:{flex:1,display:"flex",width:"100%",marginBottom:12,border:_?`2px dashed ${p.content.negative}`:void 0},size:"medium",buttonText:"Add Product(s)",buttonType:_?"tertiaryGray":"dashBold",LeadingIcon:i,onClick:e=>{R(!0)}}),A===v.CHATBOT&&e(o,{children:[e("div",Object.assign({style:{display:"flex",flex:1,alignItems:"center",justifyContent:"space-between",flexDirection:"row",width:"100%"}},{children:[t("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginRight:8}}),t(u,Object.assign({style:{color:"#616161",overflow:"unset"}},{children:"OR"})),t("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginLeft:8}})]})),t(d,{matchParentWidth:!0,style:{flex:1,display:"flex",marginTop:12,width:"100%"},size:"medium",buttonText:"Add Product(s) Variable",buttonType:"dashBold",LeadingIcon:i,onClick:e=>{H(!0)}})]})]})),t(y,{whatsappSpecificPickerMeta:h,template:c,onTemplateChange:e=>{null==P||P(e)},showVariableModal:b,variableList:x,variableListForImage:j,discountCode:I,setDiscountCode:C}),q&&S&&t(f,{zIndex:200,rearrangeEnabled:N,limit:null!=E?E:1,storeId:S.storeId,selectedItems:(e=>{if(e.length>0){const t={};for(const o of e){const e=null==o?void 0:o.collectionId,i=o.productId,r=o.variantId;e in t||(t[e]={products:{},name:"",image:"",isSmartCollection:!1}),i in t[e].products||(t[e].products[i]={variants:{},name:(null==o?void 0:o.productName)||"",image:(null==o?void 0:o.productImage)||""}),t[e].products[i].variants[r]={name:(null==o?void 0:o.name)||"",price:"",image:(null==o?void 0:o.image)||"",quantity:o.quantity||0,displayOrder:o.displayOrder}}return t}return{}})(null!=L?L:[]),collectionFetcher:S.fetchCollections,productFetcher:S.fetchProducts,onAdd:(e,t)=>{$(!1);const o=[];delete e.isCustom;for(const t of Object.keys(e)){const i=e[t].products;if(void 0!==i&&Object.keys(i).length)for(const e of Object.keys(i)){const r=i[e].variants;if(void 0!==r&&Object.keys(r).length)for(const l of Object.keys(r)){const{name:s,image:a,quantity:n,displayOrder:d}=r[l],c={name:s,image:a,quantity:n,variantId:l,productId:e,displayOrder:d,collectionId:t,productName:i[e].name,productImage:i[e].image};o.push(c)}}}const i=o.sort(((e,t)=>e.displayOrder-t.displayOrder)),l=o.map((e=>e.image)),s=r(Object.assign({},c));s&&(l.forEach(((e,t)=>{var o;s.components[1].cards[t].components[0].example.header_handle=e?[e]:[null!==(o=null==M?void 0:M[t])&&void 0!==o?o:""]})),null==P||P(s)),null==B||B(i),R(!1)},searchInCollectionFetcher:S.searchInCollection,searchFetcher:S.searchProducts,visible:q,onClose:()=>{R(!1)},exactLimit:null!=E?E:1}),G&&t(n,{zIndex:2e3,data:null!=x?x:[],showVariable:G,setShowVariable:H,placeholder:"Add a variable",customTrigger:e=>{}})]})},w=o=>{const{cardBody:i,deleteItem:r,editItem:l}=o;return e(C,Object.assign({width:"100%"},{children:[t("div",Object.assign({style:{width:36,height:36}},{children:t(b,{})})),t("div",Object.assign({className:"card-body"},{children:t(h,{children:i})})),e("div",Object.assign({style:{display:"flex",alignItems:"center"}},{children:[l&&t(c,{style:{display:"flex"},Icon:j,onClick:e=>{l(),e.stopPropagation()}}),t(c,{style:{display:"flex",color:"#919191"},Icon:x,onClick:e=>{r(),e.stopPropagation()}})]}))]}))},C=a.div`
2
- width: ${e=>e.width};
3
- padding: 12px;
4
- display: flex;
5
- flex-direction: row;
6
- column-gap: 14px;
7
- justify-content: center;
8
- align-items: center;
9
- background: #ffffff;
10
-
11
- border: 1px solid #e0e0e0;
12
- border-radius: 4px;
13
-
14
- .card-body {
15
- width: 256px;
16
- display: flex;
17
- flex-direction: column;
18
- justify-content: center;
19
-
20
- &__dynamic {
21
- font-family: 'Inter';
22
- font-style: normal;
23
- font-weight: 400;
24
- font-size: 16px;
25
- line-height: 24px;
26
- color: #731dcf;
27
-
28
- &__desc {
29
- font-family: 'Inter';
30
- font-style: normal;
31
- font-weight: 400;
32
- font-size: 12px;
33
- line-height: 16px;
34
- color: #616161;
35
- }
36
- }
37
-
38
- &__simple {
39
- font-family: 'Inter';
40
- font-style: normal;
41
- font-weight: 400;
42
- font-size: 16px;
43
- line-height: 24px;
44
- color: #000000;
45
- }
46
- }
47
- `;export{I as default};
1
+ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import i from"../../../assets/icons/PlusIcon.js";import{cloneDeep as r}from"lodash";import{useState as a,useEffect as l}from"react";import{AddVariableV2SideModal as s}from"../../add-variableV2/AddVariableV2SideModal.js";import"../../../_virtual/_tslib.js";import"../../add-variableV2/AddVariableV2.styled.js";import{Button as n}from"../../button/Button.js";import"../../icon-button/IconButton.js";import"../../input/Input.js";import"../../tooltips/Tooltip.js";import{COLORS as d}from"../../../constants/Theme.js";import"../../modals/modal.styled.js";import"../../switch/Switch.js";import{TitleMedium as c,BodyCaption as m}from"../../TypographyStyle.js";import{ProductPickerModal as p}from"../../product-picker-v2/modal.js";import{useTemplateModalContext as u}from"../context/templateModalContext.js";import h from"./EditWhatsAppTemplateV2.js";import{ProductBox as g}from"./ProductBox.js";import"../../template-preview/TemplatePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../curtain/CurtainHelper.js";import"../../template-preview/models/TemplateMeta.js";import{POD as f}from"../../template-preview/models/WhatsAppTemplate.js";const v=v=>{let{template:b,whatsappSpecificPickerMeta:y,showVariableModal:j,variableList:C,variableListForImage:I,discountCode:x,setDiscountCode:w}=v;var T,O;const{selectedCarouselIndex:P,setTemplate:k,pickerConf:S,isProductCarouselType:V,pod:A,cardCount:E,carouselProducts:L,setCarouselProducts:B,isError:M,cardImages:F,disableEditVariable:W,onDeleteSelectedProducts:D}=u(),[q,z]=a(-1==P?"First Message (Step 1/2)":"Carousel Cards (Step 2/2)"),[R,_]=a(!1),[G,H]=a(!1),[N,$]=a(!1);l((()=>{z(-1==P?"First Message (Step 1/2)":"Carousel Cards (Step 2/2)")}),[P]);return e("div",{children:[t(c,Object.assign({style:{marginLeft:10,marginBottom:10}},{children:q})),V&&(null!==(T=null==L?void 0:L.length)&&void 0!==T?T:0)>0&&null!=P&&P>=0&&e("div",Object.assign({style:{display:"flex",rowGap:16,marginBottom:16,flexDirection:"column"}},{children:[t(g,{editItem:()=>_(!R),cardBody:`${null==L?void 0:L.length} Products Selected`,deleteItem:()=>{const e=r(Object.assign({},b));e&&(null==F||F.forEach(((t,o)=>{var i;e.components[1].cards[o].components[0].example.header_handle=[null!==(i=F[o])&&void 0!==i?i:""]})),null==k||k(e)),null==B||B([]),null==D||D()}}),t(n,{disabled:(null!==(O=null==L?void 0:L.length)&&void 0!==O?O:0)<=1,style:{alignSelf:"flex-end",background:d.surface.subdued},onClick:()=>{H(!0),_(!0)},buttonText:"Rearrange Products",buttonType:"tertiary"})]})),!W&&V&&0===(null==L?void 0:L.length)&&null!=P&&P>=0&&e("div",Object.assign({style:{marginTop:16,marginBottom:16,marginLeft:12,marginRight:12,flexDirection:"column",display:"flex",alignItems:"center"}},{children:[t(n,{matchParentWidth:!0,style:{flex:1,display:"flex",width:"100%",marginBottom:12,border:M?`2px dashed ${d.content.negative}`:void 0},size:"medium",buttonText:"Add Product(s)",buttonType:M?"tertiaryGray":"dashBold",LeadingIcon:i,onClick:e=>{_(!0)}}),A===f.CHATBOT&&e(o,{children:[e("div",Object.assign({style:{display:"flex",flex:1,alignItems:"center",justifyContent:"space-between",flexDirection:"row",width:"100%"}},{children:[t("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginRight:8}}),t(m,Object.assign({style:{color:"#616161",overflow:"unset"}},{children:"OR"})),t("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginLeft:8}})]})),t(n,{matchParentWidth:!0,style:{flex:1,display:"flex",marginTop:12,width:"100%"},size:"medium",buttonText:"Add Product(s) Variable",buttonType:"dashBold",LeadingIcon:i,onClick:e=>{$(!0)}})]})]})),t(h,{whatsappSpecificPickerMeta:y,template:b,onTemplateChange:e=>{null==k||k(e)},showVariableModal:j,variableList:C,variableListForImage:I,discountCode:x,setDiscountCode:w}),R&&S&&t(p,{zIndex:200,rearrangeEnabled:G,storeId:S.storeId,selectedItems:(e=>{if(e.length>0){const t={};for(const o of e){const e=null==o?void 0:o.collectionId,i=o.productId,r=o.variantId;e in t||(t[e]={products:{},name:"",image:"",isSmartCollection:!1}),i in t[e].products||(t[e].products[i]={variants:{},name:(null==o?void 0:o.productName)||"",image:(null==o?void 0:o.productImage)||""}),t[e].products[i].variants[r]={name:(null==o?void 0:o.name)||"",price:"",image:(null==o?void 0:o.image)||"",quantity:o.quantity||0,displayOrder:o.displayOrder}}return t}return{}})(null!=L?L:[]),collectionFetcher:S.fetchCollections,productFetcher:S.fetchProducts,onAdd:(e,t)=>{H(!1);const o=[];delete e.isCustom;for(const t of Object.keys(e)){const i=e[t].products;if(void 0!==i&&Object.keys(i).length)for(const e of Object.keys(i)){const r=i[e].variants;if(void 0!==r&&Object.keys(r).length)for(const a of Object.keys(r)){const{name:l,image:s,quantity:n,displayOrder:d}=r[a],c={name:l,image:s,quantity:n,variantId:a,productId:e,displayOrder:d,collectionId:t,productName:i[e].name,productImage:i[e].image};o.push(c)}}}const i=o.sort(((e,t)=>e.displayOrder-t.displayOrder)),a=o.map((e=>e.image)),l=r(Object.assign({},b));l&&(a.forEach(((e,t)=>{var o;l.components[1].cards[t].components[0].example.header_handle=e?[e]:[null!==(o=null==F?void 0:F[t])&&void 0!==o?o:""]})),null==k||k(l)),null==B||B(i),_(!1)},searchInCollectionFetcher:S.searchInCollection,searchFetcher:S.searchProducts,visible:R,onClose:()=>{_(!1)},exactLimit:null!=E?E:1}),N&&t(s,{zIndex:2e3,data:null!=C?C:[],showVariable:N,setShowVariable:$,placeholder:"Add a variable",customTrigger:e=>{}})]})};export{v as default};
@@ -0,0 +1,7 @@
1
+ interface ProductBoxProps {
2
+ cardBody: string;
3
+ deleteItem: any;
4
+ editItem?: any;
5
+ }
6
+ export declare const ProductBox: (props: ProductBoxProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,47 @@
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import o from"../../../assets/icons/box.svg.js";import i from"../../../assets/icons/delete.svg.js";import n from"../../../assets/icons/edit.svg.js";import s from"styled-components";import{IconButton as r}from"../../icon-button/IconButton.js";import{TitleRegular as l}from"../../TypographyStyle.js";const c=s.div`
2
+ width: ${t=>t.width};
3
+ padding: 12px;
4
+ display: flex;
5
+ flex-direction: row;
6
+ column-gap: 14px;
7
+ justify-content: center;
8
+ align-items: center;
9
+ background: #ffffff;
10
+
11
+ border: 1px solid #e0e0e0;
12
+ border-radius: 4px;
13
+
14
+ .card-body {
15
+ width: 256px;
16
+ display: flex;
17
+ flex-direction: column;
18
+ justify-content: center;
19
+
20
+ &__dynamic {
21
+ font-family: 'Inter';
22
+ font-style: normal;
23
+ font-weight: 400;
24
+ font-size: 16px;
25
+ line-height: 24px;
26
+ color: #731dcf;
27
+
28
+ &__desc {
29
+ font-family: 'Inter';
30
+ font-style: normal;
31
+ font-weight: 400;
32
+ font-size: 12px;
33
+ line-height: 16px;
34
+ color: #616161;
35
+ }
36
+ }
37
+
38
+ &__simple {
39
+ font-family: 'Inter';
40
+ font-style: normal;
41
+ font-weight: 400;
42
+ font-size: 16px;
43
+ line-height: 24px;
44
+ color: #000000;
45
+ }
46
+ }
47
+ `,d=s=>{const{cardBody:d,deleteItem:f,editItem:a}=s;return t(c,Object.assign({width:"100%"},{children:[e("div",Object.assign({style:{width:36,height:36}},{children:e(o,{})})),e("div",Object.assign({className:"card-body"},{children:e(l,{children:d})})),t("div",Object.assign({style:{display:"flex",alignItems:"center"}},{children:[a&&e(r,{style:{display:"flex"},Icon:n,onClick:t=>{a(),t.stopPropagation()}}),e(r,{style:{display:"flex",color:"#919191"},Icon:i,onClick:t=>{f(),t.stopPropagation()}})]}))]}))};export{d as ProductBox};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as n}from"react/jsx-runtime";import r from"../../../../assets/icons/lto_icon.svg.js";import i from"styled-components";import{BodySecondary as o,BodyTiny as t}from"../../../TypographyStyle.js";import{COLORS as s}from"../../../../constants/Theme.js";const c=i=>{const{text:c,dateTime:m,code:f}=i;return e(l,{children:[n(d,{children:n(r,{width:24,height:24,style:{display:"flex"}})}),e(a,{children:[n(o,Object.assign({numberOfLines:2,color:s.content.primary},{children:c})),e(t,Object.assign({numberOfLines:3,style:{overflowWrap:"anywhere"},color:s.content.secondary},{children:["Ends on ",m]})),e(t,Object.assign({numberOfLines:2,color:s.content.placeholder},{children:["Code ",f]}))]})]})},l=i.div`
1
+ import{jsxs as e,jsx as n}from"react/jsx-runtime";import r from"../../../../assets/icons/lto_icon.svg.js";import i from"styled-components";import{BodySecondary as o,BodyTiny as t}from"../../../TypographyStyle.js";import{COLORS as s}from"../../../../constants/Theme.js";const c=i=>{const{text:c,dateTime:f,code:m}=i;return e(l,{children:[n(d,{children:n(r,{width:24,height:24,style:{display:"flex"}})}),e(a,{children:[n(o,Object.assign({numberOfLines:2,color:s.content.primary},{children:c})),e(t,Object.assign({numberOfLines:3,style:{overflowWrap:"anywhere"},color:s.content.secondary},{children:["Offer Ends on ",f]})),e(t,Object.assign({numberOfLines:2,color:s.content.placeholder},{children:["Code ",m]}))]})]})},l=i.div`
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  background: #f6f6f6;
@@ -1 +1 @@
1
- import{jsx as e,Fragment as s,jsxs as r}from"react/jsx-runtime";import t from"../../../assets/icons/filePdf.svg.js";import i from"../../../assets/icons/image.svg.js";import o from"../../../assets/icons/videoRecorder.svg.js";import{BodySecondary as m}from"../../TypographyStyle.js";import{COLORS as a}from"../../../constants/Theme.js";import{HEADER_TYPES as n}from"../models/TemplateMeta.js";import{MediaContainer as d}from"./ChatUI.style.js";import{ShimmerImage as c}from"../../shimmer-image/ShimmerImage.js";const h=s=>{let{headerAssetName:c,mediaType:h}=s;const l=h===n.IMAGE?i:h===n.VIDEO?o:t;return r(d,{children:[e(l,{height:40,width:40,color:a.icon.placeholder}),!!c&&e(m,Object.assign({style:{color:a.content.secondary,marginTop:8}},{children:c}))]})},l=r=>{let{headerAssetLink:t,headerAssetName:i,mediaType:o,imagePreviewStyles:m}=r;if(!t||o===n.DOCUMENT)return e(h,Object.assign({},{headerAssetLink:t,headerAssetName:i,mediaType:o}));return e(d,{children:o===n.IMAGE?e(c,{imageUrl:t,alt:t,width:"100%",height:156,borderRadius:8}):o===n.VIDEO?e("video",Object.assign({src:t,style:{width:"100%",minHeight:"156px",borderRadius:8},controls:!0},{children:e("track",{default:!0,kind:"captions",srcLang:"en",src:t})})):e(s,{})})};export{l as MediaCard,h as NoMediaCard};
1
+ import{jsx as e,Fragment as s,jsxs as r}from"react/jsx-runtime";import t from"../../../assets/icons/filePdf.svg.js";import i from"../../../assets/icons/image.svg.js";import o from"../../../assets/icons/videoRecorder.svg.js";import{BodySecondary as m}from"../../TypographyStyle.js";import{COLORS as a}from"../../../constants/Theme.js";import{HEADER_TYPES as n}from"../models/TemplateMeta.js";import{MediaContainer as d}from"./ChatUI.style.js";import{ShimmerImage as c}from"../../shimmer-image/ShimmerImage.js";const h=s=>{let{headerAssetName:c,mediaType:h}=s;const l=h===n.IMAGE?i:h===n.VIDEO?o:t;return r(d,{children:[e(l,{height:40,width:40,color:a.icon.placeholder}),!!c&&e(m,Object.assign({style:{color:a.content.secondary,marginTop:8}},{children:c}))]})},l=r=>{let{headerAssetLink:t,headerAssetName:i,mediaType:o,imagePreviewStyles:m}=r;if(!t||o===n.DOCUMENT)return e(h,Object.assign({},{headerAssetLink:t,headerAssetName:i,mediaType:o}));return e(d,{children:o===n.IMAGE?e(c,{imageUrl:t,alt:t,width:"100%",height:240,borderRadius:8}):o===n.VIDEO?e("video",Object.assign({src:t,style:{width:"100%",minHeight:"240px",height:"240px",borderRadius:8},controls:!0},{children:e("track",{default:!0,kind:"captions",srcLang:"en",src:t})})):e(s,{})})};export{l as MediaCard,h as NoMediaCard};
@@ -1,10 +1,10 @@
1
- import{jsx as e,Fragment as r,jsxs as o}from"react/jsx-runtime";import t from"styled-components";import{TitleRegular as a}from"../../TypographyStyle.js";import{COLORS as s}from"../../../constants/Theme.js";import{getPreviewPropLen as i}from"../utils/getPreviewPropLen.js";import p from"./ChatHeader.js";import{ChatUIV2 as n}from"./ChatUiV2.js";const d=t.div`
1
+ import{jsx as e,Fragment as r,jsxs as o}from"react/jsx-runtime";import a from"styled-components";import{TitleRegular as t}from"../../TypographyStyle.js";import{COLORS as s}from"../../../constants/Theme.js";import{getPreviewPropLen as i}from"../utils/getPreviewPropLen.js";import p from"./ChatHeader.js";import{ChatUIV2 as n}from"./ChatUiV2.js";const d=a.div`
2
2
  background-image: url(${e=>e.isWhatsappCarousel?void 0:"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-radius: 4px;
4
4
  background-repeat: no-repeat;
5
5
  background-position: center;
6
6
  background-size: cover;
7
7
  position: relative;
8
- `,c=t(a)`
8
+ `,c=a(t)`
9
9
  color: ${s.content.primary};
10
- `,m=t=>{const a=i(t);return e(r,3===a?{children:t.zeroStateComponent}:{children:o(d,Object.assign({style:t.containerStyle,showHeader:t.showHeader,isWhatsappCarousel:t.isWhatsappCarousel},{children:[t.showHeader&&e(p,{}),o("div",Object.assign({style:{padding:"small"===t.size?"12px 32px 12px 12px":`16px ${t.isWhatsappCarousel?"0px":"56px"} 12px 16px`}},{children:[!t.hidePreviewText&&e("div",Object.assign({style:{marginBottom:16}},{children:e(c,{children:"Preview"})})),e(n,Object.assign({showHeader:t.showHeader},t))]}))]}))})};export{m as WhatsappLikePreviewV2};
10
+ `,m=a=>{const t=i(a);return e(r,3===t?{children:a.zeroStateComponent}:{children:o(d,Object.assign({style:a.containerStyle,showHeader:a.showHeader,isWhatsappCarousel:a.isWhatsappCarousel},{children:[a.showHeader&&e(p,{}),o("div",Object.assign({style:{padding:"small"===a.size?"12px 32px 12px 12px":`16px ${a.isWhatsappCarousel?"0px":"56px"} ${a.isWhatsappCarousel?"2px":"16px"} 16px`}},{children:[!a.hidePreviewText&&e("div",Object.assign({style:{marginBottom:16}},{children:e(c,{children:"Preview"})})),e(n,Object.assign({showHeader:a.showHeader},a))]}))]}))})};export{m as WhatsappLikePreviewV2};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.445-beta.4",
3
+ "version": "0.0.445-beta.5",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",