@luigi-project/core-modular 0.0.20-dev.202610270048 → 0.0.20-dev.202610271157

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/package.json CHANGED
@@ -18,5 +18,5 @@
18
18
  "micro-frontends",
19
19
  "microfrontends"
20
20
  ],
21
- "version": "0.0.20-dev.202610270048"
21
+ "version": "0.0.20-dev.202610271157"
22
22
  }
@@ -218,11 +218,20 @@ export interface LuigiConnector {
218
218
  /**
219
219
  * Open the user-settings dialog.
220
220
  *
221
- * Core invokes `dialogSettings.renderMicroFrontendContainer(viewUrl, groupKey)`
222
- * (which it installs before calling this method) to mount per-group MFEs
223
- * inside the dialog, and `dialogSettings.onCloseCallback(stored)` when the
224
- * dialog closes — the connector is responsible for calling both at the
225
- * appropriate moments.
221
+ * Core installs two hooks on `dialogSettings` before calling this method:
222
+ * `dialogSettings.renderMicroFrontendContainer(groupConfig, groupKey)` and
223
+ * `dialogSettings.onCloseCallback(stored)`. The connector is responsible for
224
+ * invoking both at the appropriate moments.
225
+ *
226
+ * The head calls `renderMicroFrontendContainer(groupConfig, groupKey)` **when a
227
+ * group becomes active** (selected/visible) and mounts the returned element
228
+ * into the group's content area. Core owns the per-group cache — a repeated
229
+ * call for the same group returns the already created container — so the MFE's
230
+ * init handshake fires once per group on activation (not at dialog-open),
231
+ * matching legacy core, and the head needs no cache of its own. The head does
232
+ * the same for the initially selected group right after opening, since no
233
+ * selection-change fires for it. For a group without a `viewUrl` (native
234
+ * settings form) the head renders its own controls and does not call this.
226
235
  *
227
236
  * @param dialogSettings dialog header, save/dismiss button labels, plus the
228
237
  * two core-installed hooks (`renderMicroFrontendContainer`,
@@ -59,7 +59,7 @@ export interface ProfileSettings {
59
59
  items?: ProfileItem[];
60
60
  staticUserInfoFn?: () => Promise<UserInfo>;
61
61
  onUserInfoUpdate: (fn: (uInfo: UserInfo) => void) => void;
62
- settings: UserSettingsProfileMenuEntry;
62
+ settings?: UserSettingsProfileMenuEntry;
63
63
  itemClick: (item: ProfileItem) => void;
64
64
  }
65
65
  export interface UserSettingsProfileMenuEntry {
@@ -93,7 +93,21 @@ export interface UserSettingsDialogSettings {
93
93
  dialogHeader?: string;
94
94
  saveBtn?: string;
95
95
  dismissBtn?: string;
96
- renderMicroFrontendContainer?: (viewUrl: string, groupKey: string) => Promise<any>;
96
+ /**
97
+ * Render the micro-frontend container for a user-settings group.
98
+ *
99
+ * The head calls this **when a group becomes active** (selected/visible) and
100
+ * mounts the returned element into the group's content area. Core owns the
101
+ * per-group cache: a repeated call for the same `groupKey` returns the already
102
+ * created container instead of building a new one, so the micro-frontend's
103
+ * init handshake fires once per group on activation (not at dialog-open),
104
+ * matching legacy Luigi core — and the head needs no cache of its own.
105
+ *
106
+ * @param groupConfig the group's configuration (viewUrl, context, webcomponent, …)
107
+ * @param groupKey the group's key
108
+ * @returns the `<luigi-container>` element to mount into the group's content area
109
+ */
110
+ renderMicroFrontendContainer?: (groupConfig: Record<string, any>, groupKey: string) => Promise<any>;
97
111
  onCloseCallback?: (storedUserSettings: any) => void;
98
112
  }
99
113
  export interface UserInfo {
@@ -8,7 +8,7 @@ export type MicrofrontendEntry = {
8
8
  export type MicrofrontendInDom = {
9
9
  container: HTMLElement;
10
10
  active: boolean;
11
- type: 'main' | 'modal' | 'drawer';
11
+ type: 'main' | 'modal' | 'drawer' | 'user-settings';
12
12
  id: string;
13
13
  };
14
14
  export declare const LuigiContainerHelpers: {
@@ -16,5 +16,6 @@ export declare const LuigiContainerHelpers: {
16
16
  getMainMicrofrontends(luigi: Luigi): MicrofrontendEntry[];
17
17
  getModalMicrofrontends(): MicrofrontendEntry[];
18
18
  getDrawerMicrofrontends(): MicrofrontendEntry;
19
+ getUserSettingsMicrofrontends(): MicrofrontendEntry[];
19
20
  getAllLuigiContainerIframe(luigi: Luigi): LuigiContainer[] | undefined;
20
21
  };