@telia-ace/widget-conversation-flamingo 1.1.18-rc.4 → 1.1.18-rc.5
Sign up to get free protection for your applications and to get access to all the features.
- package/{conversation-3926f29b.mjs → conversation-82eb83b8.mjs} +2 -2
- package/{conversation-9bbc787d.js → conversation-9745531a.js} +2 -2
- package/conversation-platform.d.ts +1 -1
- package/{index-d5d01cbe.js → index-823bc9d0.js} +1 -1
- package/index-b34f590f.js +3 -0
- package/{index-306e28c8.mjs → index-cc2f0d24.mjs} +2 -2
- package/index-e9da2f7d.mjs +1241 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +6 -5
- package/models/conversation-provider.d.ts +4 -1
- package/models/conversation-session-state.d.ts +7 -1
- package/package.json +2 -2
- package/index-41339d4e.mjs +0 -1218
- package/index-70996338.js +0 -3
@@ -1,4 +1,4 @@
|
|
1
|
-
import { C as xt } from "./index-
|
1
|
+
import { C as xt } from "./index-e9da2f7d.mjs";
|
2
2
|
/**
|
3
3
|
* @license
|
4
4
|
* Copyright 2019 Google LLC
|
@@ -1479,7 +1479,7 @@ class U extends v {
|
|
1479
1479
|
const t = (r = this.application) == null ? void 0 : r.triggerIcon;
|
1480
1480
|
if (!t)
|
1481
1481
|
return u;
|
1482
|
-
const s = async (o) => await import("./index-
|
1482
|
+
const s = async (o) => await import("./index-cc2f0d24.mjs").then(
|
1483
1483
|
(l) => l[o]
|
1484
1484
|
), { type: i, content: n } = t;
|
1485
1485
|
switch (i) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";const xt=require("./index-
|
1
|
+
"use strict";const xt=require("./index-b34f590f.js");/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2019 Google LLC
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -48,7 +48,7 @@
|
|
48
48
|
* @license
|
49
49
|
* Copyright 2018 Google LLC
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
51
|
-
*/const Wt=bt(class extends Ft{constructor(e){var t;if(super(e),e.type!==yt.ATTRIBUTE||e.name!=="class"||((t=e.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var i,n;if(this.it===void 0){this.it=new Set,e.strings!==void 0&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in t)t[r]&&!((i=this.st)!=null&&i.has(r))&&this.it.add(r);return this.render(t)}const s=e.element.classList;for(const r of this.it)r in t||(s.remove(r),this.it.delete(r));for(const r in t){const o=!!t[r];o===this.it.has(r)||(n=this.st)!=null&&n.has(r)||(o?(s.add(r),this.it.add(r)):(s.remove(r),this.it.delete(r)))}return C}}),it=(e,t,s)=>{e&&s.style.setProperty(t,e)},ts=(e,t)=>{var s,i,n,r;it((s=e.colors)==null?void 0:s.primaryBackground,"--primary-background",t),it((i=e.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),it((n=e.colors)==null?void 0:n.secondaryBackground,"--secondary-background",t),it((r=e.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",t)};var Pi=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,_t=(e,t,s,i)=>{for(var n=i>1?void 0:i?Li(t,s):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(n=(i?o(t,s,n):o(n))||n);return i&&n&&Pi(t,s,n),n};class U extends v{constructor(){super(...arguments),this.active=!1,this.loaded=!1}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}_toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?this.application.appendToDOM():this.application.hide()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&ts(this.application.settings.branding,this)}async _renderSymbol(){var r;const t=(r=this.application)==null?void 0:r.triggerIcon;if(!t)return u;const s=async o=>await Promise.resolve().then(()=>require("./index-
|
51
|
+
*/const Wt=bt(class extends Ft{constructor(e){var t;if(super(e),e.type!==yt.ATTRIBUTE||e.name!=="class"||((t=e.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var i,n;if(this.it===void 0){this.it=new Set,e.strings!==void 0&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in t)t[r]&&!((i=this.st)!=null&&i.has(r))&&this.it.add(r);return this.render(t)}const s=e.element.classList;for(const r of this.it)r in t||(s.remove(r),this.it.delete(r));for(const r in t){const o=!!t[r];o===this.it.has(r)||(n=this.st)!=null&&n.has(r)||(o?(s.add(r),this.it.add(r)):(s.remove(r),this.it.delete(r)))}return C}}),it=(e,t,s)=>{e&&s.style.setProperty(t,e)},ts=(e,t)=>{var s,i,n,r;it((s=e.colors)==null?void 0:s.primaryBackground,"--primary-background",t),it((i=e.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),it((n=e.colors)==null?void 0:n.secondaryBackground,"--secondary-background",t),it((r=e.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",t)};var Pi=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,_t=(e,t,s,i)=>{for(var n=i>1?void 0:i?Li(t,s):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(n=(i?o(t,s,n):o(n))||n);return i&&n&&Pi(t,s,n),n};class U extends v{constructor(){super(...arguments),this.active=!1,this.loaded=!1}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}_toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?this.application.appendToDOM():this.application.hide()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&ts(this.application.settings.branding,this)}async _renderSymbol(){var r;const t=(r=this.application)==null?void 0:r.triggerIcon;if(!t)return u;const s=async o=>await Promise.resolve().then(()=>require("./index-823bc9d0.js")).then(l=>l[o]),{type:i,content:n}=t;switch(i){case"Telia":{const o=await s(n);return o?$`<telia-icon
|
52
52
|
class="trigger-icon"
|
53
53
|
svg=${o.svg}
|
54
54
|
size="lg"
|
@@ -2,7 +2,7 @@ import { ConversationSessionState } from './models/conversation-session-state';
|
|
2
2
|
import { ConversationProvider } from './models/conversation-provider';
|
3
3
|
import Conversation from './conversation';
|
4
4
|
import { Container } from '@telia-ace/widget-core-flamingo';
|
5
|
-
export type ProviderFactory = () => ConversationProvider;
|
5
|
+
export type ProviderFactory = (session: ConversationSessionState) => ConversationProvider;
|
6
6
|
export declare class ConversationPlatform {
|
7
7
|
sessions: Map<string, ConversationSessionState>;
|
8
8
|
registeredProviders: Map<string, ProviderFactory>;
|