@bikdotai/bik-component-library 0.0.432 → 0.0.433-beta.10

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 (79) hide show
  1. package/dist/cjs/assets/{bundle-421aeced.css → bundle-0deb4a74.css} +2 -0
  2. package/dist/cjs/assets/icons/PlusIcon.d.ts +1 -1
  3. package/dist/cjs/assets/icons/qrb.svg.js +1 -0
  4. package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditor.js +1 -1
  5. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  6. package/dist/cjs/components/carousel-preview/CarouselPreview.d.ts +12 -0
  7. package/dist/cjs/components/carousel-preview/CarouselPreview.js +52 -0
  8. package/dist/cjs/components/carousel-preview/CarouselPreviewCard.d.ts +9 -0
  9. package/dist/cjs/components/carousel-preview/CarouselPreviewCard.js +1 -0
  10. package/dist/cjs/components/carousel-preview/index.d.ts +1 -0
  11. package/dist/cjs/components/template-context-mapper/TemplateContextMapper.d.ts +13 -4
  12. package/dist/cjs/components/template-context-mapper/TemplateContextMapper.js +1 -1
  13. package/dist/cjs/components/template-context-mapper/context/templateModalContext.d.ts +33 -8
  14. package/dist/cjs/components/template-context-mapper/modalElements/Body.js +9 -9
  15. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.d.ts +14 -0
  16. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +47 -0
  17. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts +2 -1
  18. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +1 -1
  19. package/dist/cjs/components/template-context-mapper/modalElements/Footer.d.ts +2 -1
  20. package/dist/cjs/components/template-context-mapper/modalElements/Footer.js +4 -4
  21. package/dist/cjs/components/template-context-mapper/modalElements/MobilePreview.d.ts +2 -1
  22. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.js +3 -3
  23. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.d.ts +0 -1
  24. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
  25. package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.d.ts +2 -2
  26. package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
  27. package/dist/cjs/components/template-preview/TemplatePreview.d.ts +5 -2
  28. package/dist/cjs/components/template-preview/TemplatePreview.js +1 -1
  29. package/dist/cjs/components/template-preview/WhatsApp/ChatUI.style.d.ts +5 -1
  30. package/dist/cjs/components/template-preview/WhatsApp/ChatUI.style.js +14 -6
  31. package/dist/cjs/components/template-preview/WhatsApp/ChatUiV2.js +5 -5
  32. package/dist/cjs/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +5 -7
  33. package/dist/cjs/components/template-preview/WhatsAppTemplatePreview.d.ts +2 -0
  34. package/dist/cjs/components/template-preview/WhatsAppTemplatePreview.js +1 -1
  35. package/dist/cjs/components/template-preview/helpers/TemplateCreatorHelper.js +1 -1
  36. package/dist/cjs/components/template-preview/models/WhatsAppTemplate.d.ts +3 -1
  37. package/dist/cjs/components/template-preview/models/WhatsappCarouselTemplate.d.ts +81 -0
  38. package/dist/cjs/index.d.ts +1 -0
  39. package/dist/cjs/index.js +1 -1
  40. package/dist/esm/assets/{bundle-421aeced.css → bundle-0deb4a74.css} +2 -0
  41. package/dist/esm/assets/icons/PlusIcon.d.ts +1 -1
  42. package/dist/esm/assets/icons/qrb.svg.js +1 -0
  43. package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.js +1 -1
  44. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  45. package/dist/esm/components/carousel-preview/CarouselPreview.d.ts +12 -0
  46. package/dist/esm/components/carousel-preview/CarouselPreview.js +52 -0
  47. package/dist/esm/components/carousel-preview/CarouselPreviewCard.d.ts +9 -0
  48. package/dist/esm/components/carousel-preview/CarouselPreviewCard.js +1 -0
  49. package/dist/esm/components/carousel-preview/index.d.ts +1 -0
  50. package/dist/esm/components/template-context-mapper/TemplateContextMapper.d.ts +13 -4
  51. package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
  52. package/dist/esm/components/template-context-mapper/context/templateModalContext.d.ts +33 -8
  53. package/dist/esm/components/template-context-mapper/modalElements/Body.js +9 -9
  54. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.d.ts +14 -0
  55. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +47 -0
  56. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts +2 -1
  57. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +1 -1
  58. package/dist/esm/components/template-context-mapper/modalElements/Footer.d.ts +2 -1
  59. package/dist/esm/components/template-context-mapper/modalElements/Footer.js +4 -4
  60. package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.d.ts +2 -1
  61. package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.js +3 -3
  62. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.d.ts +0 -1
  63. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
  64. package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.d.ts +2 -2
  65. package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
  66. package/dist/esm/components/template-preview/TemplatePreview.d.ts +5 -2
  67. package/dist/esm/components/template-preview/TemplatePreview.js +1 -1
  68. package/dist/esm/components/template-preview/WhatsApp/ChatUI.style.d.ts +5 -1
  69. package/dist/esm/components/template-preview/WhatsApp/ChatUI.style.js +21 -13
  70. package/dist/esm/components/template-preview/WhatsApp/ChatUiV2.js +5 -5
  71. package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +5 -7
  72. package/dist/esm/components/template-preview/WhatsAppTemplatePreview.d.ts +2 -0
  73. package/dist/esm/components/template-preview/WhatsAppTemplatePreview.js +1 -1
  74. package/dist/esm/components/template-preview/helpers/TemplateCreatorHelper.js +1 -1
  75. package/dist/esm/components/template-preview/models/WhatsAppTemplate.d.ts +3 -1
  76. package/dist/esm/components/template-preview/models/WhatsappCarouselTemplate.d.ts +81 -0
  77. package/dist/esm/index.d.ts +1 -0
  78. package/dist/esm/index.js +1 -1
  79. package/package.json +2 -1
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./components/template-preview/constants/regexPatterns.js"),r=require("./utils/StringUtils.js"),t=require("./constants/Theme.js"),o=require("./constants/zindex.js"),n=require("./components/checkBox/CheckBox.js"),i=require("./components/list-item/ListItem.js"),p=require("./components/pagination/Pagination.js"),s=require("./components/radioButton/RadioButton.js"),a=require("./components/toaster/Toaster.js"),u=require("./components/tooltips/Tooltip.js"),c=require("./components/spinner/Spinner.js"),l=require("./components/stepper/Stepper.js"),d=require("./components/tag/Tag.js"),m=require("./components/icon-button/IconButton.js"),T=require("./components/template-preview/TemplatePreview.js"),x=require("./components/template-preview/WhatsApp/WhatsAppLikePreview.js"),S=require("./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),P=require("./components/template-preview/helpers/SmsTemplateHelper.js"),A=require("./components/template-preview/helpers/WhatsAppFormatToHTML.js"),O=require("./components/template-preview/helpers/VariableEditorHelper.js"),y=require("./components/template-preview/models/TemplateMeta.js"),C=require("./components/template-preview/models/WhatsAppTemplate.js"),E=require("./components/template-context-mapper/TemplateContextMapper.js"),b=require("./components/template-context-mapper/utils/getDataFromTemplateComponent.js"),j=require("./components/template-context-mapper/utils/validateIsUrl.js"),R=require("./components/fab-menu/FABMenu.js"),h=require("./components/floating-action-button/FloatingActionButton.js"),_=require("./components/floating-action-button/FloatingActionButton.styles.js"),I=require("./components/image-compress/ImageCompress.js"),B=require("./components/TypographyStyle.js"),g=require("./components/button/Button.js"),q=require("./components/progress-bar/ProgressBarComponent.js"),f=require("./components/QueryBuilder/QueryBuilder.js"),N=require("./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),D=require("./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js"),M=require("./components/QueryBuilder/redux/queryBuilder.reducer.js"),k=require("./components/QueryBuilder/redux/queryBuilderCache.reducer.js"),L=require("./components/QueryBuilder/types/QueryBuilderOperator.type.js"),w=require("./components/modals/styledModal.js"),G=require("./components/dropdown/DropdownPopover/index.js"),U=require("./components/dropdown/Dropdown.js"),V=require("./components/dropdown/ChipDropdown.js"),v=require("./components/dropdown/OpenedDropdown/components/OpennedDropdown.js"),F=require("./components/dropdown/MenuItem/MenuItem.js"),H=require("./components/analytics-card/AnalyticsCard.js"),W=require("./components/analytics-card/AnalyticsCard.styled.js"),Y=require("./components/input/Input.js"),Q=require("./components/analytics-chips-and-dropdowns/AnalyticsChip.js"),K=require("./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js"),Z=require("./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js"),X=require("./components/analytics-chips-and-dropdowns/AnalyticsMetric.js"),z=require("./components/analytics-chips-and-dropdowns/AnalyticsTrend.js"),J=require("./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),$=require("./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js"),ee=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),re=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),te=require("./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),oe=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),ne=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),ie=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),pe=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),se=require("./components/avatar/Avatar.js"),ae=require("./components/avatar/AvatarHelper.js"),ue=require("./components/alerts/Alert.js"),ce=require("./components/alerts/AlertHelper.js"),le=require("./components/thumbnail/Thumbnail.js"),de=require("./components/curtain/Curtain.js"),me=require("./components/datePicker/DatePicker.js"),Te=require("./components/switch/Switch.js"),xe=require("./components/plans/SubscriptionPlan.js"),Se=require("./components/plans/SubscriptionPlanSelector.js"),Pe=require("./components/plans/NewSubscriptionPlan.js"),Ae=require("./components/plans/SubscriptionPlansCollected.js"),Oe=require("./components/tabs/Tabs.js"),ye=require("./components/dynamic-tabs/DynamicTabs.js"),Ce=require("./components/shimmer/ShimmerComponent/BikShimmer.js"),Ee=require("./components/TablePagination/TablePagination.js"),be=require("./components/TablePagination/TablePaginationCard.js"),je=require("./components/states-modal/StateModalComponent.js"),Re=require("./components/states-modal/DeleteConfirmationModal.js"),he=require("./components/states/StateComponent.js"),_e=require("./components/states/ShopifyScopeWrapper.js"),Ie=require("./components/WhatsAppTextEditor/WhatsAppTextEditor.js"),Be=require("./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),ge=require("./helpers/BaseWhatsappContentLang.helper.js"),qe=require("./components/curtain/CurtainHelper.js"),fe=require("./components/card-selection-modal/CardSelectionModal.js"),Ne=require("./components/image-cropper/BikImageCropper.js"),De=require("./components/image-cropper/BikImagePipeline/BikImagePipeline.js"),Me=require("./components/buttonGroup/ButtonGroup.js"),ke=require("./components/accordion/Accordion.js"),Le=require("./components/file-uploader/FileUploader.js"),we=require("./components/colourInput/ColourInput.js"),Ge=require("./components/bik-layout/BikHeader.js"),Ue=require("./components/bik-layout/BikLayout.js"),Ve=require("./components/bik-layout/BikProfile.js"),ve=require("./components/bik-layout/SimpleSidebar.js"),Fe=require("./components/bik-layout/BikSidebar.js"),He=require("./components/bik-layout/FeatureModal.js"),We=require("./components/bik-layout/SidebarSkeleton.js"),Ye=require("./components/bik-layout/ShowShopifyRestrictedModal.js"),Qe=require("./components/bik-layout/FeatureModalV2.js"),Ke=require("./components/searchBar/searchBar.js"),Ze=require("./components/custom-date-time/CustomDateTime.js"),Xe=require("./components/product-picker/ProductPickerModal.js"),ze=require("./components/discount-modal/DiscountModal.js"),Je=require("./components/discount-modal/CouponExpiration/CouponExpiration.js"),$e=require("./components/discount-modal/type.js"),er=require("./components/country-code-picker/CountryCodePicker.js"),rr=require("./components/country-code-picker/CountryCodePicker.modal.js"),tr=require("./components/shimmer-image/ShimmerImage.js"),or=require("./components/product-picker-v2/modal.js"),nr=require("./components/carousel/carousel.js"),ir=require("./components/carousel-secondary/CarouselSecondary.js"),pr=require("./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js"),sr=require("./components/radioList/RadioList.js"),ar=require("./components/checkList/CheckList.js"),ur=require("./components/postPicker/postPicker.js"),cr=require("./components/dropdown-button/DropdownButton.js"),lr=require("./components/side-modal/SideModal.js"),dr=require("./components/keywords-input/KeywordsInput.js"),mr=require("./components/add-variableV2/AddVariableV2SideModal.js"),Tr=require("./components/add-variableV2/AddVariableV2.js"),xr=require("./components/navigation-hyperlink/NavigationHyperlink.js"),Sr=require("./components/SearchFilter/index.js"),Pr=require("./components/input-with-vars/InputWithVariables.js"),Ar=require("./components/dashboard-review-popup/DashboardReviewPopUp.js"),Or=require("./components/star-rating/StarRating.js"),yr=require("./components/testimonial-card/TestimonialCard.js"),Cr=require("./components/slider/slider.js");exports.regexPatterns=e,exports.StringUtils=r.default,exports.BASE_COLORS=t.BASE_COLORS,exports.COLORS=t.COLORS,exports.DEFAULT_THEME=t.DEFAULT_THEME,exports.FONTS=t.FONTS,exports.ComponentZindex=o.ComponentZindex,exports.CheckBox=n.CheckBox,exports.ListItem=i.ListItem,exports.Pagination=p.Pagination,exports.RadioButton=s.RadioButton,exports.Toaster=a.Toaster,exports.Tooltip=u.Tooltip,exports.Spinner=c.Spinner,exports.Stepper=l.Stepper,exports.Tag=d.Tag,exports.IconButton=m.IconButton,exports.TemplatePreview=T.TemplatePreview,exports.WhatsappLikePreview=x.WhatsappLikePreview,exports.WhatsappLikePreviewV2=S.WhatsappLikePreviewV2,exports.renderVariableUIForPreview=P.renderVariableUIForPreview,exports.WhatsAppFormatToHTML=A.WhatsAppFormatToHTML,exports.VariableEditorHelper=O.VariableEditorHelper,Object.defineProperty(exports,"ACTIONS_TYPES",{enumerable:!0,get:function(){return y.ACTIONS_TYPES}}),exports.CUSTOM_URL_NAME=y.CUSTOM_URL_NAME,Object.defineProperty(exports,"HEADER_TYPES",{enumerable:!0,get:function(){return y.HEADER_TYPES}}),Object.defineProperty(exports,"TEMPLATE_EDITOR",{enumerable:!0,get:function(){return y.TEMPLATE_EDITOR}}),Object.defineProperty(exports,"TEMPLATE_STATUS",{enumerable:!0,get:function(){return y.TEMPLATE_STATUS}}),Object.defineProperty(exports,"BUTTON_TYPE",{enumerable:!0,get:function(){return C.BUTTON_TYPE}}),Object.defineProperty(exports,"POD",{enumerable:!0,get:function(){return C.POD}}),exports.TemplateContextMapper=E.TemplateContextMapper,exports.getAllDataFromTemplateComponent=b.getAllDataFromTemplateComponent,exports.validateIsUrl=j.validateIsUrl,exports.FABMenu=R.FABMenu,exports.FloatingActionButton=h.FloatingActionButton,Object.defineProperty(exports,"DROP_POSITION",{enumerable:!0,get:function(){return _.DROP_POSITION}}),exports.DropdownToggleContainer=_.DropdownToggleContainer,Object.defineProperty(exports,"FAB_POSITION",{enumerable:!0,get:function(){return _.FAB_POSITION}}),exports.FloatingActionButtonContainer=_.FloatingActionButtonContainer,exports.FloatingActionButtonOuterContainer=_.FloatingActionButtonOuterContainer,Object.defineProperty(exports,"MENU_ALIGNMENT",{enumerable:!0,get:function(){return _.MENU_ALIGNMENT}}),exports.StyledDropdown=_.StyledDropdown,exports.TooltipStyled=_.TooltipStyled,exports.ImageService=I.ImageService,exports.BodyCaption=B.BodyCaption,exports.BodyLarge=B.BodyLarge,exports.BodyPrimary=B.BodyPrimary,exports.BodyPrimaryLink=B.BodyPrimaryLink,exports.BodyRegular=B.BodyRegular,exports.BodySecondary=B.BodySecondary,exports.BodySecondaryLink=B.BodySecondaryLink,exports.BodyTiny=B.BodyTiny,exports.ButtonLarge=B.ButtonLarge,exports.ButtonRegular=B.ButtonRegular,exports.Caption=B.Caption,exports.Display=B.Display,exports.SmallRegular=B.SmallRegular,exports.SubHeading=B.SubHeading,exports.TitleLarge=B.TitleLarge,exports.TitleMedium=B.TitleMedium,exports.TitleRegular=B.TitleRegular,exports.TitleSmall=B.TitleSmall,exports.Button=g.Button,exports.ProgressBarComponent=q.ProgressBarComponent,exports.ProgressCompletedBar=q.ProgressCompletedBar,exports.QueryBuilder=f.QueryBuilder,exports.BaseQueryBuilderNode=N.BaseQueryBuilderNode,exports.PropertyNode=D.PropertyNode,exports.PropertyNodeHeadless=D.PropertyNodeHeadless,exports.queryBuilderSlice=M.queryBuilderSlice,exports.queryBuilderCacheSlice=k.queryBuilderCacheSlice,Object.defineProperty(exports,"AD_STRING_OPERATORS",{enumerable:!0,get:function(){return L.AD_STRING_OPERATORS}}),Object.defineProperty(exports,"ANY_AD_OPERATORS",{enumerable:!0,get:function(){return L.ANY_AD_OPERATORS}}),Object.defineProperty(exports,"ANY_IG_OPERATORS",{enumerable:!0,get:function(){return L.ANY_IG_OPERATORS}}),Object.defineProperty(exports,"BOOLEAN_OPERATORS",{enumerable:!0,get:function(){return L.BOOLEAN_OPERATORS}}),Object.defineProperty(exports,"DATE_OPERATORS",{enumerable:!0,get:function(){return L.DATE_OPERATORS}}),Object.defineProperty(exports,"EVENT_VALUES",{enumerable:!0,get:function(){return L.EVENT_VALUES}}),Object.defineProperty(exports,"EXACTLY_OPERATORS",{enumerable:!0,get:function(){return L.EXACTLY_OPERATORS}}),Object.defineProperty(exports,"FREQUENCY_OPERATORS",{enumerable:!0,get:function(){return L.FREQUENCY_OPERATORS}}),Object.defineProperty(exports,"ICE_BREAKER_OPERATORS",{enumerable:!0,get:function(){return L.ICE_BREAKER_OPERATORS}}),Object.defineProperty(exports,"IG_STRING_OPERATORS",{enumerable:!0,get:function(){return L.IG_STRING_OPERATORS}}),Object.defineProperty(exports,"INTEGER_OPERATORS",{enumerable:!0,get:function(){return L.INTEGER_OPERATORS}}),Object.defineProperty(exports,"MAIL_SUBJECT_OPERATORS",{enumerable:!0,get:function(){return L.MAIL_SUBJECT_OPERATORS}}),Object.defineProperty(exports,"REACTION_OPERATORS",{enumerable:!0,get:function(){return L.REACTION_OPERATORS}}),Object.defineProperty(exports,"SPECIFIC_IG_OPERATORS",{enumerable:!0,get:function(){return L.SPECIFIC_IG_OPERATORS}}),Object.defineProperty(exports,"STRING_OPERATORS",{enumerable:!0,get:function(){return L.STRING_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS",{enumerable:!0,get:function(){return L.STRING_RESTRICTED_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_2",{enumerable:!0,get:function(){return L.STRING_RESTRICTED_OPERATORS_2}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_3",{enumerable:!0,get:function(){return L.STRING_RESTRICTED_OPERATORS_3}}),exports.StyledModal=w.StyledModal,exports.DropdownPopover=G.DropdownPopover,exports.Dropdown=U.Dropdown,exports.ChipDropdown=V.ChipDropdown,exports.OpenedDropdown=v.OpenedDropdown,exports.MenuItemDropdown=F.MenuItemDropdown,exports.AnalyticsCard=H.AnalyticsCard,exports.AnalyticsContainer=W.AnalyticsContainer,exports.CardDataContainer=W.CardDataContainer,exports.Input=Y.Input,exports.AnalyticsChip=Q.AnalyticsChip,exports.AnalyticsDropdown=K.AnalyticsDropdown,exports.EachItem=K.EachItem,exports.formatDate=K.formatDate,exports.AnalyticsMultiChip=Z.AnalyticsMultiChip,exports.AnalyticsMetric=X.AnalyticsMetric,exports.AnalyticsTrend=z.AnalyticsTrend,exports.LineChart=J.LineChart,exports.LinearChipGroupedChart=$.LinearChipGroupedChart,exports.Card=ee.Card,exports.PieChartAnalytics=ee.PieChartAnalytics,exports.PieChart=re.PieChart,exports.HorizontalGraph=te.HorizontalGraph,exports.StackedBarChart=oe.StackedBarChart,exports.VerticalGraph=ne.VerticalGraph,Object.defineProperty(exports,"HEAT",{enumerable:!0,get:function(){return ie.HEAT}}),exports.HEAT_COLORS=ie.HEAT_COLORS,Object.defineProperty(exports,"HEAT_GRADING_TYPE",{enumerable:!0,get:function(){return ie.HEAT_GRADING_TYPE}}),exports.HeatMap=ie.HeatMap,exports.VerticalBarAndLinearGraph=pe.VerticalBarAndLinearGraph,exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=se.AVATAR_SIZE_VS_ICON_SIZE_MAP,exports.Avatar=se.Avatar,exports.BACKGROUND_VS_TEXT_COLOR_MAP=se.BACKGROUND_VS_TEXT_COLOR_MAP,Object.defineProperty(exports,"AVATAR_BACKGROUND",{enumerable:!0,get:function(){return ae.AVATAR_BACKGROUND}}),exports.AVATAR_SIZE_MAP=ae.AVATAR_SIZE_MAP,Object.defineProperty(exports,"AVATAR_TYPES",{enumerable:!0,get:function(){return ae.AVATAR_TYPES}}),Object.defineProperty(exports,"SIZE",{enumerable:!0,get:function(){return ae.SIZE}}),exports.Alert=ue.Alert,Object.defineProperty(exports,"ALERT_TYPES",{enumerable:!0,get:function(){return ce.ALERT_TYPES}}),exports.COLOR_CONFIG_MAP=ce.COLOR_CONFIG_MAP,Object.defineProperty(exports,"CONTENT_POSITION",{enumerable:!0,get:function(){return ce.CONTENT_POSITION}}),Object.defineProperty(exports,"RATIO",{enumerable:!0,get:function(){return le.RATIO}}),exports.Thumbnail=le.Thumbnail,exports.Curtain=de.Curtain,exports.DatePicker=me.DatePicker,exports.Loader=Te.Loader,exports.Switch=Te.Switch,exports.SwitchContainer=Te.SwitchContainer,exports.Thumb=Te.Thumb,exports.SubscriptionPlan=xe.SubscriptionPlan,exports.BottomWrapper=Se.BottomWrapper,exports.HeaderWrapper=Se.HeaderWrapper,exports.SubscriptionPlanSelector=Se.SubscriptionPlanSelector,exports.defaultTabs=Se.defaultTabs,exports.NewSubscriptionPlan=Pe.NewSubscriptionPlan,exports.SubscriptionPlansCollected=Ae.SubscriptionPlansCollected,exports.TabItemComponent=Oe.TabItemComponent,exports.Tabs=Oe.Tabs,exports.DynamicTabs=ye.DynamicTabs,exports.BikShimmer=Ce.BikShimmer,exports.TablePagination=Ee.TablePagination,exports.TablePaginationCard=be.TablePaginationCard,exports.TablePaginationCardStyled=be.TablePaginationCardStyled,exports.StateModalComponent=je.StateModalComponent,exports.DeleteConfirmationModal=Re.DeleteConfirmationModal,Object.defineProperty(exports,"ButtonActions",{enumerable:!0,get:function(){return he.ButtonActions}}),Object.defineProperty(exports,"ButtonTypes",{enumerable:!0,get:function(){return he.ButtonTypes}}),exports.StateComponent=he.StateComponent,Object.defineProperty(exports,"StateInterface",{enumerable:!0,get:function(){return he.StateInterface}}),exports.ShopifyScopeWrapper=_e.ShopifyScopeWrapper,exports.WhatsAppTextEditor=Ie.WhatsAppTextEditor,Object.defineProperty(exports,"EditorActionTypes",{enumerable:!0,get:function(){return Be.EditorActionTypes}}),exports.WhatsAppTextEditorHeader=Be.WhatsAppTextEditorHeader,exports.BaseWhatsappContentLangHelper=ge.BaseWhatsappContentLangHelper,exports.CURTAIN_COLOR_CONFIG_MAP=qe.CURTAIN_COLOR_CONFIG_MAP,Object.defineProperty(exports,"CURTAIN_MODE",{enumerable:!0,get:function(){return qe.CURTAIN_MODE}}),Object.defineProperty(exports,"CURTAIN_TYPES",{enumerable:!0,get:function(){return qe.CURTAIN_TYPES}}),exports.CardSelectionModal=fe.CardSelectionModal,exports.BikImageCropper=Ne.BikImageCropper,exports.BikImagePipeline=De.BikImagePipeline,exports.ButtonGroup=Me.ButtonGroup,exports.BikAccordion=ke.BikAccordion,exports.FileUploader=Le.FileUploader,exports.ColourInput=we.ColourInput,exports.BikHeader=Ge.BikHeader,exports.BikLayout=Ue.BikLayout,exports.BikProfile=Ve.BikProfile,exports.SimpleSidebar=ve.SimpleSidebar,exports.BikSidebar=Fe.BikSidebar,exports.FeatureModal=He.FeatureModal,exports.SidebarSkeleton=We.SidebarSkeleton,exports.ShowShopifyRestrictedModal=Ye.ShowShopifyRestrictedModal,exports.FeatureModalV2=Qe.FeatureModalV2,exports.SearchBar=Ke.SearchBar,exports.CustomDateTime=Ze.CustomDateTime,exports.PricePleaseProductPicker=Xe.PricePleaseProductPicker,exports.ProductPickerContent=Xe.ProductPickerContent,exports.DiscountModal=ze.DiscountModal,Object.defineProperty(exports,"COUPON_EXPIRATION",{enumerable:!0,get:function(){return Je.COUPON_EXPIRATION}}),exports.CouponExpiration=Je.CouponExpiration,Object.defineProperty(exports,"DISCOUNT_TARGET_SELECTION",{enumerable:!0,get:function(){return $e.DISCOUNT_TARGET_SELECTION}}),Object.defineProperty(exports,"DISCOUNT_TARGET_TYPES",{enumerable:!0,get:function(){return $e.DISCOUNT_TARGET_TYPES}}),Object.defineProperty(exports,"DISCOUNT_TYPES",{enumerable:!0,get:function(){return $e.DISCOUNT_TYPES}}),Object.defineProperty(exports,"DISCOUNT_VALUE_TYPES",{enumerable:!0,get:function(){return $e.DISCOUNT_VALUE_TYPES}}),Object.defineProperty(exports,"MIN_PURCHASE_REQUIREMENT",{enumerable:!0,get:function(){return $e.MIN_PURCHASE_REQUIREMENT}}),exports.CountryCodePicker=er.CountryCodePicker,exports.CountriesData=rr.CountriesData,exports.DEFAULT_IMAGE=tr.DEFAULT_IMAGE,exports.ShimmerImage=tr.ShimmerImage,exports.ProductPickerModal=or.ProductPickerModal,Object.defineProperty(exports,"ScreenName",{enumerable:!0,get:function(){return or.ScreenName}}),exports.Carousel=nr.Carousel,exports.CarouselSecondary=ir.CarouselSecondary,exports.AccessTokenTroubleshootDialog=pr.AccessTokenTroubleshootDialog,exports.RadioList=sr.RadioList,exports.CheckList=ar.CheckList,Object.defineProperty(exports,"DateKeys",{enumerable:!0,get:function(){return ur.DateKeys}}),Object.defineProperty(exports,"MEDIA_TYPES",{enumerable:!0,get:function(){return ur.MEDIA_TYPES}}),exports.PostPicker=ur.PostPicker,exports.dateOptions=ur.dateOptions,exports.DropdownButton=cr.DropdownButton,exports.SideModal=lr.SideModal,exports.KeywordsInput=dr.KeywordsInput,exports.AddVariableV2SideModal=mr.AddVariableV2SideModal,exports.AddVariableV2=Tr.AddVariableV2,exports.NaLinkWrapper=xr.NaLinkWrapper,exports.NavigationHyperlink=xr.NavigationHyperlink,exports.SearchFilter=Sr.SearchFilter,exports.InputWithVariables=Pr.InputWithVariables,exports.DashboardReviewPopUp=Ar.DashboardReviewPopUp,exports.StarRating=Or.StarRating,exports.TestimonialCard=yr.TestimonialCard,exports.BikSlider=Cr.BikSlider;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./components/template-preview/constants/regexPatterns.js"),r=require("./utils/StringUtils.js"),t=require("./constants/Theme.js"),o=require("./constants/zindex.js"),n=require("./components/checkBox/CheckBox.js"),i=require("./components/list-item/ListItem.js"),p=require("./components/pagination/Pagination.js"),s=require("./components/radioButton/RadioButton.js"),a=require("./components/toaster/Toaster.js"),u=require("./components/tooltips/Tooltip.js"),c=require("./components/spinner/Spinner.js"),l=require("./components/stepper/Stepper.js"),d=require("./components/tag/Tag.js"),m=require("./components/icon-button/IconButton.js"),T=require("./components/template-preview/TemplatePreview.js"),x=require("./components/template-preview/WhatsApp/WhatsAppLikePreview.js"),P=require("./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),S=require("./components/template-preview/helpers/SmsTemplateHelper.js"),A=require("./components/template-preview/helpers/WhatsAppFormatToHTML.js"),O=require("./components/template-preview/helpers/VariableEditorHelper.js"),C=require("./components/template-preview/models/TemplateMeta.js"),y=require("./components/template-preview/models/WhatsAppTemplate.js"),E=require("./components/template-context-mapper/TemplateContextMapper.js"),b=require("./components/template-context-mapper/utils/getDataFromTemplateComponent.js"),j=require("./components/template-context-mapper/utils/validateIsUrl.js"),R=require("./components/fab-menu/FABMenu.js"),h=require("./components/floating-action-button/FloatingActionButton.js"),_=require("./components/floating-action-button/FloatingActionButton.styles.js"),I=require("./components/image-compress/ImageCompress.js"),B=require("./components/TypographyStyle.js"),g=require("./components/button/Button.js"),q=require("./components/progress-bar/ProgressBarComponent.js"),f=require("./components/QueryBuilder/QueryBuilder.js"),N=require("./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),D=require("./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js"),M=require("./components/QueryBuilder/redux/queryBuilder.reducer.js"),k=require("./components/QueryBuilder/redux/queryBuilderCache.reducer.js"),w=require("./components/QueryBuilder/types/QueryBuilderOperator.type.js"),L=require("./components/modals/styledModal.js"),G=require("./components/dropdown/DropdownPopover/index.js"),U=require("./components/dropdown/Dropdown.js"),V=require("./components/dropdown/ChipDropdown.js"),v=require("./components/dropdown/OpenedDropdown/components/OpennedDropdown.js"),F=require("./components/dropdown/MenuItem/MenuItem.js"),H=require("./components/analytics-card/AnalyticsCard.js"),W=require("./components/analytics-card/AnalyticsCard.styled.js"),Y=require("./components/input/Input.js"),Q=require("./components/analytics-chips-and-dropdowns/AnalyticsChip.js"),K=require("./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js"),Z=require("./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js"),X=require("./components/analytics-chips-and-dropdowns/AnalyticsMetric.js"),z=require("./components/analytics-chips-and-dropdowns/AnalyticsTrend.js"),J=require("./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),$=require("./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js"),ee=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),re=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),te=require("./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),oe=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),ne=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),ie=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),pe=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),se=require("./components/avatar/Avatar.js"),ae=require("./components/avatar/AvatarHelper.js"),ue=require("./components/alerts/Alert.js"),ce=require("./components/alerts/AlertHelper.js"),le=require("./components/thumbnail/Thumbnail.js"),de=require("./components/curtain/Curtain.js"),me=require("./components/datePicker/DatePicker.js"),Te=require("./components/switch/Switch.js"),xe=require("./components/plans/SubscriptionPlan.js"),Pe=require("./components/plans/SubscriptionPlanSelector.js"),Se=require("./components/plans/NewSubscriptionPlan.js"),Ae=require("./components/plans/SubscriptionPlansCollected.js"),Oe=require("./components/tabs/Tabs.js"),Ce=require("./components/dynamic-tabs/DynamicTabs.js"),ye=require("./components/shimmer/ShimmerComponent/BikShimmer.js"),Ee=require("./components/TablePagination/TablePagination.js"),be=require("./components/TablePagination/TablePaginationCard.js"),je=require("./components/states-modal/StateModalComponent.js"),Re=require("./components/states-modal/DeleteConfirmationModal.js"),he=require("./components/states/StateComponent.js"),_e=require("./components/states/ShopifyScopeWrapper.js"),Ie=require("./components/WhatsAppTextEditor/WhatsAppTextEditor.js"),Be=require("./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),ge=require("./helpers/BaseWhatsappContentLang.helper.js"),qe=require("./components/curtain/CurtainHelper.js"),fe=require("./components/card-selection-modal/CardSelectionModal.js"),Ne=require("./components/image-cropper/BikImageCropper.js"),De=require("./components/image-cropper/BikImagePipeline/BikImagePipeline.js"),Me=require("./components/buttonGroup/ButtonGroup.js"),ke=require("./components/accordion/Accordion.js"),we=require("./components/file-uploader/FileUploader.js"),Le=require("./components/colourInput/ColourInput.js"),Ge=require("./components/bik-layout/BikHeader.js"),Ue=require("./components/bik-layout/BikLayout.js"),Ve=require("./components/bik-layout/BikProfile.js"),ve=require("./components/bik-layout/SimpleSidebar.js"),Fe=require("./components/bik-layout/BikSidebar.js"),He=require("./components/bik-layout/FeatureModal.js"),We=require("./components/bik-layout/SidebarSkeleton.js"),Ye=require("./components/bik-layout/ShowShopifyRestrictedModal.js"),Qe=require("./components/bik-layout/FeatureModalV2.js"),Ke=require("./components/searchBar/searchBar.js"),Ze=require("./components/custom-date-time/CustomDateTime.js"),Xe=require("./components/product-picker/ProductPickerModal.js"),ze=require("./components/discount-modal/DiscountModal.js"),Je=require("./components/discount-modal/CouponExpiration/CouponExpiration.js"),$e=require("./components/discount-modal/type.js"),er=require("./components/country-code-picker/CountryCodePicker.js"),rr=require("./components/country-code-picker/CountryCodePicker.modal.js"),tr=require("./components/shimmer-image/ShimmerImage.js"),or=require("./components/product-picker-v2/modal.js"),nr=require("./components/carousel/carousel.js"),ir=require("./components/carousel-secondary/CarouselSecondary.js"),pr=require("./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js"),sr=require("./components/radioList/RadioList.js"),ar=require("./components/checkList/CheckList.js"),ur=require("./components/postPicker/postPicker.js"),cr=require("./components/dropdown-button/DropdownButton.js"),lr=require("./components/side-modal/SideModal.js"),dr=require("./components/keywords-input/KeywordsInput.js"),mr=require("./components/add-variableV2/AddVariableV2SideModal.js"),Tr=require("./components/add-variableV2/AddVariableV2.js"),xr=require("./components/navigation-hyperlink/NavigationHyperlink.js"),Pr=require("./components/SearchFilter/index.js"),Sr=require("./components/input-with-vars/InputWithVariables.js"),Ar=require("./components/dashboard-review-popup/DashboardReviewPopUp.js"),Or=require("./components/star-rating/StarRating.js"),Cr=require("./components/testimonial-card/TestimonialCard.js"),yr=require("./components/slider/slider.js"),Er=require("./components/carousel-preview/CarouselPreview.js");exports.regexPatterns=e,exports.StringUtils=r.default,exports.BASE_COLORS=t.BASE_COLORS,exports.COLORS=t.COLORS,exports.DEFAULT_THEME=t.DEFAULT_THEME,exports.FONTS=t.FONTS,exports.ComponentZindex=o.ComponentZindex,exports.CheckBox=n.CheckBox,exports.ListItem=i.ListItem,exports.Pagination=p.Pagination,exports.RadioButton=s.RadioButton,exports.Toaster=a.Toaster,exports.Tooltip=u.Tooltip,exports.Spinner=c.Spinner,exports.Stepper=l.Stepper,exports.Tag=d.Tag,exports.IconButton=m.IconButton,exports.TemplatePreview=T.TemplatePreview,exports.WhatsappLikePreview=x.WhatsappLikePreview,exports.WhatsappLikePreviewV2=P.WhatsappLikePreviewV2,exports.renderVariableUIForPreview=S.renderVariableUIForPreview,exports.WhatsAppFormatToHTML=A.WhatsAppFormatToHTML,exports.VariableEditorHelper=O.VariableEditorHelper,Object.defineProperty(exports,"ACTIONS_TYPES",{enumerable:!0,get:function(){return C.ACTIONS_TYPES}}),exports.CUSTOM_URL_NAME=C.CUSTOM_URL_NAME,Object.defineProperty(exports,"HEADER_TYPES",{enumerable:!0,get:function(){return C.HEADER_TYPES}}),Object.defineProperty(exports,"TEMPLATE_EDITOR",{enumerable:!0,get:function(){return C.TEMPLATE_EDITOR}}),Object.defineProperty(exports,"TEMPLATE_STATUS",{enumerable:!0,get:function(){return C.TEMPLATE_STATUS}}),Object.defineProperty(exports,"BUTTON_TYPE",{enumerable:!0,get:function(){return y.BUTTON_TYPE}}),Object.defineProperty(exports,"POD",{enumerable:!0,get:function(){return y.POD}}),exports.TemplateContextMapper=E.TemplateContextMapper,exports.getAllDataFromTemplateComponent=b.getAllDataFromTemplateComponent,exports.validateIsUrl=j.validateIsUrl,exports.FABMenu=R.FABMenu,exports.FloatingActionButton=h.FloatingActionButton,Object.defineProperty(exports,"DROP_POSITION",{enumerable:!0,get:function(){return _.DROP_POSITION}}),exports.DropdownToggleContainer=_.DropdownToggleContainer,Object.defineProperty(exports,"FAB_POSITION",{enumerable:!0,get:function(){return _.FAB_POSITION}}),exports.FloatingActionButtonContainer=_.FloatingActionButtonContainer,exports.FloatingActionButtonOuterContainer=_.FloatingActionButtonOuterContainer,Object.defineProperty(exports,"MENU_ALIGNMENT",{enumerable:!0,get:function(){return _.MENU_ALIGNMENT}}),exports.StyledDropdown=_.StyledDropdown,exports.TooltipStyled=_.TooltipStyled,exports.ImageService=I.ImageService,exports.BodyCaption=B.BodyCaption,exports.BodyLarge=B.BodyLarge,exports.BodyPrimary=B.BodyPrimary,exports.BodyPrimaryLink=B.BodyPrimaryLink,exports.BodyRegular=B.BodyRegular,exports.BodySecondary=B.BodySecondary,exports.BodySecondaryLink=B.BodySecondaryLink,exports.BodyTiny=B.BodyTiny,exports.ButtonLarge=B.ButtonLarge,exports.ButtonRegular=B.ButtonRegular,exports.Caption=B.Caption,exports.Display=B.Display,exports.SmallRegular=B.SmallRegular,exports.SubHeading=B.SubHeading,exports.TitleLarge=B.TitleLarge,exports.TitleMedium=B.TitleMedium,exports.TitleRegular=B.TitleRegular,exports.TitleSmall=B.TitleSmall,exports.Button=g.Button,exports.ProgressBarComponent=q.ProgressBarComponent,exports.ProgressCompletedBar=q.ProgressCompletedBar,exports.QueryBuilder=f.QueryBuilder,exports.BaseQueryBuilderNode=N.BaseQueryBuilderNode,exports.PropertyNode=D.PropertyNode,exports.PropertyNodeHeadless=D.PropertyNodeHeadless,exports.queryBuilderSlice=M.queryBuilderSlice,exports.queryBuilderCacheSlice=k.queryBuilderCacheSlice,Object.defineProperty(exports,"AD_STRING_OPERATORS",{enumerable:!0,get:function(){return w.AD_STRING_OPERATORS}}),Object.defineProperty(exports,"ANY_AD_OPERATORS",{enumerable:!0,get:function(){return w.ANY_AD_OPERATORS}}),Object.defineProperty(exports,"ANY_IG_OPERATORS",{enumerable:!0,get:function(){return w.ANY_IG_OPERATORS}}),Object.defineProperty(exports,"BOOLEAN_OPERATORS",{enumerable:!0,get:function(){return w.BOOLEAN_OPERATORS}}),Object.defineProperty(exports,"DATE_OPERATORS",{enumerable:!0,get:function(){return w.DATE_OPERATORS}}),Object.defineProperty(exports,"EVENT_VALUES",{enumerable:!0,get:function(){return w.EVENT_VALUES}}),Object.defineProperty(exports,"EXACTLY_OPERATORS",{enumerable:!0,get:function(){return w.EXACTLY_OPERATORS}}),Object.defineProperty(exports,"FREQUENCY_OPERATORS",{enumerable:!0,get:function(){return w.FREQUENCY_OPERATORS}}),Object.defineProperty(exports,"ICE_BREAKER_OPERATORS",{enumerable:!0,get:function(){return w.ICE_BREAKER_OPERATORS}}),Object.defineProperty(exports,"IG_STRING_OPERATORS",{enumerable:!0,get:function(){return w.IG_STRING_OPERATORS}}),Object.defineProperty(exports,"INTEGER_OPERATORS",{enumerable:!0,get:function(){return w.INTEGER_OPERATORS}}),Object.defineProperty(exports,"MAIL_SUBJECT_OPERATORS",{enumerable:!0,get:function(){return w.MAIL_SUBJECT_OPERATORS}}),Object.defineProperty(exports,"REACTION_OPERATORS",{enumerable:!0,get:function(){return w.REACTION_OPERATORS}}),Object.defineProperty(exports,"SPECIFIC_IG_OPERATORS",{enumerable:!0,get:function(){return w.SPECIFIC_IG_OPERATORS}}),Object.defineProperty(exports,"STRING_OPERATORS",{enumerable:!0,get:function(){return w.STRING_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS",{enumerable:!0,get:function(){return w.STRING_RESTRICTED_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_2",{enumerable:!0,get:function(){return w.STRING_RESTRICTED_OPERATORS_2}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_3",{enumerable:!0,get:function(){return w.STRING_RESTRICTED_OPERATORS_3}}),exports.StyledModal=L.StyledModal,exports.DropdownPopover=G.DropdownPopover,exports.Dropdown=U.Dropdown,exports.ChipDropdown=V.ChipDropdown,exports.OpenedDropdown=v.OpenedDropdown,exports.MenuItemDropdown=F.MenuItemDropdown,exports.AnalyticsCard=H.AnalyticsCard,exports.AnalyticsContainer=W.AnalyticsContainer,exports.CardDataContainer=W.CardDataContainer,exports.Input=Y.Input,exports.AnalyticsChip=Q.AnalyticsChip,exports.AnalyticsDropdown=K.AnalyticsDropdown,exports.EachItem=K.EachItem,exports.formatDate=K.formatDate,exports.AnalyticsMultiChip=Z.AnalyticsMultiChip,exports.AnalyticsMetric=X.AnalyticsMetric,exports.AnalyticsTrend=z.AnalyticsTrend,exports.LineChart=J.LineChart,exports.LinearChipGroupedChart=$.LinearChipGroupedChart,exports.Card=ee.Card,exports.PieChartAnalytics=ee.PieChartAnalytics,exports.PieChart=re.PieChart,exports.HorizontalGraph=te.HorizontalGraph,exports.StackedBarChart=oe.StackedBarChart,exports.VerticalGraph=ne.VerticalGraph,Object.defineProperty(exports,"HEAT",{enumerable:!0,get:function(){return ie.HEAT}}),exports.HEAT_COLORS=ie.HEAT_COLORS,Object.defineProperty(exports,"HEAT_GRADING_TYPE",{enumerable:!0,get:function(){return ie.HEAT_GRADING_TYPE}}),exports.HeatMap=ie.HeatMap,exports.VerticalBarAndLinearGraph=pe.VerticalBarAndLinearGraph,exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=se.AVATAR_SIZE_VS_ICON_SIZE_MAP,exports.Avatar=se.Avatar,exports.BACKGROUND_VS_TEXT_COLOR_MAP=se.BACKGROUND_VS_TEXT_COLOR_MAP,Object.defineProperty(exports,"AVATAR_BACKGROUND",{enumerable:!0,get:function(){return ae.AVATAR_BACKGROUND}}),exports.AVATAR_SIZE_MAP=ae.AVATAR_SIZE_MAP,Object.defineProperty(exports,"AVATAR_TYPES",{enumerable:!0,get:function(){return ae.AVATAR_TYPES}}),Object.defineProperty(exports,"SIZE",{enumerable:!0,get:function(){return ae.SIZE}}),exports.Alert=ue.Alert,Object.defineProperty(exports,"ALERT_TYPES",{enumerable:!0,get:function(){return ce.ALERT_TYPES}}),exports.COLOR_CONFIG_MAP=ce.COLOR_CONFIG_MAP,Object.defineProperty(exports,"CONTENT_POSITION",{enumerable:!0,get:function(){return ce.CONTENT_POSITION}}),Object.defineProperty(exports,"RATIO",{enumerable:!0,get:function(){return le.RATIO}}),exports.Thumbnail=le.Thumbnail,exports.Curtain=de.Curtain,exports.DatePicker=me.DatePicker,exports.Loader=Te.Loader,exports.Switch=Te.Switch,exports.SwitchContainer=Te.SwitchContainer,exports.Thumb=Te.Thumb,exports.SubscriptionPlan=xe.SubscriptionPlan,exports.BottomWrapper=Pe.BottomWrapper,exports.HeaderWrapper=Pe.HeaderWrapper,exports.SubscriptionPlanSelector=Pe.SubscriptionPlanSelector,exports.defaultTabs=Pe.defaultTabs,exports.NewSubscriptionPlan=Se.NewSubscriptionPlan,exports.SubscriptionPlansCollected=Ae.SubscriptionPlansCollected,exports.TabItemComponent=Oe.TabItemComponent,exports.Tabs=Oe.Tabs,exports.DynamicTabs=Ce.DynamicTabs,exports.BikShimmer=ye.BikShimmer,exports.TablePagination=Ee.TablePagination,exports.TablePaginationCard=be.TablePaginationCard,exports.TablePaginationCardStyled=be.TablePaginationCardStyled,exports.StateModalComponent=je.StateModalComponent,exports.DeleteConfirmationModal=Re.DeleteConfirmationModal,Object.defineProperty(exports,"ButtonActions",{enumerable:!0,get:function(){return he.ButtonActions}}),Object.defineProperty(exports,"ButtonTypes",{enumerable:!0,get:function(){return he.ButtonTypes}}),exports.StateComponent=he.StateComponent,Object.defineProperty(exports,"StateInterface",{enumerable:!0,get:function(){return he.StateInterface}}),exports.ShopifyScopeWrapper=_e.ShopifyScopeWrapper,exports.WhatsAppTextEditor=Ie.WhatsAppTextEditor,Object.defineProperty(exports,"EditorActionTypes",{enumerable:!0,get:function(){return Be.EditorActionTypes}}),exports.WhatsAppTextEditorHeader=Be.WhatsAppTextEditorHeader,exports.BaseWhatsappContentLangHelper=ge.BaseWhatsappContentLangHelper,exports.CURTAIN_COLOR_CONFIG_MAP=qe.CURTAIN_COLOR_CONFIG_MAP,Object.defineProperty(exports,"CURTAIN_MODE",{enumerable:!0,get:function(){return qe.CURTAIN_MODE}}),Object.defineProperty(exports,"CURTAIN_TYPES",{enumerable:!0,get:function(){return qe.CURTAIN_TYPES}}),exports.CardSelectionModal=fe.CardSelectionModal,exports.BikImageCropper=Ne.BikImageCropper,exports.BikImagePipeline=De.BikImagePipeline,exports.ButtonGroup=Me.ButtonGroup,exports.BikAccordion=ke.BikAccordion,exports.FileUploader=we.FileUploader,exports.ColourInput=Le.ColourInput,exports.BikHeader=Ge.BikHeader,exports.BikLayout=Ue.BikLayout,exports.BikProfile=Ve.BikProfile,exports.SimpleSidebar=ve.SimpleSidebar,exports.BikSidebar=Fe.BikSidebar,exports.FeatureModal=He.FeatureModal,exports.SidebarSkeleton=We.SidebarSkeleton,exports.ShowShopifyRestrictedModal=Ye.ShowShopifyRestrictedModal,exports.FeatureModalV2=Qe.FeatureModalV2,exports.SearchBar=Ke.SearchBar,exports.CustomDateTime=Ze.CustomDateTime,exports.PricePleaseProductPicker=Xe.PricePleaseProductPicker,exports.ProductPickerContent=Xe.ProductPickerContent,exports.DiscountModal=ze.DiscountModal,Object.defineProperty(exports,"COUPON_EXPIRATION",{enumerable:!0,get:function(){return Je.COUPON_EXPIRATION}}),exports.CouponExpiration=Je.CouponExpiration,Object.defineProperty(exports,"DISCOUNT_TARGET_SELECTION",{enumerable:!0,get:function(){return $e.DISCOUNT_TARGET_SELECTION}}),Object.defineProperty(exports,"DISCOUNT_TARGET_TYPES",{enumerable:!0,get:function(){return $e.DISCOUNT_TARGET_TYPES}}),Object.defineProperty(exports,"DISCOUNT_TYPES",{enumerable:!0,get:function(){return $e.DISCOUNT_TYPES}}),Object.defineProperty(exports,"DISCOUNT_VALUE_TYPES",{enumerable:!0,get:function(){return $e.DISCOUNT_VALUE_TYPES}}),Object.defineProperty(exports,"MIN_PURCHASE_REQUIREMENT",{enumerable:!0,get:function(){return $e.MIN_PURCHASE_REQUIREMENT}}),exports.CountryCodePicker=er.CountryCodePicker,exports.CountriesData=rr.CountriesData,exports.DEFAULT_IMAGE=tr.DEFAULT_IMAGE,exports.ShimmerImage=tr.ShimmerImage,exports.ProductPickerModal=or.ProductPickerModal,Object.defineProperty(exports,"ScreenName",{enumerable:!0,get:function(){return or.ScreenName}}),exports.Carousel=nr.Carousel,exports.CarouselSecondary=ir.CarouselSecondary,exports.AccessTokenTroubleshootDialog=pr.AccessTokenTroubleshootDialog,exports.RadioList=sr.RadioList,exports.CheckList=ar.CheckList,Object.defineProperty(exports,"DateKeys",{enumerable:!0,get:function(){return ur.DateKeys}}),Object.defineProperty(exports,"MEDIA_TYPES",{enumerable:!0,get:function(){return ur.MEDIA_TYPES}}),exports.PostPicker=ur.PostPicker,exports.dateOptions=ur.dateOptions,exports.DropdownButton=cr.DropdownButton,exports.SideModal=lr.SideModal,exports.KeywordsInput=dr.KeywordsInput,exports.AddVariableV2SideModal=mr.AddVariableV2SideModal,exports.AddVariableV2=Tr.AddVariableV2,exports.NaLinkWrapper=xr.NaLinkWrapper,exports.NavigationHyperlink=xr.NavigationHyperlink,exports.SearchFilter=Pr.SearchFilter,exports.InputWithVariables=Sr.InputWithVariables,exports.DashboardReviewPopUp=Ar.DashboardReviewPopUp,exports.StarRating=Or.StarRating,exports.TestimonialCard=Cr.TestimonialCard,exports.BikSlider=yr.BikSlider,exports.CarouselPreview=Er.CarouselPreview;
@@ -1,3 +1,5 @@
1
+ .buttonBack___1mlaL,.buttonFirst___2rhFr,.buttonLast___2yuh0,.buttonNext___2mOCa,.buttonNext___3Lm3s,.dot___3c3SI{cursor:pointer}.image___xtQGH{display:block;width:100%;height:100%}.spinner___27VUp{position:absolute;top:calc(50% - 15px);left:calc(50% - 15px);width:30px;height:30px;animation-name:spin___S3UuE;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;border:4px solid #a9a9a9;border-top-color:#000;border-radius:30px}@keyframes spin___S3UuE{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.container___2O72F{position:relative;overflow:hidden;height:100%;width:100%}.overlay___IV4qY{position:absolute;top:0;left:0;bottom:0;right:0;opacity:0;cursor:zoom-in;transition:opacity .3s,transform .3s}.hover___MYy31,.loading___1pvNI,.zoom___3kqYk{opacity:1}.imageLoadingSpinnerContainer___3UIPD{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#f4f4f4}.slide___3-Nqo{position:relative;display:block;box-sizing:border-box;height:0;margin:0;list-style-type:none}.slide___3-Nqo:focus{outline:none!important}.slideHorizontal___1NzNV{float:left}[dir=rtl] .slideHorizontal___1NzNV{direction:rtl;transform:scaleX(-1)}.slideInner___2mfX9{position:absolute;top:0;left:0;width:100%;height:100%}.focusRing___1airF{position:absolute;top:5px;right:5px;bottom:5px;left:5px;pointer-events:none;outline-width:5px;outline-style:solid;outline-color:Highlight}@media (-webkit-min-device-pixel-ratio:0){.focusRing___1airF{outline-style:auto;outline-color:-webkit-focus-ring-color}}.horizontalSlider___281Ls{position:relative;overflow:hidden;touch-action:pan-y pinch-zoom}[dir=rtl] .horizontalSlider___281Ls{direction:ltr;transform:scaleX(-1)}.horizontalSliderTray___1L-0W{overflow:hidden;width:100%}.verticalSlider___34ZFD{position:relative;overflow:hidden}.verticalSliderTray___267D8{overflow:hidden}.verticalTray___12Key{float:left}.verticalSlideTrayWrap___2nO7o{overflow:hidden}.sliderTray___-vHFQ{display:block;list-style:none;padding:0;margin:0}.sliderAnimation___300FY{transition:transform .5s;transition-timing-function:cubic-bezier(.645,.045,.355,1);will-change:transform}.masterSpinnerContainer___1Z6hB{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#f4f4f4}
2
+ /*# sourceMappingURL=react-carousel.es.css.map */
1
3
  .ReactCrop{position:relative;display:inline-block;cursor:crosshair;overflow:hidden;max-width:100%}.ReactCrop *,.ReactCrop *:before,.ReactCrop *:after{box-sizing:border-box}.ReactCrop--disabled,.ReactCrop--locked{cursor:inherit}.ReactCrop__child-wrapper{max-height:inherit}.ReactCrop__child-wrapper>img,.ReactCrop__child-wrapper>video{display:block;max-width:100%;max-height:inherit}.ReactCrop:not(.ReactCrop--disabled) .ReactCrop__child-wrapper>img,.ReactCrop:not(.ReactCrop--disabled) .ReactCrop__child-wrapper>video{touch-action:none}.ReactCrop:not(.ReactCrop--disabled) .ReactCrop__crop-selection{touch-action:none}.ReactCrop__crop-selection{position:absolute;top:0;left:0;transform:translateZ(0);cursor:move;box-shadow:0 0 0 9999em #00000080}.ReactCrop--disabled .ReactCrop__crop-selection{cursor:inherit}.ReactCrop--circular-crop .ReactCrop__crop-selection{border-radius:50%}.ReactCrop--no-animate .ReactCrop__crop-selection{outline:1px dashed white}.ReactCrop__crop-selection:not(.ReactCrop--no-animate .ReactCrop__crop-selection){animation:marching-ants 1s;background-image:linear-gradient(to right,#fff 50%,#444 50%),linear-gradient(to right,#fff 50%,#444 50%),linear-gradient(to bottom,#fff 50%,#444 50%),linear-gradient(to bottom,#fff 50%,#444 50%);background-size:10px 1px,10px 1px,1px 10px,1px 10px;background-position:0 0,0 100%,0 0,100% 0;background-repeat:repeat-x,repeat-x,repeat-y,repeat-y;color:#fff;animation-play-state:running;animation-timing-function:linear;animation-iteration-count:infinite}@keyframes marching-ants{0%{background-position:0 0,0 100%,0 0,100% 0}to{background-position:20px 0,-20px 100%,0 -20px,100% 20px}}.ReactCrop__crop-selection:focus{outline:none;border-color:#00f;border-style:solid}.ReactCrop--invisible-crop .ReactCrop__crop-selection{display:none}.ReactCrop__rule-of-thirds-vt:before,.ReactCrop__rule-of-thirds-vt:after,.ReactCrop__rule-of-thirds-hz:before,.ReactCrop__rule-of-thirds-hz:after{content:"";display:block;position:absolute;background-color:#fff6}.ReactCrop__rule-of-thirds-vt:before,.ReactCrop__rule-of-thirds-vt:after{width:1px;height:100%}.ReactCrop__rule-of-thirds-vt:before{left:33.3333%;left:33.3333333333%}.ReactCrop__rule-of-thirds-vt:after{left:66.6666%;left:66.6666666667%}.ReactCrop__rule-of-thirds-hz:before,.ReactCrop__rule-of-thirds-hz:after{width:100%;height:1px}.ReactCrop__rule-of-thirds-hz:before{top:33.3333%;top:33.3333333333%}.ReactCrop__rule-of-thirds-hz:after{top:66.6666%;top:66.6666666667%}.ReactCrop__drag-handle{position:absolute}.ReactCrop__drag-handle:after{position:absolute;content:"";display:block;width:10px;height:10px;background-color:#0003;border:1px solid rgba(255,255,255,.7);outline:1px solid transparent}.ReactCrop__drag-handle:focus:after{border-color:#00f;background:#2dbfff}.ReactCrop .ord-nw{top:0;left:0;margin-top:-5px;margin-left:-5px;cursor:nw-resize}.ReactCrop .ord-nw:after{top:0;left:0}.ReactCrop .ord-n{top:0;left:50%;margin-top:-5px;margin-left:-5px;cursor:n-resize}.ReactCrop .ord-n:after{top:0}.ReactCrop .ord-ne{top:0;right:0;margin-top:-5px;margin-right:-5px;cursor:ne-resize}.ReactCrop .ord-ne:after{top:0;right:0}.ReactCrop .ord-e{top:50%;right:0;margin-top:-5px;margin-right:-5px;cursor:e-resize}.ReactCrop .ord-e:after{right:0}.ReactCrop .ord-se{bottom:0;right:0;margin-bottom:-5px;margin-right:-5px;cursor:se-resize}.ReactCrop .ord-se:after{bottom:0;right:0}.ReactCrop .ord-s{bottom:0;left:50%;margin-bottom:-5px;margin-left:-5px;cursor:s-resize}.ReactCrop .ord-s:after{bottom:0}.ReactCrop .ord-sw{bottom:0;left:0;margin-bottom:-5px;margin-left:-5px;cursor:sw-resize}.ReactCrop .ord-sw:after{bottom:0;left:0}.ReactCrop .ord-w{top:50%;left:0;margin-top:-5px;margin-left:-5px;cursor:w-resize}.ReactCrop .ord-w:after{left:0}.ReactCrop__disabled .ReactCrop__drag-handle{cursor:inherit}.ReactCrop__drag-bar{position:absolute}.ReactCrop__drag-bar.ord-n{top:0;left:0;width:100%;height:6px;margin-top:-3px}.ReactCrop__drag-bar.ord-e{right:0;top:0;width:6px;height:100%;margin-right:-3px}.ReactCrop__drag-bar.ord-s{bottom:0;left:0;width:100%;height:6px;margin-bottom:-3px}.ReactCrop__drag-bar.ord-w{top:0;left:0;width:6px;height:100%;margin-left:-3px}.ReactCrop--new-crop .ReactCrop__drag-bar,.ReactCrop--new-crop .ReactCrop__drag-handle,.ReactCrop--fixed-aspect .ReactCrop__drag-bar,.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-n,.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-e,.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-s,.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-w{display:none}@media (pointer: coarse){.ReactCrop .ord-n,.ReactCrop .ord-e,.ReactCrop .ord-s,.ReactCrop .ord-w{display:none}.ReactCrop__drag-handle{width:24px;height:24px}}
2
4
 
3
5
  @charset "UTF-8";/*!
@@ -1,4 +1,4 @@
1
- import { SVGProps } from "react";
1
+ import { SVGProps } from 'react';
2
2
  export type Icon = React.FC<SVGProps<SVGSVGElement> & {
3
3
  color?: string;
4
4
  width?: string | number;
@@ -0,0 +1 @@
1
+ import*as e from"react";var a;function t(){return t=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},t.apply(this,arguments)}var r=r=>e.createElement("svg",t({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"},r),a||(a=e.createElement("path",{fill:"#1877F2",fillRule:"evenodd",d:"M8.137 3.676a.75.75 0 0 0-.817.163l-5.25 5.25a.75.75 0 0 0 0 1.06l5.25 5.25a.75.75 0 0 0 1.28-.53v-2.307c3.146.15 5.305 1.274 6.89 3.493a.75.75 0 0 0 1.346-.583c-.393-1.963-1.186-3.97-2.609-5.597-1.321-1.51-3.157-2.656-5.627-3.14V4.37a.75.75 0 0 0-.463-.693ZM7.1 6.18v1.19c0 .372.275.689.644.742 2.452.35 4.163 1.39 5.354 2.751.528.603.96 1.277 1.31 1.994-1.754-1.239-3.917-1.813-6.558-1.813a.75.75 0 0 0-.75.75v1.264L3.661 9.62l3.44-3.44Z",clipRule:"evenodd"})));export{r as default};
@@ -1 +1 @@
1
- import{__rest as t}from"../../_virtual/_tslib.js";import{jsxs as n,jsx as e,Fragment as r}from"react/jsx-runtime";import{BaseWhatsappContentLangHelper as l}from"../../helpers/BaseWhatsappContentLang.helper.js";import o,{useRef as i,useImperativeHandle as u,useEffect as c}from"react";import{COLORS as s}from"../../constants/Theme.js";import{BodyCaption as a}from"../TypographyStyle.js";import{OuterContainer as d,Container as v,TextSpace as m}from"./CustomEditor.styled.js";import{EditorActionTypes as h,WhatsAppTextEditorHeader as f}from"./WhatsAppTextEditorHeader.js";const p="Character limit reached",g=new l,x={[h.BOLD]:"*",[h.ITALIC]:"_",[h.STRIKETHROUGH]:"~"},T=o.forwardRef(((l,o)=>{var h,T,{onChange:j,text:C,RightComponent:E,error:y,limit:H,onError:L,rows:O,actions:S}=l,w=t(l,["onChange","text","RightComponent","error","limit","onError","rows","actions"]);const R=i(null);function b(t){const n=null==R?void 0:R.current;null!=n&&(n.selectionStart?(n.focus(),n.selectionEnd=t):n.focus())}function W(t){var n,e;let r=null!==(e=null===(n=R.current)||void 0===n?void 0:n.value)&&void 0!==e?e:"";if(R.current&&t){const n=R.current.selectionStart,e=R.current.selectionEnd,l=t;if(n===e)return A(l);{r=g.wrappWildcard(n,e,l,r);const t=g.getHTML(r);return R.current.value=r,{text:r,html:t}}}return{text:r,html:r}}function A(t){var n,e;let r=null!==(e=null===(n=R.current)||void 0===n?void 0:n.value)&&void 0!==e?e:"";if(R.current&&t){const n=R.current.selectionStart;if(n===R.current.selectionEnd)return M(t,n)}return{text:r,html:r}}function M(t,n){var e,r;let l=null!==(r=null===(e=R.current)||void 0===e?void 0:e.value)&&void 0!==r?r:"";l=l.slice(0,n)+t+l.slice(n);const o=g.getHTML(l);return R.current.value=l,{text:l,html:o}}return u(o,(()=>({addTextOrWrap:W,addText:A,get(){var t,n;return null!==(n=null===(t=R.current)||void 0===t?void 0:t.value)&&void 0!==n?n:""},setCaretPosition:b}))),c((()=>{if((null==R?void 0:R.current)&&C){R.current.value=C;const t=g.getHTML(C);null==j||j(C,t)}}),[]),c((()=>{var t,n;(null===(t=null==R?void 0:R.current)||void 0===t?void 0:t.value)&&H&&((null===(n=null==R?void 0:R.current)||void 0===n?void 0:n.value.length)>H?null==L||L(p):null==L||L(null!=y?y:""))}),[null===(h=null==R?void 0:R.current)||void 0===h?void 0:h.value.length]),n(d,{children:[n(v,Object.assign({isError:!!y},{children:[e(f,{actions:S,ref:R,onActionSelect:function(t){if((null==x?void 0:x[t])&&R.current){const n=R.current.selectionStart;if(n===R.current.selectionEnd){M(null==x?void 0:x[t],n);const{text:e,html:r}=M(null==x?void 0:x[t],n);b(n+1),null==j||j(e,r)}else{const{text:n,html:e}=W(null==x?void 0:x[t]);null==j||j(n,e)}}},RightComponent:E,onEmojiClick:function(t){const{text:n,html:e}=A(t);null==j||j(n,e)}}),e(m,Object.assign({ref:R,onChange:function(t){const n=t.target.value,e=g.getHTML(n);null==j||j(n,e)}},w,{rows:O}))]})),y&&y!==p?e(a,Object.assign({style:{color:s.content.negative}},{children:y})):e(r,{children:H&&(null==R?void 0:R.current)?n(a,Object.assign({style:{color:y===p||(null===(T=null==R?void 0:R.current)||void 0===T?void 0:T.value.length)>H?s.content.negative:s.content.secondary}},{children:[R.current.value.length,"/",H]})):e(r,{})})]})}));T.displayName="WhatsAppTextEditor";export{T as WhatsAppTextEditor};
1
+ import{__rest as t}from"../../_virtual/_tslib.js";import{jsxs as n,jsx as e,Fragment as r}from"react/jsx-runtime";import{BaseWhatsappContentLangHelper as l}from"../../helpers/BaseWhatsappContentLang.helper.js";import o,{useRef as i,useImperativeHandle as u,useEffect as c}from"react";import{COLORS as s}from"../../constants/Theme.js";import{BodyCaption as a}from"../TypographyStyle.js";import{OuterContainer as d,Container as v,TextSpace as m}from"./CustomEditor.styled.js";import{EditorActionTypes as h,WhatsAppTextEditorHeader as f}from"./WhatsAppTextEditorHeader.js";const p="Character limit reached",g=new l,x={[h.BOLD]:"*",[h.ITALIC]:"_",[h.STRIKETHROUGH]:"~"},T=o.forwardRef(((l,o)=>{var h,T,{onChange:j,text:C,RightComponent:E,error:y,limit:H,onError:L,rows:O,actions:S}=l,w=t(l,["onChange","text","RightComponent","error","limit","onError","rows","actions"]);const R=i(null);function b(t){const n=null==R?void 0:R.current;null!=n&&(n.selectionStart?(n.focus(),n.selectionEnd=t):n.focus())}function W(t){var n,e;let r=null!==(e=null===(n=R.current)||void 0===n?void 0:n.value)&&void 0!==e?e:"";if(R.current&&t){const n=R.current.selectionStart,e=R.current.selectionEnd,l=t;if(n===e)return A(l);{r=g.wrappWildcard(n,e,l,r);const t=g.getHTML(r);return R.current.value=r,{text:r,html:t}}}return{text:r,html:r}}function A(t){var n,e;let r=null!==(e=null===(n=R.current)||void 0===n?void 0:n.value)&&void 0!==e?e:"";if(R.current&&t){const n=R.current.selectionStart;if(n===R.current.selectionEnd)return M(t,n)}return{text:r,html:r}}function M(t,n){var e,r;let l=null!==(r=null===(e=R.current)||void 0===e?void 0:e.value)&&void 0!==r?r:"";l=l.slice(0,n)+t+l.slice(n);const o=g.getHTML(l);return R.current.value=l,{text:l,html:o}}return u(o,(()=>({addTextOrWrap:W,addText:A,get(){var t,n;return null!==(n=null===(t=R.current)||void 0===t?void 0:t.value)&&void 0!==n?n:""},setCaretPosition:b}))),c((()=>{if(null==R?void 0:R.current){R.current.value=C||"";const t=g.getHTML(C||"");null==j||j(C||"",t)}}),[C]),c((()=>{var t,n;(null===(t=null==R?void 0:R.current)||void 0===t?void 0:t.value)&&H&&((null===(n=null==R?void 0:R.current)||void 0===n?void 0:n.value.length)>H?null==L||L(p):null==L||L(null!=y?y:""))}),[null===(h=null==R?void 0:R.current)||void 0===h?void 0:h.value.length]),n(d,{children:[n(v,Object.assign({isError:!!y},{children:[e(f,{actions:S,ref:R,onActionSelect:function(t){if((null==x?void 0:x[t])&&R.current){const n=R.current.selectionStart;if(n===R.current.selectionEnd){M(null==x?void 0:x[t],n);const{text:e,html:r}=M(null==x?void 0:x[t],n);b(n+1),null==j||j(e,r)}else{const{text:n,html:e}=W(null==x?void 0:x[t]);null==j||j(n,e)}}},RightComponent:E,onEmojiClick:function(t){const{text:n,html:e}=A(t);null==j||j(n,e)}}),e(m,Object.assign({ref:R,onChange:function(t){const n=t.target.value,e=g.getHTML(n);null==j||j(n,e)}},w,{rows:O}))]})),y&&y!==p?e(a,Object.assign({style:{color:s.content.negative}},{children:y})):e(r,{children:H&&(null==R?void 0:R.current)?n(a,Object.assign({style:{color:y===p||(null===(T=null==R?void 0:R.current)||void 0===T?void 0:T.value.length)>H?s.content.negative:s.content.secondary}},{children:[R.current.value.length,"/",H]})):e(r,{})})]})}));T.displayName="WhatsAppTextEditor";export{T as WhatsAppTextEditor};
@@ -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{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+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDYXJkID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gX2pzeChDYXJ0U3R5bGVkLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgcGFkZGluZzogMjQgfSB9LCB7IGNoaWxkcmVuOiBwcm9wcy5jaGlsZHJlbiB9KSk7XHJcbn07XHJcbmV4cG9ydCBjb25zdCBQaWVDaGFydEFuYWx5dGljcyA9ICh7IHRpdGxlLCBzbGljZXMsIHNpemUsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzbGljZXNXaXRoQ29sb3IsIHNldFNsaWNlc1dpdGhDb2xvcl0gPSB1c2VTdGF0ZShbXSk7XHJcbiAgICBjb25zdCBbZGF0YSwgc2V0RGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcclxuICAgICAgICBjb25zdCB0b3RhbFN1bSA9IHNsaWNlcy5yZWR1Y2UoKHN1bSwgc2xpY2UpID0+IHN1bSArIHNsaWNlLmNvdW50LCAwKTtcclxuICAgICAgICBsZXQgdXBkYXRlZFNsaWNlc1dpdGhDb2xvciA9IFtdO1xyXG4gICAgICAgIHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBPYmplY3Qua2V5cyhzbGljZXMpLm1hcCgoa2V5LCBpbmRleCkgPT4gKE9iamVjdC5hc3NpZ24oeyBjb2xvcjogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF0gfSwgc2xpY2VzW2tleV0pKSk7XHJcbiAgICAgICAgc2V0U2xpY2VzV2l0aENvbG9yKFsuLi51cGRhdGVkU2xpY2VzV2l0aENvbG9yXSk7XHJcbiAgICAgICAgaWYgKHRvdGFsU3VtID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+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 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+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDYXJkID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gX2pzeChDYXJ0U3R5bGVkLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgcGFkZGluZzogMjQgfSB9LCB7IGNoaWxkcmVuOiBwcm9wcy5jaGlsZHJlbiB9KSk7XHJcbn07XHJcbmV4cG9ydCBjb25zdCBQaWVDaGFydEFuYWx5dGljcyA9ICh7IHRpdGxlLCBzbGljZXMsIHNpemUsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzbGljZXNXaXRoQ29sb3IsIHNldFNsaWNlc1dpdGhDb2xvcl0gPSB1c2VTdGF0ZShbXSk7XHJcbiAgICBjb25zdCBbZGF0YSwgc2V0RGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcclxuICAgICAgICBjb25zdCB0b3RhbFN1bSA9IHNsaWNlcy5yZWR1Y2UoKHN1bSwgc2xpY2UpID0+IHN1bSArIHNsaWNlLmNvdW50LCAwKTtcclxuICAgICAgICBsZXQgdXBkYXRlZFNsaWNlc1dpdGhDb2xvciA9IFtdO1xyXG4gICAgICAgIHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBPYmplY3Qua2V5cyhzbGljZXMpLm1hcCgoa2V5LCBpbmRleCkgPT4gKE9iamVjdC5hc3NpZ24oeyBjb2xvcjogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF0gfSwgc2xpY2VzW2tleV0pKSk7XHJcbiAgICAgICAgc2V0U2xpY2VzV2l0aENvbG9yKFsuLi51cGRhdGVkU2xpY2VzV2l0aENvbG9yXSk7XHJcbiAgICAgICAgaWYgKHRvdGFsU3VtID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+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};
@@ -0,0 +1,12 @@
1
+ import 'pure-react-carousel/dist/react-carousel.es.css';
2
+ import React from 'react';
3
+ import { CHANNEL_TYPE } from "../template-preview/models/Channels";
4
+ import { EmailTemplateType } from "../template-preview/models/EmailTemplate";
5
+ import { SMSTemplateType } from "../template-preview/models/SmsTemplate";
6
+ import { WhatsAppCarouselTemplate } from "../template-preview/models/WhatsappCarouselTemplate";
7
+ import { WhatsAppTemplate } from "../template-preview/models/WhatsAppTemplate";
8
+ export declare const CarouselPreview: React.ForwardRefExoticComponent<{
9
+ channel: CHANNEL_TYPE;
10
+ template: WhatsAppTemplate | EmailTemplateType | SMSTemplateType | WhatsAppCarouselTemplate | null;
11
+ showSampleValues?: boolean | undefined;
12
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,52 @@
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 l,ButtonNext as d}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:x}=s;var f,v,w,y;const j=null===(f=null==g?void 0:g.components)||void 0===f?void 0:f[1].cards;return e(m,{children:[o(p,{channel:u,template:g,carouselCardIndex:-1}),!!(null==j?void 0:j.length)&&o(r,Object.assign({naturalSlideWidth:100,naturalSlideHeight:125,totalSlides:null!==(v=null==j?void 0:j.length)&&void 0!==v?v: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===(y=null===(w=null==g?void 0:g.components)||void 0===w?void 0:w[1].cards)||void 0===y?void 0:y.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(l,Object.assign({index:t},{children:o(p,{channel:u,template:n,carouselCardIndex:t},t)}),t)}))})),o(d,Object.assign({className:"right_button"},{children:o(i,{height:10,width:10,color:h.content.primary})}))]})}))]})}));export{u as CarouselPreview};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { CHANNEL_TYPE } from "../template-preview/models/Channels";
3
+ declare const CarouselPreviewCard: React.ForwardRefExoticComponent<{
4
+ channel: CHANNEL_TYPE;
5
+ template: any;
6
+ showSampleValues?: boolean | undefined;
7
+ carouselCardIndex?: number | undefined;
8
+ } & React.RefAttributes<HTMLDivElement>>;
9
+ export default CarouselPreviewCard;
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import t from"react";import{TemplatePreview as a}from"../template-preview/TemplatePreview.js";import"../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import"../../constants/Theme.js";import"../curtain/CurtainHelper.js";import"../template-preview/models/TemplateMeta.js";import"../template-preview/models/WhatsAppTemplate.js";const p=t.forwardRef((t=>{let{channel:p,template:r,showSampleValues:s,carouselCardIndex:i}=t;return e("div",Object.assign({style:{width:350}},{children:e(a,{showSampleValues:s,template:r,channel:p,size:"small",hideHeader:!0,carouselCardIndex:i,isWhatsappCarousel:!0})}))}));export{p as default};
@@ -0,0 +1 @@
1
+ export * from './CarouselPreview';
@@ -1,21 +1,23 @@
1
+ import 'pure-react-carousel/dist/react-carousel.es.css';
1
2
  import { VariableListInterfaceV2 } from "../add-variableV2/AddVariableV2";
3
+ import { WhatsAppCarouselTemplate, WhatsAppCarouselTemplateVariables } from "../template-preview/models/WhatsappCarouselTemplate";
2
4
  import { CHANNEL_TYPE } from '../template-preview/models/Channels';
3
5
  import { EmailTemplateType } from '../template-preview/models/EmailTemplate';
4
6
  import { SMSTemplateType } from '../template-preview/models/SmsTemplate';
5
7
  import { CUSTOM_VARIABLE, GlobalPlaceholderType } from '../template-preview/models/TemplateMeta';
6
8
  import { ExtrasWhatsapp, POD, WhatsAppPickerMeta, WhatsAppTemplate, WhatsAppTemplateVariables } from '../template-preview/models/WhatsAppTemplate';
7
9
  export interface TemplateContextMapperProps {
8
- selectedTemplate: WhatsAppTemplate | EmailTemplateType | SMSTemplateType;
10
+ selectedTemplate: WhatsAppTemplate | EmailTemplateType | SMSTemplateType | WhatsAppCarouselTemplate;
9
11
  closeDialog?: () => void;
10
12
  showVariableMapping: boolean;
11
13
  channel: CHANNEL_TYPE;
12
14
  globalPlaceholders: GlobalPlaceholderType;
13
15
  /** List of variables being used in this template */
14
- templateVariables: CUSTOM_VARIABLE[] | WhatsAppTemplateVariables;
16
+ templateVariables: CUSTOM_VARIABLE[] | WhatsAppTemplateVariables | WhatsAppCarouselTemplateVariables;
15
17
  /** Only for initial-UI-purpose for the modal */
16
18
  htmlContent: string;
17
19
  showOnlyContent?: boolean;
18
- onTemplateSelect?(template: EmailTemplateType | SMSTemplateType | WhatsAppTemplate, variables: CUSTOM_VARIABLE[] | WhatsAppTemplateVariables, display_content?: string): string | void;
20
+ onTemplateSelect?(template: EmailTemplateType | SMSTemplateType | WhatsAppTemplate | WhatsAppCarouselTemplate, variables: CUSTOM_VARIABLE[] | WhatsAppTemplateVariables | WhatsAppCarouselTemplateVariables, display_content?: string): string | void;
19
21
  whatsappSpecificPickerMeta?: WhatsAppPickerMeta;
20
22
  zIndex?: number;
21
23
  showVariableModal?: boolean;
@@ -29,5 +31,12 @@ export interface TemplateContextMapperProps {
29
31
  disableEditVariable?: boolean;
30
32
  pod?: POD;
31
33
  extras?: ExtrasWhatsapp;
34
+ pickerConf?: {
35
+ searchInCollection: any;
36
+ searchProducts: any;
37
+ fetchCollections: any;
38
+ fetchProducts: any;
39
+ storeId: string;
40
+ };
32
41
  }
33
- export declare const TemplateContextMapper: ({ selectedTemplate, closeDialog, showVariableMapping, channel, htmlContent, templateVariables, onTemplateSelect, globalPlaceholders, showOnlyContent, whatsappSpecificPickerMeta, zIndex, showVariableModal, variableList, discountCode, setDiscountCode, onBackPress, enabledCustomText, variableListForImage, showSampleValues, disableEditVariable, pod, extras, }: TemplateContextMapperProps) => import("react/jsx-runtime").JSX.Element;
42
+ export declare const TemplateContextMapper: ({ selectedTemplate, closeDialog, showVariableMapping, channel, htmlContent, templateVariables, onTemplateSelect, globalPlaceholders, showOnlyContent, whatsappSpecificPickerMeta, zIndex, showVariableModal, variableList, discountCode, setDiscountCode, onBackPress, enabledCustomText, variableListForImage, showSampleValues, disableEditVariable, pod, extras, pickerConf, }: TemplateContextMapperProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t,Fragment as l}from"react/jsx-runtime";import{useEffect as o,useState as a,useMemo as i}from"react";import r from"../../utils/StringUtils.js";import{StyledModal as s}from"../modals/styledModal.js";import{CHANNEL_TYPE as n}from"../template-preview/models/Channels.js";import{TemplateModalContext as d}from"./context/templateModalContext.js";import c from"./modalElements/Footer.js";import m from"./modalElements/TemplateSelectModalContent.js";import{convertPlaceholdersToBikDropdown as p}from"./utils/convertPlaceholdersToBikDropdown.js";const u=u=>{let{selectedTemplate:h,closeDialog:b,showVariableMapping:g,channel:v,htmlContent:C,templateVariables:S,onTemplateSelect:f,globalPlaceholders:w,showOnlyContent:M,whatsappSpecificPickerMeta:T,zIndex:V,showVariableModal:j,variableList:x,discountCode:L,setDiscountCode:P,onBackPress:E,enabledCustomText:I,variableListForImage:y,showSampleValues:k,disableEditVariable:D,pod:A,extras:O}=u;var F,z;o((()=>{N(C)}),[C]);const[B,H]=a(v===n.EMAIL?"desktop":"mobile"),[$,N]=a(C),[U,W]=a(!1),[_,q]=a(h),[G,J]=a(null!=S?S:[]),[K,Q]=a(!1);const R=i((()=>p(w)),[w]);return e(d.Provider,Object.assign({value:{template:_,setTemplate:q,device:B,setDevice:H,display_content:$,setDisplayContent:N,originalVariableList:G,setOriginalVariableList:J,isError:U,setIsError:W,channel:v,globalNormalizedPlaceholders:R,templateSelectionTriggered:K,setTemplateSelectionTriggered:Q,enabledCustomText:I,disableEditVariable:D,pod:A,extras:O}},{children:M?e(m,{channel:n.EMAIL,hideHeader:!0}):t(s,Object.assign({zIndex:V,centralContainerStyles:{width:v===n.EMAIL&&g?1e3:800},open:!0,onClose:()=>{null==b||b()},headingTitle:null==_?void 0:_.label,headingSubtitle:v===n.WHATSAPP?`${r.capitaliseFirstLetterOfString(null!==(F=null==_?void 0:_.category)&&void 0!==F?F:"")} • ${null!==(z=null==_?void 0:_.templateCategory)&&void 0!==z?z:""}`:"",onBackPress:()=>{null==E||E()}},{children:[e(m,{showSampleValues:k,showVariableMapping:g,channel:v,whatsappSpecificPickerMeta:T,showVariableModal:j,variableList:x,discountCode:L,setDiscountCode:P,variableListForImage:y&&(null==y?void 0:y.length)>0?y:x}),f?e(c,{onSelect:function(){const e=null==f?void 0:f(_,G,null!=$?$:"");e?W(!!e):Q(!0)}}):e(l,{})]}))}))};export{u as TemplateContextMapper};
1
+ import{jsx as e,jsxs as l,Fragment as t}from"react/jsx-runtime";import{useEffect as o,useState as a,useMemo as i}from"react";import s from"../../utils/StringUtils.js";import{StyledModal as n}from"../modals/styledModal.js";import{CHANNEL_TYPE as r}from"../template-preview/models/Channels.js";import{TemplateModalContext as d}from"./context/templateModalContext.js";import c from"./modalElements/Footer.js";import p from"./modalElements/TemplateSelectModalContent.js";import{convertPlaceholdersToBikDropdown as m}from"./utils/convertPlaceholdersToBikDropdown.js";const u=u=>{let{selectedTemplate:h,closeDialog:v,showVariableMapping:C,channel:b,htmlContent:g,templateVariables:S,onTemplateSelect:f,globalPlaceholders:T,showOnlyContent:P,whatsappSpecificPickerMeta:w,zIndex:x,showVariableModal:M,variableList:L,discountCode:V,setDiscountCode:j,onBackPress:y,enabledCustomText:E,variableListForImage:I,showSampleValues:k,disableEditVariable:A,pod:D,extras:O,pickerConf:F}=u;var W,z,B,H,U,$;o((()=>{G(g)}),[g]);const N=b===r.WHATSAPP&&"CAROUSEL"===(null===(z=null===(W=h.components)||void 0===W?void 0:W[1])||void 0===z?void 0:z.type),[R,_]=a(b===r.EMAIL||N?"desktop":"mobile"),[q,G]=a(g),[J,K]=a(!1),[Q,X]=a(h),[Y,Z]=a(null!=S?S:[]),[ee,le]=a(!1),[te,oe]=a(-1);const ae=i((()=>m(T)),[T]);return e(d.Provider,Object.assign({value:{template:Q,setTemplate:X,device:R,setDevice:_,display_content:q,setDisplayContent:G,originalVariableList:Y,setOriginalVariableList:Z,isError:J,setIsError:K,channel:b,globalNormalizedPlaceholders:ae,templateSelectionTriggered:ee,setTemplateSelectionTriggered:le,enabledCustomText:E,disableEditVariable:A,pod:D,extras:O,isWhatsappCarousel:N,selectedCarouselIndex:te,setSelectedCarouselIndex:oe,isProductCarouselType:h.isProductCarouselType,cardCount:null===(H=null===(B=h.components)||void 0===B?void 0:B[1].cards)||void 0===H?void 0:H.length,pickerConf:F}},{children:P?e(p,{channel:r.EMAIL,hideHeader:!0}):l(n,Object.assign({zIndex:x,centralContainerStyles:{width:N?900:b===r.EMAIL&&C?1e3:800},open:!0,onClose:()=>{null==v||v()},headingTitle:null==Q?void 0:Q.label,headingSubtitle:b===r.WHATSAPP?`${s.capitaliseFirstLetterOfString(null!==(U=null==Q?void 0:Q.category)&&void 0!==U?U:"")} • ${null!==($=null==Q?void 0:Q.templateCategory)&&void 0!==$?$:""}`:"",onBackPress:()=>{null==y||y()}},{children:[e(p,{showSampleValues:k,showVariableMapping:C,channel:b,whatsappSpecificPickerMeta:w,showVariableModal:M,variableList:L,discountCode:V,setDiscountCode:j,variableListForImage:I&&(null==I?void 0:I.length)>0?I:L}),f?e(c,{isWhatsappCarousel:null!=N&&N,onSelect:function(){const e=null==f?void 0:f(Q,Y,null!=q?q:"");e?K(!!e):le(!0)}}):e(t,{})]}))}))};export{u as TemplateContextMapper};
@@ -3,6 +3,7 @@ import { CHANNEL_TYPE } from "../../template-preview/models/Channels";
3
3
  import { EmailTemplateType } from "../../template-preview/models/EmailTemplate";
4
4
  import { SMSTemplateType } from "../../template-preview/models/SmsTemplate";
5
5
  import { CUSTOM_VARIABLE, globalNormalizedPlaceholdersType } from "../../template-preview/models/TemplateMeta";
6
+ import { WhatsAppCarouselTemplate, WhatsAppCarouselTemplateVariables } from "../../template-preview/models/WhatsappCarouselTemplate";
6
7
  import { ExtrasWhatsapp, WhatsAppTemplate, WhatsAppTemplateVariables } from "../../template-preview/models/WhatsAppTemplate";
7
8
  export type DEVICE_TYPES = 'desktop' | 'mobile';
8
9
  export declare const TemplateModalContext: React.Context<{
@@ -10,12 +11,12 @@ export declare const TemplateModalContext: React.Context<{
10
11
  setDevice?: React.Dispatch<React.SetStateAction<DEVICE_TYPES>> | undefined;
11
12
  display_content: string | null;
12
13
  setDisplayContent?: React.Dispatch<React.SetStateAction<string | null>> | undefined;
13
- originalVariableList: CUSTOM_VARIABLE[] | WhatsAppTemplateVariables;
14
- setOriginalVariableList?: React.Dispatch<React.SetStateAction<WhatsAppTemplateVariables | CUSTOM_VARIABLE[]>> | undefined;
14
+ originalVariableList: CUSTOM_VARIABLE[] | WhatsAppTemplateVariables | WhatsAppCarouselTemplateVariables;
15
+ setOriginalVariableList?: React.Dispatch<React.SetStateAction<WhatsAppTemplateVariables | WhatsAppCarouselTemplateVariables | CUSTOM_VARIABLE[]>> | undefined;
15
16
  channel: CHANNEL_TYPE;
16
17
  setChannel?: React.Dispatch<React.SetStateAction<CHANNEL_TYPE>> | undefined;
17
- template: WhatsAppTemplate | EmailTemplateType | SMSTemplateType | null;
18
- setTemplate?: React.Dispatch<React.SetStateAction<WhatsAppTemplate | EmailTemplateType | SMSTemplateType | null>> | undefined;
18
+ template: WhatsAppTemplate | EmailTemplateType | SMSTemplateType | WhatsAppCarouselTemplate | null;
19
+ setTemplate?: React.Dispatch<React.SetStateAction<WhatsAppTemplate | EmailTemplateType | SMSTemplateType | WhatsAppCarouselTemplate | null>> | undefined;
19
20
  isError: boolean;
20
21
  setIsError?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
21
22
  globalNormalizedPlaceholders?: globalNormalizedPlaceholdersType[] | undefined;
@@ -25,18 +26,30 @@ export declare const TemplateModalContext: React.Context<{
25
26
  disableEditVariable?: boolean | undefined;
26
27
  pod?: string | undefined;
27
28
  extras?: ExtrasWhatsapp | undefined;
29
+ isWhatsappCarousel?: boolean | undefined;
30
+ selectedCarouselIndex?: number | undefined;
31
+ setSelectedCarouselIndex?: React.Dispatch<React.SetStateAction<number>> | undefined;
32
+ isProductCarouselType?: boolean | undefined;
33
+ cardCount?: number | undefined;
34
+ pickerConf?: {
35
+ searchInCollection: any;
36
+ searchProducts: any;
37
+ fetchCollections: any;
38
+ fetchProducts: any;
39
+ storeId: string;
40
+ } | undefined;
28
41
  }>;
29
42
  export declare const useTemplateModalContext: () => {
30
43
  device: DEVICE_TYPES;
31
44
  setDevice?: React.Dispatch<React.SetStateAction<DEVICE_TYPES>> | undefined;
32
45
  display_content: string | null;
33
46
  setDisplayContent?: React.Dispatch<React.SetStateAction<string | null>> | undefined;
34
- originalVariableList: CUSTOM_VARIABLE[] | WhatsAppTemplateVariables;
35
- setOriginalVariableList?: React.Dispatch<React.SetStateAction<WhatsAppTemplateVariables | CUSTOM_VARIABLE[]>> | undefined;
47
+ originalVariableList: CUSTOM_VARIABLE[] | WhatsAppTemplateVariables | WhatsAppCarouselTemplateVariables;
48
+ setOriginalVariableList?: React.Dispatch<React.SetStateAction<WhatsAppTemplateVariables | WhatsAppCarouselTemplateVariables | CUSTOM_VARIABLE[]>> | undefined;
36
49
  channel: CHANNEL_TYPE;
37
50
  setChannel?: React.Dispatch<React.SetStateAction<CHANNEL_TYPE>> | undefined;
38
- template: WhatsAppTemplate | EmailTemplateType | SMSTemplateType | null;
39
- setTemplate?: React.Dispatch<React.SetStateAction<WhatsAppTemplate | EmailTemplateType | SMSTemplateType | null>> | undefined;
51
+ template: WhatsAppTemplate | EmailTemplateType | SMSTemplateType | WhatsAppCarouselTemplate | null;
52
+ setTemplate?: React.Dispatch<React.SetStateAction<WhatsAppTemplate | EmailTemplateType | SMSTemplateType | WhatsAppCarouselTemplate | null>> | undefined;
40
53
  isError: boolean;
41
54
  setIsError?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
42
55
  globalNormalizedPlaceholders?: globalNormalizedPlaceholdersType[] | undefined;
@@ -46,4 +59,16 @@ export declare const useTemplateModalContext: () => {
46
59
  disableEditVariable?: boolean | undefined;
47
60
  pod?: string | undefined;
48
61
  extras?: ExtrasWhatsapp | undefined;
62
+ isWhatsappCarousel?: boolean | undefined;
63
+ selectedCarouselIndex?: number | undefined;
64
+ setSelectedCarouselIndex?: React.Dispatch<React.SetStateAction<number>> | undefined;
65
+ isProductCarouselType?: boolean | undefined;
66
+ cardCount?: number | undefined;
67
+ pickerConf?: {
68
+ searchInCollection: any;
69
+ searchProducts: any;
70
+ fetchCollections: any;
71
+ fetchProducts: any;
72
+ storeId: string;
73
+ } | undefined;
49
74
  };
@@ -1,17 +1,17 @@
1
- import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useRef as l}from"react";import n from"styled-components";import{CHANNEL_TYPE as i}from"../../template-preview/models/Channels.js";import{COLORS as a}from"../../../constants/Theme.js";import{useTemplateModalContext as r}from"../context/templateModalContext.js";import{getVariableNameForEmailByIndex as s}from"../utils/getVariableNameEmail.js";import{highlightFor as p}from"../utils/highlightFor.js";import d from"./DesktopPreview.js";import m from"./EditWhatsAppTemplateV2.js";import c from"./MobilePreview.js";import u from"./VariableConnectorsPanel.js";const h=n.div`
1
+ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useRef as a}from"react";import l from"styled-components";import{CarouselPreview as i}from"../../carousel-preview/CarouselPreview.js";import n from"./EditWhatsAppCarouselTemplateV2.js";import{CHANNEL_TYPE as s}from"../../template-preview/models/Channels.js";import{COLORS as r}from"../../../constants/Theme.js";import{useTemplateModalContext as p}from"../context/templateModalContext.js";import{getVariableNameForEmailByIndex as m}from"../utils/getVariableNameEmail.js";import{highlightFor as d}from"../utils/highlightFor.js";import c from"./DesktopPreview.js";import u from"./EditWhatsAppTemplateV2.js";import h from"./MobilePreview.js";import f from"./VariableConnectorsPanel.js";const v=l.div`
2
2
  display: flex;
3
3
  // height: 100%;
4
- `,f=n.div`
4
+ `,w=l.div`
5
5
  padding: 16px 14px;
6
6
  max-width: 450px;
7
7
 
8
- height: ${e=>e.channel===i.WHATSAPP?"500px":"475px"};
9
- overflow-y: 'auto';
8
+ height: ${e=>e.channel===s.WHATSAPP?"500px":"475px"};
9
+ overflow-y: auto;
10
10
  padding-bottom: 24px;
11
- border-left: ${a.stroke.primary} 1px solid;
12
- `,v=n.div`
13
- padding: ${e=>e.showOnlyContent?"16px 14px":"16px 32px"};
11
+ border-left: ${r.stroke.primary} 1px solid;
12
+ `,g=l.div`
13
+ padding: ${e=>e.isWhatsappCarousel?void 0:e.showOnlyContent?"16px 14px":"16px 32px"};
14
14
  flex: 1;
15
- height: 475px;
15
+ height: ${e=>e.isWhatsappCarousel?"500px":"475px"};
16
16
  overflow-y: auto;
17
- `,g=n=>{const{showVariableMapping:g,showOnlyContent:w,whatsappSpecificPickerMeta:b,showVariableModal:x,variableList:y,discountCode:C,setDiscountCode:j,variableListForImage:M,showSampleValues:V}=n,P=l(),E=l(),{device:S,display_content:T,channel:k,template:A,setTemplate:L}=r();const I=e=>{let t=0;for(;e;)t+=e.offsetTop,e=e.offsetParent;return t};return e(h,{children:[t(v,Object.assign({showOnlyContent:w,showVariableMapping:g},{children:"mobile"===S?t(c,{ref:E,display_content:null!=T?T:"",channel:k,template:A,showSampleValues:V}):k!==i.MESSAGE?t(d,{ref:P,channel:k,display_content:null!=T?T:"",showSampleValues:V}):t(o,{})})),g&&t(f,Object.assign({channel:k},{children:k!==i.WHATSAPP?t(u,{onFocus:k===i.EMAIL?function(e){var t,o,l;const n=null===document||void 0===document?void 0:document.getElementById("mobile"===S?"template_html_mobile":"template_html_desktop"),r=s(e+1),d=k===i.EMAIL?null===(t=null==n?void 0:n.contentWindow)||void 0===t?void 0:t.document.getElementById(r):document.getElementById(r),m=I(d),c=null==d?void 0:d.offsetLeft;"desktop"===S?m&&P.current&&(null===(o=null==n?void 0:n.contentWindow)||void 0===o||o.scrollTo(null!=c?c:0,m),p(r,a.background.warning.light,2,k,S)):m&&E.current&&(null===(l=null==n?void 0:n.contentWindow)||void 0===l||l.scrollTo(null!=c?c:0,m),p(r,a.background.warning.light,2,k,S))}:void 0,showVariableModal:x,variableList:y,discountCode:C,setDiscountCode:j}):t(m,{whatsappSpecificPickerMeta:b,template:A,onTemplateChange:e=>{null==L||L(e)},showVariableModal:x,variableList:y,variableListForImage:M,discountCode:C,setDiscountCode:j})}))]})};export{g as default};
17
+ `,b=l=>{const{showVariableMapping:b,showOnlyContent:C,whatsappSpecificPickerMeta:x,showVariableModal:P,variableList:j,discountCode:y,setDiscountCode:M,variableListForImage:V,showSampleValues:A}=l,S=a(),W=a(),{device:T,display_content:E,channel:L,template:k,setTemplate:I,isWhatsappCarousel:_}=p();const D=e=>{let t=0;for(;e;)t+=e.offsetTop,e=e.offsetParent;return t};return e(v,{children:[t(g,Object.assign({showOnlyContent:C,showVariableMapping:b,isWhatsappCarousel:_},{children:"mobile"===T?t(h,{ref:W,display_content:null!=E?E:"",channel:L,template:k,showSampleValues:A}):L===s.WHATSAPP&&_?t(i,{ref:S,channel:L,template:k,showSampleValues:A}):L!==s.MESSAGE?t(c,{ref:S,channel:L,display_content:null!=E?E:"",showSampleValues:A}):t(o,{})})),b&&t(w,Object.assign({channel:L},{children:L!==s.WHATSAPP?t(f,{onFocus:L===s.EMAIL?function(e){var t,o,a;const l=null===document||void 0===document?void 0:document.getElementById("mobile"===T?"template_html_mobile":"template_html_desktop"),i=m(e+1),n=L===s.EMAIL?null===(t=null==l?void 0:l.contentWindow)||void 0===t?void 0:t.document.getElementById(i):document.getElementById(i),p=D(n),c=null==n?void 0:n.offsetLeft;"desktop"===T?p&&S.current&&(null===(o=null==l?void 0:l.contentWindow)||void 0===o||o.scrollTo(null!=c?c:0,p),d(i,r.background.warning.light,2,L,T)):p&&W.current&&(null===(a=null==l?void 0:l.contentWindow)||void 0===a||a.scrollTo(null!=c?c:0,p),d(i,r.background.warning.light,2,L,T))}:void 0,showVariableModal:P,variableList:j,discountCode:y,setDiscountCode:M}):L===s.WHATSAPP&&_?t(n,{whatsappSpecificPickerMeta:x,template:k,showVariableModal:P,variableList:j,variableListForImage:V,discountCode:y,setDiscountCode:M}):t(u,{whatsappSpecificPickerMeta:x,template:k,onTemplateChange:e=>{null==I||I(e)},showVariableModal:P,variableList:j,variableListForImage:V,discountCode:y,setDiscountCode:M})}))]})};export{b as default};
@@ -0,0 +1,14 @@
1
+ import { VariableListInterfaceV2 } from "../../add-variableV2";
2
+ import { WhatsAppPickerMeta } from "../../template-preview";
3
+ import { WhatsAppCarouselTemplate } from "../../template-preview/models/WhatsappCarouselTemplate";
4
+ export interface EditWhatsAppCarouselTemplateV2Props {
5
+ whatsappSpecificPickerMeta?: WhatsAppPickerMeta;
6
+ template: WhatsAppCarouselTemplate;
7
+ showVariableModal?: boolean;
8
+ variableList?: VariableListInterfaceV2[];
9
+ variableListForImage?: VariableListInterfaceV2[];
10
+ discountCode?: string;
11
+ setDiscountCode?: (code: string) => void;
12
+ }
13
+ declare const EditWhatsAppCarouselTemplateV2: ({ template, whatsappSpecificPickerMeta, showVariableModal, variableList, variableListForImage, discountCode, setDiscountCode, }: EditWhatsAppCarouselTemplateV2Props) => import("react/jsx-runtime").JSX.Element;
14
+ export default EditWhatsAppCarouselTemplateV2;