@luigi-project/core-modular 0.0.4-dev.20260490045 → 0.0.5-dev.202604160059

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,3 +1,4 @@
1
+ import { MicrofrontendInDom } from '../utilities/helpers/luigi-container-helpers';
1
2
  import { Luigi } from './luigi';
2
3
  export declare class Elements {
3
4
  luigi: Luigi;
@@ -30,4 +31,29 @@ export declare class Elements {
30
31
  * @returns {HTMLElement | null} the navigation footer container DOM element
31
32
  */
32
33
  getNavFooterContainer(): HTMLElement | null;
34
+ /**
35
+ * Returns a list of all available micro frontends.
36
+ * @returns {Array<{id: string, active: boolean, container: HTMLElement, type: 'main'|'drawer'|'modal'}>} list of objects defining all micro frontends from the DOM
37
+ * @memberof Elements
38
+ * @example
39
+ * Luigi.elements().getMicrofrontends();
40
+ */
41
+ getMicrofrontends(): MicrofrontendInDom[];
42
+ /**
43
+ * Returns all micro frontend iframes including the iframe from the modal if it exists.
44
+ * @returns {Array<HTMLElement>} an array of all micro frontend iframes from the DOM
45
+ * @memberof Elements
46
+ * @example
47
+ * Luigi.elements().getMicrofrontendIframes();
48
+ */
49
+ getMicrofrontendIframes(): HTMLElement[] | null;
50
+ /**
51
+ * Returns the active micro frontend iframe.
52
+ * If there is a modal, which includes the micro frontend iframe, the function returns this iframe.
53
+ * @returns {HTMLElement} the active micro frontend iframe DOM element
54
+ * @memberof Elements
55
+ * @example
56
+ * Luigi.elements().getCurrentMicrofrontendIframe();
57
+ */
58
+ getCurrentMicrofrontendIframe(): HTMLElement | null;
33
59
  }
@@ -13,11 +13,25 @@ export declare class Navigation {
13
13
  constructor(luigi: Luigi);
14
14
  navigate: (path: string, preserveView?: string, modalSettings?: ModalSettings, splitViewSettings?: any, drawerSettings?: any) => Promise<void>;
15
15
  openAsModal: (path: string, modalSettings: ModalSettings, onCloseCallback?: () => void) => Promise<void>;
16
- openAsDrawer: (path: string, modalSettings: ModalSettings, onCloseCallback?: () => void) => Promise<void>;
16
+ openAsDrawer: (path: string, drawerSettings: ModalSettings, onCloseCallback?: () => void) => Promise<void>;
17
17
  runTimeErrorHandler: (errorObj: object) => Promise<void>;
18
+ /**
19
+ * Checks if the path you can navigate to exists in the main application. For example, you can use this helper method conditionally to display a DOM element like a button.
20
+ * @param {string} path - path which existence you want to check
21
+ * @returns {Promise<boolean>} A promise which resolves to a boolean variable specifying whether the path exists or not
22
+ * @example
23
+ * let pathExists;
24
+ * Luigi
25
+ * .navigation()
26
+ * .pathExists('projects/pr2')
27
+ * .then(
28
+ * (pathExists) => { }
29
+ * );
30
+ */
31
+ pathExists: (path: string) => Promise<boolean>;
18
32
  /**
19
33
  * Sets the current navigation base to the parent node that is defined as virtualTree. This method works only when the currently active micro frontend is inside a virtualTree.
20
- * @returns {navigation} navigation instance
34
+ * @returns {Navigation} navigation instance
21
35
  * @example
22
36
  * Luigi.navigation().fromVirtualTreeRoot().navigate('/users/groups/stakeholders')
23
37
  */
@@ -25,12 +39,12 @@ export declare class Navigation {
25
39
  /**
26
40
  * Allows navigation from the node which has the navigation context set.
27
41
  * @param navigationContext
28
- * @returns {navigation} navigation instance
42
+ * @returns {Navigation} navigation instance
29
43
  */
30
44
  fromContext(navigationContext: string): Navigation;
31
45
  /**
32
46
  * Allows navigation from the closest node which has the navigation context set. If there are multiple nodes with the same navigation context, the closest one will be used as the navigation base.
33
- * @returns {navigation} navigation instance
47
+ * @returns {Navigation} navigation instance
34
48
  */
35
49
  fromClosestContext(): Navigation;
36
50
  /**
package/luigi-engine.d.ts CHANGED
@@ -9,12 +9,14 @@ export declare class LuigiEngine {
9
9
  navService: NavigationService;
10
10
  routingService: RoutingService;
11
11
  luigi: import('./core-api/luigi').Luigi;
12
+ modalContainer: any;
13
+ drawerContainer: any;
12
14
  init: (luigi: import('./core-api/luigi').Luigi) => void;
13
15
  update: (scopes?: string[]) => Promise<void>;
14
16
  updateMainContent: (currentNode: import('./types/navigation').Node, luigi: import('./core-api/luigi').Luigi, luigiParams?: import('./types/routing').LuigiParams, withoutSync?: boolean, preventContextUpdate?: boolean) => Promise<void>;
15
17
  openModal: (luigi: import('./core-api/luigi').Luigi, node: import('./types/navigation').Node, modalSettings: import('./types/navigation').ModalSettings, onCloseCallback?: () => void) => Promise<void>;
16
18
  updateModalSettings: (modalSettings: import('./types/navigation').ModalSettings, addHistoryEntry: boolean, luigi: import('./core-api/luigi').Luigi) => void;
17
- openDrawer: (luigi: import('./core-api/luigi').Luigi, node: import('./types/navigation').Node, modalSettings: import('./types/navigation').ModalSettings, onCloseCallback?: () => void) => Promise<void>;
19
+ openDrawer: (luigi: import('./core-api/luigi').Luigi, node: import('./types/navigation').Node, drawerSettings: import('./types/navigation').ModalSettings, onCloseCallback?: () => void) => Promise<void>;
18
20
  };
19
21
  _comm: {
20
22
  luigi: import('./core-api/luigi').Luigi;