@telia-ace/widget-core-flamingo 1.1.76-rc.24 → 1.1.76-rc.25

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 +1 -18
  2. package/index.mjs +1 -18
  3. package/package.json +1 -1
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 Pi({context:s}){return(t,e)=>{const i=new WeakMap;if(typeof e=="object")return e.addInitializer(function(){i.set(this,new Gt(this,{context:s}))}),{get(){return t.get.call(this)},set(r){var n;return(n=i.get(this))==null||n.setValue(r),t.set.call(this,r)},init(r){var n;return(n=i.get(this))==null||n.setValue(r),r}};{t.constructor.addInitializer(o=>{i.set(o,new Gt(o,{context:s}))});const r=Object.getOwnPropertyDescriptor(t,e);let n;if(r===void 0){const o=new WeakMap;n={get:function(){return o.get(this)},set:function(a){i.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=r.set;n={...r,set:function(a){i.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,n)}}}var Oi=Object.defineProperty,Ti=Object.getOwnPropertyDescriptor,Ii=(s,t,e,i)=>{for(var r=i>1?void 0:i?Ti(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&Oi(t,e,r),r};const be="application";class nt extends A{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=me()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&ge(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([i,r])=>{e.style.setProperty(`--${i}`,r)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var i,r;const t=this.application.settings.components.conversation;return((r=(i=t==null?void 0:t.properties)==null?void 0:i.chat)==null?void 0:r.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===$.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?(console.log("This page is embedded in an iframe."),this.renderRoot.host.classList.add("embedded")):console.log("This page is not embedded in an iframe."),R`<div class="widget-container" ${ve(this.wrapperRef)}>
287
+ */function Pi({context:s}){return(t,e)=>{const i=new WeakMap;if(typeof e=="object")return e.addInitializer(function(){i.set(this,new Gt(this,{context:s}))}),{get(){return t.get.call(this)},set(r){var n;return(n=i.get(this))==null||n.setValue(r),t.set.call(this,r)},init(r){var n;return(n=i.get(this))==null||n.setValue(r),r}};{t.constructor.addInitializer(o=>{i.set(o,new Gt(o,{context:s}))});const r=Object.getOwnPropertyDescriptor(t,e);let n;if(r===void 0){const o=new WeakMap;n={get:function(){return o.get(this)},set:function(a){i.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=r.set;n={...r,set:function(a){i.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,n)}}}var Oi=Object.defineProperty,Ti=Object.getOwnPropertyDescriptor,Ii=(s,t,e,i)=>{for(var r=i>1?void 0:i?Ti(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&Oi(t,e,r),r};const be="application";class nt extends A{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=me()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&ge(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([i,r])=>{e.style.setProperty(`--${i}`,r)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var i,r;const t=this.application.settings.components.conversation;return((r=(i=t==null?void 0:t.properties)==null?void 0:i.chat)==null?void 0:r.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===$.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"),R`<div class="widget-container" ${ve(this.wrapperRef)}>
288
288
  ${xi(this.nodes,n=>n)}
289
289
  </div>`}}nt.styles=N`
290
290
  :host {
@@ -331,23 +331,6 @@
331
331
  position: fixed;
332
332
  }
333
333
 
334
- :host(.embedded) {
335
- padding: 40px 20px 20px 40px !important;
336
- }
337
-
338
- @media screen and (max-device-width: 800px) {
339
- :host(.embedded) {
340
- padding: 0 !important;
341
- }
342
- :host(.embedded) .widget-container {
343
- border-radius: none !important;
344
- }
345
- }
346
-
347
- :host(.embedded) .widget-container {
348
- border-radius: var(--border-radius) !important;
349
- }
350
-
351
334
  @media screen and (max-width: 800px) {
352
335
  :host(.floating) {
353
336
  inset: 0;
package/index.mjs CHANGED
@@ -2130,7 +2130,7 @@ class nt extends _ {
2130
2130
  render() {
2131
2131
  var i, r;
2132
2132
  const t = this.application.settings.components.conversation;
2133
- return ((r = (i = t == null ? void 0 : t.properties) == null ? void 0 : i.chat) == null ? void 0 : r.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === w.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 ? (console.log("This page is embedded in an iframe."), this.renderRoot.host.classList.add("embedded")) : console.log("This page is not embedded in an iframe."), R`<div class="widget-container" ${ve(this.wrapperRef)}>
2133
+ return ((r = (i = t == null ? void 0 : t.properties) == null ? void 0 : i.chat) == null ? void 0 : r.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === w.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"), R`<div class="widget-container" ${ve(this.wrapperRef)}>
2134
2134
  ${bi(this.nodes, (n) => n)}
2135
2135
  </div>`;
2136
2136
  }
@@ -2180,23 +2180,6 @@ nt.styles = N`
2180
2180
  position: fixed;
2181
2181
  }
2182
2182
 
2183
- :host(.embedded) {
2184
- padding: 40px 20px 20px 40px !important;
2185
- }
2186
-
2187
- @media screen and (max-device-width: 800px) {
2188
- :host(.embedded) {
2189
- padding: 0 !important;
2190
- }
2191
- :host(.embedded) .widget-container {
2192
- border-radius: none !important;
2193
- }
2194
- }
2195
-
2196
- :host(.embedded) .widget-container {
2197
- border-radius: var(--border-radius) !important;
2198
- }
2199
-
2200
2183
  @media screen and (max-width: 800px) {
2201
2184
  :host(.floating) {
2202
2185
  inset: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-core-flamingo",
3
- "version": "1.1.76-rc.24",
3
+ "version": "1.1.76-rc.25",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
6
  "@teliads/icons": "^8.4.0",