Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/react-router-dom/dist/index.js
rd565449 r0c6b92a 1 1 /** 2 * React Router DOM v6.2 6.02 * React Router DOM v6.28.0 3 3 * 4 4 * Copyright (c) Remix Software Inc. … … 11 11 import * as React from 'react'; 12 12 import * as ReactDOM from 'react-dom'; 13 import { UNSAFE_mapRouteProperties, UNSAFE_ DataRouterContext, UNSAFE_DataRouterStateContext, Router, UNSAFE_useRoutesImpl, UNSAFE_NavigationContext, useHref, useResolvedPath, useLocation, useNavigate, createPath, UNSAFE_useRouteId, UNSAFE_RouteContext, useMatches, useNavigation, useBlocker } from 'react-router';13 import { UNSAFE_mapRouteProperties, UNSAFE_logV6DeprecationWarnings, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, Router, UNSAFE_useRoutesImpl, UNSAFE_NavigationContext, useHref, useResolvedPath, useLocation, useNavigate, createPath, UNSAFE_useRouteId, UNSAFE_RouteContext, useMatches, useNavigation, useBlocker } from 'react-router'; 14 14 export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_useRouteId, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromElements, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, replace, resolvePath, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes } from 'react-router'; 15 15 import { stripBasename, UNSAFE_warning, createRouter, createBrowserHistory, createHashHistory, UNSAFE_ErrorResponseImpl, UNSAFE_invariant, joinPaths, IDLE_FETCHER, matchPath } from '@remix-run/router'; … … 209 209 } 210 210 211 const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", " unstable_viewTransition"],212 _excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", " unstable_viewTransition", "children"],213 _excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", " unstable_viewTransition"];211 const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"], 212 _excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"], 213 _excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"]; 214 214 // HEY YOU! DON'T TOUCH THIS VARIABLE! 215 215 // … … 239 239 routes, 240 240 mapRouteProperties: UNSAFE_mapRouteProperties, 241 unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy,242 unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss,241 dataStrategy: opts == null ? void 0 : opts.dataStrategy, 242 patchRoutesOnNavigation: opts == null ? void 0 : opts.patchRoutesOnNavigation, 243 243 window: opts == null ? void 0 : opts.window 244 244 }).initialize(); … … 256 256 routes, 257 257 mapRouteProperties: UNSAFE_mapRouteProperties, 258 unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy,259 unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss,258 dataStrategy: opts == null ? void 0 : opts.dataStrategy, 259 patchRoutesOnNavigation: opts == null ? void 0 : opts.patchRoutesOnNavigation, 260 260 window: opts == null ? void 0 : opts.window 261 261 }).initialize(); … … 415 415 let { 416 416 deletedFetchers, 417 unstable_flushSync: flushSync,418 unstable_viewTransitionOpts: viewTransitionOpts417 flushSync: flushSync, 418 viewTransitionOpts: viewTransitionOpts 419 419 } = _ref2; 420 420 deletedFetchers.forEach(key => fetcherData.current.delete(key)); … … 575 575 v7_relativeSplatPath: router.future.v7_relativeSplatPath 576 576 }), [router.future.v7_relativeSplatPath]); 577 React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future, router.future), [future, router.future]); 577 578 // The fragment and {null} here are important! We need them to keep React 18's 578 579 // useId happy when we are server-rendering since we may have a <script> here … … 640 641 }, [setStateImpl, v7_startTransition]); 641 642 React.useLayoutEffect(() => history.listen(setState), [history, setState]); 643 React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future), [future]); 642 644 return /*#__PURE__*/React.createElement(Router, { 643 645 basename: basename, … … 679 681 }, [setStateImpl, v7_startTransition]); 680 682 React.useLayoutEffect(() => history.listen(setState), [history, setState]); 683 React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future), [future]); 681 684 return /*#__PURE__*/React.createElement(Router, { 682 685 basename: basename, … … 712 715 }, [setStateImpl, v7_startTransition]); 713 716 React.useLayoutEffect(() => history.listen(setState), [history, setState]); 717 React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future), [future]); 714 718 return /*#__PURE__*/React.createElement(Router, { 715 719 basename: basename, … … 739 743 to, 740 744 preventScrollReset, 741 unstable_viewTransition745 viewTransition 742 746 } = _ref7, 743 747 rest = _objectWithoutPropertiesLoose(_ref7, _excluded); … … 779 783 preventScrollReset, 780 784 relative, 781 unstable_viewTransition785 viewTransition 782 786 }); 783 787 function handleClick(event) { … … 812 816 style: styleProp, 813 817 to, 814 unstable_viewTransition,818 viewTransition, 815 819 children 816 820 } = _ref8, … … 828 832 // Conditional usage is OK here because the usage of a data router is static 829 833 // eslint-disable-next-line react-hooks/rules-of-hooks 830 useViewTransitionState(path) && unstable_viewTransition === true;834 useViewTransitionState(path) && viewTransition === true; 831 835 let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname; 832 836 let locationPathname = location.pathname; … … 872 876 style: style, 873 877 to: to, 874 unstable_viewTransition: unstable_viewTransition878 viewTransition: viewTransition 875 879 }), typeof children === "function" ? children(renderProps) : children); 876 880 }); … … 896 900 relative, 897 901 preventScrollReset, 898 unstable_viewTransition902 viewTransition 899 903 } = _ref9, 900 904 props = _objectWithoutPropertiesLoose(_ref9, _excluded3); … … 918 922 relative, 919 923 preventScrollReset, 920 unstable_viewTransition924 viewTransition 921 925 }); 922 926 }; … … 969 973 // Internal hooks 970 974 function getDataRouterConsoleError(hookName) { 971 return hookName + " must be used within a data router. See https://reactrouter.com/ routers/picking-a-router.";975 return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."; 972 976 } 973 977 function useDataRouterContext(hookName) { … … 994 998 preventScrollReset, 995 999 relative, 996 unstable_viewTransition1000 viewTransition 997 1001 } = _temp === void 0 ? {} : _temp; 998 1002 let navigate = useNavigate(); … … 1012 1016 preventScrollReset, 1013 1017 relative, 1014 unstable_viewTransition1018 viewTransition 1015 1019 }); 1016 1020 } 1017 }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, unstable_viewTransition]);1021 }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, viewTransition]); 1018 1022 } 1019 1023 /** … … 1078 1082 formMethod: options.method || method, 1079 1083 formEncType: options.encType || encType, 1080 unstable_flushSync: options.unstable_flushSync1084 flushSync: options.flushSync 1081 1085 }); 1082 1086 } else { … … 1090 1094 state: options.state, 1091 1095 fromRouteId: currentRouteId, 1092 unstable_flushSync: options.unstable_flushSync,1093 unstable_viewTransition: options.unstable_viewTransition1096 flushSync: options.flushSync, 1097 viewTransition: options.viewTransition 1094 1098 }); 1095 1099 } … … 1125 1129 // on match.route.index below 1126 1130 let params = new URLSearchParams(path.search); 1127 if (params.has("index") && params.get("index") === "") { 1131 let indexValues = params.getAll("index"); 1132 let hasNakedIndexParam = indexValues.some(v => v === ""); 1133 if (hasNakedIndexParam) { 1128 1134 params.delete("index"); 1129 path.search = params.toString() ? "?" + params.toString() : ""; 1135 indexValues.filter(v => v).forEach(v => params.append("index", v)); 1136 let qs = params.toString(); 1137 path.search = qs ? "?" + qs : ""; 1130 1138 } 1131 1139 } … … 1418 1426 } 1419 1427 let vtContext = React.useContext(ViewTransitionContext); 1420 !(vtContext != null) ? process.env.NODE_ENV !== "production" ? UNSAFE_invariant(false, "`u nstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. " + "Did you accidentally import `RouterProvider` from `react-router`?") : UNSAFE_invariant(false) : void 0;1428 !(vtContext != null) ? process.env.NODE_ENV !== "production" ? UNSAFE_invariant(false, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. " + "Did you accidentally import `RouterProvider` from `react-router`?") : UNSAFE_invariant(false) : void 0; 1421 1429 let { 1422 1430 basename … … 1434 1442 // an indicated transition apply. I.e., on the list view you have: 1435 1443 // 1436 // <NavLink to="/details/1" unstable_viewTransition>1444 // <NavLink to="/details/1" viewTransition> 1437 1445 // 1438 1446 // If you click the breadcrumb back to the list view: 1439 1447 // 1440 // <NavLink to="/list" unstable_viewTransition>1448 // <NavLink to="/list" viewTransition> 1441 1449 // 1442 1450 // We should apply the transition because it's indicated as active going … … 1447 1455 //#endregion 1448 1456 1449 export { BrowserRouter, Form, HashRouter, Link, NavLink, RouterProvider, ScrollRestoration, FetchersContext as UNSAFE_FetchersContext, ViewTransitionContext as UNSAFE_ViewTransitionContext, useScrollRestoration as UNSAFE_useScrollRestoration, createBrowserRouter, createHashRouter, createSearchParams, HistoryRouter as unstable_HistoryRouter, usePrompt as unstable_usePrompt, use ViewTransitionState as unstable_useViewTransitionState, useBeforeUnload, useFetcher, useFetchers, useFormAction, useLinkClickHandler, useSearchParams, useSubmit};1457 export { BrowserRouter, Form, HashRouter, Link, NavLink, RouterProvider, ScrollRestoration, FetchersContext as UNSAFE_FetchersContext, ViewTransitionContext as UNSAFE_ViewTransitionContext, useScrollRestoration as UNSAFE_useScrollRestoration, createBrowserRouter, createHashRouter, createSearchParams, HistoryRouter as unstable_HistoryRouter, usePrompt as unstable_usePrompt, useBeforeUnload, useFetcher, useFetchers, useFormAction, useLinkClickHandler, useSearchParams, useSubmit, useViewTransitionState }; 1450 1458 //# sourceMappingURL=index.js.map
Note:
See TracChangeset
for help on using the changeset viewer.