react-router-dom-v5-compat 6.30.3 → 6.30.4

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,13 @@
1
1
  # `react-router-dom-v5-compat`
2
2
 
3
+ ## v6.30.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies:
8
+ - [`react-router@6.30.4`](https://github.com/remix-run/react-router/releases/tag/react-router@6.30.4)
9
+ - [`@remix-run/router@1.23.3`](https://github.com/remix-run/react-router/releases/tag/@remix-run/router@1.23.3)
10
+
3
11
  ## 6.30.3
4
12
 
5
13
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router DOM v5 Compat v6.30.3
2
+ * React Router DOM v5 Compat v6.30.4
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -17,30 +17,22 @@ import { parsePath, Action, createPath as createPath$1 } from 'history';
17
17
  import { Route as Route$1, useHistory } from 'react-router-dom';
18
18
 
19
19
  function _extends() {
20
- _extends = Object.assign ? Object.assign.bind() : function (target) {
21
- for (var i = 1; i < arguments.length; i++) {
22
- var source = arguments[i];
23
- for (var key in source) {
24
- if (Object.prototype.hasOwnProperty.call(source, key)) {
25
- target[key] = source[key];
26
- }
27
- }
20
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
21
+ for (var e = 1; e < arguments.length; e++) {
22
+ var t = arguments[e];
23
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
28
24
  }
29
- return target;
30
- };
31
- return _extends.apply(this, arguments);
25
+ return n;
26
+ }, _extends.apply(null, arguments);
32
27
  }
33
- function _objectWithoutPropertiesLoose(source, excluded) {
34
- if (source == null) return {};
35
- var target = {};
36
- var sourceKeys = Object.keys(source);
37
- var key, i;
38
- for (i = 0; i < sourceKeys.length; i++) {
39
- key = sourceKeys[i];
40
- if (excluded.indexOf(key) >= 0) continue;
41
- target[key] = source[key];
28
+ function _objectWithoutPropertiesLoose(r, e) {
29
+ if (null == r) return {};
30
+ var t = {};
31
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
32
+ if (-1 !== e.indexOf(n)) continue;
33
+ t[n] = r[n];
42
34
  }
43
- return target;
35
+ return t;
44
36
  }
45
37
 
46
38
  const defaultMethod = "get";
@@ -66,7 +58,7 @@ function shouldProcessLinkClick(event, target) {
66
58
  !target || target === "_self") &&
67
59
  // Let browser handle "target=_blank" etc.
68
60
  !isModifiedEvent(event) // Ignore clicks with modifier keys
69
- ;
61
+ ;
70
62
  }
71
63
  /**
72
64
  * Creates a URLSearchParams object using the given initializer.
@@ -596,11 +588,11 @@ function RouterProvider(_ref) {
596
588
  navigationType: state.historyAction,
597
589
  navigator: navigator,
598
590
  future: routerFuture
599
- }, state.initialized || router.future.v7_partialHydration ? /*#__PURE__*/React.createElement(MemoizedDataRoutes, {
591
+ }, state.initialized || router.future.v7_partialHydration ? (/*#__PURE__*/React.createElement(MemoizedDataRoutes, {
600
592
  routes: router.routes,
601
593
  future: router.future,
602
594
  state: state
603
- }) : fallbackElement))))), null);
595
+ })) : fallbackElement))))), null);
604
596
  }
605
597
  // Memoize to avoid re-renders when updating `ViewTransitionContext`
606
598
  const MemoizedDataRoutes = /*#__PURE__*/React.memo(DataRoutes);
@@ -939,11 +931,11 @@ if (process.env.NODE_ENV !== "production") {
939
931
  * This component will emulate the browser's scroll restoration on location
940
932
  * changes.
941
933
  */
942
- function ScrollRestoration(_ref10) {
934
+ function ScrollRestoration(_ref0) {
943
935
  let {
944
936
  getKey,
945
937
  storageKey
946
- } = _ref10;
938
+ } = _ref0;
947
939
  useScrollRestoration({
948
940
  getKey,
949
941
  storageKey
@@ -1234,8 +1226,8 @@ function useFetcher(_temp3) {
1234
1226
  */
1235
1227
  function useFetchers() {
1236
1228
  let state = useDataRouterState(DataRouterStateHook.UseFetchers);
1237
- return Array.from(state.fetchers.entries()).map(_ref11 => {
1238
- let [key, fetcher] = _ref11;
1229
+ return Array.from(state.fetchers.entries()).map(_ref1 => {
1230
+ let [key, fetcher] = _ref1;
1239
1231
  return _extends({}, fetcher, {
1240
1232
  key
1241
1233
  });
@@ -1300,7 +1292,7 @@ function useScrollRestoration(_temp4) {
1300
1292
  // Enable scroll restoration in the router
1301
1293
  // eslint-disable-next-line react-hooks/rules-of-hooks
1302
1294
  React.useLayoutEffect(() => {
1303
- let getKeyWithoutBasename = getKey && basename !== "/" ? (location, matches) => getKey( // Strip the basename to match useLocation()
1295
+ let getKeyWithoutBasename = getKey && basename !== "/" ? (location, matches) => getKey(// Strip the basename to match useLocation()
1304
1296
  _extends({}, location, {
1305
1297
  pathname: stripBasename(location.pathname, basename) || location.pathname
1306
1298
  }), matches) : getKey;
@@ -1388,11 +1380,11 @@ function usePageHide(callback, options) {
1388
1380
  * very incorrectly in some cases) across browsers if user click addition
1389
1381
  * back/forward navigations while the confirm is open. Use at your own risk.
1390
1382
  */
1391
- function usePrompt(_ref12) {
1383
+ function usePrompt(_ref10) {
1392
1384
  let {
1393
1385
  when,
1394
1386
  message
1395
- } = _ref12;
1387
+ } = _ref10;
1396
1388
  let blocker = useBlocker(when);
1397
1389
  React.useEffect(() => {
1398
1390
  if (blocker.state === "blocked") {