ng-hub-ui-stepper 1.0.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/README.md +232 -0
- package/esm2022/lib/next-step-button.directive.mjs +22 -0
- package/esm2022/lib/prev-step-button.directive.mjs +22 -0
- package/esm2022/lib/services/stepper-theme-service.mjs +21 -0
- package/esm2022/lib/step/step.component.mjs +79 -0
- package/esm2022/lib/step-trigger.directive.mjs +16 -0
- package/esm2022/lib/stepper/stepper.component.mjs +136 -0
- package/esm2022/lib/stepper-buttons.directive.mjs +16 -0
- package/esm2022/lib/stepper-nav.directive.mjs +16 -0
- package/esm2022/lib/stepper.module.mjs +49 -0
- package/esm2022/ng-hub-ui-stepper.mjs +5 -0
- package/esm2022/public-api.mjs +12 -0
- package/fesm2022/ng-hub-ui-stepper.mjs +358 -0
- package/fesm2022/ng-hub-ui-stepper.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/next-step-button.directive.d.ts +8 -0
- package/lib/prev-step-button.directive.d.ts +8 -0
- package/lib/services/stepper-theme-service.d.ts +11 -0
- package/lib/step/step.component.d.ts +33 -0
- package/lib/step-trigger.directive.d.ts +8 -0
- package/lib/stepper/stepper.component.d.ts +71 -0
- package/lib/stepper-buttons.directive.d.ts +8 -0
- package/lib/stepper-nav.directive.d.ts +8 -0
- package/lib/stepper.module.d.ts +14 -0
- package/ng-hub-ui-stepper-1.0.0.tgz +0 -0
- package/package.json +60 -0
- package/public-api.d.ts +8 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { AfterContentInit, EventEmitter, QueryList, TemplateRef } from '@angular/core';
|
|
2
|
+
import { StepComponent } from '../step/step.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* StepperComponent is a multi-step interface component for Angular applications.
|
|
6
|
+
* It manages navigation between steps, handles step content, and provides
|
|
7
|
+
* customization options for navigation and controls.
|
|
8
|
+
*/
|
|
9
|
+
export declare class StepperComponent implements AfterContentInit {
|
|
10
|
+
#private;
|
|
11
|
+
/** The index of the current active step */
|
|
12
|
+
currentIndex: number;
|
|
13
|
+
/** Label for the back button */
|
|
14
|
+
backLabel: string;
|
|
15
|
+
/** Label for the continue button */
|
|
16
|
+
continueLabel: string;
|
|
17
|
+
/** Label for the submit button */
|
|
18
|
+
submitLabel: string;
|
|
19
|
+
/** Event emitted when the stepper is completed */
|
|
20
|
+
completed: EventEmitter<void>;
|
|
21
|
+
/** Event emitted when moving to the previous step */
|
|
22
|
+
previousStep: EventEmitter<number>;
|
|
23
|
+
/** Event emitted when moving to the next step */
|
|
24
|
+
nextStep: EventEmitter<number>;
|
|
25
|
+
/** QueryList of all StepComponent children */
|
|
26
|
+
steps: QueryList<StepComponent>;
|
|
27
|
+
/** Custom template for stepper navigation */
|
|
28
|
+
stepperNavTpt?: TemplateRef<any>;
|
|
29
|
+
/** Custom template for stepper controls */
|
|
30
|
+
stepperControlsTpt?: TemplateRef<any>;
|
|
31
|
+
/** Get the current active step */
|
|
32
|
+
get currentStep(): StepComponent | null;
|
|
33
|
+
ngAfterContentInit(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Initialize step indices and set up change detection
|
|
36
|
+
*/
|
|
37
|
+
private initializeSteps;
|
|
38
|
+
/**
|
|
39
|
+
* Navigate to the previous step
|
|
40
|
+
*/
|
|
41
|
+
goToPrevious(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Navigate to the next step
|
|
44
|
+
*/
|
|
45
|
+
goToNext(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Navigate to a specific step by index
|
|
48
|
+
* @param index The index of the step to navigate to
|
|
49
|
+
*/
|
|
50
|
+
goTo(index: number): void;
|
|
51
|
+
/**
|
|
52
|
+
* Check if it's possible to navigate to the next step
|
|
53
|
+
*/
|
|
54
|
+
canGoNext(): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Check if it's possible to navigate to a specific step
|
|
57
|
+
* @param index The index of the step to check
|
|
58
|
+
*/
|
|
59
|
+
canNavigateTo(index: number): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Complete the stepper process
|
|
62
|
+
*/
|
|
63
|
+
complete(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Check if a given index is valid within the current steps
|
|
66
|
+
* @param index The index to validate
|
|
67
|
+
*/
|
|
68
|
+
private isValidStepIndex;
|
|
69
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StepperComponent, never>;
|
|
70
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StepperComponent, "hub-stepper, hub-ui-stepper, ng80-stepper", never, { "backLabel": { "alias": "backLabel"; "required": false; }; "continueLabel": { "alias": "continueLabel"; "required": false; }; "submitLabel": { "alias": "submitLabel"; "required": false; }; }, { "completed": "completed"; "previousStep": "previousStep"; "nextStep": "nextStep"; }, ["stepperNavTpt", "stepperControlsTpt", "steps"], never, false, never>;
|
|
71
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class StepperButtonsDirective {
|
|
4
|
+
template: TemplateRef<any>;
|
|
5
|
+
constructor(template: TemplateRef<any>);
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StepperButtonsDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<StepperButtonsDirective, "[hubStepperButtons], [stepperButtons]", never, {}, {}, never, never, false, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class StepperNavDirective {
|
|
4
|
+
template: TemplateRef<any>;
|
|
5
|
+
constructor(template: TemplateRef<any>);
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StepperNavDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<StepperNavDirective, "[hubStepperNav], [stepperNav]", never, {}, {}, never, never, false, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./stepper/stepper.component";
|
|
3
|
+
import * as i2 from "./step/step.component";
|
|
4
|
+
import * as i3 from "./step-trigger.directive";
|
|
5
|
+
import * as i4 from "./stepper-nav.directive";
|
|
6
|
+
import * as i5 from "./prev-step-button.directive";
|
|
7
|
+
import * as i6 from "./next-step-button.directive";
|
|
8
|
+
import * as i7 from "@angular/common";
|
|
9
|
+
import * as i8 from "@ngx-translate/core";
|
|
10
|
+
export declare class StepperModule {
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StepperModule, never>;
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StepperModule, [typeof i1.StepperComponent, typeof i2.StepComponent, typeof i3.StepTriggerDirective, typeof i4.StepperNavDirective, typeof i5.PrevStepButtonDirective, typeof i6.NextStepButtonDirective], [typeof i7.CommonModule, typeof i8.TranslateModule], [typeof i1.StepperComponent, typeof i2.StepComponent, typeof i3.StepTriggerDirective, typeof i4.StepperNavDirective, typeof i5.PrevStepButtonDirective, typeof i6.NextStepButtonDirective]>;
|
|
13
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<StepperModule>;
|
|
14
|
+
}
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ng-hub-ui-stepper",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A flexible and customizable stepper component for Angular applications",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"angular",
|
|
9
|
+
"stepper",
|
|
10
|
+
"wizard",
|
|
11
|
+
"multi-step",
|
|
12
|
+
"form",
|
|
13
|
+
"ui",
|
|
14
|
+
"component",
|
|
15
|
+
"hub-ui",
|
|
16
|
+
"step-by-step",
|
|
17
|
+
"progress",
|
|
18
|
+
"navigation",
|
|
19
|
+
"workflow",
|
|
20
|
+
"form-wizard"
|
|
21
|
+
],
|
|
22
|
+
"author": "Carlos Morcillo Fernández <carlos.morcillo@me.com>",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/carlos-morcillo/ng-hub-ui-stepper.git"
|
|
27
|
+
},
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/carlos-morcillo/ng-hub-ui-stepper/issues"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/carlos-morcillo/ng-hub-ui-stepper#readme",
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@angular/common": ">=16.0.0",
|
|
34
|
+
"@angular/core": ">=16.0.0",
|
|
35
|
+
"@angular/animations": ">=16.0.0"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"tslib": "^2.3.0"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=14.0.0"
|
|
45
|
+
},
|
|
46
|
+
"module": "fesm2022/ng-hub-ui-stepper.mjs",
|
|
47
|
+
"typings": "index.d.ts",
|
|
48
|
+
"exports": {
|
|
49
|
+
"./package.json": {
|
|
50
|
+
"default": "./package.json"
|
|
51
|
+
},
|
|
52
|
+
".": {
|
|
53
|
+
"types": "./index.d.ts",
|
|
54
|
+
"esm2022": "./esm2022/ng-hub-ui-stepper.mjs",
|
|
55
|
+
"esm": "./esm2022/ng-hub-ui-stepper.mjs",
|
|
56
|
+
"default": "./fesm2022/ng-hub-ui-stepper.mjs"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"sideEffects": false
|
|
60
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './lib/stepper/stepper.component';
|
|
2
|
+
export * from './lib/step/step.component';
|
|
3
|
+
export * from './lib/stepper.module';
|
|
4
|
+
export * from './lib/next-step-button.directive';
|
|
5
|
+
export * from './lib/prev-step-button.directive';
|
|
6
|
+
export * from './lib/step-trigger.directive';
|
|
7
|
+
export * from './lib/stepper-nav.directive';
|
|
8
|
+
export * from './lib/services/stepper-theme-service';
|