@bizdoc/core 3.5.1 → 3.5.3

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.
@@ -9970,9 +9970,10 @@ class ComposeFormComponent {
9970
9970
  return of(false);
9971
9971
  }
9972
9972
  else if (isPromise(result))
9973
- return from(result).pipe(switchMap(() => this._save(feedback)));
9973
+ return from(result).
9974
+ pipe(switchMap(v => v ? this._save(feedback) : of(false)));
9974
9975
  else
9975
- return result.pipe(switchMap(() => this._save(feedback)));
9976
+ return result.pipe(switchMap(v => v ? this._save(feedback) : of(false)));
9976
9977
  }
9977
9978
  return this._save(feedback);
9978
9979
  }
@@ -9992,6 +9993,20 @@ class ComposeFormComponent {
9992
9993
  }
9993
9994
  submit() {
9994
9995
  this._applychanges();
9996
+ if (this._instance.onValidate) {
9997
+ const result = this._instance.onValidate();
9998
+ if (isBoolean(result)) {
9999
+ if (result === false)
10000
+ return of(false);
10001
+ }
10002
+ else if (isPromise(result))
10003
+ return from(result).pipe(switchMap(v => v ? this._submit() : of(false)));
10004
+ else
10005
+ return result.pipe(switchMap(v => v ? this._submit() : of(false)));
10006
+ }
10007
+ return this._submit();
10008
+ }
10009
+ _submit() {
9995
10010
  const { id, version, formId, model, number } = this.model;
9996
10011
  this.working = true;
9997
10012
  this.workingChange.emit(true);
@@ -12861,7 +12876,7 @@ class TaggingDirective {
12861
12876
  this._select(key, value);
12862
12877
  }
12863
12878
  evt.preventDefault();
12864
- evt.stopPropagation();
12879
+ evt.stopImmediatePropagation();
12865
12880
  }
