@telia-ace/widget-components-copyright-flamingo 1.1.15 → 1.1.16
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.
|
@@ -711,7 +711,7 @@ class x extends f {
|
|
|
711
711
|
);
|
|
712
712
|
return;
|
|
713
713
|
}
|
|
714
|
-
this.active = !this.active, this.active ? this.application.appendToDOM() : this.application.
|
|
714
|
+
this.active = !this.active, this.active ? this.application.appendToDOM() : this.application.hide();
|
|
715
715
|
}
|
|
716
716
|
_applyBranding() {
|
|
717
717
|
var t;
|
|
@@ -1136,14 +1136,6 @@ st.styles = S`
|
|
|
1136
1136
|
background-color: var(--primary-background);
|
|
1137
1137
|
padding: 0 var(--spacing-sm);
|
|
1138
1138
|
}
|
|
1139
|
-
.widget-container.expanded {
|
|
1140
|
-
opacity: 1;
|
|
1141
|
-
animation: slideUp 0.5s;
|
|
1142
|
-
}
|
|
1143
|
-
.widget-container.hidden {
|
|
1144
|
-
opacity: 0;
|
|
1145
|
-
animation: slideDown 0.5s;
|
|
1146
|
-
}
|
|
1147
1139
|
@keyframes slideDown {
|
|
1148
1140
|
from {
|
|
1149
1141
|
transform: translateY(0);
|
|
@@ -1164,6 +1156,14 @@ st.styles = S`
|
|
|
1164
1156
|
opacity: 1;
|
|
1165
1157
|
}
|
|
1166
1158
|
}
|
|
1159
|
+
:host(.expanded) {
|
|
1160
|
+
opacity: 1;
|
|
1161
|
+
animation: slideUp 0.3s linear;
|
|
1162
|
+
}
|
|
1163
|
+
:host(.hidden) {
|
|
1164
|
+
opacity: 0;
|
|
1165
|
+
animation: slideDown 0.3s linear;
|
|
1166
|
+
}
|
|
1167
1167
|
`;
|
|
1168
1168
|
pe([
|
|
1169
1169
|
u({ attribute: !1 })
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2018 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const Zt=wt(class extends xt{constructor(r){var t;if(super(r),r.type!==At.ATTRIBUTE||r.name!=="class"||((t=r.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){var s,i;if(this.it===void 0){this.it=new Set,r.strings!==void 0&&(this.st=new Set(r.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!((s=this.st)!=null&&s.has(n))&&this.it.add(n);return this.render(t)}const e=r.element.classList;for(const n of this.it)n in t||(e.remove(n),this.it.delete(n));for(const n in t){const o=!!t[n];o===this.it.has(n)||(i=this.st)!=null&&i.has(n)||(o?(e.add(n),this.it.add(n)):(e.remove(n),this.it.delete(n)))}return w}}),B=(r,t,e)=>{r&&e.style.setProperty(t,r)},Et=(r,t)=>{var e,s,i,n;B((e=r.colors)==null?void 0:e.primaryBackground,"--primary-background",t),B((s=r.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",t),B((i=r.colors)==null?void 0:i.secondaryBackground,"--secondary-background",t),B((n=r.colors)==null?void 0:n.textOnSecondaryBackground,"--text-on-secondary-background",t)};var Qt=Object.defineProperty,Xt=Object.getOwnPropertyDescriptor,F=(r,t,e,s)=>{for(var i=s>1?void 0:s?Xt(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&Qt(t,e,i),i};class x extends f{constructor(){super(...arguments),this.active=!1,this.loaded=!1}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.
|
|
35
|
+
*/const Zt=wt(class extends xt{constructor(r){var t;if(super(r),r.type!==At.ATTRIBUTE||r.name!=="class"||((t=r.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){var s,i;if(this.it===void 0){this.it=new Set,r.strings!==void 0&&(this.st=new Set(r.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!((s=this.st)!=null&&s.has(n))&&this.it.add(n);return this.render(t)}const e=r.element.classList;for(const n of this.it)n in t||(e.remove(n),this.it.delete(n));for(const n in t){const o=!!t[n];o===this.it.has(n)||(i=this.st)!=null&&i.has(n)||(o?(e.add(n),this.it.add(n)):(e.remove(n),this.it.delete(n)))}return w}}),B=(r,t,e)=>{r&&e.style.setProperty(t,r)},Et=(r,t)=>{var e,s,i,n;B((e=r.colors)==null?void 0:e.primaryBackground,"--primary-background",t),B((s=r.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",t),B((i=r.colors)==null?void 0:i.secondaryBackground,"--secondary-background",t),B((n=r.colors)==null?void 0:n.textOnSecondaryBackground,"--text-on-secondary-background",t)};var Qt=Object.defineProperty,Xt=Object.getOwnPropertyDescriptor,F=(r,t,e,s)=>{for(var i=s>1?void 0:s?Xt(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&Qt(t,e,i),i};class x extends f{constructor(){super(...arguments),this.active=!1,this.loaded=!1}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&&Et(this.application.settings.branding,this)}async _renderSymbol(){var n;const t=(n=this.application)==null?void 0:n.triggerIcon;if(!t)return l;const e=async o=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(c=>c[o]),{type:s,content:i}=t;switch(s){case"Telia":{const o=await e(i);return o?z`<telia-icon
|
|
36
36
|
class="trigger-icon"
|
|
37
37
|
svg=${o.svg}
|
|
38
38
|
size="lg"
|
|
@@ -220,14 +220,6 @@
|
|
|
220
220
|
background-color: var(--primary-background);
|
|
221
221
|
padding: 0 var(--spacing-sm);
|
|
222
222
|
}
|
|
223
|
-
.widget-container.expanded {
|
|
224
|
-
opacity: 1;
|
|
225
|
-
animation: slideUp 0.5s;
|
|
226
|
-
}
|
|
227
|
-
.widget-container.hidden {
|
|
228
|
-
opacity: 0;
|
|
229
|
-
animation: slideDown 0.5s;
|
|
230
|
-
}
|
|
231
223
|
@keyframes slideDown {
|
|
232
224
|
from {
|
|
233
225
|
transform: translateY(0);
|
|
@@ -248,6 +240,14 @@
|
|
|
248
240
|
opacity: 1;
|
|
249
241
|
}
|
|
250
242
|
}
|
|
243
|
+
:host(.expanded) {
|
|
244
|
+
opacity: 1;
|
|
245
|
+
animation: slideUp 0.3s linear;
|
|
246
|
+
}
|
|
247
|
+
:host(.hidden) {
|
|
248
|
+
opacity: 0;
|
|
249
|
+
animation: slideDown 0.3s linear;
|
|
250
|
+
}
|
|
251
251
|
`;ue([u({attribute:!1})],st.prototype,"application",2);var ge=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,it=(r,t,e,s)=>{for(var i=s>1?void 0:s?fe(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&ge(t,e,i),i};class D extends f{constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(t){this.widget=t.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const t=globalThis.widgets;t&&(this.widget=t.applications.find(e=>e.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return l;if(this.widget.renderStrategy===et.Trigger){const t=new x;return t.application=this.widget,t}return this.widget.render()}}D.styles=[S`
|
|
252
252
|
:host {
|
|
253
253
|
display: block;
|
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-d344e088.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.
|
|
3
|
+
"version": "1.1.16",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"lit": "^3.0.2",
|
|
6
|
-
"@telia-ace/widget-core-flamingo": "1.1.
|
|
6
|
+
"@telia-ace/widget-core-flamingo": "1.1.16"
|
|
7
7
|
},
|
|
8
8
|
"main": "./index.js",
|
|
9
9
|
"module": "./index.mjs",
|