@luigi-project/core-modular 0.0.3-dev.202602230049 → 0.0.3-dev.202602250050

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.
@@ -1,5 +1,5 @@
1
- import { ExternalLink, Node, PageErrorHandler } from '../services/navigation.service';
2
1
  import { Luigi } from '../core-api/luigi';
2
+ import { ExternalLink, Node, PageErrorHandler } from '../types/navigation';
3
3
  export declare const RoutingModule: {
4
4
  init: (luigi: Luigi) => void;
5
5
  handlePageErrorHandler: (pageErrorHandler: PageErrorHandler, node: Node, luigi: Luigi) => void;
@@ -1,6 +1,7 @@
1
1
  import { Luigi } from '../core-api/luigi';
2
- import { NavigationService, ModalSettings } from '../services/navigation.service';
2
+ import { NavigationService } from '../services/navigation.service';
3
3
  import { RoutingService } from '../services/routing.service';
4
+ import { ModalSettings } from '../types/navigation';
4
5
  export declare const UIModule: {
5
6
  navService: NavigationService;
6
7
  routingService: RoutingService;
package/package.json CHANGED
@@ -18,5 +18,5 @@
18
18
  "micro-frontends",
19
19
  "microfrontends"
20
20
  ],
21
- "version": "0.0.3-dev.202602230049"
21
+ "version": "0.0.3-dev.202602250050"
22
22
  }
@@ -1,5 +1,5 @@
1
1
  import { Luigi } from '../core-api/luigi';
