Skip to content

Commit df00edd

Browse files
authored
Update the index.ts files (#187)
- update the index.ts files - optimize index.ts files - improve imports in archwizard module - make IntelliJ happy
1 parent 4851e39 commit df00edd

29 files changed

+88
-77
lines changed

src/index.ts

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,37 @@
1-
export { WizardCompletionStepComponent } from './lib/components/wizard-completion-step.component';
2-
export { WizardNavigationBarComponent } from './lib/components/wizard-navigation-bar.component';
3-
export { WizardStepComponent } from './lib/components/wizard-step.component';
4-
export { WizardComponent } from './lib/components/wizard.component';
5-
6-
export * from './lib/directives';
7-
export * from './lib/navigation';
8-
export * from './lib/util';
1+
// export the components
2+
export {WizardCompletionStepComponent} from './lib/components/wizard-completion-step.component';
3+
export {WizardNavigationBarComponent} from './lib/components/wizard-navigation-bar.component';
4+
export {WizardStepComponent} from './lib/components/wizard-step.component';
5+
export {WizardComponent} from './lib/components/wizard.component';
6+
7+
// export the directives
8+
export {EnableBackLinksDirective} from './lib/directives/enable-back-links.directive';
9+
export {GoToStepDirective} from './lib/directives/go-to-step.directive';
10+
export {NextStepDirective} from './lib/directives/next-step.directive';
11+
export {OptionalStepDirective} from './lib/directives/optional-step.directive';
12+
export {PreviousStepDirective} from './lib/directives/previous-step.directive';
13+
export {ResetWizardDirective} from './lib/directives/reset-wizard.directive';
14+
export {SelectedStepDirective} from './lib/directives/selected-step.directive';
15+
export {WizardCompletionStepDirective} from './lib/directives/wizard-completion-step.directive';
16+
export {WizardStepDirective} from './lib/directives/wizard-step.directive';
17+
export {WizardStepTitleDirective} from './lib/directives/wizard-step-title.directive';
18+
19+
// export the navigation classes
20+
export {FreeNavigationMode} from './lib/navigation/free-navigation-mode';
21+
export {NavigationMode} from './lib/navigation/navigation-mode.interface';
22+
export {SemiStrictNavigationMode} from './lib/navigation/semi-strict-navigation-mode';
23+
export {StrictNavigationMode} from './lib/navigation/strict-navigation-mode';
24+
export {WizardState} from './lib/navigation/wizard-state.model';
25+
export {navigationModeFactory} from './lib/navigation/navigation-mode.provider';
26+
27+
// export the utility functions
28+
export {MovingDirection} from './lib/util/moving-direction.enum';
29+
export {NavigationSymbol} from './lib/util/navigation-symbol.interface';
30+
export {StepId, isStepId} from './lib/util/step-id.interface';
31+
export {StepIndex, isStepIndex} from './lib/util/step-index.interface';
32+
export {StepOffset, isStepOffset} from './lib/util/step-offset.interface';
33+
export {WizardCompletionStep} from './lib/util/wizard-completion-step.interface';
34+
export {WizardStep} from './lib/util/wizard-step.interface';
35+
36+
// export the module
937
export {ArchwizardModule} from './lib/archwizard.module';

src/lib/archwizard.module.ts

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
import {CommonModule} from '@angular/common';
22
import {ModuleWithProviders, NgModule} from '@angular/core';
33

4-
import {WizardComponent} from './components/wizard.component';
5-
import {WizardNavigationBarComponent} from './components/wizard-navigation-bar.component';
6-
import {WizardStepComponent} from './components/wizard-step.component';
7-
import {WizardCompletionStepComponent} from './components/wizard-completion-step.component';
8-
9-
import {NextStepDirective} from './directives/next-step.directive';
10-
import {PreviousStepDirective} from './directives/previous-step.directive';
11-
import {OptionalStepDirective} from './directives/optional-step.directive';
12-
import {GoToStepDirective} from './directives/go-to-step.directive';
13-
import {WizardStepSymbolDirective} from './directives/wizard-step-symbol.directive';
14-
import {WizardStepTitleDirective} from './directives/wizard-step-title.directive';
15-
import {EnableBackLinksDirective} from './directives/enable-back-links.directive';
16-
import {WizardStepDirective} from './directives/wizard-step.directive';
17-
import {WizardCompletionStepDirective} from './directives/wizard-completion-step.directive';
18-
import {SelectedStepDirective} from './directives/selected-step.directive';
19-
import {ResetWizardDirective} from './directives/reset-wizard.directive';
4+
import {WizardCompletionStepComponent, WizardComponent, WizardNavigationBarComponent, WizardStepComponent} from './components';
5+
import {
6+
EnableBackLinksDirective,
7+
GoToStepDirective,
8+
NextStepDirective,
9+
OptionalStepDirective,
10+
PreviousStepDirective,
11+
ResetWizardDirective,
12+
SelectedStepDirective,
13+
WizardCompletionStepDirective,
14+
WizardStepDirective,
15+
WizardStepSymbolDirective,
16+
WizardStepTitleDirective
17+
} from './directives';
2018

2119
/**
2220
* The module defining all the content inside `angular-archwizard`

src/lib/components/wizard-completion-step.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
*/
44

55
import {Component, forwardRef, ViewEncapsulation} from '@angular/core';
6-
import {WizardStep} from '../util/wizard-step.interface';
7-
import {WizardCompletionStep} from '../util/wizard-completion-step.interface';
6+
import {WizardCompletionStep, WizardStep} from '../util';
87

98
/**
109
* The `aw-wizard-completion-step` component can be used to define a completion/success step at the end of your wizard

src/lib/components/wizard-navigation-bar.component.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {Component, Input, ViewEncapsulation} from '@angular/core';
2-
import {WizardStep} from '../util/wizard-step.interface';
3-
import {WizardState} from '../navigation/wizard-state.model';
4-
import {NavigationMode} from '../navigation/navigation-mode.interface';
2+
import {NavigationMode, WizardState} from '../navigation';
3+
import {WizardStep} from '../util';
54

65
/**
76
* The `aw-wizard-navigation-bar` component contains the navigation bar inside a [[WizardComponent]].
@@ -116,7 +115,7 @@ export class WizardNavigationBarComponent {
116115
* @returns True if the step can be marked as optional
117116
*/
118117
public isOptional(wizardStep: WizardStep): boolean {
119-
return wizardStep.optional && !wizardStep.completed && !wizardStep.selected && !this.wizardState.completed
118+
return wizardStep.optional && !wizardStep.completed && !wizardStep.selected && !this.wizardState.completed;
120119
}
121120

122121
/**

src/lib/components/wizard-step.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Component, forwardRef, ViewEncapsulation} from '@angular/core';
2-
import {WizardStep} from '../util/wizard-step.interface';
2+
import {WizardStep} from '../util';
33

44
/**
55
* The `aw-wizard-step` component is used to define a normal step inside a wizard.

src/lib/components/wizard.component.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ import {
99
SimpleChanges,
1010
ViewEncapsulation
1111
} from '@angular/core';
12-
import {WizardStep} from '../util/wizard-step.interface';
13-
import {WizardState} from '../navigation/wizard-state.model';
14-
import {NavigationMode} from '../navigation/navigation-mode.interface';
12+
import {NavigationMode, WizardState} from '../navigation';
13+
import {WizardStep} from '../util';
1514

1615
/**
1716
* The `aw-wizard` component defines the root component of a wizard.
@@ -146,7 +145,7 @@ export class WizardComponent implements OnChanges, AfterContentInit {
146145
*/
147146
ngOnChanges(changes: SimpleChanges) {
148147
for (const propName of Object.keys(changes)) {
149-
let change = changes[propName];
148+
const change = changes[propName];
150149

151150
if (!change.firstChange) {
152151
switch (propName) {

src/lib/directives/enable-back-links.directive.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {Directive, EventEmitter, Host, OnInit, Output} from '@angular/core';
2-
import {MovingDirection} from '../util/moving-direction.enum';
3-
import {WizardCompletionStep} from '../util/wizard-completion-step.interface';
2+
import {MovingDirection, WizardCompletionStep} from '../util';
43

54
/**
65
* The `awEnableBackLinks` directive can be used to allow the user to leave a [[WizardCompletionStep]] after is has been entered.

src/lib/directives/go-to-step.directive.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@
33
*/
44

55
import {Directive, EventEmitter, HostListener, Input, Optional, Output} from '@angular/core';
6-
import {isStepOffset, StepOffset} from '../util/step-offset.interface';
7-
import {WizardStep} from '../util/wizard-step.interface';
8-
import {WizardState} from '../navigation/wizard-state.model';
9-
import {NavigationMode} from '../navigation/navigation-mode.interface';
10-
import {isStepId, StepId} from '../util/step-id.interface';
11-
import {isStepIndex, StepIndex} from '../util/step-index.interface';
6+
import {isStepId, isStepIndex, isStepOffset, StepId, StepIndex, StepOffset, WizardStep} from '../util';
7+
import {NavigationMode, WizardState} from '../navigation';
128

139
/**
1410
* The `awGoToStep` directive can be used to navigate to a given step.

src/lib/directives/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export {SelectedStepDirective} from './selected-step.directive';
88
export {WizardCompletionStepDirective} from './wizard-completion-step.directive';
99
export {WizardStepDirective} from './wizard-step.directive';
1010
export {WizardStepTitleDirective} from './wizard-step-title.directive';
11+
export {WizardStepSymbolDirective} from './wizard-step-symbol.directive';
1112

1213

1314

src/lib/directives/next-step.directive.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {Directive, EventEmitter, HostListener, Output} from '@angular/core';
2-
import {NavigationMode} from '../navigation/navigation-mode.interface';
3-
import {WizardState} from '../navigation/wizard-state.model';
2+
import {NavigationMode, WizardState} from '../navigation';
43

54
/**
65
* The `awNextStep` directive can be used to navigate to the next step.

0 commit comments

Comments
 (0)