@kuzntsv/uikit 1.0.58 → 1.0.60

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuzntsv/uikit",
3
- "version": "1.0.58",
3
+ "version": "1.0.60",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.2.2",
6
6
  "@angular/core": "^22.2.2",
@@ -1,6 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
- import { AfterViewInit, ElementRef, EnvironmentProviders, InjectionToken, Injector, OnDestroy, OnInit, PipeTransform, WritableSignal } from "@angular/core";
2
+ import { AfterViewInit, ElementRef, EnvironmentProviders, InjectionToken, OnDestroy, OnInit, PipeTransform, WritableSignal } from "@angular/core";
3
3
  import { NotificationService, RoleService } from "@kuzntsv/uikit";
4
+ import z, { z as z$1 } from "zod";
4
5
  import { HttpClient, HttpContext, HttpParams, HttpResourceRef } from "@angular/common/http";
5
6
  import { Observable, Subject, Subscription } from "rxjs";
6
7
  import { SelectionModel } from "@angular/cdk/collections";
@@ -8,7 +9,6 @@ import { MatMenuTrigger } from "@angular/material/menu";
8
9
  import { MatPaginator } from "@angular/material/paginator";
9
10
  import { MatSort } from "@angular/material/sort";
10
11
  import { MatTableDataSource } from "@angular/material/table";
11
- import z, { z as z$1 } from "zod";
12
12
  import { FormControl, FormGroup } from "@angular/forms";
13
13
  import { MatDialog, MatDialogRef } from "@angular/material/dialog";
14
14
  import { SafeUrl } from "@angular/platform-browser";
@@ -57,15 +57,24 @@ export type fnGetCountType<T> = () => Observable<number>;
57
57
  export type fnGetDataResType<T> = () => HttpResourceRef<T[]>;
58
58
  export type fnGetCountResType<T> = () => HttpResourceRef<number>;
59
59
  export type fnMapEntityType<T> = () => (item: T) => T;
60
- export interface ISortState {
61
- sortActive: string;
62
- sortDirection: SortDirection;
63
- }
64
- export interface IPageState {
65
- pageIndex: number;
66
- pageSize: number;
67
- }
68
- export interface ITableState extends ISortState, IPageState {}
60
+ export declare const SortDirectionSchema: z.ZodCustom<SortDirection, SortDirection>;
61
+ export declare const SortStateSchema: z.ZodObject<{
62
+ sortActive: z.ZodString;
63
+ sortDirection: z.ZodCustom<SortDirection, SortDirection>;
64
+ }, z.core.$strip>;
65
+ export declare const PageStateSchema: z.ZodObject<{
66
+ pageIndex: z.ZodNumber;
67
+ pageSize: z.ZodNumber;
68
+ }, z.core.$strip>;
69
+ export declare const TableStateSchema: z.ZodObject<{
70
+ sortActive: z.ZodString;
71
+ sortDirection: z.ZodCustom<SortDirection, SortDirection>;
72
+ pageIndex: z.ZodNumber;
73
+ pageSize: z.ZodNumber;
74
+ }, z.core.$strip>;
75
+ export type SortState = z.infer<typeof SortStateSchema>;
76
+ export type PageState = z.infer<typeof PageStateSchema>;
77
+ export type TableState = z.infer<typeof TableStateSchema>;
69
78
  /** Настройки действий в колонке таблицы. */
