@lowcodeunit/applications-flow-common 1.33.292-lets-get-social-ish → 1.33.295-lets-get-social-ish

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.
@@ -42,11 +42,11 @@ import * as i4$3 from 'skeleton-elements/angular';
42
42
  import { SkeletonElementsModule } from 'skeleton-elements/angular';
43
43
  import * as i2$2 from '@angular/material/dialog';
44
44
  import { MAT_DIALOG_DATA } from '@angular/material/dialog';
45
- import moment from 'moment';
45
+ import { EaCApplicationAsCode } from '@semanticjs/common';
46
46
  import * as i3$1 from '@angular/material/snack-bar';
47
+ import * as i7$1 from '@angular/material/menu';
48
+ import moment from 'moment';
47
49
  import * as i3$2 from '@angular/platform-browser';
48
- import { EaCApplicationAsCode } from '@semanticjs/common';
49
- import * as i4$4 from '@angular/material/menu';
50
50
  import * as i8$2 from '@angular/router';
51
51
 
52
52
  /**
@@ -3852,516 +3852,729 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
3852
3852
  args: ['feed-item']
3853
3853
  }] } });
3854
3854
 
3855
- class GhControlComponent {
3856
- constructor() {
3857
- this.InputLabel = "Create Pull Request";
3858
- this.selectedBtn = "pr-btn";
3855
+ class EditApplicationFormComponent {
3856
+ constructor(formBldr, eacSvc) {
3857
+ this.formBldr = formBldr;
3858
+ this.eacSvc = eacSvc;
3859
+ this.SaveFormEvent = new EventEmitter;
3860
+ this.HasSaveButton = true;
3859
3861
  }
3860
- ngOnInit() {
3862
+ get DescriptionFormControl() {
3863
+ var _a;
3864
+ return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.description;
3861
3865
  }
3862
- ngAfterViewInit() {
3863
- this.addSelectBtn();
3866
+ get NameFormControl() {
3867
+ var _a;
3868
+ return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.name;
3864
3869
  }
3865
- CreateFeatureBranch() {
3866
- this.removeSelectedBtn();
3867
- this.InputLabel = "Create Feature Branch";
3868
- this.selectedBtn = "fb-btn";
3869
- this.addSelectBtn();
3870
- console.log("create feature branch selected");
3870
+ get RouteFormControl() {
3871
+ var _a;
3872
+ return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.route;
3871
3873
  }
3872
- OpenIssue() {
3873
- this.removeSelectedBtn();
3874
- this.InputLabel = "Open Issue";
3875
- this.selectedBtn = "oi-btn";
3876
- this.addSelectBtn();
3877
- console.log("open issue selected");
3874
+ get State() {
3875
+ return this.eacSvc.State;
3878
3876
  }
3879
- CreatePullRequest() {
3880
- this.removeSelectedBtn();
3881
- this.InputLabel = "Create Pull Request";
3882
- this.selectedBtn = "pr-btn";
3883
- this.addSelectBtn();
3884
- console.log("create pull request selected");
3877
+ ngOnInit() {
3878
+ this.setupApplicationForm();
3885
3879
  }
3886
- OpenMoreInfo() {
3887
- console.log("more info selected");
3880
+ SubmitApplicationControl() {
3881
+ console.log("application form: ", this.ApplicationFormGroup.value);
3882
+ this.SaveApplication();
3888
3883
  }
3889
- Submit() {
3890
- console.log("submitting: ", this.value);
3891
- switch (this.selectedBtn) {
3892
- case "pr-btn":
3893
- //Pull request
3894
- console.log("creating pull request: ", this.value);
3895
- break;
3896
- case "oi-btn":
3897
- //Open Issue
3898
- console.log("Open issue: ", this.value);
3899
- break;
3900
- case "fb-btn":
3901
- //Feature Branch
3902
- console.log("creating feature branch: ", this.value);
3903
- break;
3904
- default:
3905
- console.log("hmm");
3884
+ SaveApplication() {
3885
+ var _a, _b;
3886
+ const app = this.EditingApplication;
3887
+ // console.log("APP=", app);
3888
+ app.Application = {
3889
+ Name: this.NameFormControl.value,
3890
+ Description: this.DescriptionFormControl.value,
3891
+ PriorityShift: ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Application) === null || _b === void 0 ? void 0 : _b.PriorityShift) || 0,
3892
+ };
3893
+ app.LookupConfig.PathRegex = `${this.RouteFormControl.value}.*`;
3894
+ switch (app.Processor.Type) {
3895
+ case 'DFS':
3896
+ app.Processor.BaseHref = `${this.RouteFormControl.value}/`.replace('//', '/');
3906
3897
  break;
3907
3898
  }
3899
+ if (!app.LookupConfig.PathRegex.startsWith('/')) {
3900
+ app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
3901
+ }
3902
+ const saveAppReq = {
3903
+ ProjectLookup: this.ProjectLookup,
3904
+ Application: app,
3905
+ ApplicationLookup: this.ApplicationLookup,
3906
+ };
3907
+ console.log("processor details being submitted: ", app.Processor);
3908
+ this.eacSvc.SaveApplicationAsCode(saveAppReq).then(res => {
3909
+ this.SaveFormEvent.emit(res);
3910
+ });
3908
3911
  }
3909
3912
  //HELPERS
3910
- addSelectBtn() {
3911
- document.getElementById(this.selectedBtn).classList.add('selected');
3912
- }
3913
- removeSelectedBtn() {
3914
- document.getElementById(this.selectedBtn).classList.remove('selected');
3913
+ setupApplicationForm() {
3914
+ var _a, _b, _c;
3915
+ if (this.EditingApplication != null) {
3916
+ this.ApplicationFormGroup = this.formBldr.group({
3917
+ name: [(_a = this.EditingApplication.Application) === null || _a === void 0 ? void 0 : _a.Name, Validators.required],
3918
+ description: [
3919
+ (_b = this.EditingApplication.Application) === null || _b === void 0 ? void 0 : _b.Description,
3920
+ Validators.required,
3921
+ ],
3922
+ route: [this.CurrentRoute ? this.CurrentRoute :
3923
+ ((_c = this.EditingApplication.LookupConfig) === null || _c === void 0 ? void 0 : _c.PathRegex.replace('.*', '')) ||
3924
+ '/',
3925
+ Validators.required,],
3926
+ // priority: [
3927
+ // this.EditingApplication.Application?.Priority || 10000,
3928
+ // Validators.required,
3929
+ // ],
3930
+ });
3931
+ }
3915
3932
  }
3916
3933
  }
3917
- GhControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: GhControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3918
- GhControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: GhControlComponent, selector: "lcu-gh-control", ngImport: i0, template: "<mat-card class=\"social-card\">\n <div class=\"gh-card-container\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-icon fxFlex=\"15%\" class=\"gh-icon\">error_outline</mat-icon>\n <div fxFlex=\"70%\"class=\"gh-card-main-content\">\n <mat-form-field appearance=\"fill\" class=\"gh-input\">\n <mat-label>{{InputLabel}}</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"value\">\n <!-- <button *ngIf=\"value\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"value=''\">\n <mat-icon>close</mat-icon>\n </button> -->\n </mat-form-field>\n </div>\n <button fxFlex=\"15%\" mat-button (click)=\"Submit()\" id=\"submit-btn\">Submit</button>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <button mat-button (click)=\"CreatePullRequest()\" id=\"pr-btn\">Pull Request</button>\n <button mat-button (click)=\"OpenIssue()\" id=\"oi-btn\">Open Issue</button>\n <button mat-button (click)=\"CreateFeatureBranch()\" id=\"fb-btn\">Feature Branch</button>\n <button mat-icon-button (click)=\"OpenMoreInfo()\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n </mat-card-actions>\n </mat-card>", styles: [":host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host ::ng-deep .main-slot-container{padding:10px}:host ::ng-deep .slot-header{align-items:center}:host ::ng-deep .slot-content{width:100%}:host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}.gh-icon{width:60px;height:60px;font-size:60px;text-align:center}.gh-input{width:90%}.selected{border:1px solid green}::ng-deep .mat-form-field-flex{border:1px solid;border-radius:30px!important}::ng-deep .mat-form-field-wrapper{padding-bottom:0!important}\n"], components: [{ type: i1$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i4$1.MatLabel, selector: "mat-label" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }] });
3919
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: GhControlComponent, decorators: [{
3934
+ EditApplicationFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationFormComponent, deps: [{ token: i1$2.FormBuilder }, { token: EaCService }], target: i0.ɵɵFactoryTarget.Component });
3935
+ EditApplicationFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: EditApplicationFormComponent, selector: "lcu-edit-application-form", inputs: { ApplicationLookup: ["application-lookup", "ApplicationLookup"], CurrentRoute: ["current-route", "CurrentRoute"], EditingApplication: ["editing-application", "EditingApplication"], HasSaveButton: ["has-save-button", "HasSaveButton"], ProjectLookup: ["project-lookup", "ProjectLookup"] }, outputs: { SaveFormEvent: "save-form-event" }, ngImport: i0, template: "<form class=\"form-card\" [formGroup]=\"ApplicationFormGroup\" (ngSubmit)=\"SubmitApplicationControl()\" >\n <!-- <mat-card class=\"spread flow-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title>\n <ng-container *ngIf=\"EditingApplication?.Application\">\n Edit Application:\n {{ EditingApplication.Application?.Name }}\n </ng-container>\n\n <ng-container *ngIf=\"!EditingApplication?.Application\">\n Create an Application\n </ng-container>\n </mat-card-title>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n <ng-container *ngIf=\"State?.Loading\">\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Name\"\n formControlName=\"name\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <textarea\n matInput\n placeholder=\"Description\"\n formControlName=\"description\"\n rows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Route\"\n formControlName=\"route\"\n required\n />\n </mat-form-field>\n </ng-container>\n\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n *ngIf=\"HasSaveButton && !State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ApplicationFormGroup.valid || !ApplicationFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save\n </button>\n <lcu-loader *ngIf=\"HasSaveButton\" [loading]=\"State?.Loading\"></lcu-loader>\n \n </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>\n", styles: [".s-block{margin:10px 0;width:100%;height:40px}\n"], components: [{ type: i4$3.SkeletonBlockComponent, selector: "skeleton-block", inputs: ["width", "height", "effect", "borderRadius"] }, { type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }], directives: [{ type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }] });
3936
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationFormComponent, decorators: [{
3920
3937
  type: Component,
3921
- args: [{ selector: 'lcu-gh-control', template: "<mat-card class=\"social-card\">\n <div class=\"gh-card-container\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-icon fxFlex=\"15%\" class=\"gh-icon\">error_outline</mat-icon>\n <div fxFlex=\"70%\"class=\"gh-card-main-content\">\n <mat-form-field appearance=\"fill\" class=\"gh-input\">\n <mat-label>{{InputLabel}}</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"value\">\n <!-- <button *ngIf=\"value\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"value=''\">\n <mat-icon>close</mat-icon>\n </button> -->\n </mat-form-field>\n </div>\n <button fxFlex=\"15%\" mat-button (click)=\"Submit()\" id=\"submit-btn\">Submit</button>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <button mat-button (click)=\"CreatePullRequest()\" id=\"pr-btn\">Pull Request</button>\n <button mat-button (click)=\"OpenIssue()\" id=\"oi-btn\">Open Issue</button>\n <button mat-button (click)=\"CreateFeatureBranch()\" id=\"fb-btn\">Feature Branch</button>\n <button mat-icon-button (click)=\"OpenMoreInfo()\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n </mat-card-actions>\n </mat-card>", styles: [":host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host ::ng-deep .main-slot-container{padding:10px}:host ::ng-deep .slot-header{align-items:center}:host ::ng-deep .slot-content{width:100%}:host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}.gh-icon{width:60px;height:60px;font-size:60px;text-align:center}.gh-input{width:90%}.selected{border:1px solid green}::ng-deep .mat-form-field-flex{border:1px solid;border-radius:30px!important}::ng-deep .mat-form-field-wrapper{padding-bottom:0!important}\n"] }]
3922
- }], ctorParameters: function () { return []; } });
3938
+ args: [{ selector: 'lcu-edit-application-form', template: "<form class=\"form-card\" [formGroup]=\"ApplicationFormGroup\" (ngSubmit)=\"SubmitApplicationControl()\" >\n <!-- <mat-card class=\"spread flow-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title>\n <ng-container *ngIf=\"EditingApplication?.Application\">\n Edit Application:\n {{ EditingApplication.Application?.Name }}\n </ng-container>\n\n <ng-container *ngIf=\"!EditingApplication?.Application\">\n Create an Application\n </ng-container>\n </mat-card-title>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n <ng-container *ngIf=\"State?.Loading\">\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Name\"\n formControlName=\"name\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <textarea\n matInput\n placeholder=\"Description\"\n formControlName=\"description\"\n rows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Route\"\n formControlName=\"route\"\n required\n />\n </mat-form-field>\n </ng-container>\n\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n *ngIf=\"HasSaveButton && !State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ApplicationFormGroup.valid || !ApplicationFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save\n </button>\n <lcu-loader *ngIf=\"HasSaveButton\" [loading]=\"State?.Loading\"></lcu-loader>\n \n </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>\n", styles: [".s-block{margin:10px 0;width:100%;height:40px}\n"] }]
3939
+ }], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: EaCService }]; }, propDecorators: { ApplicationLookup: [{
3940
+ type: Input,
3941
+ args: ['application-lookup']
3942
+ }], CurrentRoute: [{
3943
+ type: Input,
3944
+ args: ['current-route']
3945
+ }], EditingApplication: [{
3946
+ type: Input,
3947
+ args: ['editing-application']
3948
+ }], HasSaveButton: [{
3949
+ type: Input,
3950
+ args: ['has-save-button']
3951
+ }], ProjectLookup: [{
3952
+ type: Input,
3953
+ args: ['project-lookup']
3954
+ }], SaveFormEvent: [{
3955
+ type: Output,
3956
+ args: ['save-form-event']
3957
+ }] } });
3923
3958
 
3924
- class DevopsSourceControlFormComponent {
3925
- // Constructors
3926
- constructor(appsFlowSvc, eacSvc, formBuilder) {
3959
+ class ProcessorDetailsFormComponent {
3960
+ constructor(appsFlowSvc, formBldr, eacSvc) {
3927
3961
  this.appsFlowSvc = appsFlowSvc;
3962
+ this.formBldr = formBldr;
3928
3963
  this.eacSvc = eacSvc;
3929
- this.formBuilder = formBuilder;
3930
- this.SeparatorKeysCodes = [ENTER, COMMA];
3931
- this.SaveStatusEvent = new EventEmitter();
3932
- this.BuildPath = null;
3933
- this.HostingDetails = new ProjectHostingDetails();
3934
- this.SelectedBranches = [];
3935
- this.SourceControlRoot = '';
3936
- this.SkeletonEffect = "wave";
3937
- this.UseBranches = true;
3938
- this.UseBuildPath = false;
3964
+ this.redirectTooltip = '';
3965
+ this.HasSaveButton = true;
3966
+ this.SaveFormEvent = new EventEmitter();
3939
3967
  }
3940
- // Properties
3941
- get ArtifactLookups() {
3968
+ get APIRootFormControl() {
3942
3969
  var _a;
3943
- return (_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.ArtifactLookups;
3944
- }
3945
- get ArtifactLookup() {
3946
- var _a, _b;
3947
- const artLookup = ((_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.ArtifactLookups)
3948
- ? (_b = this.DevOpsAction) === null || _b === void 0 ? void 0 : _b.ArtifactLookups[0]
3949
- : null;
3950
- return artLookup;
3970
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.apiRoot;
3951
3971
  }
3952
- get Artifact() {
3953
- var _a, _b;
3954
- return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts) && this.ArtifactLookup
3955
- ? ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts[this.ArtifactLookup]) || {}
3956
- : {};
3972
+ get Environment() {
3973
+ var _a, _b, _c, _d, _e;
3974
+ return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[(_e = (_d = (_c = this.State) === null || _c === void 0 ? void 0 : _c.EaC) === null || _d === void 0 ? void 0 : _d.Enterprise) === null || _e === void 0 ? void 0 : _e.PrimaryEnvironment];
3957
3975
  }
3958
- get BranchesFormControl() {
3959
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
3976
+ get BuildFormControl() {
3977
+ var _a;
3978
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.build;
3960
3979
  }
3961
3980
  get BuildPathFormControl() {
3962
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'buildPath');
3981
+ var _a;
3982
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.buildPath;
3963
3983
  }
3964
- get DevOpsActionLookups() {
3965
- // console.log(this.DevOpsActions);
3966
- return Object.keys(this.DevOpsActions || {});
3984
+ get ClientIDFormControl() {
3985
+ var _a;
3986
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientId;
3967
3987
  }
3968
- get DevOpsAction() {
3969
- return this.Environment.DevOpsActions && this.DevOpsActionLookup
3970
- ? this.Environment.DevOpsActions[this.DevOpsActionLookup] || {}
3971
- : {};
3988
+ get ClientSecretFormControl() {
3989
+ var _a;
3990
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientSecret;
3972
3991
  }
3973
- get DevOpsActionLookup() {
3974
- var _a, _b, _c;
3975
- if (!!((_a = this.DevOpsActionLookupFormControl) === null || _a === void 0 ? void 0 : _a.value)) {
3976
- return this.DevOpsActionLookupFormControl.value;
3977
- }
3978
- if (!!((_b = this.EditingSourceControl) === null || _b === void 0 ? void 0 : _b.DevOpsActionTriggerLookups)) {
3979
- return (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.DevOpsActionTriggerLookups[0];
3980
- }
3981
- else {
3982
- return null;
3983
- }
3992
+ get DefaultFileFormControl() {
3993
+ var _a;
3994
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.defaultFile;
3984
3995
  }
3985
- get DevOpsActionLookupFormControl() {
3986
- return this.DevOpsSourceControlFormGroup.get('devOpsActionLookup');
3996
+ get DefaultSourceControl() {
3997
+ var _a, _b, _c, _d;
3998
+ return {
3999
+ Organization: (_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Organization,
4000
+ Repository: (_d = (_c = this.EditingApplication) === null || _c === void 0 ? void 0 : _c.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Repository,
4001
+ };
3987
4002
  }
3988
- get DevOpsActions() {
3989
- return this.Environment.DevOpsActions || {};
4003
+ get InboundPathFormControl() {
4004
+ var _a;
4005
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.inboundPath;
3990
4006
  }
3991
- get EditingSourceControl() {
3992
- var _a, _b;
3993
- let sc = ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources)
3994
- ? (_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Sources[this.EditingSourceControlLookup]
3995
- : null;
3996
- if (sc == null && this.EditingSourceControlLookup) {
3997
- sc = {};
3998
- }
3999
- return sc;
4007
+ get IncludeRequestFormControl() {
4008
+ var _a;
4009
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.includeRequest;
4000
4010
  }
4001
- get MainBranchFormControl() {
4002
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'mainBranch');
4011
+ get MethodsFormControl() {
4012
+ var _a;
4013
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.methods;
4003
4014
  }
4004
- get OrganizationFormControl() {
4005
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'organization');
4015
+ get PackageFormControl() {
4016
+ var _a;
4017
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.package;
4006
4018
  }
4007
- get RepositoryFormControl() {
4008
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'repository');
4019
+ get PermanentFormControl() {
4020
+ var _a;
4021
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.permanent;
4009
4022
  }
4010
- get State() {
4011
- return this.eacSvc.State;
4023
+ get PreserveMethodFormControl() {
4024
+ var _a;
4025
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.preserveMethod;
4012
4026
  }
4013
- // Life Cycle
4014
- ngAfterViewInit() { }
4015
- ngOnDestroy() {
4016
- this.destroyFormControls();
4027
+ get RedirectFormControl() {
4028
+ var _a;
4029
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.redirect;
4017
4030
  }
4018
- ngOnInit() {
4019
- console.log("source control lookup", this.EditingSourceControlLookup);
4020
- if (this.EditingSourceControlLookup === null) {
4021
- this.CreateNewSourceControl();
4022
- }
4023
- console.log("source control", this.EditingSourceControl);
4024
- if (this.EditingSourceControl != null) {
4025
- this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
4026
- this.setupFormControls();
4027
- }
4028
- this.RefreshOrganizations();
4031
+ get ScopesFormControl() {
4032
+ var _a;
4033
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.scopes;
4029
4034
  }
4030
- // API Methods
4031
- AddBranchOption(event) {
4032
- this.addBranchOption(event.value);
4033
- event.input.value = '';
4035
+ get SecurityFormControl() {
4036
+ var _a;
4037
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.security;
4034
4038
  }
4035
- BranchOptionSelected(event) {
4036
- this.addBranchOption(event.option.value);
4039
+ get State() {
4040
+ return this.eacSvc.State;
4037
4041
  }
4038
- BranchesChanged(branches) {
4039
- this.loadProjectHostingDetails();
4042
+ get SourceControls() {
4043
+ var _a;
4044
+ return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources) || {};
4040
4045
  }
4041
- BuildPathChanged(event) {
4042
- //do something??
4046
+ get SourceControlFormControl() {
4047
+ var _a;
4048
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.sourceControl;
4043
4049
  }
4044
- CreateNewSourceControl() {
4045
- this.SetEditingSourceControl(Guid.CreateRaw());
4050
+ get SPARootFormControl() {
4051
+ var _a;
4052
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.spaRoot;
4046
4053
  }
4047
- CreateRepository() {
4048
- this.CreatingRepository = true;
4049
- this.RepositoryFormControl.reset();
4054
+ get TokenLookupFormControl() {
4055
+ var _a;
4056
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.tokenLookup;
4050
4057
  }
4051
- CancelCreateRepository() {
4052
- this.CreatingRepository = false;
4058
+ get ValidFormControls() {
4059
+ let vfc = new Array();
4060
+ for (const field in this.ProcessorDetailsFormGroup.controls) {
4061
+ const control = this.ProcessorDetailsFormGroup.get(field);
4062
+ if (control.valid) {
4063
+ vfc.push(control);
4064
+ }
4065
+ }
4066
+ // console.log("VFC=", vfc)
4067
+ return vfc;
4053
4068
  }
4054
- DevOpsActionLookupChanged(event) {
4055
- this.configureDevOpsAction();
4069
+ get VersionFormControl() {
4070
+ var _a;
4071
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.version;
4056
4072
  }
4057
- MainBranchChanged(event) {
4058
- this.emitBranchesChanged();
4073
+ get ZipFileFormControl() {
4074
+ var _a;
4075
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.zipFile;
4059
4076
  }
4060
- OrganizationChanged(event) {
4061
- const org = this.OrganizationFormControl;
4062
- this.RepositoryFormControl.reset();
4063
- if (this.UseBranches) {
4064
- this.BranchesFormControl.reset();
4065
- this.SelectedBranches = [];
4077
+ ngOnInit() {
4078
+ if (!this.EditingApplication) {
4079
+ this.CreateNewApplication();
4066
4080
  }
4067
- this.listRepositories();
4068
- }
4069
- RefreshOrganizations() {
4070
- var _a, _b, _c;
4071
- // this.Loading = true;
4072
- this.listOrganizations();
4073
- (_a = this.OrganizationFormControl) === null || _a === void 0 ? void 0 : _a.reset();
4074
- (_b = this.RepositoryFormControl) === null || _b === void 0 ? void 0 : _b.reset();
4075
- if (this.UseBranches) {
4076
- (_c = this.BranchesFormControl) === null || _c === void 0 ? void 0 : _c.reset();
4081
+ else {
4082
+ this.setupProcessorDetailsForm();
4077
4083
  }
4078
4084
  }
4079
- RemoveBranchOption(option) {
4080
- const index = this.SelectedBranches.indexOf(option);
4081
- if (index >= 0) {
4082
- this.SelectedBranches.splice(index, 1);
4083
- }
4084
- this.emitBranchesChanged();
4085
+ CreateNewApplication() {
4086
+ this.SetEditingApplication(Guid.CreateRaw());
4085
4087
  }
4086
- RepositoryChanged(event) {
4087
- const repo = this.RepositoryFormControl;
4088
- if (this.UseBranches) {
4089
- this.BranchesFormControl.reset();
4090
- this.SelectedBranches = [];
4091
- this.listBranches();
4088
+ DetermineTooltipText() {
4089
+ let permanentValue = this.PermanentFormControl.value;
4090
+ let preserveValue = this.PreserveMethodFormControl.value;
4091
+ if (permanentValue === true && preserveValue === false) {
4092
+ this.redirectTooltip = '301 – Permanent and Not Preserve';
4092
4093
  }
4093
- if (!this.UseBranches) {
4094
- this.listBuildPaths();
4094
+ else if (permanentValue === false && preserveValue === false) {
4095
+ this.redirectTooltip = '302 – Not Permanent and Not Preserve';
4096
+ }
4097
+ else if (permanentValue === false && preserveValue === true) {
4098
+ this.redirectTooltip = '307 – Not Permanent and Preserve';
4099
+ }
4100
+ else if (permanentValue === true && preserveValue === true) {
4101
+ this.redirectTooltip = '308 – Permanent and Preserve';
4095
4102
  }
4096
4103
  }
4097
- SaveRepository() {
4098
- this.Loading = true;
4099
- const org = this.OrganizationFormControl.value;
4100
- const repoName = this.RepositoryFormControl.value;
4101
- this.appsFlowSvc
4102
- .CreateRepository(org, repoName)
4103
- .subscribe((response) => {
4104
- if (response.Status.Code === 0) {
4105
- this.listRepositories(repoName);
4106
- this.CreatingRepository = false;
4107
- }
4108
- else {
4109
- // TODO: Need to surface an error to the user...
4110
- this.Loading = false;
4111
- }
4104
+ SaveProcessorDetails() {
4105
+ var _a, _b, _c, _d;
4106
+ const app = this.EditingApplication;
4107
+ app.LookupConfig.AllowedMethods = (_b = (_a = this.MethodsFormControl) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.split(' ').filter((v) => !!v);
4108
+ app.Processor.Type = this.ProcessorType;
4109
+ switch (app.Processor.Type) {
4110
+ case 'DFS':
4111
+ app.Processor.DefaultFile =
4112
+ this.DefaultFileFormControl.value || 'index.html';
4113
+ app.LowCodeUnit = {
4114
+ Type: this.LCUType,
4115
+ };
4116
+ switch (app.LowCodeUnit.Type) {
4117
+ case 'GitHub':
4118
+ app.LowCodeUnit.Organization =
4119
+ (_c = this.SourceControls[this.SourceControlFormControl.value]) === null || _c === void 0 ? void 0 : _c.Organization;
4120
+ app.LowCodeUnit.Repository =
4121
+ (_d = this.SourceControls[this.SourceControlFormControl.value]) === null || _d === void 0 ? void 0 : _d.Repository;
4122
+ app.LowCodeUnit.Build = this.BuildFormControl.value;
4123
+ app.LowCodeUnit.Path = this.BuildPathFormControl.value;
4124
+ app.LowCodeUnit.SourceControlLookup =
4125
+ this.SourceControlFormControl.value;
4126
+ break;
4127
+ case 'NPM':
4128
+ app.LowCodeUnit.Package = this.PackageFormControl.value;
4129
+ app.LowCodeUnit.Version = this.VersionFormControl.value;
4130
+ break;
4131
+ case 'WordPress':
4132
+ app.LowCodeUnit.APIRoot = this.APIRootFormControl.value;
4133
+ break;
4134
+ case 'Zip':
4135
+ app.LowCodeUnit.ZipFile = this.ZipFileFormControl.value;
4136
+ break;
4137
+ }
4138
+ break;
4139
+ case 'OAuth':
4140
+ app.Processor.Scopes = this.ScopesFormControl.value.split(' ');
4141
+ app.Processor.TokenLookup = this.TokenLookupFormControl.value;
4142
+ app.LowCodeUnit = {
4143
+ Type: this.LCUType,
4144
+ };
4145
+ switch (app.LowCodeUnit.Type) {
4146
+ case 'GitHubOAuth':
4147
+ app.LowCodeUnit.ClientID = this.ClientIDFormControl.value;
4148
+ app.LowCodeUnit.ClientSecret = this.ClientSecretFormControl.value;
4149
+ break;
4150
+ }
4151
+ break;
4152
+ case 'Proxy':
4153
+ app.Processor.InboundPath = this.InboundPathFormControl.value;
4154
+ app.LowCodeUnit = {
4155
+ Type: this.LCUType,
4156
+ };
4157
+ switch (app.LowCodeUnit.Type) {
4158
+ case 'API':
4159
+ app.LowCodeUnit.APIRoot = this.APIRootFormControl.value;
4160
+ app.LowCodeUnit.Security = this.SecurityFormControl.value;
4161
+ break;
4162
+ case 'SPA':
4163
+ app.LowCodeUnit.SPARoot = this.SPARootFormControl.value;
4164
+ break;
4165
+ }
4166
+ break;
4167
+ case 'Redirect':
4168
+ app.Processor.IncludeRequest = !!this.IncludeRequestFormControl.value;
4169
+ app.Processor.Permanent = !!this.PermanentFormControl.value;
4170
+ app.Processor.PreserveMethod = !!this.PreserveMethodFormControl.value;
4171
+ app.Processor.Redirect = this.RedirectFormControl.value;
4172
+ break;
4173
+ }
4174
+ if (!app.LookupConfig.PathRegex.startsWith('/')) {
4175
+ app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
4176
+ }
4177
+ const saveAppReq = {
4178
+ ProjectLookup: this.ProjectLookup,
4179
+ Application: app,
4180
+ ApplicationLookup: this.EditingApplicationLookup || Guid.CreateRaw(),
4181
+ };
4182
+ this.eacSvc.SaveApplicationAsCode(saveAppReq).then((res) => {
4183
+ this.SaveFormEvent.emit(res);
4112
4184
  });
4113
4185
  }
4114
- SetEditingSourceControl(scLookup) {
4115
- this.EditingSourceControlLookup = scLookup;
4186
+ SetEditingApplication(appLookup) {
4187
+ this.EditingApplication = new EaCApplicationAsCode();
4188
+ this.EditingApplicationLookup = appLookup;
4189
+ this.setupProcessorDetailsForm();
4116
4190
  }
4117
- SubmitSourceControl() {
4118
- console.log('source control submitted: ', this.DevOpsSourceControlFormGroup.value);
4119
- this.SaveSourceControl();
4191
+ SourceControlChanged(event) {
4192
+ this.listBuildPaths();
4120
4193
  }
4121
- SaveSourceControl() {
4122
- const saveEnvReq = {
4123
- Environment: Object.assign(Object.assign({}, this.Environment), { Sources: this.Environment.Sources || {} }),
4124
- EnvironmentLookup: this.EnvironmentLookup,
4125
- EnterpriseDataTokens: {},
4126
- };
4127
- let source = Object.assign(Object.assign({}, this.EditingSourceControl), { Branches: this.SelectedBranches, MainBranch: this.MainBranchFormControl.value });
4128
- source = Object.assign(Object.assign({}, source), { Type: 'GitHub', Name: `@${this.OrganizationFormControl.value}/${this.RepositoryFormControl.value}`, DevOpsActionTriggerLookups: [this.DevOpsActionLookup], Organization: this.OrganizationFormControl.value, Repository: this.RepositoryFormControl.value });
4129
- const scLookup = `github://${source.Organization}/${source.Repository}`;
4130
- saveEnvReq.Environment.Sources[scLookup] = source;
4131
- console.log('save SC: ', saveEnvReq);
4132
- let resp = this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
4133
- resp.then((res) => {
4134
- this.SaveStatusEvent.emit(res);
4135
- });
4194
+ ProcessorTypeChanged(event) {
4195
+ this.ProcessorType = event.value;
4196
+ this.setupProcessorTypeSubForm();
4136
4197
  }
4137
- // Helpers
4138
- addBranchOption(value) {
4139
- value = (value || '').trim();
4140
- if (value && this.SelectedBranches.indexOf(value) < 0) {
4141
- this.SelectedBranches.push(value);
4142
- }
4143
- this.BranchesInput.nativeElement.blur();
4144
- this.emitBranchesChanged();
4145
- }
4146
- configureDevOpsAction() {
4147
- setTimeout(() => {
4148
- this.DevOpsActionLookupFormControl.setValue(this.DevOpsActionLookup);
4149
- }, 0);
4150
- }
4151
- destroyFormControls() {
4152
- var _a, _b, _c, _d;
4153
- this.DevOpsSourceControlFormGroup.removeControl([this.SourceControlRoot, 'mainBranch'].join(''));
4154
- (_a = this.DevOpsSourceControlFormGroup) === null || _a === void 0 ? void 0 : _a.removeControl([this.SourceControlRoot, 'branches'].join(''));
4155
- (_b = this.DevOpsSourceControlFormGroup) === null || _b === void 0 ? void 0 : _b.removeControl([this.SourceControlRoot, 'buildPath'].join(''));
4156
- this.SelectedBranches = [];
4157
- (_c = this.DevOpsSourceControlFormGroup) === null || _c === void 0 ? void 0 : _c.removeControl([this.SourceControlRoot, 'organization'].join(''));
4158
- (_d = this.DevOpsSourceControlFormGroup) === null || _d === void 0 ? void 0 : _d.removeControl([this.SourceControlRoot, 'repository'].join(''));
4198
+ LCUTypeChanged(event) {
4199
+ this.LCUType = event.value;
4200
+ this.setupLcuTypeSubForm();
4159
4201
  }
4160
- emitBranchesChanged() {
4161
- var _a, _b;
4162
- if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
4163
- (!this.MainBranchFormControl.value ||
4164
- this.SelectedBranches.indexOf(this.MainBranchFormControl.value) < 0)) {
4165
- this.MainBranchFormControl.setValue(this.SelectedBranches.find((branch) => branch === 'main' || branch === 'master') || this.SelectedBranches[0]);
4166
- }
4167
- else if (((_b = this.SelectedBranches) === null || _b === void 0 ? void 0 : _b.length) <= 0) {
4168
- this.MainBranchFormControl.reset();
4169
- }
4170
- this.BranchesFormControl.setValue(this.SelectedBranches.join(','));
4171
- this.BranchesChanged(this.SelectedBranches || []);
4202
+ //HELPERS
4203
+ cleanupLcuTypeSubForm() {
4204
+ this.ProcessorDetailsFormGroup.removeControl('methods');
4205
+ this.ProcessorDetailsFormGroup.removeControl('apiRoot');
4206
+ this.ProcessorDetailsFormGroup.removeControl('security');
4207
+ this.ProcessorDetailsFormGroup.removeControl('spaRoot');
4208
+ this.ProcessorDetailsFormGroup.removeControl('applicationId');
4209
+ this.ProcessorDetailsFormGroup.removeControl('sourceControl');
4210
+ this.ProcessorDetailsFormGroup.removeControl('build');
4211
+ this.ProcessorDetailsFormGroup.removeControl('clientId');
4212
+ this.ProcessorDetailsFormGroup.removeControl('clientSecret');
4213
+ this.ProcessorDetailsFormGroup.removeControl('package');
4214
+ this.ProcessorDetailsFormGroup.removeControl('version');
4215
+ this.ProcessorDetailsFormGroup.removeControl('zipFile');
4172
4216
  }
4173
- listBranches() {
4174
- if (this.UseBranches) {
4175
- this.Loading = true;
4176
- this.appsFlowSvc
4177
- .ListBranches(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
4178
- .subscribe((response) => {
4179
- var _a, _b, _c;
4180
- this.BranchOptions = response.Model;
4181
- this.Loading = false;
4182
- if (((_b = (_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Branches) === null || _b === void 0 ? void 0 : _b.length) > 0) {
4183
- this.SelectedBranches = this.EditingSourceControl.Branches;
4184
- }
4185
- else if (((_c = this.BranchOptions) === null || _c === void 0 ? void 0 : _c.length) === 1) {
4186
- this.BranchesFormControl.setValue(this.BranchOptions[0].Name);
4187
- this.SelectedBranches = [this.BranchOptions[0].Name];
4188
- }
4189
- this.emitBranchesChanged();
4190
- this.listBuildPaths();
4191
- });
4192
- }
4217
+ cleanupProcessorTypeSubForm() {
4218
+ this.ProcessorDetailsFormGroup.removeControl('defaultFile');
4219
+ // this.ApplicationFormGroup.removeControl('dfsLcuType');
4220
+ // this.ApplicationFormGroup.removeControl('oauthLcuType');
4221
+ this.ProcessorDetailsFormGroup.removeControl('scopes');
4222
+ this.ProcessorDetailsFormGroup.removeControl('tokenLookup');
4223
+ this.ProcessorDetailsFormGroup.removeControl('inboundPath');
4224
+ this.ProcessorDetailsFormGroup.removeControl('proxyLcuType');
4225
+ this.ProcessorDetailsFormGroup.removeControl('includeRequest');
4226
+ this.ProcessorDetailsFormGroup.removeControl('redirect');
4227
+ this.ProcessorDetailsFormGroup.removeControl('permanent');
4228
+ this.ProcessorDetailsFormGroup.removeControl('preserveMethod');
4229
+ this.cleanupLcuTypeSubForm();
4193
4230
  }
4194
4231
  listBuildPaths() {
4195
- if (this.UseBuildPath) {
4196
- this.Loading = true;
4197
- this.appsFlowSvc
4198
- .ListBuildPaths(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
4199
- .subscribe((response) => {
4200
- var _a;
4201
- this.BuildPathOptions = response.Model;
4202
- this.Loading = false;
4203
- if (((_a = this.BuildPathOptions) === null || _a === void 0 ? void 0 : _a.length) === 1) {
4204
- this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
4205
- }
4206
- });
4207
- }
4208
- }
4209
- listOrganizations() {
4210
- this.Loading = true;
4232
+ var _a, _b;
4233
+ this.State.Loading = true;
4234
+ console.log("Source Control: ", this.SourceControls[this.SourceControlFormControl.value]);
4211
4235
  this.appsFlowSvc
4212
- .ListOrganizations()
4236
+ .ListBuildPaths((_a = this.SourceControls[this.SourceControlFormControl.value]) === null || _a === void 0 ? void 0 : _a.Organization, (_b = this.SourceControls[this.SourceControlFormControl.value]) === null || _b === void 0 ? void 0 : _b.Repository)
4213
4237
  .subscribe((response) => {
4214
- var _a;
4215
- this.OrganizationOptions = response.Model;
4216
- console.log("Organization Options: ", this.OrganizationOptions);
4217
- this.Loading = false;
4218
- if ((_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Organization) {
4219
- setTimeout(() => {
4220
- var _a;
4221
- this.OrganizationFormControl.setValue(this.EditingSourceControl.Organization);
4222
- this.listRepositories((_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Repository);
4223
- }, 0);
4224
- }
4238
+ this.BuildPathOptions = response.Model;
4239
+ console.log("build path options: ", this.BuildPathOptions);
4240
+ this.State.Loading = false;
4241
+ // if (this.BuildPathOptions?.length === 1) {
4242
+ // this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
4243
+ // }
4225
4244
  });
4226
4245
  }
4227
- listRepositories(activeRepo = null) {
4228
- this.Loading = true;
4229
- this.appsFlowSvc
4230
- .ListRepositories(this.OrganizationFormControl.value)
4231
- .subscribe((response) => {
4232
- var _a;
4233
- this.RepositoryOptions = response.Model;
4234
- this.Loading = false;
4235
- if (activeRepo) {
4236
- setTimeout(() => {
4237
- this.RepositoryFormControl.setValue(activeRepo);
4238
- this.listBranches();
4239
- if (!this.UseBranches) {
4240
- this.listBuildPaths();
4241
- }
4242
- }, 0);
4243
- }
4244
- else if (((_a = this.RepositoryOptions) === null || _a === void 0 ? void 0 : _a.length) <= 0) {
4245
- this.CreatingRepository = true;
4246
+ setupLcuTypeSubForm() {
4247
+ this.cleanupLcuTypeSubForm();
4248
+ if (this.LCUType) {
4249
+ switch (this.LCUType) {
4250
+ case 'API':
4251
+ this.setupLCUAPIForm();
4252
+ break;
4253
+ case 'ApplicationPointer':
4254
+ this.setupLCUApplicationPointerForm();
4255
+ break;
4256
+ case 'GitHub':
4257
+ this.setupLCUGitHubForm();
4258
+ break;
4259
+ case 'GitHubOAuth':
4260
+ this.setupLCUGitHubOAuthForm();
4261
+ break;
4262
+ case 'WordPress':
4263
+ this.setupLCUWordPressForm();
4264
+ break;
4265
+ // case 'NPM':
4266
+ // this.setupLCUNPMForm();
4267
+ // break;
4268
+ case 'SPA':
4269
+ this.setupLCUSPAForm();
4270
+ break;
4271
+ case 'Zip':
4272
+ this.setupLCUZipForm();
4273
+ break;
4246
4274
  }
4247
- });
4275
+ }
4248
4276
  }
4249
- loadProjectHostingDetails() {
4250
- var _a;
4251
- if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0) {
4252
- this.HostingDetails.Loading = true;
4253
- this.appsFlowSvc
4254
- .LoadProjectHostingDetails()
4255
- .subscribe((response) => {
4256
- this.HostingDetails = response.Model;
4257
- this.HostingDetails.Loading = false;
4258
- this.configureDevOpsAction();
4259
- }, (err) => {
4260
- this.HostingDetails.Loading = false;
4277
+ setupProcessorDetailsForm() {
4278
+ var _a, _b;
4279
+ this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
4280
+ // console.log('EDITING APP = ', this.EditingApplication);
4281
+ if (this.EditingApplication != null) {
4282
+ this.ProcessorDetailsFormGroup = this.formBldr.group({
4283
+ procType: [this.ProcessorType, [Validators.required]],
4261
4284
  });
4285
+ // this.setupDfsForm();
4286
+ // this.setupLcuTypeSubForm();
4287
+ this.setupProcessorTypeSubForm();
4262
4288
  }
4263
4289
  }
4264
- setupFormControls() {
4265
- var _a, _b, _c, _d, _e, _f, _g;
4266
- this.destroyFormControls();
4267
- console.log("Source Control: ", this.EditingSourceControl);
4268
- this.DevOpsSourceControlFormGroup.addControl('devOpsActionLookup', new FormControl(this.DevOpsActionLookup || '', []));
4269
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'organization'].join(''), new FormControl((_a = this.EditingSourceControl.Organization) !== null && _a !== void 0 ? _a : '', Validators.required));
4270
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'repository'].join(''), new FormControl((_b = this.EditingSourceControl.Repository) !== null && _b !== void 0 ? _b : '', Validators.required));
4271
- if (this.UseBranches) {
4272
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'branches'].join(''), new FormControl((_d = (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.Branches) !== null && _d !== void 0 ? _d : '', Validators.required));
4273
- this.SelectedBranches = (_e = this.EditingSourceControl) === null || _e === void 0 ? void 0 : _e.Branches;
4274
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'mainBranch'].join(''), new FormControl((_f = this.EditingSourceControl.MainBranch) !== null && _f !== void 0 ? _f : '', Validators.required));
4275
- }
4276
- if (this.UseBuildPath) {
4277
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'buildPath'].join(''), new FormControl((_g = this.BuildPath) !== null && _g !== void 0 ? _g : '', Validators.required));
4278
- }
4290
+ setupLCUGitHubForm() {
4291
+ var _a, _b, _c;
4292
+ console.log('EditingApplication: ', this.EditingApplication);
4293
+ this.ProcessorDetailsFormGroup.addControl('sourceControl', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SourceControlLookup) || '', [Validators.required]));
4294
+ this.ProcessorDetailsFormGroup.addControl('buildPath', this.formBldr.control(((_b = this.EditingApplication.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Path) || '', [
4295
+ Validators.required,
4296
+ ]));
4297
+ this.ProcessorDetailsFormGroup.addControl('build', this.formBldr.control(((_c = this.EditingApplication.LowCodeUnit) === null || _c === void 0 ? void 0 : _c.Build) || 'latest', [Validators.required]));
4298
+ this.listBuildPaths();
4279
4299
  }
4280
- }
4281
- DevopsSourceControlFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DevopsSourceControlFormComponent, deps: [{ token: ApplicationsFlowService }, { token: EaCService }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
4282
- DevopsSourceControlFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: DevopsSourceControlFormComponent, selector: "lcu-devops-source-control-form", inputs: { EditingSourceControlLookup: ["editing-source-control-lookup", "EditingSourceControlLookup"], Environment: ["environment", "Environment"], EnvironmentLookup: ["environment-lookup", "EnvironmentLookup"] }, outputs: { SaveStatusEvent: "save-status-event" }, viewQueries: [{ propertyName: "BranchesInput", first: true, predicate: ["branches"], descendants: true }], ngImport: i0, template: "<form \n class=\"form-card\" \n [formGroup]=\"DevOpsSourceControlFormGroup\" \n (ngSubmit)=\"SubmitSourceControl()\"\n>\n\n <!-- <mat-card class=\"spread\" class=\"sc-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title> Source Control </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-icon matSuffix matTooltip=\"Configure source control, DevOps CI/CD, and artifacts.\">\n info_outline\n </mat-icon>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n\n <ng-container *ngIf=\"State?.Loading\">\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader>\n\n <!-- <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block> -->\n\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n\n <div class=\"card\">\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select \n formControlName=\"devOpsActionLookup\" \n placeholder=\"DevOps Action\"\n [disabled]=\"HostingDetails?.Loading\" \n (selectionChange)=\"DevOpsActionLookupChanged($event)\"\n >\n <ng-container *ngFor=\"let devOpsActionLookup of DevOpsActionLookups\">\n <mat-option \n [value]=\"devOpsActionLookup\" \n *ngIf=\"DevOpsActions[devOpsActionLookup]; let devOpsAction\">\n {{ devOpsAction.Name }}\n </mat-option>\n </ng-container>\n\n <mat-option value=\"\">-- Create New --</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"card\" *ngIf=\"OrganizationFormControl?.valid || !Loading\">\n <mat-form-field \n class=\"mat-full-width with-hint margin-bottom\" \n *ngIf=\"OrganizationOptions?.length > 0\"\n >\n <mat-icon class=\"org-icon\" matPrefix>corporate_fare</mat-icon>\n\n <mat-select \n [formControlName]=\"SourceControlRoot + 'organization'\" \n placeholder=\"Organization\"\n (selectionChange)=\"OrganizationChanged($event)\" \n [disabled]=\"Loading || HostingDetails?.Loading\" \n required\n >\n <ng-container *ngFor=\"let orgOpt of OrganizationOptions\">\n <mat-option [value]=\"orgOpt.Name\">\n {{ orgOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\" matTooltip=\"Refresh Organization\" color=\"accent\"> refresh </mat-icon>\n\n <a matSuffix href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon color=\"accent\" matTooltip=\"Re-authorize Organizations\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" class=\"primary-link\" target=\"_blank\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n RepositoryFormControl?.valid ||\n (OrganizationFormControl?.valid && !Loading)\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>description</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'repository'\" [placeholder]=\"\n OrganizationFormControl?.valid\n ? 'Repository'\n : 'Repository (select organization first)'\n \" [disabled]=\"\n !OrganizationFormControl?.valid || Loading || HostingDetails?.Loading\n \" (selectionChange)=\"RepositoryChanged($event)\" *ngIf=\"!CreatingRepository\" required>\n <ng-container *ngFor=\"let repoOpt of RepositoryOptions\">\n <mat-option [value]=\"repoOpt.Name\">\n {{ repoOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <input matInput placeholder=\"Repository (creates new if does not exist)\"\n [formControlName]=\"SourceControlRoot + 'repository'\" *ngIf=\"CreatingRepository\"\n [fxHide]=\"Loading || HostingDetails?.Loading\" required />\n\n <mat-icon matSuffix (click)=\"CreateRepository()\" [fxHide]=\"Loading || HostingDetails?.Loading\"\n *ngIf=\"!CreatingRepository && OrganizationFormControl?.valid\">\n add_circle\n </mat-icon>\n\n <button mat-button type=\"button\" (click)=\"SaveRepository()\"\n *ngIf=\"CreatingRepository && RepositoryFormControl?.valid\">\n\n <mat-icon matSuffix color=\"primary\">\n save\n </mat-icon>\n </button>\n\n <button mat-button type=\"button\" (click)=\"CancelCreateRepository()\" *ngIf=\"CreatingRepository\">\n\n <mat-icon matSuffix>\n cancel\n </mat-icon>\n </button>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BranchesFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBranches\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-label>Selected Branches</mat-label>\n\n <mat-autocomplete (optionSelected)=\"BranchOptionSelected($event)\" #branchOptions=\"matAutocomplete\">\n <ng-container *ngFor=\"let branchOpt of BranchOptions\">\n <mat-option [value]=\"branchOpt.Name\">\n {{ branchOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n\n <mat-chip-list #selectedBranches>\n <mat-chip [removable]=\"true\" (removed)=\"RemoveBranchOption(selBranch)\"\n *ngFor=\"let selBranch of SelectedBranches\">\n {{ selBranch }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n\n <input matInput placeholder=\"New Branch...\" [formControlName]=\"SourceControlRoot + 'branches'\" #branches\n [matAutocomplete]=\"branchOptions\" [matChipInputFor]=\"selectedBranches\"\n [matChipInputSeparatorKeyCodes]=\"SeparatorKeysCodes\" [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"AddBranchOption($event)\" [disabled]=\"Loading || HostingDetails?.Loading\"\n required />\n </mat-chip-list>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width with-hint\" [fxShow]=\"SelectedBranches?.length > 1\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'mainBranch'\" placeholder=\"Main Branch\"\n [disabled]=\"Loading || HostingDetails?.Loading\" (selectionChange)=\"MainBranchChanged($event)\" required>\n <ng-container *ngFor=\"let branch of SelectedBranches\">\n <mat-option [value]=\"branch\">\n {{ branch }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\" color=\"accent\"> refresh </mat-icon>\n\n <a matSuffix mat-icon-button href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon matTooltip=\"Re-authorize Organizations\" color=\"accent\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" target=\"_blank\"class=\"primary-link\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BuildPathFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBuildPath\n \">\n <mat-form-field class=\"mat-full-width with-hint\">\n <mat-icon class=\"org-icon\" matPrefix>build</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'buildPath'\" placeholder=\"Build Path\"\n [disabled]=\"Loading || BuildPathDisabled\" (selectionChange)=\"BuildPathChanged($event)\" required>\n <ng-container *ngFor=\"let buildPath of BuildPathOptions\">\n <mat-option [value]=\"buildPath\">\n {{ buildPath }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-hint>\n The build path identifies which build action to use for your\n configuration.\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngIf=\"Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n\n <div class=\"margin-3\">\n <h4 class=\"mat-title\" *ngIf=\"!OrganizationFormControl?.valid\">\n Loading organizations\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n OrganizationFormControl?.valid && !RepositoryFormControl?.valid\n \">\n Loading repositories\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"RepositoryFormControl?.valid && !BranchesFormControl?.valid\">\n Loading branches\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n (RepositoryFormControl?.valid || BranchesFormControl?.valid) &&\n !BuildPathFormControl?.valid\n \">\n Loading build paths\n </h4>\n </div>\n </div>\n </div>\n </ng-container>\n <!-- </div> -->\n\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\"> -->\n\n <!-- <button \n mat-raised-button \n *ngIf=\"!State?.Loading\"\n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!DevOpsSourceControlFormGroup.valid || !DevOpsSourceControlFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Source Control\n </button>\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader> -->\n \n <!-- </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>", styles: [".form-card,.sc-card{width:100%}.margin-bottom{margin-bottom:15px}.primary-link{color:#4a918e;text-decoration:none}.s-block{margin:10px 0;width:100%;height:40px}\n"], components: [{ type: i3.LoaderComponent, selector: "lcu-loader", inputs: ["diameter", "hide-inner", "loading"] }, { type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i9$2.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i4.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }], directives: [{ type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.MatPrefix, selector: "[matPrefix]" }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$1.MatSuffix, selector: "[matSuffix]" }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i9$1.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { type: i4$1.MatLabel, selector: "mat-label" }, { type: i9$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i9$2.MatChipRemove, selector: "[matChipRemove]" }, { type: i8$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i9$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }] });
4283
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DevopsSourceControlFormComponent, decorators: [{
4284
- type: Component,
4285
- args: [{ selector: 'lcu-devops-source-control-form', template: "<form \n class=\"form-card\" \n [formGroup]=\"DevOpsSourceControlFormGroup\" \n (ngSubmit)=\"SubmitSourceControl()\"\n>\n\n <!-- <mat-card class=\"spread\" class=\"sc-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title> Source Control </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-icon matSuffix matTooltip=\"Configure source control, DevOps CI/CD, and artifacts.\">\n info_outline\n </mat-icon>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n\n <ng-container *ngIf=\"State?.Loading\">\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader>\n\n <!-- <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block> -->\n\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n\n <div class=\"card\">\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select \n formControlName=\"devOpsActionLookup\" \n placeholder=\"DevOps Action\"\n [disabled]=\"HostingDetails?.Loading\" \n (selectionChange)=\"DevOpsActionLookupChanged($event)\"\n >\n <ng-container *ngFor=\"let devOpsActionLookup of DevOpsActionLookups\">\n <mat-option \n [value]=\"devOpsActionLookup\" \n *ngIf=\"DevOpsActions[devOpsActionLookup]; let devOpsAction\">\n {{ devOpsAction.Name }}\n </mat-option>\n </ng-container>\n\n <mat-option value=\"\">-- Create New --</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"card\" *ngIf=\"OrganizationFormControl?.valid || !Loading\">\n <mat-form-field \n class=\"mat-full-width with-hint margin-bottom\" \n *ngIf=\"OrganizationOptions?.length > 0\"\n >\n <mat-icon class=\"org-icon\" matPrefix>corporate_fare</mat-icon>\n\n <mat-select \n [formControlName]=\"SourceControlRoot + 'organization'\" \n placeholder=\"Organization\"\n (selectionChange)=\"OrganizationChanged($event)\" \n [disabled]=\"Loading || HostingDetails?.Loading\" \n required\n >\n <ng-container *ngFor=\"let orgOpt of OrganizationOptions\">\n <mat-option [value]=\"orgOpt.Name\">\n {{ orgOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\" matTooltip=\"Refresh Organization\" color=\"accent\"> refresh </mat-icon>\n\n <a matSuffix href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon color=\"accent\" matTooltip=\"Re-authorize Organizations\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" class=\"primary-link\" target=\"_blank\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n RepositoryFormControl?.valid ||\n (OrganizationFormControl?.valid && !Loading)\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>description</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'repository'\" [placeholder]=\"\n OrganizationFormControl?.valid\n ? 'Repository'\n : 'Repository (select organization first)'\n \" [disabled]=\"\n !OrganizationFormControl?.valid || Loading || HostingDetails?.Loading\n \" (selectionChange)=\"RepositoryChanged($event)\" *ngIf=\"!CreatingRepository\" required>\n <ng-container *ngFor=\"let repoOpt of RepositoryOptions\">\n <mat-option [value]=\"repoOpt.Name\">\n {{ repoOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <input matInput placeholder=\"Repository (creates new if does not exist)\"\n [formControlName]=\"SourceControlRoot + 'repository'\" *ngIf=\"CreatingRepository\"\n [fxHide]=\"Loading || HostingDetails?.Loading\" required />\n\n <mat-icon matSuffix (click)=\"CreateRepository()\" [fxHide]=\"Loading || HostingDetails?.Loading\"\n *ngIf=\"!CreatingRepository && OrganizationFormControl?.valid\">\n add_circle\n </mat-icon>\n\n <button mat-button type=\"button\" (click)=\"SaveRepository()\"\n *ngIf=\"CreatingRepository && RepositoryFormControl?.valid\">\n\n <mat-icon matSuffix color=\"primary\">\n save\n </mat-icon>\n </button>\n\n <button mat-button type=\"button\" (click)=\"CancelCreateRepository()\" *ngIf=\"CreatingRepository\">\n\n <mat-icon matSuffix>\n cancel\n </mat-icon>\n </button>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BranchesFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBranches\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-label>Selected Branches</mat-label>\n\n <mat-autocomplete (optionSelected)=\"BranchOptionSelected($event)\" #branchOptions=\"matAutocomplete\">\n <ng-container *ngFor=\"let branchOpt of BranchOptions\">\n <mat-option [value]=\"branchOpt.Name\">\n {{ branchOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n\n <mat-chip-list #selectedBranches>\n <mat-chip [removable]=\"true\" (removed)=\"RemoveBranchOption(selBranch)\"\n *ngFor=\"let selBranch of SelectedBranches\">\n {{ selBranch }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n\n <input matInput placeholder=\"New Branch...\" [formControlName]=\"SourceControlRoot + 'branches'\" #branches\n [matAutocomplete]=\"branchOptions\" [matChipInputFor]=\"selectedBranches\"\n [matChipInputSeparatorKeyCodes]=\"SeparatorKeysCodes\" [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"AddBranchOption($event)\" [disabled]=\"Loading || HostingDetails?.Loading\"\n required />\n </mat-chip-list>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width with-hint\" [fxShow]=\"SelectedBranches?.length > 1\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'mainBranch'\" placeholder=\"Main Branch\"\n [disabled]=\"Loading || HostingDetails?.Loading\" (selectionChange)=\"MainBranchChanged($event)\" required>\n <ng-container *ngFor=\"let branch of SelectedBranches\">\n <mat-option [value]=\"branch\">\n {{ branch }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\" color=\"accent\"> refresh </mat-icon>\n\n <a matSuffix mat-icon-button href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon matTooltip=\"Re-authorize Organizations\" color=\"accent\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" target=\"_blank\"class=\"primary-link\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BuildPathFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBuildPath\n \">\n <mat-form-field class=\"mat-full-width with-hint\">\n <mat-icon class=\"org-icon\" matPrefix>build</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'buildPath'\" placeholder=\"Build Path\"\n [disabled]=\"Loading || BuildPathDisabled\" (selectionChange)=\"BuildPathChanged($event)\" required>\n <ng-container *ngFor=\"let buildPath of BuildPathOptions\">\n <mat-option [value]=\"buildPath\">\n {{ buildPath }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-hint>\n The build path identifies which build action to use for your\n configuration.\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngIf=\"Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n\n <div class=\"margin-3\">\n <h4 class=\"mat-title\" *ngIf=\"!OrganizationFormControl?.valid\">\n Loading organizations\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n OrganizationFormControl?.valid && !RepositoryFormControl?.valid\n \">\n Loading repositories\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"RepositoryFormControl?.valid && !BranchesFormControl?.valid\">\n Loading branches\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n (RepositoryFormControl?.valid || BranchesFormControl?.valid) &&\n !BuildPathFormControl?.valid\n \">\n Loading build paths\n </h4>\n </div>\n </div>\n </div>\n </ng-container>\n <!-- </div> -->\n\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\"> -->\n\n <!-- <button \n mat-raised-button \n *ngIf=\"!State?.Loading\"\n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!DevOpsSourceControlFormGroup.valid || !DevOpsSourceControlFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Source Control\n </button>\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader> -->\n \n <!-- </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>", styles: [".form-card,.sc-card{width:100%}.margin-bottom{margin-bottom:15px}.primary-link{color:#4a918e;text-decoration:none}.s-block{margin:10px 0;width:100%;height:40px}\n"] }]
4286
- }], ctorParameters: function () { return [{ type: ApplicationsFlowService }, { type: EaCService }, { type: i1$2.FormBuilder }]; }, propDecorators: { EditingSourceControlLookup: [{
4287
- type: Input,
4288
- args: ['editing-source-control-lookup']
4289
- }], Environment: [{
4290
- type: Input,
4291
- args: ['environment']
4292
- }], EnvironmentLookup: [{
4293
- type: Input,
4294
- args: ['environment-lookup']
4295
- }], SaveStatusEvent: [{
4296
- type: Output,
4297
- args: ['save-status-event']
4298
- }], BranchesInput: [{
4299
- type: ViewChild,
4300
- args: ['branches']
4301
- }] } });
4302
-
4303
- class SourceControlDialogComponent {
4304
- constructor(dialogRef, eacSvc, data, snackBar) {
4305
- this.dialogRef = dialogRef;
4306
- this.eacSvc = eacSvc;
4307
- this.data = data;
4308
- this.snackBar = snackBar;
4300
+ setupLCUApplicationPointerForm() {
4301
+ var _a;
4302
+ this.ProcessorDetailsFormGroup.addControl('applicationId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ApplicationID) || '', [Validators.required]));
4309
4303
  }
4310
- get DevOpsSourceControlFormGroup() {
4304
+ setupLCUSPAForm() {
4311
4305
  var _a;
4312
- return (_a = this.DevopsSourceControl) === null || _a === void 0 ? void 0 : _a.DevOpsSourceControlFormGroup;
4306
+ this.ProcessorDetailsFormGroup.addControl('spaRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SPARoot) || '', [Validators.required]));
4313
4307
  }
4314
- get HasConnection() {
4315
- return this.State.GitHub.HasConnection;
4308
+ setupLCUAPIForm() {
4309
+ var _a, _b, _c, _d;
4310
+ this.ProcessorDetailsFormGroup.addControl('methods', this.formBldr.control(((_b = (_a = this.EditingApplication.LookupConfig) === null || _a === void 0 ? void 0 : _a.AllowedMethods) === null || _b === void 0 ? void 0 : _b.join(' ')) || '', []));
4311
+ this.ProcessorDetailsFormGroup.addControl('apiRoot', this.formBldr.control(((_c = this.EditingApplication.LowCodeUnit) === null || _c === void 0 ? void 0 : _c.APIRoot) || '', [Validators.required]));
4312
+ this.ProcessorDetailsFormGroup.addControl('security', this.formBldr.control(((_d = this.EditingApplication.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Security) || '', [Validators.required]));
4313
+ }
4314
+ setupLCUGitHubOAuthForm() {
4315
+ var _a, _b;
4316
+ this.ProcessorDetailsFormGroup.addControl('clientId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ClientID) || '', [Validators.required]));
4317
+ this.ProcessorDetailsFormGroup.addControl('clientSecret', this.formBldr.control(((_b = this.EditingApplication.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.ClientSecret) || '', [Validators.required]));
4318
+ }
4319
+ setupLCUWordPressForm() {
4320
+ var _a;
4321
+ this.ProcessorDetailsFormGroup.addControl('apiRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.APIRoot) || '', [Validators.required]));
4322
+ }
4323
+ setupProxyForm() {
4324
+ var _a, _b;
4325
+ this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
4326
+ this.ProcessorDetailsFormGroup.addControl('inboundPath', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.InboundPath) || '', [Validators.required]));
4327
+ this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
4328
+ }
4329
+ setupRedirectForm() {
4330
+ var _a, _b, _c, _d;
4331
+ this.ProcessorDetailsFormGroup.addControl('redirect', this.formBldr.control(((_a = this.EditingApplication.Processor) === null || _a === void 0 ? void 0 : _a.Redirect) || '', [
4332
+ Validators.required,
4333
+ ]));
4334
+ this.ProcessorDetailsFormGroup.addControl('permanent', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.Permanent) || false, []));
4335
+ this.ProcessorDetailsFormGroup.addControl('preserveMethod', this.formBldr.control(((_c = this.EditingApplication.Processor) === null || _c === void 0 ? void 0 : _c.PreserveMethod) || false, []));
4336
+ this.ProcessorDetailsFormGroup.addControl('includeRequest', this.formBldr.control(((_d = this.EditingApplication.Processor) === null || _d === void 0 ? void 0 : _d.IncludeRequest) || false, []));
4337
+ this.DetermineTooltipText();
4338
+ }
4339
+ setupOAuthForm() {
4340
+ var _a, _b, _c, _d;
4341
+ this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
4342
+ this.ProcessorDetailsFormGroup.addControl('scopes', this.formBldr.control(((_c = (_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.Scopes) === null || _c === void 0 ? void 0 : _c.Join(' ')) || '', [Validators.required]));
4343
+ this.ProcessorDetailsFormGroup.addControl('tokenLookup', this.formBldr.control(((_d = this.EditingApplication.Processor) === null || _d === void 0 ? void 0 : _d.TokenLookup) || '', [Validators.required]));
4344
+ this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
4345
+ }
4346
+ setupLCUZipForm() {
4347
+ var _a;
4348
+ this.ProcessorDetailsFormGroup.addControl('zipFile', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ZipFile) || '', [Validators.required]));
4349
+ }
4350
+ setupDfsForm() {
4351
+ var _a, _b;
4352
+ this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
4353
+ this.ProcessorDetailsFormGroup.addControl('defaultFile', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.DefaultFile) || 'index.html', [Validators.required]));
4354
+ this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
4355
+ }
4356
+ setupProcessorTypeSubForm() {
4357
+ this.cleanupProcessorTypeSubForm();
4358
+ if (this.ProcessorType) {
4359
+ switch (this.ProcessorType) {
4360
+ case 'DFS':
4361
+ this.setupDfsForm();
4362
+ break;
4363
+ case 'OAuth':
4364
+ this.setupOAuthForm();
4365
+ break;
4366
+ case 'Proxy':
4367
+ this.setupProxyForm();
4368
+ break;
4369
+ case 'Redirect':
4370
+ this.setupRedirectForm();
4371
+ break;
4372
+ }
4373
+ }
4374
+ this.setupLcuTypeSubForm();
4375
+ }
4376
+ }
4377
+ ProcessorDetailsFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ProcessorDetailsFormComponent, deps: [{ token: ApplicationsFlowService }, { token: i1$2.FormBuilder }, { token: EaCService }], target: i0.ɵɵFactoryTarget.Component });
4378
+ ProcessorDetailsFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: ProcessorDetailsFormComponent, selector: "lcu-processor-details-form", inputs: { EditingApplication: ["editing-application", "EditingApplication"], EditingApplicationLookup: ["editing-application-lookup", "EditingApplicationLookup"], HasSaveButton: ["has-save-button", "HasSaveButton"], SourceControlLookups: ["source-control-lookups", "SourceControlLookups"], ProjectLookup: ["project-lookup", "ProjectLookup"] }, outputs: { SaveFormEvent: "save-form-event" }, ngImport: i0, template: "<form class=\"processor-details-form\" [formGroup]=\"ProcessorDetailsFormGroup\" (ngSubmit)=\"SaveProcessorDetails()\">\n<!-- <mat-card class=\"spread flow-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title> Processor Details </mat-card-title>\n </mat-card-header> -->\n\n <ng-container *ngIf=\"State?.Loading\">\n\n <ng-container *ngFor=\"let fc of ValidFormControls\">\n\n <skeleton-block \n [id]=\"fc\"\n class=\"s-block\" \n effect=\"wave\"\n ></skeleton-block>\n \n </ng-container>\n\n <lcu-loader *ngIf=\"LCUType === 'Redirect'\" [loading]=\"State?.Loading\"></lcu-loader>\n\n </ng-container>\n <!-- END SKELETON -->\n\n <ng-container *ngIf=\"!State?.Loading\">\n\n <!-- <mat-card-content> -->\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"procType\"\n (selectionChange)=\"ProcessorTypeChanged($event)\"\n required\n >\n <mat-option value=\"DFS\">View Package</mat-option>\n\n <mat-option value=\"Redirect\">Redirect</mat-option>\n\n <mat-option value=\"Proxy\">Proxy</mat-option>\n\n <mat-option value=\"OAuth\">OAuth</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"ProcessorType\">\n <div *ngSwitchCase=\"'DFS'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Default File\"\n formControlName=\"defaultFile\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"NPM\">NPM</mat-option>\n\n <mat-option value=\"GitHub\">GitHub</mat-option>\n\n <mat-option value=\"WordPress\">WordPress</mat-option>\n\n <!-- <mat-option value=\"Zip\">Zip</mat-option> -->\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHub'\">\n <!-- <lcu-source-control-form-controls\n [build-path]=\"EditingApplication?.LowCodeUnit?.Path\"\n [form-group]=\"ProcessorDetailsFormGroup\"\n [source-control]=\"DefaultSourceControl\"\n [use-branches]=\"false\"\n [use-build-path]=\"true\"\n ></lcu-source-control-form-controls> -->\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Source Control\"\n formControlName=\"sourceControl\"\n (selectionChange)=\"SourceControlChanged($event)\"\n required\n >\n <mat-option \n *ngFor=\"let scLookup of SourceControlLookups\" \n [value]=\"scLookup\">\n {{scLookup}}\n </mat-option>\n \n \n <!-- <mat-option value=\"Zip\">Zip</mat-option> -->\n </mat-select>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width with-hint\"\n *ngIf=\"\n SourceControlFormControl?.valid\n \"\n > \n <mat-select\n formControlName=\"buildPath\"\n placeholder=\"Build Path\"\n required\n >\n <ng-container *ngFor=\"let buildPath of BuildPathOptions\">\n <mat-option [value]=\"buildPath\">\n {{ buildPath }}\n </mat-option>\n </ng-container>\n </mat-select>\n \n <mat-hint>\n The build path identifies which build action to use for your\n configuration.\n </mat-hint>\n </mat-form-field>\n\n <mat-form-field\n class=\"mat-full-width\"\n *ngIf=\"\n SourceControlFormControl?.valid\n \"\n >\n <input\n matInput\n placeholder=\"Build\"\n formControlName=\"build\"\n required\n />\n\n <mat-hint>\n Current Build:\n {{ EditingApplication?.LowCodeUnit?.CurrentBuild }}\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'NPM'\">\n <lcu-npm-package-select\n [npm-package]=\"EditingApplication?.LowCodeUnit?.Package\"\n [npm-package-version]=\"\n EditingApplication?.LowCodeUnit?.Version\n \"\n [form-group]=\"ProcessorDetailsFormGroup\"\n ></lcu-npm-package-select>\n\n <mat-hint>\n Current Version:\n {{ EditingApplication?.LowCodeUnit?.CurrentVersion }}\n </mat-hint>\n </div>\n\n <div *ngSwitchCase=\"'WordPress'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"API Root\"\n formControlName=\"apiRoot\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'OAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Scopes (space separated)\"\n formControlName=\"scopes\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Token Lookup\"\n formControlName=\"tokenLookup\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"GitHubOAuth\">GitHub</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHubOAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client ID\"\n formControlName=\"clientId\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client Secret\"\n formControlName=\"clientSecret\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Proxy'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Inbound Path\"\n formControlName=\"inboundPath\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"API\">API</mat-option>\n\n <mat-option value=\"SPA\">Single Page Application</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'API'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"API Root\"\n formControlName=\"apiRoot\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Allowed Methods (separate with spaces)\"\n formControlName=\"methods\"\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Security ({header}~{value})\"\n formControlName=\"security\"\n required\n />\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'SPA'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"SPA Root\"\n formControlName=\"spaRoot\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Redirect'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Redirect URL\"\n formControlName=\"redirect\"\n required\n />\n </mat-form-field>\n\n <div>\n <mat-slide-toggle \n class=\"spread\" \n formControlName=\"permanent\">\n Is Permanent?\n </mat-slide-toggle>\n\n <mat-slide-toggle\n class=\"spread\"\n formControlName=\"preserveMethod\"\n >\n Preserve Method?\n </mat-slide-toggle>\n\n <mat-icon\n class=\"spread\"\n matSuffix\n (mouseenter)=\"DetermineTooltipText()\"\n matTooltip={{redirectTooltip}}\n >\n info_outline\n </mat-icon>\n\n \n </div>\n \n <div>\n <mat-slide-toggle \n class=\"spread\" \n formControlName=\"includeRequest\">\n Include Path and Query?\n </mat-slide-toggle>\n\n <mat-icon\n class=\"spread\"\n matSuffix\n matTooltip=\"Should the redirect include the path and query?\"\n >\n info_outline\n </mat-icon>\n </div>\n </div>\n </div>\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\"> -->\n\n <!-- <button \n *ngIf=\"HasSaveButton && !State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ProcessorDetailsFormGroup.valid || !ProcessorDetailsFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Processor Details\n </button> -->\n <!-- <lcu-loader *ngIf=\"HasSaveButton\" [loading]=\"State?.Loading\"></lcu-loader> -->\n\n <!-- </mat-card-actions> -->\n\n </ng-container>\n \n<!-- </mat-card> -->\n</form>\n \n", styles: [".s-block{margin:10px 0;width:100%;height:40px}\n"], components: [{ type: i4$3.SkeletonBlockComponent, selector: "skeleton-block", inputs: ["width", "height", "effect", "borderRadius"] }, { type: i3.LoaderComponent, selector: "lcu-loader", inputs: ["diameter", "hide-inner", "loading"] }, { type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: NpmPackageSelectComponent, selector: "lcu-npm-package-select", inputs: ["npm-package", "npm-package-version", "form-group"] }, { type: i12$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i9.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i9.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i4$1.MatSuffix, selector: "[matSuffix]" }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
4379
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ProcessorDetailsFormComponent, decorators: [{
4380
+ type: Component,
4381
+ args: [{ selector: 'lcu-processor-details-form', template: "<form class=\"processor-details-form\" [formGroup]=\"ProcessorDetailsFormGroup\" (ngSubmit)=\"SaveProcessorDetails()\">\n<!-- <mat-card class=\"spread flow-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title> Processor Details </mat-card-title>\n </mat-card-header> -->\n\n <ng-container *ngIf=\"State?.Loading\">\n\n <ng-container *ngFor=\"let fc of ValidFormControls\">\n\n <skeleton-block \n [id]=\"fc\"\n class=\"s-block\" \n effect=\"wave\"\n ></skeleton-block>\n \n </ng-container>\n\n <lcu-loader *ngIf=\"LCUType === 'Redirect'\" [loading]=\"State?.Loading\"></lcu-loader>\n\n </ng-container>\n <!-- END SKELETON -->\n\n <ng-container *ngIf=\"!State?.Loading\">\n\n <!-- <mat-card-content> -->\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"procType\"\n (selectionChange)=\"ProcessorTypeChanged($event)\"\n required\n >\n <mat-option value=\"DFS\">View Package</mat-option>\n\n <mat-option value=\"Redirect\">Redirect</mat-option>\n\n <mat-option value=\"Proxy\">Proxy</mat-option>\n\n <mat-option value=\"OAuth\">OAuth</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"ProcessorType\">\n <div *ngSwitchCase=\"'DFS'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Default File\"\n formControlName=\"defaultFile\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"NPM\">NPM</mat-option>\n\n <mat-option value=\"GitHub\">GitHub</mat-option>\n\n <mat-option value=\"WordPress\">WordPress</mat-option>\n\n <!-- <mat-option value=\"Zip\">Zip</mat-option> -->\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHub'\">\n <!-- <lcu-source-control-form-controls\n [build-path]=\"EditingApplication?.LowCodeUnit?.Path\"\n [form-group]=\"ProcessorDetailsFormGroup\"\n [source-control]=\"DefaultSourceControl\"\n [use-branches]=\"false\"\n [use-build-path]=\"true\"\n ></lcu-source-control-form-controls> -->\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Source Control\"\n formControlName=\"sourceControl\"\n (selectionChange)=\"SourceControlChanged($event)\"\n required\n >\n <mat-option \n *ngFor=\"let scLookup of SourceControlLookups\" \n [value]=\"scLookup\">\n {{scLookup}}\n </mat-option>\n \n \n <!-- <mat-option value=\"Zip\">Zip</mat-option> -->\n </mat-select>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width with-hint\"\n *ngIf=\"\n SourceControlFormControl?.valid\n \"\n > \n <mat-select\n formControlName=\"buildPath\"\n placeholder=\"Build Path\"\n required\n >\n <ng-container *ngFor=\"let buildPath of BuildPathOptions\">\n <mat-option [value]=\"buildPath\">\n {{ buildPath }}\n </mat-option>\n </ng-container>\n </mat-select>\n \n <mat-hint>\n The build path identifies which build action to use for your\n configuration.\n </mat-hint>\n </mat-form-field>\n\n <mat-form-field\n class=\"mat-full-width\"\n *ngIf=\"\n SourceControlFormControl?.valid\n \"\n >\n <input\n matInput\n placeholder=\"Build\"\n formControlName=\"build\"\n required\n />\n\n <mat-hint>\n Current Build:\n {{ EditingApplication?.LowCodeUnit?.CurrentBuild }}\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'NPM'\">\n <lcu-npm-package-select\n [npm-package]=\"EditingApplication?.LowCodeUnit?.Package\"\n [npm-package-version]=\"\n EditingApplication?.LowCodeUnit?.Version\n \"\n [form-group]=\"ProcessorDetailsFormGroup\"\n ></lcu-npm-package-select>\n\n <mat-hint>\n Current Version:\n {{ EditingApplication?.LowCodeUnit?.CurrentVersion }}\n </mat-hint>\n </div>\n\n <div *ngSwitchCase=\"'WordPress'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"API Root\"\n formControlName=\"apiRoot\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'OAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Scopes (space separated)\"\n formControlName=\"scopes\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Token Lookup\"\n formControlName=\"tokenLookup\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"GitHubOAuth\">GitHub</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHubOAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client ID\"\n formControlName=\"clientId\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client Secret\"\n formControlName=\"clientSecret\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Proxy'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Inbound Path\"\n formControlName=\"inboundPath\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"API\">API</mat-option>\n\n <mat-option value=\"SPA\">Single Page Application</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'API'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"API Root\"\n formControlName=\"apiRoot\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Allowed Methods (separate with spaces)\"\n formControlName=\"methods\"\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Security ({header}~{value})\"\n formControlName=\"security\"\n required\n />\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'SPA'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"SPA Root\"\n formControlName=\"spaRoot\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Redirect'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Redirect URL\"\n formControlName=\"redirect\"\n required\n />\n </mat-form-field>\n\n <div>\n <mat-slide-toggle \n class=\"spread\" \n formControlName=\"permanent\">\n Is Permanent?\n </mat-slide-toggle>\n\n <mat-slide-toggle\n class=\"spread\"\n formControlName=\"preserveMethod\"\n >\n Preserve Method?\n </mat-slide-toggle>\n\n <mat-icon\n class=\"spread\"\n matSuffix\n (mouseenter)=\"DetermineTooltipText()\"\n matTooltip={{redirectTooltip}}\n >\n info_outline\n </mat-icon>\n\n \n </div>\n \n <div>\n <mat-slide-toggle \n class=\"spread\" \n formControlName=\"includeRequest\">\n Include Path and Query?\n </mat-slide-toggle>\n\n <mat-icon\n class=\"spread\"\n matSuffix\n matTooltip=\"Should the redirect include the path and query?\"\n >\n info_outline\n </mat-icon>\n </div>\n </div>\n </div>\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\"> -->\n\n <!-- <button \n *ngIf=\"HasSaveButton && !State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ProcessorDetailsFormGroup.valid || !ProcessorDetailsFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Processor Details\n </button> -->\n <!-- <lcu-loader *ngIf=\"HasSaveButton\" [loading]=\"State?.Loading\"></lcu-loader> -->\n\n <!-- </mat-card-actions> -->\n\n </ng-container>\n \n<!-- </mat-card> -->\n</form>\n \n", styles: [".s-block{margin:10px 0;width:100%;height:40px}\n"] }]
4382
+ }], ctorParameters: function () { return [{ type: ApplicationsFlowService }, { type: i1$2.FormBuilder }, { type: EaCService }]; }, propDecorators: { EditingApplication: [{
4383
+ type: Input,
4384
+ args: ['editing-application']
4385
+ }], EditingApplicationLookup: [{
4386
+ type: Input,
4387
+ args: ['editing-application-lookup']
4388
+ }], HasSaveButton: [{
4389
+ type: Input,
4390
+ args: ['has-save-button']
4391
+ }], SourceControlLookups: [{
4392
+ type: Input,
4393
+ args: ['source-control-lookups']
4394
+ }], ProjectLookup: [{
4395
+ type: Input,
4396
+ args: ['project-lookup']
4397
+ }], SaveFormEvent: [{
4398
+ type: Output,
4399
+ args: ['save-form-event']
4400
+ }] } });
4401
+
4402
+ class NewApplicationDialogComponent {
4403
+ constructor(eacSvc, dialogRef, data, snackBar) {
4404
+ this.eacSvc = eacSvc;
4405
+ this.dialogRef = dialogRef;
4406
+ this.data = data;
4407
+ this.snackBar = snackBar;
4408
+ this.HasSaveButton = false;
4409
+ }
4410
+ get Environment() {
4411
+ var _a, _b;
4412
+ return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[this.data.environmentLookup];
4413
+ }
4414
+ get SourceControls() {
4415
+ var _a;
4416
+ return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources) || {};
4417
+ }
4418
+ get SourceControlLookups() {
4419
+ return Object.keys(this.Environment.Sources || {});
4316
4420
  }
4317
4421
  get State() {
4318
4422
  return this.eacSvc.State;
4319
4423
  }
4320
4424
  ngOnInit() {
4425
+ this.SetupApplication(Guid.CreateRaw());
4321
4426
  }
4322
4427
  CloseDialog() {
4323
4428
  this.dialogRef.close();
4324
4429
  }
4325
- HandleSaveStatusEvent(event) {
4326
- console.log("event to save: ", event);
4327
- if (event.Code === 0) {
4328
- this.snackBar.open("Source Control Succesfully Saved", "Dismiss", {
4430
+ SetupApplication(appLookup) {
4431
+ this.NewApplication = new EaCApplicationAsCode;
4432
+ this.NewApplicationLookup = appLookup;
4433
+ }
4434
+ SaveApplication() {
4435
+ var _a, _b;
4436
+ const app = {
4437
+ Application: {
4438
+ Name: this.ApplicationFormControls.NameFormControl.value,
4439
+ Description: this.ApplicationFormControls.DescriptionFormControl.value,
4440
+ PriorityShift: 0,
4441
+ },
4442
+ AccessRightLookups: [],
4443
+ DataTokens: {},
4444
+ LicenseConfigurationLookups: [],
4445
+ LookupConfig: {
4446
+ IsPrivate: false,
4447
+ IsTriggerSignIn: false,
4448
+ PathRegex: `${this.ApplicationFormControls.RouteFormControl.value}.*`,
4449
+ QueryRegex: '',
4450
+ HeaderRegex: '',
4451
+ AllowedMethods: (_b = (_a = this.ProcessorDetailsFormControls.MethodsFormControl) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.split(' ').filter((v) => !!v),
4452
+ },
4453
+ Processor: {
4454
+ Type: this.ProcessorDetailsFormControls.ProcessorType,
4455
+ },
4456
+ };
4457
+ switch (app.Processor.Type) {
4458
+ case 'DFS':
4459
+ app.Processor.BaseHref = `${this.ApplicationFormControls.RouteFormControl.value}/`.replace('//', '/');
4460
+ app.Processor.DefaultFile =
4461
+ this.ProcessorDetailsFormControls.DefaultFileFormControl.value || 'index.html';
4462
+ app.LowCodeUnit = {
4463
+ Type: this.ProcessorDetailsFormControls.LCUType,
4464
+ };
4465
+ switch (app.LowCodeUnit.Type) {
4466
+ case 'GitHub':
4467
+ app.LowCodeUnit.Organization =
4468
+ this.SourceControls[this.ProcessorDetailsFormControls.SourceControlFormControl.value].Organization;
4469
+ app.LowCodeUnit.Repository =
4470
+ this.SourceControls[this.ProcessorDetailsFormControls.SourceControlFormControl.value].Repository;
4471
+ app.LowCodeUnit.Build = this.ProcessorDetailsFormControls.BuildFormControl.value;
4472
+ app.LowCodeUnit.Path =
4473
+ this.ProcessorDetailsFormControls.BuildPathFormControl.value;
4474
+ break;
4475
+ case 'NPM':
4476
+ app.LowCodeUnit.Package = this.ProcessorDetailsFormControls.PackageFormControl.value;
4477
+ app.LowCodeUnit.Version = this.ProcessorDetailsFormControls.VersionFormControl.value;
4478
+ break;
4479
+ case 'Zip':
4480
+ app.LowCodeUnit.ZipFile = this.ProcessorDetailsFormControls.ZipFileFormControl.value;
4481
+ break;
4482
+ }
4483
+ break;
4484
+ case 'OAuth':
4485
+ app.Processor.Scopes = this.ProcessorDetailsFormControls.ScopesFormControl.value.split(' ');
4486
+ app.Processor.TokenLookup = this.ProcessorDetailsFormControls.TokenLookupFormControl.value;
4487
+ app.LowCodeUnit = {
4488
+ Type: this.ProcessorDetailsFormControls.LCUType,
4489
+ };
4490
+ switch (app.LowCodeUnit.Type) {
4491
+ case 'GitHubOAuth':
4492
+ app.LowCodeUnit.ClientID = this.ProcessorDetailsFormControls.ClientIDFormControl.value;
4493
+ app.LowCodeUnit.ClientSecret = this.ProcessorDetailsFormControls.ClientSecretFormControl.value;
4494
+ break;
4495
+ }
4496
+ break;
4497
+ case 'Proxy':
4498
+ app.Processor.InboundPath = this.ProcessorDetailsFormControls.InboundPathFormControl.value;
4499
+ app.LowCodeUnit = {
4500
+ Type: this.ProcessorDetailsFormControls.LCUType,
4501
+ };
4502
+ switch (app.LowCodeUnit.Type) {
4503
+ case 'API':
4504
+ app.LowCodeUnit.APIRoot = this.ProcessorDetailsFormControls.APIRootFormControl.value;
4505
+ app.LowCodeUnit.Security = this.ProcessorDetailsFormControls.SecurityFormControl.value;
4506
+ break;
4507
+ case 'SPA':
4508
+ app.LowCodeUnit.SPARoot = this.ProcessorDetailsFormControls.SPARootFormControl.value;
4509
+ break;
4510
+ }
4511
+ break;
4512
+ case 'Redirect':
4513
+ app.Processor.Permanent = !!this.ProcessorDetailsFormControls.PermanentFormControl.value;
4514
+ app.Processor.PreserveMethod = !!this.ProcessorDetailsFormControls.PreserveMethodFormControl.value;
4515
+ app.Processor.Redirect = this.ProcessorDetailsFormControls.RedirectFormControl.value;
4516
+ break;
4517
+ }
4518
+ if (!app.LookupConfig.PathRegex.startsWith('/')) {
4519
+ app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
4520
+ }
4521
+ const saveAppReq = {
4522
+ ProjectLookup: this.data.projectLookup,
4523
+ Application: app,
4524
+ ApplicationLookup: this.NewApplicationLookup,
4525
+ };
4526
+ // this.HasBuildFormControl.value && taken out from below if statement
4527
+ if (this.ProcessorDetailsFormControls.ProcessorType !== 'redirect' && this.ProcessorDetailsFormControls.LCUType === 'GitHub') {
4528
+ if (app) {
4529
+ app.LowCodeUnit.SourceControlLookup = this.ProcessorDetailsFormControls.SourceControlFormControl.value;
4530
+ }
4531
+ }
4532
+ else if (app) {
4533
+ app.LowCodeUnit.SourceControlLookup = null;
4534
+ }
4535
+ // console.log("Save new App request: ", saveAppReq);
4536
+ this.eacSvc.SaveApplicationAsCode(saveAppReq).then(res => {
4537
+ this.handleSaveStatus(res);
4538
+ });
4539
+ }
4540
+ handleSaveStatus(status) {
4541
+ console.log("event to save: ", status);
4542
+ if (status.Code === 0) {
4543
+ this.snackBar.open("Application Succesfully Created", "Dismiss", {
4329
4544
  duration: 5000
4330
4545
  });
4331
4546
  this.CloseDialog();
4332
4547
  }
4333
4548
  else {
4334
- this.ErrorMessage = event.Message;
4549
+ this.ErrorMessage = status.Message;
4335
4550
  }
4336
4551
  }
4337
- SaveSourceControl() {
4338
- this.DevopsSourceControl.SaveSourceControl();
4339
- }
4340
4552
  }
4341
- SourceControlDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, deps: [{ token: i2$2.MatDialogRef }, { token: EaCService }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
4342
- SourceControlDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: SourceControlDialogComponent, selector: "lcu-source-control-dialog", viewQueries: [{ propertyName: "DevopsSourceControl", first: true, predicate: DevopsSourceControlFormComponent, descendants: true }], ngImport: i0, template: "\n<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Source Control</h2>\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n\n <ng-container *ngIf=\"!HasConnection\">\n \n <lcu-git-auth></lcu-git-auth>\n\n </ng-container>\n\n <ng-conatiner *ngIf=\"HasConnection\" fxLayout=\"column\">\n\n <div fxLayoutAlign=\"center center\">\n <lcu-devops-source-control-form\n [environment]=\"data.environment\"\n [environment-lookup]=\"data.environmentLookup\"\n [editing-source-control-lookup]=\"data.scLookup\"\n (save-status-event)=\"HandleSaveStatusEvent($event)\">\n </lcu-devops-source-control-form>\n </div>\n \n <mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n </mat-error>\n\n </ng-conatiner>\n\n</mat-dialog-content>\n\n<mat-dialog-actions \n class=\"actions-container\" \n div fxLayout=\"row\" \n fxLayoutAlign=\"end center\"\n>\n <button \n class=\"action-button\"\n mat-raised-button\n fxFlex=\"25%\"\n (click)=\"CloseDialog()\">\n Cancel\n\n </button>\n\n\n\n <button \n class=\"action-button\"\n mat-raised-button \n *ngIf=\"!State?.Loading\" \n fxFlex=\"25%\" \n color=\"primary\" \n (click)=\"SaveSourceControl()\"\n [disabled]=\"!DevOpsSourceControlFormGroup?.valid || !DevOpsSourceControlFormGroup?.dirty\">\n <!-- <mat-icon>save</mat-icon> -->\n Save\n </button>\n\n</mat-dialog-actions>\n\n\n\n", styles: [".dialog-header{width:100%}.action-button{margin:0 10px}\n"], components: [{ type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: GitAuthComponent, selector: "lcu-git-auth" }, { type: DevopsSourceControlFormComponent, selector: "lcu-devops-source-control-form", inputs: ["editing-source-control-lookup", "environment", "environment-lookup"], outputs: ["save-status-event"] }], directives: [{ type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i2$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { type: i2$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
4343
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, decorators: [{
4553
+ NewApplicationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: NewApplicationDialogComponent, deps: [{ token: EaCService }, { token: i2$2.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
4554
+ NewApplicationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: NewApplicationDialogComponent, selector: "lcu-new-application-dialog", viewQueries: [{ propertyName: "ApplicationFormControls", first: true, predicate: EditApplicationFormComponent, descendants: true }, { propertyName: "ProcessorDetailsFormControls", first: true, predicate: ProcessorDetailsFormComponent, descendants: true }], ngImport: i0, template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Create Application</h2>\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n\n <lcu-edit-application-form \n [current-route]=\"data.currentRoute\"\n [editing-application]=\"NewApplication\"\n [has-save-button]=\"HasSaveButton\"\n >\n </lcu-edit-application-form>\n\n <lcu-processor-details-form \n [editing-application]=\"NewApplication\"\n [editing-application-lookup]=\"NewApplicationLookup\"\n [has-save-button]=\"HasSaveButton\"\n [source-control-lookups]=\"SourceControlLookups\"\n [project-lookup]=\"data.projectLookup\"\n >\n </lcu-processor-details-form>\n\n <mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n </mat-error>\n</mat-dialog-content>\n\n<mat-dialog-actions\n class=\"actions-container\" \n div fxLayout=\"row\" \n fxLayoutAlign=\"end center\"\n>\n\n <button \n class=\"action-button\"\n mat-raised-button\n fxFlex=\"25%\"\n (click)=\"CloseDialog()\"\n >\n Cancel\n </button>\n\n\n <button \n *ngIf=\"ProcessorDetailsFormControls && ApplicationFormControls && !State?.Loading\"\n mat-raised-button \n color=\"primary\"\n fxFlex=\"25%\"\n class=\"new-app-submit\" \n (click)=\"SaveApplication()\"\n [disabled]=\"\n !ProcessorDetailsFormControls?.ProcessorDetailsFormGroup?.valid \n || \n !ApplicationFormControls?.ApplicationFormGroup?.valid\n \"\n >\n Save Application\n </button>\n</mat-dialog-actions>\n\n\n", styles: [""], components: [{ type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: EditApplicationFormComponent, selector: "lcu-edit-application-form", inputs: ["application-lookup", "current-route", "editing-application", "has-save-button", "project-lookup"], outputs: ["save-form-event"] }, { type: ProcessorDetailsFormComponent, selector: "lcu-processor-details-form", inputs: ["editing-application", "editing-application-lookup", "has-save-button", "source-control-lookups", "project-lookup"], outputs: ["save-form-event"] }], directives: [{ type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i2$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { type: i2$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
4555
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: NewApplicationDialogComponent, decorators: [{
4344
4556
  type: Component,
4345
- args: [{ selector: 'lcu-source-control-dialog', template: "\n<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Source Control</h2>\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n\n <ng-container *ngIf=\"!HasConnection\">\n \n <lcu-git-auth></lcu-git-auth>\n\n </ng-container>\n\n <ng-conatiner *ngIf=\"HasConnection\" fxLayout=\"column\">\n\n <div fxLayoutAlign=\"center center\">\n <lcu-devops-source-control-form\n [environment]=\"data.environment\"\n [environment-lookup]=\"data.environmentLookup\"\n [editing-source-control-lookup]=\"data.scLookup\"\n (save-status-event)=\"HandleSaveStatusEvent($event)\">\n </lcu-devops-source-control-form>\n </div>\n \n <mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n </mat-error>\n\n </ng-conatiner>\n\n</mat-dialog-content>\n\n<mat-dialog-actions \n class=\"actions-container\" \n div fxLayout=\"row\" \n fxLayoutAlign=\"end center\"\n>\n <button \n class=\"action-button\"\n mat-raised-button\n fxFlex=\"25%\"\n (click)=\"CloseDialog()\">\n Cancel\n\n </button>\n\n\n\n <button \n class=\"action-button\"\n mat-raised-button \n *ngIf=\"!State?.Loading\" \n fxFlex=\"25%\" \n color=\"primary\" \n (click)=\"SaveSourceControl()\"\n [disabled]=\"!DevOpsSourceControlFormGroup?.valid || !DevOpsSourceControlFormGroup?.dirty\">\n <!-- <mat-icon>save</mat-icon> -->\n Save\n </button>\n\n</mat-dialog-actions>\n\n\n\n", styles: [".dialog-header{width:100%}.action-button{margin:0 10px}\n"] }]
4557
+ args: [{ selector: 'lcu-new-application-dialog', template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Create Application</h2>\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n\n <lcu-edit-application-form \n [current-route]=\"data.currentRoute\"\n [editing-application]=\"NewApplication\"\n [has-save-button]=\"HasSaveButton\"\n >\n </lcu-edit-application-form>\n\n <lcu-processor-details-form \n [editing-application]=\"NewApplication\"\n [editing-application-lookup]=\"NewApplicationLookup\"\n [has-save-button]=\"HasSaveButton\"\n [source-control-lookups]=\"SourceControlLookups\"\n [project-lookup]=\"data.projectLookup\"\n >\n </lcu-processor-details-form>\n\n <mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n </mat-error>\n</mat-dialog-content>\n\n<mat-dialog-actions\n class=\"actions-container\" \n div fxLayout=\"row\" \n fxLayoutAlign=\"end center\"\n>\n\n <button \n class=\"action-button\"\n mat-raised-button\n fxFlex=\"25%\"\n (click)=\"CloseDialog()\"\n >\n Cancel\n </button>\n\n\n <button \n *ngIf=\"ProcessorDetailsFormControls && ApplicationFormControls && !State?.Loading\"\n mat-raised-button \n color=\"primary\"\n fxFlex=\"25%\"\n class=\"new-app-submit\" \n (click)=\"SaveApplication()\"\n [disabled]=\"\n !ProcessorDetailsFormControls?.ProcessorDetailsFormGroup?.valid \n || \n !ApplicationFormControls?.ApplicationFormGroup?.valid\n \"\n >\n Save Application\n </button>\n</mat-dialog-actions>\n\n\n", styles: [""] }]
4346
4558
  }], ctorParameters: function () {
4347
- return [{ type: i2$2.MatDialogRef }, { type: EaCService }, { type: undefined, decorators: [{
4559
+ return [{ type: EaCService }, { type: i2$2.MatDialogRef }, { type: undefined, decorators: [{
4348
4560
  type: Inject,
4349
4561
  args: [MAT_DIALOG_DATA]
4350
4562
  }] }, { type: i3$1.MatSnackBar }];
4351
- }, propDecorators: { DevopsSourceControl: [{
4563
+ }, propDecorators: { ApplicationFormControls: [{
4352
4564
  type: ViewChild,
4353
- args: [DevopsSourceControlFormComponent]
4565
+ args: [EditApplicationFormComponent]
4566
+ }], ProcessorDetailsFormControls: [{
4567
+ type: ViewChild,
4568
+ args: [ProcessorDetailsFormComponent]
4354
4569
  }] } });
4355
4570
 
4356
- class MainFeedCardComponent {
4357
- constructor(eacSvc, dialog, sanitizer) {
4571
+ class GhControlComponent {
4572
+ constructor(eacSvc, dialog) {
4358
4573
  this.eacSvc = eacSvc;
4359
4574
  this.dialog = dialog;
4360
- this.sanitizer = sanitizer;
4361
- }
4362
- get ActiveEnvironment() {
4363
- var _a, _b;
4364
- return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[this.ActiveEnvironmentLookup];
4575
+ this.InputLabel = "Create Pull Request";
4576
+ this.SkeletonEffect = "wave";
4577
+ this.selectedBtn = "pr-btn";
4365
4578
  }
4366
4579
  get ActiveEnvironmentLookup() {
4367
4580
  var _a, _b;
@@ -4369,75 +4582,40 @@ class MainFeedCardComponent {
4369
4582
  const envLookups = Object.keys(((_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments) || {});
4370
4583
  return envLookups[0];
4371
4584
  }
4372
- get Environment() {
4373
- var _a, _b, _c, _d, _e;
4374
- // console.log("Ent Environment var: ", this.State?.EaC?.Environments[this.State?.EaC?.Enterprise?.PrimaryEnvironment]);
4375
- return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[(_e = (_d = (_c = this.State) === null || _c === void 0 ? void 0 : _c.EaC) === null || _d === void 0 ? void 0 : _d.Enterprise) === null || _e === void 0 ? void 0 : _e.PrimaryEnvironment];
4376
- }
4377
- get Icon() {
4378
- if (this.FeedItem.Status.Code === 0) {
4379
- return 'check_circle';
4380
- }
4381
- else if (this.FeedItem.Status.Code === 1) {
4382
- return 'cancel';
4383
- }
4384
- else if (this.FeedItem.Status.Code === 2) {
4385
- return 'sync';
4386
- }
4387
- else {
4388
- return 'help_outline';
4389
- }
4390
- }
4391
- get IconColor() {
4392
- if (this.FeedItem.Status.Code === 0) {
4393
- return 'green';
4394
- }
4395
- else if (this.FeedItem.Status.Code === 1) {
4396
- return 'red';
4397
- }
4398
- else if (this.FeedItem.Status.Code === 2) {
4399
- return 'blue';
4400
- }
4401
- else {
4402
- return 'gray';
4403
- }
4404
- }
4405
4585
  get State() {
4406
4586
  return this.eacSvc.State;
4407
4587
  }
4408
- // Life Cycle
4409
4588
  ngOnInit() {
4410
- this.handleRefresh();
4411
4589
  }
4412
- // API Methods
4413
- CalculateTimelapse(timestamp) {
4414
- return moment(timestamp).fromNow();
4590
+ ngAfterViewInit() {
4591
+ this.addSelectBtn();
4415
4592
  }
4416
- HandleAction(action) {
4417
- if (action.ActionType == 'Link') {
4418
- if (action.Action.startsWith('http')) {
4419
- window.open(action.Action, '_blank');
4420
- }
4421
- else {
4422
- window.location.href = action.Action;
4423
- }
4424
- }
4425
- else if (action.ActionType == 'Modal') {
4426
- if (action.Action == 'AddSourceControl') {
4427
- this.OpenSourceControlDialog(null);
4428
- }
4429
- else {
4430
- alert('other modaled ' + action.Action);
4431
- }
4432
- }
4593
+ CreateFeatureBranch() {
4594
+ this.removeSelectedBtn();
4595
+ this.InputLabel = "Create Feature Branch";
4596
+ this.selectedBtn = "fb-btn";
4597
+ this.addSelectBtn();
4598
+ console.log("create feature branch selected");
4433
4599
  }
4434
- OpenSourceControlDialog(scLookup) {
4435
- const dialogRef = this.dialog.open(SourceControlDialogComponent, {
4436
- width: '550px',
4600
+ OpenIssue() {
4601
+ this.removeSelectedBtn();
4602
+ this.InputLabel = "Open Issue";
4603
+ this.selectedBtn = "oi-btn";
4604
+ this.addSelectBtn();
4605
+ console.log("open issue selected");
4606
+ }
4607
+ CreatePullRequest() {
4608
+ this.removeSelectedBtn();
4609
+ this.InputLabel = "Create Pull Request";
4610
+ this.selectedBtn = "pr-btn";
4611
+ this.addSelectBtn();
4612
+ console.log("create pull request selected");
4613
+ }
4614
+ CreateNewApp() {
4615
+ const dialogRef = this.dialog.open(NewApplicationDialogComponent, {
4616
+ width: '600px',
4437
4617
  data: {
4438
- environment: this.Environment,
4439
4618
  environmentLookup: this.ActiveEnvironmentLookup,
4440
- scLookup: scLookup,
4441
4619
  },
4442
4620
  });
4443
4621
  dialogRef.afterClosed().subscribe((result) => {
@@ -4445,604 +4623,723 @@ class MainFeedCardComponent {
4445
4623
  // console.log("result:", result)
4446
4624
  });
4447
4625
  }
4448
- SafeHtml(html) {
4449
- return this.sanitizer.bypassSecurityTrustHtml(html);
4626
+ RouteToPath(path) {
4627
+ window.location.href = path;
4450
4628
  }
4451
- // Helpers
4452
- handleRefresh() {
4453
- var _a;
4454
- if ((_a = this.FeedItem) === null || _a === void 0 ? void 0 : _a.RefreshLink) {
4455
- setTimeout(() => {
4456
- this.eacSvc.CheckUserFeedItem(this.FeedItem).subscribe((response) => __awaiter(this, void 0, void 0, function* () {
4457
- if (response.Status.Code === 0) {
4458
- this.FeedItem = response.Model;
4459
- this.handleRefresh();
4460
- }
4461
- else {
4462
- console.log(response);
4463
- }
4464
- }), (err) => {
4465
- console.log(err);
4466
- });
4467
- }, 5000);
4629
+ Submit() {
4630
+ console.log("submitting: ", this.value);
4631
+ switch (this.selectedBtn) {
4632
+ case "pr-btn":
4633
+ //Pull request
4634
+ console.log("creating pull request: ", this.value);
4635
+ break;
4636
+ case "oi-btn":
4637
+ //Open Issue
4638
+ console.log("Open issue: ", this.value);
4639
+ break;
4640
+ case "fb-btn":
4641
+ //Feature Branch
4642
+ console.log("creating feature branch: ", this.value);
4643
+ break;
4644
+ default:
4645
+ console.log("hmm");
4646
+ break;
4468
4647
  }
4469
4648
  }
4470
- }
4471
- MainFeedCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MainFeedCardComponent, deps: [{ token: EaCService }, { token: i2$2.MatDialog }, { token: i3$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
4472
- MainFeedCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: MainFeedCardComponent, selector: "lcu-main-feed-card", inputs: { FeedItem: ["feed-item", "FeedItem"] }, ngImport: i0, template: "<mat-card class=\"social-card\">\n <mat-card-header>\n <img\n mat-card-avatar\n class=\"example-header-image\"\n [src]=\"FeedItem.Avatar\"\n *ngIf=\"FeedItem.Avatar\"\n />\n\n <mat-card-title *ngIf=\"FeedItem.Title\">{{ FeedItem.Title }}</mat-card-title>\n\n <mat-card-subtitle>\n <div *ngIf=\"FeedItem.Subtitle\">{{ FeedItem.Subtitle }}</div>\n\n <div *ngIf=\"FeedItem.Subtext\">{{ FeedItem.Subtext }}</div>\n\n <div *ngIf=\"FeedItem.Status\">\n <mat-icon\n *ngIf=\"Icon\"\n [style.color]=\"IconColor\"\n [class.spin]=\"FeedItem.Status?.Code == 2\"\n >\n {{ Icon }}\n </mat-icon>\n\n <span *ngIf=\"FeedItem.Timestamp\">\n {{ CalculateTimelapse(FeedItem.Timestamp) }}\n </span>\n </div>\n </mat-card-subtitle>\n </mat-card-header>\n\n <div *ngIf=\"!FeedItem.IsShortForm\">\n <div class=\"feed-card-container\">\n <div class=\"feed-card-main-content\">\n <mat-tab-group>\n <ng-container *ngFor=\"let tab of FeedItem.Tabs\">\n <mat-tab [label]=\"tab.Title\">\n <div class=\"tab\">\n <ng-container *ngIf=\"tab.Data?.Commit?.Message\">\n <div class=\"commit-message\">\n {{ tab.Data?.Commit?.Message }}\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"tab.Data?.Video\">\n <div\n class=\"video\"\n [innerHTML]=\"SafeHtml(tab.Data.Video)\"\n ></div>\n </ng-container>\n </div>\n </mat-tab>\n </ng-container>\n </mat-tab-group>\n </div>\n </div>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div fxFlex></div>\n\n <ng-container *ngFor=\"let action of FeedItem.Actions\">\n <button mat-button [color]=\"action.Color\" (click)=\"HandleAction(action)\">\n <mat-icon *ngIf=\"action.Icon\">{{ action.Icon }}</mat-icon>\n\n {{ action.Text }}\n </button>\n </ng-container>\n </mat-card-actions>\n</mat-card>\n", styles: [":host :host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host :host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host :host ::ng-deep .main-slot-container{padding:10px}:host :host ::ng-deep .slot-header{align-items:center}:host :host ::ng-deep .slot-content{width:100%}:host :host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host :host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host :host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host :host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}:host .example-header-image{background-size:cover}:host .mat-icon{display:inline-flex;vertical-align:middle}:host .mat-icon.spin{animation:rotate 1s ease-in-out infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}:host .tab{margin:2em}:host .tab .video iframe{display:block;margin:auto}\n"], components: [{ type: i1$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i1$1.MatCardHeader, selector: "mat-card-header" }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i2$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.MatCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { type: i1$1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i1$1.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
4473
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MainFeedCardComponent, decorators: [{
4474
- type: Component,
4475
- args: [{ selector: 'lcu-main-feed-card', template: "<mat-card class=\"social-card\">\n <mat-card-header>\n <img\n mat-card-avatar\n class=\"example-header-image\"\n [src]=\"FeedItem.Avatar\"\n *ngIf=\"FeedItem.Avatar\"\n />\n\n <mat-card-title *ngIf=\"FeedItem.Title\">{{ FeedItem.Title }}</mat-card-title>\n\n <mat-card-subtitle>\n <div *ngIf=\"FeedItem.Subtitle\">{{ FeedItem.Subtitle }}</div>\n\n <div *ngIf=\"FeedItem.Subtext\">{{ FeedItem.Subtext }}</div>\n\n <div *ngIf=\"FeedItem.Status\">\n <mat-icon\n *ngIf=\"Icon\"\n [style.color]=\"IconColor\"\n [class.spin]=\"FeedItem.Status?.Code == 2\"\n >\n {{ Icon }}\n </mat-icon>\n\n <span *ngIf=\"FeedItem.Timestamp\">\n {{ CalculateTimelapse(FeedItem.Timestamp) }}\n </span>\n </div>\n </mat-card-subtitle>\n </mat-card-header>\n\n <div *ngIf=\"!FeedItem.IsShortForm\">\n <div class=\"feed-card-container\">\n <div class=\"feed-card-main-content\">\n <mat-tab-group>\n <ng-container *ngFor=\"let tab of FeedItem.Tabs\">\n <mat-tab [label]=\"tab.Title\">\n <div class=\"tab\">\n <ng-container *ngIf=\"tab.Data?.Commit?.Message\">\n <div class=\"commit-message\">\n {{ tab.Data?.Commit?.Message }}\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"tab.Data?.Video\">\n <div\n class=\"video\"\n [innerHTML]=\"SafeHtml(tab.Data.Video)\"\n ></div>\n </ng-container>\n </div>\n </mat-tab>\n </ng-container>\n </mat-tab-group>\n </div>\n </div>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div fxFlex></div>\n\n <ng-container *ngFor=\"let action of FeedItem.Actions\">\n <button mat-button [color]=\"action.Color\" (click)=\"HandleAction(action)\">\n <mat-icon *ngIf=\"action.Icon\">{{ action.Icon }}</mat-icon>\n\n {{ action.Text }}\n </button>\n </ng-container>\n </mat-card-actions>\n</mat-card>\n", styles: [":host :host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host :host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host :host ::ng-deep .main-slot-container{padding:10px}:host :host ::ng-deep .slot-header{align-items:center}:host :host ::ng-deep .slot-content{width:100%}:host :host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host :host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host :host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host :host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}:host .example-header-image{background-size:cover}:host .mat-icon{display:inline-flex;vertical-align:middle}:host .mat-icon.spin{animation:rotate 1s ease-in-out infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}:host .tab{margin:2em}:host .tab .video iframe{display:block;margin:auto}\n"] }]
4476
- }], ctorParameters: function () { return [{ type: EaCService }, { type: i2$2.MatDialog }, { type: i3$2.DomSanitizer }]; }, propDecorators: { FeedItem: [{
4477
- type: Input,
4478
- args: ['feed-item']
4479
- }] } });
4480
-
4481
- class TwoColumnHeaderComponent {
4482
- constructor() { }
4483
- ngOnInit() {
4649
+ //HELPERS
4650
+ addSelectBtn() {
4651
+ // (<HTMLElement>document.getElementById(this.selectedBtn)).classList.add('selected');
4652
+ }
4653
+ removeSelectedBtn() {
4654
+ // (<HTMLElement>document.getElementById(this.selectedBtn)).classList.remove('selected');
4484
4655
  }
4485
4656
  }
4486
- TwoColumnHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4487
- TwoColumnHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: TwoColumnHeaderComponent, selector: "lcu-two-column-header", ngImport: i0, template: "<div class=\"col-container\" fxLayout=\"row\">\n\n <div class=\"col-left\" fxFlex=\"15%\" >\n <ng-content select=\"[left]\"></ng-content>\n </div>\n\n <div class=\"col-center\" fxFlex=\"85%\">\n <ng-content></ng-content>\n </div>\n\n</div>\n", styles: [".col-container{background-color:#ebecf0}.col-left{min-width:210px}\n"], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
4488
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, decorators: [{
4657
+ GhControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: GhControlComponent, deps: [{ token: EaCService }, { token: i2$2.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
4658
+ GhControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: GhControlComponent, selector: "lcu-gh-control", ngImport: i0, template: "<mat-card class=\"social-card\" *ngIf=\"false\">\n <ng-container *ngIf=\"!State?.Loading\">\n <div class=\"gh-card-container\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-icon fxFlex=\"15%\" class=\"gh-icon\">error_outline</mat-icon>\n <div fxFlex=\"70%\" class=\"gh-card-main-content\">\n <mat-form-field appearance=\"fill\" class=\"gh-input\">\n <mat-label>{{ InputLabel }}</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"value\" />\n <!-- <button *ngIf=\"value\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"value=''\">\n <mat-icon>close</mat-icon>\n </button> -->\n </mat-form-field>\n </div>\n\n <button\n fxFlex=\"15%\"\n mat-button\n (click)=\"Submit()\"\n id=\"submit-btn\"\n color=\"primary\"\n >\n Submit\n </button>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <button mat-button (click)=\"CreatePullRequest()\" id=\"pr-btn\">\n Pull Request\n </button>\n <button mat-button (click)=\"OpenIssue()\" id=\"oi-btn\">Open Issue</button>\n <button mat-button (click)=\"CreateFeatureBranch()\" id=\"fb-btn\">\n Feature Branch\n </button>\n <button mat-icon-button [matMenuTriggerFor]=\"menu\" aria-label=\"menu\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button class=\"gh-menu-action\" mat-menu-item (click)=\"CreateNewApp()\">\n Create New App\n </button>\n\n <button\n class=\"gh-menu-action\"\n mat-menu-item\n (click)=\"RouteToPath('/dashboard/create-project')\"\n >\n Create Project\n </button>\n </mat-menu>\n </mat-card-actions>\n </ng-container>\n\n <!-- SKELETON -->\n <ng-container *ngIf=\"State?.Loading\">\n <div id=\"gh-card-skeleton\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <skeleton-avatar\n class=\"gh-icon\"\n [showIcon]=\"false\"\n [effect]=\"SkeletonEffect\"\n ></skeleton-avatar>\n\n <div fxFlex=\"70%\" class=\"gh-card-main-content\">\n <skeleton-block\n height=\"60px\"\n [effect]=\"SkeletonEffect\"\n ></skeleton-block>\n </div>\n\n <div\n skeleton-text\n fxFlex=\"15%\"\n [effect]=\"SkeletonEffect\"\n style=\"margin: 0px 10px\"\n >\n Submit\n </div>\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Pull Request</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">Open Issue</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">Feature Branch</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">\n <mat-icon>more_horiz</mat-icon>\n </div>\n </div>\n </ng-container>\n</mat-card>\n", styles: [":host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host ::ng-deep .main-slot-container{padding:10px}:host ::ng-deep .slot-header{align-items:center}:host ::ng-deep .slot-content{width:100%}:host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}.gh-icon{width:60px;height:60px;font-size:60px;text-align:center}.gh-input{width:90%}.selected{border:1px solid green}.gh-input ::ng-deep .mat-form-field-flex{border:1px solid;border-radius:30px!important}.gh-input ::ng-deep .mat-form-field-wrapper{padding-bottom:0!important}.gh-input ::ng-deep .mat-form-field-underline{display:none}\n"], components: [{ type: i1$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i7$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i7$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { type: i4$3.SkeletonAvatarComponent, selector: "skeleton-avatar", inputs: ["size", "color", "showIcon", "iconColor", "borderRadius", "effect"] }, { type: i4$3.SkeletonBlockComponent, selector: "skeleton-block", inputs: ["width", "height", "effect", "borderRadius"] }], directives: [{ type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i4$1.MatLabel, selector: "mat-label" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i7$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i4$3.SkeletonTextDirective, selector: "[skeleton-text]", inputs: ["effect"] }] });
4659
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: GhControlComponent, decorators: [{
4489
4660
  type: Component,
4490
- args: [{ selector: 'lcu-two-column-header', template: "<div class=\"col-container\" fxLayout=\"row\">\n\n <div class=\"col-left\" fxFlex=\"15%\" >\n <ng-content select=\"[left]\"></ng-content>\n </div>\n\n <div class=\"col-center\" fxFlex=\"85%\">\n <ng-content></ng-content>\n </div>\n\n</div>\n", styles: [".col-container{background-color:#ebecf0}.col-left{min-width:210px}\n"] }]
4491
- }], ctorParameters: function () { return []; } });
4661
+ args: [{ selector: 'lcu-gh-control', template: "<mat-card class=\"social-card\" *ngIf=\"false\">\n <ng-container *ngIf=\"!State?.Loading\">\n <div class=\"gh-card-container\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-icon fxFlex=\"15%\" class=\"gh-icon\">error_outline</mat-icon>\n <div fxFlex=\"70%\" class=\"gh-card-main-content\">\n <mat-form-field appearance=\"fill\" class=\"gh-input\">\n <mat-label>{{ InputLabel }}</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"value\" />\n <!-- <button *ngIf=\"value\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"value=''\">\n <mat-icon>close</mat-icon>\n </button> -->\n </mat-form-field>\n </div>\n\n <button\n fxFlex=\"15%\"\n mat-button\n (click)=\"Submit()\"\n id=\"submit-btn\"\n color=\"primary\"\n >\n Submit\n </button>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <button mat-button (click)=\"CreatePullRequest()\" id=\"pr-btn\">\n Pull Request\n </button>\n <button mat-button (click)=\"OpenIssue()\" id=\"oi-btn\">Open Issue</button>\n <button mat-button (click)=\"CreateFeatureBranch()\" id=\"fb-btn\">\n Feature Branch\n </button>\n <button mat-icon-button [matMenuTriggerFor]=\"menu\" aria-label=\"menu\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button class=\"gh-menu-action\" mat-menu-item (click)=\"CreateNewApp()\">\n Create New App\n </button>\n\n <button\n class=\"gh-menu-action\"\n mat-menu-item\n (click)=\"RouteToPath('/dashboard/create-project')\"\n >\n Create Project\n </button>\n </mat-menu>\n </mat-card-actions>\n </ng-container>\n\n <!-- SKELETON -->\n <ng-container *ngIf=\"State?.Loading\">\n <div id=\"gh-card-skeleton\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <skeleton-avatar\n class=\"gh-icon\"\n [showIcon]=\"false\"\n [effect]=\"SkeletonEffect\"\n ></skeleton-avatar>\n\n <div fxFlex=\"70%\" class=\"gh-card-main-content\">\n <skeleton-block\n height=\"60px\"\n [effect]=\"SkeletonEffect\"\n ></skeleton-block>\n </div>\n\n <div\n skeleton-text\n fxFlex=\"15%\"\n [effect]=\"SkeletonEffect\"\n style=\"margin: 0px 10px\"\n >\n Submit\n </div>\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Pull Request</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">Open Issue</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">Feature Branch</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">\n <mat-icon>more_horiz</mat-icon>\n </div>\n </div>\n </ng-container>\n</mat-card>\n", styles: [":host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host ::ng-deep .main-slot-container{padding:10px}:host ::ng-deep .slot-header{align-items:center}:host ::ng-deep .slot-content{width:100%}:host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}.gh-icon{width:60px;height:60px;font-size:60px;text-align:center}.gh-input{width:90%}.selected{border:1px solid green}.gh-input ::ng-deep .mat-form-field-flex{border:1px solid;border-radius:30px!important}.gh-input ::ng-deep .mat-form-field-wrapper{padding-bottom:0!important}.gh-input ::ng-deep .mat-form-field-underline{display:none}\n"] }]
4662
+ }], ctorParameters: function () { return [{ type: EaCService }, { type: i2$2.MatDialog }]; } });
4492
4663
 
4493
- class CardCarouselComponent {
4494
- constructor() {
4495
- this.carouselIndex = 0;
4664
+ class DevopsSourceControlFormComponent {
4665
+ // Constructors
4666
+ constructor(appsFlowSvc, eacSvc, formBuilder) {
4667
+ this.appsFlowSvc = appsFlowSvc;
4668
+ this.eacSvc = eacSvc;
4669
+ this.formBuilder = formBuilder;
4670
+ this.SeparatorKeysCodes = [ENTER, COMMA];
4671
+ this.SaveStatusEvent = new EventEmitter();
4672
+ this.BuildPath = null;
4673
+ this.HostingDetails = new ProjectHostingDetails();
4674
+ this.SelectedBranches = [];
4675
+ this.SourceControlRoot = '';
4676
+ this.SkeletonEffect = "wave";
4677
+ this.UseBranches = true;
4678
+ this.UseBuildPath = false;
4496
4679
  }
4497
- ngOnInit() {
4680
+ // Properties
4681
+ get ArtifactLookups() {
4682
+ var _a;
4683
+ return (_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.ArtifactLookups;
4498
4684
  }
4499
- ngAfterViewInit() {
4500
- this.assignCarouselClass();
4685
+ get ArtifactLookup() {
4686
+ var _a, _b;
4687
+ const artLookup = ((_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.ArtifactLookups)
4688
+ ? (_b = this.DevOpsAction) === null || _b === void 0 ? void 0 : _b.ArtifactLookups[0]
4689
+ : null;
4690
+ return artLookup;
4501
4691
  }
4502
- LeftChevronClicked() {
4503
- this.removeCarouselClasses();
4504
- if (this.carouselIndex === 0) {
4505
- this.carouselIndex = this.Stats.length - 1;
4506
- }
4507
- else {
4508
- this.carouselIndex--;
4509
- }
4510
- this.assignCarouselClass();
4692
+ get Artifact() {
4693
+ var _a, _b;
4694
+ return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts) && this.ArtifactLookup
4695
+ ? ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts[this.ArtifactLookup]) || {}
4696
+ : {};
4511
4697
  }
4512
- MoreDetailsClicked() {
4513
- console.log("More details clicked on carousel item", this.Stats[this.carouselIndex]);
4698
+ get BranchesFormControl() {
4699
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
4514
4700
  }
4515
- RightChevronClicked() {
4516
- this.removeCarouselClasses();
4517
- if (this.carouselIndex === this.Stats.length - 1) {
4518
- this.carouselIndex = 0;
4701
+ get BuildPathFormControl() {
4702
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'buildPath');
4703
+ }
4704
+ get DevOpsActionLookups() {
4705
+ // console.log(this.DevOpsActions);
4706
+ return Object.keys(this.DevOpsActions || {});
4707
+ }
4708
+ get DevOpsAction() {
4709
+ return this.Environment.DevOpsActions && this.DevOpsActionLookup
4710
+ ? this.Environment.DevOpsActions[this.DevOpsActionLookup] || {}
4711
+ : {};
4712
+ }
4713
+ get DevOpsActionLookup() {
4714
+ var _a, _b, _c;
4715
+ if (!!((_a = this.DevOpsActionLookupFormControl) === null || _a === void 0 ? void 0 : _a.value)) {
4716
+ return this.DevOpsActionLookupFormControl.value;
4717
+ }
4718
+ if (!!((_b = this.EditingSourceControl) === null || _b === void 0 ? void 0 : _b.DevOpsActionTriggerLookups)) {
4719
+ return (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.DevOpsActionTriggerLookups[0];
4519
4720
  }
4520
4721
  else {
4521
- this.carouselIndex++;
4722
+ return null;
4522
4723
  }
4523
- this.assignCarouselClass();
4524
4724
  }
4525
- //HELPERS
4526
- removeCarouselClasses() {
4527
- for (let i = 0; i < this.Stats.length; i++) {
4528
- if (i === this.carouselIndex) {
4529
- document.getElementById("carousel-" + this.carouselIndex).classList.remove('active');
4530
- }
4531
- else {
4532
- document.getElementById("carousel-" + i).classList.remove('hidden');
4533
- }
4534
- }
4725
+ get DevOpsActionLookupFormControl() {
4726
+ return this.DevOpsSourceControlFormGroup.get('devOpsActionLookup');
4535
4727
  }
4536
- assignCarouselClass() {
4537
- for (let i = 0; i < this.Stats.length; i++) {
4538
- if (i === this.carouselIndex) {
4539
- document.getElementById("carousel-" + this.carouselIndex).classList.add('active');
4540
- }
4541
- else {
4542
- document.getElementById("carousel-" + i).classList.add('hidden');
4543
- }
4728
+ get DevOpsActions() {
4729
+ return this.Environment.DevOpsActions || {};
4730
+ }
4731
+ get EditingSourceControl() {
4732
+ var _a, _b;
4733
+ let sc = ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources)
4734
+ ? (_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Sources[this.EditingSourceControlLookup]
4735
+ : null;
4736
+ if (sc == null && this.EditingSourceControlLookup) {
4737
+ sc = {};
4544
4738
  }
4739
+ return sc;
4545
4740
  }
4546
- }
4547
- CardCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4548
- CardCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: CardCarouselComponent, selector: "lcu-card-carousel", inputs: { Stats: ["stats", "Stats"] }, ngImport: i0, template: "<div stats class=\"carousel-container\">\n <div class=\"chevron-container\" fxLayout=\"row\">\n <button mat-icon-button class=\"chevron-button\" id=\"left-chevron\" (click)=\"LeftChevronClicked()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button mat-icon-button class=\"chevron-button\" id=\"right-chevron\" (click)=\"RightChevronClicked()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n <ng-container *ngFor=\"let stat of Stats; let i = index\">\n <div class=\"carousel-item\" [id]=\"'carousel-'+i\">\n <div class=\"carousel-title\">{{stat.Name}}</div>\n <div class=\"carousel-stat\">{{stat.Stat}}</div>\n </div>\n </ng-container>\n <div (click)=\"MoreDetailsClicked()\">More details</div>\n</div>\n", styles: [".carousel-container{text-align:center;height:75px;padding-top:20px}.carousel-item.hidden{display:none}.carousel-item.active{visibility:visible}.chevron-button{position:absolute}#right-chevron{right:5px}#left-chevron{left:5px}\n"], components: [{ type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
4549
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, decorators: [{
4550
- type: Component,
4551
- args: [{ selector: 'lcu-card-carousel', template: "<div stats class=\"carousel-container\">\n <div class=\"chevron-container\" fxLayout=\"row\">\n <button mat-icon-button class=\"chevron-button\" id=\"left-chevron\" (click)=\"LeftChevronClicked()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button mat-icon-button class=\"chevron-button\" id=\"right-chevron\" (click)=\"RightChevronClicked()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n <ng-container *ngFor=\"let stat of Stats; let i = index\">\n <div class=\"carousel-item\" [id]=\"'carousel-'+i\">\n <div class=\"carousel-title\">{{stat.Name}}</div>\n <div class=\"carousel-stat\">{{stat.Stat}}</div>\n </div>\n </ng-container>\n <div (click)=\"MoreDetailsClicked()\">More details</div>\n</div>\n", styles: [".carousel-container{text-align:center;height:75px;padding-top:20px}.carousel-item.hidden{display:none}.carousel-item.active{visibility:visible}.chevron-button{position:absolute}#right-chevron{right:5px}#left-chevron{left:5px}\n"] }]
4552
- }], ctorParameters: function () { return []; }, propDecorators: { Stats: [{
4553
- type: Input,
4554
- args: ['stats']
4555
- }] } });
4556
-
4557
- class SecurityToggleComponent {
4558
- constructor(eacSvc, formBldr) {
4559
- this.eacSvc = eacSvc;
4560
- this.formBldr = formBldr;
4561
- this.SaveFormEvent = new EventEmitter;
4562
- this.SkeletonEffect = 'wave';
4741
+ get MainBranchFormControl() {
4742
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'mainBranch');
4563
4743
  }
4564
- get IsPrivateFormControl() {
4565
- var _a;
4566
- return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isPrivate;
4744
+ get OrganizationFormControl() {
4745
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'organization');
4567
4746
  }
4568
- get IsTriggerSignInFormControl() {
4569
- var _a;
4570
- return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isTriggerSignIn;
4747
+ get RepositoryFormControl() {
4748
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'repository');
4571
4749
  }
4572
4750
  get State() {
4573
4751
  return this.eacSvc.State;
4574
4752
  }
4753
+ // Life Cycle
4754
+ ngAfterViewInit() { }
4755
+ ngOnDestroy() {
4756
+ this.destroyFormControls();
4757
+ }
4575
4758
  ngOnInit() {
4576
- this.setupSecurityFormGroup();
4759
+ console.log("source control lookup", this.EditingSourceControlLookup);
4760
+ if (this.EditingSourceControlLookup === null) {
4761
+ this.CreateNewSourceControl();
4762
+ }
4763
+ console.log("source control", this.EditingSourceControl);
4764
+ if (this.EditingSourceControl != null) {
4765
+ this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
4766
+ this.setupFormControls();
4767
+ }
4768
+ this.RefreshOrganizations();
4577
4769
  }
4578
- SecuritySubmit() {
4579
- //save the security settings
4580
- console.log("submitting security values: ", this.SecurityFormGroup.value);
4581
- this.SaveFormEvent.emit(this.SecurityFormGroup.value);
4770
+ // API Methods
4771
+ AddBranchOption(event) {
4772
+ this.addBranchOption(event.value);
4773
+ event.input.value = '';
4582
4774
  }
4583
- setupSecurityFormGroup() {
4584
- var _a, _b;
4585
- this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
4586
- this.SecurityFormGroup = this.formBldr.group({});
4587
- this.setupSecurityForm();
4775
+ BranchOptionSelected(event) {
4776
+ this.addBranchOption(event.option.value);
4588
4777
  }
4589
- setupSecurityForm() {
4590
- var _a, _b;
4591
- this.SecurityFormGroup.addControl('isPrivate', this.formBldr.control(((_a = this.EditingApplication.LookupConfig) === null || _a === void 0 ? void 0 : _a.IsPrivate) || false, [Validators.required]));
4592
- this.SecurityFormGroup.addControl('isTriggerSignIn', this.formBldr.control(((_b = this.EditingApplication.LookupConfig) === null || _b === void 0 ? void 0 : _b.IsTriggerSignIn) || false, [Validators.required]));
4778
+ BranchesChanged(branches) {
4779
+ this.loadProjectHostingDetails();
4593
4780
  }
4594
- }
4595
- SecurityToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SecurityToggleComponent, deps: [{ token: EaCService }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
4596
- SecurityToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: SecurityToggleComponent, selector: "lcu-security-toggle", inputs: { EditingApplication: ["editing-application", "EditingApplication"] }, outputs: { SaveFormEvent: "save-form-event" }, ngImport: i0, template: "<form class=\"security-form\" [formGroup]=\"SecurityFormGroup\" (ngSubmit)=\"SecuritySubmit()\">\n <mat-card class=\"flow-card\">\n\n <!-- SKELETON LOADING -->\n <ng-container *ngIf=\"State?.Loading\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title \n skeleton-text \n [effect]=\"SkeletonEffect\" \n > \n Security Settings \n </mat-card-title>\n <div fxLayoutAlign=\"space-around center\">\n <div\n skeleton-text \n [effect]=\"SkeletonEffect\" \n >\n XXX\n </div>\n\n <mat-icon\n skeleton-text \n [effect]=\"SkeletonEffect\" \n >\n info_outline\n </mat-icon>\n </div>\n </mat-card-header>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <div \n fxFlex=\"100%\" \n skeleton-text \n [effect]=\"SkeletonEffect\"\n fxLayoutAlign=\"center center\" \n >\n <mat-icon \n skeleton-text \n [effect]=\"SkeletonEffect\" \n >\n save\n </mat-icon>\n\n Save Settings\n </div>\n\n </mat-card-actions>\n </ng-container>\n <!-- END SKELETON LOADING -->\n\n <!-- BEGIN ACTUAL CONTENT -->\n\n <ng-container *ngIf=\"!State?.Loading\">\n <mat-card-header>\n <mat-card-title> Security Settings </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-slide-toggle\n formControlName=\"isPrivate\"\n matTooltip=\"Is Secure Application?\"\n >\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Secured Application is one that requires the user to be authenticated to use the application. The application is hosted behind an identity wall.\"\n >\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <div>\n <div *ngIf=\"IsPrivateFormControl.value\">\n <div>\n <mat-slide-toggle formControlName=\"isTriggerSignIn\">\n Is Trigger Sign In Application?\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Trigger Sign In Application will direct the user to sign in if they are not already.\"\n >\n info_outline\n </mat-icon>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Settings\n </button>\n\n </mat-card-actions>\n </ng-container>\n </mat-card>\n</form>\n", styles: ["::ng-deep .mat-tooltip{color:#000!important}.flow-card{margin:32px 20px}\n"], components: [{ type: i1$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i1$1.MatCardHeader, selector: "mat-card-header" }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i12$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i1$1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i4$3.SkeletonTextDirective, selector: "[skeleton-text]", inputs: ["effect"] }, { type: i1$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4$1.MatSuffix, selector: "[matSuffix]" }, { type: i1$1.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }] });
4597
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SecurityToggleComponent, decorators: [{
4598
- type: Component,
4599
- args: [{ selector: 'lcu-security-toggle', template: "<form class=\"security-form\" [formGroup]=\"SecurityFormGroup\" (ngSubmit)=\"SecuritySubmit()\">\n <mat-card class=\"flow-card\">\n\n <!-- SKELETON LOADING -->\n <ng-container *ngIf=\"State?.Loading\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title \n skeleton-text \n [effect]=\"SkeletonEffect\" \n > \n Security Settings \n </mat-card-title>\n <div fxLayoutAlign=\"space-around center\">\n <div\n skeleton-text \n [effect]=\"SkeletonEffect\" \n >\n XXX\n </div>\n\n <mat-icon\n skeleton-text \n [effect]=\"SkeletonEffect\" \n >\n info_outline\n </mat-icon>\n </div>\n </mat-card-header>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <div \n fxFlex=\"100%\" \n skeleton-text \n [effect]=\"SkeletonEffect\"\n fxLayoutAlign=\"center center\" \n >\n <mat-icon \n skeleton-text \n [effect]=\"SkeletonEffect\" \n >\n save\n </mat-icon>\n\n Save Settings\n </div>\n\n </mat-card-actions>\n </ng-container>\n <!-- END SKELETON LOADING -->\n\n <!-- BEGIN ACTUAL CONTENT -->\n\n <ng-container *ngIf=\"!State?.Loading\">\n <mat-card-header>\n <mat-card-title> Security Settings </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-slide-toggle\n formControlName=\"isPrivate\"\n matTooltip=\"Is Secure Application?\"\n >\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Secured Application is one that requires the user to be authenticated to use the application. The application is hosted behind an identity wall.\"\n >\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <div>\n <div *ngIf=\"IsPrivateFormControl.value\">\n <div>\n <mat-slide-toggle formControlName=\"isTriggerSignIn\">\n Is Trigger Sign In Application?\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Trigger Sign In Application will direct the user to sign in if they are not already.\"\n >\n info_outline\n </mat-icon>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Settings\n </button>\n\n </mat-card-actions>\n </ng-container>\n </mat-card>\n</form>\n", styles: ["::ng-deep .mat-tooltip{color:#000!important}.flow-card{margin:32px 20px}\n"] }]
4600
- }], ctorParameters: function () { return [{ type: EaCService }, { type: i1$2.FormBuilder }]; }, propDecorators: { EditingApplication: [{
4601
- type: Input,
4602
- args: ['editing-application']
4603
- }], SaveFormEvent: [{
4604
- type: Output,
4605
- args: ['save-form-event']
4606
- }] } });
4607
-
4608
- class ProcessorDetailsFormComponent {
4609
- constructor(appsFlowSvc, formBldr, eacSvc) {
4610
- this.appsFlowSvc = appsFlowSvc;
4611
- this.formBldr = formBldr;
4612
- this.eacSvc = eacSvc;
4613
- this.redirectTooltip = '';
4614
- this.HasSaveButton = true;
4615
- this.SaveFormEvent = new EventEmitter();
4781
+ BuildPathChanged(event) {
4782
+ //do something??
4616
4783
  }
4617
- get APIRootFormControl() {
4618
- var _a;
4619
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.apiRoot;
4784
+ CreateNewSourceControl() {
4785
+ this.SetEditingSourceControl(Guid.CreateRaw());
4620
4786
  }
4621
- get Environment() {
4622
- var _a, _b, _c, _d, _e;
4623
- return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[(_e = (_d = (_c = this.State) === null || _c === void 0 ? void 0 : _c.EaC) === null || _d === void 0 ? void 0 : _d.Enterprise) === null || _e === void 0 ? void 0 : _e.PrimaryEnvironment];
4787
+ CreateRepository() {
4788
+ this.CreatingRepository = true;
4789
+ this.RepositoryFormControl.reset();
4624
4790
  }
4625
- get BuildFormControl() {
4626
- var _a;
4627
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.build;
4791
+ CancelCreateRepository() {
4792
+ this.CreatingRepository = false;
4628
4793
  }
4629
- get BuildPathFormControl() {
4630
- var _a;
4631
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.buildPath;
4794
+ DevOpsActionLookupChanged(event) {
4795
+ this.configureDevOpsAction();
4632
4796
  }
4633
- get ClientIDFormControl() {
4634
- var _a;
4635
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientId;
4797
+ MainBranchChanged(event) {
4798
+ this.emitBranchesChanged();
4636
4799
  }
4637
- get ClientSecretFormControl() {
4638
- var _a;
4639
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientSecret;
4800
+ OrganizationChanged(event) {
4801
+ const org = this.OrganizationFormControl;
4802
+ this.RepositoryFormControl.reset();
4803
+ if (this.UseBranches) {
4804
+ this.BranchesFormControl.reset();
4805
+ this.SelectedBranches = [];
4806
+ }
4807
+ this.listRepositories();
4640
4808
  }
4641
- get DefaultFileFormControl() {
4642
- var _a;
4643
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.defaultFile;
4809
+ RefreshOrganizations() {
4810
+ var _a, _b, _c;
4811
+ // this.Loading = true;
4812
+ this.listOrganizations();
4813
+ (_a = this.OrganizationFormControl) === null || _a === void 0 ? void 0 : _a.reset();
4814
+ (_b = this.RepositoryFormControl) === null || _b === void 0 ? void 0 : _b.reset();
4815
+ if (this.UseBranches) {
4816
+ (_c = this.BranchesFormControl) === null || _c === void 0 ? void 0 : _c.reset();
4817
+ }
4644
4818
  }
4645
- get DefaultSourceControl() {
4646
- var _a, _b, _c, _d;
4647
- return {
4648
- Organization: (_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Organization,
4649
- Repository: (_d = (_c = this.EditingApplication) === null || _c === void 0 ? void 0 : _c.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Repository,
4650
- };
4819
+ RemoveBranchOption(option) {
4820
+ const index = this.SelectedBranches.indexOf(option);
4821
+ if (index >= 0) {
4822
+ this.SelectedBranches.splice(index, 1);
4823
+ }
4824
+ this.emitBranchesChanged();
4651
4825
  }
4652
- get InboundPathFormControl() {
4653
- var _a;
4654
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.inboundPath;
4826
+ RepositoryChanged(event) {
4827
+ const repo = this.RepositoryFormControl;
4828
+ if (this.UseBranches) {
4829
+ this.BranchesFormControl.reset();
4830
+ this.SelectedBranches = [];
4831
+ this.listBranches();
4832
+ }
4833
+ if (!this.UseBranches) {
4834
+ this.listBuildPaths();
4835
+ }
4655
4836
  }
4656
- get IncludeRequestFormControl() {
4657
- var _a;
4658
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.includeRequest;
4837
+ SaveRepository() {
4838
+ this.Loading = true;
4839
+ const org = this.OrganizationFormControl.value;
4840
+ const repoName = this.RepositoryFormControl.value;
4841
+ this.appsFlowSvc
4842
+ .CreateRepository(org, repoName)
4843
+ .subscribe((response) => {
4844
+ if (response.Status.Code === 0) {
4845
+ this.listRepositories(repoName);
4846
+ this.CreatingRepository = false;
4847
+ }
4848
+ else {
4849
+ // TODO: Need to surface an error to the user...
4850
+ this.Loading = false;
4851
+ }
4852
+ });
4659
4853
  }
4660
- get MethodsFormControl() {
4661
- var _a;
4662
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.methods;
4854
+ SetEditingSourceControl(scLookup) {
4855
+ this.EditingSourceControlLookup = scLookup;
4663
4856
  }
4664
- get PackageFormControl() {
4665
- var _a;
4666
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.package;
4857
+ SubmitSourceControl() {
4858
+ console.log('source control submitted: ', this.DevOpsSourceControlFormGroup.value);
4859
+ this.SaveSourceControl();
4667
4860
  }
4668
- get PermanentFormControl() {
4669
- var _a;
4670
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.permanent;
4861
+ SaveSourceControl() {
4862
+ const saveEnvReq = {
4863
+ Environment: Object.assign(Object.assign({}, this.Environment), { Sources: this.Environment.Sources || {} }),
4864
+ EnvironmentLookup: this.EnvironmentLookup,
4865
+ EnterpriseDataTokens: {},
4866
+ };
4867
+ let source = Object.assign(Object.assign({}, this.EditingSourceControl), { Branches: this.SelectedBranches, MainBranch: this.MainBranchFormControl.value });
4868
+ source = Object.assign(Object.assign({}, source), { Type: 'GitHub', Name: `@${this.OrganizationFormControl.value}/${this.RepositoryFormControl.value}`, DevOpsActionTriggerLookups: [this.DevOpsActionLookup], Organization: this.OrganizationFormControl.value, Repository: this.RepositoryFormControl.value });
4869
+ const scLookup = `github://${source.Organization}/${source.Repository}`;
4870
+ saveEnvReq.Environment.Sources[scLookup] = source;
4871
+ console.log('save SC: ', saveEnvReq);
4872
+ let resp = this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
4873
+ resp.then((res) => {
4874
+ this.SaveStatusEvent.emit(res);
4875
+ });
4671
4876
  }
4672
- get PreserveMethodFormControl() {
4673
- var _a;
4674
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.preserveMethod;
4877
+ // Helpers
4878
+ addBranchOption(value) {
4879
+ value = (value || '').trim();
4880
+ if (value && this.SelectedBranches.indexOf(value) < 0) {
4881
+ this.SelectedBranches.push(value);
4882
+ }
4883
+ this.BranchesInput.nativeElement.blur();
4884
+ this.emitBranchesChanged();
4675
4885
  }
4676
- get RedirectFormControl() {
4677
- var _a;
4678
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.redirect;
4886
+ configureDevOpsAction() {
4887
+ setTimeout(() => {
4888
+ this.DevOpsActionLookupFormControl.setValue(this.DevOpsActionLookup);
4889
+ }, 0);
4679
4890
  }
4680
- get ScopesFormControl() {
4681
- var _a;
4682
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.scopes;
4891
+ destroyFormControls() {
4892
+ var _a, _b, _c, _d;
4893
+ this.DevOpsSourceControlFormGroup.removeControl([this.SourceControlRoot, 'mainBranch'].join(''));
4894
+ (_a = this.DevOpsSourceControlFormGroup) === null || _a === void 0 ? void 0 : _a.removeControl([this.SourceControlRoot, 'branches'].join(''));
4895
+ (_b = this.DevOpsSourceControlFormGroup) === null || _b === void 0 ? void 0 : _b.removeControl([this.SourceControlRoot, 'buildPath'].join(''));
4896
+ this.SelectedBranches = [];
4897
+ (_c = this.DevOpsSourceControlFormGroup) === null || _c === void 0 ? void 0 : _c.removeControl([this.SourceControlRoot, 'organization'].join(''));
4898
+ (_d = this.DevOpsSourceControlFormGroup) === null || _d === void 0 ? void 0 : _d.removeControl([this.SourceControlRoot, 'repository'].join(''));
4683
4899
  }
4684
- get SecurityFormControl() {
4685
- var _a;
4686
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.security;
4900
+ emitBranchesChanged() {
4901
+ var _a, _b;
4902
+ if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
4903
+ (!this.MainBranchFormControl.value ||
4904
+ this.SelectedBranches.indexOf(this.MainBranchFormControl.value) < 0)) {
4905
+ this.MainBranchFormControl.setValue(this.SelectedBranches.find((branch) => branch === 'main' || branch === 'master') || this.SelectedBranches[0]);
4906
+ }
4907
+ else if (((_b = this.SelectedBranches) === null || _b === void 0 ? void 0 : _b.length) <= 0) {
4908
+ this.MainBranchFormControl.reset();
4909
+ }
4910
+ this.BranchesFormControl.setValue(this.SelectedBranches.join(','));
4911
+ this.BranchesChanged(this.SelectedBranches || []);
4687
4912
  }
4688
- get State() {
4689
- return this.eacSvc.State;
4913
+ listBranches() {
4914
+ if (this.UseBranches) {
4915
+ this.Loading = true;
4916
+ this.appsFlowSvc
4917
+ .ListBranches(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
4918
+ .subscribe((response) => {
4919
+ var _a, _b, _c;
4920
+ this.BranchOptions = response.Model;
4921
+ this.Loading = false;
4922
+ if (((_b = (_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Branches) === null || _b === void 0 ? void 0 : _b.length) > 0) {
4923
+ this.SelectedBranches = this.EditingSourceControl.Branches;
4924
+ }
4925
+ else if (((_c = this.BranchOptions) === null || _c === void 0 ? void 0 : _c.length) === 1) {
4926
+ this.BranchesFormControl.setValue(this.BranchOptions[0].Name);
4927
+ this.SelectedBranches = [this.BranchOptions[0].Name];
4928
+ }
4929
+ this.emitBranchesChanged();
4930
+ this.listBuildPaths();
4931
+ });
4932
+ }
4690
4933
  }
4691
- get SourceControls() {
4692
- var _a;
4693
- return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources) || {};
4934
+ listBuildPaths() {
4935
+ if (this.UseBuildPath) {
4936
+ this.Loading = true;
4937
+ this.appsFlowSvc
4938
+ .ListBuildPaths(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
4939
+ .subscribe((response) => {
4940
+ var _a;
4941
+ this.BuildPathOptions = response.Model;
4942
+ this.Loading = false;
4943
+ if (((_a = this.BuildPathOptions) === null || _a === void 0 ? void 0 : _a.length) === 1) {
4944
+ this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
4945
+ }
4946
+ });
4947
+ }
4694
4948
  }
4695
- get SourceControlFormControl() {
4696
- var _a;
4697
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.sourceControl;
4949
+ listOrganizations() {
4950
+ this.Loading = true;
4951
+ this.appsFlowSvc
4952
+ .ListOrganizations()
4953
+ .subscribe((response) => {
4954
+ var _a;
4955
+ this.OrganizationOptions = response.Model;
4956
+ console.log("Organization Options: ", this.OrganizationOptions);
4957
+ this.Loading = false;
4958
+ if ((_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Organization) {
4959
+ setTimeout(() => {
4960
+ var _a;
4961
+ this.OrganizationFormControl.setValue(this.EditingSourceControl.Organization);
4962
+ this.listRepositories((_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Repository);
4963
+ }, 0);
4964
+ }
4965
+ });
4698
4966
  }
4699
- get SPARootFormControl() {
4700
- var _a;
4701
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.spaRoot;
4967
+ listRepositories(activeRepo = null) {
4968
+ this.Loading = true;
4969
+ this.appsFlowSvc
4970
+ .ListRepositories(this.OrganizationFormControl.value)
4971
+ .subscribe((response) => {
4972
+ var _a;
4973
+ this.RepositoryOptions = response.Model;
4974
+ this.Loading = false;
4975
+ if (activeRepo) {
4976
+ setTimeout(() => {
4977
+ this.RepositoryFormControl.setValue(activeRepo);
4978
+ this.listBranches();
4979
+ if (!this.UseBranches) {
4980
+ this.listBuildPaths();
4981
+ }
4982
+ }, 0);
4983
+ }
4984
+ else if (((_a = this.RepositoryOptions) === null || _a === void 0 ? void 0 : _a.length) <= 0) {
4985
+ this.CreatingRepository = true;
4986
+ }
4987
+ });
4702
4988
  }
4703
- get TokenLookupFormControl() {
4989
+ loadProjectHostingDetails() {
4704
4990
  var _a;
4705
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.tokenLookup;
4991
+ if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0) {
4992
+ this.HostingDetails.Loading = true;
4993
+ this.appsFlowSvc
4994
+ .LoadProjectHostingDetails()
4995
+ .subscribe((response) => {
4996
+ this.HostingDetails = response.Model;
4997
+ this.HostingDetails.Loading = false;
4998
+ this.configureDevOpsAction();
4999
+ }, (err) => {
5000
+ this.HostingDetails.Loading = false;
5001
+ });
5002
+ }
4706
5003
  }
4707
- get ValidFormControls() {
4708
- let vfc = new Array();
4709
- for (const field in this.ProcessorDetailsFormGroup.controls) {
4710
- const control = this.ProcessorDetailsFormGroup.get(field);
4711
- if (control.valid) {
4712
- vfc.push(control);
4713
- }
5004
+ setupFormControls() {
5005
+ var _a, _b, _c, _d, _e, _f, _g;
5006
+ this.destroyFormControls();
5007
+ console.log("Source Control: ", this.EditingSourceControl);
5008
+ this.DevOpsSourceControlFormGroup.addControl('devOpsActionLookup', new FormControl(this.DevOpsActionLookup || '', []));
5009
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'organization'].join(''), new FormControl((_a = this.EditingSourceControl.Organization) !== null && _a !== void 0 ? _a : '', Validators.required));
5010
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'repository'].join(''), new FormControl((_b = this.EditingSourceControl.Repository) !== null && _b !== void 0 ? _b : '', Validators.required));
5011
+ if (this.UseBranches) {
5012
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'branches'].join(''), new FormControl((_d = (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.Branches) !== null && _d !== void 0 ? _d : '', Validators.required));
5013
+ this.SelectedBranches = (_e = this.EditingSourceControl) === null || _e === void 0 ? void 0 : _e.Branches;
5014
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'mainBranch'].join(''), new FormControl((_f = this.EditingSourceControl.MainBranch) !== null && _f !== void 0 ? _f : '', Validators.required));
5015
+ }
5016
+ if (this.UseBuildPath) {
5017
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'buildPath'].join(''), new FormControl((_g = this.BuildPath) !== null && _g !== void 0 ? _g : '', Validators.required));
4714
5018
  }
4715
- // console.log("VFC=", vfc)
4716
- return vfc;
4717
5019
  }
4718
- get VersionFormControl() {
4719
- var _a;
4720
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.version;
5020
+ }
5021
+ DevopsSourceControlFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DevopsSourceControlFormComponent, deps: [{ token: ApplicationsFlowService }, { token: EaCService }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
5022
+ DevopsSourceControlFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: DevopsSourceControlFormComponent, selector: "lcu-devops-source-control-form", inputs: { EditingSourceControlLookup: ["editing-source-control-lookup", "EditingSourceControlLookup"], Environment: ["environment", "Environment"], EnvironmentLookup: ["environment-lookup", "EnvironmentLookup"] }, outputs: { SaveStatusEvent: "save-status-event" }, viewQueries: [{ propertyName: "BranchesInput", first: true, predicate: ["branches"], descendants: true }], ngImport: i0, template: "<form \n class=\"form-card\" \n [formGroup]=\"DevOpsSourceControlFormGroup\" \n (ngSubmit)=\"SubmitSourceControl()\"\n>\n\n <!-- <mat-card class=\"spread\" class=\"sc-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title> Source Control </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-icon matSuffix matTooltip=\"Configure source control, DevOps CI/CD, and artifacts.\">\n info_outline\n </mat-icon>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n\n <ng-container *ngIf=\"State?.Loading\">\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader>\n\n <!-- <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block> -->\n\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n\n <div class=\"card\">\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select \n formControlName=\"devOpsActionLookup\" \n placeholder=\"DevOps Action\"\n [disabled]=\"HostingDetails?.Loading\" \n (selectionChange)=\"DevOpsActionLookupChanged($event)\"\n >\n <ng-container *ngFor=\"let devOpsActionLookup of DevOpsActionLookups\">\n <mat-option \n [value]=\"devOpsActionLookup\" \n *ngIf=\"DevOpsActions[devOpsActionLookup]; let devOpsAction\">\n {{ devOpsAction.Name }}\n </mat-option>\n </ng-container>\n\n <mat-option value=\"\">-- Create New --</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"card\" *ngIf=\"OrganizationFormControl?.valid || !Loading\">\n <mat-form-field \n class=\"mat-full-width with-hint margin-bottom\" \n *ngIf=\"OrganizationOptions?.length > 0\"\n >\n <mat-icon class=\"org-icon\" matPrefix>corporate_fare</mat-icon>\n\n <mat-select \n [formControlName]=\"SourceControlRoot + 'organization'\" \n placeholder=\"Organization\"\n (selectionChange)=\"OrganizationChanged($event)\" \n [disabled]=\"Loading || HostingDetails?.Loading\" \n required\n >\n <ng-container *ngFor=\"let orgOpt of OrganizationOptions\">\n <mat-option [value]=\"orgOpt.Name\">\n {{ orgOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\" matTooltip=\"Refresh Organization\" color=\"accent\"> refresh </mat-icon>\n\n <a matSuffix href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon color=\"accent\" matTooltip=\"Re-authorize Organizations\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" class=\"primary-link\" target=\"_blank\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n RepositoryFormControl?.valid ||\n (OrganizationFormControl?.valid && !Loading)\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>description</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'repository'\" [placeholder]=\"\n OrganizationFormControl?.valid\n ? 'Repository'\n : 'Repository (select organization first)'\n \" [disabled]=\"\n !OrganizationFormControl?.valid || Loading || HostingDetails?.Loading\n \" (selectionChange)=\"RepositoryChanged($event)\" *ngIf=\"!CreatingRepository\" required>\n <ng-container *ngFor=\"let repoOpt of RepositoryOptions\">\n <mat-option [value]=\"repoOpt.Name\">\n {{ repoOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <input matInput placeholder=\"Repository (creates new if does not exist)\"\n [formControlName]=\"SourceControlRoot + 'repository'\" *ngIf=\"CreatingRepository\"\n [fxHide]=\"Loading || HostingDetails?.Loading\" required />\n\n <mat-icon matSuffix (click)=\"CreateRepository()\" [fxHide]=\"Loading || HostingDetails?.Loading\"\n *ngIf=\"!CreatingRepository && OrganizationFormControl?.valid\">\n add_circle\n </mat-icon>\n\n <button mat-button type=\"button\" (click)=\"SaveRepository()\"\n *ngIf=\"CreatingRepository && RepositoryFormControl?.valid\">\n\n <mat-icon matSuffix color=\"primary\">\n save\n </mat-icon>\n </button>\n\n <button mat-button type=\"button\" (click)=\"CancelCreateRepository()\" *ngIf=\"CreatingRepository\">\n\n <mat-icon matSuffix>\n cancel\n </mat-icon>\n </button>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BranchesFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBranches\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-label>Selected Branches</mat-label>\n\n <mat-autocomplete (optionSelected)=\"BranchOptionSelected($event)\" #branchOptions=\"matAutocomplete\">\n <ng-container *ngFor=\"let branchOpt of BranchOptions\">\n <mat-option [value]=\"branchOpt.Name\">\n {{ branchOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n\n <mat-chip-list #selectedBranches>\n <mat-chip [removable]=\"true\" (removed)=\"RemoveBranchOption(selBranch)\"\n *ngFor=\"let selBranch of SelectedBranches\">\n {{ selBranch }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n\n <input matInput placeholder=\"New Branch...\" [formControlName]=\"SourceControlRoot + 'branches'\" #branches\n [matAutocomplete]=\"branchOptions\" [matChipInputFor]=\"selectedBranches\"\n [matChipInputSeparatorKeyCodes]=\"SeparatorKeysCodes\" [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"AddBranchOption($event)\" [disabled]=\"Loading || HostingDetails?.Loading\"\n required />\n </mat-chip-list>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width with-hint\" [fxShow]=\"SelectedBranches?.length > 1\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'mainBranch'\" placeholder=\"Main Branch\"\n [disabled]=\"Loading || HostingDetails?.Loading\" (selectionChange)=\"MainBranchChanged($event)\" required>\n <ng-container *ngFor=\"let branch of SelectedBranches\">\n <mat-option [value]=\"branch\">\n {{ branch }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\" color=\"accent\"> refresh </mat-icon>\n\n <a matSuffix mat-icon-button href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon matTooltip=\"Re-authorize Organizations\" color=\"accent\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" target=\"_blank\"class=\"primary-link\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BuildPathFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBuildPath\n \">\n <mat-form-field class=\"mat-full-width with-hint\">\n <mat-icon class=\"org-icon\" matPrefix>build</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'buildPath'\" placeholder=\"Build Path\"\n [disabled]=\"Loading || BuildPathDisabled\" (selectionChange)=\"BuildPathChanged($event)\" required>\n <ng-container *ngFor=\"let buildPath of BuildPathOptions\">\n <mat-option [value]=\"buildPath\">\n {{ buildPath }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-hint>\n The build path identifies which build action to use for your\n configuration.\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngIf=\"Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n\n <div class=\"margin-3\">\n <h4 class=\"mat-title\" *ngIf=\"!OrganizationFormControl?.valid\">\n Loading organizations\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n OrganizationFormControl?.valid && !RepositoryFormControl?.valid\n \">\n Loading repositories\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"RepositoryFormControl?.valid && !BranchesFormControl?.valid\">\n Loading branches\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n (RepositoryFormControl?.valid || BranchesFormControl?.valid) &&\n !BuildPathFormControl?.valid\n \">\n Loading build paths\n </h4>\n </div>\n </div>\n </div>\n </ng-container>\n <!-- </div> -->\n\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\"> -->\n\n <!-- <button \n mat-raised-button \n *ngIf=\"!State?.Loading\"\n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!DevOpsSourceControlFormGroup.valid || !DevOpsSourceControlFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Source Control\n </button>\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader> -->\n \n <!-- </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>", styles: [".form-card,.sc-card{width:100%}.margin-bottom{margin-bottom:15px}.primary-link{color:#4a918e;text-decoration:none}.s-block{margin:10px 0;width:100%;height:40px}\n"], components: [{ type: i3.LoaderComponent, selector: "lcu-loader", inputs: ["diameter", "hide-inner", "loading"] }, { type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i9$2.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i4.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }], directives: [{ type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.MatPrefix, selector: "[matPrefix]" }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$1.MatSuffix, selector: "[matSuffix]" }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i9$1.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { type: i4$1.MatLabel, selector: "mat-label" }, { type: i9$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i9$2.MatChipRemove, selector: "[matChipRemove]" }, { type: i8$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i9$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }] });
5023
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DevopsSourceControlFormComponent, decorators: [{
5024
+ type: Component,
5025
+ args: [{ selector: 'lcu-devops-source-control-form', template: "<form \n class=\"form-card\" \n [formGroup]=\"DevOpsSourceControlFormGroup\" \n (ngSubmit)=\"SubmitSourceControl()\"\n>\n\n <!-- <mat-card class=\"spread\" class=\"sc-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title> Source Control </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-icon matSuffix matTooltip=\"Configure source control, DevOps CI/CD, and artifacts.\">\n info_outline\n </mat-icon>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n\n <ng-container *ngIf=\"State?.Loading\">\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader>\n\n <!-- <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n [effect]=\"SkeletonEffect\" \n ></skeleton-block> -->\n\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n\n <div class=\"card\">\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select \n formControlName=\"devOpsActionLookup\" \n placeholder=\"DevOps Action\"\n [disabled]=\"HostingDetails?.Loading\" \n (selectionChange)=\"DevOpsActionLookupChanged($event)\"\n >\n <ng-container *ngFor=\"let devOpsActionLookup of DevOpsActionLookups\">\n <mat-option \n [value]=\"devOpsActionLookup\" \n *ngIf=\"DevOpsActions[devOpsActionLookup]; let devOpsAction\">\n {{ devOpsAction.Name }}\n </mat-option>\n </ng-container>\n\n <mat-option value=\"\">-- Create New --</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"card\" *ngIf=\"OrganizationFormControl?.valid || !Loading\">\n <mat-form-field \n class=\"mat-full-width with-hint margin-bottom\" \n *ngIf=\"OrganizationOptions?.length > 0\"\n >\n <mat-icon class=\"org-icon\" matPrefix>corporate_fare</mat-icon>\n\n <mat-select \n [formControlName]=\"SourceControlRoot + 'organization'\" \n placeholder=\"Organization\"\n (selectionChange)=\"OrganizationChanged($event)\" \n [disabled]=\"Loading || HostingDetails?.Loading\" \n required\n >\n <ng-container *ngFor=\"let orgOpt of OrganizationOptions\">\n <mat-option [value]=\"orgOpt.Name\">\n {{ orgOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\" matTooltip=\"Refresh Organization\" color=\"accent\"> refresh </mat-icon>\n\n <a matSuffix href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon color=\"accent\" matTooltip=\"Re-authorize Organizations\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" class=\"primary-link\" target=\"_blank\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n RepositoryFormControl?.valid ||\n (OrganizationFormControl?.valid && !Loading)\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>description</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'repository'\" [placeholder]=\"\n OrganizationFormControl?.valid\n ? 'Repository'\n : 'Repository (select organization first)'\n \" [disabled]=\"\n !OrganizationFormControl?.valid || Loading || HostingDetails?.Loading\n \" (selectionChange)=\"RepositoryChanged($event)\" *ngIf=\"!CreatingRepository\" required>\n <ng-container *ngFor=\"let repoOpt of RepositoryOptions\">\n <mat-option [value]=\"repoOpt.Name\">\n {{ repoOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <input matInput placeholder=\"Repository (creates new if does not exist)\"\n [formControlName]=\"SourceControlRoot + 'repository'\" *ngIf=\"CreatingRepository\"\n [fxHide]=\"Loading || HostingDetails?.Loading\" required />\n\n <mat-icon matSuffix (click)=\"CreateRepository()\" [fxHide]=\"Loading || HostingDetails?.Loading\"\n *ngIf=\"!CreatingRepository && OrganizationFormControl?.valid\">\n add_circle\n </mat-icon>\n\n <button mat-button type=\"button\" (click)=\"SaveRepository()\"\n *ngIf=\"CreatingRepository && RepositoryFormControl?.valid\">\n\n <mat-icon matSuffix color=\"primary\">\n save\n </mat-icon>\n </button>\n\n <button mat-button type=\"button\" (click)=\"CancelCreateRepository()\" *ngIf=\"CreatingRepository\">\n\n <mat-icon matSuffix>\n cancel\n </mat-icon>\n </button>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BranchesFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBranches\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-label>Selected Branches</mat-label>\n\n <mat-autocomplete (optionSelected)=\"BranchOptionSelected($event)\" #branchOptions=\"matAutocomplete\">\n <ng-container *ngFor=\"let branchOpt of BranchOptions\">\n <mat-option [value]=\"branchOpt.Name\">\n {{ branchOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n\n <mat-chip-list #selectedBranches>\n <mat-chip [removable]=\"true\" (removed)=\"RemoveBranchOption(selBranch)\"\n *ngFor=\"let selBranch of SelectedBranches\">\n {{ selBranch }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n\n <input matInput placeholder=\"New Branch...\" [formControlName]=\"SourceControlRoot + 'branches'\" #branches\n [matAutocomplete]=\"branchOptions\" [matChipInputFor]=\"selectedBranches\"\n [matChipInputSeparatorKeyCodes]=\"SeparatorKeysCodes\" [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"AddBranchOption($event)\" [disabled]=\"Loading || HostingDetails?.Loading\"\n required />\n </mat-chip-list>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width with-hint\" [fxShow]=\"SelectedBranches?.length > 1\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'mainBranch'\" placeholder=\"Main Branch\"\n [disabled]=\"Loading || HostingDetails?.Loading\" (selectionChange)=\"MainBranchChanged($event)\" required>\n <ng-container *ngFor=\"let branch of SelectedBranches\">\n <mat-option [value]=\"branch\">\n {{ branch }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\" color=\"accent\"> refresh </mat-icon>\n\n <a matSuffix mat-icon-button href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon matTooltip=\"Re-authorize Organizations\" color=\"accent\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" target=\"_blank\"class=\"primary-link\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BuildPathFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBuildPath\n \">\n <mat-form-field class=\"mat-full-width with-hint\">\n <mat-icon class=\"org-icon\" matPrefix>build</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'buildPath'\" placeholder=\"Build Path\"\n [disabled]=\"Loading || BuildPathDisabled\" (selectionChange)=\"BuildPathChanged($event)\" required>\n <ng-container *ngFor=\"let buildPath of BuildPathOptions\">\n <mat-option [value]=\"buildPath\">\n {{ buildPath }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-hint>\n The build path identifies which build action to use for your\n configuration.\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngIf=\"Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n\n <div class=\"margin-3\">\n <h4 class=\"mat-title\" *ngIf=\"!OrganizationFormControl?.valid\">\n Loading organizations\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n OrganizationFormControl?.valid && !RepositoryFormControl?.valid\n \">\n Loading repositories\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"RepositoryFormControl?.valid && !BranchesFormControl?.valid\">\n Loading branches\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n (RepositoryFormControl?.valid || BranchesFormControl?.valid) &&\n !BuildPathFormControl?.valid\n \">\n Loading build paths\n </h4>\n </div>\n </div>\n </div>\n </ng-container>\n <!-- </div> -->\n\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\"> -->\n\n <!-- <button \n mat-raised-button \n *ngIf=\"!State?.Loading\"\n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!DevOpsSourceControlFormGroup.valid || !DevOpsSourceControlFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Source Control\n </button>\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader> -->\n \n <!-- </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>", styles: [".form-card,.sc-card{width:100%}.margin-bottom{margin-bottom:15px}.primary-link{color:#4a918e;text-decoration:none}.s-block{margin:10px 0;width:100%;height:40px}\n"] }]
5026
+ }], ctorParameters: function () { return [{ type: ApplicationsFlowService }, { type: EaCService }, { type: i1$2.FormBuilder }]; }, propDecorators: { EditingSourceControlLookup: [{
5027
+ type: Input,
5028
+ args: ['editing-source-control-lookup']
5029
+ }], Environment: [{
5030
+ type: Input,
5031
+ args: ['environment']
5032
+ }], EnvironmentLookup: [{
5033
+ type: Input,
5034
+ args: ['environment-lookup']
5035
+ }], SaveStatusEvent: [{
5036
+ type: Output,
5037
+ args: ['save-status-event']
5038
+ }], BranchesInput: [{
5039
+ type: ViewChild,
5040
+ args: ['branches']
5041
+ }] } });
5042
+
5043
+ class SourceControlDialogComponent {
5044
+ constructor(dialogRef, eacSvc, data, snackBar) {
5045
+ this.dialogRef = dialogRef;
5046
+ this.eacSvc = eacSvc;
5047
+ this.data = data;
5048
+ this.snackBar = snackBar;
4721
5049
  }
4722
- get ZipFileFormControl() {
5050
+ get DevOpsSourceControlFormGroup() {
4723
5051
  var _a;
4724
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.zipFile;
5052
+ return (_a = this.DevopsSourceControl) === null || _a === void 0 ? void 0 : _a.DevOpsSourceControlFormGroup;
5053
+ }
5054
+ get HasConnection() {
5055
+ return this.State.GitHub.HasConnection;
5056
+ }
5057
+ get State() {
5058
+ return this.eacSvc.State;
4725
5059
  }
4726
5060
  ngOnInit() {
4727
- if (!this.EditingApplication) {
4728
- this.CreateNewApplication();
5061
+ }
5062
+ CloseDialog() {
5063
+ this.dialogRef.close();
5064
+ }
5065
+ HandleSaveStatusEvent(event) {
5066
+ console.log("event to save: ", event);
5067
+ if (event.Code === 0) {
5068
+ this.snackBar.open("Source Control Succesfully Saved", "Dismiss", {
5069
+ duration: 5000
5070
+ });
5071
+ this.CloseDialog();
4729
5072
  }
4730
5073
  else {
4731
- this.setupProcessorDetailsForm();
5074
+ this.ErrorMessage = event.Message;
4732
5075
  }
4733
5076
  }
4734
- CreateNewApplication() {
4735
- this.SetEditingApplication(Guid.CreateRaw());
5077
+ SaveSourceControl() {
5078
+ this.DevopsSourceControl.SaveSourceControl();
4736
5079
  }
4737
- DetermineTooltipText() {
4738
- let permanentValue = this.PermanentFormControl.value;
4739
- let preserveValue = this.PreserveMethodFormControl.value;
4740
- if (permanentValue === true && preserveValue === false) {
4741
- this.redirectTooltip = '301 – Permanent and Not Preserve';
5080
+ }
5081
+ SourceControlDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, deps: [{ token: i2$2.MatDialogRef }, { token: EaCService }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
5082
+ SourceControlDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: SourceControlDialogComponent, selector: "lcu-source-control-dialog", viewQueries: [{ propertyName: "DevopsSourceControl", first: true, predicate: DevopsSourceControlFormComponent, descendants: true }], ngImport: i0, template: "\n<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Source Control</h2>\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n\n <ng-container *ngIf=\"!HasConnection\">\n \n <lcu-git-auth></lcu-git-auth>\n\n </ng-container>\n\n <ng-conatiner *ngIf=\"HasConnection\" fxLayout=\"column\">\n\n <div fxLayoutAlign=\"center center\">\n <lcu-devops-source-control-form\n [environment]=\"data.environment\"\n [environment-lookup]=\"data.environmentLookup\"\n [editing-source-control-lookup]=\"data.scLookup\"\n (save-status-event)=\"HandleSaveStatusEvent($event)\">\n </lcu-devops-source-control-form>\n </div>\n \n <mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n </mat-error>\n\n </ng-conatiner>\n\n</mat-dialog-content>\n\n<mat-dialog-actions \n class=\"actions-container\" \n div fxLayout=\"row\" \n fxLayoutAlign=\"end center\"\n>\n <button \n class=\"action-button\"\n mat-raised-button\n fxFlex=\"25%\"\n (click)=\"CloseDialog()\">\n Cancel\n\n </button>\n\n\n\n <button \n class=\"action-button\"\n mat-raised-button \n *ngIf=\"!State?.Loading\" \n fxFlex=\"25%\" \n color=\"primary\" \n (click)=\"SaveSourceControl()\"\n [disabled]=\"!DevOpsSourceControlFormGroup?.valid || !DevOpsSourceControlFormGroup?.dirty\">\n <!-- <mat-icon>save</mat-icon> -->\n Save\n </button>\n\n</mat-dialog-actions>\n\n\n\n", styles: [".dialog-header{width:100%}.action-button{margin:0 10px}\n"], components: [{ type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: GitAuthComponent, selector: "lcu-git-auth" }, { type: DevopsSourceControlFormComponent, selector: "lcu-devops-source-control-form", inputs: ["editing-source-control-lookup", "environment", "environment-lookup"], outputs: ["save-status-event"] }], directives: [{ type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i2$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { type: i2$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
5083
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, decorators: [{
5084
+ type: Component,
5085
+ args: [{ selector: 'lcu-source-control-dialog', template: "\n<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Source Control</h2>\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n\n <ng-container *ngIf=\"!HasConnection\">\n \n <lcu-git-auth></lcu-git-auth>\n\n </ng-container>\n\n <ng-conatiner *ngIf=\"HasConnection\" fxLayout=\"column\">\n\n <div fxLayoutAlign=\"center center\">\n <lcu-devops-source-control-form\n [environment]=\"data.environment\"\n [environment-lookup]=\"data.environmentLookup\"\n [editing-source-control-lookup]=\"data.scLookup\"\n (save-status-event)=\"HandleSaveStatusEvent($event)\">\n </lcu-devops-source-control-form>\n </div>\n \n <mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n </mat-error>\n\n </ng-conatiner>\n\n</mat-dialog-content>\n\n<mat-dialog-actions \n class=\"actions-container\" \n div fxLayout=\"row\" \n fxLayoutAlign=\"end center\"\n>\n <button \n class=\"action-button\"\n mat-raised-button\n fxFlex=\"25%\"\n (click)=\"CloseDialog()\">\n Cancel\n\n </button>\n\n\n\n <button \n class=\"action-button\"\n mat-raised-button \n *ngIf=\"!State?.Loading\" \n fxFlex=\"25%\" \n color=\"primary\" \n (click)=\"SaveSourceControl()\"\n [disabled]=\"!DevOpsSourceControlFormGroup?.valid || !DevOpsSourceControlFormGroup?.dirty\">\n <!-- <mat-icon>save</mat-icon> -->\n Save\n </button>\n\n</mat-dialog-actions>\n\n\n\n", styles: [".dialog-header{width:100%}.action-button{margin:0 10px}\n"] }]
5086
+ }], ctorParameters: function () {
5087
+ return [{ type: i2$2.MatDialogRef }, { type: EaCService }, { type: undefined, decorators: [{
5088
+ type: Inject,
5089
+ args: [MAT_DIALOG_DATA]
5090
+ }] }, { type: i3$1.MatSnackBar }];
5091
+ }, propDecorators: { DevopsSourceControl: [{
5092
+ type: ViewChild,
5093
+ args: [DevopsSourceControlFormComponent]
5094
+ }] } });
5095
+
5096
+ class MainFeedCardComponent {
5097
+ constructor(eacSvc, dialog, sanitizer) {
5098
+ this.eacSvc = eacSvc;
5099
+ this.dialog = dialog;
5100
+ this.sanitizer = sanitizer;
5101
+ }
5102
+ get ActiveEnvironment() {
5103
+ var _a, _b;
5104
+ return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[this.ActiveEnvironmentLookup];
5105
+ }
5106
+ get ActiveEnvironmentLookup() {
5107
+ var _a, _b;
5108
+ // TODO: Eventually support multiple environments
5109
+ const envLookups = Object.keys(((_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments) || {});
5110
+ return envLookups[0];
5111
+ }
5112
+ get Environment() {
5113
+ var _a, _b, _c, _d, _e;
5114
+ // console.log("Ent Environment var: ", this.State?.EaC?.Environments[this.State?.EaC?.Enterprise?.PrimaryEnvironment]);
5115
+ return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[(_e = (_d = (_c = this.State) === null || _c === void 0 ? void 0 : _c.EaC) === null || _d === void 0 ? void 0 : _d.Enterprise) === null || _e === void 0 ? void 0 : _e.PrimaryEnvironment];
5116
+ }
5117
+ get Icon() {
5118
+ if (this.FeedItem.Status.Code === 0) {
5119
+ return 'check_circle';
4742
5120
  }
4743
- else if (permanentValue === false && preserveValue === false) {
4744
- this.redirectTooltip = '302 – Not Permanent and Not Preserve';
5121
+ else if (this.FeedItem.Status.Code === 1) {
5122
+ return 'cancel';
4745
5123
  }
4746
- else if (permanentValue === false && preserveValue === true) {
4747
- this.redirectTooltip = '307 – Not Permanent and Preserve';
5124
+ else if (this.FeedItem.Status.Code === 2) {
5125
+ return 'sync';
4748
5126
  }
4749
- else if (permanentValue === true && preserveValue === true) {
4750
- this.redirectTooltip = '308 – Permanent and Preserve';
5127
+ else {
5128
+ return 'help_outline';
4751
5129
  }
4752
5130
  }
4753
- SaveProcessorDetails() {
4754
- var _a, _b, _c, _d;
4755
- const app = this.EditingApplication;
4756
- app.LookupConfig.AllowedMethods = (_b = (_a = this.MethodsFormControl) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.split(' ').filter((v) => !!v);
4757
- app.Processor.Type = this.ProcessorType;
4758
- switch (app.Processor.Type) {
4759
- case 'DFS':
4760
- app.Processor.DefaultFile =
4761
- this.DefaultFileFormControl.value || 'index.html';
4762
- app.LowCodeUnit = {
4763
- Type: this.LCUType,
4764
- };
4765
- switch (app.LowCodeUnit.Type) {
4766
- case 'GitHub':
4767
- app.LowCodeUnit.Organization =
4768
- (_c = this.SourceControls[this.SourceControlFormControl.value]) === null || _c === void 0 ? void 0 : _c.Organization;
4769
- app.LowCodeUnit.Repository =
4770
- (_d = this.SourceControls[this.SourceControlFormControl.value]) === null || _d === void 0 ? void 0 : _d.Repository;
4771
- app.LowCodeUnit.Build = this.BuildFormControl.value;
4772
- app.LowCodeUnit.Path = this.BuildPathFormControl.value;
4773
- app.LowCodeUnit.SourceControlLookup =
4774
- this.SourceControlFormControl.value;
4775
- break;
4776
- case 'NPM':
4777
- app.LowCodeUnit.Package = this.PackageFormControl.value;
4778
- app.LowCodeUnit.Version = this.VersionFormControl.value;
4779
- break;
4780
- case 'WordPress':
4781
- app.LowCodeUnit.APIRoot = this.APIRootFormControl.value;
4782
- break;
4783
- case 'Zip':
4784
- app.LowCodeUnit.ZipFile = this.ZipFileFormControl.value;
4785
- break;
4786
- }
4787
- break;
4788
- case 'OAuth':
4789
- app.Processor.Scopes = this.ScopesFormControl.value.split(' ');
4790
- app.Processor.TokenLookup = this.TokenLookupFormControl.value;
4791
- app.LowCodeUnit = {
4792
- Type: this.LCUType,
4793
- };
4794
- switch (app.LowCodeUnit.Type) {
4795
- case 'GitHubOAuth':
4796
- app.LowCodeUnit.ClientID = this.ClientIDFormControl.value;
4797
- app.LowCodeUnit.ClientSecret = this.ClientSecretFormControl.value;
4798
- break;
4799
- }
4800
- break;
4801
- case 'Proxy':
4802
- app.Processor.InboundPath = this.InboundPathFormControl.value;
4803
- app.LowCodeUnit = {
4804
- Type: this.LCUType,
4805
- };
4806
- switch (app.LowCodeUnit.Type) {
4807
- case 'API':
4808
- app.LowCodeUnit.APIRoot = this.APIRootFormControl.value;
4809
- app.LowCodeUnit.Security = this.SecurityFormControl.value;
4810
- break;
4811
- case 'SPA':
4812
- app.LowCodeUnit.SPARoot = this.SPARootFormControl.value;
4813
- break;
4814
- }
4815
- break;
4816
- case 'Redirect':
4817
- app.Processor.IncludeRequest = !!this.IncludeRequestFormControl.value;
4818
- app.Processor.Permanent = !!this.PermanentFormControl.value;
4819
- app.Processor.PreserveMethod = !!this.PreserveMethodFormControl.value;
4820
- app.Processor.Redirect = this.RedirectFormControl.value;
4821
- break;
5131
+ get IconColor() {
5132
+ if (this.FeedItem.Status.Code === 0) {
5133
+ return 'green';
4822
5134
  }
4823
- if (!app.LookupConfig.PathRegex.startsWith('/')) {
4824
- app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
5135
+ else if (this.FeedItem.Status.Code === 1) {
5136
+ return 'red';
5137
+ }
5138
+ else if (this.FeedItem.Status.Code === 2) {
5139
+ return 'blue';
5140
+ }
5141
+ else {
5142
+ return 'gray';
4825
5143
  }
4826
- const saveAppReq = {
4827
- ProjectLookup: this.ProjectLookup,
4828
- Application: app,
4829
- ApplicationLookup: this.EditingApplicationLookup || Guid.CreateRaw(),
4830
- };
4831
- this.eacSvc.SaveApplicationAsCode(saveAppReq).then((res) => {
4832
- this.SaveFormEvent.emit(res);
4833
- });
4834
- }
4835
- SetEditingApplication(appLookup) {
4836
- this.EditingApplication = new EaCApplicationAsCode();
4837
- this.EditingApplicationLookup = appLookup;
4838
- this.setupProcessorDetailsForm();
4839
- }
4840
- SourceControlChanged(event) {
4841
- this.listBuildPaths();
4842
5144
  }
4843
- ProcessorTypeChanged(event) {
4844
- this.ProcessorType = event.value;
4845
- this.setupProcessorTypeSubForm();
5145
+ get State() {
5146
+ return this.eacSvc.State;
4846
5147
  }
4847
- LCUTypeChanged(event) {
4848
- this.LCUType = event.value;
4849
- this.setupLcuTypeSubForm();
5148
+ // Life Cycle
5149
+ ngOnInit() {
5150
+ this.handleRefresh();
4850
5151
  }
4851
- //HELPERS
4852
- cleanupLcuTypeSubForm() {
4853
- this.ProcessorDetailsFormGroup.removeControl('methods');
4854
- this.ProcessorDetailsFormGroup.removeControl('apiRoot');
4855
- this.ProcessorDetailsFormGroup.removeControl('security');
4856
- this.ProcessorDetailsFormGroup.removeControl('spaRoot');
4857
- this.ProcessorDetailsFormGroup.removeControl('applicationId');
4858
- this.ProcessorDetailsFormGroup.removeControl('sourceControl');
4859
- this.ProcessorDetailsFormGroup.removeControl('build');
4860
- this.ProcessorDetailsFormGroup.removeControl('clientId');
4861
- this.ProcessorDetailsFormGroup.removeControl('clientSecret');
4862
- this.ProcessorDetailsFormGroup.removeControl('package');
4863
- this.ProcessorDetailsFormGroup.removeControl('version');
4864
- this.ProcessorDetailsFormGroup.removeControl('zipFile');
5152
+ // API Methods
5153
+ CalculateTimelapse(timestamp) {
5154
+ return moment(timestamp).fromNow();
4865
5155
  }
4866
- cleanupProcessorTypeSubForm() {
4867
- this.ProcessorDetailsFormGroup.removeControl('defaultFile');
4868
- // this.ApplicationFormGroup.removeControl('dfsLcuType');
4869
- // this.ApplicationFormGroup.removeControl('oauthLcuType');
4870
- this.ProcessorDetailsFormGroup.removeControl('scopes');
4871
- this.ProcessorDetailsFormGroup.removeControl('tokenLookup');
4872
- this.ProcessorDetailsFormGroup.removeControl('inboundPath');
4873
- this.ProcessorDetailsFormGroup.removeControl('proxyLcuType');
4874
- this.ProcessorDetailsFormGroup.removeControl('includeRequest');
4875
- this.ProcessorDetailsFormGroup.removeControl('redirect');
4876
- this.ProcessorDetailsFormGroup.removeControl('permanent');
4877
- this.ProcessorDetailsFormGroup.removeControl('preserveMethod');
4878
- this.cleanupLcuTypeSubForm();
5156
+ HandleAction(action) {
5157
+ if (action.ActionType == 'Link') {
5158
+ if (action.Action.startsWith('http')) {
5159
+ window.open(action.Action, '_blank');
5160
+ }
5161
+ else {
5162
+ window.location.href = action.Action;
5163
+ }
5164
+ }
5165
+ else if (action.ActionType == 'Modal') {
5166
+ if (action.Action == 'AddSourceControl') {
5167
+ this.OpenSourceControlDialog(null);
5168
+ }
5169
+ else {
5170
+ alert('other modaled ' + action.Action);
5171
+ }
5172
+ }
4879
5173
  }
4880
- listBuildPaths() {
4881
- var _a, _b;
4882
- this.State.Loading = true;
4883
- console.log("Source Control: ", this.SourceControls[this.SourceControlFormControl.value]);
4884
- this.appsFlowSvc
4885
- .ListBuildPaths((_a = this.SourceControls[this.SourceControlFormControl.value]) === null || _a === void 0 ? void 0 : _a.Organization, (_b = this.SourceControls[this.SourceControlFormControl.value]) === null || _b === void 0 ? void 0 : _b.Repository)
4886
- .subscribe((response) => {
4887
- this.BuildPathOptions = response.Model;
4888
- console.log("build path options: ", this.BuildPathOptions);
4889
- this.State.Loading = false;
4890
- // if (this.BuildPathOptions?.length === 1) {
4891
- // this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
4892
- // }
5174
+ OpenSourceControlDialog(scLookup) {
5175
+ const dialogRef = this.dialog.open(SourceControlDialogComponent, {
5176
+ width: '550px',
5177
+ data: {
5178
+ environment: this.Environment,
5179
+ environmentLookup: this.ActiveEnvironmentLookup,
5180
+ scLookup: scLookup,
5181
+ },
5182
+ });
5183
+ dialogRef.afterClosed().subscribe((result) => {
5184
+ // console.log('The dialog was closed');
5185
+ // console.log("result:", result)
4893
5186
  });
4894
5187
  }
4895
- setupLcuTypeSubForm() {
4896
- this.cleanupLcuTypeSubForm();
4897
- if (this.LCUType) {
4898
- switch (this.LCUType) {
4899
- case 'API':
4900
- this.setupLCUAPIForm();
4901
- break;
4902
- case 'ApplicationPointer':
4903
- this.setupLCUApplicationPointerForm();
4904
- break;
4905
- case 'GitHub':
4906
- this.setupLCUGitHubForm();
4907
- break;
4908
- case 'GitHubOAuth':
4909
- this.setupLCUGitHubOAuthForm();
4910
- break;
4911
- case 'WordPress':
4912
- this.setupLCUWordPressForm();
4913
- break;
4914
- // case 'NPM':
4915
- // this.setupLCUNPMForm();
4916
- // break;
4917
- case 'SPA':
4918
- this.setupLCUSPAForm();
4919
- break;
4920
- case 'Zip':
4921
- this.setupLCUZipForm();
4922
- break;
4923
- }
5188
+ SafeHtml(html) {
5189
+ return this.sanitizer.bypassSecurityTrustHtml(html);
5190
+ }
5191
+ // Helpers
5192
+ handleRefresh() {
5193
+ var _a;
5194
+ if ((_a = this.FeedItem) === null || _a === void 0 ? void 0 : _a.RefreshLink) {
5195
+ setTimeout(() => {
5196
+ this.eacSvc.CheckUserFeedItem(this.FeedItem).subscribe((response) => __awaiter(this, void 0, void 0, function* () {
5197
+ if (response.Status.Code === 0) {
5198
+ this.FeedItem = response.Model;
5199
+ this.handleRefresh();
5200
+ }
5201
+ else {
5202
+ console.log(response);
5203
+ }
5204
+ }), (err) => {
5205
+ console.log(err);
5206
+ });
5207
+ }, 5000);
4924
5208
  }
4925
5209
  }
4926
- setupProcessorDetailsForm() {
4927
- var _a, _b;
4928
- this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
4929
- // console.log('EDITING APP = ', this.EditingApplication);
4930
- if (this.EditingApplication != null) {
4931
- this.ProcessorDetailsFormGroup = this.formBldr.group({
4932
- procType: [this.ProcessorType, [Validators.required]],
4933
- });
4934
- // this.setupDfsForm();
4935
- // this.setupLcuTypeSubForm();
4936
- this.setupProcessorTypeSubForm();
5210
+ }
5211
+ MainFeedCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MainFeedCardComponent, deps: [{ token: EaCService }, { token: i2$2.MatDialog }, { token: i3$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
5212
+ MainFeedCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: MainFeedCardComponent, selector: "lcu-main-feed-card", inputs: { FeedItem: ["feed-item", "FeedItem"] }, ngImport: i0, template: "<mat-card class=\"social-card\">\n <mat-card-header>\n <img\n mat-card-avatar\n class=\"example-header-image\"\n [src]=\"FeedItem.Avatar\"\n *ngIf=\"FeedItem.Avatar\"\n />\n\n <mat-card-title *ngIf=\"FeedItem.Title\">{{ FeedItem.Title }}</mat-card-title>\n\n <mat-card-subtitle>\n <div *ngIf=\"FeedItem.Subtitle\">{{ FeedItem.Subtitle }}</div>\n\n <div *ngIf=\"FeedItem.Subtext\">{{ FeedItem.Subtext }}</div>\n\n <div *ngIf=\"FeedItem.Status\">\n <mat-icon\n *ngIf=\"Icon\"\n [style.color]=\"IconColor\"\n [class.spin]=\"FeedItem.Status?.Code == 2\"\n >\n {{ Icon }}\n </mat-icon>\n\n <span *ngIf=\"FeedItem.Timestamp\">\n {{ CalculateTimelapse(FeedItem.Timestamp) }}\n </span>\n </div>\n </mat-card-subtitle>\n </mat-card-header>\n\n <div *ngIf=\"!FeedItem.IsShortForm\">\n <div class=\"feed-card-container\">\n <div class=\"feed-card-main-content\">\n <mat-tab-group>\n <ng-container *ngFor=\"let tab of FeedItem.Tabs\">\n <mat-tab [label]=\"tab.Title\">\n <div class=\"tab\">\n <ng-container *ngIf=\"tab.Data?.Commit?.Message\">\n <div class=\"commit-message\">\n {{ tab.Data?.Commit?.Message }}\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"tab.Data?.Video\">\n <div\n class=\"video\"\n [innerHTML]=\"SafeHtml(tab.Data.Video)\"\n ></div>\n </ng-container>\n </div>\n </mat-tab>\n </ng-container>\n </mat-tab-group>\n </div>\n </div>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div fxFlex></div>\n\n <ng-container *ngFor=\"let action of FeedItem.Actions\">\n <button mat-button [color]=\"action.Color\" (click)=\"HandleAction(action)\">\n <mat-icon *ngIf=\"action.Icon\">{{ action.Icon }}</mat-icon>\n\n {{ action.Text }}\n </button>\n </ng-container>\n </mat-card-actions>\n</mat-card>\n", styles: [":host :host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host :host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host :host ::ng-deep .main-slot-container{padding:10px}:host :host ::ng-deep .slot-header{align-items:center}:host :host ::ng-deep .slot-content{width:100%}:host :host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host :host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host :host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host :host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}:host .example-header-image{background-size:cover}:host .mat-icon{display:inline-flex;vertical-align:middle}:host .mat-icon.spin{animation:rotate 1s ease-in-out infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}:host .tab{margin:2em}:host .tab .video iframe{display:block;margin:auto}\n"], components: [{ type: i1$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i1$1.MatCardHeader, selector: "mat-card-header" }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i2$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.MatCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { type: i1$1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i1$1.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
5213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MainFeedCardComponent, decorators: [{
5214
+ type: Component,
5215
+ args: [{ selector: 'lcu-main-feed-card', template: "<mat-card class=\"social-card\">\n <mat-card-header>\n <img\n mat-card-avatar\n class=\"example-header-image\"\n [src]=\"FeedItem.Avatar\"\n *ngIf=\"FeedItem.Avatar\"\n />\n\n <mat-card-title *ngIf=\"FeedItem.Title\">{{ FeedItem.Title }}</mat-card-title>\n\n <mat-card-subtitle>\n <div *ngIf=\"FeedItem.Subtitle\">{{ FeedItem.Subtitle }}</div>\n\n <div *ngIf=\"FeedItem.Subtext\">{{ FeedItem.Subtext }}</div>\n\n <div *ngIf=\"FeedItem.Status\">\n <mat-icon\n *ngIf=\"Icon\"\n [style.color]=\"IconColor\"\n [class.spin]=\"FeedItem.Status?.Code == 2\"\n >\n {{ Icon }}\n </mat-icon>\n\n <span *ngIf=\"FeedItem.Timestamp\">\n {{ CalculateTimelapse(FeedItem.Timestamp) }}\n </span>\n </div>\n </mat-card-subtitle>\n </mat-card-header>\n\n <div *ngIf=\"!FeedItem.IsShortForm\">\n <div class=\"feed-card-container\">\n <div class=\"feed-card-main-content\">\n <mat-tab-group>\n <ng-container *ngFor=\"let tab of FeedItem.Tabs\">\n <mat-tab [label]=\"tab.Title\">\n <div class=\"tab\">\n <ng-container *ngIf=\"tab.Data?.Commit?.Message\">\n <div class=\"commit-message\">\n {{ tab.Data?.Commit?.Message }}\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"tab.Data?.Video\">\n <div\n class=\"video\"\n [innerHTML]=\"SafeHtml(tab.Data.Video)\"\n ></div>\n </ng-container>\n </div>\n </mat-tab>\n </ng-container>\n </mat-tab-group>\n </div>\n </div>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div fxFlex></div>\n\n <ng-container *ngFor=\"let action of FeedItem.Actions\">\n <button mat-button [color]=\"action.Color\" (click)=\"HandleAction(action)\">\n <mat-icon *ngIf=\"action.Icon\">{{ action.Icon }}</mat-icon>\n\n {{ action.Text }}\n </button>\n </ng-container>\n </mat-card-actions>\n</mat-card>\n", styles: [":host :host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host :host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host :host ::ng-deep .main-slot-container{padding:10px}:host :host ::ng-deep .slot-header{align-items:center}:host :host ::ng-deep .slot-content{width:100%}:host :host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host :host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host :host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host :host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}:host .example-header-image{background-size:cover}:host .mat-icon{display:inline-flex;vertical-align:middle}:host .mat-icon.spin{animation:rotate 1s ease-in-out infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}:host .tab{margin:2em}:host .tab .video iframe{display:block;margin:auto}\n"] }]
5216
+ }], ctorParameters: function () { return [{ type: EaCService }, { type: i2$2.MatDialog }, { type: i3$2.DomSanitizer }]; }, propDecorators: { FeedItem: [{
5217
+ type: Input,
5218
+ args: ['feed-item']
5219
+ }] } });
5220
+
5221
+ class TwoColumnHeaderComponent {
5222
+ constructor() { }
5223
+ ngOnInit() {
5224
+ }
5225
+ }
5226
+ TwoColumnHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5227
+ TwoColumnHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: TwoColumnHeaderComponent, selector: "lcu-two-column-header", ngImport: i0, template: "<div class=\"col-container\" fxLayout=\"row\">\n\n <div class=\"col-left\" fxFlex=\"15%\" >\n <ng-content select=\"[left]\"></ng-content>\n </div>\n\n <div class=\"col-center\" fxFlex=\"85%\">\n <ng-content></ng-content>\n </div>\n\n</div>\n", styles: [".col-container{background-color:#ebecf0}.col-left{min-width:210px}\n"], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
5228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, decorators: [{
5229
+ type: Component,
5230
+ args: [{ selector: 'lcu-two-column-header', template: "<div class=\"col-container\" fxLayout=\"row\">\n\n <div class=\"col-left\" fxFlex=\"15%\" >\n <ng-content select=\"[left]\"></ng-content>\n </div>\n\n <div class=\"col-center\" fxFlex=\"85%\">\n <ng-content></ng-content>\n </div>\n\n</div>\n", styles: [".col-container{background-color:#ebecf0}.col-left{min-width:210px}\n"] }]
5231
+ }], ctorParameters: function () { return []; } });
5232
+
5233
+ class CardCarouselComponent {
5234
+ constructor() {
5235
+ this.carouselIndex = 0;
5236
+ }
5237
+ ngOnInit() {
5238
+ }
5239
+ ngAfterViewInit() {
5240
+ this.assignCarouselClass();
5241
+ }
5242
+ LeftChevronClicked() {
5243
+ this.removeCarouselClasses();
5244
+ if (this.carouselIndex === 0) {
5245
+ this.carouselIndex = this.Stats.length - 1;
4937
5246
  }
5247
+ else {
5248
+ this.carouselIndex--;
5249
+ }
5250
+ this.assignCarouselClass();
4938
5251
  }
4939
- setupLCUGitHubForm() {
4940
- var _a, _b, _c;
4941
- console.log('EditingApplication: ', this.EditingApplication);
4942
- this.ProcessorDetailsFormGroup.addControl('sourceControl', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SourceControlLookup) || '', [Validators.required]));
4943
- this.ProcessorDetailsFormGroup.addControl('buildPath', this.formBldr.control(((_b = this.EditingApplication.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Path) || '', [
4944
- Validators.required,
4945
- ]));
4946
- this.ProcessorDetailsFormGroup.addControl('build', this.formBldr.control(((_c = this.EditingApplication.LowCodeUnit) === null || _c === void 0 ? void 0 : _c.Build) || 'latest', [Validators.required]));
4947
- this.listBuildPaths();
5252
+ MoreDetailsClicked() {
5253
+ console.log("More details clicked on carousel item", this.Stats[this.carouselIndex]);
4948
5254
  }
4949
- setupLCUApplicationPointerForm() {
4950
- var _a;
4951
- this.ProcessorDetailsFormGroup.addControl('applicationId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ApplicationID) || '', [Validators.required]));
5255
+ RightChevronClicked() {
5256
+ this.removeCarouselClasses();
5257
+ if (this.carouselIndex === this.Stats.length - 1) {
5258
+ this.carouselIndex = 0;
5259
+ }
5260
+ else {
5261
+ this.carouselIndex++;
5262
+ }
5263
+ this.assignCarouselClass();
4952
5264
  }
4953
- setupLCUSPAForm() {
4954
- var _a;
4955
- this.ProcessorDetailsFormGroup.addControl('spaRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SPARoot) || '', [Validators.required]));
5265
+ //HELPERS
5266
+ removeCarouselClasses() {
5267
+ for (let i = 0; i < this.Stats.length; i++) {
5268
+ if (i === this.carouselIndex) {
5269
+ document.getElementById("carousel-" + this.carouselIndex).classList.remove('active');
5270
+ }
5271
+ else {
5272
+ document.getElementById("carousel-" + i).classList.remove('hidden');
5273
+ }
5274
+ }
4956
5275
  }
4957
- setupLCUAPIForm() {
4958
- var _a, _b, _c, _d;
4959
- this.ProcessorDetailsFormGroup.addControl('methods', this.formBldr.control(((_b = (_a = this.EditingApplication.LookupConfig) === null || _a === void 0 ? void 0 : _a.AllowedMethods) === null || _b === void 0 ? void 0 : _b.join(' ')) || '', []));
4960
- this.ProcessorDetailsFormGroup.addControl('apiRoot', this.formBldr.control(((_c = this.EditingApplication.LowCodeUnit) === null || _c === void 0 ? void 0 : _c.APIRoot) || '', [Validators.required]));
4961
- this.ProcessorDetailsFormGroup.addControl('security', this.formBldr.control(((_d = this.EditingApplication.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Security) || '', [Validators.required]));
5276
+ assignCarouselClass() {
5277
+ for (let i = 0; i < this.Stats.length; i++) {
5278
+ if (i === this.carouselIndex) {
5279
+ document.getElementById("carousel-" + this.carouselIndex).classList.add('active');
5280
+ }
5281
+ else {
5282
+ document.getElementById("carousel-" + i).classList.add('hidden');
5283
+ }
5284
+ }
4962
5285
  }
4963
- setupLCUGitHubOAuthForm() {
4964
- var _a, _b;
4965
- this.ProcessorDetailsFormGroup.addControl('clientId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ClientID) || '', [Validators.required]));
4966
- this.ProcessorDetailsFormGroup.addControl('clientSecret', this.formBldr.control(((_b = this.EditingApplication.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.ClientSecret) || '', [Validators.required]));
5286
+ }
5287
+ CardCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5288
+ CardCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: CardCarouselComponent, selector: "lcu-card-carousel", inputs: { Stats: ["stats", "Stats"] }, ngImport: i0, template: "<div stats class=\"carousel-container\">\n <div class=\"chevron-container\" fxLayout=\"row\">\n <button mat-icon-button class=\"chevron-button\" id=\"left-chevron\" (click)=\"LeftChevronClicked()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button mat-icon-button class=\"chevron-button\" id=\"right-chevron\" (click)=\"RightChevronClicked()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n <ng-container *ngFor=\"let stat of Stats; let i = index\">\n <div class=\"carousel-item\" [id]=\"'carousel-'+i\">\n <div class=\"carousel-title\">{{stat.Name}}</div>\n <div class=\"carousel-stat\">{{stat.Stat}}</div>\n </div>\n </ng-container>\n <div (click)=\"MoreDetailsClicked()\">More details</div>\n</div>\n", styles: [".carousel-container{text-align:center;height:75px;padding-top:20px}.carousel-item.hidden{display:none}.carousel-item.active{visibility:visible}.chevron-button{position:absolute}#right-chevron{right:5px}#left-chevron{left:5px}\n"], components: [{ type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
5289
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, decorators: [{
5290
+ type: Component,
5291
+ args: [{ selector: 'lcu-card-carousel', template: "<div stats class=\"carousel-container\">\n <div class=\"chevron-container\" fxLayout=\"row\">\n <button mat-icon-button class=\"chevron-button\" id=\"left-chevron\" (click)=\"LeftChevronClicked()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button mat-icon-button class=\"chevron-button\" id=\"right-chevron\" (click)=\"RightChevronClicked()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n <ng-container *ngFor=\"let stat of Stats; let i = index\">\n <div class=\"carousel-item\" [id]=\"'carousel-'+i\">\n <div class=\"carousel-title\">{{stat.Name}}</div>\n <div class=\"carousel-stat\">{{stat.Stat}}</div>\n </div>\n </ng-container>\n <div (click)=\"MoreDetailsClicked()\">More details</div>\n</div>\n", styles: [".carousel-container{text-align:center;height:75px;padding-top:20px}.carousel-item.hidden{display:none}.carousel-item.active{visibility:visible}.chevron-button{position:absolute}#right-chevron{right:5px}#left-chevron{left:5px}\n"] }]
5292
+ }], ctorParameters: function () { return []; }, propDecorators: { Stats: [{
5293
+ type: Input,
5294
+ args: ['stats']
5295
+ }] } });
5296
+
5297
+ class SecurityToggleComponent {
5298
+ constructor(eacSvc, formBldr) {
5299
+ this.eacSvc = eacSvc;
5300
+ this.formBldr = formBldr;
5301
+ this.SaveFormEvent = new EventEmitter;
5302
+ this.SkeletonEffect = 'wave';
4967
5303
  }
4968
- setupLCUWordPressForm() {
5304
+ get IsPrivateFormControl() {
4969
5305
  var _a;
4970
- this.ProcessorDetailsFormGroup.addControl('apiRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.APIRoot) || '', [Validators.required]));
5306
+ return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isPrivate;
4971
5307
  }
4972
- setupProxyForm() {
4973
- var _a, _b;
4974
- this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
4975
- this.ProcessorDetailsFormGroup.addControl('inboundPath', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.InboundPath) || '', [Validators.required]));
4976
- this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
5308
+ get IsTriggerSignInFormControl() {
5309
+ var _a;
5310
+ return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isTriggerSignIn;
4977
5311
  }
4978
- setupRedirectForm() {
4979
- var _a, _b, _c, _d;
4980
- this.ProcessorDetailsFormGroup.addControl('redirect', this.formBldr.control(((_a = this.EditingApplication.Processor) === null || _a === void 0 ? void 0 : _a.Redirect) || '', [
4981
- Validators.required,
4982
- ]));
4983
- this.ProcessorDetailsFormGroup.addControl('permanent', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.Permanent) || false, []));
4984
- this.ProcessorDetailsFormGroup.addControl('preserveMethod', this.formBldr.control(((_c = this.EditingApplication.Processor) === null || _c === void 0 ? void 0 : _c.PreserveMethod) || false, []));
4985
- this.ProcessorDetailsFormGroup.addControl('includeRequest', this.formBldr.control(((_d = this.EditingApplication.Processor) === null || _d === void 0 ? void 0 : _d.IncludeRequest) || false, []));
4986
- this.DetermineTooltipText();
5312
+ get State() {
5313
+ return this.eacSvc.State;
4987
5314
  }
4988
- setupOAuthForm() {
4989
- var _a, _b, _c, _d;
4990
- this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
4991
- this.ProcessorDetailsFormGroup.addControl('scopes', this.formBldr.control(((_c = (_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.Scopes) === null || _c === void 0 ? void 0 : _c.Join(' ')) || '', [Validators.required]));
4992
- this.ProcessorDetailsFormGroup.addControl('tokenLookup', this.formBldr.control(((_d = this.EditingApplication.Processor) === null || _d === void 0 ? void 0 : _d.TokenLookup) || '', [Validators.required]));
4993
- this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
5315
+ ngOnInit() {
5316
+ this.setupSecurityFormGroup();
4994
5317
  }
4995
- setupLCUZipForm() {
4996
- var _a;
4997
- this.ProcessorDetailsFormGroup.addControl('zipFile', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ZipFile) || '', [Validators.required]));
5318
+ SecuritySubmit() {
5319
+ //save the security settings
5320
+ console.log("submitting security values: ", this.SecurityFormGroup.value);
5321
+ this.SaveFormEvent.emit(this.SecurityFormGroup.value);
4998
5322
  }
4999
- setupDfsForm() {
5323
+ setupSecurityFormGroup() {
5000
5324
  var _a, _b;
5001
- this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
5002
- this.ProcessorDetailsFormGroup.addControl('defaultFile', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.DefaultFile) || 'index.html', [Validators.required]));
5003
- this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
5325
+ this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
5326
+ this.SecurityFormGroup = this.formBldr.group({});
5327
+ this.setupSecurityForm();
5004
5328
  }
5005
- setupProcessorTypeSubForm() {
5006
- this.cleanupProcessorTypeSubForm();
5007
- if (this.ProcessorType) {
5008
- switch (this.ProcessorType) {
5009
- case 'DFS':
5010
- this.setupDfsForm();
5011
- break;
5012
- case 'OAuth':
5013
- this.setupOAuthForm();
5014
- break;
5015
- case 'Proxy':
5016
- this.setupProxyForm();
5017
- break;
5018
- case 'Redirect':
5019
- this.setupRedirectForm();
5020
- break;
5021
- }
5022
- }
5023
- this.setupLcuTypeSubForm();
5329
+ setupSecurityForm() {
5330
+ var _a, _b;
5331
+ this.SecurityFormGroup.addControl('isPrivate', this.formBldr.control(((_a = this.EditingApplication.LookupConfig) === null || _a === void 0 ? void 0 : _a.IsPrivate) || false, [Validators.required]));
5332
+ this.SecurityFormGroup.addControl('isTriggerSignIn', this.formBldr.control(((_b = this.EditingApplication.LookupConfig) === null || _b === void 0 ? void 0 : _b.IsTriggerSignIn) || false, [Validators.required]));
5024
5333
  }
5025
5334
  }
5026
- ProcessorDetailsFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ProcessorDetailsFormComponent, deps: [{ token: ApplicationsFlowService }, { token: i1$2.FormBuilder }, { token: EaCService }], target: i0.ɵɵFactoryTarget.Component });
5027
- ProcessorDetailsFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: ProcessorDetailsFormComponent, selector: "lcu-processor-details-form", inputs: { EditingApplication: ["editing-application", "EditingApplication"], EditingApplicationLookup: ["editing-application-lookup", "EditingApplicationLookup"], HasSaveButton: ["has-save-button", "HasSaveButton"], SourceControlLookups: ["source-control-lookups", "SourceControlLookups"], ProjectLookup: ["project-lookup", "ProjectLookup"] }, outputs: { SaveFormEvent: "save-form-event" }, ngImport: i0, template: "<form class=\"processor-details-form\" [formGroup]=\"ProcessorDetailsFormGroup\" (ngSubmit)=\"SaveProcessorDetails()\">\n<!-- <mat-card class=\"spread flow-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title> Processor Details </mat-card-title>\n </mat-card-header> -->\n\n <ng-container *ngIf=\"State?.Loading\">\n\n <ng-container *ngFor=\"let fc of ValidFormControls\">\n\n <skeleton-block \n [id]=\"fc\"\n class=\"s-block\" \n effect=\"wave\"\n ></skeleton-block>\n \n </ng-container>\n\n <lcu-loader *ngIf=\"LCUType === 'Redirect'\" [loading]=\"State?.Loading\"></lcu-loader>\n\n </ng-container>\n <!-- END SKELETON -->\n\n <ng-container *ngIf=\"!State?.Loading\">\n\n <!-- <mat-card-content> -->\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"procType\"\n (selectionChange)=\"ProcessorTypeChanged($event)\"\n required\n >\n <mat-option value=\"DFS\">View Package</mat-option>\n\n <mat-option value=\"Redirect\">Redirect</mat-option>\n\n <mat-option value=\"Proxy\">Proxy</mat-option>\n\n <mat-option value=\"OAuth\">OAuth</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"ProcessorType\">\n <div *ngSwitchCase=\"'DFS'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Default File\"\n formControlName=\"defaultFile\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"NPM\">NPM</mat-option>\n\n <mat-option value=\"GitHub\">GitHub</mat-option>\n\n <mat-option value=\"WordPress\">WordPress</mat-option>\n\n <!-- <mat-option value=\"Zip\">Zip</mat-option> -->\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHub'\">\n <!-- <lcu-source-control-form-controls\n [build-path]=\"EditingApplication?.LowCodeUnit?.Path\"\n [form-group]=\"ProcessorDetailsFormGroup\"\n [source-control]=\"DefaultSourceControl\"\n [use-branches]=\"false\"\n [use-build-path]=\"true\"\n ></lcu-source-control-form-controls> -->\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Source Control\"\n formControlName=\"sourceControl\"\n (selectionChange)=\"SourceControlChanged($event)\"\n required\n >\n <mat-option \n *ngFor=\"let scLookup of SourceControlLookups\" \n [value]=\"scLookup\">\n {{scLookup}}\n </mat-option>\n \n \n <!-- <mat-option value=\"Zip\">Zip</mat-option> -->\n </mat-select>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width with-hint\"\n *ngIf=\"\n SourceControlFormControl?.valid\n \"\n > \n <mat-select\n formControlName=\"buildPath\"\n placeholder=\"Build Path\"\n required\n >\n <ng-container *ngFor=\"let buildPath of BuildPathOptions\">\n <mat-option [value]=\"buildPath\">\n {{ buildPath }}\n </mat-option>\n </ng-container>\n </mat-select>\n \n <mat-hint>\n The build path identifies which build action to use for your\n configuration.\n </mat-hint>\n </mat-form-field>\n\n <mat-form-field\n class=\"mat-full-width\"\n *ngIf=\"\n SourceControlFormControl?.valid\n \"\n >\n <input\n matInput\n placeholder=\"Build\"\n formControlName=\"build\"\n required\n />\n\n <mat-hint>\n Current Build:\n {{ EditingApplication?.LowCodeUnit?.CurrentBuild }}\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'NPM'\">\n <lcu-npm-package-select\n [npm-package]=\"EditingApplication?.LowCodeUnit?.Package\"\n [npm-package-version]=\"\n EditingApplication?.LowCodeUnit?.Version\n \"\n [form-group]=\"ProcessorDetailsFormGroup\"\n ></lcu-npm-package-select>\n\n <mat-hint>\n Current Version:\n {{ EditingApplication?.LowCodeUnit?.CurrentVersion }}\n </mat-hint>\n </div>\n\n <div *ngSwitchCase=\"'WordPress'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"API Root\"\n formControlName=\"apiRoot\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'OAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Scopes (space separated)\"\n formControlName=\"scopes\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Token Lookup\"\n formControlName=\"tokenLookup\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"GitHubOAuth\">GitHub</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHubOAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client ID\"\n formControlName=\"clientId\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client Secret\"\n formControlName=\"clientSecret\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Proxy'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Inbound Path\"\n formControlName=\"inboundPath\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"API\">API</mat-option>\n\n <mat-option value=\"SPA\">Single Page Application</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'API'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"API Root\"\n formControlName=\"apiRoot\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Allowed Methods (separate with spaces)\"\n formControlName=\"methods\"\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Security ({header}~{value})\"\n formControlName=\"security\"\n required\n />\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'SPA'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"SPA Root\"\n formControlName=\"spaRoot\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Redirect'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Redirect URL\"\n formControlName=\"redirect\"\n required\n />\n </mat-form-field>\n\n <div>\n <mat-slide-toggle \n class=\"spread\" \n formControlName=\"permanent\">\n Is Permanent?\n </mat-slide-toggle>\n\n <mat-slide-toggle\n class=\"spread\"\n formControlName=\"preserveMethod\"\n >\n Preserve Method?\n </mat-slide-toggle>\n\n <mat-icon\n class=\"spread\"\n matSuffix\n (mouseenter)=\"DetermineTooltipText()\"\n matTooltip={{redirectTooltip}}\n >\n info_outline\n </mat-icon>\n\n \n </div>\n \n <div>\n <mat-slide-toggle \n class=\"spread\" \n formControlName=\"includeRequest\">\n Include Path and Query?\n </mat-slide-toggle>\n\n <mat-icon\n class=\"spread\"\n matSuffix\n matTooltip=\"Should the redirect include the path and query?\"\n >\n info_outline\n </mat-icon>\n </div>\n </div>\n </div>\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\"> -->\n\n <!-- <button \n *ngIf=\"HasSaveButton && !State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ProcessorDetailsFormGroup.valid || !ProcessorDetailsFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Processor Details\n </button> -->\n <!-- <lcu-loader *ngIf=\"HasSaveButton\" [loading]=\"State?.Loading\"></lcu-loader> -->\n\n <!-- </mat-card-actions> -->\n\n </ng-container>\n \n<!-- </mat-card> -->\n</form>\n \n", styles: [".s-block{margin:10px 0;width:100%;height:40px}\n"], components: [{ type: i4$3.SkeletonBlockComponent, selector: "skeleton-block", inputs: ["width", "height", "effect", "borderRadius"] }, { type: i3.LoaderComponent, selector: "lcu-loader", inputs: ["diameter", "hide-inner", "loading"] }, { type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: NpmPackageSelectComponent, selector: "lcu-npm-package-select", inputs: ["npm-package", "npm-package-version", "form-group"] }, { type: i12$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i9.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i9.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i4$1.MatSuffix, selector: "[matSuffix]" }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
5028
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ProcessorDetailsFormComponent, decorators: [{
5335
+ SecurityToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SecurityToggleComponent, deps: [{ token: EaCService }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
5336
+ SecurityToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: SecurityToggleComponent, selector: "lcu-security-toggle", inputs: { EditingApplication: ["editing-application", "EditingApplication"] }, outputs: { SaveFormEvent: "save-form-event" }, ngImport: i0, template: "<form class=\"security-form\" [formGroup]=\"SecurityFormGroup\" (ngSubmit)=\"SecuritySubmit()\">\n <mat-card class=\"flow-card\">\n\n <!-- SKELETON LOADING -->\n <ng-container *ngIf=\"State?.Loading\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title \n skeleton-text \n [effect]=\"SkeletonEffect\" \n > \n Security Settings \n </mat-card-title>\n <div fxLayoutAlign=\"space-around center\">\n <div\n skeleton-text \n [effect]=\"SkeletonEffect\" \n >\n XXX\n </div>\n\n <mat-icon\n skeleton-text \n [effect]=\"SkeletonEffect\" \n >\n info_outline\n </mat-icon>\n </div>\n </mat-card-header>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <div \n fxFlex=\"100%\" \n skeleton-text \n [effect]=\"SkeletonEffect\"\n fxLayoutAlign=\"center center\" \n >\n <mat-icon \n skeleton-text \n [effect]=\"SkeletonEffect\" \n >\n save\n </mat-icon>\n\n Save Settings\n </div>\n\n </mat-card-actions>\n </ng-container>\n <!-- END SKELETON LOADING -->\n\n <!-- BEGIN ACTUAL CONTENT -->\n\n <ng-container *ngIf=\"!State?.Loading\">\n <mat-card-header>\n <mat-card-title> Security Settings </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-slide-toggle\n formControlName=\"isPrivate\"\n matTooltip=\"Is Secure Application?\"\n >\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Secured Application is one that requires the user to be authenticated to use the application. The application is hosted behind an identity wall.\"\n >\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <div>\n <div *ngIf=\"IsPrivateFormControl.value\">\n <div>\n <mat-slide-toggle formControlName=\"isTriggerSignIn\">\n Is Trigger Sign In Application?\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Trigger Sign In Application will direct the user to sign in if they are not already.\"\n >\n info_outline\n </mat-icon>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Settings\n </button>\n\n </mat-card-actions>\n </ng-container>\n </mat-card>\n</form>\n", styles: ["::ng-deep .mat-tooltip{color:#000!important}.flow-card{margin:32px 20px}\n"], components: [{ type: i1$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i1$1.MatCardHeader, selector: "mat-card-header" }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i12$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i1$1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i4$3.SkeletonTextDirective, selector: "[skeleton-text]", inputs: ["effect"] }, { type: i1$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4$1.MatSuffix, selector: "[matSuffix]" }, { type: i1$1.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }] });
5337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SecurityToggleComponent, decorators: [{
5029
5338
  type: Component,
5030
- args: [{ selector: 'lcu-processor-details-form', template: "<form class=\"processor-details-form\" [formGroup]=\"ProcessorDetailsFormGroup\" (ngSubmit)=\"SaveProcessorDetails()\">\n<!-- <mat-card class=\"spread flow-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title> Processor Details </mat-card-title>\n </mat-card-header> -->\n\n <ng-container *ngIf=\"State?.Loading\">\n\n <ng-container *ngFor=\"let fc of ValidFormControls\">\n\n <skeleton-block \n [id]=\"fc\"\n class=\"s-block\" \n effect=\"wave\"\n ></skeleton-block>\n \n </ng-container>\n\n <lcu-loader *ngIf=\"LCUType === 'Redirect'\" [loading]=\"State?.Loading\"></lcu-loader>\n\n </ng-container>\n <!-- END SKELETON -->\n\n <ng-container *ngIf=\"!State?.Loading\">\n\n <!-- <mat-card-content> -->\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"procType\"\n (selectionChange)=\"ProcessorTypeChanged($event)\"\n required\n >\n <mat-option value=\"DFS\">View Package</mat-option>\n\n <mat-option value=\"Redirect\">Redirect</mat-option>\n\n <mat-option value=\"Proxy\">Proxy</mat-option>\n\n <mat-option value=\"OAuth\">OAuth</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"ProcessorType\">\n <div *ngSwitchCase=\"'DFS'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Default File\"\n formControlName=\"defaultFile\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"NPM\">NPM</mat-option>\n\n <mat-option value=\"GitHub\">GitHub</mat-option>\n\n <mat-option value=\"WordPress\">WordPress</mat-option>\n\n <!-- <mat-option value=\"Zip\">Zip</mat-option> -->\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHub'\">\n <!-- <lcu-source-control-form-controls\n [build-path]=\"EditingApplication?.LowCodeUnit?.Path\"\n [form-group]=\"ProcessorDetailsFormGroup\"\n [source-control]=\"DefaultSourceControl\"\n [use-branches]=\"false\"\n [use-build-path]=\"true\"\n ></lcu-source-control-form-controls> -->\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Source Control\"\n formControlName=\"sourceControl\"\n (selectionChange)=\"SourceControlChanged($event)\"\n required\n >\n <mat-option \n *ngFor=\"let scLookup of SourceControlLookups\" \n [value]=\"scLookup\">\n {{scLookup}}\n </mat-option>\n \n \n <!-- <mat-option value=\"Zip\">Zip</mat-option> -->\n </mat-select>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width with-hint\"\n *ngIf=\"\n SourceControlFormControl?.valid\n \"\n > \n <mat-select\n formControlName=\"buildPath\"\n placeholder=\"Build Path\"\n required\n >\n <ng-container *ngFor=\"let buildPath of BuildPathOptions\">\n <mat-option [value]=\"buildPath\">\n {{ buildPath }}\n </mat-option>\n </ng-container>\n </mat-select>\n \n <mat-hint>\n The build path identifies which build action to use for your\n configuration.\n </mat-hint>\n </mat-form-field>\n\n <mat-form-field\n class=\"mat-full-width\"\n *ngIf=\"\n SourceControlFormControl?.valid\n \"\n >\n <input\n matInput\n placeholder=\"Build\"\n formControlName=\"build\"\n required\n />\n\n <mat-hint>\n Current Build:\n {{ EditingApplication?.LowCodeUnit?.CurrentBuild }}\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'NPM'\">\n <lcu-npm-package-select\n [npm-package]=\"EditingApplication?.LowCodeUnit?.Package\"\n [npm-package-version]=\"\n EditingApplication?.LowCodeUnit?.Version\n \"\n [form-group]=\"ProcessorDetailsFormGroup\"\n ></lcu-npm-package-select>\n\n <mat-hint>\n Current Version:\n {{ EditingApplication?.LowCodeUnit?.CurrentVersion }}\n </mat-hint>\n </div>\n\n <div *ngSwitchCase=\"'WordPress'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"API Root\"\n formControlName=\"apiRoot\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'OAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Scopes (space separated)\"\n formControlName=\"scopes\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Token Lookup\"\n formControlName=\"tokenLookup\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"GitHubOAuth\">GitHub</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHubOAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client ID\"\n formControlName=\"clientId\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client Secret\"\n formControlName=\"clientSecret\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Proxy'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Inbound Path\"\n formControlName=\"inboundPath\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"API\">API</mat-option>\n\n <mat-option value=\"SPA\">Single Page Application</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'API'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"API Root\"\n formControlName=\"apiRoot\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Allowed Methods (separate with spaces)\"\n formControlName=\"methods\"\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Security ({header}~{value})\"\n formControlName=\"security\"\n required\n />\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'SPA'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"SPA Root\"\n formControlName=\"spaRoot\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Redirect'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Redirect URL\"\n formControlName=\"redirect\"\n required\n />\n </mat-form-field>\n\n <div>\n <mat-slide-toggle \n class=\"spread\" \n formControlName=\"permanent\">\n Is Permanent?\n </mat-slide-toggle>\n\n <mat-slide-toggle\n class=\"spread\"\n formControlName=\"preserveMethod\"\n >\n Preserve Method?\n </mat-slide-toggle>\n\n <mat-icon\n class=\"spread\"\n matSuffix\n (mouseenter)=\"DetermineTooltipText()\"\n matTooltip={{redirectTooltip}}\n >\n info_outline\n </mat-icon>\n\n \n </div>\n \n <div>\n <mat-slide-toggle \n class=\"spread\" \n formControlName=\"includeRequest\">\n Include Path and Query?\n </mat-slide-toggle>\n\n <mat-icon\n class=\"spread\"\n matSuffix\n matTooltip=\"Should the redirect include the path and query?\"\n >\n info_outline\n </mat-icon>\n </div>\n </div>\n </div>\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\"> -->\n\n <!-- <button \n *ngIf=\"HasSaveButton && !State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ProcessorDetailsFormGroup.valid || !ProcessorDetailsFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Processor Details\n </button> -->\n <!-- <lcu-loader *ngIf=\"HasSaveButton\" [loading]=\"State?.Loading\"></lcu-loader> -->\n\n <!-- </mat-card-actions> -->\n\n </ng-container>\n \n<!-- </mat-card> -->\n</form>\n \n", styles: [".s-block{margin:10px 0;width:100%;height:40px}\n"] }]
5031
- }], ctorParameters: function () { return [{ type: ApplicationsFlowService }, { type: i1$2.FormBuilder }, { type: EaCService }]; }, propDecorators: { EditingApplication: [{
5339
+ args: [{ selector: 'lcu-security-toggle', template: "<form class=\"security-form\" [formGroup]=\"SecurityFormGroup\" (ngSubmit)=\"SecuritySubmit()\">\n <mat-card class=\"flow-card\">\n\n <!-- SKELETON LOADING -->\n <ng-container *ngIf=\"State?.Loading\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title \n skeleton-text \n [effect]=\"SkeletonEffect\" \n > \n Security Settings \n </mat-card-title>\n <div fxLayoutAlign=\"space-around center\">\n <div\n skeleton-text \n [effect]=\"SkeletonEffect\" \n >\n XXX\n </div>\n\n <mat-icon\n skeleton-text \n [effect]=\"SkeletonEffect\" \n >\n info_outline\n </mat-icon>\n </div>\n </mat-card-header>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <div \n fxFlex=\"100%\" \n skeleton-text \n [effect]=\"SkeletonEffect\"\n fxLayoutAlign=\"center center\" \n >\n <mat-icon \n skeleton-text \n [effect]=\"SkeletonEffect\" \n >\n save\n </mat-icon>\n\n Save Settings\n </div>\n\n </mat-card-actions>\n </ng-container>\n <!-- END SKELETON LOADING -->\n\n <!-- BEGIN ACTUAL CONTENT -->\n\n <ng-container *ngIf=\"!State?.Loading\">\n <mat-card-header>\n <mat-card-title> Security Settings </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-slide-toggle\n formControlName=\"isPrivate\"\n matTooltip=\"Is Secure Application?\"\n >\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Secured Application is one that requires the user to be authenticated to use the application. The application is hosted behind an identity wall.\"\n >\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <div>\n <div *ngIf=\"IsPrivateFormControl.value\">\n <div>\n <mat-slide-toggle formControlName=\"isTriggerSignIn\">\n Is Trigger Sign In Application?\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Trigger Sign In Application will direct the user to sign in if they are not already.\"\n >\n info_outline\n </mat-icon>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Settings\n </button>\n\n </mat-card-actions>\n </ng-container>\n </mat-card>\n</form>\n", styles: ["::ng-deep .mat-tooltip{color:#000!important}.flow-card{margin:32px 20px}\n"] }]
5340
+ }], ctorParameters: function () { return [{ type: EaCService }, { type: i1$2.FormBuilder }]; }, propDecorators: { EditingApplication: [{
5032
5341
  type: Input,
5033
5342
  args: ['editing-application']
5034
- }], EditingApplicationLookup: [{
5035
- type: Input,
5036
- args: ['editing-application-lookup']
5037
- }], HasSaveButton: [{
5038
- type: Input,
5039
- args: ['has-save-button']
5040
- }], SourceControlLookups: [{
5041
- type: Input,
5042
- args: ['source-control-lookups']
5043
- }], ProjectLookup: [{
5044
- type: Input,
5045
- args: ['project-lookup']
5046
5343
  }], SaveFormEvent: [{
5047
5344
  type: Output,
5048
5345
  args: ['save-form-event']
@@ -5299,190 +5596,86 @@ class BuildPipelineFormComponent {
5299
5596
  }, (err) => {
5300
5597
  console.log('ERR: ', err);
5301
5598
  this.HostingDetails.Loading = false;
5302
- });
5303
- // console.log('HOSTING DETAILS: ', this.HostingDetails);
5304
- }
5305
- }
5306
- BuildPipelineFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineFormComponent, deps: [{ token: EaCService }, { token: i1$2.FormBuilder }, { token: ApplicationsFlowService }], target: i0.ɵɵFactoryTarget.Component });
5307
- BuildPipelineFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BuildPipelineFormComponent, selector: "lcu-build-pipeline-form", inputs: { DevOpsActionLookup: ["devops-action-lookup", "DevOpsActionLookup"], Disabled: ["disabled", "Disabled"], Environment: ["environment", "Environment"], EnvironmentLookup: ["environment-lookup", "EnvironmentLookup"], HostingDetails: ["hosting-details", "HostingDetails"] }, outputs: { ResponseEvent: "response-event" }, ngImport: i0, template: "<form \n class=\"form-card\" \n [formGroup]=\"BuildPipelineFormGroup\" \n (ngSubmit)=\"SubmitBuildPipeline()\"\n>\n <!-- <mat-card\n class=\"spread\" \n > -->\n <!-- <mat-card-header>\n <mat-card-title> Build Pipeline </mat-card-title>\n\n <mat-hint>\n Changes made here are reflected for all sources using this\n DevOpsAction\n </mat-hint>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n\n <ng-container *ngIf=\"HostingDetails?.Loading || State?.Loading\">\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <ng-container *ngIf=\"SelectedHostingOption?.Inputs\">\n <ng-container *ngFor=\"let hostOption of HostingDetails?.HostingOptions\">\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n </ng-container>\n\n </ng-container>\n\n <skeleton-block \n *ngIf=\"\"\n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n </ng-container>\n\n <ng-container *ngIf=\"!HostingDetails?.Loading && !State?.Loading\">\n\n <!-- <div *ngIf=\"!HostingDetails?.Loading\"> -->\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n formControlName=\"buildPipeline\"\n placeholder=\"Build Pipeline\"\n [disabled]=\"Disabled\"\n (selectionChange)=\"BuildPipelineChanged()\"\n required\n >\n <ng-container\n *ngFor=\"let hostOption of HostingDetails?.HostingOptions; let i = index\"\n >\n <mat-option [value]=\"hostOption.Lookup\">\n {{ hostOption.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n \n <mat-hint>\n <ng-container *ngFor=\"let hostOption of HostingDetails?.HostingOptions\">\n <span *ngIf=\"BuildPipeline == hostOption?.Lookup\">\n {{ hostOption.Description }}\n </span>\n </ng-container>\n </mat-hint>\n </mat-form-field>\n \n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n formControlName=\"devOpsActionName\"\n placeholder=\"Name of DevOps Action\"\n required=\"true\"\n />\n </mat-form-field>\n \n <ng-container *ngFor=\"let input of SelectedHostingOption?.Inputs\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n [formControlName]=\"input.Lookup\"\n [placeholder]=\"input.Placeholder\"\n [required]=\"input.Required\"\n />\n \n <mat-hint>{{ input.Hint }}</mat-hint>\n </mat-form-field>\n </ng-container>\n \n <div *ngIf=\"BuildPipeline == 'npm-release'\">\n <mat-form-field class=\"mat-full-width with-hint padding-bottom-4\">\n <mat-icon matPrefix>security</mat-icon>\n \n <input\n id=\"npm-token\"\n matInput\n type=\"text\"\n formControlName=\"npmToken\"\n placeholder=\"NPM token\"\n [required]=\"!Disabled\"\n style=\"-webkit-text-security: disc;\"\n />\n <mat-hint>\n Securely publish to NPM, provide an NPM Personal Access Token (PAT) with publish access to the organization used for your NPM packages. \n Learn how to create and view access tokens \n <a\n href=\"https://docs.npmjs.com/creating-and-viewing-access-tokens\"\n target=\"_blank\"\n class=\"primary-link\"\n >\n here.\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n <!-- </div> -->\n \n <!-- <div *ngIf=\"HostingDetails?.Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n \n <div class=\"margin-3\">\n <h4 class=\"mat-title\">Loading hosting details</h4>\n </div>\n </div>\n </div> -->\n </ng-container>\n <!-- </mat-card-content> -->\n\n <!-- <mat-card-actions fxLayoutAlign=\"center center\"> -->\n\n <!-- <button \n *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!BuildPipelineFormGroup.valid || !BuildPipelineFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Build Pipeline\n </button> -->\n <!-- <lcu-loader [loading]=\"State?.Loading\"></lcu-loader> -->\n \n <!-- </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>\n", styles: [".s-block{margin:10px 0;width:100%;height:40px}.primary-link{color:#4a918e;text-decoration:none}\n"], components: [{ type: i4$3.SkeletonBlockComponent, selector: "skeleton-block", inputs: ["width", "height", "effect", "borderRadius"] }, { type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4$1.MatPrefix, selector: "[matPrefix]" }] });
5308
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineFormComponent, decorators: [{
5309
- type: Component,
5310
- args: [{ selector: 'lcu-build-pipeline-form', template: "<form \n class=\"form-card\" \n [formGroup]=\"BuildPipelineFormGroup\" \n (ngSubmit)=\"SubmitBuildPipeline()\"\n>\n <!-- <mat-card\n class=\"spread\" \n > -->\n <!-- <mat-card-header>\n <mat-card-title> Build Pipeline </mat-card-title>\n\n <mat-hint>\n Changes made here are reflected for all sources using this\n DevOpsAction\n </mat-hint>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n\n <ng-container *ngIf=\"HostingDetails?.Loading || State?.Loading\">\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <ng-container *ngIf=\"SelectedHostingOption?.Inputs\">\n <ng-container *ngFor=\"let hostOption of HostingDetails?.HostingOptions\">\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n </ng-container>\n\n </ng-container>\n\n <skeleton-block \n *ngIf=\"\"\n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n </ng-container>\n\n <ng-container *ngIf=\"!HostingDetails?.Loading && !State?.Loading\">\n\n <!-- <div *ngIf=\"!HostingDetails?.Loading\"> -->\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n formControlName=\"buildPipeline\"\n placeholder=\"Build Pipeline\"\n [disabled]=\"Disabled\"\n (selectionChange)=\"BuildPipelineChanged()\"\n required\n >\n <ng-container\n *ngFor=\"let hostOption of HostingDetails?.HostingOptions; let i = index\"\n >\n <mat-option [value]=\"hostOption.Lookup\">\n {{ hostOption.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n \n <mat-hint>\n <ng-container *ngFor=\"let hostOption of HostingDetails?.HostingOptions\">\n <span *ngIf=\"BuildPipeline == hostOption?.Lookup\">\n {{ hostOption.Description }}\n </span>\n </ng-container>\n </mat-hint>\n </mat-form-field>\n \n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n formControlName=\"devOpsActionName\"\n placeholder=\"Name of DevOps Action\"\n required=\"true\"\n />\n </mat-form-field>\n \n <ng-container *ngFor=\"let input of SelectedHostingOption?.Inputs\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n [formControlName]=\"input.Lookup\"\n [placeholder]=\"input.Placeholder\"\n [required]=\"input.Required\"\n />\n \n <mat-hint>{{ input.Hint }}</mat-hint>\n </mat-form-field>\n </ng-container>\n \n <div *ngIf=\"BuildPipeline == 'npm-release'\">\n <mat-form-field class=\"mat-full-width with-hint padding-bottom-4\">\n <mat-icon matPrefix>security</mat-icon>\n \n <input\n id=\"npm-token\"\n matInput\n type=\"text\"\n formControlName=\"npmToken\"\n placeholder=\"NPM token\"\n [required]=\"!Disabled\"\n style=\"-webkit-text-security: disc;\"\n />\n <mat-hint>\n Securely publish to NPM, provide an NPM Personal Access Token (PAT) with publish access to the organization used for your NPM packages. \n Learn how to create and view access tokens \n <a\n href=\"https://docs.npmjs.com/creating-and-viewing-access-tokens\"\n target=\"_blank\"\n class=\"primary-link\"\n >\n here.\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n <!-- </div> -->\n \n <!-- <div *ngIf=\"HostingDetails?.Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n \n <div class=\"margin-3\">\n <h4 class=\"mat-title\">Loading hosting details</h4>\n </div>\n </div>\n </div> -->\n </ng-container>\n <!-- </mat-card-content> -->\n\n <!-- <mat-card-actions fxLayoutAlign=\"center center\"> -->\n\n <!-- <button \n *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!BuildPipelineFormGroup.valid || !BuildPipelineFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Build Pipeline\n </button> -->\n <!-- <lcu-loader [loading]=\"State?.Loading\"></lcu-loader> -->\n \n <!-- </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>\n", styles: [".s-block{margin:10px 0;width:100%;height:40px}.primary-link{color:#4a918e;text-decoration:none}\n"] }]
5311
- }], ctorParameters: function () { return [{ type: EaCService }, { type: i1$2.FormBuilder }, { type: ApplicationsFlowService }]; }, propDecorators: { DevOpsActionLookup: [{
5312
- type: Input,
5313
- args: ['devops-action-lookup']
5314
- }], Disabled: [{
5315
- type: Input,
5316
- args: ['disabled']
5317
- }], Environment: [{
5318
- type: Input,
5319
- args: ['environment']
5320
- }], EnvironmentLookup: [{
5321
- type: Input,
5322
- args: ['environment-lookup']
5323
- }], HostingDetails: [{
5324
- type: Input,
5325
- args: ['hosting-details']
5326
- }], ResponseEvent: [{
5327
- type: Output,
5328
- args: ['response-event']
5329
- }] } });
5330
-
5331
- class BuildPipelineDialogComponent {
5332
- constructor(dialogRef, eacSvc, data, snackBar) {
5333
- this.dialogRef = dialogRef;
5334
- this.eacSvc = eacSvc;
5335
- this.data = data;
5336
- this.snackBar = snackBar;
5337
- }
5338
- get BuildPipelineFormGroup() {
5339
- var _a;
5340
- return (_a = this.BuildPipelineControl) === null || _a === void 0 ? void 0 : _a.BuildPipelineFormGroup;
5341
- }
5342
- get HasConnection() {
5343
- return this.State.GitHub.HasConnection;
5344
- }
5345
- get State() {
5346
- return this.eacSvc.State;
5347
- }
5348
- ngOnInit() {
5349
- }
5350
- CloseDialog() {
5351
- this.dialogRef.close();
5352
- }
5353
- HandleResponseEvent(event) {
5354
- console.log("Response Event: ", event);
5355
- if (event.Code === 0) {
5356
- this.snackBar.open("Build Pipeline Created Succesfully", "Dismiss", {
5357
- duration: 5000
5358
- });
5359
- this.CloseDialog();
5360
- }
5361
- else {
5362
- this.ErrorMessage = event.Message;
5363
- }
5364
- }
5365
- SaveBuildPipeline() {
5366
- this.BuildPipelineControl.SaveEnvironment();
5367
- }
5368
- }
5369
- BuildPipelineDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineDialogComponent, deps: [{ token: i2$2.MatDialogRef }, { token: EaCService }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
5370
- BuildPipelineDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BuildPipelineDialogComponent, selector: "lcu-build-pipeline-dialog", viewQueries: [{ propertyName: "BuildPipelineControl", first: true, predicate: BuildPipelineFormComponent, descendants: true }], ngImport: i0, template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Build Pipeline</h2>\n\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n\n<ng-container *ngIf=\"!HasConnection\">\n \n <lcu-git-auth></lcu-git-auth>\n\n</ng-container>\n\n<ng-container *ngIf=\"HasConnection\">\n\n<lcu-build-pipeline-form \n [devops-action-lookup]=\"data.devopsActionLookup\"\n [environment]=\"data.environment\" \n [environment-lookup]=\"data.environmentLookup\"\n (response-event)=\"HandleResponseEvent($event)\"\n >\n\n</lcu-build-pipeline-form>\n\n<mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n</mat-error>\n\n</ng-container>\n</mat-dialog-content>\n\n\n<mat-dialog-actions \n class=\"actions-container\" \n div fxLayout=\"row\" \n fxLayoutAlign=\"end center\"\n>\n <button \n class=\"action-button\"\n mat-raised-button\n fxFlex=\"25%\"\n (click)=\"CloseDialog()\">\n Cancel\n\n </button>\n\n\n\n <button \n *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"25%\" \n color=\"primary\" \n (click)=\"SaveBuildPipeline()\"\n [disabled]=\"!BuildPipelineFormGroup?.valid || !BuildPipelineFormGroup?.dirty\">\n <!-- <mat-icon>save</mat-icon> -->\n Save\n </button>\n\n</mat-dialog-actions>", styles: [".dialog-header{width:100%}\n"], components: [{ type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: GitAuthComponent, selector: "lcu-git-auth" }, { type: BuildPipelineFormComponent, selector: "lcu-build-pipeline-form", inputs: ["devops-action-lookup", "disabled", "environment", "environment-lookup", "hosting-details"], outputs: ["response-event"] }], directives: [{ type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i2$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { type: i2$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
5371
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineDialogComponent, decorators: [{
5372
- type: Component,
5373
- args: [{ selector: 'lcu-build-pipeline-dialog', template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Build Pipeline</h2>\n\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n\n<ng-container *ngIf=\"!HasConnection\">\n \n <lcu-git-auth></lcu-git-auth>\n\n</ng-container>\n\n<ng-container *ngIf=\"HasConnection\">\n\n<lcu-build-pipeline-form \n [devops-action-lookup]=\"data.devopsActionLookup\"\n [environment]=\"data.environment\" \n [environment-lookup]=\"data.environmentLookup\"\n (response-event)=\"HandleResponseEvent($event)\"\n >\n\n</lcu-build-pipeline-form>\n\n<mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n</mat-error>\n\n</ng-container>\n</mat-dialog-content>\n\n\n<mat-dialog-actions \n class=\"actions-container\" \n div fxLayout=\"row\" \n fxLayoutAlign=\"end center\"\n>\n <button \n class=\"action-button\"\n mat-raised-button\n fxFlex=\"25%\"\n (click)=\"CloseDialog()\">\n Cancel\n\n </button>\n\n\n\n <button \n *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"25%\" \n color=\"primary\" \n (click)=\"SaveBuildPipeline()\"\n [disabled]=\"!BuildPipelineFormGroup?.valid || !BuildPipelineFormGroup?.dirty\">\n <!-- <mat-icon>save</mat-icon> -->\n Save\n </button>\n\n</mat-dialog-actions>", styles: [".dialog-header{width:100%}\n"] }]
5374
- }], ctorParameters: function () {
5375
- return [{ type: i2$2.MatDialogRef }, { type: EaCService }, { type: undefined, decorators: [{
5376
- type: Inject,
5377
- args: [MAT_DIALOG_DATA]
5378
- }] }, { type: i3$1.MatSnackBar }];
5379
- }, propDecorators: { BuildPipelineControl: [{
5380
- type: ViewChild,
5381
- args: [BuildPipelineFormComponent]
5382
- }] } });
5383
-
5384
- class EditApplicationFormComponent {
5385
- constructor(formBldr, eacSvc) {
5386
- this.formBldr = formBldr;
5387
- this.eacSvc = eacSvc;
5388
- this.SaveFormEvent = new EventEmitter;
5389
- this.HasSaveButton = true;
5390
- }
5391
- get DescriptionFormControl() {
5392
- var _a;
5393
- return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.description;
5394
- }
5395
- get NameFormControl() {
5396
- var _a;
5397
- return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.name;
5398
- }
5399
- get RouteFormControl() {
5400
- var _a;
5401
- return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.route;
5402
- }
5403
- get State() {
5404
- return this.eacSvc.State;
5405
- }
5406
- ngOnInit() {
5407
- this.setupApplicationForm();
5408
- }
5409
- SubmitApplicationControl() {
5410
- console.log("application form: ", this.ApplicationFormGroup.value);
5411
- this.SaveApplication();
5412
- }
5413
- SaveApplication() {
5414
- var _a, _b;
5415
- const app = this.EditingApplication;
5416
- // console.log("APP=", app);
5417
- app.Application = {
5418
- Name: this.NameFormControl.value,
5419
- Description: this.DescriptionFormControl.value,
5420
- PriorityShift: ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Application) === null || _b === void 0 ? void 0 : _b.PriorityShift) || 0,
5421
- };
5422
- app.LookupConfig.PathRegex = `${this.RouteFormControl.value}.*`;
5423
- switch (app.Processor.Type) {
5424
- case 'DFS':
5425
- app.Processor.BaseHref = `${this.RouteFormControl.value}/`.replace('//', '/');
5426
- break;
5427
- }
5428
- if (!app.LookupConfig.PathRegex.startsWith('/')) {
5429
- app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
5430
- }
5431
- const saveAppReq = {
5432
- ProjectLookup: this.ProjectLookup,
5433
- Application: app,
5434
- ApplicationLookup: this.ApplicationLookup,
5435
- };
5436
- console.log("processor details being submitted: ", app.Processor);
5437
- this.eacSvc.SaveApplicationAsCode(saveAppReq).then(res => {
5438
- this.SaveFormEvent.emit(res);
5439
- });
5440
- }
5441
- //HELPERS
5442
- setupApplicationForm() {
5443
- var _a, _b, _c;
5444
- if (this.EditingApplication != null) {
5445
- this.ApplicationFormGroup = this.formBldr.group({
5446
- name: [(_a = this.EditingApplication.Application) === null || _a === void 0 ? void 0 : _a.Name, Validators.required],
5447
- description: [
5448
- (_b = this.EditingApplication.Application) === null || _b === void 0 ? void 0 : _b.Description,
5449
- Validators.required,
5450
- ],
5451
- route: [this.CurrentRoute ? this.CurrentRoute :
5452
- ((_c = this.EditingApplication.LookupConfig) === null || _c === void 0 ? void 0 : _c.PathRegex.replace('.*', '')) ||
5453
- '/',
5454
- Validators.required,],
5455
- // priority: [
5456
- // this.EditingApplication.Application?.Priority || 10000,
5457
- // Validators.required,
5458
- // ],
5459
- });
5460
- }
5599
+ });
5600
+ // console.log('HOSTING DETAILS: ', this.HostingDetails);
5461
5601
  }
5462
5602
  }
5463
- EditApplicationFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationFormComponent, deps: [{ token: i1$2.FormBuilder }, { token: EaCService }], target: i0.ɵɵFactoryTarget.Component });
5464
- EditApplicationFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: EditApplicationFormComponent, selector: "lcu-edit-application-form", inputs: { ApplicationLookup: ["application-lookup", "ApplicationLookup"], CurrentRoute: ["current-route", "CurrentRoute"], EditingApplication: ["editing-application", "EditingApplication"], HasSaveButton: ["has-save-button", "HasSaveButton"], ProjectLookup: ["project-lookup", "ProjectLookup"] }, outputs: { SaveFormEvent: "save-form-event" }, ngImport: i0, template: "<form class=\"form-card\" [formGroup]=\"ApplicationFormGroup\" (ngSubmit)=\"SubmitApplicationControl()\" >\n <!-- <mat-card class=\"spread flow-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title>\n <ng-container *ngIf=\"EditingApplication?.Application\">\n Edit Application:\n {{ EditingApplication.Application?.Name }}\n </ng-container>\n\n <ng-container *ngIf=\"!EditingApplication?.Application\">\n Create an Application\n </ng-container>\n </mat-card-title>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n <ng-container *ngIf=\"State?.Loading\">\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Name\"\n formControlName=\"name\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <textarea\n matInput\n placeholder=\"Description\"\n formControlName=\"description\"\n rows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Route\"\n formControlName=\"route\"\n required\n />\n </mat-form-field>\n </ng-container>\n\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n *ngIf=\"HasSaveButton && !State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ApplicationFormGroup.valid || !ApplicationFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save\n </button>\n <lcu-loader *ngIf=\"HasSaveButton\" [loading]=\"State?.Loading\"></lcu-loader>\n \n </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>\n", styles: [".s-block{margin:10px 0;width:100%;height:40px}\n"], components: [{ type: i4$3.SkeletonBlockComponent, selector: "skeleton-block", inputs: ["width", "height", "effect", "borderRadius"] }, { type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }], directives: [{ type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }] });
5465
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationFormComponent, decorators: [{
5603
+ BuildPipelineFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineFormComponent, deps: [{ token: EaCService }, { token: i1$2.FormBuilder }, { token: ApplicationsFlowService }], target: i0.ɵɵFactoryTarget.Component });
5604
+ BuildPipelineFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BuildPipelineFormComponent, selector: "lcu-build-pipeline-form", inputs: { DevOpsActionLookup: ["devops-action-lookup", "DevOpsActionLookup"], Disabled: ["disabled", "Disabled"], Environment: ["environment", "Environment"], EnvironmentLookup: ["environment-lookup", "EnvironmentLookup"], HostingDetails: ["hosting-details", "HostingDetails"] }, outputs: { ResponseEvent: "response-event" }, ngImport: i0, template: "<form \n class=\"form-card\" \n [formGroup]=\"BuildPipelineFormGroup\" \n (ngSubmit)=\"SubmitBuildPipeline()\"\n>\n <!-- <mat-card\n class=\"spread\" \n > -->\n <!-- <mat-card-header>\n <mat-card-title> Build Pipeline </mat-card-title>\n\n <mat-hint>\n Changes made here are reflected for all sources using this\n DevOpsAction\n </mat-hint>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n\n <ng-container *ngIf=\"HostingDetails?.Loading || State?.Loading\">\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <ng-container *ngIf=\"SelectedHostingOption?.Inputs\">\n <ng-container *ngFor=\"let hostOption of HostingDetails?.HostingOptions\">\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n </ng-container>\n\n </ng-container>\n\n <skeleton-block \n *ngIf=\"\"\n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n </ng-container>\n\n <ng-container *ngIf=\"!HostingDetails?.Loading && !State?.Loading\">\n\n <!-- <div *ngIf=\"!HostingDetails?.Loading\"> -->\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n formControlName=\"buildPipeline\"\n placeholder=\"Build Pipeline\"\n [disabled]=\"Disabled\"\n (selectionChange)=\"BuildPipelineChanged()\"\n required\n >\n <ng-container\n *ngFor=\"let hostOption of HostingDetails?.HostingOptions; let i = index\"\n >\n <mat-option [value]=\"hostOption.Lookup\">\n {{ hostOption.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n \n <mat-hint>\n <ng-container *ngFor=\"let hostOption of HostingDetails?.HostingOptions\">\n <span *ngIf=\"BuildPipeline == hostOption?.Lookup\">\n {{ hostOption.Description }}\n </span>\n </ng-container>\n </mat-hint>\n </mat-form-field>\n \n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n formControlName=\"devOpsActionName\"\n placeholder=\"Name of DevOps Action\"\n required=\"true\"\n />\n </mat-form-field>\n \n <ng-container *ngFor=\"let input of SelectedHostingOption?.Inputs\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n [formControlName]=\"input.Lookup\"\n [placeholder]=\"input.Placeholder\"\n [required]=\"input.Required\"\n />\n \n <mat-hint>{{ input.Hint }}</mat-hint>\n </mat-form-field>\n </ng-container>\n \n <div *ngIf=\"BuildPipeline == 'npm-release'\">\n <mat-form-field class=\"mat-full-width with-hint padding-bottom-4\">\n <mat-icon matPrefix>security</mat-icon>\n \n <input\n id=\"npm-token\"\n matInput\n type=\"text\"\n formControlName=\"npmToken\"\n placeholder=\"NPM token\"\n [required]=\"!Disabled\"\n style=\"-webkit-text-security: disc;\"\n />\n <mat-hint>\n Securely publish to NPM, provide an NPM Personal Access Token (PAT) with publish access to the organization used for your NPM packages. \n Learn how to create and view access tokens \n <a\n href=\"https://docs.npmjs.com/creating-and-viewing-access-tokens\"\n target=\"_blank\"\n class=\"primary-link\"\n >\n here.\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n <!-- </div> -->\n \n <!-- <div *ngIf=\"HostingDetails?.Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n \n <div class=\"margin-3\">\n <h4 class=\"mat-title\">Loading hosting details</h4>\n </div>\n </div>\n </div> -->\n </ng-container>\n <!-- </mat-card-content> -->\n\n <!-- <mat-card-actions fxLayoutAlign=\"center center\"> -->\n\n <!-- <button \n *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!BuildPipelineFormGroup.valid || !BuildPipelineFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Build Pipeline\n </button> -->\n <!-- <lcu-loader [loading]=\"State?.Loading\"></lcu-loader> -->\n \n <!-- </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>\n", styles: [".s-block{margin:10px 0;width:100%;height:40px}.primary-link{color:#4a918e;text-decoration:none}\n"], components: [{ type: i4$3.SkeletonBlockComponent, selector: "skeleton-block", inputs: ["width", "height", "effect", "borderRadius"] }, { type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4$1.MatPrefix, selector: "[matPrefix]" }] });
5605
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineFormComponent, decorators: [{
5466
5606
  type: Component,
5467
- args: [{ selector: 'lcu-edit-application-form', template: "<form class=\"form-card\" [formGroup]=\"ApplicationFormGroup\" (ngSubmit)=\"SubmitApplicationControl()\" >\n <!-- <mat-card class=\"spread flow-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title>\n <ng-container *ngIf=\"EditingApplication?.Application\">\n Edit Application:\n {{ EditingApplication.Application?.Name }}\n </ng-container>\n\n <ng-container *ngIf=\"!EditingApplication?.Application\">\n Create an Application\n </ng-container>\n </mat-card-title>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n <ng-container *ngIf=\"State?.Loading\">\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Name\"\n formControlName=\"name\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <textarea\n matInput\n placeholder=\"Description\"\n formControlName=\"description\"\n rows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Route\"\n formControlName=\"route\"\n required\n />\n </mat-form-field>\n </ng-container>\n\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n *ngIf=\"HasSaveButton && !State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ApplicationFormGroup.valid || !ApplicationFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save\n </button>\n <lcu-loader *ngIf=\"HasSaveButton\" [loading]=\"State?.Loading\"></lcu-loader>\n \n </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>\n", styles: [".s-block{margin:10px 0;width:100%;height:40px}\n"] }]
5468
- }], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: EaCService }]; }, propDecorators: { ApplicationLookup: [{
5607
+ args: [{ selector: 'lcu-build-pipeline-form', template: "<form \n class=\"form-card\" \n [formGroup]=\"BuildPipelineFormGroup\" \n (ngSubmit)=\"SubmitBuildPipeline()\"\n>\n <!-- <mat-card\n class=\"spread\" \n > -->\n <!-- <mat-card-header>\n <mat-card-title> Build Pipeline </mat-card-title>\n\n <mat-hint>\n Changes made here are reflected for all sources using this\n DevOpsAction\n </mat-hint>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n\n <ng-container *ngIf=\"HostingDetails?.Loading || State?.Loading\">\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n <ng-container *ngIf=\"SelectedHostingOption?.Inputs\">\n <ng-container *ngFor=\"let hostOption of HostingDetails?.HostingOptions\">\n\n <skeleton-block \n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n </ng-container>\n\n </ng-container>\n\n <skeleton-block \n *ngIf=\"\"\n class=\"s-block\"\n effect=\"wave\" \n ></skeleton-block>\n\n </ng-container>\n\n <ng-container *ngIf=\"!HostingDetails?.Loading && !State?.Loading\">\n\n <!-- <div *ngIf=\"!HostingDetails?.Loading\"> -->\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n formControlName=\"buildPipeline\"\n placeholder=\"Build Pipeline\"\n [disabled]=\"Disabled\"\n (selectionChange)=\"BuildPipelineChanged()\"\n required\n >\n <ng-container\n *ngFor=\"let hostOption of HostingDetails?.HostingOptions; let i = index\"\n >\n <mat-option [value]=\"hostOption.Lookup\">\n {{ hostOption.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n \n <mat-hint>\n <ng-container *ngFor=\"let hostOption of HostingDetails?.HostingOptions\">\n <span *ngIf=\"BuildPipeline == hostOption?.Lookup\">\n {{ hostOption.Description }}\n </span>\n </ng-container>\n </mat-hint>\n </mat-form-field>\n \n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n formControlName=\"devOpsActionName\"\n placeholder=\"Name of DevOps Action\"\n required=\"true\"\n />\n </mat-form-field>\n \n <ng-container *ngFor=\"let input of SelectedHostingOption?.Inputs\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n [formControlName]=\"input.Lookup\"\n [placeholder]=\"input.Placeholder\"\n [required]=\"input.Required\"\n />\n \n <mat-hint>{{ input.Hint }}</mat-hint>\n </mat-form-field>\n </ng-container>\n \n <div *ngIf=\"BuildPipeline == 'npm-release'\">\n <mat-form-field class=\"mat-full-width with-hint padding-bottom-4\">\n <mat-icon matPrefix>security</mat-icon>\n \n <input\n id=\"npm-token\"\n matInput\n type=\"text\"\n formControlName=\"npmToken\"\n placeholder=\"NPM token\"\n [required]=\"!Disabled\"\n style=\"-webkit-text-security: disc;\"\n />\n <mat-hint>\n Securely publish to NPM, provide an NPM Personal Access Token (PAT) with publish access to the organization used for your NPM packages. \n Learn how to create and view access tokens \n <a\n href=\"https://docs.npmjs.com/creating-and-viewing-access-tokens\"\n target=\"_blank\"\n class=\"primary-link\"\n >\n here.\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n <!-- </div> -->\n \n <!-- <div *ngIf=\"HostingDetails?.Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n \n <div class=\"margin-3\">\n <h4 class=\"mat-title\">Loading hosting details</h4>\n </div>\n </div>\n </div> -->\n </ng-container>\n <!-- </mat-card-content> -->\n\n <!-- <mat-card-actions fxLayoutAlign=\"center center\"> -->\n\n <!-- <button \n *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!BuildPipelineFormGroup.valid || !BuildPipelineFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Build Pipeline\n </button> -->\n <!-- <lcu-loader [loading]=\"State?.Loading\"></lcu-loader> -->\n \n <!-- </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>\n", styles: [".s-block{margin:10px 0;width:100%;height:40px}.primary-link{color:#4a918e;text-decoration:none}\n"] }]
5608
+ }], ctorParameters: function () { return [{ type: EaCService }, { type: i1$2.FormBuilder }, { type: ApplicationsFlowService }]; }, propDecorators: { DevOpsActionLookup: [{
5469
5609
  type: Input,
5470
- args: ['application-lookup']
5471
- }], CurrentRoute: [{
5610
+ args: ['devops-action-lookup']
5611
+ }], Disabled: [{
5472
5612
  type: Input,
5473
- args: ['current-route']
5474
- }], EditingApplication: [{
5613
+ args: ['disabled']
5614
+ }], Environment: [{
5475
5615
  type: Input,
5476
- args: ['editing-application']
5477
- }], HasSaveButton: [{
5616
+ args: ['environment']
5617
+ }], EnvironmentLookup: [{
5478
5618
  type: Input,
5479
- args: ['has-save-button']
5480
- }], ProjectLookup: [{
5619
+ args: ['environment-lookup']
5620
+ }], HostingDetails: [{
5481
5621
  type: Input,
5482
- args: ['project-lookup']
5483
- }], SaveFormEvent: [{
5622
+ args: ['hosting-details']
5623
+ }], ResponseEvent: [{
5484
5624
  type: Output,
5485
- args: ['save-form-event']
5625
+ args: ['response-event']
5626
+ }] } });
5627
+
5628
+ class BuildPipelineDialogComponent {
5629
+ constructor(dialogRef, eacSvc, data, snackBar) {
5630
+ this.dialogRef = dialogRef;
5631
+ this.eacSvc = eacSvc;
5632
+ this.data = data;
5633
+ this.snackBar = snackBar;
5634
+ }
5635
+ get BuildPipelineFormGroup() {
5636
+ var _a;
5637
+ return (_a = this.BuildPipelineControl) === null || _a === void 0 ? void 0 : _a.BuildPipelineFormGroup;
5638
+ }
5639
+ get HasConnection() {
5640
+ return this.State.GitHub.HasConnection;
5641
+ }
5642
+ get State() {
5643
+ return this.eacSvc.State;
5644
+ }
5645
+ ngOnInit() {
5646
+ }
5647
+ CloseDialog() {
5648
+ this.dialogRef.close();
5649
+ }
5650
+ HandleResponseEvent(event) {
5651
+ console.log("Response Event: ", event);
5652
+ if (event.Code === 0) {
5653
+ this.snackBar.open("Build Pipeline Created Succesfully", "Dismiss", {
5654
+ duration: 5000
5655
+ });
5656
+ this.CloseDialog();
5657
+ }
5658
+ else {
5659
+ this.ErrorMessage = event.Message;
5660
+ }
5661
+ }
5662
+ SaveBuildPipeline() {
5663
+ this.BuildPipelineControl.SaveEnvironment();
5664
+ }
5665
+ }
5666
+ BuildPipelineDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineDialogComponent, deps: [{ token: i2$2.MatDialogRef }, { token: EaCService }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
5667
+ BuildPipelineDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BuildPipelineDialogComponent, selector: "lcu-build-pipeline-dialog", viewQueries: [{ propertyName: "BuildPipelineControl", first: true, predicate: BuildPipelineFormComponent, descendants: true }], ngImport: i0, template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Build Pipeline</h2>\n\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n\n<ng-container *ngIf=\"!HasConnection\">\n \n <lcu-git-auth></lcu-git-auth>\n\n</ng-container>\n\n<ng-container *ngIf=\"HasConnection\">\n\n<lcu-build-pipeline-form \n [devops-action-lookup]=\"data.devopsActionLookup\"\n [environment]=\"data.environment\" \n [environment-lookup]=\"data.environmentLookup\"\n (response-event)=\"HandleResponseEvent($event)\"\n >\n\n</lcu-build-pipeline-form>\n\n<mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n</mat-error>\n\n</ng-container>\n</mat-dialog-content>\n\n\n<mat-dialog-actions \n class=\"actions-container\" \n div fxLayout=\"row\" \n fxLayoutAlign=\"end center\"\n>\n <button \n class=\"action-button\"\n mat-raised-button\n fxFlex=\"25%\"\n (click)=\"CloseDialog()\">\n Cancel\n\n </button>\n\n\n\n <button \n *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"25%\" \n color=\"primary\" \n (click)=\"SaveBuildPipeline()\"\n [disabled]=\"!BuildPipelineFormGroup?.valid || !BuildPipelineFormGroup?.dirty\">\n <!-- <mat-icon>save</mat-icon> -->\n Save\n </button>\n\n</mat-dialog-actions>", styles: [".dialog-header{width:100%}\n"], components: [{ type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: GitAuthComponent, selector: "lcu-git-auth" }, { type: BuildPipelineFormComponent, selector: "lcu-build-pipeline-form", inputs: ["devops-action-lookup", "disabled", "environment", "environment-lookup", "hosting-details"], outputs: ["response-event"] }], directives: [{ type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i2$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { type: i2$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
5668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineDialogComponent, decorators: [{
5669
+ type: Component,
5670
+ args: [{ selector: 'lcu-build-pipeline-dialog', template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Build Pipeline</h2>\n\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n\n<ng-container *ngIf=\"!HasConnection\">\n \n <lcu-git-auth></lcu-git-auth>\n\n</ng-container>\n\n<ng-container *ngIf=\"HasConnection\">\n\n<lcu-build-pipeline-form \n [devops-action-lookup]=\"data.devopsActionLookup\"\n [environment]=\"data.environment\" \n [environment-lookup]=\"data.environmentLookup\"\n (response-event)=\"HandleResponseEvent($event)\"\n >\n\n</lcu-build-pipeline-form>\n\n<mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n</mat-error>\n\n</ng-container>\n</mat-dialog-content>\n\n\n<mat-dialog-actions \n class=\"actions-container\" \n div fxLayout=\"row\" \n fxLayoutAlign=\"end center\"\n>\n <button \n class=\"action-button\"\n mat-raised-button\n fxFlex=\"25%\"\n (click)=\"CloseDialog()\">\n Cancel\n\n </button>\n\n\n\n <button \n *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"25%\" \n color=\"primary\" \n (click)=\"SaveBuildPipeline()\"\n [disabled]=\"!BuildPipelineFormGroup?.valid || !BuildPipelineFormGroup?.dirty\">\n <!-- <mat-icon>save</mat-icon> -->\n Save\n </button>\n\n</mat-dialog-actions>", styles: [".dialog-header{width:100%}\n"] }]
5671
+ }], ctorParameters: function () {
5672
+ return [{ type: i2$2.MatDialogRef }, { type: EaCService }, { type: undefined, decorators: [{
5673
+ type: Inject,
5674
+ args: [MAT_DIALOG_DATA]
5675
+ }] }, { type: i3$1.MatSnackBar }];
5676
+ }, propDecorators: { BuildPipelineControl: [{
5677
+ type: ViewChild,
5678
+ args: [BuildPipelineFormComponent]
5486
5679
  }] } });
5487
5680
 
5488
5681
  class BreadcrumbComponent {
@@ -5592,7 +5785,7 @@ class BreadcrumbComponent {
5592
5785
  }
5593
5786
  }
5594
5787
  BreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: EaCService }], target: i0.ɵɵFactoryTarget.Component });
5595
- BreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BreadcrumbComponent, selector: "lcu-breadcrumb", inputs: { ApplicationLookup: ["application-lookup", "ApplicationLookup"], ProjectLookup: ["project-lookup", "ProjectLookup"], SelectedRoute: ["selected-route", "SelectedRoute"] }, ngImport: i0, template: "<div class=\"breadcrumb-container\" fxLayout=\"row wrap\">\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <ng-container *ngIf=\"State.Loading || Loading\">\n <mat-icon skeleton-text [effect]=\"SkeletonEffect\">home</mat-icon>\n\n <div skeleton-text [effect]=\"SkeletonEffect\">Enterprise Name</div>\n </ng-container>\n\n <ng-container *ngIf=\"!State.Loading && Enterprise && !Loading\">\n <div class=\"crumb-name\" [routerLink]=\"['/enterprises']\">\n <mat-icon>home</mat-icon>\n\n {{ Enterprise?.Name }}\n </div>\n\n <button mat-icon-button [matMenuTriggerFor]=\"enterpriseMenu\">\n <mat-icon>expand_more</mat-icon>\n </button>\n\n <mat-menu #enterpriseMenu=\"matMenu\" xPosition=\"before\">\n <button\n mat-menu-item\n [routerLink]=\"['/enterprises']\"\n (click)=\"SetActiveEnterprise(ent.Lookup)\"\n *ngFor=\"let ent of State.Enterprises\"\n >\n <span>{{ ent.Name }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n\n <div\n *ngIf=\"ProjectLookup && SelectedProject\"\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n >\n <span class=\"seperator\">/</span>\n\n <ng-container *ngIf=\"State?.Loading\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Project Name</div>\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n <div class=\"crumb-name\" [routerLink]=\"['/projects', ProjectLookup]\">\n {{ SelectedProject?.Project?.Name }}\n </div>\n\n <button mat-icon-button [matMenuTriggerFor]=\"projectMenu\">\n <mat-icon>expand_more</mat-icon>\n </button>\n\n <mat-menu #projectMenu=\"matMenu\" xPosition=\"before\">\n <button\n mat-menu-item\n *ngFor=\"let projectLookup of ProjectLookups\"\n [routerLink]=\"['/projects', projectLookup]\"\n >\n <span *ngIf=\"Projects[projectLookup]; let pro\">{{\n pro.Project?.Name\n }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n\n <div *ngIf=\"SelectedRoute\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <span class=\"seperator\">/</span>\n\n <ng-container *ngIf=\"State?.Loading\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Route Name</div>\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n <div\n class=\"crumb-name\"\n [routerLink]=\"['/routes', SelectedRoute, ProjectLookup]\"\n >\n {{ SelectedRoute }}\n </div>\n\n <button mat-icon-button [matMenuTriggerFor]=\"routeMenu\">\n <mat-icon>expand_more</mat-icon>\n </button>\n\n <mat-menu #routeMenu=\"matMenu\" xPosition=\"before\">\n <button\n mat-menu-item\n *ngFor=\"let appRoute of Routes\"\n [routerLink]=\"['/routes', appRoute, ProjectLookup]\"\n >\n <span *ngIf=\"appRoute\">{{ appRoute }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n\n <div\n *ngIf=\"SelectedApplication && ApplicationLookup\"\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n >\n <span class=\"seperator\">/</span>\n\n <ng-container *ngIf=\"State?.Loading\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Application Name</div>\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n <div\n class=\"crumb-name\"\n [routerLink]=\"[\n '/applications',\n ApplicationLookup,\n SelectedRoute,\n ProjectLookup\n ]\"\n >\n {{ SelectedApplication?.Application?.Name }}\n </div>\n\n <button mat-icon-button [matMenuTriggerFor]=\"applicationMenu\">\n <mat-icon>expand_more</mat-icon>\n </button>\n\n <mat-menu #applicationMenu=\"matMenu\" xPosition=\"before\">\n <button\n mat-menu-item\n *ngFor=\"let appLookup of CurrentRouteApplicationLookups\"\n [routerLink]=\"[\n '/applications',\n appLookup,\n SelectedRoute,\n ProjectLookup\n ]\"\n >\n <span *ngIf=\"RoutedApplications[SelectedRoute][appLookup]; let app\">{{\n app.Application?.Name\n }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n</div>\n", styles: [":host ::ng-deep .breadcrumb-container{background-color:#ebecf0;margin:20px 20px 0}:host ::ng-deep .seperator{font-size:25px;padding:10px}:host ::ng-deep .crumb-name{cursor:pointer}:host ::ng-deep .mat-icon{display:inline-flex;vertical-align:middle}\n"], components: [{ type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$4.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i4$4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$3.SkeletonTextDirective, selector: "[skeleton-text]", inputs: ["effect"] }, { type: i8$2.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i4$4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
5788
+ BreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BreadcrumbComponent, selector: "lcu-breadcrumb", inputs: { ApplicationLookup: ["application-lookup", "ApplicationLookup"], ProjectLookup: ["project-lookup", "ProjectLookup"], SelectedRoute: ["selected-route", "SelectedRoute"] }, ngImport: i0, template: "<div class=\"breadcrumb-container\" fxLayout=\"row wrap\">\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <ng-container *ngIf=\"State.Loading || Loading\">\n <mat-icon skeleton-text [effect]=\"SkeletonEffect\">home</mat-icon>\n\n <div skeleton-text [effect]=\"SkeletonEffect\">Enterprise Name</div>\n </ng-container>\n\n <ng-container *ngIf=\"!State.Loading && Enterprise && !Loading\">\n <div class=\"crumb-name\" [routerLink]=\"['/enterprises']\">\n <mat-icon>home</mat-icon>\n\n {{ Enterprise?.Name }}\n </div>\n\n <button mat-icon-button [matMenuTriggerFor]=\"enterpriseMenu\">\n <mat-icon>expand_more</mat-icon>\n </button>\n\n <mat-menu #enterpriseMenu=\"matMenu\" xPosition=\"before\">\n <button\n mat-menu-item\n [routerLink]=\"['/enterprises']\"\n (click)=\"SetActiveEnterprise(ent.Lookup)\"\n *ngFor=\"let ent of State.Enterprises\"\n >\n <span>{{ ent.Name }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n\n <div\n *ngIf=\"ProjectLookup && SelectedProject\"\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n >\n <span class=\"seperator\">/</span>\n\n <ng-container *ngIf=\"State?.Loading\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Project Name</div>\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n <div class=\"crumb-name\" [routerLink]=\"['/projects', ProjectLookup]\">\n {{ SelectedProject?.Project?.Name }}\n </div>\n\n <button mat-icon-button [matMenuTriggerFor]=\"projectMenu\">\n <mat-icon>expand_more</mat-icon>\n </button>\n\n <mat-menu #projectMenu=\"matMenu\" xPosition=\"before\">\n <button\n mat-menu-item\n *ngFor=\"let projectLookup of ProjectLookups\"\n [routerLink]=\"['/projects', projectLookup]\"\n >\n <span *ngIf=\"Projects[projectLookup]; let pro\">{{\n pro.Project?.Name\n }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n\n <div *ngIf=\"SelectedRoute\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <span class=\"seperator\">/</span>\n\n <ng-container *ngIf=\"State?.Loading\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Route Name</div>\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n <div\n class=\"crumb-name\"\n [routerLink]=\"['/routes', SelectedRoute, ProjectLookup]\"\n >\n {{ SelectedRoute }}\n </div>\n\n <button mat-icon-button [matMenuTriggerFor]=\"routeMenu\">\n <mat-icon>expand_more</mat-icon>\n </button>\n\n <mat-menu #routeMenu=\"matMenu\" xPosition=\"before\">\n <button\n mat-menu-item\n *ngFor=\"let appRoute of Routes\"\n [routerLink]=\"['/routes', appRoute, ProjectLookup]\"\n >\n <span *ngIf=\"appRoute\">{{ appRoute }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n\n <div\n *ngIf=\"SelectedApplication && ApplicationLookup\"\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n >\n <span class=\"seperator\">/</span>\n\n <ng-container *ngIf=\"State?.Loading\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Application Name</div>\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n <div\n class=\"crumb-name\"\n [routerLink]=\"[\n '/applications',\n ApplicationLookup,\n SelectedRoute,\n ProjectLookup\n ]\"\n >\n {{ SelectedApplication?.Application?.Name }}\n </div>\n\n <button mat-icon-button [matMenuTriggerFor]=\"applicationMenu\">\n <mat-icon>expand_more</mat-icon>\n </button>\n\n <mat-menu #applicationMenu=\"matMenu\" xPosition=\"before\">\n <button\n mat-menu-item\n *ngFor=\"let appLookup of CurrentRouteApplicationLookups\"\n [routerLink]=\"[\n '/applications',\n appLookup,\n SelectedRoute,\n ProjectLookup\n ]\"\n >\n <span *ngIf=\"RoutedApplications[SelectedRoute][appLookup]; let app\">{{\n app.Application?.Name\n }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n</div>\n", styles: [":host ::ng-deep .breadcrumb-container{background-color:#ebecf0;margin:20px 20px 0}:host ::ng-deep .seperator{font-size:25px;padding:10px}:host ::ng-deep .crumb-name{cursor:pointer}:host ::ng-deep .mat-icon{display:inline-flex;vertical-align:middle}\n"], components: [{ type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i7$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i7$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$3.SkeletonTextDirective, selector: "[skeleton-text]", inputs: ["effect"] }, { type: i8$2.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i7$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
5596
5789
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BreadcrumbComponent, decorators: [{
5597
5790
  type: Component,
5598
5791
  args: [{ selector: 'lcu-breadcrumb', template: "<div class=\"breadcrumb-container\" fxLayout=\"row wrap\">\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <ng-container *ngIf=\"State.Loading || Loading\">\n <mat-icon skeleton-text [effect]=\"SkeletonEffect\">home</mat-icon>\n\n <div skeleton-text [effect]=\"SkeletonEffect\">Enterprise Name</div>\n </ng-container>\n\n <ng-container *ngIf=\"!State.Loading && Enterprise && !Loading\">\n <div class=\"crumb-name\" [routerLink]=\"['/enterprises']\">\n <mat-icon>home</mat-icon>\n\n {{ Enterprise?.Name }}\n </div>\n\n <button mat-icon-button [matMenuTriggerFor]=\"enterpriseMenu\">\n <mat-icon>expand_more</mat-icon>\n </button>\n\n <mat-menu #enterpriseMenu=\"matMenu\" xPosition=\"before\">\n <button\n mat-menu-item\n [routerLink]=\"['/enterprises']\"\n (click)=\"SetActiveEnterprise(ent.Lookup)\"\n *ngFor=\"let ent of State.Enterprises\"\n >\n <span>{{ ent.Name }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n\n <div\n *ngIf=\"ProjectLookup && SelectedProject\"\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n >\n <span class=\"seperator\">/</span>\n\n <ng-container *ngIf=\"State?.Loading\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Project Name</div>\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n <div class=\"crumb-name\" [routerLink]=\"['/projects', ProjectLookup]\">\n {{ SelectedProject?.Project?.Name }}\n </div>\n\n <button mat-icon-button [matMenuTriggerFor]=\"projectMenu\">\n <mat-icon>expand_more</mat-icon>\n </button>\n\n <mat-menu #projectMenu=\"matMenu\" xPosition=\"before\">\n <button\n mat-menu-item\n *ngFor=\"let projectLookup of ProjectLookups\"\n [routerLink]=\"['/projects', projectLookup]\"\n >\n <span *ngIf=\"Projects[projectLookup]; let pro\">{{\n pro.Project?.Name\n }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n\n <div *ngIf=\"SelectedRoute\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <span class=\"seperator\">/</span>\n\n <ng-container *ngIf=\"State?.Loading\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Route Name</div>\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n <div\n class=\"crumb-name\"\n [routerLink]=\"['/routes', SelectedRoute, ProjectLookup]\"\n >\n {{ SelectedRoute }}\n </div>\n\n <button mat-icon-button [matMenuTriggerFor]=\"routeMenu\">\n <mat-icon>expand_more</mat-icon>\n </button>\n\n <mat-menu #routeMenu=\"matMenu\" xPosition=\"before\">\n <button\n mat-menu-item\n *ngFor=\"let appRoute of Routes\"\n [routerLink]=\"['/routes', appRoute, ProjectLookup]\"\n >\n <span *ngIf=\"appRoute\">{{ appRoute }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n\n <div\n *ngIf=\"SelectedApplication && ApplicationLookup\"\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n >\n <span class=\"seperator\">/</span>\n\n <ng-container *ngIf=\"State?.Loading\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Application Name</div>\n </ng-container>\n\n <ng-container *ngIf=\"!State?.Loading\">\n <div\n class=\"crumb-name\"\n [routerLink]=\"[\n '/applications',\n ApplicationLookup,\n SelectedRoute,\n ProjectLookup\n ]\"\n >\n {{ SelectedApplication?.Application?.Name }}\n </div>\n\n <button mat-icon-button [matMenuTriggerFor]=\"applicationMenu\">\n <mat-icon>expand_more</mat-icon>\n </button>\n\n <mat-menu #applicationMenu=\"matMenu\" xPosition=\"before\">\n <button\n mat-menu-item\n *ngFor=\"let appLookup of CurrentRouteApplicationLookups\"\n [routerLink]=\"[\n '/applications',\n appLookup,\n SelectedRoute,\n ProjectLookup\n ]\"\n >\n <span *ngIf=\"RoutedApplications[SelectedRoute][appLookup]; let app\">{{\n app.Application?.Name\n }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n</div>\n", styles: [":host ::ng-deep .breadcrumb-container{background-color:#ebecf0;margin:20px 20px 0}:host ::ng-deep .seperator{font-size:25px;padding:10px}:host ::ng-deep .crumb-name{cursor:pointer}:host ::ng-deep .mat-icon{display:inline-flex;vertical-align:middle}\n"] }]
@@ -5686,175 +5879,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
5686
5879
  args: [EditApplicationFormComponent]
5687
5880
  }] } });
5688
5881
 
5689
- class NewApplicationDialogComponent {
5690
- constructor(eacSvc, dialogRef, data, snackBar) {
5691
- this.eacSvc = eacSvc;
5692
- this.dialogRef = dialogRef;
5693
- this.data = data;
5694
- this.snackBar = snackBar;
5695
- this.HasSaveButton = false;
5696
- }
5697
- get Environment() {
5698
- var _a, _b;
5699
- return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[this.data.environmentLookup];
5700
- }
5701
- get SourceControls() {
5702
- var _a;
5703
- return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources) || {};
5704
- }
5705
- get SourceControlLookups() {
5706
- return Object.keys(this.Environment.Sources || {});
5707
- }
5708
- get State() {
5709
- return this.eacSvc.State;
5710
- }
5711
- ngOnInit() {
5712
- this.SetupApplication(Guid.CreateRaw());
5713
- }
5714
- CloseDialog() {
5715
- this.dialogRef.close();
5716
- }
5717
- SetupApplication(appLookup) {
5718
- this.NewApplication = new EaCApplicationAsCode;
5719
- this.NewApplicationLookup = appLookup;
5720
- }
5721
- SaveApplication() {
5722
- var _a, _b;
5723
- const app = {
5724
- Application: {
5725
- Name: this.ApplicationFormControls.NameFormControl.value,
5726
- Description: this.ApplicationFormControls.DescriptionFormControl.value,
5727
- PriorityShift: 0,
5728
- },
5729
- AccessRightLookups: [],
5730
- DataTokens: {},
5731
- LicenseConfigurationLookups: [],
5732
- LookupConfig: {
5733
- IsPrivate: false,
5734
- IsTriggerSignIn: false,
5735
- PathRegex: `${this.ApplicationFormControls.RouteFormControl.value}.*`,
5736
- QueryRegex: '',
5737
- HeaderRegex: '',
5738
- AllowedMethods: (_b = (_a = this.ProcessorDetailsFormControls.MethodsFormControl) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.split(' ').filter((v) => !!v),
5739
- },
5740
- Processor: {
5741
- Type: this.ProcessorDetailsFormControls.ProcessorType,
5742
- },
5743
- };
5744
- switch (app.Processor.Type) {
5745
- case 'DFS':
5746
- app.Processor.BaseHref = `${this.ApplicationFormControls.RouteFormControl.value}/`.replace('//', '/');
5747
- app.Processor.DefaultFile =
5748
- this.ProcessorDetailsFormControls.DefaultFileFormControl.value || 'index.html';
5749
- app.LowCodeUnit = {
5750
- Type: this.ProcessorDetailsFormControls.LCUType,
5751
- };
5752
- switch (app.LowCodeUnit.Type) {
5753
- case 'GitHub':
5754
- app.LowCodeUnit.Organization =
5755
- this.SourceControls[this.ProcessorDetailsFormControls.SourceControlFormControl.value].Organization;
5756
- app.LowCodeUnit.Repository =
5757
- this.SourceControls[this.ProcessorDetailsFormControls.SourceControlFormControl.value].Repository;
5758
- app.LowCodeUnit.Build = this.ProcessorDetailsFormControls.BuildFormControl.value;
5759
- app.LowCodeUnit.Path =
5760
- this.ProcessorDetailsFormControls.BuildPathFormControl.value;
5761
- break;
5762
- case 'NPM':
5763
- app.LowCodeUnit.Package = this.ProcessorDetailsFormControls.PackageFormControl.value;
5764
- app.LowCodeUnit.Version = this.ProcessorDetailsFormControls.VersionFormControl.value;
5765
- break;
5766
- case 'Zip':
5767
- app.LowCodeUnit.ZipFile = this.ProcessorDetailsFormControls.ZipFileFormControl.value;
5768
- break;
5769
- }
5770
- break;
5771
- case 'OAuth':
5772
- app.Processor.Scopes = this.ProcessorDetailsFormControls.ScopesFormControl.value.split(' ');
5773
- app.Processor.TokenLookup = this.ProcessorDetailsFormControls.TokenLookupFormControl.value;
5774
- app.LowCodeUnit = {
5775
- Type: this.ProcessorDetailsFormControls.LCUType,
5776
- };
5777
- switch (app.LowCodeUnit.Type) {
5778
- case 'GitHubOAuth':
5779
- app.LowCodeUnit.ClientID = this.ProcessorDetailsFormControls.ClientIDFormControl.value;
5780
- app.LowCodeUnit.ClientSecret = this.ProcessorDetailsFormControls.ClientSecretFormControl.value;
5781
- break;
5782
- }
5783
- break;
5784
- case 'Proxy':
5785
- app.Processor.InboundPath = this.ProcessorDetailsFormControls.InboundPathFormControl.value;
5786
- app.LowCodeUnit = {
5787
- Type: this.ProcessorDetailsFormControls.LCUType,
5788
- };
5789
- switch (app.LowCodeUnit.Type) {
5790
- case 'API':
5791
- app.LowCodeUnit.APIRoot = this.ProcessorDetailsFormControls.APIRootFormControl.value;
5792
- app.LowCodeUnit.Security = this.ProcessorDetailsFormControls.SecurityFormControl.value;
5793
- break;
5794
- case 'SPA':
5795
- app.LowCodeUnit.SPARoot = this.ProcessorDetailsFormControls.SPARootFormControl.value;
5796
- break;
5797
- }
5798
- break;
5799
- case 'Redirect':
5800
- app.Processor.Permanent = !!this.ProcessorDetailsFormControls.PermanentFormControl.value;
5801
- app.Processor.PreserveMethod = !!this.ProcessorDetailsFormControls.PreserveMethodFormControl.value;
5802
- app.Processor.Redirect = this.ProcessorDetailsFormControls.RedirectFormControl.value;
5803
- break;
5804
- }
5805
- if (!app.LookupConfig.PathRegex.startsWith('/')) {
5806
- app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
5807
- }
5808
- const saveAppReq = {
5809
- ProjectLookup: this.data.projectLookup,
5810
- Application: app,
5811
- ApplicationLookup: this.NewApplicationLookup,
5812
- };
5813
- // this.HasBuildFormControl.value && taken out from below if statement
5814
- if (this.ProcessorDetailsFormControls.ProcessorType !== 'redirect' && this.ProcessorDetailsFormControls.LCUType === 'GitHub') {
5815
- if (app) {
5816
- app.LowCodeUnit.SourceControlLookup = this.ProcessorDetailsFormControls.SourceControlFormControl.value;
5817
- }
5818
- }
5819
- else if (app) {
5820
- app.LowCodeUnit.SourceControlLookup = null;
5821
- }
5822
- // console.log("Save new App request: ", saveAppReq);
5823
- this.eacSvc.SaveApplicationAsCode(saveAppReq).then(res => {
5824
- this.handleSaveStatus(res);
5825
- });
5826
- }
5827
- handleSaveStatus(status) {
5828
- console.log("event to save: ", status);
5829
- if (status.Code === 0) {
5830
- this.snackBar.open("Application Succesfully Created", "Dismiss", {
5831
- duration: 5000
5832
- });
5833
- this.CloseDialog();
5834
- }
5835
- else {
5836
- this.ErrorMessage = status.Message;
5837
- }
5838
- }
5839
- }
5840
- NewApplicationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: NewApplicationDialogComponent, deps: [{ token: EaCService }, { token: i2$2.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
5841
- NewApplicationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: NewApplicationDialogComponent, selector: "lcu-new-application-dialog", viewQueries: [{ propertyName: "ApplicationFormControls", first: true, predicate: EditApplicationFormComponent, descendants: true }, { propertyName: "ProcessorDetailsFormControls", first: true, predicate: ProcessorDetailsFormComponent, descendants: true }], ngImport: i0, template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Create Application</h2>\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n\n <lcu-edit-application-form \n [current-route]=\"data.currentRoute\"\n [editing-application]=\"NewApplication\"\n [has-save-button]=\"HasSaveButton\"\n >\n </lcu-edit-application-form>\n\n <lcu-processor-details-form \n [editing-application]=\"NewApplication\"\n [editing-application-lookup]=\"NewApplicationLookup\"\n [has-save-button]=\"HasSaveButton\"\n [source-control-lookups]=\"SourceControlLookups\"\n [project-lookup]=\"data.projectLookup\"\n >\n </lcu-processor-details-form>\n\n <mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n </mat-error>\n</mat-dialog-content>\n\n<mat-dialog-actions\n class=\"actions-container\" \n div fxLayout=\"row\" \n fxLayoutAlign=\"end center\"\n>\n\n <button \n class=\"action-button\"\n mat-raised-button\n fxFlex=\"25%\"\n (click)=\"CloseDialog()\"\n >\n Cancel\n </button>\n\n\n <button \n *ngIf=\"ProcessorDetailsFormControls && ApplicationFormControls && !State?.Loading\"\n mat-raised-button \n color=\"primary\"\n fxFlex=\"25%\"\n class=\"new-app-submit\" \n (click)=\"SaveApplication()\"\n [disabled]=\"\n !ProcessorDetailsFormControls?.ProcessorDetailsFormGroup?.valid \n || \n !ApplicationFormControls?.ApplicationFormGroup?.valid\n \"\n >\n Save Application\n </button>\n</mat-dialog-actions>\n\n\n", styles: [""], components: [{ type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: EditApplicationFormComponent, selector: "lcu-edit-application-form", inputs: ["application-lookup", "current-route", "editing-application", "has-save-button", "project-lookup"], outputs: ["save-form-event"] }, { type: ProcessorDetailsFormComponent, selector: "lcu-processor-details-form", inputs: ["editing-application", "editing-application-lookup", "has-save-button", "source-control-lookups", "project-lookup"], outputs: ["save-form-event"] }], directives: [{ type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i2$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { type: i2$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
5842
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: NewApplicationDialogComponent, decorators: [{
5843
- type: Component,
5844
- args: [{ selector: 'lcu-new-application-dialog', template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Create Application</h2>\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n\n <lcu-edit-application-form \n [current-route]=\"data.currentRoute\"\n [editing-application]=\"NewApplication\"\n [has-save-button]=\"HasSaveButton\"\n >\n </lcu-edit-application-form>\n\n <lcu-processor-details-form \n [editing-application]=\"NewApplication\"\n [editing-application-lookup]=\"NewApplicationLookup\"\n [has-save-button]=\"HasSaveButton\"\n [source-control-lookups]=\"SourceControlLookups\"\n [project-lookup]=\"data.projectLookup\"\n >\n </lcu-processor-details-form>\n\n <mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n </mat-error>\n</mat-dialog-content>\n\n<mat-dialog-actions\n class=\"actions-container\" \n div fxLayout=\"row\" \n fxLayoutAlign=\"end center\"\n>\n\n <button \n class=\"action-button\"\n mat-raised-button\n fxFlex=\"25%\"\n (click)=\"CloseDialog()\"\n >\n Cancel\n </button>\n\n\n <button \n *ngIf=\"ProcessorDetailsFormControls && ApplicationFormControls && !State?.Loading\"\n mat-raised-button \n color=\"primary\"\n fxFlex=\"25%\"\n class=\"new-app-submit\" \n (click)=\"SaveApplication()\"\n [disabled]=\"\n !ProcessorDetailsFormControls?.ProcessorDetailsFormGroup?.valid \n || \n !ApplicationFormControls?.ApplicationFormGroup?.valid\n \"\n >\n Save Application\n </button>\n</mat-dialog-actions>\n\n\n", styles: [""] }]
5845
- }], ctorParameters: function () {
5846
- return [{ type: EaCService }, { type: i2$2.MatDialogRef }, { type: undefined, decorators: [{
5847
- type: Inject,
5848
- args: [MAT_DIALOG_DATA]
5849
- }] }, { type: i3$1.MatSnackBar }];
5850
- }, propDecorators: { ApplicationFormControls: [{
5851
- type: ViewChild,
5852
- args: [EditApplicationFormComponent]
5853
- }], ProcessorDetailsFormControls: [{
5854
- type: ViewChild,
5855
- args: [ProcessorDetailsFormComponent]
5856
- }] } });
5857
-
5858
5882
  class ProcessorDetailsDialogComponent {
5859
5883
  constructor(eacSvc, dialogRef, data, snackBar) {
5860
5884
  this.eacSvc = eacSvc;