@progress/kendo-vue-layout 2.6.3 → 2.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-vue-layout.js +1 -1
- package/dist/es/drawer/Drawer.d.ts +47 -0
- package/dist/es/drawer/Drawer.js +186 -0
- package/dist/es/drawer/DrawerContent.d.ts +36 -0
- package/dist/es/drawer/DrawerContent.js +26 -0
- package/dist/es/drawer/DrawerItem.d.ts +38 -0
- package/dist/es/drawer/DrawerItem.js +108 -0
- package/dist/es/drawer/DrawerNavigation.d.ts +45 -0
- package/dist/es/drawer/DrawerNavigation.js +182 -0
- package/dist/es/drawer/context/DrawerContext.d.ts +17 -0
- package/dist/es/drawer/context/DrawerContext.js +13 -0
- package/dist/es/drawer/interfaces/DrawerAnimation.d.ts +14 -0
- package/dist/es/drawer/interfaces/DrawerAnimation.js +0 -0
- package/dist/es/drawer/interfaces/DrawerContentProps.d.ts +5 -0
- package/dist/es/drawer/interfaces/DrawerContentProps.js +0 -0
- package/dist/es/drawer/interfaces/DrawerItemHandle.d.ts +17 -0
- package/dist/es/drawer/interfaces/DrawerItemHandle.js +0 -0
- package/dist/es/drawer/interfaces/DrawerItemProps.d.ts +43 -0
- package/dist/es/drawer/interfaces/DrawerItemProps.js +0 -0
- package/dist/es/drawer/interfaces/DrawerNavigationProps.d.ts +5 -0
- package/dist/es/drawer/interfaces/DrawerNavigationProps.js +0 -0
- package/dist/es/drawer/interfaces/DrawerProps.d.ts +69 -0
- package/dist/es/drawer/interfaces/DrawerProps.js +0 -0
- package/dist/es/drawer/interfaces/DrawerSelectEvent.d.ts +13 -0
- package/dist/es/drawer/interfaces/DrawerSelectEvent.js +0 -0
- package/dist/es/main.d.ts +21 -0
- package/dist/es/main.js +21 -0
- package/dist/es/menu/MenuProps.d.ts +2 -2
- package/dist/es/menu/components/Menu.js +5 -1
- package/dist/es/menu/models/BaseMenuItem.d.ts +3 -3
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/stepper/Step.d.ts +38 -0
- package/dist/es/stepper/Step.js +197 -0
- package/dist/es/stepper/Stepper.d.ts +39 -0
- package/dist/es/stepper/Stepper.js +351 -0
- package/dist/es/stepper/contants.d.ts +8 -0
- package/dist/es/stepper/contants.js +8 -0
- package/dist/es/stepper/context/StepperContext.d.ts +16 -0
- package/dist/es/stepper/context/StepperContext.js +8 -0
- package/dist/es/stepper/interfaces/StepChangeEvent.d.ts +9 -0
- package/dist/es/stepper/interfaces/StepChangeEvent.js +0 -0
- package/dist/es/stepper/interfaces/StepFocusEvent.d.ts +5 -0
- package/dist/es/stepper/interfaces/StepFocusEvent.js +0 -0
- package/dist/es/stepper/interfaces/StepHandle.d.ts +13 -0
- package/dist/es/stepper/interfaces/StepHandle.js +3 -0
- package/dist/es/stepper/interfaces/StepProps.d.ts +67 -0
- package/dist/es/stepper/interfaces/StepProps.js +0 -0
- package/dist/es/stepper/interfaces/StepperChangeEvent.d.ts +9 -0
- package/dist/es/stepper/interfaces/StepperChangeEvent.js +0 -0
- package/dist/es/stepper/interfaces/StepperFocusEvent.d.ts +5 -0
- package/dist/es/stepper/interfaces/StepperFocusEvent.js +0 -0
- package/dist/es/stepper/interfaces/StepperHandle.d.ts +13 -0
- package/dist/es/stepper/interfaces/StepperHandle.js +3 -0
- package/dist/es/stepper/interfaces/StepperOnNavigateEvent.d.ts +23 -0
- package/dist/es/stepper/interfaces/StepperOnNavigateEvent.js +15 -0
- package/dist/es/stepper/interfaces/StepperProps.d.ts +80 -0
- package/dist/es/stepper/interfaces/StepperProps.js +0 -0
- package/dist/es/stepper/messages/index.d.ts +10 -0
- package/dist/es/stepper/messages/index.js +11 -0
- package/dist/npm/drawer/Drawer.d.ts +47 -0
- package/dist/npm/drawer/Drawer.js +198 -0
- package/dist/npm/drawer/DrawerContent.d.ts +36 -0
- package/dist/npm/drawer/DrawerContent.js +36 -0
- package/dist/npm/drawer/DrawerItem.d.ts +38 -0
- package/dist/npm/drawer/DrawerItem.js +118 -0
- package/dist/npm/drawer/DrawerNavigation.d.ts +45 -0
- package/dist/npm/drawer/DrawerNavigation.js +193 -0
- package/dist/npm/drawer/context/DrawerContext.d.ts +17 -0
- package/dist/npm/drawer/context/DrawerContext.js +15 -0
- package/dist/npm/drawer/interfaces/DrawerAnimation.d.ts +14 -0
- package/dist/npm/drawer/interfaces/DrawerAnimation.js +2 -0
- package/dist/npm/drawer/interfaces/DrawerContentProps.d.ts +5 -0
- package/dist/npm/drawer/interfaces/DrawerContentProps.js +2 -0
- package/dist/npm/drawer/interfaces/DrawerItemHandle.d.ts +17 -0
- package/dist/npm/drawer/interfaces/DrawerItemHandle.js +2 -0
- package/dist/npm/drawer/interfaces/DrawerItemProps.d.ts +43 -0
- package/dist/npm/drawer/interfaces/DrawerItemProps.js +2 -0
- package/dist/npm/drawer/interfaces/DrawerNavigationProps.d.ts +5 -0
- package/dist/npm/drawer/interfaces/DrawerNavigationProps.js +2 -0
- package/dist/npm/drawer/interfaces/DrawerProps.d.ts +69 -0
- package/dist/npm/drawer/interfaces/DrawerProps.js +2 -0
- package/dist/npm/drawer/interfaces/DrawerSelectEvent.d.ts +13 -0
- package/dist/npm/drawer/interfaces/DrawerSelectEvent.js +2 -0
- package/dist/npm/main.d.ts +21 -0
- package/dist/npm/main.js +21 -0
- package/dist/npm/menu/MenuProps.d.ts +2 -2
- package/dist/npm/menu/components/Menu.js +5 -1
- package/dist/npm/menu/models/BaseMenuItem.d.ts +3 -3
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/stepper/Step.d.ts +38 -0
- package/dist/npm/stepper/Step.js +210 -0
- package/dist/npm/stepper/Stepper.d.ts +39 -0
- package/dist/npm/stepper/Stepper.js +366 -0
- package/dist/npm/stepper/contants.d.ts +8 -0
- package/dist/npm/stepper/contants.js +11 -0
- package/dist/npm/stepper/context/StepperContext.d.ts +16 -0
- package/dist/npm/stepper/context/StepperContext.js +10 -0
- package/dist/npm/stepper/interfaces/StepChangeEvent.d.ts +9 -0
- package/dist/npm/stepper/interfaces/StepChangeEvent.js +2 -0
- package/dist/npm/stepper/interfaces/StepFocusEvent.d.ts +5 -0
- package/dist/npm/stepper/interfaces/StepFocusEvent.js +2 -0
- package/dist/npm/stepper/interfaces/StepHandle.d.ts +13 -0
- package/dist/npm/stepper/interfaces/StepHandle.js +5 -0
- package/dist/npm/stepper/interfaces/StepProps.d.ts +67 -0
- package/dist/npm/stepper/interfaces/StepProps.js +2 -0
- package/dist/npm/stepper/interfaces/StepperChangeEvent.d.ts +9 -0
- package/dist/npm/stepper/interfaces/StepperChangeEvent.js +2 -0
- package/dist/npm/stepper/interfaces/StepperFocusEvent.d.ts +5 -0
- package/dist/npm/stepper/interfaces/StepperFocusEvent.js +2 -0
- package/dist/npm/stepper/interfaces/StepperHandle.d.ts +13 -0
- package/dist/npm/stepper/interfaces/StepperHandle.js +5 -0
- package/dist/npm/stepper/interfaces/StepperOnNavigateEvent.d.ts +23 -0
- package/dist/npm/stepper/interfaces/StepperOnNavigateEvent.js +18 -0
- package/dist/npm/stepper/interfaces/StepperProps.d.ts +80 -0
- package/dist/npm/stepper/interfaces/StepperProps.js +2 -0
- package/dist/npm/stepper/messages/index.d.ts +10 -0
- package/dist/npm/stepper/messages/index.js +14 -0
- package/package.json +11 -9
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specifies the animation settings of the Drawer.
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export interface DrawerAnimation {
|
|
6
|
+
/**
|
|
7
|
+
* Specifies the type of the Drawer animation.
|
|
8
|
+
*/
|
|
9
|
+
type?: 'slide';
|
|
10
|
+
/**
|
|
11
|
+
* Specifies the duration of the Drawer animation ([see example]({% slug display_modes_drawer %}#toc-expand-modes)) .
|
|
12
|
+
*/
|
|
13
|
+
duration: number;
|
|
14
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The DrawerItem ref.
|
|
3
|
+
*/
|
|
4
|
+
export interface DrawerItemHandle {
|
|
5
|
+
/**
|
|
6
|
+
* The DrawerItem element.
|
|
7
|
+
*/
|
|
8
|
+
element: any;
|
|
9
|
+
/**
|
|
10
|
+
* Focus the DrawerItem.
|
|
11
|
+
*/
|
|
12
|
+
focus: (e: any) => void;
|
|
13
|
+
/**
|
|
14
|
+
* The props of the DrawerItem.
|
|
15
|
+
*/
|
|
16
|
+
props?: any;
|
|
17
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An interface for the Drawer items.
|
|
3
|
+
*/
|
|
4
|
+
export interface DrawerItemProps {
|
|
5
|
+
/**
|
|
6
|
+
* Specifies if the Drawer item is disabled.
|
|
7
|
+
*/
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Defines the name for an existing icon in a Kendo UI for Vue theme.
|
|
11
|
+
* The icon is rendered inside the Drawer item by a `span.k-icon` element.
|
|
12
|
+
*/
|
|
13
|
+
icon?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Specifies if the Drawer item is initially selected.
|
|
16
|
+
*/
|
|
17
|
+
selected?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Specifies if this is a separator item.
|
|
20
|
+
*/
|
|
21
|
+
separator?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Specifies the text content of the Drawer item.
|
|
24
|
+
*/
|
|
25
|
+
text?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Sets the index of the DrawerItem that is used to identify it.
|
|
28
|
+
*/
|
|
29
|
+
index?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the `tabIndex` property of the DrawerItem.
|
|
32
|
+
* Defaults to `0`.
|
|
33
|
+
*/
|
|
34
|
+
tabIndex?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Sets a custom property. Contained in the DrawerItem props that are returned from the `onSelect` Drawer event.
|
|
37
|
+
*/
|
|
38
|
+
[customProp: string]: any;
|
|
39
|
+
/**
|
|
40
|
+
* @hidden
|
|
41
|
+
*/
|
|
42
|
+
onSelect?(target?: any, idx?: number): void;
|
|
43
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { DrawerSelectEvent } from './DrawerSelectEvent';
|
|
2
|
+
import { DrawerAnimation } from '../interfaces/DrawerAnimation';
|
|
3
|
+
import { DrawerItemProps } from './DrawerItemProps';
|
|
4
|
+
/**
|
|
5
|
+
* The properties of the [Kendo UI for Vue Drawer component]({% slug overview_drawer %}).
|
|
6
|
+
*/
|
|
7
|
+
export interface DrawerProps {
|
|
8
|
+
/**
|
|
9
|
+
* Specifies the animation settings of the Drawer.
|
|
10
|
+
* If boolean enables or disables the default animation.
|
|
11
|
+
* Use DrawerAnimation to set slide animation with customizable duration option. Accepts a number in milliseconds.
|
|
12
|
+
*/
|
|
13
|
+
animation?: boolean | DrawerAnimation;
|
|
14
|
+
/**
|
|
15
|
+
* Specifies the state of the Drawer. Defaults to `false` ([see example]({% slug expanded_state_drawer %})).
|
|
16
|
+
*/
|
|
17
|
+
expanded?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Represents the `dir` HTML attribute. This is used to switch from LTR to RTL.
|
|
20
|
+
*/
|
|
21
|
+
dir?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Specifies the mode in which the Drawer will be displayed.
|
|
24
|
+
* The possible values are `overlay` and `push`.
|
|
25
|
+
* Defaults to `overlay` ([see example]({% slug display_modes_drawer %}#toc-expand-modes)).
|
|
26
|
+
*/
|
|
27
|
+
mode?: 'overlay' | 'push' | string;
|
|
28
|
+
/**
|
|
29
|
+
* Specifies the position of the Drawer.
|
|
30
|
+
* The possible values are `start` and `end` ([see example]({% slug positioning_drawer %})).
|
|
31
|
+
*/
|
|
32
|
+
position?: 'start' | 'end' | string;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the `tabIndex` property of the Drawer.
|
|
35
|
+
*/
|
|
36
|
+
tabIndex?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Enables the mini (compact) view of the Drawer which is displayed when the component is collapsed
|
|
39
|
+
* ([see example]({% slug display_modes_drawer %}#toc-mini-view))).
|
|
40
|
+
*/
|
|
41
|
+
mini?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Defines the width of the Drawer when the mini view is enabled and the component is collapsed. Defaults to `50`.
|
|
44
|
+
*/
|
|
45
|
+
miniWidth?: number;
|
|
46
|
+
/**
|
|
47
|
+
* Defines the width of the Drawer when it is expanded. Defaults to `240`.
|
|
48
|
+
*/
|
|
49
|
+
width?: number;
|
|
50
|
+
/**
|
|
51
|
+
* The collection of items that will be rendered in the Drawer ([see example]({% slug overview_drawer %})).
|
|
52
|
+
*/
|
|
53
|
+
items?: Array<DrawerItemProps>;
|
|
54
|
+
/**
|
|
55
|
+
* Overrides the default component responsible for visualizing a single item ([see example]({% slug custom_rendering %})).
|
|
56
|
+
*
|
|
57
|
+
* The default Component is: [DrawerItem]({% slug api_layout_draweritem %}).
|
|
58
|
+
*/
|
|
59
|
+
item?: any;
|
|
60
|
+
/**
|
|
61
|
+
* The event handler that will be fired when the overlay is clicked.
|
|
62
|
+
* Used in overlay mode only.
|
|
63
|
+
*/
|
|
64
|
+
onOverlayClick?: (event: any) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Fires when a Drawer item is selected.
|
|
67
|
+
*/
|
|
68
|
+
onSelect?: (event: DrawerSelectEvent) => void;
|
|
69
|
+
}
|
|
File without changes
|
|
File without changes
|
package/dist/es/main.d.ts
CHANGED
|
@@ -12,6 +12,27 @@ export * from './card/CardImage';
|
|
|
12
12
|
export * from './card/CardSubtitle';
|
|
13
13
|
export * from './card/CardFooter';
|
|
14
14
|
export * from './card/Avatar';
|
|
15
|
+
export * from './drawer/Drawer';
|
|
16
|
+
export * from './drawer/interfaces/DrawerProps';
|
|
17
|
+
export * from './drawer/DrawerNavigation';
|
|
18
|
+
export * from './drawer/interfaces/DrawerNavigationProps';
|
|
19
|
+
export * from './drawer/DrawerContent';
|
|
20
|
+
export * from './drawer/interfaces/DrawerContentProps';
|
|
21
|
+
export * from './drawer/DrawerItem';
|
|
22
|
+
export * from './drawer/interfaces/DrawerItemHandle';
|
|
23
|
+
export * from './drawer/interfaces/DrawerItemProps';
|
|
24
|
+
export * from './drawer/interfaces/DrawerSelectEvent';
|
|
25
|
+
export * from './drawer/interfaces/DrawerAnimation';
|
|
26
|
+
export * from './stepper/Stepper';
|
|
27
|
+
export * from './stepper/interfaces/StepperProps';
|
|
28
|
+
export * from './stepper/interfaces/StepperHandle';
|
|
29
|
+
export * from './stepper/interfaces/StepperChangeEvent';
|
|
30
|
+
export * from './stepper/interfaces/StepperFocusEvent';
|
|
31
|
+
export * from './stepper/Step';
|
|
32
|
+
export * from './stepper/interfaces/StepProps';
|
|
33
|
+
export * from './stepper/interfaces/StepHandle';
|
|
34
|
+
export * from './stepper/interfaces/StepChangeEvent';
|
|
35
|
+
export * from './stepper/interfaces/StepFocusEvent';
|
|
15
36
|
export * from './menu/components/Menu';
|
|
16
37
|
export * from './menu/components/MenuItemLink';
|
|
17
38
|
export * from './menu/components/MenuItemArrow';
|
package/dist/es/main.js
CHANGED
|
@@ -12,6 +12,27 @@ export * from './card/CardImage';
|
|
|
12
12
|
export * from './card/CardSubtitle';
|
|
13
13
|
export * from './card/CardFooter';
|
|
14
14
|
export * from './card/Avatar';
|
|
15
|
+
export * from './drawer/Drawer';
|
|
16
|
+
export * from './drawer/interfaces/DrawerProps';
|
|
17
|
+
export * from './drawer/DrawerNavigation';
|
|
18
|
+
export * from './drawer/interfaces/DrawerNavigationProps';
|
|
19
|
+
export * from './drawer/DrawerContent';
|
|
20
|
+
export * from './drawer/interfaces/DrawerContentProps';
|
|
21
|
+
export * from './drawer/DrawerItem';
|
|
22
|
+
export * from './drawer/interfaces/DrawerItemHandle';
|
|
23
|
+
export * from './drawer/interfaces/DrawerItemProps';
|
|
24
|
+
export * from './drawer/interfaces/DrawerSelectEvent';
|
|
25
|
+
export * from './drawer/interfaces/DrawerAnimation';
|
|
26
|
+
export * from './stepper/Stepper';
|
|
27
|
+
export * from './stepper/interfaces/StepperProps';
|
|
28
|
+
export * from './stepper/interfaces/StepperHandle';
|
|
29
|
+
export * from './stepper/interfaces/StepperChangeEvent';
|
|
30
|
+
export * from './stepper/interfaces/StepperFocusEvent';
|
|
31
|
+
export * from './stepper/Step';
|
|
32
|
+
export * from './stepper/interfaces/StepProps';
|
|
33
|
+
export * from './stepper/interfaces/StepHandle';
|
|
34
|
+
export * from './stepper/interfaces/StepChangeEvent';
|
|
35
|
+
export * from './stepper/interfaces/StepFocusEvent';
|
|
15
36
|
export * from './menu/components/Menu';
|
|
16
37
|
export * from './menu/components/MenuItemLink';
|
|
17
38
|
export * from './menu/components/MenuItemArrow';
|
|
@@ -29,11 +29,11 @@ export interface MenuProps {
|
|
|
29
29
|
*/
|
|
30
30
|
openOnClick?: boolean;
|
|
31
31
|
/**
|
|
32
|
-
* A
|
|
32
|
+
* A Vue functional or class component which is used for rendering the innermost part of the Menu item ([see example]({% slug rendering_menu %}#toc-items)). By default, the innermost item part includes only the text for the item.
|
|
33
33
|
*/
|
|
34
34
|
itemRender?: any;
|
|
35
35
|
/**
|
|
36
|
-
* A
|
|
36
|
+
* A Vue functional or class component which is used for rendering the link of the item ([see example]({% slug rendering_menu %}#toc-links)). The item link is a part of the visual representation of the item which, by default, includes an arrow, icon, and text.
|
|
37
37
|
*/
|
|
38
38
|
linkRender?: any;
|
|
39
39
|
/**
|
|
@@ -75,7 +75,11 @@ var Menu = {
|
|
|
75
75
|
// }
|
|
76
76
|
this.mouseOverHandler.OpenOnClick = this.$props.openOnClick;
|
|
77
77
|
},
|
|
78
|
-
destroyed: function
|
|
78
|
+
destroyed: !!gh ? undefined : function () {
|
|
79
|
+
this.clearItemHoverAndLeaveRequestsIfApplicable();
|
|
80
|
+
},
|
|
81
|
+
// @ts-ignore
|
|
82
|
+
unmounted: function unmounted() {
|
|
79
83
|
this.clearItemHoverAndLeaveRequestsIfApplicable();
|
|
80
84
|
},
|
|
81
85
|
data: function data() {
|
|
@@ -27,15 +27,15 @@ export interface BaseMenuItem {
|
|
|
27
27
|
*/
|
|
28
28
|
cssStyle?: any;
|
|
29
29
|
/**
|
|
30
|
-
* A
|
|
30
|
+
* A Vue functional or class component which is used for rendering the innermost part of the Menu item ([see example]({% slug rendering_menu %}#toc-items)). By default, the innermost item part includes only the text for the item.
|
|
31
31
|
*/
|
|
32
32
|
render?: any;
|
|
33
33
|
/**
|
|
34
|
-
* A
|
|
34
|
+
* A Vue functional or class component which is used for rendering the link of the item ([see example]({% slug rendering_menu %}#toc-links)). The item link is a part of the visual representation of the item which, by default, includes an arrow, icon, and text.
|
|
35
35
|
*/
|
|
36
36
|
linkRender?: any;
|
|
37
37
|
/**
|
|
38
|
-
* A
|
|
38
|
+
* A Vue functional or class component which is used for rendering content instead of the item children ([see example]({% slug rendering_menu %}#toc-content)).
|
|
39
39
|
*/
|
|
40
40
|
contentRender?: any;
|
|
41
41
|
/**
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-vue-layout',
|
|
6
6
|
productName: 'Kendo UI for Vue',
|
|
7
7
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1638285607,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DefineComponent } from '../additionalTypes';
|
|
2
|
+
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
3
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
4
|
+
declare type DefaultMethods<V> = {
|
|
5
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
6
|
+
};
|
|
7
|
+
import { StepProps } from './interfaces/StepProps';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export interface StepState {
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export interface StepComputed {
|
|
17
|
+
itemClassNames: object;
|
|
18
|
+
itemStyles: object;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
export interface StepMethods {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @hidden
|
|
28
|
+
*/
|
|
29
|
+
export interface StepData {
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @hidden
|
|
33
|
+
*/
|
|
34
|
+
export interface StepAll extends Vue, StepMethods, StepData, StepComputed, StepState {
|
|
35
|
+
}
|
|
36
|
+
declare let Step: ComponentOptions<StepAll, DefaultData<StepData>, DefaultMethods<StepAll>, StepComputed, RecordPropsDefinition<StepProps>>;
|
|
37
|
+
declare const StepVue3: DefineComponent<StepProps, any, StepData, StepComputed, StepMethods, {}, {}, {}, string, StepProps, StepProps, {}>;
|
|
38
|
+
export { Step, StepVue3 };
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import * as Vue from 'vue';
|
|
3
|
+
var allVue = Vue;
|
|
4
|
+
var gh = allVue.h;
|
|
5
|
+
var inject = allVue.inject;
|
|
6
|
+
import { focusFirstFocusableChild, getDefaultSlots } from '@progress/kendo-vue-common';
|
|
7
|
+
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
8
|
+
import { DEFAULT_ANIMATION_DURATION, NO_ANIMATION } from './contants';
|
|
9
|
+
import { messages, optionalText } from './messages'; // tslint:enable:max-line-length
|
|
10
|
+
|
|
11
|
+
var Step = {
|
|
12
|
+
name: 'KendoStep',
|
|
13
|
+
props: {
|
|
14
|
+
current: Boolean,
|
|
15
|
+
disabled: Boolean,
|
|
16
|
+
icon: String,
|
|
17
|
+
index: Number,
|
|
18
|
+
isValid: Boolean,
|
|
19
|
+
focused: Boolean,
|
|
20
|
+
label: String,
|
|
21
|
+
optional: Boolean,
|
|
22
|
+
tabIndex: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 0
|
|
25
|
+
},
|
|
26
|
+
text: String,
|
|
27
|
+
animationDuration: [Boolean, Number],
|
|
28
|
+
isVertical: Boolean,
|
|
29
|
+
item: [String, Object, Boolean, Function],
|
|
30
|
+
linear: Boolean,
|
|
31
|
+
mode: String,
|
|
32
|
+
numOfSteps: Number,
|
|
33
|
+
value: Number,
|
|
34
|
+
successIcon: String,
|
|
35
|
+
errorIcon: String
|
|
36
|
+
},
|
|
37
|
+
inject: {
|
|
38
|
+
kendoLocalizationService: {
|
|
39
|
+
default: null
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
computed: {
|
|
43
|
+
itemClassNames: function itemClassNames() {
|
|
44
|
+
var _a = this.$props,
|
|
45
|
+
current = _a.current,
|
|
46
|
+
disabled = _a.disabled,
|
|
47
|
+
focused = _a.focused,
|
|
48
|
+
index = _a.index,
|
|
49
|
+
isValid = _a.isValid,
|
|
50
|
+
optional = _a.optional;
|
|
51
|
+
return {
|
|
52
|
+
'k-step': true,
|
|
53
|
+
'k-step-first': index === 0,
|
|
54
|
+
'k-step-last': this.numOfSteps && index === this.numOfSteps - 1,
|
|
55
|
+
'k-step-done': index < this.value,
|
|
56
|
+
'k-step-current': current,
|
|
57
|
+
'k-step-optional': optional,
|
|
58
|
+
'k-step-disabled': disabled,
|
|
59
|
+
'k-step-focus': focused,
|
|
60
|
+
'k-step-error': isValid !== undefined && !isValid,
|
|
61
|
+
'k-step-success': isValid
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
itemStyles: function itemStyles() {
|
|
65
|
+
var index = this.$props.index;
|
|
66
|
+
var allowClick = !this.linear || index === this.value - 1 || index === this.value || index === this.value + 1;
|
|
67
|
+
return {
|
|
68
|
+
maxWidth: !this.isVertical ? "calc(100% / " + this.numOfSteps + ")" : undefined,
|
|
69
|
+
pointerEvents: !allowClick ? 'none' : undefined
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
setup: !gh ? undefined : function () {
|
|
75
|
+
var v3 = !!gh;
|
|
76
|
+
var kendoLocalizationService = inject('kendoLocalizationService', {});
|
|
77
|
+
return {
|
|
78
|
+
v3: v3,
|
|
79
|
+
kendoLocalizationService: kendoLocalizationService
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
// @ts-ignore
|
|
83
|
+
render: function render(createElement) {
|
|
84
|
+
var h = gh || createElement;
|
|
85
|
+
var defaultSlots = getDefaultSlots(this);
|
|
86
|
+
var _a = this.$props,
|
|
87
|
+
current = _a.current,
|
|
88
|
+
disabled = _a.disabled,
|
|
89
|
+
focused = _a.focused,
|
|
90
|
+
icon = _a.icon,
|
|
91
|
+
index = _a.index,
|
|
92
|
+
isValid = _a.isValid,
|
|
93
|
+
label = _a.label,
|
|
94
|
+
optional = _a.optional,
|
|
95
|
+
tabIndex = _a.tabIndex,
|
|
96
|
+
text = _a.text,
|
|
97
|
+
animationDuration = _a.animationDuration,
|
|
98
|
+
item = _a.item,
|
|
99
|
+
linear = _a.linear,
|
|
100
|
+
mode = _a.mode,
|
|
101
|
+
value = _a.value,
|
|
102
|
+
successIcon = _a.successIcon,
|
|
103
|
+
errorIcon = _a.errorIcon;
|
|
104
|
+
var allowClick = !linear || index === value - 1 || index === value || index === value + 1;
|
|
105
|
+
var isInLabel = mode === 'labels' || Boolean(icon) && Boolean(label);
|
|
106
|
+
var localizationService = provideLocalizationService(this);
|
|
107
|
+
|
|
108
|
+
var localizeMessage = function localizeMessage(message) {
|
|
109
|
+
return localizationService.toLanguageString(message, messages[message]);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
var optionalMessage = localizeMessage(optionalText);
|
|
113
|
+
var progressAnimation = typeof animationDuration === 'number' ? animationDuration : animationDuration !== false ? DEFAULT_ANIMATION_DURATION : NO_ANIMATION;
|
|
114
|
+
var validationIconClasses = isValid ? successIcon ? "" + successIcon : 'k-icon k-i-check' : errorIcon ? "" + errorIcon : 'k-icon k-i-warning';
|
|
115
|
+
var validationIcons = h("span", {
|
|
116
|
+
"class": 'k-step-indicator-icon ' + validationIconClasses,
|
|
117
|
+
"aria-hidden": "true",
|
|
118
|
+
attrs: this.v3 ? undefined : {
|
|
119
|
+
"aria-hidden": "true"
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
var stepIndicator = function stepIndicator() {
|
|
124
|
+
return mode !== 'labels' ? h("span", {
|
|
125
|
+
"class": "k-step-indicator",
|
|
126
|
+
"aria-hidden": true,
|
|
127
|
+
attrs: this.v3 ? undefined : {
|
|
128
|
+
"aria-hidden": true
|
|
129
|
+
},
|
|
130
|
+
style: {
|
|
131
|
+
transitionDuration: progressAnimation + 'ms'
|
|
132
|
+
}
|
|
133
|
+
}, [icon ? !isInLabel && isValid !== undefined ? validationIcons : h("span", {
|
|
134
|
+
"class": "k-step-indicator-icon k-icon " + icon
|
|
135
|
+
}) : isValid !== undefined ? validationIcons : h("span", {
|
|
136
|
+
"class": "k-step-indicator-text"
|
|
137
|
+
}, [text ? text : index + 1])]) : null;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
var stepLabel = function stepLabel() {
|
|
141
|
+
return h("span", {
|
|
142
|
+
"class": "k-step-label"
|
|
143
|
+
}, [label && h("span", {
|
|
144
|
+
"class": "k-step-text"
|
|
145
|
+
}, [label]), isInLabel && isValid !== undefined && validationIcons, optional && h("span", {
|
|
146
|
+
"class": "k-step-label-optional"
|
|
147
|
+
}, [optionalMessage])]);
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
return h("li", {
|
|
151
|
+
"class": this.itemClassNames,
|
|
152
|
+
style: this.itemStyles
|
|
153
|
+
}, [h("a", {
|
|
154
|
+
"class": "k-step-link",
|
|
155
|
+
title: label ? label : undefined,
|
|
156
|
+
attrs: this.v3 ? undefined : {
|
|
157
|
+
title: label ? label : undefined,
|
|
158
|
+
tabIndex: tabIndex ? tabIndex : focused ? 0 : -1,
|
|
159
|
+
"aria-current": current ? 'step' : undefined,
|
|
160
|
+
"aria-disabled": disabled || !allowClick || undefined,
|
|
161
|
+
"aria-invalid": isValid !== undefined && !isValid || undefined
|
|
162
|
+
},
|
|
163
|
+
onClick: this.handleClick,
|
|
164
|
+
on: this.v3 ? undefined : {
|
|
165
|
+
"click": this.handleClick,
|
|
166
|
+
"focusin": this.handleFocus
|
|
167
|
+
},
|
|
168
|
+
onFocusin: this.handleFocus,
|
|
169
|
+
tabIndex: tabIndex ? tabIndex : focused ? 0 : -1,
|
|
170
|
+
"aria-current": current ? 'step' : undefined,
|
|
171
|
+
"aria-disabled": disabled || !allowClick || undefined,
|
|
172
|
+
"aria-invalid": isValid !== undefined && !isValid || undefined
|
|
173
|
+
}, [!item ? [stepIndicator.call(this), stepLabel.call(this)] : defaultSlots])]);
|
|
174
|
+
},
|
|
175
|
+
methods: {
|
|
176
|
+
focus: function focus() {
|
|
177
|
+
if (this.$el) {
|
|
178
|
+
focusFirstFocusableChild(this.$el);
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
handleClick: function handleClick(event) {
|
|
182
|
+
if (!this.disabled) {
|
|
183
|
+
this.$emit('change', {
|
|
184
|
+
event: event,
|
|
185
|
+
value: this.index
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
handleFocus: function handleFocus(event) {
|
|
190
|
+
if (!this.disabled) {
|
|
191
|
+
this.$emit('focus', event);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
var StepVue3 = Step;
|
|
197
|
+
export { Step, StepVue3 };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DefineComponent } from '../additionalTypes';
|
|
2
|
+
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
3
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
4
|
+
declare type DefaultMethods<V> = {
|
|
5
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
6
|
+
};
|
|
7
|
+
import { StepperProps } from './interfaces/StepperProps';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export interface StepperState {
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export interface StepperComputed {
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
export interface StepperMethods {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
setStepper: () => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
export interface StepperData {
|
|
29
|
+
focusedIdx: number;
|
|
30
|
+
currentDir: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
export interface StepperAll extends Vue, StepperMethods, StepperData, StepperComputed, StepperState {
|
|
36
|
+
}
|
|
37
|
+
declare let Stepper: ComponentOptions<StepperAll, DefaultData<StepperData>, DefaultMethods<StepperAll>, StepperComputed, RecordPropsDefinition<StepperProps>>;
|
|
38
|
+
declare const StepperVue3: DefineComponent<StepperProps, any, StepperData, StepperComputed, StepperMethods, {}, {}, {}, string, StepperProps, StepperProps, {}>;
|
|
39
|
+
export { Stepper, StepperVue3 };
|