@abihealth/goapp-react-native 1.13.8 → 1.13.10
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/dist/common/animations/HorizontalLoadingAnimation/index.js +1 -1
- package/dist/common/api/auth.js +1 -1
- package/dist/common/api/config.js +1 -1
- package/dist/common/api/models/consultation.d.ts +2 -2
- package/dist/common/api/websocket.js +1 -1
- package/dist/common/components/AnswerScreen/Summary.js +10 -12
- package/dist/common/screens/AnswerScreen.js +6 -11
- package/dist/common/types/consultation.d.ts +7 -3
- package/dist/common/types/consultation.js +6 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ var react_native_1 = require("react-native");
|
|
|
9
9
|
var Animation_1 = __importDefault(require("../Animation"));
|
|
10
10
|
var xml_1 = require("./xml");
|
|
11
11
|
var HorizontalLoadingAnimation = function (_a) {
|
|
12
|
-
var color = _a.color, _b = _a.width, width = _b === void 0 ?
|
|
12
|
+
var color = _a.color, _b = _a.width, width = _b === void 0 ? 220 : _b, _c = _a.height, height = _c === void 0 ? 30 : _c;
|
|
13
13
|
return (<react_native_1.View pointerEvents="none">
|
|
14
14
|
<Animation_1.default source={(0, xml_1.getXml)({ color: color, width: width, height: height })} width={width} height={height}/>
|
|
15
15
|
</react_native_1.View>);
|
package/dist/common/api/auth.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.authorization = void 0;
|
|
4
4
|
var config_1 = require("./config");
|
|
5
5
|
var AUTH_URL = 'partner/authorization/token';
|
|
6
|
-
var BASE_URL = { ape1: 'https://
|
|
6
|
+
var BASE_URL = { ape1: 'https://client-dev-api.abi.ai' };
|
|
7
7
|
var authorization = function (_a) {
|
|
8
8
|
var region = _a.region, clientKey = _a.clientKey;
|
|
9
9
|
return config_1.axios
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.axios = exports.configureAxios = void 0;
|
|
7
7
|
var axios_1 = __importDefault(require("axios"));
|
|
8
8
|
exports.axios = axios_1.default;
|
|
9
|
-
var BASE_URL = { ape1: 'https://
|
|
9
|
+
var BASE_URL = { ape1: 'https://k5yf2da5xk.execute-api.eu-west-1.amazonaws.com/dev' };
|
|
10
10
|
var configureAxios = function (_a) {
|
|
11
11
|
var token = _a.token, region = _a.region;
|
|
12
12
|
axios_1.default.defaults.baseURL = BASE_URL[region];
|
|
@@ -12,12 +12,12 @@ export declare const createConsultationRequestSchema: z.ZodObject<{
|
|
|
12
12
|
question: z.ZodString;
|
|
13
13
|
attachments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
userId?: string;
|
|
16
15
|
question?: string;
|
|
16
|
+
userId?: string;
|
|
17
17
|
attachments?: string[];
|
|
18
18
|
}, {
|
|
19
|
-
userId?: string;
|
|
20
19
|
question?: string;
|
|
20
|
+
userId?: string;
|
|
21
21
|
attachments?: string[];
|
|
22
22
|
}>;
|
|
23
23
|
export declare const getActiveConsultationRequestSchema: z.ZodObject<{
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.connectWebsocket = void 0;
|
|
40
|
-
var WS_URL = { ape1: 'wss://
|
|
40
|
+
var WS_URL = { ape1: 'wss://g4lfnxt2hf.execute-api.eu-west-1.amazonaws.com/dev' };
|
|
41
41
|
var connectWebsocket = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
42
42
|
var token = _b.token, userId = _b.userId, region = _b.region;
|
|
43
43
|
return __generator(this, function (_c) {
|
|
@@ -5,6 +5,8 @@ var react_i18next_1 = require("react-i18next");
|
|
|
5
5
|
var react_native_1 = require("react-native");
|
|
6
6
|
var HorizontalLoadingAnimation_1 = require("../../animations/HorizontalLoadingAnimation");
|
|
7
7
|
var useTheme_1 = require("../../hooks/useTheme");
|
|
8
|
+
var PdfIcon_1 = require("../../icons/PdfIcon");
|
|
9
|
+
var Button_1 = require("../Button");
|
|
8
10
|
var FadeIn_1 = require("../FadeIn");
|
|
9
11
|
var Text_1 = require("../Text");
|
|
10
12
|
var Summary = function (_a) {
|
|
@@ -18,18 +20,14 @@ var Summary = function (_a) {
|
|
|
18
20
|
});
|
|
19
21
|
};
|
|
20
22
|
return (<FadeIn_1.FadeIn key={url}>
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<HorizontalLoadingAnimation_1.HorizontalLoadingAnimation color={theme.colors.primary} width={220} height={30}/>
|
|
30
|
-
</react_native_1.View>
|
|
31
|
-
</react_native_1.View>
|
|
32
|
-
{/* )} */}
|
|
23
|
+
{url ? (<Button_1.Button variant="secondary" icon={<PdfIcon_1.PdfIcon />} onPress={handleViewExternal}>
|
|
24
|
+
{t('button.open_summary')}
|
|
25
|
+
</Button_1.Button>) : (<react_native_1.View style={styles.loadingContainer}>
|
|
26
|
+
<Text_1.Text color={theme.colors.darkGray}>{t('loading_summary')}</Text_1.Text>
|
|
27
|
+
<react_native_1.View>
|
|
28
|
+
<HorizontalLoadingAnimation_1.HorizontalLoadingAnimation color={theme.colors.primary} width={220} height={30}/>
|
|
29
|
+
</react_native_1.View>
|
|
30
|
+
</react_native_1.View>)}
|
|
33
31
|
</FadeIn_1.FadeIn>);
|
|
34
32
|
};
|
|
35
33
|
exports.Summary = Summary;
|
|
@@ -48,6 +48,7 @@ var Text_1 = require("../components/Text");
|
|
|
48
48
|
var useConsultation_1 = require("../hooks/useConsultation");
|
|
49
49
|
var useTheme_1 = require("../hooks/useTheme");
|
|
50
50
|
var VideoConsultationIcon_1 = require("../icons/VideoConsultationIcon");
|
|
51
|
+
var consultation_1 = require("../types/consultation");
|
|
51
52
|
var SHOW_CLOSE_DELAY = 3000;
|
|
52
53
|
var AnswerScreen = function (_a) {
|
|
53
54
|
var _b;
|
|
@@ -67,17 +68,11 @@ var AnswerScreen = function (_a) {
|
|
|
67
68
|
return (<>
|
|
68
69
|
<ScreenWrapper_1.ScreenWrapper scrollRef={scrollRef} header={<Header_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<VideoConsultationIcon_1.VideoConsultationIcon />}/>} containerStyle={styles.container} onContentSizeChange={scrollEnd}>
|
|
69
70
|
{questions.map(function (_a, index) {
|
|
70
|
-
var
|
|
71
|
-
return (<
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
{answer && (<Card_1.Card type="answer" style={styles.answerCard}>
|
|
77
|
-
<PrescriptionCardHeader_1.ProfessionalCardHeader professional={professional}/>
|
|
78
|
-
<Text_1.Text>{answer}</Text_1.Text>
|
|
79
|
-
</Card_1.Card>)}
|
|
80
|
-
</react_1.Fragment>);
|
|
71
|
+
var text = _a.text, type = _a.type;
|
|
72
|
+
return (<Card_1.Card key={index} type={type} style={type === consultation_1.QuestionType.ANSWER ? styles.answerCard : undefined}>
|
|
73
|
+
{type === consultation_1.QuestionType.ANSWER && <PrescriptionCardHeader_1.ProfessionalCardHeader professional={professional}/>}
|
|
74
|
+
<Text_1.Text>{text}</Text_1.Text>
|
|
75
|
+
</Card_1.Card>);
|
|
81
76
|
})}
|
|
82
77
|
|
|
83
78
|
{prescription && <PrescriptionCard_1.PrescriptionCard prescription={prescription}/>}
|
|
@@ -26,11 +26,15 @@ export type License = {
|
|
|
26
26
|
licenseNumber: string;
|
|
27
27
|
countries: string[];
|
|
28
28
|
};
|
|
29
|
+
export declare enum QuestionType {
|
|
30
|
+
QUESTION = "question",
|
|
31
|
+
ANSWER = "answer"
|
|
32
|
+
}
|
|
29
33
|
export type Question = {
|
|
30
34
|
createdAt?: number;
|
|
31
|
-
|
|
32
|
-
attachments
|
|
33
|
-
|
|
35
|
+
text: string;
|
|
36
|
+
attachments?: string[];
|
|
37
|
+
type: QuestionType;
|
|
34
38
|
};
|
|
35
39
|
export declare enum DELIVERY_ADDRESS_STATUS {
|
|
36
40
|
PENDING = "pending",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONSULTATION_EVENT = exports.CONSULTATION_STATUS = exports.DELIVERY_ADDRESS_STATUS = exports.IndicationFileStatus = exports.CASE_TYPE = void 0;
|
|
3
|
+
exports.CONSULTATION_EVENT = exports.CONSULTATION_STATUS = exports.DELIVERY_ADDRESS_STATUS = exports.QuestionType = exports.IndicationFileStatus = exports.CASE_TYPE = void 0;
|
|
4
4
|
var CASE_TYPE;
|
|
5
5
|
(function (CASE_TYPE) {
|
|
6
6
|
CASE_TYPE["MEDICAL"] = "medicalConsultation";
|
|
@@ -15,6 +15,11 @@ var IndicationFileStatus;
|
|
|
15
15
|
IndicationFileStatus["CREATED"] = "CREATED";
|
|
16
16
|
IndicationFileStatus["ERROR"] = "ERROR";
|
|
17
17
|
})(IndicationFileStatus || (exports.IndicationFileStatus = IndicationFileStatus = {}));
|
|
18
|
+
var QuestionType;
|
|
19
|
+
(function (QuestionType) {
|
|
20
|
+
QuestionType["QUESTION"] = "question";
|
|
21
|
+
QuestionType["ANSWER"] = "answer";
|
|
22
|
+
})(QuestionType || (exports.QuestionType = QuestionType = {}));
|
|
18
23
|
var DELIVERY_ADDRESS_STATUS;
|
|
19
24
|
(function (DELIVERY_ADDRESS_STATUS) {
|
|
20
25
|
DELIVERY_ADDRESS_STATUS["PENDING"] = "pending";
|