@magmamath/frontend-config 1.0.16-rc.9 → 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 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,18 +345,24 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
363
345
  };
364
346
  };
365
347
 
366
- declare enum Region {
367
- MAIN = "MAIN",
368
- CANADA = "CANADA"
369
- }
370
-
371
- type WebAdminLocaleConfig = {
372
- name: string;
348
+ type AuthWebLocaleConfig<T extends SSOVariant> = {
349
+ path: string;
350
+ shortCode: string;
373
351
  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[];
374
365
  locale: Locale;
375
- isPrimaryLocale: boolean;
376
- localeGroup: string;
377
- region: Region;
378
366
  };
379
367
 
380
368
  type CommonLocaleConfig = Readonly<{
@@ -394,11 +382,8 @@ type LocalePreset = {
394
382
  [Platform.DISTRICT_DASHBOARD]: {
395
383
  [key in Locale]: DistrictLocaleConfig;
396
384
  };
397
- [Platform.WEB_ADMIN]: {
398
- [key in Locale]: WebAdminLocaleConfig;
399
- };
400
385
  [Platform.AUTH_WEB]: {
401
- [key in Locale]: AuthWebVars<SSOVariant>;
386
+ [key in Locale]: AuthWebLocaleConfig<SSOVariant>;
402
387
  };
403
388
  };
404
389
  type LocaleConfig<P extends Platform> = LocalePreset[P][Locale];
@@ -448,10 +433,9 @@ declare class AppConfigManager<P extends Platform> {
448
433
  [Locale.SE]: { [key in Environment]: AuthWebVars<SSO_SE>; };
449
434
  [Locale.US]: { [key in Environment]: AuthWebVars<SSO_US>; };
450
435
  };
451
- WEB_ADMIN: { [key in Locale]: { [key_1 in Environment]: WebAdminVars; }; };
452
436
  }>;
453
437
  localePreset: LocalePreset;
454
438
  };
455
439
  }
456
440
 
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 };
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,18 +345,24 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
363
345
  };
364
346
  };
365
347
 
366
- declare enum Region {
367
- MAIN = "MAIN",
368
- CANADA = "CANADA"
369
- }
370
-
371
- type WebAdminLocaleConfig = {
372
- name: string;
348
+ type AuthWebLocaleConfig<T extends SSOVariant> = {
349
+ path: string;
350
+ shortCode: string;
373
351
  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[];
374
365
  locale: Locale;
375
- isPrimaryLocale: boolean;
376
- localeGroup: string;
377
- region: Region;
378
366
  };
379
367
 
380
368
  type CommonLocaleConfig = Readonly<{
@@ -394,11 +382,8 @@ type LocalePreset = {
394
382
  [Platform.DISTRICT_DASHBOARD]: {
395
383
  [key in Locale]: DistrictLocaleConfig;
396
384
  };
397
- [Platform.WEB_ADMIN]: {
398
- [key in Locale]: WebAdminLocaleConfig;
399
- };
400
385
  [Platform.AUTH_WEB]: {
401
- [key in Locale]: AuthWebVars<SSOVariant>;
386
+ [key in Locale]: AuthWebLocaleConfig<SSOVariant>;
402
387
  };
403
388
  };
404
389
  type LocaleConfig<P extends Platform> = LocalePreset[P][Locale];
@@ -448,10 +433,9 @@ declare class AppConfigManager<P extends Platform> {
448
433
  [Locale.SE]: { [key in Environment]: AuthWebVars<SSO_SE>; };
449
434
  [Locale.US]: { [key in Environment]: AuthWebVars<SSO_US>; };
450
435
  };
451
- WEB_ADMIN: { [key in Locale]: { [key_1 in Environment]: WebAdminVars; }; };
452
436
  }>;
453
437
  localePreset: LocalePreset;
454
438
  };
455
439
  }
456
440
 
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 };
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 };