sag_components 1.0.976 → 1.0.978
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/Button.test.js +10 -10
- package/dist/LinkButton.test.js +10 -10
- package/dist/SingleBar.test.js +2 -2
- package/dist/index.js +1 -1
- package/dist/stories/CampaignTool/PopupContent.stories.js +284 -0
- package/dist/stories/components/BannerEventBoxTest.js +42 -0
- package/dist/stories/components/BannerEventBoxTest.style.js +11 -0
- package/dist/stories/components/BarChartsByWeeks.js +3 -0
- package/dist/stories/components/CommonFunctions.js +1 -2
- package/dist/stories/components/FilterButton.js +53 -0
- package/dist/stories/components/FilterButton.style.js +12 -0
- package/dist/stories/components/FormattedValue.js +3 -2
- package/dist/stories/components/NewInput.js +33 -0
- package/dist/stories/components/NewInput.style.js +13 -0
- package/dist/stories/components/QuickFilterDropdownMultiSelection.js +1 -1
- package/dist/stories/components/QuickFilterDropdownSingle.js +1 -1
- package/dist/stories/components/icons/TheGiantCompanyIcon_old.js +1831 -0
- package/package.json +1 -1
- package/dist/stories/components/AttachedFile/AttachedFile.js +0 -62
- package/dist/stories/components/AttachedFile/AttachedFile.stories.js +0 -36
- package/dist/stories/components/AttachedFile/AttachedFile.style.js +0 -48
- package/dist/stories/components/BannerEventBox/BannerEventBox.js +0 -97
- package/dist/stories/components/BannerEventBox/BannerEventBox.stories.js +0 -58
- package/dist/stories/components/BannerEventBox/BannerEventBox.style.js +0 -78
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.js +0 -153
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.stories.js +0 -59
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.style.js +0 -189
- package/dist/stories/components/BannersDropdown/BannersDropdown.js +0 -115
- package/dist/stories/components/BannersDropdown/BannersDropdown.stories.js +0 -64
- package/dist/stories/components/BannersDropdown/BannersDropdown.style.js +0 -99
- package/dist/stories/components/BarChart/BarChart.js +0 -191
- package/dist/stories/components/BarChart/BarChart.stories.js +0 -153
- package/dist/stories/components/BarChart/BarChart.style.js +0 -60
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.js +0 -213
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.stories.js +0 -259
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.style.js +0 -79
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.js +0 -299
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.stories.js +0 -442
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.style.js +0 -96
- package/dist/stories/components/Benchmark/Benchmark.js +0 -130
- package/dist/stories/components/Benchmark/Benchmark.stories.js +0 -148
- package/dist/stories/components/Benchmark/Benchmark.style.js +0 -61
- package/dist/stories/components/Button/Button.js +0 -217
- package/dist/stories/components/Button/Button.stories.js +0 -269
- package/dist/stories/components/Button/Button.style.js +0 -90
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.js +0 -48
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.stories.js +0 -65
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.style.js +0 -48
- package/dist/stories/components/Card/Card.js +0 -72
- package/dist/stories/components/Card/Card.stories.js +0 -92
- package/dist/stories/components/Card/Card.style.js +0 -65
- package/dist/stories/components/CheckBox/CheckBox.js +0 -76
- package/dist/stories/components/CheckBox/CheckBox.stories.js +0 -107
- package/dist/stories/components/CheckBox/CheckBox.style.js +0 -36
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.js +0 -69
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.stories.js +0 -150
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.style.js +0 -39
- package/dist/stories/components/CodeEditor/CodeEditor.js +0 -43
- package/dist/stories/components/CodeEditor/CodeEditor.style.js +0 -13
- package/dist/stories/components/CollapseData/CollapseData.js +0 -66
- package/dist/stories/components/CollapseData/CollapseData.stories.js +0 -125
- package/dist/stories/components/CollapseData/CollapseData.style.js +0 -127
- package/dist/stories/components/CollapseHeader/CollapseHeader.js +0 -249
- package/dist/stories/components/CollapseHeader/CollapseHeader.stories.js +0 -116
- package/dist/stories/components/CollapseHeader/CollapseHeader.style.js +0 -200
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.js +0 -61
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.stories.js +0 -161
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.style.js +0 -61
- package/dist/stories/components/Datepicker/Datepicker.js +0 -148
- package/dist/stories/components/Datepicker/Datepicker.stories.js +0 -86
- package/dist/stories/components/Datepicker/Datepicker.style.js +0 -19
- package/dist/stories/components/DownloadProgress/DownloadProgress.js +0 -97
- package/dist/stories/components/DownloadProgress/DownloadProgress.stories.js +0 -111
- package/dist/stories/components/DownloadProgress/DownloadProgress.style.js +0 -51
- package/dist/stories/components/Dropdown/Dropdown.js +0 -231
- package/dist/stories/components/Dropdown/Dropdown.stories.js +0 -323
- package/dist/stories/components/Dropdown/Dropdown.style.js +0 -17
- package/dist/stories/components/DropdownMulti/DropdownMulti.js +0 -290
- package/dist/stories/components/DropdownMulti/DropdownMulti.stories.js +0 -220
- package/dist/stories/components/DropdownMulti/DropdownMulti.style.js +0 -11
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.js +0 -292
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.style.js +0 -216
- package/dist/stories/components/DropdownNew/DropdownNew.js +0 -98
- package/dist/stories/components/DropdownNew/DropdownNew.stories.js +0 -416
- package/dist/stories/components/DropdownNew/DropdownNew.style.js +0 -21
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.js +0 -254
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.style.js +0 -187
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.js +0 -144
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.stories.js +0 -57
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.style.js +0 -94
- package/dist/stories/components/EventList/EventList.js +0 -61
- package/dist/stories/components/EventList/EventList.stories.js +0 -84
- package/dist/stories/components/EventList/EventList.style.js +0 -38
- package/dist/stories/components/EventListItem/EventListItem.js +0 -50
- package/dist/stories/components/EventListItem/EventListItem.stories.js +0 -65
- package/dist/stories/components/EventListItem/EventListItem.style.js +0 -47
- package/dist/stories/components/FilterContainer/FilterContainer.js +0 -29
- package/dist/stories/components/FilterContainer/FilterContainer.stories.js +0 -23
- package/dist/stories/components/FilterContainer/FilterContainer.style.js +0 -30
- package/dist/stories/components/FilterPanel/FilterPanel.js +0 -571
- package/dist/stories/components/FilterPanel/FilterPanel.stories.js +0 -967
- package/dist/stories/components/FilterPanel/FilterPanel.style.js +0 -89
- package/dist/stories/components/FormInput/FormInput.js +0 -41
- package/dist/stories/components/FormSelect/FormSelect.js +0 -42
- package/dist/stories/components/FormattedValue/FormattedValue.js +0 -68
- package/dist/stories/components/FormattedValue/FormattedValue.stories.js +0 -189
- package/dist/stories/components/FormattedValue/FormattedValue.style.js +0 -91
- package/dist/stories/components/IconButton/IconButton.js +0 -147
- package/dist/stories/components/IconButton/IconButton.stories.js +0 -131
- package/dist/stories/components/IconButton/IconButton.style.js +0 -64
- package/dist/stories/components/Input/Input.js +0 -183
- package/dist/stories/components/Input/Input.stories.js +0 -434
- package/dist/stories/components/Input/Input.style.js +0 -130
- package/dist/stories/components/InputOld/InputOld.js +0 -90
- package/dist/stories/components/InputOld/InputOld.stories.js +0 -100
- package/dist/stories/components/InputOld/InputOld.style.js +0 -69
- package/dist/stories/components/KpiFilter/KpiFilter.js +0 -330
- package/dist/stories/components/KpiFilter/KpiFilter.stories.js +0 -380
- package/dist/stories/components/KpiFilter/KpiFilter.style.js +0 -132
- package/dist/stories/components/LinkButton/LinkButton.js +0 -207
- package/dist/stories/components/LinkButton/LinkButton.stories.js +0 -180
- package/dist/stories/components/LinkButton/LinkButton.style.js +0 -53
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.js +0 -46
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.stories.js +0 -78
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.style.js +0 -68
- package/dist/stories/components/ListBox/ListBox.js +0 -82
- package/dist/stories/components/ListBox/ListBox.stories.js +0 -132
- package/dist/stories/components/ListBox/ListBox.style.js +0 -48
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.js +0 -109
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.stories.js +0 -198
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.style.js +0 -215
- package/dist/stories/components/Modal/Modal.js +0 -21
- package/dist/stories/components/Modal/Modal.style.js +0 -65
- package/dist/stories/components/Modal/ModalTotalBenchmark.js +0 -224
- package/dist/stories/components/Modal/ModalTotalCost.js +0 -139
- package/dist/stories/components/MonthPicker/MonthPicker.js +0 -166
- package/dist/stories/components/MonthPicker/MonthPicker.stories.js +0 -140
- package/dist/stories/components/MonthPicker/MonthPicker.style.js +0 -103
- package/dist/stories/components/MonthPicker/MonthPopupPicker.js +0 -200
- package/dist/stories/components/MultipleCard/MultipleCard.js +0 -26
- package/dist/stories/components/MultipleCard/MultipleCard.stories.js +0 -33
- package/dist/stories/components/MultipleCard/MultipleCard.style.js +0 -13
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.js +0 -30
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.stories.js +0 -66
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.style.js +0 -39
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.js +0 -121
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.stories.js +0 -119
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.style.js +0 -107
- package/dist/stories/components/PageFilterBar/PageFilterBar.js +0 -23
- package/dist/stories/components/PageFilterBar/PageFilterBar.stories.js +0 -28
- package/dist/stories/components/PageFilterBar/PageFilterBar.style.js +0 -22
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.js +0 -447
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.stories.js +0 -258
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.style.js +0 -144
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.js +0 -59
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.stories.js +0 -86
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.style.js +0 -63
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.js +0 -327
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.stories.js +0 -231
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.style.js +0 -116
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.js +0 -70
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.stories.js +0 -100
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.style.js +0 -89
- package/dist/stories/components/Popup/Popup.js +0 -172
- package/dist/stories/components/Popup/Popup.stories.js +0 -704
- package/dist/stories/components/Popup/Popup.style.js +0 -122
- package/dist/stories/components/PopupCharts/PopupCharts.js +0 -244
- package/dist/stories/components/PopupCharts/PopupCharts.stories.js +0 -1203
- package/dist/stories/components/PopupCharts/PopupCharts.style.js +0 -108
- package/dist/stories/components/PopupContent/PopupContent.js +0 -111
- package/dist/stories/components/PopupContent/PopupContent.style.js +0 -74
- package/dist/stories/components/PopupContent/PopupFieldsRules.js +0 -168
- package/dist/stories/components/ProductsVariety/ProductsVariety.js +0 -94
- package/dist/stories/components/ProductsVariety/ProductsVariety.stories.js +0 -91
- package/dist/stories/components/ProductsVariety/ProductsVariety.style.js +0 -86
- package/dist/stories/components/ProgressBar/ProgressBar.js +0 -52
- package/dist/stories/components/ProgressBar/ProgressBar.stories.js +0 -72
- package/dist/stories/components/ProgressBar/ProgressBar.style.js +0 -24
- package/dist/stories/components/QuarterPicker/QuarterPicker.js +0 -165
- package/dist/stories/components/QuarterPicker/QuarterPicker.stories.js +0 -140
- package/dist/stories/components/QuarterPicker/QuarterPicker.style.js +0 -102
- package/dist/stories/components/QuarterPicker/QuarterPopupPicker.js +0 -182
- package/dist/stories/components/QuickFilter/QuickFilter.js +0 -78
- package/dist/stories/components/QuickFilter/QuickFilter.stories.js +0 -281
- package/dist/stories/components/QuickFilter/QuickFilter.style.js +0 -21
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.js +0 -299
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.style.js +0 -194
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.js +0 -229
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.style.js +0 -139
- package/dist/stories/components/RangePicker/RangeDatePicker.js +0 -229
- package/dist/stories/components/RangePicker/RangePicker.js +0 -176
- package/dist/stories/components/RangePicker/RangePicker.stories.js +0 -138
- package/dist/stories/components/RangePicker/RangePicker.style.js +0 -107
- package/dist/stories/components/ReportTable/ReportTable.js +0 -262
- package/dist/stories/components/ReportTable/ReportTable.stories.js +0 -151
- package/dist/stories/components/ReportTable/ReportTable.style.js +0 -131
- package/dist/stories/components/SagButton/SagButton.js +0 -68
- package/dist/stories/components/SagButton/SagButton.stories.js +0 -118
- package/dist/stories/components/SagButton/SagButton.style.js +0 -47
- package/dist/stories/components/SagIconButton/SagIconButton.js +0 -130
- package/dist/stories/components/SagIconButton/SagIconButton.stories.js +0 -123
- package/dist/stories/components/SagIconButton/SagIconButton.style.js +0 -30
- package/dist/stories/components/SagInput/SagInput.js +0 -53
- package/dist/stories/components/SagInput/SagInput.stories.js +0 -69
- package/dist/stories/components/SagInput/SagInput.style.js +0 -41
- package/dist/stories/components/SalesAndROI/SalesAndROI.js +0 -89
- package/dist/stories/components/SalesAndROI/SalesAndROI.stories.js +0 -168
- package/dist/stories/components/SalesAndROI/SalesAndROI.style.js +0 -111
- package/dist/stories/components/SearchInput/SearchInput.js +0 -39
- package/dist/stories/components/SearchInput/SearchInput.stories.js +0 -44
- package/dist/stories/components/SearchInput/SearchInput.style.js +0 -37
- package/dist/stories/components/SegmentedButton/SegmentedButton.js +0 -122
- package/dist/stories/components/SegmentedButton/SegmentedButton.stories.js +0 -183
- package/dist/stories/components/SegmentedButton/SegmentedButton.style.js +0 -100
- package/dist/stories/components/Select/Select.js +0 -135
- package/dist/stories/components/Select/Select.stories.js +0 -200
- package/dist/stories/components/Select/Select.style.js +0 -102
- package/dist/stories/components/TabMenu/TabMenu.js +0 -214
- package/dist/stories/components/TabMenu/TabMenu.stories.js +0 -76
- package/dist/stories/components/TabMenu/TabMenu.style.js +0 -115
- package/dist/stories/components/Table/Table.js +0 -195
- package/dist/stories/components/Table/Table.stories.js +0 -104
- package/dist/stories/components/Table/Table.style.js +0 -86
- package/dist/stories/components/TextField/TextField.js +0 -209
- package/dist/stories/components/TextField/TextField.stories.js +0 -162
- package/dist/stories/components/TextField/TextField.style.js +0 -18
- package/dist/stories/components/TitleDescription/TitleDescription.js +0 -272
- package/dist/stories/components/TitleDescription/TitleDescription.stories.js +0 -117
- package/dist/stories/components/TitleDescription/TitleDescription.style.js +0 -222
- package/dist/stories/components/Tooltip/Tooltip.js +0 -31
- package/dist/stories/components/Tooltip/Tooltip.style.js +0 -103
- package/dist/stories/components/TopToggleList/TopToggleList.js +0 -46
- package/dist/stories/components/TopToggleList/TopToggleList.stories.js +0 -52
- package/dist/stories/components/TopToggleList/TopToggleList.style.js +0 -51
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.js +0 -97
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.stories.js +0 -138
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.style.js +0 -81
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.js +0 -342
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.stories.js +0 -343
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.style.js +0 -171
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.js +0 -149
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.stories.js +0 -172
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.style.js +0 -108
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.js +0 -165
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.stories.js +0 -185
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.style.js +0 -77
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.js +0 -186
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.stories.js +0 -291
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.style.js +0 -178
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.js +0 -229
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.stories.js +0 -228
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.style.js +0 -58
- package/dist/stories/components/TspanTooltip/TspanTooltip.js +0 -33
- package/dist/stories/components/TspanTooltip/TspanTooltip.style.js +0 -105
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.js +0 -204
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.stories.js +0 -185
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.style.js +0 -60
- package/dist/stories/icons/ArrowDownIcon.js +0 -27
- package/dist/stories/icons/ArrowDropDownIcon.js +0 -27
- package/dist/stories/icons/ArrowSelectIcon.js +0 -27
- package/dist/stories/icons/ArrowUpIcon.js +0 -27
- package/dist/stories/icons/AttachedIcon.js +0 -27
- package/dist/stories/icons/BellIcon.js +0 -27
- package/dist/stories/icons/Calendar.js +0 -20
- package/dist/stories/icons/CalendarIcon.js +0 -27
- package/dist/stories/icons/CalendarInOpen.js +0 -26
- package/dist/stories/icons/CheckBoxButtonCheckedIcon.js +0 -28
- package/dist/stories/icons/CheckBoxCheckedIcon.js +0 -28
- package/dist/stories/icons/CheckBoxNotCheckedIcon.js +0 -28
- package/dist/stories/icons/ChervronLeftIcon.js +0 -20
- package/dist/stories/icons/ChervronRightIcon.js +0 -20
- package/dist/stories/icons/ClockIcon.js +0 -27
- package/dist/stories/icons/CloseIcon.js +0 -27
- package/dist/stories/icons/CloseXIcon.js +0 -27
- package/dist/stories/icons/ComboBoxArrowDownIcon.js +0 -28
- package/dist/stories/icons/ComboBoxArrowUpIcon.js +0 -28
- package/dist/stories/icons/DocumentIcon.js +0 -48
- package/dist/stories/icons/DownloadIcon.js +0 -27
- package/dist/stories/icons/Duplicate.js +0 -28
- package/dist/stories/icons/ErrorIcon.js +0 -27
- package/dist/stories/icons/ExitIcon.js +0 -28
- package/dist/stories/icons/ExportIcon.js +0 -28
- package/dist/stories/icons/EyeIcon.js +0 -28
- package/dist/stories/icons/FileIcon.js +0 -27
- package/dist/stories/icons/FilterIcon.js +0 -36
- package/dist/stories/icons/FlyIcon.js +0 -28
- package/dist/stories/icons/FoodLionChartIcon.js +0 -42
- package/dist/stories/icons/FoodLionIcon.js +0 -3076
- package/dist/stories/icons/FoodLionNewIcon.js +0 -39
- package/dist/stories/icons/GiantFoodChartIcon.js +0 -40
- package/dist/stories/icons/GiantFoodIcon.js +0 -1976
- package/dist/stories/icons/GiantFoodIcon_new.js +0 -42
- package/dist/stories/icons/HannafordChartIcon.js +0 -40
- package/dist/stories/icons/HannafordIcon.js +0 -5017
- package/dist/stories/icons/HannafordIcon_new.js +0 -41
- package/dist/stories/icons/HannafordNewIcon.js +0 -213
- package/dist/stories/icons/InfoIcon.js +0 -28
- package/dist/stories/icons/LampIcon.js +0 -27
- package/dist/stories/icons/LegendLineIcon.js +0 -29
- package/dist/stories/icons/LegendUnionIcon.js +0 -29
- package/dist/stories/icons/MaintenanceIcon.js +0 -28
- package/dist/stories/icons/MenuItemClosedIcon.js +0 -28
- package/dist/stories/icons/MenuItemOpenIcon.js +0 -28
- package/dist/stories/icons/MenuItemRightIcon.js +0 -28
- package/dist/stories/icons/MenuItemUpIcon.js +0 -28
- package/dist/stories/icons/NoDataFoundIcon.js +0 -86
- package/dist/stories/icons/OptionsIcon.js +0 -27
- package/dist/stories/icons/SearchIcon.js +0 -27
- package/dist/stories/icons/ShoppingCartIcon.js +0 -45
- package/dist/stories/icons/ShoutIcon.js +0 -27
- package/dist/stories/icons/SpotlightProductIcon.js +0 -28
- package/dist/stories/icons/StopAndShopChartIcon.js +0 -42
- package/dist/stories/icons/StopAndShopIcon.js +0 -134
- package/dist/stories/icons/StopAndShopNewIcon.js +0 -41
- package/dist/stories/icons/SucceededIcon.js +0 -27
- package/dist/stories/icons/TheGiantCompanyChartIcon.js +0 -40
- package/dist/stories/icons/TheGiantCompanyIcon.js +0 -40
- package/dist/stories/icons/TheGiantCompanyNewIcon.js +0 -39
- package/dist/stories/utils/CommonFunctions.js +0 -83
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.Table = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _Table = require("./Table.style");
|
|
10
|
-
const Table = props => {
|
|
11
|
-
const {
|
|
12
|
-
tableKey,
|
|
13
|
-
data,
|
|
14
|
-
width,
|
|
15
|
-
height,
|
|
16
|
-
onCheckAllInput,
|
|
17
|
-
onSortClick,
|
|
18
|
-
onRowClick,
|
|
19
|
-
onRowInputClick,
|
|
20
|
-
onPaginationClick,
|
|
21
|
-
actionsColumn,
|
|
22
|
-
sizingTable,
|
|
23
|
-
showPagination,
|
|
24
|
-
rangePagination
|
|
25
|
-
} = props;
|
|
26
|
-
const [sortBy, setSortBy] = (0, _react.useState)(null);
|
|
27
|
-
const [sortOrder, setSortOrder] = (0, _react.useState)('asc');
|
|
28
|
-
const [resizing, setResizing] = (0, _react.useState)(false);
|
|
29
|
-
const [resizeColumn, setResizeColumn] = (0, _react.useState)(null);
|
|
30
|
-
const checkedRef = (0, _react.useRef)([]);
|
|
31
|
-
const [checkEvent, setCheckEvent] = (0, _react.useState)({
|
|
32
|
-
isSelectAll: false,
|
|
33
|
-
selected: [],
|
|
34
|
-
unselected: []
|
|
35
|
-
});
|
|
36
|
-
const [activePage, setActivePage] = (0, _react.useState)(1);
|
|
37
|
-
const [arrow, setArrow] = (0, _react.useState)(null);
|
|
38
|
-
const handleSort = (event, columnName) => {
|
|
39
|
-
if (!event.target.classList.contains('dragger')) {
|
|
40
|
-
setSortBy(columnName);
|
|
41
|
-
setSortOrder(prevSortOrder => prevSortOrder === 'asc' ? 'desc' : 'asc');
|
|
42
|
-
setArrow(prevArrow => prevArrow === '⭣' ? '⭡' : '⭣');
|
|
43
|
-
onSortClick({
|
|
44
|
-
sortType: sortOrder,
|
|
45
|
-
column: columnName,
|
|
46
|
-
data: sortedData
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
// the Server do the sorting so this function used for displaying Action data
|
|
52
|
-
const sortedData = [...data].sort((a, b) => {
|
|
53
|
-
if (sortOrder === 'asc') {
|
|
54
|
-
return a[sortBy] > b[sortBy] ? 1 : -1;
|
|
55
|
-
}
|
|
56
|
-
return a[sortBy] < b[sortBy] ? 1 : -1;
|
|
57
|
-
});
|
|
58
|
-
const handleSelectAllChange = event => {
|
|
59
|
-
setCheckEvent({
|
|
60
|
-
isSelectAll: event.target.checked,
|
|
61
|
-
selected: [],
|
|
62
|
-
unselected: []
|
|
63
|
-
});
|
|
64
|
-
checkedRef.current.map(item => {
|
|
65
|
-
item.checked = event.target.checked;
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
const m_pos = (0, _react.useRef)(null);
|
|
69
|
-
const handleMouseDown = (e, columnName) => {
|
|
70
|
-
m_pos.current = e.clientX;
|
|
71
|
-
setResizing(true);
|
|
72
|
-
setResizeColumn(columnName);
|
|
73
|
-
};
|
|
74
|
-
const handleMouseMove = e => {
|
|
75
|
-
if (resizing) {
|
|
76
|
-
const th = document.querySelector(`th[data-column="${resizeColumn}"]`);
|
|
77
|
-
const dx = e.clientX - m_pos.current;
|
|
78
|
-
m_pos.current = e.clientX;
|
|
79
|
-
th.style.width = `${parseInt(getComputedStyle(th, '').width) + dx}px`;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const handleMouseUp = () => {
|
|
83
|
-
setResizing(false);
|
|
84
|
-
setResizeColumn(null);
|
|
85
|
-
};
|
|
86
|
-
const onRowClickHandler = (event, row) => {
|
|
87
|
-
if (event.target.type !== 'checkbox') {
|
|
88
|
-
onRowClick(row);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
const handleCheckboxChange = (event, row) => {
|
|
92
|
-
if (event.target.checked) {
|
|
93
|
-
const updatedUnSelected = checkEvent.unselected.filter(item => item.key !== row.key);
|
|
94
|
-
setCheckEvent({
|
|
95
|
-
...checkEvent,
|
|
96
|
-
unselected: updatedUnSelected,
|
|
97
|
-
selected: [...checkEvent.selected, row]
|
|
98
|
-
});
|
|
99
|
-
} else {
|
|
100
|
-
const updatedSelected = checkEvent.selected.filter(item => item.key !== row.key);
|
|
101
|
-
setCheckEvent({
|
|
102
|
-
...checkEvent,
|
|
103
|
-
unselected: [...checkEvent.unselected, row],
|
|
104
|
-
selected: updatedSelected
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
const onPaginationClickHandler = (event, page) => {
|
|
109
|
-
setActivePage(page);
|
|
110
|
-
onPaginationClick(event, page);
|
|
111
|
-
};
|
|
112
|
-
(0, _react.useEffect)(() => {
|
|
113
|
-
onCheckAllInput(checkEvent);
|
|
114
|
-
}, [checkEvent]);
|
|
115
|
-
(0, _react.useEffect)(() => {
|
|
116
|
-
document.addEventListener('mousemove', handleMouseMove, false);
|
|
117
|
-
document.addEventListener('mouseup', handleMouseUp, false);
|
|
118
|
-
return () => {
|
|
119
|
-
document.removeEventListener('mousemove', handleMouseMove, false);
|
|
120
|
-
document.removeEventListener('mouseup', handleMouseUp, false);
|
|
121
|
-
};
|
|
122
|
-
}, [resizing]);
|
|
123
|
-
const pages = Array.from({
|
|
124
|
-
length: rangePagination
|
|
125
|
-
}, (_, index) => index + 1);
|
|
126
|
-
return /*#__PURE__*/_react.default.createElement(_Table.TableWrapper, {
|
|
127
|
-
key: tableKey
|
|
128
|
-
}, /*#__PURE__*/_react.default.createElement(_Table.TableTag, {
|
|
129
|
-
width: width,
|
|
130
|
-
height: height
|
|
131
|
-
}, /*#__PURE__*/_react.default.createElement(_Table.Thead, null, /*#__PURE__*/_react.default.createElement("tr", null, actionsColumn && /*#__PURE__*/_react.default.createElement("th", {
|
|
132
|
-
className: "actions-th"
|
|
133
|
-
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
134
|
-
type: "checkbox",
|
|
135
|
-
onChange: handleSelectAllChange
|
|
136
|
-
})), Object.keys(data[0]).map(column => /*#__PURE__*/_react.default.createElement("th", {
|
|
137
|
-
key: column,
|
|
138
|
-
"data-column": column,
|
|
139
|
-
onClick: event => handleSort(event, column)
|
|
140
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, column), sortBy === column && /*#__PURE__*/_react.default.createElement("span", {
|
|
141
|
-
dangerouslySetInnerHTML: {
|
|
142
|
-
__html: arrow
|
|
143
|
-
}
|
|
144
|
-
}), sizingTable && /*#__PURE__*/_react.default.createElement(_Table.Dragger, {
|
|
145
|
-
className: "dragger",
|
|
146
|
-
onMouseDown: e => handleMouseDown(e, column)
|
|
147
|
-
}))))), /*#__PURE__*/_react.default.createElement(_Table.Tbody, null, data.map(row => /*#__PURE__*/_react.default.createElement("tr", {
|
|
148
|
-
key: row.key,
|
|
149
|
-
onClick: event => onRowClickHandler(event, row)
|
|
150
|
-
}, actionsColumn && /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", {
|
|
151
|
-
ref: el => checkedRef.current[row.key] = el,
|
|
152
|
-
type: "checkbox",
|
|
153
|
-
onChange: event => handleCheckboxChange(event, row)
|
|
154
|
-
})), Object.keys(row).map(column => /*#__PURE__*/_react.default.createElement("td", {
|
|
155
|
-
key: column
|
|
156
|
-
}, row[column])))))), showPagination && /*#__PURE__*/_react.default.createElement(_Table.Pagination, null, /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_Table.PaginationButton, {
|
|
157
|
-
className: "double-arrow",
|
|
158
|
-
onClick: event => onPaginationClickHandler(event, 1)
|
|
159
|
-
}, "\xAB")), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_Table.PaginationButton, {
|
|
160
|
-
className: "single-arrow",
|
|
161
|
-
onClick: event => onPaginationClickHandler(event, activePage - 1)
|
|
162
|
-
}, "\u2039")), pages.map(page => /*#__PURE__*/_react.default.createElement("li", {
|
|
163
|
-
key: page
|
|
164
|
-
}, /*#__PURE__*/_react.default.createElement(_Table.PaginationButton, {
|
|
165
|
-
className: page === activePage ? 'active' : '',
|
|
166
|
-
onClick: event => onPaginationClickHandler(event, page)
|
|
167
|
-
}, page))), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_Table.PaginationButton, {
|
|
168
|
-
className: "single-arrow",
|
|
169
|
-
onClick: event => onPaginationClickHandler(event, activePage + 1)
|
|
170
|
-
}, "\u203A")), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_Table.PaginationButton, {
|
|
171
|
-
className: "double-arrow",
|
|
172
|
-
onClick: event => onPaginationClickHandler(event, pages.length)
|
|
173
|
-
}, "\xBB"))));
|
|
174
|
-
};
|
|
175
|
-
exports.Table = Table;
|
|
176
|
-
var _default = exports.default = Table;
|
|
177
|
-
Table.defaultProps = {
|
|
178
|
-
tableKey: '1',
|
|
179
|
-
data: [{
|
|
180
|
-
key: '',
|
|
181
|
-
name: '',
|
|
182
|
-
age: 2
|
|
183
|
-
}],
|
|
184
|
-
width: '100%',
|
|
185
|
-
height: 'auto',
|
|
186
|
-
onCheckAllInput: () => {},
|
|
187
|
-
onSortClick: () => {},
|
|
188
|
-
onRowClick: () => {},
|
|
189
|
-
onRowInputClick: () => {},
|
|
190
|
-
onPaginationClick: () => {},
|
|
191
|
-
showPagination: true,
|
|
192
|
-
sizingTable: true,
|
|
193
|
-
actionsColumn: true,
|
|
194
|
-
rangePagination: 5
|
|
195
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.MainTable = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _Table = require("./Table");
|
|
10
|
-
const theData = [{
|
|
11
|
-
key: '1',
|
|
12
|
-
name: 'oren',
|
|
13
|
-
age: 35
|
|
14
|
-
}, {
|
|
15
|
-
key: '2',
|
|
16
|
-
name: 'dror',
|
|
17
|
-
age: 16
|
|
18
|
-
}, {
|
|
19
|
-
key: '3',
|
|
20
|
-
name: 'andrey',
|
|
21
|
-
age: 22
|
|
22
|
-
}, {
|
|
23
|
-
key: '4',
|
|
24
|
-
name: 'hai',
|
|
25
|
-
age: 46
|
|
26
|
-
}];
|
|
27
|
-
var _default = exports.default = {
|
|
28
|
-
title: 'Sag Campaign Tool/Table',
|
|
29
|
-
component: _Table.Table,
|
|
30
|
-
tags: ['autodocs'],
|
|
31
|
-
argTypes: {
|
|
32
|
-
width: {
|
|
33
|
-
name: 'Width',
|
|
34
|
-
control: {
|
|
35
|
-
type: 'text'
|
|
36
|
-
},
|
|
37
|
-
description: 'Table width'
|
|
38
|
-
},
|
|
39
|
-
height: {
|
|
40
|
-
name: 'Height',
|
|
41
|
-
control: {
|
|
42
|
-
type: 'text'
|
|
43
|
-
},
|
|
44
|
-
description: 'Table height'
|
|
45
|
-
},
|
|
46
|
-
onCheckAllInput: {
|
|
47
|
-
name: 'Check all input event',
|
|
48
|
-
action: 'onClick',
|
|
49
|
-
description: 'Click on check all'
|
|
50
|
-
},
|
|
51
|
-
onSortClick: {
|
|
52
|
-
name: 'Table head sorting event',
|
|
53
|
-
action: 'onClick',
|
|
54
|
-
description: 'Click on table head sorting'
|
|
55
|
-
},
|
|
56
|
-
onRowClick: {
|
|
57
|
-
name: 'Click on row event',
|
|
58
|
-
action: 'onClick',
|
|
59
|
-
description: 'Click on a certain row in table'
|
|
60
|
-
},
|
|
61
|
-
onRowInputClick: {
|
|
62
|
-
name: 'Checkbox row event',
|
|
63
|
-
action: 'onClick',
|
|
64
|
-
description: 'Click on a certain row checkbox '
|
|
65
|
-
},
|
|
66
|
-
actionsColumn: {
|
|
67
|
-
name: 'Show action column',
|
|
68
|
-
control: {
|
|
69
|
-
type: 'boolean'
|
|
70
|
-
},
|
|
71
|
-
description: 'show/hide action column',
|
|
72
|
-
defaultValue: true
|
|
73
|
-
},
|
|
74
|
-
sizingTable: {
|
|
75
|
-
name: 'Sizing table columns',
|
|
76
|
-
control: {
|
|
77
|
-
type: 'boolean'
|
|
78
|
-
},
|
|
79
|
-
description: 'Sizing table columns ability',
|
|
80
|
-
defaultValue: true
|
|
81
|
-
},
|
|
82
|
-
showPagination: {
|
|
83
|
-
name: 'Show Pagination',
|
|
84
|
-
control: {
|
|
85
|
-
type: 'boolean'
|
|
86
|
-
},
|
|
87
|
-
description: 'hide/show pagination',
|
|
88
|
-
defaultValue: true
|
|
89
|
-
},
|
|
90
|
-
rangePagination: {
|
|
91
|
-
name: 'Range Pagination',
|
|
92
|
-
control: {
|
|
93
|
-
type: 'number'
|
|
94
|
-
},
|
|
95
|
-
description: 'How many button representing pages will shown in the range'
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
const MainTable = exports.MainTable = {
|
|
100
|
-
args: {
|
|
101
|
-
data: theData,
|
|
102
|
-
rangePagination: 5
|
|
103
|
-
}
|
|
104
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.Thead = exports.Tbody = exports.TableWrapper = exports.TableTag = exports.PaginationButton = exports.Pagination = exports.Dragger = void 0;
|
|
8
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
const TableWrapper = exports.TableWrapper = _styledComponents.default.div`
|
|
10
|
-
font-family: "Poppins", sans-serif;
|
|
11
|
-
background-color: white;
|
|
12
|
-
`;
|
|
13
|
-
const TableTag = exports.TableTag = _styledComponents.default.table`
|
|
14
|
-
border-collapse: collapse;
|
|
15
|
-
table-layout: fixed;
|
|
16
|
-
width: ${props => props.width};
|
|
17
|
-
height: ${props => props.height};
|
|
18
|
-
margin-bottom: 15px;
|
|
19
|
-
th,
|
|
20
|
-
td {
|
|
21
|
-
position: relative;
|
|
22
|
-
font-weight: 400;
|
|
23
|
-
border: 1px solid #ddd;
|
|
24
|
-
padding: 8px;
|
|
25
|
-
}
|
|
26
|
-
`;
|
|
27
|
-
const Thead = exports.Thead = _styledComponents.default.thead`
|
|
28
|
-
color: white;
|
|
29
|
-
background-color: #000000;
|
|
30
|
-
tr {
|
|
31
|
-
> th {
|
|
32
|
-
position: relative;
|
|
33
|
-
&.actions-th,
|
|
34
|
-
&:last-of-type {
|
|
35
|
-
> div {
|
|
36
|
-
display: none;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&.actions-th {
|
|
41
|
-
width: 22px;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
`;
|
|
46
|
-
const Tbody = exports.Tbody = _styledComponents.default.tbody`
|
|
47
|
-
tr {
|
|
48
|
-
&:nth-child(even) {
|
|
49
|
-
background-color: #f2f2f2;
|
|
50
|
-
}
|
|
51
|
-
&:hover {
|
|
52
|
-
background-color: #ddd;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
`;
|
|
56
|
-
const Dragger = exports.Dragger = _styledComponents.default.div`
|
|
57
|
-
width: 5px;
|
|
58
|
-
height: 100%;
|
|
59
|
-
position: absolute;
|
|
60
|
-
top: 0;
|
|
61
|
-
right: 0;
|
|
62
|
-
cursor: col-resize;
|
|
63
|
-
`;
|
|
64
|
-
const Pagination = exports.Pagination = _styledComponents.default.ul`
|
|
65
|
-
display: flex;
|
|
66
|
-
list-style: none;
|
|
67
|
-
padding: 0;
|
|
68
|
-
margin: 0;
|
|
69
|
-
gap: 5px;
|
|
70
|
-
`;
|
|
71
|
-
const PaginationButton = exports.PaginationButton = _styledComponents.default.button`
|
|
72
|
-
display: inline-block;
|
|
73
|
-
padding: 8px 12px;
|
|
74
|
-
background-color: #ffffff;
|
|
75
|
-
border: 1px solid #ccc;
|
|
76
|
-
text-decoration: none;
|
|
77
|
-
color: #333;
|
|
78
|
-
border-radius: 4px;
|
|
79
|
-
cursor: pointer;
|
|
80
|
-
&:hover, &:focus {
|
|
81
|
-
background-color: #e0e0e0;
|
|
82
|
-
}
|
|
83
|
-
&.active {
|
|
84
|
-
background-color: #aaa;
|
|
85
|
-
}
|
|
86
|
-
`;
|
|
@@ -1,209 +0,0 @@
|
|
|
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.TextField = void 0;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
11
|
-
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
12
|
-
var _OutlinedInput = _interopRequireDefault(require("@mui/material/OutlinedInput"));
|
|
13
|
-
var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
|
|
14
|
-
var _InputAdornment = _interopRequireDefault(require("@mui/material/InputAdornment"));
|
|
15
|
-
var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
|
|
16
|
-
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
17
|
-
var _Visibility = _interopRequireDefault(require("@mui/icons-material/Visibility"));
|
|
18
|
-
var _VisibilityOff = _interopRequireDefault(require("@mui/icons-material/VisibilityOff"));
|
|
19
|
-
var _styles = require("@mui/material/styles");
|
|
20
|
-
var _TextField2 = require("./TextField.style");
|
|
21
|
-
/**
|
|
22
|
-
* SAG TextField
|
|
23
|
-
*/
|
|
24
|
-
const TextField = exports.TextField = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
25
|
-
let {
|
|
26
|
-
width = '100%',
|
|
27
|
-
height = '49px',
|
|
28
|
-
label,
|
|
29
|
-
focusColor,
|
|
30
|
-
shape,
|
|
31
|
-
size,
|
|
32
|
-
placeHolder = 'Enter your email address',
|
|
33
|
-
passwordField = false,
|
|
34
|
-
defaultValue,
|
|
35
|
-
resetDefaultValue,
|
|
36
|
-
required,
|
|
37
|
-
inputRef,
|
|
38
|
-
allowedInput = 'all',
|
|
39
|
-
onChange,
|
|
40
|
-
multiline = false
|
|
41
|
-
} = _ref;
|
|
42
|
-
const [currentInputValue, setCurrentInputValue] = (0, _react.useState)(null);
|
|
43
|
-
const [showPassword, setShowPassword] = _react.default.useState(false);
|
|
44
|
-
const handleClickShowPassword = () => setShowPassword(show => !show);
|
|
45
|
-
const onChangeHandler = event => {
|
|
46
|
-
onChange(event);
|
|
47
|
-
setCurrentInputValue({
|
|
48
|
-
event,
|
|
49
|
-
value: event.target.value
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
const theme = (0, _styles.createTheme)({
|
|
53
|
-
components: {
|
|
54
|
-
MuiFormLabel: {
|
|
55
|
-
styleOverrides: {
|
|
56
|
-
asterisk: {
|
|
57
|
-
color: '#db3131'
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
const handleMouseDownPassword = event => {
|
|
64
|
-
event.preventDefault();
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
// defines shape: squire or round
|
|
68
|
-
const getTextFieldStyle = () => {
|
|
69
|
-
if (shape === 'round') {
|
|
70
|
-
return {
|
|
71
|
-
'& .MuiOutlinedInput-root': {
|
|
72
|
-
width: {
|
|
73
|
-
width
|
|
74
|
-
},
|
|
75
|
-
height: {
|
|
76
|
-
height
|
|
77
|
-
},
|
|
78
|
-
paddingTop: multiline ? '12px' : '0',
|
|
79
|
-
marginTop: 0,
|
|
80
|
-
borderColor: 'green',
|
|
81
|
-
borderRadius: '12px',
|
|
82
|
-
legend: {
|
|
83
|
-
marginLeft: '6px'
|
|
84
|
-
},
|
|
85
|
-
alignItems: multiline ? 'flex-start' : 'center',
|
|
86
|
-
'&.Mui-focused fieldset': {
|
|
87
|
-
borderColor: focusColor
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
'& label.Mui-focused': {
|
|
91
|
-
color: focusColor
|
|
92
|
-
},
|
|
93
|
-
'& .MuiAutocomplete-inputRoot': {
|
|
94
|
-
paddingLeft: '10px !important',
|
|
95
|
-
borderRadius: '12px'
|
|
96
|
-
},
|
|
97
|
-
'& .MuiInputLabel-outlined': {
|
|
98
|
-
paddingLeft: '10px',
|
|
99
|
-
// color: focusColor,
|
|
100
|
-
paddingTop: '4px'
|
|
101
|
-
},
|
|
102
|
-
'& .MuiInputLabel-shrink': {
|
|
103
|
-
marginLeft: '1px',
|
|
104
|
-
paddingLeft: '4px',
|
|
105
|
-
paddingRight: 0,
|
|
106
|
-
background: 'white',
|
|
107
|
-
paddingTop: 0
|
|
108
|
-
},
|
|
109
|
-
'& .MuiInputLabel-root': {
|
|
110
|
-
fontFamily: 'Poppins'
|
|
111
|
-
},
|
|
112
|
-
'& .MuiInputBase-inputSizeSmall': {
|
|
113
|
-
fontFamily: 'Poppins'
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
// square
|
|
118
|
-
return null;
|
|
119
|
-
};
|
|
120
|
-
const isInputAllowed = inputChar => {
|
|
121
|
-
const NUMERIC_REGEX = /^[0-9-]+$/;
|
|
122
|
-
const ALPHA_REGEX = /^[a-zA-Z]+$/;
|
|
123
|
-
const ALPHA_NUMERIC_REGEX = /^[a-zA-Z0-9-]+$/;
|
|
124
|
-
switch (allowedInput) {
|
|
125
|
-
case 'all':
|
|
126
|
-
return true;
|
|
127
|
-
case 'alpha':
|
|
128
|
-
if (ALPHA_REGEX.test(inputChar)) return true;
|
|
129
|
-
return false;
|
|
130
|
-
case 'numeric':
|
|
131
|
-
if (NUMERIC_REGEX.test(inputChar)) return true;
|
|
132
|
-
return false;
|
|
133
|
-
case 'alphaNumeric':
|
|
134
|
-
if (ALPHA_NUMERIC_REGEX.test(inputChar)) return true;
|
|
135
|
-
return false;
|
|
136
|
-
default:
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
return /*#__PURE__*/_react.default.createElement(_TextField2.TextFieldContainer, {
|
|
141
|
-
id: "TextFieldContainer",
|
|
142
|
-
width: width
|
|
143
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.ThemeProvider, {
|
|
144
|
-
theme: theme
|
|
145
|
-
}, /*#__PURE__*/_react.default.createElement(_Box.default, null, !passwordField && /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
|
146
|
-
key: resetDefaultValue,
|
|
147
|
-
label: label,
|
|
148
|
-
multiline: multiline,
|
|
149
|
-
defaultValue: defaultValue,
|
|
150
|
-
placeholder: placeHolder,
|
|
151
|
-
id: "outlined-start-adornment",
|
|
152
|
-
sx: getTextFieldStyle(),
|
|
153
|
-
size: size,
|
|
154
|
-
required: required,
|
|
155
|
-
inputRef: inputRef !== null && inputRef !== void 0 ? inputRef : null,
|
|
156
|
-
ref: ref !== null && ref !== void 0 ? ref : null,
|
|
157
|
-
onKeyDown: event => {
|
|
158
|
-
if (!isInputAllowed(event.key)) {
|
|
159
|
-
event.preventDefault();
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
onChange: event => {
|
|
163
|
-
onChangeHandler(event);
|
|
164
|
-
},
|
|
165
|
-
InputProps: {
|
|
166
|
-
textalign: 'flex-start',
|
|
167
|
-
alignitems: 'flex-start',
|
|
168
|
-
aligncontent: 'flex-start',
|
|
169
|
-
disableunderline: true.toString(),
|
|
170
|
-
style: {
|
|
171
|
-
textalign: 'start',
|
|
172
|
-
'&::placeholder': {
|
|
173
|
-
color: '#B1B1B1'
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}), passwordField && /*#__PURE__*/_react.default.createElement(_FormControl.default, {
|
|
178
|
-
sx: getTextFieldStyle(),
|
|
179
|
-
variant: "outlined"
|
|
180
|
-
}, /*#__PURE__*/_react.default.createElement(_InputLabel.default, {
|
|
181
|
-
htmlFor: "outlined-adornment-password"
|
|
182
|
-
}, label), /*#__PURE__*/_react.default.createElement(_OutlinedInput.default, {
|
|
183
|
-
id: "outlined-adornment-password",
|
|
184
|
-
type: showPassword ? 'text' : 'password',
|
|
185
|
-
size: size,
|
|
186
|
-
endAdornment: /*#__PURE__*/_react.default.createElement(_InputAdornment.default, {
|
|
187
|
-
position: "end"
|
|
188
|
-
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
189
|
-
"aria-label": "toggle password visibility",
|
|
190
|
-
onClick: handleClickShowPassword,
|
|
191
|
-
onMouseDown: handleMouseDownPassword,
|
|
192
|
-
edge: "end"
|
|
193
|
-
}, showPassword ? /*#__PURE__*/_react.default.createElement(_Visibility.default, null) : /*#__PURE__*/_react.default.createElement(_VisibilityOff.default, null))),
|
|
194
|
-
defaultValue: defaultValue,
|
|
195
|
-
label: label,
|
|
196
|
-
multiline: multiline,
|
|
197
|
-
inputRef: inputRef !== null && inputRef !== void 0 ? inputRef : null,
|
|
198
|
-
ref: ref !== null && ref !== void 0 ? ref : null,
|
|
199
|
-
onKeyDown: event => {
|
|
200
|
-
if (!isInputAllowed(event.key)) {
|
|
201
|
-
event.preventDefault();
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
onChange: event => {
|
|
205
|
-
onChangeHandler(event);
|
|
206
|
-
}
|
|
207
|
-
})))));
|
|
208
|
-
});
|
|
209
|
-
var _default = exports.default = TextField;
|