@magmamath/frontend-config 1.0.22-rc.2 → 1.0.22-rc.3

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
@@ -104,6 +104,11 @@ declare enum ApiRegion {
104
104
  MAIN = "MAIN",
105
105
  CANADA = "CANADA"
106
106
  }
107
+ declare enum QRCodeSize {
108
+ DEFAULT = "default",
109
+ MEDIUM = "medium",
110
+ LARGE = "large"
111
+ }
107
112
 
108
113
  declare enum MatrixMode {
109
114
  SKILL = "SKILL",
@@ -190,16 +195,14 @@ type AuthWebVarsPreset = {
190
195
  };
191
196
  };
192
197
 
193
- type SSOConfigStatic = Readonly<{
198
+ type SSOConfig<T extends SSOVariant> = Readonly<{
194
199
  name: string;
195
200
  icon: ComponentType<IconProps>;
196
201
  type: SSO;
197
202
  loginSource: LoginSource;
198
203
  ownUrl?: boolean;
199
- }>;
200
- type SSOConfig<T extends SSOVariant> = SSOConfigStatic & {
201
204
  getUrl: (envs: AuthWebVars<T>) => string;
202
- };
205
+ }>;
203
206
 
204
207
  type StudentsWebCommon = {
205
208
  GOOGLE_API_KEY: string;
@@ -431,7 +434,7 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
431
434
  };
432
435
  };
433
436
 
434
- type AuthWebLocaleConfig<T extends SSOVariant> = {
437
+ type AuthLocaleConfig<T extends SSOVariant> = {
435
438
  path: string;
436
439
  shortCode: string;
437
440
  icon: ComponentType<IconProps>;
@@ -441,7 +444,7 @@ type AuthWebLocaleConfig<T extends SSOVariant> = {
441
444
  };
442
445
  signIn: {
443
446
  withOnboarding: boolean;
444
- largeQRCode: boolean;
447
+ qrCodeSize: QRCodeSize;
445
448
  list: SSOConfig<T>[];
446
449
  };
447
450
  };
@@ -460,27 +463,6 @@ type WebAdminLocaleConfig = {
460
463
  apiRegion: ApiRegion;
461
464
  };
462
465
 
463
- type MobileLocaleConfig = {
464
- path: string;
465
- shortCode: string;
466
- icon: ComponentType<IconProps>;
467
- sources: {
468
- signUp: {
469
- list: SSOConfigStatic[];
470
- };
471
- signIn: {
472
- withOnboarding: boolean;
473
- largeQRCode: boolean;
474
- mediumQRCode: boolean;
475
- list: SSOConfigStatic[];
476
- };
477
- };
478
- isPrimaryRegion: boolean;
479
- regionGroup: string;
480
- navigatorLanguages: string[];
481
- locale: Locale;
482
- };
483
-
484
466
  type CommonLocaleConfig = Readonly<{
485
467
  name: string;
486
468
  languageName: string;
@@ -499,13 +481,13 @@ type LocalePreset = {
499
481
  [key in Locale]: DistrictLocaleConfig;
500
482
  };
501
483
  [Platform.AUTH_WEB]: {
502
- [key in Locale]: AuthWebLocaleConfig<SSOByLocale[key]>;
484
+ [key in Locale]: AuthLocaleConfig<SSOByLocale[key]>;
503
485
  };
504
486
  [Platform.WEB_ADMIN]: {
505
487
  [key in Locale]: WebAdminLocaleConfig;
506
488
  };
507
489
  [Platform.MOBILE]: {
508
- [key in Locale]: MobileLocaleConfig;
490
+ [key in Locale]: AuthLocaleConfig<SSOByLocale[key]>;
509
491
  };
510
492
  };
511
493
  type LocaleConfig<P extends Platform, L extends Locale> = LocalePreset[P][L];
@@ -548,4 +530,4 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
548
530
  };
549
531
  }
550
532
 
551
- export { ApiRegion, AppConfigManager, type AuthWebBaseVars, type AuthWebVars, type AuthWebVarsPreset, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictWebVarsPreset, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, type MobileBaseVars, type MobileCommon, type MobileVars, type MobileVarsPreset, Platform, PlatformBuildTarget, SSO, type SSOByLocale, type SSOConfig, type SSOConfigStatic, type SSOVariant, type SSO_DE, type SSO_SE, type SSO_UK, type SSO_US, Source, type StudentsWebCommon, type StudentsWebVars, type StudentsWebVarsPreset, type TeachersWebCommon, type TeachersWebVars, type TeachersWebVarsPreset, buildTargetToEnvironment };
533
+ export { ApiRegion, AppConfigManager, type AuthWebBaseVars, type AuthWebVars, type AuthWebVarsPreset, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictWebVarsPreset, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, type MobileBaseVars, type MobileCommon, type MobileVars, type MobileVarsPreset, Platform, PlatformBuildTarget, QRCodeSize, SSO, type SSOByLocale, type SSOConfig, type SSOVariant, type SSO_DE, type SSO_SE, type SSO_UK, type SSO_US, Source, type StudentsWebCommon, type StudentsWebVars, type StudentsWebVarsPreset, type TeachersWebCommon, type TeachersWebVars, type TeachersWebVarsPreset, buildTargetToEnvironment };
package/dist/index.d.ts CHANGED
@@ -104,6 +104,11 @@ declare enum ApiRegion {
104
104
  MAIN = "MAIN",
105
105
  CANADA = "CANADA"
106
106
  }
