@bikdotai/bik-component-library 0.0.687-beta.4 → 0.0.687-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/amplitude/index.d.ts +21 -0
- package/dist/esm/amplitude/index.js +1 -1
- package/dist/esm/amplitude/model.d.ts +51 -0
- package/dist/esm/components/InfiniteScroll/InfiniteScroll.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/CustomField/components/CustomField.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/Segment/components/SegmentFilter.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/UserProperty/components/UserPropertyFilter.js +1 -1
- package/dist/esm/components/QueryBuilder/QueryBuilder.d.ts +12 -0
- package/dist/esm/components/QueryBuilder/QueryBuilder.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.js +1 -1
- package/dist/esm/components/QueryBuilder/components/AddNodeButton.js +1 -1
- package/dist/esm/components/QueryBuilder/components/AllowedListDropdown.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/EmojiPicker.js +14 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/FreeText.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js +2 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/IgPicker.js +234 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLast.js +5 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLastAgo.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTwoLast.js +6 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/IntegerPositiveSingle.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/IntegerSingleValue.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/MultiselectDropdownFreeText.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/NumberTime.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleDate.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/StringSingleValue.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoDate.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoNumberInputsSeperatedByAnd.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Connector.js +1 -1
- package/dist/esm/components/QueryBuilder/components/DeleteButton.js +1 -1
- package/dist/esm/components/QueryBuilder/components/DropdownWrapper.js +1 -1
- package/dist/esm/components/QueryBuilder/components/InputLoader.js +4 -4
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.d.ts +25 -0
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js +4 -4
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/AddPropertyButton.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.d.ts +20 -0
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodes.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/QueryBuilderNode.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNodes.js +1 -1
- package/dist/esm/components/QueryBuilder/helpers/ApiResponse.helper.js +1 -1
- package/dist/esm/components/QueryBuilder/helpers/Connector.helper.js +1 -1
- package/dist/esm/components/QueryBuilder/hooks/useQueryBuilderCache.js +1 -1
- package/dist/esm/components/QueryBuilder/redux/queryBuilder.reducer.d.ts +56 -0
- package/dist/esm/components/QueryBuilder/redux/queryBuilder.reducer.js +1 -1
- package/dist/esm/components/QueryBuilder/redux/queryBuilderCache.reducer.d.ts +22 -0
- package/dist/esm/components/QueryBuilder/redux/queryBuilderCache.reducer.js +1 -1
- package/dist/esm/components/QueryBuilder/types/QueryBuilder.type.d.ts +90 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderAPI.type.d.ts +21 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderConnector.type.d.ts +54 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderNodeProps.type.d.ts +14 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderOperator.type.d.ts +130 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderPropertyProps.d.ts +39 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderProps.type.d.ts +55 -0
- package/dist/esm/components/SearchFilter/components/DatePickerButton.js +1 -1
- package/dist/esm/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
- package/dist/esm/components/SearchFilter/components/FilterChipListRenderer.js +1 -1
- package/dist/esm/components/SearchFilter/components/SearchFilterItem.js +1 -1
- package/dist/esm/components/SearchFilter/index.d.ts +6 -0
- package/dist/esm/components/SearchFilter/index.js +1 -1
- package/dist/esm/components/SearchFilter/types/SearchFilter.type.d.ts +41 -0
- package/dist/esm/components/TablePagination/TablePagination.d.ts +17 -0
- package/dist/esm/components/TablePagination/TablePagination.js +1 -1
- package/dist/esm/components/TablePagination/TablePaginationCard.d.ts +14 -0
- package/dist/esm/components/TablePagination/TablePaginationCard.js +9 -1
- package/dist/esm/components/TypographyStyle.d.ts +117 -0
- package/dist/esm/components/WhatsAppTextEditor/CustomEditor.styled.js +22 -1
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.d.ts +46 -0
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.js +1 -1
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.d.ts +24 -0
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js +34 -1
- package/dist/esm/components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.d.ts +23 -0
- package/dist/esm/components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js +1 -1
- package/dist/esm/components/accordion/Accordion.d.ts +31 -0
- package/dist/esm/components/accordion/Accordion.js +1 -1
- package/dist/esm/components/accordion/Accordion.style.js +2 -2
- package/dist/esm/components/accordion/AccordionArrow.js +1 -1
- package/dist/esm/components/action-button/ActionButton.styled.js +2 -2
- package/dist/esm/components/action-button/ActionButtons.d.ts +14 -0
- package/dist/esm/components/action-button/ActionButtons.js +1 -1
- package/dist/esm/components/add-variableV2/AddVariableV2.d.ts +61 -0
- package/dist/esm/components/add-variableV2/AddVariableV2.js +1 -1
- package/dist/esm/components/add-variableV2/AddVariableV2.styled.js +3 -3
- package/dist/esm/components/add-variableV2/AddVariableV2SideModal.d.ts +23 -0
- package/dist/esm/components/add-variableV2/types.d.ts +8 -0
- package/dist/esm/components/ai-modals/ActivateBikAI.d.ts +12 -0
- package/dist/esm/components/ai-modals/ActivateBikAI.js +1 -1
- package/dist/esm/components/ai-modals/AiCreditsExhausted.d.ts +11 -0
- package/dist/esm/components/ai-modals/AiCreditsExhausted.js +1 -1
- package/dist/esm/components/ai-modals/AiCreditsLow.d.ts +10 -0
- package/dist/esm/components/ai-modals/AiCreditsLow.js +1 -1
- package/dist/esm/components/ai-modals/AiSyncProgress.d.ts +11 -0
- package/dist/esm/components/ai-modals/AiSyncProgress.js +1 -1
- package/dist/esm/components/alerts/Alert.d.ts +25 -0
- package/dist/esm/components/alerts/Alert.js +1 -1
- package/dist/esm/components/alerts/AlertHelper.d.ts +42 -0
- package/dist/esm/components/analytics-card/AnalyticsCard.d.ts +14 -0
- package/dist/esm/components/analytics-card/AnalyticsCard.styled.d.ts +21 -0
- package/dist/esm/components/analytics-card/AnalyticsCard.styled.js +46 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChip.d.ts +23 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChip.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.d.ts +52 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMetric.d.ts +21 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMetric.js +5 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.d.ts +9 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.d.ts +37 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/CommonStyles.js +113 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.d.ts +49 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.styles.js +4 -4
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Legend/Legend.js +19 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.d.ts +58 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.js +16 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChart.d.ts +6 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js +2 -2
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.d.ts +8 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +5 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartInputData.d.ts +23 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.d.ts +6 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.d.ts +90 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.styles.js +6 -6
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.d.ts +6 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.d.ts +51 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.d.ts +6 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraphModel.d.ts +24 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.d.ts +18 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.d.ts +49 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.styles.js +3 -3
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.d.ts +35 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapStyled.js +38 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.d.ts +20 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js +32 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/Chip.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/HorinzontalBar.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.d.ts +30 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.js +31 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.d.ts +22 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.js +1 -1
- package/dist/esm/components/avatar/Avatar.d.ts +53 -0
- package/dist/esm/components/avatar/Avatar.js +1 -1
- package/dist/esm/components/avatar/AvatarHelper.d.ts +24 -0
- package/dist/esm/components/bik-layout/BikHeader.d.ts +19 -0
- package/dist/esm/components/bik-layout/BikHeader.js +1 -1
- package/dist/esm/components/bik-layout/BikLayout.d.ts +27 -0
- package/dist/esm/components/bik-layout/BikLayout.js +1 -1
- package/dist/esm/components/bik-layout/BikProfile.d.ts +14 -0
- package/dist/esm/components/bik-layout/BikSidebar.d.ts +37 -0
- package/dist/esm/components/bik-layout/BikSidebar.js +1 -1
- package/dist/esm/components/bik-layout/CommonStyles.js +366 -1
- package/dist/esm/components/bik-layout/FeatureModal.d.ts +16 -0
- package/dist/esm/components/bik-layout/FeatureModalV2.d.ts +15 -0
- package/dist/esm/components/bik-layout/ShowShopifyRestrictedModal.d.ts +15 -0
- package/dist/esm/components/bik-layout/ShowShopifyRestrictedModal.js +1 -1
- package/dist/esm/components/bik-layout/SidebarPopup.js +1 -1
- package/dist/esm/components/bik-layout/SidebarSkeleton.d.ts +12 -0
- package/dist/esm/components/bik-layout/SimpleSidebar.d.ts +31 -0
- package/dist/esm/components/bik-layout/SimpleSidebar.js +1 -1
- package/dist/esm/components/button/Button.d.ts +6 -0
- package/dist/esm/components/button/Button.js +1 -1
- package/dist/esm/components/button/Button.styled.js +61 -1
- package/dist/esm/components/button/model.d.ts +78 -0
- package/dist/esm/components/button/themes.js +1 -1
- package/dist/esm/components/buttonGroup/ButtonGroup.d.ts +26 -0
- package/dist/esm/components/buttonGroup/ButtonGroup.js +1 -1
- package/dist/esm/components/card-selection-modal/CardSelectionModal.d.ts +21 -0
- package/dist/esm/components/card-selection-modal/CardSelectionModal.styled.js +41 -1
- package/dist/esm/components/card-selector/CardSelector.d.ts +20 -0
- package/dist/esm/components/card-selector/CardSelector.js +1 -1
- package/dist/esm/components/card-selector/CardSelectorGroup.d.ts +14 -0
- package/dist/esm/components/carousel/carousel.d.ts +6 -0
- package/dist/esm/components/carousel/carousel.js +2 -2
- package/dist/esm/components/carousel-preview/CarouselPreview.d.ts +16 -0
- package/dist/esm/components/carousel-preview/CarouselPreview.js +1 -1
- package/dist/esm/components/carousel-preview/CarouselPreview.style.js +4 -4
- package/dist/esm/components/carousel-preview/CarouselPreviewCard.js +1 -1
- package/dist/esm/components/carousel-preview/CustomCarouselArrows.js +1 -1
- package/dist/esm/components/carousel-secondary/CarouselSecondary.d.ts +15 -0
- package/dist/esm/components/carousel-secondary/CarouselSecondary.js +1 -1
- package/dist/esm/components/carousel-secondary/CarouselSecondary.style.js +42 -1
- package/dist/esm/components/carousel-secondary/model.d.ts +6 -0
- package/dist/esm/components/checkBox/CheckBox.d.ts +24 -0
- package/dist/esm/components/checkBox/CheckBox.js +1 -1
- package/dist/esm/components/checkBox/CheckBox.styled.js +6 -6
- package/dist/esm/components/checkList/CheckList.d.ts +17 -0
- package/dist/esm/components/checkList/CheckList.js +1 -1
- package/dist/esm/components/checkList/CheckList.styled.js +10 -1
- package/dist/esm/components/colourInput/ColourInput.d.ts +12 -0
- package/dist/esm/components/colourInput/ColourInput.js +1 -1
- package/dist/esm/components/colourInput/ColourInput.styled.js +29 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.d.ts +22 -0
- package/dist/esm/components/country-code-picker/CountryCodePicker.js +1 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.modal.d.ts +10 -0
- package/dist/esm/components/country-code-picker/CountryCodePicker.styled.js +31 -1
- package/dist/esm/components/curtain/Curtain.d.ts +27 -0
- package/dist/esm/components/curtain/CurtainHelper.d.ts +26 -0
- package/dist/esm/components/custom-date-time/CustomDateTime.d.ts +16 -0
- package/dist/esm/components/custom-date-time/CustomDateTime.js +1 -1
- package/dist/esm/components/custom-date-time/CustomDateTime.styled.js +25 -1
- package/dist/esm/components/custom-date-time/DateSelector/DateSelector.js +1 -1
- package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.d.ts +21 -0
- package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.js +1 -1
- package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.styled.js +26 -1
- package/dist/esm/components/dashboard-review-popup/components/FiveStar.js +1 -1
- package/dist/esm/components/dashboard-review-popup/components/FiveStar.styled.js +18 -1
- package/dist/esm/components/dashboard-review-popup/components/Form.js +1 -1
- package/dist/esm/components/dashboard-review-popup/components/Form.styled.js +49 -1
- package/dist/esm/components/dashboard-review-popup/components/ZeroState.js +5 -1
- package/dist/esm/components/data-source-panel/DataSourceInfoFooter.js +1 -1
- package/dist/esm/components/data-source-panel/DataSourcePanel.d.ts +39 -0
- package/dist/esm/components/data-source-panel/DataSourcePanel.js +1 -1
- package/dist/esm/components/data-source-panel/Modals/DescriptionModal.js +6 -6
- package/dist/esm/components/data-source-panel/model.d.ts +144 -0
- package/dist/esm/components/datePicker/DatePicker.d.ts +16 -0
- package/dist/esm/components/datePicker/DatePicker.js +1 -1
- package/dist/esm/components/datePicker/DatePicker.styled.js +159 -1
- package/dist/esm/components/datePicker/DatePickerWrapper.d.ts +19 -0
- package/dist/esm/components/datePicker/DatePickerWrapper.js +1 -1
- package/dist/esm/components/datePicker/model.d.ts +6 -0
- package/dist/esm/components/discount-modal/CouponExpiration/CouponExpiration.d.ts +14 -0
- package/dist/esm/components/discount-modal/CouponExpiration/CouponExpiration.js +1 -1
- package/dist/esm/components/discount-modal/DiscountModal.d.ts +43 -0
- package/dist/esm/components/discount-modal/DiscountModal.js +1 -1
- package/dist/esm/components/discount-modal/DiscountModal.styled.js +69 -1
- package/dist/esm/components/discount-modal/DiscountUtils.js +1 -1
- package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
- package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.styled.js +8 -8
- package/dist/esm/components/discount-modal/DynamicCoupon/MinimumRequirementComponent.js +1 -1
- package/dist/esm/components/discount-modal/StaticCoupon/StaticCoupon.js +1 -1
- package/dist/esm/components/discount-modal/type.d.ts +111 -0
- package/dist/esm/components/dropShadow/DropShadow.d.ts +10 -0
- package/dist/esm/components/dropShadow/DropShadow.js +1 -1
- package/dist/esm/components/dropdown/ChipDropdown.d.ts +11 -0
- package/dist/esm/components/dropdown/ChipDropdown.js +5 -5
- package/dist/esm/components/dropdown/ChipInput.js +1 -1
- package/dist/esm/components/dropdown/Common.styled.js +2 -2
- package/dist/esm/components/dropdown/Dropdown.d.ts +24 -0
- package/dist/esm/components/dropdown/Dropdown.js +1 -1
- package/dist/esm/components/dropdown/DropdownPopover/index.d.ts +20 -0
- package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/esm/components/dropdown/MenuItem/MenuItem.d.ts +13 -0
- package/dist/esm/components/dropdown/MenuItem/MenuItem.js +6 -6
- package/dist/esm/components/dropdown/MultilevelDropdownPopover/index.d.ts +18 -0
- package/dist/esm/components/dropdown/MultilevelDropdownPopover/index.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.d.ts +6 -0
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +6 -6
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js +1 -1
- package/dist/esm/components/dropdown/hooks/useDropdown.js +1 -1
- package/dist/esm/components/dropdown/type.d.ts +75 -0
- package/dist/esm/components/dropdown-button/DropdownButton.d.ts +13 -0
- package/dist/esm/components/dropdown-button/DropdownButton.js +1 -1
- package/dist/esm/components/dropdown-button/DropdownButton.style.js +1 -1
- package/dist/esm/components/dynamic-tabs/DynamicTabs.d.ts +28 -0
- package/dist/esm/components/dynamic-tabs/DynamicTabs.js +1 -1
- package/dist/esm/components/fab-menu/FABMenu.d.ts +28 -0
- package/dist/esm/components/file-uploader/FileUploader.d.ts +6 -0
- package/dist/esm/components/file-uploader/FileUploader.js +1 -1
- package/dist/esm/components/file-uploader/Models.d.ts +31 -0
- package/dist/esm/components/floater/floater.d.ts +13 -0
- package/dist/esm/components/floater/floater.js +1 -1
- package/dist/esm/components/floating-action-button/FloatingActionButton.d.ts +24 -0
- package/dist/esm/components/floating-action-button/FloatingActionButton.styles.d.ts +62 -0
- package/dist/esm/components/floating-input-dropdown/FloatingInputDropdown.d.ts +28 -0
- package/dist/esm/components/floating-input-dropdown/FloatingInputDropdown.js +4 -4
- package/dist/esm/components/icon-button/IconButton.d.ts +6 -0
- package/dist/esm/components/icon-button/IconButton.js +1 -1
- package/dist/esm/components/icon-button/model.d.ts +45 -0
- package/dist/esm/components/image-compress/ImageCompress.d.ts +14 -0
- package/dist/esm/components/image-compress/ImageCompress.js +1 -1
- package/dist/esm/components/image-cropper/BikImageCropper.d.ts +12 -0
- package/dist/esm/components/image-cropper/BikImageCropper.js +1 -1
- package/dist/esm/components/image-cropper/BikImagePipeline/BikImagePipeline.d.ts +38 -0
- package/dist/esm/components/image-cropper/BikImagePipeline/BikImagePipeline.js +1 -1
- package/dist/esm/components/input/ChipInput.js +1 -1
- package/dist/esm/components/input/ChipInput.styled.js +1 -1
- package/dist/esm/components/input/Input-helper.js +1 -1
- package/dist/esm/components/input/Input.d.ts +76 -0
- package/dist/esm/components/input/Input.js +1 -1
- package/dist/esm/components/input/Input.styled.js +144 -1
- package/dist/esm/components/input-with-vars/InputWithVariables.d.ts +34 -0
- package/dist/esm/components/input-with-vars/InputWithVariables.js +2 -2
- package/dist/esm/components/input-with-vars/customPortal.d.ts +10 -0
- package/dist/esm/components/input-with-vars/customPortal.js +1 -1
- package/dist/esm/components/keywords-input/KeywordsInput.d.ts +15 -0
- package/dist/esm/components/keywords-input/KeywordsInput.js +1 -1
- package/dist/esm/components/list-item/ListItem.d.ts +23 -0
- package/dist/esm/components/list-item/ListItem.js +1 -1
- package/dist/esm/components/list-item/ListItem.styled.js +10 -1
- package/dist/esm/components/list-item/themes.js +29 -1
- package/dist/esm/components/modals/Modal.js +1 -1
- package/dist/esm/components/modals/modal.styled.js +47 -1
- package/dist/esm/components/modals/styledModal.d.ts +35 -0
- package/dist/esm/components/modals/styledModal.js +47 -1
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuList.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.d.ts +6 -0
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js +25 -25
- package/dist/esm/components/multi-level-dropdown/type.d.ts +30 -0
- package/dist/esm/components/navigation-hyperlink/NavigationHyperlink.d.ts +14 -0
- package/dist/esm/components/pagination/Pagination.d.ts +13 -0
- package/dist/esm/components/pagination/Pagination.js +1 -1
- package/dist/esm/components/pagination/Pagination.styled.js +7 -1
- package/dist/esm/components/plans/NewSubscriptionPlan.d.ts +22 -0
- package/dist/esm/components/plans/NewSubscriptionPlan.js +1 -1
- package/dist/esm/components/plans/SubscriptionPlan.d.ts +41 -0
- package/dist/esm/components/plans/SubscriptionPlan.js +1 -1
- package/dist/esm/components/plans/SubscriptionPlanSelector.d.ts +49 -0
- package/dist/esm/components/plans/SubscriptionPlanSelector.js +101 -1
- package/dist/esm/components/plans/SubscriptionPlanStyled.js +266 -1
- package/dist/esm/components/plans/SubscriptionPlansCollected.d.ts +18 -0
- package/dist/esm/components/plans/SubscriptionPlansCollected.js +3 -3
- package/dist/esm/components/postPicker/postPicker.d.ts +51 -0
- package/dist/esm/components/postPicker/postPicker.js +1 -1
- package/dist/esm/components/product-picker/ProductPicker.styled.js +71 -1
- package/dist/esm/components/product-picker/ProductPickerModal.d.ts +7 -0
- package/dist/esm/components/product-picker/ProductPickerModal.js +1 -1
- package/dist/esm/components/product-picker/type.d.ts +70 -0
- package/dist/esm/components/product-picker-v2/ProductPickerShimmer.js +1 -1
- package/dist/esm/components/product-picker-v2/ProductPickerTag.js +1 -1
- package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/emptyState.js +1 -1
- package/dist/esm/components/product-picker-v2/helpers/ProductHelper.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.d.ts +114 -0
- package/dist/esm/components/product-picker-v2/modal.js +1 -1
- package/dist/esm/components/product-picker-v2/product.js +1 -1
- package/dist/esm/components/product-picker-v2/productInfoOverlay.js +3 -3
- package/dist/esm/components/product-picker-v2/productScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/rearrangeScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/reducers.js +1 -1
- package/dist/esm/components/product-picker-v2/searchScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/selectedScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/type.d.ts +22 -0
- package/dist/esm/components/product-picker-v2/utility.js +1 -1
- package/dist/esm/components/product-picker-v2/variant.js +1 -1
- package/dist/esm/components/product-picker-v2/variantComponents.js +1 -1
- package/dist/esm/components/progress-bar/CircularProgressBar.js +1 -1
- package/dist/esm/components/progress-bar/ProgressBarComponent.d.ts +21 -0
- package/dist/esm/components/progress-bar/ProgressBarComponent.js +6 -1
- package/dist/esm/components/progress-bar-v2/ProgressBarV2.d.ts +27 -0
- package/dist/esm/components/progress-bar-v2/ProgressBarV2.js +39 -1
- package/dist/esm/components/radioButton/RadioButton.d.ts +21 -0
- package/dist/esm/components/radioButton/RadioButton.js +1 -1
- package/dist/esm/components/radioList/RadioList.d.ts +18 -0
- package/dist/esm/components/radioList/RadioList.js +1 -1
- package/dist/esm/components/radioList/RadioList.styled.js +10 -1
- package/dist/esm/components/resizeImage/index.d.ts +12 -0
- package/dist/esm/components/resizeImage/index.js +1 -1
- package/dist/esm/components/searchBar/searchBar.d.ts +24 -0
- package/dist/esm/components/searchBar/searchBar.js +1 -1
- package/dist/esm/components/shimmer/ShimmerComponent/BikShimmer.d.ts +18 -0
- package/dist/esm/components/shimmer/ShimmerComponent/ShimmerStyled.js +35 -2
- package/dist/esm/components/shimmer-image/ShimmerImage.d.ts +17 -0
- package/dist/esm/components/shimmer-image/ShimmerImage.js +1 -1
- package/dist/esm/components/side-modal/SideModal.d.ts +25 -0
- package/dist/esm/components/side-modal/SideModal.js +1 -1
- package/dist/esm/components/side-modal/SideModal.style.js +9 -9
- package/dist/esm/components/slider/slider.d.ts +14 -0
- package/dist/esm/components/slider/slider.js +1 -1
- package/dist/esm/components/spinner/Spinner.d.ts +16 -0
- package/dist/esm/components/spinner/Spinner.js +6 -6
- package/dist/esm/components/spinner/model.d.ts +14 -0
- package/dist/esm/components/star-rating/Star.js +1 -1
- package/dist/esm/components/star-rating/StarRating.d.ts +14 -0
- package/dist/esm/components/star-rating/StarRating.js +7 -1
- package/dist/esm/components/states/ShopifyScopeWrapper.d.ts +17 -0
- package/dist/esm/components/states/ShopifyScopeWrapper.js +1 -1
- package/dist/esm/components/states/StateComponent.d.ts +45 -0
- package/dist/esm/components/states/StateComponent.js +1 -1
- package/dist/esm/components/states-modal/DeleteConfirmationModal.d.ts +14 -0
- package/dist/esm/components/states-modal/StateModalComponent.d.ts +30 -0
- package/dist/esm/components/stepper/Stepper.d.ts +29 -0
- package/dist/esm/components/stepper/Stepper.js +1 -1
- package/dist/esm/components/switch/Switch.d.ts +24 -0
- package/dist/esm/components/switch/Switch.js +61 -1
- package/dist/esm/components/tabs/Tabs.d.ts +7 -0
- package/dist/esm/components/tabs/Tabs.js +1 -1
- package/dist/esm/components/tabs/Tabs.model.d.ts +52 -0
- package/dist/esm/components/tabs/Tabs.styles.js +45 -1
- package/dist/esm/components/tag/Tag.d.ts +9 -0
- package/dist/esm/components/tag/Tag.js +1 -1
- package/dist/esm/components/tag/Tag.styled.js +30 -1
- package/dist/esm/components/tag/model.d.ts +72 -0
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.d.ts +74 -0
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
- package/dist/esm/components/template-context-mapper/custom-hooks/useAdditionalVariables.js +1 -1
- package/dist/esm/components/template-context-mapper/helpers/WebpushTemplateHelper.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/Body.js +8 -8
- package/dist/esm/components/template-context-mapper/modalElements/DesktopPreview.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/DiscountCodeComponent.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/EditWebpushTemplate.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.d.ts +13 -0
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/Footer.js +5 -5
- package/dist/esm/components/template-context-mapper/modalElements/Header.js +5 -5
- package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.js +4 -4
- package/dist/esm/components/template-context-mapper/modalElements/QueryParamsComponent.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.d.ts +16 -0
- package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsSkeleton.d.ts +7 -0
- package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.js +5 -5
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/VariableEditorHeader.js +3 -3
- package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.js +1 -1
- package/dist/esm/components/template-context-mapper/utils/convertPlaceholdersToBikDropdown.js +1 -1
- package/dist/esm/components/template-context-mapper/utils/getDataFromTemplateComponent.d.ts +36 -0
- package/dist/esm/components/template-context-mapper/utils/getDataFromTemplateComponent.js +1 -1
- package/dist/esm/components/template-context-mapper/utils/highlightFor.js +1 -1
- package/dist/esm/components/template-context-mapper/utils/validateIsUrl.d.ts +4 -0
- package/dist/esm/components/template-preview/EmailTemplateThumbnailPreview.js +1 -1
- package/dist/esm/components/template-preview/RCS/RCSButtons.js +1 -1
- package/dist/esm/components/template-preview/RCS/RCSChatPreview.js +1 -1
- package/dist/esm/components/template-preview/RCS/RCSMediaCard.js +1 -1
- package/dist/esm/components/template-preview/RCS/RCSPreview.styled.js +4 -4
- package/dist/esm/components/template-preview/RCS/RCSTemplateLikePreview.js +4 -4
- package/dist/esm/components/template-preview/SmsTemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/TemplatePreview.d.ts +33 -0
- package/dist/esm/components/template-preview/TemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/WhatsApp/ChatBtn.js +1 -1
- package/dist/esm/components/template-preview/WhatsApp/ChatUI.js +2 -2
- package/dist/esm/components/template-preview/WhatsApp/ChatUiV2.js +4 -4
- package/dist/esm/components/template-preview/WhatsApp/MediaCard.js +1 -1
- package/dist/esm/components/template-preview/WhatsApp/RenderTemplateWithVariable.js +2 -2
- package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreview.d.ts +6 -0
- package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreview.js +5 -5
- package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.d.ts +6 -0
- package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +5 -5
- package/dist/esm/components/template-preview/WhatsAppTemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/constants/regexPatterns.d.ts +13 -0
- package/dist/esm/components/template-preview/helpers/SmsTemplateHelper.d.ts +5 -0
- package/dist/esm/components/template-preview/helpers/SmsTemplateHelper.js +1 -1
- package/dist/esm/components/template-preview/helpers/TemplateCreatorHelper.js +1 -1
- package/dist/esm/components/template-preview/helpers/VariableEditorHelper.d.ts +10 -0
- package/dist/esm/components/template-preview/helpers/VariableEditorHelper.js +1 -1
- package/dist/esm/components/template-preview/helpers/WhatsAppFormatToHTML.d.ts +10 -0
- package/dist/esm/components/template-preview/helpers/templateMiscHelper.js +1 -1
- package/dist/esm/components/template-preview/models/Channels.d.ts +12 -0
- package/dist/esm/components/template-preview/models/EmailTemplate.d.ts +42 -0
- package/dist/esm/components/template-preview/models/RCSTemplate.d.ts +40 -0
- package/dist/esm/components/template-preview/models/SmsTemplate.d.ts +39 -0
- package/dist/esm/components/template-preview/models/TemplateMeta.d.ts +95 -0
- package/dist/esm/components/template-preview/models/WebpushTemplate.d.ts +64 -0
- package/dist/esm/components/template-preview/models/WhatsAppTemplate.d.ts +337 -0
- package/dist/esm/components/template-preview/models/WhatsappCarouselTemplate.d.ts +89 -0
- package/dist/esm/components/template-preview/models/types.d.ts +13 -0
- package/dist/esm/components/template-preview/utils/TemplateHelperUtils.js +1 -1
- package/dist/esm/components/template-preview/webpush/WebpushPreview.js +1 -1
- package/dist/esm/components/testimonial-card/TestimonialCard.d.ts +21 -0
- package/dist/esm/components/testimonial-card/TestimonialCard.js +1 -1
- package/dist/esm/components/testimonial-card/TestimonialCard.style.js +53 -1
- package/dist/esm/components/thumbnail/Thumbnail.d.ts +17 -0
- package/dist/esm/components/thumbnail/Thumbnail.js +1 -1
- package/dist/esm/components/toaster/Toaster.d.ts +33 -0
- package/dist/esm/components/toaster/Toaster.js +1 -1
- package/dist/esm/components/toaster/Toaster.styled.js +138 -1
- package/dist/esm/components/tooltips/Tooltip.d.ts +17 -0
- package/dist/esm/components/tooltips/Tooltip.js +1 -1
- package/dist/esm/components/tooltips/TooltipInternal.d.ts +11 -0
- package/dist/esm/components/tooltips/TooltipInternal.js +7 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.d.ts +16 -0
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +1 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.d.ts +22 -0
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +1 -1
- package/dist/esm/components/variable-picker-v3/Content.js +1 -1
- package/dist/esm/components/variable-picker-v3/DefaultVariableContent.js +1 -1
- package/dist/esm/components/variable-picker-v3/SubHeaderItems.js +1 -1
- package/dist/esm/components/variable-picker-v3/VariablePicker.d.ts +7 -0
- package/dist/esm/components/variable-picker-v3/VariablePicker.js +1 -1
- package/dist/esm/components/variable-picker-v3/model.d.ts +65 -0
- package/dist/esm/components/variable-picker-v3/recommendVaribles.js +1 -1
- package/dist/esm/components/variable-picker-v3/searchVariables.js +1 -1
- package/dist/esm/components/zeroState/ZeroState.js +5 -5
- package/dist/esm/constants/Theme.d.ts +624 -0
- package/dist/esm/constants/zindex.d.ts +9 -0
- package/dist/esm/helpers/BaseWhatsappContentLang.helper.d.ts +43 -0
- package/dist/esm/hooks/useCurreny.js +1 -1
- package/dist/esm/hooks/useOutside.js +1 -1
- package/dist/esm/index.d.ts +175 -0
- package/dist/esm/types/apiExecutor.d.ts +13 -0
- package/dist/esm/utils/DateUtils.js +1 -1
- package/dist/esm/utils/StringUtils.d.ts +16 -0
- package/dist/esm/utils/StringUtils.js +1 -1
- package/dist/esm/utils/bytesToMB.js +1 -1
- package/dist/esm/utils/resizeImage.d.ts +3 -0
- package/dist/esm/utils/unCamelCase.js +1 -1
- package/dist/esm/utils/validator.d.ts +8 -0
- package/package.json +8 -7
package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import a from"../../../../assets/icons/maximize.svg.js";import{Chart as o,CategoryScale as i,LinearScale as r,BarElement as n,Tooltip as l,Legend as s}from"chart.js";import d from"chartjs-plugin-datalabels";import{useState as c,useMemo as p}from"react";import{Bar as g}from"react-chartjs-2";import{IconButton as h}from"../../../icon-button/IconButton.js";import{StyledModal as x}from"../../../modals/styledModal.js";import{TitleRegular as u,BodyTiny as m}from"../../../TypographyStyle.js";import{COLORS as y,FONTS as b}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as f,truncateValueForIndianStore as A}from"../utils/calcPercentage.js";import{COLOR_SCHEMA as C,GRAPH_ORIENTATION as k}from"./StackedBarChart.model.js";import{GraphContainerWrapper as v,HeaderIconWrapper as L}from"./StackedBarChart.styles.js";o.register(i,r,n,l,s,d);const O=o=>{const{headerIcons:i=[],legendsAndIconDirection:r="row"}=o,[n,l]=c(!1),s=[250,1e3,800,1500,300,600],d=0===o.yAxis.data.length,O=void 0===o.customColourScaleBrand&&void 0===o.customColourScalePastel?o.colorSchema===C.PASTEL?["#E6C7FF","#FEC6C6","#FEDEF3","#DEEFFF","#FFD8B1","#C7E5FF","#FFD3E6","#C9FFE5","#FFE3C7","#D9D9FF"]:["#5E07BB","#9E77ED","#D2AEFF","#F7D7FF","#CDE1FF","#92AFFA","#3935E1"]:o.colorSchema===C.PASTEL?o.customColourScalePastel:o.customColourScaleBrand,F=o.customHoverColour,S=p((()=>({barPercentage:o?.barPercentage||.4,categoryPercentage:1,pointStyle:"circle",barWidth:o.barWidth,borderRadius:o?.borderRadius||void 0,..."object"==typeof o?.borderRadius?{borderSkipped:!1}:{},...o?.addBarGap?.flag?{borderWidth:{top:o?.addBarGap?.value||2,bottom:o?.addBarGap?.value||2,right:0,left:0},borderColor:"transparent"}:{}})),[o.barWidth,o?.borderRadius,o?.barPercentage,o?.addBarGap]),H={};o.yAxis.data.map((t=>{t.map((t=>{H[t.name]?H[t.name].push(t.value):H[t.name]=[t.value]}))}));const I=Object.keys(H).map(((t,e)=>({label:t,data:H[t],backgroundColor:O?.[e],hoverBackgroundColor:void 0===F?void 0:F[e],...S})));let T=o.xAxis.data.map((t=>"string"==typeof t?t:t.name)),R=I;if(o.truncateBars){const t=((t,e,a)=>{if(e.length<=a)return{truncatedData:t,truncatedLabels:e,originalData:t,originalLabels:e};const o=t.map((t=>t.slice(0,a))),i=t.map((t=>t.slice(a).reduce(((t,e)=>t+e),0)));o.forEach(((t,e)=>t.push(i[e])));const r=e.slice(0,a);return r.push("Others"),{truncatedData:o,truncatedLabels:r,originalData:t,originalLabels:e}})(I.map((t=>t.data)),T,o.truncateBars);I.forEach(((e,a)=>e.data=t.truncatedData[a])),T=t.truncatedLabels,R=t.originalData.map(((t,e)=>({...I[e],data:t})))}const w={plugins:{legend:{display:!d&&!o.customLegend,labels:{usePointStyle:!0,fontSize:2}},tooltip:{enabled:!d,callbacks:{label:o.tooltipConfig?.labelCallback,title:o.tooltipConfig?.titleCallback,footer:o.tooltipConfig?.footerCallback},footerFont:o.tooltipConfig?.footerStyles?.footerFont},datalabels:{display:o.showTotal??!1,anchor:"end",align:"end",clamp:!0,formatter:(t,e)=>{const a=e.datasetIndex,o=e.chart.data.datasets;if(a!==o.length-1)return"";const i=e.dataIndex;let r=0;for(let t=0;t<o.length;t++)r+=o[t].data[i]??0;return r?r<1e3?r:(r/1e3).toString().substring(0,4)+"k":""},color:y.content.secondary}},layout:{padding:{right:o.showTotal&&o.orientation===k.HORIZONTAL?50:0,top:o.showTotal&&o.orientation!=k.HORIZONTAL?50:0}},responsive:!0,maintainAspectRatio:!1,legend:{display:!o.customLegend,labels:{usePointStyle:!0}},indexAxis:o.orientation===k.HORIZONTAL?"y":"x",scales:{x:{title:{display:!!(o.orientation===k.HORIZONTAL?o.yAxis?.title:o.xAxis?.title),text:o.orientation===k.HORIZONTAL?o.yAxis?.title:o.xAxis?.title,color:(o.orientation===k.HORIZONTAL?o.yAxis?.titleColor:o.xAxis?.titleColor)??y.content.secondary,font:{size:b.caption.fontSize}},grid:{display:o.orientation===k.HORIZONTAL&&(void 0===o?.showGridLines?.x||o?.showGridLines?.x),color:y.background.base},ticks:{fontSize:b.caption.fontSize,color:o.yAxis.labelColor??y.content.secondary,callback:o.orientation===k.HORIZONTAL?o.isInternationalStore?f:A:void 0},stacked:o.orientation===k.HORIZONTAL?"boolean"!=typeof o.yAxis?.stacked||o.yAxis?.stacked:"boolean"!=typeof o.xAxis?.stacked||o.xAxis?.stacked},y:{...o?.equalHeight?.flag?{suggestedMin:-o?.equalHeight.max,suggestedMax:o?.equalHeight.max}:{},title:{display:!!(o.orientation===k.HORIZONTAL?o.xAxis?.title:o.yAxis?.title),text:o.orientation===k.HORIZONTAL?o.xAxis?.title:o.yAxis?.title,color:(o.orientation===k.HORIZONTAL?o.xAxis?.titleColor:o.yAxis?.titleColor)??y.content.secondary,font:{size:b.caption.fontSize}},grid:{display:o.orientation!==k.HORIZONTAL&&(void 0===o?.showGridLines?.y||o?.showGridLines?.y),color:y.background.base},ticks:{stepSize:o.orientation===k.HORIZONTAL?o.xAxis?.stepSize:o.yAxis?.stepSize,fontSize:b.caption.fontSize,color:o.xAxis.labelColor??y.content.secondary,...d?{min:0,max:2e3,stepSize:200}:{},callback:o?.ticksCallback?o?.ticksCallback:o.orientation!==k.VERTICAL?o.isInternationalStore?f:A:void 0},stacked:o.orientation===k.HORIZONTAL?"boolean"!=typeof o.xAxis?.stacked||o.xAxis?.stacked:"boolean"!=typeof o.yAxis?.stacked||o.yAxis?.stacked}},onClick:(t,e)=>{if(!o.onBarClick)return;const a=e[0].datasetIndex,i=e[0].index,r=t.chart.data.datasets[a].label,n=t.chart.data.labels[i];o.onBarClick(n,r)},onHover:(t,e)=>{o.onBarClick&&e.length&&(t.native.target.style.cursor="pointer")}};o.orientation&&o.orientation!==k.VERTICAL?delete w.scales.y.ticks.callback:delete w.scales.x.ticks.callback;const E={labels:T,datasets:d?[{data:s,backgroundColor:"rgba(0,0,0,0)"}]:I},B={labels:o.xAxis.data.map((t=>"string"==typeof t?t:t.name)),datasets:d?[{data:s,backgroundColor:"rgba(0,0,0,0)"}]:R},D=(a=!1)=>e("div",{style:{overflowY:"scroll",display:"flex",flexDirection:"row",gap:"10px",padding:"0px 24px 12px 24px",justifyContent:o.allowChartPopup&&!a?"flex-start":"flex-end",flexWrap:"wrap"},children:I.map((a=>t("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"4px"},children:[e("div",{style:{backgroundColor:a.backgroundColor,width:"16px",height:"16px",borderRadius:"2px"}}),e(m,{color:y.content.secondary,children:a.label})]},a.label.replace(" ","_"))))});return t(v,{style:o.wrapperStyle??{},padding:o.outerPadding,customLegend:o.customLegend,children:[o.chartHeading&&t("div",{style:{marginBottom:24,display:"flex",justifyContent:o.hideHeading?"flex-end":"space-between"},children:[!0!==o.hideHeading&&e(u,{color:o.chartHeading.color??y.content.secondary,children:o.chartHeading.heading}),o.allowChartPopup&&e("div",{style:{display:"flex",justifyContent:"flex-end"},children:e("div",{children:e(h,{Icon:a,onClick:()=>{l(!0)}})})})]}),o.customLegend&&t("div",{style:{display:"flex",flexDirection:r,justifyContent:"space-between"},children:[e(L,{children:i.map(((t,a)=>e("div",{children:e("div",{children:t})},a)))}),D()]}),e("div",{className:"graph__wrapper",children:e("div",{style:{height:o.graphCanvasHeight??500,width:o.graphCanvasWidth??"auto"},children:e(g,{options:w,data:E})})}),n&&e(x,{open:n,onClose:()=>l(!1),closeOnOutsideClick:!0,headingTitle:o.chartHeading?.heading,width:"85%",children:t("div",{className:"graph__wrapper",style:{padding:"8px"},children:[o.customLegend&&D(!0),e("div",{style:{height:"70vh",width:"100%",padding:"16px",borderRadius:"8px"},children:e(g,{options:w,data:B})})]})})]})};export{O as StackedBarChart};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { TooltipItem, FontSpec } from 'chart.js';
|
|
2
|
+
|
|
3
|
+
interface AxisDetailsI {
|
|
4
|
+
title?: string;
|
|
5
|
+
titleColor?: string;
|
|
6
|
+
data: XAxisDataI[] | string[];
|
|
7
|
+
labelColor?: string;
|
|
8
|
+
stepSize?: number;
|
|
9
|
+
stacked?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface XAxisDataI {
|
|
12
|
+
name: string;
|
|
13
|
+
value: number;
|
|
14
|
+
}
|
|
15
|
+
interface RGBColorI {
|
|
16
|
+
r: number;
|
|
17
|
+
g: number;
|
|
18
|
+
b: number;
|
|
19
|
+
a?: number;
|
|
20
|
+
}
|
|
21
|
+
interface ChartHeadingI {
|
|
22
|
+
heading: string;
|
|
23
|
+
color?: string;
|
|
24
|
+
}
|
|
25
|
+
declare enum COLOR_SCHEMA {
|
|
26
|
+
BRAND = "brand",
|
|
27
|
+
PASTEL = "pastel"
|
|
28
|
+
}
|
|
29
|
+
declare enum GRAPH_ORIENTATION {
|
|
30
|
+
VERTICAL = "vertical",
|
|
31
|
+
HORIZONTAL = "horizontal"
|
|
32
|
+
}
|
|
33
|
+
interface StackedBarGraphI {
|
|
34
|
+
graphCanvasHeight?: number | string;
|
|
35
|
+
graphCanvasWidth?: string;
|
|
36
|
+
tickColor?: string;
|
|
37
|
+
labelColor?: string;
|
|
38
|
+
chartHeading?: ChartHeadingI;
|
|
39
|
+
xAxis: AxisDetailsI;
|
|
40
|
+
yAxis: AxisDetailsI;
|
|
41
|
+
barColorRGBA: RGBColorI;
|
|
42
|
+
outerPadding?: string;
|
|
43
|
+
onBarClick?: (xAxisLabel: string, yAxisLabel: string) => void;
|
|
44
|
+
colorSchema?: COLOR_SCHEMA;
|
|
45
|
+
orientation?: GRAPH_ORIENTATION;
|
|
46
|
+
barWidth?: number;
|
|
47
|
+
wrapperStyle?: React.CSSProperties;
|
|
48
|
+
customLegend?: boolean;
|
|
49
|
+
showTotal?: boolean;
|
|
50
|
+
tooltipConfig?: {
|
|
51
|
+
titleCallback?: (toolTipItems: TooltipItem<'bar'>[]) => string | string[];
|
|
52
|
+
labelCallback?: (toolTipItem: TooltipItem<'bar'>) => string | string[];
|
|
53
|
+
footerCallback?: (toolTipItems: TooltipItem<'bar'>[]) => string | string[];
|
|
54
|
+
footerStyles?: {
|
|
55
|
+
footerFont?: Partial<FontSpec>;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
customColourScaleBrand?: string[];
|
|
59
|
+
customColourScalePastel?: string[];
|
|
60
|
+
customHoverColour?: string[];
|
|
61
|
+
isInternationalStore?: boolean;
|
|
62
|
+
truncateBars?: number;
|
|
63
|
+
allowChartPopup?: boolean;
|
|
64
|
+
hideHeading?: boolean;
|
|
65
|
+
borderRadius?: number | {
|
|
66
|
+
topLeft?: number;
|
|
67
|
+
topRight?: number;
|
|
68
|
+
bottomLeft?: number;
|
|
69
|
+
bottomRight?: number;
|
|
70
|
+
};
|
|
71
|
+
showGridLines?: {
|
|
72
|
+
x?: boolean;
|
|
73
|
+
y?: boolean;
|
|
74
|
+
};
|
|
75
|
+
equalHeight?: {
|
|
76
|
+
flag: boolean;
|
|
77
|
+
max: number;
|
|
78
|
+
};
|
|
79
|
+
barPercentage?: number;
|
|
80
|
+
addBarGap?: {
|
|
81
|
+
flag: boolean;
|
|
82
|
+
value: number;
|
|
83
|
+
};
|
|
84
|
+
ticksCallback?: (value: number) => string;
|
|
85
|
+
legendsAndIconDirection?: 'row-reverse' | 'row';
|
|
86
|
+
headerIcons?: React.ReactNode[];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export { COLOR_SCHEMA, GRAPH_ORIENTATION };
|
|
90
|
+
export type { AxisDetailsI, ChartHeadingI, RGBColorI, StackedBarGraphI, XAxisDataI };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import e from"styled-components";import{COLORS as
|
|
2
|
-
background-color: ${
|
|
3
|
-
padding: ${e=>
|
|
1
|
+
import e from"styled-components";import{COLORS as p}from"../../../../constants/Theme.js";const r=e.div`
|
|
2
|
+
background-color: ${p.surface.standard};
|
|
3
|
+
padding: ${e=>e.padding??"24px"};
|
|
4
4
|
border: none;
|
|
5
5
|
width: 100%;
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ import e from"styled-components";import{COLORS as r}from"../../../../constants/T
|
|
|
8
8
|
width: 100%;
|
|
9
9
|
display: flex;
|
|
10
10
|
gap: 24px;
|
|
11
|
-
height: ${e=>
|
|
11
|
+
height: ${e=>e.chartWrapperHeight??"100%"};
|
|
12
12
|
flex-direction: ${e=>e.isFunnel||e.customLegend?"column":"row"};
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -28,8 +28,8 @@ import e from"styled-components";import{COLORS as r}from"../../../../constants/T
|
|
|
28
28
|
.legend__set {
|
|
29
29
|
margin-top: 16px;
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,t=e.div`
|
|
32
32
|
display: flex;
|
|
33
33
|
align-items: center;
|
|
34
34
|
gap: 8px;
|
|
35
|
-
`;export{
|
|
35
|
+
`;export{r as GraphContainerWrapper,t as HeaderIconWrapper};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { StackedBarDistributionGraphI } from './StackedBarDistributionChart.model.js';
|
|
3
|
+
|
|
4
|
+
declare const StackedBarDistributionChart: (props: StackedBarDistributionGraphI) => react_jsx_runtime.JSX.Element;
|
|
5
|
+
|
|
6
|
+
export { StackedBarDistributionChart };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{Chart as o,CategoryScale as l,LinearScale as n,BarElement as r,Tooltip as i,Legend as c}from"chart.js";import s from"chartjs-plugin-datalabels";import{useState as d,useEffect as p,useCallback as h}from"react";import{Bar as g}from"react-chartjs-2";import{BodyTiny as b,TitleRegular as f}from"../../../TypographyStyle.js";import{COLORS as u,FONTS as m}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as y,truncateValueForIndianStore as F}from"../utils/calcPercentage.js";import{GraphContainerWrapper as T}from"./StackedBarChart.styles.js";import{GRAPH_ORIENTATION as A}from"./StackedBarDistributionChart.model.js";o.register(l,n,r,i,c,s),o.defaults.plugins.datalabels.display=!1;const C=o=>{const[l,n]=d([]),[r,i]=d(),c=!o.data.filter((e=>!!e.value)).length,s=o.colorMatrix&&o.colorMatrix.length?o.colorMatrix:[["#09A35B","#33D2A1","#A8E5C0","#075E54","#128C7E","#25D366","#DCF8C6"],["#FC4183","#FCA0C2","#FEE3EF","#F5016C","#F972AD","#FCAACE","#FEE3EF"],["#1B95D6","#74B2E5","#A0D1F1","#0078D5","#55A5E3","#8EC3EC","#C6E1F6"],["#FF4F52","#FFA3A4","#FFD9DA","#FF0012","#FF797D","#FFC4C5","#F9DFDF"],["#4B2E91","#7B1FA2","#A77BCA","#5E07BB","#9E77ED","#D2AEFF","#EBDBFF"]],C={min:0,max:200,stepSize:20},O={min:o.minValue,max:o.maxValue,stepSize:o.valuesStepSize},v={barPercentage:.4,categoryPercentage:1,pointStyle:"circle",barThickness:c?0:o.barThickness??100},k={plugins:{legend:{display:!1},tooltip:{enabled:!c,callbacks:{label:o.tooltipConfig?.labelCallback,footer:o.tooltipConfig?.footerCallback},footerFont:o.tooltipConfig?.footerStyles?.footerFont},datalabels:{display:(!c&&o.showTotal)??!1,anchor:"end",align:"end",clamp:!0,formatter:(e,t)=>{const a=t.datasetIndex,l=t.chart.data.datasets;if(a!==l.length-1)return"";const n=t.dataIndex;let r=0;for(let e=0;e<l.length;e++)r+=l[e].data[n]??0;return r?o.isInternationalStore?y(r):F(r):""},color:u.content.secondary}},responsive:!0,maintainAspectRatio:!1,legend:{display:!1},indexAxis:o.orientation===A.HORIZONTAL?"y":"x",layout:{padding:{right:o.showTotal&&o.orientation===A.HORIZONTAL?50:0,top:o.showTotal&&o.orientation!=A.HORIZONTAL?25:0}},scales:{x:{title:{display:!!(o.orientation===A.HORIZONTAL?o.valueTitle?.heading:o.labelTitle?.heading),text:o.orientation===A.HORIZONTAL?o.valueTitle?.heading:o.labelTitle?.heading,color:(o.orientation===A.HORIZONTAL?o.valueTitle?.color:o.labelTitle?.color)??u.content.secondary,font:{size:m.bodySecondary.fontSize}},grid:{display:o.orientation===A.HORIZONTAL,color:u.background.base},ticks:{stepSize:30,fontSize:m.caption.fontSize,color:(o.orientation===A.HORIZONTAL?o.labelTitle?.color:o.valueTitle?.color)??u.content.secondary,...o.orientation===A.HORIZONTAL?c?C:O:{},callback:(e,t)=>o.orientation!==A.HORIZONTAL?r?.labels?.[t]??"":"number"!=typeof e?e:o.isInternationalStore?y(e):F(e)},stacked:!0},y:{title:{display:!!(o.orientation===A.HORIZONTAL?o.labelTitle?.heading:o.valueTitle?.heading),text:o.orientation===A.HORIZONTAL?o.labelTitle?.heading:o.valueTitle?.heading,color:(o.orientation===A.HORIZONTAL?o.labelTitle?.color:o.valueTitle?.color)??u.content.secondary,font:{size:m.bodySecondary.fontSize}},grid:{display:o.orientation!==A.HORIZONTAL,color:u.background.base},ticks:{fontSize:m.caption.fontSize,color:(o.orientation===A.HORIZONTAL?o.valueTitle?.color:o.labelTitle?.color)??u.content.secondary,...o.orientation===A.HORIZONTAL?{}:c?C:O,callback:(e,t)=>o.orientation===A.HORIZONTAL?r?.labels?.[t]??"":"number"!=typeof e?e:o.isInternationalStore?y(e):F(e)},stacked:!0}},onClick:(e,t)=>{if(!o.onBarClick)return;const a=t[0].datasetIndex,l=t[0].index,n=e.chart.data.datasets[a].label,r=e.chart.data.labels[l];o.onBarClick(r,n)},onHover:(e,t)=>{o.onBarClick&&t.length&&(e.native.target.style.cursor="pointer")}},x=Array.from(new Set(o.data.map((e=>e.label)))),E={labels:(H=x,H.map((e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1):e))),datasets:c?[{data:[10,20,30,40,50,60,80,100,120],backgroundColor:"rgba(0,0,0,0)"}]:[]};var H;p((()=>{const e=[];x.forEach(((t,a)=>{const l=[],n=o.data.filter((e=>e.label===t));o.isFunnel||n.sort(((e,t)=>t.value-e.value)),n.forEach(((e,t)=>{const o=((e,t,a)=>s[e].slice(-a)[t])(a,t,n.length);l.push({color:o,label:e.stackLabel});const r={label:e.stackLabel,backgroundColor:o,data:Array(x.length).fill(0),...v};r.data[a]=e.value,E.datasets.push(r)})),e.push(l)})),n(e),i(E)}),[o.data]);const I=h((()=>e("div",{style:{overflowY:"scroll",display:"flex",flexDirection:"row",gap:"10px",justifyContent:"flex-end"},children:N().map((a=>t("div",{className:"legend__row",children:[e("div",{className:"legend__palette",style:{backgroundColor:a.color}}),e(b,{color:u.content.secondary,children:a.label})]},a.label.replace(" ","_"))))})),[l]),N=()=>{const e=[];return l.forEach(((t,a)=>{e.push({color:t[0].color,label:x[a]})})),e};if(!r)return e(a,{});return t(T,{style:o.wrapperStyle??{},padding:o.outerPadding,chartWrapperHeight:o.chartWrapperHeight,isFunnel:o.isFunnel,children:[o.chartHeading&&e("div",{style:{marginBottom:24},children:e(f,{color:o.chartHeading.color??u.content.secondary,children:o.chartHeading.heading})}),t("div",{className:"graph__wrapper",children:[(o.showLegend??!0)&&o.isFunnel&&I(),e("div",{style:{height:o.graphCanvasHeight??500,width:o.graphCanvasWidth??"100%",flex:1},children:e(g,{options:k,data:r})}),(o.showLegend??!0)&&!o.isFunnel&&e("div",{style:{overflowY:"scroll",display:"flex",flexDirection:"column"},children:l.map(((a,o)=>e("div",{className:"legend__set",children:a.map((a=>t("div",{className:"legend__row",children:[e("div",{className:"legend__palette",style:{backgroundColor:a.color}}),e(b,{color:u.content.secondary,children:a.label})]},a.label.replace(" ","_"))))},`Legend_set_${o}`)))})]})]})};export{C as StackedBarDistributionChart};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { TooltipItem, FontSpec } from 'chart.js';
|
|
2
|
+
|
|
3
|
+
interface ChartHeadingI {
|
|
4
|
+
heading: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
declare enum GRAPH_ORIENTATION {
|
|
8
|
+
VERTICAL = "vertical",
|
|
9
|
+
HORIZONTAL = "horizontal"
|
|
10
|
+
}
|
|
11
|
+
interface StackedBarDistributionGraphDataI {
|
|
12
|
+
label: string;
|
|
13
|
+
value: number;
|
|
14
|
+
stackLabel: string;
|
|
15
|
+
}
|
|
16
|
+
interface StackedBarDistributionGraphI {
|
|
17
|
+
graphCanvasHeight?: number | string;
|
|
18
|
+
graphCanvasWidth?: string;
|
|
19
|
+
tickColor?: string;
|
|
20
|
+
labelColor?: string;
|
|
21
|
+
chartHeading?: ChartHeadingI;
|
|
22
|
+
data: StackedBarDistributionGraphDataI[];
|
|
23
|
+
outerPadding?: string;
|
|
24
|
+
onBarClick?: (xAxisLabel: string, yAxisLabel: string) => void;
|
|
25
|
+
labelTitle?: ChartHeadingI;
|
|
26
|
+
valueTitle?: ChartHeadingI;
|
|
27
|
+
orientation?: GRAPH_ORIENTATION;
|
|
28
|
+
barThickness?: number;
|
|
29
|
+
valuesStepSize?: number;
|
|
30
|
+
minValue?: number;
|
|
31
|
+
maxValue?: number;
|
|
32
|
+
chartWrapperHeight?: string;
|
|
33
|
+
showLegend?: boolean;
|
|
34
|
+
isFunnel?: boolean;
|
|
35
|
+
colorMatrix?: string[][];
|
|
36
|
+
wrapperStyle?: React.CSSProperties;
|
|
37
|
+
showTotal?: boolean;
|
|
38
|
+
skipSortingByLabels?: boolean;
|
|
39
|
+
tooltipConfig?: {
|
|
40
|
+
titleCallback?: (toolTipItems: TooltipItem<'bar'>[]) => string | string[];
|
|
41
|
+
labelCallback?: (toolTipItem: TooltipItem<'bar'>) => string | string[];
|
|
42
|
+
footerCallback?: (toolTipItems: TooltipItem<'bar'>[]) => string | string[];
|
|
43
|
+
footerStyles?: {
|
|
44
|
+
footerFont?: Partial<FontSpec>;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
isInternationalStore?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { GRAPH_ORIENTATION };
|
|
51
|
+
export type { ChartHeadingI, StackedBarDistributionGraphDataI, StackedBarDistributionGraphI };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as i,jsx as t,Fragment as o}from"react/jsx-runtime";import{Chart as e,CategoryScale as r,LinearScale as a,BarElement as l,Tooltip as n}from"chart.js";import{Chart as s}from"react-chartjs-2";import{SmallRegular as c,TitleRegular as d}from"../../../TypographyStyle.js";import{FONTS as p,COLORS as x}from"../../../../constants/Theme.js";import{LegendWrapper as g,LegendContainer as b,LegendColor as h}from"../LineChart/LineChart.styled.js";import{GraphContainerWrapper as A}from"./VerticalBarAndLinearGraph.styles.js";e.register(r,a,l,n);const f=e=>{const r=[0,0,0,0,0,0],a=-1===e.barAxis.data.findIndex((i=>0!==i)),l=-1===e.lineAxis.data.findIndex((i=>0!==i)),n={min:0,max:2e3,stepSize:200},f=[{legend:e.barAxis.title,color:e.barAxis.graphColor},{legend:e.lineAxis.title,color:e.lineAxis.graphColor}],y={responsive:!0,plugins:{legend:{display:!1}},scales:{x:{title:{display:!!e.xAxis.title,text:e.xAxis.title,color:e.xAxis.titleColor,font:{size:p.caption.fontSize}},grid:{display:!1,borderColor:x.background.base},ticks:{fontSize:p.caption.fontSize,color:e.xAxis.labelColor??x.content.secondary}},bar:{position:"left",title:{display:!!e.barAxis.title,text:e.barAxis.title,color:e.barAxis.titleColor,font:{size:p.caption.fontSize}},grid:{borderColor:"white",color:x.background.base},ticks:{fontSize:p.caption.fontSize,color:e.barAxis.labelColor??x.content.secondary,...a?n:{}}},line:{position:"right",title:{display:!!e.lineAxis.title,text:e.lineAxis.title,color:e.lineAxis.titleColor,font:{size:p.caption.fontSize}},grid:{display:!1,borderColor:"white",color:x.background.base},ticks:{fontSize:p.caption.fontSize,color:e.lineAxis.labelColor??x.content.secondary,...l?n:{}},display:!0}},maintainAspectRatio:!1},m={labels:e.xAxis.forceShowXAxis?e.xAxis.data.map((i=>i.toString())):a&&l?["-","-","-","-","-","-"]:e.xAxis.data.map((i=>i.toString())),datasets:[{yAxisID:"line",type:"line",data:l?r:e.lineAxis.data,borderColor:e.lineAxis.graphColor||"rgba(0,0,0,0)",borderWidth:2,fill:!1,pointRadius:1},{yAxisID:"bar",type:"bar",data:a?r:e.barAxis.data,backgroundColor:e.barAxis.graphColor||"rgba(0,0,0,0)",barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return i("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t(g,{position:"center",children:f.map((({legend:e,color:r},a)=>e?i(b,{children:[t(h,{color:r}),t(c,{color:"#667085",children:e})]},a):t(o,{})))}),i(A,{children:[e.chartHeading&&t("div",{style:{marginBottom:24},children:t(d,{color:e.chartHeading.color??x.content.secondary,children:e.chartHeading.heading})}),t("div",{style:{height:e.graphCanvasHeight??500},children:t(s,{type:"bar",data:m,options:y})})]})]})};export{f as VerticalBarAndLinearGraph};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface AxisDetailsI {
|
|
2
|
+
title?: string;
|
|
3
|
+
titleColor?: string;
|
|
4
|
+
data: number[] | string[];
|
|
5
|
+
labelColor?: string;
|
|
6
|
+
graphColor?: string;
|
|
7
|
+
}
|
|
8
|
+
interface ChartHeadingI {
|
|
9
|
+
heading: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
interface VerticalBarAndLinearGraphI {
|
|
13
|
+
graphCanvasHeight?: number;
|
|
14
|
+
tickColor?: string;
|
|
15
|
+
labelColor?: string;
|
|
16
|
+
chartHeading?: ChartHeadingI;
|
|
17
|
+
xAxis: AxisDetailsI & {
|
|
18
|
+
forceShowXAxis?: boolean;
|
|
19
|
+
};
|
|
20
|
+
lineAxis: AxisDetailsI;
|
|
21
|
+
barAxis: AxisDetailsI;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type { AxisDetailsI, ChartHeadingI, VerticalBarAndLinearGraphI };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface FunnelBarChartI {
|
|
4
|
+
data?: {
|
|
5
|
+
label: string;
|
|
6
|
+
current: number;
|
|
7
|
+
previous?: number;
|
|
8
|
+
previousLabel?: string;
|
|
9
|
+
}[];
|
|
10
|
+
maintainAspectRatio?: boolean;
|
|
11
|
+
canvasHeight?: number;
|
|
12
|
+
barColors?: string[];
|
|
13
|
+
titleToolTipCallback?: (tooltipItems: any) => string;
|
|
14
|
+
}
|
|
15
|
+
declare const FunnelVerticalBarGraph: React__default.FC<FunnelBarChartI>;
|
|
16
|
+
|
|
17
|
+
export { FunnelVerticalBarGraph };
|
|
18
|
+
export type { FunnelBarChartI };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{Chart as a,CategoryScale as l,LinearScale as o,BarElement as i,Tooltip as n}from"chart.js";import{Bar as s}from"react-chartjs-2";import{SmallRegular as c}from"../../../TypographyStyle.js";import{LegendWrapper as d,LegendContainer as p,LegendColor as h}from"../LineChart/LineChart.styled.js";a.register(l,o,i,n);const m=["#DEEFFF","#FEDEF3","#FEC6C6","#DBAFFF","#FEDEBC"],b=
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{Chart as a,CategoryScale as l,LinearScale as o,BarElement as i,Tooltip as n}from"chart.js";import{Bar as s}from"react-chartjs-2";import{SmallRegular as c}from"../../../TypographyStyle.js";import{LegendWrapper as d,LegendContainer as p,LegendColor as h}from"../LineChart/LineChart.styled.js";a.register(l,o,i,n);const m=["#DEEFFF","#FEDEF3","#FEC6C6","#DBAFFF","#FEDEBC"],b=({data:a=[],maintainAspectRatio:l=!1,canvasHeight:o=300,barColors:i=m,titleToolTipCallback:n})=>{0===a.length&&(a=[{label:"",current:0,previousLabel:""}]);const b=a.map((e=>e.label)),g=a.map((e=>e.current||0)),u=a.map((e=>e.previous?Math.max((e.previous||0)-e.current,0):0)),y=a.map((e=>e.previousLabel||"")),x=i,C=a.map((e=>({text:e.label,color:x[a.indexOf(e)]}))),f=[{label:"Current Value",data:g,backgroundColor:x.slice(0,a.length),borderColor:"white",borderWidth:1,stack:"combined"},{label:"Previous Value",data:u.map((e=>e||0)),backgroundColor:x.slice(0,a.length).map((e=>((e,t)=>{let r=0,a=0,l=0;return 4===e.length?(r=parseInt(e[1]+e[1],16),a=parseInt(e[2]+e[2],16),l=parseInt(e[3]+e[3],16)):7===e.length&&(r=parseInt(e[1]+e[2],16),a=parseInt(e[3]+e[4],16),l=parseInt(e[5]+e[6],16)),`rgba(${r}, ${a}, ${l}, ${t})`})(e,.3))),borderColor:"white",borderWidth:1,stack:"combined"}],k={labels:b,datasets:f},v={maintainAspectRatio:l,responsive:!0,scales:{x:{stacked:!0,grid:{display:!1},ticks:{display:a.length>0}},y:{stacked:!0,barPercentage:.6,categoryPercentage:.7,ticks:{display:a.length>0},grid:{drawBorder:a.length>0}}},plugins:{legend:{display:!1},tooltip:{callbacks:{title:n||(e=>{const t=e[0].datasetIndex,r=e[0].dataIndex;if(1===t){return`${y[r]} but not ${b[r]}`}return e[0].label}),label:e=>` ${e.raw}`}}}};return e("div",{style:{height:l?void 0:o,display:"flex",flexDirection:"column",gap:5,width:"100%"},children:[t(d,{children:C.map((({text:a,color:l},o)=>a?e(p,{children:[t(h,{color:l,newStyle:!0}),t(c,{color:"#667085",children:a})]},o):t(r,{})))}),t("div",{style:{flex:1},children:t(s,{data:k,options:v})})]})};export{b as FunnelVerticalBarGraph};
|
package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
interface AxisDetailsI {
|
|
2
|
+
title?: string;
|
|
3
|
+
titleColor?: string;
|
|
4
|
+
data: (string | number)[];
|
|
5
|
+
labelColor?: string;
|
|
6
|
+
ticksCallback?: (value: string) => string;
|
|
7
|
+
toolTipCallback?: (value: string) => string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface RGBColorI {
|
|
11
|
+
r: number;
|
|
12
|
+
g: number;
|
|
13
|
+
b: number;
|
|
14
|
+
a?: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface ChartHeadingI {
|
|
18
|
+
heading: string;
|
|
19
|
+
color?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface VerticalGraphI {
|
|
23
|
+
graphCanvasHeight?: number;
|
|
24
|
+
tickColor?: string;
|
|
25
|
+
labelColor?: string;
|
|
26
|
+
chartHeading?: ChartHeadingI;
|
|
27
|
+
xAxis: AxisDetailsI;
|
|
28
|
+
yAxis: AxisDetailsI;
|
|
29
|
+
barColorRGBA: RGBColorI;
|
|
30
|
+
isFunnel?: boolean;
|
|
31
|
+
outerPadding?: string;
|
|
32
|
+
allowChartPopup?: boolean;
|
|
33
|
+
showConvertToPieChart?: boolean;
|
|
34
|
+
pieChartSize?: number;
|
|
35
|
+
popupData?: {
|
|
36
|
+
xAxis: AxisDetailsI;
|
|
37
|
+
yAxis: AxisDetailsI;
|
|
38
|
+
barColorRGBA: RGBColorI;
|
|
39
|
+
chartHeading?: string;
|
|
40
|
+
headerLeftCustomElement?: React.ReactNode;
|
|
41
|
+
};
|
|
42
|
+
currencyProps?: {
|
|
43
|
+
symbol?: string;
|
|
44
|
+
isInternationalStore?: boolean;
|
|
45
|
+
};
|
|
46
|
+
showTotal?: boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type { AxisDetailsI, ChartHeadingI, RGBColorI, VerticalGraphI };
|
package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as
|
|
1
|
+
import{jsxs as t,jsx as a}from"react/jsx-runtime";import o from"../../../../assets/icons/ChartBar.svg.js";import e from"../../../../assets/icons/ChartPie.svg.js";import i from"../../../../assets/icons/maximize.svg.js";import{Chart as r,CategoryScale as l,LinearScale as s,BarElement as n,Tooltip as c}from"chart.js";import p from"chartjs-plugin-datalabels";import d,{useState as g,useEffect as h,Suspense as x}from"react";import{Bar as y}from"react-chartjs-2";import{IconButton as u}from"../../../icon-button/IconButton.js";import{StyledModal as b}from"../../../modals/styledModal.js";import{TitleMedium as m}from"../../../TypographyStyle.js";import{COLORS as f,FONTS as C}from"../../../../constants/Theme.js";import{GraphContainerWrapper as A}from"./VerticalGraph.styles.js";r.register(l,s,n,c,p);const k=d.lazy((()=>import("../Pie/PieChartAnalytics.js").then((t=>({default:t.PieChartAnalytics}))))),z=r=>{const[l,s]=g(!1),[n,c]=g(!1),[p,d]=g();h((()=>{const t=[];n&&(r.popupData?.xAxis.data.forEach(((a,o)=>{t.push({name:a.toString(),count:Number(r.popupData?.yAxis.data[o])||0})})),d(t))}),[n,r.popupData?.xAxis.data,r.popupData?.yAxis.data]);const z=[250,1e3,800,1500,300,600],$=-1===r.yAxis.data.findIndex((t=>0!==t)),D=-1===r.popupData?.yAxis.data.findIndex((t=>0!==t)),S={min:0,max:2e3,stepSize:200},v={responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!$,callbacks:{label:r.yAxis.toolTipCallback}},datalabels:{display:r.showTotal??!1,anchor:"end",align:"end",clamp:!0,color:f.content.secondary}},scales:{x:{title:{display:!!r.xAxis.title,text:r.xAxis.title,color:r.xAxis.titleColor,font:{size:C.caption.fontSize}},grid:{display:!1,borderColor:f.background.base},ticks:{fontSize:C.caption.fontSize,color:r.yAxis.labelColor??f.content.secondary}},y:{title:{display:!!r.yAxis.title,text:r.yAxis.title,color:r.yAxis.titleColor,font:{size:C.caption.fontSize}},grid:{borderColor:"white",color:f.background.base},ticks:{callback:r.yAxis.ticksCallback,fontSize:C.caption.fontSize,color:r.xAxis.labelColor??f.content.secondary,...$?S:{}}}},maintainAspectRatio:!1},j={responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!D,callbacks:{label:r.yAxis.toolTipCallback}},datalabels:{display:r.showTotal??!1,anchor:"end",align:"end",clamp:!0,color:f.content.secondary}},scales:{x:{title:{display:!!r.popupData?.xAxis.title,text:r.popupData?.xAxis.title,color:r.popupData?.xAxis.titleColor,font:{size:C.caption.fontSize}},grid:{display:!1,borderColor:f.background.base},ticks:{fontSize:C.caption.fontSize,color:r.popupData?.yAxis.labelColor??f.content.secondary}},y:{title:{display:!!r.popupData?.yAxis.title,text:r.popupData?.yAxis.title,color:r.popupData?.yAxis.titleColor,font:{size:C.caption.fontSize}},grid:{borderColor:"white",color:f.background.base},ticks:{callback:r.popupData?.yAxis.ticksCallback,fontSize:C.caption.fontSize,color:r.popupData?.xAxis.labelColor??f.content.secondary,...D?S:{}}}},maintainAspectRatio:!1},P={labels:r.xAxis.data.map((t=>t.toString())),datasets:[{data:$?z:r.yAxis.data,backgroundColor:t=>{const a=r.barColorRGBA;let o=[];const e=r.xAxis.data.length;if($)return"rgba(0,0,0,0)";if(r.isFunnel){let t=+(e>10?.1:(1/e).toFixed(2));const i=`rgba(${a.r}, ${a.g}, ${a.b}`;for(let a=1;a<e+1;a++){let e="";a>10?e=`${i},1)`:(e=`${i},${t})`,t+=.1),o.push(e)}}else{const t=`rgba(${a.r}, ${a.g}, ${a.b}, ${a.a??"1"})`;o=Array(e).fill(t)}return o},barPercentage:.4,categoryPercentage:1,borderRadius:4}]},T={labels:r.popupData?.xAxis.data.map((t=>t.toString())),datasets:[{data:D?z:r.popupData?.yAxis.data,backgroundColor:t=>{const a=r.barColorRGBA;let o=[];const e=r.popupData?.xAxis.data.length||0;if($)return"rgba(0,0,0,0)";if(r.isFunnel){let t=+(e>10?.1:(1/e).toFixed(2));const i=`rgba(${a.r}, ${a.g}, ${a.b}`;for(let a=1;a<e+1;a++){let e="";a>10?e=`${i},1)`:(e=`${i},${t})`,t+=.1),o.push(e)}}else{const t=`rgba(${a.r}, ${a.g}, ${a.b}, ${a.a??"1"})`;o=Array(e).fill(t)}return o},barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return t(A,{padding:r.outerPadding,children:[r.chartHeading&&a("div",{style:{marginBottom:24},children:a(m,{color:r.chartHeading.color??f.content.secondary,children:r.chartHeading.heading})}),t("div",{style:{display:"flex",justifyContent:"flex-end"},children:[r.showConvertToPieChart&&a(u,{Icon:e,onClick:()=>{c(!0),s(!0)}}),r.allowChartPopup&&a(u,{Icon:i,onClick:()=>{s(!0)}})]}),a("div",{style:{height:r.graphCanvasHeight??500},children:a(y,{options:v,data:P})}),l&&t(b,{open:l,onClose:()=>{s(!1),c(!1)},closeOnOutsideClick:!0,headingTitle:r.popupData?.chartHeading,width:"75%",headerRightCustomElement:r.showConvertToPieChart?a(u,n?{Icon:o,onClick:()=>{c(!1)}}:{Icon:e,onClick:()=>{c(!0)}}):null,headerLeftCustomElement:r.popupData?.headerLeftCustomElement,children:[n&&p&&a("div",{style:{height:r.graphCanvasHeight??500,padding:"24px"},children:a(x,{fallback:a("div",{children:"Loading..."}),children:a(k,{slices:p,size:r.pieChartSize,hideTitle:!0,currencyProps:r.currencyProps})})}),!n&&a("div",{style:{height:r.graphCanvasHeight??500},children:a(y,{options:j,data:T})})]})]})};export{z as VerticalGraph};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import o from"styled-components";import{COLORS as
|
|
2
|
-
background-color: ${
|
|
3
|
-
padding: ${o=>
|
|
1
|
+
import o from"styled-components";import{COLORS as d}from"../../../../constants/Theme.js";const n=o.div`
|
|
2
|
+
background-color: ${d.surface.standard};
|
|
3
|
+
padding: ${o=>o.padding??"24px"};
|
|
4
4
|
`;export{n as GraphContainerWrapper};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React__default, { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
declare enum HEAT_GRADING_TYPE {
|
|
4
|
+
ABSOLUTE = 0,
|
|
5
|
+
RELATIVE = 1
|
|
6
|
+
}
|
|
7
|
+
interface HeatMapInputInterface {
|
|
8
|
+
title: string;
|
|
9
|
+
xLabels: string[];
|
|
10
|
+
yLabels: string[];
|
|
11
|
+
values: number[][];
|
|
12
|
+
heatType: HEAT_GRADING_TYPE;
|
|
13
|
+
absolutHeatValues?: number[];
|
|
14
|
+
hideXLabels?: boolean;
|
|
15
|
+
customComponent?: ReactNode;
|
|
16
|
+
heatBoxWidth?: number;
|
|
17
|
+
heatBoxHeight?: number;
|
|
18
|
+
isLooseFit?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare enum HEAT {
|
|
21
|
+
LOW = 0,
|
|
22
|
+
MEDIUM = 1,
|
|
23
|
+
HIGH = 2,
|
|
24
|
+
HIGHEST = 3
|
|
25
|
+
}
|
|
26
|
+
declare const HEAT_COLORS: {
|
|
27
|
+
0: string;
|
|
28
|
+
1: string;
|
|
29
|
+
2: string;
|
|
30
|
+
3: string;
|
|
31
|
+
};
|
|
32
|
+
declare const HeatMap: React__default.FC<HeatMapInputInterface>;
|
|
33
|
+
|
|
34
|
+
export { HEAT, HEAT_COLORS, HEAT_GRADING_TYPE, HeatMap };
|
|
35
|
+
export type { HeatMapInputInterface };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,Fragment as e,jsxs as o}from"react/jsx-runtime";import{useState as r,useEffect as l}from"react";import{Tooltip as i}from"../../../tooltips/Tooltip.js";import{TitleMedium as n,Caption as a,BodyTiny as c}from"../../../TypographyStyle.js";import{COLORS as h}from"../../../../constants/Theme.js";import{HeatBoxStyled as s,HeatBox as d}from"./HeatMapStyled.js";var m=(t=>(t[t.ABSOLUTE=0]="ABSOLUTE",t[t.RELATIVE=1]="RELATIVE",t))(m||{}),p=(t=>(t[t.LOW=0]="LOW",t[t.MEDIUM=1]="MEDIUM",t[t.HIGH=2]="HIGH",t[t.HIGHEST=3]="HIGHEST",t))(p||{});const y={0:"#EBDBFF",1:"#D2AEFF",2:"#9E77ED",3:"#5E07BB"},B=
|
|
1
|
+
import{jsx as t,Fragment as e,jsxs as o}from"react/jsx-runtime";import{useState as r,useEffect as l}from"react";import{Tooltip as i}from"../../../tooltips/Tooltip.js";import{TitleMedium as n,Caption as a,BodyTiny as c}from"../../../TypographyStyle.js";import{COLORS as h}from"../../../../constants/Theme.js";import{HeatBoxStyled as s,HeatBox as d}from"./HeatMapStyled.js";var m=(t=>(t[t.ABSOLUTE=0]="ABSOLUTE",t[t.RELATIVE=1]="RELATIVE",t))(m||{}),p=(t=>(t[t.LOW=0]="LOW",t[t.MEDIUM=1]="MEDIUM",t[t.HIGH=2]="HIGH",t[t.HIGHEST=3]="HIGHEST",t))(p||{});const y={0:"#EBDBFF",1:"#D2AEFF",2:"#9E77ED",3:"#5E07BB"},B=({title:m,xLabels:p,yLabels:B,values:x,heatType:H,absolutHeatValues:E,hideXLabels:L,customComponent:f,heatBoxWidth:g,heatBoxHeight:T,isLooseFit:u})=>{const[I,b]=r(),M=u?{display:"flex",justifyContent:"center",alignItems:"center"}:{};return l((()=>{const t=Math.max(...x.flat()),e=Math.min(...x.flat());b(x.map((o=>o.map((o=>((t,e,o,r,l)=>{if(0===e)return t<=o[0]?0:t<=o[1]?1:t<=o[2]?2:3;{const e=(l-r)/4;return t<=r+e?0:t<=r+2*e?1:t<=r+3*e?2:3}})(o,H,E||[],e,t))))))}),[x,E]),I?o(s,{isLooseFit:u,children:[o("div",{className:"top-container",children:[o("div",{className:"top-container__heading",children:[t(n,{style:{color:h.content.primary},children:m}),f]}),o("div",{className:"top-container__legend",children:[t(a,{style:{color:h.content.secondary},children:"Less"}),t(d,{heatBoxWidth:g,heatBoxHeight:T,color:y[0]}),t(d,{heatBoxWidth:g,heatBoxHeight:T,color:y[1]}),t(d,{heatBoxWidth:g,heatBoxHeight:T,color:y[2]}),t(d,{heatBoxWidth:g,heatBoxHeight:T,color:y[3]}),t(a,{style:{color:h.content.secondary},children:"More"})]})]}),t("table",{style:M,children:o("tbody",{children:[B.map(((e,r)=>o("tr",{children:[t("td",{children:t(c,{style:{color:h.content.placeholder},children:e})}),p.map(((e,o)=>t("td",{children:t(i,{body:x[r][o].toString(),placement:"bottom",children:t(d,{color:y[I[r][o]],heatBoxWidth:g,heatBoxHeight:T})})},e)))]},e))),!L&&o("tr",{children:[t("th",{}),p.map(((e,o)=>t("th",{children:t(c,{style:{color:h.content.placeholder},children:e})},e)))]})]})})]}):t(e,{})};export{p as HEAT,y as HEAT_COLORS,m as HEAT_GRADING_TYPE,B as HeatMap};
|
|
@@ -1 +1,38 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"@emotion/styled";const t=e.div`
|
|
2
|
+
width: ${e=>e.isLooseFit?"100%":"fit-content"};
|
|
3
|
+
.top-container {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
margin-bottom: 16px;
|
|
8
|
+
|
|
9
|
+
&__heading {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
gap: 8px;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__legend {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
gap: 6px;
|
|
21
|
+
align-items: center;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.box {
|
|
26
|
+
width: 74px;
|
|
27
|
+
height: 14px;
|
|
28
|
+
border-radius: 2px;
|
|
29
|
+
margin: 2px;
|
|
30
|
+
background-color: ${e=>e.color};
|
|
31
|
+
}
|
|
32
|
+
`,i=e.div`
|
|
33
|
+
width: ${e=>e.heatBoxWidth?e.heatBoxWidth:24}px;
|
|
34
|
+
height: ${e=>e.heatBoxHeight?e.heatBoxHeight:24}px;
|
|
35
|
+
border-radius: 2px;
|
|
36
|
+
margin: 2px;
|
|
37
|
+
background-color: ${e=>e.color};
|
|
38
|
+
`;export{i as HeatBox,t as HeatBoxStyled};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as _emotion_styled from '@emotion/styled';
|
|
2
|
+
import * as _emotion_react from '@emotion/react';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
|
|
5
|
+
interface HeatMapVerticalInputInterface {
|
|
6
|
+
title: string;
|
|
7
|
+
xLabels: string[];
|
|
8
|
+
yLabels: string[];
|
|
9
|
+
values: number[][];
|
|
10
|
+
absolutHeatValues: number[];
|
|
11
|
+
hideXLabels?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const HeatMapVertical: React__default.FC<HeatMapVerticalInputInterface>;
|
|
14
|
+
declare const HeatBoxStyled: _emotion_styled.StyledComponent<{
|
|
15
|
+
theme?: _emotion_react.Theme | undefined;
|
|
16
|
+
as?: React__default.ElementType<any> | undefined;
|
|
17
|
+
}, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
|
+
|
|
19
|
+
export { HeatBoxStyled, HeatMapVertical };
|
|
20
|
+
export type { HeatMapVerticalInputInterface };
|