2
- import { ModalSettings } from './navigation.service';
2
+ import { ModalSettings } from '../types/navigation';
3
3
  export interface ModalPromiseObject {
4
4
  closePromise?: Promise<void>;
5
5
  resolveFn?: () => void;
@@ -1,187 +1,6 @@
1
1
  import { Luigi } from '../core-api/luigi';
2
+ import { AppSwitcher, LeftNavData, NavigationRequestParams, NavItem, Node, PathData, TabNavData, TopNavData } from '../types/navigation';
2
3
  import { NodeDataManagementService } from './node-data-management.service';
3
- export interface TopNavData {
4
- appTitle: string;
5
- logo: string;
6
- topNodes: NavItem[];
7
- productSwitcher?: ProductSwitcher;
8
- profile?: ProfileSettings;
9
- appSwitcher?: AppSwitcher;
10
- navClick?: (item: NavItem) => void;
11
- }
12
- export interface AppSwitcher {
13
- showMainAppEntry?: boolean;
14
- items?: AppSwitcherItem[];
15
- itemRenderer?: (item: AppSwitcherItem, slot: HTMLElement, appSwitcherApiObj?: any) => void;
16
- }
17
- export interface AppSwitcherItem {
18
- title?: string;
19
- subtitle?: string;
20
- link?: string;
21
- selectionConditions?: selectionConditions;
22
- }
23
- export interface selectionConditions {
24
- route?: string;
25
- contextCriteria?: ContextCriteria[];
26
- }
27
- export interface ContextCriteria {
28
- key: string;
29
- value: string;
30
- }
31
- export interface ProfileSettings {
32
- authEnabled: boolean;
33
- signedIn: boolean;
34
- logout: ProfileLogout;
35
- items?: ProfileItem[];
36
- staticUserInfoFn?: () => Promise<UserInfo>;
37
- onUserInfoUpdate: (fn: (uInfo: UserInfo) => void) => void;
38
- itemClick: (item: ProfileItem) => void;
39
- }
40
- export interface ProfileLogout {
41
- label?: string;
42
- icon?: string;
43
- testId?: string;
44
- altText?: string;
45
- doLogout: () => void;
46
- }
47
- export interface ProfileItem {
48
- label?: string;
49
- link?: string;
50
- externalLink?: ExternalLink;
51
- icon?: string;
52
- testId?: string;
53
- altText?: string;
54
- openNodeInModal?: boolean | ModalSettings;
55
- }
56
- export interface UserInfo {
57
- name?: string;
58
- initials?: string;
59
- email?: string;
60
- picture?: string;
61
- description?: string;
62
- }
63
- export interface LeftNavData {
64
- selectedNode: any;
65
- items: NavItem[];
66
- basePath: string;
67
- sideNavFooterText?: string;
68
- navClick?: (item: NavItem) => void;
69
- }
70
- export interface PathData {
71
- selectedNode?: Node;
72
- selectedNodeChildren?: Node[];
73
- nodesInPath?: Node[];
74
- rootNodes: Node[];
75
- pathParams: Record<string, any>;
76
- }
77
- export interface RootNode {
78
- node: Node;
79
- }
80
- export interface Node {
81
- altText?: string;
82
- anonymousAccess?: any;
83
- badgeCounter?: {
84
- count?: () => number | Promise<number>;
85
- label?: string;
86
- };
87
- category?: any;
88
- children?: Node[];
89
- clientPermissions?: {
90
- changeCurrentLocale?: boolean;
91
- urlParameters?: Record<string, any>;
92
- };
93
- context?: Record<string, any>;
94
- drawer?: ModalSettings;
95
- externalLink?: ExternalLink;
96
- hideFromNav?: boolean;
97
- hideSideNav?: boolean;
98
- icon?: string;
99
- isRootNode?: boolean;
100
- keepSelectedForChildren?: boolean;
101
- label?: string;
102
- onNodeActivation?: (node: Node) => boolean | void;
103
- openNodeInModal?: boolean;
104
- pageErrorHandler?: PageErrorHandler;
105
- parent?: Node;
106
- pathSegment?: string;
107
- runTimeErrorHandler?: RunTimeErrorHandler;
108
- tabNav?: boolean;
109
- tooltipText?: string;
110
- viewUrl?: string;
111
- visibleForFeatureToggles?: string[];
112
- }
113
- export interface PageErrorHandler {
114
- timeout: number;
115
- viewUrl?: string;
116
- redirectPath?: string;
117
- errorFn?: (node?: Node) => void;
118
- }
119
- export interface RunTimeErrorHandler {
120
- errorFn?: (error: object, node?: Node) => void;
121
- }
122
- export interface Category {
123
- altText?: string;
124
- collapsible?: boolean;
125
- icon?: string;
126
- id: string;
127
- isGroup?: boolean;
128
- label?: string;
129
- nodes?: NavItem[];
130
- tooltip?: string;
131
- }
132
- export interface NavItem {
133
- altText?: string;
134
- category?: Category;
135
- icon?: string;
136
- node?: Node;
137
- label?: string;
138
- selected?: boolean;
139
- tooltip?: string;
140
- }
141
- export interface TabNavData {
142
- selectedNode?: any;
143
- items?: NavItem[];
144
- basePath?: string;
145
- navClick?: (item: NavItem) => void;
146
- }
147
- export interface ModalSettings {
148
- size?: 'fullscreen' | 'l' | 'm' | 's';
149
- width?: string;
150
- height?: string;
151
- title?: string;
152
- closebtn_data_testid?: string;
153
- keepPrevious?: boolean;
154
- }
155
- export interface ProductSwitcher {
156
- altText?: string;
157
- columns?: number;
158
- icon?: string;
159
- items?: [ProductSwitcherItem];
160
- label?: string;
161
- testId?: string;
162
- }
163
- export interface ProductSwitcherItem {
164
- altText?: string;
165
- externalLink?: ExternalLink;
166
- icon?: string;
167
- label?: string;
168
- link?: string;
169
- selected?: boolean;
170
- subTitle?: string;
171
- testId?: string;
172
- }
173
- export interface ExternalLink {
174
- url?: string;
175
- sameWindow?: boolean;
176
- }
177
- export interface NavigationRequestParams {
178
- modalSettings?: any;
179
- newTab?: boolean;
180
- path: string;
181
- preserveView?: string;
182
- preventContextUpdate?: boolean;
183
- withoutSync?: boolean;
184
- }
185
4
  export declare class NavigationService {
186
5
  private luigi;
187
6
  nodeDataManagementService?: NodeDataManagementService;
@@ -251,6 +70,7 @@ export declare class NavigationService {
251
70
  * @param {boolean} params.newTab - open a view in new tab by setting it to `true` (optional)
252
71
  * @param {boolean} params.withoutSync - disables the navigation handling for a single navigation request (optional)
253
72
  * @param {boolean} params.preventContextUpdate - make no context update being triggered; default is false (optional)
73
+ * @param {boolean} params.preventHistoryEntry - make no history update being triggered; default is false (optional)
254
74
  * @param {any} callbackFn - callback to be triggered after opening view as modal (optional)
255
75
  */
256
76
  handleNavigationRequest(params: NavigationRequestParams, callbackFn?: any): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { Node, RootNode } from './navigation.service';
1
+ import { Node, RootNode } from '../types/navigation';
2
2
  export declare class NodeDataManagementService {
3
3
  dataManagement: Map<any, any>;
4
4
  navPath: string;
@@ -1,5 +1,6 @@
1
1
  import { Luigi } from '../core-api/luigi';
2
- import { ModalSettings, Node, PathData, NavigationService } from './navigation.service';
2
+ import { ModalSettings, Node, PathData } from '../types/navigation';
3
+ import { NavigationService } from './navigation.service';
3
4
  export interface Route {
4
5
  raw: string;
5
6
  node?: Node;
@@ -1,5 +1,5 @@
1
- import { ModalSettings, LeftNavData, Node, TopNavData, TabNavData } from '../services/navigation.service';
2
1
  import { AlertHandler, AlertSettings, ConfirmationModalHandler, ConfirmationModalSettings, UserSettings } from '../modules/ux-module';
2
+ import { ModalSettings, LeftNavData, Node, TopNavData, TabNavData } from './navigation';
3
3
  export interface LuigiConnector {
4
4
  renderMainLayout(): void;
5
5
  renderTopNav(data: TopNavData): void;
@@ -0,0 +1,189 @@
1
+ export interface TopNavData {
2
+ appTitle: string;
3
+ logo: string;
4
+ topNodes: NavItem[];
5
+ productSwitcher?: ProductSwitcher;
6
+ profile?: ProfileSettings;
7
+ appSwitcher?: AppSwitcher;
8
+ navClick?: (item: NavItem) => void;
9
+ }
10
+ export interface AppSwitcher {
11
+ showMainAppEntry?: boolean;
12
+ items?: AppSwitcherItem[];
13
+ itemRenderer?: (item: AppSwitcherItem, slot: HTMLElement, appSwitcherApiObj?: any) => void;
14
+ }
15
+ export interface AppSwitcherItem {
16
+ title?: string;
17
+ subtitle?: string;
18
+ link?: string;
19
+ selectionConditions?: selectionConditions;
20
+ }
21
+ export interface selectionConditions {
22
+ route?: string;
23
+ contextCriteria?: ContextCriteria[];
24
+ }
25
+ export interface ContextCriteria {
26
+ key: string;
27
+ value: string;
28
+ }
29
+ export interface ProfileSettings {
30
+ authEnabled: boolean;
31
+ signedIn: boolean;
32
+ logout: ProfileLogout;
33
+ items?: ProfileItem[];
34
+ staticUserInfoFn?: () => Promise<UserInfo>;
35
+ onUserInfoUpdate: (fn: (uInfo: UserInfo) => void) => void;
36
+ itemClick: (item: ProfileItem) => void;
37
+ }
38
+ export interface ProfileLogout {
39
+ label?: string;
40
+ icon?: string;
41
+ testId?: string;
42
+ altText?: string;
43
+ doLogout: () => void;
44
+ }
45
+ export interface ProfileItem {
46
+ label?: string;
47
+ link?: string;
48
+ externalLink?: ExternalLink;
49
+ icon?: string;
50
+ testId?: string;
51
+ altText?: string;
52
+ openNodeInModal?: boolean | ModalSettings;
53
+ }
54
+ export interface UserInfo {
55
+ name?: string;
56
+ initials?: string;
57
+ email?: string;
58
+ picture?: string;
59
+ description?: string;
60
+ }
61
+ export interface LeftNavData {
62
+ selectedNode: any;
63
+ items: NavItem[];
64
+ basePath: string;
65
+ sideNavFooterText?: string;
66
+ navClick?: (item: NavItem) => void;
67
+ }
68
+ export interface PathData {
69
+ selectedNode?: Node;
70
+ selectedNodeChildren?: Node[];
71
+ nodesInPath?: Node[];
72
+ rootNodes: Node[];
73
+ pathParams: Record<string, any>;
74
+ }
75
+ export interface RootNode {
76
+ node: Node;
77
+ }
78
+ export interface Node {
79
+ altText?: string;
80
+ anonymousAccess?: any;
81
+ badgeCounter?: {
82
+ count?: () => number | Promise<number>;
83
+ label?: string;
84
+ };
85
+ category?: any;
86
+ children?: Node[];
87
+ clientPermissions?: {
88
+ changeCurrentLocale?: boolean;
89
+ urlParameters?: Record<string, any>;
90
+ };
91
+ context?: Record<string, any>;
92
+ drawer?: ModalSettings;
93
+ externalLink?: ExternalLink;
94
+ hideFromNav?: boolean;
95
+ hideSideNav?: boolean;
96
+ icon?: string;
97
+ isRootNode?: boolean;
98
+ keepSelectedForChildren?: boolean;
99
+ label?: string;
100
+ onNodeActivation?: (node: Node) => boolean | void;
101
+ openNodeInModal?: boolean;
102
+ pageErrorHandler?: PageErrorHandler;
103
+ parent?: Node;
104
+ pathSegment?: string;
105
+ runTimeErrorHandler?: RunTimeErrorHandler;
106
+ tabNav?: boolean;
107
+ tooltipText?: string;
108
+ viewUrl?: string;
109
+ visibleForFeatureToggles?: string[];
110
+ }
111
+ export interface PageErrorHandler {
112
+ timeout: number;
113
+ viewUrl?: string;
114
+ redirectPath?: string;
115
+ errorFn?: (node?: Node) => void;
116
+ }
117
+ export interface RunTimeErrorHandler {
118
+ errorFn?: (error: object, node?: Node) => void;
119
+ }
120
+ export interface Category {
121
+ altText?: string;
122
+ collapsible?: boolean;
123
+ icon?: string;
124
+ id: string;
125
+ isGroup?: boolean;
126
+ label?: string;
127
+ nodes?: NavItem[];
128
+ tooltip?: string;
129
+ }
130
+ export interface NavItem {
131
+ altText?: string;
132
+ category?: Category;
133
+ icon?: string;
134
+ node?: Node;
135
+ label?: string;
136
+ selected?: boolean;
137
+ tooltip?: string;
138
+ }
139
+ export interface TabNavData {
140
+ selectedNode?: any;
141
+ items?: NavItem[];
142
+ basePath?: string;
143
+ navClick?: (item: NavItem) => void;
144
+ }
145
+ export interface ModalSettings {
146
+ size?: 'fullscreen' | 'l' | 'm' | 's';
147
+ width?: string;
148
+ height?: string;
149
+ title?: string;
150
+ closebtn_data_testid?: string;
151
+ keepPrevious?: boolean;
152
+ }
153
+ export interface ProductSwitcher {
154
+ altText?: string;
155
+ columns?: number;
156
+ icon?: string;
157
+ items?: [ProductSwitcherItem];
158
+ label?: string;
159
+ testId?: string;
160
+ }
161
+ export interface ProductSwitcherItem {
162
+ altText?: string;
163
+ externalLink?: ExternalLink;
164
+ icon?: string;
165
+ label?: string;
166
+ link?: string;
167
+ selected?: boolean;
168
+ subTitle?: string;
169
+ testId?: string;
170
+ }
171
+ export interface ExternalLink {
172
+ url?: string;
173
+ sameWindow?: boolean;
174
+ }
175
+ export interface NavigationRequestBase {
176
+ preventContextUpdate?: boolean;
177
+ preventHistoryEntry?: boolean;
178
+ withoutSync?: boolean;
179
+ }
180
+ export interface NavigationRequestParams extends NavigationRequestBase {
181
+ modalSettings?: any;
182
+ newTab?: boolean;
183
+ path: string;
184
+ preserveView?: string;
185
+ }
186
+ export interface NavigationRequestEvent {
187
+ detail: NavigationRequestBase;
188
+ }
189
+ export type HistoryMethod = 'pushState' | 'replaceState';
@@ -1,6 +1,6 @@
1
1
  import { FeatureToggles } from '../../core-api/feature-toggles';
2
2
  import { Luigi } from '../../core-api/luigi';
3
- import { AppSwitcher, Node, PathData } from '../../services/navigation.service';
3
+ import { AppSwitcher, Node, PathData } from '../../types/navigation';
4
4
  export declare const NavigationHelpers: {
5
5
  normalizePath: (raw: string) => string;
6
6
  segmentMatches: (linkSegment: string, pathSegment: string, pathParams: Record<string, any>) => boolean;
@@ -1,6 +1,6 @@
1
1
  import { FeatureToggles } from '../../core-api/feature-toggles';
2
2
  import { Luigi } from '../../core-api/luigi';
3
- import { Node, PathData } from '../../services/navigation.service';
3
+ import { Node, PathData } from '../../types/navigation';
4
4
  export declare const RoutingHelpers: {
5
5
  defaultContentViewParamPrefix: string;
6
6
  defaultQueryParamSeparator: string;