@magmamath/frontend-config 1.2.3-rc.1 → 1.2.3-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/{common.constants-B88CwNGl.d.mts → common.constants-D62BBLYP.d.mts} +12 -9
- package/dist/{common.constants-B88CwNGl.d.ts → common.constants-D62BBLYP.d.ts} +12 -9
- package/dist/index.d.mts +21 -3
- package/dist/index.d.ts +21 -3
- package/dist/index.js +427 -177
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +426 -178
- 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 +10 -4
|
@@ -4,7 +4,8 @@ declare enum Platform {
|
|
|
4
4
|
DISTRICT_DASHBOARD = "DISTRICT",
|
|
5
5
|
AUTH_WEB = "AUTH_WEB",
|
|
6
6
|
WEB_ADMIN = "WEB_ADMIN",
|
|
7
|
-
MOBILE = "MOBILE"
|
|
7
|
+
MOBILE = "MOBILE",
|
|
8
|
+
PARENT_WEB = "PARENT_WEB"
|
|
8
9
|
}
|
|
9
10
|
declare enum Environment {
|
|
10
11
|
MARS = "MARS",
|
|
@@ -18,14 +19,16 @@ declare enum PlatformBuildTarget {
|
|
|
18
19
|
PROD = "production"
|
|
19
20
|
}
|
|
20
21
|
declare enum Locale {
|
|
21
|
-
US = "
|
|
22
|
-
SE = "sv
|
|
23
|
-
GB = "
|
|
24
|
-
CA = "
|
|
25
|
-
SCT = "
|
|
26
|
-
DE = "de
|
|
27
|
-
PL = "pl
|
|
22
|
+
US = "us",
|
|
23
|
+
SE = "sv",
|
|
24
|
+
GB = "uk",
|
|
25
|
+
CA = "ca",
|
|
26
|
+
SCT = "sct",
|
|
27
|
+
DE = "de",
|
|
28
|
+
PL = "pl"
|
|
28
29
|
}
|
|
30
|
+
declare const LOCALE_TO_BCP47: Record<Locale, string>;
|
|
31
|
+
declare function parseLocale(value: string | null | undefined): Locale | null;
|
|
29
32
|
declare enum Source {
|
|
30
33
|
MATTEAPPEN = 0,
|
|
31
34
|
SKOLON = 1,
|
|
@@ -79,4 +82,4 @@ declare enum QRCodeSize {
|
|
|
79
82
|
LARGE = "large"
|
|
80
83
|
}
|
|
81
84
|
|
|
82
|
-
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,
|
|
85
|
+
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, LOCALE_TO_BCP47 as c, Source as d, parseLocale as p };
|
|
@@ -4,7 +4,8 @@ declare enum Platform {
|
|
|
4
4
|
DISTRICT_DASHBOARD = "DISTRICT",
|
|
5
5
|
AUTH_WEB = "AUTH_WEB",
|
|
6
6
|
WEB_ADMIN = "WEB_ADMIN",
|
|
7
|
-
MOBILE = "MOBILE"
|
|
7
|
+
MOBILE = "MOBILE",
|
|
8
|
+
PARENT_WEB = "PARENT_WEB"
|
|
8
9
|
}
|
|
9
10
|
declare enum Environment {
|
|
10
11
|
MARS = "MARS",
|
|
@@ -18,14 +19,16 @@ declare enum PlatformBuildTarget {
|
|
|
18
19
|
PROD = "production"
|
|
19
20
|
}
|
|
20
21
|
declare enum Locale {
|
|
21
|
-
US = "
|
|
22
|
-
SE = "sv
|
|
23
|
-
GB = "
|
|
24
|
-
CA = "
|
|
25
|
-
SCT = "
|
|
26
|
-
DE = "de
|
|
27
|
-
PL = "pl
|
|
22
|
+
US = "us",
|
|
23
|
+
SE = "sv",
|
|
24
|
+
GB = "uk",
|
|
25
|
+
CA = "ca",
|
|
26
|
+
SCT = "sct",
|
|
27
|
+
DE = "de",
|
|
28
|
+
PL = "pl"
|
|
28
29
|
}
|
|
30
|
+
declare const LOCALE_TO_BCP47: Record<Locale, string>;
|
|
31
|
+
declare function parseLocale(value: string | null | undefined): Locale | null;
|
|
29
32
|
declare enum Source {
|
|
30
33
|
MATTEAPPEN = 0,
|
|
31
34
|
SKOLON = 1,
|
|
@@ -79,4 +82,4 @@ declare enum QRCodeSize {
|
|
|
79
82
|
LARGE = "large"
|
|
80
83
|
}
|
|
81
84
|
|
|
82
|
-
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,
|
|
85
|
+
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, LOCALE_TO_BCP47 as c, Source as d, parseLocale as p };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SSO, L as LoginSource, a as Locale, E as Environment, P as Platform, b as PlatformBuildTarget, Q as QRCodeSize, A as ApiRegion } from './common.constants-
|
|
2
|
-
export { c as Source } from './common.constants-
|
|
1
|
+
import { S as SSO, L as LoginSource, a as Locale, E as Environment, P as Platform, b as PlatformBuildTarget, Q as QRCodeSize, A as ApiRegion } from './common.constants-D62BBLYP.mjs';
|
|
2
|
+
export { c as LOCALE_TO_BCP47, d as Source, p as parseLocale } from './common.constants-D62BBLYP.mjs';
|
|
3
3
|
import { ComponentType } from 'react';
|
|
4
4
|
import * as effector from 'effector';
|
|
5
5
|
|
|
@@ -310,6 +310,7 @@ type RegionSpecificVars = {
|
|
|
310
310
|
DISTRICT_WEB_URL: string;
|
|
311
311
|
LOGGLY_TAG: string;
|
|
312
312
|
MAGMAMATH_URL: string;
|
|
313
|
+
PARENT_WEB_URL: string;
|
|
313
314
|
SOCKET_URL: string;
|
|
314
315
|
STUDENTS_WEB_URL: string;
|
|
315
316
|
TEACHERS_WEB_URL: string;
|
|
@@ -515,6 +516,17 @@ type WebAdminVarsPreset = {
|
|
|
515
516
|
};
|
|
516
517
|
};
|
|
517
518
|
|
|
519
|
+
type ParentWebVars = {
|
|
520
|
+
API_URL: string;
|
|
521
|
+
CDN_HOST: string;
|
|
522
|
+
AUTH_WEB_URL: string;
|
|
523
|
+
};
|
|
524
|
+
type ParentWebVarsPreset = {
|
|
525
|
+
[key in Locale]: {
|
|
526
|
+
[key in Environment]: ParentWebVars;
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
|
|
518
530
|
type EnvPreset = Readonly<{
|
|
519
531
|
[Platform.STUDENTS_WEB]: StudentsWebVarsPreset;
|
|
520
532
|
[Platform.TEACHERS_WEB]: TeachersWebVarsPreset;
|
|
@@ -522,6 +534,7 @@ type EnvPreset = Readonly<{
|
|
|
522
534
|
[Platform.AUTH_WEB]: AuthWebVarsPreset;
|
|
523
535
|
[Platform.WEB_ADMIN]: WebAdminVarsPreset;
|
|
524
536
|
[Platform.MOBILE]: MobileVarsPreset;
|
|
537
|
+
[Platform.PARENT_WEB]: ParentWebVarsPreset;
|
|
525
538
|
}>;
|
|
526
539
|
type EnvironmentVars<P extends Platform> = EnvPreset[P][Locale][Environment];
|
|
527
540
|
|
|
@@ -704,6 +717,8 @@ type MobileLocaleConfig<E> = StudentsLocaleConfig & TeachersLocaleConfig & AuthL
|
|
|
704
717
|
calendar: CalendarConfig;
|
|
705
718
|
};
|
|
706
719
|
|
|
720
|
+
type ParentWebLocaleConfig = CommonLocaleConfig;
|
|
721
|
+
|
|
707
722
|
declare enum MultiplicationSymbol {
|
|
708
723
|
CDOT = "CDOT",
|
|
709
724
|
TIMES = "TIMES"
|
|
@@ -745,6 +760,9 @@ type LocalePreset = {
|
|
|
745
760
|
[Platform.MOBILE]: {
|
|
746
761
|
[key in Locale]: MobileLocaleConfig<MobileVars<SSOByLocale[key]>>;
|
|
747
762
|
};
|
|
763
|
+
[Platform.PARENT_WEB]: {
|
|
764
|
+
[key in Locale]: ParentWebLocaleConfig;
|
|
765
|
+
};
|
|
748
766
|
};
|
|
749
767
|
type LocaleConfig<P extends Platform, L extends Locale> = LocalePreset[P][L];
|
|
750
768
|
|
|
@@ -809,4 +827,4 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
809
827
|
};
|
|
810
828
|
}
|
|
811
829
|
|
|
812
|
-
export { ApiRegion, AppConfigManager, type AuthWebBaseVars, type AuthWebVars, type AuthWebVarsPreset, type CalendarConfig, CalendarLocale, type CommonGrades, DE_CALENDAR_CONFIG, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictLocaleConfig, type DistrictWebVarsPreset, DrawboardCoinVariant, EN_CALENDAR_CONFIG, type EnvPreset, Environment, type EnvironmentVars, Grade, type GradeData, type HighSchoolGrades, 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, NumberDecimalSeparator, NumberGroupingSeparator, PL_CALENDAR_CONFIG, PRIORITY_LANGUAGES, Platform, PlatformBuildTarget, type PrimaryGrades, type ProblemCreatorConfig, ProblemCreatorDescriptionVariant, type ProblemCreatorKeyboardConfig, ProblemCreatorKeyboardPreset, ProblemCreatorMathEntryVariant, QRCodeSize, SE_CALENDAR_CONFIG, SSO, type SSOByLocale, type SSOConfig, type SSOVariant, type SSO_DE, type SSO_PL, type SSO_SE, type SSO_UK, type SSO_US, type StudentsLocaleConfig, type StudentsWebCommon, type StudentsWebVars, type StudentsWebVarsPreset, TTSOverrideSymbol, type TeachersLocaleConfig, type TeachersWebCommon, type TeachersWebVars, type TeachersWebVarsPreset, TreeLevel, buildTargetToEnvironment };
|
|
830
|
+
export { ApiRegion, AppConfigManager, type AuthWebBaseVars, type AuthWebVars, type AuthWebVarsPreset, type CalendarConfig, CalendarLocale, type CommonGrades, DE_CALENDAR_CONFIG, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictLocaleConfig, type DistrictWebVarsPreset, DrawboardCoinVariant, EN_CALENDAR_CONFIG, type EnvPreset, Environment, type EnvironmentVars, Grade, type GradeData, type HighSchoolGrades, 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, NumberDecimalSeparator, NumberGroupingSeparator, PL_CALENDAR_CONFIG, PRIORITY_LANGUAGES, 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_DE, type SSO_PL, type SSO_SE, type SSO_UK, type SSO_US, 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, a as Locale, E as Environment, P as Platform, b as PlatformBuildTarget, Q as QRCodeSize, A as ApiRegion } from './common.constants-
|
|
2
|
-
export { c as Source } from './common.constants-
|
|
1
|
+
import { S as SSO, L as LoginSource, a as Locale, E as Environment, P as Platform, b as PlatformBuildTarget, Q as QRCodeSize, A as ApiRegion } from './common.constants-D62BBLYP.js';
|
|
2
|
+
export { c as LOCALE_TO_BCP47, d as Source, p as parseLocale } from './common.constants-D62BBLYP.js';
|
|
3
3
|
import { ComponentType } from 'react';
|
|
4
4
|
import * as effector from 'effector';
|
|
5
5
|
|
|
@@ -310,6 +310,7 @@ type RegionSpecificVars = {
|
|
|
310
310
|
DISTRICT_WEB_URL: string;
|
|
311
311
|
LOGGLY_TAG: string;
|
|
312
312
|
MAGMAMATH_URL: string;
|
|
313
|
+
PARENT_WEB_URL: string;
|
|
313
314
|
SOCKET_URL: string;
|
|
314
315
|
STUDENTS_WEB_URL: string;
|
|
315
316
|
TEACHERS_WEB_URL: string;
|
|
@@ -515,6 +516,17 @@ type WebAdminVarsPreset = {
|
|
|
515
516
|
};
|
|
516
517
|
};
|
|
517
518
|
|
|
519
|
+
type ParentWebVars = {
|
|
520
|
+
API_URL: string;
|
|
521
|
+
CDN_HOST: string;
|
|
522
|
+
AUTH_WEB_URL: string;
|
|
523
|
+
};
|
|
524
|
+
type ParentWebVarsPreset = {
|
|
525
|
+
[key in Locale]: {
|
|
526
|
+
[key in Environment]: ParentWebVars;
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
|
|
518
530
|
type EnvPreset = Readonly<{
|
|
519
531
|
[Platform.STUDENTS_WEB]: StudentsWebVarsPreset;
|
|
520
532
|
[Platform.TEACHERS_WEB]: TeachersWebVarsPreset;
|
|
@@ -522,6 +534,7 @@ type EnvPreset = Readonly<{
|
|
|
522
534
|
[Platform.AUTH_WEB]: AuthWebVarsPreset;
|
|
523
535
|
[Platform.WEB_ADMIN]: WebAdminVarsPreset;
|
|
524
536
|
[Platform.MOBILE]: MobileVarsPreset;
|
|
537
|
+
[Platform.PARENT_WEB]: ParentWebVarsPreset;
|
|
525
538
|
}>;
|
|
526
539
|
type EnvironmentVars<P extends Platform> = EnvPreset[P][Locale][Environment];
|
|
527
540
|
|
|
@@ -704,6 +717,8 @@ type MobileLocaleConfig<E> = StudentsLocaleConfig & TeachersLocaleConfig & AuthL
|
|
|
704
717
|
calendar: CalendarConfig;
|
|
705
718
|
};
|
|
706
719
|
|
|
720
|
+
type ParentWebLocaleConfig = CommonLocaleConfig;
|
|
721
|
+
|
|
707
722
|
declare enum MultiplicationSymbol {
|
|
708
723
|
CDOT = "CDOT",
|
|
709
724
|
TIMES = "TIMES"
|
|
@@ -745,6 +760,9 @@ type LocalePreset = {
|
|
|
745
760
|
[Platform.MOBILE]: {
|
|
746
761
|
[key in Locale]: MobileLocaleConfig<MobileVars<SSOByLocale[key]>>;
|
|
747
762
|
};
|
|
763
|
+
[Platform.PARENT_WEB]: {
|
|
764
|
+
[key in Locale]: ParentWebLocaleConfig;
|
|
765
|
+
};
|
|
748
766
|
};
|
|
749
767
|
type LocaleConfig<P extends Platform, L extends Locale> = LocalePreset[P][L];
|
|
750
768
|
|
|
@@ -809,4 +827,4 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
809
827
|
};
|
|
810
828
|
}
|
|
811
829
|
|
|
812
|
-
export { ApiRegion, AppConfigManager, type AuthWebBaseVars, type AuthWebVars, type AuthWebVarsPreset, type CalendarConfig, CalendarLocale, type CommonGrades, DE_CALENDAR_CONFIG, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictLocaleConfig, type DistrictWebVarsPreset, DrawboardCoinVariant, EN_CALENDAR_CONFIG, type EnvPreset, Environment, type EnvironmentVars, Grade, type GradeData, type HighSchoolGrades, 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, NumberDecimalSeparator, NumberGroupingSeparator, PL_CALENDAR_CONFIG, PRIORITY_LANGUAGES, Platform, PlatformBuildTarget, type PrimaryGrades, type ProblemCreatorConfig, ProblemCreatorDescriptionVariant, type ProblemCreatorKeyboardConfig, ProblemCreatorKeyboardPreset, ProblemCreatorMathEntryVariant, QRCodeSize, SE_CALENDAR_CONFIG, SSO, type SSOByLocale, type SSOConfig, type SSOVariant, type SSO_DE, type SSO_PL, type SSO_SE, type SSO_UK, type SSO_US, type StudentsLocaleConfig, type StudentsWebCommon, type StudentsWebVars, type StudentsWebVarsPreset, TTSOverrideSymbol, type TeachersLocaleConfig, type TeachersWebCommon, type TeachersWebVars, type TeachersWebVarsPreset, TreeLevel, buildTargetToEnvironment };
|
|
830
|
+
export { ApiRegion, AppConfigManager, type AuthWebBaseVars, type AuthWebVars, type AuthWebVarsPreset, type CalendarConfig, CalendarLocale, type CommonGrades, DE_CALENDAR_CONFIG, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictLocaleConfig, type DistrictWebVarsPreset, DrawboardCoinVariant, EN_CALENDAR_CONFIG, type EnvPreset, Environment, type EnvironmentVars, Grade, type GradeData, type HighSchoolGrades, 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, NumberDecimalSeparator, NumberGroupingSeparator, PL_CALENDAR_CONFIG, PRIORITY_LANGUAGES, 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_DE, type SSO_PL, type SSO_SE, type SSO_UK, type SSO_US, type StudentsLocaleConfig, type StudentsWebCommon, type StudentsWebVars, type StudentsWebVarsPreset, TTSOverrideSymbol, type TeachersLocaleConfig, type TeachersWebCommon, type TeachersWebVars, type TeachersWebVarsPreset, TreeLevel, buildTargetToEnvironment };
|