@carbonorm/carbonreact 4.0.17 → 4.0.19

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/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import react, { useRef, useState, useEffect, Component, createContext, lazy } from 'react';
2
- import { useNavigate, HashRouter, MemoryRouter, BrowserRouter, Routes } from 'react-router-dom';
2
+ import { useNavigate, HashRouter, MemoryRouter, BrowserRouter } from 'react-router-dom';
3
3
  import { toast, ToastContainer } from 'react-toastify';
4
4
  import OutsideClickHandler from 'react-outside-click-handler';
5
5
  import { toastOptions, timeout, axiosInstance, isVerbose, checkAllRequestsComplete } from '@carbonorm/carbonnode';
@@ -4450,7 +4450,7 @@ class CarbonReact extends Component {
4450
4450
  }
4451
4451
  }
4452
4452
  reactRouterContext(children) {
4453
- switch (this.props.routerType) {
4453
+ switch (this.props.routerType ?? eRouterType.BrowserRouter) {
4454
4454
  case eRouterType.BrowserRouter:
4455
4455
  return jsxRuntime_1(BrowserRouter, { children: children });
4456
4456
  case eRouterType.MemoryRouter:
@@ -4471,7 +4471,7 @@ class CarbonReact extends Component {
4471
4471
  }
4472
4472
  this.context = createContext(this.state);
4473
4473
  const Context = this.context.Provider;
4474
- return this.reactRouterContext(jsxRuntime_2(Routes, { children: [jsxRuntime_1(GlobalHistory, {}), this.props.websocket &&
4474
+ return this.reactRouterContext(jsxRuntime_2(jsxRuntime_3, { children: [jsxRuntime_1(GlobalHistory, {}), this.props.websocket &&
4475
4475
  jsxRuntime_1(CarbonWebSocket, { ...(false !== this.props.websocket ? this.props.websocket : {}), instance: this }), jsxRuntime_1(Context, { value: this.state, children: this.props.children }), jsxRuntime_1(ToastContainer, {})] }));
4476
4476
  }
4477
4477
  }