@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.
- package/esm2020/lib/compose/action/assign-action.component.mjs +15 -7
- package/fesm2015/bizdoc-core.mjs +12 -6
- package/fesm2015/bizdoc-core.mjs.map +1 -1
- package/fesm2020/bizdoc-core.mjs +12 -6
- package/fesm2020/bizdoc-core.mjs.map +1 -1
- package/lib/compose/action/assign-action.component.d.ts +5 -2
- package/package.json +1 -1
@@ -1,9 +1,11 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
2
|
import { Component } from '@angular/core';
|
3
3
|
import { Validators } from '@angular/forms';
|
4
|
+
import { Subject } from 'rxjs';
|
4
5
|
import { filter, map, switchMap } from 'rxjs/operators';
|
5
6
|
import { isString } from '../../core/functions';
|
6
7
|
import { BizDoc } from '../../core/decorators';
|
8
|
+
import { takeUntil } from 'rxjs';
|
7
9
|
import * as i0 from "@angular/core";
|
8
10
|
import * as i1 from "@angular/forms";
|
9
11
|
import * as i2 from "../../core/session.service";
|
@@ -28,21 +30,27 @@ let AssignActionComponent = class AssignActionComponent {
|
|
28
30
|
forward: this._fb.control(false),
|
29
31
|
note: this._fb.control(null, Validators.maxLength(200))
|
30
32
|
});
|
33
|
+
this.userId = this._fb.control(null, Validators.required);
|
34
|
+
this._destroy = new Subject();
|
31
35
|
}
|
32
36
|
ngOnInit() {
|
33
37
|
const me = this._session.userId;
|
34
|
-
this.users = this.
|
35
|
-
pipe(filter(v => isString(v)), switchMap(v => this._accounts.findAll(v).
|
38
|
+
this.users = this.userId.valueChanges.
|
39
|
+
pipe(filter(v => isString(v)), takeUntil(this._destroy), switchMap(v => this._accounts.findAll(v).
|
36
40
|
pipe(map(r => r.filter(u => u.id !== me)))));
|
37
41
|
}
|
38
|
-
display(v) {
|
39
|
-
|
42
|
+
display(v) {
|
43
|
+
return v ? v.name : null;
|
44
|
+
}
|
40
45
|
change(evt) {
|
41
46
|
this.form.controls['userId'].setValue(evt.option.value.id);
|
42
47
|
}
|
48
|
+
ngOnDestroy() {
|
49
|
+
this._destroy.next();
|
50
|
+
}
|
43
51
|
};
|
44
52
|
AssignActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AssignActionComponent, deps: [{ token: i1.FormBuilder }, { token: i2.SessionService }, { token: i3.AccountService }], target: i0.ɵɵFactoryTarget.Component });
|
45
|
-
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
|
53
|
+
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: i4.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.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.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.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.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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.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: i4.MatError, selector: "mat-error", inputs: ["id"] }, { type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i11.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }], pipes: { "translate": i12.TranslatePipe, "async": i10.AsyncPipe } });
|
46
54
|
AssignActionComponent = __decorate([
|
47
55
|
BizDoc({
|
48
56
|
selector: 'bizdoc-action-assign'
|
@@ -51,6 +59,6 @@ AssignActionComponent = __decorate([
|
|
51
59
|
export { AssignActionComponent };
|
52
60
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AssignActionComponent, decorators: [{
|
53
61
|
type: Component,
|
54
|
-
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
|
62
|
+
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" }]
|
55
63
|
}], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: i2.SessionService }, { type: i3.AccountService }]; } });
|
56
|
-
//# sourceMappingURL=data:application/json;base64,
|
64
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzaWduLWFjdGlvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJyYXJpZXMvY29yZS9zcmMvbGliL2NvbXBvc2UvYWN0a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ZSB9fTwvbWF0LWNoZWNrYm94PlxyXG4gIDxtYXQtY2hlY2tib3ggZm9ybUNvbnRyb2xOYW1lPWZvcndhcmQ+IHt7ICdGb3J3YXJkJyB8IHRyYW5zbGF0ZSB9fTwvbWF0LWNoZWNrYm94PlxyXG4gIDxtYXQtZm9ybS1maWVsZD5cclxuICAgIDx0ZXh0YXJlYSBtYXRJbnB1dCBjZGtUZXh0YXJlYUF1dG9zaXplIGZvcm1Db250cm9sTmFtZT1cIm5vdGVcIiBbcGxhY2Vob2xkZXJdPVwiJ05vdGUnfHRyYW5zbGF0ZVwiIG1heGxlbmd0aD1cIjIwMFwiPlxyXG4gICAgPC90ZXh0YXJlYT5cclxuICAgIDxtYXQtaGludCBhbGlnbj1cImVuZFwiPnt7Zm9ybS5jb250cm9sc1snbm90ZSddLnZhbHVlPy5sZW5ndGggfHwgMH19IC8ge3syMDB9fTwvbWF0LWhpbnQ+XHJcbiAgPC9tYXQtZm9ybS1maWVsZD5cclxuPC9mb3JtPlxyXG4iXX0=
|
package/fesm2015/bizdoc-core.mjs
CHANGED
@@ -20223,21 +20223,27 @@ let AssignActionComponent = class AssignActionComponent {
|
|
20223
20223
|
forward: this._fb.control(false),
|
20224
20224
|
note: this._fb.control(null, Validators.maxLength(200))
|
20225
20225
|
});
|
20226
|
+
this.userId = this._fb.control(null, Validators.required);
|
20227
|
+
this._destroy = new Subject();
|
20226
20228
|
}
|
20227
20229
|
ngOnInit() {
|
20228
20230
|
const me = this._session.userId;
|
20229
|
-
this.users = this.
|
20230
|
-
pipe(filter(v => isString(v)), switchMap(v => this._accounts.findAll(v).
|
20231
|
+
this.users = this.userId.valueChanges.
|
20232
|
+
pipe(filter(v => isString(v)), takeUntil$1(this._destroy), switchMap(v => this._accounts.findAll(v).
|
20231
20233
|
pipe(map(r => r.filter(u => u.id !== me)))));
|
20232
20234
|
}
|
20233
|
-
display(v) {
|
20234
|
-
|
20235
|
+
display(v) {
|
20236
|
+
return v ? v.name : null;
|
20237
|
+
}
|
20235
20238
|
change(evt) {
|
20236
20239
|
this.form.controls['userId'].setValue(evt.option.value.id);
|
20237
20240
|
}
|
20241
|
+
ngOnDestroy() {
|
20242
|
+
this._destroy.next();
|
20243
|
+
}
|
20238
20244
|
};
|
20239
20245
|
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 });
|
20240
|
-
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
|
20246
|
+
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 } });
|
20241
20247
|
AssignActionComponent = __decorate([
|
20242
20248
|
BizDoc({
|
20243
20249
|
selector: 'bizdoc-action-assign'
|
@@ -20245,7 +20251,7 @@ AssignActionComponent = __decorate([
|
|
20245
20251
|
], AssignActionComponent);
|
20246
20252
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AssignActionComponent, decorators: [{
|
20247
20253
|
type: Component,
|
20248
|
-
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
|
20254
|
+
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" }]
|
20249
20255
|
}], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: SessionService }, { type: AccountService }]; } });
|
20250
20256
|
|
20251
20257
|
class UserNamePipe {
|