@magmamath/frontend-config 0.0.1-rc.7 → 0.0.1-rc.9

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 CHANGED
@@ -13,20 +13,21 @@ declare enum DateFormat {
13
13
  FULL_WITH_SECONDS = "DD MMM YYYY HH:mm:ss",
14
14
  FULL_WITH_SECONDS_US = "DD MMM YYYY hh:mm:ss A"
15
15
  }
16
- declare enum DateLocale {
17
- US = "en",
18
- SV = "sv",
19
- 'en-SE' = "en",
20
- 'sv-SE' = "sv",
21
- GB = "en",
22
- 'en-GB' = "en",
23
- CA = "en",
24
- 'en-CA' = "en",
25
- SCT = "en",
26
- 'en-SCT' = "en",
27
- DE = "de",
28
- 'de-DE' = "de"
29
- }
16
+ declare const DateLocale: {
17
+ readonly US: "en";
18
+ readonly SV: "sv";
19
+ readonly 'en-SE': "en";
20
+ readonly 'sv-SE': "sv";
21
+ readonly GB: "en";
22
+ readonly 'en-GB': "en";
23
+ readonly CA: "en";
24
+ readonly 'en-CA': "en";
25
+ readonly SCT: "en";
26
+ readonly 'en-SCT': "en";
27
+ readonly DE: "de";
28
+ readonly 'de-DE': "de";
29
+ };
30
+ type DateLocale = (typeof DateLocale)[keyof typeof DateLocale];
30
31
 
31
32
  declare enum Platform {
32
33
  STUDENTS_WEB = "STUDENTS",
@@ -123,21 +124,8 @@ type StudentsLocaleConfig = CommonLocaleConfig & {
123
124
  };
124
125
  };
125
126
 