107
+ declare enum QRCodeSize {
108
+ DEFAULT = "default",
109
+ MEDIUM = "medium",
110
+ LARGE = "large"
111
+ }
107
112
 
108
113
  declare enum MatrixMode {
109
114
  SKILL = "SKILL",
@@ -190,16 +195,14 @@ type AuthWebVarsPreset = {
190
195
  };
191
196
  };
192
197
 
193
- type SSOConfigStatic = Readonly<{
198
+ type SSOConfig<T extends SSOVariant> = Readonly<{
194
199
  name: string;
195
200
  icon: ComponentType<IconProps>;
196
201
  type: SSO;
197
202
  loginSource: LoginSource;
198
203
  ownUrl?: boolean;
199
- }>;
200
- type SSOConfig<T extends SSOVariant> = SSOConfigStatic & {
201
204
  getUrl: (envs: AuthWebVars<T>) => string;
202
- };
205
+ }>;
203
206
 
204
207
  type StudentsWebCommon = {
205
208
  GOOGLE_API_KEY: string;
@@ -431,7 +434,7 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
431
434
  };
432
435
  };
433
436
 
434
- type AuthWebLocaleConfig<T extends SSOVariant> = {
437
+ type AuthLocaleConfig<T extends SSOVariant> = {
435
438
  path: string;
436
439
  shortCode: string;
437
440
  icon: ComponentType<IconProps>;
@@ -441,7 +444,7 @@ type AuthWebLocaleConfig<T extends SSOVariant> = {
441
444
  };
442
445
  signIn: {
443
446
  withOnboarding: boolean;
444
- largeQRCode: boolean;
447
+ qrCodeSize: QRCodeSize;
445
448
  list: SSOConfig<T>[];
446
449
  };
447
450
  };
@@ -460,27 +463,6 @@ type WebAdminLocaleConfig = {
460
463
  apiRegion: ApiRegion;
461
464
  };
462
465
 
463
- type MobileLocaleConfig = {
464
- path: string;
465
- shortCode: string;
466
- icon: ComponentType<IconProps>;
467
- sources: {
468
- signUp: {
469
- list: SSOConfigStatic[];
470
- };
471
- signIn: {
472
- withOnboarding: boolean;
473
- largeQRCode: boolean;
474
- mediumQRCode: boolean;
475
- list: SSOConfigStatic[];
476
- };
477
- };
478
- isPrimaryRegion: boolean;
479
- regionGroup: string;
480
- navigatorLanguages: string[];
481
- locale: Locale;
482
- };
483
-
484
466
  type CommonLocaleConfig = Readonly<{
485
467
  name: string;
486
468
  languageName: string;
@@ -499,13 +481,13 @@ type LocalePreset = {
499
481
  [key in Locale]: DistrictLocaleConfig;
500
482
  };
501
483
  [Platform.AUTH_WEB]: {
502
- [key in Locale]: AuthWebLocaleConfig<SSOByLocale[key]>;
484
+ [key in Locale]: AuthLocaleConfig<SSOByLocale[key]>;
503
485
  };
504
486
  [Platform.WEB_ADMIN]: {
505
487
  [key in Locale]: WebAdminLocaleConfig;
506
488
  };
507
489
  [Platform.MOBILE]: {
508
- [key in Locale]: MobileLocaleConfig;
490
+ [key in Locale]: AuthLocaleConfig<SSOByLocale[key]>;
509
491
  };
510
492
  };
511
493
  type LocaleConfig<P extends Platform, L extends Locale> = LocalePreset[P][L];
@@ -548,4 +530,4 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
548
530
  };
549
531
  }
550
532
 
