@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.
- package/bundles/lowcodeunit-applications-flow-common.umd.js +361 -137
- package/bundles/lowcodeunit-applications-flow-common.umd.js.map +1 -1
- package/bundles/lowcodeunit-applications-flow-common.umd.min.js +2 -2
- package/bundles/lowcodeunit-applications-flow-common.umd.min.js.map +1 -1
- package/esm2015/lib/applications-flow.module.js +8 -4
- package/esm2015/lib/controls/build-pipeline-form/build-pipeline-form.component.js +106 -29
- package/esm2015/lib/controls/devops-source-control-form/devops-source-control-form.component.js +27 -31
- package/esm2015/lib/controls/edit-application-form/edit-application-form.component.js +60 -0
- package/esm2015/lib/controls/processor-details-form/processor-details-form.component.js +89 -46
- package/esm2015/lib/controls/security-toggle/security-toggle.component.js +14 -24
- package/esm2015/lib/controls/source-control-form/source-control-form.component.js +8 -6
- package/esm2015/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.js +2 -2
- package/esm2015/lib/dialogs/source-control-dialog/source-control-dialog.component.js +2 -2
- package/esm2015/lib/elements/slotted-card/slotted-card.component.js +6 -6
- package/esm2015/lowcodeunit-applications-flow-common.js +2 -1
- package/fesm2015/lowcodeunit-applications-flow-common.js +303 -138
- package/fesm2015/lowcodeunit-applications-flow-common.js.map +1 -1
- package/lib/applications-flow.module.d.ts.map +1 -1
- package/lib/controls/build-pipeline-form/build-pipeline-form.component.d.ts +12 -2
- package/lib/controls/build-pipeline-form/build-pipeline-form.component.d.ts.map +1 -1
- package/lib/controls/devops-source-control-form/devops-source-control-form.component.d.ts +9 -9
- package/lib/controls/devops-source-control-form/devops-source-control-form.component.d.ts.map +1 -1
- package/lib/controls/edit-application-form/edit-application-form.component.d.ts +17 -0
- package/lib/controls/edit-application-form/edit-application-form.component.d.ts.map +1 -0
- package/lib/controls/processor-details-form/processor-details-form.component.d.ts +23 -8
- package/lib/controls/processor-details-form/processor-details-form.component.d.ts.map +1 -1
- package/lib/controls/security-toggle/security-toggle.component.d.ts +3 -1
- package/lib/controls/security-toggle/security-toggle.component.d.ts.map +1 -1
- package/lib/controls/source-control-form/source-control-form.component.d.ts +4 -5
- package/lib/controls/source-control-form/source-control-form.component.d.ts.map +1 -1
- package/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.d.ts +1 -0
- package/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.d.ts.map +1 -1
- package/lib/dialogs/source-control-dialog/source-control-dialog.component.d.ts.map +1 -1
- package/lib/elements/slotted-card/slotted-card.component.d.ts +3 -3
- package/lib/elements/slotted-card/slotted-card.component.d.ts.map +1 -1
- package/lowcodeunit-applications-flow-common.d.ts +1 -0
- package/lowcodeunit-applications-flow-common.d.ts.map +1 -1
- package/lowcodeunit-applications-flow-common.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -4764,18 +4764,18 @@
|
|
|
4764
4764
|
SlottedCardComponent.decorators = [
|
|
4765
4765
|
{ type: i0.Component, args: [{
|
|
4766
4766
|
selector: 'lcu-slotted-card',
|
|
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
|
|
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{
|
|
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%}"]
|
|
4769
4769
|
},] }
|
|
4770
4770
|
];
|
|
4771
4771
|
SlottedCardComponent.ctorParameters = function () { return []; };
|
|
4772
4772
|
SlottedCardComponent.propDecorators = {
|
|
4773
|
-
|
|
4773
|
+
ActionText: [{ type: i0.Input, args: ['action-text',] }],
|
|
4774
|
+
ActionPath: [{ type: i0.Input, args: ['action-path',] }],
|
|
4774
4775
|
Icon: [{ type: i0.Input, args: ['icon',] }],
|
|
4775
4776
|
MainSlotDescription: [{ type: i0.Input, args: ['main-slot-description',] }],
|
|
4777
|
+
Title: [{ type: i0.Input, args: ['title',] }],
|
|
4776
4778
|
SecondarySlotDescription: [{ type: i0.Input, args: ['secondary-slot-description',] }],
|
|
4777
|
-
ActionText: [{ type: i0.Input, args: ['action-text',] }],
|
|
4778
|
-
ActionPath: [{ type: i0.Input, args: ['action-path',] }],
|
|
4779
4779
|
MainActionClicked: [{ type: i0.Output, args: ['main-action-clicked',] }]
|
|
4780
4780
|
};
|
|
4781
4781
|
|
|
@@ -5047,6 +5047,7 @@
|
|
|
5047
5047
|
var SecurityToggleComponent = /** @class */ (function () {
|
|
5048
5048
|
function SecurityToggleComponent(formBldr) {
|
|
5049
5049
|
this.formBldr = formBldr;
|
|
5050
|
+
this.SaveFormEvent = new i0.EventEmitter;
|
|
5050
5051
|
}
|
|
5051
5052
|
Object.defineProperty(SecurityToggleComponent.prototype, "IsPrivateFormControl", {
|
|
5052
5053
|
get: function () {
|
|
@@ -5056,34 +5057,26 @@
|
|
|
5056
5057
|
enumerable: false,
|
|
5057
5058
|
configurable: true
|
|
5058
5059
|
});
|
|
5060
|
+
Object.defineProperty(SecurityToggleComponent.prototype, "IsTriggerSignInFormControl", {
|
|
5061
|
+
get: function () {
|
|
5062
|
+
var _a;
|
|
5063
|
+
return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isTriggerSignIn;
|
|
5064
|
+
},
|
|
5065
|
+
enumerable: false,
|
|
5066
|
+
configurable: true
|
|
5067
|
+
});
|
|
5059
5068
|
SecurityToggleComponent.prototype.ngOnInit = function () {
|
|
5060
5069
|
this.setupSecurityFormGroup();
|
|
5061
5070
|
};
|
|
5062
5071
|
SecurityToggleComponent.prototype.SecuritySubmit = function () {
|
|
5063
|
-
|
|
5072
|
+
//save the security settings
|
|
5073
|
+
console.log("submitting security values: ", this.SecurityFormGroup.value);
|
|
5074
|
+
this.SaveFormEvent.emit(this.SecurityFormGroup.value);
|
|
5064
5075
|
};
|
|
5065
5076
|
SecurityToggleComponent.prototype.setupSecurityFormGroup = function () {
|
|
5066
5077
|
var _a, _b;
|
|
5067
5078
|
this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
|
|
5068
|
-
|
|
5069
|
-
// this.SecurityFormGroup = this.formBldr.group({
|
|
5070
|
-
// name: [this.EditingApplication.Application?.Name, Validators.required],
|
|
5071
|
-
// description: [
|
|
5072
|
-
// this.EditingApplication.Application?.Description,
|
|
5073
|
-
// Validators.required,
|
|
5074
|
-
// ],
|
|
5075
|
-
// route: [
|
|
5076
|
-
// this.EditingApplication.LookupConfig?.PathRegex.replace('.*', '') ||
|
|
5077
|
-
// '/',
|
|
5078
|
-
// Validators.required,
|
|
5079
|
-
// ],
|
|
5080
|
-
// // priority: [
|
|
5081
|
-
// // this.EditingApplication.Application?.Priority || 10000,
|
|
5082
|
-
// // Validators.required,
|
|
5083
|
-
// // ],
|
|
5084
|
-
// procType: [this.ProcessorType, [Validators.required]],
|
|
5085
|
-
// });
|
|
5086
|
-
}
|
|
5079
|
+
this.SecurityFormGroup = this.formBldr.group({});
|
|
5087
5080
|
this.setupSecurityForm();
|
|
5088
5081
|
};
|
|
5089
5082
|
SecurityToggleComponent.prototype.setupSecurityForm = function () {
|
|
@@ -5096,7 +5089,7 @@
|
|
|
5096
5089
|
SecurityToggleComponent.decorators = [
|
|
5097
5090
|
{ type: i0.Component, args: [{
|
|
5098
5091
|
selector: 'lcu-security-toggle',
|
|
5099
|
-
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
|
|
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 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",
|
|
5100
5093
|
styles: ["::ng-deep .mat-tooltip{color:#000!important}"]
|
|
5101
5094
|
},] }
|
|
5102
5095
|
];
|
|
@@ -5104,15 +5097,25 @@
|
|
|
5104
5097
|
{ type: forms.FormBuilder }
|
|
5105
5098
|
]; };
|
|
5106
5099
|
SecurityToggleComponent.propDecorators = {
|
|
5107
|
-
EditingApplication: [{ type: i0.Input, args: ['editing-application',] }]
|
|
5100
|
+
EditingApplication: [{ type: i0.Input, args: ['editing-application',] }],
|
|
5101
|
+
SaveFormEvent: [{ type: i0.Output, args: ['save-form-event',] }]
|
|
5108
5102
|
};
|
|
5109
5103
|
|
|
5110
5104
|
var ProcessorDetailsFormComponent = /** @class */ (function () {
|
|
5111
|
-
function ProcessorDetailsFormComponent(formBldr) {
|
|
5105
|
+
function ProcessorDetailsFormComponent(formBldr, eacSvc) {
|
|
5112
5106
|
this.formBldr = formBldr;
|
|
5113
|
-
|
|
5107
|
+
this.eacSvc = eacSvc;
|
|
5114
5108
|
this.redirectTooltip = '';
|
|
5109
|
+
this.SaveFormEvent = new i0.EventEmitter;
|
|
5115
5110
|
}
|
|
5111
|
+
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "APIRootFormControl", {
|
|
5112
|
+
get: function () {
|
|
5113
|
+
var _a;
|
|
5114
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.apiRoot;
|
|
5115
|
+
},
|
|
5116
|
+
enumerable: false,
|
|
5117
|
+
configurable: true
|
|
5118
|
+
});
|
|
5116
5119
|
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "BuildFormControl", {
|
|
5117
5120
|
get: function () {
|
|
5118
5121
|
var _a;
|
|
@@ -5129,6 +5132,14 @@
|
|
|
5129
5132
|
enumerable: false,
|
|
5130
5133
|
configurable: true
|
|
5131
5134
|
});
|
|
5135
|
+
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "ClientSecretFormControl", {
|
|
5136
|
+
get: function () {
|
|
5137
|
+
var _a;
|
|
5138
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientSecret;
|
|
5139
|
+
},
|
|
5140
|
+
enumerable: false,
|
|
5141
|
+
configurable: true
|
|
5142
|
+
});
|
|
5132
5143
|
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "DefaultFileFormControl", {
|
|
5133
5144
|
get: function () {
|
|
5134
5145
|
var _a;
|
|
@@ -5137,6 +5148,17 @@
|
|
|
5137
5148
|
enumerable: false,
|
|
5138
5149
|
configurable: true
|
|
5139
5150
|
});
|
|
5151
|
+
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "DefaultSourceControl", {
|
|
5152
|
+
get: function () {
|
|
5153
|
+
var _a, _b, _c, _d;
|
|
5154
|
+
return {
|
|
5155
|
+
Organization: (_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Organization,
|
|
5156
|
+
Repository: (_d = (_c = this.EditingApplication) === null || _c === void 0 ? void 0 : _c.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Repository,
|
|
5157
|
+
};
|
|
5158
|
+
},
|
|
5159
|
+
enumerable: false,
|
|
5160
|
+
configurable: true
|
|
5161
|
+
});
|
|
5140
5162
|
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "InboundPathFormControl", {
|
|
5141
5163
|
get: function () {
|
|
5142
5164
|
var _a;
|
|
@@ -5145,10 +5167,34 @@
|
|
|
5145
5167
|
enumerable: false,
|
|
5146
5168
|
configurable: true
|
|
5147
5169
|
});
|
|
5148
|
-
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "
|
|
5170
|
+
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "MethodsFormControl", {
|
|
5149
5171
|
get: function () {
|
|
5150
5172
|
var _a;
|
|
5151
|
-
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.
|
|
5173
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.methods;
|
|
5174
|
+
},
|
|
5175
|
+
enumerable: false,
|
|
5176
|
+
configurable: true
|
|
5177
|
+
});
|
|
5178
|
+
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "PackageFormControl", {
|
|
5179
|
+
get: function () {
|
|
5180
|
+
var _a;
|
|
5181
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.package;
|
|
5182
|
+
},
|
|
5183
|
+
enumerable: false,
|
|
5184
|
+
configurable: true
|
|
5185
|
+
});
|
|
5186
|
+
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "PermanentFormControl", {
|
|
5187
|
+
get: function () {
|
|
5188
|
+
var _a;
|
|
5189
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.permanent;
|
|
5190
|
+
},
|
|
5191
|
+
enumerable: false,
|
|
5192
|
+
configurable: true
|
|
5193
|
+
});
|
|
5194
|
+
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "PreserveMethodFormControl", {
|
|
5195
|
+
get: function () {
|
|
5196
|
+
var _a;
|
|
5197
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.preserveMethod;
|
|
5152
5198
|
},
|
|
5153
5199
|
enumerable: false,
|
|
5154
5200
|
configurable: true
|
|
@@ -5185,24 +5231,40 @@
|
|
|
5185
5231
|
enumerable: false,
|
|
5186
5232
|
configurable: true
|
|
5187
5233
|
});
|
|
5188
|
-
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "
|
|
5234
|
+
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "TokenLookupFormControl", {
|
|
5189
5235
|
get: function () {
|
|
5190
5236
|
var _a;
|
|
5191
|
-
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.
|
|
5237
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.tokenLookup;
|
|
5192
5238
|
},
|
|
5193
5239
|
enumerable: false,
|
|
5194
5240
|
configurable: true
|
|
5195
5241
|
});
|
|
5196
|
-
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "
|
|
5242
|
+
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "VersionFormControl", {
|
|
5197
5243
|
get: function () {
|
|
5198
5244
|
var _a;
|
|
5199
|
-
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.
|
|
5245
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.version;
|
|
5246
|
+
},
|
|
5247
|
+
enumerable: false,
|
|
5248
|
+
configurable: true
|
|
5249
|
+
});
|
|
5250
|
+
Object.defineProperty(ProcessorDetailsFormComponent.prototype, "ZipFileFormControl", {
|
|
5251
|
+
get: function () {
|
|
5252
|
+
var _a;
|
|
5253
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.zipFile;
|
|
5200
5254
|
},
|
|
5201
5255
|
enumerable: false,
|
|
5202
5256
|
configurable: true
|
|
5203
5257
|
});
|
|
5204
5258
|
ProcessorDetailsFormComponent.prototype.ngOnInit = function () {
|
|
5205
|
-
this.
|
|
5259
|
+
if (!this.EditingApplication) {
|
|
5260
|
+
this.CreateNewApplication();
|
|
5261
|
+
}
|
|
5262
|
+
else {
|
|
5263
|
+
this.setupProcessorDetailsForm();
|
|
5264
|
+
}
|
|
5265
|
+
};
|
|
5266
|
+
ProcessorDetailsFormComponent.prototype.CreateNewApplication = function () {
|
|
5267
|
+
this.SetEditingApplication(i2.Guid.CreateRaw());
|
|
5206
5268
|
};
|
|
5207
5269
|
ProcessorDetailsFormComponent.prototype.DetermineTooltipText = function () {
|
|
5208
5270
|
var permanentValue = this.PermanentFormControl.value;
|
|
@@ -5220,7 +5282,13 @@
|
|
|
5220
5282
|
this.redirectTooltip = '308 – Permanent and Preserve';
|
|
5221
5283
|
}
|
|
5222
5284
|
};
|
|
5285
|
+
ProcessorDetailsFormComponent.prototype.SetEditingApplication = function (appLookup) {
|
|
5286
|
+
this.EditingApplicationLookup = appLookup;
|
|
5287
|
+
this.setupProcessorDetailsForm();
|
|
5288
|
+
};
|
|
5223
5289
|
ProcessorDetailsFormComponent.prototype.SubmitProcessorDetails = function () {
|
|
5290
|
+
console.log("submitting proc details: ", this.ProcessorDetailsFormGroup.value);
|
|
5291
|
+
this.SaveFormEvent.emit(this.ProcessorDetailsFormGroup.value);
|
|
5224
5292
|
};
|
|
5225
5293
|
ProcessorDetailsFormComponent.prototype.ProcessorTypeChanged = function (event) {
|
|
5226
5294
|
this.ProcessorType = event.value;
|
|
@@ -5286,26 +5354,15 @@
|
|
|
5286
5354
|
}
|
|
5287
5355
|
};
|
|
5288
5356
|
ProcessorDetailsFormComponent.prototype.setupProcessorDetailsForm = function () {
|
|
5289
|
-
var _a, _b
|
|
5357
|
+
var _a, _b;
|
|
5290
5358
|
this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
|
|
5359
|
+
console.log("EDITING APP = ", this.EditingApplication);
|
|
5291
5360
|
if (this.EditingApplication != null) {
|
|
5292
5361
|
this.ProcessorDetailsFormGroup = this.formBldr.group({
|
|
5293
|
-
|
|
5294
|
-
description: [
|
|
5295
|
-
(_d = this.EditingApplication.Application) === null || _d === void 0 ? void 0 : _d.Description,
|
|
5296
|
-
forms.Validators.required,
|
|
5297
|
-
],
|
|
5298
|
-
route: [
|
|
5299
|
-
((_e = this.EditingApplication.LookupConfig) === null || _e === void 0 ? void 0 : _e.PathRegex.replace('.*', '')) ||
|
|
5300
|
-
'/',
|
|
5301
|
-
forms.Validators.required,
|
|
5302
|
-
],
|
|
5303
|
-
// priority: [
|
|
5304
|
-
// this.EditingApplication.Application?.Priority || 10000,
|
|
5305
|
-
// Validators.required,
|
|
5306
|
-
// ],
|
|
5307
|
-
procType: [this.ProcessorType, [forms.Validators.required]],
|
|
5362
|
+
procType: [this.ProcessorType, [forms.Validators.required]]
|
|
5308
5363
|
});
|
|
5364
|
+
this.setupDfsForm();
|
|
5365
|
+
this.setupLcuTypeSubForm();
|
|
5309
5366
|
}
|
|
5310
5367
|
};
|
|
5311
5368
|
ProcessorDetailsFormComponent.prototype.setupLCUGitHubForm = function () {
|
|
@@ -5316,22 +5373,22 @@
|
|
|
5316
5373
|
var _a;
|
|
5317
5374
|
this.ProcessorDetailsFormGroup.addControl('applicationId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ApplicationID) || '', [forms.Validators.required]));
|
|
5318
5375
|
};
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
}
|
|
5376
|
+
// protected setupLCUNPMForm(): void {
|
|
5377
|
+
// this.ApplicationFormGroup.addControl(
|
|
5378
|
+
// 'package',
|
|
5379
|
+
// this.formBldr.control(
|
|
5380
|
+
// this.EditingApplication.LowCodeUnit?.Package || '',
|
|
5381
|
+
// [Validators.required]
|
|
5382
|
+
// )
|
|
5383
|
+
// );
|
|
5384
|
+
// this.ApplicationFormGroup.addControl(
|
|
5385
|
+
// 'version',
|
|
5386
|
+
// this.formBldr.control(
|
|
5387
|
+
// this.EditingApplication.LowCodeUnit?.Version || '',
|
|
5388
|
+
// [Validators.required]
|
|
5389
|
+
// )
|
|
5390
|
+
// );
|
|
5391
|
+
// }
|
|
5335
5392
|
ProcessorDetailsFormComponent.prototype.setupLCUSPAForm = function () {
|
|
5336
5393
|
var _a;
|
|
5337
5394
|
this.ProcessorDetailsFormGroup.addControl('spaRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SPARoot) || '', [forms.Validators.required]));
|
|
@@ -5404,20 +5461,26 @@
|
|
|
5404
5461
|
ProcessorDetailsFormComponent.decorators = [
|
|
5405
5462
|
{ type: i0.Component, args: [{
|
|
5406
5463
|
selector: 'lcu-processor-details-form',
|
|
5407
|
-
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
|
|
5464
|
+
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",
|
|
5408
5465
|
styles: [""]
|
|
5409
5466
|
},] }
|
|
5410
5467
|
];
|
|
5411
5468
|
ProcessorDetailsFormComponent.ctorParameters = function () { return [
|
|
5412
|
-
{ type: forms.FormBuilder }
|
|
5469
|
+
{ type: forms.FormBuilder },
|
|
5470
|
+
{ type: EaCService }
|
|
5413
5471
|
]; };
|
|
5414
5472
|
ProcessorDetailsFormComponent.propDecorators = {
|
|
5415
|
-
EditingApplication: [{ type: i0.Input, args: ['editing-application',] }]
|
|
5473
|
+
EditingApplication: [{ type: i0.Input, args: ['editing-application',] }],
|
|
5474
|
+
EditingApplicationLookup: [{ type: i0.Input, args: ['editing-application-lookup',] }],
|
|
5475
|
+
ProjectLookup: [{ type: i0.Input, args: ['project-lookup',] }],
|
|
5476
|
+
SaveFormEvent: [{ type: i0.Output, args: ['save-form-event',] }],
|
|
5477
|
+
SourceControlFormControls: [{ type: i0.ViewChild, args: [SourceControlFormControlsComponent,] }]
|
|
5416
5478
|
};
|
|
5417
5479
|
|
|
5418
5480
|
var SourceControlFormComponent = /** @class */ (function () {
|
|
5419
5481
|
function SourceControlFormComponent(formBldr) {
|
|
5420
5482
|
this.formBldr = formBldr;
|
|
5483
|
+
this.SaveFormEvent = new i0.EventEmitter;
|
|
5421
5484
|
}
|
|
5422
5485
|
Object.defineProperty(SourceControlFormComponent.prototype, "HasBuildFormControl", {
|
|
5423
5486
|
get: function () {
|
|
@@ -5444,7 +5507,6 @@
|
|
|
5444
5507
|
});
|
|
5445
5508
|
Object.defineProperty(SourceControlFormComponent.prototype, "SourceControls", {
|
|
5446
5509
|
get: function () {
|
|
5447
|
-
console.log("Environment: ", this.Environment);
|
|
5448
5510
|
return this.Environment.Sources || {};
|
|
5449
5511
|
},
|
|
5450
5512
|
enumerable: false,
|
|
@@ -5458,11 +5520,14 @@
|
|
|
5458
5520
|
console.log("sourceControlLookupChanged: ", event);
|
|
5459
5521
|
};
|
|
5460
5522
|
SourceControlFormComponent.prototype.SubmitSourceControl = function () {
|
|
5523
|
+
console.log("submitting source control: ", this.SourceControlFormGroup.value);
|
|
5524
|
+
this.SaveFormEvent.emit(this.SourceControlFormGroup.value);
|
|
5461
5525
|
};
|
|
5462
5526
|
//HELPER
|
|
5463
5527
|
SourceControlFormComponent.prototype.setupSourceControlForm = function () {
|
|
5464
5528
|
var _a, _b;
|
|
5465
5529
|
this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
|
|
5530
|
+
this.SourceControlFormGroup = this.formBldr.group({});
|
|
5466
5531
|
this.setupBuildForm();
|
|
5467
5532
|
};
|
|
5468
5533
|
SourceControlFormComponent.prototype.setupBuildForm = function () {
|
|
@@ -5475,7 +5540,7 @@
|
|
|
5475
5540
|
SourceControlFormComponent.decorators = [
|
|
5476
5541
|
{ type: i0.Component, args: [{
|
|
5477
5542
|
selector: 'lcu-source-control-form',
|
|
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>\n
|
|
5543
|
+
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",
|
|
5479
5544
|
styles: [""]
|
|
5480
5545
|
},] }
|
|
5481
5546
|
];
|
|
@@ -5485,11 +5550,12 @@
|
|
|
5485
5550
|
SourceControlFormComponent.propDecorators = {
|
|
5486
5551
|
EditingApplication: [{ type: i0.Input, args: ['editing-application',] }],
|
|
5487
5552
|
Environment: [{ type: i0.Input, args: ['environment',] }],
|
|
5488
|
-
|
|
5553
|
+
SaveFormEvent: [{ type: i0.Output, args: ['save-form-event',] }]
|
|
5489
5554
|
};
|
|
5490
5555
|
|
|
5491
5556
|
var BuildPipelineFormComponent = /** @class */ (function () {
|
|
5492
|
-
function BuildPipelineFormComponent(formBuilder, appsFlowSvc) {
|
|
5557
|
+
function BuildPipelineFormComponent(eacSvc, formBuilder, appsFlowSvc) {
|
|
5558
|
+
this.eacSvc = eacSvc;
|
|
5493
5559
|
this.formBuilder = formBuilder;
|
|
5494
5560
|
this.appsFlowSvc = appsFlowSvc;
|
|
5495
5561
|
this.HostingDetails = new ProjectHostingDetails();
|
|
@@ -5544,6 +5610,13 @@
|
|
|
5544
5610
|
enumerable: false,
|
|
5545
5611
|
configurable: true
|
|
5546
5612
|
});
|
|
5613
|
+
Object.defineProperty(BuildPipelineFormComponent.prototype, "DevOpsActionNameFormControl", {
|
|
5614
|
+
get: function () {
|
|
5615
|
+
return this.BuildPipelineFormGroup.get('devOpsActionName');
|
|
5616
|
+
},
|
|
5617
|
+
enumerable: false,
|
|
5618
|
+
configurable: true
|
|
5619
|
+
});
|
|
5547
5620
|
Object.defineProperty(BuildPipelineFormComponent.prototype, "EditingSourceControl", {
|
|
5548
5621
|
get: function () {
|
|
5549
5622
|
var _a, _b;
|
|
@@ -5556,6 +5629,13 @@
|
|
|
5556
5629
|
enumerable: false,
|
|
5557
5630
|
configurable: true
|
|
5558
5631
|
});
|
|
5632
|
+
Object.defineProperty(BuildPipelineFormComponent.prototype, "NPMTokenFormControl", {
|
|
5633
|
+
get: function () {
|
|
5634
|
+
return this.BuildPipelineFormGroup.get('npmToken');
|
|
5635
|
+
},
|
|
5636
|
+
enumerable: false,
|
|
5637
|
+
configurable: true
|
|
5638
|
+
});
|
|
5559
5639
|
Object.defineProperty(BuildPipelineFormComponent.prototype, "SelectedHostingOption", {
|
|
5560
5640
|
// (ho) => ho.Lookup === this.BuildPipeline
|
|
5561
5641
|
get: function () {
|
|
@@ -5566,6 +5646,19 @@
|
|
|
5566
5646
|
enumerable: false,
|
|
5567
5647
|
configurable: true
|
|
5568
5648
|
});
|
|
5649
|
+
Object.defineProperty(BuildPipelineFormComponent.prototype, "SelectedHostingOptionInputControlValues", {
|
|
5650
|
+
get: function () {
|
|
5651
|
+
var _this = this;
|
|
5652
|
+
var _a, _b;
|
|
5653
|
+
return (_b = (_a = this.SelectedHostingOption) === null || _a === void 0 ? void 0 : _a.Inputs) === null || _b === void 0 ? void 0 : _b.reduce(function (prev, cur) {
|
|
5654
|
+
var res = Object.assign({}, prev);
|
|
5655
|
+
res[cur.Lookup] = _this.BuildPipelineFormGroup.controls[cur.Lookup].value;
|
|
5656
|
+
return res;
|
|
5657
|
+
}, {});
|
|
5658
|
+
},
|
|
5659
|
+
enumerable: false,
|
|
5660
|
+
configurable: true
|
|
5661
|
+
});
|
|
5569
5662
|
Object.defineProperty(BuildPipelineFormComponent.prototype, "SourceControlLookups", {
|
|
5570
5663
|
get: function () {
|
|
5571
5664
|
return Object.keys(this.SourceControls || {});
|
|
@@ -5581,22 +5674,14 @@
|
|
|
5581
5674
|
configurable: true
|
|
5582
5675
|
});
|
|
5583
5676
|
BuildPipelineFormComponent.prototype.ngOnInit = function () {
|
|
5584
|
-
var _a, _b, _c;
|
|
5585
5677
|
this.BuildPipelineFormGroup = this.formBuilder.group({});
|
|
5586
|
-
this.loadProjectHostingDetails();
|
|
5587
|
-
console.log("ARTIFACT: ", this.Artifact);
|
|
5588
|
-
// this.BuildPipeline ||
|
|
5589
|
-
// github-artifacts-release is this.HostingDetails?.HostingOptions[0]?.Lookup
|
|
5590
|
-
this.BuildPipeline =
|
|
5591
|
-
((_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 : '';
|
|
5592
|
-
console.log("Build Pipeline HERE= ", this.BuildPipeline);
|
|
5593
5678
|
if (this.BuildPipelineFormGroup != null) {
|
|
5594
5679
|
this.BuildPipelineFormGroup.removeControl('hostingDetails');
|
|
5595
5680
|
}
|
|
5596
5681
|
this.BuildPipelineFormGroup.addControl('hostingDetails', this.formBuilder.group({
|
|
5597
5682
|
buildPipeline: [this.BuildPipeline, [forms.Validators.required]],
|
|
5598
5683
|
}));
|
|
5599
|
-
this.
|
|
5684
|
+
this.loadProjectHostingDetails();
|
|
5600
5685
|
};
|
|
5601
5686
|
//API METHODS
|
|
5602
5687
|
BuildPipelineFormComponent.prototype.BuildPipelineChanged = function () {
|
|
@@ -5605,18 +5690,82 @@
|
|
|
5605
5690
|
this.BuildPipeline = (_b = this.BuildPipelineFormControl) === null || _b === void 0 ? void 0 : _b.value;
|
|
5606
5691
|
this.setupControlsForForm();
|
|
5607
5692
|
};
|
|
5693
|
+
BuildPipelineFormComponent.prototype.SubmitBuildPipeline = function () {
|
|
5694
|
+
console.log("submitting build pipeline: ", this.BuildPipelineFormGroup.value);
|
|
5695
|
+
};
|
|
5696
|
+
BuildPipelineFormComponent.prototype.SaveEnvironment = function () {
|
|
5697
|
+
var _a;
|
|
5698
|
+
var saveEnvReq = {
|
|
5699
|
+
Environment: Object.assign(Object.assign({}, this.Environment), { Artifacts: this.Environment.Artifacts || {}, DevOpsActions: this.Environment.DevOpsActions || {}, Secrets: this.Environment.Secrets || {}, Sources: this.Environment.Sources || {} }),
|
|
5700
|
+
EnvironmentLookup: this.EnvironmentLookup,
|
|
5701
|
+
EnterpriseDataTokens: {},
|
|
5702
|
+
};
|
|
5703
|
+
var artifactLookup;
|
|
5704
|
+
var artifact = Object.assign(Object.assign({}, this.Artifact), this.SelectedHostingOptionInputControlValues);
|
|
5705
|
+
if (!this.ArtifactLookup) {
|
|
5706
|
+
artifactLookup = i2.Guid.CreateRaw();
|
|
5707
|
+
artifact = Object.assign(Object.assign({}, artifact), { Type: this.SelectedHostingOption
|
|
5708
|
+
.ArtifactType, Name: this.SelectedHostingOption.Name, NPMRegistry: 'https://registry.npmjs.org/' });
|
|
5709
|
+
}
|
|
5710
|
+
else {
|
|
5711
|
+
artifactLookup = this.ArtifactLookup;
|
|
5712
|
+
}
|
|
5713
|
+
saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
|
|
5714
|
+
var devOpsActionLookup;
|
|
5715
|
+
if (!this.DevOpsActionLookup) {
|
|
5716
|
+
devOpsActionLookup = i2.Guid.CreateRaw();
|
|
5717
|
+
var doa = Object.assign(Object.assign({}, this.DevOpsAction), { ArtifactLookups: [artifactLookup], Name: this.DevOpsActionNameFormControl.value, Path: this.SelectedHostingOption.Path, Templates: this.SelectedHostingOption.Templates });
|
|
5718
|
+
if ((_a = this.NPMTokenFormControl) === null || _a === void 0 ? void 0 : _a.value) {
|
|
5719
|
+
var secretLookup = 'npm-access-token';
|
|
5720
|
+
doa.SecretLookups = [secretLookup];
|
|
5721
|
+
saveEnvReq.Environment.Secrets[secretLookup] = {
|
|
5722
|
+
Name: 'NPM Access Token',
|
|
5723
|
+
DataTokenLookup: secretLookup,
|
|
5724
|
+
KnownAs: 'NPM_TOKEN',
|
|
5725
|
+
};
|
|
5726
|
+
saveEnvReq.EnterpriseDataTokens[secretLookup] = {
|
|
5727
|
+
Name: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
5728
|
+
Description: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
5729
|
+
Value: this.NPMTokenFormControl.value,
|
|
5730
|
+
};
|
|
5731
|
+
}
|
|
5732
|
+
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
5733
|
+
}
|
|
5734
|
+
else {
|
|
5735
|
+
devOpsActionLookup = this.DevOpsActionLookup;
|
|
5736
|
+
var doa = Object.assign(Object.assign({}, this.DevOpsAction), { Name: this.DevOpsActionNameFormControl.value });
|
|
5737
|
+
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
5738
|
+
}
|
|
5739
|
+
// let source: EaCSourceControl = {
|
|
5740
|
+
// ...this.EditingSourceControl,
|
|
5741
|
+
// Branches: this.SourceControlFormControls.SelectedBranches,
|
|
5742
|
+
// MainBranch: this.SourceControlFormControls.MainBranchFormControl.value,
|
|
5743
|
+
// };
|
|
5744
|
+
// source = {
|
|
5745
|
+
// ...source,
|
|
5746
|
+
// Type: 'GitHub',
|
|
5747
|
+
// Name: this.EditingSourceControlLookup,
|
|
5748
|
+
// DevOpsActionTriggerLookups: [devOpsActionLookup],
|
|
5749
|
+
// Organization:
|
|
5750
|
+
// this.SourceControlFormControls.OrganizationFormControl.value,
|
|
5751
|
+
// Repository: this.SourceControlFormControls.RepositoryFormControl.value,
|
|
5752
|
+
// };
|
|
5753
|
+
// const scLookup = `github://${source.Organization}/${source.Repository}`;
|
|
5754
|
+
// saveEnvReq.Environment.Sources[scLookup] = source;
|
|
5755
|
+
this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
|
|
5756
|
+
};
|
|
5608
5757
|
// Helpers
|
|
5609
5758
|
BuildPipelineFormComponent.prototype.setupControlsForForm = function () {
|
|
5610
5759
|
var _this = this;
|
|
5611
|
-
//for (const ctrlName in this.BuildPipelineFormGroup.controls) {
|
|
5612
|
-
//devOpsAction doesn't exist
|
|
5613
|
-
//removes hosting details
|
|
5614
|
-
// if (ctrlName !== 'buildPipeline' && ctrlName !== 'devOpsAction') {
|
|
5615
|
-
// console.log("removing control: ", ctrlName)
|
|
5616
|
-
// this.BuildPipelineFormGroup.removeControl(ctrlName);
|
|
5617
|
-
// }
|
|
5618
|
-
//}
|
|
5619
5760
|
var _a, _b, _c, _d, _e, _f;
|
|
5761
|
+
for (var ctrlName in this.BuildPipelineFormGroup.controls) {
|
|
5762
|
+
//devOpsAction doesn't exist
|
|
5763
|
+
//removes hosting details
|
|
5764
|
+
if (ctrlName !== 'buildPipeline' && ctrlName !== 'devOpsAction') {
|
|
5765
|
+
console.log("removing control: ", ctrlName);
|
|
5766
|
+
this.BuildPipelineFormGroup.removeControl(ctrlName);
|
|
5767
|
+
}
|
|
5768
|
+
}
|
|
5620
5769
|
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]));
|
|
5621
5770
|
(_d = (_c = this.SelectedHostingOption) === null || _c === void 0 ? void 0 : _c.Inputs) === null || _d === void 0 ? void 0 : _d.forEach(function (input) {
|
|
5622
5771
|
var validators = input.Required ? [forms.Validators.required] : [];
|
|
@@ -5625,9 +5774,7 @@
|
|
|
5625
5774
|
// this.FormGroup.controls[input.Lookup].disable();
|
|
5626
5775
|
// }
|
|
5627
5776
|
});
|
|
5628
|
-
debugger;
|
|
5629
5777
|
if (((_e = this.BuildPipelineFormControl) === null || _e === void 0 ? void 0 : _e.value) === 'npm-release') {
|
|
5630
|
-
debugger;
|
|
5631
5778
|
if (!this.BuildPipelineFormGroup.controls.npmToken) {
|
|
5632
5779
|
this.BuildPipelineFormGroup.addControl('npmToken', this.formBuilder.control('', this.Disabled ? [] : [forms.Validators.required]));
|
|
5633
5780
|
if (this.Disabled) {
|
|
@@ -5643,23 +5790,27 @@
|
|
|
5643
5790
|
};
|
|
5644
5791
|
BuildPipelineFormComponent.prototype.loadProjectHostingDetails = function () {
|
|
5645
5792
|
var _this = this;
|
|
5646
|
-
|
|
5793
|
+
this.HostingDetails.Loading = true;
|
|
5647
5794
|
// this.Organization,
|
|
5648
5795
|
// this.Repository,
|
|
5649
5796
|
// this.MainBranch
|
|
5650
|
-
//
|
|
5651
|
-
//
|
|
5652
|
-
//
|
|
5797
|
+
// "powhound4",
|
|
5798
|
+
// "RedwoodCrystals",
|
|
5799
|
+
// "master"
|
|
5653
5800
|
this.appsFlowSvc
|
|
5654
5801
|
.NewLoadProjectHostingDetails()
|
|
5655
5802
|
.subscribe(function (response) {
|
|
5803
|
+
var _a, _b, _c;
|
|
5656
5804
|
_this.HostingDetails = response.Model;
|
|
5657
5805
|
console.log("response: ", response);
|
|
5658
5806
|
_this.HostingDetails.Loading = false;
|
|
5807
|
+
_this.BuildPipeline =
|
|
5808
|
+
((_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 : '';
|
|
5809
|
+
console.log("Build Pipeline HERE= ", _this.BuildPipeline);
|
|
5810
|
+
_this.setupControlsForForm();
|
|
5659
5811
|
}, function (err) {
|
|
5660
|
-
_this.HostingDetails.Loading = false;
|
|
5661
|
-
console.log("hosting details LOADING EERR: ", _this.HostingDetails);
|
|
5662
5812
|
console.log("ERR: ", err);
|
|
5813
|
+
_this.HostingDetails.Loading = false;
|
|
5663
5814
|
});
|
|
5664
5815
|
console.log("HOSTING DETAILS: ", this.HostingDetails);
|
|
5665
5816
|
};
|
|
@@ -5668,11 +5819,12 @@
|
|
|
5668
5819
|
BuildPipelineFormComponent.decorators = [
|
|
5669
5820
|
{ type: i0.Component, args: [{
|
|
5670
5821
|
selector: 'lcu-build-pipeline-form',
|
|
5671
|
-
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",
|
|
5822
|
+
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",
|
|
5672
5823
|
styles: [""]
|
|
5673
5824
|
},] }
|
|
5674
5825
|
];
|
|
5675
5826
|
BuildPipelineFormComponent.ctorParameters = function () { return [
|
|
5827
|
+
{ type: EaCService },
|
|
5676
5828
|
{ type: forms.FormBuilder },
|
|
5677
5829
|
{ type: ApplicationsFlowService }
|
|
5678
5830
|
]; };
|
|
@@ -5680,18 +5832,18 @@
|
|
|
5680
5832
|
BuildPipeline: [{ type: i0.Input, args: ['build-pipeline',] }],
|
|
5681
5833
|
DevOpsActionLookup: [{ type: i0.Input, args: ['devops-action-lookup',] }],
|
|
5682
5834
|
Disabled: [{ type: i0.Input, args: ['disabled',] }],
|
|
5683
|
-
Environment: [{ type: i0.Input, args: ['environment',] }]
|
|
5835
|
+
Environment: [{ type: i0.Input, args: ['environment',] }],
|
|
5836
|
+
EnvironmentLookup: [{ type: i0.Input, args: ['environment-lookup',] }]
|
|
5684
5837
|
};
|
|
5685
5838
|
|
|
5686
5839
|
var DevopsSourceControlFormComponent = /** @class */ (function () {
|
|
5687
5840
|
// Constructors
|
|
5688
|
-
function DevopsSourceControlFormComponent(
|
|
5689
|
-
this.formBuilder = formBuilder;
|
|
5841
|
+
function DevopsSourceControlFormComponent(appsFlowSvc, eacSvc, formBuilder) {
|
|
5690
5842
|
this.appsFlowSvc = appsFlowSvc;
|
|
5691
5843
|
this.eacSvc = eacSvc;
|
|
5844
|
+
this.formBuilder = formBuilder;
|
|
5692
5845
|
this.SeparatorKeysCodes = [keycodes.ENTER, keycodes.COMMA];
|
|
5693
5846
|
this.BuildPath = null;
|
|
5694
|
-
// this.EditingSourceControlLookup = null;
|
|
5695
5847
|
this.HostingDetails = new ProjectHostingDetails();
|
|
5696
5848
|
this.SelectedBranches = [];
|
|
5697
5849
|
this.SourceControlRoot = '';
|
|
@@ -5699,7 +5851,6 @@
|
|
|
5699
5851
|
this.UseBuildPath = false;
|
|
5700
5852
|
}
|
|
5701
5853
|
Object.defineProperty(DevopsSourceControlFormComponent.prototype, "BranchesFormControl", {
|
|
5702
|
-
// Fields
|
|
5703
5854
|
// Properties
|
|
5704
5855
|
get: function () {
|
|
5705
5856
|
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
|
|
@@ -5790,12 +5941,9 @@
|
|
|
5790
5941
|
this.destroyFormControls();
|
|
5791
5942
|
};
|
|
5792
5943
|
DevopsSourceControlFormComponent.prototype.ngOnInit = function () {
|
|
5793
|
-
console.log("org: ", this.EditingSourceControl);
|
|
5794
|
-
console.log("lookup: ", this.EditingSourceControlLookup);
|
|
5795
5944
|
if (this.EditingSourceControlLookup === null) {
|
|
5796
5945
|
this.CreateNewSourceControl();
|
|
5797
5946
|
}
|
|
5798
|
-
console.log("org: ", this.EditingSourceControl);
|
|
5799
5947
|
if (this.EditingSourceControl != null) {
|
|
5800
5948
|
this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
|
|
5801
5949
|
this.setupFormControls();
|
|
@@ -5814,6 +5962,7 @@
|
|
|
5814
5962
|
this.loadProjectHostingDetails();
|
|
5815
5963
|
};
|
|
5816
5964
|
DevopsSourceControlFormComponent.prototype.BuildPathChanged = function (event) {
|
|
5965
|
+
//do something??
|
|
5817
5966
|
};
|
|
5818
5967
|
DevopsSourceControlFormComponent.prototype.CreateNewSourceControl = function () {
|
|
5819
5968
|
this.SetEditingSourceControl(i2.Guid.CreateRaw());
|
|
@@ -5890,7 +6039,7 @@
|
|
|
5890
6039
|
this.EditingSourceControlLookup = scLookup;
|
|
5891
6040
|
};
|
|
5892
6041
|
DevopsSourceControlFormComponent.prototype.SubmitSourceControl = function () {
|
|
5893
|
-
console.log("source control submitted");
|
|
6042
|
+
console.log("source control submitted: ", this.DevOpsSourceControlFormGroup.value);
|
|
5894
6043
|
};
|
|
5895
6044
|
// public SaveSourceControl(): void {
|
|
5896
6045
|
// const saveEnvReq: SaveEnvironmentAsCodeEventRequest = {
|
|
@@ -5905,23 +6054,23 @@
|
|
|
5905
6054
|
// EnterpriseDataTokens: {},
|
|
5906
6055
|
// };
|
|
5907
6056
|
// let artifactLookup: string;
|
|
5908
|
-
//
|
|
5909
|
-
//
|
|
5910
|
-
//
|
|
5911
|
-
//
|
|
5912
|
-
//
|
|
5913
|
-
// if (!this.ArtifactLookup) {
|
|
5914
|
-
//
|
|
5915
|
-
//
|
|
5916
|
-
//
|
|
5917
|
-
//
|
|
5918
|
-
//
|
|
5919
|
-
//
|
|
5920
|
-
//
|
|
5921
|
-
//
|
|
5922
|
-
// } else {
|
|
5923
|
-
//
|
|
5924
|
-
// }
|
|
6057
|
+
// let artifact: EaCArtifact = {
|
|
6058
|
+
// ...this.Artifact,
|
|
6059
|
+
// ...this.HostingDetailsFormControls
|
|
6060
|
+
// .SelectedHostingOptionInputControlValues,
|
|
6061
|
+
// };
|
|
6062
|
+
// // if (!this.ArtifactLookup) {
|
|
6063
|
+
// // artifactLookup = Guid.CreateRaw();
|
|
6064
|
+
// // artifact = {
|
|
6065
|
+
// // ...artifact,
|
|
6066
|
+
// // Type: this.HostingDetailsFormControls.SelectedHostingOption
|
|
6067
|
+
// // .ArtifactType,
|
|
6068
|
+
// // Name: this.HostingDetailsFormControls.SelectedHostingOption.Name,
|
|
6069
|
+
// // NPMRegistry: 'https://registry.npmjs.org/',
|
|
6070
|
+
// // };
|
|
6071
|
+
// // } else {
|
|
6072
|
+
// // artifactLookup = this.ArtifactLookup;
|
|
6073
|
+
// // }
|
|
5925
6074
|
// saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
|
|
5926
6075
|
// let devOpsActionLookup: string;
|
|
5927
6076
|
// if (!this.DevOpsActionLookup) {
|
|
@@ -6128,19 +6277,19 @@
|
|
|
6128
6277
|
DevopsSourceControlFormComponent.decorators = [
|
|
6129
6278
|
{ type: i0.Component, args: [{
|
|
6130
6279
|
selector: 'lcu-devops-source-control-form',
|
|
6131
|
-
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>",
|
|
6280
|
+
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>",
|
|
6132
6281
|
styles: [".form-card,.sc-card{width:100%}"]
|
|
6133
6282
|
},] }
|
|
6134
6283
|
];
|
|
6135
6284
|
DevopsSourceControlFormComponent.ctorParameters = function () { return [
|
|
6136
|
-
{ type: forms.FormBuilder },
|
|
6137
6285
|
{ type: ApplicationsFlowService },
|
|
6138
|
-
{ type: EaCService }
|
|
6286
|
+
{ type: EaCService },
|
|
6287
|
+
{ type: forms.FormBuilder }
|
|
6139
6288
|
]; };
|
|
6140
6289
|
DevopsSourceControlFormComponent.propDecorators = {
|
|
6141
|
-
BranchesInput: [{ type: i0.ViewChild, args: ['branches',] }],
|
|
6142
6290
|
EditingSourceControlLookup: [{ type: i0.Input, args: ['editing-source-control-lookup',] }],
|
|
6143
|
-
Environment: [{ type: i0.Input, args: ['environment',] }]
|
|
6291
|
+
Environment: [{ type: i0.Input, args: ['environment',] }],
|
|
6292
|
+
BranchesInput: [{ type: i0.ViewChild, args: ['branches',] }]
|
|
6144
6293
|
};
|
|
6145
6294
|
|
|
6146
6295
|
var SourceControlDialogComponent = /** @class */ (function () {
|
|
@@ -6155,7 +6304,7 @@
|
|
|
6155
6304
|
SourceControlDialogComponent.decorators = [
|
|
6156
6305
|
{ type: i0.Component, args: [{
|
|
6157
6306
|
selector: 'lcu-source-control-dialog',
|
|
6158
|
-
template: "\n<div fxLayoutAlign=\"center center\">\n<lcu-devops-source-control-form\n
|
|
6307
|
+
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>",
|
|
6159
6308
|
styles: [""]
|
|
6160
6309
|
},] }
|
|
6161
6310
|
];
|
|
@@ -6176,7 +6325,7 @@
|
|
|
6176
6325
|
BuildPipelineDialogComponent.decorators = [
|
|
6177
6326
|
{ type: i0.Component, args: [{
|
|
6178
6327
|
selector: 'lcu-build-pipeline-dialog',
|
|
6179
|
-
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
|
|
6328
|
+
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>",
|
|
6180
6329
|
styles: [""]
|
|
6181
6330
|
},] }
|
|
6182
6331
|
];
|
|
@@ -6185,6 +6334,77 @@
|
|
|
6185
6334
|
{ type: undefined, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
|
|
6186
6335
|
]; };
|
|
6187
6336
|
|
|
6337
|
+
var EditApplicationFormComponent = /** @class */ (function () {
|
|
6338
|
+
function EditApplicationFormComponent(formBldr) {
|
|
6339
|
+
this.formBldr = formBldr;
|
|
6340
|
+
this.SaveFormEvent = new i0.EventEmitter;
|
|
6341
|
+
}
|
|
6342
|
+
Object.defineProperty(EditApplicationFormComponent.prototype, "DescriptionFormControl", {
|
|
6343
|
+
get: function () {
|
|
6344
|
+
var _a;
|
|
6345
|
+
return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.description;
|
|
6346
|
+
},
|
|
6347
|
+
enumerable: false,
|
|
6348
|
+
configurable: true
|
|
6349
|
+
});
|
|
6350
|
+
Object.defineProperty(EditApplicationFormComponent.prototype, "NameFormControl", {
|
|
6351
|
+
get: function () {
|
|
6352
|
+
var _a;
|
|
6353
|
+
return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.name;
|
|
6354
|
+
},
|
|
6355
|
+
enumerable: false,
|
|
6356
|
+
configurable: true
|
|
6357
|
+
});
|
|
6358
|
+
Object.defineProperty(EditApplicationFormComponent.prototype, "RouteFormControl", {
|
|
6359
|
+
get: function () {
|
|
6360
|
+
var _a;
|
|
6361
|
+
return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.route;
|
|
6362
|
+
},
|
|
6363
|
+
enumerable: false,
|
|
6364
|
+
configurable: true
|
|
6365
|
+
});
|
|
6366
|
+
EditApplicationFormComponent.prototype.ngOnInit = function () {
|
|
6367
|
+
this.setupApplicationForm();
|
|
6368
|
+
};
|
|
6369
|
+
EditApplicationFormComponent.prototype.SubmitApplicationControl = function () {
|
|
6370
|
+
console.log("application form: ", this.ApplicationFormGroup.value);
|
|
6371
|
+
this.SaveFormEvent.emit(this.ApplicationFormGroup.value);
|
|
6372
|
+
};
|
|
6373
|
+
//HELPERS
|
|
6374
|
+
EditApplicationFormComponent.prototype.setupApplicationForm = function () {
|
|
6375
|
+
var _a, _b, _c;
|
|
6376
|
+
if (this.EditingApplication != null) {
|
|
6377
|
+
this.ApplicationFormGroup = this.formBldr.group({
|
|
6378
|
+
name: [(_a = this.EditingApplication.Application) === null || _a === void 0 ? void 0 : _a.Name, forms.Validators.required],
|
|
6379
|
+
description: [
|
|
6380
|
+
(_b = this.EditingApplication.Application) === null || _b === void 0 ? void 0 : _b.Description,
|
|
6381
|
+
forms.Validators.required,
|
|
6382
|
+
],
|
|
6383
|
+
route: [
|
|
6384
|
+
((_c = this.EditingApplication.LookupConfig) === null || _c === void 0 ? void 0 : _c.PathRegex.replace('.*', '')) ||
|
|
6385
|
+
'/',
|
|
6386
|
+
forms.Validators.required,
|
|
6387
|
+
],
|
|
6388
|
+
});
|
|
6389
|
+
}
|
|
6390
|
+
};
|
|
6391
|
+
return EditApplicationFormComponent;
|
|
6392
|
+
}());
|
|
6393
|
+
EditApplicationFormComponent.decorators = [
|
|
6394
|
+
{ type: i0.Component, args: [{
|
|
6395
|
+
selector: 'lcu-edit-application-form',
|
|
6396
|
+
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",
|
|
6397
|
+
styles: [""]
|
|
6398
|
+
},] }
|
|
6399
|
+
];
|
|
6400
|
+
EditApplicationFormComponent.ctorParameters = function () { return [
|
|
6401
|
+
{ type: forms.FormBuilder }
|
|
6402
|
+
]; };
|
|
6403
|
+
EditApplicationFormComponent.propDecorators = {
|
|
6404
|
+
EditingApplication: [{ type: i0.Input, args: ['editing-application',] }],
|
|
6405
|
+
SaveFormEvent: [{ type: i0.Output, args: ['save-form-event',] }]
|
|
6406
|
+
};
|
|
6407
|
+
|
|
6188
6408
|
var ApplicationsFlowModule = /** @class */ (function () {
|
|
6189
6409
|
function ApplicationsFlowModule() {
|
|
6190
6410
|
}
|
|
@@ -6244,7 +6464,8 @@
|
|
|
6244
6464
|
BuildPipelineFormComponent,
|
|
6245
6465
|
DevopsSourceControlFormComponent,
|
|
6246
6466
|
SourceControlDialogComponent,
|
|
6247
|
-
BuildPipelineDialogComponent
|
|
6467
|
+
BuildPipelineDialogComponent,
|
|
6468
|
+
EditApplicationFormComponent
|
|
6248
6469
|
],
|
|
6249
6470
|
imports: [
|
|
6250
6471
|
i2.FathymSharedModule,
|
|
@@ -6296,7 +6517,8 @@
|
|
|
6296
6517
|
BuildPipelineFormComponent,
|
|
6297
6518
|
DevopsSourceControlFormComponent,
|
|
6298
6519
|
SourceControlDialogComponent,
|
|
6299
|
-
BuildPipelineDialogComponent
|
|
6520
|
+
BuildPipelineDialogComponent,
|
|
6521
|
+
EditApplicationFormComponent
|
|
6300
6522
|
],
|
|
6301
6523
|
entryComponents: [
|
|
6302
6524
|
ApplicationsFlowProjectsElementComponent,
|
|
@@ -6335,7 +6557,8 @@
|
|
|
6335
6557
|
BuildPipelineFormComponent,
|
|
6336
6558
|
DevopsSourceControlFormComponent,
|
|
6337
6559
|
SourceControlDialogComponent,
|
|
6338
|
-
BuildPipelineDialogComponent
|
|
6560
|
+
BuildPipelineDialogComponent,
|
|
6561
|
+
EditApplicationFormComponent
|
|
6339
6562
|
],
|
|
6340
6563
|
},] }
|
|
6341
6564
|
];
|
|
@@ -6431,6 +6654,7 @@
|
|
|
6431
6654
|
exports.ɵbc = DevopsSourceControlFormComponent;
|
|
6432
6655
|
exports.ɵbd = SourceControlDialogComponent;
|
|
6433
6656
|
exports.ɵbe = BuildPipelineDialogComponent;
|
|
6657
|
+
exports.ɵbf = EditApplicationFormComponent;
|
|
6434
6658
|
exports.ɵc = ProjectTabsComponent;
|
|
6435
6659
|
exports.ɵd = GeneralComponent;
|
|
6436
6660
|
exports.ɵe = DomainsComponent;
|