@lowcodeunit/applications-flow-common 1.33.99-lets-get-social-ish → 1.33.103-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.
Files changed (35) hide show
  1. package/bundles/lowcodeunit-applications-flow-common.umd.js +304 -112
  2. package/bundles/lowcodeunit-applications-flow-common.umd.js.map +1 -1
  3. package/bundles/lowcodeunit-applications-flow-common.umd.min.js +2 -2
  4. package/bundles/lowcodeunit-applications-flow-common.umd.min.js.map +1 -1
  5. package/esm2015/lib/controls/build-pipeline-form/build-pipeline-form.component.js +183 -16
  6. package/esm2015/lib/controls/devops-source-control-form/devops-source-control-form.component.js +27 -31
  7. package/esm2015/lib/controls/processor-details-form/processor-details-form.component.js +55 -40
  8. package/esm2015/lib/controls/security-toggle/security-toggle.component.js +5 -22
  9. package/esm2015/lib/controls/source-control-form/source-control-form.component.js +4 -3
  10. package/esm2015/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.js +2 -2
  11. package/esm2015/lib/dialogs/source-control-dialog/source-control-dialog.component.js +2 -2
  12. package/esm2015/lib/elements/projects/controls/hosting-details-form-group/hosting-details-form-group.component.js +2 -1
  13. package/esm2015/lib/elements/slotted-card/slotted-card.component.js +10 -8
  14. package/esm2015/lib/services/applications-flow.service.js +6 -1
  15. package/fesm2015/lowcodeunit-applications-flow-common.js +278 -113
  16. package/fesm2015/lowcodeunit-applications-flow-common.js.map +1 -1
  17. package/lib/controls/build-pipeline-form/build-pipeline-form.component.d.ts +24 -7
  18. package/lib/controls/build-pipeline-form/build-pipeline-form.component.d.ts.map +1 -1
  19. package/lib/controls/devops-source-control-form/devops-source-control-form.component.d.ts +9 -9
  20. package/lib/controls/devops-source-control-form/devops-source-control-form.component.d.ts.map +1 -1
  21. package/lib/controls/processor-details-form/processor-details-form.component.d.ts +11 -4
  22. package/lib/controls/processor-details-form/processor-details-form.component.d.ts.map +1 -1
  23. package/lib/controls/security-toggle/security-toggle.component.d.ts.map +1 -1
  24. package/lib/controls/source-control-form/source-control-form.component.d.ts +3 -3
  25. package/lib/controls/source-control-form/source-control-form.component.d.ts.map +1 -1
  26. package/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.d.ts +2 -0
  27. package/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.d.ts.map +1 -1
  28. package/lib/dialogs/source-control-dialog/source-control-dialog.component.d.ts.map +1 -1
  29. package/lib/elements/projects/controls/hosting-details-form-group/hosting-details-form-group.component.d.ts.map +1 -1
  30. package/lib/elements/slotted-card/slotted-card.component.d.ts +3 -3
  31. package/lib/elements/slotted-card/slotted-card.component.d.ts.map +1 -1
  32. package/lib/services/applications-flow.service.d.ts +1 -0
  33. package/lib/services/applications-flow.service.d.ts.map +1 -1
  34. package/lowcodeunit-applications-flow-common.metadata.json +1 -1
  35. package/package.json +1 -1
@@ -248,6 +248,11 @@ class ApplicationsFlowService {
248
248
  headers: this.loadHeaders(),
249
249
  });
250
250
  }
