sag_components 2.0.0-beta27 → 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 +6300 -4636
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2365 -702
- package/dist/index.js.map +1 -1
- package/dist/setupTests.js +15 -0
- package/dist/stories/AttachedFile.stories.js +37 -0
- package/dist/stories/AutocompleteField.stories.js +25 -0
- package/dist/stories/BannerEventBox.stories.js +59 -0
- package/dist/stories/BannerEventBoxList.stories.js +39 -0
- package/dist/stories/BannerEventBoxTest.stories.js +27 -0
- package/dist/stories/BannersDropdown.stories.js +64 -0
- package/dist/stories/BarChart.stories.js +306 -0
- package/dist/stories/BarChartTwoRows.stories.js +259 -0
- package/dist/stories/BarChartWithAreaChart.stories.js +134 -0
- package/dist/stories/BarChartsByWeeks.stories.js +445 -0
- package/dist/stories/Benchmark.stories.js +147 -0
- package/dist/stories/Button.stories.js +255 -0
- package/dist/stories/CampaignDemoReport.stories.js +65 -0
- package/dist/stories/CampaignTool/Card.stories.js +92 -0
- package/dist/stories/CampaignTool/MultipleCard.stories.js +33 -0
- package/dist/stories/CampaignTool/PageFilterBar.stories.js +28 -0
- package/dist/stories/CampaignTool/Popup.stories.js +697 -0
- package/dist/stories/CampaignTool/PopupContent.stories.js +284 -0
- package/dist/stories/CampaignTool/Table.stories.js +104 -0
- package/dist/stories/CheckBox.stories.js +107 -0
- package/dist/stories/CheckBoxButton.stories.js +150 -0
- package/dist/stories/CollapseData.stories.js +125 -0
- package/dist/stories/CollapseHeader.stories.js +123 -0
- package/dist/stories/CollapseMenuItem.stories.js +134 -0
- package/dist/stories/Datepicker.stories.js +85 -0
- package/dist/stories/DialogOverlay.stories.js +39 -0
- package/dist/stories/DoublePanelDataRow.stories.js +116 -0
- package/dist/stories/DownloadProgress.stories.js +109 -0
- package/dist/stories/Dropdown.stories.js +318 -0
- package/dist/stories/DropdownMulti.stories.js +220 -0
- package/dist/stories/DropdownNew.stories.js +407 -0
- package/dist/stories/EventDetailsCard.stories.js +122 -0
- package/dist/stories/EventList.stories.js +84 -0
- package/dist/stories/EventListItem.stories.js +65 -0
- package/dist/stories/FilterButton.stories.js +90 -0
- package/dist/stories/FilterContainer.stories.js +22 -0
- package/dist/stories/FilterPanel.stories.js +967 -0
- package/dist/stories/FormattedValue.stories.js +183 -0
- package/dist/stories/Heatmap.stories.js +118 -0
- package/dist/stories/IconButton.stories.js +126 -0
- package/dist/stories/Input.stories.js +422 -0
- package/dist/stories/InputOld.stories.js +103 -0
- package/dist/stories/KpiFilter.stories.js +401 -0
- package/dist/stories/LinkButton.stories.js +171 -0
- package/dist/stories/LinnerDataBox.stories.js +79 -0
- package/dist/stories/ListBox.stories.js +132 -0
- package/dist/stories/MarketShareDescription.stories.js +196 -0
- package/dist/stories/MonthPicker.stories.js +142 -0
- package/dist/stories/NewInput.stories.js +37 -0
- package/dist/stories/NoDataFoundMessage.stories.js +66 -0
- package/dist/stories/OneColumnContainer.stories.js +119 -0
- package/dist/stories/PerformanceAnalytics.stories.js +263 -0
- package/dist/stories/PerformanceAnalyticsLegend.stories.js +99 -0
- package/dist/stories/PerformanceAnalyticsOneColumn.stories.js +236 -0
- package/dist/stories/PerformanceAnalyticsTotals.stories.js +109 -0
- package/dist/stories/PieChart.stories.js +215 -0
- package/dist/stories/PopupCharts.stories.js +1191 -0
- package/dist/stories/ProductsVariety.stories.js +90 -0
- package/dist/stories/ProgressBar.stories.js +71 -0
- package/dist/stories/QuarterPicker.stories.js +142 -0
- package/dist/stories/QuickFilter.stories.js +275 -0
- package/dist/stories/RangePicker.stories.js +140 -0
- package/dist/stories/ReportTable.stories.js +255 -0
- package/dist/stories/SagButton.stories.js +118 -0
- package/dist/stories/SagIconButton.stories.js +122 -0
- package/dist/stories/SagInput.stories.js +69 -0
- package/dist/stories/SalesAndROI.stories.js +166 -0
- package/dist/stories/SalesSplit.stories.js +122 -0
- package/dist/stories/SearchInput.stories.js +44 -0
- package/dist/stories/SegmentedButton.stories.js +181 -0
- package/dist/stories/Select.stories.js +201 -0
- package/dist/stories/SingleBarLineCharts.stories.js +310 -0
- package/dist/stories/TabMenu.stories.js +224 -0
- package/dist/stories/TextField.stories.js +160 -0
- package/dist/stories/TitleDescription.stories.js +116 -0
- package/dist/stories/TopToggleList.stories.js +52 -0
- package/dist/stories/TotalBenchmark.stories.js +135 -0
- package/dist/stories/TotalBenchmarkAreachart.stories.js +341 -0
- package/dist/stories/TotalBenchmarkArrows.stories.js +170 -0
- package/dist/stories/TotalBenchmarkBarchart.stories.js +183 -0
- package/dist/stories/TotalDoughnutChart.stories.js +301 -0
- package/dist/stories/TotalHorizontalCharts.stories.js +291 -0
- package/dist/stories/TwoBarCharts.stories.js +185 -0
- package/dist/stories/components/AttachedFile.js +60 -0
- package/dist/stories/components/AttachedFile.style.js +48 -0
- package/dist/stories/components/AutocompleteField.js +40 -0
- package/dist/stories/components/AutocompleteField.style.js +55 -0
- package/dist/stories/components/BannerEventBox.js +97 -0
- package/dist/stories/components/BannerEventBox.style.js +78 -0
- package/dist/stories/components/BannerEventBoxList.js +153 -0
- package/dist/stories/components/BannerEventBoxList.style.js +189 -0
- package/dist/stories/components/BannerEventBoxTest.js +42 -0
- package/dist/stories/components/BannerEventBoxTest.style.js +11 -0
- package/dist/stories/components/BannersDropdown.js +119 -0
- package/dist/stories/components/BannersDropdown.style.js +99 -0
- package/dist/stories/components/BarChart.js +258 -0
- package/dist/stories/components/BarChart.style.js +60 -0
- package/dist/stories/components/BarChartTwoRows.js +220 -0
- package/dist/stories/components/BarChartTwoRows.style.js +79 -0
- package/dist/stories/components/BarChartWithAreaChart.js +268 -0
- package/dist/stories/components/BarChartWithAreaChart.style.js +67 -0
- package/dist/stories/components/BarChartsByWeeks.js +306 -0
- package/dist/stories/components/BarChartsByWeeks.style.js +96 -0
- package/dist/stories/components/Benchmark.js +130 -0
- package/dist/stories/components/Benchmark.style.js +61 -0
- package/dist/stories/components/Button.js +255 -0
- package/dist/stories/components/Button.style.js +90 -0
- package/dist/stories/components/CampaignTool/CampaignDemoReport.js +48 -0
- package/dist/stories/components/CampaignTool/CampaignDemoReport.style.js +48 -0
- package/dist/stories/components/CampaignTool/Card.js +72 -0
- package/dist/stories/components/CampaignTool/Card.style.js +65 -0
- package/dist/stories/components/CampaignTool/FormInput.js +41 -0
- package/dist/stories/components/CampaignTool/FormSelect.js +42 -0
- package/dist/stories/components/CampaignTool/MultipleCard.js +26 -0
- package/dist/stories/components/CampaignTool/MultipleCard.style.js +13 -0
- package/dist/stories/components/CampaignTool/PageFilterBar.js +23 -0
- package/dist/stories/components/CampaignTool/PageFilterBar.style.js +22 -0
- package/dist/stories/components/CampaignTool/Popup.js +172 -0
- package/dist/stories/components/CampaignTool/Popup.style.js +122 -0
- package/dist/stories/components/CampaignTool/PopupContent.js +111 -0
- package/dist/stories/components/CampaignTool/PopupContent.style.js +74 -0
- package/dist/stories/components/CampaignTool/PopupFieldsRules.js +168 -0
- package/dist/stories/components/CampaignTool/Table.js +195 -0
- package/dist/stories/components/CampaignTool/Table.style.js +86 -0
- package/dist/stories/components/CheckBox.js +76 -0
- package/dist/stories/components/CheckBox.style.js +36 -0
- package/dist/stories/components/CheckBoxButton.js +69 -0
- package/dist/stories/components/CheckBoxButton.style.js +39 -0
- package/dist/stories/components/CodeEditor.js +43 -0
- package/dist/stories/components/CodeEditor.style.js +13 -0
- package/dist/stories/components/CollapseData.js +66 -0
- package/dist/stories/components/CollapseData.style.js +127 -0
- package/dist/stories/components/CollapseHeader.js +255 -0
- package/dist/stories/components/CollapseHeader.style.js +200 -0
- package/dist/stories/components/CollapseMenuItem.js +61 -0
- package/dist/stories/components/CollapseMenuItem.style.js +61 -0
- package/dist/stories/components/CommonFunctions.js +99 -0
- package/dist/stories/components/Datepicker.js +148 -0
- package/dist/stories/components/Datepicker.style.js +19 -0
- package/dist/stories/components/DialogOverlay.js +44 -0
- package/dist/stories/components/DialogOverlay.style.js +70 -0
- package/dist/stories/components/DoublePanelDataRow.js +70 -0
- package/dist/stories/components/DoublePanelDataRow.style.js +66 -0
- package/dist/stories/components/DownloadProgress.js +97 -0
- package/dist/stories/components/DownloadProgress.style.js +51 -0
- package/dist/stories/components/Dropdown.js +231 -0
- package/dist/stories/components/Dropdown.style.js +17 -0
- package/dist/stories/components/DropdownMulti.js +290 -0
- package/dist/stories/components/DropdownMulti.style.js +17 -0
- package/dist/stories/components/DropdownMultiNew.js +292 -0
- package/dist/stories/components/DropdownMultiNew.style.js +218 -0
- package/dist/stories/components/DropdownNew.js +98 -0
- package/dist/stories/components/DropdownNew.style.js +21 -0
- package/dist/stories/components/DropdownSingleNew.js +256 -0
- package/dist/stories/components/DropdownSingleNew.style.js +189 -0
- package/dist/stories/components/EventDetailsCard.js +142 -0
- package/dist/stories/components/EventDetailsCard.style.js +62 -0
- package/dist/stories/components/EventList.js +61 -0
- package/dist/stories/components/EventList.style.js +38 -0
- package/dist/stories/components/EventListItem.js +50 -0
- package/dist/stories/components/EventListItem.style.js +47 -0
- package/dist/stories/components/FilterButton.js +53 -0
- package/dist/stories/components/FilterButton.style.js +12 -0
- package/dist/stories/components/FilterContainer.js +29 -0
- package/dist/stories/components/FilterContainer.style.js +30 -0
- package/dist/stories/components/FilterPanel.js +614 -0
- package/dist/stories/components/FilterPanel.style.js +89 -0
- package/dist/stories/components/FormattedValue.js +69 -0
- package/dist/stories/components/FormattedValue.style.js +91 -0
- package/dist/stories/components/Heatmap.js +184 -0
- package/dist/stories/components/Heatmap.style.js +151 -0
- package/dist/stories/components/IconButton.js +147 -0
- package/dist/stories/components/IconButton.style.js +64 -0
- package/dist/stories/components/Input.js +186 -0
- package/dist/stories/components/Input.style.js +132 -0
- package/dist/stories/components/InputOld.js +93 -0
- package/dist/stories/components/InputOld.style.js +71 -0
- package/dist/stories/components/KpiFilter.js +345 -0
- package/dist/stories/components/KpiFilter.style.js +132 -0
- package/dist/stories/components/LinkButton.js +225 -0
- package/dist/stories/components/LinkButton.style.js +53 -0
- package/dist/stories/components/LinnerDataBox.js +54 -0
- package/dist/stories/components/LinnerDataBox.style.js +68 -0
- package/dist/stories/components/ListBox.js +82 -0
- package/dist/stories/components/ListBox.style.js +48 -0
- package/dist/stories/components/MarketShareDescription.js +109 -0
- package/dist/stories/components/MarketShareDescription.style.js +215 -0
- package/dist/stories/components/Modal.js +21 -0
- package/dist/stories/components/Modal.style.js +63 -0
- package/dist/stories/components/ModalTotalBenchmark.js +224 -0
- package/dist/stories/components/ModalTotalCost.js +139 -0
- package/dist/stories/components/MonthPicker.js +169 -0
- package/dist/stories/components/MonthPicker.style.js +105 -0
- package/dist/stories/components/MonthPopupPicker.js +206 -0
- package/dist/stories/components/NewInput.js +33 -0
- package/dist/stories/components/NewInput.style.js +13 -0
- package/dist/stories/components/NoDataFoundMessage.js +30 -0
- package/dist/stories/components/NoDataFoundMessage.style.js +39 -0
- package/dist/stories/components/OneColumnContainer.js +121 -0
- package/dist/stories/components/OneColumnContainer.style.js +107 -0
- package/dist/stories/components/PerformanceAnalytics.js +447 -0
- package/dist/stories/components/PerformanceAnalytics.style.js +144 -0
- package/dist/stories/components/PerformanceAnalyticsLegend.js +59 -0
- package/dist/stories/components/PerformanceAnalyticsLegend.style.js +63 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn.js +327 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn.style.js +116 -0
- package/dist/stories/components/PerformanceAnalyticsTotals.js +70 -0
- package/dist/stories/components/PerformanceAnalyticsTotals.style.js +89 -0
- package/dist/stories/components/PieChart.js +154 -0
- package/dist/stories/components/PieChart.style.js +154 -0
- package/dist/stories/components/PopupCharts.js +244 -0
- package/dist/stories/components/PopupCharts.style.js +108 -0
- package/dist/stories/components/ProductsVariety.js +94 -0
- package/dist/stories/components/ProductsVariety.style.js +86 -0
- package/dist/stories/components/ProgressBar.js +52 -0
- package/dist/stories/components/ProgressBar.style.js +24 -0
- package/dist/stories/components/QuarterPicker.js +168 -0
- package/dist/stories/components/QuarterPicker.style.js +104 -0
- package/dist/stories/components/QuarterPopupPicker.js +186 -0
- package/dist/stories/components/QuickFilter.js +78 -0
- package/dist/stories/components/QuickFilter.style.js +21 -0
- package/dist/stories/components/QuickFilterDropdownMultiSelection.js +299 -0
- package/dist/stories/components/QuickFilterDropdownMultiSelection.style.js +194 -0
- package/dist/stories/components/QuickFilterDropdownSingle.js +229 -0
- package/dist/stories/components/QuickFilterDropdownSingle.style.js +139 -0
- package/dist/stories/components/RangeDatePicker.js +231 -0
- package/dist/stories/components/RangePicker.js +179 -0
- package/dist/stories/components/RangePicker.style.js +109 -0
- package/dist/stories/components/ReportTable.js +420 -0
- package/dist/stories/components/ReportTable.style.js +306 -0
- package/dist/stories/components/SagButton.js +68 -0
- package/dist/stories/components/SagButton.style.js +47 -0
- package/dist/stories/components/SagIconButton.js +130 -0
- package/dist/stories/components/SagIconButton.style.js +30 -0
- package/dist/stories/components/SagInput.js +53 -0
- package/dist/stories/components/SagInput.style.js +41 -0
- package/dist/stories/components/SalesAndROI.js +89 -0
- package/dist/stories/components/SalesAndROI.style.js +111 -0
- package/dist/stories/components/SalesSplit.js +153 -0
- package/dist/stories/components/SalesSplit.style.js +150 -0
- package/dist/stories/components/SearchInput.js +39 -0
- package/dist/stories/components/SearchInput.style.js +37 -0
- package/dist/stories/components/SegmentedButton.js +124 -0
- package/dist/stories/components/SegmentedButton.style.js +100 -0
- package/dist/stories/components/Select.js +137 -0
- package/dist/stories/components/Select.style.js +104 -0
- package/dist/stories/components/SingleBarLineCharts.js +415 -0
- package/dist/stories/components/SingleBarLineCharts.style.js +101 -0
- package/dist/stories/components/TabMenu.js +241 -0
- package/dist/stories/components/TabMenu.style.js +120 -0
- package/dist/stories/components/TextField.js +209 -0
- package/dist/stories/components/TextField.style.js +18 -0
- package/dist/stories/components/TitleDescription.js +272 -0
- package/dist/stories/components/TitleDescription.style.js +222 -0
- package/dist/stories/components/Tooltip.js +44 -0
- package/dist/stories/components/Tooltip.style.js +103 -0
- package/dist/stories/components/TopToggleList.js +46 -0
- package/dist/stories/components/TopToggleList.style.js +51 -0
- package/dist/stories/components/TotalBenchmark.js +97 -0
- package/dist/stories/components/TotalBenchmark.style.js +79 -0
- package/dist/stories/components/TotalBenchmarkAreachart.js +342 -0
- package/dist/stories/components/TotalBenchmarkAreachart.style.js +171 -0
- package/dist/stories/components/TotalBenchmarkArrows.js +149 -0
- package/dist/stories/components/TotalBenchmarkArrows.style.js +108 -0
- package/dist/stories/components/TotalBenchmarkBarchart.js +165 -0
- package/dist/stories/components/TotalBenchmarkBarchart.style.js +77 -0
- package/dist/stories/components/TotalDoughnutChart.js +187 -0
- package/dist/stories/components/TotalDoughnutChart.style.js +178 -0
- package/dist/stories/components/TotalHorizontalCharts.js +236 -0
- package/dist/stories/components/TotalHorizontalCharts.style.js +93 -0
- package/dist/stories/components/TspanTooltip.js +33 -0
- package/dist/stories/components/TspanTooltip.style.js +105 -0
- package/dist/stories/components/TwoBarCharts.js +211 -0
- package/dist/stories/components/TwoBarCharts.style.js +60 -0
- package/dist/stories/components/icons/ArrowDownIcon.js +27 -0
- package/dist/stories/components/icons/ArrowDropDownIcon.js +27 -0
- package/dist/stories/components/icons/ArrowSelectIcon.js +28 -0
- package/dist/stories/components/icons/ArrowUpIcon.js +27 -0
- package/dist/stories/components/icons/AttachedIcon.js +27 -0
- package/dist/stories/components/icons/BellIcon.js +27 -0
- package/dist/stories/components/icons/ButtonArrowRight.js +27 -0
- package/dist/stories/components/icons/Calendar.js +20 -0
- package/dist/stories/components/icons/CalendarIcon.js +27 -0
- package/dist/stories/components/icons/CalendarInOpen.js +26 -0
- package/dist/stories/components/icons/CheckBoxButtonCheckedIcon.js +28 -0
- package/dist/stories/components/icons/CheckBoxCheckedIcon.js +28 -0
- package/dist/stories/components/icons/CheckBoxNotCheckedIcon.js +28 -0
- package/dist/stories/components/icons/ChervronLeftIcon.js +20 -0
- package/dist/stories/components/icons/ChervronRightIcon.js +20 -0
- package/dist/stories/components/icons/ChevronLeftIcon.js +29 -0
- package/dist/stories/components/icons/ChevronRightIcon.js +29 -0
- package/dist/stories/components/icons/ClockIcon.js +27 -0
- package/dist/stories/components/icons/CloseIcon.js +27 -0
- package/dist/stories/components/icons/CloseXIcon.js +27 -0
- package/dist/stories/components/icons/ComboBoxArrowDownIcon.js +28 -0
- package/dist/stories/components/icons/ComboBoxArrowUpIcon.js +28 -0
- package/dist/stories/components/icons/DocumentIcon.js +48 -0
- package/dist/stories/components/icons/DownloadIcon.js +27 -0
- package/dist/stories/components/icons/Duplicate.js +28 -0
- package/dist/stories/components/icons/ErrorIcon.js +28 -0
- package/dist/stories/components/icons/ExitIcon.js +28 -0
- package/dist/stories/components/icons/ExportIcon.js +28 -0
- package/dist/stories/components/icons/EyeIcon.js +28 -0
- package/dist/stories/components/icons/FileIcon.js +27 -0
- package/dist/stories/components/icons/FilterIcon.js +36 -0
- package/dist/stories/components/icons/FlyIcon.js +28 -0
- package/dist/stories/components/icons/FoodLionChartIcon.js +42 -0
- package/dist/stories/components/icons/FoodLionIcon.js +3076 -0
- package/dist/stories/components/icons/FoodLionNewIcon.js +39 -0
- package/dist/stories/components/icons/GiantFoodChartIcon.js +40 -0
- package/dist/stories/components/icons/GiantFoodIcon.js +1976 -0
- package/dist/stories/components/icons/GiantFoodIcon_new.js +42 -0
- package/dist/stories/components/icons/HannafordChartIcon.js +40 -0
- package/dist/stories/components/icons/HannafordIcon.js +5017 -0
- package/dist/stories/components/icons/HannafordIcon_new.js +41 -0
- package/dist/stories/components/icons/HannafordNewIcon.js +213 -0
- package/dist/stories/components/icons/InfoIcon.js +28 -0
- package/dist/stories/components/icons/LampIcon.js +30 -0
- package/dist/stories/components/icons/LegendLineIcon.js +29 -0
- package/dist/stories/components/icons/LegendUnionIcon.js +29 -0
- package/dist/stories/components/icons/MaintenanceIcon.js +28 -0
- package/dist/stories/components/icons/MenuItemClosedIcon.js +28 -0
- package/dist/stories/components/icons/MenuItemOpenIcon.js +28 -0
- package/dist/stories/components/icons/MenuItemRightIcon.js +28 -0
- package/dist/stories/components/icons/MenuItemUpIcon.js +28 -0
- package/dist/stories/components/icons/NoDataFoundIcon.js +86 -0
- package/dist/stories/components/icons/OptionsIcon.js +27 -0
- package/dist/stories/components/icons/ReselectIcon.js +27 -0
- package/dist/stories/components/icons/SearchIcon.js +27 -0
- package/dist/stories/components/icons/ShoppingCartIcon.js +45 -0
- package/dist/stories/components/icons/ShoutIcon.js +27 -0
- package/dist/stories/components/icons/Sort.js +13 -0
- package/dist/stories/components/icons/SortIcon.js +35 -0
- package/dist/stories/components/icons/SpotlightProductIcon.js +28 -0
- package/dist/stories/components/icons/StopAndShopChartIcon.js +42 -0
- package/dist/stories/components/icons/StopAndShopIcon.js +134 -0
- package/dist/stories/components/icons/StopAndShopNewIcon.js +41 -0
- package/dist/stories/components/icons/SucceededIcon.js +28 -0
- package/dist/stories/components/icons/TheGiantCompanyChartIcon.js +40 -0
- package/dist/stories/components/icons/TheGiantCompanyIcon.js +40 -0
- package/dist/stories/components/icons/TheGiantCompanyIcon_old.js +1831 -0
- package/dist/stories/components/icons/TheGiantCompanyNewIcon.js +39 -0
- package/dist/stories/utils/ComponentFactory.js +65 -0
- package/dist/stories/utils/IconsHandler.js +150 -0
- package/dist/stories/utils/IconsHandler.style.js +16 -0
- package/dist/stories/utils/regex/Email.regex.js +7 -0
- package/dist/stories/utils/regex/LatinWithSpaces.regex.js +7 -0
- package/dist/stories/utils/regex/OnlyEnglishLetters.regex.js +7 -0
- package/dist/stories/utils/regex/Phone.regex.js +7 -0
- package/dist/types/components/LinnerDataBox/LinnerDataBox.data.d.ts +23 -0
- package/dist/vite.config.js +15 -0
- package/package.json +4 -4
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.TextBeforeAndAfterValue = exports.RowTitle = exports.OutBanner = exports.OneRowContainer = exports.OneFieldsContainer = exports.MainContainer = exports.InfoTextLabel = exports.InfoTextContainer = exports.IconContainer = exports.FormattedValue = exports.FieldsContainer = exports.FieldTitleAndValueSubContainer = exports.FieldTitle = exports.ColumnLineSeporatorContainer = exports.ColumnLineSeporator = exports.AllRowsContainer = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
const scrollableStyles = `
|
|
10
|
+
overflow-y: auto;
|
|
11
|
+
|
|
12
|
+
&::-webkit-scrollbar {
|
|
13
|
+
width: 8px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&::-webkit-scrollbar-track {
|
|
17
|
+
background: #E8E8E8;
|
|
18
|
+
border-radius: 5px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&::-webkit-scrollbar-thumb {
|
|
22
|
+
background: #D0D0D0;
|
|
23
|
+
border-radius: 5px;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
const MainContainer = exports.MainContainer = _styledComponents.default.div`
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: row;
|
|
29
|
+
position: relative;
|
|
30
|
+
font-family: "Poppins", sans-serif;
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-size: 1rem;
|
|
33
|
+
border-radius: 12px;
|
|
34
|
+
padding: 10px;
|
|
35
|
+
width: ${props => props.width};
|
|
36
|
+
height: ${props => props.height};
|
|
37
|
+
overflow: auto;
|
|
38
|
+
${scrollableStyles}
|
|
39
|
+
`;
|
|
40
|
+
const RowTitle = exports.RowTitle = _styledComponents.default.h4`
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: space-between;
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
font-size: 18px;
|
|
45
|
+
margin: 5px 5px 5px 0;
|
|
46
|
+
@media (max-width: 1536px) {
|
|
47
|
+
font-size: 15px;
|
|
48
|
+
}
|
|
49
|
+
@media (max-width: 1366px) {
|
|
50
|
+
font-size: 12px;
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
const AllRowsContainer = exports.AllRowsContainer = _styledComponents.default.div`
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
justify-content: space-between;
|
|
57
|
+
align-items: flex-start;
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 100%;
|
|
60
|
+
`;
|
|
61
|
+
const OneRowContainer = exports.OneRowContainer = _styledComponents.default.div`
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
width: 100%;
|
|
65
|
+
height: 100%;
|
|
66
|
+
`;
|
|
67
|
+
const ColumnLineSeporatorContainer = exports.ColumnLineSeporatorContainer = _styledComponents.default.div`
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
background-color: #b1b1b1;
|
|
71
|
+
align-items: center;
|
|
72
|
+
height: 1px;
|
|
73
|
+
width: 100%;
|
|
74
|
+
&.ColumnLineSeporatorContainer_vertical {
|
|
75
|
+
margin: 0 30px;
|
|
76
|
+
height: 100%;
|
|
77
|
+
width: 1px;
|
|
78
|
+
}
|
|
79
|
+
&.ColumnLineSeporatorContainer_horizontal {
|
|
80
|
+
margin: 30px 0;
|
|
81
|
+
min-height: 1px;
|
|
82
|
+
height: 1px;
|
|
83
|
+
width: 100%;
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
const ColumnLineSeporator = exports.ColumnLineSeporator = _styledComponents.default.div`
|
|
87
|
+
min-width: 0.5px;
|
|
88
|
+
width: 0.5px;
|
|
89
|
+
`;
|
|
90
|
+
const FieldsContainer = exports.FieldsContainer = _styledComponents.default.div`
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: row;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
white-space: nowrap;
|
|
95
|
+
height: 100%;
|
|
96
|
+
padding: 30px 0px;
|
|
97
|
+
`;
|
|
98
|
+
const OneFieldsContainer = exports.OneFieldsContainer = _styledComponents.default.div`
|
|
99
|
+
display: flex;
|
|
100
|
+
padding: 4px;
|
|
101
|
+
gap: 10px;
|
|
102
|
+
width: 100%;
|
|
103
|
+
justify-content: flex-start;
|
|
104
|
+
// padding: ${props => props.padding}; //0 0 0 40px;
|
|
105
|
+
`;
|
|
106
|
+
const FieldTitle = exports.FieldTitle = _styledComponents.default.h4`
|
|
107
|
+
font-size: 18px;
|
|
108
|
+
font-weight: 400;
|
|
109
|
+
margin: 0;
|
|
110
|
+
@media (max-width: 1536px) {
|
|
111
|
+
font-size: 14px;
|
|
112
|
+
}
|
|
113
|
+
@media (max-width: 1366px) {
|
|
114
|
+
font-size: 12px;
|
|
115
|
+
}
|
|
116
|
+
`;
|
|
117
|
+
const FormattedValue = exports.FormattedValue = _styledComponents.default.div`
|
|
118
|
+
font-weight: 400;
|
|
119
|
+
font-size: 40px;
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: baseline;
|
|
122
|
+
min-height: 40px;
|
|
123
|
+
gap: 2px;
|
|
124
|
+
@media (max-width: 1536px) {
|
|
125
|
+
font-size: 24px;
|
|
126
|
+
}
|
|
127
|
+
@media (max-width: 1366px) {
|
|
128
|
+
font-size: 20px;
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
131
|
+
const TextBeforeAndAfterValue = exports.TextBeforeAndAfterValue = _styledComponents.default.span`
|
|
132
|
+
font-weight: 400;
|
|
133
|
+
font-size: 16px;
|
|
134
|
+
@media (max-width: 1536px) {
|
|
135
|
+
font-size: 14px;
|
|
136
|
+
}
|
|
137
|
+
@media (max-width: 1366px) {
|
|
138
|
+
font-size: 11px;
|
|
139
|
+
}
|
|
140
|
+
`;
|
|
141
|
+
const FieldTitleAndValueSubContainer = exports.FieldTitleAndValueSubContainer = _styledComponents.default.div`
|
|
142
|
+
display: flex;
|
|
143
|
+
justify-content: space-around;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
flex-wrap: wrap;
|
|
146
|
+
width: 100%;
|
|
147
|
+
`;
|
|
148
|
+
const InfoTextContainer = exports.InfoTextContainer = _styledComponents.default.div`
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: row;
|
|
151
|
+
width: 100%;
|
|
152
|
+
height: 100%;
|
|
153
|
+
overflow:auto;
|
|
154
|
+
`;
|
|
155
|
+
const IconContainer = exports.IconContainer = _styledComponents.default.div`
|
|
156
|
+
display: flex;
|
|
157
|
+
padding: 5px 10px 0 0;
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
`;
|
|
160
|
+
const InfoTextLabel = exports.InfoTextLabel = _styledComponents.default.div`
|
|
161
|
+
color: black;
|
|
162
|
+
font-size: 18px;
|
|
163
|
+
line-height: 24px;
|
|
164
|
+
font-weight: 400;
|
|
165
|
+
width: 100%;
|
|
166
|
+
overflow: auto;
|
|
167
|
+
${scrollableStyles}
|
|
168
|
+
strong {
|
|
169
|
+
font-weight: 500;
|
|
170
|
+
color: #212121;
|
|
171
|
+
@media (max-width: 1536px) {
|
|
172
|
+
font-size: 14px;
|
|
173
|
+
}
|
|
174
|
+
@media (max-width: 1366px) {
|
|
175
|
+
font-size: 12px;
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
p1 {
|
|
179
|
+
font-weight: 400;
|
|
180
|
+
color: #726F6F;
|
|
181
|
+
@media (max-width: 1536px) {
|
|
182
|
+
font-size: 14px;
|
|
183
|
+
}
|
|
184
|
+
@media (max-width: 1366px) {
|
|
185
|
+
font-size: 12px;
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
`;
|
|
189
|
+
const OutBanner = exports.OutBanner = _styledComponents.default.div`
|
|
190
|
+
display: flex;
|
|
191
|
+
gap: 8px;
|
|
192
|
+
align-items: center;
|
|
193
|
+
font-size: 14px;
|
|
194
|
+
font-weight: 400;
|
|
195
|
+
color: ${props => props.textColor};
|
|
196
|
+
cursor: pointer;
|
|
197
|
+
@media (max-width: 1536px) {
|
|
198
|
+
font-size: 13px;
|
|
199
|
+
}
|
|
200
|
+
@media (max-width: 1366px) {
|
|
201
|
+
font-size: 12px;
|
|
202
|
+
}
|
|
203
|
+
> svg {
|
|
204
|
+
width: 14px;
|
|
205
|
+
height: 14px;
|
|
206
|
+
@media (max-width: 1536px) {
|
|
207
|
+
width: 13px;
|
|
208
|
+
height: 13px;
|
|
209
|
+
}
|
|
210
|
+
@media (max-width: 1366px) {
|
|
211
|
+
width: 12px;
|
|
212
|
+
height: 12px;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
`;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _Modal = require("./Modal.style");
|
|
10
|
+
const Modal = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
isOpen,
|
|
13
|
+
onClose,
|
|
14
|
+
children
|
|
15
|
+
} = _ref;
|
|
16
|
+
if (!isOpen) return null;
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_Modal.ModalOverlay, null, /*#__PURE__*/_react.default.createElement(_Modal.ModalContent, null, children, /*#__PURE__*/_react.default.createElement(_Modal.CloseButton, {
|
|
18
|
+
onClick: onClose
|
|
19
|
+
}, "Close")));
|
|
20
|
+
};
|
|
21
|
+
var _default = exports.default = Modal;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.SubmitButton = exports.ModalOverlay = exports.ModalContent = exports.CloseButton = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
const fadeIn = (0, _styledComponents.keyframes)`
|
|
10
|
+
from {
|
|
11
|
+
opacity: 0;
|
|
12
|
+
}
|
|
13
|
+
to {
|
|
14
|
+
opacity: 1;
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
const ModalOverlay = exports.ModalOverlay = _styledComponents.default.div`
|
|
18
|
+
position: fixed;
|
|
19
|
+
top: 0;
|
|
20
|
+
left: 0;
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
z-index:999999;
|
|
24
|
+
background-color: rgba(0, 0, 0, 0.7);
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
align-items: center;
|
|
28
|
+
animation: ${fadeIn} 0.3s ease-in-out;
|
|
29
|
+
`;
|
|
30
|
+
const ModalContent = exports.ModalContent = _styledComponents.default.div`
|
|
31
|
+
background-color: #fff;
|
|
32
|
+
overflow: scroll;
|
|
33
|
+
padding: 20px;
|
|
34
|
+
border-radius: 8px;
|
|
35
|
+
width: 80%;
|
|
36
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
37
|
+
animation: ${fadeIn} 0.5s ease-in-out;
|
|
38
|
+
`;
|
|
39
|
+
const CloseButton = exports.CloseButton = _styledComponents.default.button`
|
|
40
|
+
margin-top: 10px;
|
|
41
|
+
padding: 5px 15px;
|
|
42
|
+
border: none;
|
|
43
|
+
background-color: #333;
|
|
44
|
+
color: #fff;
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
border-radius: 4px;
|
|
47
|
+
&:hover {
|
|
48
|
+
background-color: #555;
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
const SubmitButton = exports.SubmitButton = _styledComponents.default.input`
|
|
52
|
+
margin-top: 10px;
|
|
53
|
+
margin-right: 10px;
|
|
54
|
+
padding: 5px 15px;
|
|
55
|
+
border: none;
|
|
56
|
+
background-color: #333;
|
|
57
|
+
color: #fff;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
border-radius: 4px;
|
|
60
|
+
&:hover {
|
|
61
|
+
background-color: #555;
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
@@ -0,0 +1,224 @@
|
|
|
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 = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _reactHookForm = require("react-hook-form");
|
|
11
|
+
var _propTypes = _interopRequireWildcard(require("prop-types"));
|
|
12
|
+
var _Modal = _interopRequireDefault(require("./Modal"));
|
|
13
|
+
var _CodeEditor = _interopRequireDefault(require("./CodeEditor"));
|
|
14
|
+
var _TextField = _interopRequireDefault(require("./TextField"));
|
|
15
|
+
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
16
|
+
var _Modal2 = require("./Modal.style");
|
|
17
|
+
var _TotalDoughnutChart = _interopRequireDefault(require("./TotalDoughnutChart"));
|
|
18
|
+
var _ComponentFactory = _interopRequireDefault(require("../utils/ComponentFactory"));
|
|
19
|
+
const ModalTotalBenchmark = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
componentName,
|
|
22
|
+
title,
|
|
23
|
+
isModalOpen,
|
|
24
|
+
setModalOpen,
|
|
25
|
+
setResult
|
|
26
|
+
} = _ref;
|
|
27
|
+
const [params, setParams] = (0, _react.useState)([]);
|
|
28
|
+
const [code, setCode] = (0, _react.useState)('Select PACKAGE_COST,REDEMPTION_COST,(PACKAGE_COST+REDEMPTION_COST) AS TOTAL_COST,from FACT_EVENT_MEASURES A INNER JOIN DIM_EVENTS B ON A.EVENT_CODE = B.EVENT_CODE');
|
|
29
|
+
function getTypeName(type) {
|
|
30
|
+
if (type === _propTypes.default.string) {
|
|
31
|
+
return 'string';
|
|
32
|
+
}
|
|
33
|
+
if (type === _propTypes.default.number) {
|
|
34
|
+
return 'number';
|
|
35
|
+
}
|
|
36
|
+
if (type === _propTypes.default.bool) {
|
|
37
|
+
return 'bool';
|
|
38
|
+
}
|
|
39
|
+
if (type === _propTypes.default.array) {
|
|
40
|
+
return 'array';
|
|
41
|
+
}
|
|
42
|
+
if (type === _propTypes.default.object || type === _propTypes.default.arrayOf) {
|
|
43
|
+
return 'object';
|
|
44
|
+
}
|
|
45
|
+
if (type === _propTypes.default.func) {
|
|
46
|
+
return 'function';
|
|
47
|
+
}
|
|
48
|
+
if (type === _propTypes.default.symbol) {
|
|
49
|
+
return 'symbol';
|
|
50
|
+
}
|
|
51
|
+
if (type === _propTypes.default.any) {
|
|
52
|
+
return 'any';
|
|
53
|
+
}
|
|
54
|
+
return 'other';
|
|
55
|
+
}
|
|
56
|
+
function withPropTypeChecks(Component) {
|
|
57
|
+
const tempParams = [];
|
|
58
|
+
if (Component.propTypes) {
|
|
59
|
+
Object.keys(Component.propTypes).forEach(key => {
|
|
60
|
+
tempParams.push({
|
|
61
|
+
id: key,
|
|
62
|
+
label: key.replace(/([A-Z])/g, ' $1').replace(/^./, str => str.toUpperCase()),
|
|
63
|
+
type: getTypeName(Component.propTypes[key])
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return tempParams;
|
|
68
|
+
}
|
|
69
|
+
(0, _react.useEffect)(() => {
|
|
70
|
+
const newParams = withPropTypeChecks((0, _ComponentFactory.default)(componentName));
|
|
71
|
+
setParams(newParams);
|
|
72
|
+
}, []);
|
|
73
|
+
const {
|
|
74
|
+
handleSubmit,
|
|
75
|
+
control,
|
|
76
|
+
formState: {
|
|
77
|
+
errors
|
|
78
|
+
}
|
|
79
|
+
} = (0, _reactHookForm.useForm)();
|
|
80
|
+
const onSubmit = data => setResult(data);
|
|
81
|
+
return /*#__PURE__*/_react.default.createElement("form", {
|
|
82
|
+
onSubmit: handleSubmit(onSubmit)
|
|
83
|
+
}, /*#__PURE__*/_react.default.createElement(_Modal.default, {
|
|
84
|
+
isOpen: isModalOpen,
|
|
85
|
+
onClose: () => setModalOpen(false)
|
|
86
|
+
}, /*#__PURE__*/_react.default.createElement("h2", null, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
87
|
+
style: {
|
|
88
|
+
gap: '10px',
|
|
89
|
+
display: 'grid'
|
|
90
|
+
}
|
|
91
|
+
}, /*#__PURE__*/_react.default.createElement(_CodeEditor.default, {
|
|
92
|
+
value: code,
|
|
93
|
+
onChange: setCode
|
|
94
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
+
style: {
|
|
96
|
+
gap: '10px',
|
|
97
|
+
display: 'grid',
|
|
98
|
+
gridTemplateColumns: 'auto auto auto'
|
|
99
|
+
}
|
|
100
|
+
}, params.map(item => {
|
|
101
|
+
if (item.type === 'string' || item.type === 'number') {
|
|
102
|
+
return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
103
|
+
key: item.id,
|
|
104
|
+
control: control,
|
|
105
|
+
name: item.id,
|
|
106
|
+
render: _ref2 => {
|
|
107
|
+
let {
|
|
108
|
+
field
|
|
109
|
+
} = _ref2;
|
|
110
|
+
return /*#__PURE__*/_react.default.createElement(_TextField.default, Object.assign({}, field, {
|
|
111
|
+
allowedInput: "all",
|
|
112
|
+
height: "100%",
|
|
113
|
+
label: item.label,
|
|
114
|
+
multiline: true,
|
|
115
|
+
placeHolder: "Type...",
|
|
116
|
+
shape: "round",
|
|
117
|
+
size: "small",
|
|
118
|
+
width: "300px"
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
if (item.type === 'bool') {
|
|
124
|
+
return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
125
|
+
key: item.id,
|
|
126
|
+
control: control,
|
|
127
|
+
name: item.id,
|
|
128
|
+
render: _ref3 => {
|
|
129
|
+
let {
|
|
130
|
+
field
|
|
131
|
+
} = _ref3;
|
|
132
|
+
return /*#__PURE__*/_react.default.createElement(_Dropdown.default, Object.assign({}, field, {
|
|
133
|
+
allowedInput: "all",
|
|
134
|
+
labelColor: "#1B30AA",
|
|
135
|
+
limitTagsOnMultiSelect: 0,
|
|
136
|
+
onInputChange: e => {
|
|
137
|
+
var _e$inputValue;
|
|
138
|
+
field.onChange((_e$inputValue = e === null || e === void 0 ? void 0 : e.inputValue) !== null && _e$inputValue !== void 0 ? _e$inputValue : '');
|
|
139
|
+
},
|
|
140
|
+
options: ['true', 'false'],
|
|
141
|
+
placeHolder: "Type...",
|
|
142
|
+
shape: "round",
|
|
143
|
+
size: "small",
|
|
144
|
+
text: item.label,
|
|
145
|
+
width: "300px"
|
|
146
|
+
}));
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
if (item.type === 'other') {
|
|
151
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
152
|
+
key: item.id,
|
|
153
|
+
control: control,
|
|
154
|
+
name: `${item.id}Key`,
|
|
155
|
+
render: _ref4 => {
|
|
156
|
+
let {
|
|
157
|
+
field
|
|
158
|
+
} = _ref4;
|
|
159
|
+
return /*#__PURE__*/_react.default.createElement(_TextField.default, Object.assign({}, field, {
|
|
160
|
+
label: `${item.label}Key`,
|
|
161
|
+
text: `${item.label}Key`,
|
|
162
|
+
allowedInput: "all",
|
|
163
|
+
labelColor: "#1B30AA",
|
|
164
|
+
width: "300px",
|
|
165
|
+
height: "100%",
|
|
166
|
+
multiline: true,
|
|
167
|
+
placeHolder: "The Key",
|
|
168
|
+
shape: "round",
|
|
169
|
+
size: "small"
|
|
170
|
+
}));
|
|
171
|
+
}
|
|
172
|
+
}), /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
173
|
+
key: item.id,
|
|
174
|
+
control: control,
|
|
175
|
+
name: `${item.id}Args`,
|
|
176
|
+
render: _ref5 => {
|
|
177
|
+
let {
|
|
178
|
+
field
|
|
179
|
+
} = _ref5;
|
|
180
|
+
return /*#__PURE__*/_react.default.createElement(_TextField.default, Object.assign({}, field, {
|
|
181
|
+
label: `${item.label}Args`,
|
|
182
|
+
text: `${item.label}Args`,
|
|
183
|
+
allowedInput: "all",
|
|
184
|
+
labelColor: "#1B30AA",
|
|
185
|
+
width: "300px",
|
|
186
|
+
height: "100%",
|
|
187
|
+
multiline: true,
|
|
188
|
+
placeHolder: "The args",
|
|
189
|
+
shape: "round",
|
|
190
|
+
size: "small"
|
|
191
|
+
}));
|
|
192
|
+
}
|
|
193
|
+
}));
|
|
194
|
+
}
|
|
195
|
+
return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
196
|
+
key: item.id,
|
|
197
|
+
control: control,
|
|
198
|
+
name: item.id,
|
|
199
|
+
render: _ref6 => {
|
|
200
|
+
let {
|
|
201
|
+
field
|
|
202
|
+
} = _ref6;
|
|
203
|
+
return /*#__PURE__*/_react.default.createElement(_Dropdown.default, Object.assign({}, field, {
|
|
204
|
+
allowedInput: "all",
|
|
205
|
+
labelColor: "#1B30AA",
|
|
206
|
+
limitTagsOnMultiSelect: 0,
|
|
207
|
+
onInputChange: e => {
|
|
208
|
+
var _e$inputValue2;
|
|
209
|
+
field.onChange((_e$inputValue2 = e === null || e === void 0 ? void 0 : e.inputValue) !== null && _e$inputValue2 !== void 0 ? _e$inputValue2 : '');
|
|
210
|
+
},
|
|
211
|
+
options: item.options,
|
|
212
|
+
placeHolder: "Type...",
|
|
213
|
+
shape: "round",
|
|
214
|
+
size: "small",
|
|
215
|
+
text: item.label,
|
|
216
|
+
width: "300px"
|
|
217
|
+
}));
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}))), /*#__PURE__*/_react.default.createElement(_Modal2.SubmitButton, {
|
|
221
|
+
type: "submit"
|
|
222
|
+
})));
|
|
223
|
+
};
|
|
224
|
+
var _default = exports.default = ModalTotalBenchmark;
|
|
@@ -0,0 +1,139 @@
|
|
|
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 = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _reactHookForm = require("react-hook-form");
|
|
11
|
+
var _Modal = _interopRequireDefault(require("./Modal"));
|
|
12
|
+
var _CodeEditor = _interopRequireDefault(require("./CodeEditor"));
|
|
13
|
+
var _TextField = _interopRequireDefault(require("./TextField"));
|
|
14
|
+
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
15
|
+
var _Modal2 = require("./Modal.style");
|
|
16
|
+
const ModalTotalCost = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
title,
|
|
19
|
+
isModalOpen,
|
|
20
|
+
setModalOpen,
|
|
21
|
+
setResult
|
|
22
|
+
} = _ref;
|
|
23
|
+
const [params, setParams] = (0, _react.useState)([{
|
|
24
|
+
id: 'title',
|
|
25
|
+
label: 'Title',
|
|
26
|
+
type: 'text'
|
|
27
|
+
}, {
|
|
28
|
+
id: 'dotCut',
|
|
29
|
+
label: 'Do Cut',
|
|
30
|
+
type: 'select',
|
|
31
|
+
options: ['true', 'false']
|
|
32
|
+
}, {
|
|
33
|
+
id: 'currency',
|
|
34
|
+
label: 'Currency',
|
|
35
|
+
type: 'select',
|
|
36
|
+
options: ['true', 'false']
|
|
37
|
+
}, {
|
|
38
|
+
id: 'currencyType',
|
|
39
|
+
label: 'Currency Type',
|
|
40
|
+
type: 'select',
|
|
41
|
+
options: ['USD', 'EUR', 'ILS', 'GBP', 'JPY']
|
|
42
|
+
}, {
|
|
43
|
+
id: 'width',
|
|
44
|
+
label: 'Width',
|
|
45
|
+
type: 'text'
|
|
46
|
+
}, {
|
|
47
|
+
id: 'height',
|
|
48
|
+
label: 'Height',
|
|
49
|
+
type: 'text'
|
|
50
|
+
}, {
|
|
51
|
+
id: 'textColor',
|
|
52
|
+
label: 'Text Color',
|
|
53
|
+
type: 'text'
|
|
54
|
+
}, {
|
|
55
|
+
id: 'noDataText',
|
|
56
|
+
label: 'No Data Text',
|
|
57
|
+
type: 'text'
|
|
58
|
+
}]);
|
|
59
|
+
const [code, setCode] = (0, _react.useState)('Select PACKAGE_COST,REDEMPTION_COST,(PACKAGE_COST+REDEMPTION_COST) AS TOTAL_COST,from FACT_EVENT_MEASURES A INNER JOIN DIM_EVENTS B ON A.EVENT_CODE = B.EVENT_CODE');
|
|
60
|
+
const {
|
|
61
|
+
register,
|
|
62
|
+
handleSubmit,
|
|
63
|
+
watch,
|
|
64
|
+
control,
|
|
65
|
+
formState: {
|
|
66
|
+
errors
|
|
67
|
+
}
|
|
68
|
+
} = (0, _reactHookForm.useForm)();
|
|
69
|
+
const onSubmit = data => setResult(data);
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement("form", {
|
|
71
|
+
onSubmit: handleSubmit(onSubmit)
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_Modal.default, {
|
|
73
|
+
isOpen: isModalOpen,
|
|
74
|
+
onClose: () => setModalOpen(false)
|
|
75
|
+
}, /*#__PURE__*/_react.default.createElement("h2", null, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
76
|
+
style: {
|
|
77
|
+
gap: '10px',
|
|
78
|
+
display: 'grid'
|
|
79
|
+
}
|
|
80
|
+
}, /*#__PURE__*/_react.default.createElement(_CodeEditor.default, {
|
|
81
|
+
value: code,
|
|
82
|
+
onChange: setCode
|
|
83
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
84
|
+
style: {
|
|
85
|
+
gap: '10px',
|
|
86
|
+
display: 'grid',
|
|
87
|
+
gridTemplateColumns: 'auto auto auto'
|
|
88
|
+
}
|
|
89
|
+
}, params.map(item => {
|
|
90
|
+
if (item.type === 'text') {
|
|
91
|
+
return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
92
|
+
control: control,
|
|
93
|
+
name: item.id,
|
|
94
|
+
render: _ref2 => {
|
|
95
|
+
let {
|
|
96
|
+
field
|
|
97
|
+
} = _ref2;
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement(_TextField.default, Object.assign({}, field, {
|
|
99
|
+
allowedInput: "all",
|
|
100
|
+
height: "100%",
|
|
101
|
+
label: item.label,
|
|
102
|
+
multiline: true,
|
|
103
|
+
placeHolder: "Type...",
|
|
104
|
+
shape: "round",
|
|
105
|
+
size: "small",
|
|
106
|
+
width: "300px"
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
112
|
+
control: control,
|
|
113
|
+
name: item.id,
|
|
114
|
+
render: _ref3 => {
|
|
115
|
+
let {
|
|
116
|
+
field
|
|
117
|
+
} = _ref3;
|
|
118
|
+
return /*#__PURE__*/_react.default.createElement(_Dropdown.default, Object.assign({}, field, {
|
|
119
|
+
allowedInput: "all",
|
|
120
|
+
labelColor: "#1B30AA",
|
|
121
|
+
limitTagsOnMultiSelect: 0,
|
|
122
|
+
onInputChange: e => {
|
|
123
|
+
var _e$inputValue;
|
|
124
|
+
field.onChange((_e$inputValue = e === null || e === void 0 ? void 0 : e.inputValue) !== null && _e$inputValue !== void 0 ? _e$inputValue : '');
|
|
125
|
+
},
|
|
126
|
+
options: item.options,
|
|
127
|
+
placeHolder: "Type...",
|
|
128
|
+
shape: "round",
|
|
129
|
+
size: "small",
|
|
130
|
+
text: item.label,
|
|
131
|
+
width: "300px"
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}))), /*#__PURE__*/_react.default.createElement(_Modal2.SubmitButton, {
|
|
136
|
+
type: "submit"
|
|
137
|
+
})));
|
|
138
|
+
};
|
|
139
|
+
var _default = exports.default = ModalTotalCost;
|