@lowcodeunit/applications-flow-common 1.39.40-hardening-bugs → 1.39.42-hardening-bugs

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.
@@ -5593,6 +5593,8 @@ class EditApplicationFormComponent {
5593
5593
  this.eacSvc = eacSvc;
5594
5594
  this.SaveFormEvent = new EventEmitter();
5595
5595
  this.HasSaveButton = true;
5596
+ this.RouteRegex =
5597
+ '(^/{1}([A-Za-z0-9_-]*)$)|(^(/{1}([A-Za-z0-9_-]+)((/{1})([A-Za-z0-9_-]+))*)$)';
5596
5598
  }
5597
5599
  get DescriptionFormControl() {
5598
5600
  return this.ApplicationFormGroup?.controls.description;
@@ -5640,28 +5642,43 @@ class EditApplicationFormComponent {
5640
5642
  Application: app,
5641
5643
  ApplicationLookup: this.ApplicationLookup,
5642
5644
  };
5643
- console.log('processor details being submitted: ', app.Processor);
5645
+ // console.log('processor details being submitted: ', app.Processor);
5644
5646
  this.eacSvc.SaveApplicationAsCode(saveAppReq).then((res) => {
5645
5647
  this.SaveFormEvent.emit(res);
5646
5648
  });
5647
5649
  }
5650
+ VerifyRoute() {
5651
+ // console.log("route: ", this.ApplicationFormGroup.controls.route);
5652
+ let regEx = new RegExp(this.RouteRegex);
5653
+ if (!regEx.test(this.ApplicationFormGroup.controls.route.value)) {
5654
+ // console.log("INVALID");
5655
+ this.RouteError = 'Route Has Invalid Syntax.';
5656
+ }
5657
+ else {
5658
+ // console.log("VALID")
5659
+ this.RouteError = null;
5660
+ }
5661
+ }
5648
5662
  //HELPERS
