@lowcodeunit/applications-flow-common 1.33.301-lets-get-social-ish → 1.33.304-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.
@@ -43,11 +43,13 @@ import * as i4$3 from 'skeleton-elements/angular';
43
43
  import { SkeletonElementsModule } from 'skeleton-elements/angular';
44
44
  import * as i2$3 from '@angular/material/dialog';
45
45
  import { MAT_DIALOG_DATA } from '@angular/material/dialog';
46
- import { EaCApplicationAsCode } from '@semanticjs/common';
47
- import * as i3$1 from '@angular/material/snack-bar';
48
- import * as i7$1 from '@angular/material/menu';
49
46
  import moment from 'moment';
47
+ import * as i3$1 from '@angular/material/snack-bar';
50
48
  import * as i3$2 from '@angular/platform-browser';
49
+ import { EaCApplicationAsCode } from '@semanticjs/common';
50
+ import * as i4$4 from '@angular/material/menu';
51
+ import * as i10 from '@kolkov/angular-editor';
52
+ import { AngularEditorModule } from '@kolkov/angular-editor';
51
53
 
52
54
  /**
53
55
  * Model for form values
@@ -3929,1494 +3931,1128 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
3929
3931
  args: ['feed-item']
3930
3932
  }] } });
3931
3933
 
3932
- class EditApplicationFormComponent {
3933
- constructor(formBldr, eacSvc) {
3934
- this.formBldr = formBldr;
3934
+ class DevopsSourceControlFormComponent {
3935
+ // Constructors
3936
+ constructor(appsFlowSvc, eacSvc, formBuilder) {
3937
+ this.appsFlowSvc = appsFlowSvc;
3935
3938
  this.eacSvc = eacSvc;
3936
- this.SaveFormEvent = new EventEmitter;
3937
- this.HasSaveButton = true;
3939
+ this.formBuilder = formBuilder;
3940
+ this.SeparatorKeysCodes = [ENTER, COMMA];
3941
+ this.SaveStatusEvent = new EventEmitter();
3942
+ this.BuildPath = null;
3943
+ this.HostingDetails = new ProjectHostingDetails();
3944
+ this.SelectedBranches = [];
3945
+ this.SourceControlRoot = '';
3946
+ this.SkeletonEffect = "wave";
3947
+ this.UseBranches = true;
3948
+ this.UseBuildPath = false;
3938
3949
  }
3939
- get DescriptionFormControl() {
3950
+ // Properties
3951
+ get ArtifactLookups() {
3940
3952
  var _a;
3941
- return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.description;
3953
+ return (_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.ArtifactLookups;
3942
3954
  }
3943
- get NameFormControl() {
3944
- var _a;
3945
- return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.name;
3955
+ get ArtifactLookup() {
3956
+ var _a, _b;
3957
+ const artLookup = ((_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.ArtifactLookups)
3958
+ ? (_b = this.DevOpsAction) === null || _b === void 0 ? void 0 : _b.ArtifactLookups[0]
3959
+ : null;
3960
+ return artLookup;
3946
3961
  }
3947
- get RouteFormControl() {
3948
- var _a;
3949
- return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.route;
3962
+ get Artifact() {
3963
+ var _a, _b;
3964
+ return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts) && this.ArtifactLookup
3965
+ ? ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts[this.ArtifactLookup]) || {}
3966
+ : {};
3950
3967
  }
3951
- get State() {
3952
- return this.eacSvc.State;
3968
+ get BranchesFormControl() {
3969
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
3953
3970
  }
3954
- ngOnInit() {
3955
- this.setupApplicationForm();
3971
+ get BuildPathFormControl() {
3972
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'buildPath');
3956
3973
  }
3957
- SubmitApplicationControl() {
3958
- console.log("application form: ", this.ApplicationFormGroup.value);
3959
- this.SaveApplication();
3974
+ get DevOpsActionLookups() {
3975
+ // console.log(this.DevOpsActions);
3976
+ return Object.keys(this.DevOpsActions || {});
3960
3977
  }
3961
- SaveApplication() {
3962
- var _a, _b;
3963
- const app = this.EditingApplication;
3964
- // console.log("APP=", app);
3965
- app.Application = {
3966
- Name: this.NameFormControl.value,
3967
- Description: this.DescriptionFormControl.value,
3968
- PriorityShift: ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Application) === null || _b === void 0 ? void 0 : _b.PriorityShift) || 0,
3969
- };
3970
- app.LookupConfig.PathRegex = `${this.RouteFormControl.value}.*`;
3971
- switch (app.Processor.Type) {
3972
- case 'DFS':
3973
- app.Processor.BaseHref = `${this.RouteFormControl.value}/`.replace('//', '/');
3974
- break;
3975
- }
3976
- if (!app.LookupConfig.PathRegex.startsWith('/')) {
3977
- app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
3978
- }
3979
- const saveAppReq = {
3980
- ProjectLookup: this.ProjectLookup,
3981
- Application: app,
3982
- ApplicationLookup: this.ApplicationLookup,
3983
- };
3984
- console.log("processor details being submitted: ", app.Processor);
3985
- this.eacSvc.SaveApplicationAsCode(saveAppReq).then(res => {
3986
- this.SaveFormEvent.emit(res);
3987
- });
3978
+ get DevOpsAction() {
3979
+ return this.Environment.DevOpsActions && this.DevOpsActionLookup
3980
+ ? this.Environment.DevOpsActions[this.DevOpsActionLookup] || {}
3981
+ : {};
3988
3982
  }
3989
- //HELPERS
3990
- setupApplicationForm() {
3983
+ get DevOpsActionLookup() {
3991
3984
  var _a, _b, _c;
3992
- if (this.EditingApplication != null) {
3993
- this.ApplicationFormGroup = this.formBldr.group({
3994
- name: [(_a = this.EditingApplication.Application) === null || _a === void 0 ? void 0 : _a.Name, Validators.required],
3995
- description: [
3996
- (_b = this.EditingApplication.Application) === null || _b === void 0 ? void 0 : _b.Description,
3997
- Validators.required,
3998
- ],
3999
- route: [this.CurrentRoute ? this.CurrentRoute :
4000
- ((_c = this.EditingApplication.LookupConfig) === null || _c === void 0 ? void 0 : _c.PathRegex.replace('.*', '')) ||
4001
- '/',
4002
- Validators.required,],
4003
- // priority: [
4004
- // this.EditingApplication.Application?.Priority || 10000,
4005
- // Validators.required,
4006
- // ],
4007
- });
3985
+ if (!!((_a = this.DevOpsActionLookupFormControl) === null || _a === void 0 ? void 0 : _a.value)) {
3986
+ return this.DevOpsActionLookupFormControl.value;
3987
+ }
3988
+ if (!!((_b = this.EditingSourceControl) === null || _b === void 0 ? void 0 : _b.DevOpsActionTriggerLookups)) {
3989
+ return (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.DevOpsActionTriggerLookups[0];
3990
+ }
3991
+ else {
3992
+ return null;
4008
3993
  }
4009
3994
  }
4010
- }
4011
- 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 });
4012
- 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"] }] });
4013
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationFormComponent, decorators: [{
4014
- type: Component,
4015
- 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"] }]
4016
- }], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: EaCService }]; }, propDecorators: { ApplicationLookup: [{
4017
- type: Input,
4018
- args: ['application-lookup']
4019
- }], CurrentRoute: [{
4020
- type: Input,
4021
- args: ['current-route']
4022
- }], EditingApplication: [{
4023
- type: Input,
4024
- args: ['editing-application']
4025
- }], HasSaveButton: [{
4026
- type: Input,
4027
- args: ['has-save-button']
4028
- }], ProjectLookup: [{
4029
- type: Input,
4030
- args: ['project-lookup']
4031
- }], SaveFormEvent: [{
4032
- type: Output,
4033
- args: ['save-form-event']
4034
- }] } });
4035
-
4036
- class ProcessorDetailsFormComponent {
4037
- constructor(appsFlowSvc, formBldr, eacSvc) {
4038
- this.appsFlowSvc = appsFlowSvc;
4039
- this.formBldr = formBldr;
4040
- this.eacSvc = eacSvc;
4041
- this.redirectTooltip = '';
4042
- this.HasSaveButton = true;
4043
- this.SaveFormEvent = new EventEmitter();
4044
- }
4045
- get APIRootFormControl() {
4046
- var _a;
4047
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.apiRoot;
3995
+ get DevOpsActionLookupFormControl() {
3996
+ return this.DevOpsSourceControlFormGroup.get('devOpsActionLookup');
4048
3997
  }
4049
- get Environment() {
4050
- var _a, _b, _c, _d, _e;
4051
- return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[(_e = (_d = (_c = this.State) === null || _c === void 0 ? void 0 : _c.EaC) === null || _d === void 0 ? void 0 : _d.Enterprise) === null || _e === void 0 ? void 0 : _e.PrimaryEnvironment];
3998
+ get DevOpsActions() {
3999
+ return this.Environment.DevOpsActions || {};
4052
4000
  }
4053
- get BuildFormControl() {
4054
- var _a;
4055
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.build;
4001
+ get EditingSourceControl() {
4002
+ var _a, _b;
4003
+ let sc = ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources)
4004
+ ? (_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Sources[this.EditingSourceControlLookup]
4005
+ : null;
4006
+ if (sc == null && this.EditingSourceControlLookup) {
4007
+ sc = {};
4008
+ }
4009
+ return sc;
4056
4010
  }
4057
- get BuildPathFormControl() {
4058
- var _a;
4059
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.buildPath;
4011
+ get MainBranchFormControl() {
4012
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'mainBranch');
4060
4013
  }
4061
- get ClientIDFormControl() {
4062
- var _a;
4063
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientId;
4014
+ get OrganizationFormControl() {
4015
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'organization');
4064
4016
  }
4065
- get ClientSecretFormControl() {
4066
- var _a;
4067
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientSecret;
4017
+ get RepositoryFormControl() {
4018
+ return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'repository');
4068
4019
  }
4069
- get DefaultFileFormControl() {
4070
- var _a;
4071
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.defaultFile;
4020
+ get State() {
4021
+ return this.eacSvc.State;
4072
4022
  }
4073
- get DefaultSourceControl() {
4074
- var _a, _b, _c, _d;
4075
- return {
4076
- Organization: (_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Organization,
4077
- Repository: (_d = (_c = this.EditingApplication) === null || _c === void 0 ? void 0 : _c.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Repository,
4078
- };
4023
+ // Life Cycle
4024
+ ngAfterViewInit() { }
4025
+ ngOnDestroy() {
4026
+ this.destroyFormControls();
4079
4027
  }
4080
- get InboundPathFormControl() {
4081
- var _a;
4082
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.inboundPath;
4028
+ ngOnInit() {
4029
+ console.log("source control lookup", this.EditingSourceControlLookup);
4030
+ if (this.EditingSourceControlLookup === null) {
4031
+ this.CreateNewSourceControl();
4032
+ }
4033
+ console.log("source control", this.EditingSourceControl);
4034
+ if (this.EditingSourceControl != null) {
4035
+ this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
4036
+ this.setupFormControls();
4037
+ }
4038
+ this.RefreshOrganizations();
4083
4039
  }
4084
- get IncludeRequestFormControl() {
4085
- var _a;
4086
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.includeRequest;
4040
+ // API Methods
4041
+ AddBranchOption(event) {
4042
+ this.addBranchOption(event.value);
4043
+ event.input.value = '';
4087
4044
  }
4088
- get MethodsFormControl() {
4089
- var _a;
4090
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.methods;
4045
+ BranchOptionSelected(event) {
4046
+ this.addBranchOption(event.option.value);
4091
4047
  }
4092
- get PackageFormControl() {
4093
- var _a;
4094
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.package;
4048
+ BranchesChanged(branches) {
4049
+ this.loadProjectHostingDetails();
4095
4050
  }
4096
- get PermanentFormControl() {
4097
- var _a;
4098
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.permanent;
4051
+ BuildPathChanged(event) {
4052
+ //do something??
4099
4053
  }
4100
- get PreserveMethodFormControl() {
4101
- var _a;
4102
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.preserveMethod;
4054
+ CreateNewSourceControl() {
4055
+ this.SetEditingSourceControl(Guid.CreateRaw());
4103
4056
  }
4104
- get RedirectFormControl() {
4105
- var _a;
4106
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.redirect;
4057
+ CreateRepository() {
4058
+ this.CreatingRepository = true;
4059
+ this.RepositoryFormControl.reset();
4107
4060
  }
4108
- get ScopesFormControl() {
4109
- var _a;
4110
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.scopes;
4061
+ CancelCreateRepository() {
4062
+ this.CreatingRepository = false;
4111
4063
  }
4112
- get SecurityFormControl() {
4113
- var _a;
4114
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.security;
4064
+ DevOpsActionLookupChanged(event) {
4065
+ this.configureDevOpsAction();
4115
4066
  }
4116
- get State() {
4117
- return this.eacSvc.State;
4067
+ MainBranchChanged(event) {
4068
+ this.emitBranchesChanged();
4118
4069
  }
4119
- get SourceControls() {
4120
- var _a;
4121
- return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources) || {};
4070
+ OrganizationChanged(event) {
4071
+ const org = this.OrganizationFormControl;
4072
+ this.RepositoryFormControl.reset();
4073
+ if (this.UseBranches) {
4074
+ this.BranchesFormControl.reset();
4075
+ this.SelectedBranches = [];
4076
+ }
4077
+ this.listRepositories();
4122
4078
  }
4123
- get SourceControlFormControl() {
4124
- var _a;
4125
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.sourceControl;
4079
+ RefreshOrganizations() {
4080
+ var _a, _b, _c;
4081
+ // this.Loading = true;
4082
+ this.listOrganizations();
4083
+ (_a = this.OrganizationFormControl) === null || _a === void 0 ? void 0 : _a.reset();
4084
+ (_b = this.RepositoryFormControl) === null || _b === void 0 ? void 0 : _b.reset();
4085
+ if (this.UseBranches) {
4086
+ (_c = this.BranchesFormControl) === null || _c === void 0 ? void 0 : _c.reset();
4087
+ }
4126
4088
  }
4127
- get SPARootFormControl() {
4128
- var _a;
4129
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.spaRoot;
4089
+ RemoveBranchOption(option) {
4090
+ const index = this.SelectedBranches.indexOf(option);
4091
+ if (index >= 0) {
4092
+ this.SelectedBranches.splice(index, 1);
4093
+ }
4094
+ this.emitBranchesChanged();
4130
4095
  }
4131
- get TokenLookupFormControl() {
4132
- var _a;
4133
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.tokenLookup;
4096
+ RepositoryChanged(event) {
4097
+ const repo = this.RepositoryFormControl;
4098
+ if (this.UseBranches) {
4099
+ this.BranchesFormControl.reset();
4100
+ this.SelectedBranches = [];
4101
+ this.listBranches();
4102
+ }
4103
+ if (!this.UseBranches) {
4104
+ this.listBuildPaths();
4105
+ }
4134
4106
  }
4135
- get ValidFormControls() {
4136
- let vfc = new Array();
4137
- for (const field in this.ProcessorDetailsFormGroup.controls) {
4138
- const control = this.ProcessorDetailsFormGroup.get(field);
4139
- if (control.valid) {
4140
- vfc.push(control);
4107
+ SaveRepository() {
4108
+ this.Loading = true;
4109
+ const org = this.OrganizationFormControl.value;
4110
+ const repoName = this.RepositoryFormControl.value;
4111
+ this.appsFlowSvc
4112
+ .CreateRepository(org, repoName)
4113
+ .subscribe((response) => {
4114
+ if (response.Status.Code === 0) {
4115
+ this.listRepositories(repoName);
4116
+ this.CreatingRepository = false;
4141
4117
  }
4142
- }
4143
- // console.log("VFC=", vfc)
4144
- return vfc;
4118
+ else {
4119
+ // TODO: Need to surface an error to the user...
4120
+ this.Loading = false;
4121
+ }
4122
+ });
4145
4123
  }
4146
- get VersionFormControl() {
4147
- var _a;
4148
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.version;
4124
+ SetEditingSourceControl(scLookup) {
4125
+ this.EditingSourceControlLookup = scLookup;
4149
4126
  }
4150
- get ZipFileFormControl() {
4151
- var _a;
4152
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.zipFile;
4127
+ SubmitSourceControl() {
4128
+ console.log('source control submitted: ', this.DevOpsSourceControlFormGroup.value);
4129
+ this.SaveSourceControl();
4153
4130
  }
4154
- ngOnInit() {
4155
- if (!this.EditingApplication) {
4156
- this.CreateNewApplication();
4157
- }
4158
- else {
4159
- this.setupProcessorDetailsForm();
4131
+ SaveSourceControl() {
4132
+ const saveEnvReq = {
4133
+ Environment: Object.assign(Object.assign({}, this.Environment), { Sources: this.Environment.Sources || {} }),
4134
+ EnvironmentLookup: this.EnvironmentLookup,
4135
+ EnterpriseDataTokens: {},
4136
+ };
4137
+ let source = Object.assign(Object.assign({}, this.EditingSourceControl), { Branches: this.SelectedBranches, MainBranch: this.MainBranchFormControl.value });
4138
+ source = Object.assign(Object.assign({}, source), { Type: 'GitHub', Name: `@${this.OrganizationFormControl.value}/${this.RepositoryFormControl.value}`, DevOpsActionTriggerLookups: [this.DevOpsActionLookup], Organization: this.OrganizationFormControl.value, Repository: this.RepositoryFormControl.value });
4139
+ const scLookup = `github://${source.Organization}/${source.Repository}`;
4140
+ saveEnvReq.Environment.Sources[scLookup] = source;
4141
+ console.log('save SC: ', saveEnvReq);
4142
+ let resp = this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
4143
+ resp.then((res) => {
4144
+ this.SaveStatusEvent.emit(res);
4145
+ });
4146
+ }
4147
+ // Helpers
4148
+ addBranchOption(value) {
4149
+ value = (value || '').trim();
4150
+ if (value && this.SelectedBranches.indexOf(value) < 0) {
4151
+ this.SelectedBranches.push(value);
4160
4152
  }
4153
+ this.BranchesInput.nativeElement.blur();
4154
+ this.emitBranchesChanged();
4161
4155
  }
4162
- CreateNewApplication() {
4163
- this.SetEditingApplication(Guid.CreateRaw());
4156
+ configureDevOpsAction() {
4157
+ setTimeout(() => {
4158
+ this.DevOpsActionLookupFormControl.setValue(this.DevOpsActionLookup);
4159
+ }, 0);
4164
4160
  }
4165
- DetermineTooltipText() {
4166
- let permanentValue = this.PermanentFormControl.value;
4167
- let preserveValue = this.PreserveMethodFormControl.value;
4168
- if (permanentValue === true && preserveValue === false) {
4169
- this.redirectTooltip = '301 Permanent and Not Preserve';
4170
- }
4171
- else if (permanentValue === false && preserveValue === false) {
4172
- this.redirectTooltip = '302 Not Permanent and Not Preserve';
4173
- }
4174
- else if (permanentValue === false && preserveValue === true) {
4175
- this.redirectTooltip = '307 – Not Permanent and Preserve';
4161
+ destroyFormControls() {
4162
+ var _a, _b, _c, _d;
4163
+ this.DevOpsSourceControlFormGroup.removeControl([this.SourceControlRoot, 'mainBranch'].join(''));
4164
+ (_a = this.DevOpsSourceControlFormGroup) === null || _a === void 0 ? void 0 : _a.removeControl([this.SourceControlRoot, 'branches'].join(''));
4165
+ (_b = this.DevOpsSourceControlFormGroup) === null || _b === void 0 ? void 0 : _b.removeControl([this.SourceControlRoot, 'buildPath'].join(''));
4166
+ this.SelectedBranches = [];
4167
+ (_c = this.DevOpsSourceControlFormGroup) === null || _c === void 0 ? void 0 : _c.removeControl([this.SourceControlRoot, 'organization'].join(''));
4168
+ (_d = this.DevOpsSourceControlFormGroup) === null || _d === void 0 ? void 0 : _d.removeControl([this.SourceControlRoot, 'repository'].join(''));
4169
+ }
4170
+ emitBranchesChanged() {
4171
+ var _a, _b;
4172
+ if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
4173
+ (!this.MainBranchFormControl.value ||
4174
+ this.SelectedBranches.indexOf(this.MainBranchFormControl.value) < 0)) {
4175
+ this.MainBranchFormControl.setValue(this.SelectedBranches.find((branch) => branch === 'main' || branch === 'master') || this.SelectedBranches[0]);
4176
4176
  }
4177
- else if (permanentValue === true && preserveValue === true) {
4178
- this.redirectTooltip = '308 – Permanent and Preserve';
4177
+ else if (((_b = this.SelectedBranches) === null || _b === void 0 ? void 0 : _b.length) <= 0) {
4178
+ this.MainBranchFormControl.reset();
4179
4179
  }
4180
+ this.BranchesFormControl.setValue(this.SelectedBranches.join(','));
4181
+ this.BranchesChanged(this.SelectedBranches || []);
4180
4182
  }
4181
- SaveProcessorDetails() {
4182
- var _a, _b, _c, _d;
4183
- const app = this.EditingApplication;
4184
- app.LookupConfig.AllowedMethods = (_b = (_a = this.MethodsFormControl) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.split(' ').filter((v) => !!v);
4185
- app.Processor.Type = this.ProcessorType;
4186
- switch (app.Processor.Type) {
4187
- case 'DFS':
4188
- app.Processor.DefaultFile =
4189
- this.DefaultFileFormControl.value || 'index.html';
4190
- app.LowCodeUnit = {
4191
- Type: this.LCUType,
4192
- };
4193
- switch (app.LowCodeUnit.Type) {
4194
- case 'GitHub':
4195
- app.LowCodeUnit.Organization =
4196
- (_c = this.SourceControls[this.SourceControlFormControl.value]) === null || _c === void 0 ? void 0 : _c.Organization;
4197
- app.LowCodeUnit.Repository =
4198
- (_d = this.SourceControls[this.SourceControlFormControl.value]) === null || _d === void 0 ? void 0 : _d.Repository;
4199
- app.LowCodeUnit.Build = this.BuildFormControl.value;
4200
- app.LowCodeUnit.Path = this.BuildPathFormControl.value;
4201
- app.LowCodeUnit.SourceControlLookup =
4202
- this.SourceControlFormControl.value;
4203
- break;
4204
- case 'NPM':
4205
- app.LowCodeUnit.Package = this.PackageFormControl.value;
4206
- app.LowCodeUnit.Version = this.VersionFormControl.value;
4207
- break;
4208
- case 'WordPress':
4209
- app.LowCodeUnit.APIRoot = this.APIRootFormControl.value;
4210
- break;
4211
- case 'Zip':
4212
- app.LowCodeUnit.ZipFile = this.ZipFileFormControl.value;
4213
- break;
4214
- }
4215
- break;
4216
- case 'OAuth':
4217
- app.Processor.Scopes = this.ScopesFormControl.value.split(' ');
4218
- app.Processor.TokenLookup = this.TokenLookupFormControl.value;
4219
- app.LowCodeUnit = {
4220
- Type: this.LCUType,
4221
- };
4222
- switch (app.LowCodeUnit.Type) {
4223
- case 'GitHubOAuth':
4224
- app.LowCodeUnit.ClientID = this.ClientIDFormControl.value;
4225
- app.LowCodeUnit.ClientSecret = this.ClientSecretFormControl.value;
4226
- break;
4183
+ listBranches() {
4184
+ if (this.UseBranches) {
4185
+ this.Loading = true;
4186
+ this.appsFlowSvc
4187
+ .ListBranches(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
4188
+ .subscribe((response) => {
4189
+ var _a, _b, _c;
4190
+ this.BranchOptions = response.Model;
4191
+ this.Loading = false;
4192
+ if (((_b = (_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Branches) === null || _b === void 0 ? void 0 : _b.length) > 0) {
4193
+ this.SelectedBranches = this.EditingSourceControl.Branches;
4227
4194
  }
4228
- break;
4229
- case 'Proxy':
4230
- app.Processor.InboundPath = this.InboundPathFormControl.value;
4231
- app.LowCodeUnit = {
4232
- Type: this.LCUType,
4233
- };
4234
- switch (app.LowCodeUnit.Type) {
4235
- case 'API':
4236
- app.LowCodeUnit.APIRoot = this.APIRootFormControl.value;
4237
- app.LowCodeUnit.Security = this.SecurityFormControl.value;
4238
- break;
4239
- case 'SPA':
4240
- app.LowCodeUnit.SPARoot = this.SPARootFormControl.value;
4241
- break;
4195
+ else if (((_c = this.BranchOptions) === null || _c === void 0 ? void 0 : _c.length) === 1) {
4196
+ this.BranchesFormControl.setValue(this.BranchOptions[0].Name);
4197
+ this.SelectedBranches = [this.BranchOptions[0].Name];
4242
4198
  }
4243
- break;
4244
- case 'Redirect':
4245
- app.Processor.IncludeRequest = !!this.IncludeRequestFormControl.value;
4246
- app.Processor.Permanent = !!this.PermanentFormControl.value;
4247
- app.Processor.PreserveMethod = !!this.PreserveMethodFormControl.value;
4248
- app.Processor.Redirect = this.RedirectFormControl.value;
4249
- break;
4250
- }
4251
- if (!app.LookupConfig.PathRegex.startsWith('/')) {
4252
- app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
4199
+ this.emitBranchesChanged();
4200
+ this.listBuildPaths();
4201
+ });
4253
4202
  }
4254
- const saveAppReq = {
4255
- ProjectLookup: this.ProjectLookup,
4256
- Application: app,
4257
- ApplicationLookup: this.EditingApplicationLookup || Guid.CreateRaw(),
4258
- };
4259
- this.eacSvc.SaveApplicationAsCode(saveAppReq).then((res) => {
4260
- this.SaveFormEvent.emit(res);
4261
- });
4262
- }
4263
- SetEditingApplication(appLookup) {
4264
- this.EditingApplication = new EaCApplicationAsCode();
4265
- this.EditingApplicationLookup = appLookup;
4266
- this.setupProcessorDetailsForm();
4267
- }
4268
- SourceControlChanged(event) {
4269
- this.listBuildPaths();
4270
- }
4271
- ProcessorTypeChanged(event) {
4272
- this.ProcessorType = event.value;
4273
- this.setupProcessorTypeSubForm();
4274
- }
4275
- LCUTypeChanged(event) {
4276
- this.LCUType = event.value;
4277
- this.setupLcuTypeSubForm();
4278
- }
4279
- //HELPERS
4280
- cleanupLcuTypeSubForm() {
4281
- this.ProcessorDetailsFormGroup.removeControl('methods');
4282
- this.ProcessorDetailsFormGroup.removeControl('apiRoot');
4283
- this.ProcessorDetailsFormGroup.removeControl('security');
4284
- this.ProcessorDetailsFormGroup.removeControl('spaRoot');
4285
- this.ProcessorDetailsFormGroup.removeControl('applicationId');
4286
- this.ProcessorDetailsFormGroup.removeControl('sourceControl');
4287
- this.ProcessorDetailsFormGroup.removeControl('build');
4288
- this.ProcessorDetailsFormGroup.removeControl('clientId');
4289
- this.ProcessorDetailsFormGroup.removeControl('clientSecret');
4290
- this.ProcessorDetailsFormGroup.removeControl('package');
4291
- this.ProcessorDetailsFormGroup.removeControl('version');
4292
- this.ProcessorDetailsFormGroup.removeControl('zipFile');
4293
- }
4294
- cleanupProcessorTypeSubForm() {
4295
- this.ProcessorDetailsFormGroup.removeControl('defaultFile');
4296
- // this.ApplicationFormGroup.removeControl('dfsLcuType');
4297
- // this.ApplicationFormGroup.removeControl('oauthLcuType');
4298
- this.ProcessorDetailsFormGroup.removeControl('scopes');
4299
- this.ProcessorDetailsFormGroup.removeControl('tokenLookup');
4300
- this.ProcessorDetailsFormGroup.removeControl('inboundPath');
4301
- this.ProcessorDetailsFormGroup.removeControl('proxyLcuType');
4302
- this.ProcessorDetailsFormGroup.removeControl('includeRequest');
4303
- this.ProcessorDetailsFormGroup.removeControl('redirect');
4304
- this.ProcessorDetailsFormGroup.removeControl('permanent');
4305
- this.ProcessorDetailsFormGroup.removeControl('preserveMethod');
4306
- this.cleanupLcuTypeSubForm();
4307
4203
  }
4308
4204
  listBuildPaths() {
4309
- var _a, _b;
4310
- this.State.Loading = true;
4311
- console.log("Source Control: ", this.SourceControls[this.SourceControlFormControl.value]);
4205
+ if (this.UseBuildPath) {
4206
+ this.Loading = true;
4207
+ this.appsFlowSvc
4208
+ .ListBuildPaths(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
4209
+ .subscribe((response) => {
4210
+ var _a;
4211
+ this.BuildPathOptions = response.Model;
4212
+ this.Loading = false;
4213
+ if (((_a = this.BuildPathOptions) === null || _a === void 0 ? void 0 : _a.length) === 1) {
4214
+ this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
4215
+ }
4216
+ });
4217
+ }
4218
+ }
4219
+ listOrganizations() {
4220
+ this.Loading = true;
4312
4221
  this.appsFlowSvc
4313
- .ListBuildPaths((_a = this.SourceControls[this.SourceControlFormControl.value]) === null || _a === void 0 ? void 0 : _a.Organization, (_b = this.SourceControls[this.SourceControlFormControl.value]) === null || _b === void 0 ? void 0 : _b.Repository)
4222
+ .ListOrganizations()
4314
4223
  .subscribe((response) => {
4315
- this.BuildPathOptions = response.Model;
4316
- console.log("build path options: ", this.BuildPathOptions);
4317
- this.State.Loading = false;
4318
- // if (this.BuildPathOptions?.length === 1) {
4319
- // this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
4320
- // }
4224
+ var _a;
4225
+ this.OrganizationOptions = response.Model;
4226
+ console.log("Organization Options: ", this.OrganizationOptions);
4227
+ this.Loading = false;
4228
+ if ((_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Organization) {
4229
+ setTimeout(() => {
4230
+ var _a;
4231
+ this.OrganizationFormControl.setValue(this.EditingSourceControl.Organization);
4232
+ this.listRepositories((_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Repository);
4233
+ }, 0);
4234
+ }
4321
4235
  });
4322
4236
  }
4323
- setupLcuTypeSubForm() {
4324
- this.cleanupLcuTypeSubForm();
4325
- if (this.LCUType) {
4326
- switch (this.LCUType) {
4327
- case 'API':
4328
- this.setupLCUAPIForm();
4329
- break;
4330
- case 'ApplicationPointer':
4331
- this.setupLCUApplicationPointerForm();
4332
- break;
4333
- case 'GitHub':
4334
- this.setupLCUGitHubForm();
4335
- break;
4336
- case 'GitHubOAuth':
4337
- this.setupLCUGitHubOAuthForm();
4338
- break;
4339
- case 'WordPress':
4340
- this.setupLCUWordPressForm();
4341
- break;
4342
- // case 'NPM':
4343
- // this.setupLCUNPMForm();
4344
- // break;
4345
- case 'SPA':
4346
- this.setupLCUSPAForm();
4347
- break;
4348
- case 'Zip':
4349
- this.setupLCUZipForm();
4350
- break;
4237
+ listRepositories(activeRepo = null) {
4238
+ this.Loading = true;
4239
+ this.appsFlowSvc
4240
+ .ListRepositories(this.OrganizationFormControl.value)
4241
+ .subscribe((response) => {
4242
+ var _a;
4243
+ this.RepositoryOptions = response.Model;
4244
+ this.Loading = false;
4245
+ if (activeRepo) {
4246
+ setTimeout(() => {
4247
+ this.RepositoryFormControl.setValue(activeRepo);
4248
+ this.listBranches();
4249
+ if (!this.UseBranches) {
4250
+ this.listBuildPaths();
4251
+ }
4252
+ }, 0);
4351
4253
  }
4352
- }
4254
+ else if (((_a = this.RepositoryOptions) === null || _a === void 0 ? void 0 : _a.length) <= 0) {
4255
+ this.CreatingRepository = true;
4256
+ }
4257
+ });
4353
4258
  }
4354
- setupProcessorDetailsForm() {
4355
- var _a, _b;
4356
- this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
4357
- // console.log('EDITING APP = ', this.EditingApplication);
4358
- if (this.EditingApplication != null) {
4359
- this.ProcessorDetailsFormGroup = this.formBldr.group({
4360
- procType: [this.ProcessorType, [Validators.required]],
4259
+ loadProjectHostingDetails() {
4260
+ var _a;
4261
+ if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0) {
4262
+ this.HostingDetails.Loading = true;
4263
+ this.appsFlowSvc
4264
+ .LoadProjectHostingDetails()
4265
+ .subscribe((response) => {
4266
+ this.HostingDetails = response.Model;
4267
+ this.HostingDetails.Loading = false;
4268
+ this.configureDevOpsAction();
4269
+ }, (err) => {
4270
+ this.HostingDetails.Loading = false;
4361
4271
  });
4362
- // this.setupDfsForm();
4363
- // this.setupLcuTypeSubForm();
4364
- this.setupProcessorTypeSubForm();
4365
4272
  }
4366
4273
  }
4367
- setupLCUGitHubForm() {
4368
- var _a, _b, _c;
4369
- console.log('EditingApplication: ', this.EditingApplication);
4370
- this.ProcessorDetailsFormGroup.addControl('sourceControl', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SourceControlLookup) || '', [Validators.required]));
4371
- this.ProcessorDetailsFormGroup.addControl('buildPath', this.formBldr.control(((_b = this.EditingApplication.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Path) || '', [
4372
- Validators.required,
4373
- ]));
4374
- this.ProcessorDetailsFormGroup.addControl('build', this.formBldr.control(((_c = this.EditingApplication.LowCodeUnit) === null || _c === void 0 ? void 0 : _c.Build) || 'latest', [Validators.required]));
4375
- this.listBuildPaths();
4274
+ setupFormControls() {
4275
+ var _a, _b, _c, _d, _e, _f, _g;
4276
+ this.destroyFormControls();
4277
+ console.log("Source Control: ", this.EditingSourceControl);
4278
+ this.DevOpsSourceControlFormGroup.addControl('devOpsActionLookup', new FormControl(this.DevOpsActionLookup || '', []));
4279
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'organization'].join(''), new FormControl((_a = this.EditingSourceControl.Organization) !== null && _a !== void 0 ? _a : '', Validators.required));
4280
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'repository'].join(''), new FormControl((_b = this.EditingSourceControl.Repository) !== null && _b !== void 0 ? _b : '', Validators.required));
4281
+ if (this.UseBranches) {
4282
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'branches'].join(''), new FormControl((_d = (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.Branches) !== null && _d !== void 0 ? _d : '', Validators.required));
4283
+ this.SelectedBranches = (_e = this.EditingSourceControl) === null || _e === void 0 ? void 0 : _e.Branches;
4284
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'mainBranch'].join(''), new FormControl((_f = this.EditingSourceControl.MainBranch) !== null && _f !== void 0 ? _f : '', Validators.required));
4285
+ }
4286
+ if (this.UseBuildPath) {
4287
+ this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'buildPath'].join(''), new FormControl((_g = this.BuildPath) !== null && _g !== void 0 ? _g : '', Validators.required));
4288
+ }
4376
4289
  }
4377
- setupLCUApplicationPointerForm() {
4378
- var _a;
4379
- this.ProcessorDetailsFormGroup.addControl('applicationId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ApplicationID) || '', [Validators.required]));
4290
+ }
4291
+ 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 });
4292
+ 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'\" \n [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"] }] });
4293
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DevopsSourceControlFormComponent, decorators: [{
4294
+ type: Component,
4295
+ 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'\" \n [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"] }]
4296
+ }], ctorParameters: function () { return [{ type: ApplicationsFlowService }, { type: EaCService }, { type: i1$2.FormBuilder }]; }, propDecorators: { EditingSourceControlLookup: [{
4297
+ type: Input,
4298
+ args: ['editing-source-control-lookup']
4299
+ }], Environment: [{
4300
+ type: Input,
4301
+ args: ['environment']
4302
+ }], EnvironmentLookup: [{
4303
+ type: Input,
4304
+ args: ['environment-lookup']
4305
+ }], SaveStatusEvent: [{
4306
+ type: Output,
4307
+ args: ['save-status-event']
4308
+ }], BranchesInput: [{
4309
+ type: ViewChild,
4310
+ args: ['branches']
4311
+ }] } });
4312
+
4313
+ class SourceControlDialogComponent {
4314
+ constructor(dialogRef, eacSvc, data, snackBar) {
4315
+ this.dialogRef = dialogRef;
4316
+ this.eacSvc = eacSvc;
4317
+ this.data = data;
4318
+ this.snackBar = snackBar;
4380
4319
  }
4381
- setupLCUSPAForm() {
4320
+ get DevOpsSourceControlFormGroup() {
4382
4321
  var _a;
4383
- this.ProcessorDetailsFormGroup.addControl('spaRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SPARoot) || '', [Validators.required]));
4322
+ return (_a = this.DevopsSourceControl) === null || _a === void 0 ? void 0 : _a.DevOpsSourceControlFormGroup;
4384
4323
  }
4385
- setupLCUAPIForm() {
4386
- var _a, _b, _c, _d;
4387
- this.ProcessorDetailsFormGroup.addControl('methods', this.formBldr.control(((_b = (_a = this.EditingApplication.LookupConfig) === null || _a === void 0 ? void 0 : _a.AllowedMethods) === null || _b === void 0 ? void 0 : _b.join(' ')) || '', []));
4388
- this.ProcessorDetailsFormGroup.addControl('apiRoot', this.formBldr.control(((_c = this.EditingApplication.LowCodeUnit) === null || _c === void 0 ? void 0 : _c.APIRoot) || '', [Validators.required]));
4389
- this.ProcessorDetailsFormGroup.addControl('security', this.formBldr.control(((_d = this.EditingApplication.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Security) || '', [Validators.required]));
4324
+ get HasConnection() {
4325
+ return this.State.GitHub.HasConnection;
4390
4326
  }
4391
- setupLCUGitHubOAuthForm() {
4392
- var _a, _b;
4393
- this.ProcessorDetailsFormGroup.addControl('clientId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ClientID) || '', [Validators.required]));
4394
- this.ProcessorDetailsFormGroup.addControl('clientSecret', this.formBldr.control(((_b = this.EditingApplication.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.ClientSecret) || '', [Validators.required]));
4327
+ get State() {
4328
+ return this.eacSvc.State;
4395
4329
  }
4396
- setupLCUWordPressForm() {
4397
- var _a;
4398
- this.ProcessorDetailsFormGroup.addControl('apiRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.APIRoot) || '', [Validators.required]));
4330
+ ngOnInit() {
4399
4331
  }
4400
- setupProxyForm() {
4401
- var _a, _b;
4402
- this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
4403
- this.ProcessorDetailsFormGroup.addControl('inboundPath', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.InboundPath) || '', [Validators.required]));
4404
- this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
4332
+ CloseDialog() {
4333
+ this.dialogRef.close();
4405
4334
  }
4406
- setupRedirectForm() {
4407
- var _a, _b, _c, _d;
4408
- this.ProcessorDetailsFormGroup.addControl('redirect', this.formBldr.control(((_a = this.EditingApplication.Processor) === null || _a === void 0 ? void 0 : _a.Redirect) || '', [
4409
- Validators.required,
4410
- ]));
4411
- this.ProcessorDetailsFormGroup.addControl('permanent', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.Permanent) || false, []));
4412
- this.ProcessorDetailsFormGroup.addControl('preserveMethod', this.formBldr.control(((_c = this.EditingApplication.Processor) === null || _c === void 0 ? void 0 : _c.PreserveMethod) || false, []));
4413
- this.ProcessorDetailsFormGroup.addControl('includeRequest', this.formBldr.control(((_d = this.EditingApplication.Processor) === null || _d === void 0 ? void 0 : _d.IncludeRequest) || false, []));
4414
- this.DetermineTooltipText();
4335
+ HandleSaveStatusEvent(event) {
4336
+ console.log("event to save: ", event);
4337
+ if (event.Code === 0) {
4338
+ this.snackBar.open("Source Control Succesfully Saved", "Dismiss", {
4339
+ duration: 5000
4340
+ });
4341
+ this.CloseDialog();
4342
+ }
4343
+ else {
4344
+ this.ErrorMessage = event.Message;
4345
+ }
4415
4346
  }
4416
- setupOAuthForm() {
4417
- var _a, _b, _c, _d;
4418
- this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
4419
- this.ProcessorDetailsFormGroup.addControl('scopes', this.formBldr.control(((_c = (_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.Scopes) === null || _c === void 0 ? void 0 : _c.Join(' ')) || '', [Validators.required]));
4420
- this.ProcessorDetailsFormGroup.addControl('tokenLookup', this.formBldr.control(((_d = this.EditingApplication.Processor) === null || _d === void 0 ? void 0 : _d.TokenLookup) || '', [Validators.required]));
4421
- this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
4422
- }
4423
- setupLCUZipForm() {
4424
- var _a;
4425
- this.ProcessorDetailsFormGroup.addControl('zipFile', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ZipFile) || '', [Validators.required]));
4426
- }
4427
- setupDfsForm() {
4428
- var _a, _b;
4429
- this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
4430
- this.ProcessorDetailsFormGroup.addControl('defaultFile', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.DefaultFile) || 'index.html', [Validators.required]));
4431
- this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
4432
- }
4433
- setupProcessorTypeSubForm() {
4434
- this.cleanupProcessorTypeSubForm();
4435
- if (this.ProcessorType) {
4436
- switch (this.ProcessorType) {
4437
- case 'DFS':
4438
- this.setupDfsForm();
4439
- break;
4440
- case 'OAuth':
4441
- this.setupOAuthForm();
4442
- break;
4443
- case 'Proxy':
4444
- this.setupProxyForm();
4445
- break;
4446
- case 'Redirect':
4447
- this.setupRedirectForm();
4448
- break;
4449
- }
4450
- }
4451
- this.setupLcuTypeSubForm();
4347
+ SaveSourceControl() {
4348
+ this.DevopsSourceControl.SaveSourceControl();
4452
4349
  }
4453
4350
  }
4454
- 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 });
4455
- 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: i5$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"] }] });
4456
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ProcessorDetailsFormComponent, decorators: [{
4351
+ SourceControlDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, deps: [{ token: i2$3.MatDialogRef }, { token: EaCService }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
4352
+ 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$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$3.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$3.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"] }] });
4353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, decorators: [{
4457
4354
  type: Component,
4458
- 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"] }]
4459
- }], ctorParameters: function () { return [{ type: ApplicationsFlowService }, { type: i1$2.FormBuilder }, { type: EaCService }]; }, propDecorators: { EditingApplication: [{
4460
- type: Input,
4461
- args: ['editing-application']
4462
- }], EditingApplicationLookup: [{
4463
- type: Input,
4464
- args: ['editing-application-lookup']
4465
- }], HasSaveButton: [{
4466
- type: Input,
4467
- args: ['has-save-button']
4468
- }], SourceControlLookups: [{
4469
- type: Input,
4470
- args: ['source-control-lookups']
4471
- }], ProjectLookup: [{
4472
- type: Input,
4473
- args: ['project-lookup']
4474
- }], SaveFormEvent: [{
4475
- type: Output,
4476
- args: ['save-form-event']
4355
+ 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"] }]
4356
+ }], ctorParameters: function () {
4357
+ return [{ type: i2$3.MatDialogRef }, { type: EaCService }, { type: undefined, decorators: [{
4358
+ type: Inject,
4359
+ args: [MAT_DIALOG_DATA]
4360
+ }] }, { type: i3$1.MatSnackBar }];
4361
+ }, propDecorators: { DevopsSourceControl: [{
4362
+ type: ViewChild,
4363
+ args: [DevopsSourceControlFormComponent]
4477
4364
  }] } });
4478
4365
 
4479
- class NewApplicationDialogComponent {
4480
- constructor(eacSvc, dialogRef, data, snackBar) {
4366
+ class MainFeedCardComponent {
4367
+ constructor(eacSvc, dialog, sanitizer) {
4481
4368
  this.eacSvc = eacSvc;
4482
- this.dialogRef = dialogRef;
4483
- this.data = data;
4484
- this.snackBar = snackBar;
4485
- this.HasSaveButton = false;
4369
+ this.dialog = dialog;
4370
+ this.sanitizer = sanitizer;
4486
4371
  }
4487
- get Environment() {
4372
+ get ActiveEnvironment() {
4488
4373
  var _a, _b;
4489
- return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[this.data.environmentLookup];
4374
+ return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[this.ActiveEnvironmentLookup];
4490
4375
  }
4491
- get SourceControls() {
4492
- var _a;
4493
- return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources) || {};
4376
+ get ActiveEnvironmentLookup() {
4377
+ var _a, _b;
4378
+ // TODO: Eventually support multiple environments
4379
+ const envLookups = Object.keys(((_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments) || {});
4380
+ return envLookups[0];
4494
4381
  }
4495
- get SourceControlLookups() {
4496
- return Object.keys(this.Environment.Sources || {});
4382
+ get Environment() {
4383
+ var _a, _b, _c, _d, _e;
4384
+ // console.log("Ent Environment var: ", this.State?.EaC?.Environments[this.State?.EaC?.Enterprise?.PrimaryEnvironment]);
4385
+ return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[(_e = (_d = (_c = this.State) === null || _c === void 0 ? void 0 : _c.EaC) === null || _d === void 0 ? void 0 : _d.Enterprise) === null || _e === void 0 ? void 0 : _e.PrimaryEnvironment];
4386
+ }
4387
+ get Icon() {
4388
+ if (this.FeedItem.Status.Code === 0) {
4389
+ return 'check_circle';
4390
+ }
4391
+ else if (this.FeedItem.Status.Code === 1) {
4392
+ return 'cancel';
4393
+ }
4394
+ else if (this.FeedItem.Status.Code === 2) {
4395
+ return 'sync';
4396
+ }
4397
+ else {
4398
+ return 'help_outline';
4399
+ }
4400
+ }
4401
+ get IconColor() {
4402
+ if (this.FeedItem.Status.Code === 0) {
4403
+ return 'green';
4404
+ }
4405
+ else if (this.FeedItem.Status.Code === 1) {
4406
+ return 'red';
4407
+ }
4408
+ else if (this.FeedItem.Status.Code === 2) {
4409
+ return 'blue';
4410
+ }
4411
+ else {
4412
+ return 'gray';
4413
+ }
4497
4414
  }
4498
4415
  get State() {
4499
4416
  return this.eacSvc.State;
4500
4417
  }
4418
+ // Life Cycle
4501
4419
  ngOnInit() {
4502
- this.SetupApplication(Guid.CreateRaw());
4503
- }
4504
- CloseDialog() {
4505
- this.dialogRef.close();
4420
+ this.handleRefresh();
4506
4421
  }
4507
- SetupApplication(appLookup) {
4508
- this.NewApplication = new EaCApplicationAsCode;
4509
- this.NewApplicationLookup = appLookup;
4422
+ // API Methods
4423
+ CalculateTimelapse(timestamp) {
4424
+ return moment(timestamp).fromNow();
4510
4425
  }
4511
- SaveApplication() {
4512
- var _a, _b;
4513
- const app = {
4514
- Application: {
4515
- Name: this.ApplicationFormControls.NameFormControl.value,
4516
- Description: this.ApplicationFormControls.DescriptionFormControl.value,
4517
- PriorityShift: 0,
4518
- },
4519
- AccessRightLookups: [],
4520
- DataTokens: {},
4521
- LicenseConfigurationLookups: [],
4522
- LookupConfig: {
4523
- IsPrivate: false,
4524
- IsTriggerSignIn: false,
4525
- PathRegex: `${this.ApplicationFormControls.RouteFormControl.value}.*`,
4526
- QueryRegex: '',
4527
- HeaderRegex: '',
4528
- AllowedMethods: (_b = (_a = this.ProcessorDetailsFormControls.MethodsFormControl) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.split(' ').filter((v) => !!v),
4529
- },
4530
- Processor: {
4531
- Type: this.ProcessorDetailsFormControls.ProcessorType,
4532
- },
4533
- };
4534
- switch (app.Processor.Type) {
4535
- case 'DFS':
4536
- app.Processor.BaseHref = `${this.ApplicationFormControls.RouteFormControl.value}/`.replace('//', '/');
4537
- app.Processor.DefaultFile =
4538
- this.ProcessorDetailsFormControls.DefaultFileFormControl.value || 'index.html';
4539
- app.LowCodeUnit = {
4540
- Type: this.ProcessorDetailsFormControls.LCUType,
4541
- };
4542
- switch (app.LowCodeUnit.Type) {
4543
- case 'GitHub':
4544
- app.LowCodeUnit.Organization =
4545
- this.SourceControls[this.ProcessorDetailsFormControls.SourceControlFormControl.value].Organization;
4546
- app.LowCodeUnit.Repository =
4547
- this.SourceControls[this.ProcessorDetailsFormControls.SourceControlFormControl.value].Repository;
4548
- app.LowCodeUnit.Build = this.ProcessorDetailsFormControls.BuildFormControl.value;
4549
- app.LowCodeUnit.Path =
4550
- this.ProcessorDetailsFormControls.BuildPathFormControl.value;
4551
- break;
4552
- case 'NPM':
4553
- app.LowCodeUnit.Package = this.ProcessorDetailsFormControls.PackageFormControl.value;
4554
- app.LowCodeUnit.Version = this.ProcessorDetailsFormControls.VersionFormControl.value;
4555
- break;
4556
- case 'Zip':
4557
- app.LowCodeUnit.ZipFile = this.ProcessorDetailsFormControls.ZipFileFormControl.value;
4558
- break;
4559
- }
4560
- break;
4561
- case 'OAuth':
4562
- app.Processor.Scopes = this.ProcessorDetailsFormControls.ScopesFormControl.value.split(' ');
4563
- app.Processor.TokenLookup = this.ProcessorDetailsFormControls.TokenLookupFormControl.value;
4564
- app.LowCodeUnit = {
4565
- Type: this.ProcessorDetailsFormControls.LCUType,
4566
- };
4567
- switch (app.LowCodeUnit.Type) {
4568
- case 'GitHubOAuth':
4569
- app.LowCodeUnit.ClientID = this.ProcessorDetailsFormControls.ClientIDFormControl.value;
4570
- app.LowCodeUnit.ClientSecret = this.ProcessorDetailsFormControls.ClientSecretFormControl.value;
4571
- break;
4572
- }
4573
- break;
4574
- case 'Proxy':
4575
- app.Processor.InboundPath = this.ProcessorDetailsFormControls.InboundPathFormControl.value;
4576
- app.LowCodeUnit = {
4577
- Type: this.ProcessorDetailsFormControls.LCUType,
4578
- };
4579
- switch (app.LowCodeUnit.Type) {
4580
- case 'API':
4581
- app.LowCodeUnit.APIRoot = this.ProcessorDetailsFormControls.APIRootFormControl.value;
4582
- app.LowCodeUnit.Security = this.ProcessorDetailsFormControls.SecurityFormControl.value;
4583
- break;
4584
- case 'SPA':
4585
- app.LowCodeUnit.SPARoot = this.ProcessorDetailsFormControls.SPARootFormControl.value;
4586
- break;
4587
- }
4588
- break;
4589
- case 'Redirect':
4590
- app.Processor.Permanent = !!this.ProcessorDetailsFormControls.PermanentFormControl.value;
4591
- app.Processor.PreserveMethod = !!this.ProcessorDetailsFormControls.PreserveMethodFormControl.value;
4592
- app.Processor.Redirect = this.ProcessorDetailsFormControls.RedirectFormControl.value;
4593
- break;
4594
- }
4595
- if (!app.LookupConfig.PathRegex.startsWith('/')) {
4596
- app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
4597
- }
4598
- const saveAppReq = {
4599
- ProjectLookup: this.data.projectLookup,
4600
- Application: app,
4601
- ApplicationLookup: this.NewApplicationLookup,
4602
- };
4603
- // this.HasBuildFormControl.value && taken out from below if statement
4604
- if (this.ProcessorDetailsFormControls.ProcessorType !== 'redirect' && this.ProcessorDetailsFormControls.LCUType === 'GitHub') {
4605
- if (app) {
4606
- app.LowCodeUnit.SourceControlLookup = this.ProcessorDetailsFormControls.SourceControlFormControl.value;
4426
+ HandleAction(action) {
4427
+ if (action.ActionType == 'Link') {
4428
+ if (action.Action.startsWith('http')) {
4429
+ window.open(action.Action, '_blank');
4430
+ }
4431
+ else {
4432
+ window.location.href = action.Action;
4607
4433
  }
4608
4434
  }
4609
- else if (app) {
4610
- app.LowCodeUnit.SourceControlLookup = null;
4435
+ else if (action.ActionType == 'Modal') {
4436
+ if (action.Action == 'AddSourceControl') {
4437
+ this.OpenSourceControlDialog(null);
4438
+ }
4439
+ else {
4440
+ alert('other modaled ' + action.Action);
4441
+ }
4611
4442
  }
4612
- // console.log("Save new App request: ", saveAppReq);
4613
- this.eacSvc.SaveApplicationAsCode(saveAppReq).then(res => {
4614
- this.handleSaveStatus(res);
4615
- });
4616
4443
  }
4617
- handleSaveStatus(status) {
4618
- console.log("event to save: ", status);
4619
- if (status.Code === 0) {
4620
- this.snackBar.open("Application Succesfully Created", "Dismiss", {
4621
- duration: 5000
4622
- });
4623
- this.CloseDialog();
4624
- }
4625
- else {
4626
- this.ErrorMessage = status.Message;
4444
+ OpenSourceControlDialog(scLookup) {
4445
+ const dialogRef = this.dialog.open(SourceControlDialogComponent, {
4446
+ width: '550px',
4447
+ data: {
4448
+ environment: this.Environment,
4449
+ environmentLookup: this.ActiveEnvironmentLookup,
4450
+ scLookup: scLookup,
4451
+ },
4452
+ });
4453
+ dialogRef.afterClosed().subscribe((result) => {
4454
+ // console.log('The dialog was closed');
4455
+ // console.log("result:", result)
4456
+ });
4457
+ }
4458
+ SafeHtml(html) {
4459
+ return this.sanitizer.bypassSecurityTrustHtml(html);
4460
+ }
4461
+ // Helpers
4462
+ handleRefresh() {
4463
+ var _a;
4464
+ if ((_a = this.FeedItem) === null || _a === void 0 ? void 0 : _a.RefreshLink) {
4465
+ setTimeout(() => {
4466
+ this.eacSvc.CheckUserFeedItem(this.FeedItem).subscribe((response) => __awaiter(this, void 0, void 0, function* () {
4467
+ if (response.Status.Code === 0) {
4468
+ this.FeedItem = response.Model;
4469
+ this.handleRefresh();
4470
+ }
4471
+ else {
4472
+ console.log(response);
4473
+ }
4474
+ }), (err) => {
4475
+ console.log(err);
4476
+ });
4477
+ }, 5000);
4627
4478
  }
4628
4479
  }
4629
4480
  }
4630
- NewApplicationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: NewApplicationDialogComponent, deps: [{ token: EaCService }, { token: i2$3.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
4631
- 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$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$3.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$3.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"] }] });
4632
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: NewApplicationDialogComponent, decorators: [{
4481
+ MainFeedCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MainFeedCardComponent, deps: [{ token: EaCService }, { token: i2$3.MatDialog }, { token: i3$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
4482
+ 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$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i2$2.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"] }] });
4483
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MainFeedCardComponent, decorators: [{
4633
4484
  type: Component,
4634
- 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: [""] }]
4635
- }], ctorParameters: function () {
4636
- return [{ type: EaCService }, { type: i2$3.MatDialogRef }, { type: undefined, decorators: [{
4637
- type: Inject,
4638
- args: [MAT_DIALOG_DATA]
4639
- }] }, { type: i3$1.MatSnackBar }];
4640
- }, propDecorators: { ApplicationFormControls: [{
4641
- type: ViewChild,
4642
- args: [EditApplicationFormComponent]
4643
- }], ProcessorDetailsFormControls: [{
4644
- type: ViewChild,
4645
- args: [ProcessorDetailsFormComponent]
4485
+ 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"] }]
4486
+ }], ctorParameters: function () { return [{ type: EaCService }, { type: i2$3.MatDialog }, { type: i3$2.DomSanitizer }]; }, propDecorators: { FeedItem: [{
4487
+ type: Input,
4488
+ args: ['feed-item']
4646
4489
  }] } });
4647
4490
 
4648
- class GhControlComponent {
4649
- constructor(eacSvc, dialog) {
4650
- this.eacSvc = eacSvc;
4651
- this.dialog = dialog;
4652
- this.InputLabel = "Create Pull Request";
4653
- this.SkeletonEffect = "wave";
4654
- this.selectedBtn = "pr-btn";
4655
- }
4656
- get ActiveEnvironmentLookup() {
4657
- var _a, _b;
4658
- // TODO: Eventually support multiple environments
4659
- const envLookups = Object.keys(((_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments) || {});
4660
- return envLookups[0];
4491
+ class TwoColumnHeaderComponent {
4492
+ constructor() { }
4493
+ ngOnInit() {
4661
4494
  }
4662
- get State() {
4663
- return this.eacSvc.State;
4495
+ }
4496
+ TwoColumnHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4497
+ 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"] }] });
4498
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, decorators: [{
4499
+ type: Component,
4500
+ 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"] }]
4501
+ }], ctorParameters: function () { return []; } });
4502
+
4503
+ class CardCarouselComponent {
4504
+ constructor() {
4505
+ this.carouselIndex = 0;
4664
4506
  }
4665
4507
  ngOnInit() {
4666
4508
  }
4667
4509
  ngAfterViewInit() {
4668
- this.addSelectBtn();
4669
- }
4670
- CreateFeatureBranch() {
4671
- this.removeSelectedBtn();
4672
- this.InputLabel = "Create Feature Branch";
4673
- this.selectedBtn = "fb-btn";
4674
- this.addSelectBtn();
4675
- console.log("create feature branch selected");
4676
- }
4677
- OpenIssue() {
4678
- this.removeSelectedBtn();
4679
- this.InputLabel = "Open Issue";
4680
- this.selectedBtn = "oi-btn";
4681
- this.addSelectBtn();
4682
- console.log("open issue selected");
4683
- }
4684
- CreatePullRequest() {
4685
- this.removeSelectedBtn();
4686
- this.InputLabel = "Create Pull Request";
4687
- this.selectedBtn = "pr-btn";
4688
- this.addSelectBtn();
4689
- console.log("create pull request selected");
4510
+ this.assignCarouselClass();
4690
4511
  }
4691
- CreateNewApp() {
4692
- const dialogRef = this.dialog.open(NewApplicationDialogComponent, {
4693
- width: '600px',
4694
- data: {
4695
- environmentLookup: this.ActiveEnvironmentLookup,
4696
- },
4697
- });
4698
- dialogRef.afterClosed().subscribe((result) => {
4699
- // console.log('The dialog was closed');
4700
- // console.log("result:", result)
4701
- });
4512
+ LeftChevronClicked() {
4513
+ this.removeCarouselClasses();
4514
+ if (this.carouselIndex === 0) {
4515
+ this.carouselIndex = this.Stats.length - 1;
4516
+ }
4517
+ else {
4518
+ this.carouselIndex--;
4519
+ }
4520
+ this.assignCarouselClass();
4702
4521
  }
4703
- RouteToPath(path) {
4704
- window.location.href = path;
4522
+ MoreDetailsClicked() {
4523
+ console.log("More details clicked on carousel item", this.Stats[this.carouselIndex]);
4705
4524
  }
4706
- Submit() {
4707
- console.log("submitting: ", this.value);
4708
- switch (this.selectedBtn) {
4709
- case "pr-btn":
4710
- //Pull request
4711
- console.log("creating pull request: ", this.value);
4712
- break;
4713
- case "oi-btn":
4714
- //Open Issue
4715
- console.log("Open issue: ", this.value);
4716
- break;
4717
- case "fb-btn":
4718
- //Feature Branch
4719
- console.log("creating feature branch: ", this.value);
4720
- break;
4721
- default:
4722
- console.log("hmm");
4723
- break;
4525
+ RightChevronClicked() {
4526
+ this.removeCarouselClasses();
4527
+ if (this.carouselIndex === this.Stats.length - 1) {
4528
+ this.carouselIndex = 0;
4529
+ }
4530
+ else {
4531
+ this.carouselIndex++;
4724
4532
  }
4533
+ this.assignCarouselClass();
4725
4534
  }
4726
4535
  //HELPERS
4727
- addSelectBtn() {
4728
- // (<HTMLElement>document.getElementById(this.selectedBtn)).classList.add('selected');
4536
+ removeCarouselClasses() {
4537
+ for (let i = 0; i < this.Stats.length; i++) {
4538
+ if (i === this.carouselIndex) {
4539
+ document.getElementById("carousel-" + this.carouselIndex).classList.remove('active');
4540
+ }
4541
+ else {
4542
+ document.getElementById("carousel-" + i).classList.remove('hidden');
4543
+ }
4544
+ }
4729
4545
  }
4730
- removeSelectedBtn() {
4731
- // (<HTMLElement>document.getElementById(this.selectedBtn)).classList.remove('selected');
4546
+ assignCarouselClass() {
4547
+ for (let i = 0; i < this.Stats.length; i++) {
4548
+ if (i === this.carouselIndex) {
4549
+ document.getElementById("carousel-" + this.carouselIndex).classList.add('active');
4550
+ }
4551
+ else {
4552
+ document.getElementById("carousel-" + i).classList.add('hidden');
4553
+ }
4554
+ }
4732
4555
  }
4733
4556
  }
4734
- GhControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: GhControlComponent, deps: [{ token: EaCService }, { token: i2$3.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
4735
- GhControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: GhControlComponent, selector: "lcu-gh-control", ngImport: i0, template: "<mat-card class=\"social-card\" *ngIf=\"false\">\n <ng-container *ngIf=\"!State?.Loading\">\n <div class=\"gh-card-container\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-icon fxFlex=\"15%\" class=\"gh-icon\">error_outline</mat-icon>\n <div fxFlex=\"70%\" class=\"gh-card-main-content\">\n <mat-form-field appearance=\"fill\" class=\"gh-input\">\n <mat-label>{{ InputLabel }}</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"value\" />\n <!-- <button *ngIf=\"value\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"value=''\">\n <mat-icon>close</mat-icon>\n </button> -->\n </mat-form-field>\n </div>\n\n <button\n fxFlex=\"15%\"\n mat-button\n (click)=\"Submit()\"\n id=\"submit-btn\"\n color=\"primary\"\n >\n Submit\n </button>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <button mat-button (click)=\"CreatePullRequest()\" id=\"pr-btn\">\n Pull Request\n </button>\n <button mat-button (click)=\"OpenIssue()\" id=\"oi-btn\">Open Issue</button>\n <button mat-button (click)=\"CreateFeatureBranch()\" id=\"fb-btn\">\n Feature Branch\n </button>\n <button mat-icon-button [matMenuTriggerFor]=\"menu\" aria-label=\"menu\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button class=\"gh-menu-action\" mat-menu-item (click)=\"CreateNewApp()\">\n Create New App\n </button>\n\n <button\n class=\"gh-menu-action\"\n mat-menu-item\n (click)=\"RouteToPath('/dashboard/create-project')\"\n >\n Create Project\n </button>\n </mat-menu>\n </mat-card-actions>\n </ng-container>\n\n <!-- SKELETON -->\n <ng-container *ngIf=\"State?.Loading\">\n <div id=\"gh-card-skeleton\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <skeleton-avatar\n class=\"gh-icon\"\n [showIcon]=\"false\"\n [effect]=\"SkeletonEffect\"\n ></skeleton-avatar>\n\n <div fxFlex=\"70%\" class=\"gh-card-main-content\">\n <skeleton-block\n height=\"60px\"\n [effect]=\"SkeletonEffect\"\n ></skeleton-block>\n </div>\n\n <div\n skeleton-text\n fxFlex=\"15%\"\n [effect]=\"SkeletonEffect\"\n style=\"margin: 0px 10px\"\n >\n Submit\n </div>\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Pull Request</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">Open Issue</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">Feature Branch</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">\n <mat-icon>more_horiz</mat-icon>\n </div>\n </div>\n </ng-container>\n</mat-card>\n", styles: [":host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host ::ng-deep .main-slot-container{padding:10px}:host ::ng-deep .slot-header{align-items:center}:host ::ng-deep .slot-content{width:100%}:host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}.gh-icon{width:60px;height:60px;font-size:60px;text-align:center}.gh-input{width:90%}.selected{border:1px solid green}.gh-input ::ng-deep .mat-form-field-flex{border:1px solid;border-radius:30px!important}.gh-input ::ng-deep .mat-form-field-wrapper{padding-bottom:0!important}.gh-input ::ng-deep .mat-form-field-underline{display:none}\n"], components: [{ type: i1$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i7$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i7$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { type: i4$3.SkeletonAvatarComponent, selector: "skeleton-avatar", inputs: ["size", "color", "showIcon", "iconColor", "borderRadius", "effect"] }, { type: i4$3.SkeletonBlockComponent, selector: "skeleton-block", inputs: ["width", "height", "effect", "borderRadius"] }], directives: [{ type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i4$1.MatLabel, selector: "mat-label" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i7$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i4$3.SkeletonTextDirective, selector: "[skeleton-text]", inputs: ["effect"] }] });
4736
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: GhControlComponent, decorators: [{
4557
+ CardCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4558
+ 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"] }] });
4559
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, decorators: [{
4737
4560
  type: Component,
4738
- args: [{ selector: 'lcu-gh-control', template: "<mat-card class=\"social-card\" *ngIf=\"false\">\n <ng-container *ngIf=\"!State?.Loading\">\n <div class=\"gh-card-container\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-icon fxFlex=\"15%\" class=\"gh-icon\">error_outline</mat-icon>\n <div fxFlex=\"70%\" class=\"gh-card-main-content\">\n <mat-form-field appearance=\"fill\" class=\"gh-input\">\n <mat-label>{{ InputLabel }}</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"value\" />\n <!-- <button *ngIf=\"value\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"value=''\">\n <mat-icon>close</mat-icon>\n </button> -->\n </mat-form-field>\n </div>\n\n <button\n fxFlex=\"15%\"\n mat-button\n (click)=\"Submit()\"\n id=\"submit-btn\"\n color=\"primary\"\n >\n Submit\n </button>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <button mat-button (click)=\"CreatePullRequest()\" id=\"pr-btn\">\n Pull Request\n </button>\n <button mat-button (click)=\"OpenIssue()\" id=\"oi-btn\">Open Issue</button>\n <button mat-button (click)=\"CreateFeatureBranch()\" id=\"fb-btn\">\n Feature Branch\n </button>\n <button mat-icon-button [matMenuTriggerFor]=\"menu\" aria-label=\"menu\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button class=\"gh-menu-action\" mat-menu-item (click)=\"CreateNewApp()\">\n Create New App\n </button>\n\n <button\n class=\"gh-menu-action\"\n mat-menu-item\n (click)=\"RouteToPath('/dashboard/create-project')\"\n >\n Create Project\n </button>\n </mat-menu>\n </mat-card-actions>\n </ng-container>\n\n <!-- SKELETON -->\n <ng-container *ngIf=\"State?.Loading\">\n <div id=\"gh-card-skeleton\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <skeleton-avatar\n class=\"gh-icon\"\n [showIcon]=\"false\"\n [effect]=\"SkeletonEffect\"\n ></skeleton-avatar>\n\n <div fxFlex=\"70%\" class=\"gh-card-main-content\">\n <skeleton-block\n height=\"60px\"\n [effect]=\"SkeletonEffect\"\n ></skeleton-block>\n </div>\n\n <div\n skeleton-text\n fxFlex=\"15%\"\n [effect]=\"SkeletonEffect\"\n style=\"margin: 0px 10px\"\n >\n Submit\n </div>\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Pull Request</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">Open Issue</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">Feature Branch</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">\n <mat-icon>more_horiz</mat-icon>\n </div>\n </div>\n </ng-container>\n</mat-card>\n", styles: [":host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host ::ng-deep .main-slot-container{padding:10px}:host ::ng-deep .slot-header{align-items:center}:host ::ng-deep .slot-content{width:100%}:host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}.gh-icon{width:60px;height:60px;font-size:60px;text-align:center}.gh-input{width:90%}.selected{border:1px solid green}.gh-input ::ng-deep .mat-form-field-flex{border:1px solid;border-radius:30px!important}.gh-input ::ng-deep .mat-form-field-wrapper{padding-bottom:0!important}.gh-input ::ng-deep .mat-form-field-underline{display:none}\n"] }]
4739
- }], ctorParameters: function () { return [{ type: EaCService }, { type: i2$3.MatDialog }]; } });
4561
+ 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"] }]
4562
+ }], ctorParameters: function () { return []; }, propDecorators: { Stats: [{
4563
+ type: Input,
4564
+ args: ['stats']
4565
+ }] } });
4740
4566
 
4741
- class DevopsSourceControlFormComponent {
4742
- // Constructors
4743
- constructor(appsFlowSvc, eacSvc, formBuilder) {
4744
- this.appsFlowSvc = appsFlowSvc;
4567
+ class SecurityToggleComponent {
4568
+ constructor(eacSvc, formBldr) {
4745
4569
  this.eacSvc = eacSvc;
4746
- this.formBuilder = formBuilder;
4747
- this.SeparatorKeysCodes = [ENTER, COMMA];
4748
- this.SaveStatusEvent = new EventEmitter();
4749
- this.BuildPath = null;
4750
- this.HostingDetails = new ProjectHostingDetails();
4751
- this.SelectedBranches = [];
4752
- this.SourceControlRoot = '';
4753
- this.SkeletonEffect = "wave";
4754
- this.UseBranches = true;
4755
- this.UseBuildPath = false;
4570
+ this.formBldr = formBldr;
4571
+ this.SaveFormEvent = new EventEmitter;
4572
+ this.SkeletonEffect = 'wave';
4756
4573
  }
4757
- // Properties
4758
- get ArtifactLookups() {
4574
+ get IsPrivateFormControl() {
4759
4575
  var _a;
4760
- return (_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.ArtifactLookups;
4761
- }
4762
- get ArtifactLookup() {
4763
- var _a, _b;
4764
- const artLookup = ((_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.ArtifactLookups)
4765
- ? (_b = this.DevOpsAction) === null || _b === void 0 ? void 0 : _b.ArtifactLookups[0]
4766
- : null;
4767
- return artLookup;
4576
+ return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isPrivate;
4768
4577
  }
4769
- get Artifact() {
4770
- var _a, _b;
4771
- return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts) && this.ArtifactLookup
4772
- ? ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts[this.ArtifactLookup]) || {}
4773
- : {};
4578
+ get IsTriggerSignInFormControl() {
4579
+ var _a;
4580
+ return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isTriggerSignIn;
4774
4581
  }
4775
- get BranchesFormControl() {
4776
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
4582
+ get State() {
4583
+ return this.eacSvc.State;
4777
4584
  }
4778
- get BuildPathFormControl() {
4779
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'buildPath');
4585
+ ngOnInit() {
4586
+ this.setupSecurityFormGroup();
4780
4587
  }
4781
- get DevOpsActionLookups() {
4782
- // console.log(this.DevOpsActions);
4783
- return Object.keys(this.DevOpsActions || {});
4588
+ SecuritySubmit() {
4589
+ //save the security settings
4590
+ console.log("submitting security values: ", this.SecurityFormGroup.value);
4591
+ this.SaveFormEvent.emit(this.SecurityFormGroup.value);
4784
4592
  }
4785
- get DevOpsAction() {
4786
- return this.Environment.DevOpsActions && this.DevOpsActionLookup
4787
- ? this.Environment.DevOpsActions[this.DevOpsActionLookup] || {}
4788
- : {};
4593
+ setupSecurityFormGroup() {
4594
+ var _a, _b;
4595
+ this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
4596
+ this.SecurityFormGroup = this.formBldr.group({});
4597
+ this.setupSecurityForm();
4789
4598
  }
4790
- get DevOpsActionLookup() {
4791
- var _a, _b, _c;
4792
- if (!!((_a = this.DevOpsActionLookupFormControl) === null || _a === void 0 ? void 0 : _a.value)) {
4793
- return this.DevOpsActionLookupFormControl.value;
4794
- }
4795
- if (!!((_b = this.EditingSourceControl) === null || _b === void 0 ? void 0 : _b.DevOpsActionTriggerLookups)) {
4796
- return (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.DevOpsActionTriggerLookups[0];
4797
- }
4798
- else {
4799
- return null;
4800
- }
4801
- }
4802
- get DevOpsActionLookupFormControl() {
4803
- return this.DevOpsSourceControlFormGroup.get('devOpsActionLookup');
4804
- }
4805
- get DevOpsActions() {
4806
- return this.Environment.DevOpsActions || {};
4807
- }
4808
- get EditingSourceControl() {
4599
+ setupSecurityForm() {
4809
4600
  var _a, _b;
4810
- let sc = ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources)
4811
- ? (_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Sources[this.EditingSourceControlLookup]
4812
- : null;
4813
- if (sc == null && this.EditingSourceControlLookup) {
4814
- sc = {};
4815
- }
4816
- return sc;
4601
+ this.SecurityFormGroup.addControl('isPrivate', this.formBldr.control(((_a = this.EditingApplication.LookupConfig) === null || _a === void 0 ? void 0 : _a.IsPrivate) || false, [Validators.required]));
4602
+ this.SecurityFormGroup.addControl('isTriggerSignIn', this.formBldr.control(((_b = this.EditingApplication.LookupConfig) === null || _b === void 0 ? void 0 : _b.IsTriggerSignIn) || false, [Validators.required]));
4817
4603
  }
4818
- get MainBranchFormControl() {
4819
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'mainBranch');
4604
+ }
4605
+ 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 });
4606
+ 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\n class=\"security-form\"\n [formGroup]=\"SecurityFormGroup\"\n (ngSubmit)=\"SecuritySubmit()\"\n>\n <mat-card class=\"flow-card\">\n <!-- SKELETON LOADING -->\n <ng-container *ngIf=\"State?.Loading\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title skeleton-text [effect]=\"SkeletonEffect\">\n Security Settings\n </mat-card-title>\n <div fxLayoutAlign=\"space-around center\">\n <div skeleton-text [effect]=\"SkeletonEffect\">XXX</div>\n\n <mat-icon skeleton-text [effect]=\"SkeletonEffect\">\n info_outline\n </mat-icon>\n </div>\n </mat-card-header>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n <div\n fxFlex=\"100%\"\n skeleton-text\n [effect]=\"SkeletonEffect\"\n fxLayoutAlign=\"center center\"\n >\n <mat-icon skeleton-text [effect]=\"SkeletonEffect\"> save </mat-icon>\n\n Save Settings\n </div>\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 <button\n mat-raised-button\n type=\"submit\"\n fxFlex=\"100%\"\n color=\"primary\"\n [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\"\n >\n <mat-icon>save</mat-icon>\n Save Settings\n </button>\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: i5$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]" }] });
4607
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SecurityToggleComponent, decorators: [{
4608
+ type: Component,
4609
+ args: [{ selector: 'lcu-security-toggle', template: "<form\n class=\"security-form\"\n [formGroup]=\"SecurityFormGroup\"\n (ngSubmit)=\"SecuritySubmit()\"\n>\n <mat-card class=\"flow-card\">\n <!-- SKELETON LOADING -->\n <ng-container *ngIf=\"State?.Loading\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title skeleton-text [effect]=\"SkeletonEffect\">\n Security Settings\n </mat-card-title>\n <div fxLayoutAlign=\"space-around center\">\n <div skeleton-text [effect]=\"SkeletonEffect\">XXX</div>\n\n <mat-icon skeleton-text [effect]=\"SkeletonEffect\">\n info_outline\n </mat-icon>\n </div>\n </mat-card-header>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n <div\n fxFlex=\"100%\"\n skeleton-text\n [effect]=\"SkeletonEffect\"\n fxLayoutAlign=\"center center\"\n >\n <mat-icon skeleton-text [effect]=\"SkeletonEffect\"> save </mat-icon>\n\n Save Settings\n </div>\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 <button\n mat-raised-button\n type=\"submit\"\n fxFlex=\"100%\"\n color=\"primary\"\n [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\"\n >\n <mat-icon>save</mat-icon>\n Save Settings\n </button>\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"] }]
4610
+ }], ctorParameters: function () { return [{ type: EaCService }, { type: i1$2.FormBuilder }]; }, propDecorators: { EditingApplication: [{
4611
+ type: Input,
4612
+ args: ['editing-application']
4613
+ }], SaveFormEvent: [{
4614
+ type: Output,
4615
+ args: ['save-form-event']
4616
+ }] } });
4617
+
4618
+ class ProcessorDetailsFormComponent {
4619
+ constructor(appsFlowSvc, formBldr, eacSvc) {
4620
+ this.appsFlowSvc = appsFlowSvc;
4621
+ this.formBldr = formBldr;
4622
+ this.eacSvc = eacSvc;
4623
+ this.redirectTooltip = '';
4624
+ this.HasSaveButton = true;
4625
+ this.SaveFormEvent = new EventEmitter();
4820
4626
  }
4821
- get OrganizationFormControl() {
4822
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'organization');
4627
+ get APIRootFormControl() {
4628
+ var _a;
4629
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.apiRoot;
4823
4630
  }
4824
- get RepositoryFormControl() {
4825
- return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'repository');
4631
+ get Environment() {
4632
+ var _a, _b, _c, _d, _e;
4633
+ return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[(_e = (_d = (_c = this.State) === null || _c === void 0 ? void 0 : _c.EaC) === null || _d === void 0 ? void 0 : _d.Enterprise) === null || _e === void 0 ? void 0 : _e.PrimaryEnvironment];
4826
4634
  }
4827
- get State() {
4828
- return this.eacSvc.State;
4635
+ get BuildFormControl() {
4636
+ var _a;
4637
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.build;
4829
4638
  }
4830
- // Life Cycle
4831
- ngAfterViewInit() { }
4832
- ngOnDestroy() {
4833
- this.destroyFormControls();
4639
+ get BuildPathFormControl() {
4640
+ var _a;
4641
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.buildPath;
4834
4642
  }
4835
- ngOnInit() {
4836
- console.log("source control lookup", this.EditingSourceControlLookup);
4837
- if (this.EditingSourceControlLookup === null) {
4838
- this.CreateNewSourceControl();
4839
- }
4840
- console.log("source control", this.EditingSourceControl);
4841
- if (this.EditingSourceControl != null) {
4842
- this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
4843
- this.setupFormControls();
4844
- }
4845
- this.RefreshOrganizations();
4643
+ get ClientIDFormControl() {
4644
+ var _a;
4645
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientId;
4846
4646
  }
4847
- // API Methods
4848
- AddBranchOption(event) {
4849
- this.addBranchOption(event.value);
4850
- event.input.value = '';
4647
+ get ClientSecretFormControl() {
4648
+ var _a;
4649
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientSecret;
4851
4650
  }
4852
- BranchOptionSelected(event) {
4853
- this.addBranchOption(event.option.value);
4651
+ get DefaultFileFormControl() {
4652
+ var _a;
4653
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.defaultFile;
4854
4654
  }
4855
- BranchesChanged(branches) {
4856
- this.loadProjectHostingDetails();
4655
+ get DefaultSourceControl() {
4656
+ var _a, _b, _c, _d;
4657
+ return {
4658
+ Organization: (_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Organization,
4659
+ Repository: (_d = (_c = this.EditingApplication) === null || _c === void 0 ? void 0 : _c.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Repository,
4660
+ };
4857
4661
  }
4858
- BuildPathChanged(event) {
4859
- //do something??
4662
+ get InboundPathFormControl() {
4663
+ var _a;
4664
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.inboundPath;
4860
4665
  }
4861
- CreateNewSourceControl() {
4862
- this.SetEditingSourceControl(Guid.CreateRaw());
4666
+ get IncludeRequestFormControl() {
4667
+ var _a;
4668
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.includeRequest;
4863
4669
  }
4864
- CreateRepository() {
4865
- this.CreatingRepository = true;
4866
- this.RepositoryFormControl.reset();
4670
+ get MethodsFormControl() {
4671
+ var _a;
4672
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.methods;
4867
4673
  }
4868
- CancelCreateRepository() {
4869
- this.CreatingRepository = false;
4674
+ get PackageFormControl() {
4675
+ var _a;
4676
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.package;
4870
4677
  }
4871
- DevOpsActionLookupChanged(event) {
4872
- this.configureDevOpsAction();
4678
+ get PermanentFormControl() {
4679
+ var _a;
4680
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.permanent;
4873
4681
  }
4874
- MainBranchChanged(event) {
4875
- this.emitBranchesChanged();
4682
+ get PreserveMethodFormControl() {
4683
+ var _a;
4684
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.preserveMethod;
4876
4685
  }
4877
- OrganizationChanged(event) {
4878
- const org = this.OrganizationFormControl;
4879
- this.RepositoryFormControl.reset();
4880
- if (this.UseBranches) {
4881
- this.BranchesFormControl.reset();
4882
- this.SelectedBranches = [];
4883
- }
4884
- this.listRepositories();
4686
+ get RedirectFormControl() {
4687
+ var _a;
4688
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.redirect;
4885
4689
  }
4886
- RefreshOrganizations() {
4887
- var _a, _b, _c;
4888
- // this.Loading = true;
4889
- this.listOrganizations();
4890
- (_a = this.OrganizationFormControl) === null || _a === void 0 ? void 0 : _a.reset();
4891
- (_b = this.RepositoryFormControl) === null || _b === void 0 ? void 0 : _b.reset();
4892
- if (this.UseBranches) {
4893
- (_c = this.BranchesFormControl) === null || _c === void 0 ? void 0 : _c.reset();
4894
- }
4690
+ get ScopesFormControl() {
4691
+ var _a;
4692
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.scopes;
4895
4693
  }
4896
- RemoveBranchOption(option) {
4897
- const index = this.SelectedBranches.indexOf(option);
4898
- if (index >= 0) {
4899
- this.SelectedBranches.splice(index, 1);
4900
- }
4901
- this.emitBranchesChanged();
4694
+ get SecurityFormControl() {
4695
+ var _a;
4696
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.security;
4902
4697
  }
4903
- RepositoryChanged(event) {
4904
- const repo = this.RepositoryFormControl;
4905
- if (this.UseBranches) {
4906
- this.BranchesFormControl.reset();
4907
- this.SelectedBranches = [];
4908
- this.listBranches();
4909
- }
4910
- if (!this.UseBranches) {
4911
- this.listBuildPaths();
4912
- }
4698
+ get State() {
4699
+ return this.eacSvc.State;
4913
4700
  }
4914
- SaveRepository() {
4915
- this.Loading = true;
4916
- const org = this.OrganizationFormControl.value;
4917
- const repoName = this.RepositoryFormControl.value;
4918
- this.appsFlowSvc
4919
- .CreateRepository(org, repoName)
4920
- .subscribe((response) => {
4921
- if (response.Status.Code === 0) {
4922
- this.listRepositories(repoName);
4923
- this.CreatingRepository = false;
4924
- }
4925
- else {
4926
- // TODO: Need to surface an error to the user...
4927
- this.Loading = false;
4928
- }
4929
- });
4701
+ get SourceControls() {
4702
+ var _a;
4703
+ return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources) || {};
4930
4704
  }
4931
- SetEditingSourceControl(scLookup) {
4932
- this.EditingSourceControlLookup = scLookup;
4705
+ get SourceControlFormControl() {
4706
+ var _a;
4707
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.sourceControl;
4933
4708
  }
4934
- SubmitSourceControl() {
4935
- console.log('source control submitted: ', this.DevOpsSourceControlFormGroup.value);
4936
- this.SaveSourceControl();
4709
+ get SPARootFormControl() {
4710
+ var _a;
4711
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.spaRoot;
4937
4712
  }
4938
- SaveSourceControl() {
4939
- const saveEnvReq = {
4940
- Environment: Object.assign(Object.assign({}, this.Environment), { Sources: this.Environment.Sources || {} }),
4941
- EnvironmentLookup: this.EnvironmentLookup,
4942
- EnterpriseDataTokens: {},
4943
- };
4944
- let source = Object.assign(Object.assign({}, this.EditingSourceControl), { Branches: this.SelectedBranches, MainBranch: this.MainBranchFormControl.value });
4945
- source = Object.assign(Object.assign({}, source), { Type: 'GitHub', Name: `@${this.OrganizationFormControl.value}/${this.RepositoryFormControl.value}`, DevOpsActionTriggerLookups: [this.DevOpsActionLookup], Organization: this.OrganizationFormControl.value, Repository: this.RepositoryFormControl.value });
4946
- const scLookup = `github://${source.Organization}/${source.Repository}`;
4947
- saveEnvReq.Environment.Sources[scLookup] = source;
4948
- console.log('save SC: ', saveEnvReq);
4949
- let resp = this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
4950
- resp.then((res) => {
4951
- this.SaveStatusEvent.emit(res);
4952
- });
4713
+ get TokenLookupFormControl() {
4714
+ var _a;
4715
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.tokenLookup;
4953
4716
  }
4954
- // Helpers
4955
- addBranchOption(value) {
4956
- value = (value || '').trim();
4957
- if (value && this.SelectedBranches.indexOf(value) < 0) {
4958
- this.SelectedBranches.push(value);
4717
+ get ValidFormControls() {
4718
+ let vfc = new Array();
4719
+ for (const field in this.ProcessorDetailsFormGroup.controls) {
4720
+ const control = this.ProcessorDetailsFormGroup.get(field);
4721
+ if (control.valid) {
4722
+ vfc.push(control);
4723
+ }
4959
4724
  }
4960
- this.BranchesInput.nativeElement.blur();
4961
- this.emitBranchesChanged();
4725
+ // console.log("VFC=", vfc)
4726
+ return vfc;
4962
4727
  }
4963
- configureDevOpsAction() {
4964
- setTimeout(() => {
4965
- this.DevOpsActionLookupFormControl.setValue(this.DevOpsActionLookup);
4966
- }, 0);
4728
+ get VersionFormControl() {
4729
+ var _a;
4730
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.version;
4967
4731
  }
4968
- destroyFormControls() {
4969
- var _a, _b, _c, _d;
4970
- this.DevOpsSourceControlFormGroup.removeControl([this.SourceControlRoot, 'mainBranch'].join(''));
4971
- (_a = this.DevOpsSourceControlFormGroup) === null || _a === void 0 ? void 0 : _a.removeControl([this.SourceControlRoot, 'branches'].join(''));
4972
- (_b = this.DevOpsSourceControlFormGroup) === null || _b === void 0 ? void 0 : _b.removeControl([this.SourceControlRoot, 'buildPath'].join(''));
4973
- this.SelectedBranches = [];
4974
- (_c = this.DevOpsSourceControlFormGroup) === null || _c === void 0 ? void 0 : _c.removeControl([this.SourceControlRoot, 'organization'].join(''));
4975
- (_d = this.DevOpsSourceControlFormGroup) === null || _d === void 0 ? void 0 : _d.removeControl([this.SourceControlRoot, 'repository'].join(''));
4976
- }
4977
- emitBranchesChanged() {
4978
- var _a, _b;
4979
- if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
4980
- (!this.MainBranchFormControl.value ||
4981
- this.SelectedBranches.indexOf(this.MainBranchFormControl.value) < 0)) {
4982
- this.MainBranchFormControl.setValue(this.SelectedBranches.find((branch) => branch === 'main' || branch === 'master') || this.SelectedBranches[0]);
4983
- }
4984
- else if (((_b = this.SelectedBranches) === null || _b === void 0 ? void 0 : _b.length) <= 0) {
4985
- this.MainBranchFormControl.reset();
4986
- }
4987
- this.BranchesFormControl.setValue(this.SelectedBranches.join(','));
4988
- this.BranchesChanged(this.SelectedBranches || []);
4989
- }
4990
- listBranches() {
4991
- if (this.UseBranches) {
4992
- this.Loading = true;
4993
- this.appsFlowSvc
4994
- .ListBranches(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
4995
- .subscribe((response) => {
4996
- var _a, _b, _c;
4997
- this.BranchOptions = response.Model;
4998
- this.Loading = false;
4999
- if (((_b = (_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Branches) === null || _b === void 0 ? void 0 : _b.length) > 0) {
5000
- this.SelectedBranches = this.EditingSourceControl.Branches;
5001
- }
5002
- else if (((_c = this.BranchOptions) === null || _c === void 0 ? void 0 : _c.length) === 1) {
5003
- this.BranchesFormControl.setValue(this.BranchOptions[0].Name);
5004
- this.SelectedBranches = [this.BranchOptions[0].Name];
5005
- }
5006
- this.emitBranchesChanged();
5007
- this.listBuildPaths();
5008
- });
5009
- }
5010
- }
5011
- listBuildPaths() {
5012
- if (this.UseBuildPath) {
5013
- this.Loading = true;
5014
- this.appsFlowSvc
5015
- .ListBuildPaths(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
5016
- .subscribe((response) => {
5017
- var _a;
5018
- this.BuildPathOptions = response.Model;
5019
- this.Loading = false;
5020
- if (((_a = this.BuildPathOptions) === null || _a === void 0 ? void 0 : _a.length) === 1) {
5021
- this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
5022
- }
5023
- });
5024
- }
5025
- }
5026
- listOrganizations() {
5027
- this.Loading = true;
5028
- this.appsFlowSvc
5029
- .ListOrganizations()
5030
- .subscribe((response) => {
5031
- var _a;
5032
- this.OrganizationOptions = response.Model;
5033
- console.log("Organization Options: ", this.OrganizationOptions);
5034
- this.Loading = false;
5035
- if ((_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Organization) {
5036
- setTimeout(() => {
5037
- var _a;
5038
- this.OrganizationFormControl.setValue(this.EditingSourceControl.Organization);
5039
- this.listRepositories((_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Repository);
5040
- }, 0);
5041
- }
5042
- });
5043
- }
5044
- listRepositories(activeRepo = null) {
5045
- this.Loading = true;
5046
- this.appsFlowSvc
5047
- .ListRepositories(this.OrganizationFormControl.value)
5048
- .subscribe((response) => {
5049
- var _a;
5050
- this.RepositoryOptions = response.Model;
5051
- this.Loading = false;
5052
- if (activeRepo) {
5053
- setTimeout(() => {
5054
- this.RepositoryFormControl.setValue(activeRepo);
5055
- this.listBranches();
5056
- if (!this.UseBranches) {
5057
- this.listBuildPaths();
5058
- }
5059
- }, 0);
5060
- }
5061
- else if (((_a = this.RepositoryOptions) === null || _a === void 0 ? void 0 : _a.length) <= 0) {
5062
- this.CreatingRepository = true;
5063
- }
5064
- });
5065
- }
5066
- loadProjectHostingDetails() {
5067
- var _a;
5068
- if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0) {
5069
- this.HostingDetails.Loading = true;
5070
- this.appsFlowSvc
5071
- .LoadProjectHostingDetails()
5072
- .subscribe((response) => {
5073
- this.HostingDetails = response.Model;
5074
- this.HostingDetails.Loading = false;
5075
- this.configureDevOpsAction();
5076
- }, (err) => {
5077
- this.HostingDetails.Loading = false;
5078
- });
5079
- }
5080
- }
5081
- setupFormControls() {
5082
- var _a, _b, _c, _d, _e, _f, _g;
5083
- this.destroyFormControls();
5084
- console.log("Source Control: ", this.EditingSourceControl);
5085
- this.DevOpsSourceControlFormGroup.addControl('devOpsActionLookup', new FormControl(this.DevOpsActionLookup || '', []));
5086
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'organization'].join(''), new FormControl((_a = this.EditingSourceControl.Organization) !== null && _a !== void 0 ? _a : '', Validators.required));
5087
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'repository'].join(''), new FormControl((_b = this.EditingSourceControl.Repository) !== null && _b !== void 0 ? _b : '', Validators.required));
5088
- if (this.UseBranches) {
5089
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'branches'].join(''), new FormControl((_d = (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.Branches) !== null && _d !== void 0 ? _d : '', Validators.required));
5090
- this.SelectedBranches = (_e = this.EditingSourceControl) === null || _e === void 0 ? void 0 : _e.Branches;
5091
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'mainBranch'].join(''), new FormControl((_f = this.EditingSourceControl.MainBranch) !== null && _f !== void 0 ? _f : '', Validators.required));
5092
- }
5093
- if (this.UseBuildPath) {
5094
- this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'buildPath'].join(''), new FormControl((_g = this.BuildPath) !== null && _g !== void 0 ? _g : '', Validators.required));
5095
- }
5096
- }
5097
- }
5098
- 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 });
5099
- 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"] }] });
5100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DevopsSourceControlFormComponent, decorators: [{
5101
- type: Component,
5102
- 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"] }]
5103
- }], ctorParameters: function () { return [{ type: ApplicationsFlowService }, { type: EaCService }, { type: i1$2.FormBuilder }]; }, propDecorators: { EditingSourceControlLookup: [{
5104
- type: Input,
5105
- args: ['editing-source-control-lookup']
5106
- }], Environment: [{
5107
- type: Input,
5108
- args: ['environment']
5109
- }], EnvironmentLookup: [{
5110
- type: Input,
5111
- args: ['environment-lookup']
5112
- }], SaveStatusEvent: [{
5113
- type: Output,
5114
- args: ['save-status-event']
5115
- }], BranchesInput: [{
5116
- type: ViewChild,
5117
- args: ['branches']
5118
- }] } });
5119
-
5120
- class SourceControlDialogComponent {
5121
- constructor(dialogRef, eacSvc, data, snackBar) {
5122
- this.dialogRef = dialogRef;
5123
- this.eacSvc = eacSvc;
5124
- this.data = data;
5125
- this.snackBar = snackBar;
5126
- }
5127
- get DevOpsSourceControlFormGroup() {
4732
+ get ZipFileFormControl() {
5128
4733
  var _a;
5129
- return (_a = this.DevopsSourceControl) === null || _a === void 0 ? void 0 : _a.DevOpsSourceControlFormGroup;
5130
- }
5131
- get HasConnection() {
5132
- return this.State.GitHub.HasConnection;
5133
- }
5134
- get State() {
5135
- return this.eacSvc.State;
4734
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.zipFile;
5136
4735
  }
5137
4736
  ngOnInit() {
5138
- }
5139
- CloseDialog() {
5140
- this.dialogRef.close();
5141
- }
5142
- HandleSaveStatusEvent(event) {
5143
- console.log("event to save: ", event);
5144
- if (event.Code === 0) {
5145
- this.snackBar.open("Source Control Succesfully Saved", "Dismiss", {
5146
- duration: 5000
5147
- });
5148
- this.CloseDialog();
4737
+ if (!this.EditingApplication) {
4738
+ this.CreateNewApplication();
5149
4739
  }
5150
4740
  else {
5151
- this.ErrorMessage = event.Message;
4741
+ this.setupProcessorDetailsForm();
5152
4742
  }
5153
4743
  }
5154
- SaveSourceControl() {
5155
- this.DevopsSourceControl.SaveSourceControl();
5156
- }
5157
- }
5158
- SourceControlDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, deps: [{ token: i2$3.MatDialogRef }, { token: EaCService }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
5159
- 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$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$3.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$3.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"] }] });
5160
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, decorators: [{
5161
- type: Component,
5162
- 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"] }]
5163
- }], ctorParameters: function () {
5164
- return [{ type: i2$3.MatDialogRef }, { type: EaCService }, { type: undefined, decorators: [{
5165
- type: Inject,
5166
- args: [MAT_DIALOG_DATA]
5167
- }] }, { type: i3$1.MatSnackBar }];
5168
- }, propDecorators: { DevopsSourceControl: [{
5169
- type: ViewChild,
5170
- args: [DevopsSourceControlFormComponent]
5171
- }] } });
5172
-
5173
- class MainFeedCardComponent {
5174
- constructor(eacSvc, dialog, sanitizer) {
5175
- this.eacSvc = eacSvc;
5176
- this.dialog = dialog;
5177
- this.sanitizer = sanitizer;
5178
- }
5179
- get ActiveEnvironment() {
5180
- var _a, _b;
5181
- return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[this.ActiveEnvironmentLookup];
5182
- }
5183
- get ActiveEnvironmentLookup() {
5184
- var _a, _b;
5185
- // TODO: Eventually support multiple environments
5186
- const envLookups = Object.keys(((_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments) || {});
5187
- return envLookups[0];
5188
- }
5189
- get Environment() {
5190
- var _a, _b, _c, _d, _e;
5191
- // console.log("Ent Environment var: ", this.State?.EaC?.Environments[this.State?.EaC?.Enterprise?.PrimaryEnvironment]);
5192
- return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[(_e = (_d = (_c = this.State) === null || _c === void 0 ? void 0 : _c.EaC) === null || _d === void 0 ? void 0 : _d.Enterprise) === null || _e === void 0 ? void 0 : _e.PrimaryEnvironment];
5193
- }
5194
- get Icon() {
5195
- if (this.FeedItem.Status.Code === 0) {
5196
- return 'check_circle';
5197
- }
5198
- else if (this.FeedItem.Status.Code === 1) {
5199
- return 'cancel';
5200
- }
5201
- else if (this.FeedItem.Status.Code === 2) {
5202
- return 'sync';
5203
- }
5204
- else {
5205
- return 'help_outline';
5206
- }
4744
+ CreateNewApplication() {
4745
+ this.SetEditingApplication(Guid.CreateRaw());
5207
4746
  }
5208
- get IconColor() {
5209
- if (this.FeedItem.Status.Code === 0) {
5210
- return 'green';
4747
+ DetermineTooltipText() {
4748
+ let permanentValue = this.PermanentFormControl.value;
4749
+ let preserveValue = this.PreserveMethodFormControl.value;
4750
+ if (permanentValue === true && preserveValue === false) {
4751
+ this.redirectTooltip = '301 – Permanent and Not Preserve';
5211
4752
  }
5212
- else if (this.FeedItem.Status.Code === 1) {
5213
- return 'red';
4753
+ else if (permanentValue === false && preserveValue === false) {
4754
+ this.redirectTooltip = '302 – Not Permanent and Not Preserve';
5214
4755
  }
5215
- else if (this.FeedItem.Status.Code === 2) {
5216
- return 'blue';
4756
+ else if (permanentValue === false && preserveValue === true) {
4757
+ this.redirectTooltip = '307 – Not Permanent and Preserve';
5217
4758
  }
5218
- else {
5219
- return 'gray';
4759
+ else if (permanentValue === true && preserveValue === true) {
4760
+ this.redirectTooltip = '308 – Permanent and Preserve';
5220
4761
  }
5221
4762
  }
5222
- get State() {
5223
- return this.eacSvc.State;
5224
- }
5225
- // Life Cycle
5226
- ngOnInit() {
5227
- this.handleRefresh();
5228
- }
5229
- // API Methods
5230
- CalculateTimelapse(timestamp) {
5231
- return moment(timestamp).fromNow();
5232
- }
5233
- HandleAction(action) {
5234
- if (action.ActionType == 'Link') {
5235
- if (action.Action.startsWith('http')) {
5236
- window.open(action.Action, '_blank');
5237
- }
5238
- else {
5239
- window.location.href = action.Action;
5240
- }
4763
+ SaveProcessorDetails() {
4764
+ var _a, _b, _c, _d;
4765
+ const app = this.EditingApplication;
4766
+ app.LookupConfig.AllowedMethods = (_b = (_a = this.MethodsFormControl) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.split(' ').filter((v) => !!v);
4767
+ app.Processor.Type = this.ProcessorType;
4768
+ switch (app.Processor.Type) {
4769
+ case 'DFS':
4770
+ app.Processor.DefaultFile =
4771
+ this.DefaultFileFormControl.value || 'index.html';
4772
+ app.LowCodeUnit = {
4773
+ Type: this.LCUType,
4774
+ };
4775
+ switch (app.LowCodeUnit.Type) {
4776
+ case 'GitHub':
4777
+ app.LowCodeUnit.Organization =
4778
+ (_c = this.SourceControls[this.SourceControlFormControl.value]) === null || _c === void 0 ? void 0 : _c.Organization;
4779
+ app.LowCodeUnit.Repository =
4780
+ (_d = this.SourceControls[this.SourceControlFormControl.value]) === null || _d === void 0 ? void 0 : _d.Repository;
4781
+ app.LowCodeUnit.Build = this.BuildFormControl.value;
4782
+ app.LowCodeUnit.Path = this.BuildPathFormControl.value;
4783
+ app.LowCodeUnit.SourceControlLookup =
4784
+ this.SourceControlFormControl.value;
4785
+ break;
4786
+ case 'NPM':
4787
+ app.LowCodeUnit.Package = this.PackageFormControl.value;
4788
+ app.LowCodeUnit.Version = this.VersionFormControl.value;
4789
+ break;
4790
+ case 'WordPress':
4791
+ app.LowCodeUnit.APIRoot = this.APIRootFormControl.value;
4792
+ break;
4793
+ case 'Zip':
4794
+ app.LowCodeUnit.ZipFile = this.ZipFileFormControl.value;
4795
+ break;
4796
+ }
4797
+ break;
4798
+ case 'OAuth':
4799
+ app.Processor.Scopes = this.ScopesFormControl.value.split(' ');
4800
+ app.Processor.TokenLookup = this.TokenLookupFormControl.value;
4801
+ app.LowCodeUnit = {
4802
+ Type: this.LCUType,
4803
+ };
4804
+ switch (app.LowCodeUnit.Type) {
4805
+ case 'GitHubOAuth':
4806
+ app.LowCodeUnit.ClientID = this.ClientIDFormControl.value;
4807
+ app.LowCodeUnit.ClientSecret = this.ClientSecretFormControl.value;
4808
+ break;
4809
+ }
4810
+ break;
4811
+ case 'Proxy':
4812
+ app.Processor.InboundPath = this.InboundPathFormControl.value;
4813
+ app.LowCodeUnit = {
4814
+ Type: this.LCUType,
4815
+ };
4816
+ switch (app.LowCodeUnit.Type) {
4817
+ case 'API':
4818
+ app.LowCodeUnit.APIRoot = this.APIRootFormControl.value;
4819
+ app.LowCodeUnit.Security = this.SecurityFormControl.value;
4820
+ break;
4821
+ case 'SPA':
4822
+ app.LowCodeUnit.SPARoot = this.SPARootFormControl.value;
4823
+ break;
4824
+ }
4825
+ break;
4826
+ case 'Redirect':
4827
+ app.Processor.IncludeRequest = !!this.IncludeRequestFormControl.value;
4828
+ app.Processor.Permanent = !!this.PermanentFormControl.value;
4829
+ app.Processor.PreserveMethod = !!this.PreserveMethodFormControl.value;
4830
+ app.Processor.Redirect = this.RedirectFormControl.value;
4831
+ break;
5241
4832
  }
5242
- else if (action.ActionType == 'Modal') {
5243
- if (action.Action == 'AddSourceControl') {
5244
- this.OpenSourceControlDialog(null);
5245
- }
5246
- else {
5247
- alert('other modaled ' + action.Action);
5248
- }
4833
+ if (!app.LookupConfig.PathRegex.startsWith('/')) {
4834
+ app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
5249
4835
  }
5250
- }
5251
- OpenSourceControlDialog(scLookup) {
5252
- const dialogRef = this.dialog.open(SourceControlDialogComponent, {
5253
- width: '550px',
5254
- data: {
5255
- environment: this.Environment,
5256
- environmentLookup: this.ActiveEnvironmentLookup,
5257
- scLookup: scLookup,
5258
- },
5259
- });
5260
- dialogRef.afterClosed().subscribe((result) => {
5261
- // console.log('The dialog was closed');
5262
- // console.log("result:", result)
4836
+ const saveAppReq = {
4837
+ ProjectLookup: this.ProjectLookup,
4838
+ Application: app,
4839
+ ApplicationLookup: this.EditingApplicationLookup || Guid.CreateRaw(),
4840
+ };
4841
+ this.eacSvc.SaveApplicationAsCode(saveAppReq).then((res) => {
4842
+ this.SaveFormEvent.emit(res);
5263
4843
  });
5264
4844
  }
5265
- SafeHtml(html) {
5266
- return this.sanitizer.bypassSecurityTrustHtml(html);
5267
- }
5268
- // Helpers
5269
- handleRefresh() {
5270
- var _a;
5271
- if ((_a = this.FeedItem) === null || _a === void 0 ? void 0 : _a.RefreshLink) {
5272
- setTimeout(() => {
5273
- this.eacSvc.CheckUserFeedItem(this.FeedItem).subscribe((response) => __awaiter(this, void 0, void 0, function* () {
5274
- if (response.Status.Code === 0) {
5275
- this.FeedItem = response.Model;
5276
- this.handleRefresh();
5277
- }
5278
- else {
5279
- console.log(response);
5280
- }
5281
- }), (err) => {
5282
- console.log(err);
5283
- });
5284
- }, 5000);
5285
- }
5286
- }
5287
- }
5288
- MainFeedCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MainFeedCardComponent, deps: [{ token: EaCService }, { token: i2$3.MatDialog }, { token: i3$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
5289
- 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$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i2$2.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"] }] });
5290
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MainFeedCardComponent, decorators: [{
5291
- type: Component,
5292
- 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"] }]
5293
- }], ctorParameters: function () { return [{ type: EaCService }, { type: i2$3.MatDialog }, { type: i3$2.DomSanitizer }]; }, propDecorators: { FeedItem: [{
5294
- type: Input,
5295
- args: ['feed-item']
5296
- }] } });
5297
-
5298
- class TwoColumnHeaderComponent {
5299
- constructor() { }
5300
- ngOnInit() {
4845
+ SetEditingApplication(appLookup) {
4846
+ this.EditingApplication = new EaCApplicationAsCode();
4847
+ this.EditingApplicationLookup = appLookup;
4848
+ this.setupProcessorDetailsForm();
5301
4849
  }
5302
- }
5303
- TwoColumnHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5304
- 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"] }] });
5305
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, decorators: [{
5306
- type: Component,
5307
- 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"] }]
5308
- }], ctorParameters: function () { return []; } });
5309
-
5310
- class CardCarouselComponent {
5311
- constructor() {
5312
- this.carouselIndex = 0;
4850
+ SourceControlChanged(event) {
4851
+ this.listBuildPaths();
5313
4852
  }
5314
- ngOnInit() {
4853
+ ProcessorTypeChanged(event) {
4854
+ this.ProcessorType = event.value;
4855
+ this.setupProcessorTypeSubForm();
5315
4856
  }
5316
- ngAfterViewInit() {
5317
- this.assignCarouselClass();
4857
+ LCUTypeChanged(event) {
4858
+ this.LCUType = event.value;
4859
+ this.setupLcuTypeSubForm();
5318
4860
  }
5319
- LeftChevronClicked() {
5320
- this.removeCarouselClasses();
5321
- if (this.carouselIndex === 0) {
5322
- this.carouselIndex = this.Stats.length - 1;
5323
- }
5324
- else {
5325
- this.carouselIndex--;
5326
- }
5327
- this.assignCarouselClass();
4861
+ //HELPERS
4862
+ cleanupLcuTypeSubForm() {
4863
+ this.ProcessorDetailsFormGroup.removeControl('methods');
4864
+ this.ProcessorDetailsFormGroup.removeControl('apiRoot');
4865
+ this.ProcessorDetailsFormGroup.removeControl('security');
4866
+ this.ProcessorDetailsFormGroup.removeControl('spaRoot');
4867
+ this.ProcessorDetailsFormGroup.removeControl('applicationId');
4868
+ this.ProcessorDetailsFormGroup.removeControl('sourceControl');
4869
+ this.ProcessorDetailsFormGroup.removeControl('build');
4870
+ this.ProcessorDetailsFormGroup.removeControl('clientId');
4871
+ this.ProcessorDetailsFormGroup.removeControl('clientSecret');
4872
+ this.ProcessorDetailsFormGroup.removeControl('package');
4873
+ this.ProcessorDetailsFormGroup.removeControl('version');
4874
+ this.ProcessorDetailsFormGroup.removeControl('zipFile');
5328
4875
  }
5329
- MoreDetailsClicked() {
5330
- console.log("More details clicked on carousel item", this.Stats[this.carouselIndex]);
4876
+ cleanupProcessorTypeSubForm() {
4877
+ this.ProcessorDetailsFormGroup.removeControl('defaultFile');
4878
+ // this.ApplicationFormGroup.removeControl('dfsLcuType');
4879
+ // this.ApplicationFormGroup.removeControl('oauthLcuType');
4880
+ this.ProcessorDetailsFormGroup.removeControl('scopes');
4881
+ this.ProcessorDetailsFormGroup.removeControl('tokenLookup');
4882
+ this.ProcessorDetailsFormGroup.removeControl('inboundPath');
4883
+ this.ProcessorDetailsFormGroup.removeControl('proxyLcuType');
4884
+ this.ProcessorDetailsFormGroup.removeControl('includeRequest');
4885
+ this.ProcessorDetailsFormGroup.removeControl('redirect');
4886
+ this.ProcessorDetailsFormGroup.removeControl('permanent');
4887
+ this.ProcessorDetailsFormGroup.removeControl('preserveMethod');
4888
+ this.cleanupLcuTypeSubForm();
5331
4889
  }
5332
- RightChevronClicked() {
5333
- this.removeCarouselClasses();
5334
- if (this.carouselIndex === this.Stats.length - 1) {
5335
- this.carouselIndex = 0;
5336
- }
5337
- else {
5338
- this.carouselIndex++;
5339
- }
5340
- this.assignCarouselClass();
4890
+ listBuildPaths() {
4891
+ var _a, _b;
4892
+ this.State.Loading = true;
4893
+ console.log("Source Control: ", this.SourceControls[this.SourceControlFormControl.value]);
4894
+ this.appsFlowSvc
4895
+ .ListBuildPaths((_a = this.SourceControls[this.SourceControlFormControl.value]) === null || _a === void 0 ? void 0 : _a.Organization, (_b = this.SourceControls[this.SourceControlFormControl.value]) === null || _b === void 0 ? void 0 : _b.Repository)
4896
+ .subscribe((response) => {
4897
+ this.BuildPathOptions = response.Model;
4898
+ console.log("build path options: ", this.BuildPathOptions);
4899
+ this.State.Loading = false;
4900
+ // if (this.BuildPathOptions?.length === 1) {
4901
+ // this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
4902
+ // }
4903
+ });
5341
4904
  }
5342
- //HELPERS
5343
- removeCarouselClasses() {
5344
- for (let i = 0; i < this.Stats.length; i++) {
5345
- if (i === this.carouselIndex) {
5346
- document.getElementById("carousel-" + this.carouselIndex).classList.remove('active');
5347
- }
5348
- else {
5349
- document.getElementById("carousel-" + i).classList.remove('hidden');
4905
+ setupLcuTypeSubForm() {
4906
+ this.cleanupLcuTypeSubForm();
4907
+ if (this.LCUType) {
4908
+ switch (this.LCUType) {
4909
+ case 'API':
4910
+ this.setupLCUAPIForm();
4911
+ break;
4912
+ case 'ApplicationPointer':
4913
+ this.setupLCUApplicationPointerForm();
4914
+ break;
4915
+ case 'GitHub':
4916
+ this.setupLCUGitHubForm();
4917
+ break;
4918
+ case 'GitHubOAuth':
4919
+ this.setupLCUGitHubOAuthForm();
4920
+ break;
4921
+ case 'WordPress':
4922
+ this.setupLCUWordPressForm();
4923
+ break;
4924
+ // case 'NPM':
4925
+ // this.setupLCUNPMForm();
4926
+ // break;
4927
+ case 'SPA':
4928
+ this.setupLCUSPAForm();
4929
+ break;
4930
+ case 'Zip':
4931
+ this.setupLCUZipForm();
4932
+ break;
5350
4933
  }
5351
4934
  }
5352
4935
  }
5353
- assignCarouselClass() {
5354
- for (let i = 0; i < this.Stats.length; i++) {
5355
- if (i === this.carouselIndex) {
5356
- document.getElementById("carousel-" + this.carouselIndex).classList.add('active');
5357
- }
5358
- else {
5359
- document.getElementById("carousel-" + i).classList.add('hidden');
5360
- }
4936
+ setupProcessorDetailsForm() {
4937
+ var _a, _b;
4938
+ this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
4939
+ // console.log('EDITING APP = ', this.EditingApplication);
4940
+ if (this.EditingApplication != null) {
4941
+ this.ProcessorDetailsFormGroup = this.formBldr.group({
4942
+ procType: [this.ProcessorType, [Validators.required]],
4943
+ });
4944
+ // this.setupDfsForm();
4945
+ // this.setupLcuTypeSubForm();
4946
+ this.setupProcessorTypeSubForm();
5361
4947
  }
5362
4948
  }
5363
- }
5364
- CardCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5365
- 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"] }] });
5366
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, decorators: [{
5367
- type: Component,
5368
- 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"] }]
5369
- }], ctorParameters: function () { return []; }, propDecorators: { Stats: [{
5370
- type: Input,
5371
- args: ['stats']
5372
- }] } });
5373
-
5374
- class SecurityToggleComponent {
5375
- constructor(eacSvc, formBldr) {
5376
- this.eacSvc = eacSvc;
5377
- this.formBldr = formBldr;
5378
- this.SaveFormEvent = new EventEmitter;
5379
- this.SkeletonEffect = 'wave';
4949
+ setupLCUGitHubForm() {
4950
+ var _a, _b, _c;
4951
+ console.log('EditingApplication: ', this.EditingApplication);
4952
+ this.ProcessorDetailsFormGroup.addControl('sourceControl', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SourceControlLookup) || '', [Validators.required]));
4953
+ this.ProcessorDetailsFormGroup.addControl('buildPath', this.formBldr.control(((_b = this.EditingApplication.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Path) || '', [
4954
+ Validators.required,
4955
+ ]));
4956
+ this.ProcessorDetailsFormGroup.addControl('build', this.formBldr.control(((_c = this.EditingApplication.LowCodeUnit) === null || _c === void 0 ? void 0 : _c.Build) || 'latest', [Validators.required]));
4957
+ this.listBuildPaths();
5380
4958
  }
5381
- get IsPrivateFormControl() {
4959
+ setupLCUApplicationPointerForm() {
5382
4960
  var _a;
5383
- return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isPrivate;
4961
+ this.ProcessorDetailsFormGroup.addControl('applicationId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ApplicationID) || '', [Validators.required]));
5384
4962
  }
5385
- get IsTriggerSignInFormControl() {
4963
+ setupLCUSPAForm() {
5386
4964
  var _a;
5387
- return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isTriggerSignIn;
4965
+ this.ProcessorDetailsFormGroup.addControl('spaRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SPARoot) || '', [Validators.required]));
5388
4966
  }
5389
- get State() {
5390
- return this.eacSvc.State;
4967
+ setupLCUAPIForm() {
4968
+ var _a, _b, _c, _d;
4969
+ this.ProcessorDetailsFormGroup.addControl('methods', this.formBldr.control(((_b = (_a = this.EditingApplication.LookupConfig) === null || _a === void 0 ? void 0 : _a.AllowedMethods) === null || _b === void 0 ? void 0 : _b.join(' ')) || '', []));
4970
+ this.ProcessorDetailsFormGroup.addControl('apiRoot', this.formBldr.control(((_c = this.EditingApplication.LowCodeUnit) === null || _c === void 0 ? void 0 : _c.APIRoot) || '', [Validators.required]));
4971
+ this.ProcessorDetailsFormGroup.addControl('security', this.formBldr.control(((_d = this.EditingApplication.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Security) || '', [Validators.required]));
5391
4972
  }
5392
- ngOnInit() {
5393
- this.setupSecurityFormGroup();
4973
+ setupLCUGitHubOAuthForm() {
4974
+ var _a, _b;
4975
+ this.ProcessorDetailsFormGroup.addControl('clientId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ClientID) || '', [Validators.required]));
4976
+ this.ProcessorDetailsFormGroup.addControl('clientSecret', this.formBldr.control(((_b = this.EditingApplication.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.ClientSecret) || '', [Validators.required]));
5394
4977
  }
5395
- SecuritySubmit() {
5396
- //save the security settings
5397
- console.log("submitting security values: ", this.SecurityFormGroup.value);
5398
- this.SaveFormEvent.emit(this.SecurityFormGroup.value);
4978
+ setupLCUWordPressForm() {
4979
+ var _a;
4980
+ this.ProcessorDetailsFormGroup.addControl('apiRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.APIRoot) || '', [Validators.required]));
5399
4981
  }
5400
- setupSecurityFormGroup() {
4982
+ setupProxyForm() {
5401
4983
  var _a, _b;
5402
- this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
5403
- this.SecurityFormGroup = this.formBldr.group({});
5404
- this.setupSecurityForm();
4984
+ this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
4985
+ this.ProcessorDetailsFormGroup.addControl('inboundPath', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.InboundPath) || '', [Validators.required]));
4986
+ this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
5405
4987
  }
5406
- setupSecurityForm() {
4988
+ setupRedirectForm() {
4989
+ var _a, _b, _c, _d;
4990
+ this.ProcessorDetailsFormGroup.addControl('redirect', this.formBldr.control(((_a = this.EditingApplication.Processor) === null || _a === void 0 ? void 0 : _a.Redirect) || '', [
4991
+ Validators.required,
4992
+ ]));
4993
+ this.ProcessorDetailsFormGroup.addControl('permanent', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.Permanent) || false, []));
4994
+ this.ProcessorDetailsFormGroup.addControl('preserveMethod', this.formBldr.control(((_c = this.EditingApplication.Processor) === null || _c === void 0 ? void 0 : _c.PreserveMethod) || false, []));
4995
+ this.ProcessorDetailsFormGroup.addControl('includeRequest', this.formBldr.control(((_d = this.EditingApplication.Processor) === null || _d === void 0 ? void 0 : _d.IncludeRequest) || false, []));
4996
+ this.DetermineTooltipText();
4997
+ }
4998
+ setupOAuthForm() {
4999
+ var _a, _b, _c, _d;
5000
+ this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
5001
+ this.ProcessorDetailsFormGroup.addControl('scopes', this.formBldr.control(((_c = (_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.Scopes) === null || _c === void 0 ? void 0 : _c.Join(' ')) || '', [Validators.required]));
5002
+ this.ProcessorDetailsFormGroup.addControl('tokenLookup', this.formBldr.control(((_d = this.EditingApplication.Processor) === null || _d === void 0 ? void 0 : _d.TokenLookup) || '', [Validators.required]));
5003
+ this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
5004
+ }
5005
+ setupLCUZipForm() {
5006
+ var _a;
5007
+ this.ProcessorDetailsFormGroup.addControl('zipFile', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ZipFile) || '', [Validators.required]));
5008
+ }
5009
+ setupDfsForm() {
5407
5010
  var _a, _b;
5408
- this.SecurityFormGroup.addControl('isPrivate', this.formBldr.control(((_a = this.EditingApplication.LookupConfig) === null || _a === void 0 ? void 0 : _a.IsPrivate) || false, [Validators.required]));
5409
- this.SecurityFormGroup.addControl('isTriggerSignIn', this.formBldr.control(((_b = this.EditingApplication.LookupConfig) === null || _b === void 0 ? void 0 : _b.IsTriggerSignIn) || false, [Validators.required]));
5011
+ this.LCUType = ((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.Type) || '';
5012
+ this.ProcessorDetailsFormGroup.addControl('defaultFile', this.formBldr.control(((_b = this.EditingApplication.Processor) === null || _b === void 0 ? void 0 : _b.DefaultFile) || 'index.html', [Validators.required]));
5013
+ this.ProcessorDetailsFormGroup.addControl('lcuType', this.formBldr.control(this.LCUType, [Validators.required]));
5014
+ }
5015
+ setupProcessorTypeSubForm() {
5016
+ this.cleanupProcessorTypeSubForm();
5017
+ if (this.ProcessorType) {
5018
+ switch (this.ProcessorType) {
5019
+ case 'DFS':
5020
+ this.setupDfsForm();
5021
+ break;
5022
+ case 'OAuth':
5023
+ this.setupOAuthForm();
5024
+ break;
5025
+ case 'Proxy':
5026
+ this.setupProxyForm();
5027
+ break;
5028
+ case 'Redirect':
5029
+ this.setupRedirectForm();
5030
+ break;
5031
+ }
5032
+ }
5033
+ this.setupLcuTypeSubForm();
5410
5034
  }
5411
5035
  }
5412
- 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 });
5413
- 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\n class=\"security-form\"\n [formGroup]=\"SecurityFormGroup\"\n (ngSubmit)=\"SecuritySubmit()\"\n>\n <mat-card class=\"flow-card\">\n <!-- SKELETON LOADING -->\n <ng-container *ngIf=\"State?.Loading\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title skeleton-text [effect]=\"SkeletonEffect\">\n Security Settings\n </mat-card-title>\n <div fxLayoutAlign=\"space-around center\">\n <div skeleton-text [effect]=\"SkeletonEffect\">XXX</div>\n\n <mat-icon skeleton-text [effect]=\"SkeletonEffect\">\n info_outline\n </mat-icon>\n </div>\n </mat-card-header>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n <div\n fxFlex=\"100%\"\n skeleton-text\n [effect]=\"SkeletonEffect\"\n fxLayoutAlign=\"center center\"\n >\n <mat-icon skeleton-text [effect]=\"SkeletonEffect\"> save </mat-icon>\n\n Save Settings\n </div>\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 <button\n mat-raised-button\n type=\"submit\"\n fxFlex=\"100%\"\n color=\"primary\"\n [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\"\n >\n <mat-icon>save</mat-icon>\n Save Settings\n </button>\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: i5$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]" }] });
5414
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SecurityToggleComponent, decorators: [{
5036
+ 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 });
5037
+ 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: i5$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"] }] });
5038
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ProcessorDetailsFormComponent, decorators: [{
5415
5039
  type: Component,
5416
- args: [{ selector: 'lcu-security-toggle', template: "<form\n class=\"security-form\"\n [formGroup]=\"SecurityFormGroup\"\n (ngSubmit)=\"SecuritySubmit()\"\n>\n <mat-card class=\"flow-card\">\n <!-- SKELETON LOADING -->\n <ng-container *ngIf=\"State?.Loading\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title skeleton-text [effect]=\"SkeletonEffect\">\n Security Settings\n </mat-card-title>\n <div fxLayoutAlign=\"space-around center\">\n <div skeleton-text [effect]=\"SkeletonEffect\">XXX</div>\n\n <mat-icon skeleton-text [effect]=\"SkeletonEffect\">\n info_outline\n </mat-icon>\n </div>\n </mat-card-header>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n <div\n fxFlex=\"100%\"\n skeleton-text\n [effect]=\"SkeletonEffect\"\n fxLayoutAlign=\"center center\"\n >\n <mat-icon skeleton-text [effect]=\"SkeletonEffect\"> save </mat-icon>\n\n Save Settings\n </div>\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 <button\n mat-raised-button\n type=\"submit\"\n fxFlex=\"100%\"\n color=\"primary\"\n [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\"\n >\n <mat-icon>save</mat-icon>\n Save Settings\n </button>\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"] }]
5417
- }], ctorParameters: function () { return [{ type: EaCService }, { type: i1$2.FormBuilder }]; }, propDecorators: { EditingApplication: [{
5040
+ 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"] }]
5041
+ }], ctorParameters: function () { return [{ type: ApplicationsFlowService }, { type: i1$2.FormBuilder }, { type: EaCService }]; }, propDecorators: { EditingApplication: [{
5418
5042
  type: Input,
5419
5043
  args: ['editing-application']
5044
+ }], EditingApplicationLookup: [{
5045
+ type: Input,
5046
+ args: ['editing-application-lookup']
5047
+ }], HasSaveButton: [{
5048
+ type: Input,
5049
+ args: ['has-save-button']
5050
+ }], SourceControlLookups: [{
5051
+ type: Input,
5052
+ args: ['source-control-lookups']
5053
+ }], ProjectLookup: [{
5054
+ type: Input,
5055
+ args: ['project-lookup']
5420
5056
  }], SaveFormEvent: [{
5421
5057
  type: Output,
5422
5058
  args: ['save-form-event']
@@ -5677,82 +5313,186 @@ class BuildPipelineFormComponent {
5677
5313
  // console.log('HOSTING DETAILS: ', this.HostingDetails);
5678
5314
  }
5679
5315
  }
5680
- 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 });
5681
- 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]" }] });
5682
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineFormComponent, decorators: [{
5316
+ 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 });
5317
+ 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]" }] });
5318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineFormComponent, decorators: [{
5319
+ type: Component,
5320
+ 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"] }]
5321
+ }], ctorParameters: function () { return [{ type: EaCService }, { type: i1$2.FormBuilder }, { type: ApplicationsFlowService }]; }, propDecorators: { DevOpsActionLookup: [{
5322
+ type: Input,
5323
+ args: ['devops-action-lookup']
5324
+ }], Disabled: [{
5325
+ type: Input,
5326
+ args: ['disabled']
5327
+ }], Environment: [{
5328
+ type: Input,
5329
+ args: ['environment']
5330
+ }], EnvironmentLookup: [{
5331
+ type: Input,
5332
+ args: ['environment-lookup']
5333
+ }], HostingDetails: [{
5334
+ type: Input,
5335
+ args: ['hosting-details']
5336
+ }], ResponseEvent: [{
5337
+ type: Output,
5338
+ args: ['response-event']
5339
+ }] } });
5340
+
5341
+ class BuildPipelineDialogComponent {
5342
+ constructor(dialogRef, eacSvc, data, snackBar) {
5343
+ this.dialogRef = dialogRef;
5344
+ this.eacSvc = eacSvc;
5345
+ this.data = data;
5346
+ this.snackBar = snackBar;
5347
+ }
5348
+ get BuildPipelineFormGroup() {
5349
+ var _a;
5350
+ return (_a = this.BuildPipelineControl) === null || _a === void 0 ? void 0 : _a.BuildPipelineFormGroup;
5351
+ }
5352
+ get HasConnection() {
5353
+ return this.State.GitHub.HasConnection;
5354
+ }
5355
+ get State() {
5356
+ return this.eacSvc.State;
5357
+ }
5358
+ ngOnInit() {
5359
+ }
5360
+ CloseDialog() {
5361
+ this.dialogRef.close();
5362
+ }
5363
+ HandleResponseEvent(event) {
5364
+ console.log("Response Event: ", event);
5365
+ if (event.Code === 0) {
5366
+ this.snackBar.open("Build Pipeline Created Succesfully", "Dismiss", {
5367
+ duration: 5000
5368
+ });
5369
+ this.CloseDialog();
5370
+ }
5371
+ else {
5372
+ this.ErrorMessage = event.Message;
5373
+ }
5374
+ }
5375
+ SaveBuildPipeline() {
5376
+ this.BuildPipelineControl.SaveEnvironment();
5377
+ }
5378
+ }
5379
+ BuildPipelineDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineDialogComponent, deps: [{ token: i2$3.MatDialogRef }, { token: EaCService }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
5380
+ 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$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$3.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$3.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"] }] });
5381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineDialogComponent, decorators: [{
5382
+ type: Component,
5383
+ 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"] }]
5384
+ }], ctorParameters: function () {
5385
+ return [{ type: i2$3.MatDialogRef }, { type: EaCService }, { type: undefined, decorators: [{
5386
+ type: Inject,
5387
+ args: [MAT_DIALOG_DATA]
5388
+ }] }, { type: i3$1.MatSnackBar }];
5389
+ }, propDecorators: { BuildPipelineControl: [{
5390
+ type: ViewChild,
5391
+ args: [BuildPipelineFormComponent]
5392
+ }] } });
5393
+
5394
+ class EditApplicationFormComponent {
5395
+ constructor(formBldr, eacSvc) {
5396
+ this.formBldr = formBldr;
5397
+ this.eacSvc = eacSvc;
5398
+ this.SaveFormEvent = new EventEmitter;
5399
+ this.HasSaveButton = true;
5400
+ }
5401
+ get DescriptionFormControl() {
5402
+ var _a;
5403
+ return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.description;
5404
+ }
5405
+ get NameFormControl() {
5406
+ var _a;
5407
+ return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.name;
5408
+ }
5409
+ get RouteFormControl() {
5410
+ var _a;
5411
+ return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.route;
5412
+ }
5413
+ get State() {
5414
+ return this.eacSvc.State;
5415
+ }
5416
+ ngOnInit() {
5417
+ this.setupApplicationForm();
5418
+ }
5419
+ SubmitApplicationControl() {
5420
+ console.log("application form: ", this.ApplicationFormGroup.value);
5421
+ this.SaveApplication();
5422
+ }
5423
+ SaveApplication() {
5424
+ var _a, _b;
5425
+ const app = this.EditingApplication;
5426
+ // console.log("APP=", app);
5427
+ app.Application = {
5428
+ Name: this.NameFormControl.value,
5429
+ Description: this.DescriptionFormControl.value,
5430
+ PriorityShift: ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Application) === null || _b === void 0 ? void 0 : _b.PriorityShift) || 0,
5431
+ };
5432
+ app.LookupConfig.PathRegex = `${this.RouteFormControl.value}.*`;
5433
+ switch (app.Processor.Type) {
5434
+ case 'DFS':
5435
+ app.Processor.BaseHref = `${this.RouteFormControl.value}/`.replace('//', '/');
5436
+ break;
5437
+ }
5438
+ if (!app.LookupConfig.PathRegex.startsWith('/')) {
5439
+ app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
5440
+ }
5441
+ const saveAppReq = {
5442
+ ProjectLookup: this.ProjectLookup,
5443
+ Application: app,
5444
+ ApplicationLookup: this.ApplicationLookup,
5445
+ };
5446
+ console.log("processor details being submitted: ", app.Processor);
5447
+ this.eacSvc.SaveApplicationAsCode(saveAppReq).then(res => {
5448
+ this.SaveFormEvent.emit(res);
5449
+ });
5450
+ }
5451
+ //HELPERS
5452
+ setupApplicationForm() {
5453
+ var _a, _b, _c;
5454
+ if (this.EditingApplication != null) {
5455
+ this.ApplicationFormGroup = this.formBldr.group({
5456
+ name: [(_a = this.EditingApplication.Application) === null || _a === void 0 ? void 0 : _a.Name, Validators.required],
5457
+ description: [
5458
+ (_b = this.EditingApplication.Application) === null || _b === void 0 ? void 0 : _b.Description,
5459
+ Validators.required,
5460
+ ],
5461
+ route: [this.CurrentRoute ? this.CurrentRoute :
5462
+ ((_c = this.EditingApplication.LookupConfig) === null || _c === void 0 ? void 0 : _c.PathRegex.replace('.*', '')) ||
5463
+ '/',
5464
+ Validators.required,],
5465
+ // priority: [
5466
+ // this.EditingApplication.Application?.Priority || 10000,
5467
+ // Validators.required,
5468
+ // ],
5469
+ });
5470
+ }
5471
+ }
5472
+ }
5473
+ 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 });
5474
+ 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"] }] });
5475
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationFormComponent, decorators: [{
5683
5476
  type: Component,
5684
- 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"] }]
5685
- }], ctorParameters: function () { return [{ type: EaCService }, { type: i1$2.FormBuilder }, { type: ApplicationsFlowService }]; }, propDecorators: { DevOpsActionLookup: [{
5477
+ 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"] }]
5478
+ }], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: EaCService }]; }, propDecorators: { ApplicationLookup: [{
5686
5479
  type: Input,
5687
- args: ['devops-action-lookup']
5688
- }], Disabled: [{
5480
+ args: ['application-lookup']
5481
+ }], CurrentRoute: [{
5689
5482
  type: Input,
5690
- args: ['disabled']
5691
- }], Environment: [{
5483
+ args: ['current-route']
5484
+ }], EditingApplication: [{
5692
5485
  type: Input,
5693
- args: ['environment']
5694
- }], EnvironmentLookup: [{
5486
+ args: ['editing-application']
5487
+ }], HasSaveButton: [{
5695
5488
  type: Input,
5696
- args: ['environment-lookup']
5697
- }], HostingDetails: [{
5489
+ args: ['has-save-button']
5490
+ }], ProjectLookup: [{
5698
5491
  type: Input,
5699
- args: ['hosting-details']
5700
- }], ResponseEvent: [{
5492
+ args: ['project-lookup']
5493
+ }], SaveFormEvent: [{
5701
5494
  type: Output,
5702
- args: ['response-event']
5703
- }] } });
5704
-
5705
- class BuildPipelineDialogComponent {
5706
- constructor(dialogRef, eacSvc, data, snackBar) {
5707
- this.dialogRef = dialogRef;
5708
- this.eacSvc = eacSvc;
5709
- this.data = data;
5710
- this.snackBar = snackBar;
5711
- }
5712
- get BuildPipelineFormGroup() {
5713
- var _a;
5714
- return (_a = this.BuildPipelineControl) === null || _a === void 0 ? void 0 : _a.BuildPipelineFormGroup;
5715
- }
5716
- get HasConnection() {
5717
- return this.State.GitHub.HasConnection;
5718
- }
5719
- get State() {
5720
- return this.eacSvc.State;
5721
- }
5722
- ngOnInit() {
5723
- }
5724
- CloseDialog() {
5725
- this.dialogRef.close();
5726
- }
5727
- HandleResponseEvent(event) {
5728
- console.log("Response Event: ", event);
5729
- if (event.Code === 0) {
5730
- this.snackBar.open("Build Pipeline Created Succesfully", "Dismiss", {
5731
- duration: 5000
5732
- });
5733
- this.CloseDialog();
5734
- }
5735
- else {
5736
- this.ErrorMessage = event.Message;
5737
- }
5738
- }
5739
- SaveBuildPipeline() {
5740
- this.BuildPipelineControl.SaveEnvironment();
5741
- }
5742
- }
5743
- BuildPipelineDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineDialogComponent, deps: [{ token: i2$3.MatDialogRef }, { token: EaCService }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
5744
- 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$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$3.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$3.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"] }] });
5745
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineDialogComponent, decorators: [{
5746
- type: Component,
5747
- 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"] }]
5748
- }], ctorParameters: function () {
5749
- return [{ type: i2$3.MatDialogRef }, { type: EaCService }, { type: undefined, decorators: [{
5750
- type: Inject,
5751
- args: [MAT_DIALOG_DATA]
5752
- }] }, { type: i3$1.MatSnackBar }];
5753
- }, propDecorators: { BuildPipelineControl: [{
5754
- type: ViewChild,
5755
- args: [BuildPipelineFormComponent]
5495
+ args: ['save-form-event']
5756
5496
  }] } });
5757
5497
 
5758
5498
  class BreadcrumbComponent {
@@ -5862,7 +5602,7 @@ class BreadcrumbComponent {
5862
5602
  }
5863
5603
  }
5864
5604
  BreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: EaCService }], target: i0.ɵɵFactoryTarget.Component });
5865
- 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: i2$1.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"] }] });
5605
+ 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: i2$1.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"] }] });
5866
5606
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BreadcrumbComponent, decorators: [{
5867
5607
  type: Component,
5868
5608
  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"] }]
@@ -5934,26 +5674,195 @@ class EditApplicationDialogComponent {
5934
5674
  this.CloseDialog();
5935
5675
  }
5936
5676
  else {
5937
- this.ErrorMessage = event.Message;
5677
+ this.ErrorMessage = event.Message;
5678
+ }
5679
+ }
5680
+ SaveApplication() {
5681
+ this.EditApplicationControl.SaveApplication();
5682
+ }
5683
+ }
5684
+ EditApplicationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationDialogComponent, deps: [{ token: EaCService }, { token: i2$3.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
5685
+ EditApplicationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: EditApplicationDialogComponent, selector: "lcu-edit-application-dialog", viewQueries: [{ propertyName: "EditApplicationControl", first: true, predicate: EditApplicationFormComponent, descendants: true }], ngImport: i0, template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Edit Application:\n {{ data.application?.Application?.Name }}</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<lcu-edit-application-form \n [application-lookup]=\"data.applicationLookup\"\n [editing-application]=\"data.application\"\n [project-lookup]=\"data.projectLookup\"\n (save-form-event)=\"HandleSaveApplicationEvent($event)\">\n</lcu-edit-application-form>\n\n<mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n</mat-error>\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 *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"25%\" \n color=\"primary\" \n (click)=\"SaveApplication()\"\n [disabled]=\"!ApplicationFormGroup?.valid || !ApplicationFormGroup?.dirty\">\n <!-- <mat-icon>save</mat-icon> -->\n Save\n </button>\n\n</mat-dialog-actions>\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"] }], 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$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$3.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$3.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"] }] });
5686
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationDialogComponent, decorators: [{
5687
+ type: Component,
5688
+ args: [{ selector: 'lcu-edit-application-dialog', template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Edit Application:\n {{ data.application?.Application?.Name }}</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<lcu-edit-application-form \n [application-lookup]=\"data.applicationLookup\"\n [editing-application]=\"data.application\"\n [project-lookup]=\"data.projectLookup\"\n (save-form-event)=\"HandleSaveApplicationEvent($event)\">\n</lcu-edit-application-form>\n\n<mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n</mat-error>\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 *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"25%\" \n color=\"primary\" \n (click)=\"SaveApplication()\"\n [disabled]=\"!ApplicationFormGroup?.valid || !ApplicationFormGroup?.dirty\">\n <!-- <mat-icon>save</mat-icon> -->\n Save\n </button>\n\n</mat-dialog-actions>\n\n", styles: [""] }]
5689
+ }], ctorParameters: function () {
5690
+ return [{ type: EaCService }, { type: i2$3.MatDialogRef }, { type: undefined, decorators: [{
5691
+ type: Inject,
5692
+ args: [MAT_DIALOG_DATA]
5693
+ }] }, { type: i3$1.MatSnackBar }];
5694
+ }, propDecorators: { EditApplicationControl: [{
5695
+ type: ViewChild,
5696
+ args: [EditApplicationFormComponent]
5697
+ }] } });
5698
+
5699
+ class NewApplicationDialogComponent {
5700
+ constructor(eacSvc, dialogRef, data, snackBar) {
5701
+ this.eacSvc = eacSvc;
5702
+ this.dialogRef = dialogRef;
5703
+ this.data = data;
5704
+ this.snackBar = snackBar;
5705
+ this.HasSaveButton = false;
5706
+ }
5707
+ get Environment() {
5708
+ var _a, _b;
5709
+ return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[this.data.environmentLookup];
5710
+ }
5711
+ get SourceControls() {
5712
+ var _a;
5713
+ return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources) || {};
5714
+ }
5715
+ get SourceControlLookups() {
5716
+ return Object.keys(this.Environment.Sources || {});
5717
+ }
5718
+ get State() {
5719
+ return this.eacSvc.State;
5720
+ }
5721
+ ngOnInit() {
5722
+ this.SetupApplication(Guid.CreateRaw());
5723
+ }
5724
+ CloseDialog() {
5725
+ this.dialogRef.close();
5726
+ }
5727
+ SetupApplication(appLookup) {
5728
+ this.NewApplication = new EaCApplicationAsCode;
5729
+ this.NewApplicationLookup = appLookup;
5730
+ }
5731
+ SaveApplication() {
5732
+ var _a, _b;
5733
+ const app = {
5734
+ Application: {
5735
+ Name: this.ApplicationFormControls.NameFormControl.value,
5736
+ Description: this.ApplicationFormControls.DescriptionFormControl.value,
5737
+ PriorityShift: 0,
5738
+ },
5739
+ AccessRightLookups: [],
5740
+ DataTokens: {},
5741
+ LicenseConfigurationLookups: [],
5742
+ LookupConfig: {
5743
+ IsPrivate: false,
5744
+ IsTriggerSignIn: false,
5745
+ PathRegex: `${this.ApplicationFormControls.RouteFormControl.value}.*`,
5746
+ QueryRegex: '',
5747
+ HeaderRegex: '',
5748
+ AllowedMethods: (_b = (_a = this.ProcessorDetailsFormControls.MethodsFormControl) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.split(' ').filter((v) => !!v),
5749
+ },
5750
+ Processor: {
5751
+ Type: this.ProcessorDetailsFormControls.ProcessorType,
5752
+ },
5753
+ };
5754
+ switch (app.Processor.Type) {
5755
+ case 'DFS':
5756
+ app.Processor.BaseHref = `${this.ApplicationFormControls.RouteFormControl.value}/`.replace('//', '/');
5757
+ app.Processor.DefaultFile =
5758
+ this.ProcessorDetailsFormControls.DefaultFileFormControl.value || 'index.html';
5759
+ app.LowCodeUnit = {
5760
+ Type: this.ProcessorDetailsFormControls.LCUType,
5761
+ };
5762
+ switch (app.LowCodeUnit.Type) {
5763
+ case 'GitHub':
5764
+ app.LowCodeUnit.Organization =
5765
+ this.SourceControls[this.ProcessorDetailsFormControls.SourceControlFormControl.value].Organization;
5766
+ app.LowCodeUnit.Repository =
5767
+ this.SourceControls[this.ProcessorDetailsFormControls.SourceControlFormControl.value].Repository;
5768
+ app.LowCodeUnit.Build = this.ProcessorDetailsFormControls.BuildFormControl.value;
5769
+ app.LowCodeUnit.Path =
5770
+ this.ProcessorDetailsFormControls.BuildPathFormControl.value;
5771
+ break;
5772
+ case 'NPM':
5773
+ app.LowCodeUnit.Package = this.ProcessorDetailsFormControls.PackageFormControl.value;
5774
+ app.LowCodeUnit.Version = this.ProcessorDetailsFormControls.VersionFormControl.value;
5775
+ break;
5776
+ case 'Zip':
5777
+ app.LowCodeUnit.ZipFile = this.ProcessorDetailsFormControls.ZipFileFormControl.value;
5778
+ break;
5779
+ }
5780
+ break;
5781
+ case 'OAuth':
5782
+ app.Processor.Scopes = this.ProcessorDetailsFormControls.ScopesFormControl.value.split(' ');
5783
+ app.Processor.TokenLookup = this.ProcessorDetailsFormControls.TokenLookupFormControl.value;
5784
+ app.LowCodeUnit = {
5785
+ Type: this.ProcessorDetailsFormControls.LCUType,
5786
+ };
5787
+ switch (app.LowCodeUnit.Type) {
5788
+ case 'GitHubOAuth':
5789
+ app.LowCodeUnit.ClientID = this.ProcessorDetailsFormControls.ClientIDFormControl.value;
5790
+ app.LowCodeUnit.ClientSecret = this.ProcessorDetailsFormControls.ClientSecretFormControl.value;
5791
+ break;
5792
+ }
5793
+ break;
5794
+ case 'Proxy':
5795
+ app.Processor.InboundPath = this.ProcessorDetailsFormControls.InboundPathFormControl.value;
5796
+ app.LowCodeUnit = {
5797
+ Type: this.ProcessorDetailsFormControls.LCUType,
5798
+ };
5799
+ switch (app.LowCodeUnit.Type) {
5800
+ case 'API':
5801
+ app.LowCodeUnit.APIRoot = this.ProcessorDetailsFormControls.APIRootFormControl.value;
5802
+ app.LowCodeUnit.Security = this.ProcessorDetailsFormControls.SecurityFormControl.value;
5803
+ break;
5804
+ case 'SPA':
5805
+ app.LowCodeUnit.SPARoot = this.ProcessorDetailsFormControls.SPARootFormControl.value;
5806
+ break;
5807
+ }
5808
+ break;
5809
+ case 'Redirect':
5810
+ app.Processor.Permanent = !!this.ProcessorDetailsFormControls.PermanentFormControl.value;
5811
+ app.Processor.PreserveMethod = !!this.ProcessorDetailsFormControls.PreserveMethodFormControl.value;
5812
+ app.Processor.Redirect = this.ProcessorDetailsFormControls.RedirectFormControl.value;
5813
+ break;
5814
+ }
5815
+ if (!app.LookupConfig.PathRegex.startsWith('/')) {
5816
+ app.LookupConfig.PathRegex = `/${app.LookupConfig.PathRegex}`;
5817
+ }
5818
+ const saveAppReq = {
5819
+ ProjectLookup: this.data.projectLookup,
5820
+ Application: app,
5821
+ ApplicationLookup: this.NewApplicationLookup,
5822
+ };
5823
+ // this.HasBuildFormControl.value && taken out from below if statement
5824
+ if (this.ProcessorDetailsFormControls.ProcessorType !== 'redirect' && this.ProcessorDetailsFormControls.LCUType === 'GitHub') {
5825
+ if (app) {
5826
+ app.LowCodeUnit.SourceControlLookup = this.ProcessorDetailsFormControls.SourceControlFormControl.value;
5827
+ }
5828
+ }
5829
+ else if (app) {
5830
+ app.LowCodeUnit.SourceControlLookup = null;
5831
+ }
5832
+ // console.log("Save new App request: ", saveAppReq);
5833
+ this.eacSvc.SaveApplicationAsCode(saveAppReq).then(res => {
5834
+ this.handleSaveStatus(res);
5835
+ });
5836
+ }
5837
+ handleSaveStatus(status) {
5838
+ console.log("event to save: ", status);
5839
+ if (status.Code === 0) {
5840
+ this.snackBar.open("Application Succesfully Created", "Dismiss", {
5841
+ duration: 5000
5842
+ });
5843
+ this.CloseDialog();
5844
+ }
5845
+ else {
5846
+ this.ErrorMessage = status.Message;
5938
5847
  }
5939
5848
  }
5940
- SaveApplication() {
5941
- this.EditApplicationControl.SaveApplication();
5942
- }
5943
5849
  }
5944
- EditApplicationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationDialogComponent, deps: [{ token: EaCService }, { token: i2$3.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
5945
- EditApplicationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: EditApplicationDialogComponent, selector: "lcu-edit-application-dialog", viewQueries: [{ propertyName: "EditApplicationControl", first: true, predicate: EditApplicationFormComponent, descendants: true }], ngImport: i0, template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Edit Application:\n {{ data.application?.Application?.Name }}</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<lcu-edit-application-form \n [application-lookup]=\"data.applicationLookup\"\n [editing-application]=\"data.application\"\n [project-lookup]=\"data.projectLookup\"\n (save-form-event)=\"HandleSaveApplicationEvent($event)\">\n</lcu-edit-application-form>\n\n<mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n</mat-error>\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 *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"25%\" \n color=\"primary\" \n (click)=\"SaveApplication()\"\n [disabled]=\"!ApplicationFormGroup?.valid || !ApplicationFormGroup?.dirty\">\n <!-- <mat-icon>save</mat-icon> -->\n Save\n </button>\n\n</mat-dialog-actions>\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"] }], 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$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$3.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$3.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"] }] });
5946
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationDialogComponent, decorators: [{
5850
+ NewApplicationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: NewApplicationDialogComponent, deps: [{ token: EaCService }, { token: i2$3.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
5851
+ 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$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$3.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$3.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"] }] });
5852
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: NewApplicationDialogComponent, decorators: [{
5947
5853
  type: Component,
5948
- args: [{ selector: 'lcu-edit-application-dialog', template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>Edit Application:\n {{ data.application?.Application?.Name }}</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<lcu-edit-application-form \n [application-lookup]=\"data.applicationLookup\"\n [editing-application]=\"data.application\"\n [project-lookup]=\"data.projectLookup\"\n (save-form-event)=\"HandleSaveApplicationEvent($event)\">\n</lcu-edit-application-form>\n\n<mat-error *ngIf=\"ErrorMessage\" fxLayoutAlign=\"center center\" >\n {{ ErrorMessage }}\n</mat-error>\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 *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"25%\" \n color=\"primary\" \n (click)=\"SaveApplication()\"\n [disabled]=\"!ApplicationFormGroup?.valid || !ApplicationFormGroup?.dirty\">\n <!-- <mat-icon>save</mat-icon> -->\n Save\n </button>\n\n</mat-dialog-actions>\n\n", styles: [""] }]
5854
+ 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: [""] }]
5949
5855
  }], ctorParameters: function () {
5950
5856
  return [{ type: EaCService }, { type: i2$3.MatDialogRef }, { type: undefined, decorators: [{
5951
5857
  type: Inject,
5952
5858
  args: [MAT_DIALOG_DATA]
5953
5859
  }] }, { type: i3$1.MatSnackBar }];
5954
- }, propDecorators: { EditApplicationControl: [{
5860
+ }, propDecorators: { ApplicationFormControls: [{
5955
5861
  type: ViewChild,
5956
5862
  args: [EditApplicationFormComponent]
5863
+ }], ProcessorDetailsFormControls: [{
5864
+ type: ViewChild,
5865
+ args: [ProcessorDetailsFormComponent]
5957
5866
  }] } });
5958
5867
 
5959
5868
  class ProcessorDetailsDialogComponent {
@@ -6156,6 +6065,381 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
6156
6065
  }]
6157
6066
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.LCUServiceSettings }]; } });
6158
6067
 
6068
+ class FeedHeaderDialogComponent {
6069
+ constructor(appsFlowSvc, eacSvc, formBldr, dialogRef, data) {
6070
+ var _a;
6071
+ this.appsFlowSvc = appsFlowSvc;
6072
+ this.eacSvc = eacSvc;
6073
+ this.formBldr = formBldr;
6074
+ this.dialogRef = dialogRef;
6075
+ this.data = data;
6076
+ this.EditorConfig = {
6077
+ editable: true,
6078
+ spellcheck: true,
6079
+ height: '250px',
6080
+ minHeight: '0',
6081
+ maxHeight: 'auto',
6082
+ width: 'auto',
6083
+ minWidth: '0',
6084
+ translate: 'yes',
6085
+ enableToolbar: true,
6086
+ showToolbar: true,
6087
+ placeholder: 'Enter text here...',
6088
+ defaultParagraphSeparator: '',
6089
+ defaultFontName: '',
6090
+ defaultFontSize: '',
6091
+ fonts: [
6092
+ { class: 'arial', name: 'Arial' },
6093
+ { class: 'times-new-roman', name: 'Times New Roman' },
6094
+ { class: 'calibri', name: 'Calibri' },
6095
+ { class: 'comic-sans-ms', name: 'Comic Sans MS' }
6096
+ ],
6097
+ customClasses: [
6098
+ {
6099
+ name: 'quote',
6100
+ class: 'quote',
6101
+ },
6102
+ {
6103
+ name: 'redText',
6104
+ class: 'redText'
6105
+ },
6106
+ {
6107
+ name: 'titleText',
6108
+ class: 'titleText',
6109
+ tag: 'h1',
6110
+ },
6111
+ ],
6112
+ sanitize: true,
6113
+ toolbarPosition: 'top',
6114
+ toolbarHiddenButtons: [
6115
+ ['subscript', 'superscript'],
6116
+ ['fontSize']
6117
+ ]
6118
+ };
6119
+ this.SlicesCount = 5;
6120
+ this.Slices = {
6121
+ Sources: this.SlicesCount,
6122
+ };
6123
+ if (this.data.sourceControlLookup) {
6124
+ this.SourceControl = (_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources[this.data.sourceControlLookup];
6125
+ }
6126
+ }
6127
+ get ActionIconControl() {
6128
+ var _a;
6129
+ return (_a = this.FeedHeaderFormGroup) === null || _a === void 0 ? void 0 : _a.controls.actionIcon;
6130
+ }
6131
+ get ActionLinkControl() {
6132
+ var _a;
6133
+ return (_a = this.FeedHeaderFormGroup) === null || _a === void 0 ? void 0 : _a.controls.actionLink;
6134
+ }
6135
+ get ActionTextControl() {
6136
+ var _a;
6137
+ return (_a = this.FeedHeaderFormGroup) === null || _a === void 0 ? void 0 : _a.controls.actionText;
6138
+ }
6139
+ get BaseBranchFormControl() {
6140
+ return this.FeedHeaderFormGroup.controls.baseBranch;
6141
+ }
6142
+ get CompareBranchFormControl() {
6143
+ return this.FeedHeaderFormGroup.controls.compareBranch;
6144
+ }
6145
+ get EditorControl() {
6146
+ var _a;
6147
+ return (_a = this.FeedHeaderFormGroup) === null || _a === void 0 ? void 0 : _a.controls.editor;
6148
+ }
6149
+ get Environment() {
6150
+ var _a, _b, _c, _d, _e;
6151
+ return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[(_e = (_d = (_c = this.State) === null || _c === void 0 ? void 0 : _c.EaC) === null || _d === void 0 ? void 0 : _d.Enterprise) === null || _e === void 0 ? void 0 : _e.PrimaryEnvironment];
6152
+ }
6153
+ get NewBranchFormControl() {
6154
+ return this.FeedHeaderFormGroup.controls.newBranch;
6155
+ }
6156
+ get OrganizationFormControl() {
6157
+ return this.FeedHeaderFormGroup.controls.organization;
6158
+ }
6159
+ get ParentBranchFormControl() {
6160
+ return this.FeedHeaderFormGroup.controls.parentBranch;
6161
+ }
6162
+ get RepositoryFormControl() {
6163
+ return this.FeedHeaderFormGroup.controls.repository;
6164
+ }
6165
+ get SourceControlFormControl() {
6166
+ return this.FeedHeaderFormGroup.controls.sourceControl;
6167
+ }
6168
+ get SourceControlLookups() {
6169
+ return Object.keys(this.SourceControls || {});
6170
+ }
6171
+ get SourceControls() {
6172
+ var _a;
6173
+ return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources) || {};
6174
+ }
6175
+ get SubtitleFormControl() {
6176
+ return this.FeedHeaderFormGroup.controls.subtitle;
6177
+ }
6178
+ get State() {
6179
+ return this.eacSvc.State;
6180
+ }
6181
+ get TitleFormControl() {
6182
+ var _a;
6183
+ return (_a = this.FeedHeaderFormGroup) === null || _a === void 0 ? void 0 : _a.controls.title;
6184
+ }
6185
+ ngOnInit() {
6186
+ this.setupFeedHeaderForm();
6187
+ }
6188
+ CloseDialog() {
6189
+ this.dialogRef.close();
6190
+ }
6191
+ HandleAction() {
6192
+ if (this.ActionLinkControl.value.startsWith('http')) {
6193
+ window.open(this.ActionLinkControl.value, '_blank');
6194
+ }
6195
+ else {
6196
+ window.location.href = this.ActionLinkControl.value;
6197
+ }
6198
+ }
6199
+ PullRequestSourceControlChanged(event) {
6200
+ this.SourceControl = this.SourceControlFormControl.value;
6201
+ this.listBranches();
6202
+ }
6203
+ FeatureBranchSourceControlChanged(event) {
6204
+ this.SourceControl = this.SourceControlFormControl.value;
6205
+ this.listOrganizations();
6206
+ }
6207
+ Submit() {
6208
+ console.log("Title: ", this.TitleFormControl.value);
6209
+ console.log("Editor: ", this.EditorControl.value);
6210
+ }
6211
+ OrganizationChanged(event) {
6212
+ this.RepositoryFormControl.reset();
6213
+ this.listRepositories();
6214
+ }
6215
+ RepositoryChanged(event) {
6216
+ this.listBranches();
6217
+ }
6218
+ //HELPERS
6219
+ listBranches() {
6220
+ var _a, _b;
6221
+ // this.Loading = true;
6222
+ this.appsFlowSvc
6223
+ .ListBranches((_a = this.SourceControl) === null || _a === void 0 ? void 0 : _a.Organization, (_b = this.SourceControl) === null || _b === void 0 ? void 0 : _b.Repository)
6224
+ .subscribe((response) => {
6225
+ this.BranchOptions = response.Model;
6226
+ // this.Loading = false;
6227
+ // if (this.EditingSourceControl?.Branches?.length > 0) {
6228
+ // this.SelectedBranches = this.EditingSourceControl.Branches;
6229
+ // } else if (this.BranchOptions?.length === 1) {
6230
+ // this.BranchesFormControl.setValue(this.BranchOptions[0].Name);
6231
+ // this.SelectedBranches = [this.BranchOptions[0].Name];
6232
+ // }
6233
+ });
6234
+ }
6235
+ listOrganizations() {
6236
+ // this.Loading = true;
6237
+ this.appsFlowSvc
6238
+ .ListOrganizations()
6239
+ .subscribe((response) => {
6240
+ var _a;
6241
+ this.OrganizationOptions = response.Model;
6242
+ console.log("Organization Options: ", this.OrganizationOptions);
6243
+ // this.Loading = false;
6244
+ if ((_a = this.SourceControl) === null || _a === void 0 ? void 0 : _a.Organization) {
6245
+ setTimeout(() => {
6246
+ var _a;
6247
+ this.OrganizationFormControl.setValue(this.SourceControl.Organization);
6248
+ this.listRepositories((_a = this.SourceControl) === null || _a === void 0 ? void 0 : _a.Repository);
6249
+ }, 0);
6250
+ }
6251
+ });
6252
+ }
6253
+ listRepositories(activeRepo = null) {
6254
+ // this.Loading = true;
6255
+ this.appsFlowSvc
6256
+ .ListRepositories(this.OrganizationFormControl.value)
6257
+ .subscribe((response) => {
6258
+ this.RepositoryOptions = response.Model;
6259
+ // this.Loading = false;
6260
+ if (activeRepo) {
6261
+ setTimeout(() => {
6262
+ this.RepositoryFormControl.setValue(activeRepo);
6263
+ this.listBranches();
6264
+ }, 0);
6265
+ }
6266
+ });
6267
+ }
6268
+ setupFeedHeaderForm() {
6269
+ this.FeedHeaderFormGroup = this.formBldr.group({});
6270
+ switch (this.data.type) {
6271
+ case "announcement":
6272
+ this.setupAnnouncementForm();
6273
+ break;
6274
+ case "pr":
6275
+ this.setupPRForm();
6276
+ break;
6277
+ case "issue":
6278
+ this.setupIssueForm();
6279
+ break;
6280
+ case "fb":
6281
+ this.setupFeatureBranchForm();
6282
+ break;
6283
+ default:
6284
+ //
6285
+ break;
6286
+ }
6287
+ }
6288
+ setupAnnouncementForm() {
6289
+ this.setupIssueForm();
6290
+ this.FeedHeaderFormGroup.addControl('subtitle', this.formBldr.control(''));
6291
+ this.FeedHeaderFormGroup.addControl('actionText', this.formBldr.control(''));
6292
+ this.FeedHeaderFormGroup.addControl('actionLink', this.formBldr.control(''));
6293
+ this.FeedHeaderFormGroup.addControl('actionIcon', this.formBldr.control(''));
6294
+ }
6295
+ setupPRForm() {
6296
+ this.listBranches();
6297
+ this.setupBasicForm();
6298
+ this.FeedHeaderFormGroup.addControl('baseBranch', this.formBldr.control(''));
6299
+ this.FeedHeaderFormGroup.addControl('compareBranch', this.formBldr.control(''));
6300
+ }
6301
+ setupBasicForm() {
6302
+ this.FeedHeaderFormGroup.addControl('title', this.formBldr.control('', [Validators.required]));
6303
+ this.FeedHeaderFormGroup.addControl('editor', this.formBldr.control(''));
6304
+ }
6305
+ setupIssueForm() {
6306
+ this.setupBasicForm();
6307
+ this.setupSourceControlForm();
6308
+ }
6309
+ setupFeatureBranchForm() {
6310
+ this.setupSourceControlForm();
6311
+ this.FeedHeaderFormGroup.addControl('organization', this.formBldr.control(''));
6312
+ this.FeedHeaderFormGroup.addControl('repository', this.formBldr.control(''));
6313
+ this.FeedHeaderFormGroup.addControl('newBranch', this.formBldr.control(''));
6314
+ this.FeedHeaderFormGroup.addControl('parentBranch', this.formBldr.control(''));
6315
+ }
6316
+ setupSourceControlForm() {
6317
+ this.FeedHeaderFormGroup.addControl('sourceControl', this.formBldr.control(''));
6318
+ }
6319
+ }
6320
+ FeedHeaderDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: FeedHeaderDialogComponent, deps: [{ token: ApplicationsFlowService }, { token: EaCService }, { token: i1$2.FormBuilder }, { token: i2$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
6321
+ FeedHeaderDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: FeedHeaderDialogComponent, selector: "lcu-feed-header-dialog", ngImport: i0, template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>{{data.dialogTitle}}</h2>\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n <form [formGroup]=\"FeedHeaderFormGroup\" >\n\n <!-- ISSUE FORM -->\n <ng-container *ngIf=\"data.type === 'issue' \">\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <mat-form-field appearance=\"fill\">\n <mat-label>Source Control</mat-label>\n <mat-select \n formControlName=\"sourceControl\"\n >\n <ng-container *ngFor=\"let scLookup of SourceControlLookups | slice: 0:Slices.Sources\">\n <mat-option *ngIf=\"SourceControls[scLookup]; let sc\" [value]=\"sc\">\n {{sc.Name}}\n </mat-option>\n </ng-container>\n </mat-select>\n </mat-form-field>\n </div>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Title\"\n formControlName=\"title\"\n required\n />\n </mat-form-field>\n\n\n <angular-editor \n id=\"issue-editor\"\n formControlName=\"editor\" \n [config]=\"EditorConfig\"\n ></angular-editor>\n </ng-container>\n\n <!-- ANNOUNCEMENT FORM -->\n\n <ng-container *ngIf=\"data.type === 'announcement' \">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Title\"\n formControlName=\"title\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Subtitle\"\n formControlName=\"subtitle\"\n />\n </mat-form-field>\n\n <angular-editor \n id=\"announcement-editor\"\n formControlName=\"editor\" \n [config]=\"EditorConfig\"\n ></angular-editor>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Action Text\"\n formControlName=\"actionText\"\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Action Link\"\n formControlName=\"actionLink\"\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Action Icon\"\n formControlName=\"actionIcon\"\n />\n </mat-form-field>\n\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <button \n *ngIf=\"ActionTextControl?.value || ActionIconControl?.value\"\n mat-button color=\"primary\" \n (click)=\"HandleAction(ActionLinkControl?.value)\"\n >\n <mat-icon *ngIf=\"ActionIconControl?.value\">{{ ActionIconControl?.value }}</mat-icon>\n \n {{ ActionTextControl?.value }}\n </button>\n\n <button \n *ngIf=\"!ActionTextControl?.value && !ActionIconControl?.value\"\n mat-button color=\"primary\" \n >\n <mat-icon>cruelty_free</mat-icon>\n \n Example Button\n </button>\n </div>\n\n </ng-container>\n\n <!-- PR FORM -->\n\n <ng-container *ngIf=\"data.type === 'pr' \">\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <mat-form-field appearance=\"fill\">\n <mat-label>Source Control</mat-label>\n <mat-select \n formControlName=\"sourceControl\"\n (selectionChange)=\"PullRequestSourceControlChanged($event)\"\n >\n <ng-container *ngFor=\"let scLookup of SourceControlLookups | slice: 0:Slices.Sources\">\n <mat-option *ngIf=\"SourceControls[scLookup]; let sc\" [value]=\"sc\">\n {{sc.Name}}\n </mat-option>\n </ng-container>\n </mat-select>\n </mat-form-field>\n </div>\n\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <mat-form-field appearance=\"fill\">\n <mat-label>Base</mat-label>\n <mat-select formControlName=\"baseBranch\" required\n >\n <mat-option *ngFor=\"let branchOpt of BranchOptions\" [value]=\"branchOpt.Name\">\n {{branchOpt.Name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n \n <mat-icon>arrow_back</mat-icon>\n\n <mat-form-field appearance=\"fill\">\n <mat-label>Compare</mat-label>\n <mat-select formControlName=\"compareBranch\" required\n >\n <mat-option *ngFor=\"let branchOpt of BranchOptions\" [value]=\"branchOpt.Name\">\n {{branchOpt.Name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Title\"\n formControlName=\"title\"\n required\n />\n </mat-form-field>\n\n\n <angular-editor \n id=\"pr-editor\"\n formControlName=\"editor\" \n [config]=\"EditorConfig\"\n ></angular-editor>\n\n </ng-container>\n\n <!-- Feature Branch form -->\n\n <ng-container *ngIf=\"data.type === 'fb' \">\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <mat-form-field >\n <mat-label>Source Control</mat-label>\n <mat-select \n formControlName=\"sourceControl\"\n (selectionChange)=\"FeatureBranchSourceControlChanged($event)\"\n >\n <ng-container *ngFor=\"let scLookup of SourceControlLookups | slice: 0:Slices.Sources\">\n <mat-option *ngIf=\"SourceControls[scLookup]; let sc\" [value]=\"sc\">\n {{sc.Name}}\n </mat-option>\n </ng-container>\n </mat-select>\n </mat-form-field>\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n\n <mat-form-field *ngIf=\"OrganizationOptions?.length > 0\">\n\n <mat-select \n formControlName=\"organization\" \n placeholder=\"Organization\"\n (selectionChange)=\"OrganizationChanged($event)\" \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\n\n </mat-form-field>\n\n <mat-form-field *ngIf=\"RepositoryOptions?.length > 0\">\n\n <mat-select formControlName=\"repository\" \n placeholder=\"Repository\" \n (selectionChange)=\"RepositoryChanged($event)\" \n required\n >\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 </mat-form-field>\n\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around center\" *ngIf=\"BranchOptions?.length > 0\">\n\n <mat-form-field >\n <mat-label>Branch</mat-label>\n <mat-select formControlName=\"parentBranch\" required\n >\n <mat-option *ngFor=\"let branchOpt of BranchOptions\" [value]=\"branchOpt.Name\">\n {{branchOpt.Name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field >\n <input\n matInput\n placeholder=\"Create New Branch\"\n formControlName=\"newBranch\"\n required\n />\n </mat-form-field>\n </div>\n\n </ng-container>\n\n\n\n\n\n </form>\n \n \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 mat-raised-button \n color=\"primary\"\n fxFlex=\"25%\"\n class=\"submit\" \n (click)=\"Submit()\"\n [disabled]=\"\n !FeedHeaderFormGroup?.valid \n\"\n \n >\n Submit\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: 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: i10.AngularEditorComponent, selector: "angular-editor", inputs: ["id", "config", "placeholder", "tabIndex"], outputs: ["html", "viewMode", "blur", "focus"] }], 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$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { 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.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.MatLabel, selector: "mat-label" }, { 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: 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2$3.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"] }], pipes: { "slice": i9.SlicePipe } });
6322
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: FeedHeaderDialogComponent, decorators: [{
6323
+ type: Component,
6324
+ args: [{ selector: 'lcu-feed-header-dialog', template: "<div class=\"dialog-header\" fxLayoutAlign=\"space-between center\">\n <h2 mat-dialog-title>{{data.dialogTitle}}</h2>\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<mat-dialog-content>\n <form [formGroup]=\"FeedHeaderFormGroup\" >\n\n <!-- ISSUE FORM -->\n <ng-container *ngIf=\"data.type === 'issue' \">\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <mat-form-field appearance=\"fill\">\n <mat-label>Source Control</mat-label>\n <mat-select \n formControlName=\"sourceControl\"\n >\n <ng-container *ngFor=\"let scLookup of SourceControlLookups | slice: 0:Slices.Sources\">\n <mat-option *ngIf=\"SourceControls[scLookup]; let sc\" [value]=\"sc\">\n {{sc.Name}}\n </mat-option>\n </ng-container>\n </mat-select>\n </mat-form-field>\n </div>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Title\"\n formControlName=\"title\"\n required\n />\n </mat-form-field>\n\n\n <angular-editor \n id=\"issue-editor\"\n formControlName=\"editor\" \n [config]=\"EditorConfig\"\n ></angular-editor>\n </ng-container>\n\n <!-- ANNOUNCEMENT FORM -->\n\n <ng-container *ngIf=\"data.type === 'announcement' \">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Title\"\n formControlName=\"title\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Subtitle\"\n formControlName=\"subtitle\"\n />\n </mat-form-field>\n\n <angular-editor \n id=\"announcement-editor\"\n formControlName=\"editor\" \n [config]=\"EditorConfig\"\n ></angular-editor>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Action Text\"\n formControlName=\"actionText\"\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Action Link\"\n formControlName=\"actionLink\"\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Action Icon\"\n formControlName=\"actionIcon\"\n />\n </mat-form-field>\n\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <button \n *ngIf=\"ActionTextControl?.value || ActionIconControl?.value\"\n mat-button color=\"primary\" \n (click)=\"HandleAction(ActionLinkControl?.value)\"\n >\n <mat-icon *ngIf=\"ActionIconControl?.value\">{{ ActionIconControl?.value }}</mat-icon>\n \n {{ ActionTextControl?.value }}\n </button>\n\n <button \n *ngIf=\"!ActionTextControl?.value && !ActionIconControl?.value\"\n mat-button color=\"primary\" \n >\n <mat-icon>cruelty_free</mat-icon>\n \n Example Button\n </button>\n </div>\n\n </ng-container>\n\n <!-- PR FORM -->\n\n <ng-container *ngIf=\"data.type === 'pr' \">\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <mat-form-field appearance=\"fill\">\n <mat-label>Source Control</mat-label>\n <mat-select \n formControlName=\"sourceControl\"\n (selectionChange)=\"PullRequestSourceControlChanged($event)\"\n >\n <ng-container *ngFor=\"let scLookup of SourceControlLookups | slice: 0:Slices.Sources\">\n <mat-option *ngIf=\"SourceControls[scLookup]; let sc\" [value]=\"sc\">\n {{sc.Name}}\n </mat-option>\n </ng-container>\n </mat-select>\n </mat-form-field>\n </div>\n\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <mat-form-field appearance=\"fill\">\n <mat-label>Base</mat-label>\n <mat-select formControlName=\"baseBranch\" required\n >\n <mat-option *ngFor=\"let branchOpt of BranchOptions\" [value]=\"branchOpt.Name\">\n {{branchOpt.Name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n \n <mat-icon>arrow_back</mat-icon>\n\n <mat-form-field appearance=\"fill\">\n <mat-label>Compare</mat-label>\n <mat-select formControlName=\"compareBranch\" required\n >\n <mat-option *ngFor=\"let branchOpt of BranchOptions\" [value]=\"branchOpt.Name\">\n {{branchOpt.Name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Title\"\n formControlName=\"title\"\n required\n />\n </mat-form-field>\n\n\n <angular-editor \n id=\"pr-editor\"\n formControlName=\"editor\" \n [config]=\"EditorConfig\"\n ></angular-editor>\n\n </ng-container>\n\n <!-- Feature Branch form -->\n\n <ng-container *ngIf=\"data.type === 'fb' \">\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <mat-form-field >\n <mat-label>Source Control</mat-label>\n <mat-select \n formControlName=\"sourceControl\"\n (selectionChange)=\"FeatureBranchSourceControlChanged($event)\"\n >\n <ng-container *ngFor=\"let scLookup of SourceControlLookups | slice: 0:Slices.Sources\">\n <mat-option *ngIf=\"SourceControls[scLookup]; let sc\" [value]=\"sc\">\n {{sc.Name}}\n </mat-option>\n </ng-container>\n </mat-select>\n </mat-form-field>\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n\n <mat-form-field *ngIf=\"OrganizationOptions?.length > 0\">\n\n <mat-select \n formControlName=\"organization\" \n placeholder=\"Organization\"\n (selectionChange)=\"OrganizationChanged($event)\" \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\n\n </mat-form-field>\n\n <mat-form-field *ngIf=\"RepositoryOptions?.length > 0\">\n\n <mat-select formControlName=\"repository\" \n placeholder=\"Repository\" \n (selectionChange)=\"RepositoryChanged($event)\" \n required\n >\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 </mat-form-field>\n\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around center\" *ngIf=\"BranchOptions?.length > 0\">\n\n <mat-form-field >\n <mat-label>Branch</mat-label>\n <mat-select formControlName=\"parentBranch\" required\n >\n <mat-option *ngFor=\"let branchOpt of BranchOptions\" [value]=\"branchOpt.Name\">\n {{branchOpt.Name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field >\n <input\n matInput\n placeholder=\"Create New Branch\"\n formControlName=\"newBranch\"\n required\n />\n </mat-form-field>\n </div>\n\n </ng-container>\n\n\n\n\n\n </form>\n \n \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 mat-raised-button \n color=\"primary\"\n fxFlex=\"25%\"\n class=\"submit\" \n (click)=\"Submit()\"\n [disabled]=\"\n !FeedHeaderFormGroup?.valid \n\"\n \n >\n Submit\n </button>\n</mat-dialog-actions>\n\n\n", styles: [""] }]
6325
+ }], ctorParameters: function () {
6326
+ return [{ type: ApplicationsFlowService }, { type: EaCService }, { type: i1$2.FormBuilder }, { type: i2$3.MatDialogRef }, { type: undefined, decorators: [{
6327
+ type: Inject,
6328
+ args: [MAT_DIALOG_DATA]
6329
+ }] }];
6330
+ } });
6331
+
6332
+ class FeedHeaderComponent {
6333
+ constructor(eacSvc, dialog) {
6334
+ this.eacSvc = eacSvc;
6335
+ this.dialog = dialog;
6336
+ this.InputLabel = "Create Team Announcement";
6337
+ this.SkeletonEffect = "wave";
6338
+ // this.selectedBtn = "pr-btn";
6339
+ }
6340
+ get ActiveEnvironmentLookup() {
6341
+ var _a, _b;
6342
+ // TODO: Eventually support multiple environments
6343
+ const envLookups = Object.keys(((_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments) || {});
6344
+ return envLookups[0];
6345
+ }
6346
+ get State() {
6347
+ return this.eacSvc.State;
6348
+ }
6349
+ ngOnInit() {
6350
+ }
6351
+ ngAfterViewInit() {
6352
+ this.addSelectBtn();
6353
+ }
6354
+ CreateFeatureBranch() {
6355
+ this.removeSelectedBtn();
6356
+ this.InputLabel = "Create Feature Branch";
6357
+ this.selectedBtn = "fb-btn";
6358
+ this.addSelectBtn();
6359
+ console.log("create feature branch selected");
6360
+ this.OpenFHDialog('fb');
6361
+ }
6362
+ OpenIssue() {
6363
+ this.removeSelectedBtn();
6364
+ this.InputLabel = "Open Issue";
6365
+ this.selectedBtn = "oi-btn";
6366
+ this.addSelectBtn();
6367
+ console.log("open issue selected");
6368
+ this.OpenFHDialog('issue');
6369
+ }
6370
+ CreatePullRequest() {
6371
+ this.removeSelectedBtn();
6372
+ this.InputLabel = "Create Pull Request";
6373
+ this.selectedBtn = "pr-btn";
6374
+ this.addSelectBtn();
6375
+ console.log("create pull request selected");
6376
+ this.OpenFHDialog('pr');
6377
+ }
6378
+ CreateNewApp() {
6379
+ const dialogRef = this.dialog.open(NewApplicationDialogComponent, {
6380
+ width: '600px',
6381
+ data: {
6382
+ environmentLookup: this.ActiveEnvironmentLookup,
6383
+ },
6384
+ });
6385
+ dialogRef.afterClosed().subscribe((result) => {
6386
+ // console.log('The dialog was closed');
6387
+ // console.log("result:", result)
6388
+ });
6389
+ }
6390
+ OpenFHDialog(modalType) {
6391
+ const dialogRef = this.dialog.open(FeedHeaderDialogComponent, {
6392
+ width: '600px',
6393
+ data: {
6394
+ dialogTitle: this.InputLabel,
6395
+ type: modalType
6396
+ },
6397
+ });
6398
+ dialogRef.afterClosed().subscribe((result) => {
6399
+ // console.log('The dialog was closed');
6400
+ // console.log("result:", result)
6401
+ });
6402
+ }
6403
+ RouteToPath(path) {
6404
+ window.location.href = path;
6405
+ }
6406
+ Submit() {
6407
+ console.log("submitting: ", this.value);
6408
+ switch (this.selectedBtn) {
6409
+ case "pr-btn":
6410
+ //Pull request
6411
+ console.log("creating pull request: ", this.value);
6412
+ break;
6413
+ case "oi-btn":
6414
+ //Open Issue
6415
+ console.log("Open issue: ", this.value);
6416
+ break;
6417
+ case "fb-btn":
6418
+ //Feature Branch
6419
+ console.log("creating feature branch: ", this.value);
6420
+ break;
6421
+ default:
6422
+ console.log("hmm");
6423
+ break;
6424
+ }
6425
+ }
6426
+ //HELPERS
6427
+ addSelectBtn() {
6428
+ var _a;
6429
+ (_a = document.getElementById(this.selectedBtn)) === null || _a === void 0 ? void 0 : _a.classList.add('selected');
6430
+ }
6431
+ removeSelectedBtn() {
6432
+ var _a;
6433
+ (_a = document.getElementById(this.selectedBtn)) === null || _a === void 0 ? void 0 : _a.classList.remove('selected');
6434
+ }
6435
+ }
6436
+ FeedHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: FeedHeaderComponent, deps: [{ token: EaCService }, { token: i2$3.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
6437
+ FeedHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: FeedHeaderComponent, selector: "lcu-feed-header", ngImport: i0, template: "<mat-card class=\"social-card\">\n <ng-container *ngIf=\"!State?.Loading\">\n <div class=\"gh-card-container\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-icon fxFlex=\"15%\" class=\"gh-icon\" color=\"primary\">error_outline</mat-icon>\n <div fxFlex=\"85%\" class=\"gh-card-main-content\">\n <button \n mat-button \n class=\"main-btn\"\n (click)=\"OpenFHDialog('announcement')\" \n color=\"primary\"\n >{{ InputLabel }}</button>\n\n <!-- <mat-form-field appearance=\"fill\" class=\"gh-input\">\n <mat-label>{{ InputLabel }}</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"value\" (click)=\"OpenFHDialog('announcement')\"/>\n </mat-form-field> -->\n </div>\n\n <!-- <button\n fxFlex=\"15%\"\n mat-button\n (click)=\"Submit()\"\n id=\"submit-btn\"\n color=\"primary\"\n >\n Submit\n </button> -->\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <button \n mat-button \n (click)=\"CreatePullRequest()\" \n id=\"pr-btn\" \n color=\"primary\"\n >\n Pull Request\n </button>\n\n <button \n mat-button \n (click)=\"OpenIssue()\" \n id=\"oi-btn\" \n color=\"primary\"\n >\n Open Issue\n </button>\n\n <button \n mat-button \n (click)=\"CreateFeatureBranch()\" \n id=\"fb-btn\" \n color=\"primary\"\n >\n Feature Branch\n </button>\n\n <!-- <button mat-icon-button [matMenuTriggerFor]=\"menu\" aria-label=\"menu\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button class=\"gh-menu-action\" mat-menu-item (click)=\"CreateNewApp()\">\n Create New App\n </button>\n\n <button\n class=\"gh-menu-action\"\n mat-menu-item\n (click)=\"RouteToPath('/dashboard/create-project')\"\n >\n Create Project\n </button>\n </mat-menu> -->\n </mat-card-actions>\n </ng-container>\n\n <!-- SKELETON -->\n <ng-container *ngIf=\"State?.Loading\">\n <div id=\"gh-card-skeleton\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <skeleton-avatar\n class=\"gh-icon\"\n [showIcon]=\"false\"\n [effect]=\"SkeletonEffect\"\n ></skeleton-avatar>\n\n <div fxFlex=\"85%\" class=\"gh-card-main-content\">\n <skeleton-block\n height=\"60px\"\n [effect]=\"SkeletonEffect\"\n ></skeleton-block>\n </div>\n\n <!-- <div\n skeleton-text\n fxFlex=\"15%\"\n [effect]=\"SkeletonEffect\"\n style=\"margin: 0px 10px\"\n >\n Submit\n </div> -->\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Pull Request</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">Open Issue</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">Feature Branch</div>\n <!-- <div skeleton-text [effect]=\"SkeletonEffect\">\n <mat-icon>more_horiz</mat-icon>\n </div> -->\n </div>\n </ng-container>\n</mat-card>\n", styles: [":host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host ::ng-deep .main-slot-container{padding:10px}:host ::ng-deep .slot-header{align-items:center}:host ::ng-deep .slot-content{width:100%}:host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}.gh-icon{width:60px;height:60px;font-size:60px;text-align:center}.gh-input{width:90%}.main-btn{width:90%;height:50px;border-radius:30px;border:1px solid}.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.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$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: i1$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i4$3.SkeletonTextDirective, selector: "[skeleton-text]", inputs: ["effect"] }] });
6438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: FeedHeaderComponent, decorators: [{
6439
+ type: Component,
6440
+ args: [{ selector: 'lcu-feed-header', template: "<mat-card class=\"social-card\">\n <ng-container *ngIf=\"!State?.Loading\">\n <div class=\"gh-card-container\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-icon fxFlex=\"15%\" class=\"gh-icon\" color=\"primary\">error_outline</mat-icon>\n <div fxFlex=\"85%\" class=\"gh-card-main-content\">\n <button \n mat-button \n class=\"main-btn\"\n (click)=\"OpenFHDialog('announcement')\" \n color=\"primary\"\n >{{ InputLabel }}</button>\n\n <!-- <mat-form-field appearance=\"fill\" class=\"gh-input\">\n <mat-label>{{ InputLabel }}</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"value\" (click)=\"OpenFHDialog('announcement')\"/>\n </mat-form-field> -->\n </div>\n\n <!-- <button\n fxFlex=\"15%\"\n mat-button\n (click)=\"Submit()\"\n id=\"submit-btn\"\n color=\"primary\"\n >\n Submit\n </button> -->\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <button \n mat-button \n (click)=\"CreatePullRequest()\" \n id=\"pr-btn\" \n color=\"primary\"\n >\n Pull Request\n </button>\n\n <button \n mat-button \n (click)=\"OpenIssue()\" \n id=\"oi-btn\" \n color=\"primary\"\n >\n Open Issue\n </button>\n\n <button \n mat-button \n (click)=\"CreateFeatureBranch()\" \n id=\"fb-btn\" \n color=\"primary\"\n >\n Feature Branch\n </button>\n\n <!-- <button mat-icon-button [matMenuTriggerFor]=\"menu\" aria-label=\"menu\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button class=\"gh-menu-action\" mat-menu-item (click)=\"CreateNewApp()\">\n Create New App\n </button>\n\n <button\n class=\"gh-menu-action\"\n mat-menu-item\n (click)=\"RouteToPath('/dashboard/create-project')\"\n >\n Create Project\n </button>\n </mat-menu> -->\n </mat-card-actions>\n </ng-container>\n\n <!-- SKELETON -->\n <ng-container *ngIf=\"State?.Loading\">\n <div id=\"gh-card-skeleton\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <skeleton-avatar\n class=\"gh-icon\"\n [showIcon]=\"false\"\n [effect]=\"SkeletonEffect\"\n ></skeleton-avatar>\n\n <div fxFlex=\"85%\" class=\"gh-card-main-content\">\n <skeleton-block\n height=\"60px\"\n [effect]=\"SkeletonEffect\"\n ></skeleton-block>\n </div>\n\n <!-- <div\n skeleton-text\n fxFlex=\"15%\"\n [effect]=\"SkeletonEffect\"\n style=\"margin: 0px 10px\"\n >\n Submit\n </div> -->\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div skeleton-text [effect]=\"SkeletonEffect\">Pull Request</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">Open Issue</div>\n <div skeleton-text [effect]=\"SkeletonEffect\">Feature Branch</div>\n <!-- <div skeleton-text [effect]=\"SkeletonEffect\">\n <mat-icon>more_horiz</mat-icon>\n </div> -->\n </div>\n </ng-container>\n</mat-card>\n", styles: [":host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host ::ng-deep .main-slot-container{padding:10px}:host ::ng-deep .slot-header{align-items:center}:host ::ng-deep .slot-content{width:100%}:host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}.gh-icon{width:60px;height:60px;font-size:60px;text-align:center}.gh-input{width:90%}.main-btn{width:90%;height:50px;border-radius:30px;border:1px solid}.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"] }]
6441
+ }], ctorParameters: function () { return [{ type: EaCService }, { type: i2$3.MatDialog }]; } });
6442
+
6159
6443
  class ApplicationsFlowModule {
6160
6444
  static forRoot() {
6161
6445
  return {
@@ -6200,7 +6484,7 @@ ApplicationsFlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
6200
6484
  ProjectInfoCardComponent,
6201
6485
  AnalyticsCardComponent,
6202
6486
  FeedCardSmComponent,
6203
- GhControlComponent,
6487
+ FeedHeaderComponent,
6204
6488
  MainFeedCardComponent,
6205
6489
  TwoColumnHeaderComponent,
6206
6490
  CardCarouselComponent,
@@ -6219,7 +6503,9 @@ ApplicationsFlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
6219
6503
  ProcessorDetailsDialogComponent,
6220
6504
  SkeletonFeedCardComponent,
6221
6505
  UpgradeDialogComponent,
6222
- EmulatedDevicesToggleComponent], imports: [ClipboardModule,
6506
+ EmulatedDevicesToggleComponent,
6507
+ FeedHeaderDialogComponent], imports: [AngularEditorModule,
6508
+ ClipboardModule,
6223
6509
  FathymSharedModule,
6224
6510
  FormsModule,
6225
6511
  ReactiveFormsModule,
@@ -6257,7 +6543,8 @@ ApplicationsFlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
6257
6543
  ProjectInfoCardComponent,
6258
6544
  AnalyticsCardComponent,
6259
6545
  FeedCardSmComponent,
6260
- GhControlComponent,
6546
+ FeedHeaderComponent,
6547
+ FeedHeaderDialogComponent,
6261
6548
  MainFeedCardComponent,
6262
6549
  TwoColumnHeaderComponent,
6263
6550
  CardCarouselComponent,
@@ -6276,8 +6563,10 @@ ApplicationsFlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
6276
6563
  ProcessorDetailsDialogComponent,
6277
6564
  SkeletonFeedCardComponent,
6278
6565
  UpgradeDialogComponent,
6279
- EmulatedDevicesToggleComponent] });
6566
+ EmulatedDevicesToggleComponent,
6567
+ FeedHeaderDialogComponent] });
6280
6568
  ApplicationsFlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: ApplicationsFlowModule, imports: [[
6569
+ AngularEditorModule,
6281
6570
  ClipboardModule,
6282
6571
  FathymSharedModule,
6283
6572
  FormsModule,
@@ -6321,7 +6610,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
6321
6610
  ProjectInfoCardComponent,
6322
6611
  AnalyticsCardComponent,
6323
6612
  FeedCardSmComponent,
6324
- GhControlComponent,
6613
+ FeedHeaderComponent,
6325
6614
  MainFeedCardComponent,
6326
6615
  TwoColumnHeaderComponent,
6327
6616
  CardCarouselComponent,
@@ -6340,9 +6629,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
6340
6629
  ProcessorDetailsDialogComponent,
6341
6630
  SkeletonFeedCardComponent,
6342
6631
  UpgradeDialogComponent,
6343
- EmulatedDevicesToggleComponent
6632
+ EmulatedDevicesToggleComponent,
6633
+ FeedHeaderDialogComponent
6344
6634
  ],
6345
6635
  imports: [
6636
+ AngularEditorModule,
6346
6637
  ClipboardModule,
6347
6638
  FathymSharedModule,
6348
6639
  FormsModule,
@@ -6383,7 +6674,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
6383
6674
  ProjectInfoCardComponent,
6384
6675
  AnalyticsCardComponent,
6385
6676
  FeedCardSmComponent,
6386
- GhControlComponent,
6677
+ FeedHeaderComponent,
6678
+ FeedHeaderDialogComponent,
6387
6679
  MainFeedCardComponent,
6388
6680
  TwoColumnHeaderComponent,
6389
6681
  CardCarouselComponent,
@@ -6402,7 +6694,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
6402
6694
  ProcessorDetailsDialogComponent,
6403
6695
  SkeletonFeedCardComponent,
6404
6696
  UpgradeDialogComponent,
6405
- EmulatedDevicesToggleComponent
6697
+ EmulatedDevicesToggleComponent,
6698
+ FeedHeaderDialogComponent
6406
6699
  ],
6407
6700
  entryComponents: [
6408
6701
  ApplicationsFlowProjectsElementComponent,
@@ -6429,7 +6722,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
6429
6722
  ProjectInfoCardComponent,
6430
6723
  AnalyticsCardComponent,
6431
6724
  FeedCardSmComponent,
6432
- GhControlComponent,
6725
+ FeedHeaderComponent,
6433
6726
  MainFeedCardComponent,
6434
6727
  TwoColumnHeaderComponent,
6435
6728
  CardCarouselComponent,
@@ -6491,5 +6784,5 @@ class FormModel {
6491
6784
  * Generated bundle index. Do not edit.
6492
6785
  */
