@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
|
@@ -1,73 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports["default"] = exports.DateRangePickerPure = void 0;
|
|
11
|
-
|
|
12
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
-
|
|
14
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
-
|
|
16
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
-
|
|
18
12
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
19
|
-
|
|
20
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
21
|
-
|
|
22
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
23
|
-
|
|
24
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
25
|
-
|
|
26
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
27
|
-
|
|
28
17
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
29
|
-
|
|
30
18
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
31
|
-
|
|
32
19
|
var _DatePicker = _interopRequireDefault(require("./DatePicker"));
|
|
33
|
-
|
|
34
20
|
var _reactOnclickoutside = _interopRequireDefault(require("react-onclickoutside"));
|
|
35
|
-
|
|
36
21
|
var _moment = _interopRequireDefault(require("moment"));
|
|
37
|
-
|
|
38
22
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
39
|
-
|
|
40
23
|
var _isNil = _interopRequireDefault(require("lodash/fp/isNil"));
|
|
41
|
-
|
|
42
24
|
var _isNull = _interopRequireDefault(require("lodash/fp/isNull"));
|
|
43
|
-
|
|
44
25
|
var _isEqual = _interopRequireDefault(require("lodash/fp/isEqual"));
|
|
45
|
-
|
|
46
26
|
var _getDropDirection = _interopRequireDefault(require("../../utils/getDropDirection"));
|
|
47
|
-
|
|
48
27
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
49
|
-
|
|
50
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
51
|
-
|
|
52
29
|
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; }
|
|
53
|
-
|
|
54
30
|
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) { (0, _defineProperty2["default"])(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; }
|
|
55
|
-
|
|
56
31
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
57
|
-
|
|
58
32
|
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; } }
|
|
59
|
-
|
|
60
33
|
var Placeholder = function Placeholder(_ref) {
|
|
61
34
|
var text = _ref.text;
|
|
62
35
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
63
36
|
className: 'placeholder'
|
|
64
37
|
}, text);
|
|
65
38
|
};
|
|
39
|
+
|
|
66
40
|
/**
|
|
67
41
|
* The DateRangePicker
|
|
68
42
|
*/
|
|
69
43
|
|
|
70
|
-
|
|
71
44
|
var propTypes = {
|
|
72
45
|
startValue: _propTypes["default"].object,
|
|
73
46
|
endValue: _propTypes["default"].object,
|
|
@@ -136,7 +109,8 @@ var defaultProps = {
|
|
|
136
109
|
startValue: (0, _moment["default"])().subtract(1, 'months').startOf('month'),
|
|
137
110
|
endValue: (0, _moment["default"])().subtract(1, 'months').endOf('month')
|
|
138
111
|
}],
|
|
139
|
-
onRangeChange: function onRangeChange() {
|
|
112
|
+
onRangeChange: function onRangeChange() {
|
|
113
|
+
// function when range changes
|
|
140
114
|
},
|
|
141
115
|
autoDropDirection: true,
|
|
142
116
|
dropup: false,
|
|
@@ -149,15 +123,11 @@ var defaultProps = {
|
|
|
149
123
|
var LOCAL_DATE_FORMAT = 'dd L LT';
|
|
150
124
|
var LOCAL_DATE_FORMAT_NO_TIME = 'dd L';
|
|
151
125
|
var DROPDOWN_WIDTH = 600;
|
|
152
|
-
|
|
153
126
|
var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
154
127
|
(0, _inherits2["default"])(DateRangePicker, _Component);
|
|
155
|
-
|
|
156
128
|
var _super = _createSuper(DateRangePicker);
|
|
157
|
-
|
|
158
129
|
function DateRangePicker(props) {
|
|
159
130
|
var _this;
|
|
160
|
-
|
|
161
131
|
(0, _classCallCheck2["default"])(this, DateRangePicker);
|
|
162
132
|
_this = _super.call(this, props);
|
|
163
133
|
var customRangeStartValue = props.startValue ? props.startValue : props.defaultStartValue;
|
|
@@ -190,54 +160,55 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
190
160
|
_this.handleResetInternalState = _this.handleResetInternalState.bind((0, _assertThisInitialized2["default"])(_this));
|
|
191
161
|
return _this;
|
|
192
162
|
}
|
|
193
|
-
|
|
194
163
|
(0, _createClass2["default"])(DateRangePicker, [{
|
|
195
164
|
key: "componentDidMount",
|
|
196
165
|
value: function componentDidMount() {
|
|
197
166
|
var _this$props = this.props,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
167
|
+
startValue = _this$props.startValue,
|
|
168
|
+
endValue = _this$props.endValue,
|
|
169
|
+
locale = _this$props.locale;
|
|
202
170
|
if (!this.state.isMounted) {
|
|
203
171
|
this.setState({
|
|
204
172
|
isMounted: true
|
|
205
173
|
});
|
|
206
|
-
}
|
|
207
|
-
|
|
174
|
+
}
|
|
208
175
|
|
|
176
|
+
// initial mount value
|
|
209
177
|
if (startValue && endValue) {
|
|
210
178
|
this.update(startValue, endValue, locale);
|
|
211
179
|
}
|
|
212
180
|
}
|
|
181
|
+
|
|
213
182
|
/**
|
|
214
183
|
* Responsible for handling start/end values given from outside (controlled component context).
|
|
215
184
|
* @param {object} nextProps - The next props.
|
|
216
185
|
* @returns {undefined}
|
|
217
186
|
*/
|
|
218
187
|
// eslint-disable-next-line camelcase
|
|
219
|
-
|
|
220
188
|
}, {
|
|
221
189
|
key: "UNSAFE_componentWillReceiveProps",
|
|
222
190
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
223
191
|
var startValue = nextProps.startValue,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
192
|
+
endValue = nextProps.endValue,
|
|
193
|
+
textDefault = nextProps.textDefault,
|
|
194
|
+
customRangeOnly = nextProps.customRangeOnly,
|
|
195
|
+
locale = nextProps.locale,
|
|
196
|
+
defaultStartValue = nextProps.defaultStartValue,
|
|
197
|
+
defaultEndValue = nextProps.defaultEndValue;
|
|
230
198
|
var _this$state = this.state,
|
|
231
|
-
|
|
232
|
-
|
|
199
|
+
internalStartValue = _this$state.internalStartValue,
|
|
200
|
+
internalEndValue = _this$state.internalEndValue;
|
|
201
|
+
|
|
202
|
+
// handle reset:
|
|
233
203
|
// reset condition 1 is for uncontrolled components,
|
|
234
204
|
// making sure that when a time is selected, and then the locale changed, that the selection remains
|
|
205
|
+
var resetCondition1 = (0, _isNil["default"])(startValue) && (0, _isNil["default"])(endValue) && (0, _isNil["default"])(internalStartValue) && (0, _isNil["default"])(internalEndValue);
|
|
235
206
|
|
|
236
|
-
|
|
207
|
+
// reset condition 2 is for controlled components,
|
|
237
208
|
// when a time is set / defined, and the controlling component wants a hard reset
|
|
209
|
+
var resetCondition2 = (0, _isNull["default"])(startValue) && (0, _isNull["default"])(endValue);
|
|
238
210
|
|
|
239
|
-
|
|
240
|
-
|
|
211
|
+
// reset to original state
|
|
241
212
|
if (resetCondition1 || resetCondition2) {
|
|
242
213
|
this.setState({
|
|
243
214
|
internalStartValue: undefined,
|
|
@@ -260,6 +231,7 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
260
231
|
this.update(internalStartValue, internalEndValue, locale);
|
|
261
232
|
}
|
|
262
233
|
}
|
|
234
|
+
|
|
263
235
|
/**
|
|
264
236
|
* Converts start/end values to moments, makes them readable,
|
|
265
237
|
* crafts a dropdownToggleText and updates state.
|
|
@@ -270,20 +242,22 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
270
242
|
* @param {object} callback - callback to be called, after state has changed.
|
|
271
243
|
* @returns {undefined}
|
|
272
244
|
*/
|
|
273
|
-
|
|
274
245
|
}, {
|
|
275
246
|
key: "update",
|
|
276
247
|
value: function update(startValue, endValue, locale, extras, callback) {
|
|
277
248
|
var hasTimePicker = this.props.hasTimePicker;
|
|
278
|
-
var format = hasTimePicker ? LOCAL_DATE_FORMAT : LOCAL_DATE_FORMAT_NO_TIME;
|
|
249
|
+
var format = hasTimePicker ? LOCAL_DATE_FORMAT : LOCAL_DATE_FORMAT_NO_TIME;
|
|
279
250
|
|
|
251
|
+
// necessary to set start to startOf / end day to endOf, when selecting "without time"
|
|
280
252
|
var finalStartValue = hasTimePicker ? (0, _moment["default"])(startValue) : (0, _moment["default"])(startValue).startOf('day');
|
|
281
|
-
var finalEndValue = hasTimePicker ? (0, _moment["default"])(endValue) : (0, _moment["default"])(endValue).endOf('day');
|
|
253
|
+
var finalEndValue = hasTimePicker ? (0, _moment["default"])(endValue) : (0, _moment["default"])(endValue).endOf('day');
|
|
282
254
|
|
|
255
|
+
// composition of dropdownToggleText
|
|
283
256
|
var startValueText = "".concat(finalStartValue.locale(locale).format(format));
|
|
284
257
|
var endValueText = "".concat(finalEndValue.locale(locale).format(format));
|
|
285
|
-
var dropdownToggleText = startValueText === endValueText ? startValueText : "".concat(startValueText, " \u2192 ").concat(endValueText);
|
|
258
|
+
var dropdownToggleText = startValueText === endValueText ? startValueText : "".concat(startValueText, " \u2192 ").concat(endValueText);
|
|
286
259
|
|
|
260
|
+
// set state, and call callback
|
|
287
261
|
this.setState(_objectSpread({
|
|
288
262
|
internalStartValue: finalStartValue,
|
|
289
263
|
internalEndValue: finalEndValue,
|
|
@@ -305,15 +279,14 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
305
279
|
event.preventDefault();
|
|
306
280
|
event.stopPropagation();
|
|
307
281
|
}
|
|
308
|
-
|
|
309
282
|
var _this$props2 = this.props,
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
283
|
+
textDefault = _this$props2.textDefault,
|
|
284
|
+
customRangeOnly = _this$props2.customRangeOnly,
|
|
285
|
+
defaultStartValue = _this$props2.defaultStartValue,
|
|
286
|
+
defaultEndValue = _this$props2.defaultEndValue,
|
|
287
|
+
pullRight = _this$props2.pullRight,
|
|
288
|
+
dropup = _this$props2.dropup,
|
|
289
|
+
onClear = _this$props2.onClear;
|
|
317
290
|
this.setState({
|
|
318
291
|
internalStartValue: undefined,
|
|
319
292
|
internalEndValue: undefined,
|
|
@@ -333,12 +306,12 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
333
306
|
});
|
|
334
307
|
onClear();
|
|
335
308
|
}
|
|
309
|
+
|
|
336
310
|
/**
|
|
337
311
|
* Gets called by wrapper component "onClickOutside".
|
|
338
312
|
* Responsible for closing the dropdown when a click occured outside.
|
|
339
313
|
* @returns {undefined}
|
|
340
314
|
*/
|
|
341
|
-
|
|
342
315
|
}, {
|
|
343
316
|
key: "handleClickOutside",
|
|
344
317
|
value: function handleClickOutside() {
|
|
@@ -348,21 +321,18 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
348
321
|
});
|
|
349
322
|
}
|
|
350
323
|
}
|
|
324
|
+
|
|
351
325
|
/**
|
|
352
326
|
* Toggles dropdown open status and visibility of custom range area.
|
|
353
327
|
* @param {object} event - mouse event on toggle dropdown
|
|
354
328
|
* @returns {undefined}
|
|
355
329
|
*/
|
|
356
|
-
|
|
357
330
|
}, {
|
|
358
331
|
key: "toggleDropdownOpen",
|
|
359
332
|
value: function toggleDropdownOpen(event) {
|
|
360
333
|
var _this2 = this;
|
|
361
|
-
|
|
362
334
|
var toggleNode = _reactDom["default"].findDOMNode(this.refDropdownToggle);
|
|
363
|
-
|
|
364
335
|
var menuNode = _reactDom["default"].findDOMNode(this.refDropdownMenu);
|
|
365
|
-
|
|
366
336
|
var dropDirection = this.isAutoDropActive() && !this.state.isDropdownOpen ? (0, _getDropDirection["default"])(toggleNode, menuNode) : {};
|
|
367
337
|
var left = event.currentTarget.getBoundingClientRect().left;
|
|
368
338
|
this.setState(function (prevState) {
|
|
@@ -379,6 +349,7 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
379
349
|
value: function isAutoDropActive() {
|
|
380
350
|
return !(!this.props.autoDropDirection || this.props.dropup || this.props.pullRight);
|
|
381
351
|
}
|
|
352
|
+
|
|
382
353
|
/**
|
|
383
354
|
* Only gets called on manual change of datePicker (user interaction).
|
|
384
355
|
* Has influence the validity of the end date.
|
|
@@ -390,7 +361,6 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
390
361
|
* @param {object} isValidDate - if the date is valid or not.
|
|
391
362
|
* @returns {undefined}
|
|
392
363
|
*/
|
|
393
|
-
|
|
394
364
|
}, {
|
|
395
365
|
key: "onStartChange",
|
|
396
366
|
value: function onStartChange(startValue, isValidDate) {
|
|
@@ -398,35 +368,33 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
398
368
|
isStartValid: false
|
|
399
369
|
};
|
|
400
370
|
var _this$props3 = this.props,
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
371
|
+
hasTimePicker = _this$props3.hasTimePicker,
|
|
372
|
+
minValue = _this$props3.minValue,
|
|
373
|
+
maxValue = _this$props3.maxValue;
|
|
404
374
|
var customRangeEndValue = this.state.customRangeEndValue;
|
|
405
|
-
|
|
406
375
|
if (_moment["default"].isMoment(startValue)) {
|
|
407
376
|
// necessary to set start to startOf / end day to endOf, when selecting "without time"
|
|
408
|
-
var finalStartValue = hasTimePicker ? startValue : (0, _moment["default"])(startValue).startOf('day');
|
|
377
|
+
var finalStartValue = hasTimePicker ? startValue : (0, _moment["default"])(startValue).startOf('day');
|
|
409
378
|
|
|
379
|
+
// check validity of input (min/max)
|
|
410
380
|
var passesMin = minValue ? finalStartValue.isSameOrAfter((0, _moment["default"])(minValue)) : true;
|
|
411
381
|
var passesMax = maxValue ? finalStartValue.isSameOrBefore((0, _moment["default"])(maxValue)) : true;
|
|
412
382
|
var isValidInput = isValidDate && passesMin && passesMax;
|
|
413
383
|
newState.isStartValid = isValidInput;
|
|
414
|
-
|
|
415
384
|
if (isValidDate) {
|
|
416
385
|
newState.customRangeStartValue = finalStartValue;
|
|
417
386
|
newState.isEndValid = !customRangeEndValue.isBefore(finalStartValue);
|
|
418
387
|
}
|
|
419
388
|
}
|
|
420
|
-
|
|
421
389
|
this.setState(newState);
|
|
422
390
|
}
|
|
391
|
+
|
|
423
392
|
/**
|
|
424
393
|
* Only gets called on manual change of datePicker (user interaction)
|
|
425
394
|
* @param {object} endValue - the start date (date or moment).
|
|
426
395
|
* @param {object} isValidDate - if the date is valid or not.
|
|
427
396
|
* @returns {undefined}
|
|
428
397
|
*/
|
|
429
|
-
|
|
430
398
|
}, {
|
|
431
399
|
key: "onEndChange",
|
|
432
400
|
value: function onEndChange(endValue, isValidDate) {
|
|
@@ -434,80 +402,77 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
434
402
|
isEndValid: false
|
|
435
403
|
};
|
|
436
404
|
var _this$props4 = this.props,
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
var customRangeStartValue = this.state.customRangeStartValue;
|
|
405
|
+
hasTimePicker = _this$props4.hasTimePicker,
|
|
406
|
+
minValue = _this$props4.minValue,
|
|
407
|
+
maxValue = _this$props4.maxValue;
|
|
408
|
+
var customRangeStartValue = this.state.customRangeStartValue;
|
|
409
|
+
// let isValidInput = false;
|
|
441
410
|
|
|
442
411
|
if (_moment["default"].isMoment(endValue)) {
|
|
443
412
|
// necessary to set end of seconds and milliseconds for every end value
|
|
444
|
-
var correctedEndValue = isValidDate ? endValue.endOf('minute') : endValue;
|
|
413
|
+
var correctedEndValue = isValidDate ? endValue.endOf('minute') : endValue;
|
|
445
414
|
|
|
446
|
-
|
|
415
|
+
// necessary to set start to startOf / end day to endOf, when selecting "without time"
|
|
416
|
+
var finalEndValue = hasTimePicker ? correctedEndValue : (0, _moment["default"])(endValue).endOf('day');
|
|
447
417
|
|
|
418
|
+
// check validity of input (min/max)
|
|
448
419
|
var passesMin = minValue ? finalEndValue.isSameOrAfter((0, _moment["default"])(minValue)) : true;
|
|
449
420
|
var passesMax = maxValue ? finalEndValue.isSameOrBefore((0, _moment["default"])(maxValue)) : true;
|
|
450
421
|
var isValidInput = isValidDate && passesMin && passesMax && finalEndValue.isAfter(customRangeStartValue);
|
|
451
422
|
newState.isEndValid = isValidInput;
|
|
452
|
-
|
|
453
423
|
if (isValidDate) {
|
|
454
424
|
newState.customRangeEndValue = finalEndValue;
|
|
455
425
|
}
|
|
456
426
|
}
|
|
457
|
-
|
|
458
427
|
this.setState(newState);
|
|
459
428
|
}
|
|
429
|
+
|
|
460
430
|
/**
|
|
461
431
|
* Callback method for DatePicker to limit selection in DatePicker.
|
|
462
432
|
* @param {object} current - Current date in the loop.
|
|
463
433
|
* @returns {undefined}
|
|
464
434
|
*/
|
|
465
|
-
|
|
466
435
|
}, {
|
|
467
436
|
key: "getValidStartDates",
|
|
468
437
|
value: function getValidStartDates(current) {
|
|
469
438
|
var _this$props5 = this.props,
|
|
470
|
-
|
|
471
|
-
|
|
439
|
+
minValue = _this$props5.minValue,
|
|
440
|
+
maxValue = _this$props5.maxValue;
|
|
472
441
|
var customRangeEndValue = (0, _moment["default"])(this.state.customRangeEndValue);
|
|
473
|
-
|
|
474
442
|
if (current.isSame(customRangeEndValue, 'day')) {
|
|
475
443
|
return true;
|
|
476
444
|
}
|
|
477
|
-
|
|
478
445
|
var passesMin = minValue ? current.isSameOrAfter((0, _moment["default"])(minValue)) : true;
|
|
479
446
|
var passesMax = maxValue ? current.isSameOrBefore((0, _moment["default"])(maxValue)) : true;
|
|
480
447
|
return passesMin && passesMax;
|
|
481
448
|
}
|
|
449
|
+
|
|
482
450
|
/**
|
|
483
451
|
* Callback method for DatePicker to limit selection in DatePicker.
|
|
484
452
|
* End date has to be after start date.
|
|
485
453
|
* @param {object} current - Current date in the loop.
|
|
486
454
|
* @returns {undefined}
|
|
487
455
|
*/
|
|
488
|
-
|
|
489
456
|
}, {
|
|
490
457
|
key: "getValidEndDates",
|
|
491
458
|
value: function getValidEndDates(current) {
|
|
492
459
|
var _this$props6 = this.props,
|
|
493
|
-
|
|
494
|
-
|
|
460
|
+
minValue = _this$props6.minValue,
|
|
461
|
+
maxValue = _this$props6.maxValue;
|
|
495
462
|
var customRangeStartValue = (0, _moment["default"])(this.state.customRangeStartValue);
|
|
496
|
-
|
|
497
463
|
if (current.isSame(customRangeStartValue, 'day')) {
|
|
498
464
|
return true;
|
|
499
465
|
}
|
|
500
|
-
|
|
501
466
|
var passesMin = minValue ? current.isSameOrAfter((0, _moment["default"])(minValue)) : true;
|
|
502
467
|
var passesMax = maxValue ? current.isSameOrBefore((0, _moment["default"])(maxValue)) : true;
|
|
503
468
|
var isAfterStart = current.isAfter(customRangeStartValue);
|
|
504
469
|
return passesMin && passesMax && isAfterStart;
|
|
505
470
|
}
|
|
471
|
+
|
|
506
472
|
/**
|
|
507
473
|
* Gets called when "custom ..." has been selected.
|
|
508
474
|
* @returns {undefined}
|
|
509
475
|
*/
|
|
510
|
-
|
|
511
476
|
}, {
|
|
512
477
|
key: "handleCustomToggle",
|
|
513
478
|
value: function handleCustomToggle() {
|
|
@@ -523,44 +488,42 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
523
488
|
if (typeof preset.onSelect === 'function') {
|
|
524
489
|
preset.onSelect();
|
|
525
490
|
}
|
|
526
|
-
|
|
527
491
|
this.handleSelect(preset.startValue, preset.endValue);
|
|
528
492
|
}
|
|
493
|
+
|
|
529
494
|
/**
|
|
530
495
|
* Gets called when a preset has been selected.
|
|
531
496
|
* @param {object} startValue - the start date (date or moment).
|
|
532
497
|
* @param {object} endValue - the start date (date or moment).
|
|
533
498
|
* @returns {undefined}
|
|
534
499
|
*/
|
|
535
|
-
|
|
536
500
|
}, {
|
|
537
501
|
key: "handleSelect",
|
|
538
502
|
value: function handleSelect(startValue, endValue) {
|
|
539
503
|
var _this$props7 = this.props,
|
|
540
|
-
|
|
541
|
-
|
|
504
|
+
onRangeChange = _this$props7.onRangeChange,
|
|
505
|
+
locale = _this$props7.locale;
|
|
542
506
|
var extras = {
|
|
543
507
|
isDropdownOpen: false
|
|
544
508
|
};
|
|
545
509
|
this.update(startValue, endValue, locale, extras, onRangeChange);
|
|
546
510
|
}
|
|
511
|
+
|
|
547
512
|
/**
|
|
548
513
|
* Gets called user clicks the apply button.
|
|
549
514
|
* @returns {undefined}
|
|
550
515
|
*/
|
|
551
|
-
|
|
552
516
|
}, {
|
|
553
517
|
key: "handleCustomApply",
|
|
554
518
|
value: function handleCustomApply() {
|
|
555
519
|
var _this$state2 = this.state,
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
520
|
+
customRangeStartValue = _this$state2.customRangeStartValue,
|
|
521
|
+
customRangeEndValue = _this$state2.customRangeEndValue,
|
|
522
|
+
isStartValid = _this$state2.isStartValid,
|
|
523
|
+
isEndValid = _this$state2.isEndValid;
|
|
560
524
|
var _this$props8 = this.props,
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
525
|
+
onRangeChange = _this$props8.onRangeChange,
|
|
526
|
+
locale = _this$props8.locale;
|
|
564
527
|
if (isStartValid && isEndValid) {
|
|
565
528
|
var extras = {
|
|
566
529
|
isDropdownOpen: false
|
|
@@ -572,18 +535,18 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
572
535
|
key: "getDropdownToggle",
|
|
573
536
|
value: function getDropdownToggle(dropdownToggleText) {
|
|
574
537
|
var _this3 = this;
|
|
575
|
-
|
|
576
538
|
var _this$props9 = this.props,
|
|
577
|
-
|
|
578
|
-
|
|
539
|
+
children = _this$props9.children,
|
|
540
|
+
clearable = _this$props9.clearable;
|
|
579
541
|
var _this$state3 = this.state,
|
|
580
|
-
|
|
581
|
-
|
|
542
|
+
startValueText = _this$state3.startValueText,
|
|
543
|
+
endValueText = _this$state3.endValueText;
|
|
582
544
|
var isClearable = clearable && dropdownToggleText.type !== Placeholder;
|
|
583
545
|
var labelClassNames = (0, _classnames["default"])(isClearable && 'withClearButton');
|
|
584
|
-
var isRenderCallback = children && typeof children === 'function';
|
|
585
|
-
// the toggle element must not be a <button> but a div.
|
|
546
|
+
var isRenderCallback = children && typeof children === 'function';
|
|
586
547
|
|
|
548
|
+
// Note: due to issues with nested events in Firefox (for toggle and inside the clear)
|
|
549
|
+
// the toggle element must not be a <button> but a div.
|
|
587
550
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
588
551
|
type: 'button',
|
|
589
552
|
className: 'DateRangePickerToggle form-control dropdown-toggle text-left',
|
|
@@ -636,47 +599,45 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
636
599
|
onClick: this.toggleDropdownOpen,
|
|
637
600
|
className: 'btn btn-default pull-right'
|
|
638
601
|
}, textCancel)));
|
|
639
|
-
}
|
|
602
|
+
}
|
|
640
603
|
|
|
604
|
+
// eslint-disable-next-line complexity
|
|
641
605
|
}, {
|
|
642
606
|
key: "render",
|
|
643
607
|
value: function render() {
|
|
644
608
|
var _this4 = this;
|
|
645
|
-
|
|
646
609
|
var _this$props10 = this.props,
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
610
|
+
locale = _this$props10.locale,
|
|
611
|
+
textCustom = _this$props10.textCustom,
|
|
612
|
+
textApply = _this$props10.textApply,
|
|
613
|
+
textCancel = _this$props10.textCancel,
|
|
614
|
+
textFrom = _this$props10.textFrom,
|
|
615
|
+
textTo = _this$props10.textTo,
|
|
616
|
+
textToday = _this$props10.textToday,
|
|
617
|
+
textLastWeek = _this$props10.textLastWeek,
|
|
618
|
+
textLastMonth = _this$props10.textLastMonth,
|
|
619
|
+
className = _this$props10.className,
|
|
620
|
+
clearable = _this$props10.clearable,
|
|
621
|
+
dropdownClass = _this$props10.dropdownClass,
|
|
622
|
+
dropdownMenuClass = _this$props10.dropdownMenuClass,
|
|
623
|
+
customPresets = _this$props10.customPresets,
|
|
624
|
+
hasTimePicker = _this$props10.hasTimePicker;
|
|
662
625
|
var _this$state4 = this.state,
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
626
|
+
customRangeStartValue = _this$state4.customRangeStartValue,
|
|
627
|
+
customRangeEndValue = _this$state4.customRangeEndValue,
|
|
628
|
+
isStartValid = _this$state4.isStartValid,
|
|
629
|
+
isEndValid = _this$state4.isEndValid,
|
|
630
|
+
isCustomVisible = _this$state4.isCustomVisible,
|
|
631
|
+
isDropdownOpen = _this$state4.isDropdownOpen,
|
|
632
|
+
dropdownToggleText = _this$state4.dropdownToggleText;
|
|
670
633
|
var pullRight = this.isAutoDropActive() ? this.state.pullRight : this.props.pullRight;
|
|
671
634
|
var dropup = this.isAutoDropActive() ? this.state.dropup : this.props.dropup;
|
|
672
|
-
|
|
673
635
|
if (customPresets && (0, _isEqual["default"])(customPresets, defaultProps.customPresets)) {
|
|
674
636
|
// support backward compatibility to override default drop down text values
|
|
675
637
|
customPresets[0].text = textToday;
|
|
676
638
|
customPresets[1].text = textLastWeek;
|
|
677
639
|
customPresets[2].text = textLastMonth;
|
|
678
640
|
}
|
|
679
|
-
|
|
680
641
|
var classes = (0, _classnames["default"])('DateRangePicker', className && className);
|
|
681
642
|
var dropDownClassNames = (0, _classnames["default"])('select', 'dropdown', dropdownClass, isDropdownOpen && 'open', dropup && 'dropup');
|
|
682
643
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -736,11 +697,8 @@ var DateRangePicker = /*#__PURE__*/function (_Component) {
|
|
|
736
697
|
}]);
|
|
737
698
|
return DateRangePicker;
|
|
738
699
|
}(_react.Component);
|
|
739
|
-
|
|
740
700
|
exports.DateRangePickerPure = DateRangePicker;
|
|
741
701
|
DateRangePicker.propTypes = propTypes;
|
|
742
702
|
DateRangePicker.defaultProps = defaultProps;
|
|
743
|
-
|
|
744
703
|
var _default = (0, _reactOnclickoutside["default"])(DateRangePicker);
|
|
745
|
-
|
|
746
704
|
exports["default"] = _default;
|
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
10
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
12
|
var _Dialog = _interopRequireDefault(require("./Dialog"));
|
|
17
|
-
|
|
13
|
+
var _excluded = ["content", "onClickCancel", "cancelButtonText", "onClickConfirm", "confirmButtonText", "disableConfirm"];
|
|
18
14
|
/*
|
|
19
15
|
* Confirmation dialog component to confirm or cancel an action
|
|
20
16
|
*/
|
|
21
17
|
var ConfirmationDialog = function ConfirmationDialog(props) {
|
|
22
18
|
var content = props.content,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
onClickCancel = props.onClickCancel,
|
|
20
|
+
cancelButtonText = props.cancelButtonText,
|
|
21
|
+
onClickConfirm = props.onClickConfirm,
|
|
22
|
+
confirmButtonText = props.confirmButtonText,
|
|
23
|
+
disableConfirm = props.disableConfirm,
|
|
24
|
+
remainingProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
29
25
|
var footer = /*#__PURE__*/_react["default"].createElement("div", {
|
|
30
26
|
className: "display-flex justify-content-end btn-toolbar"
|
|
31
27
|
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
@@ -38,8 +34,7 @@ var ConfirmationDialog = function ConfirmationDialog(props) {
|
|
|
38
34
|
onClick: onClickConfirm,
|
|
39
35
|
disabled: disableConfirm
|
|
40
36
|
}, confirmButtonText));
|
|
41
|
-
|
|
42
|
-
return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], (0, _extends2["default"])({}, props, {
|
|
37
|
+
return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], (0, _extends2["default"])({}, remainingProps, {
|
|
43
38
|
body: content,
|
|
44
39
|
footer: footer,
|
|
45
40
|
onHide: onClickCancel,
|
|
@@ -48,7 +43,6 @@ var ConfirmationDialog = function ConfirmationDialog(props) {
|
|
|
48
43
|
disableEsc: true
|
|
49
44
|
}));
|
|
50
45
|
};
|
|
51
|
-
|
|
52
46
|
ConfirmationDialog.defaultProps = {
|
|
53
47
|
show: false,
|
|
54
48
|
onClickCancel: function onClickCancel() {},
|