@telia-ace/widget-side-menu 1.1.123-rc.9 → 1.1.124-rc.0

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-C3pgXQfW.js")))};module.exports=n;
1
+ "use strict";const n=async e=>{e.registerComponent("side-menu",Promise.resolve().then(()=>require("./side-menu-C1IZk4tO.js")))};module.exports=n;
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  const n = async (e) => {
2
- e.registerComponent("side-menu", import("./side-menu-DT5P7_Zx.mjs"));
2
+ e.registerComponent("side-menu", import("./side-menu-E8qfNAjn.mjs"));
3
3
  };
4
4
  export {
5
5
  n as default
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-side-menu",
3
- "version": "1.1.123-rc.9",
3
+ "version": "1.1.124-rc.0",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
6
  "rxjs": "^7.8.2",
7
- "@telia-ace/widget-core-flamingo": "1.1.123-rc.9",
7
+ "@telia-ace/widget-core-flamingo": "1.1.123",
8
8
  "@teliads/components": "^22.1.1",
9
9
  "@lit-labs/motion": "^1.0.8",
10
10
  "lit-html": "^3.0.2"
@@ -67,7 +67,7 @@
67
67
  svg=${u.svg}
68
68
  size="lg"
69
69
  ></telia-icon>`:p}default:return p}}hideTrigger(){this.triggerVisible=!1}showTrigger(){this.triggerVisible=!0}render(){var t,e,s,r,n,o,a;return k`<div
70
- class=${Be({"trigger-container":!0,hidden:!this.triggerVisible})}
70
+ class=${Be({"trigger-container":!0,"ace-hidden":!this.triggerVisible})}
71
71
  ${oe(this.containerRef)}
72
72
  >
73
73
  ${!this.active&&((r=(s=(e=(t=this.application)==null?void 0:t.settings)==null?void 0:e.branding)==null?void 0:s.other)!=null&&r.showButtonLabel)?k`
@@ -137,7 +137,7 @@
137
137
  gap: 1rem;
138
138
  }
139
139
 
140
- .trigger-container.hidden {
140
+ .trigger-container.ace-hidden {
141
141
  display: none;
142
142
  }
143
143
 
@@ -286,7 +286,7 @@
286
286
  * @license
287
287
  * Copyright 2017 Google LLC
288
288
  * SPDX-License-Identifier: BSD-3-Clause
289
- */function wr({context:i}){return(t,e)=>{const s=new WeakMap;if(typeof e=="object")return{get(){return t.get.call(this)},set(r){return s.get(this).setValue(r),t.set.call(this,r)},init(r){return s.set(this,new Fe(this,{context:i,initialValue:r})),r}};{t.constructor.addInitializer((o=>{s.set(o,new Fe(o,{context:i}))}));const r=Object.getOwnPropertyDescriptor(t,e);let n;if(r===void 0){const o=new WeakMap;n={get(){return o.get(this)},set(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=r.set;n={...r,set(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,n)}}}var xr=Object.defineProperty,Mi=(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&&xr(t,e,r),r};const Sr="application",$e=class $e extends x{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=_t(),this.fullscreen=!1,this.isReady=new li(!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,r])=>{e.style.setProperty(`--${s}`,r)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var s,r;const t=this.application.settings.components.conversation;return((r=(s=t==null?void 0:t.properties)==null?void 0:s.chat)==null?void 0:r.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===ae.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"),k`<div class="widget-container" ${oe(this.wrapperRef)}>
289
+ */function wr({context:i}){return(t,e)=>{const s=new WeakMap;if(typeof e=="object")return{get(){return t.get.call(this)},set(r){return s.get(this).setValue(r),t.set.call(this,r)},init(r){return s.set(this,new Fe(this,{context:i,initialValue:r})),r}};{t.constructor.addInitializer((o=>{s.set(o,new Fe(o,{context:i}))}));const r=Object.getOwnPropertyDescriptor(t,e);let n;if(r===void 0){const o=new WeakMap;n={get(){return o.get(this)},set(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=r.set;n={...r,set(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,n)}}}var xr=Object.defineProperty,Mi=(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&&xr(t,e,r),r};const Sr="application",$e=class $e extends x{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=_t(),this.fullscreen=!1,this.isReady=new li(!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,r])=>{e.style.setProperty(`--${s}`,r)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var e,s,r;return((r=(s=(e=this.application.settings)==null?void 0:e.agentConfig)==null?void 0:s.live)==null?void 0:r.isThirdPartyWidget)??!1?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===ae.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"),k`<div class="widget-container" ${oe(this.wrapperRef)}>
290
290
  ${mr(this.nodes,n=>n)}
291
291
  </div>`}};$e.styles=N`
292
292
  :host {
@@ -438,19 +438,19 @@
438
438
  }
439
439
  }
440
440
 
441
- :host(.expanded) {
441
+ :host(.ace-expanded) {
442
442
  opacity: 1;
443
443
  animation: slideUp 0.3s linear;
444
444
  }
445
445
 
446
- :host(.hidden) {
446
+ :host(.ace-hidden) {
447
447
  opacity: 0;
448
448
  animation: slideDown 0.3s linear;
449
449
  pointer-events: none;
450
450
  }
451
451
 
452
- :host(.hidden.embedded),
453
- :host(.expanded.embedded) {
452
+ :host(.ace-hidden.embedded),
453
+ :host(.ace-expanded.embedded) {
454
454
  animation: none;
455
455
  }
456
456
  `;let nt=$e;Mi([b({attribute:!0})],nt.prototype,"fullscreen");Mi([b({attribute:!1}),wr({context:Sr})],nt.prototype,"application");var Ar=Object.defineProperty,le=(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&&Ar(t,e,r),r};const ve=class ve extends x{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 p;if(this.widget.renderStrategy===ae.Trigger){const t=new E;return t.application=this.widget,t}return this.widget.render()}};ve.styles=[N`
@@ -2124,7 +2124,7 @@ const pe = class pe extends x {
2124
2124
  return k`<div
2125
2125
  class=${Be({
2126
2126
  "trigger-container": !0,
2127
- hidden: !this.triggerVisible
2127
+ "ace-hidden": !this.triggerVisible
2128
2128
  })}
2129
2129
  ${oe(this.containerRef)}
2130
2130
  >
@@ -2208,7 +2208,7 @@ pe.styles = [
2208
2208
  gap: 1rem;
2209
2209
  }
2210
2210
 
2211
- .trigger-container.hidden {
2211
+ .trigger-container.ace-hidden {
2212
2212
  display: none;
2213
2213
  }
2214
2214
 
@@ -2568,9 +2568,8 @@ const Sr = "application", $e = class $e extends x {
2568
2568
  this.applyBranding(), this.applyStyles();
2569
2569
  }
2570
2570
  render() {
2571
- var s, r;
2572
- const t = this.application.settings.components.conversation;
2573
- return ((r = (s = t == null ? void 0 : t.properties) == null ? void 0 : s.chat) == null ? void 0 : r.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === ae.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"), k`<div class="widget-container" ${oe(this.wrapperRef)}>
2571
+ var e, s, r;
2572
+ return ((r = (s = (e = this.application.settings) == null ? void 0 : e.agentConfig) == null ? void 0 : s.live) == null ? void 0 : r.isThirdPartyWidget) ?? !1 ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === ae.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"), k`<div class="widget-container" ${oe(this.wrapperRef)}>
2574
2573
  ${mr(this.nodes, (n) => n)}
2575
2574
  </div>`;
2576
2575
  }
@@ -2725,19 +2724,19 @@ $e.styles = N`
2725
2724
  }
2726
2725
  }
2727
2726
 
2728
- :host(.expanded) {
2727
+ :host(.ace-expanded) {
2729
2728
  opacity: 1;
2730
2729
  animation: slideUp 0.3s linear;
2731
2730
  }
2732
2731
 
2733
- :host(.hidden) {
2732
+ :host(.ace-hidden) {
2734
2733
  opacity: 0;
2735
2734
  animation: slideDown 0.3s linear;
2736
2735
  pointer-events: none;
2737
2736
  }
2738
2737
 
2739
- :host(.hidden.embedded),
2740
- :host(.expanded.embedded) {
2738
+ :host(.ace-hidden.embedded),
2739
+ :host(.ace-expanded.embedded) {
2741
2740
  animation: none;
2742
2741
  }
2743
2742
  `;
@@ -1,3 +1,4 @@
1
+ import { Observable } from 'rxjs';
1
2
  import { OptionsController } from './controllers/options-controller';
2
3
  export declare class SideMenuOption {
3
4
  label: string;
@@ -13,5 +14,5 @@ export declare class SideMenuOption {
13
14
  updateLabel(value: string): void;
14
15
  updateIcon(value: string): void;
15
16
  remove(): void;
16
- subscribe(): import('rxjs').Observable<void>;
17
+ subscribe(): Observable<void>;
17
18
  }
package/side-menu.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { LitElement, nothing } from 'lit';
1
+ import { LitElement, nothing, CSSResultGroup, TemplateResult } from 'lit';
2
2
  import { CreateSideMenuOption } from './types';
3
3
  import { SideMenuOption } from './side-menu-option';
4
4
  declare const WidgetElement: (new (...args: any[]) => import('../../core/src/index.ts').WidgetComponentType) & typeof LitElement;
5
5
  export declare class SideMenu extends WidgetElement {
6
- static styles: import('lit').CSSResultGroup[];
6
+ static styles: CSSResultGroup;
7
7
  optionsIsVisible: boolean;
8
8
  private options;
9
9
  private optionsRef;
@@ -14,6 +14,6 @@ export declare class SideMenu extends WidgetElement {
14
14
  connectedCallback(): void;
15
15
  disconnectedCallback(): void;
16
16
  private _onClickOutside;
17
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
17
+ render(): TemplateResult | typeof nothing;
18
18
  }
19
19
  export default SideMenu;