@frontegg/types 5.61.0 → 6.0.1-alpha.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 (197) hide show
  1. package/CheckoutDialogOptions.d.ts +6 -6
  2. package/CheckoutDialogOptions.js +1 -0
  3. package/Common.d.ts +6 -6
  4. package/Common.js +1 -0
  5. package/ContextOptions.d.ts +31 -31
  6. package/ContextOptions.js +1 -0
  7. package/CustomComponents.d.ts +19 -19
  8. package/CustomComponents.js +1 -0
  9. package/FronteggAppInstance.d.ts +23 -23
  10. package/FronteggAppInstance.js +1 -0
  11. package/FronteggAppOptions.d.ts +76 -76
  12. package/FronteggAppOptions.js +1 -0
  13. package/FronteggMetadata.d.ts +88 -88
  14. package/FronteggMetadata.js +1 -0
  15. package/FronteggStoreOptions.d.ts +13 -13
  16. package/FronteggStoreOptions.js +1 -0
  17. package/Localizations/AdminPortalLocalizations/accountSettings.d.ts +216 -216
  18. package/Localizations/AdminPortalLocalizations/accountSettings.js +1 -0
  19. package/Localizations/AdminPortalLocalizations/allUsers.d.ts +275 -275
  20. package/Localizations/AdminPortalLocalizations/allUsers.js +1 -0
  21. package/Localizations/AdminPortalLocalizations/apiTokens.d.ts +137 -137
  22. package/Localizations/AdminPortalLocalizations/apiTokens.js +1 -0
  23. package/Localizations/AdminPortalLocalizations/auditLogs.d.ts +51 -51
  24. package/Localizations/AdminPortalLocalizations/auditLogs.js +1 -0
  25. package/Localizations/AdminPortalLocalizations/index.d.ts +29 -29
  26. package/Localizations/AdminPortalLocalizations/index.js +15 -0
  27. package/Localizations/AdminPortalLocalizations/navigation.d.ts +85 -85
  28. package/Localizations/AdminPortalLocalizations/navigation.js +1 -0
  29. package/Localizations/AdminPortalLocalizations/personalTokens.d.ts +117 -117
  30. package/Localizations/AdminPortalLocalizations/personalTokens.js +1 -0
  31. package/Localizations/AdminPortalLocalizations/privacy.d.ts +182 -182
  32. package/Localizations/AdminPortalLocalizations/privacy.js +1 -0
  33. package/Localizations/AdminPortalLocalizations/profile.d.ts +243 -243
  34. package/Localizations/AdminPortalLocalizations/profile.js +1 -0
  35. package/Localizations/AdminPortalLocalizations/roles.d.ts +88 -88
  36. package/Localizations/AdminPortalLocalizations/roles.js +1 -0
  37. package/Localizations/AdminPortalLocalizations/security.d.ts +182 -182
  38. package/Localizations/AdminPortalLocalizations/security.js +1 -0
  39. package/Localizations/AdminPortalLocalizations/sso.d.ts +398 -398
  40. package/Localizations/AdminPortalLocalizations/sso.js +1 -0
  41. package/Localizations/AdminPortalLocalizations/subscriptions.d.ts +252 -252
  42. package/Localizations/AdminPortalLocalizations/subscriptions.js +1 -0
  43. package/Localizations/AdminPortalLocalizations/users.d.ts +288 -288
  44. package/Localizations/AdminPortalLocalizations/users.js +1 -0
  45. package/Localizations/AdminPortalLocalizations/webhooks.d.ts +157 -157
  46. package/Localizations/AdminPortalLocalizations/webhooks.js +1 -0
  47. package/Localizations/LocalizationOverrides.d.ts +21 -21
  48. package/Localizations/LocalizationOverrides.js +1 -0
  49. package/Localizations/LocalizationType.d.ts +45 -45
  50. package/Localizations/LocalizationType.js +1 -0
  51. package/Localizations/LoginBoxLocalization/SplitPageTypes/index.d.ts +25 -25
  52. package/Localizations/LoginBoxLocalization/SplitPageTypes/index.js +1 -0
  53. package/Localizations/LoginBoxLocalization/acceptInvitation.d.ts +31 -31
  54. package/Localizations/LoginBoxLocalization/acceptInvitation.js +1 -0
  55. package/Localizations/LoginBoxLocalization/activateAccount.d.ts +79 -79
  56. package/Localizations/LoginBoxLocalization/activateAccount.js +1 -0
  57. package/Localizations/LoginBoxLocalization/forgetPassword.d.ts +35 -35
  58. package/Localizations/LoginBoxLocalization/forgetPassword.js +1 -0
  59. package/Localizations/LoginBoxLocalization/index.d.ts +20 -20
  60. package/Localizations/LoginBoxLocalization/index.js +11 -0
  61. package/Localizations/LoginBoxLocalization/login.d.ts +307 -335
  62. package/Localizations/LoginBoxLocalization/login.js +1 -0
  63. package/Localizations/LoginBoxLocalization/recoveryMfa.d.ts +23 -23
  64. package/Localizations/LoginBoxLocalization/recoveryMfa.js +1 -0
  65. package/Localizations/LoginBoxLocalization/resetPassword.d.ts +67 -67
  66. package/Localizations/LoginBoxLocalization/resetPassword.js +1 -0
  67. package/Localizations/LoginBoxLocalization/resetPhoneNumber.d.ts +34 -34
  68. package/Localizations/LoginBoxLocalization/resetPhoneNumber.js +1 -0
  69. package/Localizations/LoginBoxLocalization/signup.d.ts +186 -186
  70. package/Localizations/LoginBoxLocalization/signup.js +1 -0
  71. package/Localizations/LoginBoxLocalization/socialLogins.d.ts +34 -34
  72. package/Localizations/LoginBoxLocalization/socialLogins.js +1 -0
  73. package/Localizations/index.d.ts +4 -4
  74. package/Localizations/index.js +4 -0
  75. package/Localizations/package.json +6 -0
  76. package/Metadata/colorManipulator.d.ts +73 -73
  77. package/Metadata/colorManipulator.js +186 -0
  78. package/Metadata/getPalette.d.ts +3 -3
  79. package/Metadata/getPalette.js +58 -0
  80. package/Metadata/index.d.ts +15 -15
  81. package/Metadata/index.js +126 -0
  82. package/Metadata/package.json +6 -0
  83. package/PrivateOptions.d.ts +25 -25
  84. package/PrivateOptions.js +1 -0
  85. package/ThemeOptions/AdminPortalThemeOptions.d.ts +84 -84
  86. package/ThemeOptions/AdminPortalThemeOptions.js +16 -0
  87. package/ThemeOptions/BreakpointsOptions.d.ts +17 -17
  88. package/ThemeOptions/BreakpointsOptions.js +1 -0
  89. package/ThemeOptions/ComponentsOptions.d.ts +751 -751
  90. package/ThemeOptions/ComponentsOptions.js +2 -0
  91. package/ThemeOptions/LoginBoxTheme/AcceptInvitationTheme.d.ts +21 -21
  92. package/ThemeOptions/LoginBoxTheme/AcceptInvitationTheme.js +1 -0
  93. package/ThemeOptions/LoginBoxTheme/ActivateAccountPageTheme.d.ts +51 -51
  94. package/ThemeOptions/LoginBoxTheme/ActivateAccountPageTheme.js +1 -0
  95. package/ThemeOptions/LoginBoxTheme/CustomLoginComponents.d.ts +12 -12
  96. package/ThemeOptions/LoginBoxTheme/CustomLoginComponents.js +1 -0
  97. package/ThemeOptions/LoginBoxTheme/ForgotPasswordTheme.d.ts +45 -45
  98. package/ThemeOptions/LoginBoxTheme/ForgotPasswordTheme.js +1 -0
  99. package/ThemeOptions/LoginBoxTheme/LoaderTheme.d.ts +7 -7
  100. package/ThemeOptions/LoginBoxTheme/LoaderTheme.js +1 -0
  101. package/ThemeOptions/LoginBoxTheme/LoginBoxCommon.d.ts +226 -226
  102. package/ThemeOptions/LoginBoxTheme/LoginBoxCommon.js +1 -0
  103. package/ThemeOptions/LoginBoxTheme/LoginPageTheme.d.ts +136 -148
  104. package/ThemeOptions/LoginBoxTheme/LoginPageTheme.js +1 -0
  105. package/ThemeOptions/LoginBoxTheme/ResetPasswordTheme.d.ts +47 -47
  106. package/ThemeOptions/LoginBoxTheme/ResetPasswordTheme.js +1 -0
  107. package/ThemeOptions/LoginBoxTheme/ResetPhoneNumberTheme.d.ts +71 -71
  108. package/ThemeOptions/LoginBoxTheme/ResetPhoneNumberTheme.js +1 -0
  109. package/ThemeOptions/LoginBoxTheme/SignupPageTheme.d.ts +95 -95
  110. package/ThemeOptions/LoginBoxTheme/SignupPageTheme.js +1 -0
  111. package/ThemeOptions/LoginBoxTheme/SocialLoginsTheme.d.ts +64 -64
  112. package/ThemeOptions/LoginBoxTheme/SocialLoginsTheme.js +1 -0
  113. package/ThemeOptions/LoginBoxTheme/index.d.ts +53 -53
  114. package/ThemeOptions/LoginBoxTheme/index.js +11 -0
  115. package/ThemeOptions/LoginBoxThemeOptions.d.ts +46 -46
  116. package/ThemeOptions/LoginBoxThemeOptions.js +1 -0
  117. package/ThemeOptions/Palette.d.ts +85 -85
  118. package/ThemeOptions/Palette.js +1 -0
  119. package/ThemeOptions/Shadows.d.ts +1 -1
  120. package/ThemeOptions/Shadows.js +1 -0
  121. package/ThemeOptions/SpacingOptions.d.ts +9 -9
  122. package/ThemeOptions/SpacingOptions.js +1 -0
  123. package/ThemeOptions/TransitionsOptions.d.ts +23 -23
  124. package/ThemeOptions/TransitionsOptions.js +1 -0
  125. package/ThemeOptions/TypographyOptions.d.ts +13 -13
  126. package/ThemeOptions/TypographyOptions.js +1 -0
  127. package/ThemeOptions/index.d.ts +41 -41
  128. package/ThemeOptions/index.js +3 -0
  129. package/ThemeOptions/package.json +6 -0
  130. package/index.d.ts +7 -7
  131. package/index.js +12 -444
  132. package/node/CheckoutDialogOptions.js +5 -0
  133. package/node/Common.js +5 -0
  134. package/node/ContextOptions.js +5 -0
  135. package/node/CustomComponents.js +5 -0
  136. package/node/FronteggAppInstance.js +5 -0
  137. package/node/FronteggAppOptions.js +5 -0
  138. package/node/FronteggMetadata.js +5 -0
  139. package/node/FronteggStoreOptions.js +5 -0
  140. package/node/Localizations/AdminPortalLocalizations/accountSettings.js +5 -0
  141. package/node/Localizations/AdminPortalLocalizations/allUsers.js +5 -0
  142. package/node/Localizations/AdminPortalLocalizations/apiTokens.js +5 -0
  143. package/node/Localizations/AdminPortalLocalizations/auditLogs.js +5 -0
  144. package/node/Localizations/AdminPortalLocalizations/index.js +187 -0
  145. package/node/Localizations/AdminPortalLocalizations/navigation.js +5 -0
  146. package/node/Localizations/AdminPortalLocalizations/personalTokens.js +5 -0
  147. package/node/Localizations/AdminPortalLocalizations/privacy.js +5 -0
  148. package/node/Localizations/AdminPortalLocalizations/profile.js +5 -0
  149. package/node/Localizations/AdminPortalLocalizations/roles.js +5 -0
  150. package/node/Localizations/AdminPortalLocalizations/security.js +5 -0
  151. package/node/Localizations/AdminPortalLocalizations/sso.js +5 -0
  152. package/node/Localizations/AdminPortalLocalizations/subscriptions.js +5 -0
  153. package/node/Localizations/AdminPortalLocalizations/users.js +5 -0
  154. package/node/Localizations/AdminPortalLocalizations/webhooks.js +5 -0
  155. package/node/Localizations/LocalizationOverrides.js +5 -0
  156. package/node/Localizations/LocalizationType.js +5 -0
  157. package/node/Localizations/LoginBoxLocalization/SplitPageTypes/index.js +5 -0
  158. package/node/Localizations/LoginBoxLocalization/acceptInvitation.js +5 -0
  159. package/node/Localizations/LoginBoxLocalization/activateAccount.js +5 -0
  160. package/node/Localizations/LoginBoxLocalization/forgetPassword.js +5 -0
  161. package/node/Localizations/LoginBoxLocalization/index.js +135 -0
  162. package/node/Localizations/LoginBoxLocalization/login.js +5 -0
  163. package/node/Localizations/LoginBoxLocalization/recoveryMfa.js +5 -0
  164. package/node/Localizations/LoginBoxLocalization/resetPassword.js +5 -0
  165. package/node/Localizations/LoginBoxLocalization/resetPhoneNumber.js +5 -0
  166. package/node/Localizations/LoginBoxLocalization/signup.js +5 -0
  167. package/node/Localizations/LoginBoxLocalization/socialLogins.js +5 -0
  168. package/node/Localizations/index.js +57 -0
  169. package/node/Metadata/colorManipulator.js +210 -0
  170. package/node/Metadata/getPalette.js +70 -0
  171. package/node/Metadata/index.js +140 -0
  172. package/node/PrivateOptions.js +5 -0
  173. package/node/ThemeOptions/AdminPortalThemeOptions.js +23 -0
  174. package/node/ThemeOptions/BreakpointsOptions.js +5 -0
  175. package/node/ThemeOptions/ComponentsOptions.js +6 -0
  176. package/node/ThemeOptions/LoginBoxTheme/AcceptInvitationTheme.js +5 -0
  177. package/node/ThemeOptions/LoginBoxTheme/ActivateAccountPageTheme.js +5 -0
  178. package/node/ThemeOptions/LoginBoxTheme/CustomLoginComponents.js +5 -0
  179. package/node/ThemeOptions/LoginBoxTheme/ForgotPasswordTheme.js +5 -0
  180. package/node/ThemeOptions/LoginBoxTheme/LoaderTheme.js +5 -0
  181. package/node/ThemeOptions/LoginBoxTheme/LoginBoxCommon.js +5 -0
  182. package/node/ThemeOptions/LoginBoxTheme/LoginPageTheme.js +5 -0
  183. package/node/ThemeOptions/LoginBoxTheme/ResetPasswordTheme.js +5 -0
  184. package/node/ThemeOptions/LoginBoxTheme/ResetPhoneNumberTheme.js +5 -0
  185. package/node/ThemeOptions/LoginBoxTheme/SignupPageTheme.js +5 -0
  186. package/node/ThemeOptions/LoginBoxTheme/SocialLoginsTheme.js +5 -0
  187. package/node/ThemeOptions/LoginBoxTheme/index.js +135 -0
  188. package/node/ThemeOptions/LoginBoxThemeOptions.js +5 -0
  189. package/node/ThemeOptions/Palette.js +5 -0
  190. package/node/ThemeOptions/Shadows.js +5 -0
  191. package/node/ThemeOptions/SpacingOptions.js +5 -0
  192. package/node/ThemeOptions/TransitionsOptions.js +5 -0
  193. package/node/ThemeOptions/TypographyOptions.js +5 -0
  194. package/node/ThemeOptions/index.js +31 -0
  195. package/node/index.js +101 -446
  196. package/package.json +8 -5
  197. package/ThemeOptions/helpers.d.ts +0 -0
