@lowcodeunit/applications-flow-common 1.33.292-lets-get-social-ish → 1.33.293-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.
@@ -41,11 +41,11 @@ import * as i4$3 from 'skeleton-elements/angular';
41
41
  import { SkeletonElementsModule } from 'skeleton-elements/angular';
42
42
  import * as i2$2 from '@angular/material/dialog';
43
43
  import { MAT_DIALOG_DATA } from '@angular/material/dialog';
44
- import moment from 'moment';
44
+ import { EaCApplicationAsCode } from '@semanticjs/common';
45
45
  import * as i3$1 from '@angular/material/snack-bar';
46
+ import * as i7$1 from '@angular/material/menu';
47
+ import moment from 'moment';
46
48
  import * as i3$2 from '@angular/platform-browser';
47
- import { EaCApplicationAsCode } from '@semanticjs/common';
48
- import * as i4$4 from '@angular/material/menu';
49
49
  import * as i8$2 from '@angular/router';
50
50
 
51
51
  /**
@@ -3757,1150 +3757,1439 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
3757
3757
  args: ['feed-item']
3758
3758
  }] } });
3759
3759
 
3760
- class GhControlComponent {
3761
- constructor() {
3762
- this.InputLabel = "Create Pull Request";
3763
- this.selectedBtn = "pr-btn";
3760
+ class EditApplicationFormComponent {
3761
+ constructor(formBldr, eacSvc) {
3762
+ this.formBldr = formBldr;
3763
+ this.eacSvc = eacSvc;
3764
+ this.SaveFormEvent = new EventEmitter;
3765
+ this.HasSaveButton = true;
3764
3766
  }
3765
- ngOnInit() {
3767
+ get DescriptionFormControl() {
3768
+ return this.ApplicationFormGroup?.controls.description;
3766
3769
  }
3767
- ngAfterViewInit() {
3768
- this.addSelectBtn();
3770
+ get NameFormControl() {
3771
+ return this.ApplicationFormGroup?.controls.name;
3769
3772
  }
3770
- CreateFeatureBranch() {
3771
- this.removeSelectedBtn();
3772
- this.InputLabel = "Create Feature Branch";
3773
- this.selectedBtn = "fb-btn";
3774
- this.addSelectBtn();
3775
- console.log("create feature branch selected");
3773
+ get RouteFormControl() {
3774
+ return this.ApplicationFormGroup?.controls.route;
3776
3775
  }
3777
- OpenIssue() {
3778
- this.removeSelectedBtn();
3779
- this.InputLabel = "Open Issue";
3780
- this.selectedBtn = "oi-btn";
3781
- this.addSelectBtn();
3782
- console.log("open issue selected");
3776
+ get State() {
3777
+ return this.eacSvc.State;
3783
3778
  }
3784
- CreatePullRequest() {
3785
- this.removeSelectedBtn();
3786
- this.InputLabel = "Create Pull Request";
3787
- this.selectedBtn = "pr-btn";
3788
- this.addSelectBtn();
3789
- console.log("create pull request selected");
3779
+ ngOnInit() {
3780
+ this.setupApplicationForm();
3790
3781
  }
3791
- OpenMoreInfo() {
3792
- console.log("more info selected");
3782
+ SubmitApplicationControl() {
3783
+ console.log("application form: ", this.ApplicationFormGroup.value);
3784
+ this.SaveApplication();
3793
3785
  }
3794
- Submit() {
3795
- console.log("submitting: ", this.value);
3796
- switch (this.selectedBtn) {
3797
- case "pr-btn":
3798
- //Pull request
3799
- console.log("creating pull request: ", this.value);
3800
- break;
3801
- case "oi-btn":
3802
- //Open Issue
3803
- console.log("Open issue: ", this.value);
3804
- break;
3805
- case "fb-btn":
3806
- //Feature Branch
3807
- console.log("creating feature branch: ", this.value);
3808
- break;
3809
- default:
3810
- console.log("hmm");
3786
+ SaveApplication() {
3787
+ const app = this.EditingApplication;
3788
+ // console.log("APP=", app);
3789
+ app.Application = {
3790
+ Name: this.NameFormControl.value,
3791
+ Description: this.DescriptionFormControl.value,
3792
+ PriorityShift: this.EditingApplication?.Application?.PriorityShift || 0,
3793
+ };
3794
+ app.LookupConfig.PathRegex = `${this.RouteFormControl.value}.*`;
3795
+ switch (app.Processor.Type) {
3796
+ case 'DFS':
3797
+ app.Processor.BaseHref = `${this.RouteFormControl.value}/`.replace('//', '/');
3811
3798
  break;
3812
3799
  }
3800
+ if (!app.LookupConfig.PathRegex.startsWith('/')) {
3801
+ app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
3802
+ }
3803
+ const saveAppReq = {
3804
+ ProjectLookup: this.ProjectLookup,
3805
+ Application: app,
3806
+ ApplicationLookup: this.ApplicationLookup,
3807
+ };
3808
+ console.log("processor details being submitted: ", app.Processor);
3809
+ this.eacSvc.SaveApplicationAsCode(saveAppReq).then(res => {
3810
+ this.SaveFormEvent.emit(res);
3811
+ });
3813
3812
  }
3814
3813
  //HELPERS
3815
- addSelectBtn() {
3816
- document.getElementById(this.selectedBtn).classList.add('selected');
3817
- }
3818
- removeSelectedBtn() {
3819
- document.getElementById(this.selectedBtn).classList.remove('selected');
3814
+ setupApplicationForm() {
3815
+ if (this.EditingApplication != null) {
3816
+ this.ApplicationFormGroup = this.formBldr.group({
3817
+ name: [this.EditingApplication.Application?.Name, Validators.required],
3818
+ description: [
3819
+ this.EditingApplication.Application?.Description,
3820
+ Validators.required,
3821
+ ],
3822
+ route: [this.CurrentRoute ? this.CurrentRoute :
3823
+ this.EditingApplication.LookupConfig?.PathRegex.replace('.*', '') ||
3824
+ '/',
3825
+ Validators.required,
3826
+ ],
3827
+ // priority: [
3828
+ // this.EditingApplication.Application?.Priority || 10000,
3829
+ // Validators.required,
3830
+ // ],
3831
+ });
3832
+ }
3820
3833
  }
3821
3834
  }
3822
- GhControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: GhControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3823
- 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"] }] });
3824
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: GhControlComponent, decorators: [{
3835
+ 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 });
3836
+ 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"] }] });
3837
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationFormComponent, decorators: [{
3825
3838
  type: Component,
3826
- 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"] }]
3827
- }], ctorParameters: function () { return []; } });
3839
+ 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"] }]
3840
+ }], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: EaCService }]; }, propDecorators: { ApplicationLookup: [{
3841
+ type: Input,
3842
+ args: ['application-lookup']
3843
+ }], CurrentRoute: [{
3844
+ type: Input,
3845
+ args: ['current-route']
3846
+ }], EditingApplication: [{
3847
+ type: Input,
3848
+ args: ['editing-application']
3849
+ }], HasSaveButton: [{
3850
+ type: Input,
3851
+ args: ['has-save-button']
3852
+ }], ProjectLookup: [{
3853
+ type: Input,
3854
+ args: ['project-lookup']
3855
+ }], SaveFormEvent: [{
3856
+ type: Output,
3857
+ args: ['save-form-event']
3858
+ }] } });
3828
3859
 
3829
- class DevopsSourceControlFormComponent {
3830
- // Constructors
3831
- constructor(appsFlowSvc, eacSvc, formBuilder) {
3860
+ class ProcessorDetailsFormComponent {
3861
+ constructor(appsFlowSvc, formBldr, eacSvc) {
3832
3862
  this.appsFlowSvc = appsFlowSvc;
3863
+ this.formBldr = formBldr;
3833
3864
  this.eacSvc = eacSvc;
3834
- this.formBuilder = formBuilder;
3835
- this.SeparatorKeysCodes = [ENTER, COMMA];
3836
- this.SaveStatusEvent = new EventEmitter();
3837
- this.BuildPath = null;
3838
- this.HostingDetails = new ProjectHostingDetails();
3839
- this.SelectedBranches = [];
3840
- this.SourceControlRoot = '';
3841
- this.SkeletonEffect = "wave";
3842
- this.UseBranches = true;
3843
- this.UseBuildPath = false;
3844
- }
3845
- // Properties
3846
- get ArtifactLookups() {
3847
- return this.DevOpsAction?.ArtifactLookups;
3865
+ this.redirectTooltip = '';
3866
+ this.HasSaveButton = true;
3867
+ this.SaveFormEvent = new EventEmitter();
3848
3868
  }
3849
- get ArtifactLookup() {
3850
- const artLookup = this.DevOpsAction?.ArtifactLookups
3851
- ? this.DevOpsAction?.ArtifactLookups[0]
3852
- : null;
3853
- return artLookup;
3869
+ get APIRootFormControl() {
3870
+ return this.ProcessorDetailsFormGroup?.controls.apiRoot;
3854
3871
  }
3855
- get Artifact() {
3856
- return this.Environment?.Artifacts && this.ArtifactLookup
3857
- ? this.Environment?.Artifacts[this.ArtifactLookup] || {}
3858
- : {};
3872
+ get Environment() {
3873
+ return this.State?.EaC?.Environments[this.State?.EaC?.Enterprise?.PrimaryEnvironment];
3859
3874
  }
3860
- get BranchesFormControl() {
3861
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
3875
+ get BuildFormControl() {
3876
+ return this.ProcessorDetailsFormGroup?.controls.build;
3862
3877
  }
3863
3878
  get BuildPathFormControl() {
3864
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'buildPath');
3879
+ return this.ProcessorDetailsFormGroup?.controls.buildPath;
3865
3880
  }
3866
- get DevOpsActionLookups() {
3867
- // console.log(this.DevOpsActions);
3868
- return Object.keys(this.DevOpsActions || {});
3881
+ get ClientIDFormControl() {
3882
+ return this.ProcessorDetailsFormGroup?.controls.clientId;
3869
3883
  }
3870
- get DevOpsAction() {
3871
- return this.Environment.DevOpsActions && this.DevOpsActionLookup
3872
- ? this.Environment.DevOpsActions[this.DevOpsActionLookup] || {}
3873
- : {};
3884
+ get ClientSecretFormControl() {
3885
+ return this.ProcessorDetailsFormGroup?.controls.clientSecret;
3874
3886
  }
3875
- get DevOpsActionLookup() {
3876
- if (!!this.DevOpsActionLookupFormControl?.value) {
3877
- return this.DevOpsActionLookupFormControl.value;
3878
- }
3879
- if (!!this.EditingSourceControl?.DevOpsActionTriggerLookups) {
3880
- return this.EditingSourceControl?.DevOpsActionTriggerLookups[0];
3881
- }
3882
- else {
3883
- return null;
3884
- }
3887
+ get DefaultFileFormControl() {
3888
+ return this.ProcessorDetailsFormGroup?.controls.defaultFile;
3885
3889
  }
3886
- get DevOpsActionLookupFormControl() {
3887
- return this.DevOpsSourceControlFormGroup.get('devOpsActionLookup');
3890
+ get DefaultSourceControl() {
3891
+ return {
3892
+ Organization: this.EditingApplication?.LowCodeUnit?.Organization,
3893
+ Repository: this.EditingApplication?.LowCodeUnit?.Repository,
3894
+ };
3888
3895
  }
3889
- get DevOpsActions() {
3890
- return this.Environment.DevOpsActions || {};
3896
+ get InboundPathFormControl() {
3897
+ return this.ProcessorDetailsFormGroup?.controls.inboundPath;
3891
3898
  }
3892
- get EditingSourceControl() {
3893
- let sc = this.Environment?.Sources
3894
- ? this.Environment?.Sources[this.EditingSourceControlLookup]
3895
- : null;
3896
- if (sc == null && this.EditingSourceControlLookup) {
3897
- sc = {};
3898
- }
3899
- return sc;
3899
+ get IncludeRequestFormControl() {
3900
+ return this.ProcessorDetailsFormGroup?.controls.includeRequest;
3900
3901
  }
3901
- get MainBranchFormControl() {
3902
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'mainBranch');
3902
+ get MethodsFormControl() {
3903
+ return this.ProcessorDetailsFormGroup?.controls.methods;
3903
3904
  }
3904
- get OrganizationFormControl() {
3905
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'organization');
3905
+ get PackageFormControl() {
3906
+ return this.ProcessorDetailsFormGroup?.controls.package;
3906
3907
  }
3907
- get RepositoryFormControl() {
3908
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'repository');
3908
+ get PermanentFormControl() {
3909
+ return this.ProcessorDetailsFormGroup?.controls.permanent;
3910
+ }
3911
+ get PreserveMethodFormControl() {
3912
+ return this.ProcessorDetailsFormGroup?.controls.preserveMethod;
3913
+ }
3914
+ get RedirectFormControl() {
3915
+ return this.ProcessorDetailsFormGroup?.controls.redirect;
3916
+ }
3917
+ get ScopesFormControl() {
3918
+ return this.ProcessorDetailsFormGroup?.controls.scopes;
3919
+ }
3920
+ get SecurityFormControl() {
3921
+ return this.ProcessorDetailsFormGroup?.controls.security;
3909
3922
  }
3910
3923
  get State() {
3911
3924
  return this.eacSvc.State;
3912
3925
  }
3913
- // Life Cycle
3914
- ngAfterViewInit() { }
3915
- ngOnDestroy() {
3916
- this.destroyFormControls();
3926
+ get SourceControls() {
3927
+ return this.Environment?.Sources || {};
3917
3928
  }
3918
- ngOnInit() {
3919
- console.log("source control lookup", this.EditingSourceControlLookup);
3920
- if (this.EditingSourceControlLookup === null) {
3921
- this.CreateNewSourceControl();
3922
- }
3923
- console.log("source control", this.EditingSourceControl);
3924
- if (this.EditingSourceControl != null) {
3925
- this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
3926
- this.setupFormControls();
3927
- }
3928
- this.RefreshOrganizations();
3929
- }
3930
- // API Methods
3931
- AddBranchOption(event) {
3932
- this.addBranchOption(event.value);
3933
- event.input.value = '';
3934
- }
3935
- BranchOptionSelected(event) {
3936
- this.addBranchOption(event.option.value);
3929
+ get SourceControlFormControl() {
3930
+ return this.ProcessorDetailsFormGroup?.controls.sourceControl;
3937
3931
  }
3938
- BranchesChanged(branches) {
3939
- this.loadProjectHostingDetails();
3932
+ get SPARootFormControl() {
3933
+ return this.ProcessorDetailsFormGroup?.controls.spaRoot;
3940
3934
  }
3941
- BuildPathChanged(event) {
3942
- //do something??
3935
+ get TokenLookupFormControl() {
3936
+ return this.ProcessorDetailsFormGroup?.controls.tokenLookup;
3943
3937
  }
3944
- CreateNewSourceControl() {
3945
- this.SetEditingSourceControl(Guid.CreateRaw());
3938
+ get ValidFormControls() {
3939
+ let vfc = new Array();
3940
+ for (const field in this.ProcessorDetailsFormGroup.controls) {
3941
+ const control = this.ProcessorDetailsFormGroup.get(field);
3942
+ if (control.valid) {
3943
+ vfc.push(control);
3944
+ }
3945
+ }
3946
+ // console.log("VFC=", vfc)
3947
+ return vfc;
3946
3948
  }
3947
- CreateRepository() {
3948
- this.CreatingRepository = true;
3949
- this.RepositoryFormControl.reset();
3949
+ get VersionFormControl() {
3950
+ return this.ProcessorDetailsFormGroup?.controls.version;
3950
3951
  }
3951
- CancelCreateRepository() {
3952
- this.CreatingRepository = false;
3952
+ get ZipFileFormControl() {
3953
+ return this.ProcessorDetailsFormGroup?.controls.zipFile;
3953
3954
  }
3954
- DevOpsActionLookupChanged(event) {
3955
- this.configureDevOpsAction();
3955
+ ngOnInit() {
3956
+ if (!this.EditingApplication) {
3957
+ this.CreateNewApplication();
3958
+ }
3959
+ else {
3960
+ this.setupProcessorDetailsForm();
3961
+ }
3956
3962
  }
3957
- MainBranchChanged(event) {
3958
- this.emitBranchesChanged();
3963
+ CreateNewApplication() {
3964
+ this.SetEditingApplication(Guid.CreateRaw());
3959
3965
  }
3960
- OrganizationChanged(event) {
3961
- const org = this.OrganizationFormControl;
3962
- this.RepositoryFormControl.reset();
3963
- if (this.UseBranches) {
3964
- this.BranchesFormControl.reset();
3965
- this.SelectedBranches = [];
3966
+ DetermineTooltipText() {
3967
+ let permanentValue = this.PermanentFormControl.value;
3968
+ let preserveValue = this.PreserveMethodFormControl.value;
3969
+ if (permanentValue === true && preserveValue === false) {
3970
+ this.redirectTooltip = '301 – Permanent and Not Preserve';
3966
3971
  }
3967
- this.listRepositories();
3968
- }
3969
- RefreshOrganizations() {
3970
- // this.Loading = true;
3971
- this.listOrganizations();
3972
- this.OrganizationFormControl?.reset();
3973
- this.RepositoryFormControl?.reset();
3974
- if (this.UseBranches) {
3975
- this.BranchesFormControl?.reset();
3972
+ else if (permanentValue === false && preserveValue === false) {
3973
+ this.redirectTooltip = '302 – Not Permanent and Not Preserve';
3976
3974
  }
3977
- }
3978
- RemoveBranchOption(option) {
3979
- const index = this.SelectedBranches.indexOf(option);
3980
- if (index >= 0) {
3981
- this.SelectedBranches.splice(index, 1);
3975
+ else if (permanentValue === false && preserveValue === true) {
3976
+ this.redirectTooltip = '307 – Not Permanent and Preserve';
3977
+ }
3978
+ else if (permanentValue === true && preserveValue === true) {
3979
+ this.redirectTooltip = '308 – Permanent and Preserve';
3982
3980
  }
3983
- this.emitBranchesChanged();
3984
3981
  }
3985
- RepositoryChanged(event) {
3986
- const repo = this.RepositoryFormControl;
3987
- if (this.UseBranches) {
3988
- this.BranchesFormControl.reset();
3989
- this.SelectedBranches = [];
3990
- this.listBranches();
3982
+ SaveProcessorDetails() {
3983
+ const app = this.EditingApplication;
3984
+ app.LookupConfig.AllowedMethods = this.MethodsFormControl?.value
3985
+ ?.split(' ')
3986
+ .filter((v) => !!v);
3987
+ app.Processor.Type = this.ProcessorType;
3988
+ switch (app.Processor.Type) {
3989
+ case 'DFS':
3990
+ app.Processor.DefaultFile =
3991
+ this.DefaultFileFormControl.value || 'index.html';
3992
+ app.LowCodeUnit = {
3993
+ Type: this.LCUType,
3994
+ };
3995
+ switch (app.LowCodeUnit.Type) {
3996
+ case 'GitHub':
3997
+ app.LowCodeUnit.Organization =
3998
+ this.SourceControls[this.SourceControlFormControl.value]?.Organization;
3999
+ app.LowCodeUnit.Repository =
4000
+ this.SourceControls[this.SourceControlFormControl.value]?.Repository;
4001
+ app.LowCodeUnit.Build = this.BuildFormControl.value;
4002
+ app.LowCodeUnit.Path = this.BuildPathFormControl.value;
4003
+ app.LowCodeUnit.SourceControlLookup =
4004
+ this.SourceControlFormControl.value;
4005
+ break;
4006
+ case 'NPM':
4007
+ app.LowCodeUnit.Package = this.PackageFormControl.value;
4008
+ app.LowCodeUnit.Version = this.VersionFormControl.value;
4009
+ break;
4010
+ case 'WordPress':
4011
+ app.LowCodeUnit.APIRoot = this.APIRootFormControl.value;
4012
+ break;
4013
+ case 'Zip':
4014
+ app.LowCodeUnit.ZipFile = this.ZipFileFormControl.value;
4015
+ break;
4016
+ }
4017
+ break;
4018
+ case 'OAuth':
4019
+ app.Processor.Scopes = this.ScopesFormControl.value.split(' ');
4020
+ app.Processor.TokenLookup = this.TokenLookupFormControl.value;
4021
+ app.LowCodeUnit = {
4022
+ Type: this.LCUType,
4023
+ };
4024
+ switch (app.LowCodeUnit.Type) {
4025
+ case 'GitHubOAuth':
4026
+ app.LowCodeUnit.ClientID = this.ClientIDFormControl.value;
4027
+ app.LowCodeUnit.ClientSecret = this.ClientSecretFormControl.value;
4028
+ break;
4029
+ }
4030
+ break;
4031
+ case 'Proxy':
4032
+ app.Processor.InboundPath = this.InboundPathFormControl.value;
4033
+ app.LowCodeUnit = {
4034
+ Type: this.LCUType,
4035
+ };
4036
+ switch (app.LowCodeUnit.Type) {
4037
+ case 'API':
4038
+ app.LowCodeUnit.APIRoot = this.APIRootFormControl.value;
4039
+ app.LowCodeUnit.Security = this.SecurityFormControl.value;
4040
+ break;
4041
+ case 'SPA':
4042
+ app.LowCodeUnit.SPARoot = this.SPARootFormControl.value;
4043
+ break;
4044
+ }
4045
+ break;
4046
+ case 'Redirect':
4047
+ app.Processor.IncludeRequest = !!this.IncludeRequestFormControl.value;
4048
+ app.Processor.Permanent = !!this.PermanentFormControl.value;
4049
+ app.Processor.PreserveMethod = !!this.PreserveMethodFormControl.value;
4050
+ app.Processor.Redirect = this.RedirectFormControl.value;
4051
+ break;
3991
4052
  }
3992
- if (!this.UseBranches) {
3993
- this.listBuildPaths();
4053
+ if (!app.LookupConfig.PathRegex.startsWith('/')) {
4054
+ app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
3994
4055
  }
3995
- }
3996
- SaveRepository() {
3997
- this.Loading = true;
3998
- const org = this.OrganizationFormControl.value;
3999
- const repoName = this.RepositoryFormControl.value;
4000
- this.appsFlowSvc
4001
- .CreateRepository(org, repoName)
4002
- .subscribe((response) => {
4003
- if (response.Status.Code === 0) {
4004
- this.listRepositories(repoName);
4005
- this.CreatingRepository = false;
4006
- }
4007
- else {
4008
- // TODO: Need to surface an error to the user...
4009
- this.Loading = false;
4010
- }
4056
+ const saveAppReq = {
4057
+ ProjectLookup: this.ProjectLookup,
4058
+ Application: app,
4059
+ ApplicationLookup: this.EditingApplicationLookup || Guid.CreateRaw(),
4060
+ };
4061
+ this.eacSvc.SaveApplicationAsCode(saveAppReq).then((res) => {
4062
+ this.SaveFormEvent.emit(res);
4011
4063
  });
4012
4064
  }
4013
- SetEditingSourceControl(scLookup) {
4014
- this.EditingSourceControlLookup = scLookup;
4015
- }
4016
- SubmitSourceControl() {
4017
- console.log('source control submitted: ', this.DevOpsSourceControlFormGroup.value);
4018
- this.SaveSourceControl();
4065
+ SetEditingApplication(appLookup) {
4066
+ this.EditingApplication = new EaCApplicationAsCode();
4067
+ this.EditingApplicationLookup = appLookup;
4068
+ this.setupProcessorDetailsForm();
4019
4069
  }
4020
- SaveSourceControl() {
4021
- const saveEnvReq = {
4022
- Environment: {
4023
- ...this.Environment,
4024
- Sources: this.Environment.Sources || {},
4025
- },
4026
- EnvironmentLookup: this.EnvironmentLookup,
4027
- EnterpriseDataTokens: {},
4028
- };
4029
- let source = {
4030
- ...this.EditingSourceControl,
4031
- Branches: this.SelectedBranches,
4032
- MainBranch: this.MainBranchFormControl.value,
4033
- };
4034
- source = {
4035
- ...source,
4036
- Type: 'GitHub',
4037
- Name: `@${this.OrganizationFormControl.value}/${this.RepositoryFormControl.value}`,
4038
- DevOpsActionTriggerLookups: [this.DevOpsActionLookup],
4039
- Organization: this.OrganizationFormControl.value,
4040
- Repository: this.RepositoryFormControl.value,
4041
- };
4042
- const scLookup = `github://${source.Organization}/${source.Repository}`;
4043
- saveEnvReq.Environment.Sources[scLookup] = source;
4044
- console.log('save SC: ', saveEnvReq);
4045
- let resp = this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
4046
- resp.then((res) => {
4047
- this.SaveStatusEvent.emit(res);
4048
- });
4070
+ SourceControlChanged(event) {
4071
+ this.listBuildPaths();
4049
4072
  }
4050
- // Helpers
4051
- addBranchOption(value) {
4052
- value = (value || '').trim();
4053
- if (value && this.SelectedBranches.indexOf(value) < 0) {
4054
- this.SelectedBranches.push(value);
4055
- }
4056
- this.BranchesInput.nativeElement.blur();
4057
- this.emitBranchesChanged();
4073
+ ProcessorTypeChanged(event) {
4074
+ this.ProcessorType = event.value;
4075
+ this.setupProcessorTypeSubForm();
4058
4076
  }
4059
- configureDevOpsAction() {
4060
- setTimeout(() => {
4061
- this.DevOpsActionLookupFormControl.setValue(this.DevOpsActionLookup);
4062
- }, 0);
4077
+ LCUTypeChanged(event) {
4078
+ this.LCUType = event.value;
4079
+ this.setupLcuTypeSubForm();
4063
4080
  }
4064
- destroyFormControls() {
4065
- this.DevOpsSourceControlFormGroup.removeControl([this.SourceControlRoot, 'mainBranch'].join(''));
4066
- this.DevOpsSourceControlFormGroup?.removeControl([this.SourceControlRoot, 'branches'].join(''));
4067
- this.DevOpsSourceControlFormGroup?.removeControl([this.SourceControlRoot, 'buildPath'].join(''));
4068
- this.SelectedBranches = [];
4069
- this.DevOpsSourceControlFormGroup?.removeControl([this.SourceControlRoot, 'organization'].join(''));
4070
- this.DevOpsSourceControlFormGroup?.removeControl([this.SourceControlRoot, 'repository'].join(''));
4071
- }
4072
- emitBranchesChanged() {
4073
- if (this.SelectedBranches?.length > 0 &&
4074
- (!this.MainBranchFormControl.value ||
4075
- this.SelectedBranches.indexOf(this.MainBranchFormControl.value) < 0)) {
4076
- this.MainBranchFormControl.setValue(this.SelectedBranches.find((branch) => branch === 'main' || branch === 'master') || this.SelectedBranches[0]);
4077
- }
4078
- else if (this.SelectedBranches?.length <= 0) {
4079
- this.MainBranchFormControl.reset();
4080
- }
4081
- this.BranchesFormControl.setValue(this.SelectedBranches.join(','));
4082
- this.BranchesChanged(this.SelectedBranches || []);
4081
+ //HELPERS
4082
+ cleanupLcuTypeSubForm() {
4083
+ this.ProcessorDetailsFormGroup.removeControl('methods');
4084
+ this.ProcessorDetailsFormGroup.removeControl('apiRoot');
4085
+ this.ProcessorDetailsFormGroup.removeControl('security');
4086
+ this.ProcessorDetailsFormGroup.removeControl('spaRoot');
4087
+ this.ProcessorDetailsFormGroup.removeControl('applicationId');
4088
+ this.ProcessorDetailsFormGroup.removeControl('sourceControl');
4089
+ this.ProcessorDetailsFormGroup.removeControl('build');
4090
+ this.ProcessorDetailsFormGroup.removeControl('clientId');
4091
+ this.ProcessorDetailsFormGroup.removeControl('clientSecret');
4092
+ this.ProcessorDetailsFormGroup.removeControl('package');
4093
+ this.ProcessorDetailsFormGroup.removeControl('version');
4094
+ this.ProcessorDetailsFormGroup.removeControl('zipFile');
4083
4095
  }
4084
- listBranches() {
4085
- if (this.UseBranches) {
4086
- this.Loading = true;
4087
- this.appsFlowSvc
4088
- .ListBranches(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
4089
- .subscribe((response) => {
4090
- this.BranchOptions = response.Model;
4091
- this.Loading = false;
4092
- if (this.EditingSourceControl?.Branches?.length > 0) {
4093
- this.SelectedBranches = this.EditingSourceControl.Branches;
4094
- }
4095
- else if (this.BranchOptions?.length === 1) {
4096
- this.BranchesFormControl.setValue(this.BranchOptions[0].Name);
4097
- this.SelectedBranches = [this.BranchOptions[0].Name];
4098
- }
4099
- this.emitBranchesChanged();
4100
- this.listBuildPaths();
4101
- });
4102
- }
4096
+ cleanupProcessorTypeSubForm() {
4097
+ this.ProcessorDetailsFormGroup.removeControl('defaultFile');
4098
+ // this.ApplicationFormGroup.removeControl('dfsLcuType');
4099
+ // this.ApplicationFormGroup.removeControl('oauthLcuType');
4100
+ this.ProcessorDetailsFormGroup.removeControl('scopes');
4101
+ this.ProcessorDetailsFormGroup.removeControl('tokenLookup');
4102
+ this.ProcessorDetailsFormGroup.removeControl('inboundPath');
4103
+ this.ProcessorDetailsFormGroup.removeControl('proxyLcuType');
4104
+ this.ProcessorDetailsFormGroup.removeControl('includeRequest');
4105
+ this.ProcessorDetailsFormGroup.removeControl('redirect');
4106
+ this.ProcessorDetailsFormGroup.removeControl('permanent');
4107
+ this.ProcessorDetailsFormGroup.removeControl('preserveMethod');
4108
+ this.cleanupLcuTypeSubForm();
4103
4109
  }
4104
4110
  listBuildPaths() {
4105
- if (this.UseBuildPath) {
4106
- this.Loading = true;
4107
- this.appsFlowSvc
4108
- .ListBuildPaths(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
4109
- .subscribe((response) => {
4110
- this.BuildPathOptions = response.Model;
4111
- this.Loading = false;
4112
- if (this.BuildPathOptions?.length === 1) {
4113
- this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
4114
- }
4115
- });
4116
- }
4117
- }
4118
- listOrganizations() {
4119
- this.Loading = true;
4111
+ this.State.Loading = true;
4112
+ console.log("Source Control: ", this.SourceControls[this.SourceControlFormControl.value]);
4120
4113
  this.appsFlowSvc
4121
- .ListOrganizations()
4114
+ .ListBuildPaths(this.SourceControls[this.SourceControlFormControl.value]?.Organization, this.SourceControls[this.SourceControlFormControl.value]?.Repository)
4122
4115
  .subscribe((response) => {
4123
- this.OrganizationOptions = response.Model;
4124
- console.log("Organization Options: ", this.OrganizationOptions);
4125
- this.Loading = false;
4126
- if (this.EditingSourceControl?.Organization) {
4127
- setTimeout(() => {
4128
- this.OrganizationFormControl.setValue(this.EditingSourceControl.Organization);
4129
- this.listRepositories(this.EditingSourceControl?.Repository);
4130
- }, 0);
4131
- }
4116
+ this.BuildPathOptions = response.Model;
4117
+ console.log("build path options: ", this.BuildPathOptions);
4118
+ this.State.Loading = false;
4119
+ // if (this.BuildPathOptions?.length === 1) {
4120
+ // this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
4121
+ // }
4132
4122
  });
4133
4123
  }
4134
- listRepositories(activeRepo = null) {
4135
- this.Loading = true;
4136
- this.appsFlowSvc
4137
- .ListRepositories(this.OrganizationFormControl.value)
4138
- .subscribe((response) => {
4139
- this.RepositoryOptions = response.Model;
4140
- this.Loading = false;
4141
- if (activeRepo) {
4142
- setTimeout(() => {
4143
- this.RepositoryFormControl.setValue(activeRepo);
4144
- this.listBranches();
4145
- if (!this.UseBranches) {
4146
- this.listBuildPaths();
4147
- }
4148
- }, 0);
4149
- }
4150
- else if (this.RepositoryOptions?.length <= 0) {
4151
- this.CreatingRepository = true;
4124
+ setupLcuTypeSubForm() {
4125
+ this.cleanupLcuTypeSubForm();
4126
+ if (this.LCUType) {
4127
+ switch (this.LCUType) {
4128
+ case 'API':
4129
+ this.setupLCUAPIForm();
4130
+ break;
4131
+ case 'ApplicationPointer':
4132
+ this.setupLCUApplicationPointerForm();
4133
+ break;
4134
+ case 'GitHub':
4135
+ this.setupLCUGitHubForm();
4136
+ break;
4137
+ case 'GitHubOAuth':
4138
+ this.setupLCUGitHubOAuthForm();
4139
+ break;
4140
+ case 'WordPress':
4141
+ this.setupLCUWordPressForm();
4142
+ break;
4143
+ // case 'NPM':
4144
+ // this.setupLCUNPMForm();
4145
+ // break;
4146
+ case 'SPA':
4147
+ this.setupLCUSPAForm();
4148
+ break;
4149
+ case 'Zip':
4150
+ this.setupLCUZipForm();
4151
+ break;
4152
4152
  }
4153
- });
4154
- }
4155
- loadProjectHostingDetails() {
4156
- if (this.SelectedBranches?.length > 0) {
4157
- this.HostingDetails.Loading = true;
4158
- this.appsFlowSvc
4159
- .LoadProjectHostingDetails()
4160
- .subscribe((response) => {
4161
- this.HostingDetails = response.Model;
4162
- this.HostingDetails.Loading = false;
4163
- this.configureDevOpsAction();
4164
- }, (err) => {
4165
- this.HostingDetails.Loading = false;
4166
- });
4167
4153
  }
4168
4154
  }
4169
- setupFormControls() {
4170
- this.destroyFormControls();
4171
- console.log("Source Control: ", this.EditingSourceControl);
4172
- this.DevOpsSourceControlFormGroup.addControl('devOpsActionLookup', new FormControl(this.DevOpsActionLookup || '', []));
4173
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'organization'].join(''), new FormControl(this.EditingSourceControl.Organization ?? '', Validators.required));
4174
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'repository'].join(''), new FormControl(this.EditingSourceControl.Repository ?? '', Validators.required));
4175
- if (this.UseBranches) {
4176
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'branches'].join(''), new FormControl(this.EditingSourceControl?.Branches ?? '', Validators.required));
4177
- this.SelectedBranches = this.EditingSourceControl?.Branches;
4178
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'mainBranch'].join(''), new FormControl(this.EditingSourceControl.MainBranch ?? '', Validators.required));
4179
- }
4180
- if (this.UseBuildPath) {
4181
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'buildPath'].join(''), new FormControl(this.BuildPath ?? '', Validators.required));
4155
+ setupProcessorDetailsForm() {
4156
+ this.ProcessorType = this.EditingApplication?.Processor?.Type || '';
4157
+ // console.log('EDITING APP = ', this.EditingApplication);
4158
+ if (this.EditingApplication != null) {
4159
+ this.ProcessorDetailsFormGroup = this.formBldr.group({
4160
+ procType: [this.ProcessorType, [Validators.required]],
4161
+ });
4162
+ // this.setupDfsForm();
4163
+ // this.setupLcuTypeSubForm();
4164
+ this.setupProcessorTypeSubForm();
4182
4165
  }
4183
4166
  }
4184
- }
4185
- 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 });
4186
- 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"] }] });
4187
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DevopsSourceControlFormComponent, decorators: [{
4188
- type: Component,
4189
- 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"] }]
4190
- }], ctorParameters: function () { return [{ type: ApplicationsFlowService }, { type: EaCService }, { type: i1$2.FormBuilder }]; }, propDecorators: { EditingSourceControlLookup: [{
4191
- type: Input,
4192
- args: ['editing-source-control-lookup']
4193
- }], Environment: [{
4194
- type: Input,
4195
- args: ['environment']
4196
- }], EnvironmentLookup: [{
4197
- type: Input,
4198
- args: ['environment-lookup']
4199
- }], SaveStatusEvent: [{
4200
- type: Output,
4201
- args: ['save-status-event']
4202
- }], BranchesInput: [{
4203
- type: ViewChild,
4204
- args: ['branches']
4205
- }] } });
4206
-
4207
- class SourceControlDialogComponent {
4208
- constructor(dialogRef, eacSvc, data, snackBar) {
4209
- this.dialogRef = dialogRef;
4210
- this.eacSvc = eacSvc;
4211
- this.data = data;
4212
- this.snackBar = snackBar;
4167
+ setupLCUGitHubForm() {
4168
+ console.log('EditingApplication: ', this.EditingApplication);
4169
+ this.ProcessorDetailsFormGroup.addControl('sourceControl', this.formBldr.control(this.EditingApplication.LowCodeUnit?.SourceControlLookup || '', [Validators.required]));
4170
+ this.ProcessorDetailsFormGroup.addControl('buildPath', this.formBldr.control(this.EditingApplication.LowCodeUnit?.Path || '', [
4171
+ Validators.required,
4172
+ ]));
4173
+ this.ProcessorDetailsFormGroup.addControl('build', this.formBldr.control(this.EditingApplication.LowCodeUnit?.Build || 'latest', [Validators.required]));
4174
+ this.listBuildPaths();
4213
4175
  }
4214
- get DevOpsSourceControlFormGroup() {
4215
- return this.DevopsSourceControl?.DevOpsSourceControlFormGroup;
4176
+ setupLCUApplicationPointerForm() {
4177
+ this.ProcessorDetailsFormGroup.addControl('applicationId', this.formBldr.control(this.EditingApplication.LowCodeUnit?.ApplicationID || '', [Validators.required]));
4216
4178
  }
4217
- get HasConnection() {
4218
- return this.State.GitHub.HasConnection;
4179
+ setupLCUSPAForm() {
4180
+ this.ProcessorDetailsFormGroup.addControl('spaRoot', this.formBldr.control(this.EditingApplication.LowCodeUnit?.SPARoot || '', [Validators.required]));
4219
4181
  }
4220
- get State() {
4221
- return this.eacSvc.State;
4182
+ setupLCUAPIForm() {
4183
+ this.ProcessorDetailsFormGroup.addControl('methods', this.formBldr.control(this.EditingApplication.LookupConfig?.AllowedMethods?.join(' ') || '', []));
4184
+ this.ProcessorDetailsFormGroup.addControl('apiRoot', this.formBldr.control(this.EditingApplication.LowCodeUnit?.APIRoot || '', [Validators.required]));
4185
+ this.ProcessorDetailsFormGroup.addControl('security', this.formBldr.control(this.EditingApplication.LowCodeUnit?.Security || '', [Validators.required]));
4222
4186
  }
4223
- ngOnInit() {
4187
+ setupLCUGitHubOAuthForm() {
4188
+ this.ProcessorDetailsFormGroup.addControl('clientId', this.formBldr.control(this.EditingApplication.LowCodeUnit?.ClientID || '', [Validators.required]));
4189
+ this.ProcessorDetailsFormGroup.addControl('clientSecret', this.formBldr.control(this.EditingApplication.LowCodeUnit?.ClientSecret || '', [Validators.required]));
4224
4190
  }
4225
- CloseDialog() {
4226
- this.dialogRef.close();
4191
+ setupLCUWordPressForm() {
4192
+ this.ProcessorDetailsFormGroup.addControl('apiRoot', this.formBldr.control(this.EditingApplication.LowCodeUnit?.APIRoot || '', [Validators.required]));
4227
4193
  }
4228
- HandleSaveStatusEvent(event) {
4229
- console.log("event to save: ", event);
4230
- if (event.Code === 0) {
4231
- this.snackBar.open("Source Control Succesfully Saved", "Dismiss", {
4232
- duration: 5000
4233
- });
4234
- this.CloseDialog();
4235
- }
4236
- else {
4237
- this.ErrorMessage = event.Message;
4238
- }
4194
+ setupProxyForm() {
4195
+ this.LCUType = this.EditingApplication.LowCodeUnit?.Type || '';
4196
+ this.ProcessorDetailsFormGroup.addControl('inboundPath', this.formBldr.control(this.EditingApplication.Processor?.InboundPath || '', [Validators.required]));
4197
+ this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
4239
4198
  }
4240
- SaveSourceControl() {
4241
- this.DevopsSourceControl.SaveSourceControl();
4199
+ setupRedirectForm() {
4200
+ this.ProcessorDetailsFormGroup.addControl('redirect', this.formBldr.control(this.EditingApplication.Processor?.Redirect || '', [
4201
+ Validators.required,
4202
+ ]));
4203
+ this.ProcessorDetailsFormGroup.addControl('permanent', this.formBldr.control(this.EditingApplication.Processor?.Permanent || false, []));
4204
+ this.ProcessorDetailsFormGroup.addControl('preserveMethod', this.formBldr.control(this.EditingApplication.Processor?.PreserveMethod || false, []));
4205
+ this.ProcessorDetailsFormGroup.addControl('includeRequest', this.formBldr.control(this.EditingApplication.Processor?.IncludeRequest || false, []));
4206
+ this.DetermineTooltipText();
4207
+ }
4208
+ setupOAuthForm() {
4209
+ this.LCUType = this.EditingApplication.LowCodeUnit?.Type || '';
4210
+ this.ProcessorDetailsFormGroup.addControl('scopes', this.formBldr.control(this.EditingApplication.Processor?.Scopes?.Join(' ') || '', [Validators.required]));
4211
+ this.ProcessorDetailsFormGroup.addControl('tokenLookup', this.formBldr.control(this.EditingApplication.Processor?.TokenLookup || '', [Validators.required]));
4212
+ this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
4213
+ }
4214
+ setupLCUZipForm() {
4215
+ this.ProcessorDetailsFormGroup.addControl('zipFile', this.formBldr.control(this.EditingApplication.LowCodeUnit?.ZipFile || '', [Validators.required]));
4216
+ }
4217
+ setupDfsForm() {
4218
+ this.LCUType = this.EditingApplication.LowCodeUnit?.Type || '';
4219
+ this.ProcessorDetailsFormGroup.addControl('defaultFile', this.formBldr.control(this.EditingApplication.Processor?.DefaultFile || 'index.html', [Validators.required]));
4220
+ this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
4221
+ }
4222
+ setupProcessorTypeSubForm() {
4223
+ this.cleanupProcessorTypeSubForm();
4224
+ if (this.ProcessorType) {
4225
+ switch (this.ProcessorType) {
4226
+ case 'DFS':
4227
+ this.setupDfsForm();
4228
+ break;
4229
+ case 'OAuth':
4230
+ this.setupOAuthForm();
4231
+ break;
4232
+ case 'Proxy':
4233
+ this.setupProxyForm();
4234
+ break;
4235
+ case 'Redirect':
4236
+ this.setupRedirectForm();
4237
+ break;
4238
+ }
4239
+ }
4240
+ this.setupLcuTypeSubForm();
4242
4241
  }
4243
4242
  }
4244
- 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 });
4245
- 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"] }] });
4246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, decorators: [{
4243
+ 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 });
4244
+ 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"] }] });
4245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ProcessorDetailsFormComponent, decorators: [{
4247
4246
  type: Component,
4248
- 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"] }]
4249
- }], ctorParameters: function () { return [{ type: i2$2.MatDialogRef }, { type: EaCService }, { type: undefined, decorators: [{
4250
- type: Inject,
4251
- args: [MAT_DIALOG_DATA]
4252
- }] }, { type: i3$1.MatSnackBar }]; }, propDecorators: { DevopsSourceControl: [{
4253
- type: ViewChild,
4254
- args: [DevopsSourceControlFormComponent]
4247
+ 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"] }]
4248
+ }], ctorParameters: function () { return [{ type: ApplicationsFlowService }, { type: i1$2.FormBuilder }, { type: EaCService }]; }, propDecorators: { EditingApplication: [{
4249
+ type: Input,
4250
+ args: ['editing-application']
4251
+ }], EditingApplicationLookup: [{
4252
+ type: Input,
4253
+ args: ['editing-application-lookup']
4254
+ }], HasSaveButton: [{
4255
+ type: Input,
4256
+ args: ['has-save-button']
4257
+ }], SourceControlLookups: [{
4258
+ type: Input,
4259
+ args: ['source-control-lookups']
4260
+ }], ProjectLookup: [{
4261
+ type: Input,
4262
+ args: ['project-lookup']
4263
+ }], SaveFormEvent: [{
4264
+ type: Output,
4265
+ args: ['save-form-event']
4255
4266
  }] } });
4256
4267
 
4257
- class MainFeedCardComponent {
4258
- constructor(eacSvc, dialog, sanitizer) {
4268
+ class NewApplicationDialogComponent {
4269
+ constructor(eacSvc, dialogRef, data, snackBar) {
4259
4270
  this.eacSvc = eacSvc;
4260
- this.dialog = dialog;
4261
- this.sanitizer = sanitizer;
4262
- }
4263
- get ActiveEnvironment() {
4264
- return this.State?.EaC?.Environments[this.ActiveEnvironmentLookup];
4265
- }
4266
- get ActiveEnvironmentLookup() {
4267
- // TODO: Eventually support multiple environments
4268
- const envLookups = Object.keys(this.State?.EaC?.Environments || {});
4269
- return envLookups[0];
4271
+ this.dialogRef = dialogRef;
4272
+ this.data = data;
4273
+ this.snackBar = snackBar;
4274
+ this.HasSaveButton = false;
4270
4275
  }
4271
4276
  get Environment() {
4272
- // console.log("Ent Environment var: ", this.State?.EaC?.Environments[this.State?.EaC?.Enterprise?.PrimaryEnvironment]);
4273
- return this.State?.EaC?.Environments[this.State?.EaC?.Enterprise?.PrimaryEnvironment];
4277
+ return this.State?.EaC?.Environments[this.data.environmentLookup];
4274
4278
  }
4275
- get Icon() {
4276
- if (this.FeedItem.Status.Code === 0) {
4277
- return 'check_circle';
4278
- }
4279
- else if (this.FeedItem.Status.Code === 1) {
4280
- return 'cancel';
4281
- }
4282
- else if (this.FeedItem.Status.Code === 2) {
4283
- return 'sync';
4284
- }
4285
- else {
4286
- return 'help_outline';
4287
- }
4279
+ get SourceControls() {
4280
+ return this.Environment?.Sources || {};
4288
4281
  }
4289
- get IconColor() {
4290
- if (this.FeedItem.Status.Code === 0) {
4291
- return 'green';
4292
- }
4293
- else if (this.FeedItem.Status.Code === 1) {
4294
- return 'red';
4295
- }
4296
- else if (this.FeedItem.Status.Code === 2) {
4297
- return 'blue';
4298
- }
4299
- else {
4300
- return 'gray';
4301
- }
4282
+ get SourceControlLookups() {
4283
+ return Object.keys(this.Environment.Sources || {});
4302
4284
  }
4303
4285
  get State() {
4304
4286
  return this.eacSvc.State;
4305
4287
  }
4306
- // Life Cycle
4307
4288
  ngOnInit() {
4308
- this.handleRefresh();
4289
+ this.SetupApplication(Guid.CreateRaw());
4309
4290
  }
4310
- // API Methods
4311
- CalculateTimelapse(timestamp) {
4312
- return moment(timestamp).fromNow();
4291
+ CloseDialog() {
4292
+ this.dialogRef.close();
4313
4293
  }
4314
- HandleAction(action) {
4315
- if (action.ActionType == 'Link') {
4316
- if (action.Action.startsWith('http')) {
4317
- window.open(action.Action, '_blank');
4318
- }
4319
- else {
4320
- window.location.href = action.Action;
4321
- }
4294
+ SetupApplication(appLookup) {
4295
+ this.NewApplication = new EaCApplicationAsCode;
4296
+ this.NewApplicationLookup = appLookup;
4297
+ }
4298
+ SaveApplication() {
4299
+ const app = {
4300
+ Application: {
4301
+ Name: this.ApplicationFormControls.NameFormControl.value,
4302
+ Description: this.ApplicationFormControls.DescriptionFormControl.value,
4303
+ PriorityShift: 0,
4304
+ },
4305
+ AccessRightLookups: [],
4306
+ DataTokens: {},
4307
+ LicenseConfigurationLookups: [],
4308
+ LookupConfig: {
4309
+ IsPrivate: false,
4310
+ IsTriggerSignIn: false,
4311
+ PathRegex: `${this.ApplicationFormControls.RouteFormControl.value}.*`,
4312
+ QueryRegex: '',
4313
+ HeaderRegex: '',
4314
+ AllowedMethods: this.ProcessorDetailsFormControls.MethodsFormControl?.value
4315
+ ?.split(' ')
4316
+ .filter((v) => !!v),
4317
+ },
4318
+ Processor: {
4319
+ Type: this.ProcessorDetailsFormControls.ProcessorType,
4320
+ },
4321
+ };
4322
+ switch (app.Processor.Type) {
4323
+ case 'DFS':
4324
+ app.Processor.BaseHref = `${this.ApplicationFormControls.RouteFormControl.value}/`.replace('//', '/');
4325
+ app.Processor.DefaultFile =
4326
+ this.ProcessorDetailsFormControls.DefaultFileFormControl.value || 'index.html';
4327
+ app.LowCodeUnit = {
4328
+ Type: this.ProcessorDetailsFormControls.LCUType,
4329
+ };
4330
+ switch (app.LowCodeUnit.Type) {
4331
+ case 'GitHub':
4332
+ app.LowCodeUnit.Organization =
4333
+ this.SourceControls[this.ProcessorDetailsFormControls.SourceControlFormControl.value].Organization;
4334
+ app.LowCodeUnit.Repository =
4335
+ this.SourceControls[this.ProcessorDetailsFormControls.SourceControlFormControl.value].Repository;
4336
+ app.LowCodeUnit.Build = this.ProcessorDetailsFormControls.BuildFormControl.value;
4337
+ app.LowCodeUnit.Path =
4338
+ this.ProcessorDetailsFormControls.BuildPathFormControl.value;
4339
+ break;
4340
+ case 'NPM':
4341
+ app.LowCodeUnit.Package = this.ProcessorDetailsFormControls.PackageFormControl.value;
4342
+ app.LowCodeUnit.Version = this.ProcessorDetailsFormControls.VersionFormControl.value;
4343
+ break;
4344
+ case 'Zip':
4345
+ app.LowCodeUnit.ZipFile = this.ProcessorDetailsFormControls.ZipFileFormControl.value;
4346
+ break;
4347
+ }
4348
+ break;
4349
+ case 'OAuth':
4350
+ app.Processor.Scopes = this.ProcessorDetailsFormControls.ScopesFormControl.value.split(' ');
4351
+ app.Processor.TokenLookup = this.ProcessorDetailsFormControls.TokenLookupFormControl.value;
4352
+ app.LowCodeUnit = {
4353
+ Type: this.ProcessorDetailsFormControls.LCUType,
4354
+ };
4355
+ switch (app.LowCodeUnit.Type) {
4356
+ case 'GitHubOAuth':
4357
+ app.LowCodeUnit.ClientID = this.ProcessorDetailsFormControls.ClientIDFormControl.value;
4358
+ app.LowCodeUnit.ClientSecret = this.ProcessorDetailsFormControls.ClientSecretFormControl.value;
4359
+ break;
4360
+ }
4361
+ break;
4362
+ case 'Proxy':
4363
+ app.Processor.InboundPath = this.ProcessorDetailsFormControls.InboundPathFormControl.value;
4364
+ app.LowCodeUnit = {
4365
+ Type: this.ProcessorDetailsFormControls.LCUType,
4366
+ };
4367
+ switch (app.LowCodeUnit.Type) {
4368
+ case 'API':
4369
+ app.LowCodeUnit.APIRoot = this.ProcessorDetailsFormControls.APIRootFormControl.value;
4370
+ app.LowCodeUnit.Security = this.ProcessorDetailsFormControls.SecurityFormControl.value;
4371
+ break;
4372
+ case 'SPA':
4373
+ app.LowCodeUnit.SPARoot = this.ProcessorDetailsFormControls.SPARootFormControl.value;
4374
+ break;
4375
+ }
4376
+ break;
4377
+ case 'Redirect':
4378
+ app.Processor.Permanent = !!this.ProcessorDetailsFormControls.PermanentFormControl.value;
4379
+ app.Processor.PreserveMethod = !!this.ProcessorDetailsFormControls.PreserveMethodFormControl.value;
4380
+ app.Processor.Redirect = this.ProcessorDetailsFormControls.RedirectFormControl.value;
4381
+ break;
4322
4382
  }
4323
- else if (action.ActionType == 'Modal') {
4324
- if (action.Action == 'AddSourceControl') {
4325
- this.OpenSourceControlDialog(null);
4326
- }
4327
- else {
4328
- alert('other modaled ' + action.Action);
4383
+ if (!app.LookupConfig.PathRegex.startsWith('/')) {
4384
+ app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
4385
+ }
4386
+ const saveAppReq = {
4387
+ ProjectLookup: this.data.projectLookup,
4388
+ Application: app,
4389
+ ApplicationLookup: this.NewApplicationLookup,
4390
+ };
4391
+ // this.HasBuildFormControl.value && taken out from below if statement
4392
+ if (this.ProcessorDetailsFormControls.ProcessorType !== 'redirect' && this.ProcessorDetailsFormControls.LCUType === 'GitHub') {
4393
+ if (app) {
4394
+ app.LowCodeUnit.SourceControlLookup = this.ProcessorDetailsFormControls.SourceControlFormControl.value;
4329
4395
  }
4330
4396
  }
4397
+ else if (app) {
4398
+ app.LowCodeUnit.SourceControlLookup = null;
4399
+ }
4400
+ // console.log("Save new App request: ", saveAppReq);
4401
+ this.eacSvc.SaveApplicationAsCode(saveAppReq).then(res => {
4402
+ this.handleSaveStatus(res);
4403
+ });
4331
4404
  }
4332
- OpenSourceControlDialog(scLookup) {
4333
- const dialogRef = this.dialog.open(SourceControlDialogComponent, {
4334
- width: '550px',
4335
- data: {
4336
- environment: this.Environment,
4337
- environmentLookup: this.ActiveEnvironmentLookup,
4338
- scLookup: scLookup,
4339
- },
4340
- });
4341
- dialogRef.afterClosed().subscribe((result) => {
4342
- // console.log('The dialog was closed');
4343
- // console.log("result:", result)
4344
- });
4345
- }
4346
- SafeHtml(html) {
4347
- return this.sanitizer.bypassSecurityTrustHtml(html);
4348
- }
4349
- // Helpers
4350
- handleRefresh() {
4351
- if (this.FeedItem?.RefreshLink) {
4352
- setTimeout(() => {
4353
- this.eacSvc.CheckUserFeedItem(this.FeedItem).subscribe(async (response) => {
4354
- if (response.Status.Code === 0) {
4355
- this.FeedItem = response.Model;
4356
- this.handleRefresh();
4357
- }
4358
- else {
4359
- console.log(response);
4360
- }
4361
- }, (err) => {
4362
- console.log(err);
4363
- });
4364
- }, 5000);
4405
+ handleSaveStatus(status) {
4406
+ console.log("event to save: ", status);
4407
+ if (status.Code === 0) {
4408
+ this.snackBar.open("Application Succesfully Created", "Dismiss", {
4409
+ duration: 5000
4410
+ });
4411
+ this.CloseDialog();
4412
+ }
4413
+ else {
4414
+ this.ErrorMessage = status.Message;
4365
4415
  }
4366
4416
  }
4367
4417
  }
4368
- 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 });
4369
- 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"] }] });
4370
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MainFeedCardComponent, decorators: [{
4418
+ 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 });
4419
+ 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"] }] });
4420
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: NewApplicationDialogComponent, decorators: [{
4371
4421
  type: Component,
4372
- 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"] }]
4373
- }], ctorParameters: function () { return [{ type: EaCService }, { type: i2$2.MatDialog }, { type: i3$2.DomSanitizer }]; }, propDecorators: { FeedItem: [{
4374
- type: Input,
4375
- args: ['feed-item']
4422
+ 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: [""] }]
4423
+ }], ctorParameters: function () { return [{ type: EaCService }, { type: i2$2.MatDialogRef }, { type: undefined, decorators: [{
4424
+ type: Inject,
4425
+ args: [MAT_DIALOG_DATA]
4426
+ }] }, { type: i3$1.MatSnackBar }]; }, propDecorators: { ApplicationFormControls: [{
4427
+ type: ViewChild,
4428
+ args: [EditApplicationFormComponent]
4429
+ }], ProcessorDetailsFormControls: [{
4430
+ type: ViewChild,
4431
+ args: [ProcessorDetailsFormComponent]
4376
4432
  }] } });
4377
4433
 
4378
- class TwoColumnHeaderComponent {
4379
- constructor() { }
4380
- ngOnInit() {
4434
+ class GhControlComponent {
4435
+ constructor(eacSvc, dialog) {
4436
+ this.eacSvc = eacSvc;
4437
+ this.dialog = dialog;
4438
+ this.InputLabel = "Create Pull Request";
4439
+ this.SkeletonEffect = "wave";
4440
+ this.selectedBtn = "pr-btn";
4381
4441
  }
4382
- }
4383
- TwoColumnHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4384
- 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"] }] });
4385
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, decorators: [{
4386
- type: Component,
4387
- 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"] }]
4388
- }], ctorParameters: function () { return []; } });
4389
-
4390
- class CardCarouselComponent {
4391
- constructor() {
4392
- this.carouselIndex = 0;
4442
+ get ActiveEnvironmentLookup() {
4443
+ // TODO: Eventually support multiple environments
4444
+ const envLookups = Object.keys(this.State?.EaC?.Environments || {});
4445
+ return envLookups[0];
4446
+ }
4447
+ get State() {
4448
+ return this.eacSvc.State;
4393
4449
  }
4394
4450
  ngOnInit() {
4395
4451
  }
4396
4452
  ngAfterViewInit() {
4397
- this.assignCarouselClass();
4453
+ this.addSelectBtn();
4398
4454
  }
4399
- LeftChevronClicked() {
4400
- this.removeCarouselClasses();
4401
- if (this.carouselIndex === 0) {
4402
- this.carouselIndex = this.Stats.length - 1;
4403
- }
4404
- else {
4405
- this.carouselIndex--;
4406
- }
4407
- this.assignCarouselClass();
4455
+ CreateFeatureBranch() {
4456
+ this.removeSelectedBtn();
4457
+ this.InputLabel = "Create Feature Branch";
4458
+ this.selectedBtn = "fb-btn";
4459
+ this.addSelectBtn();
4460
+ console.log("create feature branch selected");
4408
4461
  }
4409
- MoreDetailsClicked() {
4410
- console.log("More details clicked on carousel item", this.Stats[this.carouselIndex]);
4462
+ OpenIssue() {
4463
+ this.removeSelectedBtn();
4464
+ this.InputLabel = "Open Issue";
4465
+ this.selectedBtn = "oi-btn";
4466
+ this.addSelectBtn();
4467
+ console.log("open issue selected");
4411
4468
  }
4412
- RightChevronClicked() {
4413
- this.removeCarouselClasses();
4414
- if (this.carouselIndex === this.Stats.length - 1) {
4415
- this.carouselIndex = 0;
4416
- }
4417
- else {
4418
- this.carouselIndex++;
4469
+ CreatePullRequest() {
4470
+ this.removeSelectedBtn();
4471
+ this.InputLabel = "Create Pull Request";
4472
+ this.selectedBtn = "pr-btn";
4473
+ this.addSelectBtn();
4474
+ console.log("create pull request selected");
4475
+ }
4476
+ CreateNewApp() {
4477
+ const dialogRef = this.dialog.open(NewApplicationDialogComponent, {
4478
+ width: '600px',
4479
+ data: {
4480
+ environmentLookup: this.ActiveEnvironmentLookup,
4481
+ },
4482
+ });
4483
+ dialogRef.afterClosed().subscribe((result) => {
4484
+ // console.log('The dialog was closed');
4485
+ // console.log("result:", result)
4486
+ });
4487
+ }
4488
+ RouteToPath(path) {
4489
+ window.location.href = path;
4490
+ }
4491
+ Submit() {
4492
+ console.log("submitting: ", this.value);
4493
+ switch (this.selectedBtn) {
4494
+ case "pr-btn":
4495
+ //Pull request
4496
+ console.log("creating pull request: ", this.value);
4497
+ break;
4498
+ case "oi-btn":
4499
+ //Open Issue
4500
+ console.log("Open issue: ", this.value);
4501
+ break;
4502
+ case "fb-btn":
4503
+ //Feature Branch
4504
+ console.log("creating feature branch: ", this.value);
4505
+ break;
4506
+ default:
4507
+ console.log("hmm");
4508
+ break;
4419
4509
  }
4420
- this.assignCarouselClass();
4421
4510
  }
4422
4511
  //HELPERS
4423
- removeCarouselClasses() {
4424
- for (let i = 0; i < this.Stats.length; i++) {
4425
- if (i === this.carouselIndex) {
4426
- document.getElementById("carousel-" + this.carouselIndex).classList.remove('active');
4427
- }
4428
- else {
4429
- document.getElementById("carousel-" + i).classList.remove('hidden');
4430
- }
4431
- }
4512
+ addSelectBtn() {
4513
+ document.getElementById(this.selectedBtn).classList.add('selected');
4432
4514
  }
4433
- assignCarouselClass() {
4434
- for (let i = 0; i < this.Stats.length; i++) {
4435
- if (i === this.carouselIndex) {
4436
- document.getElementById("carousel-" + this.carouselIndex).classList.add('active');
4437
- }
4438
- else {
4439
- document.getElementById("carousel-" + i).classList.add('hidden');
4440
- }
4441
- }
4515
+ removeSelectedBtn() {
4516
+ document.getElementById(this.selectedBtn).classList.remove('selected');
4442
4517
  }
4443
4518
  }
4444
- CardCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4445
- 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"] }] });
4446
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, decorators: [{
4519
+ 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 });
4520
+ 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 \n\n <ng-container *ngIf=\"!State?.Loading\">\n\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\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 [matMenuTriggerFor]=\"menu\" aria-label=\"menu\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button \n class=\"gh-menu-action\" \n mat-menu-item\n (click)=\"CreateNewApp()\" \n >\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 \n </mat-menu>\n </mat-card-actions>\n </ng-container>\n\n <!-- SKELETON -->\n <ng-container *ngIf=\"State?.Loading\">\n <div \n id=\"gh-card-skeleton\" \n fxLayout=\"row\" \n fxLayoutAlign=\"center center\"\n >\n\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 height=\"60px\" [effect]=\"SkeletonEffect\"></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\n\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\n </ng-container>\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}.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"] }] });
4521
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: GhControlComponent, decorators: [{
4447
4522
  type: Component,
4448
- 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"] }]
4449
- }], ctorParameters: function () { return []; }, propDecorators: { Stats: [{
4450
- type: Input,
4451
- args: ['stats']
4452
- }] } });
4523
+ args: [{ selector: 'lcu-gh-control', template: "<mat-card class=\"social-card\">\n \n\n <ng-container *ngIf=\"!State?.Loading\">\n\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\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 [matMenuTriggerFor]=\"menu\" aria-label=\"menu\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button \n class=\"gh-menu-action\" \n mat-menu-item\n (click)=\"CreateNewApp()\" \n >\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 \n </mat-menu>\n </mat-card-actions>\n </ng-container>\n\n <!-- SKELETON -->\n <ng-container *ngIf=\"State?.Loading\">\n <div \n id=\"gh-card-skeleton\" \n fxLayout=\"row\" \n fxLayoutAlign=\"center center\"\n >\n\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 height=\"60px\" [effect]=\"SkeletonEffect\"></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\n\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\n </ng-container>\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}.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"] }]
4524
+ }], ctorParameters: function () { return [{ type: EaCService }, { type: i2$2.MatDialog }]; } });
4453
4525
 
4454
- class SecurityToggleComponent {
4455
- constructor(eacSvc, formBldr) {
4526
+ class DevopsSourceControlFormComponent {
4527
+ // Constructors
4528
+ constructor(appsFlowSvc, eacSvc, formBuilder) {
4529
+ this.appsFlowSvc = appsFlowSvc;
4456
4530
  this.eacSvc = eacSvc;
4457
- this.formBldr = formBldr;
4458
- this.SaveFormEvent = new EventEmitter;
4459
- this.SkeletonEffect = 'wave';
4531
+ this.formBuilder = formBuilder;
4532
+ this.SeparatorKeysCodes = [ENTER, COMMA];
4533
+ this.SaveStatusEvent = new EventEmitter();
4534
+ this.BuildPath = null;
4535
+ this.HostingDetails = new ProjectHostingDetails();
4536
+ this.SelectedBranches = [];
4537
+ this.SourceControlRoot = '';
4538
+ this.SkeletonEffect = "wave";
4539
+ this.UseBranches = true;
4540
+ this.UseBuildPath = false;
4460
4541
  }
4461
- get IsPrivateFormControl() {
4462
- return this.SecurityFormGroup?.controls.isPrivate;
4542
+ // Properties
4543
+ get ArtifactLookups() {
4544
+ return this.DevOpsAction?.ArtifactLookups;
4463
4545
  }
4464
- get IsTriggerSignInFormControl() {
4465
- return this.SecurityFormGroup?.controls.isTriggerSignIn;
4546
+ get ArtifactLookup() {
4547
+ const artLookup = this.DevOpsAction?.ArtifactLookups
4548
+ ? this.DevOpsAction?.ArtifactLookups[0]
4549
+ : null;
4550
+ return artLookup;
4466
4551
  }
4467
- get State() {
4468
- return this.eacSvc.State;
4552
+ get Artifact() {
4553
+ return this.Environment?.Artifacts && this.ArtifactLookup
4554
+ ? this.Environment?.Artifacts[this.ArtifactLookup] || {}
4555
+ : {};
4469
4556
  }
4470
- ngOnInit() {
4471
- this.setupSecurityFormGroup();
4557
+ get BranchesFormControl() {
4558
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
4472
4559
  }
4473
- SecuritySubmit() {
4474
- //save the security settings
4475
- console.log("submitting security values: ", this.SecurityFormGroup.value);
4476
- this.SaveFormEvent.emit(this.SecurityFormGroup.value);
4560
+ get BuildPathFormControl() {
4561
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'buildPath');
4477
4562
  }
4478
- setupSecurityFormGroup() {
4479
- this.ProcessorType = this.EditingApplication?.Processor?.Type || '';
4480
- this.SecurityFormGroup = this.formBldr.group({});
4481
- this.setupSecurityForm();
4563
+ get DevOpsActionLookups() {
4564
+ // console.log(this.DevOpsActions);
4565
+ return Object.keys(this.DevOpsActions || {});
4482
4566
  }
4483
- setupSecurityForm() {
4484
- this.SecurityFormGroup.addControl('isPrivate', this.formBldr.control(this.EditingApplication.LookupConfig?.IsPrivate || false, [Validators.required]));
4485
- this.SecurityFormGroup.addControl('isTriggerSignIn', this.formBldr.control(this.EditingApplication.LookupConfig?.IsTriggerSignIn || false, [Validators.required]));
4567
+ get DevOpsAction() {
4568
+ return this.Environment.DevOpsActions && this.DevOpsActionLookup
4569
+ ? this.Environment.DevOpsActions[this.DevOpsActionLookup] || {}
4570
+ : {};
4486
4571
  }
4487
- }
4488
- 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 });
4489
- 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]" }] });
4490
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SecurityToggleComponent, decorators: [{
4491
- type: Component,
4492
- 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"] }]
4493
- }], ctorParameters: function () { return [{ type: EaCService }, { type: i1$2.FormBuilder }]; }, propDecorators: { EditingApplication: [{
4494
- type: Input,
4495
- args: ['editing-application']
4496
- }], SaveFormEvent: [{
4497
- type: Output,
4498
- args: ['save-form-event']
4499
- }] } });
4500
-
4501
- class ProcessorDetailsFormComponent {
4502
- constructor(appsFlowSvc, formBldr, eacSvc) {
4503
- this.appsFlowSvc = appsFlowSvc;
4504
- this.formBldr = formBldr;
4505
- this.eacSvc = eacSvc;
4506
- this.redirectTooltip = '';
4507
- this.HasSaveButton = true;
4508
- this.SaveFormEvent = new EventEmitter();
4509
- }
4510
- get APIRootFormControl() {
4511
- return this.ProcessorDetailsFormGroup?.controls.apiRoot;
4572
+ get DevOpsActionLookup() {
4573
+ if (!!this.DevOpsActionLookupFormControl?.value) {
4574
+ return this.DevOpsActionLookupFormControl.value;
4575
+ }
4576
+ if (!!this.EditingSourceControl?.DevOpsActionTriggerLookups) {
4577
+ return this.EditingSourceControl?.DevOpsActionTriggerLookups[0];
4578
+ }
4579
+ else {
4580
+ return null;
4581
+ }
4512
4582
  }
4513
- get Environment() {
4514
- return this.State?.EaC?.Environments[this.State?.EaC?.Enterprise?.PrimaryEnvironment];
4583
+ get DevOpsActionLookupFormControl() {
4584
+ return this.DevOpsSourceControlFormGroup.get('devOpsActionLookup');
4515
4585
  }
4516
- get BuildFormControl() {
4517
- return this.ProcessorDetailsFormGroup?.controls.build;
4586
+ get DevOpsActions() {
4587
+ return this.Environment.DevOpsActions || {};
4518
4588
  }
4519
- get BuildPathFormControl() {
4520
- return this.ProcessorDetailsFormGroup?.controls.buildPath;
4589
+ get EditingSourceControl() {
4590
+ let sc = this.Environment?.Sources
4591
+ ? this.Environment?.Sources[this.EditingSourceControlLookup]
4592
+ : null;
4593
+ if (sc == null && this.EditingSourceControlLookup) {
4594
+ sc = {};
4595
+ }
4596
+ return sc;
4521
4597
  }
4522
- get ClientIDFormControl() {
4523
- return this.ProcessorDetailsFormGroup?.controls.clientId;
4598
+ get MainBranchFormControl() {
4599
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'mainBranch');
4524
4600
  }
4525
- get ClientSecretFormControl() {
4526
- return this.ProcessorDetailsFormGroup?.controls.clientSecret;
4601
+ get OrganizationFormControl() {
4602
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'organization');
4527
4603
  }
4528
- get DefaultFileFormControl() {
4529
- return this.ProcessorDetailsFormGroup?.controls.defaultFile;
4604
+ get RepositoryFormControl() {
4605
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'repository');
4530
4606
  }
4531
- get DefaultSourceControl() {
4532
- return {
4533
- Organization: this.EditingApplication?.LowCodeUnit?.Organization,
4534
- Repository: this.EditingApplication?.LowCodeUnit?.Repository,
4535
- };
4607
+ get State() {
4608
+ return this.eacSvc.State;
4536
4609
  }
4537
- get InboundPathFormControl() {
4538
- return this.ProcessorDetailsFormGroup?.controls.inboundPath;
4610
+ // Life Cycle
4611
+ ngAfterViewInit() { }
4612
+ ngOnDestroy() {
4613
+ this.destroyFormControls();
4539
4614
  }
4540
- get IncludeRequestFormControl() {
4541
- return this.ProcessorDetailsFormGroup?.controls.includeRequest;
4615
+ ngOnInit() {
4616
+ console.log("source control lookup", this.EditingSourceControlLookup);
4617
+ if (this.EditingSourceControlLookup === null) {
4618
+ this.CreateNewSourceControl();
4619
+ }
4620
+ console.log("source control", this.EditingSourceControl);
4621
+ if (this.EditingSourceControl != null) {
4622
+ this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
4623
+ this.setupFormControls();
4624
+ }
4625
+ this.RefreshOrganizations();
4542
4626
  }
4543
- get MethodsFormControl() {
4544
- return this.ProcessorDetailsFormGroup?.controls.methods;
4627
+ // API Methods
4628
+ AddBranchOption(event) {
4629
+ this.addBranchOption(event.value);
4630
+ event.input.value = '';
4545
4631
  }
4546
- get PackageFormControl() {
4547
- return this.ProcessorDetailsFormGroup?.controls.package;
4632
+ BranchOptionSelected(event) {
4633
+ this.addBranchOption(event.option.value);
4548
4634
  }
4549
- get PermanentFormControl() {
4550
- return this.ProcessorDetailsFormGroup?.controls.permanent;
4635
+ BranchesChanged(branches) {
4636
+ this.loadProjectHostingDetails();
4551
4637
  }
4552
- get PreserveMethodFormControl() {
4553
- return this.ProcessorDetailsFormGroup?.controls.preserveMethod;
4638
+ BuildPathChanged(event) {
4639
+ //do something??
4554
4640
  }
4555
- get RedirectFormControl() {
4556
- return this.ProcessorDetailsFormGroup?.controls.redirect;
4641
+ CreateNewSourceControl() {
4642
+ this.SetEditingSourceControl(Guid.CreateRaw());
4557
4643
  }
4558
- get ScopesFormControl() {
4559
- return this.ProcessorDetailsFormGroup?.controls.scopes;
4644
+ CreateRepository() {
4645
+ this.CreatingRepository = true;
4646
+ this.RepositoryFormControl.reset();
4560
4647
  }
4561
- get SecurityFormControl() {
4562
- return this.ProcessorDetailsFormGroup?.controls.security;
4648
+ CancelCreateRepository() {
4649
+ this.CreatingRepository = false;
4563
4650
  }
4564
- get State() {
4565
- return this.eacSvc.State;
4651
+ DevOpsActionLookupChanged(event) {
4652
+ this.configureDevOpsAction();
4566
4653
  }
4567
- get SourceControls() {
4568
- return this.Environment?.Sources || {};
4654
+ MainBranchChanged(event) {
4655
+ this.emitBranchesChanged();
4569
4656
  }
4570
- get SourceControlFormControl() {
4571
- return this.ProcessorDetailsFormGroup?.controls.sourceControl;
4657
+ OrganizationChanged(event) {
4658
+ const org = this.OrganizationFormControl;
4659
+ this.RepositoryFormControl.reset();
4660
+ if (this.UseBranches) {
4661
+ this.BranchesFormControl.reset();
4662
+ this.SelectedBranches = [];
4663
+ }
4664
+ this.listRepositories();
4572
4665
  }
4573
- get SPARootFormControl() {
4574
- return this.ProcessorDetailsFormGroup?.controls.spaRoot;
4666
+ RefreshOrganizations() {
4667
+ // this.Loading = true;
4668
+ this.listOrganizations();
4669
+ this.OrganizationFormControl?.reset();
4670
+ this.RepositoryFormControl?.reset();
4671
+ if (this.UseBranches) {
4672
+ this.BranchesFormControl?.reset();
4673
+ }
4575
4674
  }
4576
- get TokenLookupFormControl() {
4577
- return this.ProcessorDetailsFormGroup?.controls.tokenLookup;
4675
+ RemoveBranchOption(option) {
4676
+ const index = this.SelectedBranches.indexOf(option);
4677
+ if (index >= 0) {
4678
+ this.SelectedBranches.splice(index, 1);
4679
+ }
4680
+ this.emitBranchesChanged();
4578
4681
  }
4579
- get ValidFormControls() {
4580
- let vfc = new Array();
4581
- for (const field in this.ProcessorDetailsFormGroup.controls) {
4582
- const control = this.ProcessorDetailsFormGroup.get(field);
4583
- if (control.valid) {
4584
- vfc.push(control);
4585
- }
4682
+ RepositoryChanged(event) {
4683
+ const repo = this.RepositoryFormControl;
4684
+ if (this.UseBranches) {
4685
+ this.BranchesFormControl.reset();
4686
+ this.SelectedBranches = [];
4687
+ this.listBranches();
4688
+ }
4689
+ if (!this.UseBranches) {
4690
+ this.listBuildPaths();
4586
4691
  }
4587
- // console.log("VFC=", vfc)
4588
- return vfc;
4589
4692
  }
4590
- get VersionFormControl() {
4591
- return this.ProcessorDetailsFormGroup?.controls.version;
4693
+ SaveRepository() {
4694
+ this.Loading = true;
4695
+ const org = this.OrganizationFormControl.value;
4696
+ const repoName = this.RepositoryFormControl.value;
4697
+ this.appsFlowSvc
4698
+ .CreateRepository(org, repoName)
4699
+ .subscribe((response) => {
4700
+ if (response.Status.Code === 0) {
4701
+ this.listRepositories(repoName);
4702
+ this.CreatingRepository = false;
4703
+ }
4704
+ else {
4705
+ // TODO: Need to surface an error to the user...
4706
+ this.Loading = false;
4707
+ }
4708
+ });
4592
4709
  }
4593
- get ZipFileFormControl() {
4594
- return this.ProcessorDetailsFormGroup?.controls.zipFile;
4710
+ SetEditingSourceControl(scLookup) {
4711
+ this.EditingSourceControlLookup = scLookup;
4595
4712
  }
4596
- ngOnInit() {
4597
- if (!this.EditingApplication) {
4598
- this.CreateNewApplication();
4599
- }
4600
- else {
4601
- this.setupProcessorDetailsForm();
4602
- }
4713
+ SubmitSourceControl() {
4714
+ console.log('source control submitted: ', this.DevOpsSourceControlFormGroup.value);
4715
+ this.SaveSourceControl();
4603
4716
  }
4604
- CreateNewApplication() {
4605
- this.SetEditingApplication(Guid.CreateRaw());
4717
+ SaveSourceControl() {
4718
+ const saveEnvReq = {
4719
+ Environment: {
4720
+ ...this.Environment,
4721
+ Sources: this.Environment.Sources || {},
4722
+ },
4723
+ EnvironmentLookup: this.EnvironmentLookup,
4724
+ EnterpriseDataTokens: {},
4725
+ };
4726
+ let source = {
4727
+ ...this.EditingSourceControl,
4728
+ Branches: this.SelectedBranches,
4729
+ MainBranch: this.MainBranchFormControl.value,
4730
+ };
4731
+ source = {
4732
+ ...source,
4733
+ Type: 'GitHub',
4734
+ Name: `@${this.OrganizationFormControl.value}/${this.RepositoryFormControl.value}`,
4735
+ DevOpsActionTriggerLookups: [this.DevOpsActionLookup],
4736
+ Organization: this.OrganizationFormControl.value,
4737
+ Repository: this.RepositoryFormControl.value,
4738
+ };
4739
+ const scLookup = `github://${source.Organization}/${source.Repository}`;
4740
+ saveEnvReq.Environment.Sources[scLookup] = source;
4741
+ console.log('save SC: ', saveEnvReq);
4742
+ let resp = this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
4743
+ resp.then((res) => {
4744
+ this.SaveStatusEvent.emit(res);
4745
+ });
4606
4746
  }
4607
- DetermineTooltipText() {
4608
- let permanentValue = this.PermanentFormControl.value;
4609
- let preserveValue = this.PreserveMethodFormControl.value;
4610
- if (permanentValue === true && preserveValue === false) {
4611
- this.redirectTooltip = '301 – Permanent and Not Preserve';
4612
- }
4613
- else if (permanentValue === false && preserveValue === false) {
4614
- this.redirectTooltip = '302 – Not Permanent and Not Preserve';
4615
- }
4616
- else if (permanentValue === false && preserveValue === true) {
4617
- this.redirectTooltip = '307 – Not Permanent and Preserve';
4618
- }
4619
- else if (permanentValue === true && preserveValue === true) {
4620
- this.redirectTooltip = '308 – Permanent and Preserve';
4747
+ // Helpers
4748
+ addBranchOption(value) {
4749
+ value = (value || '').trim();
4750
+ if (value && this.SelectedBranches.indexOf(value) < 0) {
4751
+ this.SelectedBranches.push(value);
4621
4752
  }
4753
+ this.BranchesInput.nativeElement.blur();
4754
+ this.emitBranchesChanged();
4622
4755
  }
4623
- SaveProcessorDetails() {
4624
- const app = this.EditingApplication;
4625
- app.LookupConfig.AllowedMethods = this.MethodsFormControl?.value
4626
- ?.split(' ')
4627
- .filter((v) => !!v);
4628
- app.Processor.Type = this.ProcessorType;
4629
- switch (app.Processor.Type) {
4630
- case 'DFS':
4631
- app.Processor.DefaultFile =
4632
- this.DefaultFileFormControl.value || 'index.html';
4633
- app.LowCodeUnit = {
4634
- Type: this.LCUType,
4635
- };
4636
- switch (app.LowCodeUnit.Type) {
4637
- case 'GitHub':
4638
- app.LowCodeUnit.Organization =
4639
- this.SourceControls[this.SourceControlFormControl.value]?.Organization;
4640
- app.LowCodeUnit.Repository =
4641
- this.SourceControls[this.SourceControlFormControl.value]?.Repository;
4642
- app.LowCodeUnit.Build = this.BuildFormControl.value;
4643
- app.LowCodeUnit.Path = this.BuildPathFormControl.value;
4644
- app.LowCodeUnit.SourceControlLookup =
4645
- this.SourceControlFormControl.value;
4646
- break;
4647
- case 'NPM':
4648
- app.LowCodeUnit.Package = this.PackageFormControl.value;
4649
- app.LowCodeUnit.Version = this.VersionFormControl.value;
4650
- break;
4651
- case 'WordPress':
4652
- app.LowCodeUnit.APIRoot = this.APIRootFormControl.value;
4653
- break;
4654
- case 'Zip':
4655
- app.LowCodeUnit.ZipFile = this.ZipFileFormControl.value;
4656
- break;
4756
+ configureDevOpsAction() {
4757
+ setTimeout(() => {
4758
+ this.DevOpsActionLookupFormControl.setValue(this.DevOpsActionLookup);
4759
+ }, 0);
4760
+ }
4761
+ destroyFormControls() {
4762
+ this.DevOpsSourceControlFormGroup.removeControl([this.SourceControlRoot, 'mainBranch'].join(''));
4763
+ this.DevOpsSourceControlFormGroup?.removeControl([this.SourceControlRoot, 'branches'].join(''));
4764
+ this.DevOpsSourceControlFormGroup?.removeControl([this.SourceControlRoot, 'buildPath'].join(''));
4765
+ this.SelectedBranches = [];
4766
+ this.DevOpsSourceControlFormGroup?.removeControl([this.SourceControlRoot, 'organization'].join(''));
4767
+ this.DevOpsSourceControlFormGroup?.removeControl([this.SourceControlRoot, 'repository'].join(''));
4768
+ }
4769
+ emitBranchesChanged() {
4770
+ if (this.SelectedBranches?.length > 0 &&
4771
+ (!this.MainBranchFormControl.value ||
4772
+ this.SelectedBranches.indexOf(this.MainBranchFormControl.value) < 0)) {
4773
+ this.MainBranchFormControl.setValue(this.SelectedBranches.find((branch) => branch === 'main' || branch === 'master') || this.SelectedBranches[0]);
4774
+ }
4775
+ else if (this.SelectedBranches?.length <= 0) {
4776
+ this.MainBranchFormControl.reset();
4777
+ }
4778
+ this.BranchesFormControl.setValue(this.SelectedBranches.join(','));
4779
+ this.BranchesChanged(this.SelectedBranches || []);
4780
+ }
4781
+ listBranches() {
4782
+ if (this.UseBranches) {
4783
+ this.Loading = true;
4784
+ this.appsFlowSvc
4785
+ .ListBranches(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
4786
+ .subscribe((response) => {
4787
+ this.BranchOptions = response.Model;
4788
+ this.Loading = false;
4789
+ if (this.EditingSourceControl?.Branches?.length > 0) {
4790
+ this.SelectedBranches = this.EditingSourceControl.Branches;
4657
4791
  }
4658
- break;
4659
- case 'OAuth':
4660
- app.Processor.Scopes = this.ScopesFormControl.value.split(' ');
4661
- app.Processor.TokenLookup = this.TokenLookupFormControl.value;
4662
- app.LowCodeUnit = {
4663
- Type: this.LCUType,
4664
- };
4665
- switch (app.LowCodeUnit.Type) {
4666
- case 'GitHubOAuth':
4667
- app.LowCodeUnit.ClientID = this.ClientIDFormControl.value;
4668
- app.LowCodeUnit.ClientSecret = this.ClientSecretFormControl.value;
4669
- break;
4792
+ else if (this.BranchOptions?.length === 1) {
4793
+ this.BranchesFormControl.setValue(this.BranchOptions[0].Name);
4794
+ this.SelectedBranches = [this.BranchOptions[0].Name];
4670
4795
  }
4671
- break;
4672
- case 'Proxy':
4673
- app.Processor.InboundPath = this.InboundPathFormControl.value;
4674
- app.LowCodeUnit = {
4675
- Type: this.LCUType,
4676
- };
4677
- switch (app.LowCodeUnit.Type) {
4678
- case 'API':
4679
- app.LowCodeUnit.APIRoot = this.APIRootFormControl.value;
4680
- app.LowCodeUnit.Security = this.SecurityFormControl.value;
4681
- break;
4682
- case 'SPA':
4683
- app.LowCodeUnit.SPARoot = this.SPARootFormControl.value;
4684
- break;
4796
+ this.emitBranchesChanged();
4797
+ this.listBuildPaths();
4798
+ });
4799
+ }
4800
+ }
4801
+ listBuildPaths() {
4802
+ if (this.UseBuildPath) {
4803
+ this.Loading = true;
4804
+ this.appsFlowSvc
4805
+ .ListBuildPaths(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
4806
+ .subscribe((response) => {
4807
+ this.BuildPathOptions = response.Model;
4808
+ this.Loading = false;
4809
+ if (this.BuildPathOptions?.length === 1) {
4810
+ this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
4685
4811
  }
4686
- break;
4687
- case 'Redirect':
4688
- app.Processor.IncludeRequest = !!this.IncludeRequestFormControl.value;
4689
- app.Processor.Permanent = !!this.PermanentFormControl.value;
4690
- app.Processor.PreserveMethod = !!this.PreserveMethodFormControl.value;
4691
- app.Processor.Redirect = this.RedirectFormControl.value;
4692
- break;
4812
+ });
4813
+ }
4814
+ }
4815
+ listOrganizations() {
4816
+ this.Loading = true;
4817
+ this.appsFlowSvc
4818
+ .ListOrganizations()
4819
+ .subscribe((response) => {
4820
+ this.OrganizationOptions = response.Model;
4821
+ console.log("Organization Options: ", this.OrganizationOptions);
4822
+ this.Loading = false;
4823
+ if (this.EditingSourceControl?.Organization) {
4824
+ setTimeout(() => {
4825
+ this.OrganizationFormControl.setValue(this.EditingSourceControl.Organization);
4826
+ this.listRepositories(this.EditingSourceControl?.Repository);
4827
+ }, 0);
4828
+ }
4829
+ });
4830
+ }
4831
+ listRepositories(activeRepo = null) {
4832
+ this.Loading = true;
4833
+ this.appsFlowSvc
4834
+ .ListRepositories(this.OrganizationFormControl.value)
4835
+ .subscribe((response) => {
4836
+ this.RepositoryOptions = response.Model;
4837
+ this.Loading = false;
4838
+ if (activeRepo) {
4839
+ setTimeout(() => {
4840
+ this.RepositoryFormControl.setValue(activeRepo);
4841
+ this.listBranches();
4842
+ if (!this.UseBranches) {
4843
+ this.listBuildPaths();
4844
+ }
4845
+ }, 0);
4846
+ }
4847
+ else if (this.RepositoryOptions?.length <= 0) {
4848
+ this.CreatingRepository = true;
4849
+ }
4850
+ });
4851
+ }
4852
+ loadProjectHostingDetails() {
4853
+ if (this.SelectedBranches?.length > 0) {
4854
+ this.HostingDetails.Loading = true;
4855
+ this.appsFlowSvc
4856
+ .LoadProjectHostingDetails()
4857
+ .subscribe((response) => {
4858
+ this.HostingDetails = response.Model;
4859
+ this.HostingDetails.Loading = false;
4860
+ this.configureDevOpsAction();
4861
+ }, (err) => {
4862
+ this.HostingDetails.Loading = false;
4863
+ });
4864
+ }
4865
+ }
4866
+ setupFormControls() {
4867
+ this.destroyFormControls();
4868
+ console.log("Source Control: ", this.EditingSourceControl);
4869
+ this.DevOpsSourceControlFormGroup.addControl('devOpsActionLookup', new FormControl(this.DevOpsActionLookup || '', []));
4870
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'organization'].join(''), new FormControl(this.EditingSourceControl.Organization ?? '', Validators.required));
4871
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'repository'].join(''), new FormControl(this.EditingSourceControl.Repository ?? '', Validators.required));
4872
+ if (this.UseBranches) {
4873
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'branches'].join(''), new FormControl(this.EditingSourceControl?.Branches ?? '', Validators.required));
4874
+ this.SelectedBranches = this.EditingSourceControl?.Branches;
4875
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'mainBranch'].join(''), new FormControl(this.EditingSourceControl.MainBranch ?? '', Validators.required));
4876
+ }
4877
+ if (this.UseBuildPath) {
4878
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'buildPath'].join(''), new FormControl(this.BuildPath ?? '', Validators.required));
4879
+ }
4880
+ }
4881
+ }
4882
+ 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 });
4883
+ 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"] }] });
4884
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DevopsSourceControlFormComponent, decorators: [{
4885
+ type: Component,
4886
+ 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"] }]
4887
+ }], ctorParameters: function () { return [{ type: ApplicationsFlowService }, { type: EaCService }, { type: i1$2.FormBuilder }]; }, propDecorators: { EditingSourceControlLookup: [{
4888
+ type: Input,
4889
+ args: ['editing-source-control-lookup']
4890
+ }], Environment: [{
4891
+ type: Input,
4892
+ args: ['environment']
4893
+ }], EnvironmentLookup: [{
4894
+ type: Input,
4895
+ args: ['environment-lookup']
4896
+ }], SaveStatusEvent: [{
4897
+ type: Output,
4898
+ args: ['save-status-event']
4899
+ }], BranchesInput: [{
4900
+ type: ViewChild,
4901
+ args: ['branches']
4902
+ }] } });
4903
+
4904
+ class SourceControlDialogComponent {
4905
+ constructor(dialogRef, eacSvc, data, snackBar) {
4906
+ this.dialogRef = dialogRef;
4907
+ this.eacSvc = eacSvc;
4908
+ this.data = data;
4909
+ this.snackBar = snackBar;
4910
+ }
4911
+ get DevOpsSourceControlFormGroup() {
4912
+ return this.DevopsSourceControl?.DevOpsSourceControlFormGroup;
4913
+ }
4914
+ get HasConnection() {
4915
+ return this.State.GitHub.HasConnection;
4916
+ }
4917
+ get State() {
4918
+ return this.eacSvc.State;
4919
+ }
4920
+ ngOnInit() {
4921
+ }
4922
+ CloseDialog() {
4923
+ this.dialogRef.close();
4924
+ }
4925
+ HandleSaveStatusEvent(event) {
4926
+ console.log("event to save: ", event);
4927
+ if (event.Code === 0) {
4928
+ this.snackBar.open("Source Control Succesfully Saved", "Dismiss", {
4929
+ duration: 5000
4930
+ });
4931
+ this.CloseDialog();
4932
+ }
4933
+ else {
4934
+ this.ErrorMessage = event.Message;
4935
+ }
4936
+ }
4937
+ SaveSourceControl() {
4938
+ this.DevopsSourceControl.SaveSourceControl();
4939
+ }
4940
+ }
4941
+ 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 });
4942
+ 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"] }] });
4943
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, decorators: [{
4944
+ type: Component,
4945
+ 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"] }]
4946
+ }], ctorParameters: function () { return [{ type: i2$2.MatDialogRef }, { type: EaCService }, { type: undefined, decorators: [{
4947
+ type: Inject,
4948
+ args: [MAT_DIALOG_DATA]
4949
+ }] }, { type: i3$1.MatSnackBar }]; }, propDecorators: { DevopsSourceControl: [{
4950
+ type: ViewChild,
4951
+ args: [DevopsSourceControlFormComponent]
4952
+ }] } });
4953
+
4954
+ class MainFeedCardComponent {
4955
+ constructor(eacSvc, dialog, sanitizer) {
4956
+ this.eacSvc = eacSvc;
4957
+ this.dialog = dialog;
4958
+ this.sanitizer = sanitizer;
4959
+ }
4960
+ get ActiveEnvironment() {
4961
+ return this.State?.EaC?.Environments[this.ActiveEnvironmentLookup];
4962
+ }
4963
+ get ActiveEnvironmentLookup() {
4964
+ // TODO: Eventually support multiple environments
4965
+ const envLookups = Object.keys(this.State?.EaC?.Environments || {});
4966
+ return envLookups[0];
4967
+ }
4968
+ get Environment() {
4969
+ // console.log("Ent Environment var: ", this.State?.EaC?.Environments[this.State?.EaC?.Enterprise?.PrimaryEnvironment]);
4970
+ return this.State?.EaC?.Environments[this.State?.EaC?.Enterprise?.PrimaryEnvironment];
4971
+ }
4972
+ get Icon() {
4973
+ if (this.FeedItem.Status.Code === 0) {
4974
+ return 'check_circle';
4975
+ }
4976
+ else if (this.FeedItem.Status.Code === 1) {
4977
+ return 'cancel';
4978
+ }
4979
+ else if (this.FeedItem.Status.Code === 2) {
4980
+ return 'sync';
4981
+ }
4982
+ else {
4983
+ return 'help_outline';
4984
+ }
4985
+ }
4986
+ get IconColor() {
4987
+ if (this.FeedItem.Status.Code === 0) {
4988
+ return 'green';
4989
+ }
4990
+ else if (this.FeedItem.Status.Code === 1) {
4991
+ return 'red';
4693
4992
  }
4694
- if (!app.LookupConfig.PathRegex.startsWith('/')) {
4695
- app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
4993
+ else if (this.FeedItem.Status.Code === 2) {
4994
+ return 'blue';
4995
+ }
4996
+ else {
4997
+ return 'gray';
4696
4998
  }
4697
- const saveAppReq = {
4698
- ProjectLookup: this.ProjectLookup,
4699
- Application: app,
4700
- ApplicationLookup: this.EditingApplicationLookup || Guid.CreateRaw(),
4701
- };
4702
- this.eacSvc.SaveApplicationAsCode(saveAppReq).then((res) => {
4703
- this.SaveFormEvent.emit(res);
4704
- });
4705
- }
4706
- SetEditingApplication(appLookup) {
4707
- this.EditingApplication = new EaCApplicationAsCode();
4708
- this.EditingApplicationLookup = appLookup;
4709
- this.setupProcessorDetailsForm();
4710
- }
4711
- SourceControlChanged(event) {
4712
- this.listBuildPaths();
4713
4999
  }
4714
- ProcessorTypeChanged(event) {
4715
- this.ProcessorType = event.value;
4716
- this.setupProcessorTypeSubForm();
5000
+ get State() {
5001
+ return this.eacSvc.State;
4717
5002
  }
4718
- LCUTypeChanged(event) {
4719
- this.LCUType = event.value;
4720
- this.setupLcuTypeSubForm();
5003
+ // Life Cycle
5004
+ ngOnInit() {
5005
+ this.handleRefresh();
4721
5006
  }
4722
- //HELPERS
4723
- cleanupLcuTypeSubForm() {
4724
- this.ProcessorDetailsFormGroup.removeControl('methods');
4725
- this.ProcessorDetailsFormGroup.removeControl('apiRoot');
4726
- this.ProcessorDetailsFormGroup.removeControl('security');
4727
- this.ProcessorDetailsFormGroup.removeControl('spaRoot');
4728
- this.ProcessorDetailsFormGroup.removeControl('applicationId');
4729
- this.ProcessorDetailsFormGroup.removeControl('sourceControl');
4730
- this.ProcessorDetailsFormGroup.removeControl('build');
4731
- this.ProcessorDetailsFormGroup.removeControl('clientId');
4732
- this.ProcessorDetailsFormGroup.removeControl('clientSecret');
4733
- this.ProcessorDetailsFormGroup.removeControl('package');
4734
- this.ProcessorDetailsFormGroup.removeControl('version');
4735
- this.ProcessorDetailsFormGroup.removeControl('zipFile');
5007
+ // API Methods
5008
+ CalculateTimelapse(timestamp) {
5009
+ return moment(timestamp).fromNow();
4736
5010
  }
4737
- cleanupProcessorTypeSubForm() {
4738
- this.ProcessorDetailsFormGroup.removeControl('defaultFile');
4739
- // this.ApplicationFormGroup.removeControl('dfsLcuType');
4740
- // this.ApplicationFormGroup.removeControl('oauthLcuType');
4741
- this.ProcessorDetailsFormGroup.removeControl('scopes');
4742
- this.ProcessorDetailsFormGroup.removeControl('tokenLookup');
4743
- this.ProcessorDetailsFormGroup.removeControl('inboundPath');
4744
- this.ProcessorDetailsFormGroup.removeControl('proxyLcuType');
4745
- this.ProcessorDetailsFormGroup.removeControl('includeRequest');
4746
- this.ProcessorDetailsFormGroup.removeControl('redirect');
4747
- this.ProcessorDetailsFormGroup.removeControl('permanent');
4748
- this.ProcessorDetailsFormGroup.removeControl('preserveMethod');
4749
- this.cleanupLcuTypeSubForm();
5011
+ HandleAction(action) {
5012
+ if (action.ActionType == 'Link') {
5013
+ if (action.Action.startsWith('http')) {
5014
+ window.open(action.Action, '_blank');
5015
+ }
5016
+ else {
5017
+ window.location.href = action.Action;
5018
+ }
5019
+ }
5020
+ else if (action.ActionType == 'Modal') {
5021
+ if (action.Action == 'AddSourceControl') {
5022
+ this.OpenSourceControlDialog(null);
5023
+ }
5024
+ else {
5025
+ alert('other modaled ' + action.Action);
5026
+ }
5027
+ }
4750
5028
  }
4751
- listBuildPaths() {
4752
- this.State.Loading = true;
4753
- console.log("Source Control: ", this.SourceControls[this.SourceControlFormControl.value]);
4754
- this.appsFlowSvc
4755
- .ListBuildPaths(this.SourceControls[this.SourceControlFormControl.value]?.Organization, this.SourceControls[this.SourceControlFormControl.value]?.Repository)
4756
- .subscribe((response) => {
4757
- this.BuildPathOptions = response.Model;
4758
- console.log("build path options: ", this.BuildPathOptions);
4759
- this.State.Loading = false;
4760
- // if (this.BuildPathOptions?.length === 1) {
4761
- // this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
4762
- // }
5029
+ OpenSourceControlDialog(scLookup) {
5030
+ const dialogRef = this.dialog.open(SourceControlDialogComponent, {
5031
+ width: '550px',
5032
+ data: {
5033
+ environment: this.Environment,
5034
+ environmentLookup: this.ActiveEnvironmentLookup,
5035
+ scLookup: scLookup,
5036
+ },
5037
+ });
5038
+ dialogRef.afterClosed().subscribe((result) => {
5039
+ // console.log('The dialog was closed');
5040
+ // console.log("result:", result)
4763
5041
  });
4764
5042
  }
4765
- setupLcuTypeSubForm() {
4766
- this.cleanupLcuTypeSubForm();
4767
- if (this.LCUType) {
4768
- switch (this.LCUType) {
4769
- case 'API':
4770
- this.setupLCUAPIForm();
4771
- break;
4772
- case 'ApplicationPointer':
4773
- this.setupLCUApplicationPointerForm();
4774
- break;
4775
- case 'GitHub':
4776
- this.setupLCUGitHubForm();
4777
- break;
4778
- case 'GitHubOAuth':
4779
- this.setupLCUGitHubOAuthForm();
4780
- break;
4781
- case 'WordPress':
4782
- this.setupLCUWordPressForm();
4783
- break;
4784
- // case 'NPM':
4785
- // this.setupLCUNPMForm();
4786
- // break;
4787
- case 'SPA':
4788
- this.setupLCUSPAForm();
4789
- break;
4790
- case 'Zip':
4791
- this.setupLCUZipForm();
4792
- break;
4793
- }
5043
+ SafeHtml(html) {
5044
+ return this.sanitizer.bypassSecurityTrustHtml(html);
5045
+ }
5046
+ // Helpers
5047
+ handleRefresh() {
5048
+ if (this.FeedItem?.RefreshLink) {
5049
+ setTimeout(() => {
5050
+ this.eacSvc.CheckUserFeedItem(this.FeedItem).subscribe(async (response) => {
5051
+ if (response.Status.Code === 0) {
5052
+ this.FeedItem = response.Model;
5053
+ this.handleRefresh();
5054
+ }
5055
+ else {
5056
+ console.log(response);
5057
+ }
5058
+ }, (err) => {
5059
+ console.log(err);
5060
+ });
5061
+ }, 5000);
4794
5062
  }
4795
5063
  }
4796
- setupProcessorDetailsForm() {
4797
- this.ProcessorType = this.EditingApplication?.Processor?.Type || '';
4798
- // console.log('EDITING APP = ', this.EditingApplication);
4799
- if (this.EditingApplication != null) {
4800
- this.ProcessorDetailsFormGroup = this.formBldr.group({
4801
- procType: [this.ProcessorType, [Validators.required]],
4802
- });
4803
- // this.setupDfsForm();
4804
- // this.setupLcuTypeSubForm();
4805
- this.setupProcessorTypeSubForm();
5064
+ }
5065
+ 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 });
5066
+ 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"] }] });
5067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MainFeedCardComponent, decorators: [{
5068
+ type: Component,
5069
+ 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"] }]
5070
+ }], ctorParameters: function () { return [{ type: EaCService }, { type: i2$2.MatDialog }, { type: i3$2.DomSanitizer }]; }, propDecorators: { FeedItem: [{
5071
+ type: Input,
5072
+ args: ['feed-item']
5073
+ }] } });
5074
+
5075
+ class TwoColumnHeaderComponent {
5076
+ constructor() { }
5077
+ ngOnInit() {
5078
+ }
5079
+ }
5080
+ TwoColumnHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5081
+ 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"] }] });
5082
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, decorators: [{
5083
+ type: Component,
5084
+ 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"] }]
5085
+ }], ctorParameters: function () { return []; } });
5086
+
5087
+ class CardCarouselComponent {
5088
+ constructor() {
5089
+ this.carouselIndex = 0;
5090
+ }
5091
+ ngOnInit() {
5092
+ }
5093
+ ngAfterViewInit() {
5094
+ this.assignCarouselClass();
5095
+ }
5096
+ LeftChevronClicked() {
5097
+ this.removeCarouselClasses();
5098
+ if (this.carouselIndex === 0) {
5099
+ this.carouselIndex = this.Stats.length - 1;
5100
+ }
5101
+ else {
5102
+ this.carouselIndex--;
4806
5103
  }
5104
+ this.assignCarouselClass();
4807
5105
  }
4808
- setupLCUGitHubForm() {
4809
- console.log('EditingApplication: ', this.EditingApplication);
4810
- this.ProcessorDetailsFormGroup.addControl('sourceControl', this.formBldr.control(this.EditingApplication.LowCodeUnit?.SourceControlLookup || '', [Validators.required]));
4811
- this.ProcessorDetailsFormGroup.addControl('buildPath', this.formBldr.control(this.EditingApplication.LowCodeUnit?.Path || '', [
4812
- Validators.required,
4813
- ]));
4814
- this.ProcessorDetailsFormGroup.addControl('build', this.formBldr.control(this.EditingApplication.LowCodeUnit?.Build || 'latest', [Validators.required]));
4815
- this.listBuildPaths();
5106
+ MoreDetailsClicked() {
5107
+ console.log("More details clicked on carousel item", this.Stats[this.carouselIndex]);
4816
5108
  }
4817
- setupLCUApplicationPointerForm() {
4818
- this.ProcessorDetailsFormGroup.addControl('applicationId', this.formBldr.control(this.EditingApplication.LowCodeUnit?.ApplicationID || '', [Validators.required]));
5109
+ RightChevronClicked() {
5110
+ this.removeCarouselClasses();
5111
+ if (this.carouselIndex === this.Stats.length - 1) {
5112
+ this.carouselIndex = 0;
5113
+ }
5114
+ else {
5115
+ this.carouselIndex++;
5116
+ }
5117
+ this.assignCarouselClass();
4819
5118
  }
4820
- setupLCUSPAForm() {
4821
- this.ProcessorDetailsFormGroup.addControl('spaRoot', this.formBldr.control(this.EditingApplication.LowCodeUnit?.SPARoot || '', [Validators.required]));
5119
+ //HELPERS
5120
+ removeCarouselClasses() {
5121
+ for (let i = 0; i < this.Stats.length; i++) {
5122
+ if (i === this.carouselIndex) {
5123
+ document.getElementById("carousel-" + this.carouselIndex).classList.remove('active');
5124
+ }
5125
+ else {
5126
+ document.getElementById("carousel-" + i).classList.remove('hidden');
5127
+ }
5128
+ }
4822
5129
  }
4823
- setupLCUAPIForm() {
4824
- this.ProcessorDetailsFormGroup.addControl('methods', this.formBldr.control(this.EditingApplication.LookupConfig?.AllowedMethods?.join(' ') || '', []));
4825
- this.ProcessorDetailsFormGroup.addControl('apiRoot', this.formBldr.control(this.EditingApplication.LowCodeUnit?.APIRoot || '', [Validators.required]));
4826
- this.ProcessorDetailsFormGroup.addControl('security', this.formBldr.control(this.EditingApplication.LowCodeUnit?.Security || '', [Validators.required]));
5130
+ assignCarouselClass() {
5131
+ for (let i = 0; i < this.Stats.length; i++) {
5132
+ if (i === this.carouselIndex) {
5133
+ document.getElementById("carousel-" + this.carouselIndex).classList.add('active');
5134
+ }
5135
+ else {
5136
+ document.getElementById("carousel-" + i).classList.add('hidden');
5137
+ }
5138
+ }
4827
5139
  }
4828
- setupLCUGitHubOAuthForm() {
4829
- this.ProcessorDetailsFormGroup.addControl('clientId', this.formBldr.control(this.EditingApplication.LowCodeUnit?.ClientID || '', [Validators.required]));
4830
- this.ProcessorDetailsFormGroup.addControl('clientSecret', this.formBldr.control(this.EditingApplication.LowCodeUnit?.ClientSecret || '', [Validators.required]));
5140
+ }
5141
+ CardCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5142
+ 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"] }] });
5143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, decorators: [{
5144
+ type: Component,
5145
+ 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"] }]
5146
+ }], ctorParameters: function () { return []; }, propDecorators: { Stats: [{
5147
+ type: Input,
5148
+ args: ['stats']
5149
+ }] } });
5150
+
5151
+ class SecurityToggleComponent {
5152
+ constructor(eacSvc, formBldr) {
5153
+ this.eacSvc = eacSvc;
5154
+ this.formBldr = formBldr;
5155
+ this.SaveFormEvent = new EventEmitter;
5156
+ this.SkeletonEffect = 'wave';
4831
5157
  }
4832
- setupLCUWordPressForm() {
4833
- this.ProcessorDetailsFormGroup.addControl('apiRoot', this.formBldr.control(this.EditingApplication.LowCodeUnit?.APIRoot || '', [Validators.required]));
5158
+ get IsPrivateFormControl() {
5159
+ return this.SecurityFormGroup?.controls.isPrivate;
4834
5160
  }
4835
- setupProxyForm() {
4836
- this.LCUType = this.EditingApplication.LowCodeUnit?.Type || '';
4837
- this.ProcessorDetailsFormGroup.addControl('inboundPath', this.formBldr.control(this.EditingApplication.Processor?.InboundPath || '', [Validators.required]));
4838
- this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
5161
+ get IsTriggerSignInFormControl() {
5162
+ return this.SecurityFormGroup?.controls.isTriggerSignIn;
4839
5163
  }
4840
- setupRedirectForm() {
4841
- this.ProcessorDetailsFormGroup.addControl('redirect', this.formBldr.control(this.EditingApplication.Processor?.Redirect || '', [
4842
- Validators.required,
4843
- ]));
4844
- this.ProcessorDetailsFormGroup.addControl('permanent', this.formBldr.control(this.EditingApplication.Processor?.Permanent || false, []));
4845
- this.ProcessorDetailsFormGroup.addControl('preserveMethod', this.formBldr.control(this.EditingApplication.Processor?.PreserveMethod || false, []));
4846
- this.ProcessorDetailsFormGroup.addControl('includeRequest', this.formBldr.control(this.EditingApplication.Processor?.IncludeRequest || false, []));
4847
- this.DetermineTooltipText();
5164
+ get State() {
5165
+ return this.eacSvc.State;
4848
5166
  }
4849
- setupOAuthForm() {
4850
- this.LCUType = this.EditingApplication.LowCodeUnit?.Type || '';
4851
- this.ProcessorDetailsFormGroup.addControl('scopes', this.formBldr.control(this.EditingApplication.Processor?.Scopes?.Join(' ') || '', [Validators.required]));
4852
- this.ProcessorDetailsFormGroup.addControl('tokenLookup', this.formBldr.control(this.EditingApplication.Processor?.TokenLookup || '', [Validators.required]));
4853
- this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
5167
+ ngOnInit() {
5168
+ this.setupSecurityFormGroup();
4854
5169
  }
4855
- setupLCUZipForm() {
4856
- this.ProcessorDetailsFormGroup.addControl('zipFile', this.formBldr.control(this.EditingApplication.LowCodeUnit?.ZipFile || '', [Validators.required]));
5170
+ SecuritySubmit() {
5171
+ //save the security settings
5172
+ console.log("submitting security values: ", this.SecurityFormGroup.value);
5173
+ this.SaveFormEvent.emit(this.SecurityFormGroup.value);
4857
5174
  }
4858
- setupDfsForm() {
4859
- this.LCUType = this.EditingApplication.LowCodeUnit?.Type || '';
4860
- this.ProcessorDetailsFormGroup.addControl('defaultFile', this.formBldr.control(this.EditingApplication.Processor?.DefaultFile || 'index.html', [Validators.required]));
4861
- this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
5175
+ setupSecurityFormGroup() {
5176
+ this.ProcessorType = this.EditingApplication?.Processor?.Type || '';
5177
+ this.SecurityFormGroup = this.formBldr.group({});
5178
+ this.setupSecurityForm();
4862
5179
  }
4863
- setupProcessorTypeSubForm() {
4864
- this.cleanupProcessorTypeSubForm();
4865
- if (this.ProcessorType) {
4866
- switch (this.ProcessorType) {
4867
- case 'DFS':
4868
- this.setupDfsForm();
4869
- break;
4870
- case 'OAuth':
4871
- this.setupOAuthForm();
4872
- break;
4873
- case 'Proxy':
4874
- this.setupProxyForm();
4875
- break;
4876
- case 'Redirect':
4877
- this.setupRedirectForm();
4878
- break;
4879
- }
4880
- }
4881
- this.setupLcuTypeSubForm();
5180
+ setupSecurityForm() {
5181
+ this.SecurityFormGroup.addControl('isPrivate', this.formBldr.control(this.EditingApplication.LookupConfig?.IsPrivate || false, [Validators.required]));
5182
+ this.SecurityFormGroup.addControl('isTriggerSignIn', this.formBldr.control(this.EditingApplication.LookupConfig?.IsTriggerSignIn || false, [Validators.required]));
4882
5183
  }
4883
5184
  }
4884
- 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 });
4885
- 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"] }] });
4886
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ProcessorDetailsFormComponent, decorators: [{
5185
+ 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 });
5186
+ 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]" }] });
5187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SecurityToggleComponent, decorators: [{
4887
5188
  type: Component,
4888
- 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"] }]
4889
- }], ctorParameters: function () { return [{ type: ApplicationsFlowService }, { type: i1$2.FormBuilder }, { type: EaCService }]; }, propDecorators: { EditingApplication: [{
5189
+ 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"] }]
5190
+ }], ctorParameters: function () { return [{ type: EaCService }, { type: i1$2.FormBuilder }]; }, propDecorators: { EditingApplication: [{
4890
5191
  type: Input,
4891
5192
  args: ['editing-application']
4892
- }], EditingApplicationLookup: [{
4893
- type: Input,
4894
- args: ['editing-application-lookup']
4895
- }], HasSaveButton: [{
4896
- type: Input,
4897
- args: ['has-save-button']
4898
- }], SourceControlLookups: [{
4899
- type: Input,
4900
- args: ['source-control-lookups']
4901
- }], ProjectLookup: [{
4902
- type: Input,
4903
- args: ['project-lookup']
4904
5193
  }], SaveFormEvent: [{
4905
5194
  type: Output,
4906
5195
  args: ['save-form-event']
@@ -5163,189 +5452,89 @@ class BuildPipelineFormComponent {
5163
5452
  // console.log("response: ", response);
5164
5453
  this.HostingDetails.Loading = false;
5165
5454
  const hostOption = this.HostingDetails?.HostingOptions?.find((ho) => ho.Path === this.DevOpsAction.Path);
5166
- this.BuildPipeline = hostOption?.Lookup;
5167
- // console.log("Build Pipeline HERE= ", this.BuildPipeline);
5168
- this.setupControlsForForm();
5169
- }, (err) => {
5170
- console.log('ERR: ', err);
5171
- this.HostingDetails.Loading = false;
5172
- });
5173
- // console.log('HOSTING DETAILS: ', this.HostingDetails);
5174
- }
5175
- }
5176
- 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 });
5177
- 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]" }] });
5178
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineFormComponent, decorators: [{
5179
- type: Component,
5180
- 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"] }]
5181
- }], ctorParameters: function () { return [{ type: EaCService }, { type: i1$2.FormBuilder }, { type: ApplicationsFlowService }]; }, propDecorators: { DevOpsActionLookup: [{
5182
- type: Input,
5183
- args: ['devops-action-lookup']
5184
- }], Disabled: [{
5185
- type: Input,
5186
- args: ['disabled']
5187
- }], Environment: [{
5188
- type: Input,
5189
- args: ['environment']
5190
- }], EnvironmentLookup: [{
5191
- type: Input,
5192
- args: ['environment-lookup']
5193
- }], HostingDetails: [{
5194
- type: Input,
5195
- args: ['hosting-details']
5196
- }], ResponseEvent: [{
5197
- type: Output,
5198
- args: ['response-event']
5199
- }] } });
5200
-
5201
- class BuildPipelineDialogComponent {
5202
- constructor(dialogRef, eacSvc, data, snackBar) {
5203
- this.dialogRef = dialogRef;
5204
- this.eacSvc = eacSvc;
5205
- this.data = data;
5206
- this.snackBar = snackBar;
5207
- }
5208
- get BuildPipelineFormGroup() {
5209
- return this.BuildPipelineControl?.BuildPipelineFormGroup;
5210
- }
5211
- get HasConnection() {
5212
- return this.State.GitHub.HasConnection;
5213
- }
5214
- get State() {
5215
- return this.eacSvc.State;
5216
- }
5217
- ngOnInit() {
5218
- }
5219
- CloseDialog() {
5220
- this.dialogRef.close();
5221
- }
5222
- HandleResponseEvent(event) {
5223
- console.log("Response Event: ", event);
5224
- if (event.Code === 0) {
5225
- this.snackBar.open("Build Pipeline Created Succesfully", "Dismiss", {
5226
- duration: 5000
5227
- });
5228
- this.CloseDialog();
5229
- }
5230
- else {
5231
- this.ErrorMessage = event.Message;
5232
- }
5233
- }
5234
- SaveBuildPipeline() {
5235
- this.BuildPipelineControl.SaveEnvironment();
5236
- }
5237
- }
5238
- 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 });
5239
- 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"] }] });
5240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineDialogComponent, decorators: [{
5241
- type: Component,
5242
- 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"] }]
5243
- }], ctorParameters: function () { return [{ type: i2$2.MatDialogRef }, { type: EaCService }, { type: undefined, decorators: [{
5244
- type: Inject,
5245
- args: [MAT_DIALOG_DATA]
5246
- }] }, { type: i3$1.MatSnackBar }]; }, propDecorators: { BuildPipelineControl: [{
5247
- type: ViewChild,
5248
- args: [BuildPipelineFormComponent]
5249
- }] } });
5250
-
5251
- class EditApplicationFormComponent {
5252
- constructor(formBldr, eacSvc) {
5253
- this.formBldr = formBldr;
5254
- this.eacSvc = eacSvc;
5255
- this.SaveFormEvent = new EventEmitter;
5256
- this.HasSaveButton = true;
5257
- }
5258
- get DescriptionFormControl() {
5259
- return this.ApplicationFormGroup?.controls.description;
5260
- }
5261
- get NameFormControl() {
5262
- return this.ApplicationFormGroup?.controls.name;
5263
- }
5264
- get RouteFormControl() {
5265
- return this.ApplicationFormGroup?.controls.route;
5266
- }
5267
- get State() {
5268
- return this.eacSvc.State;
5269
- }
5270
- ngOnInit() {
5271
- this.setupApplicationForm();
5272
- }
5273
- SubmitApplicationControl() {
5274
- console.log("application form: ", this.ApplicationFormGroup.value);
5275
- this.SaveApplication();
5276
- }
5277
- SaveApplication() {
5278
- const app = this.EditingApplication;
5279
- // console.log("APP=", app);
5280
- app.Application = {
5281
- Name: this.NameFormControl.value,
5282
- Description: this.DescriptionFormControl.value,
5283
- PriorityShift: this.EditingApplication?.Application?.PriorityShift || 0,
5284
- };
5285
- app.LookupConfig.PathRegex = `${this.RouteFormControl.value}.*`;
5286
- switch (app.Processor.Type) {
5287
- case 'DFS':
5288
- app.Processor.BaseHref = `${this.RouteFormControl.value}/`.replace('//', '/');
5289
- break;
5290
- }
5291
- if (!app.LookupConfig.PathRegex.startsWith('/')) {
5292
- app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
5293
- }
5294
- const saveAppReq = {
5295
- ProjectLookup: this.ProjectLookup,
5296
- Application: app,
5297
- ApplicationLookup: this.ApplicationLookup,
5298
- };
5299
- console.log("processor details being submitted: ", app.Processor);
5300
- this.eacSvc.SaveApplicationAsCode(saveAppReq).then(res => {
5301
- this.SaveFormEvent.emit(res);
5302
- });
5303
- }
5304
- //HELPERS
5305
- setupApplicationForm() {
5306
- if (this.EditingApplication != null) {
5307
- this.ApplicationFormGroup = this.formBldr.group({
5308
- name: [this.EditingApplication.Application?.Name, Validators.required],
5309
- description: [
5310
- this.EditingApplication.Application?.Description,
5311
- Validators.required,
5312
- ],
5313
- route: [this.CurrentRoute ? this.CurrentRoute :
5314
- this.EditingApplication.LookupConfig?.PathRegex.replace('.*', '') ||
5315
- '/',
5316
- Validators.required,
5317
- ],
5318
- // priority: [
5319
- // this.EditingApplication.Application?.Priority || 10000,
5320
- // Validators.required,
5321
- // ],
5322
- });
5323
- }
5455
+ this.BuildPipeline = hostOption?.Lookup;
5456
+ // console.log("Build Pipeline HERE= ", this.BuildPipeline);
5457
+ this.setupControlsForForm();
5458
+ }, (err) => {
5459
+ console.log('ERR: ', err);
5460
+ this.HostingDetails.Loading = false;
5461
+ });
5462
+ // console.log('HOSTING DETAILS: ', this.HostingDetails);
5324
5463
  }
5325
5464
  }
5326
- 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 });
5327
- 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"] }] });
5328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationFormComponent, decorators: [{
5465
+ 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 });
5466
+ 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]" }] });
5467
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineFormComponent, decorators: [{
5329
5468
  type: Component,
5330
- 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"] }]
5331
- }], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: EaCService }]; }, propDecorators: { ApplicationLookup: [{
5469
+ 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"] }]
5470
+ }], ctorParameters: function () { return [{ type: EaCService }, { type: i1$2.FormBuilder }, { type: ApplicationsFlowService }]; }, propDecorators: { DevOpsActionLookup: [{
5332
5471
  type: Input,
5333
- args: ['application-lookup']
5334
- }], CurrentRoute: [{
5472
+ args: ['devops-action-lookup']
5473
+ }], Disabled: [{
5335
5474
  type: Input,
5336
- args: ['current-route']
5337
- }], EditingApplication: [{
5475
+ args: ['disabled']
5476
+ }], Environment: [{
5338
5477
  type: Input,
5339
- args: ['editing-application']
5340
- }], HasSaveButton: [{
5478
+ args: ['environment']
5479
+ }], EnvironmentLookup: [{
5341
5480
  type: Input,
5342
- args: ['has-save-button']
5343
- }], ProjectLookup: [{
5481
+ args: ['environment-lookup']
5482
+ }], HostingDetails: [{
5344
5483
  type: Input,
5345
- args: ['project-lookup']
5346
- }], SaveFormEvent: [{
5484
+ args: ['hosting-details']
5485
+ }], ResponseEvent: [{
5347
5486
  type: Output,
5348
- args: ['save-form-event']
5487
+ args: ['response-event']
5488
+ }] } });
5489
+
5490
+ class BuildPipelineDialogComponent {
5491
+ constructor(dialogRef, eacSvc, data, snackBar) {
5492
+ this.dialogRef = dialogRef;
5493
+ this.eacSvc = eacSvc;
5494
+ this.data = data;
5495
+ this.snackBar = snackBar;
5496
+ }
5497
+ get BuildPipelineFormGroup() {
5498
+ return this.BuildPipelineControl?.BuildPipelineFormGroup;
5499
+ }
5500
+ get HasConnection() {
5501
+ return this.State.GitHub.HasConnection;
5502
+ }
5503
+ get State() {
5504
+ return this.eacSvc.State;
5505
+ }
5506
+ ngOnInit() {
5507
+ }
5508
+ CloseDialog() {
5509
+ this.dialogRef.close();
5510
+ }
5511
+ HandleResponseEvent(event) {
5512
+ console.log("Response Event: ", event);
5513
+ if (event.Code === 0) {
5514
+ this.snackBar.open("Build Pipeline Created Succesfully", "Dismiss", {
5515
+ duration: 5000
5516
+ });
5517
+ this.CloseDialog();
5518
+ }
5519
+ else {
5520
+ this.ErrorMessage = event.Message;
5521
+ }
5522
+ }
5523
+ SaveBuildPipeline() {
5524
+ this.BuildPipelineControl.SaveEnvironment();
5525
+ }
5526
+ }
5527
+ 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 });
5528
+ 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"] }] });
5529
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineDialogComponent, decorators: [{
5530
+ type: Component,
5531
+ 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"] }]
5532
+ }], ctorParameters: function () { return [{ type: i2$2.MatDialogRef }, { type: EaCService }, { type: undefined, decorators: [{
5533
+ type: Inject,
5534
+ args: [MAT_DIALOG_DATA]
5535
+ }] }, { type: i3$1.MatSnackBar }]; }, propDecorators: { BuildPipelineControl: [{
5536
+ type: ViewChild,
5537
+ args: [BuildPipelineFormComponent]
5349
5538
  }] } });
5350
5539
 
5351
5540
  class BreadcrumbComponent {
@@ -5447,7 +5636,7 @@ class BreadcrumbComponent {
5447
5636
  async handleStateChange() { }
5448
5637
  }
5449
5638
  BreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: EaCService }], target: i0.ɵɵFactoryTarget.Component });
5450
- 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"] }] });
5639
+ 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"] }] });
5451
5640
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BreadcrumbComponent, decorators: [{
5452
5641
  type: Component,
5453
5642
  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"] }]
@@ -5536,172 +5725,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
5536
5725
  args: [EditApplicationFormComponent]
5537
5726
  }] } });
5538
5727
 
5539
- class NewApplicationDialogComponent {
5540
- constructor(eacSvc, dialogRef, data, snackBar) {
5541
- this.eacSvc = eacSvc;
5542
- this.dialogRef = dialogRef;
5543
- this.data = data;
5544
- this.snackBar = snackBar;
5545
- this.HasSaveButton = false;
5546
- }
5547
- get Environment() {
5548
- return this.State?.EaC?.Environments[this.data.environmentLookup];
5549
- }
5550
- get SourceControls() {
5551
- return this.Environment?.Sources || {};
5552
- }
5553
- get SourceControlLookups() {
5554
- return Object.keys(this.Environment.Sources || {});
5555
- }
5556
- get State() {
5557
- return this.eacSvc.State;
5558
- }
5559
- ngOnInit() {
5560
- this.SetupApplication(Guid.CreateRaw());
5561
- }
5562
- CloseDialog() {
5563
- this.dialogRef.close();
5564
- }
5565
- SetupApplication(appLookup) {
5566
- this.NewApplication = new EaCApplicationAsCode;
5567
- this.NewApplicationLookup = appLookup;
5568
- }
5569
- SaveApplication() {
5570
- const app = {
5571
- Application: {
5572
- Name: this.ApplicationFormControls.NameFormControl.value,
5573
- Description: this.ApplicationFormControls.DescriptionFormControl.value,
5574
- PriorityShift: 0,
5575
- },
5576
- AccessRightLookups: [],
5577
- DataTokens: {},
5578
- LicenseConfigurationLookups: [],
5579
- LookupConfig: {
5580
- IsPrivate: false,
5581
- IsTriggerSignIn: false,
5582
- PathRegex: `${this.ApplicationFormControls.RouteFormControl.value}.*`,
5583
- QueryRegex: '',
5584
- HeaderRegex: '',
5585
- AllowedMethods: this.ProcessorDetailsFormControls.MethodsFormControl?.value
5586
- ?.split(' ')
5587
- .filter((v) => !!v),
5588
- },
5589
- Processor: {
5590
- Type: this.ProcessorDetailsFormControls.ProcessorType,
5591
- },
5592
- };
5593
- switch (app.Processor.Type) {
5594
- case 'DFS':
5595
- app.Processor.BaseHref = `${this.ApplicationFormControls.RouteFormControl.value}/`.replace('//', '/');
5596
- app.Processor.DefaultFile =
5597
- this.ProcessorDetailsFormControls.DefaultFileFormControl.value || 'index.html';
5598
- app.LowCodeUnit = {
5599
- Type: this.ProcessorDetailsFormControls.LCUType,
5600
- };
5601
- switch (app.LowCodeUnit.Type) {
5602
- case 'GitHub':
5603
- app.LowCodeUnit.Organization =
5604
- this.SourceControls[this.ProcessorDetailsFormControls.SourceControlFormControl.value].Organization;
5605
- app.LowCodeUnit.Repository =
5606
- this.SourceControls[this.ProcessorDetailsFormControls.SourceControlFormControl.value].Repository;
5607
- app.LowCodeUnit.Build = this.ProcessorDetailsFormControls.BuildFormControl.value;
5608
- app.LowCodeUnit.Path =
5609
- this.ProcessorDetailsFormControls.BuildPathFormControl.value;
5610
- break;
5611
- case 'NPM':
5612
- app.LowCodeUnit.Package = this.ProcessorDetailsFormControls.PackageFormControl.value;
5613
- app.LowCodeUnit.Version = this.ProcessorDetailsFormControls.VersionFormControl.value;
5614
- break;
5615
- case 'Zip':
5616
- app.LowCodeUnit.ZipFile = this.ProcessorDetailsFormControls.ZipFileFormControl.value;
5617
- break;
5618
- }
5619
- break;
5620
- case 'OAuth':
5621
- app.Processor.Scopes = this.ProcessorDetailsFormControls.ScopesFormControl.value.split(' ');
5622
- app.Processor.TokenLookup = this.ProcessorDetailsFormControls.TokenLookupFormControl.value;
5623
- app.LowCodeUnit = {
5624
- Type: this.ProcessorDetailsFormControls.LCUType,
5625
- };
5626
- switch (app.LowCodeUnit.Type) {
5627
- case 'GitHubOAuth':
5628
- app.LowCodeUnit.ClientID = this.ProcessorDetailsFormControls.ClientIDFormControl.value;
5629
- app.LowCodeUnit.ClientSecret = this.ProcessorDetailsFormControls.ClientSecretFormControl.value;
5630
- break;
5631
- }
5632
- break;
5633
- case 'Proxy':
5634
- app.Processor.InboundPath = this.ProcessorDetailsFormControls.InboundPathFormControl.value;
5635
- app.LowCodeUnit = {
5636
- Type: this.ProcessorDetailsFormControls.LCUType,
5637
- };
5638
- switch (app.LowCodeUnit.Type) {
5639
- case 'API':
5640
- app.LowCodeUnit.APIRoot = this.ProcessorDetailsFormControls.APIRootFormControl.value;
5641
- app.LowCodeUnit.Security = this.ProcessorDetailsFormControls.SecurityFormControl.value;
5642
- break;
5643
- case 'SPA':
5644
- app.LowCodeUnit.SPARoot = this.ProcessorDetailsFormControls.SPARootFormControl.value;
5645
- break;
5646
- }
5647
- break;
5648
- case 'Redirect':
5649
- app.Processor.Permanent = !!this.ProcessorDetailsFormControls.PermanentFormControl.value;
5650
- app.Processor.PreserveMethod = !!this.ProcessorDetailsFormControls.PreserveMethodFormControl.value;
5651
- app.Processor.Redirect = this.ProcessorDetailsFormControls.RedirectFormControl.value;
5652
- break;
5653
- }
5654
- if (!app.LookupConfig.PathRegex.startsWith('/')) {
5655
- app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
5656
- }
5657
- const saveAppReq = {
5658
- ProjectLookup: this.data.projectLookup,
5659
- Application: app,
5660
- ApplicationLookup: this.NewApplicationLookup,
5661
- };
5662
- // this.HasBuildFormControl.value && taken out from below if statement
5663
- if (this.ProcessorDetailsFormControls.ProcessorType !== 'redirect' && this.ProcessorDetailsFormControls.LCUType === 'GitHub') {
5664
- if (app) {
5665
- app.LowCodeUnit.SourceControlLookup = this.ProcessorDetailsFormControls.SourceControlFormControl.value;
5666
- }
5667
- }
5668
- else if (app) {
5669
- app.LowCodeUnit.SourceControlLookup = null;
5670
- }
5671
- // console.log("Save new App request: ", saveAppReq);
5672
- this.eacSvc.SaveApplicationAsCode(saveAppReq).then(res => {
5673
- this.handleSaveStatus(res);
5674
- });
5675
- }
5676
- handleSaveStatus(status) {
5677
- console.log("event to save: ", status);
5678
- if (status.Code === 0) {
5679
- this.snackBar.open("Application Succesfully Created", "Dismiss", {
5680
- duration: 5000
5681
- });
5682
- this.CloseDialog();
5683
- }
5684
- else {
5685
- this.ErrorMessage = status.Message;
5686
- }
5687
- }
5688
- }
5689
- 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 });
5690
- 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"] }] });
5691
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: NewApplicationDialogComponent, decorators: [{
5692
- type: Component,
5693
- 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: [""] }]
5694
- }], ctorParameters: function () { return [{ type: EaCService }, { type: i2$2.MatDialogRef }, { type: undefined, decorators: [{
5695
- type: Inject,
5696
- args: [MAT_DIALOG_DATA]
5697
- }] }, { type: i3$1.MatSnackBar }]; }, propDecorators: { ApplicationFormControls: [{
5698
- type: ViewChild,
5699
- args: [EditApplicationFormComponent]
5700
- }], ProcessorDetailsFormControls: [{
5701
- type: ViewChild,
5702
- args: [ProcessorDetailsFormComponent]
5703
- }] } });
5704
-
5705
5728
  class ProcessorDetailsDialogComponent {
5706
5729
  constructor(eacSvc, dialogRef, data, snackBar) {
5707
5730
  this.eacSvc = eacSvc;