@abihealth/goapp-react-native 1.18.1 → 1.19.0

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/common/api/consultation.d.ts +4 -6
  3. package/dist/common/api/consultation.js +28 -70
  4. package/dist/common/api/models/auth.d.ts +0 -8
  5. package/dist/common/api/models/consultation.d.ts +0 -1
  6. package/dist/common/api/models/partner.d.ts +3 -0
  7. package/dist/common/api/models/partner.js +2 -0
  8. package/dist/common/api/partner.d.ts +2 -0
  9. package/dist/common/api/partner.js +10 -0
  10. package/dist/common/api/user.d.ts +3 -0
  11. package/dist/common/api/user.js +7 -1
  12. package/dist/common/components/Header/ConsultationHeader.d.ts +3 -0
  13. package/dist/common/components/Header/ConsultationHeader.js +28 -0
  14. package/dist/common/components/{Header.d.ts → Header/index.d.ts} +1 -2
  15. package/dist/common/components/{Header.js → Header/index.js} +2 -2
  16. package/dist/common/components/Input.d.ts +2 -1
  17. package/dist/common/components/Input.js +14 -3
  18. package/dist/common/components/SlideUp.js +1 -4
  19. package/dist/common/contexts/ConsultationContext.js +50 -81
  20. package/dist/common/contexts/LoaderContext.d.ts +8 -0
  21. package/dist/common/contexts/LoaderContext.js +86 -0
  22. package/dist/common/hooks/useConsultation.js +24 -8
  23. package/dist/common/hooks/useLoader.d.ts +8 -0
  24. package/dist/common/hooks/useLoader.js +15 -0
  25. package/dist/common/icons/CaseFolderIcon.d.ts +3 -0
  26. package/dist/common/icons/CaseFolderIcon.js +55 -0
  27. package/dist/common/icons/NoCaseFoundIcon.js +1 -1
  28. package/dist/common/locale/translations/en.base.json +3 -0
  29. package/dist/common/screens/AnswerScreen.js +2 -5
  30. package/dist/common/screens/MatchScreen.js +2 -3
  31. package/dist/common/screens/MatchingScreen.js +2 -3
  32. package/dist/common/screens/NotValidActiveTypeScreen.d.ts +7 -0
  33. package/dist/common/screens/NotValidActiveTypeScreen.js +35 -0
  34. package/dist/common/screens/PreparingSummaryScreen.js +2 -3
  35. package/dist/common/screens/RatingScreen.js +2 -3
  36. package/dist/common/types/components.d.ts +15 -0
  37. package/dist/form-prescriptions/api/models/prescription.d.ts +5 -0
  38. package/dist/form-prescriptions/api/prescription.d.ts +3 -1
  39. package/dist/form-prescriptions/api/prescription.js +8 -3
  40. package/dist/form-prescriptions/components/FormPrescription.js +5 -4
  41. package/dist/form-prescriptions/components/IndicationCategory.js +12 -8
  42. package/dist/form-prescriptions/components/IndicationSurveyButton.js +5 -2
  43. package/dist/form-prescriptions/components/Questionnaire/QuestionnaireQuestion/OpenEnded.js +1 -1
  44. package/dist/form-prescriptions/components/SearchableDropdown.d.ts +1 -1
  45. package/dist/form-prescriptions/components/SearchableDropdown.js +2 -2
  46. package/dist/form-prescriptions/components/loaders/HomeLoader.d.ts +1 -0
  47. package/dist/form-prescriptions/components/loaders/HomeLoader.js +35 -0
  48. package/dist/form-prescriptions/components/loaders/QuestionnaireLoader.d.ts +1 -0
  49. package/dist/form-prescriptions/components/loaders/QuestionnaireLoader.js +68 -0
  50. package/dist/form-prescriptions/contexts/IndicationSurveyContext.js +2 -3
  51. package/dist/form-prescriptions/hooks/useIndicationSurvey.js +10 -6
  52. package/dist/form-prescriptions/hooks/useIndicationSurveyAnswers.js +6 -1
  53. package/dist/form-prescriptions/hooks/useScreens.js +2 -1
  54. package/dist/form-prescriptions/screens/HomeScreen.js +50 -8
  55. package/dist/form-prescriptions/screens/QuestionnaireScreen.js +12 -10
  56. package/dist/form-prescriptions/screens/ReasonScreen.d.ts +2 -0
  57. package/dist/form-prescriptions/screens/ReasonScreen.js +161 -0
  58. package/dist/form-prescriptions/types/screens.d.ts +4 -3
  59. package/dist/form-prescriptions/types/screens.js +4 -3
  60. package/dist/video-consultations/api/video.d.ts +2 -1
  61. package/dist/video-consultations/api/video.js +10 -5
  62. package/dist/video-consultations/components/VideoConsultation.js +2 -2
  63. package/package.json +1 -3
  64. package/dist/common/screens/NotValidActiveType.d.ts +0 -2
  65. package/dist/common/screens/NotValidActiveType.js +0 -13
@@ -44,10 +44,13 @@ var consultation_1 = require("../api/consultation");
44
44
  var consultation_2 = require("../api/models/consultation");
45
45
  var ConsultationContext_1 = require("../contexts/ConsultationContext");
46
46
  var i18n_1 = __importDefault(require("../locale/i18n"));
47
+ var consultation_3 = require("../types/consultation");
48
+ var video_1 = require("../../video-consultations/api/video");
47
49
  var react_1 = require("react");
48
50
  var useUser_1 = require("./useUser");
49
51
  var useConsultation = function () {
50
- var _a = (0, react_1.useContext)(ConsultationContext_1.ConsultationContext), consultation = _a.consultation, setConsultation = _a.setConsultation, onError = _a.onError;
52
+ var _a;
53
+ var _b = (0, react_1.useContext)(ConsultationContext_1.ConsultationContext), consultation = _b.consultation, setConsultation = _b.setConsultation, onError = _b.onError;
51
54
  var user = (0, useUser_1.useUser)().user;
52
55
  var minLength = (0, react_1.useMemo)(function () {
53
56
  switch (user === null || user === void 0 ? void 0 : user.language) {
@@ -84,10 +87,25 @@ var useConsultation = function () {
84
87
  }
85
88
  });
86
89
  }); };
