@telia-ace/widget-conversation 1.0.3 → 1.0.4

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.
@@ -1,6 +1,6 @@
1
1
  import { Container, EventListener, EventManager } from '@webprovisions/platform';
2
2
  import { ConversationProvider } from './conversation-provider';
3
- import { ConversationMessageContent, ConversationMessageSender, ConversationMessageSettings, ConversationMessageUpdateSettings, NormalizedMessageSettings } from './types';
3
+ import { ConversationMessageContent, ConversationMessageSender, ConversationMessageSettings, ConversationMessageUpdateSettings, ConverstationMessageItem, NormalizedMessageSettings } from './types';
4
4
  import { User } from './user';
5
5
  export declare type ValidateHandler = (formValues: {
6
6
  [key: string]: any;
@@ -20,8 +20,9 @@ export declare type CancelLoaderDelegate = () => void;
20
20
  export declare class ConversationEntry {
21
21
  private writer;
22
22
  constructor(writer: EntryWriter);
23
- update(content: string | ConversationMessageUpdateSettings): void;
23
+ update(content: string | ConversationMessageUpdateSettings | ConverstationMessageItem<any> | ConverstationMessageItem<any>[]): void;
24
24
  remove(): void;
25
+ private getNormalizedSettings;
25
26
  }
26
27
  export declare enum ConversationMessageType {
27
28
  User = "user",
@@ -36,7 +37,7 @@ export declare type ConversationMessage = {
36
37
  type: ConversationMessageType;
37
38
  };
38
39
  export declare type EntryWriter = (content: ConversationMessageUpdateSettings | null) => void;
39
- export declare const getNormalizedMessageSettings: (settings: string | ConversationMessageSettings) => NormalizedMessageSettings;
40
+ export declare const getNormalizedMessageSettings: (settings: string | ConversationMessageSettings | ConverstationMessageItem<any> | ConverstationMessageItem<any>[]) => NormalizedMessageSettings;
40
41
  /**
41
42
  * Manages the stream of messages inside a `ConversationComponent` and provides external read-write
42
43
  * access to it as well as exposing emitted actions.
@@ -29,12 +29,21 @@ var ConversationEntry = /** @class */ (function () {
29
29
  this.writer = writer;
30
30
  }
31
31
  ConversationEntry.prototype.update = function (content) {
32
- var normalized = typeof content === 'string' ? { body: content } : content;
32
+ var normalized = this.getNormalizedSettings(content);
33
+ // const normalized = typeof content === 'string' ? { body: content } : content;
33
34
  this.writer(normalized);
34
35
  };
35
36
  ConversationEntry.prototype.remove = function () {
36
37
  this.writer(null);
37
38
  };
39
+ ConversationEntry.prototype.getNormalizedSettings = function (content) {
40
+ if (typeof content === 'string')
41
+ return { body: content };
42
+ else if (content.length > -1 && typeof content === 'object')
43
+ return { items: content };
44
+ else
45
+ return content;
46
+ };
38
47
  return ConversationEntry;
39
48
  }());
40
49
  export { ConversationEntry };
@@ -48,32 +57,43 @@ export var getNormalizedMessageSettings = function (settings) {
48
57
  var content;
49
58
  var key = uuid();
50
59
  var timestamp = Date.now();
51
- if (typeof settings === 'string') {
52
- content = { body: settings };
60
+ if (settings.length > -1 && typeof settings === 'object') {
61
+ if (typeof settings[0] === 'string') {
62
+ content = { items: [settings] };
63
+ }
64
+ else {
65
+ content = { items: settings };
66
+ }
53
67
  }
54
- else if (settings.type) {
55
- content = __assign({}, settings);
68
+ else if (typeof settings === 'string') {
69
+ content = { body: settings };
56
70
  }
57
71
  else {
58
- content = {
59
- body: settings.body,
60
- actions: settings.actions,
61
- title: settings.title,
62
- };
63
- if (settings.key) {
64
- key = settings.key;
72
+ settings = settings;
73
+ if (settings.type) {
74
+ content = __assign({}, settings);
65
75
  }
66
- if (settings.timestamp) {
67
- timestamp = settings.timestamp;
68
- }
69
- if (settings.form) {
70
- var builder = FormBuilder.create(key);
71
- settings.form(builder);
72
- var builtForm = builder.get();
73
- content.form = builtForm;
74
- }
75
- if (settings.timestamp === null) {
76
- timestamp = null;
76
+ else {
77
+ content = {
78
+ body: settings.body,
79
+ actions: settings.actions,
80
+ title: settings.title,
81
+ };
82
+ if (settings.key) {
83
+ key = settings.key;
84
+ }
85
+ if (settings.timestamp) {
86
+ timestamp = settings.timestamp;
87
+ }
88
+ if (settings.form) {
89
+ var builder = FormBuilder.create(key);
90
+ settings.form(builder);
91
+ var builtForm = builder.get();
92
+ content.form = builtForm;
93
+ }
94
+ if (settings.timestamp === null) {
95
+ timestamp = null;
96
+ }
77
97
  }
78
98
  }
79
99
  return { content: content, key: key, timestamp: timestamp };
@@ -1,7 +1,8 @@
1
1
  import { ConversationEndedBehavior, ConversationPlatform, UnregisterControllerDelegate } from './conversation-platform';
2
2
  export { ConversationController, ConversationEntry, ConversationMessageType, } from './conversation-controller';
3
3
  export type { ConversationMessage } from './conversation-controller';
4
- export type { ConversationMessageContent, ConversationMessageSender } from './types';
4
+ export { ConversationMessageListItemType } from './types';
5
+ export type { ConversationMessageContent, ConversationMessageSender, ConverstationMessageItem, } from './types';
5
6
  export { ConversationComponent, ConversationReturnButtonComponent } from './ui';
6
7
  export { registerCustomMessageComponent } from './utils/custom-message';
7
8
  export { ConversationPlatform, ConversationEndedBehavior };
package/lib-esm/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ConversationEndedBehavior, ConversationPlatform, } from './conversation-platform';
2
2
  export { ConversationController, ConversationEntry, ConversationMessageType, } from './conversation-controller';
3
+ export { ConversationMessageListItemType } from './types';
3
4
  export { ConversationComponent, ConversationReturnButtonComponent } from './ui';
4
5
  export { registerCustomMessageComponent } from './utils/custom-message';
5
6
  export { ConversationPlatform, ConversationEndedBehavior };
@@ -10,6 +10,7 @@ export declare type ConversationMessageSettings = {
10
10
  };
11
11
  form?: (builder: FormBuilder) => void;
12
12
  type?: string;
13
+ items?: ConversationMessageList[];
13
14
  [key: string]: any;
14
15
  };
15
16
  export declare type NormalizedMessageSettings = {
@@ -17,15 +18,34 @@ export declare type NormalizedMessageSettings = {
17
18
  key: string;
18
19
  timestamp: number | null;
19
20
  };
21
+ export declare type ConversationMessageList = {
22
+ header?: string;
23
+ itemKey: string;
24
+ type?: ConversationMessageListType;
25
+ items: ConversationMessageListItem[];
26
+ };
27
+ export declare type ConversationMessageListItem = {
28
+ icon?: string;
29
+ type?: ConversationMessageListItemType;
30
+ actions?: {
31
+ [actionKey: string]: any;
32
+ };
33
+ form?: Form;
34
+ body?: string;
35
+ key: string;
36
+ [key: string]: any;
37
+ };
20
38
  export declare type ConversationMessageContent = {
21
39
  title?: string;
22
40
  body?: string;
23
41
  actions?: {
24
42
  [actionKey: string]: any;
25
43
  };
44
+ items?: ConverstationMessageItem<any>[];
26
45
  form?: Form;
27
46
  [key: string]: any;
28
47
  };
48
+ export declare type ConverstationMessageItem<T, R = ItemPayload> = R extends [T, any] ? R : never;
29
49
  export declare type ConversationMessageUpdateSettings = ConversationMessageContent & {
30
50
  timestamp?: number;
31
51
  };
@@ -33,3 +53,58 @@ export declare type ConversationMessageSender = {
33
53
  name?: string;
34
54
  avatar?: string | Symbol;
35
55
  };
56
+ export declare enum ConversationMessageListType {
57
+ Ordinary = "ordinary",
58
+ Seperator = "seperator"
59
+ }
60
+ export declare enum ConversationMessageListItemType {
61
+ Header = "header",
62
+ LinkList = "link-list",
63
+ Separator = "separator",
64
+ NoGoodAlternative = "no-good-alternative",
65
+ ButtonList = "button-list",
66
+ Text = "text",
67
+ HTML = "html",
68
+ FeedbackList = "feedback-list"
69
+ }
70
+ declare type LinkListItem = [
71
+ ConversationMessageListItemType.LinkList,
72
+ {
73
+ actions: {
74
+ [key: string]: string;
75
+ };
76
+ }
77
+ ];
78
+ declare type HeaderItem = [ConversationMessageListItemType.Header, string];
79
+ declare type TextItem = [ConversationMessageListItemType.Text, string];
80
+ declare type SeparatorItem = [ConversationMessageListItemType.Separator, undefined];
81
+ declare type NoGoodAlternativeItem = [
82
+ ConversationMessageListItemType.NoGoodAlternative,
83
+ {
84
+ body: string;
85
+ }
86
+ ];
87
+ declare type ButtonListItem = [
88
+ ConversationMessageListItemType.ButtonList,
89
+ {
90
+ actions: {
91
+ [key: string]: string;
92
+ };
93
+ }
94
+ ];
95
+ declare type FeedbackListItem = [
96
+ ConversationMessageListItemType.FeedbackList,
97
+ {
98
+ actions: {
99
+ [key: string]: string;
100
+ };
101
+ }
102
+ ];
103
+ declare type HTMLItem = [
104
+ ConversationMessageListItemType.HTML,
105
+ {
106
+ body: string;
107
+ }
108
+ ];
109
+ declare type ItemPayload = LinkListItem | HeaderItem | TextItem | SeparatorItem | NoGoodAlternativeItem | ButtonListItem | HTMLItem | FeedbackListItem;
110
+ export {};
package/lib-esm/types.js CHANGED
@@ -1 +1,16 @@
1
- export {};
1
+ export var ConversationMessageListType;
2
+ (function (ConversationMessageListType) {
3
+ ConversationMessageListType["Ordinary"] = "ordinary";
4
+ ConversationMessageListType["Seperator"] = "seperator";
5
+ })(ConversationMessageListType || (ConversationMessageListType = {}));
6
+ export var ConversationMessageListItemType;
7
+ (function (ConversationMessageListItemType) {
8
+ ConversationMessageListItemType["Header"] = "header";
9
+ ConversationMessageListItemType["LinkList"] = "link-list";
10
+ ConversationMessageListItemType["Separator"] = "separator";
11
+ ConversationMessageListItemType["NoGoodAlternative"] = "no-good-alternative";
12
+ ConversationMessageListItemType["ButtonList"] = "button-list";
13
+ ConversationMessageListItemType["Text"] = "text";
14
+ ConversationMessageListItemType["HTML"] = "html";
15
+ ConversationMessageListItemType["FeedbackList"] = "feedback-list";
16
+ })(ConversationMessageListItemType || (ConversationMessageListItemType = {}));
@@ -13,10 +13,28 @@ var __assign = (this && this.__assign) || function () {
13
13
  };
14
14
  return __assign.apply(this, arguments);
15
15
  };
16
+ var __read = (this && this.__read) || function (o, n) {
17
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
18
+ if (!m) return o;
19
+ var i = m.call(o), r, ar = [], e;
20
+ try {
21
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
22
+ }
23
+ catch (error) { e = { error: error }; }
24
+ finally {
25
+ try {
26
+ if (r && !r.done && (m = i["return"])) m.call(i);
27
+ }
28
+ finally { if (e) throw e.error; }
29
+ }
30
+ return ar;
31
+ };
16
32
  import { FormComponent } from '@telia-ace/widget-forms';
17
- import { borderTabStyle, buttonCss, Html, invertedHoverButton, Lightbox, List, useDispatch, } from '@telia-ace/widget-ui';
18
- import React from 'react';
33
+ import { borderTabStyle, buttonCss, Html, Icon, invertedHoverButton, Lightbox, List, SymbolBadge, useDispatch, } from '@telia-ace/widget-ui';
34
+ import { uuid } from '@telia-ace/widget-utilities';
35
+ import React, { Fragment } from 'react';
19
36
  import styled, { css } from 'styled-components';
37
+ import { ConversationMessageListItemType, } from '../../types';
20
38
  import { MessageContent, MessageContentPart as Part, MessageTitle } from './conversation-styles';
21
39
  import { CustomMessage } from './message-types';
22
40
  var imageLightboxRenderer = function (attrs) { return React.createElement(Lightbox, { attrs: attrs }); };
@@ -28,10 +46,10 @@ var htmlParseInstructions = {
28
46
  var ConversationContent = function (_a) {
29
47
  var content = _a.content, isUser = _a.isUser, stacked = _a.stacked;
30
48
  var dispatch = useDispatch();
31
- var title = content.title, body = content.body, actions = content.actions, form = content.form, type = content.type;
49
+ var title = content.title, body = content.body, actions = content.actions, form = content.form, type = content.type, items = content.items;
32
50
  if (type)
33
51
  return React.createElement(CustomMessage, { type: type, content: content, isUser: isUser, stacked: stacked });
34
- return (React.createElement(MessageContent, { user: isUser, stacked: !!stacked && stacked, fullWidth: !!form || !!actions },
52
+ return (React.createElement(MessageContent, { noPadding: true, user: isUser, stacked: !!stacked && stacked, fullWidth: !!form || !!actions },
35
53
  title && (React.createElement(Part, null,
36
54
  React.createElement(MessageTitle, { variant: "h2" }, title))),
37
55
  body && (React.createElement(Part, null,
@@ -52,7 +70,99 @@ var ConversationContent = function (_a) {
52
70
  React.createElement(StyledActionButton, { onClick: function () {
53
71
  dispatch('action', item.actionKey);
54
72
  } }, item.label)));
55
- } })))));
73
+ } }))),
74
+ items && (React.createElement(Fragment, null,
75
+ React.createElement(Part, { key: uuid(), noPadding: true },
76
+ React.createElement(StyledActionList, { items: items.map(function (_a) {
77
+ var _b = __read(_a, 2), type = _b[0], content = _b[1];
78
+ return { type: type, content: content };
79
+ }), renderItem: function (item) {
80
+ var itemKey = uuid();
81
+ switch (item.type) {
82
+ case ConversationMessageListItemType.Header: {
83
+ return (React.createElement(ConversationListItem, { key: itemKey },
84
+ React.createElement("strong", null, item.content)));
85
+ }
86
+ case ConversationMessageListItemType.Text: {
87
+ return (React.createElement(ConversationListItem, { key: itemKey },
88
+ React.createElement("span", null, item.content)));
89
+ }
90
+ case ConversationMessageListItemType.HTML: {
91
+ return (React.createElement(ConversationListItem, { key: itemKey },
92
+ React.createElement(StyledHtml, { html: item.content.body, htmlParseInstruction: htmlParseInstructions })));
93
+ }
94
+ case ConversationMessageListItemType.Separator: {
95
+ return (React.createElement(ConversationListItem, { key: itemKey, noPadding: true },
96
+ React.createElement(Separator, null)));
97
+ }
98
+ case ConversationMessageListItemType.LinkList: {
99
+ return (React.createElement(ConversationListItem, { key: itemKey },
100
+ React.createElement(StyledLinkList, { items: Object.keys(item.content.actions).map(function (i) {
101
+ return {
102
+ label: item.content.actions[i],
103
+ actionKey: i,
104
+ };
105
+ }), renderItem: function (item) {
106
+ return (React.createElement("li", { key: item.actionKey },
107
+ React.createElement(StyledLinkButton, { help: item.actionKey === 'help', onClick: function () {
108
+ dispatch('action', item.actionKey);
109
+ } },
110
+ item.label,
111
+ item.actionKey === 'help' && (React.createElement(SymbolBadge, { size: 14, symbol: {
112
+ type: 'Svg',
113
+ content: 'caret-down',
114
+ } })))));
115
+ } })));
116
+ }
117
+ case ConversationMessageListItemType.ButtonList: {
118
+ return (React.createElement(ConversationListItem, { key: itemKey },
119
+ React.createElement(StyledButtonList, { items: Object.keys(item.content.actions).map(function (i) {
120
+ return {
121
+ label: item.content.actions[i],
122
+ actionKey: i,
123
+ };
124
+ }), renderItem: function (item) {
125
+ return (React.createElement("li", { key: item.actionKey },
126
+ React.createElement(StyledButtonListButton, { onClick: function () {
127
+ dispatch('action', item.actionKey);
128
+ } }, item.label)));
129
+ } })));
130
+ }
131
+ case ConversationMessageListItemType.NoGoodAlternative: {
132
+ return (React.createElement(ConversationListItem, { key: itemKey },
133
+ React.createElement(NoGoodAlternativeWrapper, { onClick: function () {
134
+ dispatch('action', 'help');
135
+ } },
136
+ React.createElement(SymbolBadge, { size: 14, symbol: {
137
+ type: 'FontAwesome',
138
+ content: 'meh-o',
139
+ } }),
140
+ React.createElement("span", null, item.content.body))));
141
+ }
142
+ case ConversationMessageListItemType.FeedbackList: {
143
+ return (React.createElement(ConversationListItem, { key: itemKey },
144
+ React.createElement(StyledButtonList, { items: Object.keys(item.content.actions).map(function (i) {
145
+ return {
146
+ label: item.content.actions[i],
147
+ actionKey: i,
148
+ };
149
+ }), renderItem: function (item) {
150
+ return (React.createElement("li", { key: item.actionKey },
151
+ React.createElement(FeedbackButton, { className: "humany-feedback-button", disabled: false, "aria-pressed": true, "data-selected": true, "data-direction": 'vertical', onClick: function () {
152
+ dispatch('action', item.actionKey);
153
+ } },
154
+ React.createElement(Icon, { faIcon: item.actionKey == 'yes'
155
+ ? 'smile-o'
156
+ : 'frown-o' }),
157
+ React.createElement("span", null, item.label))));
158
+ } })));
159
+ }
160
+ default: {
161
+ return (React.createElement(Fragment, null,
162
+ React.createElement("p", null, "Unknown message type")));
163
+ }
164
+ }
165
+ } }))))));
56
166
  };
