aril 1.2.19 → 1.2.21
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/apps/src/interfaces.d.ts +2 -1
- package/esm2022/boot/config/api/src/interfaces.mjs +3 -2
- package/esm2022/boot/config/apps/src/interfaces.mjs +2 -1
- package/esm2022/boot/config/plugins/src/plugins.service.mjs +7 -5
- package/esm2022/boot/host/src/bootstrap.mjs +5 -3
- package/esm2022/boot/mfe/src/bootstrap.mjs +5 -3
- package/esm2022/keycloak/src/auth.interceptor.mjs +5 -2
- package/esm2022/theme/layout/app/topbar/app.topbar.component.mjs +16 -4
- package/esm2022/ui/button/src/button.component.mjs +5 -2
- package/esm2022/ui/translate-input/src/aril-lang-modal/aril-lang-modal.component.mjs +2 -2
- package/esm2022/ui-business/enumPicker/src/enum-picker.component.mjs +94 -13
- package/esm2022/ui-business/enumPicker/src/interface.mjs +1 -1
- package/esm2022/util/activity/aril-util-activity.mjs +5 -0
- package/esm2022/util/activity/index.mjs +4 -0
- package/esm2022/util/activity/src/activity.constants.mjs +4 -0
- package/esm2022/util/activity/src/activity.service.mjs +198 -0
- package/esm2022/util/activity/src/activity.types.mjs +2 -0
- package/fesm2022/{aril-app.component-Cw1MxAqD.mjs → aril-app.component-CwZZhJcO.mjs} +2 -1
- package/fesm2022/{aril-app.component-Cw1MxAqD.mjs.map → aril-app.component-CwZZhJcO.mjs.map} +1 -1
- package/fesm2022/aril-boot-config-api.mjs +2 -1
- package/fesm2022/aril-boot-config-api.mjs.map +1 -1
- package/fesm2022/aril-boot-config-apps.mjs +1 -0
- package/fesm2022/aril-boot-config-apps.mjs.map +1 -1
- package/fesm2022/aril-boot-config-plugins.mjs +6 -4
- package/fesm2022/aril-boot-config-plugins.mjs.map +1 -1
- package/fesm2022/aril-boot-host.mjs +4 -2
- package/fesm2022/aril-boot-host.mjs.map +1 -1
- package/fesm2022/{aril-boot-mfe-app.component-CCTntpyN.mjs → aril-boot-mfe-app.component-DwYgUUdL.mjs} +3 -2
- package/fesm2022/{aril-boot-mfe-app.component-CCTntpyN.mjs.map → aril-boot-mfe-app.component-DwYgUUdL.mjs.map} +1 -1
- package/fesm2022/{aril-boot-mfe-aril-boot-mfe-D8DZ-gT-.mjs → aril-boot-mfe-aril-boot-mfe-hJkkFa_a.mjs} +6 -4
- package/fesm2022/{aril-boot-mfe-aril-boot-mfe-D8DZ-gT-.mjs.map → aril-boot-mfe-aril-boot-mfe-hJkkFa_a.mjs.map} +1 -1
- package/fesm2022/aril-boot-mfe.mjs +2 -1
- package/fesm2022/aril-boot-mfe.mjs.map +1 -1
- package/fesm2022/aril-keycloak.mjs +4 -1
- package/fesm2022/aril-keycloak.mjs.map +1 -1
- package/fesm2022/aril-theme-layout.mjs +14 -3
- package/fesm2022/aril-theme-layout.mjs.map +1 -1
- package/fesm2022/aril-ui-business-enumPicker.mjs +93 -12
- package/fesm2022/aril-ui-business-enumPicker.mjs.map +1 -1
- package/fesm2022/aril-ui-button.mjs +4 -1
- package/fesm2022/aril-ui-button.mjs.map +1 -1
- package/fesm2022/aril-ui-translate-input.mjs +1 -1
- package/fesm2022/aril-ui-translate-input.mjs.map +1 -1
- package/fesm2022/aril-util-activity.mjs +208 -0
- package/fesm2022/aril-util-activity.mjs.map +1 -0
- package/fesm2022/aril.mjs +8 -5
- package/fesm2022/aril.mjs.map +1 -1
- package/package.json +240 -234
- package/theme/layout/app/topbar/app.topbar.component.d.ts +5 -0
- package/theme/layout/app/topbar/app.topbar.component.html +3 -0
- package/theme/layout/app/topbar/app.topbar.component.scss +31 -0
- package/theme/layout/app/topbar/app.topbar.component.ts +14 -1
- package/ui/button/src/button.component.d.ts +2 -0
- package/ui-business/enumPicker/src/enum-picker.component.d.ts +11 -2
- package/ui-business/enumPicker/src/interface.d.ts +4 -0
- package/util/activity/index.d.ts +3 -0
- package/util/activity/src/activity.constants.d.ts +3 -0
- package/util/activity/src/activity.service.d.ts +29 -0
- 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>;
|
|
@@ -3,7 +3,7 @@ import { EventEmitter } from '@angular/core';
|
|
|
3
3
|
import { TranslocoService } from '@ngneat/transloco';
|
|
4
4
|
import DataSource from 'devextreme/data/data_source';
|
|
5
5
|
import { BaseInputComponent } from 'aril/ui/lib';
|
|
6
|
-
import { SelectBoxItem } from './interface';
|
|
6
|
+
import { GroupedSelectionItem, SelectBoxItem } from './interface';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
import * as i1 from "aril/ui/lib";
|
|
9
9
|
export declare class EnumPickerComponent extends BaseInputComponent {
|
|
@@ -11,7 +11,11 @@ export declare class EnumPickerComponent extends BaseInputComponent {
|
|
|
11
11
|
translocoService: TranslocoService;
|
|
12
12
|
selectionItems: import("@angular/core").WritableSignal<SelectBoxItem[] | null>;
|
|
13
13
|
selectBoxDataSource: import("@angular/core").WritableSignal<DataSource<any, any> | null>;
|
|
14
|
+
groupedSelectionItems: import("@angular/core").WritableSignal<GroupedSelectionItem[] | null>;
|
|
15
|
+
isGrouped: import("@angular/core").WritableSignal<boolean>;
|
|
14
16
|
private originalSelectionItems;
|
|
17
|
+
private rawParentItems;
|
|
18
|
+
private rawGroups;
|
|
15
19
|
/**
|
|
16
20
|
* Single Select States
|
|
17
21
|
*/
|
|
@@ -19,6 +23,7 @@ export declare class EnumPickerComponent extends BaseInputComponent {
|
|
|
19
23
|
itemText: import("@angular/core").InputSignal<string>;
|
|
20
24
|
groupName: import("@angular/core").InputSignal<string>;
|
|
21
25
|
parentSelectionKey: import("@angular/core").InputSignal<null>;
|
|
26
|
+
parentGroupName: import("@angular/core").InputSignal<string>;
|
|
22
27
|
tabindex: import("@angular/core").InputSignal<number>;
|
|
23
28
|
items: import("@angular/core").InputSignal<SelectBoxItem[] | undefined>;
|
|
24
29
|
isMultiple: import("@angular/core").InputSignal<boolean>;
|
|
@@ -50,10 +55,14 @@ export declare class EnumPickerComponent extends BaseInputComponent {
|
|
|
50
55
|
constructor(http: HttpClient, translocoService: TranslocoService);
|
|
51
56
|
setTitle(event?: any): void;
|
|
52
57
|
getSelectionItems(): Promise<void>;
|
|
58
|
+
getGroupedSelectionItems(parentKeys: string[]): Promise<void>;
|
|
59
|
+
private buildGroupedFromRaw;
|
|
60
|
+
private resolveDisplay;
|
|
61
|
+
private getVisibleItems;
|
|
53
62
|
private updateSelectionItemsText;
|
|
54
63
|
filterCurrentValueBySelectionItems(): void;
|
|
55
64
|
onCustomItemCreating(event: any): void;
|
|
56
65
|
private rebuildSelectBoxDataSource;
|
|
57
66
|
static ɵfac: i0.ɵɵFactoryDeclaration<EnumPickerComponent, never>;
|
|
58
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EnumPickerComponent, "enum-picker[ngModel], enum-picker[formControl], enum-picker[formControlName]", never, { "itemKey": { "alias": "itemKey"; "required": false; "isSignal": true; }; "itemText": { "alias": "itemText"; "required": false; "isSignal": true; }; "groupName": { "alias": "groupName"; "required": false; "isSignal": true; }; "parentSelectionKey": { "alias": "parentSelectionKey"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "isMultiple": { "alias": "isMultiple"; "required": false; "isSignal": true; }; "excludedKeys": { "alias": "excludedKeys"; "required": false; "isSignal": true; }; "grouped": { "alias": "grouped"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "searchExpr": { "alias": "searchExpr"; "required": false; "isSignal": true; }; "acceptCustomValue": { "alias": "acceptCustomValue"; "required": false; "isSignal": true; }; "textClampCharacters": { "alias": "textClampCharacters"; "required": false; "isSignal": true; }; "useVirtualScroll": { "alias": "useVirtualScroll"; "required": false; "isSignal": true; }; "virtualScrollItemSize": { "alias": "virtualScrollItemSize"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "selectedItemsLabel": { "alias": "selectedItemsLabel"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; "isSignal": true; }; }, { "onSelectionChanged": "onSelectionChanged"; }, never, never, true, [{ directive: typeof i1.ValueAccessorDirective; inputs: {}; outputs: {}; }]>;
|
|
67
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EnumPickerComponent, "enum-picker[ngModel], enum-picker[formControl], enum-picker[formControlName]", never, { "itemKey": { "alias": "itemKey"; "required": false; "isSignal": true; }; "itemText": { "alias": "itemText"; "required": false; "isSignal": true; }; "groupName": { "alias": "groupName"; "required": false; "isSignal": true; }; "parentSelectionKey": { "alias": "parentSelectionKey"; "required": false; "isSignal": true; }; "parentGroupName": { "alias": "parentGroupName"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "isMultiple": { "alias": "isMultiple"; "required": false; "isSignal": true; }; "excludedKeys": { "alias": "excludedKeys"; "required": false; "isSignal": true; }; "grouped": { "alias": "grouped"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "searchExpr": { "alias": "searchExpr"; "required": false; "isSignal": true; }; "acceptCustomValue": { "alias": "acceptCustomValue"; "required": false; "isSignal": true; }; "textClampCharacters": { "alias": "textClampCharacters"; "required": false; "isSignal": true; }; "useVirtualScroll": { "alias": "useVirtualScroll"; "required": false; "isSignal": true; }; "virtualScrollItemSize": { "alias": "virtualScrollItemSize"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "selectedItemsLabel": { "alias": "selectedItemsLabel"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; "isSignal": true; }; }, { "onSelectionChanged": "onSelectionChanged"; }, never, never, true, [{ directive: typeof i1.ValueAccessorDirective; inputs: {}; outputs: {}; }]>;
|
|
59
68
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Interfaces } from 'aril/util/lib';
|
|
2
2
|
export type SelectBoxItem = Interfaces.MapStringString | Interfaces.MapStringNumber | Interfaces.MapNumberString | Interfaces.MapNumberNumber;
|
|
3
|
+
export interface GroupedSelectionItem {
|
|
4
|
+
label: string;
|
|
5
|
+
items: SelectBoxItem[];
|
|
6
|
+
}
|
|
3
7
|
export interface SelectionRequestDTO {
|
|
4
8
|
groupName: string;
|
|
5
9
|
parameters?: Parameters;
|
|
@@ -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
|
+
}
|