@luigi-project/core-modular 0.0.1-dev.20260190039 → 0.0.1-dev.20260210053
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/core-api/luigi.d.ts +1 -3
- package/core-api/navigation.d.ts +2 -1
- package/luigi.js +38 -12
- package/luigi.js.map +1 -1
- package/package.json +1 -1
- package/services/navigation.service.d.ts +23 -5
- package/services/routing.service.d.ts +7 -1
- package/utilities/helpers/config-helpers.d.ts +3 -1
- package/utilities/helpers/generic-helpers.d.ts +6 -0
- package/utilities/lifecycle-hooks.d.ts +4 -0
package/package.json
CHANGED
|
@@ -74,8 +74,12 @@ export interface PathData {
|
|
|
74
74
|
pathParams: Record<string, any>;
|
|
75
75
|
}
|
|
76
76
|
export interface Node {
|
|
77
|
-
|
|
77
|
+
altText?: string;
|
|
78
78
|
anonymousAccess?: any;
|
|
79
|
+
badgeCounter?: {
|
|
80
|
+
count?: () => number | Promise<number>;
|
|
81
|
+
label?: string;
|
|
82
|
+
};
|
|
79
83
|
category?: any;
|
|
80
84
|
children?: Node[];
|
|
81
85
|
clientPermissions?: {
|
|
@@ -88,16 +92,18 @@ export interface Node {
|
|
|
88
92
|
hideFromNav?: boolean;
|
|
89
93
|
hideSideNav?: boolean;
|
|
90
94
|
icon?: string;
|
|
95
|
+
isRootNode?: boolean;
|
|
91
96
|
keepSelectedForChildren?: boolean;
|
|
92
97
|
label?: string;
|
|
93
98
|
onNodeActivation?: (node: Node) => boolean | void;
|
|
94
99
|
openNodeInModal?: boolean;
|
|
95
100
|
pageErrorHandler?: PageErrorHandler;
|
|
96
101
|
pathSegment?: string;
|
|
102
|
+
runTimeErrorHandler?: RunTimeErrorHandler;
|
|
97
103
|
tabNav?: boolean;
|
|
98
|
-
|
|
104
|
+
tooltipText?: string;
|
|
99
105
|
viewUrl?: string;
|
|
100
|
-
|
|
106
|
+
visibleForFeatureToggles?: string[];
|
|
101
107
|
}
|
|
102
108
|
export interface PageErrorHandler {
|
|
103
109
|
timeout: number;
|
|
@@ -105,8 +111,12 @@ export interface PageErrorHandler {
|
|
|
105
111
|
redirectPath?: string;
|
|
106
112
|
errorFn?: (node?: Node) => void;
|
|
107
113
|
}
|
|
114
|
+
export interface RunTimeErrorHandler {
|
|
115
|
+
errorFn?: (error: object, node?: Node) => void;
|
|
116
|
+
}
|
|
108
117
|
export interface Category {
|
|
109
|
-
|
|
118
|
+
altText?: string;
|
|
119
|
+
collapsible?: boolean;
|
|
110
120
|
icon?: string;
|
|
111
121
|
id: string;
|
|
112
122
|
isGroup?: boolean;
|
|
@@ -115,9 +125,13 @@ export interface Category {
|
|
|
115
125
|
tooltip?: string;
|
|
116
126
|
}
|
|
117
127
|
export interface NavItem {
|
|
118
|
-
|
|
128
|
+
altText?: string;
|
|
119
129
|
category?: Category;
|
|
130
|
+
icon?: string;
|
|
131
|
+
node?: Node;
|
|
132
|
+
label?: string;
|
|
120
133
|
selected?: boolean;
|
|
134
|
+
tooltip?: string;
|
|
121
135
|
}
|
|
122
136
|
export interface TabNavData {
|
|
123
137
|
selectedNode?: any;
|
|
@@ -207,7 +221,11 @@ export declare class NavigationService {
|
|
|
207
221
|
nodeObject: Node;
|
|
208
222
|
pathData: PathData;
|
|
209
223
|
}>;
|
|
224
|
+
shouldPreventNavigation(node: Node): Promise<boolean>;
|
|
225
|
+
shouldPreventNavigationForPath(nodepath: string): Promise<boolean>;
|
|
226
|
+
openViewInNewTab(nodepath: string): Promise<void>;
|
|
210
227
|
private resolveTooltipText;
|
|
211
228
|
private prepareRootNodes;
|
|
212
229
|
private getAccessibleNodes;
|
|
230
|
+
handleNavigationRequest(path: string, preserveView?: string, modalSettings?: any, newTab?: boolean, withoutSync?: boolean, callbackFn?: any): Promise<void>;
|
|
213
231
|
}
|
|
@@ -34,10 +34,16 @@ export declare class RoutingService {
|
|
|
34
34
|
*
|
|
35
35
|
*/
|
|
36
36
|
enableRouting(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Deal with route changing scenario.
|
|
39
|
+
* @param {Object} routeInfo - the information about path and query
|
|
40
|
+
* @param {boolean} withoutSync - disables the navigation handling for a single navigation request
|
|
41
|
+
* @returns {Promise<void>} A promise that resolves when route change is complete.
|
|
42
|
+
*/
|
|
37
43
|
handleRouteChange(routeInfo: {
|
|
38
44
|
path: string;
|
|
39
45
|
query: string;
|
|
40
|
-
}): Promise<void>;
|
|
46
|
+
}, withoutSync?: boolean): Promise<void>;
|
|
41
47
|
getCurrentRoute(): Route | undefined;
|
|
42
48
|
/**
|
|
43
49
|
* If `showModalPathInUrl` is provided, bookmarkable modal path will be triggered.
|
|
@@ -11,7 +11,9 @@ declare class ConfigHelpersClass {
|
|
|
11
11
|
* If the value is a Function it is called (with the given parameters) and the result of that call is the value.
|
|
12
12
|
* If the value is not a Promise it is wrapped to a Promise so that the returned value is definitely a Promise.
|
|
13
13
|
* @private
|
|
14
|
-
* @
|
|
14
|
+
* @param {string} property the object traversal path
|
|
15
|
+
* @param {boolean} throwError to throw an error or not
|
|
16
|
+
* @param {*} parameters optional parameters that are used if the target is a function
|
|
15
17
|
*/
|
|
16
18
|
executeConfigFnAsync(property: string, throwError?: boolean, ...parameters: any): Promise<any>;
|
|
17
19
|
}
|
|
@@ -17,6 +17,12 @@ export declare const GenericHelpers: {
|
|
|
17
17
|
* @returns {boolean}
|
|
18
18
|
*/
|
|
19
19
|
isFunction: (functionToCheck: any) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Checks if input is an async function.
|
|
22
|
+
* @param functionToCheck mixed
|
|
23
|
+
* @returns {boolean}
|
|
24
|
+
*/
|
|
25
|
+
isAsyncFunction: (functionToCheck: any) => boolean;
|
|
20
26
|
/**
|
|
21
27
|
* Checks if input is a string.
|
|
22
28
|
* @param stringToCheck mixed
|