57
167
  var StyledForm = styled(FormComponent)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n & button.humany-form-component-button {\n ", ";\n display: block;\n width: 100%;\n margin-bottom: ", ";\n }\n & button.humany-form-component-submit {\n width: 100%;\n margin: 0;\n :not(:last-child) {\n margin-bottom: ", ";\n }\n }\n"], ["\n & button.humany-form-component-button {\n ", ";\n display: block;\n width: 100%;\n margin-bottom: ", ";\n }\n & button.humany-form-component-submit {\n width: 100%;\n margin: 0;\n :not(:last-child) {\n margin-bottom: ", ";\n }\n }\n"])), function (p) {
58
168
  var _a, _b;
@@ -64,9 +174,35 @@ var StyledForm = styled(FormComponent)(templateObject_1 || (templateObject_1 = _
64
174
  }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; });
65
175
  var StyledHtml = styled(Html)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n white-space: pre-wrap;\n a {\n color: ", ";\n &:focus {\n ", ";\n }\n }\n"], ["\n white-space: pre-wrap;\n a {\n color: ", ";\n &:focus {\n ", ";\n }\n }\n"])), function (p) { return p.theme.colors.link; }, function (p) { var _a; return ((_a = p.theme.accessibility) === null || _a === void 0 ? void 0 : _a.isTabbing) && borderTabStyle; });
