@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
@@ -576,6 +576,11 @@
576
576
  headers: this.loadHeaders(),
577
577
  });
578
578
  };
579
+ ApplicationsFlowService.prototype.NewLoadProjectHostingDetails = function () {
580
+ return this.http.get(this.apiRoot + "/api/lowcodeunit/manage/projects/hosting/details", {
581
+ headers: this.loadHeaders(),
582
+ });
583
+ };
579
584
  ApplicationsFlowService.prototype.SaveEnterpriseAsCode = function (eac) {
580
585
  return this.http.post(this.apiRoot + "/api/lowcodeunit/manage/eac", eac, {
581
586
  headers: this.loadHeaders(),
@@ -1775,6 +1780,7 @@
1775
1780
  HostingDetailsFormGroupComponent.prototype.ngOnChanges = function () { };
1776
1781
  HostingDetailsFormGroupComponent.prototype.ngOnInit = function () {
1777
1782
  var _a, _b, _c;
1783
+ console.log("made it to hosting details");
1778
1784
  this.BuildPipeline =
1779
1785
  this.BuildPipeline || ((_a = this.Details) === null || _a === void 0 ? void 0 : _a.HostingOptions)
1780
1786
  ? (_c = (_b = this.Details) === null || _b === void 0 ? void 0 : _b.HostingOptions[0]) === null || _c === void 0 ? void 0 : _c.Lookup : '';
@@ -4746,6 +4752,7 @@
4746
4752
 
4747
4753
  var SlottedCardComponent = /** @class */ (function () {
4748
4754
  function SlottedCardComponent() {
4755
+ this.MainActionClicked = new i0.EventEmitter;
4749
4756
  }
4750
4757
  SlottedCardComponent.prototype.ngOnInit = function () {
4751
4758
  };
@@ -4757,18 +4764,18 @@
4757
4764
  SlottedCardComponent.decorators = [
4758
4765
  { type: i0.Component, args: [{
4759
4766
  selector: 'lcu-slotted-card',
4760
- 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",
4761
- 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%}"]
4767
+ 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",
4768
+ 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%}"]
4762
4769
  },] }
4763
4770
  ];
4764
4771
  SlottedCardComponent.ctorParameters = function () { return []; };
4765
4772
  SlottedCardComponent.propDecorators = {
4766
- Title: [{ type: i0.Input, args: ['title',] }],
4773
+ ActionText: [{ type: i0.Input, args: ['action-text',] }],
4774
+ ActionPath: [{ type: i0.Input, args: ['action-path',] }],
4767
4775
  Icon: [{ type: i0.Input, args: ['icon',] }],
4768
4776
  MainSlotDescription: [{ type: i0.Input, args: ['main-slot-description',] }],
4777
+ Title: [{ type: i0.Input, args: ['title',] }],
4769
4778
  SecondarySlotDescription: [{ type: i0.Input, args: ['secondary-slot-description',] }],
4770
- ActionText: [{ type: i0.Input, args: ['action-text',] }],
4771
- ActionPath: [{ type: i0.Input, args: ['action-path',] }],
4772
4779
  MainActionClicked: [{ type: i0.Output, args: ['main-action-clicked',] }]
4773
4780
  };
4774
4781
 
@@ -5053,30 +5060,13 @@
5053
5060
  this.setupSecurityFormGroup();
5054
5061
  };
5055
5062
  SecurityToggleComponent.prototype.SecuritySubmit = function () {
5056
- console.log("submitting values");
5063
+ //save the security settings
5064
+ console.log("submitting values: ", this.SecurityFormGroup.value);
5057
5065
  };
5058
5066
  SecurityToggleComponent.prototype.setupSecurityFormGroup = function () {
5059
5067
  var _a, _b;
5060
5068
  this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
5061
- if (this.EditingApplication != null) {
5062
- // this.SecurityFormGroup = this.formBldr.group({
5063
- // name: [this.EditingApplication.Application?.Name, Validators.required],
5064
- // description: [
5065
- // this.EditingApplication.Application?.Description,
5066
- // Validators.required,
5067
- // ],
5068
- // route: [
5069
- // this.EditingApplication.LookupConfig?.PathRegex.replace('.*', '') ||
5070
- // '/',
5071
- // Validators.required,
5072
- // ],
5073
- // // priority: [
5074
- // // this.EditingApplication.Application?.Priority || 10000,
5075
- // // Validators.required,
5076
- // // ],
5077
- // procType: [this.ProcessorType, [Validators.required]],
5078
- // });
5079
- }
5069
+ this.SecurityFormGroup = this.formBldr.group({});
5080
5070
  this.setupSecurityForm();
5081
5071
  };
5082
5072
  SecurityToggleComponent.prototype.setupSecurityForm = function () {
@@ -5089,7 +5079,7 @@
5089
5079
  SecurityToggleComponent.decorators = [
5090
5080
  { type: i0.Component, args: [{
5091
5081
  selector: 'lcu-security-toggle',
5092
- 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",
5082
+ 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",
5093
5083
  styles: ["::ng-deep .mat-tooltip{color:#000!important}"]
5094
5084
  },] }
5095
5085
  ];
@@ -5101,9 +5091,9 @@
5101
5091
  };
5102
5092
 
5103
5093
  var ProcessorDetailsFormComponent = /** @class */ (function () {
5104
- function ProcessorDetailsFormComponent(formBldr) {
5094
+ function ProcessorDetailsFormComponent(formBldr, eacSvc) {
5105
5095
  this.formBldr = formBldr;
5106
- // this.EditingApplicationLookup = null;
5096
+ this.eacSvc = eacSvc;
5107
5097
  this.redirectTooltip = '';
5108
5098
  }
5109
5099
  Object.defineProperty(ProcessorDetailsFormComponent.prototype, "BuildFormControl", {
@@ -5130,6 +5120,17 @@
5130
5120
  enumerable: false,
5131
5121
  configurable: true
5132
5122
  });
5123
+ Object.defineProperty(ProcessorDetailsFormComponent.prototype, "DefaultSourceControl", {
5124
+ get: function () {
5125
+ var _a, _b, _c, _d;
5126
+ return {
5127
+ Organization: (_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Organization,
5128
+ Repository: (_d = (_c = this.EditingApplication) === null || _c === void 0 ? void 0 : _c.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Repository,
5129
+ };
5130
+ },
5131
+ enumerable: false,
5132
+ configurable: true
5133
+ });
5133
5134
  Object.defineProperty(ProcessorDetailsFormComponent.prototype, "InboundPathFormControl", {
5134
5135
  get: function () {
5135
5136
  var _a;
@@ -5195,7 +5196,15 @@
5195
5196
  configurable: true
5196
5197
  });
5197
5198
  ProcessorDetailsFormComponent.prototype.ngOnInit = function () {
5198
- this.setupProcessorDetailsForm();
5199
+ if (!this.EditingApplication) {
5200
+ this.CreateNewApplication();
5201
+ }
5202
+ else {
5203
+ this.setupProcessorDetailsForm();
5204
+ }
5205
+ };
5206
+ ProcessorDetailsFormComponent.prototype.CreateNewApplication = function () {
5207
+ this.SetEditingApplication(i2.Guid.CreateRaw());
5199
5208
  };
5200
5209
  ProcessorDetailsFormComponent.prototype.DetermineTooltipText = function () {
5201
5210
  var permanentValue = this.PermanentFormControl.value;
@@ -5213,7 +5222,12 @@
5213
5222
  this.redirectTooltip = '308 – Permanent and Preserve';
5214
5223
  }
5215
5224
  };
5225
+ ProcessorDetailsFormComponent.prototype.SetEditingApplication = function (appLookup) {
5226
+ this.EditingApplicationLookup = appLookup;
5227
+ this.setupProcessorDetailsForm();
5228
+ };
5216
5229
  ProcessorDetailsFormComponent.prototype.SubmitProcessorDetails = function () {
5230
+ console.log("submitting proc details: ", this.ProcessorDetailsFormGroup.value);
5217
5231
  };
5218
5232
  ProcessorDetailsFormComponent.prototype.ProcessorTypeChanged = function (event) {
5219
5233
  this.ProcessorType = event.value;
@@ -5279,26 +5293,15 @@
5279
5293
  }
5280
5294
  };
5281
5295
  ProcessorDetailsFormComponent.prototype.setupProcessorDetailsForm = function () {
5282
- var _a, _b, _c, _d, _e;
5296
+ var _a, _b;
5283
5297
  this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
5298
+ console.log("EDITING APP = ", this.EditingApplication);
5284
5299
  if (this.EditingApplication != null) {
5285
5300
  this.ProcessorDetailsFormGroup = this.formBldr.group({
5286
- name: [(_c = this.EditingApplication.Application) === null || _c === void 0 ? void 0 : _c.Name, forms.Validators.required],
5287
- description: [
5288
- (_d = this.EditingApplication.Application) === null || _d === void 0 ? void 0 : _d.Description,
5289
- forms.Validators.required,
5290
- ],
5291
- route: [
5292
- ((_e = this.EditingApplication.LookupConfig) === null || _e === void 0 ? void 0 : _e.PathRegex.replace('.*', '')) ||
5293
- '/',
5294
- forms.Validators.required,
5295
- ],
5296
- // priority: [
5297
- // this.EditingApplication.Application?.Priority || 10000,
5298
- // Validators.required,
5299
- // ],
5300
- procType: [this.ProcessorType, [forms.Validators.required]],
5301
+ procType: [this.ProcessorType, [forms.Validators.required]]
5301
5302
  });
5303
+ this.setupDfsForm();
5304
+ this.setupLcuTypeSubForm();
5302
5305
  }
5303
5306
  };
5304
5307
  ProcessorDetailsFormComponent.prototype.setupLCUGitHubForm = function () {
@@ -5309,22 +5312,22 @@
5309
5312
  var _a;
5310
5313
  this.ProcessorDetailsFormGroup.addControl('applicationId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ApplicationID) || '', [forms.Validators.required]));
5311
5314
  };
5312
- ProcessorDetailsFormComponent.prototype.setupLCUNPMForm = function () {
5313
- // this.ApplicationFormGroup.addControl(
5314
- // 'package',
5315
- // this.formBldr.control(
5316
- // this.EditingApplication.LowCodeUnit?.Package || '',
5317
- // [Validators.required]
5318
- // )
5319
- // );
5320
- // this.ApplicationFormGroup.addControl(
5321
- // 'version',
5322
- // this.formBldr.control(
5323
- // this.EditingApplication.LowCodeUnit?.Version || '',
5324
- // [Validators.required]
5325
- // )
5326
- // );
5327
- };
5315
+ // protected setupLCUNPMForm(): void {
5316
+ // this.ApplicationFormGroup.addControl(
5317
+ // 'package',
5318
+ // this.formBldr.control(
5319
+ // this.EditingApplication.LowCodeUnit?.Package || '',
5320
+ // [Validators.required]
5321
+ // )
5322
+ // );
5323
+ // this.ApplicationFormGroup.addControl(
5324
+ // 'version',
5325
+ // this.formBldr.control(
5326
+ // this.EditingApplication.LowCodeUnit?.Version || '',
5327
+ // [Validators.required]
5328
+ // )
5329
+ // );
5330
+ // }
5328
5331
  ProcessorDetailsFormComponent.prototype.setupLCUSPAForm = function () {
5329
5332
  var _a;
5330
5333
  this.ProcessorDetailsFormGroup.addControl('spaRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SPARoot) || '', [forms.Validators.required]));
@@ -5397,15 +5400,18 @@
5397
5400
  ProcessorDetailsFormComponent.decorators = [
5398
5401
  { type: i0.Component, args: [{
5399
5402
  selector: 'lcu-processor-details-form',
5400
- 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",
5403
+ 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",
5401
5404
  styles: [""]
5402
5405
  },] }
5403
5406
  ];
5404
5407
  ProcessorDetailsFormComponent.ctorParameters = function () { return [
5405
- { type: forms.FormBuilder }
5408
+ { type: forms.FormBuilder },
5409
+ { type: EaCService }
5406
5410
  ]; };
5407
5411
  ProcessorDetailsFormComponent.propDecorators = {
5408
- EditingApplication: [{ type: i0.Input, args: ['editing-application',] }]
5412
+ EditingApplication: [{ type: i0.Input, args: ['editing-application',] }],
5413
+ EditingApplicationLookup: [{ type: i0.Input, args: ['editing-application-lookup',] }],
5414
+ SourceControlFormControls: [{ type: i0.ViewChild, args: [SourceControlFormControlsComponent,] }]
5409
5415
  };
5410
5416
 
5411
5417
  var SourceControlFormComponent = /** @class */ (function () {
@@ -5437,7 +5443,6 @@
5437
5443
  });
5438
5444
  Object.defineProperty(SourceControlFormComponent.prototype, "SourceControls", {
5439
5445
  get: function () {
5440
- console.log("Environment: ", this.Environment);
5441
5446
  return this.Environment.Sources || {};
5442
5447
  },
5443
5448
  enumerable: false,
@@ -5451,11 +5456,13 @@
5451
5456
  console.log("sourceControlLookupChanged: ", event);
5452
5457
  };
5453
5458
  SourceControlFormComponent.prototype.SubmitSourceControl = function () {
5459
+ console.log("submitting source control: ", this.SourceControlFormGroup.value);
5454
5460
  };
5455
5461
  //HELPER
5456
5462
  SourceControlFormComponent.prototype.setupSourceControlForm = function () {
5457
5463
  var _a, _b;
5458
5464
  this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
5465
+ this.SourceControlFormGroup = this.formBldr.group({});
5459
5466
  this.setupBuildForm();
5460
5467
  };
5461
5468
  SourceControlFormComponent.prototype.setupBuildForm = function () {
@@ -5468,7 +5475,7 @@
5468
5475
  SourceControlFormComponent.decorators = [
5469
5476
  { type: i0.Component, args: [{
5470
5477
  selector: 'lcu-source-control-form',
5471
- 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",
5478
+ 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",
5472
5479
  styles: [""]
5473
5480
  },] }
5474
5481
  ];
@@ -5482,17 +5489,24 @@
5482
5489
  };
5483
5490
 
5484
5491
  var BuildPipelineFormComponent = /** @class */ (function () {
5485
- function BuildPipelineFormComponent(formBldr, appsFlowSvc) {
5486
- this.formBldr = formBldr;
5492
+ function BuildPipelineFormComponent(eacSvc, formBuilder, appsFlowSvc) {
5493
+ this.eacSvc = eacSvc;
5494
+ this.formBuilder = formBuilder;
5487
5495
  this.appsFlowSvc = appsFlowSvc;
5488
5496
  this.HostingDetails = new ProjectHostingDetails();
5489
5497
  }
5490
5498
  Object.defineProperty(BuildPipelineFormComponent.prototype, "Artifact", {
5491
- //PROPERTIES
5499
+ // @Input('main-branch')
5500
+ // public MainBranch: string;
5501
+ // @Input('organization')
5502
+ // public Organization: string;
5503
+ // @Input('repository')
5504
+ // public Repository: string;
5492
5505
  get: function () {
5493
- var _a, _b;
5494
- return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts) && this.ArtifactLookup
5495
- ? ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts[this.ArtifactLookup]) || {}
5506
+ var _a, _b, _c;
5507
+ console.log("ARTIFACT: ", (_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts[this.ArtifactLookup]);
5508
+ return ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts) && this.ArtifactLookup
5509
+ ? ((_c = this.Environment) === null || _c === void 0 ? void 0 : _c.Artifacts[this.ArtifactLookup]) || {}
5496
5510
  : {};
5497
5511
  },
5498
5512
  enumerable: false,
@@ -5507,6 +5521,14 @@
5507
5521
  enumerable: false,
5508
5522
  configurable: true
5509
5523
  });
5524
+ Object.defineProperty(BuildPipelineFormComponent.prototype, "BuildPipelineFormControl", {
5525
+ get: function () {
5526
+ var _a;
5527
+ return (_a = this.BuildPipelineFormGroup) === null || _a === void 0 ? void 0 : _a.controls.buildPipeline;
5528
+ },
5529
+ enumerable: false,
5530
+ configurable: true
5531
+ });
5510
5532
  Object.defineProperty(BuildPipelineFormComponent.prototype, "DevOpsAction", {
5511
5533
  get: function () {
5512
5534
  return this.Environment.DevOpsActions && this.DevOpsActionLookup
@@ -5523,6 +5545,13 @@
5523
5545
  enumerable: false,
5524
5546
  configurable: true
5525
5547
  });
5548
+ Object.defineProperty(BuildPipelineFormComponent.prototype, "DevOpsActionNameFormControl", {
5549
+ get: function () {
5550
+ return this.BuildPipelineFormGroup.get('devOpsActionName');
5551
+ },
5552
+ enumerable: false,
5553
+ configurable: true
5554
+ });
5526
5555
  Object.defineProperty(BuildPipelineFormComponent.prototype, "EditingSourceControl", {
5527
5556
  get: function () {
5528
5557
  var _a, _b;
@@ -5535,13 +5564,37 @@
5535
5564
  enumerable: false,
5536
5565
  configurable: true
5537
5566
  });
5567
+ Object.defineProperty(BuildPipelineFormComponent.prototype, "NPMTokenFormControl", {
5568
+ get: function () {
5569
+ return this.BuildPipelineFormGroup.get('npmToken');
5570
+ },
5571
+ enumerable: false,
5572
+ configurable: true
5573
+ });
5574
+ Object.defineProperty(BuildPipelineFormComponent.prototype, "SelectedHostingOption", {
5575
+ // (ho) => ho.Lookup === this.BuildPipeline
5576
+ get: function () {
5577
+ var _this = this;
5578
+ var _a, _b;
5579
+ return (_b = (_a = this.HostingDetails) === null || _a === void 0 ? void 0 : _a.HostingOptions) === null || _b === void 0 ? void 0 : _b.find(function (ho) { return ho.Lookup === _this.BuildPipeline; });
5580
+ },
5581
+ enumerable: false,
5582
+ configurable: true
5583
+ });
5584
+ Object.defineProperty(BuildPipelineFormComponent.prototype, "SelectedHostingOptionInputControlValues", {
5585
+ get: function () {
5586
+ var _this = this;
5587
+ var _a, _b;
5588
+ return (_b = (_a = this.SelectedHostingOption) === null || _a === void 0 ? void 0 : _a.Inputs) === null || _b === void 0 ? void 0 : _b.reduce(function (prev, cur) {
5589
+ var res = Object.assign({}, prev);
5590
+ res[cur.Lookup] = _this.BuildPipelineFormGroup.controls[cur.Lookup].value;
5591
+ return res;
5592
+ }, {});
5593
+ },
5594
+ enumerable: false,
5595
+ configurable: true
5596
+ });
5538
5597
  Object.defineProperty(BuildPipelineFormComponent.prototype, "SourceControlLookups", {
5539
- // @Input('main-branch')
5540
- // public MainBranch: string;
5541
- // @Input('organization')
5542
- // public Organization: string;
5543
- // @Input('repository')
5544
- // public Repository: string;
5545
5598
  get: function () {
5546
5599
  return Object.keys(this.SourceControls || {});
5547
5600
  },
@@ -5556,34 +5609,176 @@
5556
5609
  configurable: true
5557
5610
  });
5558
5611
  BuildPipelineFormComponent.prototype.ngOnInit = function () {
5612
+ this.BuildPipelineFormGroup = this.formBuilder.group({});
5613
+ if (this.BuildPipelineFormGroup != null) {
5614
+ this.BuildPipelineFormGroup.removeControl('hostingDetails');
5615
+ }
5616
+ this.BuildPipelineFormGroup.addControl('hostingDetails', this.formBuilder.group({
5617
+ buildPipeline: [this.BuildPipeline, [forms.Validators.required]],
5618
+ }));
5619
+ this.loadProjectHostingDetails();
5620
+ };
5621
+ //API METHODS
5622
+ BuildPipelineFormComponent.prototype.BuildPipelineChanged = function () {
5623
+ var _a, _b;
5624
+ console.log("build pipeline value: ", (_a = this.BuildPipelineFormControl) === null || _a === void 0 ? void 0 : _a.value);
5625
+ this.BuildPipeline = (_b = this.BuildPipelineFormControl) === null || _b === void 0 ? void 0 : _b.value;
5626
+ this.setupControlsForForm();
5627
+ };
5628
+ BuildPipelineFormComponent.prototype.SubmitBuildPipeline = function () {
5629
+ console.log("submitting build pipeline: ", this.BuildPipelineFormGroup.value);
5630
+ };
5631
+ BuildPipelineFormComponent.prototype.SaveEnvironment = function () {
5632
+ var _a;
5633
+ var saveEnvReq = {
5634
+ Environment: Object.assign(Object.assign({}, this.Environment), { Artifacts: this.Environment.Artifacts || {}, DevOpsActions: this.Environment.DevOpsActions || {}, Secrets: this.Environment.Secrets || {}, Sources: this.Environment.Sources || {} }),
5635
+ EnvironmentLookup: this.EnvironmentLookup,
5636
+ EnterpriseDataTokens: {},
5637
+ };
5638
+ var artifactLookup;
5639
+ var artifact = Object.assign(Object.assign({}, this.Artifact), this.SelectedHostingOptionInputControlValues);
5640
+ if (!this.ArtifactLookup) {
5641
+ artifactLookup = i2.Guid.CreateRaw();
5642
+ artifact = Object.assign(Object.assign({}, artifact), { Type: this.SelectedHostingOption
5643
+ .ArtifactType, Name: this.SelectedHostingOption.Name, NPMRegistry: 'https://registry.npmjs.org/' });
5644
+ }
5645
+ else {
5646
+ artifactLookup = this.ArtifactLookup;
5647
+ }
5648
+ saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
5649
+ var devOpsActionLookup;
5650
+ if (!this.DevOpsActionLookup) {
5651
+ devOpsActionLookup = i2.Guid.CreateRaw();
5652
+ var doa = Object.assign(Object.assign({}, this.DevOpsAction), { ArtifactLookups: [artifactLookup], Name: this.DevOpsActionNameFormControl.value, Path: this.SelectedHostingOption.Path, Templates: this.SelectedHostingOption.Templates });
5653
+ if ((_a = this.NPMTokenFormControl) === null || _a === void 0 ? void 0 : _a.value) {
5654
+ var secretLookup = 'npm-access-token';
5655
+ doa.SecretLookups = [secretLookup];
5656
+ saveEnvReq.Environment.Secrets[secretLookup] = {
5657
+ Name: 'NPM Access Token',
5658
+ DataTokenLookup: secretLookup,
5659
+ KnownAs: 'NPM_TOKEN',
5660
+ };
5661
+ saveEnvReq.EnterpriseDataTokens[secretLookup] = {
5662
+ Name: saveEnvReq.Environment.Secrets[secretLookup].Name,
5663
+ Description: saveEnvReq.Environment.Secrets[secretLookup].Name,
5664
+ Value: this.NPMTokenFormControl.value,
5665
+ };
5666
+ }
5667
+ saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
5668
+ }
5669
+ else {
5670
+ devOpsActionLookup = this.DevOpsActionLookup;
5671
+ var doa = Object.assign(Object.assign({}, this.DevOpsAction), { Name: this.DevOpsActionNameFormControl.value });
5672
+ saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
5673
+ }
5674
+ // let source: EaCSourceControl = {
5675
+ // ...this.EditingSourceControl,
5676
+ // Branches: this.SourceControlFormControls.SelectedBranches,
5677
+ // MainBranch: this.SourceControlFormControls.MainBranchFormControl.value,
5678
+ // };
5679
+ // source = {
5680
+ // ...source,
5681
+ // Type: 'GitHub',
5682
+ // Name: this.EditingSourceControlLookup,
5683
+ // DevOpsActionTriggerLookups: [devOpsActionLookup],
5684
+ // Organization:
5685
+ // this.SourceControlFormControls.OrganizationFormControl.value,
5686
+ // Repository: this.SourceControlFormControls.RepositoryFormControl.value,
5687
+ // };
5688
+ // const scLookup = `github://${source.Organization}/${source.Repository}`;
5689
+ // saveEnvReq.Environment.Sources[scLookup] = source;
5690
+ this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
5691
+ };
5692
+ // Helpers
5693
+ BuildPipelineFormComponent.prototype.setupControlsForForm = function () {
5694
+ var _this = this;
5695
+ var _a, _b, _c, _d, _e, _f;
5696
+ for (var ctrlName in this.BuildPipelineFormGroup.controls) {
5697
+ //devOpsAction doesn't exist
5698
+ //removes hosting details
5699
+ if (ctrlName !== 'buildPipeline' && ctrlName !== 'devOpsAction') {
5700
+ console.log("removing control: ", ctrlName);
5701
+ this.BuildPipelineFormGroup.removeControl(ctrlName);
5702
+ }
5703
+ }
5704
+ 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) || '', [forms.Validators.required]));
5705
+ (_d = (_c = this.SelectedHostingOption) === null || _c === void 0 ? void 0 : _c.Inputs) === null || _d === void 0 ? void 0 : _d.forEach(function (input) {
5706
+ var validators = input.Required ? [forms.Validators.required] : [];
5707
+ _this.BuildPipelineFormGroup.addControl(input.Lookup, _this.formBuilder.control(_this.Artifact[input.Lookup] || input.DefaultValue || '', validators));
5708
+ // if (this.Disabled) {
5709
+ // this.FormGroup.controls[input.Lookup].disable();
5710
+ // }
5711
+ });
5712
+ if (((_e = this.BuildPipelineFormControl) === null || _e === void 0 ? void 0 : _e.value) === 'npm-release') {
5713
+ if (!this.BuildPipelineFormGroup.controls.npmToken) {
5714
+ this.BuildPipelineFormGroup.addControl('npmToken', this.formBuilder.control('', this.Disabled ? [] : [forms.Validators.required]));
5715
+ if (this.Disabled) {
5716
+ this.BuildPipelineFormGroup.controls.npmToken.disable();
5717
+ }
5718
+ }
5719
+ }
5720
+ else if (((_f = this.BuildPipelineFormControl) === null || _f === void 0 ? void 0 : _f.value) === 'github-artifacts-release') {
5721
+ if (this.BuildPipelineFormGroup.controls.npmToken) {
5722
+ this.BuildPipelineFormGroup.removeControl('npmToken');
5723
+ }
5724
+ }
5725
+ };
5726
+ BuildPipelineFormComponent.prototype.loadProjectHostingDetails = function () {
5727
+ var _this = this;
5728
+ this.HostingDetails.Loading = true;
5729
+ // this.Organization,
5730
+ // this.Repository,
5731
+ // this.MainBranch
5732
+ // "powhound4",
5733
+ // "RedwoodCrystals",
5734
+ // "master"
5735
+ this.appsFlowSvc
5736
+ .NewLoadProjectHostingDetails()
5737
+ .subscribe(function (response) {
5738
+ var _a, _b, _c;
5739
+ _this.HostingDetails = response.Model;
5740
+ console.log("response: ", response);
5741
+ _this.HostingDetails.Loading = false;
5742
+ _this.BuildPipeline =
5743
+ ((_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 : '';
5744
+ console.log("Build Pipeline HERE= ", _this.BuildPipeline);
5745
+ _this.setupControlsForForm();
5746
+ }, function (err) {
5747
+ console.log("ERR: ", err);
5748
+ _this.HostingDetails.Loading = false;
5749
+ });
5750
+ console.log("HOSTING DETAILS: ", this.HostingDetails);
5559
5751
  };
5560
5752
  return BuildPipelineFormComponent;
5561
5753
  }());
5562
5754
  BuildPipelineFormComponent.decorators = [
5563
5755
  { type: i0.Component, args: [{
5564
5756
  selector: 'lcu-build-pipeline-form',
5565
- 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",
5757
+ 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",
5566
5758
  styles: [""]
5567
5759
  },] }
5568
5760
  ];
5569
5761
  BuildPipelineFormComponent.ctorParameters = function () { return [
5762
+ { type: EaCService },
5570
5763
  { type: forms.FormBuilder },
5571
5764
  { type: ApplicationsFlowService }
5572
5765
  ]; };
5573
5766
  BuildPipelineFormComponent.propDecorators = {
5767
+ BuildPipeline: [{ type: i0.Input, args: ['build-pipeline',] }],
5574
5768
  DevOpsActionLookup: [{ type: i0.Input, args: ['devops-action-lookup',] }],
5575
- Environment: [{ type: i0.Input, args: ['environment',] }]
5769
+ Disabled: [{ type: i0.Input, args: ['disabled',] }],
5770
+ Environment: [{ type: i0.Input, args: ['environment',] }],
5771
+ EnvironmentLookup: [{ type: i0.Input, args: ['environment-lookup',] }]
5576
5772
  };
5577
5773
 
5578
5774
  var DevopsSourceControlFormComponent = /** @class */ (function () {
5579
5775
  // Constructors
5580
- function DevopsSourceControlFormComponent(formBuilder, appsFlowSvc, eacSvc) {
5581
- this.formBuilder = formBuilder;
5776
+ function DevopsSourceControlFormComponent(appsFlowSvc, eacSvc, formBuilder) {
5582
5777
  this.appsFlowSvc = appsFlowSvc;
5583
5778
  this.eacSvc = eacSvc;
5779
+ this.formBuilder = formBuilder;
5584
5780
  this.SeparatorKeysCodes = [keycodes.ENTER, keycodes.COMMA];
5585
5781
  this.BuildPath = null;
5586
- // this.EditingSourceControlLookup = null;
5587
5782
  this.HostingDetails = new ProjectHostingDetails();
5588
5783
  this.SelectedBranches = [];
5589
5784
  this.SourceControlRoot = '';
@@ -5591,7 +5786,6 @@
5591
5786
  this.UseBuildPath = false;
5592
5787
  }
5593
5788
  Object.defineProperty(DevopsSourceControlFormComponent.prototype, "BranchesFormControl", {
5594
- // Fields
5595
5789
  // Properties
5596
5790
  get: function () {
5597
5791
  return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
@@ -5682,12 +5876,9 @@
5682
5876
  this.destroyFormControls();
5683
5877
  };
5684
5878
  DevopsSourceControlFormComponent.prototype.ngOnInit = function () {
5685
- console.log("org: ", this.EditingSourceControl);
5686
- console.log("lookup: ", this.EditingSourceControlLookup);
5687
5879
  if (this.EditingSourceControlLookup === null) {
5688
5880
  this.CreateNewSourceControl();
5689
5881
  }
5690
- console.log("org: ", this.EditingSourceControl);
5691
5882
  if (this.EditingSourceControl != null) {
5692
5883
  this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
5693
5884
  this.setupFormControls();
@@ -5706,6 +5897,7 @@
5706
5897
  this.loadProjectHostingDetails();
5707
5898
  };
5708
5899
  DevopsSourceControlFormComponent.prototype.BuildPathChanged = function (event) {
5900
+ //do something??
5709
5901
  };
5710
5902
  DevopsSourceControlFormComponent.prototype.CreateNewSourceControl = function () {
5711
5903
  this.SetEditingSourceControl(i2.Guid.CreateRaw());
@@ -5782,7 +5974,7 @@
5782
5974
  this.EditingSourceControlLookup = scLookup;
5783
5975
  };
5784
5976
  DevopsSourceControlFormComponent.prototype.SubmitSourceControl = function () {
5785
- console.log("source control submitted");
5977
+ console.log("source control submitted: ", this.DevOpsSourceControlFormGroup.value);
5786
5978
  };
5787
5979
  // public SaveSourceControl(): void {
5788
5980
  // const saveEnvReq: SaveEnvironmentAsCodeEventRequest = {
@@ -5797,23 +5989,23 @@
5797
5989
  // EnterpriseDataTokens: {},
5798
5990
  // };
5799
5991
  // let artifactLookup: string;
5800
- // // let artifact: EaCArtifact = {
5801
- // // ...this.Artifact,
5802
- // // ...this.HostingDetailsFormControls
5803
- // // .SelectedHostingOptionInputControlValues,
5804
- // // };
5805
- // if (!this.ArtifactLookup) {
5806
- // artifactLookup = Guid.CreateRaw();
5807
- // artifact = {
5808
- // ...artifact,
5809
- // Type: this.HostingDetailsFormControls.SelectedHostingOption
5810
- // .ArtifactType,
5811
- // Name: this.HostingDetailsFormControls.SelectedHostingOption.Name,
5812
- // NPMRegistry: 'https://registry.npmjs.org/',
5813
- // };
5814
- // } else {
5815
- // artifactLookup = this.ArtifactLookup;
5816
- // }
5992
+ // let artifact: EaCArtifact = {
5993
+ // ...this.Artifact,
5994
+ // ...this.HostingDetailsFormControls
5995
+ // .SelectedHostingOptionInputControlValues,
5996
+ // };
5997
+ // // if (!this.ArtifactLookup) {
5998
+ // // artifactLookup = Guid.CreateRaw();
5999
+ // // artifact = {
6000
+ // // ...artifact,
6001
+ // // Type: this.HostingDetailsFormControls.SelectedHostingOption
6002
+ // // .ArtifactType,
6003
+ // // Name: this.HostingDetailsFormControls.SelectedHostingOption.Name,
6004
+ // // NPMRegistry: 'https://registry.npmjs.org/',
6005
+ // // };
6006
+ // // } else {
6007
+ // // artifactLookup = this.ArtifactLookup;
6008
+ // // }
5817
6009
  // saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
5818
6010
  // let devOpsActionLookup: string;
5819
6011
  // if (!this.DevOpsActionLookup) {
@@ -6020,19 +6212,19 @@
6020
6212
  DevopsSourceControlFormComponent.decorators = [
6021
6213
  { type: i0.Component, args: [{
6022
6214
  selector: 'lcu-devops-source-control-form',
6023
- 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>",
6215
+ 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>",
6024
6216
  styles: [".form-card,.sc-card{width:100%}"]
6025
6217
  },] }
6026
6218
  ];
6027
6219
  DevopsSourceControlFormComponent.ctorParameters = function () { return [
6028
- { type: forms.FormBuilder },
6029
6220
  { type: ApplicationsFlowService },
6030
- { type: EaCService }
6221
+ { type: EaCService },
6222
+ { type: forms.FormBuilder }
6031
6223
  ]; };
6032
6224
  DevopsSourceControlFormComponent.propDecorators = {
6033
- BranchesInput: [{ type: i0.ViewChild, args: ['branches',] }],
6034
6225
  EditingSourceControlLookup: [{ type: i0.Input, args: ['editing-source-control-lookup',] }],
6035
- Environment: [{ type: i0.Input, args: ['environment',] }]
6226
+ Environment: [{ type: i0.Input, args: ['environment',] }],
6227
+ BranchesInput: [{ type: i0.ViewChild, args: ['branches',] }]
6036
6228
  };
6037
6229
 
6038
6230
  var SourceControlDialogComponent = /** @class */ (function () {
@@ -6047,7 +6239,7 @@
6047
6239
  SourceControlDialogComponent.decorators = [
6048
6240
  { type: i0.Component, args: [{
6049
6241
  selector: 'lcu-source-control-dialog',
6050
- 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>",
6242
+ 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>",
6051
6243
  styles: [""]
6052
6244
  },] }
6053
6245
  ];
@@ -6068,7 +6260,7 @@
6068
6260
  BuildPipelineDialogComponent.decorators = [
6069
6261
  { type: i0.Component, args: [{
6070
6262
  selector: 'lcu-build-pipeline-dialog',
6071
- template: "<lcu-build-pipeline-form\n[devops-action-lookup]=\"data.devopsActionLookup\"\n[environment]=\"data.environment\"\n>\n\n</lcu-build-pipeline-form>\n",
6263
+ 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>",
6072
6264
  styles: [""]
6073
6265
  },] }
6074
6266
  ];