@magmamath/frontend-config 1.7.2-rc.10 → 1.7.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-CKKc_B4a.d.mts → common.constants-Dd81SRrq.d.mts} +1 -3
- package/dist/{common.constants-CKKc_B4a.d.ts → common.constants-Dd81SRrq.d.ts} +1 -3
- package/dist/index.d.mts +114 -104
- package/dist/index.d.ts +114 -104
- package/dist/index.js +79 -102
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +78 -103
- 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 -1
|
@@ -75,8 +75,7 @@ declare enum LoginSource {
|
|
|
75
75
|
MICROSOFT = 6,
|
|
76
76
|
APPLE = 7,
|
|
77
77
|
SCHOOLOGY = 8,
|
|
78
|
-
MY_LOGIN = 9
|
|
79
|
-
VIDIS = 18
|
|
78
|
+
MY_LOGIN = 9
|
|
80
79
|
}
|
|
81
80
|
declare enum SSO {
|
|
82
81
|
APPLE = "APPLE",
|
|
@@ -88,7 +87,6 @@ declare enum SSO {
|
|
|
88
87
|
SKOLFEDERATION = "SKOLFEDERATION",
|
|
89
88
|
SKOLON = "SKOLON",
|
|
90
89
|
WONDE = "WONDE",
|
|
91
|
-
VIDIS = "VIDIS",
|
|
92
90
|
CANVAS = "CANVAS",
|
|
93
91
|
QR_CODE = "QR_CODE"
|
|
94
92
|
}
|
|
@@ -75,8 +75,7 @@ declare enum LoginSource {
|
|
|
75
75
|
MICROSOFT = 6,
|
|
76
76
|
APPLE = 7,
|
|
77
77
|
SCHOOLOGY = 8,
|
|
78
|
-
MY_LOGIN = 9
|
|
79
|
-
VIDIS = 18
|
|
78
|
+
MY_LOGIN = 9
|
|
80
79
|
}
|
|
81
80
|
declare enum SSO {
|
|
82
81
|
APPLE = "APPLE",
|
|
@@ -88,7 +87,6 @@ declare enum SSO {
|
|
|
88
87
|
SKOLFEDERATION = "SKOLFEDERATION",
|
|
89
88
|
SKOLON = "SKOLON",
|
|
90
89
|
WONDE = "WONDE",
|
|
91
|
-
VIDIS = "VIDIS",
|
|
92
90
|
CANVAS = "CANVAS",
|
|
93
91
|
QR_CODE = "QR_CODE"
|
|
94
92
|
}
|
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 } from './common.constants-Dd81SRrq.mjs';
|
|
2
|
+
export { c as Source } from './common.constants-Dd81SRrq.mjs';
|
|
3
3
|
import { ComponentType } from 'react';
|
|
4
4
|
import * as effector from 'effector';
|
|
5
5
|
|
|
@@ -131,6 +131,8 @@ declare enum Grade {
|
|
|
131
131
|
HSN = "HSN",
|
|
132
132
|
K = "K"
|
|
133
133
|
}
|
|
134
|
+
declare const HIGH_SCHOOL_STRING_GRADES: ReadonlySet<Grade>;
|
|
135
|
+
type NumericGrade = Exclude<Grade, Grade.K | Grade.HS | Grade.HSG | Grade.HSA | Grade.HSS | Grade.HSF | Grade.HSN>;
|
|
134
136
|
|
|
135
137
|
declare enum NumberDecimalSeparator {
|
|
136
138
|
DOT = ".",
|
|
@@ -382,6 +384,101 @@ type SSOConfig<E> = Readonly<{
|
|
|
382
384
|
getUrl: (envs: E) => string;
|
|
383
385
|
}>;
|
|
384
386
|
|
|
387
|
+
type RegionSpecificVars = {
|
|
388
|
+
API_URL: string;
|
|
389
|
+
AUTH_WEB_URL: string;
|
|
390
|
+
CDN_HOST: string;
|
|
391
|
+
CDN_HOST_TRANSLATIONS: string;
|
|
392
|
+
DISTRICT_WEB_URL: string;
|
|
393
|
+
LOGGLY_TAG: string;
|
|
394
|
+
MAGMAMATH_URL: string;
|
|
395
|
+
PARENT_WEB_URL: string;
|
|
396
|
+
SOCKET_URL: string;
|
|
397
|
+
STUDENTS_WEB_URL: string;
|
|
398
|
+
WEBSOCKETS_URL: string;
|
|
399
|
+
TEACHERS_WEB_URL: string;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
type StudentsWebCommon = {
|
|
403
|
+
CDN_HOST_TRANSLATIONS: string;
|
|
404
|
+
GOOGLE_API_KEY: string;
|
|
405
|
+
DESMOS_API_KEY: string;
|
|
406
|
+
LOGGLY_CUSTOMER_TOKEN: string;
|
|
407
|
+
MYSCRIPT_APPLICATION_KEY: string;
|
|
408
|
+
MYSCRIPT_HMAC_KEY: string;
|
|
409
|
+
MYSCRIPT_HOST: string;
|
|
410
|
+
MYSCRIPT_SOCKET_KEY: string;
|
|
411
|
+
MYSCRIPT_REST_APP_KEY: string;
|
|
412
|
+
MYSCRIPT_REST_HMAC_KEY: string;
|
|
413
|
+
TOLGEE_API_URL?: string;
|
|
414
|
+
TOLGEE_API_KEY?: string;
|
|
415
|
+
};
|
|
416
|
+
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
417
|
+
type StudentsWebVarsPreset = {
|
|
418
|
+
[HomeRegion.US_MAIN]: {
|
|
419
|
+
[key in Environment]: StudentsWebVars;
|
|
420
|
+
};
|
|
421
|
+
[HomeRegion.CA_MAIN]: {
|
|
422
|
+
[key in Environment]: StudentsWebVars;
|
|
423
|
+
};
|
|
424
|
+
[HomeRegion.EU_MAIN]: {
|
|
425
|
+
[key in Locale]: {
|
|
426
|
+
[key in Environment]: StudentsWebVars;
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
type TeachersWebCommon = {
|
|
432
|
+
CDN_HOST_TRANSLATIONS: string;
|
|
433
|
+
MYSCRIPT_HOST: string;
|
|
434
|
+
MYSCRIPT_REST_APP_KEY: string;
|
|
435
|
+
MYSCRIPT_REST_HMAC_KEY: string;
|
|
436
|
+
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
437
|
+
INTERCOM_APP_ID: string;
|
|
438
|
+
LOGGLY_CUSTOMER_TOKEN: string;
|
|
439
|
+
TOLGEE_API_URL?: string;
|
|
440
|
+
TOLGEE_API_KEY?: string;
|
|
441
|
+
GOOGLE_TRANSLATE_URL: string;
|
|
442
|
+
GOOGLE_API_KEY: string;
|
|
443
|
+
};
|
|
444
|
+
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
445
|
+
type TeachersWebVarsPreset = {
|
|
446
|
+
[HomeRegion.US_MAIN]: {
|
|
447
|
+
[key in Environment]: TeachersWebVars;
|
|
448
|
+
};
|
|
449
|
+
[HomeRegion.CA_MAIN]: {
|
|
450
|
+
[key in Environment]: TeachersWebVars;
|
|
451
|
+
};
|
|
452
|
+
[HomeRegion.EU_MAIN]: {
|
|
453
|
+
[key in Locale]: {
|
|
454
|
+
[key in Environment]: TeachersWebVars;
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
type DistrictCommon = {
|
|
460
|
+
CDN_HOST_TRANSLATIONS: string;
|
|
461
|
+
INTERCOM_APP_ID: string;
|
|
462
|
+
AMPLITUDE_API_KEY?: string;
|
|
463
|
+
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
464
|
+
TOLGEE_API_URL?: string;
|
|
465
|
+
TOLGEE_API_KEY?: string;
|
|
466
|
+
};
|
|
467
|
+
type DistrictDashboardVars = RegionSpecificVars & DistrictCommon;
|
|
468
|
+
type DistrictWebVarsPreset = {
|
|
469
|
+
[HomeRegion.US_MAIN]: {
|
|
470
|
+
[key in Environment]: DistrictDashboardVars;
|
|
471
|
+
};
|
|
472
|
+
[HomeRegion.CA_MAIN]: {
|
|
473
|
+
[key in Environment]: DistrictDashboardVars;
|
|
474
|
+
};
|
|
475
|
+
[HomeRegion.EU_MAIN]: {
|
|
476
|
+
[key in Locale]: {
|
|
477
|
+
[key in Environment]: DistrictDashboardVars;
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
|
|
385
482
|
type SSO_UK = {
|
|
386
483
|
GOOGLE_AUTH: string;
|
|
387
484
|
MICROSOFT_AUTH: string;
|
|
@@ -404,7 +501,6 @@ type SSO_SE = {
|
|
|
404
501
|
type SSO_DE = {
|
|
405
502
|
GOOGLE_AUTH: string;
|
|
406
503
|
MICROSOFT_AUTH: string;
|
|
407
|
-
VIDIS_AUTH: string;
|
|
408
504
|
};
|
|
409
505
|
type SSO_PL = {
|
|
410
506
|
GOOGLE_AUTH: string;
|
|
@@ -493,105 +589,6 @@ type SSOByLocale = {
|
|
|
493
589
|
[Locale.IQ]: SSO_IQ;
|
|
494
590
|
};
|
|
495
591
|
|
|
496
|
-
declare const SSO_VIDIS_CONFIG: SSOConfig<SSO_DE & {
|
|
497
|
-
AUTH_WEB_URL: string;
|
|
498
|
-
}>;
|
|
499
|
-
|
|
500
|
-
type RegionSpecificVars = {
|
|
501
|
-
API_URL: string;
|
|
502
|
-
AUTH_WEB_URL: string;
|
|
503
|
-
CDN_HOST: string;
|
|
504
|
-
CDN_HOST_TRANSLATIONS: string;
|
|
505
|
-
DISTRICT_WEB_URL: string;
|
|
506
|
-
LOGGLY_TAG: string;
|
|
507
|
-
MAGMAMATH_URL: string;
|
|
508
|
-
PARENT_WEB_URL: string;
|
|
509
|
-
SOCKET_URL: string;
|
|
510
|
-
STUDENTS_WEB_URL: string;
|
|
511
|
-
WEBSOCKETS_URL: string;
|
|
512
|
-
TEACHERS_WEB_URL: string;
|
|
513
|
-
};
|
|
514
|
-
|
|
515
|
-
type StudentsWebCommon = {
|
|
516
|
-
CDN_HOST_TRANSLATIONS: string;
|
|
517
|
-
GOOGLE_API_KEY: string;
|
|
518
|
-
DESMOS_API_KEY: string;
|
|
519
|
-
LOGGLY_CUSTOMER_TOKEN: string;
|
|
520
|
-
MYSCRIPT_APPLICATION_KEY: string;
|
|
521
|
-
MYSCRIPT_HMAC_KEY: string;
|
|
522
|
-
MYSCRIPT_HOST: string;
|
|
523
|
-
MYSCRIPT_SOCKET_KEY: string;
|
|
524
|
-
MYSCRIPT_REST_APP_KEY: string;
|
|
525
|
-
MYSCRIPT_REST_HMAC_KEY: string;
|
|
526
|
-
TOLGEE_API_URL?: string;
|
|
527
|
-
TOLGEE_API_KEY?: string;
|
|
528
|
-
};
|
|
529
|
-
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
530
|
-
type StudentsWebVarsPreset = {
|
|
531
|
-
[HomeRegion.US_MAIN]: {
|
|
532
|
-
[key in Environment]: StudentsWebVars;
|
|
533
|
-
};
|
|
534
|
-
[HomeRegion.CA_MAIN]: {
|
|
535
|
-
[key in Environment]: StudentsWebVars;
|
|
536
|
-
};
|
|
537
|
-
[HomeRegion.EU_MAIN]: {
|
|
538
|
-
[key in Locale]: {
|
|
539
|
-
[key in Environment]: StudentsWebVars;
|
|
540
|
-
};
|
|
541
|
-
};
|
|
542
|
-
};
|
|
543
|
-
|
|
544
|
-
type TeachersWebCommon = {
|
|
545
|
-
CDN_HOST_TRANSLATIONS: string;
|
|
546
|
-
MYSCRIPT_HOST: string;
|
|
547
|
-
MYSCRIPT_REST_APP_KEY: string;
|
|
548
|
-
MYSCRIPT_REST_HMAC_KEY: string;
|
|
549
|
-
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
550
|
-
INTERCOM_APP_ID: string;
|
|
551
|
-
LOGGLY_CUSTOMER_TOKEN: string;
|
|
552
|
-
TOLGEE_API_URL?: string;
|
|
553
|
-
TOLGEE_API_KEY?: string;
|
|
554
|
-
GOOGLE_TRANSLATE_URL: string;
|
|
555
|
-
GOOGLE_API_KEY: string;
|
|
556
|
-
};
|
|
557
|
-
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
558
|
-
type TeachersWebVarsPreset = {
|
|
559
|
-
[HomeRegion.US_MAIN]: {
|
|
560
|
-
[key in Environment]: TeachersWebVars;
|
|
561
|
-
};
|
|
562
|
-
[HomeRegion.CA_MAIN]: {
|
|
563
|
-
[key in Environment]: TeachersWebVars;
|
|
564
|
-
};
|
|
565
|
-
[HomeRegion.EU_MAIN]: {
|
|
566
|
-
[key in Locale]: {
|
|
567
|
-
[key in Environment]: TeachersWebVars;
|
|
568
|
-
};
|
|
569
|
-
};
|
|
570
|
-
};
|
|
571
|
-
|
|
572
|
-
type DistrictCommon = {
|
|
573
|
-
CDN_HOST_TRANSLATIONS: string;
|
|
574
|
-
INTERCOM_APP_ID: string;
|
|
575
|
-
AMPLITUDE_API_KEY?: string;
|
|
576
|
-
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
577
|
-
TOLGEE_API_URL?: string;
|
|
578
|
-
TOLGEE_API_KEY?: string;
|
|
579
|
-
};
|
|
580
|
-
type DistrictDashboardVars = RegionSpecificVars & DistrictCommon;
|
|
581
|
-
type DistrictWebVarsPreset = {
|
|
582
|
-
[HomeRegion.US_MAIN]: {
|
|
583
|
-
[key in Environment]: DistrictDashboardVars;
|
|
584
|
-
};
|
|
585
|
-
[HomeRegion.CA_MAIN]: {
|
|
586
|
-
[key in Environment]: DistrictDashboardVars;
|
|
587
|
-
};
|
|
588
|
-
[HomeRegion.EU_MAIN]: {
|
|
589
|
-
[key in Locale]: {
|
|
590
|
-
[key in Environment]: DistrictDashboardVars;
|
|
591
|
-
};
|
|
592
|
-
};
|
|
593
|
-
};
|
|
594
|
-
|
|
595
592
|
type Prettify<T> = T extends Function ? T : {
|
|
596
593
|
[K in keyof T]: T[K];
|
|
597
594
|
};
|
|
@@ -1042,6 +1039,15 @@ declare enum MultiplicationSymbol {
|
|
|
1042
1039
|
TIMES = "TIMES"
|
|
1043
1040
|
}
|
|
1044
1041
|
|
|
1042
|
+
type MultiplicationGradeRule = {
|
|
1043
|
+
fromGrade: NumericGrade;
|
|
1044
|
+
symbol: MultiplicationSymbol;
|
|
1045
|
+
};
|
|
1046
|
+
type MultiplicationConfig = {
|
|
1047
|
+
default: MultiplicationSymbol;
|
|
1048
|
+
byGrade?: MultiplicationGradeRule[];
|
|
1049
|
+
};
|
|
1050
|
+
|
|
1045
1051
|
type CommonLocaleConfig = Readonly<{
|
|
1046
1052
|
name: string;
|
|
1047
1053
|
languageName: string;
|
|
@@ -1056,7 +1062,7 @@ type CommonLocaleConfig = Readonly<{
|
|
|
1056
1062
|
groupingSeparator: NumberGroupingSeparator;
|
|
1057
1063
|
};
|
|
1058
1064
|
mathSymbols: {
|
|
1059
|
-
multiplication:
|
|
1065
|
+
multiplication: MultiplicationConfig;
|
|
1060
1066
|
};
|
|
1061
1067
|
}>;
|
|
1062
1068
|
type LocalePreset = {
|
|
@@ -1091,6 +1097,10 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
|
|
|
1091
1097
|
problemCreator: ProblemCreatorConfig;
|
|
1092
1098
|
};
|
|
1093
1099
|
|
|
1100
|
+
declare const getMultiplicationSymbol: (config: MultiplicationConfig, grade: Grade | number | null) => MultiplicationSymbol;
|
|
1101
|
+
|
|
1102
|
+
declare const isHighSchoolStringGrade: (grade: Grade | number | null) => boolean;
|
|
1103
|
+
|
|
1094
1104
|
type DevOverrides<P extends Platform> = {
|
|
1095
1105
|
[K in Locale]?: Partial<EnvironmentVars<P>>;
|
|
1096
1106
|
};
|
|
@@ -1151,4 +1161,4 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1151
1161
|
};
|
|
1152
1162
|
}
|
|
1153
1163
|
|
|
1154
|
-
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, IQ_CALENDAR_CONFIG, 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_IQ, 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,
|
|
1164
|
+
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, HIGH_SCHOOL_STRING_GRADES, type HighSchoolGrades, HomeRegion, IQ_CALENDAR_CONFIG, 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, type NumericGrade, 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_IQ, 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, getMultiplicationSymbol, isHighSchoolStringGrade };
|
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 } from './common.constants-Dd81SRrq.js';
|
|
2
|
+
export { c as Source } from './common.constants-Dd81SRrq.js';
|
|
3
3
|
import { ComponentType } from 'react';
|
|
4
4
|
import * as effector from 'effector';
|
|
5
5
|
|
|
@@ -131,6 +131,8 @@ declare enum Grade {
|
|
|
131
131
|
HSN = "HSN",
|
|
132
132
|
K = "K"
|
|
133
133
|
}
|
|
134
|
+
declare const HIGH_SCHOOL_STRING_GRADES: ReadonlySet<Grade>;
|
|
135
|
+
type NumericGrade = Exclude<Grade, Grade.K | Grade.HS | Grade.HSG | Grade.HSA | Grade.HSS | Grade.HSF | Grade.HSN>;
|
|
134
136
|
|
|
135
137
|
declare enum NumberDecimalSeparator {
|
|
136
138
|
DOT = ".",
|
|
@@ -382,6 +384,101 @@ type SSOConfig<E> = Readonly<{
|
|
|
382
384
|
getUrl: (envs: E) => string;
|
|
383
385
|
}>;
|
|
384
386
|
|
|
387
|
+
type RegionSpecificVars = {
|
|
388
|
+
API_URL: string;
|
|
389
|
+
AUTH_WEB_URL: string;
|
|
390
|
+
CDN_HOST: string;
|
|
391
|
+
CDN_HOST_TRANSLATIONS: string;
|
|
392
|
+
DISTRICT_WEB_URL: string;
|
|
393
|
+
LOGGLY_TAG: string;
|
|
394
|
+
MAGMAMATH_URL: string;
|
|
395
|
+
PARENT_WEB_URL: string;
|
|
396
|
+
SOCKET_URL: string;
|
|
397
|
+
STUDENTS_WEB_URL: string;
|
|
398
|
+
WEBSOCKETS_URL: string;
|
|
399
|
+
TEACHERS_WEB_URL: string;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
type StudentsWebCommon = {
|
|
403
|
+
CDN_HOST_TRANSLATIONS: string;
|
|
404
|
+
GOOGLE_API_KEY: string;
|
|
405
|
+
DESMOS_API_KEY: string;
|
|
406
|
+
LOGGLY_CUSTOMER_TOKEN: string;
|
|
407
|
+
MYSCRIPT_APPLICATION_KEY: string;
|
|
408
|
+
MYSCRIPT_HMAC_KEY: string;
|
|
409
|
+
MYSCRIPT_HOST: string;
|
|
410
|
+
MYSCRIPT_SOCKET_KEY: string;
|
|
411
|
+
MYSCRIPT_REST_APP_KEY: string;
|
|
412
|
+
MYSCRIPT_REST_HMAC_KEY: string;
|
|
413
|
+
TOLGEE_API_URL?: string;
|
|
414
|
+
TOLGEE_API_KEY?: string;
|
|
415
|
+
};
|
|
416
|
+
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
417
|
+
type StudentsWebVarsPreset = {
|
|
418
|
+
[HomeRegion.US_MAIN]: {
|
|
419
|
+
[key in Environment]: StudentsWebVars;
|
|
420
|
+
};
|
|
421
|
+
[HomeRegion.CA_MAIN]: {
|
|
422
|
+
[key in Environment]: StudentsWebVars;
|
|
423
|
+
};
|
|
424
|
+
[HomeRegion.EU_MAIN]: {
|
|
425
|
+
[key in Locale]: {
|
|
426
|
+
[key in Environment]: StudentsWebVars;
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
type TeachersWebCommon = {
|
|
432
|
+
CDN_HOST_TRANSLATIONS: string;
|
|
433
|
+
MYSCRIPT_HOST: string;
|
|
434
|
+
MYSCRIPT_REST_APP_KEY: string;
|
|
435
|
+
MYSCRIPT_REST_HMAC_KEY: string;
|
|
436
|
+
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
437
|
+
INTERCOM_APP_ID: string;
|
|
438
|
+
LOGGLY_CUSTOMER_TOKEN: string;
|
|
439
|
+
TOLGEE_API_URL?: string;
|
|
440
|
+
TOLGEE_API_KEY?: string;
|
|
441
|
+
GOOGLE_TRANSLATE_URL: string;
|
|
442
|
+
GOOGLE_API_KEY: string;
|
|
443
|
+
};
|
|
444
|
+
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
445
|
+
type TeachersWebVarsPreset = {
|
|
446
|
+
[HomeRegion.US_MAIN]: {
|
|
447
|
+
[key in Environment]: TeachersWebVars;
|
|
448
|
+
};
|
|
449
|
+
[HomeRegion.CA_MAIN]: {
|
|
450
|
+
[key in Environment]: TeachersWebVars;
|
|
451
|
+
};
|
|
452
|
+
[HomeRegion.EU_MAIN]: {
|
|
453
|
+
[key in Locale]: {
|
|
454
|
+
[key in Environment]: TeachersWebVars;
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
type DistrictCommon = {
|
|
460
|
+
CDN_HOST_TRANSLATIONS: string;
|
|
461
|
+
INTERCOM_APP_ID: string;
|
|
462
|
+
AMPLITUDE_API_KEY?: string;
|
|
463
|
+
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
464
|
+
TOLGEE_API_URL?: string;
|
|
465
|
+
TOLGEE_API_KEY?: string;
|
|
466
|
+
};
|
|
467
|
+
type DistrictDashboardVars = RegionSpecificVars & DistrictCommon;
|
|
468
|
+
type DistrictWebVarsPreset = {
|
|
469
|
+
[HomeRegion.US_MAIN]: {
|
|
470
|
+
[key in Environment]: DistrictDashboardVars;
|
|
471
|
+
};
|
|
472
|
+
[HomeRegion.CA_MAIN]: {
|
|
473
|
+
[key in Environment]: DistrictDashboardVars;
|
|
474
|
+
};
|
|
475
|
+
[HomeRegion.EU_MAIN]: {
|
|
476
|
+
[key in Locale]: {
|
|
477
|
+
[key in Environment]: DistrictDashboardVars;
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
|
|
385
482
|
type SSO_UK = {
|
|
386
483
|
GOOGLE_AUTH: string;
|
|
387
484
|
MICROSOFT_AUTH: string;
|
|
@@ -404,7 +501,6 @@ type SSO_SE = {
|
|
|
404
501
|
type SSO_DE = {
|
|
405
502
|
GOOGLE_AUTH: string;
|
|
406
503
|
MICROSOFT_AUTH: string;
|
|
407
|
-
VIDIS_AUTH: string;
|
|
408
504
|
};
|
|
409
505
|
type SSO_PL = {
|
|
410
506
|
GOOGLE_AUTH: string;
|
|
@@ -493,105 +589,6 @@ type SSOByLocale = {
|
|
|
493
589
|
[Locale.IQ]: SSO_IQ;
|
|
494
590
|
};
|
|
495
591
|
|
|
496
|
-
declare const SSO_VIDIS_CONFIG: SSOConfig<SSO_DE & {
|
|
497
|
-
AUTH_WEB_URL: string;
|
|
498
|
-
}>;
|
|
499
|
-
|
|
500
|
-
type RegionSpecificVars = {
|
|
501
|
-
API_URL: string;
|
|
502
|
-
AUTH_WEB_URL: string;
|
|
503
|
-
CDN_HOST: string;
|
|
504
|
-
CDN_HOST_TRANSLATIONS: string;
|
|
505
|
-
DISTRICT_WEB_URL: string;
|
|
506
|
-
LOGGLY_TAG: string;
|
|
507
|
-
MAGMAMATH_URL: string;
|
|
508
|
-
PARENT_WEB_URL: string;
|
|
509
|
-
SOCKET_URL: string;
|
|
510
|
-
STUDENTS_WEB_URL: string;
|
|
511
|
-
WEBSOCKETS_URL: string;
|
|
512
|
-
TEACHERS_WEB_URL: string;
|
|
513
|
-
};
|
|
514
|
-
|
|
515
|
-
type StudentsWebCommon = {
|
|
516
|
-
CDN_HOST_TRANSLATIONS: string;
|
|
517
|
-
GOOGLE_API_KEY: string;
|
|
518
|
-
DESMOS_API_KEY: string;
|
|
519
|
-
LOGGLY_CUSTOMER_TOKEN: string;
|
|
520
|
-
MYSCRIPT_APPLICATION_KEY: string;
|
|
521
|
-
MYSCRIPT_HMAC_KEY: string;
|
|
522
|
-
MYSCRIPT_HOST: string;
|
|
523
|
-
MYSCRIPT_SOCKET_KEY: string;
|
|
524
|
-
MYSCRIPT_REST_APP_KEY: string;
|
|
525
|
-
MYSCRIPT_REST_HMAC_KEY: string;
|
|
526
|
-
TOLGEE_API_URL?: string;
|
|
527
|
-
TOLGEE_API_KEY?: string;
|
|
528
|
-
};
|
|
529
|
-
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
530
|
-
type StudentsWebVarsPreset = {
|
|
531
|
-
[HomeRegion.US_MAIN]: {
|
|
532
|
-
[key in Environment]: StudentsWebVars;
|
|
533
|
-
};
|
|
534
|
-
[HomeRegion.CA_MAIN]: {
|
|
535
|
-
[key in Environment]: StudentsWebVars;
|
|
536
|
-
};
|
|
537
|
-
[HomeRegion.EU_MAIN]: {
|
|
538
|
-
[key in Locale]: {
|
|
539
|
-
[key in Environment]: StudentsWebVars;
|
|
540
|
-
};
|
|
541
|
-
};
|
|
542
|
-
};
|
|
543
|
-
|
|
544
|
-
type TeachersWebCommon = {
|
|
545
|
-
CDN_HOST_TRANSLATIONS: string;
|
|
546
|
-
MYSCRIPT_HOST: string;
|
|
547
|
-
MYSCRIPT_REST_APP_KEY: string;
|
|
548
|
-
MYSCRIPT_REST_HMAC_KEY: string;
|
|
549
|
-
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
550
|
-
INTERCOM_APP_ID: string;
|
|
551
|
-
LOGGLY_CUSTOMER_TOKEN: string;
|
|
552
|
-
TOLGEE_API_URL?: string;
|
|
553
|
-
TOLGEE_API_KEY?: string;
|
|
554
|
-
GOOGLE_TRANSLATE_URL: string;
|
|
555
|
-
GOOGLE_API_KEY: string;
|
|
556
|
-
};
|
|
557
|
-
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
558
|
-
type TeachersWebVarsPreset = {
|
|
559
|
-
[HomeRegion.US_MAIN]: {
|
|
560
|
-
[key in Environment]: TeachersWebVars;
|
|
561
|
-
};
|
|
562
|
-
[HomeRegion.CA_MAIN]: {
|
|
563
|
-
[key in Environment]: TeachersWebVars;
|
|
564
|
-
};
|
|
565
|
-
[HomeRegion.EU_MAIN]: {
|
|
566
|
-
[key in Locale]: {
|
|
567
|
-
[key in Environment]: TeachersWebVars;
|
|
568
|
-
};
|
|
569
|
-
};
|
|
570
|
-
};
|
|
571
|
-
|
|
572
|
-
type DistrictCommon = {
|
|
573
|
-
CDN_HOST_TRANSLATIONS: string;
|
|
574
|
-
INTERCOM_APP_ID: string;
|
|
575
|
-
AMPLITUDE_API_KEY?: string;
|
|
576
|
-
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
577
|
-
TOLGEE_API_URL?: string;
|
|
578
|
-
TOLGEE_API_KEY?: string;
|
|
579
|
-
};
|
|
580
|
-
type DistrictDashboardVars = RegionSpecificVars & DistrictCommon;
|
|
581
|
-
type DistrictWebVarsPreset = {
|
|
582
|
-
[HomeRegion.US_MAIN]: {
|
|
583
|
-
[key in Environment]: DistrictDashboardVars;
|
|
584
|
-
};
|
|
585
|
-
[HomeRegion.CA_MAIN]: {
|
|
586
|
-
[key in Environment]: DistrictDashboardVars;
|
|
587
|
-
};
|
|
588
|
-
[HomeRegion.EU_MAIN]: {
|
|
589
|
-
[key in Locale]: {
|
|
590
|
-
[key in Environment]: DistrictDashboardVars;
|
|
591
|
-
};
|
|
592
|
-
};
|
|
593
|
-
};
|
|
594
|
-
|
|
595
592
|
type Prettify<T> = T extends Function ? T : {
|
|
596
593
|
[K in keyof T]: T[K];
|
|
597
594
|
};
|
|
@@ -1042,6 +1039,15 @@ declare enum MultiplicationSymbol {
|
|
|
1042
1039
|
TIMES = "TIMES"
|
|
1043
1040
|
}
|
|
1044
1041
|
|
|
1042
|
+
type MultiplicationGradeRule = {
|
|
1043
|
+
fromGrade: NumericGrade;
|
|
1044
|
+
symbol: MultiplicationSymbol;
|
|
1045
|
+
};
|
|
1046
|
+
type MultiplicationConfig = {
|
|
1047
|
+
default: MultiplicationSymbol;
|
|
1048
|
+
byGrade?: MultiplicationGradeRule[];
|
|
1049
|
+
};
|
|
1050
|
+
|
|
1045
1051
|
type CommonLocaleConfig = Readonly<{
|
|
1046
1052
|
name: string;
|
|
1047
1053
|
languageName: string;
|
|
@@ -1056,7 +1062,7 @@ type CommonLocaleConfig = Readonly<{
|
|
|
1056
1062
|
groupingSeparator: NumberGroupingSeparator;
|
|
1057
1063
|
};
|
|
1058
1064
|
mathSymbols: {
|
|
1059
|
-
multiplication:
|
|
1065
|
+
multiplication: MultiplicationConfig;
|
|
1060
1066
|
};
|
|
1061
1067
|
}>;
|
|
1062
1068
|
type LocalePreset = {
|
|
@@ -1091,6 +1097,10 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
|
|
|
1091
1097
|
problemCreator: ProblemCreatorConfig;
|
|
1092
1098
|
};
|
|
1093
1099
|
|
|
1100
|
+
declare const getMultiplicationSymbol: (config: MultiplicationConfig, grade: Grade | number | null) => MultiplicationSymbol;
|
|
1101
|
+
|
|
1102
|
+
declare const isHighSchoolStringGrade: (grade: Grade | number | null) => boolean;
|
|
1103
|
+
|
|
1094
1104
|
type DevOverrides<P extends Platform> = {
|
|
1095
1105
|
[K in Locale]?: Partial<EnvironmentVars<P>>;
|
|
1096
1106
|
};
|
|
@@ -1151,4 +1161,4 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
1151
1161
|
};
|
|
1152
1162
|
}
|
|
1153
1163
|
|
|
1154
|
-
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, IQ_CALENDAR_CONFIG, 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_IQ, 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,
|
|
1164
|
+
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, HIGH_SCHOOL_STRING_GRADES, type HighSchoolGrades, HomeRegion, IQ_CALENDAR_CONFIG, 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, type NumericGrade, 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_IQ, 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, getMultiplicationSymbol, isHighSchoolStringGrade };
|