@bikdotai/bik-component-library 0.0.687-beta.4 → 0.0.687-beta.6
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/esm/amplitude/index.d.ts +21 -0
- package/dist/esm/amplitude/index.js +1 -1
- package/dist/esm/amplitude/model.d.ts +51 -0
- package/dist/esm/components/InfiniteScroll/InfiniteScroll.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/CustomField/components/CustomField.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/Segment/components/SegmentFilter.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/UserProperty/components/UserPropertyFilter.js +1 -1
- package/dist/esm/components/QueryBuilder/QueryBuilder.d.ts +12 -0
- package/dist/esm/components/QueryBuilder/QueryBuilder.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.js +1 -1
- package/dist/esm/components/QueryBuilder/components/AddNodeButton.js +1 -1
- package/dist/esm/components/QueryBuilder/components/AllowedListDropdown.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/EmojiPicker.js +14 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/FreeText.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js +2 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/IgPicker.js +234 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLast.js +5 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLastAgo.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTwoLast.js +6 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/IntegerPositiveSingle.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/IntegerSingleValue.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/MultiselectDropdownFreeText.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/NumberTime.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleDate.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/StringSingleValue.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoDate.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoNumberInputsSeperatedByAnd.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Connector.js +1 -1
- package/dist/esm/components/QueryBuilder/components/DeleteButton.js +1 -1
- package/dist/esm/components/QueryBuilder/components/DropdownWrapper.js +1 -1
- package/dist/esm/components/QueryBuilder/components/InputLoader.js +4 -4
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.d.ts +25 -0
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js +4 -4
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/AddPropertyButton.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.d.ts +20 -0
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodes.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/QueryBuilderNode.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNodes.js +1 -1
- package/dist/esm/components/QueryBuilder/helpers/ApiResponse.helper.js +1 -1
- package/dist/esm/components/QueryBuilder/helpers/Connector.helper.js +1 -1
- package/dist/esm/components/QueryBuilder/hooks/useQueryBuilderCache.js +1 -1
- package/dist/esm/components/QueryBuilder/redux/queryBuilder.reducer.d.ts +56 -0
- package/dist/esm/components/QueryBuilder/redux/queryBuilder.reducer.js +1 -1
- package/dist/esm/components/QueryBuilder/redux/queryBuilderCache.reducer.d.ts +22 -0
- package/dist/esm/components/QueryBuilder/redux/queryBuilderCache.reducer.js +1 -1
- package/dist/esm/components/QueryBuilder/types/QueryBuilder.type.d.ts +90 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderAPI.type.d.ts +21 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderConnector.type.d.ts +54 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderNodeProps.type.d.ts +14 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderOperator.type.d.ts +130 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderPropertyProps.d.ts +39 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderProps.type.d.ts +55 -0
- package/dist/esm/components/SearchFilter/components/DatePickerButton.js +1 -1
- package/dist/esm/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
- package/dist/esm/components/SearchFilter/components/FilterChipListRenderer.js +1 -1
- package/dist/esm/components/SearchFilter/components/SearchFilterItem.js +1 -1
- package/dist/esm/components/SearchFilter/index.d.ts +6 -0
- package/dist/esm/components/SearchFilter/index.js +1 -1
- package/dist/esm/components/SearchFilter/types/SearchFilter.type.d.ts +41 -0
- package/dist/esm/components/TablePagination/TablePagination.d.ts +17 -0
- package/dist/esm/components/TablePagination/TablePagination.js +1 -1
- package/dist/esm/components/TablePagination/TablePaginationCard.d.ts +14 -0
- package/dist/esm/components/TablePagination/TablePaginationCard.js +9 -1
- package/dist/esm/components/TypographyStyle.d.ts +117 -0
- package/dist/esm/components/WhatsAppTextEditor/CustomEditor.styled.js +22 -1
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.d.ts +46 -0
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.js +1 -1
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.d.ts +24 -0
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js +34 -1
- package/dist/esm/components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.d.ts +23 -0
- package/dist/esm/components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js +1 -1
- package/dist/esm/components/accordion/Accordion.d.ts +31 -0
- package/dist/esm/components/accordion/Accordion.js +1 -1
- package/dist/esm/components/accordion/Accordion.style.js +2 -2
- package/dist/esm/components/accordion/AccordionArrow.js +1 -1
- package/dist/esm/components/action-button/ActionButton.styled.js +2 -2
- package/dist/esm/components/action-button/ActionButtons.d.ts +14 -0
- package/dist/esm/components/action-button/ActionButtons.js +1 -1
- package/dist/esm/components/add-variableV2/AddVariableV2.d.ts +61 -0
- package/dist/esm/components/add-variableV2/AddVariableV2.js +1 -1
- package/dist/esm/components/add-variableV2/AddVariableV2.styled.js +3 -3
- package/dist/esm/components/add-variableV2/AddVariableV2SideModal.d.ts +23 -0
- package/dist/esm/components/add-variableV2/types.d.ts +8 -0
- package/dist/esm/components/ai-modals/ActivateBikAI.d.ts +12 -0
- package/dist/esm/components/ai-modals/ActivateBikAI.js +1 -1
- package/dist/esm/components/ai-modals/AiCreditsExhausted.d.ts +11 -0
- package/dist/esm/components/ai-modals/AiCreditsExhausted.js +1 -1
- package/dist/esm/components/ai-modals/AiCreditsLow.d.ts +10 -0
- package/dist/esm/components/ai-modals/AiCreditsLow.js +1 -1
- package/dist/esm/components/ai-modals/AiSyncProgress.d.ts +11 -0
- package/dist/esm/components/ai-modals/AiSyncProgress.js +1 -1
- package/dist/esm/components/alerts/Alert.d.ts +25 -0
- package/dist/esm/components/alerts/Alert.js +1 -1
- package/dist/esm/components/alerts/AlertHelper.d.ts +42 -0
- package/dist/esm/components/analytics-card/AnalyticsCard.d.ts +14 -0
- package/dist/esm/components/analytics-card/AnalyticsCard.styled.d.ts +21 -0
- package/dist/esm/components/analytics-card/AnalyticsCard.styled.js +46 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChip.d.ts +23 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChip.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.d.ts +52 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMetric.d.ts +21 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMetric.js +5 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.d.ts +9 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.d.ts +37 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/CommonStyles.js +113 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.d.ts +49 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.styles.js +4 -4
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Legend/Legend.js +19 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.d.ts +58 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.js +16 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChart.d.ts +6 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js +2 -2
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.d.ts +8 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +5 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartInputData.d.ts +23 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.d.ts +6 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.d.ts +90 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.styles.js +6 -6
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.d.ts +6 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.d.ts +51 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.d.ts +6 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraphModel.d.ts +24 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.d.ts +18 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.d.ts +49 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.styles.js +3 -3
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.d.ts +35 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapStyled.js +38 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.d.ts +20 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js +32 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/Chip.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/HorinzontalBar.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.d.ts +30 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.js +31 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.d.ts +22 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.js +1 -1
- package/dist/esm/components/avatar/Avatar.d.ts +53 -0
- package/dist/esm/components/avatar/Avatar.js +1 -1
- package/dist/esm/components/avatar/AvatarHelper.d.ts +24 -0
- package/dist/esm/components/bik-layout/BikHeader.d.ts +19 -0
- package/dist/esm/components/bik-layout/BikHeader.js +1 -1
- package/dist/esm/components/bik-layout/BikLayout.d.ts +27 -0
- package/dist/esm/components/bik-layout/BikLayout.js +1 -1
- package/dist/esm/components/bik-layout/BikProfile.d.ts +14 -0
- package/dist/esm/components/bik-layout/BikSidebar.d.ts +37 -0
- package/dist/esm/components/bik-layout/BikSidebar.js +1 -1
- package/dist/esm/components/bik-layout/CommonStyles.js +366 -1
- package/dist/esm/components/bik-layout/FeatureModal.d.ts +16 -0
- package/dist/esm/components/bik-layout/FeatureModalV2.d.ts +15 -0
- package/dist/esm/components/bik-layout/ShowShopifyRestrictedModal.d.ts +15 -0
- package/dist/esm/components/bik-layout/ShowShopifyRestrictedModal.js +1 -1
- package/dist/esm/components/bik-layout/SidebarPopup.js +1 -1
- package/dist/esm/components/bik-layout/SidebarSkeleton.d.ts +12 -0
- package/dist/esm/components/bik-layout/SimpleSidebar.d.ts +31 -0
- package/dist/esm/components/bik-layout/SimpleSidebar.js +1 -1
- package/dist/esm/components/button/Button.d.ts +6 -0
- package/dist/esm/components/button/Button.js +1 -1
- package/dist/esm/components/button/Button.styled.js +61 -1
- package/dist/esm/components/button/model.d.ts +78 -0
- package/dist/esm/components/button/themes.js +1 -1
- package/dist/esm/components/buttonGroup/ButtonGroup.d.ts +26 -0
- package/dist/esm/components/buttonGroup/ButtonGroup.js +1 -1
- package/dist/esm/components/card-selection-modal/CardSelectionModal.d.ts +21 -0
- package/dist/esm/components/card-selection-modal/CardSelectionModal.styled.js +41 -1
- package/dist/esm/components/card-selector/CardSelector.d.ts +20 -0
- package/dist/esm/components/card-selector/CardSelector.js +1 -1
- package/dist/esm/components/card-selector/CardSelectorGroup.d.ts +14 -0
- package/dist/esm/components/carousel/carousel.d.ts +6 -0
- package/dist/esm/components/carousel/carousel.js +2 -2
- package/dist/esm/components/carousel-preview/CarouselPreview.d.ts +16 -0
- package/dist/esm/components/carousel-preview/CarouselPreview.js +1 -1
- package/dist/esm/components/carousel-preview/CarouselPreview.style.js +4 -4
- package/dist/esm/components/carousel-preview/CarouselPreviewCard.js +1 -1
- package/dist/esm/components/carousel-preview/CustomCarouselArrows.js +1 -1
- package/dist/esm/components/carousel-secondary/CarouselSecondary.d.ts +15 -0
- package/dist/esm/components/carousel-secondary/CarouselSecondary.js +1 -1
- package/dist/esm/components/carousel-secondary/CarouselSecondary.style.js +42 -1
- package/dist/esm/components/carousel-secondary/model.d.ts +6 -0
- package/dist/esm/components/checkBox/CheckBox.d.ts +24 -0
- package/dist/esm/components/checkBox/CheckBox.js +1 -1
- package/dist/esm/components/checkBox/CheckBox.styled.js +6 -6
- package/dist/esm/components/checkList/CheckList.d.ts +17 -0
- package/dist/esm/components/checkList/CheckList.js +1 -1
- package/dist/esm/components/checkList/CheckList.styled.js +10 -1
- package/dist/esm/components/colourInput/ColourInput.d.ts +12 -0
- package/dist/esm/components/colourInput/ColourInput.js +1 -1
- package/dist/esm/components/colourInput/ColourInput.styled.js +29 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.d.ts +22 -0
- package/dist/esm/components/country-code-picker/CountryCodePicker.js +1 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.modal.d.ts +10 -0
- package/dist/esm/components/country-code-picker/CountryCodePicker.styled.js +31 -1
- package/dist/esm/components/curtain/Curtain.d.ts +27 -0
- package/dist/esm/components/curtain/CurtainHelper.d.ts +26 -0
- package/dist/esm/components/custom-date-time/CustomDateTime.d.ts +16 -0
- package/dist/esm/components/custom-date-time/CustomDateTime.js +1 -1
- package/dist/esm/components/custom-date-time/CustomDateTime.styled.js +25 -1
- package/dist/esm/components/custom-date-time/DateSelector/DateSelector.js +1 -1
- package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.d.ts +21 -0
- package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.js +1 -1
- package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.styled.js +26 -1
- package/dist/esm/components/dashboard-review-popup/components/FiveStar.js +1 -1
- package/dist/esm/components/dashboard-review-popup/components/FiveStar.styled.js +18 -1
- package/dist/esm/components/dashboard-review-popup/components/Form.js +1 -1
- package/dist/esm/components/dashboard-review-popup/components/Form.styled.js +49 -1
- package/dist/esm/components/dashboard-review-popup/components/ZeroState.js +5 -1
- package/dist/esm/components/data-source-panel/DataSourceInfoFooter.js +1 -1
- package/dist/esm/components/data-source-panel/DataSourcePanel.d.ts +39 -0
- package/dist/esm/components/data-source-panel/DataSourcePanel.js +1 -1
- package/dist/esm/components/data-source-panel/Modals/DescriptionModal.js +6 -6
- package/dist/esm/components/data-source-panel/model.d.ts +144 -0
- package/dist/esm/components/datePicker/DatePicker.d.ts +16 -0
- package/dist/esm/components/datePicker/DatePicker.js +1 -1
- package/dist/esm/components/datePicker/DatePicker.styled.js +159 -1
- package/dist/esm/components/datePicker/DatePickerWrapper.d.ts +19 -0
- package/dist/esm/components/datePicker/DatePickerWrapper.js +1 -1
- package/dist/esm/components/datePicker/model.d.ts +6 -0
- package/dist/esm/components/discount-modal/CouponExpiration/CouponExpiration.d.ts +14 -0
- package/dist/esm/components/discount-modal/CouponExpiration/CouponExpiration.js +1 -1
- package/dist/esm/components/discount-modal/DiscountModal.d.ts +43 -0
- package/dist/esm/components/discount-modal/DiscountModal.js +1 -1
- package/dist/esm/components/discount-modal/DiscountModal.styled.js +69 -1
- package/dist/esm/components/discount-modal/DiscountUtils.js +1 -1
- package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
- package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.styled.js +8 -8
- package/dist/esm/components/discount-modal/DynamicCoupon/MinimumRequirementComponent.js +1 -1
- package/dist/esm/components/discount-modal/StaticCoupon/StaticCoupon.js +1 -1
- package/dist/esm/components/discount-modal/type.d.ts +111 -0
- package/dist/esm/components/dropShadow/DropShadow.d.ts +10 -0
- package/dist/esm/components/dropShadow/DropShadow.js +1 -1
- package/dist/esm/components/dropdown/ChipDropdown.d.ts +11 -0
- package/dist/esm/components/dropdown/ChipDropdown.js +5 -5
- package/dist/esm/components/dropdown/ChipInput.js +1 -1
- package/dist/esm/components/dropdown/Common.styled.js +2 -2
- package/dist/esm/components/dropdown/Dropdown.d.ts +24 -0
- package/dist/esm/components/dropdown/Dropdown.js +1 -1
- package/dist/esm/components/dropdown/DropdownPopover/index.d.ts +20 -0
- package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/esm/components/dropdown/MenuItem/MenuItem.d.ts +13 -0
- package/dist/esm/components/dropdown/MenuItem/MenuItem.js +6 -6
- package/dist/esm/components/dropdown/MultilevelDropdownPopover/index.d.ts +18 -0
- package/dist/esm/components/dropdown/MultilevelDropdownPopover/index.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.d.ts +6 -0
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +6 -6
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js +1 -1
- package/dist/esm/components/dropdown/hooks/useDropdown.js +1 -1
- package/dist/esm/components/dropdown/type.d.ts +75 -0
- package/dist/esm/components/dropdown-button/DropdownButton.d.ts +13 -0
- package/dist/esm/components/dropdown-button/DropdownButton.js +1 -1
- package/dist/esm/components/dropdown-button/DropdownButton.style.js +1 -1
- package/dist/esm/components/dynamic-tabs/DynamicTabs.d.ts +28 -0
- package/dist/esm/components/dynamic-tabs/DynamicTabs.js +1 -1
- package/dist/esm/components/fab-menu/FABMenu.d.ts +28 -0
- package/dist/esm/components/file-uploader/FileUploader.d.ts +6 -0
- package/dist/esm/components/file-uploader/FileUploader.js +1 -1
- package/dist/esm/components/file-uploader/Models.d.ts +31 -0
- package/dist/esm/components/floater/floater.d.ts +13 -0
- package/dist/esm/components/floater/floater.js +1 -1
- package/dist/esm/components/floating-action-button/FloatingActionButton.d.ts +24 -0
- package/dist/esm/components/floating-action-button/FloatingActionButton.styles.d.ts +62 -0
- package/dist/esm/components/floating-input-dropdown/FloatingInputDropdown.d.ts +28 -0
- package/dist/esm/components/floating-input-dropdown/FloatingInputDropdown.js +4 -4
- package/dist/esm/components/icon-button/IconButton.d.ts +6 -0
- package/dist/esm/components/icon-button/IconButton.js +1 -1
- package/dist/esm/components/icon-button/model.d.ts +45 -0
- package/dist/esm/components/image-compress/ImageCompress.d.ts +14 -0
- package/dist/esm/components/image-compress/ImageCompress.js +1 -1
- package/dist/esm/components/image-cropper/BikImageCropper.d.ts +12 -0
- package/dist/esm/components/image-cropper/BikImageCropper.js +1 -1
- package/dist/esm/components/image-cropper/BikImagePipeline/BikImagePipeline.d.ts +38 -0
- package/dist/esm/components/image-cropper/BikImagePipeline/BikImagePipeline.js +1 -1
- package/dist/esm/components/input/ChipInput.js +1 -1
- package/dist/esm/components/input/ChipInput.styled.js +1 -1
- package/dist/esm/components/input/Input-helper.js +1 -1
- package/dist/esm/components/input/Input.d.ts +76 -0
- package/dist/esm/components/input/Input.js +1 -1
- package/dist/esm/components/input/Input.styled.js +144 -1
- package/dist/esm/components/input-with-vars/InputWithVariables.d.ts +34 -0
- package/dist/esm/components/input-with-vars/InputWithVariables.js +2 -2
- package/dist/esm/components/input-with-vars/customPortal.d.ts +10 -0
- package/dist/esm/components/input-with-vars/customPortal.js +1 -1
- package/dist/esm/components/keywords-input/KeywordsInput.d.ts +15 -0
- package/dist/esm/components/keywords-input/KeywordsInput.js +1 -1
- package/dist/esm/components/list-item/ListItem.d.ts +23 -0
- package/dist/esm/components/list-item/ListItem.js +1 -1
- package/dist/esm/components/list-item/ListItem.styled.js +10 -1
- package/dist/esm/components/list-item/themes.js +29 -1
- package/dist/esm/components/modals/Modal.js +1 -1
- package/dist/esm/components/modals/modal.styled.js +47 -1
- package/dist/esm/components/modals/styledModal.d.ts +35 -0
- package/dist/esm/components/modals/styledModal.js +47 -1
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +1 -1
- 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/MultiLevelDropdown.d.ts +6 -0
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js +25 -25
- package/dist/esm/components/multi-level-dropdown/type.d.ts +30 -0
- package/dist/esm/components/navigation-hyperlink/NavigationHyperlink.d.ts +14 -0
- package/dist/esm/components/pagination/Pagination.d.ts +13 -0
- package/dist/esm/components/pagination/Pagination.js +1 -1
- package/dist/esm/components/pagination/Pagination.styled.js +7 -1
- package/dist/esm/components/plans/NewSubscriptionPlan.d.ts +22 -0
- package/dist/esm/components/plans/NewSubscriptionPlan.js +1 -1
- package/dist/esm/components/plans/SubscriptionPlan.d.ts +41 -0
- package/dist/esm/components/plans/SubscriptionPlan.js +1 -1
- package/dist/esm/components/plans/SubscriptionPlanSelector.d.ts +49 -0
- package/dist/esm/components/plans/SubscriptionPlanSelector.js +101 -1
- package/dist/esm/components/plans/SubscriptionPlanStyled.js +266 -1
- package/dist/esm/components/plans/SubscriptionPlansCollected.d.ts +18 -0
- package/dist/esm/components/plans/SubscriptionPlansCollected.js +3 -3
- package/dist/esm/components/postPicker/postPicker.d.ts +51 -0
- package/dist/esm/components/postPicker/postPicker.js +1 -1
- package/dist/esm/components/product-picker/ProductPicker.styled.js +71 -1
- package/dist/esm/components/product-picker/ProductPickerModal.d.ts +7 -0
- package/dist/esm/components/product-picker/ProductPickerModal.js +1 -1
- package/dist/esm/components/product-picker/type.d.ts +70 -0
- package/dist/esm/components/product-picker-v2/ProductPickerShimmer.js +1 -1
- package/dist/esm/components/product-picker-v2/ProductPickerTag.js +1 -1
- package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/emptyState.js +1 -1
- package/dist/esm/components/product-picker-v2/helpers/ProductHelper.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.d.ts +114 -0
- package/dist/esm/components/product-picker-v2/modal.js +1 -1
- package/dist/esm/components/product-picker-v2/product.js +1 -1
- package/dist/esm/components/product-picker-v2/productInfoOverlay.js +3 -3
- package/dist/esm/components/product-picker-v2/productScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/rearrangeScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/reducers.js +1 -1
- package/dist/esm/components/product-picker-v2/searchScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/selectedScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/type.d.ts +22 -0
- package/dist/esm/components/product-picker-v2/utility.js +1 -1
- package/dist/esm/components/product-picker-v2/variant.js +1 -1
- package/dist/esm/components/product-picker-v2/variantComponents.js +1 -1
- package/dist/esm/components/progress-bar/CircularProgressBar.js +1 -1
- package/dist/esm/components/progress-bar/ProgressBarComponent.d.ts +21 -0
- package/dist/esm/components/progress-bar/ProgressBarComponent.js +6 -1
- package/dist/esm/components/progress-bar-v2/ProgressBarV2.d.ts +27 -0
- package/dist/esm/components/progress-bar-v2/ProgressBarV2.js +39 -1
- package/dist/esm/components/radioButton/RadioButton.d.ts +21 -0
- package/dist/esm/components/radioButton/RadioButton.js +1 -1
- package/dist/esm/components/radioList/RadioList.d.ts +18 -0
- package/dist/esm/components/radioList/RadioList.js +1 -1
- package/dist/esm/components/radioList/RadioList.styled.js +10 -1
- package/dist/esm/components/resizeImage/index.d.ts +12 -0
- package/dist/esm/components/resizeImage/index.js +1 -1
- package/dist/esm/components/searchBar/searchBar.d.ts +24 -0
- package/dist/esm/components/searchBar/searchBar.js +1 -1
- package/dist/esm/components/shimmer/ShimmerComponent/BikShimmer.d.ts +18 -0
- package/dist/esm/components/shimmer/ShimmerComponent/ShimmerStyled.js +35 -2
- package/dist/esm/components/shimmer-image/ShimmerImage.d.ts +17 -0
- package/dist/esm/components/shimmer-image/ShimmerImage.js +1 -1
- package/dist/esm/components/side-modal/SideModal.d.ts +25 -0
- package/dist/esm/components/side-modal/SideModal.js +1 -1
- package/dist/esm/components/side-modal/SideModal.style.js +9 -9
- package/dist/esm/components/slider/slider.d.ts +14 -0
- package/dist/esm/components/slider/slider.js +1 -1
- package/dist/esm/components/spinner/Spinner.d.ts +16 -0
- package/dist/esm/components/spinner/Spinner.js +6 -6
- package/dist/esm/components/spinner/model.d.ts +14 -0
- package/dist/esm/components/star-rating/Star.js +1 -1
- package/dist/esm/components/star-rating/StarRating.d.ts +14 -0
- package/dist/esm/components/star-rating/StarRating.js +7 -1
- package/dist/esm/components/states/ShopifyScopeWrapper.d.ts +17 -0
- package/dist/esm/components/states/ShopifyScopeWrapper.js +1 -1
- package/dist/esm/components/states/StateComponent.d.ts +45 -0
- package/dist/esm/components/states/StateComponent.js +1 -1
- package/dist/esm/components/states-modal/DeleteConfirmationModal.d.ts +14 -0
- package/dist/esm/components/states-modal/StateModalComponent.d.ts +30 -0
- package/dist/esm/components/stepper/Stepper.d.ts +29 -0
- package/dist/esm/components/stepper/Stepper.js +1 -1
- package/dist/esm/components/switch/Switch.d.ts +24 -0
- package/dist/esm/components/switch/Switch.js +61 -1
- package/dist/esm/components/tabs/Tabs.d.ts +7 -0
- package/dist/esm/components/tabs/Tabs.js +1 -1
- package/dist/esm/components/tabs/Tabs.model.d.ts +52 -0
- package/dist/esm/components/tabs/Tabs.styles.js +45 -1
- package/dist/esm/components/tag/Tag.d.ts +9 -0
- package/dist/esm/components/tag/Tag.js +1 -1
- package/dist/esm/components/tag/Tag.styled.js +30 -1
- package/dist/esm/components/tag/model.d.ts +72 -0
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.d.ts +74 -0
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
- package/dist/esm/components/template-context-mapper/custom-hooks/useAdditionalVariables.js +1 -1
- package/dist/esm/components/template-context-mapper/helpers/WebpushTemplateHelper.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/Body.js +8 -8
- package/dist/esm/components/template-context-mapper/modalElements/DesktopPreview.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/DiscountCodeComponent.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.js +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 +13 -0
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/Footer.js +5 -5
- package/dist/esm/components/template-context-mapper/modalElements/Header.js +5 -5
- package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.js +4 -4
- package/dist/esm/components/template-context-mapper/modalElements/QueryParamsComponent.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.d.ts +16 -0
- package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsSkeleton.d.ts +7 -0
- package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.js +5 -5
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/VariableEditorHeader.js +3 -3
- package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.js +1 -1
- package/dist/esm/components/template-context-mapper/utils/convertPlaceholdersToBikDropdown.js +1 -1
- package/dist/esm/components/template-context-mapper/utils/getDataFromTemplateComponent.d.ts +36 -0
- package/dist/esm/components/template-context-mapper/utils/getDataFromTemplateComponent.js +1 -1
- package/dist/esm/components/template-context-mapper/utils/highlightFor.js +1 -1
- package/dist/esm/components/template-context-mapper/utils/validateIsUrl.d.ts +4 -0
- package/dist/esm/components/template-preview/EmailTemplateThumbnailPreview.js +1 -1
- package/dist/esm/components/template-preview/RCS/RCSButtons.js +1 -1
- package/dist/esm/components/template-preview/RCS/RCSChatPreview.js +1 -1
- package/dist/esm/components/template-preview/RCS/RCSMediaCard.js +1 -1
- package/dist/esm/components/template-preview/RCS/RCSPreview.styled.js +4 -4
- package/dist/esm/components/template-preview/RCS/RCSTemplateLikePreview.js +4 -4
- package/dist/esm/components/template-preview/SmsTemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/TemplatePreview.d.ts +33 -0
- package/dist/esm/components/template-preview/TemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/WhatsApp/ChatBtn.js +1 -1
- package/dist/esm/components/template-preview/WhatsApp/ChatUI.js +2 -2
- package/dist/esm/components/template-preview/WhatsApp/ChatUiV2.js +4 -4
- package/dist/esm/components/template-preview/WhatsApp/MediaCard.js +1 -1
- package/dist/esm/components/template-preview/WhatsApp/RenderTemplateWithVariable.js +2 -2
- package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreview.d.ts +6 -0
- package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreview.js +5 -5
- package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.d.ts +6 -0
- package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +5 -5
- package/dist/esm/components/template-preview/WhatsAppTemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/constants/regexPatterns.d.ts +13 -0
- package/dist/esm/components/template-preview/helpers/SmsTemplateHelper.d.ts +5 -0
- package/dist/esm/components/template-preview/helpers/SmsTemplateHelper.js +1 -1
- package/dist/esm/components/template-preview/helpers/TemplateCreatorHelper.js +1 -1
- package/dist/esm/components/template-preview/helpers/VariableEditorHelper.d.ts +10 -0
- package/dist/esm/components/template-preview/helpers/VariableEditorHelper.js +1 -1
- package/dist/esm/components/template-preview/helpers/WhatsAppFormatToHTML.d.ts +10 -0
- package/dist/esm/components/template-preview/helpers/templateMiscHelper.js +1 -1
- package/dist/esm/components/template-preview/models/Channels.d.ts +12 -0
- package/dist/esm/components/template-preview/models/EmailTemplate.d.ts +42 -0
- package/dist/esm/components/template-preview/models/RCSTemplate.d.ts +40 -0
- package/dist/esm/components/template-preview/models/SmsTemplate.d.ts +39 -0
- package/dist/esm/components/template-preview/models/TemplateMeta.d.ts +95 -0
- package/dist/esm/components/template-preview/models/WebpushTemplate.d.ts +64 -0
- package/dist/esm/components/template-preview/models/WhatsAppTemplate.d.ts +337 -0
- package/dist/esm/components/template-preview/models/WhatsappCarouselTemplate.d.ts +89 -0
- package/dist/esm/components/template-preview/models/types.d.ts +13 -0
- package/dist/esm/components/template-preview/utils/TemplateHelperUtils.js +1 -1
- package/dist/esm/components/template-preview/webpush/WebpushPreview.js +1 -1
- package/dist/esm/components/testimonial-card/TestimonialCard.d.ts +21 -0
- package/dist/esm/components/testimonial-card/TestimonialCard.js +1 -1
- package/dist/esm/components/testimonial-card/TestimonialCard.style.js +53 -1
- package/dist/esm/components/thumbnail/Thumbnail.d.ts +17 -0
- package/dist/esm/components/thumbnail/Thumbnail.js +1 -1
- package/dist/esm/components/toaster/Toaster.d.ts +33 -0
- package/dist/esm/components/toaster/Toaster.js +1 -1
- package/dist/esm/components/toaster/Toaster.styled.js +138 -1
- package/dist/esm/components/tooltips/Tooltip.d.ts +17 -0
- package/dist/esm/components/tooltips/Tooltip.js +1 -1
- package/dist/esm/components/tooltips/TooltipInternal.d.ts +11 -0
- package/dist/esm/components/tooltips/TooltipInternal.js +7 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.d.ts +16 -0
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +1 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.d.ts +22 -0
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +1 -1
- package/dist/esm/components/variable-picker-v3/Content.js +1 -1
- package/dist/esm/components/variable-picker-v3/DefaultVariableContent.js +1 -1
- package/dist/esm/components/variable-picker-v3/SubHeaderItems.js +1 -1
- package/dist/esm/components/variable-picker-v3/VariablePicker.d.ts +7 -0
- package/dist/esm/components/variable-picker-v3/VariablePicker.js +1 -1
- package/dist/esm/components/variable-picker-v3/model.d.ts +65 -0
- package/dist/esm/components/variable-picker-v3/recommendVaribles.js +1 -1
- package/dist/esm/components/variable-picker-v3/searchVariables.js +1 -1
- package/dist/esm/components/zeroState/ZeroState.js +5 -5
- package/dist/esm/constants/Theme.d.ts +624 -0
- package/dist/esm/constants/zindex.d.ts +9 -0
- package/dist/esm/helpers/BaseWhatsappContentLang.helper.d.ts +43 -0
- package/dist/esm/hooks/useCurreny.js +1 -1
- package/dist/esm/hooks/useOutside.js +1 -1
- package/dist/esm/index.d.ts +175 -0
- package/dist/esm/types/apiExecutor.d.ts +13 -0
- package/dist/esm/utils/DateUtils.js +1 -1
- package/dist/esm/utils/StringUtils.d.ts +16 -0
- package/dist/esm/utils/StringUtils.js +1 -1
- package/dist/esm/utils/bytesToMB.js +1 -1
- package/dist/esm/utils/resizeImage.d.ts +3 -0
- package/dist/esm/utils/unCamelCase.js +1 -1
- package/dist/esm/utils/validator.d.ts +8 -0
- package/package.json +8 -7
|
@@ -1 +1,159 @@
|
|
|
1
|
-
import c from"@emotion/styled/base";import{COLORS as d}from"../../constants/Theme.js";const X=c("div","production"===process.env.NODE_ENV?{target:"e1wgjc5p0"}:{target:"e1wgjc5p0",label:"PickerContainer"})("position:relative;z-index:99999;.react-calendar{background:",d.text.white,";border-width:1px;border-style:solid;border-color:",d.text.white,";box-shadow:0px 2px 8px rgba(0, 0, 0, 0.12);border-radius:4px;color:",d.text.primary,";&--selectRange{.react-calendar{&__year-view{.react-calendar__tile--hover{background-color:unset;}}&__month-view{.react-calendar__tile--hover{background-color:",d.background.brandLight,";}}}}.react-calendar{&__tile{transition:all 0.25s;&:enabled:hover{background-color:",d.surface.hovered,";border-radius:4px;}&--hasActive:enabled:hover,&--hasActive:enabled:focus{background:",d.background.brand,";color:",d.text.white,";}&.react-calendar__tile{&--range{&:enabled:hover{border-radius:0;}}&--rangeStart{border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:4px!important;border-bottom-left-radius:4px!important;background:",d.background.brand,";color:",d.text.white,";&:enabled:hover{border-top-right-radius:0;background:",d.background.brand,";border-color:",d.background.brand,";border-bottom-right-radius:0;}&.react-calendar__tile--rangeEnd{",(c=>(c=>c.selectRange?"\n border-top-right-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n ":"\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n ")(c))," border-top-left-radius:4px;border-bottom-left-radius:4px;&:enabled:hover{background:",d.background.brand,";border-color:",d.background.brand,";border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:4px!important;border-bottom-left-radius:4px!important;}}}&--rangeEnd{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px!important;border-bottom-right-radius:4px!important;background:",d.background.brand,";color:",d.text.white,";&:enabled:hover{border-top-left-radius:0;background:",d.background.brand,";border-color:",d.background.brand,";border-bottom-left-radius:0;}}}}}.react-calendar__tile--active{background:",d.background.brandLight,";color:",d.text.primary,";}.react-calendar__tile--now{background:",d.text.white,";border-radius:4px;border-color:",d.background.brand,";border-style:solid;border-width:1px;}.react-calendar__month-view__weekdays__weekday{font-style:normal;overflow:hidden;font-weight:600;font-size:14px;line-height:20px;color:",d.text.primary,";abbr[title]{text-decoration:none!important;}}.react-calendar__navigation button:enabled:hover,.react-calendar__navigation button:enabled:focus{background-color:",d.background.brandLight,";border-radius:4px;}.react-calendar__month-view__weekends{color:",d.text.primary,";}.react-calendar__month-view__days__day--weekend{color:",d.text.primary,";}.react-calendar__month-view__weekdays{background:",d.surface.subdued,";}.react-calendar__navigation{display:flex;padding:12px 20px;button{border:0!important;background:transparent!important;}.react-calendar__navigation__arrow react-calendar__navigation__prev2-button{font-size:20px;}.react-calendar__navigation__arrow react-calendar__navigation__prev-button{font-size:20px;}}.react-calendar__tile:disabled{background-color:#f0f0f0!important;}}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkRhdGVQaWNrZXIuc3R5bGVkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWdCeUMiLCJmaWxlIjoiRGF0ZVBpY2tlci5zdHlsZWQudHMiLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSBcIkBzcmMvY29uc3RhbnRzL1RoZW1lXCI7XG5jb25zdCBnZW5lcmF0ZUJvcmRlclJhZGl1cyA9IChwcm9wcykgPT4ge1xuICBpZiAocHJvcHMuc2VsZWN0UmFuZ2UpIHtcbiAgICByZXR1cm4gYFxuICAgICAgYm9yZGVyLXRvcC1yaWdodC1yYWRpdXM6IDAgIWltcG9ydGFudDtcbiAgICAgIGJvcmRlci1ib3R0b20tcmlnaHQtcmFkaXVzOiAwICFpbXBvcnRhbnQ7XG4gICAgYDtcbiAgfSBlbHNlIHtcbiAgICByZXR1cm4gYFxuICAgICAgYm9yZGVyLXRvcC1yaWdodC1yYWRpdXM6IDRweDtcbiAgICAgIGJvcmRlci1ib3R0b20tcmlnaHQtcmFkaXVzOiA0cHg7XG4gICAgYDtcbiAgfVxufTtcbmV4cG9ydCBjb25zdCBQaWNrZXJDb250YWluZXIgPSBzdHlsZWQuZGl2YFxuXHRwb3N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blx0XHQucmVhY3QtY2FsZW5kYXJfX21vbnRoLXZpZXdfX3dlZWtkYXlzIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7Q09MT1JTLnN1cmZhY2Uuc3ViZHVlZH07XG5cdFx0fVxuXG5cdFx0LnJlYWN0LWNhbGVuZGFyX19uYXZpZ2F0aW9uIHtcblx0XHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0XHRwYWRkaW5nOiAxMnB4IDIwcHg7XG5cblx0XHRcdGJ1dHRvbiB7XG5cdFx0XHRcdGJvcmRlcjogMCAhaW1wb3J0YW50O1xuXHRcdFx0XHRiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXHRcdFx0fVxuXG5cdFx0XHQucmVhY3QtY2FsZW5kYXJfX25hdmlnYXRpb25fX2Fycm93XG5cdFx0XHRcdHJlYWN0LWNhbGVuZGFyX19uYXZpZ2F0aW9uX19wcmV2Mi1idXR0b24ge1xuXHRcdFx0XHRmb250LXNpemU6IDIwcHg7XG5cdFx0XHR9XG5cblx0XHRcdC5yZWFjdC1jYWxlbmRhcl9fbmF2aWdhdGlvbl9fYXJyb3dcblx0XHRcdFx0cmVhY3QtY2FsZW5kYXJfX25hdmlnYXRpb25fX3ByZXYtYnV0dG9uIHtcblx0XHRcdFx0Zm9udC1zaXplOiAyMHB4O1xuXHRcdFx0fVxuXHRcdH1cblx0XHQucmVhY3QtY2FsZW5kYXJfX3RpbGU6ZGlzYWJsZWQge1xuXHRcdFx0YmFja2dyb3VuZC1jb2xvcjogI2YwZjBmMCAhaW1wb3J0YW50O1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */"));export{X as PickerContainer};
|
|
1
|
+
import r from"@emotion/styled";import{COLORS as e}from"../../constants/Theme.js";const a=r.div`
|
|
2
|
+
position: relative;
|
|
3
|
+
z-index: 99999;
|
|
4
|
+
|
|
5
|
+
.react-calendar {
|
|
6
|
+
background: ${e.text.white};
|
|
7
|
+
border-width: 1px;
|
|
8
|
+
border-style: solid;
|
|
9
|
+
border-color: ${e.text.white};
|
|
10
|
+
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.12);
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
color: ${e.text.primary};
|
|
13
|
+
&--selectRange {
|
|
14
|
+
.react-calendar {
|
|
15
|
+
&__year-view {
|
|
16
|
+
.react-calendar__tile--hover {
|
|
17
|
+
background-color: unset;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
&__month-view {
|
|
21
|
+
.react-calendar__tile--hover {
|
|
22
|
+
background-color: ${e.background.brandLight};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
.react-calendar {
|
|
28
|
+
&__tile {
|
|
29
|
+
transition: all 0.25s;
|
|
30
|
+
&:enabled:hover {
|
|
31
|
+
background-color: ${e.surface.hovered};
|
|
32
|
+
border-radius: 4px;
|
|
33
|
+
}
|
|
34
|
+
&--hasActive:enabled:hover,
|
|
35
|
+
&--hasActive:enabled:focus {
|
|
36
|
+
background: ${e.background.brand};
|
|
37
|
+
color: ${e.text.white};
|
|
38
|
+
}
|
|
39
|
+
&.react-calendar__tile {
|
|
40
|
+
&--range {
|
|
41
|
+
&:enabled:hover {
|
|
42
|
+
border-radius: 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
&--rangeStart {
|
|
46
|
+
border-top-right-radius: 0;
|
|
47
|
+
border-bottom-right-radius: 0;
|
|
48
|
+
border-top-left-radius: 4px !important;
|
|
49
|
+
border-bottom-left-radius: 4px !important;
|
|
50
|
+
background: ${e.background.brand};
|
|
51
|
+
color: ${e.text.white};
|
|
52
|
+
|
|
53
|
+
&:enabled:hover {
|
|
54
|
+
border-top-right-radius: 0;
|
|
55
|
+
background: ${e.background.brand};
|
|
56
|
+
border-color: ${e.background.brand};
|
|
57
|
+
border-bottom-right-radius: 0;
|
|
58
|
+
}
|
|
59
|
+
&.react-calendar__tile--rangeEnd {
|
|
60
|
+
${r=>(r=>r.selectRange?"\n border-top-right-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n ":"\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n ")(r)}
|
|
61
|
+
border-top-left-radius: 4px;
|
|
62
|
+
border-bottom-left-radius: 4px;
|
|
63
|
+
&:enabled:hover {
|
|
64
|
+
background: ${e.background.brand};
|
|
65
|
+
border-color: ${e.background.brand};
|
|
66
|
+
border-top-right-radius: 0;
|
|
67
|
+
border-bottom-right-radius: 0;
|
|
68
|
+
border-top-left-radius: 4px !important;
|
|
69
|
+
border-bottom-left-radius: 4px !important;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
&--rangeEnd {
|
|
74
|
+
border-top-left-radius: 0;
|
|
75
|
+
border-bottom-left-radius: 0;
|
|
76
|
+
border-top-right-radius: 4px !important;
|
|
77
|
+
border-bottom-right-radius: 4px !important;
|
|
78
|
+
background: ${e.background.brand};
|
|
79
|
+
color: ${e.text.white};
|
|
80
|
+
|
|
81
|
+
&:enabled:hover {
|
|
82
|
+
border-top-left-radius: 0;
|
|
83
|
+
background: ${e.background.brand};
|
|
84
|
+
border-color: ${e.background.brand};
|
|
85
|
+
border-bottom-left-radius: 0;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.react-calendar__tile--active {
|
|
93
|
+
background: ${e.background.brandLight};
|
|
94
|
+
color: ${e.text.primary};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.react-calendar__tile--now {
|
|
98
|
+
background: ${e.text.white};
|
|
99
|
+
border-radius: 4px;
|
|
100
|
+
border-color: ${e.background.brand};
|
|
101
|
+
border-style: solid;
|
|
102
|
+
border-width: 1px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.react-calendar__month-view__weekdays__weekday {
|
|
106
|
+
font-style: normal;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
font-weight: 600;
|
|
109
|
+
font-size: 14px;
|
|
110
|
+
line-height: 20px;
|
|
111
|
+
color: ${e.text.primary};
|
|
112
|
+
|
|
113
|
+
abbr[title] {
|
|
114
|
+
text-decoration: none !important;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.react-calendar__navigation button:enabled:hover,
|
|
119
|
+
.react-calendar__navigation button:enabled:focus {
|
|
120
|
+
background-color: ${e.background.brandLight};
|
|
121
|
+
border-radius: 4px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.react-calendar__month-view__weekends {
|
|
125
|
+
color: ${e.text.primary};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.react-calendar__month-view__days__day--weekend {
|
|
129
|
+
color: ${e.text.primary};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.react-calendar__month-view__weekdays {
|
|
133
|
+
background: ${e.surface.subdued};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.react-calendar__navigation {
|
|
137
|
+
display: flex;
|
|
138
|
+
padding: 12px 20px;
|
|
139
|
+
|
|
140
|
+
button {
|
|
141
|
+
border: 0 !important;
|
|
142
|
+
background: transparent !important;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.react-calendar__navigation__arrow
|
|
146
|
+
react-calendar__navigation__prev2-button {
|
|
147
|
+
font-size: 20px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.react-calendar__navigation__arrow
|
|
151
|
+
react-calendar__navigation__prev-button {
|
|
152
|
+
font-size: 20px;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
.react-calendar__tile:disabled {
|
|
156
|
+
background-color: #f0f0f0 !important;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
`;export{a as PickerContainer};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { CalendarProps } from 'react-calendar';
|
|
3
|
+
import { CSSProperties } from 'styled-components';
|
|
4
|
+
import { DateButtonType } from './model.js';
|
|
5
|
+
|
|
6
|
+
declare const DatePickerWrapper: React__default.FC<{
|
|
7
|
+
val?: Date | Date[];
|
|
8
|
+
onChange: (val: Date | Date[]) => void;
|
|
9
|
+
calendarProps?: CalendarProps;
|
|
10
|
+
pickerStyles?: CSSProperties;
|
|
11
|
+
dateButtonStyles?: CSSProperties;
|
|
12
|
+
nativeID?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
maxDate?: Date;
|
|
15
|
+
minDate?: Date;
|
|
16
|
+
dateButtonType?: DateButtonType;
|
|
17
|
+
}>;
|
|
18
|
+
|
|
19
|
+
export { DatePickerWrapper };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,Fragment as e,jsx as r}from"react/jsx-runtime";import{useState as o,useRef as a}from"react";import n from"react-calendar";import{useOutside as
|
|
1
|
+
import{jsxs as t,Fragment as e,jsx as r}from"react/jsx-runtime";import{useState as o,useRef as a}from"react";import n from"react-calendar";import{useOutside as i}from"../../hooks/useOutside.js";import l from"../../utils/DateUtils.js";import{COLORS as s}from"../../constants/Theme.js";import c from"../../assets/icons/calendar.svg.js";import{BodyPrimary as m,BodySecondary as d}from"../TypographyStyle.js";import{DateBtn as p,PickerContainer as D}from"./DatePickerWrapper.styled.js";import{DateButtonType as u}from"./model.js";const y=({val:y,onChange:g,calendarProps:f,disabled:h,pickerStyles:S,nativeID:b,maxDate:w,minDate:L,dateButtonType:C,dateButtonStyles:j})=>{const[k,A]=o(!1),v=a(null),x=a(null);i(x,(()=>{A(!1)}));const T=()=>y?Array.isArray(y)?y?.[0]?.toString()&&y?.[1]?.toString()?`${new Date(y?.[0]?.toString()).toLocaleDateString()}-${new Date(y?.[1]?.toString()).toLocaleDateString()}`:`${l.getPastDate(new Date,30).toLocaleDateString()}-${(new Date).toLocaleDateString()}`:new Date(y.toString()).toLocaleDateString():(new Date).toLocaleDateString();return t(e,{children:[t(p,{id:b,ref:v,bgColor:h?s.background.base:s.surface.standard,borderColor:s.stroke.primary,onClick:()=>A(!k),dateButtonType:C||u.DEFAULT,style:j,children:[C===u.LARGE?r(m,{style:{color:h?s.content.inactive:s.content.primary,flex:1},children:T()}):r(d,{style:{color:h?s.content.inactive:s.content.primary,flex:1},children:T()}),r(c,{width:C===u.LARGE?24:20,height:C===u.LARGE?24:20,color:h?s.content.inactive:s.content.primary})]}),k&&!h&&r(D,{ref:x,style:{...S},contentPrimary:s.content.primary,subDued:s.surface.subdued,brandColor:s.background.brand,bgColor:s.surface.standard,borderColor:s.stroke.primary,children:r(n,{tileClassName:["custom__tile"],className:["custom__calendar"],onChange:t=>{g(t),A(!1)},maxDate:w,minDate:L,value:y?Array.isArray(y)?2===y.length?[new Date(y[0]),new Date(y[1])]:null:new Date(y):null,...f})})]})};export{y as DatePickerWrapper};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { ICouponData, COUPON_EXPIRATION } from '../type.js';
|
|
3
|
+
|
|
4
|
+
interface CouponExpirationI {
|
|
5
|
+
discountData: ICouponData;
|
|
6
|
+
isAddExpirationChecked: boolean;
|
|
7
|
+
setDiscountData: (ICouponData: any) => void;
|
|
8
|
+
inValidCouponExpiry: boolean;
|
|
9
|
+
setSelectedExpiration: React__default.Dispatch<React__default.SetStateAction<COUPON_EXPIRATION | undefined>>;
|
|
10
|
+
selectedExpiration: COUPON_EXPIRATION | undefined;
|
|
11
|
+
}
|
|
12
|
+
declare const CouponExpiration: React__default.FC<CouponExpirationI>;
|
|
13
|
+
|
|
14
|
+
export { CouponExpiration };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{format as
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{format as i}from"date-fns";import{useState as n,useEffect as r}from"react";import{CustomDateTime as p}from"../../custom-date-time/CustomDateTime.js";import{COUPON_EXPIRATION as d}from"../type.js";import"../../dropdown/DropdownPopover/index.js";import{Dropdown as a}from"../../dropdown/Dropdown.js";import"../../dropdown/ChipDropdown.js";import{BodySecondary as s}from"../../TypographyStyle.js";import"../../../constants/Theme.js";import"../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../list-item/ListItem.js";import"../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../dropdown/OpenedDropdown/components/menu/MenuList.js";import"../../button/Button.js";import"../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../icon-button/IconButton.js";import{Input as m}from"../../input/Input.js";import"../../input/context/InputStyleProvider.js";import"../../dropdown/MenuItem/MenuItem.js";const l=l=>{const[c,u]=n(),[x,D]=n(),w=(new Date).setDate((new Date).getDate()+1),I=[{selected:l.selectedExpiration===d.DYNAMIC_EXPIRATION,label:"After a certain no. of days",value:d.DYNAMIC_EXPIRATION},{selected:l.selectedExpiration===d.FIXED_EXPIRATION,label:"Fixed expiry date",value:d.FIXED_EXPIRATION}];r((()=>{(void 0===l.selectedExpiration||null===l.selectedExpiration||c||x)&&l.setDiscountData({...l.discountData,expireAfter:void 0,expireAt:void 0}),l.selectedExpiration&&(c||x)&&(l.selectedExpiration===d.FIXED_EXPIRATION?D(void 0):u(void 0))}),[l.selectedExpiration,c,x]);return e("div",{style:{display:"flex",flexDirection:"column",gap:13,margin:"16px 0 0 28px"},children:[e("div",{children:[t(s,{style:{marginBottom:8},children:"Expiration"}),t("div",{style:{display:"flex",flexGrow:0,flexShrink:0,flexBasis:"auto"},children:t(a,{width:"268px",options:I,placement:"bottom-start",onSelect:e=>{const t=e.value;l.setSelectedExpiration(t),l.setDiscountData({...l.discountData,expireAt:void 0,expireAfter:void 0})},truncatedText:!1})})]}),l.selectedExpiration===d.DYNAMIC_EXPIRATION&&t(m,{value:l.discountData.expireAfter?.toString(),placeholder:"Eg. 5",labelText:"No. of days before coupon expires",width:"268px",type:"number",onChangeText:e=>{(e=>{D(void 0);const t=Number.parseInt(e);t>0?l.setDiscountData({...l.discountData,expireAfter:t,expireAt:void 0}):D("Please enter valid input")})(e)},isRequired:!0,errorMessage:l.inValidCouponExpiry?"Required Field":x,state:l.inValidCouponExpiry?"invalid":"none"}),l.selectedExpiration===d.FIXED_EXPIRATION&&e(o,{children:[t(s,{children:"Expiring on"}),t(p,{placement:"bottom-start",time:l.discountData.expireAt?i(new Date(l.discountData.expireAt),"hh:mm a"):i(new Date(w),"hh:mm a"),date:l.discountData.expireAt?new Date(l.discountData.expireAt):new Date(w),error:c,setError:u,onChange:e=>{l.setDiscountData({...l.discountData,expireAt:e,expireAfter:void 0})},minDate:new Date(w)})]})]})};export{l as CouponExpiration};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { ICouponData } from './type.js';
|
|
4
|
+
import { Product, Collection } from '../product-picker/type.js';
|
|
5
|
+
import { VariableListInterfaceV3 } from '../variable-picker-v3/model.js';
|
|
6
|
+
|
|
7
|
+
interface DiscountDialogueI {
|
|
8
|
+
hideOption?: 'static' | 'dynamic';
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
title: string;
|
|
11
|
+
subTitle?: string;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
allowStaticCoupon: boolean;
|
|
14
|
+
data?: ICouponData;
|
|
15
|
+
onSaveClicked: (discountData: ICouponData) => void;
|
|
16
|
+
onProductSearch: (key: string) => Promise<Product[]>;
|
|
17
|
+
onCollectionSearch: (key: string) => Promise<Collection[]>;
|
|
18
|
+
hideExpiration?: boolean;
|
|
19
|
+
hideProbability?: boolean;
|
|
20
|
+
probability?: number[];
|
|
21
|
+
quadrant?: number;
|
|
22
|
+
products?: Product[];
|
|
23
|
+
collection?: Collection[];
|
|
24
|
+
discountAdminUrl?: string;
|
|
25
|
+
currency?: string;
|
|
26
|
+
newPickerConf?: {
|
|
27
|
+
searchInCollection: any;
|
|
28
|
+
searchProducts: any;
|
|
29
|
+
fetchCollections: any;
|
|
30
|
+
fetchProducts: any;
|
|
31
|
+
storeId: string;
|
|
32
|
+
appType?: ApplicationType;
|
|
33
|
+
};
|
|
34
|
+
errorMsg?: string;
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
isProductVariableSupported?: boolean;
|
|
37
|
+
productVariableList?: VariableListInterfaceV3[];
|
|
38
|
+
makeExpiryMandatory?: boolean;
|
|
39
|
+
}
|
|
40
|
+
declare const DiscountModal: React__default.FC<DiscountDialogueI>;
|
|
41
|
+
|
|
42
|
+
export { DiscountModal };
|
|
43
|
+
export type { DiscountDialogueI };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import"../../node_modules/@bikdotai/bik-models/growth/models/bik-store.js";import{useState as o,useEffect as n}from"react";import{DISCOUNT_TYPES as l,MIN_PURCHASE_REQUIREMENT as r,DISCOUNT_APPLIES_TO as a,OFFER_APPLIES_TO as d,initialStaticCouponErrorState as c,initialDynamicCouponErrorState as u,COUPON_EXPIRATION as s,DISCOUNT_TARGET_TYPES as p,DISCOUNT_TARGET_SELECTION as C,DISCOUNT_VALUE_TYPES as m}from"./type.js";import"../dropdown/DropdownPopover/index.js";import{Dropdown as y}from"../dropdown/Dropdown.js";import"../dropdown/ChipDropdown.js";import{TitleSmall as P,BodyCaption as b,TitleRegular as v}from"../TypographyStyle.js";import{DEFAULT_THEME as h}from"../../constants/Theme.js";import"../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../list-item/ListItem.js";import"../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../button/Button.js";import"../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../icon-button/IconButton.js";import"../input/Input.js";import"../dropdown/MenuItem/MenuItem.js";import{StyledModal as f}from"../modals/styledModal.js";import{ProductPickerContent as I}from"../product-picker/ProductPickerModal.js";import{Tag as T}from"../tag/Tag.js";import{Tooltip as E}from"../tooltips/Tooltip.js";import S from"../../assets/icons/gift_icon.svg.js";import O from"../../assets/icons/percentage_icon.svg.js";import _ from"../../assets/icons/shipping_icon.svg.js";import V from"../../assets/icons/triangle_error.svg.js";import A from"../../assets/icons/warning.svg.js";import{ProductPickerModal as D}from"../product-picker-v2/modal.js";import{PickerType as g}from"../variable-picker-v3/model.js";import{VariablePicker as k}from"../variable-picker-v3/VariablePicker.js";import{StyledDiscountDialogueContainer as N,CouponTypeContainerStyled as w,VariablePickerContainer as F}from"./DiscountModal.styled.js";import{validateDiscountData as x,descriptionBuilder as R}from"./DiscountUtils.js";import j,{DISCOUNT_PRODUCTS as M}from"./DynamicCoupon/DynamicCoupon.js";import q from"./StaticCoupon/StaticCoupon.js";import{__exports as L}from"../../_virtual/bik-store.js";var U=Object.defineProperty,B=Object.defineProperties,G=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,H=(e,t,i)=>t in e?U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,z=(e,t)=>{for(var i in t||(t={}))X.call(t,i)&&H(e,i,t[i]);if(Y)for(var i of Y(t))Q.call(t,i)&&H(e,i,t[i]);return e},K=(e,t)=>B(e,G(t));const $=U=>{var B,G,Y,X,Q,H,$,J,W,Z,ee;const te=[{id:"0",label:"Amount",value:"amount",icon:t=>e("span",{style:{fontSize:20,color:t,lineHeight:.9},children:U.currency||""})},{id:"1",label:"Percentage",value:"percentage",icon:t=>e(O,{width:24,height:24,color:t})},{id:"2",label:"Buy X get Y",value:l.BUY_X_GET_Y,icon:t=>e(S,{width:24,height:24,color:t})},{id:"3",label:"Free Shipping",value:l.FREE_SHIPPING,icon:t=>e(_,{width:24,height:24,color:t})}],[ie,oe]=o(),[ne,le]=o(),[re,ae]=o(),[de,ce]=o(null!=(B=U.data)?B:"string"==typeof U.hideOption?{isStaticCoupon:"dynamic"===U.hideOption}:{isStaticCoupon:!0}),[ue,se]=o(!0),[pe,Ce]=o(),[me,ye]=o((null==(G=U.data)?void 0:G.minAmount)?r.AMOUNT:(null==(Y=U.data)?void 0:Y.minQuantity)?r.QUANTITY:r.NA),[Pe,be]=o(a.ENTIRE_ORDER),[ve,he]=o(d.SPECIFIC_PRODUCTS),[fe,Ie]=o(d.SPECIFIC_PRODUCTS),[Te,Ee]=o(void 0),[Se,Oe]=o(void 0),[_e,Ve]=o(void 0),[Ae,De]=o(void 0),[ge,ke]=o(void 0),[Ne,we]=o(void 0),[Fe,xe]=o(0),[Re,je]=o(""),[Me,qe]=o(te[0]),[Le,Ue]=o(!1),[Be,Ge]=o(c),[Ye,Xe]=o(u),[Qe,He]=o(s.DYNAMIC_EXPIRATION),ze=[{value:l.AMOUNT_OFF_ORDER,label:"Amount off on order",selected:pe===l.AMOUNT_OFF_ORDER},{value:l.AMOUNT_OFF_PRODUCTS,label:"Amount off on products",selected:pe===l.AMOUNT_OFF_PRODUCTS},{value:l.BUY_X_GET_Y,label:"Buy X Get Y FREE",selected:pe===l.BUY_X_GET_Y},{value:l.FREE_SHIPPING,label:"Free shipping",selected:pe===l.FREE_SHIPPING}];n((()=>{U.makeExpiryMandatory&&Ue(!0)}),[U.makeExpiryMandatory]),n((()=>{var e,t,i,o,n,r,c,u;let p;const{tempCouponData:C,discountType:y}=Ke();Ce(y);const P=(e,t)=>{qe(C.valueType===m.FIXED_AMOUNT?te[e]:te[t])},b=(e,t)=>{Object.keys(e||{}).length&&t(e)};switch(((null==C?void 0:C.expireAfter)||(null==C?void 0:C.expireAt))&&(Ue(!0),(null==C?void 0:C.expireAt)&&He(s.FIXED_EXPIRATION),(null==C?void 0:C.expireAfter)&&He(s.DYNAMIC_EXPIRATION)),y){case l.AMOUNT_OFF_ORDER:P(0,1),be(a.ENTIRE_ORDER);break;case l.AMOUNT_OFF_PRODUCTS:P(0,1),(null==(e=C.entitledCollectionIds)?void 0:e.length)?be(a.SPECIFIC_COLLECTIONS):(null==(t=C.entitledProductIds)?void 0:t.length)||(null==(i=C.productVariableConf)?void 0:i.entitledProductVariable)?(be(a.SPECIFIC_PRODUCTS),b(null==(o=C.productVariableConf)?void 0:o.entitledProductVariable,De)):be(a.ENTIRE_ORDER);break;case l.BUY_X_GET_Y:qe(te[2]),(null==(n=C.entitledCollectionIds)?void 0:n.length)?Ie(d.SPECIFIC_COLLECTIONS):(Ie(d.SPECIFIC_PRODUCTS),b(null==(r=C.productVariableConf)?void 0:r.entitledProductVariable,De)),(null==(c=C.prerequisiteCollectionIds)?void 0:c.length)?he(d.SPECIFIC_COLLECTIONS):(he(d.SPECIFIC_PRODUCTS),b(null==(u=C.productVariableConf)?void 0:u.prerequisiteProductVariable,ke));break;case l.FREE_SHIPPING:qe(te[3])}ce(z({},C)),U.hideProbability||(p=We()),se(x(C,me,y,U.hideProbability||!1,p,!!C.isStaticCoupon)),U.hideProbability||We()}),[]),n((()=>{let e;U.hideProbability||(e=We()),se(x(de,me,pe,U.hideProbability||!1,e,!!de.isStaticCoupon))}),[de,Fe,pe,me]),n((()=>{var e,t,i,o,n,l,r;if(!U.newPickerConf&&((null==(e=U.products)?void 0:e.length)||(null==(t=U.collection)?void 0:t.length))){if(U.products&&(null==(i=U.products)?void 0:i.length)){if(null==(o=U.data)?void 0:o.entitledProductIds){const e=U.products.filter((e=>{var t,i;return null==(i=null==(t=U.data)?void 0:t.entitledProductIds)?void 0:i.includes(parseInt(e.id))}));Oe(e)}if(null==(n=U.data)?void 0:n.prerequisiteProductIds){const e=U.products.filter((e=>{var t,i;return null==(i=null==(t=U.data)?void 0:t.prerequisiteProductIds)?void 0:i.includes(parseInt(e.id))}));Ee(e)}}if(U.collection&&U.collection.length){if(null==(l=U.data)?void 0:l.entitledCollectionIds){const e=U.collection.filter((e=>{var t,i;return null==(i=null==(t=U.data)?void 0:t.entitledCollectionIds)?void 0:i.includes(parseInt(e.id))}));we(e)}if(null==(r=U.data)?void 0:r.prerequisiteCollectionIds){const e=U.collection.filter((e=>{var t,i;return null==(i=null==(t=U.data)?void 0:t.prerequisiteCollectionIds)?void 0:i.includes(parseInt(e.id))}));Ve(e)}}}}),[U.products,U.collection]),n((()=>{var e,t,i,o,n,l,r,a;(null==(t=null==(e=U.data)?void 0:e.productsConf)?void 0:t.entitledProducts)&&Oe(U.data.productsConf.entitledProducts),(null==(o=null==(i=U.data)?void 0:i.productsConf)?void 0:o.prerequisiteProducts)&&Ee(U.data.productsConf.prerequisiteProducts),(null==(l=null==(n=U.data)?void 0:n.collectionsConf)?void 0:l.entitledCollections)&&we(U.data.collectionsConf.entitledCollections),(null==(a=null==(r=U.data)?void 0:r.collectionsConf)?void 0:a.prerequisiteCollections)&&Ve(U.data.collectionsConf.prerequisiteCollections)}),[null==(X=U.data)?void 0:X.productsConf,null==(Q=U.data)?void 0:Q.collectionsConf]),n((()=>{if(!Se)return;if(U.newPickerConf){const e=[];return Object.values(Se).forEach((t=>{t.products&&Object.keys(t.products).forEach((t=>{e.push(parseInt(t))}))})),void ce(K(z({},de),{entitledProductIds:e}))}const e=Se.map((e=>parseInt(e.id)));ce(K(z({},de),{entitledProductIds:e}))}),[Se]),n((()=>{if(!Te)return;if(U.newPickerConf){const e=[];return Object.values(Te).forEach((t=>{t.products&&Object.keys(t.products).forEach((t=>{e.push(parseInt(t))}))})),void ce(K(z({},de),{prerequisiteProductIds:e}))}const e=Te.map((e=>parseInt(e.id)));ce(K(z({},de),{prerequisiteProductIds:e}))}),[Te]),n((()=>{if(!Ne)return;if(U.newPickerConf){(null==Ne?void 0:Ne.isCustom)&&delete Ne.isCustom;const e=Object.keys(Ne).map((e=>parseInt(e)));return void ce(K(z({},de),{entitledCollectionIds:e}))}const e=Ne.map((e=>parseInt(e.id)));ce(K(z({},de),{entitledCollectionIds:e}))}),[Ne]),n((()=>{if(!_e)return;if(U.newPickerConf){(null==_e?void 0:_e.isCustom)&&delete _e.isCustom;const e=Object.keys(_e).map((e=>parseInt(e)));return void ce(K(z({},de),{prerequisiteCollectionIds:e}))}const e=_e.map((e=>parseInt(e.id)));ce(K(z({},de),{prerequisiteCollectionIds:e}))}),[_e]);const Ke=()=>{var e,t;let i,o=de;return de.isStaticCoupon||(de.targetType===p.SHIPPING_LINE?i=l.FREE_SHIPPING:de.targetType===p.LINE_ITEM?i=de.targetSelection===C.ENTITLED?(null==(e=de.prerequisiteProductIds)?void 0:e.length)||(null==(t=de.prerequisiteCollectionIds)?void 0:t.length)||de.prerequisiteQuantity||de.entitledQuantity?l.BUY_X_GET_Y:l.AMOUNT_OFF_PRODUCTS:l.AMOUNT_OFF_ORDER:(o=K(z({},o),{targetType:p.LINE_ITEM,targetSelection:C.ALL,valueType:m.FIXED_AMOUNT}),i=l.AMOUNT_OFF_ORDER)),{discountType:i,tempCouponData:o}},$e=()=>{Ge(c),Xe(u)},Je=e=>{var t;const i={invalidDiscountCode:"Please add Discount Code",invalidCouponTitle:"Please add Discount Coupon Title",invalidCouponDescription:"Please add Coupon Description",inValidProbability:e.inValidProbability&&(null!=(t=de.probability)?t:-1)>1?"Probability should not exceed 1":de.isStaticCoupon?"Please add Probability":"Probability should be greater than 0",inValidDiscountAmount:"Please add Discount Amount",inValidMinimumAmount:"Specify minimum amount required",inValidMinimumQuantity:"Specify minimum items required",inValidCouponExpiry:"Please add Coupon Expiry",inValidProductSelection:"Please specify the products",inValidProductVariableSelection:"Please specify the product variables",inValidCollectionSelection:"Please specify the collections",inValidBuyXValue:"Please specify buy product quantity",inValidGetYValue:"Please specify get product quantity",inValidBuyXProductSelection:"Please specify the products",inValidBuyXCollectionSelection:"Please specify the collections",inValidGetYProductSelection:"Please specify the products",inValidGetYCollectionSelection:"Please specify the collections",inValidBuyXProductVariableSelection:"Please specify the product variables",inValidGetYProductVariableSelection:"Please specify the product variables"};let o="";Object.keys(e).forEach((t=>{e[t]&&(o=i[t])}));const n=Object.values(e).filter(Boolean).length;return n>0&&(je(n>1?"Please add discount details":o),!0)},We=()=>{if(!U.quadrant||!U.probability)return;const e=[...U.probability];let t=[];e.length>=U.quadrant&&e.splice(U.quadrant-1,1),t=e;const i=t.reduce(((e,t)=>e+t),0)+(de.probability||0);return xe(parseFloat(i.toFixed(4))),parseFloat(i.toFixed(4))},Ze=e=>{var t,i,o,n,r,a,d,c,u,s,y,P,b,v,h,f;const I=e.value;Ce(I),Ee([]),Oe([]),Ve([]),we([]),I===l.FREE_SHIPPING?ce({value:100,targetSelection:C.ALL,targetType:p.SHIPPING_LINE,valueType:m.PERCENTAGE,quadrant:de.quadrant,isStaticCoupon:!1,title:de.title,expireAt:null!=(t=de.expireAt)?t:void 0,expireAfter:null!=(i=de.expireAfter)?i:void 0,probability:de.probability,minQuantity:null!=(o=de.minQuantity)?o:void 0,minAmount:null!=(n=de.minAmount)?n:void 0}):I===l.BUY_X_GET_Y?ce({value:100,targetSelection:C.ENTITLED,targetType:p.LINE_ITEM,valueType:m.PERCENTAGE,quadrant:de.quadrant,isStaticCoupon:!1,title:de.title,expireAt:null!=(r=de.expireAt)?r:void 0,expireAfter:null!=(a=de.expireAfter)?a:void 0,probability:de.probability,minQuantity:void 0,minAmount:void 0}):I===l.AMOUNT_OFF_ORDER?ce({targetSelection:C.ALL,targetType:p.LINE_ITEM,valueType:null!=(d=de.valueType)?d:m.FIXED_AMOUNT,quadrant:de.quadrant,isStaticCoupon:!1,title:de.title,expireAt:null!=(c=de.expireAt)?c:void 0,expireAfter:null!=(u=de.expireAfter)?u:void 0,probability:de.probability,value:de.value,minQuantity:null!=(s=de.minQuantity)?s:void 0,minAmount:null!=(y=de.minAmount)?y:void 0}):I===l.AMOUNT_OFF_PRODUCTS&&ce({targetSelection:C.ENTITLED,targetType:p.LINE_ITEM,valueType:null!=(P=de.valueType)?P:m.FIXED_AMOUNT,quadrant:de.quadrant,isStaticCoupon:!1,title:de.title,expireAt:null!=(b=de.expireAt)?b:void 0,expireAfter:null!=(v=de.expireAfter)?v:void 0,probability:de.probability,value:de.value,minQuantity:null!=(h=de.minQuantity)?h:void 0,minAmount:null!=(f=de.minAmount)?f:void 0})},et=t=>t&&e(T,{theme:"light",tagText:t,type:"negative",LeadingIcon:A});return t(f,{width:(re||ie)&&U.newPickerConf?"25px":"640px",open:U.isOpen,hideCrossButton:!!ne,headingTitle:ie?"Select Products":U.title,headingSubtitle:ie?void 0:U.subTitle,footerLeftCustomElement:Re?et(Re):U.errorMsg?et(U.errorMsg):!U.quadrant||U.hideProbability?e(i,{}):Fe<=1?e(T,{theme:"light",tagText:`Current probability sum: ${Fe}`,type:"white"}):e(E,{body:"Probability sum should not exceed 1",placement:"top",children:e("div",{children:e(T,{style:{cursor:"pointer"},theme:"light",tagText:`Current probability sum: ${Fe}`,type:"negative",LeadingIcon:V})})}),headerRightCustomElement:U.allowStaticCoupon||ie?void 0:e(y,{options:ze,width:"200px",placement:"bottom-start",size:"small",onSelect:e=>{Ze(e)}}),onClose:U.onClose,footerContainerStyle:{borderTop:`1px solid ${h.colorsV2.stroke.primary}`},primaryButton:ie?{buttonType:"primary",onClick:()=>{oe(void 0)},buttonText:"Add"}:re?{buttonType:"primary",onClick:()=>{ae(void 0)},buttonText:"Add"}:{buttonType:"primary",buttonText:"Create discount code",isLoading:null!=(H=U.loading)&&H,onClick:()=>{var e,t,i,o,n;if($e(),de.isStaticCoupon){const{isStaticCoupon:e,couponCode:t,title:i,description:o,quadrant:n,probability:l}=de,r={invalidDiscountCode:!t,invalidCouponTitle:!i,invalidCouponDescription:!o,inValidProbability:!U.hideProbability&&(null!=l?l:-1)<0||(null!=l?l:0)>1||Number.isNaN(null!=l?l:0)};if(Je(r))return void Ge(r);if(ue||Fe>1)return void je(!U.hideProbability&&Fe>1?"Probability sum should not exceed 1":"Invalid coupon details");U.onSaveClicked({quadrant:n,couponCode:t,description:o,isStaticCoupon:e,probability:l,title:de.title})}else{const c={invalidCouponTitle:!de.title,inValidProbability:!U.hideProbability&&(null!=(e=de.probability)?e:-1)<=0||(null!=(t=de.probability)?t:-1)>1||Number.isNaN(null!=(i=de.probability)?i:-1),inValidDiscountAmount:!de.value,inValidMinimumQuantity:!1,inValidMinimumAmount:!1,inValidCouponExpiry:!1,inValidProductSelection:!1,inValidProductVariableSelection:!1,inValidCollectionSelection:!1,inValidBuyXValue:!1,inValidGetYValue:!1,inValidBuyXProductSelection:!1,inValidGetYProductSelection:!1,inValidBuyXCollectionSelection:!1,inValidGetYCollectionSelection:!1,inValidBuyXProductVariableSelection:!1,inValidGetYProductVariableSelection:!1};if(pe!==l.BUY_X_GET_Y&&me!==r.NA){const{minAmount:e,minQuantity:t}=de;c.inValidMinimumAmount=me===r.AMOUNT&&!e,c.inValidMinimumQuantity=me===r.QUANTITY&&!t}if(Le&&(c.inValidCouponExpiry=!de.expireAt&&!de.expireAfter),pe!==l.AMOUNT_OFF_ORDER&&pe!==l.AMOUNT_OFF_PRODUCTS||(Pe!==a.SPECIFIC_PRODUCTS||!Se||Object.keys(Se).length||Ae||(c.inValidProductSelection=!0,c.inValidProductVariableSelection=!0),Pe===a.SPECIFIC_COLLECTIONS&&Ne&&!Object.keys(Ne).length&&(c.inValidCollectionSelection=!0)),pe===l.BUY_X_GET_Y&&(de.prerequisiteQuantity||(c.inValidBuyXValue=!0),de.entitledQuantity||(c.inValidGetYValue=!0),ve!==d.SPECIFIC_PRODUCTS||!Te||Object.keys(Te).length||ge||(c.inValidBuyXProductSelection=!0,c.inValidBuyXProductVariableSelection=!0),ve===d.SPECIFIC_COLLECTIONS&&_e&&!Object.keys(_e).length&&(c.inValidBuyXCollectionSelection=!0),fe!==d.SPECIFIC_PRODUCTS||!Se||Object.keys(Se).length||Ae||(c.inValidGetYProductSelection=!0,c.inValidGetYProductVariableSelection=!0),fe===d.SPECIFIC_COLLECTIONS&&Ne&&!Object.keys(Ne).length&&(c.inValidGetYCollectionSelection=!0)),Je(c))return void Xe(c);if(ue||Fe>1)return void je(!U.hideProbability&&Fe>1?"Probability sum should not exceed 1":"Invalid coupon details");U.onSaveClicked(K(z({},de),{description:R(de,U.currency,null!=(o=U.products)?o:[],null!=(n=U.collection)?n:[]),productsConf:{entitledProducts:null!=Se?Se:[],prerequisiteProducts:null!=Te?Te:[]},collectionsConf:{entitledCollections:null!=Ne?Ne:[],prerequisiteCollections:null!=_e?_e:[]},productVariableConf:{entitledProductVariable:null!=Ae?Ae:{},prerequisiteProductVariable:null!=ge?ge:{}}}))}}},secondaryButton:ie?{buttonType:"tertiaryGray",onClick:()=>{oe(void 0)},buttonText:"Back"}:re?{buttonType:"tertiaryGray",onClick:()=>{ae(void 0)},buttonText:"Back"}:{buttonType:"tertiaryGray",onClick:U.onClose,buttonText:"Cancel"},children:[!ie&&!re&&t(N,{children:[U.allowStaticCoupon&&!ie&&t(w,{selectedDiv:de.isStaticCoupon?1:2,children:["static"===U.hideOption?e(i,{}):t("div",{className:"coupon-type__container",onClick:()=>{de.isStaticCoupon||(ce({isStaticCoupon:!0,quadrant:de.quadrant}),je(""),$e())},children:[e(P,{style:{marginBottom:"4px",color:de.isStaticCoupon?h.colorsV2.content.brand:void 0},children:"Static Code"}),e(b,{style:de.isStaticCoupon?{color:h.colorsV2.content.brand}:{},children:"A uniform code provided manually, used for providing the same discount to all customers."})]}),"dynamic"===U.hideOption?e(i,{}):t("div",{className:"coupon-type__container",onClick:()=>{var t;de.isStaticCoupon&&(Ce(l.AMOUNT_OFF_ORDER),ce({isStaticCoupon:!1,quadrant:de.quadrant,targetType:p.LINE_ITEM,targetSelection:C.ALL,valueType:m.FIXED_AMOUNT}),je(""),$e(),qe({id:"0",label:"Amount",value:"amount",icon:t=>e("span",{style:{fontSize:20,color:t},children:U.currency||""})}),Ue(null!=(t=U.makeExpiryMandatory)&&t),ye(r.NA))},children:[e(P,{style:{marginBottom:"4px",color:de.isStaticCoupon?void 0:h.colorsV2.content.brand},children:"Dynamic Code"}),e(b,{style:de.isStaticCoupon?{}:{color:h.colorsV2.content.brand},children:"Code will be unique for all customers, with the first 5 letters of the customer's name, followed by 10 random characters."})]})]}),e(v,{style:{marginTop:"24px"},children:"Coupon Details"}),de.isStaticCoupon&&!ie&&e(q,{discountData:de,setDiscountData:ce,hideProbability:U.hideProbability||!1,discountAdminUrl:U.discountAdminUrl,staticDiscountValidationError:Be,currency:U.currency}),!de.isStaticCoupon&&!ie&&!re&&e(j,{currency:U.currency,entitledProducts:null!=Se?Se:[],prerequisiteProducts:null!=Te?Te:[],setEntitledProducts:Oe,setPrerequisiteProducts:Ee,discountData:de,productPickerOpen:ie,productVariablePickerOpen:ne,setIsProductPickerOpen:oe,setIsProductVariablePickerOpen:le,setDiscountData:ce,selectedCouponType:pe,setSelectedCouponType:Ce,selectedMinimumRequirement:me,setSelectedMinimumRequirement:ye,discountCouponAppliesTo:Pe,offerAppliesToBuy:ve,offerAppliesToGet:fe,setDiscountCouponAppliesTo:be,setOfferAppliesToBuy:he,setOfferAppliesToGet:Ie,hideProbability:U.hideProbability||!1,hideExpiration:U.hideExpiration||!1,allowStaticCoupon:U.allowStaticCoupon,onChangeCouponType:Ze,collectionPickerOpen:re,entitledCollections:null!=Ne?Ne:[],prerequisiteCollections:null!=_e?_e:[],setIsCollectionPickerOpen:ae,setEntitledCollections:we,setPrerequisiteCollections:Ve,useNewPicker:!!U.newPickerConf,setSelectedDiscountDetails:qe,selectedDiscountDetails:Me,isProductVariableSupported:U.isProductVariableSupported,entitledProductVariable:Ae,setEntitledProductVariable:De,preRequisiteProductVariable:ge,setPreRequisiteProductVariable:ke,productVariableList:U.productVariableList,isAddExpirationChecked:Le,setIsAddExpirationChecked:Ue,dynamicDiscountValidationError:Ye,setDynamicDiscountValidationError:Xe,setValidationErrorMessage:je,resetValidationErrors:$e,discountDetailsOptions:te,selectedExpiration:Qe,setSelectedExpiration:He,makeExpiryMandatory:!!U.makeExpiryMandatory})]}),!!ie&&t(i,{children:[!U.newPickerConf&&e("div",{style:{padding:"12px 0"},children:e(I,{show:!0,onSave:()=>{},products:null!=($=U.products)?$:[],title:"Select Products",onClose:()=>{oe(void 0)},selectedProducts:null!=(J=ie===M.ENTITLED?Se:Te)?J:[],setSelectedProducts:ie===M.ENTITLED?Oe:Ee,onSearchKeyChange:U.onProductSearch})}),U.newPickerConf&&e(D,{visible:!0,onClose:()=>oe(void 0),collectionFetcher:(e,t,i)=>{var o;return(null==(o=U.newPickerConf)?void 0:o.fetchCollections)?U.newPickerConf.fetchCollections(e,t,!1,i):null},productFetcher:(e,t,i,o,n)=>{var l;return(null==(l=U.newPickerConf)?void 0:l.fetchProducts)?U.newPickerConf.fetchProducts(e,t,o,n,!1,i):null},selectedItems:ie===M.ENTITLED?Se:Te,onAdd:e=>{ie===M.ENTITLED?Oe(e):Ee(e),oe(void 0)},zIndex:200,storeId:U.newPickerConf.storeId,appType:U.newPickerConf.appType||L.ApplicationType.BIK,searchInCollectionFetcher:(e,t,i,o)=>{var n;return(null==(n=U.newPickerConf)?void 0:n.searchInCollection)?U.newPickerConf.searchInCollection(e,t,i,!1,o):null},customCollectionRestriction:!1,searchFetcher:(e,t,i)=>{var o;return(null==(o=U.newPickerConf)?void 0:o.searchProducts)?U.newPickerConf.searchProducts(e,t,!1,i):null},hideCollectionCheckbox:!0,hideVariantCheckbox:!0,selectProductsFromCustomCollection:!0,hideSelectionCount:!0})]}),!!re&&e("div",{style:{padding:"12px 0"},children:t(i,{children:[U.newPickerConf&&e(D,{visible:!0,onClose:()=>ae(void 0),collectionFetcher:U.newPickerConf.fetchCollections,productFetcher:U.newPickerConf.fetchProducts,selectedItems:re===M.ENTITLED?Ne:_e,onAdd:e=>{Object.values(e).forEach((e=>{e.products&&delete e.products})),re===M.ENTITLED?we(e):Ve(e),ae(void 0)},customCollectionRestriction:!1,zIndex:200,storeId:U.newPickerConf.storeId,appType:U.newPickerConf.appType||L.ApplicationType.BIK,searchInCollectionFetcher:U.newPickerConf.searchInCollection,searchFetcher:U.newPickerConf.searchProducts,hideProductCheckbox:!0,hideVariantCheckbox:!0,title:"Select Collections",hideGlobalSearch:!0,hideSelectionCount:!0}),!U.newPickerConf&&e(I,{show:!0,onSave:()=>{},products:null!=(W=U.collection)?W:[],title:"Select Products",onClose:()=>{ae(void 0)},selectedProducts:null!=(Z=re===M.ENTITLED?Ne:_e)?Z:[],setSelectedProducts:re===M.ENTITLED?we:Ve,onSearchKeyChange:U.onCollectionSearch,searchPlaceholder:"Search collections..."})]})}),ne&&e(F,{children:e("div",{style:{width:"50%",height:"100%",marginLeft:"50%"},children:e(k,{type:g.EMBEDDED,data:null!=(ee=U.productVariableList)?ee:[],showHeader:!0,onSelect:e=>{if(ne===M.ENTITLED){const{displayName:t,actualValue:i,isAvailable:o}=e;De({displayName:t,actualValue:i,isAvailable:o}),le(void 0)}if(ne===M.PREREQUISITE){const{displayName:t,actualValue:i,isAvailable:o}=e;ke({displayName:t,actualValue:i,isAvailable:o}),le(void 0)}},onClose:()=>{le(void 0)}})})})]})};export{$ as DiscountModal};
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import"../../node_modules/@bikdotai/bik-models/growth/models/bik-store.js";import{useState as o,useEffect as n}from"react";import{DISCOUNT_TYPES as r,MIN_PURCHASE_REQUIREMENT as l,DISCOUNT_APPLIES_TO as a,OFFER_APPLIES_TO as c,initialStaticCouponErrorState as d,initialDynamicCouponErrorState as s,COUPON_EXPIRATION as u,DISCOUNT_TARGET_TYPES as p,DISCOUNT_TARGET_SELECTION as C,DISCOUNT_VALUE_TYPES as m}from"./type.js";import"../dropdown/DropdownPopover/index.js";import{Dropdown as y}from"../dropdown/Dropdown.js";import"../dropdown/ChipDropdown.js";import{TitleSmall as P,BodyCaption as b,TitleRegular as h}from"../TypographyStyle.js";import{DEFAULT_THEME as I}from"../../constants/Theme.js";import"../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../list-item/ListItem.js";import"../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../dropdown/OpenedDropdown/components/menu/MenuList.js";import"../button/Button.js";import"../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../icon-button/IconButton.js";import"../input/Input.js";import"../input/context/InputStyleProvider.js";import"../dropdown/MenuItem/MenuItem.js";import{StyledModal as f}from"../modals/styledModal.js";import{ProductPickerContent as T}from"../product-picker/ProductPickerModal.js";import{Tag as E}from"../tag/Tag.js";import{Tooltip as S}from"../tooltips/Tooltip.js";import v from"../../assets/icons/gift_icon.svg.js";import O from"../../assets/icons/percentage_icon.svg.js";import _ from"../../assets/icons/shipping_icon.svg.js";import V from"../../assets/icons/triangle_error.svg.js";import A from"../../assets/icons/warning.svg.js";import{ProductPickerModal as D}from"../product-picker-v2/modal.js";import{PickerType as g}from"../variable-picker-v3/model.js";import{VariablePicker as k}from"../variable-picker-v3/VariablePicker.js";import{StyledDiscountDialogueContainer as N,CouponTypeContainerStyled as x,VariablePickerContainer as F}from"./DiscountModal.styled.js";import{validateDiscountData as w,descriptionBuilder as R}from"./DiscountUtils.js";import M,{DISCOUNT_PRODUCTS as j}from"./DynamicCoupon/DynamicCoupon.js";import q from"./StaticCoupon/StaticCoupon.js";import{__exports as L}from"../../_virtual/bik-store.js";const U=U=>{const B=[{id:"0",label:"Amount",value:"amount",icon:t=>e("span",{style:{fontSize:20,color:t,lineHeight:.9},children:U.currency||""})},{id:"1",label:"Percentage",value:"percentage",icon:t=>e(O,{width:24,height:24,color:t})},{id:"2",label:"Buy X get Y",value:r.BUY_X_GET_Y,icon:t=>e(v,{width:24,height:24,color:t})},{id:"3",label:"Free Shipping",value:r.FREE_SHIPPING,icon:t=>e(_,{width:24,height:24,color:t})}],[G,Y]=o(),[X,Q]=o(),[H,z]=o(),[K,$]=o(U.data??("string"==typeof U.hideOption?{isStaticCoupon:"dynamic"===U.hideOption}:{isStaticCoupon:!0})),[J,W]=o(!0),[Z,ee]=o(),[te,ie]=o(U.data?.minAmount?l.AMOUNT:U.data?.minQuantity?l.QUANTITY:l.NA),[oe,ne]=o(a.ENTIRE_ORDER),[re,le]=o(c.SPECIFIC_PRODUCTS),[ae,ce]=o(c.SPECIFIC_PRODUCTS),[de,se]=o(void 0),[ue,pe]=o(void 0),[Ce,me]=o(void 0),[ye,Pe]=o(void 0),[be,he]=o(void 0),[Ie,fe]=o(void 0),[Te,Ee]=o(0),[Se,ve]=o(""),[Oe,_e]=o(B[0]),[Ve,Ae]=o(!1),[De,ge]=o(d),[ke,Ne]=o(s),[xe,Fe]=o(u.DYNAMIC_EXPIRATION),we=[{value:r.AMOUNT_OFF_ORDER,label:"Amount off on order",selected:Z===r.AMOUNT_OFF_ORDER},{value:r.AMOUNT_OFF_PRODUCTS,label:"Amount off on products",selected:Z===r.AMOUNT_OFF_PRODUCTS},{value:r.BUY_X_GET_Y,label:"Buy X Get Y FREE",selected:Z===r.BUY_X_GET_Y},{value:r.FREE_SHIPPING,label:"Free shipping",selected:Z===r.FREE_SHIPPING}];n((()=>{U.makeExpiryMandatory&&Ae(!0)}),[U.makeExpiryMandatory]),n((()=>{let e;const{tempCouponData:t,discountType:i}=Re();ee(i);const o=(e,i)=>{_e(t.valueType===m.FIXED_AMOUNT?B[e]:B[i])},n=(e,t)=>{Object.keys(e||{}).length&&t(e)};switch((t?.expireAfter||t?.expireAt)&&(Ae(!0),t?.expireAt&&Fe(u.FIXED_EXPIRATION),t?.expireAfter&&Fe(u.DYNAMIC_EXPIRATION)),i){case r.AMOUNT_OFF_ORDER:o(0,1),ne(a.ENTIRE_ORDER);break;case r.AMOUNT_OFF_PRODUCTS:o(0,1),t.entitledCollectionIds?.length?ne(a.SPECIFIC_COLLECTIONS):t.entitledProductIds?.length||t.productVariableConf?.entitledProductVariable?(ne(a.SPECIFIC_PRODUCTS),n(t.productVariableConf?.entitledProductVariable,Pe)):ne(a.ENTIRE_ORDER);break;case r.BUY_X_GET_Y:_e(B[2]),t.entitledCollectionIds?.length?ce(c.SPECIFIC_COLLECTIONS):(ce(c.SPECIFIC_PRODUCTS),n(t.productVariableConf?.entitledProductVariable,Pe)),t.prerequisiteCollectionIds?.length?le(c.SPECIFIC_COLLECTIONS):(le(c.SPECIFIC_PRODUCTS),n(t.productVariableConf?.prerequisiteProductVariable,he));break;case r.FREE_SHIPPING:_e(B[3])}$({...t}),U.hideProbability||(e=qe()),W(w(t,te,i,U.hideProbability||!1,e,!!t.isStaticCoupon)),U.hideProbability||qe()}),[]),n((()=>{let e;U.hideProbability||(e=qe()),W(w(K,te,Z,U.hideProbability||!1,e,!!K.isStaticCoupon))}),[K,Te,Z,te]),n((()=>{if(!U.newPickerConf&&(U.products?.length||U.collection?.length)){if(U.products&&U.products?.length){if(U.data?.entitledProductIds){const e=U.products.filter((e=>U.data?.entitledProductIds?.includes(parseInt(e.id))));pe(e)}if(U.data?.prerequisiteProductIds){const e=U.products.filter((e=>U.data?.prerequisiteProductIds?.includes(parseInt(e.id))));se(e)}}if(U.collection&&U.collection.length){if(U.data?.entitledCollectionIds){const e=U.collection.filter((e=>U.data?.entitledCollectionIds?.includes(parseInt(e.id))));fe(e)}if(U.data?.prerequisiteCollectionIds){const e=U.collection.filter((e=>U.data?.prerequisiteCollectionIds?.includes(parseInt(e.id))));me(e)}}}}),[U.products,U.collection]),n((()=>{U.data?.productsConf?.entitledProducts&&pe(U.data.productsConf.entitledProducts),U.data?.productsConf?.prerequisiteProducts&&se(U.data.productsConf.prerequisiteProducts),U.data?.collectionsConf?.entitledCollections&&fe(U.data.collectionsConf.entitledCollections),U.data?.collectionsConf?.prerequisiteCollections&&me(U.data.collectionsConf.prerequisiteCollections)}),[U.data?.productsConf,U.data?.collectionsConf]),n((()=>{if(!ue)return;if(U.newPickerConf){const e=[];return Object.values(ue).forEach((t=>{t.products&&Object.keys(t.products).forEach((t=>{e.push(parseInt(t))}))})),void $({...K,entitledProductIds:e})}const e=ue.map((e=>parseInt(e.id)));$({...K,entitledProductIds:e})}),[ue]),n((()=>{if(!de)return;if(U.newPickerConf){const e=[];return Object.values(de).forEach((t=>{t.products&&Object.keys(t.products).forEach((t=>{e.push(parseInt(t))}))})),void $({...K,prerequisiteProductIds:e})}const e=de.map((e=>parseInt(e.id)));$({...K,prerequisiteProductIds:e})}),[de]),n((()=>{if(!Ie)return;if(U.newPickerConf){Ie?.isCustom&&delete Ie.isCustom;const e=Object.keys(Ie).map((e=>parseInt(e)));return void $({...K,entitledCollectionIds:e})}const e=Ie.map((e=>parseInt(e.id)));$({...K,entitledCollectionIds:e})}),[Ie]),n((()=>{if(!Ce)return;if(U.newPickerConf){Ce?.isCustom&&delete Ce.isCustom;const e=Object.keys(Ce).map((e=>parseInt(e)));return void $({...K,prerequisiteCollectionIds:e})}const e=Ce.map((e=>parseInt(e.id)));$({...K,prerequisiteCollectionIds:e})}),[Ce]);const Re=()=>{let e,t=K;return K.isStaticCoupon||(K.targetType===p.SHIPPING_LINE?e=r.FREE_SHIPPING:K.targetType===p.LINE_ITEM?e=K.targetSelection===C.ENTITLED?K.prerequisiteProductIds?.length||K.prerequisiteCollectionIds?.length||K.prerequisiteQuantity||K.entitledQuantity?r.BUY_X_GET_Y:r.AMOUNT_OFF_PRODUCTS:r.AMOUNT_OFF_ORDER:(t={...t,targetType:p.LINE_ITEM,targetSelection:C.ALL,valueType:m.FIXED_AMOUNT},e=r.AMOUNT_OFF_ORDER)),{discountType:e,tempCouponData:t}},Me=()=>{ge(d),Ne(s)},je=e=>{const t={invalidDiscountCode:"Please add Discount Code",invalidCouponTitle:"Please add Discount Coupon Title",invalidCouponDescription:"Please add Coupon Description",inValidProbability:e.inValidProbability&&(K.probability??-1)>1?"Probability should not exceed 1":K.isStaticCoupon?"Please add Probability":"Probability should be greater than 0",inValidDiscountAmount:"Please add Discount Amount",inValidMinimumAmount:"Specify minimum amount required",inValidMinimumQuantity:"Specify minimum items required",inValidCouponExpiry:"Please add Coupon Expiry",inValidProductSelection:"Please specify the products",inValidProductVariableSelection:"Please specify the product variables",inValidCollectionSelection:"Please specify the collections",inValidBuyXValue:"Please specify buy product quantity",inValidGetYValue:"Please specify get product quantity",inValidBuyXProductSelection:"Please specify the products",inValidBuyXCollectionSelection:"Please specify the collections",inValidGetYProductSelection:"Please specify the products",inValidGetYCollectionSelection:"Please specify the collections",inValidBuyXProductVariableSelection:"Please specify the product variables",inValidGetYProductVariableSelection:"Please specify the product variables"};let i="";Object.keys(e).forEach((o=>{e[o]&&(i=t[o])}));const o=Object.values(e).filter(Boolean).length;return o>0&&(ve(o>1?"Please add discount details":i),!0)},qe=()=>{if(!U.quadrant||!U.probability)return;const e=[...U.probability];let t=[];e.length>=U.quadrant&&e.splice(U.quadrant-1,1),t=e;const i=t.reduce(((e,t)=>e+t),0)+(K.probability||0);return Ee(parseFloat(i.toFixed(4))),parseFloat(i.toFixed(4))},Le=e=>{const t=e.value;ee(t),se([]),pe([]),me([]),fe([]),t===r.FREE_SHIPPING?$({value:100,targetSelection:C.ALL,targetType:p.SHIPPING_LINE,valueType:m.PERCENTAGE,quadrant:K.quadrant,isStaticCoupon:!1,title:K.title,expireAt:K.expireAt??void 0,expireAfter:K.expireAfter??void 0,probability:K.probability,minQuantity:K.minQuantity??void 0,minAmount:K.minAmount??void 0}):t===r.BUY_X_GET_Y?$({value:100,targetSelection:C.ENTITLED,targetType:p.LINE_ITEM,valueType:m.PERCENTAGE,quadrant:K.quadrant,isStaticCoupon:!1,title:K.title,expireAt:K.expireAt??void 0,expireAfter:K.expireAfter??void 0,probability:K.probability,minQuantity:void 0,minAmount:void 0}):t===r.AMOUNT_OFF_ORDER?$({targetSelection:C.ALL,targetType:p.LINE_ITEM,valueType:K.valueType??m.FIXED_AMOUNT,quadrant:K.quadrant,isStaticCoupon:!1,title:K.title,expireAt:K.expireAt??void 0,expireAfter:K.expireAfter??void 0,probability:K.probability,value:K.value,minQuantity:K.minQuantity??void 0,minAmount:K.minAmount??void 0}):t===r.AMOUNT_OFF_PRODUCTS&&$({targetSelection:C.ENTITLED,targetType:p.LINE_ITEM,valueType:K.valueType??m.FIXED_AMOUNT,quadrant:K.quadrant,isStaticCoupon:!1,title:K.title,expireAt:K.expireAt??void 0,expireAfter:K.expireAfter??void 0,probability:K.probability,value:K.value,minQuantity:K.minQuantity??void 0,minAmount:K.minAmount??void 0})},Ue=t=>t&&e(E,{theme:"light",tagText:t,type:"negative",LeadingIcon:A});return t(f,{width:(H||G)&&U.newPickerConf?"25px":"640px",open:U.isOpen,hideCrossButton:!!X,headingTitle:G?"Select Products":U.title,headingSubtitle:G?void 0:U.subTitle,footerLeftCustomElement:Se?Ue(Se):U.errorMsg?Ue(U.errorMsg):!U.quadrant||U.hideProbability?e(i,{}):Te<=1?e(E,{theme:"light",tagText:`Current probability sum: ${Te}`,type:"white"}):e(S,{body:"Probability sum should not exceed 1",placement:"top",children:e("div",{children:e(E,{style:{cursor:"pointer"},theme:"light",tagText:`Current probability sum: ${Te}`,type:"negative",LeadingIcon:V})})}),headerRightCustomElement:U.allowStaticCoupon||G?void 0:e(y,{options:we,width:"200px",placement:"bottom-start",size:"small",onSelect:e=>{Le(e)}}),onClose:U.onClose,footerContainerStyle:{borderTop:`1px solid ${I.colorsV2.stroke.primary}`},primaryButton:G?{buttonType:"primary",onClick:()=>{Y(void 0)},buttonText:"Add"}:H?{buttonType:"primary",onClick:()=>{z(void 0)},buttonText:"Add"}:{buttonType:"primary",buttonText:"Create discount code",isLoading:U.loading??!1,onClick:()=>{if(Me(),K.isStaticCoupon){const{isStaticCoupon:e,couponCode:t,title:i,description:o,quadrant:n,probability:r}=K,l={invalidDiscountCode:!t,invalidCouponTitle:!i,invalidCouponDescription:!o,inValidProbability:!U.hideProbability&&(r??-1)<0||(r??0)>1||Number.isNaN(r??0)};if(je(l))return void ge(l);if(J||Te>1)return void ve(!U.hideProbability&&Te>1?"Probability sum should not exceed 1":"Invalid coupon details");U.onSaveClicked({quadrant:n,couponCode:t,description:o,isStaticCoupon:e,probability:r,title:K.title})}else{const e={invalidCouponTitle:!K.title,inValidProbability:!U.hideProbability&&(K.probability??-1)<=0||(K.probability??-1)>1||Number.isNaN(K.probability??-1),inValidDiscountAmount:!K.value,inValidMinimumQuantity:!1,inValidMinimumAmount:!1,inValidCouponExpiry:!1,inValidProductSelection:!1,inValidProductVariableSelection:!1,inValidCollectionSelection:!1,inValidBuyXValue:!1,inValidGetYValue:!1,inValidBuyXProductSelection:!1,inValidGetYProductSelection:!1,inValidBuyXCollectionSelection:!1,inValidGetYCollectionSelection:!1,inValidBuyXProductVariableSelection:!1,inValidGetYProductVariableSelection:!1};if(Z!==r.BUY_X_GET_Y&&te!==l.NA){const{minAmount:t,minQuantity:i}=K;e.inValidMinimumAmount=te===l.AMOUNT&&!t,e.inValidMinimumQuantity=te===l.QUANTITY&&!i}if(Ve&&(e.inValidCouponExpiry=!K.expireAt&&!K.expireAfter),Z!==r.AMOUNT_OFF_ORDER&&Z!==r.AMOUNT_OFF_PRODUCTS||(oe!==a.SPECIFIC_PRODUCTS||!ue||Object.keys(ue).length||ye||(e.inValidProductSelection=!0,e.inValidProductVariableSelection=!0),oe===a.SPECIFIC_COLLECTIONS&&Ie&&!Object.keys(Ie).length&&(e.inValidCollectionSelection=!0)),Z===r.BUY_X_GET_Y&&(K.prerequisiteQuantity||(e.inValidBuyXValue=!0),K.entitledQuantity||(e.inValidGetYValue=!0),re!==c.SPECIFIC_PRODUCTS||!de||Object.keys(de).length||be||(e.inValidBuyXProductSelection=!0,e.inValidBuyXProductVariableSelection=!0),re===c.SPECIFIC_COLLECTIONS&&Ce&&!Object.keys(Ce).length&&(e.inValidBuyXCollectionSelection=!0),ae!==c.SPECIFIC_PRODUCTS||!ue||Object.keys(ue).length||ye||(e.inValidGetYProductSelection=!0,e.inValidGetYProductVariableSelection=!0),ae===c.SPECIFIC_COLLECTIONS&&Ie&&!Object.keys(Ie).length&&(e.inValidGetYCollectionSelection=!0)),je(e))return void Ne(e);if(J||Te>1)return void ve(!U.hideProbability&&Te>1?"Probability sum should not exceed 1":"Invalid coupon details");U.onSaveClicked({...K,description:R(K,U.currency,U.products??[],U.collection??[]),productsConf:{entitledProducts:ue??[],prerequisiteProducts:de??[]},collectionsConf:{entitledCollections:Ie??[],prerequisiteCollections:Ce??[]},productVariableConf:{entitledProductVariable:ye??{},prerequisiteProductVariable:be??{}}})}}},secondaryButton:G?{buttonType:"tertiaryGray",onClick:()=>{Y(void 0)},buttonText:"Back"}:H?{buttonType:"tertiaryGray",onClick:()=>{z(void 0)},buttonText:"Back"}:{buttonType:"tertiaryGray",onClick:U.onClose,buttonText:"Cancel"},children:[!G&&!H&&t(N,{children:[U.allowStaticCoupon&&!G&&t(x,{selectedDiv:K.isStaticCoupon?1:2,children:["static"===U.hideOption?e(i,{}):t("div",{className:"coupon-type__container",onClick:()=>{K.isStaticCoupon||($({isStaticCoupon:!0,quadrant:K.quadrant}),ve(""),Me())},children:[e(P,{style:{marginBottom:"4px",color:K.isStaticCoupon?I.colorsV2.content.brand:void 0},children:"Static Code"}),e(b,{style:K.isStaticCoupon?{color:I.colorsV2.content.brand}:{},children:"A uniform code provided manually, used for providing the same discount to all customers."})]}),"dynamic"===U.hideOption?e(i,{}):t("div",{className:"coupon-type__container",onClick:()=>{K.isStaticCoupon&&(ee(r.AMOUNT_OFF_ORDER),$({isStaticCoupon:!1,quadrant:K.quadrant,targetType:p.LINE_ITEM,targetSelection:C.ALL,valueType:m.FIXED_AMOUNT}),ve(""),Me(),_e({id:"0",label:"Amount",value:"amount",icon:t=>e("span",{style:{fontSize:20,color:t},children:U.currency||""})}),Ae(U.makeExpiryMandatory??!1),ie(l.NA))},children:[e(P,{style:{marginBottom:"4px",color:K.isStaticCoupon?void 0:I.colorsV2.content.brand},children:"Dynamic Code"}),e(b,{style:K.isStaticCoupon?{}:{color:I.colorsV2.content.brand},children:"Code will be unique for all customers, with the first 5 letters of the customer's name, followed by 10 random characters."})]})]}),e(h,{style:{marginTop:"24px"},children:"Coupon Details"}),K.isStaticCoupon&&!G&&e(q,{discountData:K,setDiscountData:$,hideProbability:U.hideProbability||!1,discountAdminUrl:U.discountAdminUrl,staticDiscountValidationError:De,currency:U.currency}),!K.isStaticCoupon&&!G&&!H&&e(M,{currency:U.currency,entitledProducts:ue??[],prerequisiteProducts:de??[],setEntitledProducts:pe,setPrerequisiteProducts:se,discountData:K,productPickerOpen:G,productVariablePickerOpen:X,setIsProductPickerOpen:Y,setIsProductVariablePickerOpen:Q,setDiscountData:$,selectedCouponType:Z,setSelectedCouponType:ee,selectedMinimumRequirement:te,setSelectedMinimumRequirement:ie,discountCouponAppliesTo:oe,offerAppliesToBuy:re,offerAppliesToGet:ae,setDiscountCouponAppliesTo:ne,setOfferAppliesToBuy:le,setOfferAppliesToGet:ce,hideProbability:U.hideProbability||!1,hideExpiration:U.hideExpiration||!1,allowStaticCoupon:U.allowStaticCoupon,onChangeCouponType:Le,collectionPickerOpen:H,entitledCollections:Ie??[],prerequisiteCollections:Ce??[],setIsCollectionPickerOpen:z,setEntitledCollections:fe,setPrerequisiteCollections:me,useNewPicker:!!U.newPickerConf,setSelectedDiscountDetails:_e,selectedDiscountDetails:Oe,isProductVariableSupported:U.isProductVariableSupported,entitledProductVariable:ye,setEntitledProductVariable:Pe,preRequisiteProductVariable:be,setPreRequisiteProductVariable:he,productVariableList:U.productVariableList,isAddExpirationChecked:Ve,setIsAddExpirationChecked:Ae,dynamicDiscountValidationError:ke,setDynamicDiscountValidationError:Ne,setValidationErrorMessage:ve,resetValidationErrors:Me,discountDetailsOptions:B,selectedExpiration:xe,setSelectedExpiration:Fe,makeExpiryMandatory:!!U.makeExpiryMandatory})]}),!!G&&t(i,{children:[!U.newPickerConf&&e("div",{style:{padding:"12px 0"},children:e(T,{show:!0,onSave:()=>{},products:U.products??[],title:"Select Products",onClose:()=>{Y(void 0)},selectedProducts:(G===j.ENTITLED?ue:de)??[],setSelectedProducts:G===j.ENTITLED?pe:se,onSearchKeyChange:U.onProductSearch})}),U.newPickerConf&&e(D,{visible:!0,onClose:()=>Y(void 0),collectionFetcher:(e,t,i)=>U.newPickerConf?.fetchCollections?U.newPickerConf.fetchCollections(e,t,!1,i):null,productFetcher:(e,t,i,o,n)=>U.newPickerConf?.fetchProducts?U.newPickerConf.fetchProducts(e,t,o,n,!1,i):null,selectedItems:G===j.ENTITLED?ue:de,onAdd:e=>{G===j.ENTITLED?pe(e):se(e),Y(void 0)},zIndex:200,storeId:U.newPickerConf.storeId,appType:U.newPickerConf.appType||L.ApplicationType.BIK,searchInCollectionFetcher:(e,t,i,o)=>U.newPickerConf?.searchInCollection?U.newPickerConf.searchInCollection(e,t,i,!1,o):null,customCollectionRestriction:!1,searchFetcher:(e,t,i)=>U.newPickerConf?.searchProducts?U.newPickerConf.searchProducts(e,t,!1,i):null,hideCollectionCheckbox:!0,hideVariantCheckbox:!0,selectProductsFromCustomCollection:!0,hideSelectionCount:!0})]}),!!H&&e("div",{style:{padding:"12px 0"},children:t(i,{children:[U.newPickerConf&&e(D,{visible:!0,onClose:()=>z(void 0),collectionFetcher:U.newPickerConf.fetchCollections,productFetcher:U.newPickerConf.fetchProducts,selectedItems:H===j.ENTITLED?Ie:Ce,onAdd:e=>{Object.values(e).forEach((e=>{e.products&&delete e.products})),H===j.ENTITLED?fe(e):me(e),z(void 0)},customCollectionRestriction:!1,zIndex:200,storeId:U.newPickerConf.storeId,appType:U.newPickerConf.appType||L.ApplicationType.BIK,searchInCollectionFetcher:U.newPickerConf.searchInCollection,searchFetcher:U.newPickerConf.searchProducts,hideProductCheckbox:!0,hideVariantCheckbox:!0,title:"Select Collections",hideGlobalSearch:!0,hideSelectionCount:!0}),!U.newPickerConf&&e(T,{show:!0,onSave:()=>{},products:U.collection??[],title:"Select Products",onClose:()=>{z(void 0)},selectedProducts:(H===j.ENTITLED?Ie:Ce)??[],setSelectedProducts:H===j.ENTITLED?fe:me,onSearchKeyChange:U.onCollectionSearch,searchPlaceholder:"Search collections..."})]})}),X&&e(F,{children:e("div",{style:{width:"50%",height:"100%",marginLeft:"50%"},children:e(k,{type:g.EMBEDDED,data:U.productVariableList??[],showHeader:!0,onSelect:e=>{if(X===j.ENTITLED){const{displayName:t,actualValue:i,isAvailable:o}=e;Pe({displayName:t,actualValue:i,isAvailable:o}),Q(void 0)}if(X===j.PREREQUISITE){const{displayName:t,actualValue:i,isAvailable:o}=e;he({displayName:t,actualValue:i,isAvailable:o}),Q(void 0)}},onClose:()=>{Q(void 0)}})})})]})};export{U as DiscountModal};
|
|
@@ -1 +1,69 @@
|
|
|
1
|
-
import c from"@emotion/styled/base";import{DEFAULT_THEME as b}from"../../constants/Theme.js";function d(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}const X=c("div","production"===process.env.NODE_ENV?{target:"etc1kyv4"}:{target:"etc1kyv4",label:"CouponTypeContainerStyled"})("display:flex;gap:16px;margin-bottom:18px;.coupon-type__container{flex:1px;padding:16px;border-radius:4px;background-color:",b.colorsV2.surface.subdued,";border:1px solid ",b.colorsV2.stroke.primary,";color:",b.colorsV2.content.secondary,";cursor:pointer;&:nth-child(",(c=>c.selectedDiv),"){background-color:",b.colorsV2.background.brandLight,";border:1px solid ",b.colorsV2.content.brand,";}}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkRpc2NvdW50TW9kYWwuc3R5bGVkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdtRCIsImZpbGUiOiJEaXNjb3VudE1vZGFsLnN0eWxlZC50cyIsInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCI7XG5pbXBvcnQgeyBERUZBVUxUX1RIRU1FIH0gZnJvbSBcIkBzcmMvY29uc3RhbnRzL1RoZW1lXCI7XG5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07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XG4iXX0= */")),G=c("div","production"===process.env.NODE_ENV?{target:"etc1kyv3"}:{target:"etc1kyv3",label:"StaticCouponContainerStyled"})("production"===process.env.NODE_ENV?{name:"m8yfjg",styles:"margin:16px 0;display:flex;flex-direction:column;gap:24px;.static-coupon__data{display:flex;gap:16px;}.static-input__wrapper{flex:1;}.info__container{display:flex;background:#f0f0f0;border-radius:4px;padding:4px 12px;gap:6px;}"}:{name:"m8yfjg",styles:"margin:16px 0;display:flex;flex-direction:column;gap:24px;.static-coupon__data{display:flex;gap:16px;}.static-input__wrapper{flex:1;}.info__container{display:flex;background:#f0f0f0;border-radius:4px;padding:4px 12px;gap:6px;}",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkRpc2NvdW50TW9kYWwuc3R5bGVkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVCcUQiLCJmaWxlIjoiRGlzY291bnRNb2RhbC5zdHlsZWQudHMiLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgREVGQVVMVF9USEVNRSB9IGZyb20gXCJAc3JjL2NvbnN0YW50cy9UaGVtZVwiO1xuZXhwb3J0IGNvbnN0IENvdXBvblR5cGVDb250YWluZXJTdHlsZWQgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRnYXA6IDE2cHg7XG5cdG1hcmdpbi1ib3R0b206IDE4cHg7XG5cblx0LmNvdXBvbi10eXBlX19jb250YWluZXIge1xuXHRcdGZsZXg6IDFweDtcblx0XHRwYWRkaW5nOiAxNnB4O1xuXHRcdGJvcmRlci1yYWRpdXM6IDRweDtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAke0RFRkFVTFRfVEhF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250YWluZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHRnYXA6IDEycHg7XG5cdG1hcmdpbi10b3A6IDE2cHg7XG5cblx0LmlucHV0X19yb3dzIHtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGdhcDogMTJweDtcblx0fVxuXG5cdC5pbnB1dF9fd3JhcHBlciB7XG5cdFx0ZmxleDogMTtcblx0fVxuYDtcbmV4cG9ydCBjb25zdCBTdHlsZWREaXNjb3VudERpYWxvZ3VlQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0aGVpZ2h0OiA0MjNweDtcblx0cGFkZGluZzogMTJweCAyNHB4O1xuXHRvdmVyZmxvdy15OiBzY3JvbGw7XG5gO1xuZXhwb3J0IGNvbnN0IFZhcmlhYmxlUGlja2VyQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGJhY2tncm91bmQtY29sb3I6IHJnYmEoMCwgMCwgMCwgMC43KTtcblx0ei1pbmRleDogMjtcblx0Ym9yZGVyOiAxcHggc29saWQgJHtERUZBVUxUX1RIRU1FLmNvbG9yc1YyLmNvbnRlbnQucGxhY2Vob2xkZXJ9O1xuXHRib3JkZXItcmFkaXVzOiA0cHg7XG5gO1xuIl19 */",toString:d}),l=c("div","production"===process.env.NODE_ENV?{target:"etc1kyv2"}:{target:"etc1kyv2",label:"DynamicCouponContainer"})("production"===process.env.NODE_ENV?{name:"cjxl3r",styles:"display:flex;flex-direction:column;gap:12px;margin-top:16px;.input__rows{display:flex;gap:12px;}.input__wrapper{flex:1;}"}:{name:"cjxl3r",styles:"display:flex;flex-direction:column;gap:12px;margin-top:16px;.input__rows{display:flex;gap:12px;}.input__wrapper{flex:1;}",map:"/*# sourceMappingURL=data:application/json;charset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vdy15OiBzY3JvbGw7XG5gO1xuZXhwb3J0IGNvbnN0IFZhcmlhYmxlUGlja2VyQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGJhY2tncm91bmQtY29sb3I6IHJnYmEoMCwgMCwgMCwgMC43KTtcblx0ei1pbmRleDogMjtcblx0Ym9yZGVyOiAxcHggc29saWQgJHtERUZBVUxUX1RIRU1FLmNvbG9yc1YyLmNvbnRlbnQucGxhY2Vob2xkZXJ9O1xuXHRib3JkZXItcmFkaXVzOiA0cHg7XG5gO1xuIl19 */",toString:d}),x=c("div","production"===process.env.NODE_ENV?{target:"etc1kyv1"}:{target:"etc1kyv1",label:"StyledDiscountDialogueContainer"})("production"===process.env.NODE_ENV?{name:"1ysvqm",styles:"height:423px;padding:12px 24px;overflow-y:scroll"}:{name:"1ysvqm",styles:"height:423px;padding:12px 24px;overflow-y:scroll",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkRpc2NvdW50TW9kYWwuc3R5bGVkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZEeUQiLCJmaWxlIjoiRGlzY291bnRNb2RhbC5zdHlsZWQudHMiLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgREVGQVVMVF9USEVNRSB9IGZyb20gXCJAc3JjL2NvbnN0YW50cy9UaGVtZVwiO1xuZXhwb3J0IGNvbnN0IENvdXBvblR5cGVDb250YWluZXJTdHlsZWQgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRnYXA6IDE2cHg7XG5cdG1hcmdpbi1ib3R0b206IDE4cHg7XG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JhY2tncm91bmQ6ICNmMGYwZjA7XG5cdFx0Ym9yZGVyLXJhZGl1czogNHB4O1xuXHRcdHBhZGRpbmc6IDRweCAxMnB4O1xuXHRcdGdhcDogNnB4O1xuXHR9XG5gO1xuZXhwb3J0IGNvbnN0IER5bmFtaWNDb3Vwb25Db250YWluZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHRnYXA6IDEycHg7XG5cdG1hcmdpbi10b3A6IDE2cHg7XG5cblx0LmlucHV0X19yb3dzIHtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGdhcDogMTJweDtcblx0fVxuXG5cdC5pbnB1dF9fd3JhcHBlciB7XG5cdFx0ZmxleDogMTtcblx0fVxuYDtcbmV4cG9ydCBjb25zdCBTdHlsZWREaXNjb3VudERpYWxvZ3VlQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0aGVpZ2h0OiA0MjNweDtcblx0cGFkZGluZzogMTJweCAyNHB4O1xuXHRvdmVyZmxvdy15OiBzY3JvbGw7XG5gO1xuZXhwb3J0IGNvbnN0IFZhcmlhYmxlUGlja2VyQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGJhY2tncm91bmQtY29sb3I6IHJnYmEoMCwgMCwgMCwgMC43KTtcblx0ei1pbmRleDogMjtcblx0Ym9yZGVyOiAxcHggc29saWQgJHtERUZBVUxUX1RIRU1FLmNvbG9yc1YyLmNvbnRlbnQucGxhY2Vob2xkZXJ9O1xuXHRib3JkZXItcmFkaXVzOiA0cHg7XG5gO1xuIl19 */",toString:d}),R=c("div","production"===process.env.NODE_ENV?{target:"etc1kyv0"}:{target:"etc1kyv0",label:"VariablePickerContainer"})("width:100%;height:100%;position:absolute;top:0;background-color:rgba(0, 0, 0, 0.7);z-index:2;border:1px solid ",b.colorsV2.content.placeholder,";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkRpc2NvdW50TW9kYWwuc3R5bGVkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtFaUQiLCJmaWxlIjoiRGlzY291bnRNb2RhbC5zdHlsZWQudHMiLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgREVGQVVMVF9USEVNRSB9IGZyb20gXCJAc3JjL2NvbnN0YW50cy9UaGVtZVwiO1xuZXhwb3J0IGNvbnN0IENvdXBvblR5cGVDb250YWluZXJTdHlsZWQgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRnYXA6IDE2cHg7XG5cdG1hcmdpbi1ib3R0b206IDE4cHg7XG5cblx0LmNvdXBvbi10eXBlX19jb250YWluZXIge1xuXHRcdGZsZXg6IDFweDtcblx0XHRwYWRkaW5nOiAxNnB4O1xuXHRcdGJvcmRlci1yYWRpdXM6IDRweDtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAke0RFRkFVTFRfVEhFTUUuY29sb3JzVjIuc3VyZmFjZS5zdWJkdWVkfTtcblx0XHRib3JkZXI6IDFweCBzb2xpZCAke0RFRkFVTFRfVEhFTUUuY29sb3JzVjIuc3Ryb2tlLnByaW1hcnl9O1xuXHRcdGNvbG9yOiAke0RFRkFVTFRfVEhFTUUuY29sb3JzVjIuY29udGVudC5zZWNvbmRhcnl9O1xuXHRcdGN1cnNvcjogcG9pbnRlcjtcblxuXHRcdCY6bnRoLWNoaWxkKCR7KHByb3BzKSA9PiBwcm9wcy5zZWxlY3RlZERpdn0pIHtcblx0XHRcdGJhY2tncm91bmQtY29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FpbmVyID0gc3R5bGVkLmRpdmBcblx0aGVpZ2h0OiA0MjNweDtcblx0cGFkZGluZzogMTJweCAyNHB4O1xuXHRvdmVyZmxvdy15OiBzY3JvbGw7XG5gO1xuZXhwb3J0IGNvbnN0IFZhcmlhYmxlUGlja2VyQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGJhY2tncm91bmQtY29sb3I6IHJnYmEoMCwgMCwgMCwgMC43KTtcblx0ei1pbmRleDogMjtcblx0Ym9yZGVyOiAxcHggc29saWQgJHtERUZBVUxUX1RIRU1FLmNvbG9yc1YyLmNvbnRlbnQucGxhY2Vob2xkZXJ9O1xuXHRib3JkZXItcmFkaXVzOiA0cHg7XG5gO1xuIl19 */"));export{X as CouponTypeContainerStyled,l as DynamicCouponContainer,G as StaticCouponContainerStyled,x as StyledDiscountDialogueContainer,R as VariablePickerContainer};
|
|
1
|
+
import o from"@emotion/styled";import{DEFAULT_THEME as r}from"../../constants/Theme.js";const p=o.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 16px;
|
|
4
|
+
margin-bottom: 18px;
|
|
5
|
+
|
|
6
|
+
.coupon-type__container {
|
|
7
|
+
flex: 1px;
|
|
8
|
+
padding: 16px;
|
|
9
|
+
border-radius: 4px;
|
|
10
|
+
background-color: ${r.colorsV2.surface.subdued};
|
|
11
|
+
border: 1px solid ${r.colorsV2.stroke.primary};
|
|
12
|
+
color: ${r.colorsV2.content.secondary};
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
|
|
15
|
+
&:nth-child(${o=>o.selectedDiv}) {
|
|
16
|
+
background-color: ${r.colorsV2.background.brandLight};
|
|
17
|
+
border: 1px solid ${r.colorsV2.content.brand};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`,i=o.div`
|
|
21
|
+
margin: 16px 0;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
gap: 24px;
|
|
25
|
+
|
|
26
|
+
.static-coupon__data {
|
|
27
|
+
display: flex;
|
|
28
|
+
gap: 16px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.static-input__wrapper {
|
|
32
|
+
flex: 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.info__container {
|
|
36
|
+
display: flex;
|
|
37
|
+
background: #f0f0f0;
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
padding: 4px 12px;
|
|
40
|
+
gap: 6px;
|
|
41
|
+
}
|
|
42
|
+
`,d=o.div`
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
gap: 12px;
|
|
46
|
+
margin-top: 16px;
|
|
47
|
+
|
|
48
|
+
.input__rows {
|
|
49
|
+
display: flex;
|
|
50
|
+
gap: 12px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.input__wrapper {
|
|
54
|
+
flex: 1;
|
|
55
|
+
}
|
|
56
|
+
`,e=o.div`
|
|
57
|
+
height: 423px;
|
|
58
|
+
padding: 12px 24px;
|
|
59
|
+
overflow-y: scroll;
|
|
60
|
+
`,a=o.div`
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 100%;
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: 0;
|
|
65
|
+
background-color: rgba(0, 0, 0, 0.7);
|
|
66
|
+
z-index: 2;
|
|
67
|
+
border: 1px solid ${r.colorsV2.content.placeholder};
|
|
68
|
+
border-radius: 4px;
|
|
69
|
+
`;export{p as CouponTypeContainerStyled,d as DynamicCouponContainer,i as StaticCouponContainerStyled,e as StyledDiscountDialogueContainer,a as VariablePickerContainer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DISCOUNT_TYPES as e,DISCOUNT_VALUE_TYPES as t,MIN_PURCHASE_REQUIREMENT as i,DISCOUNT_TARGET_TYPES as r,DISCOUNT_TARGET_SELECTION as n}from"./type.js";import
|
|
1
|
+
import{DISCOUNT_TYPES as e,DISCOUNT_VALUE_TYPES as t,MIN_PURCHASE_REQUIREMENT as i,DISCOUNT_TARGET_TYPES as r,DISCOUNT_TARGET_SELECTION as n}from"./type.js";import u from"../../utils/DateUtils.js";const o=(u,o,l,a,p,s)=>{if(!u.title||u.title?.length>30)return!0;if(!a){if(isNaN(u.probability))return!0;if((u.probability||0)>1)return!0;if((u.probability||0)<0)return!0;if(p>1)return!0}if(s){if(!u?.couponCode)return!0;if(!u.description)return!0}else{if(l&&l===e.AMOUNT_OFF_ORDER){if(u?.valueType===t.FIXED_AMOUNT){if(!u?.value||u?.value<=0)return!0}else if(!u?.value||u?.value<=0||u?.value>100)return!0;if(o===i.AMOUNT&&(!u.minAmount||u?.minAmount<=0))return!0;if(o===i.QUANTITY&&(!u?.minQuantity||u?.minQuantity<=0))return!0;if(u.targetType!==r.LINE_ITEM)return!0;if(u.targetSelection!==n.ALL)return!0}else if(l&&l===e.AMOUNT_OFF_PRODUCTS){if(!u.value)return!0;if(u?.valueType===t.FIXED_AMOUNT){if(!u?.value||u?.value<=0)return!0}else if(!u?.value||u?.value<=0||u?.value>100)return!0;if(u.targetSelection!==n.ENTITLED)return!0;if(u.targetType!==r.LINE_ITEM)return!0}else if(l&&l===e.BUY_X_GET_Y){if(!u.entitledQuantity||u.entitledQuantity<0||!u.prerequisiteQuantity||u.prerequisiteQuantity<0)return!0;if(u.valueType!==t.PERCENTAGE)return!0;if(!u.value)return!0;if(u.value<=0||u.value>100)return!0;if(u.targetSelection!==n.ENTITLED)return!0;if(u.targetType!==r.LINE_ITEM)return!0}else if(l&&e.FREE_SHIPPING){if(u.valueType!==t.PERCENTAGE)return!0;if(u.targetType!==r.SHIPPING_LINE)return!0;if(100!==u.value)return!0;if(u.targetSelection!==n.ALL)return!0;if(o===i.AMOUNT&&(!u.minAmount||u?.minAmount<=0))return!0;if(o===i.QUANTITY&&(!u?.minQuantity||u?.minQuantity<=0))return!0}if(null!==u.expireAfter&&void 0!==u.expireAfter&&u.expireAfter<=0)return!0;if(u.expireAt&&u.expireAt<new Date)return!0}return!1},l=(e,i,o,l)=>e?.isStaticCoupon&&e?.description?e.description:e.targetType===r.LINE_ITEM&&e.targetSelection===n.ALL?`${e.valueType===t.FIXED_AMOUNT?i:""}${(e.value??0).toString()}${e.valueType===t.PERCENTAGE?"% off":" off"} on all products\n ${e.minAmount?`| Minimum purchase of ${i}${e.minAmount}`:""} ${e.minQuantity?`| Buy ${e.minQuantity} products`:""} | One use per customer${e.expireAfter?` | Expires in ${e.expireAfter} day(s)`:e.expireAt?` | Expires at ${u.getStringFromDate(e.expireAt,"dd MMM yyyy")}`:""}`.replace(/\s\s+/g," ").trim():e.targetType===r.SHIPPING_LINE?`\n Free shipping on your order ${e.minAmount?`| Minimum purchase of ${i}${e.minAmount}`:""} ${e.minQuantity?`| Buy ${e.minQuantity} products`:""} | One use per customer${e.expireAfter?` | Expires in ${e.expireAfter} day(s)`:e.expireAt?` | Expires at ${u.getStringFromDate(e.expireAt,"dd MMM yyyy")}`:""}`.replace(/\s\s+/g," ").trim():e.targetSelection===n.ENTITLED?e.prerequisiteProductIds?.length||e.prerequisiteCollectionIds?.length||e.entitledQuantity||e.prerequisiteQuantity?`${function(e,t,i){let r=`Buy ${e.prerequisiteQuantity} item`;if(e.prerequisiteProductIds?.length||e.prerequisiteCollectionIds?.length){const n=a(e.prerequisiteProductIds??[],t),u=a(e.prerequisiteCollectionIds??[],i);r+=" from a selection of ",n.length>0&&(r+=`${n.join(", ")} or `),u.length>0&&(r+=`products in ${u.join(", ")} collection or `),r=r.slice(0,-4)}if(r+=` and get ${e.entitledQuantity} item`,e.entitledProductIds?.length||e.entitledCollectionIds?.length){const n=a(e.entitledProductIds??[],t),u=a(e.entitledCollectionIds??[],i);r+=" from ",n.length>0&&(r+=`${n.join(", ")} or `),u.length>0&&(r+=`products in ${u.join(", ")} collection or `),r=r.slice(0,-4)}return r}(e,o,l)} ${100===e.value?"for free":`at ${e.value}% off`} | One use per customer${e.expireAfter?` | Expires in ${e.expireAfter} day(s)`:e.expireAt?` | Expires at ${u.getStringFromDate(e.expireAt,"dd MMM yyyy")}`:""}`.replace(/\s\s+/g," ").trim():`${function(e,i,r,n){let u=`Get ${e.valueType===t.FIXED_AMOUNT?n:""}${(e.value??0).toString()}${e.valueType===t.PERCENTAGE?"% off":" off"} on `;const o=a(e.entitledProductIds??[],i),l=a(e.entitledCollectionIds??[],r);o.length>0&&(u+=`${o.join(", ")} or `);l.length>0&&(u+=`products in ${l.join(", ")} collection or `);return u.slice(0,-4)}(e,o,l,i)} | One use per customer${e.expireAfter?` | Expires in ${e.expireAfter} day(s)`:e.expireAt?` | Expires at ${u.getStringFromDate(e.expireAt,"dd MMM yyyy")}`:""}`.replace(/\s\s+/g," ").trim():void 0;function a(e,t){const i=[];return t.forEach((t=>{e.find((e=>e.toString()===t.id))&&i.push(t.name)})),i}export{l as descriptionBuilder,o as validateDiscountData};
|