@kuzntsv/uikit 1.0.113 → 1.0.115
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/fesm2022/kuzntsv-uikit-interceptors.mjs +4 -4
- package/fesm2022/kuzntsv-uikit-interceptors.mjs.map +1 -1
- package/fesm2022/kuzntsv-uikit-ui.mjs +1663 -1626
- package/fesm2022/kuzntsv-uikit-ui.mjs.map +1 -1
- package/fesm2022/kuzntsv-uikit.mjs +3 -3
- package/fesm2022/kuzntsv-uikit.mjs.map +1 -1
- package/package.json +1 -1
- package/types/kuzntsv-uikit-ui.d.ts +47 -45
- package/types/kuzntsv-uikit.d.ts +0 -1
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, Directive, ElementRef, Injectable, InjectionToken,
|
|
3
|
-
import { Router, RouterLink } from "@angular/router";
|
|
4
|
-
import { API_NAME, AuthService, HIDE_ROLE_MARKER, LoaderService, NotificationService, RoleService, SignalSelectionModel, UIKIT_NOTIFICATION_TOKEN, X_SKIP_LOADER, X_SKIP_NOTIFICATION, formatZodError } from "@kuzntsv/uikit";
|
|
5
|
-
import { ReplaySubject, Subject, Subscription, filter, forkJoin, lastValueFrom, map, of, switchMap, take, tap } from "rxjs";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, HostListener, Injectable, InjectionToken, Pipe, Service, computed, debounced, effect, inject, input, linkedSignal, makeEnvironmentProviders, model, output, signal, untracked, viewChild } from "@angular/core";
|
|
6
3
|
import { MatAnchor, MatButton, MatIconButton } from "@angular/material/button";
|
|
7
|
-
import { MatCard, MatCardContent, MatCardHeader, MatCardTitle } from "@angular/material/card";
|
|
8
|
-
import { MatError, MatFormField, MatHint, MatLabel, MatSuffix } from "@angular/material/form-field";
|
|
9
|
-
import { MatIcon } from "@angular/material/icon";
|
|
10
|
-
import { MatInput } from "@angular/material/input";
|
|
11
|
-
import { FormField, FormRoot, debounce, disabled, form, validateHttp, validateStandardSchema } from "@angular/forms/signals";
|
|
12
|
-
import z, { z as z$1 } from "zod";
|
|
13
4
|
import { MatDivider } from "@angular/material/divider";
|
|
5
|
+
import { MatIcon } from "@angular/material/icon";
|
|
14
6
|
import { MatMenu, MatMenuContent, MatMenuItem, MatMenuTrigger } from "@angular/material/menu";
|
|
15
7
|
import { MatToolbar } from "@angular/material/toolbar";
|
|
16
8
|
import * as i4 from "@angular/material/tooltip";
|
|
17
9
|
import { MatTooltip, MatTooltipModule } from "@angular/material/tooltip";
|
|
10
|
+
import { API_NAME, AuthService, HIDE_ROLE_MARKER, LoaderService, NotificationService, RoleService, SignalSelectionModel, UIKIT_NOTIFICATION_TOKEN, X_SKIP_LOADER, X_SKIP_NOTIFICATION, formatZodError } from "@kuzntsv/uikit";
|
|
11
|
+
import z, { z as z$1 } from "zod";
|
|
12
|
+
import { Observable, Subject, Subscription, filter, forkJoin, lastValueFrom, map, of, switchMap, take, tap } from "rxjs";
|
|
18
13
|
import { HttpClient, HttpContext, HttpErrorResponse, HttpHeaders, HttpParams, httpResource } from "@angular/common/http";
|
|
19
14
|
import { DomSanitizer } from "@angular/platform-browser";
|
|
20
15
|
import { catchError, map as map$1 } from "rxjs/operators";
|
|
16
|
+
import { Router, RouterLink } from "@angular/router";
|
|
21
17
|
import { MAT_DIALOG_DATA, MatDialog, MatDialogActions, MatDialogClose, MatDialogConfig, MatDialogContent, MatDialogRef, MatDialogTitle } from "@angular/material/dialog";
|
|
22
18
|
import { NgControl } from "@angular/forms";
|
|
23
19
|
import { COMMA, ENTER } from "@angular/cdk/keycodes";
|
|
@@ -25,8 +21,12 @@ import * as i1$1 from "@angular/material/autocomplete";
|
|
|
25
21
|
import { MatAutocompleteModule, MatOption } from "@angular/material/autocomplete";
|
|
26
22
|
import * as i2$2 from "@angular/material/chips";
|
|
27
23
|
import { MatChipsModule } from "@angular/material/chips";
|
|
24
|
+
import { MatError, MatFormField, MatHint, MatLabel, MatSuffix } from "@angular/material/form-field";
|
|
25
|
+
import { FormField, FormRoot, debounce, disabled, form, required, validateHttp, validateStandardSchema } from "@angular/forms/signals";
|
|
28
26
|
import { DateAdapter, MAT_DATE_FORMATS, MatOptgroup, MatOption as MatOption$1, NativeDateAdapter } from "@angular/material/core";
|
|
29
27
|
import { MatDateRangeInput, MatDateRangePicker, MatDatepickerToggle, MatEndDate, MatStartDate } from "@angular/material/datepicker";
|
|
28
|
+
import { MatCard, MatCardContent, MatCardHeader, MatCardTitle } from "@angular/material/card";
|
|
29
|
+
import { MatInput } from "@angular/material/input";
|
|
30
30
|
import * as i2$1 from "@angular/cdk/scrolling";
|
|
31
31
|
import { ScrollingModule } from "@angular/cdk/scrolling";
|
|
32
32
|
import { MatFormField as MatFormField$1, MatLabel as MatLabel$1, MatSelect } from "@angular/material/select";
|
|
@@ -37,135 +37,369 @@ import * as i2 from "@angular/material/sort";
|
|
|
37
37
|
import { MatSort, MatSortModule } from "@angular/material/sort";
|
|
38
38
|
import * as i1 from "@angular/material/table";
|
|
39
39
|
import { MatTableDataSource, MatTableModule } from "@angular/material/table";
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
40
|
+
var BaseToolbarComponent = class BaseToolbarComponent {
|
|
41
|
+
rolesNewBtn = input([], ...ngDevMode ? [{ debugName: "rolesNewBtn" }] : /* istanbul ignore next */ []);
|
|
42
|
+
rolesEditBtn = input([], ...ngDevMode ? [{ debugName: "rolesEditBtn" }] : /* istanbul ignore next */ []);
|
|
43
|
+
rolesRemoveBtn = input([], ...ngDevMode ? [{ debugName: "rolesRemoveBtn" }] : /* istanbul ignore next */ []);
|
|
44
|
+
rolesCopyBtn = input([], ...ngDevMode ? [{ debugName: "rolesCopyBtn" }] : /* istanbul ignore next */ []);
|
|
45
|
+
rolesExcelBtn = input([], ...ngDevMode ? [{ debugName: "rolesExcelBtn" }] : /* istanbul ignore next */ []);
|
|
46
|
+
rolesCsvBtn = input([], ...ngDevMode ? [{ debugName: "rolesCsvBtn" }] : /* istanbul ignore next */ []);
|
|
47
|
+
rolesPdfBtn = input([], ...ngDevMode ? [{ debugName: "rolesPdfBtn" }] : /* istanbul ignore next */ []);
|
|
48
|
+
rolesPrintBtn = input([], ...ngDevMode ? [{ debugName: "rolesPrintBtn" }] : /* istanbul ignore next */ []);
|
|
49
|
+
rolesRefreshBtn = input([], ...ngDevMode ? [{ debugName: "rolesRefreshBtn" }] : /* istanbul ignore next */ []);
|
|
50
|
+
rolesClearBtn = input([], ...ngDevMode ? [{ debugName: "rolesClearBtn" }] : /* istanbul ignore next */ []);
|
|
51
|
+
newBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "newBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
52
|
+
editBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "editBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
53
|
+
removeBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "removeBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
54
|
+
copyBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "copyBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
55
|
+
excelBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "excelBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
56
|
+
csvBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "csvBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
57
|
+
pdfBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "pdfBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
58
|
+
printBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "printBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
59
|
+
refreshBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "refreshBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
60
|
+
clearBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "clearBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
61
|
+
newBtnTooltip = input("Добавить", ...ngDevMode ? [{ debugName: "newBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
62
|
+
editBtnTooltip = input("Изменить", ...ngDevMode ? [{ debugName: "editBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
63
|
+
removeBtnTooltip = input("Удалить", ...ngDevMode ? [{ debugName: "removeBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
64
|
+
copyBtnTooltip = input("Скопировать", ...ngDevMode ? [{ debugName: "copyBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
65
|
+
excelBtnTooltip = input("Экспортировать в Excel", ...ngDevMode ? [{ debugName: "excelBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
66
|
+
csvBtnTooltip = input("Экспортировать в Csv", ...ngDevMode ? [{ debugName: "csvBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
67
|
+
pdfBtnTooltip = input("Экспортировать в Pdf", ...ngDevMode ? [{ debugName: "pdfBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
68
|
+
printBtnTooltip = input("Печатать", ...ngDevMode ? [{ debugName: "printBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
69
|
+
refreshBtnTooltip = input("Обновить данные", ...ngDevMode ? [{ debugName: "refreshBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
70
|
+
clearBtnTooltip = input("Очистить фильтр", ...ngDevMode ? [{ debugName: "clearBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
71
|
+
newBtnOpt = input([], ...ngDevMode ? [{ debugName: "newBtnOpt" }] : /* istanbul ignore next */ []);
|
|
72
|
+
clickedNewBtn = output();
|
|
73
|
+
clickedEditBtn = output();
|
|
74
|
+
clickedRemoveBtn = output();
|
|
75
|
+
clickedCopyBtn = output();
|
|
76
|
+
clickedExcelBtn = output();
|
|
77
|
+
clickedCsvBtn = output();
|
|
78
|
+
clickedPdfBtn = output();
|
|
79
|
+
clickedPrintBtn = output();
|
|
80
|
+
clickedRefreshBtn = output();
|
|
81
|
+
clickedClearBtn = output();
|
|
82
|
+
roleService = inject(RoleService);
|
|
83
|
+
isNewBtnVisible = computed(() => this.checkVisibility(this.rolesNewBtn()), ...ngDevMode ? [{ debugName: "isNewBtnVisible" }] : /* istanbul ignore next */ []);
|
|
84
|
+
isEditBtnVisible = computed(() => this.checkVisibility(this.rolesEditBtn()), ...ngDevMode ? [{ debugName: "isEditBtnVisible" }] : /* istanbul ignore next */ []);
|
|
85
|
+
isRemoveBtnVisible = computed(() => this.checkVisibility(this.rolesRemoveBtn()), ...ngDevMode ? [{ debugName: "isRemoveBtnVisible" }] : /* istanbul ignore next */ []);
|
|
86
|
+
isCopyBtnVisible = computed(() => this.checkVisibility(this.rolesCopyBtn()), ...ngDevMode ? [{ debugName: "isCopyBtnVisible" }] : /* istanbul ignore next */ []);
|
|
87
|
+
isExcelBtnVisible = computed(() => this.checkVisibility(this.rolesExcelBtn()), ...ngDevMode ? [{ debugName: "isExcelBtnVisible" }] : /* istanbul ignore next */ []);
|
|
88
|
+
isCsvBtnVisible = computed(() => this.checkVisibility(this.rolesCsvBtn()), ...ngDevMode ? [{ debugName: "isCsvBtnVisible" }] : /* istanbul ignore next */ []);
|
|
89
|
+
isPdfBtnVisible = computed(() => this.checkVisibility(this.rolesPdfBtn()), ...ngDevMode ? [{ debugName: "isPdfBtnVisible" }] : /* istanbul ignore next */ []);
|
|
90
|
+
isPrintBtnVisible = computed(() => this.checkVisibility(this.rolesPrintBtn()), ...ngDevMode ? [{ debugName: "isPrintBtnVisible" }] : /* istanbul ignore next */ []);
|
|
91
|
+
isRefreshBtnVisible = computed(() => this.checkVisibility(this.rolesRefreshBtn()), ...ngDevMode ? [{ debugName: "isRefreshBtnVisible" }] : /* istanbul ignore next */ []);
|
|
92
|
+
isClearBtnVisible = computed(() => this.checkVisibility(this.rolesClearBtn()), ...ngDevMode ? [{ debugName: "isClearBtnVisible" }] : /* istanbul ignore next */ []);
|
|
93
|
+
checkVisibility(forbiddenRoles) {
|
|
94
|
+
return !this.roleService.hasForbiddenRole(forbiddenRoles);
|
|
61
95
|
}
|
|
62
|
-
|
|
63
|
-
this.
|
|
96
|
+
onNewClick() {
|
|
97
|
+
this.clickedNewBtn.emit();
|
|
98
|
+
}
|
|
99
|
+
onEditClick() {
|
|
100
|
+
this.clickedEditBtn.emit();
|
|
101
|
+
}
|
|
102
|
+
onRemoveClick() {
|
|
103
|
+
this.clickedRemoveBtn.emit();
|
|
104
|
+
}
|
|
105
|
+
onCopyClick() {
|
|
106
|
+
this.clickedCopyBtn.emit();
|
|
107
|
+
}
|
|
108
|
+
onExcelClick() {
|
|
109
|
+
this.clickedExcelBtn.emit();
|
|
110
|
+
}
|
|
111
|
+
onCsvClick() {
|
|
112
|
+
this.clickedCsvBtn.emit();
|
|
113
|
+
}
|
|
114
|
+
onPdfClick() {
|
|
115
|
+
this.clickedPdfBtn.emit();
|
|
116
|
+
}
|
|
117
|
+
onPrintClick() {
|
|
118
|
+
this.clickedPrintBtn.emit();
|
|
119
|
+
}
|
|
120
|
+
onRefreshGridClick() {
|
|
121
|
+
this.clickedRefreshBtn.emit();
|
|
122
|
+
}
|
|
123
|
+
onClearClick() {
|
|
124
|
+
this.clickedClearBtn.emit();
|
|
64
125
|
}
|
|
65
126
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
66
127
|
minVersion: "12.0.0",
|
|
67
128
|
version: "22.2.2",
|
|
68
129
|
ngImport: i0,
|
|
69
|
-
type:
|
|
130
|
+
type: BaseToolbarComponent,
|
|
70
131
|
deps: [],
|
|
71
132
|
target: i0.ɵɵFactoryTarget.Component
|
|
72
133
|
});
|
|
73
134
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
74
135
|
minVersion: "17.0.0",
|
|
75
136
|
version: "22.2.2",
|
|
76
|
-
type:
|
|
137
|
+
type: BaseToolbarComponent,
|
|
77
138
|
isStandalone: true,
|
|
78
|
-
selector: "ngx-uik-
|
|
79
|
-
inputs: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
outputs: { submitted: "submitted" },
|
|
87
|
-
ngImport: i0,
|
|
88
|
-
template: "<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <mat-card-title> Авторизация </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <form [formRoot]=\"form\">\r\n <mat-form-field class=\"login-field\">\r\n <mat-label>Имя пользователя</mat-label>\r\n <input\r\n type=\"text\"\r\n matInput\r\n autocomplete=\"on\"\r\n placeholder=\"Имя пользователя\"\r\n [formField]=\"form.username\"\r\n />\r\n @if (form.username().touched() && form.username().invalid()) {\r\n <ng-container ngProjectAs=\"mat-error\">\r\n <mat-error>{{ form.username().errors()[0]?.message }}</mat-error>\r\n </ng-container>\r\n }\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"login-field\">\r\n <mat-label>Пароль</mat-label>\r\n <input\r\n [type]=\"isHidePassword() ? 'password' : 'text'\"\r\n matInput\r\n placeholder=\"Пароль\"\r\n [formField]=\"form.password\"\r\n />\r\n <mat-icon\r\n class=\"watcher\"\r\n matSuffix\r\n (mousedown)=\"showPassword()\"\r\n (mouseup)=\"hidePassword()\"\r\n >{{ isHidePassword() ? \"visibility_off\" : \"visibility\" }}</mat-icon\r\n >\r\n @if (form.password().touched() && form.password().invalid()) {\r\n <ng-container ngProjectAs=\"mat-error\">\r\n <mat-error>{{ form.password().errors()[0]?.message }}</mat-error>\r\n </ng-container>\r\n }\r\n </mat-form-field>\r\n\r\n <div class=\"loginButtons\">\r\n <button\r\n type=\"submit\"\r\n mat-button\r\n mat-stroked-button\r\n color=\"primary\"\r\n [disabled]=\"!form().valid() || pending()\"\r\n >\r\n Войти\r\n </button>\r\n </div>\r\n </form>\r\n </mat-card-content>\r\n</mat-card>\r\n",
|
|
89
|
-
styles: [":host{display:flex;justify-content:center;margin:32px 0}form{display:flex;flex-direction:column;gap:16px}.login-field{width:100%;min-width:300px}mat-card-header{justify-content:center}mat-card-content{font-size:16px}.loginButtons{display:flex;flex-direction:row;justify-content:flex-end}.watcher{cursor:default}\n"],
|
|
90
|
-
dependencies: [
|
|
91
|
-
{
|
|
92
|
-
kind: "directive",
|
|
93
|
-
type: FormRoot,
|
|
94
|
-
selector: "form[formRoot]",
|
|
95
|
-
inputs: ["formRoot"]
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
kind: "directive",
|
|
99
|
-
type: FormField,
|
|
100
|
-
selector: "[formField]",
|
|
101
|
-
inputs: ["formField"],
|
|
102
|
-
exportAs: ["formField"]
|
|
139
|
+
selector: "ngx-uik-base-toolbar",
|
|
140
|
+
inputs: {
|
|
141
|
+
rolesNewBtn: {
|
|
142
|
+
classPropertyName: "rolesNewBtn",
|
|
143
|
+
publicName: "rolesNewBtn",
|
|
144
|
+
isSignal: true,
|
|
145
|
+
isRequired: false,
|
|
146
|
+
transformFunction: null
|
|
103
147
|
},
|
|
104
|
-
{
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
148
|
+
rolesEditBtn: {
|
|
149
|
+
classPropertyName: "rolesEditBtn",
|
|
150
|
+
publicName: "rolesEditBtn",
|
|
151
|
+
isSignal: true,
|
|
152
|
+
isRequired: false,
|
|
153
|
+
transformFunction: null
|
|
110
154
|
},
|
|
111
|
-
{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
155
|
+
rolesRemoveBtn: {
|
|
156
|
+
classPropertyName: "rolesRemoveBtn",
|
|
157
|
+
publicName: "rolesRemoveBtn",
|
|
158
|
+
isSignal: true,
|
|
159
|
+
isRequired: false,
|
|
160
|
+
transformFunction: null
|
|
115
161
|
},
|
|
116
|
-
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
162
|
+
rolesCopyBtn: {
|
|
163
|
+
classPropertyName: "rolesCopyBtn",
|
|
164
|
+
publicName: "rolesCopyBtn",
|
|
165
|
+
isSignal: true,
|
|
166
|
+
isRequired: false,
|
|
167
|
+
transformFunction: null
|
|
120
168
|
},
|
|
121
|
-
{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
169
|
+
rolesExcelBtn: {
|
|
170
|
+
classPropertyName: "rolesExcelBtn",
|
|
171
|
+
publicName: "rolesExcelBtn",
|
|
172
|
+
isSignal: true,
|
|
173
|
+
isRequired: false,
|
|
174
|
+
transformFunction: null
|
|
125
175
|
},
|
|
126
|
-
{
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
"color",
|
|
133
|
-
"floatLabel",
|
|
134
|
-
"appearance",
|
|
135
|
-
"subscriptSizing",
|
|
136
|
-
"hintLabel"
|
|
137
|
-
],
|
|
138
|
-
exportAs: ["matFormField"]
|
|
176
|
+
rolesCsvBtn: {
|
|
177
|
+
classPropertyName: "rolesCsvBtn",
|
|
178
|
+
publicName: "rolesCsvBtn",
|
|
179
|
+
isSignal: true,
|
|
180
|
+
isRequired: false,
|
|
181
|
+
transformFunction: null
|
|
139
182
|
},
|
|
140
|
-
{
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
183
|
+
rolesPdfBtn: {
|
|
184
|
+
classPropertyName: "rolesPdfBtn",
|
|
185
|
+
publicName: "rolesPdfBtn",
|
|
186
|
+
isSignal: true,
|
|
187
|
+
isRequired: false,
|
|
188
|
+
transformFunction: null
|
|
144
189
|
},
|
|
145
|
-
{
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"id",
|
|
152
|
-
"placeholder",
|
|
153
|
-
"name",
|
|
154
|
-
"required",
|
|
155
|
-
"type",
|
|
156
|
-
"errorStateMatcher",
|
|
157
|
-
"aria-describedby",
|
|
158
|
-
"value",
|
|
159
|
-
"readonly",
|
|
160
|
-
"disabledInteractive"
|
|
161
|
-
],
|
|
162
|
-
exportAs: ["matInput"]
|
|
190
|
+
rolesPrintBtn: {
|
|
191
|
+
classPropertyName: "rolesPrintBtn",
|
|
192
|
+
publicName: "rolesPrintBtn",
|
|
193
|
+
isSignal: true,
|
|
194
|
+
isRequired: false,
|
|
195
|
+
transformFunction: null
|
|
163
196
|
},
|
|
164
|
-
{
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
197
|
+
rolesRefreshBtn: {
|
|
198
|
+
classPropertyName: "rolesRefreshBtn",
|
|
199
|
+
publicName: "rolesRefreshBtn",
|
|
200
|
+
isSignal: true,
|
|
201
|
+
isRequired: false,
|
|
202
|
+
transformFunction: null
|
|
203
|
+
},
|
|
204
|
+
rolesClearBtn: {
|
|
205
|
+
classPropertyName: "rolesClearBtn",
|
|
206
|
+
publicName: "rolesClearBtn",
|
|
207
|
+
isSignal: true,
|
|
208
|
+
isRequired: false,
|
|
209
|
+
transformFunction: null
|
|
210
|
+
},
|
|
211
|
+
newBtnDisabled: {
|
|
212
|
+
classPropertyName: "newBtnDisabled",
|
|
213
|
+
publicName: "newBtnDisabled",
|
|
214
|
+
isSignal: true,
|
|
215
|
+
isRequired: false,
|
|
216
|
+
transformFunction: null
|
|
217
|
+
},
|
|
218
|
+
editBtnDisabled: {
|
|
219
|
+
classPropertyName: "editBtnDisabled",
|
|
220
|
+
publicName: "editBtnDisabled",
|
|
221
|
+
isSignal: true,
|
|
222
|
+
isRequired: false,
|
|
223
|
+
transformFunction: null
|
|
224
|
+
},
|
|
225
|
+
removeBtnDisabled: {
|
|
226
|
+
classPropertyName: "removeBtnDisabled",
|
|
227
|
+
publicName: "removeBtnDisabled",
|
|
228
|
+
isSignal: true,
|
|
229
|
+
isRequired: false,
|
|
230
|
+
transformFunction: null
|
|
231
|
+
},
|
|
232
|
+
copyBtnDisabled: {
|
|
233
|
+
classPropertyName: "copyBtnDisabled",
|
|
234
|
+
publicName: "copyBtnDisabled",
|
|
235
|
+
isSignal: true,
|
|
236
|
+
isRequired: false,
|
|
237
|
+
transformFunction: null
|
|
238
|
+
},
|
|
239
|
+
excelBtnDisabled: {
|
|
240
|
+
classPropertyName: "excelBtnDisabled",
|
|
241
|
+
publicName: "excelBtnDisabled",
|
|
242
|
+
isSignal: true,
|
|
243
|
+
isRequired: false,
|
|
244
|
+
transformFunction: null
|
|
245
|
+
},
|
|
246
|
+
csvBtnDisabled: {
|
|
247
|
+
classPropertyName: "csvBtnDisabled",
|
|
248
|
+
publicName: "csvBtnDisabled",
|
|
249
|
+
isSignal: true,
|
|
250
|
+
isRequired: false,
|
|
251
|
+
transformFunction: null
|
|
252
|
+
},
|
|
253
|
+
pdfBtnDisabled: {
|
|
254
|
+
classPropertyName: "pdfBtnDisabled",
|
|
255
|
+
publicName: "pdfBtnDisabled",
|
|
256
|
+
isSignal: true,
|
|
257
|
+
isRequired: false,
|
|
258
|
+
transformFunction: null
|
|
259
|
+
},
|
|
260
|
+
printBtnDisabled: {
|
|
261
|
+
classPropertyName: "printBtnDisabled",
|
|
262
|
+
publicName: "printBtnDisabled",
|
|
263
|
+
isSignal: true,
|
|
264
|
+
isRequired: false,
|
|
265
|
+
transformFunction: null
|
|
266
|
+
},
|
|
267
|
+
refreshBtnDisabled: {
|
|
268
|
+
classPropertyName: "refreshBtnDisabled",
|
|
269
|
+
publicName: "refreshBtnDisabled",
|
|
270
|
+
isSignal: true,
|
|
271
|
+
isRequired: false,
|
|
272
|
+
transformFunction: null
|
|
273
|
+
},
|
|
274
|
+
clearBtnDisabled: {
|
|
275
|
+
classPropertyName: "clearBtnDisabled",
|
|
276
|
+
publicName: "clearBtnDisabled",
|
|
277
|
+
isSignal: true,
|
|
278
|
+
isRequired: false,
|
|
279
|
+
transformFunction: null
|
|
280
|
+
},
|
|
281
|
+
newBtnTooltip: {
|
|
282
|
+
classPropertyName: "newBtnTooltip",
|
|
283
|
+
publicName: "newBtnTooltip",
|
|
284
|
+
isSignal: true,
|
|
285
|
+
isRequired: false,
|
|
286
|
+
transformFunction: null
|
|
287
|
+
},
|
|
288
|
+
editBtnTooltip: {
|
|
289
|
+
classPropertyName: "editBtnTooltip",
|
|
290
|
+
publicName: "editBtnTooltip",
|
|
291
|
+
isSignal: true,
|
|
292
|
+
isRequired: false,
|
|
293
|
+
transformFunction: null
|
|
294
|
+
},
|
|
295
|
+
removeBtnTooltip: {
|
|
296
|
+
classPropertyName: "removeBtnTooltip",
|
|
297
|
+
publicName: "removeBtnTooltip",
|
|
298
|
+
isSignal: true,
|
|
299
|
+
isRequired: false,
|
|
300
|
+
transformFunction: null
|
|
301
|
+
},
|
|
302
|
+
copyBtnTooltip: {
|
|
303
|
+
classPropertyName: "copyBtnTooltip",
|
|
304
|
+
publicName: "copyBtnTooltip",
|
|
305
|
+
isSignal: true,
|
|
306
|
+
isRequired: false,
|
|
307
|
+
transformFunction: null
|
|
308
|
+
},
|
|
309
|
+
excelBtnTooltip: {
|
|
310
|
+
classPropertyName: "excelBtnTooltip",
|
|
311
|
+
publicName: "excelBtnTooltip",
|
|
312
|
+
isSignal: true,
|
|
313
|
+
isRequired: false,
|
|
314
|
+
transformFunction: null
|
|
315
|
+
},
|
|
316
|
+
csvBtnTooltip: {
|
|
317
|
+
classPropertyName: "csvBtnTooltip",
|
|
318
|
+
publicName: "csvBtnTooltip",
|
|
319
|
+
isSignal: true,
|
|
320
|
+
isRequired: false,
|
|
321
|
+
transformFunction: null
|
|
322
|
+
},
|
|
323
|
+
pdfBtnTooltip: {
|
|
324
|
+
classPropertyName: "pdfBtnTooltip",
|
|
325
|
+
publicName: "pdfBtnTooltip",
|
|
326
|
+
isSignal: true,
|
|
327
|
+
isRequired: false,
|
|
328
|
+
transformFunction: null
|
|
329
|
+
},
|
|
330
|
+
printBtnTooltip: {
|
|
331
|
+
classPropertyName: "printBtnTooltip",
|
|
332
|
+
publicName: "printBtnTooltip",
|
|
333
|
+
isSignal: true,
|
|
334
|
+
isRequired: false,
|
|
335
|
+
transformFunction: null
|
|
336
|
+
},
|
|
337
|
+
refreshBtnTooltip: {
|
|
338
|
+
classPropertyName: "refreshBtnTooltip",
|
|
339
|
+
publicName: "refreshBtnTooltip",
|
|
340
|
+
isSignal: true,
|
|
341
|
+
isRequired: false,
|
|
342
|
+
transformFunction: null
|
|
343
|
+
},
|
|
344
|
+
clearBtnTooltip: {
|
|
345
|
+
classPropertyName: "clearBtnTooltip",
|
|
346
|
+
publicName: "clearBtnTooltip",
|
|
347
|
+
isSignal: true,
|
|
348
|
+
isRequired: false,
|
|
349
|
+
transformFunction: null
|
|
350
|
+
},
|
|
351
|
+
newBtnOpt: {
|
|
352
|
+
classPropertyName: "newBtnOpt",
|
|
353
|
+
publicName: "newBtnOpt",
|
|
354
|
+
isSignal: true,
|
|
355
|
+
isRequired: false,
|
|
356
|
+
transformFunction: null
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
outputs: {
|
|
360
|
+
clickedNewBtn: "clickedNewBtn",
|
|
361
|
+
clickedEditBtn: "clickedEditBtn",
|
|
362
|
+
clickedRemoveBtn: "clickedRemoveBtn",
|
|
363
|
+
clickedCopyBtn: "clickedCopyBtn",
|
|
364
|
+
clickedExcelBtn: "clickedExcelBtn",
|
|
365
|
+
clickedCsvBtn: "clickedCsvBtn",
|
|
366
|
+
clickedPdfBtn: "clickedPdfBtn",
|
|
367
|
+
clickedPrintBtn: "clickedPrintBtn",
|
|
368
|
+
clickedRefreshBtn: "clickedRefreshBtn",
|
|
369
|
+
clickedClearBtn: "clickedClearBtn"
|
|
370
|
+
},
|
|
371
|
+
ngImport: i0,
|
|
372
|
+
template: "<mat-toolbar>\r\n @if (isNewBtnVisible()) {\r\n @if (newBtnOpt() && newBtnOpt().length > 0) {\r\n <button [disabled]=\"newBtnDisabled()\" [matMenuTriggerFor]=\"menuNewBtn\"\r\n mat-icon-button [matTooltip]=\"newBtnTooltip()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n <mat-menu #menuNewBtn=\"matMenu\">\r\n @for (menuItem of newBtnOpt(); track menuItem) {\r\n @if (menuItem.title === '-' && !(menuItem.hideFn ? menuItem.hideFn(\"\") : menuItem.hide)) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (menuItem.title !== '-' && !(menuItem.hideFn ? menuItem.hideFn(\"\") : menuItem.hide)) {\r\n <button mat-menu-item\r\n (click)=\"menuItem.onClickFn ? menuItem.onClickFn('') : ''\"\r\n [disabled]=\"menuItem.disabledFn ? menuItem.disabledFn('') : menuItem.disabled\">\r\n @if (menuItem.icon) {\r\n <mat-icon>{{menuItem.icon}}</mat-icon>\r\n }\r\n {{ menuItem.title }}\r\n </button>\r\n }\r\n }\r\n </mat-menu>\r\n } \r\n @else {\r\n <button [disabled]=\"newBtnDisabled()\" (click)=\"onNewClick()\"\r\n mat-icon-button routerLink=\"new\" routerLinkActive=\"active\" [matTooltip]=\"newBtnTooltip()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n }\r\n }\r\n\r\n @if (isEditBtnVisible()) {\r\n <button [disabled]=\"editBtnDisabled()\" (click)=\"onEditClick()\"\r\n mat-icon-button routerLink=\"edit\" color=\"primary\" routerLinkActive=\"active\" [matTooltip]=\"editBtnTooltip()\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n @if (isRemoveBtnVisible()) {\r\n <button [disabled]=\"removeBtnDisabled()\" (click)=\"onRemoveClick()\"\r\n mat-icon-button routerLink=\"delete\" color=\"warn\" routerLinkActive=\"active\" [matTooltip]=\"removeBtnTooltip()\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n }\r\n @if (isCopyBtnVisible()) {\r\n <button [disabled]=\"copyBtnDisabled()\" (click)=\"onCopyClick()\"\r\n mat-icon-button routerLink=\"delete\" routerLinkActive=\"active\" [matTooltip]=\"copyBtnTooltip()\">\r\n <mat-icon>content_copy</mat-icon>\r\n </button>\r\n }\r\n @if (isExcelBtnVisible()) {\r\n <button [disabled]=\"excelBtnDisabled()\" (click)=\"onExcelClick()\"\r\n mat-icon-button routerLink=\"excel\" routerLinkActive=\"active\" [matTooltip]=\"excelBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">explicit</mat-icon>\r\n </button>\r\n }\r\n @if (isCsvBtnVisible()) {\r\n <button [disabled]=\"csvBtnDisabled()\" (click)=\"onCsvClick()\"\r\n mat-icon-button routerLink=\"csv\" routerLinkActive=\"active\" [matTooltip]=\"csvBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">download</mat-icon>\r\n </button>\r\n }\r\n @if (isPdfBtnVisible()) {\r\n <button [disabled]=\"pdfBtnDisabled()\" (click)=\"onPdfClick()\"\r\n mat-icon-button routerLink=\"pdf\" routerLinkActive=\"active\" [matTooltip]=\"pdfBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">picture_as_pdf</mat-icon>\r\n </button>\r\n }\r\n @if (isPrintBtnVisible()) {\r\n <button [disabled]=\"printBtnDisabled()\" (click)=\"onPrintClick()\"\r\n mat-icon-button routerLink=\"print\" routerLinkActive=\"active\" [matTooltip]=\"printBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">print_outline</mat-icon>\r\n </button>\r\n }\r\n @if (isRefreshBtnVisible()) {\r\n <button [disabled]=\"refreshBtnDisabled()\" (click)=\"onRefreshGridClick()\"\r\n mat-icon-button routerLink=\"refresh\" routerLinkActive=\"active\" [matTooltip]=\"refreshBtnTooltip()\">\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n }\r\n @if (isClearBtnVisible()) {\r\n <button [disabled]=\"clearBtnDisabled()\" (click)=\"onClearClick()\"\r\n mat-icon-button routerLink=\"clear\" routerLinkActive=\"active\" [matTooltip]=\"clearBtnTooltip()\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n</mat-toolbar>\r\n",
|
|
373
|
+
styles: [""],
|
|
374
|
+
dependencies: [
|
|
375
|
+
{
|
|
376
|
+
kind: "component",
|
|
377
|
+
type: MatToolbar,
|
|
378
|
+
selector: "mat-toolbar",
|
|
379
|
+
inputs: ["color"],
|
|
380
|
+
exportAs: ["matToolbar"]
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
kind: "component",
|
|
384
|
+
type: MatIconButton,
|
|
385
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
386
|
+
exportAs: ["matButton", "matAnchor"]
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
kind: "directive",
|
|
390
|
+
type: MatTooltip,
|
|
391
|
+
selector: "[matTooltip]",
|
|
392
|
+
inputs: [
|
|
393
|
+
"matTooltipPosition",
|
|
394
|
+
"matTooltipPositionAtOrigin",
|
|
395
|
+
"matTooltipDisabled",
|
|
396
|
+
"matTooltipShowDelay",
|
|
397
|
+
"matTooltipHideDelay",
|
|
398
|
+
"matTooltipTouchGestures",
|
|
399
|
+
"matTooltip",
|
|
400
|
+
"matTooltipClass"
|
|
401
|
+
],
|
|
402
|
+
exportAs: ["matTooltip"]
|
|
169
403
|
},
|
|
170
404
|
{
|
|
171
405
|
kind: "component",
|
|
@@ -180,761 +414,112 @@ var LoginFormComponent = class LoginFormComponent {
|
|
|
180
414
|
],
|
|
181
415
|
exportAs: ["matIcon"]
|
|
182
416
|
},
|
|
417
|
+
{
|
|
418
|
+
kind: "component",
|
|
419
|
+
type: MatMenu,
|
|
420
|
+
selector: "mat-menu",
|
|
421
|
+
inputs: [
|
|
422
|
+
"backdropClass",
|
|
423
|
+
"aria-label",
|
|
424
|
+
"aria-labelledby",
|
|
425
|
+
"aria-describedby",
|
|
426
|
+
"xPosition",
|
|
427
|
+
"yPosition",
|
|
428
|
+
"overlapTrigger",
|
|
429
|
+
"hasBackdrop",
|
|
430
|
+
"class",
|
|
431
|
+
"classList"
|
|
432
|
+
],
|
|
433
|
+
outputs: ["closed", "close"],
|
|
434
|
+
exportAs: ["matMenu"]
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
kind: "component",
|
|
438
|
+
type: MatDivider,
|
|
439
|
+
selector: "mat-divider",
|
|
440
|
+
inputs: ["vertical", "inset"]
|
|
441
|
+
},
|
|
183
442
|
{
|
|
184
443
|
kind: "directive",
|
|
185
|
-
type:
|
|
186
|
-
selector: "[
|
|
187
|
-
inputs: [
|
|
444
|
+
type: MatMenuTrigger,
|
|
445
|
+
selector: "[mat-menu-trigger-for], [matMenuTriggerFor]",
|
|
446
|
+
inputs: [
|
|
447
|
+
"mat-menu-trigger-for",
|
|
448
|
+
"matMenuTriggerFor",
|
|
449
|
+
"matMenuTriggerData",
|
|
450
|
+
"matMenuTriggerRestoreFocus"
|
|
451
|
+
],
|
|
452
|
+
outputs: [
|
|
453
|
+
"menuOpened",
|
|
454
|
+
"onMenuOpen",
|
|
455
|
+
"menuClosed",
|
|
456
|
+
"onMenuClose"
|
|
457
|
+
],
|
|
458
|
+
exportAs: ["matMenuTrigger"]
|
|
188
459
|
},
|
|
189
460
|
{
|
|
190
461
|
kind: "component",
|
|
191
|
-
type:
|
|
192
|
-
selector: "
|
|
193
|
-
inputs: [
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
462
|
+
type: MatMenuItem,
|
|
463
|
+
selector: "[mat-menu-item]",
|
|
464
|
+
inputs: [
|
|
465
|
+
"role",
|
|
466
|
+
"disabled",
|
|
467
|
+
"disabledInteractive",
|
|
468
|
+
"disableRipple"
|
|
469
|
+
],
|
|
470
|
+
exportAs: ["matMenuItem"]
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
197
474
|
});
|
|
198
475
|
};
|
|
199
476
|
i0.ɵɵngDeclareClassMetadata({
|
|
200
477
|
minVersion: "12.0.0",
|
|
201
478
|
version: "22.2.2",
|
|
202
479
|
ngImport: i0,
|
|
203
|
-
type:
|
|
480
|
+
type: BaseToolbarComponent,
|
|
204
481
|
decorators: [{
|
|
205
482
|
type: Component,
|
|
206
483
|
args: [{
|
|
207
|
-
selector: "ngx-uik-
|
|
484
|
+
selector: "ngx-uik-base-toolbar",
|
|
485
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
208
486
|
imports: [
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
MatCardHeader,
|
|
213
|
-
MatCardTitle,
|
|
214
|
-
MatCardContent,
|
|
215
|
-
MatFormField,
|
|
216
|
-
MatLabel,
|
|
217
|
-
MatInput,
|
|
218
|
-
MatError,
|
|
487
|
+
MatToolbar,
|
|
488
|
+
MatIconButton,
|
|
489
|
+
MatTooltip,
|
|
219
490
|
MatIcon,
|
|
220
|
-
|
|
221
|
-
|
|
491
|
+
MatMenu,
|
|
492
|
+
MatDivider,
|
|
493
|
+
MatMenuTrigger,
|
|
494
|
+
MatMenuItem
|
|
222
495
|
],
|
|
223
|
-
template: "<mat-
|
|
224
|
-
styles: [":host{display:flex;justify-content:center;margin:32px 0}form{display:flex;flex-direction:column;gap:16px}.login-field{width:100%;min-width:300px}mat-card-header{justify-content:center}mat-card-content{font-size:16px}.loginButtons{display:flex;flex-direction:row;justify-content:flex-end}.watcher{cursor:default}\n"]
|
|
496
|
+
template: "<mat-toolbar>\r\n @if (isNewBtnVisible()) {\r\n @if (newBtnOpt() && newBtnOpt().length > 0) {\r\n <button [disabled]=\"newBtnDisabled()\" [matMenuTriggerFor]=\"menuNewBtn\"\r\n mat-icon-button [matTooltip]=\"newBtnTooltip()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n <mat-menu #menuNewBtn=\"matMenu\">\r\n @for (menuItem of newBtnOpt(); track menuItem) {\r\n @if (menuItem.title === '-' && !(menuItem.hideFn ? menuItem.hideFn(\"\") : menuItem.hide)) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (menuItem.title !== '-' && !(menuItem.hideFn ? menuItem.hideFn(\"\") : menuItem.hide)) {\r\n <button mat-menu-item\r\n (click)=\"menuItem.onClickFn ? menuItem.onClickFn('') : ''\"\r\n [disabled]=\"menuItem.disabledFn ? menuItem.disabledFn('') : menuItem.disabled\">\r\n @if (menuItem.icon) {\r\n <mat-icon>{{menuItem.icon}}</mat-icon>\r\n }\r\n {{ menuItem.title }}\r\n </button>\r\n }\r\n }\r\n </mat-menu>\r\n } \r\n @else {\r\n <button [disabled]=\"newBtnDisabled()\" (click)=\"onNewClick()\"\r\n mat-icon-button routerLink=\"new\" routerLinkActive=\"active\" [matTooltip]=\"newBtnTooltip()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n }\r\n }\r\n\r\n @if (isEditBtnVisible()) {\r\n <button [disabled]=\"editBtnDisabled()\" (click)=\"onEditClick()\"\r\n mat-icon-button routerLink=\"edit\" color=\"primary\" routerLinkActive=\"active\" [matTooltip]=\"editBtnTooltip()\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n @if (isRemoveBtnVisible()) {\r\n <button [disabled]=\"removeBtnDisabled()\" (click)=\"onRemoveClick()\"\r\n mat-icon-button routerLink=\"delete\" color=\"warn\" routerLinkActive=\"active\" [matTooltip]=\"removeBtnTooltip()\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n }\r\n @if (isCopyBtnVisible()) {\r\n <button [disabled]=\"copyBtnDisabled()\" (click)=\"onCopyClick()\"\r\n mat-icon-button routerLink=\"delete\" routerLinkActive=\"active\" [matTooltip]=\"copyBtnTooltip()\">\r\n <mat-icon>content_copy</mat-icon>\r\n </button>\r\n }\r\n @if (isExcelBtnVisible()) {\r\n <button [disabled]=\"excelBtnDisabled()\" (click)=\"onExcelClick()\"\r\n mat-icon-button routerLink=\"excel\" routerLinkActive=\"active\" [matTooltip]=\"excelBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">explicit</mat-icon>\r\n </button>\r\n }\r\n @if (isCsvBtnVisible()) {\r\n <button [disabled]=\"csvBtnDisabled()\" (click)=\"onCsvClick()\"\r\n mat-icon-button routerLink=\"csv\" routerLinkActive=\"active\" [matTooltip]=\"csvBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">download</mat-icon>\r\n </button>\r\n }\r\n @if (isPdfBtnVisible()) {\r\n <button [disabled]=\"pdfBtnDisabled()\" (click)=\"onPdfClick()\"\r\n mat-icon-button routerLink=\"pdf\" routerLinkActive=\"active\" [matTooltip]=\"pdfBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">picture_as_pdf</mat-icon>\r\n </button>\r\n }\r\n @if (isPrintBtnVisible()) {\r\n <button [disabled]=\"printBtnDisabled()\" (click)=\"onPrintClick()\"\r\n mat-icon-button routerLink=\"print\" routerLinkActive=\"active\" [matTooltip]=\"printBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">print_outline</mat-icon>\r\n </button>\r\n }\r\n @if (isRefreshBtnVisible()) {\r\n <button [disabled]=\"refreshBtnDisabled()\" (click)=\"onRefreshGridClick()\"\r\n mat-icon-button routerLink=\"refresh\" routerLinkActive=\"active\" [matTooltip]=\"refreshBtnTooltip()\">\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n }\r\n @if (isClearBtnVisible()) {\r\n <button [disabled]=\"clearBtnDisabled()\" (click)=\"onClearClick()\"\r\n mat-icon-button routerLink=\"clear\" routerLinkActive=\"active\" [matTooltip]=\"clearBtnTooltip()\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n</mat-toolbar>\r\n"
|
|
225
497
|
}]
|
|
226
498
|
}],
|
|
227
499
|
propDecorators: {
|
|
228
|
-
|
|
500
|
+
rolesNewBtn: [{
|
|
229
501
|
type: i0.Input,
|
|
230
502
|
args: [{
|
|
231
503
|
isSignal: true,
|
|
232
|
-
alias: "
|
|
504
|
+
alias: "rolesNewBtn",
|
|
233
505
|
required: false
|
|
234
506
|
}]
|
|
235
507
|
}],
|
|
236
|
-
|
|
237
|
-
type: i0.
|
|
238
|
-
args: [
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
hidy = viewChild("hidy", ...ngDevMode ? [{ debugName: "hidy" }] : /* istanbul ignore next */ []);
|
|
244
|
-
submitted = output();
|
|
245
|
-
constructor() {
|
|
246
|
-
effect(() => {
|
|
247
|
-
const inputEl = this.hidy()?.nativeElement;
|
|
248
|
-
if (inputEl) inputEl.focus();
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
focusInput() {
|
|
252
|
-
this.hidy()?.nativeElement.focus();
|
|
253
|
-
}
|
|
254
|
-
onKeydown(event) {
|
|
255
|
-
if (event.key === "Enter") {
|
|
256
|
-
const inputEl = this.hidy()?.nativeElement;
|
|
257
|
-
if (inputEl?.value) {
|
|
258
|
-
this.submitted.emit(inputEl.value);
|
|
259
|
-
inputEl.value = "";
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
264
|
-
minVersion: "12.0.0",
|
|
265
|
-
version: "22.2.2",
|
|
266
|
-
ngImport: i0,
|
|
267
|
-
type: PermitFormComponent,
|
|
268
|
-
deps: [],
|
|
269
|
-
target: i0.ɵɵFactoryTarget.Component
|
|
270
|
-
});
|
|
271
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
272
|
-
minVersion: "17.2.0",
|
|
273
|
-
version: "22.2.2",
|
|
274
|
-
type: PermitFormComponent,
|
|
275
|
-
isStandalone: true,
|
|
276
|
-
selector: "ngx-uik-permit-form",
|
|
277
|
-
outputs: { submitted: "submitted" },
|
|
278
|
-
viewQueries: [{
|
|
279
|
-
propertyName: "hidy",
|
|
280
|
-
first: true,
|
|
281
|
-
predicate: ["hidy"],
|
|
282
|
-
descendants: true,
|
|
283
|
-
isSignal: true
|
|
508
|
+
rolesEditBtn: [{
|
|
509
|
+
type: i0.Input,
|
|
510
|
+
args: [{
|
|
511
|
+
isSignal: true,
|
|
512
|
+
alias: "rolesEditBtn",
|
|
513
|
+
required: false
|
|
514
|
+
}]
|
|
284
515
|
}],
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
selector: "mat-card",
|
|
293
|
-
inputs: ["appearance"],
|
|
294
|
-
exportAs: ["matCard"]
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
kind: "component",
|
|
298
|
-
type: MatCardHeader,
|
|
299
|
-
selector: "mat-card-header"
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
kind: "directive",
|
|
303
|
-
type: MatCardTitle,
|
|
304
|
-
selector: "mat-card-title, [mat-card-title], [matCardTitle]"
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
kind: "directive",
|
|
308
|
-
type: MatCardContent,
|
|
309
|
-
selector: "mat-card-content"
|
|
310
|
-
}
|
|
311
|
-
]
|
|
312
|
-
});
|
|
313
|
-
};
|
|
314
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
315
|
-
minVersion: "12.0.0",
|
|
316
|
-
version: "22.2.2",
|
|
317
|
-
ngImport: i0,
|
|
318
|
-
type: PermitFormComponent,
|
|
319
|
-
decorators: [{
|
|
320
|
-
type: Component,
|
|
321
|
-
args: [{
|
|
322
|
-
selector: "ngx-uik-permit-form",
|
|
323
|
-
imports: [
|
|
324
|
-
MatCard,
|
|
325
|
-
MatCardHeader,
|
|
326
|
-
MatCardTitle,
|
|
327
|
-
MatCardContent
|
|
328
|
-
],
|
|
329
|
-
template: "<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <mat-card-title>\r\n Приложите пропуск\r\n </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <div class=\"permit\"></div>\r\n </mat-card-content>\r\n</mat-card>\r\n<input #hidy class=\"hidy\" type=\"text\" (keydown)=\"onKeydown($event)\"/>",
|
|
330
|
-
styles: [":host{display:flex;justify-content:center;margin:32px 0}.mat-mdc-form-field{width:100%;min-width:300px}mat-card-title,mat-card-content{display:flex;justify-content:center}mat-card-content{font-size:16px}div.permit{border:none;width:300px;background-size:300px;height:180px}div.permit button div{margin-bottom:200px;color:#000;font-size:34px}input.hidy{opacity:0;position:absolute;left:-200px;top:-200px}\n"]
|
|
331
|
-
}]
|
|
332
|
-
}],
|
|
333
|
-
ctorParameters: () => [],
|
|
334
|
-
propDecorators: {
|
|
335
|
-
hidy: [{
|
|
336
|
-
type: i0.ViewChild,
|
|
337
|
-
args: ["hidy", { isSignal: true }]
|
|
338
|
-
}],
|
|
339
|
-
submitted: [{
|
|
340
|
-
type: i0.Output,
|
|
341
|
-
args: ["submitted"]
|
|
342
|
-
}]
|
|
343
|
-
}
|
|
344
|
-
});
|
|
345
|
-
var LoginPageComponent = class LoginPageComponent {
|
|
346
|
-
pending = signal(false, ...ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []);
|
|
347
|
-
isKiosk = signal(false, ...ngDevMode ? [{ debugName: "isKiosk" }] : /* istanbul ignore next */ []);
|
|
348
|
-
idCas = input(0, ...ngDevMode ? [{ debugName: "idCas" }] : /* istanbul ignore next */ []);
|
|
349
|
-
authService = inject(AuthService);
|
|
350
|
-
router = inject(Router);
|
|
351
|
-
notificationService = inject(UIKIT_NOTIFICATION_TOKEN, { optional: true });
|
|
352
|
-
constructor() {
|
|
353
|
-
if (localStorage.getItem("id_human") || localStorage.getItem("kiosk-keyboard-layout")) {}
|
|
354
|
-
}
|
|
355
|
-
async onSubmit(event) {
|
|
356
|
-
this.startLoading();
|
|
357
|
-
try {
|
|
358
|
-
await lastValueFrom(this.authService.login(event.username, event.password, this.idCas()));
|
|
359
|
-
this.handleSuccessLogin();
|
|
360
|
-
} catch (error) {
|
|
361
|
-
this.handleError(error);
|
|
362
|
-
} finally {
|
|
363
|
-
this.finishLoading();
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
async onSubmitPermit(permit) {
|
|
367
|
-
this.startLoading();
|
|
368
|
-
try {
|
|
369
|
-
await lastValueFrom(this.authService.loginByPermit(permit, this.idCas()));
|
|
370
|
-
this.handleSuccessLogin();
|
|
371
|
-
} catch (error) {
|
|
372
|
-
this.handleError(error);
|
|
373
|
-
} finally {
|
|
374
|
-
this.finishLoading();
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
startLoading() {
|
|
378
|
-
this.pending.set(true);
|
|
379
|
-
}
|
|
380
|
-
finishLoading() {
|
|
381
|
-
this.pending.set(false);
|
|
382
|
-
}
|
|
383
|
-
handleError(error) {
|
|
384
|
-
const errorMsg = "Ошибка при авторизации: " + (error.error || error.error?.message || error.message);
|
|
385
|
-
this.notificationService?.error(errorMsg, 0);
|
|
386
|
-
}
|
|
387
|
-
handleSuccessLogin() {
|
|
388
|
-
this.notificationService?.success("Успешная авторизация");
|
|
389
|
-
if (!this.router) return;
|
|
390
|
-
const returnUrl = this.router.parseUrl(this.router.url).queryParamMap.get("returnUrl");
|
|
391
|
-
if (returnUrl) this.router.navigateByUrl(decodeURIComponent(returnUrl));
|
|
392
|
-
else this.router.navigate(["/"]);
|
|
393
|
-
}
|
|
394
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
395
|
-
minVersion: "12.0.0",
|
|
396
|
-
version: "22.2.2",
|
|
397
|
-
ngImport: i0,
|
|
398
|
-
type: LoginPageComponent,
|
|
399
|
-
deps: [],
|
|
400
|
-
target: i0.ɵɵFactoryTarget.Component
|
|
401
|
-
});
|
|
402
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
403
|
-
minVersion: "17.0.0",
|
|
404
|
-
version: "22.2.2",
|
|
405
|
-
type: LoginPageComponent,
|
|
406
|
-
isStandalone: true,
|
|
407
|
-
selector: "ngx-uik-login-page",
|
|
408
|
-
inputs: { idCas: {
|
|
409
|
-
classPropertyName: "idCas",
|
|
410
|
-
publicName: "idCas",
|
|
411
|
-
isSignal: true,
|
|
412
|
-
isRequired: false,
|
|
413
|
-
transformFunction: null
|
|
414
|
-
} },
|
|
415
|
-
ngImport: i0,
|
|
416
|
-
template: "@if (isKiosk()) {\r\n <ngx-uik-permit-form (submitted)=\"onSubmitPermit($event)\" />\r\n} @else {\r\n <ngx-uik-login-form (submitted)=\"onSubmit($event)\" [pending]=\"pending()\" />\r\n}\r\n",
|
|
417
|
-
styles: [""],
|
|
418
|
-
dependencies: [{
|
|
419
|
-
kind: "component",
|
|
420
|
-
type: LoginFormComponent,
|
|
421
|
-
selector: "ngx-uik-login-form",
|
|
422
|
-
inputs: ["pending"],
|
|
423
|
-
outputs: ["submitted"]
|
|
424
|
-
}, {
|
|
425
|
-
kind: "component",
|
|
426
|
-
type: PermitFormComponent,
|
|
427
|
-
selector: "ngx-uik-permit-form",
|
|
428
|
-
outputs: ["submitted"]
|
|
429
|
-
}]
|
|
430
|
-
});
|
|
431
|
-
};
|
|
432
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
433
|
-
minVersion: "12.0.0",
|
|
434
|
-
version: "22.2.2",
|
|
435
|
-
ngImport: i0,
|
|
436
|
-
type: LoginPageComponent,
|
|
437
|
-
decorators: [{
|
|
438
|
-
type: Component,
|
|
439
|
-
args: [{
|
|
440
|
-
selector: "ngx-uik-login-page",
|
|
441
|
-
imports: [LoginFormComponent, PermitFormComponent],
|
|
442
|
-
template: "@if (isKiosk()) {\r\n <ngx-uik-permit-form (submitted)=\"onSubmitPermit($event)\" />\r\n} @else {\r\n <ngx-uik-login-form (submitted)=\"onSubmit($event)\" [pending]=\"pending()\" />\r\n}\r\n"
|
|
443
|
-
}]
|
|
444
|
-
}],
|
|
445
|
-
ctorParameters: () => [],
|
|
446
|
-
propDecorators: { idCas: [{
|
|
447
|
-
type: i0.Input,
|
|
448
|
-
args: [{
|
|
449
|
-
isSignal: true,
|
|
450
|
-
alias: "idCas",
|
|
451
|
-
required: false
|
|
452
|
-
}]
|
|
453
|
-
}] }
|
|
454
|
-
});
|
|
455
|
-
var BaseToolbarComponent = class BaseToolbarComponent {
|
|
456
|
-
rolesNewBtn = input([], ...ngDevMode ? [{ debugName: "rolesNewBtn" }] : /* istanbul ignore next */ []);
|
|
457
|
-
rolesEditBtn = input([], ...ngDevMode ? [{ debugName: "rolesEditBtn" }] : /* istanbul ignore next */ []);
|
|
458
|
-
rolesRemoveBtn = input([], ...ngDevMode ? [{ debugName: "rolesRemoveBtn" }] : /* istanbul ignore next */ []);
|
|
459
|
-
rolesCopyBtn = input([], ...ngDevMode ? [{ debugName: "rolesCopyBtn" }] : /* istanbul ignore next */ []);
|
|
460
|
-
rolesExcelBtn = input([], ...ngDevMode ? [{ debugName: "rolesExcelBtn" }] : /* istanbul ignore next */ []);
|
|
461
|
-
rolesCsvBtn = input([], ...ngDevMode ? [{ debugName: "rolesCsvBtn" }] : /* istanbul ignore next */ []);
|
|
462
|
-
rolesPdfBtn = input([], ...ngDevMode ? [{ debugName: "rolesPdfBtn" }] : /* istanbul ignore next */ []);
|
|
463
|
-
rolesPrintBtn = input([], ...ngDevMode ? [{ debugName: "rolesPrintBtn" }] : /* istanbul ignore next */ []);
|
|
464
|
-
rolesRefreshBtn = input([], ...ngDevMode ? [{ debugName: "rolesRefreshBtn" }] : /* istanbul ignore next */ []);
|
|
465
|
-
rolesClearBtn = input([], ...ngDevMode ? [{ debugName: "rolesClearBtn" }] : /* istanbul ignore next */ []);
|
|
466
|
-
newBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "newBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
467
|
-
editBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "editBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
468
|
-
removeBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "removeBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
469
|
-
copyBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "copyBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
470
|
-
excelBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "excelBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
471
|
-
csvBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "csvBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
472
|
-
pdfBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "pdfBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
473
|
-
printBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "printBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
474
|
-
refreshBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "refreshBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
475
|
-
clearBtnDisabled = input(false, ...ngDevMode ? [{ debugName: "clearBtnDisabled" }] : /* istanbul ignore next */ []);
|
|
476
|
-
newBtnTooltip = input("Добавить", ...ngDevMode ? [{ debugName: "newBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
477
|
-
editBtnTooltip = input("Изменить", ...ngDevMode ? [{ debugName: "editBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
478
|
-
removeBtnTooltip = input("Удалить", ...ngDevMode ? [{ debugName: "removeBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
479
|
-
copyBtnTooltip = input("Скопировать", ...ngDevMode ? [{ debugName: "copyBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
480
|
-
excelBtnTooltip = input("Экспортировать в Excel", ...ngDevMode ? [{ debugName: "excelBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
481
|
-
csvBtnTooltip = input("Экспортировать в Csv", ...ngDevMode ? [{ debugName: "csvBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
482
|
-
pdfBtnTooltip = input("Экспортировать в Pdf", ...ngDevMode ? [{ debugName: "pdfBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
483
|
-
printBtnTooltip = input("Печатать", ...ngDevMode ? [{ debugName: "printBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
484
|
-
refreshBtnTooltip = input("Обновить данные", ...ngDevMode ? [{ debugName: "refreshBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
485
|
-
clearBtnTooltip = input("Очистить фильтр", ...ngDevMode ? [{ debugName: "clearBtnTooltip" }] : /* istanbul ignore next */ []);
|
|
486
|
-
newBtnOpt = input([], ...ngDevMode ? [{ debugName: "newBtnOpt" }] : /* istanbul ignore next */ []);
|
|
487
|
-
clickedNewBtn = output();
|
|
488
|
-
clickedEditBtn = output();
|
|
489
|
-
clickedRemoveBtn = output();
|
|
490
|
-
clickedCopyBtn = output();
|
|
491
|
-
clickedExcelBtn = output();
|
|
492
|
-
clickedCsvBtn = output();
|
|
493
|
-
clickedPdfBtn = output();
|
|
494
|
-
clickedPrintBtn = output();
|
|
495
|
-
clickedRefreshBtn = output();
|
|
496
|
-
clickedClearBtn = output();
|
|
497
|
-
roleService = inject(RoleService);
|
|
498
|
-
isNewBtnVisible = computed(() => this.checkVisibility(this.rolesNewBtn()), ...ngDevMode ? [{ debugName: "isNewBtnVisible" }] : /* istanbul ignore next */ []);
|
|
499
|
-
isEditBtnVisible = computed(() => this.checkVisibility(this.rolesEditBtn()), ...ngDevMode ? [{ debugName: "isEditBtnVisible" }] : /* istanbul ignore next */ []);
|
|
500
|
-
isRemoveBtnVisible = computed(() => this.checkVisibility(this.rolesRemoveBtn()), ...ngDevMode ? [{ debugName: "isRemoveBtnVisible" }] : /* istanbul ignore next */ []);
|
|
501
|
-
isCopyBtnVisible = computed(() => this.checkVisibility(this.rolesCopyBtn()), ...ngDevMode ? [{ debugName: "isCopyBtnVisible" }] : /* istanbul ignore next */ []);
|
|
502
|
-
isExcelBtnVisible = computed(() => this.checkVisibility(this.rolesExcelBtn()), ...ngDevMode ? [{ debugName: "isExcelBtnVisible" }] : /* istanbul ignore next */ []);
|
|
503
|
-
isCsvBtnVisible = computed(() => this.checkVisibility(this.rolesCsvBtn()), ...ngDevMode ? [{ debugName: "isCsvBtnVisible" }] : /* istanbul ignore next */ []);
|
|
504
|
-
isPdfBtnVisible = computed(() => this.checkVisibility(this.rolesPdfBtn()), ...ngDevMode ? [{ debugName: "isPdfBtnVisible" }] : /* istanbul ignore next */ []);
|
|
505
|
-
isPrintBtnVisible = computed(() => this.checkVisibility(this.rolesPrintBtn()), ...ngDevMode ? [{ debugName: "isPrintBtnVisible" }] : /* istanbul ignore next */ []);
|
|
506
|
-
isRefreshBtnVisible = computed(() => this.checkVisibility(this.rolesRefreshBtn()), ...ngDevMode ? [{ debugName: "isRefreshBtnVisible" }] : /* istanbul ignore next */ []);
|
|
507
|
-
isClearBtnVisible = computed(() => this.checkVisibility(this.rolesClearBtn()), ...ngDevMode ? [{ debugName: "isClearBtnVisible" }] : /* istanbul ignore next */ []);
|
|
508
|
-
checkVisibility(forbiddenRoles) {
|
|
509
|
-
return !this.roleService.hasForbiddenRole(forbiddenRoles);
|
|
510
|
-
}
|
|
511
|
-
onNewClick() {
|
|
512
|
-
this.clickedNewBtn.emit();
|
|
513
|
-
}
|
|
514
|
-
onEditClick() {
|
|
515
|
-
this.clickedEditBtn.emit();
|
|
516
|
-
}
|
|
517
|
-
onRemoveClick() {
|
|
518
|
-
this.clickedRemoveBtn.emit();
|
|
519
|
-
}
|
|
520
|
-
onCopyClick() {
|
|
521
|
-
this.clickedCopyBtn.emit();
|
|
522
|
-
}
|
|
523
|
-
onExcelClick() {
|
|
524
|
-
this.clickedExcelBtn.emit();
|
|
525
|
-
}
|
|
526
|
-
onCsvClick() {
|
|
527
|
-
this.clickedCsvBtn.emit();
|
|
528
|
-
}
|
|
529
|
-
onPdfClick() {
|
|
530
|
-
this.clickedPdfBtn.emit();
|
|
531
|
-
}
|
|
532
|
-
onPrintClick() {
|
|
533
|
-
this.clickedPrintBtn.emit();
|
|
534
|
-
}
|
|
535
|
-
onRefreshGridClick() {
|
|
536
|
-
this.clickedRefreshBtn.emit();
|
|
537
|
-
}
|
|
538
|
-
onClearClick() {
|
|
539
|
-
this.clickedClearBtn.emit();
|
|
540
|
-
}
|
|
541
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
542
|
-
minVersion: "12.0.0",
|
|
543
|
-
version: "22.2.2",
|
|
544
|
-
ngImport: i0,
|
|
545
|
-
type: BaseToolbarComponent,
|
|
546
|
-
deps: [],
|
|
547
|
-
target: i0.ɵɵFactoryTarget.Component
|
|
548
|
-
});
|
|
549
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
550
|
-
minVersion: "17.0.0",
|
|
551
|
-
version: "22.2.2",
|
|
552
|
-
type: BaseToolbarComponent,
|
|
553
|
-
isStandalone: true,
|
|
554
|
-
selector: "ngx-uik-base-toolbar",
|
|
555
|
-
inputs: {
|
|
556
|
-
rolesNewBtn: {
|
|
557
|
-
classPropertyName: "rolesNewBtn",
|
|
558
|
-
publicName: "rolesNewBtn",
|
|
559
|
-
isSignal: true,
|
|
560
|
-
isRequired: false,
|
|
561
|
-
transformFunction: null
|
|
562
|
-
},
|
|
563
|
-
rolesEditBtn: {
|
|
564
|
-
classPropertyName: "rolesEditBtn",
|
|
565
|
-
publicName: "rolesEditBtn",
|
|
566
|
-
isSignal: true,
|
|
567
|
-
isRequired: false,
|
|
568
|
-
transformFunction: null
|
|
569
|
-
},
|
|
570
|
-
rolesRemoveBtn: {
|
|
571
|
-
classPropertyName: "rolesRemoveBtn",
|
|
572
|
-
publicName: "rolesRemoveBtn",
|
|
573
|
-
isSignal: true,
|
|
574
|
-
isRequired: false,
|
|
575
|
-
transformFunction: null
|
|
576
|
-
},
|
|
577
|
-
rolesCopyBtn: {
|
|
578
|
-
classPropertyName: "rolesCopyBtn",
|
|
579
|
-
publicName: "rolesCopyBtn",
|
|
580
|
-
isSignal: true,
|
|
581
|
-
isRequired: false,
|
|
582
|
-
transformFunction: null
|
|
583
|
-
},
|
|
584
|
-
rolesExcelBtn: {
|
|
585
|
-
classPropertyName: "rolesExcelBtn",
|
|
586
|
-
publicName: "rolesExcelBtn",
|
|
587
|
-
isSignal: true,
|
|
588
|
-
isRequired: false,
|
|
589
|
-
transformFunction: null
|
|
590
|
-
},
|
|
591
|
-
rolesCsvBtn: {
|
|
592
|
-
classPropertyName: "rolesCsvBtn",
|
|
593
|
-
publicName: "rolesCsvBtn",
|
|
594
|
-
isSignal: true,
|
|
595
|
-
isRequired: false,
|
|
596
|
-
transformFunction: null
|
|
597
|
-
},
|
|
598
|
-
rolesPdfBtn: {
|
|
599
|
-
classPropertyName: "rolesPdfBtn",
|
|
600
|
-
publicName: "rolesPdfBtn",
|
|
601
|
-
isSignal: true,
|
|
602
|
-
isRequired: false,
|
|
603
|
-
transformFunction: null
|
|
604
|
-
},
|
|
605
|
-
rolesPrintBtn: {
|
|
606
|
-
classPropertyName: "rolesPrintBtn",
|
|
607
|
-
publicName: "rolesPrintBtn",
|
|
608
|
-
isSignal: true,
|
|
609
|
-
isRequired: false,
|
|
610
|
-
transformFunction: null
|
|
611
|
-
},
|
|
612
|
-
rolesRefreshBtn: {
|
|
613
|
-
classPropertyName: "rolesRefreshBtn",
|
|
614
|
-
publicName: "rolesRefreshBtn",
|
|
615
|
-
isSignal: true,
|
|
616
|
-
isRequired: false,
|
|
617
|
-
transformFunction: null
|
|
618
|
-
},
|
|
619
|
-
rolesClearBtn: {
|
|
620
|
-
classPropertyName: "rolesClearBtn",
|
|
621
|
-
publicName: "rolesClearBtn",
|
|
622
|
-
isSignal: true,
|
|
623
|
-
isRequired: false,
|
|
624
|
-
transformFunction: null
|
|
625
|
-
},
|
|
626
|
-
newBtnDisabled: {
|
|
627
|
-
classPropertyName: "newBtnDisabled",
|
|
628
|
-
publicName: "newBtnDisabled",
|
|
629
|
-
isSignal: true,
|
|
630
|
-
isRequired: false,
|
|
631
|
-
transformFunction: null
|
|
632
|
-
},
|
|
633
|
-
editBtnDisabled: {
|
|
634
|
-
classPropertyName: "editBtnDisabled",
|
|
635
|
-
publicName: "editBtnDisabled",
|
|
636
|
-
isSignal: true,
|
|
637
|
-
isRequired: false,
|
|
638
|
-
transformFunction: null
|
|
639
|
-
},
|
|
640
|
-
removeBtnDisabled: {
|
|
641
|
-
classPropertyName: "removeBtnDisabled",
|
|
642
|
-
publicName: "removeBtnDisabled",
|
|
643
|
-
isSignal: true,
|
|
644
|
-
isRequired: false,
|
|
645
|
-
transformFunction: null
|
|
646
|
-
},
|
|
647
|
-
copyBtnDisabled: {
|
|
648
|
-
classPropertyName: "copyBtnDisabled",
|
|
649
|
-
publicName: "copyBtnDisabled",
|
|
650
|
-
isSignal: true,
|
|
651
|
-
isRequired: false,
|
|
652
|
-
transformFunction: null
|
|
653
|
-
},
|
|
654
|
-
excelBtnDisabled: {
|
|
655
|
-
classPropertyName: "excelBtnDisabled",
|
|
656
|
-
publicName: "excelBtnDisabled",
|
|
657
|
-
isSignal: true,
|
|
658
|
-
isRequired: false,
|
|
659
|
-
transformFunction: null
|
|
660
|
-
},
|
|
661
|
-
csvBtnDisabled: {
|
|
662
|
-
classPropertyName: "csvBtnDisabled",
|
|
663
|
-
publicName: "csvBtnDisabled",
|
|
664
|
-
isSignal: true,
|
|
665
|
-
isRequired: false,
|
|
666
|
-
transformFunction: null
|
|
667
|
-
},
|
|
668
|
-
pdfBtnDisabled: {
|
|
669
|
-
classPropertyName: "pdfBtnDisabled",
|
|
670
|
-
publicName: "pdfBtnDisabled",
|
|
671
|
-
isSignal: true,
|
|
672
|
-
isRequired: false,
|
|
673
|
-
transformFunction: null
|
|
674
|
-
},
|
|
675
|
-
printBtnDisabled: {
|
|
676
|
-
classPropertyName: "printBtnDisabled",
|
|
677
|
-
publicName: "printBtnDisabled",
|
|
678
|
-
isSignal: true,
|
|
679
|
-
isRequired: false,
|
|
680
|
-
transformFunction: null
|
|
681
|
-
},
|
|
682
|
-
refreshBtnDisabled: {
|
|
683
|
-
classPropertyName: "refreshBtnDisabled",
|
|
684
|
-
publicName: "refreshBtnDisabled",
|
|
685
|
-
isSignal: true,
|
|
686
|
-
isRequired: false,
|
|
687
|
-
transformFunction: null
|
|
688
|
-
},
|
|
689
|
-
clearBtnDisabled: {
|
|
690
|
-
classPropertyName: "clearBtnDisabled",
|
|
691
|
-
publicName: "clearBtnDisabled",
|
|
692
|
-
isSignal: true,
|
|
693
|
-
isRequired: false,
|
|
694
|
-
transformFunction: null
|
|
695
|
-
},
|
|
696
|
-
newBtnTooltip: {
|
|
697
|
-
classPropertyName: "newBtnTooltip",
|
|
698
|
-
publicName: "newBtnTooltip",
|
|
699
|
-
isSignal: true,
|
|
700
|
-
isRequired: false,
|
|
701
|
-
transformFunction: null
|
|
702
|
-
},
|
|
703
|
-
editBtnTooltip: {
|
|
704
|
-
classPropertyName: "editBtnTooltip",
|
|
705
|
-
publicName: "editBtnTooltip",
|
|
706
|
-
isSignal: true,
|
|
707
|
-
isRequired: false,
|
|
708
|
-
transformFunction: null
|
|
709
|
-
},
|
|
710
|
-
removeBtnTooltip: {
|
|
711
|
-
classPropertyName: "removeBtnTooltip",
|
|
712
|
-
publicName: "removeBtnTooltip",
|
|
713
|
-
isSignal: true,
|
|
714
|
-
isRequired: false,
|
|
715
|
-
transformFunction: null
|
|
716
|
-
},
|
|
717
|
-
copyBtnTooltip: {
|
|
718
|
-
classPropertyName: "copyBtnTooltip",
|
|
719
|
-
publicName: "copyBtnTooltip",
|
|
720
|
-
isSignal: true,
|
|
721
|
-
isRequired: false,
|
|
722
|
-
transformFunction: null
|
|
723
|
-
},
|
|
724
|
-
excelBtnTooltip: {
|
|
725
|
-
classPropertyName: "excelBtnTooltip",
|
|
726
|
-
publicName: "excelBtnTooltip",
|
|
727
|
-
isSignal: true,
|
|
728
|
-
isRequired: false,
|
|
729
|
-
transformFunction: null
|
|
730
|
-
},
|
|
731
|
-
csvBtnTooltip: {
|
|
732
|
-
classPropertyName: "csvBtnTooltip",
|
|
733
|
-
publicName: "csvBtnTooltip",
|
|
734
|
-
isSignal: true,
|
|
735
|
-
isRequired: false,
|
|
736
|
-
transformFunction: null
|
|
737
|
-
},
|
|
738
|
-
pdfBtnTooltip: {
|
|
739
|
-
classPropertyName: "pdfBtnTooltip",
|
|
740
|
-
publicName: "pdfBtnTooltip",
|
|
741
|
-
isSignal: true,
|
|
742
|
-
isRequired: false,
|
|
743
|
-
transformFunction: null
|
|
744
|
-
},
|
|
745
|
-
printBtnTooltip: {
|
|
746
|
-
classPropertyName: "printBtnTooltip",
|
|
747
|
-
publicName: "printBtnTooltip",
|
|
748
|
-
isSignal: true,
|
|
749
|
-
isRequired: false,
|
|
750
|
-
transformFunction: null
|
|
751
|
-
},
|
|
752
|
-
refreshBtnTooltip: {
|
|
753
|
-
classPropertyName: "refreshBtnTooltip",
|
|
754
|
-
publicName: "refreshBtnTooltip",
|
|
755
|
-
isSignal: true,
|
|
756
|
-
isRequired: false,
|
|
757
|
-
transformFunction: null
|
|
758
|
-
},
|
|
759
|
-
clearBtnTooltip: {
|
|
760
|
-
classPropertyName: "clearBtnTooltip",
|
|
761
|
-
publicName: "clearBtnTooltip",
|
|
762
|
-
isSignal: true,
|
|
763
|
-
isRequired: false,
|
|
764
|
-
transformFunction: null
|
|
765
|
-
},
|
|
766
|
-
newBtnOpt: {
|
|
767
|
-
classPropertyName: "newBtnOpt",
|
|
768
|
-
publicName: "newBtnOpt",
|
|
769
|
-
isSignal: true,
|
|
770
|
-
isRequired: false,
|
|
771
|
-
transformFunction: null
|
|
772
|
-
}
|
|
773
|
-
},
|
|
774
|
-
outputs: {
|
|
775
|
-
clickedNewBtn: "clickedNewBtn",
|
|
776
|
-
clickedEditBtn: "clickedEditBtn",
|
|
777
|
-
clickedRemoveBtn: "clickedRemoveBtn",
|
|
778
|
-
clickedCopyBtn: "clickedCopyBtn",
|
|
779
|
-
clickedExcelBtn: "clickedExcelBtn",
|
|
780
|
-
clickedCsvBtn: "clickedCsvBtn",
|
|
781
|
-
clickedPdfBtn: "clickedPdfBtn",
|
|
782
|
-
clickedPrintBtn: "clickedPrintBtn",
|
|
783
|
-
clickedRefreshBtn: "clickedRefreshBtn",
|
|
784
|
-
clickedClearBtn: "clickedClearBtn"
|
|
785
|
-
},
|
|
786
|
-
ngImport: i0,
|
|
787
|
-
template: "<mat-toolbar>\r\n @if (isNewBtnVisible()) {\r\n @if (newBtnOpt() && newBtnOpt().length > 0) {\r\n <button [disabled]=\"newBtnDisabled()\" [matMenuTriggerFor]=\"menuNewBtn\"\r\n mat-icon-button [matTooltip]=\"newBtnTooltip()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n <mat-menu #menuNewBtn=\"matMenu\">\r\n @for (menuItem of newBtnOpt(); track menuItem) {\r\n @if (menuItem.title === '-' && !(menuItem.hideFn ? menuItem.hideFn(\"\") : menuItem.hide)) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (menuItem.title !== '-' && !(menuItem.hideFn ? menuItem.hideFn(\"\") : menuItem.hide)) {\r\n <button mat-menu-item\r\n (click)=\"menuItem.onClickFn ? menuItem.onClickFn('') : ''\"\r\n [disabled]=\"menuItem.disabledFn ? menuItem.disabledFn('') : menuItem.disabled\">\r\n @if (menuItem.icon) {\r\n <mat-icon>{{menuItem.icon}}</mat-icon>\r\n }\r\n {{ menuItem.title }}\r\n </button>\r\n }\r\n }\r\n </mat-menu>\r\n } \r\n @else {\r\n <button [disabled]=\"newBtnDisabled()\" (click)=\"onNewClick()\"\r\n mat-icon-button routerLink=\"new\" routerLinkActive=\"active\" [matTooltip]=\"newBtnTooltip()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n }\r\n }\r\n\r\n @if (isEditBtnVisible()) {\r\n <button [disabled]=\"editBtnDisabled()\" (click)=\"onEditClick()\"\r\n mat-icon-button routerLink=\"edit\" color=\"primary\" routerLinkActive=\"active\" [matTooltip]=\"editBtnTooltip()\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n @if (isRemoveBtnVisible()) {\r\n <button [disabled]=\"removeBtnDisabled()\" (click)=\"onRemoveClick()\"\r\n mat-icon-button routerLink=\"delete\" color=\"warn\" routerLinkActive=\"active\" [matTooltip]=\"removeBtnTooltip()\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n }\r\n @if (isCopyBtnVisible()) {\r\n <button [disabled]=\"copyBtnDisabled()\" (click)=\"onCopyClick()\"\r\n mat-icon-button routerLink=\"delete\" routerLinkActive=\"active\" [matTooltip]=\"copyBtnTooltip()\">\r\n <mat-icon>content_copy</mat-icon>\r\n </button>\r\n }\r\n @if (isExcelBtnVisible()) {\r\n <button [disabled]=\"excelBtnDisabled()\" (click)=\"onExcelClick()\"\r\n mat-icon-button routerLink=\"excel\" routerLinkActive=\"active\" [matTooltip]=\"excelBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">explicit</mat-icon>\r\n </button>\r\n }\r\n @if (isCsvBtnVisible()) {\r\n <button [disabled]=\"csvBtnDisabled()\" (click)=\"onCsvClick()\"\r\n mat-icon-button routerLink=\"csv\" routerLinkActive=\"active\" [matTooltip]=\"csvBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">download</mat-icon>\r\n </button>\r\n }\r\n @if (isPdfBtnVisible()) {\r\n <button [disabled]=\"pdfBtnDisabled()\" (click)=\"onPdfClick()\"\r\n mat-icon-button routerLink=\"pdf\" routerLinkActive=\"active\" [matTooltip]=\"pdfBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">picture_as_pdf</mat-icon>\r\n </button>\r\n }\r\n @if (isPrintBtnVisible()) {\r\n <button [disabled]=\"printBtnDisabled()\" (click)=\"onPrintClick()\"\r\n mat-icon-button routerLink=\"print\" routerLinkActive=\"active\" [matTooltip]=\"printBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">print_outline</mat-icon>\r\n </button>\r\n }\r\n @if (isRefreshBtnVisible()) {\r\n <button [disabled]=\"refreshBtnDisabled()\" (click)=\"onRefreshGridClick()\"\r\n mat-icon-button routerLink=\"refresh\" routerLinkActive=\"active\" [matTooltip]=\"refreshBtnTooltip()\">\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n }\r\n @if (isClearBtnVisible()) {\r\n <button [disabled]=\"clearBtnDisabled()\" (click)=\"onClearClick()\"\r\n mat-icon-button routerLink=\"clear\" routerLinkActive=\"active\" [matTooltip]=\"clearBtnTooltip()\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n</mat-toolbar>\r\n",
|
|
788
|
-
styles: [""],
|
|
789
|
-
dependencies: [
|
|
790
|
-
{
|
|
791
|
-
kind: "component",
|
|
792
|
-
type: MatToolbar,
|
|
793
|
-
selector: "mat-toolbar",
|
|
794
|
-
inputs: ["color"],
|
|
795
|
-
exportAs: ["matToolbar"]
|
|
796
|
-
},
|
|
797
|
-
{
|
|
798
|
-
kind: "component",
|
|
799
|
-
type: MatIconButton,
|
|
800
|
-
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
801
|
-
exportAs: ["matButton", "matAnchor"]
|
|
802
|
-
},
|
|
803
|
-
{
|
|
804
|
-
kind: "directive",
|
|
805
|
-
type: MatTooltip,
|
|
806
|
-
selector: "[matTooltip]",
|
|
807
|
-
inputs: [
|
|
808
|
-
"matTooltipPosition",
|
|
809
|
-
"matTooltipPositionAtOrigin",
|
|
810
|
-
"matTooltipDisabled",
|
|
811
|
-
"matTooltipShowDelay",
|
|
812
|
-
"matTooltipHideDelay",
|
|
813
|
-
"matTooltipTouchGestures",
|
|
814
|
-
"matTooltip",
|
|
815
|
-
"matTooltipClass"
|
|
816
|
-
],
|
|
817
|
-
exportAs: ["matTooltip"]
|
|
818
|
-
},
|
|
819
|
-
{
|
|
820
|
-
kind: "component",
|
|
821
|
-
type: MatIcon,
|
|
822
|
-
selector: "mat-icon",
|
|
823
|
-
inputs: [
|
|
824
|
-
"color",
|
|
825
|
-
"inline",
|
|
826
|
-
"svgIcon",
|
|
827
|
-
"fontSet",
|
|
828
|
-
"fontIcon"
|
|
829
|
-
],
|
|
830
|
-
exportAs: ["matIcon"]
|
|
831
|
-
},
|
|
832
|
-
{
|
|
833
|
-
kind: "component",
|
|
834
|
-
type: MatMenu,
|
|
835
|
-
selector: "mat-menu",
|
|
836
|
-
inputs: [
|
|
837
|
-
"backdropClass",
|
|
838
|
-
"aria-label",
|
|
839
|
-
"aria-labelledby",
|
|
840
|
-
"aria-describedby",
|
|
841
|
-
"xPosition",
|
|
842
|
-
"yPosition",
|
|
843
|
-
"overlapTrigger",
|
|
844
|
-
"hasBackdrop",
|
|
845
|
-
"class",
|
|
846
|
-
"classList"
|
|
847
|
-
],
|
|
848
|
-
outputs: ["closed", "close"],
|
|
849
|
-
exportAs: ["matMenu"]
|
|
850
|
-
},
|
|
851
|
-
{
|
|
852
|
-
kind: "component",
|
|
853
|
-
type: MatDivider,
|
|
854
|
-
selector: "mat-divider",
|
|
855
|
-
inputs: ["vertical", "inset"]
|
|
856
|
-
},
|
|
857
|
-
{
|
|
858
|
-
kind: "directive",
|
|
859
|
-
type: MatMenuTrigger,
|
|
860
|
-
selector: "[mat-menu-trigger-for], [matMenuTriggerFor]",
|
|
861
|
-
inputs: [
|
|
862
|
-
"mat-menu-trigger-for",
|
|
863
|
-
"matMenuTriggerFor",
|
|
864
|
-
"matMenuTriggerData",
|
|
865
|
-
"matMenuTriggerRestoreFocus"
|
|
866
|
-
],
|
|
867
|
-
outputs: [
|
|
868
|
-
"menuOpened",
|
|
869
|
-
"onMenuOpen",
|
|
870
|
-
"menuClosed",
|
|
871
|
-
"onMenuClose"
|
|
872
|
-
],
|
|
873
|
-
exportAs: ["matMenuTrigger"]
|
|
874
|
-
},
|
|
875
|
-
{
|
|
876
|
-
kind: "component",
|
|
877
|
-
type: MatMenuItem,
|
|
878
|
-
selector: "[mat-menu-item]",
|
|
879
|
-
inputs: [
|
|
880
|
-
"role",
|
|
881
|
-
"disabled",
|
|
882
|
-
"disabledInteractive",
|
|
883
|
-
"disableRipple"
|
|
884
|
-
],
|
|
885
|
-
exportAs: ["matMenuItem"]
|
|
886
|
-
}
|
|
887
|
-
],
|
|
888
|
-
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
889
|
-
});
|
|
890
|
-
};
|
|
891
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
892
|
-
minVersion: "12.0.0",
|
|
893
|
-
version: "22.2.2",
|
|
894
|
-
ngImport: i0,
|
|
895
|
-
type: BaseToolbarComponent,
|
|
896
|
-
decorators: [{
|
|
897
|
-
type: Component,
|
|
898
|
-
args: [{
|
|
899
|
-
selector: "ngx-uik-base-toolbar",
|
|
900
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
901
|
-
imports: [
|
|
902
|
-
MatToolbar,
|
|
903
|
-
MatIconButton,
|
|
904
|
-
MatTooltip,
|
|
905
|
-
MatIcon,
|
|
906
|
-
MatMenu,
|
|
907
|
-
MatDivider,
|
|
908
|
-
MatMenuTrigger,
|
|
909
|
-
MatMenuItem
|
|
910
|
-
],
|
|
911
|
-
template: "<mat-toolbar>\r\n @if (isNewBtnVisible()) {\r\n @if (newBtnOpt() && newBtnOpt().length > 0) {\r\n <button [disabled]=\"newBtnDisabled()\" [matMenuTriggerFor]=\"menuNewBtn\"\r\n mat-icon-button [matTooltip]=\"newBtnTooltip()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n <mat-menu #menuNewBtn=\"matMenu\">\r\n @for (menuItem of newBtnOpt(); track menuItem) {\r\n @if (menuItem.title === '-' && !(menuItem.hideFn ? menuItem.hideFn(\"\") : menuItem.hide)) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (menuItem.title !== '-' && !(menuItem.hideFn ? menuItem.hideFn(\"\") : menuItem.hide)) {\r\n <button mat-menu-item\r\n (click)=\"menuItem.onClickFn ? menuItem.onClickFn('') : ''\"\r\n [disabled]=\"menuItem.disabledFn ? menuItem.disabledFn('') : menuItem.disabled\">\r\n @if (menuItem.icon) {\r\n <mat-icon>{{menuItem.icon}}</mat-icon>\r\n }\r\n {{ menuItem.title }}\r\n </button>\r\n }\r\n }\r\n </mat-menu>\r\n } \r\n @else {\r\n <button [disabled]=\"newBtnDisabled()\" (click)=\"onNewClick()\"\r\n mat-icon-button routerLink=\"new\" routerLinkActive=\"active\" [matTooltip]=\"newBtnTooltip()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n }\r\n }\r\n\r\n @if (isEditBtnVisible()) {\r\n <button [disabled]=\"editBtnDisabled()\" (click)=\"onEditClick()\"\r\n mat-icon-button routerLink=\"edit\" color=\"primary\" routerLinkActive=\"active\" [matTooltip]=\"editBtnTooltip()\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n @if (isRemoveBtnVisible()) {\r\n <button [disabled]=\"removeBtnDisabled()\" (click)=\"onRemoveClick()\"\r\n mat-icon-button routerLink=\"delete\" color=\"warn\" routerLinkActive=\"active\" [matTooltip]=\"removeBtnTooltip()\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n }\r\n @if (isCopyBtnVisible()) {\r\n <button [disabled]=\"copyBtnDisabled()\" (click)=\"onCopyClick()\"\r\n mat-icon-button routerLink=\"delete\" routerLinkActive=\"active\" [matTooltip]=\"copyBtnTooltip()\">\r\n <mat-icon>content_copy</mat-icon>\r\n </button>\r\n }\r\n @if (isExcelBtnVisible()) {\r\n <button [disabled]=\"excelBtnDisabled()\" (click)=\"onExcelClick()\"\r\n mat-icon-button routerLink=\"excel\" routerLinkActive=\"active\" [matTooltip]=\"excelBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">explicit</mat-icon>\r\n </button>\r\n }\r\n @if (isCsvBtnVisible()) {\r\n <button [disabled]=\"csvBtnDisabled()\" (click)=\"onCsvClick()\"\r\n mat-icon-button routerLink=\"csv\" routerLinkActive=\"active\" [matTooltip]=\"csvBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">download</mat-icon>\r\n </button>\r\n }\r\n @if (isPdfBtnVisible()) {\r\n <button [disabled]=\"pdfBtnDisabled()\" (click)=\"onPdfClick()\"\r\n mat-icon-button routerLink=\"pdf\" routerLinkActive=\"active\" [matTooltip]=\"pdfBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">picture_as_pdf</mat-icon>\r\n </button>\r\n }\r\n @if (isPrintBtnVisible()) {\r\n <button [disabled]=\"printBtnDisabled()\" (click)=\"onPrintClick()\"\r\n mat-icon-button routerLink=\"print\" routerLinkActive=\"active\" [matTooltip]=\"printBtnTooltip()\">\r\n <mat-icon class=\"material-icons-outlined\">print_outline</mat-icon>\r\n </button>\r\n }\r\n @if (isRefreshBtnVisible()) {\r\n <button [disabled]=\"refreshBtnDisabled()\" (click)=\"onRefreshGridClick()\"\r\n mat-icon-button routerLink=\"refresh\" routerLinkActive=\"active\" [matTooltip]=\"refreshBtnTooltip()\">\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n }\r\n @if (isClearBtnVisible()) {\r\n <button [disabled]=\"clearBtnDisabled()\" (click)=\"onClearClick()\"\r\n mat-icon-button routerLink=\"clear\" routerLinkActive=\"active\" [matTooltip]=\"clearBtnTooltip()\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n</mat-toolbar>\r\n"
|
|
912
|
-
}]
|
|
913
|
-
}],
|
|
914
|
-
propDecorators: {
|
|
915
|
-
rolesNewBtn: [{
|
|
916
|
-
type: i0.Input,
|
|
917
|
-
args: [{
|
|
918
|
-
isSignal: true,
|
|
919
|
-
alias: "rolesNewBtn",
|
|
920
|
-
required: false
|
|
921
|
-
}]
|
|
922
|
-
}],
|
|
923
|
-
rolesEditBtn: [{
|
|
924
|
-
type: i0.Input,
|
|
925
|
-
args: [{
|
|
926
|
-
isSignal: true,
|
|
927
|
-
alias: "rolesEditBtn",
|
|
928
|
-
required: false
|
|
929
|
-
}]
|
|
930
|
-
}],
|
|
931
|
-
rolesRemoveBtn: [{
|
|
932
|
-
type: i0.Input,
|
|
933
|
-
args: [{
|
|
934
|
-
isSignal: true,
|
|
935
|
-
alias: "rolesRemoveBtn",
|
|
936
|
-
required: false
|
|
937
|
-
}]
|
|
516
|
+
rolesRemoveBtn: [{
|
|
517
|
+
type: i0.Input,
|
|
518
|
+
args: [{
|
|
519
|
+
isSignal: true,
|
|
520
|
+
alias: "rolesRemoveBtn",
|
|
521
|
+
required: false
|
|
522
|
+
}]
|
|
938
523
|
}],
|
|
939
524
|
rolesCopyBtn: [{
|
|
940
525
|
type: i0.Input,
|
|
@@ -1437,50 +1022,68 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1437
1022
|
decorators: [{ type: Service }]
|
|
1438
1023
|
});
|
|
1439
1024
|
var SseService = class SseService {
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
constructor() {
|
|
1025
|
+
destroyRef = inject(DestroyRef);
|
|
1026
|
+
activeEventSource = null;
|
|
1027
|
+
stop$ = new Subject();
|
|
1028
|
+
constructor() {
|
|
1029
|
+
this.destroyRef.onDestroy(() => this.closeSseEventSource());
|
|
1030
|
+
}
|
|
1444
1031
|
createSseEventSource(baseUrl, user, topic) {
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1032
|
+
return new Observable((subscriber) => {
|
|
1033
|
+
let eventSource = null;
|
|
1034
|
+
let reconnectTimeoutId = null;
|
|
1035
|
+
let isClosed = false;
|
|
1036
|
+
const stopSubscription = this.stop$.subscribe(() => {
|
|
1037
|
+
cleanUp();
|
|
1038
|
+
subscriber.complete();
|
|
1039
|
+
});
|
|
1040
|
+
const connect = () => {
|
|
1041
|
+
if (isClosed) return;
|
|
1042
|
+
const topicUri = topic.getTopic(baseUrl, user);
|
|
1043
|
+
eventSource = new EventSource(topicUri);
|
|
1044
|
+
this.activeEventSource = eventSource;
|
|
1045
|
+
eventSource.onmessage = (event) => {
|
|
1046
|
+
try {
|
|
1047
|
+
const messageData = JSON.parse(event.data);
|
|
1048
|
+
subscriber.next(messageData);
|
|
1049
|
+
} catch (err) {
|
|
1050
|
+
console.error("Ошибка парсинга SSE данных:", err);
|
|
1051
|
+
}
|
|
1052
|
+
};
|
|
1053
|
+
eventSource.onopen = () => {
|
|
1054
|
+
console.log("SSE connection opened.");
|
|
1055
|
+
};
|
|
1056
|
+
eventSource.onerror = (error) => {
|
|
1057
|
+
console.error("SSE error:", error);
|
|
1058
|
+
if (eventSource) eventSource.close();
|
|
1059
|
+
if (!isClosed) {
|
|
1060
|
+
console.log("Reconnecting to SSE in 1 second...");
|
|
1061
|
+
reconnectTimeoutId = setTimeout(() => connect(), 1e3);
|
|
1062
|
+
}
|
|
1063
|
+
};
|
|
1457
1064
|
};
|
|
1458
|
-
|
|
1459
|
-
|
|
1065
|
+
const cleanUp = () => {
|
|
1066
|
+
isClosed = true;
|
|
1067
|
+
if (reconnectTimeoutId) clearTimeout(reconnectTimeoutId);
|
|
1068
|
+
if (eventSource) {
|
|
1069
|
+
eventSource.close();
|
|
1070
|
+
if (this.activeEventSource === eventSource) this.activeEventSource = null;
|
|
1071
|
+
console.log("SSE Connection closed");
|
|
1072
|
+
}
|
|
1460
1073
|
};
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1074
|
+
connect();
|
|
1075
|
+
return () => {
|
|
1076
|
+
stopSubscription.unsubscribe();
|
|
1077
|
+
cleanUp();
|
|
1464
1078
|
};
|
|
1465
|
-
}
|
|
1466
|
-
return subject.asObservable();
|
|
1467
|
-
}
|
|
1468
|
-
reconnectOnError(baseUrl, user, topic, subject) {
|
|
1469
|
-
this.closeSseEventSource();
|
|
1470
|
-
if (this.isConnected) return;
|
|
1471
|
-
console.log("Reconnecting to SSE in 1 second...");
|
|
1472
|
-
setTimeout(() => {
|
|
1473
|
-
this.zone.run(() => {
|
|
1474
|
-
this.createSseEventSource(baseUrl, user, topic).subscribe(subject);
|
|
1475
|
-
});
|
|
1476
|
-
}, 1e3);
|
|
1079
|
+
});
|
|
1477
1080
|
}
|
|
1478
1081
|
closeSseEventSource() {
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
this.
|
|
1482
|
-
this.
|
|
1483
|
-
console.log("SSE Connection closed");
|
|
1082
|
+
this.stop$.next();
|
|
1083
|
+
if (this.activeEventSource) {
|
|
1084
|
+
this.activeEventSource.close();
|
|
1085
|
+
this.activeEventSource = null;
|
|
1086
|
+
console.log("SSE Connection force closed");
|
|
1484
1087
|
}
|
|
1485
1088
|
}
|
|
1486
1089
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
@@ -1489,13 +1092,14 @@ var SseService = class SseService {
|
|
|
1489
1092
|
ngImport: i0,
|
|
1490
1093
|
type: SseService,
|
|
1491
1094
|
deps: [],
|
|
1492
|
-
target: i0.ɵɵFactoryTarget.
|
|
1095
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1493
1096
|
});
|
|
1494
|
-
static ɵprov = i0.ɵɵ
|
|
1495
|
-
minVersion: "
|
|
1097
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1098
|
+
minVersion: "12.0.0",
|
|
1496
1099
|
version: "22.2.2",
|
|
1497
1100
|
ngImport: i0,
|
|
1498
|
-
type: SseService
|
|
1101
|
+
type: SseService,
|
|
1102
|
+
providedIn: "root"
|
|
1499
1103
|
});
|
|
1500
1104
|
};
|
|
1501
1105
|
i0.ɵɵngDeclareClassMetadata({
|
|
@@ -1503,7 +1107,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1503
1107
|
version: "22.2.2",
|
|
1504
1108
|
ngImport: i0,
|
|
1505
1109
|
type: SseService,
|
|
1506
|
-
decorators: [{
|
|
1110
|
+
decorators: [{
|
|
1111
|
+
type: Injectable,
|
|
1112
|
+
args: [{ providedIn: "root" }]
|
|
1113
|
+
}],
|
|
1507
1114
|
ctorParameters: () => []
|
|
1508
1115
|
});
|
|
1509
1116
|
var BaseFilterClass = class BaseFilterClass {
|
|
@@ -2032,6 +1639,7 @@ var BaseSignalEditClass = class BaseSignalEditClass {
|
|
|
2032
1639
|
formAction = computed(() => this.dialogData().action, ...ngDevMode ? [{ debugName: "formAction" }] : /* istanbul ignore next */ []);
|
|
2033
1640
|
formActionIsAdd = computed(() => this.dialogData().action === Action.Add, ...ngDevMode ? [{ debugName: "formActionIsAdd" }] : /* istanbul ignore next */ []);
|
|
2034
1641
|
formActionIsEdit = computed(() => this.dialogData().action === Action.Edit, ...ngDevMode ? [{ debugName: "formActionIsEdit" }] : /* istanbul ignore next */ []);
|
|
1642
|
+
domainSchema;
|
|
2035
1643
|
domainModel = computed(() => this.dialogData().entity, ...ngDevMode ? [{ debugName: "domainModel" }] : /* istanbul ignore next */ []);
|
|
2036
1644
|
formModel = linkedSignal({
|
|
2037
1645
|
...ngDevMode ? { debugName: "formModel" } : /* istanbul ignore next */ {},
|
|
@@ -2046,6 +1654,7 @@ var BaseSignalEditClass = class BaseSignalEditClass {
|
|
|
2046
1654
|
return { ...domainModel };
|
|
2047
1655
|
}
|
|
2048
1656
|
formModelToDomainModel(formModel, originalDomain) {
|
|
1657
|
+
if (this.domainSchema) return this.domainSchema.parse(formModel);
|
|
2049
1658
|
return {
|
|
2050
1659
|
...originalDomain,
|
|
2051
1660
|
...formModel
|
|
@@ -2731,61 +2340,173 @@ var BaseSignalServiceClass = class BaseSignalServiceClass {
|
|
|
2731
2340
|
minVersion: "12.0.0",
|
|
2732
2341
|
version: "22.2.2",
|
|
2733
2342
|
ngImport: i0,
|
|
2734
|
-
type: BaseSignalServiceClass,
|
|
2343
|
+
type: BaseSignalServiceClass,
|
|
2344
|
+
deps: [],
|
|
2345
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
2346
|
+
});
|
|
2347
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
2348
|
+
minVersion: "12.0.0",
|
|
2349
|
+
version: "22.2.2",
|
|
2350
|
+
ngImport: i0,
|
|
2351
|
+
type: BaseSignalServiceClass,
|
|
2352
|
+
providedIn: "root"
|
|
2353
|
+
});
|
|
2354
|
+
};
|
|
2355
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2356
|
+
minVersion: "12.0.0",
|
|
2357
|
+
version: "22.2.2",
|
|
2358
|
+
ngImport: i0,
|
|
2359
|
+
type: BaseSignalServiceClass,
|
|
2360
|
+
decorators: [{
|
|
2361
|
+
type: Injectable,
|
|
2362
|
+
args: [{ providedIn: "root" }]
|
|
2363
|
+
}]
|
|
2364
|
+
});
|
|
2365
|
+
var DisableIfRoleDirective = class DisableIfRoleDirective {
|
|
2366
|
+
forbiddenRoles = input([], {
|
|
2367
|
+
...ngDevMode ? { debugName: "forbiddenRoles" } : /* istanbul ignore next */ {},
|
|
2368
|
+
alias: "ngxUikDisableIfRole"
|
|
2369
|
+
});
|
|
2370
|
+
el = inject(ElementRef);
|
|
2371
|
+
roleService = inject(RoleService);
|
|
2372
|
+
constructor() {
|
|
2373
|
+
effect(() => {
|
|
2374
|
+
const shouldDisable = this.roleService.hasForbiddenRole(this.forbiddenRoles());
|
|
2375
|
+
const nativeEl = this.el.nativeElement;
|
|
2376
|
+
if ("disabled" in nativeEl) nativeEl.disabled = shouldDisable;
|
|
2377
|
+
else if (shouldDisable) nativeEl.setAttribute("disabled", "true");
|
|
2378
|
+
else nativeEl.removeAttribute("disabled");
|
|
2379
|
+
});
|
|
2380
|
+
}
|
|
2381
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2382
|
+
minVersion: "12.0.0",
|
|
2383
|
+
version: "22.2.2",
|
|
2384
|
+
ngImport: i0,
|
|
2385
|
+
type: DisableIfRoleDirective,
|
|
2386
|
+
deps: [],
|
|
2387
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
2388
|
+
});
|
|
2389
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
2390
|
+
minVersion: "17.1.0",
|
|
2391
|
+
version: "22.2.2",
|
|
2392
|
+
type: DisableIfRoleDirective,
|
|
2393
|
+
isStandalone: true,
|
|
2394
|
+
selector: "[ngxUikDisableIfRole]",
|
|
2395
|
+
inputs: { forbiddenRoles: {
|
|
2396
|
+
classPropertyName: "forbiddenRoles",
|
|
2397
|
+
publicName: "ngxUikDisableIfRole",
|
|
2398
|
+
isSignal: true,
|
|
2399
|
+
isRequired: false,
|
|
2400
|
+
transformFunction: null
|
|
2401
|
+
} },
|
|
2402
|
+
ngImport: i0
|
|
2403
|
+
});
|
|
2404
|
+
};
|
|
2405
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2406
|
+
minVersion: "12.0.0",
|
|
2407
|
+
version: "22.2.2",
|
|
2408
|
+
ngImport: i0,
|
|
2409
|
+
type: DisableIfRoleDirective,
|
|
2410
|
+
decorators: [{
|
|
2411
|
+
type: Directive,
|
|
2412
|
+
args: [{ selector: "[ngxUikDisableIfRole]" }]
|
|
2413
|
+
}],
|
|
2414
|
+
ctorParameters: () => [],
|
|
2415
|
+
propDecorators: { forbiddenRoles: [{
|
|
2416
|
+
type: i0.Input,
|
|
2417
|
+
args: [{
|
|
2418
|
+
isSignal: true,
|
|
2419
|
+
alias: "ngxUikDisableIfRole",
|
|
2420
|
+
required: false
|
|
2421
|
+
}]
|
|
2422
|
+
}] }
|
|
2423
|
+
});
|
|
2424
|
+
var HideIfForbiddenRoleDirective = class HideIfForbiddenRoleDirective {
|
|
2425
|
+
forbiddenRoles = input([], {
|
|
2426
|
+
...ngDevMode ? { debugName: "forbiddenRoles" } : /* istanbul ignore next */ {},
|
|
2427
|
+
alias: "ngxUikHideIfForbiddenRole"
|
|
2428
|
+
});
|
|
2429
|
+
el = inject(ElementRef);
|
|
2430
|
+
roleService = inject(RoleService);
|
|
2431
|
+
constructor() {
|
|
2432
|
+
effect(() => {
|
|
2433
|
+
const shouldHide = this.roleService.hasForbiddenRole(this.forbiddenRoles());
|
|
2434
|
+
this.el.nativeElement.style.display = shouldHide ? "none" : "";
|
|
2435
|
+
});
|
|
2436
|
+
}
|
|
2437
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2438
|
+
minVersion: "12.0.0",
|
|
2439
|
+
version: "22.2.2",
|
|
2440
|
+
ngImport: i0,
|
|
2441
|
+
type: HideIfForbiddenRoleDirective,
|
|
2735
2442
|
deps: [],
|
|
2736
|
-
target: i0.ɵɵFactoryTarget.
|
|
2443
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
2737
2444
|
});
|
|
2738
|
-
static
|
|
2739
|
-
minVersion: "
|
|
2445
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
2446
|
+
minVersion: "17.1.0",
|
|
2740
2447
|
version: "22.2.2",
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2448
|
+
type: HideIfForbiddenRoleDirective,
|
|
2449
|
+
isStandalone: true,
|
|
2450
|
+
selector: "[ngxUikHideIfForbiddenRole]",
|
|
2451
|
+
inputs: { forbiddenRoles: {
|
|
2452
|
+
classPropertyName: "forbiddenRoles",
|
|
2453
|
+
publicName: "ngxUikHideIfForbiddenRole",
|
|
2454
|
+
isSignal: true,
|
|
2455
|
+
isRequired: false,
|
|
2456
|
+
transformFunction: null
|
|
2457
|
+
} },
|
|
2458
|
+
ngImport: i0
|
|
2744
2459
|
});
|
|
2745
2460
|
};
|
|
2746
2461
|
i0.ɵɵngDeclareClassMetadata({
|
|
2747
2462
|
minVersion: "12.0.0",
|
|
2748
2463
|
version: "22.2.2",
|
|
2749
2464
|
ngImport: i0,
|
|
2750
|
-
type:
|
|
2465
|
+
type: HideIfForbiddenRoleDirective,
|
|
2751
2466
|
decorators: [{
|
|
2752
|
-
type:
|
|
2753
|
-
args: [{
|
|
2754
|
-
}]
|
|
2467
|
+
type: Directive,
|
|
2468
|
+
args: [{ selector: "[ngxUikHideIfForbiddenRole]" }]
|
|
2469
|
+
}],
|
|
2470
|
+
ctorParameters: () => [],
|
|
2471
|
+
propDecorators: { forbiddenRoles: [{
|
|
2472
|
+
type: i0.Input,
|
|
2473
|
+
args: [{
|
|
2474
|
+
isSignal: true,
|
|
2475
|
+
alias: "ngxUikHideIfForbiddenRole",
|
|
2476
|
+
required: false
|
|
2477
|
+
}]
|
|
2478
|
+
}] }
|
|
2755
2479
|
});
|
|
2756
|
-
var
|
|
2757
|
-
|
|
2758
|
-
...ngDevMode ? { debugName: "
|
|
2759
|
-
alias: "
|
|
2480
|
+
var SetValueDirective = class SetValueDirective {
|
|
2481
|
+
value = input(null, {
|
|
2482
|
+
...ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {},
|
|
2483
|
+
alias: "setValue"
|
|
2760
2484
|
});
|
|
2761
|
-
|
|
2762
|
-
roleService = inject(RoleService);
|
|
2485
|
+
ngControl = inject(NgControl, { optional: true });
|
|
2763
2486
|
constructor() {
|
|
2764
2487
|
effect(() => {
|
|
2765
|
-
const
|
|
2766
|
-
const
|
|
2767
|
-
if (
|
|
2768
|
-
else if (shouldDisable) nativeEl.setAttribute("disabled", "true");
|
|
2769
|
-
else nativeEl.removeAttribute("disabled");
|
|
2488
|
+
const val = this.value();
|
|
2489
|
+
const normalizedValue = val === void 0 ? null : val;
|
|
2490
|
+
if (this.ngControl && this.ngControl.control) this.ngControl.control.setValue(normalizedValue, { emitEvent: false });
|
|
2770
2491
|
});
|
|
2771
2492
|
}
|
|
2772
2493
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2773
2494
|
minVersion: "12.0.0",
|
|
2774
2495
|
version: "22.2.2",
|
|
2775
2496
|
ngImport: i0,
|
|
2776
|
-
type:
|
|
2497
|
+
type: SetValueDirective,
|
|
2777
2498
|
deps: [],
|
|
2778
2499
|
target: i0.ɵɵFactoryTarget.Directive
|
|
2779
2500
|
});
|
|
2780
2501
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
2781
2502
|
minVersion: "17.1.0",
|
|
2782
2503
|
version: "22.2.2",
|
|
2783
|
-
type:
|
|
2504
|
+
type: SetValueDirective,
|
|
2784
2505
|
isStandalone: true,
|
|
2785
|
-
selector: "[
|
|
2786
|
-
inputs: {
|
|
2787
|
-
classPropertyName: "
|
|
2788
|
-
publicName: "
|
|
2506
|
+
selector: "[setValue]",
|
|
2507
|
+
inputs: { value: {
|
|
2508
|
+
classPropertyName: "value",
|
|
2509
|
+
publicName: "setValue",
|
|
2789
2510
|
isSignal: true,
|
|
2790
2511
|
isRequired: false,
|
|
2791
2512
|
transformFunction: null
|
|
@@ -2797,556 +2518,776 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2797
2518
|
minVersion: "12.0.0",
|
|
2798
2519
|
version: "22.2.2",
|
|
2799
2520
|
ngImport: i0,
|
|
2800
|
-
type:
|
|
2521
|
+
type: SetValueDirective,
|
|
2801
2522
|
decorators: [{
|
|
2802
2523
|
type: Directive,
|
|
2803
|
-
args: [{ selector: "[
|
|
2524
|
+
args: [{ selector: "[setValue]" }]
|
|
2804
2525
|
}],
|
|
2805
2526
|
ctorParameters: () => [],
|
|
2806
|
-
propDecorators: {
|
|
2527
|
+
propDecorators: { value: [{
|
|
2807
2528
|
type: i0.Input,
|
|
2808
2529
|
args: [{
|
|
2809
2530
|
isSignal: true,
|
|
2810
|
-
alias: "
|
|
2531
|
+
alias: "setValue",
|
|
2811
2532
|
required: false
|
|
2812
2533
|
}]
|
|
2813
2534
|
}] }
|
|
2814
2535
|
});
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2536
|
+
const authGuard = (allowedRoles) => {
|
|
2537
|
+
return (route, state) => {
|
|
2538
|
+
const authService = inject(AuthService);
|
|
2539
|
+
const router = inject(Router);
|
|
2540
|
+
const isLogin = authService.loggedIn();
|
|
2541
|
+
if (!isLogin) {
|
|
2542
|
+
console.log("state.url =", state.url);
|
|
2543
|
+
return router.createUrlTree(["/login"], { queryParams: { returnUrl: state.url } });
|
|
2544
|
+
}
|
|
2545
|
+
return isLogin;
|
|
2546
|
+
};
|
|
2547
|
+
};
|
|
2548
|
+
const redirectGuard = (route) => {
|
|
2549
|
+
const externalUrl = route.data?.["externalUrl"];
|
|
2550
|
+
if (externalUrl) window.open(externalUrl, "_self");
|
|
2551
|
+
return true;
|
|
2552
|
+
};
|
|
2553
|
+
const roleGuard = (allowedRoles) => {
|
|
2554
|
+
return (route, state) => {
|
|
2555
|
+
return inject(RoleService).hasAnyRole(allowedRoles);
|
|
2556
|
+
};
|
|
2557
|
+
};
|
|
2558
|
+
const LOGGER_CONFIG = new InjectionToken("LOGGER_CONFIG");
|
|
2559
|
+
var LoggerService = class LoggerService {
|
|
2560
|
+
logPrefix = "";
|
|
2561
|
+
isProduction;
|
|
2562
|
+
config = inject(LOGGER_CONFIG);
|
|
2563
|
+
constructor() {
|
|
2564
|
+
this.isProduction = this.config.isProduction;
|
|
2565
|
+
}
|
|
2566
|
+
log(message, ...args) {
|
|
2567
|
+
if (!this.isProduction) {
|
|
2568
|
+
args.unshift(this.logPrefix + " ");
|
|
2569
|
+
console.log(`[DEV LOG]: ${message}`, ...args);
|
|
2570
|
+
} else console.log(`[PROD LOG]: ${message}`, ...args);
|
|
2571
|
+
}
|
|
2572
|
+
error(message, ...args) {
|
|
2573
|
+
console.error(`[ERROR]: ${message}`, ...args);
|
|
2574
|
+
}
|
|
2575
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2576
|
+
minVersion: "12.0.0",
|
|
2577
|
+
version: "22.2.2",
|
|
2578
|
+
ngImport: i0,
|
|
2579
|
+
type: LoggerService,
|
|
2580
|
+
deps: [],
|
|
2581
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
2582
|
+
});
|
|
2583
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
2584
|
+
minVersion: "22.0.0",
|
|
2585
|
+
version: "22.2.2",
|
|
2586
|
+
ngImport: i0,
|
|
2587
|
+
type: LoggerService
|
|
2588
|
+
});
|
|
2589
|
+
};
|
|
2590
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2591
|
+
minVersion: "12.0.0",
|
|
2592
|
+
version: "22.2.2",
|
|
2593
|
+
ngImport: i0,
|
|
2594
|
+
type: LoggerService,
|
|
2595
|
+
decorators: [{ type: Service }],
|
|
2596
|
+
ctorParameters: () => []
|
|
2597
|
+
});
|
|
2598
|
+
function provideLogger(config) {
|
|
2599
|
+
return makeEnvironmentProviders([{
|
|
2600
|
+
provide: LOGGER_CONFIG,
|
|
2601
|
+
useValue: config
|
|
2602
|
+
}, LoggerService]);
|
|
2603
|
+
}
|
|
2604
|
+
const secUserViewSchema = z.object({
|
|
2605
|
+
id: z.number().default(0),
|
|
2606
|
+
idHuman: z.number().default(0),
|
|
2607
|
+
loginAD: z.string().default("").nullable(),
|
|
2608
|
+
dept: z.number().default(0),
|
|
2609
|
+
tabnum: z.number().default(0),
|
|
2610
|
+
lastname: z.string().default(""),
|
|
2611
|
+
firstname: z.string().default(""),
|
|
2612
|
+
middlename: z.string().default(""),
|
|
2613
|
+
fio: z.string().default(""),
|
|
2614
|
+
dateHuman: z.coerce.date().optional(),
|
|
2615
|
+
profession: z.string().default("")
|
|
2616
|
+
});
|
|
2617
|
+
const secUserSchema = z.object({
|
|
2618
|
+
id: z.number().default(0),
|
|
2619
|
+
login: z.string().default(""),
|
|
2620
|
+
fio: z.string().default(""),
|
|
2621
|
+
dept: z.number().default(0),
|
|
2622
|
+
tabnum: z.number().default(0),
|
|
2623
|
+
userView: secUserViewSchema.optional().nullable()
|
|
2624
|
+
});
|
|
2625
|
+
var SafePipe = class SafePipe {
|
|
2626
|
+
sanitizer = inject(DomSanitizer);
|
|
2627
|
+
transform(url, type = "url") {
|
|
2628
|
+
if (!url) return "";
|
|
2629
|
+
if (typeof url !== "string") return url;
|
|
2630
|
+
switch (type) {
|
|
2631
|
+
case "html": return this.sanitizer.bypassSecurityTrustHtml(url);
|
|
2632
|
+
case "style": return this.sanitizer.bypassSecurityTrustStyle(url);
|
|
2633
|
+
case "script": return this.sanitizer.bypassSecurityTrustScript(url);
|
|
2634
|
+
case "url": return this.sanitizer.bypassSecurityTrustUrl(url);
|
|
2635
|
+
case "resourceUrl": return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
|
2636
|
+
default: throw new Error(`SafePipe: Неизвестный тип безопасности ${type}`);
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2640
|
+
minVersion: "12.0.0",
|
|
2641
|
+
version: "22.2.2",
|
|
2642
|
+
ngImport: i0,
|
|
2643
|
+
type: SafePipe,
|
|
2644
|
+
deps: [],
|
|
2645
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
2646
|
+
});
|
|
2647
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
2648
|
+
minVersion: "14.0.0",
|
|
2649
|
+
version: "22.2.2",
|
|
2650
|
+
ngImport: i0,
|
|
2651
|
+
type: SafePipe,
|
|
2652
|
+
isStandalone: true,
|
|
2653
|
+
name: "safe"
|
|
2654
|
+
});
|
|
2655
|
+
};
|
|
2656
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2657
|
+
minVersion: "12.0.0",
|
|
2658
|
+
version: "22.2.2",
|
|
2659
|
+
ngImport: i0,
|
|
2660
|
+
type: SafePipe,
|
|
2661
|
+
decorators: [{
|
|
2662
|
+
type: Pipe,
|
|
2663
|
+
args: [{ name: "safe" }]
|
|
2664
|
+
}]
|
|
2665
|
+
});
|
|
2666
|
+
var TimePipe = class TimePipe {
|
|
2667
|
+
transform(value) {
|
|
2668
|
+
const hour = Math.abs(value) >= 60 ? Math.floor(Math.abs(value) / 60).toString().padStart(2, "0") : "00";
|
|
2669
|
+
const minute = Math.abs(value % 60).toString().padStart(2, "0");
|
|
2670
|
+
const time = hour + ":" + minute;
|
|
2671
|
+
return value < 0 ? "-" + time : time;
|
|
2672
|
+
}
|
|
2673
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2674
|
+
minVersion: "12.0.0",
|
|
2675
|
+
version: "22.2.2",
|
|
2676
|
+
ngImport: i0,
|
|
2677
|
+
type: TimePipe,
|
|
2678
|
+
deps: [],
|
|
2679
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
2680
|
+
});
|
|
2681
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
2682
|
+
minVersion: "14.0.0",
|
|
2683
|
+
version: "22.2.2",
|
|
2684
|
+
ngImport: i0,
|
|
2685
|
+
type: TimePipe,
|
|
2686
|
+
isStandalone: true,
|
|
2687
|
+
name: "time"
|
|
2688
|
+
});
|
|
2689
|
+
};
|
|
2690
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2691
|
+
minVersion: "12.0.0",
|
|
2692
|
+
version: "22.2.2",
|
|
2693
|
+
ngImport: i0,
|
|
2694
|
+
type: TimePipe,
|
|
2695
|
+
decorators: [{
|
|
2696
|
+
type: Pipe,
|
|
2697
|
+
args: [{ name: "time" }]
|
|
2698
|
+
}]
|
|
2699
|
+
});
|
|
2700
|
+
var TruncatePipe = class TruncatePipe {
|
|
2701
|
+
transform(value, args) {
|
|
2702
|
+
const limit = args.length > 0 ? parseInt(args[0], 10) : 20;
|
|
2703
|
+
const trail = args.length > 1 ? args[1] : "...";
|
|
2704
|
+
return value.length > limit ? value.substring(0, limit) + trail : value;
|
|
2827
2705
|
}
|
|
2828
2706
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2829
2707
|
minVersion: "12.0.0",
|
|
2830
2708
|
version: "22.2.2",
|
|
2831
2709
|
ngImport: i0,
|
|
2832
|
-
type:
|
|
2710
|
+
type: TruncatePipe,
|
|
2833
2711
|
deps: [],
|
|
2834
|
-
target: i0.ɵɵFactoryTarget.
|
|
2712
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
2835
2713
|
});
|
|
2836
|
-
static
|
|
2837
|
-
minVersion: "
|
|
2714
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
2715
|
+
minVersion: "14.0.0",
|
|
2838
2716
|
version: "22.2.2",
|
|
2839
|
-
|
|
2717
|
+
ngImport: i0,
|
|
2718
|
+
type: TruncatePipe,
|
|
2840
2719
|
isStandalone: true,
|
|
2841
|
-
|
|
2842
|
-
inputs: { forbiddenRoles: {
|
|
2843
|
-
classPropertyName: "forbiddenRoles",
|
|
2844
|
-
publicName: "ngxUikHideIfForbiddenRole",
|
|
2845
|
-
isSignal: true,
|
|
2846
|
-
isRequired: false,
|
|
2847
|
-
transformFunction: null
|
|
2848
|
-
} },
|
|
2849
|
-
ngImport: i0
|
|
2720
|
+
name: "truncate"
|
|
2850
2721
|
});
|
|
2851
2722
|
};
|
|
2852
2723
|
i0.ɵɵngDeclareClassMetadata({
|
|
2853
2724
|
minVersion: "12.0.0",
|
|
2854
2725
|
version: "22.2.2",
|
|
2855
2726
|
ngImport: i0,
|
|
2856
|
-
type:
|
|
2727
|
+
type: TruncatePipe,
|
|
2857
2728
|
decorators: [{
|
|
2858
|
-
type:
|
|
2859
|
-
args: [{
|
|
2860
|
-
}]
|
|
2861
|
-
ctorParameters: () => [],
|
|
2862
|
-
propDecorators: { forbiddenRoles: [{
|
|
2863
|
-
type: i0.Input,
|
|
2864
|
-
args: [{
|
|
2865
|
-
isSignal: true,
|
|
2866
|
-
alias: "ngxUikHideIfForbiddenRole",
|
|
2867
|
-
required: false
|
|
2868
|
-
}]
|
|
2869
|
-
}] }
|
|
2729
|
+
type: Pipe,
|
|
2730
|
+
args: [{ name: "truncate" }]
|
|
2731
|
+
}]
|
|
2870
2732
|
});
|
|
2871
|
-
var
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2733
|
+
var ChipInputAutocompleteComponent = class ChipInputAutocompleteComponent {
|
|
2734
|
+
formFieldDirective = inject(FormField, {
|
|
2735
|
+
host: true,
|
|
2736
|
+
optional: true
|
|
2875
2737
|
});
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2738
|
+
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
2739
|
+
title = input("", ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
2740
|
+
value = model([], ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
2741
|
+
filterQuery = model("", ...ngDevMode ? [{ debugName: "filterQuery" }] : /* istanbul ignore next */ []);
|
|
2742
|
+
separatorKeysCodes = [ENTER, COMMA];
|
|
2743
|
+
selectedItems = linkedSignal({
|
|
2744
|
+
...ngDevMode ? { debugName: "selectedItems" } : /* istanbul ignore next */ {},
|
|
2745
|
+
source: () => this.value(),
|
|
2746
|
+
computation: (inputKeys) => this.items().filter((item) => inputKeys.includes(item.value))
|
|
2747
|
+
});
|
|
2748
|
+
filteredItems = computed(() => {
|
|
2749
|
+
const allItems = this.items();
|
|
2750
|
+
const search = this.filterQuery().toLowerCase().trim();
|
|
2751
|
+
if (!search) return allItems;
|
|
2752
|
+
return allItems.filter((item) => item.viewValue.toLowerCase().includes(search));
|
|
2753
|
+
}, ...ngDevMode ? [{ debugName: "filteredItems" }] : /* istanbul ignore next */ []);
|
|
2754
|
+
isDisabled = computed(() => {
|
|
2755
|
+
return this.formFieldDirective?.state?.().disabled() ?? false;
|
|
2756
|
+
}, ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
|
|
2757
|
+
isInvalid = computed(() => {
|
|
2758
|
+
return this.formFieldDirective?.state()?.invalid() ?? false;
|
|
2759
|
+
}, ...ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []);
|
|
2760
|
+
remove(value) {
|
|
2761
|
+
if (this.isDisabled()) return;
|
|
2762
|
+
this.value.update((keys) => keys.filter((key) => key !== value));
|
|
2763
|
+
}
|
|
2764
|
+
selected(event) {
|
|
2765
|
+
const selectedValue = event.option.value;
|
|
2766
|
+
this.value.update((keys) => {
|
|
2767
|
+
return keys.includes(selectedValue) ? keys : [...keys, selectedValue];
|
|
2882
2768
|
});
|
|
2769
|
+
this.filterQuery.set("");
|
|
2770
|
+
}
|
|
2771
|
+
onCloseClick($event) {
|
|
2772
|
+
$event.stopPropagation();
|
|
2773
|
+
if (this.isDisabled()) return;
|
|
2774
|
+
this.value.set([]);
|
|
2775
|
+
this.filterQuery.set("");
|
|
2883
2776
|
}
|
|
2884
2777
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2885
2778
|
minVersion: "12.0.0",
|
|
2886
2779
|
version: "22.2.2",
|
|
2887
2780
|
ngImport: i0,
|
|
2888
|
-
type:
|
|
2781
|
+
type: ChipInputAutocompleteComponent,
|
|
2889
2782
|
deps: [],
|
|
2890
|
-
target: i0.ɵɵFactoryTarget.
|
|
2783
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2891
2784
|
});
|
|
2892
|
-
static
|
|
2893
|
-
minVersion: "17.
|
|
2785
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2786
|
+
minVersion: "17.0.0",
|
|
2894
2787
|
version: "22.2.2",
|
|
2895
|
-
type:
|
|
2788
|
+
type: ChipInputAutocompleteComponent,
|
|
2896
2789
|
isStandalone: true,
|
|
2897
|
-
selector: "
|
|
2898
|
-
inputs: {
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2790
|
+
selector: "ngx-uik-chip-input-autocomplete",
|
|
2791
|
+
inputs: {
|
|
2792
|
+
items: {
|
|
2793
|
+
classPropertyName: "items",
|
|
2794
|
+
publicName: "items",
|
|
2795
|
+
isSignal: true,
|
|
2796
|
+
isRequired: false,
|
|
2797
|
+
transformFunction: null
|
|
2798
|
+
},
|
|
2799
|
+
title: {
|
|
2800
|
+
classPropertyName: "title",
|
|
2801
|
+
publicName: "title",
|
|
2802
|
+
isSignal: true,
|
|
2803
|
+
isRequired: false,
|
|
2804
|
+
transformFunction: null
|
|
2805
|
+
},
|
|
2806
|
+
value: {
|
|
2807
|
+
classPropertyName: "value",
|
|
2808
|
+
publicName: "value",
|
|
2809
|
+
isSignal: true,
|
|
2810
|
+
isRequired: false,
|
|
2811
|
+
transformFunction: null
|
|
2812
|
+
},
|
|
2813
|
+
filterQuery: {
|
|
2814
|
+
classPropertyName: "filterQuery",
|
|
2815
|
+
publicName: "filterQuery",
|
|
2816
|
+
isSignal: true,
|
|
2817
|
+
isRequired: false,
|
|
2818
|
+
transformFunction: null
|
|
2819
|
+
}
|
|
2820
|
+
},
|
|
2821
|
+
outputs: {
|
|
2822
|
+
value: "valueChange",
|
|
2823
|
+
filterQuery: "filterQueryChange"
|
|
2824
|
+
},
|
|
2825
|
+
ngImport: i0,
|
|
2826
|
+
template: "<mat-form-field class=\"chip-list\" appearance=\"fill\">\n <mat-label>{{ title() }}</mat-label>\n <mat-chip-grid #chipList aria-label=\"'Выбор '+title()\">\n @for (item of selectedItems(); track item.value) {\n <mat-chip-row color=\"primary\" (removed)=\"remove(item.value)\">\n {{ item.viewValue }}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n </mat-chip-grid>\n <input\n #input\n [value]=\"filterQuery()\"\n (input)=\"filterQuery.set($any($event.target).value)\"\n [placeholder]=\"'Введите ' + title() + '...'\"\n [matAutocomplete]=\"auto\"\n [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [disabled]=\"isDisabled()\"\n />\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n @for (item of filteredItems(); track item.value) {\n <mat-option\n [value]=\"item.value\"\n [disabled]=\"selectedItems().includes(item)\"\n >\n {{ item.viewValue }}\n </mat-option>\n }\n </mat-autocomplete>\n @if (!isDisabled() && value().length > 0) {\n <button\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n (click)=\"onCloseClick($event)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n <!-- Блок вывода ошибки валидации родительской формы -->\n @if (isInvalid()) {\n <mat-error>Поле \"{{ title() }}\" заполнено некорректно</mat-error>\n }\n</mat-form-field>\n",
|
|
2827
|
+
styles: [".chip-list{width:100%}\n"],
|
|
2828
|
+
dependencies: [
|
|
2829
|
+
{
|
|
2830
|
+
kind: "component",
|
|
2831
|
+
type: MatFormField,
|
|
2832
|
+
selector: "mat-form-field",
|
|
2833
|
+
inputs: [
|
|
2834
|
+
"hideRequiredMarker",
|
|
2835
|
+
"color",
|
|
2836
|
+
"floatLabel",
|
|
2837
|
+
"appearance",
|
|
2838
|
+
"subscriptSizing",
|
|
2839
|
+
"hintLabel"
|
|
2840
|
+
],
|
|
2841
|
+
exportAs: ["matFormField"]
|
|
2842
|
+
},
|
|
2843
|
+
{
|
|
2844
|
+
kind: "ngmodule",
|
|
2845
|
+
type: MatAutocompleteModule
|
|
2846
|
+
},
|
|
2847
|
+
{
|
|
2848
|
+
kind: "component",
|
|
2849
|
+
type: i1$1.MatAutocomplete,
|
|
2850
|
+
selector: "mat-autocomplete",
|
|
2851
|
+
inputs: [
|
|
2852
|
+
"aria-label",
|
|
2853
|
+
"aria-labelledby",
|
|
2854
|
+
"displayWith",
|
|
2855
|
+
"autoActiveFirstOption",
|
|
2856
|
+
"autoSelectActiveOption",
|
|
2857
|
+
"requireSelection",
|
|
2858
|
+
"panelWidth",
|
|
2859
|
+
"disableRipple",
|
|
2860
|
+
"class",
|
|
2861
|
+
"hideSingleSelectionIndicator"
|
|
2862
|
+
],
|
|
2863
|
+
outputs: [
|
|
2864
|
+
"optionSelected",
|
|
2865
|
+
"opened",
|
|
2866
|
+
"closed",
|
|
2867
|
+
"optionActivated"
|
|
2868
|
+
],
|
|
2869
|
+
exportAs: ["matAutocomplete"]
|
|
2870
|
+
},
|
|
2871
|
+
{
|
|
2872
|
+
kind: "component",
|
|
2873
|
+
type: i1$1.MatOption,
|
|
2874
|
+
selector: "mat-option",
|
|
2875
|
+
inputs: [
|
|
2876
|
+
"value",
|
|
2877
|
+
"id",
|
|
2878
|
+
"disabled"
|
|
2879
|
+
],
|
|
2880
|
+
outputs: ["onSelectionChange"],
|
|
2881
|
+
exportAs: ["matOption"]
|
|
2882
|
+
},
|
|
2883
|
+
{
|
|
2884
|
+
kind: "directive",
|
|
2885
|
+
type: i1$1.MatAutocompleteTrigger,
|
|
2886
|
+
selector: "input[matAutocomplete], textarea[matAutocomplete]",
|
|
2887
|
+
inputs: [
|
|
2888
|
+
"matAutocomplete",
|
|
2889
|
+
"matAutocompletePosition",
|
|
2890
|
+
"matAutocompleteConnectedTo",
|
|
2891
|
+
"autocomplete",
|
|
2892
|
+
"matAutocompleteDisabled"
|
|
2893
|
+
],
|
|
2894
|
+
exportAs: ["matAutocompleteTrigger"]
|
|
2895
|
+
},
|
|
2896
|
+
{
|
|
2897
|
+
kind: "component",
|
|
2898
|
+
type: MatIcon,
|
|
2899
|
+
selector: "mat-icon",
|
|
2900
|
+
inputs: [
|
|
2901
|
+
"color",
|
|
2902
|
+
"inline",
|
|
2903
|
+
"svgIcon",
|
|
2904
|
+
"fontSet",
|
|
2905
|
+
"fontIcon"
|
|
2906
|
+
],
|
|
2907
|
+
exportAs: ["matIcon"]
|
|
2908
|
+
},
|
|
2909
|
+
{
|
|
2910
|
+
kind: "ngmodule",
|
|
2911
|
+
type: MatChipsModule
|
|
2912
|
+
},
|
|
2913
|
+
{
|
|
2914
|
+
kind: "component",
|
|
2915
|
+
type: i2$2.MatChipGrid,
|
|
2916
|
+
selector: "mat-chip-grid",
|
|
2917
|
+
inputs: [
|
|
2918
|
+
"disabled",
|
|
2919
|
+
"placeholder",
|
|
2920
|
+
"required",
|
|
2921
|
+
"value",
|
|
2922
|
+
"errorStateMatcher"
|
|
2923
|
+
],
|
|
2924
|
+
outputs: ["change", "valueChange"]
|
|
2925
|
+
},
|
|
2926
|
+
{
|
|
2927
|
+
kind: "directive",
|
|
2928
|
+
type: i2$2.MatChipInput,
|
|
2929
|
+
selector: "input[matChipInputFor]",
|
|
2930
|
+
inputs: [
|
|
2931
|
+
"matChipInputFor",
|
|
2932
|
+
"matChipInputAddOnBlur",
|
|
2933
|
+
"matChipInputSeparatorKeyCodes",
|
|
2934
|
+
"placeholder",
|
|
2935
|
+
"id",
|
|
2936
|
+
"disabled",
|
|
2937
|
+
"readonly",
|
|
2938
|
+
"matChipInputDisabledInteractive"
|
|
2939
|
+
],
|
|
2940
|
+
outputs: ["matChipInputTokenEnd"],
|
|
2941
|
+
exportAs: ["matChipInput", "matChipInputFor"]
|
|
2942
|
+
},
|
|
2943
|
+
{
|
|
2944
|
+
kind: "directive",
|
|
2945
|
+
type: i2$2.MatChipRemove,
|
|
2946
|
+
selector: "[matChipRemove]"
|
|
2947
|
+
},
|
|
2948
|
+
{
|
|
2949
|
+
kind: "component",
|
|
2950
|
+
type: i2$2.MatChipRow,
|
|
2951
|
+
selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]",
|
|
2952
|
+
inputs: ["editable"],
|
|
2953
|
+
outputs: ["edited"]
|
|
2954
|
+
},
|
|
2955
|
+
{
|
|
2956
|
+
kind: "directive",
|
|
2957
|
+
type: MatLabel,
|
|
2958
|
+
selector: "mat-label"
|
|
2959
|
+
},
|
|
2960
|
+
{
|
|
2961
|
+
kind: "directive",
|
|
2962
|
+
type: MatError,
|
|
2963
|
+
selector: "mat-error, [matError]",
|
|
2964
|
+
inputs: ["id"]
|
|
2965
|
+
}
|
|
2966
|
+
]
|
|
2906
2967
|
});
|
|
2907
2968
|
};
|
|
2908
2969
|
i0.ɵɵngDeclareClassMetadata({
|
|
2909
2970
|
minVersion: "12.0.0",
|
|
2910
2971
|
version: "22.2.2",
|
|
2911
2972
|
ngImport: i0,
|
|
2912
|
-
type:
|
|
2973
|
+
type: ChipInputAutocompleteComponent,
|
|
2913
2974
|
decorators: [{
|
|
2914
|
-
type:
|
|
2915
|
-
args: [{ selector: "[setValue]" }]
|
|
2916
|
-
}],
|
|
2917
|
-
ctorParameters: () => [],
|
|
2918
|
-
propDecorators: { value: [{
|
|
2919
|
-
type: i0.Input,
|
|
2975
|
+
type: Component,
|
|
2920
2976
|
args: [{
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2977
|
+
selector: "ngx-uik-chip-input-autocomplete",
|
|
2978
|
+
imports: [
|
|
2979
|
+
MatFormField,
|
|
2980
|
+
MatAutocompleteModule,
|
|
2981
|
+
MatIcon,
|
|
2982
|
+
MatOption,
|
|
2983
|
+
MatChipsModule,
|
|
2984
|
+
MatLabel,
|
|
2985
|
+
MatError
|
|
2986
|
+
],
|
|
2987
|
+
template: "<mat-form-field class=\"chip-list\" appearance=\"fill\">\n <mat-label>{{ title() }}</mat-label>\n <mat-chip-grid #chipList aria-label=\"'Выбор '+title()\">\n @for (item of selectedItems(); track item.value) {\n <mat-chip-row color=\"primary\" (removed)=\"remove(item.value)\">\n {{ item.viewValue }}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n </mat-chip-grid>\n <input\n #input\n [value]=\"filterQuery()\"\n (input)=\"filterQuery.set($any($event.target).value)\"\n [placeholder]=\"'Введите ' + title() + '...'\"\n [matAutocomplete]=\"auto\"\n [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [disabled]=\"isDisabled()\"\n />\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n @for (item of filteredItems(); track item.value) {\n <mat-option\n [value]=\"item.value\"\n [disabled]=\"selectedItems().includes(item)\"\n >\n {{ item.viewValue }}\n </mat-option>\n }\n </mat-autocomplete>\n @if (!isDisabled() && value().length > 0) {\n <button\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n (click)=\"onCloseClick($event)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n <!-- Блок вывода ошибки валидации родительской формы -->\n @if (isInvalid()) {\n <mat-error>Поле \"{{ title() }}\" заполнено некорректно</mat-error>\n }\n</mat-form-field>\n",
|
|
2988
|
+
styles: [".chip-list{width:100%}\n"]
|
|
2989
|
+
}]
|
|
2990
|
+
}],
|
|
2991
|
+
propDecorators: {
|
|
2992
|
+
items: [{
|
|
2993
|
+
type: i0.Input,
|
|
2994
|
+
args: [{
|
|
2995
|
+
isSignal: true,
|
|
2996
|
+
alias: "items",
|
|
2997
|
+
required: false
|
|
2998
|
+
}]
|
|
2999
|
+
}],
|
|
3000
|
+
title: [{
|
|
3001
|
+
type: i0.Input,
|
|
3002
|
+
args: [{
|
|
3003
|
+
isSignal: true,
|
|
3004
|
+
alias: "title",
|
|
3005
|
+
required: false
|
|
3006
|
+
}]
|
|
3007
|
+
}],
|
|
3008
|
+
value: [{
|
|
3009
|
+
type: i0.Input,
|
|
3010
|
+
args: [{
|
|
3011
|
+
isSignal: true,
|
|
3012
|
+
alias: "value",
|
|
3013
|
+
required: false
|
|
3014
|
+
}]
|
|
3015
|
+
}, {
|
|
3016
|
+
type: i0.Output,
|
|
3017
|
+
args: ["valueChange"]
|
|
3018
|
+
}],
|
|
3019
|
+
filterQuery: [{
|
|
3020
|
+
type: i0.Input,
|
|
3021
|
+
args: [{
|
|
3022
|
+
isSignal: true,
|
|
3023
|
+
alias: "filterQuery",
|
|
3024
|
+
required: false
|
|
3025
|
+
}]
|
|
3026
|
+
}, {
|
|
3027
|
+
type: i0.Output,
|
|
3028
|
+
args: ["filterQueryChange"]
|
|
2924
3029
|
}]
|
|
2925
|
-
}] }
|
|
2926
|
-
});
|
|
2927
|
-
const authGuard = (allowedRoles) => {
|
|
2928
|
-
return (route, state) => {
|
|
2929
|
-
const authService = inject(AuthService);
|
|
2930
|
-
const router = inject(Router);
|
|
2931
|
-
const isLogin = authService.loggedIn();
|
|
2932
|
-
if (!isLogin) {
|
|
2933
|
-
console.log("state.url =", state.url);
|
|
2934
|
-
return router.createUrlTree(["/login"], { queryParams: { returnUrl: state.url } });
|
|
2935
|
-
}
|
|
2936
|
-
return isLogin;
|
|
2937
|
-
};
|
|
2938
|
-
};
|
|
2939
|
-
const redirectGuard = (route) => {
|
|
2940
|
-
const externalUrl = route.data?.["externalUrl"];
|
|
2941
|
-
if (externalUrl) window.location.href = externalUrl;
|
|
2942
|
-
return true;
|
|
2943
|
-
};
|
|
2944
|
-
const roleGuard = (allowedRoles) => {
|
|
2945
|
-
return (route, state) => {
|
|
2946
|
-
return inject(RoleService).hasAnyRole(allowedRoles);
|
|
2947
|
-
};
|
|
2948
|
-
};
|
|
2949
|
-
const LOGGER_CONFIG = new InjectionToken("LOGGER_CONFIG");
|
|
2950
|
-
var LoggerService = class LoggerService {
|
|
2951
|
-
logPrefix = "";
|
|
2952
|
-
isProduction;
|
|
2953
|
-
config = inject(LOGGER_CONFIG);
|
|
2954
|
-
constructor() {
|
|
2955
|
-
this.isProduction = this.config.isProduction;
|
|
2956
|
-
}
|
|
2957
|
-
log(message, ...args) {
|
|
2958
|
-
if (!this.isProduction) {
|
|
2959
|
-
args.unshift(this.logPrefix + " ");
|
|
2960
|
-
console.log(`[DEV LOG]: ${message}`, ...args);
|
|
2961
|
-
} else console.log(`[PROD LOG]: ${message}`, ...args);
|
|
2962
|
-
}
|
|
2963
|
-
error(message, ...args) {
|
|
2964
|
-
console.error(`[ERROR]: ${message}`, ...args);
|
|
2965
3030
|
}
|
|
2966
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2967
|
-
minVersion: "12.0.0",
|
|
2968
|
-
version: "22.2.2",
|
|
2969
|
-
ngImport: i0,
|
|
2970
|
-
type: LoggerService,
|
|
2971
|
-
deps: [],
|
|
2972
|
-
target: i0.ɵɵFactoryTarget.Service
|
|
2973
|
-
});
|
|
2974
|
-
static ɵprov = i0.ɵɵngDeclareService({
|
|
2975
|
-
minVersion: "22.0.0",
|
|
2976
|
-
version: "22.2.2",
|
|
2977
|
-
ngImport: i0,
|
|
2978
|
-
type: LoggerService
|
|
2979
|
-
});
|
|
2980
|
-
};
|
|
2981
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
2982
|
-
minVersion: "12.0.0",
|
|
2983
|
-
version: "22.2.2",
|
|
2984
|
-
ngImport: i0,
|
|
2985
|
-
type: LoggerService,
|
|
2986
|
-
decorators: [{ type: Service }],
|
|
2987
|
-
ctorParameters: () => []
|
|
2988
|
-
});
|
|
2989
|
-
function provideLogger(config) {
|
|
2990
|
-
return makeEnvironmentProviders([{
|
|
2991
|
-
provide: LOGGER_CONFIG,
|
|
2992
|
-
useValue: config
|
|
2993
|
-
}, LoggerService]);
|
|
2994
|
-
}
|
|
2995
|
-
const secUserViewSchema = z.object({
|
|
2996
|
-
id: z.number().default(0),
|
|
2997
|
-
idHuman: z.number().default(0),
|
|
2998
|
-
loginAD: z.string().default("").nullable(),
|
|
2999
|
-
dept: z.number().default(0),
|
|
3000
|
-
tabnum: z.number().default(0),
|
|
3001
|
-
lastname: z.string().default(""),
|
|
3002
|
-
firstname: z.string().default(""),
|
|
3003
|
-
middlename: z.string().default(""),
|
|
3004
|
-
fio: z.string().default(""),
|
|
3005
|
-
dateHuman: z.coerce.date().optional(),
|
|
3006
|
-
profession: z.string().default("")
|
|
3007
|
-
});
|
|
3008
|
-
const secUserSchema = z.object({
|
|
3009
|
-
id: z.number().default(0),
|
|
3010
|
-
login: z.string().default(""),
|
|
3011
|
-
fio: z.string().default(""),
|
|
3012
|
-
dept: z.number().default(0),
|
|
3013
|
-
tabnum: z.number().default(0),
|
|
3014
|
-
userView: secUserViewSchema.optional().nullable()
|
|
3015
3031
|
});
|
|
3016
|
-
var
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
case "script": return this.sanitizer.bypassSecurityTrustScript(url);
|
|
3025
|
-
case "url": return this.sanitizer.bypassSecurityTrustUrl(url);
|
|
3026
|
-
case "resourceUrl": return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
|
3027
|
-
default: throw new Error(`SafePipe: Неизвестный тип безопасности ${type}`);
|
|
3032
|
+
var CustomDateAdapter = class CustomDateAdapter extends NativeDateAdapter {
|
|
3033
|
+
parse(value) {
|
|
3034
|
+
if (typeof value === "string" && value.indexOf(".") > -1) {
|
|
3035
|
+
const str = value.split(".");
|
|
3036
|
+
const year = Number(str[2]);
|
|
3037
|
+
const month = Number(str[1]) - 1;
|
|
3038
|
+
const day = Number(str[0]);
|
|
3039
|
+
return new Date(year, month, day);
|
|
3028
3040
|
}
|
|
3041
|
+
const timestamp = typeof value === "number" ? value : Date.parse(value);
|
|
3042
|
+
return isNaN(timestamp) ? null : new Date(timestamp);
|
|
3029
3043
|
}
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
ngImport: i0,
|
|
3034
|
-
type: SafePipe,
|
|
3035
|
-
deps: [],
|
|
3036
|
-
target: i0.ɵɵFactoryTarget.Pipe
|
|
3037
|
-
});
|
|
3038
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
3039
|
-
minVersion: "14.0.0",
|
|
3040
|
-
version: "22.2.2",
|
|
3041
|
-
ngImport: i0,
|
|
3042
|
-
type: SafePipe,
|
|
3043
|
-
isStandalone: true,
|
|
3044
|
-
name: "safe"
|
|
3045
|
-
});
|
|
3046
|
-
};
|
|
3047
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
3048
|
-
minVersion: "12.0.0",
|
|
3049
|
-
version: "22.2.2",
|
|
3050
|
-
ngImport: i0,
|
|
3051
|
-
type: SafePipe,
|
|
3052
|
-
decorators: [{
|
|
3053
|
-
type: Pipe,
|
|
3054
|
-
args: [{ name: "safe" }]
|
|
3055
|
-
}]
|
|
3056
|
-
});
|
|
3057
|
-
var TimePipe = class TimePipe {
|
|
3058
|
-
transform(value) {
|
|
3059
|
-
const hour = Math.abs(value) >= 60 ? Math.floor(Math.abs(value) / 60).toString().padStart(2, "0") : "00";
|
|
3060
|
-
const minute = Math.abs(value % 60).toString().padStart(2, "0");
|
|
3061
|
-
const time = hour + ":" + minute;
|
|
3062
|
-
return value < 0 ? "-" + time : time;
|
|
3044
|
+
format(date, displayFormat) {
|
|
3045
|
+
if (displayFormat === "input") return `${String(date.getDate()).padStart(2, "0")}.${String(date.getMonth() + 1).padStart(2, "0")}.${date.getFullYear()}`;
|
|
3046
|
+
return super.format(date, displayFormat);
|
|
3063
3047
|
}
|
|
3064
3048
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3065
3049
|
minVersion: "12.0.0",
|
|
3066
3050
|
version: "22.2.2",
|
|
3067
3051
|
ngImport: i0,
|
|
3068
|
-
type:
|
|
3069
|
-
deps:
|
|
3070
|
-
target: i0.ɵɵFactoryTarget.
|
|
3052
|
+
type: CustomDateAdapter,
|
|
3053
|
+
deps: null,
|
|
3054
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
3071
3055
|
});
|
|
3072
|
-
static
|
|
3073
|
-
minVersion: "
|
|
3056
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
3057
|
+
minVersion: "12.0.0",
|
|
3074
3058
|
version: "22.2.2",
|
|
3075
3059
|
ngImport: i0,
|
|
3076
|
-
type:
|
|
3077
|
-
isStandalone: true,
|
|
3078
|
-
name: "time"
|
|
3060
|
+
type: CustomDateAdapter
|
|
3079
3061
|
});
|
|
3080
3062
|
};
|
|
3081
3063
|
i0.ɵɵngDeclareClassMetadata({
|
|
3082
3064
|
minVersion: "12.0.0",
|
|
3083
3065
|
version: "22.2.2",
|
|
3084
3066
|
ngImport: i0,
|
|
3085
|
-
type:
|
|
3086
|
-
decorators: [{
|
|
3087
|
-
type: Pipe,
|
|
3088
|
-
args: [{ name: "time" }]
|
|
3089
|
-
}]
|
|
3067
|
+
type: CustomDateAdapter,
|
|
3068
|
+
decorators: [{ type: Injectable }]
|
|
3090
3069
|
});
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3070
|
+
const MY_NATIVE_FORMATS = {
|
|
3071
|
+
parse: { dateInput: "input" },
|
|
3072
|
+
display: {
|
|
3073
|
+
dateInput: "input",
|
|
3074
|
+
monthYearLabel: {
|
|
3075
|
+
year: "numeric",
|
|
3076
|
+
month: "short"
|
|
3077
|
+
},
|
|
3078
|
+
dateA11yLabel: {
|
|
3079
|
+
year: "numeric",
|
|
3080
|
+
month: "long",
|
|
3081
|
+
day: "numeric"
|
|
3082
|
+
},
|
|
3083
|
+
monthYearA11yLabel: {
|
|
3084
|
+
year: "numeric",
|
|
3085
|
+
month: "long"
|
|
3086
|
+
}
|
|
3096
3087
|
}
|
|
3097
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3098
|
-
minVersion: "12.0.0",
|
|
3099
|
-
version: "22.2.2",
|
|
3100
|
-
ngImport: i0,
|
|
3101
|
-
type: TruncatePipe,
|
|
3102
|
-
deps: [],
|
|
3103
|
-
target: i0.ɵɵFactoryTarget.Pipe
|
|
3104
|
-
});
|
|
3105
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
3106
|
-
minVersion: "14.0.0",
|
|
3107
|
-
version: "22.2.2",
|
|
3108
|
-
ngImport: i0,
|
|
3109
|
-
type: TruncatePipe,
|
|
3110
|
-
isStandalone: true,
|
|
3111
|
-
name: "truncate"
|
|
3112
|
-
});
|
|
3113
3088
|
};
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
args: [{ name: "truncate" }]
|
|
3122
|
-
}]
|
|
3089
|
+
const toIsoString = (date) => {
|
|
3090
|
+
if (!date) return "";
|
|
3091
|
+
return date.toISOString().split("T")[0];
|
|
3092
|
+
};
|
|
3093
|
+
const dateRangeFormSchema = z$1.object({
|
|
3094
|
+
begin: z$1.instanceof(Date).nullable(),
|
|
3095
|
+
end: z$1.instanceof(Date).nullable()
|
|
3123
3096
|
});
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3097
|
+
const dateRangeSchema = dateRangeFormSchema.transform((data) => ({
|
|
3098
|
+
begin: toIsoString(data.begin),
|
|
3099
|
+
end: toIsoString(data.end)
|
|
3100
|
+
}));
|
|
3101
|
+
var DateRangeInputComponent = class DateRangeInputComponent {
|
|
3102
|
+
DEFAULT_MIN_DATE = new Date(2020, 0, 1);
|
|
3103
|
+
label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
3104
|
+
dateRange = input({
|
|
3105
|
+
begin: "",
|
|
3106
|
+
end: ""
|
|
3107
|
+
}, ...ngDevMode ? [{ debugName: "dateRange" }] : /* istanbul ignore next */ []);
|
|
3108
|
+
minDate = input(this.DEFAULT_MIN_DATE, ...ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []);
|
|
3109
|
+
clearInput = input(null, ...ngDevMode ? [{ debugName: "clearInput" }] : /* istanbul ignore next */ []);
|
|
3110
|
+
required = input(false, ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
|
|
3111
|
+
dateRangeChange = output();
|
|
3112
|
+
formModel = signal({
|
|
3113
|
+
begin: null,
|
|
3114
|
+
end: null
|
|
3115
|
+
}, ...ngDevMode ? [{ debugName: "formModel" }] : /* istanbul ignore next */ []);
|
|
3116
|
+
form = form(this.formModel, (schemaPath) => {
|
|
3117
|
+
validateStandardSchema(schemaPath, dateRangeFormSchema);
|
|
3118
|
+
required(schemaPath.begin, {
|
|
3119
|
+
message: "Укажите период",
|
|
3120
|
+
when: () => this.required()
|
|
3121
|
+
});
|
|
3122
|
+
required(schemaPath.end, {
|
|
3123
|
+
message: "Укажите период",
|
|
3124
|
+
when: () => this.required()
|
|
3125
|
+
});
|
|
3126
|
+
debounce(schemaPath.begin, 500);
|
|
3127
|
+
debounce(schemaPath.end, 500);
|
|
3138
3128
|
});
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
this.value.update((keys) => {
|
|
3158
|
-
return keys.includes(selectedValue) ? keys : [...keys, selectedValue];
|
|
3129
|
+
constructor() {
|
|
3130
|
+
effect(() => {
|
|
3131
|
+
this.clearInput();
|
|
3132
|
+
untracked(() => this.form().reset());
|
|
3133
|
+
});
|
|
3134
|
+
effect(() => {
|
|
3135
|
+
const value = this.dateRange();
|
|
3136
|
+
untracked(() => {
|
|
3137
|
+
this.form.begin().value.set(value.begin ? new Date(value.begin) : null);
|
|
3138
|
+
this.form.end().value.set(value.end ? new Date(value.end) : null);
|
|
3139
|
+
});
|
|
3140
|
+
});
|
|
3141
|
+
effect(() => {
|
|
3142
|
+
const currentValues = this.form().value();
|
|
3143
|
+
if (this.form().valid()) {
|
|
3144
|
+
const formattedRange = dateRangeSchema.safeParse(currentValues);
|
|
3145
|
+
if (formattedRange.success) this.dateRangeChange.emit(formattedRange.data);
|
|
3146
|
+
}
|
|
3159
3147
|
});
|
|
3160
|
-
this.filterQuery.set("");
|
|
3161
|
-
}
|
|
3162
|
-
onCloseClick($event) {
|
|
3163
|
-
$event.stopPropagation();
|
|
3164
|
-
if (this.isDisabled()) return;
|
|
3165
|
-
this.value.set([]);
|
|
3166
|
-
this.filterQuery.set("");
|
|
3167
3148
|
}
|
|
3168
3149
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3169
3150
|
minVersion: "12.0.0",
|
|
3170
3151
|
version: "22.2.2",
|
|
3171
3152
|
ngImport: i0,
|
|
3172
|
-
type:
|
|
3153
|
+
type: DateRangeInputComponent,
|
|
3173
3154
|
deps: [],
|
|
3174
3155
|
target: i0.ɵɵFactoryTarget.Component
|
|
3175
3156
|
});
|
|
3176
3157
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
3177
3158
|
minVersion: "17.0.0",
|
|
3178
3159
|
version: "22.2.2",
|
|
3179
|
-
type:
|
|
3160
|
+
type: DateRangeInputComponent,
|
|
3180
3161
|
isStandalone: true,
|
|
3181
|
-
selector: "ngx-uik-
|
|
3162
|
+
selector: "ngx-uik-date-range-input",
|
|
3182
3163
|
inputs: {
|
|
3183
|
-
|
|
3184
|
-
classPropertyName: "
|
|
3185
|
-
publicName: "
|
|
3164
|
+
label: {
|
|
3165
|
+
classPropertyName: "label",
|
|
3166
|
+
publicName: "label",
|
|
3186
3167
|
isSignal: true,
|
|
3187
3168
|
isRequired: false,
|
|
3188
3169
|
transformFunction: null
|
|
3189
3170
|
},
|
|
3190
|
-
|
|
3191
|
-
classPropertyName: "
|
|
3192
|
-
publicName: "
|
|
3171
|
+
dateRange: {
|
|
3172
|
+
classPropertyName: "dateRange",
|
|
3173
|
+
publicName: "dateRange",
|
|
3193
3174
|
isSignal: true,
|
|
3194
3175
|
isRequired: false,
|
|
3195
3176
|
transformFunction: null
|
|
3196
3177
|
},
|
|
3197
|
-
|
|
3198
|
-
classPropertyName: "
|
|
3199
|
-
publicName: "
|
|
3178
|
+
minDate: {
|
|
3179
|
+
classPropertyName: "minDate",
|
|
3180
|
+
publicName: "minDate",
|
|
3200
3181
|
isSignal: true,
|
|
3201
3182
|
isRequired: false,
|
|
3202
3183
|
transformFunction: null
|
|
3203
3184
|
},
|
|
3204
|
-
|
|
3205
|
-
classPropertyName: "
|
|
3206
|
-
publicName: "
|
|
3185
|
+
clearInput: {
|
|
3186
|
+
classPropertyName: "clearInput",
|
|
3187
|
+
publicName: "clearInput",
|
|
3188
|
+
isSignal: true,
|
|
3189
|
+
isRequired: false,
|
|
3190
|
+
transformFunction: null
|
|
3191
|
+
},
|
|
3192
|
+
required: {
|
|
3193
|
+
classPropertyName: "required",
|
|
3194
|
+
publicName: "required",
|
|
3207
3195
|
isSignal: true,
|
|
3208
3196
|
isRequired: false,
|
|
3209
3197
|
transformFunction: null
|
|
3210
3198
|
}
|
|
3211
3199
|
},
|
|
3212
|
-
outputs: {
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
inputs: [
|
|
3225
|
-
"hideRequiredMarker",
|
|
3226
|
-
"color",
|
|
3227
|
-
"floatLabel",
|
|
3228
|
-
"appearance",
|
|
3229
|
-
"subscriptSizing",
|
|
3230
|
-
"hintLabel"
|
|
3231
|
-
],
|
|
3232
|
-
exportAs: ["matFormField"]
|
|
3233
|
-
},
|
|
3234
|
-
{
|
|
3235
|
-
kind: "ngmodule",
|
|
3236
|
-
type: MatAutocompleteModule
|
|
3237
|
-
},
|
|
3238
|
-
{
|
|
3239
|
-
kind: "component",
|
|
3240
|
-
type: i1$1.MatAutocomplete,
|
|
3241
|
-
selector: "mat-autocomplete",
|
|
3242
|
-
inputs: [
|
|
3243
|
-
"aria-label",
|
|
3244
|
-
"aria-labelledby",
|
|
3245
|
-
"displayWith",
|
|
3246
|
-
"autoActiveFirstOption",
|
|
3247
|
-
"autoSelectActiveOption",
|
|
3248
|
-
"requireSelection",
|
|
3249
|
-
"panelWidth",
|
|
3250
|
-
"disableRipple",
|
|
3251
|
-
"class",
|
|
3252
|
-
"hideSingleSelectionIndicator"
|
|
3253
|
-
],
|
|
3254
|
-
outputs: [
|
|
3255
|
-
"optionSelected",
|
|
3256
|
-
"opened",
|
|
3257
|
-
"closed",
|
|
3258
|
-
"optionActivated"
|
|
3259
|
-
],
|
|
3260
|
-
exportAs: ["matAutocomplete"]
|
|
3261
|
-
},
|
|
3262
|
-
{
|
|
3263
|
-
kind: "component",
|
|
3264
|
-
type: i1$1.MatOption,
|
|
3265
|
-
selector: "mat-option",
|
|
3266
|
-
inputs: [
|
|
3267
|
-
"value",
|
|
3268
|
-
"id",
|
|
3269
|
-
"disabled"
|
|
3270
|
-
],
|
|
3271
|
-
outputs: ["onSelectionChange"],
|
|
3272
|
-
exportAs: ["matOption"]
|
|
3273
|
-
},
|
|
3200
|
+
outputs: { dateRangeChange: "dateRangeChange" },
|
|
3201
|
+
providers: [{
|
|
3202
|
+
provide: DateAdapter,
|
|
3203
|
+
useClass: CustomDateAdapter
|
|
3204
|
+
}, {
|
|
3205
|
+
provide: MAT_DATE_FORMATS,
|
|
3206
|
+
useValue: MY_NATIVE_FORMATS
|
|
3207
|
+
}],
|
|
3208
|
+
ngImport: i0,
|
|
3209
|
+
template: "<mat-form-field appearance=\"fill\">\r\n <mat-label>{{ label() }}</mat-label>\r\n <mat-date-range-input\r\n [rangePicker]=\"picker\"\r\n [min]=\"minDate()\"\r\n >\r\n <input matStartDate [formField]=\"form.begin\" placeholder=\"Дата начала\" />\r\n <input matEndDate [formField]=\"form.end\" placeholder=\"Дата окончания\" />\r\n </mat-date-range-input>\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-date-range-picker #picker></mat-date-range-picker>\r\n @if (form.begin().touched() && form.begin().invalid()) {\r\n <ng-container ngProjectAs=\"mat-error\">\r\n <mat-error>{{ form.begin().errors()[0]?.message }}</mat-error>\r\n </ng-container>\r\n }\r\n @if (form.end().touched() && form.end().invalid()) {\r\n <ng-container ngProjectAs=\"mat-error\">\r\n <mat-error>{{ form.end().errors()[0]?.message }}</mat-error>\r\n </ng-container>\r\n }\r\n</mat-form-field>\r\n",
|
|
3210
|
+
styles: ["mat-form-field{margin-right:16px}\n"],
|
|
3211
|
+
dependencies: [
|
|
3274
3212
|
{
|
|
3275
3213
|
kind: "directive",
|
|
3276
|
-
type:
|
|
3277
|
-
selector: "
|
|
3278
|
-
inputs: [
|
|
3279
|
-
|
|
3280
|
-
"matAutocompletePosition",
|
|
3281
|
-
"matAutocompleteConnectedTo",
|
|
3282
|
-
"autocomplete",
|
|
3283
|
-
"matAutocompleteDisabled"
|
|
3284
|
-
],
|
|
3285
|
-
exportAs: ["matAutocompleteTrigger"]
|
|
3214
|
+
type: FormField,
|
|
3215
|
+
selector: "[formField]",
|
|
3216
|
+
inputs: ["formField"],
|
|
3217
|
+
exportAs: ["formField"]
|
|
3286
3218
|
},
|
|
3287
3219
|
{
|
|
3288
3220
|
kind: "component",
|
|
3289
|
-
type:
|
|
3290
|
-
selector: "mat-
|
|
3221
|
+
type: MatFormField,
|
|
3222
|
+
selector: "mat-form-field",
|
|
3291
3223
|
inputs: [
|
|
3224
|
+
"hideRequiredMarker",
|
|
3292
3225
|
"color",
|
|
3293
|
-
"
|
|
3294
|
-
"
|
|
3295
|
-
"
|
|
3296
|
-
"
|
|
3226
|
+
"floatLabel",
|
|
3227
|
+
"appearance",
|
|
3228
|
+
"subscriptSizing",
|
|
3229
|
+
"hintLabel"
|
|
3297
3230
|
],
|
|
3298
|
-
exportAs: ["
|
|
3231
|
+
exportAs: ["matFormField"]
|
|
3299
3232
|
},
|
|
3300
3233
|
{
|
|
3301
|
-
kind: "
|
|
3302
|
-
type:
|
|
3234
|
+
kind: "directive",
|
|
3235
|
+
type: MatLabel,
|
|
3236
|
+
selector: "mat-label"
|
|
3303
3237
|
},
|
|
3304
3238
|
{
|
|
3305
3239
|
kind: "component",
|
|
3306
|
-
type:
|
|
3307
|
-
selector: "mat-
|
|
3240
|
+
type: MatDateRangeInput,
|
|
3241
|
+
selector: "mat-date-range-input",
|
|
3308
3242
|
inputs: [
|
|
3309
|
-
"
|
|
3310
|
-
"placeholder",
|
|
3243
|
+
"rangePicker",
|
|
3311
3244
|
"required",
|
|
3312
|
-
"
|
|
3313
|
-
"
|
|
3245
|
+
"dateFilter",
|
|
3246
|
+
"min",
|
|
3247
|
+
"max",
|
|
3248
|
+
"disabled",
|
|
3249
|
+
"separator",
|
|
3250
|
+
"comparisonStart",
|
|
3251
|
+
"comparisonEnd"
|
|
3314
3252
|
],
|
|
3315
|
-
|
|
3253
|
+
exportAs: ["matDateRangeInput"]
|
|
3316
3254
|
},
|
|
3317
3255
|
{
|
|
3318
3256
|
kind: "directive",
|
|
3319
|
-
type:
|
|
3320
|
-
selector: "input[
|
|
3321
|
-
|
|
3322
|
-
"matChipInputFor",
|
|
3323
|
-
"matChipInputAddOnBlur",
|
|
3324
|
-
"matChipInputSeparatorKeyCodes",
|
|
3325
|
-
"placeholder",
|
|
3326
|
-
"id",
|
|
3327
|
-
"disabled",
|
|
3328
|
-
"readonly",
|
|
3329
|
-
"matChipInputDisabledInteractive"
|
|
3330
|
-
],
|
|
3331
|
-
outputs: ["matChipInputTokenEnd"],
|
|
3332
|
-
exportAs: ["matChipInput", "matChipInputFor"]
|
|
3257
|
+
type: MatStartDate,
|
|
3258
|
+
selector: "input[matStartDate]",
|
|
3259
|
+
outputs: ["dateChange", "dateInput"]
|
|
3333
3260
|
},
|
|
3334
3261
|
{
|
|
3335
3262
|
kind: "directive",
|
|
3336
|
-
type:
|
|
3337
|
-
selector: "[
|
|
3263
|
+
type: MatEndDate,
|
|
3264
|
+
selector: "input[matEndDate]",
|
|
3265
|
+
outputs: ["dateChange", "dateInput"]
|
|
3338
3266
|
},
|
|
3339
3267
|
{
|
|
3340
3268
|
kind: "component",
|
|
3341
|
-
type:
|
|
3342
|
-
selector: "mat-
|
|
3343
|
-
inputs: [
|
|
3344
|
-
|
|
3269
|
+
type: MatDatepickerToggle,
|
|
3270
|
+
selector: "mat-datepicker-toggle",
|
|
3271
|
+
inputs: [
|
|
3272
|
+
"for",
|
|
3273
|
+
"tabIndex",
|
|
3274
|
+
"aria-label",
|
|
3275
|
+
"disabled",
|
|
3276
|
+
"disableRipple"
|
|
3277
|
+
],
|
|
3278
|
+
exportAs: ["matDatepickerToggle"]
|
|
3345
3279
|
},
|
|
3346
3280
|
{
|
|
3347
3281
|
kind: "directive",
|
|
3348
|
-
type:
|
|
3349
|
-
selector: "
|
|
3282
|
+
type: MatSuffix,
|
|
3283
|
+
selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
|
|
3284
|
+
inputs: ["matTextSuffix"]
|
|
3285
|
+
},
|
|
3286
|
+
{
|
|
3287
|
+
kind: "component",
|
|
3288
|
+
type: MatDateRangePicker,
|
|
3289
|
+
selector: "mat-date-range-picker",
|
|
3290
|
+
exportAs: ["matDateRangePicker"]
|
|
3350
3291
|
},
|
|
3351
3292
|
{
|
|
3352
3293
|
kind: "directive",
|
|
@@ -3361,237 +3302,179 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3361
3302
|
minVersion: "12.0.0",
|
|
3362
3303
|
version: "22.2.2",
|
|
3363
3304
|
ngImport: i0,
|
|
3364
|
-
type:
|
|
3305
|
+
type: DateRangeInputComponent,
|
|
3365
3306
|
decorators: [{
|
|
3366
3307
|
type: Component,
|
|
3367
3308
|
args: [{
|
|
3368
|
-
selector: "ngx-uik-
|
|
3309
|
+
selector: "ngx-uik-date-range-input",
|
|
3369
3310
|
imports: [
|
|
3311
|
+
FormField,
|
|
3370
3312
|
MatFormField,
|
|
3371
|
-
MatAutocompleteModule,
|
|
3372
|
-
MatIcon,
|
|
3373
|
-
MatOption,
|
|
3374
|
-
MatChipsModule,
|
|
3375
3313
|
MatLabel,
|
|
3314
|
+
MatDateRangeInput,
|
|
3315
|
+
MatStartDate,
|
|
3316
|
+
MatEndDate,
|
|
3317
|
+
MatDatepickerToggle,
|
|
3318
|
+
MatSuffix,
|
|
3319
|
+
MatDateRangePicker,
|
|
3376
3320
|
MatError
|
|
3377
3321
|
],
|
|
3378
|
-
|
|
3379
|
-
|
|
3322
|
+
providers: [{
|
|
3323
|
+
provide: DateAdapter,
|
|
3324
|
+
useClass: CustomDateAdapter
|
|
3325
|
+
}, {
|
|
3326
|
+
provide: MAT_DATE_FORMATS,
|
|
3327
|
+
useValue: MY_NATIVE_FORMATS
|
|
3328
|
+
}],
|
|
3329
|
+
template: "<mat-form-field appearance=\"fill\">\r\n <mat-label>{{ label() }}</mat-label>\r\n <mat-date-range-input\r\n [rangePicker]=\"picker\"\r\n [min]=\"minDate()\"\r\n >\r\n <input matStartDate [formField]=\"form.begin\" placeholder=\"Дата начала\" />\r\n <input matEndDate [formField]=\"form.end\" placeholder=\"Дата окончания\" />\r\n </mat-date-range-input>\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-date-range-picker #picker></mat-date-range-picker>\r\n @if (form.begin().touched() && form.begin().invalid()) {\r\n <ng-container ngProjectAs=\"mat-error\">\r\n <mat-error>{{ form.begin().errors()[0]?.message }}</mat-error>\r\n </ng-container>\r\n }\r\n @if (form.end().touched() && form.end().invalid()) {\r\n <ng-container ngProjectAs=\"mat-error\">\r\n <mat-error>{{ form.end().errors()[0]?.message }}</mat-error>\r\n </ng-container>\r\n }\r\n</mat-form-field>\r\n",
|
|
3330
|
+
styles: ["mat-form-field{margin-right:16px}\n"]
|
|
3380
3331
|
}]
|
|
3381
3332
|
}],
|
|
3333
|
+
ctorParameters: () => [],
|
|
3382
3334
|
propDecorators: {
|
|
3383
|
-
|
|
3335
|
+
label: [{
|
|
3384
3336
|
type: i0.Input,
|
|
3385
3337
|
args: [{
|
|
3386
3338
|
isSignal: true,
|
|
3387
|
-
alias: "
|
|
3339
|
+
alias: "label",
|
|
3388
3340
|
required: false
|
|
3389
3341
|
}]
|
|
3390
3342
|
}],
|
|
3391
|
-
|
|
3343
|
+
dateRange: [{
|
|
3392
3344
|
type: i0.Input,
|
|
3393
3345
|
args: [{
|
|
3394
3346
|
isSignal: true,
|
|
3395
|
-
alias: "
|
|
3347
|
+
alias: "dateRange",
|
|
3396
3348
|
required: false
|
|
3397
3349
|
}]
|
|
3398
3350
|
}],
|
|
3399
|
-
|
|
3351
|
+
minDate: [{
|
|
3400
3352
|
type: i0.Input,
|
|
3401
3353
|
args: [{
|
|
3402
3354
|
isSignal: true,
|
|
3403
|
-
alias: "
|
|
3355
|
+
alias: "minDate",
|
|
3404
3356
|
required: false
|
|
3405
3357
|
}]
|
|
3406
|
-
}, {
|
|
3407
|
-
type: i0.Output,
|
|
3408
|
-
args: ["valueChange"]
|
|
3409
3358
|
}],
|
|
3410
|
-
|
|
3359
|
+
clearInput: [{
|
|
3411
3360
|
type: i0.Input,
|
|
3412
3361
|
args: [{
|
|
3413
3362
|
isSignal: true,
|
|
3414
|
-
alias: "
|
|
3363
|
+
alias: "clearInput",
|
|
3415
3364
|
required: false
|
|
3416
3365
|
}]
|
|
3417
|
-
},
|
|
3366
|
+
}],
|
|
3367
|
+
required: [{
|
|
3368
|
+
type: i0.Input,
|
|
3369
|
+
args: [{
|
|
3370
|
+
isSignal: true,
|
|
3371
|
+
alias: "required",
|
|
3372
|
+
required: false
|
|
3373
|
+
}]
|
|
3374
|
+
}],
|
|
3375
|
+
dateRangeChange: [{
|
|
3418
3376
|
type: i0.Output,
|
|
3419
|
-
args: ["
|
|
3377
|
+
args: ["dateRangeChange"]
|
|
3420
3378
|
}]
|
|
3421
3379
|
}
|
|
3422
3380
|
});
|
|
3423
|
-
var
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
}
|
|
3432
|
-
const timestamp = typeof value === "number" ? value : Date.parse(value);
|
|
3433
|
-
return isNaN(timestamp) ? null : new Date(timestamp);
|
|
3434
|
-
}
|
|
3435
|
-
format(date, displayFormat) {
|
|
3436
|
-
if (displayFormat === "input") return `${String(date.getDate()).padStart(2, "0")}.${String(date.getMonth() + 1).padStart(2, "0")}.${date.getFullYear()}`;
|
|
3437
|
-
return super.format(date, displayFormat);
|
|
3438
|
-
}
|
|
3381
|
+
var DialogAction;
|
|
3382
|
+
(function(DialogAction) {
|
|
3383
|
+
DialogAction["Add"] = "Добавить";
|
|
3384
|
+
DialogAction["Edit"] = "Изменить";
|
|
3385
|
+
DialogAction["Delete"] = "Удалить";
|
|
3386
|
+
DialogAction["None"] = "";
|
|
3387
|
+
})(DialogAction || (DialogAction = {}));
|
|
3388
|
+
var EmptyComponent = class EmptyComponent {
|
|
3439
3389
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3440
3390
|
minVersion: "12.0.0",
|
|
3441
3391
|
version: "22.2.2",
|
|
3442
3392
|
ngImport: i0,
|
|
3443
|
-
type:
|
|
3444
|
-
deps:
|
|
3445
|
-
target: i0.ɵɵFactoryTarget.
|
|
3393
|
+
type: EmptyComponent,
|
|
3394
|
+
deps: [],
|
|
3395
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
3446
3396
|
});
|
|
3447
|
-
static
|
|
3448
|
-
minVersion: "
|
|
3397
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
3398
|
+
minVersion: "14.0.0",
|
|
3449
3399
|
version: "22.2.2",
|
|
3400
|
+
type: EmptyComponent,
|
|
3401
|
+
isStandalone: true,
|
|
3402
|
+
selector: "ngx-uik-empty-route-guard-holder",
|
|
3450
3403
|
ngImport: i0,
|
|
3451
|
-
|
|
3404
|
+
template: "",
|
|
3405
|
+
isInline: true
|
|
3452
3406
|
});
|
|
3453
3407
|
};
|
|
3454
3408
|
i0.ɵɵngDeclareClassMetadata({
|
|
3455
3409
|
minVersion: "12.0.0",
|
|
3456
3410
|
version: "22.2.2",
|
|
3457
3411
|
ngImport: i0,
|
|
3458
|
-
type:
|
|
3459
|
-
decorators: [{
|
|
3412
|
+
type: EmptyComponent,
|
|
3413
|
+
decorators: [{
|
|
3414
|
+
type: Component,
|
|
3415
|
+
args: [{
|
|
3416
|
+
selector: "ngx-uik-empty-route-guard-holder",
|
|
3417
|
+
template: ""
|
|
3418
|
+
}]
|
|
3419
|
+
}]
|
|
3460
3420
|
});
|
|
3461
|
-
const
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
dateInput: "input",
|
|
3465
|
-
monthYearLabel: {
|
|
3466
|
-
year: "numeric",
|
|
3467
|
-
month: "short"
|
|
3468
|
-
},
|
|
3469
|
-
dateA11yLabel: {
|
|
3470
|
-
year: "numeric",
|
|
3471
|
-
month: "long",
|
|
3472
|
-
day: "numeric"
|
|
3473
|
-
},
|
|
3474
|
-
monthYearA11yLabel: {
|
|
3475
|
-
year: "numeric",
|
|
3476
|
-
month: "long"
|
|
3477
|
-
}
|
|
3478
|
-
}
|
|
3479
|
-
};
|
|
3480
|
-
const toIsoString = (date) => {
|
|
3481
|
-
if (!date) return "";
|
|
3482
|
-
return date.toISOString().split("T")[0];
|
|
3483
|
-
};
|
|
3484
|
-
const dateRangeFormSchema = (isRequired) => z$1.object({
|
|
3485
|
-
begin: z$1.instanceof(Date).nullable().refine((val) => !isRequired || val !== null, { message: "Укажите период" }),
|
|
3486
|
-
end: z$1.instanceof(Date).nullable().refine((val) => !isRequired || val !== null, { message: "Укажите период" })
|
|
3421
|
+
const loginSchema = z$1.object({
|
|
3422
|
+
username: z$1.string().min(1, { message: "Пожалуйста, заполните это поле" }).regex(/^[A-Za-z]{1,}\.[A-Za-z]{1,}\.[A-Za-z]*$/, { message: "Пожалуйста, используйте формат \"a.p.petrov\"" }),
|
|
3423
|
+
password: z$1.string().min(1, { message: "Пожалуйста, заполните это поле" })
|
|
3487
3424
|
});
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
})
|
|
3492
|
-
var DateRangeInputComponent = class DateRangeInputComponent {
|
|
3493
|
-
DEFAULT_MIN_DATE = new Date(2020, 0, 1);
|
|
3494
|
-
label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
3495
|
-
dateRange = input({
|
|
3496
|
-
begin: "",
|
|
3497
|
-
end: ""
|
|
3498
|
-
}, ...ngDevMode ? [{ debugName: "dateRange" }] : /* istanbul ignore next */ []);
|
|
3499
|
-
minDate = input(this.DEFAULT_MIN_DATE, ...ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []);
|
|
3500
|
-
clearInput = input(null, ...ngDevMode ? [{ debugName: "clearInput" }] : /* istanbul ignore next */ []);
|
|
3501
|
-
required = input(false, ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
|
|
3502
|
-
dateRangeChange = output();
|
|
3425
|
+
var LoginFormComponent = class LoginFormComponent {
|
|
3426
|
+
pending = input(false, ...ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []);
|
|
3427
|
+
submitted = output();
|
|
3428
|
+
isHidePassword = signal(true, ...ngDevMode ? [{ debugName: "isHidePassword" }] : /* istanbul ignore next */ []);
|
|
3503
3429
|
formModel = signal({
|
|
3504
|
-
|
|
3505
|
-
|
|
3430
|
+
username: "",
|
|
3431
|
+
password: ""
|
|
3506
3432
|
}, ...ngDevMode ? [{ debugName: "formModel" }] : /* istanbul ignore next */ []);
|
|
3507
3433
|
form = form(this.formModel, (schemaPath) => {
|
|
3508
|
-
validateStandardSchema(schemaPath,
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
})
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
untracked(() => {
|
|
3520
|
-
this.form.begin().value.set(value.begin ? new Date(value.begin) : null);
|
|
3521
|
-
this.form.end().value.set(value.end ? new Date(value.end) : null);
|
|
3522
|
-
});
|
|
3523
|
-
});
|
|
3524
|
-
effect(() => {
|
|
3525
|
-
const currentValues = this.form().value();
|
|
3526
|
-
if (this.form().valid()) {
|
|
3527
|
-
const formattedRange = dateRangeSchema(this.required()).parse(currentValues);
|
|
3528
|
-
this.dateRangeChange.emit(formattedRange);
|
|
3529
|
-
}
|
|
3530
|
-
});
|
|
3434
|
+
validateStandardSchema(schemaPath, loginSchema);
|
|
3435
|
+
disabled(schemaPath.username, { when: () => this.pending() });
|
|
3436
|
+
disabled(schemaPath.password, { when: () => this.pending() });
|
|
3437
|
+
}, { submission: { action: async (field) => {
|
|
3438
|
+
this.submitted.emit(field().value());
|
|
3439
|
+
} } });
|
|
3440
|
+
showPassword() {
|
|
3441
|
+
this.isHidePassword.set(false);
|
|
3442
|
+
}
|
|
3443
|
+
hidePassword() {
|
|
3444
|
+
this.isHidePassword.set(true);
|
|
3531
3445
|
}
|
|
3532
3446
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3533
3447
|
minVersion: "12.0.0",
|
|
3534
3448
|
version: "22.2.2",
|
|
3535
3449
|
ngImport: i0,
|
|
3536
|
-
type:
|
|
3450
|
+
type: LoginFormComponent,
|
|
3537
3451
|
deps: [],
|
|
3538
3452
|
target: i0.ɵɵFactoryTarget.Component
|
|
3539
3453
|
});
|
|
3540
3454
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
3541
3455
|
minVersion: "17.0.0",
|
|
3542
3456
|
version: "22.2.2",
|
|
3543
|
-
type:
|
|
3457
|
+
type: LoginFormComponent,
|
|
3544
3458
|
isStandalone: true,
|
|
3545
|
-
selector: "ngx-uik-
|
|
3546
|
-
inputs: {
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
dateRange: {
|
|
3555
|
-
classPropertyName: "dateRange",
|
|
3556
|
-
publicName: "dateRange",
|
|
3557
|
-
isSignal: true,
|
|
3558
|
-
isRequired: false,
|
|
3559
|
-
transformFunction: null
|
|
3560
|
-
},
|
|
3561
|
-
minDate: {
|
|
3562
|
-
classPropertyName: "minDate",
|
|
3563
|
-
publicName: "minDate",
|
|
3564
|
-
isSignal: true,
|
|
3565
|
-
isRequired: false,
|
|
3566
|
-
transformFunction: null
|
|
3567
|
-
},
|
|
3568
|
-
clearInput: {
|
|
3569
|
-
classPropertyName: "clearInput",
|
|
3570
|
-
publicName: "clearInput",
|
|
3571
|
-
isSignal: true,
|
|
3572
|
-
isRequired: false,
|
|
3573
|
-
transformFunction: null
|
|
3574
|
-
},
|
|
3575
|
-
required: {
|
|
3576
|
-
classPropertyName: "required",
|
|
3577
|
-
publicName: "required",
|
|
3578
|
-
isSignal: true,
|
|
3579
|
-
isRequired: false,
|
|
3580
|
-
transformFunction: null
|
|
3581
|
-
}
|
|
3582
|
-
},
|
|
3583
|
-
outputs: { dateRangeChange: "dateRangeChange" },
|
|
3584
|
-
providers: [{
|
|
3585
|
-
provide: DateAdapter,
|
|
3586
|
-
useClass: CustomDateAdapter
|
|
3587
|
-
}, {
|
|
3588
|
-
provide: MAT_DATE_FORMATS,
|
|
3589
|
-
useValue: MY_NATIVE_FORMATS
|
|
3590
|
-
}],
|
|
3459
|
+
selector: "ngx-uik-login-form",
|
|
3460
|
+
inputs: { pending: {
|
|
3461
|
+
classPropertyName: "pending",
|
|
3462
|
+
publicName: "pending",
|
|
3463
|
+
isSignal: true,
|
|
3464
|
+
isRequired: false,
|
|
3465
|
+
transformFunction: null
|
|
3466
|
+
} },
|
|
3467
|
+
outputs: { submitted: "submitted" },
|
|
3591
3468
|
ngImport: i0,
|
|
3592
|
-
template: "<mat-
|
|
3593
|
-
styles: ["
|
|
3469
|
+
template: "<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <mat-card-title> Авторизация </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <form [formRoot]=\"form\">\r\n <mat-form-field class=\"login-field\">\r\n <mat-label>Имя пользователя</mat-label>\r\n <input\r\n type=\"text\"\r\n matInput\r\n autocomplete=\"on\"\r\n placeholder=\"Имя пользователя\"\r\n [formField]=\"form.username\"\r\n />\r\n @if (form.username().touched() && form.username().invalid()) {\r\n <ng-container ngProjectAs=\"mat-error\">\r\n <mat-error>{{ form.username().errors()[0]?.message }}</mat-error>\r\n </ng-container>\r\n }\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"login-field\">\r\n <mat-label>Пароль</mat-label>\r\n <input\r\n [type]=\"isHidePassword() ? 'password' : 'text'\"\r\n matInput\r\n placeholder=\"Пароль\"\r\n [formField]=\"form.password\"\r\n />\r\n <mat-icon\r\n class=\"watcher\"\r\n matSuffix\r\n (mousedown)=\"showPassword()\"\r\n (mouseup)=\"hidePassword()\"\r\n >{{ isHidePassword() ? \"visibility_off\" : \"visibility\" }}</mat-icon\r\n >\r\n @if (form.password().touched() && form.password().invalid()) {\r\n <ng-container ngProjectAs=\"mat-error\">\r\n <mat-error>{{ form.password().errors()[0]?.message }}</mat-error>\r\n </ng-container>\r\n }\r\n </mat-form-field>\r\n\r\n <div class=\"loginButtons\">\r\n <button\r\n type=\"submit\"\r\n mat-button\r\n mat-stroked-button\r\n color=\"primary\"\r\n [disabled]=\"!form().valid() || pending()\"\r\n >\r\n Войти\r\n </button>\r\n </div>\r\n </form>\r\n </mat-card-content>\r\n</mat-card>\r\n",
|
|
3470
|
+
styles: [":host{display:flex;justify-content:center;margin:32px 0}form{display:flex;flex-direction:column;gap:16px}.login-field{width:100%;min-width:300px}mat-card-header{justify-content:center}mat-card-content{font-size:16px}.loginButtons{display:flex;flex-direction:row;justify-content:flex-end}.watcher{cursor:default}\n"],
|
|
3594
3471
|
dependencies: [
|
|
3472
|
+
{
|
|
3473
|
+
kind: "directive",
|
|
3474
|
+
type: FormRoot,
|
|
3475
|
+
selector: "form[formRoot]",
|
|
3476
|
+
inputs: ["formRoot"]
|
|
3477
|
+
},
|
|
3595
3478
|
{
|
|
3596
3479
|
kind: "directive",
|
|
3597
3480
|
type: FormField,
|
|
@@ -3599,6 +3482,28 @@ var DateRangeInputComponent = class DateRangeInputComponent {
|
|
|
3599
3482
|
inputs: ["formField"],
|
|
3600
3483
|
exportAs: ["formField"]
|
|
3601
3484
|
},
|
|
3485
|
+
{
|
|
3486
|
+
kind: "component",
|
|
3487
|
+
type: MatCard,
|
|
3488
|
+
selector: "mat-card",
|
|
3489
|
+
inputs: ["appearance"],
|
|
3490
|
+
exportAs: ["matCard"]
|
|
3491
|
+
},
|
|
3492
|
+
{
|
|
3493
|
+
kind: "component",
|
|
3494
|
+
type: MatCardHeader,
|
|
3495
|
+
selector: "mat-card-header"
|
|
3496
|
+
},
|
|
3497
|
+
{
|
|
3498
|
+
kind: "directive",
|
|
3499
|
+
type: MatCardTitle,
|
|
3500
|
+
selector: "mat-card-title, [mat-card-title], [matCardTitle]"
|
|
3501
|
+
},
|
|
3502
|
+
{
|
|
3503
|
+
kind: "directive",
|
|
3504
|
+
type: MatCardContent,
|
|
3505
|
+
selector: "mat-card-content"
|
|
3506
|
+
},
|
|
3602
3507
|
{
|
|
3603
3508
|
kind: "component",
|
|
3604
3509
|
type: MatFormField,
|
|
@@ -3618,65 +3523,172 @@ var DateRangeInputComponent = class DateRangeInputComponent {
|
|
|
3618
3523
|
type: MatLabel,
|
|
3619
3524
|
selector: "mat-label"
|
|
3620
3525
|
},
|
|
3526
|
+
{
|
|
3527
|
+
kind: "directive",
|
|
3528
|
+
type: MatInput,
|
|
3529
|
+
selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
|
|
3530
|
+
inputs: [
|
|
3531
|
+
"disabled",
|
|
3532
|
+
"id",
|
|
3533
|
+
"placeholder",
|
|
3534
|
+
"name",
|
|
3535
|
+
"required",
|
|
3536
|
+
"type",
|
|
3537
|
+
"errorStateMatcher",
|
|
3538
|
+
"aria-describedby",
|
|
3539
|
+
"value",
|
|
3540
|
+
"readonly",
|
|
3541
|
+
"disabledInteractive"
|
|
3542
|
+
],
|
|
3543
|
+
exportAs: ["matInput"]
|
|
3544
|
+
},
|
|
3545
|
+
{
|
|
3546
|
+
kind: "directive",
|
|
3547
|
+
type: MatError,
|
|
3548
|
+
selector: "mat-error, [matError]",
|
|
3549
|
+
inputs: ["id"]
|
|
3550
|
+
},
|
|
3551
|
+
{
|
|
3552
|
+
kind: "component",
|
|
3553
|
+
type: MatIcon,
|
|
3554
|
+
selector: "mat-icon",
|
|
3555
|
+
inputs: [
|
|
3556
|
+
"color",
|
|
3557
|
+
"inline",
|
|
3558
|
+
"svgIcon",
|
|
3559
|
+
"fontSet",
|
|
3560
|
+
"fontIcon"
|
|
3561
|
+
],
|
|
3562
|
+
exportAs: ["matIcon"]
|
|
3563
|
+
},
|
|
3564
|
+
{
|
|
3565
|
+
kind: "directive",
|
|
3566
|
+
type: MatSuffix,
|
|
3567
|
+
selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
|
|
3568
|
+
inputs: ["matTextSuffix"]
|
|
3569
|
+
},
|
|
3570
|
+
{
|
|
3571
|
+
kind: "component",
|
|
3572
|
+
type: MatButton,
|
|
3573
|
+
selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
|
|
3574
|
+
inputs: ["matButton"],
|
|
3575
|
+
exportAs: ["matButton", "matAnchor"]
|
|
3576
|
+
}
|
|
3577
|
+
]
|
|
3578
|
+
});
|
|
3579
|
+
};
|
|
3580
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
3581
|
+
minVersion: "12.0.0",
|
|
3582
|
+
version: "22.2.2",
|
|
3583
|
+
ngImport: i0,
|
|
3584
|
+
type: LoginFormComponent,
|
|
3585
|
+
decorators: [{
|
|
3586
|
+
type: Component,
|
|
3587
|
+
args: [{
|
|
3588
|
+
selector: "ngx-uik-login-form",
|
|
3589
|
+
imports: [
|
|
3590
|
+
FormRoot,
|
|
3591
|
+
FormField,
|
|
3592
|
+
MatCard,
|
|
3593
|
+
MatCardHeader,
|
|
3594
|
+
MatCardTitle,
|
|
3595
|
+
MatCardContent,
|
|
3596
|
+
MatFormField,
|
|
3597
|
+
MatLabel,
|
|
3598
|
+
MatInput,
|
|
3599
|
+
MatError,
|
|
3600
|
+
MatIcon,
|
|
3601
|
+
MatSuffix,
|
|
3602
|
+
MatButton
|
|
3603
|
+
],
|
|
3604
|
+
template: "<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <mat-card-title> Авторизация </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <form [formRoot]=\"form\">\r\n <mat-form-field class=\"login-field\">\r\n <mat-label>Имя пользователя</mat-label>\r\n <input\r\n type=\"text\"\r\n matInput\r\n autocomplete=\"on\"\r\n placeholder=\"Имя пользователя\"\r\n [formField]=\"form.username\"\r\n />\r\n @if (form.username().touched() && form.username().invalid()) {\r\n <ng-container ngProjectAs=\"mat-error\">\r\n <mat-error>{{ form.username().errors()[0]?.message }}</mat-error>\r\n </ng-container>\r\n }\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"login-field\">\r\n <mat-label>Пароль</mat-label>\r\n <input\r\n [type]=\"isHidePassword() ? 'password' : 'text'\"\r\n matInput\r\n placeholder=\"Пароль\"\r\n [formField]=\"form.password\"\r\n />\r\n <mat-icon\r\n class=\"watcher\"\r\n matSuffix\r\n (mousedown)=\"showPassword()\"\r\n (mouseup)=\"hidePassword()\"\r\n >{{ isHidePassword() ? \"visibility_off\" : \"visibility\" }}</mat-icon\r\n >\r\n @if (form.password().touched() && form.password().invalid()) {\r\n <ng-container ngProjectAs=\"mat-error\">\r\n <mat-error>{{ form.password().errors()[0]?.message }}</mat-error>\r\n </ng-container>\r\n }\r\n </mat-form-field>\r\n\r\n <div class=\"loginButtons\">\r\n <button\r\n type=\"submit\"\r\n mat-button\r\n mat-stroked-button\r\n color=\"primary\"\r\n [disabled]=\"!form().valid() || pending()\"\r\n >\r\n Войти\r\n </button>\r\n </div>\r\n </form>\r\n </mat-card-content>\r\n</mat-card>\r\n",
|
|
3605
|
+
styles: [":host{display:flex;justify-content:center;margin:32px 0}form{display:flex;flex-direction:column;gap:16px}.login-field{width:100%;min-width:300px}mat-card-header{justify-content:center}mat-card-content{font-size:16px}.loginButtons{display:flex;flex-direction:row;justify-content:flex-end}.watcher{cursor:default}\n"]
|
|
3606
|
+
}]
|
|
3607
|
+
}],
|
|
3608
|
+
propDecorators: {
|
|
3609
|
+
pending: [{
|
|
3610
|
+
type: i0.Input,
|
|
3611
|
+
args: [{
|
|
3612
|
+
isSignal: true,
|
|
3613
|
+
alias: "pending",
|
|
3614
|
+
required: false
|
|
3615
|
+
}]
|
|
3616
|
+
}],
|
|
3617
|
+
submitted: [{
|
|
3618
|
+
type: i0.Output,
|
|
3619
|
+
args: ["submitted"]
|
|
3620
|
+
}]
|
|
3621
|
+
}
|
|
3622
|
+
});
|
|
3623
|
+
var PermitFormComponent = class PermitFormComponent {
|
|
3624
|
+
hidy = viewChild("hidy", ...ngDevMode ? [{ debugName: "hidy" }] : /* istanbul ignore next */ []);
|
|
3625
|
+
submitted = output();
|
|
3626
|
+
constructor() {
|
|
3627
|
+
effect(() => {
|
|
3628
|
+
const inputEl = this.hidy()?.nativeElement;
|
|
3629
|
+
if (inputEl) inputEl.focus();
|
|
3630
|
+
});
|
|
3631
|
+
}
|
|
3632
|
+
focusInput() {
|
|
3633
|
+
this.hidy()?.nativeElement.focus();
|
|
3634
|
+
}
|
|
3635
|
+
onKeydown(event) {
|
|
3636
|
+
if (event.key === "Enter") {
|
|
3637
|
+
const inputEl = this.hidy()?.nativeElement;
|
|
3638
|
+
if (inputEl?.value && inputEl.value.trim()) {
|
|
3639
|
+
this.submitted.emit(inputEl.value);
|
|
3640
|
+
inputEl.value = "";
|
|
3641
|
+
}
|
|
3642
|
+
}
|
|
3643
|
+
}
|
|
3644
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3645
|
+
minVersion: "12.0.0",
|
|
3646
|
+
version: "22.2.2",
|
|
3647
|
+
ngImport: i0,
|
|
3648
|
+
type: PermitFormComponent,
|
|
3649
|
+
deps: [],
|
|
3650
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
3651
|
+
});
|
|
3652
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
3653
|
+
minVersion: "17.2.0",
|
|
3654
|
+
version: "22.2.2",
|
|
3655
|
+
type: PermitFormComponent,
|
|
3656
|
+
isStandalone: true,
|
|
3657
|
+
selector: "ngx-uik-permit-form",
|
|
3658
|
+
outputs: { submitted: "submitted" },
|
|
3659
|
+
host: { listeners: { "document:mouseup": "focusInput()" } },
|
|
3660
|
+
viewQueries: [{
|
|
3661
|
+
propertyName: "hidy",
|
|
3662
|
+
first: true,
|
|
3663
|
+
predicate: ["hidy"],
|
|
3664
|
+
descendants: true,
|
|
3665
|
+
isSignal: true
|
|
3666
|
+
}],
|
|
3667
|
+
ngImport: i0,
|
|
3668
|
+
template: "<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <mat-card-title>\r\n Приложите пропуск\r\n </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <div class=\"permit\"></div>\r\n </mat-card-content>\r\n</mat-card>\r\n<input #hidy class=\"hidy\" type=\"text\" (keydown)=\"onKeydown($event)\"/>",
|
|
3669
|
+
styles: [":host{display:flex;justify-content:center;margin:32px 0}.mat-mdc-form-field{width:100%;min-width:300px}mat-card-title,mat-card-content{display:flex;justify-content:center}mat-card-content{font-size:16px}div.permit{border:none;width:300px;background-size:300px;height:180px}div.permit button div{margin-bottom:200px;color:#000;font-size:34px}input.hidy{opacity:0;position:absolute;left:-200px;top:-200px}\n"],
|
|
3670
|
+
dependencies: [
|
|
3621
3671
|
{
|
|
3622
3672
|
kind: "component",
|
|
3623
|
-
type:
|
|
3624
|
-
selector: "mat-
|
|
3625
|
-
inputs: [
|
|
3626
|
-
|
|
3627
|
-
"required",
|
|
3628
|
-
"dateFilter",
|
|
3629
|
-
"min",
|
|
3630
|
-
"max",
|
|
3631
|
-
"disabled",
|
|
3632
|
-
"separator",
|
|
3633
|
-
"comparisonStart",
|
|
3634
|
-
"comparisonEnd"
|
|
3635
|
-
],
|
|
3636
|
-
exportAs: ["matDateRangeInput"]
|
|
3637
|
-
},
|
|
3638
|
-
{
|
|
3639
|
-
kind: "directive",
|
|
3640
|
-
type: MatStartDate,
|
|
3641
|
-
selector: "input[matStartDate]",
|
|
3642
|
-
outputs: ["dateChange", "dateInput"]
|
|
3643
|
-
},
|
|
3644
|
-
{
|
|
3645
|
-
kind: "directive",
|
|
3646
|
-
type: MatEndDate,
|
|
3647
|
-
selector: "input[matEndDate]",
|
|
3648
|
-
outputs: ["dateChange", "dateInput"]
|
|
3673
|
+
type: MatCard,
|
|
3674
|
+
selector: "mat-card",
|
|
3675
|
+
inputs: ["appearance"],
|
|
3676
|
+
exportAs: ["matCard"]
|
|
3649
3677
|
},
|
|
3650
3678
|
{
|
|
3651
3679
|
kind: "component",
|
|
3652
|
-
type:
|
|
3653
|
-
selector: "mat-
|
|
3654
|
-
inputs: [
|
|
3655
|
-
"for",
|
|
3656
|
-
"tabIndex",
|
|
3657
|
-
"aria-label",
|
|
3658
|
-
"disabled",
|
|
3659
|
-
"disableRipple"
|
|
3660
|
-
],
|
|
3661
|
-
exportAs: ["matDatepickerToggle"]
|
|
3680
|
+
type: MatCardHeader,
|
|
3681
|
+
selector: "mat-card-header"
|
|
3662
3682
|
},
|
|
3663
3683
|
{
|
|
3664
3684
|
kind: "directive",
|
|
3665
|
-
type:
|
|
3666
|
-
selector: "
|
|
3667
|
-
inputs: ["matTextSuffix"]
|
|
3668
|
-
},
|
|
3669
|
-
{
|
|
3670
|
-
kind: "component",
|
|
3671
|
-
type: MatDateRangePicker,
|
|
3672
|
-
selector: "mat-date-range-picker",
|
|
3673
|
-
exportAs: ["matDateRangePicker"]
|
|
3685
|
+
type: MatCardTitle,
|
|
3686
|
+
selector: "mat-card-title, [mat-card-title], [matCardTitle]"
|
|
3674
3687
|
},
|
|
3675
3688
|
{
|
|
3676
3689
|
kind: "directive",
|
|
3677
|
-
type:
|
|
3678
|
-
selector: "mat-
|
|
3679
|
-
inputs: ["id"]
|
|
3690
|
+
type: MatCardContent,
|
|
3691
|
+
selector: "mat-card-content"
|
|
3680
3692
|
}
|
|
3681
3693
|
]
|
|
3682
3694
|
});
|
|
@@ -3685,121 +3697,146 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3685
3697
|
minVersion: "12.0.0",
|
|
3686
3698
|
version: "22.2.2",
|
|
3687
3699
|
ngImport: i0,
|
|
3688
|
-
type:
|
|
3700
|
+
type: PermitFormComponent,
|
|
3689
3701
|
decorators: [{
|
|
3690
3702
|
type: Component,
|
|
3691
3703
|
args: [{
|
|
3692
|
-
selector: "ngx-uik-
|
|
3704
|
+
selector: "ngx-uik-permit-form",
|
|
3693
3705
|
imports: [
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
MatStartDate,
|
|
3699
|
-
MatEndDate,
|
|
3700
|
-
MatDatepickerToggle,
|
|
3701
|
-
MatSuffix,
|
|
3702
|
-
MatDateRangePicker,
|
|
3703
|
-
MatError
|
|
3706
|
+
MatCard,
|
|
3707
|
+
MatCardHeader,
|
|
3708
|
+
MatCardTitle,
|
|
3709
|
+
MatCardContent
|
|
3704
3710
|
],
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
useClass: CustomDateAdapter
|
|
3708
|
-
}, {
|
|
3709
|
-
provide: MAT_DATE_FORMATS,
|
|
3710
|
-
useValue: MY_NATIVE_FORMATS
|
|
3711
|
-
}],
|
|
3712
|
-
template: "<mat-form-field appearance=\"fill\">\r\n <mat-label>{{ label() }}</mat-label>\r\n <mat-date-range-input\r\n [rangePicker]=\"picker\"\r\n [min]=\"minDate()\"\r\n >\r\n <input matStartDate [formField]=\"form.begin\" placeholder=\"Дата начала\" />\r\n <input matEndDate [formField]=\"form.end\" placeholder=\"Дата окончания\" />\r\n </mat-date-range-input>\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-date-range-picker #picker></mat-date-range-picker>\r\n @if (form.begin().touched() && form.begin().invalid()) {\r\n <ng-container ngProjectAs=\"mat-error\">\r\n <mat-error>{{ form.begin().errors()[0]?.message }}</mat-error>\r\n </ng-container>\r\n }\r\n @if (form.end().touched() && form.end().invalid()) {\r\n <ng-container ngProjectAs=\"mat-error\">\r\n <mat-error>{{ form.end().errors()[0]?.message }}</mat-error>\r\n </ng-container>\r\n }\r\n</mat-form-field>\r\n",
|
|
3713
|
-
styles: ["mat-form-field{margin-right:16px}\n"]
|
|
3711
|
+
template: "<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <mat-card-title>\r\n Приложите пропуск\r\n </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <div class=\"permit\"></div>\r\n </mat-card-content>\r\n</mat-card>\r\n<input #hidy class=\"hidy\" type=\"text\" (keydown)=\"onKeydown($event)\"/>",
|
|
3712
|
+
styles: [":host{display:flex;justify-content:center;margin:32px 0}.mat-mdc-form-field{width:100%;min-width:300px}mat-card-title,mat-card-content{display:flex;justify-content:center}mat-card-content{font-size:16px}div.permit{border:none;width:300px;background-size:300px;height:180px}div.permit button div{margin-bottom:200px;color:#000;font-size:34px}input.hidy{opacity:0;position:absolute;left:-200px;top:-200px}\n"]
|
|
3714
3713
|
}]
|
|
3715
3714
|
}],
|
|
3716
3715
|
ctorParameters: () => [],
|
|
3717
3716
|
propDecorators: {
|
|
3718
|
-
|
|
3719
|
-
type: i0.
|
|
3720
|
-
args: [{
|
|
3721
|
-
isSignal: true,
|
|
3722
|
-
alias: "label",
|
|
3723
|
-
required: false
|
|
3724
|
-
}]
|
|
3725
|
-
}],
|
|
3726
|
-
dateRange: [{
|
|
3727
|
-
type: i0.Input,
|
|
3728
|
-
args: [{
|
|
3729
|
-
isSignal: true,
|
|
3730
|
-
alias: "dateRange",
|
|
3731
|
-
required: false
|
|
3732
|
-
}]
|
|
3733
|
-
}],
|
|
3734
|
-
minDate: [{
|
|
3735
|
-
type: i0.Input,
|
|
3736
|
-
args: [{
|
|
3737
|
-
isSignal: true,
|
|
3738
|
-
alias: "minDate",
|
|
3739
|
-
required: false
|
|
3740
|
-
}]
|
|
3741
|
-
}],
|
|
3742
|
-
clearInput: [{
|
|
3743
|
-
type: i0.Input,
|
|
3744
|
-
args: [{
|
|
3745
|
-
isSignal: true,
|
|
3746
|
-
alias: "clearInput",
|
|
3747
|
-
required: false
|
|
3748
|
-
}]
|
|
3749
|
-
}],
|
|
3750
|
-
required: [{
|
|
3751
|
-
type: i0.Input,
|
|
3752
|
-
args: [{
|
|
3753
|
-
isSignal: true,
|
|
3754
|
-
alias: "required",
|
|
3755
|
-
required: false
|
|
3756
|
-
}]
|
|
3717
|
+
hidy: [{
|
|
3718
|
+
type: i0.ViewChild,
|
|
3719
|
+
args: ["hidy", { isSignal: true }]
|
|
3757
3720
|
}],
|
|
3758
|
-
|
|
3721
|
+
submitted: [{
|
|
3759
3722
|
type: i0.Output,
|
|
3760
|
-
args: ["
|
|
3723
|
+
args: ["submitted"]
|
|
3724
|
+
}],
|
|
3725
|
+
focusInput: [{
|
|
3726
|
+
type: HostListener,
|
|
3727
|
+
args: ["document:mouseup"]
|
|
3761
3728
|
}]
|
|
3762
3729
|
}
|
|
3763
3730
|
});
|
|
3764
|
-
var
|
|
3765
|
-
(
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3731
|
+
var LoginPageComponent = class LoginPageComponent {
|
|
3732
|
+
pending = signal(false, ...ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []);
|
|
3733
|
+
isKiosk = signal(false, ...ngDevMode ? [{ debugName: "isKiosk" }] : /* istanbul ignore next */ []);
|
|
3734
|
+
idCas = input(0, ...ngDevMode ? [{ debugName: "idCas" }] : /* istanbul ignore next */ []);
|
|
3735
|
+
authService = inject(AuthService);
|
|
3736
|
+
router = inject(Router);
|
|
3737
|
+
notificationService = inject(UIKIT_NOTIFICATION_TOKEN, { optional: true });
|
|
3738
|
+
constructor() {
|
|
3739
|
+
if (localStorage.getItem("id_human") || localStorage.getItem("kiosk-keyboard-layout")) {}
|
|
3740
|
+
}
|
|
3741
|
+
async onSubmit(event) {
|
|
3742
|
+
this.startLoading();
|
|
3743
|
+
try {
|
|
3744
|
+
await lastValueFrom(this.authService.login(event.username, event.password, this.idCas()));
|
|
3745
|
+
this.handleSuccessLogin();
|
|
3746
|
+
} catch (error) {
|
|
3747
|
+
this.handleError(error);
|
|
3748
|
+
} finally {
|
|
3749
|
+
this.finishLoading();
|
|
3750
|
+
}
|
|
3751
|
+
}
|
|
3752
|
+
async onSubmitPermit(permit) {
|
|
3753
|
+
this.startLoading();
|
|
3754
|
+
try {
|
|
3755
|
+
await lastValueFrom(this.authService.loginByPermit(permit, this.idCas()));
|
|
3756
|
+
this.handleSuccessLogin();
|
|
3757
|
+
} catch (error) {
|
|
3758
|
+
this.handleError(error);
|
|
3759
|
+
} finally {
|
|
3760
|
+
this.finishLoading();
|
|
3761
|
+
}
|
|
3762
|
+
}
|
|
3763
|
+
startLoading() {
|
|
3764
|
+
this.pending.set(true);
|
|
3765
|
+
}
|
|
3766
|
+
finishLoading() {
|
|
3767
|
+
this.pending.set(false);
|
|
3768
|
+
}
|
|
3769
|
+
handleError(error) {
|
|
3770
|
+
const errorMsg = "Ошибка при авторизации: " + (error.error || error.error?.message || error.message);
|
|
3771
|
+
this.notificationService?.error(errorMsg, 0);
|
|
3772
|
+
}
|
|
3773
|
+
handleSuccessLogin() {
|
|
3774
|
+
this.notificationService?.success("Успешная авторизация");
|
|
3775
|
+
if (!this.router) return;
|
|
3776
|
+
const returnUrl = this.router.parseUrl(this.router.url).queryParamMap.get("returnUrl");
|
|
3777
|
+
if (returnUrl) this.router.navigateByUrl(decodeURIComponent(returnUrl));
|
|
3778
|
+
else this.router.navigate(["/"]);
|
|
3779
|
+
}
|
|
3772
3780
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3773
3781
|
minVersion: "12.0.0",
|
|
3774
3782
|
version: "22.2.2",
|
|
3775
3783
|
ngImport: i0,
|
|
3776
|
-
type:
|
|
3784
|
+
type: LoginPageComponent,
|
|
3777
3785
|
deps: [],
|
|
3778
3786
|
target: i0.ɵɵFactoryTarget.Component
|
|
3779
3787
|
});
|
|
3780
3788
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
3781
|
-
minVersion: "
|
|
3789
|
+
minVersion: "17.0.0",
|
|
3782
3790
|
version: "22.2.2",
|
|
3783
|
-
type:
|
|
3791
|
+
type: LoginPageComponent,
|
|
3784
3792
|
isStandalone: true,
|
|
3785
|
-
selector: "ngx-uik-
|
|
3793
|
+
selector: "ngx-uik-login-page",
|
|
3794
|
+
inputs: { idCas: {
|
|
3795
|
+
classPropertyName: "idCas",
|
|
3796
|
+
publicName: "idCas",
|
|
3797
|
+
isSignal: true,
|
|
3798
|
+
isRequired: false,
|
|
3799
|
+
transformFunction: null
|
|
3800
|
+
} },
|
|
3786
3801
|
ngImport: i0,
|
|
3787
|
-
template: "",
|
|
3788
|
-
|
|
3802
|
+
template: "@if (isKiosk()) {\r\n <ngx-uik-permit-form (submitted)=\"onSubmitPermit($event)\" />\r\n} @else {\r\n <ngx-uik-login-form (submitted)=\"onSubmit($event)\" [pending]=\"pending()\" />\r\n}\r\n",
|
|
3803
|
+
styles: [""],
|
|
3804
|
+
dependencies: [{
|
|
3805
|
+
kind: "component",
|
|
3806
|
+
type: LoginFormComponent,
|
|
3807
|
+
selector: "ngx-uik-login-form",
|
|
3808
|
+
inputs: ["pending"],
|
|
3809
|
+
outputs: ["submitted"]
|
|
3810
|
+
}, {
|
|
3811
|
+
kind: "component",
|
|
3812
|
+
type: PermitFormComponent,
|
|
3813
|
+
selector: "ngx-uik-permit-form",
|
|
3814
|
+
outputs: ["submitted"]
|
|
3815
|
+
}]
|
|
3789
3816
|
});
|
|
3790
3817
|
};
|
|
3791
3818
|
i0.ɵɵngDeclareClassMetadata({
|
|
3792
3819
|
minVersion: "12.0.0",
|
|
3793
3820
|
version: "22.2.2",
|
|
3794
3821
|
ngImport: i0,
|
|
3795
|
-
type:
|
|
3822
|
+
type: LoginPageComponent,
|
|
3796
3823
|
decorators: [{
|
|
3797
3824
|
type: Component,
|
|
3798
3825
|
args: [{
|
|
3799
|
-
selector: "ngx-uik-
|
|
3800
|
-
|
|
3826
|
+
selector: "ngx-uik-login-page",
|
|
3827
|
+
imports: [LoginFormComponent, PermitFormComponent],
|
|
3828
|
+
template: "@if (isKiosk()) {\r\n <ngx-uik-permit-form (submitted)=\"onSubmitPermit($event)\" />\r\n} @else {\r\n <ngx-uik-login-form (submitted)=\"onSubmit($event)\" [pending]=\"pending()\" />\r\n}\r\n"
|
|
3801
3829
|
}]
|
|
3802
|
-
}]
|
|
3830
|
+
}],
|
|
3831
|
+
ctorParameters: () => [],
|
|
3832
|
+
propDecorators: { idCas: [{
|
|
3833
|
+
type: i0.Input,
|
|
3834
|
+
args: [{
|
|
3835
|
+
isSignal: true,
|
|
3836
|
+
alias: "idCas",
|
|
3837
|
+
required: false
|
|
3838
|
+
}]
|
|
3839
|
+
}] }
|
|
3803
3840
|
});
|
|
3804
3841
|
var NavBarComponent = class NavBarComponent extends BaseNavBarMenuClass {
|
|
3805
3842
|
visibleOnLogout = input(false, ...ngDevMode ? [{ debugName: "visibleOnLogout" }] : /* istanbul ignore next */ []);
|