66
176
  var StyledActionList = styled(List)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding: 0;\n list-style: none;\n margin: 0 -", ";\n > li {\n margin: ", ";\n }\n"], ["\n padding: 0;\n list-style: none;\n margin: 0 -", ";\n > li {\n margin: ", ";\n }\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; });
67
- var StyledActionButton = styled.button(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", ";\n display: block;\n background-color: ", ";\n width: 100%;\n color: #fff;\n &:focus {\n ", "\n }\n"], ["\n ", ";\n display: block;\n background-color: ", ";\n width: 100%;\n color: #fff;\n &:focus {\n ", "\n }\n"])), buttonCss, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; }, function (p) {
177
+ var StyledButtonList = styled(List)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 0;\n list-style: none;\n > li {\n margin: ", " ", ";\n margin-left: 0;\n display: inline-block;\n }\n"], ["\n padding: 0;\n list-style: none;\n > li {\n margin: ", " ", ";\n margin-left: 0;\n display: inline-block;\n }\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.small; }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; });
178
+ var StyledButtonListButton = styled.button(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", ";\n display: block;\n background-color: ", ";\n width: 100%;\n color: #fff;\n &:focus {\n ", "\n }\n"], ["\n ", ";\n display: block;\n background-color: ", ";\n width: 100%;\n color: #fff;\n &:focus {\n ", "\n }\n"])), buttonCss, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; }, function (p) {
179
+ var _a;
180
+ return ((_a = p.theme.accessibility) === null || _a === void 0 ? void 0 : _a.isTabbing) && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n background-color: transparent;\n "], ["\n ", "\n background-color: transparent;\n "])), borderTabStyle);
181
+ });
182
+ var StyledLinkList = styled(List)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n padding: 0;\n list-style: none;\n > li {\n margin-bottom: ", ";\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n"], ["\n padding: 0;\n list-style: none;\n > li {\n margin-bottom: ", ";\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; });
183
+ var StyledLinkButton = styled.button(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: block;\n background-color: transparent;\n border: none;\n padding: 0;\n font-weight: 300;\n font-family: inherit;\n cursor: pointer;\n color: ", ";\n\n ", "\n"], ["\n display: block;\n background-color: transparent;\n border: none;\n padding: 0;\n font-weight: 300;\n font-family: inherit;\n cursor: pointer;\n color: ", ";\n\n ", "\n"])), function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; }, function (p) {
184
+ var _a, _b;
185
+ return p.help && css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n color: ", ";\n text-decoration: underline;\n\n i,\n svg {\n margin-left: ", ";\n }\n "], ["\n color: ", ";\n text-decoration: underline;\n\n i,\n svg {\n margin-left: ", ";\n }\n "])), (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.text, (_b = p.theme.sizes) === null || _b === void 0 ? void 0 : _b.small);
186
+ });
187
+ var StyledActionButton = styled.button(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n ", ";\n display: block;\n background-color: ", ";\n width: 100%;\n color: #fff;\n font-family: Lato;\n font-size: 1rem;\n font-weight: 300;\n &:focus {\n ", "\n }\n"], ["\n ", ";\n display: block;\n background-color: ", ";\n width: 100%;\n color: #fff;\n font-family: Lato;\n font-size: 1rem;\n font-weight: 300;\n &:focus {\n ", "\n }\n"])), buttonCss, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; }, function (p) {
68
188
  var _a;
69
- return ((_a = p.theme.accessibility) === null || _a === void 0 ? void 0 : _a.isTabbing) && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", "\n background-color: transparent;\n "], ["\n ", "\n background-color: transparent;\n "])), borderTabStyle);
189
+ return ((_a = p.theme.accessibility) === null || _a === void 0 ? void 0 : _a.isTabbing) && css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n ", "\n background-color: transparent;\n "], ["\n ", "\n background-color: transparent;\n "])), borderTabStyle);
70
190
  });
