@telia-ace/widget-conversation-flamingo 1.1.76-rc.15 → 1.1.76-rc.16
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +9 -1
- package/index.mjs +9 -1
- 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 Aa({context:s}){return(e,t)=>{const n=new WeakMap;if(typeof t=="object")return t.addInitializer(function(){n.set(this,new as(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 as(o,{context:s}))});const i=Object.getOwnPropertyDescriptor(e,t);let r;if(i===void 0){const o=new WeakMap;r={get:function(){return o.get(this)},set:function(a){n.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=i.set;r={...i,set:function(a){n.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(e,t,r)}}}var Ea=Object.defineProperty,Ta=Object.getOwnPropertyDescriptor,La=(s,e,t,n)=>{for(var i=n>1?void 0:n?Ta(e,t):e,r=s.length-1,o;r>=0;r--)(o=s[r])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Ea(e,t,i),i};const Oa="application";class hn 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&&ui(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===cn.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")),m`<div class="widget-container" ${z(this.wrapperRef)}>
|
287
|
+
*/function Aa({context:s}){return(e,t)=>{const n=new WeakMap;if(typeof t=="object")return t.addInitializer(function(){n.set(this,new as(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 as(o,{context:s}))});const i=Object.getOwnPropertyDescriptor(e,t);let r;if(i===void 0){const o=new WeakMap;r={get:function(){return o.get(this)},set:function(a){n.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=i.set;r={...i,set:function(a){n.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(e,t,r)}}}var Ea=Object.defineProperty,Ta=Object.getOwnPropertyDescriptor,La=(s,e,t,n)=>{for(var i=n>1?void 0:n?Ta(e,t):e,r=s.length-1,o;r>=0;r--)(o=s[r])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Ea(e,t,i),i};const Oa="application";class hn 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&&ui(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===cn.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."),m`<div class="widget-container" ${z(this.wrapperRef)}>
|
288
288
|
${ka(this.nodes,r=>r)}
|
289
289
|
</div>`}}hn.styles=E`
|
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;
|
package/index.mjs
CHANGED
@@ -3728,7 +3728,7 @@ class cn extends k {
|
|
3728
3728
|
render() {
|
3729
3729
|
var n, i;
|
3730
3730
|
const e = this.application.settings.components.conversation;
|
3731
|
-
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 === ln.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")), m`<div class="widget-container" ${z(this.wrapperRef)}>
|
3731
|
+
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 === ln.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."), m`<div class="widget-container" ${z(this.wrapperRef)}>
|
3732
3732
|
${$a(this.nodes, (r) => r)}
|
3733
3733
|
</div>`;
|
3734
3734
|
}
|
@@ -3778,6 +3778,14 @@ cn.styles = E`
|
|
3778
3778
|
position: fixed;
|
3779
3779
|
}
|
3780
3780
|
|
3781
|
+
:host(.embedded) {
|
3782
|
+
padding: 40px !important;
|
3783
|
+
}
|
3784
|
+
|
3785
|
+
:host(.embedded) .widget-container {
|
3786
|
+
padding: 0.7em !important;
|
3787
|
+
}
|
3788
|
+
|
3781
3789
|
@media screen and (max-width: 800px) {
|
3782
3790
|
:host(.floating) {
|
3783
3791
|
inset: 0;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@telia-ace/widget-conversation-flamingo",
|
3
|
-
"version": "1.1.76-rc.
|
3
|
+
"version": "1.1.76-rc.16",
|
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.76-rc.
|
12
|
+
"@telia-ace/widget-core-flamingo": "1.1.76-rc.16",
|
13
13
|
"lit-html": "^3.0.2",
|
14
14
|
"rxjs": "^7.8.1",
|
15
15
|
"marked": "^12.0.2"
|