@wavemaker/app-rn-runtime 11.14.1-32.647748 → 11.14.1-33.647787

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 (184) hide show
  1. package/components/advanced/carousel/carousel.component.js +1 -1
  2. package/components/advanced/carousel/carousel.component.js.map +1 -1
  3. package/components/advanced/webview/webview.component.js +1 -1
  4. package/components/advanced/webview/webview.component.js.map +1 -1
  5. package/components/basic/bottomsheet/bottomsheet.component.js +240 -33
  6. package/components/basic/bottomsheet/bottomsheet.component.js.map +1 -1
  7. package/components/basic/bottomsheet/bottomsheet.styles.js +0 -3
  8. package/components/basic/bottomsheet/bottomsheet.styles.js.map +1 -1
  9. package/components/basic/label/label.component.js +13 -24
  10. package/components/basic/label/label.component.js.map +1 -1
  11. package/components/basic/label/label.props.js +1 -0
  12. package/components/basic/label/label.props.js.map +1 -1
  13. package/components/basic/progress-circle/progress-circle.component.js +3 -3
  14. package/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  15. package/components/chart/area-chart/area-chart.component.js +27 -10
  16. package/components/chart/area-chart/area-chart.component.js.map +1 -1
  17. package/components/chart/bar-chart/bar-chart.component.js +39 -7
  18. package/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  19. package/components/chart/bar-chart/bar-chart.props.js +1 -0
  20. package/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  21. package/components/chart/basechart.component.js +8 -15
  22. package/components/chart/basechart.component.js.map +1 -1
  23. package/components/chart/basechart.props.js +1 -0
  24. package/components/chart/basechart.props.js.map +1 -1
  25. package/components/chart/bubble-chart/bubble-chart.component.js +23 -6
  26. package/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  27. package/components/chart/line-chart/line-chart.component.js +22 -5
  28. package/components/chart/line-chart/line-chart.component.js.map +1 -1
  29. package/components/chart/pie-chart/pie-chart.component.js +15 -4
  30. package/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  31. package/components/chart/stack-chart/stack-chart.component.js +1 -1
  32. package/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  33. package/components/container/accordion/accordionpane/accordionpane.component.js +6 -4
  34. package/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  35. package/components/container/container.component.js +207 -14
  36. package/components/container/container.component.js.map +1 -1
  37. package/components/container/container.props.js +6 -0
  38. package/components/container/container.props.js.map +1 -1
  39. package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +32 -4
  40. package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
  41. package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js +1 -0
  42. package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
  43. package/components/container/panel/panel.component.js +1 -1
  44. package/components/container/panel/panel.component.js.map +1 -1
  45. package/components/container/tabs/tabpane/tabpane.component.js +1 -1
  46. package/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  47. package/components/container/tabs/tabs.component.js +62 -29
  48. package/components/container/tabs/tabs.component.js.map +1 -1
  49. package/components/container/tabs/tabs.props.js +1 -0
  50. package/components/container/tabs/tabs.props.js.map +1 -1
  51. package/components/container/wizard/wizard.component.js +3 -5
  52. package/components/container/wizard/wizard.component.js.map +1 -1
  53. package/components/container/wizard/wizard.props.js +0 -1
  54. package/components/container/wizard/wizard.props.js.map +1 -1
  55. package/components/container/wizard/wizard.styles.js +3 -1
  56. package/components/container/wizard/wizard.styles.js.map +1 -1
  57. package/components/container/wizard/wizardstep/wizardstep.component.js +4 -23
  58. package/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  59. package/components/container/wizard/wizardstep/wizardstep.props.js +0 -2
  60. package/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
  61. package/components/data/form/form-field/form-field.component.js +26 -1
  62. package/components/data/form/form-field/form-field.component.js.map +1 -1
  63. package/components/data/form/form-field/form-field.props.js +3 -0
  64. package/components/data/form/form-field/form-field.props.js.map +1 -1
  65. package/components/data/form/form.component.js +11 -3
  66. package/components/data/form/form.component.js.map +1 -1
  67. package/components/data/form/form.props.js +1 -0
  68. package/components/data/form/form.props.js.map +1 -1
  69. package/components/data/list/list.component.js +6 -3
  70. package/components/data/list/list.component.js.map +1 -1
  71. package/components/dialogs/dialog/dialog.component.js +1 -1
  72. package/components/dialogs/dialog/dialog.component.js.map +1 -1
  73. package/components/dialogs/dialogcontent/dialogcontent.component.js +1 -2
  74. package/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  75. package/components/input/baseinput/baseinput.component.js +30 -3
  76. package/components/input/baseinput/baseinput.component.js.map +1 -1
  77. package/components/input/baseinput/baseinput.props.js +1 -0
  78. package/components/input/baseinput/baseinput.props.js.map +1 -1
  79. package/components/input/basenumber/basenumber.component.js +18 -3
  80. package/components/input/basenumber/basenumber.component.js.map +1 -1
  81. package/components/input/basenumber/basenumber.props.js +2 -0
  82. package/components/input/basenumber/basenumber.props.js.map +1 -1
  83. package/components/input/calendar/calendar.component.js +5 -1
  84. package/components/input/calendar/calendar.component.js.map +1 -1
  85. package/components/input/calendar/views/month-view.js +8 -1
  86. package/components/input/calendar/views/month-view.js.map +1 -1
  87. package/components/input/checkboxset/checkboxset.component.js +2 -2
  88. package/components/input/checkboxset/checkboxset.component.js.map +1 -1
  89. package/components/input/currency/currency.component.js +2 -0
  90. package/components/input/currency/currency.component.js.map +1 -1
  91. package/components/input/currency/currency.styles.js +10 -1
  92. package/components/input/currency/currency.styles.js.map +1 -1
  93. package/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +6 -1
  94. package/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
  95. package/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +6 -1
  96. package/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
  97. package/components/input/number/number.component.js +2 -0
  98. package/components/input/number/number.component.js.map +1 -1
  99. package/components/input/number/number.styles.js +4 -0
  100. package/components/input/number/number.styles.js.map +1 -1
  101. package/components/input/radioset/radioset.component.js +4 -6
  102. package/components/input/radioset/radioset.component.js.map +1 -1
  103. package/components/input/text/text.component.js +13 -2
  104. package/components/input/text/text.component.js.map +1 -1
  105. package/components/input/text/text.props.js +1 -1
  106. package/components/input/text/text.props.js.map +1 -1
  107. package/components/input/text/text.styles.js +17 -0
  108. package/components/input/text/text.styles.js.map +1 -1
  109. package/components/input/textarea/textarea.component.js +3 -2
  110. package/components/input/textarea/textarea.component.js.map +1 -1
  111. package/components/input/textarea/textarea.styles.js +4 -0
  112. package/components/input/textarea/textarea.styles.js.map +1 -1
  113. package/components/page/left-panel/left-panel.component.js +1 -1
  114. package/components/page/left-panel/left-panel.component.js.map +1 -1
  115. package/components/page/page-content/page-content.component.js +157 -17
  116. package/components/page/page-content/page-content.component.js.map +1 -1
  117. package/components/page/page-content/page-content.props.js +4 -0
  118. package/components/page/page-content/page-content.props.js.map +1 -1
  119. package/components/page/page-content/pull-to-refresh.component.js +288 -0
  120. package/components/page/page-content/pull-to-refresh.component.js.map +1 -0
  121. package/core/AppConfig.js.map +1 -1
  122. package/core/base.component.js +37 -5
  123. package/core/base.component.js.map +1 -1
  124. package/core/components/error-fallback/error-fallback.component.js +18 -50
  125. package/core/components/error-fallback/error-fallback.component.js.map +1 -1
  126. package/core/components/error-fallback/error-fallback.styles.js +1 -4
  127. package/core/components/error-fallback/error-fallback.styles.js.map +1 -1
  128. package/core/components/textinput.component.js +27 -8
  129. package/core/components/textinput.component.js.map +1 -1
  130. package/core/environment.js +25 -0
  131. package/core/environment.js.map +1 -0
  132. package/core/error-boundary.component.js +2 -46
  133. package/core/error-boundary.component.js.map +1 -1
  134. package/core/fixed-view.component.js +19 -2
  135. package/core/fixed-view.component.js.map +1 -1
  136. package/core/sticky-wrapper.js +37 -34
  137. package/core/sticky-wrapper.js.map +1 -1
  138. package/core/tappable.component.js +110 -16
  139. package/core/tappable.component.js.map +1 -1
  140. package/core/viewport.js +13 -8
  141. package/core/viewport.js.map +1 -1
  142. package/gestures/carousel-swipe.animation.js +1 -1
  143. package/gestures/carousel-swipe.animation.js.map +1 -1
  144. package/npm-shrinkwrap.json +383 -219
  145. package/package-lock.json +383 -219
  146. package/package.json +5 -6
  147. package/runtime/App.js +31 -181
  148. package/runtime/App.js.map +1 -1
  149. package/runtime/App.navigator.js +1 -4
  150. package/runtime/App.navigator.js.map +1 -1
  151. package/runtime/base-fragment.component.js +29 -5
  152. package/runtime/base-fragment.component.js.map +1 -1
  153. package/runtime/base-page.component.js +4 -12
  154. package/runtime/base-page.component.js.map +1 -1
  155. package/runtime/navigator/drawer.navigator.js +2 -0
  156. package/runtime/navigator/drawer.navigator.js.map +1 -1
  157. package/runtime/navigator/stack.navigator.js +17 -2
  158. package/runtime/navigator/stack.navigator.js.map +1 -1
  159. package/runtime/services/app-security.service.js +19 -40
  160. package/runtime/services/app-security.service.js.map +1 -1
  161. package/runtime/services/device/scan-service.js +12 -34
  162. package/runtime/services/device/scan-service.js.map +1 -1
  163. package/runtime/services/webprocess.service.js +3 -8
  164. package/runtime/services/webprocess.service.js.map +1 -1
  165. package/styles/background.component.js +61 -2
  166. package/styles/background.component.js.map +1 -1
  167. package/styles/style-prop.validator.js +4 -0
  168. package/styles/style-prop.validator.js.map +1 -1
  169. package/styles/style-props.js +2 -0
  170. package/styles/style-props.js.map +1 -1
  171. package/styles/theme.js +27 -2
  172. package/styles/theme.js.map +1 -1
  173. package/styles/theme.variables.js +2 -0
  174. package/styles/theme.variables.js.map +1 -1
  175. package/core/advanced-promise-rejection-tracker.js +0 -207
  176. package/core/advanced-promise-rejection-tracker.js.map +0 -1
  177. package/core/global-error-handler.service.js +0 -177
  178. package/core/global-error-handler.service.js.map +0 -1
  179. package/runtime/services/browser.constants.js +0 -3
  180. package/runtime/services/browser.constants.js.map +0 -1
  181. package/runtime/services/browser.service.js +0 -321
  182. package/runtime/services/browser.service.js.map +0 -1
  183. package/runtime/services/external-auth-callback.service.js +0 -44
  184. package/runtime/services/external-auth-callback.service.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/app-rn-runtime",
