@telia-ace/widget-components-area-flamingo 1.1.76-rc.13 → 1.1.76-rc.15
Sign up to get free protection for your applications and to get access to all the features.
@@ -66,7 +66,7 @@
|
|
66
66
|
* @license
|
67
67
|
* Copyright 2020 Google LLC
|
68
68
|
* SPDX-License-Identifier: BSD-3-Clause
|
69
|
-
*/const ue=()=>new hi;class hi{}const ht=new WeakMap,de=_t(class extends le{render(s){return u}update(s,[t]){var i;const e=t!==this.Y;return e&&this.Y!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=t,this.ht=(i=s.options)==null?void 0:i.host,this.rt(this.ct=s.element)),u}rt(s){if(typeof this.Y=="function"){const t=this.ht??globalThis;let e=ht.get(t);e===void 0&&(e=new WeakMap,ht.set(t,e)),e.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),e.set(this.Y,s),s!==void 0&&this.Y.call(this.ht,s)}else this.Y.value=s}get lt(){var s,t;return typeof this.Y=="function"?(s=ht.get(this.ht??globalThis))==null?void 0:s.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var li=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,V=(s,t,e,i)=>{for(var r=i>1?void 0:i?pi(t,e):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(r=(i?n(t,e,r):n(r))||r);return i&&r&&li(t,e,r),r};class w extends m{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=ue(),this.widgetActive$=new Ye(!1),this.componentIsDestroyed$=new yt}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?(this.application.appendToDOM(),this.notify("widget-set-active",{widgetId:this.application.id,active:!0}),this.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.notify("widget-set-active",{widgetId:this.application.id,active:!1}),this.widgetActive$.next(!1),this.showTrigger())}notify(t,e={}){window!=null&&window.parent&&window.parent.postMessage({type:t,data:e})}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&pe(this.application.settings.branding,this)}async _renderSymbol(){var a,c,h;const t=(a=this.application)==null?void 0:a.branding(),e=(c=t==null?void 0:t.graphics)==null?void 0:c.trigger;if(e)return C` <img src=${e} class="trigger-icon" alt="" /> `;const i=(h=this.application)==null?void 0:h.triggerIcon;if(!i)return u;const r=async l=>ci,{type:o,content:n}=i;switch(o){case"Telia":{const l=await r();return l?C`<telia-icon
|
69
|
+
*/const ue=()=>new hi;class hi{}const ht=new WeakMap,de=_t(class extends le{render(s){return u}update(s,[t]){var i;const e=t!==this.Y;return e&&this.Y!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=t,this.ht=(i=s.options)==null?void 0:i.host,this.rt(this.ct=s.element)),u}rt(s){if(typeof this.Y=="function"){const t=this.ht??globalThis;let e=ht.get(t);e===void 0&&(e=new WeakMap,ht.set(t,e)),e.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),e.set(this.Y,s),s!==void 0&&this.Y.call(this.ht,s)}else this.Y.value=s}get lt(){var s,t;return typeof this.Y=="function"?(s=ht.get(this.ht??globalThis))==null?void 0:s.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var li=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,V=(s,t,e,i)=>{for(var r=i>1?void 0:i?pi(t,e):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(r=(i?n(t,e,r):n(r))||r);return i&&r&&li(t,e,r),r};class w extends m{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=ue(),this.widgetActive$=new Ye(!1),this.componentIsDestroyed$=new yt}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?(this.application.appendToDOM(),this.notify("widget-set-active",{widgetId:this.application.id,active:!0}),this.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.notify("widget-set-active",{widgetId:this.application.id,active:!1}),this.widgetActive$.next(!1),this.showTrigger())}notify(t,e={}){window!=null&&window.parent&&window.parent.postMessage({type:t,data:e},"*")}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&pe(this.application.settings.branding,this)}async _renderSymbol(){var a,c,h;const t=(a=this.application)==null?void 0:a.branding(),e=(c=t==null?void 0:t.graphics)==null?void 0:c.trigger;if(e)return C` <img src=${e} class="trigger-icon" alt="" /> `;const i=(h=this.application)==null?void 0:h.triggerIcon;if(!i)return u;const r=async l=>ci,{type:o,content:n}=i;switch(o){case"Telia":{const l=await r();return l?C`<telia-icon
|
70
70
|
class="trigger-icon"
|
71
71
|
svg=${l.svg}
|
72
72
|
size="lg"
|
@@ -1625,10 +1625,13 @@ class w extends m {
|
|
1625
1625
|
}), this.widgetActive$.next(!1), this.showTrigger());
|
1626
1626
|
}
|
1627
1627
|
notify(t, e = {}) {
|
1628
|
-
window != null && window.parent && window.parent.postMessage(
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1628
|
+
window != null && window.parent && window.parent.postMessage(
|
1629
|
+
{
|
1630
|
+
type: t,
|
1631
|
+
data: e
|
1632
|
+
},
|
1633
|
+
"*"
|
1634
|
+
);
|
1632
1635
|
}
|
1633
1636
|
_applyBranding() {
|
1634
1637
|
var t;
|
package/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const r=async e=>{e.registerComponent("area",Promise.resolve().then(()=>require("./area-
|
1
|
+
"use strict";const r=async e=>{e.registerComponent("area",Promise.resolve().then(()=>require("./area-335749aa.js")))};module.exports=r;
|
package/index.mjs
CHANGED
package/package.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"name": "@telia-ace/widget-components-area-flamingo",
|
3
|
-
"version": "1.1.76-rc.
|
3
|
+
"version": "1.1.76-rc.15",
|
4
4
|
"dependencies": {
|
5
|
-
"@telia-ace/widget-core-flamingo": "1.1.76-rc.
|
5
|
+
"@telia-ace/widget-core-flamingo": "1.1.76-rc.15",
|
6
6
|
"lit": "^3.0.2"
|
7
7
|
},
|
8
8
|
"main": "./index.js",
|