fix(step-configure): Fix the data mapper view
Also run prettier on step-configure.component.ts
fixes
-import { Component, Input, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
+import {
+ Component,
+ Input,
+ OnInit,
+ OnDestroy,
+ ChangeDetectorRef,
+} from '@angular/core';
import { Subscription } from 'rxjs/Subscription';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { FormGroup } from '@angular/forms';
@@ -30,17 +36,17 @@ export class IntegrationsStepConfigureComponent extends FlowPage
formGroup: FormGroup;
formConfig: any;
cfg: any = undefined;
- //filterForm: any;
-
- @Input() filterForm: any;
+ filterForm: any;
- constructor(public currentFlow: CurrentFlow,
+ constructor(
+ public currentFlow: CurrentFlow,
public route: ActivatedRoute,
public router: Router,
public formFactory: FormFactoryService,
public formService: DynamicFormService,
public detector: ChangeDetectorRef,
- public stepStore: StepStore) {
+ public stepStore: StepStore,
+ ) {
super(currentFlow, route, router, detector);
}
@@ -114,7 +120,6 @@ export class IntegrationsStepConfigureComponent extends FlowPage
const step = (this.step = <Step>this.currentFlow.getStep(
this.position,
));
-
// If no Step exists, redirect to the Select Step view
if (!step) {
this.router.navigate(['step-select', this.position], {
@@ -125,18 +130,21 @@ export class IntegrationsStepConfigureComponent extends FlowPage
// Step exists, get its configuration
const stepDef = this.stepStore.getStepConfig(step.stepKind);
- log.debugc(
- () => 'stepConfig: ' + JSON.stringify(stepDef),
- );
+ log.debugc(() => 'stepConfig: ' + JSON.stringify(stepDef));
if (!stepDef) {
// TODO if we don't have a definition for this step then ???
+ return;
+ }
+ // Now check if we've a custom view for this step kind
switch (step.stepKind) {
case 'basic-filter':
case 'mapper':
- log.debugc(() => 'No form configuration, skipping the form building service..');
+ log.debugc(
+ () =>
+ 'No form configuration, skipping the form building service..',
+ );
return;
}
- }
this.formConfig = JSON.parse(JSON.stringify(stepDef.properties));
const values: any = this.getConfiguredProperties(
step.configuredProperties,
