@wavemaker/app-rn-runtime 11.14.1-3.6306 → 11.14.1-32.647748
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/components/advanced/webview/webview.component.js +1 -1
- package/components/advanced/webview/webview.component.js.map +1 -1
- package/components/basic/label/label.component.js +2 -2
- package/components/basic/label/label.component.js.map +1 -1
- package/components/container/wizard/wizard.component.js +5 -3
- package/components/container/wizard/wizard.component.js.map +1 -1
- package/components/container/wizard/wizard.props.js +1 -0
- package/components/container/wizard/wizard.props.js.map +1 -1
- package/components/container/wizard/wizard.styles.js +1 -3
- package/components/container/wizard/wizard.styles.js.map +1 -1
- package/components/container/wizard/wizardstep/wizardstep.component.js +23 -4
- package/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- package/components/container/wizard/wizardstep/wizardstep.props.js +2 -0
- package/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- package/components/dialogs/dialogcontent/dialogcontent.component.js +2 -1
- package/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- package/components/input/checkboxset/checkboxset.component.js +1 -1
- package/components/input/checkboxset/checkboxset.component.js.map +1 -1
- package/components/input/radioset/radioset.component.js +8 -3
- package/components/input/radioset/radioset.component.js.map +1 -1
- package/components/input/text/text.component.js +2 -2
- package/components/input/text/text.component.js.map +1 -1
- package/components/input/textarea/textarea.component.js +2 -2
- package/components/input/textarea/textarea.component.js.map +1 -1
- package/components/navigation/popover/popover.component.js +3 -3
- package/components/navigation/popover/popover.component.js.map +1 -1
- package/core/AppConfig.js.map +1 -1
- package/core/advanced-promise-rejection-tracker.js +207 -0
- package/core/advanced-promise-rejection-tracker.js.map +1 -0
- package/core/base.component.js +5 -0
- package/core/base.component.js.map +1 -1
- package/core/components/error-fallback/error-fallback.component.js +50 -18
- package/core/components/error-fallback/error-fallback.component.js.map +1 -1
- package/core/components/error-fallback/error-fallback.styles.js +4 -1
- package/core/components/error-fallback/error-fallback.styles.js.map +1 -1
- package/core/components/textinput.component.js +3 -0
- package/core/components/textinput.component.js.map +1 -1
- package/core/error-boundary.component.js +46 -2
- package/core/error-boundary.component.js.map +1 -1
- package/core/global-error-handler.service.js +177 -0
- package/core/global-error-handler.service.js.map +1 -0
- package/core/tappable.component.js +1 -1
- package/core/tappable.component.js.map +1 -1
- package/npm-shrinkwrap.json +4080 -2795
- package/package-lock.json +4080 -2795
- package/package.json +8 -3
- package/runtime/App.js +181 -30
- package/runtime/App.js.map +1 -1
- package/runtime/App.navigator.js +4 -1
- package/runtime/App.navigator.js.map +1 -1
- package/runtime/base-page.component.js +11 -2
- package/runtime/base-page.component.js.map +1 -1
- package/runtime/navigator/stack.navigator.js +6 -0
- package/runtime/navigator/stack.navigator.js.map +1 -1
- package/runtime/services/app-security.service.js +40 -19
- package/runtime/services/app-security.service.js.map +1 -1
- package/runtime/services/browser.constants.js +3 -0
- package/runtime/services/browser.constants.js.map +1 -0
- package/runtime/services/browser.service.js +321 -0
- package/runtime/services/browser.service.js.map +1 -0
- package/runtime/services/external-auth-callback.service.js +44 -0
- package/runtime/services/external-auth-callback.service.js.map +1 -0
- package/runtime/services/webprocess.service.js +8 -3
- package/runtime/services/webprocess.service.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/app-rn-runtime",
|
|
3
|
-
"version": "11.14.1-
|
|
3
|
+
"version": "11.14.1-32.647748",
|
|
4
4
|
"description": "''",
|
|
5
5
|
"main": "index",
|
|
6
6
|
"module": "index",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@react-navigation/drawer": "7.5.8",
|
|
60
60
|
"@react-navigation/native": "7.1.18",
|
|
61
61
|
"@react-navigation/stack": "7.4.8",
|
|
62
|
-
"@wavemaker/variables": "11.14.1-
|
|
62
|
+
"@wavemaker/variables": "11.14.1-32.647748",
|
|
63
63
|
"axios": "1.8.3",
|
|
64
64
|
"color": "4.2.3",
|
|
65
65
|
"cross-env": "7.0.3",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"expo-video": "3.0.11",
|
|
73
73
|
"fast-xml-parser": "4.5.3",
|
|
74
74
|
"imask": "7.6.1",
|
|
75
|
-
"lodash-es": "4.
|
|
75
|
+
"lodash-es": "4.18.1",
|
|
76
76
|
"lottie-react-native": "7.3.4",
|
|
77
77
|
"moment": "2.30.1",
|
|
78
78
|
"react-lottie-player": "2.1.0",
|
|
@@ -157,6 +157,11 @@
|
|
|
157
157
|
"victory-native": "37.3.2",
|
|
158
158
|
"yargs": "16.2.0"
|
|
159
159
|
},
|
|
160
|
+
"overrides": {
|
|
161
|
+
"react-native-worklets": "0.7.4",
|
|
162
|
+
"lodash": "4.18.1",
|
|
163
|
+
"debug": "4.4.3"
|
|
164
|
+
},
|
|
160
165
|
"jest": {
|
|
161
166
|
"preset": "jest-expo",
|
|
162
167
|
"testRegex": "(test/.*|(\\.|/)(test|spec))\\.[t]sx?$",
|
package/runtime/App.js
CHANGED
|
@@ -8,9 +8,7 @@ import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
|
8
8
|
import ProtoTypes from 'prop-types';
|
|
9
9
|
import { SafeAreaProvider, SafeAreaInsetsContext, SafeAreaView } from 'react-native-safe-area-context';
|
|
10
10
|
import { DefaultTheme, Provider as PaperProvider } from 'react-native-paper';
|
|
11
|
-
import { Linking } from 'react-native';
|
|
12
11
|
import { NativeModulesProxy } from 'expo-modules-core';
|
|
13
|
-
import * as WebBrowser from 'expo-web-browser';
|
|
14
12
|
import { get, last } from 'lodash';
|
|
15
13
|
import { RENDER_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';
|
|
16
14
|
import EventNotifier from '@wavemaker/app-rn-runtime/core/event-notifier';
|
|
@@ -21,7 +19,7 @@ import ConstantService from '@wavemaker/app-rn-runtime/core/constant.service';
|
|
|
21
19
|
import NetworkService from '@wavemaker/app-rn-runtime/core/network.service';
|
|
22
20
|
import injector from '@wavemaker/app-rn-runtime/core/injector';
|
|
23
21
|
import formatters from '@wavemaker/app-rn-runtime/core/formatters';
|
|
24
|
-
import { deepCopy
|
|
22
|
+
import { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';
|
|
25
23
|
import * as Utils from '@wavemaker/app-rn-runtime/core/utils';
|
|
26
24
|
import { ModalProvider } from '@wavemaker/app-rn-runtime/core/modal.service';
|
|
27
25
|
import { FixedViewContainer } from '@wavemaker/app-rn-runtime/core/fixed-view.component';
|
|
@@ -46,7 +44,8 @@ import { CameraProvider } from '../core/device/camera-service';
|
|
|
46
44
|
import CameraService from './services/device/camera-service';
|
|
47
45
|
import { ScanProvider } from '../core/device/scan-service';
|
|
48
46
|
import ScanService from './services/device/scan-service';
|
|
49
|
-
import
|
|
47
|
+
import BrowserService from './services/browser.service';
|
|
48
|
+
import AppSecurityService, { shouldRedirectToLoginOn401 } from './services/app-security.service';
|
|
50
49
|
import { getValidJSON, parseErrors } from '@wavemaker/app-rn-runtime/variables/utils/variable.utils';
|
|
51
50
|
import MaterialCommunityIconsFont from '@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf';
|
|
52
51
|
import * as SplashScreen from 'expo-splash-screen';
|
|
@@ -58,6 +57,8 @@ import moment from 'moment';
|
|
|
58
57
|
import ErrorBoundary from '../core/error-boundary.component';
|
|
59
58
|
import { ScreenCaptureProtectionProvider } from '../core/screen-capture-protection.service';
|
|
60
59
|
import { allowScreenCaptureAsync, preventScreenCaptureAsync } from 'expo-screen-capture';
|
|
60
|
+
import { setupGlobalJsErrorHandler } from '../core/global-error-handler.service';
|
|
61
|
+
import Fallback from '../core/components/error-fallback/error-fallback.component';
|
|
61
62
|
//some old react libraries need this
|
|
62
63
|
View['propTypes'] = {
|
|
63
64
|
style: ProtoTypes.any
|
|
@@ -128,6 +129,8 @@ export default class BaseApp extends React.Component {
|
|
|
128
129
|
}));
|
|
129
130
|
_defineProperty(this, "networkStatus", {});
|
|
130
131
|
_defineProperty(this, "statusbarInsets", void 0);
|
|
132
|
+
_defineProperty(this, "globalError", null);
|
|
133
|
+
_defineProperty(this, "globalJsErrorHandlerCleanup", null);
|
|
131
134
|
_defineProperty(this, "enableProtection", async () => {
|
|
132
135
|
try {
|
|
133
136
|
if (Platform.OS !== 'web') {
|
|
@@ -150,6 +153,9 @@ export default class BaseApp extends React.Component {
|
|
|
150
153
|
setTimeout(() => SplashScreen.hideAsync(), 10000);
|
|
151
154
|
this.appConfig.app = this;
|
|
152
155
|
this.appConfig.drawer = new DrawerImpl(() => this.refresh());
|
|
156
|
+
|
|
157
|
+
// Register app instance in injector for Error Boundary access
|
|
158
|
+
injector.set('APP_INSTANCE', this);
|
|
153
159
|
AppSpinnerService.setDefaultOptions({
|
|
154
160
|
spinner: this.appConfig.spinner
|
|
155
161
|
});
|
|
@@ -245,10 +251,62 @@ export default class BaseApp extends React.Component {
|
|
|
245
251
|
try {
|
|
246
252
|
this.onPageReady(activePageName, activePageScope);
|
|
247
253
|
} catch (e) {
|
|
248
|
-
|
|
254
|
+
this.handleCallbackError(e, `Error in onPageReady callback`);
|
|
249
255
|
}
|
|
250
256
|
}
|
|
251
257
|
onPageReady(activePageName, activePageScope) {}
|
|
258
|
+
triggerOnError(error, errorInfo, errorType) {
|
|
259
|
+
try {
|
|
260
|
+
this.onError(error, errorInfo, errorType);
|
|
261
|
+
} catch (e) {
|
|
262
|
+
console.error('Error in onError callback:', e);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
onError(error, errorInfo, errorType) {
|
|
266
|
+
// Empty implementation - user can override in app.js
|
|
267
|
+
// errorType: 'render' for React component errors, 'javascript' for other JS errors
|
|
268
|
+
}
|
|
269
|
+
handleCallbackError(error, context) {
|
|
270
|
+
var _this$appConfig;
|
|
271
|
+
console.error(error);
|
|
272
|
+
const errorObj = error instanceof Error ? error : new Error(String(error));
|
|
273
|
+
|
|
274
|
+
// Check if error handling is enabled
|
|
275
|
+
const prefs = (_this$appConfig = this.appConfig) === null || _this$appConfig === void 0 ? void 0 : _this$appConfig.preferences;
|
|
276
|
+
const globalEnabled = (prefs === null || prefs === void 0 ? void 0 : prefs.enableGlobalErrorHandler) === true;
|
|
277
|
+
const showDefaultFallback = (prefs === null || prefs === void 0 ? void 0 : prefs.showDefaultErrorFallback) !== false;
|
|
278
|
+
if (!globalEnabled) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// Immediately hide all overlays to ensure error fallback is visible
|
|
283
|
+
try {
|
|
284
|
+
// Hide Expo SplashScreen
|
|
285
|
+
SplashScreen.hideAsync();
|
|
286
|
+
|
|
287
|
+
// Hide App Spinner (force hide regardless of count)
|
|
288
|
+
AppSpinnerService.hide();
|
|
289
|
+
} catch (hideError) {
|
|
290
|
+
console.warn('Error hiding overlays:', hideError);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Trigger user callback
|
|
294
|
+
this.triggerOnError(errorObj, context, 'javascript');
|
|
295
|
+
|
|
296
|
+
// Only set global error state if fallback should be shown
|
|
297
|
+
if (showDefaultFallback) {
|
|
298
|
+
this.globalError = {
|
|
299
|
+
error: errorObj,
|
|
300
|
+
errorInfo: context,
|
|
301
|
+
errorType: 'javascript',
|
|
302
|
+
isFatal: false
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
// Set isStarted to true so app template will render the error screen
|
|
306
|
+
this.isStarted = true;
|
|
307
|
+
this.forceUpdate(); // Show fallback screen
|
|
308
|
+
}
|
|
309
|
+
}
|
|
252
310
|
setTimezone(timezone) {
|
|
253
311
|
AppI18nService.setTimezone(timezone);
|
|
254
312
|
}
|
|
@@ -256,16 +314,7 @@ export default class BaseApp extends React.Component {
|
|
|
256
314
|
return AppSpinnerService;
|
|
257
315
|
}
|
|
258
316
|
openBrowser(url, params = {}) {
|
|
259
|
-
|
|
260
|
-
if (isWebPreviewMode()) {
|
|
261
|
-
window.open(url, '_blank');
|
|
262
|
-
} else if (url.startsWith('http') && params.target === '_blank') {
|
|
263
|
-
WebBrowser.openBrowserAsync(url);
|
|
264
|
-
} else {
|
|
265
|
-
return Linking.openURL(url);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
return Promise.resolve();
|
|
317
|
+
return BrowserService.open(url, params);
|
|
269
318
|
}
|
|
270
319
|
|
|
271
320
|
// To support old api
|
|
@@ -286,13 +335,22 @@ export default class BaseApp extends React.Component {
|
|
|
286
335
|
config.headers['X-Requested-With'] = 'XMLHttpRequest';
|
|
287
336
|
console.log('onBeforeService call invoked on ' + config.url);
|
|
288
337
|
this.notify('beforeServiceCall', config);
|
|
289
|
-
|
|
338
|
+
try {
|
|
339
|
+
return this.onBeforeServiceCall(config);
|
|
340
|
+
} catch (e) {
|
|
341
|
+
this.handleCallbackError(e, `Error in onBeforeServiceCall callback`);
|
|
342
|
+
return config; // Return original config as fallback
|
|
343
|
+
}
|
|
290
344
|
}), axios.interceptors.response.use(response => {
|
|
291
|
-
|
|
345
|
+
try {
|
|
346
|
+
this.onServiceSuccess(response.data, response);
|
|
347
|
+
} catch (e) {
|
|
348
|
+
this.handleCallbackError(e, `Error in onServiceSuccess callback`);
|
|
349
|
+
}
|
|
292
350
|
this.notify('afterServiceCall', response.config, response);
|
|
293
351
|
return response;
|
|
294
352
|
}, error => {
|
|
295
|
-
var _errorDetails, _errorDetails2, _error$response, _error$response2, _error$response3,
|
|
353
|
+
var _errorDetails, _errorDetails2, _error$response, _error$response2, _error$response3, _this$appConfig$curre5;
|
|
296
354
|
let errorDetails = error.response,
|
|
297
355
|
errMsg;
|
|
298
356
|
errorDetails = getValidJSON((_errorDetails = errorDetails) === null || _errorDetails === void 0 ? void 0 : _errorDetails.data) || ((_errorDetails2 = errorDetails) === null || _errorDetails2 === void 0 ? void 0 : _errorDetails2.data);
|
|
@@ -302,11 +360,43 @@ export default class BaseApp extends React.Component {
|
|
|
302
360
|
errMsg = error.message || "Service Call Failed";
|
|
303
361
|
}
|
|
304
362
|
error.message = errMsg;
|
|
363
|
+
|
|
364
|
+
// Mark as service error for priority handling
|
|
365
|
+
// Set flags on both error and config to handle wrapping scenarios
|
|
366
|
+
error.__wmServiceError = true;
|
|
367
|
+
error.__wmServiceErrorHandled = false;
|
|
368
|
+
if (error.config) {
|
|
369
|
+
error.config.__wmServiceError = true;
|
|
370
|
+
error.config.__wmServiceErrorHandled = false;
|
|
371
|
+
}
|
|
305
372
|
console.error(`Error ${errMsg} recieved from ${(_error$response = error.response) === null || _error$response === void 0 || (_error$response = _error$response.config) === null || _error$response === void 0 ? void 0 : _error$response.url}`);
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
373
|
+
try {
|
|
374
|
+
var _this$appConfig2;
|
|
375
|
+
this.onServiceError(error.message, error);
|
|
376
|
+
// Mark as handled to prevent onError from being called
|
|
377
|
+
error.__wmServiceErrorHandled = true;
|
|
378
|
+
if (error.config) {
|
|
379
|
+
error.config.__wmServiceErrorHandled = true;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// Show fallback for service errors if enabled (but don't call onError)
|
|
383
|
+
const prefs = (_this$appConfig2 = this.appConfig) === null || _this$appConfig2 === void 0 ? void 0 : _this$appConfig2.preferences;
|
|
384
|
+
const globalEnabled = (prefs === null || prefs === void 0 ? void 0 : prefs.enableGlobalErrorHandler) === true;
|
|
385
|
+
const showDefaultFallback = (prefs === null || prefs === void 0 ? void 0 : prefs.showDefaultErrorFallback) !== false;
|
|
386
|
+
if (globalEnabled && showDefaultFallback) {
|
|
387
|
+
this.globalError = {
|
|
388
|
+
error: error,
|
|
389
|
+
errorInfo: (error === null || error === void 0 ? void 0 : error.stack) || (error === null || error === void 0 ? void 0 : error.toString()),
|
|
390
|
+
errorType: 'javascript',
|
|
391
|
+
isFatal: false
|
|
392
|
+
};
|
|
393
|
+
this.forceUpdate(); // Trigger re-render to show error fallback
|
|
394
|
+
}
|
|
395
|
+
} catch (e) {
|
|
396
|
+
this.handleCallbackError(e, `Error in onServiceError callback`);
|
|
397
|
+
}
|
|
398
|
+
if (shouldRedirectToLoginOn401((_error$response2 = error.response) === null || _error$response2 === void 0 || (_error$response2 = _error$response2.config) === null || _error$response2 === void 0 ? void 0 : _error$response2.url, (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : _error$response3.status, this.appConfig.url, (_this$appConfig$curre5 = this.appConfig.currentPage) === null || _this$appConfig$curre5 === void 0 ? void 0 : _this$appConfig$curre5.pageName)) {
|
|
399
|
+
AppSecurityService.redirectToLogin();
|
|
310
400
|
}
|
|
311
401
|
this.notify('afterServiceCall', error.config, error);
|
|
312
402
|
return Promise.reject(error);
|
|
@@ -327,6 +417,34 @@ export default class BaseApp extends React.Component {
|
|
|
327
417
|
return Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke())).catch(() => {});
|
|
328
418
|
}
|
|
329
419
|
componentDidMount() {
|
|
420
|
+
var _this$appConfig3;
|
|
421
|
+
// Setup global JS error handler with granular control
|
|
422
|
+
const prefs = (_this$appConfig3 = this.appConfig) === null || _this$appConfig3 === void 0 ? void 0 : _this$appConfig3.preferences;
|
|
423
|
+
const globalEnabled = (prefs === null || prefs === void 0 ? void 0 : prefs.enableGlobalErrorHandler) === true;
|
|
424
|
+
const enableSyncErrors = (prefs === null || prefs === void 0 ? void 0 : prefs.enableJsSyncErrors) !== false;
|
|
425
|
+
const enableAsyncErrors = (prefs === null || prefs === void 0 ? void 0 : prefs.enableJsAsyncErrors) !== false;
|
|
426
|
+
const showFallback = (prefs === null || prefs === void 0 ? void 0 : prefs.showDefaultErrorFallback) !== false;
|
|
427
|
+
|
|
428
|
+
// Only setup if master switch is on and at least one error type is enabled
|
|
429
|
+
if (globalEnabled && (enableSyncErrors || enableAsyncErrors)) {
|
|
430
|
+
this.globalJsErrorHandlerCleanup = setupGlobalJsErrorHandler((error, isFatal, errorInfo) => {
|
|
431
|
+
// Trigger user error callback
|
|
432
|
+
this.triggerOnError(error, errorInfo, 'javascript');
|
|
433
|
+
|
|
434
|
+
// Only set global error state if fallback should be shown
|
|
435
|
+
if (showFallback) {
|
|
436
|
+
this.globalError = {
|
|
437
|
+
error,
|
|
438
|
+
errorInfo,
|
|
439
|
+
errorType: 'javascript',
|
|
440
|
+
isFatal
|
|
441
|
+
};
|
|
442
|
+
this.forceUpdate(); // Trigger re-render to show error fallback
|
|
443
|
+
}
|
|
444
|
+
}, true,
|
|
445
|
+
// suppressDefaultErrorScreen = true when global error handler is enabled
|
|
446
|
+
enableSyncErrors, enableAsyncErrors);
|
|
447
|
+
}
|
|
330
448
|
AppSpinnerService.show({
|
|
331
449
|
spinner: this.appConfig.spinner
|
|
332
450
|
});
|
|
@@ -342,7 +460,12 @@ export default class BaseApp extends React.Component {
|
|
|
342
460
|
}));
|
|
343
461
|
this.startUpActions.map(a => this.Actions[a] && this.Actions[a].invoke());
|
|
344
462
|
return this.triggerStartUpVariables().then(() => {
|
|
345
|
-
|
|
463
|
+
try {
|
|
464
|
+
this.onAppVariablesReady();
|
|
465
|
+
} catch (e) {
|
|
466
|
+
this.handleCallbackError(e, `Error in onAppVariablesReady callback`);
|
|
467
|
+
return; // Early return to prevent subsequent code from executing
|
|
468
|
+
}
|
|
346
469
|
this.isStarted = true;
|
|
347
470
|
this.forceUpdate();
|
|
348
471
|
}, () => {});
|
|
@@ -352,6 +475,11 @@ export default class BaseApp extends React.Component {
|
|
|
352
475
|
axios.interceptors.request.eject(id);
|
|
353
476
|
});
|
|
354
477
|
this.cleanup.forEach(fn => fn());
|
|
478
|
+
|
|
479
|
+
// Cleanup global JS error handler
|
|
480
|
+
if (this.globalJsErrorHandlerCleanup) {
|
|
481
|
+
this.globalJsErrorHandlerCleanup();
|
|
482
|
+
}
|
|
355
483
|
}
|
|
356
484
|
refresh() {
|
|
357
485
|
this.appConfig.refresh();
|
|
@@ -376,8 +504,8 @@ export default class BaseApp extends React.Component {
|
|
|
376
504
|
}, content))))))));
|
|
377
505
|
}
|
|
378
506
|
renderToasters() {
|
|
379
|
-
var _this$
|
|
380
|
-
const isEdgeToEdgeApp = !!((_this$
|
|
507
|
+
var _this$appConfig4;
|
|
508
|
+
const isEdgeToEdgeApp = !!((_this$appConfig4 = this.appConfig) !== null && _this$appConfig4 !== void 0 && (_this$appConfig4 = _this$appConfig4.edgeToEdgeConfig) !== null && _this$appConfig4 !== void 0 && _this$appConfig4.isEdgeToEdgeApp);
|
|
381
509
|
this.toastsOpened = AppToastService.toastsOpened.length;
|
|
382
510
|
return /*#__PURE__*/React.createElement(WmMemo, {
|
|
383
511
|
watcher: this.watcher,
|
|
@@ -570,13 +698,13 @@ export default class BaseApp extends React.Component {
|
|
|
570
698
|
return false;
|
|
571
699
|
}
|
|
572
700
|
renderApp(commonPartial) {
|
|
573
|
-
var _this$
|
|
701
|
+
var _this$appConfig5, _this$appConfig6;
|
|
574
702
|
this.autoUpdateVariables.forEach(value => {
|
|
575
703
|
var _this$Variables$value;
|
|
576
704
|
return (_this$Variables$value = this.Variables[value]) === null || _this$Variables$value === void 0 ? void 0 : _this$Variables$value.invokeOnParamChange();
|
|
577
705
|
});
|
|
578
|
-
const edgeToEdgeConfig = (_this$
|
|
579
|
-
const statusbarConfig = (_this$
|
|
706
|
+
const edgeToEdgeConfig = (_this$appConfig5 = this.appConfig) === null || _this$appConfig5 === void 0 ? void 0 : _this$appConfig5.edgeToEdgeConfig;
|
|
707
|
+
const statusbarConfig = (_this$appConfig6 = this.appConfig) === null || _this$appConfig6 === void 0 || (_this$appConfig6 = _this$appConfig6.edgeToEdgeConfig) === null || _this$appConfig6 === void 0 ? void 0 : _this$appConfig6.statusbarConfig;
|
|
580
708
|
const isEdgeToEdgeApp = !!(edgeToEdgeConfig !== null && edgeToEdgeConfig !== void 0 && edgeToEdgeConfig.isEdgeToEdgeApp);
|
|
581
709
|
const Wrapper = isEdgeToEdgeApp ? View : SafeAreaView;
|
|
582
710
|
return /*#__PURE__*/React.createElement(SafeAreaProvider, null, /*#__PURE__*/React.createElement(SafeAreaInsetsContext.Consumer, null, (insets = {
|
|
@@ -599,7 +727,8 @@ export default class BaseApp extends React.Component {
|
|
|
599
727
|
}), /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
600
728
|
value: this.appConfig.theme
|
|
601
729
|
}, /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
602
|
-
currentPage: this.appConfig.currentPage
|
|
730
|
+
currentPage: this.appConfig.currentPage,
|
|
731
|
+
app: this
|
|
603
732
|
}, this.renderIosStatusbarInsetsView(isEdgeToEdgeApp, insets), /*#__PURE__*/React.createElement(View, {
|
|
604
733
|
style: {
|
|
605
734
|
flex: 1
|
|
@@ -617,7 +746,29 @@ export default class BaseApp extends React.Component {
|
|
|
617
746
|
drawerAnimation: (_this$appConfig$drawe2 = this.appConfig.drawer) === null || _this$appConfig$drawe2 === void 0 ? void 0 : _this$appConfig$drawe2.getAnimation()
|
|
618
747
|
}), /*#__PURE__*/React.createElement(FixedViewContainer, null, commonPartial))), this.appConfig.url ? /*#__PURE__*/React.createElement(WmNetworkInfoToaster, {
|
|
619
748
|
appLocale: this.appConfig.appLocale
|
|
620
|
-
}) : null, this.renderToasters(), this.renderDialogs(), this.renderDisplayManager()
|
|
749
|
+
}) : null, this.renderToasters(), this.renderDialogs(), this.renderDisplayManager(), this.globalError && /*#__PURE__*/React.createElement(View, {
|
|
750
|
+
style: {
|
|
751
|
+
position: 'absolute',
|
|
752
|
+
height: "100%",
|
|
753
|
+
width: "100%",
|
|
754
|
+
top: 0,
|
|
755
|
+
left: 0,
|
|
756
|
+
right: 0,
|
|
757
|
+
bottom: 0,
|
|
758
|
+
zIndex: 999999,
|
|
759
|
+
elevation: 999999
|
|
760
|
+
}
|
|
761
|
+
}, /*#__PURE__*/React.createElement(Fallback, {
|
|
762
|
+
error: this.globalError.error,
|
|
763
|
+
info: {
|
|
764
|
+
errorInfo: this.globalError.errorInfo
|
|
765
|
+
},
|
|
766
|
+
errorType: this.globalError.errorType,
|
|
767
|
+
resetErrorBoundary: () => {
|
|
768
|
+
this.globalError = null;
|
|
769
|
+
this.forceUpdate();
|
|
770
|
+
}
|
|
771
|
+
}))), isEdgeToEdgeApp && (statusbarConfig === null || statusbarConfig === void 0 ? void 0 : statusbarConfig.type) === 'blur' ? this.renderBlurView("top", insets, statusbarConfig) : null, isEdgeToEdgeApp && (statusbarConfig === null || statusbarConfig === void 0 ? void 0 : statusbarConfig.type) === 'transparent' ? this.renderTransparentView("top", insets, statusbarConfig) : null))))));
|
|
621
772
|
}));
|
|
622
773
|
}
|
|
623
774
|
}
|