@frontegg/types 4.39.1 → 4.39.2-dashboard
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/Common.d.ts +3 -0
- package/ContextOptions.d.ts +5 -1
- package/FronteggAppInstance.d.ts +1 -0
- package/FronteggAppOptions.d.ts +4 -4
- package/FronteggMetadata.d.ts +2 -0
- package/Localizations/AdminPortalLocalizations/security.d.ts +4 -0
- package/Localizations/LocalizationOverrides.d.ts +1 -0
- package/Localizations/LocalizationType.d.ts +1 -0
- package/Localizations/LoginBoxLocalization/acceptInvitation.d.ts +4 -0
- package/Localizations/LoginBoxLocalization/activateAccount.d.ts +4 -0
- package/Localizations/LoginBoxLocalization/forgetPassword.d.ts +8 -0
- package/Localizations/LoginBoxLocalization/index.d.ts +8 -0
- package/Localizations/LoginBoxLocalization/login.d.ts +28 -0
- package/Localizations/LoginBoxLocalization/resetPassword.d.ts +8 -0
- package/Localizations/LoginBoxLocalization/signup.d.ts +8 -0
- package/Metadata/index.d.ts +1 -1
- package/ThemeOptions/ComponentsOptions.d.ts +63 -0
- package/ThemeOptions/LoginBoxTheme/AcceptInvitationTheme.d.ts +21 -0
- package/ThemeOptions/LoginBoxTheme/ActivateAccountPageTheme.d.ts +52 -0
- package/ThemeOptions/LoginBoxTheme/CustomLoginComponents.d.ts +12 -0
- package/ThemeOptions/LoginBoxTheme/ForgotPasswordTheme.d.ts +46 -0
- package/ThemeOptions/LoginBoxTheme/LoaderTheme.d.ts +7 -0
- package/ThemeOptions/LoginBoxTheme/LoginBoxCommon.d.ts +148 -0
- package/ThemeOptions/LoginBoxTheme/LoginPageTheme.d.ts +119 -0
- package/ThemeOptions/LoginBoxTheme/ResetPasswordTheme.d.ts +48 -0
- package/ThemeOptions/LoginBoxTheme/SignupPageTheme.d.ts +46 -0
- package/ThemeOptions/LoginBoxTheme/SocialLoginsTheme.d.ts +36 -0
- package/ThemeOptions/LoginBoxTheme/index.d.ts +51 -0
- package/ThemeOptions/LoginBoxThemeOptions.d.ts +3 -8
- package/ThemeOptions/helpers.d.ts +0 -0
- package/ThemeOptions/index.d.ts +6 -190
- package/index.js +6 -197
- package/node/index.js +6 -197
- package/package.json +2 -2
package/Common.d.ts
CHANGED
package/ContextOptions.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { KeyValuePair, LogLevel } from '@frontegg/rest-api
|
|
1
|
+
import { KeyValuePair, LogLevel } from '@frontegg/rest-api';
|
|
2
2
|
export interface ContextOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Backend API baseUrl, visit https://portal.frontegg.com/administration/domain to get your Frontegg baseUrl
|
|
5
5
|
*/
|
|
6
6
|
baseUrl: string;
|
|
7
|
+
/**
|
|
8
|
+
* Frontegg clientId. Identifier from your Frontegg workspace account.
|
|
9
|
+
*/
|
|
10
|
+
clientId?: string;
|
|
7
11
|
/**
|
|
8
12
|
* Whether or not to send Fetch request with Credentials to the Backend
|
|
9
13
|
* default: 'include'
|
package/FronteggAppInstance.d.ts
CHANGED
package/FronteggAppOptions.d.ts
CHANGED
|
@@ -9,10 +9,6 @@ export interface FronteggAppOptions extends FronteggStoreOptions {
|
|
|
9
9
|
withCompanyName?: boolean;
|
|
10
10
|
contextOptions: ContextOptions;
|
|
11
11
|
themeOptions?: FronteggThemeOptions;
|
|
12
|
-
/**
|
|
13
|
-
* Authentication header logo image
|
|
14
|
-
* @deprecated, use components.authPage.headerImage
|
|
15
|
-
*/
|
|
16
12
|
headerImage?: string;
|
|
17
13
|
/**
|
|
18
14
|
* Authentication background logo image
|
|
@@ -60,6 +56,10 @@ export interface FronteggAppOptions extends FronteggStoreOptions {
|
|
|
60
56
|
* Option to open admin portal as Preview mode without HTTP requests for demo mode purpose
|
|
61
57
|
*/
|
|
62
58
|
previewMode?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Option to display login box as Preview mode without HTTP requests for builder customization mode purpose
|
|
61
|
+
*/
|
|
62
|
+
builderMode?: boolean;
|
|
63
63
|
/**
|
|
64
64
|
* Connect AdminPortal redirects with the wrapper application router
|
|
65
65
|
*/
|
package/FronteggMetadata.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PaletteColorOptions, PaletteGreyOptions } from './ThemeOptions/Palette';
|
|
2
|
+
import { FronteggThemeOptions } from './ThemeOptions';
|
|
2
3
|
declare type PageMetadata = {
|
|
3
4
|
visibility: 'hidden' | 'always' | 'byPermissions';
|
|
4
5
|
featureFlag?: string;
|
|
@@ -72,6 +73,7 @@ declare type ThemeMetadata = {
|
|
|
72
73
|
};
|
|
73
74
|
export declare type FronteggMetadata = {
|
|
74
75
|
theme?: ThemeMetadata;
|
|
76
|
+
themeV2?: FronteggThemeOptions;
|
|
75
77
|
navigation?: NavigationMetadata;
|
|
76
78
|
};
|
|
77
79
|
export declare type RolePermission = 'fe.connectivity.*' | 'fe.connectivity.delete.*' | 'fe.connectivity.delete.bellNotifications' | 'fe.connectivity.delete.emailConfig' | 'fe.connectivity.delete.slackAppRegistration' | 'fe.connectivity.delete.slackSubscriptionEvent' | 'fe.connectivity.delete.slackSubscriptions' | 'fe.connectivity.delete.smsConfig' | 'fe.connectivity.delete.webhook' | 'fe.connectivity.read.*' | 'fe.connectivity.read.emailConfig' | 'fe.connectivity.read.eventCategories' | 'fe.connectivity.read.events' | 'fe.connectivity.read.slackApp' | 'fe.connectivity.read.slackChannels' | 'fe.connectivity.read.slackSubscriptions' | 'fe.connectivity.read.slackUsers' | 'fe.connectivity.read.smsConfig' | 'fe.connectivity.read.userBellNotifications' | 'fe.connectivity.read.webhookLogs' | 'fe.connectivity.read.webhooks' | 'fe.connectivity.write.*' | 'fe.connectivity.write.emailConfig' | 'fe.connectivity.write.sendWebpushNotification' | 'fe.connectivity.write.slackAppRegistration' | 'fe.connectivity.write.slackSubscriptions' | 'fe.connectivity.write.smsConfig' | 'fe.connectivity.write.subscribeWebpush' | 'fe.connectivity.write.triggerEvent' | 'fe.connectivity.write.updateSlackSubscription' | 'fe.connectivity.write.updateUserBellNotification' | 'fe.connectivity.write.webhook' | 'fe.secure.*' | 'fe.secure.delete.*' | 'fe.secure.delete.role' | 'fe.secure.delete.samlConfiguration' | 'fe.secure.delete.securityPolicy' | 'fe.secure.delete.tenantApiTokens' | 'fe.secure.delete.userApiTokens' | 'fe.secure.delete.users' | 'fe.secure.delete.usersRoles' | 'fe.secure.read.*' | 'fe.secure.read.permissions' | 'fe.secure.read.roles' | 'fe.secure.read.samlConfiguration' | 'fe.secure.read.securityPolicy' | 'fe.secure.read.tenantApiTokens' | 'fe.secure.read.userApiTokens' | 'fe.secure.read.users' | 'fe.secure.write.*' | 'fe.secure.write.resendActivationEmail' | 'fe.secure.write.roles' | 'fe.secure.write.samlConfiguration' | 'fe.secure.write.securityPolicy' | 'fe.secure.write.tenantApiTokens' | 'fe.secure.write.updateRole' | 'fe.secure.write.updateUser' | 'fe.secure.write.userApiTokens' | 'fe.secure.write.users' | 'fe.secure.write.usersRoles' | 'fe.subscriptions.*' | 'fe.subscriptions.read.*' | 'fe.subscriptions.write.*' | 'fe.account-settings.delete.account';
|
|
@@ -125,6 +125,10 @@ export interface SecurityLocalization {
|
|
|
125
125
|
* Max attempts before lockout user input placeholder
|
|
126
126
|
*/
|
|
127
127
|
attemptsInputPlaceholder: string;
|
|
128
|
+
/**
|
|
129
|
+
* Max attempts before lockout user input error message
|
|
130
|
+
*/
|
|
131
|
+
attemptsInputErrorMessage: string;
|
|
128
132
|
/**
|
|
129
133
|
* Cancel editing lockout policy button text
|
|
130
134
|
*/
|
|
@@ -3,6 +3,14 @@ export interface ForgetPasswordLocalization {
|
|
|
3
3
|
* strings in forget password page
|
|
4
4
|
*/
|
|
5
5
|
forgetPassword: {
|
|
6
|
+
/**
|
|
7
|
+
* Forget password page title
|
|
8
|
+
*/
|
|
9
|
+
title: string;
|
|
10
|
+
/**
|
|
11
|
+
* Text displayed in forget password form before email input
|
|
12
|
+
*/
|
|
13
|
+
description: string;
|
|
6
14
|
/**
|
|
7
15
|
* Forget password form email input label
|
|
8
16
|
*/
|
|
@@ -6,4 +6,12 @@ import { SocialLoginsLocalization } from './socialLogins';
|
|
|
6
6
|
import { AcceptInvitationLocalization } from './acceptInvitation';
|
|
7
7
|
import { ActivateAccountLocalization } from './activateAccount';
|
|
8
8
|
import { RecoveryMfaLocalization } from './recoveryMfa';
|
|
9
|
+
export * from './login';
|
|
10
|
+
export * from './signup';
|
|
11
|
+
export * from './forgetPassword';
|
|
12
|
+
export * from './resetPassword';
|
|
13
|
+
export * from './socialLogins';
|
|
14
|
+
export * from './acceptInvitation';
|
|
15
|
+
export * from './activateAccount';
|
|
16
|
+
export * from './recoveryMfa';
|
|
9
17
|
export declare type LoginBoxLocalization = LoginLocalization & SignupLocalization & ForgetPasswordLocalization & ResetPasswordLocalization & SocialLoginsLocalization & AcceptInvitationLocalization & ActivateAccountLocalization & RecoveryMfaLocalization;
|
|
@@ -3,6 +3,10 @@ export interface LoginLocalization {
|
|
|
3
3
|
* strings in login page
|
|
4
4
|
*/
|
|
5
5
|
login: {
|
|
6
|
+
/**
|
|
7
|
+
* Login page title
|
|
8
|
+
*/
|
|
9
|
+
title: string;
|
|
6
10
|
/**
|
|
7
11
|
* Go to signup message in Login page header
|
|
8
12
|
*/
|
|
@@ -56,10 +60,18 @@ export interface LoginLocalization {
|
|
|
56
60
|
* Login page submit button if passwordless, sso or magicLink is enabled
|
|
57
61
|
*/
|
|
58
62
|
continue: string;
|
|
63
|
+
/**
|
|
64
|
+
* String displayed as separator for sign in with social login
|
|
65
|
+
*/
|
|
66
|
+
signInWithSocialLogin: string;
|
|
59
67
|
/**
|
|
60
68
|
* Button text to return to main login page
|
|
61
69
|
*/
|
|
62
70
|
backToLogin: string;
|
|
71
|
+
/**
|
|
72
|
+
* Login with MFA title
|
|
73
|
+
*/
|
|
74
|
+
mfaTitle: string;
|
|
63
75
|
/**
|
|
64
76
|
* Login with MFA six digits input label If MFA is enabled
|
|
65
77
|
*/
|
|
@@ -72,6 +84,14 @@ export interface LoginLocalization {
|
|
|
72
84
|
* Error displayed if MFA code length less than 6 characters
|
|
73
85
|
*/
|
|
74
86
|
mfaCodeLengthAtLeast6: string;
|
|
87
|
+
/**
|
|
88
|
+
* Error displayed if two factor code input is empty
|
|
89
|
+
*/
|
|
90
|
+
twoFactorCodeIsRequired: string;
|
|
91
|
+
/**
|
|
92
|
+
* Error displayed if two code length less than 8 characters
|
|
93
|
+
*/
|
|
94
|
+
twoFactorCodeLengthAtLeast8: string;
|
|
75
95
|
/**
|
|
76
96
|
* text of remember device CheckBox If MFA is enabled
|
|
77
97
|
* EX: "Don't ask again on this device for {{count}} day"
|
|
@@ -85,6 +105,10 @@ export interface LoginLocalization {
|
|
|
85
105
|
* Disable MFA message in MFA section if it's enabled
|
|
86
106
|
*/
|
|
87
107
|
disableMultiFactorMessage: string;
|
|
108
|
+
/**
|
|
109
|
+
* Disable MFA page title after choose to recover mfa from login screen
|
|
110
|
+
*/
|
|
111
|
+
recoverMfaTitle: string;
|
|
88
112
|
/**
|
|
89
113
|
* Disable MFA button click here text in MFA section if it's enabled
|
|
90
114
|
*/
|
|
@@ -97,6 +121,10 @@ export interface LoginLocalization {
|
|
|
97
121
|
* Disable MFA button text in MFA section if it's enabled
|
|
98
122
|
*/
|
|
99
123
|
disabledMultiFactorButton: string;
|
|
124
|
+
/**
|
|
125
|
+
* Error message shown when trying to login without public policy
|
|
126
|
+
*/
|
|
127
|
+
missingPolicyErrorMessage: string;
|
|
100
128
|
/**
|
|
101
129
|
* Magic link title if login strategy is MagicLink
|
|
102
130
|
*/
|
|
@@ -3,6 +3,14 @@ export interface ResetPasswordLocalization {
|
|
|
3
3
|
* strings in forget password page
|
|
4
4
|
*/
|
|
5
5
|
resetPassword: {
|
|
6
|
+
/**
|
|
7
|
+
* Reset password page title
|
|
8
|
+
*/
|
|
9
|
+
title: string;
|
|
10
|
+
/**
|
|
11
|
+
* Text displayed in reset password form before password inputs
|
|
12
|
+
*/
|
|
13
|
+
description: string;
|
|
6
14
|
/**
|
|
7
15
|
* New password input label
|
|
8
16
|
*/
|
|
@@ -3,6 +3,10 @@ export interface SignupLocalization {
|
|
|
3
3
|
* strings in signup page
|
|
4
4
|
*/
|
|
5
5
|
signup: {
|
|
6
|
+
/**
|
|
7
|
+
* Sign up page title
|
|
8
|
+
*/
|
|
9
|
+
title: string;
|
|
6
10
|
/**
|
|
7
11
|
* Signup name input label
|
|
8
12
|
*/
|
|
@@ -65,6 +69,10 @@ export interface SignupLocalization {
|
|
|
65
69
|
* error message displayed if name length less than 3
|
|
66
70
|
*/
|
|
67
71
|
companyNameMinLengthIs3: string;
|
|
72
|
+
/**
|
|
73
|
+
* String displayed as separator for sign up with social login
|
|
74
|
+
*/
|
|
75
|
+
signUpWithSocialLogin: string;
|
|
68
76
|
/**
|
|
69
77
|
* Go to login message in signup page header
|
|
70
78
|
*/
|
package/Metadata/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare class Metadata {
|
|
|
5
5
|
static _instances: Record<string, Metadata>;
|
|
6
6
|
static getInstance(name?: string): Metadata;
|
|
7
7
|
static set(metadata?: FronteggMetadata, name?: string): Metadata;
|
|
8
|
-
get theme(): Required<FronteggMetadata>['
|
|
8
|
+
get theme(): Required<FronteggMetadata>['themeV2'];
|
|
9
9
|
get navigation(): Required<FronteggMetadata>['navigation'];
|
|
10
10
|
set(metadata?: FronteggMetadata): void;
|
|
11
11
|
}
|
|
@@ -1,3 +1,66 @@
|
|
|
1
|
+
import { CSSProperties, ExtendedCSSProperties } from '../Common';
|
|
2
|
+
export declare type CustomComponent<T = {}> = null | string | ((props: T) => string | any);
|
|
3
|
+
export interface InputThemeOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Input label style
|
|
6
|
+
*/
|
|
7
|
+
label?: ExtendedCSSProperties;
|
|
8
|
+
/**
|
|
9
|
+
* Input base style for standard state
|
|
10
|
+
*/
|
|
11
|
+
base?: ExtendedCSSProperties & {
|
|
12
|
+
placeholderColor?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Input style for hover state
|
|
16
|
+
*/
|
|
17
|
+
hover?: ExtendedCSSProperties;
|
|
18
|
+
/**
|
|
19
|
+
* Input style for active state
|
|
20
|
+
*/
|
|
21
|
+
active?: ExtendedCSSProperties;
|
|
22
|
+
/**
|
|
23
|
+
* Input style for focus state
|
|
24
|
+
*/
|
|
25
|
+
focus?: ExtendedCSSProperties;
|
|
26
|
+
/**
|
|
27
|
+
* Input style for disabled state
|
|
28
|
+
*/
|
|
29
|
+
disabled?: ExtendedCSSProperties;
|
|
30
|
+
}
|
|
31
|
+
export interface ButtonThemeOptions {
|
|
32
|
+
/**
|
|
33
|
+
* Button base style for standard state
|
|
34
|
+
*/
|
|
35
|
+
base?: ExtendedCSSProperties;
|
|
36
|
+
/**
|
|
37
|
+
* Button style for hover state
|
|
38
|
+
*/
|
|
39
|
+
hover?: ExtendedCSSProperties;
|
|
40
|
+
/**
|
|
41
|
+
* Button style for active state
|
|
42
|
+
*/
|
|
43
|
+
active?: ExtendedCSSProperties;
|
|
44
|
+
/**
|
|
45
|
+
* Button style for focus state
|
|
46
|
+
*/
|
|
47
|
+
focus?: ExtendedCSSProperties;
|
|
48
|
+
/**
|
|
49
|
+
* Button style for disabled state
|
|
50
|
+
*/
|
|
51
|
+
disabled?: ExtendedCSSProperties;
|
|
52
|
+
/**
|
|
53
|
+
* Icon style displayed inside the button element
|
|
54
|
+
*/
|
|
55
|
+
icon?: ExtendedCSSProperties;
|
|
56
|
+
}
|
|
57
|
+
export interface LoginBoxBackgroundTheme {
|
|
58
|
+
backgroundColor?: CSSProperties['backgroundColor'];
|
|
59
|
+
backgroundImage?: CSSProperties['backgroundImage'];
|
|
60
|
+
backgroundSize?: CSSProperties['backgroundSize'];
|
|
61
|
+
backgroundRepeat?: CSSProperties['backgroundRepeat'];
|
|
62
|
+
backgroundPosition?: CSSProperties['backgroundPosition'];
|
|
63
|
+
}
|
|
1
64
|
export interface ComponentsOptions {
|
|
2
65
|
/**
|
|
3
66
|
* Refer to Material UI theming guideline.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LoginBoxCommonTheme, LoginBoxCommonThemeOptions } from '../index';
|
|
2
|
+
import { ExtendedCSSProperties } from '../../Common';
|
|
3
|
+
interface AcceptInvitationComponentsTheme {
|
|
4
|
+
/**
|
|
5
|
+
* Accept invitation page container style
|
|
6
|
+
*/
|
|
7
|
+
containerStyle?: ExtendedCSSProperties;
|
|
8
|
+
/**
|
|
9
|
+
* Accept invitation succeeded page container style
|
|
10
|
+
*/
|
|
11
|
+
successContainerStyle?: ExtendedCSSProperties;
|
|
12
|
+
/**
|
|
13
|
+
* Accept invitation failed page container style
|
|
14
|
+
*/
|
|
15
|
+
failedContainerStyle?: ExtendedCSSProperties;
|
|
16
|
+
}
|
|
17
|
+
export interface AcceptInvitationPageThemeOptions extends LoginBoxCommonThemeOptions, AcceptInvitationComponentsTheme {
|
|
18
|
+
}
|
|
19
|
+
export interface AcceptInvitationPageTheme extends LoginBoxCommonTheme, AcceptInvitationComponentsTheme {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { CustomComponent, LoginBoxCommonTheme, LoginBoxCommonThemeOptions } from '../index';
|
|
2
|
+
import { ExtendedCSSProperties } from '../../Common';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
interface TitleProps {
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
7
|
+
interface MessageProps {
|
|
8
|
+
message: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
interface ActivateAccountComponentsTheme {
|
|
11
|
+
/**
|
|
12
|
+
* Activate account page container style
|
|
13
|
+
*/
|
|
14
|
+
containerStyle?: ExtendedCSSProperties;
|
|
15
|
+
/**
|
|
16
|
+
* Activate account form container style
|
|
17
|
+
*/
|
|
18
|
+
formContainerStyle?: ExtendedCSSProperties;
|
|
19
|
+
/**
|
|
20
|
+
* Activate account succeeded page container style
|
|
21
|
+
*/
|
|
22
|
+
successContainerStyle?: ExtendedCSSProperties;
|
|
23
|
+
/**
|
|
24
|
+
* Activate account failed page container style
|
|
25
|
+
*/
|
|
26
|
+
failedContainerStyle?: ExtendedCSSProperties;
|
|
27
|
+
/**
|
|
28
|
+
* Activate account page title default is 'Activate Account'
|
|
29
|
+
* displayed in forgot password form screen
|
|
30
|
+
* passing 'null' will hide the title
|
|
31
|
+
*/
|
|
32
|
+
title?: CustomComponent<TitleProps>;
|
|
33
|
+
/**
|
|
34
|
+
* Direct css style for Forgot password Page title
|
|
35
|
+
*/
|
|
36
|
+
titleStyle?: ExtendedCSSProperties;
|
|
37
|
+
/**
|
|
38
|
+
* Activate account page message default is hidden
|
|
39
|
+
* displayed in forgot password form screen
|
|
40
|
+
* passing 'null' will hide the message
|
|
41
|
+
*/
|
|
42
|
+
message?: CustomComponent<MessageProps>;
|
|
43
|
+
/**
|
|
44
|
+
* Direct css style for Forgot password Page message
|
|
45
|
+
*/
|
|
46
|
+
messageStyle?: ExtendedCSSProperties;
|
|
47
|
+
}
|
|
48
|
+
export interface ActivateAccountPageThemeOptions extends LoginBoxCommonThemeOptions, ActivateAccountComponentsTheme {
|
|
49
|
+
}
|
|
50
|
+
export interface ActivateAccountPageTheme extends LoginBoxCommonTheme, ActivateAccountComponentsTheme {
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CustomLocalizationProps {
|
|
2
|
+
t: (key: string) => string;
|
|
3
|
+
}
|
|
4
|
+
export interface CustomContainerProps extends CustomLocalizationProps {
|
|
5
|
+
className: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ComponentKeyRender {
|
|
8
|
+
'pageHeader': CustomContainerProps;
|
|
9
|
+
'pageFooter': CustomContainerProps;
|
|
10
|
+
'boxHeader': CustomContainerProps;
|
|
11
|
+
'boxFooter': CustomContainerProps;
|
|
12
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CustomComponent, LoginBoxCommonTheme, LoginBoxCommonThemeOptions } from '../index';
|
|
2
|
+
import { ExtendedCSSProperties } from '../../Common';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
interface TitleProps {
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
7
|
+
interface MessageProps {
|
|
8
|
+
message: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
interface ForgotPasswordComponentsTheme {
|
|
11
|
+
/**
|
|
12
|
+
* Forgot password page container style
|
|
13
|
+
*/
|
|
14
|
+
containerStyle?: ExtendedCSSProperties;
|
|
15
|
+
/**
|
|
16
|
+
* Forgot password page form container style
|
|
17
|
+
*/
|
|
18
|
+
formContainerStyle?: ExtendedCSSProperties;
|
|
19
|
+
successContainerStyle?: ExtendedCSSProperties;
|
|
20
|
+
/**
|
|
21
|
+
* Forgot password page title default is 'Forgot your password?'
|
|
22
|
+
* displayed in forgot password form screen
|
|
23
|
+
* passing 'null' will hide the title
|
|
24
|
+
*/
|
|
25
|
+
title?: CustomComponent<TitleProps>;
|
|
26
|
+
/**
|
|
27
|
+
* Direct css style for Forgot password Page title
|
|
28
|
+
*/
|
|
29
|
+
titleStyle?: ExtendedCSSProperties;
|
|
30
|
+
/**
|
|
31
|
+
* Forgot password page message default:
|
|
32
|
+
* 'Enter the email address associated with your account and we'll send you a link to reset your password'
|
|
33
|
+
* displayed in forgot password form screen
|
|
34
|
+
* passing 'null' will hide the message
|
|
35
|
+
*/
|
|
36
|
+
message?: CustomComponent<MessageProps>;
|
|
37
|
+
/**
|
|
38
|
+
* Direct css style for Forgot password Page message
|
|
39
|
+
*/
|
|
40
|
+
messageStyle?: ExtendedCSSProperties;
|
|
41
|
+
}
|
|
42
|
+
export interface ForgotPasswordPageThemeOptions extends LoginBoxCommonThemeOptions, ForgotPasswordComponentsTheme {
|
|
43
|
+
}
|
|
44
|
+
export interface ForgotPasswordPageTheme extends LoginBoxCommonTheme, ForgotPasswordComponentsTheme {
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { ExtendedCSSProperties } from '../../Common';
|
|
2
|
+
import { BaseTheme, BaseThemeOptions } from '../index';
|
|
3
|
+
import { ButtonThemeOptions, CustomComponent, InputThemeOptions } from '../ComponentsOptions';
|
|
4
|
+
/**
|
|
5
|
+
* @RootElement
|
|
6
|
+
* - @WrapperElement
|
|
7
|
+
* | - Header
|
|
8
|
+
* | - Box
|
|
9
|
+
* | | - Header
|
|
10
|
+
* | | - Content
|
|
11
|
+
* | | - SocialLogin
|
|
12
|
+
* | | | - Header
|
|
13
|
+
* | | | - Google
|
|
14
|
+
* | | | - Microsoft
|
|
15
|
+
* | | | - Footer
|
|
16
|
+
* | | - Footer
|
|
17
|
+
* | - Footer
|
|
18
|
+
*/
|
|
19
|
+
interface LogoComponent {
|
|
20
|
+
/**
|
|
21
|
+
* Company logo Url or native html element as string
|
|
22
|
+
*/
|
|
23
|
+
image?: string | any | CustomComponent;
|
|
24
|
+
/**
|
|
25
|
+
* Company logo placement in Login Pages
|
|
26
|
+
* box = inside the login box element
|
|
27
|
+
* page = displayed at the top of the page
|
|
28
|
+
*/
|
|
29
|
+
placement?: 'box' | 'page';
|
|
30
|
+
alignment?: 'left' | 'right' | 'center';
|
|
31
|
+
/**
|
|
32
|
+
* Direct css styling for Company Logo container component
|
|
33
|
+
*/
|
|
34
|
+
style?: ExtendedCSSProperties;
|
|
35
|
+
}
|
|
36
|
+
interface LoginBoxOptionalCommon {
|
|
37
|
+
/**
|
|
38
|
+
* Header component placed in before section content.
|
|
39
|
+
* Mostly used for Company Logo or Page title
|
|
40
|
+
* Accepts:
|
|
41
|
+
* - string as url for rendering image element with src='url'
|
|
42
|
+
* - string as base64 for rendering image as base64 content
|
|
43
|
+
* - ReactElement will be rendered inside LoginBox VirtualTree
|
|
44
|
+
*/
|
|
45
|
+
pageHeader?: CustomComponent;
|
|
46
|
+
/**
|
|
47
|
+
* Footer component placed in before section content
|
|
48
|
+
* Mostly used for Disclaimers or Back buttons
|
|
49
|
+
* Accepts:
|
|
50
|
+
* - string as url for rendering image element with src='url'
|
|
51
|
+
* - string as base64 for rendering image as base64 content
|
|
52
|
+
* - ReactElement will be rendered inside LoginBox VirtualTree
|
|
53
|
+
*/
|
|
54
|
+
pageFooter?: CustomComponent;
|
|
55
|
+
/**
|
|
56
|
+
* Company logo Url or native html element as string
|
|
57
|
+
*/
|
|
58
|
+
logo?: LogoComponent;
|
|
59
|
+
/**
|
|
60
|
+
* Powered by frontegg placement
|
|
61
|
+
* box = inside the login box element
|
|
62
|
+
* page = displayed at the bottom of the page
|
|
63
|
+
*/
|
|
64
|
+
poweredByPlacement?: 'box' | 'page';
|
|
65
|
+
/**
|
|
66
|
+
* BoxElement
|
|
67
|
+
* It is a Card component placed inside the [WrapperElement]{@link pageStyle}
|
|
68
|
+
* The purpose of this element is to
|
|
69
|
+
* By default it's have flex display and justify content center
|
|
70
|
+
*/
|
|
71
|
+
boxStyle?: ExtendedCSSProperties;
|
|
72
|
+
/**
|
|
73
|
+
* Header component placed in inside the login box and before login inputs.
|
|
74
|
+
* Accepts:
|
|
75
|
+
* - string as url for rendering image element with src='url'
|
|
76
|
+
* - string as base64 for rendering image as base64 content
|
|
77
|
+
* - ReactElement will be rendered inside LoginBox VirtualTree (should be pure component without hooks and HOC)
|
|
78
|
+
*/
|
|
79
|
+
boxHeader?: CustomComponent;
|
|
80
|
+
/**
|
|
81
|
+
* Direct css styling for applying css for all (Box title) in LoginBox pages
|
|
82
|
+
*/
|
|
83
|
+
boxTitleStyle?: ExtendedCSSProperties;
|
|
84
|
+
/**
|
|
85
|
+
* Direct css styling for applying css for all (Box message or Box subtitle) in LoginBox pages
|
|
86
|
+
*/
|
|
87
|
+
boxMessageStyle?: ExtendedCSSProperties;
|
|
88
|
+
/**
|
|
89
|
+
* Footer component placed in inside the login box and after login inputs.
|
|
90
|
+
* Mostly used for Disclaimers or Back buttons
|
|
91
|
+
* Accepts:
|
|
92
|
+
* - string as url for rendering image element with src='url'
|
|
93
|
+
* - string as base64 for rendering image as base64 content
|
|
94
|
+
* - ReactElement will be rendered inside LoginBox VirtualTree
|
|
95
|
+
*/
|
|
96
|
+
boxFooter?: CustomComponent;
|
|
97
|
+
/**
|
|
98
|
+
* Option to customize login box inputs by providing
|
|
99
|
+
* css style for every state (base, hover, focus, disabled, etc...)
|
|
100
|
+
*/
|
|
101
|
+
inputTheme?: InputThemeOptions;
|
|
102
|
+
/**
|
|
103
|
+
* Option to customize login box standard buttons by providing
|
|
104
|
+
* css style for every state (base, hover, focus, disabled, etc...)
|
|
105
|
+
*/
|
|
106
|
+
buttonTheme?: ButtonThemeOptions;
|
|
107
|
+
/**
|
|
108
|
+
* Option to customize login box link buttons by providing
|
|
109
|
+
* css style for every state (base, hover, focus, disabled, etc...)
|
|
110
|
+
*/
|
|
111
|
+
linkButtonTheme?: ButtonThemeOptions;
|
|
112
|
+
/**
|
|
113
|
+
* Option to customize login box submit buttons by providing
|
|
114
|
+
* css style for every state (base, hover, focus, disabled, etc...)
|
|
115
|
+
*/
|
|
116
|
+
submitButtonTheme?: ButtonThemeOptions;
|
|
117
|
+
}
|
|
118
|
+
export interface LoginBoxCommonTheme extends BaseTheme, LoginBoxOptionalCommon {
|
|
119
|
+
/**
|
|
120
|
+
* RootElement
|
|
121
|
+
* The root DIV element of specific login box page
|
|
122
|
+
* By default it's have fixed and full width/height size
|
|
123
|
+
*/
|
|
124
|
+
rootStyle: ExtendedCSSProperties;
|
|
125
|
+
/**
|
|
126
|
+
* PageElement
|
|
127
|
+
* It is DIV element placed inside the [RootElement]{@link rootStyle}
|
|
128
|
+
* The purpose of this element is to wrapper the Box Component and other custom components
|
|
129
|
+
* By default it's have flex display and justify content center
|
|
130
|
+
*/
|
|
131
|
+
pageStyle: ExtendedCSSProperties;
|
|
132
|
+
}
|
|
133
|
+
export interface LoginBoxCommonThemeOptions extends BaseThemeOptions, LoginBoxOptionalCommon {
|
|
134
|
+
/**
|
|
135
|
+
* RootElement
|
|
136
|
+
* The root DIV element of specific login box page
|
|
137
|
+
* By default it's have fixed and full width/height size
|
|
138
|
+
*/
|
|
139
|
+
rootStyle?: ExtendedCSSProperties;
|
|
140
|
+
/**
|
|
141
|
+
* PageElement
|
|
142
|
+
* It is DIV element placed inside the [RootElement]{@link rootStyle}
|
|
143
|
+
* The purpose of this element is to wrapper the Box Component and other custom components
|
|
144
|
+
* By default it's have flex display and justify content center
|
|
145
|
+
*/
|
|
146
|
+
pageStyle?: ExtendedCSSProperties;
|
|
147
|
+
}
|
|
148
|
+
export {};
|