react-router-dom
Advanced tools
Comparing version 6.1.0 to 6.1.1
@@ -15,3 +15,3 @@ import * as React from "react"; | ||
/** | ||
* A <Router> for use in web browsers. Provides the cleanest URLs. | ||
* A `<Router>` for use in web browsers. Provides the cleanest URLs. | ||
*/ | ||
@@ -25,3 +25,3 @@ export declare function BrowserRouter({ basename, children, window }: BrowserRouterProps): JSX.Element; | ||
/** | ||
* A <Router> for use in web browsers. Stores the location in the hash | ||
* A `<Router>` for use in web browsers. Stores the location in the hash | ||
* portion of the URL so it is not sent to the server. | ||
@@ -35,6 +35,13 @@ */ | ||
} | ||
export declare function HistoryRouter({ basename, children, history }: HistoryRouterProps): JSX.Element; | ||
export declare namespace HistoryRouter { | ||
/** | ||
* A `<Router>` that accepts a pre-instantiated history object. It's important | ||
* to note that using your own history object is highly discouraged and may add | ||
* two versions of the history library to your bundles unless you use the same | ||
* version of the history library that React Router uses internally. | ||
*/ | ||
declare function HistoryRouter({ basename, children, history }: HistoryRouterProps): JSX.Element; | ||
declare namespace HistoryRouter { | ||
var displayName: string; | ||
} | ||
export { HistoryRouter as unstable_HistoryRouter }; | ||
export interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> { | ||
@@ -41,0 +48,0 @@ reloadDocument?: boolean; |
17
index.js
/** | ||
* React Router DOM v6.1.0 | ||
* React Router DOM v6.1.1 | ||
* | ||
@@ -71,3 +71,3 @@ * Copyright (c) Remix Software Inc. | ||
/** | ||
* A <Router> for use in web browsers. Provides the cleanest URLs. | ||
* A `<Router>` for use in web browsers. Provides the cleanest URLs. | ||
*/ | ||
@@ -104,3 +104,3 @@ function BrowserRouter(_ref) { | ||
/** | ||
* A <Router> for use in web browsers. Stores the location in the hash | ||
* A `<Router>` for use in web browsers. Stores the location in the hash | ||
* portion of the URL so it is not sent to the server. | ||
@@ -136,2 +136,9 @@ */ | ||
} | ||
/** | ||
* A `<Router>` that accepts a pre-instantiated history object. It's important | ||
* to note that using your own history object is highly discouraged and may add | ||
* two versions of the history library to your bundles unless you use the same | ||
* version of the history library that React Router uses internally. | ||
*/ | ||
function HistoryRouter(_ref3) { | ||
@@ -158,3 +165,3 @@ let { | ||
if (process.env.NODE_ENV !== "production") { | ||
HistoryRouter.displayName = "HistoryRouter"; | ||
HistoryRouter.displayName = "unstable_HistoryRouter"; | ||
} | ||
@@ -366,3 +373,3 @@ | ||
export { BrowserRouter, HashRouter, HistoryRouter, Link, NavLink, createSearchParams, useLinkClickHandler, useSearchParams }; | ||
export { BrowserRouter, HashRouter, Link, NavLink, createSearchParams, HistoryRouter as unstable_HistoryRouter, useLinkClickHandler, useSearchParams }; | ||
//# sourceMappingURL=index.js.map |
/** | ||
* React Router DOM v6.1.0 | ||
* React Router DOM v6.1.1 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
{ | ||
"name": "react-router-dom", | ||
"version": "6.1.0", | ||
"version": "6.1.1", | ||
"author": "Remix Software <hello@remix.run>", | ||
@@ -17,3 +17,3 @@ "description": "Declarative routing for React web applications", | ||
"dependencies": { | ||
"react-router": "6.1.0", | ||
"react-router": "6.1.1", | ||
"history": "^5.1.0" | ||
@@ -20,0 +20,0 @@ }, |
/** | ||
* React Router DOM v6.1.0 | ||
* React Router DOM v6.1.1 | ||
* | ||
@@ -35,3 +35,3 @@ * Copyright (c) Remix Software Inc. | ||
/** | ||
* A <Router> for use in web browsers. Provides the cleanest URLs. | ||
* A `<Router>` for use in web browsers. Provides the cleanest URLs. | ||
*/ | ||
@@ -67,3 +67,3 @@ function BrowserRouter({ | ||
/** | ||
* A <Router> for use in web browsers. Stores the location in the hash | ||
* A `<Router>` for use in web browsers. Stores the location in the hash | ||
* portion of the URL so it is not sent to the server. | ||
@@ -98,2 +98,9 @@ */ | ||
} | ||
/** | ||
* A `<Router>` that accepts a pre-instantiated history object. It's important | ||
* to note that using your own history object is highly discouraged and may add | ||
* two versions of the history library to your bundles unless you use the same | ||
* version of the history library that React Router uses internally. | ||
*/ | ||
function HistoryRouter({ | ||
@@ -119,3 +126,3 @@ basename, | ||
{ | ||
HistoryRouter.displayName = "HistoryRouter"; | ||
HistoryRouter.displayName = "unstable_HistoryRouter"; | ||
} | ||
@@ -318,3 +325,3 @@ | ||
export { BrowserRouter, HashRouter, HistoryRouter, Link, NavLink, createSearchParams, useLinkClickHandler, useSearchParams }; | ||
export { BrowserRouter, HashRouter, Link, NavLink, createSearchParams, HistoryRouter as unstable_HistoryRouter, useLinkClickHandler, useSearchParams }; | ||
//# sourceMappingURL=react-router-dom.development.js.map |
/** | ||
* React Router DOM v6.1.0 | ||
* React Router DOM v6.1.1 | ||
* | ||
@@ -11,3 +11,3 @@ * Copyright (c) Remix Software Inc. | ||
*/ | ||
import{useRef as t,useState as e,useLayoutEffect as n,createElement as a,forwardRef as r,useCallback as o,useMemo as i}from"react";import{createBrowserHistory as c,createHashHistory as l,createPath as s}from"history";import{Router as u,useHref as f,useLocation as h,useResolvedPath as m,useNavigate as p}from"react-router";export{MemoryRouter,Navigate,Outlet,Route,Router,Routes,UNSAFE_LocationContext,UNSAFE_NavigationContext,UNSAFE_RouteContext,createRoutesFromChildren,generatePath,matchPath,matchRoutes,renderMatches,resolvePath,useHref,useInRouterContext,useLocation,useMatch,useNavigate,useNavigationType,useOutlet,useOutletContext,useParams,useResolvedPath,useRoutes}from"react-router";function y({basename:r,children:o,window:i}){let l=t();null==l.current&&(l.current=c({window:i}));let s=l.current,[f,h]=e({action:s.action,location:s.location});return n((()=>s.listen(h)),[s]),a(u,{basename:r,children:o,location:f.location,navigationType:f.action,navigator:s})}function d({basename:r,children:o,window:i}){let c=t();null==c.current&&(c.current=l({window:i}));let s=c.current,[f,h]=e({action:s.action,location:s.location});return n((()=>s.listen(h)),[s]),a(u,{basename:r,children:o,location:f.location,navigationType:f.action,navigator:s})}function g({basename:t,children:r,history:o}){const[i,c]=e({action:o.action,location:o.location});return n((()=>o.listen(c)),[o]),a(u,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:o})}const v=r((function({onClick:t,reloadDocument:e,replace:n=!1,state:r,target:o,to:i,...c},l){let s=f(i),u=R(i,{replace:n,state:r,target:o});return a("a",Object.assign({},c,{href:s,onClick:function(n){t&&t(n),n.defaultPrevented||e||u(n)},ref:l,target:o}))})),A=r((function({"aria-current":t="page",caseSensitive:e=!1,className:n="",end:r=!1,style:o,to:i,children:c,...l},s){let u=h(),f=m(i),p=u.pathname,y=f.pathname;e||(p=p.toLowerCase(),y=y.toLowerCase());let d,g=p===y||!r&&p.startsWith(y)&&"/"===p.charAt(y.length),A=g?t:void 0;d="function"==typeof n?n({isActive:g}):[n,g?"active":null].filter(Boolean).join(" ");let R="function"==typeof o?o({isActive:g}):o;return a(v,Object.assign({},l,{"aria-current":A,className:d,ref:s,style:R,to:i}),"function"==typeof c?c({isActive:g}):c)}));function R(t,{target:e,replace:n,state:a}={}){let r=p(),i=h(),c=m(t);return o((o=>{if(!(0!==o.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(o))){o.preventDefault();let e=!!n||s(i)===s(c);r(t,{replace:e,state:a})}}),[i,r,c,n,a,e,t])}function w(e){let n=t(b(e)),a=h(),r=i((()=>{let t=b(a.search);for(let e of n.current.keys())t.has(e)||n.current.getAll(e).forEach((n=>{t.append(e,n)}));return t}),[a.search]),c=p();return[r,o(((t,e)=>{c("?"+b(t),e)}),[c])]}function b(t=""){return new URLSearchParams("string"==typeof t||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce(((e,n)=>{let a=t[n];return e.concat(Array.isArray(a)?a.map((t=>[n,t])):[[n,a]])}),[]))}export{y as BrowserRouter,d as HashRouter,g as HistoryRouter,v as Link,A as NavLink,b as createSearchParams,R as useLinkClickHandler,w as useSearchParams}; | ||
import{useRef as t,useState as e,useLayoutEffect as n,createElement as a,forwardRef as r,useCallback as o,useMemo as i}from"react";import{createBrowserHistory as c,createHashHistory as s,createPath as l}from"history";import{Router as u,useHref as f,useLocation as h,useResolvedPath as m,useNavigate as p}from"react-router";export{MemoryRouter,Navigate,Outlet,Route,Router,Routes,UNSAFE_LocationContext,UNSAFE_NavigationContext,UNSAFE_RouteContext,createRoutesFromChildren,generatePath,matchPath,matchRoutes,renderMatches,resolvePath,useHref,useInRouterContext,useLocation,useMatch,useNavigate,useNavigationType,useOutlet,useOutletContext,useParams,useResolvedPath,useRoutes}from"react-router";function y({basename:r,children:o,window:i}){let s=t();null==s.current&&(s.current=c({window:i}));let l=s.current,[f,h]=e({action:l.action,location:l.location});return n((()=>l.listen(h)),[l]),a(u,{basename:r,children:o,location:f.location,navigationType:f.action,navigator:l})}function d({basename:r,children:o,window:i}){let c=t();null==c.current&&(c.current=s({window:i}));let l=c.current,[f,h]=e({action:l.action,location:l.location});return n((()=>l.listen(h)),[l]),a(u,{basename:r,children:o,location:f.location,navigationType:f.action,navigator:l})}function g({basename:t,children:r,history:o}){const[i,c]=e({action:o.action,location:o.location});return n((()=>o.listen(c)),[o]),a(u,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:o})}const v=r((function({onClick:t,reloadDocument:e,replace:n=!1,state:r,target:o,to:i,...c},s){let l=f(i),u=A(i,{replace:n,state:r,target:o});return a("a",Object.assign({},c,{href:l,onClick:function(n){t&&t(n),n.defaultPrevented||e||u(n)},ref:s,target:o}))})),R=r((function({"aria-current":t="page",caseSensitive:e=!1,className:n="",end:r=!1,style:o,to:i,children:c,...s},l){let u=h(),f=m(i),p=u.pathname,y=f.pathname;e||(p=p.toLowerCase(),y=y.toLowerCase());let d,g=p===y||!r&&p.startsWith(y)&&"/"===p.charAt(y.length),R=g?t:void 0;d="function"==typeof n?n({isActive:g}):[n,g?"active":null].filter(Boolean).join(" ");let A="function"==typeof o?o({isActive:g}):o;return a(v,Object.assign({},s,{"aria-current":R,className:d,ref:l,style:A,to:i}),"function"==typeof c?c({isActive:g}):c)}));function A(t,{target:e,replace:n,state:a}={}){let r=p(),i=h(),c=m(t);return o((o=>{if(!(0!==o.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(o))){o.preventDefault();let e=!!n||l(i)===l(c);r(t,{replace:e,state:a})}}),[i,r,c,n,a,e,t])}function b(e){let n=t(w(e)),a=h(),r=i((()=>{let t=w(a.search);for(let e of n.current.keys())t.has(e)||n.current.getAll(e).forEach((n=>{t.append(e,n)}));return t}),[a.search]),c=p();return[r,o(((t,e)=>{c("?"+w(t),e)}),[c])]}function w(t=""){return new URLSearchParams("string"==typeof t||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce(((e,n)=>{let a=t[n];return e.concat(Array.isArray(a)?a.map((t=>[n,t])):[[n,a]])}),[]))}export{y as BrowserRouter,d as HashRouter,v as Link,R as NavLink,w as createSearchParams,g as unstable_HistoryRouter,A as useLinkClickHandler,b as useSearchParams}; | ||
//# sourceMappingURL=react-router-dom.production.min.js.map |
/** | ||
* React Router DOM v6.1.0 | ||
* React Router DOM v6.1.1 | ||
* | ||
@@ -72,3 +72,3 @@ * Copyright (c) Remix Software Inc. | ||
/** | ||
* A <Router> for use in web browsers. Provides the cleanest URLs. | ||
* A `<Router>` for use in web browsers. Provides the cleanest URLs. | ||
*/ | ||
@@ -105,3 +105,3 @@ function BrowserRouter(_ref) { | ||
/** | ||
* A <Router> for use in web browsers. Stores the location in the hash | ||
* A `<Router>` for use in web browsers. Stores the location in the hash | ||
* portion of the URL so it is not sent to the server. | ||
@@ -137,2 +137,9 @@ */ | ||
} | ||
/** | ||
* A `<Router>` that accepts a pre-instantiated history object. It's important | ||
* to note that using your own history object is highly discouraged and may add | ||
* two versions of the history library to your bundles unless you use the same | ||
* version of the history library that React Router uses internally. | ||
*/ | ||
function HistoryRouter(_ref3) { | ||
@@ -159,3 +166,3 @@ let { | ||
{ | ||
HistoryRouter.displayName = "HistoryRouter"; | ||
HistoryRouter.displayName = "unstable_HistoryRouter"; | ||
} | ||
@@ -525,6 +532,6 @@ | ||
exports.HashRouter = HashRouter; | ||
exports.HistoryRouter = HistoryRouter; | ||
exports.Link = Link; | ||
exports.NavLink = NavLink; | ||
exports.createSearchParams = createSearchParams; | ||
exports.unstable_HistoryRouter = HistoryRouter; | ||
exports.useLinkClickHandler = useLinkClickHandler; | ||
@@ -531,0 +538,0 @@ exports.useSearchParams = useSearchParams; |
/** | ||
* React Router DOM v6.1.0 | ||
* React Router DOM v6.1.1 | ||
* | ||
@@ -11,3 +11,3 @@ * Copyright (c) Remix Software Inc. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("history"),require("react-router")):"function"==typeof define&&define.amd?define(["exports","react","history","react-router"],t):t((e=e||self).ReactRouterDOM={},e.React,e.HistoryLibrary,e.ReactRouter)}(this,(function(e,t,r,n){"use strict";function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}function a(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}const u=["onClick","reloadDocument","replace","state","target","to"],i=["aria-current","caseSensitive","className","end","style","to","children"];const c=t.forwardRef((function(e,r){let{onClick:i,reloadDocument:c,replace:s=!1,state:f,target:d,to:y}=e,b=a(e,u),m=n.useHref(y),p=l(y,{replace:s,state:f,target:d});return t.createElement("a",o({},b,{href:m,onClick:function(e){i&&i(e),e.defaultPrevented||c||p(e)},ref:r,target:d}))})),s=t.forwardRef((function(e,r){let{"aria-current":u="page",caseSensitive:s=!1,className:l="",end:f=!1,style:d,to:y,children:b}=e,m=a(e,i),p=n.useLocation(),g=n.useResolvedPath(y),h=p.pathname,P=g.pathname;s||(h=h.toLowerCase(),P=P.toLowerCase());let O,R=h===P||!f&&h.startsWith(P)&&"/"===h.charAt(P.length),v=R?u:void 0;O="function"==typeof l?l({isActive:R}):[l,R?"active":null].filter(Boolean).join(" ");let j="function"==typeof d?d({isActive:R}):d;return t.createElement(c,o({},m,{"aria-current":v,className:O,ref:r,style:j,to:y}),"function"==typeof b?b({isActive:R}):b)}));function l(e,o){let{target:a,replace:u,state:i}=void 0===o?{}:o,c=n.useNavigate(),s=n.useLocation(),l=n.useResolvedPath(e);return t.useCallback((t=>{if(!(0!==t.button||a&&"_self"!==a||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t))){t.preventDefault();let n=!!u||r.createPath(s)===r.createPath(l);c(e,{replace:n,state:i})}}),[s,c,l,u,i,a,e])}function f(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map((e=>[r,e])):[[r,n]])}),[]))}Object.defineProperty(e,"MemoryRouter",{enumerable:!0,get:function(){return n.MemoryRouter}}),Object.defineProperty(e,"Navigate",{enumerable:!0,get:function(){return n.Navigate}}),Object.defineProperty(e,"Outlet",{enumerable:!0,get:function(){return n.Outlet}}),Object.defineProperty(e,"Route",{enumerable:!0,get:function(){return n.Route}}),Object.defineProperty(e,"Router",{enumerable:!0,get:function(){return n.Router}}),Object.defineProperty(e,"Routes",{enumerable:!0,get:function(){return n.Routes}}),Object.defineProperty(e,"UNSAFE_LocationContext",{enumerable:!0,get:function(){return n.UNSAFE_LocationContext}}),Object.defineProperty(e,"UNSAFE_NavigationContext",{enumerable:!0,get:function(){return n.UNSAFE_NavigationContext}}),Object.defineProperty(e,"UNSAFE_RouteContext",{enumerable:!0,get:function(){return n.UNSAFE_RouteContext}}),Object.defineProperty(e,"createRoutesFromChildren",{enumerable:!0,get:function(){return n.createRoutesFromChildren}}),Object.defineProperty(e,"generatePath",{enumerable:!0,get:function(){return n.generatePath}}),Object.defineProperty(e,"matchPath",{enumerable:!0,get:function(){return n.matchPath}}),Object.defineProperty(e,"matchRoutes",{enumerable:!0,get:function(){return n.matchRoutes}}),Object.defineProperty(e,"renderMatches",{enumerable:!0,get:function(){return n.renderMatches}}),Object.defineProperty(e,"resolvePath",{enumerable:!0,get:function(){return n.resolvePath}}),Object.defineProperty(e,"useHref",{enumerable:!0,get:function(){return n.useHref}}),Object.defineProperty(e,"useInRouterContext",{enumerable:!0,get:function(){return n.useInRouterContext}}),Object.defineProperty(e,"useLocation",{enumerable:!0,get:function(){return n.useLocation}}),Object.defineProperty(e,"useMatch",{enumerable:!0,get:function(){return n.useMatch}}),Object.defineProperty(e,"useNavigate",{enumerable:!0,get:function(){return n.useNavigate}}),Object.defineProperty(e,"useNavigationType",{enumerable:!0,get:function(){return n.useNavigationType}}),Object.defineProperty(e,"useOutlet",{enumerable:!0,get:function(){return n.useOutlet}}),Object.defineProperty(e,"useOutletContext",{enumerable:!0,get:function(){return n.useOutletContext}}),Object.defineProperty(e,"useParams",{enumerable:!0,get:function(){return n.useParams}}),Object.defineProperty(e,"useResolvedPath",{enumerable:!0,get:function(){return n.useResolvedPath}}),Object.defineProperty(e,"useRoutes",{enumerable:!0,get:function(){return n.useRoutes}}),e.BrowserRouter=function(e){let{basename:o,children:a,window:u}=e,i=t.useRef();null==i.current&&(i.current=r.createBrowserHistory({window:u}));let c=i.current,[s,l]=t.useState({action:c.action,location:c.location});return t.useLayoutEffect((()=>c.listen(l)),[c]),t.createElement(n.Router,{basename:o,children:a,location:s.location,navigationType:s.action,navigator:c})},e.HashRouter=function(e){let{basename:o,children:a,window:u}=e,i=t.useRef();null==i.current&&(i.current=r.createHashHistory({window:u}));let c=i.current,[s,l]=t.useState({action:c.action,location:c.location});return t.useLayoutEffect((()=>c.listen(l)),[c]),t.createElement(n.Router,{basename:o,children:a,location:s.location,navigationType:s.action,navigator:c})},e.HistoryRouter=function(e){let{basename:r,children:o,history:a}=e;const[u,i]=t.useState({action:a.action,location:a.location});return t.useLayoutEffect((()=>a.listen(i)),[a]),t.createElement(n.Router,{basename:r,children:o,location:u.location,navigationType:u.action,navigator:a})},e.Link=c,e.NavLink=s,e.createSearchParams=f,e.useLinkClickHandler=l,e.useSearchParams=function(e){let r=t.useRef(f(e)),o=n.useLocation(),a=t.useMemo((()=>{let e=f(o.search);for(let t of r.current.keys())e.has(t)||r.current.getAll(t).forEach((r=>{e.append(t,r)}));return e}),[o.search]),u=n.useNavigate();return[a,t.useCallback(((e,t)=>{u("?"+f(e),t)}),[u])]},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("history"),require("react-router")):"function"==typeof define&&define.amd?define(["exports","react","history","react-router"],t):t((e=e||self).ReactRouterDOM={},e.React,e.HistoryLibrary,e.ReactRouter)}(this,(function(e,t,r,n){"use strict";function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}function a(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}const u=["onClick","reloadDocument","replace","state","target","to"],i=["aria-current","caseSensitive","className","end","style","to","children"];const c=t.forwardRef((function(e,r){let{onClick:i,reloadDocument:c,replace:s=!1,state:f,target:d,to:b}=e,y=a(e,u),m=n.useHref(b),p=l(b,{replace:s,state:f,target:d});return t.createElement("a",o({},y,{href:m,onClick:function(e){i&&i(e),e.defaultPrevented||c||p(e)},ref:r,target:d}))})),s=t.forwardRef((function(e,r){let{"aria-current":u="page",caseSensitive:s=!1,className:l="",end:f=!1,style:d,to:b,children:y}=e,m=a(e,i),p=n.useLocation(),g=n.useResolvedPath(b),h=p.pathname,P=g.pathname;s||(h=h.toLowerCase(),P=P.toLowerCase());let O,R=h===P||!f&&h.startsWith(P)&&"/"===h.charAt(P.length),v=R?u:void 0;O="function"==typeof l?l({isActive:R}):[l,R?"active":null].filter(Boolean).join(" ");let j="function"==typeof d?d({isActive:R}):d;return t.createElement(c,o({},m,{"aria-current":v,className:O,ref:r,style:j,to:b}),"function"==typeof y?y({isActive:R}):y)}));function l(e,o){let{target:a,replace:u,state:i}=void 0===o?{}:o,c=n.useNavigate(),s=n.useLocation(),l=n.useResolvedPath(e);return t.useCallback((t=>{if(!(0!==t.button||a&&"_self"!==a||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t))){t.preventDefault();let n=!!u||r.createPath(s)===r.createPath(l);c(e,{replace:n,state:i})}}),[s,c,l,u,i,a,e])}function f(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map((e=>[r,e])):[[r,n]])}),[]))}Object.defineProperty(e,"MemoryRouter",{enumerable:!0,get:function(){return n.MemoryRouter}}),Object.defineProperty(e,"Navigate",{enumerable:!0,get:function(){return n.Navigate}}),Object.defineProperty(e,"Outlet",{enumerable:!0,get:function(){return n.Outlet}}),Object.defineProperty(e,"Route",{enumerable:!0,get:function(){return n.Route}}),Object.defineProperty(e,"Router",{enumerable:!0,get:function(){return n.Router}}),Object.defineProperty(e,"Routes",{enumerable:!0,get:function(){return n.Routes}}),Object.defineProperty(e,"UNSAFE_LocationContext",{enumerable:!0,get:function(){return n.UNSAFE_LocationContext}}),Object.defineProperty(e,"UNSAFE_NavigationContext",{enumerable:!0,get:function(){return n.UNSAFE_NavigationContext}}),Object.defineProperty(e,"UNSAFE_RouteContext",{enumerable:!0,get:function(){return n.UNSAFE_RouteContext}}),Object.defineProperty(e,"createRoutesFromChildren",{enumerable:!0,get:function(){return n.createRoutesFromChildren}}),Object.defineProperty(e,"generatePath",{enumerable:!0,get:function(){return n.generatePath}}),Object.defineProperty(e,"matchPath",{enumerable:!0,get:function(){return n.matchPath}}),Object.defineProperty(e,"matchRoutes",{enumerable:!0,get:function(){return n.matchRoutes}}),Object.defineProperty(e,"renderMatches",{enumerable:!0,get:function(){return n.renderMatches}}),Object.defineProperty(e,"resolvePath",{enumerable:!0,get:function(){return n.resolvePath}}),Object.defineProperty(e,"useHref",{enumerable:!0,get:function(){return n.useHref}}),Object.defineProperty(e,"useInRouterContext",{enumerable:!0,get:function(){return n.useInRouterContext}}),Object.defineProperty(e,"useLocation",{enumerable:!0,get:function(){return n.useLocation}}),Object.defineProperty(e,"useMatch",{enumerable:!0,get:function(){return n.useMatch}}),Object.defineProperty(e,"useNavigate",{enumerable:!0,get:function(){return n.useNavigate}}),Object.defineProperty(e,"useNavigationType",{enumerable:!0,get:function(){return n.useNavigationType}}),Object.defineProperty(e,"useOutlet",{enumerable:!0,get:function(){return n.useOutlet}}),Object.defineProperty(e,"useOutletContext",{enumerable:!0,get:function(){return n.useOutletContext}}),Object.defineProperty(e,"useParams",{enumerable:!0,get:function(){return n.useParams}}),Object.defineProperty(e,"useResolvedPath",{enumerable:!0,get:function(){return n.useResolvedPath}}),Object.defineProperty(e,"useRoutes",{enumerable:!0,get:function(){return n.useRoutes}}),e.BrowserRouter=function(e){let{basename:o,children:a,window:u}=e,i=t.useRef();null==i.current&&(i.current=r.createBrowserHistory({window:u}));let c=i.current,[s,l]=t.useState({action:c.action,location:c.location});return t.useLayoutEffect((()=>c.listen(l)),[c]),t.createElement(n.Router,{basename:o,children:a,location:s.location,navigationType:s.action,navigator:c})},e.HashRouter=function(e){let{basename:o,children:a,window:u}=e,i=t.useRef();null==i.current&&(i.current=r.createHashHistory({window:u}));let c=i.current,[s,l]=t.useState({action:c.action,location:c.location});return t.useLayoutEffect((()=>c.listen(l)),[c]),t.createElement(n.Router,{basename:o,children:a,location:s.location,navigationType:s.action,navigator:c})},e.Link=c,e.NavLink=s,e.createSearchParams=f,e.unstable_HistoryRouter=function(e){let{basename:r,children:o,history:a}=e;const[u,i]=t.useState({action:a.action,location:a.location});return t.useLayoutEffect((()=>a.listen(i)),[a]),t.createElement(n.Router,{basename:r,children:o,location:u.location,navigationType:u.action,navigator:a})},e.useLinkClickHandler=l,e.useSearchParams=function(e){let r=t.useRef(f(e)),o=n.useLocation(),a=t.useMemo((()=>{let e=f(o.search);for(let t of r.current.keys())e.has(t)||r.current.getAll(t).forEach((r=>{e.append(t,r)}));return e}),[o.search]),u=n.useNavigate();return[a,t.useCallback(((e,t)=>{u("?"+f(e),t)}),[u])]},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=react-router-dom.production.min.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
165765
1427
+ Addedreact-router@6.1.1(transitive)
- Removedreact-router@6.1.0(transitive)
Updatedreact-router@6.1.1