@magmamath/frontend-config 1.5.11 → 1.6.1-rc.0
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 +16 -15
- package/dist/index.d.ts +16 -15
- package/dist/index.js +60 -87
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +59 -87
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -4
package/dist/index.d.mts
CHANGED
|
@@ -427,7 +427,6 @@ type TeachersWebCommon = {
|
|
|
427
427
|
MYSCRIPT_REST_HMAC_KEY: string;
|
|
428
428
|
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
429
429
|
INTERCOM_APP_ID: string;
|
|
430
|
-
CLARITY_PROJECT_ID: string;
|
|
431
430
|
LOGGLY_CUSTOMER_TOKEN: string;
|
|
432
431
|
TOLGEE_API_URL?: string;
|
|
433
432
|
TOLGEE_API_KEY?: string;
|
|
@@ -452,7 +451,7 @@ type TeachersWebVarsPreset = {
|
|
|
452
451
|
type DistrictCommon = {
|
|
453
452
|
CDN_HOST_TRANSLATIONS: string;
|
|
454
453
|
INTERCOM_APP_ID: string;
|
|
455
|
-
|
|
454
|
+
AMPLITUDE_API_KEY?: string;
|
|
456
455
|
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
457
456
|
TOLGEE_API_URL?: string;
|
|
458
457
|
TOLGEE_API_KEY?: string;
|
|
@@ -587,7 +586,7 @@ type Prettify<T> = T extends Function ? T : {
|
|
|
587
586
|
type AuthWebVars<T extends SSOVariant> = Prettify<AuthWebBaseVars & T>;
|
|
588
587
|
type AuthWebBaseVars = Omit<RegionSpecificVars, 'CDN_HOST' | 'LOGGLY_TAG' | 'SOCKET_URL' | 'WEBSOCKETS_URL'> & {
|
|
589
588
|
TOS_URL: string;
|
|
590
|
-
|
|
589
|
+
AMPLITUDE_API_KEY?: string;
|
|
591
590
|
INTERCOM_APP_ID: string;
|
|
592
591
|
TOLGEE_API_URL?: string;
|
|
593
592
|
TOLGEE_API_KEY?: string;
|
|
@@ -857,15 +856,6 @@ declare enum DrawboardCoinVariant {
|
|
|
857
856
|
SE = "se",
|
|
858
857
|
PL = "pl"
|
|
859
858
|
}
|
|
860
|
-
declare enum DrawBoardSectionName {
|
|
861
|
-
ALGEBRA = "ALGEBRA",
|
|
862
|
-
ALGEBRA_SIMPLE = "ALGEBRA_SIMPLE"
|
|
863
|
-
}
|
|
864
|
-
type ManipulativeOverride = {
|
|
865
|
-
grades: number[];
|
|
866
|
-
sections: DrawBoardSectionName[];
|
|
867
|
-
shapes: string[];
|
|
868
|
-
};
|
|
869
859
|
|
|
870
860
|
type KeyboardConfig = {
|
|
871
861
|
preset: KeyboardPreset;
|
|
@@ -886,7 +876,6 @@ type StudentsLocaleConfig = CommonLocaleConfig & {
|
|
|
886
876
|
drawboard: {
|
|
887
877
|
basicManipulativesMaxGrade: number;
|
|
888
878
|
coinVariant: DrawboardCoinVariant;
|
|
889
|
-
manipulativeOverrides?: ManipulativeOverride[];
|
|
890
879
|
};
|
|
891
880
|
exampleSolutions: {
|
|
892
881
|
languageName: string;
|
|
@@ -1030,6 +1019,15 @@ declare enum MultiplicationSymbol {
|
|
|
1030
1019
|
TIMES = "TIMES"
|
|
1031
1020
|
}
|
|
1032
1021
|
|
|
1022
|
+
type MultiplicationGradeRule = {
|
|
1023
|
+
fromGrade: Grade;
|
|
1024
|
+
symbol: MultiplicationSymbol;
|
|
1025
|
+
};
|
|
1026
|
+
type MultiplicationConfig = {
|
|
1027
|
+
default: MultiplicationSymbol;
|
|
1028
|
+
byGrade?: MultiplicationGradeRule[];
|
|
1029
|
+
};
|
|
1030
|
+
|
|
1033
1031
|
type CommonLocaleConfig = Readonly<{
|
|
1034
1032
|
name: string;
|
|
1035
1033
|
languageName: string;
|
|
@@ -1044,7 +1042,7 @@ type CommonLocaleConfig = Readonly<{
|
|
|
1044
1042
|
groupingSeparator: NumberGroupingSeparator;
|
|
1045
1043
|
};
|
|
1046
1044
|
mathSymbols: {
|
|
1047
|
-
multiplication:
|
|
1045
|
+
multiplication: MultiplicationConfig;
|
|
1048
1046
|
};
|
|
1049
1047
|
}>;
|
|
1050
1048
|
type LocalePreset = {
|
|
@@ -1079,6 +1077,9 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
|
|
|
1079
1077
|
problemCreator: ProblemCreatorConfig;
|
|
1080
1078
|
};
|
|
1081
1079
|
|
|
1080
|
+
declare const getGradeLevel: (grade: Grade | number | null) => number | null;
|
|
1081
|
+
declare const getMultiplicationSymbol: (config: MultiplicationConfig, grade: Grade | number | null) => MultiplicationSymbol;
|
|
1082
|
+
|
|
1082
1083
|
type DevOverrides<P extends Platform> = {
|
|
1083
1084
|
[K in Locale]?: Partial<EnvironmentVars<P>>;
|
|
1084
1085
|
};
|
|
@@ -1139,4 +1140,4 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1139
1140
|
};
|
|
1140
1141
|
}
|
|
1141
1142
|
|
|
1142
|
-
export { AT_CALENDAR_CONFIG, AppConfigManager, type AuthWebBaseVars, type AuthWebEuLocalePreset, type AuthWebVars, type AuthWebVarsPreset, CH_CALENDAR_CONFIG, CalculatorType, type CalendarConfig, CalendarLocale, type CommonGrades, DE_CALENDAR_CONFIG, DK_CALENDAR_CONFIG, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictLocaleConfig, type DistrictWebVarsPreset,
|
|
1143
|
+
export { AT_CALENDAR_CONFIG, AppConfigManager, type AuthWebBaseVars, type AuthWebEuLocalePreset, type AuthWebVars, type AuthWebVarsPreset, CH_CALENDAR_CONFIG, CalculatorType, 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, type MultiplicationConfig, type MultiplicationGradeRule, 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, getGradeLevel, getMultiplicationSymbol };
|
package/dist/index.d.ts
CHANGED
|
@@ -427,7 +427,6 @@ type TeachersWebCommon = {
|
|
|
427
427
|
MYSCRIPT_REST_HMAC_KEY: string;
|
|
428
428
|
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
429
429
|
INTERCOM_APP_ID: string;
|
|
430
|
-
CLARITY_PROJECT_ID: string;
|
|
431
430
|
LOGGLY_CUSTOMER_TOKEN: string;
|
|
432
431
|
TOLGEE_API_URL?: string;
|
|
433
432
|
TOLGEE_API_KEY?: string;
|
|
@@ -452,7 +451,7 @@ type TeachersWebVarsPreset = {
|
|
|
452
451
|
type DistrictCommon = {
|
|
453
452
|
CDN_HOST_TRANSLATIONS: string;
|
|
454
453
|
INTERCOM_APP_ID: string;
|
|
455
|
-
|
|
454
|
+
AMPLITUDE_API_KEY?: string;
|
|
456
455
|
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
457
456
|
TOLGEE_API_URL?: string;
|
|
458
457
|
TOLGEE_API_KEY?: string;
|
|
@@ -587,7 +586,7 @@ type Prettify<T> = T extends Function ? T : {
|
|
|
587
586
|
type AuthWebVars<T extends SSOVariant> = Prettify<AuthWebBaseVars & T>;
|
|
588
587
|
type AuthWebBaseVars = Omit<RegionSpecificVars, 'CDN_HOST' | 'LOGGLY_TAG' | 'SOCKET_URL' | 'WEBSOCKETS_URL'> & {
|
|
589
588
|
TOS_URL: string;
|
|
590
|
-
|
|
589
|
+
AMPLITUDE_API_KEY?: string;
|
|
591
590
|
INTERCOM_APP_ID: string;
|
|
592
591
|
TOLGEE_API_URL?: string;
|
|
593
592
|
TOLGEE_API_KEY?: string;
|
|
@@ -857,15 +856,6 @@ declare enum DrawboardCoinVariant {
|
|
|
857
856
|
SE = "se",
|
|
858
857
|
PL = "pl"
|
|
859
858
|
}
|
|
860
|
-
declare enum DrawBoardSectionName {
|
|
861
|
-
ALGEBRA = "ALGEBRA",
|
|
862
|
-
ALGEBRA_SIMPLE = "ALGEBRA_SIMPLE"
|
|
863
|
-
}
|
|
864
|
-
type ManipulativeOverride = {
|
|
865
|
-
grades: number[];
|
|
866
|
-
sections: DrawBoardSectionName[];
|
|
867
|
-
shapes: string[];
|
|
868
|
-
};
|
|
869
859
|
|
|
870
860
|
type KeyboardConfig = {
|
|
871
861
|
preset: KeyboardPreset;
|
|
@@ -886,7 +876,6 @@ type StudentsLocaleConfig = CommonLocaleConfig & {
|
|
|
886
876
|
drawboard: {
|
|
887
877
|
basicManipulativesMaxGrade: number;
|
|
888
878
|
coinVariant: DrawboardCoinVariant;
|
|
889
|
-
manipulativeOverrides?: ManipulativeOverride[];
|
|
890
879
|
};
|
|
891
880
|
exampleSolutions: {
|
|
892
881
|
languageName: string;
|
|
@@ -1030,6 +1019,15 @@ declare enum MultiplicationSymbol {
|
|
|
1030
1019
|
TIMES = "TIMES"
|
|
1031
1020
|
}
|
|
1032
1021
|
|
|
1022
|
+
type MultiplicationGradeRule = {
|
|
1023
|
+
fromGrade: Grade;
|
|
1024
|
+
symbol: MultiplicationSymbol;
|
|
1025
|
+
};
|
|
1026
|
+
type MultiplicationConfig = {
|
|
1027
|
+
default: MultiplicationSymbol;
|
|
1028
|
+
byGrade?: MultiplicationGradeRule[];
|
|
1029
|
+
};
|
|
1030
|
+
|
|
1033
1031
|
type CommonLocaleConfig = Readonly<{
|
|
1034
1032
|
name: string;
|
|
1035
1033
|
languageName: string;
|
|
@@ -1044,7 +1042,7 @@ type CommonLocaleConfig = Readonly<{
|
|
|
1044
1042
|
groupingSeparator: NumberGroupingSeparator;
|
|
1045
1043
|
};
|
|
1046
1044
|
mathSymbols: {
|
|
1047
|
-
multiplication:
|
|
1045
|
+
multiplication: MultiplicationConfig;
|
|
1048
1046
|
};
|
|
1049
1047
|
}>;
|
|
1050
1048
|
type LocalePreset = {
|
|
@@ -1079,6 +1077,9 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
|
|
|
1079
1077
|
problemCreator: ProblemCreatorConfig;
|
|
1080
1078
|
};
|
|
1081
1079
|
|
|
1080
|
+
declare const getGradeLevel: (grade: Grade | number | null) => number | null;
|
|
1081
|
+
declare const getMultiplicationSymbol: (config: MultiplicationConfig, grade: Grade | number | null) => MultiplicationSymbol;
|
|
1082
|
+
|
|
1082
1083
|
type DevOverrides<P extends Platform> = {
|
|
1083
1084
|
[K in Locale]?: Partial<EnvironmentVars<P>>;
|
|
1084
1085
|
};
|
|
@@ -1139,4 +1140,4 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1139
1140
|
};
|
|
1140
1141
|
}
|
|
1141
1142
|
|
|
1142
|
-
export { AT_CALENDAR_CONFIG, AppConfigManager, type AuthWebBaseVars, type AuthWebEuLocalePreset, type AuthWebVars, type AuthWebVarsPreset, CH_CALENDAR_CONFIG, CalculatorType, type CalendarConfig, CalendarLocale, type CommonGrades, DE_CALENDAR_CONFIG, DK_CALENDAR_CONFIG, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type DistrictLocaleConfig, type DistrictWebVarsPreset,
|
|
1143
|
+
export { AT_CALENDAR_CONFIG, AppConfigManager, type AuthWebBaseVars, type AuthWebEuLocalePreset, type AuthWebVars, type AuthWebVarsPreset, CH_CALENDAR_CONFIG, CalculatorType, 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, type MultiplicationConfig, type MultiplicationGradeRule, 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, getGradeLevel, getMultiplicationSymbol };
|