@magmamath/frontend-config 1.4.0 → 1.5.0-rc.1
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/{common.constants-4kbCK3_q.d.mts → common.constants-CT16TdXo.d.mts} +6 -1
- package/dist/{common.constants-4kbCK3_q.d.ts → common.constants-CT16TdXo.d.ts} +6 -1
- package/dist/index.d.mts +73 -11
- package/dist/index.d.ts +73 -11
- package/dist/index.js +869 -747
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +869 -748
- package/dist/index.mjs.map +1 -1
- package/dist/translation/index.d.mts +1 -1
- package/dist/translation/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,11 @@ declare enum Environment {
|
|
|
12
12
|
VENUS = "VENUS",
|
|
13
13
|
PROD = "PROD"
|
|
14
14
|
}
|
|
15
|
+
declare enum HomeRegion {
|
|
16
|
+
US_MAIN = "us-main",
|
|
17
|
+
CA_MAIN = "ca-main",
|
|
18
|
+
EU_MAIN = "eu-main"
|
|
19
|
+
}
|
|
15
20
|
declare enum PlatformBuildTarget {
|
|
16
21
|
PLUTO = "pluto",
|
|
17
22
|
MARS = "mars",
|
|
@@ -94,4 +99,4 @@ declare enum QRCodeSize {
|
|
|
94
99
|
LARGE = "large"
|
|
95
100
|
}
|
|
96
101
|
|
|
97
|
-
export { ApiRegion as A, Environment as E, LoginSource as L, Platform as P, QRCodeSize as Q, SSO as S, Locale as a, PlatformBuildTarget as b, Source as c };
|
|
102
|
+
export { ApiRegion as A, Environment as E, HomeRegion as H, LoginSource as L, Platform as P, QRCodeSize as Q, SSO as S, Locale as a, PlatformBuildTarget as b, Source as c };
|
|
@@ -12,6 +12,11 @@ declare enum Environment {
|
|
|
12
12
|
VENUS = "VENUS",
|
|
13
13
|
PROD = "PROD"
|
|
14
14
|
}
|
|
15
|
+
declare enum HomeRegion {
|
|
16
|
+
US_MAIN = "us-main",
|
|
17
|
+
CA_MAIN = "ca-main",
|
|
18
|
+
EU_MAIN = "eu-main"
|
|
19
|
+
}
|
|
15
20
|
declare enum PlatformBuildTarget {
|
|
16
21
|
PLUTO = "pluto",
|
|
17
22
|
MARS = "mars",
|
|
@@ -94,4 +99,4 @@ declare enum QRCodeSize {
|
|
|
94
99
|
LARGE = "large"
|
|
95
100
|
}
|
|
96
101
|
|
|
97
|
-
export { ApiRegion as A, Environment as E, LoginSource as L, Platform as P, QRCodeSize as Q, SSO as S, Locale as a, PlatformBuildTarget as b, Source as c };
|
|
102
|
+
export { ApiRegion as A, Environment as E, HomeRegion as H, LoginSource as L, Platform as P, QRCodeSize as Q, SSO as S, Locale as a, PlatformBuildTarget as b, Source as c };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SSO, L as LoginSource,
|
|
2
|
-
export { c as Source } from './common.constants-
|
|
1
|
+
import { S as SSO, L as LoginSource, H as HomeRegion, E as Environment, a as Locale, P as Platform, b as PlatformBuildTarget, Q as QRCodeSize, A as ApiRegion } from './common.constants-CT16TdXo.mjs';
|
|
2
|
+
export { c as Source } from './common.constants-CT16TdXo.mjs';
|
|
3
3
|
import { ComponentType } from 'react';
|
|
4
4
|
import * as effector from 'effector';
|
|
5
5
|
|
|
@@ -399,9 +399,17 @@ type StudentsWebCommon = {
|
|
|
399
399
|
};
|
|
400
400
|
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
401
401
|
type StudentsWebVarsPreset = {
|
|
402
|
-
[
|
|
402
|
+
[HomeRegion.US_MAIN]: {
|
|
403
403
|
[key in Environment]: StudentsWebVars;
|
|
404
404
|
};
|
|
405
|
+
[HomeRegion.CA_MAIN]: {
|
|
406
|
+
[key in Environment]: StudentsWebVars;
|
|
407
|
+
};
|
|
408
|
+
[HomeRegion.EU_MAIN]: {
|
|
409
|
+
[key in Locale]: {
|
|
410
|
+
[key in Environment]: StudentsWebVars;
|
|
411
|
+
};
|
|
412
|
+
};
|
|
405
413
|
};
|
|
406
414
|
|
|
407
415
|
type TeachersWebCommon = {
|
|
@@ -420,9 +428,17 @@ type TeachersWebCommon = {
|
|
|
420
428
|
};
|
|
421
429
|
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
422
430
|
type TeachersWebVarsPreset = {
|
|
423
|
-
[
|
|
431
|
+
[HomeRegion.US_MAIN]: {
|
|
424
432
|
[key in Environment]: TeachersWebVars;
|
|
425
433
|
};
|
|
434
|
+
[HomeRegion.CA_MAIN]: {
|
|
435
|
+
[key in Environment]: TeachersWebVars;
|
|
436
|
+
};
|
|
437
|
+
[HomeRegion.EU_MAIN]: {
|
|
438
|
+
[key in Locale]: {
|
|
439
|
+
[key in Environment]: TeachersWebVars;
|
|
440
|
+
};
|
|
441
|
+
};
|
|
426
442
|
};
|
|
427
443
|
|
|
428
444
|
type DistrictCommon = {
|
|
@@ -435,9 +451,17 @@ type DistrictCommon = {
|
|
|
435
451
|
};
|
|
436
452
|
type DistrictDashboardVars = RegionSpecificVars & DistrictCommon;
|
|
437
453
|
type DistrictWebVarsPreset = {
|
|
438
|
-
[
|
|
454
|
+
[HomeRegion.US_MAIN]: {
|
|
439
455
|
[key in Environment]: DistrictDashboardVars;
|
|
440
456
|
};
|
|
457
|
+
[HomeRegion.CA_MAIN]: {
|
|
458
|
+
[key in Environment]: DistrictDashboardVars;
|
|
459
|
+
};
|
|
460
|
+
[HomeRegion.EU_MAIN]: {
|
|
461
|
+
[key in Locale]: {
|
|
462
|
+
[key in Environment]: DistrictDashboardVars;
|
|
463
|
+
};
|
|
464
|
+
};
|
|
441
465
|
};
|
|
442
466
|
|
|
443
467
|
type SSO_UK = {
|
|
@@ -560,7 +584,7 @@ type AuthWebBaseVars = Omit<RegionSpecificVars, 'CDN_HOST' | 'LOGGLY_TAG' | 'SOC
|
|
|
560
584
|
TOLGEE_API_URL?: string;
|
|
561
585
|
TOLGEE_API_KEY?: string;
|
|
562
586
|
};
|
|
563
|
-
type
|
|
587
|
+
type AuthWebEuLocalePreset = {
|
|
564
588
|
[Locale.CA]: {
|
|
565
589
|
[key in Environment]: AuthWebVars<SSO_US>;
|
|
566
590
|
};
|
|
@@ -625,6 +649,15 @@ type AuthWebVarsPreset = {
|
|
|
625
649
|
[key in Environment]: AuthWebVars<SSO_PT>;
|
|
626
650
|
};
|
|
627
651
|
};
|
|
652
|
+
type AuthWebVarsPreset = {
|
|
653
|
+
[HomeRegion.US_MAIN]: {
|
|
654
|
+
[key in Environment]: AuthWebVars<SSO_US>;
|
|
655
|
+
};
|
|
656
|
+
[HomeRegion.CA_MAIN]: {
|
|
657
|
+
[key in Environment]: AuthWebVars<SSO_US>;
|
|
658
|
+
};
|
|
659
|
+
[HomeRegion.EU_MAIN]: AuthWebEuLocalePreset;
|
|
660
|
+
};
|
|
628
661
|
|
|
629
662
|
type MobileCommon = {
|
|
630
663
|
CDN_HOST_TRANSLATIONS: string;
|
|
@@ -656,7 +689,7 @@ type MobileBaseVars = {
|
|
|
656
689
|
PROBLEM_CREATOR_URL: string;
|
|
657
690
|
} & MobileCommon;
|
|
658
691
|
type MobileVars<T extends SSOVariant> = Prettify<MobileBaseVars & T>;
|
|
659
|
-
type
|
|
692
|
+
type MobileEuLocalePreset = {
|
|
660
693
|
[Locale.CA]: {
|
|
661
694
|
[key in Environment]: MobileVars<SSO_US>;
|
|
662
695
|
};
|
|
@@ -721,6 +754,15 @@ type MobileVarsPreset = {
|
|
|
721
754
|
[key in Environment]: MobileVars<SSO_PT>;
|
|
722
755
|
};
|
|
723
756
|
};
|
|
757
|
+
type MobileVarsPreset = {
|
|
758
|
+
[HomeRegion.US_MAIN]: {
|
|
759
|
+
[key in Environment]: MobileVars<SSO_US>;
|
|
760
|
+
};
|
|
761
|
+
[HomeRegion.CA_MAIN]: {
|
|
762
|
+
[key in Environment]: MobileVars<SSO_US>;
|
|
763
|
+
};
|
|
764
|
+
[HomeRegion.EU_MAIN]: MobileEuLocalePreset;
|
|
765
|
+
};
|
|
724
766
|
|
|
725
767
|
type RegionSpecificWebAdminVars = {
|
|
726
768
|
API_URL: string;
|
|
@@ -735,9 +777,17 @@ type WebAdminCommon = {
|
|
|
735
777
|
};
|
|
736
778
|
type WebAdminVars = RegionSpecificWebAdminVars & WebAdminCommon;
|
|
737
779
|
type WebAdminVarsPreset = {
|
|
738
|
-
[
|
|
780
|
+
[HomeRegion.US_MAIN]: {
|
|
739
781
|
[key in Environment]: WebAdminVars;
|
|
740
782
|
};
|
|
783
|
+
[HomeRegion.CA_MAIN]: {
|
|
784
|
+
[key in Environment]: WebAdminVars;
|
|
785
|
+
};
|
|
786
|
+
[HomeRegion.EU_MAIN]: {
|
|
787
|
+
[key in Locale]: {
|
|
788
|
+
[key in Environment]: WebAdminVars;
|
|
789
|
+
};
|
|
790
|
+
};
|
|
741
791
|
};
|
|
742
792
|
|
|
743
793
|
type ParentWebVars = {
|
|
@@ -746,9 +796,17 @@ type ParentWebVars = {
|
|
|
746
796
|
AUTH_WEB_URL: string;
|
|
747
797
|
};
|
|
748
798
|
type ParentWebVarsPreset = {
|
|
749
|
-
[
|
|
799
|
+
[HomeRegion.US_MAIN]: {
|
|
750
800
|
[key in Environment]: ParentWebVars;
|
|
751
801
|
};
|
|
802
|
+
[HomeRegion.CA_MAIN]: {
|
|
803
|
+
[key in Environment]: ParentWebVars;
|
|
804
|
+
};
|
|
805
|
+
[HomeRegion.EU_MAIN]: {
|
|
806
|
+
[key in Locale]: {
|
|
807
|
+
[key in Environment]: ParentWebVars;
|
|
808
|
+
};
|
|
809
|
+
};
|
|
752
810
|
};
|
|
753
811
|
|
|
754
812
|
type EnvPreset = Readonly<{
|
|
@@ -760,7 +818,7 @@ type EnvPreset = Readonly<{
|
|
|
760
818
|
[Platform.MOBILE]: MobileVarsPreset;
|
|
761
819
|
[Platform.PARENT_WEB]: ParentWebVarsPreset;
|
|
762
820
|
}>;
|
|
763
|
-
type EnvironmentVars<P extends Platform> = EnvPreset[P][Locale][Environment];
|
|
821
|
+
type EnvironmentVars<P extends Platform> = EnvPreset[P][HomeRegion.US_MAIN][Environment] | EnvPreset[P][HomeRegion.CA_MAIN][Environment] | EnvPreset[P][HomeRegion.EU_MAIN][Locale][Environment];
|
|
764
822
|
|
|
765
823
|
declare function buildTargetToEnvironment(buildTarget: PlatformBuildTarget): Environment;
|
|
766
824
|
|
|
@@ -1008,12 +1066,14 @@ type DevOverrides<P extends Platform> = {
|
|
|
1008
1066
|
type ConfigOptions<P extends Platform> = {
|
|
1009
1067
|
platform: P;
|
|
1010
1068
|
environment: Environment;
|
|
1069
|
+
homeRegion?: HomeRegion;
|
|
1011
1070
|
_DEV_OVERRIDES_?: DevOverrides<P>;
|
|
1012
1071
|
};
|
|
1013
1072
|
type SetProps<L extends Locale> = {
|
|
1014
1073
|
locale?: L;
|
|
1015
1074
|
envsRegion?: L;
|
|
1016
1075
|
environment?: Environment;
|
|
1076
|
+
homeRegion?: HomeRegion;
|
|
1017
1077
|
};
|
|
1018
1078
|
declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
1019
1079
|
private readonly _DEV_OVERRIDES_?;
|
|
@@ -1021,6 +1081,7 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1021
1081
|
environment: Environment;
|
|
1022
1082
|
locale: L;
|
|
1023
1083
|
envsRegion: L;
|
|
1084
|
+
homeRegion: HomeRegion;
|
|
1024
1085
|
private readonly setEnvs;
|
|
1025
1086
|
private readonly setLocaleConfig;
|
|
1026
1087
|
readonly $envs: effector.StoreWritable<EnvironmentVars<P>>;
|
|
@@ -1035,6 +1096,7 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1035
1096
|
isPolish: boolean;
|
|
1036
1097
|
}>;
|
|
1037
1098
|
constructor(opts: ConfigOptions<P>);
|
|
1099
|
+
private readonly resolveEnvs;
|
|
1038
1100
|
private readonly syncConfigsStores;
|
|
1039
1101
|
readonly set: (props: SetProps<L>) => void;
|
|
1040
1102
|
getEnvs: () => EnvironmentVars<P>;
|
|
@@ -1058,4 +1120,4 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1058
1120
|
};
|
|
1059
1121
|
}
|
|
1060
1122
|
|
|
1061
|
-
export { AT_CALENDAR_CONFIG, ApiRegion, AppConfigManager, type AuthWebBaseVars, type AuthWebVars, type AuthWebVarsPreset, CH_CALENDAR_CONFIG, type CalendarConfig, CalendarLocale, type CommonGrades, DE_CALENDAR_CONFIG, DK_CALENDAR_CONFIG, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictLocaleConfig, type DistrictWebVarsPreset, DrawboardCoinVariant, EN_CALENDAR_CONFIG, ES_CALENDAR_CONFIG, type EnvPreset, Environment, type EnvironmentVars, FI_CALENDAR_CONFIG, FR_CALENDAR_CONFIG, Grade, type GradeData, type HighSchoolGrades, IS_CALENDAR_CONFIG, IT_CALENDAR_CONFIG, type KeyboardConfig, KeyboardCurrencyVariant, KeyboardPreset, KeyboardTimeVariant, LANGUAGES_CONFIG, LANGUAGES_LIST, Language, type LanguageConfig, Locale, type LocaleLanguageData, LoginSource, MOST_USED_LANGUAGES, MatrixMode, type MobileBaseVars, type MobileCommon, type MobileLocaleConfig, type MobileVars, type MobileVarsPreset, MomentDateLocale, MultiplicationSymbol, NL_BE_CALENDAR_CONFIG, NL_CALENDAR_CONFIG, NO_CALENDAR_CONFIG, NumberDecimalSeparator, NumberGroupingSeparator, PL_CALENDAR_CONFIG, PRIORITY_LANGUAGES, PT_CALENDAR_CONFIG, type ParentWebLocaleConfig, type ParentWebVars, type ParentWebVarsPreset, Platform, PlatformBuildTarget, type PrimaryGrades, type ProblemCreatorConfig, ProblemCreatorDescriptionVariant, type ProblemCreatorKeyboardConfig, ProblemCreatorKeyboardPreset, ProblemCreatorMathEntryVariant, QRCodeSize, SE_CALENDAR_CONFIG, SSO, type SSOByLocale, type SSOConfig, type SSOVariant, type SSO_AT, type SSO_CH, type SSO_DE, type SSO_DK, type SSO_ES, type SSO_FI, type SSO_FR, type SSO_IE, type SSO_IS, type SSO_IT, type SSO_NL, type SSO_NL_BE, type SSO_NO, type SSO_PL, type SSO_PT, type SSO_SE, type SSO_SV_FI, type SSO_UK, type SSO_US, SV_FI_CALENDAR_CONFIG, type StudentsLocaleConfig, type StudentsWebCommon, type StudentsWebVars, type StudentsWebVarsPreset, TTSOverrideSymbol, type TeachersLocaleConfig, type TeachersWebCommon, type TeachersWebVars, type TeachersWebVarsPreset, TreeLevel, buildTargetToEnvironment };
|
|
1123
|
+
export { AT_CALENDAR_CONFIG, ApiRegion, AppConfigManager, type AuthWebBaseVars, type AuthWebEuLocalePreset, type AuthWebVars, type AuthWebVarsPreset, CH_CALENDAR_CONFIG, type CalendarConfig, CalendarLocale, type CommonGrades, DE_CALENDAR_CONFIG, DK_CALENDAR_CONFIG, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictLocaleConfig, type DistrictWebVarsPreset, DrawboardCoinVariant, EN_CALENDAR_CONFIG, ES_CALENDAR_CONFIG, type EnvPreset, Environment, type EnvironmentVars, FI_CALENDAR_CONFIG, FR_CALENDAR_CONFIG, Grade, type GradeData, type HighSchoolGrades, HomeRegion, IS_CALENDAR_CONFIG, IT_CALENDAR_CONFIG, type KeyboardConfig, KeyboardCurrencyVariant, KeyboardPreset, KeyboardTimeVariant, LANGUAGES_CONFIG, LANGUAGES_LIST, Language, type LanguageConfig, Locale, type LocaleLanguageData, LoginSource, MOST_USED_LANGUAGES, MatrixMode, type MobileBaseVars, type MobileCommon, type MobileEuLocalePreset, type MobileLocaleConfig, type MobileVars, type MobileVarsPreset, MomentDateLocale, MultiplicationSymbol, NL_BE_CALENDAR_CONFIG, NL_CALENDAR_CONFIG, NO_CALENDAR_CONFIG, NumberDecimalSeparator, NumberGroupingSeparator, PL_CALENDAR_CONFIG, PRIORITY_LANGUAGES, PT_CALENDAR_CONFIG, type ParentWebLocaleConfig, type ParentWebVars, type ParentWebVarsPreset, Platform, PlatformBuildTarget, type PrimaryGrades, type ProblemCreatorConfig, ProblemCreatorDescriptionVariant, type ProblemCreatorKeyboardConfig, ProblemCreatorKeyboardPreset, ProblemCreatorMathEntryVariant, QRCodeSize, SE_CALENDAR_CONFIG, SSO, type SSOByLocale, type SSOConfig, type SSOVariant, type SSO_AT, type SSO_CH, type SSO_DE, type SSO_DK, type SSO_ES, type SSO_FI, type SSO_FR, type SSO_IE, type SSO_IS, type SSO_IT, type SSO_NL, type SSO_NL_BE, type SSO_NO, type SSO_PL, type SSO_PT, type SSO_SE, type SSO_SV_FI, type SSO_UK, type SSO_US, SV_FI_CALENDAR_CONFIG, type StudentsLocaleConfig, type StudentsWebCommon, type StudentsWebVars, type StudentsWebVarsPreset, TTSOverrideSymbol, type TeachersLocaleConfig, type TeachersWebCommon, type TeachersWebVars, type TeachersWebVarsPreset, TreeLevel, buildTargetToEnvironment };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SSO, L as LoginSource,
|
|
2
|
-
export { c as Source } from './common.constants-
|
|
1
|
+
import { S as SSO, L as LoginSource, H as HomeRegion, E as Environment, a as Locale, P as Platform, b as PlatformBuildTarget, Q as QRCodeSize, A as ApiRegion } from './common.constants-CT16TdXo.js';
|
|
2
|
+
export { c as Source } from './common.constants-CT16TdXo.js';
|
|
3
3
|
import { ComponentType } from 'react';
|
|
4
4
|
import * as effector from 'effector';
|
|
5
5
|
|
|
@@ -399,9 +399,17 @@ type StudentsWebCommon = {
|
|
|
399
399
|
};
|
|
400
400
|
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
401
401
|
type StudentsWebVarsPreset = {
|
|
402
|
-
[
|
|
402
|
+
[HomeRegion.US_MAIN]: {
|
|
403
403
|
[key in Environment]: StudentsWebVars;
|
|
404
404
|
};
|
|
405
|
+
[HomeRegion.CA_MAIN]: {
|
|
406
|
+
[key in Environment]: StudentsWebVars;
|
|
407
|
+
};
|
|
408
|
+
[HomeRegion.EU_MAIN]: {
|
|
409
|
+
[key in Locale]: {
|
|
410
|
+
[key in Environment]: StudentsWebVars;
|
|
411
|
+
};
|
|
412
|
+
};
|
|
405
413
|
};
|
|
406
414
|
|
|
407
415
|
type TeachersWebCommon = {
|
|
@@ -420,9 +428,17 @@ type TeachersWebCommon = {
|
|
|
420
428
|
};
|
|
421
429
|
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
422
430
|
type TeachersWebVarsPreset = {
|
|
423
|
-
[
|
|
431
|
+
[HomeRegion.US_MAIN]: {
|
|
424
432
|
[key in Environment]: TeachersWebVars;
|
|
425
433
|
};
|
|
434
|
+
[HomeRegion.CA_MAIN]: {
|
|
435
|
+
[key in Environment]: TeachersWebVars;
|
|
436
|
+
};
|
|
437
|
+
[HomeRegion.EU_MAIN]: {
|
|
438
|
+
[key in Locale]: {
|
|
439
|
+
[key in Environment]: TeachersWebVars;
|
|
440
|
+
};
|
|
441
|
+
};
|
|
426
442
|
};
|
|
427
443
|
|
|
428
444
|
type DistrictCommon = {
|
|
@@ -435,9 +451,17 @@ type DistrictCommon = {
|
|
|
435
451
|
};
|
|
436
452
|
type DistrictDashboardVars = RegionSpecificVars & DistrictCommon;
|
|
437
453
|
type DistrictWebVarsPreset = {
|
|
438
|
-
[
|
|
454
|
+
[HomeRegion.US_MAIN]: {
|
|
439
455
|
[key in Environment]: DistrictDashboardVars;
|
|
440
456
|
};
|
|
457
|
+
[HomeRegion.CA_MAIN]: {
|
|
458
|
+
[key in Environment]: DistrictDashboardVars;
|
|
459
|
+
};
|
|
460
|
+
[HomeRegion.EU_MAIN]: {
|
|
461
|
+
[key in Locale]: {
|
|
462
|
+
[key in Environment]: DistrictDashboardVars;
|
|
463
|
+
};
|
|
464
|
+
};
|
|
441
465
|
};
|
|
442
466
|
|
|
443
467
|
type SSO_UK = {
|
|
@@ -560,7 +584,7 @@ type AuthWebBaseVars = Omit<RegionSpecificVars, 'CDN_HOST' | 'LOGGLY_TAG' | 'SOC
|
|
|
560
584
|
TOLGEE_API_URL?: string;
|
|
561
585
|
TOLGEE_API_KEY?: string;
|
|
562
586
|
};
|
|
563
|
-
type
|
|
587
|
+
type AuthWebEuLocalePreset = {
|
|
564
588
|
[Locale.CA]: {
|
|
565
589
|
[key in Environment]: AuthWebVars<SSO_US>;
|
|
566
590
|
};
|
|
@@ -625,6 +649,15 @@ type AuthWebVarsPreset = {
|
|
|
625
649
|
[key in Environment]: AuthWebVars<SSO_PT>;
|
|
626
650
|
};
|
|
627
651
|
};
|
|
652
|
+
type AuthWebVarsPreset = {
|
|
653
|
+
[HomeRegion.US_MAIN]: {
|
|
654
|
+
[key in Environment]: AuthWebVars<SSO_US>;
|
|
655
|
+
};
|
|
656
|
+
[HomeRegion.CA_MAIN]: {
|
|
657
|
+
[key in Environment]: AuthWebVars<SSO_US>;
|
|
658
|
+
};
|
|
659
|
+
[HomeRegion.EU_MAIN]: AuthWebEuLocalePreset;
|
|
660
|
+
};
|
|
628
661
|
|
|
629
662
|
type MobileCommon = {
|
|
630
663
|
CDN_HOST_TRANSLATIONS: string;
|
|
@@ -656,7 +689,7 @@ type MobileBaseVars = {
|
|
|
656
689
|
PROBLEM_CREATOR_URL: string;
|
|
657
690
|
} & MobileCommon;
|
|
658
691
|
type MobileVars<T extends SSOVariant> = Prettify<MobileBaseVars & T>;
|
|
659
|
-
type
|
|
692
|
+
type MobileEuLocalePreset = {
|
|
660
693
|
[Locale.CA]: {
|
|
661
694
|
[key in Environment]: MobileVars<SSO_US>;
|
|
662
695
|
};
|
|
@@ -721,6 +754,15 @@ type MobileVarsPreset = {
|
|
|
721
754
|
[key in Environment]: MobileVars<SSO_PT>;
|
|
722
755
|
};
|
|
723
756
|
};
|
|
757
|
+
type MobileVarsPreset = {
|
|
758
|
+
[HomeRegion.US_MAIN]: {
|
|
759
|
+
[key in Environment]: MobileVars<SSO_US>;
|
|
760
|
+
};
|
|
761
|
+
[HomeRegion.CA_MAIN]: {
|
|
762
|
+
[key in Environment]: MobileVars<SSO_US>;
|
|
763
|
+
};
|
|
764
|
+
[HomeRegion.EU_MAIN]: MobileEuLocalePreset;
|
|
765
|
+
};
|
|
724
766
|
|
|
725
767
|
type RegionSpecificWebAdminVars = {
|
|
726
768
|
API_URL: string;
|
|
@@ -735,9 +777,17 @@ type WebAdminCommon = {
|
|
|
735
777
|
};
|
|
736
778
|
type WebAdminVars = RegionSpecificWebAdminVars & WebAdminCommon;
|
|
737
779
|
type WebAdminVarsPreset = {
|
|
738
|
-
[
|
|
780
|
+
[HomeRegion.US_MAIN]: {
|
|
739
781
|
[key in Environment]: WebAdminVars;
|
|
740
782
|
};
|
|
783
|
+
[HomeRegion.CA_MAIN]: {
|
|
784
|
+
[key in Environment]: WebAdminVars;
|
|
785
|
+
};
|
|
786
|
+
[HomeRegion.EU_MAIN]: {
|
|
787
|
+
[key in Locale]: {
|
|
788
|
+
[key in Environment]: WebAdminVars;
|
|
789
|
+
};
|
|
790
|
+
};
|
|
741
791
|
};
|
|
742
792
|
|
|
743
793
|
type ParentWebVars = {
|
|
@@ -746,9 +796,17 @@ type ParentWebVars = {
|
|
|
746
796
|
AUTH_WEB_URL: string;
|
|
747
797
|
};
|
|
748
798
|
type ParentWebVarsPreset = {
|
|
749
|
-
[
|
|
799
|
+
[HomeRegion.US_MAIN]: {
|
|
750
800
|
[key in Environment]: ParentWebVars;
|
|
751
801
|
};
|
|
802
|
+
[HomeRegion.CA_MAIN]: {
|
|
803
|
+
[key in Environment]: ParentWebVars;
|
|
804
|
+
};
|
|
805
|
+
[HomeRegion.EU_MAIN]: {
|
|
806
|
+
[key in Locale]: {
|
|
807
|
+
[key in Environment]: ParentWebVars;
|
|
808
|
+
};
|
|
809
|
+
};
|
|
752
810
|
};
|
|
753
811
|
|
|
754
812
|
type EnvPreset = Readonly<{
|
|
@@ -760,7 +818,7 @@ type EnvPreset = Readonly<{
|
|
|
760
818
|
[Platform.MOBILE]: MobileVarsPreset;
|
|
761
819
|
[Platform.PARENT_WEB]: ParentWebVarsPreset;
|
|
762
820
|
}>;
|
|
763
|
-
type EnvironmentVars<P extends Platform> = EnvPreset[P][Locale][Environment];
|
|
821
|
+
type EnvironmentVars<P extends Platform> = EnvPreset[P][HomeRegion.US_MAIN][Environment] | EnvPreset[P][HomeRegion.CA_MAIN][Environment] | EnvPreset[P][HomeRegion.EU_MAIN][Locale][Environment];
|
|
764
822
|
|
|
765
823
|
declare function buildTargetToEnvironment(buildTarget: PlatformBuildTarget): Environment;
|
|
766
824
|
|
|
@@ -1008,12 +1066,14 @@ type DevOverrides<P extends Platform> = {
|
|
|
1008
1066
|
type ConfigOptions<P extends Platform> = {
|
|
1009
1067
|
platform: P;
|
|
1010
1068
|
environment: Environment;
|
|
1069
|
+
homeRegion?: HomeRegion;
|
|
1011
1070
|
_DEV_OVERRIDES_?: DevOverrides<P>;
|
|
1012
1071
|
};
|
|
1013
1072
|
type SetProps<L extends Locale> = {
|
|
1014
1073
|
locale?: L;
|
|
1015
1074
|
envsRegion?: L;
|
|
1016
1075
|
environment?: Environment;
|
|
1076
|
+
homeRegion?: HomeRegion;
|
|
1017
1077
|
};
|
|
1018
1078
|
declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
1019
1079
|
private readonly _DEV_OVERRIDES_?;
|
|
@@ -1021,6 +1081,7 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1021
1081
|
environment: Environment;
|
|
1022
1082
|
locale: L;
|
|
1023
1083
|
envsRegion: L;
|
|
1084
|
+
homeRegion: HomeRegion;
|
|
1024
1085
|
private readonly setEnvs;
|
|
1025
1086
|
private readonly setLocaleConfig;
|
|
1026
1087
|
readonly $envs: effector.StoreWritable<EnvironmentVars<P>>;
|
|
@@ -1035,6 +1096,7 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1035
1096
|
isPolish: boolean;
|
|
1036
1097
|
}>;
|
|
1037
1098
|
constructor(opts: ConfigOptions<P>);
|
|
1099
|
+
private readonly resolveEnvs;
|
|
1038
1100
|
private readonly syncConfigsStores;
|
|
1039
1101
|
readonly set: (props: SetProps<L>) => void;
|
|
1040
1102
|
getEnvs: () => EnvironmentVars<P>;
|
|
@@ -1058,4 +1120,4 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1058
1120
|
};
|
|
1059
1121
|
}
|
|
1060
1122
|
|
|
1061
|
-
export { AT_CALENDAR_CONFIG, ApiRegion, AppConfigManager, type AuthWebBaseVars, type AuthWebVars, type AuthWebVarsPreset, CH_CALENDAR_CONFIG, type CalendarConfig, CalendarLocale, type CommonGrades, DE_CALENDAR_CONFIG, DK_CALENDAR_CONFIG, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictLocaleConfig, type DistrictWebVarsPreset, DrawboardCoinVariant, EN_CALENDAR_CONFIG, ES_CALENDAR_CONFIG, type EnvPreset, Environment, type EnvironmentVars, FI_CALENDAR_CONFIG, FR_CALENDAR_CONFIG, Grade, type GradeData, type HighSchoolGrades, IS_CALENDAR_CONFIG, IT_CALENDAR_CONFIG, type KeyboardConfig, KeyboardCurrencyVariant, KeyboardPreset, KeyboardTimeVariant, LANGUAGES_CONFIG, LANGUAGES_LIST, Language, type LanguageConfig, Locale, type LocaleLanguageData, LoginSource, MOST_USED_LANGUAGES, MatrixMode, type MobileBaseVars, type MobileCommon, type MobileLocaleConfig, type MobileVars, type MobileVarsPreset, MomentDateLocale, MultiplicationSymbol, NL_BE_CALENDAR_CONFIG, NL_CALENDAR_CONFIG, NO_CALENDAR_CONFIG, NumberDecimalSeparator, NumberGroupingSeparator, PL_CALENDAR_CONFIG, PRIORITY_LANGUAGES, PT_CALENDAR_CONFIG, type ParentWebLocaleConfig, type ParentWebVars, type ParentWebVarsPreset, Platform, PlatformBuildTarget, type PrimaryGrades, type ProblemCreatorConfig, ProblemCreatorDescriptionVariant, type ProblemCreatorKeyboardConfig, ProblemCreatorKeyboardPreset, ProblemCreatorMathEntryVariant, QRCodeSize, SE_CALENDAR_CONFIG, SSO, type SSOByLocale, type SSOConfig, type SSOVariant, type SSO_AT, type SSO_CH, type SSO_DE, type SSO_DK, type SSO_ES, type SSO_FI, type SSO_FR, type SSO_IE, type SSO_IS, type SSO_IT, type SSO_NL, type SSO_NL_BE, type SSO_NO, type SSO_PL, type SSO_PT, type SSO_SE, type SSO_SV_FI, type SSO_UK, type SSO_US, SV_FI_CALENDAR_CONFIG, type StudentsLocaleConfig, type StudentsWebCommon, type StudentsWebVars, type StudentsWebVarsPreset, TTSOverrideSymbol, type TeachersLocaleConfig, type TeachersWebCommon, type TeachersWebVars, type TeachersWebVarsPreset, TreeLevel, buildTargetToEnvironment };
|
|
1123
|
+
export { AT_CALENDAR_CONFIG, ApiRegion, AppConfigManager, type AuthWebBaseVars, type AuthWebEuLocalePreset, type AuthWebVars, type AuthWebVarsPreset, CH_CALENDAR_CONFIG, type CalendarConfig, CalendarLocale, type CommonGrades, DE_CALENDAR_CONFIG, DK_CALENDAR_CONFIG, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictLocaleConfig, type DistrictWebVarsPreset, DrawboardCoinVariant, EN_CALENDAR_CONFIG, ES_CALENDAR_CONFIG, type EnvPreset, Environment, type EnvironmentVars, FI_CALENDAR_CONFIG, FR_CALENDAR_CONFIG, Grade, type GradeData, type HighSchoolGrades, HomeRegion, IS_CALENDAR_CONFIG, IT_CALENDAR_CONFIG, type KeyboardConfig, KeyboardCurrencyVariant, KeyboardPreset, KeyboardTimeVariant, LANGUAGES_CONFIG, LANGUAGES_LIST, Language, type LanguageConfig, Locale, type LocaleLanguageData, LoginSource, MOST_USED_LANGUAGES, MatrixMode, type MobileBaseVars, type MobileCommon, type MobileEuLocalePreset, type MobileLocaleConfig, type MobileVars, type MobileVarsPreset, MomentDateLocale, MultiplicationSymbol, NL_BE_CALENDAR_CONFIG, NL_CALENDAR_CONFIG, NO_CALENDAR_CONFIG, NumberDecimalSeparator, NumberGroupingSeparator, PL_CALENDAR_CONFIG, PRIORITY_LANGUAGES, PT_CALENDAR_CONFIG, type ParentWebLocaleConfig, type ParentWebVars, type ParentWebVarsPreset, Platform, PlatformBuildTarget, type PrimaryGrades, type ProblemCreatorConfig, ProblemCreatorDescriptionVariant, type ProblemCreatorKeyboardConfig, ProblemCreatorKeyboardPreset, ProblemCreatorMathEntryVariant, QRCodeSize, SE_CALENDAR_CONFIG, SSO, type SSOByLocale, type SSOConfig, type SSOVariant, type SSO_AT, type SSO_CH, type SSO_DE, type SSO_DK, type SSO_ES, type SSO_FI, type SSO_FR, type SSO_IE, type SSO_IS, type SSO_IT, type SSO_NL, type SSO_NL_BE, type SSO_NO, type SSO_PL, type SSO_PT, type SSO_SE, type SSO_SV_FI, type SSO_UK, type SSO_US, SV_FI_CALENDAR_CONFIG, type StudentsLocaleConfig, type StudentsWebCommon, type StudentsWebVars, type StudentsWebVarsPreset, TTSOverrideSymbol, type TeachersLocaleConfig, type TeachersWebCommon, type TeachersWebVars, type TeachersWebVarsPreset, TreeLevel, buildTargetToEnvironment };
|