@luigi-project/core-modular 0.0.11-dev.20260710115 → 0.0.11-dev.202607110048
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 +22 -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/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 || {},
|
|
@@ -9438,13 +9439,13 @@ var Ti = {
|
|
|
9438
9439
|
constructor(e) {
|
|
9439
9440
|
this.luigi = e;
|
|
9440
9441
|
}
|
|
9441
|
-
addSearchParams(e, t = !1) {
|
|
9442
|
+
addSearchParams(e, t = !1, n = !1) {
|
|
9442
9443
|
if (!a.isObject(e)) {
|
|
9443
9444
|
console.log("Params argument must be an object");
|
|
9444
9445
|
return;
|
|
9445
9446
|
}
|
|
9446
|
-
let
|
|
9447
|
-
this.luigi.getConfigValue("routing.useHashRouting") ?
|
|
9447
|
+
let r = new URL(location.href);
|
|
9448
|
+
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
9449
|
}
|
|
9449
9450
|
getSearchParams() {
|
|
9450
9451
|
let e = {}, t = [
|
|
@@ -9605,6 +9606,9 @@ var Ti = {
|
|
|
9605
9606
|
}
|
|
9606
9607
|
});
|
|
9607
9608
|
}));
|
|
9609
|
+
collapseLeftSideNav = (e) => {
|
|
9610
|
+
this.luigi.getEngine()._connector?.collapseLeftSideNav(e);
|
|
9611
|
+
};
|
|
9608
9612
|
openUserSettings = async () => {
|
|
9609
9613
|
let e = this.luigi.getConfigValue("userSettings");
|
|
9610
9614
|
if (!e) return;
|
|
@@ -11176,15 +11180,15 @@ var fc = {
|
|
|
11176
11180
|
t && (t.opener = null, t.focus());
|
|
11177
11181
|
}
|
|
11178
11182
|
},
|
|
11179
|
-
async addSearchParamsFromClient(e, t, n) {
|
|
11180
|
-
let
|
|
11181
|
-
if (
|
|
11183
|
+
async addSearchParamsFromClient(e, t, n, r) {
|
|
11184
|
+
let i = U.get(Ni), a = H.getCurrentPath(r, r.getConfig().routing?.useHashRouting), o = (await i.getCurrentNode(a.path))?.clientPermissions?.urlParameters, s = { ...e };
|
|
11185
|
+
if (o) {
|
|
11182
11186
|
let e = {};
|
|
11183
|
-
Object.keys(
|
|
11184
|
-
t in
|
|
11187
|
+
Object.keys(o).forEach((t) => {
|
|
11188
|
+
t in s && o[t]?.write === !0 && (e[t] = s[t], delete s[t]);
|
|
11185
11189
|
});
|
|
11186
|
-
for (let e in
|
|
11187
|
-
Object.keys(e).length > 0 &&
|
|
11190
|
+
for (let e in s) console.warn(`No permission to add the search param "${e}" to the url`);
|
|
11191
|
+
Object.keys(e).length > 0 && r.routing().addSearchParams(e, t, n);
|
|
11188
11192
|
}
|
|
11189
11193
|
}
|
|
11190
11194
|
}, pc, mc = {
|
|
@@ -11292,13 +11296,16 @@ var fc = {
|
|
|
11292
11296
|
}), e.addEventListener(V.ADD_NODE_PARAMS_REQUEST, (e) => {
|
|
11293
11297
|
let n = e.payload;
|
|
11294
11298
|
t.routing().addNodeParams(n.data, n.keepBrowserHistory);
|
|
11299
|
+
}), e.addEventListener(V.COLLAPSE_LEFT_NAV_REQUEST, (e) => {
|
|
11300
|
+
let n = e.payload;
|
|
11301
|
+
t.ux().collapseLeftSideNav(n.state);
|
|
11295
11302
|
}), e.addEventListener(V.OPEN_USER_SETTINGS_REQUEST, () => {
|
|
11296
11303
|
t.ux().openUserSettings();
|
|
11297
11304
|
}), e.addEventListener(V.CLOSE_USER_SETTINGS_REQUEST, () => {
|
|
11298
11305
|
gc.luigi.getEngine()._connector?.closeUserSettings();
|
|
11299
11306
|
}), e.addEventListener(V.ADD_SEARCH_PARAMS_REQUEST, (e) => {
|
|
11300
11307
|
let n = e.detail;
|
|
11301
|
-
fc.addSearchParamsFromClient(n.data, n.keepBrowserHistory, t);
|
|
11308
|
+
fc.addSearchParamsFromClient(n.data, n.keepBrowserHistory, n.preventLuigiConfigUpdate, t);
|
|
11302
11309
|
}), e.addEventListener(V.UPDATE_MODAL_SETTINGS_REQUEST, (e) => {
|
|
11303
11310
|
let n = e.payload;
|
|
11304
11311
|
W.updateModalSettings(n.updatedModalSettings, n.addHistoryEntry, t);
|