@bizdoc/core 1.12.2 → 1.12.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.
@@ -20097,21 +20097,27 @@ let AssignActionComponent = class AssignActionComponent {
20097
20097
  forward: this._fb.control(false),
20098
20098
  note: this._fb.control(null, Validators.maxLength(200))
20099
20099
  });
20100
+ this.userId = this._fb.control(null, Validators.required);
20101
+ this._destroy = new Subject();
20100
20102
  }
20101
20103
  ngOnInit() {
20102
20104
  const me = this._session.userId;
20103
- this.users = this.form.controls['userId'].valueChanges.
20104
- pipe(filter(v => isString(v)), switchMap(v => this._accounts.findAll(v).
20105
+ this.users = this.userId.valueChanges.
20106
+ pipe(filter(v => isString(v)), takeUntil$1(this._destroy), switchMap(v => this._accounts.findAll(v).
20105
20107
  pipe(map(r => r.filter(u => u.id !== me)))));
20106
20108
  }
20107
- display(v) { return v ? v.name : null; }
20108
- ;
20109
+ display(v) {
20110
+ return v ? v.name : null;
20111
+ }
20109
20112
  change(evt) {
20110
20113
  this.form.controls['userId'].setValue(evt.option.value.id);
20111
20114
  }
20115
+ ngOnDestroy() {
20116
+ this._destroy.next();
20117
+ }
20112
20118
  };
20113
20119
  AssignActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AssignActionComponent, deps: [{ token: i1$2.FormBuilder }, { token: SessionService }, { token: AccountService }], target: i0.ɵɵFactoryTarget.Component });
20114
- AssignActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AssignActionComponent, selector: "ng-component", ngImport: i0, template: "<form autocomplete=\"off\" fxLayout=\"column\" [formGroup]=\"form\">\r\n <mat-form-field>\r\n <input matInput type=\"search\" [matAutocomplete]=\"auto\" cdkFocusInitial [placeholder]=\"'User'|translate\" required formControlName=userId/>\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"display\"\r\n (optionSelected)=\"change($event)\">\r\n <mat-option *ngFor=\"let u of users | async\" [value]=\"u\">{{u.name}}</mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"form.controls.userId.hasError('required')\">{{'Required'|translate:('User'|translate)}}</mat-error>\r\n </mat-form-field>\r\n <mat-checkbox formControlName=fyi> {{ 'FYI' | translate }}</mat-checkbox>\r\n <mat-checkbox formControlName=forward> {{ 'Forward' | translate }}</mat-checkbox>\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-form-field>\r\n</form>\r\n", components: [{ type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { 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]" }, { type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.MatError, selector: "mat-error", inputs: ["id"] }, { type: i11.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i1$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }], pipes: { "translate": TranslatePipe, "async": i10.AsyncPipe } });
20120
+ AssignActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AssignActionComponent, selector: "ng-component", ngImport: i0, template: "<form autocomplete=\"off\" fxLayout=\"column\" [formGroup]=\"form\">\r\n <mat-form-field>\r\n <input matInput type=\"search\" [matAutocomplete]=\"auto\" cdkFocusInitial [placeholder]=\"'User'|translate\" required [formControl]=\"userId\"/> \r\n <mat-autocomplete #auto=\"matAutocomplete\"\r\n [displayWith]=\"display\"\r\n (optionSelected)=\"change($event)\">\r\n <mat-option *ngFor=\"let u of users | async\" [value]=\"u\">{{u.name}}</mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"form.controls.userId.hasError('required')\">{{'Required'|translate:('User'|translate)}}</mat-error>\r\n </mat-form-field>\r\n <mat-checkbox formControlName=fyi> {{ 'FYI' | translate }}</mat-checkbox>\r\n <mat-checkbox formControlName=forward> {{ 'Forward' | translate }}</mat-checkbox>\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-form-field>\r\n</form>\r\n", components: [{ type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { 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]" }, { type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.MatError, selector: "mat-error", inputs: ["id"] }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i11.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i1$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }], pipes: { "translate": TranslatePipe, "async": i10.AsyncPipe } });
20115
20121
  AssignActionComponent = __decorate([
20116
20122
  BizDoc({
20117
20123
  selector: 'bizdoc-action-assign'
@@ -20119,7 +20125,7 @@ AssignActionComponent = __decorate([
20119
20125
  ], AssignActionComponent);
20120
20126
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AssignActionComponent, decorators: [{
20121
20127
  type: Component,
20122
- args: [{ template: "<form autocomplete=\"off\" fxLayout=\"column\" [formGroup]=\"form\">\r\n <mat-form-field>\r\n <input matInput type=\"search\" [matAutocomplete]=\"auto\" cdkFocusInitial [placeholder]=\"'User'|translate\" required formControlName=userId/>\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"display\"\r\n (optionSelected)=\"change($event)\">\r\n <mat-option *ngFor=\"let u of users | async\" [value]=\"u\">{{u.name}}</mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"form.controls.userId.hasError('required')\">{{'Required'|translate:('User'|translate)}}</mat-error>\r\n </mat-form-field>\r\n <mat-checkbox formControlName=fyi> {{ 'FYI' | translate }}</mat-checkbox>\r\n <mat-checkbox formControlName=forward> {{ 'Forward' | translate }}</mat-checkbox>\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-form-field>\r\n</form>\r\n" }]
20128
+ args: [{ template: "<form autocomplete=\"off\" fxLayout=\"column\" [formGroup]=\"form\">\r\n <mat-form-field>\r\n <input matInput type=\"search\" [matAutocomplete]=\"auto\" cdkFocusInitial [placeholder]=\"'User'|translate\" required [formControl]=\"userId\"/> \r\n <mat-autocomplete #auto=\"matAutocomplete\"\r\n [displayWith]=\"display\"\r\n (optionSelected)=\"change($event)\">\r\n <mat-option *ngFor=\"let u of users | async\" [value]=\"u\">{{u.name}}</mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"form.controls.userId.hasError('required')\">{{'Required'|translate:('User'|translate)}}</mat-error>\r\n </mat-form-field>\r\n <mat-checkbox formControlName=fyi> {{ 'FYI' | translate }}</mat-checkbox>\r\n <mat-checkbox formControlName=forward> {{ 'Forward' | translate }}</mat-checkbox>\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-form-field>\r\n</form>\r\n" }]
20123
20129
  }], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: SessionService }, { type: AccountService }]; } });
20124
20130
 
20125
20131
  class UserNamePipe {