@kuzntsv/uikit 0.0.21 → 0.0.22
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/base/base-toolbar/components/base-toolbar.component.d.ts +1 -1
- package/fesm2022/kuzntsv-uikit.mjs +30 -35
- package/fesm2022/kuzntsv-uikit.mjs.map +1 -1
- package/package.json +1 -1
- package/shared/date-range-input/date-range-input.component.d.ts +1 -1
- package/shared/select-autocomplete-with-vs/select-autocomplete-with-vs.component.d.ts +1 -1
|
@@ -48,7 +48,7 @@ export declare class BaseToolbarComponent implements OnDestroy {
|
|
|
48
48
|
clickedClearBtn: EventEmitter<any>;
|
|
49
49
|
protected authService: AuthService;
|
|
50
50
|
userRoles: string[];
|
|
51
|
-
subscription: Subscription
|
|
51
|
+
subscription: Subscription;
|
|
52
52
|
constructor();
|
|
53
53
|
ngOnDestroy(): void;
|
|
54
54
|
isShow(roles: string[]): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, HostListener, Output, ViewChild, Component, Input, Injectable, ChangeDetectionStrategy, Directive, inject, Inject, Pipe, input, output, effect
|
|
2
|
+
import { EventEmitter, HostListener, Output, ViewChild, Component, Input, Injectable, ChangeDetectionStrategy, Directive, inject, Inject, Pipe, input, output, effect } from '@angular/core';
|
|
3
3
|
import { MatCard, MatCardHeader, MatCardTitle, MatCardContent } from '@angular/material/card';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
5
5
|
import { FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
@@ -833,12 +833,13 @@ class BaseToolbarComponent {
|
|
|
833
833
|
// DI
|
|
834
834
|
authService = inject(AuthService);
|
|
835
835
|
userRoles = [];
|
|
836
|
-
subscription;
|
|
836
|
+
subscription = new Subscription();
|
|
837
837
|
constructor() {
|
|
838
838
|
// получить права пользователя
|
|
839
|
-
|
|
839
|
+
const subs = this.authService.roles$.subscribe((userRoles) => {
|
|
840
840
|
this.userRoles = userRoles;
|
|
841
841
|
});
|
|
842
|
+
this.subscription.add(subs);
|
|
842
843
|
}
|
|
843
844
|
ngOnDestroy() {
|
|
844
845
|
if (this.subscription)
|
|
@@ -983,9 +984,8 @@ class BaseEditClass {
|
|
|
983
984
|
form;
|
|
984
985
|
dialogRef;
|
|
985
986
|
/** Объект для отписки (вызывается метод unsubscribe при уничтожннии компонента). */
|
|
986
|
-
subscription;
|
|
987
|
+
subscription = new Subscription();
|
|
987
988
|
constructor() {
|
|
988
|
-
this.subscription = new Subscription();
|
|
989
989
|
}
|
|
990
990
|
ngOnDestroy() {
|
|
991
991
|
this.subscription.unsubscribe();
|
|
@@ -1031,9 +1031,8 @@ class BaseFilterClass {
|
|
|
1031
1031
|
// eslint-disable-next-line no-magic-numbers
|
|
1032
1032
|
defaultDebounceTime = 500;
|
|
1033
1033
|
/** Объект для отписки (вызывается метод unsubscribe при уничтожннии компонента). */
|
|
1034
|
-
subscription;
|
|
1034
|
+
subscription = new Subscription();
|
|
1035
1035
|
constructor() {
|
|
1036
|
-
this.subscription = new Subscription();
|
|
1037
1036
|
}
|
|
1038
1037
|
ngOnDestroy() {
|
|
1039
1038
|
this.subscription.unsubscribe();
|
|
@@ -1275,7 +1274,7 @@ class BasePageClass {
|
|
|
1275
1274
|
router = inject(Router);
|
|
1276
1275
|
localStorage = inject(LocalStorageService);
|
|
1277
1276
|
/** Объект для отписки (вызывается метод unsubscribe при уничтожннии компонента). */
|
|
1278
|
-
subscription;
|
|
1277
|
+
subscription = new Subscription();
|
|
1279
1278
|
constructor() {
|
|
1280
1279
|
this.tableState = {
|
|
1281
1280
|
sortActive: this.localStorage.getData(this.constructor.name + 'SortActive') || '',
|
|
@@ -1283,7 +1282,6 @@ class BasePageClass {
|
|
|
1283
1282
|
pageIndex: Number(this.localStorage.getData(this.constructor.name + 'PageIndex')) || this.defaultPageIndex,
|
|
1284
1283
|
pageSize: Number(this.localStorage.getData(this.constructor.name + 'PageSize')) || this.defaultPageSize
|
|
1285
1284
|
};
|
|
1286
|
-
this.subscription = new Subscription();
|
|
1287
1285
|
}
|
|
1288
1286
|
ngOnDestroy() {
|
|
1289
1287
|
this.subscription.unsubscribe();
|
|
@@ -1793,9 +1791,8 @@ class BaseMatChipComponent {
|
|
|
1793
1791
|
selectedItems = [];
|
|
1794
1792
|
// Все элементы
|
|
1795
1793
|
items = [];
|
|
1796
|
-
subscription;
|
|
1794
|
+
subscription = new Subscription();
|
|
1797
1795
|
constructor() {
|
|
1798
|
-
this.subscription = new Subscription();
|
|
1799
1796
|
}
|
|
1800
1797
|
ngOnInit() {
|
|
1801
1798
|
const subs = this.items$.subscribe(data => {
|
|
@@ -1893,7 +1890,7 @@ class DateRangeInputComponent {
|
|
|
1893
1890
|
required = input(false);
|
|
1894
1891
|
dateRangeChange = output();
|
|
1895
1892
|
form;
|
|
1896
|
-
subscription;
|
|
1893
|
+
subscription = new Subscription();
|
|
1897
1894
|
constructor() {
|
|
1898
1895
|
this.form = new FormGroup({
|
|
1899
1896
|
begin: new FormControl(),
|
|
@@ -1977,7 +1974,7 @@ class NavBarComponent {
|
|
|
1977
1974
|
roles$;
|
|
1978
1975
|
fioUser = '';
|
|
1979
1976
|
photoURL = '';
|
|
1980
|
-
subscription;
|
|
1977
|
+
subscription = new Subscription();
|
|
1981
1978
|
constructor(authService, userService, avatarService, dialog, router) {
|
|
1982
1979
|
this.authService = authService;
|
|
1983
1980
|
this.avatarService = avatarService;
|
|
@@ -1986,7 +1983,7 @@ class NavBarComponent {
|
|
|
1986
1983
|
this.loggedIn$ = this.authService.loggedIn$;
|
|
1987
1984
|
this.roles$ = this.authService.roles$;
|
|
1988
1985
|
this.fioUser = '';
|
|
1989
|
-
|
|
1986
|
+
const subs = this.loggedIn$.subscribe({
|
|
1990
1987
|
next: (value) => {
|
|
1991
1988
|
if (value) {
|
|
1992
1989
|
if (userService.userData) {
|
|
@@ -2008,6 +2005,7 @@ class NavBarComponent {
|
|
|
2008
2005
|
}
|
|
2009
2006
|
}
|
|
2010
2007
|
});
|
|
2008
|
+
this.subscription.add(subs);
|
|
2011
2009
|
}
|
|
2012
2010
|
ngOnDestroy() {
|
|
2013
2011
|
if (this.subscription)
|
|
@@ -2076,17 +2074,16 @@ class BaseSelectAutocompleteWithVsComponent {
|
|
|
2076
2074
|
// input элемент
|
|
2077
2075
|
inputCtrl = new FormControl();
|
|
2078
2076
|
// отфильтрованные (отображаемые) элементы
|
|
2079
|
-
filteredItems =
|
|
2080
|
-
subscription;
|
|
2077
|
+
filteredItems = [];
|
|
2078
|
+
subscription = new Subscription();
|
|
2081
2079
|
constructor() {
|
|
2082
|
-
this.subscription = new Subscription();
|
|
2083
2080
|
effect(() => {
|
|
2084
2081
|
this.inputCtrl.setValue(this.selectedItem());
|
|
2085
2082
|
});
|
|
2086
2083
|
effect(() => {
|
|
2087
2084
|
console.log('ITEMS$ data', this.items());
|
|
2088
2085
|
console.log('onLoad: this.selectedItem$.value =', this.selectedItem());
|
|
2089
|
-
this.filteredItems
|
|
2086
|
+
this.filteredItems = this.items();
|
|
2090
2087
|
if (this.selectedItem())
|
|
2091
2088
|
this.inputCtrl.setValue(this.selectedItem());
|
|
2092
2089
|
// if (this.items.length > 0) {
|
|
@@ -2110,39 +2107,37 @@ class BaseSelectAutocompleteWithVsComponent {
|
|
|
2110
2107
|
map((value) => {
|
|
2111
2108
|
// Filter the options
|
|
2112
2109
|
if (typeof value === 'undefined') {
|
|
2113
|
-
this.filteredItems
|
|
2110
|
+
this.filteredItems = this.items();
|
|
2114
2111
|
}
|
|
2115
2112
|
else {
|
|
2116
2113
|
if (typeof value !== 'object') {
|
|
2117
2114
|
console.log('v1=', value);
|
|
2118
|
-
this.filteredItems
|
|
2119
|
-
.toLowerCase()
|
|
2120
|
-
.includes(value.toLowerCase())));
|
|
2115
|
+
this.filteredItems = this.items()
|
|
2116
|
+
.filter(option => option.viewValue.toLowerCase().includes(value.toLowerCase()));
|
|
2121
2117
|
}
|
|
2122
2118
|
else {
|
|
2123
2119
|
// typeof value === 'object'
|
|
2124
2120
|
console.log('v2=', value);
|
|
2125
2121
|
if (value) {
|
|
2126
2122
|
// this.predmet = value;
|
|
2127
|
-
this.filteredItems
|
|
2128
|
-
.toLowerCase()
|
|
2129
|
-
.includes(value.viewValue.toLowerCase())));
|
|
2123
|
+
this.filteredItems = this.items()
|
|
2124
|
+
.filter((option) => option.viewValue.toLowerCase().includes(value.viewValue.toLowerCase()));
|
|
2130
2125
|
}
|
|
2131
2126
|
else {
|
|
2132
|
-
this.filteredItems
|
|
2127
|
+
this.filteredItems = this.items();
|
|
2133
2128
|
}
|
|
2134
2129
|
}
|
|
2135
2130
|
}
|
|
2136
2131
|
// Recompute how big the viewport should be.
|
|
2137
2132
|
// eslint-disable-next-line no-magic-numbers
|
|
2138
|
-
if (this.filteredItems
|
|
2133
|
+
if (this.filteredItems.length < 4) {
|
|
2139
2134
|
// eslint-disable-next-line no-magic-numbers
|
|
2140
|
-
this.height = this.filteredItems
|
|
2135
|
+
this.height = this.filteredItems.length * 50 + 'px';
|
|
2141
2136
|
}
|
|
2142
2137
|
else {
|
|
2143
2138
|
this.height = '200px';
|
|
2144
2139
|
}
|
|
2145
|
-
console.log('update filteredItems$.value=', this.filteredItems
|
|
2140
|
+
console.log('update filteredItems$.value=', this.filteredItems);
|
|
2146
2141
|
}))
|
|
2147
2142
|
.subscribe();
|
|
2148
2143
|
this.subscription.add(subs3);
|
|
@@ -2172,12 +2167,12 @@ class BaseSelectAutocompleteWithVsComponent {
|
|
|
2172
2167
|
: null;
|
|
2173
2168
|
}
|
|
2174
2169
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: BaseSelectAutocompleteWithVsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2175
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: BaseSelectAutocompleteWithVsComponent, isStandalone: true, selector: "ngx-uik-select-autocomplete-with-vs", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, selectedItem: { classPropertyName: "selectedItem", publicName: "selectedItem", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, isVisible: { classPropertyName: "isVisible", publicName: "isVisible", isSignal: true, isRequired: false, transformFunction: null }, isRequired: { classPropertyName: "isRequired", publicName: "isRequired", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedItemChange: "selectedItemChange" }, ngImport: i0, template: "@if (isVisible()) {\r\n <mat-form-field [style.width.px]=\"width()\">\r\n <mat-label>{{ title() }}</mat-label>\r\n <input type=\"text\"\r\n [placeholder]=title()\r\n aria-label=\"Number\"\r\n matInput\r\n (ngModelChange)=\"onSelectedItemChange($event)\"\r\n [formControl]=\"inputCtrl\"\r\n [matAutocomplete]=\"auto\"\r\n [required]=\"isRequired() ? 'required' : ''\"\r\n >\r\n @if (!isDisabled && selectedItem()) {\r\n <button mat-button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"onClearClick($event)\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayWithFn\" showPanel=\"true\">\r\n <cdk-virtual-scroll-viewport class=\"autocomplete-test-viewport\" [style.height]=\"height\" itemSize=\"25\">\r\n <mat-option *cdkVirtualFor=\"let option of filteredItems
|
|
2170
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: BaseSelectAutocompleteWithVsComponent, isStandalone: true, selector: "ngx-uik-select-autocomplete-with-vs", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, selectedItem: { classPropertyName: "selectedItem", publicName: "selectedItem", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, isVisible: { classPropertyName: "isVisible", publicName: "isVisible", isSignal: true, isRequired: false, transformFunction: null }, isRequired: { classPropertyName: "isRequired", publicName: "isRequired", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedItemChange: "selectedItemChange" }, ngImport: i0, template: "@if (isVisible()) {\r\n <mat-form-field [style.width.px]=\"width()\">\r\n <mat-label>{{ title() }}</mat-label>\r\n <input type=\"text\"\r\n [placeholder]=title()\r\n aria-label=\"Number\"\r\n matInput\r\n (ngModelChange)=\"onSelectedItemChange($event)\"\r\n [formControl]=\"inputCtrl\"\r\n [matAutocomplete]=\"auto\"\r\n [required]=\"isRequired() ? 'required' : ''\"\r\n >\r\n @if (!isDisabled && selectedItem()) {\r\n <button mat-button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"onClearClick($event)\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayWithFn\" showPanel=\"true\">\r\n <cdk-virtual-scroll-viewport class=\"autocomplete-test-viewport\" [style.height]=\"height\" itemSize=\"25\">\r\n <mat-option *cdkVirtualFor=\"let option of filteredItems\" [value]=\"option\" class=\"autocomplete-item\">\r\n {{option.viewValue}}\r\n </mat-option>\r\n </cdk-virtual-scroll-viewport>\r\n </mat-autocomplete>\r\n @if (inputCtrl.invalid) {\r\n <mat-error>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 {{title()}}</mat-error>\r\n }\r\n @if (!inputCtrl.value) {\r\n <mat-hint>\u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u0432\u0432\u043E\u0434\u0438\u0442\u044C ...</mat-hint>\r\n }\r\n </mat-form-field>\r\n}", styles: ["mat-form-field{margin-right:12px}.autocomplete-item{height:50px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", 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]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$1.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: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i4$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i4$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i4$1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: 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: MatLabel, selector: "mat-label" }] });
|
|
2176
2171
|
}
|
|
2177
2172
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: BaseSelectAutocompleteWithVsComponent, decorators: [{
|
|
2178
2173
|
type: Component,
|
|
2179
2174
|
args: [{ selector: 'ngx-uik-select-autocomplete-with-vs', imports: [FormsModule, ReactiveFormsModule, MatAutocompleteModule, MatHint, MatError, MatOption, MatIcon,
|
|
2180
|
-
MatFormField, ScrollingModule, MatInput, MatLabel], template: "@if (isVisible()) {\r\n <mat-form-field [style.width.px]=\"width()\">\r\n <mat-label>{{ title() }}</mat-label>\r\n <input type=\"text\"\r\n [placeholder]=title()\r\n aria-label=\"Number\"\r\n matInput\r\n (ngModelChange)=\"onSelectedItemChange($event)\"\r\n [formControl]=\"inputCtrl\"\r\n [matAutocomplete]=\"auto\"\r\n [required]=\"isRequired() ? 'required' : ''\"\r\n >\r\n @if (!isDisabled && selectedItem()) {\r\n <button mat-button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"onClearClick($event)\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayWithFn\" showPanel=\"true\">\r\n <cdk-virtual-scroll-viewport class=\"autocomplete-test-viewport\" [style.height]=\"height\" itemSize=\"25\">\r\n <mat-option *cdkVirtualFor=\"let option of filteredItems
|
|
2175
|
+
MatFormField, ScrollingModule, MatInput, MatLabel], template: "@if (isVisible()) {\r\n <mat-form-field [style.width.px]=\"width()\">\r\n <mat-label>{{ title() }}</mat-label>\r\n <input type=\"text\"\r\n [placeholder]=title()\r\n aria-label=\"Number\"\r\n matInput\r\n (ngModelChange)=\"onSelectedItemChange($event)\"\r\n [formControl]=\"inputCtrl\"\r\n [matAutocomplete]=\"auto\"\r\n [required]=\"isRequired() ? 'required' : ''\"\r\n >\r\n @if (!isDisabled && selectedItem()) {\r\n <button mat-button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"onClearClick($event)\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayWithFn\" showPanel=\"true\">\r\n <cdk-virtual-scroll-viewport class=\"autocomplete-test-viewport\" [style.height]=\"height\" itemSize=\"25\">\r\n <mat-option *cdkVirtualFor=\"let option of filteredItems\" [value]=\"option\" class=\"autocomplete-item\">\r\n {{option.viewValue}}\r\n </mat-option>\r\n </cdk-virtual-scroll-viewport>\r\n </mat-autocomplete>\r\n @if (inputCtrl.invalid) {\r\n <mat-error>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 {{title()}}</mat-error>\r\n }\r\n @if (!inputCtrl.value) {\r\n <mat-hint>\u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u0432\u0432\u043E\u0434\u0438\u0442\u044C ...</mat-hint>\r\n }\r\n </mat-form-field>\r\n}", styles: ["mat-form-field{margin-right:12px}.autocomplete-item{height:50px}\n"] }]
|
|
2181
2176
|
}], ctorParameters: () => [] });
|
|
2182
2177
|
|
|
2183
2178
|
class BaseSelectWithGroupComponent {
|
|
@@ -2191,9 +2186,8 @@ class BaseSelectWithGroupComponent {
|
|
|
2191
2186
|
selectedItemsChange = new EventEmitter();
|
|
2192
2187
|
separatorKeysCodes = [ENTER, COMMA];
|
|
2193
2188
|
control = new FormControl([]);
|
|
2194
|
-
subscription;
|
|
2189
|
+
subscription = new Subscription();
|
|
2195
2190
|
constructor() {
|
|
2196
|
-
this.subscription = new Subscription();
|
|
2197
2191
|
}
|
|
2198
2192
|
ngOnInit() {
|
|
2199
2193
|
this.groups$.subscribe(data => {
|
|
@@ -2282,12 +2276,13 @@ class TableComponent {
|
|
|
2282
2276
|
authService = inject(AuthService);
|
|
2283
2277
|
// Разрешено ли отправлять событие rowDoubleClicked при двойном щелчке мышью.
|
|
2284
2278
|
dblClickedEventEnable = true;
|
|
2285
|
-
subscription;
|
|
2279
|
+
subscription = new Subscription();
|
|
2286
2280
|
constructor() {
|
|
2287
2281
|
// получить права пользователя
|
|
2288
|
-
|
|
2282
|
+
const subs = this.authService.roles$.subscribe((userRoles) => {
|
|
2289
2283
|
this.dblClickedEventEnable = !this.authService.isHideElement(this.rolesDblClickedEvent, userRoles);
|
|
2290
2284
|
});
|
|
2285
|
+
this.subscription.add(subs);
|
|
2291
2286
|
}
|
|
2292
2287
|
ngOnInit() {
|
|
2293
2288
|
this.displayedColumns = ['select'].concat(this.columnOptions?.filter(c => !c.hide).map((item) => item.name) || []);
|