Changeset 0c6b92a for imaps-frontend/node_modules/react-router-dom/dist/umd/react-router-dom.development.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/react-router-dom/dist/umd/react-router-dom.development.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. … … 251 251 } 252 252 253 const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", " unstable_viewTransition"],254 _excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", " unstable_viewTransition", "children"],255 _excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", " unstable_viewTransition"];253 const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"], 254 _excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"], 255 _excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"]; 256 256 //#endregion 257 257 // HEY YOU! DON'T TOUCH THIS VARIABLE! … … 286 286 routes, 287 287 mapRouteProperties: reactRouter.UNSAFE_mapRouteProperties, 288 unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy,289 unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss,288 dataStrategy: opts == null ? void 0 : opts.dataStrategy, 289 patchRoutesOnNavigation: opts == null ? void 0 : opts.patchRoutesOnNavigation, 290 290 window: opts == null ? void 0 : opts.window 291 291 }).initialize(); … … 303 303 routes, 304 304 mapRouteProperties: reactRouter.UNSAFE_mapRouteProperties, 305 unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy,306 unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss,305 dataStrategy: opts == null ? void 0 : opts.dataStrategy, 306 patchRoutesOnNavigation: opts == null ? void 0 : opts.patchRoutesOnNavigation, 307 307 window: opts == null ? void 0 : opts.window 308 308 }).initialize(); … … 479 479 let { 480 480 deletedFetchers, 481 unstable_flushSync: flushSync,482 unstable_viewTransitionOpts: viewTransitionOpts481 flushSync: flushSync, 482 viewTransitionOpts: viewTransitionOpts 483 483 } = _ref2; 484 484 deletedFetchers.forEach(key => fetcherData.current.delete(key)); … … 649 649 v7_relativeSplatPath: router$1.future.v7_relativeSplatPath 650 650 }), [router$1.future.v7_relativeSplatPath]); 651 React__namespace.useEffect(() => reactRouter.UNSAFE_logV6DeprecationWarnings(future, router$1.future), [future, router$1.future]); 651 652 652 653 // The fragment and {null} here are important! We need them to keep React 18's … … 716 717 }, [setStateImpl, v7_startTransition]); 717 718 React__namespace.useLayoutEffect(() => history.listen(setState), [history, setState]); 719 React__namespace.useEffect(() => reactRouter.UNSAFE_logV6DeprecationWarnings(future), [future]); 718 720 return /*#__PURE__*/React__namespace.createElement(reactRouter.Router, { 719 721 basename: basename, … … 755 757 }, [setStateImpl, v7_startTransition]); 756 758 React__namespace.useLayoutEffect(() => history.listen(setState), [history, setState]); 759 React__namespace.useEffect(() => reactRouter.UNSAFE_logV6DeprecationWarnings(future), [future]); 757 760 return /*#__PURE__*/React__namespace.createElement(reactRouter.Router, { 758 761 basename: basename, … … 788 791 }, [setStateImpl, v7_startTransition]); 789 792 React__namespace.useLayoutEffect(() => history.listen(setState), [history, setState]); 793 React__namespace.useEffect(() => reactRouter.UNSAFE_logV6DeprecationWarnings(future), [future]); 790 794 return /*#__PURE__*/React__namespace.createElement(reactRouter.Router, { 791 795 basename: basename, … … 816 820 to, 817 821 preventScrollReset, 818 unstable_viewTransition822 viewTransition 819 823 } = _ref7, 820 824 rest = _objectWithoutPropertiesLoose(_ref7, _excluded); … … 859 863 preventScrollReset, 860 864 relative, 861 unstable_viewTransition865 viewTransition 862 866 }); 863 867 function handleClick(event) { … … 892 896 style: styleProp, 893 897 to, 894 unstable_viewTransition,898 viewTransition, 895 899 children 896 900 } = _ref8, … … 908 912 // Conditional usage is OK here because the usage of a data router is static 909 913 // eslint-disable-next-line react-hooks/rules-of-hooks 910 useViewTransitionState(path) && unstable_viewTransition === true;914 useViewTransitionState(path) && viewTransition === true; 911 915 let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname; 912 916 let locationPathname = location.pathname; … … 953 957 style: style, 954 958 to: to, 955 unstable_viewTransition: unstable_viewTransition959 viewTransition: viewTransition 956 960 }), typeof children === "function" ? children(renderProps) : children); 957 961 }); … … 990 994 relative, 991 995 preventScrollReset, 992 unstable_viewTransition996 viewTransition 993 997 } = _ref9, 994 998 props = _objectWithoutPropertiesLoose(_ref9, _excluded3); … … 1012 1016 relative, 1013 1017 preventScrollReset, 1014 unstable_viewTransition1018 viewTransition 1015 1019 }); 1016 1020 }; … … 1063 1067 }(DataRouterStateHook || {}); // Internal hooks 1064 1068 function getDataRouterConsoleError(hookName) { 1065 return hookName + " must be used within a data router. See https://reactrouter.com/ routers/picking-a-router.";1069 return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."; 1066 1070 } 1067 1071 function useDataRouterContext(hookName) { … … 1090 1094 preventScrollReset, 1091 1095 relative, 1092 unstable_viewTransition1096 viewTransition 1093 1097 } = _temp === void 0 ? {} : _temp; 1094 1098 let navigate = reactRouter.useNavigate(); … … 1109 1113 preventScrollReset, 1110 1114 relative, 1111 unstable_viewTransition1115 viewTransition 1112 1116 }); 1113 1117 } 1114 }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, unstable_viewTransition]);1118 }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, viewTransition]); 1115 1119 } 1116 1120 … … 1186 1190 formMethod: options.method || method, 1187 1191 formEncType: options.encType || encType, 1188 unstable_flushSync: options.unstable_flushSync1192 flushSync: options.flushSync 1189 1193 }); 1190 1194 } else { … … 1198 1202 state: options.state, 1199 1203 fromRouteId: currentRouteId, 1200 unstable_flushSync: options.unstable_flushSync,1201 unstable_viewTransition: options.unstable_viewTransition1204 flushSync: options.flushSync, 1205 viewTransition: options.viewTransition 1202 1206 }); 1203 1207 } … … 1236 1240 // on match.route.index below 1237 1241 let params = new URLSearchParams(path.search); 1238 if (params.has("index") && params.get("index") === "") { 1242 let indexValues = params.getAll("index"); 1243 let hasNakedIndexParam = indexValues.some(v => v === ""); 1244 if (hasNakedIndexParam) { 1239 1245 params.delete("index"); 1240 path.search = params.toString() ? "?" + params.toString() : ""; 1246 indexValues.filter(v => v).forEach(v => params.append("index", v)); 1247 let qs = params.toString(); 1248 path.search = qs ? "?" + qs : ""; 1241 1249 } 1242 1250 } … … 1549 1557 } 1550 1558 let vtContext = React__namespace.useContext(ViewTransitionContext); 1551 !(vtContext != null) ? router.UNSAFE_invariant(false, "`u nstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. " + "Did you accidentally import `RouterProvider` from `react-router`?") : void 0;1559 !(vtContext != null) ? router.UNSAFE_invariant(false, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. " + "Did you accidentally import `RouterProvider` from `react-router`?") : void 0; 1552 1560 let { 1553 1561 basename … … 1566 1574 // an indicated transition apply. I.e., on the list view you have: 1567 1575 // 1568 // <NavLink to="/details/1" unstable_viewTransition>1576 // <NavLink to="/details/1" viewTransition> 1569 1577 // 1570 1578 // If you click the breadcrumb back to the list view: 1571 1579 // 1572 // <NavLink to="/list" unstable_viewTransition>1580 // <NavLink to="/list" viewTransition> 1573 1581 // 1574 1582 // We should apply the transition because it's indicated as active going … … 1807 1815 exports.unstable_HistoryRouter = HistoryRouter; 1808 1816 exports.unstable_usePrompt = usePrompt; 1809 exports.unstable_useViewTransitionState = useViewTransitionState;1810 1817 exports.useBeforeUnload = useBeforeUnload; 1811 1818 exports.useFetcher = useFetcher; … … 1815 1822 exports.useSearchParams = useSearchParams; 1816 1823 exports.useSubmit = useSubmit; 1824 exports.useViewTransitionState = useViewTransitionState; 1817 1825 1818 1826 Object.defineProperty(exports, '__esModule', { value: true });
Note:
See TracChangeset
for help on using the changeset viewer.