aril 1.2.19 → 1.2.20

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 (50) hide show
  1. package/boot/config/apps/src/interfaces.d.ts +2 -1
  2. package/esm2022/boot/config/api/src/interfaces.mjs +3 -2
  3. package/esm2022/boot/config/apps/src/interfaces.mjs +2 -1
  4. package/esm2022/boot/config/plugins/src/plugins.service.mjs +7 -5
  5. package/esm2022/boot/host/src/bootstrap.mjs +5 -3
  6. package/esm2022/boot/mfe/src/bootstrap.mjs +5 -3
  7. package/esm2022/keycloak/src/auth.interceptor.mjs +5 -2
  8. package/esm2022/theme/layout/app/topbar/app.topbar.component.mjs +16 -4
  9. package/esm2022/ui/button/src/button.component.mjs +5 -2
  10. package/esm2022/util/activity/aril-util-activity.mjs +5 -0
  11. package/esm2022/util/activity/index.mjs +4 -0
  12. package/esm2022/util/activity/src/activity.constants.mjs +4 -0
  13. package/esm2022/util/activity/src/activity.service.mjs +198 -0
  14. package/esm2022/util/activity/src/activity.types.mjs +2 -0
  15. package/fesm2022/{aril-app.component-Cw1MxAqD.mjs → aril-app.component-CwZZhJcO.mjs} +2 -1
  16. package/fesm2022/{aril-app.component-Cw1MxAqD.mjs.map → aril-app.component-CwZZhJcO.mjs.map} +1 -1
  17. package/fesm2022/aril-boot-config-api.mjs +2 -1
  18. package/fesm2022/aril-boot-config-api.mjs.map +1 -1
  19. package/fesm2022/aril-boot-config-apps.mjs +1 -0
  20. package/fesm2022/aril-boot-config-apps.mjs.map +1 -1
  21. package/fesm2022/aril-boot-config-plugins.mjs +6 -4
  22. package/fesm2022/aril-boot-config-plugins.mjs.map +1 -1
  23. package/fesm2022/aril-boot-host.mjs +4 -2
  24. package/fesm2022/aril-boot-host.mjs.map +1 -1
  25. package/fesm2022/{aril-boot-mfe-app.component-CCTntpyN.mjs → aril-boot-mfe-app.component-DwYgUUdL.mjs} +3 -2
  26. package/fesm2022/{aril-boot-mfe-app.component-CCTntpyN.mjs.map → aril-boot-mfe-app.component-DwYgUUdL.mjs.map} +1 -1
  27. package/fesm2022/{aril-boot-mfe-aril-boot-mfe-D8DZ-gT-.mjs → aril-boot-mfe-aril-boot-mfe-hJkkFa_a.mjs} +6 -4
  28. package/fesm2022/{aril-boot-mfe-aril-boot-mfe-D8DZ-gT-.mjs.map → aril-boot-mfe-aril-boot-mfe-hJkkFa_a.mjs.map} +1 -1
  29. package/fesm2022/aril-boot-mfe.mjs +2 -1
  30. package/fesm2022/aril-boot-mfe.mjs.map +1 -1
  31. package/fesm2022/aril-keycloak.mjs +4 -1
  32. package/fesm2022/aril-keycloak.mjs.map +1 -1
  33. package/fesm2022/aril-theme-layout.mjs +14 -3
  34. package/fesm2022/aril-theme-layout.mjs.map +1 -1
  35. package/fesm2022/aril-ui-button.mjs +4 -1
  36. package/fesm2022/aril-ui-button.mjs.map +1 -1
  37. package/fesm2022/aril-util-activity.mjs +208 -0
  38. package/fesm2022/aril-util-activity.mjs.map +1 -0
  39. package/fesm2022/aril.mjs +8 -5
  40. package/fesm2022/aril.mjs.map +1 -1
  41. package/package.json +213 -207
  42. package/theme/layout/app/topbar/app.topbar.component.d.ts +5 -0
  43. package/theme/layout/app/topbar/app.topbar.component.html +3 -0
  44. package/theme/layout/app/topbar/app.topbar.component.scss +31 -0
  45. package/theme/layout/app/topbar/app.topbar.component.ts +14 -1
  46. package/ui/button/src/button.component.d.ts +2 -0
  47. package/util/activity/index.d.ts +3 -0
  48. package/util/activity/src/activity.constants.d.ts +3 -0
  49. package/util/activity/src/activity.service.d.ts +29 -0
  50. package/util/activity/src/activity.types.d.ts +13 -0
