|
| 1 | +import Vue from 'vue' |
| 2 | + |
1 | 3 | export type ShapeType = 'circle' | 'square' | 'tab'
|
2 | 4 | export type LayoutType = 'vertical' | 'horizontal'
|
3 | 5 | export type StepSizeType = 'xs' | 'sm' | 'md' | 'lg'
|
4 | 6 |
|
5 |
| -export declare class Wizard { |
6 |
| - /** Wizard title */ |
| 7 | +export declare class Wizard extends Vue { |
| 8 | + /** |
| 9 | + * Wizard identifier. |
| 10 | + * |
| 11 | + * Default value: 'fw_<timestamp-in-milliseconds>' |
| 12 | + */ |
| 13 | + id: string |
| 14 | + |
| 15 | + /** |
| 16 | + * Wizard title. |
| 17 | + * |
| 18 | + * Default value: 'Awesome Wizard' |
| 19 | + */ |
7 | 20 | title: string
|
8 |
| - /** Wizard subtitle */ |
| 21 | + |
| 22 | + /** |
| 23 | + * Wizard subtitle. |
| 24 | + * |
| 25 | + * Default value: 'Split a complicated flow in multiple steps' |
| 26 | + */ |
9 | 27 | subtitle: string
|
| 28 | + |
| 29 | + /** |
| 30 | + * Text to display on next button. |
| 31 | + * |
| 32 | + * Default value: 'Next' |
| 33 | + */ |
10 | 34 | nextButtonText: string
|
| 35 | + |
| 36 | + /** |
| 37 | + * Text to display on back button. |
| 38 | + * |
| 39 | + * Default value: 'Back' |
| 40 | + */ |
11 | 41 | backButtonText: string
|
| 42 | + |
| 43 | + /** |
| 44 | + * Text to display on finish button. |
| 45 | + * |
| 46 | + * Default value: 'Finish' |
| 47 | + */ |
12 | 48 | finishButtonText: string
|
13 |
| - /** Whether to hide footer buttons */ |
| 49 | + |
| 50 | + /** |
| 51 | + * Whether or not buttons should be hidden. |
| 52 | + * |
| 53 | + * Default value: false |
| 54 | + */ |
14 | 55 | hideButtons: boolean
|
15 |
| - /** Whether to trigger beforeChange function when navigating back */ |
| 56 | + |
| 57 | + /** |
| 58 | + * Whether or not to trigger `beforeChange` function when navigating back. |
| 59 | + * |
| 60 | + * Default value: false |
| 61 | + */ |
16 | 62 | validateOnBack: boolean
|
17 |
| - /** Active step and button color */ |
| 63 | + |
| 64 | + /** |
| 65 | + * Color to apply to text, border and circle. |
| 66 | + * |
| 67 | + * Default value: '#e74c3c' |
| 68 | + */ |
18 | 69 | color: string
|
19 |
| - /** Step color when the current step is not valid */ |
| 70 | + |
| 71 | + /** |
| 72 | + * Step color when the current step is not valid. |
| 73 | + * |
| 74 | + * Default value: '#8b0000' |
| 75 | + */ |
20 | 76 | errorColor: string
|
21 |
| - /** Main step shape */ |
| 77 | + |
| 78 | + /** |
| 79 | + * Shape of steps. |
| 80 | + * |
| 81 | + * Default value: 'circle' |
| 82 | + */ |
22 | 83 | shape: ShapeType
|
23 |
| - /** Wizard layout */ |
| 84 | + |
| 85 | + /** |
| 86 | + * Layout of wizard. |
| 87 | + * |
| 88 | + * Default value: 'horizontal' |
| 89 | + */ |
24 | 90 | layout: LayoutType
|
25 |
| - /** Additional css classes for steps */ |
| 91 | + |
| 92 | + /** |
| 93 | + * Additional CSS classes to apply to steps. |
| 94 | + * |
| 95 | + * Default value: '' |
| 96 | + */ |
26 | 97 | stepsClasses: string[]
|
27 |
| - /** Step size */ |
| 98 | + |
| 99 | + /** |
| 100 | + * Size of steps. |
| 101 | + * |
| 102 | + * Default value: 'md' |
| 103 | + */ |
28 | 104 | stepSize: StepSizeType
|
29 |
| - /** Step transition from inactive to active */ |
| 105 | + |
| 106 | + /** |
| 107 | + * Name of the transition when transitioning between steps. |
| 108 | + * |
| 109 | + * Default value: '' |
| 110 | + */ |
30 | 111 | transition: string
|
31 |
| - /** Tab index where the wizard should start */ |
| 112 | + |
| 113 | + /** |
| 114 | + * Zero-based index of the initial tab to be displayed. |
| 115 | + * |
| 116 | + * Default value: 0 |
| 117 | + */ |
32 | 118 | startIndex: number
|
| 119 | + |
| 120 | + /** |
| 121 | + * Resets the wizard to its initial state. |
| 122 | + */ |
| 123 | + reset: () => void |
| 124 | + |
| 125 | + /** |
| 126 | + * Activates all steps, as if the user has navigated to each of them. |
| 127 | + */ |
| 128 | + activateAll: () => void |
| 129 | + |
| 130 | + /** |
| 131 | + * Navigates to the next tab. |
| 132 | + */ |
| 133 | + nextTab: () => void |
| 134 | + |
| 135 | + /** |
| 136 | + * Navigates to the previous tab. |
| 137 | + */ |
| 138 | + prevTab: () => void |
| 139 | + |
| 140 | + /** |
| 141 | + * Navigates from one tab to another. Note that this method does not trigger validaiton methods. |
| 142 | + */ |
| 143 | + changeTab: (oldIndex: number, newIndex: number, emitChangeEvent?: boolean) => boolean |
33 | 144 | }
|
0 commit comments