Add wizard sidebar navigation (#1911)

This commit is contained in:
Matt Irvine
2018-07-12 11:15:56 -07:00
committed by GitHub
parent 05d0a89655
commit be45905830
5 changed files with 212 additions and 7 deletions

View File

@@ -13,6 +13,7 @@ import { CommonModule, APP_BASE_HREF } from '@angular/common';
import { BrowserModule } from '@angular/platform-browser';
import { DialogContainer } from 'sql/platform/dialog/dialogContainer.component';
import { WizardNavigation } from 'sql/platform/dialog/wizardNavigation.component';
import { Extensions, IComponentRegistry } from 'sql/platform/dashboard/common/modelComponentRegistry';
import { ModelViewContent } from 'sql/parts/modelComponents/modelViewContent.component';
import { ModelComponentWrapper } from 'sql/parts/modelComponents/modelComponentWrapper.component';
@@ -37,12 +38,13 @@ export const DialogModule = (params, selector: string, instantiationService: IIn
SelectBox,
InputBox,
DialogContainer,
WizardNavigation,
ModelViewContent,
ModelComponentWrapper,
ComponentHostDirective,
...extensionComponents
],
entryComponents: [DialogContainer, ...extensionComponents],
entryComponents: [DialogContainer, WizardNavigation, ...extensionComponents],
imports: [
FormsModule,
CommonModule,
@@ -65,7 +67,8 @@ export const DialogModule = (params, selector: string, instantiationService: IIn
}
ngDoBootstrap(appRef: ApplicationRef) {
const factoryWrapper: any = this._resolver.resolveComponentFactory(DialogContainer);
let componentClass = this.selector.startsWith(WizardNavigation.SELECTOR) ? WizardNavigation : DialogContainer;
const factoryWrapper: any = this._resolver.resolveComponentFactory<WizardNavigation | DialogContainer>(componentClass);
factoryWrapper.factory.selector = this.selector;
appRef.bootstrap(factoryWrapper);
}