sag_components 2.0.0-beta26 → 2.0.0-beta28
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 +4257 -4248
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +323 -314
- 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 +3 -3
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.LinkButton = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _LinkButton = require("./LinkButton.style");
|
|
11
|
+
var _FilterIcon = require("./icons/FilterIcon");
|
|
12
|
+
var _OptionsIcon = require("./icons/OptionsIcon");
|
|
13
|
+
var _DownloadIcon = require("./icons/DownloadIcon");
|
|
14
|
+
var _DocumentIcon = require("./icons/DocumentIcon");
|
|
15
|
+
var _FlyIcon = require("./icons/FlyIcon");
|
|
16
|
+
var _BellIcon = require("./icons/BellIcon");
|
|
17
|
+
var _MaintenanceIcon = require("./icons/MaintenanceIcon");
|
|
18
|
+
var _ExitIcon = require("./icons/ExitIcon");
|
|
19
|
+
var _EyeIcon = require("./icons/EyeIcon");
|
|
20
|
+
var _MenuItemOpenIcon = require("./icons/MenuItemOpenIcon");
|
|
21
|
+
var _MenuItemRightIcon = require("./icons/MenuItemRightIcon");
|
|
22
|
+
var _ArrowSelectIcon = _interopRequireDefault(require("./icons/ArrowSelectIcon"));
|
|
23
|
+
var _InfoIcon = require("./icons/InfoIcon");
|
|
24
|
+
const LinkButton = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
text = '',
|
|
27
|
+
type = 'primary',
|
|
28
|
+
size = 'small',
|
|
29
|
+
height = '',
|
|
30
|
+
width = '',
|
|
31
|
+
disabled = false,
|
|
32
|
+
textColor = '',
|
|
33
|
+
onClick = () => {},
|
|
34
|
+
leftIcon = 'none',
|
|
35
|
+
rightIcon = 'none'
|
|
36
|
+
} = _ref;
|
|
37
|
+
// const {
|
|
38
|
+
// text,
|
|
39
|
+
// type,
|
|
40
|
+
// size,
|
|
41
|
+
// height,
|
|
42
|
+
// width,
|
|
43
|
+
// disabled,
|
|
44
|
+
// textColor,
|
|
45
|
+
// leftIcon,
|
|
46
|
+
// rightIcon,
|
|
47
|
+
// onClick,
|
|
48
|
+
// className,
|
|
49
|
+
// } = props;
|
|
50
|
+
|
|
51
|
+
const [clicked, setClicked] = (0, _react.useState)(false);
|
|
52
|
+
const handleLinkButtonClick = () => {
|
|
53
|
+
setClicked(true);
|
|
54
|
+
onClick(text);
|
|
55
|
+
setTimeout(() => {
|
|
56
|
+
setClicked(false);
|
|
57
|
+
}, 300);
|
|
58
|
+
};
|
|
59
|
+
const getIcon = icon => {
|
|
60
|
+
const iconHeight = size === 'small' ? '12px' : '13px';
|
|
61
|
+
const iconWidth = size === 'small' ? '12px' : '13px';
|
|
62
|
+
const newTextColor = textColor || (type === 'secondary' ? '#212121' : '#229E38');
|
|
63
|
+
const color = disabled ? '#B1B1B1' : newTextColor;
|
|
64
|
+
switch (icon.toLowerCase()) {
|
|
65
|
+
case 'filter':
|
|
66
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.IconWrapper, {
|
|
67
|
+
className: "FilterIcon"
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(_FilterIcon.FilterIcon, {
|
|
69
|
+
height: iconHeight,
|
|
70
|
+
width: iconWidth,
|
|
71
|
+
color: color
|
|
72
|
+
}));
|
|
73
|
+
case 'options':
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.IconWrapper, {
|
|
75
|
+
className: "OptionsIcon"
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_OptionsIcon.OptionsIcon, {
|
|
77
|
+
height: iconHeight,
|
|
78
|
+
width: iconWidth,
|
|
79
|
+
color: color
|
|
80
|
+
}));
|
|
81
|
+
case 'download':
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.IconWrapper, {
|
|
83
|
+
className: "DownloadIcon"
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement(_DownloadIcon.DownloadIcon, {
|
|
85
|
+
height: iconHeight,
|
|
86
|
+
width: iconWidth,
|
|
87
|
+
color: color
|
|
88
|
+
}));
|
|
89
|
+
case 'document':
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.IconWrapper, {
|
|
91
|
+
className: "DocumentIcon"
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement(_DocumentIcon.DocumentIcon, {
|
|
93
|
+
height: iconHeight,
|
|
94
|
+
width: iconWidth,
|
|
95
|
+
color: color
|
|
96
|
+
}));
|
|
97
|
+
case 'fly':
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.IconWrapper, {
|
|
99
|
+
className: "FlyIcon"
|
|
100
|
+
}, /*#__PURE__*/_react.default.createElement(_FlyIcon.FlyIcon, {
|
|
101
|
+
height: iconHeight,
|
|
102
|
+
width: iconWidth,
|
|
103
|
+
color: color
|
|
104
|
+
}));
|
|
105
|
+
case 'bell':
|
|
106
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.IconWrapper, {
|
|
107
|
+
className: "BellIcon"
|
|
108
|
+
}, /*#__PURE__*/_react.default.createElement(_BellIcon.BellIcon, {
|
|
109
|
+
height: iconHeight,
|
|
110
|
+
width: iconWidth,
|
|
111
|
+
color: color
|
|
112
|
+
}));
|
|
113
|
+
case 'maintenance':
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.IconWrapper, {
|
|
115
|
+
className: "MaintenanceIcon"
|
|
116
|
+
}, /*#__PURE__*/_react.default.createElement(_MaintenanceIcon.MaintenanceIcon, {
|
|
117
|
+
height: iconHeight,
|
|
118
|
+
width: iconWidth,
|
|
119
|
+
color: color
|
|
120
|
+
}));
|
|
121
|
+
case 'exit':
|
|
122
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.IconWrapper, {
|
|
123
|
+
className: "ExitIcon"
|
|
124
|
+
}, /*#__PURE__*/_react.default.createElement(_ExitIcon.ExitIcon, {
|
|
125
|
+
height: iconHeight,
|
|
126
|
+
width: iconWidth,
|
|
127
|
+
color: color
|
|
128
|
+
}));
|
|
129
|
+
case 'eye':
|
|
130
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.IconWrapper, {
|
|
131
|
+
className: "EyeIcon"
|
|
132
|
+
}, /*#__PURE__*/_react.default.createElement(_EyeIcon.EyeIcon, {
|
|
133
|
+
height: iconHeight,
|
|
134
|
+
width: iconWidth,
|
|
135
|
+
color: color
|
|
136
|
+
}));
|
|
137
|
+
case 'arrowdown':
|
|
138
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.IconWrapper, {
|
|
139
|
+
className: "ArrowDownIcon"
|
|
140
|
+
}, /*#__PURE__*/_react.default.createElement(_MenuItemOpenIcon.MenuItemOpenIcon, {
|
|
141
|
+
height: iconHeight,
|
|
142
|
+
width: iconWidth,
|
|
143
|
+
color: color
|
|
144
|
+
}));
|
|
145
|
+
case 'arrowright':
|
|
146
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.IconWrapper, {
|
|
147
|
+
className: "ArrowRightIcon"
|
|
148
|
+
}, /*#__PURE__*/_react.default.createElement(_MenuItemRightIcon.MenuItemRightIcon, {
|
|
149
|
+
height: iconHeight,
|
|
150
|
+
width: iconWidth,
|
|
151
|
+
color: color
|
|
152
|
+
}));
|
|
153
|
+
case 'select':
|
|
154
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.IconWrapper, {
|
|
155
|
+
className: "SelectRightIcon"
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement(_ArrowSelectIcon.default, {
|
|
157
|
+
height: "16px",
|
|
158
|
+
width: "16px",
|
|
159
|
+
color: color
|
|
160
|
+
}));
|
|
161
|
+
case 'info':
|
|
162
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.IconWrapper, {
|
|
163
|
+
className: "InfoIcon"
|
|
164
|
+
}, /*#__PURE__*/_react.default.createElement(_InfoIcon.InfoIcon, {
|
|
165
|
+
height: iconHeight,
|
|
166
|
+
width: iconWidth,
|
|
167
|
+
color: color
|
|
168
|
+
}));
|
|
169
|
+
default:
|
|
170
|
+
return '';
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
const getLeftIcon = () => {
|
|
174
|
+
if (!leftIcon || leftIcon === 'none') return '';
|
|
175
|
+
return getIcon(leftIcon);
|
|
176
|
+
};
|
|
177
|
+
const getRightIcon = () => {
|
|
178
|
+
if (!rightIcon || rightIcon === 'none') return '';
|
|
179
|
+
return getIcon(rightIcon);
|
|
180
|
+
};
|
|
181
|
+
return /*#__PURE__*/_react.default.createElement(_LinkButton.LinkButtonContainer, {
|
|
182
|
+
className: "LinkButtonContainer",
|
|
183
|
+
width: width || null,
|
|
184
|
+
height: height || '20px'
|
|
185
|
+
}, /*#__PURE__*/_react.default.createElement(_LinkButton.LinkButtonItem, {
|
|
186
|
+
className: clicked ? 'LinkButtonItem-clicked' : 'LinkButtonItem',
|
|
187
|
+
onClick: !disabled ? handleLinkButtonClick : null,
|
|
188
|
+
width: width || null,
|
|
189
|
+
height: height || '20px',
|
|
190
|
+
disabled: disabled,
|
|
191
|
+
text_color: textColor || (type === 'secondary' ? '#212121' : '#229E38'),
|
|
192
|
+
font_size: size === 'small' ? '14px' : '16px'
|
|
193
|
+
}, getLeftIcon(), /*#__PURE__*/_react.default.createElement(_LinkButton.Label, {
|
|
194
|
+
className: "Label",
|
|
195
|
+
disabled: disabled,
|
|
196
|
+
font_size: size === 'small' ? '14px' : '16px'
|
|
197
|
+
}, text), getRightIcon()));
|
|
198
|
+
};
|
|
199
|
+
exports.LinkButton = LinkButton;
|
|
200
|
+
var _default = exports.default = LinkButton; // LinkButton.propTypes = {
|
|
201
|
+
// text: PropTypes.string,
|
|
202
|
+
// type: PropTypes.string,
|
|
203
|
+
// size: PropTypes.string,
|
|
204
|
+
// height: PropTypes.string,
|
|
205
|
+
// width: PropTypes.string,
|
|
206
|
+
// disabled: PropTypes.bool,
|
|
207
|
+
// textColor: PropTypes.string,
|
|
208
|
+
// onClick: PropTypes.func,
|
|
209
|
+
// leftIcon: PropTypes.string,
|
|
210
|
+
// rightIcon: PropTypes.string,
|
|
211
|
+
// className: PropTypes.string,
|
|
212
|
+
// };
|
|
213
|
+
// LinkButton.defaultProps = {
|
|
214
|
+
// text: '',
|
|
215
|
+
// type: 'primary',
|
|
216
|
+
// size: 'small',
|
|
217
|
+
// height: '',
|
|
218
|
+
// width: '',
|
|
219
|
+
// disabled: false,
|
|
220
|
+
// textColor: '',
|
|
221
|
+
// onClick: () => {},
|
|
222
|
+
// leftIcon: 'none',
|
|
223
|
+
// rightIcon: 'none',
|
|
224
|
+
// className: '',
|
|
225
|
+
// };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.LinkButtonItem = exports.LinkButtonContainer = exports.Label = exports.IconWrapper = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
const LinkButtonContainer = exports.LinkButtonContainer = _styledComponents.default.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-content: center;
|
|
14
|
+
width: ${props => props.width};
|
|
15
|
+
height: ${props => props.height};
|
|
16
|
+
`;
|
|
17
|
+
const LinkButtonItem = exports.LinkButtonItem = _styledComponents.default.div`
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
align-content: center;
|
|
22
|
+
flex-wrap: nowrap;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
width: ${props => props.width};
|
|
25
|
+
height: ${props => props.height};
|
|
26
|
+
color: ${props => props.disabled ? '#B1B1B1' : props.text_color};
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
gap: 8px;
|
|
29
|
+
padding: 0 4px;
|
|
30
|
+
font-size: ${props => props.font_size};
|
|
31
|
+
font-family: 'Poppins';
|
|
32
|
+
font-style: normal;
|
|
33
|
+
font-weight: 400;
|
|
34
|
+
&:hover {
|
|
35
|
+
color: ${props => props.disabled ? '#B1B1B1' : props.text_color};
|
|
36
|
+
text-decoration: ${props => props.disabled ? '' : 'underline'};
|
|
37
|
+
cursor: ${props => !props.disabled ? 'pointer' : 'default'};
|
|
38
|
+
}
|
|
39
|
+
&.LinkButtonItem-clicked {
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
transition: background-color 0.3s, color 0.3s;
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
const Label = exports.Label = _styledComponents.default.label`
|
|
45
|
+
user-select: none;
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
`;
|
|
48
|
+
const IconWrapper = exports.IconWrapper = _styledComponents.default.div`
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-content: center;
|
|
53
|
+
`;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.LinnerDataBox = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _LinnerDataBox = require("./LinnerDataBox.style");
|
|
10
|
+
var _CommonFunctions = require("./CommonFunctions");
|
|
11
|
+
/* eslint-disable no-restricted-globals */
|
|
12
|
+
|
|
13
|
+
const LinnerDataBox = props => {
|
|
14
|
+
const {
|
|
15
|
+
width,
|
|
16
|
+
height,
|
|
17
|
+
data,
|
|
18
|
+
backgroundColor,
|
|
19
|
+
className,
|
|
20
|
+
customDataFormat
|
|
21
|
+
} = props;
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_LinnerDataBox.LinnerContainer, {
|
|
23
|
+
className: className,
|
|
24
|
+
backgroundColor: backgroundColor,
|
|
25
|
+
width: width || "100%",
|
|
26
|
+
height: height || "200px",
|
|
27
|
+
customDataFormat: customDataFormat
|
|
28
|
+
}, data.map((item, index) => /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxWrap, {
|
|
29
|
+
key: `${item.title}`,
|
|
30
|
+
width: `${100 / data.length}%`
|
|
31
|
+
}, /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBox, null, item.title && /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxTitle, {
|
|
32
|
+
className: "DataBoxTitle"
|
|
33
|
+
}, item.title), /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxContent, null, item.value !== null && item.value !== undefined && !isNaN(item.value) && item.value !== "null" && item.value !== "undefined" ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, item.sign && /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxContentSign, null, item.sign), customDataFormat ? /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxContentValue, {
|
|
34
|
+
className: "DataBoxValue"
|
|
35
|
+
}, "".concat((0, _CommonFunctions.formattedValue)(item.value), (0, _CommonFunctions.getFormattedUnits)(item.value))) : /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxContentValue, null, "".concat((0, _CommonFunctions.getFormattedValue)(item.value), (0, _CommonFunctions.getFormattedUnits)(item.value)))) : /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxContentNoValue, null, "No Data")), item.extraInfo.map(extraInfoItem => /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxExtraInfoCell, null, extraInfoItem.value !== null && extraInfoItem.value !== undefined && /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxExtraInfoCellValue, null, "".concat("$", (0, _CommonFunctions.getFormattedValue)(extraInfoItem.value), (0, _CommonFunctions.getFormattedUnits)(extraInfoItem.value))), extraInfoItem.value !== null && extraInfoItem.value !== undefined && /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxExtraInfoCellTitle, null, extraInfoItem.title)))), index < data.length - 1 && /*#__PURE__*/_react.default.createElement("div", {
|
|
36
|
+
className: "vertival-line",
|
|
37
|
+
style: {
|
|
38
|
+
width: "1px",
|
|
39
|
+
minHeight: "100px",
|
|
40
|
+
height: "100%",
|
|
41
|
+
backgroundColor: "#D0D0D0"
|
|
42
|
+
}
|
|
43
|
+
}))));
|
|
44
|
+
};
|
|
45
|
+
exports.LinnerDataBox = LinnerDataBox;
|
|
46
|
+
var _default = exports.default = LinnerDataBox;
|
|
47
|
+
LinnerDataBox.defaultProps = {
|
|
48
|
+
className: "",
|
|
49
|
+
width: "100%",
|
|
50
|
+
height: "auto",
|
|
51
|
+
data: [],
|
|
52
|
+
backgroundColor: "#FFFFFF",
|
|
53
|
+
customDataFormat: false
|
|
54
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.LinnerContainer = exports.DataBoxWrap = exports.DataBoxTitle = exports.DataBoxExtraInfoCellValue = exports.DataBoxExtraInfoCellTitle = exports.DataBoxExtraInfoCell = exports.DataBoxExtraInfo = exports.DataBoxContentValue = exports.DataBoxContentSign = exports.DataBoxContentNoValue = exports.DataBoxContent = exports.DataBox = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
const LinnerContainer = exports.LinnerContainer = _styledComponents.default.div`
|
|
10
|
+
font-family: "Poppins", sans-serif;
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
width: ${props => props.width};
|
|
14
|
+
height: ${props => props.height};
|
|
15
|
+
background-color: ${props => props.backgroundColor};
|
|
16
|
+
padding: 50px 40px 30px;
|
|
17
|
+
`;
|
|
18
|
+
const DataBoxWrap = exports.DataBoxWrap = _styledComponents.default.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
gap: 10px;
|
|
21
|
+
justify-content: space-around;
|
|
22
|
+
align-items: stretch;
|
|
23
|
+
width: ${props => props.width};
|
|
24
|
+
height: 100%;
|
|
25
|
+
`;
|
|
26
|
+
const DataBox = exports.DataBox = _styledComponents.default.div`
|
|
27
|
+
color: #212121;
|
|
28
|
+
font-weight: 400;
|
|
29
|
+
`;
|
|
30
|
+
const DataBoxTitle = exports.DataBoxTitle = _styledComponents.default.span`
|
|
31
|
+
font-size: 18px;
|
|
32
|
+
font-weight: 500;
|
|
33
|
+
`;
|
|
34
|
+
const DataBoxContent = exports.DataBoxContent = _styledComponents.default.div`
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: baseline;
|
|
37
|
+
`;
|
|
38
|
+
const DataBoxContentSign = exports.DataBoxContentSign = _styledComponents.default.span`
|
|
39
|
+
font-size: 18px;
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
`;
|
|
42
|
+
const DataBoxContentValue = exports.DataBoxContentValue = _styledComponents.default.span`
|
|
43
|
+
font-size: 40px;
|
|
44
|
+
font-weight: 500;
|
|
45
|
+
`;
|
|
46
|
+
const DataBoxContentNoValue = exports.DataBoxContentNoValue = _styledComponents.default.span`
|
|
47
|
+
font-size: 18px;
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
margin: 20px auto 0;
|
|
50
|
+
`;
|
|
51
|
+
const DataBoxExtraInfo = exports.DataBoxExtraInfo = _styledComponents.default.div`
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
`;
|
|
55
|
+
const DataBoxExtraInfoCell = exports.DataBoxExtraInfoCell = _styledComponents.default.div`
|
|
56
|
+
display: flex;
|
|
57
|
+
gap: 5px;
|
|
58
|
+
`;
|
|
59
|
+
const DataBoxExtraInfoCellTitle = exports.DataBoxExtraInfoCellTitle = _styledComponents.default.div`
|
|
60
|
+
color: #999;
|
|
61
|
+
font-size: 12px;
|
|
62
|
+
text-transform: uppercase;
|
|
63
|
+
`;
|
|
64
|
+
const DataBoxExtraInfoCellValue = exports.DataBoxExtraInfoCellValue = _styledComponents.default.div`
|
|
65
|
+
color: #999;
|
|
66
|
+
font-size: 12px;
|
|
67
|
+
text-transform: uppercase;
|
|
68
|
+
`;
|
|
@@ -0,0 +1,82 @@
|
|
|
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.ListBox = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _CheckBoxButton = require("./CheckBoxButton");
|
|
10
|
+
var _ListBox = require("./ListBox.style");
|
|
11
|
+
/* ListBox */
|
|
12
|
+
const ListBox = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
data,
|
|
15
|
+
width = '100%',
|
|
16
|
+
height = '100%',
|
|
17
|
+
borderColor = '#B1B1B1',
|
|
18
|
+
buttonsIconColor = '#1B30AA',
|
|
19
|
+
buttonsBorderColor = '#1B30AA',
|
|
20
|
+
buttonsTextColorChecked = '#212121',
|
|
21
|
+
buttonsTextColorUnchecked = '#212121',
|
|
22
|
+
buttonsBackgroundColorChecked = '#1B30AA',
|
|
23
|
+
buttonsBackgroundColorUnchecked = '#FFF',
|
|
24
|
+
onClick,
|
|
25
|
+
...props
|
|
26
|
+
} = _ref;
|
|
27
|
+
const [dataState, setDataState] = (0, _react.useState)(data);
|
|
28
|
+
(0, _react.useEffect)(() => {
|
|
29
|
+
const selectedData = dataState === null || dataState === void 0 ? void 0 : dataState.filter(item => item.checked === true);
|
|
30
|
+
onClick({
|
|
31
|
+
data: dataState,
|
|
32
|
+
selectedData
|
|
33
|
+
});
|
|
34
|
+
}, [dataState]);
|
|
35
|
+
const dispalyButtons = function (data, height) {
|
|
36
|
+
let paddingBottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '5px';
|
|
37
|
+
if (data && data.length > 0) {
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement(_ListBox.ButtonsContainer, {
|
|
39
|
+
id: "ButtonsContainer",
|
|
40
|
+
height: height,
|
|
41
|
+
paddingBottom: paddingBottom
|
|
42
|
+
}, data === null || data === void 0 ? void 0 : data.map(item => /*#__PURE__*/_react.default.createElement(_ListBox.ButtonContainer, {
|
|
43
|
+
id: "ButtonContainer"
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement(_CheckBoxButton.CheckBoxButton, {
|
|
45
|
+
backgroundColorChecked: buttonsBackgroundColorChecked,
|
|
46
|
+
backgroundColorUnchecked: buttonsBackgroundColorUnchecked,
|
|
47
|
+
borderColor: buttonsBorderColor,
|
|
48
|
+
borderRadius: "12px",
|
|
49
|
+
checked: item.checked,
|
|
50
|
+
disabled: item.disabled,
|
|
51
|
+
showIconInCheckBoxButtons: false,
|
|
52
|
+
fontSize: "14px",
|
|
53
|
+
height: "19px",
|
|
54
|
+
iconColor: buttonsIconColor,
|
|
55
|
+
iconSize: "12px",
|
|
56
|
+
label: item.label,
|
|
57
|
+
onClick: props => {
|
|
58
|
+
const newData = dataState === null || dataState === void 0 ? void 0 : dataState.map(item => item.label === props.label ? {
|
|
59
|
+
...item,
|
|
60
|
+
checked: props.checked
|
|
61
|
+
} : {
|
|
62
|
+
...item
|
|
63
|
+
});
|
|
64
|
+
setDataState(newData);
|
|
65
|
+
},
|
|
66
|
+
textColorChecked: buttonsTextColorChecked,
|
|
67
|
+
textColorUnchecked: buttonsTextColorUnchecked,
|
|
68
|
+
width: "100%"
|
|
69
|
+
}))));
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement(_ListBox.MainContainer, {
|
|
73
|
+
id: "MainContainer",
|
|
74
|
+
height: height,
|
|
75
|
+
width: width
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_ListBox.PanelContainer, {
|
|
77
|
+
id: "PanelContainer",
|
|
78
|
+
borderColor: borderColor
|
|
79
|
+
}, dispalyButtons(dataState, height = '50px', '0')));
|
|
80
|
+
};
|
|
81
|
+
exports.ListBox = ListBox;
|
|
82
|
+
var _default = exports.default = ListBox;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.PanelContainer = exports.MainContainer = exports.ButtonsContainer = exports.ButtonContainer = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
const MainContainer = exports.MainContainer = _styledComponents.default.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
position: relative;
|
|
12
|
+
font-family: "Poppins", sans-serif;
|
|
13
|
+
font-style: normal;
|
|
14
|
+
font-size: 1rem;
|
|
15
|
+
border-radius: 12px;
|
|
16
|
+
width: ${props => props.width};
|
|
17
|
+
height: ${props => props.height};
|
|
18
|
+
`;
|
|
19
|
+
const PanelContainer = exports.PanelContainer = _styledComponents.default.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
align-content: center;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: space-around;
|
|
25
|
+
border: 1px solid ${props => props.borderColor};
|
|
26
|
+
border-radius: 12px;
|
|
27
|
+
background: #ffffff;
|
|
28
|
+
padding: 0.1rem;
|
|
29
|
+
font-weight: 400;
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
line-height: 19px;
|
|
32
|
+
white-space: pre-wrap;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
width: 100%;
|
|
35
|
+
`;
|
|
36
|
+
const ButtonsContainer = exports.ButtonsContainer = _styledComponents.default.div`
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
//flex-wrap: wrap;
|
|
40
|
+
width: 100%;
|
|
41
|
+
padding-bottom: ${props => props.paddingBottom};
|
|
42
|
+
`;
|
|
43
|
+
const ButtonContainer = exports.ButtonContainer = _styledComponents.default.div`
|
|
44
|
+
/* display: flex; */
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
margin: 0;
|
|
47
|
+
padding: 6px;
|
|
48
|
+
`;
|
|
@@ -0,0 +1,109 @@
|
|
|
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.MarketShareDescription = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _LampIcon = require("./icons/LampIcon");
|
|
10
|
+
var _ExportIcon = _interopRequireDefault(require("./icons/ExportIcon"));
|
|
11
|
+
var _MarketShareDescription = require("./MarketShareDescription.style");
|
|
12
|
+
var _CommonFunctions = require("./CommonFunctions");
|
|
13
|
+
const MarketShareDescription = props => {
|
|
14
|
+
const {
|
|
15
|
+
width,
|
|
16
|
+
height,
|
|
17
|
+
marketShareData,
|
|
18
|
+
iconColor,
|
|
19
|
+
onBannerClick,
|
|
20
|
+
dotCut
|
|
21
|
+
} = props;
|
|
22
|
+
const displayField = dataItem => {
|
|
23
|
+
var _dataItem$value;
|
|
24
|
+
const content = /*#__PURE__*/_react.default.createElement(_MarketShareDescription.FieldTitleAndValueSubContainer, {
|
|
25
|
+
className: "FieldTitleAndValueSubContainer"
|
|
26
|
+
}, /*#__PURE__*/_react.default.createElement(_MarketShareDescription.FieldTitle, {
|
|
27
|
+
className: "FieldTitle"
|
|
28
|
+
}, dataItem.label), /*#__PURE__*/_react.default.createElement(_MarketShareDescription.FormattedValue, {
|
|
29
|
+
className: "FormattedValue"
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement(_MarketShareDescription.TextBeforeAndAfterValue, {
|
|
31
|
+
className: "TextBeforeAndAfterValue"
|
|
32
|
+
}, dataItem.textBefore), dotCut ? (0, _CommonFunctions.getFormattedValue)(dataItem.value && Math.abs(dataItem.value) > 0 && dataItem.value % 1 !== 0 ? (_dataItem$value = dataItem.value) === null || _dataItem$value === void 0 ? void 0 : _dataItem$value.toFixed(2) : dataItem.value) : (0, _CommonFunctions.getNumberWithCommas)(dataItem.value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(dataItem.value) : '', /*#__PURE__*/_react.default.createElement(_MarketShareDescription.TextBeforeAndAfterValue, null, dataItem.textAfter)));
|
|
33
|
+
return content;
|
|
34
|
+
};
|
|
35
|
+
const dispalyRowFields = data => {
|
|
36
|
+
if (!data && !data.length > 0) return '';
|
|
37
|
+
const content = /*#__PURE__*/_react.default.createElement(_MarketShareDescription.FieldsContainer, {
|
|
38
|
+
className: "FieldsContainer",
|
|
39
|
+
height: "160px"
|
|
40
|
+
}, data === null || data === void 0 ? void 0 : data.map((item, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_MarketShareDescription.OneFieldsContainer, {
|
|
41
|
+
className: "OneFieldsContainer",
|
|
42
|
+
padding: index === 0 ? '0px' : '0 0 0 40px'
|
|
43
|
+
}, displayField(item)), (data === null || data === void 0 ? void 0 : data.length) !== index + 1 ? /*#__PURE__*/_react.default.createElement(_MarketShareDescription.ColumnLineSeporatorContainer, {
|
|
44
|
+
className: "ColumnLineSeporatorContainer_vertical"
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement(_MarketShareDescription.ColumnLineSeporator, {
|
|
46
|
+
className: "ColumnLineSeporator"
|
|
47
|
+
})) : '')));
|
|
48
|
+
return content;
|
|
49
|
+
};
|
|
50
|
+
const displayRows = () => {
|
|
51
|
+
if (!marketShareData || (marketShareData === null || marketShareData === void 0 ? void 0 : marketShareData.length) === 0) return '';
|
|
52
|
+
const content = /*#__PURE__*/_react.default.createElement(_MarketShareDescription.AllRowsContainer, {
|
|
53
|
+
className: "AllRowsContainer"
|
|
54
|
+
}, marketShareData.map((item, index) => {
|
|
55
|
+
var _item$rowFooter;
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_MarketShareDescription.OneRowContainer, {
|
|
57
|
+
className: "OneRowContainer"
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement(_MarketShareDescription.RowTitle, {
|
|
59
|
+
className: "RowTitle"
|
|
60
|
+
}, /*#__PURE__*/_react.default.createElement(_MarketShareDescription.InfoTextLabel, {
|
|
61
|
+
className: "InfoTextLabel",
|
|
62
|
+
dangerouslySetInnerHTML: {
|
|
63
|
+
__html: item.rowTitle
|
|
64
|
+
}
|
|
65
|
+
}), item.showBanner && /*#__PURE__*/_react.default.createElement(_MarketShareDescription.OutBanner, {
|
|
66
|
+
className: "OutBanner",
|
|
67
|
+
onClick: () => onBannerClick({
|
|
68
|
+
eventName: 'onBannerClick',
|
|
69
|
+
rowName: item.name
|
|
70
|
+
})
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement(_ExportIcon.default, {
|
|
72
|
+
color: "#212121"
|
|
73
|
+
}), "View By Banner")), dispalyRowFields(item.fieldsArray), /*#__PURE__*/_react.default.createElement(_MarketShareDescription.InfoTextContainer, {
|
|
74
|
+
className: "InfoTextContainer"
|
|
75
|
+
}, item.rowFooter && ((_item$rowFooter = item.rowFooter) === null || _item$rowFooter === void 0 ? void 0 : _item$rowFooter.length) > 0 ? /*#__PURE__*/_react.default.createElement(_MarketShareDescription.IconContainer, {
|
|
76
|
+
className: "IconContainer"
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_LampIcon.LampIcon, {
|
|
78
|
+
width: "23px",
|
|
79
|
+
height: "19px",
|
|
80
|
+
fill: iconColor
|
|
81
|
+
})) : '', /*#__PURE__*/_react.default.createElement(_MarketShareDescription.InfoTextLabel, {
|
|
82
|
+
className: "InfoTextLabel",
|
|
83
|
+
dangerouslySetInnerHTML: {
|
|
84
|
+
__html: item.rowFooter
|
|
85
|
+
}
|
|
86
|
+
}))), (marketShareData === null || marketShareData === void 0 ? void 0 : marketShareData.length) !== index + 1 ? /*#__PURE__*/_react.default.createElement(_MarketShareDescription.ColumnLineSeporatorContainer, {
|
|
87
|
+
className: "ColumnLineSeporatorContainer_horizontal"
|
|
88
|
+
}, /*#__PURE__*/_react.default.createElement(_MarketShareDescription.ColumnLineSeporator, {
|
|
89
|
+
className: "ColumnLineSeporator"
|
|
90
|
+
})) : '');
|
|
91
|
+
}));
|
|
92
|
+
return content;
|
|
93
|
+
};
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement(_MarketShareDescription.MainContainer, {
|
|
95
|
+
className: "MainContainer",
|
|
96
|
+
height: height,
|
|
97
|
+
width: width
|
|
98
|
+
}, displayRows());
|
|
99
|
+
};
|
|
100
|
+
exports.MarketShareDescription = MarketShareDescription;
|
|
101
|
+
var _default = exports.default = MarketShareDescription;
|
|
102
|
+
MarketShareDescription.defaultProps = {
|
|
103
|
+
marketShareData: [],
|
|
104
|
+
width: '100%',
|
|
105
|
+
height: '100%',
|
|
106
|
+
iconColor: '#1B30AA',
|
|
107
|
+
onBannerClick: () => {},
|
|
108
|
+
dotCut: false
|
|
109
|
+
};
|