@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,68 @@
|
|
|
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.AttachmentPreviewModal = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var react_native_1 = require("react-native");
|
|
9
|
+
var react_i18next_1 = require("react-i18next");
|
|
10
|
+
var _1 = require(".");
|
|
11
|
+
var useTheme_1 = require("../../hooks/useTheme");
|
|
12
|
+
var TrashIcon_1 = require("../../icons/TrashIcon");
|
|
13
|
+
var Button_1 = require("../Button");
|
|
14
|
+
var ModalHeader_1 = require("./ModalHeader");
|
|
15
|
+
var AttachmentPreviewModal = function (_a) {
|
|
16
|
+
var onCancel = _a.onCancel, onRemove = _a.onRemove, visible = _a.visible, attachment = _a.attachment;
|
|
17
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
|
18
|
+
var theme = (0, useTheme_1.useTheme)();
|
|
19
|
+
var styles = getStyles(theme);
|
|
20
|
+
var _b = react_1.default.useState(2 / 3), aspectRatio = _b[0], setAspectRatio = _b[1];
|
|
21
|
+
return (<_1.Modal visible={visible} onRequestClose={onCancel} modalStyle={styles.modal}>
|
|
22
|
+
<ModalHeader_1.ModalHeader title={t('attachmentPreview.title')} onCancel={onCancel}/>
|
|
23
|
+
|
|
24
|
+
<react_native_1.View style={styles.main}>
|
|
25
|
+
<react_native_1.View style={styles.container}>
|
|
26
|
+
<react_native_1.Image style={[
|
|
27
|
+
styles.image,
|
|
28
|
+
{
|
|
29
|
+
aspectRatio: aspectRatio
|
|
30
|
+
}
|
|
31
|
+
]} source={{ uri: attachment }} resizeMode="contain" onLoad={function (e) {
|
|
32
|
+
var width = e.nativeEvent.source.width;
|
|
33
|
+
var height = e.nativeEvent.source.height;
|
|
34
|
+
setAspectRatio(width > height ? 3 / 2 : 2 / 3);
|
|
35
|
+
}}/>
|
|
36
|
+
|
|
37
|
+
<Button_1.Button onPress={onRemove} icon={<TrashIcon_1.TrashIcon />} variant="secondary" shadow={false}>
|
|
38
|
+
{t('button.remove')}
|
|
39
|
+
</Button_1.Button>
|
|
40
|
+
</react_native_1.View>
|
|
41
|
+
</react_native_1.View>
|
|
42
|
+
</_1.Modal>);
|
|
43
|
+
};
|
|
44
|
+
exports.AttachmentPreviewModal = AttachmentPreviewModal;
|
|
45
|
+
var getStyles = function (_a) {
|
|
46
|
+
var colors = _a.colors, spacing = _a.spacing, borderRadius = _a.borderRadius;
|
|
47
|
+
return react_native_1.StyleSheet.create({
|
|
48
|
+
modal: {
|
|
49
|
+
backgroundColor: colors.background,
|
|
50
|
+
rowGap: spacing.xs
|
|
51
|
+
},
|
|
52
|
+
main: {
|
|
53
|
+
padding: spacing.xs
|
|
54
|
+
},
|
|
55
|
+
container: {
|
|
56
|
+
width: '100%',
|
|
57
|
+
padding: spacing.xs,
|
|
58
|
+
backgroundColor: colors.white,
|
|
59
|
+
borderRadius: borderRadius.md,
|
|
60
|
+
rowGap: spacing.xs
|
|
61
|
+
},
|
|
62
|
+
image: {
|
|
63
|
+
width: '100%',
|
|
64
|
+
backgroundColor: colors.primaryLight,
|
|
65
|
+
borderRadius: borderRadius.sm
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CancelModalProps {
|
|
3
|
+
onConfirm?: () => void;
|
|
4
|
+
onCancel?: () => void;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const CancelModal: ({ onConfirm, onCancel, visible, loading }: CancelModalProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
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.CancelModal = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var react_i18next_1 = require("react-i18next");
|
|
9
|
+
var ExitIcon_1 = require("../../icons/ExitIcon");
|
|
10
|
+
var TwoOptionsModal_1 = require("./TwoOptionsModal");
|
|
11
|
+
var CancelModal = function (_a) {
|
|
12
|
+
var onConfirm = _a.onConfirm, onCancel = _a.onCancel, visible = _a.visible, loading = _a.loading;
|
|
13
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
|
14
|
+
return (<TwoOptionsModal_1.TwoOptionsModal visible={visible} onConfirm={onConfirm} onCancel={onCancel} icon={<ExitIcon_1.ExitIcon />} text={t('general.consultation.modal.are_you_sure')} confirmText={t('button.yes')} cancelText={t('button.no')} loading={loading}/>);
|
|
15
|
+
};
|
|
16
|
+
exports.CancelModal = CancelModal;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CloseConsultationModalProps {
|
|
3
|
+
onConfirm?: () => void;
|
|
4
|
+
onCancel?: () => void;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const CloseConsultationModal: ({ onConfirm, onCancel, visible, loading }: CloseConsultationModalProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
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.CloseConsultationModal = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var react_i18next_1 = require("react-i18next");
|
|
9
|
+
var PdfDownloadIcon_1 = require("../../icons/PdfDownloadIcon");
|
|
10
|
+
var TwoOptionsModal_1 = require("./TwoOptionsModal");
|
|
11
|
+
var CloseConsultationModal = function (_a) {
|
|
12
|
+
var onConfirm = _a.onConfirm, onCancel = _a.onCancel, visible = _a.visible, loading = _a.loading;
|
|
13
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
|
14
|
+
return (<TwoOptionsModal_1.TwoOptionsModal visible={visible} onConfirm={onConfirm} onCancel={onCancel} icon={<PdfDownloadIcon_1.PdfDownloadIcon />} text={t('close.title')} description={t('close.subtitle')} confirmText={t('button.confirm_close')} cancelText={t('back')} loading={loading}/>);
|
|
15
|
+
};
|
|
16
|
+
exports.CloseConsultationModal = CloseConsultationModal;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface DoctorProfileModalProps {
|
|
3
|
+
onCancel?: () => void;
|
|
4
|
+
visible: boolean;
|
|
5
|
+
profileUrl: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const DoctorProfileModal: ({ onCancel, visible, profileUrl }: DoctorProfileModalProps) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
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.DoctorProfileModal = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var react_i18next_1 = require("react-i18next");
|
|
9
|
+
var react_native_1 = require("react-native");
|
|
10
|
+
var react_native_webview_1 = require("react-native-webview");
|
|
11
|
+
var _1 = require(".");
|
|
12
|
+
var useTheme_1 = require("../../hooks/useTheme");
|
|
13
|
+
var ModalHeader_1 = require("./ModalHeader");
|
|
14
|
+
var DoctorProfileModal = function (_a) {
|
|
15
|
+
var onCancel = _a.onCancel, visible = _a.visible, profileUrl = _a.profileUrl;
|
|
16
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
|
17
|
+
var theme = (0, useTheme_1.useTheme)();
|
|
18
|
+
var styles = getStyles(theme);
|
|
19
|
+
return (<_1.Modal visible={visible} onRequestClose={onCancel} modalStyle={styles.modal}>
|
|
20
|
+
<ModalHeader_1.ModalHeader title={t('hcp_profile')} onCancel={onCancel}/>
|
|
21
|
+
|
|
22
|
+
<react_native_1.View style={styles.container}>
|
|
23
|
+
<react_native_webview_1.WebView source={{ uri: profileUrl }} style={styles.webView} showsVerticalScrollIndicator nestedScrollEnabled/>
|
|
24
|
+
</react_native_1.View>
|
|
25
|
+
</_1.Modal>);
|
|
26
|
+
};
|
|
27
|
+
exports.DoctorProfileModal = DoctorProfileModal;
|
|
28
|
+
var getStyles = function (_a) {
|
|
29
|
+
var colors = _a.colors, spacing = _a.spacing, borderRadius = _a.borderRadius;
|
|
30
|
+
return react_native_1.StyleSheet.create({
|
|
31
|
+
modal: {
|
|
32
|
+
backgroundColor: colors.background,
|
|
33
|
+
rowGap: spacing.xs,
|
|
34
|
+
height: '80%',
|
|
35
|
+
padding: spacing.xs
|
|
36
|
+
},
|
|
37
|
+
container: {
|
|
38
|
+
backgroundColor: colors.white,
|
|
39
|
+
borderRadius: borderRadius.md,
|
|
40
|
+
overflow: 'hidden',
|
|
41
|
+
flex: 1
|
|
42
|
+
},
|
|
43
|
+
webView: {
|
|
44
|
+
flex: 1
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
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.ModalHeader = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var react_native_1 = require("react-native");
|
|
9
|
+
var useTheme_1 = require("../../hooks/useTheme");
|
|
10
|
+
var CloseIcon_1 = require("../../icons/CloseIcon");
|
|
11
|
+
var Text_1 = require("../Text");
|
|
12
|
+
var ModalHeader = function (_a) {
|
|
13
|
+
var title = _a.title, onCancel = _a.onCancel;
|
|
14
|
+
var theme = (0, useTheme_1.useTheme)();
|
|
15
|
+
var styles = getStyles(theme);
|
|
16
|
+
return (<react_native_1.View style={styles.container}>
|
|
17
|
+
<Text_1.Text variant="h4" style={styles.title}>
|
|
18
|
+
{title}
|
|
19
|
+
</Text_1.Text>
|
|
20
|
+
<react_native_1.TouchableOpacity activeOpacity={0.6} onPress={onCancel}>
|
|
21
|
+
<CloseIcon_1.CloseIcon color={theme.colors.primary}/>
|
|
22
|
+
</react_native_1.TouchableOpacity>
|
|
23
|
+
</react_native_1.View>);
|
|
24
|
+
};
|
|
25
|
+
exports.ModalHeader = ModalHeader;
|
|
26
|
+
var getStyles = function (_a) {
|
|
27
|
+
var colors = _a.colors, spacing = _a.spacing;
|
|
28
|
+
return react_native_1.StyleSheet.create({
|
|
29
|
+
container: {
|
|
30
|
+
flexDirection: 'row',
|
|
31
|
+
justifyContent: 'space-between',
|
|
32
|
+
alignItems: 'center',
|
|
33
|
+
paddingVertical: spacing.md,
|
|
34
|
+
paddingHorizontal: spacing.sm
|
|
35
|
+
},
|
|
36
|
+
title: {
|
|
37
|
+
color: colors.primary
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TwoOptionsModalProps {
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
text: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
confirmText: string;
|
|
7
|
+
cancelText: string;
|
|
8
|
+
onConfirm?: () => void;
|
|
9
|
+
onCancel?: () => void;
|
|
10
|
+
visible: boolean;
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const TwoOptionsModal: ({ icon, text, description, confirmText, cancelText, onConfirm, onCancel, visible, loading }: TwoOptionsModalProps) => React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
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.TwoOptionsModal = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var react_native_1 = require("react-native");
|
|
9
|
+
var useTheme_1 = require("../../hooks/useTheme");
|
|
10
|
+
var Button_1 = require("../Button");
|
|
11
|
+
var Text_1 = require("../Text");
|
|
12
|
+
var _1 = require(".");
|
|
13
|
+
var TwoOptionsModal = function (_a) {
|
|
14
|
+
var icon = _a.icon, text = _a.text, description = _a.description, confirmText = _a.confirmText, cancelText = _a.cancelText, onConfirm = _a.onConfirm, onCancel = _a.onCancel, visible = _a.visible, loading = _a.loading;
|
|
15
|
+
var theme = (0, useTheme_1.useTheme)();
|
|
16
|
+
var styles = getStyles(theme);
|
|
17
|
+
return (<_1.Modal visible={visible} onRequestClose={onCancel}>
|
|
18
|
+
<react_native_1.View style={styles.container}>
|
|
19
|
+
{icon}
|
|
20
|
+
|
|
21
|
+
<react_native_1.View style={styles.textContainer}>
|
|
22
|
+
<Text_1.Text bold center>
|
|
23
|
+
{text}
|
|
24
|
+
</Text_1.Text>
|
|
25
|
+
{description && <Text_1.Text center>{description}</Text_1.Text>}
|
|
26
|
+
</react_native_1.View>
|
|
27
|
+
|
|
28
|
+
<react_native_1.View style={styles.buttonsContainer}>
|
|
29
|
+
<Button_1.Button radio onPress={onConfirm} loading={loading}>
|
|
30
|
+
{confirmText}
|
|
31
|
+
</Button_1.Button>
|
|
32
|
+
<Button_1.Button radio variant="secondary" shadow={false} onPress={onCancel} disabled={loading}>
|
|
33
|
+
{cancelText}
|
|
34
|
+
</Button_1.Button>
|
|
35
|
+
</react_native_1.View>
|
|
36
|
+
</react_native_1.View>
|
|
37
|
+
</_1.Modal>);
|
|
38
|
+
};
|
|
39
|
+
exports.TwoOptionsModal = TwoOptionsModal;
|
|
40
|
+
var getStyles = function (_a) {
|
|
41
|
+
var spacing = _a.spacing;
|
|
42
|
+
return react_native_1.StyleSheet.create({
|
|
43
|
+
container: {
|
|
44
|
+
rowGap: spacing.xl,
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
paddingTop: spacing.xl,
|
|
47
|
+
paddingBottom: spacing.md,
|
|
48
|
+
paddingHorizontal: spacing.sm
|
|
49
|
+
},
|
|
50
|
+
textContainer: {
|
|
51
|
+
rowGap: spacing.sm
|
|
52
|
+
},
|
|
53
|
+
buttonsContainer: {
|
|
54
|
+
rowGap: spacing.sm,
|
|
55
|
+
width: '100%'
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { ModalProps as RNModalProps, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
type ModalProps = RNModalProps & {
|
|
4
|
+
modalStyle?: StyleProp<ViewStyle>;
|
|
5
|
+
};
|
|
6
|
+
export declare const Modal: ({ children, modalStyle, ...props }: PropsWithChildren<ModalProps>) => React.JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Modal = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var react_native_1 = require("react-native");
|
|
31
|
+
var useTheme_1 = require("../../hooks/useTheme");
|
|
32
|
+
var Modal = function (_a) {
|
|
33
|
+
var children = _a.children, modalStyle = _a.modalStyle, props = __rest(_a, ["children", "modalStyle"]);
|
|
34
|
+
var theme = (0, useTheme_1.useTheme)();
|
|
35
|
+
var styles = getStyles(theme);
|
|
36
|
+
return (<react_native_1.Modal {...props} transparent statusBarTranslucent animationType="fade">
|
|
37
|
+
<react_native_1.TouchableOpacity style={styles.container} onPress={props.onRequestClose}>
|
|
38
|
+
<react_native_1.TouchableWithoutFeedback>
|
|
39
|
+
<react_native_1.View style={[styles.modal, modalStyle]}>{children}</react_native_1.View>
|
|
40
|
+
</react_native_1.TouchableWithoutFeedback>
|
|
41
|
+
</react_native_1.TouchableOpacity>
|
|
42
|
+
</react_native_1.Modal>);
|
|
43
|
+
};
|
|
44
|
+
exports.Modal = Modal;
|
|
45
|
+
var getStyles = function (_a) {
|
|
46
|
+
var colors = _a.colors, spacing = _a.spacing, shadows = _a.shadows, borderRadius = _a.borderRadius;
|
|
47
|
+
return react_native_1.StyleSheet.create({
|
|
48
|
+
container: {
|
|
49
|
+
flex: 1,
|
|
50
|
+
justifyContent: 'center',
|
|
51
|
+
alignItems: 'center',
|
|
52
|
+
backgroundColor: colors.backdrop,
|
|
53
|
+
padding: spacing.sm
|
|
54
|
+
},
|
|
55
|
+
modal: __assign({ backgroundColor: colors.white, borderRadius: borderRadius.xl, width: '100%' }, shadows.soft)
|
|
56
|
+
});
|
|
57
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { FormControlProps } from './FormControl';
|
|
3
|
+
interface PhoneInputProps extends FormControlProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
onChangeText?: (text: string) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const PhoneInput: ({ id, label, error, placeholder, onChangeText, ...props }: PropsWithChildren<PhoneInputProps>) => import("react").JSX.Element;
|
|
11
|
+
export default PhoneInput;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.PhoneInput = void 0;
|
|
18
|
+
var react_1 = require("react");
|
|
19
|
+
var react_native_1 = require("react-native");
|
|
20
|
+
var react_native_phone_input_1 = __importDefault(require("react-native-phone-input"));
|
|
21
|
+
var useForm_1 = require("../hooks/useForm");
|
|
22
|
+
var useTheme_1 = require("../hooks/useTheme");
|
|
23
|
+
var FormControl_1 = __importDefault(require("./FormControl"));
|
|
24
|
+
var PhoneInput = function (_a) {
|
|
25
|
+
var id = _a.id, label = _a.label, error = _a.error, placeholder = _a.placeholder, onChangeText = _a.onChangeText, props = __rest(_a, ["id", "label", "error", "placeholder", "onChangeText"]);
|
|
26
|
+
var theme = (0, useTheme_1.useTheme)();
|
|
27
|
+
var styles = getStyles(theme);
|
|
28
|
+
var _b = (0, useForm_1.useForm)(), errors = _b.errors, data = _b.data, clearError = _b.clearError, updateData = _b.updateData, loading = _b.loading;
|
|
29
|
+
var _c = (0, react_1.useState)(false), focused = _c[0], setFocused = _c[1];
|
|
30
|
+
var ref = (0, react_1.createRef)();
|
|
31
|
+
var onFocus = function () {
|
|
32
|
+
setFocused(true);
|
|
33
|
+
clearError === null || clearError === void 0 ? void 0 : clearError(id);
|
|
34
|
+
};
|
|
35
|
+
var onBlur = function () {
|
|
36
|
+
setFocused(false);
|
|
37
|
+
};
|
|
38
|
+
var onChangePhoneNumber = function (text) {
|
|
39
|
+
clearError === null || clearError === void 0 ? void 0 : clearError(id);
|
|
40
|
+
updateData === null || updateData === void 0 ? void 0 : updateData(id)(text);
|
|
41
|
+
onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);
|
|
42
|
+
};
|
|
43
|
+
var formError = errors === null || errors === void 0 ? void 0 : errors[id];
|
|
44
|
+
var formValue = data === null || data === void 0 ? void 0 : data[id];
|
|
45
|
+
var err = formError || error;
|
|
46
|
+
return (<FormControl_1.default label={label} error={err} name={id}>
|
|
47
|
+
<react_native_phone_input_1.default {...props} ref={ref} style={[styles.input, focused && styles.focused, err && styles.error]} textStyle={styles.inputText} initialCountry="ie" textProps={{
|
|
48
|
+
placeholder: placeholder,
|
|
49
|
+
onFocus: onFocus,
|
|
50
|
+
onBlur: onBlur
|
|
51
|
+
}} onChangePhoneNumber={onChangePhoneNumber} initialValue={formValue || props.value} disabled={loading} autoFormat accessibilityLabel={"phone-input-".concat(id)}/>
|
|
52
|
+
</FormControl_1.default>);
|
|
53
|
+
};
|
|
54
|
+
exports.PhoneInput = PhoneInput;
|
|
55
|
+
exports.default = exports.PhoneInput;
|
|
56
|
+
var getStyles = function (_a) {
|
|
57
|
+
var colors = _a.colors, spacing = _a.spacing, fontSize = _a.fontSize, borderRadius = _a.borderRadius;
|
|
58
|
+
return react_native_1.StyleSheet.create({
|
|
59
|
+
input: {
|
|
60
|
+
padding: spacing.sm,
|
|
61
|
+
borderWidth: 1,
|
|
62
|
+
borderColor: colors.gray,
|
|
63
|
+
borderRadius: borderRadius.md,
|
|
64
|
+
width: '100%',
|
|
65
|
+
backgroundColor: colors.white
|
|
66
|
+
},
|
|
67
|
+
focused: {
|
|
68
|
+
borderColor: colors.primary
|
|
69
|
+
},
|
|
70
|
+
inputText: {
|
|
71
|
+
color: colors.black,
|
|
72
|
+
fontSize: fontSize.base,
|
|
73
|
+
borderLeftWidth: 1,
|
|
74
|
+
borderLeftColor: colors.gray,
|
|
75
|
+
paddingLeft: spacing.xs
|
|
76
|
+
},
|
|
77
|
+
error: {
|
|
78
|
+
borderColor: colors.warning
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
};
|