@@ -15,6 +15,10 @@ export declare class AppTopbarComponent {
15
15
  layoutService: LayoutService;
16
16
  search: string;
17
17
  logoPath: string;
18
+ environmentBadge: {
19
+ code: string;
20
+ label: string;
21
+ } | null;
18
22
  currentFlagPath: string;
19
23
  currentLang: LanguageCode;
20
24
  languages: Language[];
@@ -30,6 +34,7 @@ export declare class AppTopbarComponent {
30
34
  private publishLanguageChange;
31
35
  setFlagPath(lang: LanguageCode): void;
32
36
  setLogoPath(): void;
37
+ private resolveEnvironment;
33
38
  static ɵfac: i0.ɵɵFactoryDeclaration<AppTopbarComponent, never>;
34
39
  static ɵcmp: i0.ɵɵComponentDeclaration<AppTopbarComponent, "app-topbar", never, {}, {}, never, never, true, never>;
35
40
  }
@@ -4,6 +4,9 @@
4
4
  <i class="pi pi-bars"></i>
5
5
  </button>
6
6
  <img [src]="logoPath" class="topbar-logo" alt="logo" />
7
+ @if (environmentBadge) {
8
+ <span class="env-indicator" [attr.data-co]="environmentBadge.code">{{ environmentBadge.label }}</span>
9
+ }
7
10
  </div>
8
11
 
9
12
  <div class="topbar-search" *transloco="let t; read: ''">
@@ -27,6 +27,37 @@
27
27
  }
28
28
  }
29
29
 
30
+ // Environment göstergesi (DEPSAŞ / DEDAŞ) — logonun sağında
31
+ .env-indicator {
32
+ align-self: center;
33
+ display: inline-flex;
34
+ align-items: center;
35
+ margin-left: 0.85rem;
36
+ padding: 0.6rem 1.6rem;
37
+ border-radius: 999px;
38
+ color: #fff;
39
+ font-weight: 700;
40
+ font-size: 1.3rem;
41
+ line-height: 1;
42
+ letter-spacing: 0.07em;
43
+ white-space: nowrap;
44
+ text-transform: uppercase;
45
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
46
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
47
+
48
+ &[data-co='depsas'] {
49
+ background: rgb(252 80 0);
50
+ }
51
+
52
+ &[data-co='dedas'] {
53
+ background: rgb(0 173 186);
54
+ }
55
+
56
+ @media (max-width: 768px) {
57
+ display: none; // logo ile birlikte mobile'da gizle
58
+ }
59
+ }
60
+
30
61
  .topbar-search {
31
62
  flex: 1;
32
63
  max-width: 50rem;
@@ -12,11 +12,12 @@ import { TranslocoModule, TranslocoService } from '@ngneat/transloco';
12
12
  import { KeycloakService } from 'keycloak-angular';
13
13
 
14
14
  import { bridge } from 'aril/boot/bridge';
15
+ import { API_CONFIGS } from 'aril/boot/config/api';
15
16
  import { Apps } from 'aril/boot/config/apps';
16
17
  import { PubSubService } from 'aril/util/pub-sub';
17
18
 
18
19
  import { LayoutService } from '../../service/app.layout.service';
19
- import { LanguageCode } from '../../service/interfaces/enum';
20
+ import { Environment, LanguageCode } from '../../service/interfaces/enum';
20
21
  import { Language, LanguageChangeEvent } from '../../service/interfaces/interfaces';
21
22
  import { GeneralSearchComponent } from '../general-search/general-search.component';
22
23
 
@@ -45,6 +46,7 @@ export class AppTopbarComponent {
45
46
  search: string = '';
46
47
 
47
48
  logoPath: string = '';
49
+ environmentBadge = this.resolveEnvironment();
48
50
  currentFlagPath: string = '';
49
51
  currentLang: LanguageCode = (localStorage.getItem('lang') as LanguageCode) || LanguageCode.TR;
50
52
 
@@ -172,4 +174,15 @@ export class AppTopbarComponent {
172
174
  }
173
175
  }
174
176
  }
