@magmamath/frontend-config 1.0.16-rc.8 → 1.0.16
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/dist/index.d.mts +18 -28
- package/dist/index.d.ts +18 -28
- package/dist/index.js +3280 -313
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3280 -313
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -5
package/dist/index.d.mts
CHANGED
|
@@ -34,8 +34,7 @@ declare enum Platform {
|
|
|
34
34
|
STUDENTS_WEB = "STUDENTS",
|
|
35
35
|
TEACHERS_WEB = "TEACHERS",
|
|
36
36
|
DISTRICT_DASHBOARD = "DISTRICT",
|
|
37
|
-
AUTH_WEB = "AUTH_WEB"
|
|
38
|
-
WEB_ADMIN = "WEB_ADMIN"
|
|
37
|
+
AUTH_WEB = "AUTH_WEB"
|
|
39
38
|
}
|
|
40
39
|
declare enum Environment {
|
|
41
40
|
MARS = "MARS",
|
|
@@ -173,21 +172,9 @@ type DistrictCommon = {
|
|
|
173
172
|
CLARITY_PROJECT_ID: string;
|
|
174
173
|
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
175
174
|
};
|
|
176
|
-
type RegionSpecificWebAdminVars = {
|
|
177
|
-
API_URL: string;
|
|
178
|
-
CDN_HOST: string;
|
|
179
|
-
STUDENTS_WEB_URL: string;
|
|
180
|
-
DISTRICT_WEB_URL: string;
|
|
181
|
-
TEACHERS_WEB_URL: string;
|
|
182
|
-
};
|
|
183
|
-
type WebAdminCommon = {
|
|
184
|
-
MARS_URL: string;
|
|
185
|
-
PROD_URL: string;
|
|
186
|
-
};
|
|
187
175
|
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
188
176
|
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
189
177
|
type DistrictDashboardVars = Omit<RegionSpecificVars, 'SOCKET_URL'> & DistrictCommon;
|
|
190
|
-
type WebAdminVars = RegionSpecificWebAdminVars & WebAdminCommon;
|
|
191
178
|
type AuthWebBaseVars = Omit<RegionSpecificVars, 'CDN_HOST' | 'LOGGLY_TAG' | 'SOCKET_URL'> & {
|
|
192
179
|
TOS_URL: string;
|
|
193
180
|
CLARITY_PROJECT_ID: string;
|
|
@@ -230,11 +217,6 @@ type EnvPreset = Readonly<{
|
|
|
230
217
|
[key in Environment]: AuthWebVars<SSO_US>;
|
|
231
218
|
};
|
|
232
219
|
};
|
|
233
|
-
[Platform.WEB_ADMIN]: {
|
|
234
|
-
[key in Locale]: {
|
|
235
|
-
[key in Environment]: WebAdminVars;
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
220
|
}>;
|
|
239
221
|
type EnvironmentVars<P extends Platform> = EnvPreset[P][Locale][Environment];
|
|
240
222
|
|
|
@@ -363,12 +345,24 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
|
|
|
363
345
|
};
|
|
364
346
|
};
|
|
365
347
|
|
|
366
|
-
type
|
|
367
|
-
|
|
348
|
+
type AuthWebLocaleConfig<T extends SSOVariant> = {
|
|
349
|
+
path: string;
|
|
350
|
+
shortCode: string;
|
|
368
351
|
icon: ComponentType<IconProps>;
|
|
369
|
-
|
|
352
|
+
sources: {
|
|
353
|
+
signUp: {
|
|
354
|
+
list: SSOConfig<T>[];
|
|
355
|
+
};
|
|
356
|
+
signIn: {
|
|
357
|
+
withOnboarding: boolean;
|
|
358
|
+
largeQRCode: boolean;
|
|
359
|
+
list: SSOConfig<T>[];
|
|
360
|
+
};
|
|
361
|
+
};
|
|
370
362
|
isPrimaryRegion: boolean;
|
|
371
363
|
regionGroup: string;
|
|
364
|
+
navigatorLanguages: string[];
|
|
365
|
+
locale: Locale;
|
|
372
366
|
};
|
|
373
367
|
|
|
374
368
|
type CommonLocaleConfig = Readonly<{
|
|
@@ -388,11 +382,8 @@ type LocalePreset = {
|
|
|
388
382
|
[Platform.DISTRICT_DASHBOARD]: {
|
|
389
383
|
[key in Locale]: DistrictLocaleConfig;
|
|
390
384
|
};
|
|
391
|
-
[Platform.WEB_ADMIN]: {
|
|
392
|
-
[key in Locale]: WebAdminLocaleConfig;
|
|
393
|
-
};
|
|
394
385
|
[Platform.AUTH_WEB]: {
|
|
395
|
-
[key in Locale]:
|
|
386
|
+
[key in Locale]: AuthWebLocaleConfig<SSOVariant>;
|
|
396
387
|
};
|
|
397
388
|
};
|
|
398
389
|
type LocaleConfig<P extends Platform> = LocalePreset[P][Locale];
|
|
@@ -442,10 +433,9 @@ declare class AppConfigManager<P extends Platform> {
|
|
|
442
433
|
[Locale.SE]: { [key in Environment]: AuthWebVars<SSO_SE>; };
|
|
443
434
|
[Locale.US]: { [key in Environment]: AuthWebVars<SSO_US>; };
|
|
444
435
|
};
|
|
445
|
-
WEB_ADMIN: { [key in Locale]: { [key_1 in Environment]: WebAdminVars; }; };
|
|
446
436
|
}>;
|
|
447
437
|
localePreset: LocalePreset;
|
|
448
438
|
};
|
|
449
439
|
}
|
|
450
440
|
|
|
451
|
-
export { AppConfigManager, type AuthWebVars, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, Platform, PlatformBuildTarget, type RegionSpecificVars,
|
|
441
|
+
export { AppConfigManager, type AuthWebVars, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, Platform, PlatformBuildTarget, type RegionSpecificVars, SSO, type SSOConfig, Source, type StudentsWebCommon, type StudentsWebVars, type TeachersWebCommon, type TeachersWebVars, buildTargetToEnvironment };
|
package/dist/index.d.ts
CHANGED
|
@@ -34,8 +34,7 @@ declare enum Platform {
|
|
|
34
34
|
STUDENTS_WEB = "STUDENTS",
|
|
35
35
|
TEACHERS_WEB = "TEACHERS",
|
|
36
36
|
DISTRICT_DASHBOARD = "DISTRICT",
|
|
37
|
-
AUTH_WEB = "AUTH_WEB"
|
|
38
|
-
WEB_ADMIN = "WEB_ADMIN"
|
|
37
|
+
AUTH_WEB = "AUTH_WEB"
|
|
39
38
|
}
|
|
40
39
|
declare enum Environment {
|
|
41
40
|
MARS = "MARS",
|
|
@@ -173,21 +172,9 @@ type DistrictCommon = {
|
|
|
173
172
|
CLARITY_PROJECT_ID: string;
|
|
174
173
|
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
175
174
|
};
|
|
176
|
-
type RegionSpecificWebAdminVars = {
|
|
177
|
-
API_URL: string;
|
|
178
|
-
CDN_HOST: string;
|
|
179
|
-
STUDENTS_WEB_URL: string;
|
|
180
|
-
DISTRICT_WEB_URL: string;
|
|
181
|
-
TEACHERS_WEB_URL: string;
|
|
182
|
-
};
|
|
183
|
-
type WebAdminCommon = {
|
|
184
|
-
MARS_URL: string;
|
|
185
|
-
PROD_URL: string;
|
|
186
|
-
};
|
|
187
175
|
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
188
176
|
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
189
177
|
type DistrictDashboardVars = Omit<RegionSpecificVars, 'SOCKET_URL'> & DistrictCommon;
|
|
190
|
-
type WebAdminVars = RegionSpecificWebAdminVars & WebAdminCommon;
|
|
191
178
|
type AuthWebBaseVars = Omit<RegionSpecificVars, 'CDN_HOST' | 'LOGGLY_TAG' | 'SOCKET_URL'> & {
|
|
192
179
|
TOS_URL: string;
|
|
193
180
|
CLARITY_PROJECT_ID: string;
|
|
@@ -230,11 +217,6 @@ type EnvPreset = Readonly<{
|
|
|
230
217
|
[key in Environment]: AuthWebVars<SSO_US>;
|
|
231
218
|
};
|
|
232
219
|
};
|
|
233
|
-
[Platform.WEB_ADMIN]: {
|
|
234
|
-
[key in Locale]: {
|
|
235
|
-
[key in Environment]: WebAdminVars;
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
220
|
}>;
|
|
239
221
|
type EnvironmentVars<P extends Platform> = EnvPreset[P][Locale][Environment];
|
|
240
222
|
|
|
@@ -363,12 +345,24 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
|
|
|
363
345
|
};
|
|
364
346
|
};
|
|
365
347
|
|
|
366
|
-
type
|
|
367
|
-
|
|
348
|
+
type AuthWebLocaleConfig<T extends SSOVariant> = {
|
|
349
|
+
path: string;
|
|
350
|
+
shortCode: string;
|
|
368
351
|
icon: ComponentType<IconProps>;
|
|
369
|
-
|
|
352
|
+
sources: {
|
|
353
|
+
signUp: {
|
|
354
|
+
list: SSOConfig<T>[];
|
|
355
|
+
};
|
|
356
|
+
signIn: {
|
|
357
|
+
withOnboarding: boolean;
|
|
358
|
+
largeQRCode: boolean;
|
|
359
|
+
list: SSOConfig<T>[];
|
|
360
|
+
};
|
|
361
|
+
};
|
|
370
362
|
isPrimaryRegion: boolean;
|
|
371
363
|
regionGroup: string;
|
|
364
|
+
navigatorLanguages: string[];
|
|
365
|
+
locale: Locale;
|
|
372
366
|
};
|
|
373
367
|
|
|
374
368
|
type CommonLocaleConfig = Readonly<{
|
|
@@ -388,11 +382,8 @@ type LocalePreset = {
|
|
|
388
382
|
[Platform.DISTRICT_DASHBOARD]: {
|
|
389
383
|
[key in Locale]: DistrictLocaleConfig;
|
|
390
384
|
};
|
|
391
|
-
[Platform.WEB_ADMIN]: {
|
|
392
|
-
[key in Locale]: WebAdminLocaleConfig;
|
|
393
|
-
};
|
|
394
385
|
[Platform.AUTH_WEB]: {
|
|
395
|
-
[key in Locale]:
|
|
386
|
+
[key in Locale]: AuthWebLocaleConfig<SSOVariant>;
|
|
396
387
|
};
|
|
397
388
|
};
|
|
398
389
|
type LocaleConfig<P extends Platform> = LocalePreset[P][Locale];
|
|
@@ -442,10 +433,9 @@ declare class AppConfigManager<P extends Platform> {
|
|
|
442
433
|
[Locale.SE]: { [key in Environment]: AuthWebVars<SSO_SE>; };
|
|
443
434
|
[Locale.US]: { [key in Environment]: AuthWebVars<SSO_US>; };
|
|
444
435
|
};
|
|
445
|
-
WEB_ADMIN: { [key in Locale]: { [key_1 in Environment]: WebAdminVars; }; };
|
|
446
436
|
}>;
|
|
447
437
|
localePreset: LocalePreset;
|
|
448
438
|
};
|
|
449
439
|
}
|
|
450
440
|
|
|
451
|
-
export { AppConfigManager, type AuthWebVars, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, Platform, PlatformBuildTarget, type RegionSpecificVars,
|
|
441
|
+
export { AppConfigManager, type AuthWebVars, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, Platform, PlatformBuildTarget, type RegionSpecificVars, SSO, type SSOConfig, Source, type StudentsWebCommon, type StudentsWebVars, type TeachersWebCommon, type TeachersWebVars, buildTargetToEnvironment };
|