sag_components 1.0.882 → 1.0.883
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/stories/components/AttachedFile/AttachedFile.js +62 -0
- package/dist/stories/components/AttachedFile/AttachedFile.stories.js +36 -0
- package/dist/stories/components/AttachedFile/AttachedFile.style.js +14 -0
- package/dist/stories/components/BannerEventBox/BannerEventBox.js +87 -0
- package/dist/stories/components/BannerEventBox/BannerEventBox.stories.js +58 -0
- package/dist/stories/components/BannerEventBox/BannerEventBox.style.js +22 -0
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.js +148 -0
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.stories.js +30 -0
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.style.js +22 -0
- package/dist/stories/components/BannersDropdown/BannersDropdown.js +115 -0
- package/dist/stories/components/BannersDropdown/BannersDropdown.stories.js +64 -0
- package/dist/stories/components/BannersDropdown/BannersDropdown.style.js +18 -0
- package/dist/stories/components/BarChart/BarChart.js +189 -0
- package/dist/stories/components/BarChart/BarChart.stories.js +144 -0
- package/dist/stories/components/BarChart/BarChart.style.js +18 -0
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.js +204 -0
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.stories.js +133 -0
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.style.js +18 -0
- package/dist/stories/components/BarChartWithAreaChart.js +241 -0
- package/dist/stories/components/BarChartWithAreaChart.style.js +64 -0
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.js +295 -0
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.stories.js +442 -0
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.style.js +21 -0
- package/dist/stories/components/Benchmark/Benchmark.js +130 -0
- package/dist/stories/components/Benchmark/Benchmark.stories.js +148 -0
- package/dist/stories/components/Benchmark/Benchmark.style.js +15 -0
- package/dist/stories/components/Button/Button.js +217 -0
- package/dist/stories/components/Button/Button.stories.js +269 -0
- package/dist/stories/components/Button/Button.style.js +15 -0
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.js +48 -0
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.stories.js +65 -0
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.style.js +15 -0
- package/dist/stories/components/Card/Card.js +72 -0
- package/dist/stories/components/Card/Card.stories.js +92 -0
- package/dist/stories/components/Card/Card.style.js +18 -0
- package/dist/stories/components/CheckBox/CheckBox.js +76 -0
- package/dist/stories/components/CheckBox/CheckBox.stories.js +107 -0
- package/dist/stories/components/CheckBox/CheckBox.style.js +14 -0
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.js +69 -0
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.stories.js +150 -0
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.style.js +14 -0
- package/dist/stories/components/CodeEditor/CodeEditor.js +43 -0
- package/dist/stories/components/CodeEditor/CodeEditor.style.js +12 -0
- package/dist/stories/components/CollapseData/CollapseData.js +66 -0
- package/dist/stories/components/CollapseData/CollapseData.stories.js +125 -0
- package/dist/stories/components/CollapseData/CollapseData.style.js +21 -0
- package/dist/stories/components/CollapseHeader/CollapseHeader.js +267 -0
- package/dist/stories/components/CollapseHeader/CollapseHeader.stories.js +116 -0
- package/dist/stories/components/CollapseHeader/CollapseHeader.style.js +35 -0
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.js +61 -0
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.stories.js +161 -0
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.style.js +17 -0
- package/dist/stories/components/Datepicker/Datepicker.js +148 -0
- package/dist/stories/components/Datepicker/Datepicker.stories.js +86 -0
- package/dist/stories/components/Datepicker/Datepicker.style.js +13 -0
- package/dist/stories/components/DownloadProgress/DownloadProgress.js +97 -0
- package/dist/stories/components/DownloadProgress/DownloadProgress.stories.js +111 -0
- package/dist/stories/components/DownloadProgress/DownloadProgress.style.js +14 -0
- package/dist/stories/components/Dropdown/Dropdown.js +231 -0
- package/dist/stories/components/Dropdown/Dropdown.stories.js +323 -0
- package/dist/stories/components/Dropdown/Dropdown.style.js +11 -0
- package/dist/stories/components/DropdownMulti/DropdownMulti.js +290 -0
- package/dist/stories/components/DropdownMulti/DropdownMulti.stories.js +220 -0
- package/dist/stories/components/DropdownMulti/DropdownMulti.style.js +11 -0
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.js +279 -0
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.style.js +28 -0
- package/dist/stories/components/DropdownNew/DropdownNew.js +88 -0
- package/dist/stories/components/DropdownNew/DropdownNew.stories.js +407 -0
- package/dist/stories/components/DropdownNew/DropdownNew.style.js +11 -0
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.js +234 -0
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.style.js +26 -0
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.js +144 -0
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.stories.js +57 -0
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.style.js +18 -0
- package/dist/stories/components/EventList/EventList.js +61 -0
- package/dist/stories/components/EventList/EventList.stories.js +84 -0
- package/dist/stories/components/EventList/EventList.style.js +14 -0
- package/dist/stories/components/EventListItem/EventListItem.js +50 -0
- package/dist/stories/components/EventListItem/EventListItem.stories.js +65 -0
- package/dist/stories/components/EventListItem/EventListItem.style.js +14 -0
- package/dist/stories/components/FilterContainer/FilterContainer.js +29 -0
- package/dist/stories/components/FilterContainer/FilterContainer.stories.js +23 -0
- package/dist/stories/components/FilterContainer/FilterContainer.style.js +13 -0
- package/dist/stories/components/FilterPanel/FilterPanel.js +566 -0
- package/dist/stories/components/FilterPanel/FilterPanel.stories.js +967 -0
- package/dist/stories/components/FilterPanel/FilterPanel.style.js +21 -0
- package/dist/stories/components/FormInput/FormInput.js +41 -0
- package/dist/stories/components/FormSelect/FormSelect.js +42 -0
- package/dist/stories/components/FormattedValue/FormattedValue.js +68 -0
- package/dist/stories/components/FormattedValue/FormattedValue.stories.js +189 -0
- package/dist/stories/components/FormattedValue/FormattedValue.style.js +18 -0
- package/dist/stories/components/IconButton/IconButton.js +147 -0
- package/dist/stories/components/IconButton/IconButton.stories.js +131 -0
- package/dist/stories/components/IconButton/IconButton.style.js +15 -0
- package/dist/stories/components/Input/Input.js +183 -0
- package/dist/stories/components/Input/Input.stories.js +434 -0
- package/dist/stories/components/Input/Input.style.js +17 -0
- package/dist/stories/components/InputOld/InputOld.js +90 -0
- package/dist/stories/components/InputOld/InputOld.stories.js +100 -0
- package/dist/stories/components/InputOld/InputOld.style.js +16 -0
- package/dist/stories/components/KpiFilter/KpiFilter.js +313 -0
- package/dist/stories/components/KpiFilter/KpiFilter.stories.js +380 -0
- package/dist/stories/components/KpiFilter/KpiFilter.style.js +26 -0
- package/dist/stories/components/LinkButton/LinkButton.js +207 -0
- package/dist/stories/components/LinkButton/LinkButton.stories.js +180 -0
- package/dist/stories/components/LinkButton/LinkButton.style.js +14 -0
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.js +43 -0
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.stories.js +56 -0
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.style.js +22 -0
- package/dist/stories/components/ListBox/ListBox.js +82 -0
- package/dist/stories/components/ListBox/ListBox.stories.js +132 -0
- package/dist/stories/components/ListBox/ListBox.style.js +14 -0
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.js +109 -0
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.stories.js +184 -0
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.style.js +27 -0
- package/dist/stories/components/Modal/Modal.js +21 -0
- package/dist/stories/components/Modal/Modal.style.js +17 -0
- package/dist/stories/components/Modal/ModalTotalBenchmark.js +224 -0
- package/dist/stories/components/Modal/ModalTotalCost.js +139 -0
- package/dist/stories/components/MonthPicker/MonthPicker.js +166 -0
- package/dist/stories/components/MonthPicker/MonthPicker.stories.js +140 -0
- package/dist/stories/components/MonthPicker/MonthPicker.style.js +18 -0
- package/dist/stories/components/MonthPicker/MonthPopupPicker.js +122 -0
- package/dist/stories/components/MultipleCard/MultipleCard.js +26 -0
- package/dist/stories/components/MultipleCard/MultipleCard.stories.js +33 -0
- package/dist/stories/components/{BannerEventBoxTest.style.js → MultipleCard/MultipleCard.style.js} +2 -2
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.js +30 -0
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.stories.js +66 -0
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.style.js +13 -0
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.js +121 -0
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.stories.js +119 -0
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.style.js +20 -0
- package/dist/stories/components/PageFilterBar/PageFilterBar.js +23 -0
- package/dist/stories/components/PageFilterBar/PageFilterBar.stories.js +28 -0
- package/dist/stories/components/PageFilterBar/PageFilterBar.style.js +12 -0
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.js +431 -0
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.stories.js +258 -0
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.style.js +25 -0
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.js +58 -0
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.stories.js +86 -0
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.style.js +16 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.js +315 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.stories.js +231 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.style.js +23 -0
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.js +70 -0
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.stories.js +100 -0
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.style.js +20 -0
- package/dist/stories/components/Popup/Popup.js +172 -0
- package/dist/stories/components/Popup/Popup.stories.js +704 -0
- package/dist/stories/components/Popup/Popup.style.js +24 -0
- package/dist/stories/components/PopupCharts/PopupCharts.js +244 -0
- package/dist/stories/components/PopupCharts/PopupCharts.stories.js +1203 -0
- package/dist/stories/components/PopupCharts/PopupCharts.style.js +23 -0
- package/dist/stories/components/PopupContent/PopupContent.js +111 -0
- package/dist/stories/components/PopupContent/PopupContent.style.js +21 -0
- package/dist/stories/components/PopupContent/PopupFieldsRules.js +168 -0
- package/dist/stories/components/ProductsVariety/ProductsVariety.js +94 -0
- package/dist/stories/components/ProductsVariety/ProductsVariety.stories.js +91 -0
- package/dist/stories/components/ProductsVariety/ProductsVariety.style.js +20 -0
- package/dist/stories/components/ProgressBar/ProgressBar.js +52 -0
- package/dist/stories/components/ProgressBar/ProgressBar.stories.js +72 -0
- package/dist/stories/components/ProgressBar/ProgressBar.style.js +13 -0
- package/dist/stories/components/QuarterPicker/QuarterPicker.js +165 -0
- package/dist/stories/components/QuarterPicker/QuarterPicker.stories.js +140 -0
- package/dist/stories/components/QuarterPicker/QuarterPicker.style.js +18 -0
- package/dist/stories/components/QuarterPicker/QuarterPopupPicker.js +109 -0
- package/dist/stories/components/QuickFilter/QuickFilter.js +77 -0
- package/dist/stories/components/QuickFilter/QuickFilter.stories.js +281 -0
- package/dist/stories/components/QuickFilter/QuickFilter.style.js +11 -0
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.js +299 -0
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.style.js +28 -0
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.js +230 -0
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.style.js +27 -0
- package/dist/stories/components/RangePicker/RangeDatePicker.js +146 -0
- package/dist/stories/components/RangePicker/RangePicker.js +176 -0
- package/dist/stories/components/RangePicker/RangePicker.stories.js +138 -0
- package/dist/stories/components/RangePicker/RangePicker.style.js +18 -0
- package/dist/stories/components/ReportTable/ReportTable.js +262 -0
- package/dist/stories/components/ReportTable/ReportTable.stories.js +151 -0
- package/dist/stories/components/ReportTable/ReportTable.style.js +22 -0
- package/dist/stories/components/SagButton/SagButton.js +68 -0
- package/dist/stories/components/SagButton/SagButton.stories.js +118 -0
- package/dist/stories/components/SagButton/SagButton.style.js +13 -0
- package/dist/stories/components/SagIconButton/SagIconButton.js +130 -0
- package/dist/stories/components/SagIconButton/SagIconButton.stories.js +123 -0
- package/dist/stories/components/SagIconButton/SagIconButton.style.js +12 -0
- package/dist/stories/components/SagInput/SagInput.js +53 -0
- package/dist/stories/components/SagInput/SagInput.stories.js +69 -0
- package/dist/stories/components/{NewInput.style.js → SagInput/SagInput.style.js} +2 -2
- package/dist/stories/components/SalesAndROI/SalesAndROI.js +89 -0
- package/dist/stories/components/SalesAndROI/SalesAndROI.stories.js +168 -0
- package/dist/stories/components/SalesAndROI/SalesAndROI.style.js +19 -0
- package/dist/stories/components/SearchInput/SearchInput.js +39 -0
- package/dist/stories/components/SearchInput/SearchInput.stories.js +44 -0
- package/dist/stories/components/SearchInput/SearchInput.style.js +12 -0
- package/dist/stories/components/SegmentedButton/SegmentedButton.js +122 -0
- package/dist/stories/components/SegmentedButton/SegmentedButton.stories.js +183 -0
- package/dist/stories/components/SegmentedButton/SegmentedButton.style.js +19 -0
- package/dist/stories/components/Select/Select.js +135 -0
- package/dist/stories/components/Select/Select.stories.js +200 -0
- package/dist/stories/components/Select/Select.style.js +19 -0
- package/dist/stories/components/TabMenu/TabMenu.js +202 -0
- package/dist/stories/components/TabMenu/TabMenu.stories.js +76 -0
- package/dist/stories/components/TabMenu/TabMenu.style.js +24 -0
- package/dist/stories/components/Table/Table.js +195 -0
- package/dist/stories/components/Table/Table.stories.js +104 -0
- package/dist/stories/components/Table/Table.style.js +17 -0
- package/dist/stories/components/TextField/TextField.js +209 -0
- package/dist/stories/components/TextField/TextField.stories.js +162 -0
- package/dist/stories/components/TextField/TextField.style.js +11 -0
- package/dist/stories/components/TitleDescription/TitleDescription.js +272 -0
- package/dist/stories/components/TitleDescription/TitleDescription.stories.js +117 -0
- package/dist/stories/components/TitleDescription/TitleDescription.style.js +36 -0
- package/dist/stories/components/Tooltip/Tooltip.js +31 -0
- package/dist/stories/components/Tooltip/Tooltip.style.js +18 -0
- package/dist/stories/components/TopToggleList/TopToggleList.js +46 -0
- package/dist/stories/components/TopToggleList/TopToggleList.stories.js +52 -0
- package/dist/stories/components/TopToggleList/TopToggleList.style.js +16 -0
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.js +97 -0
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.stories.js +138 -0
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.style.js +21 -0
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.js +342 -0
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.stories.js +343 -0
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.style.js +30 -0
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.js +149 -0
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.stories.js +172 -0
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.style.js +24 -0
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.js +165 -0
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.stories.js +185 -0
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.style.js +20 -0
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.js +182 -0
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.stories.js +290 -0
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.style.js +30 -0
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.js +207 -0
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.stories.js +158 -0
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.style.js +20 -0
- package/dist/stories/components/TspanTooltip/TspanTooltip.js +16 -0
- package/dist/stories/components/TspanTooltip/TspanTooltip.style.js +13 -0
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.js +202 -0
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.stories.js +120 -0
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.style.js +18 -0
- package/dist/stories/components/icons/FoodLionChartIcon.js +42 -0
- package/dist/stories/components/icons/GiantFoodChartIcon.js +40 -0
- package/dist/stories/components/icons/HannafordChartIcon.js +40 -0
- package/dist/stories/components/icons/StopAndShopChartIcon.js +42 -0
- package/dist/stories/components/icons/TheGiantCompanyChartIcon.js +40 -0
- package/dist/stories/icons/ArrowDownIcon.js +27 -0
- package/dist/stories/icons/ArrowDropDownIcon.js +27 -0
- package/dist/stories/icons/ArrowSelectIcon.js +27 -0
- package/dist/stories/icons/ArrowUpIcon.js +27 -0
- package/dist/stories/icons/AttachedIcon.js +27 -0
- package/dist/stories/icons/BellIcon.js +27 -0
- package/dist/stories/icons/Calendar.js +20 -0
- package/dist/stories/icons/CalendarIcon.js +27 -0
- package/dist/stories/icons/CalendarInOpen.js +26 -0
- package/dist/stories/icons/CheckBoxButtonCheckedIcon.js +28 -0
- package/dist/stories/icons/CheckBoxCheckedIcon.js +28 -0
- package/dist/stories/icons/CheckBoxNotCheckedIcon.js +28 -0
- package/dist/stories/icons/ChervronLeftIcon.js +20 -0
- package/dist/stories/icons/ChervronRightIcon.js +20 -0
- package/dist/stories/icons/ClockIcon.js +27 -0
- package/dist/stories/icons/CloseIcon.js +27 -0
- package/dist/stories/icons/CloseXIcon.js +27 -0
- package/dist/stories/icons/ComboBoxArrowDownIcon.js +28 -0
- package/dist/stories/icons/ComboBoxArrowUpIcon.js +28 -0
- package/dist/stories/icons/DocumentIcon.js +48 -0
- package/dist/stories/icons/DownloadIcon.js +27 -0
- package/dist/stories/icons/Duplicate.js +28 -0
- package/dist/stories/icons/ErrorIcon.js +27 -0
- package/dist/stories/icons/ExitIcon.js +28 -0
- package/dist/stories/icons/ExportIcon.js +28 -0
- package/dist/stories/icons/EyeIcon.js +28 -0
- package/dist/stories/icons/FileIcon.js +27 -0
- package/dist/stories/icons/FilterIcon.js +36 -0
- package/dist/stories/icons/FlyIcon.js +28 -0
- package/dist/stories/icons/FoodLionIcon.js +3076 -0
- package/dist/stories/icons/FoodLionNewIcon.js +39 -0
- package/dist/stories/icons/GiantFoodIcon.js +1976 -0
- package/dist/stories/icons/GiantFoodIcon_new.js +42 -0
- package/dist/stories/icons/HannafordIcon.js +5017 -0
- package/dist/stories/icons/HannafordIcon_new.js +41 -0
- package/dist/stories/icons/HannafordNewIcon.js +213 -0
- package/dist/stories/icons/InfoIcon.js +28 -0
- package/dist/stories/icons/LampIcon.js +27 -0
- package/dist/stories/icons/LegendLineIcon.js +29 -0
- package/dist/stories/icons/LegendUnionIcon.js +29 -0
- package/dist/stories/icons/MaintenanceIcon.js +28 -0
- package/dist/stories/icons/MenuItemClosedIcon.js +28 -0
- package/dist/stories/icons/MenuItemOpenIcon.js +28 -0
- package/dist/stories/icons/MenuItemRightIcon.js +28 -0
- package/dist/stories/icons/MenuItemUpIcon.js +28 -0
- package/dist/stories/icons/NoDataFoundIcon.js +86 -0
- package/dist/stories/icons/OptionsIcon.js +27 -0
- package/dist/stories/icons/SearchIcon.js +27 -0
- package/dist/stories/icons/ShoppingCartIcon.js +45 -0
- package/dist/stories/icons/ShoutIcon.js +27 -0
- package/dist/stories/icons/SpotlightProductIcon.js +28 -0
- package/dist/stories/icons/StopAndShopIcon.js +134 -0
- package/dist/stories/icons/StopAndShopNewIcon.js +41 -0
- package/dist/stories/icons/SucceededIcon.js +27 -0
- package/dist/stories/icons/TheGiantCompanyIcon.js +40 -0
- package/dist/stories/icons/TheGiantCompanyNewIcon.js +39 -0
- package/dist/stories/utils/CommonFunctions.js +78 -0
- package/package.json +1 -1
- package/dist/stories/CampaignTool/PopupContent.stories.js +0 -284
- package/dist/stories/components/BannerEventBoxTest.js +0 -42
- package/dist/stories/components/FilterButton.js +0 -53
- package/dist/stories/components/FilterButton.style.js +0 -12
- package/dist/stories/components/NewInput.js +0 -33
- package/dist/stories/components/icons/TheGiantCompanyIcon_old.js +0 -1831
|
@@ -0,0 +1,90 @@
|
|
|
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 _fa = require("react-icons/fa");
|
|
10
|
+
var _InputOld = require("./InputOld.style");
|
|
11
|
+
// CustomInput.js
|
|
12
|
+
|
|
13
|
+
const InputOld = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
label,
|
|
16
|
+
value,
|
|
17
|
+
onChange,
|
|
18
|
+
borderRadius,
|
|
19
|
+
required,
|
|
20
|
+
width,
|
|
21
|
+
height,
|
|
22
|
+
placeholder,
|
|
23
|
+
disabled,
|
|
24
|
+
password,
|
|
25
|
+
defaultValue,
|
|
26
|
+
error,
|
|
27
|
+
errorMessage,
|
|
28
|
+
type,
|
|
29
|
+
borderColor,
|
|
30
|
+
// Added borderColor prop
|
|
31
|
+
textColor // Added textColor prop
|
|
32
|
+
} = _ref;
|
|
33
|
+
const [isFocused, setIsFocused] = (0, _react.useState)(false);
|
|
34
|
+
const [showPassword, setShowPassword] = (0, _react.useState)(false);
|
|
35
|
+
const handleFocus = () => {
|
|
36
|
+
setIsFocused(true);
|
|
37
|
+
};
|
|
38
|
+
const handleBlur = () => {
|
|
39
|
+
setIsFocused(false);
|
|
40
|
+
};
|
|
41
|
+
const toggleShowPassword = () => {
|
|
42
|
+
setShowPassword(!showPassword);
|
|
43
|
+
};
|
|
44
|
+
return /*#__PURE__*/_react.default.createElement(_InputOld.Container, {
|
|
45
|
+
onClick: handleFocus,
|
|
46
|
+
width: width,
|
|
47
|
+
height: height
|
|
48
|
+
}, /*#__PURE__*/_react.default.createElement(_InputOld.StyledLabel, {
|
|
49
|
+
onClick: handleFocus,
|
|
50
|
+
isFocused: isFocused,
|
|
51
|
+
hasValue: value || defaultValue,
|
|
52
|
+
disabled: disabled,
|
|
53
|
+
textColor: textColor
|
|
54
|
+
}, label, required && /*#__PURE__*/_react.default.createElement(_InputOld.RequiredIndicator, null, "*")), /*#__PURE__*/_react.default.createElement(_InputOld.StyledInput, {
|
|
55
|
+
type: password && !showPassword ? 'password' : type,
|
|
56
|
+
value: value,
|
|
57
|
+
onChange: onChange,
|
|
58
|
+
onFocus: handleFocus,
|
|
59
|
+
onBlur: handleBlur,
|
|
60
|
+
borderRadius: borderRadius,
|
|
61
|
+
width: width,
|
|
62
|
+
height: height,
|
|
63
|
+
placeholder: isFocused ? placeholder : '',
|
|
64
|
+
disabled: disabled,
|
|
65
|
+
defaultValue: defaultValue,
|
|
66
|
+
error: error,
|
|
67
|
+
borderColor: borderColor,
|
|
68
|
+
textColor: textColor
|
|
69
|
+
}), error && /*#__PURE__*/_react.default.createElement(_InputOld.ErrorLabel, null, errorMessage), password && /*#__PURE__*/_react.default.createElement(_InputOld.EyeIcon, {
|
|
70
|
+
onClick: toggleShowPassword,
|
|
71
|
+
textColor: textColor
|
|
72
|
+
}, showPassword ? /*#__PURE__*/_react.default.createElement(_fa.FaEyeSlash, null) : /*#__PURE__*/_react.default.createElement(_fa.FaEye, null)));
|
|
73
|
+
};
|
|
74
|
+
var _default = exports.default = InputOld;
|
|
75
|
+
// Adding defaultProps
|
|
76
|
+
InputOld.defaultProps = {
|
|
77
|
+
required: true,
|
|
78
|
+
width: '200%',
|
|
79
|
+
height: '50px',
|
|
80
|
+
disabled: false,
|
|
81
|
+
password: false,
|
|
82
|
+
defaultValue: '',
|
|
83
|
+
placeholder: 'Enter here..',
|
|
84
|
+
error: false,
|
|
85
|
+
errorMessage: 'Input is invalid',
|
|
86
|
+
type: 'text',
|
|
87
|
+
borderColor: '#000000',
|
|
88
|
+
// Default borderColor prop value
|
|
89
|
+
textColor: '#000000' // Default textColor prop value
|
|
90
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
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.Default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _InputOld = _interopRequireDefault(require("./InputOld"));
|
|
10
|
+
// Input.stories.js
|
|
11
|
+
// Update the path based on your actual file structure
|
|
12
|
+
var _default = exports.default = {
|
|
13
|
+
title: 'SAG Core/InputOld',
|
|
14
|
+
component: _InputOld.default,
|
|
15
|
+
tags: ['autodocs'],
|
|
16
|
+
argTypes: {
|
|
17
|
+
label: {
|
|
18
|
+
name: 'label',
|
|
19
|
+
type: {
|
|
20
|
+
name: 'string'
|
|
21
|
+
},
|
|
22
|
+
description: 'Label for the input',
|
|
23
|
+
defaultValue: {
|
|
24
|
+
summary: 'Input Label'
|
|
25
|
+
},
|
|
26
|
+
control: {
|
|
27
|
+
type: 'text'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
value: {
|
|
31
|
+
name: 'value',
|
|
32
|
+
type: {
|
|
33
|
+
name: 'string'
|
|
34
|
+
},
|
|
35
|
+
description: 'Value of the input',
|
|
36
|
+
defaultValue: {
|
|
37
|
+
summary: ''
|
|
38
|
+
},
|
|
39
|
+
control: {
|
|
40
|
+
type: 'text'
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
onChange: {
|
|
44
|
+
name: 'onChange',
|
|
45
|
+
type: {
|
|
46
|
+
name: 'function'
|
|
47
|
+
},
|
|
48
|
+
description: 'Callback function for input change',
|
|
49
|
+
defaultValue: {
|
|
50
|
+
summary: '() => {}'
|
|
51
|
+
},
|
|
52
|
+
control: {
|
|
53
|
+
type: null
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
borderRadius: {
|
|
57
|
+
name: 'borderRadius',
|
|
58
|
+
type: {
|
|
59
|
+
name: 'string'
|
|
60
|
+
},
|
|
61
|
+
description: 'Border radius of the input',
|
|
62
|
+
defaultValue: {
|
|
63
|
+
summary: ''
|
|
64
|
+
},
|
|
65
|
+
control: {
|
|
66
|
+
type: 'text'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
required: {
|
|
70
|
+
name: 'required',
|
|
71
|
+
type: {
|
|
72
|
+
name: 'boolean'
|
|
73
|
+
},
|
|
74
|
+
description: 'Indicates if the input is required',
|
|
75
|
+
defaultValue: {
|
|
76
|
+
summary: false
|
|
77
|
+
},
|
|
78
|
+
control: {
|
|
79
|
+
type: 'boolean'
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}; // Story for the default state
|
|
84
|
+
const Default = exports.Default = {
|
|
85
|
+
args: {
|
|
86
|
+
label: 'Username',
|
|
87
|
+
borderRadius: '4px',
|
|
88
|
+
required: true,
|
|
89
|
+
width: '200px',
|
|
90
|
+
height: '40px',
|
|
91
|
+
placeholder: 'Enter your username',
|
|
92
|
+
disabled: false,
|
|
93
|
+
password: false,
|
|
94
|
+
error: false,
|
|
95
|
+
errorMessage: '',
|
|
96
|
+
type: 'text',
|
|
97
|
+
borderColor: '#000000',
|
|
98
|
+
textColor: '#000000'
|
|
99
|
+
}
|
|
100
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.StyledLabel = exports.StyledInput = exports.RequiredIndicator = exports.EyeIcon = exports.ErrorLabel = exports.Container = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
11
|
+
const Container = exports.Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n margin-bottom: 20px;\n width: ", ";\n height: ", ";\n"])), props => props.width || '100%', props => props.height || '40px');
|
|
12
|
+
const StyledInput = exports.StyledInput = _styledComponents.default.input(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n padding: 10px;\n font-size: 16px;\n border: 2px solid\n ", ";\n border-radius: ", ";\n outline: none;\n width: ", ";\n height: ", ";\n transition: border-color 0.3s ease;\n box-sizing: border-box;\n color: ", ";\n cursor: ", ";\n\n &:focus {\n border-color: ", ";\n }\n"])), props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.borderColor || '#bdbdbd', props => props.borderRadius || '4px', props => props.width || '100%', props => props.height || '40px', props => props.disabled ? '#888' : props.textColor || '#333', props => props.disabled ? 'not-allowed' : 'text', props => props.disabled ? '#bdbdbd' : props.borderColor || '#1976d2');
|
|
13
|
+
const StyledLabel = exports.StyledLabel = _styledComponents.default.label(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", ";\n padding-inline-end: 5px;\n padding-inline-start: 5px;\n margin-right: 10px;\n color: ", ";\n background-color: white;\n position: absolute;\n top: ", ";\n left: 10px;\n transform: translateY(-50%);\n transition: top 0.3s ease, font-size 0.3s ease;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n"])), props => props.isFocused || props.hasValue ? '12px' : '16px', props => props.disabled ? '#888' : props.textColor || '#333', props => props.isFocused || props.hasValue ? '0px' : '50%');
|
|
14
|
+
const RequiredIndicator = exports.RequiredIndicator = _styledComponents.default.span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: red;\n margin-left: 5px;\n"])));
|
|
15
|
+
const EyeIcon = exports.EyeIcon = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: 50%;\n right: 10px;\n transform: translateY(-50%);\n cursor: pointer;\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n"])), props => props.textColor || '#888', props => props.textColor || '#333');
|
|
16
|
+
const ErrorLabel = exports.ErrorLabel = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 12px;\n color: red;\n margin-top: 5px;\n"])));
|
|
@@ -0,0 +1,313 @@
|
|
|
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.KpiFilter = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _CheckBox = require("../CheckBox/CheckBox");
|
|
10
|
+
var _CheckBoxButton = require("../CheckBoxButton/CheckBoxButton");
|
|
11
|
+
var _KpiFilter = require("./KpiFilter.style");
|
|
12
|
+
/* KpiFilter */
|
|
13
|
+
const KpiFilter = props => {
|
|
14
|
+
let {
|
|
15
|
+
height
|
|
16
|
+
} = props;
|
|
17
|
+
const {
|
|
18
|
+
width,
|
|
19
|
+
mainTitle,
|
|
20
|
+
periodTitle,
|
|
21
|
+
kpiData,
|
|
22
|
+
buttonsIconColor,
|
|
23
|
+
buttonsBorderColor,
|
|
24
|
+
buttonsTextColorChecked,
|
|
25
|
+
buttonsTextColorUnchecked,
|
|
26
|
+
buttonsBackgroundColorChecked,
|
|
27
|
+
buttonsBackgroundColorUnchecked,
|
|
28
|
+
onClick,
|
|
29
|
+
onClickPeriod,
|
|
30
|
+
selectAllIgnoreList
|
|
31
|
+
} = props;
|
|
32
|
+
const DEFAULT_PERIOD = {
|
|
33
|
+
weeks4: true,
|
|
34
|
+
weeks8: false,
|
|
35
|
+
weeks13: false
|
|
36
|
+
};
|
|
37
|
+
const [KpiDataState, setKpiDataState] = (0, _react.useState)(kpiData);
|
|
38
|
+
const [periodState, setPeriodState] = (0, _react.useState)(DEFAULT_PERIOD);
|
|
39
|
+
|
|
40
|
+
// ------------------------- CheckBox Buttons OnClick Handler - Begin ------------------
|
|
41
|
+
(0, _react.useEffect)(() => {
|
|
42
|
+
const kpiSelectedData = KpiDataState === null || KpiDataState === void 0 ? void 0 : KpiDataState.map(itemColumn => {
|
|
43
|
+
var _itemColumn$buttonsAr;
|
|
44
|
+
return (_itemColumn$buttonsAr = itemColumn.buttonsArray) === null || _itemColumn$buttonsAr === void 0 ? void 0 : _itemColumn$buttonsAr.filter(itemButton => itemButton.checked === true || itemButton.secondButtonChecked === true);
|
|
45
|
+
});
|
|
46
|
+
const kpiSelectedButtonsLabels = [];
|
|
47
|
+
for (let i = 0; i < (kpiSelectedData === null || kpiSelectedData === void 0 ? void 0 : kpiSelectedData.length); i++) {
|
|
48
|
+
for (let j = 0; j < ((_kpiSelectedData$i = kpiSelectedData[i]) === null || _kpiSelectedData$i === void 0 ? void 0 : _kpiSelectedData$i.length); j++) {
|
|
49
|
+
var _kpiSelectedData$i;
|
|
50
|
+
if (kpiSelectedData[i][j].label && kpiSelectedData[i][j].checked === true) {
|
|
51
|
+
kpiSelectedButtonsLabels.push(kpiSelectedData[i][j].label);
|
|
52
|
+
}
|
|
53
|
+
if (kpiSelectedData[i][j].secondButtonLabel && kpiSelectedData[i][j].secondButtonChecked === true) {
|
|
54
|
+
kpiSelectedButtonsLabels.push(''.concat('', kpiSelectedData[i][j].label, ':', kpiSelectedData[i][j].secondButtonLabel));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
onClick({
|
|
59
|
+
kpiSelectedButtonsLabels,
|
|
60
|
+
kpiData: KpiDataState
|
|
61
|
+
});
|
|
62
|
+
}, [KpiDataState]);
|
|
63
|
+
// ------------------------- Buttons OnClick Handler - End ------------------
|
|
64
|
+
|
|
65
|
+
const dispalyColumnButtons = function (data, height) {
|
|
66
|
+
let paddingBottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '5px';
|
|
67
|
+
if (!data || data.length === 0) return;
|
|
68
|
+
if (data && data.length > 0) {
|
|
69
|
+
return /*#__PURE__*/_react.default.createElement(_KpiFilter.ButtonsContainer, {
|
|
70
|
+
id: "ButtonsContainer",
|
|
71
|
+
height: height,
|
|
72
|
+
paddingBottom: paddingBottom
|
|
73
|
+
}, data === null || data === void 0 ? void 0 : data.map(item => {
|
|
74
|
+
var _item$marginBottom;
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement(_KpiFilter.ButtonContainer, {
|
|
76
|
+
id: "ButtonContainer",
|
|
77
|
+
className: item.marginBottom ? 'marginBottom' : '',
|
|
78
|
+
marginBottom: (_item$marginBottom = item.marginBottom) !== null && _item$marginBottom !== void 0 ? _item$marginBottom : '0px'
|
|
79
|
+
}, /*#__PURE__*/_react.default.createElement(_CheckBoxButton.CheckBoxButton, {
|
|
80
|
+
backgroundColorChecked: buttonsBackgroundColorChecked,
|
|
81
|
+
backgroundColorUnchecked: buttonsBackgroundColorUnchecked,
|
|
82
|
+
borderColor: buttonsBorderColor,
|
|
83
|
+
borderRadius: "12px",
|
|
84
|
+
checked: item.checked,
|
|
85
|
+
disabled: item.disabled,
|
|
86
|
+
fontSize: "12px",
|
|
87
|
+
height: "29px",
|
|
88
|
+
iconColor: buttonsIconColor,
|
|
89
|
+
iconSize: "12px",
|
|
90
|
+
label: item.label,
|
|
91
|
+
onClick: buttonClicked => {
|
|
92
|
+
const newDataKpi = KpiDataState === null || KpiDataState === void 0 ? void 0 : KpiDataState.map(itemColumn => {
|
|
93
|
+
var _itemColumn$buttonsAr2;
|
|
94
|
+
return {
|
|
95
|
+
...itemColumn,
|
|
96
|
+
buttonsArray: (_itemColumn$buttonsAr2 = itemColumn.buttonsArray) === null || _itemColumn$buttonsAr2 === void 0 ? void 0 : _itemColumn$buttonsAr2.map(itemButton => itemButton.label === buttonClicked.label ? {
|
|
97
|
+
...itemButton,
|
|
98
|
+
checked: buttonClicked.checked
|
|
99
|
+
} : {
|
|
100
|
+
...itemButton
|
|
101
|
+
})
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
setKpiDataState(newDataKpi);
|
|
105
|
+
},
|
|
106
|
+
textColorChecked: buttonsTextColorChecked,
|
|
107
|
+
textColorUnchecked: buttonsTextColorUnchecked,
|
|
108
|
+
width: "100%"
|
|
109
|
+
}), item.secondButtonLabel ? /*#__PURE__*/_react.default.createElement(_CheckBoxButton.CheckBoxButton, {
|
|
110
|
+
backgroundColorChecked: buttonsBackgroundColorChecked,
|
|
111
|
+
backgroundColorUnchecked: buttonsBackgroundColorUnchecked,
|
|
112
|
+
borderColor: buttonsBorderColor,
|
|
113
|
+
borderRadius: "12px",
|
|
114
|
+
checked: item.secondButtonChecked,
|
|
115
|
+
disabled: item.secondButtonDisabled,
|
|
116
|
+
fontSize: "12px",
|
|
117
|
+
height: "29px",
|
|
118
|
+
iconColor: buttonsIconColor,
|
|
119
|
+
iconSize: "12px",
|
|
120
|
+
label: ''.concat('', item.label, ':', item.secondButtonLabel),
|
|
121
|
+
displayLabel: item.secondButtonLabel,
|
|
122
|
+
onClick: buttonClicked => {
|
|
123
|
+
const newDataKpi = KpiDataState === null || KpiDataState === void 0 ? void 0 : KpiDataState.map(itemColumn => {
|
|
124
|
+
var _itemColumn$buttonsAr3;
|
|
125
|
+
return {
|
|
126
|
+
...itemColumn,
|
|
127
|
+
buttonsArray: (_itemColumn$buttonsAr3 = itemColumn.buttonsArray) === null || _itemColumn$buttonsAr3 === void 0 ? void 0 : _itemColumn$buttonsAr3.map(itemButton => ''.concat('', itemButton.label, ':', itemButton.secondButtonLabel) === buttonClicked.label ? {
|
|
128
|
+
...itemButton,
|
|
129
|
+
secondButtonChecked: buttonClicked.checked
|
|
130
|
+
} : {
|
|
131
|
+
...itemButton
|
|
132
|
+
})
|
|
133
|
+
};
|
|
134
|
+
});
|
|
135
|
+
setKpiDataState(newDataKpi);
|
|
136
|
+
},
|
|
137
|
+
textColorChecked: buttonsTextColorChecked,
|
|
138
|
+
textColorUnchecked: buttonsTextColorUnchecked,
|
|
139
|
+
width: "100%"
|
|
140
|
+
}) : '');
|
|
141
|
+
}));
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
const isIncludedInIgnoreList = label => {
|
|
145
|
+
if (selectAllIgnoreList && selectAllIgnoreList.length > 0) {
|
|
146
|
+
return selectAllIgnoreList.includes(label);
|
|
147
|
+
}
|
|
148
|
+
return false;
|
|
149
|
+
};
|
|
150
|
+
const displayMainTitle = () => /*#__PURE__*/_react.default.createElement(_KpiFilter.MainTitleContainer, {
|
|
151
|
+
id: "MainTitleContainer"
|
|
152
|
+
}, /*#__PURE__*/_react.default.createElement(_KpiFilter.MainTitle, {
|
|
153
|
+
id: "MainTitle"
|
|
154
|
+
}, mainTitle), /*#__PURE__*/_react.default.createElement(_KpiFilter.CheckBoxContainer, {
|
|
155
|
+
id: "CheckBoxContainer"
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement(_CheckBox.CheckBox, {
|
|
157
|
+
checked: false,
|
|
158
|
+
colorChecked: buttonsIconColor,
|
|
159
|
+
colorUnchecked: buttonsIconColor,
|
|
160
|
+
fontSize: "14px",
|
|
161
|
+
height: "20px",
|
|
162
|
+
width: "100%",
|
|
163
|
+
iconSize: "14px",
|
|
164
|
+
label: "Select All",
|
|
165
|
+
onClick: propsSelectAll => {
|
|
166
|
+
const newData = KpiDataState === null || KpiDataState === void 0 ? void 0 : KpiDataState.map(itemColumn => {
|
|
167
|
+
var _itemColumn$buttonsAr4;
|
|
168
|
+
return {
|
|
169
|
+
...itemColumn,
|
|
170
|
+
buttonsArray: (_itemColumn$buttonsAr4 = itemColumn.buttonsArray) === null || _itemColumn$buttonsAr4 === void 0 ? void 0 : _itemColumn$buttonsAr4.map(itemButton => ({
|
|
171
|
+
...itemButton,
|
|
172
|
+
checked: !isIncludedInIgnoreList(itemButton.label) ? propsSelectAll.checked : itemButton.checked
|
|
173
|
+
}))
|
|
174
|
+
};
|
|
175
|
+
});
|
|
176
|
+
setKpiDataState(newData);
|
|
177
|
+
}
|
|
178
|
+
})));
|
|
179
|
+
const onClickPeriodHandler = checkBox => {
|
|
180
|
+
const {
|
|
181
|
+
label,
|
|
182
|
+
checked
|
|
183
|
+
} = checkBox;
|
|
184
|
+
let newPeriod;
|
|
185
|
+
const periodCheckedArray = [];
|
|
186
|
+
switch (label) {
|
|
187
|
+
case '4 weeks':
|
|
188
|
+
newPeriod = {
|
|
189
|
+
...periodState,
|
|
190
|
+
weeks4: checked
|
|
191
|
+
};
|
|
192
|
+
break;
|
|
193
|
+
case '8 weeks':
|
|
194
|
+
newPeriod = {
|
|
195
|
+
...periodState,
|
|
196
|
+
weeks8: checked
|
|
197
|
+
};
|
|
198
|
+
break;
|
|
199
|
+
case '13 weeks':
|
|
200
|
+
newPeriod = {
|
|
201
|
+
...periodState,
|
|
202
|
+
weeks13: checked
|
|
203
|
+
};
|
|
204
|
+
break;
|
|
205
|
+
default:
|
|
206
|
+
newPeriod = {
|
|
207
|
+
...periodState
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
setPeriodState(newPeriod);
|
|
211
|
+
if (newPeriod.weeks4) periodCheckedArray.push('4 weeks');
|
|
212
|
+
if (newPeriod.weeks8) periodCheckedArray.push('8 weeks');
|
|
213
|
+
if (newPeriod.weeks13) periodCheckedArray.push('13 weeks');
|
|
214
|
+
onClickPeriod({
|
|
215
|
+
periodChecked: periodCheckedArray
|
|
216
|
+
});
|
|
217
|
+
};
|
|
218
|
+
const displayPeriod = () => /*#__PURE__*/_react.default.createElement(_KpiFilter.CheckBoxPeriodContainer, {
|
|
219
|
+
id: "CheckBoxPeriodContainer"
|
|
220
|
+
}, /*#__PURE__*/_react.default.createElement(_CheckBox.CheckBox, {
|
|
221
|
+
id: "CheckBox",
|
|
222
|
+
label: "4 weeks",
|
|
223
|
+
checked: periodState.weeks4,
|
|
224
|
+
colorChecked: buttonsIconColor,
|
|
225
|
+
colorUnchecked: buttonsIconColor,
|
|
226
|
+
fontSize: "14px",
|
|
227
|
+
height: "20px",
|
|
228
|
+
width: "100%",
|
|
229
|
+
iconSize: "14px",
|
|
230
|
+
disabled: false,
|
|
231
|
+
onClick: checkBox4Weeks => {
|
|
232
|
+
onClickPeriodHandler(checkBox4Weeks);
|
|
233
|
+
}
|
|
234
|
+
}), /*#__PURE__*/_react.default.createElement(_CheckBox.CheckBox, {
|
|
235
|
+
id: "CheckBox",
|
|
236
|
+
label: "8 weeks",
|
|
237
|
+
checked: periodState.weeks8,
|
|
238
|
+
colorChecked: buttonsIconColor,
|
|
239
|
+
colorUnchecked: buttonsIconColor,
|
|
240
|
+
fontSize: "12px",
|
|
241
|
+
height: "20px",
|
|
242
|
+
width: "100%",
|
|
243
|
+
iconSize: "14px",
|
|
244
|
+
disabled: false,
|
|
245
|
+
onClick: checkBox8Weeks => {
|
|
246
|
+
onClickPeriodHandler(checkBox8Weeks);
|
|
247
|
+
}
|
|
248
|
+
}), /*#__PURE__*/_react.default.createElement(_CheckBox.CheckBox, {
|
|
249
|
+
id: "CheckBox",
|
|
250
|
+
label: "13 weeks",
|
|
251
|
+
checked: periodState.weeks13,
|
|
252
|
+
colorChecked: buttonsIconColor,
|
|
253
|
+
colorUnchecked: buttonsIconColor,
|
|
254
|
+
fontSize: "12px",
|
|
255
|
+
height: "20px",
|
|
256
|
+
width: "100%",
|
|
257
|
+
iconSize: "14px",
|
|
258
|
+
disabled: false,
|
|
259
|
+
onClick: checkBox13Weeks => {
|
|
260
|
+
onClickPeriodHandler(checkBox13Weeks);
|
|
261
|
+
}
|
|
262
|
+
}));
|
|
263
|
+
const displayOneColumn = (item, i) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_KpiFilter.ColumnTitleAndButtonsContainer, {
|
|
264
|
+
id: "ColumnTitleAndButtonsContainer"
|
|
265
|
+
}, /*#__PURE__*/_react.default.createElement(_KpiFilter.ColumnContainer, {
|
|
266
|
+
id: "ColumnContainer"
|
|
267
|
+
}, /*#__PURE__*/_react.default.createElement(_KpiFilter.ColumnTitleContainer, {
|
|
268
|
+
id: "ColumnTitleContainer"
|
|
269
|
+
}, /*#__PURE__*/_react.default.createElement(_KpiFilter.ColumnTitle, {
|
|
270
|
+
id: "ColumnTitle"
|
|
271
|
+
}, item.columnTitle)), dispalyColumnButtons(item.buttonsArray, height = '160px', '0px'), i === (KpiDataState === null || KpiDataState === void 0 ? void 0 : KpiDataState.length) - 1 ? /*#__PURE__*/_react.default.createElement(_KpiFilter.PeriodColumnTitle, null, periodTitle) : '', i === (KpiDataState === null || KpiDataState === void 0 ? void 0 : KpiDataState.length) - 1 ? displayPeriod() : '')), item.rightBorder ? /*#__PURE__*/_react.default.createElement(_KpiFilter.ColumnLineSeporatorContainer, {
|
|
272
|
+
id: "ColumnLineSeporatorContainer"
|
|
273
|
+
}, /*#__PURE__*/_react.default.createElement(_KpiFilter.ColumnLineSeporator, {
|
|
274
|
+
id: "ColumnLineSeporator"
|
|
275
|
+
})) : '');
|
|
276
|
+
const displayColumns = () => {
|
|
277
|
+
if (KpiDataState && (KpiDataState === null || KpiDataState === void 0 ? void 0 : KpiDataState.length) > 0) {
|
|
278
|
+
return /*#__PURE__*/_react.default.createElement(_KpiFilter.AllColumnsContainer, {
|
|
279
|
+
id: "AllColumnsContainer"
|
|
280
|
+
}, KpiDataState.map((item, i) => displayOneColumn(item, i)));
|
|
281
|
+
}
|
|
282
|
+
return '';
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
//= ======================================== MAIN RETURN ====================================
|
|
286
|
+
return /*#__PURE__*/_react.default.createElement(_KpiFilter.MainContainer, {
|
|
287
|
+
id: "MainContainer",
|
|
288
|
+
height: height,
|
|
289
|
+
width: width
|
|
290
|
+
}, /*#__PURE__*/_react.default.createElement(_KpiFilter.PanelContainer, {
|
|
291
|
+
id: "PanelContainer"
|
|
292
|
+
}, displayMainTitle(), displayColumns()));
|
|
293
|
+
//= ======================================== MAIN RETURN END====================================
|
|
294
|
+
};
|
|
295
|
+
exports.KpiFilter = KpiFilter;
|
|
296
|
+
var _default = exports.default = KpiFilter;
|
|
297
|
+
KpiFilter.defaultProps = {
|
|
298
|
+
mainTitle: 'Select Table Columns',
|
|
299
|
+
periodTitle: 'Pre and Post Event Period',
|
|
300
|
+
kpiData: [],
|
|
301
|
+
width: '100%',
|
|
302
|
+
height: '100%',
|
|
303
|
+
buttonsIconColor: '#1B30AA',
|
|
304
|
+
buttonsBorderColor: '#1B30AA',
|
|
305
|
+
buttonsTextColorChecked: '#212121',
|
|
306
|
+
buttonsTextColorUnchecked: '#212121',
|
|
307
|
+
buttonsBackgroundColorChecked: '#E9F1FF',
|
|
308
|
+
buttonsBackgroundColorUnchecked: '#F2F2F2',
|
|
309
|
+
onClick: () => {},
|
|
310
|
+
// onClickIncludeBenchmark: () => {},
|
|
311
|
+
onClickPeriod: () => {},
|
|
312
|
+
selectAllIgnoreList: []
|
|
313
|
+
};
|