@telia-ace/widget-components-widget-header-flamingo 1.1.20-rc.0 → 1.1.20
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 r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-
|
|
1
|
+
"use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-5293e39d.js")))};module.exports=r;
|
package/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-components-widget-header-flamingo",
|
|
3
|
-
"version": "1.1.20
|
|
3
|
+
"version": "1.1.20",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"lit": "^3.0.2",
|
|
6
|
-
"@telia-ace/widget-core-flamingo": "1.1.20
|
|
6
|
+
"@telia-ace/widget-core-flamingo": "1.1.20"
|
|
7
7
|
},
|
|
8
8
|
"main": "./index.js",
|
|
9
9
|
"module": "./index.mjs",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
13
|
*/const U=globalThis,W=U.trustedTypes,ht=W?W.createPolicy("lit-html",{createHTML:r=>r}):void 0,mt="$lit$",m=`lit$${(Math.random()+"").slice(9)}$`,_t="?"+m,Dt=`<${_t}>`,w=document,N=()=>w.createComment(""),M=r=>r===null||typeof r!="object"&&typeof r!="function",yt=Array.isArray,Bt=r=>yt(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",J=`[
|
|
14
14
|
\f\r]`,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lt=/-->/g,dt=/>/g,v=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,ut=/"/g,vt=/^(?:script|style|textarea|title)$/i,jt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),y=jt(1),x=Symbol.for("lit-noChange"),
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,ut=/"/g,vt=/^(?:script|style|textarea|title)$/i,jt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),y=jt(1),x=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),gt=new WeakMap,b=w.createTreeWalker(w,129);function At(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return ht!==void 0?ht.createHTML(t):t}const It=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":"",o=T;for(let c=0;c<e;c++){const a=r[c];let d,p,l=-1,u=0;for(;u<a.length&&(o.lastIndex=u,p=o.exec(a),p!==null);)u=o.lastIndex,o===T?p[1]==="!--"?o=lt:p[1]!==void 0?o=dt:p[2]!==void 0?(vt.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=v):p[3]!==void 0&&(o=v):o===v?p[0]===">"?(o=i??T,l=-1):p[1]===void 0?l=-2:(l=o.lastIndex-p[2].length,d=p[1],o=p[3]===void 0?v:p[3]==='"'?ut:pt):o===ut||o===pt?o=v:o===lt||o===dt?o=T:(o=v,i=void 0);const $=o===v&&r[c+1].startsWith("/>")?" ":"";n+=o===T?a+Dt:l>=0?(s.push(d),a.slice(0,l)+mt+a.slice(l)+m+$):a+m+(l===-2?c:$)}return[At(r,n+(r[e]||"<?>")+(t===2?"</svg>":"")),s]};class H{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const c=t.length-1,a=this.parts,[d,p]=It(t,e);if(this.el=H.createElement(d,s),b.currentNode=this.el.content,e===2){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=b.nextNode())!==null&&a.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(mt)){const u=p[o++],$=i.getAttribute(l).split(m),D=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:D[2],strings:$,ctor:D[1]==="."?Gt:D[1]==="?"?Vt:D[1]==="@"?qt:V}),i.removeAttribute(l)}else l.startsWith(m)&&(a.push({type:6,index:n}),i.removeAttribute(l));if(vt.test(i.tagName)){const l=i.textContent.split(m),u=l.length-1;if(u>0){i.textContent=W?W.emptyScript:"";for(let $=0;$<u;$++)i.append(l[$],N()),b.nextNode(),a.push({type:2,index:++n});i.append(l[u],N())}}}else if(i.nodeType===8)if(i.data===_t)a.push({type:2,index:n});else{let l=-1;for(;(l=i.data.indexOf(m,l+1))!==-1;)a.push({type:7,index:n}),l+=m.length-1}n++}}static createElement(t,e){const s=w.createElement("template");return s.innerHTML=t,s}}function S(r,t,e=r,s){var o,c;if(t===x)return t;let i=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=M(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=S(r,i._$AS(r,t.values),i,s)),t}class Wt{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,i=((t==null?void 0:t.creationScope)??w).importNode(e,!0);b.currentNode=i;let n=b.nextNode(),o=0,c=0,a=s[0];for(;a!==void 0;){if(o===a.index){let d;a.type===2?d=new R(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new Yt(n,this,t)),this._$AV.push(d),a=s[++c]}o!==(a==null?void 0:a.index)&&(n=b.nextNode(),o++)}return b.currentNode=w,i}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 R{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.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=S(this,t,e),M(t)?t===h||t==null||t===""?(this._$AH!==h&&this._$AR(),this._$AH=h):t!==this._$AH&&t!==x&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Bt(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==h&&M(this._$AH)?this._$AA.nextSibling.data=t:this.$(w.createTextNode(t)),this._$AH=t}g(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=H.createElement(At(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const o=new Wt(i,this),c=o.u(this.options);o.p(e),this.$(c),this._$AH=o}}_$AC(t){let e=gt.get(t.strings);return e===void 0&>.set(t.strings,e=new H(t)),e}T(t){yt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new R(this.k(N()),this.k(N()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class V{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=h}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=S(this,t,e,0),o=!M(t)||t!==this._$AH&&t!==x,o&&(this._$AH=t);else{const c=t;let a,d;for(t=n[0],a=0;a<n.length-1;a++)d=S(this,c[s+a],e,a),d===x&&(d=this._$AH[a]),o||(o=!M(d)||d!==this._$AH[a]),d===h?t=h:t!==h&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}o&&!i&&this.O(t)}O(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Gt extends V{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===h?void 0:t}}class Vt extends V{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}}class qt extends V{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??h)===x)return;const s=this._$AH,i=t===h&&s!==h||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==h&&(s===h||i);i&&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 Yt{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){S(this,t)}}const K=U.litHtmlPolyfillSupport;K==null||K(H,R),(U.litHtmlVersions??(U.litHtmlVersions=[])).push("3.0.2");const Jt=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new R(t.insertBefore(N(),n),n,void 0,e??{})}return i._$AI(r),i};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const Kt={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:tt},Zt=(r=Kt,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(e.name,r),s==="accessor"){const{name:o}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(o,a,r)},init(c){return c!==void 0&&this.C(o,void 0,r),c}}}if(s==="setter"){const{name:o}=e;return function(c){const a=this[o];t.call(this,c),this.requestUpdate(o,a,r)}}throw Error("Unsupported decorator location: "+s)};function
|
|
23
|
+
*/const Kt={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:tt},Zt=(r=Kt,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(e.name,r),s==="accessor"){const{name:o}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(o,a,r)},init(c){return c!==void 0&&this.C(o,void 0,r),c}}}if(s==="setter"){const{name:o}=e;return function(c){const a=this[o];t.call(this,c),this.requestUpdate(o,a,r)}}throw Error("Unsupported decorator location: "+s)};function g(r){return(t,e)=>typeof e=="object"?Zt(r,t,e):((s,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,o?{...s,wrapped:!0}:s),o?Object.getOwnPropertyDescriptor(i,n):void 0})(r,t,e)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/function L(r){return
|
|
27
|
+
*/function L(r){return g({...r,state:!0,attribute:!1})}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2018 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const Qt=wt(class extends xt{constructor(r){var t;if(super(r),r.type!==bt.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 x}}),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 Ft=Object.defineProperty,Xt=Object.getOwnPropertyDescriptor,q=(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&&Ft(t,e,i),i};class E 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 c,a;const t=(c=this.application)==null?void 0:c.branding(),e=t==null?void 0:t.graphics.trigger;if(e)return y` <img src=${e} class="trigger-icon" alt="" /> `;const s=(
|
|
35
|
+
*/const Qt=wt(class extends xt{constructor(r){var t;if(super(r),r.type!==bt.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 x}}),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 Ft=Object.defineProperty,Xt=Object.getOwnPropertyDescriptor,q=(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&&Ft(t,e,i),i};class E 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 c,a,d;const t=(c=this.application)==null?void 0:c.branding(),e=(a=t==null?void 0:t.graphics)==null?void 0:a.trigger;if(e)return y` <img src=${e} class="trigger-icon" alt="" /> `;const s=(d=this.application)==null?void 0:d.triggerIcon;if(!s)return h;const i=async p=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(u=>u[p]),{type:n,content:o}=s;switch(n){case"Telia":{const p=await i(o);return p?y`<telia-icon
|
|
36
36
|
class="trigger-icon"
|
|
37
|
-
svg=${
|
|
37
|
+
svg=${p.svg}
|
|
38
38
|
size="lg"
|
|
39
|
-
></telia-icon>`:
|
|
39
|
+
></telia-icon>`:h}default:return h}}render(){return y`<button
|
|
40
40
|
class=${Qt({trigger:!0,active:this.active,rendered:this.loaded})}
|
|
41
41
|
@click=${this._toggleActive}
|
|
42
42
|
>
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
img {
|
|
141
141
|
max-width: 100%;
|
|
142
142
|
}
|
|
143
|
-
`];q([
|
|
143
|
+
`];q([g({attribute:!1})],E.prototype,"application",2);q([L()],E.prototype,"active",2);q([L()],E.prototype,"loaded",2);q([L()],E.prototype,"icon",2);var te=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,A=(r,t,e,s)=>{for(var i=s>1?void 0:s?ee(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&&te(t,e,i),i};const Ct=r=>{class t extends r{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(s){this.properties=s}writeLayout(s){this.layout=s}writeContext(s){this.context=s}addChild(s){s.parent=this,this.nodes.push(s)}connectedCallback(){super.connectedCallback(),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`)}}return t.styles=[P`
|
|
144
144
|
:host {
|
|
145
145
|
font-family: var(--font-family);
|
|
146
146
|
grid-column: span var(--width);
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
* {
|
|
153
153
|
box-sizing: border-box;
|
|
154
154
|
}
|
|
155
|
-
`],A([
|
|
155
|
+
`],A([g()],t.prototype,"properties",2),A([g()],t.prototype,"context",2),A([g()],t.prototype,"layout",2),A([g()],t.prototype,"name",2),A([g()],t.prototype,"type",2),A([g({attribute:!1})],t.prototype,"application",2),A([g({attribute:!1})],t.prototype,"parent",2),t};class St extends Ct(f){render(){return y`Non resolved component`}}St.styles=[P`
|
|
156
156
|
:host {
|
|
157
157
|
display: block;
|
|
158
158
|
}
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
* @license
|
|
169
169
|
* Copyright 2020 Google LLC
|
|
170
170
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
171
|
-
*/const ae=()=>new ce;class ce{}const Q=new WeakMap,he=wt(class extends oe{render(r){return
|
|
171
|
+
*/const ae=()=>new ce;class ce{}const Q=new WeakMap,he=wt(class extends oe{render(r){return h}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)),h}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)}});/**
|
|
172
172
|
* @license
|
|
173
173
|
* Copyright 2021 Google LLC
|
|
174
174
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -252,18 +252,18 @@
|
|
|
252
252
|
opacity: 0;
|
|
253
253
|
animation: slideDown 0.3s linear;
|
|
254
254
|
}
|
|
255
|
-
`;ue([
|
|
255
|
+
`;ue([g({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 z 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 h;if(this.widget.renderStrategy===et.Trigger){const t=new E;return t.application=this.widget,t}return this.widget.render()}}z.styles=[P`
|
|
256
256
|
:host {
|
|
257
257
|
display: block;
|
|
258
258
|
}
|
|
259
|
-
`];it([
|
|
259
|
+
`];it([g({attribute:!0})],z.prototype,"name",2);it([L()],z.prototype,"widget",2);it([L()],z.prototype,"status",2);customElements.get("ace-trigger")||customElements.define("ace-trigger",E);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",St);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",st);customElements.get("ace-widget")||customElements.define("ace-widget",z);const Tt=Ct(f);class rt extends Tt{render(){var s;const t=this.application.branding(),e=(s=t==null?void 0:t.graphics)==null?void 0:s.logotype;return y` <div class="widget-header">
|
|
260
260
|
<!-- <telia-icon svg={aiRobot.svg} size="lg"></telia-icon> -->
|
|
261
|
-
${e?y` <img src=${e} class="logotype" alt="" />`:
|
|
261
|
+
${e?y` <img src=${e} class="logotype" alt="" />`:h}
|
|
262
262
|
|
|
263
263
|
<div>
|
|
264
264
|
<h1>${this.properties.header}</h1>
|
|
265
265
|
|
|
266
|
-
${this.properties.tagline?y`<p>${this.properties.tagline}</p>`:
|
|
266
|
+
${this.properties.tagline?y`<p>${this.properties.tagline}</p>`:h}
|
|
267
267
|
</div>
|
|
268
268
|
</div>`}}rt.styles=[Tt.styles||[],P`
|
|
269
269
|
:host {
|
|
@@ -300,7 +300,7 @@ C.elementStyles = [], C.shadowRootOptions = { mode: "open" }, C[O("elementProper
|
|
|
300
300
|
*/
|
|
301
301
|
const U = globalThis, W = U.trustedTypes, ct = W ? W.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, ft = "$lit$", m = `lit$${(Math.random() + "").slice(9)}$`, mt = "?" + m, zt = `<${mt}>`, w = document, N = () => w.createComment(""), M = (r) => r === null || typeof r != "object" && typeof r != "function", _t = Array.isArray, Dt = (r) => _t(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", J = `[
|
|
302
302
|
\f\r]`, T = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ht = /-->/g, lt = />/g, v = RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
|
|
303
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), dt = /'/g, pt = /"/g, yt = /^(?:script|style|textarea|title)$/i, Bt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), y = Bt(1), x = Symbol.for("lit-noChange"),
|
|
303
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), dt = /'/g, pt = /"/g, yt = /^(?:script|style|textarea|title)$/i, Bt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), y = Bt(1), x = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), ut = /* @__PURE__ */ new WeakMap(), b = w.createTreeWalker(w, 129);
|
|
304
304
|
function vt(r, t) {
|
|
305
305
|
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
|
306
306
|
throw Error("invalid template strings array");
|
|
@@ -311,11 +311,11 @@ const jt = (r, t) => {
|
|
|
311
311
|
let i, n = t === 2 ? "<svg>" : "", o = T;
|
|
312
312
|
for (let c = 0; c < e; c++) {
|
|
313
313
|
const a = r[c];
|
|
314
|
-
let d, p,
|
|
315
|
-
for (;
|
|
316
|
-
|
|
314
|
+
let d, p, l = -1, u = 0;
|
|
315
|
+
for (; u < a.length && (o.lastIndex = u, p = o.exec(a), p !== null); )
|
|
316
|
+
u = o.lastIndex, o === T ? p[1] === "!--" ? o = ht : p[1] !== void 0 ? o = lt : p[2] !== void 0 ? (yt.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = v) : p[3] !== void 0 && (o = v) : o === v ? p[0] === ">" ? (o = i ?? T, l = -1) : p[1] === void 0 ? l = -2 : (l = o.lastIndex - p[2].length, d = p[1], o = p[3] === void 0 ? v : p[3] === '"' ? pt : dt) : o === pt || o === dt ? o = v : o === ht || o === lt ? o = T : (o = v, i = void 0);
|
|
317
317
|
const f = o === v && r[c + 1].startsWith("/>") ? " " : "";
|
|
318
|
-
n += o === T ? a + zt :
|
|
318
|
+
n += o === T ? a + zt : l >= 0 ? (s.push(d), a.slice(0, l) + ft + a.slice(l) + m + f) : a + m + (l === -2 ? c : f);
|
|
319
319
|
}
|
|
320
320
|
return [vt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
|
|
321
321
|
};
|
|
@@ -326,34 +326,34 @@ class H {
|
|
|
326
326
|
let n = 0, o = 0;
|
|
327
327
|
const c = t.length - 1, a = this.parts, [d, p] = jt(t, e);
|
|
328
328
|
if (this.el = H.createElement(d, s), b.currentNode = this.el.content, e === 2) {
|
|
329
|
-
const
|
|
330
|
-
|
|
329
|
+
const l = this.el.content.firstChild;
|
|
330
|
+
l.replaceWith(...l.childNodes);
|
|
331
331
|
}
|
|
332
332
|
for (; (i = b.nextNode()) !== null && a.length < c; ) {
|
|
333
333
|
if (i.nodeType === 1) {
|
|
334
334
|
if (i.hasAttributes())
|
|
335
|
-
for (const
|
|
336
|
-
if (
|
|
337
|
-
const
|
|
338
|
-
a.push({ type: 1, index: n, name: D[2], strings: f, ctor: D[1] === "." ? Wt : D[1] === "?" ? Gt : D[1] === "@" ? Vt : V }), i.removeAttribute(
|
|
335
|
+
for (const l of i.getAttributeNames())
|
|
336
|
+
if (l.endsWith(ft)) {
|
|
337
|
+
const u = p[o++], f = i.getAttribute(l).split(m), D = /([.?@])?(.*)/.exec(u);
|
|
338
|
+
a.push({ type: 1, index: n, name: D[2], strings: f, ctor: D[1] === "." ? Wt : D[1] === "?" ? Gt : D[1] === "@" ? Vt : V }), i.removeAttribute(l);
|
|
339
339
|
} else
|
|
340
|
-
|
|
340
|
+
l.startsWith(m) && (a.push({ type: 6, index: n }), i.removeAttribute(l));
|
|
341
341
|
if (yt.test(i.tagName)) {
|
|
342
|
-
const
|
|
343
|
-
if (
|
|
342
|
+
const l = i.textContent.split(m), u = l.length - 1;
|
|
343
|
+
if (u > 0) {
|
|
344
344
|
i.textContent = W ? W.emptyScript : "";
|
|
345
|
-
for (let f = 0; f <
|
|
346
|
-
i.append(
|
|
347
|
-
i.append(
|
|
345
|
+
for (let f = 0; f < u; f++)
|
|
346
|
+
i.append(l[f], N()), b.nextNode(), a.push({ type: 2, index: ++n });
|
|
347
|
+
i.append(l[u], N());
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
} else if (i.nodeType === 8)
|
|
351
351
|
if (i.data === mt)
|
|
352
352
|
a.push({ type: 2, index: n });
|
|
353
353
|
else {
|
|
354
|
-
let
|
|
355
|
-
for (; (
|
|
356
|
-
a.push({ type: 7, index: n }),
|
|
354
|
+
let l = -1;
|
|
355
|
+
for (; (l = i.data.indexOf(m, l + 1)) !== -1; )
|
|
356
|
+
a.push({ type: 7, index: n }), l += m.length - 1;
|
|
357
357
|
}
|
|
358
358
|
n++;
|
|
359
359
|
}
|
|
@@ -406,7 +406,7 @@ class R {
|
|
|
406
406
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
407
407
|
}
|
|
408
408
|
constructor(t, e, s, i) {
|
|
409
|
-
this.type = 2, this._$AH =
|
|
409
|
+
this.type = 2, this._$AH = h, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
|
|
410
410
|
}
|
|
411
411
|
get parentNode() {
|
|
412
412
|
let t = this._$AA.parentNode;
|
|
@@ -420,7 +420,7 @@ class R {
|
|
|
420
420
|
return this._$AB;
|
|
421
421
|
}
|
|
422
422
|
_$AI(t, e = this) {
|
|
423
|
-
t = S(this, t, e), M(t) ? t ===
|
|
423
|
+
t = S(this, t, e), M(t) ? t === h || t == null || t === "" ? (this._$AH !== h && this._$AR(), this._$AH = h) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Dt(t) ? this.T(t) : this._(t);
|
|
424
424
|
}
|
|
425
425
|
k(t) {
|
|
426
426
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -429,7 +429,7 @@ class R {
|
|
|
429
429
|
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
430
430
|
}
|
|
431
431
|
_(t) {
|
|
432
|
-
this._$AH !==
|
|
432
|
+
this._$AH !== h && M(this._$AH) ? this._$AA.nextSibling.data = t : this.$(w.createTextNode(t)), this._$AH = t;
|
|
433
433
|
}
|
|
434
434
|
g(t) {
|
|
435
435
|
var n;
|
|
@@ -473,7 +473,7 @@ class V {
|
|
|
473
473
|
return this._$AM._$AU;
|
|
474
474
|
}
|
|
475
475
|
constructor(t, e, s, i, n) {
|
|
476
|
-
this.type = 1, this._$AH =
|
|
476
|
+
this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = h;
|
|
477
477
|
}
|
|
478
478
|
_$AI(t, e = this, s, i) {
|
|
479
479
|
const n = this.strings;
|
|
@@ -484,12 +484,12 @@ class V {
|
|
|
484
484
|
const c = t;
|
|
485
485
|
let a, d;
|
|
486
486
|
for (t = n[0], a = 0; a < n.length - 1; a++)
|
|
487
|
-
d = S(this, c[s + a], e, a), d === x && (d = this._$AH[a]), o || (o = !M(d) || d !== this._$AH[a]), d ===
|
|
487
|
+
d = S(this, c[s + a], e, a), d === x && (d = this._$AH[a]), o || (o = !M(d) || d !== this._$AH[a]), d === h ? t = h : t !== h && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
|
|
488
488
|
}
|
|
489
489
|
o && !i && this.O(t);
|
|
490
490
|
}
|
|
491
491
|
O(t) {
|
|
492
|
-
t ===
|
|
492
|
+
t === h ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
class Wt extends V {
|
|
@@ -497,7 +497,7 @@ class Wt extends V {
|
|
|
497
497
|
super(...arguments), this.type = 3;
|
|
498
498
|
}
|
|
499
499
|
O(t) {
|
|
500
|
-
this.element[this.name] = t ===
|
|
500
|
+
this.element[this.name] = t === h ? void 0 : t;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
class Gt extends V {
|
|
@@ -505,7 +505,7 @@ class Gt extends V {
|
|
|
505
505
|
super(...arguments), this.type = 4;
|
|
506
506
|
}
|
|
507
507
|
O(t) {
|
|
508
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
508
|
+
this.element.toggleAttribute(this.name, !!t && t !== h);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
class Vt extends V {
|
|
@@ -513,9 +513,9 @@ class Vt extends V {
|
|
|
513
513
|
super(t, e, s, i, n), this.type = 5;
|
|
514
514
|
}
|
|
515
515
|
_$AI(t, e = this) {
|
|
516
|
-
if ((t = S(this, t, e, 0) ??
|
|
516
|
+
if ((t = S(this, t, e, 0) ?? h) === x)
|
|
517
517
|
return;
|
|
518
|
-
const s = this._$AH, i = t ===
|
|
518
|
+
const s = this._$AH, i = t === h && s !== h || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== h && (s === h || i);
|
|
519
519
|
i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
520
520
|
}
|
|
521
521
|
handleEvent(t) {
|
|
@@ -606,7 +606,7 @@ const Jt = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged:
|
|
|
606
606
|
}
|
|
607
607
|
throw Error("Unsupported decorator location: " + s);
|
|
608
608
|
};
|
|
609
|
-
function
|
|
609
|
+
function g(r) {
|
|
610
610
|
return (t, e) => typeof e == "object" ? Kt(r, t, e) : ((s, i, n) => {
|
|
611
611
|
const o = i.hasOwnProperty(n);
|
|
612
612
|
return i.constructor.createProperty(n, o ? { ...s, wrapped: !0 } : s), o ? Object.getOwnPropertyDescriptor(i, n) : void 0;
|
|
@@ -618,7 +618,7 @@ function u(r) {
|
|
|
618
618
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
619
619
|
*/
|
|
620
620
|
function L(r) {
|
|
621
|
-
return
|
|
621
|
+
return g({ ...r, state: !0, attribute: !1 });
|
|
622
622
|
}
|
|
623
623
|
/**
|
|
624
624
|
* @license
|
|
@@ -718,27 +718,27 @@ class E extends $ {
|
|
|
718
718
|
(t = this.application) != null && t.settings && xt(this.application.settings.branding, this);
|
|
719
719
|
}
|
|
720
720
|
async _renderSymbol() {
|
|
721
|
-
var c, a;
|
|
722
|
-
const t = (c = this.application) == null ? void 0 : c.branding(), e = t == null ? void 0 : t.graphics.trigger;
|
|
721
|
+
var c, a, d;
|
|
722
|
+
const t = (c = this.application) == null ? void 0 : c.branding(), e = (a = t == null ? void 0 : t.graphics) == null ? void 0 : a.trigger;
|
|
723
723
|
if (e)
|
|
724
724
|
return y` <img src=${e} class="trigger-icon" alt="" /> `;
|
|
725
|
-
const s = (
|
|
725
|
+
const s = (d = this.application) == null ? void 0 : d.triggerIcon;
|
|
726
726
|
if (!s)
|
|
727
|
-
return
|
|
728
|
-
const i = async (
|
|
729
|
-
(
|
|
727
|
+
return h;
|
|
728
|
+
const i = async (p) => await import("./index-5087564d.mjs").then(
|
|
729
|
+
(u) => u[p]
|
|
730
730
|
), { type: n, content: o } = s;
|
|
731
731
|
switch (n) {
|
|
732
732
|
case "Telia": {
|
|
733
|
-
const
|
|
734
|
-
return
|
|
733
|
+
const p = await i(o);
|
|
734
|
+
return p ? y`<telia-icon
|
|
735
735
|
class="trigger-icon"
|
|
736
|
-
svg=${
|
|
736
|
+
svg=${p.svg}
|
|
737
737
|
size="lg"
|
|
738
|
-
></telia-icon>` :
|
|
738
|
+
></telia-icon>` : h;
|
|
739
739
|
}
|
|
740
740
|
default:
|
|
741
|
-
return
|
|
741
|
+
return h;
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
744
|
render() {
|
|
@@ -857,7 +857,7 @@ E.styles = [
|
|
|
857
857
|
`
|
|
858
858
|
];
|
|
859
859
|
q([
|
|
860
|
-
|
|
860
|
+
g({ attribute: !1 })
|
|
861
861
|
], E.prototype, "application", 2);
|
|
862
862
|
q([
|
|
863
863
|
L()
|
|
@@ -913,19 +913,19 @@ const Et = (r) => {
|
|
|
913
913
|
}
|
|
914
914
|
`
|
|
915
915
|
], A([
|
|
916
|
-
|
|
916
|
+
g()
|
|
917
917
|
], t.prototype, "properties", 2), A([
|
|
918
|
-
|
|
918
|
+
g()
|
|
919
919
|
], t.prototype, "context", 2), A([
|
|
920
|
-
|
|
920
|
+
g()
|
|
921
921
|
], t.prototype, "layout", 2), A([
|
|
922
|
-
|
|
922
|
+
g()
|
|
923
923
|
], t.prototype, "name", 2), A([
|
|
924
|
-
|
|
924
|
+
g()
|
|
925
925
|
], t.prototype, "type", 2), A([
|
|
926
|
-
|
|
926
|
+
g({ attribute: !1 })
|
|
927
927
|
], t.prototype, "application", 2), A([
|
|
928
|
-
|
|
928
|
+
g({ attribute: !1 })
|
|
929
929
|
], t.prototype, "parent", 2), t;
|
|
930
930
|
};
|
|
931
931
|
class Ct extends Et($) {
|
|
@@ -1028,12 +1028,12 @@ class ae {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
const Q = /* @__PURE__ */ new WeakMap(), ce = bt(class extends ne {
|
|
1030
1030
|
render(r) {
|
|
1031
|
-
return
|
|
1031
|
+
return h;
|
|
1032
1032
|
}
|
|
1033
1033
|
update(r, [t]) {
|
|
1034
1034
|
var s;
|
|
1035
1035
|
const e = t !== this.G;
|
|
1036
|
-
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)),
|
|
1036
|
+
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)), h;
|
|
1037
1037
|
}
|
|
1038
1038
|
ot(r) {
|
|
1039
1039
|
if (typeof this.G == "function") {
|
|
@@ -1173,7 +1173,7 @@ st.styles = P`
|
|
|
1173
1173
|
}
|
|
1174
1174
|
`;
|
|
1175
1175
|
pe([
|
|
1176
|
-
|
|
1176
|
+
g({ attribute: !1 })
|
|
1177
1177
|
], st.prototype, "application", 2);
|
|
1178
1178
|
var ue = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, it = (r, t, e, s) => {
|
|
1179
1179
|
for (var i = s > 1 ? void 0 : s ? ge(t, e) : t, n = r.length - 1, o; n >= 0; n--)
|
|
@@ -1204,7 +1204,7 @@ class z extends $ {
|
|
|
1204
1204
|
}
|
|
1205
1205
|
render() {
|
|
1206
1206
|
if (!this.widget || this.status !== "activated")
|
|
1207
|
-
return
|
|
1207
|
+
return h;
|
|
1208
1208
|
if (this.widget.renderStrategy === et.Trigger) {
|
|
1209
1209
|
const t = new E();
|
|
1210
1210
|
return t.application = this.widget, t;
|
|
@@ -1220,7 +1220,7 @@ z.styles = [
|
|
|
1220
1220
|
`
|
|
1221
1221
|
];
|
|
1222
1222
|
it([
|
|
1223
|
-
|
|
1223
|
+
g({ attribute: !0 })
|
|
1224
1224
|
], z.prototype, "name", 2);
|
|
1225
1225
|
it([
|
|
1226
1226
|
L()
|
|
@@ -1239,12 +1239,12 @@ class $e extends Pt {
|
|
|
1239
1239
|
const t = this.application.branding(), e = (s = t == null ? void 0 : t.graphics) == null ? void 0 : s.logotype;
|
|
1240
1240
|
return y` <div class="widget-header">
|
|
1241
1241
|
<!-- <telia-icon svg={aiRobot.svg} size="lg"></telia-icon> -->
|
|
1242
|
-
${e ? y` <img src=${e} class="logotype" alt="" />` :
|
|
1242
|
+
${e ? y` <img src=${e} class="logotype" alt="" />` : h}
|
|
1243
1243
|
|
|
1244
1244
|
<div>
|
|
1245
1245
|
<h1>${this.properties.header}</h1>
|
|
1246
1246
|
|
|
1247
|
-
${this.properties.tagline ? y`<p>${this.properties.tagline}</p>` :
|
|
1247
|
+
${this.properties.tagline ? y`<p>${this.properties.tagline}</p>` : h}
|
|
1248
1248
|
</div>
|
|
1249
1249
|
</div>`;
|
|
1250
1250
|
}
|