@interopio/home-ui-react 1.3.1 → 1.4.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/constants/storageKeys.d.ts +2 -0
- package/decoders/platform.d.ts +5 -0
- package/executors/setupStepsActions.d.ts +3 -0
- package/executors/types.d.ts +6 -0
- package/hooks/index.d.ts +2 -0
- package/hooks/useBeforeunload.d.ts +1 -1
- package/hooks/useIsHomeLoaded.d.ts +1 -0
- package/hooks/usePlatformWindow.d.ts +5 -0
- package/index.css +1 -1
- package/index.d.ts +1 -1
- package/index.js +19 -11
- package/index.js.map +1 -1
- package/index.mjs +6744 -6364
- package/index.mjs.map +1 -1
- package/lib/home-app-workspace/home-app-workspace.d.ts +5 -1
- package/lib/home-app-workspace/no-logo.d.ts +2 -0
- package/lib/home-app-workspace/types.d.ts +3 -0
- package/lib/icon-components/index.d.ts +3 -1
- package/lib/icon-components/popups-icon.d.ts +2 -0
- package/lib/icon-components/pwa-install-icon.d.ts +2 -0
- package/lib/icon-components/window-management-icon.d.ts +2 -0
- package/lib/io-connect-home/no-login-home.d.ts +8 -2
- package/lib/io-connect-home/types.d.ts +17 -2
- package/lib/io-connect-home-provider/io-connect-home-provider.d.ts +6 -4
- package/lib/io-connect-home-provider/types.d.ts +5 -2
- package/lib/login/auth0/auth0-login-page.d.ts +7 -3
- package/lib/login/constants.d.ts +1 -1
- package/lib/login/index.d.ts +0 -1
- package/lib/login/simple/simple-login-page.d.ts +7 -3
- package/lib/platform-setup/constants.d.ts +12 -0
- package/lib/platform-setup/platform-setup.d.ts +16 -0
- package/lib/platform-setup/reducers.d.ts +7 -0
- package/lib/platform-setup/setup-steps-list.d.ts +8 -0
- package/lib/platform-setup/setup-steps.d.ts +7 -0
- package/lib/platform-setup/types.d.ts +33 -0
- package/lib/spinner/index.d.ts +1 -0
- package/lib/spinner/spinner.d.ts +2 -0
- package/lib/system-loader/system-loader.d.ts +7 -0
- package/package.json +1 -1
- package/lib/icon-components/window-placement-icon.d.ts +0 -2
- package/lib/loader/index.d.ts +0 -1
- package/lib/loader/loader.d.ts +0 -2
- package/lib/login/logout-page.d.ts +0 -7
- package/lib/login/verifying-credentials.d.ts +0 -1
- package/lib/permissions-setup/constants.d.ts +0 -7
- package/lib/permissions-setup/permissions-list.d.ts +0 -7
- package/lib/permissions-setup/permissions-setup-flow.d.ts +0 -7
- package/lib/permissions-setup/permissions-setup.d.ts +0 -13
- package/lib/permissions-setup/permissions-steps.d.ts +0 -7
- package/lib/permissions-setup/something-went-wrong.d.ts +0 -5
- package/lib/permissions-setup/types.d.ts +0 -12
- package/lib/permissions-setup/unsuccessful-setup.d.ts +0 -6
- /package/lib/{permissions-setup → platform-setup}/use-edge-notifications-permission.d.ts +0 -0
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { User, WorkspacesConfig, LaunchpadConfig } from '../io-connect-home/types';
|
|
2
3
|
interface HomeAppWorkspaceProps {
|
|
3
4
|
onLogout?: () => void;
|
|
4
5
|
user?: User | null;
|
|
5
6
|
workspaces?: WorkspacesConfig;
|
|
6
7
|
launchpad?: LaunchpadConfig;
|
|
8
|
+
Loader?: React.ComponentType<{
|
|
9
|
+
text?: string;
|
|
10
|
+
}>;
|
|
7
11
|
}
|
|
8
|
-
export declare const HomeAppWorkspace: ({ onLogout, user, workspaces, launchpad }: HomeAppWorkspaceProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const HomeAppWorkspace: ({ onLogout, user, workspaces, launchpad, Loader }: HomeAppWorkspaceProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
13
|
export {};
|
|
@@ -2,7 +2,9 @@ export * from './browser-notifications-icon';
|
|
|
2
2
|
export * from './google-chrome-icon';
|
|
3
3
|
export * from './microsoft-edge-icon';
|
|
4
4
|
export * from './opera-icon';
|
|
5
|
+
export * from './popups-icon';
|
|
6
|
+
export * from './pwa-install-icon';
|
|
5
7
|
export * from './reopen-prompt-icon';
|
|
6
8
|
export * from './start-failed-icon';
|
|
7
9
|
export * from './warning-icon';
|
|
8
|
-
export * from './window-
|
|
10
|
+
export * from './window-management-icon';
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { CustomLoginConfig, IOConnectHomeConfig } from './types';
|
|
2
|
+
interface NoLoginHomeProps {
|
|
3
|
+
config: IOConnectHomeConfig & {
|
|
4
|
+
login?: CustomLoginConfig;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export declare const NoLoginHome: ({ config }: NoLoginHomeProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -15,6 +15,10 @@ export interface User {
|
|
|
15
15
|
token?: string;
|
|
16
16
|
password?: string;
|
|
17
17
|
}
|
|
18
|
+
export interface CustomUser {
|
|
19
|
+
id: string;
|
|
20
|
+
username: string;
|
|
21
|
+
}
|
|
18
22
|
export interface Auth0User extends Auth0BaseUser {
|
|
19
23
|
token: string;
|
|
20
24
|
}
|
|
@@ -59,13 +63,24 @@ export interface SimpleLoginConfig {
|
|
|
59
63
|
userInputName?: string;
|
|
60
64
|
components?: LoginPageComponents;
|
|
61
65
|
}
|
|
62
|
-
export
|
|
66
|
+
export interface CustomLoginConfig {
|
|
67
|
+
type: 'custom';
|
|
68
|
+
onLogout: () => void;
|
|
69
|
+
user: CustomUser;
|
|
70
|
+
}
|
|
71
|
+
export type LoginConfig = Auth0LoginConfig | SimpleLoginConfig | CustomLoginConfig;
|
|
72
|
+
export type IOConnectHomeComponents = {
|
|
73
|
+
SystemLoader?: React.ComponentType<{
|
|
74
|
+
text?: string;
|
|
75
|
+
}>;
|
|
76
|
+
};
|
|
63
77
|
export interface IOConnectHomeConfig {
|
|
64
|
-
getIOConnectConfig: (user?: Auth0User | User) => IOConnectInitSettings;
|
|
78
|
+
getIOConnectConfig: (user?: Auth0User | User | CustomUser) => IOConnectInitSettings;
|
|
65
79
|
login?: LoginConfig;
|
|
66
80
|
setupFlow?: SetupFlowConfig;
|
|
67
81
|
workspaces?: WorkspacesConfig;
|
|
68
82
|
launchpad?: LaunchpadConfig;
|
|
83
|
+
components?: IOConnectHomeComponents;
|
|
69
84
|
}
|
|
70
85
|
export interface IOConnectHomeProps {
|
|
71
86
|
config: IOConnectHomeConfig;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
2
|
+
import type { HomePermissionStatuses } from './types';
|
|
3
3
|
interface IOConnectHomeProviderProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
}
|
|
6
6
|
export declare const useIOConnectHome: () => {
|
|
7
7
|
permission: {
|
|
8
|
-
isDenied: boolean;
|
|
9
8
|
isLoading: boolean;
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
statuses: HomePermissionStatuses;
|
|
10
|
+
};
|
|
11
|
+
login: {
|
|
12
|
+
isLoggingOut: boolean;
|
|
13
|
+
setIsLoggingOut: React.Dispatch<React.SetStateAction<boolean>>;
|
|
12
14
|
};
|
|
13
15
|
};
|
|
14
16
|
export declare const IOConnectHomeProvider: ({ children }: IOConnectHomeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { PERMISSION_NAMES } from './constants';
|
|
2
|
-
export type
|
|
2
|
+
export type PermissionName = (typeof PERMISSION_NAMES)[keyof typeof PERMISSION_NAMES];
|
|
3
3
|
export type HomePermissionStatus = PermissionStatus & {
|
|
4
|
-
stableName:
|
|
4
|
+
stableName: PermissionName;
|
|
5
5
|
};
|
|
6
|
+
export type HomePermissionStatuses = Record<PermissionName, {
|
|
7
|
+
state: PermissionState;
|
|
8
|
+
}>;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { LoginPageComponents } from '../types';
|
|
2
3
|
import { Auth0ValidationError } from '../../io-connect-home/types';
|
|
3
4
|
export interface Auth0LoginPageProps {
|
|
4
|
-
className?: string;
|
|
5
5
|
onLogin: () => void;
|
|
6
6
|
isLoading: boolean;
|
|
7
|
-
components?: LoginPageComponents;
|
|
8
7
|
validationError: Auth0ValidationError | null;
|
|
8
|
+
components?: LoginPageComponents & {
|
|
9
|
+
Loader?: React.ComponentType<{
|
|
10
|
+
text?: string;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
9
13
|
}
|
|
10
|
-
export declare const Auth0LoginPage: ({
|
|
14
|
+
export declare const Auth0LoginPage: ({ onLogin, isLoading, validationError, components: { Logo, Heading, Loader }, }: Auth0LoginPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
15
|
export default Auth0LoginPage;
|
package/lib/login/constants.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LOGO_WIDTH = "
|
|
1
|
+
export declare const LOGO_WIDTH = "200px";
|
package/lib/login/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { LoginPageComponents } from '../types';
|
|
2
3
|
export interface SimpleLoginPageProps {
|
|
3
|
-
className?: string;
|
|
4
4
|
onLogin: (user: string, password: string) => Promise<void>;
|
|
5
5
|
userInputName?: string;
|
|
6
|
-
components?: LoginPageComponents
|
|
6
|
+
components?: LoginPageComponents & {
|
|
7
|
+
Loader?: React.ComponentType<{
|
|
8
|
+
text?: string;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
7
11
|
}
|
|
8
|
-
export declare const SimpleLoginPage: ({
|
|
12
|
+
export declare const SimpleLoginPage: ({ onLogin, userInputName, components: { Logo, Heading, Loader }, }: SimpleLoginPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SetupStep, SetupStepsStatuses } from './types';
|
|
2
|
+
export declare const DEFAULT_SETTINGS: {
|
|
3
|
+
edgeNotificationsPermissionTimeout: number;
|
|
4
|
+
};
|
|
5
|
+
export declare const SETUP_STEPS_NAMES: {
|
|
6
|
+
readonly WINDOW_MANAGEMENT: "window-management";
|
|
7
|
+
readonly NOTIFICATIONS: "notifications";
|
|
8
|
+
readonly POPUPS: "popups";
|
|
9
|
+
readonly PWA_INSTALL: "pwa-install";
|
|
10
|
+
};
|
|
11
|
+
export declare const SETUP_STEPS: SetupStep[];
|
|
12
|
+
export declare const INITIAL_STEPS_STATUSES: SetupStepsStatuses;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface PlatformSetupProps {
|
|
3
|
+
components?: {
|
|
4
|
+
Logo?: React.ComponentType<{
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
|
7
|
+
Loader?: React.ComponentType<{
|
|
8
|
+
text?: string;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
11
|
+
settings?: {
|
|
12
|
+
edgeNotificationsPermissionTimeout?: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const PlatformSetup: ({ components: { Logo, Loader }, settings, }: PlatformSetupProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default PlatformSetup;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SetupStepReducerAction, SetupStepsStatuses } from './types';
|
|
2
|
+
export declare const setupStepsReducer: (stepsState: SetupStepsStatuses, action: SetupStepReducerAction) => {
|
|
3
|
+
"window-management": import("./types").SetupStepStatus;
|
|
4
|
+
notifications: import("./types").SetupStepStatus;
|
|
5
|
+
popups: import("./types").SetupStepStatus;
|
|
6
|
+
"pwa-install": import("./types").SetupStepStatus;
|
|
7
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SetupStepName, SetupStepsStatuses } from './types';
|
|
2
|
+
interface SetupStepsListProps {
|
|
3
|
+
activeStepName: SetupStepName;
|
|
4
|
+
showWarnIcon: boolean;
|
|
5
|
+
stepsStatuses: SetupStepsStatuses;
|
|
6
|
+
}
|
|
7
|
+
export declare const SetupStepsList: ({ activeStepName, showWarnIcon, stepsStatuses }: SetupStepsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default SetupStepsList;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SETUP_STEPS_NAMES } from './constants';
|
|
3
|
+
export type SetupStepName = (typeof SETUP_STEPS_NAMES)[keyof typeof SETUP_STEPS_NAMES];
|
|
4
|
+
type SetupStepState = 'prompt' | 'granted' | 'denied';
|
|
5
|
+
export type SetupStepStatus = {
|
|
6
|
+
isCompleted: boolean;
|
|
7
|
+
state: SetupStepState;
|
|
8
|
+
};
|
|
9
|
+
export type SetupStepsStatuses = Record<SetupStepName, SetupStepStatus>;
|
|
10
|
+
type SetupStepReducerActionType = 'completed' | 'skipped' | 'stateUpdated';
|
|
11
|
+
export interface SetupStepReducerAction {
|
|
12
|
+
type: SetupStepReducerActionType;
|
|
13
|
+
payload: {
|
|
14
|
+
stepName: SetupStepName;
|
|
15
|
+
state?: SetupStepState;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface SetupStep {
|
|
19
|
+
name: SetupStepName;
|
|
20
|
+
label: string;
|
|
21
|
+
heading: string;
|
|
22
|
+
description: string;
|
|
23
|
+
instructions: {
|
|
24
|
+
initial: string;
|
|
25
|
+
additional?: string;
|
|
26
|
+
};
|
|
27
|
+
Image: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
|
|
28
|
+
actionBtnText: string;
|
|
29
|
+
}
|
|
30
|
+
export interface PlatformSetupStatus {
|
|
31
|
+
isCompleted: boolean;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './spinner';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface SystemLoaderProps {
|
|
3
|
+
Logo?: React.ComponentType;
|
|
4
|
+
text?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const SystemLoader: ({ Logo, text }: SystemLoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SystemLoader;
|
package/package.json
CHANGED
package/lib/loader/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './loader';
|
package/lib/loader/loader.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { LoginPageComponents } from './types';
|
|
2
|
-
interface LogoutPageProps {
|
|
3
|
-
components?: LoginPageComponents;
|
|
4
|
-
className?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const LogoutPage: ({ components, className }: LogoutPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default LogoutPage;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const VerifyingCredentials: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { PermissionStep } from './types';
|
|
2
|
-
export declare const NOTIFICATIONS_PERMISSION_STEP: PermissionStep;
|
|
3
|
-
export declare const WINDOW_MANAGEMENT_PERMISSION_STEP: PermissionStep;
|
|
4
|
-
export declare const PERMISSION_STEPS: Record<string, PermissionStep>;
|
|
5
|
-
export declare const DEFAULT_SETTINGS: {
|
|
6
|
-
edgeNotificationsPermissionTimeout: number;
|
|
7
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { HomePermissionStatus } from '../io-connect-home-provider/types';
|
|
2
|
-
interface PermissionsListProps {
|
|
3
|
-
isActiveItem?: (name: string) => boolean;
|
|
4
|
-
permissionStatuses: HomePermissionStatus[];
|
|
5
|
-
}
|
|
6
|
-
export declare const PermissionsList: ({ isActiveItem, permissionStatuses }: PermissionsListProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export default PermissionsList;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface PermissionsSetupProps {
|
|
3
|
-
components?: {
|
|
4
|
-
Logo?: React.ComponentType<{
|
|
5
|
-
className?: string;
|
|
6
|
-
}>;
|
|
7
|
-
};
|
|
8
|
-
settings?: {
|
|
9
|
-
edgeNotificationsPermissionTimeout?: number;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export declare const PermissionsSetup: ({ components: { Logo }, settings }: PermissionsSetupProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export default PermissionsSetup;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface PermissionStep {
|
|
3
|
-
heading: string;
|
|
4
|
-
description: string;
|
|
5
|
-
guidelines: Record<string, string>;
|
|
6
|
-
label: string;
|
|
7
|
-
Image?: React.ComponentType;
|
|
8
|
-
openPermissionsPrompt: (options: {
|
|
9
|
-
handleDeferredPermission: () => void;
|
|
10
|
-
handlePermissionsPromptClose: () => void;
|
|
11
|
-
}) => void;
|
|
12
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { PermissionNames } from '../io-connect-home-provider/types';
|
|
2
|
-
interface UnsuccessfulSetupProps {
|
|
3
|
-
deniedPermissionName?: PermissionNames;
|
|
4
|
-
}
|
|
5
|
-
export declare const UnsuccessfulSetup: ({ deniedPermissionName }: UnsuccessfulSetupProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export default UnsuccessfulSetup;
|
|
File without changes
|