@telia-ace/widget-conversation-flamingo 1.0.0

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.
Files changed (57) hide show
  1. package/LICENSE.txt +6 -0
  2. package/README.md +490 -0
  3. package/dist/agent.d.ts +21 -0
  4. package/dist/agent.d.ts.map +1 -0
  5. package/dist/components/conversation/conversation.d.ts +29 -0
  6. package/dist/components/conversation/conversation.d.ts.map +1 -0
  7. package/dist/components/conversation/plugin.d.ts +46 -0
  8. package/dist/components/conversation/plugin.d.ts.map +1 -0
  9. package/dist/components/conversation/ui/message-list.d.ts +10 -0
  10. package/dist/components/conversation/ui/message-list.d.ts.map +1 -0
  11. package/dist/components/conversation/ui/message-types/message-type-html.d.ts +8 -0
  12. package/dist/components/conversation/ui/message-types/message-type-html.d.ts.map +1 -0
  13. package/dist/components/conversation/ui/message-types/message-type-link-list.d.ts +9 -0
  14. package/dist/components/conversation/ui/message-types/message-type-link-list.d.ts.map +1 -0
  15. package/dist/components/conversation/ui/message-types/message-type-separator.d.ts +8 -0
  16. package/dist/components/conversation/ui/message-types/message-type-separator.d.ts.map +1 -0
  17. package/dist/components/conversation/ui/message.d.ts +9 -0
  18. package/dist/components/conversation/ui/message.d.ts.map +1 -0
  19. package/dist/components/conversation/utils.d.ts +2 -0
  20. package/dist/components/conversation/utils.d.ts.map +1 -0
  21. package/dist/conversation-31b48ff2.js +2312 -0
  22. package/dist/conversation-31b48ff2.js.map +1 -0
  23. package/dist/conversation-controller.d.ts +122 -0
  24. package/dist/conversation-controller.d.ts.map +1 -0
  25. package/dist/conversation-form-adapter.d.ts +7 -0
  26. package/dist/conversation-form-adapter.d.ts.map +1 -0
  27. package/dist/conversation-history.d.ts +27 -0
  28. package/dist/conversation-history.d.ts.map +1 -0
  29. package/dist/conversation-platform.d.ts +55 -0
  30. package/dist/conversation-platform.d.ts.map +1 -0
  31. package/dist/conversation-provider.d.ts +33 -0
  32. package/dist/conversation-provider.d.ts.map +1 -0
  33. package/dist/index-d8edc7b3.js +4615 -0
  34. package/dist/index-d8edc7b3.js.map +1 -0
  35. package/dist/index.d.ts +10 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +12 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/resolve-entity-value.d.ts +11 -0
  40. package/dist/resolve-entity-value.d.ts.map +1 -0
  41. package/dist/store.d.ts +32 -0
  42. package/dist/store.d.ts.map +1 -0
  43. package/dist/types.d.ts +131 -0
  44. package/dist/types.d.ts.map +1 -0
  45. package/dist/user.d.ts +10 -0
  46. package/dist/user.d.ts.map +1 -0
  47. package/dist/utils/custom-message.d.ts +3 -0
  48. package/dist/utils/custom-message.d.ts.map +1 -0
  49. package/dist/utils/index.d.ts +2 -0
  50. package/dist/utils/index.d.ts.map +1 -0
  51. package/dist/utils/map-actions.d.ts +2 -0
  52. package/dist/utils/map-actions.d.ts.map +1 -0
  53. package/dist/utils/open-chat-widget.d.ts +5 -0
  54. package/dist/utils/open-chat-widget.d.ts.map +1 -0
  55. package/dist/utils/swap-provider.d.ts +9 -0
  56. package/dist/utils/swap-provider.d.ts.map +1 -0
  57. package/package.json +50 -0
