@azure/msal-react
Advanced tools
import React, { PropsWithChildren } from "react"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers.js"; | ||
export type AuthenticatedTemplateProps = PropsWithChildren<AccountIdentifiers>; | ||
@@ -4,0 +4,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import React__default, { useMemo } from 'react'; |
import React, { PropsWithChildren } from "react"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
import { MsalAuthenticationResult } from "../hooks/useMsalAuthentication"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers.js"; | ||
import { MsalAuthenticationResult } from "../hooks/useMsalAuthentication.js"; | ||
import { InteractionType, PopupRequest, RedirectRequest, SsoSilentRequest } from "@azure/msal-browser"; | ||
import { IMsalContext } from "../MsalContext"; | ||
import { IMsalContext } from "../MsalContext.js"; | ||
export type MsalAuthenticationProps = PropsWithChildren<AccountIdentifiers & { | ||
@@ -7,0 +7,0 @@ interactionType: InteractionType; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import React__default, { useMemo } from 'react'; |
import React, { PropsWithChildren } from "react"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers.js"; | ||
export type UnauthenticatedTemplateProps = PropsWithChildren<AccountIdentifiers>; | ||
@@ -4,0 +4,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import React__default, { useMemo } from 'react'; |
import React from "react"; | ||
import { IMsalContext } from "../MsalContext"; | ||
import { Subtract } from "../utils/utilities"; | ||
import { IMsalContext } from "../MsalContext.js"; | ||
import { Subtract } from "../utils/utilities.js"; | ||
export type WithMsalProps = { | ||
@@ -5,0 +5,0 @@ msalContext: IMsalContext; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import React__default from 'react'; |
@@ -0,0 +0,0 @@ import { AuthError } from "@azure/msal-browser"; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { AuthError } from '@azure/msal-browser'; |
import { AccountInfo } from "@azure/msal-browser"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers.js"; | ||
/** | ||
@@ -4,0 +4,0 @@ * Given 1 or more accountIdentifiers, returns the Account object if the user is signed-in |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { useState, useEffect } from 'react'; |
@@ -1,2 +0,2 @@ | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers.js"; | ||
/** | ||
@@ -3,0 +3,0 @@ * Returns whether or not a user is currently signed-in. Optionally provide 1 or more accountIdentifiers to determine if a specific user is signed-in |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { useMemo } from 'react'; |
@@ -1,2 +0,2 @@ | ||
import { IMsalContext } from "../MsalContext"; | ||
import { IMsalContext } from "../MsalContext.js"; | ||
/** | ||
@@ -3,0 +3,0 @@ * Returns Msal Context values |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { useContext } from 'react'; |
import { PopupRequest, RedirectRequest, SsoSilentRequest, InteractionType, AuthenticationResult, AuthError, SilentRequest } from "@azure/msal-browser"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers.js"; | ||
export type MsalAuthenticationResult = { | ||
@@ -4,0 +4,0 @@ login: (callbackInteractionType?: InteractionType | undefined, callbackRequest?: PopupRequest | RedirectRequest | SilentRequest) => Promise<AuthenticationResult | null>; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { useState, useRef, useEffect, useCallback } from 'react'; |
@@ -5,21 +5,21 @@ /** | ||
*/ | ||
export type { IMsalContext } from "./MsalContext"; | ||
export type { MsalProviderProps } from "./MsalProvider"; | ||
export type { MsalAuthenticationResult } from "./hooks/useMsalAuthentication"; | ||
export type { MsalAuthenticationProps } from "./components/MsalAuthenticationTemplate"; | ||
export type { AuthenticatedTemplateProps } from "./components/AuthenticatedTemplate"; | ||
export type { UnauthenticatedTemplateProps } from "./components/UnauthenticatedTemplate"; | ||
export type { WithMsalProps } from "./components/withMsal"; | ||
export type { AccountIdentifiers } from "./types/AccountIdentifiers"; | ||
export { MsalContext, MsalConsumer } from "./MsalContext"; | ||
export { MsalProvider } from "./MsalProvider"; | ||
export { AuthenticatedTemplate } from "./components/AuthenticatedTemplate"; | ||
export { UnauthenticatedTemplate } from "./components/UnauthenticatedTemplate"; | ||
export { MsalAuthenticationTemplate } from "./components/MsalAuthenticationTemplate"; | ||
export { withMsal } from "./components/withMsal"; | ||
export { Subtract, SetComplement, SetDifference } from "./utils/utilities"; | ||
export { useMsal } from "./hooks/useMsal"; | ||
export { useAccount } from "./hooks/useAccount"; | ||
export { useIsAuthenticated } from "./hooks/useIsAuthenticated"; | ||
export { useMsalAuthentication } from "./hooks/useMsalAuthentication"; | ||
export { version } from "./packageMetadata"; | ||
export type { IMsalContext } from "./MsalContext.js"; | ||
export type { MsalProviderProps } from "./MsalProvider.js"; | ||
export type { MsalAuthenticationResult } from "./hooks/useMsalAuthentication.js"; | ||
export type { MsalAuthenticationProps } from "./components/MsalAuthenticationTemplate.js"; | ||
export type { AuthenticatedTemplateProps } from "./components/AuthenticatedTemplate.js"; | ||
export type { UnauthenticatedTemplateProps } from "./components/UnauthenticatedTemplate.js"; | ||
export type { WithMsalProps } from "./components/withMsal.js"; | ||
export type { AccountIdentifiers } from "./types/AccountIdentifiers.js"; | ||
export { MsalContext, MsalConsumer } from "./MsalContext.js"; | ||
export { MsalProvider } from "./MsalProvider.js"; | ||
export { AuthenticatedTemplate } from "./components/AuthenticatedTemplate.js"; | ||
export { UnauthenticatedTemplate } from "./components/UnauthenticatedTemplate.js"; | ||
export { MsalAuthenticationTemplate } from "./components/MsalAuthenticationTemplate.js"; | ||
export { withMsal } from "./components/withMsal.js"; | ||
export { Subtract, SetComplement, SetDifference } from "./utils/utilities.js"; | ||
export { useMsal } from "./hooks/useMsal.js"; | ||
export { useAccount } from "./hooks/useAccount.js"; | ||
export { useIsAuthenticated } from "./hooks/useIsAuthenticated.js"; | ||
export { useMsalAuthentication } from "./hooks/useMsalAuthentication.js"; | ||
export { version } from "./packageMetadata.js"; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ export { MsalConsumer, MsalContext } from './MsalContext.js'; |
@@ -0,0 +0,0 @@ import * as React from "react"; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import * as React from 'react'; |
@@ -0,0 +0,0 @@ import React, { PropsWithChildren } from "react"; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import React__default, { useEffect, useMemo, useReducer } from 'react'; |
export declare const name = "@azure/msal-react"; | ||
export declare const version = "2.0.22"; | ||
export declare const version = "2.1.0"; |
@@ -1,8 +0,8 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
/* eslint-disable header/header */ | ||
const name = "@azure/msal-react"; | ||
const version = "2.0.22"; | ||
const version = "2.1.0"; | ||
export { name, version }; | ||
//# sourceMappingURL=packageMetadata.js.map |
import { AccountInfo } from "@azure/msal-browser"; | ||
export type AccountIdentifiers = Partial<Pick<AccountInfo, "homeAccountId" | "localAccountId" | "username">>; |
/// <reference types="react" /> | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers.js"; | ||
import { AccountInfo } from "@azure/msal-browser"; | ||
@@ -4,0 +4,0 @@ type FaaCFunction = <T>(args: T) => React.ReactNode; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-react v2.0.22 2024-07-23 */ | ||
/*! @azure/msal-react v2.1.0 2024-09-20 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /* |
{ | ||
"name": "@azure/msal-react", | ||
"version": "2.0.22", | ||
"version": "2.1.0", | ||
"author": { | ||
@@ -18,6 +18,13 @@ "name": "Microsoft", | ||
"types": "dist/index.d.ts", | ||
"main": "lib/msal-react.cjs", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"require": { | ||
"types": "./lib/types/index.d.ts", | ||
"default": "./lib/msal-react.cjs" | ||
} | ||
}, | ||
@@ -28,2 +35,3 @@ "./package.json": "./package.json" | ||
"dist", | ||
"lib", | ||
"src" | ||
@@ -53,7 +61,7 @@ ], | ||
"peerDependencies": { | ||
"@azure/msal-browser": "^3.20.0", | ||
"@azure/msal-browser": "^3.24.0", | ||
"react": "^16.8.0 || ^17 || ^18" | ||
}, | ||
"devDependencies": { | ||
"@azure/msal-browser": "^3.20.0", | ||
"@azure/msal-browser": "^3.24.0", | ||
"@microsoft/api-extractor": "^7.43.4", | ||
@@ -75,2 +83,3 @@ "@rollup/plugin-typescript": "^11.1.5", | ||
"ts-jest": "^29.1.0", | ||
"ts-jest-resolver": "^2.0.1", | ||
"tslib": "^2.0.0", | ||
@@ -77,0 +86,0 @@ "typescript": "^4.9.5" |
@@ -12,5 +12,5 @@ /* | ||
} from "@azure/msal-browser"; | ||
import { useMsal } from "./useMsal"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
import { getAccountByIdentifiers } from "../utils/utilities"; | ||
import { useMsal } from "./useMsal.js"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers.js"; | ||
import { getAccountByIdentifiers } from "../utils/utilities.js"; | ||
@@ -17,0 +17,0 @@ function getAccount( |
@@ -7,6 +7,6 @@ /* | ||
import { useMemo } from "react"; | ||
import { useMsal } from "./useMsal"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
import { useMsal } from "./useMsal.js"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers.js"; | ||
import { AccountInfo, InteractionStatus } from "@azure/msal-browser"; | ||
import { getAccountByIdentifiers } from "../utils/utilities"; | ||
import { getAccountByIdentifiers } from "../utils/utilities.js"; | ||
@@ -13,0 +13,0 @@ function isAuthenticated( |
@@ -7,3 +7,3 @@ /* | ||
import { useContext } from "react"; | ||
import { IMsalContext, MsalContext } from "../MsalContext"; | ||
import { IMsalContext, MsalContext } from "../MsalContext.js"; | ||
@@ -10,0 +10,0 @@ /** |
@@ -21,7 +21,7 @@ /* | ||
} from "@azure/msal-browser"; | ||
import { useIsAuthenticated } from "./useIsAuthenticated"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
import { useMsal } from "./useMsal"; | ||
import { useAccount } from "./useAccount"; | ||
import { ReactAuthError } from "../error/ReactAuthError"; | ||
import { useIsAuthenticated } from "./useIsAuthenticated.js"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers.js"; | ||
import { useMsal } from "./useMsal.js"; | ||
import { useAccount } from "./useAccount.js"; | ||
import { ReactAuthError } from "../error/ReactAuthError.js"; | ||
@@ -28,0 +28,0 @@ export type MsalAuthenticationResult = { |
@@ -11,26 +11,26 @@ /* | ||
export type { IMsalContext } from "./MsalContext"; | ||
export type { MsalProviderProps } from "./MsalProvider"; | ||
export type { MsalAuthenticationResult } from "./hooks/useMsalAuthentication"; | ||
export type { MsalAuthenticationProps } from "./components/MsalAuthenticationTemplate"; | ||
export type { AuthenticatedTemplateProps } from "./components/AuthenticatedTemplate"; | ||
export type { UnauthenticatedTemplateProps } from "./components/UnauthenticatedTemplate"; | ||
export type { WithMsalProps } from "./components/withMsal"; | ||
export type { AccountIdentifiers } from "./types/AccountIdentifiers"; | ||
export type { IMsalContext } from "./MsalContext.js"; | ||
export type { MsalProviderProps } from "./MsalProvider.js"; | ||
export type { MsalAuthenticationResult } from "./hooks/useMsalAuthentication.js"; | ||
export type { MsalAuthenticationProps } from "./components/MsalAuthenticationTemplate.js"; | ||
export type { AuthenticatedTemplateProps } from "./components/AuthenticatedTemplate.js"; | ||
export type { UnauthenticatedTemplateProps } from "./components/UnauthenticatedTemplate.js"; | ||
export type { WithMsalProps } from "./components/withMsal.js"; | ||
export type { AccountIdentifiers } from "./types/AccountIdentifiers.js"; | ||
export { MsalContext, MsalConsumer } from "./MsalContext"; | ||
export { MsalProvider } from "./MsalProvider"; | ||
export { MsalContext, MsalConsumer } from "./MsalContext.js"; | ||
export { MsalProvider } from "./MsalProvider.js"; | ||
export { AuthenticatedTemplate } from "./components/AuthenticatedTemplate"; | ||
export { UnauthenticatedTemplate } from "./components/UnauthenticatedTemplate"; | ||
export { MsalAuthenticationTemplate } from "./components/MsalAuthenticationTemplate"; | ||
export { AuthenticatedTemplate } from "./components/AuthenticatedTemplate.js"; | ||
export { UnauthenticatedTemplate } from "./components/UnauthenticatedTemplate.js"; | ||
export { MsalAuthenticationTemplate } from "./components/MsalAuthenticationTemplate.js"; | ||
export { withMsal } from "./components/withMsal"; | ||
export { Subtract, SetComplement, SetDifference } from "./utils/utilities"; | ||
export { withMsal } from "./components/withMsal.js"; | ||
export { Subtract, SetComplement, SetDifference } from "./utils/utilities.js"; | ||
export { useMsal } from "./hooks/useMsal"; | ||
export { useAccount } from "./hooks/useAccount"; | ||
export { useIsAuthenticated } from "./hooks/useIsAuthenticated"; | ||
export { useMsalAuthentication } from "./hooks/useMsalAuthentication"; | ||
export { useMsal } from "./hooks/useMsal.js"; | ||
export { useAccount } from "./hooks/useAccount.js"; | ||
export { useIsAuthenticated } from "./hooks/useIsAuthenticated.js"; | ||
export { useMsalAuthentication } from "./hooks/useMsalAuthentication.js"; | ||
export { version } from "./packageMetadata"; | ||
export { version } from "./packageMetadata.js"; |
/* eslint-disable header/header */ | ||
export const name = "@azure/msal-react"; | ||
export const version = "2.0.22"; | ||
export const version = "2.1.0"; |
@@ -6,3 +6,3 @@ /* | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers.js"; | ||
import { AccountInfo } from "@azure/msal-browser"; | ||
@@ -9,0 +9,0 @@ |
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
153262
50.29%79
29.51%2596
43.43%20
5.26%