@sixbell-telco/sdk 0.8.0 → 0.10.0
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/CHANGELOG.md +32 -0
- package/README.md +27 -17
- package/components/button/src/button.component.d.ts +95 -3
- package/components/wizard/public-api.d.ts +2 -3
- package/components/wizard/services/wizard.service.d.ts +221 -0
- package/components/wizard/wizard-actions/wizard-actions.component.d.ts +8 -0
- package/components/wizard/wizard-content/wizard-content.component.d.ts +67 -13
- package/components/wizard/wizard-marker/wizard-marker.component.d.ts +73 -6
- package/components/wizard/wizard-step/wizard-step.component.d.ts +76 -9
- package/components/wizard/wizard-sub-step/wizard-sub-step.component.d.ts +91 -9
- package/components/wizard/wizard-wrapper/wizard-wrapper.component.d.ts +144 -15
- package/esm2022/components/button/src/button.component.mjs +118 -20
- package/esm2022/components/dual-list/src/dual-list.component.mjs +3 -3
- package/esm2022/components/forms/select/src/select.component.mjs +1 -8
- package/esm2022/components/forms/textarea/src/textarea.component.mjs +3 -3
- package/esm2022/components/wizard/public-api.mjs +3 -4
- package/esm2022/components/wizard/services/wizard.service.mjs +312 -0
- package/esm2022/components/wizard/wizard-actions/wizard-actions.component.mjs +22 -0
- package/esm2022/components/wizard/wizard-content/wizard-content.component.mjs +77 -23
- package/esm2022/components/wizard/wizard-marker/wizard-marker.component.mjs +81 -13
- package/esm2022/components/wizard/wizard-step/wizard-step.component.mjs +107 -25
- package/esm2022/components/wizard/wizard-sub-step/wizard-sub-step.component.mjs +113 -26
- package/esm2022/components/wizard/wizard-wrapper/wizard-wrapper.component.mjs +150 -66
- package/fesm2022/sixbell-telco-sdk-components-button.mjs +117 -19
- package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +0 -7
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +851 -150
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -125,6 +125,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
125
125
|
- Added support for first and last name initials display (3c0d6c1)
|
|
126
126
|
- Enhanced documentation with detailed JSDoc comments (fb3a3a3)
|
|
127
127
|
- Added new avatar variants and updated user properties (3c97379, 9322462)
|
|
128
|
+
- **Button Size Variants**: Add detailed size variants with enhanced documentation and customization options
|
|
129
|
+
- **Dynamic Icon Sizing**: Implement automatic icon sizing based on button dimensions
|
|
130
|
+
- **Wizard Components**
|
|
131
|
+
- Added `WizardActionsComponent` with alignment options for action buttons
|
|
132
|
+
- Added card style option to `wizard-wrapper` for layout flexibility
|
|
133
|
+
- Added icon binding support for `wizard-step` customization
|
|
134
|
+
- Added reactive validation integration in `wizard-content`
|
|
135
|
+
- Added translation support for step index display in navigation
|
|
136
|
+
- **Wizard Service**
|
|
137
|
+
- Implemented `gotoStep` method for direct step navigation
|
|
138
|
+
- Added `insertStep` method for inserting steps at specific indices
|
|
139
|
+
- Added computed properties for first/last step checks
|
|
140
|
+
- Introduced transition state management for step updates
|
|
128
141
|
|
|
129
142
|
### Fixed
|
|
130
143
|
|
|
@@ -175,6 +188,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
175
188
|
- Removed console log from wizard-marker component
|
|
176
189
|
- Eliminated commented-out code from input component
|
|
177
190
|
- Removed redundant font class from button component
|
|
191
|
+
- Removed unused exports from public API
|
|
192
|
+
- Removed redundant last-step completion logic
|
|
193
|
+
- Removed commented-out code in `select.component`
|
|
194
|
+
- Removed unused icon variable and delay classes
|
|
178
195
|
|
|
179
196
|
### Changed
|
|
180
197
|
|
|
@@ -462,3 +479,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
462
479
|
- Enhanced avatar variants and updated default properties (08bd845)
|
|
463
480
|
- Improved performance by converting getters to computed properties (44beb75)
|
|
464
481
|
- Updated user properties to use first and last initials (511e43c)
|
|
482
|
+
- **Button Component**:
|
|
483
|
+
- Enhance with comprehensive size variants and improved documentation
|
|
484
|
+
- Update containerClass to use computed property for better performance
|
|
485
|
+
- **Tailwind Config**: Update error and accent color values for improved consistency
|
|
486
|
+
- Enhanced JSDoc documentation for multiple components (`wizard-content`, `wizard-marker`, `wizard-step`, `wizard-sub-step`, `wizard-wrapper`, `wizard.service`)
|
|
487
|
+
- Updated examples for improved component clarity
|
|
488
|
+
- Improved wizard layout structure with variant-based rendering (horizontal/vertical)
|
|
489
|
+
- Optimized class logic for step indicators and status markers
|
|
490
|
+
- Enhanced button layout/spacing in `wizard-wrapper`
|
|
491
|
+
- Updated typography variants and hover colors for better UX
|
|
492
|
+
- Added background color to body and step elements for visibility
|
|
493
|
+
- Refactored step management to use computed properties
|
|
494
|
+
- Streamlined class binding logic across components
|
|
495
|
+
- Improved step status tracking with reactive updates
|
|
496
|
+
- Renamed completion event and variables for clarity (`step` → `stepIndex`)
|
package/README.md
CHANGED
|
@@ -100,6 +100,9 @@ module.exports = {
|
|
|
100
100
|
tertiary: 'rgba(var(--tertiary), <alpha-value>)',
|
|
101
101
|
'tertiary-content': 'rgba(var(--tertiary-content), <alpha-value>)',
|
|
102
102
|
'neutral-secondary': 'rgba(var(--neutral-secondary), <alpha-value>)',
|
|
103
|
+
'neutral-secondary-content': 'rgba(var(--neutral-secondary-content), <alpha-value>)',
|
|
104
|
+
'neutral-tertiary': 'rgba(var(--neutral-tertiary), <alpha-value>)',
|
|
105
|
+
'neutral-tertiary-content': 'rgba(var(--neutral-tertiary-content), <alpha-value>)',
|
|
103
106
|
'base-placeholder': 'rgba(var(--base-placeholder), <alpha-value>)',
|
|
104
107
|
'metrics-increase': 'rgba(var(--metrics-increase), <alpha-value>)',
|
|
105
108
|
'metrics-decrease': 'rgba(var(--metrics-decrease), <alpha-value>)',
|
|
@@ -164,7 +167,7 @@ module.exports = {
|
|
|
164
167
|
'success-content': '#134B02',
|
|
165
168
|
warning: '#DBD706',
|
|
166
169
|
'warning-content': '#5E5D02',
|
|
167
|
-
error: '#
|
|
170
|
+
error: '#FF4133',
|
|
168
171
|
'error-content': '#460A06',
|
|
169
172
|
// Custom colors
|
|
170
173
|
'--primary-gradient': '7, 90, 105',
|
|
@@ -172,17 +175,19 @@ module.exports = {
|
|
|
172
175
|
'--tertiary-content': '8, 8, 9',
|
|
173
176
|
'--neutral-secondary': '169, 170, 178',
|
|
174
177
|
'--neutral-secondary-content': '255, 255, 255',
|
|
178
|
+
'--neutral-tertiary': '255, 255, 255',
|
|
179
|
+
'--neutral-tertiary-content': '169, 170, 178',
|
|
175
180
|
'--base-placeholder': '101, 104, 108',
|
|
176
181
|
'--shadow-primary': '186, 185, 185, 0.40',
|
|
177
182
|
// Custom properties for metrics
|
|
178
183
|
'--metrics-increase': '46, 204, 113',
|
|
179
184
|
'--metrics-decrease': '231, 76, 60',
|
|
180
185
|
'--metrics-neutral': '127, 140, 141',
|
|
181
|
-
'--metrics-intensity-highest': '
|
|
182
|
-
'--metrics-intensity-high': '
|
|
183
|
-
'--metrics-intensity-medium': '
|
|
184
|
-
'--metrics-intensity-low': '
|
|
185
|
-
'--metrics-intensity-lowest': '
|
|
186
|
+
'--metrics-intensity-highest': '21, 161, 193',
|
|
187
|
+
'--metrics-intensity-high': '84, 166, 198',
|
|
188
|
+
'--metrics-intensity-medium': '90, 177, 197',
|
|
189
|
+
'--metrics-intensity-low': '128, 189, 203',
|
|
190
|
+
'--metrics-intensity-lowest': '149, 192, 201',
|
|
186
191
|
// Daisy UI utility variables
|
|
187
192
|
'--rounded-box': '1rem', // border radius rounded-box utility class, used in card and other large boxes
|
|
188
193
|
'--rounded-btn': '0.5rem', // border radius rounded-btn utility class, used in buttons and similar element
|
|
@@ -250,7 +255,7 @@ module.exports = {
|
|
|
250
255
|
'primary-content': '#ffffff',
|
|
251
256
|
secondary: '#5D5F69',
|
|
252
257
|
'secondary-content': '#FFFFFF',
|
|
253
|
-
accent: '#
|
|
258
|
+
accent: '#FF6B35',
|
|
254
259
|
'accent-content': '#1E1E1E',
|
|
255
260
|
neutral: '#616161',
|
|
256
261
|
'neutral-content': '#FFFFFF',
|
|
@@ -265,24 +270,26 @@ module.exports = {
|
|
|
265
270
|
warning: '#DBD706',
|
|
266
271
|
'warning-content': '#5E5D02',
|
|
267
272
|
error: '#FF4133',
|
|
268
|
-
'error-content': '#
|
|
273
|
+
'error-content': '#460A06',
|
|
269
274
|
// Custom colors
|
|
270
275
|
'--primary-gradient': '7, 90, 105',
|
|
271
276
|
'--tertiary': '161, 161, 161',
|
|
272
277
|
'--tertiary-content': '55, 56, 62',
|
|
273
278
|
'--neutral-secondary': '169, 170, 178',
|
|
274
279
|
'--neutral-secondary-content': '255, 255, 255',
|
|
280
|
+
'--neutral-tertiary': '255, 255, 255',
|
|
281
|
+
'--neutral-tertiary-content': '169, 170, 178',
|
|
275
282
|
'--base-placeholder': '178, 179, 81',
|
|
276
283
|
'--shadow-primary': '0, 0, 0, 0.40',
|
|
277
284
|
// Custom properties for metrics
|
|
278
285
|
'--metrics-increase': '46, 204, 113',
|
|
279
286
|
'--metrics-decrease': '231, 76, 60',
|
|
280
287
|
'--metrics-neutral': '127, 140, 141',
|
|
281
|
-
'--metrics-intensity-highest': '
|
|
282
|
-
'--metrics-intensity-high': '
|
|
283
|
-
'--metrics-intensity-medium': '
|
|
284
|
-
'--metrics-intensity-low': '
|
|
285
|
-
'--metrics-intensity-lowest': '
|
|
288
|
+
'--metrics-intensity-highest': '21, 161, 193',
|
|
289
|
+
'--metrics-intensity-high': '84, 166, 198',
|
|
290
|
+
'--metrics-intensity-medium': '90, 177, 197',
|
|
291
|
+
'--metrics-intensity-low': '128, 189, 203',
|
|
292
|
+
'--metrics-intensity-lowest': '149, 192, 201',
|
|
286
293
|
// Daisy UI utility variables
|
|
287
294
|
'--rounded-box': '1rem', // border radius rounded-box utility class, used in card and other large boxes
|
|
288
295
|
'--rounded-btn': '0.5rem', // border radius rounded-btn utility class, used in buttons and similar element
|
|
@@ -490,7 +497,8 @@ npm install @ngx-translate/core @ngx-translate/http-loader ngx-translate-multi-h
|
|
|
490
497
|
"back": "Back",
|
|
491
498
|
"previous": "Previous",
|
|
492
499
|
"end": "End",
|
|
493
|
-
"next": "Next"
|
|
500
|
+
"next": "Next",
|
|
501
|
+
"step": "Step {{index}}"
|
|
494
502
|
}
|
|
495
503
|
}
|
|
496
504
|
}
|
|
@@ -574,7 +582,8 @@ npm install @ngx-translate/core @ngx-translate/http-loader ngx-translate-multi-h
|
|
|
574
582
|
"back": "Atrás",
|
|
575
583
|
"previous": "Anterior",
|
|
576
584
|
"end": "Finalizar",
|
|
577
|
-
"next": "Siguiente"
|
|
585
|
+
"next": "Siguiente",
|
|
586
|
+
"step": "Paso {{index}}"
|
|
578
587
|
}
|
|
579
588
|
}
|
|
580
589
|
}
|
|
@@ -658,7 +667,8 @@ npm install @ngx-translate/core @ngx-translate/http-loader ngx-translate-multi-h
|
|
|
658
667
|
"back": "Voltar",
|
|
659
668
|
"previous": "Anterior",
|
|
660
669
|
"end": "Fim",
|
|
661
|
-
"next": "Próximo"
|
|
670
|
+
"next": "Próximo",
|
|
671
|
+
"step": "Etapa {{index}}"
|
|
662
672
|
}
|
|
663
673
|
}
|
|
664
674
|
}
|
|
@@ -747,4 +757,4 @@ For detailed component documentation, visit our [Storybook](https://storybook.js
|
|
|
747
757
|
|
|
748
758
|
## Last update
|
|
749
759
|
|
|
750
|
-
This file was last updated on February
|
|
760
|
+
This file was last updated on February 20th, 2025.
|
|
@@ -1,35 +1,127 @@
|
|
|
1
|
+
import { IconSizeProps } from '@sixbell-telco/sdk/components/icon';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
* Generates base button classes with style variants
|
|
6
|
+
*/
|
|
2
7
|
export declare const buttonComponent: (props?: ({
|
|
3
8
|
variant?: "primary" | "secondary" | "tertiary" | "accent" | "info" | "success" | "warning" | "error" | "icon" | null | undefined;
|
|
4
9
|
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
5
10
|
iconPosition?: "left" | "right" | null | undefined;
|
|
6
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
/** Possible button style variants */
|
|
7
13
|
export type ButtonVariantProps = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'icon' | null | undefined;
|
|
14
|
+
/** Possible button size variants */
|
|
8
15
|
export type ButtonSizeProps = 'xs' | 'sm' | 'md' | 'lg' | null | undefined;
|
|
16
|
+
/** Possible icon positions relative to button text */
|
|
9
17
|
export type ButtonIconPositionProps = 'left' | 'right' | null | undefined;
|
|
18
|
+
/** Configuration object for button styling variants */
|
|
10
19
|
export type ButtonProps = {
|
|
11
20
|
variant?: ButtonVariantProps;
|
|
12
21
|
size?: ButtonSizeProps;
|
|
13
22
|
iconPosition?: ButtonIconPositionProps;
|
|
14
23
|
};
|
|
15
|
-
|
|
24
|
+
/** Valid HTML button types */
|
|
25
|
+
export type HTMLButtonType = 'button' | 'submit' | 'reset';
|
|
26
|
+
/**
|
|
27
|
+
* A customizable button component with multiple variants and icon support
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Built with Tailwind CSS and class-variance-authority for style management.
|
|
31
|
+
* Supports various styling variants, sizes, icon positions, and state modifiers.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```html
|
|
35
|
+
* <st-button
|
|
36
|
+
* variant="primary"
|
|
37
|
+
* size="md"
|
|
38
|
+
* icon="check"
|
|
39
|
+
* iconPosition="left"
|
|
40
|
+
* >
|
|
41
|
+
* Submit
|
|
42
|
+
* </st-button>
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
16
45
|
export declare class ButtonComponent {
|
|
46
|
+
/**
|
|
47
|
+
* Button style variant
|
|
48
|
+
* @defaultValue 'primary'
|
|
49
|
+
*/
|
|
17
50
|
variant: import("@angular/core").InputSignal<ButtonVariantProps>;
|
|
51
|
+
/**
|
|
52
|
+
* Ghost button style (transparent background)
|
|
53
|
+
* @defaultValue false
|
|
54
|
+
*/
|
|
18
55
|
ghost: import("@angular/core").InputSignal<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Outline button style (border with transparent fill)
|
|
58
|
+
* @defaultValue false
|
|
59
|
+
*/
|
|
19
60
|
outline: import("@angular/core").InputSignal<boolean>;
|
|
61
|
+
/**
|
|
62
|
+
* Circular button shape
|
|
63
|
+
* @defaultValue false
|
|
64
|
+
*/
|
|
20
65
|
circle: import("@angular/core").InputSignal<boolean>;
|
|
66
|
+
/**
|
|
67
|
+
* Square button shape
|
|
68
|
+
* @defaultValue false
|
|
69
|
+
*/
|
|
21
70
|
square: import("@angular/core").InputSignal<boolean>;
|
|
71
|
+
/**
|
|
72
|
+
* Glass effect styling
|
|
73
|
+
* @defaultValue false
|
|
74
|
+
*/
|
|
22
75
|
glass: import("@angular/core").InputSignal<boolean>;
|
|
76
|
+
/**
|
|
77
|
+
* Full-width button
|
|
78
|
+
* @defaultValue false
|
|
79
|
+
*/
|
|
23
80
|
block: import("@angular/core").InputSignal<boolean>;
|
|
81
|
+
/**
|
|
82
|
+
* Show loading spinner
|
|
83
|
+
* @defaultValue false
|
|
84
|
+
*/
|
|
24
85
|
loader: import("@angular/core").InputSignal<boolean>;
|
|
86
|
+
/**
|
|
87
|
+
* Button size variant
|
|
88
|
+
* @defaultValue 'md'
|
|
89
|
+
*/
|
|
25
90
|
size: import("@angular/core").InputSignal<ButtonSizeProps>;
|
|
91
|
+
/**
|
|
92
|
+
* Add drop shadow
|
|
93
|
+
* @defaultValue false
|
|
94
|
+
*/
|
|
26
95
|
shadow: import("@angular/core").InputSignal<boolean>;
|
|
96
|
+
/**
|
|
97
|
+
* Icon name (from icon library)
|
|
98
|
+
*/
|
|
27
99
|
icon: import("@angular/core").InputSignal<string | undefined>;
|
|
100
|
+
/**
|
|
101
|
+
* Position of icon relative to text
|
|
102
|
+
* @defaultValue 'left'
|
|
103
|
+
*/
|
|
28
104
|
iconPosition: import("@angular/core").InputSignal<ButtonIconPositionProps>;
|
|
105
|
+
/**
|
|
106
|
+
* HTML button type attribute
|
|
107
|
+
* @defaultValue 'button'
|
|
108
|
+
*/
|
|
29
109
|
type: import("@angular/core").InputSignal<HTMLButtonType>;
|
|
110
|
+
/**
|
|
111
|
+
* Disabled state
|
|
112
|
+
* @defaultValue false
|
|
113
|
+
*/
|
|
30
114
|
disabled: import("@angular/core").InputSignal<boolean>;
|
|
31
|
-
|
|
115
|
+
/**
|
|
116
|
+
* @internal
|
|
117
|
+
* Computed class string for the button container
|
|
118
|
+
*/
|
|
119
|
+
containerClass: import("@angular/core").Signal<string>;
|
|
120
|
+
/**
|
|
121
|
+
* @internal
|
|
122
|
+
* Computed icon size based on button size
|
|
123
|
+
*/
|
|
124
|
+
iconSize: import("@angular/core").Signal<IconSizeProps>;
|
|
32
125
|
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
33
126
|
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "st-button", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "ghost": { "alias": "ghost"; "required": false; "isSignal": true; }; "outline": { "alias": "outline"; "required": false; "isSignal": true; }; "circle": { "alias": "circle"; "required": false; "isSignal": true; }; "square": { "alias": "square"; "required": false; "isSignal": true; }; "glass": { "alias": "glass"; "required": false; "isSignal": true; }; "block": { "alias": "block"; "required": false; "isSignal": true; }; "loader": { "alias": "loader"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
34
127
|
}
|
|
35
|
-
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
+
export * from './services/wizard.service';
|
|
2
|
+
export * from './wizard-actions/wizard-actions.component';
|
|
1
3
|
export * from './wizard-content/wizard-content.component';
|
|
2
|
-
export * from './wizard-marker/wizard-marker.component';
|
|
3
|
-
export * from './wizard-step/wizard-step.component';
|
|
4
|
-
export * from './wizard-sub-step/wizard-sub-step.component';
|
|
5
4
|
export * from './wizard-wrapper/wizard-wrapper.component';
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Enum-like object representing possible wizard step statuses
|
|
4
|
+
* @readonly
|
|
5
|
+
* @enum {string}
|
|
6
|
+
*/
|
|
7
|
+
export declare const WIZARD_STEP_STATUS: {
|
|
8
|
+
readonly IN_PROGRESS: "in progress";
|
|
9
|
+
readonly PENDING: "pending";
|
|
10
|
+
readonly COMPLETED: "completed";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Configuration object for a wizard step
|
|
14
|
+
* @property {string} name - Unique identifier for the step
|
|
15
|
+
* @property {(typeof WIZARD_STEP_STATUS)[keyof typeof WIZARD_STEP_STATUS]} status - Current status of the step
|
|
16
|
+
* @property {boolean} isValid - Indicates if the step's data is valid
|
|
17
|
+
* @property {string} label - Display text for the step
|
|
18
|
+
* @property {string} [icon] - Optional icon for the step
|
|
19
|
+
*/
|
|
20
|
+
export type WizardStepConfig = {
|
|
21
|
+
name: string;
|
|
22
|
+
status: (typeof WIZARD_STEP_STATUS)[keyof typeof WIZARD_STEP_STATUS];
|
|
23
|
+
isValid: boolean;
|
|
24
|
+
label: string;
|
|
25
|
+
icon?: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Simplified step definition without status and validation
|
|
29
|
+
* @property {string} name - Unique identifier for the step
|
|
30
|
+
* @property {string} label - Display text for the step
|
|
31
|
+
* @property {string} [icon] - Optional icon for the step
|
|
32
|
+
*/
|
|
33
|
+
export type WizardStep = Omit<WizardStepConfig, 'status' | 'isValid'>;
|
|
34
|
+
/**
|
|
35
|
+
* Union type of possible wizard step status values
|
|
36
|
+
*/
|
|
37
|
+
export type WizardStepStatus = (typeof WIZARD_STEP_STATUS)[keyof typeof WIZARD_STEP_STATUS];
|
|
38
|
+
/**
|
|
39
|
+
* Service for managing wizard state and navigation
|
|
40
|
+
* @Injectable
|
|
41
|
+
*/
|
|
42
|
+
export declare class WizardService {
|
|
43
|
+
/** @private Internal signal for wizard steps */
|
|
44
|
+
private _steps;
|
|
45
|
+
/** @private Internal signal for current step index */
|
|
46
|
+
private _currentStepIndex;
|
|
47
|
+
/** @private Internal signal for first step index */
|
|
48
|
+
private _fistStepIndex;
|
|
49
|
+
/** @private Internal signal for last step index */
|
|
50
|
+
private _lastStepIndex;
|
|
51
|
+
/** @private Internal signal for transition state */
|
|
52
|
+
private _isTransitioning;
|
|
53
|
+
/** Readonly array of wizard steps */
|
|
54
|
+
steps: import("@angular/core").Signal<WizardStepConfig[]>;
|
|
55
|
+
/**
|
|
56
|
+
* Current step index
|
|
57
|
+
* @readonly
|
|
58
|
+
*/
|
|
59
|
+
currentStepIndex: import("@angular/core").Signal<number>;
|
|
60
|
+
/**
|
|
61
|
+
* Currently active step
|
|
62
|
+
* @readonly
|
|
63
|
+
*/
|
|
64
|
+
currentStep: import("@angular/core").Signal<WizardStepConfig>;
|
|
65
|
+
/**
|
|
66
|
+
* Array of valid steps
|
|
67
|
+
* @readonly
|
|
68
|
+
*/
|
|
69
|
+
validSteps: import("@angular/core").Signal<WizardStepConfig[]>;
|
|
70
|
+
/**
|
|
71
|
+
* Indicates if all steps are valid
|
|
72
|
+
* @readonly
|
|
73
|
+
*/
|
|
74
|
+
areAllStepsValid: import("@angular/core").Signal<boolean>;
|
|
75
|
+
/**
|
|
76
|
+
* First step index
|
|
77
|
+
* @readonly
|
|
78
|
+
*/
|
|
79
|
+
fistStepIndex: import("@angular/core").Signal<number>;
|
|
80
|
+
/**
|
|
81
|
+
* First step in the wizard
|
|
82
|
+
* @readonly
|
|
83
|
+
*/
|
|
84
|
+
firstStep: import("@angular/core").Signal<WizardStepConfig>;
|
|
85
|
+
/**
|
|
86
|
+
* Last step index
|
|
87
|
+
* @readonly
|
|
88
|
+
*/
|
|
89
|
+
lastStepIndex: import("@angular/core").Signal<number>;
|
|
90
|
+
/**
|
|
91
|
+
* Last step in the wizard
|
|
92
|
+
* @readonly
|
|
93
|
+
*/
|
|
94
|
+
lastStep: import("@angular/core").Signal<WizardStepConfig>;
|
|
95
|
+
/**
|
|
96
|
+
* Completed steps
|
|
97
|
+
* @readonly
|
|
98
|
+
*/
|
|
99
|
+
completedSteps: import("@angular/core").Signal<WizardStepConfig[]>;
|
|
100
|
+
/**
|
|
101
|
+
* Pending steps
|
|
102
|
+
* @readonly
|
|
103
|
+
*/
|
|
104
|
+
pendingSteps: import("@angular/core").Signal<WizardStepConfig[]>;
|
|
105
|
+
/**
|
|
106
|
+
* In-progress steps
|
|
107
|
+
* @readonly
|
|
108
|
+
*/
|
|
109
|
+
inProgressSteps: import("@angular/core").Signal<WizardStepConfig[]>;
|
|
110
|
+
/**
|
|
111
|
+
* Indicates if all steps are completed
|
|
112
|
+
* @readonly
|
|
113
|
+
*/
|
|
114
|
+
isCompleted: import("@angular/core").Signal<boolean>;
|
|
115
|
+
/**
|
|
116
|
+
* Indicates if current step is the first step
|
|
117
|
+
* @readonly
|
|
118
|
+
*/
|
|
119
|
+
isCurrentStepFirst: import("@angular/core").Signal<boolean>;
|
|
120
|
+
/**
|
|
121
|
+
* Indicates if current step is the last step
|
|
122
|
+
* @readonly
|
|
123
|
+
*/
|
|
124
|
+
isCurrentStepLast: import("@angular/core").Signal<boolean>;
|
|
125
|
+
/**
|
|
126
|
+
* Indicates if wizard is transitioning between steps
|
|
127
|
+
* @readonly
|
|
128
|
+
*/
|
|
129
|
+
isTransitioning: import("@angular/core").Signal<boolean>;
|
|
130
|
+
/**
|
|
131
|
+
* Initializes the wizard with given steps
|
|
132
|
+
* @param {WizardStep[]} steps - Array of step configurations
|
|
133
|
+
*/
|
|
134
|
+
init(steps: WizardStep[]): void;
|
|
135
|
+
/**
|
|
136
|
+
* Replaces all steps with new configuration
|
|
137
|
+
* @param {WizardStepConfig[]} steps - New array of step configurations
|
|
138
|
+
*/
|
|
139
|
+
setSteps(steps: WizardStepConfig[]): void;
|
|
140
|
+
/**
|
|
141
|
+
* Adds a new step to the end of the wizard
|
|
142
|
+
* @param {WizardStepConfig} step - Step configuration to add
|
|
143
|
+
*/
|
|
144
|
+
addStep(step: WizardStepConfig): void;
|
|
145
|
+
/**
|
|
146
|
+
* Inserts a step at specific index
|
|
147
|
+
* @param {number} index - Position to insert the step
|
|
148
|
+
* @param {WizardStepConfig} step - Step configuration to add
|
|
149
|
+
*/
|
|
150
|
+
addStepAtIndex(index: number, step: WizardStepConfig): void;
|
|
151
|
+
/**
|
|
152
|
+
* Removes step at specified index
|
|
153
|
+
* @param {number} index - Index of step to remove
|
|
154
|
+
*/
|
|
155
|
+
removeStep(index: number): void;
|
|
156
|
+
/**
|
|
157
|
+
* Updates name of step at specified index
|
|
158
|
+
* @param {number} index - Index of step to update
|
|
159
|
+
* @param {string} name - New name for the step
|
|
160
|
+
*/
|
|
161
|
+
updateStepName(index: number, name: string): void;
|
|
162
|
+
/**
|
|
163
|
+
* Updates label of step at specified index
|
|
164
|
+
* @param {number} index - Index of step to update
|
|
165
|
+
* @param {string} label - New label for the step
|
|
166
|
+
*/
|
|
167
|
+
updateStepLabel(index: number, label: string): void;
|
|
168
|
+
/**
|
|
169
|
+
* Updates status of step at specified index
|
|
170
|
+
* @param {number} index - Index of step to update
|
|
171
|
+
* @param {WizardStepStatus} status - New status for the step
|
|
172
|
+
* @param {number} [stale] - Optional delay in milliseconds before applying changes
|
|
173
|
+
*/
|
|
174
|
+
updateStepStatus(index: number, status: WizardStepStatus, stale?: number): void;
|
|
175
|
+
/**
|
|
176
|
+
* Updates validation status of step at specified index
|
|
177
|
+
* @param {number} index - Index of step to update
|
|
178
|
+
* @param {boolean} isValid - New validation status
|
|
179
|
+
*/
|
|
180
|
+
updateStepIsValid(index: number, isValid: boolean): void;
|
|
181
|
+
/**
|
|
182
|
+
* Replaces entire step configuration at specified index
|
|
183
|
+
* @param {number} index - Index of step to replace
|
|
184
|
+
* @param {WizardStepConfig} step - New step configuration
|
|
185
|
+
*/
|
|
186
|
+
updateStep(index: number, step: WizardStepConfig): void;
|
|
187
|
+
/**
|
|
188
|
+
* Sets current active step index
|
|
189
|
+
* @param {number} index - New current step index
|
|
190
|
+
*/
|
|
191
|
+
setCurrentStepIndex(index: number): void;
|
|
192
|
+
/**
|
|
193
|
+
* Sets index for first step in wizard
|
|
194
|
+
* @param {number} index - New first step index
|
|
195
|
+
*/
|
|
196
|
+
setFistStepIndex(index: number): void;
|
|
197
|
+
/**
|
|
198
|
+
* Sets index for last step in wizard
|
|
199
|
+
* @param {number} index - New last step index
|
|
200
|
+
*/
|
|
201
|
+
setLastStepIndex(index: number): void;
|
|
202
|
+
/**
|
|
203
|
+
* Navigates to next valid step
|
|
204
|
+
*/
|
|
205
|
+
nextStep(): void;
|
|
206
|
+
/**
|
|
207
|
+
* Navigates to previous step
|
|
208
|
+
*/
|
|
209
|
+
previousStep(): void;
|
|
210
|
+
/**
|
|
211
|
+
* Jumps to specified step index
|
|
212
|
+
* @param {number} index - Target step index to navigate to
|
|
213
|
+
*/
|
|
214
|
+
gotoStep(index: number): void;
|
|
215
|
+
/**
|
|
216
|
+
* Resets wizard to initial state
|
|
217
|
+
*/
|
|
218
|
+
reset(): void;
|
|
219
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WizardService, never>;
|
|
220
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WizardService>;
|
|
221
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export type WizardActionsAligmentProps = 'left' | 'right' | 'center';
|
|
3
|
+
export declare class WizardActionsComponent {
|
|
4
|
+
alignment: import("@angular/core").InputSignal<WizardActionsAligmentProps>;
|
|
5
|
+
get componentClass(): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WizardActionsComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WizardActionsComponent, "st-wizard-actions", never, { "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
8
|
+
}
|
|
@@ -1,18 +1,72 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WizardService } from '../services/wizard.service';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Component wrapper for individual wizard step content with validation integration.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Manages content visibility and validation state synchronization with the wizard service.
|
|
8
|
+
* Automatically handles:
|
|
9
|
+
* - Step activation status
|
|
10
|
+
* - Validation state propagation
|
|
11
|
+
* - Fade animations
|
|
12
|
+
* - Destruction cleanup
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```html
|
|
16
|
+
* <st-wizard-content
|
|
17
|
+
* [stepIndex]="0"
|
|
18
|
+
* [isValid]="form.valid"
|
|
19
|
+
* >
|
|
20
|
+
* <!-- Step content -->
|
|
21
|
+
* </st-wizard-content>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
4
24
|
export declare class WizardContentComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
25
|
+
/** @internal Injected wizard state service */
|
|
26
|
+
wizardService: WizardService;
|
|
27
|
+
/**
|
|
28
|
+
* Position index in the wizard sequence (0-based)
|
|
29
|
+
* @default 0
|
|
30
|
+
*/
|
|
31
|
+
stepIndex: import("@angular/core").InputSignal<number>;
|
|
32
|
+
/**
|
|
33
|
+
* Current validation state of the step
|
|
34
|
+
* @default false
|
|
35
|
+
* @remarks Updates wizard service automatically when changed
|
|
36
|
+
*/
|
|
37
|
+
isValid: import("@angular/core").InputSignal<boolean>;
|
|
38
|
+
/**
|
|
39
|
+
* Computed status from wizard service
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
status: import("@angular/core").Signal<"in progress" | "pending" | "completed">;
|
|
43
|
+
/**
|
|
44
|
+
* Observable version of isValid input
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
private isValid$;
|
|
48
|
+
/**
|
|
49
|
+
* Current active step index from service
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
12
52
|
currentStep: import("@angular/core").Signal<number>;
|
|
53
|
+
/**
|
|
54
|
+
* Checks if this content's step is currently active
|
|
55
|
+
* @returns {boolean} True if stepIndex matches current active step
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
13
58
|
isStepActive: import("@angular/core").Signal<boolean>;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Computed CSS classes for content container
|
|
61
|
+
* @returns {string} Animation classes
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
componentClass: import("@angular/core").Signal<string>;
|
|
65
|
+
/**
|
|
66
|
+
* Sets up validation state synchronization
|
|
67
|
+
* @remarks Uses takeUntilDestroyed for automatic cleanup
|
|
68
|
+
*/
|
|
69
|
+
constructor();
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WizardContentComponent, never>;
|
|
71
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WizardContentComponent, "st-wizard-content", never, { "stepIndex": { "alias": "stepIndex"; "required": false; "isSignal": true; }; "isValid": { "alias": "isValid"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
18
72
|
}
|