5649
5663
  setupApplicationForm() {
5650
5664
  if (this.EditingApplication != null) {
5651
5665
  this.ApplicationFormGroup = this.formBldr.group({
5652
5666
  name: [
5653
- this.EditingApplication.Application?.Name,
5667
+ this.EditingApplication?.Application?.Name,
5654
5668
  Validators.required,
5655
5669
  ],
5656
5670
  description: [
5657
- this.EditingApplication.Application?.Description,
5671
+ this.EditingApplication?.Application?.Description,
5658
5672
  Validators.required,
5659
5673
  ],
5660
5674
  route: [
5661
5675
  this.CurrentRoute
5662
5676
  ? this.CurrentRoute
5663
- : this.EditingApplication.LookupConfig?.PathRegex.replace('.*', '') || '/',
5664
- Validators.required,
5677
+ : this.EditingApplication?.LookupConfig?.PathRegex.replace('.*', '') || '/',
5678
+ Validators.compose([
5679
+ Validators.required,
5680
+ Validators.pattern(this.RouteRegex),
5681
+ ]),
5665
5682
  ],
5666
5683
  // priority: [
5667
5684
  // this.EditingApplication.Application?.Priority || 10000,
@@ -5672,10 +5689,10 @@ class EditApplicationFormComponent {
5672
5689
  }
5673
5690
  }
5674
5691
  EditApplicationFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationFormComponent, deps: [{ token: i1$1.FormBuilder }, { token: EaCService }], target: i0.ɵɵFactoryTarget.Component });
5675
- EditApplicationFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: EditApplicationFormComponent, selector: "lcu-edit-application-form", inputs: { ApplicationLookup: ["application-lookup", "ApplicationLookup"], CurrentRoute: ["current-route", "CurrentRoute"], IsDisabled: ["is-disabled", "IsDisabled"], EditingApplication: ["editing-application", "EditingApplication"], HasSaveButton: ["has-save-button", "HasSaveButton"], ProjectLookup: ["project-lookup", "ProjectLookup"], Loading: ["loading", "Loading"] }, outputs: { SaveFormEvent: "save-form-event" }, usesOnChanges: true, ngImport: i0, template: "<form\n class=\"form-card\"\n [formGroup]=\"ApplicationFormGroup\"\n (ngSubmit)=\"SubmitApplicationControl()\"\n>\n <!-- <mat-card class=\"spread flow-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title>\n <ng-container *ngIf=\"EditingApplication?.Application\">\n Edit Application:\n {{ EditingApplication.Application?.Name }}\n </ng-container>\n\n <ng-container *ngIf=\"!EditingApplication?.Application\">\n Create an Application\n </ng-container>\n </mat-card-title>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n <ng-container *ngIf=\"Loading\">\n <skeleton-block class=\"s-block\" effect=\"wave\"></skeleton-block>\n\n <skeleton-block class=\"s-block\" effect=\"wave\"></skeleton-block>\n\n <skeleton-block class=\"s-block\" effect=\"wave\"></skeleton-block>\n </ng-container>\n\n <ng-container *ngIf=\"!Loading\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Name\"\n formControlName=\"name\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <textarea\n matInput\n placeholder=\"Description\"\n formControlName=\"description\"\n rows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Route\"\n formControlName=\"route\"\n required\n />\n </mat-form-field>\n </ng-container>\n\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n *ngIf=\"HasSaveButton && !Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ApplicationFormGroup.valid || !ApplicationFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save\n </button>\n <lcu-loader *ngIf=\"HasSaveButton\" [loading]=\"Loading\"></lcu-loader>\n \n </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>\n", styles: [".s-block{margin:10px 0;width:100%;height:40px}\n"], components: [{ type: i3$1.SkeletonBlockComponent, selector: "skeleton-block", inputs: ["width", "height", "effect", "borderRadius"] }, { type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }] });
5692
+ EditApplicationFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: EditApplicationFormComponent, selector: "lcu-edit-application-form", inputs: { ApplicationLookup: ["application-lookup", "ApplicationLookup"], CurrentRoute: ["current-route", "CurrentRoute"], IsDisabled: ["is-disabled", "IsDisabled"], EditingApplication: ["editing-application", "EditingApplication"], HasSaveButton: ["has-save-button", "HasSaveButton"], ProjectLookup: ["project-lookup", "ProjectLookup"], Loading: ["loading", "Loading"] }, outputs: { SaveFormEvent: "save-form-event" }, usesOnChanges: true, ngImport: i0, template: "<form\n class=\"form-card\"\n [formGroup]=\"ApplicationFormGroup\"\n (ngSubmit)=\"SubmitApplicationControl()\"\n>\n <!-- <mat-card class=\"spread flow-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title>\n <ng-container *ngIf=\"EditingApplication?.Application\">\n Edit Application:\n {{ EditingApplication.Application?.Name }}\n </ng-container>\n\n <ng-container *ngIf=\"!EditingApplication?.Application\">\n Create an Application\n </ng-container>\n </mat-card-title>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n <ng-container *ngIf=\"Loading\">\n <skeleton-block class=\"s-block\" effect=\"wave\"></skeleton-block>\n\n <skeleton-block class=\"s-block\" effect=\"wave\"></skeleton-block>\n\n <skeleton-block class=\"s-block\" effect=\"wave\"></skeleton-block>\n </ng-container>\n\n <ng-container *ngIf=\"!Loading\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Name\"\n formControlName=\"name\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <textarea\n matInput\n placeholder=\"Description\"\n formControlName=\"description\"\n rows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Route\"\n formControlName=\"route\"\n (keyup)=\"VerifyRoute($event)\"\n required\n />\n </mat-form-field>\n <mat-error *ngIf=\"RouteError\">{{ RouteError }}</mat-error>\n </ng-container>\n\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n *ngIf=\"HasSaveButton && !Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ApplicationFormGroup.valid || !ApplicationFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save\n </button>\n <lcu-loader *ngIf=\"HasSaveButton\" [loading]=\"Loading\"></lcu-loader>\n \n </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>\n", styles: [".s-block{margin:10px 0;width:100%;height:40px}\n"], components: [{ type: i3$1.SkeletonBlockComponent, selector: "skeleton-block", inputs: ["width", "height", "effect", "borderRadius"] }, { type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4.MatError, selector: "mat-error", inputs: ["id"] }] });
5676
5693
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: EditApplicationFormComponent, decorators: [{
5677
5694
  type: Component,
5678
- args: [{ selector: 'lcu-edit-application-form', template: "<form\n class=\"form-card\"\n [formGroup]=\"ApplicationFormGroup\"\n (ngSubmit)=\"SubmitApplicationControl()\"\n>\n <!-- <mat-card class=\"spread flow-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title>\n <ng-container *ngIf=\"EditingApplication?.Application\">\n Edit Application:\n {{ EditingApplication.Application?.Name }}\n </ng-container>\n\n <ng-container *ngIf=\"!EditingApplication?.Application\">\n Create an Application\n </ng-container>\n </mat-card-title>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n <ng-container *ngIf=\"Loading\">\n <skeleton-block class=\"s-block\" effect=\"wave\"></skeleton-block>\n\n <skeleton-block class=\"s-block\" effect=\"wave\"></skeleton-block>\n\n <skeleton-block class=\"s-block\" effect=\"wave\"></skeleton-block>\n </ng-container>\n\n <ng-container *ngIf=\"!Loading\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Name\"\n formControlName=\"name\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <textarea\n matInput\n placeholder=\"Description\"\n formControlName=\"description\"\n rows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Route\"\n formControlName=\"route\"\n required\n />\n </mat-form-field>\n </ng-container>\n\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n *ngIf=\"HasSaveButton && !Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ApplicationFormGroup.valid || !ApplicationFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save\n </button>\n <lcu-loader *ngIf=\"HasSaveButton\" [loading]=\"Loading\"></lcu-loader>\n \n </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>\n", styles: [".s-block{margin:10px 0;width:100%;height:40px}\n"] }]
5695
+ args: [{ selector: 'lcu-edit-application-form', template: "<form\n class=\"form-card\"\n [formGroup]=\"ApplicationFormGroup\"\n (ngSubmit)=\"SubmitApplicationControl()\"\n>\n <!-- <mat-card class=\"spread flow-card\"> -->\n <!-- <mat-card-header>\n <mat-card-title>\n <ng-container *ngIf=\"EditingApplication?.Application\">\n Edit Application:\n {{ EditingApplication.Application?.Name }}\n </ng-container>\n\n <ng-container *ngIf=\"!EditingApplication?.Application\">\n Create an Application\n </ng-container>\n </mat-card-title>\n </mat-card-header> -->\n\n <!-- <mat-card-content> -->\n <ng-container *ngIf=\"Loading\">\n <skeleton-block class=\"s-block\" effect=\"wave\"></skeleton-block>\n\n <skeleton-block class=\"s-block\" effect=\"wave\"></skeleton-block>\n\n <skeleton-block class=\"s-block\" effect=\"wave\"></skeleton-block>\n </ng-container>\n\n <ng-container *ngIf=\"!Loading\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Name\"\n formControlName=\"name\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <textarea\n matInput\n placeholder=\"Description\"\n formControlName=\"description\"\n rows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Route\"\n formControlName=\"route\"\n (keyup)=\"VerifyRoute($event)\"\n required\n />\n </mat-form-field>\n <mat-error *ngIf=\"RouteError\">{{ RouteError }}</mat-error>\n </ng-container>\n\n <!-- </mat-card-content> -->\n <!-- <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n *ngIf=\"HasSaveButton && !Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ApplicationFormGroup.valid || !ApplicationFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save\n </button>\n <lcu-loader *ngIf=\"HasSaveButton\" [loading]=\"Loading\"></lcu-loader>\n \n </mat-card-actions> -->\n <!-- </mat-card> -->\n</form>\n", styles: [".s-block{margin:10px 0;width:100%;height:40px}\n"] }]
5679
5696
  }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: EaCService }]; }, propDecorators: { ApplicationLookup: [{
5680
5697
  type: Input,
5681
5698
  args: ['application-lookup']