@magmamath/frontend-config 1.5.0-rc.0 → 1.5.0-rc.2
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-D7-P-TVv.d.mts → common.constants-CT16TdXo.d.mts} +6 -10
- package/dist/{common.constants-D7-P-TVv.d.ts → common.constants-CT16TdXo.d.ts} +6 -10
- package/dist/index.d.mts +72 -27
- package/dist/index.d.ts +72 -27
- package/dist/index.js +915 -927
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +916 -923
- 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 +2 -3
|
@@ -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",
|
|
@@ -88,19 +93,10 @@ declare enum ApiRegion {
|
|
|
88
93
|
MAIN = "MAIN",
|
|
89
94
|
CANADA = "CANADA"
|
|
90
95
|
}
|
|
91
|
-
declare enum HomeRegion {
|
|
92
|
-
EU_MAIN = "eu-main",
|
|
93
|
-
US_MAIN = "us-main",
|
|
94
|
-
CA_MAIN = "ca-main"
|
|
95
|
-
}
|
|
96
|
-
declare enum RegionURLVariant {
|
|
97
|
-
DEFAULT = "DEFAULT",
|
|
98
|
-
SV_SE = "sv-SE"
|
|
99
|
-
}
|
|
100
96
|
declare enum QRCodeSize {
|
|
101
97
|
DEFAULT = "default",
|
|
102
98
|
MEDIUM = "medium",
|
|
103
99
|
LARGE = "large"
|
|
104
100
|
}
|
|
105
101
|
|
|
106
|
-
export { ApiRegion as A, Environment as E, HomeRegion as H, LoginSource as L, Platform as P, QRCodeSize as Q,
|
|
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",
|
|
@@ -88,19 +93,10 @@ declare enum ApiRegion {
|
|
|
88
93
|
MAIN = "MAIN",
|
|
89
94
|
CANADA = "CANADA"
|
|
90
95
|
}
|
|
91
|
-
declare enum HomeRegion {
|
|
92
|
-
EU_MAIN = "eu-main",
|
|
93
|
-
US_MAIN = "us-main",
|
|
94
|
-
CA_MAIN = "ca-main"
|
|
95
|
-
}
|
|
96
|
-
declare enum RegionURLVariant {
|
|
97
|
-
DEFAULT = "DEFAULT",
|
|
98
|
-
SV_SE = "sv-SE"
|
|
99
|
-
}
|
|
100
96
|
declare enum QRCodeSize {
|
|
101
97
|
DEFAULT = "default",
|
|
102
98
|
MEDIUM = "medium",
|
|
103
99
|
LARGE = "large"
|
|
104
100
|
}
|
|
105
101
|
|
|
106
|
-
export { ApiRegion as A, Environment as E, HomeRegion as H, LoginSource as L, Platform as P, QRCodeSize as Q,
|
|
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]: {
|
|
432
|
+
[key in Environment]: TeachersWebVars;
|
|
433
|
+
};
|
|
434
|
+
[HomeRegion.CA_MAIN]: {
|
|
424
435
|
[key in Environment]: TeachersWebVars;
|
|
425
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]: {
|
|
781
|
+
[key in Environment]: WebAdminVars;
|
|
782
|
+
};
|
|
783
|
+
[HomeRegion.CA_MAIN]: {
|
|
739
784
|
[key in Environment]: WebAdminVars;
|
|
740
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,24 +818,10 @@ 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
|
|
|
767
|
-
type RegionURLOverrides = {
|
|
768
|
-
API_URL: string;
|
|
769
|
-
CDN_HOST: string;
|
|
770
|
-
CDN_HOST_TRANSLATIONS: string;
|
|
771
|
-
SOCKET_URL: string;
|
|
772
|
-
WEBSOCKETS_URL: string;
|
|
773
|
-
};
|
|
774
|
-
type RegionURLsMap = Record<Environment, Record<HomeRegion, Partial<Record<RegionURLVariant, RegionURLOverrides>>>>;
|
|
775
|
-
|
|
776
|
-
declare const REGION_URLS: RegionURLsMap;
|
|
777
|
-
declare const localeToRegionVariant: (locale: Locale) => RegionURLVariant;
|
|
778
|
-
declare const REGION_LOGGLY_SUFFIX: Record<HomeRegion, '' | 'US' | 'CA'>;
|
|
779
|
-
declare const rebuildLogglyTagForHomeRegion: (baseTag: string, homeRegion: HomeRegion) => string;
|
|
780
|
-
|
|
781
825
|
declare enum KeyboardPreset {
|
|
782
826
|
DOT_MIXED = "DotMixed",
|
|
783
827
|
DOT_MIXED_ALT = "DotMixedAlt",
|
|
@@ -1022,6 +1066,7 @@ type DevOverrides<P extends Platform> = {
|
|
|
1022
1066
|
type ConfigOptions<P extends Platform> = {
|
|
1023
1067
|
platform: P;
|
|
1024
1068
|
environment: Environment;
|
|
1069
|
+
homeRegion?: HomeRegion;
|
|
1025
1070
|
_DEV_OVERRIDES_?: DevOverrides<P>;
|
|
1026
1071
|
};
|
|
1027
1072
|
type SetProps<L extends Locale> = {
|
|
@@ -1036,7 +1081,7 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1036
1081
|
environment: Environment;
|
|
1037
1082
|
locale: L;
|
|
1038
1083
|
envsRegion: L;
|
|
1039
|
-
homeRegion
|
|
1084
|
+
homeRegion: HomeRegion;
|
|
1040
1085
|
private readonly setEnvs;
|
|
1041
1086
|
private readonly setLocaleConfig;
|
|
1042
1087
|
readonly $envs: effector.StoreWritable<EnvironmentVars<P>>;
|
|
@@ -1051,7 +1096,7 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1051
1096
|
isPolish: boolean;
|
|
1052
1097
|
}>;
|
|
1053
1098
|
constructor(opts: ConfigOptions<P>);
|
|
1054
|
-
private readonly
|
|
1099
|
+
private readonly resolveEnvs;
|
|
1055
1100
|
private readonly syncConfigsStores;
|
|
1056
1101
|
readonly set: (props: SetProps<L>) => void;
|
|
1057
1102
|
getEnvs: () => EnvironmentVars<P>;
|
|
@@ -1075,4 +1120,4 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1075
1120
|
};
|
|
1076
1121
|
}
|
|
1077
1122
|
|
|
1078
|
-
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, 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 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,
|
|
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]: {
|
|
432
|
+
[key in Environment]: TeachersWebVars;
|
|
433
|
+
};
|
|
434
|
+
[HomeRegion.CA_MAIN]: {
|
|
424
435
|
[key in Environment]: TeachersWebVars;
|
|
425
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]: {
|
|
781
|
+
[key in Environment]: WebAdminVars;
|
|
782
|
+
};
|
|
783
|
+
[HomeRegion.CA_MAIN]: {
|
|
739
784
|
[key in Environment]: WebAdminVars;
|
|
740
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,24 +818,10 @@ 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
|
|
|
767
|
-
type RegionURLOverrides = {
|
|
768
|
-
API_URL: string;
|
|
769
|
-
CDN_HOST: string;
|
|
770
|
-
CDN_HOST_TRANSLATIONS: string;
|
|
771
|
-
SOCKET_URL: string;
|
|
772
|
-
WEBSOCKETS_URL: string;
|
|
773
|
-
};
|
|
774
|
-
type RegionURLsMap = Record<Environment, Record<HomeRegion, Partial<Record<RegionURLVariant, RegionURLOverrides>>>>;
|
|
775
|
-
|
|
776
|
-
declare const REGION_URLS: RegionURLsMap;
|
|
777
|
-
declare const localeToRegionVariant: (locale: Locale) => RegionURLVariant;
|
|
778
|
-
declare const REGION_LOGGLY_SUFFIX: Record<HomeRegion, '' | 'US' | 'CA'>;
|
|
779
|
-
declare const rebuildLogglyTagForHomeRegion: (baseTag: string, homeRegion: HomeRegion) => string;
|
|
780
|
-
|
|
781
825
|
declare enum KeyboardPreset {
|
|
782
826
|
DOT_MIXED = "DotMixed",
|
|
783
827
|
DOT_MIXED_ALT = "DotMixedAlt",
|
|
@@ -1022,6 +1066,7 @@ type DevOverrides<P extends Platform> = {
|
|
|
1022
1066
|
type ConfigOptions<P extends Platform> = {
|
|
1023
1067
|
platform: P;
|
|
1024
1068
|
environment: Environment;
|
|
1069
|
+
homeRegion?: HomeRegion;
|
|
1025
1070
|
_DEV_OVERRIDES_?: DevOverrides<P>;
|
|
1026
1071
|
};
|
|
1027
1072
|
type SetProps<L extends Locale> = {
|
|
@@ -1036,7 +1081,7 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1036
1081
|
environment: Environment;
|
|
1037
1082
|
locale: L;
|
|
1038
1083
|
envsRegion: L;
|
|
1039
|
-
homeRegion
|
|
1084
|
+
homeRegion: HomeRegion;
|
|
1040
1085
|
private readonly setEnvs;
|
|
1041
1086
|
private readonly setLocaleConfig;
|
|
1042
1087
|
readonly $envs: effector.StoreWritable<EnvironmentVars<P>>;
|
|
@@ -1051,7 +1096,7 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1051
1096
|
isPolish: boolean;
|
|
1052
1097
|
}>;
|
|
1053
1098
|
constructor(opts: ConfigOptions<P>);
|
|
1054
|
-
private readonly
|
|
1099
|
+
private readonly resolveEnvs;
|
|
1055
1100
|
private readonly syncConfigsStores;
|
|
1056
1101
|
readonly set: (props: SetProps<L>) => void;
|
|
1057
1102
|
getEnvs: () => EnvironmentVars<P>;
|
|
@@ -1075,4 +1120,4 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1075
1120
|
};
|
|
1076
1121
|
}
|
|
1077
1122
|
|
|
1078
|
-
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, 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 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,
|
|
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 };
|