191
+ var Separator = styled.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n background-color: #efefef;\n height: 1px;\n width: 100%;\n"], ["\n background-color: #efefef;\n height: 1px;\n width: 100%;\n"])));
192
+ var NoGoodAlternativeWrapper = styled.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n\n > i,\n svg {\n margin-right: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n\n > i,\n svg {\n margin-right: ", ";\n }\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.small; });
193
+ var ConversationListItem = styled.li(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n padding-left: ", ";\n padding-right: ", ";\n"])), function (p) { var _a; return (p.noPadding ? 0 : (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.medium); }, function (p) { var _a; return (p.noPadding ? 0 : (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.medium); });
194
+ var FeedbackButton = styled.button(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n display: inline-block;\n font-size: ", ";\n background-color: #ffffff !important;\n color: ", " !important;\n border-color: ", " !important;\n font-weight: 300;\n && {\n margin-right: ", ";\n }\n ", "\n ", "\n ", "\n i {\n margin: 0 ", " 0 0;\n color: ", " !important;\n }\n span {\n color: ", " !important;\n }\n"], ["\n display: inline-block;\n font-size: ", ";\n background-color: #ffffff !important;\n color: ", " !important;\n border-color: ", " !important;\n font-weight: 300;\n && {\n margin-right: ", ";\n }\n ", "\n ", "\n ", "\n i {\n margin: 0 ", " 0 0;\n color: ", " !important;\n }\n span {\n color: ", " !important;\n }\n"])), function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.normal; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.small; }, function (p) {
195
+ var _a, _b;
196
+ return p['data-direction'] === 'horizontal' && css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n width: 225px;\n max-width: calc(50% - ", " - ", ");\n "], ["\n width: 225px;\n max-width: calc(50% - ", " - ", ");\n "])), (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.large, (_b = p.theme.sizes) === null || _b === void 0 ? void 0 : _b.small);
197
+ }, function (p) {
198
+ return p['data-direction'] === 'vertical' && css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n min-width: 150px;\n "], ["\n min-width: 150px;\n "])));
199
+ }, function (p) {
200
+ var _a;
201
+ return invertedHoverButton({
202
+ active: p['data-selected'],
203
+ primaryColor: (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary,
204
+ secondaryColor: '#FFFFFF',
205
+ });
206
+ }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.small; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary; });
71
207
  export default ConversationContent;
