@kuzntsv/uikit 0.0.42 → 0.0.44

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.
@@ -1,7 +1,7 @@
1
1
  import { ElementRef, OnInit } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class PermitFormComponent implements OnInit {
4
- hidy: ElementRef | undefined;
4
+ hidy?: ElementRef;
5
5
  submitted: import("@angular/core").OutputEmitterRef<string>;
6
6
  mouseHandling(): void;
7
7
  ngOnInit(): void;
@@ -10,11 +10,11 @@ export declare abstract class BaseEditClass<T> implements OnDestroy {
10
10
  /** Заголовок. */
11
11
  abstract title: string;
12
12
  /** Данные диалога. */
13
- protected abstract dialogData: IEditDialogData<T> | undefined;
13
+ protected abstract dialogData?: IEditDialogData<T>;
14
14
  /** Форма. */
15
- abstract form: FormGroup | undefined;
15
+ abstract form?: FormGroup;
16
16
  /** Ссылка на диалог. */
17
- protected abstract dialogRef: MatDialogRef<any, IEditDialogData<T> | null> | undefined;
17
+ protected abstract dialogRef?: MatDialogRef<any, IEditDialogData<T> | null>;
18
18
  /** Сервис индиатор загрузки. */
19
19
  protected loaderService: LoaderService;
20
20
  /** Сервис уведослений. */
@@ -1,8 +1,12 @@
1
+ import { OnDestroy } from "@angular/core";
1
2
  import { MatMenuTrigger } from "@angular/material/menu";
2
3
  import { Router } from "@angular/router";
4
+ import { Subscription } from "rxjs";
3
5
  import * as i0 from "@angular/core";
4
- export declare class BaseNavBarMenuClass {
5
- router: Router;
6
+ export declare class BaseNavBarMenuClass implements OnDestroy {
7
+ protected subscription: Subscription;
8
+ protected router: Router;
9
+ ngOnDestroy(): void;
6
10
  /** Нажата средняя кнопка (открыть ссылку в новой вкладке). */
7
11
  onMiddleClick(event: PointerEvent, baseUrl: string, menu: MatMenuTrigger): void;
8
12
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseNavBarMenuClass, never>;
@@ -23,7 +23,7 @@ export declare class BasePageClass<T> implements OnDestroy {
23
23
  extraData?: any;
24
24
  defaultPageIndex: number;
25
25
  defaultPageSize: number;
26
- dialog: MatDialog | undefined;
26
+ dialog?: MatDialog;
27
27
  dialogEditWidth: string;
28
28
  dialogRemoveWidth: string;
29
29
  routeAddress: string;
@@ -1012,7 +1012,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
1012
1012
  }], ctorParameters: () => [] });
1013
1013
 
1014
1014
  class BaseNavBarMenuClass {
1015
+ subscription = new Subscription();
1015
1016
  router = inject(Router);
1017
+ ngOnDestroy() {
1018
+ if (this.subscription)
1019
+ this.subscription.unsubscribe();
1020
+ }
1016
1021
  /** Нажата средняя кнопка (открыть ссылку в новой вкладке). */
1017
1022
  onMiddleClick(event, baseUrl, menu) {
1018
1023
  // 1 - Auxiliary button pressed (usually the middle button)
@@ -1795,18 +1800,17 @@ var DialogAction;
1795
1800
  DialogAction["None"] = "";
1796
1801
  })(DialogAction || (DialogAction = {}));
1797
1802
 
1798
- class NavBarComponent {
1803
+ class NavBarComponent extends BaseNavBarMenuClass {
1799
1804
  loggedIn$;
1800
1805
  roles$;
1801
1806
  fioUser = '';
1802
1807
  photoURL = '';
1803
- subscription = new Subscription();
1804
1808
  authService = inject(AuthService);
1805
- router = inject(Router);
1806
1809
  userService = inject(UserService);
1807
1810
  avatarService = inject(AvatarService);
1808
1811
  dialog = inject(MatDialog);
1809
1812
  constructor() {
1813
+ super();
1810
1814
  this.loggedIn$ = this.authService.loggedIn$;
1811
1815
  this.roles$ = this.authService.roles$;
1812
1816
  this.fioUser = '';
@@ -1834,10 +1838,6 @@ class NavBarComponent {
1834
1838
  });
1835
1839
  this.subscription.add(subs);
1836
1840
  }
1837
- ngOnDestroy() {
1838
- if (this.subscription)
1839
- this.subscription.unsubscribe();
1840
- }
1841
1841
  logout() {
1842
1842
  this.authService.logout(this.router.url);
1843
1843
  }
@@ -1860,7 +1860,7 @@ class NavBarComponent {
1860
1860
  this.subscription.add(subs);
1861
1861
  }
1862
1862
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NavBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1863
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: NavBarComponent, isStandalone: true, selector: "ngx-uik-navbar", ngImport: i0, template: "@if (loggedIn$ | async) {\r\n <nav class=\"ngx-uik-navbar-header\">\r\n \r\n <ng-content></ng-content>\r\n\r\n <div class=\"flex-spacer\"></div>\r\n \r\n @if ((loggedIn$ | async) === false || !photoURL) {\r\n <mat-icon [matTooltip]=\"(roles$ | async)?.join(',')||''\">account_circle</mat-icon>\r\n }\r\n @if ((loggedIn$ | async) && photoURL) {\r\n <img\r\n class=\"user-photo\"\r\n [src]=\"photoURL | safe\"\r\n loading=\"lazy\"\r\n [alt]=\"fioUser\"\r\n [matTooltip]=\"(roles$ | async)?.join(',')||''\">\r\n }\r\n\r\n <span class = \"user-name\" [matTooltip]=\"(roles$ | async)?.join(',') || ''\">\r\n {{ fioUser }}\r\n </span>\r\n\r\n <a mat-button class=\"pm-button\" (click)=\"openDialog()\">\u0412\u044B\u0439\u0442\u0438 <mat-icon>logout</mat-icon></a>\r\n </nav>\r\n}", styles: [".ngx-uik-navbar-header{display:flex;flex-wrap:wrap;align-items:center;padding:8px 16px}.flex-spacer{flex-grow:1}.user-name{margin-left:8px;line-height:1rem;white-space:normal}.user-photo{border-radius:50%;width:32px;height:32px;margin-right:10px}.mat-mdc-button{color:#fff!important;padding-left:16px!important;padding-right:16px!important}.mdc-button{letter-spacing:normal}\n"], dependencies: [{ kind: "component", type: MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: SafePipe, name: "safe" }] });
1863
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: NavBarComponent, isStandalone: true, selector: "ngx-uik-navbar", usesInheritance: true, ngImport: i0, template: "@if (loggedIn$ | async) {\r\n <nav class=\"ngx-uik-navbar-header\">\r\n \r\n <ng-content></ng-content>\r\n\r\n <div class=\"flex-spacer\"></div>\r\n \r\n @if ((loggedIn$ | async) === false || !photoURL) {\r\n <mat-icon [matTooltip]=\"(roles$ | async)?.join(',')||''\">account_circle</mat-icon>\r\n }\r\n @if ((loggedIn$ | async) && photoURL) {\r\n <img\r\n class=\"user-photo\"\r\n [src]=\"photoURL | safe\"\r\n loading=\"lazy\"\r\n [alt]=\"fioUser\"\r\n [matTooltip]=\"(roles$ | async)?.join(',')||''\">\r\n }\r\n\r\n <span class = \"user-name\" [matTooltip]=\"(roles$ | async)?.join(',') || ''\">\r\n {{ fioUser }}\r\n </span>\r\n\r\n <a mat-button class=\"pm-button\" (click)=\"openDialog()\">\u0412\u044B\u0439\u0442\u0438 <mat-icon>logout</mat-icon></a>\r\n </nav>\r\n}", styles: [".ngx-uik-navbar-header{display:flex;flex-wrap:wrap;align-items:center;padding:8px 16px}.flex-spacer{flex-grow:1}.user-name{margin-left:8px;line-height:1rem;white-space:normal}.user-photo{border-radius:50%;width:32px;height:32px;margin-right:10px}.mat-mdc-button{color:#fff!important;padding-left:16px!important;padding-right:16px!important}.mdc-button{letter-spacing:normal}\n"], dependencies: [{ kind: "component", type: MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: SafePipe, name: "safe" }] });
1864
1864
  }
1865
1865
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NavBarComponent, decorators: [{
1866
1866
  type: Component,