12866
12881
  else if (key === 'Escape') {
12867
12882
  this._close();
@@ -23216,7 +23231,7 @@ let AssignActionComponent = class AssignActionComponent {
23216
23231
  this._destroy.complete();
23217
23232
  }
23218
23233
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AssignActionComponent, deps: [{ token: i1$2.FormBuilder }, { token: SessionService }, { token: AccountService }], target: i0.ɵɵFactoryTarget.Component }); }
23219
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: AssignActionComponent, isStandalone: false, selector: "ng-component", viewQueries: [{ propertyName: "nameInput", first: true, predicate: ["nameInput"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<form autocomplete=\"off\" class=\"column\" [formGroup]=\"form\">\r\n <mat-form-field>\r\n <input required [placeholder]=\"'AssignTo'|translate\"\r\n [formControl]=userId\r\n cdkFocusInitial matInput\r\n [matAutocomplete]=\"auto\">\r\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"userSelected($event)\" [displayWith]=\"displayWith\">\r\n @for (u of users$ | async; track u) {\r\n <mat-option [value]=\"u\">\r\n {{u.name}}\r\n @if (u.email) {\r\n <span>&nbsp; - {{u.email}}</span>\r\n }\r\n </mat-option>\r\n }\r\n </mat-autocomplete>\r\n @if (form.controls.userIds.hasError('required')) {\r\n <mat-error>{{'RequiredErr'|translate:('AssignTo'|translate)}}</mat-error>\r\n }\r\n </mat-form-field>\r\n <div>\r\n <mat-checkbox formControlName=fyi> {{ 'AssignFYI' | translate }}</mat-checkbox>\r\n &nbsp;\r\n <!-- <mat-checkbox formControlName=roundtrip> {{ 'AssignRoundtrip' | translate }}</mat-checkbox>-->\r\n </div>\r\n <mat-form-field>\r\n <textarea matInput cdkTextareaAutosize formControlName=\"note\" [placeholder]=\"'Note'|translate\" maxlength=\"200\">\r\n </textarea>\r\n <mat-hint align=\"end\">{{form.controls.note.value?.length || 0}} / {{200}}</mat-hint>\r\n <mat-hint>{{'AssignNoteHint'| translate}}</mat-hint>\r\n </mat-form-field>\r\n </form>\r\n", dependencies: [{ kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2$6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2$6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i2$7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i3$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i6.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "pipe", type: i9.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
23234
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: AssignActionComponent, isStandalone: false, selector: "ng-component", viewQueries: [{ propertyName: "nameInput", first: true, predicate: ["nameInput"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<form autocomplete=\"off\" class=\"column\" [formGroup]=\"form\">\r\n <mat-form-field>\r\n <input required [placeholder]=\"'AssignTo'|translate\"\r\n [formControl]=userId\r\n cdkFocusInitial matInput\r\n [matAutocomplete]=\"auto\">\r\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"userSelected($event)\" [displayWith]=\"displayWith\">\r\n @for (u of users$ | async; track u) {\r\n <mat-option [value]=\"u\">\r\n {{u.name}}\r\n @if (u.email) {\r\n <span>&nbsp; - {{u.email}}</span>\r\n }\r\n </mat-option>\r\n }\r\n </mat-autocomplete>\r\n @if (form.controls.userIds.hasError('required')) {\r\n <mat-error>{{'RequiredErr'|translate:('AssignTo'|translate)}}</mat-error>\r\n }\r\n </mat-form-field>\r\n <div>\r\n <mat-checkbox formControlName=fyi> {{ 'AssignFYI' | translate }}</mat-checkbox>\r\n &nbsp;\r\n <mat-checkbox formControlName=roundtrip> {{ 'AssignRoundtrip' | translate }}</mat-checkbox>\r\n </div>\r\n <mat-form-field>\r\n <textarea matInput cdkTextareaAutosize formControlName=\"note\" [placeholder]=\"'Note'|translate\" maxlength=\"200\">\r\n </textarea>\r\n <mat-hint align=\"end\">{{form.controls.note.value?.length || 0}} / {{200}}</mat-hint>\r\n <mat-hint>{{'AssignNoteHint'| translate}}</mat-hint>\r\n </mat-form-field>\r\n</form>\r\n", dependencies: [{ kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2$6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2$6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i2$7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i3$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i6.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "pipe", type: i9.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
23220
23235
  };
23221
23236
  AssignActionComponent = __decorate([
23222
23237
  BizDoc({
@@ -23225,7 +23240,7 @@ AssignActionComponent = __decorate([
23225
23240
  ], AssignActionComponent);
23226
23241
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AssignActionComponent, decorators: [{
23227
23242
  type: Component,
23228
- args: [{ standalone: false, template: "<form autocomplete=\"off\" class=\"column\" [formGroup]=\"form\">\r\n <mat-form-field>\r\n <input required [placeholder]=\"'AssignTo'|translate\"\r\n [formControl]=userId\r\n cdkFocusInitial matInput\r\n [matAutocomplete]=\"auto\">\r\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"userSelected($event)\" [displayWith]=\"displayWith\">\r\n @for (u of users$ | async; track u) {\r\n <mat-option [value]=\"u\">\r\n {{u.name}}\r\n @if (u.email) {\r\n <span>&nbsp; - {{u.email}}</span>\r\n }\r\n </mat-option>\r\n }\r\n </mat-autocomplete>\r\n @if (form.controls.userIds.hasError('required')) {\r\n <mat-error>{{'RequiredErr'|translate:('AssignTo'|translate)}}</mat-error>\r\n }\r\n </mat-form-field>\r\n <div>\r\n <mat-checkbox formControlName=fyi> {{ 'AssignFYI' | translate }}</mat-checkbox>\r\n &nbsp;\r\n <!-- <mat-checkbox formControlName=roundtrip> {{ 'AssignRoundtrip' | translate }}</mat-checkbox>-->\r\n </div>\r\n <mat-form-field>\r\n <textarea matInput cdkTextareaAutosize formControlName=\"note\" [placeholder]=\"'Note'|translate\" maxlength=\"200\">\r\n </textarea>\r\n <mat-hint align=\"end\">{{form.controls.note.value?.length || 0}} / {{200}}</mat-hint>\r\n <mat-hint>{{'AssignNoteHint'| translate}}</mat-hint>\r\n </mat-form-field>\r\n </form>\r\n" }]
23243
+ args: [{ standalone: false, template: "<form autocomplete=\"off\" class=\"column\" [formGroup]=\"form\">\r\n <mat-form-field>\r\n <input required [placeholder]=\"'AssignTo'|translate\"\r\n [formControl]=userId\r\n cdkFocusInitial matInput\r\n [matAutocomplete]=\"auto\">\r\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"userSelected($event)\" [displayWith]=\"displayWith\">\r\n @for (u of users$ | async; track u) {\r\n <mat-option [value]=\"u\">\r\n {{u.name}}\r\n @if (u.email) {\r\n <span>&nbsp; - {{u.email}}</span>\r\n }\r\n </mat-option>\r\n }\r\n </mat-autocomplete>\r\n @if (form.controls.userIds.hasError('required')) {\r\n <mat-error>{{'RequiredErr'|translate:('AssignTo'|translate)}}</mat-error>\r\n }\r\n </mat-form-field>\r\n <div>\r\n <mat-checkbox formControlName=fyi> {{ 'AssignFYI' | translate }}</mat-checkbox>\r\n &nbsp;\r\n <mat-checkbox formControlName=roundtrip> {{ 'AssignRoundtrip' | translate }}</mat-checkbox>\r\n </div>\r\n <mat-form-field>\r\n <textarea matInput cdkTextareaAutosize formControlName=\"note\" [placeholder]=\"'Note'|translate\" maxlength=\"200\">\r\n </textarea>\r\n <mat-hint align=\"end\">{{form.controls.note.value?.length || 0}} / {{200}}</mat-hint>\r\n <mat-hint>{{'AssignNoteHint'| translate}}</mat-hint>\r\n </mat-form-field>\r\n</form>\r\n" }]
23229
23244
  }], ctorParameters: () => [{ type: i1$2.FormBuilder }, { type: SessionService }, { type: AccountService }], propDecorators: { nameInput: [{
23230
23245
  type: ViewChild,
23231
23246
  args: ['nameInput', { static: true, read: ElementRef }]