@frontegg/types 4.43.0 → 5.1.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.
Files changed (36) hide show
  1. package/Common.d.ts +3 -0
  2. package/ContextOptions.d.ts +1 -1
  3. package/FronteggAppInstance.d.ts +1 -0
  4. package/FronteggAppOptions.d.ts +10 -2
  5. package/FronteggMetadata.d.ts +5 -0
  6. package/Localizations/AdminPortalLocalizations/navigation.d.ts +4 -0
  7. package/Localizations/AdminPortalLocalizations/sso.d.ts +27 -0
  8. package/Localizations/LocalizationOverrides.d.ts +1 -0
  9. package/Localizations/LocalizationType.d.ts +1 -0
  10. package/Localizations/LoginBoxLocalization/acceptInvitation.d.ts +4 -0
  11. package/Localizations/LoginBoxLocalization/activateAccount.d.ts +4 -0
  12. package/Localizations/LoginBoxLocalization/forgetPassword.d.ts +8 -0
  13. package/Localizations/LoginBoxLocalization/index.d.ts +8 -0
  14. package/Localizations/LoginBoxLocalization/login.d.ts +16 -0
  15. package/Localizations/LoginBoxLocalization/resetPassword.d.ts +8 -0
  16. package/Localizations/LoginBoxLocalization/signup.d.ts +8 -0
  17. package/Metadata/index.d.ts +2 -0
  18. package/ThemeOptions/AdminPortalThemeOptions.d.ts +29 -0
  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 +171 -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 +44 -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 +16 -5
  35. package/node/index.js +16 -5
  36. package/package.json +1 -1
@@ -6,8 +6,10 @@ import { Transitions, TransitionsOptions } from './TransitionsOptions';
6
6
  import { Breakpoints, BreakpointsOptions } from './BreakpointsOptions';
7
7
  import { ComponentsOptions } from './ComponentsOptions';
8
8
  import { TypographyOptions, Typography } from './TypographyOptions';
9
- import { AdminPortalThemeOptions } from './AdminPortalThemeOptions';
10
- import { LoginBoxThemeOptions } from './LoginBoxThemeOptions';
9
+ import { AdminPortalTheme, AdminPortalThemeOptions } from './AdminPortalThemeOptions';
10
+ import { LoginBoxTheme, LoginBoxThemeOptions } from './LoginBoxTheme';
11
+ export * from './LoginBoxTheme';
12
+ export * from './ComponentsOptions';
11
13
  export declare type Direction = 'ltr' | 'rtl';
