@magmamath/frontend-config 1.0.15 → 1.0.16-rc.10
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 +35 -19
- package/dist/index.d.ts +35 -19
- package/dist/index.js +325 -3286
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +325 -3286
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -3
package/dist/index.d.mts
CHANGED
|
@@ -34,7 +34,8 @@ declare enum Platform {
|
|
|
34
34
|
STUDENTS_WEB = "STUDENTS",
|
|
35
35
|
TEACHERS_WEB = "TEACHERS",
|
|
36
36
|
DISTRICT_DASHBOARD = "DISTRICT",
|
|
37
|
-
AUTH_WEB = "AUTH_WEB"
|
|
37
|
+
AUTH_WEB = "AUTH_WEB",
|
|
38
|
+
WEB_ADMIN = "WEB_ADMIN"
|
|
38
39
|
}
|
|
39
40
|
declare enum Environment {
|
|
40
41
|
MARS = "MARS",
|
|
@@ -172,9 +173,21 @@ type DistrictCommon = {
|
|
|
172
173
|
CLARITY_PROJECT_ID: string;
|
|
173
174
|
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
174
175
|
};
|
|
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
|
+
};
|
|
175
187
|
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
176
188
|
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
177
189
|
type DistrictDashboardVars = Omit<RegionSpecificVars, 'SOCKET_URL'> & DistrictCommon;
|
|
190
|
+
type WebAdminVars = RegionSpecificWebAdminVars & WebAdminCommon;
|
|
178
191
|
type AuthWebBaseVars = Omit<RegionSpecificVars, 'CDN_HOST' | 'LOGGLY_TAG' | 'SOCKET_URL'> & {
|
|
179
192
|
TOS_URL: string;
|
|
180
193
|
CLARITY_PROJECT_ID: string;
|
|
@@ -217,6 +230,11 @@ type EnvPreset = Readonly<{
|
|
|
217
230
|
[key in Environment]: AuthWebVars<SSO_US>;
|
|
218
231
|
};
|
|
219
232
|
};
|
|
233
|
+
[Platform.WEB_ADMIN]: {
|
|
234
|
+
[key in Locale]: {
|
|
235
|
+
[key in Environment]: WebAdminVars;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
220
238
|
}>;
|
|
221
239
|
type EnvironmentVars<P extends Platform> = EnvPreset[P][Locale][Environment];
|
|
222
240
|
|
|
@@ -345,24 +363,18 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
|
|
|
345
363
|
};
|
|
346
364
|
};
|
|
347
365
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
366
|
+
declare enum ApiRegion {
|
|
367
|
+
MAIN = "MAIN",
|
|
368
|
+
CANADA = "CANADA"
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
type WebAdminLocaleConfig = {
|
|
372
|
+
name: string;
|
|
351
373
|
icon: ComponentType<IconProps>;
|
|
352
|
-
sources: {
|
|
353
|
-
signUp: {
|
|
354
|
-
list: SSOConfig<T>[];
|
|
355
|
-
};
|
|
356
|
-
signIn: {
|
|
357
|
-
withOnboarding: boolean;
|
|
358
|
-
largeQRCode: boolean;
|
|
359
|
-
list: SSOConfig<T>[];
|
|
360
|
-
};
|
|
361
|
-
};
|
|
362
|
-
isPrimaryRegion: boolean;
|
|
363
|
-
regionGroup: string;
|
|
364
|
-
navigatorLanguages: string[];
|
|
365
374
|
locale: Locale;
|
|
375
|
+
isPrimaryLocale: boolean;
|
|
376
|
+
localeGroup: string;
|
|
377
|
+
apiRegion: ApiRegion;
|
|
366
378
|
};
|
|
367
379
|
|
|
368
380
|
type CommonLocaleConfig = Readonly<{
|
|
@@ -382,8 +394,11 @@ type LocalePreset = {
|
|
|
382
394
|
[Platform.DISTRICT_DASHBOARD]: {
|
|
383
395
|
[key in Locale]: DistrictLocaleConfig;
|
|
384
396
|
};
|
|
397
|
+
[Platform.WEB_ADMIN]: {
|
|
398
|
+
[key in Locale]: WebAdminLocaleConfig;
|
|
399
|
+
};
|
|
385
400
|
[Platform.AUTH_WEB]: {
|
|
386
|
-
[key in Locale]:
|
|
401
|
+
[key in Locale]: AuthWebVars<SSOVariant>;
|
|
387
402
|
};
|
|
388
403
|
};
|
|
389
404
|
type LocaleConfig<P extends Platform> = LocalePreset[P][Locale];
|
|
@@ -433,9 +448,10 @@ declare class AppConfigManager<P extends Platform> {
|
|
|
433
448
|
[Locale.SE]: { [key in Environment]: AuthWebVars<SSO_SE>; };
|
|
434
449
|
[Locale.US]: { [key in Environment]: AuthWebVars<SSO_US>; };
|
|
435
450
|
};
|
|
451
|
+
WEB_ADMIN: { [key in Locale]: { [key_1 in Environment]: WebAdminVars; }; };
|
|
436
452
|
}>;
|
|
437
453
|
localePreset: LocalePreset;
|
|
438
454
|
};
|
|
439
455
|
}
|
|
440
456
|
|
|
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 };
|
|
457
|
+
export { AppConfigManager, type AuthWebVars, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, Platform, PlatformBuildTarget, type RegionSpecificVars, type RegionSpecificWebAdminVars, SSO, type SSOConfig, Source, type StudentsWebCommon, type StudentsWebVars, type TeachersWebCommon, type TeachersWebVars, type WebAdminCommon, type WebAdminVars, buildTargetToEnvironment };
|
package/dist/index.d.ts
CHANGED
|
@@ -34,7 +34,8 @@ declare enum Platform {
|
|
|
34
34
|
STUDENTS_WEB = "STUDENTS",
|
|
35
35
|
TEACHERS_WEB = "TEACHERS",
|
|
36
36
|
DISTRICT_DASHBOARD = "DISTRICT",
|
|
37
|
-
AUTH_WEB = "AUTH_WEB"
|
|
37
|
+
AUTH_WEB = "AUTH_WEB",
|
|
38
|
+
WEB_ADMIN = "WEB_ADMIN"
|
|
38
39
|
}
|
|
39
40
|
declare enum Environment {
|
|
40
41
|
MARS = "MARS",
|
|
@@ -172,9 +173,21 @@ type DistrictCommon = {
|
|
|
172
173
|
CLARITY_PROJECT_ID: string;
|
|
173
174
|
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
174
175
|
};
|
|
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
|
+
};
|
|
175
187
|
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
176
188
|
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
177
189
|
type DistrictDashboardVars = Omit<RegionSpecificVars, 'SOCKET_URL'> & DistrictCommon;
|
|
190
|
+
type WebAdminVars = RegionSpecificWebAdminVars & WebAdminCommon;
|
|
178
191
|
type AuthWebBaseVars = Omit<RegionSpecificVars, 'CDN_HOST' | 'LOGGLY_TAG' | 'SOCKET_URL'> & {
|
|
179
192
|
TOS_URL: string;
|
|
180
193
|
CLARITY_PROJECT_ID: string;
|
|
@@ -217,6 +230,11 @@ type EnvPreset = Readonly<{
|
|
|
217
230
|
[key in Environment]: AuthWebVars<SSO_US>;
|
|
218
231
|
};
|
|
219
232
|
};
|
|
233
|
+
[Platform.WEB_ADMIN]: {
|
|
234
|
+
[key in Locale]: {
|
|
235
|
+
[key in Environment]: WebAdminVars;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
220
238
|
}>;
|
|
221
239
|
type EnvironmentVars<P extends Platform> = EnvPreset[P][Locale][Environment];
|
|
222
240
|
|
|
@@ -345,24 +363,18 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
|
|
|
345
363
|
};
|
|
346
364
|
};
|
|
347
365
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
366
|
+
declare enum ApiRegion {
|
|
367
|
+
MAIN = "MAIN",
|
|
368
|
+
CANADA = "CANADA"
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
type WebAdminLocaleConfig = {
|
|
372
|
+
name: string;
|
|
351
373
|
icon: ComponentType<IconProps>;
|
|
352
|
-
sources: {
|
|
353
|
-
signUp: {
|
|
354
|
-
list: SSOConfig<T>[];
|
|
355
|
-
};
|
|
356
|
-
signIn: {
|
|
357
|
-
withOnboarding: boolean;
|
|
358
|
-
largeQRCode: boolean;
|
|
359
|
-
list: SSOConfig<T>[];
|
|
360
|
-
};
|
|
361
|
-
};
|
|
362
|
-
isPrimaryRegion: boolean;
|
|
363
|
-
regionGroup: string;
|
|
364
|
-
navigatorLanguages: string[];
|
|
365
374
|
locale: Locale;
|
|
375
|
+
isPrimaryLocale: boolean;
|
|
376
|
+
localeGroup: string;
|
|
377
|
+
apiRegion: ApiRegion;
|
|
366
378
|
};
|
|
367
379
|
|
|
368
380
|
type CommonLocaleConfig = Readonly<{
|
|
@@ -382,8 +394,11 @@ type LocalePreset = {
|
|
|
382
394
|
[Platform.DISTRICT_DASHBOARD]: {
|
|
383
395
|
[key in Locale]: DistrictLocaleConfig;
|
|
384
396
|
};
|
|
397
|
+
[Platform.WEB_ADMIN]: {
|
|
398
|
+
[key in Locale]: WebAdminLocaleConfig;
|
|
399
|
+
};
|
|
385
400
|
[Platform.AUTH_WEB]: {
|
|
386
|
-
[key in Locale]:
|
|
401
|
+
[key in Locale]: AuthWebVars<SSOVariant>;
|
|
387
402
|
};
|
|
388
403
|
};
|
|
389
404
|
type LocaleConfig<P extends Platform> = LocalePreset[P][Locale];
|
|
@@ -433,9 +448,10 @@ declare class AppConfigManager<P extends Platform> {
|
|
|
433
448
|
[Locale.SE]: { [key in Environment]: AuthWebVars<SSO_SE>; };
|
|
434
449
|
[Locale.US]: { [key in Environment]: AuthWebVars<SSO_US>; };
|
|
435
450
|
};
|
|
451
|
+
WEB_ADMIN: { [key in Locale]: { [key_1 in Environment]: WebAdminVars; }; };
|
|
436
452
|
}>;
|
|
437
453
|
localePreset: LocalePreset;
|
|
438
454
|
};
|
|
439
455
|
}
|
|
440
456
|
|
|
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 };
|
|
457
|
+
export { AppConfigManager, type AuthWebVars, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, Platform, PlatformBuildTarget, type RegionSpecificVars, type RegionSpecificWebAdminVars, SSO, type SSOConfig, Source, type StudentsWebCommon, type StudentsWebVars, type TeachersWebCommon, type TeachersWebVars, type WebAdminCommon, type WebAdminVars, buildTargetToEnvironment };
|