551
- export { ApiRegion, AppConfigManager, type AuthWebBaseVars, type AuthWebVars, type AuthWebVarsPreset, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictWebVarsPreset, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, type MobileBaseVars, type MobileCommon, type MobileVars, type MobileVarsPreset, Platform, PlatformBuildTarget, SSO, type SSOByLocale, type SSOConfig, type SSOConfigStatic, type SSOVariant, type SSO_DE, type SSO_SE, type SSO_UK, type SSO_US, Source, type StudentsWebCommon, type StudentsWebVars, type StudentsWebVarsPreset, type TeachersWebCommon, type TeachersWebVars, type TeachersWebVarsPreset, buildTargetToEnvironment };
533
+ export { ApiRegion, AppConfigManager, type AuthWebBaseVars, type AuthWebVars, type AuthWebVarsPreset, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictWebVarsPreset, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, type MobileBaseVars, type MobileCommon, type MobileVars, type MobileVarsPreset, Platform, PlatformBuildTarget, QRCodeSize, SSO, type SSOByLocale, type SSOConfig, type SSOVariant, type SSO_DE, type SSO_SE, type SSO_UK, type SSO_US, Source, type StudentsWebCommon, type StudentsWebVars, type StudentsWebVarsPreset, type TeachersWebCommon, type TeachersWebVars, type TeachersWebVarsPreset, buildTargetToEnvironment };
package/dist/index.js CHANGED
@@ -121,6 +121,12 @@ var ApiRegion = /* @__PURE__ */ ((ApiRegion2) => {
121
121
  ApiRegion2["CANADA"] = "CANADA";
122
122
  return ApiRegion2;
123
123
  })(ApiRegion || {});
124
+ var QRCodeSize = /* @__PURE__ */ ((QRCodeSize2) => {
125
+ QRCodeSize2["DEFAULT"] = "default";
126
+ QRCodeSize2["MEDIUM"] = "medium";
127
+ QRCodeSize2["LARGE"] = "large";
128
+ return QRCodeSize2;
129
+ })(QRCodeSize || {});
124
130
 
125
131
  // src/shared/constants/matrix.constants.ts
