@magmamath/students-features 0.6.8 → 0.6.9-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/.editorconfig +15 -0
- package/.eslintignore +2 -0
- package/.eslintrc +22 -0
- package/.gitattributes +3 -0
- package/.github/actions/setup/action.yml +37 -0
- package/.github/workflows/ci.yml +73 -0
- package/.gitignore +84 -0
- package/.npmrc +3 -0
- package/.nvmrc +1 -0
- package/.prettierrc +11 -0
- package/.release-it.json +17 -0
- package/.watchmanconfig +1 -0
- package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +541 -0
- package/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs +28 -0
- package/.yarn/releases/yarn-3.6.1.cjs +874 -0
- package/babel.config.js +5 -0
- package/bob.config.js +25 -0
- package/dist/commonjs/shared/translation/constants.js +5 -1
- package/dist/commonjs/shared/translation/constants.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +27 -0
- package/dist/commonjs/shared/translation/localization/sct.json +27 -0
- package/dist/commonjs/shared/translation/types.js +2 -0
- package/dist/commonjs/shared/translation/types.js.map +1 -1
- package/dist/module/shared/translation/constants.js +5 -1
- package/dist/module/shared/translation/constants.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +27 -0
- package/dist/module/shared/translation/localization/sct.json +27 -0
- package/dist/module/shared/translation/types.js +2 -0
- package/dist/module/shared/translation/types.js.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +54 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts +3 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +5 -1
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +54 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/types.d.ts +3 -1
- package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/validation.types.d.ts +5 -1
- package/dist/typescript/module/shared/translation/validation.types.d.ts.map +1 -1
- package/example/app.json +30 -0
- package/example/assets/adaptive-icon.png +0 -0
- package/example/assets/favicon.png +0 -0
- package/example/assets/icon.png +0 -0
- package/example/assets/splash-icon.png +0 -0
- package/example/babel.config.js +28 -0
- package/example/index.js +8 -0
- package/example/metro.config.js +18 -0
- package/example/package.json +25 -0
- package/example/src/App.tsx +8 -0
- package/example/tsconfig.json +6 -0
- package/package.json +2 -2
- package/src/shared/translation/constants.ts +4 -0
- package/src/shared/translation/localization/ca.json +27 -0
- package/src/shared/translation/localization/sct.json +27 -0
- package/src/shared/translation/types.ts +6 -0
- package/src/shared/translation/validation.types.ts +9 -1
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +34 -0
- package/yarn.lock +8589 -0
package/babel.config.js
ADDED
package/bob.config.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
source: 'src',
|
|
3
|
+
output: 'dist',
|
|
4
|
+
targets: [
|
|
5
|
+
[
|
|
6
|
+
'commonjs',
|
|
7
|
+
{
|
|
8
|
+
esm: true,
|
|
9
|
+
},
|
|
10
|
+
],
|
|
11
|
+
[
|
|
12
|
+
'module',
|
|
13
|
+
{
|
|
14
|
+
esm: true,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
'typescript',
|
|
19
|
+
{
|
|
20
|
+
project: 'tsconfig.build.json',
|
|
21
|
+
esm: true,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
],
|
|
25
|
+
}
|
|
@@ -8,10 +8,14 @@ var _types = require("./types.js");
|
|
|
8
8
|
var _en = _interopRequireDefault(require("./localization/en.json"));
|
|
9
9
|
var _gb = _interopRequireDefault(require("./localization/gb.json"));
|
|
10
10
|
var _sw = _interopRequireDefault(require("./localization/sw.json"));
|
|
11
|
+
var _ca = _interopRequireDefault(require("./localization/ca.json"));
|
|
12
|
+
var _sct = _interopRequireDefault(require("./localization/sct.json"));
|
|
11
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
14
|
const LOCALIZATION_CONFIGS = exports.LOCALIZATION_CONFIGS = {
|
|
13
15
|
[_types.Locale.EN]: _en.default,
|
|
14
16
|
[_types.Locale.GB]: _gb.default,
|
|
15
|
-
[_types.Locale.SW]: _sw.default
|
|
17
|
+
[_types.Locale.SW]: _sw.default,
|
|
18
|
+
[_types.Locale.CA]: _ca.default,
|
|
19
|
+
[_types.Locale.SCT]: _sct.default
|
|
16
20
|
};
|
|
17
21
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_types","require","_en","_interopRequireDefault","_gb","_sw","e","__esModule","default","LOCALIZATION_CONFIGS","exports","Locale","EN","GB","SW"],"sourceRoot":"../../../../src","sources":["shared/translation/constants.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,GAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,GAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,GAAA,GAAAF,sBAAA,CAAAF,OAAA;
|
|
1
|
+
{"version":3,"names":["_types","require","_en","_interopRequireDefault","_gb","_sw","_ca","_sct","e","__esModule","default","LOCALIZATION_CONFIGS","exports","Locale","EN","GB","SW","CA","SCT"],"sourceRoot":"../../../../src","sources":["shared/translation/constants.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,GAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,GAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,GAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,GAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,IAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAAyC,SAAAE,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElC,MAAMG,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG;EAClC,CAACE,aAAM,CAACC,EAAE,GAAGA,WAAE;EACf,CAACD,aAAM,CAACE,EAAE,GAAGA,WAAE;EACf,CAACF,aAAM,CAACG,EAAE,GAAGA,WAAE;EACf,CAACH,aAAM,CAACI,EAAE,GAAGA,WAAE;EACf,CAACJ,aAAM,CAACK,GAAG,GAAGA;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"teacherFeedback.noComments": "No comments yet",
|
|
3
|
+
"time.justNow": "just now",
|
|
4
|
+
"time.minuteAgo": "minute ago",
|
|
5
|
+
"time.minutesAgo": "minutes ago",
|
|
6
|
+
"time.hourAgo": "hour ago",
|
|
7
|
+
"time.hoursAgo": "hours ago",
|
|
8
|
+
"time.dayAgo": "day ago",
|
|
9
|
+
"time.daysAgo": "days ago",
|
|
10
|
+
"time.monthAgo": "month ago",
|
|
11
|
+
"time.monthsAgo": "months ago",
|
|
12
|
+
"time.yearAgo": "year ago",
|
|
13
|
+
"time.yearsAgo": "years ago",
|
|
14
|
+
"chat": {
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
|
+
"giveHint": "Give me a hint",
|
|
17
|
+
"answerAgain": "Answer again to get another hint!",
|
|
18
|
+
"errorMessage": "Something went wrong! Try again",
|
|
19
|
+
"howCanIHelp": "Hi! Do you want help?",
|
|
20
|
+
"showError": "Show error"
|
|
21
|
+
},
|
|
22
|
+
"gifCelebrations": {
|
|
23
|
+
"greatStart": "Great start!",
|
|
24
|
+
"onTheWay": "On the way!",
|
|
25
|
+
"almostThere": "Almost there"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"teacherFeedback.noComments": "No comments yet",
|
|
3
|
+
"time.justNow": "just now",
|
|
4
|
+
"time.minuteAgo": "minute ago",
|
|
5
|
+
"time.minutesAgo": "minutes ago",
|
|
6
|
+
"time.hourAgo": "hour ago",
|
|
7
|
+
"time.hoursAgo": "hours ago",
|
|
8
|
+
"time.dayAgo": "day ago",
|
|
9
|
+
"time.daysAgo": "days ago",
|
|
10
|
+
"time.monthAgo": "month ago",
|
|
11
|
+
"time.monthsAgo": "months ago",
|
|
12
|
+
"time.yearAgo": "year ago",
|
|
13
|
+
"time.yearsAgo": "years ago",
|
|
14
|
+
"chat": {
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
|
+
"giveHint": "Give me a hint",
|
|
17
|
+
"answerAgain": "Answer again to get another hint!",
|
|
18
|
+
"errorMessage": "Something went wrong! Try again",
|
|
19
|
+
"howCanIHelp": "Hi! Do you want help?",
|
|
20
|
+
"showError": "Show error"
|
|
21
|
+
},
|
|
22
|
+
"gifCelebrations": {
|
|
23
|
+
"greatStart": "Great start!",
|
|
24
|
+
"onTheWay": "On the way!",
|
|
25
|
+
"almostThere": "Almost there"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -8,6 +8,8 @@ let Locale = exports.Locale = /*#__PURE__*/function (Locale) {
|
|
|
8
8
|
Locale["EN"] = "en-SE";
|
|
9
9
|
Locale["SW"] = "sv-SE";
|
|
10
10
|
Locale["GB"] = "en-GB";
|
|
11
|
+
Locale["CA"] = "en-CA";
|
|
12
|
+
Locale["SCT"] = "en-SCT";
|
|
11
13
|
return Locale;
|
|
12
14
|
}({}); // Validation of translations, do not remove
|
|
13
15
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Locale","exports"],"sourceRoot":"../../../../src","sources":["shared/translation/types.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["Locale","exports"],"sourceRoot":"../../../../src","sources":["shared/translation/types.ts"],"mappings":";;;;;;IAYYA,MAAM,GAAAC,OAAA,CAAAD,MAAA,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA,OAQlB","ignoreList":[]}
|
|
@@ -4,9 +4,13 @@ import { Locale } from "./types.js";
|
|
|
4
4
|
import EN from './localization/en.json';
|
|
5
5
|
import GB from './localization/gb.json';
|
|
6
6
|
import SW from './localization/sw.json';
|
|
7
|
+
import CA from './localization/ca.json';
|
|
8
|
+
import SCT from './localization/sct.json';
|
|
7
9
|
export const LOCALIZATION_CONFIGS = {
|
|
8
10
|
[Locale.EN]: EN,
|
|
9
11
|
[Locale.GB]: GB,
|
|
10
|
-
[Locale.SW]: SW
|
|
12
|
+
[Locale.SW]: SW,
|
|
13
|
+
[Locale.CA]: CA,
|
|
14
|
+
[Locale.SCT]: SCT
|
|
11
15
|
};
|
|
12
16
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Locale","EN","GB","SW","LOCALIZATION_CONFIGS"],"sourceRoot":"../../../../src","sources":["shared/translation/constants.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,YAAS;AAChC,OAAOC,EAAE,MAAM,wBAAwB;AACvC,OAAOC,EAAE,MAAM,wBAAwB;AACvC,OAAOC,EAAE,MAAM,wBAAwB;
|
|
1
|
+
{"version":3,"names":["Locale","EN","GB","SW","CA","SCT","LOCALIZATION_CONFIGS"],"sourceRoot":"../../../../src","sources":["shared/translation/constants.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,YAAS;AAChC,OAAOC,EAAE,MAAM,wBAAwB;AACvC,OAAOC,EAAE,MAAM,wBAAwB;AACvC,OAAOC,EAAE,MAAM,wBAAwB;AACvC,OAAOC,EAAE,MAAM,wBAAwB;AACvC,OAAOC,GAAG,MAAM,yBAAyB;AAEzC,OAAO,MAAMC,oBAAoB,GAAG;EAClC,CAACN,MAAM,CAACC,EAAE,GAAGA,EAAE;EACf,CAACD,MAAM,CAACE,EAAE,GAAGA,EAAE;EACf,CAACF,MAAM,CAACG,EAAE,GAAGA,EAAE;EACf,CAACH,MAAM,CAACI,EAAE,GAAGA,EAAE;EACf,CAACJ,MAAM,CAACK,GAAG,GAAGA;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"teacherFeedback.noComments": "No comments yet",
|
|
3
|
+
"time.justNow": "just now",
|
|
4
|
+
"time.minuteAgo": "minute ago",
|
|
5
|
+
"time.minutesAgo": "minutes ago",
|
|
6
|
+
"time.hourAgo": "hour ago",
|
|
7
|
+
"time.hoursAgo": "hours ago",
|
|
8
|
+
"time.dayAgo": "day ago",
|
|
9
|
+
"time.daysAgo": "days ago",
|
|
10
|
+
"time.monthAgo": "month ago",
|
|
11
|
+
"time.monthsAgo": "months ago",
|
|
12
|
+
"time.yearAgo": "year ago",
|
|
13
|
+
"time.yearsAgo": "years ago",
|
|
14
|
+
"chat": {
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
|
+
"giveHint": "Give me a hint",
|
|
17
|
+
"answerAgain": "Answer again to get another hint!",
|
|
18
|
+
"errorMessage": "Something went wrong! Try again",
|
|
19
|
+
"howCanIHelp": "Hi! Do you want help?",
|
|
20
|
+
"showError": "Show error"
|
|
21
|
+
},
|
|
22
|
+
"gifCelebrations": {
|
|
23
|
+
"greatStart": "Great start!",
|
|
24
|
+
"onTheWay": "On the way!",
|
|
25
|
+
"almostThere": "Almost there"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"teacherFeedback.noComments": "No comments yet",
|
|
3
|
+
"time.justNow": "just now",
|
|
4
|
+
"time.minuteAgo": "minute ago",
|
|
5
|
+
"time.minutesAgo": "minutes ago",
|
|
6
|
+
"time.hourAgo": "hour ago",
|
|
7
|
+
"time.hoursAgo": "hours ago",
|
|
8
|
+
"time.dayAgo": "day ago",
|
|
9
|
+
"time.daysAgo": "days ago",
|
|
10
|
+
"time.monthAgo": "month ago",
|
|
11
|
+
"time.monthsAgo": "months ago",
|
|
12
|
+
"time.yearAgo": "year ago",
|
|
13
|
+
"time.yearsAgo": "years ago",
|
|
14
|
+
"chat": {
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
|
+
"giveHint": "Give me a hint",
|
|
17
|
+
"answerAgain": "Answer again to get another hint!",
|
|
18
|
+
"errorMessage": "Something went wrong! Try again",
|
|
19
|
+
"howCanIHelp": "Hi! Do you want help?",
|
|
20
|
+
"showError": "Show error"
|
|
21
|
+
},
|
|
22
|
+
"gifCelebrations": {
|
|
23
|
+
"greatStart": "Great start!",
|
|
24
|
+
"onTheWay": "On the way!",
|
|
25
|
+
"almostThere": "Almost there"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Locale"],"sourceRoot":"../../../../src","sources":["shared/translation/types.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["Locale"],"sourceRoot":"../../../../src","sources":["shared/translation/types.ts"],"mappings":";;AAYA,WAAYA,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;;AAQlB","ignoreList":[]}
|
|
@@ -80,5 +80,59 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
80
80
|
almostThere: string;
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
|
+
"en-CA": {
|
|
84
|
+
"teacherFeedback.noComments": string;
|
|
85
|
+
"time.justNow": string;
|
|
86
|
+
"time.minuteAgo": string;
|
|
87
|
+
"time.minutesAgo": string;
|
|
88
|
+
"time.hourAgo": string;
|
|
89
|
+
"time.hoursAgo": string;
|
|
90
|
+
"time.dayAgo": string;
|
|
91
|
+
"time.daysAgo": string;
|
|
92
|
+
"time.monthAgo": string;
|
|
93
|
+
"time.monthsAgo": string;
|
|
94
|
+
"time.yearAgo": string;
|
|
95
|
+
"time.yearsAgo": string;
|
|
96
|
+
chat: {
|
|
97
|
+
anotherHint: string;
|
|
98
|
+
giveHint: string;
|
|
99
|
+
answerAgain: string;
|
|
100
|
+
errorMessage: string;
|
|
101
|
+
howCanIHelp: string;
|
|
102
|
+
showError: string;
|
|
103
|
+
};
|
|
104
|
+
gifCelebrations: {
|
|
105
|
+
greatStart: string;
|
|
106
|
+
onTheWay: string;
|
|
107
|
+
almostThere: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
"en-SCT": {
|
|
111
|
+
"teacherFeedback.noComments": string;
|
|
112
|
+
"time.justNow": string;
|
|
113
|
+
"time.minuteAgo": string;
|
|
114
|
+
"time.minutesAgo": string;
|
|
115
|
+
"time.hourAgo": string;
|
|
116
|
+
"time.hoursAgo": string;
|
|
117
|
+
"time.dayAgo": string;
|
|
118
|
+
"time.daysAgo": string;
|
|
119
|
+
"time.monthAgo": string;
|
|
120
|
+
"time.monthsAgo": string;
|
|
121
|
+
"time.yearAgo": string;
|
|
122
|
+
"time.yearsAgo": string;
|
|
123
|
+
chat: {
|
|
124
|
+
anotherHint: string;
|
|
125
|
+
giveHint: string;
|
|
126
|
+
answerAgain: string;
|
|
127
|
+
errorMessage: string;
|
|
128
|
+
howCanIHelp: string;
|
|
129
|
+
showError: string;
|
|
130
|
+
};
|
|
131
|
+
gifCelebrations: {
|
|
132
|
+
greatStart: string;
|
|
133
|
+
onTheWay: string;
|
|
134
|
+
almostThere: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
83
137
|
};
|
|
84
138
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;AAKnD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGnD,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAA;AAChD,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,YAAY,CAAC,CAAA;AACxD,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KAAK,MAAM,CAAA;AAE5F,oBAAY,MAAM;IAChB,EAAE,UAAU;IACZ,EAAE,UAAU;IACZ,EAAE,UAAU;IACZ,EAAE,UAAU;IACZ,GAAG,WAAW;CACf"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import enTranslations from './localization/en.json';
|
|
2
2
|
import swTranslations from './localization/sw.json';
|
|
3
3
|
import gbTranslations from './localization/gb.json';
|
|
4
|
+
import caTranslations from './localization/ca.json';
|
|
5
|
+
import sctTranslations from './localization/sct.json';
|
|
4
6
|
type Extends<T, U> = T extends U ? true : false;
|
|
5
7
|
type ExtendsAll<Candidate, Types extends unknown[]> = Types extends [infer Head, ...infer Tail] ? Extends<Candidate, Head> extends true ? ExtendsAll<Candidate, Tail> : false : true;
|
|
6
8
|
type FindDominantType<Types extends unknown[]> = Types extends [
|
|
@@ -10,7 +12,9 @@ type FindDominantType<Types extends unknown[]> = Types extends [
|
|
|
10
12
|
type DominantTranslation = FindDominantType<[
|
|
11
13
|
typeof enTranslations,
|
|
12
14
|
typeof swTranslations,
|
|
13
|
-
typeof gbTranslations
|
|
15
|
+
typeof gbTranslations,
|
|
16
|
+
typeof caTranslations,
|
|
17
|
+
typeof sctTranslations
|
|
14
18
|
]>;
|
|
15
19
|
export type ISValidTranslation<T extends DominantTranslation> = T;
|
|
16
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/validation.types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"validation.types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/validation.types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,eAAe,MAAM,yBAAyB,CAAA;AAErD,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,GAAG,KAAK,CAAA;AAE/C,KAAK,UAAU,CAAC,SAAS,EAAE,KAAK,SAAS,OAAO,EAAE,IAAI,KAAK,SAAS,CAAC,MAAM,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,GAC3F,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,GACnC,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,GAC3B,KAAK,GACP,IAAI,CAAA;AAER,KAAK,gBAAgB,CAAC,KAAK,SAAS,OAAO,EAAE,IAAI,KAAK,SAAS;IAC7D,MAAM,KAAK;IACX,GAAG,MAAM,IAAI,SAAS,OAAO,EAAE;CAChC,GACG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,IAAI,GAClC,KAAK,GACL,gBAAgB,CAAC,IAAI,CAAC,GACxB,KAAK,CAAA;AAET,KAAK,mBAAmB,GAAG,gBAAgB,CACzC;IACE,OAAO,cAAc;IACrB,OAAO,cAAc;IACrB,OAAO,cAAc;IACrB,OAAO,cAAc;IACrB,OAAO,eAAe;CACvB,CACF,CAAA;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,mBAAmB,IAAI,CAAC,CAAA"}
|
|
@@ -80,5 +80,59 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
80
80
|
almostThere: string;
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
|
+
"en-CA": {
|
|
84
|
+
"teacherFeedback.noComments": string;
|
|
85
|
+
"time.justNow": string;
|
|
86
|
+
"time.minuteAgo": string;
|
|
87
|
+
"time.minutesAgo": string;
|
|
88
|
+
"time.hourAgo": string;
|
|
89
|
+
"time.hoursAgo": string;
|
|
90
|
+
"time.dayAgo": string;
|
|
91
|
+
"time.daysAgo": string;
|
|
92
|
+
"time.monthAgo": string;
|
|
93
|
+
"time.monthsAgo": string;
|
|
94
|
+
"time.yearAgo": string;
|
|
95
|
+
"time.yearsAgo": string;
|
|
96
|
+
chat: {
|
|
97
|
+
anotherHint: string;
|
|
98
|
+
giveHint: string;
|
|
99
|
+
answerAgain: string;
|
|
100
|
+
errorMessage: string;
|
|
101
|
+
howCanIHelp: string;
|
|
102
|
+
showError: string;
|
|
103
|
+
};
|
|
104
|
+
gifCelebrations: {
|
|
105
|
+
greatStart: string;
|
|
106
|
+
onTheWay: string;
|
|
107
|
+
almostThere: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
"en-SCT": {
|
|
111
|
+
"teacherFeedback.noComments": string;
|
|
112
|
+
"time.justNow": string;
|
|
113
|
+
"time.minuteAgo": string;
|
|
114
|
+
"time.minutesAgo": string;
|
|
115
|
+
"time.hourAgo": string;
|
|
116
|
+
"time.hoursAgo": string;
|
|
117
|
+
"time.dayAgo": string;
|
|
118
|
+
"time.daysAgo": string;
|
|
119
|
+
"time.monthAgo": string;
|
|
120
|
+
"time.monthsAgo": string;
|
|
121
|
+
"time.yearAgo": string;
|
|
122
|
+
"time.yearsAgo": string;
|
|
123
|
+
chat: {
|
|
124
|
+
anotherHint: string;
|
|
125
|
+
giveHint: string;
|
|
126
|
+
answerAgain: string;
|
|
127
|
+
errorMessage: string;
|
|
128
|
+
howCanIHelp: string;
|
|
129
|
+
showError: string;
|
|
130
|
+
};
|
|
131
|
+
gifCelebrations: {
|
|
132
|
+
greatStart: string;
|
|
133
|
+
onTheWay: string;
|
|
134
|
+
almostThere: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
83
137
|
};
|
|
84
138
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;AAKnD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGnD,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAA;AAChD,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,YAAY,CAAC,CAAA;AACxD,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KAAK,MAAM,CAAA;AAE5F,oBAAY,MAAM;IAChB,EAAE,UAAU;IACZ,EAAE,UAAU;IACZ,EAAE,UAAU;IACZ,EAAE,UAAU;IACZ,GAAG,WAAW;CACf"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import enTranslations from './localization/en.json';
|
|
2
2
|
import swTranslations from './localization/sw.json';
|
|
3
3
|
import gbTranslations from './localization/gb.json';
|
|
4
|
+
import caTranslations from './localization/ca.json';
|
|
5
|
+
import sctTranslations from './localization/sct.json';
|
|
4
6
|
type Extends<T, U> = T extends U ? true : false;
|
|
5
7
|
type ExtendsAll<Candidate, Types extends unknown[]> = Types extends [infer Head, ...infer Tail] ? Extends<Candidate, Head> extends true ? ExtendsAll<Candidate, Tail> : false : true;
|
|
6
8
|
type FindDominantType<Types extends unknown[]> = Types extends [
|
|
@@ -10,7 +12,9 @@ type FindDominantType<Types extends unknown[]> = Types extends [
|
|
|
10
12
|
type DominantTranslation = FindDominantType<[
|
|
11
13
|
typeof enTranslations,
|
|
12
14
|
typeof swTranslations,
|
|
13
|
-
typeof gbTranslations
|
|
15
|
+
typeof gbTranslations,
|
|
16
|
+
typeof caTranslations,
|
|
17
|
+
typeof sctTranslations
|
|
14
18
|
]>;
|
|
15
19
|
export type ISValidTranslation<T extends DominantTranslation> = T;
|
|
16
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/validation.types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"validation.types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/validation.types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,eAAe,MAAM,yBAAyB,CAAA;AAErD,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,GAAG,KAAK,CAAA;AAE/C,KAAK,UAAU,CAAC,SAAS,EAAE,KAAK,SAAS,OAAO,EAAE,IAAI,KAAK,SAAS,CAAC,MAAM,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,GAC3F,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,GACnC,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,GAC3B,KAAK,GACP,IAAI,CAAA;AAER,KAAK,gBAAgB,CAAC,KAAK,SAAS,OAAO,EAAE,IAAI,KAAK,SAAS;IAC7D,MAAM,KAAK;IACX,GAAG,MAAM,IAAI,SAAS,OAAO,EAAE;CAChC,GACG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,IAAI,GAClC,KAAK,GACL,gBAAgB,CAAC,IAAI,CAAC,GACxB,KAAK,CAAA;AAET,KAAK,mBAAmB,GAAG,gBAAgB,CACzC;IACE,OAAO,cAAc;IACrB,OAAO,cAAc;IACrB,OAAO,cAAc;IACrB,OAAO,cAAc;IACrB,OAAO,eAAe;CACvB,CACF,CAAA;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,mBAAmB,IAAI,CAAC,CAAA"}
|
package/example/app.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expo": {
|
|
3
|
+
"name": "example",
|
|
4
|
+
"slug": "example",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"orientation": "portrait",
|
|
7
|
+
"icon": "./assets/icon.png",
|
|
8
|
+
"userInterfaceStyle": "light",
|
|
9
|
+
"newArchEnabled": true,
|
|
10
|
+
"splash": {
|
|
11
|
+
"image": "./assets/splash-icon.png",
|
|
12
|
+
"resizeMode": "contain",
|
|
13
|
+
"backgroundColor": "#ffffff"
|
|
14
|
+
},
|
|
15
|
+
"ios": {
|
|
16
|
+
"supportsTablet": true,
|
|
17
|
+
"bundleIdentifier": "magmamath.features.example"
|
|
18
|
+
},
|
|
19
|
+
"android": {
|
|
20
|
+
"adaptiveIcon": {
|
|
21
|
+
"foregroundImage": "./assets/adaptive-icon.png",
|
|
22
|
+
"backgroundColor": "#ffffff"
|
|
23
|
+
},
|
|
24
|
+
"package": "magmamath.features.example"
|
|
25
|
+
},
|
|
26
|
+
"web": {
|
|
27
|
+
"favicon": "./assets/favicon.png"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const path = require('path')
|
|
2
|
+
const { getConfig } = require('react-native-builder-bob/babel-config')
|
|
3
|
+
const pkg = require('../package.json')
|
|
4
|
+
|
|
5
|
+
const root = path.resolve(__dirname, '..')
|
|
6
|
+
|
|
7
|
+
module.exports = function (api) {
|
|
8
|
+
api.cache(true)
|
|
9
|
+
|
|
10
|
+
return getConfig(
|
|
11
|
+
{
|
|
12
|
+
presets: ['babel-preset-expo'],
|
|
13
|
+
plugins: [
|
|
14
|
+
[
|
|
15
|
+
'module-resolver',
|
|
16
|
+
{
|
|
17
|
+
extensions: ['.tsx', '.ts', '.js', '.json'],
|
|
18
|
+
alias: {
|
|
19
|
+
[pkg.name]: path.join(__dirname, '../', pkg.source),
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
['@babel/plugin-transform-private-methods', { loose: true }],
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{ root, pkg },
|
|
27
|
+
)
|
|
28
|
+
}
|
package/example/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { registerRootComponent } from 'expo';
|
|
2
|
+
|
|
3
|
+
import App from './src/App';
|
|
4
|
+
|
|
5
|
+
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
|
|
6
|
+
// It also ensures that whether you load the app in Expo Go or in a native build,
|
|
7
|
+
// the environment is set up appropriately
|
|
8
|
+
registerRootComponent(App);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const { getDefaultConfig } = require('@expo/metro-config');
|
|
3
|
+
const { getConfig } = require('react-native-builder-bob/metro-config');
|
|
4
|
+
const pkg = require('../package.json');
|
|
5
|
+
|
|
6
|
+
const root = path.resolve(__dirname, '..');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Metro configuration
|
|
10
|
+
* https://facebook.github.io/metro/docs/configuration
|
|
11
|
+
*
|
|
12
|
+
* @type {import('metro-config').MetroConfig}
|
|
13
|
+
*/
|
|
14
|
+
module.exports = getConfig(getDefaultConfig(__dirname), {
|
|
15
|
+
root,
|
|
16
|
+
pkg,
|
|
17
|
+
project: __dirname,
|
|
18
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@magmamath/students-features-example",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"start": "expo start",
|
|
7
|
+
"android": "expo start --android",
|
|
8
|
+
"ios": "expo start --ios",
|
|
9
|
+
"web": "expo start --web"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@expo/metro-runtime": "~4.0.0",
|
|
13
|
+
"expo": "~52.0.11",
|
|
14
|
+
"expo-status-bar": "~2.0.0",
|
|
15
|
+
"react": "18.3.1",
|
|
16
|
+
"react-dom": "18.3.1",
|
|
17
|
+
"react-native": "0.76.3",
|
|
18
|
+
"react-native-web": "~0.19.13"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@babel/core": "^7.20.0",
|
|
22
|
+
"react-native-builder-bob": "^0.33.3"
|
|
23
|
+
},
|
|
24
|
+
"private": true
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magmamath/students-features",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9-rc.2",
|
|
4
4
|
"description": "Magmamath features library",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"release": "release-it"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
+
"@magmamath/react-native-ui": "*",
|
|
21
22
|
"effector": "^23.2.3",
|
|
22
23
|
"effector-react": "^23.2.1",
|
|
23
|
-
"@magmamath/react-native-ui": "*",
|
|
24
24
|
"react": "*",
|
|
25
25
|
"react-native": "*",
|
|
26
26
|
"react-native-reanimated": ">=0.3.16",
|
|
@@ -2,9 +2,13 @@ import { Locale } from './types'
|
|
|
2
2
|
import EN from './localization/en.json'
|
|
3
3
|
import GB from './localization/gb.json'
|
|
4
4
|
import SW from './localization/sw.json'
|
|
5
|
+
import CA from './localization/ca.json'
|
|
6
|
+
import SCT from './localization/sct.json'
|
|
5
7
|
|
|
6
8
|
export const LOCALIZATION_CONFIGS = {
|
|
7
9
|
[Locale.EN]: EN,
|
|
8
10
|
[Locale.GB]: GB,
|
|
9
11
|
[Locale.SW]: SW,
|
|
12
|
+
[Locale.CA]: CA,
|
|
13
|
+
[Locale.SCT]: SCT,
|
|
10
14
|
}
|