@bikdotai/bik-component-library 0.0.685-beta.0 → 0.0.685-beta.10
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 +3 -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 +3 -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
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("./CheckBox.styled.js"),l=require("../TypographyStyle.js"),t=require("../../constants/Theme.js");const a=s=>{const l=i.useMemo((()=>s.activeColor||t.COLORS.background.positive.vibrant),[s.activeColor]);return e.jsxs("svg",Object.assign({width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",viewBox:s.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("rect",{x:"0",y:"0",width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",rx:"4",fill:s.isDisabled?t.COLORS.content.inactive:l}),!s.isPartial&&e.jsx("svg",Object.assign({width:s.isSmall?"8":"10",height:s.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("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"})})),s.isPartial&&e.jsx("rect",{x:"5",y:s.isSmall?"7":"8",width:s.isSmall?"6":"8",height:"2",rx:"1",fill:t.COLORS.surface.standard})]}))};exports.CheckBox=r=>{var o;const[c,d]=i.useState(r.isChecked||!1),[n,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("./CheckBox.styled.js"),l=require("../TypographyStyle.js"),t=require("../../constants/Theme.js");const a=s=>{const l=i.useMemo((()=>s.activeColor||t.COLORS.background.positive.vibrant),[s.activeColor]);return e.jsxs("svg",Object.assign({width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",viewBox:s.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("rect",{x:"0",y:"0",width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",rx:"4",fill:s.isDisabled?t.COLORS.content.inactive:l}),!s.isPartial&&e.jsx("svg",Object.assign({width:s.isSmall?"8":"10",height:s.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("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"})})),s.isPartial&&e.jsx("rect",{x:"5",y:s.isSmall?"7":"8",width:s.isSmall?"6":"8",height:"2",rx:"1",fill:t.COLORS.surface.standard})]}))};exports.CheckBox=r=>{var o;const[c,d]=i.useState(r.isChecked||!1),[n,b]=i.useState(r.isPartiallyChecked||!1),[h,x]=i.useState(r.isDisabled||!1),[C,S]=i.useState(!1),[u,O]=i.useState(!1);i.useEffect((()=>{d(r.isChecked)}),[r.isChecked]),i.useEffect((()=>{x(r.isDisabled||!1)}),[r.isDisabled]),i.useEffect((()=>{b(r.isPartiallyChecked||!1)}),[r.isPartiallyChecked]);return e.jsxs(s.CheckboxContainer,Object.assign({onClick:e=>{var i;if(!r.isDisabled){const s=!c;n?b(!n):d(s),null===(i=r.onValueChange)||void 0===i||i.call(r,s,r.value,e)}},onMouseEnter:()=>S(!r.skipHoverState),onMouseLeave:()=>S(!1),onMouseDown:()=>O(!r.skipHoverState),onMouseUp:()=>O(!1),isDisabled:h,enableHover:r.enableHover,style:null!==(o=r.style)&&void 0!==o?o:{}},{children:[e.jsx(s.CheckboxIcon,Object.assign({checked:c,hovered:C,clicked:u,isDisabled:h,size:r.size,borderColor:r.checkboxBorderColor},{children:c&&e.jsx(a,{isPartial:n||!1,isDisabled:h,isSmall:"SMALL"===r.size,activeColor:null==r?void 0:r.activeColor})})),r.label?r.boldOnChecked&&c||r.bold?"DEFAULT"===r.labelSize?e.jsx(l.TitleRegular,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})):e.jsx(l.TitleSmall,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})):"SMALL"===r.size||"SMALL"===r.labelSize?e.jsx(l.BodySecondary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})):e.jsx(l.BodyPrimary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})):e.jsx(e.Fragment,{}),r.rightComponent]}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),i=require("react-toastify"),o=require("./CodeBlock.styled.js"),s=require("./CodeBlockHelper.js"),n=require("./types.js");function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}exports.CodeBlock=c=>{let{code:d="",language:l=n.CodeLanguage.JAVASCRIPT,title:u="",showTitle:h=!0,showLineNumbers:j=!0,maxHeight:g="400px",maxWidth:p,theme:m="dark"}=c;const[f,b]=r.useState(!1),[x,v]=r.useState(d);r.useEffect((()=>{let t=!0;return e.__awaiter(void 0,void 0,void 0,(function*(){try{const r=yield(e=`./languageSpecificFormatting/${l}.ts`,Promise.resolve().then((function(){return a(require(e))})));if((null==r?void 0:r.format)&&t)return void v(r.format(d))}catch(e){}var e;t&&v(d)})),()=>{t=!1}}),[d,l]);const C=x.split("\n");return t.jsxs(o.Container,Object.assign({themeMode:m,maxWidth:p},{children:[t.jsxs(o.Header,Object.assign({themeMode:m},{children:[t.jsxs(o.TitleSection,{children:[h&&u&&t.jsx(o.Title,Object.assign({themeMode:m},{children:u})),t.jsx(o.LanguageBadge,Object.assign({bg:(y=l,{javascript:"#e6cd12ff",python:"#3776ab",java:"#ed8b00",css:"#1572b6",html:"#e34c26",json:"#000000"}[y.toLowerCase()]||("dark"===m?"#6e7681":"#656d76")),color:(e=>{const t={javascript:"#000"};return(null==t?void 0:t[e.toLowerCase()])||"#fff"})(l)},{children:l}))]}),t.jsx(o.CopyButton,Object.assign({themeMode:m,onClick:()=>e.__awaiter(void 0,void 0,void 0,(function*(){try{yield navigator.clipboard.writeText(d),b(!0),i.toast.success("Code copied to clipboard!",{position:"top-right",autoClose:2e3,hideProgressBar:!0}),setTimeout((()=>b(!1)),2e3)}catch(e){i.toast.error("Failed to copy code",{position:"top-right",autoClose:2e3})}}))},{children:f?t.jsx(t.Fragment,{children:"✓ Copied"}):t.jsx(t.Fragment,{children:"Copy"})}))]})),t.jsxs(o.CodeContainer,Object.assign({maxHeight:g},{children:[j&&t.jsx(o.LineNumbers,Object.assign({themeMode:m},{children:C.map(((e,r)=>t.jsx("div",{children:r+1},r)))})),t.jsx(o.Code,Object.assign({themeMode:m},{children:C.map(((e,r)=>t.jsx("div",{style:{minHeight:e.trim()?"20px":"0px"},dangerouslySetInnerHTML:{__html:s.highlightCode(e,l)||" "}},r)))}))]}))]}));var y};
|
|
@@ -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
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("styled-components"));const t=r.default.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=r.default.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
|
+
`;r.default.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
gap: 6px;
|
|
22
|
+
align-items: center;
|
|
23
|
+
`,r.default.div`
|
|
24
|
+
width: 12px;
|
|
25
|
+
height: 12px;
|
|
26
|
+
border-radius: 50%;
|
|
27
|
+
background-color: ${e=>{let{color:r}=e;return r}};
|
|
28
|
+
`;const d=r.default.div`
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: 8px;
|
|
32
|
+
flex: 1;
|
|
33
|
+
margin-left: 12px;
|
|
34
|
+
`,n=r.default.span`
|
|
35
|
+
color: ${e=>{let{themeMode:r}=e;return"dark"===r?"#f0f6fc":"#24292f"}};
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
font-weight: 500;
|
|
38
|
+
`,a=r.default.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
|
+
`,l=r.default.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
|
+
`,i=r.default.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
|
+
`,f=r.default.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
|
+
`,p=r.default.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
|
+
`;exports.Code=p,exports.CodeContainer=i,exports.Container=t,exports.CopyButton=l,exports.Header=o,exports.LanguageBadge=a,exports.LineNumbers=f,exports.Title=n,exports.TitleSection=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const highlightCode: (code: string, lang: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.highlightCode=(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};
|
|
@@ -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
|
+
"use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodeLanguage=void 0,(e=exports.CodeLanguage||(exports.CodeLanguage={})).JAVASCRIPT="javascript",e.PYTHON="python",e.JAVA="java",e.CSS="css",e.HTML="html",e.JSON="json";
|
|
@@ -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
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("../../assets/icons/chevronDown.svg.js"),r=require("react"),t=require("./CountryCodePicker.modal.js"),n=require("./CountryCodePicker.styled.js"),s=require("../dropdown/DropdownPopover/index.js");require("../dropdown/Dropdown.js"),require("../dropdown/ChipDropdown.js"),require("../zeroState/ZeroState.js");var d=require("../TypographyStyle.js"),i=require("../../constants/Theme.js");require("../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../checkBox/CheckBox.styled.js"),require("../list-item/ListItem.js"),require("../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../button/Button.js"),require("../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../icon-button/IconButton.js"),require("../input/Input.js"),require("../dropdown/MenuItem/MenuItem.js");exports.CountryCodePicker=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("../../assets/icons/chevronDown.svg.js"),r=require("react"),t=require("./CountryCodePicker.modal.js"),n=require("./CountryCodePicker.styled.js"),s=require("../dropdown/DropdownPopover/index.js");require("../dropdown/Dropdown.js"),require("../dropdown/ChipDropdown.js"),require("../zeroState/ZeroState.js");var d=require("../TypographyStyle.js"),i=require("../../constants/Theme.js");require("../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../checkBox/CheckBox.styled.js"),require("../list-item/ListItem.js"),require("../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../button/Button.js"),require("../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../icon-button/IconButton.js"),require("../input/Input.js"),require("../dropdown/MenuItem/MenuItem.js");exports.CountryCodePicker=l=>{var c,a,u,p,y,m,j;const[v,h]=r.useState(null!==(c=l.selectedCountry)&&void 0!==c?c:{name:"India",dial:"+91",code:"IN"}),w=`https://flagcdn.com/${null===(a=v.code)||void 0===a?void 0:a.toLowerCase()}.svg`;r.useEffect((()=>{l.selectedCountry&&h(l.selectedCountry)}),[null===(u=l.selectedCountry)||void 0===u?void 0:u.code]);return e.jsx(s.DropdownPopover,Object.assign({version:l.version,isSearchable:!0,width:null!==(p=l.popoverWidth)&&void 0!==p?p:"200px",placement:null!==(y=l.placement)&&void 0!==y?y:"bottom-start",strategy:null!==(m=l.placementStrategy)&&void 0!==m?m:"absolute",options:t.CountriesData.map((o=>{var r,t,s,c;const a=`https://flagcdn.com/${null===(r=o.code)||void 0===r?void 0:r.toLowerCase()}.svg`;return{value:o.code,label:o.dial,searchKey:o.name,customComponent:e.jsxs(n.StyledCountryPickerOption,{children:[!l.hideFlagImage&&e.jsx("img",{src:a,className:"country-flag__option",alt:o.name}),e.jsxs(d.BodySecondary,Object.assign({style:null!==(t=l.countryTextStyle)&&void 0!==t?t:{}},{children:[e.jsx("span",Object.assign({style:{color:null!==(s=l.codeColor)&&void 0!==s?s:i.COLORS.text.primary}},{children:o.code}))," ",e.jsx("span",Object.assign({style:{color:null!==(c=l.dialColor)&&void 0!==c?c:i.COLORS.text.primary}},{children:o.dial}))]}))]}),selected:v.code===o.code}})),disabled:l.disabled,onSelect:e=>{const o=t.CountriesData.filter((o=>o.code===e.value));h(o[0]),l.onCountrySelect(o[0])}},{children:e.jsxs(n.StyledCountryPickerWrapper,Object.assign({height:l.height,style:l.containerStyles,onClick:()=>{var e;console.log("hello"),null===(e=l.onDropdownClick)||void 0===e||e.call(l)}},{children:[e.jsxs("div",Object.assign({className:"content__wrapper"},{children:[!l.hideFlagImage&&e.jsx("img",{src:w,className:"country-flag__selected-option",alt:v.name}),e.jsx(d.BodySecondary,Object.assign({style:null!==(j=l.countryTextStyle)&&void 0!==j?j:{}},{children:v.dial}))]})),e.jsx(o.default,{width:24,height:24,color:i.COLORS.content.primary})]}))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/calendar.svg.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/calendar.svg.js"),r=require("../../../assets/icons/chevronDown.svg.js"),s=require("react"),a=require("react-popper"),i=require("../../datePicker/DatePicker.js");require("react-calendar");var n=require("../../../hooks/useOutside.js"),u=require("../../../utils/DateUtils.js");require("../../../constants/Theme.js"),require("../../TypographyStyle.js"),require("../../datePicker/DatePickerWrapper.styled.js"),require("../../datePicker/model.js");var o=require("../../dropdown/Common.styled.js"),d=require("../../dropShadow/DropShadow.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(s);exports.default=c=>{const[j,p]=s.useState(null),[h,m]=s.useState(null),[y,D]=s.useState(!1),{styles:f,attributes:g}=a.usePopper(j,h,{placement:c.placement}),q=l.default.useRef();return n.useOutside(q,(()=>{D(!1)})),e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({className:"date-preview",ref:p,onClick:()=>{D(!y)}},{children:[e.jsx(t.default,{width:24,height:24}),e.jsx("span",Object.assign({style:{marginLeft:8}},{children:u.default.onlyDateFormat(c.customDate,"dd MMM yyyy")})),e.jsx(r.default,{style:{marginLeft:"auto"},width:22,height:22})]})),y&&e.jsx(o.OpenDropdownContainer,Object.assign({ref:m,style:Object.assign(Object.assign({},f.popper),{zIndex:3})},g.popper,{children:e.jsx("div",Object.assign({ref:q},{children:e.jsx(d.DropShadow,Object.assign({level:"z2",position:"down",style:{borderRadius:4}},{children:e.jsx(i.DatePicker,{selectedDate:c.customDate||new Date,selectRange:!1,onSelectDate:e=>{D(!1),c.setCustomDate(e)},minDate:c.minDate})}))}))}))]})};
|
|
@@ -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
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("../../node_modules/@bikdotai/bik-models/growth/models/bik-store.js");var t=require("../../assets/icons/alert_triangle.svg.js"),o=require("../../assets/icons/plus.svg.js"),i=require("react"),n=require("../../constants/Theme.js"),s=require("../button/Button.js"),r=require("../shimmer/ShimmerComponent/BikShimmer.js"),a=require("../TypographyStyle.js"),d=require("./DataSourcePanel.style.js"),l=require("../../_virtual/bik-store.js");const c=i.memo((c=>{const{appType:h,sourceIntent:g,hideHeading:v,messageSource:m,trainingSourceCount:y={},ShowTrainingDataSource:b={},faqCount:T,ChecklistType:j,footerButtonOption:x,isFooterLoading:A,reasonForAiGeneratedResponse:_,showAiResponseReason:O}=c,C=b,[R,S]=i.useState(!0),[f,I]=i.useState(!0),F="/bik-ai/training",[w,N]=i.useState({buttonTitle:"",redirectUrl:"",addFaqProps:{}}),[k,E]=i.useState({title:"",subTitle:""}),q=i.useMemo((()=>{const e=(null==y?void 0:y[g])||0;return e<=1?"There is "+e+"data source added to the identified intent":`There are ${e} data sources added to the identified intent`}),[y,g]),D=()=>{var e;(null==w?void 0:w.redirectUrl)?window.open(`${window.location.origin}${null==w?void 0:w.redirectUrl}`,"_self"):Object.keys(null!==(e=null==w?void 0:w.addFaqProps)&&void 0!==e?e:{}).length>0?null==x||x.onClick(w):(null==x?void 0:x.navigate)&&(null==x||x.navigate("Training",h==l.__exports.ApplicationType.MANIFEST?{tab:"/custom_data"}:{},{},!0))};return i.useEffect((()=>{var e,t,o,i;if(g){if(null===(e=null==m?void 0:m.sources)||void 0===e?void 0:e.length){const e=m.sources[0];if(C[g])g===j.ORDER_ENQUIRY&&I(!1);else{let n=null==e?void 0:e.insights,s="";switch(g){case j.PRODUCT_DETAILS:"Product reviews"!==(null==e?void 0:e.title)&&(n=`${T||"No"} FAQs added for this product`,s="Add product-specific information via FAQs to improve responses",N({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 j.ORDER_MODIFICATION:n=(null==y?void 0:y[g])?void 0:"Customers who are looking to modify their orders would be redirected to your live agents via the agent handover flow.",n&&N({buttonTitle:h==l.__exports.ApplicationType.MANIFEST?"Manage agent handover":"Add relevant data",redirectUrl:h==l.__exports.ApplicationType.MANIFEST?"/customise?tab=AgentHandover":F,addFaqProps:{}});break;case j.ORDER_CANCELLATION:n=(null==y?void 0:y[g])?void 0:"Customers who are looking to cancel their orders would be redirected to your live agents via the agent handover flow.",N({buttonTitle:h==l.__exports.ApplicationType.MANIFEST?"Manage agent handover":"Add relevant data",redirectUrl:h==l.__exports.ApplicationType.MANIFEST?"/customise?tab=AgentHandover":F,addFaqProps:{}});break;case j.ORDER_TRACKING:if("ORDER_NOT_FOUND"===(null==e?void 0:e.subIntent))break;N({buttonTitle:h==l.__exports.ApplicationType.MANIFEST?"Add order tracking link":"Add relevant data",redirectUrl:h==l.__exports.ApplicationType.MANIFEST?"/training/order-management":F,addFaqProps:{}});break;case j.PRODUCT_SEARCH:if("QUIZ"===(null==e?void 0:e.type))break;if(-1!==(null===(i=null===(o=null===(t=null==m?void 0:m.sources)||void 0===t?void 0:t[0])||void 0===o?void 0:o.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."}E({title:null!=n?n:"",subTitle:s})}}(C[g]||[j.PRODUCT_DETAILS,j.ORDER_MODIFICATION,j.ORDER_CANCELLATION,j.ORDER_TRACKING].includes(g))&&S(!1)}}),[null==m?void 0:m.messageId,y,g,null==m?void 0:m.sources,C,j,T,h,m]),e.jsx(d.SourceInfoFooterStyle,{children:A?e.jsx(e.Fragment,{children:e.jsx(r.BikShimmer,{gap:"8px",direction:"column",boxes:[{height:"20px",width:"300px"},{height:"80px",width:"300px"}]})}):e.jsx(e.Fragment,{children:!(null==k?void 0:k.title)&&y&&g in y?e.jsxs(e.Fragment,{children:[e.jsx(u,{hideHeading:null!=v&&v}),e.jsx(p,{reason:_||"",showAiResponseReason:null!=O&&O}),e.jsxs("div",Object.assign({className:"source_info_details "+(y[g]>0?"":"no_data_source")},{children:[y[g]>0&&f?e.jsxs(e.Fragment,{children:[e.jsx(a.BodyCaption,{children:q}),e.jsx(a.BodyCaption,Object.assign({color:n.COLORS.content.secondary},{children:"Improve responses by adding more data sources for the identified intent"}))]}):f&&e.jsxs("div",Object.assign({className:"no_data_source_title"},{children:[e.jsx(t.default,{width:15,height:15,color:n.COLORS.content.negative,style:{marginTop:2}}),e.jsx(a.BodyCaption,{children:"No data sources added to the identified link"})]})),!x||x.hideAddDataButton||R?e.jsx(e.Fragment,{}):e.jsx(s.Button,{size:"small",buttonType:"tertiary",LeadingIcon:o.default,buttonText:(null==w?void 0:w.buttonTitle.length)>0?null==w?void 0:w.buttonTitle:"Add relevant data",matchParentWidth:!0,onClick:()=>D(),style:{backgroundColor:"unset"}})]}))]}):e.jsxs(e.Fragment,{children:[e.jsx(u,{hideHeading:null!=v&&v}),e.jsx(p,{reason:_||"",showAiResponseReason:null!=O&&O}),e.jsxs("div",Object.assign({className:"source_info_details"},{children:[f&&e.jsxs(e.Fragment,{children:[e.jsx(a.BodyCaption,{children:null==k?void 0:k.title}),e.jsx(a.BodyCaption,Object.assign({color:n.COLORS.content.secondary},{children:null==k?void 0:k.subTitle}))]}),!x||x.hideAddDataButton||R?e.jsx(e.Fragment,{}):e.jsx(s.Button,{size:"small",buttonType:"tertiary",LeadingIcon:o.default,buttonText:(null==w?void 0:w.buttonTitle.length)>0?null==w?void 0:w.buttonTitle:"Add relevant data",matchParentWidth:!0,onClick:()=>D(),style:{backgroundColor:"unset"}})]}))]})})})})),u=i.memo((t=>t.hideHeading?null:e.jsx(a.BodyCaption,Object.assign({color:n.COLORS.content.secondary},{children:"Training insights"})))),p=i.memo((t=>{const[o,s]=i.useState(!1),r=t.reason&&t.reason.length>50,d=r&&!o?t.reason.substring(0,50)+"...":t.reason;return t.showAiResponseReason?e.jsxs("div",Object.assign({className:"source_info_details"},{children:[e.jsx(a.BodyCaption,Object.assign({color:n.COLORS.content.primary,className:"why_ai_gave_this_response"},{children:"Here’s why your AI gave this response"})),e.jsxs(a.BodyCaption,Object.assign({color:n.COLORS.content.secondary,className:"clamp-text"},{children:[d||"No reason provided for this response.",r&&e.jsx(a.BodyCaption,Object.assign({color:n.COLORS.content.brand,style:{cursor:"pointer",textDecoration:"underline",marginTop:"4px"},onClick:()=>s(!o)},{children:o?"Show less":"Show more"}))]}))]})):e.jsx(e.Fragment,{})}));p.displayName="WhyAiGaveThisResponse",u.displayName="TrainingInsightsHeading",c.displayName="SourceInfoFooter",exports.default=c;
|
|
@@ -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
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/boxV2.svg.js"),s=require("../../assets/icons/cross.svg.js"),i=require("../../assets/icons/edit.svg.js"),o=require("../../assets/icons/filePdf.svg.js"),n=require("../../assets/icons/help.svg.js"),a=require("../../assets/icons/info.svg.js"),r=require("../../assets/icons/openai.svg.js"),l=require("../../assets/icons/plus.svg.js"),d=require("../../assets/icons/redirect.svg.js"),c=require("../../assets/icons/text_t9.svg.js"),u=require("../../assets/icons/website.svg.js"),p=require("react"),h=require("../../constants/Theme.js"),g=require("../button/Button.js"),x=require("../icon-button/IconButton.js"),C=require("../shimmer/ShimmerComponent/BikShimmer.js"),y=require("../tag/Tag.js"),j=require("../tooltips/Tooltip.js"),v=require("../TypographyStyle.js"),m=require("./DataSourceInfoFooter.js"),f=require("./DataSourcePanel.style.js"),L=require("./model.js");exports.DataSourcePanel=O=>{var S,T;const{storeId:I,messageSource:b,setMessageSourcePanel:w,hideCloseButton:E,faqCount:D=0,isSourceInfoFetched:q,allSourceInfoDetail:B,ChecklistType:N,IntentComponentMap:k,title:R,zeroStateButton:F,editableSources:_,redirect:A,trainingSourceCount:P,ShowTrainingDataSource:K,footerButtonOption:W}=O,{sources:M}=b,H=["blog","article","page","policy"],[Q,$]=p.useState(!1),[U,X]=p.useState(!1);p.useEffect((()=>{var e,t,s,i;(null==b?void 0:b.messageId)&&($(!0),setTimeout((()=>$(!1)),200),X(!1!==(null===(t=null===(e=b.sources)||void 0===e?void 0:e[0])||void 0===t?void 0:t.isTrainable)||!!(null===(i=null===(s=b.sources)||void 0===s?void 0:s[0])||void 0===i?void 0:i.insights)))}),[null==b?void 0:b.messageId]);const z=e=>!(0!==e.length&&!(null==b?void 0:b.isUnsatisfactoryAnswer)),G=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var s;return"custom"==e?e=L.CustomDataType.FILES:H.includes(e)?e=L.CustomDataType.FETCHED_LINKS:"url"==e?e=L.CustomDataType.WEBSITE_LINKS:"text"===e?e=L.CustomDataType.TEXTS:"faq"===e&&(e=L.CustomDataType.FAQ),t?e:null===(s=null==e?void 0:e.toLowerCase())||void 0===s?void 0:s.replace(/_/g," ")};return Q||!q?e.jsx(f.SourceInfoDetailsStyle,{children:e.jsx(C.BikShimmer,{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.jsx(e.Fragment,{children:e.jsx(f.SourceInfoDetailsStyle,{children:!!(null==M?void 0:M.length)&&e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({className:"pop-up-header",style:{display:"flex",flexDirection:"column",paddingBottom:"12px"}},{children:[!!R&&e.jsx(v.TitleSmall,{children:R}),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",alignItems:"center"}},{children:[e.jsx(v.BodyCaption,Object.assign({color:h.COLORS.content.secondary},{children:"Intent"})),null!==(S=k[b.intent])&&void 0!==S?S:k.GENERIC,!E&&e.jsx("div",Object.assign({style:{display:"flex",marginLeft:"auto",cursor:"pointer"},onClick:()=>w(void 0)},{children:e.jsx(s.default,{height:20,width:20,color:h.COLORS.content.secondary})}))]})),z(M)?e.jsx("div",Object.assign({style:{display:"flex",margin:"auto",justifyContent:"center",alignItems:"center",height:"calc(100vh - 300px)"}},{children:(()=>{var t,s;return e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:"0px 30px",gap:"8px"}},{children:[e.jsx("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"12px",backgroundColor:`${h.COLORS.background.negative.light}`,borderRadius:"100px"}},{children:e.jsx(a.default,{width:24,height:24,color:h.COLORS.stroke.negative.vibrant})})),e.jsx("div",Object.assign({style:{justifyContent:"center",alignItems:"center",marginBottom:"-4px"}},{children:e.jsx(v.TitleSmall,{children:"Insufficient data"})})),e.jsx(v.BodySecondary,Object.assign({color:h.COLORS.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"})),F&&e.jsx("div",Object.assign({style:{display:"flex",width:"100%"}},{children:e.jsx(g.Button,{LeadingIcon:null!==(t=F.leadingIcon)&&void 0!==t?t:l.default,buttonText:null!==(s=F.title)&&void 0!==s?s:"Add FAQ",buttonType:"secondary",size:"small",matchParentWidth:!0,onClick:()=>{F.onClick()}})}))]}))})()})):e.jsx(y.Tag,{LeadingIcon:a.default,version:"2.0",type:"grey",theme:"light",alignIcon:"start",contentPadding:12,tagText:b.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(M)&&e.jsx("div",Object.assign({className:"info-container"},{children:e.jsx("div",Object.assign({style:{padding:"0 8px",maxWidth:"100%"}},{children:M.map(((s,a)=>{var l,p,g,C,y,m,f,O,S,T,I,b,w,E;const D=G(s.type||s.subTitle||"OpenAI"),q=G(s.type||s.subTitle||"OpenAI",!0),k=(R=D)?"faq"==R.toLocaleLowerCase()?"FAQ":"openai"==R.toLocaleLowerCase()?"OPENAI":"files"==R.toLocaleLowerCase()?"PDF":"texts"==R.toLocaleLowerCase()?"Custom text":((R=(R=R.charAt(0).toUpperCase()+R.slice(1).toLowerCase()).replace("_"," ")).endsWith("s")&&(R=R.slice(0,-1)),R.replace("Website","Manual")):"";var R;const F=null==_?void 0:_.includes(q),P="Products"===s.subTitle?B[null!==(l=s.productId)&&void 0!==l?l:"Products"]:B[null!==(p=s.docId)&&void 0!==p?p:""],K=q.toLowerCase()===(null===(g=L.CustomDataType.FAQ)||void 0===g?void 0:g.toLowerCase())?"faq"===(null===(C=s.title)||void 0===C?void 0:C.toLowerCase())?s.subTitle:s.title:q.toLowerCase()===(null===(y=L.CustomDataType.FILES)||void 0===y?void 0:y.toLowerCase())||q.toLowerCase()===(null===(m=L.CustomDataType.FETCHED_LINKS)||void 0===m?void 0:m.toLowerCase())||q.toLowerCase()===(null===(f=L.CustomDataType.TEXTS)||void 0===f?void 0:f.toLowerCase())?s.title:q.toLowerCase()===(null===(O=L.CustomDataType.WEBSITE_LINKS)||void 0===O?void 0:O.toLowerCase())?s.title.split("/")[s.title.split("/").length-1].replace(/[^\w\s]/gi," ").replace(/^(.)(.*)$/,((e,t,s)=>t.toUpperCase()+s)):s.intent===N.EMAIL_COLLECTION?k:s.title,W="faq"===q.toLowerCase()?null===(S=null==P?void 0:P.data)||void 0===S?void 0:S.answer:q.toLowerCase()===(null===(T=L.CustomDataType.FETCHED_LINKS)||void 0===T?void 0:T.toLowerCase())||q.toLowerCase()===(null===(I=L.CustomDataType.WEBSITE_LINKS)||void 0===I?void 0:I.toLowerCase())||q.toLowerCase()===(null===(b=L.CustomDataType.TEXTS)||void 0===b?void 0:b.toLowerCase())?null!==(E=null===(w=null==P?void 0:P.data)||void 0===w?void 0:w.fileContentText)&&void 0!==E?E:"":s.intent===N.EMAIL_COLLECTION?"Collect leads before replying to messages":"";return e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px",padding:"24px 0px",borderBottom:`1px solid ${h.COLORS.stroke.primary}`}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",justifyContent:"space-between",alignItems:"center"}},{children:[e.jsx("div",Object.assign({style:{flex:1}},{children:e.jsx(j.Tooltip,Object.assign({body:K,placement:"top"},{children:e.jsx(v.BodySecondary,Object.assign({style:q==L.CustomDataType.FETCHED_LINKS||q==L.CustomDataType.WEBSITE_LINKS?{cursor:"pointer",textDecoration:"underline"}:{},color:h.COLORS.content.primary,className:"clamp-title",onClick:()=>q==L.CustomDataType.FETCHED_LINKS||q==L.CustomDataType.WEBSITE_LINKS?A(s):{}},{children:K}))}))})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"4px",flex:"none"}},{children:[s.intent!==N.EMAIL_COLLECTION&&e.jsxs(e.Fragment,{children:[(H=D,"products"==H?e.jsx(t.default,{height:16,width:16,color:h.COLORS.content.secondary}):"files"==H?e.jsx(o.default,{height:16,width:16,color:h.COLORS.content.secondary}):"website links"==H||"fetched links"==H?e.jsx(u.default,{height:16,width:16,color:h.COLORS.content.secondary}):"faq"==H?e.jsx(n.default,{height:16,width:16,color:h.COLORS.content.secondary}):"texts"==H?e.jsx(c.default,{height:16,width:16,color:h.COLORS.content.secondary}):e.jsx(r.default,{height:16,width:16,color:h.COLORS.content.secondary})),e.jsx(v.BodyCaption,Object.assign({color:h.COLORS.content.secondary},{children:k}))]}),(s.link||s.docId)&&e.jsx("div",Object.assign({style:{cursor:"pointer",marginLeft:"4px"}},{children:F?e.jsx(x.IconButton,{Icon:i.default,height:16,width:16,bordered:!0,onClick:()=>null==P?void 0:P.onEditClick(P.data,P.type),disabled:!P,disabledTooltip:"This source is deleted"}):e.jsx(x.IconButton,{Icon:d.default,height:16,width:16,bordered:!0,disabled:"custom"===s.type&&!P,disabledTooltip:"This source is deleted",onClick:()=>A(s)})}))]}))]})),(null!=W?W:"").trim()&&e.jsx("div",Object.assign({style:{padding:"4px 8px",border:`1px dashed ${h.COLORS.stroke.primary}`,borderRadius:"4px",backgroundColor:h.COLORS.surface.subdued}},{children:e.jsx(v.BodyCaption,Object.assign({color:h.COLORS.content.primary,className:"clamp-description"},{children:(M=null!=W?W:"",M.replace(/(<([^>]+)>)/gi,"")).trim()}))}))]}),`info-${a}`);var M,H}))}))})),U&&!z(M)&&e.jsx("div",Object.assign({className:"footer"},{children:e.jsx(m.default,{storeId:I,messageSource:b,sourceIntent:null!==(T=b.intent)&&void 0!==T?T:N.GENERIC,faqCount:D,trainingSourceCount:P,ShowTrainingDataSource:K,ChecklistType:N,footerButtonOption:W})}))]})})})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("../../node_modules/@bikdotai/bik-models/growth/models/bik-store.js");var t=require("../../assets/icons/boxV2.svg.js"),s=require("../../assets/icons/chevronDownOutline.svg.js"),i=require("../../assets/icons/chevronUpOutline.svg.js"),o=require("../../assets/icons/cross.svg.js"),n=require("../../assets/icons/edit.svg.js"),l=require("../../assets/icons/filePdf.svg.js"),a=require("../../assets/icons/help.svg.js"),r=require("../../assets/icons/info.svg.js"),d=require("../../assets/icons/openai.svg.js"),c=require("../../assets/icons/plus.svg.js"),u=require("../../assets/icons/redirect.svg.js"),p=require("../../assets/icons/text_t9.svg.js"),g=require("../../assets/icons/website.svg.js"),h=require("react"),x=require("../../constants/Theme.js"),j=require("../button/Button.js"),C=require("../icon-button/IconButton.js"),y=require("../shimmer/ShimmerComponent/BikShimmer.js"),O=require("../side-modal/SideModal.js"),m=require("../tag/Tag.js"),v=require("../tooltips/Tooltip.js"),f=require("../TypographyStyle.js"),S=require("./DataSourceInfoFooter.js"),T=require("./DataSourcePanel.style.js"),I=require("./IntentConfig.js"),b=require("./Modals/DescriptionModal.js"),L=require("./model.js"),E=require("../../_virtual/bik-store.js");exports.DataSourcePanel=w=>{var D,N;const{appType:R,storeId:_,messageSource:A,setMessageSourcePanel:F,hideCloseButton:q,isSourceInfoFetched:B,allSourceInfoDetail:k,ChecklistType:P,title:M,zeroStateButton:U,editableSources:K,preFillTrainingSourceCount:W,redirect:H,footerButtonOption:$,fetchTrainingSourceCount:Q,fetchProductFAQCount:G,productSourceData:Y,reasonForAiGeneratedResponse:z,showAiResponseReason:X}=w,{sources:V}=A,J=["blog","article","page","policy"],[Z,ee]=h.useState(!1),[te,se]=h.useState(!1),[ie,oe]=h.useState(!1),[ne,le]=h.useState(0),[ae,re]=h.useState(),[de,ce]=h.useState(null!=W?W:{}),[ue,pe]=h.useState(!1),[ge,he]=h.useState(!1),xe={};I.intentConfig.forEach((t=>{let{key:s,type:i,tagText:o}=t;P[s]&&(xe[P[s]]=e.jsx(m.Tag,{theme:"light",type:i,tagText:o,cursor:"pointer"}))}));const je=V.filter((e=>"PRODUCTS"==e.type||"Products"==e.subTitle||e.productId)),Ce=V.filter((e=>"PRODUCTS"!=e.type&&"Products"!=e.subTitle&&!e.productId)),ye=h.useMemo((()=>{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=>{P[t]&&(e[P[t]]=P[t])})),["COLLABORATION","SUBSCRIPTION_ENQUIRY"].forEach((t=>{e[t]=t})),e}),[P]);h.useEffect((()=>{var e,t,s,i;if(!(null==A?void 0:A.messageId))return;ee(!0),se(!0),oe(!1!==(null===(t=null===(e=A.sources)||void 0===e?void 0:e[0])||void 0===t?void 0:t.isTrainable)||!!(null===(i=null===(s=A.sources)||void 0===s?void 0:s[0])||void 0===i?void 0:i.insights));const o=A.sources.filter((e=>!!e.productId)).map((e=>e.productId)),n=Array.from(new Set(o)).filter((e=>!!e));G(_,n).then((e=>le(e))).then((()=>{W?(ce(W),setTimeout((()=>{ee(!1),se(!1)}),100)):(setTimeout((()=>ee(!1)),100),Q(_).then((e=>ce(e))).then((()=>setTimeout((()=>{se(!1)}),100))))}))}),[G,Q,null==A?void 0:A.messageId,A.sources,W,_]);const Oe=e=>!!(e&&0===e.length||(null==A?void 0:A.isUnsatisfactoryAnswer)),me=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var s;return"custom"==e?e=L.CustomDataType.FILES:J.includes(e)?e=L.CustomDataType.FETCHED_LINKS:"url"==e?e=L.CustomDataType.WEBSITE_LINKS:"text"===e?e=L.CustomDataType.TEXTS:"faq"===e&&(e=L.CustomDataType.FAQ),t?e:null===(s=null==e?void 0:e.toLowerCase())||void 0===s?void 0:s.replace(/_/g," ")},ve=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")):"",fe=s=>"products"==s||"product"==s?e.jsx(t.default,{height:16,width:16,color:x.COLORS.content.secondary}):"files"==s?e.jsx(l.default,{height:16,width:16,color:x.COLORS.content.secondary}):"website links"==s||"fetched links"==s?e.jsx(g.default,{height:16,width:16,color:x.COLORS.content.secondary}):"faq"==s?e.jsx(a.default,{height:16,width:16,color:x.COLORS.content.secondary}):"texts"==s?e.jsx(p.default,{height:16,width:16,color:x.COLORS.content.secondary}):e.jsx(d.default,{height:16,width:16,color:x.COLORS.content.secondary}),Se=e=>{const t=e.replace(/(<([^>]+)>)/gi,""),s=document.createElement("textarea");return s.innerHTML=t,s.value};if(Z||!B)return e.jsx(T.SourceInfoDetailsStyle,{children:e.jsx(y.BikShimmer,{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 Te=t=>{const{title:o,count:n,isExpanded:l,onToggle:a,children:r}=t;return e.jsxs("div",{children:[e.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",cursor:"pointer"},onClick:a},{children:[e.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[e.jsx(f.BodyCaption,Object.assign({style:{fontWeight:"600"}},{children:o})),R===E.__exports.ApplicationType.MANIFEST?e.jsx("div",Object.assign({style:{backgroundColor:x.COLORS.surface.subdued,color:x.COLORS.content.secondary,padding:"2px 8px",borderRadius:"12px",fontSize:"12px",fontWeight:"500"}},{children:n})):e.jsx(e.Fragment,{})]})),e.jsx(e.Fragment,{children:R===E.__exports.ApplicationType.BIK?e.jsx(e.Fragment,{}):l?e.jsx(s.default,{width:20,height:20,color:x.COLORS.content.primary}):e.jsx(i.default,{width:20,height:20,color:x.COLORS.content.primary})})]})),l&&r]})};return e.jsxs(e.Fragment,{children:[e.jsx(T.SourceInfoDetailsStyle,{children:e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({className:"pop-up-header",style:{display:"flex",flexDirection:"column",paddingBottom:"12px"}},{children:[!!M&&e.jsx(f.TitleSmall,{children:M}),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",alignItems:"center"}},{children:[e.jsx(f.BodyCaption,Object.assign({color:x.COLORS.content.secondary},{children:"Intent"})),null!==(D=xe[A.intent])&&void 0!==D?D:xe.GENERIC,!q&&e.jsx("div",Object.assign({style:{display:"flex",marginLeft:"auto",cursor:"pointer"},onClick:()=>F(void 0)},{children:e.jsx(o.default,{height:20,width:20,color:x.COLORS.content.secondary})}))]})),Oe(V)?e.jsx("div",Object.assign({style:{display:"flex",margin:"auto",justifyContent:"center",alignItems:"center",height:"calc(100vh - 300px)"}},{children:(()=>{var t,s;return e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:"0px 30px",gap:"8px"}},{children:[e.jsx("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"12px",backgroundColor:`${x.COLORS.background.negative.light}`,borderRadius:"100px"}},{children:e.jsx(r.default,{width:24,height:24,color:x.COLORS.stroke.negative.vibrant})})),e.jsx("div",Object.assign({style:{justifyContent:"center",alignItems:"center",marginBottom:"-4px"}},{children:e.jsx(f.TitleSmall,{children:"Insufficient data"})})),e.jsx(f.BodySecondary,Object.assign({color:x.COLORS.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"})),U&&e.jsx("div",Object.assign({style:{display:"flex",width:"100%"}},{children:e.jsx(j.Button,{LeadingIcon:null!==(t=U.leadingIcon)&&void 0!==t?t:c.default,buttonText:null!==(s=U.title)&&void 0!==s?s:"Add FAQ",buttonType:"secondary",size:"small",matchParentWidth:!0,onClick:()=>{U.onClick()}})}))]}))})()})):e.jsx(m.Tag,{LeadingIcon:r.default,version:"2.0",type:"grey",theme:"light",alignIcon:"start",contentPadding:12,tagText:A.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 ${R===E.__exports.ApplicationType.BIK?"BIK":"Manifest"}.`:"Edit the original source and save again to update the response"})]})),!Oe(V)&&e.jsxs("div",Object.assign({className:"info-container"},{children:[e.jsx(e.Fragment,{children:je.length>0&&e.jsx("div",Object.assign({className:"info-product-source"},{children:e.jsx(Te,Object.assign({title:"Product Sources",count:je.length,isExpanded:R!==E.__exports.ApplicationType.MANIFEST||ue,onToggle:()=>pe(!ue)},{children:e.jsx("div",Object.assign({className:"source",style:{padding:"0 12px",maxWidth:"100%"}},{children:je.map(((t,s)=>{var i,o,l,a;const r=me(t.type||t.subTitle||"OpenAI"),d=me(t.type||t.subTitle||"OpenAI",!0),c=ve(r),p=null==K?void 0:K.includes(d),g=k[null!==(i=t.productId)&&void 0!==i?i:"Products"],h=t.title,j=t.productId&&(null==Y?void 0:Y[t.productId]),y=j&&j.metafield.join(", ");return e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px",padding:"16px 0px",borderBottom:s+1<(null==je?void 0:je.length)?`1px solid ${x.COLORS.stroke.primary}`:"none"}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",justifyContent:"space-between",alignItems:"center"}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",flex:1,gap:"8px",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"}},{children:[fe(r),e.jsx(v.Tooltip,Object.assign({body:h,placement:"top"},{children:e.jsx(f.BodySecondary,Object.assign({style:d==L.CustomDataType.FETCHED_LINKS||d==L.CustomDataType.WEBSITE_LINKS?{cursor:"pointer",textDecoration:"underline"}:{},color:x.COLORS.content.primary,className:"clamp-title",onClick:()=>d==L.CustomDataType.FETCHED_LINKS||d==L.CustomDataType.WEBSITE_LINKS?H(t):{}},{children:h}))}))]})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"4px",flex:"none"}},{children:[t.intent!==P.EMAIL_COLLECTION&&e.jsx(e.Fragment,{children:e.jsx(f.BodyCaption,Object.assign({color:x.COLORS.content.secondary},{children:c}))}),(t.link||t.docId)&&e.jsx("div",Object.assign({style:{cursor:"pointer",marginLeft:"0px"}},{children:p?e.jsx(C.IconButton,{Icon:n.default,height:16,width:16,iconColor:x.COLORS.content.secondary,onClick:()=>null==g?void 0:g.onEditClick(g.data,g.type),disabled:!g,disabledTooltip:"This source is deleted"}):e.jsx(C.IconButton,{Icon:u.default,height:16,width:16,iconColor:x.COLORS.content.secondary,disabled:"custom"===t.type&&!g,disabledTooltip:"This source is deleted",onClick:()=>H(t)})}))]}))]})),j&&e.jsxs(f.BodyCaption,{children:[e.jsx("span",Object.assign({className:"product-data-text1",onClick:()=>{var e;re({title:h,description:Se(j.description),imageUrl:null!==(e=t.imageUrl)&&void 0!==e?e:"",onClose:()=>re(void 0)})}},{children:`${null===(o=j.description)||void 0===o?void 0:o.length} characters description,`})),e.jsx("span",Object.assign({className:"product-data-text1",onClick:()=>j.onEditFaqClick(j.faqs)},{children:`${null===(l=j.faqs)||void 0===l?void 0:l.length} FAQs, `})),e.jsx("span",Object.assign({className:"product-data-text2"},{children:"and"})),e.jsx(v.Tooltip,Object.assign({body:y,placement:"top"},{children:e.jsx("span",Object.assign({className:"product-data-text1"},{children:`${null===(a=j.metafield)||void 0===a?void 0:a.length} metafields`}))}))]})]}),`info-${s}`)}))}))}))}))}),e.jsx(e.Fragment,{children:Ce.length>0&&e.jsx("div",Object.assign({className:"info-content-source"},{children:e.jsx(Te,Object.assign({title:"Content Sources",count:Ce.length,isExpanded:R!==E.__exports.ApplicationType.MANIFEST||ge,onToggle:()=>he(!ge)},{children:e.jsx("div",Object.assign({className:"source",style:{padding:"0 12px",maxWidth:"100%"}},{children:Ce.map(((t,s)=>{var i,o,l,a,r,d,c,p,g,h,j,y,O,m,S,T,I;const b=me(t.type||t.subTitle||"OpenAI"),E=me(t.type||t.subTitle||"OpenAI",!0),w=ve(b),D=null==K?void 0:K.includes(E),N="Products"===t.subTitle?k[null!==(i=t.productId)&&void 0!==i?i:"Products"]:k[null!==(o=t.docId)&&void 0!==o?o:""],R=E.toLowerCase()===(null===(l=L.CustomDataType.FAQ)||void 0===l?void 0:l.toLowerCase())?"faq"===(null===(a=t.title)||void 0===a?void 0:a.toLowerCase())?t.subTitle:t.title:E.toLowerCase()===(null===(r=L.CustomDataType.FILES)||void 0===r?void 0:r.toLowerCase())||E.toLowerCase()===(null===(d=L.CustomDataType.FETCHED_LINKS)||void 0===d?void 0:d.toLowerCase())||E.toLowerCase()===(null===(c=L.CustomDataType.TEXTS)||void 0===c?void 0:c.toLowerCase())?t.title:E.toLowerCase()===(null===(p=L.CustomDataType.WEBSITE_LINKS)||void 0===p?void 0:p.toLowerCase())?t.title.split("/")[t.title.split("/").length-1].replace(/[^\w\s]/gi," ").replace(/^(.)(.*)$/,((e,t,s)=>t.toUpperCase()+s)):t.intent===P.EMAIL_COLLECTION?w:t.title,_="faq"===E.toLowerCase()?null!==(j=null!==(g=null==N?void 0:N.content)&&void 0!==g?g:null===(h=null==N?void 0:N.data)||void 0===h?void 0:h.answer)&&void 0!==j?j:"":E.toLowerCase()===(null===(y=L.CustomDataType.FETCHED_LINKS)||void 0===y?void 0:y.toLowerCase())||E.toLowerCase()===(null===(O=L.CustomDataType.WEBSITE_LINKS)||void 0===O?void 0:O.toLowerCase())||E.toLowerCase()===(null===(m=L.CustomDataType.TEXTS)||void 0===m?void 0:m.toLowerCase())?null!==(I=null!==(S=null==N?void 0:N.content)&&void 0!==S?S:null===(T=null==N?void 0:N.data)||void 0===T?void 0:T.fileContentText)&&void 0!==I?I:"":t.intent===P.EMAIL_COLLECTION?"Collect leads before replying to messages":"";return e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"8px",padding:"16px 0px",borderBottom:s+1<(null==Ce?void 0:Ce.length)?`1px solid ${x.COLORS.stroke.primary}`:"none"}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:"12px",justifyContent:"space-between",alignItems:"center"}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",flex:1,gap:"8px",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"}},{children:[fe(b),e.jsx(v.Tooltip,Object.assign({body:R,placement:"top"},{children:e.jsx(f.BodySecondary,Object.assign({style:E==L.CustomDataType.FETCHED_LINKS||E==L.CustomDataType.WEBSITE_LINKS?{cursor:"pointer",textDecoration:"underline"}:{},color:x.COLORS.content.primary,className:"clamp-title",onClick:()=>E==L.CustomDataType.FETCHED_LINKS||E==L.CustomDataType.WEBSITE_LINKS?H(t):{}},{children:R}))}))]})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"4px",flex:"none"}},{children:[t.intent!==P.EMAIL_COLLECTION&&e.jsx(e.Fragment,{children:e.jsx(f.BodyCaption,Object.assign({color:x.COLORS.content.secondary},{children:w}))}),(t.link||t.docId)&&e.jsx("div",Object.assign({style:{cursor:"pointer",marginLeft:"0px"}},{children:D?e.jsx(C.IconButton,{Icon:n.default,height:16,width:16,iconColor:x.COLORS.content.secondary,onClick:()=>null==N?void 0:N.onEditClick(N.data,N.type),disabled:!N,disabledTooltip:"This source is deleted"}):e.jsx(C.IconButton,{Icon:u.default,height:16,width:16,iconColor:x.COLORS.content.secondary,disabled:"custom"===t.type&&!N,disabledTooltip:"This source is deleted",onClick:()=>H(t)})}))]}))]})),(null!=_?_:"").trim()&&e.jsx("div",Object.assign({style:{padding:"4px 8px",border:`1px dashed ${x.COLORS.stroke.primary}`,borderRadius:"4px",backgroundColor:x.COLORS.surface.subdued}},{children:e.jsx(f.BodyCaption,Object.assign({color:x.COLORS.content.primary,className:"clamp-description"},{children:Se(null!=_?_:"").trim()}))}))]}),`info-${s}`)}))}))}))}))})]})),ie&&!Oe(V)&&e.jsx("div",Object.assign({className:"footer"},{children:e.jsx(S.default,{appType:R,storeId:_,messageSource:A,sourceIntent:null!==(N=A.intent)&&void 0!==N?N:P.GENERIC,faqCount:ne,trainingSourceCount:de,ShowTrainingDataSource:ye,ChecklistType:P,footerButtonOption:$,isFooterLoading:te,reasonForAiGeneratedResponse:z,showAiResponseReason:X})}))]})}),ae&&e.jsx(O.SideModal,Object.assign({header:"Product description",onClose:()=>re(void 0),width:"30%"},{children:e.jsx(b.DescriptionModal,{title:ae.title,description:ae.description,imageUrl:ae.imageUrl,onClose:ae.onClose})}))]})};
|
|
@@ -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
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),o=require("../../constants/Theme.js");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),o=require("../../constants/Theme.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(e);const l=i.default.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;
|
|
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.COLORS.surface.hovered};
|
|
19
|
+
.source {
|
|
20
|
+
border-radius: 12px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
.info-product-source {
|
|
8
24
|
border-radius: 8px;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
gap: 8px;
|
|
28
|
+
background-color: ${o.COLORS.surface.hovered};
|
|
29
|
+
|
|
30
|
+
.product-data-text1 {
|
|
31
|
+
padding: 2px;
|
|
32
|
+
text-decoration: underline;
|
|
33
|
+
color: ${o.COLORS.content.secondary};
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
&:active {
|
|
36
|
+
background-color: ${o.COLORS.surface.hovered};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
.product-data-text2 {
|
|
40
|
+
padding: 2px;
|
|
41
|
+
color: ${o.COLORS.content.secondary};
|
|
42
|
+
}
|
|
43
|
+
.source {
|
|
44
|
+
border-radius: 12px;
|
|
45
|
+
}
|
|
9
46
|
}
|
|
10
47
|
.pop-up-header {
|
|
11
48
|
padding: 6px 8px;
|
|
@@ -44,7 +81,7 @@
|
|
|
44
81
|
width: 8px;
|
|
45
82
|
display: block;
|
|
46
83
|
}
|
|
47
|
-
`;
|
|
84
|
+
`;i.default.div`
|
|
48
85
|
display: flex;
|
|
49
86
|
margin: 16px 0px 0px 0px;
|
|
50
87
|
padding: 0px 0px 16px 0px;
|
|
@@ -100,7 +137,7 @@
|
|
|
100
137
|
-webkit-box-orient: vertical;
|
|
101
138
|
white-space: pre-line;
|
|
102
139
|
}
|
|
103
|
-
`;const p=
|
|
140
|
+
`;const p=i.default.div`
|
|
104
141
|
display: flex;
|
|
105
142
|
flex-direction: column;
|
|
106
143
|
gap: 8px;
|
|
@@ -120,4 +157,13 @@
|
|
|
120
157
|
display: flex;
|
|
121
158
|
gap: 8px;
|
|
122
159
|
}
|
|
123
|
-
`;
|
|
160
|
+
`;i.default.div`
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
justify-content: center;
|
|
164
|
+
width: 24px;
|
|
165
|
+
height: 24px;
|
|
166
|
+
background-color: ${o.COLORS.surface.subdued};
|
|
167
|
+
border-radius: 22px;
|
|
168
|
+
border: 1px solid ${o.COLORS.stroke.primary};
|
|
169
|
+
`,exports.SourceInfoDetailsStyle=l,exports.SourceInfoFooterStyle=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.intentConfig=[{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"}];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),r=require("react"),t=require("styled-components"),d=require("../../spinner/Spinner.js"),s=require("../../../assets/icons/image.svg.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t);const a=o.default.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
|
+
`,l=o.default.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
width: 100%;
|
|
14
|
+
border: 1px solid #e0e0e0;
|
|
15
|
+
border-radius: 16px;
|
|
16
|
+
padding: 8px;
|
|
17
|
+
`,x=o.default.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
|
+
`,p=o.default.div`
|
|
28
|
+
overflow: scroll;
|
|
29
|
+
margin: 0px 0px 0px 8px;
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
`,u=o.default.div`
|
|
32
|
+
height: 1px;
|
|
33
|
+
width: auto;
|
|
34
|
+
margin: 16px;
|
|
35
|
+
background: #e0e0e0;
|
|
36
|
+
`,c=o.default.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
|
+
`;exports.DescriptionModal=t=>{const{title:n,description:o,imageUrl:f}=t,[g,h]=r.useState(!1),[m,v]=r.useState(!1);return r.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){v(!1);const i=yield function(i){return e.__awaiter(this,void 0,void 0,(function*(){return new Promise((e=>{const r=new Image;r.onload=()=>e(!0),r.onerror=()=>e(!1),r.src=i}))}))}(f);h(i),v(!0)}))}),[g,f]),i.jsxs(l,{children:[i.jsxs(x,{children:[m?i.jsxs(i.Fragment,{children:[!g&&i.jsx(a,{children:i.jsx("div",{children:i.jsx(s.default,{width:24})})}),g&&i.jsx("img",{src:f,className:"image",alt:"Product"})]}):i.jsx(a,{children:i.jsx(d.Spinner,{size:"large"})}),i.jsx(p,{children:n})]}),i.jsx(u,{}),i.jsx(c,{dangerouslySetInnerHTML:{__html:o}})]})};
|
|
@@ -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
|
}
|