@telia-ace/widget-components-area-flamingo 1.1.123-rc.9 → 1.1.123
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/{area-Muu1scep.js → area-NHtQ70qY.js} +7 -7
- package/{area-DNwNulDn.mjs → area-w530fuPt.mjs} +8 -9
- package/area.d.ts +3 -3
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +2 -2
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
svg=${l.svg}
|
|
72
72
|
size="lg"
|
|
73
73
|
></telia-icon>`:d}default:return d}}hideTrigger(){this.triggerVisible=!1}showTrigger(){this.triggerVisible=!0}render(){var t,e,i,r,o,n,a;return C`<div
|
|
74
|
-
class=${te({"trigger-container":!0,hidden:!this.triggerVisible})}
|
|
74
|
+
class=${te({"trigger-container":!0,"ace-hidden":!this.triggerVisible})}
|
|
75
75
|
${$e(this.containerRef)}
|
|
76
76
|
>
|
|
77
77
|
${!this.active&&((r=(i=(e=(t=this.application)==null?void 0:t.settings)==null?void 0:e.branding)==null?void 0:i.other)!=null&&r.showButtonLabel)?C`
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
gap: 1rem;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
.trigger-container.hidden {
|
|
144
|
+
.trigger-container.ace-hidden {
|
|
145
145
|
display: none;
|
|
146
146
|
}
|
|
147
147
|
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
* @license
|
|
287
287
|
* Copyright 2017 Google LLC
|
|
288
288
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
289
|
-
*/function _i({context:s}){return(t,e)=>{const i=new WeakMap;if(typeof e=="object")return{get(){return t.get.call(this)},set(r){return i.get(this).setValue(r),t.set.call(this,r)},init(r){return i.set(this,new ee(this,{context:s,initialValue:r})),r}};{t.constructor.addInitializer((n=>{i.set(n,new ee(n,{context:s}))}));const r=Object.getOwnPropertyDescriptor(t,e);let o;if(r===void 0){const n=new WeakMap;o={get(){return n.get(this)},set(a){i.get(this).setValue(a),n.set(this,a)},configurable:!0,enumerable:!0}}else{const n=r.set;o={...r,set(a){i.get(this).setValue(a),n==null||n.call(this,a)}}}return void Object.defineProperty(t,e,o)}}}var wi=Object.defineProperty,we=(s,t,e,i)=>{for(var r=void 0,o=s.length-1,n;o>=0;o--)(n=s[o])&&(r=n(t,e,r)||r);return r&&wi(t,e,r),r};const xi="application",kt=class kt extends m{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=be(),this.fullscreen=!1,this.isReady=new fe(!1)}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&ye(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;
|
|
289
|
+
*/function _i({context:s}){return(t,e)=>{const i=new WeakMap;if(typeof e=="object")return{get(){return t.get.call(this)},set(r){return i.get(this).setValue(r),t.set.call(this,r)},init(r){return i.set(this,new ee(this,{context:s,initialValue:r})),r}};{t.constructor.addInitializer((n=>{i.set(n,new ee(n,{context:s}))}));const r=Object.getOwnPropertyDescriptor(t,e);let o;if(r===void 0){const n=new WeakMap;o={get(){return n.get(this)},set(a){i.get(this).setValue(a),n.set(this,a)},configurable:!0,enumerable:!0}}else{const n=r.set;o={...r,set(a){i.get(this).setValue(a),n==null||n.call(this,a)}}}return void Object.defineProperty(t,e,o)}}}var wi=Object.defineProperty,we=(s,t,e,i)=>{for(var r=void 0,o=s.length-1,n;o>=0;o--)(n=s[o])&&(r=n(t,e,r)||r);return r&&wi(t,e,r),r};const xi="application",kt=class kt extends m{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=be(),this.fullscreen=!1,this.isReady=new fe(!1)}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&ye(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 e,i,r;return((r=(i=(e=this.application.settings)==null?void 0:e.agentConfig)==null?void 0:i.live)==null?void 0:r.isThirdPartyWidget)??!1?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===Ct.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.fullscreen&&this.renderRoot.host.classList.add("fullscreen"),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),C`<div class="widget-container" ${$e(this.wrapperRef)}>
|
|
290
290
|
${he(this.nodes,o=>o)}
|
|
291
291
|
</div>`}};kt.styles=k`
|
|
292
292
|
:host {
|
|
@@ -438,19 +438,19 @@
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
-
:host(.expanded) {
|
|
441
|
+
:host(.ace-expanded) {
|
|
442
442
|
opacity: 1;
|
|
443
443
|
animation: slideUp 0.3s linear;
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
:host(.hidden) {
|
|
446
|
+
:host(.ace-hidden) {
|
|
447
447
|
opacity: 0;
|
|
448
448
|
animation: slideDown 0.3s linear;
|
|
449
449
|
pointer-events: none;
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
-
:host(.hidden.embedded),
|
|
453
|
-
:host(.expanded.embedded) {
|
|
452
|
+
:host(.ace-hidden.embedded),
|
|
453
|
+
:host(.ace-expanded.embedded) {
|
|
454
454
|
animation: none;
|
|
455
455
|
}
|
|
456
456
|
`;let D=kt;we([g({attribute:!0})],D.prototype,"fullscreen");we([g({attribute:!1}),_i({context:xi})],D.prototype,"application");var Ai=Object.defineProperty,Et=(s,t,e,i)=>{for(var r=void 0,o=s.length-1,n;o>=0;o--)(n=s[o])&&(r=n(t,e,r)||r);return r&&Ai(t,e,r),r};const Tt=class Tt extends m{constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(t){this.widget=t.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const t=globalThis.widgets;t&&(this.widget=t.applications.find(e=>e.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return d;if(this.widget.renderStrategy===Ct.Trigger){const t=new $;return t.application=this.widget,t}return this.widget.render()}};Tt.styles=[k`
|
|
@@ -1592,7 +1592,7 @@ const St = class St extends m {
|
|
|
1592
1592
|
return C`<div
|
|
1593
1593
|
class=${Qt({
|
|
1594
1594
|
"trigger-container": !0,
|
|
1595
|
-
hidden: !this.triggerVisible
|
|
1595
|
+
"ace-hidden": !this.triggerVisible
|
|
1596
1596
|
})}
|
|
1597
1597
|
${$e(this.containerRef)}
|
|
1598
1598
|
>
|
|
@@ -1676,7 +1676,7 @@ St.styles = [
|
|
|
1676
1676
|
gap: 1rem;
|
|
1677
1677
|
}
|
|
1678
1678
|
|
|
1679
|
-
.trigger-container.hidden {
|
|
1679
|
+
.trigger-container.ace-hidden {
|
|
1680
1680
|
display: none;
|
|
1681
1681
|
}
|
|
1682
1682
|
|
|
@@ -2025,9 +2025,8 @@ const xi = "application", Ot = class Ot extends m {
|
|
|
2025
2025
|
this.applyBranding(), this.applyStyles();
|
|
2026
2026
|
}
|
|
2027
2027
|
render() {
|
|
2028
|
-
var i, r;
|
|
2029
|
-
|
|
2030
|
-
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 === At.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.fullscreen && this.renderRoot.host.classList.add("fullscreen"), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), C`<div class="widget-container" ${$e(this.wrapperRef)}>
|
|
2028
|
+
var e, i, r;
|
|
2029
|
+
return ((r = (i = (e = this.application.settings) == null ? void 0 : e.agentConfig) == null ? void 0 : i.live) == null ? void 0 : r.isThirdPartyWidget) ?? !1 ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === At.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.fullscreen && this.renderRoot.host.classList.add("fullscreen"), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), C`<div class="widget-container" ${$e(this.wrapperRef)}>
|
|
2031
2030
|
${he(this.nodes, (o) => o)}
|
|
2032
2031
|
</div>`;
|
|
2033
2032
|
}
|
|
@@ -2182,19 +2181,19 @@ Ot.styles = k`
|
|
|
2182
2181
|
}
|
|
2183
2182
|
}
|
|
2184
2183
|
|
|
2185
|
-
:host(.expanded) {
|
|
2184
|
+
:host(.ace-expanded) {
|
|
2186
2185
|
opacity: 1;
|
|
2187
2186
|
animation: slideUp 0.3s linear;
|
|
2188
2187
|
}
|
|
2189
2188
|
|
|
2190
|
-
:host(.hidden) {
|
|
2189
|
+
:host(.ace-hidden) {
|
|
2191
2190
|
opacity: 0;
|
|
2192
2191
|
animation: slideDown 0.3s linear;
|
|
2193
2192
|
pointer-events: none;
|
|
2194
2193
|
}
|
|
2195
2194
|
|
|
2196
|
-
:host(.hidden.embedded),
|
|
2197
|
-
:host(.expanded.embedded) {
|
|
2195
|
+
:host(.ace-hidden.embedded),
|
|
2196
|
+
:host(.ace-expanded.embedded) {
|
|
2198
2197
|
animation: none;
|
|
2199
2198
|
}
|
|
2200
2199
|
`;
|
package/area.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, CSSResultGroup, TemplateResult } from 'lit';
|
|
2
2
|
import { WidgetComponentType } from '../../core/src/index.ts';
|
|
3
3
|
declare const Area_base: (new (...args: any[]) => WidgetComponentType) & typeof LitElement;
|
|
4
4
|
export declare class Area extends Area_base {
|
|
5
5
|
nodes: WidgetComponentType[];
|
|
6
|
-
static styles:
|
|
7
|
-
render():
|
|
6
|
+
static styles: CSSResultGroup;
|
|
7
|
+
render(): TemplateResult;
|
|
8
8
|
}
|
|
9
9
|
export default Area;
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=async e=>{e.registerComponent("area",Promise.resolve().then(()=>require("./area-
|
|
1
|
+
"use strict";const r=async e=>{e.registerComponent("area",Promise.resolve().then(()=>require("./area-NHtQ70qY.js")))};module.exports=r;
|
package/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-components-area-flamingo",
|
|
3
|
-
"version": "1.1.123
|
|
3
|
+
"version": "1.1.123",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@telia-ace/widget-core-flamingo": "1.1.123
|
|
5
|
+
"@telia-ace/widget-core-flamingo": "1.1.123",
|
|
6
6
|
"lit": "^3.0.2"
|
|
7
7
|
},
|
|
8
8
|
"main": "./index.js",
|