@bikdotai/bik-component-library 0.0.685-beta.0 → 0.0.685-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_virtual/bik-store.js +1 -0
- package/dist/cjs/assets/icons/bik_livechat.svg.js +1 -0
- package/dist/cjs/assets/icons/email-channel.svg.js +1 -1
- package/dist/cjs/assets/icons/facebook_channel.svg.js +1 -1
- package/dist/cjs/assets/icons/instagram-channel.svg.js +1 -1
- package/dist/cjs/assets/icons/task.svg.js +1 -0
- package/dist/cjs/assets/icons/whatsapp_color.svg.js +1 -1
- package/dist/cjs/components/QueryBuilder/Filters/CustomField/components/CustomField.js +1 -1
- package/dist/cjs/components/QueryBuilder/components/QueryBuilderNodes.js +1 -1
- package/dist/cjs/components/QueryBuilder/redux/queryBuilder.reducer.js +1 -1
- package/dist/cjs/components/SearchFilter/components/DatePickerButton.js +1 -1
- package/dist/cjs/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
- package/dist/cjs/components/TablePagination/TablePagination.js +1 -1
- package/dist/cjs/components/accordion/Accordion.d.ts +8 -0
- package/dist/cjs/components/accordion/Accordion.js +1 -1
- package/dist/cjs/components/accordion/Accordion.style.d.ts +1 -0
- package/dist/cjs/components/accordion/Accordion.style.js +8 -1
- package/dist/cjs/components/alerts/Alert.d.ts +3 -0
- package/dist/cjs/components/alerts/Alert.js +1 -1
- package/dist/cjs/components/alerts/Alert.styled.d.ts +2 -0
- package/dist/cjs/components/alerts/Alert.styled.js +10 -2
- package/dist/cjs/components/alerts/AlertHelper.d.ts +2 -1
- package/dist/cjs/components/alerts/AlertHelper.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.d.ts +13 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.d.ts +2 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.styles.d.ts +1 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.styles.js +6 -2
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js +1 -1
- package/dist/cjs/components/avatar/Avatar.d.ts +4 -1
- package/dist/cjs/components/avatar/Avatar.js +1 -1
- package/dist/cjs/components/avatar/Avatar.styled.js +4 -4
- package/dist/cjs/components/avatar/AvatarHelper.d.ts +2 -1
- package/dist/cjs/components/avatar/AvatarHelper.js +1 -1
- package/dist/cjs/components/carousel-secondary/CarouselSecondary.d.ts +2 -4
- package/dist/cjs/components/carousel-secondary/CarouselSecondary.js +1 -1
- package/dist/cjs/components/carousel-secondary/CarouselSecondary.style.d.ts +1 -1
- package/dist/cjs/components/carousel-secondary/CarouselSecondary.style.js +1 -1
- package/dist/cjs/components/carousel-secondary/model.d.ts +4 -0
- package/dist/cjs/components/carousel-secondary/model.js +1 -0
- package/dist/cjs/components/checkBox/CheckBox.d.ts +1 -0
- package/dist/cjs/components/checkBox/CheckBox.js +1 -1
- package/dist/cjs/components/code-block/CodeBlock.d.ts +2 -0
- package/dist/cjs/components/code-block/CodeBlock.js +1 -0
- package/dist/cjs/components/code-block/CodeBlock.styled.d.ts +31 -0
- package/dist/cjs/components/code-block/CodeBlock.styled.js +110 -0
- package/dist/cjs/components/code-block/CodeBlockHelper.d.ts +1 -0
- package/dist/cjs/components/code-block/CodeBlockHelper.js +1 -0
- package/dist/cjs/components/code-block/index.d.ts +2 -0
- package/dist/cjs/components/code-block/languageSpecificFormatting/html.d.ts +1 -0
- package/dist/cjs/components/code-block/types.d.ts +18 -0
- package/dist/cjs/components/code-block/types.js +1 -0
- package/dist/cjs/components/country-code-picker/CountryCodePicker.d.ts +6 -0
- package/dist/cjs/components/country-code-picker/CountryCodePicker.js +1 -1
- package/dist/cjs/components/custom-date-time/DateSelector/DateSelector.js +1 -1
- package/dist/cjs/components/data-source-panel/DataSourceInfoFooter.d.ts +5 -0
- package/dist/cjs/components/data-source-panel/DataSourceInfoFooter.js +1 -1
- package/dist/cjs/components/data-source-panel/DataSourcePanel.d.ts +18 -5
- package/dist/cjs/components/data-source-panel/DataSourcePanel.js +1 -1
- package/dist/cjs/components/data-source-panel/DataSourcePanel.style.d.ts +1 -0
- package/dist/cjs/components/data-source-panel/DataSourcePanel.style.js +50 -4
- package/dist/cjs/components/data-source-panel/IntentConfig.d.ts +5 -0
- package/dist/cjs/components/data-source-panel/IntentConfig.js +1 -0
- package/dist/cjs/components/data-source-panel/Modals/DescriptionModal.d.ts +8 -0
- package/dist/cjs/components/data-source-panel/Modals/DescriptionModal.js +48 -0
- package/dist/cjs/components/data-source-panel/model.d.ts +14 -7
- package/dist/cjs/components/datePicker/DatePickerWrapper.d.ts +1 -4
- package/dist/cjs/components/datePicker/DatePickerWrapper.js +1 -1
- package/dist/cjs/components/datePicker/DatePickerWrapper.styled.d.ts +1 -1
- package/dist/cjs/components/datePicker/DatePickerWrapper.styled.js +2 -2
- package/dist/cjs/components/datePicker/model.d.ts +4 -0
- package/dist/cjs/components/datePicker/model.js +1 -0
- package/dist/cjs/components/discount-modal/DiscountModal.d.ts +2 -0
- package/dist/cjs/components/discount-modal/DiscountModal.js +1 -1
- package/dist/cjs/components/discount-modal/DynamicCoupon/DynamicCoupon.d.ts +1 -2
- package/dist/cjs/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
- package/dist/cjs/components/dropdown/ChipDropdown.d.ts +1 -1
- package/dist/cjs/components/dropdown/ChipDropdown.js +3 -3
- package/dist/cjs/components/dropdown/ChipInput.d.ts +2 -0
- package/dist/cjs/components/dropdown/ChipInput.js +1 -1
- package/dist/cjs/components/dropdown/Common.styled.d.ts +3 -1
- package/dist/cjs/components/dropdown/Common.styled.js +4 -4
- package/dist/cjs/components/dropdown/Dropdown.d.ts +1 -0
- package/dist/cjs/components/dropdown/Dropdown.js +1 -1
- package/dist/cjs/components/dropdown/MenuItem/MenuItem.d.ts +1 -1
- package/dist/cjs/components/dropdown/MenuItem/MenuItem.js +5 -5
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.d.ts +1 -0
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
- package/dist/cjs/components/dropdown/hooks/useDropdown.d.ts +4 -1
- package/dist/cjs/components/dropdown/hooks/useDropdown.js +1 -1
- package/dist/cjs/components/dropdown/type.d.ts +1 -0
- package/dist/cjs/components/input/Input.d.ts +4 -0
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/input/Input.styled.d.ts +1 -0
- package/dist/cjs/components/input/Input.styled.js +1 -1
- package/dist/cjs/components/modals/Modal.d.ts +2 -0
- package/dist/cjs/components/modals/Modal.js +1 -1
- package/dist/cjs/components/modals/modal.styled.d.ts +6 -0
- package/dist/cjs/components/modals/modal.styled.js +1 -1
- package/dist/cjs/components/modals/styledModal.d.ts +2 -0
- package/dist/cjs/components/modals/styledModal.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/cjs/components/plans/NewSubscriptionPlan.js +1 -1
- package/dist/cjs/components/plans/SubscriptionPlan.d.ts +1 -0
- package/dist/cjs/components/plans/SubscriptionPlan.js +1 -1
- package/dist/cjs/components/product-picker-v2/collectionScreen.d.ts +3 -1
- package/dist/cjs/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/modal.d.ts +9 -13
- package/dist/cjs/components/product-picker-v2/modal.js +1 -1
- package/dist/cjs/components/product-picker-v2/product.js +1 -1
- package/dist/cjs/components/product-picker-v2/productInfoOverlay.js +7 -7
- package/dist/cjs/components/product-picker-v2/productScreen.d.ts +5 -3
- package/dist/cjs/components/product-picker-v2/productScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/rearrangeScreen.d.ts +3 -1
- package/dist/cjs/components/product-picker-v2/rearrangeScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/searchScreen.d.ts +3 -1
- package/dist/cjs/components/product-picker-v2/searchScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/selectedScreen.d.ts +3 -1
- package/dist/cjs/components/product-picker-v2/selectedScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/style.d.ts +11 -0
- package/dist/cjs/components/product-picker-v2/style.js +53 -18
- package/dist/cjs/components/product-picker-v2/type.d.ts +7 -0
- package/dist/cjs/components/product-picker-v2/type.js +1 -1
- package/dist/cjs/components/product-picker-v2/utility.d.ts +3 -1
- package/dist/cjs/components/product-picker-v2/utility.js +1 -1
- package/dist/cjs/components/product-picker-v2/variant.js +1 -1
- package/dist/cjs/components/progress-bar-v2/ProgressBarV2.d.ts +1 -0
- package/dist/cjs/components/progress-bar-v2/ProgressBarV2.js +1 -1
- package/dist/cjs/components/states-modal/StateModalComponent.d.ts +1 -0
- package/dist/cjs/components/states-modal/StateModalComponent.js +1 -1
- package/dist/cjs/components/tag/Tag.d.ts +1 -1
- package/dist/cjs/components/tag/Tag.js +1 -1
- package/dist/cjs/components/tag/Tag.stories.d.ts +22 -0
- package/dist/cjs/components/tag/model.d.ts +12 -1
- package/dist/cjs/components/template-context-mapper/TemplateContextMapper.d.ts +2 -0
- package/dist/cjs/components/template-context-mapper/context/templateModalContext.d.ts +3 -0
- package/dist/cjs/components/template-context-mapper/custom-hooks/useAdditionalVariables.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/BackTrackComponent.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/DiscountCodeComponent.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/EditWebpushTemplate.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.js +5 -5
- package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
- package/dist/cjs/components/template-preview/RCS/RCSMediaCard.d.ts +1 -1
- package/dist/cjs/components/template-preview/RCS/RCSMediaCard.js +1 -1
- package/dist/cjs/components/template-preview/WhatsApp/MediaCard.js +1 -1
- package/dist/cjs/components/template-preview/WhatsAppTemplatePreview.js +1 -1
- package/dist/cjs/components/template-preview/helpers/TemplateCreatorHelper.d.ts +1 -0
- package/dist/cjs/components/template-preview/helpers/TemplateCreatorHelper.js +1 -1
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.d.ts +4 -4
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +1 -1
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.d.ts +7 -5
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +1 -1
- package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.js +1 -1
- package/dist/cjs/components/variable-picker-v3/Content.d.ts +0 -1
- package/dist/cjs/components/variable-picker-v3/Content.js +1 -1
- package/dist/cjs/components/variable-picker-v3/SubHeaderItems.js +1 -1
- package/dist/cjs/components/variable-picker-v3/highlightSearchText.d.ts +1 -0
- package/dist/cjs/components/variable-picker-v3/highlightSearchText.js +1 -0
- package/dist/cjs/components/zeroState/ZeroState.d.ts +1 -0
- package/dist/cjs/components/zeroState/ZeroState.js +1 -1
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/node_modules/@bikdotai/bik-models/growth/models/bik-store.js +1 -0
- package/dist/esm/_virtual/bik-store.js +1 -0
- package/dist/esm/assets/icons/bik_livechat.svg.js +1 -0
- package/dist/esm/assets/icons/email-channel.svg.js +1 -1
- package/dist/esm/assets/icons/facebook_channel.svg.js +1 -1
- package/dist/esm/assets/icons/instagram-channel.svg.js +1 -1
- package/dist/esm/assets/icons/task.svg.js +1 -0
- package/dist/esm/assets/icons/whatsapp_color.svg.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/CustomField/components/CustomField.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNodes.js +1 -1
- package/dist/esm/components/QueryBuilder/redux/queryBuilder.reducer.js +1 -1
- package/dist/esm/components/SearchFilter/components/DatePickerButton.js +1 -1
- package/dist/esm/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
- package/dist/esm/components/TablePagination/TablePagination.js +1 -1
- package/dist/esm/components/accordion/Accordion.d.ts +8 -0
- package/dist/esm/components/accordion/Accordion.js +1 -1
- package/dist/esm/components/accordion/Accordion.style.d.ts +1 -0
- package/dist/esm/components/accordion/Accordion.style.js +23 -16
- package/dist/esm/components/alerts/Alert.d.ts +3 -0
- package/dist/esm/components/alerts/Alert.js +1 -1
- package/dist/esm/components/alerts/Alert.styled.d.ts +2 -0
- package/dist/esm/components/alerts/Alert.styled.js +13 -5
- package/dist/esm/components/alerts/AlertHelper.d.ts +2 -1
- package/dist/esm/components/alerts/AlertHelper.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.d.ts +13 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.d.ts +2 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.styles.d.ts +1 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.styles.js +5 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js +1 -1
- package/dist/esm/components/avatar/Avatar.d.ts +4 -1
- package/dist/esm/components/avatar/Avatar.js +1 -1
- package/dist/esm/components/avatar/Avatar.styled.js +2 -2
- package/dist/esm/components/avatar/AvatarHelper.d.ts +2 -1
- package/dist/esm/components/avatar/AvatarHelper.js +1 -1
- package/dist/esm/components/carousel-secondary/CarouselSecondary.d.ts +2 -4
- package/dist/esm/components/carousel-secondary/CarouselSecondary.js +1 -1
- package/dist/esm/components/carousel-secondary/CarouselSecondary.style.d.ts +1 -1
- package/dist/esm/components/carousel-secondary/CarouselSecondary.style.js +1 -1
- package/dist/esm/components/carousel-secondary/model.d.ts +4 -0
- package/dist/esm/components/carousel-secondary/model.js +1 -0
- package/dist/esm/components/checkBox/CheckBox.d.ts +1 -0
- package/dist/esm/components/checkBox/CheckBox.js +1 -1
- package/dist/esm/components/code-block/CodeBlock.d.ts +2 -0
- package/dist/esm/components/code-block/CodeBlock.js +1 -0
- package/dist/esm/components/code-block/CodeBlock.styled.d.ts +31 -0
- package/dist/esm/components/code-block/CodeBlock.styled.js +110 -0
- package/dist/esm/components/code-block/CodeBlockHelper.d.ts +1 -0
- package/dist/esm/components/code-block/CodeBlockHelper.js +1 -0
- package/dist/esm/components/code-block/index.d.ts +2 -0
- package/dist/esm/components/code-block/languageSpecificFormatting/html.d.ts +1 -0
- package/dist/esm/components/code-block/types.d.ts +18 -0
- package/dist/esm/components/code-block/types.js +1 -0
- package/dist/esm/components/country-code-picker/CountryCodePicker.d.ts +6 -0
- package/dist/esm/components/country-code-picker/CountryCodePicker.js +1 -1
- package/dist/esm/components/custom-date-time/DateSelector/DateSelector.js +1 -1
- package/dist/esm/components/data-source-panel/DataSourceInfoFooter.d.ts +5 -0
- package/dist/esm/components/data-source-panel/DataSourceInfoFooter.js +1 -1
- package/dist/esm/components/data-source-panel/DataSourcePanel.d.ts +18 -5
- package/dist/esm/components/data-source-panel/DataSourcePanel.js +1 -1
- package/dist/esm/components/data-source-panel/DataSourcePanel.style.d.ts +1 -0
- package/dist/esm/components/data-source-panel/DataSourcePanel.style.js +49 -3
- package/dist/esm/components/data-source-panel/IntentConfig.d.ts +5 -0
- package/dist/esm/components/data-source-panel/IntentConfig.js +1 -0
- package/dist/esm/components/data-source-panel/Modals/DescriptionModal.d.ts +8 -0
- package/dist/esm/components/data-source-panel/Modals/DescriptionModal.js +48 -0
- package/dist/esm/components/data-source-panel/model.d.ts +14 -7
- package/dist/esm/components/datePicker/DatePickerWrapper.d.ts +1 -4
- package/dist/esm/components/datePicker/DatePickerWrapper.js +1 -1
- package/dist/esm/components/datePicker/DatePickerWrapper.styled.d.ts +1 -1
- package/dist/esm/components/datePicker/DatePickerWrapper.styled.js +11 -11
- package/dist/esm/components/datePicker/model.d.ts +4 -0
- package/dist/esm/components/datePicker/model.js +1 -0
- package/dist/esm/components/discount-modal/DiscountModal.d.ts +2 -0
- package/dist/esm/components/discount-modal/DiscountModal.js +1 -1
- package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.d.ts +1 -2
- package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
- package/dist/esm/components/dropdown/ChipDropdown.d.ts +1 -1
- package/dist/esm/components/dropdown/ChipDropdown.js +3 -3
- package/dist/esm/components/dropdown/ChipInput.d.ts +2 -0
- package/dist/esm/components/dropdown/ChipInput.js +1 -1
- package/dist/esm/components/dropdown/Common.styled.d.ts +3 -1
- package/dist/esm/components/dropdown/Common.styled.js +1 -1
- package/dist/esm/components/dropdown/Dropdown.d.ts +1 -0
- package/dist/esm/components/dropdown/Dropdown.js +1 -1
- package/dist/esm/components/dropdown/MenuItem/MenuItem.d.ts +1 -1
- package/dist/esm/components/dropdown/MenuItem/MenuItem.js +5 -5
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.d.ts +1 -0
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
- package/dist/esm/components/dropdown/hooks/useDropdown.d.ts +4 -1
- package/dist/esm/components/dropdown/hooks/useDropdown.js +1 -1
- package/dist/esm/components/dropdown/type.d.ts +1 -0
- package/dist/esm/components/input/Input.d.ts +4 -0
- package/dist/esm/components/input/Input.js +1 -1
- package/dist/esm/components/input/Input.styled.d.ts +1 -0
- package/dist/esm/components/input/Input.styled.js +1 -1
- package/dist/esm/components/modals/Modal.d.ts +2 -0
- package/dist/esm/components/modals/Modal.js +1 -1
- package/dist/esm/components/modals/modal.styled.d.ts +6 -0
- package/dist/esm/components/modals/modal.styled.js +1 -1
- package/dist/esm/components/modals/styledModal.d.ts +2 -0
- package/dist/esm/components/modals/styledModal.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/esm/components/plans/NewSubscriptionPlan.js +1 -1
- package/dist/esm/components/plans/SubscriptionPlan.d.ts +1 -0
- package/dist/esm/components/plans/SubscriptionPlan.js +1 -1
- package/dist/esm/components/product-picker-v2/collectionScreen.d.ts +3 -1
- package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.d.ts +9 -13
- 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 +7 -7
- package/dist/esm/components/product-picker-v2/productScreen.d.ts +5 -3
- package/dist/esm/components/product-picker-v2/productScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/rearrangeScreen.d.ts +3 -1
- package/dist/esm/components/product-picker-v2/rearrangeScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/searchScreen.d.ts +3 -1
- package/dist/esm/components/product-picker-v2/searchScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/selectedScreen.d.ts +3 -1
- package/dist/esm/components/product-picker-v2/selectedScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/style.d.ts +11 -0
- package/dist/esm/components/product-picker-v2/style.js +51 -16
- package/dist/esm/components/product-picker-v2/type.d.ts +7 -0
- package/dist/esm/components/product-picker-v2/type.js +1 -1
- package/dist/esm/components/product-picker-v2/utility.d.ts +3 -1
- 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/progress-bar-v2/ProgressBarV2.d.ts +1 -0
- package/dist/esm/components/progress-bar-v2/ProgressBarV2.js +1 -1
- package/dist/esm/components/states-modal/StateModalComponent.d.ts +1 -0
- package/dist/esm/components/states-modal/StateModalComponent.js +1 -1
- package/dist/esm/components/tag/Tag.d.ts +1 -1
- package/dist/esm/components/tag/Tag.js +1 -1
- package/dist/esm/components/tag/Tag.stories.d.ts +22 -0
- package/dist/esm/components/tag/model.d.ts +12 -1
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.d.ts +2 -0
- package/dist/esm/components/template-context-mapper/context/templateModalContext.d.ts +3 -0
- package/dist/esm/components/template-context-mapper/custom-hooks/useAdditionalVariables.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/BackTrackComponent.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/DiscountCodeComponent.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWebpushTemplate.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.js +4 -4
- package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
- package/dist/esm/components/template-preview/RCS/RCSMediaCard.d.ts +1 -1
- package/dist/esm/components/template-preview/RCS/RCSMediaCard.js +1 -1
- package/dist/esm/components/template-preview/WhatsApp/MediaCard.js +1 -1
- package/dist/esm/components/template-preview/WhatsAppTemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/helpers/TemplateCreatorHelper.d.ts +1 -0
- package/dist/esm/components/template-preview/helpers/TemplateCreatorHelper.js +1 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.d.ts +4 -4
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +1 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.d.ts +7 -5
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +1 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.js +1 -1
- package/dist/esm/components/variable-picker-v3/Content.d.ts +0 -1
- package/dist/esm/components/variable-picker-v3/Content.js +1 -1
- package/dist/esm/components/variable-picker-v3/SubHeaderItems.js +1 -1
- package/dist/esm/components/variable-picker-v3/highlightSearchText.d.ts +1 -0
- package/dist/esm/components/variable-picker-v3/highlightSearchText.js +1 -0
- package/dist/esm/components/zeroState/ZeroState.d.ts +1 -0
- package/dist/esm/components/zeroState/ZeroState.js +5 -5
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/node_modules/@bikdotai/bik-models/growth/models/bik-store.js +1 -0
- package/package.json +1 -1
- package/dist/cjs/assets/icons/CheckSquareOffset.svg.js +0 -1
- package/dist/esm/assets/icons/CheckSquareOffset.svg.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i,Fragment as l}from"react/jsx-runtime";import{useState as s,useEffect as t,useMemo as a}from"react";import{CheckboxContainer as o,CheckboxIcon as r}from"./CheckBox.styled.js";import{TitleRegular as d,TitleSmall as n,BodySecondary as c,BodyPrimary as
|
|
1
|
+
import{jsxs as e,jsx as i,Fragment as l}from"react/jsx-runtime";import{useState as s,useEffect as t,useMemo as a}from"react";import{CheckboxContainer as o,CheckboxIcon as r}from"./CheckBox.styled.js";import{TitleRegular as d,TitleSmall as n,BodySecondary as c,BodyPrimary as b}from"../TypographyStyle.js";import{COLORS as h}from"../../constants/Theme.js";const m=l=>{const s=a((()=>l.activeColor||h.background.positive.vibrant),[l.activeColor]);return e("svg",Object.assign({width:l.isSmall?"16":"18",height:l.isSmall?"16":"18",viewBox:l.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("rect",{x:"0",y:"0",width:l.isSmall?"16":"18",height:l.isSmall?"16":"18",rx:"4",fill:l.isDisabled?h.content.inactive:s}),!l.isPartial&&i("svg",Object.assign({width:l.isSmall?"8":"10",height:l.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),l.isPartial&&i("rect",{x:"5",y:l.isSmall?"7":"8",width:l.isSmall?"6":"8",height:"2",rx:"1",fill:h.surface.standard})]}))},v=a=>{var v;const[g,C]=s(a.isChecked||!1),[p,x]=s(a.isPartiallyChecked||!1),[S,u]=s(a.isDisabled||!1),[w,y]=s(!1),[k,D]=s(!1);t((()=>{C(a.isChecked)}),[a.isChecked]),t((()=>{u(a.isDisabled||!1)}),[a.isDisabled]),t((()=>{x(a.isPartiallyChecked||!1)}),[a.isPartiallyChecked]);return e(o,Object.assign({onClick:e=>{var i;if(!a.isDisabled){const l=!g;p?x(!p):C(l),null===(i=a.onValueChange)||void 0===i||i.call(a,l,a.value,e)}},onMouseEnter:()=>y(!a.skipHoverState),onMouseLeave:()=>y(!1),onMouseDown:()=>D(!a.skipHoverState),onMouseUp:()=>D(!1),isDisabled:S,enableHover:a.enableHover,style:null!==(v=a.style)&&void 0!==v?v:{}},{children:[i(r,Object.assign({checked:g,hovered:w,clicked:k,isDisabled:S,size:a.size,borderColor:a.checkboxBorderColor},{children:g&&i(m,{isPartial:p||!1,isDisabled:S,isSmall:"SMALL"===a.size,activeColor:null==a?void 0:a.activeColor})})),a.label?a.boldOnChecked&&g||a.bold?"DEFAULT"===a.labelSize?i(d,Object.assign({color:a.isDisabled?h.text.disabled:h.text.primary},{children:a.label})):i(n,Object.assign({color:a.isDisabled?h.text.disabled:h.text.primary},{children:a.label})):"SMALL"===a.size||"SMALL"===a.labelSize?i(c,Object.assign({color:a.isDisabled?h.text.disabled:h.text.primary},{children:a.label})):i(b,Object.assign({color:a.isDisabled?h.text.disabled:h.text.primary},{children:a.label})):i(l,{}),a.rightComponent]}))};export{v as CheckBox};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e}from"../../_virtual/_tslib.js";import{jsxs as t,jsx as o,Fragment as i}from"react/jsx-runtime";import{useState as r,useEffect as s}from"react";import{toast as c}from"react-toastify";import{Container as n,Header as d,TitleSection as a,Title as l,LanguageBadge as m,CopyButton as h,CodeContainer as p,LineNumbers as g,Code as f}from"./CodeBlock.styled.js";import{highlightCode as u}from"./CodeBlockHelper.js";import{CodeLanguage as b}from"./types.js";const j=j=>{let{code:v="",language:y=b.JAVASCRIPT,title:C="",showTitle:x=!0,showLineNumbers:O=!0,maxHeight:M="400px",maxWidth:k,theme:w="dark"}=j;const[H,T]=r(!1),[L,_]=r(v);s((()=>{let t=!0;return e(void 0,void 0,void 0,(function*(){try{const e=yield import(`./languageSpecificFormatting/${y}.ts`);if((null==e?void 0:e.format)&&t)return void _(e.format(v))}catch(e){}t&&_(v)})),()=>{t=!1}}),[v,y]);const B=L.split("\n");return t(n,Object.assign({themeMode:w,maxWidth:k},{children:[t(d,Object.assign({themeMode:w},{children:[t(a,{children:[x&&C&&o(l,Object.assign({themeMode:w},{children:C})),o(m,Object.assign({bg:(S=y,{javascript:"#e6cd12ff",python:"#3776ab",java:"#ed8b00",css:"#1572b6",html:"#e34c26",json:"#000000"}[S.toLowerCase()]||("dark"===w?"#6e7681":"#656d76")),color:(e=>{const t={javascript:"#000"};return(null==t?void 0:t[e.toLowerCase()])||"#fff"})(y)},{children:y}))]}),o(h,Object.assign({themeMode:w,onClick:()=>e(void 0,void 0,void 0,(function*(){try{yield navigator.clipboard.writeText(v),T(!0),c.success("Code copied to clipboard!",{position:"top-right",autoClose:2e3,hideProgressBar:!0}),setTimeout((()=>T(!1)),2e3)}catch(e){c.error("Failed to copy code",{position:"top-right",autoClose:2e3})}}))},{children:o(i,H?{children:"✓ Copied"}:{children:"Copy"})}))]})),t(p,Object.assign({maxHeight:M},{children:[O&&o(g,Object.assign({themeMode:w},{children:B.map(((e,t)=>o("div",{children:t+1},t)))})),o(f,Object.assign({themeMode:w},{children:B.map(((e,t)=>o("div",{style:{minHeight:e.trim()?"20px":"0px"},dangerouslySetInnerHTML:{__html:u(e,y)||" "}},t)))}))]}))]}));var S};export{j as CodeBlock};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
themeMode: 'dark' | 'light';
|
|
3
|
+
maxWidth?: string | undefined;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const Header: import("styled-components").StyledComponent<"div", any, {
|
|
6
|
+
themeMode: 'dark' | 'light';
|
|
7
|
+
}, never>;
|
|
8
|
+
export declare const WindowControls: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const Dot: import("styled-components").StyledComponent<"div", any, {
|
|
10
|
+
color: string;
|
|
11
|
+
}, never>;
|
|
12
|
+
export declare const TitleSection: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
13
|
+
export declare const Title: import("styled-components").StyledComponent<"span", any, {
|
|
14
|
+
themeMode: 'dark' | 'light';
|
|
15
|
+
}, never>;
|
|
16
|
+
export declare const LanguageBadge: import("styled-components").StyledComponent<"div", any, {
|
|
17
|
+
bg: string;
|
|
18
|
+
color?: string | undefined;
|
|
19
|
+
}, never>;
|
|
20
|
+
export declare const CopyButton: import("styled-components").StyledComponent<"button", any, {
|
|
21
|
+
themeMode: 'dark' | 'light';
|
|
22
|
+
}, never>;
|
|
23
|
+
export declare const CodeContainer: import("styled-components").StyledComponent<"div", any, {
|
|
24
|
+
maxHeight: string;
|
|
25
|
+
}, never>;
|
|
26
|
+
export declare const LineNumbers: import("styled-components").StyledComponent<"div", any, {
|
|
27
|
+
themeMode: 'dark' | 'light';
|
|
28
|
+
}, never>;
|
|
29
|
+
export declare const Code: import("styled-components").StyledComponent<"pre", any, {
|
|
30
|
+
themeMode: 'dark' | 'light';
|
|
31
|
+
}, never>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import e from"styled-components";const r=e.div`
|
|
2
|
+
background-color: ${e=>{let{themeMode:r}=e;return"dark"===r?"#0d1117":"#ffffff"}};
|
|
3
|
+
border: 1px solid
|
|
4
|
+
${e=>{let{themeMode:r}=e;return"dark"===r?"#30363d":"#d0d7de"}};
|
|
5
|
+
border-radius: 6px;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas,
|
|
8
|
+
'Liberation Mono', Menlo, monospace;
|
|
9
|
+
margin-bottom: 1rem;
|
|
10
|
+
${e=>{let{maxWidth:r}=e;return r&&`max-width: ${r};`}}
|
|
11
|
+
`,o=e.div`
|
|
12
|
+
background-color: ${e=>{let{themeMode:r}=e;return"dark"===r?"#161b22":"#f6f8fa"}};
|
|
13
|
+
border-bottom: 1px solid
|
|
14
|
+
${e=>{let{themeMode:r}=e;return"dark"===r?"#30363d":"#d0d7de"}};
|
|
15
|
+
padding: 8px 16px;
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
align-items: center;
|
|
19
|
+
`;e.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
gap: 6px;
|
|
22
|
+
align-items: center;
|
|
23
|
+
`,e.div`
|
|
24
|
+
width: 12px;
|
|
25
|
+
height: 12px;
|
|
26
|
+
border-radius: 50%;
|
|
27
|
+
background-color: ${e=>{let{color:r}=e;return r}};
|
|
28
|
+
`;const t=e.div`
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: 8px;
|
|
32
|
+
flex: 1;
|
|
33
|
+
margin-left: 12px;
|
|
34
|
+
`,d=e.span`
|
|
35
|
+
color: ${e=>{let{themeMode:r}=e;return"dark"===r?"#f0f6fc":"#24292f"}};
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
font-weight: 500;
|
|
38
|
+
`,n=e.div`
|
|
39
|
+
background-color: ${e=>{let{bg:r}=e;return r}};
|
|
40
|
+
color: ${e=>{let{color:r}=e;return r||"#ffffff"}};
|
|
41
|
+
padding: 2px 6px;
|
|
42
|
+
border-radius: 4px;
|
|
43
|
+
font-size: 11px;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
text-transform: uppercase;
|
|
46
|
+
`,i=e.button`
|
|
47
|
+
background-color: transparent;
|
|
48
|
+
border: 1px solid
|
|
49
|
+
${e=>{let{themeMode:r}=e;return"dark"===r?"#30363d":"#d0d7de"}};
|
|
50
|
+
border-radius: 4px;
|
|
51
|
+
padding: 4px 8px;
|
|
52
|
+
color: ${e=>{let{themeMode:r}=e;return"dark"===r?"#f0f6fc":"#24292f"}};
|
|
53
|
+
font-size: 12px;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 4px;
|
|
58
|
+
transition: background-color 0.2s ease;
|
|
59
|
+
|
|
60
|
+
&:hover {
|
|
61
|
+
background-color: ${e=>{let{themeMode:r}=e;return"dark"===r?"#21262d":"#f3f4f6"}};
|
|
62
|
+
}
|
|
63
|
+
`,l=e.div`
|
|
64
|
+
max-height: ${e=>{let{maxHeight:r}=e;return r}};
|
|
65
|
+
overflow: auto;
|
|
66
|
+
display: flex;
|
|
67
|
+
/* Ensure this is the only scroll container */
|
|
68
|
+
min-width: 0;
|
|
69
|
+
`,a=e.div`
|
|
70
|
+
background-color: ${e=>{let{themeMode:r}=e;return"dark"===r?"#0d1117":"#f6f8fa"}};
|
|
71
|
+
color: ${e=>{let{themeMode:r}=e;return"dark"===r?"#6e7681":"#656d76"}};
|
|
72
|
+
padding: 16px 12px;
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
line-height: 20px;
|
|
75
|
+
text-align: right;
|
|
76
|
+
user-select: none;
|
|
77
|
+
border-right: 1px solid
|
|
78
|
+
${e=>{let{themeMode:r}=e;return"dark"===r?"#21262d":"#d0d7de"}};
|
|
79
|
+
min-width: 40px;
|
|
80
|
+
`,f=e.pre`
|
|
81
|
+
flex: 1;
|
|
82
|
+
padding: 16px;
|
|
83
|
+
font-size: 12px;
|
|
84
|
+
line-height: 20px;
|
|
85
|
+
color: ${e=>{let{themeMode:r}=e;return"dark"===r?"#f0f6fc":"#24292f"}};
|
|
86
|
+
background-color: transparent;
|
|
87
|
+
margin: 0;
|
|
88
|
+
white-space: pre;
|
|
89
|
+
/* Remove overflow-x from here since parent handles all scrolling */
|
|
90
|
+
overflow: visible;
|
|
91
|
+
min-width: 0; /* Ensures proper shrinking in flex container */
|
|
92
|
+
|
|
93
|
+
.keyword {
|
|
94
|
+
color: ${e=>{let{themeMode:r}=e;return"dark"===r?"#79c0ff":"#0969da"}};
|
|
95
|
+
font-weight: 600;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.string {
|
|
99
|
+
color: ${e=>{let{themeMode:r}=e;return"dark"===r?"#a5d6ff":"#0a3069"}};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.comment {
|
|
103
|
+
color: ${e=>{let{themeMode:r}=e;return"dark"===r?"#8b949e":"#656d76"}};
|
|
104
|
+
font-style: italic;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.number {
|
|
108
|
+
color: ${e=>{let{themeMode:r}=e;return"dark"===r?"#79c0ff":"#0969da"}};
|
|
109
|
+
}
|
|
110
|
+
`;export{f as Code,l as CodeContainer,r as Container,i as CopyButton,o as Header,n as LanguageBadge,a as LineNumbers,d as Title,t as TitleSection};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const highlightCode: (code: string, lang: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=(e,t)=>{const s={javascript:["function","const","let","var","if","else","for","while","return","class","import","export","from","async","await","try","catch","new","this","console","log","window","document","switch"],python:["def","class","if","else","elif","for","while","import","from","return","try","except","with","as","lambda","and","or","not","in","print"],java:["public","private","protected","static","class","interface","if","else","for","while","return","import","new","this","extends","implements","System","out","println"],css:["color","background","margin","padding","display","position","flex","grid","width","height","border","font"],html:["div","span","p","h1","h2","h3","body","head","html","script","style","link"],json:["true","false","null"]}[t.toLowerCase()]||[],n={};s.forEach((e=>{n[e]=(e=>{let t=0;for(let s=0;s<e.length;s++)t=e.charCodeAt(s)+((t<<5)-t);const s=(16777215&t).toString(16).toUpperCase();return`#${"00000".substring(0,6-s.length)+s}`})(e)}));let r=e;return r=r.replace(/(["'`])(?:\\.|(?!\1).)*\1/g,'<span class="string">$&</span>'),r=r.replace(/\/\/.*$/gm,'<span class="comment">$&</span>'),r=r.replace(/\/\*[\s\S]*?\*\//g,'<span class="comment">$&</span>'),r=r.replace(/#.*$/gm,'<span class="comment">$&</span>'),r=r.replace(/\b\d+\.?\d*\b/g,'<span class="number">$&</span>'),s.forEach((e=>{const t=new RegExp(`\\b(${e})\\b(?![^<]*>)`,"g");r=r.replace(t,`<span style="color: ${n[e]}">$1</span>`)})),r};export{e as highlightCode};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function format(code: string): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare enum CodeLanguage {
|
|
2
|
+
JAVASCRIPT = "javascript",
|
|
3
|
+
PYTHON = "python",
|
|
4
|
+
JAVA = "java",
|
|
5
|
+
CSS = "css",
|
|
6
|
+
HTML = "html",
|
|
7
|
+
JSON = "json"
|
|
8
|
+
}
|
|
9
|
+
export interface CodeBlockProps {
|
|
10
|
+
code?: string;
|
|
11
|
+
language?: CodeLanguage;
|
|
12
|
+
title?: string;
|
|
13
|
+
showTitle?: boolean;
|
|
14
|
+
showLineNumbers?: boolean;
|
|
15
|
+
maxHeight?: string;
|
|
16
|
+
maxWidth?: string;
|
|
17
|
+
theme?: 'dark' | 'light';
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a;!function(a){a.JAVASCRIPT="javascript",a.PYTHON="python",a.JAVA="java",a.CSS="css",a.HTML="html",a.JSON="json"}(a||(a={}));export{a as CodeLanguage};
|
|
@@ -10,4 +10,10 @@ export declare const CountryCodePicker: React.FC<{
|
|
|
10
10
|
placement?: Placement;
|
|
11
11
|
placementStrategy?: PositioningStrategy;
|
|
12
12
|
disabled?: boolean;
|
|
13
|
+
hideFlagImage?: boolean;
|
|
14
|
+
containerStyles?: React.CSSProperties;
|
|
15
|
+
codeColor?: string;
|
|
16
|
+
dialColor?: string;
|
|
17
|
+
countryTextStyle?: React.CSSProperties;
|
|
18
|
+
onDropdownClick?: () => void;
|
|
13
19
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as e}from"react/jsx-runtime";import t from"../../assets/icons/chevronDown.svg.js";import{useState as n,useEffect as r}from"react";import{CountriesData as d}from"./CountryCodePicker.modal.js";import{StyledCountryPickerWrapper as s,StyledCountryPickerOption as i}from"./CountryCodePicker.styled.js";import{DropdownPopover as
|
|
1
|
+
import{jsx as o,jsxs as e}from"react/jsx-runtime";import t from"../../assets/icons/chevronDown.svg.js";import{useState as n,useEffect as r}from"react";import{CountriesData as d}from"./CountryCodePicker.modal.js";import{StyledCountryPickerWrapper as s,StyledCountryPickerOption as i}from"./CountryCodePicker.styled.js";import{DropdownPopover as l}from"../dropdown/DropdownPopover/index.js";import"../dropdown/Dropdown.js";import"../dropdown/ChipDropdown.js";import"../zeroState/ZeroState.js";import{BodySecondary as c}from"../TypographyStyle.js";import{COLORS as p}from"../../constants/Theme.js";import"../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../checkBox/CheckBox.styled.js";import"../list-item/ListItem.js";import"../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../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";const m=m=>{var a,u,y,h,j,v,w;const[g,C]=n(null!==(a=m.selectedCountry)&&void 0!==a?a:{name:"India",dial:"+91",code:"IN"}),b=`https://flagcdn.com/${null===(u=g.code)||void 0===u?void 0:u.toLowerCase()}.svg`;r((()=>{m.selectedCountry&&C(m.selectedCountry)}),[null===(y=m.selectedCountry)||void 0===y?void 0:y.code]);return o(l,Object.assign({version:m.version,isSearchable:!0,width:null!==(h=m.popoverWidth)&&void 0!==h?h:"200px",placement:null!==(j=m.placement)&&void 0!==j?j:"bottom-start",strategy:null!==(v=m.placementStrategy)&&void 0!==v?v:"absolute",options:d.map((t=>{var n,r,d,s;const l=`https://flagcdn.com/${null===(n=t.code)||void 0===n?void 0:n.toLowerCase()}.svg`;return{value:t.code,label:t.dial,searchKey:t.name,customComponent:e(i,{children:[!m.hideFlagImage&&o("img",{src:l,className:"country-flag__option",alt:t.name}),e(c,Object.assign({style:null!==(r=m.countryTextStyle)&&void 0!==r?r:{}},{children:[o("span",Object.assign({style:{color:null!==(d=m.codeColor)&&void 0!==d?d:p.text.primary}},{children:t.code}))," ",o("span",Object.assign({style:{color:null!==(s=m.dialColor)&&void 0!==s?s:p.text.primary}},{children:t.dial}))]}))]}),selected:g.code===t.code}})),disabled:m.disabled,onSelect:o=>{const e=d.filter((e=>e.code===o.value));C(e[0]),m.onCountrySelect(e[0])}},{children:e(s,Object.assign({height:m.height,style:m.containerStyles,onClick:()=>{var o;console.log("hello"),null===(o=m.onDropdownClick)||void 0===o||o.call(m)}},{children:[e("div",Object.assign({className:"content__wrapper"},{children:[!m.hideFlagImage&&o("img",{src:b,className:"country-flag__selected-option",alt:g.name}),o(c,Object.assign({style:null!==(w=m.countryTextStyle)&&void 0!==w?w:{}},{children:g.dial}))]})),o(t,{width:24,height:24,color:p.content.primary})]}))}))};export{m as CountryCodePicker};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as t,jsx as s}from"react/jsx-runtime";import r from"../../../assets/icons/calendar.svg.js";import o from"../../../assets/icons/chevronDown.svg.js";import i,{useState as a}from"react";import{usePopper as n}from"react-popper";import{DatePicker as
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as s}from"react/jsx-runtime";import r from"../../../assets/icons/calendar.svg.js";import o from"../../../assets/icons/chevronDown.svg.js";import i,{useState as a}from"react";import{usePopper as n}from"react-popper";import{DatePicker as m}from"../../datePicker/DatePicker.js";import"react-calendar";import{useOutside as c}from"../../../hooks/useOutside.js";import p from"../../../utils/DateUtils.js";import"../../../constants/Theme.js";import"../../TypographyStyle.js";import"../../datePicker/DatePickerWrapper.styled.js";import"../../datePicker/model.js";import{OpenDropdownContainer as l}from"../../dropdown/Common.styled.js";import{DropShadow as d}from"../../dropShadow/DropShadow.js";const j=j=>{const[h,f]=a(null),[g,u]=a(null),[y,D]=a(!1),{styles:b,attributes:w}=n(h,g,{placement:j.placement}),O=i.useRef();return c(O,(()=>{D(!1)})),e(t,{children:[e("div",Object.assign({className:"date-preview",ref:f,onClick:()=>{D(!y)}},{children:[s(r,{width:24,height:24}),s("span",Object.assign({style:{marginLeft:8}},{children:p.onlyDateFormat(j.customDate,"dd MMM yyyy")})),s(o,{style:{marginLeft:"auto"},width:22,height:22})]})),y&&s(l,Object.assign({ref:u,style:Object.assign(Object.assign({},b.popper),{zIndex:3})},w.popper,{children:s("div",Object.assign({ref:O},{children:s(d,Object.assign({level:"z2",position:"down",style:{borderRadius:4}},{children:s(m,{selectedDate:j.customDate||new Date,selectRange:!1,onSelectDate:e=>{D(!1),j.setCustomDate(e)},minDate:j.minDate})}))}))}))]})};export{j as default};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
|
|
2
3
|
import { footerButtonOptionModel, MessageSource } from './model';
|
|
3
4
|
interface SourceInfoFooterProps {
|
|
5
|
+
appType: ApplicationType;
|
|
4
6
|
sourceIntent: string;
|
|
5
7
|
messageSource?: MessageSource;
|
|
6
8
|
hideAddDataButton?: boolean;
|
|
@@ -14,6 +16,9 @@ interface SourceInfoFooterProps {
|
|
|
14
16
|
ShowTrainingDataSource: Record<string, string>;
|
|
15
17
|
ChecklistType: Record<string, string>;
|
|
16
18
|
footerButtonOption?: footerButtonOptionModel;
|
|
19
|
+
isFooterLoading?: boolean;
|
|
20
|
+
reasonForAiGeneratedResponse?: string;
|
|
21
|
+
showAiResponseReason?: boolean;
|
|
17
22
|
}
|
|
18
23
|
declare const SourceInfoFooter: import("react").MemoExoticComponent<(props: SourceInfoFooterProps) => import("react/jsx-runtime").JSX.Element>;
|
|
19
24
|
export default SourceInfoFooter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,
|
|
1
|
+
import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import"../../node_modules/@bikdotai/bik-models/growth/models/bik-store.js";import i from"../../assets/icons/alert_triangle.svg.js";import n from"../../assets/icons/plus.svg.js";import{memo as r,useState as a,useMemo as s,useEffect as d}from"react";import{COLORS as l}from"../../constants/Theme.js";import{Button as c}from"../button/Button.js";import{BikShimmer as u}from"../shimmer/ShimmerComponent/BikShimmer.js";import{BodyCaption as p}from"../TypographyStyle.js";import{SourceInfoFooterStyle as h}from"./DataSourcePanel.style.js";import{__exports as m}from"../../_virtual/bik-store.js";const v=r((r=>{const{appType:v,sourceIntent:b,hideHeading:A,messageSource:y,trainingSourceCount:f={},ShowTrainingDataSource:_={},faqCount:I,ChecklistType:R,footerButtonOption:O,isFooterLoading:w,reasonForAiGeneratedResponse:N,showAiResponseReason:k}=r,C=_,[F,j]=a(!0),[D,E]=a(!0),S="/bik-ai/training",[x,P]=a({buttonTitle:"",redirectUrl:"",addFaqProps:{}}),[U,M]=a({title:"",subTitle:""}),q=s((()=>{const e=(null==f?void 0:f[b])||0;return e<=1?"There is "+e+"data source added to the identified intent":`There are ${e} data sources added to the identified intent`}),[f,b]),L=()=>{var e;(null==x?void 0:x.redirectUrl)?window.open(`${window.location.origin}${null==x?void 0:x.redirectUrl}`,"_self"):Object.keys(null!==(e=null==x?void 0:x.addFaqProps)&&void 0!==e?e:{}).length>0?null==O||O.onClick(x):(null==O?void 0:O.navigate)&&(null==O||O.navigate("Training",v==m.ApplicationType.MANIFEST?{tab:"/custom_data"}:{},{},!0))};return d((()=>{var e,o,t,i;if(b){if(null===(e=null==y?void 0:y.sources)||void 0===e?void 0:e.length){const e=y.sources[0];if(C[b])b===R.ORDER_ENQUIRY&&E(!1);else{let n=null==e?void 0:e.insights,r="";switch(b){case R.PRODUCT_DETAILS:"Product reviews"!==(null==e?void 0:e.title)&&(n=`${I||"No"} FAQs added for this product`,r="Add product-specific information via FAQs to improve responses",P({buttonTitle:"Add FAQ",addFaqProps:{faqProducts:[{id:null==e?void 0:e.productId,variantId:null==e?void 0:e.variantId,name:null==e?void 0:e.title,imageUrl:null==e?void 0:e.imageUrl}]},redirectUrl:""}));break;case R.ORDER_MODIFICATION:n=(null==f?void 0:f[b])?void 0:"Customers who are looking to modify their orders would be redirected to your live agents via the agent handover flow.",n&&P({buttonTitle:v==m.ApplicationType.MANIFEST?"Manage agent handover":"Add relevant data",redirectUrl:v==m.ApplicationType.MANIFEST?"/customise?tab=AgentHandover":S,addFaqProps:{}});break;case R.ORDER_CANCELLATION:n=(null==f?void 0:f[b])?void 0:"Customers who are looking to cancel their orders would be redirected to your live agents via the agent handover flow.",P({buttonTitle:v==m.ApplicationType.MANIFEST?"Manage agent handover":"Add relevant data",redirectUrl:v==m.ApplicationType.MANIFEST?"/customise?tab=AgentHandover":S,addFaqProps:{}});break;case R.ORDER_TRACKING:if("ORDER_NOT_FOUND"===(null==e?void 0:e.subIntent))break;P({buttonTitle:v==m.ApplicationType.MANIFEST?"Add order tracking link":"Add relevant data",redirectUrl:v==m.ApplicationType.MANIFEST?"/training/order-management":S,addFaqProps:{}});break;case R.PRODUCT_SEARCH:if("QUIZ"===(null==e?void 0:e.type))break;if(-1!==(null===(i=null===(t=null===(o=null==y?void 0:y.sources)||void 0===o?void 0:o[0])||void 0===t?void 0:t.title)||void 0===i?void 0:i.toLowerCase().indexOf("collection"))){n="Collections are recommended by matching queries with collection names and descriptions. Add relevant keywords to your collection description to improve results.";break}n="Products are recommended by matching queries with product names, descriptions, tags, and collections. Add relevant keywords and tags to your products to improve results."}M({title:null!=n?n:"",subTitle:r})}}(C[b]||[R.PRODUCT_DETAILS,R.ORDER_MODIFICATION,R.ORDER_CANCELLATION,R.ORDER_TRACKING].includes(b))&&j(!1)}}),[null==y?void 0:y.messageId,f,b,null==y?void 0:y.sources,C,R,I,v,y]),e(h,{children:e(o,w?{children:e(u,{gap:"8px",direction:"column",boxes:[{height:"20px",width:"300px"},{height:"80px",width:"300px"}]})}:{children:!(null==U?void 0:U.title)&&f&&b in f?t(o,{children:[e(g,{hideHeading:null!=A&&A}),e(T,{reason:N||"",showAiResponseReason:null!=k&&k}),t("div",Object.assign({className:"source_info_details "+(f[b]>0?"":"no_data_source")},{children:[f[b]>0&&D?t(o,{children:[e(p,{children:q}),e(p,Object.assign({color:l.content.secondary},{children:"Improve responses by adding more data sources for the identified intent"}))]}):D&&t("div",Object.assign({className:"no_data_source_title"},{children:[e(i,{width:15,height:15,color:l.content.negative,style:{marginTop:2}}),e(p,{children:"No data sources added to the identified link"})]})),!O||O.hideAddDataButton||F?e(o,{}):e(c,{size:"small",buttonType:"tertiary",LeadingIcon:n,buttonText:(null==x?void 0:x.buttonTitle.length)>0?null==x?void 0:x.buttonTitle:"Add relevant data",matchParentWidth:!0,onClick:()=>L(),style:{backgroundColor:"unset"}})]}))]}):t(o,{children:[e(g,{hideHeading:null!=A&&A}),e(T,{reason:N||"",showAiResponseReason:null!=k&&k}),t("div",Object.assign({className:"source_info_details"},{children:[D&&t(o,{children:[e(p,{children:null==U?void 0:U.title}),e(p,Object.assign({color:l.content.secondary},{children:null==U?void 0:U.subTitle}))]}),!O||O.hideAddDataButton||F?e(o,{}):e(c,{size:"small",buttonType:"tertiary",LeadingIcon:n,buttonText:(null==x?void 0:x.buttonTitle.length)>0?null==x?void 0:x.buttonTitle:"Add relevant data",matchParentWidth:!0,onClick:()=>L(),style:{backgroundColor:"unset"}})]}))]})})})})),g=r((o=>o.hideHeading?null:e(p,Object.assign({color:l.content.secondary},{children:"Training insights"})))),T=r((i=>{const[n,r]=a(!1),s=i.reason&&i.reason.length>50,d=s&&!n?i.reason.substring(0,50)+"...":i.reason;return i.showAiResponseReason?t("div",Object.assign({className:"source_info_details"},{children:[e(p,Object.assign({color:l.content.primary,className:"why_ai_gave_this_response"},{children:"Here’s why your AI gave this response"})),t(p,Object.assign({color:l.content.secondary,className:"clamp-text"},{children:[d||"No reason provided for this response.",s&&e(p,Object.assign({color:l.content.brand,style:{cursor:"pointer",textDecoration:"underline",marginTop:"4px"},onClick:()=>r(!n)},{children:n?"Show less":"Show more"}))]}))]})):e(o,{})}));T.displayName="WhyAiGaveThisResponse",g.displayName="TrainingInsightsHeading",v.displayName="SourceInfoFooter";export{v as default};
|
|
@@ -1,23 +1,36 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
|
|
3
|
+
import { AllSourceInfoDetailsCustomDataModel, CustomDataType, DataSourcePanelZeroState, footerButtonOptionModel, InfoContent, MessageSource, ProductSourceData } from './model';
|
|
4
|
+
export interface CollapsibleSectionProps {
|
|
5
|
+
title: string;
|
|
6
|
+
count: number;
|
|
7
|
+
isExpanded: boolean;
|
|
8
|
+
onToggle: () => void;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
3
11
|
export interface DataSourcePanelProps {
|
|
4
12
|
storeId: string;
|
|
13
|
+
appType: ApplicationType;
|
|
5
14
|
messageSource: MessageSource;
|
|
6
15
|
setMessageSourcePanel: (source?: MessageSource) => void;
|
|
7
16
|
hideCloseButton?: boolean;
|
|
8
17
|
title?: string;
|
|
9
18
|
allSourceInfoDetail: AllSourceInfoDetailsCustomDataModel;
|
|
10
19
|
isSourceInfoFetched?: boolean;
|
|
11
|
-
faqCount: number;
|
|
12
20
|
editableSources: CustomDataType[];
|
|
13
21
|
redirect: (sourceInfo: InfoContent) => void;
|
|
14
|
-
|
|
22
|
+
preFillTrainingSourceCount?: {
|
|
15
23
|
[k in string]: number;
|
|
16
24
|
};
|
|
17
25
|
zeroStateButton: DataSourcePanelZeroState;
|
|
18
26
|
ChecklistType: Record<string, string>;
|
|
19
|
-
IntentComponentMap: Record<string, JSX.Element>;
|
|
20
|
-
ShowTrainingDataSource: Record<string, string>;
|
|
21
27
|
footerButtonOption?: footerButtonOptionModel;
|
|
28
|
+
fetchTrainingSourceCount: (storeId: string) => Promise<{
|
|
29
|
+
[k in string]: number;
|
|
30
|
+
}>;
|
|
31
|
+
fetchProductFAQCount: (storeId: string, productIds?: string[]) => Promise<number>;
|
|
32
|
+
productSourceData?: ProductSourceData;
|
|
33
|
+
reasonForAiGeneratedResponse?: string;
|
|
34
|
+
showAiResponseReason?: boolean;
|
|
22
35
|
}
|
|
23
36
|
export declare const DataSourcePanel: React.FC<DataSourcePanelProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";import o from"../../assets/icons/boxV2.svg.js";import s from"../../assets/icons/cross.svg.js";import n from"../../assets/icons/edit.svg.js";import r from"../../assets/icons/filePdf.svg.js";import l from"../../assets/icons/help.svg.js";import a from"../../assets/icons/info.svg.js";import d from"../../assets/icons/openai.svg.js";import c from"../../assets/icons/plus.svg.js";import p from"../../assets/icons/redirect.svg.js";import u from"../../assets/icons/text_t9.svg.js";import g from"../../assets/icons/website.svg.js";import{useState as h,useEffect as m}from"react";import{COLORS as v}from"../../constants/Theme.js";import{Button as f}from"../button/Button.js";import{IconButton as y}from"../icon-button/IconButton.js";import{BikShimmer as C}from"../shimmer/ShimmerComponent/BikShimmer.js";import{Tag as x}from"../tag/Tag.js";import{Tooltip as b}from"../tooltips/Tooltip.js";import{TitleSmall as I,BodyCaption as L,BodySecondary as j}from"../TypographyStyle.js";import w from"./DataSourceInfoFooter.js";import{SourceInfoDetailsStyle as T}from"./DataSourcePanel.style.js";import{CustomDataType as E}from"./model.js";const S=S=>{var O,N;const{storeId:k,messageSource:D,setMessageSourcePanel:A,hideCloseButton:_,faqCount:B=0,isSourceInfoFetched:F,allSourceInfoDetail:K,ChecklistType:P,IntentComponentMap:W,title:q,zeroStateButton:M,editableSources:H,redirect:Q,trainingSourceCount:$,ShowTrainingDataSource:R,footerButtonOption:U}=S,{sources:X}=D,z=["blog","article","page","policy"],[G,V]=h(!1),[J,Y]=h(!1);m((()=>{var e,t,i,o;(null==D?void 0:D.messageId)&&(V(!0),setTimeout((()=>V(!1)),200),Y(!1!==(null===(t=null===(e=D.sources)||void 0===e?void 0:e[0])||void 0===t?void 0:t.isTrainable)||!!(null===(o=null===(i=D.sources)||void 0===i?void 0:i[0])||void 0===o?void 0:o.insights)))}),[null==D?void 0:D.messageId]);const Z=e=>!(0!==e.length&&!(null==D?void 0:D.isUnsatisfactoryAnswer)),ee=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var i;return"custom"==e?e=E.FILES:z.includes(e)?e=E.FETCHED_LINKS:"url"==e?e=E.WEBSITE_LINKS:"text"===e?e=E.TEXTS:"faq"===e&&(e=E.FAQ),t?e:null===(i=null==e?void 0:e.toLowerCase())||void 0===i?void 0:i.replace(/_/g," ")};return G||!F?e(T,{children:e(C,{boxes:[{width:"100px",height:"16px"},{width:"0",height:"4px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"0",height:"4px"},{width:"100%",height:"16px"}]})}):e(t,{children:e(T,{children:!!(null==X?void 0:X.length)&&i(t,{children:[i("div",Object.assign({className:"pop-up-header",style:{display:"flex",flexDirection:"column",paddingBottom:"12px"}},{children:[!!q&&e(I,{children:q}),i("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",alignItems:"center"}},{children:[e(L,Object.assign({color:v.content.secondary},{children:"Intent"})),null!==(O=W[D.intent])&&void 0!==O?O:W.GENERIC,!_&&e("div",Object.assign({style:{display:"flex",marginLeft:"auto",cursor:"pointer"},onClick:()=>A(void 0)},{children:e(s,{height:20,width:20,color:v.content.secondary})}))]})),Z(X)?e("div",Object.assign({style:{display:"flex",margin:"auto",justifyContent:"center",alignItems:"center",height:"calc(100vh - 300px)"}},{children:(()=>{var t,o;return i("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:"0px 30px",gap:"8px"}},{children:[e("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"12px",backgroundColor:`${v.background.negative.light}`,borderRadius:"100px"}},{children:e(a,{width:24,height:24,color:v.stroke.negative.vibrant})})),e("div",Object.assign({style:{justifyContent:"center",alignItems:"center",marginBottom:"-4px"}},{children:e(I,{children:"Insufficient data"})})),e(j,Object.assign({color:v.content.secondary,style:{display:"flex",justifyContent:"center",textAlign:"center"}},{children:"No data available to answer this query. Add an FAQ to address it in the future"})),M&&e("div",Object.assign({style:{display:"flex",width:"100%"}},{children:e(f,{LeadingIcon:null!==(t=M.leadingIcon)&&void 0!==t?t:c,buttonText:null!==(o=M.title)&&void 0!==o?o:"Add FAQ",buttonType:"secondary",size:"small",matchParentWidth:!0,onClick:()=>{M.onClick()}})}))]}))})()})):e(x,{LeadingIcon:a,version:"2.0",type:"grey",theme:"light",alignIcon:"start",contentPadding:12,tagText:D.isEditable?"If any of the information is incorrect, update the original data source and sync it again. Alternatively, you can make local corrections directly in Manifest.":"Edit the original source and save again to update the response"})]})),!Z(X)&&e("div",Object.assign({className:"info-container"},{children:e("div",Object.assign({style:{padding:"0 8px",maxWidth:"100%"}},{children:X.map(((s,a)=>{var c,h,m,f,C,x,I,w,T,S,O,N,k,D;const A=ee(s.type||s.subTitle||"OpenAI"),_=ee(s.type||s.subTitle||"OpenAI",!0),B=(F=A)?"faq"==F.toLocaleLowerCase()?"FAQ":"openai"==F.toLocaleLowerCase()?"OPENAI":"files"==F.toLocaleLowerCase()?"PDF":"texts"==F.toLocaleLowerCase()?"Custom text":((F=(F=F.charAt(0).toUpperCase()+F.slice(1).toLowerCase()).replace("_"," ")).endsWith("s")&&(F=F.slice(0,-1)),F.replace("Website","Manual")):"";var F;const W=null==H?void 0:H.includes(_),q="Products"===s.subTitle?K[null!==(c=s.productId)&&void 0!==c?c:"Products"]:K[null!==(h=s.docId)&&void 0!==h?h:""],M=_.toLowerCase()===(null===(m=E.FAQ)||void 0===m?void 0:m.toLowerCase())?"faq"===(null===(f=s.title)||void 0===f?void 0:f.toLowerCase())?s.subTitle:s.title:_.toLowerCase()===(null===(C=E.FILES)||void 0===C?void 0:C.toLowerCase())||_.toLowerCase()===(null===(x=E.FETCHED_LINKS)||void 0===x?void 0:x.toLowerCase())||_.toLowerCase()===(null===(I=E.TEXTS)||void 0===I?void 0:I.toLowerCase())?s.title:_.toLowerCase()===(null===(w=E.WEBSITE_LINKS)||void 0===w?void 0:w.toLowerCase())?s.title.split("/")[s.title.split("/").length-1].replace(/[^\w\s]/gi," ").replace(/^(.)(.*)$/,((e,t,i)=>t.toUpperCase()+i)):s.intent===P.EMAIL_COLLECTION?B:s.title,$="faq"===_.toLowerCase()?null===(T=null==q?void 0:q.data)||void 0===T?void 0:T.answer:_.toLowerCase()===(null===(S=E.FETCHED_LINKS)||void 0===S?void 0:S.toLowerCase())||_.toLowerCase()===(null===(O=E.WEBSITE_LINKS)||void 0===O?void 0:O.toLowerCase())||_.toLowerCase()===(null===(N=E.TEXTS)||void 0===N?void 0:N.toLowerCase())?null!==(D=null===(k=null==q?void 0:q.data)||void 0===k?void 0:k.fileContentText)&&void 0!==D?D:"":s.intent===P.EMAIL_COLLECTION?"Collect leads before replying to messages":"";return i("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px",padding:"24px 0px",borderBottom:`1px solid ${v.stroke.primary}`}},{children:[i("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",justifyContent:"space-between",alignItems:"center"}},{children:[e("div",Object.assign({style:{flex:1}},{children:e(b,Object.assign({body:M,placement:"top"},{children:e(j,Object.assign({style:_==E.FETCHED_LINKS||_==E.WEBSITE_LINKS?{cursor:"pointer",textDecoration:"underline"}:{},color:v.content.primary,className:"clamp-title",onClick:()=>_==E.FETCHED_LINKS||_==E.WEBSITE_LINKS?Q(s):{}},{children:M}))}))})),i("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"4px",flex:"none"}},{children:[s.intent!==P.EMAIL_COLLECTION&&i(t,{children:[(U=A,e("products"==U?o:"files"==U?r:"website links"==U||"fetched links"==U?g:"faq"==U?l:"texts"==U?u:d,{height:16,width:16,color:v.content.secondary})),e(L,Object.assign({color:v.content.secondary},{children:B}))]}),(s.link||s.docId)&&e("div",Object.assign({style:{cursor:"pointer",marginLeft:"4px"}},{children:e(y,W?{Icon:n,height:16,width:16,bordered:!0,onClick:()=>null==q?void 0:q.onEditClick(q.data,q.type),disabled:!q,disabledTooltip:"This source is deleted"}:{Icon:p,height:16,width:16,bordered:!0,disabled:"custom"===s.type&&!q,disabledTooltip:"This source is deleted",onClick:()=>Q(s)})}))]}))]})),(null!=$?$:"").trim()&&e("div",Object.assign({style:{padding:"4px 8px",border:`1px dashed ${v.stroke.primary}`,borderRadius:"4px",backgroundColor:v.surface.subdued}},{children:e(L,Object.assign({color:v.content.primary,className:"clamp-description"},{children:(R=null!=$?$:"",R.replace(/(<([^>]+)>)/gi,"")).trim()}))}))]}),`info-${a}`);var R,U}))}))})),J&&!Z(X)&&e("div",Object.assign({className:"footer"},{children:e(w,{storeId:k,messageSource:D,sourceIntent:null!==(N=D.intent)&&void 0!==N?N:P.GENERIC,faqCount:B,trainingSourceCount:$,ShowTrainingDataSource:R,ChecklistType:P,footerButtonOption:U})}))]})})})};export{S as DataSourcePanel};
|
|
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 o from"../../assets/icons/boxV2.svg.js";import n from"../../assets/icons/chevronDownOutline.svg.js";import s from"../../assets/icons/chevronUpOutline.svg.js";import l from"../../assets/icons/cross.svg.js";import r from"../../assets/icons/edit.svg.js";import a from"../../assets/icons/filePdf.svg.js";import c from"../../assets/icons/help.svg.js";import d from"../../assets/icons/info.svg.js";import p from"../../assets/icons/openai.svg.js";import u from"../../assets/icons/plus.svg.js";import g from"../../assets/icons/redirect.svg.js";import h from"../../assets/icons/text_t9.svg.js";import m from"../../assets/icons/website.svg.js";import{useState as f,useMemo as v,useEffect as y}from"react";import{COLORS as x}from"../../constants/Theme.js";import{Button as C}from"../button/Button.js";import{IconButton as I}from"../icon-button/IconButton.js";import{BikShimmer as b}from"../shimmer/ShimmerComponent/BikShimmer.js";import{SideModal as T}from"../side-modal/SideModal.js";import{Tag as j}from"../tag/Tag.js";import{Tooltip as O}from"../tooltips/Tooltip.js";import{TitleSmall as E,BodyCaption as S,BodySecondary as L}from"../TypographyStyle.js";import w from"./DataSourceInfoFooter.js";import{SourceInfoDetailsStyle as N}from"./DataSourcePanel.style.js";import{intentConfig as A}from"./IntentConfig.js";import{DescriptionModal as _}from"./Modals/DescriptionModal.js";import{CustomDataType as D}from"./model.js";import{__exports as k}from"../../_virtual/bik-store.js";const F=F=>{var R,B;const{appType:P,storeId:U,messageSource:K,setMessageSourcePanel:M,hideCloseButton:W,isSourceInfoFetched:H,allSourceInfoDetail:$,ChecklistType:q,title:Q,zeroStateButton:G,editableSources:Y,preFillTrainingSourceCount:z,redirect:X,footerButtonOption:V,fetchTrainingSourceCount:J,fetchProductFAQCount:Z,productSourceData:ee,reasonForAiGeneratedResponse:te,showAiResponseReason:ie}=F,{sources:oe}=K,ne=["blog","article","page","policy"],[se,le]=f(!1),[re,ae]=f(!1),[ce,de]=f(!1),[pe,ue]=f(0),[ge,he]=f(),[me,fe]=f(null!=z?z:{}),[ve,ye]=f(!1),[xe,Ce]=f(!1),Ie={};A.forEach((t=>{let{key:i,type:o,tagText:n}=t;q[i]&&(Ie[q[i]]=e(j,{theme:"light",type:o,tagText:n,cursor:"pointer"}))}));const be=oe.filter((e=>"PRODUCTS"==e.type||"Products"==e.subTitle||e.productId)),Te=oe.filter((e=>"PRODUCTS"!=e.type&&"Products"!=e.subTitle&&!e.productId)),je=v((()=>{const e={};return["STORE_INFORMATION","CONTACT_INFO","STORE_LOCATION","SHIPPING_POLICY","RETURN_AND_REFUND","SALES_AND_OFFERS","SALES_AND_OFFERS_ISSUES","PRODUCT_CUSTOMISATION","PAYMENT_METHODS","CHECKOUT_ENQUIRY","ORDER_ENQUIRY"].forEach((t=>{q[t]&&(e[q[t]]=q[t])})),["COLLABORATION","SUBSCRIPTION_ENQUIRY"].forEach((t=>{e[t]=t})),e}),[q]);y((()=>{var e,t,i,o;if(!(null==K?void 0:K.messageId))return;le(!0),ae(!0),de(!1!==(null===(t=null===(e=K.sources)||void 0===e?void 0:e[0])||void 0===t?void 0:t.isTrainable)||!!(null===(o=null===(i=K.sources)||void 0===i?void 0:i[0])||void 0===o?void 0:o.insights));const n=K.sources.filter((e=>!!e.productId)).map((e=>e.productId)),s=Array.from(new Set(n)).filter((e=>!!e));Z(U,s).then((e=>ue(e))).then((()=>{z?(fe(z),setTimeout((()=>{le(!1),ae(!1)}),100)):(setTimeout((()=>le(!1)),100),J(U).then((e=>fe(e))).then((()=>setTimeout((()=>{ae(!1)}),100))))}))}),[Z,J,null==K?void 0:K.messageId,K.sources,z,U]);const Oe=e=>!!(e&&0===e.length||(null==K?void 0:K.isUnsatisfactoryAnswer)),Ee=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var i;return"custom"==e?e=D.FILES:ne.includes(e)?e=D.FETCHED_LINKS:"url"==e?e=D.WEBSITE_LINKS:"text"===e?e=D.TEXTS:"faq"===e&&(e=D.FAQ),t?e:null===(i=null==e?void 0:e.toLowerCase())||void 0===i?void 0:i.replace(/_/g," ")},Se=e=>e?"faq"==e.toLocaleLowerCase()?"FAQ":"openai"==e.toLocaleLowerCase()?"OPENAI":"files"==e.toLocaleLowerCase()?"PDF":"texts"==e.toLocaleLowerCase()?"Custom text":((e=(e=e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).replace("_"," ")).endsWith("s")&&(e=e.slice(0,-1)),e.replace("Website","Manual")):"",Le=t=>e("products"==t||"product"==t?o:"files"==t?a:"website links"==t||"fetched links"==t?m:"faq"==t?c:"texts"==t?h:p,{height:16,width:16,color:x.content.secondary}),we=e=>{const t=e.replace(/(<([^>]+)>)/gi,""),i=document.createElement("textarea");return i.innerHTML=t,i.value};if(se||!H)return e(N,{children:e(b,{boxes:[{width:"100px",height:"16px"},{width:"0",height:"4px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"100%",height:"32px"},{width:"0",height:"4px"},{width:"100%",height:"16px"}]})});const Ne=o=>{const{title:l,count:r,isExpanded:a,onToggle:c,children:d}=o;return t("div",{children:[t("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",cursor:"pointer"},onClick:c},{children:[t("div",Object.assign({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[e(S,Object.assign({style:{fontWeight:"600"}},{children:l})),P===k.ApplicationType.MANIFEST?e("div",Object.assign({style:{backgroundColor:x.surface.subdued,color:x.content.secondary,padding:"2px 8px",borderRadius:"12px",fontSize:"12px",fontWeight:"500"}},{children:r})):e(i,{})]})),e(i,{children:P===k.ApplicationType.BIK?e(i,{}):e(a?n:s,{width:20,height:20,color:x.content.primary})})]})),a&&d]})};return t(i,{children:[e(N,{children:t(i,{children:[t("div",Object.assign({className:"pop-up-header",style:{display:"flex",flexDirection:"column",paddingBottom:"12px"}},{children:[!!Q&&e(E,{children:Q}),t("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",alignItems:"center"}},{children:[e(S,Object.assign({color:x.content.secondary},{children:"Intent"})),null!==(R=Ie[K.intent])&&void 0!==R?R:Ie.GENERIC,!W&&e("div",Object.assign({style:{display:"flex",marginLeft:"auto",cursor:"pointer"},onClick:()=>M(void 0)},{children:e(l,{height:20,width:20,color:x.content.secondary})}))]})),Oe(oe)?e("div",Object.assign({style:{display:"flex",margin:"auto",justifyContent:"center",alignItems:"center",height:"calc(100vh - 300px)"}},{children:(()=>{var i,o;return t("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:"0px 30px",gap:"8px"}},{children:[e("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"12px",backgroundColor:`${x.background.negative.light}`,borderRadius:"100px"}},{children:e(d,{width:24,height:24,color:x.stroke.negative.vibrant})})),e("div",Object.assign({style:{justifyContent:"center",alignItems:"center",marginBottom:"-4px"}},{children:e(E,{children:"Insufficient data"})})),e(L,Object.assign({color:x.content.secondary,style:{display:"flex",justifyContent:"center",textAlign:"center"}},{children:"No data available to answer this query. Add an FAQ to address it in the future"})),G&&e("div",Object.assign({style:{display:"flex",width:"100%"}},{children:e(C,{LeadingIcon:null!==(i=G.leadingIcon)&&void 0!==i?i:u,buttonText:null!==(o=G.title)&&void 0!==o?o:"Add FAQ",buttonType:"secondary",size:"small",matchParentWidth:!0,onClick:()=>{G.onClick()}})}))]}))})()})):e(j,{LeadingIcon:d,version:"2.0",type:"grey",theme:"light",alignIcon:"start",contentPadding:12,tagText:K.isEditable?`If any of the information is incorrect, update the original data source and sync it again. Alternatively, you can make local corrections directly in ${P===k.ApplicationType.BIK?"BIK":"Manifest"}.`:"Edit the original source and save again to update the response"})]})),!Oe(oe)&&t("div",Object.assign({className:"info-container"},{children:[e(i,{children:be.length>0&&e("div",Object.assign({className:"info-product-source"},{children:e(Ne,Object.assign({title:"Product Sources",count:be.length,isExpanded:P!==k.ApplicationType.MANIFEST||ve,onToggle:()=>ye(!ve)},{children:e("div",Object.assign({className:"source",style:{padding:"0 12px",maxWidth:"100%"}},{children:be.map(((o,n)=>{var s,l,a,c;const d=Ee(o.type||o.subTitle||"OpenAI"),p=Ee(o.type||o.subTitle||"OpenAI",!0),u=Se(d),h=null==Y?void 0:Y.includes(p),m=$[null!==(s=o.productId)&&void 0!==s?s:"Products"],f=o.title,v=o.productId&&(null==ee?void 0:ee[o.productId]),y=v&&v.metafield.join(", ");return t("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px",padding:"16px 0px",borderBottom:n+1<(null==be?void 0:be.length)?`1px solid ${x.stroke.primary}`:"none"}},{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",justifyContent:"space-between",alignItems:"center"}},{children:[t("div",Object.assign({style:{display:"flex",flex:1,gap:"8px",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"}},{children:[Le(d),e(O,Object.assign({body:f,placement:"top"},{children:e(L,Object.assign({style:p==D.FETCHED_LINKS||p==D.WEBSITE_LINKS?{cursor:"pointer",textDecoration:"underline"}:{},color:x.content.primary,className:"clamp-title",onClick:()=>p==D.FETCHED_LINKS||p==D.WEBSITE_LINKS?X(o):{}},{children:f}))}))]})),t("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"4px",flex:"none"}},{children:[o.intent!==q.EMAIL_COLLECTION&&e(i,{children:e(S,Object.assign({color:x.content.secondary},{children:u}))}),(o.link||o.docId)&&e("div",Object.assign({style:{cursor:"pointer",marginLeft:"0px"}},{children:e(I,h?{Icon:r,height:16,width:16,iconColor:x.content.secondary,onClick:()=>null==m?void 0:m.onEditClick(m.data,m.type),disabled:!m,disabledTooltip:"This source is deleted"}:{Icon:g,height:16,width:16,iconColor:x.content.secondary,disabled:"custom"===o.type&&!m,disabledTooltip:"This source is deleted",onClick:()=>X(o)})}))]}))]})),v&&t(S,{children:[e("span",Object.assign({className:"product-data-text1",onClick:()=>{var e;he({title:f,description:we(v.description),imageUrl:null!==(e=o.imageUrl)&&void 0!==e?e:"",onClose:()=>he(void 0)})}},{children:`${null===(l=v.description)||void 0===l?void 0:l.length} characters description,`})),e("span",Object.assign({className:"product-data-text1",onClick:()=>v.onEditFaqClick(v.faqs)},{children:`${null===(a=v.faqs)||void 0===a?void 0:a.length} FAQs, `})),e("span",Object.assign({className:"product-data-text2"},{children:"and"})),e(O,Object.assign({body:y,placement:"top"},{children:e("span",Object.assign({className:"product-data-text1"},{children:`${null===(c=v.metafield)||void 0===c?void 0:c.length} metafields`}))}))]})]}),`info-${n}`)}))}))}))}))}),e(i,{children:Te.length>0&&e("div",Object.assign({className:"info-content-source"},{children:e(Ne,Object.assign({title:"Content Sources",count:Te.length,isExpanded:P!==k.ApplicationType.MANIFEST||xe,onToggle:()=>Ce(!xe)},{children:e("div",Object.assign({className:"source",style:{padding:"0 12px",maxWidth:"100%"}},{children:Te.map(((o,n)=>{var s,l,a,c,d,p,u,h,m,f,v,y,C,b,T,j,E;const w=Ee(o.type||o.subTitle||"OpenAI"),N=Ee(o.type||o.subTitle||"OpenAI",!0),A=Se(w),_=null==Y?void 0:Y.includes(N),k="Products"===o.subTitle?$[null!==(s=o.productId)&&void 0!==s?s:"Products"]:$[null!==(l=o.docId)&&void 0!==l?l:""],F=N.toLowerCase()===(null===(a=D.FAQ)||void 0===a?void 0:a.toLowerCase())?"faq"===(null===(c=o.title)||void 0===c?void 0:c.toLowerCase())?o.subTitle:o.title:N.toLowerCase()===(null===(d=D.FILES)||void 0===d?void 0:d.toLowerCase())||N.toLowerCase()===(null===(p=D.FETCHED_LINKS)||void 0===p?void 0:p.toLowerCase())||N.toLowerCase()===(null===(u=D.TEXTS)||void 0===u?void 0:u.toLowerCase())?o.title:N.toLowerCase()===(null===(h=D.WEBSITE_LINKS)||void 0===h?void 0:h.toLowerCase())?o.title.split("/")[o.title.split("/").length-1].replace(/[^\w\s]/gi," ").replace(/^(.)(.*)$/,((e,t,i)=>t.toUpperCase()+i)):o.intent===q.EMAIL_COLLECTION?A:o.title,R="faq"===N.toLowerCase()?null!==(v=null!==(m=null==k?void 0:k.content)&&void 0!==m?m:null===(f=null==k?void 0:k.data)||void 0===f?void 0:f.answer)&&void 0!==v?v:"":N.toLowerCase()===(null===(y=D.FETCHED_LINKS)||void 0===y?void 0:y.toLowerCase())||N.toLowerCase()===(null===(C=D.WEBSITE_LINKS)||void 0===C?void 0:C.toLowerCase())||N.toLowerCase()===(null===(b=D.TEXTS)||void 0===b?void 0:b.toLowerCase())?null!==(E=null!==(T=null==k?void 0:k.content)&&void 0!==T?T:null===(j=null==k?void 0:k.data)||void 0===j?void 0:j.fileContentText)&&void 0!==E?E:"":o.intent===q.EMAIL_COLLECTION?"Collect leads before replying to messages":"";return t("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px",padding:"16px 0px",borderBottom:n+1<(null==Te?void 0:Te.length)?`1px solid ${x.stroke.primary}`:"none"}},{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",justifyContent:"space-between",alignItems:"center"}},{children:[t("div",Object.assign({style:{display:"flex",flex:1,gap:"8px",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"}},{children:[Le(w),e(O,Object.assign({body:F,placement:"top"},{children:e(L,Object.assign({style:N==D.FETCHED_LINKS||N==D.WEBSITE_LINKS?{cursor:"pointer",textDecoration:"underline"}:{},color:x.content.primary,className:"clamp-title",onClick:()=>N==D.FETCHED_LINKS||N==D.WEBSITE_LINKS?X(o):{}},{children:F}))}))]})),t("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"4px",flex:"none"}},{children:[o.intent!==q.EMAIL_COLLECTION&&e(i,{children:e(S,Object.assign({color:x.content.secondary},{children:A}))}),(o.link||o.docId)&&e("div",Object.assign({style:{cursor:"pointer",marginLeft:"0px"}},{children:e(I,_?{Icon:r,height:16,width:16,iconColor:x.content.secondary,onClick:()=>null==k?void 0:k.onEditClick(k.data,k.type),disabled:!k,disabledTooltip:"This source is deleted"}:{Icon:g,height:16,width:16,iconColor:x.content.secondary,disabled:"custom"===o.type&&!k,disabledTooltip:"This source is deleted",onClick:()=>X(o)})}))]}))]})),(null!=R?R:"").trim()&&e("div",Object.assign({style:{padding:"4px 8px",border:`1px dashed ${x.stroke.primary}`,borderRadius:"4px",backgroundColor:x.surface.subdued}},{children:e(S,Object.assign({color:x.content.primary,className:"clamp-description"},{children:we(null!=R?R:"").trim()}))}))]}),`info-${n}`)}))}))}))}))})]})),ce&&!Oe(oe)&&e("div",Object.assign({className:"footer"},{children:e(w,{appType:P,storeId:U,messageSource:K,sourceIntent:null!==(B=K.intent)&&void 0!==B?B:q.GENERIC,faqCount:pe,trainingSourceCount:me,ShowTrainingDataSource:je,ChecklistType:q,footerButtonOption:V,isFooterLoading:re,reasonForAiGeneratedResponse:te,showAiResponseReason:ie})}))]})}),ge&&e(T,Object.assign({header:"Product description",onClose:()=>he(void 0),width:"30%"},{children:e(_,{title:ge.title,description:ge.description,imageUrl:ge.imageUrl,onClose:ge.onClose})}))]})};export{F as DataSourcePanel};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const SourceInfoDetailsStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export declare const WithoutContentSourceInfoDetailsStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const SourceInfoFooterStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const DataSourceCountStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,11 +1,48 @@
|
|
|
1
|
-
import e from"styled-components";import{COLORS as o}from"../../constants/Theme.js";const
|
|
1
|
+
import e from"styled-components";import{COLORS as o}from"../../constants/Theme.js";const r=e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
margin: 0px 8px 0px 8px;
|
|
4
4
|
padding: 20px 0px 20px 0px;
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
max-height: calc(100vh - 130px);
|
|
7
7
|
.info-container {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
8
10
|
border-radius: 8px;
|
|
11
|
+
gap: 12px;
|
|
12
|
+
}
|
|
13
|
+
.info-content-source {
|
|
14
|
+
border-radius: 8px;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
background-color: ${o.surface.hovered};
|
|
19
|
+
.source {
|
|
20
|
+
border-radius: 12px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
.info-product-source {
|
|
24
|
+
border-radius: 8px;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
gap: 8px;
|
|
28
|
+
background-color: ${o.surface.hovered};
|
|
29
|
+
|
|
30
|
+
.product-data-text1 {
|
|
31
|
+
padding: 2px;
|
|
32
|
+
text-decoration: underline;
|
|
33
|
+
color: ${o.content.secondary};
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
&:active {
|
|
36
|
+
background-color: ${o.surface.hovered};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
.product-data-text2 {
|
|
40
|
+
padding: 2px;
|
|
41
|
+
color: ${o.content.secondary};
|
|
42
|
+
}
|
|
43
|
+
.source {
|
|
44
|
+
border-radius: 12px;
|
|
45
|
+
}
|
|
9
46
|
}
|
|
10
47
|
.pop-up-header {
|
|
11
48
|
padding: 6px 8px;
|
|
@@ -100,7 +137,7 @@ import e from"styled-components";import{COLORS as o}from"../../constants/Theme.j
|
|
|
100
137
|
-webkit-box-orient: vertical;
|
|
101
138
|
white-space: pre-line;
|
|
102
139
|
}
|
|
103
|
-
`;const
|
|
140
|
+
`;const i=e.div`
|
|
104
141
|
display: flex;
|
|
105
142
|
flex-direction: column;
|
|
106
143
|
gap: 8px;
|
|
@@ -120,4 +157,13 @@ import e from"styled-components";import{COLORS as o}from"../../constants/Theme.j
|
|
|
120
157
|
display: flex;
|
|
121
158
|
gap: 8px;
|
|
122
159
|
}
|
|
123
|
-
`;
|
|
160
|
+
`;e.div`
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
justify-content: center;
|
|
164
|
+
width: 24px;
|
|
165
|
+
height: 24px;
|
|
166
|
+
background-color: ${o.surface.subdued};
|
|
167
|
+
border-radius: 22px;
|
|
168
|
+
border: 1px solid ${o.stroke.primary};
|
|
169
|
+
`;export{r as SourceInfoDetailsStyle,i as SourceInfoFooterStyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{key:"GENERIC",type:"neutral",tagText:"Generic"},{key:"STORE_INFORMATION",type:"blue",tagText:"Store information"},{key:"SHIPPING_POLICY",type:"positive",tagText:"Shipping policy"},{key:"RETURN_AND_REFUND",type:"purple",tagText:"Returns & refund policy"},{key:"CONTACT_INFO",type:"warning",tagText:"Contact details"},{key:"STORE_LOCATION",type:"grey",tagText:"Store location"},{key:"SALES_AND_OFFERS",type:"purple",tagText:"Offers & rewards"},{key:"PRODUCT_CUSTOMISATION",type:"blue",tagText:"Product customisation"},{key:"PRODUCT_DETAILS",type:"blue",tagText:"Product details"},{key:"PAYMENT_METHODS",type:"positive",tagText:"Payment methods"},{key:"ORDER_TRACKING",type:"warning",tagText:"Order tracking"},{key:"PRODUCT_SEARCH",type:"neutral",tagText:"Product search"},{key:"PURCHASE",type:"blue",tagText:"Purchase"},{key:"CONNECT_TO_AGENT",type:"purple",tagText:"Talk to a person"},{key:"CHECKOUT_ENQUIRY",type:"purple",tagText:"Checkout enquiry"},{key:"ORDER_CANCELLATION",type:"positive",tagText:"Order cancellation"},{key:"ORDER_ENQUIRY",type:"neutral",tagText:"Order enquiry"},{key:"ORDER_MODIFICATION",type:"blue",tagText:"Order modification"},{key:"SUBSCRIPTION_ENQUIRY",type:"warning",tagText:"Subscription enquiry"},{key:"SALES_AND_OFFERS_ISSUES",type:"grey",tagText:"Offer-related enquiries"},{key:"COLLABORATION",type:"positive",tagText:"Collaboration"},{key:"QUIZ_GENERATION",type:"warning",tagText:"Start the quiz"},{key:"SIMILAR_PRODUCT",type:"blue",tagText:"Similar Product"},{key:"EMAIL_COLLECTION",type:"warning",tagText:"Email Collection"},{key:"ADD_TO_CART_SUCCESS",type:"blue",tagText:"Add to Cart Success"},{key:"ADD_TO_CART_SUCCESS_MESSAGE",type:"blue",tagText:"Add to Cart Success Message"},{key:"FEEDBACK",type:"blue",tagText:"Feedback"},{key:"PHONE_NUMBER_COLLECTION",type:"blue",tagText:"Phone no. collection"}];export{e as intentConfig};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import{__awaiter as i}from"../../../_virtual/_tslib.js";import{jsxs as r,Fragment as e,jsx as o}from"react/jsx-runtime";import{useState as t,useEffect as n}from"react";import d from"styled-components";import{Spinner as p}from"../../spinner/Spinner.js";import s from"../../../assets/icons/image.svg.js";const l=d.div`
|
|
2
|
+
margin: 2px;
|
|
3
|
+
border: 1px solid #e0e0e0;
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
div {
|
|
6
|
+
margin: 7px;
|
|
7
|
+
color: grey;
|
|
8
|
+
opacity: 0.6;
|
|
9
|
+
}
|
|
10
|
+
`,c=d.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
width: 100%;
|
|
14
|
+
border: 1px solid #e0e0e0;
|
|
15
|
+
border-radius: 16px;
|
|
16
|
+
padding: 8px;
|
|
17
|
+
`,m=d.div`
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
align-items: center;
|
|
21
|
+
margin: 4px 8px;
|
|
22
|
+
img {
|
|
23
|
+
border-radius: 8px;
|
|
24
|
+
height: 80px;
|
|
25
|
+
width: 80px;
|
|
26
|
+
}
|
|
27
|
+
`,x=d.div`
|
|
28
|
+
overflow: scroll;
|
|
29
|
+
margin: 0px 0px 0px 8px;
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
`,a=d.div`
|
|
32
|
+
height: 1px;
|
|
33
|
+
width: auto;
|
|
34
|
+
margin: 16px;
|
|
35
|
+
background: #e0e0e0;
|
|
36
|
+
`,g=d.div`
|
|
37
|
+
overflow: scroll;
|
|
38
|
+
margin: 0px 0px 0px 8px;
|
|
39
|
+
font-size: 14px;
|
|
40
|
+
img {
|
|
41
|
+
height: 80px;
|
|
42
|
+
width: 80px;
|
|
43
|
+
}
|
|
44
|
+
video {
|
|
45
|
+
height: auto;
|
|
46
|
+
width: 100%;
|
|
47
|
+
}
|
|
48
|
+
`,h=d=>{const{title:h,description:v,imageUrl:f}=d,[u,w]=t(!1),[b,y]=t(!1);return n((()=>{i(void 0,void 0,void 0,(function*(){y(!1);const r=yield function(r){return i(this,void 0,void 0,(function*(){return new Promise((i=>{const e=new Image;e.onload=()=>i(!0),e.onerror=()=>i(!1),e.src=r}))}))}(f);w(r),y(!0)}))}),[u,f]),r(c,{children:[r(m,{children:[b?r(e,{children:[!u&&o(l,{children:o("div",{children:o(s,{width:24})})}),u&&o("img",{src:f,className:"image",alt:"Product"})]}):o(l,{children:o(p,{size:"large"})}),o(x,{children:h})]}),o(a,{}),o(g,{dangerouslySetInnerHTML:{__html:v}})]})};export{h as DescriptionModal};
|
|
@@ -124,12 +124,19 @@ export interface LiveChatCTA {
|
|
|
124
124
|
buttonType: string;
|
|
125
125
|
}
|
|
126
126
|
export interface footerButtonOptionModel {
|
|
127
|
-
title?: string;
|
|
128
|
-
subtitle?: string;
|
|
129
|
-
buttonTitle: string;
|
|
130
|
-
addFaqProps?: any;
|
|
131
|
-
redirectUrl?: string;
|
|
132
127
|
hideAddDataButton?: boolean;
|
|
133
|
-
navigate?: (pagePathKey:
|
|
134
|
-
onClick: (
|
|
128
|
+
navigate?: (pagePathKey: string, params?: object, queryParam?: object, openInNewTab?: boolean) => void;
|
|
129
|
+
onClick: ({ buttonTitle, redirectUrl, addFaqProps, }: {
|
|
130
|
+
buttonTitle: string;
|
|
131
|
+
redirectUrl?: string;
|
|
132
|
+
addFaqProps?: any;
|
|
133
|
+
}) => void;
|
|
134
|
+
}
|
|
135
|
+
export interface ProductSourceData {
|
|
136
|
+
[keys: string]: {
|
|
137
|
+
description: string;
|
|
138
|
+
metafield: string[];
|
|
139
|
+
faqs: CustomDataFaqModel[];
|
|
140
|
+
onEditFaqClick: (faqs: CustomDataFaqModel[]) => void;
|
|
141
|
+
};
|
|
135
142
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CalendarProps } from 'react-calendar';
|
|
3
3
|
import { CSSProperties } from 'styled-components';
|
|
4
|
-
|
|
5
|
-
DEFAULT = "default",
|
|
6
|
-
LARGE = "large"
|
|
7
|
-
}
|
|
4
|
+
import { DateButtonType } from './model';
|
|
8
5
|
export declare const DatePickerWrapper: React.FC<{
|
|
9
6
|
val?: Date | Date[];
|
|
10
7
|
onChange: (val: Date | Date[]) => void;
|