@abihealth/goapp-react-native 1.13.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.
- package/CHANGELOG.md +157 -0
- package/README.md +3 -0
- package/dist/common/animations/Animation.d.ts +10 -0
- package/dist/common/animations/Animation.js +38 -0
- package/dist/common/animations/FindingAnimation/index.d.ts +2 -0
- package/dist/common/animations/FindingAnimation/index.js +20 -0
- package/dist/common/animations/FindingAnimation/xml.d.ts +2 -0
- package/dist/common/animations/FindingAnimation/xml.js +7 -0
- package/dist/common/animations/HorizontalLoadingAnimation/index.d.ts +5 -0
- package/dist/common/animations/HorizontalLoadingAnimation/index.js +14 -0
- package/dist/common/animations/HorizontalLoadingAnimation/xml.d.ts +1 -0
- package/dist/common/animations/HorizontalLoadingAnimation/xml.js +5 -0
- package/dist/common/animations/LoadingCircleAnimation/index.d.ts +2 -0
- package/dist/common/animations/LoadingCircleAnimation/index.js +24 -0
- package/dist/common/animations/LoadingCircleAnimation/xml.d.ts +2 -0
- package/dist/common/animations/LoadingCircleAnimation/xml.js +5 -0
- package/dist/common/animations/LoadingDotsAnimation/index.d.ts +6 -0
- package/dist/common/animations/LoadingDotsAnimation/index.js +17 -0
- package/dist/common/animations/LoadingDotsAnimation/xml.d.ts +1 -0
- package/dist/common/animations/LoadingDotsAnimation/xml.js +5 -0
- package/dist/common/animations/LoadingHeart.d.ts +2 -0
- package/dist/common/animations/LoadingHeart.js +92 -0
- package/dist/common/api/auth.d.ts +2 -0
- package/dist/common/api/auth.js +18 -0
- package/dist/common/api/config.d.ts +7 -0
- package/dist/common/api/config.js +15 -0
- package/dist/common/api/consultation.d.ts +6 -0
- package/dist/common/api/consultation.js +80 -0
- package/dist/common/api/models/auth.d.ts +8 -0
- package/dist/common/api/models/auth.js +2 -0
- package/dist/common/api/models/consultation.d.ts +70 -0
- package/dist/common/api/models/consultation.js +23 -0
- package/dist/common/api/models/region.d.ts +1 -0
- package/dist/common/api/models/region.js +2 -0
- package/dist/common/api/models/user.d.ts +5 -0
- package/dist/common/api/models/user.js +2 -0
- package/dist/common/api/models/websocket.d.ts +6 -0
- package/dist/common/api/models/websocket.js +2 -0
- package/dist/common/api/user.d.ts +2 -0
- package/dist/common/api/user.js +10 -0
- package/dist/common/api/websocket.d.ts +6 -0
- package/dist/common/api/websocket.js +66 -0
- package/dist/common/assets/background-pattern.png +0 -0
- package/dist/common/components/ActionSheet.d.ts +6 -0
- package/dist/common/components/ActionSheet.js +43 -0
- package/dist/common/components/AnswerScreen/Card.d.ts +8 -0
- package/dist/common/components/AnswerScreen/Card.js +76 -0
- package/dist/common/components/AnswerScreen/CloseConsultationActionSheet.d.ts +2 -0
- package/dist/common/components/AnswerScreen/CloseConsultationActionSheet.js +109 -0
- package/dist/common/components/AnswerScreen/DeliveryAddressCard.d.ts +5 -0
- package/dist/common/components/AnswerScreen/DeliveryAddressCard.js +39 -0
- package/dist/common/components/AnswerScreen/PrescriptionCard/PrescriptionCardHeader.d.ts +5 -0
- package/dist/common/components/AnswerScreen/PrescriptionCard/PrescriptionCardHeader.js +79 -0
- package/dist/common/components/AnswerScreen/PrescriptionCard/index.d.ts +5 -0
- package/dist/common/components/AnswerScreen/PrescriptionCard/index.js +46 -0
- package/dist/common/components/AnswerScreen/Summary.d.ts +5 -0
- package/dist/common/components/AnswerScreen/Summary.js +49 -0
- package/dist/common/components/BackgroundPattern.d.ts +2 -0
- package/dist/common/components/BackgroundPattern.js +19 -0
- package/dist/common/components/Button.d.ts +14 -0
- package/dist/common/components/Button.js +124 -0
- package/dist/common/components/CancelConsultationButton.d.ts +2 -0
- package/dist/common/components/CancelConsultationButton.js +107 -0
- package/dist/common/components/Card.d.ts +2 -0
- package/dist/common/components/Card.js +13 -0
- package/dist/common/components/Checkbox.d.ts +7 -0
- package/dist/common/components/Checkbox.js +75 -0
- package/dist/common/components/DateInput.d.ts +8 -0
- package/dist/common/components/DateInput.js +76 -0
- package/dist/common/components/DoctorProfileCard.d.ts +8 -0
- package/dist/common/components/DoctorProfileCard.js +128 -0
- package/dist/common/components/FadeIn.d.ts +8 -0
- package/dist/common/components/FadeIn.js +66 -0
- package/dist/common/components/FormControl.d.ts +8 -0
- package/dist/common/components/FormControl.js +40 -0
- package/dist/common/components/FormWrapper.d.ts +11 -0
- package/dist/common/components/FormWrapper.js +46 -0
- package/dist/common/components/Header.d.ts +10 -0
- package/dist/common/components/Header.js +109 -0
- package/dist/common/components/Input.d.ts +8 -0
- package/dist/common/components/Input.js +74 -0
- package/dist/common/components/Modal/AttachmentPreviewModal.d.ts +9 -0
- package/dist/common/components/Modal/AttachmentPreviewModal.js +68 -0
- package/dist/common/components/Modal/CancelModal.d.ts +9 -0
- package/dist/common/components/Modal/CancelModal.js +16 -0
- package/dist/common/components/Modal/CloseConsultationModal.d.ts +9 -0
- package/dist/common/components/Modal/CloseConsultationModal.js +16 -0
- package/dist/common/components/Modal/DoctorProfileModal.d.ts +8 -0
- package/dist/common/components/Modal/DoctorProfileModal.js +47 -0
- package/dist/common/components/Modal/ModalHeader.d.ts +7 -0
- package/dist/common/components/Modal/ModalHeader.js +40 -0
- package/dist/common/components/Modal/TwoOptionsModal.d.ts +14 -0
- package/dist/common/components/Modal/TwoOptionsModal.js +58 -0
- package/dist/common/components/Modal/index.d.ts +7 -0
- package/dist/common/components/Modal/index.js +57 -0
- package/dist/common/components/PhoneInput.d.ts +11 -0
- package/dist/common/components/PhoneInput.js +81 -0
- package/dist/common/components/Reminder.d.ts +7 -0
- package/dist/common/components/Reminder.js +214 -0
- package/dist/common/components/ScreenWrapper.d.ts +12 -0
- package/dist/common/components/ScreenWrapper.js +46 -0
- package/dist/common/components/Select.d.ts +17 -0
- package/dist/common/components/Select.js +132 -0
- package/dist/common/components/Slide.d.ts +13 -0
- package/dist/common/components/Slide.js +83 -0
- package/dist/common/components/SlideUp.d.ts +8 -0
- package/dist/common/components/SlideUp.js +69 -0
- package/dist/common/components/Text.d.ts +22 -0
- package/dist/common/components/Text.js +130 -0
- package/dist/common/contexts/ConsultationContext.d.ts +22 -0
- package/dist/common/contexts/ConsultationContext.js +215 -0
- package/dist/common/contexts/FormContext.d.ts +25 -0
- package/dist/common/contexts/FormContext.js +55 -0
- package/dist/common/contexts/ThemeContext.d.ts +13 -0
- package/dist/common/contexts/ThemeContext.js +18 -0
- package/dist/common/hooks/useConsultation.d.ts +13 -0
- package/dist/common/hooks/useConsultation.js +166 -0
- package/dist/common/hooks/useForm.d.ts +10 -0
- package/dist/common/hooks/useForm.js +107 -0
- package/dist/common/hooks/useHeader.d.ts +4 -0
- package/dist/common/hooks/useHeader.js +10 -0
- package/dist/common/hooks/useTheme.d.ts +2 -0
- package/dist/common/hooks/useTheme.js +26 -0
- package/dist/common/hooks/useUser.d.ts +4 -0
- package/dist/common/hooks/useUser.js +10 -0
- package/dist/common/icons/AbiLogoIcon.d.ts +2 -0
- package/dist/common/icons/AbiLogoIcon.js +53 -0
- package/dist/common/icons/BackArrowIcon.d.ts +2 -0
- package/dist/common/icons/BackArrowIcon.js +49 -0
- package/dist/common/icons/CalendarIcon.d.ts +3 -0
- package/dist/common/icons/CalendarIcon.js +43 -0
- package/dist/common/icons/CheckSuccessIcon.d.ts +3 -0
- package/dist/common/icons/CheckSuccessIcon.js +47 -0
- package/dist/common/icons/CloseIcon.d.ts +5 -0
- package/dist/common/icons/CloseIcon.js +51 -0
- package/dist/common/icons/DoctorIcon.d.ts +3 -0
- package/dist/common/icons/DoctorIcon.js +48 -0
- package/dist/common/icons/DoctorImagePlaceholderIcon.d.ts +5 -0
- package/dist/common/icons/DoctorImagePlaceholderIcon.js +64 -0
- package/dist/common/icons/DropdownIcon.d.ts +3 -0
- package/dist/common/icons/DropdownIcon.js +41 -0
- package/dist/common/icons/ExitIcon.d.ts +2 -0
- package/dist/common/icons/ExitIcon.js +58 -0
- package/dist/common/icons/InfoIcon.d.ts +2 -0
- package/dist/common/icons/InfoIcon.js +49 -0
- package/dist/common/icons/KoCircleIcon.d.ts +3 -0
- package/dist/common/icons/KoCircleIcon.js +42 -0
- package/dist/common/icons/MotorbikeIcon.d.ts +2 -0
- package/dist/common/icons/MotorbikeIcon.js +65 -0
- package/dist/common/icons/NoCaseFoundIcon.d.ts +3 -0
- package/dist/common/icons/NoCaseFoundIcon.js +55 -0
- package/dist/common/icons/PdfDownloadIcon.d.ts +2 -0
- package/dist/common/icons/PdfDownloadIcon.js +58 -0
- package/dist/common/icons/PdfIcon.d.ts +2 -0
- package/dist/common/icons/PdfIcon.js +50 -0
- package/dist/common/icons/PersonIcon.d.ts +3 -0
- package/dist/common/icons/PersonIcon.js +45 -0
- package/dist/common/icons/PillsIcon.d.ts +2 -0
- package/dist/common/icons/PillsIcon.js +52 -0
- package/dist/common/icons/PlaneIcon.d.ts +5 -0
- package/dist/common/icons/PlaneIcon.js +48 -0
- package/dist/common/icons/RatingIcon.d.ts +2 -0
- package/dist/common/icons/RatingIcon.js +53 -0
- package/dist/common/icons/StarIcon.d.ts +4 -0
- package/dist/common/icons/StarIcon.js +57 -0
- package/dist/common/icons/TextConsultationIcon.d.ts +4 -0
- package/dist/common/icons/TextConsultationIcon.js +53 -0
- package/dist/common/icons/TrashIcon.d.ts +2 -0
- package/dist/common/icons/TrashIcon.js +49 -0
- package/dist/common/icons/VideoConsultationIcon.d.ts +4 -0
- package/dist/common/icons/VideoConsultationIcon.js +50 -0
- package/dist/common/index.d.ts +57 -0
- package/dist/common/index.js +114 -0
- package/dist/common/locale/i18n.d.ts +5 -0
- package/dist/common/locale/i18n.js +79 -0
- package/dist/common/locale/translations/ar-AE.base.json +604 -0
- package/dist/common/locale/translations/ar-LB.base.json +604 -0
- package/dist/common/locale/translations/bg.base.json +488 -0
- package/dist/common/locale/translations/cs.base.json +499 -0
- package/dist/common/locale/translations/en.base.json +923 -0
- package/dist/common/locale/translations/es-MX.base.json +827 -0
- package/dist/common/locale/translations/es.base.json +827 -0
- package/dist/common/locale/translations/fr.base.json +605 -0
- package/dist/common/locale/translations/hu.base.json +488 -0
- package/dist/common/locale/translations/pl.base.json +487 -0
- package/dist/common/locale/translations/ro.base.json +501 -0
- package/dist/common/locale/translations/ru.base.json +603 -0
- package/dist/common/locale/translations/sk.base.json +535 -0
- package/dist/common/locale/translations/zh-HK.base.json +349 -0
- package/dist/common/locale/translations/zh-SG.base.json +603 -0
- package/dist/common/locale/translations/zh-TW.base.json +873 -0
- package/dist/common/screens/AnswerScreen.d.ts +11 -0
- package/dist/common/screens/AnswerScreen.js +101 -0
- package/dist/common/screens/MatchScreen.d.ts +5 -0
- package/dist/common/screens/MatchScreen.js +36 -0
- package/dist/common/screens/MatchingScreen.d.ts +2 -0
- package/dist/common/screens/MatchingScreen.js +41 -0
- package/dist/common/screens/NoConsultationFoundScreen.d.ts +2 -0
- package/dist/common/screens/NoConsultationFoundScreen.js +34 -0
- package/dist/common/screens/PreparingSummaryScreen.d.ts +5 -0
- package/dist/common/screens/PreparingSummaryScreen.js +35 -0
- package/dist/common/screens/RatingScreen.d.ts +2 -0
- package/dist/common/screens/RatingScreen.js +198 -0
- package/dist/common/screens/index.d.ts +3 -0
- package/dist/common/screens/index.js +29 -0
- package/dist/common/types/consultation.d.ts +93 -0
- package/dist/common/types/consultation.js +41 -0
- package/dist/common/types/deliveryAddress.d.ts +18 -0
- package/dist/common/types/deliveryAddress.js +11 -0
- package/dist/common/types/events.d.ts +13 -0
- package/dist/common/types/events.js +15 -0
- package/dist/common/types/prescription.d.ts +52 -0
- package/dist/common/types/prescription.js +31 -0
- package/dist/common/types/professional.d.ts +14 -0
- package/dist/common/types/professional.js +2 -0
- package/dist/common/types/theme.d.ts +82 -0
- package/dist/common/types/theme.js +58 -0
- package/dist/common/types/user.d.ts +10 -0
- package/dist/common/types/user.js +2 -0
- package/dist/common/utils/platform.d.ts +3 -0
- package/dist/common/utils/platform.js +7 -0
- package/dist/common/utils/professional.d.ts +2 -0
- package/dist/common/utils/professional.js +12 -0
- package/dist/common/utils/zod.d.ts +5 -0
- package/dist/common/utils/zod.js +19 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +133 -0
- package/dist/video-consultations/animations/CallingAnimation/index.d.ts +2 -0
- package/dist/video-consultations/animations/CallingAnimation/index.js +17 -0
- package/dist/video-consultations/animations/CallingAnimation/xml.d.ts +2 -0
- package/dist/video-consultations/animations/CallingAnimation/xml.js +5 -0
- package/dist/video-consultations/api/models/video.d.ts +10 -0
- package/dist/video-consultations/api/models/video.js +2 -0
- package/dist/video-consultations/api/video.d.ts +3 -0
- package/dist/video-consultations/api/video.js +12 -0
- package/dist/video-consultations/components/AgoraWrapper/components/BaseRenderUsers.d.ts +12 -0
- package/dist/video-consultations/components/AgoraWrapper/components/BaseRenderUsers.js +174 -0
- package/dist/video-consultations/components/AgoraWrapper/components/BtnControls.d.ts +14 -0
- package/dist/video-consultations/components/AgoraWrapper/components/BtnControls.js +55 -0
- package/dist/video-consultations/components/AgoraWrapper/components/ui/index.d.ts +14 -0
- package/dist/video-consultations/components/AgoraWrapper/components/ui/index.js +100 -0
- package/dist/video-consultations/components/AgoraWrapper/index.d.ts +8 -0
- package/dist/video-consultations/components/AgoraWrapper/index.js +173 -0
- package/dist/video-consultations/components/Modal/EndVideoCallModal.d.ts +8 -0
- package/dist/video-consultations/components/Modal/EndVideoCallModal.js +15 -0
- package/dist/video-consultations/components/VideoConsultation.d.ts +7 -0
- package/dist/video-consultations/components/VideoConsultation.js +42 -0
- package/dist/video-consultations/helpers/eventHandler.d.ts +14 -0
- package/dist/video-consultations/helpers/eventHandler.js +61 -0
- package/dist/video-consultations/hooks/useInitRtcEngine.d.ts +15 -0
- package/dist/video-consultations/hooks/useInitRtcEngine.js +194 -0
- package/dist/video-consultations/icons/EndVideoCallIcon.d.ts +2 -0
- package/dist/video-consultations/icons/EndVideoCallIcon.js +51 -0
- package/dist/video-consultations/icons/HangUpIcon.d.ts +3 -0
- package/dist/video-consultations/icons/HangUpIcon.js +41 -0
- package/dist/video-consultations/icons/MicroOffIcon.d.ts +7 -0
- package/dist/video-consultations/icons/MicroOffIcon.js +47 -0
- package/dist/video-consultations/icons/MicroOnIcon.d.ts +3 -0
- package/dist/video-consultations/icons/MicroOnIcon.js +42 -0
- package/dist/video-consultations/icons/PersonIcon.d.ts +3 -0
- package/dist/video-consultations/icons/PersonIcon.js +45 -0
- package/dist/video-consultations/icons/SwitchCameraIcon.d.ts +3 -0
- package/dist/video-consultations/icons/SwitchCameraIcon.js +41 -0
- package/dist/video-consultations/icons/VideoOffIcon.d.ts +5 -0
- package/dist/video-consultations/icons/VideoOffIcon.js +44 -0
- package/dist/video-consultations/icons/VideoOnIcon.d.ts +3 -0
- package/dist/video-consultations/icons/VideoOnIcon.js +41 -0
- package/dist/video-consultations/index.d.ts +10 -0
- package/dist/video-consultations/index.js +24 -0
- package/dist/video-consultations/screens/DeliveryAddressScreen.d.ts +2 -0
- package/dist/video-consultations/screens/DeliveryAddressScreen.js +84 -0
- package/dist/video-consultations/screens/EndingVideoScreen.d.ts +5 -0
- package/dist/video-consultations/screens/EndingVideoScreen.js +27 -0
- package/dist/video-consultations/screens/JoinVideoCallScreen.d.ts +5 -0
- package/dist/video-consultations/screens/JoinVideoCallScreen.js +108 -0
- package/dist/video-consultations/screens/ProcessingPrescriptionScreen.d.ts +2 -0
- package/dist/video-consultations/screens/ProcessingPrescriptionScreen.js +32 -0
- package/dist/video-consultations/screens/VideoCallScreen.d.ts +3 -0
- package/dist/video-consultations/screens/VideoCallScreen.js +77 -0
- package/dist/video-consultations/utils/permission.d.ts +14 -0
- package/dist/video-consultations/utils/permission.js +97 -0
- package/package.json +58 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
var React = __importStar(require("react"));
|
|
37
|
+
var react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
38
|
+
var VideoOffIcon = function (_a) {
|
|
39
|
+
var _b = _a.size, size = _b === void 0 ? 38 : _b;
|
|
40
|
+
return (<react_native_svg_1.default width={size} height={size} fill="none" viewBox="0 0 38 38">
|
|
41
|
+
<react_native_svg_1.Path fill="#fff" fillRule="evenodd" d="M6.498 4.284a1 1 0 1 0-1.396 1.432L9.495 10H6.1c-.8 0-1.6.6-1.6 1.5v15.4c0 .8.8 1.5 1.6 1.5h19.3c.74 0 1.48-.685 1.587-1.342l6.315 6.158a1 1 0 1 0 1.396-1.432l-28.2-27.5ZM27 21.6l6.4 6.2v-17L27 17v-5.4c0-.9-.8-1.5-1.6-1.5H14.7L26.9 22v-.4h.1Z" clipRule="evenodd"/>
|
|
42
|
+
</react_native_svg_1.default>);
|
|
43
|
+
};
|
|
44
|
+
exports.default = VideoOffIcon;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
var React = __importStar(require("react"));
|
|
37
|
+
var react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
38
|
+
var VideoOnIcon = function () { return (<react_native_svg_1.default width={39} height={38} fill="none">
|
|
39
|
+
<react_native_svg_1.Path fill="#fff" d="M27.97 16.933v-5.392c0-.925-.803-1.541-1.606-1.541H7.104c-.802 0-1.604.616-1.604 1.54v15.408c0 .77.802 1.54 1.605 1.54h19.26c.802 0 1.604-.77 1.604-1.54v-5.392l6.42 6.162V10.77l-6.42 6.163Z"/>
|
|
40
|
+
</react_native_svg_1.default>); };
|
|
41
|
+
exports.default = VideoOnIcon;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CallingAnimation } from './animations/CallingAnimation';
|
|
2
|
+
import AgoraWrapper from './components/AgoraWrapper';
|
|
3
|
+
import { EndVideoCallModal } from './components/Modal/EndVideoCallModal';
|
|
4
|
+
import { VideoConsultation } from './components/VideoConsultation';
|
|
5
|
+
import { DeliveryAddressScreen } from './screens/DeliveryAddressScreen';
|
|
6
|
+
import { EndingVideoScreen } from './screens/EndingVideoScreen';
|
|
7
|
+
import { JoinVideoCallScreen } from './screens/JoinVideoCallScreen';
|
|
8
|
+
import { ProcessingPrescriptionScreen } from './screens/ProcessingPrescriptionScreen';
|
|
9
|
+
import VideoCallScreen from './screens/VideoCallScreen';
|
|
10
|
+
export { AgoraWrapper, CallingAnimation, DeliveryAddressScreen, EndingVideoScreen, EndVideoCallModal, JoinVideoCallScreen, ProcessingPrescriptionScreen, VideoCallScreen, VideoConsultation };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.VideoConsultation = exports.VideoCallScreen = exports.ProcessingPrescriptionScreen = exports.JoinVideoCallScreen = exports.EndVideoCallModal = exports.EndingVideoScreen = exports.DeliveryAddressScreen = exports.CallingAnimation = exports.AgoraWrapper = void 0;
|
|
7
|
+
var CallingAnimation_1 = require("./animations/CallingAnimation");
|
|
8
|
+
Object.defineProperty(exports, "CallingAnimation", { enumerable: true, get: function () { return CallingAnimation_1.CallingAnimation; } });
|
|
9
|
+
var AgoraWrapper_1 = __importDefault(require("./components/AgoraWrapper"));
|
|
10
|
+
exports.AgoraWrapper = AgoraWrapper_1.default;
|
|
11
|
+
var EndVideoCallModal_1 = require("./components/Modal/EndVideoCallModal");
|
|
12
|
+
Object.defineProperty(exports, "EndVideoCallModal", { enumerable: true, get: function () { return EndVideoCallModal_1.EndVideoCallModal; } });
|
|
13
|
+
var VideoConsultation_1 = require("./components/VideoConsultation");
|
|
14
|
+
Object.defineProperty(exports, "VideoConsultation", { enumerable: true, get: function () { return VideoConsultation_1.VideoConsultation; } });
|
|
15
|
+
var DeliveryAddressScreen_1 = require("./screens/DeliveryAddressScreen");
|
|
16
|
+
Object.defineProperty(exports, "DeliveryAddressScreen", { enumerable: true, get: function () { return DeliveryAddressScreen_1.DeliveryAddressScreen; } });
|
|
17
|
+
var EndingVideoScreen_1 = require("./screens/EndingVideoScreen");
|
|
18
|
+
Object.defineProperty(exports, "EndingVideoScreen", { enumerable: true, get: function () { return EndingVideoScreen_1.EndingVideoScreen; } });
|
|
19
|
+
var JoinVideoCallScreen_1 = require("./screens/JoinVideoCallScreen");
|
|
20
|
+
Object.defineProperty(exports, "JoinVideoCallScreen", { enumerable: true, get: function () { return JoinVideoCallScreen_1.JoinVideoCallScreen; } });
|
|
21
|
+
var ProcessingPrescriptionScreen_1 = require("./screens/ProcessingPrescriptionScreen");
|
|
22
|
+
Object.defineProperty(exports, "ProcessingPrescriptionScreen", { enumerable: true, get: function () { return ProcessingPrescriptionScreen_1.ProcessingPrescriptionScreen; } });
|
|
23
|
+
var VideoCallScreen_1 = __importDefault(require("./screens/VideoCallScreen"));
|
|
24
|
+
exports.VideoCallScreen = VideoCallScreen_1.default;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.DeliveryAddressScreen = void 0;
|
|
43
|
+
var react_1 = __importDefault(require("react"));
|
|
44
|
+
var react_native_1 = require("react-native");
|
|
45
|
+
var index_1 = require("../../common/index");
|
|
46
|
+
var DeliveryAddressScreen = function () {
|
|
47
|
+
var t = (0, index_1.useTranslation)().t;
|
|
48
|
+
var theme = (0, index_1.useTheme)();
|
|
49
|
+
var styles = getStyles(theme);
|
|
50
|
+
return (<index_1.ScreenWrapper header={<index_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<index_1.VideoConsultationIcon />}/>} containerStyle={styles.container}>
|
|
51
|
+
<react_native_1.View>
|
|
52
|
+
<index_1.Text variant="h2" color={theme.colors.primary} center>
|
|
53
|
+
{t('delivery.address.title')}
|
|
54
|
+
</index_1.Text>
|
|
55
|
+
<index_1.Text center>{t('delivery.address.description')}</index_1.Text>
|
|
56
|
+
</react_native_1.View>
|
|
57
|
+
|
|
58
|
+
<index_1.FormWrapper schema={index_1.HKDeliveryAddressSchema} onSubmit={{
|
|
59
|
+
onSuccess: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
60
|
+
return [2 /*return*/, react_native_1.Alert.alert('Screen:success')];
|
|
61
|
+
}); }); },
|
|
62
|
+
onError: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
63
|
+
return [2 /*return*/, react_native_1.Alert.alert('Screen:error')];
|
|
64
|
+
}); }); },
|
|
65
|
+
onFinally: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
66
|
+
return [2 /*return*/, react_native_1.Alert.alert('Screen:finally')];
|
|
67
|
+
}); }); }
|
|
68
|
+
}} submitButton={<index_1.Button submit>{t('button.confirm')}</index_1.Button>}>
|
|
69
|
+
<index_1.Input id="house" label={t('delivery.address.number_and_floor')} placeholder={t('delivery.address.number_and_floor.placeholder')}/>
|
|
70
|
+
<index_1.Input id="street" label={t('delivery.address.street')} placeholder={t('delivery.address.street.placeholder')}/>
|
|
71
|
+
<index_1.Input id="building" label={t('delivery.address.building_name_number')} placeholder={t('delivery.address.building_name_number.placeholder')}/>
|
|
72
|
+
<index_1.Input id="district" label={t('delivery.address.district_city')} placeholder={t('delivery.address.district_city.placeholder')}/>
|
|
73
|
+
</index_1.FormWrapper>
|
|
74
|
+
</index_1.ScreenWrapper>);
|
|
75
|
+
};
|
|
76
|
+
exports.DeliveryAddressScreen = DeliveryAddressScreen;
|
|
77
|
+
var getStyles = function (_a) {
|
|
78
|
+
var spacing = _a.spacing;
|
|
79
|
+
return react_native_1.StyleSheet.create({
|
|
80
|
+
container: {
|
|
81
|
+
rowGap: spacing.xl
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.EndingVideoScreen = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var react_native_1 = require("react-native");
|
|
9
|
+
var index_1 = require("../../common/index");
|
|
10
|
+
var EndingVideoScreen = function (_a) {
|
|
11
|
+
var professional = _a.professional;
|
|
12
|
+
var t = (0, index_1.useTranslation)().t;
|
|
13
|
+
var theme = (0, index_1.useTheme)();
|
|
14
|
+
var styles = getStyles(theme);
|
|
15
|
+
return (<index_1.ScreenWrapper header={<index_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<index_1.VideoConsultationIcon />}/>} containerStyle={styles.container}>
|
|
16
|
+
<index_1.DoctorProfileCard professional={professional} description={t('general.consultation.videoConsultation.ending')}/>
|
|
17
|
+
</index_1.ScreenWrapper>);
|
|
18
|
+
};
|
|
19
|
+
exports.EndingVideoScreen = EndingVideoScreen;
|
|
20
|
+
var getStyles = function (_a) {
|
|
21
|
+
var spacing = _a.spacing;
|
|
22
|
+
return react_native_1.StyleSheet.create({
|
|
23
|
+
container: {
|
|
24
|
+
rowGap: spacing.sm
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.JoinVideoCallScreen = void 0;
|
|
40
|
+
var index_1 = require("../../common/index");
|
|
41
|
+
var react_1 = __importStar(require("react"));
|
|
42
|
+
var react_native_1 = require("react-native");
|
|
43
|
+
var CallingAnimation_1 = require("../animations/CallingAnimation");
|
|
44
|
+
var VideoCallScreen_1 = __importDefault(require("./VideoCallScreen"));
|
|
45
|
+
var JoinVideoCallScreen = function (_a) {
|
|
46
|
+
var professional = _a.professional;
|
|
47
|
+
var t = (0, index_1.useTranslation)().t;
|
|
48
|
+
var theme = (0, index_1.useTheme)();
|
|
49
|
+
var styles = getStyles(theme);
|
|
50
|
+
var _b = (0, react_1.useState)(false), joined = _b[0], setJoined = _b[1];
|
|
51
|
+
var onJoinVideoCall = function () {
|
|
52
|
+
setJoined(true);
|
|
53
|
+
};
|
|
54
|
+
if (joined)
|
|
55
|
+
return <VideoCallScreen_1.default />;
|
|
56
|
+
return (<index_1.ScreenWrapper header={<index_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<index_1.VideoConsultationIcon />} rightIcon={<index_1.CloseIcon />}/>} containerStyle={styles.container}>
|
|
57
|
+
<index_1.Text variant="h2" color={theme.colors.primary} center>
|
|
58
|
+
{t('video.calling.physician_female', { name: (0, index_1.getProfessionalLabel)(professional) })}
|
|
59
|
+
</index_1.Text>
|
|
60
|
+
|
|
61
|
+
<react_native_1.View style={styles.animationContainer}>
|
|
62
|
+
<CallingAnimation_1.CallingAnimation />
|
|
63
|
+
</react_native_1.View>
|
|
64
|
+
|
|
65
|
+
<index_1.Button icon={<index_1.VideoConsultationIcon />} onPress={onJoinVideoCall}>
|
|
66
|
+
{t('video.calling.button')}
|
|
67
|
+
</index_1.Button>
|
|
68
|
+
|
|
69
|
+
<react_native_1.View style={styles.disclaimerCard}>
|
|
70
|
+
<index_1.InfoIcon />
|
|
71
|
+
|
|
72
|
+
<react_native_1.View style={styles.disclaimerInnerContainer}>
|
|
73
|
+
<index_1.Text>{t('video.camera_and_microphone_access')}</index_1.Text>
|
|
74
|
+
|
|
75
|
+
<react_native_1.TouchableOpacity activeOpacity={0.6}>
|
|
76
|
+
<index_1.Text color={theme.colors.rating} bold>
|
|
77
|
+
{t('video.camera_and_microphone_access.highlight')}
|
|
78
|
+
</index_1.Text>
|
|
79
|
+
</react_native_1.TouchableOpacity>
|
|
80
|
+
</react_native_1.View>
|
|
81
|
+
</react_native_1.View>
|
|
82
|
+
|
|
83
|
+
<index_1.Text center>{t('video.calling.not_refresh')}</index_1.Text>
|
|
84
|
+
</index_1.ScreenWrapper>);
|
|
85
|
+
};
|
|
86
|
+
exports.JoinVideoCallScreen = JoinVideoCallScreen;
|
|
87
|
+
var getStyles = function (_a) {
|
|
88
|
+
var colors = _a.colors, spacing = _a.spacing, borderRadius = _a.borderRadius;
|
|
89
|
+
return react_native_1.StyleSheet.create({
|
|
90
|
+
container: {
|
|
91
|
+
paddingTop: spacing.xl
|
|
92
|
+
},
|
|
93
|
+
animationContainer: { width: '100%', alignItems: 'center' },
|
|
94
|
+
disclaimerCard: {
|
|
95
|
+
marginTop: spacing.sm,
|
|
96
|
+
marginBottom: spacing.md,
|
|
97
|
+
backgroundColor: colors.white,
|
|
98
|
+
padding: spacing.sm,
|
|
99
|
+
borderRadius: borderRadius.md,
|
|
100
|
+
flexDirection: 'row',
|
|
101
|
+
columnGap: spacing.sm,
|
|
102
|
+
alignItems: 'center'
|
|
103
|
+
},
|
|
104
|
+
disclaimerInnerContainer: {
|
|
105
|
+
flex: 1
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ProcessingPrescriptionScreen = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var react_native_1 = require("react-native");
|
|
9
|
+
var index_1 = require("../../common/index");
|
|
10
|
+
var ProcessingPrescriptionScreen = function () {
|
|
11
|
+
var t = (0, index_1.useTranslation)().t;
|
|
12
|
+
var theme = (0, index_1.useTheme)();
|
|
13
|
+
var styles = getStyles(theme);
|
|
14
|
+
return (<index_1.ScreenWrapper header={<index_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<index_1.VideoConsultationIcon />}/>} containerStyle={styles.container}>
|
|
15
|
+
<index_1.Text center variant="h1" color={theme.colors.primary}>
|
|
16
|
+
{t('delivery.address.processing')}
|
|
17
|
+
</index_1.Text>
|
|
18
|
+
|
|
19
|
+
<index_1.LoadingCircleAnimation />
|
|
20
|
+
|
|
21
|
+
<index_1.Text center>{t('download.one_minute')}</index_1.Text>
|
|
22
|
+
</index_1.ScreenWrapper>);
|
|
23
|
+
};
|
|
24
|
+
exports.ProcessingPrescriptionScreen = ProcessingPrescriptionScreen;
|
|
25
|
+
var getStyles = function (_a) {
|
|
26
|
+
var spacing = _a.spacing;
|
|
27
|
+
return react_native_1.StyleSheet.create({
|
|
28
|
+
container: {
|
|
29
|
+
paddingTop: spacing.md
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.VideoCallScreen = void 0;
|
|
40
|
+
var index_1 = require("../../common/index");
|
|
41
|
+
var react_1 = __importStar(require("react"));
|
|
42
|
+
var react_native_1 = require("react-native");
|
|
43
|
+
var video_1 = require("../api/video");
|
|
44
|
+
var AgoraWrapper_1 = __importDefault(require("../components/AgoraWrapper"));
|
|
45
|
+
var EndingVideoScreen_1 = require("./EndingVideoScreen");
|
|
46
|
+
var VideoCallScreen = function () {
|
|
47
|
+
var t = (0, index_1.useTranslation)().t;
|
|
48
|
+
var theme = (0, index_1.useTheme)();
|
|
49
|
+
var styles = getStyles(theme);
|
|
50
|
+
var consultation = (0, index_1.useConsultation)().consultation;
|
|
51
|
+
var videoCall = consultation.videoCall, professional = consultation.professional;
|
|
52
|
+
var _a = (0, react_1.useState)((videoCall === null || videoCall === void 0 ? void 0 : videoCall.patientHangout) || false), isHangOut = _a[0], setIsHangOut = _a[1];
|
|
53
|
+
if (!videoCall)
|
|
54
|
+
return <index_1.Text>Video call info not found</index_1.Text>;
|
|
55
|
+
var uuid = videoCall.uuid, patientToken = videoCall.patientToken, appId = videoCall.appId, room = videoCall.room;
|
|
56
|
+
var endCall = function () {
|
|
57
|
+
setIsHangOut(true);
|
|
58
|
+
(0, video_1.hangOutVideocall)({ consultationId: consultation.id, room: room });
|
|
59
|
+
};
|
|
60
|
+
if (isHangOut) {
|
|
61
|
+
return <EndingVideoScreen_1.EndingVideoScreen professional={professional}/>;
|
|
62
|
+
}
|
|
63
|
+
return (<index_1.ScreenWrapper header={<index_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<index_1.VideoConsultationIcon />} rightIcon={<index_1.CancelConsultationButton />}/>} containerStyle={styles.container}>
|
|
64
|
+
<AgoraWrapper_1.default rtcProps={{ uid: uuid, token: patientToken, appId: appId, channel: room }} rtcCallbacks={{ endCall: endCall }}/>
|
|
65
|
+
</index_1.ScreenWrapper>);
|
|
66
|
+
};
|
|
67
|
+
exports.VideoCallScreen = VideoCallScreen;
|
|
68
|
+
exports.default = exports.VideoCallScreen;
|
|
69
|
+
var getStyles = function (_a) {
|
|
70
|
+
var spacing = _a.spacing;
|
|
71
|
+
return react_native_1.StyleSheet.create({
|
|
72
|
+
container: {
|
|
73
|
+
padding: 0,
|
|
74
|
+
rowGap: spacing.sm
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type mediaType = 'android.permission.RECORD_AUDIO' | 'android.permission.CAMERA';
|
|
2
|
+
export interface AskMediaAccessReturn {
|
|
3
|
+
result: boolean;
|
|
4
|
+
mediaType: mediaType;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* request media permission Android ONLY
|
|
8
|
+
* If an access request was denied and later is changed through the System Preferences pane, a restart of the app will be required for the new permissions to take effect.
|
|
9
|
+
* If access has already been requested and denied, it must be changed through the preference pane;
|
|
10
|
+
* this fun will not call and the promise will resolve with the existing access status.
|
|
11
|
+
* @param mediaTypes
|
|
12
|
+
* @returns AskMediaAccessReturn[]
|
|
13
|
+
*/
|
|
14
|
+
export declare const askMediaAccess: (mediaTypes: mediaType[]) => Promise<AskMediaAccessReturn[]>;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.askMediaAccess = void 0;
|
|
40
|
+
var react_native_1 = require("react-native");
|
|
41
|
+
/**
|
|
42
|
+
* request media permission Android ONLY
|
|
43
|
+
* If an access request was denied and later is changed through the System Preferences pane, a restart of the app will be required for the new permissions to take effect.
|
|
44
|
+
* If access has already been requested and denied, it must be changed through the preference pane;
|
|
45
|
+
* this fun will not call and the promise will resolve with the existing access status.
|
|
46
|
+
* @param mediaTypes
|
|
47
|
+
* @returns AskMediaAccessReturn[]
|
|
48
|
+
*/
|
|
49
|
+
var askMediaAccess = function (mediaTypes) { return __awaiter(void 0, void 0, void 0, function () {
|
|
50
|
+
var results, _loop_1, _i, mediaTypes_1, mediaType;
|
|
51
|
+
return __generator(this, function (_a) {
|
|
52
|
+
switch (_a.label) {
|
|
53
|
+
case 0:
|
|
54
|
+
results = [];
|
|
55
|
+
if (!(react_native_1.Platform.OS === 'android')) return [3 /*break*/, 4];
|
|
56
|
+
_loop_1 = function (mediaType) {
|
|
57
|
+
var result;
|
|
58
|
+
return __generator(this, function (_b) {
|
|
59
|
+
switch (_b.label) {
|
|
60
|
+
case 0:
|
|
61
|
+
result = false;
|
|
62
|
+
return [4 /*yield*/, react_native_1.PermissionsAndroid.request(mediaType)
|
|
63
|
+
.then(function (res) {
|
|
64
|
+
result = res === 'granted';
|
|
65
|
+
})
|
|
66
|
+
.catch(function (error) {
|
|
67
|
+
result = error;
|
|
68
|
+
})
|
|
69
|
+
.finally(function () {
|
|
70
|
+
results.push({
|
|
71
|
+
mediaType: mediaType,
|
|
72
|
+
result: result
|
|
73
|
+
});
|
|
74
|
+
})];
|
|
75
|
+
case 1:
|
|
76
|
+
_b.sent();
|
|
77
|
+
return [2 /*return*/];
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
_i = 0, mediaTypes_1 = mediaTypes;
|
|
82
|
+
_a.label = 1;
|
|
83
|
+
case 1:
|
|
84
|
+
if (!(_i < mediaTypes_1.length)) return [3 /*break*/, 4];
|
|
85
|
+
mediaType = mediaTypes_1[_i];
|
|
86
|
+
return [5 /*yield**/, _loop_1(mediaType)];
|
|
87
|
+
case 2:
|
|
88
|
+
_a.sent();
|
|
89
|
+
_a.label = 3;
|
|
90
|
+
case 3:
|
|
91
|
+
_i++;
|
|
92
|
+
return [3 /*break*/, 1];
|
|
93
|
+
case 4: return [2 /*return*/, results];
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}); };
|
|
97
|
+
exports.askMediaAccess = askMediaAccess;
|