251
+ NewLoadProjectHostingDetails() {
252
+ return this.http.get(`${this.apiRoot}/api/lowcodeunit/manage/projects/hosting/details`, {
253
+ headers: this.loadHeaders(),
254
+ });
255
+ }
251
256
  SaveEnterpriseAsCode(eac) {
252
257
  return this.http.post(`${this.apiRoot}/api/lowcodeunit/manage/eac`, eac, {
253
258
  headers: this.loadHeaders(),
@@ -1038,6 +1043,7 @@ class HostingDetailsFormGroupComponent {
1038
1043
  ngOnChanges() { }
1039
1044
  ngOnInit() {
1040
1045
  var _a, _b, _c;
1046
+ console.log("made it to hosting details");
1041
1047
  this.BuildPipeline =
1042
1048
  this.BuildPipeline || ((_a = this.Details) === null || _a === void 0 ? void 0 : _a.HostingOptions)
1043
1049
  ? (_c = (_b = this.Details) === null || _b === void 0 ? void 0 : _b.HostingOptions[0]) === null || _c === void 0 ? void 0 : _c.Lookup : '';
@@ -3554,7 +3560,9 @@ ColumnInfoCardComponent.propDecorators = {
3554
3560
  };
3555
3561
 
3556
3562
  class SlottedCardComponent {
3557
- constructor() { }
3563
+ constructor() {
3564
+ this.MainActionClicked = new EventEmitter;
3565
+ }
3558
3566
  ngOnInit() {
3559
3567
  }
3560
3568
  MainActionClickEvent() {
@@ -3564,18 +3572,18 @@ class SlottedCardComponent {
3564
3572
  SlottedCardComponent.decorators = [
3565
3573
  { type: Component, args: [{
3566
3574
  selector: 'lcu-slotted-card',
3567
- template: "<mat-card class=\"col-info-card\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title class=\"card-title\">{{ Title }}</mat-card-title>\n <mat-icon class=\"header-icon\">{{ Icon }}</mat-icon>\n </mat-card-header>\n \n <mat-card-content>\n\n <div class=\"slot-main-container\">\n\n <div class=\"header-description\">{{ MainSlotDescription }}</div>\n\n <div class=\"slot-main\">\n <ng-content></ng-content>\n </div>\n \n </div>\n\n <div *ngIf=\"SecondarySlotDescription\" class=\"slot-secondary-container\">\n\n <div class=\"header-description\">{{ SecondarySlotDescription }}</div>\n\n <div class=\"slot-secondary\">\n <ng-content select=\"[secondary]\"></ng-content>\n </div>\n \n </div>\n \n </mat-card-content>\n\n <mat-card-actions *ngIf=\"ActionText\" fxLayoutAlign=\"center\">\n <a mat-button class=\"slotted-card-action-btn\" [href]=\"ActionPath\">{{ ActionText }}</a>\n </mat-card-actions>\n\n </mat-card>\n\n\n",
3568
- styles: [".col-info-card{border:2px solid #d3d3d3;margin:20px;padding:0}.header-icon{margin-right:10px}.card-title{font-size:30px;margin-bottom:0}.header-description{background-color:#d3d3d3;margin-left:-2px;padding:10px}mat-card-actions{margin-bottom:0!important;margin-left:-1px!important;margin-right:0!important}.slotted-card-action-btn{border-radius:0 0 2px 2px;border-top:1px solid #d3d3d3;width:100%}"]
3575
+ template: "<mat-card class=\"col-info-card\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title class=\"card-title\">{{ Title }}</mat-card-title>\n <mat-icon class=\"header-icon\">{{ Icon }}</mat-icon>\n </mat-card-header>\n \n <mat-card-content>\n\n <div class=\"slot-main-container\">\n\n <div class=\"header-description\">{{ MainSlotDescription }}</div>\n\n <div class=\"slot-main\">\n <ng-content></ng-content>\n </div>\n \n </div>\n\n <div *ngIf=\"SecondarySlotDescription\" class=\"slot-secondary-container\">\n\n <div class=\"header-description\">{{ SecondarySlotDescription }}</div>\n\n <div class=\"slot-secondary\">\n <ng-content select=\"[secondary]\"></ng-content>\n </div>\n \n </div>\n \n </mat-card-content>\n\n <mat-card-actions *ngIf=\"ActionText\" fxLayoutAlign=\"center\">\n <a mat-button \n *ngIf=\"ActionPath\" \n class=\"slotted-card-action-btn\" \n [href]=\"ActionPath\" \n color=\"primary\">{{ ActionText }}\n </a>\n\n <a mat-button \n *ngIf=\"!ActionPath\" \n class=\"slotted-card-action-btn\" \n (click)=\"MainActionClickEvent()\" \n color=\"primary\">\n {{ ActionText }}\n </a>\n\n </mat-card-actions>\n\n </mat-card>\n\n\n",
3576
+ styles: [".col-info-card{border:2px solid #d3d3d3;margin:20px;padding:0}.header-icon{margin-right:10px}.card-title{font-size:30px;margin-bottom:0}.header-description{background-color:#d3d3d3;margin-left:-2px;padding:10px}mat-card-actions{margin-bottom:0!important;margin-left:-1px!important;margin-right:0!important}.slotted-card-action-btn{width:100%}"]
3569
3577
  },] }
3570
3578
  ];
3571
3579
  SlottedCardComponent.ctorParameters = () => [];
3572
3580
  SlottedCardComponent.propDecorators = {
3573
- Title: [{ type: Input, args: ['title',] }],
3581
+ ActionText: [{ type: Input, args: ['action-text',] }],
3582
+ ActionPath: [{ type: Input, args: ['action-path',] }],
3574
3583
  Icon: [{ type: Input, args: ['icon',] }],
3575
3584
  MainSlotDescription: [{ type: Input, args: ['main-slot-description',] }],
3585
+ Title: [{ type: Input, args: ['title',] }],
3576
3586
  SecondarySlotDescription: [{ type: Input, args: ['secondary-slot-description',] }],
3577
- ActionText: [{ type: Input, args: ['action-text',] }],
3578
- ActionPath: [{ type: Input, args: ['action-path',] }],
3579
3587
  MainActionClicked: [{ type: Output, args: ['main-action-clicked',] }]
3580
3588
  };
3581
3589
 
@@ -3846,30 +3854,13 @@ class SecurityToggleComponent {
3846
3854
  this.setupSecurityFormGroup();
3847
3855
  }
3848
3856
  SecuritySubmit() {
3849
- console.log("submitting values");
3857
+ //save the security settings
3858
+ console.log("submitting values: ", this.SecurityFormGroup.value);
3850
3859
  }
3851
3860
  setupSecurityFormGroup() {
3852
3861
  var _a, _b;
3853
3862
  this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
3854
- if (this.EditingApplication != null) {
3855
- // this.SecurityFormGroup = this.formBldr.group({
3856
- // name: [this.EditingApplication.Application?.Name, Validators.required],
3857
- // description: [
3858
- // this.EditingApplication.Application?.Description,
3859
- // Validators.required,
3860
- // ],
3861
- // route: [
3862
- // this.EditingApplication.LookupConfig?.PathRegex.replace('.*', '') ||
3863
- // '/',
3864
- // Validators.required,
3865
- // ],
3866
- // // priority: [
3867
- // // this.EditingApplication.Application?.Priority || 10000,
3868
- // // Validators.required,
3869
- // // ],
3870
- // procType: [this.ProcessorType, [Validators.required]],
3871
- // });
3872
- }
3863
+ this.SecurityFormGroup = this.formBldr.group({});
3873
3864
  this.setupSecurityForm();
3874
3865
  }
3875
3866
  setupSecurityForm() {
@@ -3881,7 +3872,7 @@ class SecurityToggleComponent {
3881
3872
  SecurityToggleComponent.decorators = [
3882
3873
  { type: Component, args: [{
3883
3874
  selector: 'lcu-security-toggle',
3884
- template: "<form class=\"security-form\" [formGroup]=\"SecurityFormGroup\" (ngSubmit)=\"SecuritySubmit()\">\n <mat-card class=\"spread flow-card\">\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>\n <!-- [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\" -->\n <button mat-raised-button type=\"submit\" >Save Security Settings</button>\n </mat-card-actions>\n </mat-card>\n</form>\n",
3875
+ template: "<form class=\"security-form\" [formGroup]=\"SecurityFormGroup\" (ngSubmit)=\"SecuritySubmit()\">\n <mat-card class=\"spread flow-card\">\n <mat-card-header>\n <mat-card-title> Security Settings </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-slide-toggle\n formControlName=\"isPrivate\"\n matTooltip=\"Is Secure Application?\"\n >\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Secured Application is one that requires the user to be authenticated to use the application. The application is hosted behind an identity wall.\"\n >\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <div>\n <div *ngIf=\"IsPrivateFormControl.value\">\n <div>\n <mat-slide-toggle formControlName=\"isTriggerSignIn\">\n Is Trigger Sign In Application?\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Trigger Sign In Application will direct the user to sign in if they are not already.\"\n >\n info_outline\n </mat-icon>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Settings\n </button>\n\n </mat-card-actions>\n \n </mat-card>\n</form>\n",
3885
3876
  styles: ["::ng-deep .mat-tooltip{color:#000!important}"]
3886
3877
  },] }
3887
3878
  ];
@@ -3893,9 +3884,9 @@ SecurityToggleComponent.propDecorators = {
3893
3884
  };
3894
3885
 
3895
3886
  class ProcessorDetailsFormComponent {
3896
- constructor(formBldr) {
3887
+ constructor(formBldr, eacSvc) {
3897
3888
  this.formBldr = formBldr;
3898
- // this.EditingApplicationLookup = null;
3889
+ this.eacSvc = eacSvc;
3899
3890
  this.redirectTooltip = '';
3900
3891
  }
3901
3892
  get BuildFormControl() {
@@ -3910,6 +3901,13 @@ class ProcessorDetailsFormComponent {
3910
3901
  var _a;
3911
3902
  return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.defaultFile;
3912
3903
  }
3904
+ get DefaultSourceControl() {
3905
+ var _a, _b, _c, _d;
3906
+ return {
3907
+ Organization: (_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Organization,
3908
+ Repository: (_d = (_c = this.EditingApplication) === null || _c === void 0 ? void 0 : _c.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Repository,
3909
+ };
3910
+ }
3913
3911
  get InboundPathFormControl() {
3914
3912
  var _a;
3915
3913
  return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.inboundPath;
@@ -3943,7 +3941,15 @@ class ProcessorDetailsFormComponent {
3943
3941
  return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.preserveMethod;
3944
3942
  }
3945
3943
  ngOnInit() {
3946
- this.setupProcessorDetailsForm();
3944
+ if (!this.EditingApplication) {
3945
+ this.CreateNewApplication();
3946
+ }
3947
+ else {
3948
+ this.setupProcessorDetailsForm();
3949
+ }
3950
+ }
3951
+ CreateNewApplication() {
3952
+ this.SetEditingApplication(Guid.CreateRaw());
3947
3953
  }
3948
3954
  DetermineTooltipText() {
3949
3955
  let permanentValue = this.PermanentFormControl.value;
@@ -3961,7 +3967,12 @@ class ProcessorDetailsFormComponent {
3961
3967
  this.redirectTooltip = '308 – Permanent and Preserve';
3962
3968
  }
3963
3969
  }
3970
+ SetEditingApplication(appLookup) {
3971
+ this.EditingApplicationLookup = appLookup;
3972
+ this.setupProcessorDetailsForm();
3973
+ }
3964
3974
  SubmitProcessorDetails() {
3975
+ console.log("submitting proc details: ", this.ProcessorDetailsFormGroup.value);
3965
3976
  }
3966
3977
  ProcessorTypeChanged(event) {
3967
3978
  this.ProcessorType = event.value;
@@ -4027,26 +4038,15 @@ class ProcessorDetailsFormComponent {
4027
4038
  }
4028
4039
  }
4029
4040
  setupProcessorDetailsForm() {
4030
- var _a, _b, _c, _d, _e;
4041
+ var _a, _b;
4031
4042
  this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
4043
+ console.log("EDITING APP = ", this.EditingApplication);
4032
4044
  if (this.EditingApplication != null) {
4033
4045
  this.ProcessorDetailsFormGroup = this.formBldr.group({
4034
- name: [(_c = this.EditingApplication.Application) === null || _c === void 0 ? void 0 : _c.Name, Validators.required],
4035
- description: [
4036
- (_d = this.EditingApplication.Application) === null || _d === void 0 ? void 0 : _d.Description,
4037
- Validators.required,
4038
- ],
4039
- route: [
4040
- ((_e = this.EditingApplication.LookupConfig) === null || _e === void 0 ? void 0 : _e.PathRegex.replace('.*', '')) ||
4041
- '/',
4042
- Validators.required,
4043
- ],
4044
- // priority: [
4045
- // this.EditingApplication.Application?.Priority || 10000,
4046
- // Validators.required,
4047
- // ],
4048
- procType: [this.ProcessorType, [Validators.required]],
4046
+ procType: [this.ProcessorType, [Validators.required]]
4049
4047
  });
4048
+ this.setupDfsForm();
4049
+ this.setupLcuTypeSubForm();
4050
4050
  }
4051
4051
  }
4052
4052
  setupLCUGitHubForm() {
@@ -4057,22 +4057,22 @@ class ProcessorDetailsFormComponent {
4057
4057
  var _a;
4058
4058
  this.ProcessorDetailsFormGroup.addControl('applicationId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ApplicationID) || '', [Validators.required]));
4059
4059
  }
4060
- setupLCUNPMForm() {
4061
- // this.ApplicationFormGroup.addControl(
4062
- // 'package',
4063
- // this.formBldr.control(
4064
- // this.EditingApplication.LowCodeUnit?.Package || '',
4065
- // [Validators.required]
4066
- // )
4067
- // );
4068
- // this.ApplicationFormGroup.addControl(
4069
- // 'version',
4070
- // this.formBldr.control(
4071
- // this.EditingApplication.LowCodeUnit?.Version || '',
4072
- // [Validators.required]
4073
- // )
4074
- // );
4075
- }
4060
+ // protected setupLCUNPMForm(): void {
4061
+ // this.ApplicationFormGroup.addControl(
4062
+ // 'package',
4063
+ // this.formBldr.control(
4064
+ // this.EditingApplication.LowCodeUnit?.Package || '',
4065
+ // [Validators.required]
4066
+ // )
4067
+ // );
4068
+ // this.ApplicationFormGroup.addControl(
4069
+ // 'version',
4070
+ // this.formBldr.control(
4071
+ // this.EditingApplication.LowCodeUnit?.Version || '',
4072
+ // [Validators.required]
4073
+ // )
4074
+ // );
4075
+ // }
4076
4076
  setupLCUSPAForm() {
4077
4077
  var _a;
4078
4078
  this.ProcessorDetailsFormGroup.addControl('spaRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SPARoot) || '', [Validators.required]));
@@ -4144,15 +4144,18 @@ class ProcessorDetailsFormComponent {
4144
4144
  ProcessorDetailsFormComponent.decorators = [
4145
4145
  { type: Component, args: [{
4146
4146
  selector: 'lcu-processor-details-form',
4147
- template: "<form class=\"processor-details-form\" [formGroup]=\"ProcessorDetailsFormGroup\" (ngSubmit)=\"SubmitProcessorDetails()\">\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 <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=\"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\n class=\"mat-full-width\"\n *ngIf=\"\n SourceControlFormControls?.RepositoryFormControl?.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 </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 <!-- <mat-icon\n *ngIf=\"!IsPermanent && !IsPreserve\"\n\n class=\"spread\"\n matSuffix\n matTooltip=\"302 \u2013 Not Permanent and Not Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n <!-- <mat-icon\n *ngIf=\"!IsPermanent && IsPreserve\"\n class=\"spread\"\n matSuffix\n matTooltip=\"307 \u2013 Not Permanent and Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n <!-- <mat-icon\n *ngIf=\"IsPermanent && IsPreserve\"\n class=\"spread\"\n matSuffix\n matTooltip=\"308 \u2013 Permanent and Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n \n\n <!-- <mat-icon\n class=\"spread\"\n matSuffix\n matTooltip=\"Values used to control the redirect type. Permanent and Not Preserve = 301; Not Permanent and Not Preserve = 302; Permanent and Preserve = 308; Not Permanent and Not Preserve = 307;\"\n >\n info_outline\n </mat-icon> -->\n </div>\n </div>\n </div>\n </mat-card-content>\n <mat-card-actions>\n <!-- [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\" -->\n <button mat-raised-button type=\"submit\" >Save</button>\n </mat-card-actions>\n</mat-card>\n</form>\n \n",
4147
+ template: "<form class=\"processor-details-form\" [formGroup]=\"ProcessorDetailsFormGroup\" (ngSubmit)=\"SubmitProcessorDetails()\">\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 <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=\"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\n class=\"mat-full-width\"\n *ngIf=\"\n SourceControlFormControls?.RepositoryFormControl?.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 </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 <!-- <mat-icon\n *ngIf=\"!IsPermanent && !IsPreserve\"\n\n class=\"spread\"\n matSuffix\n matTooltip=\"302 \u2013 Not Permanent and Not Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n <!-- <mat-icon\n *ngIf=\"!IsPermanent && IsPreserve\"\n class=\"spread\"\n matSuffix\n matTooltip=\"307 \u2013 Not Permanent and Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n <!-- <mat-icon\n *ngIf=\"IsPermanent && IsPreserve\"\n class=\"spread\"\n matSuffix\n matTooltip=\"308 \u2013 Permanent and Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n \n\n <!-- <mat-icon\n class=\"spread\"\n matSuffix\n matTooltip=\"Values used to control the redirect type. Permanent and Not Preserve = 301; Not Permanent and Not Preserve = 302; Permanent and Preserve = 308; Not Permanent and Not Preserve = 307;\"\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 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\n </mat-card-actions>\n</mat-card>\n</form>\n \n",
4148
4148
  styles: [""]
4149
4149
  },] }
4150
4150
  ];
4151
4151
  ProcessorDetailsFormComponent.ctorParameters = () => [
4152
- { type: FormBuilder }
4152
+ { type: FormBuilder },
4153
+ { type: EaCService }
4153
4154
  ];
4154
4155
  ProcessorDetailsFormComponent.propDecorators = {
4155
- EditingApplication: [{ type: Input, args: ['editing-application',] }]
4156
+ EditingApplication: [{ type: Input, args: ['editing-application',] }],
4157
+ EditingApplicationLookup: [{ type: Input, args: ['editing-application-lookup',] }],
4158
+ SourceControlFormControls: [{ type: ViewChild, args: [SourceControlFormControlsComponent,] }]
4156
4159
  };
4157
4160
 
4158
4161
  class SourceControlFormComponent {
@@ -4171,7 +4174,6 @@ class SourceControlFormComponent {
4171
4174
  return Object.keys(this.SourceControls || {});
4172
4175
  }
4173
4176
  get SourceControls() {
4174
- console.log("Environment: ", this.Environment);
4175
4177
  return this.Environment.Sources || {};
4176
4178
  }
4177
4179
  ngOnInit() {
@@ -4182,11 +4184,13 @@ class SourceControlFormComponent {
4182
4184
  console.log("sourceControlLookupChanged: ", event);
4183
4185
  }
4184
4186
  SubmitSourceControl() {
4187
+ console.log("submitting source control: ", this.SourceControlFormGroup.value);
4185
4188
  }
4186
4189
  //HELPER
4187
4190
  setupSourceControlForm() {
4188
4191
  var _a, _b;
4189
4192
  this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
4193
+ this.SourceControlFormGroup = this.formBldr.group({});
4190
4194
  this.setupBuildForm();
4191
4195
  }
4192
4196
  setupBuildForm() {
@@ -4198,7 +4202,7 @@ class SourceControlFormComponent {
4198
4202
  SourceControlFormComponent.decorators = [
4199
4203
  { type: Component, args: [{
4200
4204
  selector: 'lcu-source-control-form',
4201
- template: "<form class=\"source-control-form\" [formGroup]=\"SourceControlFormGroup\" (ngSubmit)=\"SubmitSourceControl()\">\n\n<mat-card class=\"spread flow-card\" *ngIf=\"ProcessorType != 'Redirect'\">\n <mat-card-header>\n <mat-card-title *ngIf=\"!HasBuildFormControl.value\">\n Build & Source\n </mat-card-title>\n\n <mat-card-title *ngIf=\"HasBuildFormControl.value\">\n Source Control\n </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-slide-toggle\n formControlName=\"hasBuild\"\n matTooltip=\"Has Build?\"\n >\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"Configure source control, DevOps CI/CD, and artifacts.\"\n >\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <mat-form-field\n class=\"mat-full-width\"\n *ngIf=\"\n HasBuildFormControl.value && SourceControlLookups?.length > 0\n \"\n >\n <mat-select\n formControlName=\"sourceControlLookup\"\n placeholder=\"Source Control\"\n (selectionChange)=\"SourceControlLookupChanged($event)\"\n [disabled]=\"\n SourceControlFormControls?.Loading || HostingDetails?.Loading\n \"\n >\n <ng-container\n *ngFor=\"let srcCtrlLookup of SourceControlLookups\"\n >\n <mat-option\n [value]=\"srcCtrlLookup\"\n *ngIf=\"SourceControls[srcCtrlLookup]; let srcCtrl\"\n >\n {{ srcCtrl.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <div *ngIf=\"HasBuildFormControl?.value\">\n <h3>\n @{{\n SourceControlFormControls?.OrganizationFormControl?.value ||\n SourceControl?.Organization\n }}/{{\n SourceControlFormControls?.RepositoryFormControl?.value ||\n SourceControl?.Repository\n }}\n </h3>\n\n <p>Organization and Repository pulled from build settings</p>\n\n <mat-hint>\n CurrentBuild:\n {{ EditingApplication?.LowCodeUnit?.CurrentBuild }}\n </mat-hint>\n </div>\n </mat-form-field>\n\n <div *ngIf=\"SourceControlLookups?.length < 0\">\n <h3>\n Create source control locations under the DevOps tab above.\n </h3>\n </div>\n </mat-card-content>\n <mat-card-actions>\n <!-- [disabled]=\"!SourceControlFormGroup.valid || !SourceControlFormGroup.dirty\" -->\n <button mat-raised-button type=\"submit\" >Save</button>\n </mat-card-actions>\n </mat-card>\n</form>\n",
4205
+ template: "<form class=\"source-control-form\" [formGroup]=\"SourceControlFormGroup\" (ngSubmit)=\"SubmitSourceControl()\">\n\n<mat-card class=\"spread flow-card\" *ngIf=\"ProcessorType != 'Redirect'\">\n <mat-card-header>\n <mat-card-title *ngIf=\"!HasBuildFormControl.value\">\n Build & Source\n </mat-card-title>\n\n <mat-card-title *ngIf=\"HasBuildFormControl.value\">\n Source Control\n </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-slide-toggle\n formControlName=\"hasBuild\"\n matTooltip=\"Has Build?\"\n >\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"Configure source control, DevOps CI/CD, and artifacts.\"\n >\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <mat-form-field\n class=\"mat-full-width\"\n *ngIf=\"\n HasBuildFormControl.value && SourceControlLookups?.length > 0\n \"\n >\n <mat-select\n formControlName=\"sourceControlLookup\"\n placeholder=\"Source Control\"\n (selectionChange)=\"SourceControlLookupChanged($event)\"\n [disabled]=\"\n SourceControlFormControls?.Loading || HostingDetails?.Loading\n \"\n >\n <ng-container\n *ngFor=\"let srcCtrlLookup of SourceControlLookups\"\n >\n <mat-option\n [value]=\"srcCtrlLookup\"\n *ngIf=\"SourceControls[srcCtrlLookup]; let srcCtrl\"\n >\n {{ srcCtrl.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <div *ngIf=\"HasBuildFormControl?.value\">\n <h3>\n @{{\n SourceControlFormControls?.OrganizationFormControl?.value ||\n SourceControl?.Organization\n }}/{{\n SourceControlFormControls?.RepositoryFormControl?.value ||\n SourceControl?.Repository\n }}\n </h3>\n\n <p>Organization and Repository pulled from build settings</p>\n\n <mat-hint>\n CurrentBuild:\n {{ EditingApplication?.LowCodeUnit?.CurrentBuild }}\n </mat-hint>\n </div>\n </mat-form-field>\n\n <div *ngIf=\"SourceControlLookups?.length < 0\">\n <h3>\n Create source control locations under the DevOps tab above.\n </h3>\n </div>\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!SourceControlFormGroup.valid || !SourceControlFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save\n </button>\n \n </mat-card-actions>\n </mat-card>\n</form>\n",
4202
4206
  styles: [""]
4203
4207
  },] }
4204
4208
  ];
@@ -4212,16 +4216,23 @@ SourceControlFormComponent.propDecorators = {
4212
4216
  };
4213
4217
 
4214
4218
  class BuildPipelineFormComponent {
4215
- constructor(formBldr, appsFlowSvc) {
4216
- this.formBldr = formBldr;
4219
+ constructor(eacSvc, formBuilder, appsFlowSvc) {
4220
+ this.eacSvc = eacSvc;
4221
+ this.formBuilder = formBuilder;
4217
4222
  this.appsFlowSvc = appsFlowSvc;
4218
4223
  this.HostingDetails = new ProjectHostingDetails();
4219
4224
  }
4220
- //PROPERTIES
4225
+ // @Input('main-branch')
4226
+ // public MainBranch: string;
4227
+ // @Input('organization')
4228
+ // public Organization: string;
4229
+ // @Input('repository')
4230
+ // public Repository: string;
4221
4231
  get Artifact() {
4222
- var _a, _b;
4223
- return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts) && this.ArtifactLookup
4224
- ? ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts[this.ArtifactLookup]) || {}
4232
+ var _a, _b, _c;
4233
+ console.log("ARTIFACT: ", (_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts[this.ArtifactLookup]);
4234
+ return ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts) && this.ArtifactLookup
4235
+ ? ((_c = this.Environment) === null || _c === void 0 ? void 0 : _c.Artifacts[this.ArtifactLookup]) || {}
4225
4236
  : {};
4226
4237
  }
4227
4238
  get ArtifactLookup() {
@@ -4229,6 +4240,10 @@ class BuildPipelineFormComponent {
4229
4240
  const artLookup = ((_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.ArtifactLookups) ? (_b = this.DevOpsAction) === null || _b === void 0 ? void 0 : _b.ArtifactLookups[0] : null;
4230
4241
  return artLookup;
4231
4242
  }
4243
+ get BuildPipelineFormControl() {
4244
+ var _a;
4245
+ return (_a = this.BuildPipelineFormGroup) === null || _a === void 0 ? void 0 : _a.controls.buildPipeline;
4246
+ }
4232
4247
  get DevOpsAction() {
4233
4248
  return this.Environment.DevOpsActions && this.DevOpsActionLookup
4234
4249
  ? this.Environment.DevOpsActions[this.DevOpsActionLookup] || {}
@@ -4237,6 +4252,9 @@ class BuildPipelineFormComponent {
4237
4252
  get DevOpsActions() {
4238
4253
  return this.Environment.DevOpsActions || {};
4239
4254
  }
4255
+ get DevOpsActionNameFormControl() {
4256
+ return this.BuildPipelineFormGroup.get('devOpsActionName');
4257
+ }
4240
4258
  get EditingSourceControl() {
4241
4259
  var _a, _b;
4242
4260
  let sc = ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources) ? (_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Sources[this.EditingSourceControlLookup] : null;
@@ -4245,12 +4263,22 @@ class BuildPipelineFormComponent {
4245
4263
  }
4246
4264
  return sc;
4247
4265
  }
4248
- // @Input('main-branch')
4249
- // public MainBranch: string;
4250
- // @Input('organization')
4251
- // public Organization: string;
4252
- // @Input('repository')
4253
- // public Repository: string;
4266
+ get NPMTokenFormControl() {
4267
+ return this.BuildPipelineFormGroup.get('npmToken');
4268
+ }
4269
+ // (ho) => ho.Lookup === this.BuildPipeline
4270
+ get SelectedHostingOption() {
4271
+ var _a, _b;
4272
+ return (_b = (_a = this.HostingDetails) === null || _a === void 0 ? void 0 : _a.HostingOptions) === null || _b === void 0 ? void 0 : _b.find((ho) => ho.Lookup === this.BuildPipeline);
4273
+ }
4274
+ get SelectedHostingOptionInputControlValues() {
4275
+ var _a, _b;
4276
+ return (_b = (_a = this.SelectedHostingOption) === null || _a === void 0 ? void 0 : _a.Inputs) === null || _b === void 0 ? void 0 : _b.reduce((prev, cur) => {
4277
+ const res = Object.assign({}, prev);
4278
+ res[cur.Lookup] = this.BuildPipelineFormGroup.controls[cur.Lookup].value;
4279
+ return res;
4280
+ }, {});
4281
+ }
4254
4282
  get SourceControlLookups() {
4255
4283
  return Object.keys(this.SourceControls || {});
4256
4284
  }
@@ -4258,40 +4286,179 @@ class BuildPipelineFormComponent {
4258
4286
  return this.Environment.Sources || {};
4259
4287
  }
4260
4288
  ngOnInit() {
4289
+ this.BuildPipelineFormGroup = this.formBuilder.group({});
4290
+ if (this.BuildPipelineFormGroup != null) {
4291
+ this.BuildPipelineFormGroup.removeControl('hostingDetails');
4292
+ }
4293
+ this.BuildPipelineFormGroup.addControl('hostingDetails', this.formBuilder.group({
4294
+ buildPipeline: [this.BuildPipeline, [Validators.required]],
4295
+ }));
4296
+ this.loadProjectHostingDetails();
4297
+ }
4298
+ //API METHODS
4299
+ BuildPipelineChanged() {
4300
+ var _a, _b;
4301
+ console.log("build pipeline value: ", (_a = this.BuildPipelineFormControl) === null || _a === void 0 ? void 0 : _a.value);
4302
+ this.BuildPipeline = (_b = this.BuildPipelineFormControl) === null || _b === void 0 ? void 0 : _b.value;
4303
+ this.setupControlsForForm();
4304
+ }
4305
+ SubmitBuildPipeline() {
4306
+ console.log("submitting build pipeline: ", this.BuildPipelineFormGroup.value);
4307
+ }
4308
+ SaveEnvironment() {
4309
+ var _a;
4310
+ const saveEnvReq = {
4311
+ Environment: Object.assign(Object.assign({}, this.Environment), { Artifacts: this.Environment.Artifacts || {}, DevOpsActions: this.Environment.DevOpsActions || {}, Secrets: this.Environment.Secrets || {}, Sources: this.Environment.Sources || {} }),
4312
+ EnvironmentLookup: this.EnvironmentLookup,
4313
+ EnterpriseDataTokens: {},
4314
+ };
4315
+ let artifactLookup;
4316
+ let artifact = Object.assign(Object.assign({}, this.Artifact), this.SelectedHostingOptionInputControlValues);
4317
+ if (!this.ArtifactLookup) {
4318
+ artifactLookup = Guid.CreateRaw();
4319
+ artifact = Object.assign(Object.assign({}, artifact), { Type: this.SelectedHostingOption
4320
+ .ArtifactType, Name: this.SelectedHostingOption.Name, NPMRegistry: 'https://registry.npmjs.org/' });
4321
+ }
4322
+ else {
4323
+ artifactLookup = this.ArtifactLookup;
4324
+ }
4325
+ saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
4326
+ let devOpsActionLookup;
4327
+ if (!this.DevOpsActionLookup) {
4328
+ devOpsActionLookup = Guid.CreateRaw();
4329
+ const doa = Object.assign(Object.assign({}, this.DevOpsAction), { ArtifactLookups: [artifactLookup], Name: this.DevOpsActionNameFormControl.value, Path: this.SelectedHostingOption.Path, Templates: this.SelectedHostingOption.Templates });
4330
+ if ((_a = this.NPMTokenFormControl) === null || _a === void 0 ? void 0 : _a.value) {
4331
+ const secretLookup = 'npm-access-token';
4332
+ doa.SecretLookups = [secretLookup];
4333
+ saveEnvReq.Environment.Secrets[secretLookup] = {
4334
+ Name: 'NPM Access Token',
4335
+ DataTokenLookup: secretLookup,
4336
+ KnownAs: 'NPM_TOKEN',
4337
+ };
4338
+ saveEnvReq.EnterpriseDataTokens[secretLookup] = {
4339
+ Name: saveEnvReq.Environment.Secrets[secretLookup].Name,
4340
+ Description: saveEnvReq.Environment.Secrets[secretLookup].Name,
4341
+ Value: this.NPMTokenFormControl.value,
4342
+ };
4343
+ }
4344
+ saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
4345
+ }
4346
+ else {
4347
+ devOpsActionLookup = this.DevOpsActionLookup;
4348
+ const doa = Object.assign(Object.assign({}, this.DevOpsAction), { Name: this.DevOpsActionNameFormControl.value });
4349
+ saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
4350
+ }
4351
+ // let source: EaCSourceControl = {
4352
+ // ...this.EditingSourceControl,
4353
+ // Branches: this.SourceControlFormControls.SelectedBranches,
4354
+ // MainBranch: this.SourceControlFormControls.MainBranchFormControl.value,
4355
+ // };
4356
+ // source = {
4357
+ // ...source,
4358
+ // Type: 'GitHub',
4359
+ // Name: this.EditingSourceControlLookup,
4360
+ // DevOpsActionTriggerLookups: [devOpsActionLookup],
4361
+ // Organization:
4362
+ // this.SourceControlFormControls.OrganizationFormControl.value,
4363
+ // Repository: this.SourceControlFormControls.RepositoryFormControl.value,
4364
+ // };
4365
+ // const scLookup = `github://${source.Organization}/${source.Repository}`;
4366
+ // saveEnvReq.Environment.Sources[scLookup] = source;
4367
+ this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
4368
+ }
4369
+ // Helpers
4370
+ setupControlsForForm() {
4371
+ var _a, _b, _c, _d, _e, _f;
4372
+ for (const ctrlName in this.BuildPipelineFormGroup.controls) {
4373
+ //devOpsAction doesn't exist
4374
+ //removes hosting details
4375
+ if (ctrlName !== 'buildPipeline' && ctrlName !== 'devOpsAction') {
4376
+ console.log("removing control: ", ctrlName);
4377
+ this.BuildPipelineFormGroup.removeControl(ctrlName);
4378
+ }
4379
+ }
4380
+ this.BuildPipelineFormGroup.addControl('devOpsActionName', this.formBuilder.control(((_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.Name) || ((_b = this.SelectedHostingOption) === null || _b === void 0 ? void 0 : _b.Name) || '', [Validators.required]));
4381
+ (_d = (_c = this.SelectedHostingOption) === null || _c === void 0 ? void 0 : _c.Inputs) === null || _d === void 0 ? void 0 : _d.forEach((input) => {
4382
+ const validators = input.Required ? [Validators.required] : [];
4383
+ this.BuildPipelineFormGroup.addControl(input.Lookup, this.formBuilder.control(this.Artifact[input.Lookup] || input.DefaultValue || '', validators));
4384
+ // if (this.Disabled) {
4385
+ // this.FormGroup.controls[input.Lookup].disable();
4386
+ // }
4387
+ });
4388
+ if (((_e = this.BuildPipelineFormControl) === null || _e === void 0 ? void 0 : _e.value) === 'npm-release') {
4389
+ if (!this.BuildPipelineFormGroup.controls.npmToken) {
4390
+ this.BuildPipelineFormGroup.addControl('npmToken', this.formBuilder.control('', this.Disabled ? [] : [Validators.required]));
4391
+ if (this.Disabled) {
4392
+ this.BuildPipelineFormGroup.controls.npmToken.disable();
4393
+ }
4394
+ }
4395
+ }
4396
+ else if (((_f = this.BuildPipelineFormControl) === null || _f === void 0 ? void 0 : _f.value) === 'github-artifacts-release') {
4397
+ if (this.BuildPipelineFormGroup.controls.npmToken) {
4398
+ this.BuildPipelineFormGroup.removeControl('npmToken');
4399
+ }
4400
+ }
4401
+ }
4402
+ loadProjectHostingDetails() {
4403
+ this.HostingDetails.Loading = true;
4404
+ // this.Organization,
4405
+ // this.Repository,
4406
+ // this.MainBranch
4407
+ // "powhound4",
4408
+ // "RedwoodCrystals",
4409
+ // "master"
4410
+ this.appsFlowSvc
4411
+ .NewLoadProjectHostingDetails()
4412
+ .subscribe((response) => {
4413
+ var _a, _b, _c;
4414
+ this.HostingDetails = response.Model;
4415
+ console.log("response: ", response);
4416
+ this.HostingDetails.Loading = false;
4417
+ this.BuildPipeline =
4418
+ ((_a = this.HostingDetails) === null || _a === void 0 ? void 0 : _a.HostingOptions) ? (_c = (_b = this.HostingDetails) === null || _b === void 0 ? void 0 : _b.HostingOptions[0]) === null || _c === void 0 ? void 0 : _c.Lookup : '';
4419
+ console.log("Build Pipeline HERE= ", this.BuildPipeline);
4420
+ this.setupControlsForForm();
4421
+ }, (err) => {
4422
+ console.log("ERR: ", err);
4423
+ this.HostingDetails.Loading = false;
4424
+ });
4425
+ console.log("HOSTING DETAILS: ", this.HostingDetails);
4261
4426
  }
4262
4427
  }
4263
4428
  BuildPipelineFormComponent.decorators = [
4264
4429
  { type: Component, args: [{
4265
4430
  selector: 'lcu-build-pipeline-form',
4266
- template: "<div class=\"form-card\" fxFlex=\"35%\" fxFlex.lt-md=\"100%\">\n <mat-card\n class=\"spread\"\n *ngIf=\"EditingSourceControl?.Branches?.length > 0\"\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>\n <!-- [details]=\"HostingDetails\" \n [organization]=\"Organization\"\n [formGroup]=\"DevOpsFormGroup\"-->\n\n <lcu-hosting-details-form-group\n [artifact]=\"Artifact\"\n [devops-action]=\"DevOpsActions[DevOpsActionLookup]\"\n \n \n [disabled]=\"false\"\n ></lcu-hosting-details-form-group>\n </ng-container>\n </mat-card-content>\n </mat-card>\n </div>\n",
4431
+ template: "<form class=\"form-card\" [formGroup]=\"BuildPipelineFormGroup\" (ngSubmit)=\"SubmitBuildPipeline()\">\n <!-- *ngIf=\"EditingSourceControl?.Branches?.length > 0\" -->\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>\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 >\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 <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \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 \n </mat-card-actions>\n </mat-card>\n</form>\n",
4267
4432
  styles: [""]
4268
4433
  },] }
4269
4434
  ];
4270
4435
  BuildPipelineFormComponent.ctorParameters = () => [
4436
+ { type: EaCService },
4271
4437
  { type: FormBuilder },
4272
4438
  { type: ApplicationsFlowService }
4273
4439
  ];
4274
4440
  BuildPipelineFormComponent.propDecorators = {
4441
+ BuildPipeline: [{ type: Input, args: ['build-pipeline',] }],
4275
4442
  DevOpsActionLookup: [{ type: Input, args: ['devops-action-lookup',] }],
4276
- Environment: [{ type: Input, args: ['environment',] }]
4443
+ Disabled: [{ type: Input, args: ['disabled',] }],
4444
+ Environment: [{ type: Input, args: ['environment',] }],
4445
+ EnvironmentLookup: [{ type: Input, args: ['environment-lookup',] }]
4277
4446
  };
4278
4447
 
4279
4448
  class DevopsSourceControlFormComponent {
4280
4449
  // Constructors
4281
- constructor(formBuilder, appsFlowSvc, eacSvc) {
4282
- this.formBuilder = formBuilder;
4450
+ constructor(appsFlowSvc, eacSvc, formBuilder) {
4283
4451
  this.appsFlowSvc = appsFlowSvc;
4284
4452
  this.eacSvc = eacSvc;
4453
+ this.formBuilder = formBuilder;
4285
4454
  this.SeparatorKeysCodes = [ENTER, COMMA];
4286
4455
  this.BuildPath = null;
4287
- // this.EditingSourceControlLookup = null;
4288
4456
  this.HostingDetails = new ProjectHostingDetails();
4289
4457
  this.SelectedBranches = [];
4290
4458
  this.SourceControlRoot = '';
4291
4459
  this.UseBranches = true;
4292
4460
  this.UseBuildPath = false;
4293
4461
  }
4294
- // Fields
4295
4462
  // Properties
4296
4463
  get BranchesFormControl() {
4297
4464
  return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
@@ -4343,12 +4510,9 @@ class DevopsSourceControlFormComponent {
4343
4510
  this.destroyFormControls();
4344
4511
  }
4345
4512
  ngOnInit() {
4346
- console.log("org: ", this.EditingSourceControl);
4347
- console.log("lookup: ", this.EditingSourceControlLookup);
4348
4513
  if (this.EditingSourceControlLookup === null) {
4349
4514
  this.CreateNewSourceControl();
4350
4515
  }
4351
- console.log("org: ", this.EditingSourceControl);
4352
4516
  if (this.EditingSourceControl != null) {
4353
4517
  this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
4354
4518
  this.setupFormControls();
@@ -4367,6 +4531,7 @@ class DevopsSourceControlFormComponent {
4367
4531
  this.loadProjectHostingDetails();
4368
4532
  }
4369
4533
  BuildPathChanged(event) {
4534
+ //do something??
4370
4535
  }
4371
4536
  CreateNewSourceControl() {
4372
4537
  this.SetEditingSourceControl(Guid.CreateRaw());
@@ -4442,7 +4607,7 @@ class DevopsSourceControlFormComponent {
4442
4607
  this.EditingSourceControlLookup = scLookup;
4443
4608
  }
4444
4609
  SubmitSourceControl() {
4445
- console.log("source control submitted");
4610
+ console.log("source control submitted: ", this.DevOpsSourceControlFormGroup.value);
4446
4611
  }
4447
4612
  // public SaveSourceControl(): void {
4448
4613
  // const saveEnvReq: SaveEnvironmentAsCodeEventRequest = {
@@ -4457,23 +4622,23 @@ class DevopsSourceControlFormComponent {
4457
4622
  // EnterpriseDataTokens: {},
4458
4623
  // };
4459
4624
  // let artifactLookup: string;
4460
- // // let artifact: EaCArtifact = {
4461
- // // ...this.Artifact,
4462
- // // ...this.HostingDetailsFormControls
4463
- // // .SelectedHostingOptionInputControlValues,
4464
- // // };
4465
- // if (!this.ArtifactLookup) {
4466
- // artifactLookup = Guid.CreateRaw();
4467
- // artifact = {
4468
- // ...artifact,
4469
- // Type: this.HostingDetailsFormControls.SelectedHostingOption
4470
- // .ArtifactType,
4471
- // Name: this.HostingDetailsFormControls.SelectedHostingOption.Name,
4472
- // NPMRegistry: 'https://registry.npmjs.org/',
4473
- // };
4474
- // } else {
4475
- // artifactLookup = this.ArtifactLookup;
4476
- // }
4625
+ // let artifact: EaCArtifact = {
4626
+ // ...this.Artifact,
4627
+ // ...this.HostingDetailsFormControls
4628
+ // .SelectedHostingOptionInputControlValues,
4629
+ // };
4630
+ // // if (!this.ArtifactLookup) {
4631
+ // // artifactLookup = Guid.CreateRaw();
4632
+ // // artifact = {
4633
+ // // ...artifact,
4634
+ // // Type: this.HostingDetailsFormControls.SelectedHostingOption
4635
+ // // .ArtifactType,
4636
+ // // Name: this.HostingDetailsFormControls.SelectedHostingOption.Name,
4637
+ // // NPMRegistry: 'https://registry.npmjs.org/',
4638
+ // // };
4639
+ // // } else {
4640
+ // // artifactLookup = this.ArtifactLookup;
4641
+ // // }
4477
4642
  // saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
4478
4643
  // let devOpsActionLookup: string;
4479
4644
  // if (!this.DevOpsActionLookup) {
@@ -4672,19 +4837,19 @@ class DevopsSourceControlFormComponent {
4672
4837
  DevopsSourceControlFormComponent.decorators = [
4673
4838
  { type: Component, args: [{
4674
4839
  selector: 'lcu-devops-source-control-form',
4675
- template: "<form class=\"form-card\" [formGroup]=\"DevOpsSourceControlFormGroup\" (ngSubmit)=\"SubmitSourceControl()\">\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 <div class=\"card\">\n <mat-form-field class=\"mat-full-width\">\n <mat-select formControlName=\"devOpsActionLookup\" placeholder=\"DevOps Action\"\n [disabled]=\"HostingDetails?.Loading\" (selectionChange)=\"DevOpsActionLookupChanged($event)\">\n <ng-container *ngFor=\"let devOpsActionLookup of DevOpsActionLookups\">\n <mat-option [value]=\"devOpsActionLookup\" *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 class=\"mat-full-width with-hint\" *ngIf=\"OrganizationOptions?.length > 0\">\n <mat-icon class=\"org-icon\" matPrefix>corporate_fare</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'organization'\" placeholder=\"Organization\"\n (selectionChange)=\"OrganizationChanged($event)\" [disabled]=\"Loading || HostingDetails?.Loading\" required>\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\"> 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\" 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()\"> 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\">\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 <!-- </div> -->\n\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n <!-- [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\" -->\n <button mat-raised-button type=\"submit\">Save</button>\n </mat-card-actions>\n </mat-card>\n</form>",
4840
+ template: "<form class=\"form-card\" [formGroup]=\"DevOpsSourceControlFormGroup\" (ngSubmit)=\"SubmitSourceControl()\">\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 <div class=\"card\">\n <mat-form-field class=\"mat-full-width\">\n <mat-select formControlName=\"devOpsActionLookup\" placeholder=\"DevOps Action\"\n [disabled]=\"HostingDetails?.Loading\" (selectionChange)=\"DevOpsActionLookupChanged($event)\">\n <ng-container *ngFor=\"let devOpsActionLookup of DevOpsActionLookups\">\n <mat-option [value]=\"devOpsActionLookup\" *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 class=\"mat-full-width with-hint\" *ngIf=\"OrganizationOptions?.length > 0\">\n <mat-icon class=\"org-icon\" matPrefix>corporate_fare</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'organization'\" placeholder=\"Organization\"\n (selectionChange)=\"OrganizationChanged($event)\" [disabled]=\"Loading || HostingDetails?.Loading\" required>\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\"> 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\" 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()\"> 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\">\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 <!-- </div> -->\n\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!DevOpsSourceControlFormGroup.valid || !DevOpsSourceControlFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Source Control\n </button>\n \n </mat-card-actions>\n </mat-card>\n</form>",
4676
4841
  styles: [".form-card,.sc-card{width:100%}"]
4677
4842
  },] }
4678
4843
  ];
4679
4844
  DevopsSourceControlFormComponent.ctorParameters = () => [
4680
- { type: FormBuilder },
4681
4845
  { type: ApplicationsFlowService },
4682
- { type: EaCService }
4846
+ { type: EaCService },
4847
+ { type: FormBuilder }
4683
4848
  ];
4684
4849
  DevopsSourceControlFormComponent.propDecorators = {
4685
- BranchesInput: [{ type: ViewChild, args: ['branches',] }],
4686
4850
  EditingSourceControlLookup: [{ type: Input, args: ['editing-source-control-lookup',] }],
4687
- Environment: [{ type: Input, args: ['environment',] }]
4851
+ Environment: [{ type: Input, args: ['environment',] }],
4852
+ BranchesInput: [{ type: ViewChild, args: ['branches',] }]
4688
4853
  };
4689
4854
 
4690
4855
  class SourceControlDialogComponent {
@@ -4698,7 +4863,7 @@ class SourceControlDialogComponent {
4698
4863
  SourceControlDialogComponent.decorators = [
4699
4864
  { type: Component, args: [{
4700
4865
  selector: 'lcu-source-control-dialog',
4701
- template: "\n<div fxLayoutAlign=\"center center\">\n<lcu-devops-source-control-form\n [environment]=\"data.environment\"\n [editing-source-control-lookup]=\"data.scLookup\">\n</lcu-devops-source-control-form>\n</div>",
4866
+ template: "\n<div fxLayoutAlign=\"center center\">\n <lcu-devops-source-control-form\n [environment]=\"data.environment\"\n [editing-source-control-lookup]=\"data.scLookup\">\n </lcu-devops-source-control-form>\n</div>",
4702
4867
  styles: [""]
4703
4868
  },] }
4704
4869
  ];
@@ -4718,7 +4883,7 @@ class BuildPipelineDialogComponent {
4718
4883
  BuildPipelineDialogComponent.decorators = [
4719
4884
  { type: Component, args: [{
4720
4885
  selector: 'lcu-build-pipeline-dialog',
4721
- template: "<lcu-build-pipeline-form\n[devops-action-lookup]=\"data.devopsActionLookup\"\n[environment]=\"data.environment\"\n>\n\n</lcu-build-pipeline-form>\n",
4886
+ template: "<lcu-build-pipeline-form \n [build-pipeline]=\"data.buildPipeline\" \n [devops-action-lookup]=\"data.devopsActionLookup\"\n [environment]=\"data.environment\" \n [environment-lookup]=\"data.environmentLookup\">\n\n</lcu-build-pipeline-form>",
4722
4887
  styles: [""]
4723
4888
  },] }
4724
4889
  ];