@abihealth/goapp-react-native 1.39.0 → 1.40.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.40.0](https://github.com/abiglobalhealth/react-native-sdk/compare/goapp-react-native-v1.39.1...goapp-react-native-v1.40.0) (2025-08-05)
4
+
5
+
6
+ ### Features
7
+
8
+ * [ABI-10374][ABI-10375] Add accessibility labels and update translations ([#230](https://github.com/abiglobalhealth/react-native-sdk/issues/230)) ([68e14d6](https://github.com/abiglobalhealth/react-native-sdk/commit/68e14d663f66df14e968ef299f07d88f1c00201e))
9
+
10
+ ## [1.39.1](https://github.com/abiglobalhealth/react-native-sdk/compare/goapp-react-native-v1.39.0...goapp-react-native-v1.39.1) (2025-08-05)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * use user's language for translations and remove sentry ([#228](https://github.com/abiglobalhealth/react-native-sdk/issues/228)) ([2ac9900](https://github.com/abiglobalhealth/react-native-sdk/commit/2ac9900011ff34c76fc298c10b6d14ffca68165f))
16
+
3
17
  ## [1.39.0](https://github.com/abiglobalhealth/react-native-sdk/compare/goapp-react-native-v1.38.0...goapp-react-native-v1.39.0) (2025-07-28)
4
18
 
5
19
 
@@ -22,5 +22,5 @@ export type ConsultationContextProps = ConsultationProviderProps & {
22
22
  initialised: boolean;
23
23
  };
24
24
  export declare const ConsultationContext: import("react").Context<ConsultationContextProps>;
25
- export declare const ConsultationProvider: import("react").ComponentType<PropsWithChildren<ConsultationProviderProps>>;
25
+ export declare const ConsultationProvider: ({ children, token, region, theme, components, onError, disableSslPinning }: PropsWithChildren<ConsultationProviderProps>) => import("react").JSX.Element;
26
26
  export {};
@@ -1,37 +1,4 @@
1
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
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -81,22 +48,11 @@ var websocket_1 = require("../api/websocket");
81
48
  var i18n_1 = __importDefault(require("../locale/i18n"));
82
49
  var theme_1 = require("../types/theme");
83
50
  var logger_1 = require("../utils/logger");
84
- var Sentry = __importStar(require("@sentry/react-native"));
85
51
  var axios_1 = require("axios");
86
52
  var react_1 = require("react");
87
53
  var react_i18next_1 = require("react-i18next");
88
54
  var react_native_ssl_public_key_pinning_1 = require("react-native-ssl-public-key-pinning");
89
55
  var ThemeContext_1 = require("./ThemeContext");
90
- Sentry.init({
91
- dsn: 'https://96715a92da01f75091f8996d706f825a@o509172.ingest.us.sentry.io/4508844894912512',
92
- sendDefaultPii: true,
93
- replaysSessionSampleRate: 0.1,
94
- replaysOnErrorSampleRate: 1,
95
- integrations: [Sentry.mobileReplayIntegration()],
96
- tracesSampleRate: 1.0,
97
- profilesSampleRate: 1.0,
98
- environment: __DEV__ ? 'development' : 'production'
99
- });
100
56
  // eslint-disable-next-line react-refresh/only-export-components
101
57
  exports.ConsultationContext = (0, react_1.createContext)({
102
58
  region: 'ape1',
@@ -110,7 +66,7 @@ exports.ConsultationContext = (0, react_1.createContext)({
110
66
  slug: null,
111
67
  initialised: false
112
68
  });
113
- exports.ConsultationProvider = Sentry.wrap(function (_a) {
69
+ var ConsultationProvider = function (_a) {
114
70
  var children = _a.children, token = _a.token, region = _a.region, theme = _a.theme, components = _a.components, _b = _a.onError, onError = _b === void 0 ? function () { } : _b, _c = _a.disableSslPinning, disableSslPinning = _c === void 0 ? false : _c;
115
71
  var _d = (0, react_1.useState)(null), consultation = _d[0], setConsultation = _d[1];
116
72
  var _e = (0, react_1.useState)(null), user = _e[0], setUser = _e[1];
@@ -243,6 +199,13 @@ exports.ConsultationProvider = Sentry.wrap(function (_a) {
243
199
  (0, websocket_1.connectWebsocket)({ token: token, region: region }).then(setWebsocket).catch(handleError);
244
200
  };
245
201
  }, [websocket]);
202
+ (0, react_1.useEffect)(function () {
203
+ if (!(user === null || user === void 0 ? void 0 : user.language))
204
+ return;
205
+ var parsedLanguage = user.language.replace('_', '-');
206
+ logger_1.Logger.log('Setting i18n language', parsedLanguage);
207
+ i18n_1.default.changeLanguage(parsedLanguage);
208
+ }, [user === null || user === void 0 ? void 0 : user.language]);
246
209
  (0, react_1.useEffect)(function () {
247
210
  var subscription = (0, react_native_ssl_public_key_pinning_1.addSslPinningErrorListener)(function (e) { return logger_1.Logger.error('SSL Pinning error', e); });
248
211
  return function () { return subscription.remove(); };
@@ -260,10 +223,11 @@ exports.ConsultationProvider = Sentry.wrap(function (_a) {
260
223
  initialised: initialised
261
224
  };
262
225
  return (<exports.ConsultationContext.Provider value={value}>
263
- <react_i18next_1.I18nextProvider i18n={i18n_1.default}>
264
- <ThemeContext_1.ThemeProvider theme={theme} components={components}>
265
- {children}
266
- </ThemeContext_1.ThemeProvider>
267
- </react_i18next_1.I18nextProvider>
268
- </exports.ConsultationContext.Provider>);
269
- });
226
+ <react_i18next_1.I18nextProvider i18n={i18n_1.default}>
227
+ <ThemeContext_1.ThemeProvider theme={theme} components={components}>
228
+ {children}
229
+ </ThemeContext_1.ThemeProvider>
230
+ </react_i18next_1.I18nextProvider>
231
+ </exports.ConsultationContext.Provider>);
232
+ };
233
+ exports.ConsultationProvider = ConsultationProvider;
@@ -31,6 +31,7 @@ var es_base_json_1 = __importDefault(require("./translations/es.base.json"));
31
31
  var es_MX_base_json_1 = __importDefault(require("./translations/es-MX.base.json"));
32
32
  var es_MX_prescriptionSurveys_json_1 = __importDefault(require("./translations/es-MX.prescriptionSurveys.json"));
33
33
  var fr_base_json_1 = __importDefault(require("./translations/fr.base.json"));
34
+ var hr_base_json_1 = __importDefault(require("./translations/hr.base.json"));
34
35
  var hr_prescriptionSurveys_json_1 = __importDefault(require("./translations/hr.prescriptionSurveys.json"));
35
36
  var hu_base_json_1 = __importDefault(require("./translations/hu.base.json"));
36
37
  var hu_prescriptionSurveys_json_1 = __importDefault(require("./translations/hu.prescriptionSurveys.json"));
@@ -40,7 +41,9 @@ var pl_base_json_1 = __importDefault(require("./translations/pl.base.json"));
40
41
  var ro_base_json_1 = __importDefault(require("./translations/ro.base.json"));
41
42
  var ru_base_json_1 = __importDefault(require("./translations/ru.base.json"));
42
43
  var sk_base_json_1 = __importDefault(require("./translations/sk.base.json"));
44
+ var sl_base_json_1 = __importDefault(require("./translations/sl.base.json"));
43
45
  var sl_prescriptionSurveys_json_1 = __importDefault(require("./translations/sl.prescriptionSurveys.json"));
46
+ var zh_CN_base_json_1 = __importDefault(require("./translations/zh-CN.base.json"));
44
47
  var zh_CN_prescriptionSurveys_json_1 = __importDefault(require("./translations/zh-CN.prescriptionSurveys.json"));
45
48
  var zh_HK_base_json_1 = __importDefault(require("./translations/zh-HK.base.json"));
46
49
  var zh_HK_prescriptionSurveys_json_1 = __importDefault(require("./translations/zh-HK.prescriptionSurveys.json"));
@@ -62,17 +65,17 @@ var resources = {
62
65
  es: createResources(es_base_json_1.default),
63
66
  fr: createResources(fr_base_json_1.default),
64
67
  hu: createResources(hu_base_json_1.default, hu_prescriptionSurveys_json_1.default),
65
- hr: createResources({}, hr_prescriptionSurveys_json_1.default),
68
+ hr: createResources(hr_base_json_1.default, hr_prescriptionSurveys_json_1.default),
66
69
  it: createResources(it_base_json_1.default, it_prescriptionSurveys_json_1.default),
67
70
  pl: createResources(pl_base_json_1.default),
68
71
  ro: createResources(ro_base_json_1.default),
69
72
  ru: createResources(ru_base_json_1.default),
70
73
  sk: createResources(sk_base_json_1.default),
71
- sl: createResources({}, sl_prescriptionSurveys_json_1.default),
74
+ sl: createResources(sl_base_json_1.default, sl_prescriptionSurveys_json_1.default),
72
75
  'zh-HK': createResources(zh_HK_base_json_1.default, zh_HK_prescriptionSurveys_json_1.default),
73
76
  'zh-SG': createResources(zh_SG_base_json_1.default, zh_SG_prescriptionSurveys_json_1.default),
74
77
  'zh-TW': createResources(zh_TW_base_json_1.default, zh_TW_prescriptionSurveys_json_1.default),
75
- 'zh-CN': createResources({}, zh_CN_prescriptionSurveys_json_1.default)
78
+ 'zh-CN': createResources(zh_CN_base_json_1.default, zh_CN_prescriptionSurveys_json_1.default)
76
79
  };
77
80
  var DEFAULT_LANGUAGE = 'en';
78
81
  var defaultLanguage = function () {
@@ -1,4 +1,12 @@
1
1
  {
2
+ "accessibility.camera_back": "Switch to back camera",
3
+ "accessibility.camera_front": "Switch to front camera",
4
+ "accessibility.camera_off": "Turn off camera",
5
+ "accessibility.camera_on": "Turn on camera",
6
+ "accessibility.end_call": "End call",
7
+ "accessibility.join_the_call": "Join the call",
8
+ "accessibility.microphone_mute": "Mute microphone",
9
+ "accessibility.microphone_unmute": "Unmute microphone",
2
10
  "answer.reset": "Ask a new question",
3
11
  "answer.thanks.rating": "Thanks for your rating!",
4
12
  "attachmentPreview.title": "Attachment",
@@ -14,6 +22,7 @@
14
22
  "button.cancel_case": "Cancel case",
15
23
  "button.cancel.hsbc-hk": "Cancel",
16
24
  "button.close_consultation": "Close consultation",
25
+ "button.close_consultation.hsbc-hk": "End consultation",
17
26
  "button.confirm": "CONFIRM",
18
27
  "button.confirm_close": "Confirm & close",
19
28
  "button.confirm_close.hsbc-hk": "Yes, confirm and end",
@@ -735,6 +744,9 @@
735
744
  "match.one_minute": "This usually takes less than 1 minute but it may take longer at certain times of the day.",
736
745
  "match.one_minute.hsbc-hk": "This usually takes less than a minute but it may take longer at peak times.",
737
746
  "matching": "Matching you with the right healthcare professional",
747
+ "matching.disclaimer.diagnosis.hsbc-hk": "AI doesn't drive your diagnosis or treatment; only the doctor is in charge of making those decisions.",
748
+ "matching.disclaimer.label.hsbc-hk": "Disclaimer",
749
+ "matching.disclaimer.sentence.hsbc-hk": "This feature uses Artificial Intelligence (AI) to help match you with the right healthcare professional based on your symptoms.",
738
750
  "matching.hsbc-hk": "Matching you with the right healthcare professional",
739
751
  "matching.video.text_message": "You will receive a text message when a doctor invites you to join a videocall.",
740
752
  "medical_advice.call_visana": "Based on the doctor’s assessment, you should contact Medi24 on the following number: \n \n</b> <a href=\"tel: +41 800 633 225\">+41 800 633 225</a> <b>",
@@ -0,0 +1,12 @@
1
+ {
2
+ "medical_advice.call_visana": "Glede na zdravnikovo oceno kontaktirajte Medi24 na naslednjo številko:\n\n</b> <a href=\"Tel. št.: +41 800 633 225\">+41 800 633 225</a> <b>",
3
+ "medical_advice.emergency_visana": "Pokličite številko za klic v sili <b><a href=\"tel:144\">144</a> </b>ali nemudoma obiščite urgentni center.",
4
+ "medical_advice.no_visit_necessary_visana": "Obisk zdravnika ni potreben. Upoštevajte priporočila, ki jih je navedel zdravnik.",
5
+ "medical_advice.visit_doctor_next_seven_days_visana": "Obiščite zdravnika {{specialty}} v naslednjih 7 dneh.",
6
+ "medical_advice.visit_doctor_next_six_hours_visana": "Glede na zdravnikov odgovor je bila vašemu medicinskemu primeru dodeljena naslednja raven nujnosti:\n \nObiščite zdravnika {{specialty}} v naslednjih 6 urah.",
7
+ "medical_advice.visit_doctor_next_twentyfour_hours_visana": "Glede na zdravnikov odgovor je bila vašemu medicinskemu primeru dodeljena naslednja raven nujnosti:\n\nObiščite zdravnika {{specialty}} v naslednjih 24 urah.",
8
+ "referral.button": "Prikaži nujnost",
9
+ "referral.level.confirmation": "Sestanek ustrezno zabeležen",
10
+ "referral.level.register": "Registriraj sestanek",
11
+ "referral.level.title": "Glede na zdravnikov odgovor je bila vašemu medicinskemu primeru dodeljena ena od naslednjih ravni nujnosti:"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "medical_advice.call_visana": "根据医生的评估,您应该联系Medi24,电话号码如下:\n\n</b> <a href=\"\"tel: +41 800 633 225\"\">+41 800 633 225</a> <b>",
3
+ "medical_advice.emergency_visana": "拨打紧急电话<b> <a href=\"\"tel:144\"\">144</a> </b>或立即前往急诊室。",
4
+ "medical_advice.no_visit_necessary_visana": "不需要医疗就诊。请按照医生提供的建议行事。",
5
+ "medical_advice.visit_doctor_next_seven_days_visana": "在接下来的7天内看医生({{specialty}})",
6
+ "medical_advice.visit_doctor_next_six_hours_visana": "根据医生的回答,您的医疗病例被分配了以下紧急程度:\n\n在接下来的6小时内看医生({{specialty}})。",
7
+ "medical_advice.visit_doctor_next_twentyfour_hours_visana": "根据医生的回答,您的医疗病例被分配了以下紧急程度:\n\n在接下来的24小时内看医生({{specialty}})",
8
+ "referral.button": "查看紧急程度",
9
+ "referral.level.confirmation": "预约已成功",
10
+ "referral.level.register": "注册预约",
11
+ "referral.level.title": "根据医生的回答,您的医疗病例已被分配以下紧急程度:"
12
+ }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "accessibility.join_the_call": "開始對話",
2
3
  "answer.reset": "發問新問題",
3
4
  "answer.thanks.rating": "感謝您的評分!",
4
5
  "attachmentPreview.title": "附件",
@@ -8,6 +9,7 @@
8
9
  "button.cancel": "取消",
9
10
  "button.cancel_case": "取消個案",
10
11
  "button.cancel.hsbc-hk": "取消",
12
+ "button.close_consultation.hsbc-hk": "結束診症",
11
13
  "button.confirm": "確認",
12
14
  "button.confirm_close.hsbc-hk": "是,確認並結束",
13
15
  "button.continue": "繼續",
@@ -207,6 +209,9 @@
207
209
  "match.one_minute": "這通常需時少於 1 分鐘,但在特定時間可能需時更長。",
208
210
  "match.one_minute.hsbc-hk": "尋找通常需時少於1分鐘,如遇繁忙時間則需較多時間。",
209
211
  "matching": "正在為您配對合適的醫療專業人員",
212
+ "matching.disclaimer.diagnosis.hsbc-hk": "人工智能並不會為您診症或治療,只有負責的醫生方會診症及/或治療。",
213
+ "matching.disclaimer.label.hsbc-hk": "聲明",
214
+ "matching.disclaimer.sentence.hsbc-hk": "此功能使用人工智能服務,按相關病徵為您尋找合適的專業醫護人員。",
210
215
  "matching.hsbc-hk": "正在為您尋找合適的專業醫護人員",
211
216
  "matching.video.text_message": "在醫生邀請您加入視像通話時,您會收到短訊。",
212
217
  "medical_advice.call_visana": "根據醫生的評估,您應利用以下號碼聯絡 Medi24:\n\n</b> <a href=\"tel: +41 800 633 225\">+41 800 633 225</a> <b>",
@@ -1,42 +1,8 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
3
  exports.Logger = void 0;
37
4
  var logger_1 = require("../api/logger");
38
5
  var logger_2 = require("../api/models/logger");
39
- var Sentry = __importStar(require("@sentry/react-native"));
40
6
  var react_native_1 = require("react-native");
41
7
  exports.Logger = {
42
8
  debug: function (message, data) {
@@ -57,10 +23,6 @@ exports.Logger = {
57
23
  platform: react_native_1.Platform
58
24
  };
59
25
  console.log('⚪', log);
60
- Sentry.captureMessage(message, {
61
- extra: { data: data, platform: react_native_1.Platform },
62
- level: 'info'
63
- });
64
26
  // return sendLog(log)
65
27
  return new Promise(function (resolve) { return resolve(); });
66
28
  },
@@ -72,9 +34,6 @@ exports.Logger = {
72
34
  platform: react_native_1.Platform
73
35
  };
74
36
  console.error('🔴', log);
75
- Sentry.captureException(new Error(message), {
76
- extra: { data: data, platform: react_native_1.Platform }
77
- });
78
37
  return (0, logger_1.sendLog)(log);
79
38
  },
80
39
  warn: function (message, data) {
@@ -85,10 +44,6 @@ exports.Logger = {
85
44
  platform: react_native_1.Platform
86
45
  };
87
46
  console.warn('🟡', log);
88
- Sentry.captureMessage(message, {
89
- extra: { data: data, platform: react_native_1.Platform },
90
- level: 'warning'
91
- });
92
47
  return (0, logger_1.sendLog)(log);
93
48
  }
94
49
  };
@@ -52,8 +52,9 @@ var AgoraWrapper = function (_a) {
52
52
  var _c = (0, react_1.useState)(false), muteLocalVideoStream = _c[0], setMuteLocalVideoStream = _c[1];
53
53
  var _d = (0, react_1.useState)(false), remoteVideoMuted = _d[0], setRemoteVideoMuted = _d[1];
54
54
  var _e = (0, react_1.useState)(false), remoteAudioMuted = _e[0], setRemoteAudioMuted = _e[1];
55
- var _f = (0, useInitRtcEngine_1.default)(rtcProps, true), channelId = _f.channelId, token = _f.token, uid = _f.uid, joinChannelSuccess = _f.joinChannelSuccess, remoteUsers = _f.remoteUsers, startPreview = _f.startPreview, engine = _f.engine, setRemoteUsers = _f.setRemoteUsers;
56
- var _g = (0, react_1.useState)(false), showEndCallModal = _g[0], setShowEndCallModal = _g[1];
55
+ var _f = (0, react_1.useState)(false), frontCamera = _f[0], setFrontCamera = _f[1];
56
+ var _g = (0, useInitRtcEngine_1.default)(rtcProps, true), channelId = _g.channelId, token = _g.token, uid = _g.uid, joinChannelSuccess = _g.joinChannelSuccess, remoteUsers = _g.remoteUsers, startPreview = _g.startPreview, engine = _g.engine, setRemoteUsers = _g.setRemoteUsers;
57
+ var _h = (0, react_1.useState)(false), showEndCallModal = _h[0], setShowEndCallModal = _h[1];
57
58
  var joinChannel = function () {
58
59
  if (!channelId) {
59
60
  logger_1.Logger.error('channelId is invalid');
@@ -172,8 +173,11 @@ var AgoraWrapper = function (_a) {
172
173
  </react_native_1.View>
173
174
 
174
175
  <react_native_1.View style={styles.float} pointerEvents={'box-none'}>
175
- <BtnControls_1.default muteLocalAudioStream={muteLocalAudioStream} muteLocalVideoStream={muteLocalVideoStream} remoteUsers={remoteUsers} controlActions={{
176
- switchCamera: _switchCamera,
176
+ <BtnControls_1.default muteLocalAudioStream={muteLocalAudioStream} muteLocalVideoStream={muteLocalVideoStream} frontCamera={frontCamera} remoteUsers={remoteUsers} controlActions={{
177
+ switchCamera: function () {
178
+ _switchCamera();
179
+ setFrontCamera(function (prev) { return !prev; });
180
+ },
177
181
  localAudioStream: muteLocalAudioStream ? unmuteLocalAudioStream : _muteLocalAudioStream,
178
182
  localVideoStream: muteLocalVideoStream ? unmuteLocalVideoStream : _muteLocalVideoStream,
179
183
  endCall: function () {
@@ -3,6 +3,7 @@ interface BtnControlsProps {
3
3
  remoteUsers: number[];
4
4
  muteLocalAudioStream: boolean;
5
5
  muteLocalVideoStream: boolean;
6
+ frontCamera?: boolean;
6
7
  controlActions: {
7
8
  switchCamera: () => void;
8
9
  localAudioStream: () => void;
@@ -10,5 +11,5 @@ interface BtnControlsProps {
10
11
  endCall: () => void;
11
12
  };
12
13
  }
13
- export declare const BtnControls: ({ controlActions, remoteUsers, muteLocalAudioStream, muteLocalVideoStream }: BtnControlsProps) => React.JSX.Element;
14
+ export declare const BtnControls: ({ controlActions, remoteUsers, muteLocalAudioStream, muteLocalVideoStream, frontCamera }: BtnControlsProps) => React.JSX.Element;
14
15
  export default BtnControls;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.BtnControls = void 0;
7
7
  var useCustomComponents_1 = require("../../../../common/hooks/useCustomComponents");
8
8
  var useTheme_1 = require("../../../../common/hooks/useTheme");
9
+ var useTranslation_1 = require("../../../../common/hooks/useTranslation");
9
10
  var HangUpIcon_1 = __importDefault(require("../../../icons/HangUpIcon"));
10
11
  var MicroOffIcon_1 = __importDefault(require("../../../icons/MicroOffIcon"));
11
12
  var MicroOnIcon_1 = __importDefault(require("../../../icons/MicroOnIcon"));
@@ -17,7 +18,8 @@ var react_native_1 = require("react-native");
17
18
  var ui_1 = require("./ui");
18
19
  var BtnControls = function (_a) {
19
20
  var _b, _c, _d, _e, _f, _g, _h;
20
- var controlActions = _a.controlActions, remoteUsers = _a.remoteUsers, muteLocalAudioStream = _a.muteLocalAudioStream, muteLocalVideoStream = _a.muteLocalVideoStream;
21
+ var controlActions = _a.controlActions, remoteUsers = _a.remoteUsers, muteLocalAudioStream = _a.muteLocalAudioStream, muteLocalVideoStream = _a.muteLocalVideoStream, frontCamera = _a.frontCamera;
22
+ var t = (0, useTranslation_1.useTranslation)().t;
21
23
  var theme = (0, useTheme_1.useTheme)();
22
24
  var styles = getStyles(theme);
23
25
  var screens = (0, useCustomComponents_1.useCustomComponents)().screens;
@@ -25,10 +27,10 @@ var BtnControls = function (_a) {
25
27
  var iconStyle = (_b = videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.controlButtons) === null || _b === void 0 ? void 0 : _b.iconStyle;
26
28
  return (<react_native_1.View style={[styles.btnContainer, theme.shadows.soft, videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.buttonsContainerStyle]}>
27
29
  <react_native_1.View style={styles.btnContent}>
28
- <ui_1.VideoCallButton icon={muteLocalAudioStream ? <MicroOffIcon_1.default {...iconStyle}/> : <MicroOnIcon_1.default {...iconStyle}/>} name={'audiomute'} onPress={controlActions.localAudioStream} isMuted={muteLocalAudioStream} customStyle={(_c = videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.controlButtons) === null || _c === void 0 ? void 0 : _c.containerStyle}/>
29
- <ui_1.VideoCallButton icon={muteLocalVideoStream ? <VideoOffIcon_1.default {...iconStyle}/> : <VideoOnIcon_1.default {...iconStyle}/>} name={'videomute'} onPress={controlActions.localVideoStream} isMuted={muteLocalVideoStream} customStyle={(_d = videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.controlButtons) === null || _d === void 0 ? void 0 : _d.containerStyle}/>
30
- <ui_1.VideoCallButton disabled={!remoteUsers.length} icon={<SwitchCameraIcon_1.default {...iconStyle}/>} name={'switchCamera'} onPress={controlActions.switchCamera} customStyle={(_e = videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.controlButtons) === null || _e === void 0 ? void 0 : _e.containerStyle}/>
31
- {((_f = videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.EndCallButton) === null || _f === void 0 ? void 0 : _f.customComponent) ? (<videoCallScreen.EndCallButton.customComponent onPress={controlActions.endCall}/>) : (<ui_1.VideoCallButton customStyle={[styles.endCall, (_g = videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.EndCallButton) === null || _g === void 0 ? void 0 : _g.containerStyle]} icon={<HangUpIcon_1.default {...(_h = videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.EndCallButton) === null || _h === void 0 ? void 0 : _h.iconStyle}/>} name={'endCall'} onPress={controlActions.endCall}/>)}
30
+ <ui_1.VideoCallButton icon={muteLocalAudioStream ? <MicroOffIcon_1.default {...iconStyle}/> : <MicroOnIcon_1.default {...iconStyle}/>} name={'audiomute'} onPress={controlActions.localAudioStream} isMuted={muteLocalAudioStream} customStyle={(_c = videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.controlButtons) === null || _c === void 0 ? void 0 : _c.containerStyle} accessibilityLabel={muteLocalAudioStream ? t('accessibility.microphone_mute') : t('accessibility.microphone_unmute')}/>
31
+ <ui_1.VideoCallButton icon={muteLocalVideoStream ? <VideoOffIcon_1.default {...iconStyle}/> : <VideoOnIcon_1.default {...iconStyle}/>} name={'videomute'} onPress={controlActions.localVideoStream} isMuted={muteLocalVideoStream} customStyle={(_d = videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.controlButtons) === null || _d === void 0 ? void 0 : _d.containerStyle} accessibilityLabel={muteLocalVideoStream ? t('accessibility.camera_off') : t('accessibility.camera_on')}/>
32
+ <ui_1.VideoCallButton disabled={!remoteUsers.length} icon={<SwitchCameraIcon_1.default {...iconStyle}/>} name={'switchCamera'} onPress={controlActions.switchCamera} customStyle={(_e = videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.controlButtons) === null || _e === void 0 ? void 0 : _e.containerStyle} accessibilityLabel={frontCamera ? t('accessibility.camera_back') : t('accessibility.camera_front')}/>
33
+ {((_f = videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.EndCallButton) === null || _f === void 0 ? void 0 : _f.customComponent) ? (<videoCallScreen.EndCallButton.customComponent onPress={controlActions.endCall}/>) : (<ui_1.VideoCallButton customStyle={[styles.endCall, (_g = videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.EndCallButton) === null || _g === void 0 ? void 0 : _g.containerStyle]} icon={<HangUpIcon_1.default {...(_h = videoCallScreen === null || videoCallScreen === void 0 ? void 0 : videoCallScreen.EndCallButton) === null || _h === void 0 ? void 0 : _h.iconStyle}/>} name={'endCall'} onPress={controlActions.endCall} accessibilityLabel={t('accessibility.end_call')}/>)}
32
34
  </react_native_1.View>
33
35
  </react_native_1.View>);
34
36
  };
@@ -7,6 +7,7 @@ interface VideoCallButtonProps {
7
7
  isMuted?: boolean;
8
8
  name: string;
9
9
  customStyle?: StyleProp<ViewStyle>;
10
+ accessibilityLabel?: string;
10
11
  onPress: () => void;
11
12
  }
12
13
  export declare const VideoCallButton: (props: VideoCallButtonProps) => React.JSX.Element;
@@ -24,8 +24,8 @@ Object.defineProperty(exports, "RtcSurfaceView", { enumerable: true, get: functi
24
24
  var VideoCallButton = function (props) {
25
25
  var theme = (0, useTheme_1.useTheme)();
26
26
  var styles = getStyles(theme);
27
- var _a = props.disabled, disabled = _a === void 0 ? false : _a, icon = props.icon, _b = props.isMuted, isMuted = _b === void 0 ? false : _b, _c = props.customStyle, customStyle = _c === void 0 ? {} : _c;
28
- return (<react_native_1.TouchableOpacity style={styles.buttonPress} disabled={disabled} onPress={props.onPress}>
27
+ var _a = props.disabled, disabled = _a === void 0 ? false : _a, icon = props.icon, _b = props.isMuted, isMuted = _b === void 0 ? false : _b, _c = props.customStyle, customStyle = _c === void 0 ? {} : _c, accessibilityLabel = props.accessibilityLabel;
28
+ return (<react_native_1.TouchableOpacity style={styles.buttonPress} disabled={disabled} onPress={props.onPress} accessibilityLabel={accessibilityLabel}>
29
29
  <react_native_1.View style={[styles.buttonControl, customStyle, theme.shadows.soft, isMuted ? { opacity: 0.3 } : {}]}>{icon}</react_native_1.View>
30
30
  </react_native_1.TouchableOpacity>);
31
31
  };
@@ -77,7 +77,7 @@ var JoinVideoCallScreen = function (_a) {
77
77
  </react_native_1.View>
78
78
 
79
79
  <react_native_1.View style={styles.footer}>
80
- {(customComponents === null || customComponents === void 0 ? void 0 : customComponents.JoinCallButton) ? (<customComponents.JoinCallButton onPress={onJoinVideoCall}/>) : (<Button_1.Button icon={<VideoConsultationIcon_1.VideoConsultationIcon />} onPress={onJoinVideoCall}>
80
+ {(customComponents === null || customComponents === void 0 ? void 0 : customComponents.JoinCallButton) ? (<customComponents.JoinCallButton onPress={onJoinVideoCall}/>) : (<Button_1.Button icon={<VideoConsultationIcon_1.VideoConsultationIcon />} onPress={onJoinVideoCall} accessibilityLabel={t('accessibility.join_the_call')}>
81
81
  {t('video.calling.button')}
82
82
  </Button_1.Button>)}
83
83
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abihealth/goapp-react-native",
3
- "version": "1.39.0",
3
+ "version": "1.40.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -15,7 +15,6 @@
15
15
  "main": "./dist/index.js",
16
16
  "types": "./dist/index.d.ts",
17
17
  "dependencies": {
18
- "@sentry/react-native": "^6.16.1",
19
18
  "axios": "^1.8.0",
20
19
  "i18next": "23.16.8",
21
20
  "phone": "3.1.58",