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.
- package/boot/config/api/src/interfaces.d.ts +1 -0
- package/esm2022/boot/config/api/src/interfaces.mjs +2 -1
- package/esm2022/theme/layout/app/environment-banner/environment-banner.component.mjs +36 -0
- package/esm2022/theme/layout/app/layout/app.layout.component.mjs +5 -3
- package/esm2022/theme/layout/app/profileSidebar/app.profilesidebar.component.mjs +64 -22
- package/esm2022/theme/layout/app/static-sidebar/static-sidebar.component.mjs +3 -3
- package/esm2022/theme/layout/app/topbar/app.topbar.component.mjs +8 -3
- package/esm2022/ui/table/src/table.component.mjs +8 -1
- package/fesm2022/aril-boot-config-api.mjs +1 -0
- package/fesm2022/aril-boot-config-api.mjs.map +1 -1
- package/fesm2022/aril-theme-layout.mjs +166 -87
- package/fesm2022/aril-theme-layout.mjs.map +1 -1
- package/fesm2022/aril-ui-table.mjs +7 -0
- package/fesm2022/aril-ui-table.mjs.map +1 -1
- package/package.json +217 -217
- package/theme/layout/app/environment-banner/environment-banner.component.d.ts +13 -0
- package/theme/layout/app/environment-banner/environment-banner.component.html +10 -0
- package/theme/layout/app/environment-banner/environment-banner.component.scss +103 -0
- package/theme/layout/app/environment-banner/environment-banner.component.ts +39 -0
- package/theme/layout/app/layout/app.layout.component.html +1 -0
- package/theme/layout/app/layout/app.layout.component.ts +2 -0
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.d.ts +20 -0
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.html +49 -111
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.scss +344 -152
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.ts +81 -19
- package/theme/layout/app/static-sidebar/static-sidebar.component.scss +1 -1
- package/theme/layout/app/topbar/app.topbar.component.d.ts +2 -0
- package/theme/layout/app/topbar/app.topbar.component.html +1 -1
- package/theme/layout/app/topbar/app.topbar.component.scss +1 -0
- package/theme/layout/app/topbar/app.topbar.component.ts +6 -0
- package/theme/styles/layout/_content.scss +2 -2
- package/theme/styles/layout/_expanded_sidebar.scss +1 -1
- package/theme/styles/layout/_main.scss +7 -0
- package/theme/styles/layout/_topbar.scss +1 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// Ortam uyarı banner'ı — design_handoff_ortam_banner (hifi, kompakt varyant)
|
|
2
|
+
.env-banner {
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
height: 30px;
|
|
8
|
+
z-index: 99999; // modal/dropdown dahil her overlay'in üzerinde kalmalı
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
gap: 12px;
|
|
13
|
+
padding: 0 16px;
|
|
14
|
+
font-size: 12px;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
letter-spacing: 0.07em;
|
|
17
|
+
text-transform: uppercase;
|
|
18
|
+
color: #ffffff;
|
|
19
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
|
|
20
|
+
|
|
21
|
+
&.env-prod {
|
|
22
|
+
background: #b91c1c;
|
|
23
|
+
|
|
24
|
+
.env-dot {
|
|
25
|
+
background: #fde047;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.env-preprod {
|
|
30
|
+
background: #c2410c;
|
|
31
|
+
|
|
32
|
+
.env-dot {
|
|
33
|
+
background: #fed7aa;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.env-stage {
|
|
38
|
+
background: #1d4ed8;
|
|
39
|
+
|
|
40
|
+
.env-dot {
|
|
41
|
+
background: #bfdbfe;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.env-uat {
|
|
46
|
+
background: #7e22ce;
|
|
47
|
+
|
|
48
|
+
.env-dot {
|
|
49
|
+
background: #e9d5ff;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.env-dev {
|
|
54
|
+
background: #15803d;
|
|
55
|
+
|
|
56
|
+
.env-dot {
|
|
57
|
+
background: #bbf7d0;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.env-dot {
|
|
63
|
+
width: 10px;
|
|
64
|
+
height: 10px;
|
|
65
|
+
border-radius: 50%;
|
|
66
|
+
flex-shrink: 0;
|
|
67
|
+
animation: env-pulse 1.4s ease-in-out infinite;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.env-label {
|
|
71
|
+
font-weight: 800;
|
|
72
|
+
white-space: nowrap;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.env-sep {
|
|
76
|
+
opacity: 0.7;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.env-user {
|
|
80
|
+
min-width: 0;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
text-overflow: ellipsis;
|
|
83
|
+
white-space: nowrap;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@keyframes env-pulse {
|
|
87
|
+
0%,
|
|
88
|
+
100% {
|
|
89
|
+
opacity: 1;
|
|
90
|
+
transform: scale(1);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
50% {
|
|
94
|
+
opacity: 0.45;
|
|
95
|
+
transform: scale(0.8);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@media (prefers-reduced-motion: reduce) {
|
|
100
|
+
.env-dot {
|
|
101
|
+
animation: none;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
import { TranslocoModule } from '@ngneat/transloco';
|
|
4
|
+
import { KeycloakService } from 'keycloak-angular';
|
|
5
|
+
|
|
6
|
+
import { API_CONFIGS } from 'aril/boot/config/api';
|
|
7
|
+
|
|
8
|
+
type EnvVariant = 'prod' | 'preprod' | 'stage' | 'uat' | 'dev';
|
|
9
|
+
|
|
10
|
+
const ENV_VARIANTS: Record<string, EnvVariant> = {
|
|
11
|
+
PROD: 'prod',
|
|
12
|
+
PREPROD: 'preprod',
|
|
13
|
+
STAGE: 'stage',
|
|
14
|
+
UAT: 'uat',
|
|
15
|
+
DEV: 'dev'
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
@Component({
|
|
19
|
+
standalone: true,
|
|
20
|
+
selector: 'app-environment-banner',
|
|
21
|
+
imports: [TranslocoModule],
|
|
22
|
+
templateUrl: './environment-banner.component.html',
|
|
23
|
+
styleUrls: ['./environment-banner.component.scss']
|
|
24
|
+
})
|
|
25
|
+
export class EnvironmentBannerComponent {
|
|
26
|
+
// envLabel tanımlı değilse banner hiç render edilmez (template'te @if (code))
|
|
27
|
+
code = (API_CONFIGS.envLabel || '').trim().toUpperCase();
|
|
28
|
+
// Tanımlı ama bilinmeyen değer PROD (kırmızı) davranışına düşer — fail-safe
|
|
29
|
+
variant: EnvVariant = ENV_VARIANTS[this.code] ?? 'prod';
|
|
30
|
+
username = '';
|
|
31
|
+
|
|
32
|
+
constructor(private readonly keycloak: KeycloakService) {
|
|
33
|
+
try {
|
|
34
|
+
this.username = this.keycloak.getUsername();
|
|
35
|
+
} catch {
|
|
36
|
+
this.username = '';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -12,6 +12,7 @@ import { Subscription, filter } from 'rxjs';
|
|
|
12
12
|
|
|
13
13
|
import { LayoutService } from '../../service/app.layout.service';
|
|
14
14
|
import { AppMenuService } from '../../service/app.menu.service';
|
|
15
|
+
import { EnvironmentBannerComponent } from '../environment-banner/environment-banner.component';
|
|
15
16
|
import { AppProfileSidebarComponent } from '../profileSidebar/app.profilesidebar.component';
|
|
16
17
|
import { HistorySidebarComponent } from '../history/history-sidebar.component';
|
|
17
18
|
import { SiteMapSidebarComponent } from '../site-map/site-map-sidebar.component';
|
|
@@ -33,6 +34,7 @@ import { NotificationsSidebarComponent } from '../notifications/notifications-si
|
|
|
33
34
|
MessagesModule,
|
|
34
35
|
ToastModule,
|
|
35
36
|
AppTopbarComponent,
|
|
37
|
+
EnvironmentBannerComponent,
|
|
36
38
|
AppProfileSidebarComponent,
|
|
37
39
|
HistorySidebarComponent,
|
|
38
40
|
SiteMapSidebarComponent,
|
|
@@ -5,6 +5,19 @@ import { KeycloakService } from 'keycloak-angular';
|
|
|
5
5
|
import { LayoutService } from '../../service/app.layout.service';
|
|
6
6
|
import { ProfileService, UserResponseDTO } from './profile.service';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
+
type ProfileIconTint = 'cool' | 'accent' | 'teal';
|
|
9
|
+
type ProfileBadgeTone = 'green' | 'red' | 'neutral';
|
|
10
|
+
interface ProfileRow {
|
|
11
|
+
icon: string;
|
|
12
|
+
labelKey: string;
|
|
13
|
+
tint: ProfileIconTint;
|
|
14
|
+
value?: string | null;
|
|
15
|
+
badge?: {
|
|
16
|
+
tone: ProfileBadgeTone;
|
|
17
|
+
labelKey?: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
8
21
|
export declare class AppProfileSidebarComponent implements OnInit {
|
|
9
22
|
layoutService: LayoutService;
|
|
10
23
|
private readonly keycloak;
|
|
@@ -13,12 +26,18 @@ export declare class AppProfileSidebarComponent implements OnInit {
|
|
|
13
26
|
private readonly translocoService;
|
|
14
27
|
username: string;
|
|
15
28
|
userProfile: import("@angular/core").WritableSignal<UserResponseDTO | null>;
|
|
29
|
+
envCode: string | null;
|
|
30
|
+
displayName: import("@angular/core").Signal<string>;
|
|
31
|
+
initials: import("@angular/core").Signal<string>;
|
|
32
|
+
rows: import("@angular/core").Signal<ProfileRow[]>;
|
|
16
33
|
private subjects;
|
|
17
34
|
getUserService: import("@angular/core").Signal<import("../../../../../../dist/http").ServiceResponse<UserResponseDTO> | undefined>;
|
|
18
35
|
constructor(layoutService: LayoutService, keycloak: KeycloakService, profileService: ProfileService, dialogService: DialogService, translocoService: TranslocoService);
|
|
19
36
|
ngOnInit(): void;
|
|
20
37
|
private initializeEffects;
|
|
21
38
|
private loadUserProfile;
|
|
39
|
+
private resolveEnvironmentCode;
|
|
40
|
+
private asText;
|
|
22
41
|
get visible(): boolean;
|
|
23
42
|
set visible(_val: boolean);
|
|
24
43
|
logout(): void;
|
|
@@ -27,3 +46,4 @@ export declare class AppProfileSidebarComponent implements OnInit {
|
|
|
27
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppProfileSidebarComponent, never>;
|
|
28
47
|
static ɵcmp: i0.ɵɵComponentDeclaration<AppProfileSidebarComponent, "app-profilemenu", never, {}, {}, never, never, true, never>;
|
|
29
48
|
}
|
|
49
|
+
export {};
|
|
@@ -1,122 +1,60 @@
|
|
|
1
1
|
<p-sidebar
|
|
2
2
|
[(visible)]="visible"
|
|
3
3
|
position="right"
|
|
4
|
-
[
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<i class="pi pi-id-card info-icon"></i>
|
|
27
|
-
<div class="info-content">
|
|
28
|
-
<span class="info-label">{{ t('tcNumber') }}</span>
|
|
29
|
-
<span class="info-value">{{ userProfile()?.tckn || '' }}</span>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
<div class="info-item">
|
|
34
|
-
<i class="pi pi-envelope info-icon"></i>
|
|
35
|
-
<div class="info-content">
|
|
36
|
-
<span class="info-label">{{ t('email') }}</span>
|
|
37
|
-
<span class="info-value">{{ userProfile()?.email || '' }}</span>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<div class="info-item">
|
|
42
|
-
<i class="pi pi-phone info-icon"></i>
|
|
43
|
-
<div class="info-content">
|
|
44
|
-
<span class="info-label">{{ t('phone') }}</span>
|
|
45
|
-
<span class="info-value">{{ userProfile()?.phone || '' }}</span>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
<div class="info-item">
|
|
50
|
-
<i class="pi pi-at info-icon"></i>
|
|
51
|
-
<div class="info-content">
|
|
52
|
-
<span class="info-label">{{ t('username') }}</span>
|
|
53
|
-
<span class="info-value">{{ userProfile()?.userName }}</span>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<div class="info-item">
|
|
58
|
-
<i class="pi pi-check-circle info-icon"></i>
|
|
59
|
-
<div class="info-content">
|
|
60
|
-
<span class="info-label">{{ t('accountStatus') }}</span>
|
|
61
|
-
<span class="info-value status" [class.active]="userProfile()?.enabled">
|
|
62
|
-
{{ userProfile()?.enabled ? t('active') : t('inactive') }}
|
|
63
|
-
</span>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<div class="info-item">
|
|
68
|
-
<i class="pi pi-user info-icon"></i>
|
|
69
|
-
<div class="info-content">
|
|
70
|
-
<span class="info-label">{{ t('systemUser') }}</span>
|
|
71
|
-
<span class="info-value status" [class.active]="userProfile()?.systemUser">
|
|
72
|
-
{{ userProfile()?.systemUser ? t('yes') : t('no') }}
|
|
73
|
-
</span>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
<div class="info-item">
|
|
78
|
-
<i class="pi pi-building info-icon"></i>
|
|
79
|
-
<div class="info-content">
|
|
80
|
-
<span class="info-label">{{ t('clientSystemUser') }}</span>
|
|
81
|
-
<span class="info-value">{{ userProfile()?.clientOfSystemUser }}</span>
|
|
4
|
+
[showCloseIcon]="false"
|
|
5
|
+
[transitionOptions]="'.45s cubic-bezier(0.22, 0.61, 0.36, 1)'"
|
|
6
|
+
styleClass="layout-profile-sidebar">
|
|
7
|
+
<ng-container *transloco="let t; read: 'profileSidebar'">
|
|
8
|
+
<div class="profile-panel" [attr.data-co]="envCode">
|
|
9
|
+
<div class="panel-hero">
|
|
10
|
+
<div class="hero-top">
|
|
11
|
+
<div class="hero-title">
|
|
12
|
+
<i class="pi pi-user"></i>
|
|
13
|
+
<span>{{ t('personalInfo') }}</span>
|
|
14
|
+
</div>
|
|
15
|
+
<button type="button" class="hero-close" [attr.aria-label]="t('close')" (click)="visible = false">
|
|
16
|
+
<i class="pi pi-times"></i>
|
|
17
|
+
</button>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="hero-profile">
|
|
20
|
+
<div class="hero-avatar">{{ initials() }}</div>
|
|
21
|
+
<div class="hero-identity">
|
|
22
|
+
<div class="hero-name">{{ displayName() }}</div>
|
|
23
|
+
<div class="hero-username">
|
|
24
|
+
<i class="pi pi-at"></i>
|
|
25
|
+
<span>{{ userProfile()?.userName || username }}</span>
|
|
82
26
|
</div>
|
|
83
27
|
</div>
|
|
84
28
|
</div>
|
|
85
29
|
</div>
|
|
86
|
-
</div>
|
|
87
|
-
}
|
|
88
30
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
31
|
+
<div class="info-list">
|
|
32
|
+
@for (row of rows(); track row.labelKey) {
|
|
33
|
+
<div class="info-row">
|
|
34
|
+
<div class="row-icon tint-{{ row.tint }}">
|
|
35
|
+
<i class="pi {{ row.icon }}"></i>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="row-body">
|
|
38
|
+
<div class="row-label">{{ t(row.labelKey) }}</div>
|
|
39
|
+
@if (row.badge) {
|
|
40
|
+
<span class="row-badge tone-{{ row.badge.tone }}">
|
|
41
|
+
<span class="badge-dot"></span>
|
|
42
|
+
{{ row.badge.label || t(row.badge.labelKey!) }}
|
|
43
|
+
</span>
|
|
44
|
+
} @else {
|
|
45
|
+
<div class="row-value" [class.empty]="!row.value">{{ row.value || t('notSpecified') }}</div>
|
|
46
|
+
}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
}
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div class="panel-footer">
|
|
53
|
+
<button type="button" class="logout-btn" (click)="logout()">
|
|
54
|
+
<i class="pi pi-sign-out"></i>
|
|
55
|
+
{{ t('logout') }}
|
|
56
|
+
</button>
|
|
110
57
|
</div>
|
|
111
|
-
<aril-button
|
|
112
|
-
[label]="t('logout')"
|
|
113
|
-
icon="SIGN_OUT"
|
|
114
|
-
color="danger"
|
|
115
|
-
[outlined]="false"
|
|
116
|
-
size="sm"
|
|
117
|
-
class="col-12"
|
|
118
|
-
(clickEvent)="logout()">
|
|
119
|
-
</aril-button>
|
|
120
58
|
</div>
|
|
121
|
-
|
|
59
|
+
</ng-container>
|
|
122
60
|
</p-sidebar>
|