@telia-ace/widget-components-area-flamingo 1.1.19 → 1.1.20-rc.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
13
13
|
*/const U=globalThis,G=U.trustedTypes,ht=G?G.createPolicy("lit-html",{createHTML:i=>i}):void 0,mt="$lit$",m=`lit$${(Math.random()+"").slice(9)}$`,_t="?"+m,Dt=`<${_t}>`,b=document,M=()=>b.createComment(""),k=i=>i===null||typeof i!="object"&&typeof i!="function",yt=Array.isArray,zt=i=>yt(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",J=`[
|
14
14
|
\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lt=/-->/g,dt=/>/g,y=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,ut=/"/g,vt=/^(?:script|style|textarea|title)$/i,Bt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),C=Bt(1),w=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),gt=new WeakMap,A=b.createTreeWalker(b,129);function At(i,t){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ht!==void 0?ht.createHTML(t):t}const It=(i,t)=>{const e=i.length-1,s=[];let r,n=t===2?"<svg>":"",o=O;for(let c=0;c<e;c++){const a=i[c];let d,p,h=-1,
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,ut=/"/g,vt=/^(?:script|style|textarea|title)$/i,Bt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),C=Bt(1),w=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),gt=new WeakMap,A=b.createTreeWalker(b,129);function At(i,t){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ht!==void 0?ht.createHTML(t):t}const It=(i,t)=>{const e=i.length-1,s=[];let r,n=t===2?"<svg>":"",o=O;for(let c=0;c<e;c++){const a=i[c];let d,p,h=-1,u=0;for(;u<a.length&&(o.lastIndex=u,p=o.exec(a),p!==null);)u=o.lastIndex,o===O?p[1]==="!--"?o=lt:p[1]!==void 0?o=dt:p[2]!==void 0?(vt.test(p[2])&&(r=RegExp("</"+p[2],"g")),o=y):p[3]!==void 0&&(o=y):o===y?p[0]===">"?(o=r??O,h=-1):p[1]===void 0?h=-2:(h=o.lastIndex-p[2].length,d=p[1],o=p[3]===void 0?y:p[3]==='"'?ut:pt):o===ut||o===pt?o=y:o===lt||o===dt?o=O:(o=y,r=void 0);const $=o===y&&i[c+1].startsWith("/>")?" ":"";n+=o===O?a+Dt:h>=0?(s.push(d),a.slice(0,h)+mt+a.slice(h)+m+$):a+m+(h===-2?c:$)}return[At(i,n+(i[e]||"<?>")+(t===2?"</svg>":"")),s]};class H{constructor({strings:t,_$litType$:e},s){let r;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),A.currentNode=this.el.content,e===2){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=A.nextNode())!==null&&a.length<c;){if(r.nodeType===1){if(r.hasAttributes())for(const h of r.getAttributeNames())if(h.endsWith(mt)){const u=p[o++],$=r.getAttribute(h).split(m),D=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:D[2],strings:$,ctor:D[1]==="."?Wt:D[1]==="?"?Vt:D[1]==="@"?qt:V}),r.removeAttribute(h)}else h.startsWith(m)&&(a.push({type:6,index:n}),r.removeAttribute(h));if(vt.test(r.tagName)){const h=r.textContent.split(m),u=h.length-1;if(u>0){r.textContent=G?G.emptyScript:"";for(let $=0;$<u;$++)r.append(h[$],M()),A.nextNode(),a.push({type:2,index:++n});r.append(h[u],M())}}}else if(r.nodeType===8)if(r.data===_t)a.push({type:2,index:n});else{let h=-1;for(;(h=r.data.indexOf(m,h+1))!==-1;)a.push({type:7,index:n}),h+=m.length-1}n++}}static createElement(t,e){const s=b.createElement("template");return s.innerHTML=t,s}}function S(i,t,e=i,s){var o,c;if(t===w)return t;let r=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=k(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((c=r==null?void 0:r._$AO)==null||c.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=S(i,r._$AS(i,t.values),r,s)),t}class Gt{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)??b).importNode(e,!0);A.currentNode=r;let n=A.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=A.nextNode(),o++)}return A.currentNode=b,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 R{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=l,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=S(this,t,e),k(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==w&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):zt(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!==l&&k(this._$AH)?this._$AA.nextSibling.data=t:this.$(b.createTextNode(t)),this._$AH=t}g(t){var n;const{values:e,_$litType$:s}=t,r=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)===r)this._$AH.p(e);else{const o=new Gt(r,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,r=0;for(const n of t)r===e.length?e.push(s=new R(this.k(M()),this.k(M()),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&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}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,r,n){this.type=1,this._$AH=l,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=l}_$AI(t,e=this,s,r){const n=this.strings;let o=!1;if(n===void 0)t=S(this,t,e,0),o=!k(t)||t!==this._$AH&&t!==w,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===w&&(d=this._$AH[a]),o||(o=!k(d)||d!==this._$AH[a]),d===l?t=l:t!==l&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}o&&!r&&this.O(t)}O(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Wt extends V{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===l?void 0:t}}class Vt extends V{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}}class qt extends V{constructor(t,e,s,r,n){super(t,e,s,r,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??l)===w)return;const s=this._$AH,r=t===l&&s!==l||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==l&&(s===l||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 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=(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 R(t.insertBefore(M(),n),n,void 0,e??{})}return r._$AI(i),r};/**
|
16
16
|
* @license
|
17
17
|
* Copyright 2017 Google LLC
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -24,11 +24,11 @@
|
|
24
24
|
* @license
|
25
25
|
* Copyright 2017 Google LLC
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
27
|
-
*/const Kt={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:tt},Zt=(i=Kt,t,e)=>{const{kind:s,metadata:r}=e;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(e.name,i),s==="accessor"){const{name:o}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(o,a,i)},init(c){return c!==void 0&&this.C(o,void 0,i),c}}}if(s==="setter"){const{name:o}=e;return function(c){const a=this[o];t.call(this,c),this.requestUpdate(o,a,i)}}throw Error("Unsupported decorator location: "+s)};function
|
27
|
+
*/const Kt={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:tt},Zt=(i=Kt,t,e)=>{const{kind:s,metadata:r}=e;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(e.name,i),s==="accessor"){const{name:o}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(o,a,i)},init(c){return c!==void 0&&this.C(o,void 0,i),c}}}if(s==="setter"){const{name:o}=e;return function(c){const a=this[o];t.call(this,c),this.requestUpdate(o,a,i)}}throw Error("Unsupported decorator location: "+s)};function g(i){return(t,e)=>typeof e=="object"?Zt(i,t,e):((s,r,n)=>{const o=r.hasOwnProperty(n);return r.constructor.createProperty(n,o?{...s,wrapped:!0}:s),o?Object.getOwnPropertyDescriptor(r,n):void 0})(i,t,e)}/**
|
28
28
|
* @license
|
29
29
|
* Copyright 2017 Google LLC
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
31
|
-
*/function L(i){return
|
31
|
+
*/function L(i){return g({...i,state:!0,attribute:!1})}/**
|
32
32
|
* @license
|
33
33
|
* Copyright 2017 Google LLC
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -36,9 +36,9 @@
|
|
36
36
|
* @license
|
37
37
|
* Copyright 2018 Google LLC
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
39
|
-
*/const Ft=xt(class extends Et{constructor(i){var t;if(super(i),i.type!==wt.ATTRIBUTE||i.name!=="class"||((t=i.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(i){return" "+Object.keys(i).filter(t=>i[t]).join(" ")+" "}update(i,[t]){var s,r;if(this.it===void 0){this.it=new Set,i.strings!==void 0&&(this.st=new Set(i.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=i.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)||(r=this.st)!=null&&r.has(n)||(o?(e.add(n),this.it.add(n)):(e.remove(n),this.it.delete(n)))}return w}}),z=(i,t,e)=>{i&&e.style.setProperty(t,i)},Ct=(i,t)=>{var e,s,r,n;z((e=i.colors)==null?void 0:e.primaryBackground,"--primary-background",t),z((s=i.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",t),z((r=i.colors)==null?void 0:r.secondaryBackground,"--secondary-background",t),z((n=i.colors)==null?void 0:n.textOnSecondaryBackground,"--text-on-secondary-background",t)};var Qt=Object.defineProperty,Xt=Object.getOwnPropertyDescriptor,q=(i,t,e,s)=>{for(var r=s>1?void 0:s?Xt(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&Qt(t,e,r),r};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&&Ct(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 C` <img src=${e} class="trigger-icon" alt="" /> `;const s=(
|
39
|
+
*/const Ft=xt(class extends Et{constructor(i){var t;if(super(i),i.type!==wt.ATTRIBUTE||i.name!=="class"||((t=i.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(i){return" "+Object.keys(i).filter(t=>i[t]).join(" ")+" "}update(i,[t]){var s,r;if(this.it===void 0){this.it=new Set,i.strings!==void 0&&(this.st=new Set(i.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=i.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)||(r=this.st)!=null&&r.has(n)||(o?(e.add(n),this.it.add(n)):(e.remove(n),this.it.delete(n)))}return w}}),z=(i,t,e)=>{i&&e.style.setProperty(t,i)},Ct=(i,t)=>{var e,s,r,n;z((e=i.colors)==null?void 0:e.primaryBackground,"--primary-background",t),z((s=i.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",t),z((r=i.colors)==null?void 0:r.secondaryBackground,"--secondary-background",t),z((n=i.colors)==null?void 0:n.textOnSecondaryBackground,"--text-on-secondary-background",t)};var Qt=Object.defineProperty,Xt=Object.getOwnPropertyDescriptor,q=(i,t,e,s)=>{for(var r=s>1?void 0:s?Xt(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&Qt(t,e,r),r};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&&Ct(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 C` <img src=${e} class="trigger-icon" alt="" /> `;const s=(d=this.application)==null?void 0:d.triggerIcon;if(!s)return l;const r=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 r(o);return p?C`<telia-icon
|
40
40
|
class="trigger-icon"
|
41
|
-
svg=${
|
41
|
+
svg=${p.svg}
|
42
42
|
size="lg"
|
43
43
|
></telia-icon>`:l}default:return l}}render(){return C`<button
|
44
44
|
class=${Ft({trigger:!0,active:this.active,rendered:this.loaded})}
|
@@ -144,7 +144,7 @@
|
|
144
144
|
img {
|
145
145
|
max-width: 100%;
|
146
146
|
}
|
147
|
-
`];q([
|
147
|
+
`];q([g({attribute:!1})],x.prototype,"application",2);q([L()],x.prototype,"active",2);q([L()],x.prototype,"loaded",2);q([L()],x.prototype,"icon",2);var te=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,v=(i,t,e,s)=>{for(var r=s>1?void 0:s?ee(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&te(t,e,r),r};const St=i=>{class t extends i{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`
|
148
148
|
:host {
|
149
149
|
font-family: var(--font-family);
|
150
150
|
grid-column: span var(--width);
|
@@ -156,7 +156,7 @@
|
|
156
156
|
* {
|
157
157
|
box-sizing: border-box;
|
158
158
|
}
|
159
|
-
`],v([
|
159
|
+
`],v([g()],t.prototype,"properties",2),v([g()],t.prototype,"context",2),v([g()],t.prototype,"layout",2),v([g()],t.prototype,"name",2),v([g()],t.prototype,"type",2),v([g({attribute:!1})],t.prototype,"application",2),v([g({attribute:!1})],t.prototype,"parent",2),t};class Pt extends St(f){render(){return C`Non resolved component`}}Pt.styles=[P`
|
160
160
|
:host {
|
161
161
|
display: block;
|
162
162
|
}
|
@@ -252,11 +252,11 @@
|
|
252
252
|
opacity: 0;
|
253
253
|
animation: slideDown 0.3s linear;
|
254
254
|
}
|
255
|
-
`;pe([
|
255
|
+
`;pe([g({attribute:!1})],st.prototype,"application",2);var ue=Object.defineProperty,ge=Object.getOwnPropertyDescriptor,it=(i,t,e,s)=>{for(var r=s>1?void 0:s?ge(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&ue(t,e,r),r};class j 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()}}j.styles=[P`
|
256
256
|
:host {
|
257
257
|
display: block;
|
258
258
|
}
|
259
|
-
`];it([
|
259
|
+
`];it([g({attribute:!0})],j.prototype,"name",2);it([L()],j.prototype,"widget",2);it([L()],j.prototype,"status",2);customElements.get("ace-trigger")||customElements.define("ace-trigger",x);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Pt);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",st);customElements.get("ace-widget")||customElements.define("ace-widget",j);const fe=i=>{const t={};return Object.keys(i).forEach(e=>{e.indexOf("css-")>-1&&(t[e]=i[e])}),t},$e=(i,t)=>{const e=fe(t);Object.entries(e).forEach(([s,r])=>{i.style.setProperty(s.replace("css-",""),r)})};class rt extends St(f){constructor(){super(...arguments),this.nodes=[]}render(){var t;return $e(this.renderRoot.host,this.properties),this.renderRoot.host.style.setProperty("--columns",((t=this.properties.columns)==null?void 0:t.toString())||"1"),C`${bt(this.nodes,e=>e)}`}}rt.styles=[P`
|
260
260
|
:host {
|
261
261
|
height: 100%;
|
262
262
|
display: grid;
|
@@ -311,9 +311,9 @@ const Bt = (i, t) => {
|
|
311
311
|
let r, n = t === 2 ? "<svg>" : "", o = O;
|
312
312
|
for (let c = 0; c < e; c++) {
|
313
313
|
const a = i[c];
|
314
|
-
let d, p, h = -1,
|
315
|
-
for (;
|
316
|
-
|
314
|
+
let d, p, h = -1, u = 0;
|
315
|
+
for (; u < a.length && (o.lastIndex = u, p = o.exec(a), p !== null); )
|
316
|
+
u = o.lastIndex, o === O ? p[1] === "!--" ? o = ht : p[1] !== void 0 ? o = lt : p[2] !== void 0 ? (yt.test(p[2]) && (r = RegExp("</" + p[2], "g")), o = y) : p[3] !== void 0 && (o = y) : o === y ? p[0] === ">" ? (o = r ?? O, h = -1) : p[1] === void 0 ? h = -2 : (h = o.lastIndex - p[2].length, d = p[1], o = p[3] === void 0 ? y : p[3] === '"' ? pt : dt) : o === pt || o === dt ? o = y : o === ht || o === lt ? o = O : (o = y, r = void 0);
|
317
317
|
const $ = o === y && i[c + 1].startsWith("/>") ? " " : "";
|
318
318
|
n += o === O ? a + Dt : h >= 0 ? (s.push(d), a.slice(0, h) + $t + a.slice(h) + m + $) : a + m + (h === -2 ? c : $);
|
319
319
|
}
|
@@ -334,17 +334,17 @@ class H {
|
|
334
334
|
if (r.hasAttributes())
|
335
335
|
for (const h of r.getAttributeNames())
|
336
336
|
if (h.endsWith($t)) {
|
337
|
-
const
|
337
|
+
const u = p[o++], $ = r.getAttribute(h).split(m), j = /([.?@])?(.*)/.exec(u);
|
338
338
|
a.push({ type: 1, index: n, name: j[2], strings: $, ctor: j[1] === "." ? Gt : j[1] === "?" ? Wt : j[1] === "@" ? Vt : V }), r.removeAttribute(h);
|
339
339
|
} else
|
340
340
|
h.startsWith(m) && (a.push({ type: 6, index: n }), r.removeAttribute(h));
|
341
341
|
if (yt.test(r.tagName)) {
|
342
|
-
const h = r.textContent.split(m),
|
343
|
-
if (
|
342
|
+
const h = r.textContent.split(m), u = h.length - 1;
|
343
|
+
if (u > 0) {
|
344
344
|
r.textContent = G ? G.emptyScript : "";
|
345
|
-
for (let $ = 0; $ <
|
345
|
+
for (let $ = 0; $ < u; $++)
|
346
346
|
r.append(h[$], k()), A.nextNode(), a.push({ type: 2, index: ++n });
|
347
|
-
r.append(h[
|
347
|
+
r.append(h[u], k());
|
348
348
|
}
|
349
349
|
}
|
350
350
|
} else if (r.nodeType === 8)
|
@@ -618,7 +618,7 @@ const Jt = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged:
|
|
618
618
|
}
|
619
619
|
throw Error("Unsupported decorator location: " + s);
|
620
620
|
};
|
621
|
-
function
|
621
|
+
function g(i) {
|
622
622
|
return (t, e) => typeof e == "object" ? Kt(i, t, e) : ((s, r, n) => {
|
623
623
|
const o = r.hasOwnProperty(n);
|
624
624
|
return r.constructor.createProperty(n, o ? { ...s, wrapped: !0 } : s), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
|
@@ -630,7 +630,7 @@ function u(i) {
|
|
630
630
|
* SPDX-License-Identifier: BSD-3-Clause
|
631
631
|
*/
|
632
632
|
function L(i) {
|
633
|
-
return
|
633
|
+
return g({ ...i, state: !0, attribute: !1 });
|
634
634
|
}
|
635
635
|
/**
|
636
636
|
* @license
|
@@ -730,22 +730,22 @@ class x extends f {
|
|
730
730
|
(t = this.application) != null && t.settings && Et(this.application.settings.branding, this);
|
731
731
|
}
|
732
732
|
async _renderSymbol() {
|
733
|
-
var c, a;
|
734
|
-
const t = (c = this.application) == null ? void 0 : c.branding(), e = t == null ? void 0 : t.graphics.trigger;
|
733
|
+
var c, a, d;
|
734
|
+
const t = (c = this.application) == null ? void 0 : c.branding(), e = (a = t == null ? void 0 : t.graphics) == null ? void 0 : a.trigger;
|
735
735
|
if (e)
|
736
736
|
return C` <img src=${e} class="trigger-icon" alt="" /> `;
|
737
|
-
const s = (
|
737
|
+
const s = (d = this.application) == null ? void 0 : d.triggerIcon;
|
738
738
|
if (!s)
|
739
739
|
return l;
|
740
|
-
const r = async (
|
741
|
-
(
|
740
|
+
const r = async (p) => await import("./index-5087564d.mjs").then(
|
741
|
+
(u) => u[p]
|
742
742
|
), { type: n, content: o } = s;
|
743
743
|
switch (n) {
|
744
744
|
case "Telia": {
|
745
|
-
const
|
746
|
-
return
|
745
|
+
const p = await r(o);
|
746
|
+
return p ? C`<telia-icon
|
747
747
|
class="trigger-icon"
|
748
|
-
svg=${
|
748
|
+
svg=${p.svg}
|
749
749
|
size="lg"
|
750
750
|
></telia-icon>` : l;
|
751
751
|
}
|
@@ -869,7 +869,7 @@ x.styles = [
|
|
869
869
|
`
|
870
870
|
];
|
871
871
|
q([
|
872
|
-
|
872
|
+
g({ attribute: !1 })
|
873
873
|
], x.prototype, "application", 2);
|
874
874
|
q([
|
875
875
|
L()
|
@@ -925,19 +925,19 @@ const Ct = (i) => {
|
|
925
925
|
}
|
926
926
|
`
|
927
927
|
], v([
|
928
|
-
|
928
|
+
g()
|
929
929
|
], t.prototype, "properties", 2), v([
|
930
|
-
|
930
|
+
g()
|
931
931
|
], t.prototype, "context", 2), v([
|
932
|
-
|
932
|
+
g()
|
933
933
|
], t.prototype, "layout", 2), v([
|
934
|
-
|
934
|
+
g()
|
935
935
|
], t.prototype, "name", 2), v([
|
936
|
-
|
936
|
+
g()
|
937
937
|
], t.prototype, "type", 2), v([
|
938
|
-
|
938
|
+
g({ attribute: !1 })
|
939
939
|
], t.prototype, "application", 2), v([
|
940
|
-
|
940
|
+
g({ attribute: !1 })
|
941
941
|
], t.prototype, "parent", 2), t;
|
942
942
|
};
|
943
943
|
class St extends Ct(f) {
|
@@ -1173,7 +1173,7 @@ st.styles = P`
|
|
1173
1173
|
}
|
1174
1174
|
`;
|
1175
1175
|
de([
|
1176
|
-
|
1176
|
+
g({ attribute: !1 })
|
1177
1177
|
], st.prototype, "application", 2);
|
1178
1178
|
var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, it = (i, t, e, s) => {
|
1179
1179
|
for (var r = s > 1 ? void 0 : s ? ue(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
@@ -1220,7 +1220,7 @@ D.styles = [
|
|
1220
1220
|
`
|
1221
1221
|
];
|
1222
1222
|
it([
|
1223
|
-
|
1223
|
+
g({ attribute: !0 })
|
1224
1224
|
], D.prototype, "name", 2);
|
1225
1225
|
it([
|
1226
1226
|
L()
|
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-7262b4c4.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.20-rc.1",
|
4
4
|
"dependencies": {
|
5
|
-
"@telia-ace/widget-core-flamingo": "1.1.
|
5
|
+
"@telia-ace/widget-core-flamingo": "1.1.20-rc.1",
|
6
6
|
"lit": "^3.0.2"
|
7
7
|
},
|
8
8
|
"main": "./index.js",
|