aril 1.2.24 → 1.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/boot/config/api/src/interfaces.d.ts +1 -0
  2. package/esm2022/boot/config/api/src/interfaces.mjs +2 -1
  3. package/esm2022/theme/layout/app/environment-banner/environment-banner.component.mjs +36 -0
  4. package/esm2022/theme/layout/app/layout/app.layout.component.mjs +5 -3
  5. package/esm2022/theme/layout/app/profileSidebar/app.profilesidebar.component.mjs +64 -22
  6. package/esm2022/theme/layout/app/static-sidebar/static-sidebar.component.mjs +3 -3
  7. package/esm2022/theme/layout/app/topbar/app.topbar.component.mjs +8 -3
  8. package/esm2022/ui/table/src/table.component.mjs +8 -1
  9. package/fesm2022/aril-boot-config-api.mjs +1 -0
  10. package/fesm2022/aril-boot-config-api.mjs.map +1 -1
  11. package/fesm2022/aril-theme-layout.mjs +166 -87
  12. package/fesm2022/aril-theme-layout.mjs.map +1 -1
  13. package/fesm2022/aril-ui-table.mjs +7 -0
  14. package/fesm2022/aril-ui-table.mjs.map +1 -1
  15. package/package.json +217 -217
  16. package/theme/layout/app/environment-banner/environment-banner.component.d.ts +13 -0
  17. package/theme/layout/app/environment-banner/environment-banner.component.html +10 -0
  18. package/theme/layout/app/environment-banner/environment-banner.component.scss +103 -0
  19. package/theme/layout/app/environment-banner/environment-banner.component.ts +39 -0
  20. package/theme/layout/app/layout/app.layout.component.html +1 -0
  21. package/theme/layout/app/layout/app.layout.component.ts +2 -0
  22. package/theme/layout/app/profileSidebar/app.profilesidebar.component.d.ts +20 -0
  23. package/theme/layout/app/profileSidebar/app.profilesidebar.component.html +49 -111
  24. package/theme/layout/app/profileSidebar/app.profilesidebar.component.scss +344 -152
  25. package/theme/layout/app/profileSidebar/app.profilesidebar.component.ts +81 -19
  26. package/theme/layout/app/static-sidebar/static-sidebar.component.scss +1 -1
  27. package/theme/layout/app/topbar/app.topbar.component.d.ts +2 -0
  28. package/theme/layout/app/topbar/app.topbar.component.html +1 -1
  29. package/theme/layout/app/topbar/app.topbar.component.scss +1 -0
  30. package/theme/layout/app/topbar/app.topbar.component.ts +6 -0
  31. package/theme/styles/layout/_content.scss +2 -2
  32. package/theme/styles/layout/_expanded_sidebar.scss +1 -1
  33. package/theme/styles/layout/_main.scss +7 -0
  34. package/theme/styles/layout/_topbar.scss +1 -1
