@telia-ace/ace-chat-flamingo 1.1.126-rc.1 → 1.1.126-rc.2

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
@@ -1398,7 +1398,7 @@ Please report this to https://github.com/markedjs/marked.`,i){const n="<p>An err
1398
1398
  border: 1px solid var(--border-color-medium);
1399
1399
  box-sizing: border-box;
1400
1400
  }
1401
- `];let ii=Ys;sp([ue({context:oe}),k({attribute:!1})],ii.prototype,"application");window.customElements.get("ace-video-iframe")||window.customElements.define("ace-video-iframe",ii);class rp{constructor(e){this.provider=e,this._guestId=null,this._chatOverlayActive=!1,this._inVideoCall=!1}get videoIFrameElement(){return this._videoIFrameElement}get guestId(){return this._guestId}get chatOverlayActive(){return this._chatOverlayActive}get inVideoCall(){return this._inVideoCall}clearGuestId(){this._guestId=null}showVideoIFrame(e){var n;this._guestId=Ls(),this._videoIFrameElement=new ii(e,this._guestId);const t=this.provider.component.application.root;(n=t==null?void 0:t.shadowRoot)==null||n.prepend(this._videoIFrameElement),this._inVideoCall=!0,this.provider.updateHeaderOption()}showChatOverVideo(e){this._guestId&&e===this._guestId&&(this._chatOverlayActive=!0,this.provider.showChatOverlay$.next(this._chatOverlayActive))}removeVideo(){var e;(e=this._videoIFrameElement)==null||e.remove(),this._guestId=null,this._chatOverlayActive&&(this._chatOverlayActive=!1,this.provider.showChatOverlay$.next(this._chatOverlayActive)),this._inVideoCall=!1,this.provider.updateHeaderOption()}}var op=Object.defineProperty,ap=(i,e,t,n)=>{for(var s=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(s=o(e,t,s)||s);return s&&op(e,t,s),s};const Qs=class Qs extends E{onClose(){this.application.trigger&&this.application.trigger.toggleActive()}render(){const e=this.application.texts;return w`<div class="container">
1401
+ `];let ii=Ys;sp([ue({context:oe}),k({attribute:!1})],ii.prototype,"application");window.customElements.get("ace-video-iframe")||window.customElements.define("ace-video-iframe",ii);class rp{constructor(e){this.provider=e,this._guestId=null,this._chatOverlayActive=!1,this._inVideoCall=!1}get videoIFrameElement(){return this._videoIFrameElement}get guestId(){return this._guestId}get chatOverlayActive(){return this._chatOverlayActive}get inVideoCall(){return this._inVideoCall}clearGuestId(){this._guestId=null}showVideoIFrame(e){var n;this._guestId=Ls(),this._videoIFrameElement=new ii(e,this._guestId);const t=this.provider.component.application.root;(n=t==null?void 0:t.shadowRoot)==null||n.prepend(this._videoIFrameElement),this._inVideoCall=!0,this.provider.updateHeaderOption()}showChatOverVideo(e){this._guestId&&e===this._guestId&&(this._chatOverlayActive=!0,this.provider.showChatOverlay$.next(this._chatOverlayActive))}removeVideo(){var e;(e=this._videoIFrameElement)==null||e.remove(),this._guestId=null,this._chatOverlayActive&&(this._chatOverlayActive=!1,this.provider.showChatOverlay$.next(this._chatOverlayActive)),this._inVideoCall=!1,this.provider.updateHeaderOption()}}var op=Object.defineProperty,ap=(i,e,t,n)=>{for(var s=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(s=o(e,t,s)||s);return s&&op(e,t,s),s};const Qs=class Qs extends E{onClose(){this.application.trigger?this.application.trigger.toggleActive():(this.notify("widget-minimize",{widgetId:this.application.id}),this.application.storage.set("open",!1))}notify(e,t={}){window!=null&&window.parent&&window.parent.postMessage({type:e,data:t},"*")}render(){const e=this.application.texts;return w`<div class="container">
1402
1402
  <h3 data-testid="chat-unavailable-title">
1403
1403
  ${e.getOrFallback("chat-unavailable.title","Chat not available")}
1404
1404
  </h3>
package/index.mjs CHANGED
@@ -8844,7 +8844,18 @@ var op = Object.defineProperty, ap = (i, e, t, n) => {
8844
8844
  };
8845
8845
  const Qs = class Qs extends E {
8846
8846
  onClose() {
8847
- this.application.trigger && this.application.trigger.toggleActive();
8847
+ this.application.trigger ? this.application.trigger.toggleActive() : (this.notify("widget-minimize", {
8848
+ widgetId: this.application.id
8849
+ }), this.application.storage.set("open", !1));
8850
+ }
8851
+ notify(e, t = {}) {
8852
+ window != null && window.parent && window.parent.postMessage(
8853
+ {
8854
+ type: e,
8855
+ data: t
8856
+ },
8857
+ "*"
8858
+ );
8848
8859
  }
8849
8860
  render() {
8850
8861
  const e = this.application.texts;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@telia-ace/ace-chat-flamingo",
3
- "version": "1.1.126-rc.1",
3
+ "version": "1.1.126-rc.2",
4
4
  "dependencies": {
5
- "@telia-ace/widget-core-flamingo": "1.1.126-rc.1",
6
- "@telia-ace/widget-conversation-flamingo": "1.1.126-rc.1",
5
+ "@telia-ace/widget-core-flamingo": "1.1.126-rc.2",
6
+ "@telia-ace/widget-conversation-flamingo": "1.1.126-rc.2",
7
7
  "rxjs": "^7.8.2",
8
8
  "lit": "^3.0.2",
9
9
  "@teliads/icons": "^8.4.0",
@@ -2,6 +2,7 @@ import { LitElement, CSSResultGroup, TemplateResult } from 'lit';
2
2
  export declare class ChatUnavailableCard extends LitElement {
3
3
  static readonly styles: CSSResultGroup;
4
4
  private readonly application;
5
- onClose(): void;
5
+ private onClose;
6
+ private notify;
6
7
  render(): TemplateResult;
7
8
  }