@luigi-project/core-modular 0.0.19-dev.202610190052 → 0.0.20-dev.202610200049
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/luigi-engine.d.ts +1 -1
- package/luigi.js +30 -16
- package/luigi.js.map +1 -1
- package/modules/ui-module.d.ts +1 -1
- package/package.json +1 -1
- package/types/connector.d.ts +10 -8
- package/types/navigation.d.ts +1 -1
- package/utilities/helpers/usersetting-dialog-helpers.d.ts +13 -0
package/modules/ui-module.d.ts
CHANGED
|
@@ -15,5 +15,5 @@ export declare const UIModule: {
|
|
|
15
15
|
openModal: (luigi: Luigi, node: Node, modalSettings: ModalSettings, onCloseCallback?: (goBackValue?: any) => void, luigiParams?: LuigiParams) => Promise<void>;
|
|
16
16
|
updateModalSettings: (modalSettings: ModalSettings, addHistoryEntry: boolean, luigi: Luigi) => void;
|
|
17
17
|
openDrawer: (luigi: Luigi, node: Node, drawerSettings: DrawerSettings, onCloseCallback?: () => void, luigiParams?: LuigiParams) => Promise<void>;
|
|
18
|
-
openUserSettings: (userSettingsDialogSettings: UserSettingsDialogSettings, userSettingData: any, previousUserSettings: any, luigi: Luigi) => Promise<void>;
|
|
18
|
+
openUserSettings: (userSettingsDialogSettings: UserSettingsDialogSettings, userSettingData: any, previousUserSettings: any, initialUserSettings: any, luigi: Luigi) => Promise<void>;
|
|
19
19
|
};
|
package/package.json
CHANGED
package/types/connector.d.ts
CHANGED
|
@@ -220,19 +220,21 @@ export interface LuigiConnector {
|
|
|
220
220
|
*
|
|
221
221
|
* Core invokes `dialogSettings.renderMicroFrontendContainer(viewUrl, groupKey)`
|
|
222
222
|
* (which it installs before calling this method) to mount per-group MFEs
|
|
223
|
-
* inside the dialog, and `dialogSettings.onCloseCallback(stored
|
|
224
|
-
*
|
|
225
|
-
*
|
|
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.
|
|
226
226
|
*
|
|
227
|
-
* @param dialogSettings dialog header, save/dismiss button labels, plus
|
|
228
|
-
*
|
|
227
|
+
* @param dialogSettings dialog header, save/dismiss button labels, plus the
|
|
228
|
+
* two core-installed hooks (`renderMicroFrontendContainer`,
|
|
229
229
|
* `onCloseCallback`) the connector must invoke.
|
|
230
230
|
* @param userSettingData static schema describing the available
|
|
231
231
|
* user-settings groups (one entry per group).
|
|
232
|
-
* @param
|
|
233
|
-
* the dialog
|
|
232
|
+
* @param initialUserSettings the complete settings object the connector
|
|
233
|
+
* should use as the dialog's initial state — defaults for every configured
|
|
234
|
+
* setting, overlaid with the persisted values. Core builds this, so the
|
|
235
|
+
* connector never has to prefill defaults itself.
|
|
234
236
|
*/
|
|
235
|
-
openUserSettings(dialogSettings: UserSettingsDialogSettings, userSettingData: Record<string, any>[],
|
|
237
|
+
openUserSettings(dialogSettings: UserSettingsDialogSettings, userSettingData: Record<string, any>[], initialUserSettings: Record<string, any>): void;
|
|
236
238
|
/**
|
|
237
239
|
* Close a user-settings dialog opened via `openUserSettings`.
|
|
238
240
|
* Called from `Luigi.ux().closeUserSettings()` and on
|
package/types/navigation.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ export interface UserSettingsDialogSettings {
|
|
|
89
89
|
saveBtn?: string;
|
|
90
90
|
dismissBtn?: string;
|
|
91
91
|
renderMicroFrontendContainer?: (viewUrl: string, groupKey: string) => Promise<any>;
|
|
92
|
-
onCloseCallback?: (storedUserSettings: any
|
|
92
|
+
onCloseCallback?: (storedUserSettings: any) => void;
|
|
93
93
|
}
|
|
94
94
|
export interface UserInfo {
|
|
95
95
|
name?: string;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
declare class UserSettingsHelperClass {
|
|
2
2
|
processUserSettingGroups(userSettings: any, storedSettings: any): any[];
|
|
3
|
+
/**
|
|
4
|
+
* Builds the complete user-settings object that should be stored.
|
|
5
|
+
*
|
|
6
|
+
* Every setting defined in the configuration is prefilled with a default
|
|
7
|
+
* (empty string), then overlaid with the persisted values. This guarantees
|
|
8
|
+
* that the stored object always contains the full set of properties, not
|
|
9
|
+
* only the ones that were changed in the dialog (mirrors Luigi core).
|
|
10
|
+
*
|
|
11
|
+
* @param userSettingData schema as returned by `processUserSettingGroups`
|
|
12
|
+
* @param previousUserSettings persisted user-settings state, or `null`/`{}`
|
|
13
|
+
* @returns a settings object keyed by group, each group prefilled with defaults
|
|
14
|
+
*/
|
|
15
|
+
prepareUserSettingsObj(userSettingData: any[], previousUserSettings: Record<string, any> | null): Record<string, any>;
|
|
3
16
|
getUserSettingsIframesInDom(): HTMLElement[];
|
|
4
17
|
hideUserSettingsIframe(): void;
|
|
5
18
|
findActiveCustomUserSettingsIframe(eventSource: any): any;
|