126
132
  var MatrixMode = /* @__PURE__ */ ((MatrixMode2) => {
@@ -2492,7 +2498,7 @@ var LOCALE_AUTHWEB_US = {
2492
2498
  sources: {
2493
2499
  signIn: {
2494
2500
  withOnboarding: true,
2495
- largeQRCode: false,
2501
+ qrCodeSize: "default" /* DEFAULT */,
2496
2502
  list: [
2497
2503
  SSO_CLASSLINK_CONFIG,
2498
2504
  SSO_CLEVER_CONFIG,
@@ -2604,7 +2610,7 @@ var LOCALE_AUTHWEB_SE = {
2604
2610
  sources: {
2605
2611
  signIn: {
2606
2612
  withOnboarding: false,
2607
- largeQRCode: false,
2613
+ qrCodeSize: "default" /* DEFAULT */,
2608
2614
  list: [SSO_GOOGLE_CONFIG, SSO_MICROSOFT_CONFIG, SSO_SKOLFEDERATION_CONFIG, SSO_SKOLON_CONFIG, SSO_QR_CODE_CONFIG]
2609
2615
  },
2610
2616
  signUp: {
@@ -2691,7 +2697,7 @@ var LOCALE_AUTHWEB_GB = {
2691
2697
  sources: {
2692
2698
  signIn: {
2693
2699
  withOnboarding: false,
2694
- largeQRCode: true,
2700
+ qrCodeSize: "large" /* LARGE */,
2695
2701
  list: [SSO_GOOGLE_CONFIG, SSO_MICROSOFT_CONFIG, SSO_WONDE_CONFIG, SSO_SKOLON_CONFIG, SSO_QR_CODE_CONFIG]
2696
2702
  },
2697
2703
  signUp: {
@@ -2723,7 +2729,7 @@ var LOCALE_AUTHWEB_CA = {
2723
2729
  sources: {
2724
2730
  signIn: {
2725
2731
  withOnboarding: true,
2726
- largeQRCode: false,
2732
+ qrCodeSize: "default" /* DEFAULT */,
2727
2733
  list: [
2728
2734
  SSO_CLASSLINK_CONFIG,
2729
2735
  SSO_CLEVER_CONFIG,
@@ -2776,7 +2782,7 @@ var LOCALE_AUTHWEB_DE = {
2776
2782
  sources: {
2777
2783
  signIn: {
2778
2784
  withOnboarding: false,
2779
- largeQRCode: true,
2785
+ qrCodeSize: "large" /* LARGE */,
2780
2786
  list: [SSO_GOOGLE_CONFIG, SSO_MICROSOFT_CONFIG, SSO_QR_CODE_CONFIG]
2781
2787
  },
2782
2788
  signUp: {
@@ -2797,7 +2803,7 @@ var LOCALE_AUTHWEB_SCT = {
2797
2803
  sources: {
2798
2804
  signIn: {
2799
2805
  withOnboarding: false,
2800
- largeQRCode: true,
2806
+ qrCodeSize: "large" /* LARGE */,
2801
2807
  list: [SSO_GOOGLE_CONFIG, SSO_MICROSOFT_CONFIG, SSO_WONDE_CONFIG, SSO_SKOLON_CONFIG, SSO_QR_CODE_CONFIG]
2802
2808
  },
2803
2809
  signUp: {
@@ -2885,7 +2891,8 @@ var SSO_APPLE_CONFIG = {
2885
2891
  name: "Apple",
2886
2892
  type: "APPLE" /* APPLE */,
2887
2893
  loginSource: 7 /* APPLE */,
2888
- icon: AppleIcon
2894
+ icon: AppleIcon,
2895
+ getUrl: () => ""
2889
2896
  };
2890
2897
 
2891
2898
  // src/configs/locale/mobile/us/locale.us.ts
@@ -2896,8 +2903,7 @@ var LOCALE_MOBILE_US = {
2896
2903
  sources: {
2897
2904
  signIn: {
2898
2905
  withOnboarding: true,
2899
- largeQRCode: false,
2900
- mediumQRCode: false,
2906
+ qrCodeSize: "default" /* DEFAULT */,
2901
2907
  list: [
2902
2908
  SSO_GOOGLE_CONFIG,
2903
2909
  SSO_APPLE_CONFIG,
@@ -2927,8 +2933,7 @@ var LOCALE_MOBILE_SE = {
2927
2933
  sources: {
2928
2934
  signIn: {
2929
2935
  withOnboarding: false,
2930
- largeQRCode: false,
2931
- mediumQRCode: false,
2936
+ qrCodeSize: "default" /* DEFAULT */,
2932
2937
  list: [
2933
2938
  SSO_GOOGLE_CONFIG,
2934
2939
  SSO_APPLE_CONFIG,
@@ -2956,8 +2961,7 @@ var LOCALE_MOBILE_GB = {
2956
2961
  sources: {
2957
2962
  signIn: {
2958
2963
  withOnboarding: false,
2959
- largeQRCode: true,
2960
- mediumQRCode: false,
2964
+ qrCodeSize: "large" /* LARGE */,
2961
2965
  list: [
2962
2966
  SSO_GOOGLE_CONFIG,
2963
2967
  SSO_APPLE_CONFIG,
@@ -2985,8 +2989,7 @@ var LOCALE_MOBILE_CA = {
2985
2989
  sources: {
2986
2990
  signIn: {
2987
2991
  withOnboarding: true,
2988
- largeQRCode: false,
2989
- mediumQRCode: false,
2992
+ qrCodeSize: "default" /* DEFAULT */,
2990
2993
  list: [
2991
2994
  SSO_GOOGLE_CONFIG,
2992
2995
  SSO_APPLE_CONFIG,
@@ -3016,8 +3019,7 @@ var LOCALE_MOBILE_SCT = {
3016
3019
  sources: {
3017
3020
  signIn: {
3018
3021
  withOnboarding: false,
3019
- largeQRCode: true,
3020
- mediumQRCode: false,
3022
+ qrCodeSize: "large" /* LARGE */,
3021
3023
  list: [
3022
3024
  SSO_GOOGLE_CONFIG,
3023
3025
  SSO_APPLE_CONFIG,
@@ -3031,7 +3033,7 @@ var LOCALE_MOBILE_SCT = {
3031
3033
  list: [SSO_GOOGLE_CONFIG, SSO_APPLE_CONFIG, SSO_MICROSOFT_CONFIG, SSO_WONDE_CONFIG]
3032
3034
  }
3033
3035
  },
3034
- isPrimaryRegion: true,
3036
+ isPrimaryRegion: false,
3035
3037
  regionGroup: "uk",
3036
3038
  navigatorLanguages: ["en-GB" /* GB */, "en-IE", "gd"],
3037
3039
  locale: "en-GB" /* GB */
@@ -3045,8 +3047,7 @@ var LOCALE_MOBILE_DE = {
3045
3047
  sources: {
3046
3048
  signIn: {
3047
3049
  withOnboarding: false,
3048
- largeQRCode: false,
3049
- mediumQRCode: true,
3050
+ qrCodeSize: "medium" /* MEDIUM */,
3050
3051
  list: [SSO_GOOGLE_CONFIG, SSO_APPLE_CONFIG, SSO_MICROSOFT_CONFIG, SSO_QR_CODE_CONFIG]
3051
3052
  },
3052
3053
  signUp: {
@@ -3195,6 +3196,7 @@ exports.LoginSource = LoginSource;
3195
3196
  exports.MatrixMode = MatrixMode;
3196
3197
  exports.Platform = Platform;
3197
3198
  exports.PlatformBuildTarget = PlatformBuildTarget;
3199
+ exports.QRCodeSize = QRCodeSize;
3198
3200
  exports.SSO = SSO;
3199
3201
  exports.Source = Source;
3200
3202
  exports.buildTargetToEnvironment = buildTargetToEnvironment;