@@ -0,0 +1,210 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.alpha = alpha;
7
+ exports.darken = darken;
8
+ exports.decomposeColor = decomposeColor;
9
+ exports.emphasize = emphasize;
10
+ exports.getLuminance = getLuminance;
11
+ exports.hexToRgb = hexToRgb;
12
+ exports.hslToRgb = hslToRgb;
13
+ exports.lighten = lighten;
14
+ exports.recomposeColor = recomposeColor;
15
+ exports.rgbToHex = rgbToHex;
16
+
17
+ function clamp(value, min = 0, max = 1) {
18
+ return Math.min(Math.max(min, value), max);
19
+ }
20
+
21
+ function hexToRgb(color) {
22
+ color = color.substr(1);
23
+ const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');
24
+ let colors = color.match(re);
25
+
26
+ if (colors && colors[0].length === 1) {
27
+ colors = colors.map(n => n + n);
28
+ }
29
+
30
+ return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {
31
+ return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;
32
+ }).join(', ')})` : '';
33
+ }
34
+
35
+ function intToHex(int) {
36
+ const hex = int.toString(16);
37
+ return hex.length === 1 ? `0${hex}` : hex;
38
+ }
39
+
40
+ function decomposeColor(color) {
41
+ if (color.type) {
42
+ return color;
43
+ }
44
+
45
+ if (color.charAt(0) === '#') {
46
+ return decomposeColor(hexToRgb(color));
47
+ }
48
+
49
+ const marker = color.indexOf('(');
50
+ const type = color.substring(0, marker);
51
+
52
+ if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {
53
+ throw new Error('MUI: Unsupported `%s` color.\n' + 'The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color(). ' + color);
54
+ }
55
+
56
+ let values = color.substring(marker + 1, color.length - 1);
57
+ let colorSpace;
58
+
59
+ if (type === 'color') {
60
+ values = values.split(' ');
61
+ colorSpace = values.shift();
62
+
63
+ if (values.length === 4 && values[3].charAt(0) === '/') {
64
+ values[3] = values[3].substr(1);
65
+ }
66
+
67
+ if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {
68
+ throw new Error('MUI: unsupported `%s` color space.\n' + 'The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.' + colorSpace);
69
+ }
70
+ } else {
71
+ values = values.split(',');
72
+ }
73
+
74
+ values = values.map(value => parseFloat(value));
75
+ return {
76
+ type,
77
+ values,
78
+ colorSpace
79
+ };
80
+ }
81
+
82
+ function recomposeColor(color) {
83
+ const {
84
+ type,
85
+ colorSpace
86
+ } = color;
87
+ let {
88
+ values
89
+ } = color;
90
+
91
+ if (type.indexOf('rgb') !== -1) {
92
+ values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);
93
+ } else if (type.indexOf('hsl') !== -1) {
94
+ values[1] = `${values[1]}%`;
95
+ values[2] = `${values[2]}%`;
96
+ }
97
+
98
+ if (type.indexOf('color') !== -1) {
99
+ values = `${colorSpace} ${values.join(' ')}`;
100
+ } else {
101
+ values = `${values.join(', ')}`;
102
+ }
103
+
104
+ return `${type}(${values})`;
105
+ }
106
+
107
+ function rgbToHex(color) {
108
+ if (color.indexOf('#') === 0) {
109
+ return color;
110
+ }
111
+
112
+ const {
113
+ values
114
+ } = decomposeColor(color);
115
+ return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;
116
+ }
117
+
118
+ function hslToRgb(color) {
119
+ color = decomposeColor(color);
120
+ const {
121
+ values
122
+ } = color;
123
+ const h = values[0];
124
+ const s = values[1] / 100;
125
+ const l = values[2] / 100;
126
+ const a = s * Math.min(l, 1 - l);
127
+
128
+ const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
129
+
130
+ let type = 'rgb';
131
+ const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];
132
+
133
+ if (color.type === 'hsla') {
134
+ type += 'a';
135
+ rgb.push(values[3]);
136
+ }
137
+
138
+ return recomposeColor({
139
+ type,
140
+ values: rgb
141
+ });
142
+ }
143
+
144
+ function getLuminance(color) {
145
+ color = decomposeColor(color);
146
+ let rgb = color.type === 'hsl' ? decomposeColor(hslToRgb(color)).values : color.values;
147
+ rgb = rgb.map(val => {
148
+ if (color.type !== 'color') {
149
+ val /= 255;
150
+ }
151
+
152
+ return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;
153
+ });
154
+ return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));
155
+ }
156
+
157
+ function alpha(color, value) {
158
+ color = decomposeColor(color);
159
+ value = clamp(value);
160
+
161
+ if (color.type === 'rgb' || color.type === 'hsl') {
162
+ color.type += 'a';
163
+ }
164
+
165
+ if (color.type === 'color') {
166
+ color.values[3] = `/${value}`;
167
+ } else {
168
+ color.values[3] = value;
169
+ }
170
+
171
+ return recomposeColor(color);
172
+ }
173
+
174
+ function darken(color, coefficient) {
175
+ color = decomposeColor(color);
176
+ coefficient = clamp(coefficient);
177
+
178
+ if (color.type.indexOf('hsl') !== -1) {
179
+ color.values[2] *= 1 - coefficient;
180
+ } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {
181
+ for (let i = 0; i < 3; i += 1) {
182
+ color.values[i] *= 1 - coefficient;
183
+ }
184
+ }
185
+
186
+ return recomposeColor(color);
187
+ }
188
+
189
+ function lighten(color, coefficient) {
190
+ color = decomposeColor(color);
191
+ coefficient = clamp(coefficient);
192
+
193
+ if (color.type.indexOf('hsl') !== -1) {
194
+ color.values[2] += (100 - color.values[2]) * coefficient;
195
+ } else if (color.type.indexOf('rgb') !== -1) {
196
+ for (let i = 0; i < 3; i += 1) {
197
+ color.values[i] += (255 - color.values[i]) * coefficient;
198
+ }
199
+ } else if (color.type.indexOf('color') !== -1) {
200
+ for (let i = 0; i < 3; i += 1) {
201
+ color.values[i] += (1 - color.values[i]) * coefficient;
202
+ }
203
+ }
204
+
205
+ return recomposeColor(color);
206
+ }
207
+
208
+ function emphasize(color, coefficient = 0.15) {
209
+ return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);
210
+ }
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.getPalette = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _colorManipulator = require("./colorManipulator");
13
+
14
+ const generateMainColorObject = color => {
15
+ if (!!color) {
16
+ return {
17
+ main: color,
18
+ light: (0, _colorManipulator.rgbToHex)((0, _colorManipulator.lighten)(color, 0.4)),
19
+ dark: (0, _colorManipulator.rgbToHex)((0, _colorManipulator.darken)(color, 0.15)),
20
+ hover: (0, _colorManipulator.rgbToHex)((0, _colorManipulator.darken)(color, 0.15)),
21
+ active: (0, _colorManipulator.rgbToHex)((0, _colorManipulator.darken)(color, 0.20))
22
+ };
23
+ }
24
+ };
25
+
26
+ const generateSubColorObject = color => {
27
+ if (!!color) {
28
+ return {
29
+ main: color,
30
+ light: (0, _colorManipulator.lighten)(color, 0.7),
31
+ dark: (0, _colorManipulator.darken)(color, 0.2)
32
+ };
33
+ }
34
+ };
35
+
36
+ const getPalette = (theme, defaultTheme) => {
37
+ var _theme$palette, _theme$palette2, _theme$palette$primar, _theme$palette3, _theme$palette4, _theme$palette$second, _theme$palette5, _theme$palette6, _theme$palette7, _theme$palette8, _theme$palette9, _theme$palette10;
38
+
39
+ if (!(theme != null && theme.palette) || typeof (theme == null ? void 0 : (_theme$palette = theme.palette) == null ? void 0 : _theme$palette.primary) !== 'string') {
40
+ return {};
41
+ }
42
+
43
+ return (0, _extends2.default)({}, defaultTheme, {
44
+ palette: {
45
+ primary: (0, _extends2.default)({}, generateMainColorObject(theme == null ? void 0 : (_theme$palette2 = theme.palette) == null ? void 0 : _theme$palette2.primary), {
46
+ contrastText: (_theme$palette$primar = theme == null ? void 0 : (_theme$palette3 = theme.palette) == null ? void 0 : _theme$palette3.primaryText) != null ? _theme$palette$primar : '#000000'
47
+ }),
48
+ secondary: (0, _extends2.default)({}, generateMainColorObject(theme == null ? void 0 : (_theme$palette4 = theme.palette) == null ? void 0 : _theme$palette4.secondary), {
49
+ contrastText: (_theme$palette$second = theme == null ? void 0 : (_theme$palette5 = theme.palette) == null ? void 0 : _theme$palette5.secondaryText) != null ? _theme$palette$second : '#000000'
50
+ }),
51
+ danger: (0, _extends2.default)({}, generateMainColorObject(theme == null ? void 0 : (_theme$palette6 = theme.palette) == null ? void 0 : _theme$palette6.error), {
52
+ contrastText: '#FFF'
53
+ }),
54
+ success: (0, _extends2.default)({}, generateSubColorObject(theme == null ? void 0 : (_theme$palette7 = theme.palette) == null ? void 0 : _theme$palette7.success), {
55
+ contrastText: '#FFF'
56
+ }),
57
+ error: (0, _extends2.default)({}, generateSubColorObject(theme == null ? void 0 : (_theme$palette8 = theme.palette) == null ? void 0 : _theme$palette8.error), {
58
+ contrastText: '#FFF'
59
+ }),
60
+ warning: (0, _extends2.default)({}, generateSubColorObject(theme == null ? void 0 : (_theme$palette9 = theme.palette) == null ? void 0 : _theme$palette9.warning), {
61
+ contrastText: '#FFF'
62
+ }),
63
+ info: (0, _extends2.default)({}, generateSubColorObject(theme == null ? void 0 : (_theme$palette10 = theme.palette) == null ? void 0 : _theme$palette10.info), {
64
+ contrastText: '#FFF'
65
+ })
66
+ }
67
+ });
68
+ };
69
+
70
+ exports.getPalette = getPalette;
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Metadata = void 0;
9
+
10
+ var _deepmerge = _interopRequireDefault(require("deepmerge"));
11
+
12
+ var _getPalette = require("./getPalette");
13
+
14
+ const defaultMetadata = {
15
+ theme: {},
16
+ themeV2: {},
17
+ localizations: {},
18
+ navigation: {
19
+ usage: {
20
+ visibility: 'hidden',
21
+ permissions: ['fe.usage.read'],
22
+ featureFlag: 'fe-usage-page'
23
+ },
24
+ webhooks: {
25
+ visibility: 'hidden',
26
+ permissions: ['fe.connectivity.read.webhooks']
27
+ },
28
+ roles: {
29
+ visibility: 'hidden',
30
+ featureFlag: 'fe-roles-page',
31
+ permissions: ['fe.secure.read.roles']
32
+ },
33
+ users: {
34
+ visibility: 'always',
35
+ permissions: ['fe.secure.read.users'],
36
+ inviteDialog: {
37
+ phoneNumberField: 'optional'
38
+ }
39
+ },
40
+ personalApiTokens: {
41
+ visibility: 'hidden'
42
+ },
43
+ apiTokens: {
44
+ visibility: 'hidden',
45
+ permissions: ['fe.secure.read.tenantApiTokens']
46
+ },
47
+ profile: {
48
+ visibility: 'always'
49
+ },
50
+ privacy: {
51
+ visibility: 'always'
52
+ },
53
+ account: {
54
+ visibility: 'always'
55
+ },
56
+ security: {
57
+ visibility: 'always',
58
+ permissions: ['fe.secure.read.securityPolicy']
59
+ },
60
+ sso: {
61
+ visibility: 'hidden'
62
+ },
63
+ multipleSSO: {
64
+ visibility: 'hidden',
65
+ permissions: ['fe.secure.read.samlConfiguration']
66
+ },
67
+ audits: {
68
+ visibility: 'always',
69
+ permissions: ['fe.secure.read.audits']
70
+ },
71
+ subscriptions: {
72
+ visibility: 'hidden',
73
+ permissions: ['fe.subscriptions.*']
74
+ }
75
+ }
76
+ };
77
+
78
+ class Metadata {
79
+ constructor() {
80
+ this._theme = defaultMetadata.theme;
81
+ this._themeV2 = defaultMetadata.themeV2;
82
+ this._navigation = defaultMetadata.navigation;
83
+ this._localizations = defaultMetadata.localizations;
84
+ }
85
+
86
+ static getInstance(name = 'default') {
87
+ return this._instances[name];
88
+ }
89
+
90
+ static set(metadata, name = 'default') {
91
+ const metadataInstance = new Metadata();
92
+ metadataInstance.set(metadata);
93
+ Metadata._instances[name] = metadataInstance;
94
+ return metadataInstance;
95
+ }
96
+
97
+ get theme() {
98
+ var _this$_theme;
99
+
100
+ return (_this$_theme = this._theme) != null ? _this$_theme : {};
101
+ }
102
+
103
+ get themeV2() {
104
+ var _this$_themeV;
105
+
106
+ return (_this$_themeV = this._themeV2) != null ? _this$_themeV : {};
107
+ }
108
+
109
+ get navigation() {
110
+ var _this$_navigation;
111
+
112
+ return (_this$_navigation = this._navigation) != null ? _this$_navigation : {};
113
+ }
114
+
115
+ get localizations() {
116
+ var _this$_localizations;
117
+
118
+ return (_this$_localizations = this._localizations) != null ? _this$_localizations : {};
119
+ }
120
+
121
+ set(metadata) {
122
+ try {
123
+ var _defaultMetadata$navi, _metadata$navigation, _defaultMetadata$them, _defaultMetadata$them2, _metadata$themeV, _defaultMetadata$loca, _metadata$localizatio;
124
+
125
+ this._navigation = _deepmerge.default.all([(_defaultMetadata$navi = defaultMetadata.navigation) != null ? _defaultMetadata$navi : {}, (_metadata$navigation = metadata == null ? void 0 : metadata.navigation) != null ? _metadata$navigation : {}]);
126
+ this._theme = _deepmerge.default.all([(_defaultMetadata$them = defaultMetadata.theme) != null ? _defaultMetadata$them : {}, (0, _getPalette.getPalette)(metadata == null ? void 0 : metadata.theme, defaultMetadata.theme)]);
127
+ this._themeV2 = _deepmerge.default.all([(_defaultMetadata$them2 = defaultMetadata.themeV2) != null ? _defaultMetadata$them2 : {}, (_metadata$themeV = metadata == null ? void 0 : metadata.themeV2) != null ? _metadata$themeV : {}]);
128
+ this._localizations = _deepmerge.default.all([(_defaultMetadata$loca = defaultMetadata.localizations) != null ? _defaultMetadata$loca : {}, (_metadata$localizatio = metadata == null ? void 0 : metadata.localizations) != null ? _metadata$localizatio : {}]);
129
+ } catch (e) {
130
+ this._navigation = defaultMetadata.navigation;
131
+ this._theme = defaultMetadata.theme;
132
+ this._themeV2 = defaultMetadata.themeV2;
133
+ this._localizations = defaultMetadata.localizations;
134
+ }
135
+ }
136
+
137
+ }
138
+
139
+ exports.Metadata = Metadata;
140
+ Metadata._instances = {};
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AdminPortalPages = void 0;
7
+ let AdminPortalPages;
8
+ exports.AdminPortalPages = AdminPortalPages;
9
+
10
+ (function (AdminPortalPages) {
11
+ AdminPortalPages["Profile"] = "profile";
12
+ AdminPortalPages["Privacy"] = "privacy";
13
+ AdminPortalPages["PersonalTokens"] = "personalTokens";
14
+ AdminPortalPages["AccountDetails"] = "accountDetails";
15
+ AdminPortalPages["Users"] = "users";
16
+ AdminPortalPages["Security"] = "security";
17
+ AdminPortalPages["Sso"] = "sso";
18
+ AdminPortalPages["AuditLogs"] = "auditLogs";
19
+ AdminPortalPages["Webhooks"] = "webhooks";
20
+ AdminPortalPages["ApiTokens"] = "apiTokens";
21
+ AdminPortalPages["Roles"] = "roles";
22
+ AdminPortalPages["Subscription"] = "subscription";
23
+ })(AdminPortalPages || (exports.AdminPortalPages = AdminPortalPages = {}));
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ ;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _LoginBoxCommon = require("./LoginBoxCommon");
8
+
9
+ Object.keys(_LoginBoxCommon).forEach(function (key) {
10
+ if (key === "default" || key === "__esModule") return;
11
+ if (key in exports && exports[key] === _LoginBoxCommon[key]) return;
12
+ Object.defineProperty(exports, key, {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _LoginBoxCommon[key];
16
+ }
17
+ });
18
+ });
19
+
20
+ var _LoginPageTheme = require("./LoginPageTheme");
21
+
22
+ Object.keys(_LoginPageTheme).forEach(function (key) {
23
+ if (key === "default" || key === "__esModule") return;
24
+ if (key in exports && exports[key] === _LoginPageTheme[key]) return;
25
+ Object.defineProperty(exports, key, {
26
+ enumerable: true,
27
+ get: function () {
28
+ return _LoginPageTheme[key];
29
+ }
30
+ });
31
+ });
32
+
33
+ var _SignupPageTheme = require("./SignupPageTheme");
34
+
35
+ Object.keys(_SignupPageTheme).forEach(function (key) {
36
+ if (key === "default" || key === "__esModule") return;
37
+ if (key in exports && exports[key] === _SignupPageTheme[key]) return;
38
+ Object.defineProperty(exports, key, {
39
+ enumerable: true,
40
+ get: function () {
41
+ return _SignupPageTheme[key];
42
+ }
43
+ });
44
+ });
45
+
46
+ var _CustomLoginComponents = require("./CustomLoginComponents");
47
+
48
+ Object.keys(_CustomLoginComponents).forEach(function (key) {
49
+ if (key === "default" || key === "__esModule") return;
50
+ if (key in exports && exports[key] === _CustomLoginComponents[key]) return;
51
+ Object.defineProperty(exports, key, {
52
+ enumerable: true,
53
+ get: function () {
54
+ return _CustomLoginComponents[key];
55
+ }
56
+ });
57
+ });
58
+
59
+ var _SocialLoginsTheme = require("./SocialLoginsTheme");
60
+
61
+ Object.keys(_SocialLoginsTheme).forEach(function (key) {
62
+ if (key === "default" || key === "__esModule") return;
63
+ if (key in exports && exports[key] === _SocialLoginsTheme[key]) return;
64
+ Object.defineProperty(exports, key, {
65
+ enumerable: true,
66
+ get: function () {
67
+ return _SocialLoginsTheme[key];
68
+ }
69
+ });
70
+ });
71
+
72
+ var _ForgotPasswordTheme = require("./ForgotPasswordTheme");
73
+
74
+ Object.keys(_ForgotPasswordTheme).forEach(function (key) {
75
+ if (key === "default" || key === "__esModule") return;
76
+ if (key in exports && exports[key] === _ForgotPasswordTheme[key]) return;
77
+ Object.defineProperty(exports, key, {
78
+ enumerable: true,
79
+ get: function () {
80
+ return _ForgotPasswordTheme[key];
81
+ }
82
+ });
83
+ });
84
+
85
+ var _ResetPhoneNumberTheme = require("./ResetPhoneNumberTheme");
86
+
87
+ Object.keys(_ResetPhoneNumberTheme).forEach(function (key) {
88
+ if (key === "default" || key === "__esModule") return;
89
+ if (key in exports && exports[key] === _ResetPhoneNumberTheme[key]) return;
90
+ Object.defineProperty(exports, key, {
91
+ enumerable: true,
92
+ get: function () {
93
+ return _ResetPhoneNumberTheme[key];
94
+ }
95
+ });
96
+ });
97
+
98
+ var _ResetPasswordTheme = require("./ResetPasswordTheme");
99
+
100
+ Object.keys(_ResetPasswordTheme).forEach(function (key) {
101
+ if (key === "default" || key === "__esModule") return;
102
+ if (key in exports && exports[key] === _ResetPasswordTheme[key]) return;
103
+ Object.defineProperty(exports, key, {
104
+ enumerable: true,
105
+ get: function () {
106
+ return _ResetPasswordTheme[key];
107
+ }
108
+ });
109
+ });
110
+
111
+ var _ActivateAccountPageTheme = require("./ActivateAccountPageTheme");
112
+
113
+ Object.keys(_ActivateAccountPageTheme).forEach(function (key) {
114
+ if (key === "default" || key === "__esModule") return;
115
+ if (key in exports && exports[key] === _ActivateAccountPageTheme[key]) return;
116
+ Object.defineProperty(exports, key, {
117
+ enumerable: true,
118
+ get: function () {
119
+ return _ActivateAccountPageTheme[key];
120
+ }
121
+ });
122
+ });
123
+
124
+ var _AcceptInvitationTheme = require("./AcceptInvitationTheme");
125
+
126
+ Object.keys(_AcceptInvitationTheme).forEach(function (key) {
127
+ if (key === "default" || key === "__esModule") return;
128
+ if (key in exports && exports[key] === _AcceptInvitationTheme[key]) return;
129
+ Object.defineProperty(exports, key, {
130
+ enumerable: true,
131
+ get: function () {
132
+ return _AcceptInvitationTheme[key];
133
+ }
134
+ });
135
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });