@lowcodeunit/applications-flow-common 1.33.101-lets-get-social-ish → 1.33.105-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 (39) hide show
  1. package/bundles/lowcodeunit-applications-flow-common.umd.js +361 -137
  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/applications-flow.module.js +8 -4
  6. package/esm2015/lib/controls/build-pipeline-form/build-pipeline-form.component.js +106 -29
  7. package/esm2015/lib/controls/devops-source-control-form/devops-source-control-form.component.js +27 -31
  8. package/esm2015/lib/controls/edit-application-form/edit-application-form.component.js +60 -0
  9. package/esm2015/lib/controls/processor-details-form/processor-details-form.component.js +89 -46
  10. package/esm2015/lib/controls/security-toggle/security-toggle.component.js +14 -24
  11. package/esm2015/lib/controls/source-control-form/source-control-form.component.js +8 -6
  12. package/esm2015/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.js +2 -2
  13. package/esm2015/lib/dialogs/source-control-dialog/source-control-dialog.component.js +2 -2
  14. package/esm2015/lib/elements/slotted-card/slotted-card.component.js +6 -6
  15. package/esm2015/lowcodeunit-applications-flow-common.js +2 -1
  16. package/fesm2015/lowcodeunit-applications-flow-common.js +303 -138
  17. package/fesm2015/lowcodeunit-applications-flow-common.js.map +1 -1
  18. package/lib/applications-flow.module.d.ts.map +1 -1
  19. package/lib/controls/build-pipeline-form/build-pipeline-form.component.d.ts +12 -2
  20. package/lib/controls/build-pipeline-form/build-pipeline-form.component.d.ts.map +1 -1
  21. package/lib/controls/devops-source-control-form/devops-source-control-form.component.d.ts +9 -9
  22. package/lib/controls/devops-source-control-form/devops-source-control-form.component.d.ts.map +1 -1
  23. package/lib/controls/edit-application-form/edit-application-form.component.d.ts +17 -0
  24. package/lib/controls/edit-application-form/edit-application-form.component.d.ts.map +1 -0
  25. package/lib/controls/processor-details-form/processor-details-form.component.d.ts +23 -8
  26. package/lib/controls/processor-details-form/processor-details-form.component.d.ts.map +1 -1
  27. package/lib/controls/security-toggle/security-toggle.component.d.ts +3 -1
  28. package/lib/controls/security-toggle/security-toggle.component.d.ts.map +1 -1
  29. package/lib/controls/source-control-form/source-control-form.component.d.ts +4 -5
  30. package/lib/controls/source-control-form/source-control-form.component.d.ts.map +1 -1
  31. package/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.d.ts +1 -0
  32. package/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.d.ts.map +1 -1
  33. package/lib/dialogs/source-control-dialog/source-control-dialog.component.d.ts.map +1 -1
  34. package/lib/elements/slotted-card/slotted-card.component.d.ts +3 -3
  35. package/lib/elements/slotted-card/slotted-card.component.d.ts.map +1 -1
  36. package/lowcodeunit-applications-flow-common.d.ts +1 -0
  37. package/lowcodeunit-applications-flow-common.d.ts.map +1 -1
  38. package/lowcodeunit-applications-flow-common.metadata.json +1 -1
  39. package/package.json +1 -1
@@ -3572,18 +3572,18 @@ class SlottedCardComponent {
3572
3572
  SlottedCardComponent.decorators = [
3573
3573
  { type: Component, args: [{
3574
3574
  selector: 'lcu-slotted-card',
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 *ngIf=\"ActionPath\" class=\"slotted-card-action-btn\" [href]=\"ActionPath\">{{ ActionText }}</a>\n <a mat-button *ngIf=\"!ActionPath\" class=\"slotted-card-action-btn\" (click)=\"MainActionClickEvent()\">{{ ActionText }}</a>\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{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%}"]
3577
3577
  },] }
3578
3578
  ];
3579
3579
  SlottedCardComponent.ctorParameters = () => [];
3580
3580
  SlottedCardComponent.propDecorators = {
3581
- Title: [{ type: Input, args: ['title',] }],
3581
+ ActionText: [{ type: Input, args: ['action-text',] }],
3582
+ ActionPath: [{ type: Input, args: ['action-path',] }],
3582
3583
  Icon: [{ type: Input, args: ['icon',] }],
3583
3584
  MainSlotDescription: [{ type: Input, args: ['main-slot-description',] }],
3585
+ Title: [{ type: Input, args: ['title',] }],
3584
3586
  SecondarySlotDescription: [{ type: Input, args: ['secondary-slot-description',] }],
3585
- ActionText: [{ type: Input, args: ['action-text',] }],
3586
- ActionPath: [{ type: Input, args: ['action-path',] }],
3587
3587
  MainActionClicked: [{ type: Output, args: ['main-action-clicked',] }]
3588
3588
  };
3589
3589
 
