@magmamath/students-features 1.8.4-rc.8 → 1.8.4
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/commonjs/features/pmProgress/shared/TreeNormalizer.js +5 -1
- package/dist/commonjs/features/pmProgress/shared/TreeNormalizer.js.map +1 -1
- package/dist/commonjs/features/uiMode/index.js +7 -0
- package/dist/commonjs/features/uiMode/index.js.map +1 -1
- package/dist/commonjs/features/uiMode/uiMode.helpers.js +7 -2
- package/dist/commonjs/features/uiMode/uiMode.helpers.js.map +1 -1
- package/dist/commonjs/index.js +0 -12
- package/dist/commonjs/index.js.map +1 -1
- package/dist/module/features/pmProgress/shared/TreeNormalizer.js +5 -1
- package/dist/module/features/pmProgress/shared/TreeNormalizer.js.map +1 -1
- package/dist/module/features/uiMode/index.js +1 -0
- package/dist/module/features/uiMode/index.js.map +1 -1
- package/dist/module/features/uiMode/uiMode.helpers.js +6 -1
- package/dist/module/features/uiMode/uiMode.helpers.js.map +1 -1
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts +4 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/uiMode/index.d.ts +1 -0
- package/dist/typescript/commonjs/features/uiMode/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/uiMode/uiMode.helpers.d.ts +2 -0
- package/dist/typescript/commonjs/features/uiMode/uiMode.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +0 -1
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts +4 -0
- package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts.map +1 -1
- package/dist/typescript/module/features/uiMode/index.d.ts +1 -0
- package/dist/typescript/module/features/uiMode/index.d.ts.map +1 -1
- package/dist/typescript/module/features/uiMode/uiMode.helpers.d.ts +2 -0
- package/dist/typescript/module/features/uiMode/uiMode.helpers.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +0 -1
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/package.json +2 -5
- package/src/features/pmProgress/shared/TreeNormalizer.ts +5 -1
- package/src/features/uiMode/__tests__/getUIMode.test.ts +64 -0
- package/src/features/uiMode/index.ts +1 -0
- package/src/features/uiMode/uiMode.helpers.ts +16 -1
- package/src/i18n/.generated/schema.json +1 -9
- package/src/index.ts +0 -1
- package/dist/commonjs/features/profile/Profile.js +0 -90
- package/dist/commonjs/features/profile/Profile.js.map +0 -1
- package/dist/commonjs/features/profile/components/actions/ProfileActions.js +0 -67
- package/dist/commonjs/features/profile/components/actions/ProfileActions.js.map +0 -1
- package/dist/commonjs/features/profile/components/cards/ProfileCard.js +0 -57
- package/dist/commonjs/features/profile/components/cards/ProfileCard.js.map +0 -1
- package/dist/commonjs/features/profile/components/info/AccountInfoCard.js +0 -90
- package/dist/commonjs/features/profile/components/info/AccountInfoCard.js.map +0 -1
- package/dist/commonjs/features/profile/components/modals/JoinClassModal.js +0 -154
- package/dist/commonjs/features/profile/components/modals/JoinClassModal.js.map +0 -1
- package/dist/commonjs/features/profile/components/modals/LogoutConfirmModal.js +0 -61
- package/dist/commonjs/features/profile/components/modals/LogoutConfirmModal.js.map +0 -1
- package/dist/commonjs/features/profile/components/modals/TranslationLanguageModal.js +0 -126
- package/dist/commonjs/features/profile/components/modals/TranslationLanguageModal.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/LanguageSettingsCard.js +0 -22
- package/dist/commonjs/features/profile/components/settings/LanguageSettingsCard.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/PreferencesCard.js +0 -70
- package/dist/commonjs/features/profile/components/settings/PreferencesCard.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/SettingRow.js +0 -48
- package/dist/commonjs/features/profile/components/settings/SettingRow.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/TextSettingsCard.js +0 -74
- package/dist/commonjs/features/profile/components/settings/TextSettingsCard.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/TextSizeSlider.js +0 -116
- package/dist/commonjs/features/profile/components/settings/TextSizeSlider.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/TextToSpeechRow.js +0 -35
- package/dist/commonjs/features/profile/components/settings/TextToSpeechRow.js.map +0 -1
- package/dist/commonjs/features/profile/components/settings/TranslationLanguageRow.js +0 -60
- package/dist/commonjs/features/profile/components/settings/TranslationLanguageRow.js.map +0 -1
- package/dist/commonjs/features/profile/context/ProfileContext.js +0 -18
- package/dist/commonjs/features/profile/context/ProfileContext.js.map +0 -1
- package/dist/commonjs/features/profile/index.js +0 -80
- package/dist/commonjs/features/profile/index.js.map +0 -1
- package/dist/commonjs/features/profile/model/ProfileApi.js +0 -15
- package/dist/commonjs/features/profile/model/ProfileApi.js.map +0 -1
- package/dist/commonjs/features/profile/model/ProfileJoinClassModel.js +0 -60
- package/dist/commonjs/features/profile/model/ProfileJoinClassModel.js.map +0 -1
- package/dist/commonjs/features/profile/model/ProfileLanguageModel.js +0 -30
- package/dist/commonjs/features/profile/model/ProfileLanguageModel.js.map +0 -1
- package/dist/commonjs/features/profile/model/ProfileModel.js +0 -53
- package/dist/commonjs/features/profile/model/ProfileModel.js.map +0 -1
- package/dist/commonjs/features/profile/model/profileModal.types.js +0 -6
- package/dist/commonjs/features/profile/model/profileModal.types.js.map +0 -1
- package/dist/commonjs/features/profile/shared/JoinClassError.js +0 -16
- package/dist/commonjs/features/profile/shared/JoinClassError.js.map +0 -1
- package/dist/commonjs/features/profile/shared/profile.constants.js +0 -29
- package/dist/commonjs/features/profile/shared/profile.constants.js.map +0 -1
- package/dist/commonjs/features/profile/shared/profile.helpers.js +0 -40
- package/dist/commonjs/features/profile/shared/profile.helpers.js.map +0 -1
- package/dist/commonjs/features/profile/shared/profile.types.js +0 -6
- package/dist/commonjs/features/profile/shared/profile.types.js.map +0 -1
- package/dist/module/features/profile/Profile.js +0 -84
- package/dist/module/features/profile/Profile.js.map +0 -1
- package/dist/module/features/profile/components/actions/ProfileActions.js +0 -61
- package/dist/module/features/profile/components/actions/ProfileActions.js.map +0 -1
- package/dist/module/features/profile/components/cards/ProfileCard.js +0 -51
- package/dist/module/features/profile/components/cards/ProfileCard.js.map +0 -1
- package/dist/module/features/profile/components/info/AccountInfoCard.js +0 -84
- package/dist/module/features/profile/components/info/AccountInfoCard.js.map +0 -1
- package/dist/module/features/profile/components/modals/JoinClassModal.js +0 -147
- package/dist/module/features/profile/components/modals/JoinClassModal.js.map +0 -1
- package/dist/module/features/profile/components/modals/LogoutConfirmModal.js +0 -55
- package/dist/module/features/profile/components/modals/LogoutConfirmModal.js.map +0 -1
- package/dist/module/features/profile/components/modals/TranslationLanguageModal.js +0 -120
- package/dist/module/features/profile/components/modals/TranslationLanguageModal.js.map +0 -1
- package/dist/module/features/profile/components/settings/LanguageSettingsCard.js +0 -16
- package/dist/module/features/profile/components/settings/LanguageSettingsCard.js.map +0 -1
- package/dist/module/features/profile/components/settings/PreferencesCard.js +0 -64
- package/dist/module/features/profile/components/settings/PreferencesCard.js.map +0 -1
- package/dist/module/features/profile/components/settings/SettingRow.js +0 -42
- package/dist/module/features/profile/components/settings/SettingRow.js.map +0 -1
- package/dist/module/features/profile/components/settings/TextSettingsCard.js +0 -68
- package/dist/module/features/profile/components/settings/TextSettingsCard.js.map +0 -1
- package/dist/module/features/profile/components/settings/TextSizeSlider.js +0 -109
- package/dist/module/features/profile/components/settings/TextSizeSlider.js.map +0 -1
- package/dist/module/features/profile/components/settings/TextToSpeechRow.js +0 -29
- package/dist/module/features/profile/components/settings/TextToSpeechRow.js.map +0 -1
- package/dist/module/features/profile/components/settings/TranslationLanguageRow.js +0 -54
- package/dist/module/features/profile/components/settings/TranslationLanguageRow.js.map +0 -1
- package/dist/module/features/profile/context/ProfileContext.js +0 -13
- package/dist/module/features/profile/context/ProfileContext.js.map +0 -1
- package/dist/module/features/profile/index.js +0 -11
- package/dist/module/features/profile/index.js.map +0 -1
- package/dist/module/features/profile/model/ProfileApi.js +0 -10
- package/dist/module/features/profile/model/ProfileApi.js.map +0 -1
- package/dist/module/features/profile/model/ProfileJoinClassModel.js +0 -55
- package/dist/module/features/profile/model/ProfileJoinClassModel.js.map +0 -1
- package/dist/module/features/profile/model/ProfileLanguageModel.js +0 -25
- package/dist/module/features/profile/model/ProfileLanguageModel.js.map +0 -1
- package/dist/module/features/profile/model/ProfileModel.js +0 -48
- package/dist/module/features/profile/model/ProfileModel.js.map +0 -1
- package/dist/module/features/profile/model/profileModal.types.js +0 -4
- package/dist/module/features/profile/model/profileModal.types.js.map +0 -1
- package/dist/module/features/profile/shared/JoinClassError.js +0 -11
- package/dist/module/features/profile/shared/JoinClassError.js.map +0 -1
- package/dist/module/features/profile/shared/profile.constants.js +0 -25
- package/dist/module/features/profile/shared/profile.constants.js.map +0 -1
- package/dist/module/features/profile/shared/profile.helpers.js +0 -32
- package/dist/module/features/profile/shared/profile.helpers.js.map +0 -1
- package/dist/module/features/profile/shared/profile.types.js +0 -4
- package/dist/module/features/profile/shared/profile.types.js.map +0 -1
- package/dist/typescript/commonjs/features/profile/Profile.d.ts +0 -6
- package/dist/typescript/commonjs/features/profile/Profile.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/__tests__/ProfileModel.test.d.ts +0 -2
- package/dist/typescript/commonjs/features/profile/__tests__/ProfileModel.test.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/__tests__/profile.helpers.test.d.ts +0 -2
- package/dist/typescript/commonjs/features/profile/__tests__/profile.helpers.test.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/actions/ProfileActions.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/actions/ProfileActions.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/cards/ProfileCard.d.ts +0 -10
- package/dist/typescript/commonjs/features/profile/components/cards/ProfileCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/info/AccountInfoCard.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/info/AccountInfoCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/modals/JoinClassModal.d.ts +0 -4
- package/dist/typescript/commonjs/features/profile/components/modals/JoinClassModal.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/modals/LogoutConfirmModal.d.ts +0 -4
- package/dist/typescript/commonjs/features/profile/components/modals/LogoutConfirmModal.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/modals/TranslationLanguageModal.d.ts +0 -4
- package/dist/typescript/commonjs/features/profile/components/modals/TranslationLanguageModal.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/LanguageSettingsCard.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/settings/LanguageSettingsCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/PreferencesCard.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/settings/PreferencesCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/SettingRow.d.ts +0 -11
- package/dist/typescript/commonjs/features/profile/components/settings/SettingRow.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/TextSettingsCard.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/settings/TextSettingsCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/TextSizeSlider.d.ts +0 -8
- package/dist/typescript/commonjs/features/profile/components/settings/TextSizeSlider.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/TextToSpeechRow.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/settings/TextToSpeechRow.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/components/settings/TranslationLanguageRow.d.ts +0 -3
- package/dist/typescript/commonjs/features/profile/components/settings/TranslationLanguageRow.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/context/ProfileContext.d.ts +0 -13
- package/dist/typescript/commonjs/features/profile/context/ProfileContext.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/index.d.ts +0 -12
- package/dist/typescript/commonjs/features/profile/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/model/ProfileApi.d.ts +0 -11
- package/dist/typescript/commonjs/features/profile/model/ProfileApi.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/model/ProfileJoinClassModel.d.ts +0 -14
- package/dist/typescript/commonjs/features/profile/model/ProfileJoinClassModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/model/ProfileLanguageModel.d.ts +0 -13
- package/dist/typescript/commonjs/features/profile/model/ProfileLanguageModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/model/ProfileModel.d.ts +0 -26
- package/dist/typescript/commonjs/features/profile/model/ProfileModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/model/profileModal.types.d.ts +0 -14
- package/dist/typescript/commonjs/features/profile/model/profileModal.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/shared/JoinClassError.d.ts +0 -5
- package/dist/typescript/commonjs/features/profile/shared/JoinClassError.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/shared/profile.constants.d.ts +0 -20
- package/dist/typescript/commonjs/features/profile/shared/profile.constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/shared/profile.helpers.d.ts +0 -6
- package/dist/typescript/commonjs/features/profile/shared/profile.helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/profile/shared/profile.types.d.ts +0 -27
- package/dist/typescript/commonjs/features/profile/shared/profile.types.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/Profile.d.ts +0 -6
- package/dist/typescript/module/features/profile/Profile.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/__tests__/ProfileModel.test.d.ts +0 -2
- package/dist/typescript/module/features/profile/__tests__/ProfileModel.test.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/__tests__/profile.helpers.test.d.ts +0 -2
- package/dist/typescript/module/features/profile/__tests__/profile.helpers.test.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/actions/ProfileActions.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/actions/ProfileActions.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/cards/ProfileCard.d.ts +0 -10
- package/dist/typescript/module/features/profile/components/cards/ProfileCard.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/info/AccountInfoCard.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/info/AccountInfoCard.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/modals/JoinClassModal.d.ts +0 -4
- package/dist/typescript/module/features/profile/components/modals/JoinClassModal.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/modals/LogoutConfirmModal.d.ts +0 -4
- package/dist/typescript/module/features/profile/components/modals/LogoutConfirmModal.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/modals/TranslationLanguageModal.d.ts +0 -4
- package/dist/typescript/module/features/profile/components/modals/TranslationLanguageModal.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/LanguageSettingsCard.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/settings/LanguageSettingsCard.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/PreferencesCard.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/settings/PreferencesCard.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/SettingRow.d.ts +0 -11
- package/dist/typescript/module/features/profile/components/settings/SettingRow.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/TextSettingsCard.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/settings/TextSettingsCard.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/TextSizeSlider.d.ts +0 -8
- package/dist/typescript/module/features/profile/components/settings/TextSizeSlider.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/TextToSpeechRow.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/settings/TextToSpeechRow.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/components/settings/TranslationLanguageRow.d.ts +0 -3
- package/dist/typescript/module/features/profile/components/settings/TranslationLanguageRow.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/context/ProfileContext.d.ts +0 -13
- package/dist/typescript/module/features/profile/context/ProfileContext.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/index.d.ts +0 -12
- package/dist/typescript/module/features/profile/index.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/model/ProfileApi.d.ts +0 -11
- package/dist/typescript/module/features/profile/model/ProfileApi.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/model/ProfileJoinClassModel.d.ts +0 -14
- package/dist/typescript/module/features/profile/model/ProfileJoinClassModel.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/model/ProfileLanguageModel.d.ts +0 -13
- package/dist/typescript/module/features/profile/model/ProfileLanguageModel.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/model/ProfileModel.d.ts +0 -26
- package/dist/typescript/module/features/profile/model/ProfileModel.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/model/profileModal.types.d.ts +0 -14
- package/dist/typescript/module/features/profile/model/profileModal.types.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/shared/JoinClassError.d.ts +0 -5
- package/dist/typescript/module/features/profile/shared/JoinClassError.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/shared/profile.constants.d.ts +0 -20
- package/dist/typescript/module/features/profile/shared/profile.constants.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/shared/profile.helpers.d.ts +0 -6
- package/dist/typescript/module/features/profile/shared/profile.helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/profile/shared/profile.types.d.ts +0 -27
- package/dist/typescript/module/features/profile/shared/profile.types.d.ts.map +0 -1
- package/src/features/profile/Profile.tsx +0 -83
- package/src/features/profile/__tests__/ProfileModel.test.ts +0 -99
- package/src/features/profile/__tests__/profile.helpers.test.ts +0 -57
- package/src/features/profile/components/actions/ProfileActions.tsx +0 -65
- package/src/features/profile/components/cards/ProfileCard.tsx +0 -53
- package/src/features/profile/components/info/AccountInfoCard.tsx +0 -73
- package/src/features/profile/components/modals/JoinClassModal.tsx +0 -145
- package/src/features/profile/components/modals/LogoutConfirmModal.tsx +0 -64
- package/src/features/profile/components/modals/TranslationLanguageModal.tsx +0 -124
- package/src/features/profile/components/settings/LanguageSettingsCard.tsx +0 -16
- package/src/features/profile/components/settings/PreferencesCard.tsx +0 -68
- package/src/features/profile/components/settings/SettingRow.tsx +0 -42
- package/src/features/profile/components/settings/TextSettingsCard.tsx +0 -61
- package/src/features/profile/components/settings/TextSizeSlider.tsx +0 -110
- package/src/features/profile/components/settings/TextToSpeechRow.tsx +0 -24
- package/src/features/profile/components/settings/TranslationLanguageRow.tsx +0 -58
- package/src/features/profile/context/ProfileContext.tsx +0 -24
- package/src/features/profile/index.ts +0 -11
- package/src/features/profile/model/ProfileApi.ts +0 -23
- package/src/features/profile/model/ProfileJoinClassModel.ts +0 -58
- package/src/features/profile/model/ProfileLanguageModel.ts +0 -26
- package/src/features/profile/model/ProfileModel.ts +0 -57
- package/src/features/profile/model/profileModal.types.ts +0 -16
- package/src/features/profile/shared/JoinClassError.ts +0 -7
- package/src/features/profile/shared/profile.constants.ts +0 -23
- package/src/features/profile/shared/profile.helpers.ts +0 -36
- package/src/features/profile/shared/profile.types.ts +0 -34
|
@@ -9,6 +9,10 @@ exports.TreeNormalizer = void 0;
|
|
|
9
9
|
* making them impossible to open in the solving flow. This normalizer strips those skills
|
|
10
10
|
* and cascades the cleanup - removing standards, domains, etc. that end up empty.
|
|
11
11
|
*
|
|
12
|
+
* It also de-duplicates skill ids within a node: the API tree can list the same skill twice,
|
|
13
|
+
* which inflates a standard's denominator (achieved/total) and leaves a finished standard
|
|
14
|
+
* stuck below 100%, e.g. 18 unique skills counted as 18/19. (students-web#4038)
|
|
15
|
+
*
|
|
12
16
|
* Acts as a single place to sanitize the tree API response before it enters the app.
|
|
13
17
|
* Can be extended with additional normalizations as new edge cases arise.
|
|
14
18
|
*/
|
|
@@ -33,7 +37,7 @@ class TreeNormalizer {
|
|
|
33
37
|
const emptyIds = this.getEmptyNodeIds(treeMapping, validIds);
|
|
34
38
|
return Object.fromEntries(Object.entries(treeMapping).filter(([id]) => !emptyIds.has(id)).map(([id, node]) => [id, {
|
|
35
39
|
...node,
|
|
36
|
-
skills: node.skills.filter(sid => validIds.has(sid)),
|
|
40
|
+
skills: [...new Set(node.skills.filter(sid => validIds.has(sid)))],
|
|
37
41
|
children: node.children.filter(cid => !emptyIds.has(cid))
|
|
38
42
|
}]));
|
|
39
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TreeNormalizer","normalize","response","skillsMapping","getOnlyValidSkills","validIds","Set","Object","keys","treeMapping","removeEmptyNodes","isSkillValid","skill","Boolean","ability","sectionId","functionName","mapping","fromEntries","entries","filter","emptyIds","getEmptyNodeIds","id","has","map","node","skills","sid","children","cid","empty","leafToRoot","sort","a","b","parents","length","isEmptyLeaf","every","s","isEmptyParent","c","add","exports"],"sourceRoot":"../../../../../src","sources":["features/pmProgress/shared/TreeNormalizer.ts"],"mappings":";;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,CAAC;EAC1B,OAAOC,SAASA,CAACC,QAA6B,EAAuB;IACnE,MAAMC,aAAa,GAAG,IAAI,CAACC,kBAAkB,CAACF,QAAQ,CAACC,aAAa,CAAC;IACrE,MAAME,QAAQ,GAAG,IAAIC,GAAG,CAACC,MAAM,CAACC,IAAI,CAACL,aAAa,CAAC,CAAC;IACpD,MAAMM,WAAW,GAAG,IAAI,CAACC,gBAAgB,CAACR,QAAQ,CAACO,WAAW,EAAEJ,QAAQ,CAAC;IACzE,OAAO;MAAE,GAAGH,QAAQ;MAAEC,aAAa;MAAEM;IAAY,CAAC;EACpD;EAEA,OAAOE,YAAYA,CAACC,KAAY,EAAE;IAChC,OAAOC,OAAO,CAACD,KAAK,EAAEE,OAAO,KAAKF,KAAK,CAACE,OAAO,CAACC,SAAS,IAAIH,KAAK,CAACE,OAAO,CAACE,YAAY,CAAC,CAAC;EAC3F;EAEA,OAAeZ,kBAAkBA,CAACa,OAAsB,EAAiB;IACvE,OAAOV,MAAM,CAACW,WAAW,CACvBX,MAAM,CAACY,OAAO,CAACF,OAAO,CAAC,CAACG,MAAM,CAAC,CAAC,GAAGR,KAAK,CAAC,KAAK,IAAI,CAACD,YAAY,CAACC,KAAK,CAAC,CACxE,CAAC;EACH;EAEA,OAAeF,gBAAgBA,CAACD,WAAwB,EAAEJ,QAAqB,EAAe;IAC5F,MAAMgB,QAAQ,GAAG,IAAI,CAACC,eAAe,CAACb,WAAW,EAAEJ,QAAQ,CAAC;IAE5D,OAAOE,MAAM,CAACW,WAAW,CACvBX,MAAM,CAACY,OAAO,CAACV,WAAW,CAAC,CACxBW,MAAM,CAAC,CAAC,CAACG,EAAE,CAAC,KAAK,CAACF,QAAQ,CAACG,GAAG,CAACD,EAAE,CAAC,CAAC,CACnCE,GAAG,CAAC,CAAC,CAACF,EAAE,EAAEG,IAAI,CAAC,KAAK,CACnBH,EAAE,EACF;MACE,GAAGG,IAAI;MACPC,MAAM,
|
|
1
|
+
{"version":3,"names":["TreeNormalizer","normalize","response","skillsMapping","getOnlyValidSkills","validIds","Set","Object","keys","treeMapping","removeEmptyNodes","isSkillValid","skill","Boolean","ability","sectionId","functionName","mapping","fromEntries","entries","filter","emptyIds","getEmptyNodeIds","id","has","map","node","skills","sid","children","cid","empty","leafToRoot","sort","a","b","parents","length","isEmptyLeaf","every","s","isEmptyParent","c","add","exports"],"sourceRoot":"../../../../../src","sources":["features/pmProgress/shared/TreeNormalizer.ts"],"mappings":";;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,CAAC;EAC1B,OAAOC,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true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "SPECIAL_CHAR_TYPES", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _uiModeHelpers.SPECIAL_CHAR_TYPES;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "UIMode", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function () {
|
|
@@ -17,4 +23,5 @@ Object.defineProperty(exports, "getUIMode", {
|
|
|
17
23
|
});
|
|
18
24
|
var _uiModeConstants = require("./uiMode.constants.js");
|
|
19
25
|
var _getUIMode = require("./getUIMode.js");
|
|
26
|
+
var _uiModeHelpers = require("./uiMode.helpers.js");
|
|
20
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_uiModeConstants","require","_getUIMode"],"sourceRoot":"../../../../src","sources":["features/uiMode/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_uiModeConstants","require","_getUIMode","_uiModeHelpers"],"sourceRoot":"../../../../src","sources":["features/uiMode/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.isSimpleMode = exports.isBelowGradeK2 = exports.getToolbarMode = exports.getAnswerAreaMode = void 0;
|
|
6
|
+
exports.isSimpleMode = exports.isBelowGradeK2 = exports.getToolbarMode = exports.getAnswerAreaMode = exports.SPECIAL_CHAR_TYPES = void 0;
|
|
7
7
|
var _uiModeConstants = require("./uiMode.constants.js");
|
|
8
8
|
var _answerTypes = require("../../types/answerTypes.js");
|
|
9
9
|
var _characterTypes = require("../../types/characterTypes.js");
|
|
@@ -26,12 +26,17 @@ const isSimpleMode = ({
|
|
|
26
26
|
return isBelowGradeK2(user.grade);
|
|
27
27
|
};
|
|
28
28
|
exports.isSimpleMode = isSimpleMode;
|
|
29
|
+
const SPECIAL_CHAR_TYPES = exports.SPECIAL_CHAR_TYPES = [_characterTypes.MyScriptMathCharacterTypes.CURRENCY, _characterTypes.MyScriptMathCharacterTypes.UNITS, _characterTypes.MyScriptMathCharacterTypes.NUMBERS_AND_UNITS, _characterTypes.MyScriptMathCharacterTypes.TIME];
|
|
29
30
|
const getAnswerAreaMode = ({
|
|
30
31
|
practice,
|
|
31
32
|
problem
|
|
32
33
|
}) => {
|
|
33
34
|
const isHandwritingNumbersWhole = problem.answerType === _answerTypes.AnswerType.HANDWRITING && problem.characterType === _characterTypes.MyScriptMathCharacterTypes.NUMBERS_WHOLE;
|
|
34
|
-
if (
|
|
35
|
+
if (problem.hasAnswerVariants || isHandwritingNumbersWhole) {
|
|
36
|
+
return _uiModeConstants.UIMode.SIMPLE;
|
|
37
|
+
}
|
|
38
|
+
const needsSpecialKeyboard = problem.answerType === _answerTypes.AnswerType.HANDWRITING && SPECIAL_CHAR_TYPES.includes(problem.characterType);
|
|
39
|
+
if (practice.isEnabled && !needsSpecialKeyboard) {
|
|
35
40
|
return _uiModeConstants.UIMode.SIMPLE;
|
|
36
41
|
}
|
|
37
42
|
return _uiModeConstants.UIMode.REGULAR;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_uiModeConstants","require","_answerTypes","_characterTypes","_reactNativeDrawBoard","_frontendConfig","isValidGrade","grade","undefined","INVALID_GRADE","isBelowGradeK2","GRADE_K2","exports","isSimpleMode","user","practice","assignment","isEnabled","getAnswerAreaMode","problem","isHandwritingNumbersWhole","answerType","AnswerType","HANDWRITING","characterType","
|
|
1
|
+
{"version":3,"names":["_uiModeConstants","require","_answerTypes","_characterTypes","_reactNativeDrawBoard","_frontendConfig","isValidGrade","grade","undefined","INVALID_GRADE","isBelowGradeK2","GRADE_K2","exports","isSimpleMode","user","practice","assignment","isEnabled","SPECIAL_CHAR_TYPES","MyScriptMathCharacterTypes","CURRENCY","UNITS","NUMBERS_AND_UNITS","TIME","getAnswerAreaMode","problem","isHandwritingNumbersWhole","answerType","AnswerType","HANDWRITING","characterType","NUMBERS_WHOLE","hasAnswerVariants","UIMode","SIMPLE","needsSpecialKeyboard","includes","REGULAR","getToolbarMode","isSimpleModeGrade","locale","isUSOrCA","Locale","US","CA","gradeThreshold","isAdvanced","ToolBarVariants","ADVANCED","COMMON"],"sourceRoot":"../../../../src","sources":["features/uiMode/uiMode.helpers.ts"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAQA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AAEA,MAAMK,YAAY,GAAIC,KAAY,IAAsB;EACtD,OAAOA,KAAK,KAAKC,SAAS,IAAID,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAKE,8BAAa;AACzE,CAAC;AAEM,MAAMC,cAAc,GAAIH,KAAY,IAAK;EAC9C,OAAOD,YAAY,CAACC,KAAK,CAAC,IAAIA,KAAK,IAAI,CAAC,IAAIA,KAAK,IAAII,yBAAQ;AAC/D,CAAC;AAAAC,OAAA,CAAAF,cAAA,GAAAA,cAAA;AAEM,MAAMG,YAAY,GAAGA,CAAC;EAAEC,IAAI;EAAEC,QAAQ;EAAEC;AAA8B,CAAC,KAAK;EACjF,IAAID,QAAQ,CAACE,SAAS,EAAE,OAAOP,cAAc,CAACK,QAAQ,CAACR,KAAK,CAAC;EAC7D,IAAI,CAACD,YAAY,CAACQ,IAAI,CAACP,KAAK,CAAC,EAAE,OAAOG,cAAc,CAACM,UAAU,CAACT,KAAK,CAAC;EACtE,OAAOG,cAAc,CAACI,IAAI,CAACP,KAAK,CAAC;AACnC,CAAC;AAAAK,OAAA,CA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B,EAAE,OAAOQ,qCAAe,CAACb,MAAM;EACpD,OAAOa,qCAAe,CAACE,MAAM;AAC/B,CAAC;AAAArC,OAAA,CAAA0B,cAAA,GAAAA,cAAA","ignoreList":[]}
|
package/dist/commonjs/index.js
CHANGED
|
@@ -217,16 +217,4 @@ Object.keys(_index17).forEach(function (key) {
|
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
219
|
});
|
|
220
|
-
var _index18 = require("./features/profile/index.js");
|
|
221
|
-
Object.keys(_index18).forEach(function (key) {
|
|
222
|
-
if (key === "default" || key === "__esModule") return;
|
|
223
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
224
|
-
if (key in exports && exports[key] === _index18[key]) return;
|
|
225
|
-
Object.defineProperty(exports, key, {
|
|
226
|
-
enumerable: true,
|
|
227
|
-
get: function () {
|
|
228
|
-
return _index18[key];
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
});
|
|
232
220
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_helpers","require","_index","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_index2","_index3","_index4","_index5","_index6","_index7","_index8","_index9","_index10","_index11","_index12","_index13","_index14","_index15","_index16","_index17"
|
|
1
|
+
{"version":3,"names":["_helpers","require","_index","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_index2","_index3","_index4","_index5","_index6","_index7","_index8","_index9","_index10","_index11","_index12","_index13","_index14","_index15","_index16","_index17"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA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AAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAgB,QAAA,CAAAxB,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
* making them impossible to open in the solving flow. This normalizer strips those skills
|
|
6
6
|
* and cascades the cleanup - removing standards, domains, etc. that end up empty.
|
|
7
7
|
*
|
|
8
|
+
* It also de-duplicates skill ids within a node: the API tree can list the same skill twice,
|
|
9
|
+
* which inflates a standard's denominator (achieved/total) and leaves a finished standard
|
|
10
|
+
* stuck below 100%, e.g. 18 unique skills counted as 18/19. (students-web#4038)
|
|
11
|
+
*
|
|
8
12
|
* Acts as a single place to sanitize the tree API response before it enters the app.
|
|
9
13
|
* Can be extended with additional normalizations as new edge cases arise.
|
|
10
14
|
*/
|
|
@@ -29,7 +33,7 @@ export class TreeNormalizer {
|
|
|
29
33
|
const emptyIds = this.getEmptyNodeIds(treeMapping, validIds);
|
|
30
34
|
return Object.fromEntries(Object.entries(treeMapping).filter(([id]) => !emptyIds.has(id)).map(([id, node]) => [id, {
|
|
31
35
|
...node,
|
|
32
|
-
skills: node.skills.filter(sid => validIds.has(sid)),
|
|
36
|
+
skills: [...new Set(node.skills.filter(sid => validIds.has(sid)))],
|
|
33
37
|
children: node.children.filter(cid => !emptyIds.has(cid))
|
|
34
38
|
}]));
|
|
35
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TreeNormalizer","normalize","response","skillsMapping","getOnlyValidSkills","validIds","Set","Object","keys","treeMapping","removeEmptyNodes","isSkillValid","skill","Boolean","ability","sectionId","functionName","mapping","fromEntries","entries","filter","emptyIds","getEmptyNodeIds","id","has","map","node","skills","sid","children","cid","empty","leafToRoot","sort","a","b","parents","length","isEmptyLeaf","every","s","isEmptyParent","c","add"],"sourceRoot":"../../../../../src","sources":["features/pmProgress/shared/TreeNormalizer.ts"],"mappings":";;AAIA;AACA;AACA;A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ACPC,MAAM,
|
|
1
|
+
{"version":3,"names":["TreeNormalizer","normalize","response","skillsMapping","getOnlyValidSkills","validIds","Set","Object","keys","treeMapping","removeEmptyNodes","isSkillValid","skill","Boolean","ability","sectionId","functionName","mapping","fromEntries","entries","filter","emptyIds","getEmptyNodeIds","id","has","map","node","skills","sid","children","cid","empty","leafToRoot","sort","a","b","parents","length","isEmptyLeaf","every","s","isEmptyParent","c","add"],"sourceRoot":"../../../../../src","sources":["features/pmProgress/shared/TreeNormalizer.ts"],"mappings":";;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,CAAC;EAC1B,OAAOC,SAASA,CAACC,QAA6B,EAAuB;IACnE,MAAMC,aAAa,GAAG,IAAI,CAACC,kBAAkB,CAACF,QAAQ,CAACC,aAAa,CAAC;IACrE,MAAME,QAAQ,GAAG,IAAIC,GAAG,CAACC,MAAM,CAACC,IAAI,CAACL,aAAa,CAAC,CAAC;IACpD,MAAMM,WAAW,GAAG,IAAI,CAACC,gBAAgB,CAACR,QAAQ,CAACO,WAAW,EAAEJ,QAAQ,CAAC;IACzE,OAAO;MAAE,GAAGH,QAAQ;MAAEC,aAAa;MAAEM;IAAY,CAAC;EACpD;EAEA,OAAOE,YAAYA,CAACC,KAAY,EAAE;IAChC,OAAOC,OAAO,CAACD,KAAK,EAAEE,OAAO,KAAKF,KAAK,CAACE,OAAO,CAACC,SAAS,IAAIH,KAAK,CAACE,OAAO,CAACE,YAAY,CAAC,CAAC;EAC3F;EAEA,OAAeZ,kBAAkBA,CAACa,OAAsB,EAAiB;IACvE,OAAOV,MAAM,CAACW,WAAW,CACvBX,MAAM,CAACY,OAAO,CAACF,OAAO,CAAC,CAACG,MAAM,CAAC,CAAC,GAAGR,KAAK,CAAC,KAAK,IAAI,CAACD,YAAY,CAACC,KAAK,CAAC,CACxE,CAAC;EACH;EAEA,OAAeF,gBAAgBA,CAACD,WAAwB,EAAEJ,QAAqB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CAAC,CAAC;MACxF,MAAMC,aAAa,GAAGf,IAAI,CAACG,QAAQ,CAACQ,MAAM,GAAG,CAAC,IAAIX,IAAI,CAACG,QAAQ,CAACU,KAAK,CAAEG,CAAC,IAAKX,KAAK,CAACP,GAAG,CAACkB,CAAC,CAAC,CAAC;MAE1F,IAAIJ,WAAW,IAAIG,aAAa,EAAEV,KAAK,CAACY,GAAG,CAACpB,EAAE,CAAC;IACjD;IAEA,OAAOQ,KAAK;EACd;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["UIMode","getUIMode"],"sourceRoot":"../../../../src","sources":["features/uiMode/index.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,uBAAoB;AAC3C,SAASC,SAAS,QAAQ,gBAAa","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["UIMode","getUIMode","SPECIAL_CHAR_TYPES"],"sourceRoot":"../../../../src","sources":["features/uiMode/index.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,uBAAoB;AAC3C,SAASC,SAAS,QAAQ,gBAAa;AACvC,SAASC,kBAAkB,QAAQ,qBAAkB","ignoreList":[]}
|
|
@@ -20,12 +20,17 @@ export const isSimpleMode = ({
|
|
|
20
20
|
if (!isValidGrade(user.grade)) return isBelowGradeK2(assignment.grade);
|
|
21
21
|
return isBelowGradeK2(user.grade);
|
|
22
22
|
};
|
|
23
|
+
export const SPECIAL_CHAR_TYPES = [MyScriptMathCharacterTypes.CURRENCY, MyScriptMathCharacterTypes.UNITS, MyScriptMathCharacterTypes.NUMBERS_AND_UNITS, MyScriptMathCharacterTypes.TIME];
|
|
23
24
|
export const getAnswerAreaMode = ({
|
|
24
25
|
practice,
|
|
25
26
|
problem
|
|
26
27
|
}) => {
|
|
27
28
|
const isHandwritingNumbersWhole = problem.answerType === AnswerType.HANDWRITING && problem.characterType === MyScriptMathCharacterTypes.NUMBERS_WHOLE;
|
|
28
|
-
if (
|
|
29
|
+
if (problem.hasAnswerVariants || isHandwritingNumbersWhole) {
|
|
30
|
+
return UIMode.SIMPLE;
|
|
31
|
+
}
|
|
32
|
+
const needsSpecialKeyboard = problem.answerType === AnswerType.HANDWRITING && SPECIAL_CHAR_TYPES.includes(problem.characterType);
|
|
33
|
+
if (practice.isEnabled && !needsSpecialKeyboard) {
|
|
29
34
|
return UIMode.SIMPLE;
|
|
30
35
|
}
|
|
31
36
|
return UIMode.REGULAR;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["UIMode","GRADE_K2","INVALID_GRADE","AnswerType","MyScriptMathCharacterTypes","ToolBarVariants","Locale","isValidGrade","grade","undefined","isBelowGradeK2","isSimpleMode","user","practice","assignment","isEnabled","getAnswerAreaMode","problem","isHandwritingNumbersWhole","answerType","HANDWRITING","characterType","NUMBERS_WHOLE","hasAnswerVariants","SIMPLE","REGULAR","getToolbarMode","isSimpleModeGrade","locale","isUSOrCA","US","CA","gradeThreshold","isAdvanced","ADVANCED","COMMON"],"sourceRoot":"../../../../src","sources":["features/uiMode/uiMode.helpers.ts"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,uBAAoB;AAQpE,SAASC,UAAU,QAAQ,4BAAyB;AACpD,SAASC,0BAA0B,QAAQ,+BAA4B;AACvE,SAASC,eAAe,QAAQ,oCAAoC;AACpE,SAASC,MAAM,QAAQ,4BAA4B;AAEnD,MAAMC,YAAY,GAAIC,KAAY,IAAsB;EACtD,OAAOA,KAAK,KAAKC,SAAS,IAAID,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAKN,aAAa;AACzE,CAAC;AAED,OAAO,MAAMQ,cAAc,GAAIF,KAAY,IAAK;EAC9C,OAAOD,YAAY,CAACC,KAAK,CAAC,IAAIA,KAAK,IAAI,CAAC,IAAIA,KAAK,IAAIP,QAAQ;AAC/D,CAAC;AAED,OAAO,MAAMU,YAAY,GAAGA,CAAC;EAAEC,IAAI;EAAEC,QAAQ;EAAEC;AAA8B,CAAC,KAAK;EACjF,IAAID,QAAQ,CAACE,SAAS,EAAE,OAAOL,cAAc,CAACG,QAAQ,CAACL,KAAK,CAAC;EAC7D,IAAI,CAACD,YAAY,CAACK,IAAI,CAACJ,KAAK,CAAC,EAAE,OAAOE,cAAc,CAACI,UAAU,CAACN,KAAK,CAAC;EACtE,OAAOE,cAAc,CAACE,IAAI,CAACJ,KAAK,CAAC;AACnC,CAAC;AAED,OAAO,MAAMQ,iBAAiB,GAAGA,CAAC;
|
|
1
|
+
{"version":3,"names":["UIMode","GRADE_K2","INVALID_GRADE","AnswerType","MyScriptMathCharacterTypes","ToolBarVariants","Locale","isValidGrade","grade","undefined","isBelowGradeK2","isSimpleMode","user","practice","assignment","isEnabled","SPECIAL_CHAR_TYPES","CURRENCY","UNITS","NUMBERS_AND_UNITS","TIME","getAnswerAreaMode","problem","isHandwritingNumbersWhole","answerType","HANDWRITING","characterType","NUMBERS_WHOLE","hasAnswerVariants","SIMPLE","needsSpecialKeyboard","includes","REGULAR","getToolbarMode","isSimpleModeGrade","locale","isUSOrCA","US","CA","gradeThreshold","isAdvanced","ADVANCED","COMMON"],"sourceRoot":"../../../../src","sources":["features/uiMode/uiMode.helpers.ts"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,uBAAoB;AAQpE,SAASC,UAAU,QAAQ,4BAAyB;AACpD,SAASC,0BAA0B,QAAQ,+BAA4B;AACvE,SAASC,eAAe,QAAQ,oCAAoC;AACpE,SAASC,MAAM,QAAQ,4BAA4B;AAEnD,MAAMC,YAAY,GAAIC,KAAY,IAAsB;EACtD,OAAOA,KAAK,KAAKC,SAAS,IAAID,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAKN,aAAa;AACzE,CAAC;AAED,OAAO,MAAMQ,cAAc,GAAIF,KAAY,IAAK;EAC9C,OAAOD,YAAY,CAACC,KAAK,CAAC,IAAIA,KAAK,IAAI,CAAC,IAAIA,KAAK,IAAIP,QAAQ;AAC/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KAAK7B,MAAM,CAAC+B,EAAE,IAAIF,MAAM,KAAK7B,MAAM,CAACgC,EAAE;EAC7D,MAAMC,cAAc,GAAGH,QAAQ,GAAG,CAAC,GAAG,CAAC;EACvC,MAAMI,UAAU,GAAGjC,YAAY,CAACC,KAAK,CAAC,IAAIA,KAAK,IAAI+B,cAAc;EAEjE,IAAIC,UAAU,EAAE,OAAOnC,eAAe,CAACoC,QAAQ;EAC/C,IAAIP,iBAAiB,EAAE,OAAO7B,eAAe,CAACwB,MAAM;EACpD,OAAOxB,eAAe,CAACqC,MAAM;AAC/B,CAAC","ignoreList":[]}
|
package/dist/module/index.js
CHANGED
|
@@ -18,5 +18,4 @@ export * from "./features/uiMode/index.js";
|
|
|
18
18
|
export * from "./features/fluency/index.js";
|
|
19
19
|
export * from "./features/fluency-teacher/index.js";
|
|
20
20
|
export * from "./features/translation/index.js";
|
|
21
|
-
export * from "./features/profile/index.js";
|
|
22
21
|
//# sourceMappingURL=index.js.map
|
package/dist/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,0BAAuB;AACxD,cAAc,6BAAoB;AAClC,cAAc,8BAAqB;AACnC,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,qCAA4B;AAC1C,cAAc,8BAAqB;AACnC,cAAc,gCAAuB;AACrC,cAAc,+BAAsB;AACpC,cAAc,yBAAgB;AAC9B,cAAc,2BAAkB;AAChC,cAAc,kCAAyB;AACvC,cAAc,4BAAmB;AACjC,cAAc,6BAAoB;AAClC,cAAc,qCAA4B;AAC1C,cAAc,iCAAwB
|
|
1
|
+
{"version":3,"names":["generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,0BAAuB;AACxD,cAAc,6BAAoB;AAClC,cAAc,8BAAqB;AACnC,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,qCAA4B;AAC1C,cAAc,8BAAqB;AACnC,cAAc,gCAAuB;AACrC,cAAc,+BAAsB;AACpC,cAAc,yBAAgB;AAC9B,cAAc,2BAAkB;AAChC,cAAc,kCAAyB;AACvC,cAAc,4BAAmB;AACjC,cAAc,6BAAoB;AAClC,cAAc,qCAA4B;AAC1C,cAAc,iCAAwB","ignoreList":[]}
|
|
@@ -4,6 +4,10 @@ import type { Skill, TreeMappingResponse } from './pmProgress.types';
|
|
|
4
4
|
* making them impossible to open in the solving flow. This normalizer strips those skills
|
|
5
5
|
* and cascades the cleanup - removing standards, domains, etc. that end up empty.
|
|
6
6
|
*
|
|
7
|
+
* It also de-duplicates skill ids within a node: the API tree can list the same skill twice,
|
|
8
|
+
* which inflates a standard's denominator (achieved/total) and leaves a finished standard
|
|
9
|
+
* stuck below 100%, e.g. 18 unique skills counted as 18/19. (students-web#4038)
|
|
10
|
+
*
|
|
7
11
|
* Acts as a single place to sanitize the tree API response before it enters the app.
|
|
8
12
|
* Can be extended with additional normalizations as new edge cases arise.
|
|
9
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNormalizer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/shared/TreeNormalizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAiB,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAInF
|
|
1
|
+
{"version":3,"file":"TreeNormalizer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/shared/TreeNormalizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAiB,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAInF;;;;;;;;;;;GAWG;AACH,qBAAa,cAAc;IACzB,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,mBAAmB,GAAG,mBAAmB;IAOpE,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK;IAIhC,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAMjC,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAiB/B,OAAO,CAAC,MAAM,CAAC,eAAe;CAgB/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/uiMode/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/uiMode/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { UIMode } from './uiMode.constants';
|
|
2
2
|
import { GetAnswerAreaModeProps, GetToolbarModeProps, Grade, IsSimpleModeProps } from './uiMode.types';
|
|
3
|
+
import { MyScriptMathCharacterTypes } from '../../types/characterTypes';
|
|
3
4
|
import { ToolBarVariants } from '@magmamath/react-native-draw-board';
|
|
4
5
|
export declare const isBelowGradeK2: (grade: Grade) => boolean;
|
|
5
6
|
export declare const isSimpleMode: ({ user, practice, assignment }: IsSimpleModeProps) => boolean;
|
|
7
|
+
export declare const SPECIAL_CHAR_TYPES: MyScriptMathCharacterTypes[];
|
|
6
8
|
export declare const getAnswerAreaMode: ({ practice, problem }: GetAnswerAreaModeProps) => UIMode;
|
|
7
9
|
export declare const getToolbarMode: ({ isSimpleModeGrade, grade, locale, }: GetToolbarModeProps) => ToolBarVariants;
|
|
8
10
|
//# sourceMappingURL=uiMode.helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uiMode.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/uiMode/uiMode.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,oBAAoB,CAAA;AACpE,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,EACL,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"uiMode.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/uiMode/uiMode.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,oBAAoB,CAAA;AACpE,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,EACL,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;AAGvB,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAOpE,eAAO,MAAM,cAAc,UAAW,KAAK,YAE1C,CAAA;AAED,eAAO,MAAM,YAAY,mCAAoC,iBAAiB,YAI7E,CAAA;AAED,eAAO,MAAM,kBAAkB,8BAK9B,CAAA;AAED,eAAO,MAAM,iBAAiB,0BAA2B,sBAAsB,KAAG,MAkBjF,CAAA;AAED,eAAO,MAAM,cAAc,0CAIxB,mBAAmB,KAAG,eAQxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA"}
|
|
@@ -4,6 +4,10 @@ import type { Skill, TreeMappingResponse } from './pmProgress.types';
|
|
|
4
4
|
* making them impossible to open in the solving flow. This normalizer strips those skills
|
|
5
5
|
* and cascades the cleanup - removing standards, domains, etc. that end up empty.
|
|
6
6
|
*
|
|
7
|
+
* It also de-duplicates skill ids within a node: the API tree can list the same skill twice,
|
|
8
|
+
* which inflates a standard's denominator (achieved/total) and leaves a finished standard
|
|
9
|
+
* stuck below 100%, e.g. 18 unique skills counted as 18/19. (students-web#4038)
|
|
10
|
+
*
|
|
7
11
|
* Acts as a single place to sanitize the tree API response before it enters the app.
|
|
8
12
|
* Can be extended with additional normalizations as new edge cases arise.
|
|
9
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNormalizer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/shared/TreeNormalizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAiB,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAInF
|
|
1
|
+
{"version":3,"file":"TreeNormalizer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/shared/TreeNormalizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAiB,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAInF;;;;;;;;;;;GAWG;AACH,qBAAa,cAAc;IACzB,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,mBAAmB,GAAG,mBAAmB;IAOpE,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK;IAIhC,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAMjC,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAiB/B,OAAO,CAAC,MAAM,CAAC,eAAe;CAgB/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/uiMode/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/uiMode/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { UIMode } from './uiMode.constants';
|
|
2
2
|
import { GetAnswerAreaModeProps, GetToolbarModeProps, Grade, IsSimpleModeProps } from './uiMode.types';
|
|
3
|
+
import { MyScriptMathCharacterTypes } from '../../types/characterTypes';
|
|
3
4
|
import { ToolBarVariants } from '@magmamath/react-native-draw-board';
|
|
4
5
|
export declare const isBelowGradeK2: (grade: Grade) => boolean;
|
|
5
6
|
export declare const isSimpleMode: ({ user, practice, assignment }: IsSimpleModeProps) => boolean;
|
|
7
|
+
export declare const SPECIAL_CHAR_TYPES: MyScriptMathCharacterTypes[];
|
|
6
8
|
export declare const getAnswerAreaMode: ({ practice, problem }: GetAnswerAreaModeProps) => UIMode;
|
|
7
9
|
export declare const getToolbarMode: ({ isSimpleModeGrade, grade, locale, }: GetToolbarModeProps) => ToolBarVariants;
|
|
8
10
|
//# sourceMappingURL=uiMode.helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uiMode.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/uiMode/uiMode.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,oBAAoB,CAAA;AACpE,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,EACL,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"uiMode.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/uiMode/uiMode.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,oBAAoB,CAAA;AACpE,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,EACL,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;AAGvB,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAOpE,eAAO,MAAM,cAAc,UAAW,KAAK,YAE1C,CAAA;AAED,eAAO,MAAM,YAAY,mCAAoC,iBAAiB,YAI7E,CAAA;AAED,eAAO,MAAM,kBAAkB,8BAK9B,CAAA;AAED,eAAO,MAAM,iBAAiB,0BAA2B,sBAAsB,KAAG,MAkBjF,CAAA;AAED,eAAO,MAAM,cAAc,0CAIxB,mBAAmB,KAAG,eAQxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magmamath/students-features",
|
|
3
|
-
"version": "1.8.4
|
|
3
|
+
"version": "1.8.4",
|
|
4
4
|
"description": "Magmamath features library",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"pull-translations": "node scripts/pullTranslations.mjs"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@magmamath/frontend-config": ">=1.7.
|
|
49
|
+
"@magmamath/frontend-config": ">=1.7.2",
|
|
50
50
|
"@magmamath/react-native-draw-board": "*",
|
|
51
51
|
"@magmamath/react-native-ui": "*",
|
|
52
52
|
"@magmamath/students-qa": "*",
|
|
@@ -144,8 +144,5 @@
|
|
|
144
144
|
"languages": "js",
|
|
145
145
|
"type": "library",
|
|
146
146
|
"version": "0.44.3"
|
|
147
|
-
},
|
|
148
|
-
"dependencies": {
|
|
149
|
-
"react-native-confirmation-code-field": "^8.0.0"
|
|
150
147
|
}
|
|
151
148
|
}
|
|
@@ -7,6 +7,10 @@ type TreeMapping = TreeMappingResponse['treeMapping']
|
|
|
7
7
|
* making them impossible to open in the solving flow. This normalizer strips those skills
|
|
8
8
|
* and cascades the cleanup - removing standards, domains, etc. that end up empty.
|
|
9
9
|
*
|
|
10
|
+
* It also de-duplicates skill ids within a node: the API tree can list the same skill twice,
|
|
11
|
+
* which inflates a standard's denominator (achieved/total) and leaves a finished standard
|
|
12
|
+
* stuck below 100%, e.g. 18 unique skills counted as 18/19. (students-web#4038)
|
|
13
|
+
*
|
|
10
14
|
* Acts as a single place to sanitize the tree API response before it enters the app.
|
|
11
15
|
* Can be extended with additional normalizations as new edge cases arise.
|
|
12
16
|
*/
|
|
@@ -38,7 +42,7 @@ export class TreeNormalizer {
|
|
|
38
42
|
id,
|
|
39
43
|
{
|
|
40
44
|
...node,
|
|
41
|
-
skills: node.skills.filter((sid) => validIds.has(sid)),
|
|
45
|
+
skills: [...new Set(node.skills.filter((sid) => validIds.has(sid)))],
|
|
42
46
|
children: node.children.filter((cid) => !emptyIds.has(cid)),
|
|
43
47
|
},
|
|
44
48
|
]),
|
|
@@ -362,3 +362,67 @@ describe('answer area is SIMPLE only in simple mode when practicing, has variant
|
|
|
362
362
|
expect(result.answerArea).toBe(UIMode.REGULAR)
|
|
363
363
|
})
|
|
364
364
|
})
|
|
365
|
+
|
|
366
|
+
describe('K2 student in PM with special char types gets REGULAR answer area (special keyboard must show)', () => {
|
|
367
|
+
const k2PmBase = { practice: { isEnabled: true, grade: 1 } }
|
|
368
|
+
|
|
369
|
+
it('CURRENCY characterType → REGULAR', () => {
|
|
370
|
+
const result = getUIModeWithDefaults({
|
|
371
|
+
...k2PmBase,
|
|
372
|
+
problem: {
|
|
373
|
+
answerType: AnswerType.HANDWRITING,
|
|
374
|
+
characterType: MyScriptMathCharacterTypes.CURRENCY,
|
|
375
|
+
hasAnswerVariants: false,
|
|
376
|
+
},
|
|
377
|
+
})
|
|
378
|
+
expect(result.answerArea).toBe(UIMode.REGULAR)
|
|
379
|
+
})
|
|
380
|
+
|
|
381
|
+
it('UNITS characterType → REGULAR', () => {
|
|
382
|
+
const result = getUIModeWithDefaults({
|
|
383
|
+
...k2PmBase,
|
|
384
|
+
problem: {
|
|
385
|
+
answerType: AnswerType.HANDWRITING,
|
|
386
|
+
characterType: MyScriptMathCharacterTypes.UNITS,
|
|
387
|
+
hasAnswerVariants: false,
|
|
388
|
+
},
|
|
389
|
+
})
|
|
390
|
+
expect(result.answerArea).toBe(UIMode.REGULAR)
|
|
391
|
+
})
|
|
392
|
+
|
|
393
|
+
it('NUMBERS_AND_UNITS characterType → REGULAR', () => {
|
|
394
|
+
const result = getUIModeWithDefaults({
|
|
395
|
+
...k2PmBase,
|
|
396
|
+
problem: {
|
|
397
|
+
answerType: AnswerType.HANDWRITING,
|
|
398
|
+
characterType: MyScriptMathCharacterTypes.NUMBERS_AND_UNITS,
|
|
399
|
+
hasAnswerVariants: false,
|
|
400
|
+
},
|
|
401
|
+
})
|
|
402
|
+
expect(result.answerArea).toBe(UIMode.REGULAR)
|
|
403
|
+
})
|
|
404
|
+
|
|
405
|
+
it('TIME characterType → REGULAR', () => {
|
|
406
|
+
const result = getUIModeWithDefaults({
|
|
407
|
+
...k2PmBase,
|
|
408
|
+
problem: {
|
|
409
|
+
answerType: AnswerType.HANDWRITING,
|
|
410
|
+
characterType: MyScriptMathCharacterTypes.TIME,
|
|
411
|
+
hasAnswerVariants: false,
|
|
412
|
+
},
|
|
413
|
+
})
|
|
414
|
+
expect(result.answerArea).toBe(UIMode.REGULAR)
|
|
415
|
+
})
|
|
416
|
+
|
|
417
|
+
it('DEFAULT characterType → still SIMPLE (regression guard)', () => {
|
|
418
|
+
const result = getUIModeWithDefaults({
|
|
419
|
+
...k2PmBase,
|
|
420
|
+
problem: {
|
|
421
|
+
answerType: AnswerType.HANDWRITING,
|
|
422
|
+
characterType: MyScriptMathCharacterTypes.DEFAULT,
|
|
423
|
+
hasAnswerVariants: false,
|
|
424
|
+
},
|
|
425
|
+
})
|
|
426
|
+
expect(result.answerArea).toBe(UIMode.SIMPLE)
|
|
427
|
+
})
|
|
428
|
+
})
|
|
@@ -25,12 +25,27 @@ export const isSimpleMode = ({ user, practice, assignment }: IsSimpleModeProps)
|
|
|
25
25
|
return isBelowGradeK2(user.grade)
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
export const SPECIAL_CHAR_TYPES = [
|
|
29
|
+
MyScriptMathCharacterTypes.CURRENCY,
|
|
30
|
+
MyScriptMathCharacterTypes.UNITS,
|
|
31
|
+
MyScriptMathCharacterTypes.NUMBERS_AND_UNITS,
|
|
32
|
+
MyScriptMathCharacterTypes.TIME,
|
|
33
|
+
]
|
|
34
|
+
|
|
28
35
|
export const getAnswerAreaMode = ({ practice, problem }: GetAnswerAreaModeProps): UIMode => {
|
|
29
36
|
const isHandwritingNumbersWhole =
|
|
30
37
|
problem.answerType === AnswerType.HANDWRITING &&
|
|
31
38
|
problem.characterType === MyScriptMathCharacterTypes.NUMBERS_WHOLE
|
|
32
39
|
|
|
33
|
-
if (
|
|
40
|
+
if (problem.hasAnswerVariants || isHandwritingNumbersWhole) {
|
|
41
|
+
return UIMode.SIMPLE
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const needsSpecialKeyboard =
|
|
45
|
+
problem.answerType === AnswerType.HANDWRITING &&
|
|
46
|
+
SPECIAL_CHAR_TYPES.includes(problem.characterType)
|
|
47
|
+
|
|
48
|
+
if (practice.isEnabled && !needsSpecialKeyboard) {
|
|
34
49
|
return UIMode.SIMPLE
|
|
35
50
|
}
|
|
36
51
|
|
|
@@ -56,20 +56,13 @@
|
|
|
56
56
|
},
|
|
57
57
|
"profile": {
|
|
58
58
|
"accountInfo": "Account info",
|
|
59
|
-
"cancel": "Cancel",
|
|
60
59
|
"changePasswordNote": "Ask your teacher if you need to change password",
|
|
61
60
|
"fullName": "Full name",
|
|
62
61
|
"joinClassButton": "Join new class",
|
|
63
|
-
"joinClassErrorAlreadyJoined": "You have already joined this class",
|
|
64
|
-
"joinClassErrorDefault": "Default error! Code not found",
|
|
65
|
-
"joinClassErrorNotFound": "The class doesn’t exist, try another class code",
|
|
66
|
-
"joinClassErrorOtherDistrict": "You can only join classes in your district",
|
|
67
|
-
"joinClassSuccess": "You have joined class {{className}}",
|
|
68
62
|
"joinClassTitle": "Write your new class code",
|
|
69
63
|
"joinNewClass": "Join a new class",
|
|
70
64
|
"languageSettings": "Language settings",
|
|
71
65
|
"logOut": "Log out",
|
|
72
|
-
"logOutConfirmMessage": "Are you sure you want to log out?",
|
|
73
66
|
"noLanguage": "No language",
|
|
74
67
|
"preferences": "Preferences",
|
|
75
68
|
"school": "School",
|
|
@@ -81,8 +74,7 @@
|
|
|
81
74
|
"textToSpeech": "Text-to-speech",
|
|
82
75
|
"translationLanguage": "Translation language",
|
|
83
76
|
"translationModalTitle": "Translation language",
|
|
84
|
-
"username": "Username"
|
|
85
|
-
"yes": "Yes"
|
|
77
|
+
"username": "Username"
|
|
86
78
|
},
|
|
87
79
|
"student": {
|
|
88
80
|
"fluency": {
|
package/src/index.ts
CHANGED