@telia-ace/widget-conversation-flamingo 1.1.72-rc.24 → 1.1.72-rc.26
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +19 -7
- package/index.mjs +19 -7
- package/package.json +2 -2
package/index.js
CHANGED
@@ -62,7 +62,7 @@
|
|
62
62
|
bottom: 20px;
|
63
63
|
left: 20px;
|
64
64
|
}
|
65
|
-
`];pa([w({attribute:!0})],ln.prototype,"anchor",2);const da=new WeakMap;let es=0;const Et=new Map,ts=new WeakSet,ns=()=>new Promise(s=>requestAnimationFrame(s)),fa=[{transform:"translateX(100%) scale(0)",opacity:0}],ga=[{opacity:0}],ss=[{opacity:0},{opacity:1}],is=(s,e)=>{const t=s-e;return t===0?void 0:t},rs=(s,e)=>{const t=s/e;return t===1?void 0:t},Tt={left:(s,e)=>{const t=is(s,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateX(${t}px)`}},top:(s,e)=>{const t=is(s,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateY(${t}px)`}},width:(s,e)=>{let t;e===0&&(e=1,t={width:"1px"});const n=rs(s,e);return{value:n,overrideFrom:t,transform:n==null||isNaN(n)?void 0:`scaleX(${n})`}},height:(s,e)=>{let t;e===0&&(e=1,t={height:"1px"});const n=rs(s,e);return{value:n,overrideFrom:t,transform:n==null||isNaN(n)?void 0:`scaleY(${n})`}}},ma={duration:333,easing:"ease-in-out"},va=["left","top","width","height","opacity","color","background"],os=new WeakMap;class ba extends hi{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===ft.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var e;(e=this.resolveFinished)==null||e.call(this),this.finished=new Promise(t=>{this.l=t})}async resolveFinished(){var e;(e=this.l)==null||e.call(this),this.l=void 0}render(e){return g}getController(){return da.get(this.u)}isDisabled(){var e;return this.options.disabled||((e=this.getController())==null?void 0:e.disabled)}update(e,[t]){var i;const n=this.u===void 0;return n&&(this.u=(i=e.options)==null?void 0:i.host,this.u.addController(this),this.u.updateComplete.then(r=>this.t=!0),this.element=e.element,os.set(this.element,this)),this.optionsOrCallback=t,(n||typeof t!="function")&&this.p(t),this.render(t)}p(e){e=e??{};const t=this.getController();t!==void 0&&((e={...t.defaultOptions,...e}).keyframeOptions={...t.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??(e.properties=va),this.options=e}m(){const e={},t=this.element.getBoundingClientRect(),n=getComputedStyle(this.element);return this.options.properties.forEach(i=>{const r=t[i]??(Tt[i]?void 0:n[i]),o=Number(r);e[i]=isNaN(o)?r+"":o}),e}v(){let e,t=!0;return this.options.guard&&(e=this.options.guard(),t=((n,i)=>{if(Array.isArray(n)){if(Array.isArray(i)&&i.length===n.length&&n.every((r,o)=>r===i[o]))return!1}else if(i===n)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&t&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await ns;const t=this.O(),n=this.j(this.options.keyframeOptions,t),i=this.m();if(this.A!==void 0){const{from:r,to:o}=this.N(this.A,i,t);this.log("measured",[this.A,i,r,o]),e=this.calculateKeyframes(r,o)}else{const r=Et.get(this.options.inId);if(r){Et.delete(this.options.inId);const{from:o,to:a}=this.N(r,i,t);e=this.calculateKeyframes(o,a),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,es++,e.forEach(l=>l.zIndex=es)}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,n)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var e,t;this.P=this.element.getAttribute("style"),(e=this.webAnimation)==null||e.commitStyles(),(t=this.webAnimation)==null||t.cancel()}reconnected(){}async disconnected(){var t;if(!this.h||(this.options.id!==void 0&&Et.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await ns(),(t=this.i)==null?void 0:t.isConnected){const n=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,n),this.options.stabilizeOut){const i=this.m();this.log("stabilizing out");const r=this.A.left-i.left,o=this.A.top-i.top;getComputedStyle(this.element).position!=="static"||r===0&&o===0||(this.element.style.position="relative"),r!==0&&(this.element.style.left=r+"px"),o!==0&&(this.element.style.top=o+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var e,t;(t=(e=this.options).onStart)==null||t.call(e,this)}didFinish(e){var t,n;e&&((n=(t=this.options).onComplete)==null||n.call(t,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let t=this.element.parentNode;t;t=t==null?void 0:t.parentNode){const n=os.get(t);n&&!n.isDisabled()&&n&&e.push(n)}return e}get isHostRendered(){const e=ts.has(this.u);return e||this.u.updateComplete.then(()=>{ts.add(this.u)}),e}j(e,t=this.O()){const n={...ma};return t.forEach(i=>Object.assign(n,i.options.keyframeOptions)),Object.assign(n,e),n}N(e,t,n){e={...e},t={...t};const i=n.map(a=>a.animatingProperties).filter(a=>a!==void 0);let r=1,o=1;return i.length>0&&(i.forEach(a=>{a.width&&(r/=a.width),a.height&&(o/=a.height)}),e.left!==void 0&&t.left!==void 0&&(e.left=r*e.left,t.left=r*t.left),e.top!==void 0&&t.top!==void 0&&(e.top=o*e.top,t.top=o*t.top)),{from:e,to:t}}calculateKeyframes(e,t,n=!1){const i={},r={};let o=!1;const a={};for(const l in t){const c=e[l],h=t[l];if(l in Tt){const u=Tt[l];if(c===void 0||h===void 0)continue;const p=u(c,h);p.transform!==void 0&&(a[l]=p.value,o=!0,i.transform=`${i.transform??""} ${p.transform}`,p.overrideFrom!==void 0&&Object.assign(i,p.overrideFrom))}else c!==h&&c!==void 0&&h!==void 0&&(o=!0,i[l]=c,r[l]=h)}return i.transformOrigin=r.transformOrigin=n?"center center":"top left",this.animatingProperties=a,o?[i,r]:void 0}async animate(e,t=this.options.keyframeOptions){this.start(),this.frames=e;let n=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,t]),n=!0,this.webAnimation=this.element.animate(e,t);const i=this.getController();i==null||i.add(this);try{await this.webAnimation.finished}catch{}i==null||i.remove(this)}return this.didFinish(n),n}isAnimating(){var e,t;return((e=this.webAnimation)==null?void 0:e.playState)==="running"||((t=this.webAnimation)==null?void 0:t.pending)}log(e,t){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,t)}}const Nt=gt(ba),F=(s,e,t)=>{s&&t.style.setProperty(e,s)},ui=(s,e)=>{var t,n,i,r,o,a,l,c,h;F((t=s.colors)==null?void 0:t.primaryBackground,"--primary-background",e),F((n=s.colors)==null?void 0:n.textOnPrimaryBackground,"--text-on-primary-background",e),F((i=s.colors)==null?void 0:i.secondaryBackground,"--secondary-background",e),F((r=s.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",e),F((o=s.colors)==null?void 0:o.interactiveDestructiveBackground,"--destructive-color",e),F((a=s.colors)==null?void 0:a.interactiveTextOnDestructiveBackground,"--text-on-destructive-color",e),F((l=s.colors)==null?void 0:l.interactivePrimaryBackground,"--interactive-primary-background",e),F((c=s.colors)==null?void 0:c.interactiveTextOnPrimaryBackground,"--interactive-text-on-primary-background",e),F((h=s.colors)==null?void 0:h.focusColor,"--focus-color",e)};var ya=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,Ue=(s,e,t,n)=>{for(var i=n>1?void 0:n?$a(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&&ya(e,t,i),i};class X extends k{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=M(),this.widgetActive$=new U(!1),this.componentIsDestroyed$=new _}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}toggleActive(){var e;if(!((e=this.application)!=null&&e.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?(this.application.appendToDOM(),this.widgetActive$.next(!0)):(this.application.hide(),this.widgetActive$.next(!1))}_applyBranding(){var e;(e=this.application)!=null&&e.settings&&ui(this.application.settings.branding,this)}async _renderSymbol(){var a,l,c;const e=(a=this.application)==null?void 0:a.branding(),t=(l=e==null?void 0:e.graphics)==null?void 0:l.trigger;if(t)return m` <img src=${t} class="trigger-icon" alt="" /> `;const n=(c=this.application)==null?void 0:c.triggerIcon;if(!n)return g;const i=async h=>no,{type:r,content:o}=n;switch(r){case"Telia":{const h=await i();return h?m`<telia-icon
|
65
|
+
`];pa([w({attribute:!0})],ln.prototype,"anchor",2);const da=new WeakMap;let es=0;const Et=new Map,ts=new WeakSet,ns=()=>new Promise(s=>requestAnimationFrame(s)),fa=[{transform:"translateX(100%) scale(0)",opacity:0}],ga=[{opacity:0}],ss=[{opacity:0},{opacity:1}],is=(s,e)=>{const t=s-e;return t===0?void 0:t},rs=(s,e)=>{const t=s/e;return t===1?void 0:t},Tt={left:(s,e)=>{const t=is(s,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateX(${t}px)`}},top:(s,e)=>{const t=is(s,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateY(${t}px)`}},width:(s,e)=>{let t;e===0&&(e=1,t={width:"1px"});const n=rs(s,e);return{value:n,overrideFrom:t,transform:n==null||isNaN(n)?void 0:`scaleX(${n})`}},height:(s,e)=>{let t;e===0&&(e=1,t={height:"1px"});const n=rs(s,e);return{value:n,overrideFrom:t,transform:n==null||isNaN(n)?void 0:`scaleY(${n})`}}},ma={duration:333,easing:"ease-in-out"},va=["left","top","width","height","opacity","color","background"],os=new WeakMap;class ba extends hi{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===ft.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var e;(e=this.resolveFinished)==null||e.call(this),this.finished=new Promise(t=>{this.l=t})}async resolveFinished(){var e;(e=this.l)==null||e.call(this),this.l=void 0}render(e){return g}getController(){return da.get(this.u)}isDisabled(){var e;return this.options.disabled||((e=this.getController())==null?void 0:e.disabled)}update(e,[t]){var i;const n=this.u===void 0;return n&&(this.u=(i=e.options)==null?void 0:i.host,this.u.addController(this),this.u.updateComplete.then(r=>this.t=!0),this.element=e.element,os.set(this.element,this)),this.optionsOrCallback=t,(n||typeof t!="function")&&this.p(t),this.render(t)}p(e){e=e??{};const t=this.getController();t!==void 0&&((e={...t.defaultOptions,...e}).keyframeOptions={...t.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??(e.properties=va),this.options=e}m(){const e={},t=this.element.getBoundingClientRect(),n=getComputedStyle(this.element);return this.options.properties.forEach(i=>{const r=t[i]??(Tt[i]?void 0:n[i]),o=Number(r);e[i]=isNaN(o)?r+"":o}),e}v(){let e,t=!0;return this.options.guard&&(e=this.options.guard(),t=((n,i)=>{if(Array.isArray(n)){if(Array.isArray(i)&&i.length===n.length&&n.every((r,o)=>r===i[o]))return!1}else if(i===n)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&t&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await ns;const t=this.O(),n=this.j(this.options.keyframeOptions,t),i=this.m();if(this.A!==void 0){const{from:r,to:o}=this.N(this.A,i,t);this.log("measured",[this.A,i,r,o]),e=this.calculateKeyframes(r,o)}else{const r=Et.get(this.options.inId);if(r){Et.delete(this.options.inId);const{from:o,to:a}=this.N(r,i,t);e=this.calculateKeyframes(o,a),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,es++,e.forEach(l=>l.zIndex=es)}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,n)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var e,t;this.P=this.element.getAttribute("style"),(e=this.webAnimation)==null||e.commitStyles(),(t=this.webAnimation)==null||t.cancel()}reconnected(){}async disconnected(){var t;if(!this.h||(this.options.id!==void 0&&Et.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await ns(),(t=this.i)==null?void 0:t.isConnected){const n=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,n),this.options.stabilizeOut){const i=this.m();this.log("stabilizing out");const r=this.A.left-i.left,o=this.A.top-i.top;getComputedStyle(this.element).position!=="static"||r===0&&o===0||(this.element.style.position="relative"),r!==0&&(this.element.style.left=r+"px"),o!==0&&(this.element.style.top=o+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var e,t;(t=(e=this.options).onStart)==null||t.call(e,this)}didFinish(e){var t,n;e&&((n=(t=this.options).onComplete)==null||n.call(t,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let t=this.element.parentNode;t;t=t==null?void 0:t.parentNode){const n=os.get(t);n&&!n.isDisabled()&&n&&e.push(n)}return e}get isHostRendered(){const e=ts.has(this.u);return e||this.u.updateComplete.then(()=>{ts.add(this.u)}),e}j(e,t=this.O()){const n={...ma};return t.forEach(i=>Object.assign(n,i.options.keyframeOptions)),Object.assign(n,e),n}N(e,t,n){e={...e},t={...t};const i=n.map(a=>a.animatingProperties).filter(a=>a!==void 0);let r=1,o=1;return i.length>0&&(i.forEach(a=>{a.width&&(r/=a.width),a.height&&(o/=a.height)}),e.left!==void 0&&t.left!==void 0&&(e.left=r*e.left,t.left=r*t.left),e.top!==void 0&&t.top!==void 0&&(e.top=o*e.top,t.top=o*t.top)),{from:e,to:t}}calculateKeyframes(e,t,n=!1){const i={},r={};let o=!1;const a={};for(const l in t){const c=e[l],h=t[l];if(l in Tt){const u=Tt[l];if(c===void 0||h===void 0)continue;const p=u(c,h);p.transform!==void 0&&(a[l]=p.value,o=!0,i.transform=`${i.transform??""} ${p.transform}`,p.overrideFrom!==void 0&&Object.assign(i,p.overrideFrom))}else c!==h&&c!==void 0&&h!==void 0&&(o=!0,i[l]=c,r[l]=h)}return i.transformOrigin=r.transformOrigin=n?"center center":"top left",this.animatingProperties=a,o?[i,r]:void 0}async animate(e,t=this.options.keyframeOptions){this.start(),this.frames=e;let n=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,t]),n=!0,this.webAnimation=this.element.animate(e,t);const i=this.getController();i==null||i.add(this);try{await this.webAnimation.finished}catch{}i==null||i.remove(this)}return this.didFinish(n),n}isAnimating(){var e,t;return((e=this.webAnimation)==null?void 0:e.playState)==="running"||((t=this.webAnimation)==null?void 0:t.pending)}log(e,t){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,t)}}const Nt=gt(ba),F=(s,e,t)=>{s&&t.style.setProperty(e,s)},ui=(s,e)=>{var t,n,i,r,o,a,l,c,h;F((t=s.colors)==null?void 0:t.primaryBackground,"--primary-background",e),F((n=s.colors)==null?void 0:n.textOnPrimaryBackground,"--text-on-primary-background",e),F((i=s.colors)==null?void 0:i.secondaryBackground,"--secondary-background",e),F((r=s.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",e),F((o=s.colors)==null?void 0:o.interactiveDestructiveBackground,"--destructive-color",e),F((a=s.colors)==null?void 0:a.interactiveTextOnDestructiveBackground,"--text-on-destructive-color",e),F((l=s.colors)==null?void 0:l.interactivePrimaryBackground,"--interactive-primary-background",e),F((c=s.colors)==null?void 0:c.interactiveTextOnPrimaryBackground,"--interactive-text-on-primary-background",e),F((h=s.colors)==null?void 0:h.focusColor,"--focus-color",e)};var ya=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,Ue=(s,e,t,n)=>{for(var i=n>1?void 0:n?$a(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&&ya(e,t,i),i};class X extends k{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=M(),this.widgetActive$=new U(!1),this.componentIsDestroyed$=new _}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}toggleActive(){var e;if(!((e=this.application)!=null&&e.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?(this.application.appendToDOM(),this.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.widgetActive$.next(!1),this.showTrigger())}_applyBranding(){var e;(e=this.application)!=null&&e.settings&&ui(this.application.settings.branding,this)}async _renderSymbol(){var a,l,c;const e=(a=this.application)==null?void 0:a.branding(),t=(l=e==null?void 0:e.graphics)==null?void 0:l.trigger;if(t)return m` <img src=${t} class="trigger-icon" alt="" /> `;const n=(c=this.application)==null?void 0:c.triggerIcon;if(!n)return g;const i=async h=>no,{type:r,content:o}=n;switch(r){case"Telia":{const h=await i();return h?m`<telia-icon
|
66
66
|
class="trigger-icon"
|
67
67
|
svg=${h.svg}
|
68
68
|
size="lg"
|
@@ -313,6 +313,7 @@
|
|
313
313
|
|
314
314
|
--header-height: 69px;
|
315
315
|
}
|
316
|
+
|
316
317
|
:host {
|
317
318
|
--voca-rem-multiplier: 0.625;
|
318
319
|
box-sizing: border-box;
|
@@ -329,23 +330,27 @@
|
|
329
330
|
z-index: 6;
|
330
331
|
position: fixed;
|
331
332
|
}
|
333
|
+
|
332
334
|
@media screen and (max-width: 800px) {
|
333
335
|
:host(.floating) {
|
334
|
-
inset: 0
|
336
|
+
inset: 0;
|
335
337
|
height: 100%;
|
336
338
|
}
|
339
|
+
|
337
340
|
:host(.third-party) {
|
338
|
-
inset: 0
|
341
|
+
inset: 0;
|
339
342
|
height: 100vh;
|
340
343
|
}
|
341
344
|
}
|
345
|
+
|
342
346
|
@media screen and (min-width: 801px) {
|
343
347
|
:host(.floating) {
|
344
|
-
inset: auto 20px
|
348
|
+
inset: auto 20px 20px auto;
|
345
349
|
max-height: calc(100vh - 120px);
|
346
350
|
width: 400px;
|
347
|
-
height:
|
351
|
+
height: 775px;
|
348
352
|
}
|
353
|
+
|
349
354
|
:host(.third-party) {
|
350
355
|
max-width: 1000px;
|
351
356
|
height: 100vh;
|
@@ -354,11 +359,13 @@
|
|
354
359
|
transform: translateX(-50%);
|
355
360
|
margin: -10px 0;
|
356
361
|
}
|
362
|
+
|
357
363
|
:host(.floating.bottom-right) {
|
358
|
-
inset: auto 20px
|
364
|
+
inset: auto 20px 20px auto;
|
359
365
|
}
|
366
|
+
|
360
367
|
:host(.floating.bottom-left) {
|
361
|
-
inset: auto auto
|
368
|
+
inset: auto auto 20px 20px;
|
362
369
|
}
|
363
370
|
}
|
364
371
|
|
@@ -374,12 +381,14 @@
|
|
374
381
|
* {
|
375
382
|
box-sizing: border-box;
|
376
383
|
}
|
384
|
+
|
377
385
|
.widget-container {
|
378
386
|
height: 100%;
|
379
387
|
background-color: var(--primary-background);
|
380
388
|
padding: var(--spacing-sm);
|
381
389
|
border: var(--widget-border, none);
|
382
390
|
}
|
391
|
+
|
383
392
|
@keyframes slideDown {
|
384
393
|
from {
|
385
394
|
transform: translateY(0);
|
@@ -390,6 +399,7 @@
|
|
390
399
|
opacity: 0;
|
391
400
|
}
|
392
401
|
}
|
402
|
+
|
393
403
|
@keyframes slideUp {
|
394
404
|
from {
|
395
405
|
transform: translateY(100%);
|
@@ -400,10 +410,12 @@
|
|
400
410
|
opacity: 1;
|
401
411
|
}
|
402
412
|
}
|
413
|
+
|
403
414
|
:host(.expanded) {
|
404
415
|
opacity: 1;
|
405
416
|
animation: slideUp 0.3s linear;
|
406
417
|
}
|
418
|
+
|
407
419
|
:host(.hidden) {
|
408
420
|
opacity: 0;
|
409
421
|
animation: slideDown 0.3s linear;
|
package/index.mjs
CHANGED
@@ -3222,7 +3222,7 @@ class X extends k {
|
|
3222
3222
|
);
|
3223
3223
|
return;
|
3224
3224
|
}
|
3225
|
-
this.active = !this.active, this.active ? (this.application.appendToDOM(), this.widgetActive$.next(!0)) : (this.application.hide(), this.widgetActive$.next(!1));
|
3225
|
+
this.active = !this.active, this.active ? (this.application.appendToDOM(), this.widgetActive$.next(!0), this.hideTrigger()) : (this.application.hide(), this.widgetActive$.next(!1), this.showTrigger());
|
3226
3226
|
}
|
3227
3227
|
_applyBranding() {
|
3228
3228
|
var e;
|
@@ -3745,6 +3745,7 @@ cn.styles = E`
|
|
3745
3745
|
|
3746
3746
|
--header-height: 69px;
|
3747
3747
|
}
|
3748
|
+
|
3748
3749
|
:host {
|
3749
3750
|
--voca-rem-multiplier: 0.625;
|
3750
3751
|
box-sizing: border-box;
|
@@ -3761,23 +3762,27 @@ cn.styles = E`
|
|
3761
3762
|
z-index: 6;
|
3762
3763
|
position: fixed;
|
3763
3764
|
}
|
3765
|
+
|
3764
3766
|
@media screen and (max-width: 800px) {
|
3765
3767
|
:host(.floating) {
|
3766
|
-
inset: 0
|
3768
|
+
inset: 0;
|
3767
3769
|
height: 100%;
|
3768
3770
|
}
|
3771
|
+
|
3769
3772
|
:host(.third-party) {
|
3770
|
-
inset: 0
|
3773
|
+
inset: 0;
|
3771
3774
|
height: 100vh;
|
3772
3775
|
}
|
3773
3776
|
}
|
3777
|
+
|
3774
3778
|
@media screen and (min-width: 801px) {
|
3775
3779
|
:host(.floating) {
|
3776
|
-
inset: auto 20px
|
3780
|
+
inset: auto 20px 20px auto;
|
3777
3781
|
max-height: calc(100vh - 120px);
|
3778
3782
|
width: 400px;
|
3779
|
-
height:
|
3783
|
+
height: 775px;
|
3780
3784
|
}
|
3785
|
+
|
3781
3786
|
:host(.third-party) {
|
3782
3787
|
max-width: 1000px;
|
3783
3788
|
height: 100vh;
|
@@ -3786,11 +3791,13 @@ cn.styles = E`
|
|
3786
3791
|
transform: translateX(-50%);
|
3787
3792
|
margin: -10px 0;
|
3788
3793
|
}
|
3794
|
+
|
3789
3795
|
:host(.floating.bottom-right) {
|
3790
|
-
inset: auto 20px
|
3796
|
+
inset: auto 20px 20px auto;
|
3791
3797
|
}
|
3798
|
+
|
3792
3799
|
:host(.floating.bottom-left) {
|
3793
|
-
inset: auto auto
|
3800
|
+
inset: auto auto 20px 20px;
|
3794
3801
|
}
|
3795
3802
|
}
|
3796
3803
|
|
@@ -3806,12 +3813,14 @@ cn.styles = E`
|
|
3806
3813
|
* {
|
3807
3814
|
box-sizing: border-box;
|
3808
3815
|
}
|
3816
|
+
|
3809
3817
|
.widget-container {
|
3810
3818
|
height: 100%;
|
3811
3819
|
background-color: var(--primary-background);
|
3812
3820
|
padding: var(--spacing-sm);
|
3813
3821
|
border: var(--widget-border, none);
|
3814
3822
|
}
|
3823
|
+
|
3815
3824
|
@keyframes slideDown {
|
3816
3825
|
from {
|
3817
3826
|
transform: translateY(0);
|
@@ -3822,6 +3831,7 @@ cn.styles = E`
|
|
3822
3831
|
opacity: 0;
|
3823
3832
|
}
|
3824
3833
|
}
|
3834
|
+
|
3825
3835
|
@keyframes slideUp {
|
3826
3836
|
from {
|
3827
3837
|
transform: translateY(100%);
|
@@ -3832,10 +3842,12 @@ cn.styles = E`
|
|
3832
3842
|
opacity: 1;
|
3833
3843
|
}
|
3834
3844
|
}
|
3845
|
+
|
3835
3846
|
:host(.expanded) {
|
3836
3847
|
opacity: 1;
|
3837
3848
|
animation: slideUp 0.3s linear;
|
3838
3849
|
}
|
3850
|
+
|
3839
3851
|
:host(.hidden) {
|
3840
3852
|
opacity: 0;
|
3841
3853
|
animation: slideDown 0.3s linear;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@telia-ace/widget-conversation-flamingo",
|
3
|
-
"version": "1.1.72-rc.
|
3
|
+
"version": "1.1.72-rc.26",
|
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.72-rc.
|
12
|
+
"@telia-ace/widget-core-flamingo": "1.1.72-rc.26",
|
13
13
|
"lit-html": "^3.0.2",
|
14
14
|
"rxjs": "^7.8.1",
|
15
15
|
"marked": "^12.0.2"
|