177
+
178
+ private resolveEnvironment(): { code: string; label: string } | null {
179
+ switch (API_CONFIGS.environment) {
180
+ case Environment.PER:
181
+ return { code: 'depsas', label: 'DEPSAŞ' };
182
+ case Environment.DG:
183
+ return { code: 'dedas', label: 'DEDAŞ' };
184
+ default:
185
+ return null;
186
+ }
187
+ }
175
188
  }
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import { PrimeIcon } from 'aril/ui/lib';
3
+ import { ActivityService } from 'aril/util/activity';
3
4
  import * as i0 from "@angular/core";
4
5
  type Size = 'sm' | 'md' | 'lg';
5
6
  type Colors = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'help' | 'danger';
@@ -18,6 +19,7 @@ export declare class ButtonComponent {
18
19
  iconPos: import("@angular/core").InputSignal<ButtonIconPosition>;
19
20
  color: import("@angular/core").InputSignal<Colors>;
20
21
  clickEvent: EventEmitter<Event>;
22
+ protected readonly activity: ActivityService;
21
23
  _icon: import("@angular/core").Signal<string>;
22
24
  _color: import("@angular/core").Signal<string>;
23
25
  _styleClass: import("@angular/core").Signal<string>;
@@ -0,0 +1,3 @@
1
+ export * from './src/activity.service';
2
+ export * from './src/activity.types';
3
+ export * from './src/activity.constants';
@@ -0,0 +1,3 @@
1
+ export declare const ACTIVITY_ENDPOINT_PATH = "analytics/track";
2
+ export declare const ACTIVITY_SESSION_MARKER_PREFIX = "aril.activity.session:";
3
+ export declare const LOGGER_SESSION_HEADER = "x-aril-logger-session-id";
@@ -0,0 +1,29 @@
1
+ import { ActivityEventType } from './activity.types';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ActivityService {
4
+ private readonly keycloak;
5
+ private readonly router;
6
+ private readonly location;
7
+ private sessionId;
8
+ private username;
9
+ private previousPath;
10
+ private started;
11
+ getSessionId(): string | null;
12
+ start(options?: {
13
+ shellMode?: boolean;
14
+ }): void;
15
+ track(event: string, properties?: Record<string, unknown>, type?: ActivityEventType): void;
16
+ private readSessionIdFromKeycloak;
17
+ private captureSessionContext;
18
+ private subscribeKeycloakRefresh;
19
+ private subscribeLifecycleEvents;
20
+ private subscribeRouterEvents;
21
+ private maybeEmitPageView;
22
+ private handleSessionStart;
23
+ private purgeStaleSessionMarkers;
24
+ private sendSessionEnd;
25
+ private toAbsoluteUrl;
26
+ private send;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<ActivityService, never>;
28
+ static ɵprov: i0.ɵɵInjectableDeclaration<ActivityService>;
29
+ }
@@ -0,0 +1,13 @@
1
+ export type ActivityEventType = 'SESSION_START' | 'SESSION_END' | 'PAGE_VIEW' | 'BUTTON_CLICK' | 'CUSTOM';
2
+ export interface ActivityEvent {
3
+ type: ActivityEventType;
4
+ sessionId: string;
5
+ username: string;
6
+ event: string;
7
+ page: string;
8
+ ip: string;
9
+ referrer: string;
10
+ traceId: string;
11
+ clientTimestamp?: number;
12
+ properties: Record<string, unknown>;
13
+ }