@@ -0,0 +1,10 @@
1
+ import { ConversationEndedBehavior, ConversationPlatform, UnregisterControllerDelegate } from './conversation-platform';
2
+ export { ConversationComponent } from './components/conversation/plugin';
3
+ export { ConversationController, ConversationEntry, ConversationMessageType, } from './conversation-controller';
4
+ export type { ConversationMessage } from './conversation-controller';
5
+ export { ConversationMessageListItemType } from './types';
6
+ export type { ConversationMessageContent, ConversationMessageSender, ConverstationMessageItem, } from './types';
7
+ export { registerCustomMessageComponent } from './utils/custom-message';
8
+ export { ConversationPlatform, ConversationEndedBehavior };
9
+ export type { UnregisterControllerDelegate };
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAC1D,YAAY,EACV,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,CAAC;AAC3D,YAAY,EAAE,4BAA4B,EAAE,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,12 @@
1
+ import { c as s, d as a, b as n, e as r, f as t, C, a as i, r as v } from "./index-d8edc7b3.js";
2
+ export {
3
+ s as ConversationComponent,
4
+ a as ConversationController,
5
+ n as ConversationEndedBehavior,
6
+ r as ConversationEntry,
7
+ t as ConversationMessageListItemType,
8
+ C as ConversationMessageType,
9
+ i as ConversationPlatform,
10
+ v as registerCustomMessageComponent
11
+ };
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,11 @@
1
+ import { EventSubscriptionCancellation, Widget } from '@webprovisions/platform';
2
+ export type EntityValueResolver = (value: any) => void;
3
+ export type ResolveEntityValueHandler = (resolve: EntityValueResolver, originalValue: any) => any | Promise<any>;
4
+ /**
5
+ * Registers a handler to resolve entity values initiated by the backend service.
6
+ * @param widget Widget to resolve the entity value for.
7
+ * @param name Name of entity to resolve.
8
+ * @param handler Handler for resolving value.
9
+ */
10
+ export declare const resolveEntityValue: (widget: Widget, name: string, handler: ResolveEntityValueHandler) => EventSubscriptionCancellation;
11
+ //# sourceMappingURL=resolve-entity-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-entity-value.d.ts","sourceRoot":"","sources":["../src/resolve-entity-value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEhF,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;AACvD,MAAM,MAAM,yBAAyB,GAAG,CACtC,OAAO,EAAE,mBAAmB,EAC5B,aAAa,EAAE,GAAG,KACf,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,WACrB,MAAM,QACR,MAAM,WACH,yBAAyB,KACjC,6BAcF,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { Container } from '@webprovisions/platform';
2
+ import { AgentSettings } from './agent';
3
+ import { ConversationController } from './conversation-controller';
4
+ type StoredConversationAgent = {
5
+ id: string;
6
+ name: string;
7
+ avatar?: string;
8
+ providerName: string;
9
+ };
10
+ type StoredConversationMessage = any;
11
+ type StoredConversation = {
12
+ agents: StoredConversationAgent[];
13
+ messages: StoredConversationMessage[];
14
+ };
15
+ export declare const createSessionStorageKey: (id: string) => string;
16
+ declare class Store {
17
+ private container;
18
+ private enabled;
19
+ private sessionStorageKey;
20
+ private locker;
21
+ private initialStoredAgents;
22
+ constructor(container: Container, conversation: ConversationController, enabled: boolean);
23
+ setInitialData(data: {
24
+ agents: AgentSettings[];
25
+ }): void;
26
+ isRehydrated(): Promise<boolean>;
27
+ getStoredAgent(agentId: string): StoredConversationAgent | undefined;
28
+ write(data: any, type: 'messages' | 'agents', action?: 'add' | 'update'): Promise<void>;
29
+ read(): Promise<StoredConversation>;
30
+ }
31
+ export default Store;
32
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAS,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,KAAK,uBAAuB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AACF,KAAK,yBAAyB,GAAG,GAAG,CAAC;AAErC,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,uBAAuB,EAAE,CAAC;IAClC,QAAQ,EAAE,yBAAyB,EAAE,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,uBAAuB,OAAQ,MAAM,WAEjD,CAAC;AAgCF,cAAM,KAAK;IAMP,OAAO,CAAC,SAAS;IAEjB,OAAO,CAAC,OAAO;IAPjB,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,mBAAmB,CAAiC;gBAGlD,SAAS,EAAE,SAAS,EAC5B,YAAY,EAAE,sBAAsB,EAC5B,OAAO,EAAE,OAAO;IAmG1B,cAAc,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,aAAa,EAAE,CAAA;KAAE;IAI1C,YAAY;IAKlB,cAAc,CAAC,OAAO,EAAE,MAAM;IAOxB,KAAK,CACT,IAAI,EAAE,GAAG,EACT,IAAI,EAAE,UAAU,GAAG,QAAQ,EAC3B,MAAM,GAAE,KAAK,GAAG,QAAgB;IA6D5B,IAAI;CAWX;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,131 @@
1
+ export type ConversationMessageSettings = {
2
+ key?: string;
3
+ timestamp?: number;
4
+ title?: string;
5
+ body?: string;
6
+ actions?: {
7
+ [actionKey: string]: any;
8
+ };
9
+ form?: (builder: any) => void;
10
+ type?: string;
11
+ items?: ConversationMessageList[];
12
+ [key: string]: any;
13
+ };
14
+ export type NormalizedMessageSettings = {
15
+ content: ConversationMessageContent;
16
+ key: string;
17
+ timestamp: number | null;
18
+ };
19
+ export type ConversationMessageList = {
20
+ header?: string;
21
+ itemKey: string;
22
+ type?: ConversationMessageListType;
23
+ items: ConversationMessageListItem[];
24
+ };
25
+ export type ConversationMessageListItem = {
26
+ icon?: string;
27
+ type?: ConversationMessageListItemType;
28
+ actions?: {
29
+ [actionKey: string]: any;
30
+ };
31
+ form?: any;
32
+ body?: string;
33
+ key: string;
34
+ [key: string]: any;
35
+ };
36
+ export type ConversationMessageContent = {
37
+ title?: string;
38
+ body?: string;
39
+ actions?: {
40
+ [actionKey: string]: any;
41
+ };
42
+ items?: ConverstationMessageItem<any>[];
43
+ form?: any;
44
+ [key: string]: any;
45
+ };
46
+ export type ConverstationMessageItem<T, R = ItemPayload> = R extends [T, any] ? R : never;
47
+ export type ConversationMessageUpdateSettings = ConversationMessageContent & {
48
+ timestamp?: number;
49
+ };
50
+ export type ConversationMessageSender = {
51
+ name?: string;
52
+ avatar?: string | Symbol;
53
+ id?: string;
54
+ };
55
+ export declare enum ConversationMessageListType {
56
+ Ordinary = "ordinary",
57
+ Seperator = "seperator"
58
+ }
59
+ export declare enum ConversationMessageListItemType {
60
+ LinkList = "link-list",
61
+ Separator = "separator",
62
+ ButtonList = "button-list",
63
+ ItemList = "item-list",
64
+ Text = "text",
65
+ HTML = "html",
66
+ VideoRequest = "video-request"
67
+ }
68
+ export type LinkListProperties = {
69
+ header?: string;
70
+ actions: {
71
+ [key: string]: string;
72
+ } | {
73
+ label: string;
74
+ actionKey: string;
75
+ data: any;
76
+ }[];
77
+ };
78
+ type LinkListItem = [
79
+ ConversationMessageListItemType.LinkList,
80
+ LinkListProperties
81
+ ];
82
+ type TextItem = [ConversationMessageListItemType.Text, string];
83
+ type SeparatorItem = [ConversationMessageListItemType.Separator, undefined];
84
+ export type ButtonListProperties = {
85
+ header?: string;
86
+ actions: {
87
+ [key: string]: string;
88
+ } | {
89
+ label: string;
90
+ actionKey: string;
91
+ data: any;
92
+ }[];
93
+ };
94
+ type ButtonListItem = [
95
+ ConversationMessageListItemType.ButtonList,
96
+ ButtonListProperties
97
+ ];
98
+ export type ItemListProperties = {
99
+ header?: string;
100
+ actions: {
101
+ [key: string]: string;
102
+ } | {
103
+ label: string;
104
+ actionKey: string;
105
+ data: any;
106
+ }[];
107
+ };
108
+ type ItemListItem = [
109
+ ConversationMessageListItemType.ItemList,
110
+ ItemListProperties
111
+ ];
112
+ export type VideoRequestProperties = {
113
+ header?: string;
114
+ acceptLabel: string;
115
+ declineLabel: string;
116
+ };
117
+ type VideoRequestItem = [
118
+ ConversationMessageListItemType.VideoRequest,
119
+ VideoRequestProperties
120
+ ];
121
+ export type HtmlProperties = {
122
+ body: string;
123
+ };
124
+ type HtmlItem = [ConversationMessageListItemType.HTML, HtmlProperties];
125
+ type ItemPayload = LinkListItem | TextItem | SeparatorItem | ButtonListItem | HtmlItem | VideoRequestItem | ItemListItem;
126
+ export type Symbol = {
127
+ type: 'Uri' | 'Svg' | 'FontAwesome' | 'Text' | string;
128
+ content: string;
129
+ };
130
+ export {};
131
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,2BAA2B,GAAG;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE;QAAE,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACvC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAqB,IAAI,CAAC;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK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I,EAAE,GAAG,CAAA;KAAE,EAAE,CAAC;CACvD,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,+BAA+B,CAAC,UAAU;IAC1C,oBAAoB;CACrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EACH;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GACzB;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,GAAG,CAAA;KAAE,EAAE,CAAC;CACvD,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,+BAA+B,CAAC,QAAQ;IACxC,kBAAkB;CACnB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,+BAA+B,CAAC,YAAY;IAC5C,sBAAsB;CACvB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,QAAQ,GAAG,CAAC,+BAA+B,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;AAEvE,KAAK,WAAW,GACZ,YAAY,GACZ,QAAQ,GACR,aAAa,GACb,cAAc,GACd,QAAQ,GACR,gBAAgB,GAChB,YAAY,CAAC;AAEjB,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;IACtD,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
package/dist/user.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { ConversationController, ConversationEntry } from './conversation-controller';
2
+ import { ConversationMessageSettings } from './types';
3
+ export declare class User {
4
+ private controller;
5
+ constructor(controller: ConversationController);
6
+ print: (settings: string | ConversationMessageSettings, options?: {
7
+ key?: string;
8
+ }) => ConversationEntry;
9
+ }
10
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../src/user.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,sBAAsB,EACtB,iBAAiB,EAGpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAEtD,qBAAa,IAAI;IACD,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,sBAAsB;IAEtD,KAAK,aACS,MAAM,GAAG,2BAA2B,YACpC;QACN,GAAG,CAAC,EAAE,MAAM,CAAC;KAChB,KACF,iBAAiB,CASlB;CACL"}
@@ -0,0 +1,3 @@
1
+ import { Container } from '@webprovisions/platform';
2
+ export declare const registerCustomMessageComponent: (_container: Container, _type: string, componentImport: any) => Promise<void>;
3
+ //# sourceMappingURL=custom-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-message.d.ts","sourceRoot":"","sources":["../../src/utils/custom-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,eAAO,MAAM,8BAA8B,eAC7B,SAAS,SACd,MAAM,mBACI,GAAG,kBAcrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { navigateToConversation, openChatWidget, shouldPreventDefault } from './open-chat-widget';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const mapActions: (actions: any) => any[];
2
+ //# sourceMappingURL=map-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map-actions.d.ts","sourceRoot":"","sources":["../../src/utils/map-actions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,YAAa,GAAG,UAQ3B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Container } from '@webprovisions/platform';
2
+ export declare const shouldPreventDefault: (container: Container) => boolean;
3
+ export declare const openChatWidget: (container: Container, contactMethod: any, triggerDOMTarget?: HTMLElement) => boolean | Promise<boolean> | Promise<void>;
4
+ export declare const navigateToConversation: (container: Container, contactMethod: any, routeName?: string) => any;
5
+ //# sourceMappingURL=open-chat-widget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-chat-widget.d.ts","sourceRoot":"","sources":["../../src/utils/open-chat-widget.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAA0B,MAAM,yBAAyB,CAAC;AAmC5E,eAAO,MAAM,oBAAoB,cAAe,SAAS,YAGxD,CAAC;AAEF,eAAO,MAAM,cAAc,cACd,SAAS,iBACL,GAAG,qBACC,WAAW,+CAsG/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,cACtB,SAAS,iBACL,GAAG,4BAsCnB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Container } from '@webprovisions/platform';
2
+ /**
3
+ * This will put the current provider(s) in a queue and
4
+ * swap current provider to another one based on the providerName.
5
+ * When ConversationProvider.complete() is called, the provider(s) in the
6
+ * queue will become active again
7
+ */
8
+ export declare const swapProvider: (container: Container, conversationId: string, providerName: string) => Promise<void>;
9
+ //# sourceMappingURL=swap-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swap-provider.d.ts","sourceRoot":"","sources":["../../src/utils/swap-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,cACV,SAAS,kBACJ,MAAM,gBACR,MAAM,kBAyBvB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@telia-ace/widget-conversation-flamingo",
3
+ "version": "1.0.0",
4
+ "description": "ACE Widget Conversation Platform",
5
+ "license": "SEE LICENSE IN LICENSE.txt",
6
+ "author": "Telia Company AB",
7
+ "keywords": [
8
+ "telia"
9
+ ],
10
+ "main": "dist/index.js",
11
+ "sourceMain": "src/index.ts",
12
+ "type": "module",
13
+ "types": "dist/index.d.ts",
14
+ "files": [
15
+ "LICENSE.txt",
16
+ "README.md",
17
+ "dist/"
18
+ ],
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "sideEffects": true,
23
+ "dependencies": {
24
+ "@telia-ace/widget-core": "^1.0.27",
25
+ "@telia-ace/widget-services": "^1.0.27",
26
+ "@telia-ace/widget-routing": "^1.0.28",
27
+ "@telia-ace/widget-utilities": "^1.0.16",
28
+ "@webprovisions/platform": "^1.1.3",
29
+ "lit": "^2.8.0",
30
+ "lit-html": "^2.8.0",
31
+ "sass": "^1.66.1",
32
+ "@teliads/components": "^22.1.1",
33
+ "@teliads/icons": "^8.4.0",
34
+ "@lit-labs/context": "^0.4.0",
35
+ "@lit-labs/motion": "^1.0.4",
36
+ "widget-runtime-flamingo": "npm:@telia-ace/widget-runtime-flamingo@1.0.2"
37
+ },
38
+ "devDependencies": {
39
+ "@telia-ace/widget-developer-tools": "^1.0.22",
40
+ "@types/node": "^20.5.4",
41
+ "rimraf": "^5.0.1",
42
+ "tslib": "^2.6.0",
43
+ "typescript": "^5.1.6",
44
+ "vite": "^4.4.9"
45
+ },
46
+ "scripts": {
47
+ "clean": "rimraf ./dist",
48
+ "build": "rimraf ./dist && tsc -emitDeclarationOnly && vite build"
49
+ }
50
+ }