@uxland/primary-shell 5.1.1 → 5.1.2

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/dist/index.js CHANGED
@@ -31608,7 +31608,7 @@ const template$g = (J) => ke$1`
31608
31608
  `;
31609
31609
  class ExitShell {
31610
31610
  }
31611
- const styles$f = ":host{min-height:1px;height:100%;width:100%}.wrapper{position:relative;min-height:1px;height:100%;display:flex;flex-direction:row}.wrapper #widgets-sidebar-region{width:25%;border-left:1px solid rgb(189,189,189)}.wrapper .content{flex:1;display:flex;flex-direction:column}.wrapper .content #header-widgets-region{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;padding:24px 40px;z-index:1}.wrapper .content #content-widgets-region{flex:1;min-height:1px;height:100%;padding-inline:40px;padding-bottom:24px;z-index:2}", template$f = (J) => ke$1`
31611
+ const styles$f = ":host{min-height:1px;height:100%;width:100%}.wrapper{position:relative;min-height:1px;height:100%;display:flex;flex-direction:row}.wrapper #widgets-sidebar-region{width:25%;border-left:1px solid rgb(189,189,189)}.wrapper .content{flex:1;display:flex;flex-direction:column}.wrapper .content #header-widgets-region{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;padding:24px 40px}.wrapper .content #content-widgets-region{flex:1;min-height:1px;height:100%;padding-inline:40px;padding-bottom:24px}", template$f = (J) => ke$1`
31612
31612
  <div class="wrapper">
31613
31613
  <div class="content">
31614
31614
  <div id="header-widgets-region"></div>
@@ -31626,6 +31626,28 @@ let ClinicalMonitoring = class extends PrimariaRegionHost(h$q) {
31626
31626
  render() {
31627
31627
  return ke$1`${template$f()}`;
31628
31628
  }
31629
+ firstUpdated() {
31630
+ this._observeMaximizedState();
31631
+ }
31632
+ _observeMaximizedState() {
31633
+ const J = this.renderRoot.querySelector("#content-widgets-region");
31634
+ if (!J) return;
31635
+ new MutationObserver(() => {
31636
+ const X = J.querySelector("activity-history-main");
31637
+ if (!X) return;
31638
+ const te = X.hasAttribute("maximized") || X.maximized;
31639
+ this._toggleWidgetsVisibility(!te);
31640
+ }).observe(J, {
31641
+ childList: !0,
31642
+ subtree: !0,
31643
+ attributes: !0,
31644
+ attributeFilter: ["maximized"]
31645
+ });
31646
+ }
31647
+ _toggleWidgetsVisibility(J) {
31648
+ const W = this.renderRoot.querySelector("#widgets-sidebar-region"), X = this.renderRoot.querySelector("#header-widgets-region");
31649
+ W && (W.style.display = J ? "" : "none"), X && (X.style.display = J ? "" : "none");
31650
+ }
31629
31651
  };
31630
31652
  ClinicalMonitoring.styles = i$y`
31631
31653
  ${r$H(styles$f)}
@@ -34840,7 +34862,7 @@ ActivityHistoryMain.styles = i$y`
34840
34862
  ${r$H(styles$4)}
34841
34863
  `;
34842
34864
  __decorateClass$a([
34843
- n$v({ type: Boolean })
34865
+ n$v({ type: Boolean, reflect: !0 })
34844
34866
  ], ActivityHistoryMain.prototype, "maximized", 2);
34845
34867
  __decorateClass$a([
34846
34868
  lazyInject(TYPES.primaryApi)
@@ -34879,7 +34901,7 @@ const internalPlugins = [
34879
34901
  ], bootstrapPlugins = async (J) => {
34880
34902
  const W = internalPlugins.concat(J || []);
34881
34903
  bootstrappedPlugins = await v$b(W, primariaApiFactory);
34882
- }, disposePlugins = async () => Promise.all(bootstrappedPlugins.map((J) => J.dispose())), styles$3 = ".container{display:flex;flex-direction:column;gap:4px;align-items:center}.title{font-size:15px;line-height:24px;font-weight:600;color:var(--color-red-600)}.list{display:flex;flex-direction:column;gap:8px}", template$4 = (J) => {
34904
+ }, disposePlugins = async () => Promise.all(bootstrappedPlugins.map((J) => J == null ? void 0 : J.dispose())), styles$3 = ".container{display:flex;flex-direction:column;gap:4px;align-items:center}.title{font-size:15px;line-height:24px;font-weight:600;color:var(--color-red-600)}.list{display:flex;flex-direction:column;gap:8px}", template$4 = (J) => {
34883
34905
  var W, X;
34884
34906
  return ke$1`
34885
34907
  <div class="container">
@@ -34922,14 +34944,14 @@ let ExitShellHandler = class {
34922
34944
  const { confirmed: X } = await this.askForClose(W);
34923
34945
  if (!X) return;
34924
34946
  }
34925
- disposeShell(), await Promise.race([
34947
+ await Promise.race([
34926
34948
  disposePlugins(),
34927
34949
  // S'intenta executar un dispose normal
34928
34950
  this.timeout(5e3)
34929
34951
  // Si passen 5s, es segueix amb l'execució
34930
- ]), raiseCloseEvent();
34952
+ ]), disposeShell(), raiseCloseEvent();
34931
34953
  } catch (W) {
34932
- this.api.notificationService.error(W.message);
34954
+ this.api.notificationService.error(W.message), raiseCloseEvent();
34933
34955
  }
34934
34956
  }
34935
34957
  askForClose(J) {