@frontegg/types 5.48.0 → 5.51.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.
@@ -0,0 +1,6 @@
1
+ export interface FronteggCheckoutDialogOptions {
2
+ plan?: string;
3
+ onClose?: () => void;
4
+ onSuccess?: () => void;
5
+ onError?: (msg: string) => void;
6
+ }
@@ -1,5 +1,5 @@
1
1
  import { EnhancedStore } from '@frontegg/redux-store';
2
- import { FronteggAppOptions } from './index';
2
+ import { FronteggAppOptions, FronteggCheckoutDialogOptions } from './index';
3
3
  export interface FronteggAppInstance {
4
4
  name: string;
5
5
  iframeRendering: boolean;
@@ -8,11 +8,15 @@ export interface FronteggAppInstance {
8
8
  store: EnhancedStore;
9
9
  adminPortalEl?: HTMLElement;
10
10
  loginBoxEl?: HTMLElement;
11
+ checkoutDialogEl?: HTMLElement;
11
12
  adminPortalContainer?: HTMLElement;
12
13
  loginBoxContainer?: HTMLElement;
14
+ checkoutDialogContainer?: HTMLElement;
13
15
  options: FronteggAppOptions;
14
16
  updateMetadata: (metadata: FronteggAppOptions['metadata']) => void;
15
17
  showAdminPortal: () => void;
16
18
  hideAdminPortal: () => void;
19
+ showCheckoutDialog: (opts: FronteggCheckoutDialogOptions) => void;
20
+ hideCheckoutDialog: () => void;
17
21
  close: () => void;
18
22
  }
@@ -137,6 +137,10 @@ export interface SubscriptionsLocalization {
137
137
  * Current Plan Trialing status
138
138
  */
139
139
  trialing: string;
140
+ /**
141
+ * Current Plan Trial End status
142
+ */
143
+ trialEnded: string;
140
144
  /**
141
145
  * Cancel plan button text
142
146
  */
@@ -264,5 +264,35 @@ export interface LoginLocalization {
264
264
  * EX: "Don't ask again on this device for {{count}} day"
265
265
  */
266
266
  forceMfaRememberThisDevice: string;
267
+ /**
268
+ * Login disclaimer text
269
+ * this text is optional
270
+ */
271
+ disclaimerText: string;
272
+ /**
273
+ * Login disclaimer terms link text
274
+ * this text is optional
275
+ */
276
+ termsLinkText: string;
277
+ /**
278
+ * Login disclaimer terms url
279
+ * this text is optional
280
+ */
281
+ termsLink: string;
282
+ /**
283
+ * Login disclaimer privacy link text
284
+ * this text is optional
285
+ */
286
+ privacyLinkText: string;
287
+ /**
288
+ * Login disclaimer privacy url
289
+ * this text is optional
290
+ */
291
+ privacyLink: string;
292
+ /**
293
+ * Login disclaimer terms and privacy conjunction text
294
+ * this text is optional
295
+ */
296
+ termsAndPrivacyConjunctionText: string;
267
297
  };
268
298
  }
@@ -48,8 +48,8 @@ export interface SignupLocalizationOptions {
48
48
  */
49
49
  passwordIsRequired: string;
50
50
  /**
51
- * Signup phone input label
52
- */
51
+ * Signup phone input label
52
+ */
53
53
  phoneInputLabel: string;
54
54
  /**
55
55
  /**
@@ -57,12 +57,12 @@ export interface SignupLocalizationOptions {
57
57
  */
58
58
  phoneInputPlaceholder: string;
59
59
  /**
60
- * error message displayed if phone number is empty
61
- */
60
+ * error message displayed if phone number is empty
61
+ */
62
62
  phoneIsRequired: string;
63
63
  /**
64
- * error message displayed if phone number format is invalid
65
- */
64
+ * error message displayed if phone number format is invalid
65
+ */
66
66
  phoneIsInvalid: string;
67
67
  /**
68
68
  * Signup company name input label
@@ -82,6 +82,40 @@ export interface SignupLocalizationOptions {
82
82
  * error message displayed if name length less than 3
83
83
  */
84
84
  companyNameMinLengthIs3: string;
85
+ /**
86
+ * Signup disclaimer text
87
+ * this text is optional
88
+ */
89
+ disclaimerText: string;
90
+ /**
91
+ * error message displayed if disclaimer is ot acceppted
92
+ */
93
+ disclaimerTextRequired: string;
94
+ /**
95
+ * Signup term link text
96
+ * this text is optional
97
+ */
98
+ termsLinkText: string;
99
+ /**
100
+ * Signup terms url
101
+ * this text is optional
102
+ */
103
+ termsLink: string;
104
+ /**
105
+ * Signup privacy link text
106
+ * this text is optional
107
+ */
108
+ privacyLinkText: string;
109
+ /**
110
+ * Signup privacy url
111
+ * this text is optional
112
+ */
113
+ privacyLink: string;
114
+ /**
115
+ * Signup terms and privacy conjunction text
116
+ * this text is optional
117
+ */
118
+ termsAndPrivacyConjunctionText: string;
85
119
  /**
86
120
  * String displayed as separator for sign up with social login
87
121
  */
@@ -17,6 +17,17 @@ export interface ResendOTCProps {
17
17
  resendOTCMessage: string;
18
18
  resendOTC: () => void;
19
19
  }
20
+ interface LoginDisclaimerOptions {
21
+ textStyle: ExtendedCSSProperties;
22
+ terms: {
23
+ enabled?: boolean;
24
+ linkStyle?: ExtendedCSSProperties;
25
+ };
26
+ privacy: {
27
+ enabled?: boolean;
28
+ linkStyle?: ExtendedCSSProperties;
29
+ };
30
+ }
20
31
  export interface LoginPageComponentsTheme {
21
32
  /**
22
33
  * Login page container style
@@ -110,6 +121,11 @@ export interface LoginPageComponentsTheme {
110
121
  * Direct css style for MagicLink message
111
122
  */
112
123
  magicLinkMessageStyle?: ExtendedCSSProperties;
124
+ /**
125
+ * Disclaimer text options
126
+ * on login page can be displayed as text info only
127
+ */
128
+ disclaimer?: LoginDisclaimerOptions;
113
129
  }
114
130
  export interface LoginPageThemeOptions extends LoginBoxCommonThemeOptions, LoginPageComponentsTheme {
115
131
  }
@@ -9,6 +9,28 @@ export interface GoToLoginMessageProps {
9
9
  goToLoginMessage: string;
10
10
  goToLoginButtonText: string;
11
11
  }
12
+ interface SignUpDisclaimerOptions {
13
+ hasCheckbox: true;
14
+ textStyle?: ExtendedCSSProperties;
15
+ checkBoxStyle?: {
16
+ unchecked?: {
17
+ base?: ExtendedCSSProperties;
18
+ hover?: ExtendedCSSProperties;
19
+ };
20
+ checked?: {
21
+ base?: ExtendedCSSProperties;
22
+ hover?: ExtendedCSSProperties;
23
+ };
24
+ };
25
+ terms: {
26
+ enabled?: boolean;
27
+ linkStyle?: ExtendedCSSProperties;
28
+ };
29
+ privacy: {
30
+ enabled?: boolean;
31
+ linkStyle?: ExtendedCSSProperties;
32
+ };
33
+ }
12
34
  export interface SignupPageComponentsTheme {
13
35
  /**
14
36
  * Signup page title default is 'Account Sign Up'
@@ -58,6 +80,11 @@ export interface SignupPageComponentsTheme {
58
80
  * Direct css style for 'Go to Login'
59
81
  */
60
82
  loginMessageStyle?: ExtendedCSSProperties;
83
+ /**
84
+ * Disclaimer options
85
+ * on sign page can be displayed as mandatory checkbox or text info
86
+ */
87
+ disclaimer?: SignUpDisclaimerOptions;
61
88
  }
62
89
  export interface SignupPageThemeOptions extends LoginBoxCommonThemeOptions, SignupPageComponentsTheme {
63
90
  }
package/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './FronteggMetadata';
4
4
  export * from './ThemeOptions';
5
5
  export * from './Localizations';
6
6
  export * from './Metadata';
7
+ export * from './CheckoutDialogOptions';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/types",
3
- "version": "5.48.0",
3
+ "version": "5.51.0",
4
4
  "main": "./node/index.js",
5
5
  "module": "./index.js",
6
6
  "types": "./index.d.ts",