@luigi-project/core-modular 0.0.11-dev.20260780050 → 0.0.11-dev.20260790055

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.
@@ -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/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
@@ -9438,13 +9438,13 @@ var Ti = {
9438
9438
  constructor(e) {
9439
9439
  this.luigi = e;
9440
9440
  }
9441
- addSearchParams(e, t = !1) {
9441
+ addSearchParams(e, t = !1, n = !1) {
9442
9442
  if (!a.isObject(e)) {
9443
9443
  console.log("Params argument must be an object");
9444
9444
  return;
9445
9445
  }
9446
- let n = new URL(location.href);
9447
- this.luigi.getConfigValue("routing.useHashRouting") ? n.hash = H.addParamsOnHashRouting(e, n.hash) : H.modifySearchParams(e, n.searchParams), this.handleBrowserHistory(t, n), this.luigi.configChanged();
9446
+ let r = new URL(location.href);
9447
+ 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
9448
  }
9449
9449
  getSearchParams() {
9450
9450
  let e = {}, t = [
@@ -11176,15 +11176,15 @@ var fc = {
11176
11176
  t && (t.opener = null, t.focus());
11177
11177
  }
11178
11178
  },
11179
- async addSearchParamsFromClient(e, t, n) {
11180
- let r = U.get(Ni), i = H.getCurrentPath(n, n.getConfig().routing?.useHashRouting), a = (await r.getCurrentNode(i.path))?.clientPermissions?.urlParameters, o = { ...e };
11181
- if (a) {
11179
+ async addSearchParamsFromClient(e, t, n, r) {
11180
+ let i = U.get(Ni), a = H.getCurrentPath(r, r.getConfig().routing?.useHashRouting), o = (await i.getCurrentNode(a.path))?.clientPermissions?.urlParameters, s = { ...e };
11181
+ if (o) {
11182
11182
  let e = {};
11183
- Object.keys(a).forEach((t) => {
11184
- t in o && a[t]?.write === !0 && (e[t] = o[t], delete o[t]);
11183
+ Object.keys(o).forEach((t) => {
11184
+ t in s && o[t]?.write === !0 && (e[t] = s[t], delete s[t]);
11185
11185
  });
11186
- for (let e in o) console.warn(`No permission to add the search param "${e}" to the url`);
11187
- Object.keys(e).length > 0 && n.routing().addSearchParams(e, t);
11186
+ for (let e in s) console.warn(`No permission to add the search param "${e}" to the url`);
11187
+ Object.keys(e).length > 0 && r.routing().addSearchParams(e, t, n);
11188
11188
  }
11189
11189
  }
11190
11190
  }, pc, mc = {
@@ -11298,7 +11298,7 @@ var fc = {
11298
11298
  gc.luigi.getEngine()._connector?.closeUserSettings();
11299
11299
  }), e.addEventListener(V.ADD_SEARCH_PARAMS_REQUEST, (e) => {
11300
11300
  let n = e.detail;
11301
- fc.addSearchParamsFromClient(n.data, n.keepBrowserHistory, t);
11301
+ fc.addSearchParamsFromClient(n.data, n.keepBrowserHistory, n.preventLuigiConfigUpdate, t);
11302
11302
  }), e.addEventListener(V.UPDATE_MODAL_SETTINGS_REQUEST, (e) => {
11303
11303
  let n = e.payload;
11304
11304
  W.updateModalSettings(n.updatedModalSettings, n.addHistoryEntry, t);