72
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
208
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17;
@@ -6,4 +6,6 @@ export declare const ContentBundle: import("styled-components").StyledComponent<
6
6
  export declare const MessageTitle: import("styled-components").StyledComponent<import("react").FC<import("@telia-ace/widget-ui").TypographyProps>, any, {}, never>;
7
7
  export declare const MessageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
8
8
  export declare const MessageContent: import("styled-components").StyledComponent<"div", any, any, never>;
9
- export declare const MessageContentPart: import("styled-components").StyledComponent<"div", any, {}, never>;
9
+ export declare const MessageContentPart: import("styled-components").StyledComponent<"div", any, {
10
+ noPadding?: boolean | undefined;
11
+ }, never>;
@@ -4,13 +4,13 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
4
4
  };
5
5
  import { Typography } from '@telia-ace/widget-ui';
6
6
  import styled, { css, keyframes } from 'styled-components';
7
- export var Avatar = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n border: ", ";\n grid-area: avatar;\n align-self: flex-end;\n justify-self: center;\n overflow: hidden;\n margin-right: 10px;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ", ";\n\n > img {\n height: 100%;\n width: 100%;\n object-fit: cover;\n }\n\n > svg {\n width: 90%;\n height: 90%;\n padding: 10%;\n color: ", ";\n\n line,\n path,\n circle,\n fill {\n stroke: ", ";\n }\n }\n"], ["\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n border: ", ";\n grid-area: avatar;\n align-self: flex-end;\n justify-self: center;\n overflow: hidden;\n margin-right: 10px;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ", ";\n\n > img {\n height: 100%;\n width: 100%;\n object-fit: cover;\n }\n\n > svg {\n width: 90%;\n height: 90%;\n padding: 10%;\n color: ", ";\n\n line,\n path,\n circle,\n fill {\n stroke: ", ";\n }\n }\n"])), function (p) { return p.avatarSize || '32px'; }, function (p) { return p.avatarSize || '32px'; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.accent; }, function (p) { return p.theme.border; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.text; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.text; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.text; });
7
+ export var Avatar = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n border: ", ";\n grid-area: avatar;\n align-self: flex-end;\n justify-self: center;\n overflow: hidden;\n margin-right: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n color: ", ";\n\n > img {\n height: 100%;\n width: 100%;\n object-fit: cover;\n }\n\n > svg {\n width: 90%;\n height: 90%;\n padding: 10%;\n color: ", ";\n\n line,\n path,\n circle,\n fill {\n stroke: ", ";\n }\n }\n"], ["\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n border: ", ";\n grid-area: avatar;\n align-self: flex-end;\n justify-self: center;\n overflow: hidden;\n margin-right: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n color: ", ";\n\n > img {\n height: 100%;\n width: 100%;\n object-fit: cover;\n }\n\n > svg {\n width: 90%;\n height: 90%;\n padding: 10%;\n color: ", ";\n\n line,\n path,\n circle,\n fill {\n stroke: ", ";\n }\n }\n"])), function (p) { return p.avatarSize || '32px'; }, function (p) { return p.avatarSize || '32px'; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.accent; }, function (p) { return p.theme.border; }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.text; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.text; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.text; });
8
8
  export var LoaderAnimation = keyframes(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n 0% {\n opacity: 0;\n }\n 75% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n"], ["\n 0% {\n opacity: 0;\n }\n 75% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n"])));
9
9
  export var Loader = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n > div {\n height: 10px;\n width: 10px;\n border-radius: 50%;\n margin: 5px;\n background-color: ", ";\n animation: ", " 1s infinite;\n }\n > div:nth-child(2) {\n animation-delay: 100ms;\n }\n > div:nth-child(3) {\n animation-delay: 200ms;\n }\n"], ["\n display: flex;\n justify-content: center;\n > div {\n height: 10px;\n width: 10px;\n border-radius: 50%;\n margin: 5px;\n background-color: ", ";\n animation: ", " 1s infinite;\n }\n > div:nth-child(2) {\n animation-delay: 100ms;\n }\n > div:nth-child(3) {\n animation-delay: 200ms;\n }\n"])), function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.text; }, LoaderAnimation);
10
- export var ContentBundle = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n grid-area: content;\n max-width: 100%;\n overflow: auto;\n"], ["\n grid-area: content;\n max-width: 100%;\n overflow: auto;\n"])));
10
+ export var ContentBundle = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n grid-area: content;\n max-width: 100%;\n overflow: hidden;\n"], ["\n grid-area: content;\n max-width: 100%;\n overflow: hidden;\n"])));
11
11
  export var MessageTitle = styled(Typography)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-size: ", ";\n font-weight: normal;\n margin: 0;\n"], ["\n font-size: ", ";\n font-weight: normal;\n margin: 0;\n"])), function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.normal; });
12
12
  export var MessageContainer = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
13
- export var MessageContent = styled.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n padding: ", ";\n background-color: ", ";\n color: ", ";\n border-radius: 5px; // TODO: prop?\n margin-top: ", ";\n display: inline-block;\n && > * {\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-all;\n word-break: break-word;\n hyphens: auto;\n }\n max-width: 100%;\n ", "\n\n ", "\n ", ";\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\n ", ";\n\n transition: border-radius 500ms linear;\n"], ["\n padding: ", ";\n background-color: ", ";\n color: ", ";\n border-radius: 5px; // TODO: prop?\n margin-top: ", ";\n display: inline-block;\n && > * {\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-all;\n word-break: break-word;\n hyphens: auto;\n }\n max-width: 100%;\n ", "\n\n ", "\n ", ";\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\n ", ";\n\n transition: border-radius 500ms linear;\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.medium; }, function (p) { var _a, _b; return (p.user ? (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary : (_b = p.theme.colors) === null || _b === void 0 ? void 0 : _b.accent); }, function (p) { var _a, _b; return (p.user ? (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.accent : (_b = p.theme.colors) === null || _b === void 0 ? void 0 : _b.text); }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; }, function (p) { return p.fullWidth && 'width: 100%;'; }, function (p) {
13
+ export var MessageContent = styled.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n border-radius: 5px; // TODO: prop?\n margin-top: ", ";\n display: inline-block;\n && > * {\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-all;\n word-break: break-word;\n hyphens: auto;\n }\n max-width: 100%;\n ", "\n\n ", "\n ", ";\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\n ", ";\n\n transition: border-radius 500ms linear;\n"], ["\n background-color: ", ";\n color: ", ";\n border-radius: 5px; // TODO: prop?\n margin-top: ", ";\n display: inline-block;\n && > * {\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-all;\n word-break: break-word;\n hyphens: auto;\n }\n max-width: 100%;\n ", "\n\n ", "\n ", ";\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\n ", ";\n\n transition: border-radius 500ms linear;\n"])), function (p) { var _a, _b; return (p.user ? (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.primary : (_b = p.theme.colors) === null || _b === void 0 ? void 0 : _b.accent); }, function (p) { var _a, _b; return (p.user ? (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.accent : (_b = p.theme.colors) === null || _b === void 0 ? void 0 : _b.text); }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; }, function (p) { return p.fullWidth && 'width: 100%;'; }, function (p) {
14
14
  return !p.user && css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border: ", ";\n "], ["\n border: ", ";\n "])), p.theme.border);
15
15
  }, function (p) { return p.user && 'margin-left: auto'; }, function (p) {
16
16
  return p.stacked === 'first' &&
@@ -33,5 +33,7 @@ export var MessageContent = styled.div(templateObject_15 || (templateObject_15 =
33
33
  }, function (p) {
34
34
  return !p.stacked && css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), p.user ? 'border-bottom-right-radius: 1px;' : 'border-bottom-left-radius: 1px;');
35
35
  });
