@telia-ace/widget-components-copyright-flamingo 1.1.76-rc.13 → 1.1.76-rc.15
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.
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
* @license
|
|
63
63
|
* Copyright 2020 Google LLC
|
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
|
-
*/const de=()=>new hi;class hi{}const lt=new WeakMap,ue=_t(class extends he{render(s){return d}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)),d}rt(s){if(typeof this.Y=="function"){const t=this.ht??globalThis;let e=lt.get(t);e===void 0&&(e=new WeakMap,lt.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=lt.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 pi=Object.defineProperty,di=Object.getOwnPropertyDescriptor,z=(s,t,e,i)=>{for(var r=i>1?void 0:i?di(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&&pi(t,e,r),r};class w extends m{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=de(),this.widgetActive$=new Pe(!1),this.componentIsDestroyed$=new gt}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,l;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 x` <img src=${e} class="trigger-icon" alt="" /> `;const i=(l=this.application)==null?void 0:l.triggerIcon;if(!i)return d;const r=async h=>li,{type:o,content:n}=i;switch(o){case"Telia":{const h=await r();return h?x`<telia-icon
|
|
65
|
+
*/const de=()=>new hi;class hi{}const lt=new WeakMap,ue=_t(class extends he{render(s){return d}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)),d}rt(s){if(typeof this.Y=="function"){const t=this.ht??globalThis;let e=lt.get(t);e===void 0&&(e=new WeakMap,lt.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=lt.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 pi=Object.defineProperty,di=Object.getOwnPropertyDescriptor,z=(s,t,e,i)=>{for(var r=i>1?void 0:i?di(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&&pi(t,e,r),r};class w extends m{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=de(),this.widgetActive$=new Pe(!1),this.componentIsDestroyed$=new gt}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,l;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 x` <img src=${e} class="trigger-icon" alt="" /> `;const i=(l=this.application)==null?void 0:l.triggerIcon;if(!i)return d;const r=async h=>li,{type:o,content:n}=i;switch(o){case"Telia":{const h=await r();return h?x`<telia-icon
|
|
66
66
|
class="trigger-icon"
|
|
67
67
|
svg=${h.svg}
|
|
68
68
|
size="lg"
|
|
@@ -1613,10 +1613,13 @@ class w extends m {
|
|
|
1613
1613
|
}), this.widgetActive$.next(!1), this.showTrigger());
|
|
1614
1614
|
}
|
|
1615
1615
|
notify(t, e = {}) {
|
|
1616
|
-
window != null && window.parent && window.parent.postMessage(
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1616
|
+
window != null && window.parent && window.parent.postMessage(
|
|
1617
|
+
{
|
|
1618
|
+
type: t,
|
|
1619
|
+
data: e
|
|
1620
|
+
},
|
|
1621
|
+
"*"
|
|
1622
|
+
);
|
|
1620
1623
|
}
|
|
1621
1624
|
_applyBranding() {
|
|
1622
1625
|
var t;
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=async e=>{e.registerComponent("copyright",Promise.resolve().then(()=>require("./copyright-
|
|
1
|
+
"use strict";const o=async e=>{e.registerComponent("copyright",Promise.resolve().then(()=>require("./copyright-58870f78.js")))};module.exports=o;
|
package/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-components-copyright-flamingo",
|
|
3
|
-
"version": "1.1.76-rc.
|
|
3
|
+
"version": "1.1.76-rc.15",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"lit": "^3.0.2",
|
|
6
|
-
"@telia-ace/widget-core-flamingo": "1.1.76-rc.
|
|
6
|
+
"@telia-ace/widget-core-flamingo": "1.1.76-rc.15"
|
|
7
7
|
},
|
|
8
8
|
"main": "./index.js",
|
|
9
9
|
"module": "./index.mjs",
|