@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.
Files changed (34) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +27 -17
  3. package/components/button/src/button.component.d.ts +95 -3
  4. package/components/wizard/public-api.d.ts +2 -3
  5. package/components/wizard/services/wizard.service.d.ts +221 -0
  6. package/components/wizard/wizard-actions/wizard-actions.component.d.ts +8 -0
  7. package/components/wizard/wizard-content/wizard-content.component.d.ts +67 -13
  8. package/components/wizard/wizard-marker/wizard-marker.component.d.ts +73 -6
  9. package/components/wizard/wizard-step/wizard-step.component.d.ts +76 -9
  10. package/components/wizard/wizard-sub-step/wizard-sub-step.component.d.ts +91 -9
  11. package/components/wizard/wizard-wrapper/wizard-wrapper.component.d.ts +144 -15
  12. package/esm2022/components/button/src/button.component.mjs +118 -20
  13. package/esm2022/components/dual-list/src/dual-list.component.mjs +3 -3
  14. package/esm2022/components/forms/select/src/select.component.mjs +1 -8
  15. package/esm2022/components/forms/textarea/src/textarea.component.mjs +3 -3
  16. package/esm2022/components/wizard/public-api.mjs +3 -4
  17. package/esm2022/components/wizard/services/wizard.service.mjs +312 -0
  18. package/esm2022/components/wizard/wizard-actions/wizard-actions.component.mjs +22 -0
  19. package/esm2022/components/wizard/wizard-content/wizard-content.component.mjs +77 -23
  20. package/esm2022/components/wizard/wizard-marker/wizard-marker.component.mjs +81 -13
  21. package/esm2022/components/wizard/wizard-step/wizard-step.component.mjs +107 -25
  22. package/esm2022/components/wizard/wizard-sub-step/wizard-sub-step.component.mjs +113 -26
  23. package/esm2022/components/wizard/wizard-wrapper/wizard-wrapper.component.mjs +150 -66
  24. package/fesm2022/sixbell-telco-sdk-components-button.mjs +117 -19
  25. package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
  26. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +2 -2
  27. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
  28. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +0 -7
  29. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
  30. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +2 -2
  31. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
  32. package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +851 -150
  33. package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
  34. package/package.json +1 -1
@@ -1,17 +1,84 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { TranslateService } from '@ngx-translate/core';
3
- import { WizardContentComponent } from '../wizard-content/wizard-content.component';
3
+ import { WizardService, WizardStepStatus } from '../services/wizard.service';
4
4
  import * as i0 from "@angular/core";
