@telia-ace/widget-runtime-flamingo 1.1.123-rc.9 → 1.1.123

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.
@@ -1,4 +1,4 @@
1
- import { i as L, t as D, e as A, E as b, a as P, b as z, c as E, d as M, m as Y, o as f, x as g, f as R, n as N, r as u, T as w, W as T, g as j } from "./index-Cz3Sz1kR.mjs";
1
+ import { i as L, t as D, e as A, E as b, a as P, b as z, c as E, s as M, m as Y, o as f, x as m, d as R, n as N, r as u, T as w, W as T, f as j } from "./index-DPP20EVG.mjs";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -26,7 +26,7 @@ const p = (t, e) => {
26
26
  if (s === void 0) return !1;
27
27
  for (const i of s) (n = i._$AO) == null || n.call(i, e, !1), p(i, e);
28
28
  return !0;
29
- }, m = (t) => {
29
+ }, g = (t) => {
30
30
  let e, s;
31
31
  do {
32
32
  if ((e = t._$AM) === void 0) break;
@@ -41,12 +41,12 @@ const p = (t, e) => {
41
41
  }
42
42
  };
43
43
  function H(t) {
44
- this._$AN !== void 0 ? (m(this), this._$AM = t, k(this)) : this._$AM = t;
44
+ this._$AN !== void 0 ? (g(this), this._$AM = t, k(this)) : this._$AM = t;
45
45
  }
46
46
  function K(t, e = !1, s = 0) {
47
47
  const n = this._$AH, i = this._$AN;
48
- if (i !== void 0 && i.size !== 0) if (e) if (Array.isArray(n)) for (let r = s; r < n.length; r++) p(n[r], !1), m(n[r]);
49
- else n != null && (p(n, !1), m(n));
48
+ if (i !== void 0 && i.size !== 0) if (e) if (Array.isArray(n)) for (let r = s; r < n.length; r++) p(n[r], !1), g(n[r]);
49
+ else n != null && (p(n, !1), g(n));
50
50
  else p(this, t);
51
51
  }
52
52
  const X = (t) => {
@@ -61,7 +61,7 @@ class G extends L {
61
61
  }
62
62
  _$AO(e, s = !0) {
63
63
  var n, i;
64
- e !== this.isConnected && (this.isConnected = e, e ? (n = this.reconnected) == null || n.call(this) : (i = this.disconnected) == null || i.call(this)), s && (p(this, e), m(this));
64
+ e !== this.isConnected && (this.isConnected = e, e ? (n = this.reconnected) == null || n.call(this) : (i = this.disconnected) == null || i.call(this)), s && (p(this, e), g(this));
65
65
  }
66
66
  setValue(e) {
67
67
  if (I(this._$Ct)) this._$Ct._$AI(e, this);
@@ -185,7 +185,7 @@ let c = class extends P {
185
185
  this.renderRoot.host.style.setProperty(o, a);
186
186
  }));
187
187
  }
188
- return this.renderState && (this.renderState === f.hidden ? ((e = this.wrapperRef.value) == null || e.classList.add("hidden"), (s = this.wrapperRef.value) == null || s.classList.remove("expanded")) : ((n = this.wrapperRef.value) == null || n.classList.remove("hidden"), (i = this.wrapperRef.value) == null || i.classList.add("expanded"))), this.applyBranding(), g`
188
+ return this.renderState && (this.renderState === f.hidden ? ((e = this.wrapperRef.value) == null || e.classList.add("ace-hidden"), (s = this.wrapperRef.value) == null || s.classList.remove("ace-expanded")) : ((n = this.wrapperRef.value) == null || n.classList.remove("ace-hidden"), (i = this.wrapperRef.value) == null || i.classList.add("ace-expanded"))), this.applyBranding(), m`
189
189
  <div class="widget-container" ${U(this.wrapperRef)}>
190
190
  <ace-area entry=${this.entry}></ace-area>
191
191
  </div>
