sag_components 2.0.0-beta27 → 2.0.0-beta29
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/App.js +56 -0
- package/dist/App.test.js +10 -0
- package/dist/Button.test.js +162 -0
- package/dist/LinkButton.test.js +150 -0
- package/dist/SingleBar.test.js +120 -0
- package/dist/index.esm.js +2208 -544
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2207 -544
- package/dist/index.js.map +1 -1
- package/dist/setupTests.js +15 -0
- package/dist/stories/AttachedFile.stories.js +37 -0
- package/dist/stories/AutocompleteField.stories.js +25 -0
- package/dist/stories/BannerEventBox.stories.js +59 -0
- package/dist/stories/BannerEventBoxList.stories.js +39 -0
- package/dist/stories/BannerEventBoxTest.stories.js +27 -0
- package/dist/stories/BannersDropdown.stories.js +64 -0
- package/dist/stories/BarChart.stories.js +306 -0
- package/dist/stories/BarChartTwoRows.stories.js +259 -0
- package/dist/stories/BarChartWithAreaChart.stories.js +134 -0
- package/dist/stories/BarChartsByWeeks.stories.js +445 -0
- package/dist/stories/Benchmark.stories.js +147 -0
- package/dist/stories/Button.stories.js +255 -0
- package/dist/stories/CampaignDemoReport.stories.js +65 -0
- package/dist/stories/CampaignTool/Card.stories.js +92 -0
- package/dist/stories/CampaignTool/MultipleCard.stories.js +33 -0
- package/dist/stories/CampaignTool/PageFilterBar.stories.js +28 -0
- package/dist/stories/CampaignTool/Popup.stories.js +697 -0
- package/dist/stories/CampaignTool/PopupContent.stories.js +284 -0
- package/dist/stories/CampaignTool/Table.stories.js +104 -0
- package/dist/stories/CheckBox.stories.js +107 -0
- package/dist/stories/CheckBoxButton.stories.js +150 -0
- package/dist/stories/CollapseData.stories.js +125 -0
- package/dist/stories/CollapseHeader.stories.js +123 -0
- package/dist/stories/CollapseMenuItem.stories.js +134 -0
- package/dist/stories/Datepicker.stories.js +85 -0
- package/dist/stories/DialogOverlay.stories.js +39 -0
- package/dist/stories/DoublePanelDataRow.stories.js +116 -0
- package/dist/stories/DownloadProgress.stories.js +109 -0
- package/dist/stories/Dropdown.stories.js +318 -0
- package/dist/stories/DropdownMulti.stories.js +220 -0
- package/dist/stories/DropdownNew.stories.js +407 -0
- package/dist/stories/EventDetailsCard.stories.js +122 -0
- package/dist/stories/EventList.stories.js +84 -0
- package/dist/stories/EventListItem.stories.js +65 -0
- package/dist/stories/FilterButton.stories.js +90 -0
- package/dist/stories/FilterContainer.stories.js +22 -0
- package/dist/stories/FilterPanel.stories.js +967 -0
- package/dist/stories/FormattedValue.stories.js +183 -0
- package/dist/stories/Heatmap.stories.js +118 -0
- package/dist/stories/IconButton.stories.js +126 -0
- package/dist/stories/Input.stories.js +422 -0
- package/dist/stories/InputOld.stories.js +103 -0
- package/dist/stories/KpiFilter.stories.js +401 -0
- package/dist/stories/LinkButton.stories.js +171 -0
- package/dist/stories/LinnerDataBox.stories.js +79 -0
- package/dist/stories/ListBox.stories.js +132 -0
- package/dist/stories/MarketShareDescription.stories.js +196 -0
- package/dist/stories/MonthPicker.stories.js +142 -0
- package/dist/stories/NewInput.stories.js +37 -0
- package/dist/stories/NoDataFoundMessage.stories.js +66 -0
- package/dist/stories/OneColumnContainer.stories.js +119 -0
- package/dist/stories/PerformanceAnalytics.stories.js +263 -0
- package/dist/stories/PerformanceAnalyticsLegend.stories.js +99 -0
- package/dist/stories/PerformanceAnalyticsOneColumn.stories.js +236 -0
- package/dist/stories/PerformanceAnalyticsTotals.stories.js +109 -0
- package/dist/stories/PieChart.stories.js +215 -0
- package/dist/stories/PopupCharts.stories.js +1191 -0
- package/dist/stories/ProductsVariety.stories.js +90 -0
- package/dist/stories/ProgressBar.stories.js +71 -0
- package/dist/stories/QuarterPicker.stories.js +142 -0
- package/dist/stories/QuickFilter.stories.js +275 -0
- package/dist/stories/RangePicker.stories.js +140 -0
- package/dist/stories/ReportTable.stories.js +255 -0
- package/dist/stories/SagButton.stories.js +118 -0
- package/dist/stories/SagIconButton.stories.js +122 -0
- package/dist/stories/SagInput.stories.js +69 -0
- package/dist/stories/SalesAndROI.stories.js +166 -0
- package/dist/stories/SalesSplit.stories.js +122 -0
- package/dist/stories/SearchInput.stories.js +44 -0
- package/dist/stories/SegmentedButton.stories.js +181 -0
- package/dist/stories/Select.stories.js +201 -0
- package/dist/stories/SingleBarLineCharts.stories.js +310 -0
- package/dist/stories/TabMenu.stories.js +224 -0
- package/dist/stories/TextField.stories.js +160 -0
- package/dist/stories/TitleDescription.stories.js +116 -0
- package/dist/stories/TopToggleList.stories.js +52 -0
- package/dist/stories/TotalBenchmark.stories.js +135 -0
- package/dist/stories/TotalBenchmarkAreachart.stories.js +341 -0
- package/dist/stories/TotalBenchmarkArrows.stories.js +170 -0
- package/dist/stories/TotalBenchmarkBarchart.stories.js +183 -0
- package/dist/stories/TotalDoughnutChart.stories.js +301 -0
- package/dist/stories/TotalHorizontalCharts.stories.js +291 -0
- package/dist/stories/TwoBarCharts.stories.js +185 -0
- package/dist/stories/components/AttachedFile.js +60 -0
- package/dist/stories/components/AttachedFile.style.js +48 -0
- package/dist/stories/components/AutocompleteField.js +40 -0
- package/dist/stories/components/AutocompleteField.style.js +55 -0
- package/dist/stories/components/BannerEventBox.js +97 -0
- package/dist/stories/components/BannerEventBox.style.js +78 -0
- package/dist/stories/components/BannerEventBoxList.js +153 -0
- package/dist/stories/components/BannerEventBoxList.style.js +189 -0
- package/dist/stories/components/BannerEventBoxTest.js +42 -0
- package/dist/stories/components/BannerEventBoxTest.style.js +11 -0
- package/dist/stories/components/BannersDropdown.js +119 -0
- package/dist/stories/components/BannersDropdown.style.js +99 -0
- package/dist/stories/components/BarChart.js +258 -0
- package/dist/stories/components/BarChart.style.js +60 -0
- package/dist/stories/components/BarChartTwoRows.js +220 -0
- package/dist/stories/components/BarChartTwoRows.style.js +79 -0
- package/dist/stories/components/BarChartWithAreaChart.js +268 -0
- package/dist/stories/components/BarChartWithAreaChart.style.js +67 -0
- package/dist/stories/components/BarChartsByWeeks.js +306 -0
- package/dist/stories/components/BarChartsByWeeks.style.js +96 -0
- package/dist/stories/components/Benchmark.js +130 -0
- package/dist/stories/components/Benchmark.style.js +61 -0
- package/dist/stories/components/Button.js +255 -0
- package/dist/stories/components/Button.style.js +90 -0
- package/dist/stories/components/CampaignTool/CampaignDemoReport.js +48 -0
- package/dist/stories/components/CampaignTool/CampaignDemoReport.style.js +48 -0
- package/dist/stories/components/CampaignTool/Card.js +72 -0
- package/dist/stories/components/CampaignTool/Card.style.js +65 -0
- package/dist/stories/components/CampaignTool/FormInput.js +41 -0
- package/dist/stories/components/CampaignTool/FormSelect.js +42 -0
- package/dist/stories/components/CampaignTool/MultipleCard.js +26 -0
- package/dist/stories/components/CampaignTool/MultipleCard.style.js +13 -0
- package/dist/stories/components/CampaignTool/PageFilterBar.js +23 -0
- package/dist/stories/components/CampaignTool/PageFilterBar.style.js +22 -0
- package/dist/stories/components/CampaignTool/Popup.js +172 -0
- package/dist/stories/components/CampaignTool/Popup.style.js +122 -0
- package/dist/stories/components/CampaignTool/PopupContent.js +111 -0
- package/dist/stories/components/CampaignTool/PopupContent.style.js +74 -0
- package/dist/stories/components/CampaignTool/PopupFieldsRules.js +168 -0
- package/dist/stories/components/CampaignTool/Table.js +195 -0
- package/dist/stories/components/CampaignTool/Table.style.js +86 -0
- package/dist/stories/components/CheckBox.js +76 -0
- package/dist/stories/components/CheckBox.style.js +36 -0
- package/dist/stories/components/CheckBoxButton.js +69 -0
- package/dist/stories/components/CheckBoxButton.style.js +39 -0
- package/dist/stories/components/CodeEditor.js +43 -0
- package/dist/stories/components/CodeEditor.style.js +13 -0
- package/dist/stories/components/CollapseData.js +66 -0
- package/dist/stories/components/CollapseData.style.js +127 -0
- package/dist/stories/components/CollapseHeader.js +255 -0
- package/dist/stories/components/CollapseHeader.style.js +200 -0
- package/dist/stories/components/CollapseMenuItem.js +61 -0
- package/dist/stories/components/CollapseMenuItem.style.js +61 -0
- package/dist/stories/components/CommonFunctions.js +99 -0
- package/dist/stories/components/Datepicker.js +148 -0
- package/dist/stories/components/Datepicker.style.js +19 -0
- package/dist/stories/components/DialogOverlay.js +44 -0
- package/dist/stories/components/DialogOverlay.style.js +70 -0
- package/dist/stories/components/DoublePanelDataRow.js +70 -0
- package/dist/stories/components/DoublePanelDataRow.style.js +66 -0
- package/dist/stories/components/DownloadProgress.js +97 -0
- package/dist/stories/components/DownloadProgress.style.js +51 -0
- package/dist/stories/components/Dropdown.js +231 -0
- package/dist/stories/components/Dropdown.style.js +17 -0
- package/dist/stories/components/DropdownMulti.js +290 -0
- package/dist/stories/components/DropdownMulti.style.js +17 -0
- package/dist/stories/components/DropdownMultiNew.js +292 -0
- package/dist/stories/components/DropdownMultiNew.style.js +218 -0
- package/dist/stories/components/DropdownNew.js +98 -0
- package/dist/stories/components/DropdownNew.style.js +21 -0
- package/dist/stories/components/DropdownSingleNew.js +256 -0
- package/dist/stories/components/DropdownSingleNew.style.js +189 -0
- package/dist/stories/components/EventDetailsCard.js +142 -0
- package/dist/stories/components/EventDetailsCard.style.js +62 -0
- package/dist/stories/components/EventList.js +61 -0
- package/dist/stories/components/EventList.style.js +38 -0
- package/dist/stories/components/EventListItem.js +50 -0
- package/dist/stories/components/EventListItem.style.js +47 -0
- package/dist/stories/components/FilterButton.js +53 -0
- package/dist/stories/components/FilterButton.style.js +12 -0
- package/dist/stories/components/FilterContainer.js +29 -0
- package/dist/stories/components/FilterContainer.style.js +30 -0
- package/dist/stories/components/FilterPanel.js +614 -0
- package/dist/stories/components/FilterPanel.style.js +89 -0
- package/dist/stories/components/FormattedValue.js +69 -0
- package/dist/stories/components/FormattedValue.style.js +91 -0
- package/dist/stories/components/Heatmap.js +184 -0
- package/dist/stories/components/Heatmap.style.js +151 -0
- package/dist/stories/components/IconButton.js +147 -0
- package/dist/stories/components/IconButton.style.js +64 -0
- package/dist/stories/components/Input.js +186 -0
- package/dist/stories/components/Input.style.js +132 -0
- package/dist/stories/components/InputOld.js +93 -0
- package/dist/stories/components/InputOld.style.js +71 -0
- package/dist/stories/components/KpiFilter.js +345 -0
- package/dist/stories/components/KpiFilter.style.js +132 -0
- package/dist/stories/components/LinkButton.js +225 -0
- package/dist/stories/components/LinkButton.style.js +53 -0
- package/dist/stories/components/LinnerDataBox.js +54 -0
- package/dist/stories/components/LinnerDataBox.style.js +68 -0
- package/dist/stories/components/ListBox.js +82 -0
- package/dist/stories/components/ListBox.style.js +48 -0
- package/dist/stories/components/MarketShareDescription.js +109 -0
- package/dist/stories/components/MarketShareDescription.style.js +215 -0
- package/dist/stories/components/Modal.js +21 -0
- package/dist/stories/components/Modal.style.js +63 -0
- package/dist/stories/components/ModalTotalBenchmark.js +224 -0
- package/dist/stories/components/ModalTotalCost.js +139 -0
- package/dist/stories/components/MonthPicker.js +169 -0
- package/dist/stories/components/MonthPicker.style.js +105 -0
- package/dist/stories/components/MonthPopupPicker.js +206 -0
- package/dist/stories/components/NewInput.js +33 -0
- package/dist/stories/components/NewInput.style.js +13 -0
- package/dist/stories/components/NoDataFoundMessage.js +30 -0
- package/dist/stories/components/NoDataFoundMessage.style.js +39 -0
- package/dist/stories/components/OneColumnContainer.js +121 -0
- package/dist/stories/components/OneColumnContainer.style.js +107 -0
- package/dist/stories/components/PerformanceAnalytics.js +447 -0
- package/dist/stories/components/PerformanceAnalytics.style.js +144 -0
- package/dist/stories/components/PerformanceAnalyticsLegend.js +59 -0
- package/dist/stories/components/PerformanceAnalyticsLegend.style.js +63 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn.js +327 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn.style.js +116 -0
- package/dist/stories/components/PerformanceAnalyticsTotals.js +70 -0
- package/dist/stories/components/PerformanceAnalyticsTotals.style.js +89 -0
- package/dist/stories/components/PieChart.js +154 -0
- package/dist/stories/components/PieChart.style.js +154 -0
- package/dist/stories/components/PopupCharts.js +244 -0
- package/dist/stories/components/PopupCharts.style.js +108 -0
- package/dist/stories/components/ProductsVariety.js +94 -0
- package/dist/stories/components/ProductsVariety.style.js +86 -0
- package/dist/stories/components/ProgressBar.js +52 -0
- package/dist/stories/components/ProgressBar.style.js +24 -0
- package/dist/stories/components/QuarterPicker.js +168 -0
- package/dist/stories/components/QuarterPicker.style.js +104 -0
- package/dist/stories/components/QuarterPopupPicker.js +186 -0
- package/dist/stories/components/QuickFilter.js +78 -0
- package/dist/stories/components/QuickFilter.style.js +21 -0
- package/dist/stories/components/QuickFilterDropdownMultiSelection.js +299 -0
- package/dist/stories/components/QuickFilterDropdownMultiSelection.style.js +194 -0
- package/dist/stories/components/QuickFilterDropdownSingle.js +229 -0
- package/dist/stories/components/QuickFilterDropdownSingle.style.js +139 -0
- package/dist/stories/components/RangeDatePicker.js +231 -0
- package/dist/stories/components/RangePicker.js +179 -0
- package/dist/stories/components/RangePicker.style.js +109 -0
- package/dist/stories/components/ReportTable.js +420 -0
- package/dist/stories/components/ReportTable.style.js +306 -0
- package/dist/stories/components/SagButton.js +68 -0
- package/dist/stories/components/SagButton.style.js +47 -0
- package/dist/stories/components/SagIconButton.js +130 -0
- package/dist/stories/components/SagIconButton.style.js +30 -0
- package/dist/stories/components/SagInput.js +53 -0
- package/dist/stories/components/SagInput.style.js +41 -0
- package/dist/stories/components/SalesAndROI.js +89 -0
- package/dist/stories/components/SalesAndROI.style.js +111 -0
- package/dist/stories/components/SalesSplit.js +153 -0
- package/dist/stories/components/SalesSplit.style.js +150 -0
- package/dist/stories/components/SearchInput.js +39 -0
- package/dist/stories/components/SearchInput.style.js +37 -0
- package/dist/stories/components/SegmentedButton.js +124 -0
- package/dist/stories/components/SegmentedButton.style.js +100 -0
- package/dist/stories/components/Select.js +137 -0
- package/dist/stories/components/Select.style.js +104 -0
- package/dist/stories/components/SingleBarLineCharts.js +415 -0
- package/dist/stories/components/SingleBarLineCharts.style.js +101 -0
- package/dist/stories/components/TabMenu.js +241 -0
- package/dist/stories/components/TabMenu.style.js +120 -0
- package/dist/stories/components/TextField.js +209 -0
- package/dist/stories/components/TextField.style.js +18 -0
- package/dist/stories/components/TitleDescription.js +272 -0
- package/dist/stories/components/TitleDescription.style.js +222 -0
- package/dist/stories/components/Tooltip.js +44 -0
- package/dist/stories/components/Tooltip.style.js +103 -0
- package/dist/stories/components/TopToggleList.js +46 -0
- package/dist/stories/components/TopToggleList.style.js +51 -0
- package/dist/stories/components/TotalBenchmark.js +97 -0
- package/dist/stories/components/TotalBenchmark.style.js +79 -0
- package/dist/stories/components/TotalBenchmarkAreachart.js +342 -0
- package/dist/stories/components/TotalBenchmarkAreachart.style.js +171 -0
- package/dist/stories/components/TotalBenchmarkArrows.js +149 -0
- package/dist/stories/components/TotalBenchmarkArrows.style.js +108 -0
- package/dist/stories/components/TotalBenchmarkBarchart.js +165 -0
- package/dist/stories/components/TotalBenchmarkBarchart.style.js +77 -0
- package/dist/stories/components/TotalDoughnutChart.js +187 -0
- package/dist/stories/components/TotalDoughnutChart.style.js +178 -0
- package/dist/stories/components/TotalHorizontalCharts.js +236 -0
- package/dist/stories/components/TotalHorizontalCharts.style.js +93 -0
- package/dist/stories/components/TspanTooltip.js +33 -0
- package/dist/stories/components/TspanTooltip.style.js +105 -0
- package/dist/stories/components/TwoBarCharts.js +211 -0
- package/dist/stories/components/TwoBarCharts.style.js +60 -0
- package/dist/stories/components/icons/ArrowDownIcon.js +27 -0
- package/dist/stories/components/icons/ArrowDropDownIcon.js +27 -0
- package/dist/stories/components/icons/ArrowSelectIcon.js +28 -0
- package/dist/stories/components/icons/ArrowUpIcon.js +27 -0
- package/dist/stories/components/icons/AttachedIcon.js +27 -0
- package/dist/stories/components/icons/BellIcon.js +27 -0
- package/dist/stories/components/icons/ButtonArrowRight.js +27 -0
- package/dist/stories/components/icons/Calendar.js +20 -0
- package/dist/stories/components/icons/CalendarIcon.js +27 -0
- package/dist/stories/components/icons/CalendarInOpen.js +26 -0
- package/dist/stories/components/icons/CheckBoxButtonCheckedIcon.js +28 -0
- package/dist/stories/components/icons/CheckBoxCheckedIcon.js +28 -0
- package/dist/stories/components/icons/CheckBoxNotCheckedIcon.js +28 -0
- package/dist/stories/components/icons/ChervronLeftIcon.js +20 -0
- package/dist/stories/components/icons/ChervronRightIcon.js +20 -0
- package/dist/stories/components/icons/ChevronLeftIcon.js +29 -0
- package/dist/stories/components/icons/ChevronRightIcon.js +29 -0
- package/dist/stories/components/icons/ClockIcon.js +27 -0
- package/dist/stories/components/icons/CloseIcon.js +27 -0
- package/dist/stories/components/icons/CloseXIcon.js +27 -0
- package/dist/stories/components/icons/ComboBoxArrowDownIcon.js +28 -0
- package/dist/stories/components/icons/ComboBoxArrowUpIcon.js +28 -0
- package/dist/stories/components/icons/DocumentIcon.js +48 -0
- package/dist/stories/components/icons/DownloadIcon.js +27 -0
- package/dist/stories/components/icons/Duplicate.js +28 -0
- package/dist/stories/components/icons/ErrorIcon.js +28 -0
- package/dist/stories/components/icons/ExitIcon.js +28 -0
- package/dist/stories/components/icons/ExportIcon.js +28 -0
- package/dist/stories/components/icons/EyeIcon.js +28 -0
- package/dist/stories/components/icons/FileIcon.js +27 -0
- package/dist/stories/components/icons/FilterIcon.js +36 -0
- package/dist/stories/components/icons/FlyIcon.js +28 -0
- package/dist/stories/components/icons/FoodLionChartIcon.js +42 -0
- package/dist/stories/components/icons/FoodLionIcon.js +3076 -0
- package/dist/stories/components/icons/FoodLionNewIcon.js +39 -0
- package/dist/stories/components/icons/GiantFoodChartIcon.js +40 -0
- package/dist/stories/components/icons/GiantFoodIcon.js +1976 -0
- package/dist/stories/components/icons/GiantFoodIcon_new.js +42 -0
- package/dist/stories/components/icons/HannafordChartIcon.js +40 -0
- package/dist/stories/components/icons/HannafordIcon.js +5017 -0
- package/dist/stories/components/icons/HannafordIcon_new.js +41 -0
- package/dist/stories/components/icons/HannafordNewIcon.js +213 -0
- package/dist/stories/components/icons/InfoIcon.js +28 -0
- package/dist/stories/components/icons/LampIcon.js +30 -0
- package/dist/stories/components/icons/LegendLineIcon.js +29 -0
- package/dist/stories/components/icons/LegendUnionIcon.js +29 -0
- package/dist/stories/components/icons/MaintenanceIcon.js +28 -0
- package/dist/stories/components/icons/MenuItemClosedIcon.js +28 -0
- package/dist/stories/components/icons/MenuItemOpenIcon.js +28 -0
- package/dist/stories/components/icons/MenuItemRightIcon.js +28 -0
- package/dist/stories/components/icons/MenuItemUpIcon.js +28 -0
- package/dist/stories/components/icons/NoDataFoundIcon.js +86 -0
- package/dist/stories/components/icons/OptionsIcon.js +27 -0
- package/dist/stories/components/icons/ReselectIcon.js +27 -0
- package/dist/stories/components/icons/SearchIcon.js +27 -0
- package/dist/stories/components/icons/ShoppingCartIcon.js +45 -0
- package/dist/stories/components/icons/ShoutIcon.js +27 -0
- package/dist/stories/components/icons/Sort.js +13 -0
- package/dist/stories/components/icons/SortIcon.js +35 -0
- package/dist/stories/components/icons/SpotlightProductIcon.js +28 -0
- package/dist/stories/components/icons/StopAndShopChartIcon.js +42 -0
- package/dist/stories/components/icons/StopAndShopIcon.js +134 -0
- package/dist/stories/components/icons/StopAndShopNewIcon.js +41 -0
- package/dist/stories/components/icons/SucceededIcon.js +28 -0
- package/dist/stories/components/icons/TheGiantCompanyChartIcon.js +40 -0
- package/dist/stories/components/icons/TheGiantCompanyIcon.js +40 -0
- package/dist/stories/components/icons/TheGiantCompanyIcon_old.js +1831 -0
- package/dist/stories/components/icons/TheGiantCompanyNewIcon.js +39 -0
- package/dist/stories/utils/ComponentFactory.js +65 -0
- package/dist/stories/utils/IconsHandler.js +150 -0
- package/dist/stories/utils/IconsHandler.style.js +16 -0
- package/dist/stories/utils/regex/Email.regex.js +7 -0
- package/dist/stories/utils/regex/LatinWithSpaces.regex.js +7 -0
- package/dist/stories/utils/regex/OnlyEnglishLetters.regex.js +7 -0
- package/dist/stories/utils/regex/Phone.regex.js +7 -0
- package/dist/types/components/LinnerDataBox/LinnerDataBox.data.d.ts +23 -0
- package/dist/vite.config.js +15 -0
- package/package.json +4 -4
|
@@ -0,0 +1,244 @@
|
|
|
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 = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _TotalDoughnutChart = require("./TotalDoughnutChart");
|
|
10
|
+
var _BarChartsByWeeks = require("./BarChartsByWeeks");
|
|
11
|
+
var _TotalHorizontalCharts = require("./TotalHorizontalCharts");
|
|
12
|
+
var _MarketShareDescription = require("./MarketShareDescription");
|
|
13
|
+
var _SalesAndROI = require("./SalesAndROI");
|
|
14
|
+
var _CloseXIcon = require("./icons/CloseXIcon");
|
|
15
|
+
var _FoodLionNewIcon = require("./icons/FoodLionNewIcon");
|
|
16
|
+
var _TheGiantCompanyNewIcon = require("./icons/TheGiantCompanyNewIcon");
|
|
17
|
+
var _StopAndShopNewIcon = require("./icons/StopAndShopNewIcon");
|
|
18
|
+
var _GiantFoodIcon_new = require("./icons/GiantFoodIcon_new");
|
|
19
|
+
var _HannafordIcon_new = require("./icons/HannafordIcon_new");
|
|
20
|
+
var _PopupCharts = require("./PopupCharts.style");
|
|
21
|
+
const PopupCharts = props => {
|
|
22
|
+
const {
|
|
23
|
+
title,
|
|
24
|
+
chartType,
|
|
25
|
+
popupChartsItemsData,
|
|
26
|
+
isPopupChartsOpen,
|
|
27
|
+
width,
|
|
28
|
+
height,
|
|
29
|
+
subtitleTextColor,
|
|
30
|
+
onCloseClick
|
|
31
|
+
} = props;
|
|
32
|
+
const [IsPopupChartsOpen, setIsPopupChartsOpen] = (0, _react.useState)(isPopupChartsOpen);
|
|
33
|
+
const divRef = (0, _react.useRef)(null);
|
|
34
|
+
const [divHeight, setDivHeight] = (0, _react.useState)(0);
|
|
35
|
+
(0, _react.useEffect)(() => {
|
|
36
|
+
if (divRef.current) {
|
|
37
|
+
const {
|
|
38
|
+
top,
|
|
39
|
+
bottom
|
|
40
|
+
} = divRef.current.getBoundingClientRect();
|
|
41
|
+
const newHeight = bottom - top;
|
|
42
|
+
setDivHeight(newHeight);
|
|
43
|
+
}
|
|
44
|
+
}, [height]);
|
|
45
|
+
(0, _react.useEffect)(() => {
|
|
46
|
+
setIsPopupChartsOpen(isPopupChartsOpen);
|
|
47
|
+
}, [isPopupChartsOpen]);
|
|
48
|
+
const closePopupCharts = e => {
|
|
49
|
+
setIsPopupChartsOpen(false);
|
|
50
|
+
onCloseClick(e);
|
|
51
|
+
};
|
|
52
|
+
const displayRetailerIcon = retailer => {
|
|
53
|
+
switch (retailer) {
|
|
54
|
+
case 'Food Lion':
|
|
55
|
+
return /*#__PURE__*/_react.default.createElement(_FoodLionNewIcon.FoodLionNewIcon, null);
|
|
56
|
+
case 'Hannaford':
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(_HannafordIcon_new.HannafordNewIcon, null);
|
|
58
|
+
case 'Stop&Shop':
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement(_StopAndShopNewIcon.StopAndShopNewIcon, null);
|
|
60
|
+
case 'The Giant Company':
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(_TheGiantCompanyNewIcon.TheGiantCompanyIcon, null);
|
|
62
|
+
case 'Giant Food':
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_GiantFoodIcon_new.GiantFoodNewIcon, null);
|
|
64
|
+
default:
|
|
65
|
+
return '';
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const displayDoughnutChart = rowsData => /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TotalDoughnutChart, {
|
|
69
|
+
currencySign: true,
|
|
70
|
+
dotCut: true,
|
|
71
|
+
legendData: rowsData === null || rowsData === void 0 ? void 0 : rowsData.legendData,
|
|
72
|
+
noDataText: rowsData.noDataText,
|
|
73
|
+
title: rowsData.title,
|
|
74
|
+
value: rowsData.value,
|
|
75
|
+
height: "270px",
|
|
76
|
+
width: "100%",
|
|
77
|
+
itemsValuesSeparateLine: false,
|
|
78
|
+
isPercent: true
|
|
79
|
+
});
|
|
80
|
+
const displayBarChartsByWeeks = (rowsData, showTwoBars) => /*#__PURE__*/_react.default.createElement(_BarChartsByWeeks.BarChartsByWeeks, {
|
|
81
|
+
showTwoBars: showTwoBars,
|
|
82
|
+
headerValueTopTitle: rowsData === null || rowsData === void 0 ? void 0 : rowsData.headerValueTopTitle,
|
|
83
|
+
headerValue: rowsData === null || rowsData === void 0 ? void 0 : rowsData.headerValue,
|
|
84
|
+
headerValueBottomTitle: rowsData === null || rowsData === void 0 ? void 0 : rowsData.headerValueBottomTitle,
|
|
85
|
+
HeaderValueIsPercent: rowsData === null || rowsData === void 0 ? void 0 : rowsData.isPercentValue,
|
|
86
|
+
legendData: rowsData === null || rowsData === void 0 ? void 0 : rowsData.legendData,
|
|
87
|
+
showLegend: rowsData === null || rowsData === void 0 ? void 0 : rowsData.showLegend,
|
|
88
|
+
barChartColor: rowsData === null || rowsData === void 0 ? void 0 : rowsData.barChartColor,
|
|
89
|
+
barChartSecondColor: rowsData === null || rowsData === void 0 ? void 0 : rowsData.barChartSecondColor,
|
|
90
|
+
barChartData: rowsData === null || rowsData === void 0 ? void 0 : rowsData.barChartData,
|
|
91
|
+
endWeekRange: rowsData === null || rowsData === void 0 ? void 0 : rowsData.endWeekRange,
|
|
92
|
+
startWeekRange: rowsData === null || rowsData === void 0 ? void 0 : rowsData.startWeekRange,
|
|
93
|
+
title: rowsData === null || rowsData === void 0 ? void 0 : rowsData.title,
|
|
94
|
+
tooltipTitle: rowsData === null || rowsData === void 0 ? void 0 : rowsData.tooltipTitle,
|
|
95
|
+
tooltipSecondTitle: rowsData === null || rowsData === void 0 ? void 0 : rowsData.tooltipSecondTitle,
|
|
96
|
+
height: "240px",
|
|
97
|
+
width: "100%",
|
|
98
|
+
xselectedColor: rowsData === null || rowsData === void 0 ? void 0 : rowsData.xselectedColor,
|
|
99
|
+
isPercentValue: rowsData === null || rowsData === void 0 ? void 0 : rowsData.isPercentValue
|
|
100
|
+
});
|
|
101
|
+
const displayTotalHorizontalCharts = rowsData => /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.TotalHorizontalCharts, {
|
|
102
|
+
currencySign: true,
|
|
103
|
+
dotCut: true,
|
|
104
|
+
chartsData: rowsData === null || rowsData === void 0 ? void 0 : rowsData.chartsData,
|
|
105
|
+
noDataText: rowsData.noDataText,
|
|
106
|
+
title: rowsData.title,
|
|
107
|
+
value: rowsData.value,
|
|
108
|
+
showOutgoingBanner: false,
|
|
109
|
+
height: "240px",
|
|
110
|
+
width: "100%"
|
|
111
|
+
});
|
|
112
|
+
const displayMarketShareDescription = rowsData => {
|
|
113
|
+
const content = /*#__PURE__*/_react.default.createElement(_MarketShareDescription.MarketShareDescription, {
|
|
114
|
+
marketShareData: rowsData === null || rowsData === void 0 ? void 0 : rowsData.marketShareData,
|
|
115
|
+
height: "240px",
|
|
116
|
+
width: "100%",
|
|
117
|
+
iconColor: rowsData === null || rowsData === void 0 ? void 0 : rowsData.iconColor // "#229E38"
|
|
118
|
+
});
|
|
119
|
+
return content;
|
|
120
|
+
};
|
|
121
|
+
const displaySalesAndROI = rowsData => {
|
|
122
|
+
const content = /*#__PURE__*/_react.default.createElement(_SalesAndROI.SalesAndROI, {
|
|
123
|
+
title: rowsData === null || rowsData === void 0 ? void 0 : rowsData.title,
|
|
124
|
+
dotCut: rowsData === null || rowsData === void 0 ? void 0 : rowsData.dotCut,
|
|
125
|
+
currencySign: rowsData === null || rowsData === void 0 ? void 0 : rowsData.currencySign,
|
|
126
|
+
currencyType: rowsData === null || rowsData === void 0 ? void 0 : rowsData.currencyType,
|
|
127
|
+
salesData: rowsData === null || rowsData === void 0 ? void 0 : rowsData.salesData,
|
|
128
|
+
noDataText: rowsData === null || rowsData === void 0 ? void 0 : rowsData.noDataText,
|
|
129
|
+
showBanner: false,
|
|
130
|
+
showBorderShadow: false,
|
|
131
|
+
height: "280px",
|
|
132
|
+
width: "100%"
|
|
133
|
+
});
|
|
134
|
+
return content;
|
|
135
|
+
};
|
|
136
|
+
const displayChart = item => {
|
|
137
|
+
var _item$rowsData, _item$rowsData2, _item$rowsData3, _item$rowsData4, _item$rowsData5, _item$rowsData6;
|
|
138
|
+
let content;
|
|
139
|
+
switch (chartType) {
|
|
140
|
+
case 'TotalDoughnutChart':
|
|
141
|
+
content = displayDoughnutChart((_item$rowsData = item.rowsData) === null || _item$rowsData === void 0 ? void 0 : _item$rowsData.TotalDoughnutChartDetails);
|
|
142
|
+
break;
|
|
143
|
+
case 'TotalHorizontalCharts':
|
|
144
|
+
content = displayTotalHorizontalCharts((_item$rowsData2 = item.rowsData) === null || _item$rowsData2 === void 0 ? void 0 : _item$rowsData2.TotalHorizontalChartsDetails);
|
|
145
|
+
break;
|
|
146
|
+
case 'BarChartsByWeeks':
|
|
147
|
+
content = displayBarChartsByWeeks((_item$rowsData3 = item.rowsData) === null || _item$rowsData3 === void 0 ? void 0 : _item$rowsData3.BarChartsByWeeksDetails, false);
|
|
148
|
+
break;
|
|
149
|
+
case 'BarChartsByWeeksTwoBars':
|
|
150
|
+
content = displayBarChartsByWeeks((_item$rowsData4 = item.rowsData) === null || _item$rowsData4 === void 0 ? void 0 : _item$rowsData4.BarChartsByWeeksDetails, true);
|
|
151
|
+
break;
|
|
152
|
+
case 'MarketShareDescription':
|
|
153
|
+
content = displayMarketShareDescription((_item$rowsData5 = item.rowsData) === null || _item$rowsData5 === void 0 ? void 0 : _item$rowsData5.MarketShareDescriptionDetails);
|
|
154
|
+
break;
|
|
155
|
+
case 'SalesAndROI':
|
|
156
|
+
content = displaySalesAndROI((_item$rowsData6 = item.rowsData) === null || _item$rowsData6 === void 0 ? void 0 : _item$rowsData6.SalesAndROIDetails);
|
|
157
|
+
break;
|
|
158
|
+
default:
|
|
159
|
+
content = '';
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
return /*#__PURE__*/_react.default.createElement("div", null, content);
|
|
163
|
+
};
|
|
164
|
+
const displayChartItem = item => /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartItemMainContainer, {
|
|
165
|
+
id: "ChartItemMainContainer"
|
|
166
|
+
}, /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartItemContainer, {
|
|
167
|
+
id: "ChartItemContainer",
|
|
168
|
+
style: {
|
|
169
|
+
cursor: 'pointer'
|
|
170
|
+
}
|
|
171
|
+
}, /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartItemIconContainer, {
|
|
172
|
+
id: "ChartItemIconContainer"
|
|
173
|
+
}, displayRetailerIcon(item.title)), /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartItemTitle, {
|
|
174
|
+
id: "ChartItemTitle",
|
|
175
|
+
subtitleTextColor: subtitleTextColor
|
|
176
|
+
}, item.title)), /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartContentContainer, {
|
|
177
|
+
id: "ChartContentContainer"
|
|
178
|
+
}, displayChart(item)));
|
|
179
|
+
return /*#__PURE__*/_react.default.createElement(_PopupCharts.MainContainer, {
|
|
180
|
+
id: "MainContainer"
|
|
181
|
+
}, IsPopupChartsOpen && /*#__PURE__*/_react.default.createElement(_PopupCharts.ModalOverlay, {
|
|
182
|
+
id: "ModalOverlay",
|
|
183
|
+
className: "modal-overlay"
|
|
184
|
+
}, /*#__PURE__*/_react.default.createElement(_PopupCharts.ModalContent, {
|
|
185
|
+
id: "ModalContent",
|
|
186
|
+
ref: divRef,
|
|
187
|
+
className: "modal-content",
|
|
188
|
+
height: height,
|
|
189
|
+
width: width,
|
|
190
|
+
onClick: e => e.stopPropagation()
|
|
191
|
+
}, /*#__PURE__*/_react.default.createElement(_PopupCharts.TitleContainer, null, /*#__PURE__*/_react.default.createElement(_PopupCharts.Title, null, title), /*#__PURE__*/_react.default.createElement(_PopupCharts.CloseXIconContainer, {
|
|
192
|
+
onClick: e => closePopupCharts(e)
|
|
193
|
+
}, /*#__PURE__*/_react.default.createElement(_CloseXIcon.CloseXIcon, null))), /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartsContainer, {
|
|
194
|
+
id: "ChartsContainer",
|
|
195
|
+
maxHeight: divHeight ? (divHeight - 110).toString().concat('', 'px') : null,
|
|
196
|
+
height: (popupChartsItemsData === null || popupChartsItemsData === void 0 ? void 0 : popupChartsItemsData.length) < 4 ? '45%' : '100%'
|
|
197
|
+
}, popupChartsItemsData.map(item => displayChartItem(item))))));
|
|
198
|
+
};
|
|
199
|
+
var _default = exports.default = PopupCharts;
|
|
200
|
+
PopupCharts.defaultProps = {
|
|
201
|
+
title: 'Switching Pattern',
|
|
202
|
+
chartType: 'TotalDoughnutChart',
|
|
203
|
+
isPopupChartsOpen: true,
|
|
204
|
+
popupChartsItemsData: [{
|
|
205
|
+
title: 'Item 1',
|
|
206
|
+
chartType: 'TotalDoughnutChart',
|
|
207
|
+
value: 100,
|
|
208
|
+
legendData: [{
|
|
209
|
+
color: '#FF0000',
|
|
210
|
+
name: 'Red',
|
|
211
|
+
value: 50
|
|
212
|
+
}, {
|
|
213
|
+
color: '#00FF00',
|
|
214
|
+
name: 'Green',
|
|
215
|
+
value: 30
|
|
216
|
+
}, {
|
|
217
|
+
color: '#0000FF',
|
|
218
|
+
name: 'Blue',
|
|
219
|
+
value: 20
|
|
220
|
+
}],
|
|
221
|
+
noDataText: 'No data available'
|
|
222
|
+
}, {
|
|
223
|
+
title: 'Item 2',
|
|
224
|
+
chartType: 'TotalHorizontalCharts',
|
|
225
|
+
value: 200,
|
|
226
|
+
chartsData: [{
|
|
227
|
+
label: 'Label 1',
|
|
228
|
+
value: 50
|
|
229
|
+
}, {
|
|
230
|
+
label: 'Label 2',
|
|
231
|
+
value: 100
|
|
232
|
+
}, {
|
|
233
|
+
label: 'Label 3',
|
|
234
|
+
value: 150
|
|
235
|
+
}],
|
|
236
|
+
noDataText: 'No data available'
|
|
237
|
+
}
|
|
238
|
+
// Add more items as needed
|
|
239
|
+
],
|
|
240
|
+
width: '1700px',
|
|
241
|
+
height: '800px',
|
|
242
|
+
onCloseClick: () => {},
|
|
243
|
+
subtitleTextColor: '#7E7E7E'
|
|
244
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.TitleContainer = exports.Title = exports.ModalOverlay = exports.ModalContent = exports.MainContainer = exports.CloseXIconContainer = exports.ChartsContainer = exports.ChartItemTitle = exports.ChartItemMainContainer = exports.ChartItemIconContainer = exports.ChartItemContainer = exports.ChartContentContainer = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
const scrollableStyles = `
|
|
10
|
+
overflow-y: auto;
|
|
11
|
+
|
|
12
|
+
&::-webkit-scrollbar {
|
|
13
|
+
width: 8px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&::-webkit-scrollbar-track {
|
|
17
|
+
background: #E8E8E8;
|
|
18
|
+
border-radius: 5px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&::-webkit-scrollbar-thumb {
|
|
22
|
+
background: #D0D0D0;
|
|
23
|
+
border-radius: 5px;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
const MainContainer = exports.MainContainer = _styledComponents.default.div``;
|
|
27
|
+
const ModalOverlay = exports.ModalOverlay = _styledComponents.default.div`
|
|
28
|
+
position: fixed;
|
|
29
|
+
z-index: 100;
|
|
30
|
+
top: 0;
|
|
31
|
+
left: 0;
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
align-items: center;
|
|
38
|
+
`;
|
|
39
|
+
const ModalContent = exports.ModalContent = _styledComponents.default.div`
|
|
40
|
+
font-family: "Poppins", sans-serif;
|
|
41
|
+
font-weight: 500;
|
|
42
|
+
font-size: 18px;
|
|
43
|
+
background-color: #fefefe;
|
|
44
|
+
padding: 20px 30px 20px 40px;
|
|
45
|
+
border: 1px solid #888;
|
|
46
|
+
border-radius: 10px;
|
|
47
|
+
height: ${props => props.height};
|
|
48
|
+
width: ${props => props.width};
|
|
49
|
+
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);
|
|
50
|
+
`;
|
|
51
|
+
const TitleContainer = exports.TitleContainer = _styledComponents.default.div`
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
align-items: center;
|
|
55
|
+
padding: 0 0 10px 0;
|
|
56
|
+
margin: 0;
|
|
57
|
+
border-bottom: 1px solid #b1b1b1;
|
|
58
|
+
`;
|
|
59
|
+
const Title = exports.Title = _styledComponents.default.p`
|
|
60
|
+
font-weight: 400;
|
|
61
|
+
font-size: 24px;
|
|
62
|
+
margin: 0;
|
|
63
|
+
`;
|
|
64
|
+
const ChartsContainer = exports.ChartsContainer = _styledComponents.default.div`
|
|
65
|
+
display: grid;
|
|
66
|
+
grid-template-columns: repeat(3, 1fr); /* 3 columns */
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
overflow-y: auto;
|
|
69
|
+
${scrollableStyles}
|
|
70
|
+
max-height: ${props => props.maxHeight};
|
|
71
|
+
height: ${props => props.height};
|
|
72
|
+
padding: 10px 0 0 0;
|
|
73
|
+
`;
|
|
74
|
+
const ChartItemMainContainer = exports.ChartItemMainContainer = _styledComponents.default.div`
|
|
75
|
+
// display: flex;
|
|
76
|
+
margin: 10px 10px 10px 10px;
|
|
77
|
+
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);
|
|
78
|
+
border-radius: 12px;
|
|
79
|
+
padding-right: 10px;
|
|
80
|
+
|
|
81
|
+
`;
|
|
82
|
+
const ChartItemContainer = exports.ChartItemContainer = _styledComponents.default.div`
|
|
83
|
+
display: flex;
|
|
84
|
+
justify-content: flex-start;
|
|
85
|
+
align-items: center;
|
|
86
|
+
margin: 20px 10px;
|
|
87
|
+
`;
|
|
88
|
+
const ChartItemTitle = exports.ChartItemTitle = _styledComponents.default.h3`
|
|
89
|
+
font-weight: 400;
|
|
90
|
+
font-size: 16px;
|
|
91
|
+
line-height: 24px;
|
|
92
|
+
margin: 0 10px;
|
|
93
|
+
color: ${props => props.subtitleTextColor};
|
|
94
|
+
`;
|
|
95
|
+
const ChartItemIconContainer = exports.ChartItemIconContainer = _styledComponents.default.h3`
|
|
96
|
+
margin: 0 0 0 10px;
|
|
97
|
+
`;
|
|
98
|
+
const ChartContentContainer = exports.ChartContentContainer = _styledComponents.default.div`
|
|
99
|
+
font-weight: 500;
|
|
100
|
+
font-size: 14px;
|
|
101
|
+
margin: 0;
|
|
102
|
+
border-radius: 12px;
|
|
103
|
+
`;
|
|
104
|
+
const CloseXIconContainer = exports.CloseXIconContainer = _styledComponents.default.div`
|
|
105
|
+
display: block;
|
|
106
|
+
margin: 0;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
`;
|
|
@@ -0,0 +1,94 @@
|
|
|
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 = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _MenuItemOpenIcon = require("./icons/MenuItemOpenIcon");
|
|
10
|
+
var _MenuItemUpIcon = require("./icons/MenuItemUpIcon");
|
|
11
|
+
var _SpotlightProductIcon = require("./icons/SpotlightProductIcon");
|
|
12
|
+
var _BannersDropdown = require("./BannersDropdown");
|
|
13
|
+
var _ProductsVariety = require("./ProductsVariety.style");
|
|
14
|
+
const ProductsVariety = props => {
|
|
15
|
+
const {
|
|
16
|
+
title,
|
|
17
|
+
subTitle,
|
|
18
|
+
productsData,
|
|
19
|
+
showBannersDropdown,
|
|
20
|
+
onSpotlightProductClick,
|
|
21
|
+
onClickBannersDropdown
|
|
22
|
+
} = props;
|
|
23
|
+
const [IsProductsListOpen, setIsProductsListOpen] = (0, _react.useState)(false);
|
|
24
|
+
const displayBannersDropdown = () => /*#__PURE__*/_react.default.createElement(_BannersDropdown.BannersDropdown, {
|
|
25
|
+
banners: [{
|
|
26
|
+
checked: true,
|
|
27
|
+
name: 'StopAndShop'
|
|
28
|
+
}, {
|
|
29
|
+
checked: true,
|
|
30
|
+
name: 'FoodLion'
|
|
31
|
+
}, {
|
|
32
|
+
checked: true,
|
|
33
|
+
name: 'GiantFood'
|
|
34
|
+
}, {
|
|
35
|
+
checked: true,
|
|
36
|
+
name: 'TheGiantCompany'
|
|
37
|
+
}, {
|
|
38
|
+
checked: true,
|
|
39
|
+
name: 'Hannaford'
|
|
40
|
+
}],
|
|
41
|
+
onClick: banners => {
|
|
42
|
+
onClickBannersDropdown({
|
|
43
|
+
banners
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductsVarietyMainContainer, {
|
|
48
|
+
id: "ProductsVarietyMainContainer"
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductsVarietyContainer, {
|
|
50
|
+
id: "ProductsVarietyContainer"
|
|
51
|
+
}, /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductsVarietyTitleContainer, {
|
|
52
|
+
id: "ProductsVarietyTitleContainer"
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductsVarietyTitle, {
|
|
54
|
+
id: "ProductsVarietyTitle"
|
|
55
|
+
}, title), /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductsVarietySubTitle, {
|
|
56
|
+
id: "ProductsVarietySubTitle"
|
|
57
|
+
}, "|"), /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductsVarietySubTitle, {
|
|
58
|
+
id: "ProductsVarietySubTitle"
|
|
59
|
+
}, productsData ? productsData === null || productsData === void 0 ? void 0 : productsData.length : ''), showBannersDropdown && displayBannersDropdown()), /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductButtonContainer, {
|
|
60
|
+
id: "ProductButtonContainer",
|
|
61
|
+
onClick: () => {
|
|
62
|
+
setIsProductsListOpen(!IsProductsListOpen);
|
|
63
|
+
}
|
|
64
|
+
}, IsProductsListOpen ? /*#__PURE__*/_react.default.createElement(_MenuItemUpIcon.MenuItemUpIcon, {
|
|
65
|
+
color: "#212121"
|
|
66
|
+
}) : /*#__PURE__*/_react.default.createElement(_MenuItemOpenIcon.MenuItemOpenIcon, {
|
|
67
|
+
color: "#212121"
|
|
68
|
+
}))), IsProductsListOpen && /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductsVarietyContentContainer, {
|
|
69
|
+
id: "ProductsVarietyContentContainer"
|
|
70
|
+
}, /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductsTitle, {
|
|
71
|
+
id: "ProductsTitle"
|
|
72
|
+
}, subTitle), productsData === null || productsData === void 0 ? void 0 : productsData.map(item => /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductContainer, {
|
|
73
|
+
id: "ProductContainer"
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement(_ProductsVariety.Product, {
|
|
75
|
+
id: "Product"
|
|
76
|
+
}, item.label), item.ShowSpotlightProductButton ? /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductButtonContainer, {
|
|
77
|
+
id: "ProductButtonContainer",
|
|
78
|
+
background: "#F8CD00",
|
|
79
|
+
onClick: () => {
|
|
80
|
+
onSpotlightProductClick({
|
|
81
|
+
value: item.value,
|
|
82
|
+
label: item.label
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement(_SpotlightProductIcon.SpotlightProductIcon, null)) : ''))));
|
|
86
|
+
};
|
|
87
|
+
var _default = exports.default = ProductsVariety;
|
|
88
|
+
ProductsVariety.defaultProps = {
|
|
89
|
+
title: 'Products Variety',
|
|
90
|
+
subTitle: 'Product Name',
|
|
91
|
+
showBannersDropdown: true,
|
|
92
|
+
onSpotlightProductClick: () => {},
|
|
93
|
+
onClickBannersDropdown: () => {}
|
|
94
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ProductsVarietyTitleContainer = exports.ProductsVarietyTitle = exports.ProductsVarietySubTitle = exports.ProductsVarietyMainContainer = exports.ProductsVarietyContentContainer = exports.ProductsVarietyContainer = exports.ProductsTitle = exports.ProductContainer = exports.ProductButtonContainer = exports.Product = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
const ProductsVarietyMainContainer = exports.ProductsVarietyMainContainer = _styledComponents.default.div`
|
|
10
|
+
font-family: "Poppins", sans-serif;
|
|
11
|
+
position: relative;
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 10px;
|
|
14
|
+
background: #ffffff;
|
|
15
|
+
border-radius: 12px;
|
|
16
|
+
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);
|
|
17
|
+
`;
|
|
18
|
+
const ProductsVarietyContainer = exports.ProductsVarietyContainer = _styledComponents.default.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
align-items: center;
|
|
22
|
+
margin: 0 10px;
|
|
23
|
+
`;
|
|
24
|
+
const ProductsVarietyTitleContainer = exports.ProductsVarietyTitleContainer = _styledComponents.default.div`
|
|
25
|
+
font-size: 20px;
|
|
26
|
+
line-height: 25px;
|
|
27
|
+
display: flex;
|
|
28
|
+
justify-content: flex-start;
|
|
29
|
+
align-items: center;
|
|
30
|
+
margin: 10px;
|
|
31
|
+
gap: 15px;
|
|
32
|
+
`;
|
|
33
|
+
const ProductsVarietyTitle = exports.ProductsVarietyTitle = _styledComponents.default.h3`
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
font-size: 20px;
|
|
36
|
+
margin: 0;
|
|
37
|
+
`;
|
|
38
|
+
const ProductsVarietySubTitle = exports.ProductsVarietySubTitle = _styledComponents.default.h3`
|
|
39
|
+
color: #757171;
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
font-size: 20px;
|
|
42
|
+
margin: 0;
|
|
43
|
+
`;
|
|
44
|
+
const ProductsVarietyContentContainer = exports.ProductsVarietyContentContainer = _styledComponents.default.div`
|
|
45
|
+
display: flex;
|
|
46
|
+
justify-content: flex-start;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
align-items: flex-start;
|
|
49
|
+
margin: 10px;
|
|
50
|
+
padding: 10px 20px 20px 50px;
|
|
51
|
+
font-size: 20px;
|
|
52
|
+
line-height: 25px;
|
|
53
|
+
`;
|
|
54
|
+
const ProductsTitle = exports.ProductsTitle = _styledComponents.default.h3`
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
margin: 10px 0;
|
|
58
|
+
`;
|
|
59
|
+
const ProductContainer = exports.ProductContainer = _styledComponents.default.div`
|
|
60
|
+
display: flex;
|
|
61
|
+
justify-content: flex-start;
|
|
62
|
+
align-items: center;
|
|
63
|
+
border-bottom: 1px solid #00000010;
|
|
64
|
+
width: 100%;
|
|
65
|
+
gap: 20px;
|
|
66
|
+
`;
|
|
67
|
+
const Product = exports.Product = _styledComponents.default.h3`
|
|
68
|
+
font-weight: 400;
|
|
69
|
+
font-size: 14px;
|
|
70
|
+
border-radius: 12px;
|
|
71
|
+
`;
|
|
72
|
+
const ProductButtonContainer = exports.ProductButtonContainer = _styledComponents.default.div`
|
|
73
|
+
display: flex;
|
|
74
|
+
gap: 10px;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: space-between;
|
|
77
|
+
height: 25px;
|
|
78
|
+
padding: 0 15px;
|
|
79
|
+
user-select: none;
|
|
80
|
+
border-radius: 12px;
|
|
81
|
+
background: ${props => props.background || '#ffffff'};
|
|
82
|
+
&:hover {
|
|
83
|
+
background-color: #f0f0f0;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
}
|
|
86
|
+
`;
|
|
@@ -0,0 +1,52 @@
|
|
|
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 = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _ProgressBar = require("./ProgressBar.style");
|
|
10
|
+
const ProgressBar = props => {
|
|
11
|
+
const {
|
|
12
|
+
progressPercent,
|
|
13
|
+
refreshInterval,
|
|
14
|
+
height,
|
|
15
|
+
width,
|
|
16
|
+
color
|
|
17
|
+
} = props;
|
|
18
|
+
const [progress, setProgress] = (0, _react.useState)(0);
|
|
19
|
+
(0, _react.useEffect)(() => {
|
|
20
|
+
const timer = setInterval(() => {
|
|
21
|
+
setProgress(currentProgress => {
|
|
22
|
+
const newProgress = currentProgress + 1;
|
|
23
|
+
if (newProgress > 100) {
|
|
24
|
+
clearInterval(timer);
|
|
25
|
+
return 100;
|
|
26
|
+
}
|
|
27
|
+
return newProgress;
|
|
28
|
+
});
|
|
29
|
+
}, refreshInterval);
|
|
30
|
+
return () => clearInterval(timer);
|
|
31
|
+
}, [progressPercent, refreshInterval]);
|
|
32
|
+
(0, _react.useEffect)(() => {
|
|
33
|
+
setProgress(progressPercent);
|
|
34
|
+
}, [progressPercent]);
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_ProgressBar.ProgressBarContainer, {
|
|
36
|
+
className: "ProgressBarContainer",
|
|
37
|
+
width: width,
|
|
38
|
+
height: height
|
|
39
|
+
}, /*#__PURE__*/_react.default.createElement(_ProgressBar.ProgressBarFiller, {
|
|
40
|
+
className: "ProgressBarFiller",
|
|
41
|
+
color: color,
|
|
42
|
+
progress: progress
|
|
43
|
+
}));
|
|
44
|
+
};
|
|
45
|
+
var _default = exports.default = ProgressBar;
|
|
46
|
+
ProgressBar.defaultProps = {
|
|
47
|
+
progressPercent: 0,
|
|
48
|
+
refreshInterval: 100,
|
|
49
|
+
width: '100%',
|
|
50
|
+
height: '9px',
|
|
51
|
+
color: '#066768'
|
|
52
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ProgressBarFiller = exports.ProgressBarContainer = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
// Styled-components for the progress container and the filler
|
|
10
|
+
const ProgressBarContainer = exports.ProgressBarContainer = _styledComponents.default.div`
|
|
11
|
+
width: ${props => props.width};
|
|
12
|
+
background-color: #F2F2F2;
|
|
13
|
+
border-radius: 12px;
|
|
14
|
+
height: ${props => props.height};
|
|
15
|
+
margin: 5px 0;
|
|
16
|
+
`;
|
|
17
|
+
const ProgressBarFiller = exports.ProgressBarFiller = _styledComponents.default.div`
|
|
18
|
+
background-color: ${props => props.color};
|
|
19
|
+
height: 100%;
|
|
20
|
+
text-align: center;
|
|
21
|
+
border-radius: 12px;
|
|
22
|
+
transition: width 0.5s ease-in-out;
|
|
23
|
+
width: ${props => props.progress}%;
|
|
24
|
+
`;
|