70
79
  interface IColumnActionOptions<T> {
71
80
  /** Заголовок. */
@@ -163,7 +172,12 @@ export declare class TableComponent<T> implements OnInit, AfterViewInit, OnDestr
163
172
  /** Настройки колонок. */
164
173
  columnOptions: import("@angular/core").InputSignal<IColumnOptions<T>[]>;
165
174
  /** Состояние сортировки, пагинации. */
166
- tableState: import("@angular/core").InputSignal<ITableState>;
175
+ tableState: import("@angular/core").InputSignal<{
176
+ sortActive: string;
177
+ sortDirection: import("@kuzntsv/uikit/ui").SortDirection;
178
+ pageIndex: number;
179
+ pageSize: number;
180
+ }>;
167
181
  /** Разрешен выбор нескольких строк. */
168
182
  allowMultiSelect: import("@angular/core").InputSignal<boolean>;
169
183
  /** Список элементов контекстного меню. */
@@ -173,9 +187,15 @@ export declare class TableComponent<T> implements OnInit, AfterViewInit, OnDestr
173
187
  /** Отображать строку с итогом. */
174
188
  footer: import("@angular/core").InputSignal<boolean>;
175
189
  /** Изменение страницы. */
176
- pageStateChange: import("@angular/core").OutputEmitterRef<IPageState>;
190
+ pageStateChange: import("@angular/core").OutputEmitterRef<{
191
+ pageIndex: number;
192
+ pageSize: number;
193
+ }>;
177
194
  /** Изменение сортировки. */
178
- sortStateChange: import("@angular/core").OutputEmitterRef<ISortState>;
195
+ sortStateChange: import("@angular/core").OutputEmitterRef<{
196
+ sortActive: string;
197
+ sortDirection: import("@kuzntsv/uikit/ui").SortDirection;
198
+ }>;
179
199
  /** Изменение выбранных записей. */
180
200
  selectionChange: import("@angular/core").OutputEmitterRef<T[]>;
181
201
  /** Двойной щелчек ЛКМ*/
@@ -183,8 +203,14 @@ export declare class TableComponent<T> implements OnInit, AfterViewInit, OnDestr
183
203
  readonly sort: import("@angular/core").Signal<MatSort | undefined>;
184
204
  readonly paginator: import("@angular/core").Signal<MatPaginator | undefined>;
185
205
  readonly contextMenu: import("@angular/core").Signal<MatMenuTrigger | undefined>;
186
- pageState: import("@angular/core").WritableSignal<IPageState>;
187
- sortState: import("@angular/core").WritableSignal<ISortState>;
206
+ pageState: import("@angular/core").WritableSignal<{
207
+ pageIndex: number;
208
+ pageSize: number;
209
+ }>;
210
+ sortState: import("@angular/core").WritableSignal<{
211
+ sortActive: string;
212
+ sortDirection: import("@kuzntsv/uikit/ui").SortDirection;
213
+ }>;
188
214
  /** Выбранная строка, для которого будет показываться меню при нажатии правой кнопки мыши. */
189
215
  itemForMenu?: T;
190
216
  /** Позиция в которой отображается контекстное меню. */
@@ -778,7 +804,7 @@ export declare class BasePageClass<T> implements OnDestroy {
778
804
  /** Выбранные строки в таблице. */
779
805
  selected: T[];
780
806
  /** Состояние сортировки, пагинации. */
781
- tableState: ITableState;
807
+ tableState: TableState;
782
808
  /** Доступность кнопки "Изменить". */
783
809
  editBtnDisabled: boolean;
784
810
  /** Доступность кнопки "Удалить". */
@@ -798,8 +824,8 @@ export declare class BasePageClass<T> implements OnDestroy {
798
824
  constructor();
799
825
  ngOnDestroy(): void;
800
826
  subscribeToLoadData(fnGetData: fnGetDataType<T>, fnGetCount: fnGetCountType<T>, fnMapEntity?: fnMapEntityType<T>): void;
801
- onPageChange(pageState: IPageState): void;
802
- onSortChange(sortState: ISortState): void;
827
+ onPageChange(pageState: PageState): void;
828
+ onSortChange(sortState: SortState): void;
803
829
  /** Событие изменение выбранных записей. */
804
830
  onSelectionChange(selected: T[]): void;
805
831
  /** Обновление доступности кнопки "Изменить" - вызывается при изменении выбранных записей. */
@@ -978,7 +1004,6 @@ export declare abstract class BaseSignalFilterClass<F extends SafeFilterState> {
978
1004
  }
979
1005
  export declare abstract class BaseSignalPageClass<T extends BaseSchemaClass, F extends SafeFilterState = Record<string, never>> implements OnDestroy {
980
1006
  protected dialog: MatDialog;
981
- protected injector: Injector;
982
1007
  protected entityService: any;
983
1008
  protected entityEditComponent?: any;
984
1009
  protected extraData?: any;
@@ -1027,18 +1052,17 @@ export declare abstract class BaseSignalPageClass<T extends BaseSchemaClass, F e
1027
1052
  allowMultiSelect: boolean;
1028
1053
  /** Выбранные строки в таблице. */
1029
1054
  selected: T[];
1030
- protected fnGetData: import("@angular/core").WritableSignal<fnGetDataResType<T> | null>;
1031
- protected fnGetCount: import("@angular/core").WritableSignal<fnGetCountResType<T> | null>;
1032
- protected fnMapEntity: import("@angular/core").WritableSignal<fnMapEntityType<T> | undefined>;
1033
- protected dataResource: import("@angular/core").Signal<import("@angular/common/http").HttpResourceRef<T[]> | null>;
1034
- protected countResource: import("@angular/core").Signal<import("@angular/common/http").HttpResourceRef<number> | null>;
1055
+ protected abstract fnGetData: fnGetDataResType<T>;
1056
+ protected abstract fnGetCount: fnGetCountResType<T>;
1057
+ protected abstract fnMapEntity: fnMapEntityType<T> | undefined;
1058
+ protected dataResource: import("@angular/core").Signal<import("@angular/common/http").HttpResourceRef<T[]>>;
1059
+ protected countResource: import("@angular/core").Signal<import("@angular/common/http").HttpResourceRef<number>>;
1035
1060
  /** Данные для табличного компонента. */
1036
1061
  data: import("@angular/core").Signal<T[]>;
1037
1062
  /** Количество записей по фильтру. */
1038
1063
  length: import("@angular/core").Signal<number>;
1039
1064
  /** Глобальный индикатор загрузки (для спиннера на странице) */
1040
1065
  isLoading: import("@angular/core").Signal<boolean>;
1041
- private componentInjector;
1042
1066
  /** Доступность кнопки "Изменить". */
1043
1067
  editBtnDisabled: boolean;
1044
1068
  /** Доступность кнопки "Удалить". */
@@ -1056,8 +1080,9 @@ export declare abstract class BaseSignalPageClass<T extends BaseSchemaClass, F e
1056
1080
  /** Объект для отписки (вызывается метод unsubscribe при уничтожении компонента). */
1057
1081
  subscription: Subscription;
1058
1082
  private getInitialFilters;
1083
+ /** Разово прочитать сохраненные значения из localStorage при старте страницы,
1084
+ * провалидировать их через Zod-схему и записать в сигнал filters */
1059
1085
  protected initFilters(): void;
1060
- private trackFilterChanges;
1061
1086
  clearEvent(): void;
1062
1087
  private getInitialFilters2;
1063
1088
  filters: import("@angular/core").WritableSignal<F>;
@@ -1066,17 +1091,21 @@ export declare abstract class BaseSignalPageClass<T extends BaseSchemaClass, F e
1066
1091
  /** Очистка фильтра. (для очистки присвоить пустой объект '{}'). */
1067
1092
  clearFilters: import("@angular/core").WritableSignal<any>;
1068
1093
  /** Состояние сортировки, пагинации. */
1069
- tableState: import("@angular/core").WritableSignal<ITableState>;
1094
+ tableState: import("@angular/core").WritableSignal<{
1095
+ sortActive: string;
1096
+ sortDirection: SortDirection;
1097
+ pageIndex: number;
1098
+ pageSize: number;
1099
+ }>;
1070
1100
  constructor();
1071
1101
  ngOnDestroy(): void;
1072
- subscribeToLoadData(fnGetData: fnGetDataResType<T>, fnGetCount: fnGetCountResType<T>, fnMapEntity?: fnMapEntityType<T>, injector?: Injector): void;
1073
1102
  /** Установка значение фильтра.
1074
1103
  * @param key - имя фильтра.
1075
1104
  * @param value - значение.
1076
1105
  */
1077
1106
  setFilter<K extends keyof F>(key: K, value: F[K]): void;
1078
- onPageChange(pageState: IPageState): void;
1079
- onSortChange(sortState: ISortState): void;
1107
+ onPageChange(pageState: PageState): void;
1108
+ onSortChange(sortState: SortState): void;
1080
1109
  /** Событие изменение выбранных записей. */
1081
1110
  onSelectionChange(selected: T[]): void;
1082
1111
  /** Обновление доступности кнопки "Изменить" - вызывается при изменении выбранных записей. */
@@ -1106,164 +1135,6 @@ export declare abstract class BaseSignalPageClass<T extends BaseSchemaClass, F e
1106
1135
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseSignalPageClass<any, any>, never>;
1107
1136
  static ɵdir: i0.ɵɵDirectiveDeclaration<BaseSignalPageClass<any, any>, never, never, {}, {}, never, never, true, never>;
1108
1137
  }
1109
- export declare abstract class BaseSignalServiceClass<T extends BaseSchemaClass> {
1110
- abstract baseRoute: string;
1111
- protected abstract readonly schema: z.ZodType<T>;
1112
- protected countRoute: string;
1113
- protected pageIndexParam: string;
1114
- protected pageSizeParam: string;
1115
- protected sortColumnParam: string;
1116
- protected directionParam: string;
1117
- protected apiContextName: string;
1118
- protected http: HttpClient;
1119
- protected readonly _refreshTrigger: import("@angular/core").WritableSignal<number>;
1120
- refresh(): void;
1121
- getObjects(): HttpResourceRef<T[]>;
1122
- getObject(id: number | (() => number | null | undefined)): HttpResourceRef<T | null>;
1123
- getCount(): HttpResourceRef<number>;
1124
- getObjectsByPaging(pageIndex: number, pageSize: number, sortColumn: string, direction: string): HttpResourceRef<T[]>;
1125
- /**
1126
- * Универсальный метод получения пагинированных данных с фильтрацией.
1127
- * Автоматически очищает фильтры от null/undefined/пустых значений с помощью cleanFilterParams.
1128
- */
1129
- getObjectsByFilterPaging<F extends SafeFilterState>(pageIndex: number, pageSize: number, sortColumn: string, direction: string, filters: F): HttpResourceRef<T[]>;
1130
- /**
1131
- * Универсальный метод получения КОЛИЧЕСТВА записей с фильтрацией.
1132
- * Автоматически очищает фильтры перед отправкой.
1133
- */
1134
- getObjectsCountByFilter<F extends SafeFilterState>(filters: F): HttpResourceRef<number>;
1135
- /**
1136
- * МЕТОД СОЗДАНИЯ (POST)
1137
- * Принимает данные БЕЗ id. Тип формируется автоматически через Zod.
1138
- */
1139
- newObject(entity: Omit<T, 'id'>): any;
1140
- /**
1141
- * Метод для СОЗДАНИЯ объекта (POST)
1142
- * Тип аргумента генерируется автоматически: это ваш тип T, но БЕЗ поля id.
1143
- */
1144
- editObject(entity: T): any;
1145
- /**
1146
- * Метод для ОБНОВЛЕНИЯ объекта (PUT / PATCH)
1147
- * Принимает id и частичный объект (все свойства T становятся необязательными, кроме id)
1148
- */
1149
- /**
1150
- * Метод DELETE (Переписанный под новую архитектуру)
1151
- * Возвращает Observable. При подписке делает DELETE запрос,
1152
- * а оператор 'tap' автоматически обновляет список getObjects() при успехе.
1153
- */
1154
- deleteObject(entity: T): any;
1155
- protected getParams(pageIndex: number, pageSize: number, sortColumn: string, direction: string): HttpParams;
1156
- protected getHttpContext(): {
1157
- context?: HttpContext;
1158
- };
1159
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseSignalServiceClass<any>, never>;
1160
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1161
- }
1162
- export declare class DisableIfRoleDirective {
1163
- readonly forbiddenRoles: import("@angular/core").InputSignal<string[]>;
1164
- private readonly el;
1165
- private readonly roleService;
1166
- constructor();
1167
- static ɵfac: i0.ɵɵFactoryDeclaration<DisableIfRoleDirective, never>;
1168
- static ɵdir: i0.ɵɵDirectiveDeclaration<DisableIfRoleDirective, "[ngxUikDisableIfRole]", never, {
1169
- "forbiddenRoles": {
1170
- "alias": "ngxUikDisableIfRole";
1171
- "required": false;
1172
- "isSignal": true;
1173
- };
1174
- }, {}, never, never, true, never>;
1175
- }
1176
- export declare class HideIfForbiddenRoleDirective {
1177
- readonly forbiddenRoles: import("@angular/core").InputSignal<string[]>;
1178
- private readonly el;
1179
- private readonly roleService;
1180
- constructor();
1181
- static ɵfac: i0.ɵɵFactoryDeclaration<HideIfForbiddenRoleDirective, never>;
1182
- static ɵdir: i0.ɵɵDirectiveDeclaration<HideIfForbiddenRoleDirective, "[ngxUikHideIfForbiddenRole]", never, {
1183
- "forbiddenRoles": {
1184
- "alias": "ngxUikHideIfForbiddenRole";
1185
- "required": false;
1186
- "isSignal": true;
1187
- };
1188
- }, {}, never, never, true, never>;
1189
- }
1190
- export declare class SetValueDirective {
1191
- readonly value: import("@angular/core").InputSignal<any>;
1192
- private readonly ngControl;
1193
- constructor();
1194
- static ɵfac: i0.ɵɵFactoryDeclaration<SetValueDirective, never>;
1195
- static ɵdir: i0.ɵɵDirectiveDeclaration<SetValueDirective, "[setValue]", never, {
1196
- "value": {
1197
- "alias": "setValue";
1198
- "required": false;
1199
- "isSignal": true;
1200
- };
1201
- }, {}, never, never, true, never>;
1202
- }
1203
- export declare const authGuard: (allowedRoles: string[]) => CanActivateFn;
1204
- export declare const redirectGuard: CanActivateFn;
1205
- /**
1206
- * Пускает на роут только тех пользователей, у которых есть роли из списка allowedRoles.
1207
- * ADMIN всегда имеет доступ.
1208
- */
1209
- export declare const roleGuard: (allowedRoles: string[]) => CanActivateFn;
1210
- export declare class LoggerService {
1211
- logPrefix: string;
1212
- private isProduction;
1213
- private readonly config;
1214
- constructor();
1215
- log(message: string, ...args: any[]): void;
1216
- error(message: string, ...args: any[]): void;
1217
- static ɵfac: i0.ɵɵFactoryDeclaration<LoggerService, never>;
1218
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1219
- }
1220
- export interface LoggerConfig {
1221
- isProduction: boolean;
1222
- logLevel?: 'debug' | 'info' | 'warn' | 'error';
1223
- }
1224
- export declare const LOGGER_CONFIG: InjectionToken<LoggerConfig>;
1225
- export declare function provideLogger(config: LoggerConfig): EnvironmentProviders;
1226
- /** @deprecated */
1227
- export interface Deserializable {
1228
- deserialize(input: any): this;
1229
- }
1230
- export declare const secUserSchema: z.ZodObject<{
1231
- id: z.ZodDefault<z.ZodNumber>;
1232
- login: z.ZodDefault<z.ZodString>;
1233
- fio: z.ZodDefault<z.ZodString>;
1234
- dept: z.ZodDefault<z.ZodNumber>;
1235
- tabnum: z.ZodDefault<z.ZodNumber>;
1236
- userView: z.ZodOptional<z.ZodObject<{
1237
- id: z.ZodDefault<z.ZodNumber>;
1238
- idHuman: z.ZodDefault<z.ZodNumber>;
1239
- loginAD: z.ZodDefault<z.ZodString>;
1240
- dept: z.ZodDefault<z.ZodNumber>;
1241
- tabnum: z.ZodDefault<z.ZodNumber>;
1242
- lastname: z.ZodDefault<z.ZodString>;
1243
- firstname: z.ZodDefault<z.ZodString>;
1244
- middlename: z.ZodDefault<z.ZodString>;
1245
- fio: z.ZodDefault<z.ZodString>;
1246
- dateHuman: z.ZodOptional<z.ZodDate>;
1247
- profession: z.ZodDefault<z.ZodString>;
1248
- }, z.core.$strip>>;
1249
- }, z.core.$strip>;
1250
- export type SecUser = z.infer<typeof secUserSchema>;
1251
- export declare class SafePipe implements PipeTransform {
1252
- private readonly sanitizer;
1253
- transform(url: string | SafeUrl | null | undefined): SafeUrl;
1254
- static ɵfac: i0.ɵɵFactoryDeclaration<SafePipe, never>;
1255
- static ɵpipe: i0.ɵɵPipeDeclaration<SafePipe, "safe", true>;
1256
- }
1257
- export declare class TimePipe implements PipeTransform {
1258
- transform(value: number): string;
1259
- static ɵfac: i0.ɵɵFactoryDeclaration<TimePipe, never>;
1260
- static ɵpipe: i0.ɵɵPipeDeclaration<TimePipe, "time", true>;
1261
- }
1262
- export declare class TruncatePipe implements PipeTransform {
1263
- transform(value: string, args: any[]): string;
1264
- static ɵfac: i0.ɵɵFactoryDeclaration<TruncatePipe, never>;
1265
- static ɵpipe: i0.ɵɵPipeDeclaration<TruncatePipe, "truncate", true>;
1266
- }
1267
1138
  export interface ChipItem {
1268
1139
  value: string;
1269
1140
  viewValue: string;
@@ -1563,4 +1434,163 @@ export declare class BaseSelectWithGroupComponent {
1563
1434
  }, {
1564
1435
  "selectedItemsChange": "selectedItemsChange";
1565
1436
  }, never, never, true, never>;
1437
+ }
1438
+ export declare abstract class BaseSignalServiceClass<T extends BaseSchemaClass> {
1439
+ abstract baseRoute: string;
1440
+ protected abstract readonly schema: z.ZodType<T>;
1441
+ protected countRoute: string;
1442
+ protected pageIndexParam: string;
1443
+ protected pageSizeParam: string;
1444
+ protected sortColumnParam: string;
1445
+ protected directionParam: string;
1446
+ protected apiContextName: string;
1447
+ protected http: HttpClient;
1448
+ protected readonly _refreshTrigger: import("@angular/core").WritableSignal<number>;
1449
+ refresh(): void;
1450
+ getObjects(): HttpResourceRef<T[]>;
1451
+ getObject(id: number | (() => number | null | undefined)): HttpResourceRef<T | null>;
1452
+ getCount(): HttpResourceRef<number>;
1453
+ getObjectsByPaging(tableState: TableState): HttpResourceRef<T[]>;
1454
+ /**
1455
+ * Универсальный метод получения пагинированных данных с фильтрацией.
1456
+ * Автоматически очищает фильтры от null/undefined/пустых значений с помощью cleanFilterParams.
1457
+ */
1458
+ getObjectsByFilterPaging<F extends SafeFilterState>(tableState: TableState, filters: F): HttpResourceRef<T[]>;
1459
+ /**
1460
+ * Универсальный метод получения КОЛИЧЕСТВА записей с фильтрацией.
1461
+ * Автоматически очищает фильтры перед отправкой.
1462
+ */
1463
+ getObjectsCountByFilter<F extends SafeFilterState>(filters: F): HttpResourceRef<number>;
1464
+ protected buildTableParams(tableState: TableState): Record<string, string | number>;
1465
+ /**
1466
+ * МЕТОД СОЗДАНИЯ (POST)
1467
+ * Принимает данные БЕЗ id. Тип формируется автоматически через Zod.
1468
+ */
1469
+ newObject(entity: Omit<T, 'id'>): any;
1470
+ /**
1471
+ * Метод для СОЗДАНИЯ объекта (POST)
1472
+ * Тип аргумента генерируется автоматически: это ваш тип T, но БЕЗ поля id.
1473
+ */
1474
+ editObject(entity: T): any;
1475
+ /**
1476
+ * Метод для ОБНОВЛЕНИЯ объекта (PUT / PATCH)
1477
+ * Принимает id и частичный объект (все свойства T становятся необязательными, кроме id)
1478
+ */
1479
+ /**
1480
+ * Метод DELETE (Переписанный под новую архитектуру)
1481
+ * Возвращает Observable. При подписке делает DELETE запрос,
1482
+ * а оператор 'tap' автоматически обновляет список getObjects() при успехе.
1483
+ */
1484
+ deleteObject(entity: T): any;
1485
+ protected getParams(pageIndex: number, pageSize: number, sortColumn: string, direction: string): HttpParams;
1486
+ protected getHttpContext(): {
1487
+ context?: HttpContext;
1488
+ };
1489
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseSignalServiceClass<any>, never>;
1490
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1491
+ }
1492
+ export declare class DisableIfRoleDirective {
1493
+ readonly forbiddenRoles: import("@angular/core").InputSignal<string[]>;
1494
+ private readonly el;
1495
+ private readonly roleService;
1496
+ constructor();
1497
+ static ɵfac: i0.ɵɵFactoryDeclaration<DisableIfRoleDirective, never>;
1498
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DisableIfRoleDirective, "[ngxUikDisableIfRole]", never, {
1499
+ "forbiddenRoles": {
1500
+ "alias": "ngxUikDisableIfRole";
1501
+ "required": false;
1502
+ "isSignal": true;
1503
+ };
1504
+ }, {}, never, never, true, never>;
1505
+ }
1506
+ export declare class HideIfForbiddenRoleDirective {
1507
+ readonly forbiddenRoles: import("@angular/core").InputSignal<string[]>;
1508
+ private readonly el;
1509
+ private readonly roleService;
1510
+ constructor();
1511
+ static ɵfac: i0.ɵɵFactoryDeclaration<HideIfForbiddenRoleDirective, never>;
1512
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HideIfForbiddenRoleDirective, "[ngxUikHideIfForbiddenRole]", never, {
1513
+ "forbiddenRoles": {
1514
+ "alias": "ngxUikHideIfForbiddenRole";
1515
+ "required": false;
1516
+ "isSignal": true;
1517
+ };
1518
+ }, {}, never, never, true, never>;
1519
+ }
1520
+ export declare class SetValueDirective {
1521
+ readonly value: import("@angular/core").InputSignal<any>;
1522
+ private readonly ngControl;
1523
+ constructor();
1524
+ static ɵfac: i0.ɵɵFactoryDeclaration<SetValueDirective, never>;
1525
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SetValueDirective, "[setValue]", never, {
1526
+ "value": {
1527
+ "alias": "setValue";
1528
+ "required": false;
1529
+ "isSignal": true;
1530
+ };
1531
+ }, {}, never, never, true, never>;
1532
+ }
1533
+ export declare const authGuard: (allowedRoles: string[]) => CanActivateFn;
1534
+ export declare const redirectGuard: CanActivateFn;
1535
+ /**
1536
+ * Пускает на роут только тех пользователей, у которых есть роли из списка allowedRoles.
1537
+ * ADMIN всегда имеет доступ.
1538
+ */
1539
+ export declare const roleGuard: (allowedRoles: string[]) => CanActivateFn;
1540
+ export declare class LoggerService {
1541
+ logPrefix: string;
1542
+ private isProduction;
1543
+ private readonly config;
1544
+ constructor();
1545
+ log(message: string, ...args: any[]): void;
1546
+ error(message: string, ...args: any[]): void;
1547
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoggerService, never>;
1548
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1549
+ }
1550
+ export interface LoggerConfig {
1551
+ isProduction: boolean;
1552
+ logLevel?: 'debug' | 'info' | 'warn' | 'error';
1553
+ }
1554
+ export declare const LOGGER_CONFIG: InjectionToken<LoggerConfig>;
1555
+ export declare function provideLogger(config: LoggerConfig): EnvironmentProviders;
1556
+ /** @deprecated */
1557
+ export interface Deserializable {
1558
+ deserialize(input: any): this;
1559
+ }
1560
+ export declare const secUserSchema: z.ZodObject<{
1561
+ id: z.ZodDefault<z.ZodNumber>;
1562
+ login: z.ZodDefault<z.ZodString>;
1563
+ fio: z.ZodDefault<z.ZodString>;
1564
+ dept: z.ZodDefault<z.ZodNumber>;
1565
+ tabnum: z.ZodDefault<z.ZodNumber>;
1566
+ userView: z.ZodOptional<z.ZodObject<{
1567
+ id: z.ZodDefault<z.ZodNumber>;
1568
+ idHuman: z.ZodDefault<z.ZodNumber>;
1569
+ loginAD: z.ZodDefault<z.ZodString>;
1570
+ dept: z.ZodDefault<z.ZodNumber>;
1571
+ tabnum: z.ZodDefault<z.ZodNumber>;
1572
+ lastname: z.ZodDefault<z.ZodString>;
1573
+ firstname: z.ZodDefault<z.ZodString>;
1574
+ middlename: z.ZodDefault<z.ZodString>;
1575
+ fio: z.ZodDefault<z.ZodString>;
1576
+ dateHuman: z.ZodOptional<z.ZodDate>;
1577
+ profession: z.ZodDefault<z.ZodString>;
1578
+ }, z.core.$strip>>;
1579
+ }, z.core.$strip>;
1580
+ export type SecUser = z.infer<typeof secUserSchema>;
1581
+ export declare class SafePipe implements PipeTransform {
1582
+ private readonly sanitizer;
1583
+ transform(url: string | SafeUrl | null | undefined): SafeUrl;
1584
+ static ɵfac: i0.ɵɵFactoryDeclaration<SafePipe, never>;
1585
+ static ɵpipe: i0.ɵɵPipeDeclaration<SafePipe, "safe", true>;
1586
+ }
1587
+ export declare class TimePipe implements PipeTransform {
1588
+ transform(value: number): string;
1589
+ static ɵfac: i0.ɵɵFactoryDeclaration<TimePipe, never>;
1590
+ static ɵpipe: i0.ɵɵPipeDeclaration<TimePipe, "time", true>;
1591
+ }
1592
+ export declare class TruncatePipe implements PipeTransform {
1593
+ transform(value: string, args: any[]): string;
1594
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruncatePipe, never>;
1595
+ static ɵpipe: i0.ɵɵPipeDeclaration<TruncatePipe, "truncate", true>;
1566
1596
  }