@interopio/home-ui-react 1.2.4 → 1.2.5

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.
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
2
  import { IOConnectInitSettings } from '@interopio/react-hooks';
3
- import { Auth0ProviderOptions } from '@auth0/auth0-react';
3
+ import { Auth0ProviderOptions, User as Auth0BaseUser } from '@auth0/auth0-react';
4
4
  import { WorkspacesProps } from '@interopio/workspaces-ui-react';
5
5
  import { LoginPageComponents } from '../login/types';
6
6
  import { LaunchpadComponents } from '../launchpad/types';
7
7
  import { WorkspaceLogoProps } from '../home-app-workspace';
8
+ import { AUTH0_LOGIN_TYPES } from '../../constants/auth0LoginTypes';
8
9
  export interface User {
9
10
  id: string;
10
11
  username?: string;
@@ -12,6 +13,11 @@ export interface User {
12
13
  firstName?: string;
13
14
  lastName?: string;
14
15
  avatarUrl?: string;
16
+ token?: string;
17
+ password?: string;
18
+ }
19
+ export interface Auth0User extends Auth0BaseUser {
20
+ token: string;
15
21
  }
16
22
  export interface SetupFlowSettings {
17
23
  edgeNotificationsPermissionTimeout?: number;
@@ -32,8 +38,10 @@ export interface LaunchpadConfig {
32
38
  components?: LaunchpadComponents;
33
39
  }
34
40
  export type Auth0LoginProviderOptions = Auth0ProviderOptions;
41
+ export type LoginType = (typeof AUTH0_LOGIN_TYPES)[keyof typeof AUTH0_LOGIN_TYPES];
35
42
  export interface Auth0LoginConfig {
36
43
  type: 'auth0';
44
+ loginType?: LoginType;
37
45
  providerOptions: Auth0LoginProviderOptions;
38
46
  components?: LoginPageComponents;
39
47
  }
@@ -46,7 +54,7 @@ export interface SimpleLoginConfig {
46
54
  }
47
55
  export type LoginConfig = Auth0LoginConfig | SimpleLoginConfig;
48
56
  export interface IOConnectHomeConfig {
49
- ioConnectConfig: IOConnectInitSettings;
57
+ getIOConnectConfig: (user: Auth0User | User) => IOConnectInitSettings;
50
58
  login?: LoginConfig;
51
59
  setupFlow?: SetupFlowConfig;
52
60
  workspaces?: WorkspacesConfig;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ interface LoginPageContainerProps {
3
+ Logo: React.ComponentType;
4
+ children?: React.ReactNode;
5
+ className?: string;
6
+ }
7
+ export declare const LoginPageContainer: ({ Logo, children, className }: LoginPageContainerProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default LoginPageContainer;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@interopio/home-ui-react",
3
3
  "description": "React components for building a Home App for io.Connect Browser.",
4
- "version": "1.2.4",
4
+ "version": "1.2.5",
5
5
  "main": "./index.js",
6
6
  "module": "./index.mjs",
7
7
  "types": "./index.d.ts",
@@ -1,2 +0,0 @@
1
- import { IOConnectInitSettings } from '@interopio/react-hooks';
2
- export declare const getIOConnectProviderSettings: (ioConnectConfig: IOConnectInitSettings, userId: string, token?: string) => IOConnectInitSettings;