@kuzntsv/uikit 0.0.1

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.
Files changed (100) hide show
  1. package/README.md +63 -0
  2. package/assets/_navbar-theme.scss +25 -0
  3. package/auth/auth.types.d.ts +1 -0
  4. package/auth/directives/disable-if-role.directive.d.ts +12 -0
  5. package/auth/directives/disable-if-unauthorized.directive.d.ts +13 -0
  6. package/auth/directives/hide-if-role-not.directive.d.ts +12 -0
  7. package/auth/directives/hide-if-unauthorized.directive.d.ts +13 -0
  8. package/auth/directives/index.d.ts +4 -0
  9. package/auth/index.d.ts +4 -0
  10. package/auth/login-form.component.d.ts +16 -0
  11. package/auth/login-page.component.d.ts +29 -0
  12. package/auth/models/user.d.ts +7 -0
  13. package/auth/permit-form.component.d.ts +18 -0
  14. package/auth/services/auth-guard.service.d.ts +2 -0
  15. package/auth/services/auth-role.service.d.ts +10 -0
  16. package/auth/services/auth-user.service.d.ts +35 -0
  17. package/auth/services/auth.service.d.ts +44 -0
  18. package/auth/services/index.d.ts +5 -0
  19. package/auth/services/role-guard.service.d.ts +2 -0
  20. package/base/base-classes/base-class.d.ts +3 -0
  21. package/base/base-classes/base-edit-class.d.ts +17 -0
  22. package/base/base-classes/base-edit-dialog-data.d.ts +9 -0
  23. package/base/base-classes/base-entity-action.d.ts +10 -0
  24. package/base/base-classes/base-filter-class.d.ts +7 -0
  25. package/base/base-classes/base-nav-bar-menu-class.d.ts +11 -0
  26. package/base/base-classes/base-page-class.d.ts +117 -0
  27. package/base/base-classes/base-service-class.d.ts +23 -0
  28. package/base/base-classes/index.d.ts +8 -0
  29. package/base/base-toolbar/base-toolbar.service.d.ts +7 -0
  30. package/base/base-toolbar/components/base-toolbar.component.d.ts +67 -0
  31. package/base/index.d.ts +2 -0
  32. package/base/interfaces/alert-service.interface.d.ts +44 -0
  33. package/base/interfaces/index.d.ts +1 -0
  34. package/core/animations/animations.service.d.ts +10 -0
  35. package/core/animations/index.d.ts +2 -0
  36. package/core/animations/route.animations.d.ts +6 -0
  37. package/core/index.d.ts +1 -0
  38. package/fesm2022/kuzntsv-uikit.mjs +2540 -0
  39. package/fesm2022/kuzntsv-uikit.mjs.map +1 -0
  40. package/guards/index.d.ts +1 -0
  41. package/guards/redirect-guard.d.ts +8 -0
  42. package/index.d.ts +5 -0
  43. package/loader/index.d.ts +2 -0
  44. package/loader/loader.service.d.ts +11 -0
  45. package/loader/progress-spinner.component.d.ts +9 -0
  46. package/models/deserializable.model.d.ts +3 -0
  47. package/models/environment.model.d.ts +12 -0
  48. package/models/index.d.ts +3 -0
  49. package/models/sec-user-view.model.d.ts +16 -0
  50. package/models/sec-user.model.d.ts +12 -0
  51. package/package.json +23 -0
  52. package/pipes/index.d.ts +3 -0
  53. package/pipes/safe.pipe.d.ts +10 -0
  54. package/pipes/time.pipe.d.ts +7 -0
  55. package/pipes/truncate.pipe.d.ts +7 -0
  56. package/public-api.d.ts +10 -0
  57. package/services/alert.service.d.ts +16 -0
  58. package/services/avatar.service.d.ts +11 -0
  59. package/services/export.service.d.ts +9 -0
  60. package/services/index.d.ts +4 -0
  61. package/services/local-storage-service.d.ts +10 -0
  62. package/services/log.service.d.ts +10 -0
  63. package/shared/chip-input-autocomplete/chip-input-autocomplete.component.d.ts +28 -0
  64. package/shared/chip-input-autocomplete/index.d.ts +2 -0
  65. package/shared/chip-input-autocomplete/models/chip-item.d.ts +4 -0
  66. package/shared/chip-input-autocomplete/models/index.d.ts +1 -0
  67. package/shared/date-range-filter/date-range-filter.component.d.ts +22 -0
  68. package/shared/date-range-filter/index.d.ts +2 -0
  69. package/shared/date-range-filter/models/date-formats.d.ts +11 -0
  70. package/shared/date-range-filter/models/date-range.d.ts +5 -0
  71. package/shared/date-range-filter/models/index.d.ts +2 -0
  72. package/shared/dialog/dialog.component.d.ts +11 -0
  73. package/shared/dialog/index.d.ts +2 -0
  74. package/shared/dialog/models/dialog-action.d.ts +6 -0
  75. package/shared/dialog/models/dialog-data.d.ts +7 -0
  76. package/shared/dialog/models/index.d.ts +2 -0
  77. package/shared/index.d.ts +9 -0
  78. package/shared/logo/imz-logo.component.d.ts +5 -0
  79. package/shared/logo/index.d.ts +1 -0
  80. package/shared/navbar/index.d.ts +1 -0
  81. package/shared/navbar/navbar.d.ts +24 -0
  82. package/shared/not-found/index.d.ts +1 -0
  83. package/shared/not-found/not-found.component.d.ts +6 -0
  84. package/shared/select-autocomplete-with-virtual-scroll/index.d.ts +1 -0
  85. package/shared/select-autocomplete-with-virtual-scroll/models/index.d.ts +1 -0
  86. package/shared/select-autocomplete-with-virtual-scroll/models/select-item.d.ts +4 -0
  87. package/shared/select-autocomplete-with-virtual-scroll/select-autocomplete-with-virtual-scroll.component.d.ts +27 -0
  88. package/shared/select-with-group/index.d.ts +2 -0
  89. package/shared/select-with-group/models/index.d.ts +2 -0
  90. package/shared/select-with-group/models/select-group.d.ts +5 -0
  91. package/shared/select-with-group/models/select-item.d.ts +4 -0
  92. package/shared/select-with-group/select-with-group.component.d.ts +21 -0
  93. package/shared/table/index.d.ts +3 -0
  94. package/shared/table/models/column-options.interface.d.ts +26 -0
  95. package/shared/table/models/context-menu-options.interface.d.ts +22 -0
  96. package/shared/table/models/index.d.ts +2 -0
  97. package/shared/table/table.component.d.ts +75 -0
  98. package/shared/table/table.state.d.ts +11 -0
  99. package/types/index.d.ts +1 -0
  100. package/types/types.d.ts +6 -0
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # Uikit
2
+
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
8
+
9
+ ```bash
10
+ ng generate component component-name
11
+ ```
12
+
13
+ For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
14
+
15
+ ```bash
16
+ ng generate --help
17
+ ```
18
+
19
+ ## Building
20
+
21
+ To build the library, run:
22
+
23
+ ```bash
24
+ ng build uikit
25
+ ```
26
+
27
+ This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28
+
29
+ ### Publishing the Library
30
+
31
+ Once the project is built, you can publish your library by following these steps:
32
+
33
+ 1. Navigate to the `dist` directory:
34
+ ```bash
35
+ cd dist/uikit
36
+ ```
37
+
38
+ 2. Run the `npm publish` command to publish your library to the npm registry:
39
+ ```bash
40
+ npm publish
41
+ ```
42
+
43
+ ## Running unit tests
44
+
45
+ To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
46
+
47
+ ```bash
48
+ ng test
49
+ ```
50
+
51
+ ## Running end-to-end tests
52
+
53
+ For end-to-end (e2e) testing, run:
54
+
55
+ ```bash
56
+ ng e2e
57
+ ```
58
+
59
+ Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
60
+
61
+ ## Additional Resources
62
+
63
+ For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
@@ -0,0 +1,25 @@
1
+ @use '@angular/material' as mat;
2
+
3
+ @mixin nav-bar-theme($theme) {
4
+ $primary: mat.get-theme-color($theme, primary);
5
+ $accent: mat.get-theme-color($theme, accent);
6
+ $warn: mat.get-theme-color($theme, warn);
7
+ $background: mat.get-theme-color($theme, background);
8
+ $foreground: mat.get-theme-color($theme, foreground);
9
+
10
+ lib-navbar {
11
+ color: white;
12
+
13
+ .lib-navbar, .lib-navbar-header {
14
+ background: $primary;
15
+ }
16
+
17
+ ///* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */
18
+ //.mat-mdc-select-arrow, .mat-mdc-select-value, .mat-mdc-select-trigger, .mat-mdc-form-field-underline, .mat-mdc-form-field-label {
19
+ // color: mat-color($primary, default-contrast) !important;
20
+ // background: mat-color($primary) !important;
21
+ //}
22
+ }
23
+
24
+
25
+ }
@@ -0,0 +1 @@
1
+ export type AuthPermission = 'VIEW' | 'EDIT' | 'CREATE' | 'DELETE';
@@ -0,0 +1,12 @@
1
+ import { OnInit, ElementRef } from '@angular/core';
2
+ import { AuthService } from '../services/auth.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DisableIfRoleDirective implements OnInit {
5
+ private el;
6
+ private authService;
7
+ role: string;
8
+ constructor(el: ElementRef, authService: AuthService);
9
+ ngOnInit(): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<DisableIfRoleDirective, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DisableIfRoleDirective, "[libDisableIfRole]", never, { "role": { "alias": "libDisableIfRole"; "required": false; }; }, {}, never, never, true, never>;
12
+ }
@@ -0,0 +1,13 @@
1
+ import { OnInit, ElementRef } from '@angular/core';
2
+ import { AuthPermission } from '../auth.types';
3
+ import { AuthService } from '../services/auth.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class DisableIfUnauthorizedDirective implements OnInit {
6
+ private el;
7
+ private authservice;
8
+ permission: AuthPermission | undefined;
9
+ constructor(el: ElementRef, authservice: AuthService);
10
+ ngOnInit(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<DisableIfUnauthorizedDirective, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DisableIfUnauthorizedDirective, "[libDisableIfUnauthorized]", never, { "permission": { "alias": "libDisableIfUnauthorized"; "required": false; }; }, {}, never, never, true, never>;
13
+ }
@@ -0,0 +1,12 @@
1
+ import { OnInit, ElementRef } from '@angular/core';
2
+ import { AuthService } from '../services/auth.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class HideIfRoleNotDirective implements OnInit {
5
+ private el;
6
+ private authService;
7
+ roles: string[];
8
+ constructor(el: ElementRef, authService: AuthService);
9
+ ngOnInit(): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<HideIfRoleNotDirective, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HideIfRoleNotDirective, "[libHideIfRoleNot]", never, { "roles": { "alias": "libHideIfRoleNot"; "required": false; }; }, {}, never, never, true, never>;
12
+ }
@@ -0,0 +1,13 @@
1
+ import { OnInit, ElementRef } from '@angular/core';
2
+ import { AuthService } from '../services/auth.service';
3
+ import { AuthPermission } from '../auth.types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class HideIfUnauthorizedDirective implements OnInit {
6
+ private el;
7
+ private authService;
8
+ permission: AuthPermission | undefined;
9
+ constructor(el: ElementRef, authService: AuthService);
10
+ ngOnInit(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<HideIfUnauthorizedDirective, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HideIfUnauthorizedDirective, "[libHideIfUnauthorized]", never, { "permission": { "alias": "libHideIfUnauthorized"; "required": false; }; }, {}, never, never, true, never>;
13
+ }
@@ -0,0 +1,4 @@
1
+ export * from './disable-if-unauthorized.directive';
2
+ export * from './hide-if-unauthorized.directive';
3
+ export * from './disable-if-role.directive';
4
+ export * from './hide-if-role-not.directive';
@@ -0,0 +1,4 @@
1
+ export * from './login-page.component';
2
+ export * from './auth.types';
3
+ export * from './directives';
4
+ export * from './services';
@@ -0,0 +1,16 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
3
+ import { Authenticate } from './models/user';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LoginFormComponent {
6
+ errorMessage: string;
7
+ submitted: EventEmitter<Authenticate>;
8
+ hide: boolean;
9
+ form: FormGroup;
10
+ isDisabled: boolean;
11
+ constructor();
12
+ set pending(isPending: boolean);
13
+ submit(): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoginFormComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoginFormComponent, "lib-login-form", never, { "errorMessage": { "alias": "errorMessage"; "required": false; }; "pending": { "alias": "pending"; "required": false; }; }, { "submitted": "submitted"; }, never, never, true, never>;
16
+ }
@@ -0,0 +1,29 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { ActivatedRoute } from '@angular/router';
3
+ import { Subscription } from 'rxjs';
4
+ import { LoaderService } from '../loader';
5
+ import { Authenticate } from './models/user';
6
+ import { AuthService } from './services/auth.service';
7
+ import * as i0 from "@angular/core";
8
+ export declare class LoginPageComponent implements OnInit, OnDestroy {
9
+ private authService;
10
+ private route;
11
+ private loaderService;
12
+ pending: boolean;
13
+ error: string;
14
+ isKiosk: boolean;
15
+ /** Идентификатор АС */
16
+ idCas: number;
17
+ /** Подписка на Идентификатор АС */
18
+ sub: Subscription;
19
+ /** Url страницы, с которой был переход (после входа вернет на неё) */
20
+ returnUrl: string;
21
+ constructor(authService: AuthService, route: ActivatedRoute, loaderService: LoaderService);
22
+ ngOnInit(): void;
23
+ ngOnDestroy(): void;
24
+ onSubmitError(): () => void;
25
+ onSubmit($event: Authenticate): void;
26
+ onSubmitPermit($event: string): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoginPageComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoginPageComponent, "lib-login-page", never, {}, {}, never, never, true, never>;
29
+ }
@@ -0,0 +1,7 @@
1
+ export interface Authenticate {
2
+ username: string;
3
+ password: string;
4
+ }
5
+ export interface User {
6
+ name: string;
7
+ }
@@ -0,0 +1,18 @@
1
+ import { ElementRef, EventEmitter, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class PermitFormComponent implements OnInit {
4
+ hidy: ElementRef | undefined;
5
+ submitted: EventEmitter<string>;
6
+ private mouseEvent;
7
+ constructor();
8
+ mouseHandling(): void;
9
+ ngOnInit(): void;
10
+ /**
11
+ * Поле ввода
12
+ *
13
+ * @param событие нажатия на клавишу
14
+ */
15
+ onKeydown(event: any): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<PermitFormComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<PermitFormComponent, "lib-permit-form", never, {}, { "submitted": "submitted"; }, never, never, true, never>;
18
+ }
@@ -0,0 +1,2 @@
1
+ import { CanActivateFn } from '@angular/router';
2
+ export declare const authGuard: CanActivateFn;
@@ -0,0 +1,10 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RoleService {
4
+ private http;
5
+ baseRoute: string;
6
+ constructor(http: HttpClient);
7
+ getRoles(): import("rxjs").Observable<Object>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<RoleService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<RoleService>;
10
+ }
@@ -0,0 +1,35 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * Сущность пользователя из API
4
+ */
5
+ export declare class User {
6
+ id: number;
7
+ username: string;
8
+ firstName: string;
9
+ lastName: string;
10
+ prof: string;
11
+ depart: number;
12
+ area: string;
13
+ tabnum: string;
14
+ mail: string;
15
+ phone: string;
16
+ roles: string;
17
+ rolesArray: string[];
18
+ roleList: string[];
19
+ idHuman: string;
20
+ token: string;
21
+ expires_in: number;
22
+ }
23
+ export declare class UserService {
24
+ private user;
25
+ constructor();
26
+ get dept(): number;
27
+ /** Получить данные о пользователе */
28
+ get userData(): User;
29
+ /** Изменить данные пользователя в localStorage */
30
+ set userData(user: User);
31
+ /** Удаляет данные о пользователе из localStorage. */
32
+ removeUser(): void;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
34
+ static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
35
+ }
@@ -0,0 +1,44 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Router } from '@angular/router';
3
+ import { BehaviorSubject } from 'rxjs';
4
+ import { AlertService } from '../../services/alert.service';
5
+ import { LogService } from '../../services/log.service';
6
+ import { AuthPermission } from '../auth.types';
7
+ import { UserService } from './auth-user.service';
8
+ import * as i0 from "@angular/core";
9
+ export declare class AuthService {
10
+ private http;
11
+ private router;
12
+ private console;
13
+ private alertService;
14
+ private user;
15
+ baseRoute: string;
16
+ permissions: string[];
17
+ readonly defaultRoles: never[];
18
+ roles$: BehaviorSubject<string[]>;
19
+ loggedIn$: BehaviorSubject<boolean>;
20
+ private readonly hideRole;
21
+ private readonly defaultHeader;
22
+ private idHuman;
23
+ constructor(http: HttpClient, router: Router, console: LogService, alertService: AlertService, user: UserService);
24
+ /** Проверка разрешений */
25
+ hasPermission(authPermission: AuthPermission): boolean;
26
+ /** Проверка ролей */
27
+ hasRole(roles: string[], checkRole: string): boolean;
28
+ /** Проверка массива ролей */
29
+ hasRoles(roles: string[], checkRoles: string[]): boolean;
30
+ /** Элемент скрывается, если у пользователя нет ни одной роли из перереданных в "roles"
31
+ или в списке "roles" есть роль "hideRole". */
32
+ isHideElement(roles: string[], checkRoles: string[]): boolean;
33
+ /** Запрос авторизации */
34
+ login(username: string, password: string, idCas: number, returnUrl: string | undefined, onErrorFn: () => void): void;
35
+ /** Aвторизация по пропуску */
36
+ loginByPermit(permit: string, idCas: number, returnUrl?: string): import("rxjs").Subscription;
37
+ /** Разлогиниться */
38
+ logout(returnUrl?: string): void;
39
+ private getRoles;
40
+ /** При успешной авторизации */
41
+ private successLoginAction;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
43
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
44
+ }
@@ -0,0 +1,5 @@
1
+ export * from './auth-guard.service';
2
+ export * from './auth.service';
3
+ export * from './role-guard.service';
4
+ export * from './auth-role.service';
5
+ export * from './auth-user.service';
@@ -0,0 +1,2 @@
1
+ import { CanActivateFn } from '@angular/router';
2
+ export declare const roleGuard: CanActivateFn;
@@ -0,0 +1,3 @@
1
+ export interface BaseClass {
2
+ id: number;
3
+ }
@@ -0,0 +1,17 @@
1
+ import { FormGroup } from "@angular/forms";
2
+ import { MatDialogRef } from "@angular/material/dialog";
3
+ import { IEditDialogData } from "./base-edit-dialog-data";
4
+ import * as i0 from "@angular/core";
5
+ export declare class BaseEditClass<T> {
6
+ title: string;
7
+ dialogData: IEditDialogData<T> | undefined;
8
+ form: FormGroup | undefined;
9
+ dialogRef: MatDialogRef<any, IEditDialogData<T> | null> | undefined;
10
+ constructor();
11
+ onNoClick(event: PointerEvent): void;
12
+ onSubmit(): void;
13
+ formActionIsAdd(): boolean;
14
+ formActionIsEdit(): boolean;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseEditClass<any>, never>;
16
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseEditClass<any>, never, never, {}, {}, never, never, true, never>;
17
+ }
@@ -0,0 +1,9 @@
1
+ export interface IEditDialogData<T, K = any> {
2
+ action: Action;
3
+ entity: T;
4
+ extraData?: K;
5
+ }
6
+ export declare enum Action {
7
+ Add = "\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435",
8
+ Edit = "\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435"
9
+ }
@@ -0,0 +1,10 @@
1
+ export interface IEntityAction<T> {
2
+ action: EntityAction;
3
+ entity: T;
4
+ }
5
+ export declare enum EntityAction {
6
+ Init = "\u0418\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F",
7
+ Add = "\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435",
8
+ Edit = "\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435",
9
+ Delete = "\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435"
10
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class BaseFilterClass {
3
+ defaultDebounceTime: number;
4
+ constructor();
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseFilterClass, never>;
6
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFilterClass, never, never, {}, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,11 @@
1
+ import { MatMenuTrigger } from "@angular/material/menu";
2
+ import { Router } from "@angular/router";
3
+ import * as i0 from "@angular/core";
4
+ export declare class BaseNavBarMenuClass {
5
+ router: Router;
6
+ constructor();
7
+ /** Нажата средняя кнопка (открыть ссылку в новой вкладке). */
8
+ onMiddleClick(event: PointerEvent, baseUrl: string, menu: MatMenuTrigger): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseNavBarMenuClass, never>;
10
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseNavBarMenuClass, never, never, {}, {}, never, never, true, never>;
11
+ }
@@ -0,0 +1,117 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import { MatDialog, MatDialogRef } from '@angular/material/dialog';
3
+ import { MatMenuTrigger } from '@angular/material/menu';
4
+ import { Router } from '@angular/router';
5
+ import { BehaviorSubject, Subject, Subscription } from 'rxjs';
6
+ import { LocalStorageService } from '../../services/local-storage-service';
7
+ import { DialogComponent } from '../../shared/dialog/dialog.component';
8
+ import { IContextMenuOptions, IPageState, ISortState, ITableState } from '../../shared/table';
9
+ import { IAlertService } from '../interfaces';
10
+ import { IEditDialogData } from './base-edit-dialog-data';
11
+ import { fnCbType, fnType } from '../../types/types';
12
+ import * as i0 from "@angular/core";
13
+ export declare class BasePageClass<T> implements OnDestroy {
14
+ routeAnimationsElements: string;
15
+ /** Данные для табличного компонента. */
16
+ data$: BehaviorSubject<T[]>;
17
+ /** Количество записей по фильтру. */
18
+ length$: BehaviorSubject<number>;
19
+ entityService: any;
20
+ entityType: any;
21
+ entityEditComponent: any;
22
+ extraData?: any;
23
+ defaultPageIndex: number;
24
+ defaultPageSize: number;
25
+ dialog: MatDialog | undefined;
26
+ dialogEditWidth: string;
27
+ dialogRemoveWidth: string;
28
+ alertService: IAlertService | undefined;
29
+ routeAddress: string;
30
+ /** Сообщение при удалении записе(й). */
31
+ removalMessage: string;
32
+ /** Заголовок страницы. */
33
+ pageTitle: string;
34
+ /**
35
+ * Создание записи: вызывается перед окрытием диалога.
36
+ */
37
+ beforeOpenDialogOnNewEvent: fnType<T>;
38
+ /**
39
+ * Редактирование записи: вызывается перед окрытием диалога.
40
+ */
41
+ beforeOpenDialogOnEditEvent: fnType<T>;
42
+ /**
43
+ * Создание записи: вызывается перед сохранением объекта.
44
+ */
45
+ beforeSaveOnNewEvent: fnType<T>;
46
+ /**
47
+ * Редактирование записи: вызывается перед сохранением объекта.
48
+ */
49
+ beforeSaveOnEditEvent: fnType<T>;
50
+ /**
51
+ * Создание записи: вызывается после сохранения объекта.
52
+ */
53
+ afterSaveOnNewEvent: fnCbType<T>;
54
+ /**
55
+ * Редактирование записи: вызывается после сохранения объекта.
56
+ */
57
+ afterSaveOnEditEvent: fnCbType<T>;
58
+ editorRoles: string[];
59
+ executeRoles: string[];
60
+ /** Список ролей, для которых скрыть элемент. */
61
+ hideRoles: string[];
62
+ /** Загрузка данных. */
63
+ loadData$: Subject<null>;
64
+ /** Загрузка количества записей. */
65
+ loadLength$: Subject<null>;
66
+ /** Очистка фильтра. */
67
+ clearFilter$: Subject<null>;
68
+ /** Разрешен выбор нескольких строк. */
69
+ allowMultiSelect: boolean;
70
+ /** Выбранные строки в таблице. */
71
+ selected: T[];
72
+ /** Состояние сортировки, пагинации. */
73
+ tableState: ITableState;
74
+ /** Доступность кнопки "Изменить". */
75
+ editBtnDisabled: boolean;
76
+ /** Доступность кнопки "Удалить". */
77
+ removeBtnDisabled: boolean;
78
+ /** Разрешено ли отправлять событие rowDoubleClicked при двойном щелчке мышью. */
79
+ dblClickedEventEnable: boolean;
80
+ opt: IContextMenuOptions<T>[];
81
+ protected router: Router;
82
+ protected localStorage: LocalStorageService;
83
+ subscription: Subscription | undefined;
84
+ constructor();
85
+ ngOnDestroy(): void;
86
+ onPageChange(pageState: IPageState): void;
87
+ onSortChange(sortState: ISortState): void;
88
+ entityFactory(type: new () => T): T;
89
+ /** Cобытие изменение выбранных записей. */
90
+ onSelectionChange(selected: T[]): void;
91
+ /** Обновление доступности кнопки "Изменить" - вызывается при изменении выбранных записей. */
92
+ editBtnDisabledUpdate(selected: T[]): void;
93
+ /** Обновление доступности кнопки "Удалить" - вызывается при изменении выбранных записей. */
94
+ removeBtnDisabledUpdate(selected: T[]): void;
95
+ /** Cобытие двойной клик. */
96
+ onRowDoubleClicked(): void;
97
+ /** Cобытие создание. */
98
+ newEvent(): void;
99
+ /** Cобытие редактирование. */
100
+ editEvent(): void;
101
+ /** Cобытие удаление. */
102
+ removeEvent(): void;
103
+ /** Событие обновления данных. */
104
+ refreshEvent(): void;
105
+ /** Cобытие очистки фильтра. */
106
+ clearEvent(): void;
107
+ /** Изменение сообщения об удалении. */
108
+ onRemovalMessageChange(message: string): void;
109
+ /** Изменение заголовка страницы. */
110
+ onPageTitleChange(title: string): void;
111
+ openDialog(entityComponent: any, data: IEditDialogData<T>, dialog: any): any;
112
+ openDialogRemoveConfirm(removalMessage: string): MatDialogRef<DialogComponent> | undefined;
113
+ protected onMiddleButton(baseUrl: string, queryParamName?: string, queryParamValue?: string): ($event: MouseEvent, item: T, contextMenu: MatMenuTrigger) => void;
114
+ protected dateToString(date: string | number | Date): string | null;
115
+ static ɵfac: i0.ɵɵFactoryDeclaration<BasePageClass<any>, never>;
116
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BasePageClass<any>, never, never, {}, {}, never, never, true, never>;
117
+ }
@@ -0,0 +1,23 @@
1
+ import { HttpClient, HttpParams } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { BaseClass } from './base-class';
4
+ import * as i0 from "@angular/core";
5
+ export declare class BaseServiceClass<T extends BaseClass> {
6
+ baseRoute: string;
7
+ entityType: any;
8
+ countRoute: string;
9
+ basePageRoute: string;
10
+ basePageSizeRoute: string;
11
+ protected http: HttpClient;
12
+ constructor();
13
+ getObjects(): Observable<T[]>;
14
+ getObject(id: number): any;
15
+ getCount(): Observable<number>;
16
+ getObjectsByPaging(pageIndex: number, pageSize: number, sortColumn: string, direction: string): Observable<T[]>;
17
+ newObject(entity: T): any;
18
+ editObject(entity: T): any;
19
+ deleteObject(entity: T): any;
20
+ protected getParams(pageIndex: number, pageSize: number, sortColumn: string, direction: string): HttpParams;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseServiceClass<any>, never>;
22
+ static ɵprov: i0.ɵɵInjectableDeclaration<BaseServiceClass<any>>;
23
+ }
@@ -0,0 +1,8 @@
1
+ export * from './base-class';
2
+ export * from './base-edit-class';
3
+ export * from './base-edit-dialog-data';
4
+ export * from './base-entity-action';
5
+ export * from './base-filter-class';
6
+ export * from './base-nav-bar-menu-class';
7
+ export * from './base-page-class';
8
+ export * from './base-service-class';
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class BaseToolbarService {
3
+ baseRoute: string;
4
+ constructor();
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseToolbarService, never>;
6
+ static ɵprov: i0.ɵɵInjectableDeclaration<BaseToolbarService>;
7
+ }
@@ -0,0 +1,67 @@
1
+ import { EventEmitter, OnDestroy } from '@angular/core';
2
+ import { IContextMenuOptions } from '../../../shared/table/models/context-menu-options.interface';
3
+ import { AuthService } from '../../../auth';
4
+ import { Subscription } from 'rxjs';
5
+ import * as i0 from "@angular/core";
6
+ export declare class BaseToolbarComponent implements OnDestroy {
7
+ rolesNewBtn: string[];
8
+ rolesEditBtn: string[];
9
+ rolesRemoveBtn: string[];
10
+ rolesCopyBtn: string[];
11
+ rolesExcelBtn: string[];
12
+ rolesCsvBtn: string[];
13
+ rolesPdfBtn: string[];
14
+ rolesPrintBtn: string[];
15
+ rolesRefreshBtn: string[];
16
+ rolesClearBtn: string[];
17
+ newBtnDisabled: boolean;
18
+ editBtnDisabled: boolean;
19
+ removeBtnDisabled: boolean;
20
+ copyBtnDisabled: boolean;
21
+ excelBtnDisabled: boolean;
22
+ csvBtnDisabled: boolean;
23
+ pdfBtnDisabled: boolean;
24
+ printBtnDisabled: boolean;
25
+ refreshBtnDisabled: boolean;
26
+ clearBtnDisabled: boolean;
27
+ newBtnTooltip: string;
28
+ editBtnTooltip: string;
29
+ removeBtnTooltip: string;
30
+ copyBtnTooltip: string;
31
+ excelBtnTooltip: string;
32
+ csvBtnTooltip: string;
33
+ pdfBtnTooltip: string;
34
+ printBtnTooltip: string;
35
+ refreshBtnTooltip: string;
36
+ clearBtnTooltip: string;
37
+ /** Список элементов контекстного меню. */
38
+ newBtnOpt: IContextMenuOptions<string>[];
39
+ clickedNewBtn: EventEmitter<any>;
40
+ clickedEditBtn: EventEmitter<any>;
41
+ clickedRemoveBtn: EventEmitter<any>;
42
+ clickedCopyBtn: EventEmitter<any>;
43
+ clickedExcelBtn: EventEmitter<any>;
44
+ clickedCsvBtn: EventEmitter<any>;
45
+ clickedPdfBtn: EventEmitter<any>;
46
+ clickedPrintBtn: EventEmitter<any>;
47
+ clickedRefreshBtn: EventEmitter<any>;
48
+ clickedClearBtn: EventEmitter<any>;
49
+ protected authService: AuthService;
50
+ userRoles: string[];
51
+ subscription: Subscription | undefined;
52
+ constructor();
53
+ ngOnDestroy(): void;
54
+ isShow(roles: string[]): boolean;
55
+ onNewClick(): void;
56
+ onEditClick(): void;
57
+ onRemoveClick(): void;
58
+ onCopyClick(): void;
59
+ onExcelClick(): void;
60
+ onCsvClick(): void;
61
+ onPdfClick(): void;
62
+ onPrintClick(): void;
63
+ onRefreshGridClick(): void;
64
+ onClearClick(): void;
65
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseToolbarComponent, never>;
66
+ static ɵcmp: i0.ɵɵComponentDeclaration<BaseToolbarComponent, "lib-base-toolbar", never, { "rolesNewBtn": { "alias": "rolesNewBtn"; "required": false; }; "rolesEditBtn": { "alias": "rolesEditBtn"; "required": false; }; "rolesRemoveBtn": { "alias": "rolesRemoveBtn"; "required": false; }; "rolesCopyBtn": { "alias": "rolesCopyBtn"; "required": false; }; "rolesExcelBtn": { "alias": "rolesExcelBtn"; "required": false; }; "rolesCsvBtn": { "alias": "rolesCsvBtn"; "required": false; }; "rolesPdfBtn": { "alias": "rolesPdfBtn"; "required": false; }; "rolesPrintBtn": { "alias": "rolesPrintBtn"; "required": false; }; "rolesRefreshBtn": { "alias": "rolesRefreshBtn"; "required": false; }; "rolesClearBtn": { "alias": "rolesClearBtn"; "required": false; }; "newBtnDisabled": { "alias": "newBtnDisabled"; "required": false; }; "editBtnDisabled": { "alias": "editBtnDisabled"; "required": false; }; "removeBtnDisabled": { "alias": "removeBtnDisabled"; "required": false; }; "copyBtnDisabled": { "alias": "copyBtnDisabled"; "required": false; }; "excelBtnDisabled": { "alias": "excelBtnDisabled"; "required": false; }; "csvBtnDisabled": { "alias": "csvBtnDisabled"; "required": false; }; "pdfBtnDisabled": { "alias": "pdfBtnDisabled"; "required": false; }; "printBtnDisabled": { "alias": "printBtnDisabled"; "required": false; }; "refreshBtnDisabled": { "alias": "refreshBtnDisabled"; "required": false; }; "clearBtnDisabled": { "alias": "clearBtnDisabled"; "required": false; }; "newBtnTooltip": { "alias": "newBtnTooltip"; "required": false; }; "editBtnTooltip": { "alias": "editBtnTooltip"; "required": false; }; "removeBtnTooltip": { "alias": "removeBtnTooltip"; "required": false; }; "copyBtnTooltip": { "alias": "copyBtnTooltip"; "required": false; }; "excelBtnTooltip": { "alias": "excelBtnTooltip"; "required": false; }; "csvBtnTooltip": { "alias": "csvBtnTooltip"; "required": false; }; "pdfBtnTooltip": { "alias": "pdfBtnTooltip"; "required": false; }; "printBtnTooltip": { "alias": "printBtnTooltip"; "required": false; }; "refreshBtnTooltip": { "alias": "refreshBtnTooltip"; "required": false; }; "clearBtnTooltip": { "alias": "clearBtnTooltip"; "required": false; }; "newBtnOpt": { "alias": "newBtnOpt"; "required": false; }; }, { "clickedNewBtn": "clickedNewBtn"; "clickedEditBtn": "clickedEditBtn"; "clickedRemoveBtn": "clickedRemoveBtn"; "clickedCopyBtn": "clickedCopyBtn"; "clickedExcelBtn": "clickedExcelBtn"; "clickedCsvBtn": "clickedCsvBtn"; "clickedPdfBtn": "clickedPdfBtn"; "clickedPrintBtn": "clickedPrintBtn"; "clickedRefreshBtn": "clickedRefreshBtn"; "clickedClearBtn": "clickedClearBtn"; }, never, never, true, never>;
67
+ }
@@ -0,0 +1,2 @@
1
+ export * from './base-toolbar/components/base-toolbar.component';
2
+ export * from './base-classes';