@bikdotai/bik-component-library 0.0.784-beta.0 → 0.0.784-beta.2
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/Ai_event_generating.svg.js +1 -1
- package/dist/cjs/components/ProgressChecklist/MultiChecklistItem.d.ts +1 -29
- package/dist/cjs/components/ProgressChecklist/ProgressChecklist.d.ts +27 -1
- package/dist/cjs/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/EmojiPicker.d.ts +2 -1
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/EmojiPicker.js +1 -1
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.d.ts +2 -5
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.js +1 -1
- package/dist/cjs/components/QueryBuilder/components/Connectors/Connector.js +1 -1
- package/dist/cjs/components/QueryBuilder/constants/connector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/constants/connector.js +1 -1
- package/dist/cjs/components/QueryBuilder/constants/connectorPosition.js +1 -1
- package/dist/cjs/components/QueryBuilder/helpers/Connector.helper.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/helpers/Connector.helper.js +1 -1
- package/dist/cjs/components/QueryBuilder/helpers/PropertyCustomProcessor.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/helpers/SegmentValidator.d.ts +15 -3
- package/dist/cjs/components/QueryBuilder/types/QueryBuilder.type.d.ts +22 -2
- package/dist/cjs/components/QueryBuilder/types/QueryBuilder.type.js +1 -1
- package/dist/cjs/components/QueryBuilder/types/QueryBuilderAPI.type.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/types/QueryBuilderConnector.type.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/types/index.d.ts +1 -2
- package/dist/cjs/components/SearchFilter/components/DatePickerButton.d.ts +1 -1
- package/dist/cjs/components/SearchFilter/components/DateRangeOnlyButton.d.ts +1 -1
- package/dist/cjs/components/SearchFilter/components/SearchFilterItem.d.ts +1 -1
- package/dist/cjs/components/SearchFilter/types/SearchFilter.type.d.ts +1 -1
- package/dist/cjs/components/WhatsAppTextEditor/AIRephraseButton.d.ts +1 -4
- package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditor.d.ts +1 -4
- package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.d.ts +4 -1
- package/dist/cjs/components/WhatsAppTextEditor/ai/actionRegistry.d.ts +1 -2
- package/dist/cjs/components/accordion/Accordion.d.ts +35 -2
- package/dist/cjs/components/accordion/Accordion.style.d.ts +1 -1
- package/dist/cjs/components/analytics-card/AnalyticsCard.d.ts +1 -1
- package/dist/cjs/components/analytics-card/AnalyticsCard.styled.d.ts +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsChip.d.ts +17 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsChipChannelFooter.d.ts +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.d.ts +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js +1 -1
- package/dist/cjs/components/avatar/Avatar.js +1 -1
- package/dist/cjs/components/bik-layout/BikSidebar.d.ts +1 -1
- package/dist/cjs/components/bik-layout/SidebarPopup.d.ts +1 -1
- package/dist/cjs/components/bik-layout/SidebarSkeleton.d.ts +1 -1
- package/dist/cjs/components/bik-layout/SidebarStyles.d.ts +1 -1
- package/dist/cjs/components/bik-layout/SimpleSidebar.d.ts +27 -1
- package/dist/cjs/components/floating-input-dropdown/FloatingInputDropdown.d.ts +1 -1
- package/dist/cjs/components/image-cropper/BikImageCropper.d.ts +6 -1
- package/dist/cjs/components/image-cropper/BikImagePipeline/BikImagePipeline.d.ts +1 -1
- package/dist/cjs/components/input/ChipInput.js +1 -1
- package/dist/cjs/components/input/ChipInput.styled.d.ts +66 -6
- package/dist/cjs/components/input/ChipInput.styled.js +1 -1
- package/dist/cjs/components/input/Input-helper.d.ts +1 -1
- package/dist/cjs/components/input/Input.d.ts +72 -1
- package/dist/cjs/components/input/Input.styled.d.ts +1 -1
- package/dist/cjs/components/input-with-vars/InputWithVariables.d.ts +1 -1
- package/dist/cjs/components/list-item/ListItem.d.ts +17 -1
- package/dist/cjs/components/list-item/ListItem.styled.d.ts +1 -1
- package/dist/cjs/components/list-item/themes.d.ts +1 -1
- package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.d.ts +1 -2
- package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuItem.d.ts +1 -2
- package/dist/cjs/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuList.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/type.d.ts +1 -2
- package/dist/cjs/components/product-picker-v2/ProductPickerTag.d.ts +2 -2
- package/dist/cjs/components/product-picker-v2/collectionScreen.d.ts +3 -3
- package/dist/cjs/components/product-picker-v2/helpers/ProductHelper.d.ts +4 -3
- package/dist/cjs/components/product-picker-v2/index.d.ts +1 -1
- package/dist/cjs/components/product-picker-v2/modal.d.ts +58 -2
- package/dist/cjs/components/product-picker-v2/product.d.ts +3 -2
- package/dist/cjs/components/product-picker-v2/productInfoOverlay.d.ts +2 -1
- package/dist/cjs/components/product-picker-v2/productScreen.d.ts +3 -3
- package/dist/cjs/components/product-picker-v2/productScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/rearrangeScreen.d.ts +4 -3
- package/dist/cjs/components/product-picker-v2/reducers.d.ts +1 -1
- package/dist/cjs/components/product-picker-v2/reducers.js +1 -1
- package/dist/cjs/components/product-picker-v2/searchScreen.d.ts +4 -3
- package/dist/cjs/components/product-picker-v2/selectedScreen.d.ts +4 -3
- package/dist/cjs/components/product-picker-v2/type.d.ts +0 -65
- package/dist/cjs/components/product-picker-v2/utility.d.ts +3 -3
- package/dist/cjs/components/product-picker-v2/utility.js +1 -1
- package/dist/cjs/components/product-picker-v2/variant.d.ts +12 -2
- package/dist/cjs/components/product-picker-v2/variantComponents.d.ts +3 -2
- package/dist/cjs/components/sample-button/SampleButton.d.ts +16 -1
- package/dist/cjs/components/sample-button/SampleButton.styled.d.ts +1 -1
- package/dist/cjs/components/sample-button/themes.d.ts +1 -1
- package/dist/cjs/components/searchBar/searchBar.d.ts +1 -1
- package/dist/cjs/components/slider/slider.js +1 -1
- package/dist/cjs/components/stepper/Stepper.d.ts +17 -1
- package/dist/cjs/components/stepper/Stepper.styled.d.ts +1 -1
- package/dist/cjs/components/stepper/StepperService.d.ts +1 -1
- package/dist/cjs/components/stepper/themes.d.ts +1 -1
- package/dist/cjs/components/template-context-mapper/TemplateContextMapper.d.ts +9 -9
- package/dist/cjs/components/template-context-mapper/TemplateContextMapper.js +1 -1
- package/dist/cjs/components/template-context-mapper/context/templateModalContext.d.ts +7 -7
- package/dist/cjs/components/template-context-mapper/custom-hooks/useAdditionalVariables.d.ts +1 -1
- package/dist/cjs/components/template-context-mapper/helpers/WebpushTemplateHelper.d.ts +4 -6
- package/dist/cjs/components/template-context-mapper/helpers/WebpushTemplateHelper.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/Body.d.ts +2 -2
- package/dist/cjs/components/template-context-mapper/modalElements/Body.js +10 -10
- package/dist/cjs/components/template-context-mapper/modalElements/DesktopPreview.js +7 -7
- package/dist/cjs/components/template-context-mapper/modalElements/EditMediaModal.d.ts +3 -3
- package/dist/cjs/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/EditWebpushTemplate.d.ts +2 -2
- package/dist/cjs/components/template-context-mapper/modalElements/EditWebpushTemplate.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.d.ts +14 -3
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts +5 -5
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +2 -2
- package/dist/cjs/components/template-context-mapper/modalElements/Footer.js +4 -4
- package/dist/cjs/components/template-context-mapper/modalElements/MobilePreview.d.ts +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/MobilePreview.js +3 -3
- package/dist/cjs/components/template-context-mapper/modalElements/QualityWarningModal.d.ts +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.d.ts +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/TemplateSelectModalContent.d.ts +2 -2
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.d.ts +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.js +4 -4
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.d.ts +4 -5
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/VariableEditorHeader.d.ts +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.d.ts +2 -2
- package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.d.ts +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.js +1 -1
- package/dist/cjs/components/template-context-mapper/utils/convertPlaceholdersToBikDropdown.d.ts +2 -2
- package/dist/cjs/components/template-context-mapper/utils/getDataFromTemplateComponent.d.ts +2 -2
- package/dist/cjs/components/template-context-mapper/utils/highlightFor.d.ts +1 -1
- package/dist/cjs/components/template-preview/models/TemplateMeta.d.ts +1 -1
- package/dist/cjs/components/template-preview/models/WhatsappCarouselTemplate.d.ts +2 -2
- package/dist/cjs/components/toaster/Toaster.styled.js +1 -1
- package/dist/cjs/components/variable-picker-v3/SubHeaderItems.js +1 -1
- package/dist/cjs/icons/Actions/Common actions/Activate.d.ts +7 -0
- package/dist/cjs/icons/Actions/Common actions/Code.d.ts +7 -0
- package/dist/cjs/icons/Actions/Common actions/Cross.d.ts +7 -0
- package/dist/cjs/icons/Actions/Common actions/Deactivate.d.ts +7 -0
- package/dist/cjs/icons/Actions/Common actions/Delete.d.ts +7 -0
- package/dist/cjs/icons/Actions/Common actions/Edit.d.ts +7 -0
- package/dist/cjs/icons/Actions/Common actions/Forward.d.ts +7 -0
- package/dist/cjs/icons/Actions/Common actions/Fullscreen.d.ts +7 -0
- package/dist/cjs/icons/Actions/Common actions/LinkSimpleHorizontal.d.ts +7 -0
- package/dist/cjs/icons/Actions/Common actions/Minus.d.ts +7 -0
- package/dist/cjs/icons/Actions/Common actions/Plus.d.ts +7 -0
- package/dist/cjs/icons/Actions/Common actions/SendAirplane.d.ts +7 -0
- package/dist/cjs/icons/Actions/Common actions/ShareAndroid.d.ts +7 -0
- package/dist/cjs/icons/Actions/Common actions/index.d.ts +13 -0
- package/dist/cjs/icons/Actions/Formatting/CheckboxIcon.d.ts +7 -0
- package/dist/cjs/icons/Actions/Formatting/Copy.d.ts +7 -0
- package/dist/cjs/icons/Actions/Formatting/Dropdown.d.ts +7 -0
- package/dist/cjs/icons/Actions/Formatting/MultiLine.d.ts +7 -0
- package/dist/cjs/icons/Actions/Formatting/MultiSelect.d.ts +7 -0
- package/dist/cjs/icons/Actions/Formatting/Number.d.ts +7 -0
- package/dist/cjs/icons/Actions/Formatting/Text.d.ts +7 -0
- package/dist/cjs/icons/Actions/Formatting/Textbox.d.ts +7 -0
- package/dist/cjs/icons/Actions/Formatting/index.d.ts +8 -0
- package/dist/cjs/icons/Actions/Navigation/ArrowRedo.d.ts +7 -0
- package/dist/cjs/icons/Actions/Navigation/ArrowUndo.d.ts +7 -0
- package/dist/cjs/icons/Actions/Navigation/LogIn.d.ts +7 -0
- package/dist/cjs/icons/Actions/Navigation/LogOut.d.ts +7 -0
- package/dist/cjs/icons/Actions/Navigation/OpenNewWindow.d.ts +7 -0
- package/dist/cjs/icons/Actions/Navigation/Refresh.d.ts +7 -0
- package/dist/cjs/icons/Actions/Navigation/Rewind.d.ts +7 -0
- package/dist/cjs/icons/Actions/Navigation/Sync.d.ts +7 -0
- package/dist/cjs/icons/Actions/Navigation/index.d.ts +8 -0
- package/dist/cjs/icons/Actions/Selection/HandleDrag.d.ts +7 -0
- package/dist/cjs/icons/Actions/Selection/SelectDocManually.d.ts +7 -0
- package/dist/cjs/icons/Actions/Selection/SingleChoice.d.ts +7 -0
- package/dist/cjs/icons/Actions/Selection/index.d.ts +3 -0
- package/dist/cjs/icons/Arrows/Carat/CaratDown.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Carat/CaratLeft.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Carat/CaratRight.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Carat/CaratUp.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Carat/index.d.ts +4 -0
- package/dist/cjs/icons/Arrows/Chevron/ChevronDown.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Chevron/ChevronLeft.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Chevron/ChevronRight.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Chevron/ChevronUp.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Chevron/index.d.ts +4 -0
- package/dist/cjs/icons/Arrows/Double chevron/ChevronDoubleDown.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Double chevron/ChevronDoubleLeft.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Double chevron/ChevronDoubleRight.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Double chevron/ChevronDoubleUp.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Double chevron/index.d.ts +4 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowDown.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowDown1.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowDownLeft.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowDownLeft1.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowDownRight.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowDownRight1.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowLeft.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowLeft1.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowRight.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowRight1.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowUp.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowUp1.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowUpLeft.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowUpLeft1.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowUpRight.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/ArrowUpRight1.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Normal arrows/index.d.ts +16 -0
- package/dist/cjs/icons/Arrows/Special/ArrowSwitch.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Special/ArrowSwitch1.d.ts +7 -0
- package/dist/cjs/icons/Arrows/Special/index.d.ts +2 -0
- package/dist/cjs/icons/BIK AI specific/AiEmoji.d.ts +7 -0
- package/dist/cjs/icons/BIK AI specific/AiRobot.d.ts +7 -0
- package/dist/cjs/icons/BIK AI specific/Expand.d.ts +7 -0
- package/dist/cjs/icons/BIK AI specific/Frame27202.d.ts +7 -0
- package/dist/cjs/icons/BIK AI specific/Frame27389.d.ts +7 -0
- package/dist/cjs/icons/BIK AI specific/Frame27597.d.ts +7 -0
- package/dist/cjs/icons/BIK AI specific/Frame27598.d.ts +7 -0
- package/dist/cjs/icons/BIK AI specific/Frame27599.d.ts +7 -0
- package/dist/cjs/icons/BIK AI specific/PricePlease.d.ts +7 -0
- package/dist/cjs/icons/BIK AI specific/Shape.d.ts +7 -0
- package/dist/cjs/icons/BIK AI specific/Shorter.d.ts +7 -0
- package/dist/cjs/icons/BIK AI specific/Sparkling2Line.d.ts +7 -0
- package/dist/cjs/icons/BIK AI specific/Write.d.ts +7 -0
- package/dist/cjs/icons/BIK AI specific/index.d.ts +13 -0
- package/dist/cjs/icons/Informational/Common UI/Bell.d.ts +7 -0
- package/dist/cjs/icons/Informational/Common UI/BellSync.d.ts +7 -0
- package/dist/cjs/icons/Informational/Common UI/Bulb.d.ts +7 -0
- package/dist/cjs/icons/Informational/Common UI/MenuHamburger.d.ts +7 -0
- package/dist/cjs/icons/Informational/Common UI/MessageSearch.d.ts +7 -0
- package/dist/cjs/icons/Informational/Common UI/MoreHorizontal.d.ts +7 -0
- package/dist/cjs/icons/Informational/Common UI/MoreVertical.d.ts +7 -0
- package/dist/cjs/icons/Informational/Common UI/Search.d.ts +7 -0
- package/dist/cjs/icons/Informational/Common UI/Settings.d.ts +7 -0
- package/dist/cjs/icons/Informational/Common UI/Training.d.ts +7 -0
- package/dist/cjs/icons/Informational/Common UI/index.d.ts +10 -0
- package/dist/cjs/icons/Informational/Communication/Chat.d.ts +7 -0
- package/dist/cjs/icons/Informational/Communication/ChatCheck.d.ts +7 -0
- package/dist/cjs/icons/Informational/Communication/ChatQuestion.d.ts +7 -0
- package/dist/cjs/icons/Informational/Communication/ChatStar.d.ts +7 -0
- package/dist/cjs/icons/Informational/Communication/Email.d.ts +7 -0
- package/dist/cjs/icons/Informational/Communication/Headphone.d.ts +7 -0
- package/dist/cjs/icons/Informational/Communication/LiveChat.d.ts +7 -0
- package/dist/cjs/icons/Informational/Communication/Phone.d.ts +7 -0
- package/dist/cjs/icons/Informational/Communication/index.d.ts +8 -0
- package/dist/cjs/icons/Informational/Customer intent/ClipboardCheck.d.ts +7 -0
- package/dist/cjs/icons/Informational/Customer intent/Experimental.d.ts +7 -0
- package/dist/cjs/icons/Informational/Customer intent/Frame27202.d.ts +7 -0
- package/dist/cjs/icons/Informational/Customer intent/Help.d.ts +7 -0
- package/dist/cjs/icons/Informational/Customer intent/Percent.d.ts +7 -0
- package/dist/cjs/icons/Informational/Customer intent/Purchase.d.ts +7 -0
- package/dist/cjs/icons/Informational/Customer intent/Services.d.ts +7 -0
- package/dist/cjs/icons/Informational/Customer intent/ShoppingCart.d.ts +7 -0
- package/dist/cjs/icons/Informational/Customer intent/SingleChoice.d.ts +7 -0
- package/dist/cjs/icons/Informational/Customer intent/Unsatisfactory.d.ts +7 -0
- package/dist/cjs/icons/Informational/Customer intent/UserSound.d.ts +7 -0
- package/dist/cjs/icons/Informational/Customer intent/index.d.ts +11 -0
- package/dist/cjs/icons/Informational/Date and time/Calendar.d.ts +7 -0
- package/dist/cjs/icons/Informational/Date and time/CalendarAdd.d.ts +7 -0
- package/dist/cjs/icons/Informational/Date and time/Clock.d.ts +7 -0
- package/dist/cjs/icons/Informational/Date and time/HourGlass.d.ts +7 -0
- package/dist/cjs/icons/Informational/Date and time/WorkingHours.d.ts +7 -0
- package/dist/cjs/icons/Informational/Date and time/index.d.ts +5 -0
- package/dist/cjs/icons/Informational/Files and folders/Archive1.d.ts +7 -0
- package/dist/cjs/icons/Informational/Files and folders/Excel.d.ts +7 -0
- package/dist/cjs/icons/Informational/Files and folders/File.d.ts +7 -0
- package/dist/cjs/icons/Informational/Files and folders/FileCsv.d.ts +7 -0
- package/dist/cjs/icons/Informational/Files and folders/FilePage.d.ts +7 -0
- package/dist/cjs/icons/Informational/Files and folders/FilePdf.d.ts +7 -0
- package/dist/cjs/icons/Informational/Files and folders/Folder.d.ts +7 -0
- package/dist/cjs/icons/Informational/Files and folders/MediaMessage.d.ts +7 -0
- package/dist/cjs/icons/Informational/Files and folders/Move.d.ts +7 -0
- package/dist/cjs/icons/Informational/Files and folders/OrderHistory.d.ts +7 -0
- package/dist/cjs/icons/Informational/Files and folders/TextMessage.d.ts +7 -0
- package/dist/cjs/icons/Informational/Files and folders/Unarchive.d.ts +7 -0
- package/dist/cjs/icons/Informational/Files and folders/index.d.ts +12 -0
- package/dist/cjs/icons/Informational/Finance/Bank.d.ts +7 -0
- package/dist/cjs/icons/Informational/Finance/CashOnDelivery.d.ts +7 -0
- package/dist/cjs/icons/Informational/Finance/ChartLine.d.ts +7 -0
- package/dist/cjs/icons/Informational/Finance/CreditCard.d.ts +7 -0
- package/dist/cjs/icons/Informational/Finance/Growth.d.ts +7 -0
- package/dist/cjs/icons/Informational/Finance/Money1.d.ts +7 -0
- package/dist/cjs/icons/Informational/Finance/NoCredits.d.ts +7 -0
- package/dist/cjs/icons/Informational/Finance/Percent.d.ts +7 -0
- package/dist/cjs/icons/Informational/Finance/Rupee.d.ts +7 -0
- package/dist/cjs/icons/Informational/Finance/TablerTicket.d.ts +7 -0
- package/dist/cjs/icons/Informational/Finance/Wallet.d.ts +7 -0
- package/dist/cjs/icons/Informational/Finance/index.d.ts +11 -0
- package/dist/cjs/icons/Informational/General/AlertTriangle.d.ts +7 -0
- package/dist/cjs/icons/Informational/General/Check.d.ts +7 -0
- package/dist/cjs/icons/Informational/General/CheckDouble.d.ts +7 -0
- package/dist/cjs/icons/Informational/General/CloseTicket1.d.ts +7 -0
- package/dist/cjs/icons/Informational/General/Error.d.ts +7 -0
- package/dist/cjs/icons/Informational/General/FailDoc.d.ts +7 -0
- package/dist/cjs/icons/Informational/General/Help.d.ts +7 -0
- package/dist/cjs/icons/Informational/General/IcList.d.ts +7 -0
- package/dist/cjs/icons/Informational/General/Info.d.ts +7 -0
- package/dist/cjs/icons/Informational/General/NewTicket.d.ts +7 -0
- package/dist/cjs/icons/Informational/General/RoundCheck.d.ts +7 -0
- package/dist/cjs/icons/Informational/General/Slash.d.ts +7 -0
- package/dist/cjs/icons/Informational/General/index.d.ts +12 -0
- package/dist/cjs/icons/Informational/Identity/Chatbot.d.ts +7 -0
- package/dist/cjs/icons/Informational/Identity/Contacts.d.ts +7 -0
- package/dist/cjs/icons/Informational/Identity/Group.d.ts +7 -0
- package/dist/cjs/icons/Informational/Identity/IdCard.d.ts +7 -0
- package/dist/cjs/icons/Informational/Identity/Person.d.ts +7 -0
- package/dist/cjs/icons/Informational/Identity/Robot.d.ts +7 -0
- package/dist/cjs/icons/Informational/Identity/Union.d.ts +7 -0
- package/dist/cjs/icons/Informational/Identity/Union1.d.ts +7 -0
- package/dist/cjs/icons/Informational/Identity/UserMinus1.d.ts +7 -0
- package/dist/cjs/icons/Informational/Identity/UserPlus.d.ts +7 -0
- package/dist/cjs/icons/Informational/Identity/index.d.ts +10 -0
- package/dist/cjs/icons/Informational/Location/Address.d.ts +7 -0
- package/dist/cjs/icons/Informational/Location/LanguageChange.d.ts +7 -0
- package/dist/cjs/icons/Informational/Location/MapPin.d.ts +7 -0
- package/dist/cjs/icons/Informational/Location/Truck.d.ts +7 -0
- package/dist/cjs/icons/Informational/Location/index.d.ts +4 -0
- package/dist/cjs/icons/Informational/Store related/AllDocs.d.ts +7 -0
- package/dist/cjs/icons/Informational/Store related/AllProduct.d.ts +7 -0
- package/dist/cjs/icons/Informational/Store related/Clipboard.d.ts +7 -0
- package/dist/cjs/icons/Informational/Store related/ClipboardCheck.d.ts +7 -0
- package/dist/cjs/icons/Informational/Store related/CustomerReport.d.ts +7 -0
- package/dist/cjs/icons/Informational/Store related/Head112.d.ts +7 -0
- package/dist/cjs/icons/Informational/Store related/InventoryReport.d.ts +7 -0
- package/dist/cjs/icons/Informational/Store related/OrderReport.d.ts +7 -0
- package/dist/cjs/icons/Informational/Store related/PaymentReport.d.ts +7 -0
- package/dist/cjs/icons/Informational/Store related/Store.d.ts +7 -0
- package/dist/cjs/icons/Informational/Store related/StoreSync.d.ts +7 -0
- package/dist/cjs/icons/Informational/Store related/index.d.ts +11 -0
- package/dist/cjs/icons/Informational/eCommerce/AddLabel.d.ts +7 -0
- package/dist/cjs/icons/Informational/eCommerce/Click.d.ts +7 -0
- package/dist/cjs/icons/Informational/eCommerce/Filter.d.ts +7 -0
- package/dist/cjs/icons/Informational/eCommerce/Gift1.d.ts +7 -0
- package/dist/cjs/icons/Informational/eCommerce/GiftMinus.d.ts +7 -0
- package/dist/cjs/icons/Informational/eCommerce/GiftPlus.d.ts +7 -0
- package/dist/cjs/icons/Informational/eCommerce/Promocode.d.ts +7 -0
- package/dist/cjs/icons/Informational/eCommerce/Receipt.d.ts +7 -0
- package/dist/cjs/icons/Informational/eCommerce/ShieldCheck.d.ts +7 -0
- package/dist/cjs/icons/Informational/eCommerce/ShoppingBag.d.ts +7 -0
- package/dist/cjs/icons/Informational/eCommerce/ShoppingBasket.d.ts +7 -0
- package/dist/cjs/icons/Informational/eCommerce/ShoppingCart.d.ts +7 -0
- package/dist/cjs/icons/Informational/eCommerce/index.d.ts +12 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Categories/Box.d.ts +7 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Categories/Box2.d.ts +7 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Categories/index.d.ts +2 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Navigation/Journeys.d.ts +7 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Navigation/Services.d.ts +7 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Navigation/index.d.ts +2 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Plans/PlanUltimate.d.ts +7 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Plans/index.d.ts +1 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Services/Businesscard.d.ts +7 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Services/Customdomain.d.ts +7 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Services/Marketing.d.ts +7 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Services/PaymentLink.d.ts +7 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Services/Theme.d.ts +7 -0
- package/dist/cjs/icons/Legacy - Bikayi specific/Services/index.d.ts +5 -0
- package/dist/cjs/icons/Media/Audio/Microphone.d.ts +7 -0
- package/dist/cjs/icons/Media/Audio/Pause.d.ts +7 -0
- package/dist/cjs/icons/Media/Audio/Play.d.ts +7 -0
- package/dist/cjs/icons/Media/Audio/Sleep.d.ts +7 -0
- package/dist/cjs/icons/Media/Audio/VolumeMute.d.ts +7 -0
- package/dist/cjs/icons/Media/Audio/VolumeOneline.d.ts +7 -0
- package/dist/cjs/icons/Media/Audio/VolumeTwoline.d.ts +7 -0
- package/dist/cjs/icons/Media/Audio/index.d.ts +7 -0
- package/dist/cjs/icons/Media/Devices/Desktop.d.ts +7 -0
- package/dist/cjs/icons/Media/Devices/Smartphone.d.ts +7 -0
- package/dist/cjs/icons/Media/Devices/index.d.ts +2 -0
- package/dist/cjs/icons/Media/Others/BarcodeScan.d.ts +7 -0
- package/dist/cjs/icons/Media/Others/Download.d.ts +7 -0
- package/dist/cjs/icons/Media/Others/EmojiSmile.d.ts +7 -0
- package/dist/cjs/icons/Media/Others/Paperclip.d.ts +7 -0
- package/dist/cjs/icons/Media/Others/Upload.d.ts +7 -0
- package/dist/cjs/icons/Media/Others/index.d.ts +5 -0
- package/dist/cjs/icons/Media/Visual/Camera.d.ts +7 -0
- package/dist/cjs/icons/Media/Visual/CameraAdd.d.ts +7 -0
- package/dist/cjs/icons/Media/Visual/Crop.d.ts +7 -0
- package/dist/cjs/icons/Media/Visual/FlashOff.d.ts +7 -0
- package/dist/cjs/icons/Media/Visual/FlashOn.d.ts +7 -0
- package/dist/cjs/icons/Media/Visual/Image.d.ts +7 -0
- package/dist/cjs/icons/Media/Visual/ImageAdd.d.ts +7 -0
- package/dist/cjs/icons/Media/Visual/Images.d.ts +7 -0
- package/dist/cjs/icons/Media/Visual/Maximize.d.ts +7 -0
- package/dist/cjs/icons/Media/Visual/RotateAnticlockwise.d.ts +7 -0
- package/dist/cjs/icons/Media/Visual/RotateClockwise.d.ts +7 -0
- package/dist/cjs/icons/Media/Visual/VideoCamcorder.d.ts +7 -0
- package/dist/cjs/icons/Media/Visual/VideoFilm.d.ts +7 -0
- package/dist/cjs/icons/Media/Visual/index.d.ts +13 -0
- package/dist/cjs/icons/Social/Channels /Email.d.ts +6 -0
- package/dist/cjs/icons/Social/Channels /EmailMarketing.d.ts +6 -0
- package/dist/cjs/icons/Social/Channels /Facebook.d.ts +6 -0
- package/dist/cjs/icons/Social/Channels /FacebookComment.d.ts +6 -0
- package/dist/cjs/icons/Social/Channels /Instagram.d.ts +6 -0
- package/dist/cjs/icons/Social/Channels /InstagramIcon.d.ts +6 -0
- package/dist/cjs/icons/Social/Channels /Messenger.d.ts +6 -0
- package/dist/cjs/icons/Social/Channels /Tasks.d.ts +6 -0
- package/dist/cjs/icons/Social/Channels /WebPush.d.ts +6 -0
- package/dist/cjs/icons/Social/Channels /WhatsApp.d.ts +6 -0
- package/dist/cjs/icons/Social/Channels /index.d.ts +10 -0
- package/dist/cjs/icons/Social/Social/EmailMarketing.d.ts +7 -0
- package/dist/cjs/icons/Social/Social/Facebook.d.ts +7 -0
- package/dist/cjs/icons/Social/Social/Google.d.ts +7 -0
- package/dist/cjs/icons/Social/Social/Instagram.d.ts +7 -0
- package/dist/cjs/icons/Social/Social/Messenger.d.ts +7 -0
- package/dist/cjs/icons/Social/Social/Rcs.d.ts +7 -0
- package/dist/cjs/icons/Social/Social/Twitter.d.ts +7 -0
- package/dist/cjs/icons/Social/Social/Website.d.ts +7 -0
- package/dist/cjs/icons/Social/Social/Whatsapp.d.ts +7 -0
- package/dist/cjs/icons/Social/Social/Youtube.d.ts +7 -0
- package/dist/cjs/icons/Social/Social/index.d.ts +10 -0
- package/dist/cjs/icons/Toggles/General/Eye.d.ts +7 -0
- package/dist/cjs/icons/Toggles/General/EyeClosed.d.ts +7 -0
- package/dist/cjs/icons/Toggles/General/EyeOff.d.ts +7 -0
- package/dist/cjs/icons/Toggles/General/HeartEmpty.d.ts +7 -0
- package/dist/cjs/icons/Toggles/General/HeartFilled.d.ts +7 -0
- package/dist/cjs/icons/Toggles/General/Lock.d.ts +7 -0
- package/dist/cjs/icons/Toggles/General/StarEmpty.d.ts +7 -0
- package/dist/cjs/icons/Toggles/General/StarFilled.d.ts +7 -0
- package/dist/cjs/icons/Toggles/General/StarHalf.d.ts +7 -0
- package/dist/cjs/icons/Toggles/General/Unlock.d.ts +7 -0
- package/dist/cjs/icons/Toggles/General/index.d.ts +10 -0
- package/dist/cjs/icons/index.d.ts +56 -0
- package/dist/cjs/icons/registry.d.ts +10 -0
- package/dist/cjs/index.d.ts +0 -3
- package/dist/cjs/index.js +1 -1
- package/dist/esm/assets/icons/Ai_event_generating.svg.js +1 -1
- package/dist/esm/components/ProgressChecklist/MultiChecklistItem.d.ts +1 -29
- package/dist/esm/components/ProgressChecklist/ProgressChecklist.d.ts +27 -1
- package/dist/esm/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/EmojiPicker.d.ts +2 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/EmojiPicker.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.d.ts +2 -5
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Connector.js +1 -1
- package/dist/esm/components/QueryBuilder/constants/connector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/constants/connector.js +1 -1
- package/dist/esm/components/QueryBuilder/constants/connectorPosition.js +1 -1
- package/dist/esm/components/QueryBuilder/helpers/Connector.helper.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/helpers/Connector.helper.js +1 -1
- package/dist/esm/components/QueryBuilder/helpers/PropertyCustomProcessor.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/helpers/SegmentValidator.d.ts +15 -3
- package/dist/esm/components/QueryBuilder/types/QueryBuilder.type.d.ts +22 -2
- package/dist/esm/components/QueryBuilder/types/QueryBuilder.type.js +1 -1
- package/dist/esm/components/QueryBuilder/types/QueryBuilderAPI.type.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/types/QueryBuilderConnector.type.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/types/index.d.ts +1 -2
- package/dist/esm/components/SearchFilter/components/DatePickerButton.d.ts +1 -1
- package/dist/esm/components/SearchFilter/components/DateRangeOnlyButton.d.ts +1 -1
- package/dist/esm/components/SearchFilter/components/SearchFilterItem.d.ts +1 -1
- package/dist/esm/components/SearchFilter/types/SearchFilter.type.d.ts +1 -1
- package/dist/esm/components/WhatsAppTextEditor/AIRephraseButton.d.ts +1 -4
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.d.ts +1 -4
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.d.ts +4 -1
- package/dist/esm/components/WhatsAppTextEditor/ai/actionRegistry.d.ts +1 -2
- package/dist/esm/components/accordion/Accordion.d.ts +35 -2
- package/dist/esm/components/accordion/Accordion.style.d.ts +1 -1
- package/dist/esm/components/analytics-card/AnalyticsCard.d.ts +1 -1
- package/dist/esm/components/analytics-card/AnalyticsCard.styled.d.ts +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChip.d.ts +17 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChipChannelFooter.d.ts +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.d.ts +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js +1 -1
- package/dist/esm/components/avatar/Avatar.js +1 -1
- package/dist/esm/components/bik-layout/BikSidebar.d.ts +1 -1
- package/dist/esm/components/bik-layout/SidebarPopup.d.ts +1 -1
- package/dist/esm/components/bik-layout/SidebarSkeleton.d.ts +1 -1
- package/dist/esm/components/bik-layout/SidebarStyles.d.ts +1 -1
- package/dist/esm/components/bik-layout/SimpleSidebar.d.ts +27 -1
- package/dist/esm/components/floating-input-dropdown/FloatingInputDropdown.d.ts +1 -1
- package/dist/esm/components/image-cropper/BikImageCropper.d.ts +6 -1
- package/dist/esm/components/image-cropper/BikImagePipeline/BikImagePipeline.d.ts +1 -1
- package/dist/esm/components/input/ChipInput.js +1 -1
- package/dist/esm/components/input/ChipInput.styled.d.ts +66 -6
- package/dist/esm/components/input/ChipInput.styled.js +1 -1
- package/dist/esm/components/input/Input-helper.d.ts +1 -1
- package/dist/esm/components/input/Input.d.ts +72 -1
- package/dist/esm/components/input/Input.styled.d.ts +1 -1
- package/dist/esm/components/input-with-vars/InputWithVariables.d.ts +1 -1
- package/dist/esm/components/list-item/ListItem.d.ts +17 -1
- package/dist/esm/components/list-item/ListItem.styled.d.ts +1 -1
- package/dist/esm/components/list-item/themes.d.ts +1 -1
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.d.ts +1 -2
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuItem.d.ts +1 -2
- package/dist/esm/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuList.js +1 -1
- package/dist/esm/components/multi-level-dropdown/type.d.ts +1 -2
- package/dist/esm/components/product-picker-v2/ProductPickerTag.d.ts +2 -2
- package/dist/esm/components/product-picker-v2/collectionScreen.d.ts +3 -3
- package/dist/esm/components/product-picker-v2/helpers/ProductHelper.d.ts +4 -3
- package/dist/esm/components/product-picker-v2/index.d.ts +1 -1
- package/dist/esm/components/product-picker-v2/modal.d.ts +58 -2
- package/dist/esm/components/product-picker-v2/product.d.ts +3 -2
- package/dist/esm/components/product-picker-v2/productInfoOverlay.d.ts +2 -1
- package/dist/esm/components/product-picker-v2/productScreen.d.ts +3 -3
- package/dist/esm/components/product-picker-v2/productScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/rearrangeScreen.d.ts +4 -3
- package/dist/esm/components/product-picker-v2/reducers.d.ts +1 -1
- package/dist/esm/components/product-picker-v2/reducers.js +1 -1
- package/dist/esm/components/product-picker-v2/searchScreen.d.ts +4 -3
- package/dist/esm/components/product-picker-v2/selectedScreen.d.ts +4 -3
- package/dist/esm/components/product-picker-v2/type.d.ts +0 -65
- package/dist/esm/components/product-picker-v2/utility.d.ts +3 -3
- package/dist/esm/components/product-picker-v2/utility.js +1 -1
- package/dist/esm/components/product-picker-v2/variant.d.ts +12 -2
- package/dist/esm/components/product-picker-v2/variantComponents.d.ts +3 -2
- package/dist/esm/components/sample-button/SampleButton.d.ts +16 -1
- package/dist/esm/components/sample-button/SampleButton.styled.d.ts +1 -1
- package/dist/esm/components/sample-button/themes.d.ts +1 -1
- package/dist/esm/components/searchBar/searchBar.d.ts +1 -1
- package/dist/esm/components/slider/slider.js +1 -1
- package/dist/esm/components/stepper/Stepper.d.ts +17 -1
- package/dist/esm/components/stepper/Stepper.styled.d.ts +1 -1
- package/dist/esm/components/stepper/StepperService.d.ts +1 -1
- package/dist/esm/components/stepper/themes.d.ts +1 -1
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.d.ts +9 -9
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
- package/dist/esm/components/template-context-mapper/context/templateModalContext.d.ts +7 -7
- package/dist/esm/components/template-context-mapper/custom-hooks/useAdditionalVariables.d.ts +1 -1
- package/dist/esm/components/template-context-mapper/helpers/WebpushTemplateHelper.d.ts +4 -6
- package/dist/esm/components/template-context-mapper/helpers/WebpushTemplateHelper.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/Body.d.ts +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/Body.js +10 -10
- package/dist/esm/components/template-context-mapper/modalElements/DesktopPreview.js +6 -6
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.d.ts +3 -3
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWebpushTemplate.d.ts +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/EditWebpushTemplate.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.d.ts +14 -3
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts +5 -5
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/Footer.js +4 -4
- package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.d.ts +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.js +5 -5
- package/dist/esm/components/template-context-mapper/modalElements/QualityWarningModal.d.ts +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.d.ts +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.d.ts +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.d.ts +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.d.ts +4 -5
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableEditorHeader.d.ts +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.d.ts +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.d.ts +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.js +1 -1
- package/dist/esm/components/template-context-mapper/utils/convertPlaceholdersToBikDropdown.d.ts +2 -2
- package/dist/esm/components/template-context-mapper/utils/getDataFromTemplateComponent.d.ts +2 -2
- package/dist/esm/components/template-context-mapper/utils/highlightFor.d.ts +1 -1
- package/dist/esm/components/template-preview/models/TemplateMeta.d.ts +1 -1
- package/dist/esm/components/template-preview/models/WhatsappCarouselTemplate.d.ts +2 -2
- package/dist/esm/components/toaster/Toaster.styled.js +1 -1
- package/dist/esm/components/variable-picker-v3/SubHeaderItems.js +1 -1
- package/dist/esm/icons/Actions/Common actions/Activate.d.ts +7 -0
- package/dist/esm/icons/Actions/Common actions/Code.d.ts +7 -0
- package/dist/esm/icons/Actions/Common actions/Cross.d.ts +7 -0
- package/dist/esm/icons/Actions/Common actions/Deactivate.d.ts +7 -0
- package/dist/esm/icons/Actions/Common actions/Delete.d.ts +7 -0
- package/dist/esm/icons/Actions/Common actions/Edit.d.ts +7 -0
- package/dist/esm/icons/Actions/Common actions/Forward.d.ts +7 -0
- package/dist/esm/icons/Actions/Common actions/Fullscreen.d.ts +7 -0
- package/dist/esm/icons/Actions/Common actions/LinkSimpleHorizontal.d.ts +7 -0
- package/dist/esm/icons/Actions/Common actions/Minus.d.ts +7 -0
- package/dist/esm/icons/Actions/Common actions/Plus.d.ts +7 -0
- package/dist/esm/icons/Actions/Common actions/SendAirplane.d.ts +7 -0
- package/dist/esm/icons/Actions/Common actions/ShareAndroid.d.ts +7 -0
- package/dist/esm/icons/Actions/Common actions/index.d.ts +13 -0
- package/dist/esm/icons/Actions/Formatting/CheckboxIcon.d.ts +7 -0
- package/dist/esm/icons/Actions/Formatting/Copy.d.ts +7 -0
- package/dist/esm/icons/Actions/Formatting/Dropdown.d.ts +7 -0
- package/dist/esm/icons/Actions/Formatting/MultiLine.d.ts +7 -0
- package/dist/esm/icons/Actions/Formatting/MultiSelect.d.ts +7 -0
- package/dist/esm/icons/Actions/Formatting/Number.d.ts +7 -0
- package/dist/esm/icons/Actions/Formatting/Text.d.ts +7 -0
- package/dist/esm/icons/Actions/Formatting/Textbox.d.ts +7 -0
- package/dist/esm/icons/Actions/Formatting/index.d.ts +8 -0
- package/dist/esm/icons/Actions/Navigation/ArrowRedo.d.ts +7 -0
- package/dist/esm/icons/Actions/Navigation/ArrowUndo.d.ts +7 -0
- package/dist/esm/icons/Actions/Navigation/LogIn.d.ts +7 -0
- package/dist/esm/icons/Actions/Navigation/LogOut.d.ts +7 -0
- package/dist/esm/icons/Actions/Navigation/OpenNewWindow.d.ts +7 -0
- package/dist/esm/icons/Actions/Navigation/Refresh.d.ts +7 -0
- package/dist/esm/icons/Actions/Navigation/Rewind.d.ts +7 -0
- package/dist/esm/icons/Actions/Navigation/Sync.d.ts +7 -0
- package/dist/esm/icons/Actions/Navigation/index.d.ts +8 -0
- package/dist/esm/icons/Actions/Selection/HandleDrag.d.ts +7 -0
- package/dist/esm/icons/Actions/Selection/SelectDocManually.d.ts +7 -0
- package/dist/esm/icons/Actions/Selection/SingleChoice.d.ts +7 -0
- package/dist/esm/icons/Actions/Selection/index.d.ts +3 -0
- package/dist/esm/icons/Arrows/Carat/CaratDown.d.ts +7 -0
- package/dist/esm/icons/Arrows/Carat/CaratLeft.d.ts +7 -0
- package/dist/esm/icons/Arrows/Carat/CaratRight.d.ts +7 -0
- package/dist/esm/icons/Arrows/Carat/CaratUp.d.ts +7 -0
- package/dist/esm/icons/Arrows/Carat/index.d.ts +4 -0
- package/dist/esm/icons/Arrows/Chevron/ChevronDown.d.ts +7 -0
- package/dist/esm/icons/Arrows/Chevron/ChevronLeft.d.ts +7 -0
- package/dist/esm/icons/Arrows/Chevron/ChevronRight.d.ts +7 -0
- package/dist/esm/icons/Arrows/Chevron/ChevronUp.d.ts +7 -0
- package/dist/esm/icons/Arrows/Chevron/index.d.ts +4 -0
- package/dist/esm/icons/Arrows/Double chevron/ChevronDoubleDown.d.ts +7 -0
- package/dist/esm/icons/Arrows/Double chevron/ChevronDoubleLeft.d.ts +7 -0
- package/dist/esm/icons/Arrows/Double chevron/ChevronDoubleRight.d.ts +7 -0
- package/dist/esm/icons/Arrows/Double chevron/ChevronDoubleUp.d.ts +7 -0
- package/dist/esm/icons/Arrows/Double chevron/index.d.ts +4 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowDown.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowDown1.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowDownLeft.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowDownLeft1.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowDownRight.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowDownRight1.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowLeft.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowLeft1.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowRight.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowRight1.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowUp.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowUp1.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowUpLeft.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowUpLeft1.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowUpRight.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/ArrowUpRight1.d.ts +7 -0
- package/dist/esm/icons/Arrows/Normal arrows/index.d.ts +16 -0
- package/dist/esm/icons/Arrows/Special/ArrowSwitch.d.ts +7 -0
- package/dist/esm/icons/Arrows/Special/ArrowSwitch1.d.ts +7 -0
- package/dist/esm/icons/Arrows/Special/index.d.ts +2 -0
- package/dist/esm/icons/BIK AI specific/AiEmoji.d.ts +7 -0
- package/dist/esm/icons/BIK AI specific/AiRobot.d.ts +7 -0
- package/dist/esm/icons/BIK AI specific/Expand.d.ts +7 -0
- package/dist/esm/icons/BIK AI specific/Frame27202.d.ts +7 -0
- package/dist/esm/icons/BIK AI specific/Frame27389.d.ts +7 -0
- package/dist/esm/icons/BIK AI specific/Frame27597.d.ts +7 -0
- package/dist/esm/icons/BIK AI specific/Frame27598.d.ts +7 -0
- package/dist/esm/icons/BIK AI specific/Frame27599.d.ts +7 -0
- package/dist/esm/icons/BIK AI specific/PricePlease.d.ts +7 -0
- package/dist/esm/icons/BIK AI specific/Shape.d.ts +7 -0
- package/dist/esm/icons/BIK AI specific/Shorter.d.ts +7 -0
- package/dist/esm/icons/BIK AI specific/Sparkling2Line.d.ts +7 -0
- package/dist/esm/icons/BIK AI specific/Write.d.ts +7 -0
- package/dist/esm/icons/BIK AI specific/index.d.ts +13 -0
- package/dist/esm/icons/Informational/Common UI/Bell.d.ts +7 -0
- package/dist/esm/icons/Informational/Common UI/BellSync.d.ts +7 -0
- package/dist/esm/icons/Informational/Common UI/Bulb.d.ts +7 -0
- package/dist/esm/icons/Informational/Common UI/MenuHamburger.d.ts +7 -0
- package/dist/esm/icons/Informational/Common UI/MessageSearch.d.ts +7 -0
- package/dist/esm/icons/Informational/Common UI/MoreHorizontal.d.ts +7 -0
- package/dist/esm/icons/Informational/Common UI/MoreVertical.d.ts +7 -0
- package/dist/esm/icons/Informational/Common UI/Search.d.ts +7 -0
- package/dist/esm/icons/Informational/Common UI/Settings.d.ts +7 -0
- package/dist/esm/icons/Informational/Common UI/Training.d.ts +7 -0
- package/dist/esm/icons/Informational/Common UI/index.d.ts +10 -0
- package/dist/esm/icons/Informational/Communication/Chat.d.ts +7 -0
- package/dist/esm/icons/Informational/Communication/ChatCheck.d.ts +7 -0
- package/dist/esm/icons/Informational/Communication/ChatQuestion.d.ts +7 -0
- package/dist/esm/icons/Informational/Communication/ChatStar.d.ts +7 -0
- package/dist/esm/icons/Informational/Communication/Email.d.ts +7 -0
- package/dist/esm/icons/Informational/Communication/Headphone.d.ts +7 -0
- package/dist/esm/icons/Informational/Communication/LiveChat.d.ts +7 -0
- package/dist/esm/icons/Informational/Communication/Phone.d.ts +7 -0
- package/dist/esm/icons/Informational/Communication/index.d.ts +8 -0
- package/dist/esm/icons/Informational/Customer intent/ClipboardCheck.d.ts +7 -0
- package/dist/esm/icons/Informational/Customer intent/Experimental.d.ts +7 -0
- package/dist/esm/icons/Informational/Customer intent/Frame27202.d.ts +7 -0
- package/dist/esm/icons/Informational/Customer intent/Help.d.ts +7 -0
- package/dist/esm/icons/Informational/Customer intent/Percent.d.ts +7 -0
- package/dist/esm/icons/Informational/Customer intent/Purchase.d.ts +7 -0
- package/dist/esm/icons/Informational/Customer intent/Services.d.ts +7 -0
- package/dist/esm/icons/Informational/Customer intent/ShoppingCart.d.ts +7 -0
- package/dist/esm/icons/Informational/Customer intent/SingleChoice.d.ts +7 -0
- package/dist/esm/icons/Informational/Customer intent/Unsatisfactory.d.ts +7 -0
- package/dist/esm/icons/Informational/Customer intent/UserSound.d.ts +7 -0
- package/dist/esm/icons/Informational/Customer intent/index.d.ts +11 -0
- package/dist/esm/icons/Informational/Date and time/Calendar.d.ts +7 -0
- package/dist/esm/icons/Informational/Date and time/CalendarAdd.d.ts +7 -0
- package/dist/esm/icons/Informational/Date and time/Clock.d.ts +7 -0
- package/dist/esm/icons/Informational/Date and time/HourGlass.d.ts +7 -0
- package/dist/esm/icons/Informational/Date and time/WorkingHours.d.ts +7 -0
- package/dist/esm/icons/Informational/Date and time/index.d.ts +5 -0
- package/dist/esm/icons/Informational/Files and folders/Archive1.d.ts +7 -0
- package/dist/esm/icons/Informational/Files and folders/Excel.d.ts +7 -0
- package/dist/esm/icons/Informational/Files and folders/File.d.ts +7 -0
- package/dist/esm/icons/Informational/Files and folders/FileCsv.d.ts +7 -0
- package/dist/esm/icons/Informational/Files and folders/FilePage.d.ts +7 -0
- package/dist/esm/icons/Informational/Files and folders/FilePdf.d.ts +7 -0
- package/dist/esm/icons/Informational/Files and folders/Folder.d.ts +7 -0
- package/dist/esm/icons/Informational/Files and folders/MediaMessage.d.ts +7 -0
- package/dist/esm/icons/Informational/Files and folders/Move.d.ts +7 -0
- package/dist/esm/icons/Informational/Files and folders/OrderHistory.d.ts +7 -0
- package/dist/esm/icons/Informational/Files and folders/TextMessage.d.ts +7 -0
- package/dist/esm/icons/Informational/Files and folders/Unarchive.d.ts +7 -0
- package/dist/esm/icons/Informational/Files and folders/index.d.ts +12 -0
- package/dist/esm/icons/Informational/Finance/Bank.d.ts +7 -0
- package/dist/esm/icons/Informational/Finance/CashOnDelivery.d.ts +7 -0
- package/dist/esm/icons/Informational/Finance/ChartLine.d.ts +7 -0
- package/dist/esm/icons/Informational/Finance/CreditCard.d.ts +7 -0
- package/dist/esm/icons/Informational/Finance/Growth.d.ts +7 -0
- package/dist/esm/icons/Informational/Finance/Money1.d.ts +7 -0
- package/dist/esm/icons/Informational/Finance/NoCredits.d.ts +7 -0
- package/dist/esm/icons/Informational/Finance/Percent.d.ts +7 -0
- package/dist/esm/icons/Informational/Finance/Rupee.d.ts +7 -0
- package/dist/esm/icons/Informational/Finance/TablerTicket.d.ts +7 -0
- package/dist/esm/icons/Informational/Finance/Wallet.d.ts +7 -0
- package/dist/esm/icons/Informational/Finance/index.d.ts +11 -0
- package/dist/esm/icons/Informational/General/AlertTriangle.d.ts +7 -0
- package/dist/esm/icons/Informational/General/Check.d.ts +7 -0
- package/dist/esm/icons/Informational/General/CheckDouble.d.ts +7 -0
- package/dist/esm/icons/Informational/General/CloseTicket1.d.ts +7 -0
- package/dist/esm/icons/Informational/General/Error.d.ts +7 -0
- package/dist/esm/icons/Informational/General/FailDoc.d.ts +7 -0
- package/dist/esm/icons/Informational/General/Help.d.ts +7 -0
- package/dist/esm/icons/Informational/General/IcList.d.ts +7 -0
- package/dist/esm/icons/Informational/General/Info.d.ts +7 -0
- package/dist/esm/icons/Informational/General/NewTicket.d.ts +7 -0
- package/dist/esm/icons/Informational/General/RoundCheck.d.ts +7 -0
- package/dist/esm/icons/Informational/General/Slash.d.ts +7 -0
- package/dist/esm/icons/Informational/General/index.d.ts +12 -0
- package/dist/esm/icons/Informational/Identity/Chatbot.d.ts +7 -0
- package/dist/esm/icons/Informational/Identity/Contacts.d.ts +7 -0
- package/dist/esm/icons/Informational/Identity/Group.d.ts +7 -0
- package/dist/esm/icons/Informational/Identity/IdCard.d.ts +7 -0
- package/dist/esm/icons/Informational/Identity/Person.d.ts +7 -0
- package/dist/esm/icons/Informational/Identity/Robot.d.ts +7 -0
- package/dist/esm/icons/Informational/Identity/Union.d.ts +7 -0
- package/dist/esm/icons/Informational/Identity/Union1.d.ts +7 -0
- package/dist/esm/icons/Informational/Identity/UserMinus1.d.ts +7 -0
- package/dist/esm/icons/Informational/Identity/UserPlus.d.ts +7 -0
- package/dist/esm/icons/Informational/Identity/index.d.ts +10 -0
- package/dist/esm/icons/Informational/Location/Address.d.ts +7 -0
- package/dist/esm/icons/Informational/Location/LanguageChange.d.ts +7 -0
- package/dist/esm/icons/Informational/Location/MapPin.d.ts +7 -0
- package/dist/esm/icons/Informational/Location/Truck.d.ts +7 -0
- package/dist/esm/icons/Informational/Location/index.d.ts +4 -0
- package/dist/esm/icons/Informational/Store related/AllDocs.d.ts +7 -0
- package/dist/esm/icons/Informational/Store related/AllProduct.d.ts +7 -0
- package/dist/esm/icons/Informational/Store related/Clipboard.d.ts +7 -0
- package/dist/esm/icons/Informational/Store related/ClipboardCheck.d.ts +7 -0
- package/dist/esm/icons/Informational/Store related/CustomerReport.d.ts +7 -0
- package/dist/esm/icons/Informational/Store related/Head112.d.ts +7 -0
- package/dist/esm/icons/Informational/Store related/InventoryReport.d.ts +7 -0
- package/dist/esm/icons/Informational/Store related/OrderReport.d.ts +7 -0
- package/dist/esm/icons/Informational/Store related/PaymentReport.d.ts +7 -0
- package/dist/esm/icons/Informational/Store related/Store.d.ts +7 -0
- package/dist/esm/icons/Informational/Store related/StoreSync.d.ts +7 -0
- package/dist/esm/icons/Informational/Store related/index.d.ts +11 -0
- package/dist/esm/icons/Informational/eCommerce/AddLabel.d.ts +7 -0
- package/dist/esm/icons/Informational/eCommerce/Click.d.ts +7 -0
- package/dist/esm/icons/Informational/eCommerce/Filter.d.ts +7 -0
- package/dist/esm/icons/Informational/eCommerce/Gift1.d.ts +7 -0
- package/dist/esm/icons/Informational/eCommerce/GiftMinus.d.ts +7 -0
- package/dist/esm/icons/Informational/eCommerce/GiftPlus.d.ts +7 -0
- package/dist/esm/icons/Informational/eCommerce/Promocode.d.ts +7 -0
- package/dist/esm/icons/Informational/eCommerce/Receipt.d.ts +7 -0
- package/dist/esm/icons/Informational/eCommerce/ShieldCheck.d.ts +7 -0
- package/dist/esm/icons/Informational/eCommerce/ShoppingBag.d.ts +7 -0
- package/dist/esm/icons/Informational/eCommerce/ShoppingBasket.d.ts +7 -0
- package/dist/esm/icons/Informational/eCommerce/ShoppingCart.d.ts +7 -0
- package/dist/esm/icons/Informational/eCommerce/index.d.ts +12 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Categories/Box.d.ts +7 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Categories/Box2.d.ts +7 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Categories/index.d.ts +2 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Navigation/Journeys.d.ts +7 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Navigation/Services.d.ts +7 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Navigation/index.d.ts +2 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Plans/PlanUltimate.d.ts +7 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Plans/index.d.ts +1 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Services/Businesscard.d.ts +7 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Services/Customdomain.d.ts +7 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Services/Marketing.d.ts +7 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Services/PaymentLink.d.ts +7 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Services/Theme.d.ts +7 -0
- package/dist/esm/icons/Legacy - Bikayi specific/Services/index.d.ts +5 -0
- package/dist/esm/icons/Media/Audio/Microphone.d.ts +7 -0
- package/dist/esm/icons/Media/Audio/Pause.d.ts +7 -0
- package/dist/esm/icons/Media/Audio/Play.d.ts +7 -0
- package/dist/esm/icons/Media/Audio/Sleep.d.ts +7 -0
- package/dist/esm/icons/Media/Audio/VolumeMute.d.ts +7 -0
- package/dist/esm/icons/Media/Audio/VolumeOneline.d.ts +7 -0
- package/dist/esm/icons/Media/Audio/VolumeTwoline.d.ts +7 -0
- package/dist/esm/icons/Media/Audio/index.d.ts +7 -0
- package/dist/esm/icons/Media/Devices/Desktop.d.ts +7 -0
- package/dist/esm/icons/Media/Devices/Smartphone.d.ts +7 -0
- package/dist/esm/icons/Media/Devices/index.d.ts +2 -0
- package/dist/esm/icons/Media/Others/BarcodeScan.d.ts +7 -0
- package/dist/esm/icons/Media/Others/Download.d.ts +7 -0
- package/dist/esm/icons/Media/Others/EmojiSmile.d.ts +7 -0
- package/dist/esm/icons/Media/Others/Paperclip.d.ts +7 -0
- package/dist/esm/icons/Media/Others/Upload.d.ts +7 -0
- package/dist/esm/icons/Media/Others/index.d.ts +5 -0
- package/dist/esm/icons/Media/Visual/Camera.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/CameraAdd.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/Crop.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/FlashOff.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/FlashOn.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/Image.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/ImageAdd.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/Images.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/Maximize.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/RotateAnticlockwise.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/RotateClockwise.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/VideoCamcorder.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/VideoFilm.d.ts +7 -0
- package/dist/esm/icons/Media/Visual/index.d.ts +13 -0
- package/dist/esm/icons/Social/Channels /Email.d.ts +6 -0
- package/dist/esm/icons/Social/Channels /EmailMarketing.d.ts +6 -0
- package/dist/esm/icons/Social/Channels /Facebook.d.ts +6 -0
- package/dist/esm/icons/Social/Channels /FacebookComment.d.ts +6 -0
- package/dist/esm/icons/Social/Channels /Instagram.d.ts +6 -0
- package/dist/esm/icons/Social/Channels /InstagramIcon.d.ts +6 -0
- package/dist/esm/icons/Social/Channels /Messenger.d.ts +6 -0
- package/dist/esm/icons/Social/Channels /Tasks.d.ts +6 -0
- package/dist/esm/icons/Social/Channels /WebPush.d.ts +6 -0
- package/dist/esm/icons/Social/Channels /WhatsApp.d.ts +6 -0
- package/dist/esm/icons/Social/Channels /index.d.ts +10 -0
- package/dist/esm/icons/Social/Social/EmailMarketing.d.ts +7 -0
- package/dist/esm/icons/Social/Social/Facebook.d.ts +7 -0
- package/dist/esm/icons/Social/Social/Google.d.ts +7 -0
- package/dist/esm/icons/Social/Social/Instagram.d.ts +7 -0
- package/dist/esm/icons/Social/Social/Messenger.d.ts +7 -0
- package/dist/esm/icons/Social/Social/Rcs.d.ts +7 -0
- package/dist/esm/icons/Social/Social/Twitter.d.ts +7 -0
- package/dist/esm/icons/Social/Social/Website.d.ts +7 -0
- package/dist/esm/icons/Social/Social/Whatsapp.d.ts +7 -0
- package/dist/esm/icons/Social/Social/Youtube.d.ts +7 -0
- package/dist/esm/icons/Social/Social/index.d.ts +10 -0
- package/dist/esm/icons/Toggles/General/Eye.d.ts +7 -0
- package/dist/esm/icons/Toggles/General/EyeClosed.d.ts +7 -0
- package/dist/esm/icons/Toggles/General/EyeOff.d.ts +7 -0
- package/dist/esm/icons/Toggles/General/HeartEmpty.d.ts +7 -0
- package/dist/esm/icons/Toggles/General/HeartFilled.d.ts +7 -0
- package/dist/esm/icons/Toggles/General/Lock.d.ts +7 -0
- package/dist/esm/icons/Toggles/General/StarEmpty.d.ts +7 -0
- package/dist/esm/icons/Toggles/General/StarFilled.d.ts +7 -0
- package/dist/esm/icons/Toggles/General/StarHalf.d.ts +7 -0
- package/dist/esm/icons/Toggles/General/Unlock.d.ts +7 -0
- package/dist/esm/icons/Toggles/General/index.d.ts +10 -0
- package/dist/esm/icons/index.d.ts +56 -0
- package/dist/esm/icons/registry.d.ts +10 -0
- package/dist/esm/index.d.ts +0 -3
- package/dist/esm/index.js +1 -1
- package/package.json +19 -10
- package/dist/cjs/components/QueryBuilder/types/QueryBuilderEnum.type.d.ts +0 -21
- package/dist/cjs/components/QueryBuilder/types/QueryBuilderEnum.type.js +0 -1
- package/dist/cjs/components/accordion/Accordion.model.d.ts +0 -35
- package/dist/cjs/components/analytics-card/AnalyticsCard.model.d.ts +0 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsChip.model.d.ts +0 -18
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LazyCharts.d.ts +0 -2
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LazyCharts.js +0 -1
- package/dist/cjs/components/bik-layout/Sidebar.model.d.ts +0 -27
- package/dist/cjs/components/image-cropper/BikImageCropper.model.d.ts +0 -6
- package/dist/cjs/components/input/Input.model.d.ts +0 -73
- package/dist/cjs/components/list-item/List.model.d.ts +0 -18
- package/dist/cjs/components/sample-button/SampleButton.model.d.ts +0 -17
- package/dist/cjs/components/stepper/Stepper.model.d.ts +0 -17
- package/dist/cjs/components/template-context-mapper/modalElements/modal.d.ts +0 -13
- package/dist/cjs/firebase/environment.d.ts +0 -58
- package/dist/cjs/firebase/environment.js +0 -1
- package/dist/cjs/firebase/firebaseUserFetcher.d.ts +0 -34
- package/dist/cjs/firebase/firebaseUserFetcher.js +0 -1
- package/dist/cjs/firebase/index.d.ts +0 -7
- package/dist/cjs/firebase/lazyFirebaseApp.d.ts +0 -22
- package/dist/cjs/firebase/lazyFirebaseApp.js +0 -1
- package/dist/cjs/firebase/lazyFirebaseMethods.d.ts +0 -589
- package/dist/cjs/firebase/lazyFirebaseMethods.js +0 -1
- package/dist/cjs/firebase/lazyFirestore.d.ts +0 -6
- package/dist/cjs/firebase/lazyFirestore.js +0 -1
- package/dist/cjs/firebase/lazyFirestoreLite.d.ts +0 -6
- package/dist/cjs/firebase/lazyFirestoreLite.js +0 -1
- package/dist/cjs/firebase/lazyStorage.d.ts +0 -5
- package/dist/cjs/firebase/lazyStorage.js +0 -1
- package/dist/cjs/request-executor/executor.d.ts +0 -99
- package/dist/cjs/request-executor/executor.js +0 -1
- package/dist/cjs/request-executor/index.d.ts +0 -2
- package/dist/cjs/request-executor/model.d.ts +0 -14
- package/dist/cjs/utils/logging/ErrorConstructor/ApiError.d.ts +0 -3
- package/dist/cjs/utils/logging/ErrorConstructor/ApiError.js +0 -1
- package/dist/cjs/utils/logging/ErrorConstructor/BroadcastFlowError.d.ts +0 -4
- package/dist/cjs/utils/logging/ErrorConstructor/BroadcastFlowError.js +0 -1
- package/dist/cjs/utils/logging/ErrorConstructor/CohortError.d.ts +0 -4
- package/dist/cjs/utils/logging/ErrorConstructor/CohortError.js +0 -1
- package/dist/cjs/utils/logging/ErrorConstructor/CustomError.d.ts +0 -3
- package/dist/cjs/utils/logging/ErrorConstructor/CustomError.js +0 -1
- package/dist/cjs/utils/logging/ErrorConstructor/ExcelUploadError.d.ts +0 -3
- package/dist/cjs/utils/logging/ErrorConstructor/ExcelUploadError.js +0 -1
- package/dist/cjs/utils/logging/ErrorConstructor/FirebaseCallError.d.ts +0 -3
- package/dist/cjs/utils/logging/ErrorConstructor/FirebaseCallError.js +0 -1
- package/dist/cjs/utils/logging/ErrorConstructor/FirebaseSubscriptionError.d.ts +0 -3
- package/dist/cjs/utils/logging/ErrorConstructor/FirebaseSubscriptionError.js +0 -1
- package/dist/cjs/utils/logging/ErrorConstructor/RechargeFailure.d.ts +0 -3
- package/dist/cjs/utils/logging/ErrorConstructor/RechargeFailure.js +0 -1
- package/dist/cjs/utils/logging/ErrorConstructor/WhatsappIntegrationError.d.ts +0 -3
- package/dist/cjs/utils/logging/ErrorConstructor/WhatsappIntegrationError.js +0 -1
- package/dist/cjs/utils/logging/Logger.d.ts +0 -24
- package/dist/cjs/utils/logging/Logger.js +0 -1
- package/dist/cjs/utils/logging/index.d.ts +0 -10
- package/dist/esm/components/QueryBuilder/types/QueryBuilderEnum.type.d.ts +0 -21
- package/dist/esm/components/QueryBuilder/types/QueryBuilderEnum.type.js +0 -1
- package/dist/esm/components/accordion/Accordion.model.d.ts +0 -35
- package/dist/esm/components/analytics-card/AnalyticsCard.model.d.ts +0 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChip.model.d.ts +0 -18
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LazyCharts.d.ts +0 -2
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LazyCharts.js +0 -1
- package/dist/esm/components/bik-layout/Sidebar.model.d.ts +0 -27
- package/dist/esm/components/image-cropper/BikImageCropper.model.d.ts +0 -6
- package/dist/esm/components/input/Input.model.d.ts +0 -73
- package/dist/esm/components/list-item/List.model.d.ts +0 -18
- package/dist/esm/components/sample-button/SampleButton.model.d.ts +0 -17
- package/dist/esm/components/stepper/Stepper.model.d.ts +0 -17
- package/dist/esm/components/template-context-mapper/modalElements/modal.d.ts +0 -13
- package/dist/esm/firebase/environment.d.ts +0 -58
- package/dist/esm/firebase/environment.js +0 -1
- package/dist/esm/firebase/firebaseUserFetcher.d.ts +0 -34
- package/dist/esm/firebase/firebaseUserFetcher.js +0 -1
- package/dist/esm/firebase/index.d.ts +0 -7
- package/dist/esm/firebase/lazyFirebaseApp.d.ts +0 -22
- package/dist/esm/firebase/lazyFirebaseApp.js +0 -1
- package/dist/esm/firebase/lazyFirebaseMethods.d.ts +0 -589
- package/dist/esm/firebase/lazyFirebaseMethods.js +0 -1
- package/dist/esm/firebase/lazyFirestore.d.ts +0 -6
- package/dist/esm/firebase/lazyFirestore.js +0 -1
- package/dist/esm/firebase/lazyFirestoreLite.d.ts +0 -6
- package/dist/esm/firebase/lazyFirestoreLite.js +0 -1
- package/dist/esm/firebase/lazyStorage.d.ts +0 -5
- package/dist/esm/firebase/lazyStorage.js +0 -1
- package/dist/esm/request-executor/executor.d.ts +0 -99
- package/dist/esm/request-executor/executor.js +0 -1
- package/dist/esm/request-executor/index.d.ts +0 -2
- package/dist/esm/request-executor/model.d.ts +0 -14
- package/dist/esm/utils/logging/ErrorConstructor/ApiError.d.ts +0 -3
- package/dist/esm/utils/logging/ErrorConstructor/ApiError.js +0 -1
- package/dist/esm/utils/logging/ErrorConstructor/BroadcastFlowError.d.ts +0 -4
- package/dist/esm/utils/logging/ErrorConstructor/BroadcastFlowError.js +0 -1
- package/dist/esm/utils/logging/ErrorConstructor/CohortError.d.ts +0 -4
- package/dist/esm/utils/logging/ErrorConstructor/CohortError.js +0 -1
- package/dist/esm/utils/logging/ErrorConstructor/CustomError.d.ts +0 -3
- package/dist/esm/utils/logging/ErrorConstructor/CustomError.js +0 -1
- package/dist/esm/utils/logging/ErrorConstructor/ExcelUploadError.d.ts +0 -3
- package/dist/esm/utils/logging/ErrorConstructor/ExcelUploadError.js +0 -1
- package/dist/esm/utils/logging/ErrorConstructor/FirebaseCallError.d.ts +0 -3
- package/dist/esm/utils/logging/ErrorConstructor/FirebaseCallError.js +0 -1
- package/dist/esm/utils/logging/ErrorConstructor/FirebaseSubscriptionError.d.ts +0 -3
- package/dist/esm/utils/logging/ErrorConstructor/FirebaseSubscriptionError.js +0 -1
- package/dist/esm/utils/logging/ErrorConstructor/RechargeFailure.d.ts +0 -3
- package/dist/esm/utils/logging/ErrorConstructor/RechargeFailure.js +0 -1
- package/dist/esm/utils/logging/ErrorConstructor/WhatsappIntegrationError.d.ts +0 -3
- package/dist/esm/utils/logging/ErrorConstructor/WhatsappIntegrationError.js +0 -1
- package/dist/esm/utils/logging/Logger.d.ts +0 -24
- package/dist/esm/utils/logging/Logger.js +0 -1
- package/dist/esm/utils/logging/index.d.ts +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/arrow_back.svg.js"),i=require("../../../assets/icons/info.svg.js");require("../../curtain/CurtainHelper.js");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/arrow_back.svg.js"),i=require("../../../assets/icons/info.svg.js");require("../../curtain/CurtainHelper.js");var s=require("../../variable-picker-v3/model.js"),a=require("react"),r=require("../../button/Button.js"),o=require("../../image-cropper/BikImageCropper.js");require("../../image-compress/ImageCompress.js"),require("../../states/StateComponent.js"),require("../../../_virtual/_tslib.js"),require("../../../constants/zindex.js"),require("../../modals/styledModal.js");var l=require("../../spinner/Spinner.js"),n=require("../../input-with-vars/InputWithVariables.js");require("../../template-preview/TemplatePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js");var d=require("../../../constants/Theme.js"),p=require("../../template-preview/models/TemplateMeta.js"),c=require("../../template-preview/models/WhatsAppTemplate.js");require("../../template-preview/models/Channels.js");var u=require("../../TypographyStyle.js"),g=require("../../../utils/validator.js"),m=require("../../../assets/icons/file.svg.js"),j=require("../../../assets/icons/filePdf.svg.js"),h=require("../../../assets/icons/image.svg.js"),x=require("../../../assets/icons/upload.svg.js"),E=require("../context/templateModalContext.js"),v=require("../utils/validateIsUrl.js");exports.default=b=>{let{setOpenEditMedia:f,mediaComponentFormat:y,variableListForImage:T,openEditMedia:C,uploadMedia:M,fileRef:A,useEditWhatsappTemplateMediaResponse:q,skipAddVariable:I}=b;const{pod:D,setHideCrossButton:O,setHideFooterButton:S}=E.useTemplateModalContext(),[P,R]=a.useState(""),[w,k]=a.useState(void 0),[H,L]=a.useState(!1),[_,B]=a.useState("");let V;if(a.useEffect((()=>(S(!0),()=>{S(!1)})),[]),a.useEffect((()=>{const e=document.querySelector('[class*="ModalWrapper"]');e&&k(e)}),[q.loading]),V=y===p.HEADER_TYPES.IMAGE?"image/png, image/jpeg":y===p.HEADER_TYPES.VIDEO?"video/mp4":"application/pdf",!C)return e.jsx(e.Fragment,{});const U=()=>y===p.HEADER_TYPES.IMAGE?"Image":y===p.HEADER_TYPES.VIDEO?"Video":"Document";return e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{display:"flex",gap:"10px",alignItems:"center",marginBottom:"16px"}},{children:[e.jsx(t.default,{onClick:e=>{e.stopPropagation(),f(!1),R("")},style:{cursor:"pointer"},width:16,height:16}),e.jsx(u.TitleRegular,{children:"Update Media"})]})),e.jsxs("div",Object.assign({style:{position:"relative",padding:16,borderRadius:4,border:H?`1px dashed ${d.DEFAULT_THEME.colorsV2.stroke.negative.vibrant}`:`1px dashed ${d.DEFAULT_THEME.colorsV2.stroke.primary}`,backgroundColor:d.DEFAULT_THEME.colorsV2.surface.subdued,width:"100%",height:"100%",alignItems:"center",display:q.loading?"flex":"initial"}},{children:[e.jsxs("div",Object.assign({style:{marginBottom:24,display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",gap:16}},{children:[q.loading?e.jsx(l.PureSpinner,{width:"40px",height:"40px",color:d.COLORS.content.brand}):e.jsx("div",Object.assign({style:{height:64,width:64,borderRadius:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:d.DEFAULT_THEME.colorsV2.background.base}},{children:y===p.HEADER_TYPES.IMAGE?e.jsx(h.default,{width:40,height:40}):y===p.HEADER_TYPES.VIDEO?e.jsx(m.default,{width:40,height:40}):e.jsx(j.default,{width:40,height:40})})),e.jsx(u.TitleMedium,{children:q.loading?"Upload in progress...":y===p.HEADER_TYPES.IMAGE?"Upload an image":y===p.HEADER_TYPES.VIDEO?"Upload a video":"Upload a document"}),e.jsx(u.BodySecondary,Object.assign({color:d.COLORS.content.secondary},{children:q.loading?`Your ${y.toLowerCase()} is getting loaded. This may take a couple of minutes.`:y===p.HEADER_TYPES.IMAGE?"JPEG/ PNG format • Max 5MB":y===p.HEADER_TYPES.VIDEO?"MP4 format video • Max 16MB":"PDF format document • Max 100MB"}))]})),!q.loading&&e.jsxs(e.Fragment,{children:[e.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"6px"}},{children:e.jsx(n.InputWithVariables,{labelText:`${U()} URL`,onPickerToggle:e=>{O(!!e)},pickerType:s.PickerType.EMBEDDED,portalElement:null!=w?w:document.body,noMaxCharCheck:!0,allowMix:!1,onChange:e=>{B(e.actualValue),L(!1)},showVarHeader:!0,varHeaderText:"Select variable",errorMessage:P,prevVariable:{actualValue:"",variableType:"string"},variablesList:T,placeHolder:I?"Enter URL":"Enter URL/Add variable",showAddButton:D!==c.POD.CAMPAIGN||!I&&y===p.HEADER_TYPES.IMAGE})})),e.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"4px",marginBottom:"12px"}},{children:[e.jsx("hr",{style:{height:"2px",flex:.5,backgroundColor:"black"}}),e.jsx(u.BodyCaption,{children:"Or upload media from device"}),e.jsx("hr",{style:{height:"2px",flex:.5,backgroundColor:"black"}})]})),e.jsx("div",Object.assign({style:{display:"flex",width:"100%"}},{children:e.jsx(r.Button,{matchParentWidth:!0,buttonText:"Upload",buttonType:"dashBold",LeadingIcon:x.default,onClick:()=>{M(),L(!1)},size:"medium"})}))]}),H&&e.jsxs("div",Object.assign({style:{position:"absolute",display:"flex",alignItems:"center",bottom:-24,left:0,gap:4}},{children:[e.jsx(i.default,{width:16,height:16,color:d.COLORS.content.negative}),e.jsx(u.BodyCaption,Object.assign({style:{color:d.COLORS.content.negative}},{children:`Select ${U()}`}))]}))]})),!q.loading&&e.jsx("div",Object.assign({style:{display:"flex",justifyContent:"flex-end",marginTop:8}},{children:e.jsx(r.Button,{buttonText:`Add ${U()}`,onClick:()=>{_?g.validateURL(_)||v.isVariable(_)?(M(_),f(!1),R(""),L(!1)):R("Enter valid URL"):L(!0)}})})),e.jsx("input",{ref:A,style:{display:"none"},type:"file",onChange:q.handleImageUpload,accept:V}),!!q.selectedImage&&e.jsx(o.BikImageCropper,{aspectRatio:15/8,src:q.selectedImage,onCropComplete:q.onCropComplete,onCancel:()=>{q.setLoading(!1),q.setSelectedImage(""),A.current&&(A.current.value="")}})]})};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { WebpushTemplateType } from "../../template-preview/models/WebpushTemplate";
|
|
2
|
+
import { WhatsAppPickerMeta } from "../../template-preview/models/WhatsAppTemplate";
|
|
3
3
|
export interface EditWebpushTemplateV2Props {
|
|
4
4
|
whatsappSpecificPickerMeta?: WhatsAppPickerMeta;
|
|
5
5
|
template: WebpushTemplateType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("lodash
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("lodash"),a=require("react"),i=require("../../input/Input.js"),n=require("../../template-preview/models/Channels.js"),l=require("../../template-preview/models/TemplateMeta.js"),o=require("../context/templateModalContext.js"),s=require("../helpers/WebpushTemplateHelper.js"),d=require("../utils/getDataFromTemplateComponent.js"),r=require("./EditMediaModal.js"),p=require("./EditMediaV2.js"),u=require("./EditMediaV2.style.js"),c=require("./useEditWhtasappTemplateMedia.js"),m=require("./VariableConnectorsPanel.js"),h=require("./VariableConnectorWhatsApp.js"),b=require("./VariableEditorHeader.js"),g=require("./WhatsAppTemplateCardButtonV2.js");exports.default=f=>{let{template:M,onTemplateChange:E,whatsappSpecificPickerMeta:j,showVariableModal:C}=f;var T,x,v;const[V,L]=a.useState(null),[y,I]=a.useState(null),{variableList:w,disableEditVariable:O,originalVariableList:q,setOriginalVariableList:R}=o.useTemplateModalContext(),{processWebpushTemplate:A,isValidUrl:S}=s.default(),[k,B]=a.useState(null),[D,W]=a.useState(null),[H,P]=a.useState(null);a.useEffect((()=>{w&&A(M,w,q,O).then((e=>{let{templateVariableMapping:t,template:a,webpushBroadcastConfig:i}=e;L(t),null==R||R(t),null==E||E(Object.assign({},a)),I(i)}))}),[w,O]);const{descriptionComponents:F,bodyVariables:U,titleVariables:_}=a.useMemo((()=>{if(V&&y){const e=d.getAllDataFromWebpushTemplateComponent(y,V);return k||B(e.iconImage),D||W(e.bannerImage),H||P(e.redirectionLink),{descriptionComponents:e.descriptionComponents,bodyVariables:e.bodyVariables,titleVariables:e.titleVariables}}return{descriptionComponents:[],bodyVariables:[],titleVariables:[],iconImage:null,bannerImage:null}}),[V,y]),{uploadMediaLink:N,uploadMediaFiles:Y,validateMimeType:G}=j,$=a.useRef(null),K=c.useEditWhatsappTemplateMedia({uploadMediaLink:N,uploadMediaFiles:Y,updateTemplateImageUrl:e=>J(e,"icon"),validateMimeType:G,mediaComponent:k,fileRef:$}),z=c.useEditWhatsappTemplateMedia({uploadMediaLink:N,uploadMediaFiles:Y,updateTemplateImageUrl:e=>J(e,"image"),validateMimeType:G,mediaComponent:D,fileRef:$});function J(e,a){const i=Object.assign({},M),n=t.cloneDeep(i);"icon"===a?(n.webpushBroadcastConfig.icon=[e],B([e])):"image"===a&&(n.webpushBroadcastConfig.image=[e],W([e])),null==E||E(Object.assign({},n))}function Q(e,a,i){var n;const l=Object.assign({},M),o=t.cloneDeep(l),s="custom"===a&&"string"==typeof e,d=null===(n=null==o?void 0:o.webpushBroadcastConfig)||void 0===n?void 0:n.buttons;if(d&&d.length>0){d[i]=s?e:"string"!=typeof e?e.placeHolder:"";const t=Object.assign(Object.assign({},o.webpushBroadcastConfig),{buttons:d});o.webpushBroadcastConfig=t}null==E||E(o)}const X=K.openEditMedia?K:z.openEditMedia?z:null;if(X)return e.jsx(m.Container,Object.assign({style:{flexDirection:"column",width:400,maxHeight:460}},{children:e.jsx(r.default,{mediaComponentFormat:l.HEADER_TYPES.IMAGE,uploadMedia:X.uploadMedia,variableListForImage:[],useEditWhatsappTemplateMediaResponse:X,setOpenEditMedia:X.setOpenEditMedia,openEditMedia:X.openEditMedia,editIconRef:X.editIconRef,fileRef:$,skipAddVariable:!0})}));return e.jsxs(m.Container,Object.assign({style:{flexDirection:"column",width:400,maxHeight:460,minWidth:"auto"}},{children:[k&&k.length?e.jsx(u.EditTemplateMediaContainer,{children:e.jsx(p.default,{imageName:k,handleImageChange:K.handleImageChange,mediaType:l.HEADER_TYPES.IMAGE,error:K.error,isLoading:K.loading,setOpenEditMedia:K.setOpenEditMedia})}):null,D&&D.length?e.jsx(u.EditTemplateMediaContainer,{children:e.jsx(p.default,{imageName:D,handleImageChange:z.handleImageChange,mediaType:l.HEADER_TYPES.IMAGE,error:z.error,isLoading:z.loading,setOpenEditMedia:z.setOpenEditMedia})}):null,(null==U?void 0:U.length)||(null==_?void 0:_.length)?e.jsx(b.default,{containerStyle:{paddingTop:8},headerText:"Edit variable values",subText:"Edit values for the variables used in template",toolTipInfo:"Variables are placeholder texts which can either be filled through data or custom texts. These can be edited through the dropdowns below"}):null,null==F?void 0:F.map(((t,a)=>e.jsx(h.default,{originalVariableList:V,originalList:q,channel:n.CHANNEL_TYPE.WEBPUSH,type:t.type,descriptionComponent:t.component,showVariableModal:C},a))),H&&H.length?e.jsx("div",Object.assign({style:{padding:"16px 14px"}},{children:e.jsx(i.Input,{labelText:"Redirection Link",id:"redirection-link",value:H[0].replace("https://",""),errorMessage:S(H[0])?"":"Please enter a valid URL",maxCharLimit:2e3,noKeyDownChange:!0,state:O?"disabled":"none",prefixText:"https://",placeholder:"Enter custom URL here",onChangeText:e=>{!function(e){var a;const i=`https://${e}`;P([i]);const n=t.cloneDeep(M);(null===(a=n.webpushBroadcastConfig)||void 0===a?void 0:a.redirectionLink)&&(n.webpushBroadcastConfig.redirectionLink=[i]),null==E||E(Object.assign({},n))}(e)}})})):e.jsx(e.Fragment,{}),(null===(x=null===(T=null==V?void 0:V.buttons)||void 0===T?void 0:T.filter((e=>"URL"===e.type)))||void 0===x?void 0:x.length)>0&&e.jsx(b.default,{headerText:"Edit buttons",subText:"Edit the link connected to the CTA button"}),null===(v=null==V?void 0:V.buttons)||void 0===v?void 0:v.map(((t,a)=>e.jsx(g.default,{variableListIndex:a,CTAoptions:null==j?void 0:j.CTAoptions,button:t,currentVariableList:V,updateSelectedURLTemplateBtn:Q},`${a}`)))]}))};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { VariableListInterfaceV2 } from "../../add-variableV2";
|
|
2
|
+
import { WhatsAppPickerMeta } from "../../template-preview";
|
|
3
|
+
import { WhatsAppCarouselTemplate } from "../../template-preview/models/WhatsappCarouselTemplate";
|
|
4
4
|
export interface EditWhatsAppCarouselTemplateV2Props {
|
|
5
5
|
whatsappSpecificPickerMeta?: WhatsAppPickerMeta;
|
|
6
6
|
template: WhatsAppCarouselTemplate;
|
|
@@ -9,5 +9,16 @@ export interface EditWhatsAppCarouselTemplateV2Props {
|
|
|
9
9
|
discountCode?: string;
|
|
10
10
|
setDiscountCode?: (code: string) => void;
|
|
11
11
|
}
|
|
12
|
+
export interface CarouselProduct {
|
|
13
|
+
name: string;
|
|
14
|
+
image: string;
|
|
15
|
+
quantity: number;
|
|
16
|
+
variantId: string;
|
|
17
|
+
productId: string;
|
|
18
|
+
displayOrder: number;
|
|
19
|
+
collectionId: string;
|
|
20
|
+
productName: string;
|
|
21
|
+
productImage: string;
|
|
22
|
+
}
|
|
12
23
|
declare const EditWhatsAppCarouselTemplateV2: ({ template, whatsappSpecificPickerMeta, showVariableModal, variableListForImage, discountCode, setDiscountCode, }: EditWhatsAppCarouselTemplateV2Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
24
|
export default EditWhatsAppCarouselTemplateV2;
|
package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@bikdotai/bik-models/growth/models/bik-store"),l=require("../../../assets/icons/arrow_back.svg.js"),n=require("../../../assets/icons/chevronLeft.svg.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@bikdotai/bik-models/growth/models/bik-store"),l=require("../../../assets/icons/arrow_back.svg.js"),n=require("../../../assets/icons/chevronLeft.svg.js"),i=require("../../../assets/icons/chevronRight.svg.js"),o=require("../../../assets/icons/PlusIcon.js"),r=require("lodash"),a=require("react"),s=require("../../button/Button.js"),d=require("../../icon-button/IconButton.js"),c=require("../../product-picker-v2/modal.js"),u=require("../../product-picker-v2/type.js"),p=require("../Badge/index.js"),v=require("../context/templateModalContext.js"),h=require("./EditWhatsAppTemplateV2.js"),m=require("./ProductBox.js");require("../../template-preview/TemplatePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js");var g=require("../../../constants/Theme.js");require("../../curtain/CurtainHelper.js"),require("../../variable-picker-v3/model.js"),require("../../template-preview/models/TemplateMeta.js");var y=require("../../template-preview/models/WhatsAppTemplate.js");require("../../template-preview/models/Channels.js");var x=require("../../template-preview/helpers/templateMiscHelper.js"),j=require("../../TypographyStyle.js");exports.default=f=>{let{template:b,whatsappSpecificPickerMeta:C,showVariableModal:O,variableListForImage:I,discountCode:S,setDiscountCode:k}=f;var q,w,P,T,B,L,R,E;const{selectedCarouselIndex:M,setTemplate:A,pickerConf:D,isProductCarouselType:F,pod:V,cardCount:W,carouselProducts:N,setCarouselProducts:$,isError:_,cardImages:z,disableEditVariable:G,onDeleteSelectedProducts:H,setSelectedCarouselIndex:K,setVariableCallback:J,setShowVariablePicker:Q,sliderRef:U}=v.useTemplateModalContext(),[X,Y]=a.useState(x.isRCSChannel(null==b?void 0:b.channel)?"Carousel Cards":-1==M?"First Message (Step 1/2)":F?"Product Carousel "+((null===(w=null===(q=null==b?void 0:b.mapping)||void 0===q?void 0:q.body)||void 0===w?void 0:w.length)?"(Step 2/2)":""):"Carousel Cards "+((null===(T=null===(P=null==b?void 0:b.mapping)||void 0===P?void 0:P.body)||void 0===T?void 0:T.length)?"(Step 2/2)":"")),[Z,ee]=a.useState(!1),[te,le]=a.useState(!1),ne=M===(null!=W?W:-1)-1,ie=(null!=M?M:-1)<1;a.useEffect((()=>{var e,t,l,n;Y(x.isRCSChannel(null==b?void 0:b.channel)?"Carousel Cards":-1==M?"First Message (Step 1/2)":F?"Product Carousel "+((null===(t=null===(e=null==b?void 0:b.mapping)||void 0===e?void 0:e.body)||void 0===t?void 0:t.length)?"(Step 2/2)":""):"Carousel Cards "+((null===(n=null===(l=null==b?void 0:b.mapping)||void 0===l?void 0:l.body)||void 0===n?void 0:n.length)?"(Step 2/2)":""))}),[M]),a.useEffect((()=>{Q(!1)}),[M]);const oe=e=>{null==$||$([{name:"variable",productName:e.actualValue}])};return a.useEffect((()=>{-1===M&&x.isRCSChannel(null==b?void 0:b.channel)&&(null==K||K(0))}),[M,null==b?void 0:b.channel]),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"16px"}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",alignItems:"center"}},{children:[!x.isRCSChannel(null==b?void 0:b.channel)&&null!=M&&M>=0&&!!(null===(L=null===(B=null==b?void 0:b.mapping)||void 0===B?void 0:B.body)||void 0===L?void 0:L.length)&&e.jsx(d.IconButton,{Icon:l.default,onClick:()=>{null==K||K(-1)}}),e.jsx(j.TitleMedium,Object.assign({style:{marginLeft:10}},{children:X}))]})),F&&(null!==(R=null==N?void 0:N.length)&&void 0!==R?R:0)>0&&null!=M&&M>=0&&e.jsxs("div",Object.assign({style:{display:"flex",rowGap:8,marginBottom:16,marginLeft:10,marginRight:10,flexDirection:"column"}},{children:[e.jsx(m.ProductBox,{editItem:()=>{1===(null==N?void 0:N.length)&&"variable"===N[0].name?(J((()=>oe)),Q(!0)):ee(!Z)},cardBody:1===(null==N?void 0:N.length)&&"variable"===N[0].name?`${N[0].productName}`:`${null==N?void 0:N.length} Products Selected`,hideIcon:1===(null==N?void 0:N.length)&&"variable"===N[0].name,deleteItem:()=>{var e;if(1===(null==N?void 0:N.length)&&"variable"===N[0].name)return void(null==$||$([]));const t=r.cloneDeep(Object.assign({},b));t&&(z&&z.length>0?null==z||z.forEach(((e,l)=>{var n;t.components[1].cards[l].components[0].example.header_handle=[null!==(n=z[l])&&void 0!==n?n:"https://res.cloudinary.com/drqhot9ot/image/upload/v1708753454/fake-product.png"]})):null===(e=null==t?void 0:t.components[1].cards)||void 0===e||e.forEach(((e,l)=>{t.components[1].cards[l].components[0].example.header_handle=["https://res.cloudinary.com/drqhot9ot/image/upload/v1708753454/fake-product.png"]})),null==A||A(t)),null==$||$([]),null==H||H()}}),N&&(null==N?void 0:N.length)>0&&"variable"!=N[0].name&&e.jsx(s.Button,{disabled:(null!==(E=null==N?void 0:N.length)&&void 0!==E?E:0)<=1,style:{alignSelf:"flex-end"},onClick:()=>{le(!0),ee(!0)},buttonText:"Rearrange Products",buttonType:"tertiary"})]})),!G&&F&&0===(null==N?void 0:N.length)&&null!=M&&M>=0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{marginLeft:12}},{children:[e.jsx(j.TitleRegular,{children:"Product(s)"}),e.jsx(j.BodySecondary,{children:`Select ${null!=W?W:1} products`})]})),e.jsxs("div",Object.assign({style:{marginTop:16,marginBottom:16,marginLeft:_?16:12,marginRight:_?16:12,flexDirection:"column",display:"flex",alignItems:"center"}},{children:[e.jsx(s.Button,{matchParentWidth:!0,style:{flex:1,display:"flex",width:"100%",marginBottom:12,border:_?`2px dashed ${g.COLORS.content.negative}`:void 0},size:"medium",buttonText:"Add Product(s)",buttonType:_?"tertiaryGray":"dashBold",LeadingIcon:()=>e.jsx("div",Object.assign({style:{display:"flex",width:18,height:18}},{children:e.jsx(o.default,{width:18,height:18,color:g.COLORS.content.secondary})})),onClick:e=>{ee(!0)}}),V===y.POD.CHATBOT&&e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{display:"flex",flex:1,alignItems:"center",justifyContent:"space-between",flexDirection:"row",width:"100%"}},{children:[e.jsx("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginRight:8,flex:1}}),e.jsx(j.BodyCaption,Object.assign({style:{color:"#616161",overflow:"unset"}},{children:"OR"})),e.jsx("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginLeft:8,flex:1}})]})),e.jsx(s.Button,{matchParentWidth:!0,style:{flex:1,display:"flex",marginTop:12,width:"100%",border:_?`2px dashed ${g.COLORS.content.negative}`:void 0},size:"medium",buttonText:"Add Product(s) Variable",buttonType:_?"tertiaryGray":"dashBold",LeadingIcon:()=>e.jsx("div",Object.assign({style:{display:"flex"}},{children:e.jsx(o.default,{width:18,height:18,color:g.COLORS.content.secondary})})),onClick:e=>{J((()=>oe)),Q(!0)}})]})]})),_&&e.jsx("div",Object.assign({style:{marginLeft:10,marginBottom:16}},{children:e.jsx(p.Badge,{padding:"8px",errorText:"Please add products"})}))]}),!F&&(null!=M?M:-1)>-1&&e.jsxs("div",Object.assign({style:{display:"flex",background:g.COLORS.surface.hovered,alignItems:"center"}},{children:[e.jsx(d.IconButton,{Icon:n.default,disabled:ie,width:8,height:14,svgStyle:ie?{}:{color:g.COLORS.content.secondary},onClick:()=>{var e;null===(e=null==U?void 0:U.current)||void 0===e||e.slickPrev(),(null!=M?M:-1)<1||null==K||K((e=>e-1))}}),e.jsx(j.TitleRegular,Object.assign({style:{flex:1,display:"flex",justifyContent:"center"},color:g.COLORS.content.secondary},{children:`Card ${(null!=M?M:0)+1}/${W}`})),e.jsx(d.IconButton,{Icon:i.default,width:8,height:14,disabled:ne,svgStyle:ne?{}:{color:g.COLORS.content.secondary},onClick:()=>{var e;null===(e=null==U?void 0:U.current)||void 0===e||e.slickNext(),(null!=M?M:-1)>=(null!=W?W:-1)-1||null==K||K((e=>e+1))}})]})),e.jsx(h.default,{whatsappSpecificPickerMeta:C,template:b,onTemplateChange:e=>{null==A||A(e)},showVariableModal:O,variableListForImage:I,discountCode:S,setDiscountCode:k}),Z&&D&&e.jsx(c.ProductPickerModal,{zIndex:200,startupScreen:te?u.ScreenName.RearrangeProducts:u.ScreenName.Collections,rearrangeEnabled:!0,storeId:D.storeId,selectedItems:(e=>{if(e.length>0){const t={};for(const l of e){const e=null==l?void 0:l.collectionId,n=l.productId,i=l.variantId;e in t||(t[e]={products:{},name:"",image:"",isSmartCollection:!1}),n in t[e].products||(t[e].products[n]={variants:{},name:(null==l?void 0:l.productName)||"",image:(null==l?void 0:l.productImage)||""}),t[e].products[n].variants[i]={name:(null==l?void 0:l.name)||"",price:"",image:(null==l?void 0:l.image)||"",quantity:l.quantity||0,displayOrder:l.displayOrder}}return t}return{}})(null!=N?N:[]),collectionFetcher:D.fetchCollections,productFetcher:D.fetchProducts,onAdd:(e,t)=>{var l,n,i,o,a,s;le(!1);const d=[];delete e.isCustom;for(const t of Object.keys(e)){const r=e[t].products;if(void 0!==r&&Object.keys(r).length)for(const e of Object.keys(r)){const c=r[e].variants;if(void 0!==c&&Object.keys(c).length)for(const u of Object.keys(c)){const{name:p,image:v,quantity:h,displayOrder:m}=c[u],g={name:p,image:null!==(n=null!=v?v:null===(l=r[e])||void 0===l?void 0:l.image)&&void 0!==n?n:"",quantity:h,variantId:u,productId:e,displayOrder:m,collectionId:t,productName:null!==(o=null===(i=r[e])||void 0===i?void 0:i.name)&&void 0!==o?o:"",productImage:null!==(s=null===(a=r[e])||void 0===a?void 0:a.image)&&void 0!==s?s:""};d.push(g)}}}const c=d.sort(((e,t)=>e.displayOrder-t.displayOrder)),u=d.map((e=>e.image)),p=r.cloneDeep(Object.assign({},b));p&&(u.forEach(((e,t)=>{var l;p.components[1].cards[t].components[0].example.header_handle=e?[e]:[null!==(l=null==z?void 0:z[t])&&void 0!==l?l:""]})),null==A||A(p)),null==$||$(c),ee(!1)},searchInCollectionFetcher:D.searchInCollection,searchFetcher:D.searchProducts,visible:Z,onClose:()=>{ee(!1)},exactLimit:null!=W?W:1,appType:D.appType||t.ApplicationType.BIK})]}))};
|
package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { VariableListInterfaceV2 } from "../../add-variableV2/AddVariableV2";
|
|
2
|
+
import { EmailTemplateType } from "../../template-preview/models/EmailTemplate";
|
|
3
|
+
import { SMSTemplateType } from "../../template-preview/models/SmsTemplate";
|
|
4
|
+
import { WhatsAppCarouselTemplate } from "../../template-preview/models/WhatsappCarouselTemplate";
|
|
5
|
+
import { WhatsAppPickerMeta, WhatsAppTemplate } from "../../template-preview/models/WhatsAppTemplate";
|
|
6
6
|
export interface EditWhatsAppTemplateV2Props {
|
|
7
7
|
whatsappSpecificPickerMeta?: WhatsAppPickerMeta;
|
|
8
8
|
template: WhatsAppTemplate | WhatsAppCarouselTemplate;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("../../curtain/CurtainHelper.js");var n=require("../../variable-picker-v3/model.js"),t=require("lodash
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("../../curtain/CurtainHelper.js");var n=require("../../variable-picker-v3/model.js"),t=require("lodash"),o=require("react"),i=require("styled-components"),l=require("../../input/Input.js"),a=require("../../input-with-vars/InputWithVariables.js"),s=require("../../template-preview/helpers/templateMiscHelper.js"),d=require("../../template-preview/models/TemplateMeta.js"),r=require("../../template-preview/models/WhatsAppTemplate.js"),u=require("../context/templateModalContext.js"),p=require("../utils/constants.js"),c=require("../utils/getDataFromTemplateComponent.js"),v=require("../utils/validateIsUrl.js"),m=require("../utils/validateName.js"),b=require("./BackTrackComponent.js"),g=require("./DiscountCodeComponent.js"),h=require("./EditMediaModal.js"),f=require("./EditMediaV2.js"),j=require("./EditMediaV2.style.js"),C=require("./useEditWhtasappTemplateMedia.js"),x=require("./VariableConnector.js"),T=require("./VariableConnectorsPanel.js"),O=require("./VariableConnectorWhatsApp.js"),E=require("./VariableEditorHeader.js"),y=require("./WhatsAppTemplateCardButtonV2.js");function V(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const B=V(i).default.div`
|
|
2
2
|
padding-top: 24px;
|
|
3
3
|
padding-left: 10px;
|
|
4
4
|
padding-right: 10px;
|
|
5
5
|
margin-bottom: 8px;
|
|
6
6
|
line-height: normal;
|
|
7
|
-
`;exports.default=t=>{let{template:i,onTemplateChange:V,whatsappSpecificPickerMeta:k,showVariableModal:I,variableListForImage:R,setDiscountCode:q,fileName:D,setFileName:P}=t;var L,U,A,w,N,S,_,H,F,Q,Y,W,K,$,G,X,z,J,Z,ee,ne,te,oe,ie,le,ae,se,de,re,ue,pe,ce,ve,me,be,ge,he,fe,je;const Ce=i.isCarouselType,{originalVariableList:xe,pod:Te,extras:Oe,selectedCarouselIndex:Ee,isProductCarouselType:ye,disableCopyCode:Ve,isError:Be,cardIndex:Me}=u.useTemplateModalContext(),{descriptionComponents:ke,urlBtns:Ie,qrbBtns:Re,imageComponent:qe,bodyVariables:De,headerVariables:Pe,titleVariables:Le}=c.getAllDataFromTemplateComponent(i),Ue=o.useRef(null),[Ae,we]=o.useState(!1),[Ne,Se]=o.useState(-1===Ee?{descriptionComponents:ke,urlBtns:Ie,qrbBtns:Re,imageComponent:qe,bodyVariables:De,headerVariables:Pe,titleVariables:Le}:{}),{uploadMediaLink:_e,uploadMediaFiles:He,validateMimeType:Fe}=k,Qe=C.useEditWhatsappTemplateMedia({uploadMediaLink:_e,uploadMediaFiles:He,updateTemplateImageUrl:function(e,n){var t,o,l,a,s,d,r,u;let p;p=null!=Ee&&Ee>-1?{components:null===(o=null===(t=i.components[Me])||void 0===t?void 0:t.cards)||void 0===o?void 0:o[Ee].components,mapping:null===(a=null===(l=null==i?void 0:i.mapping)||void 0===l?void 0:l.cards)||void 0===a?void 0:a[Ee]}:Object.assign({},i);const c=null===(s=null==p?void 0:p.components)||void 0===s?void 0:s.findIndex((e=>{if("HEADER"===e.type&&"NONE"!==e.format&&"TEXT"!==e.format)return!0}));if(void 0!==c&&c>-1&&(null==p?void 0:p.components[c])){const t=Object.assign(Object.assign({},p.components[c]),{format:n,example:{header_handle:[e]}}),o=[...p.components];o[c]=t,p=Object.assign(Object.assign({},p),{components:o})}p.mapping&&(p.mapping=Object.assign(Object.assign({},p.mapping),{header:void 0}));if(null!=Ee&&Ee>-1){const e=B.default(i);e.components[Me].cards[Ee].components=p.components,(null===(d=null==e?void 0:e.mapping)||void 0===d?void 0:d.cards)&&(null===(r=null==e?void 0:e.mapping)||void 0===r?void 0:r.cards.length)>0&&(e.mapping.cards[Ee]=null!==(u=p.mapping)&&void 0!==u?u:{}),null==V||V(Object.assign({},e)),We(!0)}else null==V||V(Object.assign({},p))},validateMimeType:Fe,mediaComponent:Ce?Ne.imageComponent:qe,fileRef:Ue}),[Ye,We]=o.useState(!1),[Ke,$e]=o.useState(D),[Ge,Xe]=o.useState();function ze(e,n,t){var o,l,a,d,r,u,p,c,v,m;const b=null!=Ee&&Ee>-1?{components:null===(o=Object.assign({},i).components[Me].cards)||void 0===o?void 0:o[Ee].components,mapping:null===(l=Object.assign({},i).mapping.cards)||void 0===l?void 0:l[Ee]}:Object.assign({},i),g=B.default(b),h="custom"===n&&"string"==typeof e,f=h?e:"string"!=typeof e?e.defaultValue?e.defaultValue:"https://d.bik.ai/":"https://d.bik.ai";if(null!=Ee&&Ee>-1&&ye){const n=Object.assign({},i).components.map((e=>{var n;return s.isCarouselComponent(e.type)?Object.assign(Object.assign({},e),{cards:null===(n=e.cards)||void 0===n?void 0:n.map((e=>Object.assign(Object.assign({},e),{components:e.components.map((e=>{var n,o,i;if("BUTTONS"===e.type){const l=null===(n=e.buttons)||void 0===n?void 0:n.filter((e=>"URL"===e.type));let a=null!==(o=null==l?void 0:l[t])&&void 0!==o?o:{};a=Object.assign(Object.assign({},a),{url:"https://d.bik.ai/{{1}}",example:[f]});const s=null===(i=e.buttons)||void 0===i?void 0:i.map((e=>"URL"===e.type&&(null==e?void 0:e.text)===(null==a?void 0:a.text)?a:e));return Object.assign(Object.assign({},e),{buttons:s})}return e}))})))}):e})),o=null===(d=null===(a=Object.assign({},i).mapping)||void 0===a?void 0:a.cards)||void 0===d?void 0:d.map((n=>{var o;return Object.assign(Object.assign({},n),{buttons:null===(o=null==n?void 0:n.buttons)||void 0===o?void 0:o.map(((n,o)=>o===t?h?"((customBtnPlaceholder))":"string"!=typeof e?e.placeHolder:"":n))})})),l=B.default(i);return l.components=n,l.mapping.cards=o,void(null==V||V(Object.assign({},l)))}const j=null==g?void 0:g.components.findIndex((e=>"BUTTONS"===e.type));if(void 0!==j&&j>-1){const o=null===(r=null==g?void 0:g.components[j].buttons)||void 0===r?void 0:r.filter((e=>"URL"===e.type));if((null==o?void 0:o.length)>0){const i="custom"===n&&"string"==typeof e,l=i?e:"string"!=typeof e&&e.defaultValue?e.defaultValue:"https://d.bik.ai/";let a=o[t];a=Object.assign(Object.assign({},a),{url:"https://d.bik.ai/{{1}}",example:[l]});const s=[...null!==(c=null===(p=null===(u=g.components)||void 0===u?void 0:u[j])||void 0===p?void 0:p.buttons)&&void 0!==c?c:[]].map((e=>"URL"===e.type&&(null==e?void 0:e.text)===(null==a?void 0:a.text)?a:e)),d=Object.assign(Object.assign({},g.components[j]),{buttons:s}),r=null===(v=g.mapping)||void 0===v?void 0:v.buttons;r&&r.length>0&&(r[t]=i?"((customBtnPlaceholder))":"string"!=typeof e?e.placeHolder:"");const m=Object.assign(Object.assign({},g.mapping),{buttons:r});g.mapping=m;const b=[...g.components];b[j]=d,g.components=b}}if("string"!=typeof e){"checkout.checkoutUrl"===(null===(m=e.placeHolder)||void 0===m?void 0:m.slice(2,-2))?we(!0):(we(!1),null==q||q(""))}if(null!=Ee&&Ee>-1){const e=B.default(i);e.components[Me].cards[Ee].components=g.components,e.mapping.cards[Ee]=g.mapping,null==V||V(Object.assign({},e))}else null==V||V(g)}function Je(e,n,t){var o,l,a,d,r,u,p;const c=null!=Ee&&Ee>-1?{components:null===(o=Object.assign({},i).components[Me].cards)||void 0===o?void 0:o[Ee].components,mapping:null===(l=Object.assign({},i).mapping.cards)||void 0===l?void 0:l[Ee]}:Object.assign({},i);if(null!=Ee&&Ee>-1&&ye){const n=Object.assign({},i).components.map((n=>{var o;return s.isCarouselComponent(n.type)?Object.assign(Object.assign({},n),{cards:null===(o=n.cards)||void 0===o?void 0:o.map((n=>Object.assign(Object.assign({},n),{components:n.components.map((n=>{var o,i,l;if("BUTTONS"===n.type){const a=null===(o=null==n?void 0:n.buttons)||void 0===o?void 0:o.filter((e=>"QUICK_REPLY"===e.type));let s=null!==(i=null==a?void 0:a[t])&&void 0!==i?i:{};s=Object.assign(Object.assign({},s),{flowId:e.flowId,flowName:e.flowName});const d=null===(l=null==n?void 0:n.buttons)||void 0===l?void 0:l.map((e=>"QUICK_REPLY"===e.type&&(null==e?void 0:e.text)===(null==s?void 0:s.text)?s:e));return Object.assign(Object.assign({},n),{buttons:d})}return n}))})))}):n})),o=B.default(i);return o.components=n,void(null==V||V(Object.assign({},o)))}const v=null==c?void 0:c.components.findIndex((e=>"BUTTONS"===e.type));if(void 0!==v&&v>-1){const n=null===(d=null===(a=null==c?void 0:c.components[v])||void 0===a?void 0:a.buttons)||void 0===d?void 0:d.filter((e=>"QUICK_REPLY"===e.type));if(n){let o=n[t];o=Object.assign(Object.assign({},o),{flowId:e.flowId,flowName:e.flowName});const i=[...null!==(p=null===(u=null===(r=c.components)||void 0===r?void 0:r[v])||void 0===u?void 0:u.buttons)&&void 0!==p?p:[]].map((e=>"QUICK_REPLY"===e.type&&(null==e?void 0:e.text)===(null==o?void 0:o.text)?o:e)),l=Object.assign(Object.assign({},c.components[v]),{buttons:i}),a=[...c.components];a[v]=l,c.components=a}}if(null!=Ee&&Ee>-1){const e=B.default(i);e.components[Me].cards[Ee].components=c.components,null==V||V(Object.assign({},e))}else null==V||V(c)}o.useEffect((()=>{var e,n;if(null===(e=i.mapping.buttons)||void 0===e?void 0:e.find((e=>"checkout.checkoutUrl"===e.slice(2,-2))))we(!0);else{we(!1);const e=null===(n=null==Oe?void 0:Oe.discountCodeExtra)||void 0===n?void 0:n[1];null==e||e("")}}),[i]),o.useEffect((()=>{var e,n,t,o;if(null!=Ee&&Ee>-1){const l={components:null===(n=null===(e=i.components[Me])||void 0===e?void 0:e.cards)||void 0===n?void 0:n[Ee].components,mapping:null===(o=null===(t=null==i?void 0:i.mapping)||void 0===t?void 0:t.cards)||void 0===o?void 0:o[Ee]},{descriptionComponents:a,urlBtns:s,qrbBtns:d,imageComponent:r,bodyVariables:u,headerVariables:p,titleVariables:v}=c.getAllDataFromTemplateComponent(l);Se({descriptionComponents:a,urlBtns:s,qrbBtns:d,imageComponent:r,bodyVariables:u,headerVariables:p,titleVariables:v})}else if(null!=Ee&&-1===Ee){const{descriptionComponents:e,urlBtns:n,qrbBtns:t,imageComponent:o,bodyVariables:l,headerVariables:a,titleVariables:s}=c.getAllDataFromTemplateComponent(i);Se({descriptionComponents:e,urlBtns:n,qrbBtns:t,imageComponent:o,bodyVariables:l,headerVariables:a,titleVariables:s})}}),[Ee]),o.useEffect((()=>{var e,n,t,o;if(null!=Ee&&Ee>-1&&Ye){const l={components:null===(n=null===(e=i.components[Me])||void 0===e?void 0:e.cards)||void 0===n?void 0:n[Ee].components,mapping:null===(o=null===(t=null==i?void 0:i.mapping)||void 0===t?void 0:t.cards)||void 0===o?void 0:o[Ee]},{descriptionComponents:a,urlBtns:s,qrbBtns:d,imageComponent:r,bodyVariables:u,headerVariables:p,titleVariables:v}=c.getAllDataFromTemplateComponent(l);Se({descriptionComponents:a,urlBtns:s,qrbBtns:d,imageComponent:r,bodyVariables:u,headerVariables:p,titleVariables:v}),We(!1)}}),[Ye]);o.useEffect((()=>{Be&&Te===r.POD.CHATBOT&&(()=>{if(!D)return void Xe("PDF name is Required");const e=m.validateInputNameChatbot(D);null==P||P(null!=D?D:""),Xe(e?"Please enter a valid PDF name":void 0)})()}),[Be]);const Ze=Ce?Ne.imageComponent:qe;return Qe.openEditMedia?e.jsx(T.Container,Object.assign({style:{flexDirection:"column",width:400,maxHeight:460}},{children:e.jsx(h.default,{mediaComponentFormat:null!==(L=Ze.format)&&void 0!==L?L:d.HEADER_TYPES.IMAGE,uploadMedia:Qe.uploadMedia,variableListForImage:R||[],useEditWhatsappTemplateMediaResponse:Qe,setOpenEditMedia:Qe.setOpenEditMedia,openEditMedia:Qe.openEditMedia,editIconRef:Qe.editIconRef,fileRef:Ue})})):e.jsxs(T.Container,Object.assign({style:{flexDirection:"column",width:400,maxHeight:460,minWidth:ye?"420px":"auto"}},{children:[!!Ne.imageComponent&&!ye&&!s.isRCSChannel(null==i?void 0:i.channel)&&e.jsxs(j.EditTemplateMediaContainer,{children:[e.jsx(f.default,{imageName:null!==(A=null===(U=null==Ze?void 0:Ze.example)||void 0===U?void 0:U.header_handle)&&void 0!==A?A:[],handleImageChange:Qe.handleImageChange,mediaType:null==Ze?void 0:Ze.format,error:Qe.error,isLoading:Qe.loading,setOpenEditMedia:Qe.setOpenEditMedia,selectedVariable:v.isVariable(null!==(S=null===(N=null===(w=null==Ze?void 0:Ze.example)||void 0===w?void 0:w.header_handle)||void 0===N?void 0:N[0])&&void 0!==S?S:"")?null===(H=null===(_=null==Ze?void 0:Ze.example)||void 0===_?void 0:_.header_handle)||void 0===H?void 0:H[0]:(null===(Q=null===(F=null==i?void 0:i.mapping)||void 0===F?void 0:F.header)||void 0===Q?void 0:Q[0])?null===(W=null===(Y=null==i?void 0:i.mapping)||void 0===Y?void 0:Y.header)||void 0===W?void 0:W[0]:Qe.selectedVariable}),(null==qe?void 0:qe.format)==d.HEADER_TYPES.DOCUMENT?e.jsx(M,{children:Te===r.POD.CHATBOT?e.jsx(a.InputWithVariables,{labelText:"PDF Name",placeHolder:"Enter the name",errorMessage:Ge||void 0,onChange:e=>{var n;Xe(""),null==P||P(null!==(n=null==e?void 0:e.actualValue)&&void 0!==n?n:"")},pickerType:n.PickerType.EMBEDDED,noMaxCharCheck:!0,allowMix:!0,showVarHeader:!0,varHeaderText:"Select variable",prevVariable:{actualValue:null!=D?D:"",variableType:"string"},variablesList:R,showAddButton:!0}):e.jsx(l.Input,{labelText:"PDF Name",placeholder:"Enter the name",value:Ke,errorMessage:Ge||void 0,onBlur:()=>{if(!Ke)return null==P||P(""),void Xe("PDF name is Required");const e=m.validateInputName(Ke);null==P||P(Ke),Xe(e?"Please enter a valid PDF name":void 0)},onChangeText:e=>{Xe(""),$e(e)}})}):e.jsx(e.Fragment,{})]}),(null===(K=Ne.bodyVariables)||void 0===K?void 0:K.length)>0&&e.jsx(E.default,{containerStyle:{paddingTop:Ne.mediaComponent?24:8},headerText:"Edit variable values",subText:"Edit values for the variables used in template",toolTipInfo:"Variables are placeholder texts which can either be filled through data or custom texts. These can be edited through the dropdowns below"}),null===($=Ne.descriptionComponents)||void 0===$?void 0:$.map(((n,t)=>e.jsx(O.default,{originalVariableList:null!=Ee&&Ee>-1?xe.cards[Ee]:xe,type:n.type,descriptionComponent:n.component,showVariableModal:I},t))),(null===(z=null===(X=null!=Ee&&Ee>-1?null===(G=xe.cards[Ee])||void 0===G?void 0:G.buttons:null==xe?void 0:xe.buttons)||void 0===X?void 0:X.filter((e=>"URL"===e.type)))||void 0===z?void 0:z.length)>0&&e.jsx(E.default,{headerText:"Edit buttons",subText:"Edit the link connected to the CTA button"}),null===(ee=null===(Z=null!=Ee&&Ee>-1?null===(J=xe.cards[Ee])||void 0===J?void 0:J.buttons:null==xe?void 0:xe.buttons)||void 0===Z?void 0:Z.filter((e=>Te===r.POD.CHATBOT||"URL"===e.type)))||void 0===ee?void 0:ee.map(((n,t)=>{const o=n.buttonVariable===p.STATIC_URL_VARIABLE_NAME,i=n.buttonVariable===p.UNSUBSCRIBE_URL_VARIABLE;if("URL"===n.type)return e.jsx(y.default,{variableListIndex:t,disableEdit:o||i,CTAoptions:null==k?void 0:k.CTAoptions,button:n,currentVariableList:null!=Ee&&Ee>-1?Object.assign({},xe.cards[Ee]):Object.assign({},xe),updateSelectedURLTemplateBtn:ze},`${t}_${Ee}`)})),Te===r.POD.CHATBOT&&(null===(te=null===(ne=Re[0])||void 0===ne?void 0:ne.component)||void 0===te?void 0:te.buttons)&&(null===(le=null===(ie=null===(oe=Re[0])||void 0===oe?void 0:oe.component)||void 0===ie?void 0:ie.buttons)||void 0===le?void 0:le.length)>0&&e.jsx(b.BackTrackComponent,{backTrackMessage:null===(ae=null==Oe?void 0:Oe.backTrackExtra)||void 0===ae?void 0:ae[0],setBackTrackMessage:null===(se=null==Oe?void 0:Oe.backTrackExtra)||void 0===se?void 0:se[1]}),!s.isRCSChannel(null==i?void 0:i.channel)&&(null===(ue=null===(re=null!=Ee&&Ee>-1?null===(de=xe.cards[Ee])||void 0===de?void 0:de.buttons:null==xe?void 0:xe.buttons)||void 0===re?void 0:re.filter((e=>"QUICK_REPLY"===e.type)))||void 0===ue?void 0:ue.length)>0&&(Te!==r.POD.CHATBOT?e.jsx(E.default,{headerText:"Edit buttons",subText:"Edit the chatflows triggered on clicking the buttons",toolTipInfo:"There is an option to trigger chatflows through the buttons which can keep the user engaged"}):e.jsx(b.BackTrackComponent,{backTrackMessage:null===(pe=null==Oe?void 0:Oe.backTrackExtra)||void 0===pe?void 0:pe[0],setBackTrackMessage:null===(ce=null==Oe?void 0:Oe.backTrackExtra)||void 0===ce?void 0:ce[1]})),!s.isRCSChannel(null==i?void 0:i.channel)&&(null===(be=null===(me=null!=Ee&&Ee>-1?null===(ve=xe.cards[Ee])||void 0===ve?void 0:ve.buttons:null==xe?void 0:xe.buttons)||void 0===me?void 0:me.filter((e=>"QUICK_REPLY"===e.type)))||void 0===be?void 0:be.map(((n,t)=>{if("QUICK_REPLY"===n.type&&Te!==r.POD.CHATBOT)return e.jsx(y.default,{variableListIndex:t,QRBoptions:null==k?void 0:k.QRBoptions,button:n,currentVariableList:null!=Ee&&Ee>-1?Object.assign({},xe.cards[Ee]):Object.assign({},xe),updateSelectedQRBTemplateBtn:Je},`${t}_${Ee}`)}))),Te===r.POD.CHATBOT&&Ae&&e.jsx(g.DiscountCodeComponent,{discountCode:null===(ge=null==Oe?void 0:Oe.discountCodeExtra)||void 0===ge?void 0:ge[0],setDiscountCode:null===(he=null==Oe?void 0:Oe.discountCodeExtra)||void 0===he?void 0:he[1]}),null===(je=null!=Ee&&Ee>-1?null===(fe=xe.cards[Ee])||void 0===fe?void 0:fe.buttons:null==xe?void 0:xe.buttons)||void 0===je?void 0:je.map(((n,t)=>{var o,i,a,s,d;if("COPY_CODE"===n.type)return e.jsx(e.Fragment,{children:Ve?e.jsx("div",Object.assign({style:{marginBottom:20,borderRadius:4,padding:"8px 10px"}},{children:e.jsx(l.Input,{state:"disabled",labelText:null!==(o=n.text)&&void 0!==o?o:"Copy Code",value:null!==(i=n.buttonVariable)&&void 0!==i?i:"",onChangeText:()=>{}})})):e.jsx(x.default,{index:t,variable:{variableName:null!==(a=n.text)&&void 0!==a?a:"Copy Code",updatedValue:null!==(s=n.buttonVariable)&&void 0!==s?s:"",type:"string",isEditableVariable:!0,index:null!==(d=n.index)&&void 0!==d?d:0},showVariableModal:!0,componentType:"BUTTONS",buttonType:n.type},t)})}))]}))};
|
|
7
|
+
`;exports.default=i=>{let{template:V,onTemplateChange:M,whatsappSpecificPickerMeta:k,showVariableModal:I,variableListForImage:D,setDiscountCode:R,fileName:q,setFileName:P}=i;var L,U,A,w,N,S,_,H,F,Q,Y,W,K,$,G,X,z,J,Z,ee,ne,te,oe,ie,le,ae,se,de,re,ue,pe,ce,ve,me,be,ge,he,fe,je;const Ce=V.isCarouselType,{originalVariableList:xe,pod:Te,extras:Oe,selectedCarouselIndex:Ee,isProductCarouselType:ye,disableCopyCode:Ve,isError:Be,cardIndex:Me}=u.useTemplateModalContext(),{descriptionComponents:ke,urlBtns:Ie,qrbBtns:De,imageComponent:Re,bodyVariables:qe,headerVariables:Pe,titleVariables:Le}=c.getAllDataFromTemplateComponent(V),Ue=o.useRef(null),[Ae,we]=o.useState(!1),[Ne,Se]=o.useState(-1===Ee?{descriptionComponents:ke,urlBtns:Ie,qrbBtns:De,imageComponent:Re,bodyVariables:qe,headerVariables:Pe,titleVariables:Le}:{}),{uploadMediaLink:_e,uploadMediaFiles:He,validateMimeType:Fe}=k,Qe=C.useEditWhatsappTemplateMedia({uploadMediaLink:_e,uploadMediaFiles:He,updateTemplateImageUrl:function(e,n){var o,i,l,a,s,d,r,u;let p;p=null!=Ee&&Ee>-1?{components:null===(i=null===(o=V.components[Me])||void 0===o?void 0:o.cards)||void 0===i?void 0:i[Ee].components,mapping:null===(a=null===(l=null==V?void 0:V.mapping)||void 0===l?void 0:l.cards)||void 0===a?void 0:a[Ee]}:Object.assign({},V);const c=null===(s=null==p?void 0:p.components)||void 0===s?void 0:s.findIndex((e=>{if("HEADER"===e.type&&"NONE"!==e.format&&"TEXT"!==e.format)return!0}));if(void 0!==c&&c>-1&&(null==p?void 0:p.components[c])){const t=Object.assign(Object.assign({},p.components[c]),{format:n,example:{header_handle:[e]}}),o=[...p.components];o[c]=t,p=Object.assign(Object.assign({},p),{components:o})}p.mapping&&(p.mapping=Object.assign(Object.assign({},p.mapping),{header:void 0}));if(null!=Ee&&Ee>-1){const e=t.cloneDeep(V);e.components[Me].cards[Ee].components=p.components,(null===(d=null==e?void 0:e.mapping)||void 0===d?void 0:d.cards)&&(null===(r=null==e?void 0:e.mapping)||void 0===r?void 0:r.cards.length)>0&&(e.mapping.cards[Ee]=null!==(u=p.mapping)&&void 0!==u?u:{}),null==M||M(Object.assign({},e)),We(!0)}else null==M||M(Object.assign({},p))},validateMimeType:Fe,mediaComponent:Ce?Ne.imageComponent:Re,fileRef:Ue}),[Ye,We]=o.useState(!1),[Ke,$e]=o.useState(q),[Ge,Xe]=o.useState();function ze(e,n,o){var i,l,a,d,r,u,p,c,v,m;const b=null!=Ee&&Ee>-1?{components:null===(i=Object.assign({},V).components[Me].cards)||void 0===i?void 0:i[Ee].components,mapping:null===(l=Object.assign({},V).mapping.cards)||void 0===l?void 0:l[Ee]}:Object.assign({},V),g=t.cloneDeep(b),h="custom"===n&&"string"==typeof e,f=h?e:"string"!=typeof e?e.defaultValue?e.defaultValue:"https://d.bik.ai/":"https://d.bik.ai";if(null!=Ee&&Ee>-1&&ye){const n=Object.assign({},V).components.map((e=>{var n;return s.isCarouselComponent(e.type)?Object.assign(Object.assign({},e),{cards:null===(n=e.cards)||void 0===n?void 0:n.map((e=>Object.assign(Object.assign({},e),{components:e.components.map((e=>{var n,t,i;if("BUTTONS"===e.type){const l=null===(n=e.buttons)||void 0===n?void 0:n.filter((e=>"URL"===e.type));let a=null!==(t=null==l?void 0:l[o])&&void 0!==t?t:{};a=Object.assign(Object.assign({},a),{url:"https://d.bik.ai/{{1}}",example:[f]});const s=null===(i=e.buttons)||void 0===i?void 0:i.map((e=>"URL"===e.type&&(null==e?void 0:e.text)===(null==a?void 0:a.text)?a:e));return Object.assign(Object.assign({},e),{buttons:s})}return e}))})))}):e})),i=null===(d=null===(a=Object.assign({},V).mapping)||void 0===a?void 0:a.cards)||void 0===d?void 0:d.map((n=>{var t;return Object.assign(Object.assign({},n),{buttons:null===(t=null==n?void 0:n.buttons)||void 0===t?void 0:t.map(((n,t)=>t===o?h?"((customBtnPlaceholder))":"string"!=typeof e?e.placeHolder:"":n))})})),l=t.cloneDeep(V);return l.components=n,l.mapping.cards=i,void(null==M||M(Object.assign({},l)))}const j=null==g?void 0:g.components.findIndex((e=>"BUTTONS"===e.type));if(void 0!==j&&j>-1){const t=null===(r=null==g?void 0:g.components[j].buttons)||void 0===r?void 0:r.filter((e=>"URL"===e.type));if((null==t?void 0:t.length)>0){const i="custom"===n&&"string"==typeof e,l=i?e:"string"!=typeof e&&e.defaultValue?e.defaultValue:"https://d.bik.ai/";let a=t[o];a=Object.assign(Object.assign({},a),{url:"https://d.bik.ai/{{1}}",example:[l]});const s=[...null!==(c=null===(p=null===(u=g.components)||void 0===u?void 0:u[j])||void 0===p?void 0:p.buttons)&&void 0!==c?c:[]].map((e=>"URL"===e.type&&(null==e?void 0:e.text)===(null==a?void 0:a.text)?a:e)),d=Object.assign(Object.assign({},g.components[j]),{buttons:s}),r=null===(v=g.mapping)||void 0===v?void 0:v.buttons;r&&r.length>0&&(r[o]=i?"((customBtnPlaceholder))":"string"!=typeof e?e.placeHolder:"");const m=Object.assign(Object.assign({},g.mapping),{buttons:r});g.mapping=m;const b=[...g.components];b[j]=d,g.components=b}}if("string"!=typeof e){"checkout.checkoutUrl"===(null===(m=e.placeHolder)||void 0===m?void 0:m.slice(2,-2))?we(!0):(we(!1),null==R||R(""))}if(null!=Ee&&Ee>-1){const e=t.cloneDeep(V);e.components[Me].cards[Ee].components=g.components,e.mapping.cards[Ee]=g.mapping,null==M||M(Object.assign({},e))}else null==M||M(g)}function Je(e,n,o){var i,l,a,d,r,u,p;const c=null!=Ee&&Ee>-1?{components:null===(i=Object.assign({},V).components[Me].cards)||void 0===i?void 0:i[Ee].components,mapping:null===(l=Object.assign({},V).mapping.cards)||void 0===l?void 0:l[Ee]}:Object.assign({},V);if(null!=Ee&&Ee>-1&&ye){const n=Object.assign({},V).components.map((n=>{var t;return s.isCarouselComponent(n.type)?Object.assign(Object.assign({},n),{cards:null===(t=n.cards)||void 0===t?void 0:t.map((n=>Object.assign(Object.assign({},n),{components:n.components.map((n=>{var t,i,l;if("BUTTONS"===n.type){const a=null===(t=null==n?void 0:n.buttons)||void 0===t?void 0:t.filter((e=>"QUICK_REPLY"===e.type));let s=null!==(i=null==a?void 0:a[o])&&void 0!==i?i:{};s=Object.assign(Object.assign({},s),{flowId:e.flowId,flowName:e.flowName});const d=null===(l=null==n?void 0:n.buttons)||void 0===l?void 0:l.map((e=>"QUICK_REPLY"===e.type&&(null==e?void 0:e.text)===(null==s?void 0:s.text)?s:e));return Object.assign(Object.assign({},n),{buttons:d})}return n}))})))}):n})),i=t.cloneDeep(V);return i.components=n,void(null==M||M(Object.assign({},i)))}const v=null==c?void 0:c.components.findIndex((e=>"BUTTONS"===e.type));if(void 0!==v&&v>-1){const n=null===(d=null===(a=null==c?void 0:c.components[v])||void 0===a?void 0:a.buttons)||void 0===d?void 0:d.filter((e=>"QUICK_REPLY"===e.type));if(n){let t=n[o];t=Object.assign(Object.assign({},t),{flowId:e.flowId,flowName:e.flowName});const i=[...null!==(p=null===(u=null===(r=c.components)||void 0===r?void 0:r[v])||void 0===u?void 0:u.buttons)&&void 0!==p?p:[]].map((e=>"QUICK_REPLY"===e.type&&(null==e?void 0:e.text)===(null==t?void 0:t.text)?t:e)),l=Object.assign(Object.assign({},c.components[v]),{buttons:i}),a=[...c.components];a[v]=l,c.components=a}}if(null!=Ee&&Ee>-1){const e=t.cloneDeep(V);e.components[Me].cards[Ee].components=c.components,null==M||M(Object.assign({},e))}else null==M||M(c)}o.useEffect((()=>{var e,n;if(null===(e=V.mapping.buttons)||void 0===e?void 0:e.find((e=>"checkout.checkoutUrl"===e.slice(2,-2))))we(!0);else{we(!1);const e=null===(n=null==Oe?void 0:Oe.discountCodeExtra)||void 0===n?void 0:n[1];null==e||e("")}}),[V]),o.useEffect((()=>{var e,n,t,o;if(null!=Ee&&Ee>-1){const i={components:null===(n=null===(e=V.components[Me])||void 0===e?void 0:e.cards)||void 0===n?void 0:n[Ee].components,mapping:null===(o=null===(t=null==V?void 0:V.mapping)||void 0===t?void 0:t.cards)||void 0===o?void 0:o[Ee]},{descriptionComponents:l,urlBtns:a,qrbBtns:s,imageComponent:d,bodyVariables:r,headerVariables:u,titleVariables:p}=c.getAllDataFromTemplateComponent(i);Se({descriptionComponents:l,urlBtns:a,qrbBtns:s,imageComponent:d,bodyVariables:r,headerVariables:u,titleVariables:p})}else if(null!=Ee&&-1===Ee){const{descriptionComponents:e,urlBtns:n,qrbBtns:t,imageComponent:o,bodyVariables:i,headerVariables:l,titleVariables:a}=c.getAllDataFromTemplateComponent(V);Se({descriptionComponents:e,urlBtns:n,qrbBtns:t,imageComponent:o,bodyVariables:i,headerVariables:l,titleVariables:a})}}),[Ee]),o.useEffect((()=>{var e,n,t,o;if(null!=Ee&&Ee>-1&&Ye){const i={components:null===(n=null===(e=V.components[Me])||void 0===e?void 0:e.cards)||void 0===n?void 0:n[Ee].components,mapping:null===(o=null===(t=null==V?void 0:V.mapping)||void 0===t?void 0:t.cards)||void 0===o?void 0:o[Ee]},{descriptionComponents:l,urlBtns:a,qrbBtns:s,imageComponent:d,bodyVariables:r,headerVariables:u,titleVariables:p}=c.getAllDataFromTemplateComponent(i);Se({descriptionComponents:l,urlBtns:a,qrbBtns:s,imageComponent:d,bodyVariables:r,headerVariables:u,titleVariables:p}),We(!1)}}),[Ye]);o.useEffect((()=>{Be&&Te===r.POD.CHATBOT&&(()=>{if(!q)return void Xe("PDF name is Required");const e=m.validateInputNameChatbot(q);null==P||P(null!=q?q:""),Xe(e?"Please enter a valid PDF name":void 0)})()}),[Be]);const Ze=Ce?Ne.imageComponent:Re;return Qe.openEditMedia?e.jsx(T.Container,Object.assign({style:{flexDirection:"column",width:400,maxHeight:460}},{children:e.jsx(h.default,{mediaComponentFormat:null!==(L=Ze.format)&&void 0!==L?L:d.HEADER_TYPES.IMAGE,uploadMedia:Qe.uploadMedia,variableListForImage:D||[],useEditWhatsappTemplateMediaResponse:Qe,setOpenEditMedia:Qe.setOpenEditMedia,openEditMedia:Qe.openEditMedia,editIconRef:Qe.editIconRef,fileRef:Ue})})):e.jsxs(T.Container,Object.assign({style:{flexDirection:"column",width:400,maxHeight:460,minWidth:ye?"420px":"auto"}},{children:[!!Ne.imageComponent&&!ye&&!s.isRCSChannel(null==V?void 0:V.channel)&&e.jsxs(j.EditTemplateMediaContainer,{children:[e.jsx(f.default,{imageName:null!==(A=null===(U=null==Ze?void 0:Ze.example)||void 0===U?void 0:U.header_handle)&&void 0!==A?A:[],handleImageChange:Qe.handleImageChange,mediaType:null==Ze?void 0:Ze.format,error:Qe.error,isLoading:Qe.loading,setOpenEditMedia:Qe.setOpenEditMedia,selectedVariable:v.isVariable(null!==(S=null===(N=null===(w=null==Ze?void 0:Ze.example)||void 0===w?void 0:w.header_handle)||void 0===N?void 0:N[0])&&void 0!==S?S:"")?null===(H=null===(_=null==Ze?void 0:Ze.example)||void 0===_?void 0:_.header_handle)||void 0===H?void 0:H[0]:(null===(Q=null===(F=null==V?void 0:V.mapping)||void 0===F?void 0:F.header)||void 0===Q?void 0:Q[0])?null===(W=null===(Y=null==V?void 0:V.mapping)||void 0===Y?void 0:Y.header)||void 0===W?void 0:W[0]:Qe.selectedVariable}),(null==Re?void 0:Re.format)==d.HEADER_TYPES.DOCUMENT?e.jsx(B,{children:Te===r.POD.CHATBOT?e.jsx(a.InputWithVariables,{labelText:"PDF Name",placeHolder:"Enter the name",errorMessage:Ge||void 0,onChange:e=>{var n;Xe(""),null==P||P(null!==(n=null==e?void 0:e.actualValue)&&void 0!==n?n:"")},pickerType:n.PickerType.EMBEDDED,noMaxCharCheck:!0,allowMix:!0,showVarHeader:!0,varHeaderText:"Select variable",prevVariable:{actualValue:null!=q?q:"",variableType:"string"},variablesList:D,showAddButton:!0}):e.jsx(l.Input,{labelText:"PDF Name",placeholder:"Enter the name",value:Ke,errorMessage:Ge||void 0,onBlur:()=>{if(!Ke)return null==P||P(""),void Xe("PDF name is Required");const e=m.validateInputName(Ke);null==P||P(Ke),Xe(e?"Please enter a valid PDF name":void 0)},onChangeText:e=>{Xe(""),$e(e)}})}):e.jsx(e.Fragment,{})]}),(null===(K=Ne.bodyVariables)||void 0===K?void 0:K.length)>0&&e.jsx(E.default,{containerStyle:{paddingTop:Ne.mediaComponent?24:8},headerText:"Edit variable values",subText:"Edit values for the variables used in template",toolTipInfo:"Variables are placeholder texts which can either be filled through data or custom texts. These can be edited through the dropdowns below"}),null===($=Ne.descriptionComponents)||void 0===$?void 0:$.map(((n,t)=>e.jsx(O.default,{originalVariableList:null!=Ee&&Ee>-1?xe.cards[Ee]:xe,type:n.type,descriptionComponent:n.component,showVariableModal:I},t))),(null===(z=null===(X=null!=Ee&&Ee>-1?null===(G=xe.cards[Ee])||void 0===G?void 0:G.buttons:null==xe?void 0:xe.buttons)||void 0===X?void 0:X.filter((e=>"URL"===e.type)))||void 0===z?void 0:z.length)>0&&e.jsx(E.default,{headerText:"Edit buttons",subText:"Edit the link connected to the CTA button"}),null===(ee=null===(Z=null!=Ee&&Ee>-1?null===(J=xe.cards[Ee])||void 0===J?void 0:J.buttons:null==xe?void 0:xe.buttons)||void 0===Z?void 0:Z.filter((e=>Te===r.POD.CHATBOT||"URL"===e.type)))||void 0===ee?void 0:ee.map(((n,t)=>{const o=n.buttonVariable===p.STATIC_URL_VARIABLE_NAME,i=n.buttonVariable===p.UNSUBSCRIBE_URL_VARIABLE;if("URL"===n.type)return e.jsx(y.default,{variableListIndex:t,disableEdit:o||i,CTAoptions:null==k?void 0:k.CTAoptions,button:n,currentVariableList:null!=Ee&&Ee>-1?Object.assign({},xe.cards[Ee]):Object.assign({},xe),updateSelectedURLTemplateBtn:ze},`${t}_${Ee}`)})),Te===r.POD.CHATBOT&&(null===(te=null===(ne=De[0])||void 0===ne?void 0:ne.component)||void 0===te?void 0:te.buttons)&&(null===(le=null===(ie=null===(oe=De[0])||void 0===oe?void 0:oe.component)||void 0===ie?void 0:ie.buttons)||void 0===le?void 0:le.length)>0&&e.jsx(b.BackTrackComponent,{backTrackMessage:null===(ae=null==Oe?void 0:Oe.backTrackExtra)||void 0===ae?void 0:ae[0],setBackTrackMessage:null===(se=null==Oe?void 0:Oe.backTrackExtra)||void 0===se?void 0:se[1]}),!s.isRCSChannel(null==V?void 0:V.channel)&&(null===(ue=null===(re=null!=Ee&&Ee>-1?null===(de=xe.cards[Ee])||void 0===de?void 0:de.buttons:null==xe?void 0:xe.buttons)||void 0===re?void 0:re.filter((e=>"QUICK_REPLY"===e.type)))||void 0===ue?void 0:ue.length)>0&&(Te!==r.POD.CHATBOT?e.jsx(E.default,{headerText:"Edit buttons",subText:"Edit the chatflows triggered on clicking the buttons",toolTipInfo:"There is an option to trigger chatflows through the buttons which can keep the user engaged"}):e.jsx(b.BackTrackComponent,{backTrackMessage:null===(pe=null==Oe?void 0:Oe.backTrackExtra)||void 0===pe?void 0:pe[0],setBackTrackMessage:null===(ce=null==Oe?void 0:Oe.backTrackExtra)||void 0===ce?void 0:ce[1]})),!s.isRCSChannel(null==V?void 0:V.channel)&&(null===(be=null===(me=null!=Ee&&Ee>-1?null===(ve=xe.cards[Ee])||void 0===ve?void 0:ve.buttons:null==xe?void 0:xe.buttons)||void 0===me?void 0:me.filter((e=>"QUICK_REPLY"===e.type)))||void 0===be?void 0:be.map(((n,t)=>{if("QUICK_REPLY"===n.type&&Te!==r.POD.CHATBOT)return e.jsx(y.default,{variableListIndex:t,QRBoptions:null==k?void 0:k.QRBoptions,button:n,currentVariableList:null!=Ee&&Ee>-1?Object.assign({},xe.cards[Ee]):Object.assign({},xe),updateSelectedQRBTemplateBtn:Je},`${t}_${Ee}`)}))),Te===r.POD.CHATBOT&&Ae&&e.jsx(g.DiscountCodeComponent,{discountCode:null===(ge=null==Oe?void 0:Oe.discountCodeExtra)||void 0===ge?void 0:ge[0],setDiscountCode:null===(he=null==Oe?void 0:Oe.discountCodeExtra)||void 0===he?void 0:he[1]}),null===(je=null!=Ee&&Ee>-1?null===(fe=xe.cards[Ee])||void 0===fe?void 0:fe.buttons:null==xe?void 0:xe.buttons)||void 0===je?void 0:je.map(((n,t)=>{var o,i,a,s,d;if("COPY_CODE"===n.type)return e.jsx(e.Fragment,{children:Ve?e.jsx("div",Object.assign({style:{marginBottom:20,borderRadius:4,padding:"8px 10px"}},{children:e.jsx(l.Input,{state:"disabled",labelText:null!==(o=n.text)&&void 0!==o?o:"Copy Code",value:null!==(i=n.buttonVariable)&&void 0!==i?i:"",onChangeText:()=>{}})})):e.jsx(x.default,{index:t,variable:{variableName:null!==(a=n.text)&&void 0!==a?a:"Copy Code",updatedValue:null!==(s=n.buttonVariable)&&void 0!==s?s:"",type:"string",isEditableVariable:!0,index:null!==(d=n.index)&&void 0!==d?d:0},showVariableModal:!0,componentType:"BUTTONS",buttonType:n.type},t)})}))]}))};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/info.svg.js"),r=require("react"),
|
|
2
|
-
background: ${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/info.svg.js"),r=require("react"),i=require("styled-components"),s=require("../../button/Button.js"),l=require("../../tag/Tag.js");require("../../template-preview/TemplatePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js");var a=require("../../../constants/Theme.js");require("../../curtain/CurtainHelper.js"),require("../../variable-picker-v3/model.js"),require("../../template-preview/models/TemplateMeta.js"),require("../../template-preview/models/WhatsAppTemplate.js");var o=require("../../template-preview/models/Channels.js"),n=require("../../template-preview/helpers/templateMiscHelper.js"),p=require("../../TypographyStyle.js"),u=require("../Badge/index.js"),d=require("../context/templateModalContext.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const x=c(i).default.div`
|
|
2
|
+
background: ${a.COLORS.surface.standard};
|
|
3
3
|
border-top-width: 1px;
|
|
4
|
-
border-top-color: ${
|
|
4
|
+
border-top-color: ${a.COLORS.stroke.primary};
|
|
5
5
|
box-shadow: 0px -4px 12px rgba(0, 0, 0, 0.12);
|
|
6
6
|
width: 100%;
|
|
7
7
|
padding: 0 24px;
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
border-bottom-left-radius: 4px;
|
|
13
13
|
border-bottom-right-radius: 4px;
|
|
14
14
|
height: ${e=>e.isWhatsappCarousel?64:80}px;
|
|
15
|
-
`;exports.default=
|
|
15
|
+
`;exports.default=i=>{let{isWhatsappCarousel:c,onSelect:m,footerButtonText:v,footerInfoText:j}=i;var g,h,b,f;const{isError:q,selectedCarouselIndex:C,setSelectedCarouselIndex:T,setErrorIndexes:y,template:w,showVariablePicker:S,hideFooterButton:O}=d.useTemplateModalContext(),[P,W]=r.useState(c?"Next":"Select template");return r.useEffect((()=>{v?W(v):c&&-1===C?W("Next"):c&&null!=C&&C>-1&&W("Save & Select Template")}),[C]),e.jsxs(x,Object.assign({isWhatsappCarousel:c,justifyContent:c&&(null===(h=null===(g=null==w?void 0:w.mapping)||void 0===g?void 0:g.body)||void 0===h?void 0:h.length)?"space-between":"end"},{children:[n.isRCSChannel((null==w?void 0:w.channel)||o.CHANNEL_TYPE.WHATSAPP)?e.jsx(p.TitleRegular,{}):c&&null!=C&&C>=-1&&!!(null===(f=null===(b=null==w?void 0:w.mapping)||void 0===b?void 0:b.body)||void 0===f?void 0:f.length)&&e.jsx(p.TitleRegular,Object.assign({color:a.COLORS.text.secondary},{children:`Step ${-1===C?1:2}/2`})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",alignItems:"center"}},{children:[q&&e.jsx(u.Badge,{errorText:"Some inputs are missing or incorrect. Please check"}),!q&&j&&e.jsx("div",Object.assign({style:{marginRight:12}},{children:e.jsx(l.Tag,{tagText:j,LeadingIcon:t.default})})),!O&&e.jsx(s.Button,{disabled:S,id:"select-template-btn",buttonText:P,size:c?"small":"large",onClick:function(){c&&-1===C&&T?T(0):(null==y||y([]),m())}})]}))]}))};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CHANNEL_TYPE } from "../../template-preview/models/Channels";
|
|
3
|
-
import
|
|
3
|
+
import { AllTemplateTypes } from "../../template-preview/models/types";
|
|
4
4
|
declare const MobilePreview: React.ForwardRefExoticComponent<{
|
|
5
5
|
display_content: string;
|
|
6
6
|
channel: CHANNEL_TYPE;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),i=require("styled-components"),a=require("../../template-preview/TemplatePreview.js"),r=require("../../template-preview/models/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),i=require("styled-components"),a=require("../../template-preview/TemplatePreview.js");require("../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../../constants/Theme.js"),require("../../curtain/CurtainHelper.js"),require("../../variable-picker-v3/model.js"),require("../../template-preview/models/TemplateMeta.js");var r=require("../../template-preview/models/WhatsAppTemplate.js"),s=require("../../template-preview/models/Channels.js"),l=require("../context/templateModalContext.js"),o=require("../utils/getPreviewDimension.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=n(t),d=n(i);const c=d.default.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
height: 100%;
|
|
4
4
|
border-radius: 31px;
|
|
5
|
-
width: ${e=>
|
|
5
|
+
width: ${e=>o.getPreviewWidth(e.channel)}px;
|
|
6
6
|
background-color: white;
|
|
7
7
|
margin: auto;
|
|
8
8
|
overflow-y: auto;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
height: calc(100% - 17px);
|
|
18
18
|
border-radius: 16px;
|
|
19
19
|
overflow-y: auto;
|
|
20
|
-
`,m=p.default.forwardRef(((t,i)=>{let{display_content:n,channel:p,template:d,showSampleValues:m}=t;const{pod:
|
|
20
|
+
`,m=p.default.forwardRef(((t,i)=>{let{display_content:n,channel:p,template:d,showSampleValues:m}=t;const{pod:v,hideDeviceContainerInPreview:w}=l.useTemplateModalContext(),f={showSampleValues:m,template:d,channel:p,smsSpecificMeta:{smsDisplayContent:n},whatsAppSpecificMeta:{showWhatsAppHeader:!0,whatsAppExtras:v!==r.POD.CHATBOT,containerStyle:{border:"none",borderBottomRightRadius:0,borderBottomLeftRadius:0,minHeight:426,width:p==s.CHANNEL_TYPE.RCS?"unset":240}},size:"small",hideHeader:!0,emailSpecificMeta:{emailDisplayContent:n,hideViewButtonForEmail:!0,emailHtmlContainerId:"template_html_mobile",containerStyle:{height:"100%",width:"100%"},templateContainerStyles:{height:"100%"}},isPreview:!0,hidePointerEvents:!0};return w?e.jsx(u,{children:e.jsx(a.TemplatePreview,Object.assign({},f))}):e.jsx(e.Fragment,{children:e.jsxs(c,Object.assign({channel:p},{children:[e.jsx("img",{alt:"",src:"https://firebasestorage.googleapis.com/v0/b/staging-bikayi.appspot.com/o/bik%2FkNwEVoGlLpVjOsXoO1M8WgvWicP2%2F6f07b850-8b4b-4d58-96cc-8ba6df7b4e4a-Device___Frame.jpg?alt=media&token=253f1bfe-8481-4f54-bdef-3c0a73697d6a",style:{width:o.getPreviewWidth(p),height:443}}),e.jsx(h,Object.assign({ref:i},{children:e.jsx(a.TemplatePreview,Object.assign({},f))}))]}))})}));m.displayName="MobilePreview";const u=d.default.div`
|
|
21
21
|
display: flex;
|
|
22
22
|
align-items: center;
|
|
23
23
|
justify-content: center;
|
package/dist/cjs/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TEMPLATE_QUALITY,
|
|
1
|
+
import { TEMPLATE_QUALITY, TemplateAnalyticsComponentI, TemplateAnalyticsDataI } from "../../template-preview/models/WhatsAppTemplate";
|
|
2
2
|
export declare const TemplateAnalyticsComponent: (props: TemplateAnalyticsComponentI) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare const RightPanelTemplateAnalytics: (props: {
|
|
4
4
|
analyticsData: TemplateAnalyticsDataI;
|
package/dist/cjs/components/template-context-mapper/modalElements/TemplateSelectModalContent.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { VariableListInterfaceV2 } from "../../add-variableV2/AddVariableV2";
|
|
2
2
|
import { CHANNEL_TYPE } from "../../template-preview/models/Channels";
|
|
3
|
-
import
|
|
3
|
+
import { WhatsAppPickerMeta } from "../../template-preview/models/WhatsAppTemplate";
|
|
4
4
|
export interface TemplateSelectModalContentProps {
|
|
5
5
|
channel: CHANNEL_TYPE;
|
|
6
6
|
showVariableMapping?: boolean;
|
|
@@ -3,7 +3,7 @@ import { CHANNEL_TYPE } from "../../template-preview/models/Channels";
|
|
|
3
3
|
import { ButtonPlaceHolderOptions, CUSTOM_VARIABLE } from "../../template-preview/models/TemplateMeta";
|
|
4
4
|
import { WEB_PUSH_COMPONENT_TYPE } from "../../template-preview/models/WebpushTemplate";
|
|
5
5
|
import { BUTTON_TYPE } from "../../template-preview/models/WhatsAppTemplate";
|
|
6
|
-
import { ComponentType } from './
|
|
6
|
+
import { ComponentType } from './VariableConnectorWhatsApp';
|
|
7
7
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {
|
|
8
8
|
focused?: boolean | undefined;
|
|
9
9
|
channel?: CHANNEL_TYPE | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/edit.svg.js"),l=require("../../../assets/icons/info.svg.js"),i=require("date-fns"),a=require("lodash
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/edit.svg.js"),l=require("../../../assets/icons/info.svg.js"),i=require("date-fns"),a=require("lodash"),n=require("react"),s=require("styled-components"),o=require("../../alerts/Alert.js"),u=require("../../alerts/AlertHelper.js"),d=require("../../custom-date-time/CustomDateTime.js"),r=require("../../dropdown/Dropdown.js"),c=require("../../input/Input.js"),p=require("../../product-picker-v2/collectionScreen.js"),v=require("../../template-preview/constants/regexPatterns.js"),m=require("../../template-preview/helpers/templateMiscHelper.js"),b=require("../../template-preview/models/Channels.js"),g=require("../../template-preview/models/WebpushTemplate.js"),O=require("../../template-preview/models/WhatsAppTemplate.js"),j=require("../../TypographyStyle.js"),x=require("../../../utils/StringUtils.js"),T=require("../../../constants/Theme.js"),E=require("../context/templateModalContext.js"),y=require("../custom-hooks/useAdditionalVariables.js"),_=require("../utils/getVariableNameEmail.js"),h=require("./QueryParamsComponent.js");function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=C(s);const N=f.default.div`
|
|
2
2
|
/* surface/$color-background-warning-light */
|
|
3
3
|
|
|
4
4
|
background: ${e=>e.focused&&e.channel===b.CHANNEL_TYPE.EMAIL?T.COLORS.background.warning.light:"transparent"};
|
|
5
5
|
border-radius: 4px;
|
|
6
6
|
padding: 8px 10px;
|
|
7
|
-
`,
|
|
7
|
+
`,P=f.default.div`
|
|
8
8
|
position: absolute;
|
|
9
9
|
top: 0;
|
|
10
10
|
left: 0;
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
height: 100%;
|
|
13
13
|
z-index: 1000;
|
|
14
14
|
cursor: not-allowed;
|
|
15
|
-
`,
|
|
15
|
+
`,A=f.default.div`
|
|
16
16
|
height: 100%;
|
|
17
17
|
width: 48%;
|
|
18
18
|
background: rgba(0, 0, 0, 0.1);
|
|
19
|
-
`,S={value:"custom_link",label:"Custom URL"},H={value:"custom_text",label:"Custom text"},V={value:"static_expiry",label:"Static Expiry"};exports.Container=P,exports.default=a=>{var s,f,N,k,B,Y,D,w,U;const{onFocus:R,variable:q,index:I,showVariableModal:W,setShowDiscountCheckBox:M,componentType:$,CTAoptions:z,buttonType:Z}=a,[F,G]=n.useState(!1),[Q,K]=n.useState(""),[J,X]=n.useState([]),[ee,te]=n.useState(),[le,ie]=n.useState(!1),{variableList:ae,setVariableList:ne,setVariableCallback:se,setShowVariablePicker:oe,device:ue,channel:de,isError:re,originalVariableList:ce,template:pe,templateSelectionTriggered:ve,setTemplate:me,setDisplayContent:be,setOriginalVariableList:ge,globalNormalizedPlaceholders:Oe,enabledCustomText:je,pod:xe,selectedCarouselIndex:Te,isProductCarouselType:Ee,isWhatsappCarousel:ye,disableEditVariable:_e,disableEditExpiry:he,templateErrorIndexes:fe,maxCharLimit:Ce,disableDatePicker:Ne,showDiscountCodeExpiryInfo:Pe,cardIndex:Ae=1}=E.useTemplateModalContext();function Le(e,t){var l,i,a,n;const s=e;K(""),te(s),de===b.CHANNEL_TYPE.WHATSAPP||de===b.CHANNEL_TYPE.RCS?"custom_text"!==s.value&&"custom_link"!==s.value&&"static_expiry"!==s.value?(He(null!==(l=s.value)&&void 0!==l?l:"","string"),null==Ve||Ve(null!==(i=q.index)&&void 0!==i?i:0,s.value,!0)):(null==Ve||Ve(null!==(a=q.index)&&void 0!==a?a:0,"",!0,s.value),He("","url"===s.bikPlaceholderType?"link":"string")):"custom_text"!==s.value&&"custom_link"!==s.value?(He(s.value,"url"===s.bikPlaceholderType?"link":"string"),de==b.CHANNEL_TYPE.WEBPUSH&&(null==Be||Be(null!==(n=q.index)&&void 0!==n?n:0,s.value))):(K(""),He("",s.value))}function Se(e,t){var l,i;K(t);const a="custom_link"===(null==ee?void 0:ee.value)&&t?t.includes("https")?t:`https://${t}`:t;He(a,"static_expiry"===e?"string":e),de!==b.CHANNEL_TYPE.WHATSAPP&&de!==b.CHANNEL_TYPE.RCS||null==Ve||Ve(null!==(l=q.index)&&void 0!==l?l:0,a,"custom_link"===e||xe===O.POD.CHATBOT&&"custom_text"===e,e),de===b.CHANNEL_TYPE.WEBPUSH&&(null==Be||Be(null!==(i=q.index)&&void 0!==i?i:0,a))}function He(e,t,l){var i,a,n,s,o;const u="custom_link"===t?"link":"custom_text"===t?"string":t;if(de!==b.CHANNEL_TYPE.WHATSAPP&&de!==b.CHANNEL_TYPE.WEBPUSH&&de!==b.CHANNEL_TYPE.RCS){const l=_.getVariableNameForEmailByIndex(I+1),a=null===document||void 0===document?void 0:document.getElementById("mobile"===ue?"template_html_mobile":"template_html_desktop"),n=de===b.CHANNEL_TYPE.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:q.variableName);const s=ce.map(((t,l)=>l===I?Object.assign(Object.assign({},t),{type:u,updatedValue:e}):t));null==ge||ge(s)}if(de===b.CHANNEL_TYPE.WEBPUSH){const t=ce,l=t=>null==t?void 0:t.map(((t,l)=>l===I?Object.assign(Object.assign({},t),{type:u,updatedValue:e}):t)),i={BODY:"BODY"===$?l(t.body):t.body,TITLE:$===g.WEB_PUSH_COMPONENT_TYPE.TITLE.toUpperCase()?l(t.title):t.title};null==ge||ge((e=>Object.assign(Object.assign({},e),{title:i.TITLE,body:i.BODY,buttons:t.buttons})))}if(de===b.CHANNEL_TYPE.WHATSAPP||de===b.CHANNEL_TYPE.RCS){if(null!=Te&&Te>-1&&Ee){const l=Object.assign({},ce).cards.map(((l,i)=>{var a,n,s;return"BODY"===$?Object.assign(Object.assign({},l),{body:null===(a=l.body)||void 0===a?void 0:a.map(((t,l)=>I===l?Object.assign(Object.assign({},t),{type:u,updatedValue:e}):t))}):"TITLE"===$?Object.assign(Object.assign({},l),{title:null===(n=l.title)||void 0===n?void 0:n.map(((t,l)=>I===l?Object.assign(Object.assign({},t),{type:u,updatedValue:e}):t))}):"BUTTONS"===$?Object.assign(Object.assign({},l),{buttons:null===(s=l.buttons)||void 0===s?void 0:s.map(((l,i)=>i===I?Object.assign(Object.assign({},l),{buttonVariable:"custom_link"===t?"((customPlaceholderName))":e,example:"COPY_CODE"===l.type?e:[e]}):l))}):l}));return void(null==ge||ge((e=>Object.assign(Object.assign({},e),{cards:l}))))}const i=null!=Te&&Te>-1?ce.cards[Te]:ce;let d=i.body,r=i.title,c=i.header,p=i.buttons;if("BODY"===$?d=null===(a=i.body)||void 0===a?void 0:a.map(((t,l)=>l===I?Object.assign(Object.assign({},t),{type:u,updatedValue:e}):t)):"TITLE"===$?r=null===(n=null==i?void 0:i.title)||void 0===n?void 0:n.map(((t,l)=>l===I?Object.assign(Object.assign({},t),{type:u,updatedValue:e}):t)):"HEADER"===$?c=null===(s=i.header)||void 0===s?void 0:s.map(((t,l)=>l===I?Object.assign(Object.assign({},t),{type:u,updatedValue:e}):t)):"BUTTONS"===$&&(p=null===(o=i.buttons)||void 0===o?void 0:o.map(((i,a)=>a===I?Object.assign(Object.assign({},i),{buttonVariable:"custom_link"===t?"((customPlaceholderName))":e,example:"COPY_CODE"===i.type?e:[e],queryParams:null!=l?l:[]}):i))),null!=Te&&Te>-1){const e=C.default(ce.cards);e[Te]={header:c,body:d,buttons:p,title:r},null==ge||ge((t=>Object.assign(Object.assign({},t),{cards:e})))}else null==ge||ge((e=>Object.assign(Object.assign({},e),{header:c,body:d,buttons:p,title:r})))}}function Ve(e,t,l,i){var a,n,s,o,u,d,r,c,p,v,b,g;if(null!=Te&&Te>-1&&Ee){const n=Object.assign({},pe).components.map((l=>{var i;return m.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,s,o,u,d,r,c,p,v;if("BODY"===l.type&&"BODY"===$){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!==(o=null===(s=null===(n=l.example)||void 0===n?void 0:n.body_text)||void 0===s?void 0:s[0])&&void 0!==o?o:[]];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"===$){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"===$){const i=null===(v=l.buttons)||void 0===v?void 0:v.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=C.default(pe);if(l){const l=null===(a=Object.assign({},pe).mapping.cards)||void 0===a?void 0:a.map(((l,a)=>{var n,s,o,u;if("BODY"===$)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"===$)return Object.assign(Object.assign({},l),{title:null===(s=null==l?void 0:l.title)||void 0===s?void 0:s.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+10}))`:t:l))});if("BUTTONS"===$&&(null==l?void 0:l.buttons)){let n=-1,s=-1;return null===(o=pe.components[Ae].cards)||void 0===o||o[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&&(s=n))})))})),Object.assign(Object.assign({},l),{buttons:null===(u=l.buttons)||void 0===u?void 0:u.map(((e,l)=>l===s?"custom_link"===i?"((customPlaceholderName))":t:e))})}return l}));s.mapping.cards=l}return s.components=n,void(null==me||me(s))}const O=null!=Te&&Te>-1?{components:null===(n=Object.assign({},pe).components[Ae].cards)||void 0===n?void 0:n[Te].components,mapping:null===(s=Object.assign({},pe).mapping.cards)||void 0===s?void 0:s[Te]}:Object.assign({},pe),j=null===(o=null==O?void 0:O.components)||void 0===o?void 0:o.map((l=>{var i,a,n,s,o,u,d,r,c,p,v,m,b,g,O,j;const x=Object.assign({},l);if("BODY"===l.type&&"BODY"===$&&(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===(o=null===(s=x.example)||void 0===s?void 0:s.body_text)||void 0===o?void 0:o[0])&&void 0!==u?u:[]];l[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const i=Object.assign(Object.assign({},x.example),{body_text:[l]});return Object.assign(Object.assign({},x),{example:i})}if("TITLE"===l.type&&"TITLE"===$){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!==(m=null===(v=null===(p=x.example)||void 0===p?void 0:p.title_text)||void 0===v?void 0:v[0])&&void 0!==m?m:[]];l[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const i=Object.assign(Object.assign({},x.example),{title_text:[l]});return Object.assign(Object.assign({},x),{example:i})}}else if("HEADER"===l.type&&"HEADER"===$){if(null===(b=l.example)||void 0===b?void 0:b.header_text){const l=[...null!==(O=null===(g=x.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({},x.example),{header_text:l});return Object.assign(Object.assign({},x),{example:i})}}else{if("BUTTONS"===l.type&&"BUTTONS"===$){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({},x),{buttons:i}):x}if("limited_time_offer"===l.type&&"limited_time_offer"===$)return Object.assign(Object.assign({},x),{example:Object.assign(Object.assign({},x.example),{limited_time_offer:t})})}return l}));if(O.components=j,l)if("BODY"===$&&(null===(u=null==O?void 0:O.mapping)||void 0===u?void 0:u.body))O.mapping=Object.assign(Object.assign({},O.mapping),{body:null===(r=null===(d=O.mapping)||void 0===d?void 0:d.body)||void 0===r?void 0:r.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+10}))`:t:l))});else if("TITLE"===$&&(null===(c=null==O?void 0:O.mapping)||void 0===c?void 0:c.title))O.mapping=Object.assign(Object.assign({},O.mapping),{title:null===(v=null===(p=O.mapping)||void 0===p?void 0:p.title)||void 0===v?void 0:v.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+10}))`:t:l))});else if("HEADER"===$&&(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"===$&&(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!=Te&&Te>-1&&pe){const e=C.default(pe);e.components[Ae].cards[Te].components=O.components,e.mapping.cards[Te]=O.mapping,null==me||me(e)}else null==me||me(Object.assign({},O))}n.useEffect((()=>{F&&(null==R||R())}),[F]),n.useEffect((()=>{!function(){var e,t,l,i,a;const n="mobile"===ue?"template_html_mobile":"template_html_desktop",s=document.getElementById(n),o=(null!==(i=null===(l=null===(t=null===(e=null==s?void 0:s.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==s?void 0:s.contentWindow)||void 0===a?void 0:a.document.head.innerHTML);de===b.CHANNEL_TYPE.EMAIL&&(null==be||be(o))}()}),[ve]),n.useEffect((()=>{!function(){var e,t;const l=[];let i=[];if(de!==b.CHANNEL_TYPE.MESSAGE||je){"link"===(null==q?void 0:q.type)?(l.push({label:"",options:[S,H]}),te(S)):"date_time"===(null==q?void 0:q.type)?(l.push({label:"",options:[S,H]}),te(V)):(l.push({label:"",options:[S,H,V]}),te(H));const e=null!=Oe?Oe:[];X([...l,...e.map((e=>{var t,l;return Object.assign(Object.assign({},e),{label:x.default.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!=Oe?Oe:[];X([{label:"",options:[H,S]},...e]),i=[{label:"",options:[H,S]},...e]}if((de===b.CHANNEL_TYPE.WHATSAPP||de===b.CHANNEL_TYPE.EMAIL||de===b.CHANNEL_TYPE.MESSAGE||de===b.CHANNEL_TYPE.WEBPUSH||de===b.CHANNEL_TYPE.RCS)&&q.updatedValue)if(v.placeHolderNamePattern.test(q.updatedValue)&&(de===b.CHANNEL_TYPE.WHATSAPP||de===b.CHANNEL_TYPE.RCS)||q.updatedValue.startsWith("{{")&&de!==b.CHANNEL_TYPE.WHATSAPP&&de!==b.CHANNEL_TYPE.RCS){const e=function(e,t,l){var i;let a={label:"",value:""};const n=l===(b.CHANNEL_TYPE.WHATSAPP||b.CHANNEL_TYPE.RCS)?e.updatedValue.replace("[[","").replace("]]",""):e.updatedValue.replace("{{","").replace("}}","");if(W){let t=e.updatedValue;if(xe===O.POD.CHATBOT&&"BUTTONS"===$){const l=null==z?void 0:z.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}(q,i,de);e.value&&te(e)}else"date_time"===q.type?(te(V),K(q.updatedValue),Ve(null!==(e=q.index)&&void 0!==e?e:0,q.updatedValue)):(null===(t=q.updatedValue)||void 0===t?void 0:t.startsWith("https"))?(te(S),K(q.updatedValue.split("https://")[1])):(te(H),K(q.updatedValue))}()}),[Te]),n.useEffect((()=>{ue&&ee&&Q&&setTimeout((()=>{He("custom_link"===(null==ee?void 0:ee.value)&&Q?Q.includes("https")?Q:`https://${Q}`:Q,ee.value)}),100)}),[ue]),n.useEffect((()=>{!le&&ee&&q.updatedValue&&setTimeout((()=>{He("custom_link"===(null==ee?void 0:ee.value)&&q.updatedValue?q.updatedValue.includes("https")?q.updatedValue:`https://${q.updatedValue}`:q.updatedValue,ee.value),ie(!0)}),100)}),[ee]);const ke=e=>{null==M||M(!1),"{{custom.url}}"===e.actualValue?Le({label:e.displayName,selected:!0,value:"custom_link"}):"{{custom.text}}"==e.actualValue?Le({label:e.displayName,selected:!0,value:"custom_text"}):"{{static.expiry}}"==e.actualValue?Le({label:e.displayName,selected:!0,value:"static_expiry"}):Le({label:e.displayName.replace("{{","").replace("}}","").trim().replace("."," "),selected:!0,value:e.actualValue,bikPlaceholderType:"string"})};function Be(e,t){var l;const i=C.default(pe),a=$.toLocaleLowerCase();(null===(l=i.webpushBroadcastConfig)||void 0===l?void 0:l[a])&&(i.webpushBroadcastConfig[a][e]=t),null==me||me(Object.assign({},i))}return e.jsxs(P,Object.assign({channel:de,focused:F,onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1)},{children:[e.jsx("div",Object.assign({style:{marginBottom:8}},{children:e.jsxs(j.BodySecondary,Object.assign({style:{color:re&&!ee?T.COLORS.content.negative:T.COLORS.content.primary}},{children:[null===(s=q.variableName)||void 0===s?void 0:s.replace("{{","").replace("}}","")," ","link"===(null==q?void 0:q.type)?"link":"variable"]}))})),e.jsx("div",Object.assign({style:{marginBottom:12}},{children:W?e.jsxs("div",Object.assign({style:{display:"flex",border:"#E0E0E0 1px solid",borderRadius:4,padding:10,justifyContent:(null==ee?void 0:ee.label)?"space-between":"flex-end",backgroundColor:"date_time"===(null==q?void 0:q.type)&&he?T.COLORS.background.base:void 0}},{children:[e.jsx(j.BodyPrimary,Object.assign({numberOfLines:1},{children:xe===O.POD.CHATBOT?["static_expiry","custom_text","custom_link"].includes(null!==(f=null==ee?void 0:ee.value)&&void 0!==f?f:"")?null==ee?void 0:ee.label:null==ee?void 0:ee.value:p.truncate(null!==(N=null==ee?void 0:ee.label)&&void 0!==N?N:"",20,!0)})),_e||"date_time"===(null==q?void 0:q.type)&&he?e.jsx(e.Fragment,{}):e.jsx(t.default,{onClick:()=>{(()=>{let e=Array.isArray(ae)?[...ae]:[];const t=(t,l,i)=>{const a=y.updateVariables({variableList:e,categoryDisplayName:t,variableDisplayName:l,variableValue:i});Array.isArray(a)&&(e=a)};xe===O.POD.CHATBOT&&Z!==O.BUTTON_TYPE.URL&&"limited_time_offer"!==$&&t("Custom Variables","Custom Text","{{custom.text}}"),Z===O.BUTTON_TYPE.URL&&xe===O.POD.CHATBOT?t("Custom Variables","Custom URL","{{custom.url}}"):"limited_time_offer"===$?t("Static Variables","Static Expiry","{{static.expiry}}"):Z===O.BUTTON_TYPE.COPY_CODE&&t("Custom Variables","Custom Text","{{custom.text}}"),ne(e)})(),se((()=>ke)),oe(!0)},width:24,height:24,color:T.COLORS.content.primary})]})):e.jsx(r.Dropdown,{disabled:_e,options:J,isSearchable:!1,onSelect:Le,defaultOptions:ee?[Object.assign(Object.assign({},ee),{selected:!0})]:[]})})),("custom_text"===(null==ee?void 0:ee.value)||"custom_link"===(null==ee?void 0:ee.value))&&e.jsx(c.Input,{state:_e?"disabled":"none",labelText:"custom_text"===(null==ee?void 0:ee.value)?"Custom text value":"custom_link"===(null==ee?void 0:ee.value)?"Custom URL value":"",id:`variable-value-${null==ee?void 0:ee.value}-${I}`,value:Q,errorMessage:re&&(null===(k=null==fe?void 0:fe.buttons)||void 0===k?void 0:k.includes(null!==(B=null==q?void 0:q.index)&&void 0!==B?B:-1))?Q&&0!==Q.trim().length?"custom_link"!==ee.value||/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$/.test(`https://${Q.trim()}`)&&0!==Q.trim().length?"custom_link"!==ee.value&&Q.length>30?"Length cannot be more than 30":"BUTTONS"===$&&"custom_link"!==ee.value?"Enter valid alpha numeric code":"":"Enter valid URL":"Required field":"",maxCharLimit:Ce||("custom_link"===(null==ee?void 0:ee.value)?2e3:"BUTTONS"===$?15:30),noKeyDownChange:!0,prefixText:"custom_link"===(null==ee?void 0:ee.value)?"https://":"",placeholder:"link"===q.type||"custom_link"===ee.value?"Enter custom URL here":"Enter custom text here",onChangeText:e=>{Se(ee.value,e)}}),"static_expiry"===(null==ee?void 0:ee.value)&&e.jsxs("div",Object.assign({style:{position:"relative"}},{children:[(_e||Ne)&&e.jsxs(A,Object.assign({onClick:e=>e.preventDefault(),style:{display:"flex",justifyContent:"space-between"}},{children:[e.jsx(L,{}),e.jsx(L,{})]})),e.jsx(d.CustomDateTime,{placement:"auto",time:Q?i.format(new Date(Q),"hh:mm a"):i.format(new Date,"hh:mm a"),date:Q?new Date(Q):new Date,minDate:new Date,error:"",setError:()=>{},onChange:e=>{Se("static_expiry",e.toISOString())}})]})),"static_expiry"===(null==ee?void 0:ee.value)&&Pe&&e.jsx("div",Object.assign({style:{marginTop:8}},{children:e.jsx(o.Alert,{containerStyle:{padding:"4px 8px"},icon:()=>e.jsx(l.default,{width:16,height:16,color:T.COLORS.content.secondary}),type:u.ALERT_TYPES.NEUTRAL,text:"Please use the same expiration code that you applied when creating\nthe code on Shopify"})})),"link"===q.type&&"custom_link"!==(null==ee?void 0:ee.value)&&!Ee&&!ye&&xe===O.POD.CHATBOT&&e.jsx(h.QueryParamsComponent,{isError:null!==(w=null===(Y=null==fe?void 0:fe.buttons)||void 0===Y?void 0:Y.includes(null!==(D=null==q?void 0:q.index)&&void 0!==D?D:-1))&&void 0!==w&&w,params:null!==(U=q.queryParams)&&void 0!==U?U:[],onChange:e=>{He(q.updatedValue,"link",e)},variableValue:q.updatedValue})]}))};
|
|
19
|
+
`,L={value:"custom_link",label:"Custom URL"},S={value:"custom_text",label:"Custom text"},H={value:"static_expiry",label:"Static Expiry"};exports.Container=N,exports.default=s=>{var C,f,V,k,B,D,Y,w,U;const{onFocus:R,variable:q,index:I,showVariableModal:W,setShowDiscountCheckBox:M,componentType:$,CTAoptions:z,buttonType:Z}=s,[F,G]=n.useState(!1),[Q,K]=n.useState(""),[J,X]=n.useState([]),[ee,te]=n.useState(),[le,ie]=n.useState(!1),{variableList:ae,setVariableList:ne,setVariableCallback:se,setShowVariablePicker:oe,device:ue,channel:de,isError:re,originalVariableList:ce,template:pe,templateSelectionTriggered:ve,setTemplate:me,setDisplayContent:be,setOriginalVariableList:ge,globalNormalizedPlaceholders:Oe,enabledCustomText:je,pod:xe,selectedCarouselIndex:Te,isProductCarouselType:Ee,isWhatsappCarousel:ye,disableEditVariable:_e,disableEditExpiry:he,templateErrorIndexes:Ce,maxCharLimit:fe,disableDatePicker:Ne,showDiscountCodeExpiryInfo:Pe,cardIndex:Ae=1}=E.useTemplateModalContext();function Le(e,t){var l,i,a,n;const s=e;K(""),te(s),de===b.CHANNEL_TYPE.WHATSAPP||de===b.CHANNEL_TYPE.RCS?"custom_text"!==s.value&&"custom_link"!==s.value&&"static_expiry"!==s.value?(He(null!==(l=s.value)&&void 0!==l?l:"","string"),null==Ve||Ve(null!==(i=q.index)&&void 0!==i?i:0,s.value,!0)):(null==Ve||Ve(null!==(a=q.index)&&void 0!==a?a:0,"",!0,s.value),He("","url"===s.bikPlaceholderType?"link":"string")):"custom_text"!==s.value&&"custom_link"!==s.value?(He(s.value,"url"===s.bikPlaceholderType?"link":"string"),de==b.CHANNEL_TYPE.WEBPUSH&&(null==Be||Be(null!==(n=q.index)&&void 0!==n?n:0,s.value))):(K(""),He("",s.value))}function Se(e,t){var l,i;K(t);const a="custom_link"===(null==ee?void 0:ee.value)&&t?t.includes("https")?t:`https://${t}`:t;He(a,"static_expiry"===e?"string":e),de!==b.CHANNEL_TYPE.WHATSAPP&&de!==b.CHANNEL_TYPE.RCS||null==Ve||Ve(null!==(l=q.index)&&void 0!==l?l:0,a,"custom_link"===e||xe===O.POD.CHATBOT&&"custom_text"===e,e),de===b.CHANNEL_TYPE.WEBPUSH&&(null==Be||Be(null!==(i=q.index)&&void 0!==i?i:0,a))}function He(e,t,l){var i,n,s,o,u;const d="custom_link"===t?"link":"custom_text"===t?"string":t;if(de!==b.CHANNEL_TYPE.WHATSAPP&&de!==b.CHANNEL_TYPE.WEBPUSH&&de!==b.CHANNEL_TYPE.RCS){const l=_.getVariableNameForEmailByIndex(I+1),a=null===document||void 0===document?void 0:document.getElementById("mobile"===ue?"template_html_mobile":"template_html_desktop"),n=de===b.CHANNEL_TYPE.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:q.variableName);const s=ce.map(((t,l)=>l===I?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t));null==ge||ge(s)}if(de===b.CHANNEL_TYPE.WEBPUSH){const t=ce,l=t=>null==t?void 0:t.map(((t,l)=>l===I?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t)),i={BODY:"BODY"===$?l(t.body):t.body,TITLE:$===g.WEB_PUSH_COMPONENT_TYPE.TITLE.toUpperCase()?l(t.title):t.title};null==ge||ge((e=>Object.assign(Object.assign({},e),{title:i.TITLE,body:i.BODY,buttons:t.buttons})))}if(de===b.CHANNEL_TYPE.WHATSAPP||de===b.CHANNEL_TYPE.RCS){if(null!=Te&&Te>-1&&Ee){const l=Object.assign({},ce).cards.map(((l,i)=>{var a,n,s;return"BODY"===$?Object.assign(Object.assign({},l),{body:null===(a=l.body)||void 0===a?void 0:a.map(((t,l)=>I===l?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t))}):"TITLE"===$?Object.assign(Object.assign({},l),{title:null===(n=l.title)||void 0===n?void 0:n.map(((t,l)=>I===l?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t))}):"BUTTONS"===$?Object.assign(Object.assign({},l),{buttons:null===(s=l.buttons)||void 0===s?void 0:s.map(((l,i)=>i===I?Object.assign(Object.assign({},l),{buttonVariable:"custom_link"===t?"((customPlaceholderName))":e,example:"COPY_CODE"===l.type?e:[e]}):l))}):l}));return void(null==ge||ge((e=>Object.assign(Object.assign({},e),{cards:l}))))}const i=null!=Te&&Te>-1?ce.cards[Te]:ce;let r=i.body,c=i.title,p=i.header,v=i.buttons;if("BODY"===$?r=null===(n=i.body)||void 0===n?void 0:n.map(((t,l)=>l===I?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t)):"TITLE"===$?c=null===(s=null==i?void 0:i.title)||void 0===s?void 0:s.map(((t,l)=>l===I?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t)):"HEADER"===$?p=null===(o=i.header)||void 0===o?void 0:o.map(((t,l)=>l===I?Object.assign(Object.assign({},t),{type:d,updatedValue:e}):t)):"BUTTONS"===$&&(v=null===(u=i.buttons)||void 0===u?void 0:u.map(((i,a)=>a===I?Object.assign(Object.assign({},i),{buttonVariable:"custom_link"===t?"((customPlaceholderName))":e,example:"COPY_CODE"===i.type?e:[e],queryParams:null!=l?l:[]}):i))),null!=Te&&Te>-1){const e=a.cloneDeep(ce.cards);e[Te]={header:p,body:r,buttons:v,title:c},null==ge||ge((t=>Object.assign(Object.assign({},t),{cards:e})))}else null==ge||ge((e=>Object.assign(Object.assign({},e),{header:p,body:r,buttons:v,title:c})))}}function Ve(e,t,l,i){var n,s,o,u,d,r,c,p,v,b,g,O;if(null!=Te&&Te>-1&&Ee){const s=Object.assign({},pe).components.map((l=>{var i;return m.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,s,o,u,d,r,c,p,v;if("BODY"===l.type&&"BODY"===$){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!==(o=null===(s=null===(n=l.example)||void 0===n?void 0:n.body_text)||void 0===s?void 0:s[0])&&void 0!==o?o:[]];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"===$){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"===$){const i=null===(v=l.buttons)||void 0===v?void 0:v.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})),o=a.cloneDeep(pe);if(l){const l=null===(n=Object.assign({},pe).mapping.cards)||void 0===n?void 0:n.map(((l,a)=>{var n,s,o,u;if("BODY"===$)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"===$)return Object.assign(Object.assign({},l),{title:null===(s=null==l?void 0:l.title)||void 0===s?void 0:s.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+10}))`:t:l))});if("BUTTONS"===$&&(null==l?void 0:l.buttons)){let n=-1,s=-1;return null===(o=pe.components[Ae].cards)||void 0===o||o[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&&(s=n))})))})),Object.assign(Object.assign({},l),{buttons:null===(u=l.buttons)||void 0===u?void 0:u.map(((e,l)=>l===s?"custom_link"===i?"((customPlaceholderName))":t:e))})}return l}));o.mapping.cards=l}return o.components=s,void(null==me||me(o))}const j=null!=Te&&Te>-1?{components:null===(s=Object.assign({},pe).components[Ae].cards)||void 0===s?void 0:s[Te].components,mapping:null===(o=Object.assign({},pe).mapping.cards)||void 0===o?void 0:o[Te]}:Object.assign({},pe),x=null===(u=null==j?void 0:j.components)||void 0===u?void 0:u.map((l=>{var i,a,n,s,o,u,d,r,c,p,v,m,b,g,O,j;const x=Object.assign({},l);if("BODY"===l.type&&"BODY"===$&&(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===(o=null===(s=x.example)||void 0===s?void 0:s.body_text)||void 0===o?void 0:o[0])&&void 0!==u?u:[]];l[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const i=Object.assign(Object.assign({},x.example),{body_text:[l]});return Object.assign(Object.assign({},x),{example:i})}if("TITLE"===l.type&&"TITLE"===$){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!==(m=null===(v=null===(p=x.example)||void 0===p?void 0:p.title_text)||void 0===v?void 0:v[0])&&void 0!==m?m:[]];l[e]=t.replace("{{","").replace("}}","").replace("((","").replace("))","");const i=Object.assign(Object.assign({},x.example),{title_text:[l]});return Object.assign(Object.assign({},x),{example:i})}}else if("HEADER"===l.type&&"HEADER"===$){if(null===(b=l.example)||void 0===b?void 0:b.header_text){const l=[...null!==(O=null===(g=x.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({},x.example),{header_text:l});return Object.assign(Object.assign({},x),{example:i})}}else{if("BUTTONS"===l.type&&"BUTTONS"===$){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({},x),{buttons:i}):x}if("limited_time_offer"===l.type&&"limited_time_offer"===$)return Object.assign(Object.assign({},x),{example:Object.assign(Object.assign({},x.example),{limited_time_offer:t})})}return l}));if(j.components=x,l)if("BODY"===$&&(null===(d=null==j?void 0:j.mapping)||void 0===d?void 0:d.body))j.mapping=Object.assign(Object.assign({},j.mapping),{body:null===(c=null===(r=j.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"===$&&(null===(p=null==j?void 0:j.mapping)||void 0===p?void 0:p.title))j.mapping=Object.assign(Object.assign({},j.mapping),{title:null===(b=null===(v=j.mapping)||void 0===v?void 0:v.title)||void 0===b?void 0:b.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+10}))`:t:l))});else if("HEADER"===$&&(null===(g=null==j?void 0:j.mapping)||void 0===g?void 0:g.header))j.mapping=Object.assign(Object.assign({},j.mapping),{header:j.mapping.header.map(((l,a)=>e===a?"custom_text"===i?`((editableVariable${a+20}))`:t:l))});else if("BUTTONS"===$&&(null===(O=null==j?void 0:j.mapping)||void 0===O?void 0:O.buttons)){let l=-1,a=-1;x.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))})))})),j.mapping=Object.assign(Object.assign({},j.mapping),{buttons:j.mapping.buttons.map(((e,l)=>l===a?"custom_link"===i?"((customPlaceholderName))":t:e))})}if(null!=Te&&Te>-1&&pe){const e=a.cloneDeep(pe);e.components[Ae].cards[Te].components=j.components,e.mapping.cards[Te]=j.mapping,null==me||me(e)}else null==me||me(Object.assign({},j))}n.useEffect((()=>{F&&(null==R||R())}),[F]),n.useEffect((()=>{!function(){var e,t,l,i,a;const n="mobile"===ue?"template_html_mobile":"template_html_desktop",s=document.getElementById(n),o=(null!==(i=null===(l=null===(t=null===(e=null==s?void 0:s.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==s?void 0:s.contentWindow)||void 0===a?void 0:a.document.head.innerHTML);de===b.CHANNEL_TYPE.EMAIL&&(null==be||be(o))}()}),[ve]),n.useEffect((()=>{!function(){var e,t;const l=[];let i=[];if(de!==b.CHANNEL_TYPE.MESSAGE||je){"link"===(null==q?void 0:q.type)?(l.push({label:"",options:[L,S]}),te(L)):"date_time"===(null==q?void 0:q.type)?(l.push({label:"",options:[L,S]}),te(H)):(l.push({label:"",options:[L,S,H]}),te(S));const e=null!=Oe?Oe:[];X([...l,...e.map((e=>{var t,l;return Object.assign(Object.assign({},e),{label:x.default.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!=Oe?Oe:[];X([{label:"",options:[S,L]},...e]),i=[{label:"",options:[S,L]},...e]}if((de===b.CHANNEL_TYPE.WHATSAPP||de===b.CHANNEL_TYPE.EMAIL||de===b.CHANNEL_TYPE.MESSAGE||de===b.CHANNEL_TYPE.WEBPUSH||de===b.CHANNEL_TYPE.RCS)&&q.updatedValue)if(v.placeHolderNamePattern.test(q.updatedValue)&&(de===b.CHANNEL_TYPE.WHATSAPP||de===b.CHANNEL_TYPE.RCS)||q.updatedValue.startsWith("{{")&&de!==b.CHANNEL_TYPE.WHATSAPP&&de!==b.CHANNEL_TYPE.RCS){const e=function(e,t,l){var i;let a={label:"",value:""};const n=l===(b.CHANNEL_TYPE.WHATSAPP||b.CHANNEL_TYPE.RCS)?e.updatedValue.replace("[[","").replace("]]",""):e.updatedValue.replace("{{","").replace("}}","");if(W){let t=e.updatedValue;if(xe===O.POD.CHATBOT&&"BUTTONS"===$){const l=null==z?void 0:z.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}(q,i,de);e.value&&te(e)}else"date_time"===q.type?(te(H),K(q.updatedValue),Ve(null!==(e=q.index)&&void 0!==e?e:0,q.updatedValue)):(null===(t=q.updatedValue)||void 0===t?void 0:t.startsWith("https"))?(te(L),K(q.updatedValue.split("https://")[1])):(te(S),K(q.updatedValue))}()}),[Te]),n.useEffect((()=>{ue&&ee&&Q&&setTimeout((()=>{He("custom_link"===(null==ee?void 0:ee.value)&&Q?Q.includes("https")?Q:`https://${Q}`:Q,ee.value)}),100)}),[ue]),n.useEffect((()=>{!le&&ee&&q.updatedValue&&setTimeout((()=>{He("custom_link"===(null==ee?void 0:ee.value)&&q.updatedValue?q.updatedValue.includes("https")?q.updatedValue:`https://${q.updatedValue}`:q.updatedValue,ee.value),ie(!0)}),100)}),[ee]);const ke=e=>{null==M||M(!1),"{{custom.url}}"===e.actualValue?Le({label:e.displayName,selected:!0,value:"custom_link"}):"{{custom.text}}"==e.actualValue?Le({label:e.displayName,selected:!0,value:"custom_text"}):"{{static.expiry}}"==e.actualValue?Le({label:e.displayName,selected:!0,value:"static_expiry"}):Le({label:e.displayName.replace("{{","").replace("}}","").trim().replace("."," "),selected:!0,value:e.actualValue,bikPlaceholderType:"string"})};function Be(e,t){var l;const i=a.cloneDeep(pe),n=$.toLocaleLowerCase();(null===(l=i.webpushBroadcastConfig)||void 0===l?void 0:l[n])&&(i.webpushBroadcastConfig[n][e]=t),null==me||me(Object.assign({},i))}return e.jsxs(N,Object.assign({channel:de,focused:F,onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1)},{children:[e.jsx("div",Object.assign({style:{marginBottom:8}},{children:e.jsxs(j.BodySecondary,Object.assign({style:{color:re&&!ee?T.COLORS.content.negative:T.COLORS.content.primary}},{children:[null===(C=q.variableName)||void 0===C?void 0:C.replace("{{","").replace("}}","")," ","link"===(null==q?void 0:q.type)?"link":"variable"]}))})),e.jsx("div",Object.assign({style:{marginBottom:12}},{children:W?e.jsxs("div",Object.assign({style:{display:"flex",border:"#E0E0E0 1px solid",borderRadius:4,padding:10,justifyContent:(null==ee?void 0:ee.label)?"space-between":"flex-end",backgroundColor:"date_time"===(null==q?void 0:q.type)&&he?T.COLORS.background.base:void 0}},{children:[e.jsx(j.BodyPrimary,Object.assign({numberOfLines:1},{children:xe===O.POD.CHATBOT?["static_expiry","custom_text","custom_link"].includes(null!==(f=null==ee?void 0:ee.value)&&void 0!==f?f:"")?null==ee?void 0:ee.label:null==ee?void 0:ee.value:p.truncate(null!==(V=null==ee?void 0:ee.label)&&void 0!==V?V:"",20,!0)})),_e||"date_time"===(null==q?void 0:q.type)&&he?e.jsx(e.Fragment,{}):e.jsx(t.default,{onClick:()=>{(()=>{let e=Array.isArray(ae)?[...ae]:[];const t=(t,l,i)=>{const a=y.updateVariables({variableList:e,categoryDisplayName:t,variableDisplayName:l,variableValue:i});Array.isArray(a)&&(e=a)};xe===O.POD.CHATBOT&&Z!==O.BUTTON_TYPE.URL&&"limited_time_offer"!==$&&t("Custom Variables","Custom Text","{{custom.text}}"),Z===O.BUTTON_TYPE.URL&&xe===O.POD.CHATBOT?t("Custom Variables","Custom URL","{{custom.url}}"):"limited_time_offer"===$?t("Static Variables","Static Expiry","{{static.expiry}}"):Z===O.BUTTON_TYPE.COPY_CODE&&t("Custom Variables","Custom Text","{{custom.text}}"),ne(e)})(),se((()=>ke)),oe(!0)},width:24,height:24,color:T.COLORS.content.primary})]})):e.jsx(r.Dropdown,{disabled:_e,options:J,isSearchable:!1,onSelect:Le,defaultOptions:ee?[Object.assign(Object.assign({},ee),{selected:!0})]:[]})})),("custom_text"===(null==ee?void 0:ee.value)||"custom_link"===(null==ee?void 0:ee.value))&&e.jsx(c.Input,{state:_e?"disabled":"none",labelText:"custom_text"===(null==ee?void 0:ee.value)?"Custom text value":"custom_link"===(null==ee?void 0:ee.value)?"Custom URL value":"",id:`variable-value-${null==ee?void 0:ee.value}-${I}`,value:Q,errorMessage:re&&(null===(k=null==Ce?void 0:Ce.buttons)||void 0===k?void 0:k.includes(null!==(B=null==q?void 0:q.index)&&void 0!==B?B:-1))?Q&&0!==Q.trim().length?"custom_link"!==ee.value||/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$/.test(`https://${Q.trim()}`)&&0!==Q.trim().length?"custom_link"!==ee.value&&Q.length>30?"Length cannot be more than 30":"BUTTONS"===$&&"custom_link"!==ee.value?"Enter valid alpha numeric code":"":"Enter valid URL":"Required field":"",maxCharLimit:fe||("custom_link"===(null==ee?void 0:ee.value)?2e3:"BUTTONS"===$?15:30),noKeyDownChange:!0,prefixText:"custom_link"===(null==ee?void 0:ee.value)?"https://":"",placeholder:"link"===q.type||"custom_link"===ee.value?"Enter custom URL here":"Enter custom text here",onChangeText:e=>{Se(ee.value,e)}}),"static_expiry"===(null==ee?void 0:ee.value)&&e.jsxs("div",Object.assign({style:{position:"relative"}},{children:[(_e||Ne)&&e.jsxs(P,Object.assign({onClick:e=>e.preventDefault(),style:{display:"flex",justifyContent:"space-between"}},{children:[e.jsx(A,{}),e.jsx(A,{})]})),e.jsx(d.CustomDateTime,{placement:"auto",time:Q?i.format(new Date(Q),"hh:mm a"):i.format(new Date,"hh:mm a"),date:Q?new Date(Q):new Date,minDate:new Date,error:"",setError:()=>{},onChange:e=>{Se("static_expiry",e.toISOString())}})]})),"static_expiry"===(null==ee?void 0:ee.value)&&Pe&&e.jsx("div",Object.assign({style:{marginTop:8}},{children:e.jsx(o.Alert,{containerStyle:{padding:"4px 8px"},icon:()=>e.jsx(l.default,{width:16,height:16,color:T.COLORS.content.secondary}),type:u.ALERT_TYPES.NEUTRAL,text:"Please use the same expiration code that you applied when creating\nthe code on Shopify"})})),"link"===q.type&&"custom_link"!==(null==ee?void 0:ee.value)&&!Ee&&!ye&&xe===O.POD.CHATBOT&&e.jsx(h.QueryParamsComponent,{isError:null!==(w=null===(D=null==Ce?void 0:Ce.buttons)||void 0===D?void 0:D.includes(null!==(Y=null==q?void 0:q.index)&&void 0!==Y?Y:-1))&&void 0!==w&&w,params:null!==(U=q.queryParams)&&void 0!==U?U:[],onChange:e=>{He(q.updatedValue,"link",e)},variableValue:q.updatedValue})]}))};
|
package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { CHANNEL_TYPE } from "../../template-preview
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { ComponentType } from './modal';
|
|
1
|
+
import { AllTemplateVariables, CHANNEL_TYPE } from "../../template-preview";
|
|
2
|
+
import { WEB_PUSH_COMPONENT_TYPE, WebpushComponentKeyType, WebpushTemplateVariables } from "../../template-preview/models/WebpushTemplate";
|
|
3
|
+
import { WhatsAppTemplate, WhatsAppTemplateVariables } from "../../template-preview/models/WhatsAppTemplate";
|
|
4
|
+
export type ComponentType = WhatsAppTemplate['components'][0];
|
|
6
5
|
export interface VariableConnectorWhatsAppProps {
|
|
7
6
|
originalVariableList: WhatsAppTemplateVariables | WebpushTemplateVariables | AllTemplateVariables;
|
|
8
7
|
descriptionComponent: ComponentType | WebpushComponentKeyType;
|
package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("../../input/Input.js"),a=require("../../template-preview/models/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("../../input/Input.js");require("../../template-preview/TemplatePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js");var a=require("../../../constants/Theme.js");require("../../curtain/CurtainHelper.js"),require("../../variable-picker-v3/model.js"),require("../../template-preview/models/TemplateMeta.js"),require("../../template-preview/models/WhatsAppTemplate.js");var r=require("../../template-preview/models/Channels.js"),t=require("../../TypographyStyle.js"),l=require("../context/templateModalContext.js"),s=require("./VariableConnector.js");exports.default=d=>{var n,o,p,u,v,c,m;const{descriptionComponent:x,type:b,showVariableModal:j,originalList:h,channel:y}=d,{originalVariableList:T,disableEditVariable:E,selectedCarouselIndex:C,initialExpiryDateTime:L}=l.useTemplateModalContext();let f=T;y&&(y==r.CHANNEL_TYPE.WHATSAPP||y==r.CHANNEL_TYPE.RCS)&&h&&(f=h);const w=x.type;if("BODY"===w||"TITLE"===w.toLocaleUpperCase())return e.jsx("div",{children:null===(o=null!=C&&C>-1?"TITLE"===w.toLocaleUpperCase()?null===(n=f.cards[C])||void 0===n?void 0:n.title:f.cards[C].body:"TITLE"===w.toLocaleUpperCase()?(r.CHANNEL_TYPE.RCS,null==f?void 0:f.title):null==f?void 0:f.body)||void 0===o?void 0:o.map(((r,l)=>E||!r.isEditableVariable?e.jsxs("div",Object.assign({style:{margin:"16px 8px"}},{children:[e.jsxs(t.BodySecondary,Object.assign({style:{color:a.COLORS.content.primary}},{children:["HEADER"===b?"Header":""," Locked variable ",l+1]})),e.jsx(i.Input,{state:"disabled",placeholder:r.variableName,onChangeText:()=>{}})]}),l):e.jsx(s.default,{index:l,variable:r,showVariableModal:j,componentType:w},`${l}-${r.index}`)))});if("HEADER"===w)return e.jsx("div",{children:null===(p=null!=C&&C>-1?f.cards[C].header:null==f?void 0:f.header)||void 0===p?void 0:p.map(((r,l)=>r.isEditableVariable?e.jsx(s.default,{index:l,variable:r,showVariableModal:j,componentType:w},`${l}-${r.index}`):e.jsxs("div",Object.assign({style:{margin:"16px 8px"}},{children:[e.jsxs(t.BodySecondary,Object.assign({style:{color:a.COLORS.content.primary}},{children:["HEADER"===b?"Header":""," Locked variable ",l+1]})),e.jsx(i.Input,{state:"disabled",placeholder:r.variableName,onChangeText:()=>{}})]}),l)))});if("limited_time_offer"===w){let i=null!==(v=null===(u=x.example)||void 0===u?void 0:u.limited_time_offer)&&void 0!==v?v:(new Date).toISOString();return L&&(i=new Date(L).toISOString()),e.jsx("div",{children:e.jsx(s.default,{index:0,variable:{variableName:null!==(m=null===(c=null==x?void 0:x.limited_time_offer)||void 0===c?void 0:c.text)&&void 0!==m?m:"Expires after",updatedValue:i,type:"date_time",isEditableVariable:!0,index:0},showVariableModal:j,componentType:w},`${w}`)})}return e.jsx(e.Fragment,{})};
|