From 7a8358bb477dbdb7bc3e01960efc514bc4a5d3ef Mon Sep 17 00:00:00 2001 From: argirok Date: Wed, 16 Mar 2022 18:53:19 +0200 Subject: [PATCH] stepper component v2 --- claims/claim-utils/stepper/step.component.ts | 26 -------------- .../claim-utils/stepper/stepper.component.ts | 19 ----------- sharedComponents/stepper/step.component.ts | 34 +++++++++++++++++++ .../stepper/stepLine.component.ts | 3 +- sharedComponents/stepper/stepper.component.ts | 32 +++++++++++++++++ .../stepper/stepper.module.ts | 2 +- 6 files changed, 69 insertions(+), 47 deletions(-) delete mode 100644 claims/claim-utils/stepper/step.component.ts delete mode 100644 claims/claim-utils/stepper/stepper.component.ts create mode 100644 sharedComponents/stepper/step.component.ts rename {claims/claim-utils => sharedComponents}/stepper/stepLine.component.ts (58%) create mode 100644 sharedComponents/stepper/stepper.component.ts rename {claims/claim-utils => sharedComponents}/stepper/stepper.module.ts (87%) diff --git a/claims/claim-utils/stepper/step.component.ts b/claims/claim-utils/stepper/step.component.ts deleted file mode 100644 index 9d40156c..00000000 --- a/claims/claim-utils/stepper/step.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import {Component, EventEmitter, Input, Output} from '@angular/core'; - -@Component({ - selector: 'step', - template: ` - - -
- - {{stepText}} -
- ` - -}) -export class StepComponent { - @Input() status: 'active' | 'default' | 'disabled' | 'done'; - @Input() stepId; - @Input() stepNumber; - @Input() stepText; - @Input() active; - @Output() stepChanged: EventEmitter = new EventEmitter(); -} diff --git a/claims/claim-utils/stepper/stepper.component.ts b/claims/claim-utils/stepper/stepper.component.ts deleted file mode 100644 index 8ccfd17c..00000000 --- a/claims/claim-utils/stepper/stepper.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import {Component} from '@angular/core'; - -@Component({ - selector: 'stepper', - template: ` -
-
-
- -
-
-
- - ` - -}) -export class StepperComponent { - -} diff --git a/sharedComponents/stepper/step.component.ts b/sharedComponents/stepper/step.component.ts new file mode 100644 index 00000000..f2e1b504 --- /dev/null +++ b/sharedComponents/stepper/step.component.ts @@ -0,0 +1,34 @@ +import {Component, EventEmitter, Input, Output} from '@angular/core'; + +@Component({ + selector: 'step', + template: ` + + +
+
+
{{stepText}}
+
+ +
+
+ +
+ ` + +}) +export class StepComponent { + @Input() status: 'active' | 'default' | 'disabled' | 'done'; + @Input() stepId; + @Input() stepNumber; + @Input() stepText; + @Input() active; + @Output() stepChanged: EventEmitter = new EventEmitter(); + @Input() showStepLine:boolean = false; +} diff --git a/claims/claim-utils/stepper/stepLine.component.ts b/sharedComponents/stepper/stepLine.component.ts similarity index 58% rename from claims/claim-utils/stepper/stepLine.component.ts rename to sharedComponents/stepper/stepLine.component.ts index 3ab34a0c..19b93560 100644 --- a/claims/claim-utils/stepper/stepLine.component.ts +++ b/sharedComponents/stepper/stepLine.component.ts @@ -6,11 +6,12 @@ import {Component, Input} from '@angular/core'; -
+
` }) export class StepLineComponent { @Input() status: 'active' | 'default' | 'disabled' | 'done'; + @Input() stepNumber; } diff --git a/sharedComponents/stepper/stepper.component.ts b/sharedComponents/stepper/stepper.component.ts new file mode 100644 index 00000000..2d25c47c --- /dev/null +++ b/sharedComponents/stepper/stepper.component.ts @@ -0,0 +1,32 @@ +import {Component} from '@angular/core'; +/* +* usage example +* +* + + + + +* */ +@Component({ + selector: 'stepper', + template: ` +
+
+
+ +
+
+
+ + ` + +}) +export class StepperComponent { + +} diff --git a/claims/claim-utils/stepper/stepper.module.ts b/sharedComponents/stepper/stepper.module.ts similarity index 87% rename from claims/claim-utils/stepper/stepper.module.ts rename to sharedComponents/stepper/stepper.module.ts index 8365526a..d7c1a72e 100644 --- a/claims/claim-utils/stepper/stepper.module.ts +++ b/sharedComponents/stepper/stepper.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import {SharedModule} from "../../../../shared/shared.module"; +import {SharedModule} from "../../../shared/shared.module"; import {StepperComponent} from "./stepper.component"; import {StepComponent} from "./step.component"; import {StepLineComponent} from "./stepLine.component";