@@ -242,11 +242,11 @@ c.styles = R`
242
242
  background-color: var(--primary-background);
243
243
  padding: 0 var(--spacing-sm);
244
244
  }
245
- .widget-container.expanded {
245
+ .widget-container.ace-expanded {
246
246
  opacity: 1;
247
247
  animation: slideUp 0.5s;
248
248
  }
249
- .widget-container.hidden {
249
+ .widget-container.ace-hidden {
250
250
  opacity: 0;
251
251
  animation: slideDown 0.5s;
252
252
  }
@@ -402,13 +402,13 @@ let _ = class extends O {
402
402
  ), j(
403
403
  this.renderRoot.host,
404
404
  this._propertiesProvider.value
405
- ), g`
405
+ ), m`
406
406
  ${nt(
407
407
  this._resolveAllChildren(this._childrenProvider.value).then(
408
- (e) => g`
408
+ (e) => m`
409
409
  ${e.map((s) => {
410
410
  if (s.type === "area")
411
- return g`<ace-area entry=${s.id}></ace-area>`;
411
+ return m`<ace-area entry=${s.id}></ace-area>`;
412
412
  const n = new s.component();
413
413
  return n.entry = s.id, n;
414
414
  })}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-VZwzuJ8Y.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-PiwZOlQl.js");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -14,7 +14,7 @@
14
14
  * @license
15
15
  * Copyright 2020 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
- */const G=()=>new O;let O=class{};const v=new WeakMap,L=r.e(class extends C{render(t){return r.E}update(t,[e]){var n;const s=e!==this.G;return s&&this.G!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=e,this.ht=(n=t.options)==null?void 0:n.host,this.rt(this.ct=t.element)),r.E}rt(t){if(this.isConnected||(t=void 0),typeof this.G=="function"){const e=this.ht??globalThis;let s=v.get(e);s===void 0&&(s=new WeakMap,v.set(e,s)),s.get(this.G)!==void 0&&this.G.call(this.ht,void 0),s.set(this.G,t),t!==void 0&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){var t,e;return typeof this.G=="function"?(t=v.get(this.ht??globalThis))==null?void 0:t.get(this.G):(e=this.G)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),E=async t=>await t.get("$widget").invoke("renderState"),D=async(t,e)=>{const s=t.get("$widget");return(await t.getAsync("actionResolver")).subscribe(s.name,e)},M=(t,e,s=!1)=>{const n=t.reduce((a,{breakpoints:c=[],values:l})=>c.length?e.some(g=>c.includes(g))?{...a,...l}:a:{...a,...l},{}),i={},o=n.type;return i.height=n.height||"",i.width=n.width||"",n.type==="floating"||n.type==="inline"&&s&&(i.height="calc(100vh - 120px)"),{type:o,styles:i}};var T=Object.defineProperty,z=Object.getOwnPropertyDescriptor,d=(t,e,s,n)=>{for(var i=n>1?void 0:n?z(e,s):e,o=t.length-1,a;o>=0;o--)(a=t[o])&&(i=(n?a(e,s,i):a(i))||i);return n&&i&&T(e,s,i),i};let h=class extends r.i$1{constructor(){super(),this._provider=new r.i$2(this,r.containerContext,void 0),this.wrapperRef=G(),this.breakpoints=[],this.breakpointsSet=!1}connectedCallback(){super.connectedCallback(),this._provider.setValue(this.container),this.container&&(E(this.container).then(t=>{this.renderState=t}),D(this.container,(t,e)=>{switch(e){case"close":case"open":this.renderState=e==="open"?r.ot.open:r.ot.closed;break;case"hide":this.renderState=r.ot.hidden}}).then(t=>{this._unsubscribeRenderState=t}),r.et.getInstance(this.container).then(t=>{this.componentPlatform=t,this.breakpoints=this.componentPlatform.breakpoints,this.breakpointsSet=!0,this._unsubscribePropChange=this.componentPlatform.events.subscribe("components:properties-changed",(e,s)=>{var n,i;((n=s==null?void 0:s.node)==null?void 0:n.type)==="root"&&(this.breakpoints=(i=this.componentPlatform)!=null&&i.breakpoints?[...this.componentPlatform.breakpoints]:[])}),this.entry=this.componentPlatform.nodes.root.children.default[0].id||void 0}))}disconnectedCallback(){super.disconnectedCallback(),this._unsubscribeRenderState&&this._unsubscribeRenderState(),this._unsubscribePropChange&&this._unsubscribePropChange()}applyBranding(){var t;if(this.wrapperRef.value){const e=(t=this.container)==null?void 0:t.get("$settings");e!=null&&e.branding&&r.mapBranding(e.branding,this.wrapperRef.value)}}render(){var e,s,n,i;let t;if(!this.entry||!this.breakpointsSet)return r.E;if(this.container&&this.renderState){const[o]=this.container.get("widgetDOMElements");o&&o.setAttribute("data-state",this.renderState)}if(this.container){const o=this.container.get("$settings");o!=null&&o.layout&&(t=M(o.layout,this.breakpoints,!!o.trigger),t.type==="floating"?(this.renderRoot.host.classList.add("floating"),this.renderRoot.host.classList.remove("inline")):(this.renderRoot.host.classList.add("inline"),this.renderRoot.host.classList.remove("floating")),Object.entries(t.styles).forEach(([a,c])=>{this.renderRoot.host.style.setProperty(a,c)}))}return this.renderState&&(this.renderState===r.ot.hidden?((e=this.wrapperRef.value)==null||e.classList.add("hidden"),(s=this.wrapperRef.value)==null||s.classList.remove("expanded")):((n=this.wrapperRef.value)==null||n.classList.remove("hidden"),(i=this.wrapperRef.value)==null||i.classList.add("expanded"))),this.applyBranding(),r.x`
17
+ */const G=()=>new O;let O=class{};const v=new WeakMap,L=r.e(class extends C{render(t){return r.E}update(t,[e]){var n;const s=e!==this.G;return s&&this.G!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=e,this.ht=(n=t.options)==null?void 0:n.host,this.rt(this.ct=t.element)),r.E}rt(t){if(this.isConnected||(t=void 0),typeof this.G=="function"){const e=this.ht??globalThis;let s=v.get(e);s===void 0&&(s=new WeakMap,v.set(e,s)),s.get(this.G)!==void 0&&this.G.call(this.ht,void 0),s.set(this.G,t),t!==void 0&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){var t,e;return typeof this.G=="function"?(t=v.get(this.ht??globalThis))==null?void 0:t.get(this.G):(e=this.G)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),E=async t=>await t.get("$widget").invoke("renderState"),D=async(t,e)=>{const s=t.get("$widget");return(await t.getAsync("actionResolver")).subscribe(s.name,e)},M=(t,e,s=!1)=>{const n=t.reduce((a,{breakpoints:c=[],values:l})=>c.length?e.some(g=>c.includes(g))?{...a,...l}:a:{...a,...l},{}),i={},o=n.type;return i.height=n.height||"",i.width=n.width||"",n.type==="floating"||n.type==="inline"&&s&&(i.height="calc(100vh - 120px)"),{type:o,styles:i}};var T=Object.defineProperty,z=Object.getOwnPropertyDescriptor,d=(t,e,s,n)=>{for(var i=n>1?void 0:n?z(e,s):e,o=t.length-1,a;o>=0;o--)(a=t[o])&&(i=(n?a(e,s,i):a(i))||i);return n&&i&&T(e,s,i),i};let h=class extends r.i$1{constructor(){super(),this._provider=new r.i$2(this,r.containerContext,void 0),this.wrapperRef=G(),this.breakpoints=[],this.breakpointsSet=!1}connectedCallback(){super.connectedCallback(),this._provider.setValue(this.container),this.container&&(E(this.container).then(t=>{this.renderState=t}),D(this.container,(t,e)=>{switch(e){case"close":case"open":this.renderState=e==="open"?r.ot.open:r.ot.closed;break;case"hide":this.renderState=r.ot.hidden}}).then(t=>{this._unsubscribeRenderState=t}),r.st.getInstance(this.container).then(t=>{this.componentPlatform=t,this.breakpoints=this.componentPlatform.breakpoints,this.breakpointsSet=!0,this._unsubscribePropChange=this.componentPlatform.events.subscribe("components:properties-changed",(e,s)=>{var n,i;((n=s==null?void 0:s.node)==null?void 0:n.type)==="root"&&(this.breakpoints=(i=this.componentPlatform)!=null&&i.breakpoints?[...this.componentPlatform.breakpoints]:[])}),this.entry=this.componentPlatform.nodes.root.children.default[0].id||void 0}))}disconnectedCallback(){super.disconnectedCallback(),this._unsubscribeRenderState&&this._unsubscribeRenderState(),this._unsubscribePropChange&&this._unsubscribePropChange()}applyBranding(){var t;if(this.wrapperRef.value){const e=(t=this.container)==null?void 0:t.get("$settings");e!=null&&e.branding&&r.mapBranding(e.branding,this.wrapperRef.value)}}render(){var e,s,n,i;let t;if(!this.entry||!this.breakpointsSet)return r.E;if(this.container&&this.renderState){const[o]=this.container.get("widgetDOMElements");o&&o.setAttribute("data-state",this.renderState)}if(this.container){const o=this.container.get("$settings");o!=null&&o.layout&&(t=M(o.layout,this.breakpoints,!!o.trigger),t.type==="floating"?(this.renderRoot.host.classList.add("floating"),this.renderRoot.host.classList.remove("inline")):(this.renderRoot.host.classList.add("inline"),this.renderRoot.host.classList.remove("floating")),Object.entries(t.styles).forEach(([a,c])=>{this.renderRoot.host.style.setProperty(a,c)}))}return this.renderState&&(this.renderState===r.ot.hidden?((e=this.wrapperRef.value)==null||e.classList.add("ace-hidden"),(s=this.wrapperRef.value)==null||s.classList.remove("ace-expanded")):((n=this.wrapperRef.value)==null||n.classList.remove("ace-hidden"),(i=this.wrapperRef.value)==null||i.classList.add("ace-expanded"))),this.applyBranding(),r.x`
18
18
  <div class="widget-container" ${L(this.wrapperRef)}>
19
19
  <ace-area entry=${this.entry}></ace-area>
20
20
  </div>
@@ -68,11 +68,11 @@
68
68
  background-color: var(--primary-background);
69
69
  padding: 0 var(--spacing-sm);
70
70
  }
71
- .widget-container.expanded {
71
+ .widget-container.ace-expanded {
72
72
  opacity: 1;
73
73
  animation: slideUp 0.5s;
74
74
  }
75
- .widget-container.hidden {
75
+ .widget-container.ace-hidden {
76
76
  opacity: 0;
77
77
  animation: slideDown 0.5s;
78
78
  }