12
14
  export interface FronteggThemeOptions {
13
15
  palette?: ThemePaletteOptions;
@@ -21,107 +23,7 @@ export interface FronteggThemeOptions {
21
23
  typography?: TypographyOptions;
22
24
  adminPortal?: AdminPortalThemeOptions;
23
25
  loginBox?: LoginBoxThemeOptions;
24
- navigation?: {
25
- groupTitleColor?: CSSProperties['color'];
26
- groupTitleSize?: CSSProperties['fontSize'];
27
- headerColor?: CSSProperties['color'];
28
- subHeaderColor?: CSSProperties['color'];
29
- background?: CSSProperties['background'];
30
- default: {
31
- color?: CSSProperties['color'];
32
- borderColor?: CSSProperties['borderColor'];
33
- avatarBgColor?: CSSProperties['background'];
34
- avatarColor?: CSSProperties['color'];
35
- };
36
- hover: {
37
- color?: CSSProperties['color'];
38
- background?: CSSProperties['background'];
39
- borderColor?: CSSProperties['borderColor'];
40
- avatarColor?: CSSProperties['color'];
41
- avatarBgColor?: CSSProperties['backgroundColor'];
42
- };
43
- selected: {
44
- color?: CSSProperties['color'];
45
- background?: CSSProperties['background'];
46
- borderColor?: CSSProperties['borderColor'];
47
- avatarColor?: CSSProperties['color'];
48
- avatarBgColor?: CSSProperties['backgroundColor'];
49
- };
50
- };
51
- dialog?: {
52
- headerBackground?: CSSProperties['background'];
53
- headerTextColor?: CSSProperties['color'];
54
- bodyBackground?: CSSProperties['background'];
55
- footerBackground?: CSSProperties['background'];
56
- };
57
- socialLogins?: {
58
- rowLayout?: boolean;
59
- google?: socialLogin;
60
- github?: socialLogin;
61
- facebook?: socialLogin;
62
- microsoft?: socialLogin;
63
- };
64
- rightPanel?: {
65
- headerBackground?: CSSProperties['background'];
66
- pageBackground?: CSSProperties['background'];
67
- elementBackground?: CSSProperties['color'];
68
- profileHeader?: CSSProperties['background'];
69
- tableHeaderBackground?: CSSProperties['background'];
70
- tableBodyBackground?: CSSProperties['background'];
71
- };
72
- authPage?: {
73
- loginBox: {
74
- width?: CSSProperties['width'];
75
- padding?: CSSProperties['padding'];
76
- border?: CSSProperties['border'];
77
- borderRadius?: CSSProperties['borderRadius'];
78
- boxShadow?: CSSProperties['boxShadow'];
79
- backgroundCard?: CSSProperties['background'];
80
- };
81
- loginSignupSwitch?: {
82
- color?: CSSProperties['color'];
83
- fontSize?: CSSProperties['fontSize'];
84
- fontFamily?: CSSProperties['fontFamily'];
85
- textAlign?: CSSProperties['textAlign'];
86
- padding?: CSSProperties['padding'];
87
- margin?: CSSProperties['margin'];
88
- link?: {
89
- color?: CSSProperties['color'];
90
- decoration?: CSSProperties['textDecoration'];
91
- fontWeight?: CSSProperties['fontWeight'];
92
- };
93
- };
94
- inputError?: {
95
- fontFamily?: CSSProperties['fontFamily'];
96
- fontSize?: CSSProperties['fontSize'];
97
- fontWeight?: CSSProperties['fontWeight'];
98
- padding?: CSSProperties['padding'];
99
- };
100
- };
101
- subHeaderMsg?: {
102
- color?: CSSProperties['color'];
103
- fontSize?: CSSProperties['fontSize'];
104
- fontFamily?: CSSProperties['fontFamily'];
105
- textAlign?: CSSProperties['textAlign'];
106
- padding?: CSSProperties['padding'];
107
- margin?: CSSProperties['margin'];
108
- textDecoration?: CSSProperties['textDecoration'];
109
- };
110
26
  }
111
- export declare type socialLogin = {
112
- background?: CSSProperties['background'];
113
- default: {
114
- color?: CSSProperties['color'];
115
- };
116
- hover: {
117
- color?: CSSProperties['color'];
118
- background?: CSSProperties['background'];
119
- };
120
- selected: {
121
- color?: CSSProperties['color'];
122
- background?: CSSProperties['background'];
123
- };
124
- };
125
27
  export interface FronteggTheme {
126
28
  palette: ThemePalette;
127
29
  typographyStyleOptions: CSSProperties;
@@ -132,94 +34,8 @@ export interface FronteggTheme {
132
34
  direction: Direction;
133
35
  components: ComponentsOptions;
134
36
  typography: Typography;
135
- adminPortal?: AdminPortalThemeOptions;
136
- loginBox?: LoginBoxThemeOptions;
137
- navigation: {
138
- groupTitleColor: CSSProperties['color'];
139
- groupTitleSize: CSSProperties['fontSize'];
140
- headerColor: CSSProperties['color'];
141
- subHeaderColor: CSSProperties['color'];
142
- background: CSSProperties['background'];
143
- default: {
144
- color?: CSSProperties['color'];
145
- borderColor?: CSSProperties['borderColor'];
146
- avatarBgColor?: CSSProperties['background'];
147
- avatarColor?: CSSProperties['color'];
148
- };
149
- hover: {
150
- color?: CSSProperties['color'];
151
- background?: CSSProperties['background'];
152
- borderColor?: CSSProperties['borderColor'];
153
- avatarColor?: CSSProperties['color'];
154
- avatarBgColor?: CSSProperties['backgroundColor'];
155
- };
156
- selected: {
157
- color?: CSSProperties['color'];
158
- background?: CSSProperties['background'];
159
- borderColor?: CSSProperties['borderColor'];
160
- avatarColor?: CSSProperties['color'];
161
- avatarBgColor?: CSSProperties['backgroundColor'];
162
- };
163
- };
164
- dialog: {
165
- headerBackground?: CSSProperties['background'];
166
- headerTextColor?: CSSProperties['color'];
167
- bodyBackground?: CSSProperties['background'];
168
- footerBackground?: CSSProperties['background'];
169
- };
170
- socialLogins: {
171
- rowLayout?: boolean;
172
- google?: socialLogin;
173
- github?: socialLogin;
174
- facebook?: socialLogin;
175
- microsoft?: socialLogin;
176
- };
177
- rightPanel: {
178
- headerBackground?: CSSProperties['background'];
179
- pageBackground?: CSSProperties['background'];
180
- elementBackground?: CSSProperties['color'];
181
- profileHeader?: CSSProperties['background'];
182
- tableHeaderBackground?: CSSProperties['background'];
183
- tableBodyBackground?: CSSProperties['background'];
184
- };
185
- authPage: {
186
- loginBox: {
187
- width?: CSSProperties['width'];
188
- padding?: CSSProperties['padding'];
189
- border?: CSSProperties['border'];
190
- borderRadius?: CSSProperties['borderRadius'];
191
- boxShadow?: CSSProperties['boxShadow'];
192
- backgroundCard?: CSSProperties['background'];
193
- };
194
- loginSignupSwitch?: {
195
- color?: CSSProperties['color'];
196
- fontSize?: CSSProperties['fontSize'];
197
- fontFamily?: CSSProperties['fontFamily'];
198
- textAlign?: CSSProperties['textAlign'];
199
- padding?: CSSProperties['padding'];
200
- margin?: CSSProperties['margin'];
201
- link?: {
202
- color?: CSSProperties['color'];
203
- decoration?: CSSProperties['textDecoration'];
204
- fontWeight?: CSSProperties['fontWeight'];
205
- };
206
- };
207
- inputError: {
208
- fontFamily?: CSSProperties['fontFamily'];
209
- fontSize?: CSSProperties['fontSize'];
210
- fontWeight?: CSSProperties['fontWeight'];
211
- padding?: CSSProperties['padding'];
212
- };
213
- };
214
- subHeaderMsg: {
215
- color?: CSSProperties['color'];
216
- fontSize?: CSSProperties['fontSize'];
217
- fontFamily?: CSSProperties['fontFamily'];
218
- textAlign?: CSSProperties['textAlign'];
219
- padding?: CSSProperties['padding'];
220
- margin?: CSSProperties['margin'];
221
- textDecoration?: CSSProperties['textDecoration'];
222
- };
37
+ adminPortal: AdminPortalTheme;
38
+ loginBox: LoginBoxTheme;
223
39
  }
224
40
  export declare type BaseThemeOptions = Omit<FronteggThemeOptions, 'adminPortal' | 'loginBox'>;
225
41
  export declare type BaseTheme = Omit<FronteggTheme, 'adminPortal' | 'loginBox'>;
package/index.js CHANGED
@@ -327,6 +327,7 @@ const getPalette = (theme, defaultTheme) => {
327
327
 
328
328
  const defaultMetadata = {
329
329
  theme: {},
330
+ themeV2: {},
330
331
  navigation: {
331
332
  usage: {
332
333
  visibility: 'hidden',
@@ -334,7 +335,7 @@ const defaultMetadata = {
334
335
  featureFlag: 'fe-usage-page',
335
336
  },
336
337
  webhooks: {
337
- visibility: 'byPermissions',
338
+ visibility: 'hidden',
338
339
  permissions: ['fe.connectivity.read.webhooks'],
339
340
  },
340
341
  roles: {
@@ -350,10 +351,10 @@ const defaultMetadata = {
350
351
  },
351
352
  },
352
353
  personalApiTokens: {
353
- visibility: 'always',
354
+ visibility: 'hidden',
354
355
  },
355
356
  apiTokens: {
356
- visibility: 'byPermissions',
357
+ visibility: 'hidden',
357
358
  permissions: ['fe.secure.read.tenantApiTokens'],
358
359
  },
359
360
  profile: {
@@ -370,7 +371,10 @@ const defaultMetadata = {
370
371
  permissions: ['fe.secure.read.securityPolicy'],
371
372
  },
372
373
  sso: {
373
- visibility: 'byPermissions',
374
+ visibility: 'hidden',
375
+ },
376
+ multipleSSO: {
377
+ visibility: 'hidden',
374
378
  permissions: ['fe.secure.read.samlConfiguration'],
375
379
  },
376
380
  audits: {
@@ -386,6 +390,7 @@ const defaultMetadata = {
386
390
  class Metadata {
387
391
  constructor() {
388
392
  this._theme = defaultMetadata.theme;
393
+ this._themeV2 = defaultMetadata.themeV2;
389
394
  this._navigation = defaultMetadata.navigation;
390
395
  }
391
396
  static getInstance(name = 'default') {
@@ -403,19 +408,25 @@ class Metadata {
403
408
  var _a;
404
409
  return (_a = this._theme) !== null && _a !== void 0 ? _a : {};
405
410
  }
411
+ get themeV2() {
412
+ var _a;
413
+ return (_a = this._themeV2) !== null && _a !== void 0 ? _a : {};
414
+ }
406
415
  get navigation() {
407
416
  var _a;
408
417
  return (_a = this._navigation) !== null && _a !== void 0 ? _a : {};
409
418
  }
410
419
  set(metadata) {
411
- var _a, _b, _c;
420
+ var _a, _b, _c, _d, _e;
412
421
  try {
413
422
  this._navigation = deepMerge.all([(_a = defaultMetadata.navigation) !== null && _a !== void 0 ? _a : {}, (_b = metadata === null || metadata === void 0 ? void 0 : metadata.navigation) !== null && _b !== void 0 ? _b : {}]);
414
423
  this._theme = deepMerge.all([(_c = defaultMetadata.theme) !== null && _c !== void 0 ? _c : {}, getPalette(metadata === null || metadata === void 0 ? void 0 : metadata.theme, defaultMetadata.theme)]);
424
+ this._themeV2 = deepMerge.all([(_d = defaultMetadata.themeV2) !== null && _d !== void 0 ? _d : {}, (_e = metadata === null || metadata === void 0 ? void 0 : metadata.themeV2) !== null && _e !== void 0 ? _e : {}]);
415
425
  }
416
426
  catch (e) {
417
427
  this._navigation = defaultMetadata.navigation;
418
428
  this._theme = defaultMetadata.theme;
429
+ this._themeV2 = defaultMetadata.themeV2;
419
430
  }
420
431
  }
421
432
  }
package/node/index.js CHANGED
@@ -329,6 +329,7 @@ const getPalette = (theme, defaultTheme) => {
329
329
 
330
330
  const defaultMetadata = {
331
331
  theme: {},
332
+ themeV2: {},
332
333
  navigation: {
333
334
  usage: {
334
335
  visibility: 'hidden',
@@ -336,7 +337,7 @@ const defaultMetadata = {
336
337
  featureFlag: 'fe-usage-page',
337
338
  },
338
339
  webhooks: {
339
- visibility: 'byPermissions',
340
+ visibility: 'hidden',
340
341
  permissions: ['fe.connectivity.read.webhooks'],
341
342
  },
342
343
  roles: {
@@ -352,10 +353,10 @@ const defaultMetadata = {
352
353
  },
353
354
  },
354
355
  personalApiTokens: {
355
- visibility: 'always',
356
+ visibility: 'hidden',
356
357
  },
357
358
  apiTokens: {
358
- visibility: 'byPermissions',
359
+ visibility: 'hidden',
359
360
  permissions: ['fe.secure.read.tenantApiTokens'],
360
361
  },
361
362
  profile: {
@@ -372,7 +373,10 @@ const defaultMetadata = {
372
373
  permissions: ['fe.secure.read.securityPolicy'],
373
374
  },
374
375
  sso: {
375
- visibility: 'byPermissions',
376
+ visibility: 'hidden',
377
+ },
378
+ multipleSSO: {
379
+ visibility: 'hidden',
376
380
  permissions: ['fe.secure.read.samlConfiguration'],
377
381
  },
378
382
  audits: {
@@ -388,6 +392,7 @@ const defaultMetadata = {
388
392
  class Metadata {
389
393
  constructor() {
390
394
  this._theme = defaultMetadata.theme;
395
+ this._themeV2 = defaultMetadata.themeV2;
391
396
  this._navigation = defaultMetadata.navigation;
392
397
  }
393
398
  static getInstance(name = 'default') {
@@ -405,19 +410,25 @@ class Metadata {
405
410
  var _a;
406
411
  return (_a = this._theme) !== null && _a !== void 0 ? _a : {};
407
412
  }
413
+ get themeV2() {
414
+ var _a;
415
+ return (_a = this._themeV2) !== null && _a !== void 0 ? _a : {};
416
+ }
408
417
  get navigation() {
409
418
  var _a;
410
419
  return (_a = this._navigation) !== null && _a !== void 0 ? _a : {};
411
420
  }
412
421
  set(metadata) {
413
- var _a, _b, _c;
422
+ var _a, _b, _c, _d, _e;
414
423
  try {
415
424
  this._navigation = cjs.all([(_a = defaultMetadata.navigation) !== null && _a !== void 0 ? _a : {}, (_b = metadata === null || metadata === void 0 ? void 0 : metadata.navigation) !== null && _b !== void 0 ? _b : {}]);
416
425
  this._theme = cjs.all([(_c = defaultMetadata.theme) !== null && _c !== void 0 ? _c : {}, getPalette(metadata === null || metadata === void 0 ? void 0 : metadata.theme, defaultMetadata.theme)]);
426
+ this._themeV2 = cjs.all([(_d = defaultMetadata.themeV2) !== null && _d !== void 0 ? _d : {}, (_e = metadata === null || metadata === void 0 ? void 0 : metadata.themeV2) !== null && _e !== void 0 ? _e : {}]);
417
427
  }
418
428
  catch (e) {
419
429
  this._navigation = defaultMetadata.navigation;
420
430
  this._theme = defaultMetadata.theme;
431
+ this._themeV2 = defaultMetadata.themeV2;
421
432
  }
422
433
  }
423
434
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/types",
3
- "version": "4.43.0",
3
+ "version": "5.1.0",
4
4
  "main": "./node/index.js",
5
5
  "module": "./index.js",
6
6
  "types": "./index.d.ts",