@luigi-project/core-modular 0.0.11-dev.20260720111 → 0.0.11-dev.202607210050
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/routing.d.ts +2 -1
- package/core-api/ux.d.ts +4 -0
- package/luigi-engine.d.ts +1 -1
- package/luigi.js +23 -15
- package/luigi.js.map +1 -1
- package/modules/routing-module.d.ts +2 -1
- package/package.json +1 -1
- package/types/connector.d.ts +4 -0
- package/types/navigation.d.ts +1 -0
package/core-api/routing.d.ts
CHANGED
|
@@ -11,8 +11,9 @@ export declare class Routing {
|
|
|
11
11
|
*
|
|
12
12
|
* @param params - An object containing key-value pairs to be added as search parameters.
|
|
13
13
|
* @param keepBrowserHistory - If `true`, a new entry is added to the browser's history; otherwise, the current entry is replaced. Defaults to `false`.
|
|
14
|
+
* @param preventLuigiConfigUpdate - If `true`, prevents updating the Luigi configuration when adding search parameters. Defaults to `false`.
|
|
14
15
|
*/
|
|
15
|
-
addSearchParams(params: object, keepBrowserHistory?: boolean): void;
|
|
16
|
+
addSearchParams(params: object, keepBrowserHistory?: boolean, preventLuigiConfigUpdate?: boolean): void;
|
|
16
17
|
/**
|
|
17
18
|
* Get search parameter from URL as an object.
|
|
18
19
|
* @memberof Routing
|
package/core-api/ux.d.ts
CHANGED
|
@@ -62,6 +62,10 @@ export declare class UX {
|
|
|
62
62
|
* });
|
|
63
63
|
*/
|
|
64
64
|
showConfirmationModal: (settings: ConfirmationModalSettings) => Promise<unknown>;
|
|
65
|
+
/**
|
|
66
|
+
* Set the collapsed state of the left side navigation
|
|
67
|
+
*/
|
|
68
|
+
collapseLeftSideNav: (state: boolean) => void;
|
|
65
69
|
/**
|
|
66
70
|
* Open user settings dialog
|
|
67
71
|
*/
|
package/luigi-engine.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare class LuigiEngine {
|
|
|
36
36
|
init: (luigi: import('./core-api/luigi').Luigi) => void;
|
|
37
37
|
handlePageErrorHandler: (pageErrorHandler: import('./types/navigation').PageErrorHandler, node: import('./types/navigation').Node, luigi: import('./core-api/luigi').Luigi) => void;
|
|
38
38
|
handleExternalLinkNavigation: (externalLink: import('./types/navigation').ExternalLink) => void;
|
|
39
|
-
addSearchParamsFromClient(searchParams: Record<string, any>, keepBrowserHistory: boolean, luigi: import('./core-api/luigi').Luigi): Promise<void>;
|
|
39
|
+
addSearchParamsFromClient(searchParams: Record<string, any>, keepBrowserHistory: boolean, preventLuigiConfigUpdate: boolean, luigi: import('./core-api/luigi').Luigi): Promise<void>;
|
|
40
40
|
};
|
|
41
41
|
bootstrap(connector: LuigiConnector): void;
|
|
42
42
|
init(): void;
|
package/luigi.js
CHANGED
|
@@ -6262,8 +6262,8 @@ var _i = class {
|
|
|
6262
6262
|
openUserSettings: () => {
|
|
6263
6263
|
this.dispatchLuigiEvent(V.OPEN_USER_SETTINGS_REQUEST, this.thisComponent.userSettings);
|
|
6264
6264
|
},
|
|
6265
|
-
collapseLeftSideNav: () => {
|
|
6266
|
-
this.dispatchLuigiEvent(V.COLLAPSE_LEFT_NAV_REQUEST, {});
|
|
6265
|
+
collapseLeftSideNav: (e) => {
|
|
6266
|
+
this.dispatchLuigiEvent(V.COLLAPSE_LEFT_NAV_REQUEST, { state: e });
|
|
6267
6267
|
},
|
|
6268
6268
|
getDirtyStatus: () => this.thisComponent.dirtyStatus || !1,
|
|
6269
6269
|
getDocumentTitle: () => this.thisComponent.documentTitle,
|
|
@@ -6331,10 +6331,11 @@ var _i = class {
|
|
|
6331
6331
|
getCoreSearchParams: () => this.thisComponent.searchParams || {},
|
|
6332
6332
|
getPathParams: () => this.thisComponent.pathParams || {},
|
|
6333
6333
|
getClientPermissions: () => this.thisComponent.clientPermissions || {},
|
|
6334
|
-
addCoreSearchParams: (e = {}, t = !0) => {
|
|
6334
|
+
addCoreSearchParams: (e = {}, t = !0, n = !1) => {
|
|
6335
6335
|
this.dispatchLuigiEvent(V.ADD_SEARCH_PARAMS_REQUEST, {
|
|
6336
6336
|
data: e,
|
|
6337
|
-
keepBrowserHistory: t
|
|
6337
|
+
keepBrowserHistory: t,
|
|
6338
|
+
preventLuigiConfigUpdate: n
|
|
6338
6339
|
});
|
|
6339
6340
|
},
|
|
6340
6341
|
getUserSettings: () => this.thisComponent.userSettings || {},
|
|
@@ -8156,6 +8157,7 @@ var Ti = {
|
|
|
8156
8157
|
}), {
|
|
8157
8158
|
appTitle: o || n.settings?.header?.title,
|
|
8158
8159
|
globalSearch: y,
|
|
8160
|
+
isHeaderDisabled: !!n.settings?.header?.disabled,
|
|
8159
8161
|
logo: n.settings?.header?.logo,
|
|
8160
8162
|
topNodes: v.items,
|
|
8161
8163
|
totalBadgeNode: v.totalBadgeNode,
|
|
@@ -9438,13 +9440,13 @@ var Ti = {
|
|
|
9438
9440
|
constructor(e) {
|
|
9439
9441
|
this.luigi = e;
|
|
9440
9442
|
}
|
|
9441
|
-
addSearchParams(e, t = !1) {
|
|
9443
|
+
addSearchParams(e, t = !1, n = !1) {
|
|
9442
9444
|
if (!a.isObject(e)) {
|
|
9443
9445
|
console.log("Params argument must be an object");
|
|
9444
9446
|
return;
|
|
9445
9447
|
}
|
|
9446
|
-
let
|
|
9447
|
-
this.luigi.getConfigValue("routing.useHashRouting") ?
|
|
9448
|
+
let r = new URL(location.href);
|
|
9449
|
+
this.luigi.getConfigValue("routing.useHashRouting") ? r.hash = H.addParamsOnHashRouting(e, r.hash) : H.modifySearchParams(e, r.searchParams), this.handleBrowserHistory(t, r), n || this.luigi.configChanged();
|
|
9448
9450
|
}
|
|
9449
9451
|
getSearchParams() {
|
|
9450
9452
|
let e = {}, t = [
|
|
@@ -9605,6 +9607,9 @@ var Ti = {
|
|
|
9605
9607
|
}
|
|
9606
9608
|
});
|
|
9607
9609
|
}));
|
|
9610
|
+
collapseLeftSideNav = (e) => {
|
|
9611
|
+
this.luigi.getEngine()._connector?.collapseLeftSideNav(e);
|
|
9612
|
+
};
|
|
9608
9613
|
openUserSettings = async () => {
|
|
9609
9614
|
let e = this.luigi.getConfigValue("userSettings");
|
|
9610
9615
|
if (!e) return;
|
|
@@ -11176,15 +11181,15 @@ var fc = {
|
|
|
11176
11181
|
t && (t.opener = null, t.focus());
|
|
11177
11182
|
}
|
|
11178
11183
|
},
|
|
11179
|
-
async addSearchParamsFromClient(e, t, n) {
|
|
11180
|
-
let
|
|
11181
|
-
if (
|
|
11184
|
+
async addSearchParamsFromClient(e, t, n, r) {
|
|
11185
|
+
let i = U.get(Ni), a = H.getCurrentPath(r, r.getConfig().routing?.useHashRouting), o = (await i.getCurrentNode(a.path))?.clientPermissions?.urlParameters, s = { ...e };
|
|
11186
|
+
if (o) {
|
|
11182
11187
|
let e = {};
|
|
11183
|
-
Object.keys(
|
|
11184
|
-
t in
|
|
11188
|
+
Object.keys(o).forEach((t) => {
|
|
11189
|
+
t in s && o[t]?.write === !0 && (e[t] = s[t], delete s[t]);
|
|
11185
11190
|
});
|
|
11186
|
-
for (let e in
|
|
11187
|
-
Object.keys(e).length > 0 &&
|
|
11191
|
+
for (let e in s) console.warn(`No permission to add the search param "${e}" to the url`);
|
|
11192
|
+
Object.keys(e).length > 0 && r.routing().addSearchParams(e, t, n);
|
|
11188
11193
|
}
|
|
11189
11194
|
}
|
|
11190
11195
|
}, pc, mc = {
|
|
@@ -11292,13 +11297,16 @@ var fc = {
|
|
|
11292
11297
|
}), e.addEventListener(V.ADD_NODE_PARAMS_REQUEST, (e) => {
|
|
11293
11298
|
let n = e.payload;
|
|
11294
11299
|
t.routing().addNodeParams(n.data, n.keepBrowserHistory);
|
|
11300
|
+
}), e.addEventListener(V.COLLAPSE_LEFT_NAV_REQUEST, (e) => {
|
|
11301
|
+
let n = e.payload;
|
|
11302
|
+
t.ux().collapseLeftSideNav(n.state);
|
|
11295
11303
|
}), e.addEventListener(V.OPEN_USER_SETTINGS_REQUEST, () => {
|
|
11296
11304
|
t.ux().openUserSettings();
|
|
11297
11305
|
}), e.addEventListener(V.CLOSE_USER_SETTINGS_REQUEST, () => {
|
|
11298
11306
|
gc.luigi.getEngine()._connector?.closeUserSettings();
|
|
11299
11307
|
}), e.addEventListener(V.ADD_SEARCH_PARAMS_REQUEST, (e) => {
|
|
11300
11308
|
let n = e.detail;
|
|
11301
|
-
fc.addSearchParamsFromClient(n.data, n.keepBrowserHistory, t);
|
|
11309
|
+
fc.addSearchParamsFromClient(n.data, n.keepBrowserHistory, n.preventLuigiConfigUpdate, t);
|
|
11302
11310
|
}), e.addEventListener(V.UPDATE_MODAL_SETTINGS_REQUEST, (e) => {
|
|
11303
11311
|
let n = e.payload;
|
|
11304
11312
|
W.updateModalSettings(n.updatedModalSettings, n.addHistoryEntry, t);
|