@frontegg/types 4.37.0 → 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.
Files changed (36) hide show
  1. package/Common.d.ts +3 -0
  2. package/ContextOptions.d.ts +5 -1
  3. package/FronteggAppInstance.d.ts +1 -0
  4. package/FronteggAppOptions.d.ts +4 -4
  5. package/FronteggMetadata.d.ts +2 -0
  6. package/Localizations/AdminPortalLocalizations/security.d.ts +4 -0
  7. package/Localizations/AdminPortalLocalizations/subscriptions.d.ts +23 -0
  8. package/Localizations/AdminPortalLocalizations/users.d.ts +6 -0
  9. package/Localizations/LocalizationOverrides.d.ts +1 -0
  10. package/Localizations/LocalizationType.d.ts +1 -0
  11. package/Localizations/LoginBoxLocalization/acceptInvitation.d.ts +4 -0
  12. package/Localizations/LoginBoxLocalization/activateAccount.d.ts +4 -0
  13. package/Localizations/LoginBoxLocalization/forgetPassword.d.ts +8 -0
  14. package/Localizations/LoginBoxLocalization/index.d.ts +8 -0
  15. package/Localizations/LoginBoxLocalization/login.d.ts +28 -0
  16. package/Localizations/LoginBoxLocalization/resetPassword.d.ts +8 -0
  17. package/Localizations/LoginBoxLocalization/signup.d.ts +8 -0
  18. package/Metadata/index.d.ts +1 -1
  19. package/ThemeOptions/ComponentsOptions.d.ts +63 -0
  20. package/ThemeOptions/LoginBoxTheme/AcceptInvitationTheme.d.ts +21 -0
  21. package/ThemeOptions/LoginBoxTheme/ActivateAccountPageTheme.d.ts +52 -0
  22. package/ThemeOptions/LoginBoxTheme/CustomLoginComponents.d.ts +12 -0
  23. package/ThemeOptions/LoginBoxTheme/ForgotPasswordTheme.d.ts +46 -0
  24. package/ThemeOptions/LoginBoxTheme/LoaderTheme.d.ts +7 -0
  25. package/ThemeOptions/LoginBoxTheme/LoginBoxCommon.d.ts +148 -0
  26. package/ThemeOptions/LoginBoxTheme/LoginPageTheme.d.ts +119 -0
  27. package/ThemeOptions/LoginBoxTheme/ResetPasswordTheme.d.ts +48 -0
  28. package/ThemeOptions/LoginBoxTheme/SignupPageTheme.d.ts +46 -0
  29. package/ThemeOptions/LoginBoxTheme/SocialLoginsTheme.d.ts +36 -0
  30. package/ThemeOptions/LoginBoxTheme/index.d.ts +51 -0
  31. package/ThemeOptions/LoginBoxThemeOptions.d.ts +3 -8
  32. package/ThemeOptions/helpers.d.ts +0 -0
  33. package/ThemeOptions/index.d.ts +6 -190
  34. package/index.js +6 -197
  35. package/node/index.js +6 -197
  36. package/package.json +2 -2
