@telia-ace/widget-conversation 1.0.3 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/agent.d.ts +2 -2
- package/lib/conversation-controller.d.ts +4 -3
- package/lib/conversation-controller.js +43 -23
- package/lib/index.d.ts +2 -1
- package/lib/index.js +3 -1
- package/lib/types.d.ts +75 -0
- package/lib/types.js +17 -0
- package/lib/ui/conversation/conversation-content.js +145 -9
- package/lib/ui/conversation/conversation-input.js +6 -0
- package/lib/ui/conversation/conversation-styles.d.ts +3 -1
- package/lib/ui/conversation/conversation-styles.js +7 -5
- package/lib/ui/conversation/conversation.js +1 -1
- package/lib/ui/conversation/message-types/agent.js +1 -1
- package/lib/ui/conversation/message-types/custom.js +2 -2
- package/lib/ui/conversation/message-types/timestamp.js +1 -1
- package/lib/ui/conversation/message-types/user.js +1 -1
- package/lib-esm/agent.d.ts +2 -2
- package/lib-esm/conversation-controller.d.ts +4 -3
- package/lib-esm/conversation-controller.js +43 -23
- package/lib-esm/index.d.ts +2 -1
- package/lib-esm/index.js +1 -0
- package/lib-esm/types.d.ts +75 -0
- package/lib-esm/types.js +16 -1
- package/lib-esm/ui/conversation/conversation-content.js +147 -8
- package/lib-esm/ui/conversation/conversation-input.js +6 -0
- package/lib-esm/ui/conversation/conversation-styles.d.ts +3 -1
- package/lib-esm/ui/conversation/conversation-styles.js +7 -5
- package/lib-esm/ui/conversation/conversation.js +1 -1
- package/lib-esm/ui/conversation/message-types/agent.js +1 -1
- package/lib-esm/ui/conversation/message-types/custom.js +2 -2
- package/lib-esm/ui/conversation/message-types/timestamp.js +1 -1
- package/lib-esm/ui/conversation/message-types/user.js +1 -1
- package/package.json +11 -9
|
@@ -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:
|
|
20
|
+
export var StyledAgentMessage = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: grid;\n margin-right: 10%;\n width: 90%;\n ", ";\n"], ["\n display: grid;\n margin-right: 10%;\n width: 90%;\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
|
});
|
|
@@ -14,12 +14,12 @@ import React, { Suspense } from 'react';
|
|
|
14
14
|
import { MessageContent, MessageContentPart } from '../conversation-styles';
|
|
15
15
|
var CustomMessage = function (props) {
|
|
16
16
|
var CustomComponent = useComponent(props.type);
|
|
17
|
-
if (
|
|
17
|
+
if (!CustomComponent) {
|
|
18
18
|
return null;
|
|
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,
|
|
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;
|
|
@@ -4,7 +4,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
4
4
|
};
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
|
-
var StyledTimestamp = styled.p(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n && {\n font-size: ", ";\n font-weight: 300;\n }\n margin: 0;\n line-height: 1.5em;\n grid-area: info;\n color: ", ";\n"], ["\n && {\n font-size: ", ";\n font-weight: 300;\n }\n margin: 0;\n line-height: 1.5em;\n grid-area: info;\n color: ", ";\n"])), function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.small; }, function (p) { var _a; return (_a = p.theme.colors) === null || _a === void 0 ? void 0 : _a.text; });
|
|
7
|
+
var StyledTimestamp = styled.p(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n && {\n font-size: ", ";\n font-weight: 300;\n }\n padding-top: ", ";\n margin: 0;\n line-height: 1.5em;\n grid-area: info;\n color: ", ";\n"], ["\n && {\n font-size: ", ";\n font-weight: 300;\n }\n padding-top: ", ";\n margin: 0;\n line-height: 1.5em;\n grid-area: info;\n color: ", ";\n"])), function (p) { var _a; return (_a = p.theme.fonts) === null || _a === void 0 ? void 0 : _a.small; }, 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.text; });
|
|
8
8
|
var getTimestamp = function (raw) {
|
|
9
9
|
return new Date(raw).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
|
10
10
|
};
|
|
@@ -14,6 +14,6 @@ var UserMessage = function (_a) {
|
|
|
14
14
|
children,
|
|
15
15
|
React.createElement(Timestamp, { name: userLabel, timestamp: timestamp })));
|
|
16
16
|
};
|
|
17
|
-
var StyledUserMessage = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-left:
|
|
17
|
+
var StyledUserMessage = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-left: 10%;\n width: 90%;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"], ["\n margin-left: 10%;\n width: 90%;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"])));
|
|
18
18
|
export default UserMessage;
|
|
19
19
|
var templateObject_1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-conversation",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "ACE Widget Conversation Platform",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -25,19 +25,21 @@
|
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"typings": "lib/index.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@telia-ace/widget-core": "^1.0.
|
|
29
|
-
"@telia-ace/widget-forms": "^1.0.
|
|
30
|
-
"@telia-ace/widget-plugins": "^1.0.
|
|
31
|
-
"@telia-ace/widget-routing": "^1.0.
|
|
32
|
-
"@telia-ace/widget-services": "^1.0.
|
|
33
|
-
"@telia-ace/widget-ui": "^1.0.
|
|
28
|
+
"@telia-ace/widget-core": "^1.0.4",
|
|
29
|
+
"@telia-ace/widget-forms": "^1.0.6",
|
|
30
|
+
"@telia-ace/widget-plugins": "^1.0.5",
|
|
31
|
+
"@telia-ace/widget-routing": "^1.0.5",
|
|
32
|
+
"@telia-ace/widget-services": "^1.0.4",
|
|
33
|
+
"@telia-ace/widget-ui": "^1.0.6",
|
|
34
34
|
"@telia-ace/widget-utilities": "^1.0.1",
|
|
35
|
-
"@webprovisions/platform": "^1.1.2"
|
|
35
|
+
"@webprovisions/platform": "^1.1.2"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
36
38
|
"react": "^16.8.0",
|
|
37
39
|
"styled-components": "^4.3.2"
|
|
38
40
|
},
|
|
39
41
|
"devDependencies": {
|
|
40
42
|
"@types/react": "^16.8.0"
|
|
41
43
|
},
|
|
42
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "4b6dbb4cf3dc608287f2480eaea0eaafe174c290"
|
|
43
45
|
}
|