@telia-ace/widget-components-area-flamingo 1.1.36 → 1.1.37-rc.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -64,7 +64,7 @@
|
|
64
64
|
* @license
|
65
65
|
* Copyright 2020 Google LLC
|
66
66
|
* SPDX-License-Identifier: BSD-3-Clause
|
67
|
-
*/const jt=()=>new we;class we{}const Q=new WeakMap,Dt=ot(class extends Ht{render(r){return p}update(r,[t]){var s;const e=t!==this.G;return e&&this.G!==void 0&&this.ot(void 0),(e||this.rt!==this.lt)&&(this.G=t,this.ct=(s=r.options)==null?void 0:s.host,this.ot(this.lt=r.element)),p}ot(r){if(typeof this.G=="function"){const t=this.ct??globalThis;let e=Q.get(t);e===void 0&&(e=new WeakMap,Q.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ct,void 0),e.set(this.G,r),r!==void 0&&this.G.call(this.ct,r)}else this.G.value=r}get rt(){var r,t;return typeof this.G=="function"?(r=Q.get(this.ct??globalThis))==null?void 0:r.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var xe=Object.defineProperty,Ce=Object.getOwnPropertyDescriptor,V=(r,t,e,s)=>{for(var i=s>1?void 0:s?Ce(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(t,e,i):n(i))||i);return s&&i&&xe(t,e,i),i};class E extends f{constructor(){super(...arguments),this.active=!1,this.loaded=!1,this.containerRef=jt()}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}
|
67
|
+
*/const jt=()=>new we;class we{}const Q=new WeakMap,Dt=ot(class extends Ht{render(r){return p}update(r,[t]){var s;const e=t!==this.G;return e&&this.G!==void 0&&this.ot(void 0),(e||this.rt!==this.lt)&&(this.G=t,this.ct=(s=r.options)==null?void 0:s.host,this.ot(this.lt=r.element)),p}ot(r){if(typeof this.G=="function"){const t=this.ct??globalThis;let e=Q.get(t);e===void 0&&(e=new WeakMap,Q.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ct,void 0),e.set(this.G,r),r!==void 0&&this.G.call(this.ct,r)}else this.G.value=r}get rt(){var r,t;return typeof this.G=="function"?(r=Q.get(this.ct??globalThis))==null?void 0:r.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var xe=Object.defineProperty,Ce=Object.getOwnPropertyDescriptor,V=(r,t,e,s)=>{for(var i=s>1?void 0:s?Ce(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(t,e,i):n(i))||i);return s&&i&&xe(t,e,i),i};class E extends f{constructor(){super(...arguments),this.active=!1,this.loaded=!1,this.containerRef=jt()}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}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.application.hide()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&Lt(this.application.settings.branding,this)}async _renderSymbol(){var h,a,l;const t=(h=this.application)==null?void 0:h.branding(),e=(a=t==null?void 0:t.graphics)==null?void 0:a.trigger;if(e)return b` <img src=${e} class="trigger-icon" alt="" /> `;const s=(l=this.application)==null?void 0:l.triggerIcon;if(!s)return p;const i=async c=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(u=>u[c]),{type:o,content:n}=s;switch(o){case"Telia":{const c=await i(n);return c?b`<telia-icon
|
68
68
|
class="trigger-icon"
|
69
69
|
svg=${c.svg}
|
70
70
|
size="lg"
|
@@ -72,7 +72,7 @@
|
|
72
72
|
${!this.active&&((i=(s=(e=(t=this.application)==null?void 0:t.settings)==null?void 0:e.branding)==null?void 0:s.other)!=null&&i.showButtonLabel)?b`
|
73
73
|
<button
|
74
74
|
class="trigger-label"
|
75
|
-
@click=${this.
|
75
|
+
@click=${this.toggleActive}
|
76
76
|
${be({keyframeOptions:{},in:$e,stabilizeOut:!0,skipInitial:!1})}
|
77
77
|
>
|
78
78
|
${this.application.settings.branding.other.buttonLabelText}
|
@@ -81,7 +81,7 @@
|
|
81
81
|
|
82
82
|
<button
|
83
83
|
class=${Ae({trigger:!0,active:this.active,rendered:this.loaded})}
|
84
|
-
@click=${this.
|
84
|
+
@click=${this.toggleActive}
|
85
85
|
>
|
86
86
|
${this.icon}
|
87
87
|
<span class="trigger-close">
|
@@ -1073,7 +1073,7 @@ class E extends f {
|
|
1073
1073
|
async connectedCallback() {
|
1074
1074
|
super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
|
1075
1075
|
}
|
1076
|
-
|
1076
|
+
toggleActive() {
|
1077
1077
|
var t;
|
1078
1078
|
if (!((t = this.application) != null && t.root)) {
|
1079
1079
|
console.warn(
|
@@ -1117,7 +1117,7 @@ class E extends f {
|
|
1117
1117
|
${!this.active && ((i = (s = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : s.other) != null && i.showButtonLabel) ? b`
|
1118
1118
|
<button
|
1119
1119
|
class="trigger-label"
|
1120
|
-
@click=${this.
|
1120
|
+
@click=${this.toggleActive}
|
1121
1121
|
${_e({
|
1122
1122
|
keyframeOptions: {},
|
1123
1123
|
in: me,
|
@@ -1135,7 +1135,7 @@ class E extends f {
|
|
1135
1135
|
active: this.active,
|
1136
1136
|
rendered: this.loaded
|
1137
1137
|
})}
|
1138
|
-
@click=${this.
|
1138
|
+
@click=${this.toggleActive}
|
1139
1139
|
>
|
1140
1140
|
${this.icon}
|
1141
1141
|
<span class="trigger-close">
|
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-0b88df0a.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.
|
3
|
+
"version": "1.1.37-rc.1",
|
4
4
|
"dependencies": {
|
5
|
-
"@telia-ace/widget-core-flamingo": "1.1.
|
5
|
+
"@telia-ace/widget-core-flamingo": "1.1.37-rc.1",
|
6
6
|
"lit": "^3.0.2"
|
7
7
|
},
|
8
8
|
"main": "./index.js",
|