3
- "version": "11.14.1-32.647748",
3
+ "version": "11.14.1-33.647787",
4
4
  "description": "''",
5
5
  "main": "index",
6
6
  "module": "index",
@@ -59,7 +59,8 @@
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-32.647748",
62
+ "@shopify/react-native-skia": "2.2.12",
63
+ "@wavemaker/variables": "11.14.1-33.647787",
63
64
  "axios": "1.8.3",
64
65
  "color": "4.2.3",
65
66
  "cross-env": "7.0.3",
@@ -72,7 +73,7 @@
72
73
  "expo-video": "3.0.11",
73
74
  "fast-xml-parser": "4.5.3",
74
75
  "imask": "7.6.1",
75
- "lodash-es": "4.18.1",
76
+ "lodash-es": "4.17.21",
76
77
  "lottie-react-native": "7.3.4",
77
78
  "moment": "2.30.1",
78
79
  "react-lottie-player": "2.1.0",
@@ -158,9 +159,7 @@
158
159
  "yargs": "16.2.0"
159
160
  },
160
161
  "overrides": {
161
- "react-native-worklets": "0.7.4",
162
- "lodash": "4.18.1",
163
- "debug": "4.4.3"
162
+ "react-native-worklets": "0.7.4"
164
163
  },
165
164
  "jest": {
166
165
  "preset": "jest-expo",
package/runtime/App.js CHANGED
@@ -8,7 +8,9 @@ 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';
11
12
  import { NativeModulesProxy } from 'expo-modules-core';
13
+ import * as WebBrowser from 'expo-web-browser';
12
14
  import { get, last } from 'lodash';
13
15
  import { RENDER_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';
14
16
  import EventNotifier from '@wavemaker/app-rn-runtime/core/event-notifier';
@@ -19,7 +21,7 @@ import ConstantService from '@wavemaker/app-rn-runtime/core/constant.service';
19
21
  import NetworkService from '@wavemaker/app-rn-runtime/core/network.service';
20
22
  import injector from '@wavemaker/app-rn-runtime/core/injector';
21
23
  import formatters from '@wavemaker/app-rn-runtime/core/formatters';
22
- import { deepCopy } from '@wavemaker/app-rn-runtime/core/utils';
24
+ import { deepCopy, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
23
25
  import * as Utils from '@wavemaker/app-rn-runtime/core/utils';
24
26
  import { ModalProvider } from '@wavemaker/app-rn-runtime/core/modal.service';
25
27
  import { FixedViewContainer } from '@wavemaker/app-rn-runtime/core/fixed-view.component';
@@ -44,8 +46,7 @@ import { CameraProvider } from '../core/device/camera-service';
44
46
  import CameraService from './services/device/camera-service';
45
47
  import { ScanProvider } from '../core/device/scan-service';
46
48
  import ScanService from './services/device/scan-service';
47
- import BrowserService from './services/browser.service';
48
- import AppSecurityService, { shouldRedirectToLoginOn401 } from './services/app-security.service';
49
+ import AppSecurityService from './services/app-security.service';
49
50
  import { getValidJSON, parseErrors } from '@wavemaker/app-rn-runtime/variables/utils/variable.utils';
50
51
  import MaterialCommunityIconsFont from '@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf';
51
52
  import * as SplashScreen from 'expo-splash-screen';
@@ -57,8 +58,6 @@ import moment from 'moment';
57
58
  import ErrorBoundary from '../core/error-boundary.component';
58
59
  import { ScreenCaptureProtectionProvider } from '../core/screen-capture-protection.service';
59
60
  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';
62
61
  //some old react libraries need this
63
62
  View['propTypes'] = {
64
63
  style: ProtoTypes.any
@@ -99,6 +98,7 @@ export default class BaseApp extends React.Component {
99
98
  super(props);
100
99
  _defineProperty(this, "Actions", {});
101
100
  _defineProperty(this, "Variables", {});
101
+ _defineProperty(this, "Global", {});
102
102
  _defineProperty(this, "onAppVariablesReady", () => {});
103
103
  _defineProperty(this, "isStarted", false);
104
104
  _defineProperty(this, "appConfig", injector.get('APP_CONFIG'));
@@ -129,8 +129,6 @@ export default class BaseApp extends React.Component {
129
129
  }));
130
130
  _defineProperty(this, "networkStatus", {});
131
131
  _defineProperty(this, "statusbarInsets", void 0);
132
- _defineProperty(this, "globalError", null);
133
- _defineProperty(this, "globalJsErrorHandlerCleanup", null);
134
132
  _defineProperty(this, "enableProtection", async () => {
135
133
  try {
136
134
  if (Platform.OS !== 'web') {
@@ -153,9 +151,6 @@ export default class BaseApp extends React.Component {
153
151
  setTimeout(() => SplashScreen.hideAsync(), 10000);
154
152
  this.appConfig.app = this;
155
153
  this.appConfig.drawer = new DrawerImpl(() => this.refresh());
156
-
157
- // Register app instance in injector for Error Boundary access
158
- injector.set('APP_INSTANCE', this);
159
154
  AppSpinnerService.setDefaultOptions({
160
155
  spinner: this.appConfig.spinner
161
156
  });
@@ -251,62 +246,10 @@ export default class BaseApp extends React.Component {
251
246
  try {
252
247
  this.onPageReady(activePageName, activePageScope);
253
248
  } catch (e) {
254
- this.handleCallbackError(e, `Error in onPageReady callback`);
249
+ console.error(e);
255
250
  }
256
251
  }
257
252
  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
- }
310
253
  setTimezone(timezone) {
311
254
  AppI18nService.setTimezone(timezone);
312
255
  }
@@ -314,7 +257,16 @@ export default class BaseApp extends React.Component {
314
257
  return AppSpinnerService;
315
258
  }
316
259
  openBrowser(url, params = {}) {
317
- return BrowserService.open(url, params);
260
+ if (url) {
261
+ if (isWebPreviewMode()) {
262
+ window.open(url, '_blank');
263
+ } else if (url.startsWith('http') && params.target === '_blank') {
264
+ WebBrowser.openBrowserAsync(url);
265
+ } else {
266
+ return Linking.openURL(url);
267
+ }
268
+ }
269
+ return Promise.resolve();
318
270
  }
319
271
 
320
272
  // To support old api
@@ -335,22 +287,13 @@ export default class BaseApp extends React.Component {
335
287
  config.headers['X-Requested-With'] = 'XMLHttpRequest';
336
288
  console.log('onBeforeService call invoked on ' + config.url);
337
289
  this.notify('beforeServiceCall', config);
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
+ return this.onBeforeServiceCall(config);
344
291
  }), axios.interceptors.response.use(response => {
345
- try {
346
- this.onServiceSuccess(response.data, response);
347
- } catch (e) {
348
- this.handleCallbackError(e, `Error in onServiceSuccess callback`);
349
- }
292
+ this.onServiceSuccess(response.data, response);
350
293
  this.notify('afterServiceCall', response.config, response);
351
294
  return response;
352
295
  }, error => {
353
- var _errorDetails, _errorDetails2, _error$response, _error$response2, _error$response3, _this$appConfig$curre5;
296
+ var _errorDetails, _errorDetails2, _error$response, _error$response2, _error$response3, _error$response4;
354
297
  let errorDetails = error.response,
355
298
  errMsg;
356
299
  errorDetails = getValidJSON((_errorDetails = errorDetails) === null || _errorDetails === void 0 ? void 0 : _errorDetails.data) || ((_errorDetails2 = errorDetails) === null || _errorDetails2 === void 0 ? void 0 : _errorDetails2.data);
@@ -360,43 +303,11 @@ export default class BaseApp extends React.Component {
360
303
  errMsg = error.message || "Service Call Failed";
361
304
  }
362
305
  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
- }
372
306
  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}`);
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();
307
+ this.onServiceError(error.message, error);
308
+ if ((_error$response2 = error.response) !== null && _error$response2 !== void 0 && (_error$response2 = _error$response2.config.url) !== null && _error$response2 !== void 0 && _error$response2.startsWith(this.appConfig.url) && !((_error$response3 = error.response) !== null && _error$response3 !== void 0 && (_error$response3 = _error$response3.config.url) !== null && _error$response3 !== void 0 && _error$response3.includes('/services/')) && ((_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : _error$response4.status) === 401) {
309
+ var _this$appConfig$curre5, _this$appConfig$curre6;
310
+ ((_this$appConfig$curre5 = this.appConfig.currentPage) === null || _this$appConfig$curre5 === void 0 ? void 0 : _this$appConfig$curre5.pageName) !== 'Login' && ((_this$appConfig$curre6 = this.appConfig.currentPage) === null || _this$appConfig$curre6 === void 0 ? void 0 : _this$appConfig$curre6.goToPage('Login'));
400
311
  }
401
312
  this.notify('afterServiceCall', error.config, error);
402
313
  return Promise.reject(error);
@@ -417,34 +328,6 @@ export default class BaseApp extends React.Component {
417
328
  return Promise.all(this.startUpVariables.map(s => this.Variables[s] && this.Variables[s].invoke())).catch(() => {});
418
329
  }
419
330
  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
- }
448
331
  AppSpinnerService.show({
449
332
  spinner: this.appConfig.spinner
450
333
  });
@@ -460,12 +343,7 @@ export default class BaseApp extends React.Component {
460
343
  }));
461
344
  this.startUpActions.map(a => this.Actions[a] && this.Actions[a].invoke());
462
345
  return this.triggerStartUpVariables().then(() => {
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
+ this.onAppVariablesReady();
469
347
  this.isStarted = true;
470
348
  this.forceUpdate();
471
349
  }, () => {});
@@ -475,11 +353,6 @@ export default class BaseApp extends React.Component {
475
353
  axios.interceptors.request.eject(id);
476
354
  });
477
355
  this.cleanup.forEach(fn => fn());
478
-
479
- // Cleanup global JS error handler
480
- if (this.globalJsErrorHandlerCleanup) {
481
- this.globalJsErrorHandlerCleanup();
482
- }
483
356
  }
484
357
  refresh() {
485
358
  this.appConfig.refresh();
@@ -504,8 +377,8 @@ export default class BaseApp extends React.Component {
504
377
  }, content))))))));
505
378
  }
506
379
  renderToasters() {
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);
380
+ var _this$appConfig;
381
+ const isEdgeToEdgeApp = !!((_this$appConfig = this.appConfig) !== null && _this$appConfig !== void 0 && (_this$appConfig = _this$appConfig.edgeToEdgeConfig) !== null && _this$appConfig !== void 0 && _this$appConfig.isEdgeToEdgeApp);
509
382
  this.toastsOpened = AppToastService.toastsOpened.length;
510
383
  return /*#__PURE__*/React.createElement(WmMemo, {
511
384
  watcher: this.watcher,
@@ -698,13 +571,13 @@ export default class BaseApp extends React.Component {
698
571
  return false;
699
572
  }
700
573
  renderApp(commonPartial) {
701
- var _this$appConfig5, _this$appConfig6;
574
+ var _this$appConfig2, _this$appConfig3;
702
575
  this.autoUpdateVariables.forEach(value => {
703
576
  var _this$Variables$value;
704
577
  return (_this$Variables$value = this.Variables[value]) === null || _this$Variables$value === void 0 ? void 0 : _this$Variables$value.invokeOnParamChange();
705
578
  });
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;
579
+ const edgeToEdgeConfig = (_this$appConfig2 = this.appConfig) === null || _this$appConfig2 === void 0 ? void 0 : _this$appConfig2.edgeToEdgeConfig;
580
+ const statusbarConfig = (_this$appConfig3 = this.appConfig) === null || _this$appConfig3 === void 0 || (_this$appConfig3 = _this$appConfig3.edgeToEdgeConfig) === null || _this$appConfig3 === void 0 ? void 0 : _this$appConfig3.statusbarConfig;
708
581
  const isEdgeToEdgeApp = !!(edgeToEdgeConfig !== null && edgeToEdgeConfig !== void 0 && edgeToEdgeConfig.isEdgeToEdgeApp);
709
582
  const Wrapper = isEdgeToEdgeApp ? View : SafeAreaView;
710
583
  return /*#__PURE__*/React.createElement(SafeAreaProvider, null, /*#__PURE__*/React.createElement(SafeAreaInsetsContext.Consumer, null, (insets = {
@@ -727,8 +600,7 @@ export default class BaseApp extends React.Component {
727
600
  }), /*#__PURE__*/React.createElement(ThemeProvider, {
728
601
  value: this.appConfig.theme
729
602
  }, /*#__PURE__*/React.createElement(ErrorBoundary, {
730
- currentPage: this.appConfig.currentPage,
731
- app: this
603
+ currentPage: this.appConfig.currentPage
732
604
  }, this.renderIosStatusbarInsetsView(isEdgeToEdgeApp, insets), /*#__PURE__*/React.createElement(View, {
733
605
  style: {
734
606
  flex: 1
@@ -746,29 +618,7 @@ export default class BaseApp extends React.Component {
746
618
  drawerAnimation: (_this$appConfig$drawe2 = this.appConfig.drawer) === null || _this$appConfig$drawe2 === void 0 ? void 0 : _this$appConfig$drawe2.getAnimation()
747
619
  }), /*#__PURE__*/React.createElement(FixedViewContainer, null, commonPartial))), this.appConfig.url ? /*#__PURE__*/React.createElement(WmNetworkInfoToaster, {
748
620
  appLocale: this.appConfig.appLocale
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
+ }) : null, this.renderToasters(), this.renderDialogs(), this.renderDisplayManager()), 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))))));
772
622
  }));
773
623
  }
774
624
  }