sag_components 1.0.892 → 1.0.894
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/stories/CampaignTool/PopupContent.stories.js +284 -0
- package/dist/stories/components/BannerEventBoxTest.js +42 -0
- package/dist/stories/components/{MultipleCard/MultipleCard.style.js → BannerEventBoxTest.style.js} +2 -2
- package/dist/stories/components/FilterButton.js +53 -0
- package/dist/stories/components/FilterButton.style.js +12 -0
- package/dist/stories/components/NewInput.js +33 -0
- package/dist/stories/components/{SagInput/SagInput.style.js → NewInput.style.js} +2 -2
- package/dist/stories/components/SingleBarLineCharts.js +3 -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 -14
- package/dist/stories/components/BannerEventBox/BannerEventBox.js +0 -87
- package/dist/stories/components/BannerEventBox/BannerEventBox.stories.js +0 -58
- package/dist/stories/components/BannerEventBox/BannerEventBox.style.js +0 -22
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.js +0 -148
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.stories.js +0 -30
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.style.js +0 -22
- package/dist/stories/components/BannersDropdown/BannersDropdown.js +0 -115
- package/dist/stories/components/BannersDropdown/BannersDropdown.stories.js +0 -64
- package/dist/stories/components/BannersDropdown/BannersDropdown.style.js +0 -18
- package/dist/stories/components/BarChart/BarChart.js +0 -189
- package/dist/stories/components/BarChart/BarChart.stories.js +0 -144
- package/dist/stories/components/BarChart/BarChart.style.js +0 -18
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.js +0 -204
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.stories.js +0 -133
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.style.js +0 -18
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.js +0 -295
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.stories.js +0 -442
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.style.js +0 -21
- package/dist/stories/components/Benchmark/Benchmark.js +0 -130
- package/dist/stories/components/Benchmark/Benchmark.stories.js +0 -148
- package/dist/stories/components/Benchmark/Benchmark.style.js +0 -15
- package/dist/stories/components/Button/Button.js +0 -217
- package/dist/stories/components/Button/Button.stories.js +0 -269
- package/dist/stories/components/Button/Button.style.js +0 -15
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.js +0 -48
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.stories.js +0 -65
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.style.js +0 -15
- package/dist/stories/components/Card/Card.js +0 -72
- package/dist/stories/components/Card/Card.stories.js +0 -92
- package/dist/stories/components/Card/Card.style.js +0 -18
- package/dist/stories/components/CheckBox/CheckBox.js +0 -76
- package/dist/stories/components/CheckBox/CheckBox.stories.js +0 -107
- package/dist/stories/components/CheckBox/CheckBox.style.js +0 -14
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.js +0 -69
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.stories.js +0 -150
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.style.js +0 -14
- package/dist/stories/components/CodeEditor/CodeEditor.js +0 -43
- package/dist/stories/components/CodeEditor/CodeEditor.style.js +0 -12
- package/dist/stories/components/CollapseData/CollapseData.js +0 -66
- package/dist/stories/components/CollapseData/CollapseData.stories.js +0 -125
- package/dist/stories/components/CollapseData/CollapseData.style.js +0 -21
- package/dist/stories/components/CollapseHeader/CollapseHeader.js +0 -267
- package/dist/stories/components/CollapseHeader/CollapseHeader.stories.js +0 -116
- package/dist/stories/components/CollapseHeader/CollapseHeader.style.js +0 -35
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.js +0 -61
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.stories.js +0 -161
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.style.js +0 -17
- package/dist/stories/components/Datepicker/Datepicker.js +0 -148
- package/dist/stories/components/Datepicker/Datepicker.stories.js +0 -86
- package/dist/stories/components/Datepicker/Datepicker.style.js +0 -13
- package/dist/stories/components/DownloadProgress/DownloadProgress.js +0 -97
- package/dist/stories/components/DownloadProgress/DownloadProgress.stories.js +0 -111
- package/dist/stories/components/DownloadProgress/DownloadProgress.style.js +0 -14
- package/dist/stories/components/Dropdown/Dropdown.js +0 -231
- package/dist/stories/components/Dropdown/Dropdown.stories.js +0 -323
- package/dist/stories/components/Dropdown/Dropdown.style.js +0 -11
- package/dist/stories/components/DropdownMulti/DropdownMulti.js +0 -290
- package/dist/stories/components/DropdownMulti/DropdownMulti.stories.js +0 -220
- package/dist/stories/components/DropdownMulti/DropdownMulti.style.js +0 -11
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.js +0 -279
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.style.js +0 -28
- package/dist/stories/components/DropdownNew/DropdownNew.js +0 -88
- package/dist/stories/components/DropdownNew/DropdownNew.stories.js +0 -407
- package/dist/stories/components/DropdownNew/DropdownNew.style.js +0 -11
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.js +0 -234
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.style.js +0 -26
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.js +0 -144
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.stories.js +0 -57
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.style.js +0 -18
- package/dist/stories/components/EventList/EventList.js +0 -61
- package/dist/stories/components/EventList/EventList.stories.js +0 -84
- package/dist/stories/components/EventList/EventList.style.js +0 -14
- package/dist/stories/components/EventListItem/EventListItem.js +0 -50
- package/dist/stories/components/EventListItem/EventListItem.stories.js +0 -65
- package/dist/stories/components/EventListItem/EventListItem.style.js +0 -14
- package/dist/stories/components/FilterContainer/FilterContainer.js +0 -29
- package/dist/stories/components/FilterContainer/FilterContainer.stories.js +0 -23
- package/dist/stories/components/FilterContainer/FilterContainer.style.js +0 -13
- package/dist/stories/components/FilterPanel/FilterPanel.js +0 -566
- package/dist/stories/components/FilterPanel/FilterPanel.stories.js +0 -967
- package/dist/stories/components/FilterPanel/FilterPanel.style.js +0 -21
- package/dist/stories/components/FormInput/FormInput.js +0 -41
- package/dist/stories/components/FormSelect/FormSelect.js +0 -42
- package/dist/stories/components/FormattedValue/FormattedValue.js +0 -68
- package/dist/stories/components/FormattedValue/FormattedValue.stories.js +0 -189
- package/dist/stories/components/FormattedValue/FormattedValue.style.js +0 -18
- package/dist/stories/components/IconButton/IconButton.js +0 -147
- package/dist/stories/components/IconButton/IconButton.stories.js +0 -131
- package/dist/stories/components/IconButton/IconButton.style.js +0 -15
- package/dist/stories/components/Input/Input.js +0 -183
- package/dist/stories/components/Input/Input.stories.js +0 -434
- package/dist/stories/components/Input/Input.style.js +0 -17
- package/dist/stories/components/InputOld/InputOld.js +0 -90
- package/dist/stories/components/InputOld/InputOld.stories.js +0 -100
- package/dist/stories/components/InputOld/InputOld.style.js +0 -16
- package/dist/stories/components/KpiFilter/KpiFilter.js +0 -313
- package/dist/stories/components/KpiFilter/KpiFilter.stories.js +0 -380
- package/dist/stories/components/KpiFilter/KpiFilter.style.js +0 -26
- package/dist/stories/components/LinkButton/LinkButton.js +0 -207
- package/dist/stories/components/LinkButton/LinkButton.stories.js +0 -180
- package/dist/stories/components/LinkButton/LinkButton.style.js +0 -14
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.js +0 -43
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.stories.js +0 -56
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.style.js +0 -22
- package/dist/stories/components/ListBox/ListBox.js +0 -82
- package/dist/stories/components/ListBox/ListBox.stories.js +0 -132
- package/dist/stories/components/ListBox/ListBox.style.js +0 -14
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.js +0 -109
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.stories.js +0 -184
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.style.js +0 -27
- package/dist/stories/components/Modal/Modal.js +0 -21
- package/dist/stories/components/Modal/Modal.style.js +0 -17
- package/dist/stories/components/Modal/ModalTotalBenchmark.js +0 -224
- package/dist/stories/components/Modal/ModalTotalCost.js +0 -139
- package/dist/stories/components/MonthPicker/MonthPicker.js +0 -166
- package/dist/stories/components/MonthPicker/MonthPicker.stories.js +0 -140
- package/dist/stories/components/MonthPicker/MonthPicker.style.js +0 -18
- package/dist/stories/components/MonthPicker/MonthPopupPicker.js +0 -122
- package/dist/stories/components/MultipleCard/MultipleCard.js +0 -26
- package/dist/stories/components/MultipleCard/MultipleCard.stories.js +0 -33
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.js +0 -30
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.stories.js +0 -66
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.style.js +0 -13
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.js +0 -121
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.stories.js +0 -119
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.style.js +0 -20
- package/dist/stories/components/PageFilterBar/PageFilterBar.js +0 -23
- package/dist/stories/components/PageFilterBar/PageFilterBar.stories.js +0 -28
- package/dist/stories/components/PageFilterBar/PageFilterBar.style.js +0 -12
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.js +0 -431
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.stories.js +0 -258
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.style.js +0 -25
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.js +0 -58
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.stories.js +0 -86
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.style.js +0 -16
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.js +0 -315
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.stories.js +0 -231
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.style.js +0 -23
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.js +0 -70
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.stories.js +0 -100
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.style.js +0 -20
- package/dist/stories/components/Popup/Popup.js +0 -172
- package/dist/stories/components/Popup/Popup.stories.js +0 -704
- package/dist/stories/components/Popup/Popup.style.js +0 -24
- package/dist/stories/components/PopupCharts/PopupCharts.js +0 -244
- package/dist/stories/components/PopupCharts/PopupCharts.stories.js +0 -1203
- package/dist/stories/components/PopupCharts/PopupCharts.style.js +0 -23
- package/dist/stories/components/PopupContent/PopupContent.js +0 -111
- package/dist/stories/components/PopupContent/PopupContent.style.js +0 -21
- package/dist/stories/components/PopupContent/PopupFieldsRules.js +0 -168
- package/dist/stories/components/ProductsVariety/ProductsVariety.js +0 -94
- package/dist/stories/components/ProductsVariety/ProductsVariety.stories.js +0 -91
- package/dist/stories/components/ProductsVariety/ProductsVariety.style.js +0 -20
- package/dist/stories/components/ProgressBar/ProgressBar.js +0 -52
- package/dist/stories/components/ProgressBar/ProgressBar.stories.js +0 -72
- package/dist/stories/components/ProgressBar/ProgressBar.style.js +0 -13
- package/dist/stories/components/QuarterPicker/QuarterPicker.js +0 -165
- package/dist/stories/components/QuarterPicker/QuarterPicker.stories.js +0 -140
- package/dist/stories/components/QuarterPicker/QuarterPicker.style.js +0 -18
- package/dist/stories/components/QuarterPicker/QuarterPopupPicker.js +0 -109
- package/dist/stories/components/QuickFilter/QuickFilter.js +0 -77
- package/dist/stories/components/QuickFilter/QuickFilter.stories.js +0 -281
- package/dist/stories/components/QuickFilter/QuickFilter.style.js +0 -11
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.js +0 -299
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.style.js +0 -28
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.js +0 -230
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.style.js +0 -27
- package/dist/stories/components/RangePicker/RangeDatePicker.js +0 -146
- package/dist/stories/components/RangePicker/RangePicker.js +0 -176
- package/dist/stories/components/RangePicker/RangePicker.stories.js +0 -138
- package/dist/stories/components/RangePicker/RangePicker.style.js +0 -18
- package/dist/stories/components/ReportTable/ReportTable.js +0 -262
- package/dist/stories/components/ReportTable/ReportTable.stories.js +0 -151
- package/dist/stories/components/ReportTable/ReportTable.style.js +0 -22
- package/dist/stories/components/SagButton/SagButton.js +0 -68
- package/dist/stories/components/SagButton/SagButton.stories.js +0 -118
- package/dist/stories/components/SagButton/SagButton.style.js +0 -13
- package/dist/stories/components/SagIconButton/SagIconButton.js +0 -130
- package/dist/stories/components/SagIconButton/SagIconButton.stories.js +0 -123
- package/dist/stories/components/SagIconButton/SagIconButton.style.js +0 -12
- package/dist/stories/components/SagInput/SagInput.js +0 -53
- package/dist/stories/components/SagInput/SagInput.stories.js +0 -69
- package/dist/stories/components/SalesAndROI/SalesAndROI.js +0 -89
- package/dist/stories/components/SalesAndROI/SalesAndROI.stories.js +0 -168
- package/dist/stories/components/SalesAndROI/SalesAndROI.style.js +0 -19
- package/dist/stories/components/SearchInput/SearchInput.js +0 -39
- package/dist/stories/components/SearchInput/SearchInput.stories.js +0 -44
- package/dist/stories/components/SearchInput/SearchInput.style.js +0 -12
- package/dist/stories/components/SegmentedButton/SegmentedButton.js +0 -122
- package/dist/stories/components/SegmentedButton/SegmentedButton.stories.js +0 -183
- package/dist/stories/components/SegmentedButton/SegmentedButton.style.js +0 -19
- package/dist/stories/components/Select/Select.js +0 -135
- package/dist/stories/components/Select/Select.stories.js +0 -200
- package/dist/stories/components/Select/Select.style.js +0 -19
- package/dist/stories/components/TabMenu/TabMenu.js +0 -202
- package/dist/stories/components/TabMenu/TabMenu.stories.js +0 -76
- package/dist/stories/components/TabMenu/TabMenu.style.js +0 -24
- package/dist/stories/components/Table/Table.js +0 -195
- package/dist/stories/components/Table/Table.stories.js +0 -104
- package/dist/stories/components/Table/Table.style.js +0 -17
- package/dist/stories/components/TextField/TextField.js +0 -209
- package/dist/stories/components/TextField/TextField.stories.js +0 -162
- package/dist/stories/components/TextField/TextField.style.js +0 -11
- package/dist/stories/components/TitleDescription/TitleDescription.js +0 -272
- package/dist/stories/components/TitleDescription/TitleDescription.stories.js +0 -117
- package/dist/stories/components/TitleDescription/TitleDescription.style.js +0 -36
- package/dist/stories/components/Tooltip/Tooltip.js +0 -31
- package/dist/stories/components/Tooltip/Tooltip.style.js +0 -18
- package/dist/stories/components/TopToggleList/TopToggleList.js +0 -46
- package/dist/stories/components/TopToggleList/TopToggleList.stories.js +0 -52
- package/dist/stories/components/TopToggleList/TopToggleList.style.js +0 -16
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.js +0 -97
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.stories.js +0 -138
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.style.js +0 -21
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.js +0 -342
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.stories.js +0 -343
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.style.js +0 -30
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.js +0 -149
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.stories.js +0 -172
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.style.js +0 -24
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.js +0 -165
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.stories.js +0 -185
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.style.js +0 -20
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.js +0 -182
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.stories.js +0 -290
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.style.js +0 -30
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.js +0 -207
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.stories.js +0 -158
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.style.js +0 -20
- package/dist/stories/components/TspanTooltip/TspanTooltip.js +0 -16
- package/dist/stories/components/TspanTooltip/TspanTooltip.style.js +0 -13
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.js +0 -202
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.stories.js +0 -120
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.style.js +0 -18
- package/dist/stories/icons/ArrowDownIcon.js +0 -27
- package/dist/stories/icons/ArrowDropDownIcon.js +0 -27
- package/dist/stories/icons/ArrowSelectIcon.js +0 -27
- package/dist/stories/icons/ArrowUpIcon.js +0 -27
- package/dist/stories/icons/AttachedIcon.js +0 -27
- package/dist/stories/icons/BellIcon.js +0 -27
- package/dist/stories/icons/Calendar.js +0 -20
- package/dist/stories/icons/CalendarIcon.js +0 -27
- package/dist/stories/icons/CalendarInOpen.js +0 -26
- package/dist/stories/icons/CheckBoxButtonCheckedIcon.js +0 -28
- package/dist/stories/icons/CheckBoxCheckedIcon.js +0 -28
- package/dist/stories/icons/CheckBoxNotCheckedIcon.js +0 -28
- package/dist/stories/icons/ChervronLeftIcon.js +0 -20
- package/dist/stories/icons/ChervronRightIcon.js +0 -20
- package/dist/stories/icons/ClockIcon.js +0 -27
- package/dist/stories/icons/CloseIcon.js +0 -27
- package/dist/stories/icons/CloseXIcon.js +0 -27
- package/dist/stories/icons/ComboBoxArrowDownIcon.js +0 -28
- package/dist/stories/icons/ComboBoxArrowUpIcon.js +0 -28
- package/dist/stories/icons/DocumentIcon.js +0 -48
- package/dist/stories/icons/DownloadIcon.js +0 -27
- package/dist/stories/icons/Duplicate.js +0 -28
- package/dist/stories/icons/ErrorIcon.js +0 -27
- package/dist/stories/icons/ExitIcon.js +0 -28
- package/dist/stories/icons/ExportIcon.js +0 -28
- package/dist/stories/icons/EyeIcon.js +0 -28
- package/dist/stories/icons/FileIcon.js +0 -27
- package/dist/stories/icons/FilterIcon.js +0 -36
- package/dist/stories/icons/FlyIcon.js +0 -28
- package/dist/stories/icons/FoodLionIcon.js +0 -3076
- package/dist/stories/icons/FoodLionNewIcon.js +0 -39
- package/dist/stories/icons/GiantFoodIcon.js +0 -1976
- package/dist/stories/icons/GiantFoodIcon_new.js +0 -42
- package/dist/stories/icons/HannafordIcon.js +0 -5017
- package/dist/stories/icons/HannafordIcon_new.js +0 -41
- package/dist/stories/icons/HannafordNewIcon.js +0 -213
- package/dist/stories/icons/InfoIcon.js +0 -28
- package/dist/stories/icons/LampIcon.js +0 -27
- package/dist/stories/icons/LegendLineIcon.js +0 -29
- package/dist/stories/icons/LegendUnionIcon.js +0 -29
- package/dist/stories/icons/MaintenanceIcon.js +0 -28
- package/dist/stories/icons/MenuItemClosedIcon.js +0 -28
- package/dist/stories/icons/MenuItemOpenIcon.js +0 -28
- package/dist/stories/icons/MenuItemRightIcon.js +0 -28
- package/dist/stories/icons/MenuItemUpIcon.js +0 -28
- package/dist/stories/icons/NoDataFoundIcon.js +0 -86
- package/dist/stories/icons/OptionsIcon.js +0 -27
- package/dist/stories/icons/SearchIcon.js +0 -27
- package/dist/stories/icons/ShoppingCartIcon.js +0 -45
- package/dist/stories/icons/ShoutIcon.js +0 -27
- package/dist/stories/icons/SpotlightProductIcon.js +0 -28
- package/dist/stories/icons/StopAndShopIcon.js +0 -134
- package/dist/stories/icons/StopAndShopNewIcon.js +0 -41
- package/dist/stories/icons/SucceededIcon.js +0 -27
- package/dist/stories/icons/TheGiantCompanyIcon.js +0 -40
- package/dist/stories/icons/TheGiantCompanyNewIcon.js +0 -39
- package/dist/stories/utils/CommonFunctions.js +0 -78
|
@@ -1,97 +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.TotalBenchmark = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _NoDataFoundMessage = require("../NoDataFoundMessage/NoDataFoundMessage");
|
|
10
|
-
var _CommonFunctions = require("../../utils/CommonFunctions");
|
|
11
|
-
var _Benchmark = require("../Benchmark/Benchmark");
|
|
12
|
-
var _TotalBenchmark = require("./TotalBenchmark.style");
|
|
13
|
-
/* TotalBenchmark */
|
|
14
|
-
const TotalBenchmark = props => {
|
|
15
|
-
const {
|
|
16
|
-
data,
|
|
17
|
-
dotCut,
|
|
18
|
-
addingBenchmark,
|
|
19
|
-
width,
|
|
20
|
-
height,
|
|
21
|
-
textcolor,
|
|
22
|
-
noDataText
|
|
23
|
-
} = props;
|
|
24
|
-
const DEFAULT_ROOT_FONT = 16;
|
|
25
|
-
const DEFAULT_COMPONENT_WIDTH = 250;
|
|
26
|
-
const [rootFont, setRootFont] = (0, _react.useState)(DEFAULT_ROOT_FONT.toString().concat('', 'px'));
|
|
27
|
-
const controlsContainerRef = (0, _react.useRef)();
|
|
28
|
-
(0, _react.useEffect)(() => {
|
|
29
|
-
const {
|
|
30
|
-
offsetWidth
|
|
31
|
-
} = controlsContainerRef.current;
|
|
32
|
-
setRootFont(getRootFont(offsetWidth));
|
|
33
|
-
}, [width]);
|
|
34
|
-
const getRootFont = width => {
|
|
35
|
-
const relation = width.toString().replace('px', '').replace('%', '') / DEFAULT_COMPONENT_WIDTH;
|
|
36
|
-
const fontRoot = (DEFAULT_ROOT_FONT * relation).toString().concat('', 'px');
|
|
37
|
-
return fontRoot;
|
|
38
|
-
};
|
|
39
|
-
const getSizeFactor = () => rootFont.toString().replace('px', '') / DEFAULT_ROOT_FONT;
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement(_TotalBenchmark.ControlsContainer, {
|
|
41
|
-
id: "ControlsContainer",
|
|
42
|
-
height: height,
|
|
43
|
-
width: width,
|
|
44
|
-
textcolor: textcolor,
|
|
45
|
-
ref: controlsContainerRef
|
|
46
|
-
}, (data === null || data === void 0 ? void 0 : data.length) > 0 ? data.map((item, index) => /*#__PURE__*/_react.default.createElement(_TotalBenchmark.Controls, {
|
|
47
|
-
id: "Controls",
|
|
48
|
-
index: index,
|
|
49
|
-
width: width,
|
|
50
|
-
key: item.title
|
|
51
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmark.TitleAndValueContainer, {
|
|
52
|
-
id: "TitleAndValueContainer"
|
|
53
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmark.Title, {
|
|
54
|
-
id: "Title",
|
|
55
|
-
width: width
|
|
56
|
-
}, item.title), /*#__PURE__*/_react.default.createElement(_TotalBenchmark.BenchmarkContainerParent, {
|
|
57
|
-
id: "BenchmarkContainerParent"
|
|
58
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmark.FormattedValue, {
|
|
59
|
-
id: "FormattedValue",
|
|
60
|
-
width: width
|
|
61
|
-
}, item.value != undefined && item.value != null ? dotCut ? (0, _CommonFunctions.getFormattedValue)(item.value) : (0, _CommonFunctions.getNumberWithCommas)(item.value) : '', item.value !== undefined && item.value != null && dotCut ? (0, _CommonFunctions.getFormattedUnits)(item.value) : '', item.value === undefined || item.value === null ? /*#__PURE__*/_react.default.createElement(_TotalBenchmark.FormattedValueNoData, null, "No Data") : ''), addingBenchmark && /*#__PURE__*/_react.default.createElement(_TotalBenchmark.BenchmarkContainer, {
|
|
62
|
-
id: "BenchmarkContainer",
|
|
63
|
-
width: width
|
|
64
|
-
}, item.totalValue ? /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, {
|
|
65
|
-
id: "Benchmark",
|
|
66
|
-
totalValue: item.totalValue,
|
|
67
|
-
currentValue: item.value ? item.value : 0,
|
|
68
|
-
benchmarkValue: item.benchmarkValue ? item.benchmarkValue : 0,
|
|
69
|
-
height: 12 * getSizeFactor(),
|
|
70
|
-
width: 85 * getSizeFactor(),
|
|
71
|
-
color: "#79DB95",
|
|
72
|
-
linearGradientColor: "#C3EFD0",
|
|
73
|
-
linearGradientUnderAvarageColor: "#FDB1B1",
|
|
74
|
-
underAvarageColor: "#FD5959",
|
|
75
|
-
backgroundColor: "#F2F2F2"
|
|
76
|
-
}) : ''))))) : /*#__PURE__*/_react.default.createElement(_TotalBenchmark.NoDataFoundContainer, {
|
|
77
|
-
id: "NoDataFoundContainer"
|
|
78
|
-
}, /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
79
|
-
noDataText: noDataText
|
|
80
|
-
})));
|
|
81
|
-
};
|
|
82
|
-
exports.TotalBenchmark = TotalBenchmark;
|
|
83
|
-
var _default = exports.default = TotalBenchmark;
|
|
84
|
-
TotalBenchmark.defaultProps = {
|
|
85
|
-
data: {
|
|
86
|
-
title: 'Redemptions',
|
|
87
|
-
value: 60000,
|
|
88
|
-
totalValue: 20000,
|
|
89
|
-
benchmarkValue: 1000
|
|
90
|
-
},
|
|
91
|
-
dotCut: true,
|
|
92
|
-
width: '260px',
|
|
93
|
-
height: '350px',
|
|
94
|
-
addingBenchmark: true,
|
|
95
|
-
textcolor: '#212121',
|
|
96
|
-
noDataText: ''
|
|
97
|
-
};
|
|
@@ -1,138 +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.TwoBenchmarks = exports.OneBenchmark = exports.DataWithNulls = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _TotalBenchmark = require("./TotalBenchmark");
|
|
10
|
-
const arrDataOneBenchmark = [{
|
|
11
|
-
title: 'Redemptions',
|
|
12
|
-
value: 21500,
|
|
13
|
-
totalValue: 60000,
|
|
14
|
-
benchmarkValue: 30000
|
|
15
|
-
}, {
|
|
16
|
-
title: 'Redemptions Units',
|
|
17
|
-
value: 12400
|
|
18
|
-
}];
|
|
19
|
-
const arrDataTwoBenchmarks = [{
|
|
20
|
-
title: 'Redemptions',
|
|
21
|
-
value: 41500,
|
|
22
|
-
totalValue: 60000,
|
|
23
|
-
benchmarkValue: 20000
|
|
24
|
-
}, {
|
|
25
|
-
title: 'Redemptions Units',
|
|
26
|
-
value: 15400,
|
|
27
|
-
totalValue: 60000,
|
|
28
|
-
benchmarkValue: 40000
|
|
29
|
-
}];
|
|
30
|
-
const arrDataWithNulls = [{
|
|
31
|
-
title: 'Redemptions',
|
|
32
|
-
value: null,
|
|
33
|
-
totalValue: 60000,
|
|
34
|
-
benchmarkValue: 20000
|
|
35
|
-
}, {
|
|
36
|
-
title: 'Redemptions Units',
|
|
37
|
-
value: 15400,
|
|
38
|
-
totalValue: 60000,
|
|
39
|
-
benchmarkValue: 40000
|
|
40
|
-
}];
|
|
41
|
-
var _default = exports.default = {
|
|
42
|
-
title: 'SAG BI/TotalBenchmark',
|
|
43
|
-
component: _TotalBenchmark.TotalBenchmark,
|
|
44
|
-
tags: ['autodocs'],
|
|
45
|
-
argTypes: {
|
|
46
|
-
topTitle: {
|
|
47
|
-
name: 'Top Title',
|
|
48
|
-
control: {
|
|
49
|
-
type: 'text'
|
|
50
|
-
},
|
|
51
|
-
description: ''
|
|
52
|
-
},
|
|
53
|
-
bottomTitle: {
|
|
54
|
-
name: 'Bottom Title',
|
|
55
|
-
control: {
|
|
56
|
-
type: 'text'
|
|
57
|
-
},
|
|
58
|
-
description: ''
|
|
59
|
-
},
|
|
60
|
-
dotCut: {
|
|
61
|
-
name: 'dotCut',
|
|
62
|
-
control: {
|
|
63
|
-
type: 'boolean'
|
|
64
|
-
},
|
|
65
|
-
description: 'true/false - format total value with dot cut'
|
|
66
|
-
},
|
|
67
|
-
width: {
|
|
68
|
-
name: 'width',
|
|
69
|
-
control: {
|
|
70
|
-
type: 'text'
|
|
71
|
-
},
|
|
72
|
-
description: 'width of the control (in px or %)'
|
|
73
|
-
},
|
|
74
|
-
height: {
|
|
75
|
-
name: 'height',
|
|
76
|
-
control: {
|
|
77
|
-
type: 'text'
|
|
78
|
-
},
|
|
79
|
-
description: 'height of the control (in px or %)'
|
|
80
|
-
},
|
|
81
|
-
addingBenchmark: {
|
|
82
|
-
name: 'Add Benchmark',
|
|
83
|
-
control: {
|
|
84
|
-
type: 'boolean'
|
|
85
|
-
},
|
|
86
|
-
description: 'true/false - Adding Benchmark'
|
|
87
|
-
},
|
|
88
|
-
textColor: {
|
|
89
|
-
name: 'textColor',
|
|
90
|
-
description: 'Sets the text color',
|
|
91
|
-
control: {
|
|
92
|
-
type: 'color',
|
|
93
|
-
presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
data: {
|
|
97
|
-
description: 'array [] of objects: {title: string, value:number, totalValue: number | udefined} to fill the benchmark. To hide the benchmark: do not set totalValue '
|
|
98
|
-
},
|
|
99
|
-
noDataText: {
|
|
100
|
-
name: 'noDataText',
|
|
101
|
-
control: {
|
|
102
|
-
type: 'text'
|
|
103
|
-
},
|
|
104
|
-
description: 'text to display when no data found'
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
const Template = args => /*#__PURE__*/_react.default.createElement(_TotalBenchmark.TotalBenchmark, args);
|
|
109
|
-
const OneBenchmark = exports.OneBenchmark = {
|
|
110
|
-
args: {
|
|
111
|
-
data: arrDataOneBenchmark,
|
|
112
|
-
dotCut: true,
|
|
113
|
-
width: '250px',
|
|
114
|
-
height: '280px',
|
|
115
|
-
textColor: '#212121',
|
|
116
|
-
noDataText: 'The selected event is a TPR or has no offer, therefore there are no redemptions or redemption units to display.'
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
const TwoBenchmarks = exports.TwoBenchmarks = {
|
|
120
|
-
args: {
|
|
121
|
-
data: arrDataTwoBenchmarks,
|
|
122
|
-
dotCut: true,
|
|
123
|
-
width: '250px',
|
|
124
|
-
height: '280px',
|
|
125
|
-
textColor: '#212121',
|
|
126
|
-
noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.'
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
const DataWithNulls = exports.DataWithNulls = {
|
|
130
|
-
args: {
|
|
131
|
-
data: arrDataWithNulls,
|
|
132
|
-
dotCut: true,
|
|
133
|
-
width: '250px',
|
|
134
|
-
height: '280px',
|
|
135
|
-
textColor: '#212121',
|
|
136
|
-
noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.'
|
|
137
|
-
}
|
|
138
|
-
};
|
|
@@ -1,21 +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.TitleAndValueContainer = exports.Title = exports.NoDataFoundContainer = exports.FormattedValueNoData = exports.FormattedValue = exports.ControlsContainer = exports.Controls = exports.BenchmarkContainerParent = exports.BenchmarkContainer = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
11
|
-
const MIN_HEIGHT = 300;
|
|
12
|
-
const MIN_WIDTH = 260;
|
|
13
|
-
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n position: relative;\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 12px;\n align-content: center;\n flex-direction: column;\n place-content: space-between;\n justify-content: space-between;\n align-items: flex-start;\n background: #ffffff;\n"])), props => props.textcolor, props => props.width, props => props.height);
|
|
14
|
-
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 12px;\n background: #ffffff;\n margin-bottom: 2rem;\n padding: 0px 0.8rem;\n"])));
|
|
15
|
-
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
|
|
16
|
-
const Title = exports.Title = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n"])));
|
|
17
|
-
const FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n /* width: 100%; */\n font-weight: 500;\n font-size: 40px;\n @media (max-width: 1366px) {\n font-size: 20px;\n }\n @media (max-width: 1536px) {\n font-size: 24px;\n }\n"])));
|
|
18
|
-
const FormattedValueNoData = exports.FormattedValueNoData = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n font-weight: 700;\n font-size: 16px;\n"])));
|
|
19
|
-
const BenchmarkContainerParent = exports.BenchmarkContainerParent = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: baseline;\n width: 100%;\n height: 100%;\n margin: 0;\n"])));
|
|
20
|
-
const BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n margin-top: 0;\n margin-left: 1rem;\n height: 0.9rem;\n"])));
|
|
21
|
-
const NoDataFoundContainer = exports.NoDataFoundContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n"])));
|
|
@@ -1,342 +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.TotalBenchmarkAreachart = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _recharts = require("recharts");
|
|
10
|
-
var _ArrowUpIcon = require("../../icons/ArrowUpIcon");
|
|
11
|
-
var _ArrowDownIcon = require("../../icons/ArrowDownIcon");
|
|
12
|
-
var _NoDataFoundMessage = require("../NoDataFoundMessage/NoDataFoundMessage");
|
|
13
|
-
var _CommonFunctions = require("../../utils/CommonFunctions");
|
|
14
|
-
var _Benchmark = require("../Benchmark/Benchmark");
|
|
15
|
-
var _TotalBenchmarkAreachart = require("./TotalBenchmarkAreachart.style");
|
|
16
|
-
/* TotalBenchmarkAreachart */
|
|
17
|
-
const TotalBenchmarkAreachart = props => {
|
|
18
|
-
const {
|
|
19
|
-
title,
|
|
20
|
-
value,
|
|
21
|
-
arrowSign,
|
|
22
|
-
addingBenchmark,
|
|
23
|
-
benchmarkTotalValue,
|
|
24
|
-
benchmarkValue,
|
|
25
|
-
areaChartData,
|
|
26
|
-
width,
|
|
27
|
-
height,
|
|
28
|
-
textcolor,
|
|
29
|
-
areaChart1Color,
|
|
30
|
-
areaChart2Color,
|
|
31
|
-
xselectedColor,
|
|
32
|
-
fillChart1Color,
|
|
33
|
-
fillChart2Color,
|
|
34
|
-
startOffset,
|
|
35
|
-
endOffset,
|
|
36
|
-
opacity,
|
|
37
|
-
value1Title,
|
|
38
|
-
value2Title,
|
|
39
|
-
noDataText,
|
|
40
|
-
startWeekRange = 0,
|
|
41
|
-
endWeekRange = 0
|
|
42
|
-
} = props;
|
|
43
|
-
const DEFAULT_ROOT_FONT = 16;
|
|
44
|
-
const DEFAULT_COMPONENT_WIDTH = 250;
|
|
45
|
-
const DEFAULT_COMPONENT_HEIGHT = 280;
|
|
46
|
-
const [rootFont, setRootFont] = (0, _react.useState)(DEFAULT_ROOT_FONT.toString().concat('', 'px'));
|
|
47
|
-
const anotherRef = (0, _react.useRef)(null);
|
|
48
|
-
const [activeLabel, setActiveLabel] = (0, _react.useState)('');
|
|
49
|
-
const controlsContainerRef = (0, _react.useRef)();
|
|
50
|
-
(0, _react.useEffect)(() => {
|
|
51
|
-
const {
|
|
52
|
-
offsetWidth
|
|
53
|
-
} = controlsContainerRef.current;
|
|
54
|
-
setRootFont(getRootFont(offsetWidth));
|
|
55
|
-
}, [width]);
|
|
56
|
-
const getRootFont = width => {
|
|
57
|
-
const relation = width.toString().replace('px', '').replace('%', '') / DEFAULT_COMPONENT_WIDTH;
|
|
58
|
-
const fontRoot = (DEFAULT_ROOT_FONT * relation).toString().concat('', 'px');
|
|
59
|
-
return fontRoot;
|
|
60
|
-
};
|
|
61
|
-
const getSizeFactor = () => rootFont.toString().replace('px', '') / DEFAULT_ROOT_FONT;
|
|
62
|
-
const getArrowSign = arrowSign => {
|
|
63
|
-
if (!arrowSign) {
|
|
64
|
-
return '';
|
|
65
|
-
}
|
|
66
|
-
if (arrowSign === 'up') {
|
|
67
|
-
return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.DetailsRowArrowContainer, {
|
|
68
|
-
id: "DetailsRowArrowContainer",
|
|
69
|
-
value: value
|
|
70
|
-
}, /*#__PURE__*/_react.default.createElement(_ArrowUpIcon.ArrowUpIcon, {
|
|
71
|
-
width: 25 * getSizeFactor(),
|
|
72
|
-
height: 25 * getSizeFactor()
|
|
73
|
-
}));
|
|
74
|
-
}
|
|
75
|
-
return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.DetailsRowArrowContainer, {
|
|
76
|
-
id: "DetailsRowArrowContainer",
|
|
77
|
-
value: value
|
|
78
|
-
}, /*#__PURE__*/_react.default.createElement(_ArrowDownIcon.ArrowDownIcon, {
|
|
79
|
-
width: 25 * getSizeFactor(),
|
|
80
|
-
height: 25 * getSizeFactor()
|
|
81
|
-
}));
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
// ----------------------------- Custom tick function - not used -----------------------
|
|
85
|
-
const CustomTick = item => {
|
|
86
|
-
const {
|
|
87
|
-
x,
|
|
88
|
-
y,
|
|
89
|
-
stroke,
|
|
90
|
-
payload
|
|
91
|
-
} = item;
|
|
92
|
-
return /*#__PURE__*/_react.default.createElement("g", {
|
|
93
|
-
transform: "translate(".concat(x, ",").concat(y, ")")
|
|
94
|
-
}, activeLabel === payload.value && /*#__PURE__*/_react.default.createElement("rect", {
|
|
95
|
-
x: -15,
|
|
96
|
-
y: 0,
|
|
97
|
-
width: "40",
|
|
98
|
-
height: "18",
|
|
99
|
-
rx: 9,
|
|
100
|
-
fill: xselectedColor,
|
|
101
|
-
fillOpacity: "0.30"
|
|
102
|
-
}), /*#__PURE__*/_react.default.createElement("text", {
|
|
103
|
-
x: 0,
|
|
104
|
-
y: 14,
|
|
105
|
-
dx: -10,
|
|
106
|
-
fill: "black",
|
|
107
|
-
fontSize: "14px"
|
|
108
|
-
}, payload.value));
|
|
109
|
-
};
|
|
110
|
-
const CustomTooltip = _ref => {
|
|
111
|
-
let {
|
|
112
|
-
active,
|
|
113
|
-
payload,
|
|
114
|
-
label
|
|
115
|
-
} = _ref;
|
|
116
|
-
if (active && payload && payload.length) {
|
|
117
|
-
setActiveLabel(label);
|
|
118
|
-
return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.TooltipDiv, null, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.TooltipTitle, null, "".concat(label)), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.TooltipLabel, null, "".concat(value1Title, " ").concat((0, _CommonFunctions.getFormattedValue)(payload[0].value)).concat((0, _CommonFunctions.getFormattedUnits)(payload[0].value))), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.TooltipLabel, null, "".concat(value2Title, " ").concat((0, _CommonFunctions.getFormattedValue)(payload[1].value)).concat((0, _CommonFunctions.getFormattedUnits)(payload[1].value))));
|
|
119
|
-
}
|
|
120
|
-
return null;
|
|
121
|
-
};
|
|
122
|
-
const displayEventWeeksElements = () => {
|
|
123
|
-
var _getAreaChartFormatte;
|
|
124
|
-
if (!areaChartData || areaChartData.length === 0) return '';
|
|
125
|
-
return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.EventWeeksLegendDataElementsContainer, {
|
|
126
|
-
id: "EventWeeksLegendDataElementsContainer"
|
|
127
|
-
}, (_getAreaChartFormatte = getAreaChartFormattedData()) === null || _getAreaChartFormatte === void 0 ? void 0 : _getAreaChartFormatte.map(item => /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.EventWeeksLegendDataElement, {
|
|
128
|
-
id: "EventWeeksLegendDataElement",
|
|
129
|
-
color: item.title >= startWeekRange && item.title <= endWeekRange ? xselectedColor : '',
|
|
130
|
-
borderLeftRadius: item.title === startWeekRange ? '12px' : '0px',
|
|
131
|
-
borderRightRadius: item.title === endWeekRange ? '12px' : '0px'
|
|
132
|
-
}, item.titleWeek)));
|
|
133
|
-
};
|
|
134
|
-
const displayEventWeeksLegendData = () => /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.EventWeeksLegendMainContainer, {
|
|
135
|
-
id: "EventWeeksLegendMainContainer"
|
|
136
|
-
}, displayEventWeeksElements(), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.EventWeeksLegendContainer, {
|
|
137
|
-
id: "EventWeeksLegendContainer"
|
|
138
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.EventWeeksLegendColorRectangle, {
|
|
139
|
-
id: "EventWeeksLegendColorRectangle",
|
|
140
|
-
color: xselectedColor
|
|
141
|
-
}), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.EventWeeksLegendTitle, {
|
|
142
|
-
id: "EventWeeksLegendTitle",
|
|
143
|
-
width: width
|
|
144
|
-
}, "Event weeks")));
|
|
145
|
-
const getAreaChartFormattedData = () => {
|
|
146
|
-
if (!areaChartData || (areaChartData === null || areaChartData === void 0 ? void 0 : areaChartData.length) === 0) return null;
|
|
147
|
-
const newFormattedData = areaChartData === null || areaChartData === void 0 ? void 0 : areaChartData.map(item => {
|
|
148
|
-
var _item$title;
|
|
149
|
-
return {
|
|
150
|
-
...item,
|
|
151
|
-
titleWeek: item.title && ((_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toString().length) === 6 ? item.title.toString().substring(4, 6) : 0
|
|
152
|
-
};
|
|
153
|
-
});
|
|
154
|
-
return newFormattedData;
|
|
155
|
-
};
|
|
156
|
-
return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.ControlsContainer, {
|
|
157
|
-
id: "ControlsContainer",
|
|
158
|
-
height: height,
|
|
159
|
-
width: width,
|
|
160
|
-
textcolor: textcolor,
|
|
161
|
-
ref: controlsContainerRef
|
|
162
|
-
}, areaChartData && (areaChartData === null || areaChartData === void 0 ? void 0 : areaChartData.length) > 0 ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.Controls, {
|
|
163
|
-
id: "Controls"
|
|
164
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.TitleAndValueContainer, {
|
|
165
|
-
id: "TitleAndValueContainer"
|
|
166
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.Title, {
|
|
167
|
-
id: "Title"
|
|
168
|
-
}, title), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.ValueAndBenchmarkContainer, {
|
|
169
|
-
id: "ValueAndBenchmarkContainer"
|
|
170
|
-
}, value !== undefined && value != null ? getArrowSign(arrowSign) : '', /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.FormattedValue, {
|
|
171
|
-
id: "FormattedValue"
|
|
172
|
-
}, value !== undefined && value != null ? /*#__PURE__*/_react.default.createElement("span", null, "".concat(value, " "), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.CurrencySign, null, "%")) : ''), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.FormattedValueNoDataMessage, null, value === undefined || value === null ? 'No Data' : ''), addingBenchmark && benchmarkTotalValue ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.BenchmarkContainer, {
|
|
173
|
-
id: "BenchmarkContainer"
|
|
174
|
-
}, /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, {
|
|
175
|
-
id: "Benchmark",
|
|
176
|
-
totalValue: benchmarkTotalValue !== null && benchmarkTotalValue !== void 0 ? benchmarkTotalValue : 0,
|
|
177
|
-
currentValue: value !== null && value !== void 0 ? value : 0,
|
|
178
|
-
benchmarkValue: benchmarkValue !== null && benchmarkValue !== void 0 ? benchmarkValue : 0,
|
|
179
|
-
height: 12,
|
|
180
|
-
width: 90,
|
|
181
|
-
color: "#79DB95",
|
|
182
|
-
linearGradientColor: "#C3EFD0",
|
|
183
|
-
linearGradientUnderAvarageColor: "#FDB1B1",
|
|
184
|
-
underAvarageColor: "#FD5959",
|
|
185
|
-
backgroundColor: "#F2F2F2"
|
|
186
|
-
})) : '')), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.AreaChartContainer, {
|
|
187
|
-
ref: anotherRef,
|
|
188
|
-
id: "AreaChartContainer"
|
|
189
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, {
|
|
190
|
-
id: "ResponsiveContainer",
|
|
191
|
-
width: "100%",
|
|
192
|
-
height: "100%"
|
|
193
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.AreaChart, {
|
|
194
|
-
id: "SourceAreaChart",
|
|
195
|
-
data: getAreaChartFormattedData(),
|
|
196
|
-
margin: {
|
|
197
|
-
top: 0,
|
|
198
|
-
right: 24,
|
|
199
|
-
bottom: -30,
|
|
200
|
-
left: 24
|
|
201
|
-
}
|
|
202
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.CartesianGrid, {
|
|
203
|
-
strokeDasharray: "3 3",
|
|
204
|
-
vertical: false
|
|
205
|
-
}), /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
|
|
206
|
-
id: "colorValue1",
|
|
207
|
-
x1: "0",
|
|
208
|
-
y1: "0",
|
|
209
|
-
x2: "0",
|
|
210
|
-
y2: "1"
|
|
211
|
-
}, /*#__PURE__*/_react.default.createElement("stop", {
|
|
212
|
-
offset: startOffset,
|
|
213
|
-
stopColor: fillChart1Color,
|
|
214
|
-
stopOpacity: opacity
|
|
215
|
-
}), /*#__PURE__*/_react.default.createElement("stop", {
|
|
216
|
-
offset: endOffset,
|
|
217
|
-
stopColor: fillChart1Color,
|
|
218
|
-
stopOpacity: opacity
|
|
219
|
-
})), /*#__PURE__*/_react.default.createElement("linearGradient", {
|
|
220
|
-
id: "colorValue2",
|
|
221
|
-
x1: "0",
|
|
222
|
-
y1: "0",
|
|
223
|
-
x2: "0",
|
|
224
|
-
y2: "1"
|
|
225
|
-
}, /*#__PURE__*/_react.default.createElement("stop", {
|
|
226
|
-
offset: startOffset,
|
|
227
|
-
stopColor: fillChart2Color,
|
|
228
|
-
stopOpacity: opacity
|
|
229
|
-
}), /*#__PURE__*/_react.default.createElement("stop", {
|
|
230
|
-
offset: endOffset,
|
|
231
|
-
stopColor: fillChart2Color,
|
|
232
|
-
stopOpacity: opacity
|
|
233
|
-
}))), /*#__PURE__*/_react.default.createElement(_recharts.XAxis, {
|
|
234
|
-
dataKey: "titleWeek",
|
|
235
|
-
tick: false
|
|
236
|
-
// tick={(item) => <CustomTick {...item} />}
|
|
237
|
-
,
|
|
238
|
-
tickLine: false,
|
|
239
|
-
style: {
|
|
240
|
-
fontWeight: '700',
|
|
241
|
-
stroke: '#D0D0D0',
|
|
242
|
-
strokeWidth: '1px'
|
|
243
|
-
}
|
|
244
|
-
}), /*#__PURE__*/_react.default.createElement(_recharts.CartesianGrid, {
|
|
245
|
-
strokeDasharray: "3 3"
|
|
246
|
-
}), /*#__PURE__*/_react.default.createElement(_recharts.Area, {
|
|
247
|
-
type: "monotone",
|
|
248
|
-
dataKey: "value1",
|
|
249
|
-
stroke: areaChart1Color,
|
|
250
|
-
fillOpacity: 1,
|
|
251
|
-
fill: "url(#colorValue1)"
|
|
252
|
-
}), /*#__PURE__*/_react.default.createElement(_recharts.Area, {
|
|
253
|
-
type: "monotone",
|
|
254
|
-
dataKey: "value2",
|
|
255
|
-
stroke: areaChart2Color,
|
|
256
|
-
fillOpacity: 1,
|
|
257
|
-
fill: "url(#colorValue2)"
|
|
258
|
-
}), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, {
|
|
259
|
-
content: /*#__PURE__*/_react.default.createElement(CustomTooltip, null)
|
|
260
|
-
}), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, null)))), displayEventWeeksLegendData()) : /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
261
|
-
noDataText: noDataText
|
|
262
|
-
}));
|
|
263
|
-
};
|
|
264
|
-
exports.TotalBenchmarkAreachart = TotalBenchmarkAreachart;
|
|
265
|
-
var _default = exports.default = TotalBenchmarkAreachart;
|
|
266
|
-
TotalBenchmarkAreachart.defaultProps = {
|
|
267
|
-
title: 'String',
|
|
268
|
-
value: 300,
|
|
269
|
-
arrowSign: '$',
|
|
270
|
-
addingBenchmark: true,
|
|
271
|
-
benchmarkTotalValue: '',
|
|
272
|
-
benchmarkValue: null,
|
|
273
|
-
areaChartData: [{
|
|
274
|
-
title: '202320',
|
|
275
|
-
value1: 542366,
|
|
276
|
-
value2: 247715
|
|
277
|
-
}, {
|
|
278
|
-
title: '202321',
|
|
279
|
-
value1: 699511,
|
|
280
|
-
value2: 252313
|
|
281
|
-
}, {
|
|
282
|
-
title: '202322',
|
|
283
|
-
value1: 403092,
|
|
284
|
-
value2: 260822
|
|
285
|
-
}, {
|
|
286
|
-
title: '202323',
|
|
287
|
-
value1: 396184,
|
|
288
|
-
value2: 264325
|
|
289
|
-
}, {
|
|
290
|
-
title: '202324',
|
|
291
|
-
value1: 415317,
|
|
292
|
-
value2: 269243
|
|
293
|
-
}, {
|
|
294
|
-
title: '202325',
|
|
295
|
-
value1: 568376,
|
|
296
|
-
value2: 269592
|
|
297
|
-
}, {
|
|
298
|
-
title: '202326',
|
|
299
|
-
value1: 1078121,
|
|
300
|
-
value2: 269949
|
|
301
|
-
}, {
|
|
302
|
-
title: '202327',
|
|
303
|
-
value1: 347930,
|
|
304
|
-
value2: 270735
|
|
305
|
-
}, {
|
|
306
|
-
title: '202328',
|
|
307
|
-
value1: 346258,
|
|
308
|
-
value2: 271200
|
|
309
|
-
}, {
|
|
310
|
-
title: '202329',
|
|
311
|
-
value1: 350184,
|
|
312
|
-
value2: 270324
|
|
313
|
-
}, {
|
|
314
|
-
title: '202330',
|
|
315
|
-
value1: 312790,
|
|
316
|
-
value2: 266821
|
|
317
|
-
}, {
|
|
318
|
-
title: '202331',
|
|
319
|
-
value1: 335076,
|
|
320
|
-
value2: 267064
|
|
321
|
-
}, {
|
|
322
|
-
title: '202332',
|
|
323
|
-
value1: 311037,
|
|
324
|
-
value2: 266821
|
|
325
|
-
}],
|
|
326
|
-
width: '100%',
|
|
327
|
-
height: '100%',
|
|
328
|
-
textcolor: '#212121',
|
|
329
|
-
areaChart1Color: '#BD9EFF',
|
|
330
|
-
areaChart2Color: '#96B4FF',
|
|
331
|
-
xselectedColor: '#42977A',
|
|
332
|
-
fillChart1Color: 'rgba(34, 158, 56, 0.20)',
|
|
333
|
-
fillChart2Color: 'rgba(255, 84, 84, 0.2)',
|
|
334
|
-
startOffset: '17.04%',
|
|
335
|
-
endOffset: '17.04%',
|
|
336
|
-
opacity: '191',
|
|
337
|
-
value1Title: 'Actual Sales',
|
|
338
|
-
value2Title: 'Baseline Sales',
|
|
339
|
-
noDataText: '',
|
|
340
|
-
startWeekRange: 0,
|
|
341
|
-
endWeekRange: 0
|
|
342
|
-
};
|