36
- export var MessageContentPart = styled.div(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n margin-bottom: ", ";\n &:last-child {\n margin-bottom: 0;\n }\n"], ["\n margin-bottom: ", ";\n &:last-child {\n margin-bottom: 0;\n }\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; });
37
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16;
36
+ export var MessageContentPart = styled.div(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n padding: ", ";\n\n ", "\n\n margin-bottom: ", ";\n &:last-child {\n margin-bottom: 0;\n }\n"], ["\n padding: ", ";\n\n ", "\n\n margin-bottom: ", ";\n &:last-child {\n margin-bottom: 0;\n }\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.medium; }, function (p) {
37
+ return p.noPadding && css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n padding: 0;\n "], ["\n padding: 0;\n "])));
38
+ }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; });
39
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17;
@@ -105,7 +105,7 @@ var Conversation = function (_a) {
105
105
  React.createElement(ConversationInput, null)));
106
106
  };
107
107
  var Wrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n right: 0;\n left: 0;\n bottom: 0;\n top: 0;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n"], ["\n position: absolute;\n right: 0;\n left: 0;\n bottom: 0;\n top: 0;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n"])));
108
- var Scrollable = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: stretch;\n flex: 0 1 100%;\n padding: 0 ", ";\n ", ";\n &:focus {\n ", ";\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: stretch;\n flex: 0 1 100%;\n padding: 0 ", ";\n ", ";\n &:focus {\n ", ";\n }\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.medium; }, function (p) { return !!p.scrollableCss && p.scrollableCss; }, function (p) { var _a; return ((_a = p.theme.accessibility) === null || _a === void 0 ? void 0 : _a.isTabbing) && borderTabStyle; });
108
+ var Scrollable = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: stretch;\n flex: 0 1 100%;\n padding: 0 ", ";\n ", ";\n &:focus {\n ", ";\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: stretch;\n flex: 0 1 100%;\n padding: 0 ", ";\n ", ";\n &:focus {\n ", ";\n }\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.normal; }, function (p) { return !!p.scrollableCss && p.scrollableCss; }, function (p) { var _a; return ((_a = p.theme.accessibility) === null || _a === void 0 ? void 0 : _a.isTabbing) && borderTabStyle; });
109
109
  var MessageEntry = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin: 0;\n margin-bottom: ", ";\n\n &:first-of-type {\n margin-top: ", ";\n }\n\n &:last-of-type {\n padding-bottom: ", ";\n }\n\n * {\n font-size: ", ";\n }\n\n & span,\n p,\n a,\n div {\n font-weight: 300;\n }\n\n & b,\n h1 {\n font-weight: normal;\n }\n\n ", "\n"], ["\n margin: 0;\n margin-bottom: ", ";\n\n &:first-of-type {\n margin-top: ", ";\n }\n\n &:last-of-type {\n padding-bottom: ", ";\n }\n\n * {\n font-size: ", ";\n }\n\n & span,\n p,\n a,\n div {\n font-weight: 300;\n }\n\n & b,\n h1 {\n font-weight: normal;\n }\n\n ", "\n"])), function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.medium; }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.medium; }, function (p) { var _a; return (_a = p.theme.sizes) === null || _a === void 0 ? void 0 : _a.medium; }, function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.normal; }, headingElement('h1', css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-weight: normal;\n "], ["\n font-weight: normal;\n "])))));
