sag_components 1.0.976 → 1.0.978
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/Button.test.js +10 -10
- package/dist/LinkButton.test.js +10 -10
- package/dist/SingleBar.test.js +2 -2
- package/dist/index.js +1 -1
- package/dist/stories/CampaignTool/PopupContent.stories.js +284 -0
- package/dist/stories/components/BannerEventBoxTest.js +42 -0
- package/dist/stories/components/BannerEventBoxTest.style.js +11 -0
- package/dist/stories/components/BarChartsByWeeks.js +3 -0
- package/dist/stories/components/CommonFunctions.js +1 -2
- package/dist/stories/components/FilterButton.js +53 -0
- package/dist/stories/components/FilterButton.style.js +12 -0
- package/dist/stories/components/FormattedValue.js +3 -2
- package/dist/stories/components/NewInput.js +33 -0
- package/dist/stories/components/NewInput.style.js +13 -0
- package/dist/stories/components/QuickFilterDropdownMultiSelection.js +1 -1
- package/dist/stories/components/QuickFilterDropdownSingle.js +1 -1
- package/dist/stories/components/icons/TheGiantCompanyIcon_old.js +1831 -0
- package/package.json +1 -1
- package/dist/stories/components/AttachedFile/AttachedFile.js +0 -62
- package/dist/stories/components/AttachedFile/AttachedFile.stories.js +0 -36
- package/dist/stories/components/AttachedFile/AttachedFile.style.js +0 -48
- package/dist/stories/components/BannerEventBox/BannerEventBox.js +0 -97
- package/dist/stories/components/BannerEventBox/BannerEventBox.stories.js +0 -58
- package/dist/stories/components/BannerEventBox/BannerEventBox.style.js +0 -78
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.js +0 -153
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.stories.js +0 -59
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.style.js +0 -189
- package/dist/stories/components/BannersDropdown/BannersDropdown.js +0 -115
- package/dist/stories/components/BannersDropdown/BannersDropdown.stories.js +0 -64
- package/dist/stories/components/BannersDropdown/BannersDropdown.style.js +0 -99
- package/dist/stories/components/BarChart/BarChart.js +0 -191
- package/dist/stories/components/BarChart/BarChart.stories.js +0 -153
- package/dist/stories/components/BarChart/BarChart.style.js +0 -60
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.js +0 -213
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.stories.js +0 -259
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.style.js +0 -79
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.js +0 -299
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.stories.js +0 -442
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.style.js +0 -96
- package/dist/stories/components/Benchmark/Benchmark.js +0 -130
- package/dist/stories/components/Benchmark/Benchmark.stories.js +0 -148
- package/dist/stories/components/Benchmark/Benchmark.style.js +0 -61
- package/dist/stories/components/Button/Button.js +0 -217
- package/dist/stories/components/Button/Button.stories.js +0 -269
- package/dist/stories/components/Button/Button.style.js +0 -90
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.js +0 -48
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.stories.js +0 -65
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.style.js +0 -48
- package/dist/stories/components/Card/Card.js +0 -72
- package/dist/stories/components/Card/Card.stories.js +0 -92
- package/dist/stories/components/Card/Card.style.js +0 -65
- package/dist/stories/components/CheckBox/CheckBox.js +0 -76
- package/dist/stories/components/CheckBox/CheckBox.stories.js +0 -107
- package/dist/stories/components/CheckBox/CheckBox.style.js +0 -36
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.js +0 -69
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.stories.js +0 -150
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.style.js +0 -39
- package/dist/stories/components/CodeEditor/CodeEditor.js +0 -43
- package/dist/stories/components/CodeEditor/CodeEditor.style.js +0 -13
- package/dist/stories/components/CollapseData/CollapseData.js +0 -66
- package/dist/stories/components/CollapseData/CollapseData.stories.js +0 -125
- package/dist/stories/components/CollapseData/CollapseData.style.js +0 -127
- package/dist/stories/components/CollapseHeader/CollapseHeader.js +0 -249
- package/dist/stories/components/CollapseHeader/CollapseHeader.stories.js +0 -116
- package/dist/stories/components/CollapseHeader/CollapseHeader.style.js +0 -200
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.js +0 -61
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.stories.js +0 -161
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.style.js +0 -61
- package/dist/stories/components/Datepicker/Datepicker.js +0 -148
- package/dist/stories/components/Datepicker/Datepicker.stories.js +0 -86
- package/dist/stories/components/Datepicker/Datepicker.style.js +0 -19
- package/dist/stories/components/DownloadProgress/DownloadProgress.js +0 -97
- package/dist/stories/components/DownloadProgress/DownloadProgress.stories.js +0 -111
- package/dist/stories/components/DownloadProgress/DownloadProgress.style.js +0 -51
- package/dist/stories/components/Dropdown/Dropdown.js +0 -231
- package/dist/stories/components/Dropdown/Dropdown.stories.js +0 -323
- package/dist/stories/components/Dropdown/Dropdown.style.js +0 -17
- package/dist/stories/components/DropdownMulti/DropdownMulti.js +0 -290
- package/dist/stories/components/DropdownMulti/DropdownMulti.stories.js +0 -220
- package/dist/stories/components/DropdownMulti/DropdownMulti.style.js +0 -11
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.js +0 -292
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.style.js +0 -216
- package/dist/stories/components/DropdownNew/DropdownNew.js +0 -98
- package/dist/stories/components/DropdownNew/DropdownNew.stories.js +0 -416
- package/dist/stories/components/DropdownNew/DropdownNew.style.js +0 -21
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.js +0 -254
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.style.js +0 -187
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.js +0 -144
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.stories.js +0 -57
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.style.js +0 -94
- package/dist/stories/components/EventList/EventList.js +0 -61
- package/dist/stories/components/EventList/EventList.stories.js +0 -84
- package/dist/stories/components/EventList/EventList.style.js +0 -38
- package/dist/stories/components/EventListItem/EventListItem.js +0 -50
- package/dist/stories/components/EventListItem/EventListItem.stories.js +0 -65
- package/dist/stories/components/EventListItem/EventListItem.style.js +0 -47
- package/dist/stories/components/FilterContainer/FilterContainer.js +0 -29
- package/dist/stories/components/FilterContainer/FilterContainer.stories.js +0 -23
- package/dist/stories/components/FilterContainer/FilterContainer.style.js +0 -30
- package/dist/stories/components/FilterPanel/FilterPanel.js +0 -571
- package/dist/stories/components/FilterPanel/FilterPanel.stories.js +0 -967
- package/dist/stories/components/FilterPanel/FilterPanel.style.js +0 -89
- package/dist/stories/components/FormInput/FormInput.js +0 -41
- package/dist/stories/components/FormSelect/FormSelect.js +0 -42
- package/dist/stories/components/FormattedValue/FormattedValue.js +0 -68
- package/dist/stories/components/FormattedValue/FormattedValue.stories.js +0 -189
- package/dist/stories/components/FormattedValue/FormattedValue.style.js +0 -91
- package/dist/stories/components/IconButton/IconButton.js +0 -147
- package/dist/stories/components/IconButton/IconButton.stories.js +0 -131
- package/dist/stories/components/IconButton/IconButton.style.js +0 -64
- package/dist/stories/components/Input/Input.js +0 -183
- package/dist/stories/components/Input/Input.stories.js +0 -434
- package/dist/stories/components/Input/Input.style.js +0 -130
- package/dist/stories/components/InputOld/InputOld.js +0 -90
- package/dist/stories/components/InputOld/InputOld.stories.js +0 -100
- package/dist/stories/components/InputOld/InputOld.style.js +0 -69
- package/dist/stories/components/KpiFilter/KpiFilter.js +0 -330
- package/dist/stories/components/KpiFilter/KpiFilter.stories.js +0 -380
- package/dist/stories/components/KpiFilter/KpiFilter.style.js +0 -132
- package/dist/stories/components/LinkButton/LinkButton.js +0 -207
- package/dist/stories/components/LinkButton/LinkButton.stories.js +0 -180
- package/dist/stories/components/LinkButton/LinkButton.style.js +0 -53
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.js +0 -46
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.stories.js +0 -78
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.style.js +0 -68
- package/dist/stories/components/ListBox/ListBox.js +0 -82
- package/dist/stories/components/ListBox/ListBox.stories.js +0 -132
- package/dist/stories/components/ListBox/ListBox.style.js +0 -48
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.js +0 -109
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.stories.js +0 -198
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.style.js +0 -215
- package/dist/stories/components/Modal/Modal.js +0 -21
- package/dist/stories/components/Modal/Modal.style.js +0 -65
- package/dist/stories/components/Modal/ModalTotalBenchmark.js +0 -224
- package/dist/stories/components/Modal/ModalTotalCost.js +0 -139
- package/dist/stories/components/MonthPicker/MonthPicker.js +0 -166
- package/dist/stories/components/MonthPicker/MonthPicker.stories.js +0 -140
- package/dist/stories/components/MonthPicker/MonthPicker.style.js +0 -103
- package/dist/stories/components/MonthPicker/MonthPopupPicker.js +0 -200
- package/dist/stories/components/MultipleCard/MultipleCard.js +0 -26
- package/dist/stories/components/MultipleCard/MultipleCard.stories.js +0 -33
- package/dist/stories/components/MultipleCard/MultipleCard.style.js +0 -13
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.js +0 -30
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.stories.js +0 -66
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.style.js +0 -39
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.js +0 -121
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.stories.js +0 -119
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.style.js +0 -107
- package/dist/stories/components/PageFilterBar/PageFilterBar.js +0 -23
- package/dist/stories/components/PageFilterBar/PageFilterBar.stories.js +0 -28
- package/dist/stories/components/PageFilterBar/PageFilterBar.style.js +0 -22
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.js +0 -447
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.stories.js +0 -258
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.style.js +0 -144
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.js +0 -59
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.stories.js +0 -86
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.style.js +0 -63
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.js +0 -327
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.stories.js +0 -231
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.style.js +0 -116
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.js +0 -70
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.stories.js +0 -100
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.style.js +0 -89
- package/dist/stories/components/Popup/Popup.js +0 -172
- package/dist/stories/components/Popup/Popup.stories.js +0 -704
- package/dist/stories/components/Popup/Popup.style.js +0 -122
- package/dist/stories/components/PopupCharts/PopupCharts.js +0 -244
- package/dist/stories/components/PopupCharts/PopupCharts.stories.js +0 -1203
- package/dist/stories/components/PopupCharts/PopupCharts.style.js +0 -108
- package/dist/stories/components/PopupContent/PopupContent.js +0 -111
- package/dist/stories/components/PopupContent/PopupContent.style.js +0 -74
- package/dist/stories/components/PopupContent/PopupFieldsRules.js +0 -168
- package/dist/stories/components/ProductsVariety/ProductsVariety.js +0 -94
- package/dist/stories/components/ProductsVariety/ProductsVariety.stories.js +0 -91
- package/dist/stories/components/ProductsVariety/ProductsVariety.style.js +0 -86
- package/dist/stories/components/ProgressBar/ProgressBar.js +0 -52
- package/dist/stories/components/ProgressBar/ProgressBar.stories.js +0 -72
- package/dist/stories/components/ProgressBar/ProgressBar.style.js +0 -24
- package/dist/stories/components/QuarterPicker/QuarterPicker.js +0 -165
- package/dist/stories/components/QuarterPicker/QuarterPicker.stories.js +0 -140
- package/dist/stories/components/QuarterPicker/QuarterPicker.style.js +0 -102
- package/dist/stories/components/QuarterPicker/QuarterPopupPicker.js +0 -182
- package/dist/stories/components/QuickFilter/QuickFilter.js +0 -78
- package/dist/stories/components/QuickFilter/QuickFilter.stories.js +0 -281
- package/dist/stories/components/QuickFilter/QuickFilter.style.js +0 -21
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.js +0 -299
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.style.js +0 -194
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.js +0 -229
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.style.js +0 -139
- package/dist/stories/components/RangePicker/RangeDatePicker.js +0 -229
- package/dist/stories/components/RangePicker/RangePicker.js +0 -176
- package/dist/stories/components/RangePicker/RangePicker.stories.js +0 -138
- package/dist/stories/components/RangePicker/RangePicker.style.js +0 -107
- package/dist/stories/components/ReportTable/ReportTable.js +0 -262
- package/dist/stories/components/ReportTable/ReportTable.stories.js +0 -151
- package/dist/stories/components/ReportTable/ReportTable.style.js +0 -131
- package/dist/stories/components/SagButton/SagButton.js +0 -68
- package/dist/stories/components/SagButton/SagButton.stories.js +0 -118
- package/dist/stories/components/SagButton/SagButton.style.js +0 -47
- package/dist/stories/components/SagIconButton/SagIconButton.js +0 -130
- package/dist/stories/components/SagIconButton/SagIconButton.stories.js +0 -123
- package/dist/stories/components/SagIconButton/SagIconButton.style.js +0 -30
- package/dist/stories/components/SagInput/SagInput.js +0 -53
- package/dist/stories/components/SagInput/SagInput.stories.js +0 -69
- package/dist/stories/components/SagInput/SagInput.style.js +0 -41
- package/dist/stories/components/SalesAndROI/SalesAndROI.js +0 -89
- package/dist/stories/components/SalesAndROI/SalesAndROI.stories.js +0 -168
- package/dist/stories/components/SalesAndROI/SalesAndROI.style.js +0 -111
- package/dist/stories/components/SearchInput/SearchInput.js +0 -39
- package/dist/stories/components/SearchInput/SearchInput.stories.js +0 -44
- package/dist/stories/components/SearchInput/SearchInput.style.js +0 -37
- package/dist/stories/components/SegmentedButton/SegmentedButton.js +0 -122
- package/dist/stories/components/SegmentedButton/SegmentedButton.stories.js +0 -183
- package/dist/stories/components/SegmentedButton/SegmentedButton.style.js +0 -100
- package/dist/stories/components/Select/Select.js +0 -135
- package/dist/stories/components/Select/Select.stories.js +0 -200
- package/dist/stories/components/Select/Select.style.js +0 -102
- package/dist/stories/components/TabMenu/TabMenu.js +0 -214
- package/dist/stories/components/TabMenu/TabMenu.stories.js +0 -76
- package/dist/stories/components/TabMenu/TabMenu.style.js +0 -115
- package/dist/stories/components/Table/Table.js +0 -195
- package/dist/stories/components/Table/Table.stories.js +0 -104
- package/dist/stories/components/Table/Table.style.js +0 -86
- package/dist/stories/components/TextField/TextField.js +0 -209
- package/dist/stories/components/TextField/TextField.stories.js +0 -162
- package/dist/stories/components/TextField/TextField.style.js +0 -18
- package/dist/stories/components/TitleDescription/TitleDescription.js +0 -272
- package/dist/stories/components/TitleDescription/TitleDescription.stories.js +0 -117
- package/dist/stories/components/TitleDescription/TitleDescription.style.js +0 -222
- package/dist/stories/components/Tooltip/Tooltip.js +0 -31
- package/dist/stories/components/Tooltip/Tooltip.style.js +0 -103
- package/dist/stories/components/TopToggleList/TopToggleList.js +0 -46
- package/dist/stories/components/TopToggleList/TopToggleList.stories.js +0 -52
- package/dist/stories/components/TopToggleList/TopToggleList.style.js +0 -51
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.js +0 -97
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.stories.js +0 -138
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.style.js +0 -81
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.js +0 -342
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.stories.js +0 -343
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.style.js +0 -171
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.js +0 -149
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.stories.js +0 -172
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.style.js +0 -108
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.js +0 -165
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.stories.js +0 -185
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.style.js +0 -77
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.js +0 -186
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.stories.js +0 -291
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.style.js +0 -178
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.js +0 -229
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.stories.js +0 -228
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.style.js +0 -58
- package/dist/stories/components/TspanTooltip/TspanTooltip.js +0 -33
- package/dist/stories/components/TspanTooltip/TspanTooltip.style.js +0 -105
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.js +0 -204
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.stories.js +0 -185
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.style.js +0 -60
- package/dist/stories/icons/ArrowDownIcon.js +0 -27
- package/dist/stories/icons/ArrowDropDownIcon.js +0 -27
- package/dist/stories/icons/ArrowSelectIcon.js +0 -27
- package/dist/stories/icons/ArrowUpIcon.js +0 -27
- package/dist/stories/icons/AttachedIcon.js +0 -27
- package/dist/stories/icons/BellIcon.js +0 -27
- package/dist/stories/icons/Calendar.js +0 -20
- package/dist/stories/icons/CalendarIcon.js +0 -27
- package/dist/stories/icons/CalendarInOpen.js +0 -26
- package/dist/stories/icons/CheckBoxButtonCheckedIcon.js +0 -28
- package/dist/stories/icons/CheckBoxCheckedIcon.js +0 -28
- package/dist/stories/icons/CheckBoxNotCheckedIcon.js +0 -28
- package/dist/stories/icons/ChervronLeftIcon.js +0 -20
- package/dist/stories/icons/ChervronRightIcon.js +0 -20
- package/dist/stories/icons/ClockIcon.js +0 -27
- package/dist/stories/icons/CloseIcon.js +0 -27
- package/dist/stories/icons/CloseXIcon.js +0 -27
- package/dist/stories/icons/ComboBoxArrowDownIcon.js +0 -28
- package/dist/stories/icons/ComboBoxArrowUpIcon.js +0 -28
- package/dist/stories/icons/DocumentIcon.js +0 -48
- package/dist/stories/icons/DownloadIcon.js +0 -27
- package/dist/stories/icons/Duplicate.js +0 -28
- package/dist/stories/icons/ErrorIcon.js +0 -27
- package/dist/stories/icons/ExitIcon.js +0 -28
- package/dist/stories/icons/ExportIcon.js +0 -28
- package/dist/stories/icons/EyeIcon.js +0 -28
- package/dist/stories/icons/FileIcon.js +0 -27
- package/dist/stories/icons/FilterIcon.js +0 -36
- package/dist/stories/icons/FlyIcon.js +0 -28
- package/dist/stories/icons/FoodLionChartIcon.js +0 -42
- package/dist/stories/icons/FoodLionIcon.js +0 -3076
- package/dist/stories/icons/FoodLionNewIcon.js +0 -39
- package/dist/stories/icons/GiantFoodChartIcon.js +0 -40
- package/dist/stories/icons/GiantFoodIcon.js +0 -1976
- package/dist/stories/icons/GiantFoodIcon_new.js +0 -42
- package/dist/stories/icons/HannafordChartIcon.js +0 -40
- package/dist/stories/icons/HannafordIcon.js +0 -5017
- package/dist/stories/icons/HannafordIcon_new.js +0 -41
- package/dist/stories/icons/HannafordNewIcon.js +0 -213
- package/dist/stories/icons/InfoIcon.js +0 -28
- package/dist/stories/icons/LampIcon.js +0 -27
- package/dist/stories/icons/LegendLineIcon.js +0 -29
- package/dist/stories/icons/LegendUnionIcon.js +0 -29
- package/dist/stories/icons/MaintenanceIcon.js +0 -28
- package/dist/stories/icons/MenuItemClosedIcon.js +0 -28
- package/dist/stories/icons/MenuItemOpenIcon.js +0 -28
- package/dist/stories/icons/MenuItemRightIcon.js +0 -28
- package/dist/stories/icons/MenuItemUpIcon.js +0 -28
- package/dist/stories/icons/NoDataFoundIcon.js +0 -86
- package/dist/stories/icons/OptionsIcon.js +0 -27
- package/dist/stories/icons/SearchIcon.js +0 -27
- package/dist/stories/icons/ShoppingCartIcon.js +0 -45
- package/dist/stories/icons/ShoutIcon.js +0 -27
- package/dist/stories/icons/SpotlightProductIcon.js +0 -28
- package/dist/stories/icons/StopAndShopChartIcon.js +0 -42
- package/dist/stories/icons/StopAndShopIcon.js +0 -134
- package/dist/stories/icons/StopAndShopNewIcon.js +0 -41
- package/dist/stories/icons/SucceededIcon.js +0 -27
- package/dist/stories/icons/TheGiantCompanyChartIcon.js +0 -40
- package/dist/stories/icons/TheGiantCompanyIcon.js +0 -40
- package/dist/stories/icons/TheGiantCompanyNewIcon.js +0 -39
- package/dist/stories/utils/CommonFunctions.js +0 -83
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.LessAvarage = exports.GreaterAvarage = exports.DataWithNulls = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _TotalBenchmarkArrows = require("./TotalBenchmarkArrows");
|
|
10
|
-
const arrDetailsData = [{
|
|
11
|
-
title: 'Basket Change',
|
|
12
|
-
value: 16
|
|
13
|
-
}, {
|
|
14
|
-
title: 'Visits Change',
|
|
15
|
-
value: -5
|
|
16
|
-
}];
|
|
17
|
-
const arrDetailsDataUp = [{
|
|
18
|
-
title: 'Basket Change',
|
|
19
|
-
value: 50
|
|
20
|
-
}, {
|
|
21
|
-
title: 'Visits Change',
|
|
22
|
-
value: 30
|
|
23
|
-
}];
|
|
24
|
-
const arrDetailsDataWithNulls = [{
|
|
25
|
-
title: 'Basket (Units) Change',
|
|
26
|
-
value: null
|
|
27
|
-
}, {
|
|
28
|
-
title: 'Basket ($) Change',
|
|
29
|
-
value: 30
|
|
30
|
-
}, {
|
|
31
|
-
title: 'Visits Change',
|
|
32
|
-
value: 30
|
|
33
|
-
}];
|
|
34
|
-
var _default = exports.default = {
|
|
35
|
-
title: 'SAG BI/TotalBenchmarkArrows',
|
|
36
|
-
component: _TotalBenchmarkArrows.TotalBenchmarkArrows,
|
|
37
|
-
tags: ['autodocs'],
|
|
38
|
-
argTypes: {
|
|
39
|
-
dotCut: {
|
|
40
|
-
name: 'dotCut',
|
|
41
|
-
control: {
|
|
42
|
-
type: 'boolean'
|
|
43
|
-
},
|
|
44
|
-
description: 'true/false - format total value with dot cut'
|
|
45
|
-
},
|
|
46
|
-
title: {
|
|
47
|
-
name: 'title',
|
|
48
|
-
control: {
|
|
49
|
-
type: 'text'
|
|
50
|
-
},
|
|
51
|
-
description: 'title on top of the component'
|
|
52
|
-
},
|
|
53
|
-
value: {
|
|
54
|
-
name: 'value',
|
|
55
|
-
control: {
|
|
56
|
-
type: 'number',
|
|
57
|
-
min: 0,
|
|
58
|
-
max: 100000000000000
|
|
59
|
-
},
|
|
60
|
-
description: 'value (title) '
|
|
61
|
-
},
|
|
62
|
-
addingBenchmark: {
|
|
63
|
-
name: 'Add Benchmark',
|
|
64
|
-
control: {
|
|
65
|
-
type: 'boolean'
|
|
66
|
-
},
|
|
67
|
-
description: 'true/false - Adding Benchmark'
|
|
68
|
-
},
|
|
69
|
-
benchmarkTotalValue: {
|
|
70
|
-
name: 'benchmarkTotalValue',
|
|
71
|
-
control: {
|
|
72
|
-
type: 'number',
|
|
73
|
-
min: 0,
|
|
74
|
-
max: 100000000000000
|
|
75
|
-
},
|
|
76
|
-
description: 'benchmarkTotalValue - set total value of the benchmark'
|
|
77
|
-
},
|
|
78
|
-
benchmarkValue: {
|
|
79
|
-
name: 'benchmarkValue',
|
|
80
|
-
control: {
|
|
81
|
-
type: 'number',
|
|
82
|
-
min: 0,
|
|
83
|
-
max: 100000000000000
|
|
84
|
-
},
|
|
85
|
-
description: 'benchmarkValue - set total value of the benchmark delimeter line'
|
|
86
|
-
},
|
|
87
|
-
detailsTitle: {
|
|
88
|
-
name: 'detailsTitle',
|
|
89
|
-
control: {
|
|
90
|
-
type: 'text'
|
|
91
|
-
},
|
|
92
|
-
description: 'title on top of the details'
|
|
93
|
-
},
|
|
94
|
-
width: {
|
|
95
|
-
name: 'width',
|
|
96
|
-
control: {
|
|
97
|
-
type: 'text'
|
|
98
|
-
},
|
|
99
|
-
description: 'width of the control (in px)'
|
|
100
|
-
},
|
|
101
|
-
height: {
|
|
102
|
-
name: 'height',
|
|
103
|
-
control: {
|
|
104
|
-
type: 'text'
|
|
105
|
-
},
|
|
106
|
-
description: 'height of the control (in px)'
|
|
107
|
-
},
|
|
108
|
-
textcolor: {
|
|
109
|
-
name: 'textcolor',
|
|
110
|
-
description: 'Sets the text color',
|
|
111
|
-
control: {
|
|
112
|
-
type: 'color',
|
|
113
|
-
presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
detailsData: {
|
|
117
|
-
description: 'array [] of objects: {title: string, value:number } to fill the details data. value can be negative '
|
|
118
|
-
},
|
|
119
|
-
noDataText: {
|
|
120
|
-
name: 'noDataText',
|
|
121
|
-
control: {
|
|
122
|
-
type: 'text'
|
|
123
|
-
},
|
|
124
|
-
description: 'text to display when no data found'
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
const LessAvarage = exports.LessAvarage = {
|
|
129
|
-
args: {
|
|
130
|
-
title: 'New Repeaters',
|
|
131
|
-
value: 21500,
|
|
132
|
-
benchmarkTotalValue: 60000,
|
|
133
|
-
benchmarkValue: 30000,
|
|
134
|
-
detailsTitle: 'Existing Repeaters',
|
|
135
|
-
detailsData: arrDetailsData,
|
|
136
|
-
dotCut: true,
|
|
137
|
-
width: '310px',
|
|
138
|
-
height: '280px',
|
|
139
|
-
textcolor: '#212121',
|
|
140
|
-
noDataText: 'The selected event is a TPR or has no offer, therefore there are no redemptions or redemption units to display.'
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
const GreaterAvarage = exports.GreaterAvarage = {
|
|
144
|
-
args: {
|
|
145
|
-
title: 'New Repeaters',
|
|
146
|
-
value: 50500,
|
|
147
|
-
benchmarkTotalValue: 60000,
|
|
148
|
-
benchmarkValue: 30000,
|
|
149
|
-
detailsTitle: 'Existing Repeaters',
|
|
150
|
-
detailsData: arrDetailsDataUp,
|
|
151
|
-
dotCut: true,
|
|
152
|
-
width: '310px',
|
|
153
|
-
height: '280px',
|
|
154
|
-
textcolor: '#212121',
|
|
155
|
-
noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.'
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
const DataWithNulls = exports.DataWithNulls = {
|
|
159
|
-
args: {
|
|
160
|
-
title: 'New Repeaters',
|
|
161
|
-
value: 50500,
|
|
162
|
-
benchmarkTotalValue: 60000,
|
|
163
|
-
benchmarkValue: 30000,
|
|
164
|
-
detailsTitle: 'Existing Repeaters',
|
|
165
|
-
detailsData: arrDetailsDataWithNulls,
|
|
166
|
-
dotCut: true,
|
|
167
|
-
width: '310px',
|
|
168
|
-
height: '280px',
|
|
169
|
-
textcolor: '#212121',
|
|
170
|
-
noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.'
|
|
171
|
-
}
|
|
172
|
-
};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.ValueAndBenchmarkContainer = exports.Title = exports.FormattedValue = exports.DetailsTitle = exports.DetailsRowTitle = exports.DetailsRowPercentSign = exports.DetailsRowFormattedValueNoDataMessage = exports.DetailsRowFormattedValue = exports.DetailsRowContainer = exports.DetailsRowArrowContainer = exports.DetailsContainer = exports.ControlsContainer = exports.Controls = exports.BenchmarkContainer = void 0;
|
|
8
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
position: relative;
|
|
12
|
-
font-family: "Poppins", sans-serif;
|
|
13
|
-
font-style: normal;
|
|
14
|
-
color: ${props => props.textColor};
|
|
15
|
-
width: ${props => props.width};
|
|
16
|
-
height: ${props => props.height};
|
|
17
|
-
border-radius: 12px;
|
|
18
|
-
align-content: center;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
align-items: center;
|
|
22
|
-
`;
|
|
23
|
-
const Controls = exports.Controls = _styledComponents.default.div`
|
|
24
|
-
display: flex;
|
|
25
|
-
border-radius: 12px;
|
|
26
|
-
width: 90%;
|
|
27
|
-
height: 100%;
|
|
28
|
-
background: #ffffff;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
flex-basis: 100%;
|
|
31
|
-
//align-items: center;
|
|
32
|
-
align-items: flex-start;
|
|
33
|
-
justify-content: space-between;
|
|
34
|
-
padding: 0px 0.8rem;
|
|
35
|
-
|
|
36
|
-
`;
|
|
37
|
-
const Title = exports.Title = _styledComponents.default.div`
|
|
38
|
-
font-weight: 500;
|
|
39
|
-
font-size: 1rem;
|
|
40
|
-
@media (max-width: 1536px) {
|
|
41
|
-
font-size: 14px;
|
|
42
|
-
}
|
|
43
|
-
@media (max-width: 1366px) {
|
|
44
|
-
font-size: 12px;
|
|
45
|
-
}
|
|
46
|
-
`;
|
|
47
|
-
const ValueAndBenchmarkContainer = exports.ValueAndBenchmarkContainer = _styledComponents.default.div`
|
|
48
|
-
display: flex;
|
|
49
|
-
flex-direction: row;
|
|
50
|
-
justify-content: space-between;
|
|
51
|
-
align-items: baseline;
|
|
52
|
-
height: 45%;
|
|
53
|
-
`;
|
|
54
|
-
const FormattedValue = exports.FormattedValue = _styledComponents.default.div`
|
|
55
|
-
margin-left: 0.1rem;
|
|
56
|
-
font-weight: 500;
|
|
57
|
-
font-size: 40px;
|
|
58
|
-
@media (max-width: 1536px) {
|
|
59
|
-
font-size: 24px;
|
|
60
|
-
}
|
|
61
|
-
@media (max-width: 1366px) {
|
|
62
|
-
font-size: 20px;
|
|
63
|
-
}
|
|
64
|
-
`;
|
|
65
|
-
const BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div`
|
|
66
|
-
display: flex;
|
|
67
|
-
margin-left: 0.77778rem;
|
|
68
|
-
width: 5.35rem;
|
|
69
|
-
`;
|
|
70
|
-
const DetailsContainer = exports.DetailsContainer = _styledComponents.default.div`
|
|
71
|
-
height: 50%;
|
|
72
|
-
`;
|
|
73
|
-
const DetailsTitle = exports.DetailsTitle = _styledComponents.default.h5`
|
|
74
|
-
font-weight: 500;
|
|
75
|
-
font-size: 1rem;
|
|
76
|
-
margin-top: 0;
|
|
77
|
-
margin-bottom: 12px;
|
|
78
|
-
@media (max-width: 1536px) {
|
|
79
|
-
font-size: 14px;
|
|
80
|
-
}
|
|
81
|
-
@media (max-width: 1366px) {
|
|
82
|
-
font-size: 12px;
|
|
83
|
-
}
|
|
84
|
-
`;
|
|
85
|
-
const DetailsRowContainer = exports.DetailsRowContainer = _styledComponents.default.div`
|
|
86
|
-
display: flex;
|
|
87
|
-
text-align: center;
|
|
88
|
-
align-items: baseline;
|
|
89
|
-
gap: 4px;
|
|
90
|
-
font-weight: 700;
|
|
91
|
-
font-size: 14px;
|
|
92
|
-
`;
|
|
93
|
-
const DetailsRowArrowContainer = exports.DetailsRowArrowContainer = _styledComponents.default.div`
|
|
94
|
-
display: flex;
|
|
95
|
-
align-items: flex-end;
|
|
96
|
-
`;
|
|
97
|
-
const DetailsRowFormattedValue = exports.DetailsRowFormattedValue = _styledComponents.default.span`
|
|
98
|
-
font-weight: 700;
|
|
99
|
-
`;
|
|
100
|
-
const DetailsRowFormattedValueNoDataMessage = exports.DetailsRowFormattedValueNoDataMessage = _styledComponents.default.span`
|
|
101
|
-
margin: 0;
|
|
102
|
-
`;
|
|
103
|
-
const DetailsRowPercentSign = exports.DetailsRowPercentSign = _styledComponents.default.span`
|
|
104
|
-
font-size: 12px;
|
|
105
|
-
`;
|
|
106
|
-
const DetailsRowTitle = exports.DetailsRowTitle = _styledComponents.default.span`
|
|
107
|
-
font-weight: 400;
|
|
108
|
-
`;
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.TotalBenchmarkBarchart = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _recharts = require("recharts");
|
|
10
|
-
var _NoDataFoundMessage = require("../NoDataFoundMessage/NoDataFoundMessage");
|
|
11
|
-
var _CommonFunctions = require("../../utils/CommonFunctions");
|
|
12
|
-
var _Benchmark = require("../Benchmark/Benchmark");
|
|
13
|
-
var _TotalBenchmarkBarchart = require("./TotalBenchmarkBarchart.style");
|
|
14
|
-
/* TotalBenchmarkBarchart */
|
|
15
|
-
const TotalBenchmarkBarchart = props => {
|
|
16
|
-
const {
|
|
17
|
-
title,
|
|
18
|
-
value,
|
|
19
|
-
addingBenchmark,
|
|
20
|
-
benchmarkTotalValue,
|
|
21
|
-
benchmarkValue,
|
|
22
|
-
currency,
|
|
23
|
-
currencyType,
|
|
24
|
-
barChartData,
|
|
25
|
-
dotCut = true,
|
|
26
|
-
width,
|
|
27
|
-
height,
|
|
28
|
-
textcolor,
|
|
29
|
-
noDataText
|
|
30
|
-
} = props;
|
|
31
|
-
const DEFAULT_ROOT_FONT = 16;
|
|
32
|
-
const DEFAULT_COMPONENT_WIDTH = 250;
|
|
33
|
-
const DEFAULT_COMPONENT_HEIGHT = 280;
|
|
34
|
-
const [rootFont, setRootFont] = (0, _react.useState)(DEFAULT_ROOT_FONT.toString().concat('', 'px'));
|
|
35
|
-
const [heightFactor, setHeightFactor] = (0, _react.useState)(1);
|
|
36
|
-
const controlsContainerRef = (0, _react.useRef)();
|
|
37
|
-
(0, _react.useEffect)(() => {
|
|
38
|
-
const {
|
|
39
|
-
offsetWidth
|
|
40
|
-
} = controlsContainerRef.current;
|
|
41
|
-
setRootFont(getRootFont(offsetWidth));
|
|
42
|
-
}, [width]);
|
|
43
|
-
(0, _react.useEffect)(() => {
|
|
44
|
-
const {
|
|
45
|
-
offsetHeight
|
|
46
|
-
} = controlsContainerRef.current;
|
|
47
|
-
const factor = offsetHeight / DEFAULT_COMPONENT_HEIGHT;
|
|
48
|
-
setHeightFactor(factor);
|
|
49
|
-
}, [height]);
|
|
50
|
-
const getRootFont = width => {
|
|
51
|
-
const relation = width.toString().replace('px', '').replace('%', '') / DEFAULT_COMPONENT_WIDTH;
|
|
52
|
-
const fontRoot = (DEFAULT_ROOT_FONT * relation).toString().concat('', 'px');
|
|
53
|
-
return fontRoot;
|
|
54
|
-
};
|
|
55
|
-
const getSizeFactor = () => rootFont.toString().replace('px', '') / DEFAULT_ROOT_FONT;
|
|
56
|
-
const getFormattedBarChartData = () => {
|
|
57
|
-
const formattedBarChartData = [];
|
|
58
|
-
const currencySign = currency === true ? (0, _CommonFunctions.getCurrencySign)(currencyType, value).toString() : '';
|
|
59
|
-
if (barChartData && (barChartData === null || barChartData === void 0 ? void 0 : barChartData.length) === 2) {
|
|
60
|
-
barChartData.forEach((data, i) => {
|
|
61
|
-
const formattedData = {
|
|
62
|
-
id: i,
|
|
63
|
-
title: data.title,
|
|
64
|
-
value: data.value,
|
|
65
|
-
formattedValue: data.value !== undefined && data.value != null ? currencySign.concat('', (0, _CommonFunctions.getFormattedValue)(data.value), '', (0, _CommonFunctions.getFormattedUnits)(data.value)) : 'No Data',
|
|
66
|
-
color: data.color
|
|
67
|
-
};
|
|
68
|
-
formattedBarChartData.push(formattedData);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
return formattedBarChartData;
|
|
72
|
-
};
|
|
73
|
-
return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.ControlsContainer, {
|
|
74
|
-
id: "ControlsContainer",
|
|
75
|
-
height: height,
|
|
76
|
-
width: width,
|
|
77
|
-
textcolor: textcolor,
|
|
78
|
-
ref: controlsContainerRef
|
|
79
|
-
}, value !== undefined && value !== null || barChartData && (barChartData === null || barChartData === void 0 ? void 0 : barChartData.length) >= 2 && (barChartData[0].value !== undefined && barChartData[0].value !== null || barChartData[1].value !== undefined && barChartData[1].value !== null) ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.Controls, {
|
|
80
|
-
id: "Controls"
|
|
81
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.TitleAndValueContainer, {
|
|
82
|
-
id: "TitleAndValueContainer"
|
|
83
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.Title, {
|
|
84
|
-
id: "Title"
|
|
85
|
-
}, title), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.ValueAndBenchmarkContainer, {
|
|
86
|
-
id: "ValueAndBenchmarkContainer"
|
|
87
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.CurrencySign, {
|
|
88
|
-
id: "CurrencySign"
|
|
89
|
-
}, value !== undefined && value !== null && currency ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ''), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.FormattedValue, {
|
|
90
|
-
id: "FormattedValue"
|
|
91
|
-
}, value !== undefined && value !== null ? dotCut ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value) : '', value !== undefined && value != null && dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ''), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.FormattedValueNoDataMessage, null, value === undefined || value === null ? 'No Data' : ''), addingBenchmark && benchmarkTotalValue ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.BenchmarkContainer, {
|
|
92
|
-
id: "BenchmarkContainer"
|
|
93
|
-
}, /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, {
|
|
94
|
-
totalValue: benchmarkTotalValue !== null && benchmarkTotalValue !== void 0 ? benchmarkTotalValue : 0,
|
|
95
|
-
currentValue: value !== null && value !== void 0 ? value : 0,
|
|
96
|
-
benchmarkValue: benchmarkValue !== null && benchmarkValue !== void 0 ? benchmarkValue : 0,
|
|
97
|
-
height: 12 * getSizeFactor(),
|
|
98
|
-
width: 85 * getSizeFactor(),
|
|
99
|
-
color: "#79DB95",
|
|
100
|
-
linearGradientColor: "#C3EFD0",
|
|
101
|
-
linearGradientUnderAvarageColor: "#FDB1B1",
|
|
102
|
-
underAvarageColor: "#FD5959",
|
|
103
|
-
backgroundColor: "#F2F2F2"
|
|
104
|
-
})) : '')), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.BarchartContainer, {
|
|
105
|
-
id: "BarchartContainer"
|
|
106
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.BarChart, {
|
|
107
|
-
width: 224 * getSizeFactor(),
|
|
108
|
-
height: 150 * heightFactor,
|
|
109
|
-
data: getFormattedBarChartData(),
|
|
110
|
-
margin: {
|
|
111
|
-
top: 40 * heightFactor,
|
|
112
|
-
bottom: 0
|
|
113
|
-
}
|
|
114
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.CartesianGrid, {
|
|
115
|
-
strokeDasharray: "3 3",
|
|
116
|
-
vertical: false
|
|
117
|
-
}), /*#__PURE__*/_react.default.createElement(_recharts.Bar, {
|
|
118
|
-
dataKey: "value",
|
|
119
|
-
name: "title",
|
|
120
|
-
maxBarSize: 55,
|
|
121
|
-
radius: [5, 5, 0, 0]
|
|
122
|
-
}, getFormattedBarChartData().map(entry => /*#__PURE__*/_react.default.createElement(_recharts.Cell, {
|
|
123
|
-
key: entry.id,
|
|
124
|
-
fill: entry.color
|
|
125
|
-
})), /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
126
|
-
dataKey: "formattedValue",
|
|
127
|
-
position: "top",
|
|
128
|
-
fill: "#212121",
|
|
129
|
-
fontWeight: 400,
|
|
130
|
-
fontSize: "14px"
|
|
131
|
-
})), /*#__PURE__*/_react.default.createElement(_recharts.XAxis, {
|
|
132
|
-
dataKey: "title",
|
|
133
|
-
tick: {
|
|
134
|
-
fontSize: 14
|
|
135
|
-
},
|
|
136
|
-
tickLine: false
|
|
137
|
-
})))) : /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
138
|
-
noDataText: noDataText
|
|
139
|
-
}));
|
|
140
|
-
};
|
|
141
|
-
exports.TotalBenchmarkBarchart = TotalBenchmarkBarchart;
|
|
142
|
-
var _default = exports.default = TotalBenchmarkBarchart;
|
|
143
|
-
TotalBenchmarkBarchart.defaultProps = {
|
|
144
|
-
title: 'Title',
|
|
145
|
-
value: 100,
|
|
146
|
-
addingBenchmark: true,
|
|
147
|
-
benchmarkTotalValue: 300,
|
|
148
|
-
benchmarkValue: 400,
|
|
149
|
-
currency: true,
|
|
150
|
-
currencyType: 'USD',
|
|
151
|
-
barChartData: [{
|
|
152
|
-
title: 'Actual',
|
|
153
|
-
value: 175100,
|
|
154
|
-
color: '#066768'
|
|
155
|
-
}, {
|
|
156
|
-
title: 'Base Line',
|
|
157
|
-
value: 100000,
|
|
158
|
-
color: '#90CE9C'
|
|
159
|
-
}],
|
|
160
|
-
dotCut: true,
|
|
161
|
-
width: '250px',
|
|
162
|
-
height: '280px',
|
|
163
|
-
textcolor: '#212121',
|
|
164
|
-
noDataText: ''
|
|
165
|
-
};
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.Redeemers = exports.IncrementalSales = exports.DataWithNulls = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _TotalBenchmarkBarchart = require("./TotalBenchmarkBarchart");
|
|
10
|
-
const arrData = [{
|
|
11
|
-
title: 'Actual',
|
|
12
|
-
value: 175100,
|
|
13
|
-
color: '#066768'
|
|
14
|
-
}, {
|
|
15
|
-
title: 'Base Line',
|
|
16
|
-
value: 100000,
|
|
17
|
-
color: '#90CE9C'
|
|
18
|
-
}];
|
|
19
|
-
const arrDataRedeemers = [{
|
|
20
|
-
title: 'New Redeemers',
|
|
21
|
-
value: 256200,
|
|
22
|
-
color: '#85A1D2'
|
|
23
|
-
}, {
|
|
24
|
-
title: 'Existing Redeemers',
|
|
25
|
-
value: 700000,
|
|
26
|
-
color: '#9AE6FF'
|
|
27
|
-
}];
|
|
28
|
-
const arrDataWithnulls = [{
|
|
29
|
-
title: 'New Redeemers',
|
|
30
|
-
value: null,
|
|
31
|
-
color: '#85A1D2'
|
|
32
|
-
}, {
|
|
33
|
-
title: 'Existing Redeemers',
|
|
34
|
-
value: 700000,
|
|
35
|
-
color: '#9AE6FF'
|
|
36
|
-
}];
|
|
37
|
-
var _default = exports.default = {
|
|
38
|
-
title: 'SAG BI/TotalBenchmarkBarchart',
|
|
39
|
-
component: _TotalBenchmarkBarchart.TotalBenchmarkBarchart,
|
|
40
|
-
tags: ['autodocs'],
|
|
41
|
-
argTypes: {
|
|
42
|
-
dotCut: {
|
|
43
|
-
name: 'dotCut',
|
|
44
|
-
control: {
|
|
45
|
-
type: 'boolean'
|
|
46
|
-
},
|
|
47
|
-
description: 'true/false - format total value with dot cut'
|
|
48
|
-
},
|
|
49
|
-
title: {
|
|
50
|
-
name: 'title',
|
|
51
|
-
control: {
|
|
52
|
-
type: 'text'
|
|
53
|
-
},
|
|
54
|
-
description: 'title on top of the component'
|
|
55
|
-
},
|
|
56
|
-
value: {
|
|
57
|
-
name: 'value',
|
|
58
|
-
control: {
|
|
59
|
-
type: 'number',
|
|
60
|
-
min: 0,
|
|
61
|
-
max: 100000000000000
|
|
62
|
-
},
|
|
63
|
-
description: 'value (title) '
|
|
64
|
-
},
|
|
65
|
-
addingBenchmark: {
|
|
66
|
-
name: 'Add Benchmark',
|
|
67
|
-
control: {
|
|
68
|
-
type: 'boolean'
|
|
69
|
-
},
|
|
70
|
-
description: 'true/false - Adding Benchmark'
|
|
71
|
-
},
|
|
72
|
-
benchmarkTotalValue: {
|
|
73
|
-
name: 'benchmarkTotalValue',
|
|
74
|
-
control: {
|
|
75
|
-
type: 'number',
|
|
76
|
-
min: 0,
|
|
77
|
-
max: 100000000000000
|
|
78
|
-
},
|
|
79
|
-
description: 'benchmarkTotalValue - set total value of the benchmark'
|
|
80
|
-
},
|
|
81
|
-
benchmarkValue: {
|
|
82
|
-
name: 'benchmarkValue',
|
|
83
|
-
control: {
|
|
84
|
-
type: 'number',
|
|
85
|
-
min: 0,
|
|
86
|
-
max: 100000000000000
|
|
87
|
-
},
|
|
88
|
-
description: 'benchmarkValue - set total value of the benchmark delimeter line'
|
|
89
|
-
},
|
|
90
|
-
currency: {
|
|
91
|
-
name: 'currency',
|
|
92
|
-
control: {
|
|
93
|
-
type: 'boolean'
|
|
94
|
-
},
|
|
95
|
-
description: 'true/false - show/hide currency before total value'
|
|
96
|
-
},
|
|
97
|
-
currencyType: {
|
|
98
|
-
name: 'currencyType',
|
|
99
|
-
options: ['USD', 'EUR', 'ILS', 'GBP', 'JPY'],
|
|
100
|
-
control: {
|
|
101
|
-
type: 'select'
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
width: {
|
|
105
|
-
name: 'width',
|
|
106
|
-
control: {
|
|
107
|
-
type: 'text'
|
|
108
|
-
},
|
|
109
|
-
description: 'width of the control (in px)'
|
|
110
|
-
},
|
|
111
|
-
height: {
|
|
112
|
-
name: 'height',
|
|
113
|
-
control: {
|
|
114
|
-
type: 'text'
|
|
115
|
-
},
|
|
116
|
-
description: 'height of the control (in px)'
|
|
117
|
-
},
|
|
118
|
-
textcolor: {
|
|
119
|
-
name: 'textcolor',
|
|
120
|
-
description: 'Sets the text color',
|
|
121
|
-
control: {
|
|
122
|
-
type: 'color',
|
|
123
|
-
presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
barChartData: {
|
|
127
|
-
description: 'array [] of objects: {title: string, value:number } to fill the details data. only 2 elements supported right now '
|
|
128
|
-
},
|
|
129
|
-
noDataText: {
|
|
130
|
-
name: 'noDataText',
|
|
131
|
-
control: {
|
|
132
|
-
type: 'text'
|
|
133
|
-
},
|
|
134
|
-
description: 'text to display when no data found'
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
const IncrementalSales = exports.IncrementalSales = {
|
|
139
|
-
args: {
|
|
140
|
-
title: 'Incremental Sales',
|
|
141
|
-
value: 75100,
|
|
142
|
-
benchmarkTotalValue: 100000,
|
|
143
|
-
benchmarkValue: 50000,
|
|
144
|
-
barChartData: arrData,
|
|
145
|
-
currency: true,
|
|
146
|
-
currencyType: 'USD',
|
|
147
|
-
dotCut: true,
|
|
148
|
-
width: '250px',
|
|
149
|
-
height: '280px',
|
|
150
|
-
textcolor: '#000',
|
|
151
|
-
noDataText: 'The selected event is a TPR or has no offer, therefore there are no redemptions or redemption units to display.'
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
const Redeemers = exports.Redeemers = {
|
|
155
|
-
args: {
|
|
156
|
-
title: 'Redeemers',
|
|
157
|
-
value: 956200,
|
|
158
|
-
benchmarkTotalValue: 2000000,
|
|
159
|
-
benchmarkValue: 1000000,
|
|
160
|
-
barChartData: arrDataRedeemers,
|
|
161
|
-
currency: true,
|
|
162
|
-
currencyType: 'USD',
|
|
163
|
-
dotCut: true,
|
|
164
|
-
width: '300px',
|
|
165
|
-
height: '280px',
|
|
166
|
-
textcolor: '#000',
|
|
167
|
-
noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.'
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
const DataWithNulls = exports.DataWithNulls = {
|
|
171
|
-
args: {
|
|
172
|
-
title: 'Redeemers',
|
|
173
|
-
value: null,
|
|
174
|
-
benchmarkTotalValue: 2000000,
|
|
175
|
-
benchmarkValue: 1000000,
|
|
176
|
-
barChartData: arrDataWithnulls,
|
|
177
|
-
currency: true,
|
|
178
|
-
currencyType: 'USD',
|
|
179
|
-
dotCut: true,
|
|
180
|
-
width: '300px',
|
|
181
|
-
height: '280px',
|
|
182
|
-
textcolor: '#000',
|
|
183
|
-
noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.'
|
|
184
|
-
}
|
|
185
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.ValueAndBenchmarkContainer = exports.TitleAndValueContainer = exports.Title = exports.FormattedValueNoDataMessage = exports.FormattedValue = exports.CurrencySign = exports.ControlsContainer = exports.Controls = exports.BenchmarkContainer = exports.BarchartContainer = void 0;
|
|
8
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
position: relative;
|
|
12
|
-
font-family: "Poppins", sans-serif;
|
|
13
|
-
font-style: normal;
|
|
14
|
-
color: ${props => props.textColor};
|
|
15
|
-
width: ${props => props.width};
|
|
16
|
-
height: ${props => props.height};
|
|
17
|
-
border-radius: 12px;
|
|
18
|
-
align-content: center;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
align-items: center;
|
|
22
|
-
background: #ffffff;
|
|
23
|
-
`;
|
|
24
|
-
const Controls = exports.Controls = _styledComponents.default.div`
|
|
25
|
-
display: flex;
|
|
26
|
-
border-radius: 12px;
|
|
27
|
-
background: #ffffff;
|
|
28
|
-
justify-content: space-between;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
flex-basis: 100%;
|
|
31
|
-
`;
|
|
32
|
-
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div`
|
|
33
|
-
margin: 0px;
|
|
34
|
-
`;
|
|
35
|
-
const Title = exports.Title = _styledComponents.default.div`
|
|
36
|
-
font-weight: 500;
|
|
37
|
-
font-size: 1rem;
|
|
38
|
-
@media (max-width: 1366px) {
|
|
39
|
-
font-size: 12px;
|
|
40
|
-
}
|
|
41
|
-
@media (max-width: 1536px) {
|
|
42
|
-
font-size: 14px;
|
|
43
|
-
}
|
|
44
|
-
`;
|
|
45
|
-
const ValueAndBenchmarkContainer = exports.ValueAndBenchmarkContainer = _styledComponents.default.div`
|
|
46
|
-
display: flex;
|
|
47
|
-
justify-content: flex-start;
|
|
48
|
-
align-items: baseline;
|
|
49
|
-
|
|
50
|
-
`;
|
|
51
|
-
const CurrencySign = exports.CurrencySign = _styledComponents.default.div`
|
|
52
|
-
font-weight: 500;
|
|
53
|
-
font-size: 1rem;
|
|
54
|
-
`;
|
|
55
|
-
const FormattedValue = exports.FormattedValue = _styledComponents.default.div`
|
|
56
|
-
margin-left: 0.1rem;
|
|
57
|
-
font-weight: 500;
|
|
58
|
-
font-size: 40px;
|
|
59
|
-
@media (max-width: 1366px) {
|
|
60
|
-
font-size: 20px;
|
|
61
|
-
}
|
|
62
|
-
@media (max-width: 1536px) {
|
|
63
|
-
font-size: 24px;
|
|
64
|
-
}
|
|
65
|
-
`;
|
|
66
|
-
const FormattedValueNoDataMessage = exports.FormattedValueNoDataMessage = _styledComponents.default.div`
|
|
67
|
-
margin-left: 0.3rem;
|
|
68
|
-
font-weight: 700;
|
|
69
|
-
font-size: 16px;
|
|
70
|
-
margin: 0;
|
|
71
|
-
`;
|
|
72
|
-
const BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div`
|
|
73
|
-
margin-left: 0.7em;
|
|
74
|
-
width: 5.35em;
|
|
75
|
-
`;
|
|
76
|
-
const BarchartContainer = exports.BarchartContainer = _styledComponents.default.div`
|
|
77
|
-
`;
|