@telia-ace/widget-conversation-flamingo 1.1.82-rc.3 → 1.1.82-rc.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/index.js +13 -1
  2. package/index.mjs +13 -1
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -284,7 +284,7 @@
284
284
  * @license
285
285
  * Copyright 2017 Google LLC
286
286
  * SPDX-License-Identifier: BSD-3-Clause
287
- */function Ha({context:s}){return(e,t)=>{const n=new WeakMap;if(typeof t=="object")return t.addInitializer(function(){n.set(this,new ks(this,{context:s}))}),{get(){return e.get.call(this)},set(i){var r;return(r=n.get(this))==null||r.setValue(i),e.set.call(this,i)},init(i){var r;return(r=n.get(this))==null||r.setValue(i),i}};{e.constructor.addInitializer(o=>{n.set(o,new ks(o,{context:s}))});const i=Object.getOwnPropertyDescriptor(e,t);let r;if(i===void 0){const o=new WeakMap;r={get(){return o.get(this)},set(a){n.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=i.set;r={...i,set(a){n.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(e,t,r)}}}var Na=Object.defineProperty,Da=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,o;r>=0;r--)(o=s[r])&&(i=o(e,t,i)||i);return i&&Na(e,t,i),i};const Fa="application",An=class An extends k{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=M()}addChild(e){e.parent=this,this.nodes.push(e)}applyBranding(){if(!this.wrapperRef.value)return;const e=this.application.settings;e!=null&&e.branding&&Li(e.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const e=this.application.styles(),t=this.wrapperRef.value;Object.entries(e).forEach(([n,i])=>{t.style.setProperty(`--${n}`,i)})}firstUpdated(e){this.applyBranding(),this.applyStyles()}render(){var n,i;const e=this.application.settings.components.conversation;return((i=(n=e==null?void 0:e.properties)==null?void 0:n.chat)==null?void 0:i.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===Oe.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")),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),v`<div class="widget-container" ${z(this.wrapperRef)}>
287
+ */function Ha({context:s}){return(e,t)=>{const n=new WeakMap;if(typeof t=="object")return t.addInitializer(function(){n.set(this,new ks(this,{context:s}))}),{get(){return e.get.call(this)},set(i){var r;return(r=n.get(this))==null||r.setValue(i),e.set.call(this,i)},init(i){var r;return(r=n.get(this))==null||r.setValue(i),i}};{e.constructor.addInitializer(o=>{n.set(o,new ks(o,{context:s}))});const i=Object.getOwnPropertyDescriptor(e,t);let r;if(i===void 0){const o=new WeakMap;r={get(){return o.get(this)},set(a){n.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=i.set;r={...i,set(a){n.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(e,t,r)}}}var Na=Object.defineProperty,Da=(s,e,t,n)=>{for(var i=void 0,r=s.length-1,o;r>=0;r--)(o=s[r])&&(i=o(e,t,i)||i);return i&&Na(e,t,i),i};const Fa="application",An=class An extends k{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=M()}addChild(e){e.parent=this,this.nodes.push(e)}applyBranding(){if(!this.wrapperRef.value)return;const e=this.application.settings;e!=null&&e.branding&&Li(e.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const e=this.application.styles(),t=this.wrapperRef.value;Object.entries(e).forEach(([n,i])=>{t.style.setProperty(`--${n}`,i)})}firstUpdated(e){this.applyBranding(),this.applyStyles()}render(){var n,i;const e=this.application.settings.components.conversation;return((i=(n=e==null?void 0:e.properties)==null?void 0:n.chat)==null?void 0:i.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===Oe.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.mobile&&this.renderRoot.host.classList.add("mobile"),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),v`<div class="widget-container" ${z(this.wrapperRef)}>
288
288
  ${za(this.nodes,r=>r)}
289
289
  </div>`}};An.styles=E`
290
290
  :host {
@@ -331,6 +331,18 @@
331
331
  position: fixed;
332
332
  }
333
333
 
334
+ :host(.mobile.floating) {
335
+ inset: 0 !important;
336
+ height: 100% !important;
337
+ width: auto !important;
338
+ max-height: none !important;
339
+ }
340
+
341
+ :host(.mobile.floating) .widget-container {
342
+ box-shadow: none !important;
343
+ border-radius: 0 !important;
344
+ }
345
+
334
346
  @media screen and (max-width: 800px) {
335
347
  :host(.floating) {
336
348
  inset: 0;
package/index.mjs CHANGED
@@ -3645,7 +3645,7 @@ const Ha = "application", Cn = class Cn extends k {
3645
3645
  render() {
3646
3646
  var n, i;
3647
3647
  const e = this.application.settings.components.conversation;
3648
- return ((i = (n = e == null ? void 0 : e.properties) == null ? void 0 : n.chat) == null ? void 0 : i.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === Oe.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")), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), v`<div class="widget-container" ${z(this.wrapperRef)}>
3648
+ return ((i = (n = e == null ? void 0 : e.properties) == null ? void 0 : n.chat) == null ? void 0 : i.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === Oe.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.mobile && this.renderRoot.host.classList.add("mobile"), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), v`<div class="widget-container" ${z(this.wrapperRef)}>
3649
3649
  ${Pa(this.nodes, (r) => r)}
3650
3650
  </div>`;
3651
3651
  }
@@ -3695,6 +3695,18 @@ Cn.styles = E`
3695
3695
  position: fixed;
3696
3696
  }
3697
3697
 
3698
+ :host(.mobile.floating) {
3699
+ inset: 0 !important;
3700
+ height: 100% !important;
3701
+ width: auto !important;
3702
+ max-height: none !important;
3703
+ }
3704
+
3705
+ :host(.mobile.floating) .widget-container {
3706
+ box-shadow: none !important;
3707
+ border-radius: 0 !important;
3708
+ }
3709
+
3698
3710
  @media screen and (max-width: 800px) {
3699
3711
  :host(.floating) {
3700
3712
  inset: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-conversation-flamingo",
3
- "version": "1.1.82-rc.3",
3
+ "version": "1.1.82-rc.5",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -9,7 +9,7 @@
9
9
  "@lit-labs/motion": "^1.0.4",
10
10
  "@teliads/icons": "^8.4.0",
11
11
  "@teliads/components": "^22.1.1",
12
- "@telia-ace/widget-core-flamingo": "1.1.82-rc.3",
12
+ "@telia-ace/widget-core-flamingo": "1.1.82-rc.5",
13
13
  "lit-html": "^3.0.2",
14
14
  "rxjs": "^7.8.1",
15
15
  "marked": "^12.0.2"