@luigi-project/core-modular 0.0.20-dev.202610260958 → 0.0.20-dev.202610261542

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.
@@ -10,6 +10,8 @@ export declare class Navigation {
10
10
  routingService: RoutingService;
11
11
  modalService: ModalService;
12
12
  options: NavigationOptions;
13
+ preventHistoryEntry: boolean;
14
+ preventContextUpdate: boolean;
13
15
  constructor(luigi: Luigi);
14
16
  navigate: (path: string, preserveView?: boolean, modalSettings?: ModalSettings, splitViewSettings?: any, drawerSettings?: any) => Promise<void>;
15
17
  /**
@@ -74,6 +76,22 @@ export declare class Navigation {
74
76
  * @returns {navigation} navigation instance
75
77
  */
76
78
  fromParent(): Navigation;
79
+ /**
80
+ * Sets options to customise route-changing behaviour. The options are used by the `navigate` function. Use it optionally in combination with any of the navigation functions.
81
+ * @param {Object} options - navigation options
82
+ * @param {boolean} options.preventHistoryEntry - by default, it is set to `false`. If it is set to `true`, there is no browser history being kept.
83
+ * @param {boolean} options.preventContextUpdate - by default, it is set to `false`. If it is set to `true`, there is no context update being triggered.
84
+ * @returns {Navigation} navigation instance
85
+ * @since NEXTRELEASE
86
+ * @example
87
+ * Luigi.navigation().withOptions(
88
+ * { preventContextUpdate: true, preventHistoryEntry: true }
89
+ * ).navigate('/overview')
90
+ */
91
+ withOptions(options: {
92
+ preventHistoryEntry?: boolean;
93
+ preventContextUpdate?: boolean;
94
+ }): Navigation;
77
95
  withParams(nodeParams: Record<string, any>): Navigation;
78
96
  /**
79
97
  * Refreshes top navigation badge counters by rendering the navigation again.
package/luigi.js CHANGED
@@ -9573,6 +9573,8 @@ var ui = {
9573
9573
  fromParent: !1,
9574
9574
  nodeParams: {}
9575
9575
  };
9576
+ preventHistoryEntry = !1;
9577
+ preventContextUpdate = !1;
9576
9578
  constructor(e) {
9577
9579
  this.luigi = e, this.hashRouting = e.getConfig().routing?.useHashRouting, this.navService = W.get(vi), this.routingService = W.get(xi), this.modalService = W.get(hi);
9578
9580
  }
@@ -9586,8 +9588,8 @@ var ui = {
9586
9588
  options: this.options,
9587
9589
  path: e,
9588
9590
  preserveView: t,
9589
- preventContextUpdate: !1,
9590
- preventHistoryEntry: !1,
9591
+ preventContextUpdate: this.preventContextUpdate,
9592
+ preventHistoryEntry: this.preventHistoryEntry,
9591
9593
  withoutSync: !1
9592
9594
  };
9593
9595
  return this.navService.handleNavigationRequest(o, void 0);
@@ -9661,6 +9663,9 @@ var ui = {
9661
9663
  fromParent() {
9662
9664
  return this.options.fromContext = null, this.options.fromClosestContext = !1, this.options.fromVirtualTreeRoot = !1, this.options.fromParent = !0, this;
9663
9665
  }
9666
+ withOptions(e) {
9667
+ return a.isObject(e) && (e.preventHistoryEntry !== void 0 && (this.preventHistoryEntry = e.preventHistoryEntry), e.preventContextUpdate !== void 0 && (this.preventContextUpdate = e.preventContextUpdate)), this;
9668
+ }
9664
9669
  withParams(e) {
9665
9670
  return e && Object.assign(this.options.nodeParams ?? {}, e), this;
9666
9671
  }