@bikdotai/bik-component-library 0.0.384-beta.28 → 0.0.385
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
- package/dist/cjs/components/product-picker-v2/helpers/ProductHelper.d.ts +1 -13
- package/dist/cjs/components/product-picker-v2/helpers/ProductHelper.js +1 -1
- package/dist/cjs/components/product-picker-v2/modal.d.ts +2 -16
- package/dist/cjs/components/product-picker-v2/modal.js +1 -1
- package/dist/cjs/components/product-picker-v2/style.d.ts +0 -3
- package/dist/cjs/components/product-picker-v2/style.js +11 -43
- package/dist/cjs/constants/Theme.d.ts +19 -0
- package/dist/cjs/constants/Theme.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
- package/dist/esm/components/product-picker-v2/helpers/ProductHelper.d.ts +1 -13
- package/dist/esm/components/product-picker-v2/helpers/ProductHelper.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.d.ts +2 -16
- package/dist/esm/components/product-picker-v2/modal.js +1 -1
- package/dist/esm/components/product-picker-v2/style.d.ts +0 -3
- package/dist/esm/components/product-picker-v2/style.js +9 -41
- package/dist/esm/constants/Theme.d.ts +19 -0
- package/dist/esm/constants/Theme.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -2
- package/dist/cjs/assets/icons/drag_handle.svg.js +0 -1
- package/dist/cjs/components/product-picker-v2/rearrangeScreen.d.ts +0 -18
- package/dist/cjs/components/product-picker-v2/rearrangeScreen.js +0 -1
- package/dist/cjs/components/product-picker-v2/variant.d.ts +0 -32
- package/dist/cjs/components/product-picker-v2/variant.js +0 -1
- package/dist/cjs/components/product-picker-v2/variantComponents.d.ts +0 -21
- package/dist/cjs/components/product-picker-v2/variantComponents.js +0 -1
- package/dist/esm/assets/icons/drag_handle.svg.js +0 -1
- package/dist/esm/components/product-picker-v2/rearrangeScreen.d.ts +0 -18
- package/dist/esm/components/product-picker-v2/rearrangeScreen.js +0 -1
- package/dist/esm/components/product-picker-v2/variant.d.ts +0 -32
- package/dist/esm/components/product-picker-v2/variant.js +0 -1
- package/dist/esm/components/product-picker-v2/variantComponents.d.ts +0 -21
- package/dist/esm/components/product-picker-v2/variantComponents.js +0 -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"),y=require("./components/template-preview/helpers/VariableEditorHelper.js"),C=require("./components/template-preview/models/TemplateMeta.js"),O=require("./components/template-context-mapper/TemplateContextMapper.js"),b=require("./components/template-context-mapper/utils/getDataFromTemplateComponent.js"),E=require("./components/template-context-mapper/utils/validateIsUrl.js"),j=require("./components/fab-menu/FABMenu.js"),R=require("./components/floating-action-button/FloatingActionButton.js"),h=require("./components/floating-action-button/FloatingActionButton.styles.js"),B=require("./components/image-compress/ImageCompress.js"),_=require("./components/TypographyStyle.js"),g=require("./components/button/Button.js"),q=require("./components/progress-bar/ProgressBarComponent.js"),I=require("./components/QueryBuilder/QueryBuilder.js"),f=require("./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),D=require("./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js"),k=require("./components/QueryBuilder/redux/queryBuilder.reducer.js"),N=require("./components/QueryBuilder/redux/queryBuilderCache.reducer.js"),M=require("./components/QueryBuilder/types/QueryBuilderOperator.type.js"),w=require("./components/modals/styledModal.js"),L=require("./components/dropdown/DropdownPopover/index.js"),G=require("./components/dropdown/Dropdown.js"),V=require("./components/dropdown/ChipDropdown.js"),U=require("./components/dropdown/OpenedDropdown/components/OpennedDropdown.js"),v=require("./components/dropdown/MenuItem/MenuItem.js"),H=require("./components/analytics-card/AnalyticsCard.js"),F=require("./components/analytics-card/AnalyticsCard.styled.js"),W=require("./components/input/Input.js"),Y=require("./components/analytics-chips-and-dropdowns/AnalyticsChip.js"),Q=require("./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js"),K=require("./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js"),Z=require("./components/analytics-chips-and-dropdowns/AnalyticsMetric.js"),X=require("./components/analytics-chips-and-dropdowns/AnalyticsTrend.js"),z=require("./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),J=require("./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js"),$=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),ee=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),re=require("./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),te=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),oe=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),ne=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),ie=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),pe=require("./components/avatar/Avatar.js"),se=require("./components/avatar/AvatarHelper.js"),ae=require("./components/alerts/Alert.js"),ue=require("./components/alerts/AlertHelper.js"),ce=require("./components/thumbnail/Thumbnail.js"),le=require("./components/curtain/Curtain.js"),de=require("./components/datePicker/DatePicker.js"),me=require("./components/switch/Switch.js"),Te=require("./components/plans/SubscriptionPlan.js"),xe=require("./components/plans/SubscriptionPlanSelector.js"),Se=require("./components/plans/NewSubscriptionPlan.js"),Pe=require("./components/plans/SubscriptionPlansCollected.js"),Ae=require("./components/tabs/Tabs.js"),ye=require("./components/dynamic-tabs/DynamicTabs.js"),Ce=require("./components/shimmer/ShimmerComponent/BikShimmer.js"),Oe=require("./components/TablePagination/TablePagination.js"),be=require("./components/TablePagination/TablePaginationCard.js"),Ee=require("./components/states-modal/StateModalComponent.js"),je=require("./components/states-modal/DeleteConfirmationModal.js"),Re=require("./components/states/StateComponent.js"),he=require("./components/states/ShopifyScopeWrapper.js"),Be=require("./components/WhatsAppTextEditor/WhatsAppTextEditor.js"),_e=require("./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),ge=require("./helpers/BaseWhatsappContentLang.helper.js"),qe=require("./components/card-selection-modal/CardSelectionModal.js"),Ie=require("./components/image-cropper/BikImageCropper.js"),fe=require("./components/image-cropper/BikImagePipeline/BikImagePipeline.js"),De=require("./components/buttonGroup/ButtonGroup.js"),ke=require("./components/accordion/Accordion.js"),Ne=require("./components/file-uploader/FileUploader.js"),Me=require("./components/colourInput/ColourInput.js"),we=require("./components/bik-layout/BikHeader.js"),Le=require("./components/bik-layout/BikLayout.js"),Ge=require("./components/bik-layout/BikProfile.js"),Ve=require("./components/bik-layout/SimpleSidebar.js"),Ue=require("./components/bik-layout/BikSidebar.js"),ve=require("./components/bik-layout/FeatureModal.js"),He=require("./components/bik-layout/SidebarSkeleton.js"),Fe=require("./components/bik-layout/ShowShopifyRestrictedModal.js"),We=require("./components/bik-layout/FeatureModalV2.js"),Ye=require("./components/searchBar/searchBar.js"),Qe=require("./components/custom-date-time/CustomDateTime.js"),Ke=require("./components/product-picker/ProductPickerModal.js"),Ze=require("./components/discount-modal/DiscountModal.js"),Xe=require("./components/discount-modal/CouponExpiration/CouponExpiration.js"),ze=require("./components/discount-modal/type.js"),Je=require("./components/country-code-picker/CountryCodePicker.js"),$e=require("./components/country-code-picker/CountryCodePicker.modal.js"),er=require("./components/shimmer-image/ShimmerImage.js"),rr=require("./components/product-picker-v2/modal.js"),tr=require("./components/carousel/carousel.js"),or=require("./components/carousel-secondary/CarouselSecondary.js"),nr=require("./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js"),ir=require("./components/radioList/RadioList.js"),pr=require("./components/checkList/CheckList.js"),sr=require("./components/postPicker/postPicker.js"),ar=require("./components/dropdown-button/DropdownButton.js"),ur=require("./components/side-modal/SideModal.js"),cr=require("./components/keywords-input/KeywordsInput.js"),lr=require("./components/add-variableV2/AddVariableV2SideModal.js"),dr=require("./components/add-variableV2/AddVariableV2.js"),mr=require("./components/navigation-hyperlink/NavigationHyperlink.js"),Tr=require("./components/SearchFilter/index.js"),xr=require("./components/input-with-vars/InputWithVariables.js"),Sr=require("./components/dashboard-review-popup/DashboardReviewPopUp.js"),Pr=require("./components/star-rating/StarRating.js"),Ar=require("./components/testimonial-card/TestimonialCard.js"),yr=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=y.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}}),exports.TemplateContextMapper=O.TemplateContextMapper,exports.getAllDataFromTemplateComponent=b.getAllDataFromTemplateComponent,exports.validateIsUrl=E.validateIsUrl,exports.FABMenu=j.FABMenu,exports.FloatingActionButton=R.FloatingActionButton,Object.defineProperty(exports,"DROP_POSITION",{enumerable:!0,get:function(){return h.DROP_POSITION}}),exports.DropdownToggleContainer=h.DropdownToggleContainer,Object.defineProperty(exports,"FAB_POSITION",{enumerable:!0,get:function(){return h.FAB_POSITION}}),exports.FloatingActionButtonContainer=h.FloatingActionButtonContainer,exports.FloatingActionButtonOuterContainer=h.FloatingActionButtonOuterContainer,Object.defineProperty(exports,"MENU_ALIGNMENT",{enumerable:!0,get:function(){return h.MENU_ALIGNMENT}}),exports.StyledDropdown=h.StyledDropdown,exports.TooltipStyled=h.TooltipStyled,exports.ImageService=B.ImageService,exports.BodyCaption=_.BodyCaption,exports.BodyLarge=_.BodyLarge,exports.BodyPrimary=_.BodyPrimary,exports.BodyPrimaryLink=_.BodyPrimaryLink,exports.BodyRegular=_.BodyRegular,exports.BodySecondary=_.BodySecondary,exports.BodySecondaryLink=_.BodySecondaryLink,exports.BodyTiny=_.BodyTiny,exports.ButtonLarge=_.ButtonLarge,exports.ButtonRegular=_.ButtonRegular,exports.Caption=_.Caption,exports.Display=_.Display,exports.SmallRegular=_.SmallRegular,exports.SubHeading=_.SubHeading,exports.TitleLarge=_.TitleLarge,exports.TitleMedium=_.TitleMedium,exports.TitleRegular=_.TitleRegular,exports.TitleSmall=_.TitleSmall,exports.Button=g.Button,exports.ProgressBarComponent=q.ProgressBarComponent,exports.ProgressCompletedBar=q.ProgressCompletedBar,exports.QueryBuilder=I.QueryBuilder,exports.BaseQueryBuilderNode=f.BaseQueryBuilderNode,exports.PropertyNode=D.PropertyNode,exports.PropertyNodeHeadless=D.PropertyNodeHeadless,exports.queryBuilderSlice=k.queryBuilderSlice,exports.queryBuilderCacheSlice=N.queryBuilderCacheSlice,Object.defineProperty(exports,"AD_STRING_OPERATORS",{enumerable:!0,get:function(){return M.AD_STRING_OPERATORS}}),Object.defineProperty(exports,"ANY_AD_OPERATORS",{enumerable:!0,get:function(){return M.ANY_AD_OPERATORS}}),Object.defineProperty(exports,"ANY_IG_OPERATORS",{enumerable:!0,get:function(){return M.ANY_IG_OPERATORS}}),Object.defineProperty(exports,"BOOLEAN_OPERATORS",{enumerable:!0,get:function(){return M.BOOLEAN_OPERATORS}}),Object.defineProperty(exports,"DATE_OPERATORS",{enumerable:!0,get:function(){return M.DATE_OPERATORS}}),Object.defineProperty(exports,"EVENT_VALUES",{enumerable:!0,get:function(){return M.EVENT_VALUES}}),Object.defineProperty(exports,"EXACTLY_OPERATORS",{enumerable:!0,get:function(){return M.EXACTLY_OPERATORS}}),Object.defineProperty(exports,"FREQUENCY_OPERATORS",{enumerable:!0,get:function(){return M.FREQUENCY_OPERATORS}}),Object.defineProperty(exports,"ICE_BREAKER_OPERATORS",{enumerable:!0,get:function(){return M.ICE_BREAKER_OPERATORS}}),Object.defineProperty(exports,"IG_STRING_OPERATORS",{enumerable:!0,get:function(){return M.IG_STRING_OPERATORS}}),Object.defineProperty(exports,"INTEGER_OPERATORS",{enumerable:!0,get:function(){return M.INTEGER_OPERATORS}}),Object.defineProperty(exports,"MAIL_SUBJECT_OPERATORS",{enumerable:!0,get:function(){return M.MAIL_SUBJECT_OPERATORS}}),Object.defineProperty(exports,"REACTION_OPERATORS",{enumerable:!0,get:function(){return M.REACTION_OPERATORS}}),Object.defineProperty(exports,"SPECIFIC_IG_OPERATORS",{enumerable:!0,get:function(){return M.SPECIFIC_IG_OPERATORS}}),Object.defineProperty(exports,"STRING_OPERATORS",{enumerable:!0,get:function(){return M.STRING_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS",{enumerable:!0,get:function(){return M.STRING_RESTRICTED_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_2",{enumerable:!0,get:function(){return M.STRING_RESTRICTED_OPERATORS_2}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_3",{enumerable:!0,get:function(){return M.STRING_RESTRICTED_OPERATORS_3}}),exports.StyledModal=w.StyledModal,exports.DropdownPopover=L.DropdownPopover,exports.Dropdown=G.Dropdown,exports.ChipDropdown=V.ChipDropdown,exports.OpenedDropdown=U.OpenedDropdown,exports.MenuItemDropdown=v.MenuItemDropdown,exports.AnalyticsCard=H.AnalyticsCard,exports.AnalyticsContainer=F.AnalyticsContainer,exports.CardDataContainer=F.CardDataContainer,exports.Input=W.Input,exports.AnalyticsChip=Y.AnalyticsChip,exports.AnalyticsDropdown=Q.AnalyticsDropdown,exports.EachItem=Q.EachItem,exports.formatDate=Q.formatDate,exports.AnalyticsMultiChip=K.AnalyticsMultiChip,exports.AnalyticsMetric=Z.AnalyticsMetric,exports.AnalyticsTrend=X.AnalyticsTrend,exports.LineChart=z.LineChart,exports.LinearChipGroupedChart=J.LinearChipGroupedChart,exports.Card=$.Card,exports.PieChartAnalytics=$.PieChartAnalytics,exports.PieChart=ee.PieChart,exports.HorizontalGraph=re.HorizontalGraph,exports.StackedBarChart=te.StackedBarChart,exports.VerticalGraph=oe.VerticalGraph,Object.defineProperty(exports,"HEAT",{enumerable:!0,get:function(){return ne.HEAT}}),exports.HEAT_COLORS=ne.HEAT_COLORS,Object.defineProperty(exports,"HEAT_GRADING_TYPE",{enumerable:!0,get:function(){return ne.HEAT_GRADING_TYPE}}),exports.HeatMap=ne.HeatMap,exports.VerticalBarAndLinearGraph=ie.VerticalBarAndLinearGraph,exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=pe.AVATAR_SIZE_VS_ICON_SIZE_MAP,exports.Avatar=pe.Avatar,exports.BACKGROUND_VS_TEXT_COLOR_MAP=pe.BACKGROUND_VS_TEXT_COLOR_MAP,Object.defineProperty(exports,"AVATAR_BACKGROUND",{enumerable:!0,get:function(){return se.AVATAR_BACKGROUND}}),exports.AVATAR_SIZE_MAP=se.AVATAR_SIZE_MAP,Object.defineProperty(exports,"AVATAR_TYPES",{enumerable:!0,get:function(){return se.AVATAR_TYPES}}),Object.defineProperty(exports,"SIZE",{enumerable:!0,get:function(){return se.SIZE}}),exports.Alert=ae.Alert,Object.defineProperty(exports,"ALERT_TYPES",{enumerable:!0,get:function(){return ue.ALERT_TYPES}}),exports.COLOR_CONFIG_MAP=ue.COLOR_CONFIG_MAP,Object.defineProperty(exports,"RATIO",{enumerable:!0,get:function(){return ce.RATIO}}),exports.Thumbnail=ce.Thumbnail,exports.Curtain=le.Curtain,exports.DatePicker=de.DatePicker,exports.Loader=me.Loader,exports.Switch=me.Switch,exports.SwitchContainer=me.SwitchContainer,exports.Thumb=me.Thumb,exports.SubscriptionPlan=Te.SubscriptionPlan,exports.BottomWrapper=xe.BottomWrapper,exports.HeaderWrapper=xe.HeaderWrapper,exports.SubscriptionPlanSelector=xe.SubscriptionPlanSelector,exports.defaultTabs=xe.defaultTabs,exports.NewSubscriptionPlan=Se.NewSubscriptionPlan,exports.SubscriptionPlansCollected=Pe.SubscriptionPlansCollected,exports.TabItemComponent=Ae.TabItemComponent,exports.Tabs=Ae.Tabs,exports.DynamicTabs=ye.DynamicTabs,exports.BikShimmer=Ce.BikShimmer,exports.TablePagination=Oe.TablePagination,exports.TablePaginationCard=be.TablePaginationCard,exports.TablePaginationCardStyled=be.TablePaginationCardStyled,exports.StateModalComponent=Ee.StateModalComponent,exports.DeleteConfirmationModal=je.DeleteConfirmationModal,Object.defineProperty(exports,"ButtonActions",{enumerable:!0,get:function(){return Re.ButtonActions}}),Object.defineProperty(exports,"ButtonTypes",{enumerable:!0,get:function(){return Re.ButtonTypes}}),exports.StateComponent=Re.StateComponent,Object.defineProperty(exports,"StateInterface",{enumerable:!0,get:function(){return Re.StateInterface}}),exports.ShopifyScopeWrapper=he.ShopifyScopeWrapper,exports.WhatsAppTextEditor=Be.WhatsAppTextEditor,Object.defineProperty(exports,"EditorActionTypes",{enumerable:!0,get:function(){return _e.EditorActionTypes}}),exports.WhatsAppTextEditorHeader=_e.WhatsAppTextEditorHeader,exports.BaseWhatsappContentLangHelper=ge.BaseWhatsappContentLangHelper,exports.CardSelectionModal=qe.CardSelectionModal,exports.BikImageCropper=Ie.BikImageCropper,exports.BikImagePipeline=fe.BikImagePipeline,exports.ButtonGroup=De.ButtonGroup,exports.BikAccordion=ke.BikAccordion,exports.FileUploader=Ne.FileUploader,exports.ColourInput=Me.ColourInput,exports.BikHeader=we.BikHeader,exports.BikLayout=Le.BikLayout,exports.BikProfile=Ge.BikProfile,exports.SimpleSidebar=Ve.SimpleSidebar,exports.BikSidebar=Ue.BikSidebar,exports.FeatureModal=ve.FeatureModal,exports.SidebarSkeleton=He.SidebarSkeleton,exports.ShowShopifyRestrictedModal=Fe.ShowShopifyRestrictedModal,exports.FeatureModalV2=We.FeatureModalV2,exports.SearchBar=Ye.SearchBar,exports.CustomDateTime=Qe.CustomDateTime,exports.PricePleaseProductPicker=Ke.PricePleaseProductPicker,exports.ProductPickerContent=Ke.ProductPickerContent,exports.DiscountModal=Ze.DiscountModal,Object.defineProperty(exports,"COUPON_EXPIRATION",{enumerable:!0,get:function(){return Xe.COUPON_EXPIRATION}}),exports.CouponExpiration=Xe.CouponExpiration,Object.defineProperty(exports,"DISCOUNT_TARGET_SELECTION",{enumerable:!0,get:function(){return ze.DISCOUNT_TARGET_SELECTION}}),Object.defineProperty(exports,"DISCOUNT_TARGET_TYPES",{enumerable:!0,get:function(){return ze.DISCOUNT_TARGET_TYPES}}),Object.defineProperty(exports,"DISCOUNT_TYPES",{enumerable:!0,get:function(){return ze.DISCOUNT_TYPES}}),Object.defineProperty(exports,"DISCOUNT_VALUE_TYPES",{enumerable:!0,get:function(){return ze.DISCOUNT_VALUE_TYPES}}),Object.defineProperty(exports,"MIN_PURCHASE_REQUIREMENT",{enumerable:!0,get:function(){return ze.MIN_PURCHASE_REQUIREMENT}}),exports.CountryCodePicker=Je.CountryCodePicker,exports.CountriesData=$e.CountriesData,exports.ShimmerImage=er.ShimmerImage,exports.ProductPickerModal=rr.ProductPickerModal,Object.defineProperty(exports,"ScreenName",{enumerable:!0,get:function(){return rr.ScreenName}}),exports.Carousel=tr.Carousel,exports.CarouselSecondary=or.CarouselSecondary,exports.AccessTokenTroubleshootDialog=nr.AccessTokenTroubleshootDialog,exports.RadioList=ir.RadioList,exports.CheckList=pr.CheckList,Object.defineProperty(exports,"DateKeys",{enumerable:!0,get:function(){return sr.DateKeys}}),Object.defineProperty(exports,"MEDIA_TYPES",{enumerable:!0,get:function(){return sr.MEDIA_TYPES}}),exports.PostPicker=sr.PostPicker,exports.dateOptions=sr.dateOptions,exports.DropdownButton=ar.DropdownButton,exports.SideModal=ur.SideModal,exports.KeywordsInput=cr.KeywordsInput,exports.AddVariableV2SideModal=lr.AddVariableV2SideModal,exports.AddVariableV2=dr.AddVariableV2,exports.NaLinkWrapper=mr.NaLinkWrapper,exports.NavigationHyperlink=mr.NavigationHyperlink,exports.SearchFilter=Tr.SearchFilter,exports.InputWithVariables=xr.InputWithVariables,exports.DashboardReviewPopUp=Sr.DashboardReviewPopUp,exports.StarRating=Pr.StarRating,exports.TestimonialCard=Ar.TestimonialCard,exports.BikSlider=yr.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"),S=require("./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),P=require("./components/template-preview/helpers/SmsTemplateHelper.js"),A=require("./components/template-preview/helpers/WhatsAppFormatToHTML.js"),y=require("./components/template-preview/helpers/VariableEditorHelper.js"),C=require("./components/template-preview/models/TemplateMeta.js"),O=require("./components/template-context-mapper/TemplateContextMapper.js"),E=require("./components/template-context-mapper/utils/getDataFromTemplateComponent.js"),b=require("./components/template-context-mapper/utils/validateIsUrl.js"),j=require("./components/fab-menu/FABMenu.js"),R=require("./components/floating-action-button/FloatingActionButton.js"),h=require("./components/floating-action-button/FloatingActionButton.styles.js"),B=require("./components/image-compress/ImageCompress.js"),_=require("./components/TypographyStyle.js"),g=require("./components/button/Button.js"),q=require("./components/progress-bar/ProgressBarComponent.js"),I=require("./components/QueryBuilder/QueryBuilder.js"),f=require("./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),D=require("./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js"),k=require("./components/QueryBuilder/redux/queryBuilder.reducer.js"),M=require("./components/QueryBuilder/redux/queryBuilderCache.reducer.js"),N=require("./components/QueryBuilder/types/QueryBuilderOperator.type.js"),w=require("./components/modals/styledModal.js"),L=require("./components/dropdown/DropdownPopover/index.js"),G=require("./components/dropdown/Dropdown.js"),V=require("./components/dropdown/ChipDropdown.js"),U=require("./components/dropdown/OpenedDropdown/components/OpennedDropdown.js"),v=require("./components/dropdown/MenuItem/MenuItem.js"),H=require("./components/analytics-card/AnalyticsCard.js"),F=require("./components/analytics-card/AnalyticsCard.styled.js"),W=require("./components/input/Input.js"),Y=require("./components/analytics-chips-and-dropdowns/AnalyticsChip.js"),Q=require("./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js"),K=require("./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js"),Z=require("./components/analytics-chips-and-dropdowns/AnalyticsMetric.js"),X=require("./components/analytics-chips-and-dropdowns/AnalyticsTrend.js"),z=require("./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),J=require("./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js"),$=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),ee=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),re=require("./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),te=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),oe=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),ne=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),ie=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),pe=require("./components/avatar/Avatar.js"),se=require("./components/avatar/AvatarHelper.js"),ae=require("./components/alerts/Alert.js"),ue=require("./components/alerts/AlertHelper.js"),ce=require("./components/thumbnail/Thumbnail.js"),le=require("./components/curtain/Curtain.js"),de=require("./components/datePicker/DatePicker.js"),me=require("./components/switch/Switch.js"),Te=require("./components/plans/SubscriptionPlan.js"),xe=require("./components/plans/SubscriptionPlanSelector.js"),Se=require("./components/plans/NewSubscriptionPlan.js"),Pe=require("./components/plans/SubscriptionPlansCollected.js"),Ae=require("./components/tabs/Tabs.js"),ye=require("./components/dynamic-tabs/DynamicTabs.js"),Ce=require("./components/shimmer/ShimmerComponent/BikShimmer.js"),Oe=require("./components/TablePagination/TablePagination.js"),Ee=require("./components/TablePagination/TablePaginationCard.js"),be=require("./components/states-modal/StateModalComponent.js"),je=require("./components/states-modal/DeleteConfirmationModal.js"),Re=require("./components/states/StateComponent.js"),he=require("./components/states/ShopifyScopeWrapper.js"),Be=require("./components/WhatsAppTextEditor/WhatsAppTextEditor.js"),_e=require("./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),ge=require("./helpers/BaseWhatsappContentLang.helper.js"),qe=require("./components/card-selection-modal/CardSelectionModal.js"),Ie=require("./components/image-cropper/BikImageCropper.js"),fe=require("./components/image-cropper/BikImagePipeline/BikImagePipeline.js"),De=require("./components/buttonGroup/ButtonGroup.js"),ke=require("./components/accordion/Accordion.js"),Me=require("./components/file-uploader/FileUploader.js"),Ne=require("./components/colourInput/ColourInput.js"),we=require("./components/bik-layout/BikHeader.js"),Le=require("./components/bik-layout/BikLayout.js"),Ge=require("./components/bik-layout/BikProfile.js"),Ve=require("./components/bik-layout/SimpleSidebar.js"),Ue=require("./components/bik-layout/BikSidebar.js"),ve=require("./components/bik-layout/FeatureModal.js"),He=require("./components/bik-layout/SidebarSkeleton.js"),Fe=require("./components/bik-layout/ShowShopifyRestrictedModal.js"),We=require("./components/bik-layout/FeatureModalV2.js"),Ye=require("./components/searchBar/searchBar.js"),Qe=require("./components/custom-date-time/CustomDateTime.js"),Ke=require("./components/product-picker/ProductPickerModal.js"),Ze=require("./components/discount-modal/DiscountModal.js"),Xe=require("./components/discount-modal/CouponExpiration/CouponExpiration.js"),ze=require("./components/discount-modal/type.js"),Je=require("./components/country-code-picker/CountryCodePicker.js"),$e=require("./components/country-code-picker/CountryCodePicker.modal.js"),er=require("./components/shimmer-image/ShimmerImage.js"),rr=require("./components/product-picker-v2/modal.js"),tr=require("./components/carousel/carousel.js"),or=require("./components/carousel-secondary/CarouselSecondary.js"),nr=require("./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js"),ir=require("./components/radioList/RadioList.js"),pr=require("./components/checkList/CheckList.js"),sr=require("./components/postPicker/postPicker.js"),ar=require("./components/dropdown-button/DropdownButton.js"),ur=require("./components/side-modal/SideModal.js"),cr=require("./components/keywords-input/KeywordsInput.js"),lr=require("./components/add-variableV2/AddVariableV2SideModal.js"),dr=require("./components/add-variableV2/AddVariableV2.js"),mr=require("./components/navigation-hyperlink/NavigationHyperlink.js"),Tr=require("./components/SearchFilter/index.js"),xr=require("./components/input-with-vars/InputWithVariables.js"),Sr=require("./components/dashboard-review-popup/DashboardReviewPopUp.js"),Pr=require("./components/star-rating/StarRating.js"),Ar=require("./components/testimonial-card/TestimonialCard.js"),yr=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=y.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}}),exports.TemplateContextMapper=O.TemplateContextMapper,exports.getAllDataFromTemplateComponent=E.getAllDataFromTemplateComponent,exports.validateIsUrl=b.validateIsUrl,exports.FABMenu=j.FABMenu,exports.FloatingActionButton=R.FloatingActionButton,Object.defineProperty(exports,"DROP_POSITION",{enumerable:!0,get:function(){return h.DROP_POSITION}}),exports.DropdownToggleContainer=h.DropdownToggleContainer,Object.defineProperty(exports,"FAB_POSITION",{enumerable:!0,get:function(){return h.FAB_POSITION}}),exports.FloatingActionButtonContainer=h.FloatingActionButtonContainer,exports.FloatingActionButtonOuterContainer=h.FloatingActionButtonOuterContainer,Object.defineProperty(exports,"MENU_ALIGNMENT",{enumerable:!0,get:function(){return h.MENU_ALIGNMENT}}),exports.StyledDropdown=h.StyledDropdown,exports.TooltipStyled=h.TooltipStyled,exports.ImageService=B.ImageService,exports.BodyCaption=_.BodyCaption,exports.BodyLarge=_.BodyLarge,exports.BodyPrimary=_.BodyPrimary,exports.BodyPrimaryLink=_.BodyPrimaryLink,exports.BodyRegular=_.BodyRegular,exports.BodySecondary=_.BodySecondary,exports.BodySecondaryLink=_.BodySecondaryLink,exports.BodyTiny=_.BodyTiny,exports.ButtonLarge=_.ButtonLarge,exports.ButtonRegular=_.ButtonRegular,exports.Caption=_.Caption,exports.Display=_.Display,exports.SmallRegular=_.SmallRegular,exports.SubHeading=_.SubHeading,exports.TitleLarge=_.TitleLarge,exports.TitleMedium=_.TitleMedium,exports.TitleRegular=_.TitleRegular,exports.TitleSmall=_.TitleSmall,exports.Button=g.Button,exports.ProgressBarComponent=q.ProgressBarComponent,exports.ProgressCompletedBar=q.ProgressCompletedBar,exports.QueryBuilder=I.QueryBuilder,exports.BaseQueryBuilderNode=f.BaseQueryBuilderNode,exports.PropertyNode=D.PropertyNode,exports.PropertyNodeHeadless=D.PropertyNodeHeadless,exports.queryBuilderSlice=k.queryBuilderSlice,exports.queryBuilderCacheSlice=M.queryBuilderCacheSlice,Object.defineProperty(exports,"AD_STRING_OPERATORS",{enumerable:!0,get:function(){return N.AD_STRING_OPERATORS}}),Object.defineProperty(exports,"ANY_AD_OPERATORS",{enumerable:!0,get:function(){return N.ANY_AD_OPERATORS}}),Object.defineProperty(exports,"ANY_IG_OPERATORS",{enumerable:!0,get:function(){return N.ANY_IG_OPERATORS}}),Object.defineProperty(exports,"BOOLEAN_OPERATORS",{enumerable:!0,get:function(){return N.BOOLEAN_OPERATORS}}),Object.defineProperty(exports,"DATE_OPERATORS",{enumerable:!0,get:function(){return N.DATE_OPERATORS}}),Object.defineProperty(exports,"EVENT_VALUES",{enumerable:!0,get:function(){return N.EVENT_VALUES}}),Object.defineProperty(exports,"EXACTLY_OPERATORS",{enumerable:!0,get:function(){return N.EXACTLY_OPERATORS}}),Object.defineProperty(exports,"FREQUENCY_OPERATORS",{enumerable:!0,get:function(){return N.FREQUENCY_OPERATORS}}),Object.defineProperty(exports,"ICE_BREAKER_OPERATORS",{enumerable:!0,get:function(){return N.ICE_BREAKER_OPERATORS}}),Object.defineProperty(exports,"IG_STRING_OPERATORS",{enumerable:!0,get:function(){return N.IG_STRING_OPERATORS}}),Object.defineProperty(exports,"INTEGER_OPERATORS",{enumerable:!0,get:function(){return N.INTEGER_OPERATORS}}),Object.defineProperty(exports,"MAIL_SUBJECT_OPERATORS",{enumerable:!0,get:function(){return N.MAIL_SUBJECT_OPERATORS}}),Object.defineProperty(exports,"REACTION_OPERATORS",{enumerable:!0,get:function(){return N.REACTION_OPERATORS}}),Object.defineProperty(exports,"SPECIFIC_IG_OPERATORS",{enumerable:!0,get:function(){return N.SPECIFIC_IG_OPERATORS}}),Object.defineProperty(exports,"STRING_OPERATORS",{enumerable:!0,get:function(){return N.STRING_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS",{enumerable:!0,get:function(){return N.STRING_RESTRICTED_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_2",{enumerable:!0,get:function(){return N.STRING_RESTRICTED_OPERATORS_2}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_3",{enumerable:!0,get:function(){return N.STRING_RESTRICTED_OPERATORS_3}}),exports.StyledModal=w.StyledModal,exports.DropdownPopover=L.DropdownPopover,exports.Dropdown=G.Dropdown,exports.ChipDropdown=V.ChipDropdown,exports.OpenedDropdown=U.OpenedDropdown,exports.MenuItemDropdown=v.MenuItemDropdown,exports.AnalyticsCard=H.AnalyticsCard,exports.AnalyticsContainer=F.AnalyticsContainer,exports.CardDataContainer=F.CardDataContainer,exports.Input=W.Input,exports.AnalyticsChip=Y.AnalyticsChip,exports.AnalyticsDropdown=Q.AnalyticsDropdown,exports.EachItem=Q.EachItem,exports.formatDate=Q.formatDate,exports.AnalyticsMultiChip=K.AnalyticsMultiChip,exports.AnalyticsMetric=Z.AnalyticsMetric,exports.AnalyticsTrend=X.AnalyticsTrend,exports.LineChart=z.LineChart,exports.LinearChipGroupedChart=J.LinearChipGroupedChart,exports.Card=$.Card,exports.PieChartAnalytics=$.PieChartAnalytics,exports.PieChart=ee.PieChart,exports.HorizontalGraph=re.HorizontalGraph,exports.StackedBarChart=te.StackedBarChart,exports.VerticalGraph=oe.VerticalGraph,Object.defineProperty(exports,"HEAT",{enumerable:!0,get:function(){return ne.HEAT}}),exports.HEAT_COLORS=ne.HEAT_COLORS,Object.defineProperty(exports,"HEAT_GRADING_TYPE",{enumerable:!0,get:function(){return ne.HEAT_GRADING_TYPE}}),exports.HeatMap=ne.HeatMap,exports.VerticalBarAndLinearGraph=ie.VerticalBarAndLinearGraph,exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=pe.AVATAR_SIZE_VS_ICON_SIZE_MAP,exports.Avatar=pe.Avatar,exports.BACKGROUND_VS_TEXT_COLOR_MAP=pe.BACKGROUND_VS_TEXT_COLOR_MAP,Object.defineProperty(exports,"AVATAR_BACKGROUND",{enumerable:!0,get:function(){return se.AVATAR_BACKGROUND}}),exports.AVATAR_SIZE_MAP=se.AVATAR_SIZE_MAP,Object.defineProperty(exports,"AVATAR_TYPES",{enumerable:!0,get:function(){return se.AVATAR_TYPES}}),Object.defineProperty(exports,"SIZE",{enumerable:!0,get:function(){return se.SIZE}}),exports.Alert=ae.Alert,Object.defineProperty(exports,"ALERT_TYPES",{enumerable:!0,get:function(){return ue.ALERT_TYPES}}),exports.COLOR_CONFIG_MAP=ue.COLOR_CONFIG_MAP,Object.defineProperty(exports,"RATIO",{enumerable:!0,get:function(){return ce.RATIO}}),exports.Thumbnail=ce.Thumbnail,exports.Curtain=le.Curtain,exports.DatePicker=de.DatePicker,exports.Loader=me.Loader,exports.Switch=me.Switch,exports.SwitchContainer=me.SwitchContainer,exports.Thumb=me.Thumb,exports.SubscriptionPlan=Te.SubscriptionPlan,exports.BottomWrapper=xe.BottomWrapper,exports.HeaderWrapper=xe.HeaderWrapper,exports.SubscriptionPlanSelector=xe.SubscriptionPlanSelector,exports.defaultTabs=xe.defaultTabs,exports.NewSubscriptionPlan=Se.NewSubscriptionPlan,exports.SubscriptionPlansCollected=Pe.SubscriptionPlansCollected,exports.TabItemComponent=Ae.TabItemComponent,exports.Tabs=Ae.Tabs,exports.DynamicTabs=ye.DynamicTabs,exports.BikShimmer=Ce.BikShimmer,exports.TablePagination=Oe.TablePagination,exports.TablePaginationCard=Ee.TablePaginationCard,exports.TablePaginationCardStyled=Ee.TablePaginationCardStyled,exports.StateModalComponent=be.StateModalComponent,exports.DeleteConfirmationModal=je.DeleteConfirmationModal,Object.defineProperty(exports,"ButtonActions",{enumerable:!0,get:function(){return Re.ButtonActions}}),Object.defineProperty(exports,"ButtonTypes",{enumerable:!0,get:function(){return Re.ButtonTypes}}),exports.StateComponent=Re.StateComponent,Object.defineProperty(exports,"StateInterface",{enumerable:!0,get:function(){return Re.StateInterface}}),exports.ShopifyScopeWrapper=he.ShopifyScopeWrapper,exports.WhatsAppTextEditor=Be.WhatsAppTextEditor,Object.defineProperty(exports,"EditorActionTypes",{enumerable:!0,get:function(){return _e.EditorActionTypes}}),exports.WhatsAppTextEditorHeader=_e.WhatsAppTextEditorHeader,exports.BaseWhatsappContentLangHelper=ge.BaseWhatsappContentLangHelper,exports.CardSelectionModal=qe.CardSelectionModal,exports.BikImageCropper=Ie.BikImageCropper,exports.BikImagePipeline=fe.BikImagePipeline,exports.ButtonGroup=De.ButtonGroup,exports.BikAccordion=ke.BikAccordion,exports.FileUploader=Me.FileUploader,exports.ColourInput=Ne.ColourInput,exports.BikHeader=we.BikHeader,exports.BikLayout=Le.BikLayout,exports.BikProfile=Ge.BikProfile,exports.SimpleSidebar=Ve.SimpleSidebar,exports.BikSidebar=Ue.BikSidebar,exports.FeatureModal=ve.FeatureModal,exports.SidebarSkeleton=He.SidebarSkeleton,exports.ShowShopifyRestrictedModal=Fe.ShowShopifyRestrictedModal,exports.FeatureModalV2=We.FeatureModalV2,exports.SearchBar=Ye.SearchBar,exports.CustomDateTime=Qe.CustomDateTime,exports.PricePleaseProductPicker=Ke.PricePleaseProductPicker,exports.ProductPickerContent=Ke.ProductPickerContent,exports.DiscountModal=Ze.DiscountModal,Object.defineProperty(exports,"COUPON_EXPIRATION",{enumerable:!0,get:function(){return Xe.COUPON_EXPIRATION}}),exports.CouponExpiration=Xe.CouponExpiration,Object.defineProperty(exports,"DISCOUNT_TARGET_SELECTION",{enumerable:!0,get:function(){return ze.DISCOUNT_TARGET_SELECTION}}),Object.defineProperty(exports,"DISCOUNT_TARGET_TYPES",{enumerable:!0,get:function(){return ze.DISCOUNT_TARGET_TYPES}}),Object.defineProperty(exports,"DISCOUNT_TYPES",{enumerable:!0,get:function(){return ze.DISCOUNT_TYPES}}),Object.defineProperty(exports,"DISCOUNT_VALUE_TYPES",{enumerable:!0,get:function(){return ze.DISCOUNT_VALUE_TYPES}}),Object.defineProperty(exports,"MIN_PURCHASE_REQUIREMENT",{enumerable:!0,get:function(){return ze.MIN_PURCHASE_REQUIREMENT}}),exports.CountryCodePicker=Je.CountryCodePicker,exports.CountriesData=$e.CountriesData,exports.ShimmerImage=er.ShimmerImage,exports.ProductPickerModal=rr.ProductPickerModal,exports.Carousel=tr.Carousel,exports.CarouselSecondary=or.CarouselSecondary,exports.AccessTokenTroubleshootDialog=nr.AccessTokenTroubleshootDialog,exports.RadioList=ir.RadioList,exports.CheckList=pr.CheckList,Object.defineProperty(exports,"DateKeys",{enumerable:!0,get:function(){return sr.DateKeys}}),Object.defineProperty(exports,"MEDIA_TYPES",{enumerable:!0,get:function(){return sr.MEDIA_TYPES}}),exports.PostPicker=sr.PostPicker,exports.dateOptions=sr.dateOptions,exports.DropdownButton=ar.DropdownButton,exports.SideModal=ur.SideModal,exports.KeywordsInput=cr.KeywordsInput,exports.AddVariableV2SideModal=lr.AddVariableV2SideModal,exports.AddVariableV2=dr.AddVariableV2,exports.NaLinkWrapper=mr.NaLinkWrapper,exports.NavigationHyperlink=mr.NavigationHyperlink,exports.SearchFilter=Tr.SearchFilter,exports.InputWithVariables=xr.InputWithVariables,exports.DashboardReviewPopUp=Sr.DashboardReviewPopUp,exports.StarRating=Pr.StarRating,exports.TestimonialCard=Ar.TestimonialCard,exports.BikSlider=yr.BikSlider;
|
|
@@ -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"@tippyjs/react";import"../../../tooltips/TooltipInternal.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"../../../template-preview/models/TemplateMeta.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"../../../curtain/CurtainHelper.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"../../../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 p}from"../../../TypographyStyle.js";import"../../../list-item/ListItem.js";import"../../../pagination/Pagination.js";import"../../../radioButton/RadioButton.styled.js";import"react-dom";import"react-toastify";import"../../../toaster/Toaster.styled.js";import"@tippyjs/react";import"../../../tooltips/TooltipInternal.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"../../../template-preview/models/TemplateMeta.js";import"../../../modals/styledModal.js";import"../../../template-preview/models/Channels.js";import"../../../template-context-mapper/context/templateModalContext.js";import"../../../template-context-mapper/modalElements/Footer.js";import"../../../template-context-mapper/modalElements/Body.js";import"../../../template-context-mapper/modalElements/Header.js";import"../../../zeroState/ZeroState.js";import"../../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../../button/Button.js";import"../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../../input/Input.js";import"react-bootstrap";import"../../../floating-action-button/FloatingActionButton.styles.js";import"../../../image-compress/ImageCompress.js";import"../../../progress-bar/ProgressBarComponent.js";import"../../../QueryBuilder/QueryBuilder.js";import"../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";import"../../../QueryBuilder/constants/connectorPosition.js";import"../../../QueryBuilder/constants/connector.js";import"../../../QueryBuilder/types/QueryBuilder.type.js";import"../../../dropdown/Dropdown.js";import"../../../QueryBuilder/components/InputLoader.js";import"../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js";import"react-chips";import"../../../input/ChipInput.styled.js";import"../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js";import"../../../QueryBuilder/components/Connectors/Components/IgPicker.js";import"../../../QueryBuilder/components/Connectors/Components/InTheLast.js";import"../../../QueryBuilder/components/Connectors/Components/InTwoLast.js";import"react-calendar";import"../../../../utils/DateUtils.js";import"../../../datePicker/DatePickerWrapper.styled.js";import"../../../QueryBuilder/components/Connectors/Connector.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js";import"../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js";import"../../../QueryBuilder/redux/queryBuilder.reducer.js";import"../../../QueryBuilder/redux/queryBuilderCache.reducer.js";import"../../../QueryBuilder/types/QueryBuilderOperator.type.js";import"../../../dropdown/DropdownPopover/index.js";import"../../../dropdown/ChipDropdown.js";import"../../../dropdown/MenuItem/MenuItem.js";import"../../../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../../analytics-card/AnalyticsCard.styled.js";import"../../CommonStyles.js";import"../../../datePicker/DatePicker.styled.js";import"../../AnalyticsMetric.js";import"../LineChart/LineChart.js";import"../linearChipGroupedChart/LinearChipGroupedChart.styled.js";import{PieChart as C}from"./PieChart.js";import"../HorizontalBarGraph/HorizontalGraph.js";import"../StackedBarChart/StackedBarChart.js";import"../VerticalBarGraph/VerticalGraph.js";import"../heatmap/HeatMap.js";import"../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import"../../../avatar/Avatar.js";import"../../../avatar/AvatarHelper.js";import"../../../alerts/Alert.styled.js";import"../../../alerts/AlertHelper.js";import"../../../thumbnail/Thumbnail.js";import"../../../curtain/Curtain.styled.js";import"../../../curtain/CurtainHelper.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/emptyState.js";import"../../../product-picker-v2/style.js";import"lodash";import"../../../product-picker-v2/type.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"../../../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(p,Object.assign({style:{marginBottom:16}},{children:g})),i("div",Object.assign({className:"row"},{children:[o("div",Object.assign({className:"col-6"},{children:o("div",Object.assign({style:{width:a,height:a}},{children:o(A,{data: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(C,{slices:l})}))]}))]}):o(e,{})};export{b as Card,u as PieChartAnalytics};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{cloneDeep as s}from"lodash";import{Button as a}from"../../button/Button.js";import"react";import{DISCOUNT_TYPES as n,MIN_PURCHASE_REQUIREMENT as o,DISCOUNT_VALUE_TYPES as l}from"../type.js";import"../../dropdown/DropdownPopover/index.js";import{Dropdown as r}from"../../dropdown/Dropdown.js";import"../../dropdown/ChipDropdown.js";import"../../zeroState/ZeroState.js";import{TitleRegular as d,TitleSmall as c,TitleMedium as u,BodyPrimary as p,BodySecondary as m}from"../../TypographyStyle.js";import{DEFAULT_THEME as v}from"../../../constants/Theme.js";import"../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../checkBox/CheckBox.styled.js";import"../../list-item/ListItem.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"../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import{Input as b}from"../../input/Input.js";import g from"../../../assets/icons/cross.svg.js";import"../../dropdown/MenuItem/MenuItem.js";import"../../modals/styledModal.js";import"../../../node_modules/lodash.debounce/index.js";import"../../bik-layout/CommonStyles.js";import"../../product-picker/ProductPicker.styled.js";import"../../../utils/DateUtils.js";import"../../tag/Tag.js";import"@tippyjs/react";import"../../tooltips/TooltipInternal.js";import"../../product-picker-v2/modal.js";import{DynamicCouponContainer as D}from"../DiscountModal.styled.js";import{CouponExpiration as h}from"../CouponExpiration/CouponExpiration.js";import{RadioButton as y}from"../../radioButton/RadioButton.js";import O from"../../../assets/icons/cursor.svg.js";import T from"../../../assets/icons/plus.svg.js";const j="https://jkfenner.com/wp-content/uploads/2019/11/default.jpg";var x;function E(){return null}!function(e){e.ENTITLED="entitled",e.PREREQUISITE="prerequisite"}(x||(x={}));const _=_=>{var C;const f=[{value:n.AMOUNT_OFF_ORDER,label:"Amount off on order",selected:_.selectedCouponType===n.AMOUNT_OFF_ORDER},{value:n.AMOUNT_OFF_PRODUCTS,label:"Amount off on products",selected:_.selectedCouponType===n.AMOUNT_OFF_PRODUCTS},{value:n.BUY_X_GET_Y,label:"Buy X Get Y FREE",selected:_.selectedCouponType===n.BUY_X_GET_Y},{value:n.FREE_SHIPPING,label:"Free shipping",selected:_.selectedCouponType===n.FREE_SHIPPING}],N=[{selected:_.selectedMinimumRequirement===o.NA,label:"No minimum requirements",value:o.NA},{selected:_.selectedMinimumRequirement===o.AMOUNT,label:`Minimum purchase amount (${null!==(C=_.currency)&&void 0!==C?C:"₹"})`,value:o.AMOUNT},{selected:_.selectedMinimumRequirement===o.QUANTITY,label:"Minimum quantity of items",value:o.QUANTITY}],F=()=>{var e,t,i,s,a;if(_.discountData.valueType===l.FIXED_AMOUNT){if((null===(e=_.discountData)||void 0===e?void 0:e.value)&&(null===(t=_.discountData)||void 0===t?void 0:t.value)<=0)return"Enter a valid input"}else if((null===(i=_.discountData)||void 0===i?void 0:i.value)&&((null===(s=_.discountData)||void 0===s?void 0:s.value)<=0||(null===(a=_.discountData)||void 0===a?void 0:a.value)>100))return"Enter a valid input"},I=()=>{var i,s,a,n,l;return e("div",Object.assign({className:"input__rows"},{children:[e("div",Object.assign({className:"input__wrapper"},{children:[t(m,Object.assign({style:{marginBottom:10}},{children:"Min purchase requirements"})),t(r,{options:N,placement:"bottom-start",onSelect:e=>{const t=e.value;_.setSelectedMinimumRequirement(t),_.setDiscountData(Object.assign(Object.assign({},_.discountData),{minQuantity:void 0,minAmount:void 0}))}})]})),t("div",Object.assign({className:"input__wrapper"},{children:_.selectedMinimumRequirement!==o.NA&&t(b,{value:_.selectedMinimumRequirement===o.AMOUNT?null!==(s=null===(i=_.discountData.minAmount)||void 0===i?void 0:i.toString())&&void 0!==s?s:"":null!==(n=null===(a=_.discountData.minQuantity)||void 0===a?void 0:a.toString())&&void 0!==n?n:"",onChangeText:e=>{_.selectedMinimumRequirement===o.AMOUNT?_.setDiscountData(Object.assign(Object.assign({},_.discountData),{minAmount:parseInt(e)})):_.selectedMinimumRequirement===o.QUANTITY&&_.setDiscountData(Object.assign(Object.assign({},_.discountData),{minQuantity:parseInt(e)}))},labelText:_.selectedMinimumRequirement===o.AMOUNT?"Minimum purchase amount":"Minimum purchase quantity",prefixText:_.selectedMinimumRequirement===o.AMOUNT?null!==(l=_.currency)&&void 0!==l?l:"₹":void 0,type:"number",placeholder:_.selectedMinimumRequirement===o.AMOUNT?"1000.00":"2"})}))]}))},w=(n,o)=>{var l,r,u,p;let m=[],D=[],h={},y={};return _.useNewPicker?(h=n===x.ENTITLED?_.entitledProducts:_.prerequisiteProducts,y=null!==(l=n===x.ENTITLED?_.entitledCollections:_.prerequisiteCollections)&&void 0!==l?l:[],(null==h?void 0:h.isCustom)&&delete h.isCustom,(null==y?void 0:y.isCustom)&&delete y.isCustom,Object.values(h).forEach((e=>{Object.keys(e.products).forEach((t=>{m.push({id:t,name:e.products[t].name,image:e.products[t].image})}))})),Object.keys(y).forEach((e=>{"isCustom"!==e&&D.push({id:e,name:y[e].name,image:y[e].image})}))):(m=n===x.ENTITLED?_.entitledProducts:_.prerequisiteProducts,D=null!==(r=n===x.ENTITLED?_.entitledCollections:_.prerequisiteCollections)&&void 0!==r?r:[]),e(i,{children:[!o&&e(i,{children:[t(d,{children:n===x.PREREQUISITE?"Customer buys":"Customer gets"}),e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(b,{value:n===x.ENTITLED?null===(u=_.discountData.entitledQuantity)||void 0===u?void 0:u.toString():null===(p=_.discountData.prerequisiteQuantity)||void 0===p?void 0:p.toString(),type:"number",onChangeText:e=>{n===x.ENTITLED?_.setDiscountData(Object.assign(Object.assign({},_.discountData),{entitledQuantity:parseInt(e)})):_.setDiscountData(Object.assign(Object.assign({},_.discountData),{prerequisiteQuantity:parseInt(e)}))},labelText:"Add quantity",placeholder:"Add quantity"})})),t("div",{className:"input__wrapper"})]}))]}),e("div",Object.assign({style:{display:"flex",gap:18}},{children:[!(null==D?void 0:D.length)&&t(a,{buttonText:"Add product",buttonType:"tertiary",LeadingIcon:T,onClick:()=>{_.setIsProductPickerOpen(n)}}),!(null==m?void 0:m.length)&&t(a,{buttonText:"Add collection",buttonType:"tertiary",LeadingIcon:T,onClick:()=>{_.setIsCollectionPickerOpen(n)}})]})),!!m.length&&e("div",Object.assign({style:{margin:"8px 0"}},{children:[t(c,{children:"Products"}),m.map((i=>e("div",Object.assign({style:{padding:"20px 0 12px 0",borderBottom:`1px solid ${v.colorsV2.stroke.primary}`,display:"flex"}},{children:[e("div",Object.assign({style:{display:"flex",gap:16,alignItems:"center",flex:.8}},{children:[t("img",{src:i.image,onError:e=>{e.target.onerror=null,e.target.src=j},style:{height:40,width:40,objectFit:"cover",borderRadius:4}}),t(c,{children:i.name})]})),t("div",Object.assign({style:{flex:.2,display:"flex",justifyContent:"flex-end",alignItems:"center"}},{children:t("div",Object.assign({style:{cursor:"pointer"},onClick:()=>{if(_.useNewPicker){const e=s(h);Object.values(e).forEach((e=>{var t,s;(null===(t=null==e?void 0:e.products)||void 0===t?void 0:t[i.id])&&(null===(s=null==e?void 0:e.products)||void 0===s||delete s[i.id])})),n===x.ENTITLED?_.setEntitledProducts(e):_.setPrerequisiteProducts(e)}else{const e=m.filter((e=>e.id!==i.id));n===x.ENTITLED?_.setEntitledProducts(e):_.setPrerequisiteProducts(e)}}},{children:t(g,{width:14,color:v.colorsV2.content.primary})}))}))]}),i.id)))]})),!!D.length&&e("div",Object.assign({style:{margin:"8px 0"}},{children:[t(c,{children:"Collections"}),D.map((i=>e("div",Object.assign({style:{padding:"20px 0 12px 0",borderBottom:`1px solid ${v.colorsV2.stroke.primary}`,display:"flex"}},{children:[e("div",Object.assign({style:{display:"flex",gap:16,alignItems:"center",flex:.8}},{children:[t("img",{src:i.image,onError:e=>{e.target.onerror=null,e.target.src=j},style:{height:40,width:40,objectFit:"cover",borderRadius:4}}),t(c,{children:i.name})]})),t("div",Object.assign({style:{flex:.2,display:"flex",justifyContent:"flex-end",alignItems:"center"}},{children:t("div",Object.assign({style:{cursor:"pointer"},onClick:()=>{if(_.useNewPicker){const e=s(y);delete e[i.id],n===x.ENTITLED?_.setEntitledCollections(e):_.setPrerequisiteCollections(e)}else{const e=D.filter((e=>e.id!==i.id));n===x.ENTITLED?_.setEntitledCollections(e):_.setPrerequisiteCollections(e)}}},{children:t(g,{width:14,color:v.colorsV2.content.primary})}))}))]}),i.id)))]}))]})};return e(D,{children:[_.allowStaticCoupon&&e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(r,{options:f,width:"338px",placement:"bottom-start",onSelect:e=>{_.onChangeCouponType(e)}})})),t("div",Object.assign({className:"input__wrapper",style:{display:"flex",alignItems:"center",gap:8}},{children:(_.selectedCouponType===n.AMOUNT_OFF_PRODUCTS||_.selectedCouponType===n.AMOUNT_OFF_ORDER)&&e(i,{children:[t(y,{isActive:_.discountData.valueType===l.FIXED_AMOUNT,onValueChange:()=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{valueType:l.FIXED_AMOUNT,value:void 0}))},label:"Fixed amount"}),t(y,{isActive:_.discountData.valueType===l.PERCENTAGE,onValueChange:()=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{valueType:l.PERCENTAGE,value:void 0}))},label:"Percentage"})]})}))]})),_.selectedCouponType===n.AMOUNT_OFF_ORDER&&(()=>{var s,a,n,o,r;return e(i,{children:[e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(b,{value:_.discountData.title,onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{title:e.trim()}))},maxCharLimit:18,labelText:"Code title",placeholder:"eg: Flat 50% Off"})})),t("div",Object.assign({className:"input__wrapper"},{children:t(b,{value:null!==(n=null===(a=null===(s=_.discountData)||void 0===s?void 0:s.value)||void 0===a?void 0:a.toString())&&void 0!==n?n:"",labelText:"Discount code value",type:"number",errorMessage:F(),onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{value:parseInt(e)}))},placeholder:_.discountData.valueType===l.FIXED_AMOUNT?"0.00":"Enter a value",prefixText:_.discountData.valueType===l.FIXED_AMOUNT?null!==(o=_.currency)&&void 0!==o?o:"₹":void 0,suffixText:_.discountData.valueType===l.PERCENTAGE?"%":void 0})}))]})),I(),!_.hideProbability&&e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(b,{type:"number",value:null===(r=_.discountData.probability)||void 0===r?void 0:r.toString(),onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{probability:e.startsWith(".")?parseFloat(parseFloat(`0${e}`).toFixed(2)):parseFloat(parseFloat(e).toFixed(2))}))},labelText:"Probability",placeholder:"Enter probability in decimals (0 - 1)"})})),t("div",{className:"input__wrapper"})]}))]})})(),_.selectedCouponType===n.AMOUNT_OFF_PRODUCTS&&(()=>{var s,a,n,o,r;return e(i,{children:[e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(b,{value:_.discountData.title,onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{title:e.trim()}))},maxCharLimit:18,labelText:"Code title",placeholder:"eg: Flat 50% Off"})})),t("div",Object.assign({className:"input__wrapper"},{children:t(b,{value:null!==(n=null===(a=null===(s=_.discountData)||void 0===s?void 0:s.value)||void 0===a?void 0:a.toString())&&void 0!==n?n:"",labelText:"Discount code value",type:"number",errorMessage:F(),onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{value:parseInt(e)}))},placeholder:_.discountData.valueType===l.FIXED_AMOUNT?"0.00":"Enter a value",prefixText:_.discountData.valueType===l.FIXED_AMOUNT?null!==(o=_.currency)&&void 0!==o?o:"₹":void 0,suffixText:_.discountData.valueType===l.PERCENTAGE?"%":void 0})}))]})),w(x.ENTITLED,!0),!_.hideProbability&&e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(b,{type:"number",value:null===(r=_.discountData.probability)||void 0===r?void 0:r.toString(),onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{probability:e.startsWith(".")?parseFloat(parseFloat(`0${e}`).toFixed(2)):parseFloat(parseFloat(e).toFixed(2))}))},labelText:"Probability",placeholder:"Enter probability in decimals (0 - 1)"})})),t("div",{className:"input__wrapper"})]}))]})})(),_.selectedCouponType===n.FREE_SHIPPING&&(()=>{var s;return e(i,{children:[e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(b,{value:_.discountData.title,onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{title:e.trim()}))},labelText:"Code title",placeholder:"eg: Flat 50% Off",maxCharLimit:18})})),t("div",Object.assign({className:"input__wrapper"},{children:!_.hideProbability&&t(b,{value:null===(s=_.discountData.probability)||void 0===s?void 0:s.toString(),type:"number",onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{probability:e.startsWith(".")?parseFloat(parseFloat(`0${e}`).toFixed(2)):parseFloat(parseFloat(e).toFixed(2))}))},labelText:"Probability",placeholder:"Enter probability in decimals (0 - 1)"})}))]})),I()]})})(),_.selectedCouponType===n.BUY_X_GET_Y&&(()=>{var i,s,a,n;return e(D,{children:[t("div",Object.assign({className:"input__rows"},{children:e("div",Object.assign({style:{display:"flex",gap:20,flex:1}},{children:[t("div",Object.assign({style:{flex:1}},{children:t(b,{value:_.discountData.title,onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{title:e.trim()}))},maxCharLimit:18,labelText:"Code title",placeholder:"eg: Flat 50% Off"})})),!_.hideProbability&&t("div",Object.assign({style:{flex:1}},{children:t(b,{value:null===(i=_.discountData.probability)||void 0===i?void 0:i.toString(),type:"number",onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{probability:e.startsWith(".")?parseFloat(parseFloat(`0${e}`).toFixed(2)):parseFloat(parseFloat(e).toFixed(2))}))},labelText:"Probability",placeholder:"Enter probability in decimals (0 - 1)"})}))]}))})),t(E,{}),w(x.PREREQUISITE),t(E,{}),w(x.ENTITLED),t(E,{}),t(d,{children:"At a discount value"}),e("div",Object.assign({style:{display:"flex",gap:18,alignItems:"flex-start"}},{children:[t(y,{label:"Percentage",isActive:100!==_.discountData.value,onValueChange:()=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{value:void 0}))}}),100!==_.discountData.value&&t(b,{variant:"small",value:null!==(n=null===(a=null===(s=_.discountData)||void 0===s?void 0:s.value)||void 0===a?void 0:a.toString())&&void 0!==n?n:"",onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{value:parseInt(e)}))},errorMessage:F(),type:"number",placeholder:"Enter percentage eg: 10%",suffixText:"%",width:"238px"})]})),t("div",{children:t(y,{label:"Free",isActive:100===_.discountData.value,onValueChange:e=>{e?_.setDiscountData(Object.assign(Object.assign({},_.discountData),{value:100})):_.setDiscountData(Object.assign(Object.assign({},_.discountData),{value:void 0}))}})})]})})(),_.selectedCouponType&&!_.hideExpiration&&e(i,{children:[t("div",{style:_.selectedCouponType!==n.BUY_X_GET_Y&&_.selectedCouponType!==n.AMOUNT_OFF_PRODUCTS||!_.hideProbability?{height:6,borderTop:`1px solid ${v.colorsV2.stroke.primary}`,marginTop:12}:{}}),t(h,{discountData:_.discountData,setDiscountData:_.setDiscountData})]}),!_.selectedCouponType&&e("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:10,padding:"40px 0",justifyContent:"center",alignItems:"center"}},{children:[t("div",Object.assign({style:{height:52,width:52,backgroundColor:v.colorsV2.background.inverse,borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center"}},{children:t(O,{width:32,color:v.colorsV2.content.primaryInverse})})),t(u,{children:"No discount has been selected"}),t(p,{children:"Please select a discount type"})]}))]})};export{x as DISCOUNT_PRODUCTS,_ as default};
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{cloneDeep as s}from"lodash";import{Button as n}from"../../button/Button.js";import"react";import{DISCOUNT_TYPES as a,MIN_PURCHASE_REQUIREMENT as o,DISCOUNT_VALUE_TYPES as l}from"../type.js";import"../../dropdown/DropdownPopover/index.js";import{Dropdown as r}from"../../dropdown/Dropdown.js";import"../../dropdown/ChipDropdown.js";import"../../zeroState/ZeroState.js";import{TitleRegular as d,TitleSmall as c,TitleMedium as u,BodyPrimary as p,BodySecondary as m}from"../../TypographyStyle.js";import{DEFAULT_THEME as v}from"../../../constants/Theme.js";import"../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../checkBox/CheckBox.styled.js";import"../../list-item/ListItem.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"../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import{Input as b}from"../../input/Input.js";import g from"../../../assets/icons/cross.svg.js";import"../../dropdown/MenuItem/MenuItem.js";import"../../modals/styledModal.js";import"../../../node_modules/lodash.debounce/index.js";import"../../bik-layout/CommonStyles.js";import"../../product-picker/ProductPicker.styled.js";import"../../../utils/DateUtils.js";import"../../tag/Tag.js";import"@tippyjs/react";import"../../tooltips/TooltipInternal.js";import"../../spinner/Spinner.js";import"../../icon-button/IconButton.js";import"../../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../product-picker-v2/emptyState.js";import"../../product-picker-v2/style.js";import"../../product-picker-v2/type.js";import{DynamicCouponContainer as D}from"../DiscountModal.styled.js";import{CouponExpiration as h}from"../CouponExpiration/CouponExpiration.js";import{RadioButton as y}from"../../radioButton/RadioButton.js";import O from"../../../assets/icons/cursor.svg.js";import T from"../../../assets/icons/plus.svg.js";const j="https://jkfenner.com/wp-content/uploads/2019/11/default.jpg";var x;function E(){return null}!function(e){e.ENTITLED="entitled",e.PREREQUISITE="prerequisite"}(x||(x={}));const _=_=>{var C;const f=[{value:a.AMOUNT_OFF_ORDER,label:"Amount off on order",selected:_.selectedCouponType===a.AMOUNT_OFF_ORDER},{value:a.AMOUNT_OFF_PRODUCTS,label:"Amount off on products",selected:_.selectedCouponType===a.AMOUNT_OFF_PRODUCTS},{value:a.BUY_X_GET_Y,label:"Buy X Get Y FREE",selected:_.selectedCouponType===a.BUY_X_GET_Y},{value:a.FREE_SHIPPING,label:"Free shipping",selected:_.selectedCouponType===a.FREE_SHIPPING}],N=[{selected:_.selectedMinimumRequirement===o.NA,label:"No minimum requirements",value:o.NA},{selected:_.selectedMinimumRequirement===o.AMOUNT,label:`Minimum purchase amount (${null!==(C=_.currency)&&void 0!==C?C:"₹"})`,value:o.AMOUNT},{selected:_.selectedMinimumRequirement===o.QUANTITY,label:"Minimum quantity of items",value:o.QUANTITY}],F=()=>{var e,t,i,s,n;if(_.discountData.valueType===l.FIXED_AMOUNT){if((null===(e=_.discountData)||void 0===e?void 0:e.value)&&(null===(t=_.discountData)||void 0===t?void 0:t.value)<=0)return"Enter a valid input"}else if((null===(i=_.discountData)||void 0===i?void 0:i.value)&&((null===(s=_.discountData)||void 0===s?void 0:s.value)<=0||(null===(n=_.discountData)||void 0===n?void 0:n.value)>100))return"Enter a valid input"},I=()=>{var i,s,n,a,l;return e("div",Object.assign({className:"input__rows"},{children:[e("div",Object.assign({className:"input__wrapper"},{children:[t(m,Object.assign({style:{marginBottom:10}},{children:"Min purchase requirements"})),t(r,{options:N,placement:"bottom-start",onSelect:e=>{const t=e.value;_.setSelectedMinimumRequirement(t),_.setDiscountData(Object.assign(Object.assign({},_.discountData),{minQuantity:void 0,minAmount:void 0}))}})]})),t("div",Object.assign({className:"input__wrapper"},{children:_.selectedMinimumRequirement!==o.NA&&t(b,{value:_.selectedMinimumRequirement===o.AMOUNT?null!==(s=null===(i=_.discountData.minAmount)||void 0===i?void 0:i.toString())&&void 0!==s?s:"":null!==(a=null===(n=_.discountData.minQuantity)||void 0===n?void 0:n.toString())&&void 0!==a?a:"",onChangeText:e=>{_.selectedMinimumRequirement===o.AMOUNT?_.setDiscountData(Object.assign(Object.assign({},_.discountData),{minAmount:parseInt(e)})):_.selectedMinimumRequirement===o.QUANTITY&&_.setDiscountData(Object.assign(Object.assign({},_.discountData),{minQuantity:parseInt(e)}))},labelText:_.selectedMinimumRequirement===o.AMOUNT?"Minimum purchase amount":"Minimum purchase quantity",prefixText:_.selectedMinimumRequirement===o.AMOUNT?null!==(l=_.currency)&&void 0!==l?l:"₹":void 0,type:"number",placeholder:_.selectedMinimumRequirement===o.AMOUNT?"1000.00":"2"})}))]}))},w=(a,o)=>{var l,r,u,p;let m=[],D=[],h={},y={};return _.useNewPicker?(h=a===x.ENTITLED?_.entitledProducts:_.prerequisiteProducts,y=null!==(l=a===x.ENTITLED?_.entitledCollections:_.prerequisiteCollections)&&void 0!==l?l:[],(null==h?void 0:h.isCustom)&&delete h.isCustom,(null==y?void 0:y.isCustom)&&delete y.isCustom,Object.values(h).forEach((e=>{Object.keys(e.products).forEach((t=>{m.push({id:t,name:e.products[t].name,image:e.products[t].image})}))})),Object.keys(y).forEach((e=>{"isCustom"!==e&&D.push({id:e,name:y[e].name,image:y[e].image})}))):(m=a===x.ENTITLED?_.entitledProducts:_.prerequisiteProducts,D=null!==(r=a===x.ENTITLED?_.entitledCollections:_.prerequisiteCollections)&&void 0!==r?r:[]),e(i,{children:[!o&&e(i,{children:[t(d,{children:a===x.PREREQUISITE?"Customer buys":"Customer gets"}),e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(b,{value:a===x.ENTITLED?null===(u=_.discountData.entitledQuantity)||void 0===u?void 0:u.toString():null===(p=_.discountData.prerequisiteQuantity)||void 0===p?void 0:p.toString(),type:"number",onChangeText:e=>{a===x.ENTITLED?_.setDiscountData(Object.assign(Object.assign({},_.discountData),{entitledQuantity:parseInt(e)})):_.setDiscountData(Object.assign(Object.assign({},_.discountData),{prerequisiteQuantity:parseInt(e)}))},labelText:"Add quantity",placeholder:"Add quantity"})})),t("div",{className:"input__wrapper"})]}))]}),e("div",Object.assign({style:{display:"flex",gap:18}},{children:[!(null==D?void 0:D.length)&&t(n,{buttonText:"Add product",buttonType:"tertiary",LeadingIcon:T,onClick:()=>{_.setIsProductPickerOpen(a)}}),!(null==m?void 0:m.length)&&t(n,{buttonText:"Add collection",buttonType:"tertiary",LeadingIcon:T,onClick:()=>{_.setIsCollectionPickerOpen(a)}})]})),!!m.length&&e("div",Object.assign({style:{margin:"8px 0"}},{children:[t(c,{children:"Products"}),m.map((i=>e("div",Object.assign({style:{padding:"20px 0 12px 0",borderBottom:`1px solid ${v.colorsV2.stroke.primary}`,display:"flex"}},{children:[e("div",Object.assign({style:{display:"flex",gap:16,alignItems:"center",flex:.8}},{children:[t("img",{src:i.image,onError:e=>{e.target.onerror=null,e.target.src=j},style:{height:40,width:40,objectFit:"cover",borderRadius:4}}),t(c,{children:i.name})]})),t("div",Object.assign({style:{flex:.2,display:"flex",justifyContent:"flex-end",alignItems:"center"}},{children:t("div",Object.assign({style:{cursor:"pointer"},onClick:()=>{if(_.useNewPicker){const e=s(h);Object.values(e).forEach((e=>{var t,s;(null===(t=null==e?void 0:e.products)||void 0===t?void 0:t[i.id])&&(null===(s=null==e?void 0:e.products)||void 0===s||delete s[i.id])})),a===x.ENTITLED?_.setEntitledProducts(e):_.setPrerequisiteProducts(e)}else{const e=m.filter((e=>e.id!==i.id));a===x.ENTITLED?_.setEntitledProducts(e):_.setPrerequisiteProducts(e)}}},{children:t(g,{width:14,color:v.colorsV2.content.primary})}))}))]}),i.id)))]})),!!D.length&&e("div",Object.assign({style:{margin:"8px 0"}},{children:[t(c,{children:"Collections"}),D.map((i=>e("div",Object.assign({style:{padding:"20px 0 12px 0",borderBottom:`1px solid ${v.colorsV2.stroke.primary}`,display:"flex"}},{children:[e("div",Object.assign({style:{display:"flex",gap:16,alignItems:"center",flex:.8}},{children:[t("img",{src:i.image,onError:e=>{e.target.onerror=null,e.target.src=j},style:{height:40,width:40,objectFit:"cover",borderRadius:4}}),t(c,{children:i.name})]})),t("div",Object.assign({style:{flex:.2,display:"flex",justifyContent:"flex-end",alignItems:"center"}},{children:t("div",Object.assign({style:{cursor:"pointer"},onClick:()=>{if(_.useNewPicker){const e=s(y);delete e[i.id],a===x.ENTITLED?_.setEntitledCollections(e):_.setPrerequisiteCollections(e)}else{const e=D.filter((e=>e.id!==i.id));a===x.ENTITLED?_.setEntitledCollections(e):_.setPrerequisiteCollections(e)}}},{children:t(g,{width:14,color:v.colorsV2.content.primary})}))}))]}),i.id)))]}))]})};return e(D,{children:[_.allowStaticCoupon&&e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(r,{options:f,width:"338px",placement:"bottom-start",onSelect:e=>{_.onChangeCouponType(e)}})})),t("div",Object.assign({className:"input__wrapper",style:{display:"flex",alignItems:"center",gap:8}},{children:(_.selectedCouponType===a.AMOUNT_OFF_PRODUCTS||_.selectedCouponType===a.AMOUNT_OFF_ORDER)&&e(i,{children:[t(y,{isActive:_.discountData.valueType===l.FIXED_AMOUNT,onValueChange:()=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{valueType:l.FIXED_AMOUNT,value:void 0}))},label:"Fixed amount"}),t(y,{isActive:_.discountData.valueType===l.PERCENTAGE,onValueChange:()=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{valueType:l.PERCENTAGE,value:void 0}))},label:"Percentage"})]})}))]})),_.selectedCouponType===a.AMOUNT_OFF_ORDER&&(()=>{var s,n,a,o,r;return e(i,{children:[e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(b,{value:_.discountData.title,onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{title:e.trim()}))},maxCharLimit:18,labelText:"Code title",placeholder:"eg: Flat 50% Off"})})),t("div",Object.assign({className:"input__wrapper"},{children:t(b,{value:null!==(a=null===(n=null===(s=_.discountData)||void 0===s?void 0:s.value)||void 0===n?void 0:n.toString())&&void 0!==a?a:"",labelText:"Discount code value",type:"number",errorMessage:F(),onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{value:parseInt(e)}))},placeholder:_.discountData.valueType===l.FIXED_AMOUNT?"0.00":"Enter a value",prefixText:_.discountData.valueType===l.FIXED_AMOUNT?null!==(o=_.currency)&&void 0!==o?o:"₹":void 0,suffixText:_.discountData.valueType===l.PERCENTAGE?"%":void 0})}))]})),I(),!_.hideProbability&&e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(b,{type:"number",value:null===(r=_.discountData.probability)||void 0===r?void 0:r.toString(),onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{probability:e.startsWith(".")?parseFloat(parseFloat(`0${e}`).toFixed(2)):parseFloat(parseFloat(e).toFixed(2))}))},labelText:"Probability",placeholder:"Enter probability in decimals (0 - 1)"})})),t("div",{className:"input__wrapper"})]}))]})})(),_.selectedCouponType===a.AMOUNT_OFF_PRODUCTS&&(()=>{var s,n,a,o,r;return e(i,{children:[e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(b,{value:_.discountData.title,onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{title:e.trim()}))},maxCharLimit:18,labelText:"Code title",placeholder:"eg: Flat 50% Off"})})),t("div",Object.assign({className:"input__wrapper"},{children:t(b,{value:null!==(a=null===(n=null===(s=_.discountData)||void 0===s?void 0:s.value)||void 0===n?void 0:n.toString())&&void 0!==a?a:"",labelText:"Discount code value",type:"number",errorMessage:F(),onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{value:parseInt(e)}))},placeholder:_.discountData.valueType===l.FIXED_AMOUNT?"0.00":"Enter a value",prefixText:_.discountData.valueType===l.FIXED_AMOUNT?null!==(o=_.currency)&&void 0!==o?o:"₹":void 0,suffixText:_.discountData.valueType===l.PERCENTAGE?"%":void 0})}))]})),w(x.ENTITLED,!0),!_.hideProbability&&e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(b,{type:"number",value:null===(r=_.discountData.probability)||void 0===r?void 0:r.toString(),onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{probability:e.startsWith(".")?parseFloat(parseFloat(`0${e}`).toFixed(2)):parseFloat(parseFloat(e).toFixed(2))}))},labelText:"Probability",placeholder:"Enter probability in decimals (0 - 1)"})})),t("div",{className:"input__wrapper"})]}))]})})(),_.selectedCouponType===a.FREE_SHIPPING&&(()=>{var s;return e(i,{children:[e("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(b,{value:_.discountData.title,onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{title:e.trim()}))},labelText:"Code title",placeholder:"eg: Flat 50% Off",maxCharLimit:18})})),t("div",Object.assign({className:"input__wrapper"},{children:!_.hideProbability&&t(b,{value:null===(s=_.discountData.probability)||void 0===s?void 0:s.toString(),type:"number",onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{probability:e.startsWith(".")?parseFloat(parseFloat(`0${e}`).toFixed(2)):parseFloat(parseFloat(e).toFixed(2))}))},labelText:"Probability",placeholder:"Enter probability in decimals (0 - 1)"})}))]})),I()]})})(),_.selectedCouponType===a.BUY_X_GET_Y&&(()=>{var i,s,n,a;return e(D,{children:[t("div",Object.assign({className:"input__rows"},{children:e("div",Object.assign({style:{display:"flex",gap:20,flex:1}},{children:[t("div",Object.assign({style:{flex:1}},{children:t(b,{value:_.discountData.title,onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{title:e.trim()}))},maxCharLimit:18,labelText:"Code title",placeholder:"eg: Flat 50% Off"})})),!_.hideProbability&&t("div",Object.assign({style:{flex:1}},{children:t(b,{value:null===(i=_.discountData.probability)||void 0===i?void 0:i.toString(),type:"number",onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{probability:e.startsWith(".")?parseFloat(parseFloat(`0${e}`).toFixed(2)):parseFloat(parseFloat(e).toFixed(2))}))},labelText:"Probability",placeholder:"Enter probability in decimals (0 - 1)"})}))]}))})),t(E,{}),w(x.PREREQUISITE),t(E,{}),w(x.ENTITLED),t(E,{}),t(d,{children:"At a discount value"}),e("div",Object.assign({style:{display:"flex",gap:18,alignItems:"flex-start"}},{children:[t(y,{label:"Percentage",isActive:100!==_.discountData.value,onValueChange:()=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{value:void 0}))}}),100!==_.discountData.value&&t(b,{variant:"small",value:null!==(a=null===(n=null===(s=_.discountData)||void 0===s?void 0:s.value)||void 0===n?void 0:n.toString())&&void 0!==a?a:"",onChangeText:e=>{_.setDiscountData(Object.assign(Object.assign({},_.discountData),{value:parseInt(e)}))},errorMessage:F(),type:"number",placeholder:"Enter percentage eg: 10%",suffixText:"%",width:"238px"})]})),t("div",{children:t(y,{label:"Free",isActive:100===_.discountData.value,onValueChange:e=>{e?_.setDiscountData(Object.assign(Object.assign({},_.discountData),{value:100})):_.setDiscountData(Object.assign(Object.assign({},_.discountData),{value:void 0}))}})})]})})(),_.selectedCouponType&&!_.hideExpiration&&e(i,{children:[t("div",{style:_.selectedCouponType!==a.BUY_X_GET_Y&&_.selectedCouponType!==a.AMOUNT_OFF_PRODUCTS||!_.hideProbability?{height:6,borderTop:`1px solid ${v.colorsV2.stroke.primary}`,marginTop:12}:{}}),t(h,{discountData:_.discountData,setDiscountData:_.setDiscountData})]}),!_.selectedCouponType&&e("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:10,padding:"40px 0",justifyContent:"center",alignItems:"center"}},{children:[t("div",Object.assign({style:{height:52,width:52,backgroundColor:v.colorsV2.background.inverse,borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center"}},{children:t(O,{width:32,color:v.colorsV2.content.primaryInverse})})),t(u,{children:"No discount has been selected"}),t(p,{children:"Please select a discount type"})]}))]})};export{x as DISCOUNT_PRODUCTS,_ as default};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Product, ProductVariant
|
|
1
|
+
import { Product, ProductVariant } from '../modal';
|
|
2
2
|
import { OUT_OF_STOCK_ACTION } from '../type';
|
|
3
|
-
import { ProductVariantForRearrange } from '../variant';
|
|
4
3
|
export declare class ProductHelper {
|
|
5
4
|
/**
|
|
6
5
|
* how to know if a product is out of stock? currentCombination.quantity === 0 (OOS)
|
|
@@ -32,14 +31,3 @@ export declare class ProductHelper {
|
|
|
32
31
|
*/
|
|
33
32
|
static getProductLabels(productVariant: Product | ProductVariant, outOfStockAction?: OUT_OF_STOCK_ACTION): string | null;
|
|
34
33
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Loops through each collection, each product, each variant.
|
|
37
|
-
* For each variant, adds a displayOrder if not already there.
|
|
38
|
-
* For each variant, additional parameters are added from ProductVariantForRearrange
|
|
39
|
-
* in order to display the variant card.
|
|
40
|
-
* After converting to array, sorts the array based on displayOrder and returns.
|
|
41
|
-
*
|
|
42
|
-
* @param selectedCollections - Collections in object format
|
|
43
|
-
* @returns Selected Varaints in array format, sorted based on displayOrder.
|
|
44
|
-
*/
|
|
45
|
-
export declare const parseSelectedVariantsToArray: (selectedCollections: SelectedItems) => ProductVariantForRearrange[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{OUT_OF_STOCK_ACTION as n}from"../type.js";const
|
|
1
|
+
import{OUT_OF_STOCK_ACTION as n}from"../type.js";const i={NORMAL:null,NOT_SYNCED:"Hidden",OUT_OF_STOCK:"Out of Stock"};class t{static getProductLabels(t){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.NORMAL,u="NORMAL";if(t.variants)return i[u];const y=t;return l===n.HIDE&&(!y.skipSync||0!==(null==y?void 0:y.quantity)&&-2!==(null==y?void 0:y.quantity)||(u="NOT_SYNCED"),y.skipSync&&0!==(null==y?void 0:y.quantity)&&-2!==(null==y?void 0:y.quantity)&&(u="NOT_SYNCED"),y.skipSync||0!==(null==y?void 0:y.quantity)&&-2!==(null==y?void 0:y.quantity)||(u="NOT_SYNCED"),y.skipSync||0===(null==y?void 0:y.quantity)||-2===(null==y?void 0:y.quantity)||(u="NORMAL")),l===n.BLUR&&(!y.skipSync||0!==(null==y?void 0:y.quantity)&&-2!==(null==y?void 0:y.quantity)||(u="NOT_SYNCED"),y.skipSync&&0!==(null==y?void 0:y.quantity)&&-2!==(null==y?void 0:y.quantity)&&(u="NOT_SYNCED"),y.skipSync||0!==(null==y?void 0:y.quantity)&&-2!==(null==y?void 0:y.quantity)||(u="OUT_OF_STOCK"),y.skipSync||0===(null==y?void 0:y.quantity)||-2===(null==y?void 0:y.quantity)||(u="NORMAL")),l===n.NORMAL&&(!y.skipSync||0!==(null==y?void 0:y.quantity)&&-2!==(null==y?void 0:y.quantity)||(u="NOT_SYNCED"),y.skipSync&&0!==(null==y?void 0:y.quantity)&&-2!==(null==y?void 0:y.quantity)&&(u="NOT_SYNCED"),y.skipSync||0!==(null==y?void 0:y.quantity)&&-2!==(null==y?void 0:y.quantity)||(u="NORMAL"),y.skipSync||0===(null==y?void 0:y.quantity)||-2===(null==y?void 0:y.quantity)||(u="NORMAL")),i[u]}}export{t as ProductHelper};
|
|
@@ -6,7 +6,6 @@ export interface ProductVariant {
|
|
|
6
6
|
image: string;
|
|
7
7
|
quantity: number;
|
|
8
8
|
skipSync?: boolean;
|
|
9
|
-
displayOrder?: number | null;
|
|
10
9
|
}
|
|
11
10
|
export interface Product {
|
|
12
11
|
name: string;
|
|
@@ -38,14 +37,7 @@ export type CollectionFetcherReturn = Promise<{
|
|
|
38
37
|
export type ProductFetcherReturn = Promise<{
|
|
39
38
|
[key: string]: Product;
|
|
40
39
|
}>;
|
|
41
|
-
export
|
|
42
|
-
Collections = "collections",
|
|
43
|
-
RearrangeProducts = "rearrange",
|
|
44
|
-
SelectedProducts = "view",
|
|
45
|
-
SearchProducts = "searchProducts",
|
|
46
|
-
Products = "products"
|
|
47
|
-
}
|
|
48
|
-
export type ProductPickerInterface = {
|
|
40
|
+
export interface ProductPickerInterface {
|
|
49
41
|
hideGlobalSearch?: boolean;
|
|
50
42
|
hideInCollectionSearch?: boolean;
|
|
51
43
|
customCollectionRestriction?: boolean;
|
|
@@ -69,11 +61,5 @@ export type ProductPickerInterface = {
|
|
|
69
61
|
title?: string;
|
|
70
62
|
postHeader?: React.ReactNode;
|
|
71
63
|
width?: string;
|
|
72
|
-
|
|
73
|
-
} & ({
|
|
74
|
-
startupScreen: ScreenName.RearrangeProducts;
|
|
75
|
-
rearrangeEnabled: true;
|
|
76
|
-
} | {
|
|
77
|
-
startupScreen?: Exclude<ScreenName, ScreenName.RearrangeProducts>;
|
|
78
|
-
});
|
|
64
|
+
}
|
|
79
65
|
export declare const ProductPickerModal: (props: ProductPickerInterface) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import c from"../../assets/icons/search.svg.js";import{useReducer as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import c from"../../assets/icons/search.svg.js";import{useReducer as s,useState as i,useEffect as r}from"react";import{COLORS as l}from"../../constants/Theme.js";import{Button as n}from"../button/Button.js";import{Input as d}from"../input/Input.js";import{StyledModal as a}from"../modals/styledModal.js";import{Spinner as h}from"../spinner/Spinner.js";import{Tag as u}from"../tag/Tag.js";import{CollectionsScreen as p}from"./collectionScreen.js";import{ProductsScreen as m}from"./productScreen.js";import{collectionsReducer as C,selectedColectionsReducer as b,CollectionIdContext as g}from"./reducers.js";import{SearchScreen as v}from"./searchScreen.js";import{SelectedScreen as y}from"./selectedScreen.js";import{ContainerStyle as f,ScrollContainerStyle as j}from"./style.js";import{OUT_OF_STOCK_ACTION as x}from"./type.js";const S=S=>{const{storeId:k,selectedItems:I,onClose:P,visible:F,zIndex:O,limit:T,hideCollectionCheckbox:D,hideProductCheckbox:E,outOfStockAction:w=x.BLUR,hideVariantCheckbox:R,selectProductsFromCustomCollection:B,hideSelectionCount:A,title:L,width:z}=S,[G,H]=s(C,{}),[$,V]=i("collections"),[K,M]=i(""),[U,Y]=i(0),[q,J]=i(!1),[N,Q]=i(0),[W,X]=i(""),[Z,_]=i(!1),[ee,te]=i(!1),[oe,ce]=i(),[se,ie]=s(b,Object.keys(I).length>0?I:{});r((()=>{J(!0),te(!0),S.collectionFetcher(U,k).then((e=>{H({type:"fetched",data:(null==e?void 0:e.collections)||{}}),J(!1),Y((e=>e+1)),te(!1)})).catch()}),[]),r((()=>{let e=0;Object.keys(se||[]).forEach((t=>{var o;Object.keys((null===(o=se[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c,s;Object.keys((null===(s=null===(c=se[t].products)||void 0===c?void 0:c[o])||void 0===s?void 0:s.variants)||[]).forEach((()=>{e+=1}))}))})),Q(e)})),r((()=>{var e;K&&!(null===(e=null==G?void 0:G[K])||void 0===e?void 0:e.products)&&(J(!0),S.productFetcher(K,k).then((e=>{Object.keys(e).length&&H({type:"productsFetched",data:{collectionId:K,products:e}}),J(!1)})).catch())}),[K]),r((()=>{const e=setTimeout((()=>{W.length?(_(!0),S.searchFetcher(k,W).then((e=>{ce(Object.assign({},e)),V("searchProducts"),J(!1),_(!1)}))):V("collections")}),800);return()=>clearTimeout(e)}),[W]);const re=()=>{ie({type:"reset",data:{}})};return e(a,Object.assign({zIndex:O,open:F,onClose:()=>{P(),re()},headingTitle:L||("collections"===$||"products"===$?"Select Products":"view"===$?"Selected Products":"searchProducts"===$?"Searched Products":void 0),footerShadow:!0,centralContainerStyles:{width:z||"480px"},primaryButton:{buttonText:q?"Loading...":"Add",disabled:q||N<1||T&&N>T||!1,onClick:()=>{S.onAdd(se,N),re()}},footerLeftCustomElement:A?e(t,{}):T&&N>T?e(u,{tagText:`You can only select ${T} products`,type:"negative"}):e(n,N>0?{onClick:()=>{V("view")},buttonText:`${N} products selected`,buttonType:"tertiaryGray"}:{disabled:!0,buttonText:`${N} products selected`,buttonType:"tertiaryGray"})},{children:o(f,{children:[S.postHeader&&e("div",Object.assign({style:{padding:"0 24px"}},{children:S.postHeader})),!S.hideGlobalSearch&&e(t,{children:("collections"===$||"searchProducts"===$)&&e("div",Object.assign({style:{padding:"12px 24px",borderBottom:"1px solid #E0E0E0"}},{children:e(d,{noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>Z?e(h,{size:"small",color:l.content.primary}):e(c,{})},id:"listInput",height:"24px",type:"text",value:W,onChangeText:e=>{e.length&&e.trim().length?X(e):X("")}})}))}),o(j,{children:["collections"===$&&e(p,{customCollectionRestriction:S.customCollectionRestriction,dataLoading:ee,collections:G,selectedCollectionsDispatch:ie,setCollectionId:M,setScreen:V,selectedCollections:se,collectionFetcher:S.collectionFetcher,storeId:k,collectionsDispatch:H,setSaveDisabled:J,pagingControls:{curPage:U,setCurPage:Y},hideCollectionCheckbox:D}),"products"===$&&K&&e(g.Provider,Object.assign({value:K},{children:e(m,{hideInCollectionSearch:S.hideInCollectionSearch,customCollectionRestriction:S.customCollectionRestriction,productFetcher:S.productFetcher,setScreen:V,storeId:k,data:G[K],collectionsDispatch:H,selectedCollectionsDispatch:ie,selectedData:se,setSaveDisabled:J,searchInCollectionFetcher:S.searchInCollectionFetcher,hideProductCheckbox:E,outOfStockAction:w,hideVariantCheckbox:R,selectProductsFromCustomCollection:B})})),"view"===$&&e(y,{selectedCollections:se||{},selectedCollectionsDispatch:ie,setScreen:V,collections:G}),"searchProducts"===$&&e(v,{customCollectionRestriction:S.customCollectionRestriction,selectedCollections:se||{},searchedCollections:oe||{},selectedCollectionsDispatch:ie,setScreen:V,collections:G,onBackPress:()=>{X(""),ce({})}})]})]})}))};export{S as ProductPickerModal};
|
|
@@ -12,6 +12,3 @@ export declare const ProductCardStyle: import("styled-components").StyledCompone
|
|
|
12
12
|
}, never>;
|
|
13
13
|
export declare const SelectedScreenHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
14
|
export declare const CollectionNameHolder: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
15
|
-
export declare const VariantCardListStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
|
-
export declare const VariantCardGridStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
-
export declare const StyledHeaderRightIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -4,10 +4,10 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
4
4
|
max-height: 600px;
|
|
5
5
|
min-height: 600px;
|
|
6
6
|
flex-direction: column;
|
|
7
|
-
`,
|
|
7
|
+
`,o=e.div`
|
|
8
8
|
overflow-y: scroll;
|
|
9
9
|
overflow-x: hidden;
|
|
10
|
-
`,
|
|
10
|
+
`,n=e.div`
|
|
11
11
|
height: 64px;
|
|
12
12
|
background-color: ${e=>e.isDisabled?"#F0F0F0":"white"};
|
|
13
13
|
border-bottom: 1px solid #e0e0e0;
|
|
@@ -17,17 +17,17 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
17
17
|
column-gap: 16px;
|
|
18
18
|
justify-content: space-between;
|
|
19
19
|
align-items: center;
|
|
20
|
-
`,
|
|
20
|
+
`,l=e.div`
|
|
21
21
|
display: flex;
|
|
22
22
|
flex-direction: row;
|
|
23
23
|
justify-content: center;
|
|
24
24
|
align-items: center;
|
|
25
25
|
column-gap: 18px;
|
|
26
|
-
`,
|
|
26
|
+
`,d=e.div`
|
|
27
27
|
display: flex;
|
|
28
28
|
flex-direction: column;
|
|
29
29
|
justify-content: center;
|
|
30
|
-
`,
|
|
30
|
+
`,r=e.div`
|
|
31
31
|
display: flex;
|
|
32
32
|
flex-direction: row;
|
|
33
33
|
max-height: 32px;
|
|
@@ -44,7 +44,7 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
44
44
|
padding: 12px 16px;
|
|
45
45
|
border-bottom: 1px solid #e0e0e0;
|
|
46
46
|
align-items: center;
|
|
47
|
-
`,
|
|
47
|
+
`,p=e.div`
|
|
48
48
|
height: 64px;
|
|
49
49
|
background-color: white;
|
|
50
50
|
border-bottom: 1px solid #e0e0e0;
|
|
@@ -55,7 +55,7 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
55
55
|
justify-content: flex-start;
|
|
56
56
|
align-items: center;
|
|
57
57
|
padding-left: ${e=>e.isVariant?"42px":"16px"};
|
|
58
|
-
`,
|
|
58
|
+
`,c=e.div`
|
|
59
59
|
display: flex;
|
|
60
60
|
flex-direction: row;
|
|
61
61
|
max-height: 32px;
|
|
@@ -64,39 +64,7 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
64
64
|
justify-content: flex-start;
|
|
65
65
|
align-items: center;
|
|
66
66
|
padding: 8px 16px;
|
|
67
|
-
`,
|
|
67
|
+
`,a=e.div`
|
|
68
68
|
display: flex;
|
|
69
69
|
flex-direction: column;
|
|
70
|
-
|
|
71
|
-
height: 72px;
|
|
72
|
-
background: white;
|
|
73
|
-
padding: 12px 16px;
|
|
74
|
-
display: flex;
|
|
75
|
-
flex-direction: row;
|
|
76
|
-
gap: 16px;
|
|
77
|
-
align-items: center;
|
|
78
|
-
justify-content: center;
|
|
79
|
-
|
|
80
|
-
.tooltip-title-tag {
|
|
81
|
-
display: flex;
|
|
82
|
-
flex: 1;
|
|
83
|
-
flex-direction: column;
|
|
84
|
-
gap: 2px;
|
|
85
|
-
}
|
|
86
|
-
`,g=e.div`
|
|
87
|
-
height: 72px;
|
|
88
|
-
width: 72px;
|
|
89
|
-
display: flex;
|
|
90
|
-
align-items: center;
|
|
91
|
-
justify-content: center;
|
|
92
|
-
margin: 16px;
|
|
93
|
-
`;e.div`
|
|
94
|
-
display: flex;
|
|
95
|
-
width: 32px;
|
|
96
|
-
height: 32px;
|
|
97
|
-
padding: 6px;
|
|
98
|
-
justify-content: center;
|
|
99
|
-
align-items: center;
|
|
100
|
-
border: 1px solid ${i.stroke.primary};
|
|
101
|
-
border-radius: 4px;
|
|
102
|
-
`;export{l as CollectionCardDetailStyle,d as CollectionCardInfoStyle,o as CollectionCardStyle,c as CollectionNameHolder,t as ContainerStyle,r as ProductCardStyle,x as ProductScreenCollectionCardStyle,p as ProductScreenHeader,n as ScrollContainerStyle,a as SelectedScreenHeader,g as VariantCardGridStyle,s as VariantCardListStyle};
|
|
70
|
+
`;export{d as CollectionCardDetailStyle,l as CollectionCardInfoStyle,n as CollectionCardStyle,a as CollectionNameHolder,t as ContainerStyle,p as ProductCardStyle,x as ProductScreenCollectionCardStyle,r as ProductScreenHeader,o as ScrollContainerStyle,c as SelectedScreenHeader};
|
|
@@ -36,6 +36,11 @@ export declare const BASE_COLORS: {
|
|
|
36
36
|
100: string;
|
|
37
37
|
50: string;
|
|
38
38
|
};
|
|
39
|
+
bikAi: {
|
|
40
|
+
500: string;
|
|
41
|
+
100: string;
|
|
42
|
+
50: string;
|
|
43
|
+
};
|
|
39
44
|
};
|
|
40
45
|
export declare const COLORS: {
|
|
41
46
|
background: {
|
|
@@ -73,6 +78,8 @@ export declare const COLORS: {
|
|
|
73
78
|
subdued: string;
|
|
74
79
|
hovered: string;
|
|
75
80
|
grey: string;
|
|
81
|
+
ai: string;
|
|
82
|
+
aiLight: string;
|
|
76
83
|
};
|
|
77
84
|
content: {
|
|
78
85
|
primary: string;
|
|
@@ -86,6 +93,7 @@ export declare const COLORS: {
|
|
|
86
93
|
warning: string;
|
|
87
94
|
positive: string;
|
|
88
95
|
blue: string;
|
|
96
|
+
ai: string;
|
|
89
97
|
};
|
|
90
98
|
stroke: {
|
|
91
99
|
primary: string;
|
|
@@ -106,6 +114,10 @@ export declare const COLORS: {
|
|
|
106
114
|
blue: {
|
|
107
115
|
lightAlt: string;
|
|
108
116
|
};
|
|
117
|
+
ai: {
|
|
118
|
+
lightAlt: string;
|
|
119
|
+
vibrant: string;
|
|
120
|
+
};
|
|
109
121
|
};
|
|
110
122
|
special: {
|
|
111
123
|
whatsapp: {
|
|
@@ -355,6 +367,8 @@ export declare const DEFAULT_THEME: {
|
|
|
355
367
|
subdued: string;
|
|
356
368
|
hovered: string;
|
|
357
369
|
grey: string;
|
|
370
|
+
ai: string;
|
|
371
|
+
aiLight: string;
|
|
358
372
|
};
|
|
359
373
|
content: {
|
|
360
374
|
primary: string;
|
|
@@ -368,6 +382,7 @@ export declare const DEFAULT_THEME: {
|
|
|
368
382
|
warning: string;
|
|
369
383
|
positive: string;
|
|
370
384
|
blue: string;
|
|
385
|
+
ai: string;
|
|
371
386
|
};
|
|
372
387
|
stroke: {
|
|
373
388
|
primary: string;
|
|
@@ -388,6 +403,10 @@ export declare const DEFAULT_THEME: {
|
|
|
388
403
|
blue: {
|
|
389
404
|
lightAlt: string;
|
|
390
405
|
};
|
|
406
|
+
ai: {
|
|
407
|
+
lightAlt: string;
|
|
408
|
+
vibrant: string;
|
|
409
|
+
};
|
|
391
410
|
};
|
|
392
411
|
special: {
|
|
393
412
|
whatsapp: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={brand:{900:"#28034E",800:"#4B1583",500:"#731DCF",50:"#EFE6F9",10:"#F9F3FF"},grayscale:{900:"#212121",700:"#616161",500:"#9E9E9E",400:"#BDBDBD",200:"#E0E0E0",100:"#F0F0F0",70:"#F7F7F7",50:"#FAFAFA",white:"#FFFFFF",alpha:"#00000088"},negative:{900:"#B92321",700:"#D53434",100:"#FFCED4",50:"#FFEBEF"},warning:{900:"#99631B",500:"#FEC02D",100:"#FFEABE",50:"#FFF7E5"},positive:{900:"#00580E",700:"#1A872C",100:"#C3E4C4",50:"#E6F4E7"}},t={background:{inactive:e.grayscale[200],base:e.grayscale[100],inverse:e.brand[900],inverseLight:e.brand[800],brand:e.brand[500],brandLight:e.brand[50],brandVeryLight:e.brand[10],negative:{vibrant:e.negative[700],light:e.negative[50]},warning:{vibrant:e.warning[500],light:e.warning[50]},positive:{vibrant:e.positive[700],light:e.positive[50]},blue:{light:"#E5F2FF"}},icon:{placeholder:"#9E9E9E"},scrim:{standard:"#00000099"},surface:{standard:e.grayscale.white,subdued:e.grayscale[50],hovered:e.grayscale[100],grey:e.grayscale[70]},content:{primary:e.grayscale[900],secondary:e.grayscale[700],placeholder:e.grayscale[500],inactive:e.grayscale[400],brand:e.brand[500],primaryInverse:e.grayscale.white,secondaryInverse:"#ffffffcc",negative:e.negative[900],warning:e.warning[900],positive:e.positive[900],blue:"#28458F"},stroke:{primary:e.grayscale[200],brand:e.brand[500],negative:{lightAlt:e.negative[100],vibrant:e.negative[700]},warning:{lightAlt:e.warning[100],vibrant:e.warning[500]},positive:{lightAlt:e.positive[100],vibrant:e.positive[700]},brandLightAlt:"#DDCCF0",blue:{lightAlt:"#C3D5E5"}},special:{whatsapp:{brand:"#25D366",gradient:"linear-gradient(360deg, #20B038 0%, #60D66A 100%)",dark:"#455A64",gradientArr:["#20B038","#60D66A"]},brand:{google:"#DD4B39",facebook:"#1877F2"}},text:{primary:e.grayscale[900],secondary:e.grayscale[700],placeholder:e.grayscale[500],disabled:e.grayscale[400],white:e.grayscale.white,brand:e.brand[500],altPrimary:e.brand[900],altSecondary:e.brand[800]}},i={display:{fontWeight:"400",fontSize:32,lineHeight:40,letterSpacing:0},titleXLarge:{fontWeight:"600",fontSize:32,lineHeight:40,letterSpacing:0},titleLarge:{fontWeight:"600",fontSize:28,lineHeight:40,letterSpacing:0},titleMedium:{fontWeight:"600",fontSize:20,lineHeight:28,letterSpacing:0},titleRegular:{fontWeight:"600",fontSize:16,lineHeight:24,letterSpacing:0},titleSmall:{fontWeight:"600",fontSize:14,lineHeight:20,letterSpacing:0},bodyPrimary:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},bodyLarge:{fontWeight:"400",fontSize:20,lineHeight:28,letterSpacing:0},bodySecondary:{fontWeight:"400",fontSize:14,lineHeight:20,letterSpacing:0},caption:{fontWeight:"400",fontSize:12,lineHeight:16,letterSpacing:0},tiny:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0},subHeading:{fontWeight:"600",fontSize:10,lineHeight:12,letterSpacing:0},title1:{fontWeight:"600",fontSize:24,lineHeight:32,letterSpacing:0},title1Mobile:{fontWeight:"600",fontSize:20,lineHeight:30,letterSpacing:0},title2:{fontWeight:"600",fontSize:20,lineHeight:28,letterSpacing:0},title2Mobile:{fontWeight:"600",fontSize:18,lineHeight:24,letterSpacing:0},title3:{fontWeight:"600",fontSize:16,lineHeight:24,letterSpacing:0},title3Mobile:{fontWeight:"500",fontSize:14,lineHeight:20,letterSpacing:0},title4:{fontWeight:"400",fontSize:14,lineHeight:20,letterSpacing:0},textPlaceholder:{fontWeight:"400",fontSize:12,lineHeight:16,letterSpacing:0},title4Mobile:{fontWeight:"400",fontSize:10,lineHeight:16,letterSpacing:0},bodyRegularMobile:{fontWeight:"400",fontSize:14,lineHeight:18,letterSpacing:0},bodyRegular:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},bodySmall:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0},buttonLarge:{fontWeight:"600",fontSize:16,lineHeight:20,letterSpacing:0},buttonRegular:{fontWeight:"600",fontSize:14,lineHeight:20,letterSpacing:0},captionMobile:{fontWeight:"500",fontSize:10,lineHeight:12,letterSpacing:0},captionBold:{fontWeight:"700",fontSize:12,lineHeight:16,letterSpacing:0},text1Bold:{fontWeight:"700",fontSize:10,lineHeight:14,letterSpacing:0},toast:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},toastMobile:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0}},n={colorsV2:t,fonts:i};export{e as BASE_COLORS,t as COLORS,n as DEFAULT_THEME,i as FONTS};
|
|
1
|
+
const e={brand:{900:"#28034E",800:"#4B1583",500:"#731DCF",50:"#EFE6F9",10:"#F9F3FF"},grayscale:{900:"#212121",700:"#616161",500:"#9E9E9E",400:"#BDBDBD",200:"#E0E0E0",100:"#F0F0F0",70:"#F7F7F7",50:"#FAFAFA",white:"#FFFFFF",alpha:"#00000088"},negative:{900:"#B92321",700:"#D53434",100:"#FFCED4",50:"#FFEBEF"},warning:{900:"#99631B",500:"#FEC02D",100:"#FFEABE",50:"#FFF7E5"},positive:{900:"#00580E",700:"#1A872C",100:"#C3E4C4",50:"#E6F4E7"},bikAi:{500:"linear-gradient(93deg, #FF166A 0.37%, #FB5F08 100%)",100:"linear-gradient(93deg, #FEBAD2 0.37%, #FDD1B9 100%)",50:"linear-gradient(93deg, #FFE6EE 0.37%, #FFF0E7 100%)"}},t={background:{inactive:e.grayscale[200],base:e.grayscale[100],inverse:e.brand[900],inverseLight:e.brand[800],brand:e.brand[500],brandLight:e.brand[50],brandVeryLight:e.brand[10],negative:{vibrant:e.negative[700],light:e.negative[50]},warning:{vibrant:e.warning[500],light:e.warning[50]},positive:{vibrant:e.positive[700],light:e.positive[50]},blue:{light:"#E5F2FF"}},icon:{placeholder:"#9E9E9E"},scrim:{standard:"#00000099"},surface:{standard:e.grayscale.white,subdued:e.grayscale[50],hovered:e.grayscale[100],grey:e.grayscale[70],ai:e.bikAi[500],aiLight:e.bikAi[50]},content:{primary:e.grayscale[900],secondary:e.grayscale[700],placeholder:e.grayscale[500],inactive:e.grayscale[400],brand:e.brand[500],primaryInverse:e.grayscale.white,secondaryInverse:"#ffffffcc",negative:e.negative[900],warning:e.warning[900],positive:e.positive[900],blue:"#28458F",ai:e.bikAi[500]},stroke:{primary:e.grayscale[200],brand:e.brand[500],negative:{lightAlt:e.negative[100],vibrant:e.negative[700]},warning:{lightAlt:e.warning[100],vibrant:e.warning[500]},positive:{lightAlt:e.positive[100],vibrant:e.positive[700]},brandLightAlt:"#DDCCF0",blue:{lightAlt:"#C3D5E5"},ai:{lightAlt:e.bikAi[100],vibrant:e.bikAi[500]}},special:{whatsapp:{brand:"#25D366",gradient:"linear-gradient(360deg, #20B038 0%, #60D66A 100%)",dark:"#455A64",gradientArr:["#20B038","#60D66A"]},brand:{google:"#DD4B39",facebook:"#1877F2"}},text:{primary:e.grayscale[900],secondary:e.grayscale[700],placeholder:e.grayscale[500],disabled:e.grayscale[400],white:e.grayscale.white,brand:e.brand[500],altPrimary:e.brand[900],altSecondary:e.brand[800]}},i={display:{fontWeight:"400",fontSize:32,lineHeight:40,letterSpacing:0},titleXLarge:{fontWeight:"600",fontSize:32,lineHeight:40,letterSpacing:0},titleLarge:{fontWeight:"600",fontSize:28,lineHeight:40,letterSpacing:0},titleMedium:{fontWeight:"600",fontSize:20,lineHeight:28,letterSpacing:0},titleRegular:{fontWeight:"600",fontSize:16,lineHeight:24,letterSpacing:0},titleSmall:{fontWeight:"600",fontSize:14,lineHeight:20,letterSpacing:0},bodyPrimary:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},bodyLarge:{fontWeight:"400",fontSize:20,lineHeight:28,letterSpacing:0},bodySecondary:{fontWeight:"400",fontSize:14,lineHeight:20,letterSpacing:0},caption:{fontWeight:"400",fontSize:12,lineHeight:16,letterSpacing:0},tiny:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0},subHeading:{fontWeight:"600",fontSize:10,lineHeight:12,letterSpacing:0},title1:{fontWeight:"600",fontSize:24,lineHeight:32,letterSpacing:0},title1Mobile:{fontWeight:"600",fontSize:20,lineHeight:30,letterSpacing:0},title2:{fontWeight:"600",fontSize:20,lineHeight:28,letterSpacing:0},title2Mobile:{fontWeight:"600",fontSize:18,lineHeight:24,letterSpacing:0},title3:{fontWeight:"600",fontSize:16,lineHeight:24,letterSpacing:0},title3Mobile:{fontWeight:"500",fontSize:14,lineHeight:20,letterSpacing:0},title4:{fontWeight:"400",fontSize:14,lineHeight:20,letterSpacing:0},textPlaceholder:{fontWeight:"400",fontSize:12,lineHeight:16,letterSpacing:0},title4Mobile:{fontWeight:"400",fontSize:10,lineHeight:16,letterSpacing:0},bodyRegularMobile:{fontWeight:"400",fontSize:14,lineHeight:18,letterSpacing:0},bodyRegular:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},bodySmall:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0},buttonLarge:{fontWeight:"600",fontSize:16,lineHeight:20,letterSpacing:0},buttonRegular:{fontWeight:"600",fontSize:14,lineHeight:20,letterSpacing:0},captionMobile:{fontWeight:"500",fontSize:10,lineHeight:12,letterSpacing:0},captionBold:{fontWeight:"700",fontSize:12,lineHeight:16,letterSpacing:0},text1Bold:{fontWeight:"700",fontSize:10,lineHeight:14,letterSpacing:0},toast:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},toastMobile:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0}},n={colorsV2:t,fonts:i};export{e as BASE_COLORS,t as COLORS,n as DEFAULT_THEME,i as FONTS};
|