@telia-ace/widget-side-menu 1.1.140-rc.0 → 1.1.140-rc.2
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.
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=async e=>{e.registerComponent("side-menu",Promise.resolve().then(()=>require("./side-menu-
|
|
1
|
+
"use strict";const n=async e=>{e.registerComponent("side-menu",Promise.resolve().then(()=>require("./side-menu-yRxpS6kE.js")))};module.exports=n;
|
package/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-side-menu",
|
|
3
|
-
"version": "1.1.140-rc.
|
|
3
|
+
"version": "1.1.140-rc.2",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"lit": "^3.0.2",
|
|
6
6
|
"rxjs": "^7.8.2",
|
|
7
|
-
"@telia-ace/widget-core-flamingo": "1.1.
|
|
7
|
+
"@telia-ace/widget-core-flamingo": "1.1.140-rc.2",
|
|
8
8
|
"@teliads/components": "^22.1.1",
|
|
9
9
|
"@lit-labs/motion": "^1.0.8",
|
|
10
10
|
"lit-html": "^3.0.2"
|
|
@@ -1532,7 +1532,7 @@ class Vs {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
}
|
|
1534
1534
|
const Mt = et.litHtmlPolyfillSupport;
|
|
1535
|
-
Mt == null || Mt(nt, lt), (et.litHtmlVersions ?? (et.litHtmlVersions = [])).push("3.3.
|
|
1535
|
+
Mt == null || Mt(nt, lt), (et.litHtmlVersions ?? (et.litHtmlVersions = [])).push("3.3.3");
|
|
1536
1536
|
const tr = (i, t, e) => {
|
|
1537
1537
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
1538
1538
|
let r = s._$litPart$;
|
|
@@ -2020,10 +2020,10 @@ const Ft = /* @__PURE__ */ new WeakMap(), oe = ne(class extends Ii {
|
|
|
2020
2020
|
update(i, [t]) {
|
|
2021
2021
|
var s;
|
|
2022
2022
|
const e = t !== this.G;
|
|
2023
|
-
return e && this.
|
|
2023
|
+
return e && this.rt(void 0), (e || this.lt !== this.ct) && (this.G = t, this.ht = (s = i.options) == null ? void 0 : s.host, this.rt(this.ct = i.element)), p;
|
|
2024
2024
|
}
|
|
2025
2025
|
rt(i) {
|
|
2026
|
-
if (this.isConnected || (i = void 0), typeof this.G == "function") {
|
|
2026
|
+
if (this.G !== void 0) if (this.isConnected || (i = void 0), typeof this.G == "function") {
|
|
2027
2027
|
const t = this.ht ?? globalThis;
|
|
2028
2028
|
let e = Ft.get(t);
|
|
2029
2029
|
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), Ft.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ht, void 0), e.set(this.G, i), i !== void 0 && this.G.call(this.ht, i);
|
package/side-menu-component.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Application } from '
|
|
1
|
+
import { Application } from '../libs/core/src/index.ts';
|
|
2
2
|
export declare const SideMenuComponent: (app: Application) => Promise<void>;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
15
15
|
*/const et=globalThis,Ee=i=>i,yt=et.trustedTypes,Ce=yt?yt.createPolicy("lit-html",{createHTML:i=>i}):void 0,ki="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,Ei="?"+C,Ws=`<${Ei}>`,U=document,st=()=>U.createComment(""),rt=i=>i===null||typeof i!="object"&&typeof i!="function",se=Array.isArray,Gs=i=>se(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",jt=`[
|
|
16
16
|
\f\r]`,V=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Oe=/-->/g,Te=/>/g,T=RegExp(`>|${jt}(?:([^\\s"'>=/]+)(${jt}*=${jt}*(?:[^
|
|
17
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Pe=/'/g,Ie=/"/g,Ci=/^(?:script|style|textarea|title)$/i,Ys=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),k=Ys(1),M=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),Le=new WeakMap,I=U.createTreeWalker(U,129);function Oi(i,t){if(!se(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ce!==void 0?Ce.createHTML(t):t}const Zs=(i,t)=>{const e=i.length-1,s=[];let r,n=t===2?"<svg>":t===3?"<math>":"",o=V;for(let a=0;a<e;a++){const l=i[a];let c,u,h=-1,d=0;for(;d<l.length&&(o.lastIndex=d,u=o.exec(l),u!==null);)d=o.lastIndex,o===V?u[1]==="!--"?o=Oe:u[1]!==void 0?o=Te:u[2]!==void 0?(Ci.test(u[2])&&(r=RegExp("</"+u[2],"g")),o=T):u[3]!==void 0&&(o=T):o===T?u[0]===">"?(o=r??V,h=-1):u[1]===void 0?h=-2:(h=o.lastIndex-u[2].length,c=u[1],o=u[3]===void 0?T:u[3]==='"'?Ie:Pe):o===Ie||o===Pe?o=T:o===Oe||o===Te?o=V:(o=T,r=void 0);const f=o===T&&i[a+1].startsWith("/>")?" ":"";n+=o===V?l+Ws:h>=0?(s.push(c),l.slice(0,h)+ki+l.slice(h)+C+f):l+C+(h===-2?a:f)}return[Oi(i,n+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class nt{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let n=0,o=0;const a=t.length-1,l=this.parts,[c,u]=Zs(t,e);if(this.el=nt.createElement(c,s),I.currentNode=this.el.content,e===2||e===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=I.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(const h of r.getAttributeNames())if(h.endsWith(ki)){const d=u[o++],f=r.getAttribute(h).split(C),$=/([.?@])?(.*)/.exec(d);l.push({type:1,index:n,name:$[2],strings:f,ctor:$[1]==="."?Xs:$[1]==="?"?Qs:$[1]==="@"?Js:Tt}),r.removeAttribute(h)}else h.startsWith(C)&&(l.push({type:6,index:n}),r.removeAttribute(h));if(Ci.test(r.tagName)){const h=r.textContent.split(C),d=h.length-1;if(d>0){r.textContent=yt?yt.emptyScript:"";for(let f=0;f<d;f++)r.append(h[f],st()),I.nextNode(),l.push({type:2,index:++n});r.append(h[d],st())}}}else if(r.nodeType===8)if(r.data===Ei)l.push({type:2,index:n});else{let h=-1;for(;(h=r.data.indexOf(C,h+1))!==-1;)l.push({type:7,index:n}),h+=C.length-1}n++}}static createElement(t,e){const s=U.createElement("template");return s.innerHTML=t,s}}function Z(i,t,e=i,s){var o,a;if(t===M)return t;let r=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=rt(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((a=r==null?void 0:r._$AO)==null||a.call(r,!1),n===void 0?r=void 0:(r=new n(i),r._$AT(i,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=r:e._$Cl=r),r!==void 0&&(t=Z(i,r._$AS(i,t.values),r,s)),t}class Ks{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,r=((t==null?void 0:t.creationScope)??U).importNode(e,!0);I.currentNode=r;let n=I.nextNode(),o=0,a=0,l=s[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new ct(n,n.nextSibling,this,t):l.type===1?c=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(c=new Vs(n,this,t)),this._$AV.push(c),l=s[++a]}o!==(l==null?void 0:l.index)&&(n=I.nextNode(),o++)}return I.currentNode=U,r}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class ct{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),rt(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==M&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Gs(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&rt(this._$AH)?this._$AA.nextSibling.data=t:this.T(U.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=nt.createElement(Oi(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{const o=new Ks(r,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=Le.get(t.strings);return e===void 0&&Le.set(t.strings,e=new nt(t)),e}k(t){se(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,r=0;for(const n of t)r===e.length?e.push(s=new ct(this.O(st()),this.O(st()),this,this.options)):s=e[r],s._$AI(n),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){const r=Ee(t).nextSibling;Ee(t).remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}let Tt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,r){const n=this.strings;let o=!1;if(n===void 0)t=Z(this,t,e,0),o=!rt(t)||t!==this._$AH&&t!==M,o&&(this._$AH=t);else{const a=t;let l,c;for(t=n[0],l=0;l<n.length-1;l++)c=Z(this,a[s+l],e,l),c===M&&(c=this._$AH[l]),o||(o=!rt(c)||c!==this._$AH[l]),c===p?t=p:t!==p&&(t+=(c??"")+n[l+1]),this._$AH[l]=c}o&&!r&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class Xs extends Tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}class Qs extends Tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}}class Js extends Tt{constructor(t,e,s,r,n){super(t,e,s,r,n),this.type=5}_$AI(t,e=this){if((t=Z(this,t,e,0)??p)===M)return;const s=this._$AH,r=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==p&&(s===p||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Vs{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const Nt=et.litHtmlPolyfillSupport;Nt==null||Nt(nt,ct),(et.litHtmlVersions??(et.litHtmlVersions=[])).push("3.3.
|
|
17
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Pe=/'/g,Ie=/"/g,Ci=/^(?:script|style|textarea|title)$/i,Ys=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),k=Ys(1),M=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),Le=new WeakMap,I=U.createTreeWalker(U,129);function Oi(i,t){if(!se(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ce!==void 0?Ce.createHTML(t):t}const Zs=(i,t)=>{const e=i.length-1,s=[];let r,n=t===2?"<svg>":t===3?"<math>":"",o=V;for(let a=0;a<e;a++){const l=i[a];let c,u,h=-1,d=0;for(;d<l.length&&(o.lastIndex=d,u=o.exec(l),u!==null);)d=o.lastIndex,o===V?u[1]==="!--"?o=Oe:u[1]!==void 0?o=Te:u[2]!==void 0?(Ci.test(u[2])&&(r=RegExp("</"+u[2],"g")),o=T):u[3]!==void 0&&(o=T):o===T?u[0]===">"?(o=r??V,h=-1):u[1]===void 0?h=-2:(h=o.lastIndex-u[2].length,c=u[1],o=u[3]===void 0?T:u[3]==='"'?Ie:Pe):o===Ie||o===Pe?o=T:o===Oe||o===Te?o=V:(o=T,r=void 0);const f=o===T&&i[a+1].startsWith("/>")?" ":"";n+=o===V?l+Ws:h>=0?(s.push(c),l.slice(0,h)+ki+l.slice(h)+C+f):l+C+(h===-2?a:f)}return[Oi(i,n+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class nt{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let n=0,o=0;const a=t.length-1,l=this.parts,[c,u]=Zs(t,e);if(this.el=nt.createElement(c,s),I.currentNode=this.el.content,e===2||e===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=I.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(const h of r.getAttributeNames())if(h.endsWith(ki)){const d=u[o++],f=r.getAttribute(h).split(C),$=/([.?@])?(.*)/.exec(d);l.push({type:1,index:n,name:$[2],strings:f,ctor:$[1]==="."?Xs:$[1]==="?"?Qs:$[1]==="@"?Js:Tt}),r.removeAttribute(h)}else h.startsWith(C)&&(l.push({type:6,index:n}),r.removeAttribute(h));if(Ci.test(r.tagName)){const h=r.textContent.split(C),d=h.length-1;if(d>0){r.textContent=yt?yt.emptyScript:"";for(let f=0;f<d;f++)r.append(h[f],st()),I.nextNode(),l.push({type:2,index:++n});r.append(h[d],st())}}}else if(r.nodeType===8)if(r.data===Ei)l.push({type:2,index:n});else{let h=-1;for(;(h=r.data.indexOf(C,h+1))!==-1;)l.push({type:7,index:n}),h+=C.length-1}n++}}static createElement(t,e){const s=U.createElement("template");return s.innerHTML=t,s}}function Z(i,t,e=i,s){var o,a;if(t===M)return t;let r=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=rt(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((a=r==null?void 0:r._$AO)==null||a.call(r,!1),n===void 0?r=void 0:(r=new n(i),r._$AT(i,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=r:e._$Cl=r),r!==void 0&&(t=Z(i,r._$AS(i,t.values),r,s)),t}class Ks{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,r=((t==null?void 0:t.creationScope)??U).importNode(e,!0);I.currentNode=r;let n=I.nextNode(),o=0,a=0,l=s[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new ct(n,n.nextSibling,this,t):l.type===1?c=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(c=new Vs(n,this,t)),this._$AV.push(c),l=s[++a]}o!==(l==null?void 0:l.index)&&(n=I.nextNode(),o++)}return I.currentNode=U,r}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class ct{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),rt(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==M&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Gs(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&rt(this._$AH)?this._$AA.nextSibling.data=t:this.T(U.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=nt.createElement(Oi(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{const o=new Ks(r,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=Le.get(t.strings);return e===void 0&&Le.set(t.strings,e=new nt(t)),e}k(t){se(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,r=0;for(const n of t)r===e.length?e.push(s=new ct(this.O(st()),this.O(st()),this,this.options)):s=e[r],s._$AI(n),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){const r=Ee(t).nextSibling;Ee(t).remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}let Tt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,r){const n=this.strings;let o=!1;if(n===void 0)t=Z(this,t,e,0),o=!rt(t)||t!==this._$AH&&t!==M,o&&(this._$AH=t);else{const a=t;let l,c;for(t=n[0],l=0;l<n.length-1;l++)c=Z(this,a[s+l],e,l),c===M&&(c=this._$AH[l]),o||(o=!rt(c)||c!==this._$AH[l]),c===p?t=p:t!==p&&(t+=(c??"")+n[l+1]),this._$AH[l]=c}o&&!r&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class Xs extends Tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}class Qs extends Tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}}class Js extends Tt{constructor(t,e,s,r,n){super(t,e,s,r,n),this.type=5}_$AI(t,e=this){if((t=Z(this,t,e,0)??p)===M)return;const s=this._$AH,r=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==p&&(s===p||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Vs{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const Nt=et.litHtmlPolyfillSupport;Nt==null||Nt(nt,ct),(et.litHtmlVersions??(et.litHtmlVersions=[])).push("3.3.3");const tr=(i,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let r=s._$litPart$;if(r===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=r=new ct(t.insertBefore(st(),n),n,void 0,e??{})}return r._$AI(i),r};/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2017 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
* @license
|
|
63
63
|
* Copyright 2020 Google LLC
|
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
|
-
*/const wt=()=>new gr;let gr=class{};const Dt=new WeakMap,oe=ne(class extends Ii{render(i){return p}update(i,[t]){var s;const e=t!==this.G;return e&&this.
|
|
65
|
+
*/const wt=()=>new gr;let gr=class{};const Dt=new WeakMap,oe=ne(class extends Ii{render(i){return p}update(i,[t]){var s;const e=t!==this.G;return e&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=(s=i.options)==null?void 0:s.host,this.rt(this.ct=i.element)),p}rt(i){if(this.G!==void 0)if(this.isConnected||(i=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let e=Dt.get(t);e===void 0&&(e=new WeakMap,Dt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,i),i!==void 0&&this.G.call(this.ht,i)}else this.G.value=i}get lt(){var i,t;return typeof this.G=="function"?(i=Dt.get(this.ht??globalThis))==null?void 0:i.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var $r=Object.defineProperty,ut=(i,t,e,s)=>{for(var r=void 0,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=o(t,e,r)||r);return r&&$r(t,e,r),r};const pe=class pe extends x{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=wt(),this.widgetActive$=new ci(!1),this.componentIsDestroyed$=new Ot}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&&Ri(this.application.settings.branding,this)}async _renderSymbol(){var a,l,c;const t=(a=this.application)==null?void 0:a.branding(),e=(l=t==null?void 0:t.graphics)==null?void 0:l.trigger;if(e)return k` <img src=${e} class="trigger-icon" alt="" /> `;const s=(c=this.application)==null?void 0:c.triggerIcon;if(!s)return p;const r=async u=>pr,{type:n,content:o}=s;switch(n){case"Telia":{const u=await r();return u?k`<telia-icon
|
|
66
66
|
class="trigger-icon"
|
|
67
67
|
svg=${u.svg}
|
|
68
68
|
size="lg"
|
package/side-menu.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement, nothing, CSSResultGroup, TemplateResult } from 'lit';
|
|
2
2
|
import { CreateSideMenuOption } from './types';
|
|
3
3
|
import { SideMenuOption } from './side-menu-option';
|
|
4
|
-
declare const WidgetElement: (new (...args: any[]) => import('
|
|
4
|
+
declare const WidgetElement: (new (...args: any[]) => import('../libs/core/src/index.ts').WidgetComponentType) & typeof LitElement;
|
|
5
5
|
export declare class SideMenu extends WidgetElement {
|
|
6
6
|
static styles: CSSResultGroup;
|
|
7
7
|
optionsIsVisible: boolean;
|