@telia-ace/widget-conversation-flamingo 1.1.18 → 1.1.19-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/{conversation-9745531a.js → conversation-8e0ad5eb.js} +7 -3
- package/{conversation-82eb83b8.mjs → conversation-e5cbfa02.mjs} +18 -11
- package/{index-cc2f0d24.mjs → index-536e1cef.mjs} +2 -2
- package/{index-823bc9d0.js → index-8f4273fd.js} +1 -1
- package/{index-e9da2f7d.mjs → index-9a0c787a.mjs} +1 -1
- package/{index-b34f590f.js → index-f74815a8.js} +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +2 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";const xt=require("./index-
|
1
|
+
"use strict";const xt=require("./index-f74815a8.js");/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2019 Google LLC
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -48,9 +48,9 @@
|
|
48
48
|
* @license
|
49
49
|
* Copyright 2018 Google LLC
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
51
|
-
*/const Wt=bt(class extends Ft{constructor(e){var t;if(super(e),e.type!==yt.ATTRIBUTE||e.name!=="class"||((t=e.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(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var i,n;if(this.it===void 0){this.it=new Set,e.strings!==void 0&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in t)t[r]&&!((i=this.st)!=null&&i.has(r))&&this.it.add(r);return this.render(t)}const s=e.element.classList;for(const r of this.it)r in t||(s.remove(r),this.it.delete(r));for(const r in t){const o=!!t[r];o===this.it.has(r)||(n=this.st)!=null&&n.has(r)||(o?(s.add(r),this.it.add(r)):(s.remove(r),this.it.delete(r)))}return C}}),it=(e,t,s)=>{e&&s.style.setProperty(t,e)},ts=(e,t)=>{var s,i,n,r;it((s=e.colors)==null?void 0:s.primaryBackground,"--primary-background",t),it((i=e.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),it((n=e.colors)==null?void 0:n.secondaryBackground,"--secondary-background",t),it((r=e.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",t)};var Pi=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,_t=(e,t,s,i)=>{for(var n=i>1?void 0:i?Li(t,s):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(n=(i?o(t,s,n):o(n))||n);return i&&n&&Pi(t,s,n),n};class U extends v{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&&ts(this.application.settings.branding,this)}async _renderSymbol(){var
|
51
|
+
*/const Wt=bt(class extends Ft{constructor(e){var t;if(super(e),e.type!==yt.ATTRIBUTE||e.name!=="class"||((t=e.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(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var i,n;if(this.it===void 0){this.it=new Set,e.strings!==void 0&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in t)t[r]&&!((i=this.st)!=null&&i.has(r))&&this.it.add(r);return this.render(t)}const s=e.element.classList;for(const r of this.it)r in t||(s.remove(r),this.it.delete(r));for(const r in t){const o=!!t[r];o===this.it.has(r)||(n=this.st)!=null&&n.has(r)||(o?(s.add(r),this.it.add(r)):(s.remove(r),this.it.delete(r)))}return C}}),it=(e,t,s)=>{e&&s.style.setProperty(t,e)},ts=(e,t)=>{var s,i,n,r;it((s=e.colors)==null?void 0:s.primaryBackground,"--primary-background",t),it((i=e.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),it((n=e.colors)==null?void 0:n.secondaryBackground,"--secondary-background",t),it((r=e.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",t)};var Pi=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,_t=(e,t,s,i)=>{for(var n=i>1?void 0:i?Li(t,s):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(n=(i?o(t,s,n):o(n))||n);return i&&n&&Pi(t,s,n),n};class U extends v{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&&ts(this.application.settings.branding,this)}async _renderSymbol(){var a,l;const t=(a=this.application)==null?void 0:a.branding(),s=t==null?void 0:t.graphics.trigger;if(s)return $` <img src=${s} class="trigger-icon" alt="" /> `;const i=(l=this.application)==null?void 0:l.triggerIcon;if(!i)return u;const n=async c=>await Promise.resolve().then(()=>require("./index-8f4273fd.js")).then(d=>d[c]),{type:r,content:o}=i;switch(r){case"Telia":{const c=await n(o);return c?$`<telia-icon
|
52
52
|
class="trigger-icon"
|
53
|
-
svg=${
|
53
|
+
svg=${c.svg}
|
54
54
|
size="lg"
|
55
55
|
></telia-icon>`:u}default:return u}}render(){return $`<button
|
56
56
|
class=${Wt({trigger:!0,active:this.active,rendered:this.loaded})}
|
@@ -152,6 +152,10 @@
|
|
152
152
|
align-items: center;
|
153
153
|
fill: var(--trigger-text-color, var(--text-on-primary-background));
|
154
154
|
}
|
155
|
+
|
156
|
+
img {
|
157
|
+
max-width: 100%;
|
158
|
+
}
|
155
159
|
`];_t([g({attribute:!1})],U.prototype,"application",2);_t([A()],U.prototype,"active",2);_t([A()],U.prototype,"loaded",2);_t([A()],U.prototype,"icon",2);var Ui=Object.defineProperty,Ni=Object.getOwnPropertyDescriptor,k=(e,t,s,i)=>{for(var n=i>1?void 0:i?Ni(t,s):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(n=(i?o(t,s,n):o(n))||n);return i&&n&&Ui(t,s,n),n};const es=e=>{class t extends e{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(i){this.properties=i}writeLayout(i){this.layout=i}writeContext(i){this.context=i}addChild(i){i.parent=this,this.nodes.push(i)}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=[_`
|
156
160
|
:host {
|
157
161
|
font-family: var(--font-family);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { C as xt } from "./index-
|
1
|
+
import { C as xt } from "./index-9a0c787a.mjs";
|
2
2
|
/**
|
3
3
|
* @license
|
4
4
|
* Copyright 2019 Google LLC
|
@@ -1475,19 +1475,22 @@ class U extends v {
|
|
1475
1475
|
(t = this.application) != null && t.settings && Ve(this.application.settings.branding, this);
|
1476
1476
|
}
|
1477
1477
|
async _renderSymbol() {
|
1478
|
-
var
|
1479
|
-
const t = (
|
1480
|
-
if (
|
1478
|
+
var a, l;
|
1479
|
+
const t = (a = this.application) == null ? void 0 : a.branding(), s = t == null ? void 0 : t.graphics.trigger;
|
1480
|
+
if (s)
|
1481
|
+
return $` <img src=${s} class="trigger-icon" alt="" /> `;
|
1482
|
+
const i = (l = this.application) == null ? void 0 : l.triggerIcon;
|
1483
|
+
if (!i)
|
1481
1484
|
return u;
|
1482
|
-
const
|
1483
|
-
(
|
1484
|
-
), { type:
|
1485
|
-
switch (
|
1485
|
+
const n = async (c) => await import("./index-536e1cef.mjs").then(
|
1486
|
+
(d) => d[c]
|
1487
|
+
), { type: r, content: o } = i;
|
1488
|
+
switch (r) {
|
1486
1489
|
case "Telia": {
|
1487
|
-
const
|
1488
|
-
return
|
1490
|
+
const c = await n(o);
|
1491
|
+
return c ? $`<telia-icon
|
1489
1492
|
class="trigger-icon"
|
1490
|
-
svg=${
|
1493
|
+
svg=${c.svg}
|
1491
1494
|
size="lg"
|
1492
1495
|
></telia-icon>` : u;
|
1493
1496
|
}
|
@@ -1604,6 +1607,10 @@ U.styles = [
|
|
1604
1607
|
align-items: center;
|
1605
1608
|
fill: var(--trigger-text-color, var(--text-on-primary-background));
|
1606
1609
|
}
|
1610
|
+
|
1611
|
+
img {
|
1612
|
+
max-width: 100%;
|
1613
|
+
}
|
1607
1614
|
`
|
1608
1615
|
];
|
1609
1616
|
_t([
|