@progress/kendo-react-layout 6.1.1 → 7.0.0-develop.1
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/LICENSE.md +1 -1
- package/{dist/npm/actionsheet → actionsheet}/ActionSheet.d.ts +5 -1
- package/actionsheet/ActionSheetContent.d.ts +14 -0
- package/actionsheet/ActionSheetFooter.d.ts +14 -0
- package/actionsheet/ActionSheetHeader.d.ts +14 -0
- package/actionsheet/ActionSheetItem.d.ts +10 -0
- package/actionsheet/interfaces/ActionSheetChildrenProps.d.ts +17 -0
- package/{dist/npm/actionsheet → actionsheet}/interfaces/ActionSheetItemProps.d.ts +4 -1
- package/{dist/npm/appbar → appbar}/AppBar.d.ts +4 -0
- package/{dist/npm/appbar → appbar}/AppBarSection.d.ts +4 -0
- package/{dist/npm/appbar → appbar}/AppBarSpacer.d.ts +4 -0
- package/{dist/es/appbar → appbar}/interfaces/AppBarProps.d.ts +7 -3
- package/{dist/npm/appbar → appbar}/interfaces/AppBarSectionProps.d.ts +4 -0
- package/{dist/npm/appbar → appbar}/interfaces/AppBarSpacerProps.d.ts +4 -0
- package/{dist/es/bottomnavigation → bottomnavigation}/BottomNavigation.d.ts +4 -0
- package/{dist/npm/bottomnavigation → bottomnavigation}/BottomNavigationItem.d.ts +5 -1
- package/{dist/npm/bottomnavigation → bottomnavigation}/BottomNavigationItemProps.d.ts +4 -1
- package/{dist/es/bottomnavigation → bottomnavigation}/BottomNavigationProps.d.ts +8 -6
- package/{dist/npm/bottomnavigation → bottomnavigation}/models/events.d.ts +4 -0
- package/{dist/npm/bottomnavigation → bottomnavigation}/models/utils.d.ts +4 -0
- package/{dist/npm/breadcrumb → breadcrumb}/Breadcrumb.d.ts +4 -0
- package/{dist/npm/breadcrumb → breadcrumb}/BreadcrumbDelimiter.d.ts +4 -0
- package/{dist/npm/breadcrumb → breadcrumb}/BreadcrumbLink.d.ts +4 -0
- package/{dist/es/breadcrumb → breadcrumb}/BreadcrumbListItem.d.ts +4 -0
- package/{dist/npm/breadcrumb → breadcrumb}/BreadcrumbOrderedList.d.ts +4 -0
- package/card/Avatar.d.ts +7 -0
- package/card/Card.d.ts +8 -0
- package/card/CardActions.d.ts +7 -0
- package/card/CardBody.d.ts +7 -0
- package/card/CardFooter.d.ts +7 -0
- package/card/CardHeader.d.ts +7 -0
- package/card/CardImage.d.ts +7 -0
- package/card/CardSubtitle.d.ts +7 -0
- package/card/CardTitle.d.ts +7 -0
- package/{dist/npm/card → card}/interfaces/AvatarProps.d.ts +4 -1
- package/{dist/es/card → card}/interfaces/CardActionsProps.d.ts +4 -1
- package/card/interfaces/CardBodyProps.d.ts +18 -0
- package/card/interfaces/CardFooterProps.d.ts +18 -0
- package/card/interfaces/CardHandle.d.ts +18 -0
- package/card/interfaces/CardHeaderProps.d.ts +18 -0
- package/{dist/es/card → card}/interfaces/CardImageProps.d.ts +4 -1
- package/{dist/es/card → card}/interfaces/CardProps.d.ts +4 -1
- package/card/interfaces/CardSubtitleProps.d.ts +18 -0
- package/card/interfaces/CardTitleProps.d.ts +18 -0
- package/{dist/npm/card → card}/interfaces/Enums.d.ts +4 -0
- package/{dist/npm/contextmenu → contextmenu}/ContextMenu.d.ts +5 -1
- package/dist/cdn/js/kendo-react-layout.js +5 -1
- package/{dist/es/drawer → drawer}/Drawer.d.ts +4 -0
- package/{dist/es/drawer → drawer}/DrawerContent.d.ts +4 -0
- package/{dist/npm/drawer → drawer}/DrawerItem.d.ts +4 -0
- package/{dist/npm/drawer → drawer}/DrawerNavigation.d.ts +4 -0
- package/{dist/npm/drawer → drawer}/context/DrawerContext.d.ts +5 -1
- package/drawer/interfaces/DrawerAnimation.d.ts +18 -0
- package/{dist/es/drawer → drawer}/interfaces/DrawerContentProps.d.ts +4 -1
- package/drawer/interfaces/DrawerItemHandle.d.ts +21 -0
- package/{dist/es/drawer → drawer}/interfaces/DrawerItemProps.d.ts +4 -1
- package/{dist/npm/drawer → drawer}/interfaces/DrawerNavigationProps.d.ts +4 -1
- package/{dist/npm/drawer → drawer}/interfaces/DrawerProps.d.ts +4 -0
- package/{dist/es/drawer → drawer}/interfaces/DrawerSelectEvent.d.ts +4 -0
- package/expansionpanel/ExpansionPanel.d.ts +10 -0
- package/expansionpanel/ExpansionPanelContent.d.ts +9 -0
- package/expansionpanel/index.d.ts +7 -0
- package/{dist/es/expansionpanel → expansionpanel}/interfaces.d.ts +4 -1
- package/{dist/es/gridlayout → gridlayout}/GridLayout.d.ts +4 -0
- package/{dist/es/gridlayout → gridlayout}/GridLayoutItem.d.ts +4 -0
- package/gridlayout/interfaces/GridLayoutColumnProps.d.ts +13 -0
- package/{dist/npm/gridlayout → gridlayout}/interfaces/GridLayoutItemProps.d.ts +4 -0
- package/{dist/npm/gridlayout → gridlayout}/interfaces/GridLayoutProps.d.ts +4 -0
- package/gridlayout/interfaces/GridLayoutRowProps.d.ts +13 -0
- package/{dist/npm/main.d.ts → index.d.ts} +6 -2
- package/index.js +5 -0
- package/index.mjs +5012 -0
- package/{dist/es/menu → menu}/BaseMenuItemInternalProps.d.ts +4 -0
- package/{dist/es/menu → menu}/MenuProps.d.ts +4 -1
- package/{dist/es/menu → menu}/components/Menu.d.ts +5 -1
- package/{dist/es/menu → menu}/components/MenuItem.d.ts +4 -0
- package/{dist/es/menu → menu}/components/MenuItemArrow.d.ts +5 -1
- package/{dist/es/menu → menu}/components/MenuItemInternal.d.ts +24 -1
- package/{dist/es/menu → menu}/components/MenuItemLink.d.ts +5 -1
- package/{dist/npm/menu → menu}/consts.d.ts +4 -0
- package/{dist/es/menu → menu}/events.d.ts +4 -0
- package/{dist/es/menu → menu}/models/BaseMenuItem.d.ts +4 -1
- package/{dist/es/menu → menu}/models/MenuItemModel.d.ts +4 -0
- package/menu/utils/DirectionHolder.d.ts +15 -0
- package/{dist/npm/menu → menu}/utils/MouseOverHandler.d.ts +4 -0
- package/{dist/es/menu → menu}/utils/getNewItemIdUponKeyboardNavigation.d.ts +4 -0
- package/menu/utils/hoverDelay.d.ts +13 -0
- package/{dist/es/menu → menu}/utils/itemsIdsUtils.d.ts +4 -0
- package/{dist/npm/menu → menu}/utils/misc.d.ts +4 -0
- package/menu/utils/prepareInputItemsForInternalWork.d.ts +10 -0
- package/package-metadata.d.ts +9 -0
- package/package.json +31 -48
- package/{dist/es/panelbar → panelbar}/PanelBar.d.ts +6 -2
- package/{dist/npm/panelbar → panelbar}/PanelBarItem.d.ts +6 -2
- package/panelbar/interfaces/NavigationAction.d.ts +12 -0
- package/panelbar/interfaces/PanelBarItemClickEventArguments.d.ts +12 -0
- package/{dist/es/panelbar → panelbar}/interfaces/PanelBarItemProps.d.ts +4 -1
- package/{dist/es/panelbar → panelbar}/interfaces/PanelBarProps.d.ts +6 -3
- package/{dist/es/panelbar → panelbar}/interfaces/PanelBarSelectEventArguments.d.ts +4 -1
- package/panelbar/interfaces/RenderPanelBarItem.d.ts +19 -0
- package/{dist/es/panelbar → panelbar}/util.d.ts +5 -1
- package/{dist/es/splitter → splitter}/Splitter.d.ts +5 -1
- package/{dist/npm/splitter → splitter}/SplitterBar.d.ts +5 -1
- package/{dist/npm/splitter → splitter}/SplitterPane.d.ts +5 -1
- package/splitter/messages/index.d.ts +14 -0
- package/{dist/npm/stacklayout → stacklayout}/StackLayout.d.ts +4 -0
- package/{dist/es/stacklayout → stacklayout}/StackLayoutProps.d.ts +5 -1
- package/{dist/es/stepper → stepper}/Step.d.ts +4 -0
- package/{dist/es/stepper → stepper}/Stepper.d.ts +4 -0
- package/stepper/contants.d.ts +12 -0
- package/{dist/es/stepper → stepper}/context/StepperContext.d.ts +5 -1
- package/stepper/interfaces/StepChangeEvent.d.ts +15 -0
- package/stepper/interfaces/StepFocusEvent.d.ts +11 -0
- package/stepper/interfaces/StepHandle.d.ts +17 -0
- package/{dist/es/stepper → stepper}/interfaces/StepProps.d.ts +4 -0
- package/stepper/interfaces/StepperChangeEvent.d.ts +15 -0
- package/stepper/interfaces/StepperFocusEvent.d.ts +11 -0
- package/stepper/interfaces/StepperHandle.d.ts +17 -0
- package/{dist/npm/stepper → stepper}/interfaces/StepperProps.d.ts +4 -0
- package/stepper/messages/index.d.ts +19 -0
- package/{dist/es/tabstrip → tabstrip}/TabStrip.d.ts +5 -1
- package/{dist/npm/tabstrip → tabstrip}/TabStripContent.d.ts +5 -1
- package/{dist/es/tabstrip → tabstrip}/TabStripNavigation.d.ts +5 -1
- package/{dist/npm/tabstrip → tabstrip}/TabStripNavigationItem.d.ts +5 -1
- package/{dist/es/tabstrip → tabstrip}/TabStripTab.d.ts +4 -0
- package/{dist/es/tilelayout → tilelayout}/InternalTile.d.ts +6 -2
- package/{dist/es/tilelayout → tilelayout}/ResizeHandlers.d.ts +5 -1
- package/{dist/npm/tilelayout → tilelayout}/TileLayout.d.ts +6 -2
- package/{dist/es/tilelayout/interfaces/main.d.ts → tilelayout/interfaces/index.d.ts} +6 -3
- package/{dist/npm/timeline → timeline}/Timeline.d.ts +4 -0
- package/{dist/npm/timeline → timeline}/TimelineCard.d.ts +4 -0
- package/timeline/TimelineHorizontal.d.ts +7 -0
- package/{dist/es/timeline → timeline}/TimelineVertical.d.ts +4 -0
- package/{dist/npm/timeline → timeline}/utils.d.ts +4 -0
- package/about.md +0 -3
- package/dist/es/actionsheet/ActionSheet.d.ts +0 -134
- package/dist/es/actionsheet/ActionSheet.js +0 -267
- package/dist/es/actionsheet/ActionSheetContent.d.ts +0 -10
- package/dist/es/actionsheet/ActionSheetContent.js +0 -26
- package/dist/es/actionsheet/ActionSheetFooter.d.ts +0 -10
- package/dist/es/actionsheet/ActionSheetFooter.js +0 -26
- package/dist/es/actionsheet/ActionSheetHeader.d.ts +0 -10
- package/dist/es/actionsheet/ActionSheetHeader.js +0 -26
- package/dist/es/actionsheet/ActionSheetItem.d.ts +0 -6
- package/dist/es/actionsheet/ActionSheetItem.js +0 -38
- package/dist/es/actionsheet/interfaces/ActionSheetChildrenProps.d.ts +0 -13
- package/dist/es/actionsheet/interfaces/ActionSheetChildrenProps.js +0 -5
- package/dist/es/actionsheet/interfaces/ActionSheetItemProps.d.ts +0 -67
- package/dist/es/actionsheet/interfaces/ActionSheetItemProps.js +0 -1
- package/dist/es/appbar/AppBar.d.ts +0 -50
- package/dist/es/appbar/AppBar.js +0 -84
- package/dist/es/appbar/AppBarSection.d.ts +0 -49
- package/dist/es/appbar/AppBarSection.js +0 -58
- package/dist/es/appbar/AppBarSpacer.d.ts +0 -50
- package/dist/es/appbar/AppBarSpacer.js +0 -66
- package/dist/es/appbar/interfaces/AppBarProps.js +0 -1
- package/dist/es/appbar/interfaces/AppBarSectionProps.d.ts +0 -18
- package/dist/es/appbar/interfaces/AppBarSectionProps.js +0 -1
- package/dist/es/appbar/interfaces/AppBarSpacerProps.d.ts +0 -19
- package/dist/es/appbar/interfaces/AppBarSpacerProps.js +0 -1
- package/dist/es/bottomnavigation/BottomNavigation.js +0 -133
- package/dist/es/bottomnavigation/BottomNavigationItem.d.ts +0 -12
- package/dist/es/bottomnavigation/BottomNavigationItem.js +0 -53
- package/dist/es/bottomnavigation/BottomNavigationItemProps.d.ts +0 -61
- package/dist/es/bottomnavigation/BottomNavigationItemProps.js +0 -1
- package/dist/es/bottomnavigation/BottomNavigationProps.js +0 -1
- package/dist/es/bottomnavigation/models/events.d.ts +0 -20
- package/dist/es/bottomnavigation/models/events.js +0 -1
- package/dist/es/bottomnavigation/models/utils.d.ts +0 -36
- package/dist/es/bottomnavigation/models/utils.js +0 -36
- package/dist/es/breadcrumb/Breadcrumb.d.ts +0 -159
- package/dist/es/breadcrumb/Breadcrumb.js +0 -118
- package/dist/es/breadcrumb/BreadcrumbDelimiter.d.ts +0 -43
- package/dist/es/breadcrumb/BreadcrumbDelimiter.js +0 -32
- package/dist/es/breadcrumb/BreadcrumbLink.d.ts +0 -131
- package/dist/es/breadcrumb/BreadcrumbLink.js +0 -110
- package/dist/es/breadcrumb/BreadcrumbListItem.js +0 -36
- package/dist/es/breadcrumb/BreadcrumbOrderedList.d.ts +0 -55
- package/dist/es/breadcrumb/BreadcrumbOrderedList.js +0 -36
- package/dist/es/card/Avatar.d.ts +0 -3
- package/dist/es/card/Avatar.js +0 -39
- package/dist/es/card/Card.d.ts +0 -4
- package/dist/es/card/Card.js +0 -55
- package/dist/es/card/CardActions.d.ts +0 -3
- package/dist/es/card/CardActions.js +0 -23
- package/dist/es/card/CardBody.d.ts +0 -3
- package/dist/es/card/CardBody.js +0 -9
- package/dist/es/card/CardFooter.d.ts +0 -3
- package/dist/es/card/CardFooter.js +0 -9
- package/dist/es/card/CardHeader.d.ts +0 -3
- package/dist/es/card/CardHeader.js +0 -9
- package/dist/es/card/CardImage.d.ts +0 -3
- package/dist/es/card/CardImage.js +0 -22
- package/dist/es/card/CardSubtitle.d.ts +0 -3
- package/dist/es/card/CardSubtitle.js +0 -9
- package/dist/es/card/CardTitle.d.ts +0 -3
- package/dist/es/card/CardTitle.js +0 -9
- package/dist/es/card/interfaces/AvatarProps.d.ts +0 -85
- package/dist/es/card/interfaces/AvatarProps.js +0 -1
- package/dist/es/card/interfaces/CardActionsProps.js +0 -1
- package/dist/es/card/interfaces/CardBodyProps.d.ts +0 -15
- package/dist/es/card/interfaces/CardBodyProps.js +0 -1
- package/dist/es/card/interfaces/CardFooterProps.d.ts +0 -15
- package/dist/es/card/interfaces/CardFooterProps.js +0 -1
- package/dist/es/card/interfaces/CardHandle.d.ts +0 -14
- package/dist/es/card/interfaces/CardHandle.js +0 -1
- package/dist/es/card/interfaces/CardHeaderProps.d.ts +0 -15
- package/dist/es/card/interfaces/CardHeaderProps.js +0 -1
- package/dist/es/card/interfaces/CardImageProps.js +0 -1
- package/dist/es/card/interfaces/CardProps.js +0 -1
- package/dist/es/card/interfaces/CardSubtitleProps.d.ts +0 -15
- package/dist/es/card/interfaces/CardSubtitleProps.js +0 -1
- package/dist/es/card/interfaces/CardTitleProps.d.ts +0 -15
- package/dist/es/card/interfaces/CardTitleProps.js +0 -1
- package/dist/es/card/interfaces/Enums.d.ts +0 -23
- package/dist/es/card/interfaces/Enums.js +0 -27
- package/dist/es/contextmenu/ContextMenu.d.ts +0 -27
- package/dist/es/contextmenu/ContextMenu.js +0 -36
- package/dist/es/drawer/Drawer.js +0 -118
- package/dist/es/drawer/DrawerContent.js +0 -50
- package/dist/es/drawer/DrawerItem.d.ts +0 -32
- package/dist/es/drawer/DrawerItem.js +0 -101
- package/dist/es/drawer/DrawerNavigation.d.ts +0 -43
- package/dist/es/drawer/DrawerNavigation.js +0 -153
- package/dist/es/drawer/context/DrawerContext.d.ts +0 -20
- package/dist/es/drawer/context/DrawerContext.js +0 -16
- package/dist/es/drawer/interfaces/DrawerAnimation.d.ts +0 -14
- package/dist/es/drawer/interfaces/DrawerAnimation.js +0 -1
- package/dist/es/drawer/interfaces/DrawerContentProps.js +0 -1
- package/dist/es/drawer/interfaces/DrawerItemHandle.d.ts +0 -17
- package/dist/es/drawer/interfaces/DrawerItemHandle.js +0 -1
- package/dist/es/drawer/interfaces/DrawerItemProps.js +0 -1
- package/dist/es/drawer/interfaces/DrawerNavigationProps.d.ts +0 -18
- package/dist/es/drawer/interfaces/DrawerNavigationProps.js +0 -1
- package/dist/es/drawer/interfaces/DrawerProps.d.ts +0 -82
- package/dist/es/drawer/interfaces/DrawerProps.js +0 -1
- package/dist/es/drawer/interfaces/DrawerSelectEvent.js +0 -1
- package/dist/es/expansionpanel/ExpansionPanel.d.ts +0 -6
- package/dist/es/expansionpanel/ExpansionPanel.js +0 -76
- package/dist/es/expansionpanel/ExpansionPanelContent.d.ts +0 -5
- package/dist/es/expansionpanel/ExpansionPanelContent.js +0 -21
- package/dist/es/expansionpanel/index.d.ts +0 -3
- package/dist/es/expansionpanel/index.js +0 -3
- package/dist/es/expansionpanel/interfaces.js +0 -1
- package/dist/es/gridlayout/GridLayout.js +0 -92
- package/dist/es/gridlayout/GridLayoutItem.js +0 -60
- package/dist/es/gridlayout/interfaces/GridLayoutColumnProps.d.ts +0 -9
- package/dist/es/gridlayout/interfaces/GridLayoutColumnProps.js +0 -1
- package/dist/es/gridlayout/interfaces/GridLayoutItemProps.d.ts +0 -40
- package/dist/es/gridlayout/interfaces/GridLayoutItemProps.js +0 -1
- package/dist/es/gridlayout/interfaces/GridLayoutProps.d.ts +0 -95
- package/dist/es/gridlayout/interfaces/GridLayoutProps.js +0 -1
- package/dist/es/gridlayout/interfaces/GridLayoutRowProps.d.ts +0 -9
- package/dist/es/gridlayout/interfaces/GridLayoutRowProps.js +0 -1
- package/dist/es/main.d.ts +0 -94
- package/dist/es/main.js +0 -94
- package/dist/es/menu/BaseMenuItemInternalProps.js +0 -1
- package/dist/es/menu/MenuProps.js +0 -2
- package/dist/es/menu/components/Menu.js +0 -277
- package/dist/es/menu/components/MenuItem.js +0 -46
- package/dist/es/menu/components/MenuItemArrow.js +0 -78
- package/dist/es/menu/components/MenuItemInternal.js +0 -165
- package/dist/es/menu/components/MenuItemInternalsList.d.ts +0 -22
- package/dist/es/menu/components/MenuItemInternalsList.js +0 -48
- package/dist/es/menu/components/MenuItemLink.js +0 -49
- package/dist/es/menu/consts.d.ts +0 -54
- package/dist/es/menu/consts.js +0 -70
- package/dist/es/menu/events.js +0 -2
- package/dist/es/menu/models/BaseMenuItem.js +0 -3
- package/dist/es/menu/models/MenuItemModel.js +0 -1
- package/dist/es/menu/utils/DirectionHolder.d.ts +0 -11
- package/dist/es/menu/utils/DirectionHolder.js +0 -24
- package/dist/es/menu/utils/MouseOverHandler.d.ts +0 -17
- package/dist/es/menu/utils/MouseOverHandler.js +0 -65
- package/dist/es/menu/utils/getNewItemIdUponKeyboardNavigation.js +0 -202
- package/dist/es/menu/utils/hoverDelay.d.ts +0 -9
- package/dist/es/menu/utils/hoverDelay.js +0 -17
- package/dist/es/menu/utils/itemsIdsUtils.js +0 -119
- package/dist/es/menu/utils/misc.d.ts +0 -16
- package/dist/es/menu/utils/misc.js +0 -42
- package/dist/es/menu/utils/prepareInputItemsForInternalWork.d.ts +0 -6
- package/dist/es/menu/utils/prepareInputItemsForInternalWork.js +0 -105
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/es/panelbar/PanelBar.js +0 -291
- package/dist/es/panelbar/PanelBarItem.d.ts +0 -48
- package/dist/es/panelbar/PanelBarItem.js +0 -153
- package/dist/es/panelbar/interfaces/NavigationAction.d.ts +0 -8
- package/dist/es/panelbar/interfaces/NavigationAction.js +0 -9
- package/dist/es/panelbar/interfaces/PanelBarItemClickEventArguments.d.ts +0 -8
- package/dist/es/panelbar/interfaces/PanelBarItemClickEventArguments.js +0 -1
- package/dist/es/panelbar/interfaces/PanelBarItemProps.js +0 -2
- package/dist/es/panelbar/interfaces/PanelBarProps.js +0 -1
- package/dist/es/panelbar/interfaces/PanelBarSelectEventArguments.js +0 -1
- package/dist/es/panelbar/interfaces/RenderPanelBarItem.d.ts +0 -16
- package/dist/es/panelbar/interfaces/RenderPanelBarItem.js +0 -1
- package/dist/es/panelbar/util.js +0 -197
- package/dist/es/splitter/Splitter.js +0 -383
- package/dist/es/splitter/SplitterBar.d.ts +0 -40
- package/dist/es/splitter/SplitterBar.js +0 -183
- package/dist/es/splitter/SplitterPane.d.ts +0 -53
- package/dist/es/splitter/SplitterPane.js +0 -46
- package/dist/es/splitter/messages/index.d.ts +0 -10
- package/dist/es/splitter/messages/index.js +0 -11
- package/dist/es/stacklayout/StackLayout.d.ts +0 -37
- package/dist/es/stacklayout/StackLayout.js +0 -87
- package/dist/es/stacklayout/StackLayoutProps.js +0 -1
- package/dist/es/stepper/Step.js +0 -141
- package/dist/es/stepper/Stepper.js +0 -224
- package/dist/es/stepper/contants.d.ts +0 -8
- package/dist/es/stepper/contants.js +0 -8
- package/dist/es/stepper/context/StepperContext.js +0 -11
- package/dist/es/stepper/interfaces/StepChangeEvent.d.ts +0 -11
- package/dist/es/stepper/interfaces/StepChangeEvent.js +0 -1
- package/dist/es/stepper/interfaces/StepFocusEvent.d.ts +0 -7
- package/dist/es/stepper/interfaces/StepFocusEvent.js +0 -1
- package/dist/es/stepper/interfaces/StepHandle.d.ts +0 -13
- package/dist/es/stepper/interfaces/StepHandle.js +0 -4
- package/dist/es/stepper/interfaces/StepProps.js +0 -1
- package/dist/es/stepper/interfaces/StepperChangeEvent.d.ts +0 -11
- package/dist/es/stepper/interfaces/StepperChangeEvent.js +0 -1
- package/dist/es/stepper/interfaces/StepperFocusEvent.d.ts +0 -7
- package/dist/es/stepper/interfaces/StepperFocusEvent.js +0 -1
- package/dist/es/stepper/interfaces/StepperHandle.d.ts +0 -13
- package/dist/es/stepper/interfaces/StepperHandle.js +0 -4
- package/dist/es/stepper/interfaces/StepperOnNavigateEvent.d.ts +0 -26
- package/dist/es/stepper/interfaces/StepperOnNavigateEvent.js +0 -16
- package/dist/es/stepper/interfaces/StepperProps.d.ts +0 -94
- package/dist/es/stepper/interfaces/StepperProps.js +0 -1
- package/dist/es/stepper/messages/index.d.ts +0 -15
- package/dist/es/stepper/messages/index.js +0 -16
- package/dist/es/tabstrip/TabStrip.js +0 -218
- package/dist/es/tabstrip/TabStripContent.d.ts +0 -50
- package/dist/es/tabstrip/TabStripContent.js +0 -95
- package/dist/es/tabstrip/TabStripNavigation.js +0 -257
- package/dist/es/tabstrip/TabStripNavigationItem.d.ts +0 -67
- package/dist/es/tabstrip/TabStripNavigationItem.js +0 -106
- package/dist/es/tabstrip/TabStripTab.js +0 -47
- package/dist/es/tilelayout/InternalTile.js +0 -331
- package/dist/es/tilelayout/ResizeHandlers.js +0 -59
- package/dist/es/tilelayout/TileLayout.d.ts +0 -149
- package/dist/es/tilelayout/TileLayout.js +0 -178
- package/dist/es/tilelayout/interfaces/main.js +0 -1
- package/dist/es/timeline/Timeline.d.ts +0 -98
- package/dist/es/timeline/Timeline.js +0 -37
- package/dist/es/timeline/TimelineCard.d.ts +0 -34
- package/dist/es/timeline/TimelineCard.js +0 -62
- package/dist/es/timeline/TimelineHorizontal.d.ts +0 -3
- package/dist/es/timeline/TimelineHorizontal.js +0 -291
- package/dist/es/timeline/TimelineVertical.js +0 -72
- package/dist/es/timeline/utils.d.ts +0 -15
- package/dist/es/timeline/utils.js +0 -26
- package/dist/npm/actionsheet/ActionSheet.js +0 -270
- package/dist/npm/actionsheet/ActionSheetContent.d.ts +0 -10
- package/dist/npm/actionsheet/ActionSheetContent.js +0 -30
- package/dist/npm/actionsheet/ActionSheetFooter.d.ts +0 -10
- package/dist/npm/actionsheet/ActionSheetFooter.js +0 -30
- package/dist/npm/actionsheet/ActionSheetHeader.d.ts +0 -10
- package/dist/npm/actionsheet/ActionSheetHeader.js +0 -30
- package/dist/npm/actionsheet/ActionSheetItem.d.ts +0 -6
- package/dist/npm/actionsheet/ActionSheetItem.js +0 -42
- package/dist/npm/actionsheet/interfaces/ActionSheetChildrenProps.d.ts +0 -13
- package/dist/npm/actionsheet/interfaces/ActionSheetChildrenProps.js +0 -6
- package/dist/npm/actionsheet/interfaces/ActionSheetItemProps.js +0 -2
- package/dist/npm/appbar/AppBar.js +0 -87
- package/dist/npm/appbar/AppBarSection.js +0 -61
- package/dist/npm/appbar/AppBarSpacer.js +0 -69
- package/dist/npm/appbar/interfaces/AppBarProps.d.ts +0 -79
- package/dist/npm/appbar/interfaces/AppBarProps.js +0 -2
- package/dist/npm/appbar/interfaces/AppBarSectionProps.js +0 -2
- package/dist/npm/appbar/interfaces/AppBarSpacerProps.js +0 -2
- package/dist/npm/bottomnavigation/BottomNavigation.d.ts +0 -38
- package/dist/npm/bottomnavigation/BottomNavigation.js +0 -136
- package/dist/npm/bottomnavigation/BottomNavigationItem.js +0 -56
- package/dist/npm/bottomnavigation/BottomNavigationItemProps.js +0 -2
- package/dist/npm/bottomnavigation/BottomNavigationProps.d.ts +0 -155
- package/dist/npm/bottomnavigation/BottomNavigationProps.js +0 -2
- package/dist/npm/bottomnavigation/models/events.js +0 -2
- package/dist/npm/bottomnavigation/models/utils.js +0 -39
- package/dist/npm/breadcrumb/Breadcrumb.js +0 -121
- package/dist/npm/breadcrumb/BreadcrumbDelimiter.js +0 -35
- package/dist/npm/breadcrumb/BreadcrumbLink.js +0 -113
- package/dist/npm/breadcrumb/BreadcrumbListItem.d.ts +0 -51
- package/dist/npm/breadcrumb/BreadcrumbListItem.js +0 -39
- package/dist/npm/breadcrumb/BreadcrumbOrderedList.js +0 -39
- package/dist/npm/card/Avatar.d.ts +0 -3
- package/dist/npm/card/Avatar.js +0 -43
- package/dist/npm/card/Card.d.ts +0 -4
- package/dist/npm/card/Card.js +0 -58
- package/dist/npm/card/CardActions.d.ts +0 -3
- package/dist/npm/card/CardActions.js +0 -27
- package/dist/npm/card/CardBody.d.ts +0 -3
- package/dist/npm/card/CardBody.js +0 -13
- package/dist/npm/card/CardFooter.d.ts +0 -3
- package/dist/npm/card/CardFooter.js +0 -13
- package/dist/npm/card/CardHeader.d.ts +0 -3
- package/dist/npm/card/CardHeader.js +0 -13
- package/dist/npm/card/CardImage.d.ts +0 -3
- package/dist/npm/card/CardImage.js +0 -26
- package/dist/npm/card/CardSubtitle.d.ts +0 -3
- package/dist/npm/card/CardSubtitle.js +0 -13
- package/dist/npm/card/CardTitle.d.ts +0 -3
- package/dist/npm/card/CardTitle.js +0 -13
- package/dist/npm/card/interfaces/AvatarProps.js +0 -2
- package/dist/npm/card/interfaces/CardActionsProps.d.ts +0 -35
- package/dist/npm/card/interfaces/CardActionsProps.js +0 -2
- package/dist/npm/card/interfaces/CardBodyProps.d.ts +0 -15
- package/dist/npm/card/interfaces/CardBodyProps.js +0 -2
- package/dist/npm/card/interfaces/CardFooterProps.d.ts +0 -15
- package/dist/npm/card/interfaces/CardFooterProps.js +0 -2
- package/dist/npm/card/interfaces/CardHandle.d.ts +0 -14
- package/dist/npm/card/interfaces/CardHandle.js +0 -2
- package/dist/npm/card/interfaces/CardHeaderProps.d.ts +0 -15
- package/dist/npm/card/interfaces/CardHeaderProps.js +0 -2
- package/dist/npm/card/interfaces/CardImageProps.d.ts +0 -19
- package/dist/npm/card/interfaces/CardImageProps.js +0 -2
- package/dist/npm/card/interfaces/CardProps.d.ts +0 -45
- package/dist/npm/card/interfaces/CardProps.js +0 -2
- package/dist/npm/card/interfaces/CardSubtitleProps.d.ts +0 -15
- package/dist/npm/card/interfaces/CardSubtitleProps.js +0 -2
- package/dist/npm/card/interfaces/CardTitleProps.d.ts +0 -15
- package/dist/npm/card/interfaces/CardTitleProps.js +0 -2
- package/dist/npm/card/interfaces/Enums.js +0 -30
- package/dist/npm/contextmenu/ContextMenu.js +0 -40
- package/dist/npm/drawer/Drawer.d.ts +0 -40
- package/dist/npm/drawer/Drawer.js +0 -121
- package/dist/npm/drawer/DrawerContent.d.ts +0 -39
- package/dist/npm/drawer/DrawerContent.js +0 -53
- package/dist/npm/drawer/DrawerItem.js +0 -104
- package/dist/npm/drawer/DrawerNavigation.js +0 -156
- package/dist/npm/drawer/context/DrawerContext.js +0 -19
- package/dist/npm/drawer/interfaces/DrawerAnimation.d.ts +0 -14
- package/dist/npm/drawer/interfaces/DrawerAnimation.js +0 -2
- package/dist/npm/drawer/interfaces/DrawerContentProps.d.ts +0 -18
- package/dist/npm/drawer/interfaces/DrawerContentProps.js +0 -2
- package/dist/npm/drawer/interfaces/DrawerItemHandle.d.ts +0 -17
- package/dist/npm/drawer/interfaces/DrawerItemHandle.js +0 -2
- package/dist/npm/drawer/interfaces/DrawerItemProps.d.ts +0 -61
- package/dist/npm/drawer/interfaces/DrawerItemProps.js +0 -2
- package/dist/npm/drawer/interfaces/DrawerNavigationProps.js +0 -2
- package/dist/npm/drawer/interfaces/DrawerProps.js +0 -2
- package/dist/npm/drawer/interfaces/DrawerSelectEvent.d.ts +0 -15
- package/dist/npm/drawer/interfaces/DrawerSelectEvent.js +0 -2
- package/dist/npm/expansionpanel/ExpansionPanel.d.ts +0 -6
- package/dist/npm/expansionpanel/ExpansionPanel.js +0 -79
- package/dist/npm/expansionpanel/ExpansionPanelContent.d.ts +0 -5
- package/dist/npm/expansionpanel/ExpansionPanelContent.js +0 -24
- package/dist/npm/expansionpanel/index.d.ts +0 -3
- package/dist/npm/expansionpanel/index.js +0 -19
- package/dist/npm/expansionpanel/interfaces.d.ts +0 -89
- package/dist/npm/expansionpanel/interfaces.js +0 -2
- package/dist/npm/gridlayout/GridLayout.d.ts +0 -39
- package/dist/npm/gridlayout/GridLayout.js +0 -95
- package/dist/npm/gridlayout/GridLayoutItem.d.ts +0 -38
- package/dist/npm/gridlayout/GridLayoutItem.js +0 -63
- package/dist/npm/gridlayout/interfaces/GridLayoutColumnProps.d.ts +0 -9
- package/dist/npm/gridlayout/interfaces/GridLayoutColumnProps.js +0 -2
- package/dist/npm/gridlayout/interfaces/GridLayoutItemProps.js +0 -2
- package/dist/npm/gridlayout/interfaces/GridLayoutProps.js +0 -2
- package/dist/npm/gridlayout/interfaces/GridLayoutRowProps.d.ts +0 -9
- package/dist/npm/gridlayout/interfaces/GridLayoutRowProps.js +0 -2
- package/dist/npm/main.js +0 -115
- package/dist/npm/menu/BaseMenuItemInternalProps.d.ts +0 -20
- package/dist/npm/menu/BaseMenuItemInternalProps.js +0 -2
- package/dist/npm/menu/MenuProps.d.ts +0 -68
- package/dist/npm/menu/MenuProps.js +0 -3
- package/dist/npm/menu/components/Menu.d.ts +0 -109
- package/dist/npm/menu/components/Menu.js +0 -280
- package/dist/npm/menu/components/MenuItem.d.ts +0 -29
- package/dist/npm/menu/components/MenuItem.js +0 -49
- package/dist/npm/menu/components/MenuItemArrow.d.ts +0 -46
- package/dist/npm/menu/components/MenuItemArrow.js +0 -81
- package/dist/npm/menu/components/MenuItemInternal.d.ts +0 -40
- package/dist/npm/menu/components/MenuItemInternal.js +0 -168
- package/dist/npm/menu/components/MenuItemInternalsList.d.ts +0 -22
- package/dist/npm/menu/components/MenuItemInternalsList.js +0 -51
- package/dist/npm/menu/components/MenuItemLink.d.ts +0 -30
- package/dist/npm/menu/components/MenuItemLink.js +0 -52
- package/dist/npm/menu/consts.js +0 -73
- package/dist/npm/menu/events.d.ts +0 -16
- package/dist/npm/menu/events.js +0 -3
- package/dist/npm/menu/models/BaseMenuItem.d.ts +0 -55
- package/dist/npm/menu/models/BaseMenuItem.js +0 -4
- package/dist/npm/menu/models/MenuItemModel.d.ts +0 -19
- package/dist/npm/menu/models/MenuItemModel.js +0 -2
- package/dist/npm/menu/utils/DirectionHolder.d.ts +0 -11
- package/dist/npm/menu/utils/DirectionHolder.js +0 -27
- package/dist/npm/menu/utils/MouseOverHandler.js +0 -68
- package/dist/npm/menu/utils/getNewItemIdUponKeyboardNavigation.d.ts +0 -7
- package/dist/npm/menu/utils/getNewItemIdUponKeyboardNavigation.js +0 -206
- package/dist/npm/menu/utils/hoverDelay.d.ts +0 -9
- package/dist/npm/menu/utils/hoverDelay.js +0 -22
- package/dist/npm/menu/utils/itemsIdsUtils.d.ts +0 -64
- package/dist/npm/menu/utils/itemsIdsUtils.js +0 -135
- package/dist/npm/menu/utils/misc.js +0 -49
- package/dist/npm/menu/utils/prepareInputItemsForInternalWork.d.ts +0 -6
- package/dist/npm/menu/utils/prepareInputItemsForInternalWork.js +0 -109
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/npm/panelbar/PanelBar.d.ts +0 -77
- package/dist/npm/panelbar/PanelBar.js +0 -294
- package/dist/npm/panelbar/PanelBarItem.js +0 -156
- package/dist/npm/panelbar/interfaces/NavigationAction.d.ts +0 -8
- package/dist/npm/panelbar/interfaces/NavigationAction.js +0 -12
- package/dist/npm/panelbar/interfaces/PanelBarItemClickEventArguments.d.ts +0 -8
- package/dist/npm/panelbar/interfaces/PanelBarItemClickEventArguments.js +0 -2
- package/dist/npm/panelbar/interfaces/PanelBarItemProps.d.ts +0 -95
- package/dist/npm/panelbar/interfaces/PanelBarItemProps.js +0 -3
- package/dist/npm/panelbar/interfaces/PanelBarProps.d.ts +0 -63
- package/dist/npm/panelbar/interfaces/PanelBarProps.js +0 -2
- package/dist/npm/panelbar/interfaces/PanelBarSelectEventArguments.d.ts +0 -15
- package/dist/npm/panelbar/interfaces/PanelBarSelectEventArguments.js +0 -2
- package/dist/npm/panelbar/interfaces/RenderPanelBarItem.d.ts +0 -16
- package/dist/npm/panelbar/interfaces/RenderPanelBarItem.js +0 -2
- package/dist/npm/panelbar/util.d.ts +0 -52
- package/dist/npm/panelbar/util.js +0 -208
- package/dist/npm/splitter/Splitter.d.ts +0 -132
- package/dist/npm/splitter/Splitter.js +0 -386
- package/dist/npm/splitter/SplitterBar.js +0 -186
- package/dist/npm/splitter/SplitterPane.js +0 -49
- package/dist/npm/splitter/messages/index.d.ts +0 -10
- package/dist/npm/splitter/messages/index.js +0 -14
- package/dist/npm/stacklayout/StackLayout.js +0 -90
- package/dist/npm/stacklayout/StackLayoutProps.d.ts +0 -88
- package/dist/npm/stacklayout/StackLayoutProps.js +0 -2
- package/dist/npm/stepper/Step.d.ts +0 -23
- package/dist/npm/stepper/Step.js +0 -144
- package/dist/npm/stepper/Stepper.d.ts +0 -23
- package/dist/npm/stepper/Stepper.js +0 -227
- package/dist/npm/stepper/contants.d.ts +0 -8
- package/dist/npm/stepper/contants.js +0 -11
- package/dist/npm/stepper/context/StepperContext.d.ts +0 -23
- package/dist/npm/stepper/context/StepperContext.js +0 -14
- package/dist/npm/stepper/interfaces/StepChangeEvent.d.ts +0 -11
- package/dist/npm/stepper/interfaces/StepChangeEvent.js +0 -2
- package/dist/npm/stepper/interfaces/StepFocusEvent.d.ts +0 -7
- package/dist/npm/stepper/interfaces/StepFocusEvent.js +0 -2
- package/dist/npm/stepper/interfaces/StepHandle.d.ts +0 -13
- package/dist/npm/stepper/interfaces/StepHandle.js +0 -5
- package/dist/npm/stepper/interfaces/StepProps.d.ts +0 -79
- package/dist/npm/stepper/interfaces/StepProps.js +0 -2
- package/dist/npm/stepper/interfaces/StepperChangeEvent.d.ts +0 -11
- package/dist/npm/stepper/interfaces/StepperChangeEvent.js +0 -2
- package/dist/npm/stepper/interfaces/StepperFocusEvent.d.ts +0 -7
- package/dist/npm/stepper/interfaces/StepperFocusEvent.js +0 -2
- package/dist/npm/stepper/interfaces/StepperHandle.d.ts +0 -13
- package/dist/npm/stepper/interfaces/StepperHandle.js +0 -5
- package/dist/npm/stepper/interfaces/StepperOnNavigateEvent.d.ts +0 -26
- package/dist/npm/stepper/interfaces/StepperOnNavigateEvent.js +0 -19
- package/dist/npm/stepper/interfaces/StepperProps.js +0 -2
- package/dist/npm/stepper/messages/index.d.ts +0 -15
- package/dist/npm/stepper/messages/index.js +0 -19
- package/dist/npm/tabstrip/TabStrip.d.ts +0 -147
- package/dist/npm/tabstrip/TabStrip.js +0 -221
- package/dist/npm/tabstrip/TabStripContent.js +0 -98
- package/dist/npm/tabstrip/TabStripNavigation.d.ts +0 -98
- package/dist/npm/tabstrip/TabStripNavigation.js +0 -260
- package/dist/npm/tabstrip/TabStripNavigationItem.js +0 -109
- package/dist/npm/tabstrip/TabStripTab.d.ts +0 -38
- package/dist/npm/tabstrip/TabStripTab.js +0 -50
- package/dist/npm/tilelayout/InternalTile.d.ts +0 -90
- package/dist/npm/tilelayout/InternalTile.js +0 -334
- package/dist/npm/tilelayout/ResizeHandlers.d.ts +0 -20
- package/dist/npm/tilelayout/ResizeHandlers.js +0 -62
- package/dist/npm/tilelayout/TileLayout.js +0 -181
- package/dist/npm/tilelayout/interfaces/main.d.ts +0 -142
- package/dist/npm/tilelayout/interfaces/main.js +0 -2
- package/dist/npm/timeline/Timeline.js +0 -41
- package/dist/npm/timeline/TimelineCard.js +0 -66
- package/dist/npm/timeline/TimelineHorizontal.d.ts +0 -3
- package/dist/npm/timeline/TimelineHorizontal.js +0 -295
- package/dist/npm/timeline/TimelineVertical.d.ts +0 -12
- package/dist/npm/timeline/TimelineVertical.js +0 -76
- package/dist/npm/timeline/utils.js +0 -31
- package/dist/systemjs/kendo-react-layout.js +0 -1
- package/e2e-next/actionsheet.basic.tests.ts +0 -25
- package/e2e-next/appbar.basic.tests.ts +0 -24
- package/e2e-next/avatar.basic.tests.ts +0 -24
- package/e2e-next/bottomnav.basic.tests.ts +0 -24
- package/e2e-next/breadcrumb.basic.tests.ts +0 -24
- package/e2e-next/card.basic.tests.ts +0 -24
- package/e2e-next/contextmenu.basic.tests.ts +0 -25
- package/e2e-next/drawer.basic.tests.ts +0 -24
- package/e2e-next/expansionpanel.basic.tests.ts +0 -23
- package/e2e-next/gridlayout.basic.tests.ts +0 -24
- package/e2e-next/menu.basic.tests.ts +0 -24
- package/e2e-next/panelbar.basic.tests.ts +0 -24
- package/e2e-next/splitter.basic.tests.ts +0 -24
- package/e2e-next/stacklayout.basic.tests.ts +0 -24
- package/e2e-next/tabstrip.basic.tests.ts +0 -24
- package/e2e-next/tilelayout.basic.tests.ts +0 -24
- package/e2e-next/timeline.basic.tests.ts +0 -24
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import * as React from 'react';
|
|
13
|
-
import * as PropTypes from 'prop-types';
|
|
14
|
-
import { TimelineCard } from './TimelineCard';
|
|
15
|
-
import { addYearsFlags } from './utils';
|
|
16
|
-
import { caretAltLeftIcon, caretAltRightIcon } from '@progress/kendo-svg-icons';
|
|
17
|
-
import { useInternationalization } from '@progress/kendo-react-intl';
|
|
18
|
-
import { classNames, canUseDOM, SvgIcon, Navigation } from '@progress/kendo-react-common';
|
|
19
|
-
export var TimelineHorizontal = function (props) {
|
|
20
|
-
var DEFAULT_EVENT_POINT_WITH = 150;
|
|
21
|
-
var EVENT_CARD_TRANSITION_DURATION = 300;
|
|
22
|
-
var intl = useInternationalization();
|
|
23
|
-
var _a = React.useState(false), arrowLeft = _a[0], setArrowLeft = _a[1];
|
|
24
|
-
var _b = React.useState(true), arrowRight = _b[0], setArrowRight = _b[1];
|
|
25
|
-
var _c = React.useState(), calloutOffset = _c[0], setCalloutOffset = _c[1];
|
|
26
|
-
var _d = React.useState(0), translate = _d[0], setTranslate = _d[1];
|
|
27
|
-
var _e = React.useState(), tabFlexWith = _e[0], setTabFlexWith = _e[1];
|
|
28
|
-
var _f = React.useState(0), visibleTabs = _f[0], setVisibleTabs = _f[1];
|
|
29
|
-
var _g = React.useState(0), firstIndexInView = _g[0], setFirstIndexInView = _g[1];
|
|
30
|
-
var _h = React.useState(1), currentEvent = _h[0], setCurrentEvent = _h[1];
|
|
31
|
-
var _j = React.useState(), eventsToShow = _j[0], setEventsToShow = _j[1];
|
|
32
|
-
var _k = React.useState(), eventsOnTrack = _k[0], setEventsOnTrack = _k[1];
|
|
33
|
-
var _l = React.useState([0, 0, 0]), eventsPositions = _l[0], setEventsPositions = _l[1];
|
|
34
|
-
var _m = React.useState(0), eventsTranslate = _m[0], setEventsTranslate = _m[1];
|
|
35
|
-
var _o = React.useState(1), pivotEvent = _o[0], setPivotEvent = _o[1];
|
|
36
|
-
var trackWrapRef = React.useRef(null);
|
|
37
|
-
var trackRef = React.useRef(null);
|
|
38
|
-
var arrowLeftRef = React.useRef(null);
|
|
39
|
-
var eventsData = props.eventsData, dateFormat = props.dateFormat, navigatable = props.navigatable, onActionClick = props.onActionClick;
|
|
40
|
-
var tabWith = tabFlexWith ? "".concat(tabFlexWith, "%") : "".concat(DEFAULT_EVENT_POINT_WITH, "px");
|
|
41
|
-
var navigation = React.useRef(new Navigation({
|
|
42
|
-
tabIndex: 0,
|
|
43
|
-
root: trackWrapRef,
|
|
44
|
-
selectors: ['.k-timeline-scrollable-wrap']
|
|
45
|
-
}));
|
|
46
|
-
React.useEffect(function () {
|
|
47
|
-
if (trackWrapRef.current) {
|
|
48
|
-
if (props.navigatable) {
|
|
49
|
-
setTimeout(function () {
|
|
50
|
-
var firstCell = navigation.current.first;
|
|
51
|
-
if (firstCell) {
|
|
52
|
-
firstCell.setAttribute('tabindex', String(0));
|
|
53
|
-
}
|
|
54
|
-
}, 0);
|
|
55
|
-
navigation.current.keyboardEvents = {
|
|
56
|
-
keydown: {
|
|
57
|
-
'ArrowRight': onRight,
|
|
58
|
-
'ArrowLeft': onLeft,
|
|
59
|
-
'End': onEnd,
|
|
60
|
-
'Home': onHome
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}, [props.navigatable, currentEvent, visibleTabs]);
|
|
66
|
-
React.useEffect(function () {
|
|
67
|
-
navigation.current.update();
|
|
68
|
-
});
|
|
69
|
-
var handleKeyDown = function (e) {
|
|
70
|
-
if (navigatable && navigation.current) {
|
|
71
|
-
navigation.current.triggerKeyboardEvent(e);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
React.useEffect(function () {
|
|
75
|
-
var _a;
|
|
76
|
-
var observerResize = canUseDOM && window.ResizeObserver && new window.ResizeObserver(repositionEvents);
|
|
77
|
-
var trackList = trackRef.current;
|
|
78
|
-
var cardWith = ((_a = trackWrapRef === null || trackWrapRef === void 0 ? void 0 : trackWrapRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) || 0;
|
|
79
|
-
if (observerResize && trackList) {
|
|
80
|
-
observerResize.observe(trackList);
|
|
81
|
-
}
|
|
82
|
-
setYearsFlags();
|
|
83
|
-
repositionEvents();
|
|
84
|
-
setEventsPositions([cardWith, 0, -cardWith]);
|
|
85
|
-
return function () {
|
|
86
|
-
observerResize && observerResize.disconnect();
|
|
87
|
-
};
|
|
88
|
-
}, []);
|
|
89
|
-
React.useEffect(function () {
|
|
90
|
-
var trackList = trackRef.current;
|
|
91
|
-
var currentTab = trackList && trackList.children[currentEvent];
|
|
92
|
-
if (currentTab) {
|
|
93
|
-
var tabWidth = currentTab.offsetWidth;
|
|
94
|
-
var leftArrow = !(translate >= 0);
|
|
95
|
-
setArrowLeft(leftArrow);
|
|
96
|
-
if (eventsOnTrack) {
|
|
97
|
-
var rightArrow = eventsOnTrack.length * tabWidth > (visibleTabs * tabWidth) * (((translate * -1) + 100) / 100);
|
|
98
|
-
setArrowRight(rightArrow);
|
|
99
|
-
}
|
|
100
|
-
if (((trackList === null || trackList === void 0 ? void 0 : trackList.offsetWidth) * -translate) / 100 >= trackList.children.length * tabWidth) {
|
|
101
|
-
// TODO: on resize window reposition
|
|
102
|
-
setYearsFlags();
|
|
103
|
-
repositionEvents();
|
|
104
|
-
setTranslate((((currentTab.offsetLeft - currentTab.offsetWidth) / (visibleTabs * currentTab.offsetWidth)) * 100) * -1);
|
|
105
|
-
}
|
|
106
|
-
positionCallout(currentTab);
|
|
107
|
-
}
|
|
108
|
-
}, [visibleTabs, tabFlexWith, currentEvent]);
|
|
109
|
-
var onRight = function (_target, _nav, ev) {
|
|
110
|
-
if (trackRef.current) {
|
|
111
|
-
var nextChildren = trackRef.current.children[currentEvent + 1];
|
|
112
|
-
var nextPoint = nextChildren && nextChildren.classList.contains('k-timeline-flag-wrap')
|
|
113
|
-
? currentEvent + 2
|
|
114
|
-
: currentEvent + 1;
|
|
115
|
-
if (eventsOnTrack && eventsOnTrack.length <= nextPoint) {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
if ((visibleTabs + firstIndexInView) <= nextPoint) {
|
|
119
|
-
handleNextClick();
|
|
120
|
-
}
|
|
121
|
-
onPointClick(nextPoint, ev);
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
var onLeft = function (_target, _nav, ev) {
|
|
125
|
-
if (trackRef.current) {
|
|
126
|
-
var prevChildren = trackRef.current && trackRef.current.children[currentEvent - 1];
|
|
127
|
-
var prevPoint = prevChildren && prevChildren.classList.contains('k-timeline-flag-wrap')
|
|
128
|
-
? currentEvent - 2
|
|
129
|
-
: currentEvent - 1;
|
|
130
|
-
if (prevPoint <= 0) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
if (prevPoint < firstIndexInView) {
|
|
134
|
-
handlePrevClick();
|
|
135
|
-
}
|
|
136
|
-
onPointClick(prevPoint, ev);
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
var onHome = function (_target, _nav, ev) {
|
|
140
|
-
if (trackRef.current) {
|
|
141
|
-
if (currentEvent <= 1) {
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
var firstChild = 1;
|
|
145
|
-
var translateUpdate = 0;
|
|
146
|
-
moveView(true, firstChild, 0, translateUpdate);
|
|
147
|
-
onPointClick(firstChild, ev);
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
var onEnd = function (_target, _nav, ev) {
|
|
151
|
-
if (trackRef.current) {
|
|
152
|
-
var lastChild = trackRef.current && trackRef.current.children.length - 1;
|
|
153
|
-
if (lastChild <= currentEvent) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
var scrollViewsCount = Math.floor(lastChild / visibleTabs);
|
|
157
|
-
var translateUpdate = (scrollViewsCount) * -100;
|
|
158
|
-
var firstTabToUpdate = scrollViewsCount * visibleTabs;
|
|
159
|
-
moveView(true, lastChild, firstTabToUpdate, translateUpdate);
|
|
160
|
-
onPointClick(lastChild, ev);
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
var setYearsFlags = function () {
|
|
164
|
-
var trackData = addYearsFlags(eventsData);
|
|
165
|
-
setEventsOnTrack(trackData);
|
|
166
|
-
setEventsToShow([trackData[currentEvent - 1], trackData[currentEvent], trackData[currentEvent + 1]]);
|
|
167
|
-
};
|
|
168
|
-
var handlePrevClick = function () {
|
|
169
|
-
var _a;
|
|
170
|
-
var trackList = trackRef.current;
|
|
171
|
-
if (trackList && eventsOnTrack) {
|
|
172
|
-
var firstTabToUpdate = firstIndexInView - visibleTabs;
|
|
173
|
-
var lastIndexInView = firstIndexInView - 1;
|
|
174
|
-
var currentEventToUpdate = eventsOnTrack[lastIndexInView] && ((_a = eventsOnTrack[lastIndexInView]) === null || _a === void 0 ? void 0 : _a.yearFlag)
|
|
175
|
-
? lastIndexInView - 1
|
|
176
|
-
: lastIndexInView;
|
|
177
|
-
var translateUpdate = translate + 100 > 0 ? 0 : translate + 100;
|
|
178
|
-
moveView(false, currentEventToUpdate, firstTabToUpdate, translateUpdate);
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
var handleNextClick = function () {
|
|
182
|
-
var trackList = trackRef.current;
|
|
183
|
-
if (trackList && eventsOnTrack) {
|
|
184
|
-
var firstTabToUpdate = firstIndexInView + visibleTabs;
|
|
185
|
-
var currentEventToUpdate = eventsOnTrack[firstTabToUpdate] && eventsOnTrack[firstTabToUpdate].yearFlag
|
|
186
|
-
? firstTabToUpdate + 1
|
|
187
|
-
: firstTabToUpdate;
|
|
188
|
-
var translateUpdate = translate - 100;
|
|
189
|
-
moveView(true, currentEventToUpdate, firstTabToUpdate, translateUpdate);
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
var moveView = function (direction, eventToUpdate, firstTab, translateToUpdate) {
|
|
193
|
-
updatePage(direction, eventToUpdate);
|
|
194
|
-
repositionEvents();
|
|
195
|
-
setFirstIndexInView(firstTab);
|
|
196
|
-
setTranslate(translateToUpdate);
|
|
197
|
-
setCurrentEvent(eventToUpdate);
|
|
198
|
-
};
|
|
199
|
-
var updatePage = function (forward, current) {
|
|
200
|
-
var _a;
|
|
201
|
-
if (eventsToShow && eventsOnTrack) {
|
|
202
|
-
var pageToUpdateIndex_1 = getPivotIndex(forward, pivotEvent);
|
|
203
|
-
var eventCardsArray_1 = Object.assign([], eventsToShow, (_a = {}, _a[pageToUpdateIndex_1] = eventsOnTrack[current], _a));
|
|
204
|
-
setEventsToShow(eventCardsArray_1);
|
|
205
|
-
setPivotEvent(pageToUpdateIndex_1);
|
|
206
|
-
setEventsTranslate(forward ? -100 : 100);
|
|
207
|
-
setTimeout(function () {
|
|
208
|
-
var _a, _b;
|
|
209
|
-
var _c;
|
|
210
|
-
var cardWith = (_c = trackWrapRef.current) === null || _c === void 0 ? void 0 : _c.offsetWidth;
|
|
211
|
-
var repositionArray = Object.assign([], eventsPositions, (_a = {},
|
|
212
|
-
_a[pageToUpdateIndex_1] = 0,
|
|
213
|
-
_a[getPivotIndex(true, pageToUpdateIndex_1)] = cardWith,
|
|
214
|
-
_a[getPivotIndex(false, pageToUpdateIndex_1)] = cardWith && -cardWith,
|
|
215
|
-
_a));
|
|
216
|
-
var clearEventsArray = Object.assign([], eventCardsArray_1, (_b = {},
|
|
217
|
-
_b[getPivotIndex(true, pageToUpdateIndex_1)] = {},
|
|
218
|
-
_b[getPivotIndex(false, pageToUpdateIndex_1)] = {},
|
|
219
|
-
_b));
|
|
220
|
-
setEventsToShow(clearEventsArray);
|
|
221
|
-
setEventsPositions(repositionArray);
|
|
222
|
-
setEventsTranslate(0);
|
|
223
|
-
}, props.transitionDuration || EVENT_CARD_TRANSITION_DURATION);
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
var getPivotIndex = function (forward, index) {
|
|
227
|
-
var pageIndex = forward ? index + 1 : index - 1;
|
|
228
|
-
if (eventsToShow) {
|
|
229
|
-
var validIndex = pageIndex < 0
|
|
230
|
-
? eventsToShow.length - 1
|
|
231
|
-
: pageIndex % eventsToShow.length;
|
|
232
|
-
return validIndex;
|
|
233
|
-
}
|
|
234
|
-
return 0;
|
|
235
|
-
};
|
|
236
|
-
var positionCallout = function (element) {
|
|
237
|
-
var _a;
|
|
238
|
-
var offsetToSet = ((currentEvent - firstIndexInView) * element.offsetWidth) +
|
|
239
|
-
(element.offsetWidth / 2) +
|
|
240
|
-
(((_a = arrowLeftRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) || 0);
|
|
241
|
-
setCalloutOffset(offsetToSet);
|
|
242
|
-
};
|
|
243
|
-
var onPointClick = function (index, event) {
|
|
244
|
-
event.preventDefault();
|
|
245
|
-
if (index > currentEvent) {
|
|
246
|
-
updatePage(true, index);
|
|
247
|
-
}
|
|
248
|
-
else if (index < currentEvent) {
|
|
249
|
-
updatePage(false, index);
|
|
250
|
-
}
|
|
251
|
-
setCurrentEvent(index);
|
|
252
|
-
};
|
|
253
|
-
var repositionEvents = React.useCallback(function () {
|
|
254
|
-
var trackList = trackRef.current;
|
|
255
|
-
var currentTab = trackList && trackList.children[currentEvent];
|
|
256
|
-
if (trackList instanceof HTMLElement && currentTab) {
|
|
257
|
-
var visibleTabsCount = Math.round(trackList.offsetWidth / DEFAULT_EVENT_POINT_WITH);
|
|
258
|
-
positionCallout(currentTab);
|
|
259
|
-
setTabFlexWith(100 / visibleTabsCount);
|
|
260
|
-
setVisibleTabs(visibleTabsCount);
|
|
261
|
-
}
|
|
262
|
-
}, []);
|
|
263
|
-
var eventCardAnimationStyle = function () { return ({
|
|
264
|
-
transitionDuration: "".concat(EVENT_CARD_TRANSITION_DURATION, "ms")
|
|
265
|
-
}); };
|
|
266
|
-
var eventCardReorderStyle = function (translation) { return ({
|
|
267
|
-
transform: "translateX(".concat(translation, "%)"), transformOrigin: 'left top'
|
|
268
|
-
}); };
|
|
269
|
-
return (React.createElement(React.Fragment, null,
|
|
270
|
-
React.createElement("div", { className: "k-timeline-track-wrap", ref: trackWrapRef, onKeyDown: handleKeyDown },
|
|
271
|
-
React.createElement("a", { ref: arrowLeftRef, "aria-hidden": "true", onClick: function () { return arrowLeft && handlePrevClick(); }, className: classNames('k-timeline-arrow', 'k-timeline-arrow-left', 'k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button', { 'k-disabled': !arrowLeft }) },
|
|
272
|
-
React.createElement(SvgIcon, { icon: caretAltLeftIcon })),
|
|
273
|
-
React.createElement("a", { "aria-hidden": "true", onClick: function () { return arrowRight && handleNextClick(); }, className: classNames('k-timeline-arrow', 'k-timeline-arrow-right', 'k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button', { 'k-disabled': !arrowRight }) },
|
|
274
|
-
React.createElement(SvgIcon, { icon: caretAltRightIcon })),
|
|
275
|
-
React.createElement("div", { className: "k-timeline-track" },
|
|
276
|
-
React.createElement("ul", { ref: trackRef, className: "k-timeline-scrollable-wrap", role: "tablist", tabIndex: 0, style: { transform: "translateX(".concat(translate, "%)") } }, eventsOnTrack && eventsOnTrack.map(function (event, index) { return (event.yearFlag
|
|
277
|
-
? (React.createElement("li", { role: "none", className: "k-timeline-track-item k-timeline-flag-wrap", style: { flex: "1 0 ".concat(tabWith) }, key: index },
|
|
278
|
-
React.createElement("span", { className: "k-timeline-flag" }, event.yearFlag)))
|
|
279
|
-
: (React.createElement("li", { role: "tab", className: classNames('k-timeline-track-item', { 'k-focus': index === currentEvent }), "aria-selected": index === currentEvent, style: { flex: "1 0 ".concat(tabWith) }, key: index },
|
|
280
|
-
React.createElement("div", { className: "k-timeline-date-wrap" },
|
|
281
|
-
React.createElement("span", { className: "k-timeline-date" }, intl.formatDate(event.date, dateFormat))),
|
|
282
|
-
React.createElement("span", { onClick: function (e) { return onPointClick(index, e); }, className: "k-timeline-circle" })))); })))),
|
|
283
|
-
React.createElement("div", { className: "k-timeline-events-list" },
|
|
284
|
-
React.createElement("ul", { className: "k-timeline-scrollable-wrap", style: eventsTranslate === 0
|
|
285
|
-
? __assign({}, eventCardReorderStyle(eventsTranslate)) : __assign(__assign({}, eventCardReorderStyle(eventsTranslate)), eventCardAnimationStyle()) }, eventsToShow && eventsToShow.map(function (eventData, index) {
|
|
286
|
-
return (React.createElement("li", { key: index, className: "k-timeline-event", style: { transform: "translate3d(".concat(eventsPositions[index], "px, 0px, 0px)") } }, eventData && React.createElement(TimelineCard, { tabindex: eventsPositions[index] === 0 ? 0 : -1, eventData: eventData, onActionClick: onActionClick, horizontal: true, collapsible: false, calloutStyle: { left: "".concat(calloutOffset, "px") } })));
|
|
287
|
-
})))));
|
|
288
|
-
};
|
|
289
|
-
TimelineHorizontal.propTypes = {
|
|
290
|
-
onActionClick: PropTypes.func
|
|
291
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as PropTypes from 'prop-types';
|
|
3
|
-
import { TimelineCard } from './TimelineCard';
|
|
4
|
-
import { addYearsFlags } from './utils';
|
|
5
|
-
import { Navigation, classNames, guid } from '@progress/kendo-react-common';
|
|
6
|
-
import { useInternationalization } from '@progress/kendo-react-intl';
|
|
7
|
-
export var TimelineVertical = function (props) {
|
|
8
|
-
var intl = useInternationalization();
|
|
9
|
-
var _a = React.useState(), eventsList = _a[0], setEventsList = _a[1];
|
|
10
|
-
var collapsibleEvents = props.collapsibleEvents, transitionDuration = props.transitionDuration, eventsData = props.eventsData, dateFormat = props.dateFormat, alterMode = props.alterMode, navigatable = props.navigatable, onChange = props.onChange, onActionClick = props.onActionClick;
|
|
11
|
-
var eventAxisRef = React.useRef(null);
|
|
12
|
-
var navigation = React.useRef(new Navigation({
|
|
13
|
-
tabIndex: 0,
|
|
14
|
-
root: eventAxisRef,
|
|
15
|
-
selectors: ['.k-card-vertical']
|
|
16
|
-
}));
|
|
17
|
-
React.useEffect(function () {
|
|
18
|
-
if (eventAxisRef.current) {
|
|
19
|
-
if (props.navigatable) {
|
|
20
|
-
setTimeout(function () {
|
|
21
|
-
var firstCell = navigation.current.first;
|
|
22
|
-
if (firstCell) {
|
|
23
|
-
firstCell.setAttribute('tabindex', String(0));
|
|
24
|
-
}
|
|
25
|
-
}, 0);
|
|
26
|
-
navigation.current.keyboardEvents = {
|
|
27
|
-
keydown: {
|
|
28
|
-
'Space': onEnter,
|
|
29
|
-
'Enter': onEnter
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}, [props.navigatable]);
|
|
35
|
-
React.useEffect(function () {
|
|
36
|
-
setEventsList(addYearsFlags(eventsData));
|
|
37
|
-
}, []);
|
|
38
|
-
React.useEffect(function () {
|
|
39
|
-
navigation.current.update();
|
|
40
|
-
});
|
|
41
|
-
var handleKeyDown = function (e) {
|
|
42
|
-
if (navigatable && navigation.current) {
|
|
43
|
-
navigation.current.triggerKeyboardEvent(e);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
var onEnter = function (target, _nav, ev) {
|
|
47
|
-
ev.preventDefault();
|
|
48
|
-
var element = target.querySelector('.k-card-title .k-event-collapse');
|
|
49
|
-
if (element) {
|
|
50
|
-
element.click();
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var _alterIncreaser = 0;
|
|
54
|
-
return (React.createElement("ul", { ref: eventAxisRef, onKeyDown: handleKeyDown }, eventsList && eventsList.map(function (event, index) {
|
|
55
|
-
var cardId = guid();
|
|
56
|
-
var oddIndex = (index + _alterIncreaser) % 2 === 0;
|
|
57
|
-
if (event.yearFlag) {
|
|
58
|
-
_alterIncreaser += 1;
|
|
59
|
-
}
|
|
60
|
-
return (React.createElement(React.Fragment, { key: index }, event.yearFlag
|
|
61
|
-
? (React.createElement("li", { className: "k-timeline-flag-wrap" },
|
|
62
|
-
React.createElement("span", { className: "k-timeline-flag" }, event.yearFlag)))
|
|
63
|
-
: (React.createElement("li", { className: classNames('k-timeline-event', { 'k-reverse': oddIndex }) },
|
|
64
|
-
React.createElement("div", { className: "k-timeline-date-wrap" },
|
|
65
|
-
React.createElement("span", { className: "k-timeline-date", id: cardId }, intl.formatDate(event.date, dateFormat))),
|
|
66
|
-
React.createElement("a", { className: "k-timeline-circle" }),
|
|
67
|
-
React.createElement(TimelineCard, { id: cardId, tabindex: navigatable ? 0 : -1, eventData: event, alternated: alterMode && oddIndex, collapsible: collapsibleEvents, transitionDuration: transitionDuration, onChange: onChange, onActionClick: onActionClick })))));
|
|
68
|
-
})));
|
|
69
|
-
};
|
|
70
|
-
TimelineVertical.propTypes = {
|
|
71
|
-
onActionClick: PropTypes.func
|
|
72
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TimelineEventProps } from './Timeline';
|
|
2
|
-
/**
|
|
3
|
-
* Sort the events list based on event date.
|
|
4
|
-
*/
|
|
5
|
-
export declare const sortEventList: (eventList: TimelineEventProps[]) => TimelineEventProps[];
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export interface yearFlagProps {
|
|
10
|
-
yearFlag?: number;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
export declare const addYearsFlags: (eventsData: TimelineEventProps[]) => (TimelineEventProps | yearFlagProps)[];
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sort the events list based on event date.
|
|
3
|
-
*/
|
|
4
|
-
export var sortEventList = function (eventList) {
|
|
5
|
-
var sortedEvents = eventList.sort(function (a, b) {
|
|
6
|
-
return a.date.getTime() - b.date.getTime();
|
|
7
|
-
});
|
|
8
|
-
return sortedEvents;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export var addYearsFlags = function (eventsData) {
|
|
14
|
-
var yearFlag;
|
|
15
|
-
var trackData = eventsData.reduce(function (arr, eventData) {
|
|
16
|
-
if (yearFlag !== eventData.date.getFullYear()) {
|
|
17
|
-
yearFlag = eventData.date.getFullYear();
|
|
18
|
-
arr.push({ yearFlag: yearFlag }, eventData);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
arr.push(eventData);
|
|
22
|
-
}
|
|
23
|
-
return arr;
|
|
24
|
-
}, []);
|
|
25
|
-
return trackData;
|
|
26
|
-
};
|
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
29
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
|
-
if (ar || !(i in from)) {
|
|
31
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
32
|
-
ar[i] = from[i];
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.ActionSheet = void 0;
|
|
39
|
-
var React = require("react");
|
|
40
|
-
var PropTypes = require("prop-types");
|
|
41
|
-
var kendo_react_animation_1 = require("@progress/kendo-react-animation");
|
|
42
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
43
|
-
var package_metadata_1 = require("../package-metadata");
|
|
44
|
-
var ActionSheetItem_1 = require("./ActionSheetItem");
|
|
45
|
-
var ActionSheetHeader_1 = require("./ActionSheetHeader");
|
|
46
|
-
var ActionSheetFooter_1 = require("./ActionSheetFooter");
|
|
47
|
-
var ActionSheetContent_1 = require("./ActionSheetContent");
|
|
48
|
-
/**
|
|
49
|
-
* Represents the [KendoReact ActionSheet]({% slug overview_actionsheet %}) component.
|
|
50
|
-
*/
|
|
51
|
-
var ActionSheet = /** @class */ (function (_super) {
|
|
52
|
-
__extends(ActionSheet, _super);
|
|
53
|
-
/** @hidden */
|
|
54
|
-
function ActionSheet(props) {
|
|
55
|
-
var _this = _super.call(this, props) || this;
|
|
56
|
-
_this.actionSheetRef = React.createRef();
|
|
57
|
-
_this.actionSheetTitleClass = 'k-actionsheet-title';
|
|
58
|
-
_this.ariaLabeledBy = _this.actionSheetTitleClass + 1;
|
|
59
|
-
_this.animationDuration = 300;
|
|
60
|
-
_this.bottomPosition = { bottom: '0', width: '100%' };
|
|
61
|
-
_this.handleKeyDown = function (e) {
|
|
62
|
-
if (_this.props.navigatable) {
|
|
63
|
-
_this.navigation.triggerKeyboardEvent(e);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
_this.onTab = function (target, nav, ev) {
|
|
67
|
-
ev.preventDefault();
|
|
68
|
-
if (ev.shiftKey) {
|
|
69
|
-
nav.focusPrevious(target);
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
nav.focusNext(target);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
_this.handleOverlayClick = function (ev) {
|
|
76
|
-
/** Deprecated */
|
|
77
|
-
if (_this.props.onOverlayClick) {
|
|
78
|
-
_this.props.onOverlayClick.call(undefined, ev);
|
|
79
|
-
}
|
|
80
|
-
if (_this.props.onClose) {
|
|
81
|
-
_this.props.onClose.call(undefined, ev);
|
|
82
|
-
}
|
|
83
|
-
if (!_this.props.animation) {
|
|
84
|
-
_this.hideActionSheet();
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
_this.handleItemClick = function (ev) {
|
|
88
|
-
/** Deprecated */
|
|
89
|
-
if (_this.props.onItemClick) {
|
|
90
|
-
_this.props.onItemClick.call(undefined, ev);
|
|
91
|
-
}
|
|
92
|
-
if (_this.props.onItemSelect) {
|
|
93
|
-
_this.props.onItemSelect.call(undefined, ev);
|
|
94
|
-
}
|
|
95
|
-
if (!_this.props.animation) {
|
|
96
|
-
_this.hideActionSheet();
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
_this.onEnter = function (target, nav, ev) {
|
|
100
|
-
if (target.ariaDisabled) {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
var isItem = target.className && target.className.indexOf
|
|
104
|
-
? target.className.indexOf('k-actionsheet-item') !== -1
|
|
105
|
-
: false;
|
|
106
|
-
var allItems = nav.elements.filter(function (e) { return e.className.indexOf('k-actionsheet-item') !== -1; });
|
|
107
|
-
/** Deprecated */
|
|
108
|
-
if (isItem && _this.props.onItemClick) {
|
|
109
|
-
ev.preventDefault();
|
|
110
|
-
var item = _this.props.items[allItems.indexOf(target)];
|
|
111
|
-
_this.props.onItemClick.call(undefined, {
|
|
112
|
-
syntheticEvent: ev,
|
|
113
|
-
item: item,
|
|
114
|
-
title: item && item.title
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
if (isItem && _this.props.onItemSelect) {
|
|
118
|
-
ev.preventDefault();
|
|
119
|
-
var item = _this.props.items[allItems.indexOf(target)];
|
|
120
|
-
_this.props.onItemSelect.call(undefined, {
|
|
121
|
-
syntheticEvent: ev,
|
|
122
|
-
item: item,
|
|
123
|
-
title: item && item.title
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
if (!_this.props.animation) {
|
|
127
|
-
_this.hideActionSheet();
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
_this.onEscape = function (_target, _nav, ev) {
|
|
131
|
-
/** Deprecated */
|
|
132
|
-
if (_this.props.onOverlayClick) {
|
|
133
|
-
ev.preventDefault();
|
|
134
|
-
_this.props.onOverlayClick.call(undefined, ev);
|
|
135
|
-
}
|
|
136
|
-
if (_this.props.onClose) {
|
|
137
|
-
ev.preventDefault();
|
|
138
|
-
_this.props.onClose.call(undefined, ev);
|
|
139
|
-
}
|
|
140
|
-
if (!_this.props.animation) {
|
|
141
|
-
_this.hideActionSheet();
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
_this.hideActionSheet = function () {
|
|
145
|
-
_this.setState({ show: false });
|
|
146
|
-
};
|
|
147
|
-
_this.children = function (children) {
|
|
148
|
-
var components = {};
|
|
149
|
-
React.Children.forEach(children, function (child) {
|
|
150
|
-
if (child) {
|
|
151
|
-
components[child.type.displayName] = child;
|
|
152
|
-
}
|
|
153
|
-
;
|
|
154
|
-
});
|
|
155
|
-
return components;
|
|
156
|
-
};
|
|
157
|
-
_this.state = {
|
|
158
|
-
show: false,
|
|
159
|
-
slide: false
|
|
160
|
-
};
|
|
161
|
-
(0, kendo_react_common_1.validatePackage)(package_metadata_1.packageMetadata);
|
|
162
|
-
return _this;
|
|
163
|
-
}
|
|
164
|
-
/** @hidden */
|
|
165
|
-
ActionSheet.prototype.componentDidMount = function () {
|
|
166
|
-
if (this.props.expand && !this.state.show) {
|
|
167
|
-
this.setState({ show: true });
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
/** @hidden */
|
|
171
|
-
ActionSheet.prototype.componentDidUpdate = function (_prevProps, prevState) {
|
|
172
|
-
var _this = this;
|
|
173
|
-
var currentRef = this.actionSheetRef.current;
|
|
174
|
-
if (this.props.expand && !this.state.show) {
|
|
175
|
-
this.setState({ show: true });
|
|
176
|
-
}
|
|
177
|
-
if (this.props.expand && this.state.show && !this.state.slide) {
|
|
178
|
-
this.setState({ slide: true });
|
|
179
|
-
}
|
|
180
|
-
if (!this.props.expand && this.state.show && this.state.slide) {
|
|
181
|
-
this.setState({ slide: false });
|
|
182
|
-
}
|
|
183
|
-
if (prevState !== this.state && this.state.slide && currentRef && !this.props.className) {
|
|
184
|
-
currentRef.style.setProperty('--kendo-actionsheet-height', 'auto');
|
|
185
|
-
currentRef.style.setProperty('--kendo-actionsheet-max-height', 'none');
|
|
186
|
-
}
|
|
187
|
-
if (currentRef) {
|
|
188
|
-
if (this.props.navigatable) {
|
|
189
|
-
var innerElements = [
|
|
190
|
-
'.k-actionsheet-footer',
|
|
191
|
-
'.k-actionsheet-content',
|
|
192
|
-
'.k-actionsheet-titlebar'
|
|
193
|
-
].map(function (selector) {
|
|
194
|
-
return kendo_react_common_1.FOCUSABLE_ELEMENTS.concat(_this.props.navigatableElements).map(function (focusableSelector) { return "".concat(selector, " ").concat(focusableSelector); });
|
|
195
|
-
});
|
|
196
|
-
var selectors = __spreadArray([
|
|
197
|
-
'.k-actionsheet-item'
|
|
198
|
-
], innerElements.flat(), true);
|
|
199
|
-
this.navigation = new kendo_react_common_1.Navigation({
|
|
200
|
-
tabIndex: this.props.tabIndex || 0,
|
|
201
|
-
root: this.actionSheetRef,
|
|
202
|
-
rovingTabIndex: false,
|
|
203
|
-
selectors: selectors,
|
|
204
|
-
keyboardEvents: {
|
|
205
|
-
keydown: {
|
|
206
|
-
'Tab': this.onTab,
|
|
207
|
-
'Enter': this.onEnter,
|
|
208
|
-
'Escape': this.onEscape
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
this.navigation.focusElement(this.navigation.first, null);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
;
|
|
217
|
-
/** @hidden */
|
|
218
|
-
ActionSheet.prototype.render = function () {
|
|
219
|
-
var _this = this;
|
|
220
|
-
var _a = this.props, title = _a.title, subTitle = _a.subTitle, animationStyles = _a.animationStyles, animation = _a.animation, expand = _a.expand, tabIndex = _a.tabIndex, items = _a.items;
|
|
221
|
-
var topGroupItems = items === null || items === void 0 ? void 0 : items.filter(function (item) { return !item.group || item.group === 'top'; });
|
|
222
|
-
var bottomGroupItems = items === null || items === void 0 ? void 0 : items.filter(function (item) { return item.group === 'bottom'; });
|
|
223
|
-
var shouldRenderSeparator = (topGroupItems && topGroupItems.length > 0) && (bottomGroupItems && bottomGroupItems.length > 0);
|
|
224
|
-
var children = this.children(this.props.children);
|
|
225
|
-
var animationDuration = this.props.animationDuration || this.animationDuration;
|
|
226
|
-
var actionSheetPanel = this.state.slide && React.createElement("div", { className: (0, kendo_react_common_1.classNames)('k-actionsheet', this.props.className, {
|
|
227
|
-
'k-actionsheet-bottom': !this.props.className
|
|
228
|
-
}), role: "dialog", "aria-modal": "true", "aria-hidden": false, "aria-labelledby": this.ariaLabeledBy, ref: this.actionSheetRef, onKeyDown: this.handleKeyDown },
|
|
229
|
-
(children[ActionSheetHeader_1.headerDisplayName] && !title && !subTitle) && children[ActionSheetHeader_1.headerDisplayName],
|
|
230
|
-
(title || subTitle) && (React.createElement("div", { className: "k-actionsheet-titlebar k-text-center" },
|
|
231
|
-
React.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" },
|
|
232
|
-
React.createElement("div", { className: this.actionSheetTitleClass, id: this.ariaLabeledBy },
|
|
233
|
-
title && React.createElement("div", null, title),
|
|
234
|
-
subTitle && React.createElement("div", { className: "k-actionsheet-subtitle" }, subTitle))))),
|
|
235
|
-
children[ActionSheetContent_1.contentDisplayName] || React.createElement("div", { className: "k-actionsheet-content" },
|
|
236
|
-
React.createElement("div", { className: "k-list-ul", role: "group" }, topGroupItems && topGroupItems.map(function (item, idx) {
|
|
237
|
-
return (React.createElement(ActionSheetItem_1.ActionSheetItem, __assign({}, item, { id: idx, key: idx, item: item, tabIndex: tabIndex || 0, onClick: _this.handleItemClick })));
|
|
238
|
-
})),
|
|
239
|
-
shouldRenderSeparator && React.createElement("hr", { className: "k-hr" }),
|
|
240
|
-
React.createElement("div", { className: "k-list-ul", role: "group" }, bottomGroupItems && bottomGroupItems.map(function (item, idx) {
|
|
241
|
-
return (React.createElement(ActionSheetItem_1.ActionSheetItem, __assign({}, item, { id: idx + ((topGroupItems === null || topGroupItems === void 0 ? void 0 : topGroupItems.length) || 0), key: idx, item: item, tabIndex: tabIndex || 0, onClick: _this.handleItemClick })));
|
|
242
|
-
}))),
|
|
243
|
-
children[ActionSheetFooter_1.footerDisplayName]);
|
|
244
|
-
return (React.createElement(React.Fragment, null, expand || this.state.show ? (React.createElement(React.Fragment, null,
|
|
245
|
-
React.createElement("div", { className: "k-actionsheet-container" },
|
|
246
|
-
React.createElement("div", { className: "k-overlay", onClick: this.handleOverlayClick }),
|
|
247
|
-
animation ? React.createElement(kendo_react_animation_1.Animation, { transitionName: this.state.slide ? 'slide-up' : 'slide-down', onExited: this.hideActionSheet, transitionEnterDuration: animationDuration, transitionExitDuration: animationDuration, animationEnteringStyle: animationStyles || this.bottomPosition, animationEnteredStyle: animationStyles || this.bottomPosition, animationExitingStyle: animationStyles || this.bottomPosition, exit: true, enter: true, appear: false }, actionSheetPanel)
|
|
248
|
-
: actionSheetPanel)))
|
|
249
|
-
: null));
|
|
250
|
-
};
|
|
251
|
-
;
|
|
252
|
-
/** @hidden */
|
|
253
|
-
ActionSheet.displayName = 'KendoReactActionSheet';
|
|
254
|
-
/** @hidden */
|
|
255
|
-
ActionSheet.propTypes = {
|
|
256
|
-
items: PropTypes.array,
|
|
257
|
-
subTitle: PropTypes.string,
|
|
258
|
-
title: PropTypes.string,
|
|
259
|
-
navigatable: PropTypes.bool,
|
|
260
|
-
navigatableElements: PropTypes.array
|
|
261
|
-
};
|
|
262
|
-
/** @hidden */
|
|
263
|
-
ActionSheet.defaultProps = {
|
|
264
|
-
navigatable: true,
|
|
265
|
-
navigatableElements: []
|
|
266
|
-
};
|
|
267
|
-
return ActionSheet;
|
|
268
|
-
}(React.Component));
|
|
269
|
-
exports.ActionSheet = ActionSheet;
|
|
270
|
-
;
|