@rio-cloud/rio-uikit 0.16.1-beta.21 → 0.16.1-beta.22
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/DeviceUtils.js +1 -1
- package/GroupSelectionUtil.js +1 -1
- package/README.md +15 -0
- package/SortDirection.js +1 -1
- package/SortUtils.js +1 -1
- package/VolkswagenApplicationHeader.js +1 -1
- package/components/actionBarItem/ActionBarItem.js +31 -49
- package/components/actionBarItem/ActionBarItemIcon.js +2 -3
- package/components/actionBarItem/ActionBarItemList.js +2 -3
- package/components/actionBarItem/ActionBarItemListItem.js +5 -6
- package/components/actionBarItem/ActionBarItemListSeparator.js +1 -2
- package/components/actionBarItem/ActionBarItemPopoverContent.js +2 -3
- package/components/actionBarItem/ActionBarOverlay.js +9 -14
- package/components/activity/Activity.js +6 -12
- package/components/animatedNumber/AnimatedNumber.js +11 -14
- package/components/applicationHeader/AppMenu.js +10 -12
- package/components/applicationHeader/AppMenuDropdown.js +8 -17
- package/components/applicationHeader/ApplicationActionBar.js +4 -5
- package/components/applicationHeader/ApplicationHeader.js +12 -17
- package/components/applicationHeader/MobileAppMenu.js +6 -9
- package/components/applicationHeader/MobileHeaderModal.js +5 -5
- package/components/applicationHeader/MobileSubmoduleNavigation.js +5 -8
- package/components/applicationHeader/NavItems.js +35 -44
- package/components/applicationLayout/ApplicationLayout.js +5 -5
- package/components/applicationLayout/ApplicationLayoutBody.js +12 -18
- package/components/applicationLayout/ApplicationLayoutBodyBanner.js +5 -6
- package/components/applicationLayout/ApplicationLayoutBodyBottomBar.js +4 -5
- package/components/applicationLayout/ApplicationLayoutBodyNavigation.js +2 -3
- package/components/applicationLayout/ApplicationLayoutHeader.js +2 -3
- package/components/applicationLayout/ApplicationLayoutSidebar.js +2 -3
- package/components/applicationLayout/SubNavigation.js +3 -4
- package/components/assetTree/AssetTree.js +29 -51
- package/components/assetTree/Tree.js +56 -140
- package/components/assetTree/TreeCategory.js +0 -2
- package/components/assetTree/TreeLeaf.js +5 -5
- package/components/assetTree/TreeLeafList.js +5 -10
- package/components/assetTree/TreeNode.js +5 -5
- package/components/assetTree/TreeNodeContainer.js +2 -4
- package/components/assetTree/TreeOption.js +4 -7
- package/components/assetTree/TreeOptions.js +3 -7
- package/components/assetTree/TreeRoot.js +1 -3
- package/components/assetTree/TreeSearch.js +3 -3
- package/components/assetTree/TreeSelectAll.js +4 -8
- package/components/assetTree/TreeSidebar.js +4 -11
- package/components/assetTree/TreeSummary.js +6 -8
- package/components/assetTree/TypeCounter.js +8 -14
- package/components/autosuggest/AutoSuggest.js +31 -72
- package/components/bottomSheet/BottomSheet.js +20 -29
- package/components/browserWarning/BrowserWarning.js +9 -14
- package/components/browserWarning/BrowserWarningMessageDE.js +0 -2
- package/components/browserWarning/BrowserWarningMessageEN.js +0 -2
- package/components/button/Button.js +29 -29
- package/components/button/ToggleButton.js +0 -2
- package/components/carousel/Carousel.js +4 -1
- package/components/carousel/CarouselCaption.js +6 -15
- package/components/carousel/CarouselItem.js +9 -27
- package/components/charts/Area.js +0 -1
- package/components/charts/AreaChart.js +19 -23
- package/components/charts/AreaGradient.js +1 -3
- package/components/charts/Bar.js +0 -1
- package/components/charts/BarChart.js +21 -28
- package/components/charts/ChartNeedle.js +9 -15
- package/components/charts/ChartTooltip.js +0 -1
- package/components/charts/Legend.js +0 -1
- package/components/charts/Line.js +0 -1
- package/components/charts/LineChart.js +21 -24
- package/components/charts/PieChart.js +25 -29
- package/components/charts/RadialBarChart.js +26 -30
- package/components/charts/chartHelper.js +0 -5
- package/components/checkbox/Checkbox.js +26 -41
- package/components/clearableInput/ClearableInput.js +25 -42
- package/components/collapse/Collapse.js +6 -22
- package/components/contentLoader/ContentLoader.js +7 -17
- package/components/dataTabs/DataTab.js +6 -9
- package/components/dataTabs/DataTabs.js +20 -32
- package/components/datepicker/DatePicker.js +9 -16
- package/components/datepicker/DateRangePicker.js +104 -122
- package/components/dialog/ConfirmationDialog.js +10 -8
- package/components/dialog/Dialog.js +22 -35
- package/components/dialog/DialogBody.js +2 -5
- package/components/dialog/DialogFooter.js +2 -5
- package/components/dialog/DialogHeader.js +5 -8
- package/components/dialog/InfoDialog.js +2 -7
- package/components/dialog/MediaDialog.js +11 -30
- package/components/dialog/ReleaseNotesDialog.js +1 -7
- package/components/dialog/SaveDialog.js +7 -11
- package/components/dialog/SimpleDialog.js +3 -7
- package/components/dialog/SplitDialog.js +3 -8
- package/components/driverName/DriverName.js +2 -3
- package/components/dropdown/ButtonDropdown.js +32 -52
- package/components/dropdown/Caret.js +0 -2
- package/components/dropdown/DropdownSubmenu.js +4 -7
- package/components/dropdown/DropdownToggleButton.js +8 -11
- package/components/dropdown/SimpleButtonDropdown.js +0 -2
- package/components/dropdown/SingleButtonDropdown.js +0 -2
- package/components/dropdown/SplitButtonDropdown.js +0 -2
- package/components/dropdown/SplitCaretButton.js +3 -4
- package/components/expander/ExpanderList.js +15 -35
- package/components/expander/ExpanderPanel.js +22 -27
- package/components/fade/Fade.js +14 -19
- package/components/filepicker/FilePicker.js +17 -36
- package/components/listMenu/ListMenu.js +34 -65
- package/components/loadMore/LoadMoreButton.js +6 -7
- package/components/loadMore/LoadMoreProgress.js +1 -3
- package/components/map/components/Map.js +56 -97
- package/components/map/components/features/ContextMenu.js +38 -48
- package/components/map/components/features/ContextMenuItem.js +2 -4
- package/components/map/components/features/MapSettings.js +6 -14
- package/components/map/components/features/Route.js +29 -51
- package/components/map/components/features/basics/Circle.js +9 -15
- package/components/map/components/features/basics/MapLayerGroup.js +9 -20
- package/components/map/components/features/basics/Polygon.js +6 -14
- package/components/map/components/features/basics/Polyline.js +15 -22
- package/components/map/components/features/basics/marker/DomMarker.js +2 -16
- package/components/map/components/features/basics/marker/Marker.js +9 -31
- package/components/map/components/features/basics/marker/TextMarker.js +6 -17
- package/components/map/components/features/layers/IncidentsLayer.js +0 -4
- package/components/map/components/features/layers/Layer.js +3 -5
- package/components/map/components/features/layers/MarkerLayer.js +5 -13
- package/components/map/components/features/layers/TrafficLayer.js +0 -4
- package/components/map/components/features/layers/TruckLayer.js +1 -4
- package/components/map/components/features/layers/baselayers/BaseLayer.js +6 -10
- package/components/map/components/features/layers/baselayers/DefaultLayer.js +3 -3
- package/components/map/components/features/layers/baselayers/FleetStyleLayer.js +0 -3
- package/components/map/components/features/layers/baselayers/SatelliteLayer.js +0 -3
- package/components/map/components/features/layers/baselayers/TerrainLayer.js +0 -3
- package/components/map/components/features/layers/clustering/ClusterLayer.js +12 -19
- package/components/map/components/features/layers/clustering/SimpleClusterLayer.js +1 -8
- package/components/map/components/features/settings/MapSettingsItem.js +4 -6
- package/components/map/components/features/settings/MapSettingsPanel.js +1 -3
- package/components/map/components/features/settings/MapSettingsTile.js +11 -18
- package/components/map/components/features/settings/ZoomButtons.js +1 -3
- package/components/map/components/features/settings/builtinSettings/MapClusterSettings.js +3 -7
- package/components/map/components/features/settings/builtinSettings/MapLayerSettings.js +4 -7
- package/components/map/components/features/settings/builtinSettings/MapTypeSettings.js +2 -10
- package/components/map/components/features/settings/buttons/MapBoundingBoxButton.js +2 -5
- package/components/map/components/features/settings/buttons/MapCenterMarkerButton.js +2 -5
- package/components/map/components/features/settings/buttons/MapLockMarkerButton.js +2 -5
- package/components/map/components/features/settings/items/MapCustomerPoiSettingsItem.js +2 -6
- package/components/map/components/features/settings/items/MapLayerIncidentsItem.js +3 -7
- package/components/map/components/features/settings/items/MapLayerRoadRestrictionsItem.js +3 -7
- package/components/map/components/features/settings/items/MapLayerTrafficItem.js +3 -7
- package/components/map/components/features/settings/items/MapWorkshopPoiSettingsItem.js +2 -6
- package/components/map/components/mapUtils.js +1 -26
- package/components/map/icons/MapIcon.js +9 -7
- package/components/map/utils/clustering.js +0 -9
- package/components/map/utils/eventHandling.js +0 -21
- package/components/map/utils/hooks.js +1 -3
- package/components/map/utils/localization.js +0 -8
- package/components/map/utils/positions.js +0 -12
- package/components/mapMarker/ClusterMapMarker.js +7 -14
- package/components/mapMarker/SingleMapMarker.js +13 -23
- package/components/menuItems/MenuItem.js +8 -17
- package/components/menuItems/MenuItems.js +3 -4
- package/components/menuItems/getMenuItems.js +0 -2
- package/components/navigation/AppNavigationBar.js +4 -5
- package/components/noData/NoData.js +5 -10
- package/components/notification/Notification.js +3 -1
- package/components/notification/NotificationsContainer.js +0 -2
- package/components/numberControl/NumberControl.js +30 -49
- package/components/numberInput/NumberInput.js +29 -39
- package/components/onboarding/OnboardingTip.js +17 -15
- package/components/overlay/OverlayTrigger.js +1 -2
- package/components/pager/Pager.js +13 -19
- package/components/popover/Popover.js +6 -7
- package/components/position/Position.js +2 -7
- package/components/preloader/ImagePreloader.js +12 -24
- package/components/radiobutton/RadioButton.js +25 -35
- package/components/releaseNotes/ReleaseNotes.js +3 -11
- package/components/resizer/Resizer.js +6 -26
- package/components/selects/BaseDropdownMenu.js +29 -61
- package/components/selects/DropdownHeader.js +2 -4
- package/components/selects/Multiselect.js +43 -63
- package/components/selects/Select.js +42 -57
- package/components/sidebars/Sidebar.js +46 -70
- package/components/slider/RangeSlider.js +40 -72
- package/components/slider/Slider.js +17 -26
- package/components/spinner/Spinner.js +9 -18
- package/components/states/CustomState.js +20 -30
- package/components/states/EmptyState.js +0 -2
- package/components/states/ErrorState.js +0 -2
- package/components/states/ForbiddenState.js +0 -2
- package/components/states/MaintenanceState.js +0 -2
- package/components/states/NotBookedState.js +2 -5
- package/components/states/NotFoundState.js +0 -2
- package/components/statsWidget/StatsWidget.js +4 -7
- package/components/statsWidget/StatsWidgetBody.js +3 -6
- package/components/statsWidget/StatsWidgetFooter.js +2 -5
- package/components/statsWidget/StatsWidgetHeader.js +2 -5
- package/components/statsWidget/StatsWidgetNumber.js +5 -8
- package/components/statsWidget/StatsWidgetSpacer.js +1 -4
- package/components/statsWidget/StatsWidgets.js +2 -5
- package/components/statusBar/StatusBar.js +19 -45
- package/components/steppedProgressBar/SteppedProgressBar.js +9 -16
- package/components/supportMarker/toggleSupportMarker.js +0 -4
- package/components/switch/Switch.js +12 -14
- package/components/table/TableCardsSorting.js +2 -13
- package/components/table/TableSearch.js +0 -2
- package/components/table/TableSettingsColumnButtons.js +7 -7
- package/components/table/TableSettingsColumnDetails.js +8 -12
- package/components/table/TableSettingsDialog.js +57 -94
- package/components/table/TableSettingsDialogFooter.js +12 -12
- package/components/table/TableSettingsListContainer.js +5 -9
- package/components/table/TableSettingsListItem.js +30 -36
- package/components/table/TableToolbar.js +1 -3
- package/components/table/TableViewToggles.js +16 -21
- package/components/tag/Tag.js +13 -15
- package/components/tag/TagList.js +4 -7
- package/components/tagManager/CustomSuggestionItem.js +1 -3
- package/components/tagManager/TagManager.js +27 -48
- package/components/tagManager/TagManagerItemList.js +1 -3
- package/components/teaser/Teaser.js +21 -42
- package/components/teaser/TeaserContainer.js +0 -11
- package/components/timepicker/TimePicker.js +10 -28
- package/components/tooltip/SimpleTooltip.js +5 -8
- package/components/tooltip/Tooltip.js +12 -18
- package/components/video/ResponsiveVideo.js +3 -5
- package/hooks/useAfterMount.js +0 -1
- package/hooks/useClickOutside.js +1 -1
- package/hooks/useClipboard.js +12 -18
- package/hooks/useDebugInfo.js +0 -5
- package/hooks/useElementSize.js +7 -15
- package/hooks/useFullscreen.js +27 -42
- package/hooks/useInterval.js +3 -2
- package/hooks/useOnMount.js +0 -1
- package/hooks/useOnScreen.js +4 -9
- package/hooks/useOnlineStatus.js +3 -4
- package/hooks/useResizeObserver.js +8 -14
- package/hooks/useStateWithValidation.js +8 -10
- package/hooks/useStorage.js +12 -18
- package/hooks/useTimeout.js +3 -2
- package/hooks/useWindowResize.js +0 -2
- package/index.js +2 -12
- package/lib/es/ActionBarItem.js +0 -2
- package/lib/es/ActionBarItemList.js +0 -2
- package/lib/es/ActionBarItemListItem.js +0 -2
- package/lib/es/ActionBarItemListSeparator.js +0 -2
- package/lib/es/Activity.js +0 -2
- package/lib/es/AnimatedNumber.js +0 -2
- package/lib/es/AppNavigationBar.js +0 -2
- package/lib/es/ApplicationHeader.js +0 -2
- package/lib/es/ApplicationLayout.js +0 -2
- package/lib/es/ApplicationLayoutBodyBanner.js +0 -2
- package/lib/es/ApplicationLayoutBodyBottomBar.js +0 -2
- package/lib/es/ApplicationLayoutBodyNavigation.js +0 -2
- package/lib/es/Area.js +0 -2
- package/lib/es/AreaChart.js +0 -2
- package/lib/es/AreaGradient.js +0 -2
- package/lib/es/AssetTree.js +0 -2
- package/lib/es/AutoSuggest.js +0 -2
- package/lib/es/Bar.js +0 -2
- package/lib/es/BarChart.js +0 -2
- package/lib/es/BottomSheet.js +0 -2
- package/lib/es/BrowserWarning.js +0 -2
- package/lib/es/Button.js +0 -2
- package/lib/es/ButtonDropdown.js +0 -2
- package/lib/es/Carousel.js +0 -2
- package/lib/es/ChartNeedle.js +0 -2
- package/lib/es/ChartTooltip.js +0 -2
- package/lib/es/Checkbox.js +0 -2
- package/lib/es/Circle.js +0 -2
- package/lib/es/ClearableInput.js +0 -2
- package/lib/es/ClusterLayer.js +0 -2
- package/lib/es/ClusterMapMarker.js +0 -2
- package/lib/es/ClusterUtils.js +0 -1
- package/lib/es/Collapse.js +0 -2
- package/lib/es/Colors.js +0 -2
- package/lib/es/ConfirmationDialog.js +0 -2
- package/lib/es/ContentLoader.js +0 -2
- package/lib/es/ContextMenu.js +0 -2
- package/lib/es/ContextMenuItem.js +0 -2
- package/lib/es/CustomState.js +0 -2
- package/lib/es/DataTab.js +0 -2
- package/lib/es/DataTabs.js +0 -2
- package/lib/es/DatePicker.js +0 -2
- package/lib/es/DateRangePicker.js +0 -2
- package/lib/es/DeviceUtils.js +1 -2
- package/lib/es/Dialog.js +0 -2
- package/lib/es/DomMarker.js +0 -2
- package/lib/es/DropdownSubmenu.js +0 -2
- package/lib/es/EmptyState.js +0 -2
- package/lib/es/ErrorState.js +0 -2
- package/lib/es/EventUtils.js +0 -1
- package/lib/es/ExpanderList.js +0 -2
- package/lib/es/ExpanderPanel.js +0 -2
- package/lib/es/Fade.js +0 -2
- package/lib/es/FilePicker.js +0 -2
- package/lib/es/ForbiddenState.js +0 -2
- package/lib/es/GroupSelectionUtil.js +1 -2
- package/lib/es/ImagePreloader.js +0 -2
- package/lib/es/IncidentsLayer.js +0 -2
- package/lib/es/InfoDialog.js +0 -2
- package/lib/es/Legend.js +0 -2
- package/lib/es/Line.js +0 -2
- package/lib/es/LineChart.js +0 -2
- package/lib/es/ListMenu.js +0 -2
- package/lib/es/LoadMoreButton.js +0 -2
- package/lib/es/MaintenanceState.js +0 -2
- package/lib/es/Map.js +0 -2
- package/lib/es/MapBoundingBoxButton.js +0 -2
- package/lib/es/MapCenterMarkerButton.js +0 -2
- package/lib/es/MapClusterSettings.js +0 -2
- package/lib/es/MapCustomerPoiSettingsItem.js +0 -2
- package/lib/es/MapLayerGroup.js +0 -2
- package/lib/es/MapLayerIncidentsItem.js +0 -2
- package/lib/es/MapLayerRoadRestrictionsItem.js +0 -2
- package/lib/es/MapLayerSettings.js +0 -2
- package/lib/es/MapLayerTrafficItem.js +0 -2
- package/lib/es/MapLockMarkerButton.js +0 -2
- package/lib/es/MapSettings.js +0 -2
- package/lib/es/MapSettingsItem.js +0 -2
- package/lib/es/MapSettingsPanel.js +0 -2
- package/lib/es/MapSettingsTile.js +0 -2
- package/lib/es/MapTypeSettings.js +0 -2
- package/lib/es/MapWorkshopPoiSettingsItem.js +0 -2
- package/lib/es/Marker.js +0 -2
- package/lib/es/MarkerLayer.js +0 -2
- package/lib/es/MediaDialog.js +0 -2
- package/lib/es/MenuItem.js +0 -2
- package/lib/es/Multiselect.js +0 -2
- package/lib/es/NoData.js +0 -2
- package/lib/es/NotBookedState.js +0 -2
- package/lib/es/NotFoundState.js +0 -2
- package/lib/es/Notification.js +0 -2
- package/lib/es/NotificationsContainer.js +0 -2
- package/lib/es/NumberControl.js +0 -2
- package/lib/es/NumberInput.js +0 -2
- package/lib/es/OnboardingTip.js +0 -2
- package/lib/es/OverlayTrigger.js +0 -2
- package/lib/es/Pager.js +0 -2
- package/lib/es/PieChart.js +0 -2
- package/lib/es/Polygon.js +0 -2
- package/lib/es/Polyline.js +0 -2
- package/lib/es/Popover.js +0 -2
- package/lib/es/Position.js +0 -2
- package/lib/es/PositionUtils.js +0 -1
- package/lib/es/RadialBarChart.js +0 -2
- package/lib/es/RadioButton.js +0 -2
- package/lib/es/RangeSlider.js +0 -2
- package/lib/es/ReleaseNotes.js +0 -2
- package/lib/es/ReleaseNotesDialog.js +0 -2
- package/lib/es/Resizer.js +0 -2
- package/lib/es/ResponsiveVideo.js +0 -2
- package/lib/es/Route.js +0 -2
- package/lib/es/SaveDialog.js +0 -2
- package/lib/es/Select.js +0 -2
- package/lib/es/Sidebar.js +0 -2
- package/lib/es/SimpleButtonDropdown.js +0 -2
- package/lib/es/SimpleClusterLayer.js +0 -2
- package/lib/es/SimpleDialog.js +0 -2
- package/lib/es/SimpleTooltip.js +0 -2
- package/lib/es/SingleButtonDropdown.js +0 -2
- package/lib/es/SingleMapMarker.js +0 -2
- package/lib/es/Slider.js +0 -2
- package/lib/es/SortArrowDown.js +0 -1
- package/lib/es/SortArrowUp.js +0 -1
- package/lib/es/SortArrows.js +0 -1
- package/lib/es/SortDirection.js +1 -2
- package/lib/es/SortUtils.js +1 -2
- package/lib/es/Spinner.js +0 -2
- package/lib/es/SplitButtonDropdown.js +0 -2
- package/lib/es/SplitDialog.js +0 -2
- package/lib/es/StatsWidget.js +0 -2
- package/lib/es/StatsWidgetNumber.js +0 -2
- package/lib/es/StatsWidgetSpacer.js +0 -2
- package/lib/es/StatsWidgets.js +0 -2
- package/lib/es/StatusBar.js +0 -2
- package/lib/es/SteppedProgressBar.js +0 -2
- package/lib/es/SubNavigation.js +0 -2
- package/lib/es/SupportMarker.js +0 -2
- package/lib/es/Switch.js +0 -2
- package/lib/es/TableCardsSorting.js +0 -2
- package/lib/es/TableSearch.js +0 -2
- package/lib/es/TableSettingsDialog.js +0 -2
- package/lib/es/TableToolbar.js +0 -2
- package/lib/es/TableViewToggles.js +0 -2
- package/lib/es/Tag.js +0 -2
- package/lib/es/TagList.js +0 -2
- package/lib/es/TagManager.js +0 -2
- package/lib/es/Teaser.js +0 -2
- package/lib/es/TeaserContainer.js +0 -2
- package/lib/es/TextMarker.js +0 -2
- package/lib/es/TimePicker.js +0 -2
- package/lib/es/ToggleButton.js +0 -2
- package/lib/es/Tooltip.js +0 -2
- package/lib/es/TrafficLayer.js +0 -2
- package/lib/es/Tree.js +0 -2
- package/lib/es/TreeCategory.js +0 -2
- package/lib/es/TreeOption.js +0 -2
- package/lib/es/TreeSearch.js +0 -2
- package/lib/es/TreeSummary.js +0 -2
- package/lib/es/TruckLayer.js +0 -2
- package/lib/es/TypeCounter.js +0 -2
- package/lib/es/VolkswagenApplicationHeader.js +1 -3
- package/lib/es/components/actionBarItem/ActionBarItem.js +31 -75
- package/lib/es/components/actionBarItem/ActionBarItemIcon.js +2 -11
- package/lib/es/components/actionBarItem/ActionBarItemList.js +2 -11
- package/lib/es/components/actionBarItem/ActionBarItemListItem.js +5 -14
- package/lib/es/components/actionBarItem/ActionBarItemListSeparator.js +1 -10
- package/lib/es/components/actionBarItem/ActionBarItemPopoverContent.js +2 -12
- package/lib/es/components/actionBarItem/ActionBarOverlay.js +9 -24
- package/lib/es/components/activity/Activity.js +6 -19
- package/lib/es/components/animatedNumber/AnimatedNumber.js +11 -28
- package/lib/es/components/applicationHeader/AppMenu.js +10 -21
- package/lib/es/components/applicationHeader/AppMenuDropdown.js +8 -29
- package/lib/es/components/applicationHeader/ApplicationActionBar.js +4 -11
- package/lib/es/components/applicationHeader/ApplicationHeader.js +12 -38
- package/lib/es/components/applicationHeader/MobileAppMenu.js +6 -21
- package/lib/es/components/applicationHeader/MobileHeaderModal.js +5 -15
- package/lib/es/components/applicationHeader/MobileSubmoduleNavigation.js +5 -21
- package/lib/es/components/applicationHeader/NavItems.js +35 -58
- package/lib/es/components/applicationHeader/modulePropTypes.js +0 -4
- package/lib/es/components/applicationLayout/ApplicationLayout.js +3 -16
- package/lib/es/components/applicationLayout/ApplicationLayoutBody.js +12 -33
- package/lib/es/components/applicationLayout/ApplicationLayoutBodyBanner.js +5 -14
- package/lib/es/components/applicationLayout/ApplicationLayoutBodyBottomBar.js +4 -13
- package/lib/es/components/applicationLayout/ApplicationLayoutBodyNavigation.js +2 -11
- package/lib/es/components/applicationLayout/ApplicationLayoutHeader.js +2 -11
- package/lib/es/components/applicationLayout/ApplicationLayoutSidebar.js +2 -13
- package/lib/es/components/applicationLayout/SubNavigation.js +3 -14
- package/lib/es/components/assetTree/AssetTree.js +29 -69
- package/lib/es/components/assetTree/Tree.js +56 -184
- package/lib/es/components/assetTree/TreeCategory.js +0 -4
- package/lib/es/components/assetTree/TreeLeaf.js +5 -14
- package/lib/es/components/assetTree/TreeLeafList.js +5 -17
- package/lib/es/components/assetTree/TreeNode.js +5 -12
- package/lib/es/components/assetTree/TreeNodeContainer.js +2 -8
- package/lib/es/components/assetTree/TreeNothingFound.js +0 -5
- package/lib/es/components/assetTree/TreeOption.js +4 -14
- package/lib/es/components/assetTree/TreeOptions.js +3 -15
- package/lib/es/components/assetTree/TreeRoot.js +1 -7
- package/lib/es/components/assetTree/TreeSearch.js +3 -10
- package/lib/es/components/assetTree/TreeSelectAll.js +4 -12
- package/lib/es/components/assetTree/TreeSidebar.js +4 -20
- package/lib/es/components/assetTree/TreeSummary.js +6 -14
- package/lib/es/components/assetTree/TypeCounter.js +8 -20
- package/lib/es/components/autosuggest/AutoSuggest.js +31 -101
- package/lib/es/components/bottomSheet/BottomSheet.js +20 -45
- package/lib/es/components/browserWarning/BrowserIcons.js +1 -6
- package/lib/es/components/browserWarning/BrowserWarning.js +9 -27
- package/lib/es/components/browserWarning/BrowserWarningMessageDE.js +0 -5
- package/lib/es/components/browserWarning/BrowserWarningMessageEN.js +0 -5
- package/lib/es/components/button/Button.js +29 -41
- package/lib/es/components/button/ToggleButton.js +0 -6
- package/lib/es/components/carousel/Carousel.js +0 -3
- package/lib/es/components/carousel/CarouselCaption.js +5 -22
- package/lib/es/components/carousel/CarouselItem.js +8 -39
- package/lib/es/components/charts/Area.js +0 -2
- package/lib/es/components/charts/AreaChart.js +19 -30
- package/lib/es/components/charts/AreaGradient.js +1 -6
- package/lib/es/components/charts/Bar.js +0 -2
- package/lib/es/components/charts/BarChart.js +21 -34
- package/lib/es/components/charts/ChartNeedle.js +8 -17
- package/lib/es/components/charts/ChartTooltip.js +0 -2
- package/lib/es/components/charts/Legend.js +0 -2
- package/lib/es/components/charts/Line.js +0 -2
- package/lib/es/components/charts/LineChart.js +20 -30
- package/lib/es/components/charts/PieChart.js +25 -39
- package/lib/es/components/charts/RadialBarChart.js +26 -39
- package/lib/es/components/charts/chartHelper.js +0 -14
- package/lib/es/components/checkbox/Checkbox.js +26 -50
- package/lib/es/components/clearableInput/ClearableInput.js +25 -54
- package/lib/es/components/collapse/Collapse.js +6 -39
- package/lib/es/components/contentLoader/ContentLoader.js +7 -24
- package/lib/es/components/dataTabs/DataTab.js +6 -16
- package/lib/es/components/dataTabs/DataTabs.js +20 -45
- package/lib/es/components/datepicker/DatePicker.js +9 -30
- package/lib/es/components/datepicker/DateRangePicker.js +103 -145
- package/lib/es/components/dialog/ConfirmationDialog.js +9 -15
- package/lib/es/components/dialog/Dialog.js +22 -57
- package/lib/es/components/dialog/DialogBody.js +2 -11
- package/lib/es/components/dialog/DialogFooter.js +2 -11
- package/lib/es/components/dialog/DialogHeader.js +5 -13
- package/lib/es/components/dialog/InfoDialog.js +2 -13
- package/lib/es/components/dialog/MediaDialog.js +9 -48
- package/lib/es/components/dialog/ReleaseNotesDialog.js +1 -12
- package/lib/es/components/dialog/SaveDialog.js +6 -19
- package/lib/es/components/dialog/SimpleDialog.js +2 -13
- package/lib/es/components/dialog/SplitDialog.js +3 -17
- package/lib/es/components/dialog/baseDialogPropTypes.js +0 -3
- package/lib/es/components/driverName/DriverName.js +2 -12
- package/lib/es/components/dropdown/ButtonDropdown.js +32 -78
- package/lib/es/components/dropdown/Caret.js +0 -4
- package/lib/es/components/dropdown/DropdownSubmenu.js +4 -16
- package/lib/es/components/dropdown/DropdownToggleButton.js +8 -18
- package/lib/es/components/dropdown/SimpleButtonDropdown.js +0 -6
- package/lib/es/components/dropdown/SingleButtonDropdown.js +0 -5
- package/lib/es/components/dropdown/SplitButtonDropdown.js +0 -6
- package/lib/es/components/dropdown/SplitCaretButton.js +3 -13
- package/lib/es/components/dropdown/menuItemsPropTypes.js +0 -4
- package/lib/es/components/expander/ExpanderList.js +15 -47
- package/lib/es/components/expander/ExpanderPanel.js +22 -39
- package/lib/es/components/fade/Fade.js +14 -28
- package/lib/es/components/filepicker/FilePicker.js +17 -47
- package/lib/es/components/listMenu/ListMenu.js +32 -82
- package/lib/es/components/loadMore/LoadMoreButton.js +6 -16
- package/lib/es/components/loadMore/LoadMoreProgress.js +1 -8
- package/lib/es/components/map/components/Map.js +53 -123
- package/lib/es/components/map/components/context.js +0 -2
- package/lib/es/components/map/components/features/ContextMenu.js +39 -53
- package/lib/es/components/map/components/features/ContextMenuItem.js +3 -6
- package/lib/es/components/map/components/features/MapSettings.js +6 -30
- package/lib/es/components/map/components/features/Route.js +29 -65
- package/lib/es/components/map/components/features/basics/Circle.js +10 -21
- package/lib/es/components/map/components/features/basics/MapLayerGroup.js +9 -28
- package/lib/es/components/map/components/features/basics/Polygon.js +7 -21
- package/lib/es/components/map/components/features/basics/Polyline.js +16 -30
- package/lib/es/components/map/components/features/basics/marker/DomMarker.js +2 -23
- package/lib/es/components/map/components/features/basics/marker/Marker.js +9 -46
- package/lib/es/components/map/components/features/basics/marker/TextMarker.js +4 -24
- package/lib/es/components/map/components/features/layers/IncidentsLayer.js +1 -7
- package/lib/es/components/map/components/features/layers/Layer.js +3 -10
- package/lib/es/components/map/components/features/layers/MarkerLayer.js +4 -25
- package/lib/es/components/map/components/features/layers/TrafficLayer.js +1 -8
- package/lib/es/components/map/components/features/layers/TruckLayer.js +1 -8
- package/lib/es/components/map/components/features/layers/baselayers/BaseLayer.js +6 -16
- package/lib/es/components/map/components/features/layers/baselayers/DefaultLayer.js +1 -8
- package/lib/es/components/map/components/features/layers/baselayers/FleetStyleLayer.js +0 -8
- package/lib/es/components/map/components/features/layers/baselayers/SatelliteLayer.js +0 -8
- package/lib/es/components/map/components/features/layers/baselayers/TerrainLayer.js +0 -8
- package/lib/es/components/map/components/features/layers/clustering/ClusterLayer.js +13 -25
- package/lib/es/components/map/components/features/layers/clustering/SimpleClusterLayer.js +1 -15
- package/lib/es/components/map/components/features/settings/MapSettingsItem.js +4 -11
- package/lib/es/components/map/components/features/settings/MapSettingsPanel.js +1 -7
- package/lib/es/components/map/components/features/settings/MapSettingsTile.js +11 -33
- package/lib/es/components/map/components/features/settings/ZoomButtons.js +1 -8
- package/lib/es/components/map/components/features/settings/builtinSettings/MapClusterSettings.js +3 -17
- package/lib/es/components/map/components/features/settings/builtinSettings/MapLayerSettings.js +4 -20
- package/lib/es/components/map/components/features/settings/builtinSettings/MapTypeSettings.js +2 -23
- package/lib/es/components/map/components/features/settings/buttons/MapBoundingBoxButton.js +2 -12
- package/lib/es/components/map/components/features/settings/buttons/MapCenterMarkerButton.js +2 -12
- package/lib/es/components/map/components/features/settings/buttons/MapLockMarkerButton.js +2 -12
- package/lib/es/components/map/components/features/settings/items/MapCustomerPoiSettingsItem.js +2 -14
- package/lib/es/components/map/components/features/settings/items/MapLayerIncidentsItem.js +3 -16
- package/lib/es/components/map/components/features/settings/items/MapLayerRoadRestrictionsItem.js +3 -16
- package/lib/es/components/map/components/features/settings/items/MapLayerTrafficItem.js +3 -16
- package/lib/es/components/map/components/features/settings/items/MapWorkshopPoiSettingsItem.js +2 -14
- package/lib/es/components/map/components/mapUtils.js +2 -34
- package/lib/es/components/map/exceptions/MapException.js +0 -2
- package/lib/es/components/map/icons/MapIcon.js +10 -11
- package/lib/es/components/map/utils/clustering.js +1 -11
- package/lib/es/components/map/utils/eventHandling.js +0 -27
- package/lib/es/components/map/utils/hooks.js +1 -10
- package/lib/es/components/map/utils/localization.js +0 -9
- package/lib/es/components/map/utils/positions.js +0 -13
- package/lib/es/components/map/utils/proptypes.js +1 -18
- package/lib/es/components/map/utils/validation.js +0 -7
- package/lib/es/components/mapMarker/ClusterMapMarker.js +7 -18
- package/lib/es/components/mapMarker/SingleMapMarker.js +13 -27
- package/lib/es/components/menuItems/MenuItem.js +8 -24
- package/lib/es/components/menuItems/MenuItems.js +3 -11
- package/lib/es/components/menuItems/getMenuItems.js +0 -6
- package/lib/es/components/navigation/AppNavigationBar.js +4 -16
- package/lib/es/components/noData/NoData.js +5 -17
- package/lib/es/components/notification/Notification.js +0 -2
- package/lib/es/components/notification/NotificationsContainer.js +0 -7
- package/lib/es/components/numberControl/NumberControl.js +30 -61
- package/lib/es/components/numberInput/NumberInput.js +29 -56
- package/lib/es/components/onboarding/OnboardingTip.js +16 -28
- package/lib/es/components/overlay/OverlayTrigger.js +1 -14
- package/lib/es/components/pager/Pager.js +13 -30
- package/lib/es/components/popover/Popover.js +6 -16
- package/lib/es/components/position/Position.js +2 -10
- package/lib/es/components/preloader/ImagePreloader.js +12 -31
- package/lib/es/components/radiobutton/RadioButton.js +25 -44
- package/lib/es/components/releaseNotes/ReleaseNotes.js +3 -18
- package/lib/es/components/resizer/Resizer.js +6 -38
- package/lib/es/components/selects/BaseDropdownMenu.js +26 -79
- package/lib/es/components/selects/DropdownHeader.js +2 -7
- package/lib/es/components/selects/Multiselect.js +43 -81
- package/lib/es/components/selects/Select.js +42 -80
- package/lib/es/components/sidebars/Sidebar.js +46 -87
- package/lib/es/components/slider/RangeSlider.js +40 -83
- package/lib/es/components/slider/Slider.js +17 -37
- package/lib/es/components/spinner/Spinner.js +9 -25
- package/lib/es/components/states/CustomState.js +20 -43
- package/lib/es/components/states/EmptyState.js +0 -6
- package/lib/es/components/states/ErrorState.js +0 -6
- package/lib/es/components/states/ForbiddenState.js +0 -6
- package/lib/es/components/states/MaintenanceState.js +0 -6
- package/lib/es/components/states/NotBookedState.js +2 -15
- package/lib/es/components/states/NotFoundState.js +0 -6
- package/lib/es/components/states/baseStatePropTypes.js +0 -3
- package/lib/es/components/statsWidget/StatsWidget.js +4 -16
- package/lib/es/components/statsWidget/StatsWidgetBody.js +3 -12
- package/lib/es/components/statsWidget/StatsWidgetFooter.js +2 -10
- package/lib/es/components/statsWidget/StatsWidgetHeader.js +2 -10
- package/lib/es/components/statsWidget/StatsWidgetNumber.js +5 -14
- package/lib/es/components/statsWidget/StatsWidgetSpacer.js +1 -9
- package/lib/es/components/statsWidget/StatsWidgets.js +2 -11
- package/lib/es/components/statusBar/StatusBar.js +19 -55
- package/lib/es/components/steppedProgressBar/SteppedProgressBar.js +9 -27
- package/lib/es/components/supportMarker/toggleSupportMarker.js +0 -8
- package/lib/es/components/switch/Switch.js +12 -21
- package/lib/es/components/table/SortArrows.js +0 -9
- package/lib/es/components/table/TableCardsSorting.js +2 -26
- package/lib/es/components/table/TableSearch.js +0 -7
- package/lib/es/components/table/TableSettingsColumnButtons.js +7 -13
- package/lib/es/components/table/TableSettingsColumnDetails.js +8 -19
- package/lib/es/components/table/TableSettingsDialog.js +57 -117
- package/lib/es/components/table/TableSettingsDialogFooter.js +12 -18
- package/lib/es/components/table/TableSettingsListContainer.js +6 -22
- package/lib/es/components/table/TableSettingsListItem.js +31 -51
- package/lib/es/components/table/TableToolbar.js +1 -7
- package/lib/es/components/table/TableViewToggles.js +14 -38
- package/lib/es/components/table/tableSettingsPropTypes.js +0 -4
- package/lib/es/components/tag/Tag.js +13 -21
- package/lib/es/components/tag/TagList.js +4 -15
- package/lib/es/components/tagManager/CustomSuggestionItem.js +1 -7
- package/lib/es/components/tagManager/TagManager.js +27 -66
- package/lib/es/components/tagManager/TagManagerItemList.js +1 -9
- package/lib/es/components/teaser/Teaser.js +20 -51
- package/lib/es/components/teaser/TeaserContainer.js +0 -15
- package/lib/es/components/timepicker/TimePicker.js +10 -43
- package/lib/es/components/tooltip/SimpleTooltip.js +5 -17
- package/lib/es/components/tooltip/Tooltip.js +12 -32
- package/lib/es/components/video/ResponsiveVideo.js +3 -9
- package/lib/es/framer-motion.js +0 -2
- package/lib/es/hooks/useAfterMount.js +0 -3
- package/lib/es/hooks/useClickOutside.js +1 -3
- package/lib/es/hooks/useClipboard.js +12 -23
- package/lib/es/hooks/useDebugInfo.js +0 -10
- package/lib/es/hooks/useEffectOnce.js +0 -2
- package/lib/es/hooks/useElementSize.js +7 -18
- package/lib/es/hooks/useEsc.js +0 -3
- package/lib/es/hooks/useEvent.js +0 -2
- package/lib/es/hooks/useFullscreen.js +25 -49
- package/lib/es/hooks/useInterval.js +1 -3
- package/lib/es/hooks/useKey.js +0 -2
- package/lib/es/hooks/useOnMount.js +0 -3
- package/lib/es/hooks/useOnScreen.js +5 -13
- package/lib/es/hooks/useOnlineStatus.js +4 -9
- package/lib/es/hooks/useRenderCount.js +1 -2
- package/lib/es/hooks/useResizeObserver.js +8 -17
- package/lib/es/hooks/useStateWithValidation.js +8 -14
- package/lib/es/hooks/useStorage.js +13 -23
- package/lib/es/hooks/useTimeout.js +1 -3
- package/lib/es/hooks/useWindowResize.js +0 -5
- package/lib/es/index.js +2 -140
- package/lib/es/mapIndex.js +0 -38
- package/lib/es/routeUtils.js +1 -2
- package/lib/es/styles/design/buttons.less +8 -23
- package/lib/es/styles/design/fonts.less +65 -65
- package/lib/es/styles/design/form-inputs.less +1 -1
- package/lib/es/styles/design/navs.less +0 -1
- package/lib/es/styles/mixins/buttons.less +3 -6
- package/lib/es/styles/variables.less +1 -1
- package/lib/es/themes/Volkswagen/components/applicationHeader/VolkswagenApplicationHeader.js +12 -25
- package/lib/es/themes/Volkswagen/components/applicationHeader/modulePropTypes.js +0 -4
- package/lib/es/themes/Volkswagen/styles/vw-uikit.less +3 -3
- package/lib/es/themes/Website/styles/rio-website.less +5 -5
- package/lib/es/useAfterMount.js +0 -2
- package/lib/es/useClickOutside.js +0 -2
- package/lib/es/useClipboard.js +0 -2
- package/lib/es/useDebugInfo.js +0 -2
- package/lib/es/useEffectOnce.js +0 -2
- package/lib/es/useElementSize.js +0 -2
- package/lib/es/useEsc.js +0 -2
- package/lib/es/useEvent.js +0 -2
- package/lib/es/useFullscreen.js +0 -2
- package/lib/es/useInterval.js +0 -2
- package/lib/es/useKey.js +0 -2
- package/lib/es/useLocalStorage.js +0 -1
- package/lib/es/useOnMount.js +0 -2
- package/lib/es/useOnScreen.js +0 -2
- package/lib/es/useOnlineStatus.js +0 -2
- package/lib/es/useRenderCount.js +0 -2
- package/lib/es/useResizeObserver.js +0 -2
- package/lib/es/useSessionStorage.js +0 -1
- package/lib/es/useStateWithValidation.js +0 -2
- package/lib/es/useTimeout.js +0 -2
- package/lib/es/useWindowResize.js +0 -2
- package/lib/es/utils/GroupSelectionUtil.js +0 -16
- package/lib/es/utils/SortUtils.js +0 -12
- package/lib/es/utils/addEventListener.js +1 -4
- package/lib/es/utils/addFocusListener.js +0 -5
- package/lib/es/utils/arrayMove.js +1 -5
- package/lib/es/utils/buttonEffect.js +5 -16
- package/lib/es/utils/cssuseragent.js +327 -0
- package/lib/es/utils/deviceUtils.js +15 -30
- package/lib/es/utils/getDropDirection.js +2 -3
- package/lib/es/utils/getOffsetTopWholeScreen.js +0 -2
- package/lib/es/utils/init.js +4 -46
- package/lib/es/utils/logDeprecatedWarnings.js +2 -6
- package/lib/es/utils/logPropError.js +2 -6
- package/lib/es/utils/ownerDocument.js +1 -4
- package/lib/es/utils/portalRoot.js +0 -2
- package/lib/es/utils/routeUtils.js +11 -29
- package/lib/es/utils/scrollItemIntoView.js +2 -8
- package/lib/es/version.json +1 -1
- package/mapIndex.js +1 -0
- package/package.json +62 -119
- package/routeUtils.js +1 -1
- package/styles/design/buttons.less +8 -23
- package/styles/design/fonts.less +65 -65
- package/styles/design/form-inputs.less +1 -1
- package/styles/design/navs.less +0 -1
- package/styles/mixins/buttons.less +3 -6
- package/styles/variables.less +1 -1
- package/themes/Volkswagen/components/applicationHeader/VolkswagenApplicationHeader.js +12 -11
- package/themes/Volkswagen/styles/vw-uikit.less +3 -3
- package/themes/Website/styles/rio-website.less +5 -5
- package/utils/GroupSelectionUtil.js +0 -12
- package/utils/SortUtils.js +0 -7
- package/utils/addFocusListener.js +0 -4
- package/utils/arrayMove.js +1 -4
- package/utils/buttonEffect.js +5 -13
- package/utils/cssuseragent.js +320 -0
- package/utils/deviceUtils.js +16 -18
- package/utils/getDropDirection.js +2 -2
- package/utils/getOffsetTopWholeScreen.js +0 -1
- package/utils/init.js +4 -35
- package/utils/logDeprecatedWarnings.js +3 -2
- package/utils/logPropError.js +2 -1
- package/utils/routeUtils.js +11 -17
- package/utils/scrollItemIntoView.js +2 -7
- package/version.json +1 -1
|
@@ -5,18 +5,14 @@ import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized
|
|
|
5
5
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
|
|
9
8
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
|
-
|
|
11
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
|
-
|
|
13
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
|
-
|
|
15
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
16
|
-
|
|
17
12
|
/**
|
|
18
13
|
* @fileOverview: Wrapper component for React-Datetime.
|
|
19
14
|
*/
|
|
15
|
+
|
|
20
16
|
import React, { Component } from 'react';
|
|
21
17
|
import PropTypes from 'prop-types';
|
|
22
18
|
import ReactDOM from 'react-dom';
|
|
@@ -28,18 +24,17 @@ import isNil from 'lodash/fp/isNil';
|
|
|
28
24
|
import isNull from 'lodash/fp/isNull';
|
|
29
25
|
import isEqual from 'lodash/fp/isEqual';
|
|
30
26
|
import getDropDirection from '../../utils/getDropDirection';
|
|
31
|
-
|
|
32
27
|
var Placeholder = function Placeholder(_ref) {
|
|
33
28
|
var text = _ref.text;
|
|
34
29
|
return /*#__PURE__*/React.createElement("span", {
|
|
35
30
|
className: 'placeholder'
|
|
36
31
|
}, text);
|
|
37
32
|
};
|
|
33
|
+
|
|
38
34
|
/**
|
|
39
35
|
* The DateRangePicker
|
|
40
36
|
*/
|
|
41
37
|
|
|
42
|
-
|
|
43
38
|
var propTypes = {
|
|
44
39
|
startValue: PropTypes.object,
|
|
45
40
|
endValue: PropTypes.object,
|
|
@@ -108,7 +103,8 @@ var defaultProps = {
|
|
|
108
103
|
startValue: moment().subtract(1, 'months').startOf('month'),
|
|
109
104
|
endValue: moment().subtract(1, 'months').endOf('month')
|
|
110
105
|
}],
|
|
111
|
-
onRangeChange: function onRangeChange() {
|
|
106
|
+
onRangeChange: function onRangeChange() {
|
|
107
|
+
// function when range changes
|
|
112
108
|
},
|
|
113
109
|
autoDropDirection: true,
|
|
114
110
|
dropup: false,
|
|
@@ -121,17 +117,12 @@ var defaultProps = {
|
|
|
121
117
|
var LOCAL_DATE_FORMAT = 'dd L LT';
|
|
122
118
|
var LOCAL_DATE_FORMAT_NO_TIME = 'dd L';
|
|
123
119
|
var DROPDOWN_WIDTH = 600;
|
|
124
|
-
|
|
125
120
|
var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
126
121
|
_inherits(DateRangePicker, _Component);
|
|
127
|
-
|
|
128
122
|
var _super = _createSuper(DateRangePicker);
|
|
129
|
-
|
|
130
123
|
function DateRangePicker(props) {
|
|
131
124
|
var _this;
|
|
132
|
-
|
|
133
125
|
_classCallCheck(this, DateRangePicker);
|
|
134
|
-
|
|
135
126
|
_this = _super.call(this, props);
|
|
136
127
|
var customRangeStartValue = props.startValue ? props.startValue : props.defaultStartValue;
|
|
137
128
|
var customRangeEndValue = props.endValue ? props.endValue : props.defaultEndValue;
|
|
@@ -163,54 +154,55 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
163
154
|
_this.handleResetInternalState = _this.handleResetInternalState.bind(_assertThisInitialized(_this));
|
|
164
155
|
return _this;
|
|
165
156
|
}
|
|
166
|
-
|
|
167
157
|
_createClass(DateRangePicker, [{
|
|
168
158
|
key: "componentDidMount",
|
|
169
159
|
value: function componentDidMount() {
|
|
170
160
|
var _this$props = this.props,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
161
|
+
startValue = _this$props.startValue,
|
|
162
|
+
endValue = _this$props.endValue,
|
|
163
|
+
locale = _this$props.locale;
|
|
175
164
|
if (!this.state.isMounted) {
|
|
176
165
|
this.setState({
|
|
177
166
|
isMounted: true
|
|
178
167
|
});
|
|
179
|
-
}
|
|
180
|
-
|
|
168
|
+
}
|
|
181
169
|
|
|
170
|
+
// initial mount value
|
|
182
171
|
if (startValue && endValue) {
|
|
183
172
|
this.update(startValue, endValue, locale);
|
|
184
173
|
}
|
|
185
174
|
}
|
|
175
|
+
|
|
186
176
|
/**
|
|
187
177
|
* Responsible for handling start/end values given from outside (controlled component context).
|
|
188
178
|
* @param {object} nextProps - The next props.
|
|
189
179
|
* @returns {undefined}
|
|
190
180
|
*/
|
|
191
181
|
// eslint-disable-next-line camelcase
|
|
192
|
-
|
|
193
182
|
}, {
|
|
194
183
|
key: "UNSAFE_componentWillReceiveProps",
|
|
195
184
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
196
185
|
var startValue = nextProps.startValue,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
186
|
+
endValue = nextProps.endValue,
|
|
187
|
+
textDefault = nextProps.textDefault,
|
|
188
|
+
customRangeOnly = nextProps.customRangeOnly,
|
|
189
|
+
locale = nextProps.locale,
|
|
190
|
+
defaultStartValue = nextProps.defaultStartValue,
|
|
191
|
+
defaultEndValue = nextProps.defaultEndValue;
|
|
203
192
|
var _this$state = this.state,
|
|
204
|
-
|
|
205
|
-
|
|
193
|
+
internalStartValue = _this$state.internalStartValue,
|
|
194
|
+
internalEndValue = _this$state.internalEndValue;
|
|
195
|
+
|
|
196
|
+
// handle reset:
|
|
206
197
|
// reset condition 1 is for uncontrolled components,
|
|
207
198
|
// making sure that when a time is selected, and then the locale changed, that the selection remains
|
|
199
|
+
var resetCondition1 = isNil(startValue) && isNil(endValue) && isNil(internalStartValue) && isNil(internalEndValue);
|
|
208
200
|
|
|
209
|
-
|
|
201
|
+
// reset condition 2 is for controlled components,
|
|
210
202
|
// when a time is set / defined, and the controlling component wants a hard reset
|
|
203
|
+
var resetCondition2 = isNull(startValue) && isNull(endValue);
|
|
211
204
|
|
|
212
|
-
|
|
213
|
-
|
|
205
|
+
// reset to original state
|
|
214
206
|
if (resetCondition1 || resetCondition2) {
|
|
215
207
|
this.setState({
|
|
216
208
|
internalStartValue: undefined,
|
|
@@ -233,6 +225,7 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
233
225
|
this.update(internalStartValue, internalEndValue, locale);
|
|
234
226
|
}
|
|
235
227
|
}
|
|
228
|
+
|
|
236
229
|
/**
|
|
237
230
|
* Converts start/end values to moments, makes them readable,
|
|
238
231
|
* crafts a dropdownToggleText and updates state.
|
|
@@ -243,20 +236,22 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
243
236
|
* @param {object} callback - callback to be called, after state has changed.
|
|
244
237
|
* @returns {undefined}
|
|
245
238
|
*/
|
|
246
|
-
|
|
247
239
|
}, {
|
|
248
240
|
key: "update",
|
|
249
241
|
value: function update(startValue, endValue, locale, extras, callback) {
|
|
250
242
|
var hasTimePicker = this.props.hasTimePicker;
|
|
251
|
-
var format = hasTimePicker ? LOCAL_DATE_FORMAT : LOCAL_DATE_FORMAT_NO_TIME;
|
|
243
|
+
var format = hasTimePicker ? LOCAL_DATE_FORMAT : LOCAL_DATE_FORMAT_NO_TIME;
|
|
252
244
|
|
|
245
|
+
// necessary to set start to startOf / end day to endOf, when selecting "without time"
|
|
253
246
|
var finalStartValue = hasTimePicker ? moment(startValue) : moment(startValue).startOf('day');
|
|
254
|
-
var finalEndValue = hasTimePicker ? moment(endValue) : moment(endValue).endOf('day');
|
|
247
|
+
var finalEndValue = hasTimePicker ? moment(endValue) : moment(endValue).endOf('day');
|
|
255
248
|
|
|
249
|
+
// composition of dropdownToggleText
|
|
256
250
|
var startValueText = "".concat(finalStartValue.locale(locale).format(format));
|
|
257
251
|
var endValueText = "".concat(finalEndValue.locale(locale).format(format));
|
|
258
|
-
var dropdownToggleText = startValueText === endValueText ? startValueText : "".concat(startValueText, " \u2192 ").concat(endValueText);
|
|
252
|
+
var dropdownToggleText = startValueText === endValueText ? startValueText : "".concat(startValueText, " \u2192 ").concat(endValueText);
|
|
259
253
|
|
|
254
|
+
// set state, and call callback
|
|
260
255
|
this.setState(_objectSpread({
|
|
261
256
|
internalStartValue: finalStartValue,
|
|
262
257
|
internalEndValue: finalEndValue,
|
|
@@ -278,15 +273,14 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
278
273
|
event.preventDefault();
|
|
279
274
|
event.stopPropagation();
|
|
280
275
|
}
|
|
281
|
-
|
|
282
276
|
var _this$props2 = this.props,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
277
|
+
textDefault = _this$props2.textDefault,
|
|
278
|
+
customRangeOnly = _this$props2.customRangeOnly,
|
|
279
|
+
defaultStartValue = _this$props2.defaultStartValue,
|
|
280
|
+
defaultEndValue = _this$props2.defaultEndValue,
|
|
281
|
+
pullRight = _this$props2.pullRight,
|
|
282
|
+
dropup = _this$props2.dropup,
|
|
283
|
+
onClear = _this$props2.onClear;
|
|
290
284
|
this.setState({
|
|
291
285
|
internalStartValue: undefined,
|
|
292
286
|
internalEndValue: undefined,
|
|
@@ -306,12 +300,12 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
306
300
|
});
|
|
307
301
|
onClear();
|
|
308
302
|
}
|
|
303
|
+
|
|
309
304
|
/**
|
|
310
305
|
* Gets called by wrapper component "onClickOutside".
|
|
311
306
|
* Responsible for closing the dropdown when a click occured outside.
|
|
312
307
|
* @returns {undefined}
|
|
313
308
|
*/
|
|
314
|
-
|
|
315
309
|
}, {
|
|
316
310
|
key: "handleClickOutside",
|
|
317
311
|
value: function handleClickOutside() {
|
|
@@ -321,17 +315,16 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
321
315
|
});
|
|
322
316
|
}
|
|
323
317
|
}
|
|
318
|
+
|
|
324
319
|
/**
|
|
325
320
|
* Toggles dropdown open status and visibility of custom range area.
|
|
326
321
|
* @param {object} event - mouse event on toggle dropdown
|
|
327
322
|
* @returns {undefined}
|
|
328
323
|
*/
|
|
329
|
-
|
|
330
324
|
}, {
|
|
331
325
|
key: "toggleDropdownOpen",
|
|
332
326
|
value: function toggleDropdownOpen(event) {
|
|
333
327
|
var _this2 = this;
|
|
334
|
-
|
|
335
328
|
var toggleNode = ReactDOM.findDOMNode(this.refDropdownToggle);
|
|
336
329
|
var menuNode = ReactDOM.findDOMNode(this.refDropdownMenu);
|
|
337
330
|
var dropDirection = this.isAutoDropActive() && !this.state.isDropdownOpen ? getDropDirection(toggleNode, menuNode) : {};
|
|
@@ -350,6 +343,7 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
350
343
|
value: function isAutoDropActive() {
|
|
351
344
|
return !(!this.props.autoDropDirection || this.props.dropup || this.props.pullRight);
|
|
352
345
|
}
|
|
346
|
+
|
|
353
347
|
/**
|
|
354
348
|
* Only gets called on manual change of datePicker (user interaction).
|
|
355
349
|
* Has influence the validity of the end date.
|
|
@@ -361,7 +355,6 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
361
355
|
* @param {object} isValidDate - if the date is valid or not.
|
|
362
356
|
* @returns {undefined}
|
|
363
357
|
*/
|
|
364
|
-
|
|
365
358
|
}, {
|
|
366
359
|
key: "onStartChange",
|
|
367
360
|
value: function onStartChange(startValue, isValidDate) {
|
|
@@ -369,35 +362,33 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
369
362
|
isStartValid: false
|
|
370
363
|
};
|
|
371
364
|
var _this$props3 = this.props,
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
365
|
+
hasTimePicker = _this$props3.hasTimePicker,
|
|
366
|
+
minValue = _this$props3.minValue,
|
|
367
|
+
maxValue = _this$props3.maxValue;
|
|
375
368
|
var customRangeEndValue = this.state.customRangeEndValue;
|
|
376
|
-
|
|
377
369
|
if (moment.isMoment(startValue)) {
|
|
378
370
|
// necessary to set start to startOf / end day to endOf, when selecting "without time"
|
|
379
|
-
var finalStartValue = hasTimePicker ? startValue : moment(startValue).startOf('day');
|
|
371
|
+
var finalStartValue = hasTimePicker ? startValue : moment(startValue).startOf('day');
|
|
380
372
|
|
|
373
|
+
// check validity of input (min/max)
|
|
381
374
|
var passesMin = minValue ? finalStartValue.isSameOrAfter(moment(minValue)) : true;
|
|
382
375
|
var passesMax = maxValue ? finalStartValue.isSameOrBefore(moment(maxValue)) : true;
|
|
383
376
|
var isValidInput = isValidDate && passesMin && passesMax;
|
|
384
377
|
newState.isStartValid = isValidInput;
|
|
385
|
-
|
|
386
378
|
if (isValidDate) {
|
|
387
379
|
newState.customRangeStartValue = finalStartValue;
|
|
388
380
|
newState.isEndValid = !customRangeEndValue.isBefore(finalStartValue);
|
|
389
381
|
}
|
|
390
382
|
}
|
|
391
|
-
|
|
392
383
|
this.setState(newState);
|
|
393
384
|
}
|
|
385
|
+
|
|
394
386
|
/**
|
|
395
387
|
* Only gets called on manual change of datePicker (user interaction)
|
|
396
388
|
* @param {object} endValue - the start date (date or moment).
|
|
397
389
|
* @param {object} isValidDate - if the date is valid or not.
|
|
398
390
|
* @returns {undefined}
|
|
399
391
|
*/
|
|
400
|
-
|
|
401
392
|
}, {
|
|
402
393
|
key: "onEndChange",
|
|
403
394
|
value: function onEndChange(endValue, isValidDate) {
|
|
@@ -405,80 +396,77 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
405
396
|
isEndValid: false
|
|
406
397
|
};
|
|
407
398
|
var _this$props4 = this.props,
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
var customRangeStartValue = this.state.customRangeStartValue;
|
|
399
|
+
hasTimePicker = _this$props4.hasTimePicker,
|
|
400
|
+
minValue = _this$props4.minValue,
|
|
401
|
+
maxValue = _this$props4.maxValue;
|
|
402
|
+
var customRangeStartValue = this.state.customRangeStartValue;
|
|
403
|
+
// let isValidInput = false;
|
|
412
404
|
|
|
413
405
|
if (moment.isMoment(endValue)) {
|
|
414
406
|
// necessary to set end of seconds and milliseconds for every end value
|
|
415
|
-
var correctedEndValue = isValidDate ? endValue.endOf('minute') : endValue;
|
|
407
|
+
var correctedEndValue = isValidDate ? endValue.endOf('minute') : endValue;
|
|
416
408
|
|
|
417
|
-
|
|
409
|
+
// necessary to set start to startOf / end day to endOf, when selecting "without time"
|
|
410
|
+
var finalEndValue = hasTimePicker ? correctedEndValue : moment(endValue).endOf('day');
|
|
418
411
|
|
|
412
|
+
// check validity of input (min/max)
|
|
419
413
|
var passesMin = minValue ? finalEndValue.isSameOrAfter(moment(minValue)) : true;
|
|
420
414
|
var passesMax = maxValue ? finalEndValue.isSameOrBefore(moment(maxValue)) : true;
|
|
421
415
|
var isValidInput = isValidDate && passesMin && passesMax && finalEndValue.isAfter(customRangeStartValue);
|
|
422
416
|
newState.isEndValid = isValidInput;
|
|
423
|
-
|
|
424
417
|
if (isValidDate) {
|
|
425
418
|
newState.customRangeEndValue = finalEndValue;
|
|
426
419
|
}
|
|
427
420
|
}
|
|
428
|
-
|
|
429
421
|
this.setState(newState);
|
|
430
422
|
}
|
|
423
|
+
|
|
431
424
|
/**
|
|
432
425
|
* Callback method for DatePicker to limit selection in DatePicker.
|
|
433
426
|
* @param {object} current - Current date in the loop.
|
|
434
427
|
* @returns {undefined}
|
|
435
428
|
*/
|
|
436
|
-
|
|
437
429
|
}, {
|
|
438
430
|
key: "getValidStartDates",
|
|
439
431
|
value: function getValidStartDates(current) {
|
|
440
432
|
var _this$props5 = this.props,
|
|
441
|
-
|
|
442
|
-
|
|
433
|
+
minValue = _this$props5.minValue,
|
|
434
|
+
maxValue = _this$props5.maxValue;
|
|
443
435
|
var customRangeEndValue = moment(this.state.customRangeEndValue);
|
|
444
|
-
|
|
445
436
|
if (current.isSame(customRangeEndValue, 'day')) {
|
|
446
437
|
return true;
|
|
447
438
|
}
|
|
448
|
-
|
|
449
439
|
var passesMin = minValue ? current.isSameOrAfter(moment(minValue)) : true;
|
|
450
440
|
var passesMax = maxValue ? current.isSameOrBefore(moment(maxValue)) : true;
|
|
451
441
|
return passesMin && passesMax;
|
|
452
442
|
}
|
|
443
|
+
|
|
453
444
|
/**
|
|
454
445
|
* Callback method for DatePicker to limit selection in DatePicker.
|
|
455
446
|
* End date has to be after start date.
|
|
456
447
|
* @param {object} current - Current date in the loop.
|
|
457
448
|
* @returns {undefined}
|
|
458
449
|
*/
|
|
459
|
-
|
|
460
450
|
}, {
|
|
461
451
|
key: "getValidEndDates",
|
|
462
452
|
value: function getValidEndDates(current) {
|
|
463
453
|
var _this$props6 = this.props,
|
|
464
|
-
|
|
465
|
-
|
|
454
|
+
minValue = _this$props6.minValue,
|
|
455
|
+
maxValue = _this$props6.maxValue;
|
|
466
456
|
var customRangeStartValue = moment(this.state.customRangeStartValue);
|
|
467
|
-
|
|
468
457
|
if (current.isSame(customRangeStartValue, 'day')) {
|
|
469
458
|
return true;
|
|
470
459
|
}
|
|
471
|
-
|
|
472
460
|
var passesMin = minValue ? current.isSameOrAfter(moment(minValue)) : true;
|
|
473
461
|
var passesMax = maxValue ? current.isSameOrBefore(moment(maxValue)) : true;
|
|
474
462
|
var isAfterStart = current.isAfter(customRangeStartValue);
|
|
475
463
|
return passesMin && passesMax && isAfterStart;
|
|
476
464
|
}
|
|
465
|
+
|
|
477
466
|
/**
|
|
478
467
|
* Gets called when "custom ..." has been selected.
|
|
479
468
|
* @returns {undefined}
|
|
480
469
|
*/
|
|
481
|
-
|
|
482
470
|
}, {
|
|
483
471
|
key: "handleCustomToggle",
|
|
484
472
|
value: function handleCustomToggle() {
|
|
@@ -494,44 +482,42 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
494
482
|
if (typeof preset.onSelect === 'function') {
|
|
495
483
|
preset.onSelect();
|
|
496
484
|
}
|
|
497
|
-
|
|
498
485
|
this.handleSelect(preset.startValue, preset.endValue);
|
|
499
486
|
}
|
|
487
|
+
|
|
500
488
|
/**
|
|
501
489
|
* Gets called when a preset has been selected.
|
|
502
490
|
* @param {object} startValue - the start date (date or moment).
|
|
503
491
|
* @param {object} endValue - the start date (date or moment).
|
|
504
492
|
* @returns {undefined}
|
|
505
493
|
*/
|
|
506
|
-
|
|
507
494
|
}, {
|
|
508
495
|
key: "handleSelect",
|
|
509
496
|
value: function handleSelect(startValue, endValue) {
|
|
510
497
|
var _this$props7 = this.props,
|
|
511
|
-
|
|
512
|
-
|
|
498
|
+
onRangeChange = _this$props7.onRangeChange,
|
|
499
|
+
locale = _this$props7.locale;
|
|
513
500
|
var extras = {
|
|
514
501
|
isDropdownOpen: false
|
|
515
502
|
};
|
|
516
503
|
this.update(startValue, endValue, locale, extras, onRangeChange);
|
|
517
504
|
}
|
|
505
|
+
|
|
518
506
|
/**
|
|
519
507
|
* Gets called user clicks the apply button.
|
|
520
508
|
* @returns {undefined}
|
|
521
509
|
*/
|
|
522
|
-
|
|
523
510
|
}, {
|
|
524
511
|
key: "handleCustomApply",
|
|
525
512
|
value: function handleCustomApply() {
|
|
526
513
|
var _this$state2 = this.state,
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
514
|
+
customRangeStartValue = _this$state2.customRangeStartValue,
|
|
515
|
+
customRangeEndValue = _this$state2.customRangeEndValue,
|
|
516
|
+
isStartValid = _this$state2.isStartValid,
|
|
517
|
+
isEndValid = _this$state2.isEndValid;
|
|
531
518
|
var _this$props8 = this.props,
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
519
|
+
onRangeChange = _this$props8.onRangeChange,
|
|
520
|
+
locale = _this$props8.locale;
|
|
535
521
|
if (isStartValid && isEndValid) {
|
|
536
522
|
var extras = {
|
|
537
523
|
isDropdownOpen: false
|
|
@@ -543,18 +529,18 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
543
529
|
key: "getDropdownToggle",
|
|
544
530
|
value: function getDropdownToggle(dropdownToggleText) {
|
|
545
531
|
var _this3 = this;
|
|
546
|
-
|
|
547
532
|
var _this$props9 = this.props,
|
|
548
|
-
|
|
549
|
-
|
|
533
|
+
children = _this$props9.children,
|
|
534
|
+
clearable = _this$props9.clearable;
|
|
550
535
|
var _this$state3 = this.state,
|
|
551
|
-
|
|
552
|
-
|
|
536
|
+
startValueText = _this$state3.startValueText,
|
|
537
|
+
endValueText = _this$state3.endValueText;
|
|
553
538
|
var isClearable = clearable && dropdownToggleText.type !== Placeholder;
|
|
554
539
|
var labelClassNames = classNames(isClearable && 'withClearButton');
|
|
555
|
-
var isRenderCallback = children && typeof children === 'function';
|
|
556
|
-
// the toggle element must not be a <button> but a div.
|
|
540
|
+
var isRenderCallback = children && typeof children === 'function';
|
|
557
541
|
|
|
542
|
+
// Note: due to issues with nested events in Firefox (for toggle and inside the clear)
|
|
543
|
+
// the toggle element must not be a <button> but a div.
|
|
558
544
|
return /*#__PURE__*/React.createElement("div", {
|
|
559
545
|
type: 'button',
|
|
560
546
|
className: 'DateRangePickerToggle form-control dropdown-toggle text-left',
|
|
@@ -607,47 +593,45 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
607
593
|
onClick: this.toggleDropdownOpen,
|
|
608
594
|
className: 'btn btn-default pull-right'
|
|
609
595
|
}, textCancel)));
|
|
610
|
-
}
|
|
596
|
+
}
|
|
611
597
|
|
|
598
|
+
// eslint-disable-next-line complexity
|
|
612
599
|
}, {
|
|
613
600
|
key: "render",
|
|
614
601
|
value: function render() {
|
|
615
602
|
var _this4 = this;
|
|
616
|
-
|
|
617
603
|
var _this$props10 = this.props,
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
604
|
+
locale = _this$props10.locale,
|
|
605
|
+
textCustom = _this$props10.textCustom,
|
|
606
|
+
textApply = _this$props10.textApply,
|
|
607
|
+
textCancel = _this$props10.textCancel,
|
|
608
|
+
textFrom = _this$props10.textFrom,
|
|
609
|
+
textTo = _this$props10.textTo,
|
|
610
|
+
textToday = _this$props10.textToday,
|
|
611
|
+
textLastWeek = _this$props10.textLastWeek,
|
|
612
|
+
textLastMonth = _this$props10.textLastMonth,
|
|
613
|
+
className = _this$props10.className,
|
|
614
|
+
clearable = _this$props10.clearable,
|
|
615
|
+
dropdownClass = _this$props10.dropdownClass,
|
|
616
|
+
dropdownMenuClass = _this$props10.dropdownMenuClass,
|
|
617
|
+
customPresets = _this$props10.customPresets,
|
|
618
|
+
hasTimePicker = _this$props10.hasTimePicker;
|
|
633
619
|
var _this$state4 = this.state,
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
620
|
+
customRangeStartValue = _this$state4.customRangeStartValue,
|
|
621
|
+
customRangeEndValue = _this$state4.customRangeEndValue,
|
|
622
|
+
isStartValid = _this$state4.isStartValid,
|
|
623
|
+
isEndValid = _this$state4.isEndValid,
|
|
624
|
+
isCustomVisible = _this$state4.isCustomVisible,
|
|
625
|
+
isDropdownOpen = _this$state4.isDropdownOpen,
|
|
626
|
+
dropdownToggleText = _this$state4.dropdownToggleText;
|
|
641
627
|
var pullRight = this.isAutoDropActive() ? this.state.pullRight : this.props.pullRight;
|
|
642
628
|
var dropup = this.isAutoDropActive() ? this.state.dropup : this.props.dropup;
|
|
643
|
-
|
|
644
629
|
if (customPresets && isEqual(customPresets, defaultProps.customPresets)) {
|
|
645
630
|
// support backward compatibility to override default drop down text values
|
|
646
631
|
customPresets[0].text = textToday;
|
|
647
632
|
customPresets[1].text = textLastWeek;
|
|
648
633
|
customPresets[2].text = textLastMonth;
|
|
649
634
|
}
|
|
650
|
-
|
|
651
635
|
var classes = classNames('DateRangePicker', className && className);
|
|
652
636
|
var dropDownClassNames = classNames('select', 'dropdown', dropdownClass, isDropdownOpen && 'open', dropup && 'dropup');
|
|
653
637
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -705,10 +689,8 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
705
689
|
})))), this.getCustomPanelButtons(isCustomVisible, isStartValid, isEndValid, textApply, textCancel))));
|
|
706
690
|
}
|
|
707
691
|
}]);
|
|
708
|
-
|
|
709
692
|
return DateRangePicker;
|
|
710
693
|
}(Component);
|
|
711
|
-
|
|
712
694
|
DateRangePicker.propTypes = propTypes;
|
|
713
695
|
DateRangePicker.defaultProps = defaultProps;
|
|
714
696
|
export default onClickOutside(DateRangePicker);
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["content", "onClickCancel", "cancelButtonText", "onClickConfirm", "confirmButtonText", "disableConfirm"];
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import Dialog from './Dialog';
|
|
7
|
+
|
|
5
8
|
/*
|
|
6
9
|
* Confirmation dialog component to confirm or cancel an action
|
|
7
10
|
*/
|
|
8
|
-
|
|
9
11
|
var ConfirmationDialog = function ConfirmationDialog(props) {
|
|
10
12
|
var content = props.content,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
onClickCancel = props.onClickCancel,
|
|
14
|
+
cancelButtonText = props.cancelButtonText,
|
|
15
|
+
onClickConfirm = props.onClickConfirm,
|
|
16
|
+
confirmButtonText = props.confirmButtonText,
|
|
17
|
+
disableConfirm = props.disableConfirm,
|
|
18
|
+
remainingProps = _objectWithoutProperties(props, _excluded);
|
|
16
19
|
var footer = /*#__PURE__*/React.createElement("div", {
|
|
17
20
|
className: "display-flex justify-content-end btn-toolbar"
|
|
18
21
|
}, /*#__PURE__*/React.createElement("button", {
|
|
@@ -25,7 +28,7 @@ var ConfirmationDialog = function ConfirmationDialog(props) {
|
|
|
25
28
|
onClick: onClickConfirm,
|
|
26
29
|
disabled: disableConfirm
|
|
27
30
|
}, confirmButtonText));
|
|
28
|
-
return /*#__PURE__*/React.createElement(Dialog, _extends({},
|
|
31
|
+
return /*#__PURE__*/React.createElement(Dialog, _extends({}, remainingProps, {
|
|
29
32
|
body: content,
|
|
30
33
|
footer: footer,
|
|
31
34
|
onHide: onClickCancel,
|
|
@@ -34,7 +37,6 @@ var ConfirmationDialog = function ConfirmationDialog(props) {
|
|
|
34
37
|
disableEsc: true
|
|
35
38
|
}));
|
|
36
39
|
};
|
|
37
|
-
|
|
38
40
|
ConfirmationDialog.defaultProps = {
|
|
39
41
|
show: false,
|
|
40
42
|
onClickCancel: function onClickCancel() {},
|