@telia-ace/widget-components-widget-header-flamingo 1.1.76-rc.14 → 1.1.76-rc.16
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-
|
|
1
|
+
"use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-58c7f737.js")))};module.exports=r;
|
package/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-components-widget-header-flamingo",
|
|
3
|
-
"version": "1.1.76-rc.
|
|
3
|
+
"version": "1.1.76-rc.16",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"lit": "^3.0.2",
|
|
6
|
-
"@telia-ace/widget-core-flamingo": "1.1.76-rc.
|
|
6
|
+
"@telia-ace/widget-core-flamingo": "1.1.76-rc.16",
|
|
7
7
|
"@teliads/components": "^22.1.1",
|
|
8
8
|
"@teliads/icons": "^8.4.0",
|
|
9
9
|
"@lit-labs/motion": "^1.0.6",
|
|
@@ -2661,7 +2661,7 @@ class ne extends S {
|
|
|
2661
2661
|
render() {
|
|
2662
2662
|
var s, n;
|
|
2663
2663
|
const t = this.application.settings.components.conversation;
|
|
2664
|
-
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 === se.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")), b`<div class="widget-container" ${_t(this.wrapperRef)}>
|
|
2664
|
+
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 === se.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."), b`<div class="widget-container" ${_t(this.wrapperRef)}>
|
|
2665
2665
|
${vn(this.nodes, (r) => r)}
|
|
2666
2666
|
</div>`;
|
|
2667
2667
|
}
|
|
@@ -2711,6 +2711,14 @@ ne.styles = j`
|
|
|
2711
2711
|
position: fixed;
|
|
2712
2712
|
}
|
|
2713
2713
|
|
|
2714
|
+
:host(.embedded) {
|
|
2715
|
+
padding: 40px !important;
|
|
2716
|
+
}
|
|
2717
|
+
|
|
2718
|
+
:host(.embedded) .widget-container {
|
|
2719
|
+
padding: 0.7em !important;
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2714
2722
|
@media screen and (max-width: 800px) {
|
|
2715
2723
|
:host(.floating) {
|
|
2716
2724
|
inset: 0;
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
* @license
|
|
285
285
|
* Copyright 2017 Google LLC
|
|
286
286
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
287
|
-
*/function _n({context:i}){return(t,e)=>{const s=new WeakMap;if(typeof e=="object")return e.addInitializer(function(){s.set(this,new Re(this,{context:i}))}),{get(){return t.get.call(this)},set(n){var r;return(r=s.get(this))==null||r.setValue(n),t.set.call(this,n)},init(n){var r;return(r=s.get(this))==null||r.setValue(n),n}};{t.constructor.addInitializer(o=>{s.set(o,new Re(o,{context:i}))});const n=Object.getOwnPropertyDescriptor(t,e);let r;if(n===void 0){const o=new WeakMap;r={get:function(){return o.get(this)},set:function(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=n.set;r={...n,set:function(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,r)}}}var wn=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,Sn=(i,t,e,s)=>{for(var n=s>1?void 0:s?xn(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=(s?o(t,e,n):o(n))||n);return s&&n&&wn(t,e,n),n};const An="application";class re extends S{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=bt()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&Ci(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===ne.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")),b`<div class="widget-container" ${_t(this.wrapperRef)}>
|
|
287
|
+
*/function _n({context:i}){return(t,e)=>{const s=new WeakMap;if(typeof e=="object")return e.addInitializer(function(){s.set(this,new Re(this,{context:i}))}),{get(){return t.get.call(this)},set(n){var r;return(r=s.get(this))==null||r.setValue(n),t.set.call(this,n)},init(n){var r;return(r=s.get(this))==null||r.setValue(n),n}};{t.constructor.addInitializer(o=>{s.set(o,new Re(o,{context:i}))});const n=Object.getOwnPropertyDescriptor(t,e);let r;if(n===void 0){const o=new WeakMap;r={get:function(){return o.get(this)},set:function(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=n.set;r={...n,set:function(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,r)}}}var wn=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,Sn=(i,t,e,s)=>{for(var n=s>1?void 0:s?xn(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=(s?o(t,e,n):o(n))||n);return s&&n&&wn(t,e,n),n};const An="application";class re extends S{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=bt()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&Ci(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===ne.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."),b`<div class="widget-container" ${_t(this.wrapperRef)}>
|
|
288
288
|
${vn(this.nodes,r=>r)}
|
|
289
289
|
</div>`}}re.styles=j`
|
|
290
290
|
:host {
|
|
@@ -331,6 +331,14 @@
|
|
|
331
331
|
position: fixed;
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
+
:host(.embedded) {
|
|
335
|
+
padding: 40px !important;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
:host(.embedded) .widget-container {
|
|
339
|
+
padding: 0.7em !important;
|
|
340
|
+
}
|
|
341
|
+
|
|
334
342
|
@media screen and (max-width: 800px) {
|
|
335
343
|
:host(.floating) {
|
|
336
344
|
inset: 0;
|