sag_components 1.0.950 → 1.0.951
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/AttachedFile.js +62 -0
- package/dist/stories/components/AttachedFile/AttachedFile.stories.js +36 -0
- package/dist/stories/components/AttachedFile/AttachedFile.style.js +14 -0
- 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/BannerEventBox.js +87 -0
- package/dist/stories/components/BannerEventBox/BannerEventBox.stories.js +58 -0
- package/dist/stories/components/BannerEventBox/BannerEventBox.style.js +22 -0
- package/dist/stories/components/BannerEventBox.js +33 -23
- package/dist/stories/components/BannerEventBox.style.js +14 -66
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.js +148 -0
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.stories.js +59 -0
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.style.js +23 -0
- package/dist/stories/components/BannerEventBoxList.js +1 -2
- package/dist/stories/components/BannerEventBoxList.style.js +15 -174
- package/dist/stories/components/BannersDropdown/BannersDropdown.js +115 -0
- package/dist/stories/components/BannersDropdown/BannersDropdown.stories.js +64 -0
- package/dist/stories/components/BannersDropdown/BannersDropdown.style.js +18 -0
- package/dist/stories/components/BannersDropdown.style.js +10 -91
- package/dist/stories/components/BarChart/BarChart.js +189 -0
- package/dist/stories/components/BarChart/BarChart.stories.js +144 -0
- package/dist/stories/components/BarChart/BarChart.style.js +18 -0
- package/dist/stories/components/BarChart.js +2 -2
- package/dist/stories/components/BarChart.style.js +10 -52
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.js +204 -0
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.stories.js +133 -0
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.style.js +18 -0
- package/dist/stories/components/BarChartTwoRows.js +2 -2
- package/dist/stories/components/BarChartTwoRows.style.js +11 -70
- package/dist/stories/components/BarChartWithAreaChart.js +7 -7
- package/dist/stories/components/BarChartWithAreaChart.style.js +11 -56
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.js +295 -0
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.stories.js +442 -0
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.style.js +21 -0
- package/dist/stories/components/BarChartsByWeeks.js +3 -7
- package/dist/stories/components/BarChartsByWeeks.style.js +13 -88
- package/dist/stories/components/Benchmark/Benchmark.js +130 -0
- package/dist/stories/components/Benchmark/Benchmark.stories.js +148 -0
- package/dist/stories/components/Benchmark/Benchmark.style.js +15 -0
- package/dist/stories/components/Benchmark.style.js +7 -53
- package/dist/stories/components/Button/Button.js +217 -0
- package/dist/stories/components/Button/Button.stories.js +269 -0
- package/dist/stories/components/Button/Button.style.js +15 -0
- package/dist/stories/components/Button.js +1 -1
- package/dist/stories/components/Button.style.js +7 -82
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.js +48 -0
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.stories.js +65 -0
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.style.js +15 -0
- 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/Card/Card.js +72 -0
- package/dist/stories/components/Card/Card.stories.js +92 -0
- package/dist/stories/components/Card/Card.style.js +18 -0
- package/dist/stories/components/CheckBox/CheckBox.js +76 -0
- package/dist/stories/components/CheckBox/CheckBox.stories.js +107 -0
- package/dist/stories/components/CheckBox/CheckBox.style.js +14 -0
- package/dist/stories/components/CheckBox.style.js +6 -28
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.js +69 -0
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.stories.js +150 -0
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.style.js +14 -0
- package/dist/stories/components/CheckBoxButton.style.js +6 -31
- package/dist/stories/components/CodeEditor/CodeEditor.js +43 -0
- package/dist/stories/components/CodeEditor/CodeEditor.style.js +12 -0
- package/dist/stories/components/CodeEditor.style.js +3 -4
- package/dist/stories/components/CollapseData/CollapseData.js +66 -0
- package/dist/stories/components/CollapseData/CollapseData.stories.js +125 -0
- package/dist/stories/components/CollapseData/CollapseData.style.js +21 -0
- package/dist/stories/components/CollapseData.js +5 -5
- package/dist/stories/components/CollapseData.style.js +13 -119
- package/dist/stories/components/CollapseHeader/CollapseHeader.js +248 -0
- package/dist/stories/components/CollapseHeader/CollapseHeader.stories.js +116 -0
- package/dist/stories/components/CollapseHeader/CollapseHeader.style.js +35 -0
- package/dist/stories/components/CollapseHeader.style.js +27 -192
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.js +61 -0
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.stories.js +161 -0
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.style.js +17 -0
- package/dist/stories/components/CollapseMenuItem.style.js +9 -53
- package/dist/stories/components/Datepicker/Datepicker.js +148 -0
- package/dist/stories/components/Datepicker/Datepicker.stories.js +86 -0
- package/dist/stories/components/Datepicker/Datepicker.style.js +13 -0
- package/dist/stories/components/Datepicker.style.js +3 -9
- package/dist/stories/components/DownloadProgress/DownloadProgress.js +97 -0
- package/dist/stories/components/DownloadProgress/DownloadProgress.stories.js +111 -0
- package/dist/stories/components/DownloadProgress/DownloadProgress.style.js +14 -0
- package/dist/stories/components/DownloadProgress.style.js +6 -43
- package/dist/stories/components/Dropdown/Dropdown.js +231 -0
- package/dist/stories/components/Dropdown/Dropdown.stories.js +323 -0
- package/dist/stories/components/Dropdown/Dropdown.style.js +11 -0
- 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/DropdownMultiNew.js +279 -0
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.style.js +28 -0
- package/dist/stories/components/DropdownMultiNew.js +1 -1
- package/dist/stories/components/DropdownMultiNew.style.js +16 -193
- package/dist/stories/components/DropdownNew/DropdownNew.js +88 -0
- package/dist/stories/components/DropdownNew/DropdownNew.stories.js +407 -0
- package/dist/stories/components/DropdownNew/DropdownNew.style.js +11 -0
- package/dist/stories/components/DropdownNew.style.js +3 -14
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.js +234 -0
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.style.js +26 -0
- package/dist/stories/components/DropdownSingleNew.style.js +14 -162
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.js +144 -0
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.stories.js +57 -0
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.style.js +18 -0
- package/dist/stories/components/EventDetailsCard.style.js +10 -86
- package/dist/stories/components/EventList/EventList.js +61 -0
- package/dist/stories/components/EventList/EventList.stories.js +84 -0
- package/dist/stories/components/EventList/EventList.style.js +14 -0
- package/dist/stories/components/EventList.style.js +6 -30
- package/dist/stories/components/EventListItem/EventListItem.js +50 -0
- package/dist/stories/components/EventListItem/EventListItem.stories.js +65 -0
- package/dist/stories/components/EventListItem/EventListItem.style.js +14 -0
- package/dist/stories/components/EventListItem.style.js +6 -39
- package/dist/stories/components/FilterContainer/FilterContainer.js +29 -0
- package/dist/stories/components/FilterContainer/FilterContainer.stories.js +23 -0
- package/dist/stories/components/FilterContainer/FilterContainer.style.js +13 -0
- package/dist/stories/components/FilterContainer.style.js +5 -22
- package/dist/stories/components/FilterPanel/FilterPanel.js +566 -0
- package/dist/stories/components/FilterPanel/FilterPanel.stories.js +967 -0
- package/dist/stories/components/FilterPanel/FilterPanel.style.js +21 -0
- package/dist/stories/components/FilterPanel.js +17 -17
- package/dist/stories/components/FilterPanel.style.js +13 -81
- package/dist/stories/components/FormInput/FormInput.js +41 -0
- package/dist/stories/components/FormSelect/FormSelect.js +42 -0
- package/dist/stories/components/FormattedValue/FormattedValue.js +68 -0
- package/dist/stories/components/FormattedValue/FormattedValue.stories.js +189 -0
- package/dist/stories/components/FormattedValue/FormattedValue.style.js +18 -0
- package/dist/stories/components/FormattedValue.style.js +10 -83
- package/dist/stories/components/HaiTooltip.js +71 -0
- package/dist/stories/components/HaiTooltip.style.js +12 -0
- package/dist/stories/components/IconButton/IconButton.js +147 -0
- package/dist/stories/components/IconButton/IconButton.stories.js +131 -0
- package/dist/stories/components/IconButton/IconButton.style.js +15 -0
- package/dist/stories/components/IconButton.style.js +7 -56
- package/dist/stories/components/Input/Input.js +183 -0
- package/dist/stories/components/Input/Input.stories.js +434 -0
- package/dist/stories/components/Input/Input.style.js +17 -0
- package/dist/stories/components/Input.style.js +9 -123
- package/dist/stories/components/InputOld/InputOld.js +90 -0
- package/dist/stories/components/InputOld/InputOld.stories.js +100 -0
- package/dist/stories/components/InputOld/InputOld.style.js +16 -0
- package/dist/stories/components/InputOld.style.js +8 -62
- package/dist/stories/components/KpiFilter/KpiFilter.js +313 -0
- package/dist/stories/components/KpiFilter/KpiFilter.stories.js +380 -0
- package/dist/stories/components/KpiFilter/KpiFilter.style.js +26 -0
- package/dist/stories/components/KpiFilter.style.js +18 -124
- package/dist/stories/components/LinkButton/LinkButton.js +207 -0
- package/dist/stories/components/LinkButton/LinkButton.stories.js +180 -0
- package/dist/stories/components/LinkButton/LinkButton.style.js +14 -0
- package/dist/stories/components/LinkButton.style.js +6 -45
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.js +44 -0
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.stories.js +56 -0
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.style.js +22 -0
- package/dist/stories/components/LinnerDataBox.js +1 -1
- package/dist/stories/components/LinnerDataBox.style.js +14 -60
- package/dist/stories/components/ListBox/ListBox.js +82 -0
- package/dist/stories/components/ListBox/ListBox.stories.js +132 -0
- package/dist/stories/components/ListBox/ListBox.style.js +14 -0
- package/dist/stories/components/ListBox.style.js +6 -40
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.js +109 -0
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.stories.js +184 -0
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.style.js +27 -0
- package/dist/stories/components/MarketShareDescription.style.js +19 -207
- package/dist/stories/components/Modal/Modal.js +21 -0
- package/dist/stories/components/Modal/Modal.style.js +17 -0
- package/dist/stories/components/Modal/ModalTotalBenchmark.js +224 -0
- package/dist/stories/components/Modal/ModalTotalCost.js +139 -0
- package/dist/stories/components/Modal.style.js +8 -56
- package/dist/stories/components/ModalTotalBenchmark.js +6 -6
- package/dist/stories/components/MonthPicker/MonthPicker.js +166 -0
- package/dist/stories/components/MonthPicker/MonthPicker.stories.js +140 -0
- package/dist/stories/components/MonthPicker/MonthPicker.style.js +18 -0
- package/dist/stories/components/MonthPicker/MonthPopupPicker.js +122 -0
- 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/MultipleCard/MultipleCard.js +26 -0
- package/dist/stories/components/MultipleCard/MultipleCard.stories.js +33 -0
- package/dist/stories/components/{BannerEventBoxTest.style.js → MultipleCard/MultipleCard.style.js} +2 -2
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.js +30 -0
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.stories.js +66 -0
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.style.js +13 -0
- package/dist/stories/components/NoDataFoundMessage.style.js +5 -31
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.js +121 -0
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.stories.js +119 -0
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.style.js +20 -0
- package/dist/stories/components/OneColumnContainer.style.js +12 -99
- package/dist/stories/components/PageFilterBar/PageFilterBar.js +23 -0
- package/dist/stories/components/PageFilterBar/PageFilterBar.stories.js +28 -0
- package/dist/stories/components/PageFilterBar/PageFilterBar.style.js +12 -0
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.js +440 -0
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.stories.js +258 -0
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.style.js +25 -0
- package/dist/stories/components/PerformanceAnalytics.js +9 -16
- package/dist/stories/components/PerformanceAnalytics.style.js +17 -136
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.js +58 -0
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.stories.js +86 -0
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.style.js +16 -0
- package/dist/stories/components/PerformanceAnalyticsLegend.js +1 -1
- package/dist/stories/components/PerformanceAnalyticsLegend.style.js +8 -55
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.js +320 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.stories.js +231 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.style.js +23 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn.js +5 -12
- package/dist/stories/components/PerformanceAnalyticsOneColumn.style.js +15 -108
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.js +70 -0
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.stories.js +100 -0
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.style.js +20 -0
- package/dist/stories/components/PerformanceAnalyticsTotals.js +1 -1
- package/dist/stories/components/PerformanceAnalyticsTotals.style.js +12 -81
- package/dist/stories/components/Popup/Popup.js +172 -0
- package/dist/stories/components/Popup/Popup.stories.js +704 -0
- package/dist/stories/components/Popup/Popup.style.js +24 -0
- package/dist/stories/components/PopupCharts/PopupCharts.js +244 -0
- package/dist/stories/components/PopupCharts/PopupCharts.stories.js +1203 -0
- package/dist/stories/components/PopupCharts/PopupCharts.style.js +23 -0
- package/dist/stories/components/PopupCharts.style.js +15 -100
- package/dist/stories/components/PopupContent/PopupContent.js +111 -0
- package/dist/stories/components/PopupContent/PopupContent.style.js +21 -0
- package/dist/stories/components/PopupContent/PopupFieldsRules.js +168 -0
- package/dist/stories/components/ProductsVariety/ProductsVariety.js +94 -0
- package/dist/stories/components/ProductsVariety/ProductsVariety.stories.js +91 -0
- package/dist/stories/components/ProductsVariety/ProductsVariety.style.js +20 -0
- package/dist/stories/components/ProductsVariety.style.js +12 -78
- package/dist/stories/components/ProgressBar/ProgressBar.js +52 -0
- package/dist/stories/components/ProgressBar/ProgressBar.stories.js +72 -0
- package/dist/stories/components/ProgressBar/ProgressBar.style.js +13 -0
- package/dist/stories/components/ProgressBar.style.js +4 -15
- package/dist/stories/components/QuarterPicker/QuarterPicker.js +165 -0
- package/dist/stories/components/QuarterPicker/QuarterPicker.stories.js +140 -0
- package/dist/stories/components/QuarterPicker/QuarterPicker.style.js +18 -0
- package/dist/stories/components/QuarterPicker/QuarterPopupPicker.js +109 -0
- 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/QuickFilter.js +78 -0
- package/dist/stories/components/QuickFilter/QuickFilter.stories.js +281 -0
- package/dist/stories/components/QuickFilter/QuickFilter.style.js +11 -0
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.js +299 -0
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.style.js +28 -0
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.js +229 -0
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.style.js +27 -0
- 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/RangeDatePicker.js +146 -0
- package/dist/stories/components/RangePicker/RangePicker.js +176 -0
- package/dist/stories/components/RangePicker/RangePicker.stories.js +138 -0
- package/dist/stories/components/RangePicker/RangePicker.style.js +18 -0
- 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/ReportTable.js +262 -0
- package/dist/stories/components/ReportTable/ReportTable.stories.js +151 -0
- package/dist/stories/components/ReportTable/ReportTable.style.js +22 -0
- package/dist/stories/components/ReportTable.style.js +14 -123
- package/dist/stories/components/SagButton/SagButton.js +68 -0
- package/dist/stories/components/SagButton/SagButton.stories.js +118 -0
- package/dist/stories/components/SagButton/SagButton.style.js +13 -0
- package/dist/stories/components/SagButton.style.js +5 -39
- package/dist/stories/components/SagIconButton/SagIconButton.js +130 -0
- package/dist/stories/components/SagIconButton/SagIconButton.stories.js +123 -0
- package/dist/stories/components/SagIconButton/SagIconButton.style.js +12 -0
- package/dist/stories/components/SagIconButton.style.js +4 -22
- package/dist/stories/components/SagInput/SagInput.js +53 -0
- package/dist/stories/components/SagInput/SagInput.stories.js +69 -0
- package/dist/stories/components/{NewInput.style.js → SagInput/SagInput.style.js} +2 -2
- package/dist/stories/components/SagInput.style.js +5 -33
- package/dist/stories/components/SalesAndROI/SalesAndROI.js +89 -0
- package/dist/stories/components/SalesAndROI/SalesAndROI.stories.js +168 -0
- package/dist/stories/components/SalesAndROI/SalesAndROI.style.js +19 -0
- package/dist/stories/components/SalesAndROI.style.js +11 -103
- package/dist/stories/components/SearchInput/SearchInput.js +39 -0
- package/dist/stories/components/SearchInput/SearchInput.stories.js +44 -0
- package/dist/stories/components/SearchInput/SearchInput.style.js +12 -0
- package/dist/stories/components/SearchInput.style.js +4 -29
- package/dist/stories/components/SegmentedButton/SegmentedButton.js +122 -0
- package/dist/stories/components/SegmentedButton/SegmentedButton.stories.js +183 -0
- package/dist/stories/components/SegmentedButton/SegmentedButton.style.js +19 -0
- package/dist/stories/components/SegmentedButton.js +5 -5
- package/dist/stories/components/SegmentedButton.style.js +9 -90
- package/dist/stories/components/Select/Select.js +135 -0
- package/dist/stories/components/Select/Select.stories.js +200 -0
- package/dist/stories/components/Select/Select.style.js +19 -0
- package/dist/stories/components/Select.style.js +9 -93
- package/dist/stories/components/SingleBarLineCharts.js +5 -5
- package/dist/stories/components/SingleBarLineCharts.style.js +14 -88
- package/dist/stories/components/TabMenu/TabMenu.js +202 -0
- package/dist/stories/components/TabMenu/TabMenu.stories.js +76 -0
- package/dist/stories/components/TabMenu/TabMenu.style.js +24 -0
- package/dist/stories/components/TabMenu.js +7 -19
- package/dist/stories/components/TabMenu.style.js +14 -105
- package/dist/stories/components/Table/Table.js +195 -0
- package/dist/stories/components/Table/Table.stories.js +104 -0
- package/dist/stories/components/Table/Table.style.js +17 -0
- package/dist/stories/components/TableTooltip.js +71 -0
- package/dist/stories/components/TableTooltip.style.js +12 -0
- package/dist/stories/components/TextField/TextField.js +209 -0
- package/dist/stories/components/TextField/TextField.stories.js +162 -0
- package/dist/stories/components/TextField/TextField.style.js +11 -0
- package/dist/stories/components/TextField.style.js +3 -10
- package/dist/stories/components/TitleDescription/TitleDescription.js +272 -0
- package/dist/stories/components/TitleDescription/TitleDescription.stories.js +117 -0
- package/dist/stories/components/TitleDescription/TitleDescription.style.js +36 -0
- package/dist/stories/components/TitleDescription.style.js +28 -214
- package/dist/stories/components/Tooltip/Tooltip.js +31 -0
- package/dist/stories/components/Tooltip/Tooltip.style.js +18 -0
- package/dist/stories/components/Tooltip.js +1 -1
- package/dist/stories/components/Tooltip.style.js +5 -90
- package/dist/stories/components/TopToggleList/TopToggleList.js +46 -0
- package/dist/stories/components/TopToggleList/TopToggleList.stories.js +52 -0
- package/dist/stories/components/TopToggleList/TopToggleList.style.js +16 -0
- package/dist/stories/components/TopToggleList.style.js +8 -43
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.js +97 -0
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.stories.js +138 -0
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.style.js +21 -0
- package/dist/stories/components/TotalBenchmark.style.js +11 -71
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.js +342 -0
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.stories.js +343 -0
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.style.js +30 -0
- package/dist/stories/components/TotalBenchmarkAreachart.js +3 -3
- package/dist/stories/components/TotalBenchmarkAreachart.style.js +22 -163
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.js +149 -0
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.stories.js +172 -0
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.style.js +24 -0
- package/dist/stories/components/TotalBenchmarkArrows.style.js +16 -100
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.js +165 -0
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.stories.js +185 -0
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.style.js +20 -0
- package/dist/stories/components/TotalBenchmarkBarchart.style.js +12 -69
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.js +186 -0
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.stories.js +291 -0
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.style.js +30 -0
- package/dist/stories/components/TotalDoughnutChart.js +3 -3
- package/dist/stories/components/TotalDoughnutChart.style.js +22 -170
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.js +214 -0
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.stories.js +190 -0
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.style.js +20 -0
- package/dist/stories/components/TotalHorizontalCharts.js +3 -3
- package/dist/stories/components/TotalHorizontalCharts.style.js +12 -113
- package/dist/stories/components/TspanTooltip/TspanTooltip.js +33 -0
- package/dist/stories/components/TspanTooltip/TspanTooltip.style.js +13 -0
- package/dist/stories/components/TspanTooltip.js +3 -3
- package/dist/stories/components/TspanTooltip.style.js +5 -97
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.js +202 -0
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.stories.js +120 -0
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.style.js +18 -0
- package/dist/stories/components/TwoBarCharts.js +2 -2
- package/dist/stories/components/TwoBarCharts.style.js +10 -52
- package/dist/stories/icons/ArrowDownIcon.js +27 -0
- package/dist/stories/icons/ArrowDropDownIcon.js +27 -0
- package/dist/stories/icons/ArrowSelectIcon.js +27 -0
- package/dist/stories/icons/ArrowUpIcon.js +27 -0
- package/dist/stories/icons/AttachedIcon.js +27 -0
- package/dist/stories/icons/BellIcon.js +27 -0
- package/dist/stories/icons/Calendar.js +20 -0
- package/dist/stories/icons/CalendarIcon.js +27 -0
- package/dist/stories/icons/CalendarInOpen.js +26 -0
- package/dist/stories/icons/CheckBoxButtonCheckedIcon.js +28 -0
- package/dist/stories/icons/CheckBoxCheckedIcon.js +28 -0
- package/dist/stories/icons/CheckBoxNotCheckedIcon.js +28 -0
- package/dist/stories/icons/ChervronLeftIcon.js +20 -0
- package/dist/stories/icons/ChervronRightIcon.js +20 -0
- package/dist/stories/icons/ClockIcon.js +27 -0
- package/dist/stories/icons/CloseIcon.js +27 -0
- package/dist/stories/icons/CloseXIcon.js +27 -0
- package/dist/stories/icons/ComboBoxArrowDownIcon.js +28 -0
- package/dist/stories/icons/ComboBoxArrowUpIcon.js +28 -0
- package/dist/stories/icons/DocumentIcon.js +48 -0
- package/dist/stories/icons/DownloadIcon.js +27 -0
- package/dist/stories/icons/Duplicate.js +28 -0
- package/dist/stories/icons/ErrorIcon.js +27 -0
- package/dist/stories/icons/ExitIcon.js +28 -0
- package/dist/stories/icons/ExportIcon.js +28 -0
- package/dist/stories/icons/EyeIcon.js +28 -0
- package/dist/stories/icons/FileIcon.js +27 -0
- package/dist/stories/icons/FilterIcon.js +36 -0
- package/dist/stories/icons/FlyIcon.js +28 -0
- package/dist/stories/icons/FoodLionChartIcon.js +42 -0
- package/dist/stories/icons/FoodLionIcon.js +3076 -0
- package/dist/stories/icons/FoodLionNewIcon.js +39 -0
- package/dist/stories/icons/GiantFoodChartIcon.js +40 -0
- package/dist/stories/icons/GiantFoodIcon.js +1976 -0
- package/dist/stories/icons/GiantFoodIcon_new.js +42 -0
- package/dist/stories/icons/HannafordChartIcon.js +40 -0
- package/dist/stories/icons/HannafordIcon.js +5017 -0
- package/dist/stories/icons/HannafordIcon_new.js +41 -0
- package/dist/stories/icons/HannafordNewIcon.js +213 -0
- package/dist/stories/icons/InfoIcon.js +28 -0
- package/dist/stories/icons/LampIcon.js +27 -0
- package/dist/stories/icons/LegendLineIcon.js +29 -0
- package/dist/stories/icons/LegendUnionIcon.js +29 -0
- package/dist/stories/icons/MaintenanceIcon.js +28 -0
- package/dist/stories/icons/MenuItemClosedIcon.js +28 -0
- package/dist/stories/icons/MenuItemOpenIcon.js +28 -0
- package/dist/stories/icons/MenuItemRightIcon.js +28 -0
- package/dist/stories/icons/MenuItemUpIcon.js +28 -0
- package/dist/stories/icons/NoDataFoundIcon.js +86 -0
- package/dist/stories/icons/OptionsIcon.js +27 -0
- package/dist/stories/icons/SearchIcon.js +27 -0
- package/dist/stories/icons/ShoppingCartIcon.js +45 -0
- package/dist/stories/icons/ShoutIcon.js +27 -0
- package/dist/stories/icons/SpotlightProductIcon.js +28 -0
- package/dist/stories/icons/StopAndShopChartIcon.js +42 -0
- package/dist/stories/icons/StopAndShopIcon.js +134 -0
- package/dist/stories/icons/StopAndShopNewIcon.js +41 -0
- package/dist/stories/icons/SucceededIcon.js +27 -0
- package/dist/stories/icons/TheGiantCompanyChartIcon.js +40 -0
- package/dist/stories/icons/TheGiantCompanyIcon.js +40 -0
- package/dist/stories/icons/TheGiantCompanyNewIcon.js +39 -0
- package/dist/stories/utils/CommonFunctions.js +78 -0
- package/dist/stories/utils/IconsHandler.style.js +3 -8
- package/package.json +1 -1
- package/dist/stories/CampaignTool/PopupContent.stories.js +0 -284
- package/dist/stories/components/BannerEventBoxTest.js +0 -42
- package/dist/stories/components/FilterButton.js +0 -53
- package/dist/stories/components/FilterButton.style.js +0 -12
- package/dist/stories/components/NewInput.js +0 -33
- package/dist/stories/components/icons/TheGiantCompanyIcon_old.js +0 -1831
|
@@ -0,0 +1,186 @@
|
|
|
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 && /*#__PURE__*/_react.default.createElement("span", {
|
|
87
|
+
style: {
|
|
88
|
+
fontWeight: itemsBoldedValues ? '700' : '400'
|
|
89
|
+
}
|
|
90
|
+
}, ' (', "".concat(Math.round(row.value / value * 100), "%)")), isPercent && row.value && "".concat(row.value.toFixed(1), "%"));
|
|
91
|
+
return /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.ControlsContainer, {
|
|
92
|
+
className: className,
|
|
93
|
+
height: height,
|
|
94
|
+
width: width,
|
|
95
|
+
textcolor: textcolor
|
|
96
|
+
}, legendData.length === 0 || legendData.every(item => item.value === undefined || item.value === null) ? /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
97
|
+
className: "NoDataFoundMessage",
|
|
98
|
+
noDataText: noDataText
|
|
99
|
+
}) : /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.Controls, {
|
|
100
|
+
className: "Controls",
|
|
101
|
+
height: height,
|
|
102
|
+
width: width
|
|
103
|
+
}, !hideTitleAndValue && /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TitleAndValueContainer, {
|
|
104
|
+
className: "TitleAndValueContainer"
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.Title, {
|
|
106
|
+
className: "Title"
|
|
107
|
+
}, title), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.CurrencySignAndFormattedValueContainer, {
|
|
108
|
+
className: "CurrencySignAndFormattedValueContainer"
|
|
109
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.FormattedValue, {
|
|
110
|
+
className: "FormattedValue",
|
|
111
|
+
width: width
|
|
112
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.CurrencySign, {
|
|
113
|
+
className: "CurrencySign"
|
|
114
|
+
}, 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, {
|
|
115
|
+
className: "TextAfterValue"
|
|
116
|
+
}, textAfterValue) : '', addingBenchmark && /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, null))), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartAndLegendContainer, null, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartContainer, {
|
|
117
|
+
width: width,
|
|
118
|
+
height: height,
|
|
119
|
+
ref: DoughnutChartContainerRef
|
|
120
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, null, /*#__PURE__*/_react.default.createElement(_recharts.PieChart, null, /*#__PURE__*/_react.default.createElement(_recharts.Pie, {
|
|
121
|
+
fill: "#8884d8",
|
|
122
|
+
dataKey: "value",
|
|
123
|
+
blendStroke: true,
|
|
124
|
+
startAngle: -270,
|
|
125
|
+
data: legendData,
|
|
126
|
+
outerRadius: DoughnutChartRadius - 4,
|
|
127
|
+
innerRadius: DoughnutChartRadius - DoughnutChartRadius / 3
|
|
128
|
+
}, legendData.map(row => /*#__PURE__*/_react.default.createElement(_recharts.Cell, {
|
|
129
|
+
key: "cell-".concat(row.name),
|
|
130
|
+
fill: row.color
|
|
131
|
+
}))), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, {
|
|
132
|
+
content: /*#__PURE__*/_react.default.createElement(CustomTooltip, {
|
|
133
|
+
value: value,
|
|
134
|
+
isPercent: isPercent
|
|
135
|
+
})
|
|
136
|
+
}), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, null)))), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.LegendContainer, null, legendData.map(row => /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.LegendControlsContainer, {
|
|
137
|
+
key: row.name
|
|
138
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.LegendColorRectangle, {
|
|
139
|
+
color: row.color
|
|
140
|
+
}), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.LegendTitleAndFormatedValueContainer, null, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.LegendTitle, {
|
|
141
|
+
style: {
|
|
142
|
+
flexDirection: itemsValuesSeparateLine ? 'column' : 'row',
|
|
143
|
+
alignItems: itemsValuesSeparateLine ? 'baseline' : 'center'
|
|
144
|
+
}
|
|
145
|
+
}, row.name, displayLegendValue(row)))))))));
|
|
146
|
+
};
|
|
147
|
+
exports.TotalDoughnutChart = TotalDoughnutChart;
|
|
148
|
+
var _default = exports.default = TotalDoughnutChart;
|
|
149
|
+
TotalDoughnutChart.defaultProps = {
|
|
150
|
+
className: '',
|
|
151
|
+
title: '',
|
|
152
|
+
value: 0,
|
|
153
|
+
addingBenchmark: false,
|
|
154
|
+
dotCut: false,
|
|
155
|
+
currencySign: false,
|
|
156
|
+
currencyType: 'USD',
|
|
157
|
+
legendData: [],
|
|
158
|
+
itemsPercentagesValueAside: true,
|
|
159
|
+
itemsBoldedValues: true,
|
|
160
|
+
itemsValuesSeparateLine: true,
|
|
161
|
+
width: '100%',
|
|
162
|
+
height: '100%',
|
|
163
|
+
textcolor: '#212121',
|
|
164
|
+
isPercent: false,
|
|
165
|
+
hideTitleAndValue: false,
|
|
166
|
+
noDataText: 'No Data',
|
|
167
|
+
textAfterValue: ''
|
|
168
|
+
};
|
|
169
|
+
function CustomTooltip(_ref) {
|
|
170
|
+
let {
|
|
171
|
+
active,
|
|
172
|
+
payload,
|
|
173
|
+
value,
|
|
174
|
+
isPercent = false
|
|
175
|
+
} = _ref;
|
|
176
|
+
if (active && payload && payload.length) {
|
|
177
|
+
const percent = value && value !== 0 && !isPercent ? (payload[0].value / value * 100).toFixed(1) : value && isPercent ? payload[0].value.toFixed(1) : 0;
|
|
178
|
+
return /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TooltipDiv, null, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TooltipLabel, null, "".concat(payload[0].name, " ").concat(percent, "%")));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
CustomTooltip.defaultProps = {
|
|
182
|
+
active: '',
|
|
183
|
+
payload: '',
|
|
184
|
+
value: '',
|
|
185
|
+
isPercent: false
|
|
186
|
+
};
|
|
@@ -0,0 +1,291 @@
|
|
|
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.TotalCost5rows = exports.TotalCost3rows = exports.TotalCost = exports.SwitchersPatternPercent = exports.HideTitleAndValue = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _TotalDoughnutChart = require("./TotalDoughnutChart");
|
|
10
|
+
const arrLegendData = [{
|
|
11
|
+
name: 'Package Cost',
|
|
12
|
+
value: 30000,
|
|
13
|
+
color: '#85A1D2'
|
|
14
|
+
}, {
|
|
15
|
+
name: 'Redemption Cost',
|
|
16
|
+
value: 6500,
|
|
17
|
+
color: '#9AE6FF'
|
|
18
|
+
}];
|
|
19
|
+
const arrLegendDat3rows = [{
|
|
20
|
+
name: 'Package Cost',
|
|
21
|
+
value: 30000,
|
|
22
|
+
color: '#85A1D2'
|
|
23
|
+
}, {
|
|
24
|
+
name: 'Existing Redeemers',
|
|
25
|
+
value: 6500,
|
|
26
|
+
color: '#9AE6FF'
|
|
27
|
+
}, {
|
|
28
|
+
name: 'Others',
|
|
29
|
+
value: 20000,
|
|
30
|
+
color: '#FD5959'
|
|
31
|
+
}];
|
|
32
|
+
const arrLegendDat5rows = [{
|
|
33
|
+
name: 'Food Lion',
|
|
34
|
+
value: null,
|
|
35
|
+
color: '#066768'
|
|
36
|
+
}, {
|
|
37
|
+
name: 'Hannaford',
|
|
38
|
+
value: null,
|
|
39
|
+
color: '#82B3B4'
|
|
40
|
+
}, {
|
|
41
|
+
name: 'The Giant Company',
|
|
42
|
+
value: undefined,
|
|
43
|
+
color: '#90CE9C'
|
|
44
|
+
}
|
|
45
|
+
// { name: 'Giant Food', value: 200.68474, color: '#5FCC70' },
|
|
46
|
+
// { name: 'Stop&Shop', value: 250.9687458, color: '#229E38' },
|
|
47
|
+
];
|
|
48
|
+
const arrLegendPercent = [{
|
|
49
|
+
color: '#066768',
|
|
50
|
+
name: 'None Switcher',
|
|
51
|
+
value: 40.3
|
|
52
|
+
}, {
|
|
53
|
+
color: '#82B3B4',
|
|
54
|
+
name: 'From Other Products',
|
|
55
|
+
value: 19.7
|
|
56
|
+
}, {
|
|
57
|
+
color: '#90CE9C',
|
|
58
|
+
name: 'From Other Supplier Brand',
|
|
59
|
+
value: 25.31111
|
|
60
|
+
}, {
|
|
61
|
+
color: '#5FCC70',
|
|
62
|
+
name: 'From other Suppliers',
|
|
63
|
+
value: 14.59999
|
|
64
|
+
}];
|
|
65
|
+
var _default = exports.default = {
|
|
66
|
+
title: 'SAG BI/TotalDoughnutChart',
|
|
67
|
+
component: _TotalDoughnutChart.TotalDoughnutChart,
|
|
68
|
+
tags: ['autodocs'],
|
|
69
|
+
id: 'TotalDoughnutChart',
|
|
70
|
+
parameters: {
|
|
71
|
+
design: {
|
|
72
|
+
type: 'figspec',
|
|
73
|
+
accessToken: 'figd_vlq2HLcwzTQLvrhLrFWY_Be8CqbuyKcltE9oyHnR'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
argTypes: {
|
|
77
|
+
title: {
|
|
78
|
+
name: 'Title',
|
|
79
|
+
control: {
|
|
80
|
+
type: 'text'
|
|
81
|
+
},
|
|
82
|
+
description: 'title on top of the component'
|
|
83
|
+
},
|
|
84
|
+
value: {
|
|
85
|
+
name: 'Value',
|
|
86
|
+
control: {
|
|
87
|
+
type: 'number',
|
|
88
|
+
min: 0,
|
|
89
|
+
max: 100000000000000
|
|
90
|
+
},
|
|
91
|
+
description: 'value (total) '
|
|
92
|
+
},
|
|
93
|
+
addingBenchmark: {
|
|
94
|
+
name: 'Add Benchmark',
|
|
95
|
+
control: {
|
|
96
|
+
type: 'boolean'
|
|
97
|
+
},
|
|
98
|
+
description: 'true/false - Adding Benchmark'
|
|
99
|
+
},
|
|
100
|
+
dotCut: {
|
|
101
|
+
name: 'Dot Cut',
|
|
102
|
+
control: {
|
|
103
|
+
type: 'boolean'
|
|
104
|
+
},
|
|
105
|
+
description: 'true/false - format total value with dot cut'
|
|
106
|
+
},
|
|
107
|
+
currencySign: {
|
|
108
|
+
name: 'Currency',
|
|
109
|
+
control: {
|
|
110
|
+
type: 'boolean'
|
|
111
|
+
},
|
|
112
|
+
description: 'true/false - show/hide currency sign before total value'
|
|
113
|
+
},
|
|
114
|
+
currencyType: {
|
|
115
|
+
name: 'Currency Type',
|
|
116
|
+
options: ['USD', 'EUR', 'ILS', 'GBP', 'JPY'],
|
|
117
|
+
control: {
|
|
118
|
+
type: 'select'
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
width: {
|
|
122
|
+
name: 'width',
|
|
123
|
+
control: {
|
|
124
|
+
type: 'text'
|
|
125
|
+
},
|
|
126
|
+
description: 'width of the control (in px / %)'
|
|
127
|
+
},
|
|
128
|
+
height: {
|
|
129
|
+
name: 'height',
|
|
130
|
+
control: {
|
|
131
|
+
type: 'text'
|
|
132
|
+
},
|
|
133
|
+
description: 'height of the control (in px / %)'
|
|
134
|
+
},
|
|
135
|
+
textcolor: {
|
|
136
|
+
name: 'Text Color',
|
|
137
|
+
description: 'Sets the text color',
|
|
138
|
+
control: {
|
|
139
|
+
type: 'color',
|
|
140
|
+
presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
legendData: {
|
|
144
|
+
name: 'Legend Data',
|
|
145
|
+
description: 'array [] of objects: {displayName: string, value:number} to fill the pie chart, Please NOTE: the name have to be uniq '
|
|
146
|
+
},
|
|
147
|
+
itemsPercentagesValueAside: {
|
|
148
|
+
default: false,
|
|
149
|
+
name: 'Show Percentages value aside',
|
|
150
|
+
control: {
|
|
151
|
+
type: 'boolean'
|
|
152
|
+
},
|
|
153
|
+
description: 'true/false - Show Percentages value aside the item value'
|
|
154
|
+
},
|
|
155
|
+
itemsBoldedValues: {
|
|
156
|
+
default: true,
|
|
157
|
+
name: 'Items bolded values',
|
|
158
|
+
control: {
|
|
159
|
+
type: 'boolean'
|
|
160
|
+
},
|
|
161
|
+
description: 'true/false - Make the value text bolded'
|
|
162
|
+
},
|
|
163
|
+
itemsValuesSeparateLine: {
|
|
164
|
+
default: false,
|
|
165
|
+
name: 'Items values in a new line',
|
|
166
|
+
control: {
|
|
167
|
+
type: 'boolean'
|
|
168
|
+
},
|
|
169
|
+
description: 'true/false - Locate the value to a new line'
|
|
170
|
+
},
|
|
171
|
+
noDataText: {
|
|
172
|
+
name: 'No Data text',
|
|
173
|
+
control: {
|
|
174
|
+
type: 'text'
|
|
175
|
+
},
|
|
176
|
+
description: 'text to display when no data found'
|
|
177
|
+
},
|
|
178
|
+
isPercent: {
|
|
179
|
+
default: false,
|
|
180
|
+
name: 'isPercent',
|
|
181
|
+
control: {
|
|
182
|
+
type: 'boolean'
|
|
183
|
+
},
|
|
184
|
+
description: 'true/false - isPercent'
|
|
185
|
+
},
|
|
186
|
+
hideTitleAndValue: {
|
|
187
|
+
default: false,
|
|
188
|
+
name: 'hideTitleAndValue',
|
|
189
|
+
control: {
|
|
190
|
+
type: 'boolean'
|
|
191
|
+
},
|
|
192
|
+
description: 'true/false - isPercent'
|
|
193
|
+
},
|
|
194
|
+
textAfterValue: {
|
|
195
|
+
name: 'textAfterValue',
|
|
196
|
+
control: {
|
|
197
|
+
type: 'text'
|
|
198
|
+
},
|
|
199
|
+
description: 'text After Value'
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
const TotalCost = exports.TotalCost = {
|
|
204
|
+
args: {
|
|
205
|
+
title: 'Total Cost',
|
|
206
|
+
value: 36500,
|
|
207
|
+
addingBenchmark: false,
|
|
208
|
+
dotCut: true,
|
|
209
|
+
currencySign: true,
|
|
210
|
+
currencyType: 'USD',
|
|
211
|
+
legendData: arrLegendData,
|
|
212
|
+
textcolor: '#212121',
|
|
213
|
+
noDataText: 'The selected event is a TPR or has no offer, therefore there are no redemptions or redemption units to display.',
|
|
214
|
+
height: '100%',
|
|
215
|
+
width: '100%',
|
|
216
|
+
isPercent: false,
|
|
217
|
+
hideTitleAndValue: false,
|
|
218
|
+
textAfterValue: ''
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
const TotalCost3rows = exports.TotalCost3rows = {
|
|
222
|
+
args: {
|
|
223
|
+
title: 'Total Cost',
|
|
224
|
+
value: 56500,
|
|
225
|
+
addingBenchmark: false,
|
|
226
|
+
dotCut: true,
|
|
227
|
+
currencySign: true,
|
|
228
|
+
currencyType: 'USD',
|
|
229
|
+
legendData: arrLegendDat3rows,
|
|
230
|
+
textcolor: '#212121',
|
|
231
|
+
noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.',
|
|
232
|
+
hideTitleAndValue: false,
|
|
233
|
+
itemsBoldedValues: false,
|
|
234
|
+
textAfterValue: ''
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
const TotalCost5rows = exports.TotalCost5rows = {
|
|
238
|
+
args: {
|
|
239
|
+
title: 'Total Cost',
|
|
240
|
+
value: 565.25487,
|
|
241
|
+
addingBenchmark: false,
|
|
242
|
+
dotCut: true,
|
|
243
|
+
currencySign: true,
|
|
244
|
+
currencyType: 'USD',
|
|
245
|
+
legendData: arrLegendDat5rows,
|
|
246
|
+
width: '360px',
|
|
247
|
+
height: '410px',
|
|
248
|
+
textcolor: '#212121',
|
|
249
|
+
noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.',
|
|
250
|
+
hideTitleAndValue: false,
|
|
251
|
+
textAfterValue: ''
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
const SwitchersPatternPercent = exports.SwitchersPatternPercent = {
|
|
255
|
+
args: {
|
|
256
|
+
title: 'Switchers Pattern',
|
|
257
|
+
value: 565000,
|
|
258
|
+
addingBenchmark: false,
|
|
259
|
+
dotCut: true,
|
|
260
|
+
currencySign: true,
|
|
261
|
+
currencyType: 'USD',
|
|
262
|
+
legendData: arrLegendPercent,
|
|
263
|
+
width: '360px',
|
|
264
|
+
height: '410px',
|
|
265
|
+
textcolor: '#212121',
|
|
266
|
+
noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.',
|
|
267
|
+
isPercent: true,
|
|
268
|
+
itemsValuesSeparateLine: true,
|
|
269
|
+
hideTitleAndValue: false,
|
|
270
|
+
textAfterValue: '30% out of $400K actual sales'
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
const HideTitleAndValue = exports.HideTitleAndValue = {
|
|
274
|
+
args: {
|
|
275
|
+
title: 'Switchers Pattern',
|
|
276
|
+
value: 565000,
|
|
277
|
+
addingBenchmark: false,
|
|
278
|
+
dotCut: true,
|
|
279
|
+
currencySign: true,
|
|
280
|
+
currencyType: 'USD',
|
|
281
|
+
legendData: arrLegendPercent,
|
|
282
|
+
width: '360px',
|
|
283
|
+
height: '210px',
|
|
284
|
+
textcolor: '#212121',
|
|
285
|
+
noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.',
|
|
286
|
+
isPercent: true,
|
|
287
|
+
itemsValuesSeparateLine: true,
|
|
288
|
+
hideTitleAndValue: true,
|
|
289
|
+
textAfterValue: ''
|
|
290
|
+
}
|
|
291
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.TooltipLabel = exports.TooltipDiv = exports.TitleAndValueContainer = exports.Title = exports.TextAfterValue = exports.LegendTitleAndFormatedValueContainer = exports.LegendTitle = exports.LegendFormattedValue = exports.LegendFormatedValueContainer = exports.LegendControlsContainer = exports.LegendContainer = exports.LegendColorRectangle = exports.FormattedValue = exports.DoughnutChartContainer = exports.DoughnutChartAndLegendContainer = exports.CurrencySignAndFormattedValueContainer = exports.CurrencySign = exports.ControlsContainer = exports.Controls = 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, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
|
|
11
|
+
const scrollableStyles = "\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n width: 8px;\n }\n\n &::-webkit-scrollbar-track {\n background: #E8E8E8;\n border-radius: 5px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #D0D0D0;\n border-radius: 5px;\n }\n";
|
|
12
|
+
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: ", ";\n color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 12px;\n display: flex;\n align-items: center;\n @media (max-width: 1536px) {\n ", "\n }\n\n > * {\n box-sizing: border-box;\n }\n"])), props => props.rootFont, props => props.textColor, props => props.width, props => props.height, scrollableStyles);
|
|
13
|
+
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: white;\n border-radius: 12px; \n"])));
|
|
14
|
+
const TooltipDiv = exports.TooltipDiv = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n background: white;\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n border-radius: 5px;\n padding: 6px 10px;\n margin: 0;\n"])));
|
|
15
|
+
const TooltipLabel = exports.TooltipLabel = _styledComponents.default.p(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: \"Poppins\", sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n width: max-content; // fit-content;\n line-height: normal;\n margin: 0;\n"])));
|
|
16
|
+
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n padding: 0 20px;\n"])));
|
|
17
|
+
const Title = exports.Title = _styledComponents.default.h4(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n margin: 0;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
18
|
+
const CurrencySignAndFormattedValueContainer = exports.CurrencySignAndFormattedValueContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n gap: 5px;\n align-items: baseline;\n"])));
|
|
19
|
+
const CurrencySign = exports.CurrencySign = _styledComponents.default.span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 11px;\n }\n"])));
|
|
20
|
+
const FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\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"])));
|
|
21
|
+
const TextAfterValue = exports.TextAfterValue = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)([" \n font-weight: 400;\n font-size: 12px;\n @media (max-width: 1536px) {\n font-size: 11px;\n }\n @media (max-width: 1366px) {\n font-size: 10px;\n }\n"])));
|
|
22
|
+
const DoughnutChartAndLegendContainer = exports.DoughnutChartAndLegendContainer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n margin-top: auto;\n padding: 0 20px ;\n margin-bottom: 20px; \n"])));
|
|
23
|
+
const DoughnutChartContainer = exports.DoughnutChartContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center; \n min-width: 90px;\n min-height: 90px; \n"])));
|
|
24
|
+
const LegendContainer = exports.LegendContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: 10px;\n display: flex;\n flex-direction: column;\n justify-content: space-evenly; \n"])));
|
|
25
|
+
const LegendControlsContainer = exports.LegendControlsContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 0.5rem;\n align-items: center;\n margin-bottom: 0.375rem;\n"])));
|
|
26
|
+
const LegendTitleAndFormatedValueContainer = exports.LegendTitleAndFormatedValueContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n flex-grow: 1;\n"])));
|
|
27
|
+
const LegendFormatedValueContainer = exports.LegendFormatedValueContainer = _styledComponents.default.div(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 0.875rem;\n"])));
|
|
28
|
+
const LegendColorRectangle = exports.LegendColorRectangle = _styledComponents.default.div(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n width: 0.875rem;\n min-width: 0.875rem;\n height: 0.875rem;\n border-radius: 2px;\n background: ", ";\n"])), props => props.color);
|
|
29
|
+
const LegendTitle = exports.LegendTitle = _styledComponents.default.h5(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 16px;\n gap: 5px;\n margin: 0;\n display: flex;\n justify-content: space-between;\n @media (max-width: 1536px) {\n font-size: 11px;\n }\n @media (max-width: 1366px) {\n font-size: 10px;\n }\n"])));
|
|
30
|
+
const LegendFormattedValue = exports.LegendFormattedValue = _styledComponents.default.span(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n white-space: nowrap;\n"])));
|
|
@@ -87,7 +87,7 @@ const TotalDoughnutChart = props => {
|
|
|
87
87
|
style: {
|
|
88
88
|
fontWeight: itemsBoldedValues ? '700' : '400'
|
|
89
89
|
}
|
|
90
|
-
}, ' (',
|
|
90
|
+
}, ' (', "".concat(Math.round(row.value / value * 100), "%)")), isPercent && row.value && "".concat(row.value.toFixed(1), "%"));
|
|
91
91
|
return /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.ControlsContainer, {
|
|
92
92
|
className: className,
|
|
93
93
|
height: height,
|
|
@@ -126,7 +126,7 @@ const TotalDoughnutChart = props => {
|
|
|
126
126
|
outerRadius: DoughnutChartRadius - 4,
|
|
127
127
|
innerRadius: DoughnutChartRadius - DoughnutChartRadius / 3
|
|
128
128
|
}, legendData.map(row => /*#__PURE__*/_react.default.createElement(_recharts.Cell, {
|
|
129
|
-
key:
|
|
129
|
+
key: "cell-".concat(row.name),
|
|
130
130
|
fill: row.color
|
|
131
131
|
}))), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, {
|
|
132
132
|
content: /*#__PURE__*/_react.default.createElement(CustomTooltip, {
|
|
@@ -176,7 +176,7 @@ function CustomTooltip(_ref) {
|
|
|
176
176
|
if (active && payload && payload.length) {
|
|
177
177
|
// eslint-disable-next-line no-nested-ternary
|
|
178
178
|
const percent = value && value !== 0 && !isPercent ? (payload[0].value / value * 100).toFixed(1) : value && isPercent ? payload[0].value.toFixed(1) : 0;
|
|
179
|
-
return /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TooltipDiv, null, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TooltipLabel, null,
|
|
179
|
+
return /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TooltipDiv, null, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TooltipLabel, null, "".concat(payload[0].name, " ").concat(percent, "%")));
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
CustomTooltip.defaultProps = {
|