126
- type DistrictLocaleConfig = CommonLocaleConfig & {
127
- date: {
128
- use24HourFormat: boolean;
129
- locale: DateLocale;
130
- formats: {
131
- full: DateFormat;
132
- dayMonthYear: DateFormat;
133
- dayMonth: DateFormat;
134
- hoursMinutes: DateFormat;
135
- fullWithSeconds: DateFormat;
136
- };
137
- };
138
- };
139
-
140
127
  type TeachersLocaleConfig = CommonLocaleConfig & {
128
+ country: string;
141
129
  emails: {
142
130
  studentsList: string;
143
131
  };
@@ -181,12 +169,29 @@ type TeachersLocaleConfig = CommonLocaleConfig & {
181
169
  getStarted: {
182
170
  showSentEmailInfo: boolean;
183
171
  };
172
+ firstLoginBooks: {
173
+ isLargeGrade: ((grade: number) => boolean) | null;
174
+ };
184
175
  grades: {
185
176
  showPrefix: boolean;
186
177
  showOtherGrade: boolean;
187
178
  };
188
179
  };
189
180
 
181
+ type DistrictLocaleConfig = CommonLocaleConfig & {
182
+ date: {
183
+ use24HourFormat: boolean;
184
+ locale: DateLocale;
185
+ formats: {
186
+ full: DateFormat;
187
+ dayMonthYear: DateFormat;
188
+ dayMonth: DateFormat;
189
+ hoursMinutes: DateFormat;
190
+ fullWithSeconds: DateFormat;
191
+ };
192
+ };
193
+ };
194
+
190
195
  type CommonLocaleConfig = Readonly<{
191
196
  name: string;
192
197
  languageName: string;
package/dist/index.d.ts CHANGED
@@ -13,20 +13,21 @@ declare enum DateFormat {
13
13
  FULL_WITH_SECONDS = "DD MMM YYYY HH:mm:ss",
14
14
  FULL_WITH_SECONDS_US = "DD MMM YYYY hh:mm:ss A"
15
15
  }
16
- declare enum DateLocale {
17
- US = "en",
18
- SV = "sv",
19
- 'en-SE' = "en",
20
- 'sv-SE' = "sv",
21
- GB = "en",
22
- 'en-GB' = "en",
23
- CA = "en",
24
- 'en-CA' = "en",
25
- SCT = "en",
26
- 'en-SCT' = "en",
27
- DE = "de",
28
- 'de-DE' = "de"
29
- }
16
+ declare const DateLocale: {
17
+ readonly US: "en";
18
+ readonly SV: "sv";
19
+ readonly 'en-SE': "en";
20
+ readonly 'sv-SE': "sv";
21
+ readonly GB: "en";
22
+ readonly 'en-GB': "en";
23
+ readonly CA: "en";
24
+ readonly 'en-CA': "en";
25
+ readonly SCT: "en";
26
+ readonly 'en-SCT': "en";
27
+ readonly DE: "de";
28
+ readonly 'de-DE': "de";
29
+ };
30
+ type DateLocale = (typeof DateLocale)[keyof typeof DateLocale];
30
31
 
31
32
  declare enum Platform {
32
33
  STUDENTS_WEB = "STUDENTS",
@@ -123,21 +124,8 @@ type StudentsLocaleConfig = CommonLocaleConfig & {
123
124
  };
124
125
  };
125
126
 
126
- type DistrictLocaleConfig = CommonLocaleConfig & {
127
- date: {
128
- use24HourFormat: boolean;
129
- locale: DateLocale;
130
- formats: {
131
- full: DateFormat;
132
- dayMonthYear: DateFormat;
133
- dayMonth: DateFormat;
134
- hoursMinutes: DateFormat;
135
- fullWithSeconds: DateFormat;
136
- };
137
- };
138
- };
139
-
140
127
  type TeachersLocaleConfig = CommonLocaleConfig & {
128
+ country: string;
141
129
  emails: {
142
130
  studentsList: string;
143
131
  };
@@ -181,12 +169,29 @@ type TeachersLocaleConfig = CommonLocaleConfig & {
181
169
  getStarted: {
182
170
  showSentEmailInfo: boolean;
183
171
  };
172
+ firstLoginBooks: {
173
+ isLargeGrade: ((grade: number) => boolean) | null;
174
+ };
184
175
  grades: {
185
176
  showPrefix: boolean;
186
177
  showOtherGrade: boolean;
187
178
  };
188
179
  };
189
180
 
181
+ type DistrictLocaleConfig = CommonLocaleConfig & {
182
+ date: {
183
+ use24HourFormat: boolean;
184
+ locale: DateLocale;
185
+ formats: {
186
+ full: DateFormat;
187
+ dayMonthYear: DateFormat;
188
+ dayMonth: DateFormat;
189
+ hoursMinutes: DateFormat;
190
+ fullWithSeconds: DateFormat;
191
+ };
192
+ };
193
+ };
194
+
190
195
  type CommonLocaleConfig = Readonly<{
191
196
  name: string;
192
197
  languageName: string;
package/dist/index.js CHANGED
@@ -17,21 +17,20 @@ var DateFormat = /* @__PURE__ */ ((DateFormat2) => {
17
17
  DateFormat2["FULL_WITH_SECONDS_US"] = "DD MMM YYYY hh:mm:ss A";
18
18
  return DateFormat2;
19
19
  })(DateFormat || {});
20
- var DateLocale = /* @__PURE__ */ ((DateLocale2) => {
21
- DateLocale2["US"] = "en";
22
- DateLocale2["SV"] = "sv";
23
- DateLocale2["en-SE"] = "en";
24
- DateLocale2["sv-SE"] = "sv";
25
- DateLocale2["GB"] = "en";
26
- DateLocale2["en-GB"] = "en";
27
- DateLocale2["CA"] = "en";
28
- DateLocale2["en-CA"] = "en";
29
- DateLocale2["SCT"] = "en";
30
- DateLocale2["en-SCT"] = "en";
31
- DateLocale2["DE"] = "de";
32
- DateLocale2["de-DE"] = "de";
33
- return DateLocale2;
34
- })(DateLocale || {});
20
+ var DateLocale = {
21
+ US: "en",
22
+ SV: "sv",
23
+ "en-SE": "en",
24
+ "sv-SE": "sv",
25
+ GB: "en",
26
+ "en-GB": "en",
27
+ CA: "en",
28
+ "en-CA": "en",
29
+ SCT: "en",
30
+ "en-SCT": "en",
31
+ DE: "de",
32
+ "de-DE": "de"
33
+ };
35
34
 
36
35
  // src/shared/common.constants.ts
37
36
  var Platform = /* @__PURE__ */ ((Platform3) => {
@@ -733,8 +732,8 @@ var ENV_DISTRICT_DE_PROD = {
733
732
  TEACHERS_WEB_URL: ""
734
733
  };
735
734
 
736
- // src/configs/env/auth-web/de/env.de.prod.ts
737
- var ENV_AUTH_WEB_DE_PROD = {
735
+ // src/configs/env/auth-web/sct/env.sct.prod.ts
736
+ var ENV_AUTH_WEB_SCT_PROD = {
738
737
  ...ENV_COMMON_PROD,
739
738
  API_URL: "",
740
739
  AUTH_WEB_URL: "",
@@ -747,8 +746,8 @@ var ENV_AUTH_WEB_DE_PROD = {
747
746
  TEACHERS_WEB_URL: ""
748
747
  };
749
748
 
750
- // src/configs/env/auth-web/sct/env.sct.prod.ts
751
- var ENV_AUTH_WEB_SCT_PROD = {
749
+ // src/configs/env/auth-web/de/env.de.prod.ts
750
+ var ENV_AUTH_WEB_DE_PROD = {
752
751
  ...ENV_COMMON_PROD,
753
752
  API_URL: "",
754
753
  AUTH_WEB_URL: "",
@@ -1242,7 +1241,7 @@ var LOCALE_DISTRICT_US = {
1242
1241
  contentLocale: "en-SE" /* US */,
1243
1242
  date: {
1244
1243
  use24HourFormat: false,
1245
- locale: "en" /* US */,
1244
+ locale: DateLocale.US,
1246
1245
  formats: {
1247
1246
  dayMonth: "MMM DD" /* DAY_MONTH_US */,
1248
1247
  dayMonthYear: "YYYY-MM-DD" /* DAY_MONTH_YEAR_US */,
@@ -1262,7 +1261,7 @@ var LOCALE_DISTRICT_SE = {
1262
1261
  contentLocale: "sv-SE" /* SE */,
1263
1262
  date: {
1264
1263
  use24HourFormat: true,
1265
- locale: "sv" /* SV */,
1264
+ locale: DateLocale.SV,
1266
1265
  formats: {
1267
1266
  dayMonth: "DD MMM" /* DAY_MONTH */,
1268
1267
  dayMonthYear: "DD-MM-YYYY" /* DAY_MONTH_YEAR */,
@@ -1282,7 +1281,7 @@ var LOCALE_DISTRICT_DE = {
1282
1281
  contentLocale: "de-DE" /* DE */,
1283
1282
  date: {
1284
1283
  use24HourFormat: true,
1285
- locale: "de" /* DE */,
1284
+ locale: DateLocale.DE,
1286
1285
  formats: {
1287
1286
  dayMonth: "DD MMM" /* DAY_MONTH */,
1288
1287
  dayMonthYear: "DD-MM-YYYY" /* DAY_MONTH_YEAR */,
@@ -1302,7 +1301,7 @@ var LOCALE_DISTRICT_GB = {
1302
1301
  contentLocale: "en-GB" /* GB */,
1303
1302
  date: {
1304
1303
  use24HourFormat: false,
1305
- locale: "en" /* GB */,
1304
+ locale: DateLocale.GB,
1306
1305
  formats: {
1307
1306
  dayMonth: "MMM DD" /* DAY_MONTH_US */,
1308
1307
  dayMonthYear: "YYYY-MM-DD" /* DAY_MONTH_YEAR_US */,
@@ -1322,7 +1321,7 @@ var LOCALE_DISTRICT_SCT = {
1322
1321
  contentLocale: "en-GB" /* GB */,
1323
1322
  date: {
1324
1323
  use24HourFormat: false,
1325
- locale: "en" /* US */,
1324
+ locale: DateLocale.US,
1326
1325
  formats: {
1327
1326
  dayMonth: "MMM DD" /* DAY_MONTH_US */,
1328
1327
  dayMonthYear: "YYYY-MM-DD" /* DAY_MONTH_YEAR_US */,
@@ -1342,7 +1341,7 @@ var LOCALE_DISTRICT_CA = {
1342
1341
  contentLocale: "en-CA" /* CA */,
1343
1342
  date: {
1344
1343
  use24HourFormat: false,
1345
- locale: "en" /* US */,
1344
+ locale: DateLocale.US,
1346
1345
  formats: {
1347
1346
  dayMonth: "MMM DD" /* DAY_MONTH_US */,
1348
1347
  dayMonthYear: "YYYY-MM-DD" /* DAY_MONTH_YEAR_US */,
@@ -1357,6 +1356,7 @@ var LOCALE_DISTRICT_CA = {
1357
1356
  var LOCALE_TEACHERS_US = {
1358
1357
  name: "English",
1359
1358
  languageName: "English",
1359
+ country: "United States",
1360
1360
  shortCode: "us",
1361
1361
  languageHeader: "en-SE;q=1.0, sv-SE;q=0.9",
1362
1362
  contentLocale: "en-SE" /* US */,
@@ -1368,7 +1368,7 @@ var LOCALE_TEACHERS_US = {
1368
1368
  },
1369
1369
  date: {
1370
1370
  use24HourFormat: false,
1371
- locale: "en" /* US */,
1371
+ locale: DateLocale.US,
1372
1372
  formats: {
1373
1373
  dayMonth: "MMM DD" /* DAY_MONTH_US */,
1374
1374
  hoursMinutes: "hh:mm A" /* HOURS_MINUTES_US */,
@@ -1399,6 +1399,9 @@ var LOCALE_TEACHERS_US = {
1399
1399
  problem: {
1400
1400
  allowCommaDecimal: false
1401
1401
  },
1402
+ firstLoginBooks: {
1403
+ isLargeGrade: (grade) => grade >= 9
1404
+ },
1402
1405
  grades: {
1403
1406
  showPrefix: true,
1404
1407
  showOtherGrade: false
@@ -1412,6 +1415,7 @@ var LOCALE_TEACHERS_US = {
1412
1415
  var LOCALE_TEACHERS_SE = {
1413
1416
  name: "Svenska",
1414
1417
  languageName: "Swedish",
1418
+ country: "Sweden",
1415
1419
  shortCode: "sv",
1416
1420
  languageHeader: "sv-SE;q=1.0, en-SE;q=0.9",
1417
1421
  contentLocale: "sv-SE" /* SE */,
@@ -1423,7 +1427,7 @@ var LOCALE_TEACHERS_SE = {
1423
1427
  },
1424
1428
  date: {
1425
1429
  use24HourFormat: true,
1426
- locale: "sv" /* SV */,
1430
+ locale: DateLocale.SV,
1427
1431
  formats: {
1428
1432
  dayMonth: "DD MMM" /* DAY_MONTH */,
1429
1433
  hoursMinutes: "HH:mm" /* HOURS_MINUTES */,
@@ -1455,6 +1459,9 @@ var LOCALE_TEACHERS_SE = {
1455
1459
  problem: {
1456
1460
  allowCommaDecimal: true
1457
1461
  },
1462
+ firstLoginBooks: {
1463
+ isLargeGrade: (grade) => grade > 9
1464
+ },
1458
1465
  grades: {
1459
1466
  showPrefix: true,
1460
1467
  showOtherGrade: false
@@ -1468,6 +1475,7 @@ var LOCALE_TEACHERS_SE = {
1468
1475
  var LOCALE_TEACHERS_GB = {
1469
1476
  name: "British English",
1470
1477
  languageName: "English",
1478
+ country: "United Kingdom",
1471
1479
  shortCode: "gb",
1472
1480
  languageHeader: "en-GB;q=1.0, en-SE;q=0.9",
1473
1481
  contentLocale: "en-GB" /* GB */,
@@ -1479,7 +1487,7 @@ var LOCALE_TEACHERS_GB = {
1479
1487
  },
1480
1488
  date: {
1481
1489
  use24HourFormat: false,
1482
- locale: "en" /* GB */,
1490
+ locale: DateLocale.GB,
1483
1491
  formats: {
1484
1492
  dayMonth: "MMM DD" /* DAY_MONTH_US */,
1485
1493
  hoursMinutes: "hh:mm A" /* HOURS_MINUTES_US */,
@@ -1510,6 +1518,9 @@ var LOCALE_TEACHERS_GB = {
1510
1518
  problem: {
1511
1519
  allowCommaDecimal: false
1512
1520
  },
1521
+ firstLoginBooks: {
1522
+ isLargeGrade: (grade) => grade === 0
1523
+ },
1513
1524
  grades: {
1514
1525
  showPrefix: true,
1515
1526
  showOtherGrade: true
@@ -1523,6 +1534,7 @@ var LOCALE_TEACHERS_GB = {
1523
1534
  var LOCALE_TEACHERS_CA = {
1524
1535
  name: "Canadian",
1525
1536
  languageName: "English",
1537
+ country: "Canada",
1526
1538
  shortCode: "ca",
1527
1539
  languageHeader: "en-CA;q=1.0, en-SE;q=0.9",
1528
1540
  contentLocale: "en-CA" /* CA */,
@@ -1534,7 +1546,7 @@ var LOCALE_TEACHERS_CA = {
1534
1546
  },
1535
1547
  date: {
1536
1548
  use24HourFormat: false,
1537
- locale: "en" /* CA */,
1549
+ locale: DateLocale.CA,
1538
1550
  formats: {
1539
1551
  dayMonth: "MMM DD" /* DAY_MONTH_US */,
1540
1552
  hoursMinutes: "hh:mm A" /* HOURS_MINUTES_US */,
@@ -1565,6 +1577,9 @@ var LOCALE_TEACHERS_CA = {
1565
1577
  problem: {
1566
1578
  allowCommaDecimal: false
1567
1579
  },
1580
+ firstLoginBooks: {
1581
+ isLargeGrade: null
1582
+ },
1568
1583
  grades: {
1569
1584
  showPrefix: true,
1570
1585
  showOtherGrade: false
@@ -1578,6 +1593,7 @@ var LOCALE_TEACHERS_CA = {
1578
1593
  var LOCALE_TEACHERS_SCT = {
1579
1594
  name: "Scottish English",
1580
1595
  languageName: "English",
1596
+ country: "Scotland",
1581
1597
  shortCode: "sct",
1582
1598
  languageHeader: "en-GB;q=1.0, en-SE;q=0.9",
1583
1599
  contentLocale: "en-GB" /* GB */,
@@ -1589,7 +1605,7 @@ var LOCALE_TEACHERS_SCT = {
1589
1605
  },
1590
1606
  date: {
1591
1607
  use24HourFormat: false,
1592
- locale: "en" /* SCT */,
1608
+ locale: DateLocale.SCT,
1593
1609
  formats: {
1594
1610
  dayMonth: "MMM DD" /* DAY_MONTH_US */,
1595
1611
  hoursMinutes: "hh:mm A" /* HOURS_MINUTES_US */,
@@ -1620,6 +1636,9 @@ var LOCALE_TEACHERS_SCT = {
1620
1636
  problem: {
1621
1637
  allowCommaDecimal: false
1622
1638
  },
1639
+ firstLoginBooks: {
1640
+ isLargeGrade: null
1641
+ },
1623
1642
  grades: {
1624
1643
  showPrefix: false,
1625
1644
  showOtherGrade: true
@@ -1633,6 +1652,7 @@ var LOCALE_TEACHERS_SCT = {
1633
1652
  var LOCALE_TEACHERS_DE = {
1634
1653
  name: "Deutsch",
1635
1654
  languageName: "German",
1655
+ country: "Germany",
1636
1656
  shortCode: "de",
1637
1657
  languageHeader: "de-DE;q=1.0, en-SE;q=0.9",
1638
1658
  contentLocale: "de-DE" /* DE */,
@@ -1644,7 +1664,7 @@ var LOCALE_TEACHERS_DE = {
1644
1664
  },
1645
1665
  date: {
1646
1666
  use24HourFormat: true,
1647
- locale: "de" /* DE */,
1667
+ locale: DateLocale.DE,
1648
1668
  formats: {
1649
1669
  dayMonth: "DD MMM" /* DAY_MONTH */,
1650
1670
  hoursMinutes: "HH:mm" /* HOURS_MINUTES */,
@@ -1675,6 +1695,9 @@ var LOCALE_TEACHERS_DE = {
1675
1695
  problem: {
1676
1696
  allowCommaDecimal: true
1677
1697
  },
1698
+ firstLoginBooks: {
1699
+ isLargeGrade: null
1700
+ },
1678
1701
  grades: {
1679
1702
  showPrefix: true,
1680
1703
  showOtherGrade: false