aril 1.0.39 → 1.0.41
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/esm2022/http/src/serviceStateMethods.mjs +6 -2
- package/esm2022/theme/layout/app/favorite-pages/favorite-pages-sidebar.component.mjs +211 -0
- package/esm2022/theme/layout/app/favorite-pages/favorite-pages.service.mjs +55 -0
- package/esm2022/theme/layout/app/favorite-pages/modals/add-edit-favorite-modal/add-edit-favorite-modal.component.mjs +129 -0
- package/esm2022/theme/layout/app/history/history-sidebar.component.mjs +128 -0
- package/esm2022/theme/layout/app/history/history.service.mjs +146 -0
- package/esm2022/theme/layout/app/layout/app.layout.component.mjs +9 -3
- package/esm2022/theme/layout/app/profileSidebar/app.profilesidebar.component.mjs +100 -8
- package/esm2022/theme/layout/app/profileSidebar/modals/change-password-modal/change-password-modal.component.mjs +142 -0
- package/esm2022/theme/layout/app/profileSidebar/modals/edit-profile-modal/edit-profile-modal.component.mjs +123 -0
- package/esm2022/theme/layout/app/profileSidebar/profile.service.mjs +42 -0
- package/esm2022/theme/layout/app/site-map/site-map-sidebar.component.mjs +161 -0
- package/esm2022/theme/layout/app/topbar/app.topbar.component.mjs +23 -5
- package/esm2022/theme/layout/service/app.layout.service.mjs +13 -1
- package/fesm2022/aril-http.mjs +5 -1
- package/fesm2022/aril-http.mjs.map +1 -1
- package/fesm2022/aril-theme-layout.mjs +1197 -75
- package/fesm2022/aril-theme-layout.mjs.map +1 -1
- package/package.json +84 -83
- package/theme/layout/app/favorite-pages/favorite-pages-sidebar.component.d.ts +42 -0
- package/theme/layout/app/favorite-pages/favorite-pages-sidebar.component.html +106 -0
- package/theme/layout/app/favorite-pages/favorite-pages-sidebar.component.scss +181 -0
- package/theme/layout/app/favorite-pages/favorite-pages-sidebar.component.ts +253 -0
- package/theme/layout/app/favorite-pages/favorite-pages.service.d.ts +54 -0
- package/theme/layout/app/favorite-pages/favorite-pages.service.ts +87 -0
- package/theme/layout/app/favorite-pages/modals/add-edit-favorite-modal/add-edit-favorite-modal.component.d.ts +36 -0
- package/theme/layout/app/favorite-pages/modals/add-edit-favorite-modal/add-edit-favorite-modal.component.html +27 -0
- package/theme/layout/app/favorite-pages/modals/add-edit-favorite-modal/add-edit-favorite-modal.component.ts +165 -0
- package/theme/layout/app/history/history-sidebar.component.d.ts +30 -0
- package/theme/layout/app/history/history-sidebar.component.html +88 -0
- package/theme/layout/app/history/history-sidebar.component.scss +191 -0
- package/theme/layout/app/history/history-sidebar.component.ts +139 -0
- package/theme/layout/app/history/history.service.d.ts +36 -0
- package/theme/layout/app/history/history.service.ts +182 -0
- package/theme/layout/app/layout/app.layout.component.html +3 -0
- package/theme/layout/app/layout/app.layout.component.ts +7 -1
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.d.ts +17 -2
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.html +107 -135
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.scss +152 -0
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.ts +114 -7
- package/theme/layout/app/profileSidebar/modals/change-password-modal/change-password-modal.component.d.ts +30 -0
- package/theme/layout/app/profileSidebar/modals/change-password-modal/change-password-modal.component.html +46 -0
- package/theme/layout/app/profileSidebar/modals/change-password-modal/change-password-modal.component.scss +28 -0
- package/theme/layout/app/profileSidebar/modals/change-password-modal/change-password-modal.component.ts +178 -0
- package/theme/layout/app/profileSidebar/modals/edit-profile-modal/edit-profile-modal.component.d.ts +27 -0
- package/theme/layout/app/profileSidebar/modals/edit-profile-modal/edit-profile-modal.component.html +76 -0
- package/theme/layout/app/profileSidebar/modals/edit-profile-modal/edit-profile-modal.component.ts +141 -0
- package/theme/layout/app/profileSidebar/profile.service.d.ts +67 -0
- package/theme/layout/app/profileSidebar/profile.service.ts +89 -0
- package/theme/layout/app/site-map/site-map-sidebar.component.d.ts +37 -0
- package/theme/layout/app/site-map/site-map-sidebar.component.html +118 -0
- package/theme/layout/app/site-map/site-map-sidebar.component.scss +189 -0
- package/theme/layout/app/site-map/site-map-sidebar.component.ts +189 -0
- package/theme/layout/app/topbar/app.topbar.component.d.ts +7 -1
- package/theme/layout/app/topbar/app.topbar.component.html +37 -17
- package/theme/layout/app/topbar/app.topbar.component.scss +188 -12
- package/theme/layout/app/topbar/app.topbar.component.ts +29 -7
- package/theme/layout/service/app.layout.service.d.ts +6 -0
- package/theme/layout/service/app.layout.service.ts +19 -1
|
@@ -1,61 +1,344 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as i3$1 from '@angular/common';
|
|
2
|
+
import { CommonModule, NgClass, NgTemplateOutlet, AsyncPipe, UpperCasePipe } from '@angular/common';
|
|
2
3
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import { NavigationEnd, RouterLink, RouterLinkActive, RouterOutlet, NavigationCancel, NavigationError, NavigationSkipped } from '@angular/router';
|
|
6
|
-
import * as
|
|
4
|
+
import { Injectable, effect, Component, signal, inject, computed, Input, HostBinding, ViewChild, HostListener } from '@angular/core';
|
|
5
|
+
import * as i1$1 from '@angular/router';
|
|
6
|
+
import { Router, NavigationEnd, RouterModule, RouterLink, RouterLinkActive, RouterOutlet, NavigationCancel, NavigationError, NavigationSkipped } from '@angular/router';
|
|
7
|
+
import * as i8 from 'primeng/confirmdialog';
|
|
7
8
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
8
|
-
import * as i5
|
|
9
|
+
import * as i5 from 'primeng/confirmpopup';
|
|
9
10
|
import { ConfirmPopupModule } from 'primeng/confirmpopup';
|
|
10
|
-
import * as i6$
|
|
11
|
+
import * as i6$4 from 'primeng/dialog';
|
|
11
12
|
import { DialogModule } from 'primeng/dialog';
|
|
12
|
-
import * as i7$
|
|
13
|
+
import * as i7$3 from 'primeng/messages';
|
|
13
14
|
import { MessagesModule } from 'primeng/messages';
|
|
14
|
-
import * as i8$
|
|
15
|
+
import * as i8$3 from 'primeng/toast';
|
|
15
16
|
import { ToastModule } from 'primeng/toast';
|
|
16
|
-
import { Subject, BehaviorSubject, firstValueFrom, filter as filter$1, map, take } from 'rxjs';
|
|
17
|
-
import
|
|
17
|
+
import { Observable, Subject, switchMap, BehaviorSubject, takeUntil, firstValueFrom, filter as filter$1, map as map$1, take } from 'rxjs';
|
|
18
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
19
|
+
import { AvatarModule } from 'primeng/avatar';
|
|
20
|
+
import * as i4$1 from 'primeng/button';
|
|
21
|
+
import { ButtonModule } from 'primeng/button';
|
|
22
|
+
import { ChipModule } from 'primeng/chip';
|
|
23
|
+
import * as i2 from 'primeng/dynamicdialog';
|
|
24
|
+
import { DialogService, DynamicDialogModule } from 'primeng/dynamicdialog';
|
|
25
|
+
import * as i6$1 from 'primeng/sidebar';
|
|
18
26
|
import { SidebarModule } from 'primeng/sidebar';
|
|
27
|
+
import { SkeletonModule } from 'primeng/skeleton';
|
|
19
28
|
import { TagModule } from 'primeng/tag';
|
|
20
|
-
import * as
|
|
29
|
+
import * as i4 from '@ngneat/transloco';
|
|
30
|
+
import { TranslocoModule, TranslocoService } from '@ngneat/transloco';
|
|
31
|
+
import { ButtonComponent } from 'aril/ui/button';
|
|
32
|
+
import * as i1 from '@angular/forms';
|
|
33
|
+
import { FormControl, ReactiveFormsModule, FormsModule, Validators } from '@angular/forms';
|
|
34
|
+
import * as i7 from 'primeng/password';
|
|
35
|
+
import { PasswordModule } from 'primeng/password';
|
|
36
|
+
import * as i9 from 'primeng/tooltip';
|
|
37
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
38
|
+
import { FieldComponent } from 'aril/ui/field';
|
|
39
|
+
import * as i6 from 'aril/ui/form';
|
|
40
|
+
import { ARiLFormModule } from 'aril/ui/form';
|
|
41
|
+
import { __decorate } from 'tslib';
|
|
42
|
+
import { Apps } from 'aril/boot/config/apps';
|
|
43
|
+
import { RestClient, ServiceCall, HTTPMethods, ProxyTypes } from 'aril/http';
|
|
44
|
+
import * as i3 from 'primeng/api';
|
|
45
|
+
import { ConfirmationService } from 'primeng/api';
|
|
46
|
+
import { CheckboxComponent } from 'aril/ui/checkbox';
|
|
47
|
+
import { MaskComponent } from 'aril/ui/mask';
|
|
48
|
+
import { TextComponent } from 'aril/ui/text';
|
|
49
|
+
import { TextAreaComponent } from 'aril/ui/textArea';
|
|
50
|
+
import * as i2$1 from 'keycloak-angular';
|
|
51
|
+
import * as i8$1 from 'primeng/badge';
|
|
52
|
+
import { BadgeModule } from 'primeng/badge';
|
|
53
|
+
import * as i6$3 from 'primeng/inputtext';
|
|
54
|
+
import { InputTextModule } from 'primeng/inputtext';
|
|
55
|
+
import * as i7$1 from 'primeng/scrollpanel';
|
|
56
|
+
import { ScrollPanelModule } from 'primeng/scrollpanel';
|
|
57
|
+
import { filter, map } from 'rxjs/operators';
|
|
58
|
+
import * as i1$3 from 'aril/util/pipes';
|
|
59
|
+
import { TranslateJsonPipe } from 'aril/util/pipes';
|
|
60
|
+
import * as i9$1 from 'primeng/paginator';
|
|
61
|
+
import { PaginatorModule } from 'primeng/paginator';
|
|
21
62
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
22
|
-
import { toSignal } from '@angular/core/rxjs-interop';
|
|
23
63
|
import { DomHandler } from 'primeng/dom';
|
|
24
|
-
import * as i6 from 'primeng/ripple';
|
|
64
|
+
import * as i6$2 from 'primeng/ripple';
|
|
25
65
|
import { RippleModule } from 'primeng/ripple';
|
|
26
|
-
import * as
|
|
27
|
-
import { TooltipModule } from 'primeng/tooltip';
|
|
28
|
-
import { filter } from 'rxjs/operators';
|
|
29
|
-
import * as i4 from '@ngneat/transloco';
|
|
30
|
-
import * as i5$1 from '@angular/forms';
|
|
31
|
-
import { FormsModule } from '@angular/forms';
|
|
32
|
-
import * as i8 from 'primeng/badge';
|
|
33
|
-
import { BadgeModule } from 'primeng/badge';
|
|
34
|
-
import * as i4$2 from 'primeng/button';
|
|
35
|
-
import { ButtonModule } from 'primeng/button';
|
|
36
|
-
import * as i7 from 'primeng/divider';
|
|
66
|
+
import * as i7$2 from 'primeng/divider';
|
|
37
67
|
import { DividerModule } from 'primeng/divider';
|
|
38
|
-
import * as i9 from 'primeng/dropdown';
|
|
68
|
+
import * as i9$2 from 'primeng/dropdown';
|
|
39
69
|
import { DropdownModule } from 'primeng/dropdown';
|
|
40
70
|
import { MenubarModule } from 'primeng/menubar';
|
|
41
|
-
import { Apps } from 'aril/boot/config/apps';
|
|
42
71
|
import * as i3$2 from 'primeng/breadcrumb';
|
|
43
72
|
import { BreadcrumbModule } from 'primeng/breadcrumb';
|
|
44
|
-
import * as
|
|
45
|
-
import * as i2$1 from 'aril/util/pub-sub';
|
|
73
|
+
import * as i2$2 from 'aril/util/pub-sub';
|
|
46
74
|
import { IconFieldModule } from 'primeng/iconfield';
|
|
47
75
|
import { InputIconModule } from 'primeng/inputicon';
|
|
48
|
-
import * as i6$1 from 'primeng/inputtext';
|
|
49
|
-
import { InputTextModule } from 'primeng/inputtext';
|
|
50
76
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
51
|
-
import * as i8$
|
|
77
|
+
import * as i8$2 from 'primeng/rating';
|
|
52
78
|
import { RatingModule } from 'primeng/rating';
|
|
53
79
|
import { API_CONFIGS } from 'aril/boot/config/api';
|
|
54
|
-
import
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
80
|
+
import * as i1$2 from '@angular/common/http';
|
|
81
|
+
|
|
82
|
+
const profileEndpoints = {
|
|
83
|
+
getUser: 'user-management/users/get',
|
|
84
|
+
updateUser: 'user-management/users/update',
|
|
85
|
+
resetPassword: 'user-management/users/reset-password'
|
|
86
|
+
};
|
|
87
|
+
class ProfileService extends RestClient {
|
|
88
|
+
constructor() {
|
|
89
|
+
super(...arguments);
|
|
90
|
+
this.states = {};
|
|
91
|
+
}
|
|
92
|
+
getUser(post) {
|
|
93
|
+
return new Observable();
|
|
94
|
+
}
|
|
95
|
+
updateUser(post) {
|
|
96
|
+
return new Observable();
|
|
97
|
+
}
|
|
98
|
+
resetPassword(post) {
|
|
99
|
+
return new Observable();
|
|
100
|
+
}
|
|
101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ProfileService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
102
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ProfileService, providedIn: 'root' }); }
|
|
103
|
+
}
|
|
104
|
+
__decorate([
|
|
105
|
+
ServiceCall(HTTPMethods.POST, ProxyTypes.ClientSide, profileEndpoints.getUser, {}, Apps.MW)
|
|
106
|
+
], ProfileService.prototype, "getUser", null);
|
|
107
|
+
__decorate([
|
|
108
|
+
ServiceCall(HTTPMethods.POST, ProxyTypes.ClientSide, profileEndpoints.updateUser, {}, Apps.MW)
|
|
109
|
+
], ProfileService.prototype, "updateUser", null);
|
|
110
|
+
__decorate([
|
|
111
|
+
ServiceCall(HTTPMethods.POST, ProxyTypes.ClientSide, profileEndpoints.resetPassword, {}, Apps.MW)
|
|
112
|
+
], ProfileService.prototype, "resetPassword", null);
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ProfileService, decorators: [{
|
|
114
|
+
type: Injectable,
|
|
115
|
+
args: [{ providedIn: 'root' }]
|
|
116
|
+
}], propDecorators: { getUser: [], updateUser: [], resetPassword: [] } });
|
|
117
|
+
|
|
118
|
+
class PasswordValidators {
|
|
119
|
+
static { this.passwordMatchValidator = (passwordFormGroup) => {
|
|
120
|
+
return (control) => {
|
|
121
|
+
if (!control.value || !passwordFormGroup) {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
const passwordControl = passwordFormGroup.get('newPassword');
|
|
125
|
+
const confirmPasswordValue = control.value;
|
|
126
|
+
if (!passwordControl || !confirmPasswordValue) {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
const passwordsMatch = passwordControl.value === confirmPasswordValue;
|
|
130
|
+
return passwordsMatch ? null : ({
|
|
131
|
+
passwordMismatch: 'Şifreler eşleşmiyor. Lütfen aynı şifreyi giriniz.'
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
}; }
|
|
135
|
+
static minLength(length) {
|
|
136
|
+
return (control) => {
|
|
137
|
+
if (!control.value || control.value.length >= length) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
return { minlength: `Şifre en az ${length} karakter olmalıdır.` };
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
static required(control) {
|
|
144
|
+
if (!control.value || control.value.trim() === '') {
|
|
145
|
+
return { required: 'Bu alan zorunludur.' };
|
|
146
|
+
}
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
class ChangePasswordModalComponent {
|
|
151
|
+
constructor(formBuilder, dialogRef, dialogConfig, profileService, translocoService, messageService) {
|
|
152
|
+
this.formBuilder = formBuilder;
|
|
153
|
+
this.dialogRef = dialogRef;
|
|
154
|
+
this.dialogConfig = dialogConfig;
|
|
155
|
+
this.profileService = profileService;
|
|
156
|
+
this.translocoService = translocoService;
|
|
157
|
+
this.messageService = messageService;
|
|
158
|
+
this.subjects = {
|
|
159
|
+
resetPassword: new Subject()
|
|
160
|
+
};
|
|
161
|
+
this.resetPasswordService = toSignal(this.subjects.resetPassword.pipe(switchMap((data) => this.profileService.resetPassword(data))));
|
|
162
|
+
this.userId = this.dialogConfig.data?.userId;
|
|
163
|
+
effect(() => {
|
|
164
|
+
const service = this.resetPasswordService();
|
|
165
|
+
if (service?.response) {
|
|
166
|
+
this.messageService.add({
|
|
167
|
+
severity: 'success',
|
|
168
|
+
summary: this.translocoService.translate('profileSidebar.changePasswordSuccess'),
|
|
169
|
+
detail: this.translocoService.translate('profileSidebar.changePasswordSuccessDetail'),
|
|
170
|
+
key: 'toast-root'
|
|
171
|
+
});
|
|
172
|
+
this.dialogRef.close({ status: 'success' });
|
|
173
|
+
}
|
|
174
|
+
}, { allowSignalWrites: true });
|
|
175
|
+
this.initializeForm();
|
|
176
|
+
if (!this.userId) {
|
|
177
|
+
this.dialogRef.close('error');
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
initializeForm() {
|
|
181
|
+
this.passwordForm = this.formBuilder.group({
|
|
182
|
+
newPassword: new FormControl('', [PasswordValidators.required, PasswordValidators.minLength(6)]),
|
|
183
|
+
confirmPassword: new FormControl('', [PasswordValidators.required])
|
|
184
|
+
});
|
|
185
|
+
const confirmPasswordControl = this.passwordForm.get('confirmPassword');
|
|
186
|
+
if (confirmPasswordControl) {
|
|
187
|
+
confirmPasswordControl.setValidators([
|
|
188
|
+
PasswordValidators.required,
|
|
189
|
+
PasswordValidators.passwordMatchValidator(this.passwordForm)
|
|
190
|
+
]);
|
|
191
|
+
}
|
|
192
|
+
this.passwordForm.get('newPassword')?.valueChanges.subscribe(() => {
|
|
193
|
+
confirmPasswordControl?.updateValueAndValidity({ emitEvent: false });
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
getErrorMessage(controlName) {
|
|
197
|
+
const control = this.passwordForm.get(controlName);
|
|
198
|
+
if (control?.errors) {
|
|
199
|
+
const errors = control.errors;
|
|
200
|
+
const errorKeys = Object.keys(errors);
|
|
201
|
+
if (errorKeys.length > 0) {
|
|
202
|
+
return errors[errorKeys[0]];
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return '';
|
|
206
|
+
}
|
|
207
|
+
submit() {
|
|
208
|
+
if (this.passwordForm.invalid) {
|
|
209
|
+
this.passwordForm.markAllAsTouched();
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
const formValue = this.passwordForm.value;
|
|
213
|
+
const resetRequest = {
|
|
214
|
+
userId: this.userId,
|
|
215
|
+
password: formValue.newPassword
|
|
216
|
+
};
|
|
217
|
+
this.subjects.resetPassword.next(resetRequest);
|
|
218
|
+
}
|
|
219
|
+
cancel() {
|
|
220
|
+
this.dialogRef.close('cancel');
|
|
221
|
+
}
|
|
222
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ChangePasswordModalComponent, deps: [{ token: i1.FormBuilder }, { token: i2.DynamicDialogRef }, { token: i2.DynamicDialogConfig }, { token: ProfileService }, { token: i4.TranslocoService }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
223
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: ChangePasswordModalComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<div class=\"change-password-modal\" *transloco=\"let t; read: 'profileSidebar'\">\r\n\t<aril-form [formGroup]=\"passwordForm\">\r\n\t\t<aril-field [label]=\"t('newPassword')\" [cols]=\"{ xl: 12, lg: 12, md: 12, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<p-password \r\n\t\t\t\tformControlName=\"newPassword\"\r\n\t\t\t\t[placeholder]=\"t('newPassword')\"\r\n\t\t\t\t[feedback]=\"false\"\r\n\t\t\t\t[toggleMask]=\"true\"\r\n\t\t\t\tstyleClass=\"w-full\"\r\n\t\t\t\t[pTooltip]=\"passwordForm.get('newPassword')?.invalid && passwordForm.get('newPassword')?.touched ? getErrorMessage('newPassword') : ''\"\r\n\t\t\t\ttooltipPosition=\"top\"\r\n\t\t\t\ttooltipStyleClass=\"tooltipErrorMessage\">\r\n\t\t\t</p-password>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('confirmPassword')\" [cols]=\"{ xl: 12, lg: 12, md: 12, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<p-password \r\n\t\t\t\tformControlName=\"confirmPassword\"\r\n\t\t\t\t[placeholder]=\"t('confirmPassword')\"\r\n\t\t\t\t[feedback]=\"false\"\r\n\t\t\t\t[toggleMask]=\"true\"\r\n\t\t\t\tstyleClass=\"w-full\"\r\n\t\t\t\t[pTooltip]=\"passwordForm.get('confirmPassword')?.invalid && passwordForm.get('confirmPassword')?.touched ? getErrorMessage('confirmPassword') : ''\"\r\n\t\t\t\ttooltipPosition=\"top\"\r\n\t\t\t\ttooltipStyleClass=\"tooltipErrorMessage\">\r\n\t\t\t</p-password>\r\n\t\t</aril-field>\r\n\r\n\t\t<div class=\"col-12 flex justify-content-end mt-4 gap-2\">\r\n\t\t\t<aril-button\r\n\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t[label]=\"t('cancel')\"\r\n\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t(clickEvent)=\"cancel()\">\r\n\t\t\t</aril-button>\r\n\t\t\t<aril-button\r\n\t\t\t\tcolor=\"success\"\r\n\t\t\t\t[label]=\"t('save')\"\r\n\t\t\t\t[raised]=\"false\"\r\n\t\t\t\ticon=\"CHECK\"\r\n\t\t\t\t(clickEvent)=\"submit()\">\r\n\t\t\t</aril-button>\r\n\t\t</div>\r\n\t</aril-form>\r\n</div>\r\n", styles: [".change-password-modal :host ::ng-deep .p-password.ng-invalid.ng-touched .p-inputtext{border-color:var(--red-500, #ef4444);box-shadow:0 0 0 1px var(--red-500, #ef4444)}.change-password-modal :host ::ng-deep .p-password.ng-valid.ng-touched .p-inputtext{border-color:var(--green-500, #22c55e);box-shadow:0 0 0 1px var(--green-500, #22c55e)}.change-password-modal :host ::ng-deep .tooltipErrorMessage{background-color:var(--red-500, #ef4444)!important;color:#fff!important;font-size:.75rem!important;font-weight:500!important;border-radius:4px!important;padding:.5rem .75rem!important;box-shadow:0 2px 4px #0000001a!important}.change-password-modal :host ::ng-deep .tooltipErrorMessage .p-tooltip-arrow{border-top-color:var(--red-500, #ef4444)!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ARiLFormModule }, { kind: "component", type: i6.FormComponent, selector: "aril-form", inputs: ["formGroup"] }, { kind: "component", type: FieldComponent, selector: "aril-field", inputs: ["label", "color", "labelWidth", "valueWidth", "labelPos", "markAsRequired", "cols", "infoData"] }, { kind: "component", type: ButtonComponent, selector: "aril-button:not([click])", inputs: ["label", "loading", "disabled", "raised", "outlined", "badge", "size", "icon", "color"], outputs: ["clickEvent"] }, { kind: "ngmodule", type: PasswordModule }, { kind: "component", type: i7.Password, selector: "p-password", inputs: ["ariaLabel", "ariaLabelledBy", "label", "disabled", "promptLabel", "mediumRegex", "strongRegex", "weakLabel", "mediumLabel", "maxLength", "strongLabel", "inputId", "feedback", "appendTo", "toggleMask", "inputStyleClass", "styleClass", "style", "inputStyle", "showTransitionOptions", "hideTransitionOptions", "autocomplete", "placeholder", "showClear", "autofocus", "variant"], outputs: ["onFocus", "onBlur", "onClear"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i9.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i4.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoLang", "translocoLoadingTpl"] }] }); }
|
|
224
|
+
}
|
|
225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ChangePasswordModalComponent, decorators: [{
|
|
226
|
+
type: Component,
|
|
227
|
+
args: [{ standalone: true, imports: [
|
|
228
|
+
CommonModule,
|
|
229
|
+
ReactiveFormsModule,
|
|
230
|
+
FormsModule,
|
|
231
|
+
ARiLFormModule,
|
|
232
|
+
FieldComponent,
|
|
233
|
+
ButtonComponent,
|
|
234
|
+
PasswordModule,
|
|
235
|
+
TooltipModule,
|
|
236
|
+
TranslocoModule
|
|
237
|
+
], template: "<div class=\"change-password-modal\" *transloco=\"let t; read: 'profileSidebar'\">\r\n\t<aril-form [formGroup]=\"passwordForm\">\r\n\t\t<aril-field [label]=\"t('newPassword')\" [cols]=\"{ xl: 12, lg: 12, md: 12, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<p-password \r\n\t\t\t\tformControlName=\"newPassword\"\r\n\t\t\t\t[placeholder]=\"t('newPassword')\"\r\n\t\t\t\t[feedback]=\"false\"\r\n\t\t\t\t[toggleMask]=\"true\"\r\n\t\t\t\tstyleClass=\"w-full\"\r\n\t\t\t\t[pTooltip]=\"passwordForm.get('newPassword')?.invalid && passwordForm.get('newPassword')?.touched ? getErrorMessage('newPassword') : ''\"\r\n\t\t\t\ttooltipPosition=\"top\"\r\n\t\t\t\ttooltipStyleClass=\"tooltipErrorMessage\">\r\n\t\t\t</p-password>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('confirmPassword')\" [cols]=\"{ xl: 12, lg: 12, md: 12, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<p-password \r\n\t\t\t\tformControlName=\"confirmPassword\"\r\n\t\t\t\t[placeholder]=\"t('confirmPassword')\"\r\n\t\t\t\t[feedback]=\"false\"\r\n\t\t\t\t[toggleMask]=\"true\"\r\n\t\t\t\tstyleClass=\"w-full\"\r\n\t\t\t\t[pTooltip]=\"passwordForm.get('confirmPassword')?.invalid && passwordForm.get('confirmPassword')?.touched ? getErrorMessage('confirmPassword') : ''\"\r\n\t\t\t\ttooltipPosition=\"top\"\r\n\t\t\t\ttooltipStyleClass=\"tooltipErrorMessage\">\r\n\t\t\t</p-password>\r\n\t\t</aril-field>\r\n\r\n\t\t<div class=\"col-12 flex justify-content-end mt-4 gap-2\">\r\n\t\t\t<aril-button\r\n\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t[label]=\"t('cancel')\"\r\n\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t(clickEvent)=\"cancel()\">\r\n\t\t\t</aril-button>\r\n\t\t\t<aril-button\r\n\t\t\t\tcolor=\"success\"\r\n\t\t\t\t[label]=\"t('save')\"\r\n\t\t\t\t[raised]=\"false\"\r\n\t\t\t\ticon=\"CHECK\"\r\n\t\t\t\t(clickEvent)=\"submit()\">\r\n\t\t\t</aril-button>\r\n\t\t</div>\r\n\t</aril-form>\r\n</div>\r\n", styles: [".change-password-modal :host ::ng-deep .p-password.ng-invalid.ng-touched .p-inputtext{border-color:var(--red-500, #ef4444);box-shadow:0 0 0 1px var(--red-500, #ef4444)}.change-password-modal :host ::ng-deep .p-password.ng-valid.ng-touched .p-inputtext{border-color:var(--green-500, #22c55e);box-shadow:0 0 0 1px var(--green-500, #22c55e)}.change-password-modal :host ::ng-deep .tooltipErrorMessage{background-color:var(--red-500, #ef4444)!important;color:#fff!important;font-size:.75rem!important;font-weight:500!important;border-radius:4px!important;padding:.5rem .75rem!important;box-shadow:0 2px 4px #0000001a!important}.change-password-modal :host ::ng-deep .tooltipErrorMessage .p-tooltip-arrow{border-top-color:var(--red-500, #ef4444)!important}\n"] }]
|
|
238
|
+
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.DynamicDialogRef }, { type: i2.DynamicDialogConfig }, { type: ProfileService }, { type: i4.TranslocoService }, { type: i3.MessageService }] });
|
|
239
|
+
|
|
240
|
+
class EditProfileModalComponent {
|
|
241
|
+
constructor(formBuilder, dialogRef, dialogConfig, profileService, translocoService, messageService) {
|
|
242
|
+
this.formBuilder = formBuilder;
|
|
243
|
+
this.dialogRef = dialogRef;
|
|
244
|
+
this.dialogConfig = dialogConfig;
|
|
245
|
+
this.profileService = profileService;
|
|
246
|
+
this.translocoService = translocoService;
|
|
247
|
+
this.messageService = messageService;
|
|
248
|
+
this.subjects = {
|
|
249
|
+
updateUser: new Subject()
|
|
250
|
+
};
|
|
251
|
+
this.updateUserService = toSignal(this.subjects.updateUser.pipe(switchMap((data) => this.profileService.updateUser(data))));
|
|
252
|
+
this.userProfile = this.dialogConfig.data?.userProfile;
|
|
253
|
+
this.initializeEffects();
|
|
254
|
+
this.initializeForm();
|
|
255
|
+
}
|
|
256
|
+
ngOnInit() {
|
|
257
|
+
if (!this.userProfile) {
|
|
258
|
+
this.dialogRef.close('error');
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
initializeEffects() {
|
|
262
|
+
effect(() => {
|
|
263
|
+
const service = this.updateUserService();
|
|
264
|
+
if (service?.response) {
|
|
265
|
+
this.messageService.add({
|
|
266
|
+
severity: 'success',
|
|
267
|
+
summary: this.translocoService.translate('profileSidebar.updateSuccess'),
|
|
268
|
+
detail: this.translocoService.translate('profileSidebar.updateSuccessDetail'),
|
|
269
|
+
key: 'toast-root'
|
|
270
|
+
});
|
|
271
|
+
this.dialogRef.close({ status: 'success', data: service.response });
|
|
272
|
+
}
|
|
273
|
+
}, { allowSignalWrites: true });
|
|
274
|
+
}
|
|
275
|
+
initializeForm() {
|
|
276
|
+
this.profileForm = this.formBuilder.group({
|
|
277
|
+
id: new FormControl(this.userProfile?.id || null),
|
|
278
|
+
systemUser: new FormControl({ value: this.userProfile?.systemUser ?? true, disabled: true }),
|
|
279
|
+
clientOfSystemUser: new FormControl({ value: this.userProfile?.clientOfSystemUser || '', disabled: true }),
|
|
280
|
+
userTypeId: new FormControl({ value: this.userProfile?.userTypeId || null, disabled: true }),
|
|
281
|
+
regions: new FormControl({ value: this.userProfile?.regions || '', disabled: true }),
|
|
282
|
+
userName: new FormControl({ value: this.userProfile?.userName || '', disabled: true }, [Validators.required]),
|
|
283
|
+
firstName: new FormControl(this.userProfile?.firstName || '', [Validators.required]),
|
|
284
|
+
lastName: new FormControl(this.userProfile?.lastName || ''),
|
|
285
|
+
email: new FormControl(this.userProfile?.email || '', [Validators.email, Validators.required]),
|
|
286
|
+
phone: new FormControl(Array.isArray(this.userProfile?.phone) ? this.userProfile.phone[0] || '' : this.userProfile?.phone || ''),
|
|
287
|
+
tckn: new FormControl(Array.isArray(this.userProfile?.tckn) ? this.userProfile.tckn[0] || '' : '', [
|
|
288
|
+
Validators.required
|
|
289
|
+
]),
|
|
290
|
+
photoUrl: new FormControl(this.userProfile?.photoUrl || ''),
|
|
291
|
+
enabled: new FormControl({ value: this.userProfile?.enabled ?? true, disabled: true }),
|
|
292
|
+
emailVerified: new FormControl({ value: this.userProfile?.emailVerified ?? true, disabled: true }),
|
|
293
|
+
notes: new FormControl(this.userProfile?.notes || '')
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
submit() {
|
|
297
|
+
if (this.profileForm.invalid) {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
const rawValue = this.profileForm.getRawValue();
|
|
301
|
+
const updateRequest = {
|
|
302
|
+
id: this.userProfile.id,
|
|
303
|
+
firstName: rawValue.firstName,
|
|
304
|
+
lastName: rawValue.lastName,
|
|
305
|
+
email: rawValue.email,
|
|
306
|
+
phone: Array.isArray(rawValue.phone) ? rawValue.phone : [rawValue.phone],
|
|
307
|
+
tckn: Array.isArray(rawValue.tckn) ? rawValue.tckn : [rawValue.tckn],
|
|
308
|
+
photoUrl: Array.isArray(rawValue.photoUrl) ? rawValue.photoUrl : [rawValue.photoUrl],
|
|
309
|
+
notes: Array.isArray(rawValue.notes) ? rawValue.notes : [rawValue.notes],
|
|
310
|
+
password: null,
|
|
311
|
+
enabled: rawValue.enabled,
|
|
312
|
+
emailVerified: rawValue.emailVerified,
|
|
313
|
+
systemUser: rawValue.systemUser,
|
|
314
|
+
clientOfSystemUser: rawValue.clientOfSystemUser,
|
|
315
|
+
userTypeId: rawValue.userTypeId || null,
|
|
316
|
+
regions: rawValue.regions
|
|
317
|
+
};
|
|
318
|
+
this.subjects.updateUser.next(updateRequest);
|
|
319
|
+
}
|
|
320
|
+
cancel() {
|
|
321
|
+
this.dialogRef.close('cancel');
|
|
322
|
+
}
|
|
323
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: EditProfileModalComponent, deps: [{ token: i1.FormBuilder }, { token: i2.DynamicDialogRef }, { token: i2.DynamicDialogConfig }, { token: ProfileService }, { token: i4.TranslocoService }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
324
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: EditProfileModalComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<div *transloco=\"let t; read: 'profileSidebar'\">\r\n\t<aril-form [formGroup]=\"profileForm\">\r\n\t\t<aril-field [label]=\"t('systemUser')\" [cols]=\"{ xl: 6, lg: 6, md: 12, sm: 12 }\">\r\n\t\t\t<aril-checkbox [label]=\"' '\" formControlName=\"systemUser\" [disabled]=\"true\"></aril-checkbox>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('systemUserApp')\" [cols]=\"{ xl: 6, lg: 6, md: 12, sm: 12 }\">\r\n\t\t\t<aril-text formControlName=\"clientOfSystemUser\" [disabled]=\"true\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<!-- <aril-field [label]=\"t('userType')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-text formControlName=\"userTypeId\" [disabled]=\"true\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('responsibleRegions')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-text formControlName=\"regions\" [disabled]=\"true\"></aril-text>\r\n\t\t</aril-field> -->\r\n\r\n\t\t<aril-field [label]=\"t('username')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<aril-text formControlName=\"userName\" [disabled]=\"true\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('firstName')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<aril-text formControlName=\"firstName\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('lastName')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-text formControlName=\"lastName\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('email')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<aril-text formControlName=\"email\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('phone')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-mask mask=\"(999) 999 99 99\" [placeholder]=\"t('phoneExample')\" formControlName=\"phone\"></aril-mask>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('tcNumber')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<aril-mask mask=\"99999999999\" formControlName=\"tckn\"></aril-mask>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('photoUrl')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-text formControlName=\"photoUrl\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('active')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-checkbox [label]=\"' '\" formControlName=\"enabled\" [disabled]=\"true\"></aril-checkbox>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('emailVerified')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-checkbox [label]=\"' '\" formControlName=\"emailVerified\" [disabled]=\"true\"></aril-checkbox>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('notes')\" [cols]=\"{ xl: 12, lg: 12, md: 12, sm: 12 }\">\r\n\t\t\t<aril-text-area [rows]=\"3\" [cols]=\"40\" formControlName=\"notes\"></aril-text-area>\r\n\t\t</aril-field>\r\n\r\n\t\t<div class=\"col-12 flex justify-content-end mt-4 gap-2\">\r\n\t\t\t<aril-button\r\n\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t[label]=\"t('cancel')\"\r\n\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t(clickEvent)=\"cancel()\">\r\n\t\t\t</aril-button>\r\n\t\t\t<aril-button\r\n\t\t\t\tcolor=\"success\"\r\n\t\t\t\t[label]=\"t('save')\"\r\n\t\t\t\t[raised]=\"false\"\r\n\t\t\t\ticon=\"CHECK\"\r\n\t\t\t\t(clickEvent)=\"submit()\">\r\n\t\t\t</aril-button>\r\n\t\t</div>\r\n\t</aril-form>\r\n</div> ", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ARiLFormModule }, { kind: "component", type: i6.FormComponent, selector: "aril-form", inputs: ["formGroup"] }, { kind: "component", type: FieldComponent, selector: "aril-field", inputs: ["label", "color", "labelWidth", "valueWidth", "labelPos", "markAsRequired", "cols", "infoData"] }, { kind: "component", type: TextComponent, selector: "aril-text[ngModel], aril-text[formControl], aril-text[formControlName]", inputs: ["placeholder", "tabindex", "icon", "iconPos", "size"] }, { kind: "component", type: TextAreaComponent, selector: "aril-text-area[ngModel], aril-text-area[formControl], aril-text-area[formControlName]", inputs: ["rows", "cols", "isAutoResize", "tabindex", "placeholder"] }, { kind: "component", type: ButtonComponent, selector: "aril-button:not([click])", inputs: ["label", "loading", "disabled", "raised", "outlined", "badge", "size", "icon", "color"], outputs: ["clickEvent"] }, { kind: "component", type: MaskComponent, selector: "aril-mask[ngModel], aril-mask[formControl], aril-mask[formControlName]", inputs: ["mask", "slotChar", "placeholder", "maxlength", "usageInGrid", "tabindex"] }, { kind: "component", type: CheckboxComponent, selector: "aril-checkbox[ngModel], aril-checkbox[formControl], aril-checkbox[formControlName]", inputs: ["label", "tabindex"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i4.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoLang", "translocoLoadingTpl"] }] }); }
|
|
325
|
+
}
|
|
326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: EditProfileModalComponent, decorators: [{
|
|
327
|
+
type: Component,
|
|
328
|
+
args: [{ standalone: true, imports: [
|
|
329
|
+
CommonModule,
|
|
330
|
+
ReactiveFormsModule,
|
|
331
|
+
FormsModule,
|
|
332
|
+
ARiLFormModule,
|
|
333
|
+
FieldComponent,
|
|
334
|
+
TextComponent,
|
|
335
|
+
TextAreaComponent,
|
|
336
|
+
ButtonComponent,
|
|
337
|
+
MaskComponent,
|
|
338
|
+
CheckboxComponent,
|
|
339
|
+
TranslocoModule
|
|
340
|
+
], template: "<div *transloco=\"let t; read: 'profileSidebar'\">\r\n\t<aril-form [formGroup]=\"profileForm\">\r\n\t\t<aril-field [label]=\"t('systemUser')\" [cols]=\"{ xl: 6, lg: 6, md: 12, sm: 12 }\">\r\n\t\t\t<aril-checkbox [label]=\"' '\" formControlName=\"systemUser\" [disabled]=\"true\"></aril-checkbox>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('systemUserApp')\" [cols]=\"{ xl: 6, lg: 6, md: 12, sm: 12 }\">\r\n\t\t\t<aril-text formControlName=\"clientOfSystemUser\" [disabled]=\"true\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<!-- <aril-field [label]=\"t('userType')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-text formControlName=\"userTypeId\" [disabled]=\"true\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('responsibleRegions')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-text formControlName=\"regions\" [disabled]=\"true\"></aril-text>\r\n\t\t</aril-field> -->\r\n\r\n\t\t<aril-field [label]=\"t('username')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<aril-text formControlName=\"userName\" [disabled]=\"true\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('firstName')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<aril-text formControlName=\"firstName\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('lastName')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-text formControlName=\"lastName\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('email')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<aril-text formControlName=\"email\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('phone')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-mask mask=\"(999) 999 99 99\" [placeholder]=\"t('phoneExample')\" formControlName=\"phone\"></aril-mask>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('tcNumber')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<aril-mask mask=\"99999999999\" formControlName=\"tckn\"></aril-mask>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('photoUrl')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-text formControlName=\"photoUrl\"></aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('active')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-checkbox [label]=\"' '\" formControlName=\"enabled\" [disabled]=\"true\"></aril-checkbox>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('emailVerified')\" [cols]=\"{ xl: 6, lg: 6, md: 6, sm: 12 }\">\r\n\t\t\t<aril-checkbox [label]=\"' '\" formControlName=\"emailVerified\" [disabled]=\"true\"></aril-checkbox>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('notes')\" [cols]=\"{ xl: 12, lg: 12, md: 12, sm: 12 }\">\r\n\t\t\t<aril-text-area [rows]=\"3\" [cols]=\"40\" formControlName=\"notes\"></aril-text-area>\r\n\t\t</aril-field>\r\n\r\n\t\t<div class=\"col-12 flex justify-content-end mt-4 gap-2\">\r\n\t\t\t<aril-button\r\n\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t[label]=\"t('cancel')\"\r\n\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t(clickEvent)=\"cancel()\">\r\n\t\t\t</aril-button>\r\n\t\t\t<aril-button\r\n\t\t\t\tcolor=\"success\"\r\n\t\t\t\t[label]=\"t('save')\"\r\n\t\t\t\t[raised]=\"false\"\r\n\t\t\t\ticon=\"CHECK\"\r\n\t\t\t\t(clickEvent)=\"submit()\">\r\n\t\t\t</aril-button>\r\n\t\t</div>\r\n\t</aril-form>\r\n</div> " }]
|
|
341
|
+
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.DynamicDialogRef }, { type: i2.DynamicDialogConfig }, { type: ProfileService }, { type: i4.TranslocoService }, { type: i3.MessageService }] });
|
|
59
342
|
|
|
60
343
|
class LayoutService {
|
|
61
344
|
constructor() {
|
|
@@ -80,6 +363,9 @@ class LayoutService {
|
|
|
80
363
|
overlayMenuActive: false,
|
|
81
364
|
profileSidebarVisible: false,
|
|
82
365
|
configSidebarVisible: false,
|
|
366
|
+
historySidebarVisible: false,
|
|
367
|
+
siteMapSidebarVisible: false,
|
|
368
|
+
favoritePagesSidebarVisible: false,
|
|
83
369
|
staticMenuMobileActive: false,
|
|
84
370
|
menuHoverActive: false,
|
|
85
371
|
sidebarActive: false,
|
|
@@ -128,6 +414,15 @@ class LayoutService {
|
|
|
128
414
|
showConfigSidebar() {
|
|
129
415
|
this.state.configSidebarVisible = true;
|
|
130
416
|
}
|
|
417
|
+
showHistorySidebar() {
|
|
418
|
+
this.state.historySidebarVisible = true;
|
|
419
|
+
}
|
|
420
|
+
showSiteMapSidebar() {
|
|
421
|
+
this.state.siteMapSidebarVisible = true;
|
|
422
|
+
}
|
|
423
|
+
showFavoritePagesSidebar() {
|
|
424
|
+
this.state.favoritePagesSidebarVisible = true;
|
|
425
|
+
}
|
|
131
426
|
isOverlay() {
|
|
132
427
|
return this.config().menuMode === 'overlay';
|
|
133
428
|
}
|
|
@@ -188,27 +483,834 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
188
483
|
}], ctorParameters: () => [] });
|
|
189
484
|
|
|
190
485
|
class AppProfileSidebarComponent {
|
|
191
|
-
constructor(layoutService, keycloak) {
|
|
486
|
+
constructor(layoutService, keycloak, profileService, dialogService, translocoService) {
|
|
192
487
|
this.layoutService = layoutService;
|
|
193
488
|
this.keycloak = keycloak;
|
|
489
|
+
this.profileService = profileService;
|
|
490
|
+
this.dialogService = dialogService;
|
|
491
|
+
this.translocoService = translocoService;
|
|
492
|
+
this.userProfile = signal(null);
|
|
493
|
+
this.subjects = {
|
|
494
|
+
getUser: new Subject()
|
|
495
|
+
};
|
|
496
|
+
this.getUserService = toSignal(this.subjects.getUser.pipe(switchMap((data) => this.profileService.getUser(data))));
|
|
194
497
|
this.username = this.keycloak.getUsername();
|
|
498
|
+
this.initializeEffects();
|
|
499
|
+
}
|
|
500
|
+
ngOnInit() {
|
|
501
|
+
this.loadUserProfile();
|
|
502
|
+
}
|
|
503
|
+
initializeEffects() {
|
|
504
|
+
effect(() => {
|
|
505
|
+
const service = this.getUserService();
|
|
506
|
+
if (service?.response) {
|
|
507
|
+
this.userProfile.set(service.response);
|
|
508
|
+
}
|
|
509
|
+
}, { allowSignalWrites: true });
|
|
510
|
+
}
|
|
511
|
+
loadUserProfile() {
|
|
512
|
+
const userId = this.keycloak.getKeycloakInstance().idTokenParsed?.sub;
|
|
513
|
+
if (userId) {
|
|
514
|
+
this.subjects.getUser.next({ id: userId });
|
|
515
|
+
}
|
|
195
516
|
}
|
|
196
517
|
get visible() {
|
|
197
518
|
return this.layoutService.state.profileSidebarVisible;
|
|
198
519
|
}
|
|
199
520
|
set visible(_val) {
|
|
200
521
|
this.layoutService.state.profileSidebarVisible = _val;
|
|
522
|
+
if (_val && !this.userProfile()) {
|
|
523
|
+
this.loadUserProfile();
|
|
524
|
+
}
|
|
201
525
|
}
|
|
202
526
|
logout() {
|
|
203
527
|
this.keycloak.logout();
|
|
204
528
|
}
|
|
205
|
-
|
|
206
|
-
|
|
529
|
+
editProfile() {
|
|
530
|
+
if (!this.userProfile())
|
|
531
|
+
return;
|
|
532
|
+
const ref = this.dialogService.open(EditProfileModalComponent, {
|
|
533
|
+
header: this.translocoService.translate('profileSidebar.editProfile'),
|
|
534
|
+
width: '600px',
|
|
535
|
+
height: 'auto',
|
|
536
|
+
modal: true,
|
|
537
|
+
maximizable: false,
|
|
538
|
+
closable: true,
|
|
539
|
+
data: {
|
|
540
|
+
userProfile: this.userProfile()
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
ref.onClose.subscribe((result) => {
|
|
544
|
+
if (result?.status === 'success') {
|
|
545
|
+
this.loadUserProfile();
|
|
546
|
+
}
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
changePassword() {
|
|
550
|
+
const userId = this.keycloak.getKeycloakInstance().idTokenParsed?.sub;
|
|
551
|
+
if (!userId)
|
|
552
|
+
return;
|
|
553
|
+
const ref = this.dialogService.open(ChangePasswordModalComponent, {
|
|
554
|
+
header: this.translocoService.translate('profileSidebar.changePassword'),
|
|
555
|
+
width: '500px',
|
|
556
|
+
height: 'auto',
|
|
557
|
+
modal: true,
|
|
558
|
+
maximizable: false,
|
|
559
|
+
closable: true,
|
|
560
|
+
data: {
|
|
561
|
+
userId: userId
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
ref.onClose.subscribe();
|
|
565
|
+
}
|
|
566
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppProfileSidebarComponent, deps: [{ token: LayoutService }, { token: i2$1.KeycloakService }, { token: ProfileService }, { token: i2.DialogService }, { token: i4.TranslocoService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
567
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: AppProfileSidebarComponent, isStandalone: true, selector: "app-profilemenu", providers: [DialogService], ngImport: i0, template: "<p-sidebar\r\n\t[(visible)]=\"visible\"\r\n\tposition=\"right\"\r\n\t[transitionOptions]=\"'.3s cubic-bezier(0, 0, 0.2, 1)'\"\r\n\tstyleClass=\"layout-profile-sidebar w-full sm:w-30rem\">\r\n\t<ng-template pTemplate=\"header\">\r\n\t\t<div class=\"flex align-items-center gap-2\" *transloco=\"let t; read: 'profileSidebar'\">\r\n\t\t\t<span class=\"font-bold\">{{ t('personalInfo') }}</span>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t@if (userProfile()) {\r\n\t\t<div class=\"profile-content\" *transloco=\"let t; read: 'profileSidebar'\">\r\n\t\t\t<!-- Personal Information -->\r\n\t\t\t<div class=\"info-section\">\r\n\t\t\t\t<div class=\"info-items\">\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-user info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('fullName') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value\">{{ userProfile()?.firstName }} {{ userProfile()?.lastName }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-id-card info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('tcNumber') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value\">{{ userProfile()?.tckn || '' }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-envelope info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('email') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value\">{{ userProfile()?.email || '' }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-phone info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('phone') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value\">{{ userProfile()?.phone || '' }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-at info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('username') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value\">{{ userProfile()?.userName }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-check-circle info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('accountStatus') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value status\" [class.active]=\"userProfile()?.enabled\">\r\n\t\t\t\t\t\t\t\t{{ userProfile()?.enabled ? t('active') : t('inactive') }}\r\n\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-user info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('systemUser') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value status\" [class.active]=\"userProfile()?.systemUser\">\r\n\t\t\t\t\t\t\t\t{{ userProfile()?.systemUser ? t('yes') : t('no') }}\r\n\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-building info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('clientSystemUser') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value\">{{ userProfile()?.clientOfSystemUser }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t}\r\n\r\n\t<!-- Fixed Action Buttons -->\r\n\t@if (userProfile()) {\r\n\t\t<div class=\"action-buttons-container grid p-fluid\" *transloco=\"let t; read: 'profileSidebar'\">\r\n\t\t\t<div class=\"col-12 flex justify-content-between align-items-center\">\r\n\t\t\t\t<aril-button\r\n\t\t\t\t\t[label]=\"t('editProfile')\"\r\n\t\t\t\t\ticon=\"USER_EDIT\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\tclass=\"col-6\"\r\n\t\t\t\t\t(clickEvent)=\"editProfile()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t\t<aril-button\r\n\t\t\t\t\t[label]=\"t('changePassword')\"\r\n\t\t\t\t\ticon=\"KEY\"\r\n\t\t\t\t\tcolor=\"secondary\"\r\n\t\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\tclass=\"col-6\"\r\n\t\t\t\t\t(clickEvent)=\"changePassword()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t</div>\r\n\t\t\t<aril-button\r\n\t\t\t\t[label]=\"t('logout')\"\r\n\t\t\t\ticon=\"SIGN_OUT\"\r\n\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t[outlined]=\"false\"\r\n\t\t\t\tsize=\"sm\"\r\n\t\t\t\tclass=\"col-12\"\r\n\t\t\t\t(clickEvent)=\"logout()\">\r\n\t\t\t</aril-button>\r\n\t\t</div>\r\n\t}\r\n</p-sidebar>\r\n", styles: [":host .layout-profile-sidebar .p-sidebar-content{padding:0;background:var(--surface-0, #ffffff);color:var(--text-color, #333);height:100vh;overflow-y:auto;position:relative}:host .profile-content{padding:1rem .75rem 12rem;display:flex;flex-direction:column;gap:1.25rem}:host .action-buttons-container{width:100%;position:absolute;bottom:0;left:0;right:0;background:var(--surface-0, #ffffff);border-top:1px solid var(--surface-border, #e2e8f0);padding:1rem .75rem;z-index:300}:host .info-section .section-title{font-size:1.25rem;font-weight:500;color:var(--text-color-secondary, #64748b);margin:0 0 1rem;padding-bottom:.5rem;border-bottom:1px solid var(--surface-border, #e2e8f0);display:flex;align-items:center;gap:.5rem;text-transform:uppercase;letter-spacing:.5px}:host .info-section .section-title i{color:var(--text-color-secondary, #64748b);font-size:1rem}:host .info-section .info-items{display:flex;flex-direction:column;gap:0}:host .info-section .info-item{display:flex;align-items:center;gap:.75rem;padding:.75rem 0;border-bottom:1px solid var(--surface-border, #f1f5f9)}:host .info-section .info-item:last-child{border-bottom:none}:host .info-section .info-item .info-icon{color:var(--text-color-secondary, #64748b);font-size:1rem;flex-shrink:0;width:1.25rem;text-align:center}:host .info-section .info-item .info-content{flex:1;display:flex;flex-direction:column;gap:.25rem}:host .info-section .info-item .info-content .info-label{font-size:.95rem;color:var(--text-color-secondary, #64748b);font-weight:500;line-height:1}:host .info-section .info-item .info-content .info-value{font-size:.95rem;color:var(--text-color, #1e293b);font-weight:400;line-height:1.3}:host .info-section .info-item .info-content .info-value.status{display:inline-flex;align-items:center;padding:.25rem .75rem;border-radius:16px;font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.025em;width:fit-content;background:var(--red-100, #fee2e2);color:var(--red-700, #b91c1c);border:1px solid var(--red-200, #fecaca)}:host .info-section .info-item .info-content .info-value.status.active{background:var(--green-100, #dcfce7);color:var(--green-700, #15803d);border:1px solid var(--green-200, #bbf7d0)}@media (max-width: 768px){:host .profile-content{padding:.875rem .65rem 11rem;gap:1rem}:host .action-buttons-container{padding:.875rem .65rem}:host .action-buttons-container .action-buttons-vertical{gap:.65rem}:host .action-buttons-container .action-buttons-horizontal{gap:.4rem}:host .info-item{padding:.65rem 0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: SidebarModule }, { kind: "component", type: i6$1.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TagModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: SkeletonModule }, { kind: "ngmodule", type: AvatarModule }, { kind: "ngmodule", type: ChipModule }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i4.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: ButtonComponent, selector: "aril-button:not([click])", inputs: ["label", "loading", "disabled", "raised", "outlined", "badge", "size", "icon", "color"], outputs: ["clickEvent"] }] }); }
|
|
207
568
|
}
|
|
208
569
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppProfileSidebarComponent, decorators: [{
|
|
209
570
|
type: Component,
|
|
210
|
-
args: [{ standalone: true, selector: 'app-profilemenu', imports: [
|
|
211
|
-
|
|
571
|
+
args: [{ standalone: true, selector: 'app-profilemenu', imports: [
|
|
572
|
+
CommonModule,
|
|
573
|
+
SidebarModule,
|
|
574
|
+
TagModule,
|
|
575
|
+
ButtonModule,
|
|
576
|
+
SkeletonModule,
|
|
577
|
+
AvatarModule,
|
|
578
|
+
ChipModule,
|
|
579
|
+
TranslocoModule,
|
|
580
|
+
ButtonComponent
|
|
581
|
+
], providers: [DialogService], template: "<p-sidebar\r\n\t[(visible)]=\"visible\"\r\n\tposition=\"right\"\r\n\t[transitionOptions]=\"'.3s cubic-bezier(0, 0, 0.2, 1)'\"\r\n\tstyleClass=\"layout-profile-sidebar w-full sm:w-30rem\">\r\n\t<ng-template pTemplate=\"header\">\r\n\t\t<div class=\"flex align-items-center gap-2\" *transloco=\"let t; read: 'profileSidebar'\">\r\n\t\t\t<span class=\"font-bold\">{{ t('personalInfo') }}</span>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t@if (userProfile()) {\r\n\t\t<div class=\"profile-content\" *transloco=\"let t; read: 'profileSidebar'\">\r\n\t\t\t<!-- Personal Information -->\r\n\t\t\t<div class=\"info-section\">\r\n\t\t\t\t<div class=\"info-items\">\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-user info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('fullName') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value\">{{ userProfile()?.firstName }} {{ userProfile()?.lastName }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-id-card info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('tcNumber') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value\">{{ userProfile()?.tckn || '' }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-envelope info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('email') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value\">{{ userProfile()?.email || '' }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-phone info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('phone') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value\">{{ userProfile()?.phone || '' }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-at info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('username') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value\">{{ userProfile()?.userName }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-check-circle info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('accountStatus') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value status\" [class.active]=\"userProfile()?.enabled\">\r\n\t\t\t\t\t\t\t\t{{ userProfile()?.enabled ? t('active') : t('inactive') }}\r\n\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-user info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('systemUser') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value status\" [class.active]=\"userProfile()?.systemUser\">\r\n\t\t\t\t\t\t\t\t{{ userProfile()?.systemUser ? t('yes') : t('no') }}\r\n\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"info-item\">\r\n\t\t\t\t\t\t<i class=\"pi pi-building info-icon\"></i>\r\n\t\t\t\t\t\t<div class=\"info-content\">\r\n\t\t\t\t\t\t\t<span class=\"info-label\">{{ t('clientSystemUser') }}</span>\r\n\t\t\t\t\t\t\t<span class=\"info-value\">{{ userProfile()?.clientOfSystemUser }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t}\r\n\r\n\t<!-- Fixed Action Buttons -->\r\n\t@if (userProfile()) {\r\n\t\t<div class=\"action-buttons-container grid p-fluid\" *transloco=\"let t; read: 'profileSidebar'\">\r\n\t\t\t<div class=\"col-12 flex justify-content-between align-items-center\">\r\n\t\t\t\t<aril-button\r\n\t\t\t\t\t[label]=\"t('editProfile')\"\r\n\t\t\t\t\ticon=\"USER_EDIT\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\tclass=\"col-6\"\r\n\t\t\t\t\t(clickEvent)=\"editProfile()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t\t<aril-button\r\n\t\t\t\t\t[label]=\"t('changePassword')\"\r\n\t\t\t\t\ticon=\"KEY\"\r\n\t\t\t\t\tcolor=\"secondary\"\r\n\t\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\tclass=\"col-6\"\r\n\t\t\t\t\t(clickEvent)=\"changePassword()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t</div>\r\n\t\t\t<aril-button\r\n\t\t\t\t[label]=\"t('logout')\"\r\n\t\t\t\ticon=\"SIGN_OUT\"\r\n\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t[outlined]=\"false\"\r\n\t\t\t\tsize=\"sm\"\r\n\t\t\t\tclass=\"col-12\"\r\n\t\t\t\t(clickEvent)=\"logout()\">\r\n\t\t\t</aril-button>\r\n\t\t</div>\r\n\t}\r\n</p-sidebar>\r\n", styles: [":host .layout-profile-sidebar .p-sidebar-content{padding:0;background:var(--surface-0, #ffffff);color:var(--text-color, #333);height:100vh;overflow-y:auto;position:relative}:host .profile-content{padding:1rem .75rem 12rem;display:flex;flex-direction:column;gap:1.25rem}:host .action-buttons-container{width:100%;position:absolute;bottom:0;left:0;right:0;background:var(--surface-0, #ffffff);border-top:1px solid var(--surface-border, #e2e8f0);padding:1rem .75rem;z-index:300}:host .info-section .section-title{font-size:1.25rem;font-weight:500;color:var(--text-color-secondary, #64748b);margin:0 0 1rem;padding-bottom:.5rem;border-bottom:1px solid var(--surface-border, #e2e8f0);display:flex;align-items:center;gap:.5rem;text-transform:uppercase;letter-spacing:.5px}:host .info-section .section-title i{color:var(--text-color-secondary, #64748b);font-size:1rem}:host .info-section .info-items{display:flex;flex-direction:column;gap:0}:host .info-section .info-item{display:flex;align-items:center;gap:.75rem;padding:.75rem 0;border-bottom:1px solid var(--surface-border, #f1f5f9)}:host .info-section .info-item:last-child{border-bottom:none}:host .info-section .info-item .info-icon{color:var(--text-color-secondary, #64748b);font-size:1rem;flex-shrink:0;width:1.25rem;text-align:center}:host .info-section .info-item .info-content{flex:1;display:flex;flex-direction:column;gap:.25rem}:host .info-section .info-item .info-content .info-label{font-size:.95rem;color:var(--text-color-secondary, #64748b);font-weight:500;line-height:1}:host .info-section .info-item .info-content .info-value{font-size:.95rem;color:var(--text-color, #1e293b);font-weight:400;line-height:1.3}:host .info-section .info-item .info-content .info-value.status{display:inline-flex;align-items:center;padding:.25rem .75rem;border-radius:16px;font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.025em;width:fit-content;background:var(--red-100, #fee2e2);color:var(--red-700, #b91c1c);border:1px solid var(--red-200, #fecaca)}:host .info-section .info-item .info-content .info-value.status.active{background:var(--green-100, #dcfce7);color:var(--green-700, #15803d);border:1px solid var(--green-200, #bbf7d0)}@media (max-width: 768px){:host .profile-content{padding:.875rem .65rem 11rem;gap:1rem}:host .action-buttons-container{padding:.875rem .65rem}:host .action-buttons-container .action-buttons-vertical{gap:.65rem}:host .action-buttons-container .action-buttons-horizontal{gap:.4rem}:host .info-item{padding:.65rem 0}}\n"] }]
|
|
582
|
+
}], ctorParameters: () => [{ type: LayoutService }, { type: i2$1.KeycloakService }, { type: ProfileService }, { type: i2.DialogService }, { type: i4.TranslocoService }] });
|
|
583
|
+
|
|
584
|
+
class HistoryService {
|
|
585
|
+
constructor() {
|
|
586
|
+
this.STORAGE_KEY = 'page_history';
|
|
587
|
+
this.MAX_HISTORY_SIZE = 20;
|
|
588
|
+
this.historySubject = new BehaviorSubject([]);
|
|
589
|
+
this.history$ = this.historySubject.asObservable();
|
|
590
|
+
// Excluded paths that shouldn't be tracked
|
|
591
|
+
this.excludedPaths = ['/login', '/logout', '/error', '/not-found', '/unauthorized'];
|
|
592
|
+
this.router = inject(Router);
|
|
593
|
+
this.translocoService = inject(TranslocoService);
|
|
594
|
+
this.loadHistoryFromStorage();
|
|
595
|
+
this.initializeRouterTracking();
|
|
596
|
+
}
|
|
597
|
+
initializeRouterTracking() {
|
|
598
|
+
this.router.events
|
|
599
|
+
.pipe(filter((event) => event instanceof NavigationEnd), map((event) => event))
|
|
600
|
+
.subscribe((event) => {
|
|
601
|
+
this.addToHistory(event.urlAfterRedirects || event.url);
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
addToHistory(url) {
|
|
605
|
+
// Skip if URL should be excluded
|
|
606
|
+
if (this.shouldExcludeUrl(url)) {
|
|
607
|
+
return;
|
|
608
|
+
}
|
|
609
|
+
const menuItem = this.findMenuItemByPath(url);
|
|
610
|
+
const multiLanguageTitle = {};
|
|
611
|
+
// Get titles for both languages if menu item exists
|
|
612
|
+
if (menuItem) {
|
|
613
|
+
multiLanguageTitle.tr = menuItem.label['tr'];
|
|
614
|
+
multiLanguageTitle.en = menuItem.label['en'];
|
|
615
|
+
}
|
|
616
|
+
else {
|
|
617
|
+
// Fallback for pages not in menu
|
|
618
|
+
multiLanguageTitle.tr = 'Bilinmeyen Sayfa';
|
|
619
|
+
multiLanguageTitle.en = 'Unknown Page';
|
|
620
|
+
}
|
|
621
|
+
const currentLang = this.translocoService.getActiveLang();
|
|
622
|
+
const title = multiLanguageTitle[currentLang] || multiLanguageTitle.tr || 'Unknown Page';
|
|
623
|
+
const timestamp = Date.now();
|
|
624
|
+
const id = this.generateId(url, timestamp);
|
|
625
|
+
const newItem = {
|
|
626
|
+
id,
|
|
627
|
+
title,
|
|
628
|
+
multiLanguageTitle,
|
|
629
|
+
url,
|
|
630
|
+
timestamp
|
|
631
|
+
};
|
|
632
|
+
let history = this.getHistoryFromStorage();
|
|
633
|
+
history = history.filter((item) => item.url !== url);
|
|
634
|
+
history.unshift(newItem);
|
|
635
|
+
// Limit history size
|
|
636
|
+
if (history.length > this.MAX_HISTORY_SIZE) {
|
|
637
|
+
history = history.slice(0, this.MAX_HISTORY_SIZE);
|
|
638
|
+
}
|
|
639
|
+
this.saveHistoryToStorage(history);
|
|
640
|
+
this.historySubject.next(history);
|
|
641
|
+
}
|
|
642
|
+
shouldExcludeUrl(url) {
|
|
643
|
+
return this.excludedPaths.some((excludedPath) => url.startsWith(excludedPath));
|
|
644
|
+
}
|
|
645
|
+
findMenuItemByPath(path) {
|
|
646
|
+
const menuItems = globalThis.hostMenuItems?.() || [];
|
|
647
|
+
// Special handling for home page route
|
|
648
|
+
if (path === '/' || path === '') {
|
|
649
|
+
return menuItems.find((item) => item.routerLink === '/') || null;
|
|
650
|
+
}
|
|
651
|
+
// Remove leading slash if present for other routes
|
|
652
|
+
const cleanPath = path.startsWith('/') ? path.substring(1) : path;
|
|
653
|
+
return this.findMenuItemRecursive(menuItems, cleanPath);
|
|
654
|
+
}
|
|
655
|
+
findMenuItemRecursive(items, path) {
|
|
656
|
+
for (const item of items) {
|
|
657
|
+
if (item.routerLink === path) {
|
|
658
|
+
return item;
|
|
659
|
+
}
|
|
660
|
+
if (item.routerLink && path.startsWith(item.routerLink + '/')) {
|
|
661
|
+
return item;
|
|
662
|
+
}
|
|
663
|
+
if (item.items) {
|
|
664
|
+
const found = this.findMenuItemRecursive(item.items, path);
|
|
665
|
+
if (found) {
|
|
666
|
+
return found;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
return null;
|
|
671
|
+
}
|
|
672
|
+
generateId(url, timestamp) {
|
|
673
|
+
return `${url.replace(/[^a-zA-Z0-9]/g, '_')}_${timestamp}`;
|
|
674
|
+
}
|
|
675
|
+
loadHistoryFromStorage() {
|
|
676
|
+
const history = this.getHistoryFromStorage();
|
|
677
|
+
this.historySubject.next(history);
|
|
678
|
+
}
|
|
679
|
+
saveHistoryToStorage(history) {
|
|
680
|
+
try {
|
|
681
|
+
localStorage.setItem(this.STORAGE_KEY, JSON.stringify(history));
|
|
682
|
+
}
|
|
683
|
+
catch (error) {
|
|
684
|
+
console.warn('Failed to save navigation history to localStorage:', error);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
clearHistory() {
|
|
688
|
+
localStorage.removeItem(this.STORAGE_KEY);
|
|
689
|
+
this.historySubject.next([]);
|
|
690
|
+
}
|
|
691
|
+
navigateToHistoryItem(item) {
|
|
692
|
+
this.router.navigate([item.url]);
|
|
693
|
+
}
|
|
694
|
+
getHistoryFromStorage() {
|
|
695
|
+
try {
|
|
696
|
+
const stored = localStorage.getItem(this.STORAGE_KEY);
|
|
697
|
+
return stored ? JSON.parse(stored) : [];
|
|
698
|
+
}
|
|
699
|
+
catch (error) {
|
|
700
|
+
console.warn('Failed to load navigation history from localStorage:', error);
|
|
701
|
+
return [];
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
getHistoryItemsBySearchTerm(searchTerm) {
|
|
705
|
+
const history = this.getHistoryFromStorage();
|
|
706
|
+
const lowerSearchTerm = searchTerm.toLowerCase();
|
|
707
|
+
const currentLang = this.translocoService.getActiveLang();
|
|
708
|
+
return history.filter((item) => {
|
|
709
|
+
// Search in current language title
|
|
710
|
+
const currentTitle = item.multiLanguageTitle?.[currentLang] || item.title;
|
|
711
|
+
return currentTitle.toLowerCase().includes(lowerSearchTerm) || item.url.toLowerCase().includes(lowerSearchTerm);
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: HistoryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
715
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: HistoryService, providedIn: 'root' }); }
|
|
716
|
+
}
|
|
717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: HistoryService, decorators: [{
|
|
718
|
+
type: Injectable,
|
|
719
|
+
args: [{
|
|
720
|
+
providedIn: 'root'
|
|
721
|
+
}]
|
|
722
|
+
}], ctorParameters: () => [] });
|
|
723
|
+
|
|
724
|
+
class HistorySidebarComponent {
|
|
725
|
+
constructor(layoutService, historyService, confirmationService, messageService, translocoService) {
|
|
726
|
+
this.layoutService = layoutService;
|
|
727
|
+
this.historyService = historyService;
|
|
728
|
+
this.confirmationService = confirmationService;
|
|
729
|
+
this.messageService = messageService;
|
|
730
|
+
this.translocoService = translocoService;
|
|
731
|
+
this.history = signal([]);
|
|
732
|
+
this.filteredHistory = signal([]);
|
|
733
|
+
this.searchTerm = signal('');
|
|
734
|
+
this.destroy$ = new Subject();
|
|
735
|
+
}
|
|
736
|
+
ngOnInit() {
|
|
737
|
+
this.historyService.history$.pipe(takeUntil(this.destroy$)).subscribe((history) => {
|
|
738
|
+
this.history.set(history);
|
|
739
|
+
this.applyFilter();
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
ngOnDestroy() {
|
|
743
|
+
this.destroy$.next();
|
|
744
|
+
this.destroy$.complete();
|
|
745
|
+
}
|
|
746
|
+
get visible() {
|
|
747
|
+
return this.layoutService.state.historySidebarVisible;
|
|
748
|
+
}
|
|
749
|
+
set visible(value) {
|
|
750
|
+
this.layoutService.state.historySidebarVisible = value;
|
|
751
|
+
}
|
|
752
|
+
onSearchChange() {
|
|
753
|
+
this.applyFilter();
|
|
754
|
+
}
|
|
755
|
+
applyFilter() {
|
|
756
|
+
const searchTerm = this.searchTerm();
|
|
757
|
+
if (!searchTerm.trim()) {
|
|
758
|
+
this.filteredHistory.set(this.history());
|
|
759
|
+
}
|
|
760
|
+
else {
|
|
761
|
+
const filtered = this.historyService.getHistoryItemsBySearchTerm(searchTerm);
|
|
762
|
+
this.filteredHistory.set(filtered);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
navigateToItem(item) {
|
|
766
|
+
this.historyService.navigateToHistoryItem(item);
|
|
767
|
+
this.visible = false;
|
|
768
|
+
}
|
|
769
|
+
clearAllHistory(event) {
|
|
770
|
+
this.confirmationService.confirm({
|
|
771
|
+
target: event.target,
|
|
772
|
+
message: this.translocoService.translate('history.confirmClearAllMessage'),
|
|
773
|
+
header: this.translocoService.translate('history.deleteConfirmation'),
|
|
774
|
+
icon: 'pi pi-info-circle',
|
|
775
|
+
acceptLabel: this.translocoService.translate('history.acceptButtonLabel'),
|
|
776
|
+
rejectLabel: this.translocoService.translate('history.rejectButtonLabel'),
|
|
777
|
+
acceptButtonStyleClass: 'p-button-success',
|
|
778
|
+
rejectButtonStyleClass: 'p-button-danger p-button-outlined',
|
|
779
|
+
accept: () => {
|
|
780
|
+
this.historyService.clearHistory();
|
|
781
|
+
this.messageService.add({
|
|
782
|
+
severity: 'success',
|
|
783
|
+
summary: this.translocoService.translate('history.acceptButtonLabel'),
|
|
784
|
+
detail: this.translocoService.translate('history.clearAll')
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
trackByItemId(index, item) {
|
|
790
|
+
return item.id || index;
|
|
791
|
+
}
|
|
792
|
+
getLocalizedTitle(item) {
|
|
793
|
+
const currentLang = this.translocoService.getActiveLang();
|
|
794
|
+
// Use multiLanguageTitle if available
|
|
795
|
+
if (item.multiLanguageTitle) {
|
|
796
|
+
const localizedTitle = item.multiLanguageTitle[currentLang];
|
|
797
|
+
if (localizedTitle) {
|
|
798
|
+
return localizedTitle;
|
|
799
|
+
}
|
|
800
|
+
// Fallback to Turkish if current language not available
|
|
801
|
+
if (item.multiLanguageTitle.tr) {
|
|
802
|
+
return item.multiLanguageTitle.tr;
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
// Fallback to original title
|
|
806
|
+
return item.title;
|
|
807
|
+
}
|
|
808
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: HistorySidebarComponent, deps: [{ token: LayoutService }, { token: HistoryService }, { token: i3.ConfirmationService }, { token: i3.MessageService }, { token: i4.TranslocoService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
809
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: HistorySidebarComponent, isStandalone: true, selector: "app-history-sidebar", providers: [ConfirmationService], ngImport: i0, template: "<p-sidebar\r\n\t[(visible)]=\"visible\"\r\n\tposition=\"right\"\r\n\t[transitionOptions]=\"'.3s cubic-bezier(0, 0, 0.2, 1)'\"\r\n\tstyleClass=\"layout-history-sidebar w-full sm:w-30rem\"\r\n\t*transloco=\"let t; read: 'history'\">\r\n\t<ng-template pTemplate=\"header\">\r\n\t\t<div class=\"flex align-items-center justify-content-between w-full\">\r\n\t\t\t<div class=\"flex align-items-center\">\r\n\t\t\t\t<i class=\"pi pi-history text-primary text-xl\"></i>\r\n\t\t\t\t<span class=\"font-bold text-lg\">{{ t('pageHistory') }}</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<div class=\"history-content\">\r\n\t\t@if (history().length > 0) {\r\n\t\t\t<div class=\"search-section\">\r\n\t\t\t\t<div class=\"search-input-container\">\r\n\t\t\t\t\t<aril-text\r\n\t\t\t\t\t\tclass=\"w-full\"\r\n\t\t\t\t\t\t[placeholder]=\"t('searchHistory')\"\r\n\t\t\t\t\t\t[(ngModel)]=\"searchTerm\"\r\n\t\t\t\t\t\t(ngModelChange)=\"onSearchChange()\">\r\n\t\t\t\t\t</aril-text>\r\n\r\n\t\t\t\t\t<aril-button\r\n\t\t\t\t\t\ticon=\"TRASH\"\r\n\t\t\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\tclass=\"ml-1\"\r\n\t\t\t\t\t\t[pTooltip]=\"t('confirmClearAll')\"\r\n\t\t\t\t\t\ttooltipPosition=\"left\"\r\n\t\t\t\t\t\t(clickEvent)=\"clearAllHistory($event)\">\r\n\t\t\t\t\t</aril-button>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t}\r\n\r\n\t\t@if (filteredHistory().length > 0) {\r\n\t\t\t<div class=\"history-list\">\r\n\t\t\t\t<p-scrollPanel [style]=\"{ width: '100%', height: '100%' }\">\r\n\t\t\t\t\t<div class=\"history-items\">\r\n\t\t\t\t\t\t@for (item of filteredHistory(); track trackByItemId($index, item)) {\r\n\t\t\t\t\t\t\t<div class=\"history-item\" (click)=\"navigateToItem(item)\">\r\n\t\t\t\t\t\t\t\t<div class=\"item-content\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"item-header\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"item-title\">\r\n\t\t\t\t\t\t\t\t\t\t\t<i class=\"pi pi-external-link text-primary mr-2\"></i>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"title-info\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"title-text\">{{ getLocalizedTitle(item) }}</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"route-text\">{{ item.url }}</span>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</p-scrollPanel>\r\n\t\t\t</div>\r\n\t\t} @else {\r\n\t\t\t<div class=\"empty-state\">\r\n\t\t\t\t<div class=\"empty-content\">\r\n\t\t\t\t\t<i class=\"pi pi-history empty-icon\"></i>\r\n\t\t\t\t\t<h3 class=\"empty-title\">\r\n\t\t\t\t\t\t{{ searchTerm() ? t('noSearchResults') : t('noHistory') }}\r\n\t\t\t\t\t</h3>\r\n\t\t\t\t\t<p class=\"empty-message\">\r\n\t\t\t\t\t\t{{ searchTerm() ? t('tryDifferentKeywords') : t('startBrowsing') }}\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t@if (searchTerm()) {\r\n\t\t\t\t\t\t<aril-button\r\n\t\t\t\t\t\t\t[label]=\"t('clearSearch')\"\r\n\t\t\t\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t\t\t\tcolor=\"secondary\"\r\n\t\t\t\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\t\t(clickEvent)=\"searchTerm.set(''); onSearchChange()\">\r\n\t\t\t\t\t\t</aril-button>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t}\r\n\t</div>\r\n\r\n\t<p-confirmDialog></p-confirmDialog>\r\n</p-sidebar>\r\n", styles: [":host ::ng-deep .layout-history-sidebar .p-sidebar-content{padding:0;background:var(--surface-ground)}:host ::ng-deep .layout-history-sidebar .p-sidebar-header{background:var(--primary-color);color:var(--primary-color-text);border-bottom:1px solid var(--primary-600);padding:1rem .5rem}:host ::ng-deep .layout-history-sidebar .p-sidebar-header i{color:var(--primary-color-text);font-size:1.1rem}:host ::ng-deep .layout-history-sidebar .p-sidebar-header span{font-size:1.1rem;font-weight:600;color:var(--primary-color-text)}.history-content{display:flex;flex-direction:column;height:92vh;background:var(--surface-0)}.search-section{padding:1rem;border-bottom:1px solid var(--surface-border);background:var(--surface-0);width:100%}.search-input-container{display:flex;align-items:center;justify-content:space-between;width:100%}.history-list{flex:1;overflow:hidden}.history-items{padding:.5rem}.history-item{background:var(--surface-0);border:1px solid var(--surface-border);border-radius:8px;margin-bottom:.5rem;cursor:pointer;transition:all .2s ease;position:relative;overflow:hidden}.history-item:hover{border-color:var(--primary-200);background:var(--primary-50);transform:translateY(-1px);box-shadow:0 2px 8px #0000001a}.history-item:hover .remove-btn{opacity:1}.history-item:last-child{margin-bottom:0}.item-content{padding:1rem .75rem}.item-header{display:flex;align-items:center;justify-content:space-between}.item-title{display:flex;align-items:center;flex:1;min-width:0}.item-title .title-info{display:flex;flex-direction:column;flex:1;min-width:0}.item-title .title-text{font-weight:600;color:var(--text-color);font-size:1rem;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.item-title .route-text{font-size:.75rem;color:var(--text-color-secondary);font-weight:400;line-height:1.2;margin-top:.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.8}.empty-state{flex:1;display:flex;align-items:center;justify-content:center;padding:2rem}.empty-content{text-align:center;max-width:300px}.empty-icon{font-size:3rem;color:var(--text-color-secondary);margin-bottom:1rem;opacity:.5}.empty-title{font-size:1.1rem;font-weight:600;color:var(--text-color);margin-bottom:.5rem}.empty-message{font-size:.9rem;color:var(--text-color-secondary);line-height:1.4;margin-bottom:1.5rem}@media (max-width: 768px){.history-content{height:calc(100vh - 3.5rem)}.search-section{padding:.75rem}.item-content{padding:.5rem}.item-title .title-text{font-size:.85rem}}:host ::ng-deep .p-scrollpanel-bar-y{background:var(--primary-200);width:4px;border-radius:2px}:host ::ng-deep .p-scrollpanel-bar-y:hover{background:var(--primary-300)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SidebarModule }, { kind: "component", type: i6$1.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: ButtonComponent, selector: "aril-button:not([click])", inputs: ["label", "loading", "disabled", "raised", "outlined", "badge", "size", "icon", "color"], outputs: ["clickEvent"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "ngmodule", type: ScrollPanelModule }, { kind: "component", type: i7$1.ScrollPanel, selector: "p-scrollPanel", inputs: ["style", "styleClass", "step"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i8.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i9.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i4.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: TextComponent, selector: "aril-text[ngModel], aril-text[formControl], aril-text[formControlName]", inputs: ["placeholder", "tabindex", "icon", "iconPos", "size"] }] }); }
|
|
810
|
+
}
|
|
811
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: HistorySidebarComponent, decorators: [{
|
|
812
|
+
type: Component,
|
|
813
|
+
args: [{ standalone: true, selector: 'app-history-sidebar', imports: [
|
|
814
|
+
CommonModule,
|
|
815
|
+
FormsModule,
|
|
816
|
+
SidebarModule,
|
|
817
|
+
ButtonComponent,
|
|
818
|
+
InputTextModule,
|
|
819
|
+
ScrollPanelModule,
|
|
820
|
+
ConfirmDialogModule,
|
|
821
|
+
TooltipModule,
|
|
822
|
+
BadgeModule,
|
|
823
|
+
TranslocoModule,
|
|
824
|
+
TextComponent
|
|
825
|
+
], providers: [ConfirmationService], template: "<p-sidebar\r\n\t[(visible)]=\"visible\"\r\n\tposition=\"right\"\r\n\t[transitionOptions]=\"'.3s cubic-bezier(0, 0, 0.2, 1)'\"\r\n\tstyleClass=\"layout-history-sidebar w-full sm:w-30rem\"\r\n\t*transloco=\"let t; read: 'history'\">\r\n\t<ng-template pTemplate=\"header\">\r\n\t\t<div class=\"flex align-items-center justify-content-between w-full\">\r\n\t\t\t<div class=\"flex align-items-center\">\r\n\t\t\t\t<i class=\"pi pi-history text-primary text-xl\"></i>\r\n\t\t\t\t<span class=\"font-bold text-lg\">{{ t('pageHistory') }}</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<div class=\"history-content\">\r\n\t\t@if (history().length > 0) {\r\n\t\t\t<div class=\"search-section\">\r\n\t\t\t\t<div class=\"search-input-container\">\r\n\t\t\t\t\t<aril-text\r\n\t\t\t\t\t\tclass=\"w-full\"\r\n\t\t\t\t\t\t[placeholder]=\"t('searchHistory')\"\r\n\t\t\t\t\t\t[(ngModel)]=\"searchTerm\"\r\n\t\t\t\t\t\t(ngModelChange)=\"onSearchChange()\">\r\n\t\t\t\t\t</aril-text>\r\n\r\n\t\t\t\t\t<aril-button\r\n\t\t\t\t\t\ticon=\"TRASH\"\r\n\t\t\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\tclass=\"ml-1\"\r\n\t\t\t\t\t\t[pTooltip]=\"t('confirmClearAll')\"\r\n\t\t\t\t\t\ttooltipPosition=\"left\"\r\n\t\t\t\t\t\t(clickEvent)=\"clearAllHistory($event)\">\r\n\t\t\t\t\t</aril-button>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t}\r\n\r\n\t\t@if (filteredHistory().length > 0) {\r\n\t\t\t<div class=\"history-list\">\r\n\t\t\t\t<p-scrollPanel [style]=\"{ width: '100%', height: '100%' }\">\r\n\t\t\t\t\t<div class=\"history-items\">\r\n\t\t\t\t\t\t@for (item of filteredHistory(); track trackByItemId($index, item)) {\r\n\t\t\t\t\t\t\t<div class=\"history-item\" (click)=\"navigateToItem(item)\">\r\n\t\t\t\t\t\t\t\t<div class=\"item-content\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"item-header\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"item-title\">\r\n\t\t\t\t\t\t\t\t\t\t\t<i class=\"pi pi-external-link text-primary mr-2\"></i>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"title-info\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"title-text\">{{ getLocalizedTitle(item) }}</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"route-text\">{{ item.url }}</span>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</p-scrollPanel>\r\n\t\t\t</div>\r\n\t\t} @else {\r\n\t\t\t<div class=\"empty-state\">\r\n\t\t\t\t<div class=\"empty-content\">\r\n\t\t\t\t\t<i class=\"pi pi-history empty-icon\"></i>\r\n\t\t\t\t\t<h3 class=\"empty-title\">\r\n\t\t\t\t\t\t{{ searchTerm() ? t('noSearchResults') : t('noHistory') }}\r\n\t\t\t\t\t</h3>\r\n\t\t\t\t\t<p class=\"empty-message\">\r\n\t\t\t\t\t\t{{ searchTerm() ? t('tryDifferentKeywords') : t('startBrowsing') }}\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t@if (searchTerm()) {\r\n\t\t\t\t\t\t<aril-button\r\n\t\t\t\t\t\t\t[label]=\"t('clearSearch')\"\r\n\t\t\t\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t\t\t\tcolor=\"secondary\"\r\n\t\t\t\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\t\t(clickEvent)=\"searchTerm.set(''); onSearchChange()\">\r\n\t\t\t\t\t\t</aril-button>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t}\r\n\t</div>\r\n\r\n\t<p-confirmDialog></p-confirmDialog>\r\n</p-sidebar>\r\n", styles: [":host ::ng-deep .layout-history-sidebar .p-sidebar-content{padding:0;background:var(--surface-ground)}:host ::ng-deep .layout-history-sidebar .p-sidebar-header{background:var(--primary-color);color:var(--primary-color-text);border-bottom:1px solid var(--primary-600);padding:1rem .5rem}:host ::ng-deep .layout-history-sidebar .p-sidebar-header i{color:var(--primary-color-text);font-size:1.1rem}:host ::ng-deep .layout-history-sidebar .p-sidebar-header span{font-size:1.1rem;font-weight:600;color:var(--primary-color-text)}.history-content{display:flex;flex-direction:column;height:92vh;background:var(--surface-0)}.search-section{padding:1rem;border-bottom:1px solid var(--surface-border);background:var(--surface-0);width:100%}.search-input-container{display:flex;align-items:center;justify-content:space-between;width:100%}.history-list{flex:1;overflow:hidden}.history-items{padding:.5rem}.history-item{background:var(--surface-0);border:1px solid var(--surface-border);border-radius:8px;margin-bottom:.5rem;cursor:pointer;transition:all .2s ease;position:relative;overflow:hidden}.history-item:hover{border-color:var(--primary-200);background:var(--primary-50);transform:translateY(-1px);box-shadow:0 2px 8px #0000001a}.history-item:hover .remove-btn{opacity:1}.history-item:last-child{margin-bottom:0}.item-content{padding:1rem .75rem}.item-header{display:flex;align-items:center;justify-content:space-between}.item-title{display:flex;align-items:center;flex:1;min-width:0}.item-title .title-info{display:flex;flex-direction:column;flex:1;min-width:0}.item-title .title-text{font-weight:600;color:var(--text-color);font-size:1rem;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.item-title .route-text{font-size:.75rem;color:var(--text-color-secondary);font-weight:400;line-height:1.2;margin-top:.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.8}.empty-state{flex:1;display:flex;align-items:center;justify-content:center;padding:2rem}.empty-content{text-align:center;max-width:300px}.empty-icon{font-size:3rem;color:var(--text-color-secondary);margin-bottom:1rem;opacity:.5}.empty-title{font-size:1.1rem;font-weight:600;color:var(--text-color);margin-bottom:.5rem}.empty-message{font-size:.9rem;color:var(--text-color-secondary);line-height:1.4;margin-bottom:1.5rem}@media (max-width: 768px){.history-content{height:calc(100vh - 3.5rem)}.search-section{padding:.75rem}.item-content{padding:.5rem}.item-title .title-text{font-size:.85rem}}:host ::ng-deep .p-scrollpanel-bar-y{background:var(--primary-200);width:4px;border-radius:2px}:host ::ng-deep .p-scrollpanel-bar-y:hover{background:var(--primary-300)}\n"] }]
|
|
826
|
+
}], ctorParameters: () => [{ type: LayoutService }, { type: HistoryService }, { type: i3.ConfirmationService }, { type: i3.MessageService }, { type: i4.TranslocoService }] });
|
|
827
|
+
|
|
828
|
+
class SiteMapSidebarComponent {
|
|
829
|
+
constructor(layoutService, translocoService) {
|
|
830
|
+
this.layoutService = layoutService;
|
|
831
|
+
this.translocoService = translocoService;
|
|
832
|
+
this.siteMapNodes = signal([]);
|
|
833
|
+
this.filteredNodes = signal([]);
|
|
834
|
+
this.searchTerm = signal('');
|
|
835
|
+
this.totalPages = signal(0);
|
|
836
|
+
}
|
|
837
|
+
ngOnInit() {
|
|
838
|
+
this.loadSiteMap();
|
|
839
|
+
}
|
|
840
|
+
get visible() {
|
|
841
|
+
return this.layoutService.state.siteMapSidebarVisible;
|
|
842
|
+
}
|
|
843
|
+
set visible(value) {
|
|
844
|
+
this.layoutService.state.siteMapSidebarVisible = value;
|
|
845
|
+
}
|
|
846
|
+
loadSiteMap() {
|
|
847
|
+
const menuItems = globalThis.hostMenuItems?.() || [];
|
|
848
|
+
const nodes = this.buildSiteMapNodes(menuItems);
|
|
849
|
+
const totalCount = this.countTotalPages(nodes);
|
|
850
|
+
this.siteMapNodes.set(nodes);
|
|
851
|
+
this.filteredNodes.set(nodes);
|
|
852
|
+
this.totalPages.set(totalCount);
|
|
853
|
+
}
|
|
854
|
+
buildSiteMapNodes(items, parentKey = '') {
|
|
855
|
+
return items
|
|
856
|
+
.filter((item) => {
|
|
857
|
+
// Keep the home page route ("/") and any non-empty routes
|
|
858
|
+
return !item.routerLink || item.routerLink === '/' || item.routerLink.trim() !== '';
|
|
859
|
+
})
|
|
860
|
+
.map((item, index) => {
|
|
861
|
+
const key = parentKey ? `${parentKey}-${index}` : `${index}`;
|
|
862
|
+
let label;
|
|
863
|
+
if (item.routerLink === '/') {
|
|
864
|
+
label = { tr: 'Anasayfa', en: 'Home' };
|
|
865
|
+
}
|
|
866
|
+
else {
|
|
867
|
+
label = item.label || { tr: 'Bilinmeyen', en: 'Unknown' };
|
|
868
|
+
}
|
|
869
|
+
const node = {
|
|
870
|
+
key,
|
|
871
|
+
label,
|
|
872
|
+
icon: item.icon,
|
|
873
|
+
routerLink: item.routerLink,
|
|
874
|
+
expanded: false
|
|
875
|
+
};
|
|
876
|
+
if (item.items && item.items.length > 0) {
|
|
877
|
+
node.children = this.buildSiteMapNodes(item.items, key);
|
|
878
|
+
}
|
|
879
|
+
return node;
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
countTotalPages(nodes) {
|
|
883
|
+
let count = 0;
|
|
884
|
+
for (const node of nodes) {
|
|
885
|
+
if (node.routerLink) {
|
|
886
|
+
count++;
|
|
887
|
+
}
|
|
888
|
+
if (node.children) {
|
|
889
|
+
count += this.countTotalPages(node.children);
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
return count;
|
|
893
|
+
}
|
|
894
|
+
onSearchChange() {
|
|
895
|
+
const searchTerm = this.searchTerm().toLowerCase().trim();
|
|
896
|
+
if (!searchTerm) {
|
|
897
|
+
this.filteredNodes.set(this.siteMapNodes());
|
|
898
|
+
}
|
|
899
|
+
else {
|
|
900
|
+
const filtered = this.filterNodes(this.siteMapNodes(), searchTerm);
|
|
901
|
+
this.filteredNodes.set(filtered);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
filterNodes(nodes, searchTerm) {
|
|
905
|
+
const filtered = [];
|
|
906
|
+
const currentLang = this.translocoService.getActiveLang();
|
|
907
|
+
for (const node of nodes) {
|
|
908
|
+
// Convert label to string for search based on active language
|
|
909
|
+
const labelText = typeof node.label === 'string' ?
|
|
910
|
+
node.label
|
|
911
|
+
: node.label?.[currentLang] || node.label?.tr || node.label?.en || '';
|
|
912
|
+
const matches = labelText.toLowerCase().includes(searchTerm);
|
|
913
|
+
let filteredChildren = [];
|
|
914
|
+
if (node.children) {
|
|
915
|
+
filteredChildren = this.filterNodes(node.children, searchTerm);
|
|
916
|
+
}
|
|
917
|
+
if (matches || filteredChildren.length > 0) {
|
|
918
|
+
filtered.push({
|
|
919
|
+
...node,
|
|
920
|
+
children: filteredChildren.length > 0 ? filteredChildren : node.children,
|
|
921
|
+
expanded: filteredChildren.length > 0
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
return filtered;
|
|
926
|
+
}
|
|
927
|
+
expandAll() {
|
|
928
|
+
const expanded = this.expandNodes(this.filteredNodes(), true);
|
|
929
|
+
this.filteredNodes.set([...expanded]);
|
|
930
|
+
}
|
|
931
|
+
collapseAll() {
|
|
932
|
+
const collapsed = this.expandNodes(this.filteredNodes(), false);
|
|
933
|
+
this.filteredNodes.set([...collapsed]);
|
|
934
|
+
}
|
|
935
|
+
expandNodes(nodes, expanded) {
|
|
936
|
+
return nodes.map((node) => ({
|
|
937
|
+
...node,
|
|
938
|
+
expanded,
|
|
939
|
+
children: node.children ? this.expandNodes(node.children, expanded) : undefined
|
|
940
|
+
}));
|
|
941
|
+
}
|
|
942
|
+
toggleNode(node) {
|
|
943
|
+
node.expanded = !node.expanded;
|
|
944
|
+
this.filteredNodes.set([...this.filteredNodes()]);
|
|
945
|
+
}
|
|
946
|
+
trackByKey(index, node) {
|
|
947
|
+
return node.key || `${index}`;
|
|
948
|
+
}
|
|
949
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SiteMapSidebarComponent, deps: [{ token: LayoutService }, { token: i4.TranslocoService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
950
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: SiteMapSidebarComponent, isStandalone: true, selector: "app-site-map-sidebar", ngImport: i0, template: "<p-sidebar\r\n\t[(visible)]=\"visible\"\r\n\tposition=\"right\"\r\n\t[transitionOptions]=\"'.3s cubic-bezier(0, 0, 0.2, 1)'\"\r\n\tstyleClass=\"layout-sitemap-sidebar w-full sm:w-30rem\"\r\n\t*transloco=\"let t; read: 'siteMap'\">\r\n\t<ng-template pTemplate=\"header\">\r\n\t\t<div class=\"flex align-items-center justify-content-between gap-2 w-full\">\r\n\t\t\t<div class=\"flex align-items-center gap-2\">\r\n\t\t\t\t<i class=\"pi pi-sitemap text-primary text-xl\"></i>\r\n\t\t\t\t<span class=\"font-bold text-lg\">{{ t('siteMap') }}</span>\r\n\t\t\t\t<span class=\"total-pages\">{{ totalPages() }} {{ t('pages') }}</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<div class=\"sitemap-content\">\r\n\t\t<div class=\"search-section\">\r\n\t\t\t<aril-text [placeholder]=\"t('searchPages')\" [(ngModel)]=\"searchTerm\" (ngModelChange)=\"onSearchChange()\">\r\n\t\t\t</aril-text>\r\n\t\t</div>\r\n\r\n\t\t@if (filteredNodes().length > 0) {\r\n\t\t\t<div class=\"quick-actions\">\r\n\t\t\t\t<aril-button\r\n\t\t\t\t\ticon=\"PLUS\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t\t[raised]=\"true\"\r\n\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t[pTooltip]=\"t('expandAll')\"\r\n\t\t\t\t\ttooltipPosition=\"top\"\r\n\t\t\t\t\t(clickEvent)=\"expandAll()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t\t<aril-button\r\n\t\t\t\t\ticon=\"MINUS\"\r\n\t\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t\t[raised]=\"false\"\r\n\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t[pTooltip]=\"t('collapseAll')\"\r\n\t\t\t\t\ttooltipPosition=\"top\"\r\n\t\t\t\t\t(clickEvent)=\"collapseAll()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t</div>\r\n\t\t}\r\n\r\n\t\t<!-- Site Map Tree -->\r\n\t\t@if (filteredNodes().length > 0) {\r\n\t\t\t<div class=\"sitemap-tree\">\r\n\t\t\t\t<p-scrollPanel [style]=\"{ width: '100%', height: '100%' }\">\r\n\t\t\t\t\t<div class=\"tree-container\">\r\n\t\t\t\t\t\t@for (node of filteredNodes(); track trackByKey($index, node)) {\r\n\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"treeNodeTemplate; context: { $implicit: node, level: 0 }\"></ng-container>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</p-scrollPanel>\r\n\t\t\t</div>\r\n\t\t} @else {\r\n\t\t\t<div class=\"empty-state\">\r\n\t\t\t\t<div class=\"empty-content\">\r\n\t\t\t\t\t<i class=\"pi pi-sitemap empty-icon\"></i>\r\n\t\t\t\t\t<h3 class=\"empty-title\">\r\n\t\t\t\t\t\t{{ searchTerm() ? t('noSearchResults') : t('noPages') }}\r\n\t\t\t\t\t</h3>\r\n\t\t\t\t\t<p class=\"empty-message\">\r\n\t\t\t\t\t\t{{ searchTerm() ? t('tryDifferentKeywords') : '' }}\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t@if (searchTerm()) {\r\n\t\t\t\t\t\t<aril-button\r\n\t\t\t\t\t\t\t[label]=\"t('clearSearch')\"\r\n\t\t\t\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t\t\t\tcolor=\"secondary\"\r\n\t\t\t\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\t\t(clickEvent)=\"searchTerm.set(''); onSearchChange()\">\r\n\t\t\t\t\t\t</aril-button>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t}\r\n\r\n\t\t<!-- Recursive Tree Node Template -->\r\n\t\t<ng-template #treeNodeTemplate let-node let-level=\"level\">\r\n\t\t\t<div class=\"tree-node\" [style.margin-left.px]=\"level * 20\">\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"node-item\"\r\n\t\t\t\t\t[class.has-children]=\"node.children && node.children.length > 0\"\r\n\t\t\t\t\t[class.is-page]=\"node.routerLink\"\r\n\t\t\t\t\t[routerLink]=\"node.routerLink\"\r\n\t\t\t\t\t(click)=\"!node.routerLink ? toggleNode(node) : (visible = false)\">\r\n\t\t\t\t\t<div class=\"node-content\">\r\n\t\t\t\t\t\t@if (node.children && node.children.length > 0) {\r\n\t\t\t\t\t\t\t<div class=\"toggle-btn\" (click)=\"$event.stopPropagation(); toggleNode(node)\">\r\n\t\t\t\t\t\t\t\t<i class=\"pi\" [class.pi-chevron-right]=\"!node.expanded\" [class.pi-chevron-down]=\"node.expanded\"></i>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t@if (node.icon) {\r\n\t\t\t\t\t\t\t<i class=\"node-icon\" [class]=\"node.icon\"></i>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t<span class=\"node-label\">{{ node.label | translateJson }}</span>\r\n\r\n\t\t\t\t\t\t@if (node.routerLink) {\r\n\t\t\t\t\t\t\t<i class=\"external-icon pi pi-external-link\"></i>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<!-- Recursive Children -->\r\n\t\t\t\t@if (node.children && node.expanded) {\r\n\t\t\t\t\t@for (child of node.children; track trackByKey($index, child)) {\r\n\t\t\t\t\t\t<ng-container\r\n\t\t\t\t\t\t\t*ngTemplateOutlet=\"treeNodeTemplate; context: { $implicit: child, level: level + 1 }\"></ng-container>\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t</div>\r\n</p-sidebar>\r\n", styles: [":host ::ng-deep .layout-sitemap-sidebar .p-sidebar-content{padding:0;background:var(--surface-ground)}:host ::ng-deep .layout-sitemap-sidebar .p-sidebar-header{background:var(--primary-color);color:var(--primary-color-text);border-bottom:1px solid var(--primary-600);padding:1rem .5rem}:host ::ng-deep .layout-sitemap-sidebar .p-sidebar-header span{font-size:1.1rem;font-weight:600}:host ::ng-deep .layout-sitemap-sidebar .p-sidebar-header .total-pages{background:#fff3;color:#ffffffe6;padding:.25rem .5rem;border-radius:12px;font-size:.75rem;font-weight:500}.sitemap-content{display:flex;flex-direction:column;height:90vh;background:var(--surface-ground)}.search-section{padding:1rem;border-bottom:1px solid var(--surface-border);background:var(--surface-0)}.quick-actions{display:flex;align-items:center;justify-content:flex-end;gap:.5rem;padding:.75rem 1rem;border-bottom:1px solid var(--surface-border);background:var(--surface-0)}.sitemap-tree{flex:1;overflow:hidden}.tree-container{padding:.5rem 0}.tree-node .node-item{display:flex;align-items:center;padding:.5rem 1rem;border-radius:6px;margin:.1rem .5rem;cursor:pointer;transition:all .2s ease;border:1px solid transparent}.tree-node .node-item:hover{background:var(--surface-hover);border-color:var(--surface-border)}.tree-node .node-item.is-page:hover{background:var(--primary-50);border-color:var(--primary-200)}.tree-node .node-item.is-page:hover .external-icon{opacity:1}.tree-node .node-item.has-children{font-weight:500}.tree-node .node-content{display:flex;align-items:center;gap:.5rem;width:100%;min-width:0}.tree-node .toggle-btn{display:flex;align-items:center;justify-content:center;width:20px;height:20px;background:transparent;border:none;border-radius:4px;color:var(--text-color-secondary);cursor:pointer;transition:all .2s ease;flex-shrink:0}.tree-node .toggle-btn:hover{background:var(--surface-hover);color:var(--primary-color)}.tree-node .toggle-btn i{font-size:.7rem}.tree-node .node-icon{color:var(--primary-color);font-size:.9rem;flex-shrink:0}.tree-node .node-label{flex:1;font-size:.9rem;color:var(--text-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tree-node .external-icon{color:var(--text-color-secondary);font-size:.7rem;opacity:.6;transition:opacity .2s ease;flex-shrink:0}.empty-state{flex:1;display:flex;align-items:center;justify-content:center;padding:2rem}.empty-content{text-align:center;max-width:300px}.empty-icon{font-size:3rem;color:var(--text-color-secondary);margin-bottom:1rem;opacity:.5}.empty-message{font-size:.9rem;color:var(--text-color-secondary);line-height:1.4;margin-bottom:1.5rem}:host ::ng-deep .p-scrollpanel-bar-y{background:var(--primary-200);width:4px;border-radius:2px}:host ::ng-deep .p-scrollpanel-bar-y:hover{background:var(--primary-300)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: SidebarModule }, { kind: "component", type: i6$1.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ScrollPanelModule }, { kind: "component", type: i7$1.ScrollPanel, selector: "p-scrollPanel", inputs: ["style", "styleClass", "step"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i9.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: ButtonComponent, selector: "aril-button:not([click])", inputs: ["label", "loading", "disabled", "raised", "outlined", "badge", "size", "icon", "color"], outputs: ["clickEvent"] }, { kind: "component", type: TextComponent, selector: "aril-text[ngModel], aril-text[formControl], aril-text[formControlName]", inputs: ["placeholder", "tabindex", "icon", "iconPos", "size"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i4.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoLang", "translocoLoadingTpl"] }, { kind: "pipe", type: TranslateJsonPipe, name: "translateJson" }] }); }
|
|
951
|
+
}
|
|
952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SiteMapSidebarComponent, decorators: [{
|
|
953
|
+
type: Component,
|
|
954
|
+
args: [{ standalone: true, selector: 'app-site-map-sidebar', imports: [
|
|
955
|
+
CommonModule,
|
|
956
|
+
FormsModule,
|
|
957
|
+
RouterModule,
|
|
958
|
+
SidebarModule,
|
|
959
|
+
ScrollPanelModule,
|
|
960
|
+
TooltipModule,
|
|
961
|
+
ButtonComponent,
|
|
962
|
+
TextComponent,
|
|
963
|
+
TranslocoModule,
|
|
964
|
+
TranslateJsonPipe
|
|
965
|
+
], template: "<p-sidebar\r\n\t[(visible)]=\"visible\"\r\n\tposition=\"right\"\r\n\t[transitionOptions]=\"'.3s cubic-bezier(0, 0, 0.2, 1)'\"\r\n\tstyleClass=\"layout-sitemap-sidebar w-full sm:w-30rem\"\r\n\t*transloco=\"let t; read: 'siteMap'\">\r\n\t<ng-template pTemplate=\"header\">\r\n\t\t<div class=\"flex align-items-center justify-content-between gap-2 w-full\">\r\n\t\t\t<div class=\"flex align-items-center gap-2\">\r\n\t\t\t\t<i class=\"pi pi-sitemap text-primary text-xl\"></i>\r\n\t\t\t\t<span class=\"font-bold text-lg\">{{ t('siteMap') }}</span>\r\n\t\t\t\t<span class=\"total-pages\">{{ totalPages() }} {{ t('pages') }}</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<div class=\"sitemap-content\">\r\n\t\t<div class=\"search-section\">\r\n\t\t\t<aril-text [placeholder]=\"t('searchPages')\" [(ngModel)]=\"searchTerm\" (ngModelChange)=\"onSearchChange()\">\r\n\t\t\t</aril-text>\r\n\t\t</div>\r\n\r\n\t\t@if (filteredNodes().length > 0) {\r\n\t\t\t<div class=\"quick-actions\">\r\n\t\t\t\t<aril-button\r\n\t\t\t\t\ticon=\"PLUS\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t\t[raised]=\"true\"\r\n\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t[pTooltip]=\"t('expandAll')\"\r\n\t\t\t\t\ttooltipPosition=\"top\"\r\n\t\t\t\t\t(clickEvent)=\"expandAll()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t\t<aril-button\r\n\t\t\t\t\ticon=\"MINUS\"\r\n\t\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t\t[raised]=\"false\"\r\n\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t[pTooltip]=\"t('collapseAll')\"\r\n\t\t\t\t\ttooltipPosition=\"top\"\r\n\t\t\t\t\t(clickEvent)=\"collapseAll()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t</div>\r\n\t\t}\r\n\r\n\t\t<!-- Site Map Tree -->\r\n\t\t@if (filteredNodes().length > 0) {\r\n\t\t\t<div class=\"sitemap-tree\">\r\n\t\t\t\t<p-scrollPanel [style]=\"{ width: '100%', height: '100%' }\">\r\n\t\t\t\t\t<div class=\"tree-container\">\r\n\t\t\t\t\t\t@for (node of filteredNodes(); track trackByKey($index, node)) {\r\n\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"treeNodeTemplate; context: { $implicit: node, level: 0 }\"></ng-container>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</p-scrollPanel>\r\n\t\t\t</div>\r\n\t\t} @else {\r\n\t\t\t<div class=\"empty-state\">\r\n\t\t\t\t<div class=\"empty-content\">\r\n\t\t\t\t\t<i class=\"pi pi-sitemap empty-icon\"></i>\r\n\t\t\t\t\t<h3 class=\"empty-title\">\r\n\t\t\t\t\t\t{{ searchTerm() ? t('noSearchResults') : t('noPages') }}\r\n\t\t\t\t\t</h3>\r\n\t\t\t\t\t<p class=\"empty-message\">\r\n\t\t\t\t\t\t{{ searchTerm() ? t('tryDifferentKeywords') : '' }}\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t@if (searchTerm()) {\r\n\t\t\t\t\t\t<aril-button\r\n\t\t\t\t\t\t\t[label]=\"t('clearSearch')\"\r\n\t\t\t\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t\t\t\tcolor=\"secondary\"\r\n\t\t\t\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\t\t(clickEvent)=\"searchTerm.set(''); onSearchChange()\">\r\n\t\t\t\t\t\t</aril-button>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t}\r\n\r\n\t\t<!-- Recursive Tree Node Template -->\r\n\t\t<ng-template #treeNodeTemplate let-node let-level=\"level\">\r\n\t\t\t<div class=\"tree-node\" [style.margin-left.px]=\"level * 20\">\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"node-item\"\r\n\t\t\t\t\t[class.has-children]=\"node.children && node.children.length > 0\"\r\n\t\t\t\t\t[class.is-page]=\"node.routerLink\"\r\n\t\t\t\t\t[routerLink]=\"node.routerLink\"\r\n\t\t\t\t\t(click)=\"!node.routerLink ? toggleNode(node) : (visible = false)\">\r\n\t\t\t\t\t<div class=\"node-content\">\r\n\t\t\t\t\t\t@if (node.children && node.children.length > 0) {\r\n\t\t\t\t\t\t\t<div class=\"toggle-btn\" (click)=\"$event.stopPropagation(); toggleNode(node)\">\r\n\t\t\t\t\t\t\t\t<i class=\"pi\" [class.pi-chevron-right]=\"!node.expanded\" [class.pi-chevron-down]=\"node.expanded\"></i>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t@if (node.icon) {\r\n\t\t\t\t\t\t\t<i class=\"node-icon\" [class]=\"node.icon\"></i>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t<span class=\"node-label\">{{ node.label | translateJson }}</span>\r\n\r\n\t\t\t\t\t\t@if (node.routerLink) {\r\n\t\t\t\t\t\t\t<i class=\"external-icon pi pi-external-link\"></i>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<!-- Recursive Children -->\r\n\t\t\t\t@if (node.children && node.expanded) {\r\n\t\t\t\t\t@for (child of node.children; track trackByKey($index, child)) {\r\n\t\t\t\t\t\t<ng-container\r\n\t\t\t\t\t\t\t*ngTemplateOutlet=\"treeNodeTemplate; context: { $implicit: child, level: level + 1 }\"></ng-container>\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t</div>\r\n</p-sidebar>\r\n", styles: [":host ::ng-deep .layout-sitemap-sidebar .p-sidebar-content{padding:0;background:var(--surface-ground)}:host ::ng-deep .layout-sitemap-sidebar .p-sidebar-header{background:var(--primary-color);color:var(--primary-color-text);border-bottom:1px solid var(--primary-600);padding:1rem .5rem}:host ::ng-deep .layout-sitemap-sidebar .p-sidebar-header span{font-size:1.1rem;font-weight:600}:host ::ng-deep .layout-sitemap-sidebar .p-sidebar-header .total-pages{background:#fff3;color:#ffffffe6;padding:.25rem .5rem;border-radius:12px;font-size:.75rem;font-weight:500}.sitemap-content{display:flex;flex-direction:column;height:90vh;background:var(--surface-ground)}.search-section{padding:1rem;border-bottom:1px solid var(--surface-border);background:var(--surface-0)}.quick-actions{display:flex;align-items:center;justify-content:flex-end;gap:.5rem;padding:.75rem 1rem;border-bottom:1px solid var(--surface-border);background:var(--surface-0)}.sitemap-tree{flex:1;overflow:hidden}.tree-container{padding:.5rem 0}.tree-node .node-item{display:flex;align-items:center;padding:.5rem 1rem;border-radius:6px;margin:.1rem .5rem;cursor:pointer;transition:all .2s ease;border:1px solid transparent}.tree-node .node-item:hover{background:var(--surface-hover);border-color:var(--surface-border)}.tree-node .node-item.is-page:hover{background:var(--primary-50);border-color:var(--primary-200)}.tree-node .node-item.is-page:hover .external-icon{opacity:1}.tree-node .node-item.has-children{font-weight:500}.tree-node .node-content{display:flex;align-items:center;gap:.5rem;width:100%;min-width:0}.tree-node .toggle-btn{display:flex;align-items:center;justify-content:center;width:20px;height:20px;background:transparent;border:none;border-radius:4px;color:var(--text-color-secondary);cursor:pointer;transition:all .2s ease;flex-shrink:0}.tree-node .toggle-btn:hover{background:var(--surface-hover);color:var(--primary-color)}.tree-node .toggle-btn i{font-size:.7rem}.tree-node .node-icon{color:var(--primary-color);font-size:.9rem;flex-shrink:0}.tree-node .node-label{flex:1;font-size:.9rem;color:var(--text-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tree-node .external-icon{color:var(--text-color-secondary);font-size:.7rem;opacity:.6;transition:opacity .2s ease;flex-shrink:0}.empty-state{flex:1;display:flex;align-items:center;justify-content:center;padding:2rem}.empty-content{text-align:center;max-width:300px}.empty-icon{font-size:3rem;color:var(--text-color-secondary);margin-bottom:1rem;opacity:.5}.empty-message{font-size:.9rem;color:var(--text-color-secondary);line-height:1.4;margin-bottom:1.5rem}:host ::ng-deep .p-scrollpanel-bar-y{background:var(--primary-200);width:4px;border-radius:2px}:host ::ng-deep .p-scrollpanel-bar-y:hover{background:var(--primary-300)}\n"] }]
|
|
966
|
+
}], ctorParameters: () => [{ type: LayoutService }, { type: i4.TranslocoService }] });
|
|
967
|
+
|
|
968
|
+
// API Endpoints
|
|
969
|
+
const favoritePageEndpoints = {
|
|
970
|
+
filter: 'favorite-pages/filter',
|
|
971
|
+
favorite: 'favorite-pages'
|
|
972
|
+
};
|
|
973
|
+
class FavoritePagesService extends RestClient {
|
|
974
|
+
constructor(router) {
|
|
975
|
+
super();
|
|
976
|
+
this.router = router;
|
|
977
|
+
this.states = {};
|
|
978
|
+
}
|
|
979
|
+
getCurrentRoutePath() {
|
|
980
|
+
return this.router.url;
|
|
981
|
+
}
|
|
982
|
+
navigateToFavoritePage(favorite) {
|
|
983
|
+
this.router.navigate([favorite.url]);
|
|
984
|
+
}
|
|
985
|
+
filterFavoritePages(post) {
|
|
986
|
+
return new Observable();
|
|
987
|
+
}
|
|
988
|
+
saveFavoritePage(post) {
|
|
989
|
+
return new Observable();
|
|
990
|
+
}
|
|
991
|
+
updateFavoritePage(id, post) {
|
|
992
|
+
return new Observable();
|
|
993
|
+
}
|
|
994
|
+
deleteFavoritePage(id) {
|
|
995
|
+
return new Observable();
|
|
996
|
+
}
|
|
997
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FavoritePagesService, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
998
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FavoritePagesService, providedIn: 'root' }); }
|
|
999
|
+
}
|
|
1000
|
+
__decorate([
|
|
1001
|
+
ServiceCall(HTTPMethods.POST, ProxyTypes.ClientSide, favoritePageEndpoints.filter)
|
|
1002
|
+
], FavoritePagesService.prototype, "filterFavoritePages", null);
|
|
1003
|
+
__decorate([
|
|
1004
|
+
ServiceCall(HTTPMethods.POST, ProxyTypes.ClientSide, favoritePageEndpoints.favorite)
|
|
1005
|
+
], FavoritePagesService.prototype, "saveFavoritePage", null);
|
|
1006
|
+
__decorate([
|
|
1007
|
+
ServiceCall(HTTPMethods.PUT, ProxyTypes.ClientSide, favoritePageEndpoints.favorite)
|
|
1008
|
+
], FavoritePagesService.prototype, "updateFavoritePage", null);
|
|
1009
|
+
__decorate([
|
|
1010
|
+
ServiceCall(HTTPMethods.DELETE, ProxyTypes.ClientSide, favoritePageEndpoints.favorite)
|
|
1011
|
+
], FavoritePagesService.prototype, "deleteFavoritePage", null);
|
|
1012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FavoritePagesService, decorators: [{
|
|
1013
|
+
type: Injectable,
|
|
1014
|
+
args: [{ providedIn: 'root' }]
|
|
1015
|
+
}], ctorParameters: () => [{ type: i1$1.Router }], propDecorators: { filterFavoritePages: [], saveFavoritePage: [], updateFavoritePage: [], deleteFavoritePage: [] } });
|
|
1016
|
+
|
|
1017
|
+
class AddEditFavoriteModalComponent {
|
|
1018
|
+
constructor(formBuilder, dialogRef, dialogConfig, favoritePagesService, messageService, translocoService) {
|
|
1019
|
+
this.formBuilder = formBuilder;
|
|
1020
|
+
this.dialogRef = dialogRef;
|
|
1021
|
+
this.dialogConfig = dialogConfig;
|
|
1022
|
+
this.favoritePagesService = favoritePagesService;
|
|
1023
|
+
this.messageService = messageService;
|
|
1024
|
+
this.translocoService = translocoService;
|
|
1025
|
+
this.subjects = {
|
|
1026
|
+
saveFavorite: new Subject(),
|
|
1027
|
+
updateFavorite: new Subject()
|
|
1028
|
+
};
|
|
1029
|
+
this.saveFavoriteService = toSignal(this.subjects.saveFavorite.pipe(switchMap((data) => this.favoritePagesService.saveFavoritePage(data))));
|
|
1030
|
+
this.updateFavoriteService = toSignal(this.subjects.updateFavorite.pipe(switchMap((data) => this.favoritePagesService.updateFavoritePage(this.modalData.favorite?.id, data))));
|
|
1031
|
+
this.modalData = this.dialogConfig.data;
|
|
1032
|
+
this.initializeEffects();
|
|
1033
|
+
this.initializeForm();
|
|
1034
|
+
}
|
|
1035
|
+
ngOnInit() {
|
|
1036
|
+
if (!this.modalData || !['add', 'edit'].includes(this.modalData.mode)) {
|
|
1037
|
+
this.dialogRef.close('error');
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
initializeEffects() {
|
|
1041
|
+
// Save favorite effect
|
|
1042
|
+
effect(() => {
|
|
1043
|
+
const service = this.saveFavoriteService();
|
|
1044
|
+
if (service?.response) {
|
|
1045
|
+
this.messageService.add({
|
|
1046
|
+
severity: 'success',
|
|
1047
|
+
summary: this.translocoService.translate('favoritePages.success'),
|
|
1048
|
+
detail: this.translocoService.translate('favoritePages.saveSuccessfully'),
|
|
1049
|
+
key: 'toast-root'
|
|
1050
|
+
});
|
|
1051
|
+
this.dialogRef.close({ status: 'success', data: service.response });
|
|
1052
|
+
}
|
|
1053
|
+
}, { allowSignalWrites: true });
|
|
1054
|
+
// Update favorite effect
|
|
1055
|
+
effect(() => {
|
|
1056
|
+
const service = this.updateFavoriteService();
|
|
1057
|
+
if (service?.response) {
|
|
1058
|
+
this.messageService.add({
|
|
1059
|
+
severity: 'success',
|
|
1060
|
+
summary: this.translocoService.translate('favoritePages.success'),
|
|
1061
|
+
detail: this.translocoService.translate('favoritePages.updatedSuccessfully'),
|
|
1062
|
+
key: 'toast-root'
|
|
1063
|
+
});
|
|
1064
|
+
this.dialogRef.close({ status: 'success', data: service.response });
|
|
1065
|
+
}
|
|
1066
|
+
}, { allowSignalWrites: true });
|
|
1067
|
+
}
|
|
1068
|
+
initializeForm() {
|
|
1069
|
+
if (this.modalData.mode === 'add') {
|
|
1070
|
+
this.favoriteForm = this.formBuilder.group({
|
|
1071
|
+
label: ['', [Validators.required, Validators.minLength(1), Validators.maxLength(100)]],
|
|
1072
|
+
url: [{ value: this.modalData.url || '', disabled: true }]
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
else if (this.modalData.mode === 'edit' && this.modalData.favorite) {
|
|
1076
|
+
this.favoriteForm = this.formBuilder.group({
|
|
1077
|
+
label: [
|
|
1078
|
+
this.modalData.favorite.label,
|
|
1079
|
+
[Validators.required, Validators.minLength(1), Validators.maxLength(100)]
|
|
1080
|
+
],
|
|
1081
|
+
url: [{ value: this.modalData.favorite.url, disabled: true }]
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
get isAddMode() {
|
|
1086
|
+
return this.modalData.mode === 'add';
|
|
1087
|
+
}
|
|
1088
|
+
get isEditMode() {
|
|
1089
|
+
return this.modalData.mode === 'edit';
|
|
1090
|
+
}
|
|
1091
|
+
submit() {
|
|
1092
|
+
const formValue = this.favoriteForm.value;
|
|
1093
|
+
if (this.isAddMode) {
|
|
1094
|
+
const saveRequest = {
|
|
1095
|
+
url: this.modalData.url,
|
|
1096
|
+
label: formValue.label.trim()
|
|
1097
|
+
};
|
|
1098
|
+
this.subjects.saveFavorite.next(saveRequest);
|
|
1099
|
+
}
|
|
1100
|
+
else if (this.isEditMode && this.modalData.favorite) {
|
|
1101
|
+
const updateRequest = {
|
|
1102
|
+
label: formValue.label.trim(),
|
|
1103
|
+
url: this.modalData.url,
|
|
1104
|
+
version: this.modalData.favorite.version
|
|
1105
|
+
};
|
|
1106
|
+
this.subjects.updateFavorite.next(updateRequest);
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
cancel() {
|
|
1110
|
+
this.dialogRef.close('cancel');
|
|
1111
|
+
}
|
|
1112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AddEditFavoriteModalComponent, deps: [{ token: i1.FormBuilder }, { token: i2.DynamicDialogRef }, { token: i2.DynamicDialogConfig }, { token: FavoritePagesService }, { token: i3.MessageService }, { token: i4.TranslocoService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1113
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: AddEditFavoriteModalComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<div *transloco=\"let t; read: 'favoritePages'\">\r\n\t<aril-form [formGroup]=\"favoriteForm\">\r\n\t\t<aril-field [label]=\"t('label')\" [cols]=\"{ xl: 12, lg: 12, md: 12, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<aril-text formControlName=\"label\" [placeholder]=\"t('labelPlaceholder')\"> </aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('path')\" [cols]=\"{ xl: 12, lg: 12, md: 12, sm: 12 }\">\r\n\t\t\t<aril-text formControlName=\"url\"> </aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<div class=\"col-12 flex justify-content-end mt-4 gap-2\">\r\n\t\t\t<aril-button\r\n\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t[label]=\"t('cancel')\"\r\n\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t(clickEvent)=\"cancel()\">\r\n\t\t\t</aril-button>\r\n\t\t\t<aril-form-submit\r\n\t\t\t\t[label]=\"t('save')\"\r\n\t\t\t\tcolor=\"success\"\r\n\t\t\t\ticon=\"CHECK\"\r\n\t\t\t\t[formGroup]=\"favoriteForm\"\r\n\t\t\t\t(validEvent)=\"submit()\" />\r\n\t\t</div>\r\n\t</aril-form>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ARiLFormModule }, { kind: "component", type: i6.FormComponent, selector: "aril-form", inputs: ["formGroup"] }, { kind: "component", type: i6.FormSubmitButtonComponent, selector: "aril-form-submit:not([click])", inputs: ["formGroup"], outputs: ["validEvent", "inValidEvent"] }, { kind: "component", type: FieldComponent, selector: "aril-field", inputs: ["label", "color", "labelWidth", "valueWidth", "labelPos", "markAsRequired", "cols", "infoData"] }, { kind: "component", type: TextComponent, selector: "aril-text[ngModel], aril-text[formControl], aril-text[formControlName]", inputs: ["placeholder", "tabindex", "icon", "iconPos", "size"] }, { kind: "component", type: ButtonComponent, selector: "aril-button:not([click])", inputs: ["label", "loading", "disabled", "raised", "outlined", "badge", "size", "icon", "color"], outputs: ["clickEvent"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i4.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoLang", "translocoLoadingTpl"] }] }); }
|
|
1114
|
+
}
|
|
1115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AddEditFavoriteModalComponent, decorators: [{
|
|
1116
|
+
type: Component,
|
|
1117
|
+
args: [{ standalone: true, imports: [
|
|
1118
|
+
CommonModule,
|
|
1119
|
+
ReactiveFormsModule,
|
|
1120
|
+
FormsModule,
|
|
1121
|
+
ARiLFormModule,
|
|
1122
|
+
FieldComponent,
|
|
1123
|
+
TextComponent,
|
|
1124
|
+
ButtonComponent,
|
|
1125
|
+
TranslocoModule
|
|
1126
|
+
], template: "<div *transloco=\"let t; read: 'favoritePages'\">\r\n\t<aril-form [formGroup]=\"favoriteForm\">\r\n\t\t<aril-field [label]=\"t('label')\" [cols]=\"{ xl: 12, lg: 12, md: 12, sm: 12 }\" [markAsRequired]=\"true\">\r\n\t\t\t<aril-text formControlName=\"label\" [placeholder]=\"t('labelPlaceholder')\"> </aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<aril-field [label]=\"t('path')\" [cols]=\"{ xl: 12, lg: 12, md: 12, sm: 12 }\">\r\n\t\t\t<aril-text formControlName=\"url\"> </aril-text>\r\n\t\t</aril-field>\r\n\r\n\t\t<div class=\"col-12 flex justify-content-end mt-4 gap-2\">\r\n\t\t\t<aril-button\r\n\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t[label]=\"t('cancel')\"\r\n\t\t\t\t[outlined]=\"true\"\r\n\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t(clickEvent)=\"cancel()\">\r\n\t\t\t</aril-button>\r\n\t\t\t<aril-form-submit\r\n\t\t\t\t[label]=\"t('save')\"\r\n\t\t\t\tcolor=\"success\"\r\n\t\t\t\ticon=\"CHECK\"\r\n\t\t\t\t[formGroup]=\"favoriteForm\"\r\n\t\t\t\t(validEvent)=\"submit()\" />\r\n\t\t</div>\r\n\t</aril-form>\r\n</div>\r\n" }]
|
|
1127
|
+
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.DynamicDialogRef }, { type: i2.DynamicDialogConfig }, { type: FavoritePagesService }, { type: i3.MessageService }, { type: i4.TranslocoService }] });
|
|
1128
|
+
|
|
1129
|
+
class FavoritePagesSidebarComponent {
|
|
1130
|
+
constructor(layoutService, favoritePagesService, confirmationService, messageService, dialogService, translocoService) {
|
|
1131
|
+
this.layoutService = layoutService;
|
|
1132
|
+
this.favoritePagesService = favoritePagesService;
|
|
1133
|
+
this.confirmationService = confirmationService;
|
|
1134
|
+
this.messageService = messageService;
|
|
1135
|
+
this.dialogService = dialogService;
|
|
1136
|
+
this.translocoService = translocoService;
|
|
1137
|
+
this.favoritePages = signal([]);
|
|
1138
|
+
this.allFavoritePages = signal([]);
|
|
1139
|
+
this.isCurrentPageFavorited = signal(false);
|
|
1140
|
+
this.currentPage = signal(1);
|
|
1141
|
+
this.pageSize = signal(10);
|
|
1142
|
+
this.totalItems = signal(0);
|
|
1143
|
+
this.totalPages = signal(0);
|
|
1144
|
+
this.subjects = {
|
|
1145
|
+
loadAllFavorites: new Subject(),
|
|
1146
|
+
deleteFavorite: new Subject()
|
|
1147
|
+
};
|
|
1148
|
+
this.loadAllFavoritesService = toSignal(this.subjects.loadAllFavorites.pipe(switchMap(() => this.favoritePagesService.filterFavoritePages({
|
|
1149
|
+
pageSize: 1000,
|
|
1150
|
+
pageNumber: 1,
|
|
1151
|
+
sortFieldName: 'label',
|
|
1152
|
+
sortDirection: 1
|
|
1153
|
+
}))));
|
|
1154
|
+
this.deleteFavoriteService = toSignal(this.subjects.deleteFavorite.pipe(switchMap((id) => this.favoritePagesService.deleteFavoritePage(id))));
|
|
1155
|
+
this.initializeEffects();
|
|
1156
|
+
}
|
|
1157
|
+
ngOnInit() {
|
|
1158
|
+
this.loadFavoritePages();
|
|
1159
|
+
this.checkCurrentPageStatus();
|
|
1160
|
+
}
|
|
1161
|
+
initializeEffects() {
|
|
1162
|
+
effect(() => {
|
|
1163
|
+
const service = this.loadAllFavoritesService();
|
|
1164
|
+
if (service?.response) {
|
|
1165
|
+
this.allFavoritePages.set(service.response.result);
|
|
1166
|
+
this.totalItems.set(service.response.result.length);
|
|
1167
|
+
this.updateClientSidePagination();
|
|
1168
|
+
this.checkCurrentPageStatus();
|
|
1169
|
+
}
|
|
1170
|
+
}, { allowSignalWrites: true });
|
|
1171
|
+
effect(() => {
|
|
1172
|
+
const service = this.deleteFavoriteService();
|
|
1173
|
+
if (service?.response) {
|
|
1174
|
+
this.loadFavoritePages();
|
|
1175
|
+
this.messageService.add({
|
|
1176
|
+
severity: 'success',
|
|
1177
|
+
summary: this.translocoService.translate('favoritePages.success'),
|
|
1178
|
+
detail: this.translocoService.translate('favoritePages.deletedSuccessfully'),
|
|
1179
|
+
key: 'toast-root'
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
}, { allowSignalWrites: true });
|
|
1183
|
+
}
|
|
1184
|
+
get visible() {
|
|
1185
|
+
return this.layoutService.state.favoritePagesSidebarVisible;
|
|
1186
|
+
}
|
|
1187
|
+
set visible(value) {
|
|
1188
|
+
this.layoutService.state.favoritePagesSidebarVisible = value;
|
|
1189
|
+
if (value) {
|
|
1190
|
+
this.checkCurrentPageStatus();
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
loadFavoritePages() {
|
|
1194
|
+
this.subjects.loadAllFavorites.next();
|
|
1195
|
+
}
|
|
1196
|
+
updateClientSidePagination() {
|
|
1197
|
+
const allFavorites = this.allFavoritePages();
|
|
1198
|
+
const totalItems = allFavorites.length;
|
|
1199
|
+
const pageSize = this.pageSize();
|
|
1200
|
+
const currentPage = this.currentPage();
|
|
1201
|
+
const totalPages = Math.ceil(totalItems / pageSize);
|
|
1202
|
+
this.totalPages.set(totalPages);
|
|
1203
|
+
const startIndex = (currentPage - 1) * pageSize;
|
|
1204
|
+
const endIndex = Math.min(startIndex + pageSize, totalItems);
|
|
1205
|
+
const currentPageData = allFavorites.slice(startIndex, endIndex);
|
|
1206
|
+
this.favoritePages.set(currentPageData);
|
|
1207
|
+
}
|
|
1208
|
+
checkCurrentPageStatus() {
|
|
1209
|
+
const currentPath = this.favoritePagesService.getCurrentRoutePath();
|
|
1210
|
+
const allFavorites = this.allFavoritePages();
|
|
1211
|
+
const isFound = allFavorites.some((fav) => fav.url === currentPath);
|
|
1212
|
+
this.isCurrentPageFavorited.set(isFound);
|
|
1213
|
+
}
|
|
1214
|
+
addCurrentPageToFavorites() {
|
|
1215
|
+
const currentPath = this.favoritePagesService.getCurrentRoutePath();
|
|
1216
|
+
const ref = this.dialogService.open(AddEditFavoriteModalComponent, {
|
|
1217
|
+
header: this.translocoService.translate('favoritePages.addToFavorites'),
|
|
1218
|
+
width: '500px',
|
|
1219
|
+
modal: true,
|
|
1220
|
+
closable: true,
|
|
1221
|
+
data: {
|
|
1222
|
+
mode: 'add',
|
|
1223
|
+
url: currentPath
|
|
1224
|
+
}
|
|
1225
|
+
});
|
|
1226
|
+
ref.onClose.subscribe((result) => {
|
|
1227
|
+
if (result?.status === 'success') {
|
|
1228
|
+
this.loadFavoritePages();
|
|
1229
|
+
}
|
|
1230
|
+
});
|
|
1231
|
+
}
|
|
1232
|
+
removeCurrentPageFromFavorites() {
|
|
1233
|
+
const currentPath = this.favoritePagesService.getCurrentRoutePath();
|
|
1234
|
+
const favorites = this.favoritePages();
|
|
1235
|
+
const currentFavorite = favorites.find((fav) => fav.url === currentPath);
|
|
1236
|
+
if (currentFavorite) {
|
|
1237
|
+
this.confirmationService.confirm({
|
|
1238
|
+
message: this.translocoService.translate('favoritePages.confirmDelete'),
|
|
1239
|
+
header: this.translocoService.translate('favoritePages.deleteConfirmTitle'),
|
|
1240
|
+
icon: 'pi pi-info-circle',
|
|
1241
|
+
acceptLabel: this.translocoService.translate('acceptButtonLabel'),
|
|
1242
|
+
rejectLabel: this.translocoService.translate('rejectButtonLabel'),
|
|
1243
|
+
acceptButtonStyleClass: 'p-button-success',
|
|
1244
|
+
rejectButtonStyleClass: 'p-button-danger p-button-outlined',
|
|
1245
|
+
accept: () => {
|
|
1246
|
+
this.subjects.deleteFavorite.next(currentFavorite.id);
|
|
1247
|
+
}
|
|
1248
|
+
});
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
editFavorite(favorite, event) {
|
|
1252
|
+
event.stopPropagation();
|
|
1253
|
+
const ref = this.dialogService.open(AddEditFavoriteModalComponent, {
|
|
1254
|
+
header: this.translocoService.translate('favoritePages.editFavorite'),
|
|
1255
|
+
width: '500px',
|
|
1256
|
+
modal: true,
|
|
1257
|
+
closable: true,
|
|
1258
|
+
data: {
|
|
1259
|
+
mode: 'edit',
|
|
1260
|
+
favorite: favorite
|
|
1261
|
+
}
|
|
1262
|
+
});
|
|
1263
|
+
ref.onClose.subscribe((result) => {
|
|
1264
|
+
if (result?.status === 'success') {
|
|
1265
|
+
this.loadFavoritePages();
|
|
1266
|
+
}
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
deleteFavorite(favorite, event) {
|
|
1270
|
+
event.stopPropagation();
|
|
1271
|
+
this.confirmationService.confirm({
|
|
1272
|
+
target: event.target,
|
|
1273
|
+
message: this.translocoService.translate('favoritePages.confirmDelete', { label: favorite.label }),
|
|
1274
|
+
header: this.translocoService.translate('favoritePages.deleteConfirmTitle'),
|
|
1275
|
+
icon: 'pi pi-info-circle',
|
|
1276
|
+
acceptLabel: this.translocoService.translate('acceptButtonLabel'),
|
|
1277
|
+
rejectLabel: this.translocoService.translate('rejectButtonLabel'),
|
|
1278
|
+
acceptButtonStyleClass: 'p-button-success',
|
|
1279
|
+
rejectButtonStyleClass: 'p-button-danger p-button-outlined',
|
|
1280
|
+
accept: () => {
|
|
1281
|
+
this.subjects.deleteFavorite.next(favorite.id);
|
|
1282
|
+
}
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
navigateToFavorite(favorite) {
|
|
1286
|
+
this.favoritePagesService.navigateToFavoritePage(favorite);
|
|
1287
|
+
this.visible = false;
|
|
1288
|
+
}
|
|
1289
|
+
trackByFavoriteId(index, favorite) {
|
|
1290
|
+
return favorite.id;
|
|
1291
|
+
}
|
|
1292
|
+
onPageChange(event) {
|
|
1293
|
+
this.currentPage.set(event.page + 1);
|
|
1294
|
+
this.pageSize.set(event.rows);
|
|
1295
|
+
this.updateClientSidePagination(); // Update pagination client-side, no API call
|
|
1296
|
+
}
|
|
1297
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FavoritePagesSidebarComponent, deps: [{ token: LayoutService }, { token: FavoritePagesService }, { token: i3.ConfirmationService }, { token: i3.MessageService }, { token: i2.DialogService }, { token: i4.TranslocoService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1298
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: FavoritePagesSidebarComponent, isStandalone: true, selector: "app-favorite-pages-sidebar", providers: [ConfirmationService, DialogService], ngImport: i0, template: "<p-sidebar\r\n\t[(visible)]=\"visible\"\r\n\tposition=\"right\"\r\n\t[transitionOptions]=\"'.3s cubic-bezier(0, 0, 0.2, 1)'\"\r\n\tstyleClass=\"layout-favorite-pages-sidebar w-full sm:w-30rem\"\r\n\t*transloco=\"let t; read: 'favoritePages'\">\r\n\t<ng-template pTemplate=\"header\">\r\n\t\t<div class=\"flex align-items-center justify-content-between w-full\">\r\n\t\t\t<div class=\"flex align-items-center\">\r\n\t\t\t\t<i class=\"pi pi-heart text-primary text-xl\"></i>\r\n\t\t\t\t<span class=\"font-bold text-lg\">{{ t('favoritePages') }}</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<div class=\"favorite-pages-content\">\r\n\t\t@if (isCurrentPageFavorited()) {\r\n\t\t\t<div class=\"current-favorited-message\">\r\n\t\t\t\t<div class=\"message-content\">\r\n\t\t\t\t\t<i class=\"pi pi-check-circle text-green-500\"></i>\r\n\t\t\t\t\t<span>{{ t('currentPageFavorited') }}</span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t}\r\n\r\n\t\t<div class=\"add-section\">\r\n\t\t\t@if (!isCurrentPageFavorited()) {\r\n\t\t\t\t<aril-button\r\n\t\t\t\t\t[label]=\"t('addCurrentPage')\"\r\n\t\t\t\t\ticon=\"PLUS\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t(clickEvent)=\"addCurrentPageToFavorites()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t} @else {\r\n\t\t\t\t<aril-button\r\n\t\t\t\t\t[label]=\"t('removeCurrentPage')\"\r\n\t\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t(clickEvent)=\"removeCurrentPageFromFavorites()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t}\r\n\t\t</div>\r\n\r\n\t\t@if (favoritePages().length > 0) {\r\n\t\t\t<div class=\"favorites-list\">\r\n\t\t\t\t<p-scrollPanel [style]=\"{ width: '100%', height: '100%' }\">\r\n\t\t\t\t\t<div class=\"favorites-items\">\r\n\t\t\t\t\t\t@for (favorite of favoritePages(); track trackByFavoriteId($index, favorite)) {\r\n\t\t\t\t\t\t\t<div class=\"favorite-item\" [class.default-item]=\"favorite.id < 0\" (click)=\"navigateToFavorite(favorite)\">\r\n\t\t\t\t\t\t\t\t<div class=\"item-content\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"item-header\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"item-title\">\r\n\t\t\t\t\t\t\t\t\t\t\t<i class=\"pi pi-external-link text-primary mr-2\"></i>\r\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"title-text\">{{ favorite.label }}</span>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t<aril-button\r\n\t\t\t\t\t\t\t\t\t\t\ticon=\"PENCIL\"\r\n\t\t\t\t\t\t\t\t\t\t\tcolor=\"warning\"\r\n\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"mr-1\"\r\n\t\t\t\t\t\t\t\t\t\t\t[pTooltip]=\"t('editFavorite')\"\r\n\t\t\t\t\t\t\t\t\t\t\ttooltipPosition=\"left\"\r\n\t\t\t\t\t\t\t\t\t\t\t(clickEvent)=\"editFavorite(favorite, $event)\">\r\n\t\t\t\t\t\t\t\t\t\t</aril-button>\r\n\t\t\t\t\t\t\t\t\t\t<aril-button\r\n\t\t\t\t\t\t\t\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t\t\t\t\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\t\t\t\t\t\t[pTooltip]=\"t('deleteFavorite')\"\r\n\t\t\t\t\t\t\t\t\t\t\ttooltipPosition=\"left\"\r\n\t\t\t\t\t\t\t\t\t\t\t(clickEvent)=\"deleteFavorite(favorite, $event)\">\r\n\t\t\t\t\t\t\t\t\t\t</aril-button>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</p-scrollPanel>\r\n\t\t\t</div>\r\n\t\t} @else {\r\n\t\t\t<div class=\"empty-state\">\r\n\t\t\t\t<div class=\"empty-content\">\r\n\t\t\t\t\t<i class=\"pi pi-heart empty-icon\"></i>\r\n\t\t\t\t\t<h3 class=\"empty-title\">{{ t('noFavorites') }}</h3>\r\n\t\t\t\t\t<p class=\"empty-message\">{{ t('startAddingFavorites') }}</p>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t}\r\n\t\t<div>\r\n\t\t\t<p-paginator\r\n\t\t\t\t[first]=\"(currentPage() - 1) * pageSize()\"\r\n\t\t\t\t[rows]=\"pageSize()\"\r\n\t\t\t\t[totalRecords]=\"totalItems()\"\r\n\t\t\t\t[showCurrentPageReport]=\"true\"\r\n\t\t\t\t[currentPageReportTemplate]=\"t('paginatorTemplate')\"\r\n\t\t\t\t[showFirstLastIcon]=\"false\"\r\n\t\t\t\t[showPageLinks]=\"false\"\r\n\t\t\t\t(onPageChange)=\"onPageChange($event)\">\r\n\t\t\t</p-paginator>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<p-confirmDialog></p-confirmDialog>\r\n</p-sidebar>\r\n", styles: [":host ::ng-deep .layout-favorite-pages-sidebar .p-sidebar-content{padding:0;background:var(--surface-ground)}:host ::ng-deep .layout-favorite-pages-sidebar .p-sidebar-header{background:var(--primary-color);color:var(--primary-color-text);border-bottom:1px solid var(--primary-600);padding:1rem 1.5rem}:host ::ng-deep .layout-favorite-pages-sidebar .p-sidebar-header span{font-size:1.1rem;font-weight:600}.favorite-pages-content{display:flex;flex-direction:column;height:92vh;background:var(--surface-0)}.current-favorited-message{padding:1rem;border-bottom:1px solid var(--surface-border);background:var(--green-50)}.current-favorited-message .message-content{display:flex;align-items:center;gap:.5rem;color:var(--green-700);font-size:.9rem;font-weight:500}.add-section{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--surface-border);background:var(--surface-0)}.favorites-list{flex:1;overflow:hidden}.favorites-items{padding:.5rem}.favorite-item{background:var(--surface-0);border:1px solid var(--surface-border);border-radius:8px;margin-bottom:.5rem;cursor:pointer;transition:all .2s ease;position:relative;overflow:hidden}.favorite-item:hover{border-color:var(--primary-200);background:var(--primary-50);transform:translateY(-1px);box-shadow:0 2px 8px #0000001a}.favorite-item:hover .action-btn{opacity:1}.favorite-item:last-child{margin-bottom:0}.favorite-item.default-item{background:var(--blue-50);border-left:3px solid var(--blue-500)}.favorite-item.default-item:hover{background:var(--blue-100);border-color:var(--blue-300)}.favorite-item.default-item .title-text{font-weight:600;color:var(--blue-700)}.item-content{padding:.5rem .75rem}.item-header{display:flex;align-items:center;justify-content:space-between}.item-title{display:flex;align-items:center;flex:1;min-width:0}.item-title .title-text{font-weight:600;color:var(--text-color);font-size:1rem;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty-state{flex:1;display:flex;align-items:center;justify-content:center;padding:2rem}.empty-content{text-align:center;max-width:300px}.empty-content .empty-icon{font-size:3rem;color:var(--text-color-secondary);margin-bottom:1rem;opacity:.5}.empty-content .empty-title{font-size:1.1rem;font-weight:600;color:var(--text-color);margin-bottom:.5rem}.empty-content .empty-message{font-size:.9rem;color:var(--text-color-secondary);line-height:1.4;margin-bottom:1.5rem}@media (max-width: 768px){.add-section{padding:.75rem}.add-section .button-label{font-size:.8rem}.item-content{padding:.5rem}.item-title .title-text{font-size:.85rem}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: SidebarModule }, { kind: "component", type: i6$1.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ScrollPanelModule }, { kind: "component", type: i7$1.ScrollPanel, selector: "p-scrollPanel", inputs: ["style", "styleClass", "step"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i8.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "ngmodule", type: PaginatorModule }, { kind: "component", type: i9$1.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first"], outputs: ["onPageChange"] }, { kind: "ngmodule", type: DynamicDialogModule }, { kind: "component", type: ButtonComponent, selector: "aril-button:not([click])", inputs: ["label", "loading", "disabled", "raised", "outlined", "badge", "size", "icon", "color"], outputs: ["clickEvent"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i4.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i9.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] }); }
|
|
1299
|
+
}
|
|
1300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FavoritePagesSidebarComponent, decorators: [{
|
|
1301
|
+
type: Component,
|
|
1302
|
+
args: [{ standalone: true, selector: 'app-favorite-pages-sidebar', imports: [
|
|
1303
|
+
CommonModule,
|
|
1304
|
+
SidebarModule,
|
|
1305
|
+
ScrollPanelModule,
|
|
1306
|
+
ConfirmDialogModule,
|
|
1307
|
+
PaginatorModule,
|
|
1308
|
+
DynamicDialogModule,
|
|
1309
|
+
ButtonComponent,
|
|
1310
|
+
TranslocoModule,
|
|
1311
|
+
TooltipModule
|
|
1312
|
+
], providers: [ConfirmationService, DialogService], template: "<p-sidebar\r\n\t[(visible)]=\"visible\"\r\n\tposition=\"right\"\r\n\t[transitionOptions]=\"'.3s cubic-bezier(0, 0, 0.2, 1)'\"\r\n\tstyleClass=\"layout-favorite-pages-sidebar w-full sm:w-30rem\"\r\n\t*transloco=\"let t; read: 'favoritePages'\">\r\n\t<ng-template pTemplate=\"header\">\r\n\t\t<div class=\"flex align-items-center justify-content-between w-full\">\r\n\t\t\t<div class=\"flex align-items-center\">\r\n\t\t\t\t<i class=\"pi pi-heart text-primary text-xl\"></i>\r\n\t\t\t\t<span class=\"font-bold text-lg\">{{ t('favoritePages') }}</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<div class=\"favorite-pages-content\">\r\n\t\t@if (isCurrentPageFavorited()) {\r\n\t\t\t<div class=\"current-favorited-message\">\r\n\t\t\t\t<div class=\"message-content\">\r\n\t\t\t\t\t<i class=\"pi pi-check-circle text-green-500\"></i>\r\n\t\t\t\t\t<span>{{ t('currentPageFavorited') }}</span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t}\r\n\r\n\t\t<div class=\"add-section\">\r\n\t\t\t@if (!isCurrentPageFavorited()) {\r\n\t\t\t\t<aril-button\r\n\t\t\t\t\t[label]=\"t('addCurrentPage')\"\r\n\t\t\t\t\ticon=\"PLUS\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t(clickEvent)=\"addCurrentPageToFavorites()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t} @else {\r\n\t\t\t\t<aril-button\r\n\t\t\t\t\t[label]=\"t('removeCurrentPage')\"\r\n\t\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t(clickEvent)=\"removeCurrentPageFromFavorites()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t}\r\n\t\t</div>\r\n\r\n\t\t@if (favoritePages().length > 0) {\r\n\t\t\t<div class=\"favorites-list\">\r\n\t\t\t\t<p-scrollPanel [style]=\"{ width: '100%', height: '100%' }\">\r\n\t\t\t\t\t<div class=\"favorites-items\">\r\n\t\t\t\t\t\t@for (favorite of favoritePages(); track trackByFavoriteId($index, favorite)) {\r\n\t\t\t\t\t\t\t<div class=\"favorite-item\" [class.default-item]=\"favorite.id < 0\" (click)=\"navigateToFavorite(favorite)\">\r\n\t\t\t\t\t\t\t\t<div class=\"item-content\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"item-header\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"item-title\">\r\n\t\t\t\t\t\t\t\t\t\t\t<i class=\"pi pi-external-link text-primary mr-2\"></i>\r\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"title-text\">{{ favorite.label }}</span>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t<aril-button\r\n\t\t\t\t\t\t\t\t\t\t\ticon=\"PENCIL\"\r\n\t\t\t\t\t\t\t\t\t\t\tcolor=\"warning\"\r\n\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"mr-1\"\r\n\t\t\t\t\t\t\t\t\t\t\t[pTooltip]=\"t('editFavorite')\"\r\n\t\t\t\t\t\t\t\t\t\t\ttooltipPosition=\"left\"\r\n\t\t\t\t\t\t\t\t\t\t\t(clickEvent)=\"editFavorite(favorite, $event)\">\r\n\t\t\t\t\t\t\t\t\t\t</aril-button>\r\n\t\t\t\t\t\t\t\t\t\t<aril-button\r\n\t\t\t\t\t\t\t\t\t\t\ticon=\"TIMES\"\r\n\t\t\t\t\t\t\t\t\t\t\tcolor=\"danger\"\r\n\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\t\t\t\t\t\t[pTooltip]=\"t('deleteFavorite')\"\r\n\t\t\t\t\t\t\t\t\t\t\ttooltipPosition=\"left\"\r\n\t\t\t\t\t\t\t\t\t\t\t(clickEvent)=\"deleteFavorite(favorite, $event)\">\r\n\t\t\t\t\t\t\t\t\t\t</aril-button>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</p-scrollPanel>\r\n\t\t\t</div>\r\n\t\t} @else {\r\n\t\t\t<div class=\"empty-state\">\r\n\t\t\t\t<div class=\"empty-content\">\r\n\t\t\t\t\t<i class=\"pi pi-heart empty-icon\"></i>\r\n\t\t\t\t\t<h3 class=\"empty-title\">{{ t('noFavorites') }}</h3>\r\n\t\t\t\t\t<p class=\"empty-message\">{{ t('startAddingFavorites') }}</p>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t}\r\n\t\t<div>\r\n\t\t\t<p-paginator\r\n\t\t\t\t[first]=\"(currentPage() - 1) * pageSize()\"\r\n\t\t\t\t[rows]=\"pageSize()\"\r\n\t\t\t\t[totalRecords]=\"totalItems()\"\r\n\t\t\t\t[showCurrentPageReport]=\"true\"\r\n\t\t\t\t[currentPageReportTemplate]=\"t('paginatorTemplate')\"\r\n\t\t\t\t[showFirstLastIcon]=\"false\"\r\n\t\t\t\t[showPageLinks]=\"false\"\r\n\t\t\t\t(onPageChange)=\"onPageChange($event)\">\r\n\t\t\t</p-paginator>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<p-confirmDialog></p-confirmDialog>\r\n</p-sidebar>\r\n", styles: [":host ::ng-deep .layout-favorite-pages-sidebar .p-sidebar-content{padding:0;background:var(--surface-ground)}:host ::ng-deep .layout-favorite-pages-sidebar .p-sidebar-header{background:var(--primary-color);color:var(--primary-color-text);border-bottom:1px solid var(--primary-600);padding:1rem 1.5rem}:host ::ng-deep .layout-favorite-pages-sidebar .p-sidebar-header span{font-size:1.1rem;font-weight:600}.favorite-pages-content{display:flex;flex-direction:column;height:92vh;background:var(--surface-0)}.current-favorited-message{padding:1rem;border-bottom:1px solid var(--surface-border);background:var(--green-50)}.current-favorited-message .message-content{display:flex;align-items:center;gap:.5rem;color:var(--green-700);font-size:.9rem;font-weight:500}.add-section{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--surface-border);background:var(--surface-0)}.favorites-list{flex:1;overflow:hidden}.favorites-items{padding:.5rem}.favorite-item{background:var(--surface-0);border:1px solid var(--surface-border);border-radius:8px;margin-bottom:.5rem;cursor:pointer;transition:all .2s ease;position:relative;overflow:hidden}.favorite-item:hover{border-color:var(--primary-200);background:var(--primary-50);transform:translateY(-1px);box-shadow:0 2px 8px #0000001a}.favorite-item:hover .action-btn{opacity:1}.favorite-item:last-child{margin-bottom:0}.favorite-item.default-item{background:var(--blue-50);border-left:3px solid var(--blue-500)}.favorite-item.default-item:hover{background:var(--blue-100);border-color:var(--blue-300)}.favorite-item.default-item .title-text{font-weight:600;color:var(--blue-700)}.item-content{padding:.5rem .75rem}.item-header{display:flex;align-items:center;justify-content:space-between}.item-title{display:flex;align-items:center;flex:1;min-width:0}.item-title .title-text{font-weight:600;color:var(--text-color);font-size:1rem;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty-state{flex:1;display:flex;align-items:center;justify-content:center;padding:2rem}.empty-content{text-align:center;max-width:300px}.empty-content .empty-icon{font-size:3rem;color:var(--text-color-secondary);margin-bottom:1rem;opacity:.5}.empty-content .empty-title{font-size:1.1rem;font-weight:600;color:var(--text-color);margin-bottom:.5rem}.empty-content .empty-message{font-size:.9rem;color:var(--text-color-secondary);line-height:1.4;margin-bottom:1.5rem}@media (max-width: 768px){.add-section{padding:.75rem}.add-section .button-label{font-size:.8rem}.item-content{padding:.5rem}.item-title .title-text{font-size:.85rem}}\n"] }]
|
|
1313
|
+
}], ctorParameters: () => [{ type: LayoutService }, { type: FavoritePagesService }, { type: i3.ConfirmationService }, { type: i3.MessageService }, { type: i2.DialogService }, { type: i4.TranslocoService }] });
|
|
212
1314
|
|
|
213
1315
|
class AppMenuService {
|
|
214
1316
|
constructor() {
|
|
@@ -426,7 +1528,7 @@ class AppMenuItemComponent {
|
|
|
426
1528
|
this.menuResetSubscription.unsubscribe();
|
|
427
1529
|
}
|
|
428
1530
|
}
|
|
429
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppMenuItemComponent, deps: [{ token: LayoutService }, { token:
|
|
1531
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppMenuItemComponent, deps: [{ token: LayoutService }, { token: i1$1.Router }, { token: AppMenuService }, { token: i4.TranslocoService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
430
1532
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: AppMenuItemComponent, isStandalone: true, selector: "[app-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey" }, host: { properties: { "class.layout-root-menuitem": "this.root", "class.active-menuitem": "this.activeClass" } }, viewQueries: [{ propertyName: "submenu", first: true, predicate: ["submenu"], descendants: true }], ngImport: i0, template: `
|
|
431
1533
|
<ng-container>
|
|
432
1534
|
@if (root) {
|
|
@@ -485,7 +1587,7 @@ class AppMenuItemComponent {
|
|
|
485
1587
|
</ul>
|
|
486
1588
|
}
|
|
487
1589
|
</ng-container>
|
|
488
|
-
`, isInline: true, styles: [".active-root-menu-item{background-color:var(--primary-color)}.active-root-menu-item>i,.active-root-menu-item span{color:var(--primary-foreground)!important}.active-root-menu-item>span{font-weight:700}\n"], dependencies: [{ kind: "component", type: AppMenuItemComponent, selector: "[app-menuitem]", inputs: ["item", "index", "root", "parentKey"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type:
|
|
1590
|
+
`, isInline: true, styles: [".active-root-menu-item{background-color:var(--primary-color)}.active-root-menu-item>i,.active-root-menu-item span{color:var(--primary-foreground)!important}.active-root-menu-item>span{font-weight:700}\n"], dependencies: [{ kind: "component", type: AppMenuItemComponent, selector: "[app-menuitem]", inputs: ["item", "index", "root", "parentKey"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i9.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6$2.Ripple, selector: "[pRipple]" }], animations: [
|
|
489
1591
|
trigger('children', [
|
|
490
1592
|
state('collapsed', style({
|
|
491
1593
|
height: '0'
|
|
@@ -580,7 +1682,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
580
1682
|
transition('collapsed <=> expanded', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
|
|
581
1683
|
])
|
|
582
1684
|
], styles: [".active-root-menu-item{background-color:var(--primary-color)}.active-root-menu-item>i,.active-root-menu-item span{color:var(--primary-foreground)!important}.active-root-menu-item>span{font-weight:700}\n"] }]
|
|
583
|
-
}], ctorParameters: () => [{ type: LayoutService }, { type:
|
|
1685
|
+
}], ctorParameters: () => [{ type: LayoutService }, { type: i1$1.Router }, { type: AppMenuService }, { type: i4.TranslocoService }], propDecorators: { item: [{
|
|
584
1686
|
type: Input
|
|
585
1687
|
}], index: [{
|
|
586
1688
|
type: Input
|
|
@@ -648,6 +1750,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
648
1750
|
args: ['menuContainer']
|
|
649
1751
|
}] } });
|
|
650
1752
|
|
|
1753
|
+
var LanguageCode;
|
|
1754
|
+
(function (LanguageCode) {
|
|
1755
|
+
LanguageCode["TR"] = "tr";
|
|
1756
|
+
LanguageCode["EN"] = "en";
|
|
1757
|
+
})(LanguageCode || (LanguageCode = {}));
|
|
1758
|
+
|
|
651
1759
|
class BreadcrumbService {
|
|
652
1760
|
constructor() {
|
|
653
1761
|
this.keyValues = signal({});
|
|
@@ -727,19 +1835,13 @@ class AppBreadcrumbComponent {
|
|
|
727
1835
|
this.addBreadcrumb(route.firstChild, routeUrl, breadcrumbs);
|
|
728
1836
|
}
|
|
729
1837
|
}
|
|
730
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppBreadcrumbComponent, deps: [{ token:
|
|
731
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: AppBreadcrumbComponent, isStandalone: true, selector: "app-breadcrumb", ngImport: i0, template: "<p-breadcrumb class=\"max-w-full\" [model]=\"breadcrumbs\" [style]=\"{ border: 'none', background: '#EFF3F8' }\">\r\n\t<ng-template pTemplate=\"item\" let-item>\r\n\t\t<a [routerLink]=\"item.url\">\r\n\t\t\t<span [ngClass]=\"[item.icon ? item.icon : '', 'text-500']\"></span>\r\n\t\t\t<span class=\"text-500\">{{ item.label }}</span>\r\n\t\t</a>\r\n\t</ng-template>\r\n</p-breadcrumb>\r\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: BreadcrumbModule }, { kind: "component", type: i3$2.Breadcrumb, selector: "p-breadcrumb", inputs: ["model", "style", "styleClass", "home", "homeAriaLabel"], outputs: ["onItemClick"] }, { kind: "directive", type:
|
|
1838
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppBreadcrumbComponent, deps: [{ token: i1$1.Router }, { token: BreadcrumbService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1839
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: AppBreadcrumbComponent, isStandalone: true, selector: "app-breadcrumb", ngImport: i0, template: "<p-breadcrumb class=\"max-w-full\" [model]=\"breadcrumbs\" [style]=\"{ border: 'none', background: '#EFF3F8' }\">\r\n\t<ng-template pTemplate=\"item\" let-item>\r\n\t\t<a [routerLink]=\"item.url\">\r\n\t\t\t<span [ngClass]=\"[item.icon ? item.icon : '', 'text-500']\"></span>\r\n\t\t\t<span class=\"text-500\">{{ item.label }}</span>\r\n\t\t</a>\r\n\t</ng-template>\r\n</p-breadcrumb>\r\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: BreadcrumbModule }, { kind: "component", type: i3$2.Breadcrumb, selector: "p-breadcrumb", inputs: ["model", "style", "styleClass", "home", "homeAriaLabel"], outputs: ["onItemClick"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
732
1840
|
}
|
|
733
1841
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppBreadcrumbComponent, decorators: [{
|
|
734
1842
|
type: Component,
|
|
735
1843
|
args: [{ standalone: true, selector: 'app-breadcrumb', imports: [NgTemplateOutlet, AsyncPipe, RouterLink, BreadcrumbModule, NgClass], template: "<p-breadcrumb class=\"max-w-full\" [model]=\"breadcrumbs\" [style]=\"{ border: 'none', background: '#EFF3F8' }\">\r\n\t<ng-template pTemplate=\"item\" let-item>\r\n\t\t<a [routerLink]=\"item.url\">\r\n\t\t\t<span [ngClass]=\"[item.icon ? item.icon : '', 'text-500']\"></span>\r\n\t\t\t<span class=\"text-500\">{{ item.label }}</span>\r\n\t\t</a>\r\n\t</ng-template>\r\n</p-breadcrumb>\r\n" }]
|
|
736
|
-
}], ctorParameters: () => [{ type:
|
|
737
|
-
|
|
738
|
-
var LanguageCode;
|
|
739
|
-
(function (LanguageCode) {
|
|
740
|
-
LanguageCode["TR"] = "tr";
|
|
741
|
-
LanguageCode["EN"] = "en";
|
|
742
|
-
})(LanguageCode || (LanguageCode = {}));
|
|
1844
|
+
}], ctorParameters: () => [{ type: i1$1.Router }, { type: BreadcrumbService }] });
|
|
743
1845
|
|
|
744
1846
|
class AppTopbarComponent {
|
|
745
1847
|
constructor(translocoService, pubSubService, keycloak) {
|
|
@@ -749,6 +1851,7 @@ class AppTopbarComponent {
|
|
|
749
1851
|
this.layoutService = inject(LayoutService);
|
|
750
1852
|
this.search = '';
|
|
751
1853
|
this.filePath = signal('');
|
|
1854
|
+
this.isNotificationsVisible = signal(false);
|
|
752
1855
|
this.currentLang = localStorage.getItem('lang') || LanguageCode.TR;
|
|
753
1856
|
this.languages = [
|
|
754
1857
|
{ name: 'TR', code: LanguageCode.TR, flag: 'assets/images/flags/tr.svg' },
|
|
@@ -803,6 +1906,21 @@ class AppTopbarComponent {
|
|
|
803
1906
|
onConfigButtonClick() {
|
|
804
1907
|
this.layoutService.showConfigSidebar();
|
|
805
1908
|
}
|
|
1909
|
+
onHistoryButtonClick() {
|
|
1910
|
+
this.layoutService.showHistorySidebar();
|
|
1911
|
+
}
|
|
1912
|
+
onSiteMapButtonClick() {
|
|
1913
|
+
this.layoutService.showSiteMapSidebar();
|
|
1914
|
+
}
|
|
1915
|
+
onFavoritePagesButtonClick() {
|
|
1916
|
+
this.layoutService.showFavoritePagesSidebar();
|
|
1917
|
+
}
|
|
1918
|
+
onNotificationsButtonClick() {
|
|
1919
|
+
this.isNotificationsVisible.update((visible) => !visible);
|
|
1920
|
+
}
|
|
1921
|
+
onNotificationsClose() {
|
|
1922
|
+
this.isNotificationsVisible.set(false);
|
|
1923
|
+
}
|
|
806
1924
|
onLanguageChange() {
|
|
807
1925
|
localStorage.setItem('lang', this.currentLang);
|
|
808
1926
|
this.translocoService.setActiveLang(this.currentLang);
|
|
@@ -830,8 +1948,8 @@ class AppTopbarComponent {
|
|
|
830
1948
|
return 'assets/images/flags/tr.svg';
|
|
831
1949
|
}
|
|
832
1950
|
}
|
|
833
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppTopbarComponent, deps: [{ token: i4.TranslocoService }, { token: i2$
|
|
834
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: AppTopbarComponent, isStandalone: true, selector: "app-topbar", viewQueries: [{ propertyName: "menuButton", first: true, predicate: ["menubutton"], descendants: true }], ngImport: i0, template: "<div class=\"layout-topbar\">\r\n\t<div class=\"topbar-start\">\r\n\t\t<button #menubutton type=\"button\" class=\"topbar-menubutton p-link p-trigger\" (click)=\"onMenuButtonClick()\">\r\n\t\t\t<i class=\"pi pi-bars\"></i>\r\n\t\t</button>\r\n\t\t<img [src]=\"filePath()\" class=\"mr-3\" alt=\"
|
|
1951
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppTopbarComponent, deps: [{ token: i4.TranslocoService }, { token: i2$2.PubSubService }, { token: i2$1.KeycloakService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1952
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: AppTopbarComponent, isStandalone: true, selector: "app-topbar", viewQueries: [{ propertyName: "menuButton", first: true, predicate: ["menubutton"], descendants: true }], ngImport: i0, template: "<div class=\"layout-topbar\">\r\n\t<div class=\"topbar-start\">\r\n\t\t<button #menubutton type=\"button\" class=\"topbar-menubutton p-link p-trigger\" (click)=\"onMenuButtonClick()\">\r\n\t\t\t<i class=\"pi pi-bars\"></i>\r\n\t\t</button>\r\n\t\t<img [src]=\"filePath()\" class=\"topbar-logo mr-3\" alt=\"logo\" />\r\n\t</div>\r\n\r\n\t<div class=\"topbar-search\" *transloco=\"let t; read: ''\">\r\n\t\t<span class=\"p-input-icon-left\">\r\n\t\t\t<i class=\"pi pi-search\"></i>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tpInputText\r\n\t\t\t\tvariant=\"filled\"\r\n\t\t\t\t[placeholder]=\"t('searchGeneral')\"\r\n\t\t\t\tstyle=\"background: #eff3f8; border: none; height: 42px\"\r\n\t\t\t\tclass=\"p-inputtext p-component p-element topbar-search-input\" />\r\n\t\t</span>\r\n\t</div>\r\n\r\n\t<div class=\"topbar-end mr-2\">\r\n\t\t<ul class=\"topbar-menu\">\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<p-button\r\n\t\t\t\t\ticon=\"pi pi-sitemap\"\r\n\t\t\t\t\tseverity=\"secondary\"\r\n\t\t\t\t\t[text]=\"true\"\r\n\t\t\t\t\t[rounded]=\"true\"\r\n\t\t\t\t\t(click)=\"onSiteMapButtonClick()\" />\r\n\t\t\t</li>\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<p-button\r\n\t\t\t\t\ticon=\"pi pi-history\"\r\n\t\t\t\t\tseverity=\"secondary\"\r\n\t\t\t\t\t[text]=\"true\"\r\n\t\t\t\t\t[rounded]=\"true\"\r\n\t\t\t\t\t(click)=\"onHistoryButtonClick()\" />\r\n\t\t\t</li>\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<p-button\r\n\t\t\t\t\ticon=\"pi pi-heart\"\r\n\t\t\t\t\tseverity=\"secondary\"\r\n\t\t\t\t\t[text]=\"true\"\r\n\t\t\t\t\t[rounded]=\"true\"\r\n\t\t\t\t\t(click)=\"onFavoritePagesButtonClick()\" />\r\n\t\t\t</li>\r\n\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<p-button severity=\"secondary\" [text]=\"true\" [rounded]=\"true\" (click)=\"onProfileButtonClick()\">\r\n\t\t\t\t\t{{ username[0] | uppercase }}\r\n\t\t\t\t</p-button>\r\n\t\t\t</li>\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<p-divider layout=\"vertical\" styleClass=\"h-1rem border-500 m-0\" />\r\n\t\t\t</li>\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<i\r\n\t\t\t\t\tclass=\"pi pi-bell notification-icon\"\r\n\t\t\t\t\tseverity=\"info\"\r\n\t\t\t\t\tpBadge\r\n\t\t\t\t\t[value]=\"0\"\r\n\t\t\t\t\t(click)=\"onNotificationsButtonClick()\"></i>\r\n\t\t\t</li>\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<p-dropdown\r\n\t\t\t\t\t[options]=\"languages\"\r\n\t\t\t\t\t[(ngModel)]=\"currentLang\"\r\n\t\t\t\t\t(ngModelChange)=\"onLanguageChange()\"\r\n\t\t\t\t\toptionLabel=\"name\"\r\n\t\t\t\t\toptionValue=\"code\"\r\n\t\t\t\t\t[showClear]=\"false\"\r\n\t\t\t\t\tclass=\"custom-dropdown ml-3\">\r\n\t\t\t\t\t<ng-template pTemplate=\"selectedItem\">\r\n\t\t\t\t\t\t<div class=\"flex align-items-center gap-2\">\r\n\t\t\t\t\t\t\t<img [src]=\"getFlagPath(currentLang)\" class=\"flag-icon\" alt=\"flag\" />\r\n\t\t\t\t\t\t\t<span class=\"language-text\">{{ currentLang | uppercase }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template pTemplate=\"item\" let-item>\r\n\t\t\t\t\t\t<div class=\"flex align-items-center gap-2\">\r\n\t\t\t\t\t\t\t<img [src]=\"item.flag\" class=\"flag-icon\" alt=\"flag\" />\r\n\t\t\t\t\t\t\t<span>{{ item.name }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</p-dropdown>\r\n\t\t\t</li>\r\n\t\t</ul>\r\n\t</div>\r\n</div>\r\n\r\n<app-breadcrumb class=\"topbar-breadcrumb\"></app-breadcrumb>\r\n", styles: [".layout-topbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:.5rem;padding:0 1rem}@media (max-width: 768px){.layout-topbar{padding:0 .5rem;gap:.25rem}}.topbar-start{display:flex;align-items:center;flex-shrink:0}.topbar-logo{height:32px;width:auto}@media (max-width: 768px){.topbar-logo{display:none}}.topbar-search{flex:1;max-width:50rem;margin:0 1rem}@media (max-width: 1024px){.topbar-search{max-width:30rem}}@media (max-width: 768px){.topbar-search{max-width:20rem;margin:0 .5rem}}@media (max-width: 480px){.topbar-search{max-width:15rem;margin:0 .25rem}}.topbar-search .p-input-icon-left{width:100%}.topbar-search-input{width:100%!important}.topbar-end{flex-shrink:0}.topbar-menu{display:flex;align-items:center;gap:.5rem;margin:0;padding:0;list-style:none}@media (max-width: 768px){.topbar-menu{gap:.25rem}}@media (max-width: 480px){.topbar-menu{gap:.1rem}}.topbar-menu-item{display:flex;align-items:center}@media (max-width: 1024px){.desktop-only{display:none!important}}.mobile-only{display:none!important}@media (max-width: 1024px){.mobile-only{display:flex!important}}.custom-dropdown .p-dropdown{border-radius:50px;padding:.5rem 1rem;border:1px solid #c8c8c8;background-color:#f4f4f4}@media (max-width: 768px){.custom-dropdown .p-dropdown{padding:.4rem .8rem}}@media (max-width: 480px){.custom-dropdown .p-dropdown{padding:.3rem .6rem}}.custom-dropdown .p-dropdown-label{padding:0;line-height:1.5}.custom-dropdown .p-dropdown-trigger{border-radius:50px}.flag-icon{width:18px;height:18px;display:inline-block;vertical-align:middle}@media (max-width: 768px){.flag-icon{width:16px;height:16px}}@media (max-width: 480px){.language-text{display:none}}@media (max-width: 768px){.topbar-menubutton{padding:.4rem!important}}@media (max-width: 480px){.topbar-menubutton{padding:.3rem!important}}@media (max-width: 768px){.topbar-menu-item p-button{min-width:auto}.topbar-menu-item p-button .p-button-icon{margin:0}.topbar-menu-item p-button .p-button-label{font-size:.9rem}}@media (max-width: 480px){.topbar-menu-item p-button .p-button-label{font-size:.8rem}.topbar-menu-item p-divider{display:none}}.notification-icon{cursor:pointer;padding:.5rem;border-radius:50%;transition:background-color .2s}.notification-icon:hover{background-color:var(--surface-hover)}@media (max-width: 480px){.notification-icon{font-size:.9rem;padding:.4rem}}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i4$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: AppBreadcrumbComponent, selector: "app-breadcrumb" }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: DividerModule }, { kind: "component", type: i7$2.Divider, selector: "p-divider", inputs: ["style", "styleClass", "layout", "type", "align"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "directive", type: i8$1.BadgeDirective, selector: "[pBadge]", inputs: ["badgeDisabled", "badgeSize", "size", "severity", "value", "badgeStyle", "badgeStyleClass"] }, { kind: "ngmodule", type: MenubarModule }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i9$2.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i4.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoLang", "translocoLoadingTpl"] }] }); }
|
|
835
1953
|
}
|
|
836
1954
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppTopbarComponent, decorators: [{
|
|
837
1955
|
type: Component,
|
|
@@ -843,9 +1961,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
843
1961
|
DividerModule,
|
|
844
1962
|
BadgeModule,
|
|
845
1963
|
MenubarModule,
|
|
846
|
-
DropdownModule
|
|
847
|
-
|
|
848
|
-
|
|
1964
|
+
DropdownModule,
|
|
1965
|
+
TranslocoModule
|
|
1966
|
+
], template: "<div class=\"layout-topbar\">\r\n\t<div class=\"topbar-start\">\r\n\t\t<button #menubutton type=\"button\" class=\"topbar-menubutton p-link p-trigger\" (click)=\"onMenuButtonClick()\">\r\n\t\t\t<i class=\"pi pi-bars\"></i>\r\n\t\t</button>\r\n\t\t<img [src]=\"filePath()\" class=\"topbar-logo mr-3\" alt=\"logo\" />\r\n\t</div>\r\n\r\n\t<div class=\"topbar-search\" *transloco=\"let t; read: ''\">\r\n\t\t<span class=\"p-input-icon-left\">\r\n\t\t\t<i class=\"pi pi-search\"></i>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tpInputText\r\n\t\t\t\tvariant=\"filled\"\r\n\t\t\t\t[placeholder]=\"t('searchGeneral')\"\r\n\t\t\t\tstyle=\"background: #eff3f8; border: none; height: 42px\"\r\n\t\t\t\tclass=\"p-inputtext p-component p-element topbar-search-input\" />\r\n\t\t</span>\r\n\t</div>\r\n\r\n\t<div class=\"topbar-end mr-2\">\r\n\t\t<ul class=\"topbar-menu\">\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<p-button\r\n\t\t\t\t\ticon=\"pi pi-sitemap\"\r\n\t\t\t\t\tseverity=\"secondary\"\r\n\t\t\t\t\t[text]=\"true\"\r\n\t\t\t\t\t[rounded]=\"true\"\r\n\t\t\t\t\t(click)=\"onSiteMapButtonClick()\" />\r\n\t\t\t</li>\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<p-button\r\n\t\t\t\t\ticon=\"pi pi-history\"\r\n\t\t\t\t\tseverity=\"secondary\"\r\n\t\t\t\t\t[text]=\"true\"\r\n\t\t\t\t\t[rounded]=\"true\"\r\n\t\t\t\t\t(click)=\"onHistoryButtonClick()\" />\r\n\t\t\t</li>\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<p-button\r\n\t\t\t\t\ticon=\"pi pi-heart\"\r\n\t\t\t\t\tseverity=\"secondary\"\r\n\t\t\t\t\t[text]=\"true\"\r\n\t\t\t\t\t[rounded]=\"true\"\r\n\t\t\t\t\t(click)=\"onFavoritePagesButtonClick()\" />\r\n\t\t\t</li>\r\n\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<p-button severity=\"secondary\" [text]=\"true\" [rounded]=\"true\" (click)=\"onProfileButtonClick()\">\r\n\t\t\t\t\t{{ username[0] | uppercase }}\r\n\t\t\t\t</p-button>\r\n\t\t\t</li>\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<p-divider layout=\"vertical\" styleClass=\"h-1rem border-500 m-0\" />\r\n\t\t\t</li>\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<i\r\n\t\t\t\t\tclass=\"pi pi-bell notification-icon\"\r\n\t\t\t\t\tseverity=\"info\"\r\n\t\t\t\t\tpBadge\r\n\t\t\t\t\t[value]=\"0\"\r\n\t\t\t\t\t(click)=\"onNotificationsButtonClick()\"></i>\r\n\t\t\t</li>\r\n\t\t\t<li class=\"topbar-menu-item\">\r\n\t\t\t\t<p-dropdown\r\n\t\t\t\t\t[options]=\"languages\"\r\n\t\t\t\t\t[(ngModel)]=\"currentLang\"\r\n\t\t\t\t\t(ngModelChange)=\"onLanguageChange()\"\r\n\t\t\t\t\toptionLabel=\"name\"\r\n\t\t\t\t\toptionValue=\"code\"\r\n\t\t\t\t\t[showClear]=\"false\"\r\n\t\t\t\t\tclass=\"custom-dropdown ml-3\">\r\n\t\t\t\t\t<ng-template pTemplate=\"selectedItem\">\r\n\t\t\t\t\t\t<div class=\"flex align-items-center gap-2\">\r\n\t\t\t\t\t\t\t<img [src]=\"getFlagPath(currentLang)\" class=\"flag-icon\" alt=\"flag\" />\r\n\t\t\t\t\t\t\t<span class=\"language-text\">{{ currentLang | uppercase }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template pTemplate=\"item\" let-item>\r\n\t\t\t\t\t\t<div class=\"flex align-items-center gap-2\">\r\n\t\t\t\t\t\t\t<img [src]=\"item.flag\" class=\"flag-icon\" alt=\"flag\" />\r\n\t\t\t\t\t\t\t<span>{{ item.name }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</p-dropdown>\r\n\t\t\t</li>\r\n\t\t</ul>\r\n\t</div>\r\n</div>\r\n\r\n<app-breadcrumb class=\"topbar-breadcrumb\"></app-breadcrumb>\r\n", styles: [".layout-topbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:.5rem;padding:0 1rem}@media (max-width: 768px){.layout-topbar{padding:0 .5rem;gap:.25rem}}.topbar-start{display:flex;align-items:center;flex-shrink:0}.topbar-logo{height:32px;width:auto}@media (max-width: 768px){.topbar-logo{display:none}}.topbar-search{flex:1;max-width:50rem;margin:0 1rem}@media (max-width: 1024px){.topbar-search{max-width:30rem}}@media (max-width: 768px){.topbar-search{max-width:20rem;margin:0 .5rem}}@media (max-width: 480px){.topbar-search{max-width:15rem;margin:0 .25rem}}.topbar-search .p-input-icon-left{width:100%}.topbar-search-input{width:100%!important}.topbar-end{flex-shrink:0}.topbar-menu{display:flex;align-items:center;gap:.5rem;margin:0;padding:0;list-style:none}@media (max-width: 768px){.topbar-menu{gap:.25rem}}@media (max-width: 480px){.topbar-menu{gap:.1rem}}.topbar-menu-item{display:flex;align-items:center}@media (max-width: 1024px){.desktop-only{display:none!important}}.mobile-only{display:none!important}@media (max-width: 1024px){.mobile-only{display:flex!important}}.custom-dropdown .p-dropdown{border-radius:50px;padding:.5rem 1rem;border:1px solid #c8c8c8;background-color:#f4f4f4}@media (max-width: 768px){.custom-dropdown .p-dropdown{padding:.4rem .8rem}}@media (max-width: 480px){.custom-dropdown .p-dropdown{padding:.3rem .6rem}}.custom-dropdown .p-dropdown-label{padding:0;line-height:1.5}.custom-dropdown .p-dropdown-trigger{border-radius:50px}.flag-icon{width:18px;height:18px;display:inline-block;vertical-align:middle}@media (max-width: 768px){.flag-icon{width:16px;height:16px}}@media (max-width: 480px){.language-text{display:none}}@media (max-width: 768px){.topbar-menubutton{padding:.4rem!important}}@media (max-width: 480px){.topbar-menubutton{padding:.3rem!important}}@media (max-width: 768px){.topbar-menu-item p-button{min-width:auto}.topbar-menu-item p-button .p-button-icon{margin:0}.topbar-menu-item p-button .p-button-label{font-size:.9rem}}@media (max-width: 480px){.topbar-menu-item p-button .p-button-label{font-size:.8rem}.topbar-menu-item p-divider{display:none}}.notification-icon{cursor:pointer;padding:.5rem;border-radius:50%;transition:background-color .2s}.notification-icon:hover{background-color:var(--surface-hover)}@media (max-width: 480px){.notification-icon{font-size:.9rem;padding:.4rem}}\n"] }]
|
|
1967
|
+
}], ctorParameters: () => [{ type: i4.TranslocoService }, { type: i2$2.PubSubService }, { type: i2$1.KeycloakService }], propDecorators: { menuButton: [{
|
|
849
1968
|
type: ViewChild,
|
|
850
1969
|
args: ['menubutton']
|
|
851
1970
|
}] } });
|
|
@@ -947,8 +2066,8 @@ class AppChatbotComponent {
|
|
|
947
2066
|
this.feedbackComments = '';
|
|
948
2067
|
this.feedbackRating = 0;
|
|
949
2068
|
}
|
|
950
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppChatbotComponent, deps: [{ token: i1.HttpClient }, { token: i2.KeycloakService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
951
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: AppChatbotComponent, isStandalone: true, selector: "app-chatbot", ngImport: i0, template: "<button class=\"layout-config-button p-link\" type=\"button\" (click)=\"chatbotVisible=true\">\r\n\t<i class=\"pi pi-comments\"></i>\r\n</button>\r\n\r\n<p-sidebar\r\n\t[(visible)]=\"chatbotVisible\"\r\n\tposition=\"right\"\r\n\tstyleClass=\"w-30rem flex flex-column\"\r\n\t[style]=\"{ height: '100%' }\">\r\n\t<ng-template pTemplate=\"header\">\r\n\t\t<div class=\"custom-sidebar-header\">\r\n\t\t\t<span class=\"header-title\">THOR Asistan</span>\r\n\t\t\t<i class=\"pi pi-thumbs-up custom-icon\" (click)=\"giveFeedback()\" (keypress)=\"giveFeedback()\"></i>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<div class=\"flex flex-column flex-1\">\r\n\t\t<p-messages severity=\"info\">\r\n\t\t\t<ng-template pTemplate>\r\n\t\t\t\t<i class=\"pi pi-info-circle text-xl\"></i>\r\n\t\t\t\t<div class=\"ml-2\">Sorular\u0131n\u0131n cevab\u0131na buradan ula\u015Fabilirsin.</div>\r\n\t\t\t</ng-template>\r\n\t\t</p-messages>\r\n\t</div>\r\n\r\n\t<div class=\"flex flex-column flex-1 query-details\" style=\"height: 85%; position: relative\">\r\n\t\t<div class=\"query-history\" style=\"flex: 1; max-height: 85%; overflow-y: auto; padding-right: 0.5rem\">\r\n\t\t\t@if (historyList.getValue().length > 0) {\r\n\t\t\t\t@for (historyItem of historyList.getValue(); track $index) {\r\n\t\t\t\t\t<div class=\"flex flex-column mb-2\">\r\n\t\t\t\t\t\t<div class=\"card shadow-none flex-1 flex align-items-center\" style=\"background-color: #e2e4e5\">\r\n\t\t\t\t\t\t\t<i class=\"pi pi-user text-xl\"></i>\r\n\t\t\t\t\t\t\t<div class=\"ml-4\">{{ historyItem.query }}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"flex flex-column mb-2\">\r\n\t\t\t\t\t\t<div class=\"card shadow-none flex-1 flex align-items-center ml-5\">\r\n\t\t\t\t\t\t\t<i class=\"pi pi-comment text-xl\"></i>\r\n\t\t\t\t\t\t\t<div class=\"ml-4\">{{ historyItem.answer }}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@if (queryList.getValue().length > 0) {\r\n\t\t\t\t@for (item of queryList.getValue(); track $index) {\r\n\t\t\t\t\t<div class=\"flex flex-column mb-2\">\r\n\t\t\t\t\t\t<div class=\"card shadow-none flex-1 flex align-items-center\" style=\"background-color: #e2e4e5\">\r\n\t\t\t\t\t\t\t<i class=\"pi pi-user text-xl\"></i>\r\n\t\t\t\t\t\t\t<div class=\"ml-4 text-lg\">{{ item.question }}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"flex flex-column\">\r\n\t\t\t\t\t\t<div class=\"card shadow-none flex-1 flex align-items-center ml-5\">\r\n\t\t\t\t\t\t\t<i class=\"pi pi-comment text-xl\"></i>\r\n\t\t\t\t\t\t\t<div class=\"ml-4 text-lg\">{{ item.answer }}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@if (visibleGiveFeedback) {\r\n\t\t\t\t<div class=\"flex mb-2\">\r\n\t\t\t\t\t<div class=\"card custom-card\" style=\"background-color: #e2e4e5\">\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<span>Geri bildirimlerinizi buradan g\u00F6nderebilirsiniz.</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<p-rating [(ngModel)]=\"feedbackRating\" [stars]=\"5\" />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"text-lg\">\r\n\t\t\t\t\t\t\t<aril-text-area [rows]=\"5\" [cols]=\"30\" pTextarea [(ngModel)]=\"feedbackComments\"></aril-text-area>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div>\r\n <aril-button label=\"G\u00F6nder\" color=\"danger\" icon=\"SEND\" [outlined]=\"true\" (clickEvent)=\"sendFeedback()\">\r\n </aril-button>\r\n\t\t\t\t\t\t\t<aril-button label=\"Vazge\u00E7\" color=\"danger\" icon=\"TIMES\" [outlined]=\"true\" (clickEvent)=\"cancelFeedback()\">\r\n </aril-button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t</div>\r\n\r\n\t\t@if (isTyping) {\r\n\t\t\t<div\r\n\t\t\t\tclass=\"typing-indicator\"\r\n\t\t\t\tstyle=\"font-size: 16px; font-weight: 900; padding: 6px; width: 10%; text-align: center\">\r\n\t\t\t\t{{ typingText }}\r\n\t\t\t</div>\r\n\t\t}\r\n\r\n\t\t<div class=\"search-container\" style=\"position: absolute; bottom: 0; width: 100%; background: white\">\r\n\t\t\t<div class=\"search-box\" style=\"display: flex; align-items: center; gap: 0.5rem\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tstyle=\"flex: 1; width: 100%\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tpInputText\r\n\t\t\t\t\t\tplaceholder=\"Sorunu yaz...\"\r\n\t\t\t\t\t\t[(ngModel)]=\"questionQuery\"\r\n\t\t\t\t\t\tclass=\"flex-1\"\r\n\t\t\t\t\t\tmaxlength=\"500\" />\r\n\t\t\t\t<aril-button label=\"G\u00F6nder\" color=\"danger\" icon=\"SEND\" [outlined]=\"true\" (clickEvent)=\"sendRequest()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</p-sidebar>\r\n", styles: ["@charset \"UTF-8\";::ng-deep .p-sidebar .p-sidebar-header{background-color:var(--primary-color)!important;color:#fff!important}::ng-deep .p-sidebar .p-sidebar-close i{color:#fff!important}.custom-sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:.5rem}.header-title{font-size:16px;font-weight:700}.custom-icon{font-size:1.5rem;color:#fff;cursor:pointer;margin-left:1rem}.custom-card{display:flex;flex-direction:column;gap:.5rem}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type:
|
|
2069
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppChatbotComponent, deps: [{ token: i1$2.HttpClient }, { token: i2$1.KeycloakService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2070
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: AppChatbotComponent, isStandalone: true, selector: "app-chatbot", ngImport: i0, template: "<button class=\"layout-config-button p-link\" type=\"button\" (click)=\"chatbotVisible=true\">\r\n\t<i class=\"pi pi-comments\"></i>\r\n</button>\r\n\r\n<p-sidebar\r\n\t[(visible)]=\"chatbotVisible\"\r\n\tposition=\"right\"\r\n\tstyleClass=\"w-30rem flex flex-column\"\r\n\t[style]=\"{ height: '100%' }\">\r\n\t<ng-template pTemplate=\"header\">\r\n\t\t<div class=\"custom-sidebar-header\">\r\n\t\t\t<span class=\"header-title\">THOR Asistan</span>\r\n\t\t\t<i class=\"pi pi-thumbs-up custom-icon\" (click)=\"giveFeedback()\" (keypress)=\"giveFeedback()\"></i>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<div class=\"flex flex-column flex-1\">\r\n\t\t<p-messages severity=\"info\">\r\n\t\t\t<ng-template pTemplate>\r\n\t\t\t\t<i class=\"pi pi-info-circle text-xl\"></i>\r\n\t\t\t\t<div class=\"ml-2\">Sorular\u0131n\u0131n cevab\u0131na buradan ula\u015Fabilirsin.</div>\r\n\t\t\t</ng-template>\r\n\t\t</p-messages>\r\n\t</div>\r\n\r\n\t<div class=\"flex flex-column flex-1 query-details\" style=\"height: 85%; position: relative\">\r\n\t\t<div class=\"query-history\" style=\"flex: 1; max-height: 85%; overflow-y: auto; padding-right: 0.5rem\">\r\n\t\t\t@if (historyList.getValue().length > 0) {\r\n\t\t\t\t@for (historyItem of historyList.getValue(); track $index) {\r\n\t\t\t\t\t<div class=\"flex flex-column mb-2\">\r\n\t\t\t\t\t\t<div class=\"card shadow-none flex-1 flex align-items-center\" style=\"background-color: #e2e4e5\">\r\n\t\t\t\t\t\t\t<i class=\"pi pi-user text-xl\"></i>\r\n\t\t\t\t\t\t\t<div class=\"ml-4\">{{ historyItem.query }}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"flex flex-column mb-2\">\r\n\t\t\t\t\t\t<div class=\"card shadow-none flex-1 flex align-items-center ml-5\">\r\n\t\t\t\t\t\t\t<i class=\"pi pi-comment text-xl\"></i>\r\n\t\t\t\t\t\t\t<div class=\"ml-4\">{{ historyItem.answer }}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@if (queryList.getValue().length > 0) {\r\n\t\t\t\t@for (item of queryList.getValue(); track $index) {\r\n\t\t\t\t\t<div class=\"flex flex-column mb-2\">\r\n\t\t\t\t\t\t<div class=\"card shadow-none flex-1 flex align-items-center\" style=\"background-color: #e2e4e5\">\r\n\t\t\t\t\t\t\t<i class=\"pi pi-user text-xl\"></i>\r\n\t\t\t\t\t\t\t<div class=\"ml-4 text-lg\">{{ item.question }}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"flex flex-column\">\r\n\t\t\t\t\t\t<div class=\"card shadow-none flex-1 flex align-items-center ml-5\">\r\n\t\t\t\t\t\t\t<i class=\"pi pi-comment text-xl\"></i>\r\n\t\t\t\t\t\t\t<div class=\"ml-4 text-lg\">{{ item.answer }}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@if (visibleGiveFeedback) {\r\n\t\t\t\t<div class=\"flex mb-2\">\r\n\t\t\t\t\t<div class=\"card custom-card\" style=\"background-color: #e2e4e5\">\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<span>Geri bildirimlerinizi buradan g\u00F6nderebilirsiniz.</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<p-rating [(ngModel)]=\"feedbackRating\" [stars]=\"5\" />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"text-lg\">\r\n\t\t\t\t\t\t\t<aril-text-area [rows]=\"5\" [cols]=\"30\" pTextarea [(ngModel)]=\"feedbackComments\"></aril-text-area>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div>\r\n <aril-button label=\"G\u00F6nder\" color=\"danger\" icon=\"SEND\" [outlined]=\"true\" (clickEvent)=\"sendFeedback()\">\r\n </aril-button>\r\n\t\t\t\t\t\t\t<aril-button label=\"Vazge\u00E7\" color=\"danger\" icon=\"TIMES\" [outlined]=\"true\" (clickEvent)=\"cancelFeedback()\">\r\n </aril-button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t</div>\r\n\r\n\t\t@if (isTyping) {\r\n\t\t\t<div\r\n\t\t\t\tclass=\"typing-indicator\"\r\n\t\t\t\tstyle=\"font-size: 16px; font-weight: 900; padding: 6px; width: 10%; text-align: center\">\r\n\t\t\t\t{{ typingText }}\r\n\t\t\t</div>\r\n\t\t}\r\n\r\n\t\t<div class=\"search-container\" style=\"position: absolute; bottom: 0; width: 100%; background: white\">\r\n\t\t\t<div class=\"search-box\" style=\"display: flex; align-items: center; gap: 0.5rem\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tstyle=\"flex: 1; width: 100%\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tpInputText\r\n\t\t\t\t\t\tplaceholder=\"Sorunu yaz...\"\r\n\t\t\t\t\t\t[(ngModel)]=\"questionQuery\"\r\n\t\t\t\t\t\tclass=\"flex-1\"\r\n\t\t\t\t\t\tmaxlength=\"500\" />\r\n\t\t\t\t<aril-button label=\"G\u00F6nder\" color=\"danger\" icon=\"SEND\" [outlined]=\"true\" (clickEvent)=\"sendRequest()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</p-sidebar>\r\n", styles: ["@charset \"UTF-8\";::ng-deep .p-sidebar .p-sidebar-header{background-color:var(--primary-color)!important;color:#fff!important}::ng-deep .p-sidebar .p-sidebar-close i{color:#fff!important}.custom-sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:.5rem}.header-title{font-size:16px;font-weight:700}.custom-icon{font-size:1.5rem;color:#fff;cursor:pointer;margin-left:1rem}.custom-card{display:flex;flex-direction:column;gap:.5rem}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: SidebarModule }, { kind: "component", type: i6$1.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputIconModule }, { kind: "ngmodule", type: IconFieldModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6$3.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i7$3.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: TextAreaComponent, selector: "aril-text-area[ngModel], aril-text-area[formControl], aril-text-area[formControlName]", inputs: ["rows", "cols", "isAutoResize", "tabindex", "placeholder"] }, { kind: "ngmodule", type: RatingModule }, { kind: "component", type: i8$2.Rating, selector: "p-rating", inputs: ["disabled", "readonly", "stars", "cancel", "iconOnClass", "iconOnStyle", "iconOffClass", "iconOffStyle", "iconCancelClass", "iconCancelStyle", "autofocus"], outputs: ["onRate", "onCancel", "onFocus", "onBlur"] }, { kind: "component", type: ButtonComponent, selector: "aril-button:not([click])", inputs: ["label", "loading", "disabled", "raised", "outlined", "badge", "size", "icon", "color"], outputs: ["clickEvent"] }] }); }
|
|
952
2071
|
}
|
|
953
2072
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppChatbotComponent, decorators: [{
|
|
954
2073
|
type: Component,
|
|
@@ -965,7 +2084,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
965
2084
|
RatingModule,
|
|
966
2085
|
ButtonComponent
|
|
967
2086
|
], template: "<button class=\"layout-config-button p-link\" type=\"button\" (click)=\"chatbotVisible=true\">\r\n\t<i class=\"pi pi-comments\"></i>\r\n</button>\r\n\r\n<p-sidebar\r\n\t[(visible)]=\"chatbotVisible\"\r\n\tposition=\"right\"\r\n\tstyleClass=\"w-30rem flex flex-column\"\r\n\t[style]=\"{ height: '100%' }\">\r\n\t<ng-template pTemplate=\"header\">\r\n\t\t<div class=\"custom-sidebar-header\">\r\n\t\t\t<span class=\"header-title\">THOR Asistan</span>\r\n\t\t\t<i class=\"pi pi-thumbs-up custom-icon\" (click)=\"giveFeedback()\" (keypress)=\"giveFeedback()\"></i>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<div class=\"flex flex-column flex-1\">\r\n\t\t<p-messages severity=\"info\">\r\n\t\t\t<ng-template pTemplate>\r\n\t\t\t\t<i class=\"pi pi-info-circle text-xl\"></i>\r\n\t\t\t\t<div class=\"ml-2\">Sorular\u0131n\u0131n cevab\u0131na buradan ula\u015Fabilirsin.</div>\r\n\t\t\t</ng-template>\r\n\t\t</p-messages>\r\n\t</div>\r\n\r\n\t<div class=\"flex flex-column flex-1 query-details\" style=\"height: 85%; position: relative\">\r\n\t\t<div class=\"query-history\" style=\"flex: 1; max-height: 85%; overflow-y: auto; padding-right: 0.5rem\">\r\n\t\t\t@if (historyList.getValue().length > 0) {\r\n\t\t\t\t@for (historyItem of historyList.getValue(); track $index) {\r\n\t\t\t\t\t<div class=\"flex flex-column mb-2\">\r\n\t\t\t\t\t\t<div class=\"card shadow-none flex-1 flex align-items-center\" style=\"background-color: #e2e4e5\">\r\n\t\t\t\t\t\t\t<i class=\"pi pi-user text-xl\"></i>\r\n\t\t\t\t\t\t\t<div class=\"ml-4\">{{ historyItem.query }}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"flex flex-column mb-2\">\r\n\t\t\t\t\t\t<div class=\"card shadow-none flex-1 flex align-items-center ml-5\">\r\n\t\t\t\t\t\t\t<i class=\"pi pi-comment text-xl\"></i>\r\n\t\t\t\t\t\t\t<div class=\"ml-4\">{{ historyItem.answer }}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@if (queryList.getValue().length > 0) {\r\n\t\t\t\t@for (item of queryList.getValue(); track $index) {\r\n\t\t\t\t\t<div class=\"flex flex-column mb-2\">\r\n\t\t\t\t\t\t<div class=\"card shadow-none flex-1 flex align-items-center\" style=\"background-color: #e2e4e5\">\r\n\t\t\t\t\t\t\t<i class=\"pi pi-user text-xl\"></i>\r\n\t\t\t\t\t\t\t<div class=\"ml-4 text-lg\">{{ item.question }}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"flex flex-column\">\r\n\t\t\t\t\t\t<div class=\"card shadow-none flex-1 flex align-items-center ml-5\">\r\n\t\t\t\t\t\t\t<i class=\"pi pi-comment text-xl\"></i>\r\n\t\t\t\t\t\t\t<div class=\"ml-4 text-lg\">{{ item.answer }}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@if (visibleGiveFeedback) {\r\n\t\t\t\t<div class=\"flex mb-2\">\r\n\t\t\t\t\t<div class=\"card custom-card\" style=\"background-color: #e2e4e5\">\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<span>Geri bildirimlerinizi buradan g\u00F6nderebilirsiniz.</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<p-rating [(ngModel)]=\"feedbackRating\" [stars]=\"5\" />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"text-lg\">\r\n\t\t\t\t\t\t\t<aril-text-area [rows]=\"5\" [cols]=\"30\" pTextarea [(ngModel)]=\"feedbackComments\"></aril-text-area>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div>\r\n <aril-button label=\"G\u00F6nder\" color=\"danger\" icon=\"SEND\" [outlined]=\"true\" (clickEvent)=\"sendFeedback()\">\r\n </aril-button>\r\n\t\t\t\t\t\t\t<aril-button label=\"Vazge\u00E7\" color=\"danger\" icon=\"TIMES\" [outlined]=\"true\" (clickEvent)=\"cancelFeedback()\">\r\n </aril-button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t</div>\r\n\r\n\t\t@if (isTyping) {\r\n\t\t\t<div\r\n\t\t\t\tclass=\"typing-indicator\"\r\n\t\t\t\tstyle=\"font-size: 16px; font-weight: 900; padding: 6px; width: 10%; text-align: center\">\r\n\t\t\t\t{{ typingText }}\r\n\t\t\t</div>\r\n\t\t}\r\n\r\n\t\t<div class=\"search-container\" style=\"position: absolute; bottom: 0; width: 100%; background: white\">\r\n\t\t\t<div class=\"search-box\" style=\"display: flex; align-items: center; gap: 0.5rem\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tstyle=\"flex: 1; width: 100%\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tpInputText\r\n\t\t\t\t\t\tplaceholder=\"Sorunu yaz...\"\r\n\t\t\t\t\t\t[(ngModel)]=\"questionQuery\"\r\n\t\t\t\t\t\tclass=\"flex-1\"\r\n\t\t\t\t\t\tmaxlength=\"500\" />\r\n\t\t\t\t<aril-button label=\"G\u00F6nder\" color=\"danger\" icon=\"SEND\" [outlined]=\"true\" (clickEvent)=\"sendRequest()\">\r\n\t\t\t\t</aril-button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</p-sidebar>\r\n", styles: ["@charset \"UTF-8\";::ng-deep .p-sidebar .p-sidebar-header{background-color:var(--primary-color)!important;color:#fff!important}::ng-deep .p-sidebar .p-sidebar-close i{color:#fff!important}.custom-sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:.5rem}.header-title{font-size:16px;font-weight:700}.custom-icon{font-size:1.5rem;color:#fff;cursor:pointer;margin-left:1rem}.custom-card{display:flex;flex-direction:column;gap:.5rem}\n"] }]
|
|
968
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.KeycloakService }] });
|
|
2087
|
+
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i2$1.KeycloakService }] });
|
|
969
2088
|
|
|
970
2089
|
class ExpandableMenuComponent {
|
|
971
2090
|
constructor(translateJsonPipe, menuService, router, keycloak, translocoService, layoutService) {
|
|
@@ -1189,13 +2308,13 @@ class ExpandableMenuComponent {
|
|
|
1189
2308
|
getLocalText(text) {
|
|
1190
2309
|
return this.translateJsonPipe.transform(text);
|
|
1191
2310
|
}
|
|
1192
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ExpandableMenuComponent, deps: [{ token: i1$
|
|
1193
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: ExpandableMenuComponent, isStandalone: true, selector: "app-expandable-menu", host: { listeners: { "window:resize": "onResize()" } }, providers: [TranslateJsonPipe], ngImport: i0, template: "<div class=\"new-layout-sidebar\">\r\n\t<!-- Main sidebar (first level) -->\r\n\t<div class=\"main-sidebar\">\r\n\t\t<div class=\"main-sidebar-header\">\r\n\t\t\t<div class=\"user-avatar\">\r\n\t\t\t\t<span>{{ username }}</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"main-sidebar-content\">\r\n\t\t\t<ul class=\"main-menu\">\r\n\t\t\t\t@for(item of getMenuItems(); track item; let i = $index){\r\n\t\t\t\t\t@if(!item.separator){\r\n\t\t\t\t\t\t<li\r\n\t\t\t\t\t\t[ngClass]=\"{'active': isActiveRoute(item) || isHaveSelectedChildItem(item)}\"\r\n\t\t\t\t\t\t(click)=\"selectMainItem(i, item)\"\r\n\t\t\t\t\t\t[pTooltip]=\"!isMobile() && isTextTruncated(item.label, activeLang(), 'main') ? (item.label && activeLang() ? item.label[activeLang()!] || '' : '') : ''\"\r\n\t\t\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t\t\t<div class=\"main-menu-item\">\r\n\t\t\t\t\t\t\t<i [ngClass]=\"item.icon\" class=\"menu-icon\"></i>\r\n\t\t\t\t\t\t\t<small class=\"menu-label\">{{ item.label && activeLang() ? item.label[activeLang()!] || '' : '' }}</small>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t</ul>\r\n\t\t</div>\r\n\t\t<!-- Toggle button at the bottom of main sidebar -->\r\n\t\t<div class=\"main-sidebar-footer\">\r\n\t\t\t<button class=\"sidebar-toggle-button\" (click)=\"toggleSecondarySidebar()\" \r\n\t\t\t\t[pTooltip]=\"!isMobile() ? (secondarySidebarExpanded ? getLocalText(tooltipText.toggleButton.expanded) : getLocalText(tooltipText.toggleButton.collapsed)) : ''\" \r\n\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t<i class=\"pi\" [ngClass]=\"secondarySidebarExpanded ? 'pi-angle-left' : 'pi-angle-right'\"></i>\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<!-- Secondary sidebar (second level) -->\r\n\t<div class=\"secondary-sidebar\" [ngClass]=\"{'expanded': secondarySidebarExpanded}\">\r\n\t\t<!-- Content container wrapper to prevent jumps during transitions -->\r\n\t\t<div class=\"secondary-content-wrapper\">\r\n\t\t\t<!-- Secondary sidebar header -->\r\n\t\t\t<div class=\"secondary-sidebar-header\">\r\n\t\t\t\t<div class=\"secondary-header-content\">\r\n\t\t\t\t\t@if(selectedMainMenuItem){\r\n\t\t\t\t\t\t<h3 class=\"section-title\">\r\n\t\t\t\t\t\t\t<i [ngClass]=\"selectedMainMenuItem.icon\" class=\"section-icon\"></i>\r\n\t\t\t\t\t\t\t<span>{{ selectedMainMenuItem.label && activeLang() ? selectedMainMenuItem.label[activeLang()!] || '' : '' }}</span>\r\n\t\t\t\t\t\t</h3>\r\n\t\t\t\t\t}\r\n\t\t\t\t\t<button class=\"sidebar-lock-button\" (click)=\"toggleSidebarLock()\" \r\n\t\t\t\t\t\t[pTooltip]=\"sidebarIsLocked ? getLocalText(tooltipText.lockButton.locked) : getLocalText(tooltipText.lockButton.unlocked)\" \r\n\t\t\t\t\t\ttooltipPosition=\"left\">\r\n\t\t\t\t\t\t<i class=\"pi\" [ngClass]=\"sidebarIsLocked ? 'pi-lock' : 'pi-lock-open'\"></i>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<!-- Secondary sidebar content -->\r\n\t\t\t<div class=\"secondary-sidebar-content\">\r\n\t\t\t\t@if(selectedMainMenuItem){\r\n\t\t\t\t\t<ul class=\"secondary-menu\">\r\n\t\t\t\t\t\t@for(subItem of selectedMainMenuItem.items; track subItem; let i = $index){\r\n\t\t\t\t\t\t\t\t<!-- Create menu item -->\r\n\t\t\t\t\t\t\t\t<li class=\"secondary-menu-item\" [ngClass]=\"{'active': isActiveRoute(subItem)}\">\r\n\t\t\t\t\t\t\t\t\t<a [routerLink]=\"subItem.routerLink\" \r\n\t\t\t\t\t\t\t\t\t\tclass=\"secondary-menu-link\"\r\n\t\t\t\t\t\t\t\t\t\t[pTooltip]=\"!isMobile() && isTextTruncated(subItem.label, activeLang(), 'secondary') ? (subItem.label && activeLang() ? subItem.label[activeLang()!] || '' : '') : ''\"\r\n\t\t\t\t\t\t\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t\t\t\t\t\t\t<i [ngClass]=\"subItem.icon\" class=\"submenu-icon\"></i>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\"submenu-label\">{{ subItem.label && activeLang() ? subItem.label[activeLang()!] || '' : '' }}</span>\r\n\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t<!-- Always render submenu if it exists -->\r\n\t\t\t\t\t\t\t\t\t @if(subItem.items && subItem.items.length > 0){\r\n\t\t\t\t\t\t\t\t\t\t <ul class=\"tertiary-menu always-open\">\r\n\t\t\t\t\t\t\t\t\t\t\t@for(childItem of subItem.items; track childItem; let i = $index){\r\n\t\t\t\t\t\t\t\t\t\t\t\t<li class=\"tertiary-menu-item\" [ngClass]=\"{'active': isActiveRoute(childItem)}\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<a [routerLink]=\"childItem.routerLink\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"tertiary-menu-link\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[pTooltip]=\"!isMobile() && isTextTruncated(childItem.label, activeLang(), 'tertiary') ? (childItem.label && activeLang() ? childItem.label[activeLang()!] || '' : '') : ''\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"tertiary-label\">{{ childItem.label && activeLang() ? childItem.label[activeLang()!] || '' : '' }}</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- Always render deeper levels if they exist, also visible by default -->\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t@if(childItem.items && childItem.items.length > 0){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ul class=\"nested-menu always-open\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@for(nestedItem of childItem.items; track nestedItem; let i = $index){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"nested-menu-item\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[ngClass]=\"{'active': isActiveRoute(nestedItem)}\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a [routerLink]=\"nestedItem.routerLink\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"nested-menu-link\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[pTooltip]=\"!isMobile() && isTextTruncated(nestedItem.label, activeLang(), 'nested') ? (nestedItem.label && activeLang() ? nestedItem.label[activeLang()!] || '' : '') : ''\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"nested-label\">{{ nestedItem.label && activeLang() ? nestedItem.label[activeLang()!] || '' : '' }}</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t </ul>\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n</div>\r\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type:
|
|
2311
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ExpandableMenuComponent, deps: [{ token: i1$3.TranslateJsonPipe }, { token: AppMenuService }, { token: i1$1.Router }, { token: i2$1.KeycloakService }, { token: i4.TranslocoService }, { token: LayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2312
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: ExpandableMenuComponent, isStandalone: true, selector: "app-expandable-menu", host: { listeners: { "window:resize": "onResize()" } }, providers: [TranslateJsonPipe], ngImport: i0, template: "<div class=\"new-layout-sidebar\">\r\n\t<!-- Main sidebar (first level) -->\r\n\t<div class=\"main-sidebar\">\r\n\t\t<div class=\"main-sidebar-header\">\r\n\t\t\t<div class=\"user-avatar\">\r\n\t\t\t\t<span>{{ username }}</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"main-sidebar-content\">\r\n\t\t\t<ul class=\"main-menu\">\r\n\t\t\t\t@for(item of getMenuItems(); track item; let i = $index){\r\n\t\t\t\t\t@if(!item.separator){\r\n\t\t\t\t\t\t<li\r\n\t\t\t\t\t\t[ngClass]=\"{'active': isActiveRoute(item) || isHaveSelectedChildItem(item)}\"\r\n\t\t\t\t\t\t(click)=\"selectMainItem(i, item)\"\r\n\t\t\t\t\t\t[pTooltip]=\"!isMobile() && isTextTruncated(item.label, activeLang(), 'main') ? (item.label && activeLang() ? item.label[activeLang()!] || '' : '') : ''\"\r\n\t\t\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t\t\t<div class=\"main-menu-item\">\r\n\t\t\t\t\t\t\t<i [ngClass]=\"item.icon\" class=\"menu-icon\"></i>\r\n\t\t\t\t\t\t\t<small class=\"menu-label\">{{ item.label && activeLang() ? item.label[activeLang()!] || '' : '' }}</small>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t</ul>\r\n\t\t</div>\r\n\t\t<!-- Toggle button at the bottom of main sidebar -->\r\n\t\t<div class=\"main-sidebar-footer\">\r\n\t\t\t<button class=\"sidebar-toggle-button\" (click)=\"toggleSecondarySidebar()\" \r\n\t\t\t\t[pTooltip]=\"!isMobile() ? (secondarySidebarExpanded ? getLocalText(tooltipText.toggleButton.expanded) : getLocalText(tooltipText.toggleButton.collapsed)) : ''\" \r\n\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t<i class=\"pi\" [ngClass]=\"secondarySidebarExpanded ? 'pi-angle-left' : 'pi-angle-right'\"></i>\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<!-- Secondary sidebar (second level) -->\r\n\t<div class=\"secondary-sidebar\" [ngClass]=\"{'expanded': secondarySidebarExpanded}\">\r\n\t\t<!-- Content container wrapper to prevent jumps during transitions -->\r\n\t\t<div class=\"secondary-content-wrapper\">\r\n\t\t\t<!-- Secondary sidebar header -->\r\n\t\t\t<div class=\"secondary-sidebar-header\">\r\n\t\t\t\t<div class=\"secondary-header-content\">\r\n\t\t\t\t\t@if(selectedMainMenuItem){\r\n\t\t\t\t\t\t<h3 class=\"section-title\">\r\n\t\t\t\t\t\t\t<i [ngClass]=\"selectedMainMenuItem.icon\" class=\"section-icon\"></i>\r\n\t\t\t\t\t\t\t<span>{{ selectedMainMenuItem.label && activeLang() ? selectedMainMenuItem.label[activeLang()!] || '' : '' }}</span>\r\n\t\t\t\t\t\t</h3>\r\n\t\t\t\t\t}\r\n\t\t\t\t\t<button class=\"sidebar-lock-button\" (click)=\"toggleSidebarLock()\" \r\n\t\t\t\t\t\t[pTooltip]=\"sidebarIsLocked ? getLocalText(tooltipText.lockButton.locked) : getLocalText(tooltipText.lockButton.unlocked)\" \r\n\t\t\t\t\t\ttooltipPosition=\"left\">\r\n\t\t\t\t\t\t<i class=\"pi\" [ngClass]=\"sidebarIsLocked ? 'pi-lock' : 'pi-lock-open'\"></i>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<!-- Secondary sidebar content -->\r\n\t\t\t<div class=\"secondary-sidebar-content\">\r\n\t\t\t\t@if(selectedMainMenuItem){\r\n\t\t\t\t\t<ul class=\"secondary-menu\">\r\n\t\t\t\t\t\t@for(subItem of selectedMainMenuItem.items; track subItem; let i = $index){\r\n\t\t\t\t\t\t\t\t<!-- Create menu item -->\r\n\t\t\t\t\t\t\t\t<li class=\"secondary-menu-item\" [ngClass]=\"{'active': isActiveRoute(subItem)}\">\r\n\t\t\t\t\t\t\t\t\t<a [routerLink]=\"subItem.routerLink\" \r\n\t\t\t\t\t\t\t\t\t\tclass=\"secondary-menu-link\"\r\n\t\t\t\t\t\t\t\t\t\t[pTooltip]=\"!isMobile() && isTextTruncated(subItem.label, activeLang(), 'secondary') ? (subItem.label && activeLang() ? subItem.label[activeLang()!] || '' : '') : ''\"\r\n\t\t\t\t\t\t\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t\t\t\t\t\t\t<i [ngClass]=\"subItem.icon\" class=\"submenu-icon\"></i>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\"submenu-label\">{{ subItem.label && activeLang() ? subItem.label[activeLang()!] || '' : '' }}</span>\r\n\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t<!-- Always render submenu if it exists -->\r\n\t\t\t\t\t\t\t\t\t @if(subItem.items && subItem.items.length > 0){\r\n\t\t\t\t\t\t\t\t\t\t <ul class=\"tertiary-menu always-open\">\r\n\t\t\t\t\t\t\t\t\t\t\t@for(childItem of subItem.items; track childItem; let i = $index){\r\n\t\t\t\t\t\t\t\t\t\t\t\t<li class=\"tertiary-menu-item\" [ngClass]=\"{'active': isActiveRoute(childItem)}\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<a [routerLink]=\"childItem.routerLink\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"tertiary-menu-link\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[pTooltip]=\"!isMobile() && isTextTruncated(childItem.label, activeLang(), 'tertiary') ? (childItem.label && activeLang() ? childItem.label[activeLang()!] || '' : '') : ''\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"tertiary-label\">{{ childItem.label && activeLang() ? childItem.label[activeLang()!] || '' : '' }}</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- Always render deeper levels if they exist, also visible by default -->\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t@if(childItem.items && childItem.items.length > 0){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ul class=\"nested-menu always-open\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@for(nestedItem of childItem.items; track nestedItem; let i = $index){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"nested-menu-item\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[ngClass]=\"{'active': isActiveRoute(nestedItem)}\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a [routerLink]=\"nestedItem.routerLink\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"nested-menu-link\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[pTooltip]=\"!isMobile() && isTextTruncated(nestedItem.label, activeLang(), 'nested') ? (nestedItem.label && activeLang() ? nestedItem.label[activeLang()!] || '' : '') : ''\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"nested-label\">{{ nestedItem.label && activeLang() ? nestedItem.label[activeLang()!] || '' : '' }}</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t </ul>\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n</div>\r\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i9.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] }); }
|
|
1194
2313
|
}
|
|
1195
2314
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ExpandableMenuComponent, decorators: [{
|
|
1196
2315
|
type: Component,
|
|
1197
2316
|
args: [{ standalone: true, selector: 'app-expandable-menu', imports: [RouterLink, NgClass, TooltipModule], providers: [TranslateJsonPipe], template: "<div class=\"new-layout-sidebar\">\r\n\t<!-- Main sidebar (first level) -->\r\n\t<div class=\"main-sidebar\">\r\n\t\t<div class=\"main-sidebar-header\">\r\n\t\t\t<div class=\"user-avatar\">\r\n\t\t\t\t<span>{{ username }}</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"main-sidebar-content\">\r\n\t\t\t<ul class=\"main-menu\">\r\n\t\t\t\t@for(item of getMenuItems(); track item; let i = $index){\r\n\t\t\t\t\t@if(!item.separator){\r\n\t\t\t\t\t\t<li\r\n\t\t\t\t\t\t[ngClass]=\"{'active': isActiveRoute(item) || isHaveSelectedChildItem(item)}\"\r\n\t\t\t\t\t\t(click)=\"selectMainItem(i, item)\"\r\n\t\t\t\t\t\t[pTooltip]=\"!isMobile() && isTextTruncated(item.label, activeLang(), 'main') ? (item.label && activeLang() ? item.label[activeLang()!] || '' : '') : ''\"\r\n\t\t\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t\t\t<div class=\"main-menu-item\">\r\n\t\t\t\t\t\t\t<i [ngClass]=\"item.icon\" class=\"menu-icon\"></i>\r\n\t\t\t\t\t\t\t<small class=\"menu-label\">{{ item.label && activeLang() ? item.label[activeLang()!] || '' : '' }}</small>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t</ul>\r\n\t\t</div>\r\n\t\t<!-- Toggle button at the bottom of main sidebar -->\r\n\t\t<div class=\"main-sidebar-footer\">\r\n\t\t\t<button class=\"sidebar-toggle-button\" (click)=\"toggleSecondarySidebar()\" \r\n\t\t\t\t[pTooltip]=\"!isMobile() ? (secondarySidebarExpanded ? getLocalText(tooltipText.toggleButton.expanded) : getLocalText(tooltipText.toggleButton.collapsed)) : ''\" \r\n\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t<i class=\"pi\" [ngClass]=\"secondarySidebarExpanded ? 'pi-angle-left' : 'pi-angle-right'\"></i>\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<!-- Secondary sidebar (second level) -->\r\n\t<div class=\"secondary-sidebar\" [ngClass]=\"{'expanded': secondarySidebarExpanded}\">\r\n\t\t<!-- Content container wrapper to prevent jumps during transitions -->\r\n\t\t<div class=\"secondary-content-wrapper\">\r\n\t\t\t<!-- Secondary sidebar header -->\r\n\t\t\t<div class=\"secondary-sidebar-header\">\r\n\t\t\t\t<div class=\"secondary-header-content\">\r\n\t\t\t\t\t@if(selectedMainMenuItem){\r\n\t\t\t\t\t\t<h3 class=\"section-title\">\r\n\t\t\t\t\t\t\t<i [ngClass]=\"selectedMainMenuItem.icon\" class=\"section-icon\"></i>\r\n\t\t\t\t\t\t\t<span>{{ selectedMainMenuItem.label && activeLang() ? selectedMainMenuItem.label[activeLang()!] || '' : '' }}</span>\r\n\t\t\t\t\t\t</h3>\r\n\t\t\t\t\t}\r\n\t\t\t\t\t<button class=\"sidebar-lock-button\" (click)=\"toggleSidebarLock()\" \r\n\t\t\t\t\t\t[pTooltip]=\"sidebarIsLocked ? getLocalText(tooltipText.lockButton.locked) : getLocalText(tooltipText.lockButton.unlocked)\" \r\n\t\t\t\t\t\ttooltipPosition=\"left\">\r\n\t\t\t\t\t\t<i class=\"pi\" [ngClass]=\"sidebarIsLocked ? 'pi-lock' : 'pi-lock-open'\"></i>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<!-- Secondary sidebar content -->\r\n\t\t\t<div class=\"secondary-sidebar-content\">\r\n\t\t\t\t@if(selectedMainMenuItem){\r\n\t\t\t\t\t<ul class=\"secondary-menu\">\r\n\t\t\t\t\t\t@for(subItem of selectedMainMenuItem.items; track subItem; let i = $index){\r\n\t\t\t\t\t\t\t\t<!-- Create menu item -->\r\n\t\t\t\t\t\t\t\t<li class=\"secondary-menu-item\" [ngClass]=\"{'active': isActiveRoute(subItem)}\">\r\n\t\t\t\t\t\t\t\t\t<a [routerLink]=\"subItem.routerLink\" \r\n\t\t\t\t\t\t\t\t\t\tclass=\"secondary-menu-link\"\r\n\t\t\t\t\t\t\t\t\t\t[pTooltip]=\"!isMobile() && isTextTruncated(subItem.label, activeLang(), 'secondary') ? (subItem.label && activeLang() ? subItem.label[activeLang()!] || '' : '') : ''\"\r\n\t\t\t\t\t\t\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t\t\t\t\t\t\t<i [ngClass]=\"subItem.icon\" class=\"submenu-icon\"></i>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\"submenu-label\">{{ subItem.label && activeLang() ? subItem.label[activeLang()!] || '' : '' }}</span>\r\n\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t<!-- Always render submenu if it exists -->\r\n\t\t\t\t\t\t\t\t\t @if(subItem.items && subItem.items.length > 0){\r\n\t\t\t\t\t\t\t\t\t\t <ul class=\"tertiary-menu always-open\">\r\n\t\t\t\t\t\t\t\t\t\t\t@for(childItem of subItem.items; track childItem; let i = $index){\r\n\t\t\t\t\t\t\t\t\t\t\t\t<li class=\"tertiary-menu-item\" [ngClass]=\"{'active': isActiveRoute(childItem)}\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<a [routerLink]=\"childItem.routerLink\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"tertiary-menu-link\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[pTooltip]=\"!isMobile() && isTextTruncated(childItem.label, activeLang(), 'tertiary') ? (childItem.label && activeLang() ? childItem.label[activeLang()!] || '' : '') : ''\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"tertiary-label\">{{ childItem.label && activeLang() ? childItem.label[activeLang()!] || '' : '' }}</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- Always render deeper levels if they exist, also visible by default -->\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t@if(childItem.items && childItem.items.length > 0){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ul class=\"nested-menu always-open\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@for(nestedItem of childItem.items; track nestedItem; let i = $index){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"nested-menu-item\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[ngClass]=\"{'active': isActiveRoute(nestedItem)}\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a [routerLink]=\"nestedItem.routerLink\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"nested-menu-link\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[pTooltip]=\"!isMobile() && isTextTruncated(nestedItem.label, activeLang(), 'nested') ? (nestedItem.label && activeLang() ? nestedItem.label[activeLang()!] || '' : '') : ''\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttooltipPosition=\"right\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"nested-label\">{{ nestedItem.label && activeLang() ? nestedItem.label[activeLang()!] || '' : '' }}</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t </ul>\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n</div>\r\n" }]
|
|
1198
|
-
}], ctorParameters: () => [{ type: i1$
|
|
2317
|
+
}], ctorParameters: () => [{ type: i1$3.TranslateJsonPipe }, { type: AppMenuService }, { type: i1$1.Router }, { type: i2$1.KeycloakService }, { type: i4.TranslocoService }, { type: LayoutService }], propDecorators: { onResize: [{
|
|
1199
2318
|
type: HostListener,
|
|
1200
2319
|
args: ['window:resize']
|
|
1201
2320
|
}] } });
|
|
@@ -1302,8 +2421,8 @@ class AppLayoutComponent {
|
|
|
1302
2421
|
this.menuOutsideClickListener();
|
|
1303
2422
|
}
|
|
1304
2423
|
}
|
|
1305
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppLayoutComponent, deps: [{ token: AppMenuService }, { token: LayoutService }, { token: i0.Renderer2 }, { token:
|
|
1306
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: AppLayoutComponent, isStandalone: true, selector: "app-layout", viewQueries: [{ propertyName: "appSidebar", first: true, predicate: AppSidebarComponent, descendants: true }, { propertyName: "expandableMenuComponent", first: true, predicate: ExpandableMenuComponent, descendants: true }, { propertyName: "appTopbar", first: true, predicate: AppTopbarComponent, descendants: true }], ngImport: i0, template: "<div class=\"layout-container\" [ngClass]=\"containerClass\">\r\n\t\t<app-expandable-menu />\r\n\t\t<!-- <app-sidebar />\t -->\r\n\t\t<div class=\"layout-content-wrapper\">\r\n\t\t<app-topbar />\r\n\t\t<div class=\"layout-content card\">\r\n\t\t\t<router-outlet />\r\n\t\t</div>\r\n\t</div>\r\n\t<app-profilemenu />\r\n\t<!--<app-config></app-config>-->\r\n\t<app-chatbot></app-chatbot>\r\n\t<div class=\"layout-mask\"></div>\r\n</div>\r\n\r\n<p-toast key=\"toast-root\" />\r\n<p-dialog key=\"dialog-root\" />\r\n<p-messages key=\"messages-root\" />\r\n<p-confirmPopup key=\"confirmPopup-root\" />\r\n<p-confirmDialog key=\"confirmDialog-root\" />\r\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type:
|
|
2424
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppLayoutComponent, deps: [{ token: AppMenuService }, { token: LayoutService }, { token: i0.Renderer2 }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2425
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: AppLayoutComponent, isStandalone: true, selector: "app-layout", viewQueries: [{ propertyName: "appSidebar", first: true, predicate: AppSidebarComponent, descendants: true }, { propertyName: "expandableMenuComponent", first: true, predicate: ExpandableMenuComponent, descendants: true }, { propertyName: "appTopbar", first: true, predicate: AppTopbarComponent, descendants: true }], ngImport: i0, template: "<div class=\"layout-container\" [ngClass]=\"containerClass\">\r\n\t\t<app-expandable-menu />\r\n\t\t<!-- <app-sidebar />\t -->\r\n\t\t<div class=\"layout-content-wrapper\">\r\n\t\t<app-topbar />\r\n\t\t<div class=\"layout-content card\">\r\n\t\t\t<router-outlet />\r\n\t\t</div>\r\n\t</div>\r\n\t<app-profilemenu />\r\n\t<app-history-sidebar />\r\n\t<app-site-map-sidebar />\r\n\t<app-favorite-pages-sidebar />\r\n\t<!--<app-config></app-config>-->\r\n\t<app-chatbot></app-chatbot>\r\n\t<div class=\"layout-mask\"></div>\r\n</div>\r\n\r\n<p-toast key=\"toast-root\" />\r\n<p-dialog key=\"dialog-root\" />\r\n<p-messages key=\"messages-root\" />\r\n<p-confirmPopup key=\"confirmPopup-root\" />\r\n<p-confirmDialog key=\"confirmDialog-root\" />\r\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i8.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "ngmodule", type: ConfirmPopupModule }, { kind: "component", type: i5.ConfirmPopup, selector: "p-confirmPopup", inputs: ["key", "defaultFocus", "showTransitionOptions", "hideTransitionOptions", "autoZIndex", "baseZIndex", "style", "styleClass", "visible"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i6$4.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i7$3.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: ToastModule }, { kind: "component", type: i8$3.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "component", type: AppTopbarComponent, selector: "app-topbar" }, { kind: "component", type: AppProfileSidebarComponent, selector: "app-profilemenu" }, { kind: "component", type: HistorySidebarComponent, selector: "app-history-sidebar" }, { kind: "component", type: SiteMapSidebarComponent, selector: "app-site-map-sidebar" }, { kind: "component", type: FavoritePagesSidebarComponent, selector: "app-favorite-pages-sidebar" }, { kind: "component", type: AppChatbotComponent, selector: "app-chatbot" }, { kind: "component", type: ExpandableMenuComponent, selector: "app-expandable-menu" }] }); }
|
|
1307
2426
|
}
|
|
1308
2427
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppLayoutComponent, decorators: [{
|
|
1309
2428
|
type: Component,
|
|
@@ -1317,11 +2436,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
1317
2436
|
ToastModule,
|
|
1318
2437
|
AppTopbarComponent,
|
|
1319
2438
|
AppProfileSidebarComponent,
|
|
2439
|
+
HistorySidebarComponent,
|
|
2440
|
+
SiteMapSidebarComponent,
|
|
2441
|
+
FavoritePagesSidebarComponent,
|
|
1320
2442
|
AppChatbotComponent,
|
|
1321
2443
|
AppSidebarComponent,
|
|
1322
2444
|
ExpandableMenuComponent
|
|
1323
|
-
], template: "<div class=\"layout-container\" [ngClass]=\"containerClass\">\r\n\t\t<app-expandable-menu />\r\n\t\t<!-- <app-sidebar />\t -->\r\n\t\t<div class=\"layout-content-wrapper\">\r\n\t\t<app-topbar />\r\n\t\t<div class=\"layout-content card\">\r\n\t\t\t<router-outlet />\r\n\t\t</div>\r\n\t</div>\r\n\t<app-profilemenu />\r\n\t<!--<app-config></app-config>-->\r\n\t<app-chatbot></app-chatbot>\r\n\t<div class=\"layout-mask\"></div>\r\n</div>\r\n\r\n<p-toast key=\"toast-root\" />\r\n<p-dialog key=\"dialog-root\" />\r\n<p-messages key=\"messages-root\" />\r\n<p-confirmPopup key=\"confirmPopup-root\" />\r\n<p-confirmDialog key=\"confirmDialog-root\" />\r\n" }]
|
|
1324
|
-
}], ctorParameters: () => [{ type: AppMenuService }, { type: LayoutService }, { type: i0.Renderer2 }, { type:
|
|
2445
|
+
], template: "<div class=\"layout-container\" [ngClass]=\"containerClass\">\r\n\t\t<app-expandable-menu />\r\n\t\t<!-- <app-sidebar />\t -->\r\n\t\t<div class=\"layout-content-wrapper\">\r\n\t\t<app-topbar />\r\n\t\t<div class=\"layout-content card\">\r\n\t\t\t<router-outlet />\r\n\t\t</div>\r\n\t</div>\r\n\t<app-profilemenu />\r\n\t<app-history-sidebar />\r\n\t<app-site-map-sidebar />\r\n\t<app-favorite-pages-sidebar />\r\n\t<!--<app-config></app-config>-->\r\n\t<app-chatbot></app-chatbot>\r\n\t<div class=\"layout-mask\"></div>\r\n</div>\r\n\r\n<p-toast key=\"toast-root\" />\r\n<p-dialog key=\"dialog-root\" />\r\n<p-messages key=\"messages-root\" />\r\n<p-confirmPopup key=\"confirmPopup-root\" />\r\n<p-confirmDialog key=\"confirmDialog-root\" />\r\n" }]
|
|
2446
|
+
}], ctorParameters: () => [{ type: AppMenuService }, { type: LayoutService }, { type: i0.Renderer2 }, { type: i1$1.Router }], propDecorators: { appSidebar: [{
|
|
1325
2447
|
type: ViewChild,
|
|
1326
2448
|
args: [AppSidebarComponent]
|
|
1327
2449
|
}], expandableMenuComponent: [{
|
|
@@ -1335,7 +2457,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
1335
2457
|
class MFELayoutComponent {
|
|
1336
2458
|
constructor(router) {
|
|
1337
2459
|
this.router = router;
|
|
1338
|
-
this.loading = toSignal(this.router.events.pipe(map((event) => {
|
|
2460
|
+
this.loading = toSignal(this.router.events.pipe(map$1((event) => {
|
|
1339
2461
|
if (event instanceof NavigationEnd ||
|
|
1340
2462
|
event instanceof NavigationCancel ||
|
|
1341
2463
|
event instanceof NavigationError ||
|
|
@@ -1351,7 +2473,7 @@ class MFELayoutComponent {
|
|
|
1351
2473
|
// appMenu?.replaceChildren(...Array.from(subMenu.children));
|
|
1352
2474
|
// document.querySelector(subMenuId)?.remove();
|
|
1353
2475
|
}
|
|
1354
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: MFELayoutComponent, deps: [{ token:
|
|
2476
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: MFELayoutComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1355
2477
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: MFELayoutComponent, isStandalone: true, selector: "mfe-layout", ngImport: i0, template: `
|
|
1356
2478
|
<!-- <app-sub-menu hidden></app-sub-menu> -->
|
|
1357
2479
|
|
|
@@ -1364,7 +2486,7 @@ class MFELayoutComponent {
|
|
|
1364
2486
|
<p-messages key="messages-root"></p-messages>
|
|
1365
2487
|
<p-confirmPopup key="confirmPopup-root"></p-confirmPopup>
|
|
1366
2488
|
<p-confirmDialog key="confirmDialog-root"></p-confirmDialog>
|
|
1367
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type:
|
|
2489
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i8.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "ngmodule", type: ConfirmPopupModule }, { kind: "component", type: i5.ConfirmPopup, selector: "p-confirmPopup", inputs: ["key", "defaultFocus", "showTransitionOptions", "hideTransitionOptions", "autoZIndex", "baseZIndex", "style", "styleClass", "visible"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i6$4.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i7$3.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: ToastModule }, { kind: "component", type: i8$3.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }] }); }
|
|
1368
2490
|
}
|
|
1369
2491
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: MFELayoutComponent, decorators: [{
|
|
1370
2492
|
type: Component,
|
|
@@ -1386,7 +2508,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
1386
2508
|
`,
|
|
1387
2509
|
imports: [RouterOutlet, ConfirmDialogModule, ConfirmPopupModule, DialogModule, MessagesModule, ToastModule]
|
|
1388
2510
|
}]
|
|
1389
|
-
}], ctorParameters: () => [{ type:
|
|
2511
|
+
}], ctorParameters: () => [{ type: i1$1.Router }] });
|
|
1390
2512
|
|
|
1391
2513
|
class SelectionGroupService {
|
|
1392
2514
|
constructor(http) {
|
|
@@ -1438,7 +2560,7 @@ class SelectionGroupService {
|
|
|
1438
2560
|
isLoading(groupName) {
|
|
1439
2561
|
return this.loading.get(groupName) ?? false;
|
|
1440
2562
|
}
|
|
1441
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SelectionGroupService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2563
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SelectionGroupService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1442
2564
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SelectionGroupService, providedIn: 'root' }); }
|
|
1443
2565
|
}
|
|
1444
2566
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SelectionGroupService, decorators: [{
|
|
@@ -1446,7 +2568,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
1446
2568
|
args: [{
|
|
1447
2569
|
providedIn: 'root'
|
|
1448
2570
|
}]
|
|
1449
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
2571
|
+
}], ctorParameters: () => [{ type: i1$2.HttpClient }] });
|
|
1450
2572
|
|
|
1451
2573
|
/**
|
|
1452
2574
|
* Generated bundle index. Do not edit.
|