@telia-ace/widget-conversation 1.0.1 → 1.0.2
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.
|
@@ -10,17 +10,41 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var
|
|
14
|
-
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
15
35
|
};
|
|
16
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
37
|
var widget_ui_1 = require("@telia-ace/widget-ui");
|
|
18
|
-
var react_1 =
|
|
38
|
+
var react_1 = __importStar(require("react"));
|
|
19
39
|
var conversation_styles_1 = require("../conversation-styles");
|
|
20
40
|
var CustomMessage = function (props) {
|
|
21
41
|
var CustomComponent = (0, widget_ui_1.useComponent)(props.type);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
42
|
+
if (typeof CustomComponent === 'undefined') {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return (react_1.default.createElement(react_1.Suspense, { fallback: null },
|
|
46
|
+
react_1.default.createElement(conversation_styles_1.MessageContent, { user: props.isUser, stacked: !!props.stacked && props.stacked, fullWidth: !!props.content.form || !!props.content.actions },
|
|
47
|
+
react_1.default.createElement(conversation_styles_1.MessageContentPart, null,
|
|
48
|
+
react_1.default.createElement(CustomComponent, __assign({}, props.content))))));
|
|
25
49
|
};
|
|
26
50
|
exports.default = CustomMessage;
|
|
@@ -10,12 +10,16 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { useComponent } from '@telia-ace/widget-ui';
|
|
13
|
-
import React from 'react';
|
|
13
|
+
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
if (typeof CustomComponent === 'undefined') {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return (React.createElement(Suspense, { fallback: null },
|
|
21
|
+
React.createElement(MessageContent, { user: props.isUser, stacked: !!props.stacked && props.stacked, fullWidth: !!props.content.form || !!props.content.actions },
|
|
22
|
+
React.createElement(MessageContentPart, null,
|
|
23
|
+
React.createElement(CustomComponent, __assign({}, props.content))))));
|
|
20
24
|
};
|
|
21
25
|
export default CustomMessage;
|
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.2",
|
|
4
4
|
"description": "ACE Widget Conversation Platform",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -26,18 +26,18 @@
|
|
|
26
26
|
"typings": "lib/index.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@telia-ace/widget-core": "^1.0.1",
|
|
29
|
-
"@telia-ace/widget-forms": "^1.0.
|
|
29
|
+
"@telia-ace/widget-forms": "^1.0.2",
|
|
30
30
|
"@telia-ace/widget-plugins": "^1.0.1",
|
|
31
31
|
"@telia-ace/widget-routing": "^1.0.1",
|
|
32
32
|
"@telia-ace/widget-services": "^1.0.1",
|
|
33
|
-
"@telia-ace/widget-ui": "^1.0.
|
|
33
|
+
"@telia-ace/widget-ui": "^1.0.2",
|
|
34
34
|
"@telia-ace/widget-utilities": "^1.0.1",
|
|
35
35
|
"@webprovisions/platform": "^1.1.2",
|
|
36
|
-
"react": "^
|
|
36
|
+
"react": "^16.8.0",
|
|
37
37
|
"styled-components": "^4.3.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@types/react": "^
|
|
40
|
+
"@types/react": "^16.8.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "cfdc4aa8242f645bb32e1293c13539462d03a9c9"
|
|
43
43
|
}
|