@@ -1,152 +1,344 @@
1
- // Modern Profile Sidebar - Matching App UI
2
- :host {
3
- .layout-profile-sidebar {
4
- .p-sidebar-content {
5
- padding: 0;
6
- background: var(--surface-0, #ffffff);
7
- color: var(--text-color, #333);
8
- height: 100vh;
9
- overflow-y: auto;
10
- position: relative;
11
- }
12
- }
13
-
14
- // Content Section
15
- .profile-content {
16
- padding: 1rem 0.75rem;
17
- padding-bottom: 12rem;
18
- display: flex;
19
- flex-direction: column;
20
- gap: 1.25rem;
21
- }
22
-
23
- // Fixed Action Buttons Container - Sadece sidebar içinde
24
- .action-buttons-container {
25
- width: 100%;
26
- position: absolute;
27
- bottom: 0;
28
- left: 0;
29
- right: 0;
30
- background: var(--surface-0, #ffffff);
31
- border-top: 1px solid var(--surface-border, #e2e8f0);
32
- padding: 1rem 0.75rem;
33
- z-index: 300;
34
- }
35
-
36
- // Info Sections - Modern Flat Design
37
- .info-section {
38
- .section-title {
39
- font-size: 1.25rem;
40
- font-weight: 500;
41
- color: var(--text-color-secondary, #64748b);
42
- margin: 0 0 1rem 0;
43
- padding-bottom: 0.5rem;
44
- border-bottom: 1px solid var(--surface-border, #e2e8f0);
45
- display: flex;
46
- align-items: center;
47
- gap: 0.5rem;
48
- text-transform: uppercase;
49
- letter-spacing: 0.5px;
50
-
51
- i {
52
- color: var(--text-color-secondary, #64748b);
53
- font-size: 1rem;
54
- }
55
- }
56
-
57
- .info-items {
58
- display: flex;
59
- flex-direction: column;
60
- gap: 0;
61
- }
62
-
63
- .info-item {
64
- display: flex;
65
- align-items: center;
66
- gap: 0.75rem;
67
- padding: 0.75rem 0;
68
- border-bottom: 1px solid var(--surface-border, #f1f5f9);
69
-
70
- &:last-child {
71
- border-bottom: none;
72
- }
73
-
74
- .info-icon {
75
- color: var(--text-color-secondary, #64748b);
76
- font-size: 1rem;
77
- flex-shrink: 0;
78
- width: 1.25rem;
79
- text-align: center;
80
- }
81
-
82
- .info-content {
83
- flex: 1;
84
- display: flex;
85
- flex-direction: column;
86
- gap: 0.25rem;
87
-
88
- .info-label {
89
- font-size: 0.95rem;
90
- color: var(--text-color-secondary, #64748b);
91
- font-weight: 500;
92
- line-height: 1;
93
- }
94
-
95
- .info-value {
96
- font-size: 0.95rem;
97
- color: var(--text-color, #1e293b);
98
- font-weight: 400;
99
- line-height: 1.3;
100
-
101
- &.status {
102
- display: inline-flex;
103
- align-items: center;
104
- padding: 0.25rem 0.75rem;
105
- border-radius: 16px;
106
- font-size: 0.8rem;
107
- font-weight: 600;
108
- text-transform: uppercase;
109
- letter-spacing: 0.025em;
110
- width: fit-content;
111
- background: var(--red-100, #fee2e2);
112
- color: var(--red-700, #b91c1c);
113
- border: 1px solid var(--red-200, #fecaca);
114
-
115
- &.active {
116
- background: var(--green-100, #dcfce7);
117
- color: var(--green-700, #15803d);
118
- border: 1px solid var(--green-200, #bbf7d0);
119
- }
120
- }
121
- }
122
- }
123
- }
124
-
125
- }
126
-
127
- // Responsive Design
128
- @media (max-width: 768px) {
129
- .profile-content {
130
- padding: 0.875rem 0.65rem;
131
- padding-bottom: 11rem;
132
- gap: 1rem;
133
- }
134
-
135
- .action-buttons-container {
136
- padding: 0.875rem 0.65rem;
137
-
138
- .action-buttons-vertical {
139
- gap: 0.65rem;
140
- }
141
-
142
- .action-buttons-horizontal {
143
- gap: 0.4rem;
144
- }
145
- }
146
-
147
- .info-item {
148
- padding: 0.65rem 0;
149
- }
150
- }
151
-
152
- }
1
+ // Kişisel Bilgiler slide-over paneli — design_handoff_kisisel_bilgiler_sidebar (hifi)
2
+ :host ::ng-deep {
3
+ .layout-profile-sidebar {
4
+ width: 330px;
5
+ max-width: 100vw;
6
+ box-shadow: -24px 0 60px -24px rgba(24, 28, 38, 0.28);
7
+
8
+ .p-sidebar-header {
9
+ display: none;
10
+ }
11
+
12
+ .p-sidebar-content {
13
+ padding: 0;
14
+ height: 100%;
15
+ overflow: hidden;
16
+ }
17
+ }
18
+ }
19
+
20
+ .profile-panel {
21
+ // Kurum accent rengi — topbar env-indicator ile aynı data-co pattern'i
22
+ --pf-accent: var(--primary-color, #4c63c7);
23
+
24
+ &[data-co='depsas'] {
25
+ --pf-accent: rgb(252 80 0);
26
+ }
27
+
28
+ &[data-co='dedas'] {
29
+ --pf-accent: rgb(0 173 186);
30
+ }
31
+
32
+ height: 100%;
33
+ display: flex;
34
+ flex-direction: column;
35
+ background: #ffffff;
36
+ }
37
+
38
+ // 1. Hero header
39
+ .panel-hero {
40
+ position: relative;
41
+ flex-shrink: 0;
42
+ padding: 14px 24px 20px;
43
+ background: var(--pf-accent);
44
+ color: #fff;
45
+ overflow: hidden;
46
+
47
+ &::before,
48
+ &::after {
49
+ content: '';
50
+ position: absolute;
51
+ border-radius: 50%;
52
+ }
53
+
54
+ &::before {
55
+ top: -70px;
56
+ right: -50px;
57
+ width: 200px;
58
+ height: 200px;
59
+ background: rgba(255, 255, 255, 0.08);
60
+ }
61
+
62
+ &::after {
63
+ bottom: -90px;
64
+ left: -40px;
65
+ width: 180px;
66
+ height: 180px;
67
+ background: rgba(255, 255, 255, 0.06);
68
+ }
69
+ }
70
+
71
+ .hero-top {
72
+ position: relative;
73
+ z-index: 1;
74
+ display: flex;
75
+ align-items: center;
76
+ justify-content: space-between;
77
+ }
78
+
79
+ .hero-title {
80
+ display: flex;
81
+ align-items: center;
82
+ gap: 9px;
83
+
84
+ i {
85
+ font-size: 20px;
86
+ opacity: 0.9;
87
+ }
88
+
89
+ span {
90
+ font-size: 13px;
91
+ font-weight: 600;
92
+ letter-spacing: 0.02em;
93
+ opacity: 0.92;
94
+ }
95
+ }
96
+
97
+ .hero-close {
98
+ width: 30px;
99
+ height: 30px;
100
+ border: none;
101
+ border-radius: 10px;
102
+ background: rgba(255, 255, 255, 0.14);
103
+ color: #fff;
104
+ display: flex;
105
+ align-items: center;
106
+ justify-content: center;
107
+ cursor: pointer;
108
+ transition: background 0.18s;
109
+
110
+ i {
111
+ font-size: 14px;
112
+ }
113
+
114
+ &:hover {
115
+ background: rgba(255, 255, 255, 0.28);
116
+ }
117
+
118
+ &:focus-visible {
119
+ outline: 2px solid rgba(255, 255, 255, 0.85);
120
+ outline-offset: 2px;
121
+ }
122
+ }
123
+
124
+ .hero-profile {
125
+ position: relative;
126
+ z-index: 1;
127
+ display: flex;
128
+ align-items: center;
129
+ gap: 16px;
130
+ margin-top: 22px;
131
+ }
132
+
133
+ .hero-avatar {
134
+ width: 66px;
135
+ height: 66px;
136
+ flex-shrink: 0;
137
+ border-radius: 20px;
138
+ background: rgba(255, 255, 255, 0.18);
139
+ border: 1px solid rgba(255, 255, 255, 0.35);
140
+ display: flex;
141
+ align-items: center;
142
+ justify-content: center;
143
+ font-size: 22px;
144
+ font-weight: 700;
145
+ letter-spacing: 0.01em;
146
+ }
147
+
148
+ .hero-identity {
149
+ min-width: 0;
150
+ }
151
+
152
+ .hero-name {
153
+ font-size: 18px;
154
+ font-weight: 700;
155
+ line-height: 1.2;
156
+ }
157
+
158
+ .hero-username {
159
+ display: flex;
160
+ align-items: center;
161
+ gap: 6px;
162
+ margin-top: 5px;
163
+ font-size: 12px;
164
+ opacity: 0.85;
165
+
166
+ i {
167
+ font-size: 14px;
168
+ flex-shrink: 0;
169
+ }
170
+
171
+ span {
172
+ overflow: hidden;
173
+ text-overflow: ellipsis;
174
+ white-space: nowrap;
175
+ }
176
+ }
177
+
178
+ // 2. Bilgi listesi
179
+ .info-list {
180
+ flex: 1;
181
+ min-height: 0;
182
+ overflow-y: auto;
183
+ padding: 8px 12px 12px;
184
+ }
185
+
186
+ .info-row {
187
+ display: flex;
188
+ align-items: center;
189
+ gap: 14px;
190
+ padding: 13px 12px;
191
+ border-radius: 14px;
192
+ transition: background 0.16s;
193
+
194
+ &:hover {
195
+ background: #f6f7f9;
196
+ }
197
+ }
198
+
199
+ .row-icon {
200
+ width: 40px;
201
+ height: 40px;
202
+ flex-shrink: 0;
203
+ border-radius: 12px;
204
+ display: flex;
205
+ align-items: center;
206
+ justify-content: center;
207
+
208
+ i {
209
+ font-size: 21px;
210
+ }
211
+
212
+ &.tint-cool {
213
+ background: #eef1fb;
214
+ color: #4c63c7;
215
+ }
216
+
217
+ &.tint-accent {
218
+ background: color-mix(in srgb, var(--pf-accent) 9%, transparent);
219
+ color: var(--pf-accent);
220
+ }
221
+
222
+ &.tint-teal {
223
+ background: #e7f4f3;
224
+ color: #1d8a82;
225
+ }
226
+ }
227
+
228
+ .row-body {
229
+ min-width: 0;
230
+ flex: 1;
231
+ }
232
+
233
+ .row-label {
234
+ font-size: 11px;
235
+ font-weight: 600;
236
+ letter-spacing: 0.04em;
237
+ text-transform: uppercase;
238
+ color: #98a0ad;
239
+ }
240
+
241
+ .row-value {
242
+ font-size: 14px;
243
+ font-weight: 500;
244
+ color: #242a33;
245
+ margin-top: 2px;
246
+ overflow: hidden;
247
+ text-overflow: ellipsis;
248
+ white-space: nowrap;
249
+
250
+ &.empty {
251
+ color: #b4bac3;
252
+ }
253
+ }
254
+
255
+ .row-badge {
256
+ display: inline-flex;
257
+ align-items: center;
258
+ gap: 5px;
259
+ margin-top: 5px;
260
+ padding: 3px 11px;
261
+ border-radius: 999px;
262
+ font-size: 11.5px;
263
+ font-weight: 600;
264
+
265
+ .badge-dot {
266
+ width: 6px;
267
+ height: 6px;
268
+ border-radius: 50%;
269
+ background: currentColor;
270
+ flex-shrink: 0;
271
+ }
272
+
273
+ &.tone-green {
274
+ background: #e7f5ec;
275
+ color: #1e8a4c;
276
+ }
277
+
278
+ &.tone-red {
279
+ background: #fdecec;
280
+ color: #d0342c;
281
+ }
282
+
283
+ &.tone-neutral {
284
+ background: #eef0f3;
285
+ color: #6b7480;
286
+ }
287
+ }
288
+
289
+ // 3. Footer
290
+ .panel-footer {
291
+ flex-shrink: 0;
292
+ padding: 14px 20px 20px;
293
+ border-top: 1px solid #eef0f3;
294
+ }
295
+
296
+ // Theme buton diliyle hizalı: $borderRadius 6px, $raisedButtonShadow, $transitionDuration 0.2s
297
+ .logout-btn {
298
+ width: 100%;
299
+ height: 40px;
300
+ border: none;
301
+ border-radius: 6px;
302
+ background: var(--pf-accent);
303
+ color: #fff;
304
+ font-family: inherit;
305
+ font-size: 14px;
306
+ font-weight: 500;
307
+ display: flex;
308
+ align-items: center;
309
+ justify-content: center;
310
+ gap: 7px;
311
+ cursor: pointer;
312
+ box-shadow:
313
+ 0 3px 1px -2px rgba(0, 0, 0, 0.2),
314
+ 0 2px 2px 0 rgba(0, 0, 0, 0.14),
315
+ 0 1px 5px 0 rgba(0, 0, 0, 0.12);
316
+ transition:
317
+ background-color 0.2s,
318
+ box-shadow 0.2s;
319
+
320
+ i {
321
+ font-size: 16px;
322
+ }
323
+
324
+ &:hover {
325
+ background: color-mix(in srgb, var(--pf-accent) 92%, #000);
326
+ }
327
+
328
+ &:active {
329
+ background: color-mix(in srgb, var(--pf-accent) 85%, #000);
330
+ }
331
+
332
+ &:focus-visible {
333
+ outline: 2px solid var(--pf-accent);
334
+ outline-offset: 3px;
335
+ }
336
+ }
337
+
338
+ @media (prefers-reduced-motion: reduce) {
339
+ .info-row,
340
+ .hero-close,
341
+ .logout-btn {
342
+ transition: none;
343
+ }
344
+ }
@@ -1,40 +1,36 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, OnInit, effect, signal } from '@angular/core';
1
+ import { Component, OnInit, computed, effect, signal } from '@angular/core';
3
2
  import { toSignal } from '@angular/core/rxjs-interop';
4
3
 
5
- import { AvatarModule } from 'primeng/avatar';
6
- import { ButtonModule } from 'primeng/button';
7
- import { ChipModule } from 'primeng/chip';
8
4
  import { DialogService } from 'primeng/dynamicdialog';
9
5
  import { SidebarModule } from 'primeng/sidebar';
10
- import { SkeletonModule } from 'primeng/skeleton';
11
- import { TagModule } from 'primeng/tag';
12
6
 
13
7
  import { TranslocoModule, TranslocoService } from '@ngneat/transloco';
14
8
  import { KeycloakService } from 'keycloak-angular';
15
9
  import { Subject, switchMap } from 'rxjs';
16
10
 
17
- import { ButtonComponent } from 'aril/ui/button';
11
+ import { API_CONFIGS } from 'aril/boot/config/api';
18
12
 
19
13
  import { LayoutService } from '../../service/app.layout.service';
14
+ import { Environment } from '../../service/interfaces/enum';
20
15
  import { ChangePasswordModalComponent } from './modals/change-password-modal/change-password-modal.component';
21
16
  import { EditProfileModalComponent } from './modals/edit-profile-modal/edit-profile-modal.component';
22
17
  import { GetUserRequestDTO, ProfileService, UserResponseDTO } from './profile.service';
23
18
 
19
+ type ProfileIconTint = 'cool' | 'accent' | 'teal';
20
+ type ProfileBadgeTone = 'green' | 'red' | 'neutral';
21
+
22
+ interface ProfileRow {
23
+ icon: string;
24
+ labelKey: string;
25
+ tint: ProfileIconTint;
26
+ value?: string | null;
27
+ badge?: { tone: ProfileBadgeTone; labelKey?: string; label?: string };
28
+ }
29
+
24
30
  @Component({
25
31
  standalone: true,
26
32
  selector: 'app-profilemenu',
27
- imports: [
28
- CommonModule,
29
- SidebarModule,
30
- TagModule,
31
- ButtonModule,
32
- SkeletonModule,
33
- AvatarModule,
34
- ChipModule,
35
- TranslocoModule,
36
- ButtonComponent
37
- ],
33
+ imports: [SidebarModule, TranslocoModule],
38
34
  templateUrl: './app.profilesidebar.component.html',
39
35
  styleUrls: ['./app.profilesidebar.component.scss'],
40
36
  providers: [DialogService]
@@ -42,6 +38,56 @@ import { GetUserRequestDTO, ProfileService, UserResponseDTO } from './profile.se
42
38
  export class AppProfileSidebarComponent implements OnInit {
43
39
  username: string;
44
40
  userProfile = signal<UserResponseDTO | null>(null);
41
+ envCode = this.resolveEnvironmentCode();
42
+
43
+ displayName = computed(() => {
44
+ const profile = this.userProfile();
45
+ const fullName = profile ? `${profile.firstName ?? ''} ${profile.lastName ?? ''}`.trim() : '';
46
+ return fullName || this.username;
47
+ });
48
+
49
+ initials = computed(() =>
50
+ this.displayName()
51
+ .trim()
52
+ .split(/\s+/)
53
+ .filter(Boolean)
54
+ .slice(0, 2)
55
+ .map((word) => word[0])
56
+ .join('')
57
+ .toLocaleUpperCase('tr')
58
+ );
59
+
60
+ rows = computed<ProfileRow[]>(() => {
61
+ const profile = this.userProfile();
62
+ if (!profile) return [];
63
+
64
+ const clientOfSystemUser = this.asText(profile.clientOfSystemUser);
65
+
66
+ return [
67
+ { icon: 'pi-id-card', labelKey: 'tcNumber', tint: 'cool', value: this.asText(profile.tckn) },
68
+ { icon: 'pi-envelope', labelKey: 'email', tint: 'accent', value: this.asText(profile.email) },
69
+ { icon: 'pi-phone', labelKey: 'phone', tint: 'teal', value: this.asText(profile.phone) },
70
+ { icon: 'pi-at', labelKey: 'username', tint: 'cool', value: this.asText(profile.userName) },
71
+ {
72
+ icon: 'pi-verified',
73
+ labelKey: 'accountStatus',
74
+ tint: 'teal',
75
+ badge: profile.enabled ? { tone: 'green', labelKey: 'active' } : { tone: 'red', labelKey: 'inactive' }
76
+ },
77
+ {
78
+ icon: 'pi-shield',
79
+ labelKey: 'systemUser',
80
+ tint: 'accent',
81
+ badge: profile.systemUser ? { tone: 'green', labelKey: 'yes' } : { tone: 'red', labelKey: 'no' }
82
+ },
83
+ {
84
+ icon: 'pi-building',
85
+ labelKey: 'clientSystemUser',
86
+ tint: 'cool',
87
+ badge: clientOfSystemUser ? { tone: 'green', label: clientOfSystemUser } : { tone: 'neutral', labelKey: 'no' }
88
+ }
89
+ ];
90
+ });
45
91
 
46
92
  private subjects = {
47
93
  getUser: new Subject<GetUserRequestDTO>()
@@ -83,6 +129,22 @@ export class AppProfileSidebarComponent implements OnInit {
83
129
  }
84
130
  }
85
131
 
132
+ private resolveEnvironmentCode(): string | null {
133
+ switch (API_CONFIGS.environment) {
134
+ case Environment.PER:
135
+ return 'depsas';
136
+ case Environment.DG:
137
+ return 'dedas';
138
+ default:
139
+ return null;
140
+ }
141
+ }
142
+
143
+ private asText(value?: string | string[] | null): string | null {
144
+ const text = (Array.isArray(value) ? value.filter(Boolean).join(', ') : (value ?? '')).trim();
145
+ return text.length ? text : null;
146
+ }
147
+
86
148
  get visible(): boolean {
87
149
  return this.layoutService.state.profileSidebarVisible;
88
150
  }
@@ -63,7 +63,7 @@
63
63
  flex-direction: column;
64
64
  position: fixed;
65
65
  left: 0;
66
- top: 55px; // Adjust based on topbar height
66
+ top: calc(55px + var(--env-banner-h, 0px)); // Adjust based on topbar height
67
67
  z-index: 999;
68
68
  overflow-y: auto;
69
69
  overflow-x: hidden;
@@ -13,6 +13,7 @@ export declare class AppTopbarComponent {
13
13
  menuButton: ElementRef;
14
14
  username: string;
15
15
  layoutService: LayoutService;
16
+ private readonly router;
16
17
  search: string;
17
18
  logoPath: string;
18
19
  environmentBadge: {
@@ -25,6 +26,7 @@ export declare class AppTopbarComponent {
25
26
  constructor(translocoService: TranslocoService, pubSubService: PubSubService, keycloak: KeycloakService);
26
27
  get unreadCount(): number;
27
28
  onMenuButtonClick(): void;
29
+ onLogoClick(): void;
28
30
  onProfileButtonClick(): void;
29
31
  onHistoryButtonClick(): void;
30
32
  onSiteMapButtonClick(): void;
@@ -3,7 +3,7 @@
3
3
  <button #menubutton type="button" class="topbar-menubutton p-link p-trigger" (click)="onMenuButtonClick()">
4
4
  <i class="pi pi-bars"></i>
5
5
  </button>
6
- <img [src]="logoPath" class="topbar-logo" alt="logo" />
6
+ <img [src]="logoPath" class="topbar-logo" alt="logo" (click)="onLogoClick()" />
7
7
  @if (environmentBadge) {
8
8
  <span class="env-indicator" [attr.data-co]="environmentBadge.code">{{ environmentBadge.label }}</span>
9
9
  }
@@ -21,6 +21,7 @@
21
21
  .topbar-logo {
22
22
  height: 36px;
23
23
  width: auto;
24
+ cursor: pointer;
24
25
 
25
26
  @media (max-width: 768px) {
26
27
  display: none; // Logo'yu mobile'da gizle