@entur-partner/app-shell 4.0.0 → 5.0.1-alpha.0
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/dist/AppShell.d.ts +4 -4
- package/dist/EnvironmentBanner.d.ts +3 -2
- package/dist/OrganisationSelector.d.ts +1 -1
- package/dist/UserTypes.d.ts +2 -2
- package/dist/app-shell.cjs.development.js +419 -787
- package/dist/app-shell.cjs.development.js.map +1 -1
- package/dist/app-shell.cjs.production.min.js +1 -1
- package/dist/app-shell.cjs.production.min.js.map +1 -1
- package/dist/app-shell.esm.js +420 -787
- package/dist/app-shell.esm.js.map +1 -1
- package/package.json +8 -6
- package/dist/Auth.d.ts +0 -21
- package/dist/authReducer.d.ts +0 -28
package/dist/AppShell.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { GetTokenSilentlyOptions } from '@auth0/auth0-
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { GetTokenSilentlyOptions, Auth0ContextInterface } from '@auth0/auth0-react';
|
|
3
3
|
import { User } from '@entur-partner/micro-frontend';
|
|
4
4
|
import { Environment } from '@entur-partner/common';
|
|
5
5
|
import { DecorateUserFn } from './UserTypes';
|
|
6
6
|
export interface AppShellValues {
|
|
7
|
-
logout:
|
|
7
|
+
logout: Auth0ContextInterface['logout'];
|
|
8
8
|
user: User;
|
|
9
9
|
getToken(options?: GetTokenSilentlyOptions): Promise<string>;
|
|
10
10
|
}
|
|
@@ -17,4 +17,4 @@ export interface AppShellProps {
|
|
|
17
17
|
redirectUri?: string;
|
|
18
18
|
environment?: Environment;
|
|
19
19
|
}
|
|
20
|
-
export declare const AppShell: ({ children, audience, domain, clientId,
|
|
20
|
+
export declare const AppShell: ({ children, audience, domain, clientId, decorateUser, environment, }: AppShellProps) => React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { Environment } from '@entur-partner/common';
|
|
2
|
-
|
|
3
|
+
type EnvironmentBannerProps = {
|
|
3
4
|
environment: Exclude<Environment, Environment.Production>;
|
|
4
5
|
};
|
|
5
|
-
export declare const EnvironmentBanner: ({ environment }: EnvironmentBannerProps) => JSX.Element;
|
|
6
|
+
export declare const EnvironmentBanner: ({ environment }: EnvironmentBannerProps) => React.JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { GetTokenSilentlyOptions } from '@auth0/auth0-spa-js';
|
|
3
|
-
export
|
|
3
|
+
export type GetOrganisationsFn = (token: string) => Promise<Organisation[]>;
|
|
4
4
|
export interface Organisation {
|
|
5
5
|
name: string;
|
|
6
6
|
id: string;
|
package/dist/UserTypes.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { User } from '@entur-partner/micro-frontend';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type Auth0User = Omit<User, 'permissions' | 'enturPartnerPermissions'>;
|
|
3
|
+
export type DecorateUserFn = (user: Auth0User, token: string) => Promise<User>;
|