@@ -3845,39 +3845,28 @@ CardCarouselComponent.propDecorators = {
3845
3845
  class SecurityToggleComponent {
3846
3846
  constructor(formBldr) {
3847
3847
  this.formBldr = formBldr;
3848
+ this.SaveFormEvent = new EventEmitter;
3848
3849
  }
3849
3850
  get IsPrivateFormControl() {
3850
3851
  var _a;
3851
3852
  return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isPrivate;
3852
3853
  }
3854
+ get IsTriggerSignInFormControl() {
3855
+ var _a;
3856
+ return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isTriggerSignIn;
3857
+ }
3853
3858
  ngOnInit() {
3854
3859
  this.setupSecurityFormGroup();
3855
3860
  }
3856
3861
  SecuritySubmit() {
3857
- console.log("submitting values");
3862
+ //save the security settings
3863
+ console.log("submitting security values: ", this.SecurityFormGroup.value);
3864
+ this.SaveFormEvent.emit(this.SecurityFormGroup.value);
3858
3865
  }
3859
3866
  setupSecurityFormGroup() {
3860
3867
  var _a, _b;
3861
3868
  this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
3862
- if (this.EditingApplication != null) {
3863
- // this.SecurityFormGroup = this.formBldr.group({
3864
- // name: [this.EditingApplication.Application?.Name, Validators.required],
3865
- // description: [
3866
- // this.EditingApplication.Application?.Description,
3867
- // Validators.required,
3868
- // ],
3869
- // route: [
3870
- // this.EditingApplication.LookupConfig?.PathRegex.replace('.*', '') ||
3871
- // '/',
3872
- // Validators.required,
3873
- // ],
3874
- // // priority: [
3875
- // // this.EditingApplication.Application?.Priority || 10000,
3876
- // // Validators.required,
3877
- // // ],
3878
- // procType: [this.ProcessorType, [Validators.required]],
3879
- // });
3880
- }
3869
+ this.SecurityFormGroup = this.formBldr.group({});
3881
3870
  this.setupSecurityForm();
3882
3871
  }
3883
3872
  setupSecurityForm() {
@@ -3889,7 +3878,7 @@ class SecurityToggleComponent {
3889
3878
  SecurityToggleComponent.decorators = [
3890
3879
  { type: Component, args: [{
3891
3880
  selector: 'lcu-security-toggle',
3892
- 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",
3881
+ 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",
3893
3882
  styles: ["::ng-deep .mat-tooltip{color:#000!important}"]
3894
3883
  },] }
3895
3884
  ];
@@ -3897,14 +3886,20 @@ SecurityToggleComponent.ctorParameters = () => [
3897
3886
  { type: FormBuilder }
3898
3887
  ];
3899
3888
  SecurityToggleComponent.propDecorators = {
3900
- EditingApplication: [{ type: Input, args: ['editing-application',] }]
3889
+ EditingApplication: [{ type: Input, args: ['editing-application',] }],
3890
+ SaveFormEvent: [{ type: Output, args: ['save-form-event',] }]
3901
3891
  };
3902
3892
 
3903
3893
  class ProcessorDetailsFormComponent {
3904
- constructor(formBldr) {
3894
+ constructor(formBldr, eacSvc) {
3905
3895
  this.formBldr = formBldr;
3906
- // this.EditingApplicationLookup = null;
3896
+ this.eacSvc = eacSvc;
3907
3897
  this.redirectTooltip = '';
3898
+ this.SaveFormEvent = new EventEmitter;
3899
+ }
3900
+ get APIRootFormControl() {
3901
+ var _a;
3902
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.apiRoot;
3908
3903
  }
3909
3904
  get BuildFormControl() {
3910
3905
  var _a;
@@ -3914,17 +3909,40 @@ class ProcessorDetailsFormComponent {
3914
3909
  var _a;
3915
3910
  return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientId;
3916
3911
  }
3912
+ get ClientSecretFormControl() {
3913
+ var _a;
3914
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientSecret;
3915
+ }
3917
3916
  get DefaultFileFormControl() {
3918
3917
  var _a;
3919
3918
  return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.defaultFile;
3920
3919
  }
3920
+ get DefaultSourceControl() {
3921
+ var _a, _b, _c, _d;
3922
+ return {
3923
+ Organization: (_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Organization,
3924
+ Repository: (_d = (_c = this.EditingApplication) === null || _c === void 0 ? void 0 : _c.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Repository,
3925
+ };
3926
+ }
3921
3927
  get InboundPathFormControl() {
3922
3928
  var _a;
3923
3929
  return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.inboundPath;
3924
3930
  }
3925
- get TokenLookupFormControl() {
3931
+ get MethodsFormControl() {
3926
3932
  var _a;
3927
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.tokenLookup;
3933
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.methods;
3934
+ }
3935
+ get PackageFormControl() {
3936
+ var _a;
3937
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.package;
3938
+ }
3939
+ get PermanentFormControl() {
3940
+ var _a;
3941
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.permanent;
3942
+ }
3943
+ get PreserveMethodFormControl() {
3944
+ var _a;
3945
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.preserveMethod;
3928
3946
  }
3929
3947
  get RedirectFormControl() {
3930
3948
  var _a;
@@ -3942,16 +3960,28 @@ class ProcessorDetailsFormComponent {
3942
3960
  var _a;
3943
3961
  return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.spaRoot;
3944
3962
  }
3945
- get PermanentFormControl() {
3963
+ get TokenLookupFormControl() {
3946
3964
  var _a;
3947
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.permanent;
3965
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.tokenLookup;
3948
3966
  }
3949
- get PreserveMethodFormControl() {
3967
+ get VersionFormControl() {
3950
3968
  var _a;
3951
- return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.preserveMethod;
3969
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.version;
3970
+ }
3971
+ get ZipFileFormControl() {
3972
+ var _a;
3973
+ return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.zipFile;
3952
3974
  }
3953
3975
  ngOnInit() {
3954
- this.setupProcessorDetailsForm();
3976
+ if (!this.EditingApplication) {
3977
+ this.CreateNewApplication();
3978
+ }
3979
+ else {
3980
+ this.setupProcessorDetailsForm();
3981
+ }
3982
+ }
3983
+ CreateNewApplication() {
3984
+ this.SetEditingApplication(Guid.CreateRaw());
3955
3985
  }
3956
3986
  DetermineTooltipText() {
3957
3987
  let permanentValue = this.PermanentFormControl.value;
@@ -3969,7 +3999,13 @@ class ProcessorDetailsFormComponent {
3969
3999
  this.redirectTooltip = '308 – Permanent and Preserve';
3970
4000
  }
3971
4001
  }
4002
+ SetEditingApplication(appLookup) {
4003
+ this.EditingApplicationLookup = appLookup;
4004
+ this.setupProcessorDetailsForm();
4005
+ }
3972
4006
  SubmitProcessorDetails() {
4007
+ console.log("submitting proc details: ", this.ProcessorDetailsFormGroup.value);
4008
+ this.SaveFormEvent.emit(this.ProcessorDetailsFormGroup.value);
3973
4009
  }
3974
4010
  ProcessorTypeChanged(event) {
3975
4011
  this.ProcessorType = event.value;
@@ -4035,26 +4071,15 @@ class ProcessorDetailsFormComponent {
4035
4071
  }
4036
4072
  }
4037
4073
  setupProcessorDetailsForm() {
4038
- var _a, _b, _c, _d, _e;
4074
+ var _a, _b;
4039
4075
  this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
4076
+ console.log("EDITING APP = ", this.EditingApplication);
4040
4077
  if (this.EditingApplication != null) {
4041
4078
  this.ProcessorDetailsFormGroup = this.formBldr.group({
4042
- name: [(_c = this.EditingApplication.Application) === null || _c === void 0 ? void 0 : _c.Name, Validators.required],
4043
- description: [
4044
- (_d = this.EditingApplication.Application) === null || _d === void 0 ? void 0 : _d.Description,
4045
- Validators.required,
4046
- ],
4047
- route: [
4048
- ((_e = this.EditingApplication.LookupConfig) === null || _e === void 0 ? void 0 : _e.PathRegex.replace('.*', '')) ||
4049
- '/',
4050
- Validators.required,
4051
- ],
4052
- // priority: [
4053
- // this.EditingApplication.Application?.Priority || 10000,
4054
- // Validators.required,
4055
- // ],
4056
- procType: [this.ProcessorType, [Validators.required]],
4079
+ procType: [this.ProcessorType, [Validators.required]]
4057
4080
  });
4081
+ this.setupDfsForm();
4082
+ this.setupLcuTypeSubForm();
4058
4083
  }
4059
4084
  }
4060
4085
  setupLCUGitHubForm() {
@@ -4065,22 +4090,22 @@ class ProcessorDetailsFormComponent {
4065
4090
  var _a;
4066
4091
  this.ProcessorDetailsFormGroup.addControl('applicationId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ApplicationID) || '', [Validators.required]));
4067
4092
  }
4068
- setupLCUNPMForm() {
4069
- // this.ApplicationFormGroup.addControl(
4070
- // 'package',
4071
- // this.formBldr.control(
4072
- // this.EditingApplication.LowCodeUnit?.Package || '',
4073
- // [Validators.required]
4074
- // )
4075
- // );
4076
- // this.ApplicationFormGroup.addControl(
4077
- // 'version',
4078
- // this.formBldr.control(
4079
- // this.EditingApplication.LowCodeUnit?.Version || '',
4080
- // [Validators.required]
4081
- // )
4082
- // );
4083
- }
4093
+ // protected setupLCUNPMForm(): void {
4094
+ // this.ApplicationFormGroup.addControl(
4095
+ // 'package',
4096
+ // this.formBldr.control(
4097
+ // this.EditingApplication.LowCodeUnit?.Package || '',
4098
+ // [Validators.required]
4099
+ // )
4100
+ // );
4101
+ // this.ApplicationFormGroup.addControl(
4102
+ // 'version',
4103
+ // this.formBldr.control(
4104
+ // this.EditingApplication.LowCodeUnit?.Version || '',
4105
+ // [Validators.required]
4106
+ // )
4107
+ // );
4108
+ // }
4084
4109
  setupLCUSPAForm() {
4085
4110
  var _a;
4086
4111
  this.ProcessorDetailsFormGroup.addControl('spaRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SPARoot) || '', [Validators.required]));
@@ -4152,20 +4177,26 @@ class ProcessorDetailsFormComponent {
4152
4177
  ProcessorDetailsFormComponent.decorators = [
4153
4178
  { type: Component, args: [{
4154
4179
  selector: 'lcu-processor-details-form',
4155
- 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",
4180
+ 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",
4156
4181
  styles: [""]
4157
4182
  },] }
4158
4183
  ];
4159
4184
  ProcessorDetailsFormComponent.ctorParameters = () => [
4160
- { type: FormBuilder }
4185
+ { type: FormBuilder },
4186
+ { type: EaCService }
4161
4187
  ];
4162
4188
  ProcessorDetailsFormComponent.propDecorators = {
4163
- EditingApplication: [{ type: Input, args: ['editing-application',] }]
4189
+ EditingApplication: [{ type: Input, args: ['editing-application',] }],
4190
+ EditingApplicationLookup: [{ type: Input, args: ['editing-application-lookup',] }],
4191
+ ProjectLookup: [{ type: Input, args: ['project-lookup',] }],
4192
+ SaveFormEvent: [{ type: Output, args: ['save-form-event',] }],
4193
+ SourceControlFormControls: [{ type: ViewChild, args: [SourceControlFormControlsComponent,] }]
4164
4194
  };
4165
4195
 
4166
4196
  class SourceControlFormComponent {
4167
4197
  constructor(formBldr) {
4168
4198
  this.formBldr = formBldr;
4199
+ this.SaveFormEvent = new EventEmitter;
4169
4200
  }
4170
4201
  get HasBuildFormControl() {
4171
4202
  var _a;
@@ -4179,7 +4210,6 @@ class SourceControlFormComponent {
4179
4210
  return Object.keys(this.SourceControls || {});
4180
4211
  }
4181
4212
  get SourceControls() {
4182
- console.log("Environment: ", this.Environment);
4183
4213
  return this.Environment.Sources || {};
4184
4214
  }
4185
4215
  ngOnInit() {
@@ -4190,11 +4220,14 @@ class SourceControlFormComponent {
4190
4220
  console.log("sourceControlLookupChanged: ", event);
4191
4221
  }
4192
4222
  SubmitSourceControl() {
4223
+ console.log("submitting source control: ", this.SourceControlFormGroup.value);
4224
+ this.SaveFormEvent.emit(this.SourceControlFormGroup.value);
4193
4225
  }
4194
4226
  //HELPER
4195
4227
  setupSourceControlForm() {
4196
4228
  var _a, _b;
4197
4229
  this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
4230
+ this.SourceControlFormGroup = this.formBldr.group({});
4198
4231
  this.setupBuildForm();
4199
4232
  }
4200
4233
  setupBuildForm() {
@@ -4206,7 +4239,7 @@ class SourceControlFormComponent {
4206
4239
  SourceControlFormComponent.decorators = [
4207
4240
  { type: Component, args: [{
4208
4241
  selector: 'lcu-source-control-form',
4209
- 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",
4242
+ 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",
4210
4243
  styles: [""]
4211
4244
  },] }
4212
4245
  ];
@@ -4216,11 +4249,12 @@ SourceControlFormComponent.ctorParameters = () => [
4216
4249
  SourceControlFormComponent.propDecorators = {
4217
4250
  EditingApplication: [{ type: Input, args: ['editing-application',] }],
4218
4251
  Environment: [{ type: Input, args: ['environment',] }],
4219
- SourceControlFormControls: [{ type: ViewChild, args: [SourceControlFormControlsComponent,] }]
4252
+ SaveFormEvent: [{ type: Output, args: ['save-form-event',] }]
4220
4253
  };
4221
4254
 
4222
4255
  class BuildPipelineFormComponent {
4223
- constructor(formBuilder, appsFlowSvc) {
4256
+ constructor(eacSvc, formBuilder, appsFlowSvc) {
4257
+ this.eacSvc = eacSvc;
4224
4258
  this.formBuilder = formBuilder;
4225
4259
  this.appsFlowSvc = appsFlowSvc;
4226
4260
  this.HostingDetails = new ProjectHostingDetails();
@@ -4255,6 +4289,9 @@ class BuildPipelineFormComponent {
4255
4289
  get DevOpsActions() {
4256
4290
  return this.Environment.DevOpsActions || {};
4257
4291
  }
4292
+ get DevOpsActionNameFormControl() {
4293
+ return this.BuildPipelineFormGroup.get('devOpsActionName');
4294
+ }
4258
4295
  get EditingSourceControl() {
4259
4296
  var _a, _b;
4260
4297
  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;
@@ -4263,11 +4300,22 @@ class BuildPipelineFormComponent {
4263
4300
  }
4264
4301
  return sc;
4265
4302
  }
4303
+ get NPMTokenFormControl() {
4304
+ return this.BuildPipelineFormGroup.get('npmToken');
4305
+ }
4266
4306
  // (ho) => ho.Lookup === this.BuildPipeline
4267
4307
  get SelectedHostingOption() {
4268
4308
  var _a, _b;
4269
4309
  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);
4270
4310
  }
4311
+ get SelectedHostingOptionInputControlValues() {
4312
+ var _a, _b;
4313
+ return (_b = (_a = this.SelectedHostingOption) === null || _a === void 0 ? void 0 : _a.Inputs) === null || _b === void 0 ? void 0 : _b.reduce((prev, cur) => {
4314
+ const res = Object.assign({}, prev);
4315
+ res[cur.Lookup] = this.BuildPipelineFormGroup.controls[cur.Lookup].value;
4316
+ return res;
4317
+ }, {});
4318
+ }
4271
4319
  get SourceControlLookups() {
4272
4320
  return Object.keys(this.SourceControls || {});
4273
4321
  }
@@ -4275,22 +4323,14 @@ class BuildPipelineFormComponent {
4275
4323
  return this.Environment.Sources || {};
4276
4324
  }
4277
4325
  ngOnInit() {
4278
- var _a, _b, _c;
4279
4326
  this.BuildPipelineFormGroup = this.formBuilder.group({});
4280
- this.loadProjectHostingDetails();
4281
- console.log("ARTIFACT: ", this.Artifact);
4282
- // this.BuildPipeline ||
4283
- // github-artifacts-release is this.HostingDetails?.HostingOptions[0]?.Lookup
4284
- this.BuildPipeline =
4285
- ((_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 : '';
4286
- console.log("Build Pipeline HERE= ", this.BuildPipeline);
4287
4327
  if (this.BuildPipelineFormGroup != null) {
4288
4328
  this.BuildPipelineFormGroup.removeControl('hostingDetails');
4289
4329
  }
4290
4330
  this.BuildPipelineFormGroup.addControl('hostingDetails', this.formBuilder.group({
4291
4331
  buildPipeline: [this.BuildPipeline, [Validators.required]],
4292
4332
  }));
4293
- this.setupControlsForForm();
4333
+ this.loadProjectHostingDetails();
4294
4334
  }
4295
4335
  //API METHODS
4296
4336
  BuildPipelineChanged() {
@@ -4299,17 +4339,81 @@ class BuildPipelineFormComponent {
4299
4339
  this.BuildPipeline = (_b = this.BuildPipelineFormControl) === null || _b === void 0 ? void 0 : _b.value;
4300
4340
  this.setupControlsForForm();
4301
4341
  }
4342
+ SubmitBuildPipeline() {
4343
+ console.log("submitting build pipeline: ", this.BuildPipelineFormGroup.value);
4344
+ }
4345
+ SaveEnvironment() {
4346
+ var _a;
4347
+ const saveEnvReq = {
4348
+ Environment: Object.assign(Object.assign({}, this.Environment), { Artifacts: this.Environment.Artifacts || {}, DevOpsActions: this.Environment.DevOpsActions || {}, Secrets: this.Environment.Secrets || {}, Sources: this.Environment.Sources || {} }),
4349
+ EnvironmentLookup: this.EnvironmentLookup,
4350
+ EnterpriseDataTokens: {},
4351
+ };
4352
+ let artifactLookup;
4353
+ let artifact = Object.assign(Object.assign({}, this.Artifact), this.SelectedHostingOptionInputControlValues);
4354
+ if (!this.ArtifactLookup) {
4355
+ artifactLookup = Guid.CreateRaw();
4356
+ artifact = Object.assign(Object.assign({}, artifact), { Type: this.SelectedHostingOption
4357
+ .ArtifactType, Name: this.SelectedHostingOption.Name, NPMRegistry: 'https://registry.npmjs.org/' });
4358
+ }
4359
+ else {
4360
+ artifactLookup = this.ArtifactLookup;
4361
+ }
4362
+ saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
4363
+ let devOpsActionLookup;
4364
+ if (!this.DevOpsActionLookup) {
4365
+ devOpsActionLookup = Guid.CreateRaw();
4366
+ const doa = Object.assign(Object.assign({}, this.DevOpsAction), { ArtifactLookups: [artifactLookup], Name: this.DevOpsActionNameFormControl.value, Path: this.SelectedHostingOption.Path, Templates: this.SelectedHostingOption.Templates });
4367
+ if ((_a = this.NPMTokenFormControl) === null || _a === void 0 ? void 0 : _a.value) {
4368
+ const secretLookup = 'npm-access-token';
4369
+ doa.SecretLookups = [secretLookup];
4370
+ saveEnvReq.Environment.Secrets[secretLookup] = {
4371
+ Name: 'NPM Access Token',
4372
+ DataTokenLookup: secretLookup,
4373
+ KnownAs: 'NPM_TOKEN',
4374
+ };
4375
+ saveEnvReq.EnterpriseDataTokens[secretLookup] = {
4376
+ Name: saveEnvReq.Environment.Secrets[secretLookup].Name,
4377
+ Description: saveEnvReq.Environment.Secrets[secretLookup].Name,
4378
+ Value: this.NPMTokenFormControl.value,
4379
+ };
4380
+ }
4381
+ saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
4382
+ }
4383
+ else {
4384
+ devOpsActionLookup = this.DevOpsActionLookup;
4385
+ const doa = Object.assign(Object.assign({}, this.DevOpsAction), { Name: this.DevOpsActionNameFormControl.value });
4386
+ saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
4387
+ }
4388
+ // let source: EaCSourceControl = {
4389
+ // ...this.EditingSourceControl,
4390
+ // Branches: this.SourceControlFormControls.SelectedBranches,
4391
+ // MainBranch: this.SourceControlFormControls.MainBranchFormControl.value,
4392
+ // };
4393
+ // source = {
4394
+ // ...source,
4395
+ // Type: 'GitHub',
4396
+ // Name: this.EditingSourceControlLookup,
4397
+ // DevOpsActionTriggerLookups: [devOpsActionLookup],
4398
+ // Organization:
4399
+ // this.SourceControlFormControls.OrganizationFormControl.value,
4400
+ // Repository: this.SourceControlFormControls.RepositoryFormControl.value,
4401
+ // };
4402
+ // const scLookup = `github://${source.Organization}/${source.Repository}`;
4403
+ // saveEnvReq.Environment.Sources[scLookup] = source;
4404
+ this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
4405
+ }
4302
4406
  // Helpers
4303
4407
  setupControlsForForm() {
4304
- //for (const ctrlName in this.BuildPipelineFormGroup.controls) {
4305
- //devOpsAction doesn't exist
4306
- //removes hosting details
4307
- // if (ctrlName !== 'buildPipeline' && ctrlName !== 'devOpsAction') {
4308
- // console.log("removing control: ", ctrlName)
4309
- // this.BuildPipelineFormGroup.removeControl(ctrlName);
4310
- // }
4311
- //}
4312
4408
  var _a, _b, _c, _d, _e, _f;
4409
+ for (const ctrlName in this.BuildPipelineFormGroup.controls) {
4410
+ //devOpsAction doesn't exist
4411
+ //removes hosting details
4412
+ if (ctrlName !== 'buildPipeline' && ctrlName !== 'devOpsAction') {
4413
+ console.log("removing control: ", ctrlName);
4414
+ this.BuildPipelineFormGroup.removeControl(ctrlName);
4415
+ }
4416
+ }
4313
4417
  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]));
4314
4418
  (_d = (_c = this.SelectedHostingOption) === null || _c === void 0 ? void 0 : _c.Inputs) === null || _d === void 0 ? void 0 : _d.forEach((input) => {
4315
4419
  const validators = input.Required ? [Validators.required] : [];
@@ -4318,9 +4422,7 @@ class BuildPipelineFormComponent {
4318
4422
  // this.FormGroup.controls[input.Lookup].disable();
4319
4423
  // }
4320
4424
  });
4321
- debugger;
4322
4425
  if (((_e = this.BuildPipelineFormControl) === null || _e === void 0 ? void 0 : _e.value) === 'npm-release') {
4323
- debugger;
4324
4426
  if (!this.BuildPipelineFormGroup.controls.npmToken) {
4325
4427
  this.BuildPipelineFormGroup.addControl('npmToken', this.formBuilder.control('', this.Disabled ? [] : [Validators.required]));
4326
4428
  if (this.Disabled) {
@@ -4335,23 +4437,27 @@ class BuildPipelineFormComponent {
4335
4437
  }
4336
4438
  }
4337
4439
  loadProjectHostingDetails() {
4338
- // this.HostingDetails.Loading = true;
4440
+ this.HostingDetails.Loading = true;
4339
4441
  // this.Organization,
4340
4442
  // this.Repository,
4341
4443
  // this.MainBranch
4342
- // "powhound4",
4343
- // "RedwoodCrystals",
4344
- // "master"
4444
+ // "powhound4",
4445
+ // "RedwoodCrystals",
4446
+ // "master"
4345
4447
  this.appsFlowSvc
4346
4448
  .NewLoadProjectHostingDetails()
4347
4449
  .subscribe((response) => {
4450
+ var _a, _b, _c;
4348
4451
  this.HostingDetails = response.Model;
4349
4452
  console.log("response: ", response);
4350
4453
  this.HostingDetails.Loading = false;
4454
+ this.BuildPipeline =
4455
+ ((_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 : '';
4456
+ console.log("Build Pipeline HERE= ", this.BuildPipeline);
4457
+ this.setupControlsForForm();
4351
4458
  }, (err) => {
4352
- this.HostingDetails.Loading = false;
4353
- console.log("hosting details LOADING EERR: ", this.HostingDetails);
4354
4459
  console.log("ERR: ", err);
4460
+ this.HostingDetails.Loading = false;
4355
4461
  });
4356
4462
  console.log("HOSTING DETAILS: ", this.HostingDetails);
4357
4463
  }
@@ -4359,11 +4465,12 @@ class BuildPipelineFormComponent {
4359
4465
  BuildPipelineFormComponent.decorators = [
4360
4466
  { type: Component, args: [{
4361
4467
  selector: 'lcu-build-pipeline-form',
4362
- template: "<form class=\"form-card\" [formGroup]=\"BuildPipelineFormGroup\">\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>\n</form>\n",
4468
+ 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",
4363
4469
  styles: [""]
4364
4470
  },] }
4365
4471
  ];
4366
4472
  BuildPipelineFormComponent.ctorParameters = () => [
4473
+ { type: EaCService },
4367
4474
  { type: FormBuilder },
4368
4475
  { type: ApplicationsFlowService }
4369
4476
  ];
@@ -4371,25 +4478,24 @@ BuildPipelineFormComponent.propDecorators = {
4371
4478
  BuildPipeline: [{ type: Input, args: ['build-pipeline',] }],
4372
4479
  DevOpsActionLookup: [{ type: Input, args: ['devops-action-lookup',] }],
4373
4480
  Disabled: [{ type: Input, args: ['disabled',] }],
4374
- Environment: [{ type: Input, args: ['environment',] }]
4481
+ Environment: [{ type: Input, args: ['environment',] }],
4482
+ EnvironmentLookup: [{ type: Input, args: ['environment-lookup',] }]
4375
4483
  };
4376
4484
 
4377
4485
  class DevopsSourceControlFormComponent {
4378
4486
  // Constructors
4379
- constructor(formBuilder, appsFlowSvc, eacSvc) {
4380
- this.formBuilder = formBuilder;
4487
+ constructor(appsFlowSvc, eacSvc, formBuilder) {
4381
4488
  this.appsFlowSvc = appsFlowSvc;
4382
4489
  this.eacSvc = eacSvc;
4490
+ this.formBuilder = formBuilder;
4383
4491
  this.SeparatorKeysCodes = [ENTER, COMMA];
4384
4492
  this.BuildPath = null;
4385
- // this.EditingSourceControlLookup = null;
4386
4493
  this.HostingDetails = new ProjectHostingDetails();
4387
4494
  this.SelectedBranches = [];
4388
4495
  this.SourceControlRoot = '';
4389
4496
  this.UseBranches = true;
4390
4497
  this.UseBuildPath = false;
4391
4498
  }
4392
- // Fields
4393
4499
  // Properties
4394
4500
  get BranchesFormControl() {
4395
4501
  return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
@@ -4441,12 +4547,9 @@ class DevopsSourceControlFormComponent {
4441
4547
  this.destroyFormControls();
4442
4548
  }
4443
4549
  ngOnInit() {
4444
- console.log("org: ", this.EditingSourceControl);
4445
- console.log("lookup: ", this.EditingSourceControlLookup);
4446
4550
  if (this.EditingSourceControlLookup === null) {
4447
4551
  this.CreateNewSourceControl();
4448
4552
  }
4449
- console.log("org: ", this.EditingSourceControl);
4450
4553
  if (this.EditingSourceControl != null) {
4451
4554
  this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
4452
4555
  this.setupFormControls();
@@ -4465,6 +4568,7 @@ class DevopsSourceControlFormComponent {
4465
4568
  this.loadProjectHostingDetails();
4466
4569
  }
4467
4570
  BuildPathChanged(event) {
4571
+ //do something??
4468
4572
  }
4469
4573
  CreateNewSourceControl() {
4470
4574
  this.SetEditingSourceControl(Guid.CreateRaw());
@@ -4540,7 +4644,7 @@ class DevopsSourceControlFormComponent {
4540
4644
  this.EditingSourceControlLookup = scLookup;
4541
4645
  }
4542
4646
  SubmitSourceControl() {
4543
- console.log("source control submitted");
4647
+ console.log("source control submitted: ", this.DevOpsSourceControlFormGroup.value);
4544
4648
  }
4545
4649
  // public SaveSourceControl(): void {
4546
4650
  // const saveEnvReq: SaveEnvironmentAsCodeEventRequest = {
@@ -4555,23 +4659,23 @@ class DevopsSourceControlFormComponent {
4555
4659
  // EnterpriseDataTokens: {},
4556
4660
  // };
4557
4661
  // let artifactLookup: string;
4558
- // // let artifact: EaCArtifact = {
4559
- // // ...this.Artifact,
4560
- // // ...this.HostingDetailsFormControls
4561
- // // .SelectedHostingOptionInputControlValues,
4562
- // // };
4563
- // if (!this.ArtifactLookup) {
4564
- // artifactLookup = Guid.CreateRaw();
4565
- // artifact = {
4566
- // ...artifact,
4567
- // Type: this.HostingDetailsFormControls.SelectedHostingOption
4568
- // .ArtifactType,
4569
- // Name: this.HostingDetailsFormControls.SelectedHostingOption.Name,
4570
- // NPMRegistry: 'https://registry.npmjs.org/',
4571
- // };
4572
- // } else {
4573
- // artifactLookup = this.ArtifactLookup;
4574
- // }
4662
+ // let artifact: EaCArtifact = {
4663
+ // ...this.Artifact,
4664
+ // ...this.HostingDetailsFormControls
4665
+ // .SelectedHostingOptionInputControlValues,
4666
+ // };
4667
+ // // if (!this.ArtifactLookup) {
4668
+ // // artifactLookup = Guid.CreateRaw();
4669
+ // // artifact = {
4670
+ // // ...artifact,
4671
+ // // Type: this.HostingDetailsFormControls.SelectedHostingOption
4672
+ // // .ArtifactType,
4673
+ // // Name: this.HostingDetailsFormControls.SelectedHostingOption.Name,
4674
+ // // NPMRegistry: 'https://registry.npmjs.org/',
4675
+ // // };
4676
+ // // } else {
4677
+ // // artifactLookup = this.ArtifactLookup;
4678
+ // // }
4575
4679
  // saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
4576
4680
  // let devOpsActionLookup: string;
4577
4681
  // if (!this.DevOpsActionLookup) {
@@ -4770,19 +4874,19 @@ class DevopsSourceControlFormComponent {
4770
4874
  DevopsSourceControlFormComponent.decorators = [
4771
4875
  { type: Component, args: [{
4772
4876
  selector: 'lcu-devops-source-control-form',
4773
- 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>",
4877
+ 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>",
4774
4878
  styles: [".form-card,.sc-card{width:100%}"]
4775
4879
  },] }
4776
4880
  ];
4777
4881
  DevopsSourceControlFormComponent.ctorParameters = () => [
4778
- { type: FormBuilder },
4779
4882
  { type: ApplicationsFlowService },
4780
- { type: EaCService }
4883
+ { type: EaCService },
4884
+ { type: FormBuilder }
4781
4885
  ];
4782
4886
  DevopsSourceControlFormComponent.propDecorators = {
4783
- BranchesInput: [{ type: ViewChild, args: ['branches',] }],
4784
4887
  EditingSourceControlLookup: [{ type: Input, args: ['editing-source-control-lookup',] }],
4785
- Environment: [{ type: Input, args: ['environment',] }]
4888
+ Environment: [{ type: Input, args: ['environment',] }],
4889
+ BranchesInput: [{ type: ViewChild, args: ['branches',] }]
4786
4890
  };
4787
4891
 
4788
4892
  class SourceControlDialogComponent {
@@ -4796,7 +4900,7 @@ class SourceControlDialogComponent {
4796
4900
  SourceControlDialogComponent.decorators = [
4797
4901
  { type: Component, args: [{
4798
4902
  selector: 'lcu-source-control-dialog',
4799
- 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>",
4903
+ 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>",
4800
4904
  styles: [""]
4801
4905
  },] }
4802
4906
  ];
@@ -4816,7 +4920,7 @@ class BuildPipelineDialogComponent {
4816
4920
  BuildPipelineDialogComponent.decorators = [
4817
4921
  { type: Component, args: [{
4818
4922
  selector: 'lcu-build-pipeline-dialog',
4819
- template: "<lcu-build-pipeline-form\n[build-pipeline]=\"data.buildPipeline\"\n[devops-action-lookup]=\"data.devopsActionLookup\"\n[environment]=\"data.environment\"\n>\n\n</lcu-build-pipeline-form>\n",
4923
+ 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>",
4820
4924
  styles: [""]
4821
4925
  },] }
4822
4926
  ];
@@ -4825,6 +4929,64 @@ BuildPipelineDialogComponent.ctorParameters = () => [
4825
4929
  { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
4826
4930
  ];
4827
4931
 
4932
+ class EditApplicationFormComponent {
4933
+ constructor(formBldr) {
4934
+ this.formBldr = formBldr;
4935
+ this.SaveFormEvent = new EventEmitter;
4936
+ }
4937
+ get DescriptionFormControl() {
4938
+ var _a;
4939
+ return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.description;
4940
+ }
4941
+ get NameFormControl() {
4942
+ var _a;
4943
+ return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.name;
4944
+ }
4945
+ get RouteFormControl() {
4946
+ var _a;
4947
+ return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.route;
4948
+ }
4949
+ ngOnInit() {
4950
+ this.setupApplicationForm();
4951
+ }
4952
+ SubmitApplicationControl() {
4953
+ console.log("application form: ", this.ApplicationFormGroup.value);
4954
+ this.SaveFormEvent.emit(this.ApplicationFormGroup.value);
4955
+ }
4956
+ //HELPERS
4957
+ setupApplicationForm() {
4958
+ var _a, _b, _c;
4959
+ if (this.EditingApplication != null) {
4960
+ this.ApplicationFormGroup = this.formBldr.group({
4961
+ name: [(_a = this.EditingApplication.Application) === null || _a === void 0 ? void 0 : _a.Name, Validators.required],
4962
+ description: [
4963
+ (_b = this.EditingApplication.Application) === null || _b === void 0 ? void 0 : _b.Description,
4964
+ Validators.required,
4965
+ ],
4966
+ route: [
4967
+ ((_c = this.EditingApplication.LookupConfig) === null || _c === void 0 ? void 0 : _c.PathRegex.replace('.*', '')) ||
4968
+ '/',
4969
+ Validators.required,
4970
+ ],
4971
+ });
4972
+ }
4973
+ }
4974
+ }
4975
+ EditApplicationFormComponent.decorators = [
4976
+ { type: Component, args: [{
4977
+ selector: 'lcu-edit-application-form',
4978
+ 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 <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 </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]=\"!ApplicationFormGroup.valid || !ApplicationFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save\n </button>\n \n </mat-card-actions>\n </mat-card>\n</form>\n",
4979
+ styles: [""]
4980
+ },] }
4981
+ ];
4982
+ EditApplicationFormComponent.ctorParameters = () => [
4983
+ { type: FormBuilder }
4984
+ ];
4985
+ EditApplicationFormComponent.propDecorators = {
4986
+ EditingApplication: [{ type: Input, args: ['editing-application',] }],
4987
+ SaveFormEvent: [{ type: Output, args: ['save-form-event',] }]
4988
+ };
4989
+
4828
4990
  class ApplicationsFlowModule {
4829
4991
  static forRoot() {
4830
4992
  return {
@@ -4881,7 +5043,8 @@ ApplicationsFlowModule.decorators = [
4881
5043
  BuildPipelineFormComponent,
4882
5044
  DevopsSourceControlFormComponent,
4883
5045
  SourceControlDialogComponent,
4884
- BuildPipelineDialogComponent
5046
+ BuildPipelineDialogComponent,
5047
+ EditApplicationFormComponent
4885
5048
  ],
4886
5049
  imports: [
4887
5050
  FathymSharedModule,
@@ -4933,7 +5096,8 @@ ApplicationsFlowModule.decorators = [
4933
5096
  BuildPipelineFormComponent,
4934
5097
  DevopsSourceControlFormComponent,
4935
5098
  SourceControlDialogComponent,
4936
- BuildPipelineDialogComponent
5099
+ BuildPipelineDialogComponent,
5100
+ EditApplicationFormComponent
4937
5101
  ],
4938
5102
  entryComponents: [
4939
5103
  ApplicationsFlowProjectsElementComponent,
@@ -4972,7 +5136,8 @@ ApplicationsFlowModule.decorators = [
4972
5136
  BuildPipelineFormComponent,
4973
5137
  DevopsSourceControlFormComponent,
4974
5138
  SourceControlDialogComponent,
4975
- BuildPipelineDialogComponent
5139
+ BuildPipelineDialogComponent,
5140
+ EditApplicationFormComponent
4976
5141
  ],
4977
5142
  },] }
4978
5143
  ];
@@ -5005,5 +5170,5 @@ class FormModel {
5005
5170
  * Generated bundle index. Do not edit.
5006
5171
  */
5007
5172
 
5008
- export { ActionsModel, ApplicationsFlowModule, ApplicationsFlowProjectsContext, ApplicationsFlowProjectsElementComponent, ApplicationsFlowProjectsElementState, ApplicationsFlowService, ApplicationsFlowState, ApplicationsFlowStateContext, BaseFormConfigModel, CardFormConfigModel, CreateProjectWizardComponent, DevSettingsPresetModel, DomainModel, DynamicTabsModel, EaCService, FormActionsModel, FormModel, FormValuesModel, FormsService, GitAuthComponent, GitHubBranch, GitHubOrganization, GitHubRepository, GitHubSetupState, GitHubWorkflowRun, HostingDetailsFormGroupComponent, NPMService, ProjectActionsModel, ProjectHostingDetails, ProjectHostingOption, ProjectHostingOptionInput, ProjectNameComponent, ProjectService, RootDirectoryComponent, SELECTOR_APPLICATIONS_FLOW_PROJECTS_ELEMENT, SaveApplicationAsCodeEventRequest, SaveDFSModifierEventRequest, SaveEnvironmentAsCodeEventRequest, SaveProjectAsCodeEventRequest, SourceControlFormControlsComponent, ThreeColumnComponent, UnpackLowCodeUnitRequest, DynamicTabsComponent as ɵa, HeaderComponent as ɵb, SourceControlFormComponent as ɵba, BuildPipelineFormComponent as ɵbb, DevopsSourceControlFormComponent as ɵbc, SourceControlDialogComponent as ɵbd, BuildPipelineDialogComponent as ɵbe, ProjectTabsComponent as ɵc, GeneralComponent as ɵd, DomainsComponent as ɵe, ProjectItemsComponent as ɵf, BuildsComponent as ɵg, RecentActivitiesComponent as ɵh, FormCardComponent as ɵi, BaseFormComponent as ɵj, BaseFormTestComponent as ɵk, AppsFlowComponent as ɵl, DevOpsComponent as ɵm, DFSModifiersComponent as ɵn, NpmPackageSelectComponent as ɵo, ColumnInfoCardComponent as ɵp, SlottedCardComponent as ɵq, ProjectInfoCardComponent as ɵr, AnalyticsCardComponent as ɵs, FeedCardSmComponent as ɵt, GhControlComponent as ɵu, MainFeedCardComponent as ɵv, TwoColumnHeaderComponent as ɵw, CardCarouselComponent as ɵx, SecurityToggleComponent as ɵy, ProcessorDetailsFormComponent as ɵz };
5173
+ export { ActionsModel, ApplicationsFlowModule, ApplicationsFlowProjectsContext, ApplicationsFlowProjectsElementComponent, ApplicationsFlowProjectsElementState, ApplicationsFlowService, ApplicationsFlowState, ApplicationsFlowStateContext, BaseFormConfigModel, CardFormConfigModel, CreateProjectWizardComponent, DevSettingsPresetModel, DomainModel, DynamicTabsModel, EaCService, FormActionsModel, FormModel, FormValuesModel, FormsService, GitAuthComponent, GitHubBranch, GitHubOrganization, GitHubRepository, GitHubSetupState, GitHubWorkflowRun, HostingDetailsFormGroupComponent, NPMService, ProjectActionsModel, ProjectHostingDetails, ProjectHostingOption, ProjectHostingOptionInput, ProjectNameComponent, ProjectService, RootDirectoryComponent, SELECTOR_APPLICATIONS_FLOW_PROJECTS_ELEMENT, SaveApplicationAsCodeEventRequest, SaveDFSModifierEventRequest, SaveEnvironmentAsCodeEventRequest, SaveProjectAsCodeEventRequest, SourceControlFormControlsComponent, ThreeColumnComponent, UnpackLowCodeUnitRequest, DynamicTabsComponent as ɵa, HeaderComponent as ɵb, SourceControlFormComponent as ɵba, BuildPipelineFormComponent as ɵbb, DevopsSourceControlFormComponent as ɵbc, SourceControlDialogComponent as ɵbd, BuildPipelineDialogComponent as ɵbe, EditApplicationFormComponent as ɵbf, ProjectTabsComponent as ɵc, GeneralComponent as ɵd, DomainsComponent as ɵe, ProjectItemsComponent as ɵf, BuildsComponent as ɵg, RecentActivitiesComponent as ɵh, FormCardComponent as ɵi, BaseFormComponent as ɵj, BaseFormTestComponent as ɵk, AppsFlowComponent as ɵl, DevOpsComponent as ɵm, DFSModifiersComponent as ɵn, NpmPackageSelectComponent as ɵo, ColumnInfoCardComponent as ɵp, SlottedCardComponent as ɵq, ProjectInfoCardComponent as ɵr, AnalyticsCardComponent as ɵs, FeedCardSmComponent as ɵt, GhControlComponent as ɵu, MainFeedCardComponent as ɵv, TwoColumnHeaderComponent as ɵw, CardCarouselComponent as ɵx, SecurityToggleComponent as ɵy, ProcessorDetailsFormComponent as ɵz };
5009
5174
  //# sourceMappingURL=lowcodeunit-applications-flow-common.js.map