@bikdotai/bik-component-library 0.0.655-9 → 0.0.655-beta.0
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/assets/icons/bik_livechat.svg.js +1 -0
- package/dist/cjs/components/avatar/Avatar.d.ts +3 -1
- package/dist/cjs/components/avatar/Avatar.js +1 -1
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/components/data-source-panel/DataSourceInfoFooter.d.ts +1 -2
- package/dist/cjs/components/data-source-panel/DataSourceInfoFooter.js +1 -1
- package/dist/cjs/components/data-source-panel/DataSourcePanel.d.ts +5 -7
- package/dist/cjs/components/data-source-panel/DataSourcePanel.js +1 -1
- package/dist/cjs/components/data-source-panel/model.d.ts +7 -10
- package/dist/cjs/components/data-source-panel/model.js +1 -1
- package/dist/cjs/components/product-picker-v2/modal.js +1 -1
- package/dist/cjs/components/product-picker-v2/utility.d.ts +2 -2
- package/dist/cjs/components/product-picker-v2/utility.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.js +2 -2
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.d.ts +4 -4
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +1 -1
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.d.ts +5 -7
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +1 -1
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.js +3 -4
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/assets/icons/bik_livechat.svg.js +1 -0
- package/dist/esm/components/avatar/Avatar.d.ts +3 -1
- package/dist/esm/components/avatar/Avatar.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/components/data-source-panel/DataSourceInfoFooter.d.ts +1 -2
- package/dist/esm/components/data-source-panel/DataSourceInfoFooter.js +1 -1
- package/dist/esm/components/data-source-panel/DataSourcePanel.d.ts +5 -7
- package/dist/esm/components/data-source-panel/DataSourcePanel.js +1 -1
- package/dist/esm/components/data-source-panel/model.d.ts +7 -10
- package/dist/esm/components/data-source-panel/model.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.js +1 -1
- package/dist/esm/components/product-picker-v2/utility.d.ts +2 -2
- package/dist/esm/components/product-picker-v2/utility.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.js +1 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.d.ts +4 -4
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +1 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.d.ts +5 -7
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +1 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.js +3 -4
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./amplitude/index.js"),r=require("./components/template-preview/constants/regexPatterns.js"),t=require("./utils/StringUtils.js"),o=require("./constants/Theme.js"),n=require("./constants/zindex.js"),a=require("./components/checkBox/CheckBox.js"),i=require("./components/list-item/ListItem.js"),s=require("./components/pagination/Pagination.js"),p=require("./components/radioButton/RadioButton.js"),u=require("./components/toaster/Toaster.js"),c=require("./components/tooltips/Tooltip.js"),l=require("./components/spinner/Spinner.js"),d=require("./components/stepper/Stepper.js"),m=require("./components/tag/Tag.js"),T=require("./components/icon-button/IconButton.js"),x=require("./components/template-preview/TemplatePreview.js"),P=require("./components/template-preview/WhatsApp/WhatsAppLikePreview.js"),S=require("./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),A=require("./components/template-preview/helpers/SmsTemplateHelper.js"),C=require("./components/template-preview/helpers/WhatsAppFormatToHTML.js"),y=require("./components/template-preview/helpers/VariableEditorHelper.js"),O=require("./components/template-preview/models/TemplateMeta.js"),b=require("./components/template-preview/models/WhatsAppTemplate.js"),j=require("./components/template-preview/models/Channels.js"),E=require("./components/template-context-mapper/TemplateContextMapper.js"),R=require("./components/template-context-mapper/utils/getDataFromTemplateComponent.js"),h=require("./components/template-context-mapper/utils/validateIsUrl.js");require("./_virtual/_tslib.js");var g=require("./components/template-context-mapper/modalElements/TemplateAnalyticsSkeleton.js"),B=require("./components/template-context-mapper/modalElements/TemplateAnalyticsComponent.js"),I=require("./components/fab-menu/FABMenu.js"),_=require("./components/floating-action-button/FloatingActionButton.js"),q=require("./components/floating-action-button/FloatingActionButton.styles.js"),f=require("./components/image-compress/ImageCompress.js"),D=require("./components/TypographyStyle.js"),N=require("./components/button/Button.js"),w=require("./components/progress-bar/ProgressBarComponent.js");require("react/jsx-runtime");var L=require("./components/progress-bar-v2/ProgressBarV2.js"),k=require("./components/QueryBuilder/QueryBuilder.js"),M=require("./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),V=require("./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js"),v=require("./components/QueryBuilder/redux/queryBuilder.reducer.js"),U=require("./components/QueryBuilder/redux/queryBuilderCache.reducer.js"),G=require("./components/QueryBuilder/types/QueryBuilderOperator.type.js"),F=require("./components/modals/styledModal.js"),H=require("./components/dropdown/DropdownPopover/index.js"),W=require("./components/dropdown/Dropdown.js"),Y=require("./components/dropdown/ChipDropdown.js"),Q=require("./components/dropdown/OpenedDropdown/components/OpennedDropdown.js"),K=require("./components/dropdown/MenuItem/MenuItem.js"),z=require("./components/analytics-card/AnalyticsCard.js"),Z=require("./components/analytics-card/AnalyticsCard.styled.js"),X=require("./components/input/Input.js"),J=require("./components/analytics-chips-and-dropdowns/AnalyticsChip.js"),$=require("./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js"),ee=require("./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js"),re=require("./components/analytics-chips-and-dropdowns/AnalyticsMetric.js"),te=require("./components/analytics-chips-and-dropdowns/AnalyticsTrend.js"),oe=require("./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),ne=require("./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js"),ae=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),ie=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),se=require("./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),pe=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),ue=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js"),ce=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js"),le=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),de=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js"),me=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),Te=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js"),xe=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),Pe=require("./components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.js"),Se=require("./components/avatar/Avatar.js"),Ae=require("./components/avatar/AvatarHelper.js"),Ce=require("./components/alerts/Alert.js"),ye=require("./components/alerts/AlertHelper.js"),Oe=require("./components/thumbnail/Thumbnail.js"),be=require("./components/curtain/Curtain.js"),je=require("./components/datePicker/DatePicker.js"),Ee=require("./components/datePicker/DatePickerWrapper.js"),Re=require("./components/switch/Switch.js"),he=require("./components/plans/SubscriptionPlan.js"),ge=require("./components/plans/SubscriptionPlanSelector.js"),Be=require("./components/plans/NewSubscriptionPlan.js"),Ie=require("./components/plans/SubscriptionPlansCollected.js"),_e=require("./components/tabs/Tabs.js"),qe=require("./components/dynamic-tabs/DynamicTabs.js"),fe=require("./components/shimmer/ShimmerComponent/BikShimmer.js"),De=require("./components/TablePagination/TablePagination.js"),Ne=require("./components/TablePagination/TablePaginationCard.js"),we=require("./components/states-modal/StateModalComponent.js"),Le=require("./components/states-modal/DeleteConfirmationModal.js"),ke=require("./components/states/StateComponent.js"),Me=require("./components/states/ShopifyScopeWrapper.js"),Ve=require("./components/WhatsAppTextEditor/WhatsAppTextEditor.js"),ve=require("./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),Ue=require("./helpers/BaseWhatsappContentLang.helper.js"),Ge=require("./components/curtain/CurtainHelper.js"),Fe=require("./utils/resizeImage.js"),He=require("./components/variable-picker-v3/model.js"),We=require("./components/card-selection-modal/CardSelectionModal.js"),Ye=require("./components/image-cropper/BikImageCropper.js"),Qe=require("./components/image-cropper/BikImagePipeline/BikImagePipeline.js"),Ke=require("./components/buttonGroup/ButtonGroup.js"),ze=require("./components/accordion/Accordion.js"),Ze=require("./components/file-uploader/FileUploader.js"),Xe=require("./components/colourInput/ColourInput.js"),Je=require("./components/bik-layout/BikHeader.js"),$e=require("./components/bik-layout/BikLayout.js"),er=require("./components/bik-layout/BikProfile.js"),rr=require("./components/bik-layout/SimpleSidebar.js"),tr=require("./components/bik-layout/BikSidebar.js"),or=require("./components/bik-layout/FeatureModal.js"),nr=require("./components/bik-layout/SidebarSkeleton.js"),ar=require("./components/bik-layout/ShowShopifyRestrictedModal.js"),ir=require("./components/bik-layout/FeatureModalV2.js"),sr=require("./components/searchBar/searchBar.js"),pr=require("./components/custom-date-time/CustomDateTime.js"),ur=require("./components/product-picker/ProductPickerModal.js"),cr=require("./components/discount-modal/DiscountModal.js"),lr=require("./components/discount-modal/CouponExpiration/CouponExpiration.js"),dr=require("./components/discount-modal/type.js"),mr=require("./components/country-code-picker/CountryCodePicker.js"),Tr=require("./components/country-code-picker/CountryCodePicker.modal.js"),xr=require("./components/shimmer-image/ShimmerImage.js"),Pr=require("./components/product-picker-v2/modal.js"),Sr=require("./components/carousel/carousel.js"),Ar=require("./components/carousel-secondary/CarouselSecondary.js"),Cr=require("./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js"),yr=require("./components/radioList/RadioList.js"),Or=require("./components/checkList/CheckList.js"),br=require("./components/postPicker/postPicker.js"),jr=require("./components/dropdown-button/DropdownButton.js"),Er=require("./components/side-modal/SideModal.js"),Rr=require("./components/keywords-input/KeywordsInput.js"),hr=require("./components/add-variableV2/AddVariableV2SideModal.js"),gr=require("./components/add-variableV2/AddVariableV2.js"),Br=require("./components/navigation-hyperlink/NavigationHyperlink.js"),Ir=require("./components/SearchFilter/index.js"),_r=require("./components/input-with-vars/InputWithVariables.js"),qr=require("./components/dashboard-review-popup/DashboardReviewPopUp.js"),fr=require("./components/star-rating/StarRating.js"),Dr=require("./components/testimonial-card/TestimonialCard.js"),Nr=require("./components/slider/slider.js"),wr=require("./components/resizeImage/index.js"),Lr=require("./utils/validator.js"),kr=require("./components/carousel-preview/CarouselPreview.js"),Mr=require("./components/floater/floater.js"),Vr=require("./components/card-selector/CardSelector.js"),vr=require("./components/card-selector/CardSelectorGroup.js"),Ur=require("./components/variable-picker-v3/VariablePicker.js"),Gr=require("./components/action-button/ActionButtons.js"),Fr=require("./components/ai-modals/ActivateBikAI.js"),Hr=require("./components/ai-modals/AiSyncProgress.js"),Wr=require("./components/ai-modals/AiCreditsExhausted.js"),Yr=require("./components/ai-modals/AiCreditsLow.js"),Qr=require("./components/input-with-vars/customPortal.js"),Kr=require("./components/floating-input-dropdown/FloatingInputDropdown.js"),zr=require("./components/dropdown/MultilevelDropdownPopover/index.js"),Zr=require("./components/dropShadow/DropShadow.js"),Xr=require("./components/multi-level-dropdown/MultiLevelDropdown.js"),Jr=require("./components/data-source-panel/DataSourcePanel.js"),$r=require("./components/unsatisfactory-response-list/UnsatisfactoryResponseList.js"),et=require("./components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js"),rt=require("./components/data-source-panel/model.js");exports.AmplitudeEvent=e.AmplitudeEvent,exports.regexPatterns=r,exports.StringUtils=t.default,exports.BASE_COLORS=o.BASE_COLORS,exports.COLORS=o.COLORS,exports.DEFAULT_THEME=o.DEFAULT_THEME,exports.FONTS=o.FONTS,exports.ComponentZindex=n.ComponentZindex,exports.CheckBox=a.CheckBox,exports.ListItem=i.ListItem,exports.Pagination=s.Pagination,exports.RadioButton=p.RadioButton,exports.Toaster=u.Toaster,exports.Tooltip=c.Tooltip,exports.PureSpinner=l.PureSpinner,exports.Spinner=l.Spinner,exports.Stepper=d.Stepper,exports.Tag=m.Tag,exports.IconButton=T.IconButton,exports.TemplatePreview=x.TemplatePreview,exports.WhatsappLikePreview=P.WhatsappLikePreview,exports.WhatsappLikePreviewV2=S.WhatsappLikePreviewV2,exports.renderVariableUIForPreview=A.renderVariableUIForPreview,exports.WhatsAppFormatToHTML=C.WhatsAppFormatToHTML,exports.VariableEditorHelper=y.VariableEditorHelper,Object.defineProperty(exports,"ACTIONS_TYPES",{enumerable:!0,get:function(){return O.ACTIONS_TYPES}}),exports.CUSTOM_URL_NAME=O.CUSTOM_URL_NAME,Object.defineProperty(exports,"HEADER_TYPES",{enumerable:!0,get:function(){return O.HEADER_TYPES}}),exports.STATIC_URL_CTA_OPTION=O.STATIC_URL_CTA_OPTION,Object.defineProperty(exports,"TEMPLATE_EDITOR",{enumerable:!0,get:function(){return O.TEMPLATE_EDITOR}}),Object.defineProperty(exports,"TEMPLATE_STATUS",{enumerable:!0,get:function(){return O.TEMPLATE_STATUS}}),Object.defineProperty(exports,"BUTTON_TYPE",{enumerable:!0,get:function(){return b.BUTTON_TYPE}}),Object.defineProperty(exports,"POD",{enumerable:!0,get:function(){return b.POD}}),Object.defineProperty(exports,"TEMPLATE_QUALITY",{enumerable:!0,get:function(){return b.TEMPLATE_QUALITY}}),Object.defineProperty(exports,"CHANNEL_TYPE",{enumerable:!0,get:function(){return j.CHANNEL_TYPE}}),exports.TemplateContextMapper=E.TemplateContextMapper,exports.getAllDataFromTemplateComponent=R.getAllDataFromTemplateComponent,exports.getAllDataFromWebpushTemplateComponent=R.getAllDataFromWebpushTemplateComponent,exports.isVariable=h.isVariable,exports.validateIsUrl=h.validateIsUrl,exports.TemplateAnalyticsSkeleton=g.TemplateAnalyticsSkeleton,exports.AnalyticsItem=B.AnalyticsItem,exports.RightPanelTemplateAnalytics=B.RightPanelTemplateAnalytics,exports.TemplateAnalyticsComponent=B.TemplateAnalyticsComponent,exports.FABMenu=I.FABMenu,exports.FloatingActionButton=_.FloatingActionButton,Object.defineProperty(exports,"DROP_POSITION",{enumerable:!0,get:function(){return q.DROP_POSITION}}),exports.DropdownToggleContainer=q.DropdownToggleContainer,Object.defineProperty(exports,"FAB_POSITION",{enumerable:!0,get:function(){return q.FAB_POSITION}}),exports.FloatingActionButtonContainer=q.FloatingActionButtonContainer,exports.FloatingActionButtonOuterContainer=q.FloatingActionButtonOuterContainer,Object.defineProperty(exports,"MENU_ALIGNMENT",{enumerable:!0,get:function(){return q.MENU_ALIGNMENT}}),exports.StyledDropdown=q.StyledDropdown,exports.TooltipStyled=q.TooltipStyled,exports.ImageService=f.ImageService,exports.AiBodyCaption=D.AiBodyCaption,exports.AiBodyTiny=D.AiBodyTiny,exports.BodyCaption=D.BodyCaption,exports.BodyLarge=D.BodyLarge,exports.BodyPrimary=D.BodyPrimary,exports.BodyPrimaryLink=D.BodyPrimaryLink,exports.BodyRegular=D.BodyRegular,exports.BodySecondary=D.BodySecondary,exports.BodySecondaryLink=D.BodySecondaryLink,exports.BodySmall=D.BodySmall,exports.BodyTiny=D.BodyTiny,exports.ButtonLarge=D.ButtonLarge,exports.ButtonLargeAI=D.ButtonLargeAI,exports.ButtonRegular=D.ButtonRegular,exports.ButtonRegularAI=D.ButtonRegularAI,exports.Caption=D.Caption,exports.CaptionBold=D.CaptionBold,exports.Display=D.Display,exports.SmallRegular=D.SmallRegular,exports.SubHeading=D.SubHeading,exports.TextPlaceholder=D.TextPlaceholder,exports.Tiny=D.Tiny,exports.TitleFour=D.TitleFour,exports.TitleLarge=D.TitleLarge,exports.TitleMedium=D.TitleMedium,exports.TitleRegular=D.TitleRegular,exports.TitleSmall=D.TitleSmall,exports.TitleXlarge=D.TitleXlarge,exports.Button=N.Button,exports.ProgressBarComponent=w.ProgressBarComponent,exports.ProgressCompletedBar=w.ProgressCompletedBar,Object.defineProperty(exports,"ProgressBarType",{enumerable:!0,get:function(){return L.ProgressBarType}}),exports.ProgressBarV2=L.ProgressBarV2,Object.defineProperty(exports,"TextAlignment",{enumerable:!0,get:function(){return L.TextAlignment}}),exports.QueryBuilder=k.QueryBuilder,exports.BaseQueryBuilderNode=M.BaseQueryBuilderNode,exports.PropertyNode=V.PropertyNode,exports.PropertyNodeHeadless=V.PropertyNodeHeadless,exports.queryBuilderSlice=v.queryBuilderSlice,exports.queryBuilderCacheSlice=U.queryBuilderCacheSlice,Object.defineProperty(exports,"AD_STRING_OPERATORS",{enumerable:!0,get:function(){return G.AD_STRING_OPERATORS}}),Object.defineProperty(exports,"ANY_AD_OPERATORS",{enumerable:!0,get:function(){return G.ANY_AD_OPERATORS}}),Object.defineProperty(exports,"ANY_IG_OPERATORS",{enumerable:!0,get:function(){return G.ANY_IG_OPERATORS}}),Object.defineProperty(exports,"BOOLEAN_OPERATORS",{enumerable:!0,get:function(){return G.BOOLEAN_OPERATORS}}),Object.defineProperty(exports,"DATE_OPERATORS",{enumerable:!0,get:function(){return G.DATE_OPERATORS}}),Object.defineProperty(exports,"EVENT_VALUES",{enumerable:!0,get:function(){return G.EVENT_VALUES}}),Object.defineProperty(exports,"EXACTLY_OPERATORS",{enumerable:!0,get:function(){return G.EXACTLY_OPERATORS}}),Object.defineProperty(exports,"FREQUENCY_OPERATORS",{enumerable:!0,get:function(){return G.FREQUENCY_OPERATORS}}),Object.defineProperty(exports,"ICE_BREAKER_OPERATORS",{enumerable:!0,get:function(){return G.ICE_BREAKER_OPERATORS}}),Object.defineProperty(exports,"IG_STRING_OPERATORS",{enumerable:!0,get:function(){return G.IG_STRING_OPERATORS}}),Object.defineProperty(exports,"INTEGER_OPERATORS",{enumerable:!0,get:function(){return G.INTEGER_OPERATORS}}),Object.defineProperty(exports,"MAIL_SUBJECT_OPERATORS",{enumerable:!0,get:function(){return G.MAIL_SUBJECT_OPERATORS}}),Object.defineProperty(exports,"REACTION_OPERATORS",{enumerable:!0,get:function(){return G.REACTION_OPERATORS}}),Object.defineProperty(exports,"SPECIFIC_IG_OPERATORS",{enumerable:!0,get:function(){return G.SPECIFIC_IG_OPERATORS}}),Object.defineProperty(exports,"STRING_OPERATORS",{enumerable:!0,get:function(){return G.STRING_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS",{enumerable:!0,get:function(){return G.STRING_RESTRICTED_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_2",{enumerable:!0,get:function(){return G.STRING_RESTRICTED_OPERATORS_2}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_3",{enumerable:!0,get:function(){return G.STRING_RESTRICTED_OPERATORS_3}}),exports.StyledModal=F.StyledModal,exports.DropdownPopover=H.DropdownPopover,exports.Dropdown=W.Dropdown,exports.ChipDropdown=Y.ChipDropdown,exports.ChipDropdownContainer=Y.ChipDropdownContainer,exports.OpenedDropdown=Q.OpenedDropdown,exports.MenuItemDropdown=K.MenuItemDropdown,exports.AnalyticsCard=z.AnalyticsCard,exports.AnalyticsContainer=Z.AnalyticsContainer,exports.CardDataContainer=Z.CardDataContainer,exports.Input=X.Input,exports.AnalyticsChip=J.AnalyticsChip,exports.AnalyticsDropdown=$.AnalyticsDropdown,exports.EachItem=$.EachItem,exports.formatDate=$.formatDate,exports.AnalyticsMultiChip=ee.AnalyticsMultiChip,exports.AnalyticsMetric=re.AnalyticsMetric,exports.AnalyticsTrend=te.AnalyticsTrend,exports.LineChart=oe.LineChart,exports.LinearChipGroupedChart=ne.LinearChipGroupedChart,exports.Card=ae.Card,exports.PieChartAnalytics=ae.PieChartAnalytics,exports.PieChart=ie.PieChart,exports.HorizontalGraph=se.HorizontalGraph,exports.StackedBarChart=pe.StackedBarChart,exports.StackedBarDistributionChart=ue.StackedBarDistributionChart,Object.defineProperty(exports,"GRAPH_ORIENTATION",{enumerable:!0,get:function(){return ce.GRAPH_ORIENTATION}}),exports.VerticalGraph=le.VerticalGraph,exports.FunnelVerticalBarGraph=de.FunnelVerticalBarGraph,Object.defineProperty(exports,"HEAT",{enumerable:!0,get:function(){return me.HEAT}}),exports.HEAT_COLORS=me.HEAT_COLORS,Object.defineProperty(exports,"HEAT_GRADING_TYPE",{enumerable:!0,get:function(){return me.HEAT_GRADING_TYPE}}),exports.HeatMap=me.HeatMap,exports.HeatBoxStyled=Te.HeatBoxStyled,exports.HeatMapVertical=Te.HeatMapVertical,exports.VerticalBarAndLinearGraph=xe.VerticalBarAndLinearGraph,Object.defineProperty(exports,"TruncateValue",{enumerable:!0,get:function(){return Pe.TruncateValue}}),exports.calculatePercentage=Pe.calculatePercentage,exports.roundNumber=Pe.roundNumber,exports.truncateValueForIndianStore=Pe.truncateValueForIndianStore,exports.truncateValueForInternationalStore=Pe.truncateValueForInternationalStore,exports.truncateValueTo10K=Pe.truncateValueTo10K,exports.truncateValueToA=Pe.truncateValueToA,exports.truncateValueToB=Pe.truncateValueToB,exports.truncateValueToC=Pe.truncateValueToC,exports.truncateValueToK=Pe.truncateValueToK,exports.truncateValueToL=Pe.truncateValueToL,exports.truncateValueToM=Pe.truncateValueToM,exports.truncateValueToT=Pe.truncateValueToT,exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=Se.AVATAR_SIZE_VS_ICON_SIZE_MAP,exports.Avatar=Se.Avatar,exports.BACKGROUND_VS_TEXT_COLOR_MAP=Se.BACKGROUND_VS_TEXT_COLOR_MAP,Object.defineProperty(exports,"MESSAGE_CHANNELS",{enumerable:!0,get:function(){return Se.MESSAGE_CHANNELS}}),Object.defineProperty(exports,"AVATAR_BACKGROUND",{enumerable:!0,get:function(){return Ae.AVATAR_BACKGROUND}}),exports.AVATAR_SIZE_MAP=Ae.AVATAR_SIZE_MAP,Object.defineProperty(exports,"AVATAR_TYPES",{enumerable:!0,get:function(){return Ae.AVATAR_TYPES}}),Object.defineProperty(exports,"SIZE",{enumerable:!0,get:function(){return Ae.SIZE}}),exports.Alert=Ce.Alert,Object.defineProperty(exports,"ALERT_TYPES",{enumerable:!0,get:function(){return ye.ALERT_TYPES}}),exports.COLOR_CONFIG_MAP=ye.COLOR_CONFIG_MAP,Object.defineProperty(exports,"CONTENT_POSITION",{enumerable:!0,get:function(){return ye.CONTENT_POSITION}}),Object.defineProperty(exports,"RATIO",{enumerable:!0,get:function(){return Oe.RATIO}}),exports.Thumbnail=Oe.Thumbnail,exports.Curtain=be.Curtain,exports.DatePicker=je.DatePicker,Object.defineProperty(exports,"DateButtonType",{enumerable:!0,get:function(){return Ee.DateButtonType}}),exports.DatePickerWrapper=Ee.DatePickerWrapper,exports.Loader=Re.Loader,exports.Switch=Re.Switch,exports.SwitchContainer=Re.SwitchContainer,exports.Thumb=Re.Thumb,exports.SubscriptionPlan=he.SubscriptionPlan,exports.BottomWrapper=ge.BottomWrapper,exports.HeaderWrapper=ge.HeaderWrapper,exports.SubscriptionPlanSelector=ge.SubscriptionPlanSelector,exports.defaultTabs=ge.defaultTabs,exports.NewSubscriptionPlan=Be.NewSubscriptionPlan,exports.SubscriptionPlansCollected=Ie.SubscriptionPlansCollected,exports.TabItemComponent=_e.TabItemComponent,exports.Tabs=_e.Tabs,exports.DynamicTabs=qe.DynamicTabs,exports.BikShimmer=fe.BikShimmer,exports.TablePagination=De.TablePagination,exports.TablePaginationCard=Ne.TablePaginationCard,exports.TablePaginationCardStyled=Ne.TablePaginationCardStyled,exports.StateModalComponent=we.StateModalComponent,exports.DeleteConfirmationModal=Le.DeleteConfirmationModal,Object.defineProperty(exports,"ButtonActions",{enumerable:!0,get:function(){return ke.ButtonActions}}),Object.defineProperty(exports,"ButtonTypes",{enumerable:!0,get:function(){return ke.ButtonTypes}}),exports.StateComponent=ke.StateComponent,Object.defineProperty(exports,"StateInterface",{enumerable:!0,get:function(){return ke.StateInterface}}),exports.ShopifyScopeWrapper=Me.ShopifyScopeWrapper,exports.WhatsAppTextEditor=Ve.WhatsAppTextEditor,exports.CustomRightBorder=ve.CustomRightBorder,Object.defineProperty(exports,"EditorActionTypes",{enumerable:!0,get:function(){return ve.EditorActionTypes}}),exports.WhatsAppTextEditorHeader=ve.WhatsAppTextEditorHeader,exports.BaseWhatsappContentLangHelper=Ue.BaseWhatsappContentLangHelper,exports.CURTAIN_COLOR_CONFIG_MAP=Ge.CURTAIN_COLOR_CONFIG_MAP,Object.defineProperty(exports,"CURTAIN_MODE",{enumerable:!0,get:function(){return Ge.CURTAIN_MODE}}),Object.defineProperty(exports,"CURTAIN_TYPES",{enumerable:!0,get:function(){return Ge.CURTAIN_TYPES}}),exports.resizeImage=Fe.resizeImage,Object.defineProperty(exports,"PickerType",{enumerable:!0,get:function(){return He.PickerType}}),exports.CardSelectionModal=We.CardSelectionModal,exports.BikImageCropper=Ye.BikImageCropper,exports.BikImagePipeline=Qe.BikImagePipeline,exports.ButtonGroup=Ke.ButtonGroup,exports.BikAccordion=ze.BikAccordion,exports.FileUploader=Ze.FileUploader,exports.ColourInput=Xe.ColourInput,exports.BikHeader=Je.BikHeader,exports.BikLayout=$e.BikLayout,exports.BikProfile=er.BikProfile,exports.SimpleSidebar=rr.SimpleSidebar,exports.BikSidebar=tr.BikSidebar,exports.FeatureModal=or.FeatureModal,exports.SidebarSkeleton=nr.SidebarSkeleton,exports.ShowShopifyRestrictedModal=ar.ShowShopifyRestrictedModal,exports.FeatureModalV2=ir.FeatureModalV2,exports.SearchBar=sr.SearchBar,exports.CustomDateTime=pr.CustomDateTime,exports.PricePleaseProductPicker=ur.PricePleaseProductPicker,exports.ProductPickerContent=ur.ProductPickerContent,exports.DiscountModal=cr.DiscountModal,exports.CouponExpiration=lr.CouponExpiration,Object.defineProperty(exports,"COUPON_EXPIRATION",{enumerable:!0,get:function(){return dr.COUPON_EXPIRATION}}),Object.defineProperty(exports,"DISCOUNT_APPLIES_TO",{enumerable:!0,get:function(){return dr.DISCOUNT_APPLIES_TO}}),Object.defineProperty(exports,"DISCOUNT_TARGET_SELECTION",{enumerable:!0,get:function(){return dr.DISCOUNT_TARGET_SELECTION}}),Object.defineProperty(exports,"DISCOUNT_TARGET_TYPES",{enumerable:!0,get:function(){return dr.DISCOUNT_TARGET_TYPES}}),Object.defineProperty(exports,"DISCOUNT_TYPES",{enumerable:!0,get:function(){return dr.DISCOUNT_TYPES}}),Object.defineProperty(exports,"DISCOUNT_VALUE_TYPES",{enumerable:!0,get:function(){return dr.DISCOUNT_VALUE_TYPES}}),Object.defineProperty(exports,"MIN_PURCHASE_REQUIREMENT",{enumerable:!0,get:function(){return dr.MIN_PURCHASE_REQUIREMENT}}),Object.defineProperty(exports,"OFFER_APPLIES_TO",{enumerable:!0,get:function(){return dr.OFFER_APPLIES_TO}}),exports.initialDynamicCouponErrorState=dr.initialDynamicCouponErrorState,exports.initialStaticCouponErrorState=dr.initialStaticCouponErrorState,exports.CountryCodePicker=mr.CountryCodePicker,exports.CountriesData=Tr.CountriesData,exports.DEFAULT_IMAGE=xr.DEFAULT_IMAGE,exports.ShimmerImage=xr.ShimmerImage,exports.ProductPickerModal=Pr.ProductPickerModal,Object.defineProperty(exports,"ScreenName",{enumerable:!0,get:function(){return Pr.ScreenName}}),exports.Carousel=Sr.Carousel,exports.CarouselSecondary=Ar.CarouselSecondary,Object.defineProperty(exports,"CarouselVersion",{enumerable:!0,get:function(){return Ar.CarouselVersion}}),exports.AccessTokenTroubleshootDialog=Cr.AccessTokenTroubleshootDialog,exports.RadioList=yr.RadioList,exports.CheckList=Or.CheckList,Object.defineProperty(exports,"DateKeys",{enumerable:!0,get:function(){return br.DateKeys}}),Object.defineProperty(exports,"MEDIA_TYPES",{enumerable:!0,get:function(){return br.MEDIA_TYPES}}),exports.PostPicker=br.PostPicker,exports.dateOptions=br.dateOptions,exports.DropdownButton=jr.DropdownButton,exports.SideModal=Er.SideModal,exports.KeywordsInput=Rr.KeywordsInput,exports.AddVariableV2SideModal=hr.AddVariableV2SideModal,exports.AddVariableV2=gr.AddVariableV2,exports.NaLinkWrapper=Br.NaLinkWrapper,exports.NavigationHyperlink=Br.NavigationHyperlink,exports.SearchFilter=Ir.SearchFilter,exports.InputWithVariables=_r.InputWithVariables,exports.DashboardReviewPopUp=qr.DashboardReviewPopUp,exports.StarRating=fr.StarRating,exports.TestimonialCard=Dr.TestimonialCard,exports.BikSlider=Nr.BikSlider,exports.ResizableImage=wr.ResizableImage,exports.validateURL=Lr.validateURL,exports.CarouselPreview=kr.CarouselPreview,exports.Floater=Mr.Floater,exports.CardSelector=Vr.CardSelector,exports.CardSelectorGroup=vr.CardSelectorGroup,exports.VariablePicker=Ur.VariablePicker,exports.ActionButtons=Gr.ActionButtons,exports.ActivateBikAi=Fr.ActivateBikAi,exports.AiSyncProgress=Hr.AiSyncProgress,exports.AiCreditsExhausted=Wr.AiCreditsExhausted,exports.AiCreditsLow=Yr.AiCreditsLow,exports.CustomPortal=Qr.CustomPortal,exports.FloatingInputDropdown=Kr.FloatingInputDropdown,exports.MultilevelDropdownPopover=zr.MultilevelDropdownPopover,exports.DropShadow=Zr.DropShadow,exports.MultiLevelDropdown=Xr.MultiLevelDropdown,exports.DataSourcePanel=Jr.DataSourcePanel,exports.UnsatisfactoryResponseList=$r.UnsatisfactoryResponseList,exports.UnsatisfactoryCountIntentWiseModal=et.UnsatisfactoryCountIntentWiseModal,Object.defineProperty(exports,"AppType",{enumerable:!0,get:function(){return rt.AppType}}),Object.defineProperty(exports,"CustomDataCategories",{enumerable:!0,get:function(){return rt.CustomDataCategories}}),Object.defineProperty(exports,"CustomDataType",{enumerable:!0,get:function(){return rt.CustomDataType}});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./amplitude/index.js"),r=require("./components/template-preview/constants/regexPatterns.js"),t=require("./utils/StringUtils.js"),o=require("./constants/Theme.js"),n=require("./constants/zindex.js"),a=require("./components/checkBox/CheckBox.js"),i=require("./components/list-item/ListItem.js"),s=require("./components/pagination/Pagination.js"),p=require("./components/radioButton/RadioButton.js"),u=require("./components/toaster/Toaster.js"),c=require("./components/tooltips/Tooltip.js"),l=require("./components/spinner/Spinner.js"),d=require("./components/stepper/Stepper.js"),m=require("./components/tag/Tag.js"),T=require("./components/icon-button/IconButton.js"),x=require("./components/template-preview/TemplatePreview.js"),P=require("./components/template-preview/WhatsApp/WhatsAppLikePreview.js"),S=require("./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),A=require("./components/template-preview/helpers/SmsTemplateHelper.js"),C=require("./components/template-preview/helpers/WhatsAppFormatToHTML.js"),y=require("./components/template-preview/helpers/VariableEditorHelper.js"),O=require("./components/template-preview/models/TemplateMeta.js"),b=require("./components/template-preview/models/WhatsAppTemplate.js"),j=require("./components/template-preview/models/Channels.js"),E=require("./components/template-context-mapper/TemplateContextMapper.js"),R=require("./components/template-context-mapper/utils/getDataFromTemplateComponent.js"),h=require("./components/template-context-mapper/utils/validateIsUrl.js");require("./_virtual/_tslib.js");var g=require("./components/template-context-mapper/modalElements/TemplateAnalyticsSkeleton.js"),B=require("./components/template-context-mapper/modalElements/TemplateAnalyticsComponent.js"),I=require("./components/fab-menu/FABMenu.js"),_=require("./components/floating-action-button/FloatingActionButton.js"),q=require("./components/floating-action-button/FloatingActionButton.styles.js"),f=require("./components/image-compress/ImageCompress.js"),D=require("./components/TypographyStyle.js"),N=require("./components/button/Button.js"),w=require("./components/progress-bar/ProgressBarComponent.js");require("react/jsx-runtime");var L=require("./components/progress-bar-v2/ProgressBarV2.js"),k=require("./components/QueryBuilder/QueryBuilder.js"),M=require("./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),V=require("./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js"),v=require("./components/QueryBuilder/redux/queryBuilder.reducer.js"),U=require("./components/QueryBuilder/redux/queryBuilderCache.reducer.js"),G=require("./components/QueryBuilder/types/QueryBuilderOperator.type.js"),F=require("./components/modals/styledModal.js"),H=require("./components/dropdown/DropdownPopover/index.js"),W=require("./components/dropdown/Dropdown.js"),Y=require("./components/dropdown/ChipDropdown.js"),Q=require("./components/dropdown/OpenedDropdown/components/OpennedDropdown.js"),K=require("./components/dropdown/MenuItem/MenuItem.js"),z=require("./components/analytics-card/AnalyticsCard.js"),Z=require("./components/analytics-card/AnalyticsCard.styled.js"),X=require("./components/input/Input.js"),J=require("./components/analytics-chips-and-dropdowns/AnalyticsChip.js"),$=require("./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js"),ee=require("./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js"),re=require("./components/analytics-chips-and-dropdowns/AnalyticsMetric.js"),te=require("./components/analytics-chips-and-dropdowns/AnalyticsTrend.js"),oe=require("./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js"),ne=require("./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js"),ae=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js"),ie=require("./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js"),se=require("./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js"),pe=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js"),ue=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js"),ce=require("./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js"),le=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js"),de=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js"),me=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js"),Te=require("./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js"),xe=require("./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),Pe=require("./components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.js"),Se=require("./components/avatar/Avatar.js"),Ae=require("./components/avatar/AvatarHelper.js"),Ce=require("./components/alerts/Alert.js"),ye=require("./components/alerts/AlertHelper.js"),Oe=require("./components/thumbnail/Thumbnail.js"),be=require("./components/curtain/Curtain.js"),je=require("./components/datePicker/DatePicker.js"),Ee=require("./components/datePicker/DatePickerWrapper.js"),Re=require("./components/switch/Switch.js"),he=require("./components/plans/SubscriptionPlan.js"),ge=require("./components/plans/SubscriptionPlanSelector.js"),Be=require("./components/plans/NewSubscriptionPlan.js"),Ie=require("./components/plans/SubscriptionPlansCollected.js"),_e=require("./components/tabs/Tabs.js"),qe=require("./components/dynamic-tabs/DynamicTabs.js"),fe=require("./components/shimmer/ShimmerComponent/BikShimmer.js"),De=require("./components/TablePagination/TablePagination.js"),Ne=require("./components/TablePagination/TablePaginationCard.js"),we=require("./components/states-modal/StateModalComponent.js"),Le=require("./components/states-modal/DeleteConfirmationModal.js"),ke=require("./components/states/StateComponent.js"),Me=require("./components/states/ShopifyScopeWrapper.js"),Ve=require("./components/WhatsAppTextEditor/WhatsAppTextEditor.js"),ve=require("./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),Ue=require("./helpers/BaseWhatsappContentLang.helper.js"),Ge=require("./components/curtain/CurtainHelper.js"),Fe=require("./utils/resizeImage.js"),He=require("./components/variable-picker-v3/model.js"),We=require("./components/card-selection-modal/CardSelectionModal.js"),Ye=require("./components/image-cropper/BikImageCropper.js"),Qe=require("./components/image-cropper/BikImagePipeline/BikImagePipeline.js"),Ke=require("./components/buttonGroup/ButtonGroup.js"),ze=require("./components/accordion/Accordion.js"),Ze=require("./components/file-uploader/FileUploader.js"),Xe=require("./components/colourInput/ColourInput.js"),Je=require("./components/bik-layout/BikHeader.js"),$e=require("./components/bik-layout/BikLayout.js"),er=require("./components/bik-layout/BikProfile.js"),rr=require("./components/bik-layout/SimpleSidebar.js"),tr=require("./components/bik-layout/BikSidebar.js"),or=require("./components/bik-layout/FeatureModal.js"),nr=require("./components/bik-layout/SidebarSkeleton.js"),ar=require("./components/bik-layout/ShowShopifyRestrictedModal.js"),ir=require("./components/bik-layout/FeatureModalV2.js"),sr=require("./components/searchBar/searchBar.js"),pr=require("./components/custom-date-time/CustomDateTime.js"),ur=require("./components/product-picker/ProductPickerModal.js"),cr=require("./components/discount-modal/DiscountModal.js"),lr=require("./components/discount-modal/CouponExpiration/CouponExpiration.js"),dr=require("./components/discount-modal/type.js"),mr=require("./components/country-code-picker/CountryCodePicker.js"),Tr=require("./components/country-code-picker/CountryCodePicker.modal.js"),xr=require("./components/shimmer-image/ShimmerImage.js"),Pr=require("./components/product-picker-v2/modal.js"),Sr=require("./components/carousel/carousel.js"),Ar=require("./components/carousel-secondary/CarouselSecondary.js"),Cr=require("./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js"),yr=require("./components/radioList/RadioList.js"),Or=require("./components/checkList/CheckList.js"),br=require("./components/postPicker/postPicker.js"),jr=require("./components/dropdown-button/DropdownButton.js"),Er=require("./components/side-modal/SideModal.js"),Rr=require("./components/keywords-input/KeywordsInput.js"),hr=require("./components/add-variableV2/AddVariableV2SideModal.js"),gr=require("./components/add-variableV2/AddVariableV2.js"),Br=require("./components/navigation-hyperlink/NavigationHyperlink.js"),Ir=require("./components/SearchFilter/index.js"),_r=require("./components/input-with-vars/InputWithVariables.js"),qr=require("./components/dashboard-review-popup/DashboardReviewPopUp.js"),fr=require("./components/star-rating/StarRating.js"),Dr=require("./components/testimonial-card/TestimonialCard.js"),Nr=require("./components/slider/slider.js"),wr=require("./components/resizeImage/index.js"),Lr=require("./utils/validator.js"),kr=require("./components/carousel-preview/CarouselPreview.js"),Mr=require("./components/floater/floater.js"),Vr=require("./components/card-selector/CardSelector.js"),vr=require("./components/card-selector/CardSelectorGroup.js"),Ur=require("./components/variable-picker-v3/VariablePicker.js"),Gr=require("./components/action-button/ActionButtons.js"),Fr=require("./components/ai-modals/ActivateBikAI.js"),Hr=require("./components/ai-modals/AiSyncProgress.js"),Wr=require("./components/ai-modals/AiCreditsExhausted.js"),Yr=require("./components/ai-modals/AiCreditsLow.js"),Qr=require("./components/input-with-vars/customPortal.js"),Kr=require("./components/floating-input-dropdown/FloatingInputDropdown.js"),zr=require("./components/dropdown/MultilevelDropdownPopover/index.js"),Zr=require("./components/dropShadow/DropShadow.js"),Xr=require("./components/multi-level-dropdown/MultiLevelDropdown.js"),Jr=require("./components/data-source-panel/DataSourcePanel.js"),$r=require("./components/unsatisfactory-response-list/UnsatisfactoryResponseList.js"),et=require("./components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js");exports.AmplitudeEvent=e.AmplitudeEvent,exports.regexPatterns=r,exports.StringUtils=t.default,exports.BASE_COLORS=o.BASE_COLORS,exports.COLORS=o.COLORS,exports.DEFAULT_THEME=o.DEFAULT_THEME,exports.FONTS=o.FONTS,exports.ComponentZindex=n.ComponentZindex,exports.CheckBox=a.CheckBox,exports.ListItem=i.ListItem,exports.Pagination=s.Pagination,exports.RadioButton=p.RadioButton,exports.Toaster=u.Toaster,exports.Tooltip=c.Tooltip,exports.PureSpinner=l.PureSpinner,exports.Spinner=l.Spinner,exports.Stepper=d.Stepper,exports.Tag=m.Tag,exports.IconButton=T.IconButton,exports.TemplatePreview=x.TemplatePreview,exports.WhatsappLikePreview=P.WhatsappLikePreview,exports.WhatsappLikePreviewV2=S.WhatsappLikePreviewV2,exports.renderVariableUIForPreview=A.renderVariableUIForPreview,exports.WhatsAppFormatToHTML=C.WhatsAppFormatToHTML,exports.VariableEditorHelper=y.VariableEditorHelper,Object.defineProperty(exports,"ACTIONS_TYPES",{enumerable:!0,get:function(){return O.ACTIONS_TYPES}}),exports.CUSTOM_URL_NAME=O.CUSTOM_URL_NAME,Object.defineProperty(exports,"HEADER_TYPES",{enumerable:!0,get:function(){return O.HEADER_TYPES}}),exports.STATIC_URL_CTA_OPTION=O.STATIC_URL_CTA_OPTION,Object.defineProperty(exports,"TEMPLATE_EDITOR",{enumerable:!0,get:function(){return O.TEMPLATE_EDITOR}}),Object.defineProperty(exports,"TEMPLATE_STATUS",{enumerable:!0,get:function(){return O.TEMPLATE_STATUS}}),Object.defineProperty(exports,"BUTTON_TYPE",{enumerable:!0,get:function(){return b.BUTTON_TYPE}}),Object.defineProperty(exports,"POD",{enumerable:!0,get:function(){return b.POD}}),Object.defineProperty(exports,"TEMPLATE_QUALITY",{enumerable:!0,get:function(){return b.TEMPLATE_QUALITY}}),Object.defineProperty(exports,"CHANNEL_TYPE",{enumerable:!0,get:function(){return j.CHANNEL_TYPE}}),exports.TemplateContextMapper=E.TemplateContextMapper,exports.getAllDataFromTemplateComponent=R.getAllDataFromTemplateComponent,exports.getAllDataFromWebpushTemplateComponent=R.getAllDataFromWebpushTemplateComponent,exports.isVariable=h.isVariable,exports.validateIsUrl=h.validateIsUrl,exports.TemplateAnalyticsSkeleton=g.TemplateAnalyticsSkeleton,exports.AnalyticsItem=B.AnalyticsItem,exports.RightPanelTemplateAnalytics=B.RightPanelTemplateAnalytics,exports.TemplateAnalyticsComponent=B.TemplateAnalyticsComponent,exports.FABMenu=I.FABMenu,exports.FloatingActionButton=_.FloatingActionButton,Object.defineProperty(exports,"DROP_POSITION",{enumerable:!0,get:function(){return q.DROP_POSITION}}),exports.DropdownToggleContainer=q.DropdownToggleContainer,Object.defineProperty(exports,"FAB_POSITION",{enumerable:!0,get:function(){return q.FAB_POSITION}}),exports.FloatingActionButtonContainer=q.FloatingActionButtonContainer,exports.FloatingActionButtonOuterContainer=q.FloatingActionButtonOuterContainer,Object.defineProperty(exports,"MENU_ALIGNMENT",{enumerable:!0,get:function(){return q.MENU_ALIGNMENT}}),exports.StyledDropdown=q.StyledDropdown,exports.TooltipStyled=q.TooltipStyled,exports.ImageService=f.ImageService,exports.AiBodyCaption=D.AiBodyCaption,exports.AiBodyTiny=D.AiBodyTiny,exports.BodyCaption=D.BodyCaption,exports.BodyLarge=D.BodyLarge,exports.BodyPrimary=D.BodyPrimary,exports.BodyPrimaryLink=D.BodyPrimaryLink,exports.BodyRegular=D.BodyRegular,exports.BodySecondary=D.BodySecondary,exports.BodySecondaryLink=D.BodySecondaryLink,exports.BodySmall=D.BodySmall,exports.BodyTiny=D.BodyTiny,exports.ButtonLarge=D.ButtonLarge,exports.ButtonLargeAI=D.ButtonLargeAI,exports.ButtonRegular=D.ButtonRegular,exports.ButtonRegularAI=D.ButtonRegularAI,exports.Caption=D.Caption,exports.CaptionBold=D.CaptionBold,exports.Display=D.Display,exports.SmallRegular=D.SmallRegular,exports.SubHeading=D.SubHeading,exports.TextPlaceholder=D.TextPlaceholder,exports.Tiny=D.Tiny,exports.TitleFour=D.TitleFour,exports.TitleLarge=D.TitleLarge,exports.TitleMedium=D.TitleMedium,exports.TitleRegular=D.TitleRegular,exports.TitleSmall=D.TitleSmall,exports.TitleXlarge=D.TitleXlarge,exports.Button=N.Button,exports.ProgressBarComponent=w.ProgressBarComponent,exports.ProgressCompletedBar=w.ProgressCompletedBar,Object.defineProperty(exports,"ProgressBarType",{enumerable:!0,get:function(){return L.ProgressBarType}}),exports.ProgressBarV2=L.ProgressBarV2,Object.defineProperty(exports,"TextAlignment",{enumerable:!0,get:function(){return L.TextAlignment}}),exports.QueryBuilder=k.QueryBuilder,exports.BaseQueryBuilderNode=M.BaseQueryBuilderNode,exports.PropertyNode=V.PropertyNode,exports.PropertyNodeHeadless=V.PropertyNodeHeadless,exports.queryBuilderSlice=v.queryBuilderSlice,exports.queryBuilderCacheSlice=U.queryBuilderCacheSlice,Object.defineProperty(exports,"AD_STRING_OPERATORS",{enumerable:!0,get:function(){return G.AD_STRING_OPERATORS}}),Object.defineProperty(exports,"ANY_AD_OPERATORS",{enumerable:!0,get:function(){return G.ANY_AD_OPERATORS}}),Object.defineProperty(exports,"ANY_IG_OPERATORS",{enumerable:!0,get:function(){return G.ANY_IG_OPERATORS}}),Object.defineProperty(exports,"BOOLEAN_OPERATORS",{enumerable:!0,get:function(){return G.BOOLEAN_OPERATORS}}),Object.defineProperty(exports,"DATE_OPERATORS",{enumerable:!0,get:function(){return G.DATE_OPERATORS}}),Object.defineProperty(exports,"EVENT_VALUES",{enumerable:!0,get:function(){return G.EVENT_VALUES}}),Object.defineProperty(exports,"EXACTLY_OPERATORS",{enumerable:!0,get:function(){return G.EXACTLY_OPERATORS}}),Object.defineProperty(exports,"FREQUENCY_OPERATORS",{enumerable:!0,get:function(){return G.FREQUENCY_OPERATORS}}),Object.defineProperty(exports,"ICE_BREAKER_OPERATORS",{enumerable:!0,get:function(){return G.ICE_BREAKER_OPERATORS}}),Object.defineProperty(exports,"IG_STRING_OPERATORS",{enumerable:!0,get:function(){return G.IG_STRING_OPERATORS}}),Object.defineProperty(exports,"INTEGER_OPERATORS",{enumerable:!0,get:function(){return G.INTEGER_OPERATORS}}),Object.defineProperty(exports,"MAIL_SUBJECT_OPERATORS",{enumerable:!0,get:function(){return G.MAIL_SUBJECT_OPERATORS}}),Object.defineProperty(exports,"REACTION_OPERATORS",{enumerable:!0,get:function(){return G.REACTION_OPERATORS}}),Object.defineProperty(exports,"SPECIFIC_IG_OPERATORS",{enumerable:!0,get:function(){return G.SPECIFIC_IG_OPERATORS}}),Object.defineProperty(exports,"STRING_OPERATORS",{enumerable:!0,get:function(){return G.STRING_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS",{enumerable:!0,get:function(){return G.STRING_RESTRICTED_OPERATORS}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_2",{enumerable:!0,get:function(){return G.STRING_RESTRICTED_OPERATORS_2}}),Object.defineProperty(exports,"STRING_RESTRICTED_OPERATORS_3",{enumerable:!0,get:function(){return G.STRING_RESTRICTED_OPERATORS_3}}),exports.StyledModal=F.StyledModal,exports.DropdownPopover=H.DropdownPopover,exports.Dropdown=W.Dropdown,exports.ChipDropdown=Y.ChipDropdown,exports.ChipDropdownContainer=Y.ChipDropdownContainer,exports.OpenedDropdown=Q.OpenedDropdown,exports.MenuItemDropdown=K.MenuItemDropdown,exports.AnalyticsCard=z.AnalyticsCard,exports.AnalyticsContainer=Z.AnalyticsContainer,exports.CardDataContainer=Z.CardDataContainer,exports.Input=X.Input,exports.AnalyticsChip=J.AnalyticsChip,exports.AnalyticsDropdown=$.AnalyticsDropdown,exports.EachItem=$.EachItem,exports.formatDate=$.formatDate,exports.AnalyticsMultiChip=ee.AnalyticsMultiChip,exports.AnalyticsMetric=re.AnalyticsMetric,exports.AnalyticsTrend=te.AnalyticsTrend,exports.LineChart=oe.LineChart,exports.LinearChipGroupedChart=ne.LinearChipGroupedChart,exports.Card=ae.Card,exports.PieChartAnalytics=ae.PieChartAnalytics,exports.PieChart=ie.PieChart,exports.HorizontalGraph=se.HorizontalGraph,exports.StackedBarChart=pe.StackedBarChart,exports.StackedBarDistributionChart=ue.StackedBarDistributionChart,Object.defineProperty(exports,"GRAPH_ORIENTATION",{enumerable:!0,get:function(){return ce.GRAPH_ORIENTATION}}),exports.VerticalGraph=le.VerticalGraph,exports.FunnelVerticalBarGraph=de.FunnelVerticalBarGraph,Object.defineProperty(exports,"HEAT",{enumerable:!0,get:function(){return me.HEAT}}),exports.HEAT_COLORS=me.HEAT_COLORS,Object.defineProperty(exports,"HEAT_GRADING_TYPE",{enumerable:!0,get:function(){return me.HEAT_GRADING_TYPE}}),exports.HeatMap=me.HeatMap,exports.HeatBoxStyled=Te.HeatBoxStyled,exports.HeatMapVertical=Te.HeatMapVertical,exports.VerticalBarAndLinearGraph=xe.VerticalBarAndLinearGraph,Object.defineProperty(exports,"TruncateValue",{enumerable:!0,get:function(){return Pe.TruncateValue}}),exports.calculatePercentage=Pe.calculatePercentage,exports.roundNumber=Pe.roundNumber,exports.truncateValueForIndianStore=Pe.truncateValueForIndianStore,exports.truncateValueForInternationalStore=Pe.truncateValueForInternationalStore,exports.truncateValueTo10K=Pe.truncateValueTo10K,exports.truncateValueToA=Pe.truncateValueToA,exports.truncateValueToB=Pe.truncateValueToB,exports.truncateValueToC=Pe.truncateValueToC,exports.truncateValueToK=Pe.truncateValueToK,exports.truncateValueToL=Pe.truncateValueToL,exports.truncateValueToM=Pe.truncateValueToM,exports.truncateValueToT=Pe.truncateValueToT,exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=Se.AVATAR_SIZE_VS_ICON_SIZE_MAP,exports.Avatar=Se.Avatar,exports.BACKGROUND_VS_TEXT_COLOR_MAP=Se.BACKGROUND_VS_TEXT_COLOR_MAP,Object.defineProperty(exports,"MESSAGE_CHANNELS",{enumerable:!0,get:function(){return Se.MESSAGE_CHANNELS}}),Object.defineProperty(exports,"AVATAR_BACKGROUND",{enumerable:!0,get:function(){return Ae.AVATAR_BACKGROUND}}),exports.AVATAR_SIZE_MAP=Ae.AVATAR_SIZE_MAP,Object.defineProperty(exports,"AVATAR_TYPES",{enumerable:!0,get:function(){return Ae.AVATAR_TYPES}}),Object.defineProperty(exports,"SIZE",{enumerable:!0,get:function(){return Ae.SIZE}}),exports.Alert=Ce.Alert,Object.defineProperty(exports,"ALERT_TYPES",{enumerable:!0,get:function(){return ye.ALERT_TYPES}}),exports.COLOR_CONFIG_MAP=ye.COLOR_CONFIG_MAP,Object.defineProperty(exports,"CONTENT_POSITION",{enumerable:!0,get:function(){return ye.CONTENT_POSITION}}),Object.defineProperty(exports,"RATIO",{enumerable:!0,get:function(){return Oe.RATIO}}),exports.Thumbnail=Oe.Thumbnail,exports.Curtain=be.Curtain,exports.DatePicker=je.DatePicker,Object.defineProperty(exports,"DateButtonType",{enumerable:!0,get:function(){return Ee.DateButtonType}}),exports.DatePickerWrapper=Ee.DatePickerWrapper,exports.Loader=Re.Loader,exports.Switch=Re.Switch,exports.SwitchContainer=Re.SwitchContainer,exports.Thumb=Re.Thumb,exports.SubscriptionPlan=he.SubscriptionPlan,exports.BottomWrapper=ge.BottomWrapper,exports.HeaderWrapper=ge.HeaderWrapper,exports.SubscriptionPlanSelector=ge.SubscriptionPlanSelector,exports.defaultTabs=ge.defaultTabs,exports.NewSubscriptionPlan=Be.NewSubscriptionPlan,exports.SubscriptionPlansCollected=Ie.SubscriptionPlansCollected,exports.TabItemComponent=_e.TabItemComponent,exports.Tabs=_e.Tabs,exports.DynamicTabs=qe.DynamicTabs,exports.BikShimmer=fe.BikShimmer,exports.TablePagination=De.TablePagination,exports.TablePaginationCard=Ne.TablePaginationCard,exports.TablePaginationCardStyled=Ne.TablePaginationCardStyled,exports.StateModalComponent=we.StateModalComponent,exports.DeleteConfirmationModal=Le.DeleteConfirmationModal,Object.defineProperty(exports,"ButtonActions",{enumerable:!0,get:function(){return ke.ButtonActions}}),Object.defineProperty(exports,"ButtonTypes",{enumerable:!0,get:function(){return ke.ButtonTypes}}),exports.StateComponent=ke.StateComponent,Object.defineProperty(exports,"StateInterface",{enumerable:!0,get:function(){return ke.StateInterface}}),exports.ShopifyScopeWrapper=Me.ShopifyScopeWrapper,exports.WhatsAppTextEditor=Ve.WhatsAppTextEditor,exports.CustomRightBorder=ve.CustomRightBorder,Object.defineProperty(exports,"EditorActionTypes",{enumerable:!0,get:function(){return ve.EditorActionTypes}}),exports.WhatsAppTextEditorHeader=ve.WhatsAppTextEditorHeader,exports.BaseWhatsappContentLangHelper=Ue.BaseWhatsappContentLangHelper,exports.CURTAIN_COLOR_CONFIG_MAP=Ge.CURTAIN_COLOR_CONFIG_MAP,Object.defineProperty(exports,"CURTAIN_MODE",{enumerable:!0,get:function(){return Ge.CURTAIN_MODE}}),Object.defineProperty(exports,"CURTAIN_TYPES",{enumerable:!0,get:function(){return Ge.CURTAIN_TYPES}}),exports.resizeImage=Fe.resizeImage,Object.defineProperty(exports,"PickerType",{enumerable:!0,get:function(){return He.PickerType}}),exports.CardSelectionModal=We.CardSelectionModal,exports.BikImageCropper=Ye.BikImageCropper,exports.BikImagePipeline=Qe.BikImagePipeline,exports.ButtonGroup=Ke.ButtonGroup,exports.BikAccordion=ze.BikAccordion,exports.FileUploader=Ze.FileUploader,exports.ColourInput=Xe.ColourInput,exports.BikHeader=Je.BikHeader,exports.BikLayout=$e.BikLayout,exports.BikProfile=er.BikProfile,exports.SimpleSidebar=rr.SimpleSidebar,exports.BikSidebar=tr.BikSidebar,exports.FeatureModal=or.FeatureModal,exports.SidebarSkeleton=nr.SidebarSkeleton,exports.ShowShopifyRestrictedModal=ar.ShowShopifyRestrictedModal,exports.FeatureModalV2=ir.FeatureModalV2,exports.SearchBar=sr.SearchBar,exports.CustomDateTime=pr.CustomDateTime,exports.PricePleaseProductPicker=ur.PricePleaseProductPicker,exports.ProductPickerContent=ur.ProductPickerContent,exports.DiscountModal=cr.DiscountModal,exports.CouponExpiration=lr.CouponExpiration,Object.defineProperty(exports,"COUPON_EXPIRATION",{enumerable:!0,get:function(){return dr.COUPON_EXPIRATION}}),Object.defineProperty(exports,"DISCOUNT_APPLIES_TO",{enumerable:!0,get:function(){return dr.DISCOUNT_APPLIES_TO}}),Object.defineProperty(exports,"DISCOUNT_TARGET_SELECTION",{enumerable:!0,get:function(){return dr.DISCOUNT_TARGET_SELECTION}}),Object.defineProperty(exports,"DISCOUNT_TARGET_TYPES",{enumerable:!0,get:function(){return dr.DISCOUNT_TARGET_TYPES}}),Object.defineProperty(exports,"DISCOUNT_TYPES",{enumerable:!0,get:function(){return dr.DISCOUNT_TYPES}}),Object.defineProperty(exports,"DISCOUNT_VALUE_TYPES",{enumerable:!0,get:function(){return dr.DISCOUNT_VALUE_TYPES}}),Object.defineProperty(exports,"MIN_PURCHASE_REQUIREMENT",{enumerable:!0,get:function(){return dr.MIN_PURCHASE_REQUIREMENT}}),Object.defineProperty(exports,"OFFER_APPLIES_TO",{enumerable:!0,get:function(){return dr.OFFER_APPLIES_TO}}),exports.initialDynamicCouponErrorState=dr.initialDynamicCouponErrorState,exports.initialStaticCouponErrorState=dr.initialStaticCouponErrorState,exports.CountryCodePicker=mr.CountryCodePicker,exports.CountriesData=Tr.CountriesData,exports.DEFAULT_IMAGE=xr.DEFAULT_IMAGE,exports.ShimmerImage=xr.ShimmerImage,exports.ProductPickerModal=Pr.ProductPickerModal,Object.defineProperty(exports,"ScreenName",{enumerable:!0,get:function(){return Pr.ScreenName}}),exports.Carousel=Sr.Carousel,exports.CarouselSecondary=Ar.CarouselSecondary,Object.defineProperty(exports,"CarouselVersion",{enumerable:!0,get:function(){return Ar.CarouselVersion}}),exports.AccessTokenTroubleshootDialog=Cr.AccessTokenTroubleshootDialog,exports.RadioList=yr.RadioList,exports.CheckList=Or.CheckList,Object.defineProperty(exports,"DateKeys",{enumerable:!0,get:function(){return br.DateKeys}}),Object.defineProperty(exports,"MEDIA_TYPES",{enumerable:!0,get:function(){return br.MEDIA_TYPES}}),exports.PostPicker=br.PostPicker,exports.dateOptions=br.dateOptions,exports.DropdownButton=jr.DropdownButton,exports.SideModal=Er.SideModal,exports.KeywordsInput=Rr.KeywordsInput,exports.AddVariableV2SideModal=hr.AddVariableV2SideModal,exports.AddVariableV2=gr.AddVariableV2,exports.NaLinkWrapper=Br.NaLinkWrapper,exports.NavigationHyperlink=Br.NavigationHyperlink,exports.SearchFilter=Ir.SearchFilter,exports.InputWithVariables=_r.InputWithVariables,exports.DashboardReviewPopUp=qr.DashboardReviewPopUp,exports.StarRating=fr.StarRating,exports.TestimonialCard=Dr.TestimonialCard,exports.BikSlider=Nr.BikSlider,exports.ResizableImage=wr.ResizableImage,exports.validateURL=Lr.validateURL,exports.CarouselPreview=kr.CarouselPreview,exports.Floater=Mr.Floater,exports.CardSelector=Vr.CardSelector,exports.CardSelectorGroup=vr.CardSelectorGroup,exports.VariablePicker=Ur.VariablePicker,exports.ActionButtons=Gr.ActionButtons,exports.ActivateBikAi=Fr.ActivateBikAi,exports.AiSyncProgress=Hr.AiSyncProgress,exports.AiCreditsExhausted=Wr.AiCreditsExhausted,exports.AiCreditsLow=Yr.AiCreditsLow,exports.CustomPortal=Qr.CustomPortal,exports.FloatingInputDropdown=Kr.FloatingInputDropdown,exports.MultilevelDropdownPopover=zr.MultilevelDropdownPopover,exports.DropShadow=Zr.DropShadow,exports.MultiLevelDropdown=Xr.MultiLevelDropdown,exports.DataSourcePanel=Jr.DataSourcePanel,exports.UnsatisfactoryResponseList=$r.UnsatisfactoryResponseList,exports.UnsatisfactoryCountIntentWiseModal=et.UnsatisfactoryCountIntentWiseModal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";var t,a,c;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c])}return e},l.apply(this,arguments)}var r=r=>e.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 54 54"},r),t||(t=e.createElement("path",{fill:"url(#bik_livechat_svg__a)",d:"M53.368 27a26.368 26.368 0 0 1-39.571 22.827l-10.27 3.425a2.198 2.198 0 0 1-2.78-2.78l3.425-10.27A26.369 26.369 0 1 1 53.368 27Z"})),a||(a=e.createElement("path",{fill:"#fff",d:"M36.983 32.943c-.31 0-.553-.08-.725-.241-.161-.173-.242-.415-.242-.725V21.739c0-.31.08-.546.242-.707.172-.173.414-.26.725-.26h6.301c.242 0 .426.064.552.19.127.116.19.288.19.518 0 .242-.063.426-.19.553-.126.127-.31.19-.552.19h-5.541v3.815h5.161c.253 0 .438.063.553.19.126.127.19.305.19.535 0 .242-.064.426-.19.552-.115.116-.3.173-.553.173h-5.162v4.005h5.542c.242 0 .426.064.552.19.127.127.19.305.19.535 0 .242-.063.426-.19.553-.126.115-.31.172-.552.172h-6.301ZM28.555 33.064c-.253 0-.466-.057-.639-.172a1.37 1.37 0 0 1-.397-.553l-4.644-10.513c-.092-.242-.115-.45-.069-.622a.664.664 0 0 1 .276-.397.917.917 0 0 1 .535-.155c.265 0 .467.057.605.172.138.115.253.288.345.518l4.35 10.082h-.638l4.315-10.099c.104-.219.225-.386.363-.5.15-.116.351-.173.604-.173.207 0 .374.052.5.155a.597.597 0 0 1 .26.397c.034.173 0 .38-.104.622l-4.626 10.513a1.37 1.37 0 0 1-.397.553c-.162.115-.374.172-.64.172ZM20.206 33.064c-.287 0-.512-.08-.673-.242-.15-.16-.224-.385-.224-.673V21.567c0-.3.075-.524.224-.674.161-.16.386-.241.673-.241.288 0 .507.08.657.241.16.15.241.374.241.674v10.582c0 .288-.075.512-.224.673-.15.162-.374.242-.674.242ZM10.699 32.943c-.288 0-.512-.08-.674-.241-.16-.161-.241-.386-.241-.674v-10.41c0-.299.074-.523.224-.673.161-.16.386-.241.673-.241.288 0 .507.08.656.241.162.15.242.374.242.674v9.788h5.352c.253 0 .449.069.587.207.138.127.207.31.207.552 0 .242-.07.432-.207.57-.138.138-.334.207-.587.207h-6.232Z"})),c||(c=e.createElement("defs",null,e.createElement("linearGradient",{id:"bik_livechat_svg__a",x1:27,x2:27,y1:.637,y2:53.371,gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#B143FF"}),e.createElement("stop",{offset:1,stopColor:"#6532FF"})))));export{r as default};
|
|
@@ -28,6 +28,7 @@ export type AvatarProps = {
|
|
|
28
28
|
isSelected: boolean;
|
|
29
29
|
isComments: boolean;
|
|
30
30
|
};
|
|
31
|
+
status?: 'ONLINE' | 'OFFLINE' | 'AWAY';
|
|
31
32
|
};
|
|
32
33
|
export declare const enum MESSAGE_CHANNELS {
|
|
33
34
|
INSTAGRAM = "instagram",
|
|
@@ -41,6 +42,7 @@ export declare const enum MESSAGE_CHANNELS {
|
|
|
41
42
|
EMAIL = "email",
|
|
42
43
|
SMTP = "smtp",
|
|
43
44
|
FACEBOOK_CATALOG = "facebook-catalog",
|
|
44
|
-
TASKS = "tasks"
|
|
45
|
+
TASKS = "tasks",
|
|
46
|
+
BIK_LIVECHAT = "livechat"
|
|
45
47
|
}
|
|
46
48
|
export declare const Avatar: React.FC<AvatarProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as s}from"react";import{AvatarStyle as i}from"./Avatar.styled.js";import{SIZE as
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as s}from"react";import{AvatarStyle as i}from"./Avatar.styled.js";import{SIZE as o,AVATAR_BACKGROUND as r,AVATAR_TYPES as a,AVATAR_SIZE_MAP as n}from"./AvatarHelper.js";import{BodyTiny as c,TitleSmall as l,TitleMedium as d}from"../TypographyStyle.js";import{COLORS as h}from"../../constants/Theme.js";import p from"../../assets/icons/bik_livechat.svg.js";import g from"../../assets/icons/CheckSquareOffset.svg.js";import m from"../../assets/icons/email-channel.svg.js";import u from"../../assets/icons/facebook_channel.svg.js";import b from"../../assets/icons/gmail.svg.js";import A from"../../assets/icons/instagram-channel.svg.js";import I from"../../assets/icons/whatsapp_color.svg.js";const f={[o.SMALL]:16,[o.MEDIUM]:20,[o.INBOX]:24,[o.LARGE]:32},S={[r.LIGHT]:h.content.secondary,[r.DARK]:h.surface.standard};var y;!function(e){e.INSTAGRAM="instagram",e.MESSENGER="messenger",e.WHATSAPP="whatsapp",e.GMAIL="gmail",e.LIVECHAT="livechat",e.GOOGLE_BUSINESS_CHAT="gbm",e.SHOPIFY="shopify",e.FACEBOOK="facebook",e.EMAIL="email",e.SMTP="smtp",e.FACEBOOK_CATALOG="facebook-catalog",e.TASKS="tasks",e.BIK_LIVECHAT="livechat"}(y||(y={}));const j=r=>{const[j,v]=s(!1),E=()=>{const e=(r.name||"").split(".").join(" ").split(" ").map((e=>e.charAt(0).toUpperCase())).slice(0,2).join("");return r.size===o.SMALL?t(c,Object.assign({style:{color:S[r.background]}},{children:e})):r.size===o.MEDIUM||r.size===o.INBOX?t(l,Object.assign({style:{color:S[r.background]}},{children:e})):r.size===o.LARGE?t(d,Object.assign({style:{color:S[r.background]}},{children:e})):void 0};return e("div",Object.assign({style:{position:"relative"}},{children:[e(i,Object.assign({type:r.type===a.IMAGE&&j&&r.useNameFallback&&r.name?a.INITIALS:r.type,size:r.size,background:r.background},{children:[r.type===a.IMAGE&&(r.useNameFallback&&!j?t("img",{alt:"",width:n[r.size],height:n[r.size],style:{borderRadius:(null==r?void 0:r.borderRadius)||"50%",objectFit:"contain"},src:r.photoUrl,onError:()=>{v(!0)}}):r.useNameFallback&&j&&r.name?t("div",{children:E()}):t("img",{alt:"",width:n[r.size],height:n[r.size],style:{borderRadius:(null==r?void 0:r.borderRadius)||"50%",objectFit:"contain"},src:r.photoUrl})),r.type===a.INITIALS&&t("div",{children:E()}),r.type===a.ICON&&r.icon&&t(r.icon,{width:f[r.size],height:f[r.size],color:S[r.background]})]})),r.inboxSettings&&t("div",Object.assign({style:{position:"absolute",left:f[r.size]+"px",top:f[r.size]+"px",width:14,height:14,borderRadius:(null==r?void 0:r.borderRadius)||"50%",display:"flex",justifyContent:"center",backgroundColor:r.inboxSettings.isSelected?r.inboxSettings.isComments?h.content.primary:h.background.brandLight:r.inboxSettings.isComments?h.content.primary:h.surface.standard,alignItems:"center"}},{children:(()=>{switch(r.channelName){case y.EMAIL:case y.SMTP:return t(m,{width:11,height:11});case y.FACEBOOK:case y.FACEBOOK_CATALOG:case y.MESSENGER:return t(u,{width:11,height:11});case y.INSTAGRAM:return t(A,{width:11,height:11});case y.WHATSAPP:return t(I,{width:11,height:11});case y.GMAIL:return t(b,{width:11,height:11});case y.TASKS:return t(g,{width:11,height:11});case y.BIK_LIVECHAT:return t(p,{width:11,height:11})}})()})),r.status&&t("div",Object.assign({style:{position:"absolute",left:f[r.size]+"px",top:f[r.size]+"px",width:11,height:11,borderRadius:"50%",display:"flex",justifyContent:"center",backgroundColor:h.surface.standard,alignItems:"center"}},{children:(console.log("props.status",r.status),r.status?t("div",{style:{backgroundColor:"ONLINE"===r.status?h.special.whatsapp.brand:h.content.inactive,width:"8px",height:"8px",borderRadius:"50%"}}):null)}))]}))};export{f as AVATAR_SIZE_VS_ICON_SIZE_MAP,j as Avatar,S as BACKGROUND_VS_TEXT_COLOR_MAP,y as MESSAGE_CHANNELS};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { footerButtonOptionModel, MessageSource } from './model';
|
|
3
3
|
interface SourceInfoFooterProps {
|
|
4
|
-
appType: AppType;
|
|
5
4
|
sourceIntent: string;
|
|
6
5
|
messageSource?: MessageSource;
|
|
7
6
|
hideAddDataButton?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import i from"../../assets/icons/alert_triangle.svg.js";import o from"../../assets/icons/plus.svg.js";import{memo as s,useState as l,useMemo as d,useEffect as r}from"react";import{COLORS as a}from"../../constants/Theme.js";import{Button as c}from"../button/Button.js";import{BodyCaption as u}from"../TypographyStyle.js";import{SourceInfoFooterStyle as h}from"./DataSourcePanel.style.js";const g=s((s=>{const{sourceIntent:g,hideHeading:T,messageSource:v,trainingSourceCount:b={},ShowTrainingDataSource:f={},ChecklistType:p,footerButtonOption:y}=s,[O,_]=l({}),I=f,[j,C]=l(!0),[D,N]=l(!0),R=d((()=>{const e=(null==b?void 0:b[g])||0;return e<=1?"There is "+e+"data source added to the identified intent":`There are ${e} data sources added to the identified intent`}),[b,g]);return r((()=>{var e,t;if(g){if(null===(e=null==v?void 0:v.sources)||void 0===e?void 0:e.length)if(I[g])g===p.ORDER_ENQUIRY&&N(!1);else{const e=null!==(t=null==y?void 0:y.title)&&void 0!==t?t:v.sources[0].insights,n=null==y?void 0:y.subtitle;_({title:e,subTitle:n})}(I[g]||[p.PRODUCT_DETAILS,p.ORDER_MODIFICATION,p.ORDER_CANCELLATION,p.ORDER_TRACKING].includes(g))&&C(!1)}}),[null==v?void 0:v.messageId,b,g]),e(h,{children:!O.title&&b&&g in b?t(n,{children:[e(m,{hideHeading:null!=T&&T}),t("div",Object.assign({className:"source_info_details "+(b[g]>0?"":"no_data_source")},{children:[b[g]>0&&D?t(n,{children:[e(u,{children:R}),e(u,Object.assign({color:a.content.secondary},{children:"Improve responses by adding more data sources for the identified intent"}))]}):D&&t("div",Object.assign({className:"no_data_source_title"},{children:[e(i,{width:15,height:15,color:a.content.negative,style:{marginTop:2}}),e(u,{children:"No data sources added to the identified link"})]})),!y||y.hideAddDataButton||j?e(n,{}):e(c,{size:"small",buttonType:"tertiary",LeadingIcon:o,buttonText:(null==y?void 0:y.buttonTitle.length)>0?null==y?void 0:y.buttonTitle:"Add relevant data",matchParentWidth:!0,onClick:y.onClick,style:{backgroundColor:"unset"}})]}))]}):t(n,{children:[e(m,{hideHeading:null!=T&&T}),t("div",Object.assign({className:"source_info_details"},{children:[D&&t(n,{children:[e(u,{children:O.title}),e(u,Object.assign({color:a.content.secondary},{children:O.subTitle}))]}),!y||y.hideAddDataButton||j?e(n,{}):e(c,{size:"small",buttonType:"tertiary",LeadingIcon:o,buttonText:(null==y?void 0:y.buttonTitle.length)>0?null==y?void 0:y.buttonTitle:"Add relevant data",matchParentWidth:!0,onClick:y.onClick,style:{backgroundColor:"unset"}})]}))]})})})),m=s((t=>t.hideHeading?null:e(u,Object.assign({color:a.content.secondary},{children:"Training insights"}))));m.displayName="TrainingInsightsHeading",g.displayName="SourceInfoFooter";export{g as default};
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AllSourceInfoDetailsCustomDataModel,
|
|
2
|
+
import { AllSourceInfoDetailsCustomDataModel, CustomDataType, DataSourcePanelZeroState, footerButtonOptionModel, InfoContent, MessageSource } from './model';
|
|
3
3
|
export interface DataSourcePanelProps {
|
|
4
4
|
storeId: string;
|
|
5
|
-
appType: AppType;
|
|
6
5
|
messageSource: MessageSource;
|
|
7
6
|
setMessageSourcePanel: (source?: MessageSource) => void;
|
|
8
7
|
hideCloseButton?: boolean;
|
|
9
8
|
title?: string;
|
|
10
9
|
allSourceInfoDetail: AllSourceInfoDetailsCustomDataModel;
|
|
11
10
|
isSourceInfoFetched?: boolean;
|
|
11
|
+
faqCount: number;
|
|
12
12
|
editableSources: CustomDataType[];
|
|
13
13
|
redirect: (sourceInfo: InfoContent) => void;
|
|
14
|
-
|
|
14
|
+
trainingSourceCount: {
|
|
15
15
|
[k in string]: number;
|
|
16
16
|
};
|
|
17
17
|
zeroStateButton: DataSourcePanelZeroState;
|
|
18
18
|
ChecklistType: Record<string, string>;
|
|
19
|
+
IntentComponentMap: Record<string, JSX.Element>;
|
|
20
|
+
ShowTrainingDataSource: Record<string, string>;
|
|
19
21
|
footerButtonOption?: footerButtonOptionModel;
|
|
20
|
-
fetchTrainingSourceCount: (storeId: string) => Promise<{
|
|
21
|
-
[k in string]: number;
|
|
22
|
-
}>;
|
|
23
|
-
fetchProductFAQCount: (storeId: string, productIds?: string[]) => Promise<number>;
|
|
24
22
|
}
|
|
25
23
|
export declare const DataSourcePanel: React.FC<DataSourcePanelProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";import o from"../../assets/icons/boxV2.svg.js";import n from"../../assets/icons/cross.svg.js";import r from"../../assets/icons/edit.svg.js";import s from"../../assets/icons/filePdf.svg.js";import l from"../../assets/icons/help.svg.js";import a from"../../assets/icons/info.svg.js";import c from"../../assets/icons/openai.svg.js";import d from"../../assets/icons/plus.svg.js";import p from"../../assets/icons/redirect.svg.js";import u from"../../assets/icons/text_t9.svg.js";import g from"../../assets/icons/website.svg.js";import{useState as y,useMemo as h,useEffect as T}from"react";import{COLORS as m}from"../../constants/Theme.js";import{Button as C}from"../button/Button.js";import{IconButton as I}from"../icon-button/IconButton.js";import{BikShimmer as v}from"../shimmer/ShimmerComponent/BikShimmer.js";import{Tag as O}from"../tag/Tag.js";import{Tooltip as f}from"../tooltips/Tooltip.js";import{TitleSmall as E,BodyCaption as x,BodySecondary as S}from"../TypographyStyle.js";import L from"./DataSourceInfoFooter.js";import{SourceInfoDetailsStyle as b}from"./DataSourcePanel.style.js";import{CustomDataType as N}from"./model.js";const _=_=>{var A,w;const{appType:R,storeId:k,messageSource:j,setMessageSourcePanel:D,hideCloseButton:F,isSourceInfoFetched:P,allSourceInfoDetail:U,ChecklistType:B,title:M,zeroStateButton:H,editableSources:K,preFillTrainingSourceCount:Q,redirect:q,footerButtonOption:G,fetchTrainingSourceCount:Y,fetchProductFAQCount:W}=_,{sources:$}=j,z=["blog","article","page","policy"],[X,V]=y(!1),[Z,J]=y(!1),[ee,te]=y(0),[ie,oe]=y(null!=Q?Q:{}),ne={};[{key:"GENERIC",type:"neutral",tagText:"Generic"},{key:"STORE_INFORMATION",type:"blue",tagText:"Store information"},{key:"SHIPPING_POLICY",type:"positive",tagText:"Shipping policy"},{key:"RETURN_AND_REFUND",type:"purple",tagText:"Returns & refund policy"},{key:"CONTACT_INFO",type:"warning",tagText:"Contact details"},{key:"STORE_LOCATION",type:"grey",tagText:"Store location"},{key:"SALES_AND_OFFERS",type:"purple",tagText:"Offers & rewards"},{key:"PRODUCT_CUSTOMISATION",type:"blue",tagText:"Product customisation"},{key:"PRODUCT_DETAILS",type:"blue",tagText:"Product details"},{key:"PAYMENT_METHODS",type:"positive",tagText:"Payment methods"},{key:"ORDER_TRACKING",type:"warning",tagText:"Order tracking"},{key:"PRODUCT_SEARCH",type:"neutral",tagText:"Product search"},{key:"PURCHASE",type:"blue",tagText:"Purchase"},{key:"CONNECT_TO_AGENT",type:"purple",tagText:"Talk to a person"},{key:"CHECKOUT_ENQUIRY",type:"purple",tagText:"Checkout enquiry"},{key:"ORDER_CANCELLATION",type:"positive",tagText:"Order cancellation"},{key:"ORDER_ENQUIRY",type:"neutral",tagText:"Order enquiry"},{key:"ORDER_MODIFICATION",type:"blue",tagText:"Order modification"},{key:"SUBSCRIPTION_ENQUIRY",type:"warning",tagText:"Subscription enquiry"},{key:"SALES_AND_OFFERS_ISSUES",type:"grey",tagText:"Offer-related enquiries"},{key:"COLLABORATION",type:"positive",tagText:"Collaboration"},{key:"QUIZ_GENERATION",type:"warning",tagText:"Start the quiz"},{key:"SIMILAR_PRODUCT",type:"blue",tagText:"Similar Product"},{key:"EMAIL_COLLECTION",type:"warning",tagText:"Email Collection"},{key:"ADD_TO_CART_SUCCESS",type:"blue",tagText:"Add to Cart Success"},{key:"ADD_TO_CART_SUCCESS_MESSAGE",type:"blue",tagText:"Add to Cart Success Message"},{key:"FEEDBACK",type:"blue",tagText:"Feedback"},{key:"PHONE_NUMBER_COLLECTION",type:"blue",tagText:"Phone no. collection"}].forEach((t=>{let{key:i,type:o,tagText:n}=t;B[i]&&(ne[B[i]]=e(O,{theme:"light",type:o,tagText:n,cursor:"pointer"}))}));const re=h((()=>{const e={};return["STORE_INFORMATION","CONTACT_INFO","STORE_LOCATION","SHIPPING_POLICY","RETURN_AND_REFUND","SALES_AND_OFFERS","SALES_AND_OFFERS_ISSUES","PRODUCT_CUSTOMISATION","PAYMENT_METHODS","CHECKOUT_ENQUIRY","ORDER_ENQUIRY"].forEach((t=>{B[t]&&(e[B[t]]=B[t])})),["COLLABORATION","SUBSCRIPTION_ENQUIRY"].forEach((t=>{e[t]=t})),e}),[B]);T((()=>{var e,t,i,o;if(!(null==j?void 0:j.messageId))return;V(!0),J(!1!==(null===(t=null===(e=j.sources)||void 0===e?void 0:e[0])||void 0===t?void 0:t.isTrainable)||!!(null===(o=null===(i=j.sources)||void 0===i?void 0:i[0])||void 0===o?void 0:o.insights));const n=j.sources.filter((e=>!!e.productId)).map((e=>e.productId)),r=Array.from(new Set(n)).filter((e=>!!e));W(k,r).then((e=>te(e))).then((()=>{Q?(oe(Q),setTimeout((()=>V(!1)),100)):Y(k).then((e=>oe(e))).then((()=>{setTimeout((()=>V(!1)),100)}))}))}),[W,Y,null==j?void 0:j.messageId,j.sources,Q,k]);const se=e=>!(0!==e.length&&!(null==j?void 0:j.isUnsatisfactoryAnswer)),le=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var i;return"custom"==e?e=N.FILES:z.includes(e)?e=N.FETCHED_LINKS:"url"==e?e=N.WEBSITE_LINKS:"text"===e?e=N.TEXTS:"faq"===e&&(e=N.FAQ),t?e:null===(i=null==e?void 0:e.toLowerCase())||void 0===i?void 0:i.replace(/_/g," ")},ae=e=>{const t=e.replace(/(<([^>]+)>)/gi,""),i=document.createElement("textarea");return i.innerHTML=t,i.value};return X||!P?e(b,{children:e(v,{boxes:[{width:"100px",height:"16px"},{width:"0",height:"4px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"0",height:"4px"},{width:"100%",height:"16px"}]})}):e(t,{children:e(b,{children:i(t,{children:[i("div",Object.assign({className:"pop-up-header",style:{display:"flex",flexDirection:"column",paddingBottom:"12px"}},{children:[!!M&&e(E,{children:M}),i("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",alignItems:"center"}},{children:[e(x,Object.assign({color:m.content.secondary},{children:"Intent"})),null!==(A=ne[j.intent])&&void 0!==A?A:ne.GENERIC,!F&&e("div",Object.assign({style:{display:"flex",marginLeft:"auto",cursor:"pointer"},onClick:()=>D(void 0)},{children:e(n,{height:20,width:20,color:m.content.secondary})}))]})),se($)?e("div",Object.assign({style:{display:"flex",margin:"auto",justifyContent:"center",alignItems:"center",height:"calc(100vh - 300px)"}},{children:(()=>{var t,o;return i("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:"0px 30px",gap:"8px"}},{children:[e("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"12px",backgroundColor:`${m.background.negative.light}`,borderRadius:"100px"}},{children:e(a,{width:24,height:24,color:m.stroke.negative.vibrant})})),e("div",Object.assign({style:{justifyContent:"center",alignItems:"center",marginBottom:"-4px"}},{children:e(E,{children:"Insufficient data"})})),e(S,Object.assign({color:m.content.secondary,style:{display:"flex",justifyContent:"center",textAlign:"center"}},{children:"No data available to answer this query. Add an FAQ to address it in the future"})),H&&e("div",Object.assign({style:{display:"flex",width:"100%"}},{children:e(C,{LeadingIcon:null!==(t=H.leadingIcon)&&void 0!==t?t:d,buttonText:null!==(o=H.title)&&void 0!==o?o:"Add FAQ",buttonType:"secondary",size:"small",matchParentWidth:!0,onClick:()=>{H.onClick()}})}))]}))})()})):e(O,{LeadingIcon:a,version:"2.0",type:"grey",theme:"light",alignIcon:"start",contentPadding:12,tagText:j.isEditable?"If any of the information is incorrect, update the original data source and sync it again. Alternatively, you can make local corrections directly in Manifest.":"Edit the original source and save again to update the response"})]})),!se($)&&e("div",Object.assign({className:"info-container"},{children:e("div",Object.assign({style:{padding:"0 8px",maxWidth:"100%"}},{children:$.map(((n,a)=>{var d,y,h,T,C,v,O,E,L,b,_,A,w,R,k,j,D;const F=le(n.type||n.subTitle||"OpenAI"),P=le(n.type||n.subTitle||"OpenAI",!0),M=(H=F)?"faq"==H.toLocaleLowerCase()?"FAQ":"openai"==H.toLocaleLowerCase()?"OPENAI":"files"==H.toLocaleLowerCase()?"PDF":"texts"==H.toLocaleLowerCase()?"Custom text":((H=(H=H.charAt(0).toUpperCase()+H.slice(1).toLowerCase()).replace("_"," ")).endsWith("s")&&(H=H.slice(0,-1)),H.replace("Website","Manual")):"";var H;const Q=null==K?void 0:K.includes(P),G="Products"===n.subTitle?U[null!==(d=n.productId)&&void 0!==d?d:"Products"]:U[null!==(y=n.docId)&&void 0!==y?y:""],Y=P.toLowerCase()===(null===(h=N.FAQ)||void 0===h?void 0:h.toLowerCase())?"faq"===(null===(T=n.title)||void 0===T?void 0:T.toLowerCase())?n.subTitle:n.title:P.toLowerCase()===(null===(C=N.FILES)||void 0===C?void 0:C.toLowerCase())||P.toLowerCase()===(null===(v=N.FETCHED_LINKS)||void 0===v?void 0:v.toLowerCase())||P.toLowerCase()===(null===(O=N.TEXTS)||void 0===O?void 0:O.toLowerCase())?n.title:P.toLowerCase()===(null===(E=N.WEBSITE_LINKS)||void 0===E?void 0:E.toLowerCase())?n.title.split("/")[n.title.split("/").length-1].replace(/[^\w\s]/gi," ").replace(/^(.)(.*)$/,((e,t,i)=>t.toUpperCase()+i)):n.intent===B.EMAIL_COLLECTION?M:n.title,W="faq"===P.toLowerCase()?null!==(_=null!==(L=null==G?void 0:G.content)&&void 0!==L?L:null===(b=null==G?void 0:G.data)||void 0===b?void 0:b.answer)&&void 0!==_?_:"":P.toLowerCase()===(null===(A=N.FETCHED_LINKS)||void 0===A?void 0:A.toLowerCase())||P.toLowerCase()===(null===(w=N.WEBSITE_LINKS)||void 0===w?void 0:w.toLowerCase())||P.toLowerCase()===(null===(R=N.TEXTS)||void 0===R?void 0:R.toLowerCase())?null!==(D=null!==(k=null==G?void 0:G.content)&&void 0!==k?k:null===(j=null==G?void 0:G.data)||void 0===j?void 0:j.fileContentText)&&void 0!==D?D:"":n.intent===B.EMAIL_COLLECTION?"Collect leads before replying to messages":"";return i("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px",padding:"24px 0px",borderBottom:`1px solid ${m.stroke.primary}`}},{children:[i("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",justifyContent:"space-between",alignItems:"center"}},{children:[e("div",Object.assign({style:{flex:1}},{children:e(f,Object.assign({body:Y,placement:"top"},{children:e(S,Object.assign({style:P==N.FETCHED_LINKS||P==N.WEBSITE_LINKS?{cursor:"pointer",textDecoration:"underline"}:{},color:m.content.primary,className:"clamp-title",onClick:()=>P==N.FETCHED_LINKS||P==N.WEBSITE_LINKS?q(n):{}},{children:Y}))}))})),i("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"4px",flex:"none"}},{children:[n.intent!==B.EMAIL_COLLECTION&&i(t,{children:[($=F,e("products"==$||"product"==$?o:"files"==$?s:"website links"==$||"fetched links"==$?g:"faq"==$?l:"texts"==$?u:c,{height:16,width:16,color:m.content.secondary})),e(x,Object.assign({color:m.content.secondary},{children:M}))]}),(n.link||n.docId)&&e("div",Object.assign({style:{cursor:"pointer",marginLeft:"4px"}},{children:e(I,Q?{Icon:r,height:16,width:16,bordered:!0,onClick:()=>null==G?void 0:G.onEditClick(G.data,G.type),disabled:!G,disabledTooltip:"This source is deleted"}:{Icon:p,height:16,width:16,bordered:!0,disabled:"custom"===n.type&&!G,disabledTooltip:"This source is deleted",onClick:()=>q(n)})}))]}))]})),(null!=W?W:"").trim()&&e("div",Object.assign({style:{padding:"4px 8px",border:`1px dashed ${m.stroke.primary}`,borderRadius:"4px",backgroundColor:m.surface.subdued}},{children:e(x,Object.assign({color:m.content.primary,className:"clamp-description"},{children:ae(null!=W?W:"").trim()}))}))]}),`info-${a}`);var $}))}))})),Z&&!se($)&&e("div",Object.assign({className:"footer"},{children:e(L,{appType:R,storeId:k,messageSource:j,sourceIntent:null!==(w=j.intent)&&void 0!==w?w:B.GENERIC,faqCount:ee,trainingSourceCount:ie,ShowTrainingDataSource:re,ChecklistType:B,footerButtonOption:G})}))]})})})};export{_ as DataSourcePanel};
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";import o from"../../assets/icons/boxV2.svg.js";import s from"../../assets/icons/cross.svg.js";import n from"../../assets/icons/edit.svg.js";import r from"../../assets/icons/filePdf.svg.js";import l from"../../assets/icons/help.svg.js";import a from"../../assets/icons/info.svg.js";import d from"../../assets/icons/openai.svg.js";import c from"../../assets/icons/plus.svg.js";import p from"../../assets/icons/redirect.svg.js";import u from"../../assets/icons/text_t9.svg.js";import g from"../../assets/icons/website.svg.js";import{useState as h,useEffect as m}from"react";import{COLORS as v}from"../../constants/Theme.js";import{Button as f}from"../button/Button.js";import{IconButton as y}from"../icon-button/IconButton.js";import{BikShimmer as C}from"../shimmer/ShimmerComponent/BikShimmer.js";import{Tag as x}from"../tag/Tag.js";import{Tooltip as b}from"../tooltips/Tooltip.js";import{TitleSmall as I,BodyCaption as L,BodySecondary as j}from"../TypographyStyle.js";import w from"./DataSourceInfoFooter.js";import{SourceInfoDetailsStyle as T}from"./DataSourcePanel.style.js";import{CustomDataType as E}from"./model.js";const S=S=>{var O,N;const{storeId:k,messageSource:D,setMessageSourcePanel:A,hideCloseButton:_,faqCount:B=0,isSourceInfoFetched:F,allSourceInfoDetail:K,ChecklistType:P,IntentComponentMap:W,title:q,zeroStateButton:M,editableSources:H,redirect:Q,trainingSourceCount:$,ShowTrainingDataSource:R,footerButtonOption:U}=S,{sources:X}=D,z=["blog","article","page","policy"],[G,V]=h(!1),[J,Y]=h(!1);m((()=>{var e,t,i,o;(null==D?void 0:D.messageId)&&(V(!0),setTimeout((()=>V(!1)),200),Y(!1!==(null===(t=null===(e=D.sources)||void 0===e?void 0:e[0])||void 0===t?void 0:t.isTrainable)||!!(null===(o=null===(i=D.sources)||void 0===i?void 0:i[0])||void 0===o?void 0:o.insights)))}),[null==D?void 0:D.messageId]);const Z=e=>!(0!==e.length&&!(null==D?void 0:D.isUnsatisfactoryAnswer)),ee=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var i;return"custom"==e?e=E.FILES:z.includes(e)?e=E.FETCHED_LINKS:"url"==e?e=E.WEBSITE_LINKS:"text"===e?e=E.TEXTS:"faq"===e&&(e=E.FAQ),t?e:null===(i=null==e?void 0:e.toLowerCase())||void 0===i?void 0:i.replace(/_/g," ")};return G||!F?e(T,{children:e(C,{boxes:[{width:"100px",height:"16px"},{width:"0",height:"4px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"0",height:"4px"},{width:"100%",height:"16px"}]})}):e(t,{children:e(T,{children:!!(null==X?void 0:X.length)&&i(t,{children:[i("div",Object.assign({className:"pop-up-header",style:{display:"flex",flexDirection:"column",paddingBottom:"12px"}},{children:[!!q&&e(I,{children:q}),i("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",alignItems:"center"}},{children:[e(L,Object.assign({color:v.content.secondary},{children:"Intent"})),null!==(O=W[D.intent])&&void 0!==O?O:W.GENERIC,!_&&e("div",Object.assign({style:{display:"flex",marginLeft:"auto",cursor:"pointer"},onClick:()=>A(void 0)},{children:e(s,{height:20,width:20,color:v.content.secondary})}))]})),Z(X)?e("div",Object.assign({style:{display:"flex",margin:"auto",justifyContent:"center",alignItems:"center",height:"calc(100vh - 300px)"}},{children:(()=>{var t,o;return i("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:"0px 30px",gap:"8px"}},{children:[e("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"12px",backgroundColor:`${v.background.negative.light}`,borderRadius:"100px"}},{children:e(a,{width:24,height:24,color:v.stroke.negative.vibrant})})),e("div",Object.assign({style:{justifyContent:"center",alignItems:"center",marginBottom:"-4px"}},{children:e(I,{children:"Insufficient data"})})),e(j,Object.assign({color:v.content.secondary,style:{display:"flex",justifyContent:"center",textAlign:"center"}},{children:"No data available to answer this query. Add an FAQ to address it in the future"})),M&&e("div",Object.assign({style:{display:"flex",width:"100%"}},{children:e(f,{LeadingIcon:null!==(t=M.leadingIcon)&&void 0!==t?t:c,buttonText:null!==(o=M.title)&&void 0!==o?o:"Add FAQ",buttonType:"secondary",size:"small",matchParentWidth:!0,onClick:()=>{M.onClick()}})}))]}))})()})):e(x,{LeadingIcon:a,version:"2.0",type:"grey",theme:"light",alignIcon:"start",contentPadding:12,tagText:D.isEditable?"If any of the information is incorrect, update the original data source and sync it again. Alternatively, you can make local corrections directly in Manifest.":"Edit the original source and save again to update the response"})]})),!Z(X)&&e("div",Object.assign({className:"info-container"},{children:e("div",Object.assign({style:{padding:"0 8px",maxWidth:"100%"}},{children:X.map(((s,a)=>{var c,h,m,f,C,x,I,w,T,S,O,N,k,D;const A=ee(s.type||s.subTitle||"OpenAI"),_=ee(s.type||s.subTitle||"OpenAI",!0),B=(F=A)?"faq"==F.toLocaleLowerCase()?"FAQ":"openai"==F.toLocaleLowerCase()?"OPENAI":"files"==F.toLocaleLowerCase()?"PDF":"texts"==F.toLocaleLowerCase()?"Custom text":((F=(F=F.charAt(0).toUpperCase()+F.slice(1).toLowerCase()).replace("_"," ")).endsWith("s")&&(F=F.slice(0,-1)),F.replace("Website","Manual")):"";var F;const W=null==H?void 0:H.includes(_),q="Products"===s.subTitle?K[null!==(c=s.productId)&&void 0!==c?c:"Products"]:K[null!==(h=s.docId)&&void 0!==h?h:""],M=_.toLowerCase()===(null===(m=E.FAQ)||void 0===m?void 0:m.toLowerCase())?"faq"===(null===(f=s.title)||void 0===f?void 0:f.toLowerCase())?s.subTitle:s.title:_.toLowerCase()===(null===(C=E.FILES)||void 0===C?void 0:C.toLowerCase())||_.toLowerCase()===(null===(x=E.FETCHED_LINKS)||void 0===x?void 0:x.toLowerCase())||_.toLowerCase()===(null===(I=E.TEXTS)||void 0===I?void 0:I.toLowerCase())?s.title:_.toLowerCase()===(null===(w=E.WEBSITE_LINKS)||void 0===w?void 0:w.toLowerCase())?s.title.split("/")[s.title.split("/").length-1].replace(/[^\w\s]/gi," ").replace(/^(.)(.*)$/,((e,t,i)=>t.toUpperCase()+i)):s.intent===P.EMAIL_COLLECTION?B:s.title,$="faq"===_.toLowerCase()?null===(T=null==q?void 0:q.data)||void 0===T?void 0:T.answer:_.toLowerCase()===(null===(S=E.FETCHED_LINKS)||void 0===S?void 0:S.toLowerCase())||_.toLowerCase()===(null===(O=E.WEBSITE_LINKS)||void 0===O?void 0:O.toLowerCase())||_.toLowerCase()===(null===(N=E.TEXTS)||void 0===N?void 0:N.toLowerCase())?null!==(D=null===(k=null==q?void 0:q.data)||void 0===k?void 0:k.fileContentText)&&void 0!==D?D:"":s.intent===P.EMAIL_COLLECTION?"Collect leads before replying to messages":"";return i("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px",padding:"24px 0px",borderBottom:`1px solid ${v.stroke.primary}`}},{children:[i("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",justifyContent:"space-between",alignItems:"center"}},{children:[e("div",Object.assign({style:{flex:1}},{children:e(b,Object.assign({body:M,placement:"top"},{children:e(j,Object.assign({style:_==E.FETCHED_LINKS||_==E.WEBSITE_LINKS?{cursor:"pointer",textDecoration:"underline"}:{},color:v.content.primary,className:"clamp-title",onClick:()=>_==E.FETCHED_LINKS||_==E.WEBSITE_LINKS?Q(s):{}},{children:M}))}))})),i("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"4px",flex:"none"}},{children:[s.intent!==P.EMAIL_COLLECTION&&i(t,{children:[(U=A,e("products"==U?o:"files"==U?r:"website links"==U||"fetched links"==U?g:"faq"==U?l:"texts"==U?u:d,{height:16,width:16,color:v.content.secondary})),e(L,Object.assign({color:v.content.secondary},{children:B}))]}),(s.link||s.docId)&&e("div",Object.assign({style:{cursor:"pointer",marginLeft:"4px"}},{children:e(y,W?{Icon:n,height:16,width:16,bordered:!0,onClick:()=>null==q?void 0:q.onEditClick(q.data,q.type),disabled:!q,disabledTooltip:"This source is deleted"}:{Icon:p,height:16,width:16,bordered:!0,disabled:"custom"===s.type&&!q,disabledTooltip:"This source is deleted",onClick:()=>Q(s)})}))]}))]})),(null!=$?$:"").trim()&&e("div",Object.assign({style:{padding:"4px 8px",border:`1px dashed ${v.stroke.primary}`,borderRadius:"4px",backgroundColor:v.surface.subdued}},{children:e(L,Object.assign({color:v.content.primary,className:"clamp-description"},{children:(R=null!=$?$:"",R.replace(/(<([^>]+)>)/gi,"")).trim()}))}))]}),`info-${a}`);var R,U}))}))})),J&&!Z(X)&&e("div",Object.assign({className:"footer"},{children:e(w,{storeId:k,messageSource:D,sourceIntent:null!==(N=D.intent)&&void 0!==N?N:P.GENERIC,faqCount:B,trainingSourceCount:$,ShowTrainingDataSource:R,ChecklistType:P,footerButtonOption:U})}))]})})})};export{S as DataSourcePanel};
|
|
@@ -124,15 +124,12 @@ export interface LiveChatCTA {
|
|
|
124
124
|
buttonType: string;
|
|
125
125
|
}
|
|
126
126
|
export interface footerButtonOptionModel {
|
|
127
|
+
title?: string;
|
|
128
|
+
subtitle?: string;
|
|
129
|
+
buttonTitle: string;
|
|
130
|
+
addFaqProps?: any;
|
|
131
|
+
redirectUrl?: string;
|
|
127
132
|
hideAddDataButton?: boolean;
|
|
128
|
-
navigate?: (pagePathKey: string, params?: object, queryParam?: object, openInNewTab?: boolean) => void;
|
|
129
|
-
onClick: (
|
|
130
|
-
buttonTitle: any;
|
|
131
|
-
redirectUrl: any;
|
|
132
|
-
addFaqProps: any;
|
|
133
|
-
}) => void;
|
|
134
|
-
}
|
|
135
|
-
export declare enum AppType {
|
|
136
|
-
MANIFEST = "MANIFEST",
|
|
137
|
-
BIK = "BIK"
|
|
133
|
+
navigate?: (pagePathKey: Record<string, string>, params?: object, queryParam?: object, openInNewTab?: boolean) => void;
|
|
134
|
+
onClick: () => void;
|
|
138
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var E,T
|
|
1
|
+
var E,T;!function(E){E.PAGE="page",E.POLICY="policy",E.ARTICLE="article",E.UPLOADED="uploaded",E.TEXT="text"}(E||(E={})),function(E){E.FAQ="FAQ",E.FILES="FILES",E.WEBSITE_LINKS="WEBSITE_LINKS",E.TEXTS="TEXTS",E.FETCHED_LINKS="FETCHED_LINKS",E.URL="URL",E.TRAINING_TEMPLATE="TRAINING_TEMPLATE"}(T||(T={}));export{E as CustomDataCategories,T as CustomDataType};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import c from"../../assets/icons/search.svg.js";import{useReducer as r,useState as s,useRef as i,useEffect as n}from"react";import{COLORS as l}from"../../constants/Theme.js";import d from"../../assets/icons/cross.svg.js";import{Button as a}from"../button/Button.js";import{Input as u}from"../input/Input.js";import{StyledModal as h}from"../modals/styledModal.js";import{Spinner as p}from"../spinner/Spinner.js";import{Tag as m}from"../tag/Tag.js";import{CollectionsScreen as C}from"./collectionScreen.js";import{ProductInfoOverlay as g}from"./productInfoOverlay.js";import{ProductsScreen as f}from"./productScreen.js";import{RearrangeScreen as y}from"./rearrangeScreen.js";import{collectionsReducer as b,searchReducer as S,selectedColectionsReducer as v,CollectionIdContext as k}from"./reducers.js";import{SearchScreen as j}from"./searchScreen.js";import{SelectedScreen as I}from"./selectedScreen.js";import{ContainerStyle as x,ScrollContainerStyle as P,StyledFooterForNonModal as O}from"./style.js";import{OUT_OF_STOCK_ACTION as D}from"./type.js";import{updateAllVariantsForSelectedProducts as F}from"./utility.js";var T;!function(e){e.Collections="collections",e.RearrangeProducts="rearrange",e.SelectedProducts="view",e.SearchProducts="searchProducts",e.Products="products"}(T||(T={}));const R=R=>{const{storeId:w,selectedItems:A,onClose:B,visible:E,zIndex:L,exactLimit:z,limit:V,hideCollectionCheckbox:$,hideProductCheckbox:M,outOfStockAction:H=D.BLUR,hideVariantCheckbox:W,selectProductsFromCustomCollection:G,hideSelectionCount:N,title:Y,width:K,left:U,renderWithoutModal:q,onClickSave:J,pickerType:Q,hideProductVariants:X=!1,startupScreen:Z=T.Collections,rearrangeEnabled:_,selectSingleItem:ee=!1,showProductDetails:te,containerStyle:oe,crossButtonInsideHeader:ce=!1,footerForNonModal:re={},primaryButton:se,secondaryButton:ie,subtitle:ne}=R,[le,de]=r(b,{}),[ae,ue]=s([T.Collections,T.RearrangeProducts].includes(Z)?Z:T.Collections),[he,pe]=s("grid"),[me,Ce]=s(""),[ge,fe]=s(""),[ye,be]=s(0),[Se,ve]=s(!1),[ke,je]=s(0),[Ie,xe]=s(""),[Pe,Oe]=s(!1),[De,Fe]=s(!1),[Te,Re]=r(S,{collections:{},products:{}}),[we,Ae]=r(v,Object.keys(A).length>0?A:{}),Be=i(null),[Ee,Le]=s(!1),[ze,Ve]=s();n((()=>{ve(!0),Fe(!0),R.collectionFetcher(ye,w).then((e=>{de({type:"fetched",data:(null==e?void 0:e.collections)||{}}),ve(!1),be((e=>e+1)),Fe(!1)})).catch()}),[]),n((()=>{let e=0;X?Object.keys(we||[]).forEach((t=>{var o;Object.keys((null===(o=we[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c;"-1"!==t&&we[-1]&&(null===(c=we[-1].products)||void 0===c?void 0:c[o])||(e+=1)}))})):Object.keys(we||[]).forEach((t=>{var o;Object.keys((null===(o=we[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c,r;Object.keys((null===(r=null===(c=we[t].products)||void 0===c?void 0:c[o])||void 0===r?void 0:r.variants)||[]).forEach((()=>{e+=1}))}))})),je(e)}),[le,we,X]),n((()=>{ge&&(ve(!0),R.productFetcher(ge,w).then((e=>{Object.keys(e).length&&de({type:"productsFetched",data:{collectionId:ge,products:e}}),ve(!1)})).catch())}),[ge]),n((()=>{const e=setTimeout((()=>{"rearrange"!==ae&&(Ie.length||"collections"!==ae)&&(Ie.length?(Oe(!0),R.searchFetcher(w,Ie).then((e=>{"collections"in e&&"products"in e?(Re({type:"set",data:e}),de({type:"searched",data:e.collections})):(Re({type:"set",data:{collections:{},products:e}}),de({type:"searched",data:e})),ue("searchProducts"),ve(!1),Oe(!1)}))):ue("collections"))}),800);return()=>clearTimeout(e)}),[Ie]),n((()=>{J&&(R.onAdd(we,ke),$e())}),[J]),n((()=>{ee&&Object.keys(we||{}).length&&ke&&(R.onAdd(we,ke),$e())}),[ee,we,ke]);const $e=()=>{Ae({type:"reset",data:{}})},Me=()=>z&&ke>z?t(m,{tagText:`You can only select ${z} products`,type:"negative"}):V&&ke>V?t(m,{tagText:`You can only select ${V} products`,type:"negative"}):t(a,ke>0?{onClick:()=>{ue(_?T.RearrangeProducts:T.SelectedProducts)},buttonText:z?`${ke}/${z} products selected`:`${ke} products selected`,buttonType:["rearrange","view"].includes(ae)?"tertiaryGray":"tertiary",disabled:["rearrange","view"].includes(ae)}:{disabled:!0,buttonText:z?`${ke}/${z} products selected`:`${ke} products selected`,buttonType:"tertiaryGray"}),He=e=>Se?"Loading...":ae===T.RearrangeProducts?null!=e?e:"Done":null!=e?e:"Add",We=e(x,Object.assign({style:null!=oe?oe:{}},{children:[R.postHeader&&t("div",Object.assign({style:{padding:"0 24px"}},{children:R.postHeader})),!R.hideGlobalSearch&&t(o,{children:("collections"===ae||"searchProducts"===ae)&&t("div",Object.assign({style:{padding:q?"8px 16px":"12px 24px",borderBottom:"1px solid #E0E0E0"}},{children:t(u,{placeholder:"Search for collections and products, or type a product ID",noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>Pe?t(p,{size:"small",color:l.content.primary}):t(c,{})},id:"listInput",height:"24px",type:"text",value:Ie,onChangeText:e=>{e.length&&e.trim().length?xe(e):xe("")}})}))}),e(P,Object.assign({ref:Be,screenName:ae},{children:["collections"===ae&&t(C,{customCollectionRestriction:R.customCollectionRestriction,dataLoading:De,collections:le,selectedCollectionsDispatch:Ae,setCollectionId:Ce,setSelectedCollectionId:fe,setScreen:ue,selectedCollections:we,collectionFetcher:R.collectionFetcher,storeId:w,collectionsDispatch:de,setSaveDisabled:ve,pagingControls:{curPage:ye,setCurPage:be},hideCollectionCheckbox:$,renderWithoutModal:q,pickerType:Q,scrollContainerRef:Be}),"products"===ae&&me&&t(k.Provider,Object.assign({value:me},{children:t(f,{hideInCollectionSearch:R.hideInCollectionSearch,customCollectionRestriction:R.customCollectionRestriction,productFetcher:R.productFetcher,setScreen:ue,storeId:w,data:le[me],collectionsDispatch:de,selectedCollectionsDispatch:Ae,selectedData:we,setSaveDisabled:ve,searchInCollectionFetcher:R.searchInCollectionFetcher,hideProductCheckbox:M,outOfStockAction:H,hideVariantCheckbox:W,selectProductsFromCustomCollection:G,renderWithoutModal:q,pickerType:Q,hideProductVariants:X,fbStatusFetcher:R.fbStatusFetcher,onProductDetailClick:e=>{Le(!0),Ve(e)},showProductDetailInfoIcon:te,scrollContainerRef:Be})})),"view"===ae&&t(I,{selectedCollections:we||{},selectedCollectionsDispatch:Ae,setScreen:ue,collections:le,hideProductVariants:X,outOfStockAction:H,storeId:w,fbStatusFetcher:R.fbStatusFetcher}),"rearrange"===ae&&t(y,{selectedCollections:we||{},selectedCollectionsDispatch:Ae,setScreen:ue,outOfStockAction:H,rearrangeViewType:"grid"===he?"list":"grid",scrollContainerRef:Be,storeId:w,fbStatusFetcher:R.fbStatusFetcher}),"searchProducts"===ae&&t(j,{customCollectionRestriction:R.customCollectionRestriction,selectedCollections:we||{},searchedCollections:Te||{},searchedCollectionsDispatch:Re,selectedCollectionsDispatch:Ae,setScreen:ue,collections:le,onBackPress:()=>{xe(""),Re({type:"set",data:{collections:{},products:{}}})},pickerType:Q,hideProductCheckbox:M,hideProductVariants:X,hideVariantCheckbox:W,storeId:w,fbStatusFetcher:R.fbStatusFetcher,setCollectionId:Ce,setSelectedCollectionId:fe,renderWithoutModal:q,hideCollectionCheckbox:$,outOfStockAction:H})]}))]}));return t(o,{children:q?e(o,{children:[We,re.renderFooter?e(O,{children:[Me(),t(a,{buttonText:He(re.primaryButtonText),disabled:!re.isLoading&&(Se||ke<1||z&&ke<z||!z&&V&&ke>V)||re.primaryButtonDisabled,isLoading:re.isLoading,onClick:()=>{R.onAdd(we,ke),$e(),ue([T.Collections,T.RearrangeProducts].includes(Z)?Z:T.Collections)}})]}):t(o,{}),Ee&&ze?t(g,{productData:ze,outOfStockAction:H,useDynamicInfoImageSize:R.useDynamicInfoImageSize,onClose:()=>{Le(!1)}}):t(o,{})]}):e(h,Object.assign({zIndex:L,open:E,onClose:()=>{null==B||B(),$e()},headingTitle:Y||("collections"===ae||"products"===ae?"Select Products":"view"===ae?"Selected Products":"searchProducts"===ae?"Searched Results":"rearrange"===ae?"Rearrange Products":void 0),headingSubtitle:ne,footerShadow:!0,centralContainerStyles:{width:K||"600px",left:U||"auto"},headerRightCustomElement:ce?t("div",Object.assign({style:{cursor:"pointer",display:"flex"},onClick:B},{children:t(d,{width:20,height:20,color:l.content.secondary})})):t(o,{}),footerContainerStyle:R.stickyFooter?{position:"absolute",bottom:0,left:0,width:"100%",zIndex:9,background:l.surface.standard}:void 0,primaryButton:se?(e=>Object.assign(Object.assign({},e),{disabled:!e.isLoading&&(Se||ke<1||z&&ke<z||!z&&V&&ke>V)||e.disabled,onClick:()=>{R.onAdd(we,ke),$e(),ue([T.Collections,T.RearrangeProducts].includes(Z)?Z:T.Collections)}}))(se):{buttonText:He(),disabled:Se||ke<1||z&&ke<z||!z&&V&&ke>V||!1,onClick:()=>{R.onAdd(we,ke),$e()}},secondaryButton:ie?(e=>Object.assign(Object.assign({},e),{disabled:Se||ke<1||z&&ke<z||!z&&V&&ke>V||!1,onClick:()=>{const e=F(we,le
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import c from"../../assets/icons/search.svg.js";import{useReducer as r,useState as s,useRef as i,useEffect as n}from"react";import{COLORS as l}from"../../constants/Theme.js";import d from"../../assets/icons/cross.svg.js";import{Button as a}from"../button/Button.js";import{Input as u}from"../input/Input.js";import{StyledModal as h}from"../modals/styledModal.js";import{Spinner as p}from"../spinner/Spinner.js";import{Tag as m}from"../tag/Tag.js";import{CollectionsScreen as C}from"./collectionScreen.js";import{ProductInfoOverlay as g}from"./productInfoOverlay.js";import{ProductsScreen as f}from"./productScreen.js";import{RearrangeScreen as y}from"./rearrangeScreen.js";import{collectionsReducer as b,searchReducer as S,selectedColectionsReducer as v,CollectionIdContext as k}from"./reducers.js";import{SearchScreen as j}from"./searchScreen.js";import{SelectedScreen as I}from"./selectedScreen.js";import{ContainerStyle as x,ScrollContainerStyle as P,StyledFooterForNonModal as O}from"./style.js";import{OUT_OF_STOCK_ACTION as D}from"./type.js";import{updateAllVariantsForSelectedProducts as F}from"./utility.js";var T;!function(e){e.Collections="collections",e.RearrangeProducts="rearrange",e.SelectedProducts="view",e.SearchProducts="searchProducts",e.Products="products"}(T||(T={}));const R=R=>{const{storeId:w,selectedItems:A,onClose:B,visible:E,zIndex:L,exactLimit:z,limit:V,hideCollectionCheckbox:$,hideProductCheckbox:M,outOfStockAction:H=D.BLUR,hideVariantCheckbox:W,selectProductsFromCustomCollection:G,hideSelectionCount:N,title:Y,width:K,left:U,renderWithoutModal:q,onClickSave:J,pickerType:Q,hideProductVariants:X=!1,startupScreen:Z=T.Collections,rearrangeEnabled:_,selectSingleItem:ee=!1,showProductDetails:te,containerStyle:oe,crossButtonInsideHeader:ce=!1,footerForNonModal:re={},primaryButton:se,secondaryButton:ie,subtitle:ne}=R,[le,de]=r(b,{}),[ae,ue]=s([T.Collections,T.RearrangeProducts].includes(Z)?Z:T.Collections),[he,pe]=s("grid"),[me,Ce]=s(""),[ge,fe]=s(""),[ye,be]=s(0),[Se,ve]=s(!1),[ke,je]=s(0),[Ie,xe]=s(""),[Pe,Oe]=s(!1),[De,Fe]=s(!1),[Te,Re]=r(S,{collections:{},products:{}}),[we,Ae]=r(v,Object.keys(A).length>0?A:{}),Be=i(null),[Ee,Le]=s(!1),[ze,Ve]=s();n((()=>{ve(!0),Fe(!0),R.collectionFetcher(ye,w).then((e=>{de({type:"fetched",data:(null==e?void 0:e.collections)||{}}),ve(!1),be((e=>e+1)),Fe(!1)})).catch()}),[]),n((()=>{let e=0;X?Object.keys(we||[]).forEach((t=>{var o;Object.keys((null===(o=we[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c;"-1"!==t&&we[-1]&&(null===(c=we[-1].products)||void 0===c?void 0:c[o])||(e+=1)}))})):Object.keys(we||[]).forEach((t=>{var o;Object.keys((null===(o=we[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c,r;Object.keys((null===(r=null===(c=we[t].products)||void 0===c?void 0:c[o])||void 0===r?void 0:r.variants)||[]).forEach((()=>{e+=1}))}))})),je(e)}),[le,we,X]),n((()=>{ge&&(ve(!0),R.productFetcher(ge,w).then((e=>{Object.keys(e).length&&de({type:"productsFetched",data:{collectionId:ge,products:e}}),ve(!1)})).catch())}),[ge]),n((()=>{const e=setTimeout((()=>{"rearrange"!==ae&&(Ie.length||"collections"!==ae)&&(Ie.length?(Oe(!0),R.searchFetcher(w,Ie).then((e=>{"collections"in e&&"products"in e?(Re({type:"set",data:e}),de({type:"searched",data:e.collections})):(Re({type:"set",data:{collections:{},products:e}}),de({type:"searched",data:e})),ue("searchProducts"),ve(!1),Oe(!1)}))):ue("collections"))}),800);return()=>clearTimeout(e)}),[Ie]),n((()=>{J&&(R.onAdd(we,ke),$e())}),[J]),n((()=>{ee&&Object.keys(we||{}).length&&ke&&(R.onAdd(we,ke),$e())}),[ee,we,ke]);const $e=()=>{Ae({type:"reset",data:{}})},Me=()=>z&&ke>z?t(m,{tagText:`You can only select ${z} products`,type:"negative"}):V&&ke>V?t(m,{tagText:`You can only select ${V} products`,type:"negative"}):t(a,ke>0?{onClick:()=>{ue(_?T.RearrangeProducts:T.SelectedProducts)},buttonText:z?`${ke}/${z} products selected`:`${ke} products selected`,buttonType:["rearrange","view"].includes(ae)?"tertiaryGray":"tertiary",disabled:["rearrange","view"].includes(ae)}:{disabled:!0,buttonText:z?`${ke}/${z} products selected`:`${ke} products selected`,buttonType:"tertiaryGray"}),He=e=>Se?"Loading...":ae===T.RearrangeProducts?null!=e?e:"Done":null!=e?e:"Add",We=e(x,Object.assign({style:null!=oe?oe:{}},{children:[R.postHeader&&t("div",Object.assign({style:{padding:"0 24px"}},{children:R.postHeader})),!R.hideGlobalSearch&&t(o,{children:("collections"===ae||"searchProducts"===ae)&&t("div",Object.assign({style:{padding:q?"8px 16px":"12px 24px",borderBottom:"1px solid #E0E0E0"}},{children:t(u,{placeholder:"Search for collections and products, or type a product ID",noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>Pe?t(p,{size:"small",color:l.content.primary}):t(c,{})},id:"listInput",height:"24px",type:"text",value:Ie,onChangeText:e=>{e.length&&e.trim().length?xe(e):xe("")}})}))}),e(P,Object.assign({ref:Be,screenName:ae},{children:["collections"===ae&&t(C,{customCollectionRestriction:R.customCollectionRestriction,dataLoading:De,collections:le,selectedCollectionsDispatch:Ae,setCollectionId:Ce,setSelectedCollectionId:fe,setScreen:ue,selectedCollections:we,collectionFetcher:R.collectionFetcher,storeId:w,collectionsDispatch:de,setSaveDisabled:ve,pagingControls:{curPage:ye,setCurPage:be},hideCollectionCheckbox:$,renderWithoutModal:q,pickerType:Q,scrollContainerRef:Be}),"products"===ae&&me&&t(k.Provider,Object.assign({value:me},{children:t(f,{hideInCollectionSearch:R.hideInCollectionSearch,customCollectionRestriction:R.customCollectionRestriction,productFetcher:R.productFetcher,setScreen:ue,storeId:w,data:le[me],collectionsDispatch:de,selectedCollectionsDispatch:Ae,selectedData:we,setSaveDisabled:ve,searchInCollectionFetcher:R.searchInCollectionFetcher,hideProductCheckbox:M,outOfStockAction:H,hideVariantCheckbox:W,selectProductsFromCustomCollection:G,renderWithoutModal:q,pickerType:Q,hideProductVariants:X,fbStatusFetcher:R.fbStatusFetcher,onProductDetailClick:e=>{Le(!0),Ve(e)},showProductDetailInfoIcon:te,scrollContainerRef:Be})})),"view"===ae&&t(I,{selectedCollections:we||{},selectedCollectionsDispatch:Ae,setScreen:ue,collections:le,hideProductVariants:X,outOfStockAction:H,storeId:w,fbStatusFetcher:R.fbStatusFetcher}),"rearrange"===ae&&t(y,{selectedCollections:we||{},selectedCollectionsDispatch:Ae,setScreen:ue,outOfStockAction:H,rearrangeViewType:"grid"===he?"list":"grid",scrollContainerRef:Be,storeId:w,fbStatusFetcher:R.fbStatusFetcher}),"searchProducts"===ae&&t(j,{customCollectionRestriction:R.customCollectionRestriction,selectedCollections:we||{},searchedCollections:Te||{},searchedCollectionsDispatch:Re,selectedCollectionsDispatch:Ae,setScreen:ue,collections:le,onBackPress:()=>{xe(""),Re({type:"set",data:{collections:{},products:{}}})},pickerType:Q,hideProductCheckbox:M,hideProductVariants:X,hideVariantCheckbox:W,storeId:w,fbStatusFetcher:R.fbStatusFetcher,setCollectionId:Ce,setSelectedCollectionId:fe,renderWithoutModal:q,hideCollectionCheckbox:$,outOfStockAction:H})]}))]}));return t(o,{children:q?e(o,{children:[We,re.renderFooter?e(O,{children:[Me(),t(a,{buttonText:He(re.primaryButtonText),disabled:!re.isLoading&&(Se||ke<1||z&&ke<z||!z&&V&&ke>V)||re.primaryButtonDisabled,isLoading:re.isLoading,onClick:()=>{R.onAdd(we,ke),$e(),ue([T.Collections,T.RearrangeProducts].includes(Z)?Z:T.Collections)}})]}):t(o,{}),Ee&&ze?t(g,{productData:ze,outOfStockAction:H,useDynamicInfoImageSize:R.useDynamicInfoImageSize,onClose:()=>{Le(!1)}}):t(o,{})]}):e(h,Object.assign({zIndex:L,open:E,onClose:()=>{null==B||B(),$e()},headingTitle:Y||("collections"===ae||"products"===ae?"Select Products":"view"===ae?"Selected Products":"searchProducts"===ae?"Searched Results":"rearrange"===ae?"Rearrange Products":void 0),headingSubtitle:ne,footerShadow:!0,centralContainerStyles:{width:K||"600px",left:U||"auto"},headerRightCustomElement:ce?t("div",Object.assign({style:{cursor:"pointer",display:"flex"},onClick:B},{children:t(d,{width:20,height:20,color:l.content.secondary})})):t(o,{}),footerContainerStyle:R.stickyFooter?{position:"absolute",bottom:0,left:0,width:"100%",zIndex:9,background:l.surface.standard}:void 0,primaryButton:se?(e=>Object.assign(Object.assign({},e),{disabled:!e.isLoading&&(Se||ke<1||z&&ke<z||!z&&V&&ke>V)||e.disabled,onClick:()=>{R.onAdd(we,ke),$e(),ue([T.Collections,T.RearrangeProducts].includes(Z)?Z:T.Collections)}}))(se):{buttonText:He(),disabled:Se||ke<1||z&&ke<z||!z&&V&&ke>V||!1,onClick:()=>{R.onAdd(we,ke),$e()}},secondaryButton:ie?(e=>Object.assign(Object.assign({},e),{disabled:Se||ke<1||z&&ke<z||!z&&V&&ke>V||!1,onClick:()=>{const e=F(we,le);R.onAdd(e,ke,!0)}}))(ie):void 0,wrapperStyle:R.stickyFooter?{height:"calc(100vh - 168px)"}:void 0,footerLeftCustomElement:N?t(o,{}):Me(),hideCrossButton:Ee||ce},{children:[We,Ee&&ze?t(g,{productData:ze,useDynamicInfoImageSize:R.useDynamicInfoImageSize,outOfStockAction:H,onClose:()=>{Le(!1)}}):t(o,{})]}))})};export{R as ProductPickerModal,T as ScreenName};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Collection, FbStatusFetcherReturn, Product, ProductVariant,
|
|
1
|
+
import { Collection, FbStatusFetcherReturn, Product, ProductVariant, SelectedItems } from './modal';
|
|
2
2
|
import { CollectionsActions } from './reducers';
|
|
3
3
|
export declare const liftTheStateUp: (payload: any, data: any) => any;
|
|
4
4
|
export declare function paginateSelectedItems(selectedItems: SelectedItems, limit: number, offset: number): {
|
|
@@ -47,4 +47,4 @@ export declare const updateAllVariantsForSelectedProducts: (selectedItems: {
|
|
|
47
47
|
};
|
|
48
48
|
} | undefined;
|
|
49
49
|
};
|
|
50
|
-
}, collections: Collection
|
|
50
|
+
}, collections: Collection) => Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cloneDeep as o}from"lodash";const l=(l,i)=>{const n=o(i);if(delete n.products,(l=Object.assign(Object.assign({},l),{catalogOnlyData:n})).productId&&i.products){const t=o(i.products[l.productId]);(null==t?void 0:t.variants)&&delete t.variants,l=Object.assign(Object.assign({},l),{catalogOnlyData:n,productOnlyData:t})}return l};function i(o,l,i){var t;const d={};let v=0;for(const s in o)if(Object.prototype.hasOwnProperty.call(o,s)){const u=o[s],c=n(u.products,l,i-v);c&&Object.keys(c).length>0&&(d[s]=Object.assign(Object.assign({},u),{products:c})),v+=Object.keys(null!==(t=u.products)&&void 0!==t?t:{}).length}return d}function n(o,l,i){if(!o)return{};const n=Object.keys(o).slice(i,i+l),t={};return n.forEach((l=>{t[l]=o[l]})),t}const t=(o,l,i)=>{Object.keys(o).forEach((l=>{var i,n;const t=null!==(n=null===(i=o[l])||void 0===i?void 0:i.products)&&void 0!==n?n:{};Object.keys(t).forEach((i=>{var n,t,d,v;const s=null!==(v=null===(d=null===(t=null===(n=o[l])||void 0===n?void 0:n.products)||void 0===t?void 0:t[i])||void 0===d?void 0:d.variants)&&void 0!==v?v:{};Object.keys(s).forEach((n=>{var t,d,v,s;const u=null===(s=null===(v=null===(d=null===(t=o[l])||void 0===t?void 0:t.products)||void 0===d?void 0:d[i])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[n];u&&!u.fbStatus&&(u.fbStatus="APPROVED")}))}))})),l({type:i,data:o})},d=function(o,l,i,n){let d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"paged";n||t(o,i,d);const v=(o=>{const l=[];return Object.keys(o).forEach((i=>{var n,t;const d=null!==(t=null===(n=o[i])||void 0===n?void 0:n.products)&&void 0!==t?t:{};Object.keys(d).forEach((n=>{var t,d,v,s;const u=null!==(s=null===(v=null===(d=null===(t=o[i])||void 0===t?void 0:t.products)||void 0===d?void 0:d[n])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(u).forEach((t=>{var d,v,s,u;const c=null===(u=null===(s=null===(v=null===(d=o[i])||void 0===d?void 0:d.products)||void 0===v?void 0:v[n])||void 0===s?void 0:s.variants)||void 0===u?void 0:u[t];(null==c?void 0:c.fbStatus)||l.push(t)}))}))})),l})(o);v.length>0&&n&&n(l,v).then((l=>{const n=Object.assign({},o);Object.keys(n).forEach((o=>{var i,t;const d=null!==(t=null===(i=n[o])||void 0===i?void 0:i.products)&&void 0!==t?t:{};Object.keys(d).forEach((i=>{var t,d,v,s;const u=null!==(s=null===(v=null===(d=null===(t=n[o])||void 0===t?void 0:t.products)||void 0===d?void 0:d[i])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(u).forEach((t=>{var d,v,s,u;const c=null===(u=null===(s=null===(v=null===(d=n[o])||void 0===d?void 0:d.products)||void 0===v?void 0:v[i])||void 0===s?void 0:s.variants)||void 0===u?void 0:u[t];c&&"REJECTED"===l[t]?c.fbStatus="REJECTED":c&&"APPROVED"===l[t]&&(c.fbStatus="APPROVED")}))}))})),i({type:d,data:n})})).catch((l=>{console.error("Error in fbStatusFetcher",l),t(o,i,d)}))},v=(o,l)=>{const i=[];return Object.keys(null!=o?o:{}).forEach((n=>{var t,d;const v=null!==(d=null===(t=null==o?void 0:o[n])||void 0===t?void 0:t.variants)&&void 0!==d?d:{};Object.keys(v).forEach((t=>{var d,v,s,u,c;let r;r=l?null===(s=null===(v=null===(d=null==l?void 0:l.products)||void 0===d?void 0:d[n])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[t]:null===(c=null===(u=null==o?void 0:o[n])||void 0===u?void 0:u.variants)||void 0===c?void 0:c[t],(null==r?void 0:r.fbStatus)||i.push(t)}))})),i},s=(o,l,i,n,t)=>{const d=Object.assign({},o);if(Object.keys(o).forEach((l=>{var i,n;Object.keys(null!==(n=null===(i=null==o?void 0:o[l])||void 0===i?void 0:i.variants)&&void 0!==n?n:{}).forEach((i=>{var n,t;const v=null===(n=null==o?void 0:o[l].variants)||void 0===n?void 0:n[i];v&&(v.fbStatus="APPROVED");const s=null===(t=null==d?void 0:d[l])||void 0===t?void 0:t.variants;s&&s[i]&&(s[i]=v)}))})),n&&t){const o=Object.assign({},n);o.products=d,t(o),l({type:"productsPaged",data:{collectionId:i,products:d}})}else l({type:"productsPaged",data:{collectionId:i,products:d}})},u=o=>{const l=Object.keys(o.variants||[]);let i=!1;return!(l.length<=1)||(l.forEach((l=>{var n,t;i=null!==(t=null===(n=o.variants)||void 0===n?void 0:n[l].name.includes(o.name))&&void 0!==t&&t})),!i)},c=(o,l,i,n,t)=>{var d,v,s,u,c,r,a,e,p,b,O,f,j,h,y,E,g,k,P;let D=0,
|
|
1
|
+
import{cloneDeep as o}from"lodash";const l=(l,i)=>{const n=o(i);if(delete n.products,(l=Object.assign(Object.assign({},l),{catalogOnlyData:n})).productId&&i.products){const t=o(i.products[l.productId]);(null==t?void 0:t.variants)&&delete t.variants,l=Object.assign(Object.assign({},l),{catalogOnlyData:n,productOnlyData:t})}return l};function i(o,l,i){var t;const d={};let v=0;for(const s in o)if(Object.prototype.hasOwnProperty.call(o,s)){const u=o[s],c=n(u.products,l,i-v);c&&Object.keys(c).length>0&&(d[s]=Object.assign(Object.assign({},u),{products:c})),v+=Object.keys(null!==(t=u.products)&&void 0!==t?t:{}).length}return d}function n(o,l,i){if(!o)return{};const n=Object.keys(o).slice(i,i+l),t={};return n.forEach((l=>{t[l]=o[l]})),t}const t=(o,l,i)=>{Object.keys(o).forEach((l=>{var i,n;const t=null!==(n=null===(i=o[l])||void 0===i?void 0:i.products)&&void 0!==n?n:{};Object.keys(t).forEach((i=>{var n,t,d,v;const s=null!==(v=null===(d=null===(t=null===(n=o[l])||void 0===n?void 0:n.products)||void 0===t?void 0:t[i])||void 0===d?void 0:d.variants)&&void 0!==v?v:{};Object.keys(s).forEach((n=>{var t,d,v,s;const u=null===(s=null===(v=null===(d=null===(t=o[l])||void 0===t?void 0:t.products)||void 0===d?void 0:d[i])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[n];u&&!u.fbStatus&&(u.fbStatus="APPROVED")}))}))})),l({type:i,data:o})},d=function(o,l,i,n){let d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"paged";n||t(o,i,d);const v=(o=>{const l=[];return Object.keys(o).forEach((i=>{var n,t;const d=null!==(t=null===(n=o[i])||void 0===n?void 0:n.products)&&void 0!==t?t:{};Object.keys(d).forEach((n=>{var t,d,v,s;const u=null!==(s=null===(v=null===(d=null===(t=o[i])||void 0===t?void 0:t.products)||void 0===d?void 0:d[n])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(u).forEach((t=>{var d,v,s,u;const c=null===(u=null===(s=null===(v=null===(d=o[i])||void 0===d?void 0:d.products)||void 0===v?void 0:v[n])||void 0===s?void 0:s.variants)||void 0===u?void 0:u[t];(null==c?void 0:c.fbStatus)||l.push(t)}))}))})),l})(o);v.length>0&&n&&n(l,v).then((l=>{const n=Object.assign({},o);Object.keys(n).forEach((o=>{var i,t;const d=null!==(t=null===(i=n[o])||void 0===i?void 0:i.products)&&void 0!==t?t:{};Object.keys(d).forEach((i=>{var t,d,v,s;const u=null!==(s=null===(v=null===(d=null===(t=n[o])||void 0===t?void 0:t.products)||void 0===d?void 0:d[i])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(u).forEach((t=>{var d,v,s,u;const c=null===(u=null===(s=null===(v=null===(d=n[o])||void 0===d?void 0:d.products)||void 0===v?void 0:v[i])||void 0===s?void 0:s.variants)||void 0===u?void 0:u[t];c&&"REJECTED"===l[t]?c.fbStatus="REJECTED":c&&"APPROVED"===l[t]&&(c.fbStatus="APPROVED")}))}))})),i({type:d,data:n})})).catch((l=>{console.error("Error in fbStatusFetcher",l),t(o,i,d)}))},v=(o,l)=>{const i=[];return Object.keys(null!=o?o:{}).forEach((n=>{var t,d;const v=null!==(d=null===(t=null==o?void 0:o[n])||void 0===t?void 0:t.variants)&&void 0!==d?d:{};Object.keys(v).forEach((t=>{var d,v,s,u,c;let r;r=l?null===(s=null===(v=null===(d=null==l?void 0:l.products)||void 0===d?void 0:d[n])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[t]:null===(c=null===(u=null==o?void 0:o[n])||void 0===u?void 0:u.variants)||void 0===c?void 0:c[t],(null==r?void 0:r.fbStatus)||i.push(t)}))})),i},s=(o,l,i,n,t)=>{const d=Object.assign({},o);if(Object.keys(o).forEach((l=>{var i,n;Object.keys(null!==(n=null===(i=null==o?void 0:o[l])||void 0===i?void 0:i.variants)&&void 0!==n?n:{}).forEach((i=>{var n,t;const v=null===(n=null==o?void 0:o[l].variants)||void 0===n?void 0:n[i];v&&(v.fbStatus="APPROVED");const s=null===(t=null==d?void 0:d[l])||void 0===t?void 0:t.variants;s&&s[i]&&(s[i]=v)}))})),n&&t){const o=Object.assign({},n);o.products=d,t(o),l({type:"productsPaged",data:{collectionId:i,products:d}})}else l({type:"productsPaged",data:{collectionId:i,products:d}})},u=o=>{const l=Object.keys(o.variants||[]);let i=!1;return!(l.length<=1)||(l.forEach((l=>{var n,t;i=null!==(t=null===(n=o.variants)||void 0===n?void 0:n[l].name.includes(o.name))&&void 0!==t&&t})),!i)},c=(o,l,i,n,t)=>{var d,v,s,u,c,r,a,e,p,b,O,f,j,h,y,E,g,k,P;let D=0,S=0;if(null===(v=null===(d=null==i?void 0:i[o])||void 0===d?void 0:d.products)||void 0===v?void 0:v[l]){if(t)return!1;const d=(null===(c=null===(u=null===(s=null==i?void 0:i[o])||void 0===s?void 0:s.products)||void 0===u?void 0:u[l])||void 0===c?void 0:c.variants)||[];if(1===Object.keys(d).length)for(const n in d){const t=null===(a=null===(r=null==i?void 0:i[o])||void 0===r?void 0:r.products)||void 0===a?void 0:a[l],d=null===(O=null===(b=null===(p=null===(e=null==i?void 0:i[o])||void 0===e?void 0:e.products)||void 0===p?void 0:p[l])||void 0===b?void 0:b.variants)||void 0===O?void 0:O[n];if(null===(f=null==d?void 0:d.name)||void 0===f?void 0:f.includes(null!==(j=null==t?void 0:t.name)&&void 0!==j?j:""))return!1}if(null===(E=Object.keys((null===(y=null===(h=null==n?void 0:n.products)||void 0===h?void 0:h[l])||void 0===y?void 0:y.variants)||[]))||void 0===E||E.forEach((()=>S++)),Object.keys((null===(P=null===(k=null===(g=null==i?void 0:i[o])||void 0===g?void 0:g.products)||void 0===k?void 0:k[l])||void 0===P?void 0:P.variants)||[]).forEach((()=>D++)),D>0&&S!==D)return!0}return!1},r=function(o,l,i){var n,t,d,v;let s=0,u=0;if(arguments.length>3&&void 0!==arguments[3]&&arguments[3]){const v=null!==(n=null==l?void 0:l.products)&&void 0!==n?n:{};s=Object.keys(v).length;const c=null!==(d=null===(t=i[o])||void 0===t?void 0:t.products)&&void 0!==d?d:{};u=Object.keys(c).length}else if(i[o]){const n=null==l?void 0:l.products;n&&Object.keys(n).forEach((o=>{var l;const i=null===(l=n[o])||void 0===l?void 0:l.variants;i&&Object.keys(i).forEach((o=>s+=1))}));const t=null===(v=i[o])||void 0===v?void 0:v.products;if(t&&Object.keys(t).forEach((o=>{var l;const i=null===(l=t[o])||void 0===l?void 0:l.variants;i&&Object.keys(i).forEach((o=>u+=1))})),s<=0&&u>0)return!1}return u>0&&s!==u},a=(l,i)=>Object.keys(l).reduce(((n,t)=>{var d;return t in i?(n[t]=Object.assign(Object.assign({},l[t]),{products:Object.keys(null!==(d=l[t].products)&&void 0!==d?d:{}).reduce(((n,d)=>{var v,s,u,c,r,a;const e=null===(v=i[t].products)||void 0===v?void 0:v[d];return e?n[d]=Object.assign(Object.assign({},(null===(s=l[t].products)||void 0===s?void 0:s[d])||{}),{allVariants:o(e.variants)}):(null===(c=null===(u=l[t].products)||void 0===u?void 0:u[d])||void 0===c?void 0:c.allVariants)&&(n[d]=Object.assign(Object.assign({},(null===(r=l[t].products)||void 0===r?void 0:r[d])||{}),{allVariants:o(null===(a=l[t].products)||void 0===a?void 0:a[d].allVariants)})),n}),{})}),n):n}),{});export{d as fetchFbStatusCollection,v as getVariantIdsToFetchAtProductLevel,r as isCollectionPartiallyChecked,c as isProductPartiallyChecked,l as liftTheStateUp,s as markVariantsAsApprovedProductsLevel,i as paginateSelectedItems,u as shouldShowVariant,a as updateAllVariantsForSelectedProducts};
|
|
@@ -16,4 +16,4 @@ import{jsxs as e,jsx as t,Fragment as l}from"react/jsx-runtime";import i from"..
|
|
|
16
16
|
height: 100%;
|
|
17
17
|
width: 48%;
|
|
18
18
|
background: rgba(0, 0, 0, 0.1);
|
|
19
|
-
`,B={value:"custom_link",label:"Custom URL"},P={value:"custom_text",label:"Custom text"},D={value:"static_expiry",label:"Static Expiry"},w=d=>{var w,N,U,H,I,R,W,Y,$;const{onFocus:M,variable:z,index:Z,showVariableModal:q,setShowDiscountCheckBox:G,componentType:F,CTAoptions:K,buttonType:Q}=d,[J,X]=s(!1),[ee,te]=s(""),[le,ie]=s([]),[ae,ne]=s(),[oe,se]=s(!1),{variableList:ue,setVariableList:de,setVariableCallback:re,setShowVariablePicker:ce,device:pe,channel:me,isError:ve,originalVariableList:be,template:ge,templateSelectionTriggered:Oe,setTemplate:je,setDisplayContent:ye,setOriginalVariableList:xe,globalNormalizedPlaceholders:he,enabledCustomText:fe,pod:Te,selectedCarouselIndex:_e,isProductCarouselType:Ee,isWhatsappCarousel:Ce,disableEditVariable:Ve,disableEditExpiry:Se,templateErrorIndexes:ke,maxCharLimit:Ae,disableDatePicker:Le,showDiscountCodeExpiryInfo:Be,cardIndex:Pe=1}=E();function De(e,t){var l,i,a,n;const o=e;te(""),ne(o),me===O.WHATSAPP||me===O.RCS?"custom_text"!==o.value&&"custom_link"!==o.value&&"static_expiry"!==o.value?(Ne(null!==(l=o.value)&&void 0!==l?l:"","string"),null==Ue||Ue(null!==(i=z.index)&&void 0!==i?i:0,o.value,!0)):(null==Ue||Ue(null!==(a=z.index)&&void 0!==a?a:0,"",!0,o.value),Ne("","url"===o.bikPlaceholderType?"link":"string")):"custom_text"!==o.value&&"custom_link"!==o.value?(Ne(o.value,"url"===o.bikPlaceholderType?"link":"string"),me==O.WEBPUSH&&(null==Ie||Ie(null!==(n=z.index)&&void 0!==n?n:0,o.value))):(te(""),Ne("",o.value))}function we(e,t){var l,i;te(t);const a="custom_link"===(null==ae?void 0:ae.value)&&t?t.includes("https")?t:`https://${t}`:t;Ne(a,"static_expiry"===e?"string":e),me!==O.WHATSAPP&&me!==O.RCS||null==Ue||Ue(null!==(l=z.index)&&void 0!==l?l:0,a,"custom_link"===e,e),me===O.WEBPUSH&&(null==Ie||Ie(null!==(i=z.index)&&void 0!==i?i:0,a))}function Ne(e,t,l){var i,a,n,s,u;const d="custom_link"===t?"link":"custom_text"===t?"string":t;if(me!==O.WHATSAPP&&me!==O.WEBPUSH&&me!==O.RCS){const l=V(Z+1),a=null===document||void 0===document?void 0:document.getElementById("mobile"===pe?"template_html_mobile":"template_html_desktop"),n=me===O.EMAIL?null===(i=null==a?void 0:a.contentWindow)||void 0===i?void 0:i.document.getElementById(l):document.getElementById(l);n&&(n.textContent="custom_text"!==t&&"custom_link"!==t||e?e:z.variableName);const o=be.map(((t,l)=>l===Z?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t));null==xe||xe(o)}if(me===O.WEBPUSH){const t=be,l=t=>null==t?void 0:t.map(((t,l)=>l===Z?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t)),i={BODY:"BODY"===F?l(t.body):t.body,TITLE:F===j.TITLE.toUpperCase()?l(t.title):t.title};null==xe||xe((e=>Object.assign(Object.assign({},e),{title:i.TITLE,body:i.BODY,buttons:t.buttons})))}if(me===O.WHATSAPP||me===O.RCS){if(null!=_e&&_e>-1&&Ee){const l=Object.assign({},be).cards.map(((l,i)=>{var a,n,o;return"BODY"===F?Object.assign(Object.assign({},l),{body:null===(a=l.body)||void 0===a?void 0:a.map(((t,l)=>Z===l?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t))}):"TITLE"===F?Object.assign(Object.assign({},l),{title:null===(n=l.title)||void 0===n?void 0:n.map(((t,l)=>Z===l?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t))}):"BUTTONS"===F?Object.assign(Object.assign({},l),{buttons:null===(o=l.buttons)||void 0===o?void 0:o.map(((l,i)=>i===Z?Object.assign(Object.assign({},l),{buttonVariable:"custom_link"===t?"((customPlaceholderName))":e,example:"COPY_CODE"===l.type?e:[e]}):l))}):l}));return void(null==xe||xe((e=>Object.assign(Object.assign({},e),{cards:l}))))}const i=null!=_e&&_e>-1?be.cards[_e]:be;let r=i.body,c=i.title,p=i.header,m=i.buttons;if("BODY"===F?r=null===(a=i.body)||void 0===a?void 0:a.map(((t,l)=>l===Z?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t)):"TITLE"===F?c=null===(n=null==i?void 0:i.title)||void 0===n?void 0:n.map(((t,l)=>l===Z?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t)):"HEADER"===F?p=null===(s=i.header)||void 0===s?void 0:s.map(((t,l)=>l===Z?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t)):"BUTTONS"===F&&(m=null===(u=i.buttons)||void 0===u?void 0:u.map(((i,a)=>a===Z?Object.assign(Object.assign({},i),{buttonVariable:"custom_link"===t?"((customPlaceholderName))":e,example:"COPY_CODE"===i.type?e:[e],queryParams:null!=l?l:[]}):i))),null!=_e&&_e>-1){const e=o(be.cards);e[_e]={header:p,body:r,buttons:m,title:c},null==xe||xe((t=>Object.assign(Object.assign({},t),{cards:e})))}else null==xe||xe((e=>Object.assign(Object.assign({},e),{header:p,body:r,buttons:m,title:c})))}}function Ue(e,t,l,i){var a,n,s,u,d,r,c,p,m,v,b,g;if(null!=_e&&_e>-1&&Ee){const n=Object.assign({},ge).components.map((l=>{var i;return isCarouselComponent(l.type)?Object.assign(Object.assign({},l),{cards:null===(i=l.cards)||void 0===i?void 0:i.map((l=>Object.assign(Object.assign({},l),{components:l.components.map((l=>{var i,a,n,o,s,u,d,r,c,p,m;if("BODY"===l.type&&"BODY"===F){if(null===(a=null===(i=l.example)||void 0===i?void 0:i.body_text)||void 0===a?void 0:a[0]){const i=[...null!==(s=null===(o=null===(n=l.example)||void 0===n?void 0:n.body_text)||void 0===o?void 0:o[0])&&void 0!==s?s:[]];i[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const a=Object.assign(Object.assign({},l.example),{body_text:[i]});return Object.assign(Object.assign({},l),{example:a})}return l}if("TITLE"===l.type&&"TITLE"===F){if(null===(d=null===(u=l.example)||void 0===u?void 0:u.title_text)||void 0===d?void 0:d[0]){const i=[...null!==(p=null===(c=null===(r=l.example)||void 0===r?void 0:r.title_text)||void 0===c?void 0:c[0])&&void 0!==p?p:[]];i[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const a=Object.assign(Object.assign({},l.example),{title_text:[i]});return Object.assign(Object.assign({},l),{example:a})}return l}if("BUTTONS"===l.type&&"BUTTONS"===F){const i=null===(m=l.buttons)||void 0===m?void 0:m.map(((l,i)=>i===e?Object.assign(Object.assign({},l),{example:[t]}):l));return i?Object.assign(Object.assign({},l),{buttons:i}):l}return l}))})))}):l})),s=o(ge);if(l){const l=null===(a=Object.assign({},ge).mapping.cards)||void 0===a?void 0:a.map(((l,a)=>{var n,o,s,u;if("BODY"===F)return Object.assign(Object.assign({},l),{body:null===(n=l.body)||void 0===n?void 0:n.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+10}))`:t:l))});if("TITLE"===F)return Object.assign(Object.assign({},l),{title:null===(o=null==l?void 0:l.title)||void 0===o?void 0:o.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+10}))`:t:l))});if("BUTTONS"===F&&(null==l?void 0:l.buttons)){let n=-1,o=-1;return null===(s=ge.components[Pe].cards)||void 0===s||s[a].components.forEach((t=>{var l;"BUTTONS"===t.type&&(null===(l=t.buttons)||void 0===l||l.forEach(((t,l)=>{"URL"===t.type&&(n++,l===e&&"URL"==t.type&&(o=n))})))})),Object.assign(Object.assign({},l),{buttons:null===(u=l.buttons)||void 0===u?void 0:u.map(((e,l)=>l===o?"custom_link"===i?"((customPlaceholderName))":t:e))})}return l}));s.mapping.cards=l}return s.components=n,void(null==je||je(s))}const O=null!=_e&&_e>-1?{components:null===(n=Object.assign({},ge).components[Pe].cards)||void 0===n?void 0:n[_e].components,mapping:null===(s=Object.assign({},ge).mapping.cards)||void 0===s?void 0:s[_e]}:Object.assign({},ge),j=null===(u=null==O?void 0:O.components)||void 0===u?void 0:u.map((l=>{var i,a,n,o,s,u,d,r,c,p,m,v,b,g,O,j;const y=Object.assign({},l);if("BODY"===l.type&&"BODY"===F&&(Array.isArray(null===(i=l.example)||void 0===i?void 0:i.body_text)||(null===(n=null===(a=l.example)||void 0===a?void 0:a.body_text)||void 0===n?void 0:n[0]))){const l=[...null!==(u=null===(s=null===(o=y.example)||void 0===o?void 0:o.body_text)||void 0===s?void 0:s[0])&&void 0!==u?u:[]];l[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const i=Object.assign(Object.assign({},y.example),{body_text:[l]});return Object.assign(Object.assign({},y),{example:i})}if("TITLE"===l.type&&"TITLE"===F){if(Array.isArray(null===(d=l.example)||void 0===d?void 0:d.title_text)||(null===(c=null===(r=l.example)||void 0===r?void 0:r.title_text)||void 0===c?void 0:c[0])){const l=[...null!==(v=null===(m=null===(p=y.example)||void 0===p?void 0:p.title_text)||void 0===m?void 0:m[0])&&void 0!==v?v:[]];l[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const i=Object.assign(Object.assign({},y.example),{title_text:[l]});return Object.assign(Object.assign({},y),{example:i})}}else if("HEADER"===l.type&&"HEADER"===F){if(null===(b=l.example)||void 0===b?void 0:b.header_text){const l=[...null!==(O=null===(g=y.example)||void 0===g?void 0:g.header_text)&&void 0!==O?O:[]];l[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const i=Object.assign(Object.assign({},y.example),{header_text:l});return Object.assign(Object.assign({},y),{example:i})}}else{if("BUTTONS"===l.type&&"BUTTONS"===F){const i=null===(j=l.buttons)||void 0===j?void 0:j.map(((l,i)=>i===e?Object.assign(Object.assign({},l),{example:"COPY_CODE"===l.type?t:[t]}):l));return i?Object.assign(Object.assign({},y),{buttons:i}):y}if("limited_time_offer"===l.type&&"limited_time_offer"===F)return Object.assign(Object.assign({},y),{example:Object.assign(Object.assign({},y.example),{limited_time_offer:t})})}return l}));if(O.components=j,l)if("BODY"===F&&(null===(d=null==O?void 0:O.mapping)||void 0===d?void 0:d.body))O.mapping=Object.assign(Object.assign({},O.mapping),{body:null===(c=null===(r=O.mapping)||void 0===r?void 0:r.body)||void 0===c?void 0:c.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+10}))`:t:l))});else if("TITLE"===F&&(null===(p=null==O?void 0:O.mapping)||void 0===p?void 0:p.title))O.mapping=Object.assign(Object.assign({},O.mapping),{title:null===(v=null===(m=O.mapping)||void 0===m?void 0:m.title)||void 0===v?void 0:v.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+10}))`:t:l))});else if("HEADER"===F&&(null===(b=null==O?void 0:O.mapping)||void 0===b?void 0:b.header))O.mapping=Object.assign(Object.assign({},O.mapping),{header:O.mapping.header.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+20}))`:t:l))});else if("BUTTONS"===F&&(null===(g=null==O?void 0:O.mapping)||void 0===g?void 0:g.buttons)){let l=-1,a=-1;j.forEach((t=>{var i;"BUTTONS"===t.type&&(null===(i=t.buttons)||void 0===i||i.forEach(((t,i)=>{"URL"===t.type&&(l++,i===e&&"URL"==t.type&&(a=l))})))})),O.mapping=Object.assign(Object.assign({},O.mapping),{buttons:O.mapping.buttons.map(((e,l)=>l===a?"custom_link"===i?"((customPlaceholderName))":t:e))})}if(null!=_e&&_e>-1&&ge){const e=o(ge);e.components[Pe].cards[_e].components=O.components,e.mapping.cards[_e]=O.mapping,null==je||je(e)}else null==je||je(Object.assign({},O))}u((()=>{J&&(null==M||M())}),[J]),u((()=>{!function(){var e,t,l,i,a;const n="mobile"===pe?"template_html_mobile":"template_html_desktop",o=document.getElementById(n),s=(null!==(i=null===(l=null===(t=null===(e=null==o?void 0:o.contentWindow)||void 0===e?void 0:e.document)||void 0===t?void 0:t.body)||void 0===l?void 0:l.innerHTML)&&void 0!==i?i:"")+(null===(a=null==o?void 0:o.contentWindow)||void 0===a?void 0:a.document.head.innerHTML);me===O.EMAIL&&(null==ye||ye(s))}()}),[Oe]),u((()=>{!function(){var e,t;const l=[];let i=[];if(me!==O.MESSAGE||fe){"link"===(null==z?void 0:z.type)?(l.push({label:"",options:[B,P]}),ne(B)):"date_time"===(null==z?void 0:z.type)?(l.push({label:"",options:[B,P]}),ne(D)):(l.push({label:"",options:[B,P,D]}),ne(P));const e=null!=he?he:[];ie([...l,...e.map((e=>{var t,l;return Object.assign(Object.assign({},e),{label:T.toCapitilize(null===(l=null===(t=e.label)||void 0===t?void 0:t.replace(/([A-Z])/g," $1"))||void 0===l?void 0:l.toLowerCase())})}))]),i=[...l,...e]}else{const e=null!=he?he:[];ie([{label:"",options:[P,B]},...e]),i=[{label:"",options:[P,B]},...e]}if((me===O.WHATSAPP||me===O.EMAIL||me===O.MESSAGE||me===O.WEBPUSH||me===O.RCS)&&z.updatedValue)if(g.test(z.updatedValue)&&(me===O.WHATSAPP||me===O.RCS)||z.updatedValue.startsWith("{{")&&me!==O.WHATSAPP&&me!==O.RCS){const e=function(e,t,l){var i;let a={label:"",value:""};const n=l===(O.WHATSAPP||O.RCS)?e.updatedValue.replace("[[","").replace("]]",""):e.updatedValue.replace("{{","").replace("}}","");if(q){let t=e.updatedValue;if(Te===y.CHATBOT&&"BUTTONS"===F){const l=null==K?void 0:K.filter((t=>t.placeHolder===e.updatedValue));l&&l.length>0&&(t=l[0].label)}a={label:t?t.replace("{{","").replace("}}","").trim().replace("."," "):"",value:null!==(i=e.updatedValue)&&void 0!==i?i:""}}else t.map((e=>{e.options.map((e=>{var t;(null===(t=e.value)||void 0===t?void 0:t.replace("{{","").replace("}}","").trim())===n.trim()&&(a=e)}))}));return a}(z,i,me);e.value&&ne(e)}else"date_time"===z.type?(ne(D),te(z.updatedValue),Ue(null!==(e=z.index)&&void 0!==e?e:0,z.updatedValue)):(null===(t=z.updatedValue)||void 0===t?void 0:t.startsWith("https"))?(ne(B),te(z.updatedValue.split("https://")[1])):(ne(P),te(z.updatedValue))}()}),[_e]),u((()=>{pe&&ae&&ee&&setTimeout((()=>{Ne("custom_link"===(null==ae?void 0:ae.value)&&ee?ee.includes("https")?ee:`https://${ee}`:ee,ae.value)}),100)}),[pe]),u((()=>{!oe&&ae&&z.updatedValue&&setTimeout((()=>{Ne("custom_link"===(null==ae?void 0:ae.value)&&z.updatedValue?z.updatedValue.includes("https")?z.updatedValue:`https://${z.updatedValue}`:z.updatedValue,ae.value),se(!0)}),100)}),[ae]);const He=e=>{null==G||G(!1),"{{custom.url}}"===e.actualValue?De({label:e.displayName,selected:!0,value:"custom_link"}):"{{custom.text}}"==e.actualValue?De({label:e.displayName,selected:!0,value:"custom_text"}):"{{static.expiry}}"==e.actualValue?De({label:e.displayName,selected:!0,value:"static_expiry"}):De({label:e.displayName.replace("{{","").replace("}}","").trim().replace("."," "),selected:!0,value:e.actualValue,bikPlaceholderType:"string"})};function Ie(e,t){var l;const i=o(ge),a=F.toLocaleLowerCase();(null===(l=i.webpushBroadcastConfig)||void 0===l?void 0:l[a])&&(i.webpushBroadcastConfig[a][e]=t),null==je||je(Object.assign({},i))}return e(k,Object.assign({channel:me,focused:J,onMouseEnter:()=>X(!0),onMouseLeave:()=>X(!1)},{children:[t("div",Object.assign({style:{marginBottom:8}},{children:e(h,Object.assign({style:{color:ve&&!ae?_.content.negative:_.content.primary}},{children:[null===(w=z.variableName)||void 0===w?void 0:w.replace("{{","").replace("}}","")," ","link"===(null==z?void 0:z.type)?"link":"variable"]}))})),t("div",Object.assign({style:{marginBottom:12}},{children:q?e("div",Object.assign({style:{display:"flex",border:"#E0E0E0 1px solid",borderRadius:4,padding:10,justifyContent:(null==ae?void 0:ae.label)?"space-between":"flex-end",backgroundColor:"date_time"===(null==z?void 0:z.type)&&Se?_.background.base:void 0}},{children:[t(f,Object.assign({numberOfLines:1},{children:Te===y.CHATBOT?["static_expiry","custom_text","custom_link"].includes(null!==(N=null==ae?void 0:ae.value)&&void 0!==N?N:"")?null==ae?void 0:ae.label:null==ae?void 0:ae.value:b(null!==(U=null==ae?void 0:ae.label)&&void 0!==U?U:"",20,!0)})),Ve||"date_time"===(null==z?void 0:z.type)&&Se?t(l,{}):t(i,{onClick:()=>{(()=>{if(Q===x.URL&&Te===y.CHATBOT){const e=C({variableList:ue,categoryDisplayName:"Custom Variables",variableDisplayName:"Custom URL",variableValue:"{{custom.url}}"});de(e)}else if("limited_time_offer"===F){const e=C({variableList:ue,categoryDisplayName:"Static Variables",variableDisplayName:"Static Expiry",variableValue:"{{static.expiry}}"});de(e)}else if(Q===x.COPY_CODE){const e=C({variableList:ue,categoryDisplayName:"Custom Variables",variableDisplayName:"Custom Text",variableValue:"{{custom.text}}"});de(e)}})(),re((()=>He)),ce(!0)},width:24,height:24,color:_.content.primary})]})):t(m,{disabled:Ve,options:le,isSearchable:!1,onSelect:De,defaultOptions:ae?[Object.assign(Object.assign({},ae),{selected:!0})]:[]})})),("custom_text"===(null==ae?void 0:ae.value)||"custom_link"===(null==ae?void 0:ae.value))&&t(v,{state:Ve?"disabled":"none",labelText:"custom_text"===(null==ae?void 0:ae.value)?"Custom text value":"custom_link"===(null==ae?void 0:ae.value)?"Custom URL value":"",id:`variable-value-${null==ae?void 0:ae.value}-${Z}`,value:ee,errorMessage:ve&&(null===(H=null==ke?void 0:ke.buttons)||void 0===H?void 0:H.includes(null!==(I=null==z?void 0:z.index)&&void 0!==I?I:-1))?ee&&0!==ee.trim().length?"custom_link"!==ae.value||/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$/.test(`https://${ee.trim()}`)&&0!==ee.trim().length?"custom_link"!==ae.value&&ee.length>30?"Length cannot be more than 30":"BUTTONS"===F&&"custom_link"!==ae.value?"Enter valid alpha numeric code":"":"Enter valid URL":"Required field":"",maxCharLimit:Ae||("custom_link"===(null==ae?void 0:ae.value)?2e3:"BUTTONS"===F?15:30),noKeyDownChange:!0,prefixText:"custom_link"===(null==ae?void 0:ae.value)?"https://":"",placeholder:"link"===z.type||"custom_link"===ae.value?"Enter custom URL here":"Enter custom text here",onChangeText:e=>{we(ae.value,e)}}),"static_expiry"===(null==ae?void 0:ae.value)&&e("div",Object.assign({style:{position:"relative"}},{children:[(Ve||Le)&&e(A,Object.assign({onClick:e=>e.preventDefault(),style:{display:"flex",justifyContent:"space-between"}},{children:[t(L,{}),t(L,{})]})),t(p,{placement:"auto",time:n(ee?new Date(ee):new Date,"hh:mm a"),date:ee?new Date(ee):new Date,minDate:new Date,error:"",setError:()=>{},onChange:e=>{we("static_expiry",e.toISOString())}})]})),"static_expiry"===(null==ae?void 0:ae.value)&&Be&&t("div",Object.assign({style:{marginTop:8}},{children:t(r,{containerStyle:{padding:"4px 8px"},icon:()=>t(a,{width:16,height:16,color:_.content.secondary}),type:c.NEUTRAL,text:"Please use the same expiration code that you applied when creating\nthe code on Shopify"})})),"link"===z.type&&"custom_link"!==(null==ae?void 0:ae.value)&&!Ee&&!Ce&&Te===y.CHATBOT&&t(S,{isError:null!==(Y=null===(R=null==ke?void 0:ke.buttons)||void 0===R?void 0:R.includes(null!==(W=null==z?void 0:z.index)&&void 0!==W?W:-1))&&void 0!==Y&&Y,params:null!==($=z.queryParams)&&void 0!==$?$:[],onChange:e=>{Ne(z.updatedValue,"link",e)},variableValue:z.updatedValue})]}))};export{k as Container,w as default};
|
|
19
|
+
`,B={value:"custom_link",label:"Custom URL"},P={value:"custom_text",label:"Custom text"},D={value:"static_expiry",label:"Static Expiry"},w=d=>{var w,N,U,H,I,R,W,Y,$;const{onFocus:M,variable:z,index:Z,showVariableModal:q,setShowDiscountCheckBox:G,componentType:F,CTAoptions:K,buttonType:Q}=d,[J,X]=s(!1),[ee,te]=s(""),[le,ie]=s([]),[ae,ne]=s(),[oe,se]=s(!1),{variableList:ue,setVariableList:de,setVariableCallback:re,setShowVariablePicker:ce,device:pe,channel:me,isError:ve,originalVariableList:be,template:ge,templateSelectionTriggered:Oe,setTemplate:je,setDisplayContent:ye,setOriginalVariableList:xe,globalNormalizedPlaceholders:he,enabledCustomText:fe,pod:Te,selectedCarouselIndex:_e,isProductCarouselType:Ee,isWhatsappCarousel:Ce,disableEditVariable:Ve,disableEditExpiry:Se,templateErrorIndexes:ke,maxCharLimit:Ae,disableDatePicker:Le,showDiscountCodeExpiryInfo:Be,cardIndex:Pe=1}=E();function De(e,t){var l,i,a,n;const o=e;te(""),ne(o),me===O.WHATSAPP||me===O.RCS?"custom_text"!==o.value&&"custom_link"!==o.value&&"static_expiry"!==o.value?(Ne(null!==(l=o.value)&&void 0!==l?l:"","string"),null==Ue||Ue(null!==(i=z.index)&&void 0!==i?i:0,o.value,!0)):(null==Ue||Ue(null!==(a=z.index)&&void 0!==a?a:0,"",!0,o.value),Ne("","url"===o.bikPlaceholderType?"link":"string")):"custom_text"!==o.value&&"custom_link"!==o.value?(Ne(o.value,"url"===o.bikPlaceholderType?"link":"string"),me==O.WEBPUSH&&(null==Ie||Ie(null!==(n=z.index)&&void 0!==n?n:0,o.value))):(te(""),Ne("",o.value))}function we(e,t){var l,i;te(t);const a="custom_link"===(null==ae?void 0:ae.value)&&t?t.includes("https")?t:`https://${t}`:t;Ne(a,"static_expiry"===e?"string":e),me!==O.WHATSAPP&&me!==O.RCS||null==Ue||Ue(null!==(l=z.index)&&void 0!==l?l:0,a,"custom_link"===e,e),me===O.WEBPUSH&&(null==Ie||Ie(null!==(i=z.index)&&void 0!==i?i:0,a))}function Ne(e,t,l){var i,a,n,s,u;const d="custom_link"===t?"link":"custom_text"===t?"string":t;if(me!==O.WHATSAPP&&me!==O.WEBPUSH&&me!==O.RCS){const l=V(Z+1),a=null===document||void 0===document?void 0:document.getElementById("mobile"===pe?"template_html_mobile":"template_html_desktop"),n=me===O.EMAIL?null===(i=null==a?void 0:a.contentWindow)||void 0===i?void 0:i.document.getElementById(l):document.getElementById(l);n&&(n.textContent="custom_text"!==t&&"custom_link"!==t||e?e:z.variableName);const o=be.map(((t,l)=>l===Z?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t));null==xe||xe(o)}if(me===O.WEBPUSH){const t=be,l=t=>null==t?void 0:t.map(((t,l)=>l===Z?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t)),i={BODY:"BODY"===F?l(t.body):t.body,TITLE:F===j.TITLE.toUpperCase()?l(t.title):t.title};null==xe||xe((e=>Object.assign(Object.assign({},e),{title:i.TITLE,body:i.BODY,buttons:t.buttons})))}if(me===O.WHATSAPP||me===O.RCS){if(null!=_e&&_e>-1&&Ee){const l=Object.assign({},be).cards.map(((l,i)=>{var a,n,o;return"BODY"===F?Object.assign(Object.assign({},l),{body:null===(a=l.body)||void 0===a?void 0:a.map(((t,l)=>Z===l?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t))}):"TITLE"===F?Object.assign(Object.assign({},l),{title:null===(n=l.title)||void 0===n?void 0:n.map(((t,l)=>Z===l?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t))}):"BUTTONS"===F?Object.assign(Object.assign({},l),{buttons:null===(o=l.buttons)||void 0===o?void 0:o.map(((l,i)=>i===Z?Object.assign(Object.assign({},l),{buttonVariable:"custom_link"===t?"((customPlaceholderName))":e,example:"COPY_CODE"===l.type?e:[e]}):l))}):l}));return void(null==xe||xe((e=>Object.assign(Object.assign({},e),{cards:l}))))}const i=null!=_e&&_e>-1?be.cards[_e]:be;let r=i.body,c=i.title,p=i.header,m=i.buttons;if("BODY"===F?r=null===(a=i.body)||void 0===a?void 0:a.map(((t,l)=>l===Z?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t)):"TITLE"===F?c=null===(n=null==i?void 0:i.title)||void 0===n?void 0:n.map(((t,l)=>l===Z?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t)):"HEADER"===F?p=null===(s=i.header)||void 0===s?void 0:s.map(((t,l)=>l===Z?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t)):"BUTTONS"===F&&(m=null===(u=i.buttons)||void 0===u?void 0:u.map(((i,a)=>a===Z?Object.assign(Object.assign({},i),{buttonVariable:"custom_link"===t?"((customPlaceholderName))":e,example:"COPY_CODE"===i.type?e:[e],queryParams:null!=l?l:[]}):i))),null!=_e&&_e>-1){const e=o(be.cards);e[_e]={header:p,body:r,buttons:m,title:c},null==xe||xe((t=>Object.assign(Object.assign({},t),{cards:e})))}else null==xe||xe((e=>Object.assign(Object.assign({},e),{header:p,body:r,buttons:m,title:c})))}}function Ue(e,t,l,i){var a,n,s,u,d,r,c,p,m,v,b,g;if(null!=_e&&_e>-1&&Ee){const n=Object.assign({},ge).components.map((l=>{var i;return isCarouselComponent(l.type)?Object.assign(Object.assign({},l),{cards:null===(i=l.cards)||void 0===i?void 0:i.map((l=>Object.assign(Object.assign({},l),{components:l.components.map((l=>{var i,a,n,o,s,u,d,r,c,p,m;if("BODY"===l.type&&"BODY"===F){if(null===(a=null===(i=l.example)||void 0===i?void 0:i.body_text)||void 0===a?void 0:a[0]){const i=[...null!==(s=null===(o=null===(n=l.example)||void 0===n?void 0:n.body_text)||void 0===o?void 0:o[0])&&void 0!==s?s:[]];i[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const a=Object.assign(Object.assign({},l.example),{body_text:[i]});return Object.assign(Object.assign({},l),{example:a})}return l}if("TITLE"===l.type&&"TITLE"===F){if(null===(d=null===(u=l.example)||void 0===u?void 0:u.title_text)||void 0===d?void 0:d[0]){const i=[...null!==(p=null===(c=null===(r=l.example)||void 0===r?void 0:r.title_text)||void 0===c?void 0:c[0])&&void 0!==p?p:[]];i[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const a=Object.assign(Object.assign({},l.example),{title_text:[i]});return Object.assign(Object.assign({},l),{example:a})}return l}if("BUTTONS"===l.type&&"BUTTONS"===F){const i=null===(m=l.buttons)||void 0===m?void 0:m.map(((l,i)=>i===e?Object.assign(Object.assign({},l),{example:[t]}):l));return i?Object.assign(Object.assign({},l),{buttons:i}):l}return l}))})))}):l})),s=o(ge);if(l){const l=null===(a=Object.assign({},ge).mapping.cards)||void 0===a?void 0:a.map(((l,a)=>{var n,o,s,u;if("BODY"===F)return Object.assign(Object.assign({},l),{body:null===(n=l.body)||void 0===n?void 0:n.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+10}))`:t:l))});if("TITLE"===F)return Object.assign(Object.assign({},l),{title:null===(o=null==l?void 0:l.title)||void 0===o?void 0:o.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+10}))`:t:l))});if("BUTTONS"===F&&(null==l?void 0:l.buttons)){let n=-1,o=-1;return null===(s=ge.components[Pe].cards)||void 0===s||s[a].components.forEach((t=>{var l;"BUTTONS"===t.type&&(null===(l=t.buttons)||void 0===l||l.forEach(((t,l)=>{"URL"===t.type&&(n++,l===e&&"URL"==t.type&&(o=n))})))})),Object.assign(Object.assign({},l),{buttons:null===(u=l.buttons)||void 0===u?void 0:u.map(((e,l)=>l===o?"custom_link"===i?"((customPlaceholderName))":t:e))})}return l}));s.mapping.cards=l}return s.components=n,void(null==je||je(s))}const O=null!=_e&&_e>-1?{components:null===(n=Object.assign({},ge).components[Pe].cards)||void 0===n?void 0:n[_e].components,mapping:null===(s=Object.assign({},ge).mapping.cards)||void 0===s?void 0:s[_e]}:Object.assign({},ge),j=null===(u=null==O?void 0:O.components)||void 0===u?void 0:u.map((l=>{var i,a,n,o,s,u,d,r,c,p,m,v,b,g,O,j;const y=Object.assign({},l);if("BODY"===l.type&&"BODY"===F&&(Array.isArray(null===(i=l.example)||void 0===i?void 0:i.body_text)||(null===(n=null===(a=l.example)||void 0===a?void 0:a.body_text)||void 0===n?void 0:n[0]))){const l=[...null!==(u=null===(s=null===(o=y.example)||void 0===o?void 0:o.body_text)||void 0===s?void 0:s[0])&&void 0!==u?u:[]];l[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const i=Object.assign(Object.assign({},y.example),{body_text:[l]});return Object.assign(Object.assign({},y),{example:i})}if("TITLE"===l.type&&"TITLE"===F){if(Array.isArray(null===(d=l.example)||void 0===d?void 0:d.title_text)||(null===(c=null===(r=l.example)||void 0===r?void 0:r.title_text)||void 0===c?void 0:c[0])){const l=[...null!==(v=null===(m=null===(p=y.example)||void 0===p?void 0:p.title_text)||void 0===m?void 0:m[0])&&void 0!==v?v:[]];l[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const i=Object.assign(Object.assign({},y.example),{title_text:[l]});return Object.assign(Object.assign({},y),{example:i})}}else if("HEADER"===l.type&&"HEADER"===F){if(null===(b=l.example)||void 0===b?void 0:b.header_text){const l=[...null!==(O=null===(g=y.example)||void 0===g?void 0:g.header_text)&&void 0!==O?O:[]];l[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const i=Object.assign(Object.assign({},y.example),{header_text:l});return Object.assign(Object.assign({},y),{example:i})}}else{if("BUTTONS"===l.type&&"BUTTONS"===F){const i=null===(j=l.buttons)||void 0===j?void 0:j.map(((l,i)=>i===e?Object.assign(Object.assign({},l),{example:"COPY_CODE"===l.type?t:[t]}):l));return i?Object.assign(Object.assign({},y),{buttons:i}):y}if("limited_time_offer"===l.type&&"limited_time_offer"===F)return Object.assign(Object.assign({},y),{example:Object.assign(Object.assign({},y.example),{limited_time_offer:t})})}return l}));if(O.components=j,l)if("BODY"===F&&(null===(d=null==O?void 0:O.mapping)||void 0===d?void 0:d.body))O.mapping=Object.assign(Object.assign({},O.mapping),{body:null===(c=null===(r=O.mapping)||void 0===r?void 0:r.body)||void 0===c?void 0:c.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+10}))`:t:l))});else if("TITLE"===F&&(null===(p=null==O?void 0:O.mapping)||void 0===p?void 0:p.title))O.mapping=Object.assign(Object.assign({},O.mapping),{title:null===(v=null===(m=O.mapping)||void 0===m?void 0:m.title)||void 0===v?void 0:v.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+10}))`:t:l))});else if("HEADER"===F&&(null===(b=null==O?void 0:O.mapping)||void 0===b?void 0:b.header))O.mapping=Object.assign(Object.assign({},O.mapping),{header:O.mapping.header.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+20}))`:t:l))});else if("BUTTONS"===F&&(null===(g=null==O?void 0:O.mapping)||void 0===g?void 0:g.buttons)){let l=-1,a=-1;j.forEach((t=>{var i;"BUTTONS"===t.type&&(null===(i=t.buttons)||void 0===i||i.forEach(((t,i)=>{"URL"===t.type&&(l++,i===e&&"URL"==t.type&&(a=l))})))})),O.mapping=Object.assign(Object.assign({},O.mapping),{buttons:O.mapping.buttons.map(((e,l)=>l===a?"custom_link"===i?"((customPlaceholderName))":t:e))})}if(null!=_e&&_e>-1&&ge){const e=o(ge);e.components[Pe].cards[_e].components=O.components,e.mapping.cards[_e]=O.mapping,null==je||je(e)}else null==je||je(Object.assign({},O))}u((()=>{J&&(null==M||M())}),[J]),u((()=>{!function(){var e,t,l,i,a;const n="mobile"===pe?"template_html_mobile":"template_html_desktop",o=document.getElementById(n),s=(null!==(i=null===(l=null===(t=null===(e=null==o?void 0:o.contentWindow)||void 0===e?void 0:e.document)||void 0===t?void 0:t.body)||void 0===l?void 0:l.innerHTML)&&void 0!==i?i:"")+(null===(a=null==o?void 0:o.contentWindow)||void 0===a?void 0:a.document.head.innerHTML);me===O.EMAIL&&(null==ye||ye(s))}()}),[Oe]),u((()=>{!function(){var e,t;const l=[];let i=[];if(me!==O.MESSAGE||fe){"link"===(null==z?void 0:z.type)?(l.push({label:"",options:[B,P]}),ne(B)):"date_time"===(null==z?void 0:z.type)?(l.push({label:"",options:[B,P]}),ne(D)):(l.push({label:"",options:[B,P,D]}),ne(P));const e=null!=he?he:[];ie([...l,...e.map((e=>{var t,l;return Object.assign(Object.assign({},e),{label:T.toCapitilize(null===(l=null===(t=e.label)||void 0===t?void 0:t.replace(/([A-Z])/g," $1"))||void 0===l?void 0:l.toLowerCase())})}))]),i=[...l,...e]}else{const e=null!=he?he:[];ie([{label:"",options:[P,B]},...e]),i=[{label:"",options:[P,B]},...e]}if((me===O.WHATSAPP||me===O.EMAIL||me===O.MESSAGE||me===O.WEBPUSH||me===O.RCS)&&z.updatedValue)if(g.test(z.updatedValue)&&(me===O.WHATSAPP||me===O.RCS)||z.updatedValue.startsWith("{{")&&me!==O.WHATSAPP&&me!==O.RCS){const e=function(e,t,l){var i;let a={label:"",value:""};const n=l===(O.WHATSAPP||O.RCS)?e.updatedValue.replace("[[","").replace("]]",""):e.updatedValue.replace("{{","").replace("}}","");if(q){let t=e.updatedValue;if(Te===y.CHATBOT&&"BUTTONS"===F){const l=null==K?void 0:K.filter((t=>t.placeHolder===e.updatedValue));l&&l.length>0&&(t=l[0].label)}a={label:t?t.replace("{{","").replace("}}","").trim().replace("."," "):"",value:null!==(i=e.updatedValue)&&void 0!==i?i:""}}else t.map((e=>{e.options.map((e=>{var t;(null===(t=e.value)||void 0===t?void 0:t.replace("{{","").replace("}}","").trim())===n.trim()&&(a=e)}))}));return a}(z,i,me);e.value&&ne(e)}else"date_time"===z.type?(ne(D),te(z.updatedValue),Ue(null!==(e=z.index)&&void 0!==e?e:0,z.updatedValue)):(null===(t=z.updatedValue)||void 0===t?void 0:t.startsWith("https"))?(ne(B),te(z.updatedValue.split("https://")[1])):(ne(P),te(z.updatedValue))}()}),[_e]),u((()=>{pe&&ae&&ee&&setTimeout((()=>{Ne("custom_link"===(null==ae?void 0:ae.value)&&ee?ee.includes("https")?ee:`https://${ee}`:ee,ae.value)}),100)}),[pe]),u((()=>{!oe&&ae&&z.updatedValue&&setTimeout((()=>{Ne("custom_link"===(null==ae?void 0:ae.value)&&z.updatedValue?z.updatedValue.includes("https")?z.updatedValue:`https://${z.updatedValue}`:z.updatedValue,ae.value),se(!0)}),100)}),[ae]);const He=e=>{null==G||G(!1),"{{custom.url}}"===e.actualValue?De({label:e.displayName,selected:!0,value:"custom_link"}):"{{custom.text}}"==e.actualValue?De({label:e.displayName,selected:!0,value:"custom_text"}):"{{static.expiry}}"==e.actualValue?De({label:e.displayName,selected:!0,value:"static_expiry"}):De({label:e.displayName.replace("{{","").replace("}}","").trim().replace("."," "),selected:!0,value:e.actualValue,bikPlaceholderType:"string"})};function Ie(e,t){var l;const i=o(ge),a=F.toLocaleLowerCase();(null===(l=i.webpushBroadcastConfig)||void 0===l?void 0:l[a])&&(i.webpushBroadcastConfig[a][e]=t),null==je||je(Object.assign({},i))}return e(k,Object.assign({channel:me,focused:J,onMouseEnter:()=>X(!0),onMouseLeave:()=>X(!1)},{children:[t("div",Object.assign({style:{marginBottom:8}},{children:e(h,Object.assign({style:{color:ve&&!ae?_.content.negative:_.content.primary}},{children:[null===(w=z.variableName)||void 0===w?void 0:w.replace("{{","").replace("}}","")," ","link"===(null==z?void 0:z.type)?"link":"variable"]}))})),t("div",Object.assign({style:{marginBottom:12}},{children:q?e("div",Object.assign({style:{display:"flex",border:"#E0E0E0 1px solid",borderRadius:4,padding:10,justifyContent:(null==ae?void 0:ae.label)?"space-between":"flex-end"}},{children:[t(f,Object.assign({numberOfLines:1},{children:Te===y.CHATBOT?["static_expiry","custom_text","custom_link"].includes(null!==(N=null==ae?void 0:ae.value)&&void 0!==N?N:"")?null==ae?void 0:ae.label:null==ae?void 0:ae.value:b(null!==(U=null==ae?void 0:ae.label)&&void 0!==U?U:"",20,!0)})),Ve||"date_time"===(null==z?void 0:z.type)&&Se?t(l,{}):t(i,{onClick:()=>{(()=>{if(Q===x.URL&&Te===y.CHATBOT){const e=C({variableList:ue,categoryDisplayName:"Custom Variables",variableDisplayName:"Custom URL",variableValue:"{{custom.url}}"});de(e)}else if("limited_time_offer"===F){const e=C({variableList:ue,categoryDisplayName:"Static Variables",variableDisplayName:"Static Expiry",variableValue:"{{static.expiry}}"});de(e)}else if(Q===x.COPY_CODE){const e=C({variableList:ue,categoryDisplayName:"Custom Variables",variableDisplayName:"Custom Text",variableValue:"{{custom.text}}"});de(e)}})(),re((()=>He)),ce(!0)},width:24,height:24,color:_.content.primary})]})):t(m,{disabled:Ve,options:le,isSearchable:!1,onSelect:De,defaultOptions:ae?[Object.assign(Object.assign({},ae),{selected:!0})]:[]})})),("custom_text"===(null==ae?void 0:ae.value)||"custom_link"===(null==ae?void 0:ae.value))&&t(v,{state:Ve?"disabled":"none",labelText:"custom_text"===(null==ae?void 0:ae.value)?"Custom text value":"custom_link"===(null==ae?void 0:ae.value)?"Custom URL value":"",id:`variable-value-${null==ae?void 0:ae.value}-${Z}`,value:ee,errorMessage:ve&&(null===(H=null==ke?void 0:ke.buttons)||void 0===H?void 0:H.includes(null!==(I=null==z?void 0:z.index)&&void 0!==I?I:-1))?ee&&0!==ee.trim().length?"custom_link"!==ae.value||/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$/.test(`https://${ee.trim()}`)&&0!==ee.trim().length?"custom_link"!==ae.value&&ee.length>30?"Length cannot be more than 30":"BUTTONS"===F&&"custom_link"!==ae.value?"Enter valid alpha numeric code":"":"Enter valid URL":"Required field":"",maxCharLimit:Ae||("custom_link"===(null==ae?void 0:ae.value)?2e3:"BUTTONS"===F?15:30),noKeyDownChange:!0,prefixText:"custom_link"===(null==ae?void 0:ae.value)?"https://":"",placeholder:"link"===z.type||"custom_link"===ae.value?"Enter custom URL here":"Enter custom text here",onChangeText:e=>{we(ae.value,e)}}),"static_expiry"===(null==ae?void 0:ae.value)&&e("div",Object.assign({style:{position:"relative"}},{children:[(Ve||Le)&&e(A,Object.assign({onClick:e=>e.preventDefault(),style:{display:"flex",justifyContent:"space-between"}},{children:[t(L,{}),t(L,{})]})),t(p,{placement:"auto",time:n(ee?new Date(ee):new Date,"hh:mm a"),date:ee?new Date(ee):new Date,minDate:new Date,error:"",setError:()=>{},onChange:e=>{we("static_expiry",e.toISOString())}})]})),"static_expiry"===(null==ae?void 0:ae.value)&&Be&&t("div",Object.assign({style:{marginTop:8}},{children:t(r,{containerStyle:{padding:"4px 8px"},icon:()=>t(a,{width:16,height:16,color:_.content.secondary}),type:c.NEUTRAL,text:"Please use the same expiration code that you applied when creating \nthe code on Shopify"})})),"link"===z.type&&"custom_link"!==(null==ae?void 0:ae.value)&&!Ee&&!Ce&&Te===y.CHATBOT&&t(S,{isError:null!==(Y=null===(R=null==ke?void 0:ke.buttons)||void 0===R?void 0:R.includes(null!==(W=null==z?void 0:z.index)&&void 0!==W?W:-1))&&void 0!==Y&&Y,params:null!==($=z.queryParams)&&void 0!==$?$:[],onChange:e=>{Ne(z.updatedValue,"link",e)},variableValue:z.updatedValue})]}))};export{k as Container,w as default};
|