90
+ // TODO - Implement createConsultation when endpoints are ready
91
+ var createConsultation = (_a = {},
92
+ _a[consultation_3.CASE_TYPE.MEDICAL] = function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
93
+ return [2 /*return*/, Promise.resolve({ consultation: undefined })];
94
+ }); }); },
95
+ _a[consultation_3.CASE_TYPE.VIDEO] = video_1.createVideoConsultation,
96
+ _a[consultation_3.CASE_TYPE.PRESCRIPTION] = function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
97
+ return [2 /*return*/, Promise.resolve({ consultation: undefined })];
98
+ }); }); },
99
+ _a[consultation_3.CASE_TYPE.VOICE] = function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
100
+ return [2 /*return*/, Promise.resolve({ consultation: undefined })];
101
+ }); }); },
102
+ _a[consultation_3.CASE_TYPE.MENTAL] = function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
103
+ return [2 /*return*/, Promise.resolve({ consultation: undefined })];
104
+ }); }); },
105
+ _a);
87
106
  var start = function (caseType, payload) { return __awaiter(void 0, void 0, void 0, function () {
88
107
  var parsed;
89
108
  return __generator(this, function (_a) {
90
- console.log('Starting consultation', payload);
91
109
  parsed = consultation_2.createConsultationRequestSchema
92
110
  .refine(function (value) { return value.question.length >= minLength; }, {
93
111
  message: i18n_1.default.t('inputs.textarea.min_length', { minLength: minLength })
@@ -97,7 +115,7 @@ var useConsultation = function () {
97
115
  throw new Error(parsed.error.errors[0].message);
98
116
  return [2 /*return*/, handleConsultationAction(function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
99
117
  switch (_a.label) {
100
- case 0: return [4 /*yield*/, (0, consultation_1.createConsultation)(caseType)(payload)];
118
+ case 0: return [4 /*yield*/, createConsultation[caseType](payload)];
101
119
  case 1: return [2 /*return*/, _a.sent()];
102
120
  }
103
121
  }); }); })];
@@ -105,11 +123,10 @@ var useConsultation = function () {
105
123
  }); };
106
124
  var cancel = function () { return __awaiter(void 0, void 0, void 0, function () {
107
125
  return __generator(this, function (_a) {
108
- console.log('Cancelling consultation');
109
126
  return [2 /*return*/, handleConsultationAction(function () { return __awaiter(void 0, void 0, void 0, function () {
110
127
  return __generator(this, function (_a) {
111
128
  switch (_a.label) {
112
- case 0: return [4 /*yield*/, (0, consultation_1.cancelConsultation)(consultation.type)({
129
+ case 0: return [4 /*yield*/, (0, consultation_1.cancelConsultation)({
113
130
  consultationId: consultation.id,
114
131
  userId: consultation.userId
115
132
  })];
@@ -128,7 +145,7 @@ var useConsultation = function () {
128
145
  throw new Error(parsed.error.errors[0].message);
129
146
  return [2 /*return*/, handleConsultationAction(function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
130
147
  switch (_a.label) {
131
- case 0: return [4 /*yield*/, (0, consultation_1.rateConsultation)(consultation.type)(payload)];
148
+ case 0: return [4 /*yield*/, (0, consultation_1.rateConsultation)(payload)];
132
149
  case 1: return [2 /*return*/, _a.sent()];
133
150
  }
134
151
  }); }); })];
@@ -136,11 +153,10 @@ var useConsultation = function () {
136
153
  }); };
137
154
  var close = function () { return __awaiter(void 0, void 0, void 0, function () {
138
155
  return __generator(this, function (_a) {
139
- console.log('Closing consultation');
140
156
  return [2 /*return*/, handleConsultationAction(function () { return __awaiter(void 0, void 0, void 0, function () {
141
157
  return __generator(this, function (_a) {
142
158
  switch (_a.label) {
143
- case 0: return [4 /*yield*/, (0, consultation_1.closeConsultation)(consultation.type)({
159
+ case 0: return [4 /*yield*/, (0, consultation_1.closeConsultation)({
144
160
  consultationId: consultation.id,
145
161
  userId: consultation.userId
146
162
  })];
@@ -0,0 +1,8 @@
1
+ import { Animated } from 'react-native';
2
+ import { ViewStyle } from 'react-native-phone-input';
3
+ export declare const useLoader: () => {
4
+ interpolatedBackground: string | Animated.AnimatedInterpolation<string | number>;
5
+ AnimatedItem: ({ customStyle }: {
6
+ customStyle?: ViewStyle;
7
+ }) => import("react").JSX.Element;
8
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useLoader = void 0;
4
+ var LoaderContext_1 = require("../contexts/LoaderContext");
5
+ var react_1 = require("react");
6
+ var react_native_1 = require("react-native");
7
+ var useLoader = function () {
8
+ var interpolatedBackground = (0, react_1.useContext)(LoaderContext_1.LoaderContext).interpolatedBackground;
9
+ var AnimatedItem = function (_a) {
10
+ var customStyle = _a.customStyle;
11
+ return (<react_native_1.Animated.View style={[customStyle, { backgroundColor: interpolatedBackground }]}/>);
12
+ };
13
+ return { interpolatedBackground: interpolatedBackground, AnimatedItem: AnimatedItem };
14
+ };
15
+ exports.useLoader = useLoader;
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare const CaseFolderIcon: () => React.JSX.Element;
3
+ export default CaseFolderIcon;
@@ -0,0 +1,55 @@
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 useTheme_1 = require("../hooks/useTheme");
37
+ var React = __importStar(require("react"));
38
+ var react_native_svg_1 = __importStar(require("react-native-svg"));
39
+ var CaseFolderIcon = function () {
40
+ var palette = (0, useTheme_1.useTheme)().palette;
41
+ return (<react_native_svg_1.default width={71} height={75} fill="none">
42
+ <react_native_svg_1.G clipPath="url(#a)">
43
+ <react_native_svg_1.Path fill={palette.primary.base} d="M69.972 38.246a4.29 4.29 0 0 0-1.607-1.616 4.476 4.476 0 0 0-2.215-.587H24.675c-1.4 0-2.755.44-3.88 1.277a6.39 6.39 0 0 0-2.33 3.31l-8.208 27.704a7.036 7.036 0 0 1-2.571 3.65 7.184 7.184 0 0 1-4.282 1.4h52.15a7.286 7.286 0 0 0 4.282-1.4 7.037 7.037 0 0 0 2.571-3.65l7.875-26.585a4.432 4.432 0 0 0 .195-1.774 4.47 4.47 0 0 0-.517-1.706v-.023h.012Z"/>
44
+ <react_native_svg_1.Path fill={palette.primary.dark} d="M10.234 46.335a7.155 7.155 0 0 1-2.158-5.096V19.005H6.331c-1.55 0-3.03.61-4.12 1.683A5.713 5.713 0 0 0 .5 24.744v43.07c0 .757.31 1.491.85 2.034a2.923 2.923 0 0 0 2.066.836c.907 0 1.79-.294 2.525-.837a4.194 4.194 0 0 0 1.515-2.157l5.809-19.592a7.245 7.245 0 0 1-3.03-1.785v.022ZM60.066 27.862a5.898 5.898 0 0 0-4.12-1.683h-5.614v7.174h11.445v-1.435c0-1.525-.62-2.982-1.71-4.056Z"/>
45
+ <react_native_svg_1.Path fill={palette.highlight} d="M41.113 10.542h7.152L46.83 8.915 40.757 2l-1.756-2v8.474c0 .554.23 1.085.62 1.469.402.384.93.599 1.492.599Z"/>
46
+ <react_native_svg_1.Path fill={palette.highlight} fillRule="evenodd" d="M19.061 35.263a9.345 9.345 0 0 1 5.614-1.842h23.543V12.937H39.54a3.146 3.146 0 0 1-2.192-.881 2.968 2.968 0 0 1-.896-2.125v-8.61h-.011V0H15.996a5.81 5.81 0 0 0-4.052 1.638 5.531 5.531 0 0 0-1.687 3.966v34.958c0 1.491.608 2.915 1.687 3.966A5.61 5.61 0 0 0 14 45.793l1.71-5.762a9.335 9.335 0 0 1 3.352-4.78v.012Zm17.378-10.13H16.952c-.642 0-1.162.63-1.162 1.407s.52 1.407 1.162 1.407h19.487c.642 0 1.162-.63 1.162-1.407 0-.776-.52-1.406-1.162-1.406Zm-19.214-5.925h24.072c.793 0 1.435.63 1.435 1.406 0 .777-.642 1.407-1.435 1.407H17.225c-.792 0-1.435-.63-1.435-1.407s.643-1.406 1.435-1.406Z" clipRule="evenodd"/>
47
+ </react_native_svg_1.G>
48
+ <react_native_svg_1.Defs>
49
+ <react_native_svg_1.ClipPath id="a">
50
+ <react_native_svg_1.Path fill={palette.white} d="M.5 0h70v75H.5z"/>
51
+ </react_native_svg_1.ClipPath>
52
+ </react_native_svg_1.Defs>
53
+ </react_native_svg_1.default>);
54
+ };
55
+ exports.default = CaseFolderIcon;
@@ -41,7 +41,7 @@ var NoCaseFoundIcon = function () {
41
41
  return (<react_native_svg_1.default width={61} height={68} fill="none">
42
42
  <react_native_svg_1.G clipPath="url(#a)">
43
43
  <react_native_svg_1.Path fill={palette.primary.dark} d="m6.062 62.96 7.155-24.373a8.15 8.15 0 0 1 2.944-4.22 8.228 8.228 0 0 1 4.897-1.63h32.317v-1.264a5.04 5.04 0 0 0-1.489-3.574 5.098 5.098 0 0 0-3.594-1.48H28.919a2.56 2.56 0 0 1-1.977-.935l-2.498-3.054a6.342 6.342 0 0 0-2.198-1.717 6.377 6.377 0 0 0-2.726-.612H5.083a5.098 5.098 0 0 0-3.594 1.48A5.04 5.04 0 0 0 0 25.156v37.906c0 .67.268 1.313.744 1.787a2.55 2.55 0 0 0 1.798.74 3.693 3.693 0 0 0 2.199-.733 3.658 3.658 0 0 0 1.32-1.895Z"/>
44
- <react_native_svg_1.Path fill="#FF9800" stroke="#F4F4F4" strokeWidth={2} d="M44.5 20.162c0 7.816-6.374 14.162-14.25 14.162-7.875 0-14.25-6.346-14.25-14.162C16 12.346 22.375 6 30.25 6c7.876 0 14.25 6.346 14.25 14.162Z"/>
44
+ <react_native_svg_1.Path fill={palette.highlight} stroke="#F4F4F4" strokeWidth={2} d="M44.5 20.162c0 7.816-6.374 14.162-14.25 14.162-7.875 0-14.25-6.346-14.25-14.162C16 12.346 22.375 6 30.25 6c7.876 0 14.25 6.346 14.25 14.162Z"/>
45
45
  <react_native_svg_1.Path stroke={palette.white} strokeLinecap="round" strokeWidth={2.6} d="M35.969 14.476 24.53 25.848M24.531 14.476 35.97 25.848"/>
46
46
  <react_native_svg_1.Path fill={palette.primary.base} d="M60.518 37.209a3.785 3.785 0 0 0-1.399-1.426 3.814 3.814 0 0 0-1.934-.52H21.061a5.65 5.65 0 0 0-3.378 1.12 5.596 5.596 0 0 0-2.027 2.91l-7.15 24.374A6.177 6.177 0 0 1 6.27 66.88a6.237 6.237 0 0 1-3.728 1.236h45.43a6.238 6.238 0 0 0 3.729-1.236 6.178 6.178 0 0 0 2.237-3.213L60.8 40.268a3.946 3.946 0 0 0-.283-3.06Z"/>
47
47
  </react_native_svg_1.G>
@@ -43,6 +43,7 @@
43
43
  "button.sms_reminder": "SMS ME WHEN THEY REPLY",
44
44
  "button.start_again": "START AGAIN",
45
45
  "button.submit": "Submit",
46
+ "button.submit_request": "Submit request",
46
47
  "button.try_again": "Try again",
47
48
  "button.undo": "UNDO",
48
49
  "button.yes": "Yes",
@@ -402,6 +403,7 @@
402
403
  "download.usually_takes": "This usually takes less than 1 min.",
403
404
  "error.address": "There is a problem with your address. Please check it and try again.",
404
405
  "error.case_already_open": "You already have a case open in another location. Please complete the case there first.",
406
+ "error.case_type_already_open": "You already have an open {{caseType}} case.",
405
407
  "error.something_went_wrong": "Something went wrong, please try again later",
406
408
  "error.validation.attachment.duplicated": "Attachment is already added",
407
409
  "error.validation.attachment.max": "Error uploading: You can only upload a maximum of {{maxAmount}} files.",
@@ -542,6 +544,7 @@
542
544
  "inputs.physicianCountry.placeholder": "Country",
543
545
  "inputs.physicianState.label": "State",
544
546
  "inputs.physicianState.placeholder": "State",
547
+ "inputs.policy_number.label": "Policy number",
545
548
  "inputs.sex.label": "Sex",
546
549
  "inputs.surname.label": "Surname",
547
550
  "inputs.textarea.min_length": "Min {{minLength}} characters",
@@ -39,22 +39,19 @@ var CloseConsultationActionSheet_1 = require("../components/AnswerScreen/CloseCo
39
39
  var PrescriptionCard_1 = require("../components/AnswerScreen/PrescriptionCard");
40
40
  var PrescriptionCardHeader_1 = require("../components/AnswerScreen/PrescriptionCard/PrescriptionCardHeader");
41
41
  var Summary_1 = require("../components/AnswerScreen/Summary");
42
- var Header_1 = require("../components/Header");
42
+ var ConsultationHeader_1 = require("../components/Header/ConsultationHeader");
43
43
  var ScreenWrapper_1 = require("../components/ScreenWrapper");
44
44
  var Text_1 = require("../components/Text");
45
45
  var useConsultation_1 = require("../hooks/useConsultation");
46
46
  var useCustomComponents_1 = require("../hooks/useCustomComponents");
47
47
  var useTheme_1 = require("../hooks/useTheme");
48
- var useTranslation_1 = require("../hooks/useTranslation");
49
48
  var consultation_1 = require("../types/consultation");
50
- var VideoConsultationIcon_1 = require("../../video-consultations/icons/VideoConsultationIcon");
51
49
  var react_1 = __importStar(require("react"));
52
50
  var react_native_1 = require("react-native");
53
51
  var SHOW_CLOSE_DELAY = 3000;
54
52
  var AnswerScreen = function (_a) {
55
53
  var _b;
56
54
  var questions = _a.questions, professional = _a.professional, prescription = _a.prescription, pdf = _a.pdf;
57
- var t = (0, useTranslation_1.useTranslation)().t;
58
55
  var theme = (0, useTheme_1.useTheme)();
59
56
  var styles = getStyles(theme);
60
57
  var scrollRef = (0, react_1.useRef)(null);
@@ -69,7 +66,7 @@ var AnswerScreen = function (_a) {
69
66
  return function () { return clearTimeout(timeout); };
70
67
  }, []);
71
68
  return (<>
72
- <ScreenWrapper_1.ScreenWrapper scrollRef={scrollRef} header={<Header_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<VideoConsultationIcon_1.VideoConsultationIcon />}/>} containerStyle={[styles.container, AnswerScreen === null || AnswerScreen === void 0 ? void 0 : AnswerScreen.containerStyle]} onContentSizeChange={scrollEnd}>
69
+ <ScreenWrapper_1.ScreenWrapper scrollRef={scrollRef} header={<ConsultationHeader_1.ConsultationHeader />} containerStyle={[styles.container, AnswerScreen === null || AnswerScreen === void 0 ? void 0 : AnswerScreen.containerStyle]} onContentSizeChange={scrollEnd}>
73
70
  {questions.map(function (_a, index) {
74
71
  var _b, _c, _d, _e, _f, _g;
75
72
  var text = _a.text, type = _a.type;
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.MatchScreen = void 0;
7
7
  var CancelConsultationButton_1 = require("../components/CancelConsultationButton");
8
8
  var DoctorProfileCard_1 = require("../components/DoctorProfileCard");
9
- var Header_1 = require("../components/Header");
9
+ var ConsultationHeader_1 = require("../components/Header/ConsultationHeader");
10
10
  var ScreenWrapper_1 = require("../components/ScreenWrapper");
11
11
  var Text_1 = require("../components/Text");
12
12
  var useTheme_1 = require("../hooks/useTheme");
13
13
  var useTranslation_1 = require("../hooks/useTranslation");
14
- var VideoConsultationIcon_1 = require("../../video-consultations/icons/VideoConsultationIcon");
15
14
  var react_1 = __importDefault(require("react"));
16
15
  var react_native_1 = require("react-native");
17
16
  var MatchScreen = function (_a) {
@@ -19,7 +18,7 @@ var MatchScreen = function (_a) {
19
18
  var t = (0, useTranslation_1.useTranslation)().t;
20
19
  var theme = (0, useTheme_1.useTheme)();
21
20
  var styles = getStyles(theme);
22
- return (<ScreenWrapper_1.ScreenWrapper header={<Header_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<VideoConsultationIcon_1.VideoConsultationIcon />} rightIcon={<CancelConsultationButton_1.CancelConsultationButton />}/>} containerStyle={styles.container} reminder={false}>
21
+ return (<ScreenWrapper_1.ScreenWrapper header={<ConsultationHeader_1.ConsultationHeader rightIcon={<CancelConsultationButton_1.CancelConsultationButton />}/>} containerStyle={styles.container} reminder={false}>
23
22
  <DoctorProfileCard_1.DoctorProfileCard professional={professional} description={t('reviewing.video')}/>
24
23
 
25
24
  <Text_1.Text center>{t('matching.video.text_message')}</Text_1.Text>
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.MatchingScreen = void 0;
7
7
  var FindingAnimation_1 = require("../animations/FindingAnimation");
8
8
  var CancelConsultationButton_1 = require("../components/CancelConsultationButton");
9
- var Header_1 = require("../components/Header");
9
+ var ConsultationHeader_1 = require("../components/Header/ConsultationHeader");
10
10
  var ScreenWrapper_1 = require("../components/ScreenWrapper");
11
11
  var Text_1 = require("../components/Text");
12
12
  var useCustomComponents_1 = require("../hooks/useCustomComponents");
13
13
  var useTheme_1 = require("../hooks/useTheme");
14
14
  var useTranslation_1 = require("../hooks/useTranslation");
15
- var VideoConsultationIcon_1 = require("../../video-consultations/icons/VideoConsultationIcon");
16
15
  var react_1 = __importDefault(require("react"));
17
16
  var react_native_1 = require("react-native");
18
17
  var MatchingScreen = function () {
@@ -21,7 +20,7 @@ var MatchingScreen = function () {
21
20
  var styles = getStyles(theme);
22
21
  var screens = (0, useCustomComponents_1.useCustomComponents)().screens;
23
22
  var customComponents = screens === null || screens === void 0 ? void 0 : screens.MatchingScreen;
24
- return (<ScreenWrapper_1.ScreenWrapper header={<Header_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<VideoConsultationIcon_1.VideoConsultationIcon />} rightIcon={<CancelConsultationButton_1.CancelConsultationButton />}/>} containerStyle={styles.container}>
23
+ return (<ScreenWrapper_1.ScreenWrapper header={<ConsultationHeader_1.ConsultationHeader rightIcon={<CancelConsultationButton_1.CancelConsultationButton />}/>} containerStyle={styles.container}>
25
24
  <Text_1.Text variant="h2" center>
26
25
  {t('matching')}
27
26
  </Text_1.Text>
@@ -0,0 +1,7 @@
1
+ import { CASE_TYPE } from '../types/consultation';
2
+ import React from 'react';
3
+ interface NoValidActiveTypeScreenProps {
4
+ caseType: CASE_TYPE;
5
+ }
6
+ export declare const NotValidActiveTypeScreen: ({ caseType }: NoValidActiveTypeScreenProps) => React.JSX.Element;
7
+ export {};
@@ -0,0 +1,35 @@
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.NotValidActiveTypeScreen = void 0;
7
+ var Header_1 = require("../components/Header");
8
+ var ScreenWrapper_1 = require("../components/ScreenWrapper");
9
+ var Text_1 = require("../components/Text");
10
+ var useTheme_1 = require("../hooks/useTheme");
11
+ var AbiLogoIcon_1 = require("../icons/AbiLogoIcon");
12
+ var CaseFolderIcon_1 = __importDefault(require("../icons/CaseFolderIcon"));
13
+ var react_1 = __importDefault(require("react"));
14
+ var react_i18next_1 = require("react-i18next");
15
+ var react_native_1 = require("react-native");
16
+ var NotValidActiveTypeScreen = function (_a) {
17
+ var caseType = _a.caseType;
18
+ var t = (0, react_i18next_1.useTranslation)().t;
19
+ var theme = (0, useTheme_1.useTheme)();
20
+ var styles = getStyles(theme);
21
+ return (<ScreenWrapper_1.ScreenWrapper header={<Header_1.Header centerIcon={<AbiLogoIcon_1.AbiLogoIcon />}/>} containerStyle={styles.container}>
22
+ <CaseFolderIcon_1.default />
23
+ <Text_1.Text>{t('error.case_type_already_open', { caseType: caseType })}</Text_1.Text>
24
+ </ScreenWrapper_1.ScreenWrapper>);
25
+ };
26
+ exports.NotValidActiveTypeScreen = NotValidActiveTypeScreen;
27
+ var getStyles = function (_a) {
28
+ var spacing = _a.spacing;
29
+ return react_native_1.StyleSheet.create({
30
+ container: {
31
+ rowGap: spacing.xl,
32
+ justifyContent: 'center'
33
+ }
34
+ });
35
+ };
@@ -5,12 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PreparingSummaryScreen = void 0;
7
7
  var DoctorProfileCard_1 = require("../components/DoctorProfileCard");
8
- var Header_1 = require("../components/Header");
8
+ var ConsultationHeader_1 = require("../components/Header/ConsultationHeader");
9
9
  var ScreenWrapper_1 = require("../components/ScreenWrapper");
10
10
  var Text_1 = require("../components/Text");
11
11
  var useTheme_1 = require("../hooks/useTheme");
12
12
  var useTranslation_1 = require("../hooks/useTranslation");
13
- var VideoConsultationIcon_1 = require("../../video-consultations/icons/VideoConsultationIcon");
14
13
  var react_1 = __importDefault(require("react"));
15
14
  var react_native_1 = require("react-native");
16
15
  var PreparingSummaryScreen = function (_a) {
@@ -18,7 +17,7 @@ var PreparingSummaryScreen = function (_a) {
18
17
  var t = (0, useTranslation_1.useTranslation)().t;
19
18
  var theme = (0, useTheme_1.useTheme)();
20
19
  var styles = getStyles(theme);
21
- return (<ScreenWrapper_1.ScreenWrapper header={<Header_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<VideoConsultationIcon_1.VideoConsultationIcon />}/>} containerStyle={styles.container}>
20
+ return (<ScreenWrapper_1.ScreenWrapper header={<ConsultationHeader_1.ConsultationHeader />} containerStyle={styles.container}>
22
21
  <DoctorProfileCard_1.DoctorProfileCard professional={professional} description={t('consultation.summary_being_prepared')}/>
23
22
 
24
23
  <Text_1.Text center>{t('general.consultation.videoConsultation.hcpCanRecall')}</Text_1.Text>
@@ -71,7 +71,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
71
71
  Object.defineProperty(exports, "__esModule", { value: true });
72
72
  exports.RatingScreen = void 0;
73
73
  var Button_1 = require("../components/Button");
74
- var Header_1 = require("../components/Header");
74
+ var ConsultationHeader_1 = require("../components/Header/ConsultationHeader");
75
75
  var ScreenWrapper_1 = require("../components/ScreenWrapper");
76
76
  var Text_1 = require("../components/Text");
77
77
  var useConsultation_1 = require("../hooks/useConsultation");
@@ -79,7 +79,6 @@ var useTheme_1 = require("../hooks/useTheme");
79
79
  var useTranslation_1 = require("../hooks/useTranslation");
80
80
  var RatingIcon_1 = require("../icons/RatingIcon");
81
81
  var StarIcon_1 = require("../icons/StarIcon");
82
- var VideoConsultationIcon_1 = require("../../video-consultations/icons/VideoConsultationIcon");
83
82
  var react_1 = __importStar(require("react"));
84
83
  var react_native_1 = require("react-native");
85
84
  var RATINGS = [1, 2, 3, 4, 5];
@@ -133,7 +132,7 @@ var RatingScreen = function () {
133
132
  var handleSkip = function () {
134
133
  updateConsultation(null);
135
134
  };
136
- return (<ScreenWrapper_1.ScreenWrapper header={<Header_1.Header title={t('general.consultation.videoConsultation.title')} leftIcon={<VideoConsultationIcon_1.VideoConsultationIcon />}/>} containerStyle={styles.container}>
135
+ return (<ScreenWrapper_1.ScreenWrapper header={<ConsultationHeader_1.ConsultationHeader />} containerStyle={styles.container}>
137
136
  <react_native_1.View style={styles.innerContainer}>
138
137
  <RatingIcon_1.RatingIcon />
139
138
 
@@ -1,3 +1,4 @@
1
+ import { IndicationCategory, IndicationSurveyList } from '../../form-prescriptions/api/models/prescription';
1
2
  import { ReactElement, ReactNode } from 'react';
2
3
  import { ColorValue } from 'react-native';
3
4
  import { TextStyle, ViewStyle } from 'react-native-phone-input';
@@ -116,6 +117,20 @@ export type Components = {
116
117
  }) => ReactElement;
117
118
  };
118
119
  };
120
+ PrescriptionHomeScreen?: {
121
+ indicationCategoryAccordion?: {
122
+ containerStyle?: ViewStyle;
123
+ textStyle?: TextStyle;
124
+ } & {
125
+ customComponent?: (props: IndicationCategory) => ReactElement;
126
+ };
127
+ indicationSurveyButton?: {
128
+ containerStyle?: ViewStyle;
129
+ textStyle?: TextStyle;
130
+ } & {
131
+ customComponent?: (props: IndicationSurveyList) => ReactElement;
132
+ };
133
+ };
119
134
  };
120
135
  };
121
136
  export {};
@@ -27,3 +27,8 @@ export interface IndicationSurveyAnswers {
27
27
  origin: string;
28
28
  indications: IndicationAnswerQuestion[];
29
29
  }
30
+ export interface CreatePrescriptionRequest {
31
+ userId: string;
32
+ question: string;
33
+ indicationSurvey: IndicationSurveyAnswers;
34
+ }
@@ -1,4 +1,6 @@
1
- import { IndicationCategory } from '../api/models/prescription';
1
+ import { Consultation } from '../../common/types/consultation';
2
+ import { CreatePrescriptionRequest, IndicationCategory } from '../api/models/prescription';
2
3
  import { IndicationSurveyQuestions } from '../types/indications';
3
4
  export declare const getIndicationSurveyList: () => Promise<IndicationCategory[]>;
4
5
  export declare const getIndicationSurvey: (id: string) => Promise<IndicationSurveyQuestions>;
6
+ export declare const createPrescription: (payload: CreatePrescriptionRequest) => Promise<Consultation>;
@@ -3,13 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getIndicationSurvey = exports.getIndicationSurveyList = void 0;
6
+ exports.createPrescription = exports.getIndicationSurvey = exports.getIndicationSurveyList = void 0;
7
7
  var axios_1 = __importDefault(require("axios"));
8
- var INDICATION_SURVEY_LIST_URL = '/prescription/indication-survey/list';
9
- var INDICATION_SURVEY_URL = '/prescription/indication-survey/';
8
+ var BASE_URL = '/prescription';
9
+ var INDICATION_SURVEY_LIST_URL = "".concat(BASE_URL, "/indication-survey/list");
10
+ var INDICATION_SURVEY_URL = "".concat(BASE_URL, "/indication-survey/");
10
11
  var getIndicationSurveyList = function () { return axios_1.default.get(INDICATION_SURVEY_LIST_URL).then(function (response) { return response === null || response === void 0 ? void 0 : response.data; }); };
11
12
  exports.getIndicationSurveyList = getIndicationSurveyList;
12
13
  var getIndicationSurvey = function (id) {
13
14
  return axios_1.default.get("".concat(INDICATION_SURVEY_URL).concat(id)).then(function (response) { return response === null || response === void 0 ? void 0 : response.data; });
14
15
  };
15
16
  exports.getIndicationSurvey = getIndicationSurvey;
17
+ var createPrescription = function (payload) {
18
+ return axios_1.default.post(BASE_URL, payload).then(function (response) { return response === null || response === void 0 ? void 0 : response.data; });
19
+ };
20
+ exports.createPrescription = createPrescription;
@@ -7,21 +7,22 @@ var useConsultation_1 = require("../../common/hooks/useConsultation");
7
7
  var useHeader_1 = require("../../common/hooks/useHeader");
8
8
  var useUser_1 = require("../../common/hooks/useUser");
9
9
  var screens_1 = require("../../common/screens");
10
- var NotValidActiveType_1 = require("../../common/screens/NotValidActiveType");
10
+ var NotValidActiveTypeScreen_1 = require("../../common/screens/NotValidActiveTypeScreen");
11
11
  var consultation_1 = require("../../common/types/consultation");
12
12
  var valid_active_type_1 = require("../../common/utils/valid-active-type");
13
13
  var IndicationSurveyContext_1 = require("../contexts/IndicationSurveyContext");
14
14
  var useScreens_1 = require("../hooks/useScreens");
15
15
  var HomeScreen_1 = require("../screens/HomeScreen");
16
16
  var QuestionnaireScreen_1 = require("../screens/QuestionnaireScreen");
17
+ var ReasonScreen_1 = require("../screens/ReasonScreen");
17
18
  var screens_2 = require("../types/screens");
18
19
  var react_1 = require("react");
19
20
  var react_native_1 = require("react-native");
20
21
  var FORM_PRESCRIPTION_SCREEN_COMPONENTS = (_a = {},
21
22
  _a[screens_2.FORM_PRESCRIPTION_SCREENS.HOME] = <HomeScreen_1.HomeScreen />,
22
23
  _a[screens_2.FORM_PRESCRIPTION_SCREENS.QUESTIONNAIRE] = <QuestionnaireScreen_1.QuestionnaireScreen />,
23
- _a[screens_2.FORM_PRESCRIPTION_SCREENS.FORM] = <react_native_1.View /> // TODO: Implement FormScreen
24
- ,
24
+ _a[screens_2.FORM_PRESCRIPTION_SCREENS.FORM] = <react_native_1.View />,
25
+ _a[screens_2.FORM_PRESCRIPTION_SCREENS.REASON] = <ReasonScreen_1.ReasonScreen />,
25
26
  _a);
26
27
  var ConsultationScreen = function () {
27
28
  var currentScreen = (0, useScreens_1.useScreens)().currentScreen;
@@ -29,7 +30,7 @@ var ConsultationScreen = function () {
29
30
  var getConsultationScreen = (0, react_1.useCallback)(function (consultation) {
30
31
  var validActiveType = (0, valid_active_type_1.checkValidActiveType)(consultation, consultation_1.CASE_TYPE.PRESCRIPTION);
31
32
  if (!validActiveType)
32
- return <NotValidActiveType_1.NotValidActiveType />;
33
+ return <NotValidActiveTypeScreen_1.NotValidActiveTypeScreen caseType={consultation.type}/>;
33
34
  if (!consultation)
34
35
  return FORM_PRESCRIPTION_SCREEN_COMPONENTS[currentScreen];
35
36
  var commonScreen = (0, screens_1.getCommonScreen)(consultation);
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.IndicationCategory = void 0;
7
7
  var ChevronIcon_1 = __importDefault(require("../../common/assets/ChevronIcon"));
8
8
  var Text_1 = require("../../common/components/Text");
9
+ var useCustomComponents_1 = require("../../common/hooks/useCustomComponents");
9
10
  var useTheme_1 = require("../../common/hooks/useTheme");
10
11
  var react_1 = require("react");
11
12
  var react_i18next_1 = require("react-i18next");
@@ -13,27 +14,30 @@ var react_native_1 = require("react-native");
13
14
  var react_native_svg_1 = require("react-native-svg");
14
15
  var IndicationSurveyButton_1 = __importDefault(require("./IndicationSurveyButton"));
15
16
  var IndicationCategory = function (_a) {
17
+ var _b, _c, _d, _e;
16
18
  var iconUrl = _a.iconUrl, textKey = _a.textKey, indications = _a.indications;
17
19
  var t = (0, react_i18next_1.useTranslation)().t;
18
20
  var theme = (0, useTheme_1.useTheme)();
19
21
  var styles = getStyles(theme);
20
- var _b = (0, react_1.useState)(false), open = _b[0], setOpen = _b[1];
21
- return (<react_native_1.View style={styles.container}>
22
+ var screens = (0, useCustomComponents_1.useCustomComponents)().screens;
23
+ var _f = (0, react_1.useState)(false), open = _f[0], setOpen = _f[1];
24
+ return (<react_native_1.TouchableOpacity onPress={function () { return setOpen(!open); }} style={[styles.container, (_c = (_b = screens === null || screens === void 0 ? void 0 : screens.PrescriptionHomeScreen) === null || _b === void 0 ? void 0 : _b.indicationCategoryAccordion) === null || _c === void 0 ? void 0 : _c.containerStyle]}>
22
25
  <react_native_1.View style={styles.titleContainer}>
23
26
  <react_native_1.View style={styles.titleWrapper}>
24
27
  <react_native_svg_1.SvgUri uri={iconUrl} style={styles.icon} accessibilityLabel={t(textKey)} width={16} height={16}/>
25
- <Text_1.Text bold style={styles.title}>
28
+ <Text_1.Text bold style={[styles.title, (_e = (_d = screens === null || screens === void 0 ? void 0 : screens.PrescriptionHomeScreen) === null || _d === void 0 ? void 0 : _d.indicationCategoryAccordion) === null || _e === void 0 ? void 0 : _e.textStyle]}>
26
29
  {t(textKey)}
27
30
  </Text_1.Text>
28
31
  </react_native_1.View>
29
- <react_native_1.TouchableOpacity onPress={function () { return setOpen(!open); }}>
30
- <ChevronIcon_1.default color={open ? theme.palette.primary.base : theme.palette.black} style={open ? { transform: [{ rotate: '180deg' }] } : undefined}/>
31
- </react_native_1.TouchableOpacity>
32
+ <ChevronIcon_1.default color={open ? theme.palette.primary.base : theme.palette.black} style={open ? { transform: [{ rotate: '180deg' }] } : undefined}/>
32
33
  </react_native_1.View>
33
34
  <react_native_1.View style={[styles.buttonsContainer, { display: open ? 'flex' : 'none' }]}>
34
- {indications.map(function (indication) { return (<IndicationSurveyButton_1.default key={indication.textKey} {...indication}/>); })}
35
+ {indications.map(function (indication) {
36
+ var _a, _b;
37
+ return ((_b = (_a = screens === null || screens === void 0 ? void 0 : screens.PrescriptionHomeScreen) === null || _a === void 0 ? void 0 : _a.indicationSurveyButton) === null || _b === void 0 ? void 0 : _b.customComponent) ? (<screens.PrescriptionHomeScreen.indicationSurveyButton.customComponent key={indication.textKey} {...indication}/>) : (<IndicationSurveyButton_1.default key={indication.textKey} {...indication}/>);
38
+ })}
35
39
  </react_native_1.View>
36
- </react_native_1.View>);
40
+ </react_native_1.TouchableOpacity>);
37
41
  };
38
42
  exports.IndicationCategory = IndicationCategory;
39
43
  exports.default = exports.IndicationCategory;
@@ -2,20 +2,23 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IndicationSurveyButton = void 0;
4
4
  var Text_1 = require("../../common/components/Text");
5
+ var useCustomComponents_1 = require("../../common/hooks/useCustomComponents");
5
6
  var useTheme_1 = require("../../common/hooks/useTheme");
6
7
  var useIndicationSurvey_1 = require("../hooks/useIndicationSurvey");
7
8
  var react_i18next_1 = require("react-i18next");
8
9
  var react_native_1 = require("react-native");
9
10
  var react_native_svg_1 = require("react-native-svg");
10
11
  var IndicationSurveyButton = function (_a) {
12
+ var _b, _c, _d, _e;
11
13
  var iconUrl = _a.iconUrl, id = _a.id, textKey = _a.textKey;
12
14
  var t = (0, react_i18next_1.useTranslation)().t;
13
15
  var theme = (0, useTheme_1.useTheme)();
14
16
  var styles = getStyles(theme);
15
17
  var onSelectIndication = (0, useIndicationSurvey_1.useIndicationSurvey)().onSelectIndication;
16
- return (<react_native_1.TouchableOpacity style={[styles.container, theme.shadows.soft]} onPress={function () { return onSelectIndication(id.toString()); }}>
18
+ var screens = (0, useCustomComponents_1.useCustomComponents)().screens;
19
+ return (<react_native_1.TouchableOpacity style={[styles.container, theme.shadows.soft, (_c = (_b = screens === null || screens === void 0 ? void 0 : screens.PrescriptionHomeScreen) === null || _b === void 0 ? void 0 : _b.indicationSurveyButton) === null || _c === void 0 ? void 0 : _c.containerStyle]} onPress={function () { return onSelectIndication(id.toString()); }}>
17
20
  <react_native_svg_1.SvgUri uri={iconUrl} style={styles.icon} accessibilityLabel={t(textKey)} width={16} height={16}/>
18
- <Text_1.Text>{t(textKey)}</Text_1.Text>
21
+ <Text_1.Text style={[(_e = (_d = screens === null || screens === void 0 ? void 0 : screens.PrescriptionHomeScreen) === null || _d === void 0 ? void 0 : _d.indicationSurveyButton) === null || _e === void 0 ? void 0 : _e.textStyle]}>{t(textKey)}</Text_1.Text>
19
22
  </react_native_1.TouchableOpacity>);
20
23
  };
21
24
  exports.IndicationSurveyButton = IndicationSurveyButton;
@@ -67,7 +67,7 @@ var OpenEnded = function () {
67
67
  });
68
68
  }); }
69
69
  }}>
70
- <Input_1.default multiline placeholder={t('general.prescriptionRequest.question.placeholder')} id="answer"/>
70
+ <Input_1.default multiline placeholder={t('general.prescriptionRequest.question.placeholder')} id="answer" style={{ height: 160 }}/>
71
71
  </FormWrapper_1.FormWrapper>);
72
72
  };
73
73
  exports.OpenEnded = OpenEnded;
@@ -7,11 +7,11 @@ export type Item = {
7
7
  };
8
8
  interface SearchableDropDownProps {
9
9
  items?: Item[];
10
- defaultIndex?: number;
11
10
  placeholder?: string;
12
11
  placeholderTextColor?: string;
13
12
  underlineColorAndroid?: string;
14
13
  loading?: boolean;
14
+ disabled?: boolean;
15
15
  onTextChange?: (_: string) => void;
16
16
  onItemSelect?: (_?: any) => void;
17
17
  onFocus?: () => void;
@@ -60,7 +60,7 @@ var react_1 = __importStar(require("react"));
60
60
  var react_i18next_1 = require("react-i18next");
61
61
  var react_native_1 = require("react-native");
62
62
  var SearchableDropDown = function (props) {
63
- var _a = props.items, items = _a === void 0 ? [] : _a, defaultIndex = props.defaultIndex, _b = props.placeholder, placeholder = _b === void 0 ? 'Search...' : _b, placeholderTextColor = props.placeholderTextColor, _c = props.underlineColorAndroid, underlineColorAndroid = _c === void 0 ? 'transparent' : _c, onTextChange = props.onTextChange, onItemSelect = props.onItemSelect, onFocus = props.onFocus;
63
+ var _a = props.items, items = _a === void 0 ? [] : _a, _b = props.placeholder, placeholder = _b === void 0 ? 'Search...' : _b, placeholderTextColor = props.placeholderTextColor, _c = props.underlineColorAndroid, underlineColorAndroid = _c === void 0 ? 'transparent' : _c, disabled = props.disabled, onTextChange = props.onTextChange, onItemSelect = props.onItemSelect, onFocus = props.onFocus;
64
64
  var t = (0, react_i18next_1.useTranslation)().t;
65
65
  var theme = (0, useTheme_1.useTheme)();
66
66
  var styles = (0, exports.getStyles)(theme);
@@ -105,7 +105,7 @@ var SearchableDropDown = function (props) {
105
105
  (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
106
106
  }, 500);
107
107
  onFocus === null || onFocus === void 0 ? void 0 : onFocus();
108
- }}>
108
+ }} disabled={disabled}>
109
109
  <SearchGlassIcon_1.default />
110
110
  <react_native_1.Text style={[styles.input, { color: (item === null || item === void 0 ? void 0 : item.label) ? theme.palette.black : placeholderTextColor }]}>{(item === null || item === void 0 ? void 0 : item.label) || placeholder}</react_native_1.Text>
111
111
  <DropdownIcon_1.default />
@@ -0,0 +1 @@
1
+ export declare const HomeLoader: () => import("react").JSX.Element;