5
+ /**
6
+ * Component that displays a status badge for wizard steps with translated labels.
7
+ *
8
+ * @remarks
9
+ * Shows visual indicators for different step states with automatic translations.
10
+ * Supports three status types with corresponding styling:
11
+ * - Completed (green background)
12
+ * - In progress (neutral border)
13
+ * - Pending (dimmed appearance)
14
+ *
15
+ * Uses NGX-Translate for localization of status labels.
16
+ *
17
+ * @example
18
+ * ```html
19
+ * <!-- Completed state -->
20
+ * <st-wizard-marker [status]="'completed'"></st-wizard-marker>
21
+ *
22
+ * <!-- In progress state -->
23
+ * <st-wizard-marker [status]="'in progress'"></st-wizard-marker>
24
+ * ```
25
+ */
5
26
  export declare class WizardMarkerComponent implements OnInit {
27
+ /** @internal Translation service instance */
6
28
  translateService: TranslateService;
29
+ /** @internal Wizard state service */
30
+ wizardService: WizardService;
31
+ /**
32
+ * Current status of the associated wizard step
33
+ * @remarks Determines badge styling and label
34
+ */
35
+ status: import("@angular/core").InputSignal<WizardStepStatus>;
36
+ /**
37
+ * Computed translated status message
38
+ * @internal
39
+ */
40
+ statusMarkerMessage: import("@angular/core").Signal<string>;
41
+ /**
42
+ * Computed CSS classes for the status badge
43
+ * @internal
44
+ */
45
+ statusMarkerClasses: import("@angular/core").Signal<string>;
46
+ /** @internal Signal holding translated "completed" text */
7
47
  completed: import("@angular/core").WritableSignal<string>;
48
+ /** @internal Signal holding translated "in progress" text */
8
49
  inProgress: import("@angular/core").WritableSignal<string>;
50
+ /** @internal Signal holding translated "pending" text */
9
51
  pending: import("@angular/core").WritableSignal<string>;
10
- content: import("@angular/core").InputSignal<WizardContentComponent>;
52
+ /** @internal Base CSS classes for the marker */
53
+ private baseClasses;
54
+ /** @internal Status-to-class mapping */
55
+ private statusClassMap;
56
+ /**
57
+ * Initializes component translations
58
+ * @remarks Loads translated status labels using NGX-Translate
59
+ */
11
60
  ngOnInit(): void;
12
- getStatusMarkerMessage(content: WizardContentComponent): string;
13
- getStepStatusMarkerClasses(content: WizardContentComponent): string;
14
- initTranslatations(): void;
61
+ /**
62
+ * Gets the appropriate translated status message
63
+ * @returns {string} Translated status label
64
+ * @internal
65
+ */
66
+ private getStatusMarkerMessage;
67
+ /**
68
+ * Computes CSS classes based on current status
69
+ * @returns {string} Combined Tailwind classes
70
+ * @internal
71
+ */
72
+ private getStepStatusMarkerClasses;
73
+ /**
74
+ * Initializes translations for status labels
75
+ * @remarks Uses translation keys:
76
+ * - 'sdk.wizard.wizardMarker.completed'
77
+ * - 'sdk.wizard.wizardMarker.inProgress'
78
+ * - 'sdk.wizard.wizardMarker.pending'
79
+ * @internal
80
+ */
81
+ private initTranslatations;
15
82
  static ɵfac: i0.ɵɵFactoryDeclaration<WizardMarkerComponent, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<WizardMarkerComponent, "st-wizard-marker", never, { "content": { "alias": "content"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
83
+ static ɵcmp: i0.ɵɵComponentDeclaration<WizardMarkerComponent, "st-wizard-marker", never, { "status": { "alias": "status"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
17
84
  }
@@ -1,16 +1,83 @@
1
- import { WizardContentComponent, WizardStepStatus } from '../wizard-content/wizard-content.component';
1
+ import { WizardService, WizardStepStatus } from '../services/wizard.service';
2
2
  import * as i0 from "@angular/core";
3
+ /**
4
+ * Visual indicator component for individual wizard steps with status-dependent styling and animations.
5
+ *
6
+ * @remarks
7
+ * Displays step progress through dynamic border and background colors. Supports three states:
8
+ * - Completed (checkmark icon)
9
+ * - In progress (highlighted border)
10
+ * - Pending (dimmed appearance)
11
+ *
12
+ * Uses Angular signals for optimized change detection and smooth transitions.
13
+ *
14
+ * @example
15
+ * ```html
16
+ * <!-- Completed step with custom icon -->
17
+ * <st-wizard-step
18
+ * [stepIndex]="1"
19
+ * [status]="'completed'"
20
+ * icon="user-profile"
21
+ * ></st-wizard-step>
22
+ *
23
+ * <!-- Current active step -->
24
+ * <st-wizard-step
25
+ * [stepIndex]="2"
26
+ * [status]="'in progress'"
27
+ * ></st-wizard-step>
28
+ * ```
29
+ */
3
30
  export declare class WizardStepComponent {
31
+ /** @internal Injected wizard state service */
32
+ wizardService: WizardService;
33
+ /**
34
+ * Optional custom icon name for completed state
35
+ * @default undefined (uses checkmark)
36
+ */
37
+ icon: import("@angular/core").InputSignal<string | undefined>;
38
+ /**
39
+ * Current progress status of the step
40
+ * @remarks Determines visual state and transitions
41
+ */
4
42
  status: import("@angular/core").InputSignal<WizardStepStatus>;
5
- content: import("@angular/core").InputSignal<WizardContentComponent>;
6
- currentStep: import("@angular/core").InputSignal<number>;
7
- icon: string;
8
- getStepClasses(currentStep: number, content: WizardContentComponent): {
43
+ /**
44
+ * Position in wizard sequence (0-based index)
45
+ * @remarks Used for current step comparison
46
+ */
47
+ stepIndex: import("@angular/core").InputSignal<number>;
48
+ /** @internal Predefined checkmark icon */
49
+ iconCheck: string;
50
+ /**
51
+ * Computed CSS classes for step containers
52
+ * @returns {Object} Classes for outer/inner elements
53
+ * @remarks Applies:
54
+ * - 300ms color transitions
55
+ * - 300ms delay for pending states
56
+ * - Primary colors for active/completed states
57
+ * @internal
58
+ */
59
+ stepClasses: import("@angular/core").Signal<{
9
60
  outerClasses: string;
10
61
  innerClasses: string;
11
- };
12
- get stepNumberClasses(): string;
13
- get stepIconClasses(): string;
62
+ }>;
63
+ /**
64
+ * Step number visibility classes
65
+ * @returns {string} Tailwind classes with fade animation
66
+ * @remarks
67
+ * - Hidden when completed
68
+ * - 350ms fade-in delay for smooth transitions
69
+ * @internal
70
+ */
71
+ stepNumberClasses: import("@angular/core").Signal<string>;
72
+ /**
73
+ * Completion icon visibility classes
74
+ * @returns {string} Tailwind classes with fade animation
75
+ * @remarks
76
+ * - Only visible when completed
77
+ * - 350ms fade-in delay for smooth transition
78
+ * @internal
79
+ */
80
+ stepIconClasses: import("@angular/core").Signal<string>;
14
81
  static ɵfac: i0.ɵɵFactoryDeclaration<WizardStepComponent, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<WizardStepComponent, "st-wizard-step", never, { "status": { "alias": "status"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": true; "isSignal": true; }; "currentStep": { "alias": "currentStep"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
82
+ static ɵcmp: i0.ɵɵComponentDeclaration<WizardStepComponent, "st-wizard-step", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": true; "isSignal": true; }; "stepIndex": { "alias": "stepIndex"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
16
83
  }
@@ -1,13 +1,95 @@
1
- import { WizardContentComponent } from '../wizard-content/wizard-content.component';
1
+ import { WizardService } from '../services/wizard.service';
2
2
  import * as i0 from "@angular/core";
3
+ /**
4
+ * Layout variants for the sub-step connector
5
+ * @typedef {'vertical' | 'horizontal'} WizardSubStepVariantProps
6
+ */
7
+ export type WizardSubStepVariantProps = 'vertical' | 'horizontal';
8
+ /**
9
+ * A component that visualizes the connection between wizard steps with animated progress indicators.
10
+ *
11
+ * @remarks
12
+ * Handles both horizontal and vertical layouts with status-dependent animations. Manages three segments:
13
+ * - Left connector (before the step)
14
+ * - Center indicator (current step marker)
15
+ * - Right connector (after the step)
16
+ *
17
+ * @example
18
+ * ```html
19
+ * <!-- Horizontal sub-step -->
20
+ * <st-wizard-sub-step
21
+ * [stepIndex]="1"
22
+ * [stepStatus]="'completed'"
23
+ * ></st-wizard-sub-step>
24
+ *
25
+ * <!-- Vertical sub-step -->
26
+ * <st-wizard-sub-step
27
+ * variant="vertical"
28
+ * [stepIndex]="2"
29
+ * [stepStatus]="'in progress'"
30
+ * ></st-wizard-sub-step>
31
+ * ```
32
+ */
3
33
  export declare class WizardSubStepComponent {
4
- content: import("@angular/core").InputSignal<WizardContentComponent>;
5
- currentStep: import("@angular/core").InputSignal<number>;
6
- getSubStepClasses(currentStep: number, content: WizardContentComponent): {
7
- leftClasses: string;
8
- centerClasses: string;
9
- rightClasses: string;
10
- };
34
+ /**
35
+ * Layout direction for the sub-step connectors
36
+ * @default 'horizontal'
37
+ */
38
+ variant: import("@angular/core").InputSignal<WizardSubStepVariantProps>;
39
+ /** @internal Injected wizard state service */
40
+ wizardService: WizardService;
41
+ /**
42
+ * Index of the parent step in the wizard sequence
43
+ * @remarks Required for position calculation
44
+ */
45
+ stepIndex: import("@angular/core").InputSignal<number>;
46
+ /**
47
+ * Current status of the associated wizard step
48
+ * @remarks Determines visual state and animations
49
+ */
50
+ stepStatus: import("@angular/core").InputSignal<"in progress" | "pending" | "completed">;
51
+ /**
52
+ * Checks if this sub-step's index matches the current active step
53
+ * @returns {boolean} True if this is the active step
54
+ * @internal
55
+ */
56
+ isCurrentStep: import("@angular/core").Signal<boolean>;
57
+ /**
58
+ * Computed classes for horizontal left connector segment
59
+ * @returns {string} Tailwind classes with animated width transition
60
+ * @internal
61
+ */
62
+ horizontalLeftClasses: import("@angular/core").Signal<string>;
63
+ /**
64
+ * Computed classes for horizontal center indicator
65
+ * @returns {string} Tailwind classes with color transition delays
66
+ * @internal
67
+ */
68
+ horizontalCenterClasses: import("@angular/core").Signal<string>;
69
+ /**
70
+ * Computed classes for horizontal right connector segment
71
+ * @returns {string} Tailwind classes with completion-based width
72
+ * @internal
73
+ */
74
+ horizontalRightClasses: import("@angular/core").Signal<string>;
75
+ /**
76
+ * Computed classes for vertical left connector segment
77
+ * @returns {string} Tailwind classes with animated height transition
78
+ * @internal
79
+ */
80
+ verticalLeftClasses: import("@angular/core").Signal<string>;
81
+ /**
82
+ * Computed classes for vertical center indicator
83
+ * @returns {string} Tailwind classes with color transition logic
84
+ * @internal
85
+ */
86
+ verticalCenterClasses: import("@angular/core").Signal<string>;
87
+ /**
88
+ * Computed classes for vertical right connector segment
89
+ * @returns {string} Tailwind classes with completion-based height
90
+ * @internal
91
+ */
92
+ verticalRightClasses: import("@angular/core").Signal<string>;
11
93
  static ɵfac: i0.ɵɵFactoryDeclaration<WizardSubStepComponent, never>;
12
- static ɵcmp: i0.ɵɵComponentDeclaration<WizardSubStepComponent, "st-wizard-sub-step", never, { "content": { "alias": "content"; "required": true; "isSignal": true; }; "currentStep": { "alias": "currentStep"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
94
+ static ɵcmp: i0.ɵɵComponentDeclaration<WizardSubStepComponent, "st-wizard-sub-step", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "stepIndex": { "alias": "stepIndex"; "required": true; "isSignal": true; }; "stepStatus": { "alias": "stepStatus"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
13
95
  }
@@ -1,24 +1,153 @@
1
+ import { WizardService } from '../services/wizard.service';
1
2
  import { WizardContentComponent } from '../wizard-content/wizard-content.component';
2
3
  import * as i0 from "@angular/core";
4
+ /**
5
+ * Layout direction variants for the wizard component
6
+ * @typedef {'vertical' | 'horizontal'} WizardVariantProps
7
+ */
8
+ export type WizardVariantProps = 'vertical' | 'horizontal';
9
+ /**
10
+ * A container component for multi-step workflows with navigation controls and layout management.
11
+ *
12
+ * @remarks
13
+ * Integrates with WizardService for state management and provides template structure for wizard steps.
14
+ * Supports both horizontal and vertical layouts with customizable navigation controls.
15
+ *
16
+ * @example
17
+ * ```html
18
+ * <!-- Basic horizontal wizard -->
19
+ * <st-wizard>
20
+ * <st-wizard-content [stepIndex]="0" name="Step 1" [isValid]="true">
21
+ * <!-- Step content -->
22
+ * </st-wizard-content>
23
+ * <st-wizard-content [stepIndex]="1" name="Step 2">
24
+ * <!-- Step content -->
25
+ * </st-wizard-content>
26
+ * </st-wizard>
27
+ *
28
+ * <!-- Vertical wizard with external controls -->
29
+ * <st-wizard variant="vertical" [showControls]="false">
30
+ * <!-- Step contents -->
31
+ * </st-wizard>
32
+ * <div class="controls">
33
+ * <st-button (click)="handlePrevious()">Previous</st-button>
34
+ * <st-button (click)="handleNext()">Next</st-button>
35
+ * </div>
36
+ * ```
37
+ */
3
38
  export declare class WizardWrapperComponent {
39
+ /**
40
+ * Injected wizard state management service instance
41
+ * @internal
42
+ */
43
+ wizardService: WizardService;
44
+ /**
45
+ * Controls the layout direction of the wizard steps
46
+ * @default 'horizontal'
47
+ * @example
48
+ * <st-wizard variant="vertical">...</st-wizard>
49
+ */
50
+ variant: import("@angular/core").InputSignal<WizardVariantProps>;
51
+ /**
52
+ * Add a card style to the wizard
53
+ * @default false
54
+ * @example
55
+ * <st-wizard [card]="true">...</st-wizard>
56
+ */
57
+ card: import("@angular/core").InputSignal<boolean>;
58
+ /**
59
+ * Query list of contained wizard content components
60
+ * @internal
61
+ */
4
62
  contents: import("@angular/core").Signal<readonly WizardContentComponent[]>;
5
- currentStep: import("@angular/core").ModelSignal<number>;
63
+ /**
64
+ * Controls visibility of built-in navigation controls
65
+ * @default true
66
+ * @example
67
+ * <st-wizard [showControls]="false">...</st-wizard>
68
+ */
69
+ showControls: import("@angular/core").InputSignal<boolean>;
70
+ /**
71
+ * Event emitted when the back button is clicked
72
+ * @example
73
+ * <st-wizard (onBack)="handleCancel()">...</st-wizard>
74
+ */
6
75
  onBack: import("@angular/core").OutputEmitterRef<void>;
7
- oncompleted: import("@angular/core").OutputEmitterRef<void>;
8
- isFirstStep: import("@angular/core").Signal<boolean>;
9
- isLastStep: import("@angular/core").Signal<boolean>;
10
- allStepsAreValid: import("@angular/core").Signal<boolean>;
11
- isCurrentStepValid: import("@angular/core").Signal<boolean>;
12
- icon: string;
13
- handlePreviousStep(): void;
14
- handleNextStep(): void;
76
+ /**
77
+ * Event emitted when navigating to the previous step
78
+ * @example
79
+ * <st-wizard (onPrevious)="logStepChange('previous')">...</st-wizard>
80
+ */
81
+ onPrevious: import("@angular/core").OutputEmitterRef<void>;
82
+ /**
83
+ * Event emitted when navigating to the next valid step
84
+ * @example
85
+ * <st-wizard (onNext)="logStepChange('next')">...</st-wizard>
86
+ */
87
+ onNext: import("@angular/core").OutputEmitterRef<void>;
88
+ /**
89
+ * Event emitted when all steps are completed
90
+ * @example
91
+ * <st-wizard (onComplete)="showCompletionModal()">...</st-wizard>
92
+ */
93
+ onComplete: import("@angular/core").OutputEmitterRef<void>;
94
+ /** @internal Material design chevron left icon */
95
+ iconChevronLeft: string;
96
+ /** @internal Material design chevron right icon */
97
+ iconChevronRight: string;
98
+ /** @internal Material design return arrow icon */
99
+ iconReturn: string;
100
+ /** @internal Material design save/floppy disk icon */
101
+ iconSave: string;
102
+ /**
103
+ * Handles back navigation and emits onBack event
104
+ * @emits onBack
105
+ * @example
106
+ * // Template
107
+ * <button (click)="handleBack()">Cancel</button>
108
+ *
109
+ * // Component
110
+ * handleBack() {
111
+ * this.onBack.emit();
112
+ * }
113
+ */
15
114
  handleBack(): void;
115
+ /**
116
+ * Navigates to previous step and emits onPrevious event
117
+ * @emits onPrevious
118
+ * @example
119
+ * // Manually trigger previous step
120
+ * previousStep() {
121
+ * this.wizardService.previousStep();
122
+ * this.onPrevious.emit();
123
+ * }
124
+ */
125
+ handlePrevious(): void;
126
+ /**
127
+ * Navigates to next valid step and emits onNext event
128
+ * @emits onNext
129
+ * @example
130
+ * // Custom next step handler
131
+ * handleNext() {
132
+ * if (form.valid) {
133
+ * this.wizardService.nextStep();
134
+ * this.onNext.emit();
135
+ * }
136
+ * }
137
+ */
138
+ handleNext(): void;
139
+ /**
140
+ * Completes wizard flow and emits onComplete event
141
+ * @emits onComplete
142
+ * @example
143
+ * // Final step handler
144
+ * handleComplete() {
145
+ * if (allStepsValid) {
146
+ * this.onComplete.emit();
147
+ * }
148
+ * }
149
+ */
16
150
  handleComplete(): void;
17
- handleStepStatusChange(step: WizardContentComponent): void;
18
- getStepClasses(currentStep: number, step: WizardContentComponent): {
19
- outerClasses: string;
20
- innerClasses: string;
21
- };
22
151
  static ɵfac: i0.ɵɵFactoryDeclaration<WizardWrapperComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<WizardWrapperComponent, "st-wizard", never, { "currentStep": { "alias": "currentStep"; "required": false; "isSignal": true; }; }, { "currentStep": "currentStepChange"; "onBack": "onBack"; "oncompleted": "oncompleted"; }, ["contents"], ["*"], true, never>;
152
+ static ɵcmp: i0.ɵɵComponentDeclaration<WizardWrapperComponent, "st-wizard", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "card": { "alias": "card"; "required": false; "isSignal": true; }; "showControls": { "alias": "showControls"; "required": false; "isSignal": true; }; }, { "onBack": "onBack"; "onPrevious": "onPrevious"; "onNext": "onNext"; "onComplete": "onComplete"; }, ["contents"], ["*", "st-wizard-actions"], true, never>;
24
153
  }