@@ -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 {};
@@ -0,0 +1,119 @@
1
+ import { LoginBoxCommonTheme, LoginBoxCommonThemeOptions } from '../index';
2
+ import { ExtendedCSSProperties } from '../../Common';
3
+ import { CustomComponent } from '../ComponentsOptions';
4
+ import { ReactNode } from 'react';
5
+ interface TitleProps {
6
+ title: string;
7
+ }
8
+ interface MessageProps {
9
+ message: ReactNode;
10
+ }
11
+ export interface GoToSignupMessageProps {
12
+ goToSignup: () => void;
13
+ goToSignupMessage: string;
14
+ goToSignupButtonText: string;
15
+ }
16
+ export interface ResendOTCProps {
17
+ haventReceiveOTCMessage: string;
18
+ resendOTCMessage: string;
19
+ resendOTC: () => void;
20
+ }
21
+ export interface LoginPageComponentsTheme {
22
+ /**
23
+ * Login page container style
24
+ */
25
+ containerStyle?: ExtendedCSSProperties;
26
+ /**
27
+ * Login page form container style
28
+ */
29
+ formContainerStyle?: ExtendedCSSProperties;
30
+ /**
31
+ * Login page title default is 'Sign In'
32
+ * displayed in login screen (login with password, pre-login)
33
+ * passing 'null' will hide the title
34
+ */
35
+ title?: CustomComponent<TitleProps>;
36
+ /**
37
+ * Direct css style for Login Page title
38
+ */
39
+ titleStyle?: ExtendedCSSProperties;
40
+ /**
41
+ * Go to signup component displayed under box title default is 'Don't have an account? Sign up'
42
+ * displayed in login screen (login with password, pre-login)
43
+ * passing 'null' will hide the signup message
44
+ */
45
+ signupMessage?: CustomComponent<GoToSignupMessageProps>;
46
+ /**
47
+ * Direct css style for 'Go to signup component'
48
+ */
49
+ signupMessageStyle?: ExtendedCSSProperties;
50
+ /**
51
+ * Recover Multi-factor page title default is 'Recover MFA'
52
+ * displayed in recover mfa screen
53
+ * passing 'null' will hide the title
54
+ */
55
+ recoverMfaTitle?: CustomComponent<TitleProps>;
56
+ /**
57
+ * Direct css style for Recover Multi-factor title
58
+ */
59
+ recoverMfaTitleStyle?: ExtendedCSSProperties;
60
+ /**
61
+ * One time code login title default is 'Check your email'
62
+ * displayed after pre-login with OTC enabled
63
+ * passing 'null' will hide the title
64
+ */
65
+ otcTitle?: CustomComponent<TitleProps>;
66
+ /**
67
+ * Direct css style for One time code
68
+ */
69
+ otcTitleStyle?: ExtendedCSSProperties;
70
+ /**
71
+ * One time code login message component default is 'We have sent an six-digit code to smaple@email.com'
72
+ * displayed after pre-login with OTC enabled
73
+ * passing 'null' will hide the title
74
+ */
75
+ otcMessage?: CustomComponent<MessageProps>;
76
+ /**
77
+ * Direct css style for One time code login message
78
+ */
79
+ otcMessageStyle?: ExtendedCSSProperties;
80
+ /**
81
+ * Resend OTC container component, displaye after otc submit button,
82
+ * passing 'null' will hide the otc resend button
83
+ */
84
+ resendOTC?: ExtendedCSSProperties;
85
+ /**
86
+ * Direct css style for Resent OTC container
87
+ */
88
+ resendOTCStyle?: ExtendedCSSProperties;
89
+ /**
90
+ * Direct style for the text displayed before resend otc button,
91
+ * default is 'Haven’t received it?'
92
+ */
93
+ resendOTCMessageStyle?: ExtendedCSSProperties;
94
+ /**
95
+ * MagicLink success login title default is 'Check your email'
96
+ * displayed after pre-login if MagicLink enabled
97
+ * passing 'null' will hide the title
98
+ */
99
+ magicLinkTitle?: CustomComponent<TitleProps>;
100
+ /**
101
+ * Direct css style for MagicLink title
102
+ */
103
+ magicLinkTitleStyle?: ExtendedCSSProperties;
104
+ /**
105
+ * MagicLink login message component default is 'We have sent an email to smaple@email.com'
106
+ * displayed after pre-login with MagicLink enabled
107
+ * passing 'null' will hide the title
108
+ */
109
+ magicLinkMessage?: CustomComponent<MessageProps>;
110
+ /**
111
+ * Direct css style for MagicLink message
112
+ */
113
+ magicLinkMessageStyle?: ExtendedCSSProperties;
114
+ }
115
+ export interface LoginPageThemeOptions extends LoginBoxCommonThemeOptions, LoginPageComponentsTheme {
116
+ }
117
+ export interface LoginPageTheme extends LoginBoxCommonTheme, LoginPageComponentsTheme {
118
+ }
119
+ export {};
@@ -0,0 +1,48 @@
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 ResetPasswordComponentsTheme {
11
+ /**
12
+ * Forgot password page container style
13
+ */
14
+ containerStyle?: ExtendedCSSProperties;
15
+ /**
16
+ * Forgot password page form container style
17
+ */
18
+ formContainerStyle?: ExtendedCSSProperties;
19
+ /**
20
+ * Reset password page success container style
21
+ */
22
+ successContainerStyle?: ExtendedCSSProperties;
23
+ /**
24
+ * Reset password page title default is 'Reset Password'
25
+ * displayed in forgot password form screen
26
+ * passing 'null' will hide the title
27
+ */
28
+ title?: CustomComponent<TitleProps>;
29
+ /**
30
+ * Direct css style for Forgot password Page title
31
+ */
32
+ titleStyle?: ExtendedCSSProperties;
33
+ /**
34
+ * Reset password page message default is hidden
35
+ * displayed in forgot password form screen
36
+ * passing 'null' will hide the message
37
+ */
38
+ message?: CustomComponent<MessageProps>;
39
+ /**
40
+ * Direct css style for Forgot password Page message
41
+ */
42
+ messageStyle?: ExtendedCSSProperties;
43
+ }
44
+ export interface ResetPasswordPageThemeOptions extends LoginBoxCommonThemeOptions, ResetPasswordComponentsTheme {
45
+ }
46
+ export interface ResetPasswordPageTheme extends LoginBoxCommonTheme, ResetPasswordComponentsTheme {
47
+ }
48
+ export {};
@@ -0,0 +1,46 @@
1
+ import { LoginBoxCommonTheme, LoginBoxCommonThemeOptions } from '../index';
2
+ import { ExtendedCSSProperties } from '../../Common';
3
+ import { CustomComponent } from '../ComponentsOptions';
4
+ interface TitleProps {
5
+ title: string;
6
+ }
7
+ export interface GoToLoginMessageProps {
8
+ goToLogin: () => void;
9
+ goToLoginMessage: string;
10
+ goToLoginButtonText: string;
11
+ }
12
+ export interface SignupPageComponentsTheme {
13
+ /**
14
+ * Login page container style
15
+ */
16
+ containerStyle?: ExtendedCSSProperties;
17
+ /**
18
+ * Login page form container style
19
+ */
20
+ formContainerStyle?: ExtendedCSSProperties;
21
+ /**
22
+ * Login page title default is 'Sign In'
23
+ * displayed in login screen (login with password, pre-login)
24
+ * passing 'null' will hide the title
25
+ */
26
+ title?: CustomComponent<TitleProps>;
27
+ /**
28
+ * Direct css style for Login Page title
29
+ */
30
+ titleStyle?: ExtendedCSSProperties;
31
+ /**
32
+ * Go to login component displayed under box title default is 'Already have an account?'
33
+ * displayed in login screen (login with password, pre-login)
34
+ * passing 'null' will hide the signup message
35
+ */
36
+ loginMessage?: CustomComponent<GoToLoginMessageProps>;
37
+ /**
38
+ * Direct css style for 'Go to Login'
39
+ */
40
+ loginMessageStyle?: ExtendedCSSProperties;
41
+ }
42
+ export interface SignupPageThemeOptions extends LoginBoxCommonThemeOptions, SignupPageComponentsTheme {
43
+ }
44
+ export interface SignupPageTheme extends LoginBoxCommonTheme, SignupPageComponentsTheme {
45
+ }
46
+ export {};
@@ -0,0 +1,36 @@
1
+ import { ExtendedCSSProperties } from '../../Common';
2
+ import { BaseTheme, BaseThemeOptions, ButtonThemeOptions } from '../index';
3
+ export interface SocialLoginComponentKeyRender {
4
+ divider: {
5
+ text: string;
6
+ };
7
+ googleIcon: {};
8
+ microsoftIcon: {};
9
+ facebookIcon: {};
10
+ githubIcon: {};
11
+ }
12
+ export declare type SocialLoginCustomComponent<T extends keyof SocialLoginComponentKeyRender> = string | ((props?: SocialLoginComponentKeyRender[T]) => string | any);
13
+ export interface SocialLoginsThemeOptions extends BaseThemeOptions {
14
+ dividerStyle?: ExtendedCSSProperties;
15
+ dividerTextStyle?: ExtendedCSSProperties;
16
+ divider?: SocialLoginCustomComponent<'divider'>;
17
+ containerStyle?: ExtendedCSSProperties;
18
+ buttonStyle?: Omit<ButtonThemeOptions, 'disabled'>;
19
+ iconsOnly?: boolean;
20
+ googleIcon?: SocialLoginCustomComponent<'googleIcon'>;
21
+ microsoftIcon?: SocialLoginCustomComponent<'microsoftIcon'>;
22
+ facebookIcon?: SocialLoginCustomComponent<'facebookIcon'>;
23
+ githubIcon?: SocialLoginCustomComponent<'githubIcon'>;
24
+ }
25
+ export interface SocialLoginsTheme extends BaseTheme {
26
+ dividerStyle?: ExtendedCSSProperties;
27
+ dividerTextStyle?: ExtendedCSSProperties;
28
+ divider?: SocialLoginCustomComponent<'divider'>;
29
+ containerStyle?: ExtendedCSSProperties;
30
+ buttonStyle?: Omit<ButtonThemeOptions, 'disabled'>;
31
+ iconsOnly?: boolean;
32
+ googleIcon?: SocialLoginCustomComponent<'googleIcon'>;
33
+ microsoftIcon?: SocialLoginCustomComponent<'microsoftIcon'>;
34
+ facebookIcon?: SocialLoginCustomComponent<'facebookIcon'>;
35
+ githubIcon?: SocialLoginCustomComponent<'githubIcon'>;
36
+ }
@@ -0,0 +1,51 @@
1
+ import { AcceptInvitationPageTheme, AcceptInvitationPageThemeOptions } from './AcceptInvitationTheme';
2
+ import { ActivateAccountPageTheme, ActivateAccountPageThemeOptions } from './ActivateAccountPageTheme';
3
+ import { BaseThemeOptions, LoginBoxCommonTheme, LoginBoxCommonThemeOptions, SignupPageThemeOptions } from '../index';
4
+ import { CSSProperties, ExtendedCSSProperties } from '../../Common';
5
+ import { AuthPageCustomComponents } from '../../CustomComponents';
6
+ import { ForgotPasswordPageTheme, ForgotPasswordPageThemeOptions } from './ForgotPasswordTheme';
7
+ import { ResetPasswordPageTheme, ResetPasswordPageThemeOptions } from './ResetPasswordTheme';
8
+ import { LoginPageTheme, LoginPageThemeOptions } from './LoginPageTheme';
9
+ import { SocialLoginsTheme, SocialLoginsThemeOptions } from './SocialLoginsTheme';
10
+ import { LoaderTheme, LoaderThemeOptions } from './LoaderTheme';
11
+ import { SignupPageTheme } from './SignupPageTheme';
12
+ export * from './LoginBoxCommon';
13
+ export * from './LoginPageTheme';
14
+ export * from './SignupPageTheme';
15
+ export * from './CustomLoginComponents';
16
+ export * from './SocialLoginsTheme';
17
+ export * from './ForgotPasswordTheme';
18
+ export * from './ResetPasswordTheme';
19
+ export * from './ActivateAccountPageTheme';
20
+ export * from './AcceptInvitationTheme';
21
+ export interface AuthPageThemeOptions extends BaseThemeOptions, AuthPageCustomComponents {
22
+ style?: ExtendedCSSProperties;
23
+ layout?: {
24
+ width?: CSSProperties['width'];
25
+ marginLeft?: CSSProperties['marginLeft'];
26
+ outerCustomBackground?: any;
27
+ };
28
+ }
29
+ export interface LoginBoxThemeOptions extends LoginBoxCommonThemeOptions {
30
+ themeName?: 'classic' | 'modern' | 'vivid' | 'dark';
31
+ poweredByPlacement?: 'box' | 'page';
32
+ acceptInvitation?: AcceptInvitationPageThemeOptions;
33
+ activateAccount?: ActivateAccountPageThemeOptions;
34
+ forgotPassword?: ForgotPasswordPageThemeOptions;
35
+ resetPassword?: ResetPasswordPageThemeOptions;
36
+ login?: LoginPageThemeOptions;
37
+ signup?: SignupPageThemeOptions;
38
+ socialLogins?: SocialLoginsThemeOptions;
39
+ loader?: LoaderThemeOptions;
40
+ }
41
+ export interface LoginBoxTheme extends LoginBoxCommonTheme {
42
+ themeName: 'classic' | 'modern' | 'vivid' | 'dark';
43
+ acceptInvitation: AcceptInvitationPageTheme;
44
+ activateAccount: ActivateAccountPageTheme;
45
+ forgotPassword: ForgotPasswordPageTheme;
46
+ resetPassword: ResetPasswordPageTheme;
47
+ login: LoginPageTheme;
48
+ signup: SignupPageTheme;
49
+ socialLogins: SocialLoginsTheme;
50
+ loader: LoaderTheme;
51
+ }
@@ -22,6 +22,9 @@ export declare type SocialLogins = BaseThemeOptions & {
22
22
  iconWidth?: string;
23
23
  } & Record<SocialLoginTypes, SocialLoginButton>;
24
24
  export interface AuthPageThemeOptions extends BaseThemeOptions, AuthPageCustomComponents {
25
+ style?: CSSProperties & {
26
+ [k in string]: CSSProperties;
27
+ };
25
28
  layout?: {
26
29
  width?: CSSProperties['width'];
27
30
  marginLeft?: CSSProperties['marginLeft'];
@@ -41,11 +44,3 @@ export interface LoginFormThemeOptions extends AuthPageThemeOptions {
41
44
  loginWithSsoFailed?: AuthPageThemeOptions;
42
45
  forceEnrollMfa?: AuthPageThemeOptions;
43
46
  }
44
- export interface LoginBoxThemeOptions extends AuthPageThemeOptions {
45
- login?: LoginFormThemeOptions;
46
- signup?: AuthPageThemeOptions;
47
- acceptInvitation?: AuthPageThemeOptions;
48
- activateAccount?: AuthPageThemeOptions;
49
- forgetPassword?: AuthPageThemeOptions;
50
- resetPassword?: AuthPageThemeOptions;
51
- }
File without changes