sag_components 1.0.85 → 1.0.86-7.2
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/chromatic.config.json +5 -0
- package/dist/Button.test.js +158 -0
- package/dist/LinkButton.test.js +146 -0
- package/dist/SingleBar.test.js +72 -0
- package/dist/index.js +1 -1
- package/dist/setupTests.js +3 -0
- package/dist/stories/CampaignTool/Card.stories.js +92 -0
- package/dist/stories/CampaignTool/MultipleCard.stories.js +33 -0
- package/dist/stories/CampaignTool/PageFilterBar.stories.js +28 -0
- package/dist/stories/CampaignTool/Popup.stories.js +697 -0
- package/dist/stories/CampaignTool/Table.stories.js +104 -0
- 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 +60 -0
- package/dist/stories/components/AttachedFile.style.js +14 -0
- package/dist/stories/components/AutocompleteField.js +40 -0
- package/dist/stories/components/AutocompleteField.style.js +15 -0
- 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 +87 -0
- package/dist/stories/components/BannerEventBox.style.js +22 -0
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.js +149 -0
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.stories.js +30 -0
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.style.js +23 -0
- package/dist/stories/components/BannerEventBoxList.js +148 -0
- package/dist/stories/components/BannerEventBoxList.style.js +23 -0
- 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.js +119 -0
- package/dist/stories/components/BannersDropdown.style.js +18 -0
- 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 +196 -0
- package/dist/stories/components/BarChart.style.js +18 -0
- 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 +211 -0
- package/dist/stories/components/BarChartTwoRows.style.js +18 -0
- package/dist/stories/components/BarChartWithAreaChart.js +261 -0
- package/dist/stories/components/BarChartWithAreaChart.style.js +19 -0
- 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 +299 -0
- package/dist/stories/components/BarChartsByWeeks.style.js +21 -0
- 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.js +68 -44
- package/dist/stories/components/Benchmark.style.js +5 -40
- 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 +206 -48
- package/dist/stories/components/Button.style.js +7 -6
- 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.js +48 -0
- package/dist/stories/components/CampaignTool/CampaignDemoReport.style.js +15 -0
- package/dist/stories/components/CampaignTool/Card.js +72 -0
- package/dist/stories/components/CampaignTool/Card.style.js +19 -0
- package/dist/stories/components/CampaignTool/FormInput.js +41 -0
- package/dist/stories/components/CampaignTool/FormSelect.js +42 -0
- package/dist/stories/components/CampaignTool/MultipleCard.js +26 -0
- package/dist/stories/components/CampaignTool/MultipleCard.style.js +12 -0
- package/dist/stories/components/CampaignTool/PageFilterBar.js +23 -0
- package/dist/stories/components/CampaignTool/PageFilterBar.style.js +12 -0
- package/dist/stories/components/CampaignTool/Popup.js +172 -0
- package/dist/stories/components/CampaignTool/Popup.style.js +24 -0
- package/dist/stories/components/CampaignTool/PopupContent.js +111 -0
- package/dist/stories/components/CampaignTool/PopupContent.style.js +21 -0
- package/dist/stories/components/CampaignTool/PopupFieldsRules.js +168 -0
- package/dist/stories/components/CampaignTool/Table.js +195 -0
- package/dist/stories/components/CampaignTool/Table.style.js +18 -0
- 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.js +76 -0
- package/dist/stories/components/CheckBox.style.js +14 -0
- 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.js +69 -0
- package/dist/stories/components/CheckBoxButton.style.js +14 -0
- package/dist/stories/components/CodeEditor/CodeEditor.js +43 -0
- package/dist/stories/components/CodeEditor/CodeEditor.style.js +12 -0
- package/dist/stories/components/CodeEditor.js +43 -0
- package/dist/stories/components/CodeEditor.style.js +12 -0
- 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 +66 -0
- package/dist/stories/components/CollapseData.style.js +21 -0
- package/dist/stories/components/CollapseHeader/CollapseHeader.js +267 -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.js +267 -0
- package/dist/stories/components/CollapseHeader.style.js +35 -0
- 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.js +61 -0
- package/dist/stories/components/CollapseMenuItem.style.js +17 -0
- package/dist/stories/components/CommonFunctions.js +54 -22
- 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.js +148 -0
- package/dist/stories/components/Datepicker.style.js +13 -0
- 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.js +97 -0
- package/dist/stories/components/DownloadProgress.style.js +14 -0
- 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.js +162 -188
- package/dist/stories/components/Dropdown.style.js +1 -6
- package/dist/stories/components/DropdownMulti.js +290 -0
- package/dist/stories/components/DropdownMulti.style.js +11 -0
- 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 +281 -0
- package/dist/stories/components/DropdownMultiNew.style.js +29 -0
- 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.js +90 -0
- package/dist/stories/components/DropdownNew.style.js +13 -0
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.js +234 -0
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.style.js +26 -0
- package/dist/stories/components/DropdownSingleNew.js +236 -0
- package/dist/stories/components/DropdownSingleNew.style.js +27 -0
- 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.js +144 -0
- package/dist/stories/components/EventDetailsCard.style.js +18 -0
- 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.js +61 -0
- package/dist/stories/components/EventList.style.js +14 -0
- 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.js +50 -0
- package/dist/stories/components/EventListItem.style.js +14 -0
- 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.js +11 -16
- package/dist/stories/components/FilterContainer.style.js +3 -6
- 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 +568 -0
- package/dist/stories/components/FilterPanel.style.js +21 -0
- 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.js +68 -0
- package/dist/stories/components/FormattedValue.style.js +18 -0
- 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.js +106 -69
- package/dist/stories/components/IconButton.style.js +8 -13
- 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.js +186 -0
- package/dist/stories/components/Input.style.js +18 -0
- 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.js +93 -0
- package/dist/stories/components/InputOld.style.js +17 -0
- 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.js +317 -0
- package/dist/stories/components/KpiFilter.style.js +26 -0
- 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.js +198 -0
- package/dist/stories/components/LinkButton.style.js +14 -0
- 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 +44 -0
- package/dist/stories/components/LinnerDataBox.style.js +22 -0
- 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.js +82 -0
- package/dist/stories/components/ListBox.style.js +14 -0
- 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.js +109 -0
- package/dist/stories/components/MarketShareDescription.style.js +27 -0
- 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.js +21 -0
- package/dist/stories/components/Modal.style.js +17 -0
- package/dist/stories/components/ModalTotalBenchmark.js +224 -0
- package/dist/stories/components/ModalTotalCost.js +139 -0
- 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 +169 -0
- package/dist/stories/components/MonthPicker.style.js +19 -0
- package/dist/stories/components/MonthPopupPicker.js +127 -0
- package/dist/stories/components/MultipleCard/MultipleCard.js +26 -0
- package/dist/stories/components/MultipleCard/MultipleCard.stories.js +33 -0
- package/dist/stories/components/MultipleCard/MultipleCard.style.js +11 -0
- 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.js +30 -0
- package/dist/stories/components/NoDataFoundMessage.style.js +13 -0
- 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.js +106 -53
- package/dist/stories/components/OneColumnContainer.style.js +12 -20
- 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 +440 -0
- package/dist/stories/components/PerformanceAnalytics.style.js +25 -0
- 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 +58 -0
- package/dist/stories/components/PerformanceAnalyticsLegend.style.js +16 -0
- 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 +320 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn.style.js +23 -0
- 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 +70 -0
- package/dist/stories/components/PerformanceAnalyticsTotals.style.js +20 -0
- 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.js +244 -0
- package/dist/stories/components/PopupCharts.style.js +23 -0
- 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.js +94 -0
- package/dist/stories/components/ProductsVariety.style.js +20 -0
- 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.js +52 -0
- package/dist/stories/components/ProgressBar.style.js +13 -0
- 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 +168 -0
- package/dist/stories/components/QuarterPicker.style.js +19 -0
- package/dist/stories/components/QuarterPopupPicker.js +112 -0
- 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.js +78 -0
- package/dist/stories/components/QuickFilter.style.js +11 -0
- package/dist/stories/components/QuickFilterDropdownMultiSelection.js +299 -0
- package/dist/stories/components/QuickFilterDropdownMultiSelection.style.js +28 -0
- package/dist/stories/components/QuickFilterDropdownSingle.js +229 -0
- package/dist/stories/components/QuickFilterDropdownSingle.style.js +27 -0
- package/dist/stories/components/RangeDatePicker.js +147 -0
- 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 +179 -0
- package/dist/stories/components/RangePicker.style.js +19 -0
- 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.js +284 -0
- package/dist/stories/components/ReportTable.style.js +22 -0
- 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.js +68 -0
- package/dist/stories/components/SagButton.style.js +13 -0
- 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.js +130 -0
- package/dist/stories/components/SagIconButton.style.js +12 -0
- package/dist/stories/components/SagInput/SagInput.js +53 -0
- package/dist/stories/components/SagInput/SagInput.stories.js +69 -0
- package/dist/stories/components/SagInput/SagInput.style.js +13 -0
- package/dist/stories/components/SagInput.js +53 -0
- package/dist/stories/components/SagInput.style.js +13 -0
- 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.js +89 -0
- package/dist/stories/components/SalesAndROI.style.js +19 -0
- 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.js +39 -0
- package/dist/stories/components/SearchInput.style.js +12 -0
- 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 +97 -96
- package/dist/stories/components/SegmentedButton.style.js +9 -29
- 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.js +137 -0
- package/dist/stories/components/Select.style.js +20 -0
- package/dist/stories/components/SingleBarLineCharts.js +308 -0
- package/dist/stories/components/SingleBarLineCharts.style.js +22 -0
- 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 +201 -0
- package/dist/stories/components/TabMenu.style.js +24 -0
- 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.js +209 -0
- package/dist/stories/components/TextField.style.js +11 -0
- 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.js +256 -146
- package/dist/stories/components/TitleDescription.style.js +28 -70
- 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 +31 -0
- package/dist/stories/components/Tooltip.style.js +18 -0
- 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.js +46 -0
- package/dist/stories/components/TopToggleList.style.js +16 -0
- 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.js +78 -67
- package/dist/stories/components/TotalBenchmark.style.js +13 -26
- 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 +258 -105
- package/dist/stories/components/TotalBenchmarkAreachart.style.js +22 -30
- 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.js +100 -86
- package/dist/stories/components/TotalBenchmarkArrows.style.js +16 -36
- 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.js +115 -107
- package/dist/stories/components/TotalBenchmarkBarchart.style.js +12 -32
- 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 +168 -99
- package/dist/stories/components/TotalDoughnutChart.style.js +22 -46
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.js +208 -0
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.stories.js +168 -0
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.style.js +20 -0
- package/dist/stories/components/TotalHorizontalCharts.js +213 -0
- package/dist/stories/components/TotalHorizontalCharts.style.js +20 -0
- 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 +33 -0
- package/dist/stories/components/TspanTooltip.style.js +13 -0
- 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 +209 -0
- package/dist/stories/components/TwoBarCharts.style.js +18 -0
- package/dist/stories/components/icons/ArrowDownIcon.js +7 -8
- package/dist/stories/components/icons/ArrowDropDownIcon.js +27 -0
- package/dist/stories/components/icons/ArrowSelectIcon.js +28 -0
- package/dist/stories/components/icons/ArrowUpIcon.js +7 -8
- package/dist/stories/components/icons/AttachedIcon.js +27 -0
- package/dist/stories/components/icons/BellIcon.js +8 -9
- package/dist/stories/components/icons/Calendar.js +20 -0
- package/dist/stories/components/icons/CalendarIcon.js +27 -0
- package/dist/stories/components/icons/CalendarInOpen.js +26 -0
- package/dist/stories/components/icons/CheckBoxButtonCheckedIcon.js +28 -0
- package/dist/stories/components/icons/CheckBoxCheckedIcon.js +28 -0
- package/dist/stories/components/icons/CheckBoxNotCheckedIcon.js +28 -0
- package/dist/stories/components/icons/ChervronLeftIcon.js +20 -0
- package/dist/stories/components/icons/ChervronRightIcon.js +20 -0
- package/dist/stories/components/icons/ClockIcon.js +27 -0
- package/dist/stories/components/icons/CloseIcon.js +27 -0
- package/dist/stories/components/icons/CloseXIcon.js +27 -0
- package/dist/stories/components/icons/ComboBoxArrowDownIcon.js +28 -0
- package/dist/stories/components/icons/ComboBoxArrowUpIcon.js +28 -0
- package/dist/stories/components/icons/DocumentIcon.js +48 -0
- package/dist/stories/components/icons/DownloadIcon.js +8 -9
- package/dist/stories/components/icons/Duplicate.js +28 -0
- package/dist/stories/components/icons/ErrorIcon.js +28 -0
- package/dist/stories/components/icons/ExitIcon.js +9 -9
- package/dist/stories/components/icons/ExportIcon.js +28 -0
- package/dist/stories/components/icons/EyeIcon.js +9 -9
- package/dist/stories/components/icons/FileIcon.js +27 -0
- package/dist/stories/components/icons/FilterIcon.js +36 -0
- package/dist/stories/components/icons/FlyIcon.js +9 -9
- package/dist/stories/components/icons/FoodLionChartIcon.js +42 -0
- package/dist/stories/components/icons/FoodLionIcon.js +3076 -0
- package/dist/stories/components/icons/FoodLionNewIcon.js +39 -0
- package/dist/stories/components/icons/GiantFoodChartIcon.js +40 -0
- package/dist/stories/components/icons/GiantFoodIcon.js +1976 -0
- package/dist/stories/components/icons/GiantFoodIcon_new.js +42 -0
- package/dist/stories/components/icons/HannafordChartIcon.js +40 -0
- package/dist/stories/components/icons/HannafordIcon.js +5017 -0
- package/dist/stories/components/icons/HannafordIcon_new.js +41 -0
- package/dist/stories/components/icons/HannafordNewIcon.js +213 -0
- package/dist/stories/components/icons/InfoIcon.js +28 -0
- package/dist/stories/components/icons/LampIcon.js +30 -0
- package/dist/stories/components/icons/LegendLineIcon.js +29 -0
- package/dist/stories/components/icons/LegendUnionIcon.js +29 -0
- package/dist/stories/components/icons/MaintenanceIcon.js +9 -9
- package/dist/stories/components/icons/MenuItemClosedIcon.js +28 -0
- package/dist/stories/components/icons/MenuItemOpenIcon.js +28 -0
- package/dist/stories/components/icons/MenuItemRightIcon.js +28 -0
- package/dist/stories/components/icons/MenuItemUpIcon.js +28 -0
- package/dist/stories/components/icons/NoDataFoundIcon.js +86 -0
- package/dist/stories/components/icons/OptionsIcon.js +27 -0
- package/dist/stories/components/icons/SearchIcon.js +27 -0
- package/dist/stories/components/icons/ShoppingCartIcon.js +45 -0
- package/dist/stories/components/icons/ShoutIcon.js +27 -0
- package/dist/stories/components/icons/SpotlightProductIcon.js +28 -0
- package/dist/stories/components/icons/StopAndShopChartIcon.js +42 -0
- package/dist/stories/components/icons/StopAndShopIcon.js +134 -0
- package/dist/stories/components/icons/StopAndShopNewIcon.js +41 -0
- package/dist/stories/components/icons/SucceededIcon.js +28 -0
- package/dist/stories/components/icons/TheGiantCompanyChartIcon.js +40 -0
- package/dist/stories/components/icons/TheGiantCompanyIcon.js +40 -0
- package/dist/stories/components/icons/TheGiantCompanyNewIcon.js +39 -0
- 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/ComponentFactory.js +65 -0
- package/dist/stories/utils/IconsHandler.js +149 -0
- package/dist/stories/utils/IconsHandler.style.js +11 -0
- package/dist/stories/utils/regex/Email.regex.js +7 -0
- package/dist/stories/utils/regex/LatinWithSpaces.regex.js +7 -0
- package/dist/stories/utils/regex/OnlyEnglishLetters.regex.js +7 -0
- package/dist/stories/utils/regex/Phone.regex.js +7 -0
- package/jest.config.js +7 -0
- package/package.json +65 -38
- package/dist/stories/components/Fonts.style.js +0 -7
- package/dist/stories/components/InfoIcon.js +0 -38
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.PerformanceAnalytics = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _recharts = require("recharts");
|
|
11
|
+
var _TspanTooltip = _interopRequireDefault(require("./TspanTooltip"));
|
|
12
|
+
var _NoDataFoundMessage = require("./NoDataFoundMessage");
|
|
13
|
+
var _SegmentedButton = require("./SegmentedButton");
|
|
14
|
+
var _PerformanceAnalyticsTotals = require("./PerformanceAnalyticsTotals");
|
|
15
|
+
var _PerformanceAnalyticsLegend = require("./PerformanceAnalyticsLegend");
|
|
16
|
+
var _CommonFunctions = require("./CommonFunctions");
|
|
17
|
+
var _PerformanceAnalytics = require("./PerformanceAnalytics.style");
|
|
18
|
+
/* eslint-disable no-use-before-define */
|
|
19
|
+
/* eslint-disable react/jsx-no-bind */
|
|
20
|
+
/* eslint-disable no-nested-ternary */
|
|
21
|
+
/* eslint-disable camelcase */
|
|
22
|
+
/* eslint-disable react/prop-types */
|
|
23
|
+
/* eslint-disable no-shadow */
|
|
24
|
+
/* eslint-disable no-unsafe-optional-chaining */
|
|
25
|
+
/* eslint-disable react/no-unstable-nested-components */
|
|
26
|
+
|
|
27
|
+
const INDIVIDUAL_PERFORMANCE_STR = 'Individual Performance';
|
|
28
|
+
const PERCENT_INCREMENTAL_GROWTH_STR = '% Incremental Growth';
|
|
29
|
+
const PERCENT_CONTRIBUTION_OF_TOTAL_STR = '% Contribution of Total';
|
|
30
|
+
|
|
31
|
+
/* PerformanceAnalytics */
|
|
32
|
+
const PerformanceAnalytics = props => {
|
|
33
|
+
const {
|
|
34
|
+
currencyType,
|
|
35
|
+
colorGraphROI,
|
|
36
|
+
colorBarchart1,
|
|
37
|
+
colorBarchart2,
|
|
38
|
+
textcolor,
|
|
39
|
+
width,
|
|
40
|
+
height,
|
|
41
|
+
lineChartHeight,
|
|
42
|
+
barChartHeight,
|
|
43
|
+
dotCut,
|
|
44
|
+
noDataText,
|
|
45
|
+
totalsData,
|
|
46
|
+
data,
|
|
47
|
+
legendData,
|
|
48
|
+
tooltipBarchartLabel_ROI,
|
|
49
|
+
tooltipBarchartLabel_IndividualPerformance1,
|
|
50
|
+
tooltipBarchartLabel_IndividualPerformance2,
|
|
51
|
+
tooltipBarchartLabel_IndividualPerformance3,
|
|
52
|
+
tooltipBarchartLabel_ContributionOfTotal1,
|
|
53
|
+
tooltipBarchartLabel_ContributionOfTotal2
|
|
54
|
+
} = props;
|
|
55
|
+
const [segmentedButtonsFilter, setSegmentedButtonsFilter] = (0, _react.useState)(INDIVIDUAL_PERFORMANCE_STR);
|
|
56
|
+
const [showLegendTooltip, setShowLegendTooltip] = (0, _react.useState)(false);
|
|
57
|
+
const [tooltipCouponText, setTooltipCouponText] = (0, _react.useState)({
|
|
58
|
+
content: '',
|
|
59
|
+
clientX: 0,
|
|
60
|
+
clientY: 0
|
|
61
|
+
});
|
|
62
|
+
const displayTotalsData = () => /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsTotals.PerformanceAnalyticsTotals, {
|
|
63
|
+
totalsData: totalsData,
|
|
64
|
+
width: width
|
|
65
|
+
});
|
|
66
|
+
const displaySegmentedButtons = () => /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.SegmentedButtonContainer, {
|
|
67
|
+
id: "SegmentedButtonContainer"
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(_SegmentedButton.SegmentedButton, {
|
|
69
|
+
id: "SegmentedButton BaselineSTLY",
|
|
70
|
+
options: [{
|
|
71
|
+
value: INDIVIDUAL_PERFORMANCE_STR
|
|
72
|
+
}, {
|
|
73
|
+
value: PERCENT_INCREMENTAL_GROWTH_STR
|
|
74
|
+
}, {
|
|
75
|
+
value: PERCENT_CONTRIBUTION_OF_TOTAL_STR
|
|
76
|
+
}],
|
|
77
|
+
backgroundcolor: "#F2F2F2",
|
|
78
|
+
controlradius: 8,
|
|
79
|
+
defaultIndex: 0,
|
|
80
|
+
fontSize: 12,
|
|
81
|
+
name: "segmentedDollarsOrUnits",
|
|
82
|
+
onClick: event => {
|
|
83
|
+
setSegmentedButtonsFilter(event.value);
|
|
84
|
+
},
|
|
85
|
+
segmentradius: 8,
|
|
86
|
+
selectedsegmentcolor: "#ffffff",
|
|
87
|
+
selectedtextcolor: "#212121",
|
|
88
|
+
unselectedtextcolor: "#212121",
|
|
89
|
+
width: 490,
|
|
90
|
+
heigth: 14
|
|
91
|
+
}));
|
|
92
|
+
const CustomizedLabelROI = props => {
|
|
93
|
+
const {
|
|
94
|
+
x,
|
|
95
|
+
y,
|
|
96
|
+
stroke,
|
|
97
|
+
value
|
|
98
|
+
} = props;
|
|
99
|
+
return /*#__PURE__*/_react.default.createElement("text", {
|
|
100
|
+
x: x,
|
|
101
|
+
y: y,
|
|
102
|
+
dy: -8,
|
|
103
|
+
fill: stroke,
|
|
104
|
+
fontSize: 14,
|
|
105
|
+
textAnchor: "middle"
|
|
106
|
+
}, value);
|
|
107
|
+
};
|
|
108
|
+
const CustomTooltipROI = _ref => {
|
|
109
|
+
let {
|
|
110
|
+
active,
|
|
111
|
+
payload
|
|
112
|
+
} = _ref;
|
|
113
|
+
if (active && payload && payload.length > 0) {
|
|
114
|
+
var _payload$0$payload;
|
|
115
|
+
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipContainer, null, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipTitle, null, "".concat((_payload$0$payload = payload[0].payload) === null || _payload$0$payload === void 0 ? void 0 : _payload$0$payload.retailer)), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.ToolTipLabelAndValueContainer, null, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipLabel, null, tooltipBarchartLabel_ROI), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipValue, null, "".concat((0, _CommonFunctions.getFormattedValue)(payload[0].value)).concat((0, _CommonFunctions.getFormattedUnits)(payload[0].value)))));
|
|
116
|
+
}
|
|
117
|
+
return null;
|
|
118
|
+
};
|
|
119
|
+
const CustomTooltipBarChart = _ref2 => {
|
|
120
|
+
var _payload$0$payload$In, _payload$0$payload$co, _payload$0$payload$co2;
|
|
121
|
+
let {
|
|
122
|
+
active,
|
|
123
|
+
payload
|
|
124
|
+
} = _ref2;
|
|
125
|
+
if (active && payload && payload.length > 0) {
|
|
126
|
+
var _payload$0$payload2, _payload$0$payload3, _payload$0$payload4, _payload$0$payload5;
|
|
127
|
+
const totalCostValue = ((_payload$0$payload2 = payload[0].payload) === null || _payload$0$payload2 === void 0 ? void 0 : _payload$0$payload2.packageCostValue) + ((_payload$0$payload3 = payload[0].payload) === null || _payload$0$payload3 === void 0 ? void 0 : _payload$0$payload3.redemptionCostValue);
|
|
128
|
+
const packageCostPercent = totalCostValue ? ((_payload$0$payload4 = payload[0].payload) === null || _payload$0$payload4 === void 0 ? void 0 : _payload$0$payload4.packageCostValue) / totalCostValue * 100 : 0;
|
|
129
|
+
const redemptionCostPercent = totalCostValue ? ((_payload$0$payload5 = payload[0].payload) === null || _payload$0$payload5 === void 0 ? void 0 : _payload$0$payload5.redemptionCostValue) / totalCostValue * 100 : 0;
|
|
130
|
+
switch (segmentedButtonsFilter) {
|
|
131
|
+
case INDIVIDUAL_PERFORMANCE_STR:
|
|
132
|
+
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipContainer, {
|
|
133
|
+
id: "TooltipContainer"
|
|
134
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.ToolTipBarchart1Container, {
|
|
135
|
+
id: "ToolTipBarchart1Container"
|
|
136
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.LegendColorRectangle, {
|
|
137
|
+
id: "LegendColorRectangle",
|
|
138
|
+
color: colorBarchart1
|
|
139
|
+
}), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.ToolTipBarchart1LabelAndValueContainer, {
|
|
140
|
+
id: "ToolTipBarchart1LabelAndValueContainer"
|
|
141
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.ToolTipLabelAndValueContainer, {
|
|
142
|
+
id: "ToolTipLabelAndValueContainer"
|
|
143
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipLabel, {
|
|
144
|
+
id: "TooltipLabel"
|
|
145
|
+
}, tooltipBarchartLabel_IndividualPerformance1), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipValue, {
|
|
146
|
+
id: "TooltipValue"
|
|
147
|
+
}, "".concat((0, _CommonFunctions.getCurrencySign)(currencyType)).concat((0, _CommonFunctions.getFormattedValue)(payload[0].payload.packageCostValue), "\n ").concat((0, _CommonFunctions.getFormattedUnits)(payload[0].payload.packageCostValue), " (").concat(packageCostPercent.toFixed(1), "%) "))), redemptionCostPercent > 0 && /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.ToolTipLabelAndValueContainer, {
|
|
148
|
+
id: "ToolTipLabelAndValueContainer"
|
|
149
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipLabel, {
|
|
150
|
+
id: "TooltipLabel"
|
|
151
|
+
}, tooltipBarchartLabel_IndividualPerformance2), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipValue, {
|
|
152
|
+
id: "TooltipValue"
|
|
153
|
+
}, "".concat((0, _CommonFunctions.getCurrencySign)(currencyType), "\n ").concat((0, _CommonFunctions.getFormattedValue)(payload[0].payload.redemptionCostValue), "\n ").concat((0, _CommonFunctions.getFormattedUnits)(payload[0].payload.redemptionCostValue), " \n (").concat(redemptionCostPercent.toFixed(1), "%) "))))), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.ToolTipLabelAndValueContainer, {
|
|
154
|
+
id: "ToolTipLabelAndValueContainer"
|
|
155
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.LegendColorRectangle, {
|
|
156
|
+
id: "LegendColorRectangle",
|
|
157
|
+
color: colorBarchart2
|
|
158
|
+
}), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipLabel, {
|
|
159
|
+
id: "TooltipLabel"
|
|
160
|
+
}, tooltipBarchartLabel_IndividualPerformance3), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipValue, {
|
|
161
|
+
id: "TooltipValue"
|
|
162
|
+
}, "".concat((0, _CommonFunctions.getCurrencySign)(currencyType)).concat((0, _CommonFunctions.getFormattedValue)(payload[0].payload.incrementalSalesValue), "\n ").concat((0, _CommonFunctions.getFormattedUnits)(payload[0].payload.incrementalSalesValue), " "))));
|
|
163
|
+
case PERCENT_INCREMENTAL_GROWTH_STR:
|
|
164
|
+
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipContainer, {
|
|
165
|
+
id: "TooltipContainer"
|
|
166
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.ToolTipLabelAndValueContainer, {
|
|
167
|
+
id: "ToolTipLabelAndValueContainer"
|
|
168
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.LegendColorRectangle, {
|
|
169
|
+
id: "LegendColorRectangle",
|
|
170
|
+
color: colorBarchart2
|
|
171
|
+
}), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipLabel, {
|
|
172
|
+
id: "TooltipLabel"
|
|
173
|
+
}, "Incremental Growth Value:"), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipValue, {
|
|
174
|
+
id: "TooltipValue"
|
|
175
|
+
}, "".concat((_payload$0$payload$In = payload[0].payload.IncrementalGrowthValue) === null || _payload$0$payload$In === void 0 ? void 0 : _payload$0$payload$In.toFixed(1), "% "))));
|
|
176
|
+
case PERCENT_CONTRIBUTION_OF_TOTAL_STR:
|
|
177
|
+
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipContainer, {
|
|
178
|
+
id: "TooltipContainer"
|
|
179
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.ToolTipBarchart1Container, {
|
|
180
|
+
id: "ToolTipBarchart1Container"
|
|
181
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.LegendColorRectangle, {
|
|
182
|
+
id: "LegendColorRectangle",
|
|
183
|
+
color: colorBarchart1
|
|
184
|
+
}), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.ToolTipBarchart1LabelAndValueContainer, {
|
|
185
|
+
id: "ToolTipBarchart1LabelAndValueContainer"
|
|
186
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.ToolTipLabelAndValueContainer, {
|
|
187
|
+
id: "ToolTipLabelAndValueContainer"
|
|
188
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipLabel, {
|
|
189
|
+
id: "TooltipLabel"
|
|
190
|
+
}, tooltipBarchartLabel_ContributionOfTotal1), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipValue, {
|
|
191
|
+
id: "TooltipValue"
|
|
192
|
+
}, "".concat((_payload$0$payload$co = payload[0].payload.contributionTotalCostValue) === null || _payload$0$payload$co === void 0 ? void 0 : _payload$0$payload$co.toFixed(1), "% "))))), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.ToolTipLabelAndValueContainer, {
|
|
193
|
+
id: "ToolTipLabelAndValueContainer"
|
|
194
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.LegendColorRectangle, {
|
|
195
|
+
id: "LegendColorRectangle",
|
|
196
|
+
color: colorBarchart2
|
|
197
|
+
}), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipLabel, {
|
|
198
|
+
id: "TooltipLabel"
|
|
199
|
+
}, tooltipBarchartLabel_ContributionOfTotal2), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.TooltipValue, {
|
|
200
|
+
id: "TooltipValue"
|
|
201
|
+
}, "".concat((_payload$0$payload$co2 = payload[0].payload.contributionIncrementalSalesValue) === null || _payload$0$payload$co2 === void 0 ? void 0 : _payload$0$payload$co2.toFixed(1), "% "))));
|
|
202
|
+
default:
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return null;
|
|
207
|
+
};
|
|
208
|
+
const displayLineChartROI = () => /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, {
|
|
209
|
+
id: "ResponsiveContainer",
|
|
210
|
+
height: lineChartHeight
|
|
211
|
+
}, segmentedButtonsFilter !== PERCENT_CONTRIBUTION_OF_TOTAL_STR ? /*#__PURE__*/_react.default.createElement(_recharts.LineChart, {
|
|
212
|
+
data: data,
|
|
213
|
+
margin: {
|
|
214
|
+
top: 20,
|
|
215
|
+
right: 30,
|
|
216
|
+
left: 20,
|
|
217
|
+
bottom: 10
|
|
218
|
+
}
|
|
219
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, {
|
|
220
|
+
content: /*#__PURE__*/_react.default.createElement(CustomTooltipROI, null)
|
|
221
|
+
}), /*#__PURE__*/_react.default.createElement(_recharts.Line, {
|
|
222
|
+
type: "monotone",
|
|
223
|
+
dataKey: "roiValue",
|
|
224
|
+
fill: colorGraphROI,
|
|
225
|
+
name: "retailer",
|
|
226
|
+
stroke: colorGraphROI
|
|
227
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
228
|
+
content: /*#__PURE__*/_react.default.createElement(CustomizedLabelROI, null)
|
|
229
|
+
}))) : /*#__PURE__*/_react.default.createElement("div", null));
|
|
230
|
+
const CustomizedLabelBarchart = props => {
|
|
231
|
+
const {
|
|
232
|
+
x,
|
|
233
|
+
y,
|
|
234
|
+
width,
|
|
235
|
+
value,
|
|
236
|
+
payload
|
|
237
|
+
} = props;
|
|
238
|
+
const radius = 10;
|
|
239
|
+
const plusSign = value > 0 ? '+' : '';
|
|
240
|
+
return /*#__PURE__*/_react.default.createElement("g", null, /*#__PURE__*/_react.default.createElement("text", {
|
|
241
|
+
x: x + width / 2,
|
|
242
|
+
y: y - radius,
|
|
243
|
+
fill: textcolor,
|
|
244
|
+
fontWeight: 400,
|
|
245
|
+
fontSize: "16px",
|
|
246
|
+
textAnchor: "middle",
|
|
247
|
+
dominantBaseline: "middle"
|
|
248
|
+
}, segmentedButtonsFilter === INDIVIDUAL_PERFORMANCE_STR ? currencyType ? "".concat((0, _CommonFunctions.getCurrencySign)(currencyType).toString(), "\n ").concat(dotCut ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value), "\n ").concat(dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : '', " ") : '' : segmentedButtonsFilter === PERCENT_INCREMENTAL_GROWTH_STR ? "".concat(plusSign).concat(value, "%") : segmentedButtonsFilter === PERCENT_CONTRIBUTION_OF_TOTAL_STR ? "".concat(value, "%") : ''));
|
|
249
|
+
};
|
|
250
|
+
function CustomizedTickBarChart(props) {
|
|
251
|
+
const {
|
|
252
|
+
x,
|
|
253
|
+
y,
|
|
254
|
+
stroke,
|
|
255
|
+
payload
|
|
256
|
+
} = props;
|
|
257
|
+
const handleMouseEnter = content => {
|
|
258
|
+
setTooltipCouponText(prevState => ({
|
|
259
|
+
...prevState,
|
|
260
|
+
content: content !== prevState.content ? content : prevState.content,
|
|
261
|
+
clientX: x,
|
|
262
|
+
clientY: y
|
|
263
|
+
}));
|
|
264
|
+
setShowLegendTooltip(true);
|
|
265
|
+
};
|
|
266
|
+
const handleMouseLeave = () => {
|
|
267
|
+
setShowLegendTooltip(false);
|
|
268
|
+
};
|
|
269
|
+
if (data && data.length > 0 && payload) {
|
|
270
|
+
const retailerData = data.filter(item => item.retailer === payload.value);
|
|
271
|
+
if (retailerData && retailerData.length > 0) {
|
|
272
|
+
const {
|
|
273
|
+
offerType
|
|
274
|
+
} = retailerData[0];
|
|
275
|
+
return /*#__PURE__*/_react.default.createElement("g", {
|
|
276
|
+
transform: "translate(".concat(x, ",").concat(y, ")"),
|
|
277
|
+
onMouseEnter: () => handleMouseEnter(offerType),
|
|
278
|
+
onMouseLeave: handleMouseLeave
|
|
279
|
+
}, /*#__PURE__*/_react.default.createElement("text", {
|
|
280
|
+
x: 0,
|
|
281
|
+
y: 0,
|
|
282
|
+
dy: 16,
|
|
283
|
+
fill: "#212121"
|
|
284
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.LabelBoldText, {
|
|
285
|
+
textAnchor: "middle",
|
|
286
|
+
x: "0",
|
|
287
|
+
dy: "50",
|
|
288
|
+
fontSize: 16,
|
|
289
|
+
fontWeight: 600
|
|
290
|
+
}, payload.value), /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.LabelText, {
|
|
291
|
+
textAnchor: "middle",
|
|
292
|
+
x: "0",
|
|
293
|
+
dy: "30",
|
|
294
|
+
fontSize: 14,
|
|
295
|
+
fontWeight: 400
|
|
296
|
+
}, retailerData[0].period)));
|
|
297
|
+
}
|
|
298
|
+
return null;
|
|
299
|
+
}
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
const getDataKeyNameBar1 = () => segmentedButtonsFilter === INDIVIDUAL_PERFORMANCE_STR ? 'totalValue' : segmentedButtonsFilter === PERCENT_INCREMENTAL_GROWTH_STR ? '' : segmentedButtonsFilter === PERCENT_CONTRIBUTION_OF_TOTAL_STR ? 'contributionTotalCostValue' : '';
|
|
303
|
+
const getDataKeyNameBar2 = () => segmentedButtonsFilter === INDIVIDUAL_PERFORMANCE_STR ? 'incrementalSalesValue' : segmentedButtonsFilter === PERCENT_INCREMENTAL_GROWTH_STR ? 'IncrementalGrowthValue' : segmentedButtonsFilter === PERCENT_CONTRIBUTION_OF_TOTAL_STR ? 'contributionIncrementalSalesValue' : '';
|
|
304
|
+
const displayBarChart = () => {
|
|
305
|
+
if (data && data.length > 0) {
|
|
306
|
+
const formatedData = data.map(item => ({
|
|
307
|
+
...item,
|
|
308
|
+
totalValue: item.packageCostValue + item.redemptionCostValue,
|
|
309
|
+
contributionTotalCostValue: item.contributionTotalCostValue
|
|
310
|
+
}));
|
|
311
|
+
return /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, {
|
|
312
|
+
id: "ResponsiveContainer",
|
|
313
|
+
height: barChartHeight,
|
|
314
|
+
width: width
|
|
315
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.BarChart, {
|
|
316
|
+
data: formatedData,
|
|
317
|
+
maxBarSize: 60,
|
|
318
|
+
margin: {
|
|
319
|
+
top: 30,
|
|
320
|
+
right: 30,
|
|
321
|
+
left: 20,
|
|
322
|
+
bottom: 5
|
|
323
|
+
}
|
|
324
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.XAxis, {
|
|
325
|
+
dataKey: "retailer",
|
|
326
|
+
tick: CustomizedTickBarChart,
|
|
327
|
+
tickLine: false,
|
|
328
|
+
height: 120,
|
|
329
|
+
stroke: isNegativeValueFound() === true ? '#D0D0D0' : '#000'
|
|
330
|
+
}), showLegendTooltip && /*#__PURE__*/_react.default.createElement(_TspanTooltip.default, {
|
|
331
|
+
id: "Tooltip",
|
|
332
|
+
content: tooltipCouponText.content,
|
|
333
|
+
top: tooltipCouponText.clientY,
|
|
334
|
+
left: tooltipCouponText.clientX,
|
|
335
|
+
direction: "top"
|
|
336
|
+
}), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, {
|
|
337
|
+
cursor: {
|
|
338
|
+
fill: 'transparent'
|
|
339
|
+
},
|
|
340
|
+
content: CustomTooltipBarChart
|
|
341
|
+
}), /*#__PURE__*/_react.default.createElement(_recharts.ReferenceLine, {
|
|
342
|
+
y: 0,
|
|
343
|
+
stroke: "#D0D0D0"
|
|
344
|
+
}), segmentedButtonsFilter !== PERCENT_INCREMENTAL_GROWTH_STR ? /*#__PURE__*/_react.default.createElement(_recharts.Bar, {
|
|
345
|
+
dataKey: getDataKeyNameBar1(),
|
|
346
|
+
fill: colorBarchart1,
|
|
347
|
+
minPointSize: 5,
|
|
348
|
+
radius: [5, 5, 0, 0]
|
|
349
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
350
|
+
dataKey: getDataKeyNameBar1(),
|
|
351
|
+
content: CustomizedLabelBarchart
|
|
352
|
+
})) : '', /*#__PURE__*/_react.default.createElement(_recharts.Bar, {
|
|
353
|
+
dataKey: getDataKeyNameBar2(),
|
|
354
|
+
fill: colorBarchart2,
|
|
355
|
+
minPointSize: 10,
|
|
356
|
+
radius: [5, 5, 0, 0]
|
|
357
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
358
|
+
dataKey: getDataKeyNameBar2(),
|
|
359
|
+
content: CustomizedLabelBarchart
|
|
360
|
+
}))));
|
|
361
|
+
}
|
|
362
|
+
return null;
|
|
363
|
+
};
|
|
364
|
+
const isNegativeValueFound = () => {
|
|
365
|
+
if (data && data.length > 0) {
|
|
366
|
+
const negativeData = data.filter(item => item.IncrementalGrowthValue < 0);
|
|
367
|
+
if (negativeData && negativeData.length > 0) return true;
|
|
368
|
+
return false;
|
|
369
|
+
}
|
|
370
|
+
return false;
|
|
371
|
+
};
|
|
372
|
+
const displayLegendData = () => {
|
|
373
|
+
switch (segmentedButtonsFilter) {
|
|
374
|
+
case INDIVIDUAL_PERFORMANCE_STR:
|
|
375
|
+
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.PerformanceAnalyticsLegend, {
|
|
376
|
+
legendData: legendData
|
|
377
|
+
});
|
|
378
|
+
case PERCENT_INCREMENTAL_GROWTH_STR:
|
|
379
|
+
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.PerformanceAnalyticsLegend, {
|
|
380
|
+
legendData: [{
|
|
381
|
+
iconColor: colorBarchart2,
|
|
382
|
+
iconType: 'Square',
|
|
383
|
+
title: '% Incremental Growth'
|
|
384
|
+
}, {
|
|
385
|
+
iconColor: colorGraphROI,
|
|
386
|
+
iconType: 'LegendUnionIcon',
|
|
387
|
+
title: 'Incremental Sales ROI'
|
|
388
|
+
}]
|
|
389
|
+
});
|
|
390
|
+
case PERCENT_CONTRIBUTION_OF_TOTAL_STR:
|
|
391
|
+
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.PerformanceAnalyticsLegend, {
|
|
392
|
+
legendData: [{
|
|
393
|
+
iconColor: colorBarchart1,
|
|
394
|
+
iconType: 'Square',
|
|
395
|
+
title: '% Contribution to the Total Cost'
|
|
396
|
+
}, {
|
|
397
|
+
iconColor: colorBarchart2,
|
|
398
|
+
iconType: 'Square',
|
|
399
|
+
title: '% Contribution to the Inc. Sales'
|
|
400
|
+
}]
|
|
401
|
+
});
|
|
402
|
+
default:
|
|
403
|
+
return '';
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.ControlsContainer, {
|
|
407
|
+
id: "ControlsContainer",
|
|
408
|
+
height: height,
|
|
409
|
+
width: width,
|
|
410
|
+
textcolor: textcolor
|
|
411
|
+
}, (totalsData === null || totalsData === void 0 ? void 0 : totalsData.length) > 0 && (data === null || data === void 0 ? void 0 : data.length) > 0 ? /*#__PURE__*/_react.default.createElement(_PerformanceAnalytics.Controls, {
|
|
412
|
+
id: "Controls"
|
|
413
|
+
}, displayTotalsData(), displaySegmentedButtons(), displayLineChartROI(), displayBarChart(), displayLegendData()) : /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
414
|
+
noDataText: noDataText
|
|
415
|
+
}));
|
|
416
|
+
};
|
|
417
|
+
exports.PerformanceAnalytics = PerformanceAnalytics;
|
|
418
|
+
var _default = exports.default = PerformanceAnalytics;
|
|
419
|
+
PerformanceAnalytics.defaultProps = {
|
|
420
|
+
totalsData: [],
|
|
421
|
+
data: [],
|
|
422
|
+
legendData: [],
|
|
423
|
+
currencyType: 'USD',
|
|
424
|
+
colorGraphROI: '#9CCB3B',
|
|
425
|
+
colorBarchart1: '#1F7677',
|
|
426
|
+
colorBarchart2: '#90CE9C',
|
|
427
|
+
textcolor: '#212121',
|
|
428
|
+
width: '',
|
|
429
|
+
height: 130,
|
|
430
|
+
barChartHeight: 130,
|
|
431
|
+
lineChartHeight: 50,
|
|
432
|
+
dotCut: true,
|
|
433
|
+
noDataText: '',
|
|
434
|
+
tooltipBarchartLabel_ROI: 'Incremental Sales ROI:',
|
|
435
|
+
tooltipBarchartLabel_IndividualPerformance1: 'Package Cost:',
|
|
436
|
+
tooltipBarchartLabel_IndividualPerformance2: 'Redemption Cost:',
|
|
437
|
+
tooltipBarchartLabel_IndividualPerformance3: 'Incremental Sales:',
|
|
438
|
+
tooltipBarchartLabel_ContributionOfTotal1: '% Contribution to the Total Cost:',
|
|
439
|
+
tooltipBarchartLabel_ContributionOfTotal2: '% Contribution to the Inc. Sales:'
|
|
440
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.TooltipValue = exports.TooltipTitle = exports.TooltipLabel = exports.TooltipContainer = exports.ToolTipLabelAndValueContainer = exports.ToolTipBarchart1LabelAndValueContainer = exports.ToolTipBarchart1Container = exports.SegmentedButtonContainer = exports.LegendTitle = exports.LegendColorRectangle = exports.LabelText = exports.LabelBoldText = 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;
|
|
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 align-self: center;\n\n > * {\n box-sizing: border-box;\n }\n"])), props => props.rootFont, props => props.textcolor, props => props.width, props => props.height);
|
|
13
|
+
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n padding: 14px 28px;\n background: white;\n ", "\n @media (max-width: 1536px) {\n padding: 12px 24px;\n }\n > #SegmentedButtonContainer {\n padding-left: 0;\n margin-bottom: 16px;\n > #Controls {\n background: #f2f2f2;\n }\n }\n"])), scrollableStyles);
|
|
14
|
+
const LabelBoldText = exports.LabelBoldText = _styledComponents.default.tspan(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 12px;\n }\n"])));
|
|
15
|
+
const LabelText = exports.LabelText = _styledComponents.default.tspan(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 10px;\n }\n @media (max-width: 1366px) {\n font-size: 8px;\n }\n"])));
|
|
16
|
+
const LegendTitle = exports.LegendTitle = _styledComponents.default.h5(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 11px;\n }\n @media (max-width: 1366px) {\n font-size: 10px;\n }\n"])));
|
|
17
|
+
const SegmentedButtonContainer = exports.SegmentedButtonContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: 10px 0 0 10px;\n"])));
|
|
18
|
+
const TooltipContainer = exports.TooltipContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n border-radius: 5px;\n background: #fff;\n font-family: \"Poppins\", sans-serif;\n border-radius: 5px;\n padding: 8px 12px;\n display: grid;\n"])));
|
|
19
|
+
const TooltipLabel = exports.TooltipLabel = _styledComponents.default.p(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: \"Poppins\", sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n width: fit-content;\n margin: 0 6px 0 0;\n"])));
|
|
20
|
+
const TooltipValue = exports.TooltipValue = _styledComponents.default.p(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: \"Poppins\", sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n width: fit-content;\n margin: 0;\n"])));
|
|
21
|
+
const TooltipTitle = exports.TooltipTitle = _styledComponents.default.p(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n margin: 0;\n"])));
|
|
22
|
+
const ToolTipBarchart1Container = exports.ToolTipBarchart1Container = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 10px;\n"])));
|
|
23
|
+
const ToolTipBarchart1LabelAndValueContainer = exports.ToolTipBarchart1LabelAndValueContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n gap: 8px;\n"])));
|
|
24
|
+
const ToolTipLabelAndValueContainer = exports.ToolTipLabelAndValueContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n gap: 8px;\n"])));
|
|
25
|
+
const LegendColorRectangle = exports.LegendColorRectangle = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (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);
|
|
@@ -0,0 +1,58 @@
|
|
|
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.PerformanceAnalyticsLegend = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _LegendUnionIcon = require("../../icons/LegendUnionIcon");
|
|
10
|
+
var _LegendLineIcon = require("../../icons/LegendLineIcon");
|
|
11
|
+
var _PerformanceAnalyticsLegend = require("./PerformanceAnalyticsLegend.style");
|
|
12
|
+
const ICON_TYPE_SQUARE = 'Square';
|
|
13
|
+
const ICON_TYPE_LEGEND_UNION_ICON = 'LegendUnionIcon';
|
|
14
|
+
const ICON_TYPE_LEGEND_LINE_ICON = 'LegendLineIcon';
|
|
15
|
+
|
|
16
|
+
/* PerformanceAnalyticsLegend */
|
|
17
|
+
const PerformanceAnalyticsLegend = props => {
|
|
18
|
+
const {
|
|
19
|
+
legendData,
|
|
20
|
+
width,
|
|
21
|
+
height
|
|
22
|
+
} = props;
|
|
23
|
+
const getLegendData = () => /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.LegendDataContainer, {
|
|
24
|
+
id: "LegendDataContainer"
|
|
25
|
+
}, legendData === null || legendData === void 0 ? void 0 : legendData.map((item, i) => /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.TitleAndIconContainer, {
|
|
26
|
+
key: "".concat(item.title + i)
|
|
27
|
+
}, item.iconType === ICON_TYPE_SQUARE ? /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.LegendColorRectangle, {
|
|
28
|
+
id: "LegendColorRectangle",
|
|
29
|
+
color: item.iconColor
|
|
30
|
+
}) : item.iconType === ICON_TYPE_LEGEND_UNION_ICON ? /*#__PURE__*/_react.default.createElement(_LegendUnionIcon.LegendUnionIcon, {
|
|
31
|
+
width: 30,
|
|
32
|
+
height: 30,
|
|
33
|
+
color: item.iconColor
|
|
34
|
+
}) : item.iconType === ICON_TYPE_LEGEND_LINE_ICON ? /*#__PURE__*/_react.default.createElement(_LegendLineIcon.LegendLineIcon, {
|
|
35
|
+
color: item.iconColor
|
|
36
|
+
}) : '', /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.Title, {
|
|
37
|
+
id: "Title",
|
|
38
|
+
width: width
|
|
39
|
+
}, item.title))));
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.ControlsContainer, {
|
|
41
|
+
height: height,
|
|
42
|
+
width: width
|
|
43
|
+
}, (legendData === null || legendData === void 0 ? void 0 : legendData.length) > 0 ? /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.Controls, {
|
|
44
|
+
height: height,
|
|
45
|
+
width: width
|
|
46
|
+
}, getLegendData()) : '');
|
|
47
|
+
};
|
|
48
|
+
exports.PerformanceAnalyticsLegend = PerformanceAnalyticsLegend;
|
|
49
|
+
var _default = exports.default = PerformanceAnalyticsLegend;
|
|
50
|
+
PerformanceAnalyticsLegend.defaultProps = {
|
|
51
|
+
width: '',
|
|
52
|
+
height: '',
|
|
53
|
+
legendData: [{
|
|
54
|
+
title: '',
|
|
55
|
+
iconType: ICON_TYPE_SQUARE,
|
|
56
|
+
iconColor: '#1F7677'
|
|
57
|
+
}]
|
|
58
|
+
};
|
package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.stories.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
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.PercentIncrementalGrowth = exports.PercentContributionOfTotal = exports.IndividualPerformance = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _PerformanceAnalyticsLegend = require("./PerformanceAnalyticsLegend");
|
|
10
|
+
const legendDataIndividualPerformance = [{
|
|
11
|
+
title: 'Total Cost',
|
|
12
|
+
iconType: 'Square',
|
|
13
|
+
iconColor: '#1F7677'
|
|
14
|
+
}, {
|
|
15
|
+
title: 'Incremental Sales',
|
|
16
|
+
iconType: 'Square',
|
|
17
|
+
iconColor: '#90CE9C'
|
|
18
|
+
}, {
|
|
19
|
+
title: 'Incremental Sales ROI',
|
|
20
|
+
iconType: 'LegendUnionIcon',
|
|
21
|
+
iconColor: '#9CCB3B'
|
|
22
|
+
}];
|
|
23
|
+
const legendDataPercentIncrementalGrowth = [{
|
|
24
|
+
title: '% Incremental Growth',
|
|
25
|
+
iconType: 'Square',
|
|
26
|
+
iconColor: '#90CE9C'
|
|
27
|
+
}, {
|
|
28
|
+
title: 'Incremental Sales ROI',
|
|
29
|
+
iconType: 'LegendUnionIcon',
|
|
30
|
+
iconColor: '#9CCB3B'
|
|
31
|
+
}];
|
|
32
|
+
const legendDataPercentContributionOfTotal = [{
|
|
33
|
+
title: '% Contribution to the Total Cost',
|
|
34
|
+
iconType: 'Square',
|
|
35
|
+
iconColor: '#1F7677'
|
|
36
|
+
}, {
|
|
37
|
+
title: '% Contribution to the Inc. Sales',
|
|
38
|
+
iconType: 'Square',
|
|
39
|
+
iconColor: '#90CE9C'
|
|
40
|
+
}];
|
|
41
|
+
var _default = exports.default = {
|
|
42
|
+
title: 'SAG BI/PerformanceAnalyticsLegend',
|
|
43
|
+
component: _PerformanceAnalyticsLegend.PerformanceAnalyticsLegend,
|
|
44
|
+
tags: ['autodocs'],
|
|
45
|
+
parameters: {
|
|
46
|
+
design: {
|
|
47
|
+
type: 'figspec',
|
|
48
|
+
accessToken: 'figd_vSza21Sk6g-JWb5K_GAQhRJhmuRhS6k1Ju1KNGpC'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
argTypes: {
|
|
52
|
+
legendData: {
|
|
53
|
+
name: 'legendData',
|
|
54
|
+
description: 'array [] of objects representing data to display in component '
|
|
55
|
+
},
|
|
56
|
+
width: {
|
|
57
|
+
name: 'Width',
|
|
58
|
+
control: {
|
|
59
|
+
type: 'text'
|
|
60
|
+
},
|
|
61
|
+
description: 'width of the control (in px / %)'
|
|
62
|
+
},
|
|
63
|
+
height: {
|
|
64
|
+
name: 'Height',
|
|
65
|
+
control: {
|
|
66
|
+
type: 'text'
|
|
67
|
+
},
|
|
68
|
+
description: 'height of the control (in px / %)'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const IndividualPerformance = exports.IndividualPerformance = {
|
|
73
|
+
args: {
|
|
74
|
+
legendData: legendDataIndividualPerformance
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const PercentIncrementalGrowth = exports.PercentIncrementalGrowth = {
|
|
78
|
+
args: {
|
|
79
|
+
legendData: legendDataPercentIncrementalGrowth
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const PercentContributionOfTotal = exports.PercentContributionOfTotal = {
|
|
83
|
+
args: {
|
|
84
|
+
legendData: legendDataPercentContributionOfTotal
|
|
85
|
+
}
|
|
86
|
+
};
|
package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.style.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.TitleAndIconContainer = exports.Title = exports.LegendDataContainer = exports.LegendColorRectangle = 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;
|
|
11
|
+
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n font-family: \"Poppins\", sans-serif;\n font-size: ", ";\n color: ", ";\n width: ", ";\n height: ", ";\n\n > * {\n box-sizing: border-box;\n }\n"])), props => props.rootFont, 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 gap: 20px;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: white;\n"])));
|
|
13
|
+
const LegendDataContainer = exports.LegendDataContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n gap: 40px;\n margin-top: auto;\n @media (max-width: 1536px) {\n gap: 38px;\n }\n @media (max-width: 1366px) {\n gap: 30px;\n }\n"])));
|
|
14
|
+
const TitleAndIconContainer = exports.TitleAndIconContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
|
|
15
|
+
const Title = exports.Title = _styledComponents.default.h4(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 14px;\n line-height: 27px;\n margin: 0 0 0 10px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
16
|
+
const LegendColorRectangle = exports.LegendColorRectangle = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (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);
|