110
110
  export default Conversation;
111
111
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -17,7 +17,7 @@ var AgentMessage = function (_a) {
17
17
  children,
18
18
  React.createElement(Timestamp, { name: name, timestamp: timestamp })));
19
19
  };
20
- export var StyledAgentMessage = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: grid;\n margin-right: 0;\n width: 100%;\n ", ";\n"], ["\n display: grid;\n margin-right: 0;\n width: 100%;\n ", ";\n"])), function (p) {
20
+ export var StyledAgentMessage = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: grid;\n margin-right: 15%;\n width: 85%;\n ", ";\n"], ["\n display: grid;\n margin-right: 15%;\n width: 85%;\n ", ";\n"])), function (p) {
21
21
  return p.hasAvatar
22
22
  ? css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n grid-template-columns: auto 1fr;\n grid-template-rows: 1fr auto;\n grid-template-areas:\n 'avatar content'\n '. info';\n "], ["\n grid-template-columns: auto 1fr;\n grid-template-rows: 1fr auto;\n grid-template-areas:\n 'avatar content'\n '. info';\n "]))) : css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n grid-template-columns: 1fr;\n grid-template-rows: 1fr auto;\n grid-template-areas:\n 'content'\n 'info';\n "], ["\n grid-template-columns: 1fr;\n grid-template-rows: 1fr auto;\n grid-template-areas:\n 'content'\n 'info';\n "])));
23
23
  });
@@ -19,7 +19,7 @@ var CustomMessage = function (props) {
19
19
  }
20
20
  return (React.createElement(Suspense, { fallback: null },
21
21
  React.createElement(MessageContent, { user: props.isUser, stacked: !!props.stacked && props.stacked, fullWidth: !!props.content.form || !!props.content.actions },
22
- React.createElement(MessageContentPart, null,
22
+ React.createElement(MessageContentPart, { noPadding: !!props.content.noPadding && props.content.noPadding },
23
23
  React.createElement(CustomComponent, __assign({}, props.content))))));
24
24
  };
25
25
  export default CustomMessage;