6493
6786
 
6494
- export { ActionsModel, AnalyticsCardComponent, ApplicationsFlowModule, ApplicationsFlowProjectsContext, ApplicationsFlowProjectsElementComponent, ApplicationsFlowProjectsElementState, ApplicationsFlowService, ApplicationsFlowState, ApplicationsFlowStateContext, AppsFlowComponent, BaseFormComponent, BaseFormConfigModel, BaseFormTestComponent, BreadcrumbComponent, BuildPipelineDialogComponent, BuildPipelineFormComponent, BuildsComponent, CardCarouselComponent, CardFormConfigModel, CreateProjectWizardComponent, CustomDomainDialogComponent, DFSModifiersComponent, DevOpsComponent, DevSettingsPresetModel, DevopsSourceControlFormComponent, DomainModel, DomainsComponent, DynamicTabsComponent, DynamicTabsModel, EaCService, EditApplicationDialogComponent, EditApplicationFormComponent, EmulatedDevicesToggleComponent, FeedCardSmComponent, FeedItem, FeedItemAction, FeedItemContributor, FeedItemTab, FlowToolComponent, FormActionsModel, FormCardComponent, FormModel, FormValuesModel, FormsService, GhControlComponent, GitAuthComponent, GitHubBranch, GitHubOrganization, GitHubRepository, GitHubSetupState, GitHubWorkflowRun, HeaderComponent, HostingDetailsFormGroupComponent, IoTEnsembleService, MainFeedCardComponent, NPMService, NewApplicationDialogComponent, NpmPackageSelectComponent, ProcessorDetailsDialogComponent, ProcessorDetailsFormComponent, ProjectActionsModel, ProjectHostingDetails, ProjectHostingOption, ProjectHostingOptionInput, ProjectInfoCardComponent, ProjectItemsComponent, ProjectNameComponent, ProjectService, ProjectTabsComponent, RecentActivitiesComponent, RootDirectoryComponent, SELECTOR_APPLICATIONS_FLOW_PROJECTS_ELEMENT, SaveApplicationAsCodeEventRequest, SaveDFSModifierEventRequest, SaveEnvironmentAsCodeEventRequest, SaveProjectAsCodeEventRequest, SecurityToggleComponent, SkeletonFeedCardComponent, SlottedCardComponent, SourceControlDialogComponent, SourceControlFormComponent, SourceControlFormControlsComponent, ThreeColumnComponent, TwoColumnHeaderComponent, UnpackLowCodeUnitRequest, UpgradeDialogComponent, UserFeedResponse };
6787
+ export { ActionsModel, AnalyticsCardComponent, ApplicationsFlowModule, ApplicationsFlowProjectsContext, ApplicationsFlowProjectsElementComponent, ApplicationsFlowProjectsElementState, ApplicationsFlowService, ApplicationsFlowState, ApplicationsFlowStateContext, AppsFlowComponent, BaseFormComponent, BaseFormConfigModel, BaseFormTestComponent, BreadcrumbComponent, BuildPipelineDialogComponent, BuildPipelineFormComponent, BuildsComponent, CardCarouselComponent, CardFormConfigModel, CreateProjectWizardComponent, CustomDomainDialogComponent, DFSModifiersComponent, DevOpsComponent, DevSettingsPresetModel, DevopsSourceControlFormComponent, DomainModel, DomainsComponent, DynamicTabsComponent, DynamicTabsModel, EaCService, EditApplicationDialogComponent, EditApplicationFormComponent, EmulatedDevicesToggleComponent, FeedCardSmComponent, FeedHeaderComponent, FeedHeaderDialogComponent, FeedItem, FeedItemAction, FeedItemContributor, FeedItemTab, FlowToolComponent, FormActionsModel, FormCardComponent, FormModel, FormValuesModel, FormsService, GitAuthComponent, GitHubBranch, GitHubOrganization, GitHubRepository, GitHubSetupState, GitHubWorkflowRun, HeaderComponent, HostingDetailsFormGroupComponent, IoTEnsembleService, MainFeedCardComponent, NPMService, NewApplicationDialogComponent, NpmPackageSelectComponent, ProcessorDetailsDialogComponent, ProcessorDetailsFormComponent, ProjectActionsModel, ProjectHostingDetails, ProjectHostingOption, ProjectHostingOptionInput, ProjectInfoCardComponent, ProjectItemsComponent, ProjectNameComponent, ProjectService, ProjectTabsComponent, RecentActivitiesComponent, RootDirectoryComponent, SELECTOR_APPLICATIONS_FLOW_PROJECTS_ELEMENT, SaveApplicationAsCodeEventRequest, SaveDFSModifierEventRequest, SaveEnvironmentAsCodeEventRequest, SaveProjectAsCodeEventRequest, SecurityToggleComponent, SkeletonFeedCardComponent, SlottedCardComponent, SourceControlDialogComponent, SourceControlFormComponent, SourceControlFormControlsComponent, ThreeColumnComponent, TwoColumnHeaderComponent, UnpackLowCodeUnitRequest, UpgradeDialogComponent, UserFeedResponse };
6495
6788
  //# sourceMappingURL=lowcodeunit-applications-flow-common.mjs.map