@telia-ace/widget-components-widget-header-flamingo 1.1.123-rc.42 → 1.1.123-rc.43

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-BfYgjWCK.js")))};module.exports=r;
1
+ "use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-DTcKbFXU.js")))};module.exports=r;
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  const t = async (e) => {
2
- e.registerComponent("widget-header", import("./widget-header-D9VpIwjw.mjs"));
2
+ e.registerComponent("widget-header", import("./widget-header-D1WvHtP8.mjs"));
3
3
  };
4
4
  export {
5
5
  t as default
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-widget-header-flamingo",
3
- "version": "1.1.123-rc.42",
3
+ "version": "1.1.123-rc.43",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
- "@telia-ace/widget-core-flamingo": "1.1.123-rc.42",
6
+ "@telia-ace/widget-core-flamingo": "1.1.123-rc.43",
7
7
  "@teliads/components": "^22.1.1",
8
8
  "@teliads/icons": "^8.4.0",
9
9
  "@lit-labs/motion": "^1.0.8",
@@ -2568,9 +2568,8 @@ const En = "application", me = class me extends A {
2568
2568
  this.applyBranding(), this.applyStyles();
2569
2569
  }
2570
2570
  render() {
2571
- var s, n;
2572
- const t = this.application.settings.components.conversation;
2573
- return ((n = (s = t == null ? void 0 : t.properties) == null ? void 0 : s.chat) == null ? void 0 : n.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === ce.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), this.application.fullscreen && this.renderRoot.host.classList.add("fullscreen"), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), m`<div class="widget-container" ${xt(this.wrapperRef)}>
2571
+ var e, s, n;
2572
+ return ((n = (s = (e = this.application.settings) == null ? void 0 : e.agentConfig) == null ? void 0 : s.live) == null ? void 0 : n.isThirdPartyWidget) ?? !1 ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === ce.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), this.application.fullscreen && this.renderRoot.host.classList.add("fullscreen"), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), m`<div class="widget-container" ${xt(this.wrapperRef)}>
2574
2573
  ${_n(this.nodes, (r) => r)}
2575
2574
  </div>`;
2576
2575
  }
@@ -3613,11 +3612,9 @@ const ei = Ui(A), be = class be extends ei {
3613
3612
  super.disconnectedCallback(), document.removeEventListener("click", this.onClickOutside), window.removeEventListener("keydown", this.onGlobalKeyDown);
3614
3613
  }
3615
3614
  render() {
3616
- var a, l, c, u, h;
3617
- const t = this.application.branding(), e = (a = t == null ? void 0 : t.graphics) == null ? void 0 : a.logotype, s = this.application.texts, n = s.get("widget-header.header", "ACE Widget"), r = this.application.settings.components.conversation;
3618
- this.shouldUseAuth = (c = (l = this.application.settings) == null ? void 0 : l.auth) == null ? void 0 : c.shouldUseAuth;
3619
- const o = (h = (u = r == null ? void 0 : r.properties) == null ? void 0 : u.chat) == null ? void 0 : h.isThirdPartyWidget;
3620
- return m` <div class="widget-header">
3615
+ var o, a, l, c, u, h;
3616
+ const t = this.application.branding(), e = (o = t == null ? void 0 : t.graphics) == null ? void 0 : o.logotype, s = this.application.texts, n = s.get("widget-header.header", "ACE Widget"), r = ((c = (l = (a = this.application.settings) == null ? void 0 : a.agentConfig) == null ? void 0 : l.live) == null ? void 0 : c.isThirdPartyWidget) ?? !1;
3617
+ return this.shouldUseAuth = ((h = (u = this.application.settings) == null ? void 0 : u.auth) == null ? void 0 : h.shouldUseAuth) ?? !1, m` <div class="widget-header">
3621
3618
  ${e ? m` <img
3622
3619
  src=${e}
3623
3620
  class="logotype"
@@ -3676,7 +3673,7 @@ const ei = Ui(A), be = class be extends ei {
3676
3673
  </button>`)}
3677
3674
  </div>
3678
3675
  ` : p}
3679
- ${o ? p : m`<button
3676
+ ${r ? p : m`<button
3680
3677
  type="button"
3681
3678
  @click=${this.onMinimizeClick}
3682
3679
  class="widget-header__action-button"
@@ -286,7 +286,7 @@
286
286
  * @license
287
287
  * Copyright 2017 Google LLC
288
288
  * SPDX-License-Identifier: BSD-3-Clause
289
- */function kn({context:i}){return(t,e)=>{const s=new WeakMap;if(typeof e=="object")return{get(){return t.get.call(this)},set(n){return s.get(this).setValue(n),t.set.call(this,n)},init(n){return s.set(this,new ze(this,{context:i,initialValue:n})),n}};{t.constructor.addInitializer((o=>{s.set(o,new ze(o,{context:i}))}));const n=Object.getOwnPropertyDescriptor(t,e);let r;if(n===void 0){const o=new WeakMap;r={get(){return o.get(this)},set(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=n.set;r={...n,set(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,r)}}}var Cn=Object.defineProperty,Mi=(i,t,e,s)=>{for(var n=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=o(t,e,n)||n);return n&&Cn(t,e,n),n};const En="application",me=class me extends A{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=_t(),this.fullscreen=!1,this.isReady=new mi(!1)}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&Ri(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([s,n])=>{e.style.setProperty(`--${s}`,n)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var s,n;const t=this.application.settings.components.conversation;return((n=(s=t==null?void 0:t.properties)==null?void 0:s.chat)==null?void 0:n.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===ce.Trigger&&(this.renderRoot.host.classList.add("floating"),this.application.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.application.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right")),this.application.fullscreen&&this.renderRoot.host.classList.add("fullscreen"),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),m`<div class="widget-container" ${xt(this.wrapperRef)}>
289
+ */function kn({context:i}){return(t,e)=>{const s=new WeakMap;if(typeof e=="object")return{get(){return t.get.call(this)},set(n){return s.get(this).setValue(n),t.set.call(this,n)},init(n){return s.set(this,new ze(this,{context:i,initialValue:n})),n}};{t.constructor.addInitializer((o=>{s.set(o,new ze(o,{context:i}))}));const n=Object.getOwnPropertyDescriptor(t,e);let r;if(n===void 0){const o=new WeakMap;r={get(){return o.get(this)},set(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=n.set;r={...n,set(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,r)}}}var Cn=Object.defineProperty,Mi=(i,t,e,s)=>{for(var n=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=o(t,e,n)||n);return n&&Cn(t,e,n),n};const En="application",me=class me extends A{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=_t(),this.fullscreen=!1,this.isReady=new mi(!1)}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&Ri(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([s,n])=>{e.style.setProperty(`--${s}`,n)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var e,s,n;return((n=(s=(e=this.application.settings)==null?void 0:e.agentConfig)==null?void 0:s.live)==null?void 0:n.isThirdPartyWidget)??!1?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===ce.Trigger&&(this.renderRoot.host.classList.add("floating"),this.application.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.application.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right")),this.application.fullscreen&&this.renderRoot.host.classList.add("fullscreen"),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),m`<div class="widget-container" ${xt(this.wrapperRef)}>
290
290
  ${_n(this.nodes,r=>r)}
291
291
  </div>`}};me.styles=H`
292
292
  :host {
@@ -479,7 +479,7 @@
479
479
  <p class="options-menu__auth-status" data-testid="auth-status">
480
480
  ${this.userName}
481
481
  </p>
482
- </div>`}setFocusToOptionsTitle(){var e;const t=(e=this.optionsRef.value)==null?void 0:e.querySelector("#options-menu-title");t&&setTimeout(()=>t.focus(),0)}connectedCallback(){super.connectedCallback();const t=this.application.storage.get("auth");t!=null&&t.authenticated&&(this.userName=(t==null?void 0:t.name)??"",this.authState=et.Authenticated),document.addEventListener("click",this.onClickOutside),window.addEventListener("keydown",this.onGlobalKeyDown)}updated(t){super.updated(t),this.optionsIsVisible&&this.optionsRef.value&&this.setFocusToOptionsTitle()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.onClickOutside),window.removeEventListener("keydown",this.onGlobalKeyDown)}render(){var a,l,c,u,h;const t=this.application.branding(),e=(a=t==null?void 0:t.graphics)==null?void 0:a.logotype,s=this.application.texts,n=s.get("widget-header.header","ACE Widget"),r=this.application.settings.components.conversation;this.shouldUseAuth=(c=(l=this.application.settings)==null?void 0:l.auth)==null?void 0:c.shouldUseAuth;const o=(h=(u=r==null?void 0:r.properties)==null?void 0:u.chat)==null?void 0:h.isThirdPartyWidget;return m` <div class="widget-header">
482
+ </div>`}setFocusToOptionsTitle(){var e;const t=(e=this.optionsRef.value)==null?void 0:e.querySelector("#options-menu-title");t&&setTimeout(()=>t.focus(),0)}connectedCallback(){super.connectedCallback();const t=this.application.storage.get("auth");t!=null&&t.authenticated&&(this.userName=(t==null?void 0:t.name)??"",this.authState=et.Authenticated),document.addEventListener("click",this.onClickOutside),window.addEventListener("keydown",this.onGlobalKeyDown)}updated(t){super.updated(t),this.optionsIsVisible&&this.optionsRef.value&&this.setFocusToOptionsTitle()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.onClickOutside),window.removeEventListener("keydown",this.onGlobalKeyDown)}render(){var o,a,l,c,u,h;const t=this.application.branding(),e=(o=t==null?void 0:t.graphics)==null?void 0:o.logotype,s=this.application.texts,n=s.get("widget-header.header","ACE Widget"),r=((c=(l=(a=this.application.settings)==null?void 0:a.agentConfig)==null?void 0:l.live)==null?void 0:c.isThirdPartyWidget)??!1;return this.shouldUseAuth=((h=(u=this.application.settings)==null?void 0:u.auth)==null?void 0:h.shouldUseAuth)??!1,m` <div class="widget-header">
483
483
  ${e?m` <img
484
484
  src=${e}
485
485
  class="logotype"
@@ -533,7 +533,7 @@
533
533
  </button>`)}
534
534
  </div>
535
535
  `:p}
536
- ${o?p:m`<button
536
+ ${r?p:m`<button
537
537
  type="button"
538
538
  @click=${this.onMinimizeClick}
539
539
  class="widget-header__action-button"