sag_components 1.0.913 → 1.0.915
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/stories/components/AttachedFile.js +1 -1
- package/dist/stories/components/AttachedFile.style.js +6 -40
- package/dist/stories/components/AutocompleteField.style.js +7 -47
- package/dist/stories/components/BannerEventBox.style.js +14 -66
- package/dist/stories/components/BannerEventBoxList.js +1 -2
- package/dist/stories/components/BannerEventBoxList.style.js +15 -174
- package/dist/stories/components/BannersDropdown.style.js +10 -91
- package/dist/stories/components/BarChart.js +2 -2
- package/dist/stories/components/BarChart.style.js +10 -52
- package/dist/stories/components/BarChartTwoRows.js +2 -2
- package/dist/stories/components/BarChartTwoRows.style.js +10 -53
- package/dist/stories/components/BarChartWithAreaChart.js +9 -9
- package/dist/stories/components/BarChartWithAreaChart.style.js +11 -56
- package/dist/stories/components/BarChartsByWeeks.js +3 -7
- package/dist/stories/components/BarChartsByWeeks.style.js +13 -88
- package/dist/stories/components/Benchmark.style.js +7 -53
- package/dist/stories/components/Button.js +1 -1
- package/dist/stories/components/Button.style.js +7 -82
- package/dist/stories/components/CampaignTool/CampaignDemoReport.style.js +7 -40
- package/dist/stories/components/CampaignTool/Card.style.js +10 -58
- package/dist/stories/components/CampaignTool/MultipleCard.style.js +3 -6
- package/dist/stories/components/CampaignTool/PageFilterBar.style.js +4 -14
- package/dist/stories/components/CampaignTool/Popup.style.js +16 -114
- package/dist/stories/components/CampaignTool/PopupContent.style.js +11 -64
- package/dist/stories/components/CampaignTool/Table.js +2 -2
- package/dist/stories/components/CampaignTool/Table.style.js +9 -79
- package/dist/stories/components/CheckBox.style.js +6 -28
- package/dist/stories/components/CheckBoxButton.style.js +6 -31
- package/dist/stories/components/CodeEditor.style.js +3 -4
- package/dist/stories/components/CollapseData.js +5 -5
- package/dist/stories/components/CollapseData.style.js +13 -119
- package/dist/stories/components/CollapseHeader.style.js +27 -192
- package/dist/stories/components/CollapseMenuItem.style.js +9 -53
- package/dist/stories/components/Datepicker.style.js +3 -9
- package/dist/stories/components/DownloadProgress.style.js +6 -43
- package/dist/stories/components/Dropdown.style.js +3 -9
- package/dist/stories/components/DropdownMulti.js +1 -1
- package/dist/stories/components/DropdownMulti.style.js +3 -9
- package/dist/stories/components/DropdownMultiNew.js +1 -1
- package/dist/stories/components/DropdownMultiNew.style.js +16 -193
- package/dist/stories/components/DropdownNew.style.js +3 -14
- package/dist/stories/components/DropdownSingleNew.style.js +14 -162
- package/dist/stories/components/EventDetailsCard.style.js +10 -86
- package/dist/stories/components/EventList.style.js +6 -30
- package/dist/stories/components/EventListItem.style.js +6 -39
- package/dist/stories/components/FilterContainer.style.js +5 -22
- package/dist/stories/components/FilterPanel.js +17 -17
- package/dist/stories/components/FilterPanel.style.js +13 -81
- package/dist/stories/components/FormattedValue.style.js +10 -83
- package/dist/stories/components/HaiTooltip.js +103 -0
- package/dist/stories/components/HaiTooltip.style.js +12 -0
- package/dist/stories/components/IconButton.style.js +7 -56
- package/dist/stories/components/Input.style.js +9 -123
- package/dist/stories/components/InputOld.style.js +8 -62
- package/dist/stories/components/KpiFilter.style.js +18 -124
- package/dist/stories/components/LinkButton.style.js +6 -45
- package/dist/stories/components/LinnerDataBox.js +1 -1
- package/dist/stories/components/LinnerDataBox.style.js +14 -60
- package/dist/stories/components/ListBox.style.js +6 -40
- package/dist/stories/components/MarketShareDescription.style.js +19 -207
- package/dist/stories/components/Modal.style.js +8 -56
- package/dist/stories/components/ModalTotalBenchmark.js +6 -6
- package/dist/stories/components/MonthPicker.js +2 -2
- package/dist/stories/components/MonthPicker.style.js +10 -96
- package/dist/stories/components/MonthPopupPicker.js +13 -92
- package/dist/stories/components/NoDataFoundMessage.style.js +5 -31
- package/dist/stories/components/OneColumnContainer.style.js +12 -99
- package/dist/stories/components/PerformanceAnalytics.js +9 -25
- package/dist/stories/components/PerformanceAnalytics.style.js +17 -136
- package/dist/stories/components/PerformanceAnalyticsLegend.js +1 -1
- package/dist/stories/components/PerformanceAnalyticsLegend.style.js +8 -55
- package/dist/stories/components/PerformanceAnalyticsOneColumn.js +5 -12
- package/dist/stories/components/PerformanceAnalyticsOneColumn.style.js +15 -108
- package/dist/stories/components/PerformanceAnalyticsTotals.js +1 -1
- package/dist/stories/components/PerformanceAnalyticsTotals.style.js +12 -81
- package/dist/stories/components/PopupCharts.style.js +15 -100
- package/dist/stories/components/ProductsVariety.style.js +12 -78
- package/dist/stories/components/ProgressBar.style.js +4 -15
- package/dist/stories/components/QuarterPicker.js +2 -2
- package/dist/stories/components/QuarterPicker.style.js +10 -95
- package/dist/stories/components/QuarterPopupPicker.js +12 -86
- package/dist/stories/components/QuickFilter.style.js +3 -13
- package/dist/stories/components/QuickFilterDropdownMultiSelection.js +1 -1
- package/dist/stories/components/QuickFilterDropdownMultiSelection.style.js +16 -182
- package/dist/stories/components/QuickFilterDropdownSingle.style.js +15 -127
- package/dist/stories/components/RangeDatePicker.js +12 -96
- package/dist/stories/components/RangePicker.js +2 -2
- package/dist/stories/components/RangePicker.style.js +10 -100
- package/dist/stories/components/Rbackup.js +453 -0
- package/dist/stories/components/ReportTable.js +27 -6
- package/dist/stories/components/ReportTable.style.js +14 -123
- package/dist/stories/components/SagButton.style.js +5 -39
- package/dist/stories/components/SagIconButton.style.js +4 -22
- package/dist/stories/components/SagInput.style.js +5 -33
- package/dist/stories/components/SalesAndROI.style.js +11 -103
- package/dist/stories/components/SearchInput.style.js +4 -29
- package/dist/stories/components/SegmentedButton.js +5 -5
- package/dist/stories/components/SegmentedButton.style.js +9 -90
- package/dist/stories/components/Select.style.js +9 -93
- package/dist/stories/components/SingleBarLineCharts.js +49 -80
- package/dist/stories/components/SingleBarLineCharts.style.js +9 -77
- package/dist/stories/components/TabMenu.js +7 -19
- package/dist/stories/components/TabMenu.style.js +14 -105
- package/dist/stories/components/TextField.style.js +3 -10
- package/dist/stories/components/TitleDescription.style.js +28 -214
- package/dist/stories/components/Tooltip.js +1 -1
- package/dist/stories/components/Tooltip.style.js +5 -90
- package/dist/stories/components/TopToggleList.style.js +8 -43
- package/dist/stories/components/TotalBenchmark.style.js +11 -71
- package/dist/stories/components/TotalBenchmarkAreachart.js +3 -3
- package/dist/stories/components/TotalBenchmarkAreachart.style.js +22 -163
- package/dist/stories/components/TotalBenchmarkArrows.style.js +16 -100
- package/dist/stories/components/TotalBenchmarkBarchart.style.js +12 -69
- package/dist/stories/components/TotalDoughnutChart.js +3 -7
- package/dist/stories/components/TotalDoughnutChart.style.js +22 -170
- package/dist/stories/components/TotalHorizontalCharts.js +9 -12
- package/dist/stories/components/TotalHorizontalCharts.style.js +12 -113
- package/dist/stories/components/TspanTooltip.js +7 -24
- package/dist/stories/components/TspanTooltip.style.js +5 -97
- package/dist/stories/components/TwoBarCharts.js +2 -2
- package/dist/stories/components/TwoBarCharts.style.js +10 -52
- package/dist/stories/utils/IconsHandler.style.js +3 -8
- package/package.json +1 -1
- package/dist/stories/components/AttachedFile/AttachedFile.js +0 -62
- package/dist/stories/components/AttachedFile/AttachedFile.stories.js +0 -36
- package/dist/stories/components/AttachedFile/AttachedFile.style.js +0 -14
- package/dist/stories/components/BannerEventBox/BannerEventBox.js +0 -87
- package/dist/stories/components/BannerEventBox/BannerEventBox.stories.js +0 -58
- package/dist/stories/components/BannerEventBox/BannerEventBox.style.js +0 -22
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.js +0 -148
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.stories.js +0 -30
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.style.js +0 -22
- package/dist/stories/components/BannersDropdown/BannersDropdown.js +0 -115
- package/dist/stories/components/BannersDropdown/BannersDropdown.stories.js +0 -64
- package/dist/stories/components/BannersDropdown/BannersDropdown.style.js +0 -18
- package/dist/stories/components/BarChart/BarChart.js +0 -189
- package/dist/stories/components/BarChart/BarChart.stories.js +0 -144
- package/dist/stories/components/BarChart/BarChart.style.js +0 -18
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.js +0 -204
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.stories.js +0 -133
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.style.js +0 -18
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.js +0 -295
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.stories.js +0 -442
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.style.js +0 -21
- package/dist/stories/components/Benchmark/Benchmark.js +0 -130
- package/dist/stories/components/Benchmark/Benchmark.stories.js +0 -148
- package/dist/stories/components/Benchmark/Benchmark.style.js +0 -15
- package/dist/stories/components/Button/Button.js +0 -217
- package/dist/stories/components/Button/Button.stories.js +0 -269
- package/dist/stories/components/Button/Button.style.js +0 -15
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.js +0 -48
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.stories.js +0 -65
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.style.js +0 -15
- package/dist/stories/components/Card/Card.js +0 -72
- package/dist/stories/components/Card/Card.stories.js +0 -92
- package/dist/stories/components/Card/Card.style.js +0 -18
- package/dist/stories/components/CheckBox/CheckBox.js +0 -76
- package/dist/stories/components/CheckBox/CheckBox.stories.js +0 -107
- package/dist/stories/components/CheckBox/CheckBox.style.js +0 -14
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.js +0 -69
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.stories.js +0 -150
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.style.js +0 -14
- package/dist/stories/components/CodeEditor/CodeEditor.js +0 -43
- package/dist/stories/components/CodeEditor/CodeEditor.style.js +0 -12
- package/dist/stories/components/CollapseData/CollapseData.js +0 -66
- package/dist/stories/components/CollapseData/CollapseData.stories.js +0 -125
- package/dist/stories/components/CollapseData/CollapseData.style.js +0 -21
- package/dist/stories/components/CollapseHeader/CollapseHeader.js +0 -267
- package/dist/stories/components/CollapseHeader/CollapseHeader.stories.js +0 -116
- package/dist/stories/components/CollapseHeader/CollapseHeader.style.js +0 -35
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.js +0 -61
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.stories.js +0 -161
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.style.js +0 -17
- package/dist/stories/components/Datepicker/Datepicker.js +0 -148
- package/dist/stories/components/Datepicker/Datepicker.stories.js +0 -86
- package/dist/stories/components/Datepicker/Datepicker.style.js +0 -13
- package/dist/stories/components/DownloadProgress/DownloadProgress.js +0 -97
- package/dist/stories/components/DownloadProgress/DownloadProgress.stories.js +0 -111
- package/dist/stories/components/DownloadProgress/DownloadProgress.style.js +0 -14
- package/dist/stories/components/Dropdown/Dropdown.js +0 -231
- package/dist/stories/components/Dropdown/Dropdown.stories.js +0 -323
- package/dist/stories/components/Dropdown/Dropdown.style.js +0 -11
- package/dist/stories/components/DropdownMulti/DropdownMulti.js +0 -290
- package/dist/stories/components/DropdownMulti/DropdownMulti.stories.js +0 -220
- package/dist/stories/components/DropdownMulti/DropdownMulti.style.js +0 -11
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.js +0 -279
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.style.js +0 -28
- package/dist/stories/components/DropdownNew/DropdownNew.js +0 -88
- package/dist/stories/components/DropdownNew/DropdownNew.stories.js +0 -407
- package/dist/stories/components/DropdownNew/DropdownNew.style.js +0 -11
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.js +0 -234
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.style.js +0 -26
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.js +0 -144
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.stories.js +0 -57
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.style.js +0 -18
- package/dist/stories/components/EventList/EventList.js +0 -61
- package/dist/stories/components/EventList/EventList.stories.js +0 -84
- package/dist/stories/components/EventList/EventList.style.js +0 -14
- package/dist/stories/components/EventListItem/EventListItem.js +0 -50
- package/dist/stories/components/EventListItem/EventListItem.stories.js +0 -65
- package/dist/stories/components/EventListItem/EventListItem.style.js +0 -14
- package/dist/stories/components/FilterContainer/FilterContainer.js +0 -29
- package/dist/stories/components/FilterContainer/FilterContainer.stories.js +0 -23
- package/dist/stories/components/FilterContainer/FilterContainer.style.js +0 -13
- package/dist/stories/components/FilterPanel/FilterPanel.js +0 -566
- package/dist/stories/components/FilterPanel/FilterPanel.stories.js +0 -967
- package/dist/stories/components/FilterPanel/FilterPanel.style.js +0 -21
- package/dist/stories/components/FormInput/FormInput.js +0 -41
- package/dist/stories/components/FormSelect/FormSelect.js +0 -42
- package/dist/stories/components/FormattedValue/FormattedValue.js +0 -68
- package/dist/stories/components/FormattedValue/FormattedValue.stories.js +0 -189
- package/dist/stories/components/FormattedValue/FormattedValue.style.js +0 -18
- package/dist/stories/components/IconButton/IconButton.js +0 -147
- package/dist/stories/components/IconButton/IconButton.stories.js +0 -131
- package/dist/stories/components/IconButton/IconButton.style.js +0 -15
- package/dist/stories/components/Input/Input.js +0 -183
- package/dist/stories/components/Input/Input.stories.js +0 -434
- package/dist/stories/components/Input/Input.style.js +0 -17
- package/dist/stories/components/InputOld/InputOld.js +0 -90
- package/dist/stories/components/InputOld/InputOld.stories.js +0 -100
- package/dist/stories/components/InputOld/InputOld.style.js +0 -16
- package/dist/stories/components/KpiFilter/KpiFilter.js +0 -313
- package/dist/stories/components/KpiFilter/KpiFilter.stories.js +0 -380
- package/dist/stories/components/KpiFilter/KpiFilter.style.js +0 -26
- package/dist/stories/components/LinkButton/LinkButton.js +0 -207
- package/dist/stories/components/LinkButton/LinkButton.stories.js +0 -180
- package/dist/stories/components/LinkButton/LinkButton.style.js +0 -14
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.js +0 -43
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.stories.js +0 -56
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.style.js +0 -22
- package/dist/stories/components/ListBox/ListBox.js +0 -82
- package/dist/stories/components/ListBox/ListBox.stories.js +0 -132
- package/dist/stories/components/ListBox/ListBox.style.js +0 -14
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.js +0 -109
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.stories.js +0 -184
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.style.js +0 -27
- package/dist/stories/components/Modal/Modal.js +0 -21
- package/dist/stories/components/Modal/Modal.style.js +0 -17
- package/dist/stories/components/Modal/ModalTotalBenchmark.js +0 -224
- package/dist/stories/components/Modal/ModalTotalCost.js +0 -139
- package/dist/stories/components/MonthPicker/MonthPicker.js +0 -166
- package/dist/stories/components/MonthPicker/MonthPicker.stories.js +0 -140
- package/dist/stories/components/MonthPicker/MonthPicker.style.js +0 -18
- package/dist/stories/components/MonthPicker/MonthPopupPicker.js +0 -122
- package/dist/stories/components/MultipleCard/MultipleCard.js +0 -26
- package/dist/stories/components/MultipleCard/MultipleCard.stories.js +0 -33
- package/dist/stories/components/MultipleCard/MultipleCard.style.js +0 -11
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.js +0 -30
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.stories.js +0 -66
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.style.js +0 -13
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.js +0 -121
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.stories.js +0 -119
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.style.js +0 -20
- package/dist/stories/components/PageFilterBar/PageFilterBar.js +0 -23
- package/dist/stories/components/PageFilterBar/PageFilterBar.stories.js +0 -28
- package/dist/stories/components/PageFilterBar/PageFilterBar.style.js +0 -12
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.js +0 -431
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.stories.js +0 -258
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.style.js +0 -25
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.js +0 -58
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.stories.js +0 -86
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.style.js +0 -16
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.js +0 -315
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.stories.js +0 -231
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.style.js +0 -23
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.js +0 -70
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.stories.js +0 -100
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.style.js +0 -20
- package/dist/stories/components/Popup/Popup.js +0 -172
- package/dist/stories/components/Popup/Popup.stories.js +0 -704
- package/dist/stories/components/Popup/Popup.style.js +0 -24
- package/dist/stories/components/PopupCharts/PopupCharts.js +0 -244
- package/dist/stories/components/PopupCharts/PopupCharts.stories.js +0 -1203
- package/dist/stories/components/PopupCharts/PopupCharts.style.js +0 -23
- package/dist/stories/components/PopupContent/PopupContent.js +0 -111
- package/dist/stories/components/PopupContent/PopupContent.style.js +0 -21
- package/dist/stories/components/PopupContent/PopupFieldsRules.js +0 -168
- package/dist/stories/components/ProductsVariety/ProductsVariety.js +0 -94
- package/dist/stories/components/ProductsVariety/ProductsVariety.stories.js +0 -91
- package/dist/stories/components/ProductsVariety/ProductsVariety.style.js +0 -20
- package/dist/stories/components/ProgressBar/ProgressBar.js +0 -52
- package/dist/stories/components/ProgressBar/ProgressBar.stories.js +0 -72
- package/dist/stories/components/ProgressBar/ProgressBar.style.js +0 -13
- package/dist/stories/components/QuarterPicker/QuarterPicker.js +0 -165
- package/dist/stories/components/QuarterPicker/QuarterPicker.stories.js +0 -140
- package/dist/stories/components/QuarterPicker/QuarterPicker.style.js +0 -18
- package/dist/stories/components/QuarterPicker/QuarterPopupPicker.js +0 -109
- package/dist/stories/components/QuickFilter/QuickFilter.js +0 -77
- package/dist/stories/components/QuickFilter/QuickFilter.stories.js +0 -281
- package/dist/stories/components/QuickFilter/QuickFilter.style.js +0 -11
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.js +0 -299
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.style.js +0 -28
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.js +0 -230
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.style.js +0 -27
- package/dist/stories/components/RangePicker/RangeDatePicker.js +0 -146
- package/dist/stories/components/RangePicker/RangePicker.js +0 -176
- package/dist/stories/components/RangePicker/RangePicker.stories.js +0 -138
- package/dist/stories/components/RangePicker/RangePicker.style.js +0 -18
- package/dist/stories/components/ReportTable/ReportTable.js +0 -262
- package/dist/stories/components/ReportTable/ReportTable.stories.js +0 -151
- package/dist/stories/components/ReportTable/ReportTable.style.js +0 -22
- package/dist/stories/components/SagButton/SagButton.js +0 -68
- package/dist/stories/components/SagButton/SagButton.stories.js +0 -118
- package/dist/stories/components/SagButton/SagButton.style.js +0 -13
- package/dist/stories/components/SagIconButton/SagIconButton.js +0 -130
- package/dist/stories/components/SagIconButton/SagIconButton.stories.js +0 -123
- package/dist/stories/components/SagIconButton/SagIconButton.style.js +0 -12
- package/dist/stories/components/SagInput/SagInput.js +0 -53
- package/dist/stories/components/SagInput/SagInput.stories.js +0 -69
- package/dist/stories/components/SagInput/SagInput.style.js +0 -13
- package/dist/stories/components/SalesAndROI/SalesAndROI.js +0 -89
- package/dist/stories/components/SalesAndROI/SalesAndROI.stories.js +0 -168
- package/dist/stories/components/SalesAndROI/SalesAndROI.style.js +0 -19
- package/dist/stories/components/SearchInput/SearchInput.js +0 -39
- package/dist/stories/components/SearchInput/SearchInput.stories.js +0 -44
- package/dist/stories/components/SearchInput/SearchInput.style.js +0 -12
- package/dist/stories/components/SegmentedButton/SegmentedButton.js +0 -122
- package/dist/stories/components/SegmentedButton/SegmentedButton.stories.js +0 -183
- package/dist/stories/components/SegmentedButton/SegmentedButton.style.js +0 -19
- package/dist/stories/components/Select/Select.js +0 -135
- package/dist/stories/components/Select/Select.stories.js +0 -200
- package/dist/stories/components/Select/Select.style.js +0 -19
- package/dist/stories/components/TabMenu/TabMenu.js +0 -202
- package/dist/stories/components/TabMenu/TabMenu.stories.js +0 -76
- package/dist/stories/components/TabMenu/TabMenu.style.js +0 -24
- package/dist/stories/components/Table/Table.js +0 -195
- package/dist/stories/components/Table/Table.stories.js +0 -104
- package/dist/stories/components/Table/Table.style.js +0 -17
- package/dist/stories/components/TextField/TextField.js +0 -209
- package/dist/stories/components/TextField/TextField.stories.js +0 -162
- package/dist/stories/components/TextField/TextField.style.js +0 -11
- package/dist/stories/components/TitleDescription/TitleDescription.js +0 -272
- package/dist/stories/components/TitleDescription/TitleDescription.stories.js +0 -117
- package/dist/stories/components/TitleDescription/TitleDescription.style.js +0 -36
- package/dist/stories/components/Tooltip/Tooltip.js +0 -31
- package/dist/stories/components/Tooltip/Tooltip.style.js +0 -18
- package/dist/stories/components/TopToggleList/TopToggleList.js +0 -46
- package/dist/stories/components/TopToggleList/TopToggleList.stories.js +0 -52
- package/dist/stories/components/TopToggleList/TopToggleList.style.js +0 -16
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.js +0 -97
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.stories.js +0 -138
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.style.js +0 -21
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.js +0 -342
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.stories.js +0 -343
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.style.js +0 -30
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.js +0 -149
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.stories.js +0 -172
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.style.js +0 -24
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.js +0 -165
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.stories.js +0 -185
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.style.js +0 -20
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.js +0 -182
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.stories.js +0 -290
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.style.js +0 -30
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.js +0 -207
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.stories.js +0 -158
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.style.js +0 -20
- package/dist/stories/components/TspanTooltip/TspanTooltip.js +0 -16
- package/dist/stories/components/TspanTooltip/TspanTooltip.style.js +0 -13
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.js +0 -202
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.stories.js +0 -120
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.style.js +0 -18
- package/dist/stories/icons/ArrowDownIcon.js +0 -27
- package/dist/stories/icons/ArrowDropDownIcon.js +0 -27
- package/dist/stories/icons/ArrowSelectIcon.js +0 -27
- package/dist/stories/icons/ArrowUpIcon.js +0 -27
- package/dist/stories/icons/AttachedIcon.js +0 -27
- package/dist/stories/icons/BellIcon.js +0 -27
- package/dist/stories/icons/Calendar.js +0 -20
- package/dist/stories/icons/CalendarIcon.js +0 -27
- package/dist/stories/icons/CalendarInOpen.js +0 -26
- package/dist/stories/icons/CheckBoxButtonCheckedIcon.js +0 -28
- package/dist/stories/icons/CheckBoxCheckedIcon.js +0 -28
- package/dist/stories/icons/CheckBoxNotCheckedIcon.js +0 -28
- package/dist/stories/icons/ChervronLeftIcon.js +0 -20
- package/dist/stories/icons/ChervronRightIcon.js +0 -20
- package/dist/stories/icons/ClockIcon.js +0 -27
- package/dist/stories/icons/CloseIcon.js +0 -27
- package/dist/stories/icons/CloseXIcon.js +0 -27
- package/dist/stories/icons/ComboBoxArrowDownIcon.js +0 -28
- package/dist/stories/icons/ComboBoxArrowUpIcon.js +0 -28
- package/dist/stories/icons/DocumentIcon.js +0 -48
- package/dist/stories/icons/DownloadIcon.js +0 -27
- package/dist/stories/icons/Duplicate.js +0 -28
- package/dist/stories/icons/ErrorIcon.js +0 -27
- package/dist/stories/icons/ExitIcon.js +0 -28
- package/dist/stories/icons/ExportIcon.js +0 -28
- package/dist/stories/icons/EyeIcon.js +0 -28
- package/dist/stories/icons/FileIcon.js +0 -27
- package/dist/stories/icons/FilterIcon.js +0 -36
- package/dist/stories/icons/FlyIcon.js +0 -28
- package/dist/stories/icons/FoodLionIcon.js +0 -3076
- package/dist/stories/icons/FoodLionNewIcon.js +0 -39
- package/dist/stories/icons/GiantFoodIcon.js +0 -1976
- package/dist/stories/icons/GiantFoodIcon_new.js +0 -42
- package/dist/stories/icons/HannafordIcon.js +0 -5017
- package/dist/stories/icons/HannafordIcon_new.js +0 -41
- package/dist/stories/icons/HannafordNewIcon.js +0 -213
- package/dist/stories/icons/InfoIcon.js +0 -28
- package/dist/stories/icons/LampIcon.js +0 -27
- package/dist/stories/icons/LegendLineIcon.js +0 -29
- package/dist/stories/icons/LegendUnionIcon.js +0 -29
- package/dist/stories/icons/MaintenanceIcon.js +0 -28
- package/dist/stories/icons/MenuItemClosedIcon.js +0 -28
- package/dist/stories/icons/MenuItemOpenIcon.js +0 -28
- package/dist/stories/icons/MenuItemRightIcon.js +0 -28
- package/dist/stories/icons/MenuItemUpIcon.js +0 -28
- package/dist/stories/icons/NoDataFoundIcon.js +0 -86
- package/dist/stories/icons/OptionsIcon.js +0 -27
- package/dist/stories/icons/SearchIcon.js +0 -27
- package/dist/stories/icons/ShoppingCartIcon.js +0 -45
- package/dist/stories/icons/ShoutIcon.js +0 -27
- package/dist/stories/icons/SpotlightProductIcon.js +0 -28
- package/dist/stories/icons/StopAndShopIcon.js +0 -134
- package/dist/stories/icons/StopAndShopNewIcon.js +0 -41
- package/dist/stories/icons/SucceededIcon.js +0 -27
- package/dist/stories/icons/TheGiantCompanyIcon.js +0 -40
- package/dist/stories/icons/TheGiantCompanyNewIcon.js +0 -39
- package/dist/stories/utils/CommonFunctions.js +0 -78
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.ValueAndBenchmarkContainer = exports.Title = exports.FormattedValue = exports.DetailsTitle = exports.DetailsRowTitle = exports.DetailsRowPercentSign = exports.DetailsRowFormattedValueNoDataMessage = exports.DetailsRowFormattedValue = exports.DetailsRowContainer = exports.DetailsRowArrowContainer = exports.DetailsContainer = exports.ControlsContainer = exports.Controls = exports.BenchmarkContainer = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
11
|
-
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n position: relative;\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 12px;\n align-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"])), props => props.textColor, props => props.width, props => props.height);
|
|
12
|
-
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n border-radius: 12px;\n width: 90%;\n height: 100%;\n background: #ffffff; \n flex-direction: column;\n flex-basis: 100%;\n //align-items: center;\n align-items: flex-start;\n justify-content: space-between;\n padding: 0px 0.8rem;\n \n"])));
|
|
13
|
-
const Title = exports.Title = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)([" \n font-weight: 500;\n font-size: 1rem;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
14
|
-
const ValueAndBenchmarkContainer = exports.ValueAndBenchmarkContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: baseline;\n height: 45%;\n"])));
|
|
15
|
-
const FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.1rem;\n font-weight: 500;\n font-size: 40px;\n @media (max-width: 1536px) {\n font-size: 24px;\n } \n @media (max-width: 1366px) {\n font-size: 20px;\n }\n"])));
|
|
16
|
-
const BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 0.77778rem;\n width: 5.35rem;\n"])));
|
|
17
|
-
const DetailsContainer = exports.DetailsContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n height: 50%;\n"])));
|
|
18
|
-
const DetailsTitle = exports.DetailsTitle = _styledComponents.default.h5(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n margin-top: 0;\n margin-bottom: 12px;\n @media (max-width: 1536px) {\n font-size: 14px;\n } \n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
19
|
-
const DetailsRowContainer = exports.DetailsRowContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n text-align: center;\n align-items: baseline;\n gap: 4px;\n font-weight: 700;\n font-size: 14px;\n"])));
|
|
20
|
-
const DetailsRowArrowContainer = exports.DetailsRowArrowContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: flex-end;\n"])));
|
|
21
|
-
const DetailsRowFormattedValue = exports.DetailsRowFormattedValue = _styledComponents.default.span(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 700;\n"])));
|
|
22
|
-
const DetailsRowFormattedValueNoDataMessage = exports.DetailsRowFormattedValueNoDataMessage = _styledComponents.default.span(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0; \n"])));
|
|
23
|
-
const DetailsRowPercentSign = exports.DetailsRowPercentSign = _styledComponents.default.span(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 12px;\n"])));
|
|
24
|
-
const DetailsRowTitle = exports.DetailsRowTitle = _styledComponents.default.span(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n"])));
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.TotalBenchmarkBarchart = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _recharts = require("recharts");
|
|
10
|
-
var _NoDataFoundMessage = require("../NoDataFoundMessage/NoDataFoundMessage");
|
|
11
|
-
var _CommonFunctions = require("../../utils/CommonFunctions");
|
|
12
|
-
var _Benchmark = require("../Benchmark/Benchmark");
|
|
13
|
-
var _TotalBenchmarkBarchart = require("./TotalBenchmarkBarchart.style");
|
|
14
|
-
/* TotalBenchmarkBarchart */
|
|
15
|
-
const TotalBenchmarkBarchart = props => {
|
|
16
|
-
const {
|
|
17
|
-
title,
|
|
18
|
-
value,
|
|
19
|
-
addingBenchmark,
|
|
20
|
-
benchmarkTotalValue,
|
|
21
|
-
benchmarkValue,
|
|
22
|
-
currency,
|
|
23
|
-
currencyType,
|
|
24
|
-
barChartData,
|
|
25
|
-
dotCut = true,
|
|
26
|
-
width,
|
|
27
|
-
height,
|
|
28
|
-
textcolor,
|
|
29
|
-
noDataText
|
|
30
|
-
} = props;
|
|
31
|
-
const DEFAULT_ROOT_FONT = 16;
|
|
32
|
-
const DEFAULT_COMPONENT_WIDTH = 250;
|
|
33
|
-
const DEFAULT_COMPONENT_HEIGHT = 280;
|
|
34
|
-
const [rootFont, setRootFont] = (0, _react.useState)(DEFAULT_ROOT_FONT.toString().concat('', 'px'));
|
|
35
|
-
const [heightFactor, setHeightFactor] = (0, _react.useState)(1);
|
|
36
|
-
const controlsContainerRef = (0, _react.useRef)();
|
|
37
|
-
(0, _react.useEffect)(() => {
|
|
38
|
-
const {
|
|
39
|
-
offsetWidth
|
|
40
|
-
} = controlsContainerRef.current;
|
|
41
|
-
setRootFont(getRootFont(offsetWidth));
|
|
42
|
-
}, [width]);
|
|
43
|
-
(0, _react.useEffect)(() => {
|
|
44
|
-
const {
|
|
45
|
-
offsetHeight
|
|
46
|
-
} = controlsContainerRef.current;
|
|
47
|
-
const factor = offsetHeight / DEFAULT_COMPONENT_HEIGHT;
|
|
48
|
-
setHeightFactor(factor);
|
|
49
|
-
}, [height]);
|
|
50
|
-
const getRootFont = width => {
|
|
51
|
-
const relation = width.toString().replace('px', '').replace('%', '') / DEFAULT_COMPONENT_WIDTH;
|
|
52
|
-
const fontRoot = (DEFAULT_ROOT_FONT * relation).toString().concat('', 'px');
|
|
53
|
-
return fontRoot;
|
|
54
|
-
};
|
|
55
|
-
const getSizeFactor = () => rootFont.toString().replace('px', '') / DEFAULT_ROOT_FONT;
|
|
56
|
-
const getFormattedBarChartData = () => {
|
|
57
|
-
const formattedBarChartData = [];
|
|
58
|
-
const currencySign = currency === true ? (0, _CommonFunctions.getCurrencySign)(currencyType, value).toString() : '';
|
|
59
|
-
if (barChartData && (barChartData === null || barChartData === void 0 ? void 0 : barChartData.length) === 2) {
|
|
60
|
-
barChartData.forEach((data, i) => {
|
|
61
|
-
const formattedData = {
|
|
62
|
-
id: i,
|
|
63
|
-
title: data.title,
|
|
64
|
-
value: data.value,
|
|
65
|
-
formattedValue: data.value !== undefined && data.value != null ? currencySign.concat('', (0, _CommonFunctions.getFormattedValue)(data.value), '', (0, _CommonFunctions.getFormattedUnits)(data.value)) : 'No Data',
|
|
66
|
-
color: data.color
|
|
67
|
-
};
|
|
68
|
-
formattedBarChartData.push(formattedData);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
return formattedBarChartData;
|
|
72
|
-
};
|
|
73
|
-
return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.ControlsContainer, {
|
|
74
|
-
id: "ControlsContainer",
|
|
75
|
-
height: height,
|
|
76
|
-
width: width,
|
|
77
|
-
textcolor: textcolor,
|
|
78
|
-
ref: controlsContainerRef
|
|
79
|
-
}, value !== undefined && value !== null || barChartData && (barChartData === null || barChartData === void 0 ? void 0 : barChartData.length) >= 2 && (barChartData[0].value !== undefined && barChartData[0].value !== null || barChartData[1].value !== undefined && barChartData[1].value !== null) ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.Controls, {
|
|
80
|
-
id: "Controls"
|
|
81
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.TitleAndValueContainer, {
|
|
82
|
-
id: "TitleAndValueContainer"
|
|
83
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.Title, {
|
|
84
|
-
id: "Title"
|
|
85
|
-
}, title), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.ValueAndBenchmarkContainer, {
|
|
86
|
-
id: "ValueAndBenchmarkContainer"
|
|
87
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.CurrencySign, {
|
|
88
|
-
id: "CurrencySign"
|
|
89
|
-
}, value !== undefined && value !== null && currency ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ''), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.FormattedValue, {
|
|
90
|
-
id: "FormattedValue"
|
|
91
|
-
}, value !== undefined && value !== null ? dotCut ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value) : '', value !== undefined && value != null && dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ''), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.FormattedValueNoDataMessage, null, value === undefined || value === null ? 'No Data' : ''), addingBenchmark && benchmarkTotalValue ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.BenchmarkContainer, {
|
|
92
|
-
id: "BenchmarkContainer"
|
|
93
|
-
}, /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, {
|
|
94
|
-
totalValue: benchmarkTotalValue !== null && benchmarkTotalValue !== void 0 ? benchmarkTotalValue : 0,
|
|
95
|
-
currentValue: value !== null && value !== void 0 ? value : 0,
|
|
96
|
-
benchmarkValue: benchmarkValue !== null && benchmarkValue !== void 0 ? benchmarkValue : 0,
|
|
97
|
-
height: 12 * getSizeFactor(),
|
|
98
|
-
width: 85 * getSizeFactor(),
|
|
99
|
-
color: "#79DB95",
|
|
100
|
-
linearGradientColor: "#C3EFD0",
|
|
101
|
-
linearGradientUnderAvarageColor: "#FDB1B1",
|
|
102
|
-
underAvarageColor: "#FD5959",
|
|
103
|
-
backgroundColor: "#F2F2F2"
|
|
104
|
-
})) : '')), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.BarchartContainer, {
|
|
105
|
-
id: "BarchartContainer"
|
|
106
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.BarChart, {
|
|
107
|
-
width: 224 * getSizeFactor(),
|
|
108
|
-
height: 150 * heightFactor,
|
|
109
|
-
data: getFormattedBarChartData(),
|
|
110
|
-
margin: {
|
|
111
|
-
top: 40 * heightFactor,
|
|
112
|
-
bottom: 0
|
|
113
|
-
}
|
|
114
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.CartesianGrid, {
|
|
115
|
-
strokeDasharray: "3 3",
|
|
116
|
-
vertical: false
|
|
117
|
-
}), /*#__PURE__*/_react.default.createElement(_recharts.Bar, {
|
|
118
|
-
dataKey: "value",
|
|
119
|
-
name: "title",
|
|
120
|
-
maxBarSize: 55,
|
|
121
|
-
radius: [5, 5, 0, 0]
|
|
122
|
-
}, getFormattedBarChartData().map(entry => /*#__PURE__*/_react.default.createElement(_recharts.Cell, {
|
|
123
|
-
key: entry.id,
|
|
124
|
-
fill: entry.color
|
|
125
|
-
})), /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
126
|
-
dataKey: "formattedValue",
|
|
127
|
-
position: "top",
|
|
128
|
-
fill: "#212121",
|
|
129
|
-
fontWeight: 400,
|
|
130
|
-
fontSize: "14px"
|
|
131
|
-
})), /*#__PURE__*/_react.default.createElement(_recharts.XAxis, {
|
|
132
|
-
dataKey: "title",
|
|
133
|
-
tick: {
|
|
134
|
-
fontSize: 14
|
|
135
|
-
},
|
|
136
|
-
tickLine: false
|
|
137
|
-
})))) : /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
138
|
-
noDataText: noDataText
|
|
139
|
-
}));
|
|
140
|
-
};
|
|
141
|
-
exports.TotalBenchmarkBarchart = TotalBenchmarkBarchart;
|
|
142
|
-
var _default = exports.default = TotalBenchmarkBarchart;
|
|
143
|
-
TotalBenchmarkBarchart.defaultProps = {
|
|
144
|
-
title: 'Title',
|
|
145
|
-
value: 100,
|
|
146
|
-
addingBenchmark: true,
|
|
147
|
-
benchmarkTotalValue: 300,
|
|
148
|
-
benchmarkValue: 400,
|
|
149
|
-
currency: true,
|
|
150
|
-
currencyType: 'USD',
|
|
151
|
-
barChartData: [{
|
|
152
|
-
title: 'Actual',
|
|
153
|
-
value: 175100,
|
|
154
|
-
color: '#066768'
|
|
155
|
-
}, {
|
|
156
|
-
title: 'Base Line',
|
|
157
|
-
value: 100000,
|
|
158
|
-
color: '#90CE9C'
|
|
159
|
-
}],
|
|
160
|
-
dotCut: true,
|
|
161
|
-
width: '250px',
|
|
162
|
-
height: '280px',
|
|
163
|
-
textcolor: '#212121',
|
|
164
|
-
noDataText: ''
|
|
165
|
-
};
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.Redeemers = exports.IncrementalSales = exports.DataWithNulls = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _TotalBenchmarkBarchart = require("./TotalBenchmarkBarchart");
|
|
10
|
-
const arrData = [{
|
|
11
|
-
title: 'Actual',
|
|
12
|
-
value: 175100,
|
|
13
|
-
color: '#066768'
|
|
14
|
-
}, {
|
|
15
|
-
title: 'Base Line',
|
|
16
|
-
value: 100000,
|
|
17
|
-
color: '#90CE9C'
|
|
18
|
-
}];
|
|
19
|
-
const arrDataRedeemers = [{
|
|
20
|
-
title: 'New Redeemers',
|
|
21
|
-
value: 256200,
|
|
22
|
-
color: '#85A1D2'
|
|
23
|
-
}, {
|
|
24
|
-
title: 'Existing Redeemers',
|
|
25
|
-
value: 700000,
|
|
26
|
-
color: '#9AE6FF'
|
|
27
|
-
}];
|
|
28
|
-
const arrDataWithnulls = [{
|
|
29
|
-
title: 'New Redeemers',
|
|
30
|
-
value: null,
|
|
31
|
-
color: '#85A1D2'
|
|
32
|
-
}, {
|
|
33
|
-
title: 'Existing Redeemers',
|
|
34
|
-
value: 700000,
|
|
35
|
-
color: '#9AE6FF'
|
|
36
|
-
}];
|
|
37
|
-
var _default = exports.default = {
|
|
38
|
-
title: 'SAG BI/TotalBenchmarkBarchart',
|
|
39
|
-
component: _TotalBenchmarkBarchart.TotalBenchmarkBarchart,
|
|
40
|
-
tags: ['autodocs'],
|
|
41
|
-
argTypes: {
|
|
42
|
-
dotCut: {
|
|
43
|
-
name: 'dotCut',
|
|
44
|
-
control: {
|
|
45
|
-
type: 'boolean'
|
|
46
|
-
},
|
|
47
|
-
description: 'true/false - format total value with dot cut'
|
|
48
|
-
},
|
|
49
|
-
title: {
|
|
50
|
-
name: 'title',
|
|
51
|
-
control: {
|
|
52
|
-
type: 'text'
|
|
53
|
-
},
|
|
54
|
-
description: 'title on top of the component'
|
|
55
|
-
},
|
|
56
|
-
value: {
|
|
57
|
-
name: 'value',
|
|
58
|
-
control: {
|
|
59
|
-
type: 'number',
|
|
60
|
-
min: 0,
|
|
61
|
-
max: 100000000000000
|
|
62
|
-
},
|
|
63
|
-
description: 'value (title) '
|
|
64
|
-
},
|
|
65
|
-
addingBenchmark: {
|
|
66
|
-
name: 'Add Benchmark',
|
|
67
|
-
control: {
|
|
68
|
-
type: 'boolean'
|
|
69
|
-
},
|
|
70
|
-
description: 'true/false - Adding Benchmark'
|
|
71
|
-
},
|
|
72
|
-
benchmarkTotalValue: {
|
|
73
|
-
name: 'benchmarkTotalValue',
|
|
74
|
-
control: {
|
|
75
|
-
type: 'number',
|
|
76
|
-
min: 0,
|
|
77
|
-
max: 100000000000000
|
|
78
|
-
},
|
|
79
|
-
description: 'benchmarkTotalValue - set total value of the benchmark'
|
|
80
|
-
},
|
|
81
|
-
benchmarkValue: {
|
|
82
|
-
name: 'benchmarkValue',
|
|
83
|
-
control: {
|
|
84
|
-
type: 'number',
|
|
85
|
-
min: 0,
|
|
86
|
-
max: 100000000000000
|
|
87
|
-
},
|
|
88
|
-
description: 'benchmarkValue - set total value of the benchmark delimeter line'
|
|
89
|
-
},
|
|
90
|
-
currency: {
|
|
91
|
-
name: 'currency',
|
|
92
|
-
control: {
|
|
93
|
-
type: 'boolean'
|
|
94
|
-
},
|
|
95
|
-
description: 'true/false - show/hide currency before total value'
|
|
96
|
-
},
|
|
97
|
-
currencyType: {
|
|
98
|
-
name: 'currencyType',
|
|
99
|
-
options: ['USD', 'EUR', 'ILS', 'GBP', 'JPY'],
|
|
100
|
-
control: {
|
|
101
|
-
type: 'select'
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
width: {
|
|
105
|
-
name: 'width',
|
|
106
|
-
control: {
|
|
107
|
-
type: 'text'
|
|
108
|
-
},
|
|
109
|
-
description: 'width of the control (in px)'
|
|
110
|
-
},
|
|
111
|
-
height: {
|
|
112
|
-
name: 'height',
|
|
113
|
-
control: {
|
|
114
|
-
type: 'text'
|
|
115
|
-
},
|
|
116
|
-
description: 'height of the control (in px)'
|
|
117
|
-
},
|
|
118
|
-
textcolor: {
|
|
119
|
-
name: 'textcolor',
|
|
120
|
-
description: 'Sets the text color',
|
|
121
|
-
control: {
|
|
122
|
-
type: 'color',
|
|
123
|
-
presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
barChartData: {
|
|
127
|
-
description: 'array [] of objects: {title: string, value:number } to fill the details data. only 2 elements supported right now '
|
|
128
|
-
},
|
|
129
|
-
noDataText: {
|
|
130
|
-
name: 'noDataText',
|
|
131
|
-
control: {
|
|
132
|
-
type: 'text'
|
|
133
|
-
},
|
|
134
|
-
description: 'text to display when no data found'
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
const IncrementalSales = exports.IncrementalSales = {
|
|
139
|
-
args: {
|
|
140
|
-
title: 'Incremental Sales',
|
|
141
|
-
value: 75100,
|
|
142
|
-
benchmarkTotalValue: 100000,
|
|
143
|
-
benchmarkValue: 50000,
|
|
144
|
-
barChartData: arrData,
|
|
145
|
-
currency: true,
|
|
146
|
-
currencyType: 'USD',
|
|
147
|
-
dotCut: true,
|
|
148
|
-
width: '250px',
|
|
149
|
-
height: '280px',
|
|
150
|
-
textcolor: '#000',
|
|
151
|
-
noDataText: 'The selected event is a TPR or has no offer, therefore there are no redemptions or redemption units to display.'
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
const Redeemers = exports.Redeemers = {
|
|
155
|
-
args: {
|
|
156
|
-
title: 'Redeemers',
|
|
157
|
-
value: 956200,
|
|
158
|
-
benchmarkTotalValue: 2000000,
|
|
159
|
-
benchmarkValue: 1000000,
|
|
160
|
-
barChartData: arrDataRedeemers,
|
|
161
|
-
currency: true,
|
|
162
|
-
currencyType: 'USD',
|
|
163
|
-
dotCut: true,
|
|
164
|
-
width: '300px',
|
|
165
|
-
height: '280px',
|
|
166
|
-
textcolor: '#000',
|
|
167
|
-
noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.'
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
const DataWithNulls = exports.DataWithNulls = {
|
|
171
|
-
args: {
|
|
172
|
-
title: 'Redeemers',
|
|
173
|
-
value: null,
|
|
174
|
-
benchmarkTotalValue: 2000000,
|
|
175
|
-
benchmarkValue: 1000000,
|
|
176
|
-
barChartData: arrDataWithnulls,
|
|
177
|
-
currency: true,
|
|
178
|
-
currencyType: 'USD',
|
|
179
|
-
dotCut: true,
|
|
180
|
-
width: '300px',
|
|
181
|
-
height: '280px',
|
|
182
|
-
textcolor: '#000',
|
|
183
|
-
noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.'
|
|
184
|
-
}
|
|
185
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.ValueAndBenchmarkContainer = exports.TitleAndValueContainer = exports.Title = exports.FormattedValueNoDataMessage = exports.FormattedValue = exports.CurrencySign = exports.ControlsContainer = exports.Controls = exports.BenchmarkContainer = exports.BarchartContainer = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
11
|
-
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n position: relative;\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 12px;\n align-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background: #ffffff;\n"])), props => props.textColor, props => props.width, props => props.height);
|
|
12
|
-
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n border-radius: 12px;\n background: #ffffff; \n justify-content: space-between;\n flex-direction: column;\n flex-basis: 100%;\n"])));
|
|
13
|
-
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0px;\n"])));
|
|
14
|
-
const Title = exports.Title = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem; \n @media (max-width: 1366px) {\n font-size: 12px;\n }\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n"])));
|
|
15
|
-
const ValueAndBenchmarkContainer = exports.ValueAndBenchmarkContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: flex-start;\n align-items: baseline; \n\n"])));
|
|
16
|
-
const CurrencySign = exports.CurrencySign = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)([" \n font-weight: 500;\n font-size: 1rem;\n"])));
|
|
17
|
-
const FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.1rem;\n font-weight: 500;\n font-size: 40px;\n @media (max-width: 1366px) {\n font-size: 20px;\n }\n @media (max-width: 1536px) {\n font-size: 24px;\n }\n"])));
|
|
18
|
-
const FormattedValueNoDataMessage = exports.FormattedValueNoDataMessage = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.3rem;\n font-weight: 700;\n font-size: 16px;\n margin: 0; \n"])));
|
|
19
|
-
const BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.7em;\n width: 5.35em;\n"])));
|
|
20
|
-
const BarchartContainer = exports.BarchartContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n"])));
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.TotalDoughnutChart = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _recharts = require("recharts");
|
|
10
|
-
var _CommonFunctions = require("../../utils/CommonFunctions");
|
|
11
|
-
var _NoDataFoundMessage = require("../NoDataFoundMessage/NoDataFoundMessage");
|
|
12
|
-
var _TotalDoughnutChart = require("./TotalDoughnutChart.style");
|
|
13
|
-
var _Benchmark = require("../Benchmark/Benchmark");
|
|
14
|
-
const TotalDoughnutChart = props => {
|
|
15
|
-
var _DoughnutChartContain, _DoughnutChartContain2;
|
|
16
|
-
const {
|
|
17
|
-
className,
|
|
18
|
-
title,
|
|
19
|
-
value,
|
|
20
|
-
addingBenchmark,
|
|
21
|
-
dotCut,
|
|
22
|
-
currencySign,
|
|
23
|
-
currencyType,
|
|
24
|
-
legendData,
|
|
25
|
-
itemsPercentagesValueAside,
|
|
26
|
-
itemsBoldedValues,
|
|
27
|
-
itemsValuesSeparateLine,
|
|
28
|
-
width,
|
|
29
|
-
height,
|
|
30
|
-
textcolor,
|
|
31
|
-
isPercent,
|
|
32
|
-
hideTitleAndValue,
|
|
33
|
-
noDataText,
|
|
34
|
-
textAfterValue
|
|
35
|
-
} = props;
|
|
36
|
-
const [DoughnutChartRadius, setDoughnutChartRadius] = (0, _react.useState)(0);
|
|
37
|
-
const [zoomResolution, setZoomResolution] = (0, _react.useState)(1);
|
|
38
|
-
const DoughnutChartContainerRef = (0, _react.useRef)();
|
|
39
|
-
const dotCutTrenty = row => {
|
|
40
|
-
if (!row || !row.value) return null;
|
|
41
|
-
let valueNew = 0;
|
|
42
|
-
if (row !== null && row !== void 0 && row.value && Math.abs(row.value) > 0 && row.value % 1 !== 0) {
|
|
43
|
-
var _row$value;
|
|
44
|
-
valueNew = row === null || row === void 0 ? void 0 : (_row$value = row.value) === null || _row$value === void 0 ? void 0 : _row$value.toFixed(2);
|
|
45
|
-
} else {
|
|
46
|
-
valueNew = row === null || row === void 0 ? void 0 : row.value;
|
|
47
|
-
}
|
|
48
|
-
return dotCut ? (0, _CommonFunctions.getFormattedValue)(valueNew) : (0, _CommonFunctions.getNumberWithCommas)(valueNew);
|
|
49
|
-
};
|
|
50
|
-
(0, _react.useEffect)(() => {
|
|
51
|
-
const handleResize = () => {
|
|
52
|
-
setZoomResolution(window.devicePixelRatio);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
// Add event listener for window resize to update zoom resolution
|
|
56
|
-
window.addEventListener('resize', handleResize);
|
|
57
|
-
|
|
58
|
-
// Initial update of zoom resolution
|
|
59
|
-
setZoomResolution(window.devicePixelRatio);
|
|
60
|
-
|
|
61
|
-
// Clean up the event listener when component unmounts
|
|
62
|
-
return () => {
|
|
63
|
-
window.removeEventListener('resize', handleResize);
|
|
64
|
-
};
|
|
65
|
-
}, []);
|
|
66
|
-
(0, _react.useEffect)(() => {
|
|
67
|
-
const MIN_RADIUS = 45;
|
|
68
|
-
if (!DoughnutChartContainerRef) return;
|
|
69
|
-
const {
|
|
70
|
-
current
|
|
71
|
-
} = DoughnutChartContainerRef;
|
|
72
|
-
if (!current) return;
|
|
73
|
-
const DoughnutChartContainerWidth = current === null || current === void 0 ? void 0 : current.clientWidth;
|
|
74
|
-
const DoughnutChartContainerHeight = current === null || current === void 0 ? void 0 : current.clientHeight;
|
|
75
|
-
const resolutionFactor = zoomResolution && zoomResolution >= 1 ? zoomResolution : 1;
|
|
76
|
-
let radius = DoughnutChartContainerWidth > DoughnutChartContainerHeight ? DoughnutChartContainerHeight / 2 / resolutionFactor : DoughnutChartContainerWidth / 2 / resolutionFactor;
|
|
77
|
-
if (radius < MIN_RADIUS) {
|
|
78
|
-
radius = MIN_RADIUS;
|
|
79
|
-
}
|
|
80
|
-
setDoughnutChartRadius(radius);
|
|
81
|
-
}, [height, width, DoughnutChartContainerRef === null || DoughnutChartContainerRef === void 0 ? void 0 : (_DoughnutChartContain = DoughnutChartContainerRef.current) === null || _DoughnutChartContain === void 0 ? void 0 : _DoughnutChartContain.clientWidth, DoughnutChartContainerRef === null || DoughnutChartContainerRef === void 0 ? void 0 : (_DoughnutChartContain2 = DoughnutChartContainerRef.current) === null || _DoughnutChartContain2 === void 0 ? void 0 : _DoughnutChartContain2.clientHeight, zoomResolution]);
|
|
82
|
-
const displayLegendValue = row => /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.LegendFormattedValue, {
|
|
83
|
-
style: {
|
|
84
|
-
fontWeight: itemsBoldedValues ? '700' : '500'
|
|
85
|
-
}
|
|
86
|
-
}, !isPercent && row.value && currencySign ? (0, _CommonFunctions.getCurrencySign)(currencyType, row.value) : '', !isPercent && row.value !== undefined && row.value !== null ? dotCutTrenty(row) : !isPercent && 'No Data', !isPercent && row.value && dotCut ? (0, _CommonFunctions.getFormattedUnits)(row.value) : '', !isPercent && row.value && itemsPercentagesValueAside && " (".concat(Math.round(row.value / value * 100), "%)"), isPercent && row.value && "".concat(row.value.toFixed(1), "%"));
|
|
87
|
-
return /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.ControlsContainer, {
|
|
88
|
-
className: className,
|
|
89
|
-
height: height,
|
|
90
|
-
width: width,
|
|
91
|
-
textcolor: textcolor
|
|
92
|
-
}, legendData.length === 0 || legendData.every(item => item.value === undefined || item.value === null) ? /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
93
|
-
className: "NoDataFoundMessage",
|
|
94
|
-
noDataText: noDataText
|
|
95
|
-
}) : /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.Controls, {
|
|
96
|
-
className: "Controls",
|
|
97
|
-
height: height,
|
|
98
|
-
width: width
|
|
99
|
-
}, !hideTitleAndValue && /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TitleAndValueContainer, {
|
|
100
|
-
className: "TitleAndValueContainer"
|
|
101
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.Title, {
|
|
102
|
-
className: "Title"
|
|
103
|
-
}, title), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.CurrencySignAndFormattedValueContainer, {
|
|
104
|
-
className: "CurrencySignAndFormattedValueContainer"
|
|
105
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.FormattedValue, {
|
|
106
|
-
className: "FormattedValue",
|
|
107
|
-
width: width
|
|
108
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.CurrencySign, {
|
|
109
|
-
className: "CurrencySign"
|
|
110
|
-
}, currencySign ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ''), dotCut ? (0, _CommonFunctions.getFormattedValue)(value && Math.abs(value) > 0 && value % 1 !== 0 ? value === null || value === void 0 ? void 0 : value.toFixed(2) : value) : (0, _CommonFunctions.getNumberWithCommas)(value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ''), textAfterValue ? /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TextAfterValue, {
|
|
111
|
-
className: "TextAfterValue"
|
|
112
|
-
}, textAfterValue) : '', addingBenchmark && /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, null))), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartAndLegendContainer, null, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartContainer, {
|
|
113
|
-
width: width,
|
|
114
|
-
height: height,
|
|
115
|
-
ref: DoughnutChartContainerRef
|
|
116
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, null, /*#__PURE__*/_react.default.createElement(_recharts.PieChart, null, /*#__PURE__*/_react.default.createElement(_recharts.Pie, {
|
|
117
|
-
fill: "#8884d8",
|
|
118
|
-
dataKey: "value",
|
|
119
|
-
blendStroke: true,
|
|
120
|
-
startAngle: -270,
|
|
121
|
-
data: legendData,
|
|
122
|
-
outerRadius: DoughnutChartRadius - 4,
|
|
123
|
-
innerRadius: DoughnutChartRadius - DoughnutChartRadius / 3
|
|
124
|
-
}, legendData.map(row => /*#__PURE__*/_react.default.createElement(_recharts.Cell, {
|
|
125
|
-
key: "cell-".concat(row.name),
|
|
126
|
-
fill: row.color
|
|
127
|
-
}))), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, {
|
|
128
|
-
content: /*#__PURE__*/_react.default.createElement(CustomTooltip, {
|
|
129
|
-
value: value,
|
|
130
|
-
isPercent: isPercent
|
|
131
|
-
})
|
|
132
|
-
}), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, null)))), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.LegendContainer, null, legendData.map(row => /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.LegendControlsContainer, {
|
|
133
|
-
key: row.name
|
|
134
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.LegendColorRectangle, {
|
|
135
|
-
color: row.color
|
|
136
|
-
}), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.LegendTitleAndFormatedValueContainer, null, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.LegendTitle, {
|
|
137
|
-
style: {
|
|
138
|
-
flexDirection: itemsValuesSeparateLine ? 'column' : 'row',
|
|
139
|
-
alignItems: itemsValuesSeparateLine ? 'baseline' : 'center'
|
|
140
|
-
}
|
|
141
|
-
}, row.name, displayLegendValue(row)))))))));
|
|
142
|
-
};
|
|
143
|
-
exports.TotalDoughnutChart = TotalDoughnutChart;
|
|
144
|
-
var _default = exports.default = TotalDoughnutChart;
|
|
145
|
-
TotalDoughnutChart.defaultProps = {
|
|
146
|
-
className: '',
|
|
147
|
-
title: '',
|
|
148
|
-
value: 0,
|
|
149
|
-
addingBenchmark: false,
|
|
150
|
-
dotCut: false,
|
|
151
|
-
currencySign: false,
|
|
152
|
-
currencyType: 'USD',
|
|
153
|
-
legendData: [],
|
|
154
|
-
itemsPercentagesValueAside: true,
|
|
155
|
-
itemsBoldedValues: true,
|
|
156
|
-
itemsValuesSeparateLine: true,
|
|
157
|
-
width: '100%',
|
|
158
|
-
height: '100%',
|
|
159
|
-
textcolor: '#212121',
|
|
160
|
-
isPercent: false,
|
|
161
|
-
hideTitleAndValue: false,
|
|
162
|
-
noDataText: 'No Data',
|
|
163
|
-
textAfterValue: ''
|
|
164
|
-
};
|
|
165
|
-
function CustomTooltip(_ref) {
|
|
166
|
-
let {
|
|
167
|
-
active,
|
|
168
|
-
payload,
|
|
169
|
-
value,
|
|
170
|
-
isPercent = false
|
|
171
|
-
} = _ref;
|
|
172
|
-
if (active && payload && payload.length) {
|
|
173
|
-
const percent = value && value !== 0 && !isPercent ? (payload[0].value / value * 100).toFixed(1) : value && isPercent ? payload[0].value.toFixed(1) : 0;
|
|
174
|
-
return /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TooltipDiv, null, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TooltipLabel, null, "".concat(payload[0].name, " ").concat(percent, "%")));
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
CustomTooltip.defaultProps = {
|
|
178
|
-
active: '',
|
|
179
|
-
payload: '',
|
|
180
|
-
value: '',
|
|
181
|
-
isPercent: false
|
|
182
|
-
};
|