@syncfusion/ej2-navigations 30.2.5 → 31.1.17
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/ej2-navigations.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js.map +1 -1
- package/dist/es6/ej2-navigations.es2015.js +1 -0
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +1 -0
- package/dist/es6/ej2-navigations.es5.js.map +1 -1
- package/dist/global/ej2-navigations.min.js +2 -2
- package/dist/global/ej2-navigations.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/dist/ts/accordion/accordion-model.d.ts +285 -0
- package/dist/ts/accordion/accordion.d.ts +458 -0
- package/dist/ts/accordion/accordion.ts +1580 -0
- package/dist/ts/accordion/index.d.ts +5 -0
- package/dist/ts/accordion/index.ts +5 -0
- package/dist/ts/appbar/appbar-model.d.ts +76 -0
- package/dist/ts/appbar/appbar.d.ts +115 -0
- package/dist/ts/appbar/appbar.ts +281 -0
- package/dist/ts/appbar/index.d.ts +3 -0
- package/dist/ts/appbar/index.ts +3 -0
- package/dist/ts/breadcrumb/breadcrumb-model.d.ts +170 -0
- package/dist/ts/breadcrumb/breadcrumb.d.ts +297 -0
- package/dist/ts/breadcrumb/breadcrumb.ts +959 -0
- package/dist/ts/breadcrumb/index.d.ts +5 -0
- package/dist/ts/breadcrumb/index.ts +5 -0
- package/dist/ts/carousel/carousel-model.d.ts +282 -0
- package/dist/ts/carousel/carousel.d.ts +439 -0
- package/dist/ts/carousel/carousel.ts +1633 -0
- package/dist/ts/carousel/index.d.ts +3 -0
- package/dist/ts/carousel/index.ts +3 -0
- package/dist/ts/common/h-scroll-model.d.ts +16 -0
- package/dist/ts/common/h-scroll.d.ts +105 -0
- package/dist/ts/common/h-scroll.ts +481 -0
- package/dist/ts/common/index.d.ts +9 -0
- package/dist/ts/common/index.ts +10 -0
- package/dist/ts/common/menu-base-model.d.ts +308 -0
- package/dist/ts/common/menu-base.d.ts +558 -0
- package/dist/ts/common/menu-base.ts +2736 -0
- package/dist/ts/common/menu-scroll.d.ts +29 -0
- package/dist/ts/common/menu-scroll.ts +105 -0
- package/dist/ts/common/v-scroll-model.d.ts +16 -0
- package/dist/ts/common/v-scroll.d.ts +106 -0
- package/dist/ts/common/v-scroll.ts +454 -0
- package/dist/ts/context-menu/context-menu-model.d.ts +47 -0
- package/dist/ts/context-menu/context-menu.d.ts +102 -0
- package/dist/ts/context-menu/context-menu.ts +165 -0
- package/dist/ts/context-menu/index.d.ts +5 -0
- package/dist/ts/context-menu/index.ts +5 -0
- package/dist/ts/index.d.ts +16 -0
- package/dist/ts/index.ts +16 -0
- package/dist/ts/menu/index.d.ts +5 -0
- package/dist/ts/menu/index.ts +5 -0
- package/dist/ts/menu/menu-model.d.ts +70 -0
- package/dist/ts/menu/menu.d.ts +127 -0
- package/dist/ts/menu/menu.ts +313 -0
- package/dist/ts/sidebar/index.d.ts +5 -0
- package/dist/ts/sidebar/index.ts +5 -0
- package/dist/ts/sidebar/sidebar-model.d.ts +200 -0
- package/dist/ts/sidebar/sidebar.d.ts +336 -0
- package/dist/ts/sidebar/sidebar.ts +907 -0
- package/dist/ts/stepper/index.d.ts +3 -0
- package/dist/ts/stepper/index.ts +3 -0
- package/dist/ts/stepper/stepper-model.d.ts +159 -0
- package/dist/ts/stepper/stepper.d.ts +381 -0
- package/dist/ts/stepper/stepper.ts +1350 -0
- package/dist/ts/stepper-base/index.d.ts +5 -0
- package/dist/ts/stepper-base/index.ts +6 -0
- package/dist/ts/stepper-base/stepper-base-model.d.ts +124 -0
- package/dist/ts/stepper-base/stepper-base.d.ts +187 -0
- package/dist/ts/stepper-base/stepper-base.ts +290 -0
- package/dist/ts/tab/index.d.ts +5 -0
- package/dist/ts/tab/index.ts +5 -0
- package/dist/ts/tab/tab-model.d.ts +408 -0
- package/dist/ts/tab/tab.d.ts +715 -0
- package/dist/ts/tab/tab.ts +2842 -0
- package/dist/ts/toolbar/index.d.ts +5 -0
- package/dist/ts/toolbar/index.ts +5 -0
- package/dist/ts/toolbar/toolbar-model.d.ts +294 -0
- package/dist/ts/toolbar/toolbar.d.ts +541 -0
- package/dist/ts/toolbar/toolbar.ts +2646 -0
- package/dist/ts/treeview/index.d.ts +5 -0
- package/dist/ts/treeview/index.ts +5 -0
- package/dist/ts/treeview/treeview-model.d.ts +637 -0
- package/dist/ts/treeview/treeview.d.ts +1518 -0
- package/dist/ts/treeview/treeview.ts +6780 -0
- package/package.json +70 -17
- package/src/context-menu/context-menu-model.d.ts +1 -1
- package/src/context-menu/context-menu.js +1 -1
- package/src/tab/tab.js +1 -0
- package/styles/accordion/_bootstrap-dark-definition.scss +1 -1
- package/styles/accordion/_bootstrap-definition.scss +1 -1
- package/styles/accordion/bootstrap-dark.css +1 -1
- package/styles/accordion/bootstrap.css +1 -1
- package/styles/bds-lite.css +1 -1
- package/styles/bds.css +1 -1
- package/styles/bootstrap-dark-lite.css +2 -2
- package/styles/bootstrap-dark.css +2 -2
- package/styles/bootstrap-lite.css +2 -2
- package/styles/bootstrap.css +2 -2
- package/styles/bootstrap4-lite.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark-lite.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5-lite.css +1 -1
- package/styles/bootstrap5.3-lite.css +1 -1
- package/styles/bootstrap5.3.css +9 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/fabric-dark-lite.css +1 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric-lite.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/fluent-dark-lite.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent-lite.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/fluent2-lite.css +4 -1
- package/styles/fluent2.css +4 -1
- package/styles/h-scroll/_layout.scss +1 -1
- package/styles/h-scroll/bds.css +1 -1
- package/styles/h-scroll/bootstrap-dark.css +1 -1
- package/styles/h-scroll/bootstrap.css +1 -1
- package/styles/h-scroll/bootstrap4.css +1 -1
- package/styles/h-scroll/bootstrap5-dark.css +1 -1
- package/styles/h-scroll/bootstrap5.3.css +1 -1
- package/styles/h-scroll/bootstrap5.css +1 -1
- package/styles/h-scroll/fabric-dark.css +1 -1
- package/styles/h-scroll/fabric.css +1 -1
- package/styles/h-scroll/fluent-dark.css +1 -1
- package/styles/h-scroll/fluent.css +1 -1
- package/styles/h-scroll/fluent2.css +1 -1
- package/styles/h-scroll/highcontrast-light.css +1 -1
- package/styles/h-scroll/highcontrast.css +1 -1
- package/styles/h-scroll/material-dark.css +1 -1
- package/styles/h-scroll/material.css +1 -1
- package/styles/h-scroll/material3-dark.css +1 -1
- package/styles/h-scroll/material3.css +1 -1
- package/styles/h-scroll/tailwind-dark.css +1 -1
- package/styles/h-scroll/tailwind.css +1 -1
- package/styles/h-scroll/tailwind3.css +1 -1
- package/styles/highcontrast-light-lite.css +1 -1
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast-lite.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark-lite.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material-lite.css +1 -1
- package/styles/material.css +1 -1
- package/styles/material3-dark-lite.css +1 -1
- package/styles/material3-dark.css +1 -7
- package/styles/material3-lite.css +1 -1
- package/styles/material3.css +1 -7
- package/styles/tailwind-dark-lite.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind-lite.css +1 -1
- package/styles/tailwind.css +1 -1
- package/styles/tailwind3-lite.css +1 -1
- package/styles/tailwind3.css +1 -1
- package/styles/toolbar/_layout.scss +1 -1
- package/styles/treeview/_bigger.scss +2 -2
- package/styles/treeview/_bootstrap5.3-definition.scss +1 -0
- package/styles/treeview/_layout.scss +3 -0
- package/styles/treeview/bootstrap5.3.css +8 -0
- package/styles/treeview/fluent2.css +3 -0
- package/styles/treeview/material3-dark.css +0 -6
- package/styles/treeview/material3.css +0 -6
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, Property, ChildProperty, Collection, Event, EmitType, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
2
|
+
import {StepStatus,StepperOrientation} from "./stepper-base";
|
|
3
|
+
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Interface for a class Step
|
|
7
|
+
*/
|
|
8
|
+
export interface StepModel {
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Defines the CSS class to customize the step appearance.
|
|
12
|
+
*
|
|
13
|
+
* @default ''
|
|
14
|
+
*/
|
|
15
|
+
cssClass?: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Defines whether a step is enabled or disabled.
|
|
19
|
+
*
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Defines the icon content of the step.
|
|
26
|
+
*
|
|
27
|
+
* @default ''
|
|
28
|
+
*/
|
|
29
|
+
iconCss?: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Defines the state whether it is valid completion or not.
|
|
33
|
+
* If set to true, the completion is valid.
|
|
34
|
+
* If false, the completion is invalid.
|
|
35
|
+
* If null, the completion state is not determined.
|
|
36
|
+
*
|
|
37
|
+
* @aspType bool?
|
|
38
|
+
* @default null
|
|
39
|
+
*/
|
|
40
|
+
isValid?: boolean | null;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Defines the label content of the step.
|
|
44
|
+
*
|
|
45
|
+
* @default ''
|
|
46
|
+
*/
|
|
47
|
+
label?: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Defines whether the step is optionally to skip completion or not.
|
|
51
|
+
*
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
optional?: boolean;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Defines the status of the step.
|
|
58
|
+
* The possible values are
|
|
59
|
+
* * NotStarted
|
|
60
|
+
* * InProgress
|
|
61
|
+
* * Completed
|
|
62
|
+
*
|
|
63
|
+
* @isenumeration true
|
|
64
|
+
* @default StepStatus.NotStarted
|
|
65
|
+
* @asptype StepStatus
|
|
66
|
+
*/
|
|
67
|
+
status?: string | StepStatus;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Defines the text content of the step.
|
|
71
|
+
*
|
|
72
|
+
* @default ''
|
|
73
|
+
*/
|
|
74
|
+
text?: string;
|
|
75
|
+
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Interface for a class StepperBase
|
|
80
|
+
*/
|
|
81
|
+
export interface StepperBaseModel extends ComponentModel{
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Defines the list of steps.
|
|
85
|
+
*
|
|
86
|
+
* @default []
|
|
87
|
+
*/
|
|
88
|
+
steps?: StepModel[];
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Defines the CSS class to customize the Stepper appearance.
|
|
92
|
+
*
|
|
93
|
+
* @default ''
|
|
94
|
+
*/
|
|
95
|
+
cssClass?: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Defines whether the read-only mode is enabled for a Stepper control, which means that the user will not be able to interact with it.
|
|
99
|
+
*
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
102
|
+
readOnly?: boolean;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Defines the orientation type of the Stepper.
|
|
106
|
+
*
|
|
107
|
+
* The possible values are:
|
|
108
|
+
* * Horizontal
|
|
109
|
+
* * vertical
|
|
110
|
+
*
|
|
111
|
+
* @isenumeration true
|
|
112
|
+
* @default StepperOrientation.Horizontal
|
|
113
|
+
* @asptype StepperOrientation
|
|
114
|
+
*/
|
|
115
|
+
orientation?: string | StepperOrientation;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Event callback that is raised after rendering the stepper.
|
|
119
|
+
*
|
|
120
|
+
* @event created
|
|
121
|
+
*/
|
|
122
|
+
created?: EmitType<Event>;
|
|
123
|
+
|
|
124
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Component, INotifyPropertyChanged, ChildProperty, EmitType } from '@syncfusion/ej2-base';
|
|
2
|
+
import { StepperBaseModel, StepModel } from './stepper-base-model';
|
|
3
|
+
/**
|
|
4
|
+
* Defines the status of the step.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum StepStatus {
|
|
7
|
+
/**
|
|
8
|
+
* Shows the status of the step is not started.
|
|
9
|
+
*/
|
|
10
|
+
NotStarted = "NotStarted",
|
|
11
|
+
/**
|
|
12
|
+
* Shows the step is in progress.
|
|
13
|
+
*/
|
|
14
|
+
InProgress = "InProgress",
|
|
15
|
+
/**
|
|
16
|
+
* Shows the status of the step is completed.
|
|
17
|
+
*/
|
|
18
|
+
Completed = "Completed"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Specifies the steps of the Stepper.
|
|
22
|
+
*/
|
|
23
|
+
export declare class Step extends ChildProperty<Step> {
|
|
24
|
+
/**
|
|
25
|
+
* Defines the CSS class to customize the step appearance.
|
|
26
|
+
*
|
|
27
|
+
* @default ''
|
|
28
|
+
*/
|
|
29
|
+
cssClass: string;
|
|
30
|
+
/**
|
|
31
|
+
* Defines whether a step is enabled or disabled.
|
|
32
|
+
*
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Defines the icon content of the step.
|
|
38
|
+
*
|
|
39
|
+
* @default ''
|
|
40
|
+
*/
|
|
41
|
+
iconCss: string;
|
|
42
|
+
/**
|
|
43
|
+
* Defines the state whether it is valid completion or not.
|
|
44
|
+
* If set to true, the completion is valid.
|
|
45
|
+
* If false, the completion is invalid.
|
|
46
|
+
* If null, the completion state is not determined.
|
|
47
|
+
*
|
|
48
|
+
* @aspType bool?
|
|
49
|
+
* @default null
|
|
50
|
+
*/
|
|
51
|
+
isValid: boolean | null;
|
|
52
|
+
/**
|
|
53
|
+
* Defines the label content of the step.
|
|
54
|
+
*
|
|
55
|
+
* @default ''
|
|
56
|
+
*/
|
|
57
|
+
label: string;
|
|
58
|
+
/**
|
|
59
|
+
* Defines whether the step is optionally to skip completion or not.
|
|
60
|
+
*
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
optional: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Defines the status of the step.
|
|
66
|
+
* The possible values are
|
|
67
|
+
* * NotStarted
|
|
68
|
+
* * InProgress
|
|
69
|
+
* * Completed
|
|
70
|
+
*
|
|
71
|
+
* @isenumeration true
|
|
72
|
+
* @default StepStatus.NotStarted
|
|
73
|
+
* @asptype StepStatus
|
|
74
|
+
*/
|
|
75
|
+
status: string | StepStatus;
|
|
76
|
+
/**
|
|
77
|
+
* Defines the text content of the step.
|
|
78
|
+
*
|
|
79
|
+
* @default ''
|
|
80
|
+
*/
|
|
81
|
+
text: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Defines the orientation type of the Stepper.
|
|
85
|
+
*/
|
|
86
|
+
export declare enum StepperOrientation {
|
|
87
|
+
/**
|
|
88
|
+
* Steps are displayed horizontally.
|
|
89
|
+
*/
|
|
90
|
+
Horizontal = "Horizontal",
|
|
91
|
+
/**
|
|
92
|
+
* Steps are displayed vertically.
|
|
93
|
+
*/
|
|
94
|
+
Vertical = "Vertical"
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* StepperBase component act as base class to the stepper component.
|
|
98
|
+
*/
|
|
99
|
+
export declare class StepperBase extends Component<HTMLElement> implements INotifyPropertyChanged {
|
|
100
|
+
/**
|
|
101
|
+
* Defines the list of steps.
|
|
102
|
+
*
|
|
103
|
+
* @default []
|
|
104
|
+
*/
|
|
105
|
+
steps: StepModel[];
|
|
106
|
+
/**
|
|
107
|
+
* Defines the CSS class to customize the Stepper appearance.
|
|
108
|
+
*
|
|
109
|
+
* @default ''
|
|
110
|
+
*/
|
|
111
|
+
cssClass: string;
|
|
112
|
+
/**
|
|
113
|
+
* Defines whether the read-only mode is enabled for a Stepper control, which means that the user will not be able to interact with it.
|
|
114
|
+
*
|
|
115
|
+
* @default false
|
|
116
|
+
*/
|
|
117
|
+
readOnly: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Defines the orientation type of the Stepper.
|
|
120
|
+
*
|
|
121
|
+
* The possible values are:
|
|
122
|
+
* * Horizontal
|
|
123
|
+
* * vertical
|
|
124
|
+
*
|
|
125
|
+
* @isenumeration true
|
|
126
|
+
* @default StepperOrientation.Horizontal
|
|
127
|
+
* @asptype StepperOrientation
|
|
128
|
+
*/
|
|
129
|
+
orientation: string | StepperOrientation;
|
|
130
|
+
/**
|
|
131
|
+
* Event callback that is raised after rendering the stepper.
|
|
132
|
+
*
|
|
133
|
+
* @event created
|
|
134
|
+
*/
|
|
135
|
+
created: EmitType<Event>;
|
|
136
|
+
protected progressStep: HTMLElement;
|
|
137
|
+
protected progressbar: HTMLElement;
|
|
138
|
+
protected progressBarPosition: number;
|
|
139
|
+
/**
|
|
140
|
+
* * Constructor for Base class
|
|
141
|
+
*
|
|
142
|
+
* @param {StepperBaseModel} options - Specifies the Base model.
|
|
143
|
+
* @param {string | HTMLElement} element - Specifies the element to render as component.
|
|
144
|
+
* @private
|
|
145
|
+
*/
|
|
146
|
+
constructor(options?: StepperBaseModel, element?: string | HTMLElement);
|
|
147
|
+
/**
|
|
148
|
+
* This method is abstract member of the Component<HTMLElement>.
|
|
149
|
+
*
|
|
150
|
+
* @private
|
|
151
|
+
* @returns {void}
|
|
152
|
+
*/
|
|
153
|
+
protected preRender(): void;
|
|
154
|
+
/**
|
|
155
|
+
* This method is abstract member of the Component<HTMLElement>.
|
|
156
|
+
*
|
|
157
|
+
* @private
|
|
158
|
+
* @returns {string} - It returns the current module name.
|
|
159
|
+
*/
|
|
160
|
+
getModuleName(): string;
|
|
161
|
+
/**
|
|
162
|
+
* This method is abstract member of the Component<HTMLElement>.
|
|
163
|
+
*
|
|
164
|
+
* @private
|
|
165
|
+
* @returns {string} - It returns the persisted data.
|
|
166
|
+
*/
|
|
167
|
+
protected getPersistData(): string;
|
|
168
|
+
/**
|
|
169
|
+
* This method is abstract member of the Component<HTMLElement>.
|
|
170
|
+
*
|
|
171
|
+
* @private
|
|
172
|
+
* @returns {void}
|
|
173
|
+
*/
|
|
174
|
+
protected render(): void;
|
|
175
|
+
protected updateOrientaion(wrapper: HTMLElement): void;
|
|
176
|
+
protected renderProgressBar(wrapper: HTMLElement): void;
|
|
177
|
+
protected setProgressPosition(wrapper: HTMLElement, isResize?: boolean): void;
|
|
178
|
+
/**
|
|
179
|
+
* This method is abstract member of the Component<HTMLElement>.
|
|
180
|
+
*
|
|
181
|
+
* @param {StepperBaseModel} newProp - Specifies new properties
|
|
182
|
+
* @param {StepperBaseModel} oldProp - Specifies old properties
|
|
183
|
+
* @private
|
|
184
|
+
* @returns {void}
|
|
185
|
+
*/
|
|
186
|
+
onPropertyChanged(newProp: StepperBaseModel, oldProp: StepperBaseModel): void;
|
|
187
|
+
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, Property, ChildProperty, Collection, Event, EmitType, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
2
|
+
import { StepperBaseModel, StepModel } from './stepper-base-model';
|
|
3
|
+
|
|
4
|
+
const PROGRESSVALUE: string = '--progress-value';
|
|
5
|
+
const PROGRESSPOS: string = '--progress-position';
|
|
6
|
+
const VERTICALSTEP: string = 'e-vertical';
|
|
7
|
+
const HORIZSTEP: string = 'e-horizontal';
|
|
8
|
+
const ITEMLIST: string = 'e-stepper-steps';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Defines the status of the step.
|
|
12
|
+
*/
|
|
13
|
+
export enum StepStatus {
|
|
14
|
+
/**
|
|
15
|
+
* Shows the status of the step is not started.
|
|
16
|
+
*/
|
|
17
|
+
NotStarted = 'NotStarted',
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Shows the step is in progress.
|
|
21
|
+
*/
|
|
22
|
+
InProgress = 'InProgress',
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Shows the status of the step is completed.
|
|
26
|
+
*/
|
|
27
|
+
Completed = 'Completed'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Specifies the steps of the Stepper.
|
|
32
|
+
*/
|
|
33
|
+
export class Step extends ChildProperty<Step> {
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Defines the CSS class to customize the step appearance.
|
|
37
|
+
*
|
|
38
|
+
* @default ''
|
|
39
|
+
*/
|
|
40
|
+
@Property('')
|
|
41
|
+
public cssClass: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Defines whether a step is enabled or disabled.
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
@Property(false)
|
|
49
|
+
public disabled: boolean;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Defines the icon content of the step.
|
|
53
|
+
*
|
|
54
|
+
* @default ''
|
|
55
|
+
*/
|
|
56
|
+
@Property('')
|
|
57
|
+
public iconCss: string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Defines the state whether it is valid completion or not.
|
|
61
|
+
* If set to true, the completion is valid.
|
|
62
|
+
* If false, the completion is invalid.
|
|
63
|
+
* If null, the completion state is not determined.
|
|
64
|
+
*
|
|
65
|
+
* @aspType bool?
|
|
66
|
+
* @default null
|
|
67
|
+
*/
|
|
68
|
+
@Property(null)
|
|
69
|
+
public isValid: boolean | null;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Defines the label content of the step.
|
|
73
|
+
*
|
|
74
|
+
* @default ''
|
|
75
|
+
*/
|
|
76
|
+
@Property('')
|
|
77
|
+
public label: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Defines whether the step is optionally to skip completion or not.
|
|
81
|
+
*
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
@Property(false)
|
|
85
|
+
public optional: boolean;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Defines the status of the step.
|
|
89
|
+
* The possible values are
|
|
90
|
+
* * NotStarted
|
|
91
|
+
* * InProgress
|
|
92
|
+
* * Completed
|
|
93
|
+
*
|
|
94
|
+
* @isenumeration true
|
|
95
|
+
* @default StepStatus.NotStarted
|
|
96
|
+
* @asptype StepStatus
|
|
97
|
+
*/
|
|
98
|
+
@Property(StepStatus.NotStarted)
|
|
99
|
+
public status: string | StepStatus;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Defines the text content of the step.
|
|
103
|
+
*
|
|
104
|
+
* @default ''
|
|
105
|
+
*/
|
|
106
|
+
@Property('')
|
|
107
|
+
public text: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Defines the orientation type of the Stepper.
|
|
112
|
+
*/
|
|
113
|
+
export enum StepperOrientation {
|
|
114
|
+
/**
|
|
115
|
+
* Steps are displayed horizontally.
|
|
116
|
+
*/
|
|
117
|
+
Horizontal = 'Horizontal',
|
|
118
|
+
/**
|
|
119
|
+
* Steps are displayed vertically.
|
|
120
|
+
*/
|
|
121
|
+
Vertical = 'Vertical'
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* StepperBase component act as base class to the stepper component.
|
|
126
|
+
*/
|
|
127
|
+
@NotifyPropertyChanges
|
|
128
|
+
export class StepperBase extends Component<HTMLElement> implements INotifyPropertyChanged {
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Defines the list of steps.
|
|
132
|
+
*
|
|
133
|
+
* @default []
|
|
134
|
+
*/
|
|
135
|
+
@Collection<StepModel[]>([], Step)
|
|
136
|
+
public steps: StepModel[];
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Defines the CSS class to customize the Stepper appearance.
|
|
140
|
+
*
|
|
141
|
+
* @default ''
|
|
142
|
+
*/
|
|
143
|
+
@Property('')
|
|
144
|
+
public cssClass: string;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Defines whether the read-only mode is enabled for a Stepper control, which means that the user will not be able to interact with it.
|
|
148
|
+
*
|
|
149
|
+
* @default false
|
|
150
|
+
*/
|
|
151
|
+
@Property(false)
|
|
152
|
+
public readOnly: boolean;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Defines the orientation type of the Stepper.
|
|
156
|
+
*
|
|
157
|
+
* The possible values are:
|
|
158
|
+
* * Horizontal
|
|
159
|
+
* * vertical
|
|
160
|
+
*
|
|
161
|
+
* @isenumeration true
|
|
162
|
+
* @default StepperOrientation.Horizontal
|
|
163
|
+
* @asptype StepperOrientation
|
|
164
|
+
*/
|
|
165
|
+
@Property(StepperOrientation.Horizontal)
|
|
166
|
+
public orientation: string | StepperOrientation;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Event callback that is raised after rendering the stepper.
|
|
170
|
+
*
|
|
171
|
+
* @event created
|
|
172
|
+
*/
|
|
173
|
+
@Event()
|
|
174
|
+
public created: EmitType<Event>;
|
|
175
|
+
|
|
176
|
+
/* protected variables */
|
|
177
|
+
protected progressStep: HTMLElement;
|
|
178
|
+
protected progressbar : HTMLElement;
|
|
179
|
+
protected progressBarPosition: number;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* * Constructor for Base class
|
|
183
|
+
*
|
|
184
|
+
* @param {StepperBaseModel} options - Specifies the Base model.
|
|
185
|
+
* @param {string | HTMLElement} element - Specifies the element to render as component.
|
|
186
|
+
* @private
|
|
187
|
+
*/
|
|
188
|
+
public constructor(options?: StepperBaseModel, element?: string | HTMLElement) {
|
|
189
|
+
super(options, element);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* This method is abstract member of the Component<HTMLElement>.
|
|
194
|
+
*
|
|
195
|
+
* @private
|
|
196
|
+
* @returns {void}
|
|
197
|
+
*/
|
|
198
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
199
|
+
protected preRender(): void {
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* This method is abstract member of the Component<HTMLElement>.
|
|
204
|
+
*
|
|
205
|
+
* @private
|
|
206
|
+
* @returns {string} - It returns the current module name.
|
|
207
|
+
*/
|
|
208
|
+
public getModuleName(): string {
|
|
209
|
+
return 'stepperBase';
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* This method is abstract member of the Component<HTMLElement>.
|
|
214
|
+
*
|
|
215
|
+
* @private
|
|
216
|
+
* @returns {string} - It returns the persisted data.
|
|
217
|
+
*/
|
|
218
|
+
protected getPersistData(): string {
|
|
219
|
+
return this.addOnPersist([]);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* This method is abstract member of the Component<HTMLElement>.
|
|
224
|
+
*
|
|
225
|
+
* @private
|
|
226
|
+
* @returns {void}
|
|
227
|
+
*/
|
|
228
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
229
|
+
protected render(): void {
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
protected updateOrientaion(wrapper: HTMLElement): void {
|
|
233
|
+
if (wrapper.classList.contains(HORIZSTEP) || wrapper.classList.contains(VERTICALSTEP)) {
|
|
234
|
+
wrapper.classList.remove(HORIZSTEP, VERTICALSTEP);
|
|
235
|
+
}
|
|
236
|
+
if (!(isNullOrUndefined(this.orientation))) {
|
|
237
|
+
wrapper.classList.add('e-' + this.orientation.toLocaleLowerCase());
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
protected renderProgressBar(wrapper: HTMLElement): void {
|
|
242
|
+
this.progressStep = this.createElement('div', { className: 'e-stepper-progressbar' });
|
|
243
|
+
this.progressbar = this.createElement('div', { className: 'e-progressbar-value' });
|
|
244
|
+
const beforeLabel: HTMLElement = (wrapper.querySelector('li').querySelector('.e-step-label-container'));
|
|
245
|
+
this.progressStep.appendChild(this.progressbar);
|
|
246
|
+
wrapper.prepend(this.progressStep);
|
|
247
|
+
this.progressbar.style.setProperty(PROGRESSVALUE, (0) + '%');
|
|
248
|
+
if (wrapper.classList.contains(VERTICALSTEP)) {
|
|
249
|
+
if (wrapper.classList.contains('e-label-bottom') || wrapper.classList.contains('e-label-top')) {
|
|
250
|
+
const stepsContainer: HTMLElement = (wrapper.querySelector('.' + ITEMLIST));
|
|
251
|
+
this.progressStep.style.setProperty(PROGRESSPOS, (stepsContainer.offsetWidth / 2) + 'px');
|
|
252
|
+
}
|
|
253
|
+
else { this.progressStep.style.setProperty(PROGRESSPOS, ((this.progressBarPosition / 2) - 1) + 'px'); }
|
|
254
|
+
}
|
|
255
|
+
if (beforeLabel && (beforeLabel.classList.contains('e-label-before'))) { this.progressStep.style.setProperty(PROGRESSPOS, (((this.progressBarPosition) - 1)) + 5 + 'px'); }
|
|
256
|
+
if (wrapper.classList.contains(HORIZSTEP)) { this.setProgressPosition(wrapper); }
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
protected setProgressPosition(wrapper: HTMLElement, isResize?: boolean): void {
|
|
260
|
+
const stepItemContainer: HTMLElement = (wrapper.querySelector('.e-step-container'));
|
|
261
|
+
const stepItemEle: HTMLElement = (stepItemContainer.firstElementChild as HTMLElement);
|
|
262
|
+
if (isResize !== true) {
|
|
263
|
+
let topPos: number = 0;
|
|
264
|
+
if (wrapper.classList.contains('e-label-before')) { topPos = ((stepItemContainer.offsetParent as HTMLElement).offsetHeight - (stepItemEle.offsetHeight / 2) - 1); }
|
|
265
|
+
else { topPos = (stepItemEle.offsetHeight / 2); }
|
|
266
|
+
this.progressStep.style.setProperty('--progress-top-position', topPos + 'px');
|
|
267
|
+
}
|
|
268
|
+
const lastEle: HTMLElement = wrapper.querySelector('.' + ITEMLIST).lastChild.firstChild as HTMLElement;
|
|
269
|
+
if (wrapper.classList.contains('e-rtl')) {
|
|
270
|
+
const leftPost: number = ((stepItemEle.offsetLeft + stepItemEle.offsetWidth) - (wrapper.querySelector('.' + ITEMLIST) as HTMLElement).offsetWidth);
|
|
271
|
+
this.progressStep.style.setProperty('--progress-left-position', Math.abs(leftPost) + 'px');
|
|
272
|
+
this.progressStep.style.setProperty('--progress-bar-width', Math.abs(lastEle.offsetLeft - stepItemEle.offsetLeft) + 'px');
|
|
273
|
+
} else {
|
|
274
|
+
this.progressStep.style.setProperty('--progress-left-position', (stepItemEle.offsetLeft + 1) + 'px');
|
|
275
|
+
this.progressStep.style.setProperty('--progress-bar-width', ((lastEle.offsetWidth + lastEle.offsetLeft - 2) - (stepItemEle.offsetLeft + 2)) + 'px');
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* This method is abstract member of the Component<HTMLElement>.
|
|
281
|
+
*
|
|
282
|
+
* @param {StepperBaseModel} newProp - Specifies new properties
|
|
283
|
+
* @param {StepperBaseModel} oldProp - Specifies old properties
|
|
284
|
+
* @private
|
|
285
|
+
* @returns {void}
|
|
286
|
+
*/
|
|
287
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
|
|
288
|
+
public onPropertyChanged(newProp: StepperBaseModel, oldProp: StepperBaseModel): void {
|
|
289
|
+
}
|
|
290
|
+
}
|