@luigi-project/core-modular 0.0.17 → 0.0.18-dev.202610130059

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.js CHANGED
@@ -7969,6 +7969,16 @@ var fi = {
7969
7969
  }, i = n?.pathParams ? n.pathParams : {};
7970
7970
  c.url = U.substituteViewUrl(r, i, void 0, this.luigi), l = c.url;
7971
7971
  }
7972
+ if (s.statusBadge) {
7973
+ let e = {
7974
+ critical: "Critical",
7975
+ informative: "Information",
7976
+ negative: "Negative",
7977
+ neutral: "Neutral",
7978
+ positive: "Positive"
7979
+ };
7980
+ s.statusBadge.type = e[s.statusBadge.type] || "Neutral";
7981
+ }
7972
7982
  let d = s.category && (typeof s.category == "string" || s.category.id || s.category.label);
7973
7983
  if (d) {
7974
7984
  let n = s.category.id || s.category.label || s.category, a = this.luigi.i18n().getTranslation(s.category.label || s.category.id || s.category), o = r[n];
@@ -8383,7 +8393,18 @@ var fi = {
8383
8393
  }
8384
8394
  }
8385
8395
  let v = _.replace(/\/\/+/g, "/"), y = d ? "replaceState" : "pushState", { path: b, query: x } = U.getCurrentPath(this.luigi, p), S = b + (x ? "?" + x : "");
8386
- if (!(!(o || s) && a.trimLeadingSlash(S) === a.trimLeadingSlash(v))) if (o || s) if (o) h && Object.keys(h).length > 0 && (o.nodeParams = h), this.luigi.navigation().openAsDrawer(v, o, t);
8396
+ if (!(o || s) && a.trimLeadingSlash(S) === a.trimLeadingSlash(v)) {
8397
+ let e = this.luigi.getEngine()._connector?.getContainerWrapper();
8398
+ if (e?.childNodes) {
8399
+ let t = [...e.childNodes].find((e) => e.tagName?.indexOf("LUIGI-") === 0 && e.style?.display !== "none");
8400
+ t && (t.remove(), G.routingService.handleRouteChange({
8401
+ path: b,
8402
+ query: x
8403
+ }));
8404
+ }
8405
+ return;
8406
+ }
8407
+ if (o || s) if (o) h && Object.keys(h).length > 0 && (o.nodeParams = h), this.luigi.navigation().openAsDrawer(v, o, t);
8387
8408
  else {
8388
8409
  if (!s.keepPrevious && !await this.getModalService().closeModalsWithDirtyCheck()) return;
8389
8410
  h && Object.keys(h).length > 0 && (s.nodeParams = h), this.luigi.navigation().openAsModal(v, s, t);
@@ -9535,7 +9556,7 @@ var fi = {
9535
9556
  let r = e.replace(/\/\/+/g, "/");
9536
9557
  if (!await H.validatePathAndGetRedirect(r, this.luigi)) return;
9537
9558
  let i = await this.navService.getCurrentNode(r), a = t || {};
9538
- a.title ||= i?.label;
9559
+ a.title ||= i?.label, a.size ||= "l", a.closebtn_data_testid ||= `lui-modal-index-${this.modalService.getModalStackLength()}`;
9539
9560
  let o = a.nodeParams || this.options.nodeParams || {}, s = r;
9540
9561
  if (o && Object.keys(o).length > 0) {
9541
9562
  let e = U.getContentViewParamPrefix(this.luigi), t = Object.entries(o).map(([t, n]) => e + encodeURIComponent(t) + "=" + encodeURIComponent(n)).join("&");
@@ -9558,7 +9579,7 @@ var fi = {
9558
9579
  let e = await U.getNodeLabel(i, this.luigi) || "";
9559
9580
  a.header && Object.keys(a.header).length ? a.header.title = e : a.header = { title: e };
9560
9581
  }
9561
- a.overlap === void 0 && (a.overlap = !0);
9582
+ a.overlap === void 0 && (a.overlap = !0), a.size ||= "s";
9562
9583
  let o = a.nodeParams || this.options.nodeParams || {};
9563
9584
  this.luigi.getEngine()._ui.openDrawer(this.luigi, i, a, n, {
9564
9585
  nodeParams: o,