@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
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TranslationLanguageModal = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _effectorReact = require("effector-react");
|
|
10
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
11
|
-
var _i18n = require("../../../../i18n/i18n.js");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
const LIST_HEIGHT = 360;
|
|
15
|
-
const TranslationLanguageModal = ({
|
|
16
|
-
modal: {
|
|
17
|
-
closeModal,
|
|
18
|
-
params
|
|
19
|
-
}
|
|
20
|
-
}) => {
|
|
21
|
-
const t = (0, _i18n.useText)();
|
|
22
|
-
const {
|
|
23
|
-
model
|
|
24
|
-
} = params;
|
|
25
|
-
const {
|
|
26
|
-
search,
|
|
27
|
-
languages,
|
|
28
|
-
settings
|
|
29
|
-
} = (0, _effectorReact.useUnit)({
|
|
30
|
-
search: model.language.$search,
|
|
31
|
-
languages: model.language.$languages,
|
|
32
|
-
settings: model.$settings
|
|
33
|
-
});
|
|
34
|
-
const closeAndReset = () => {
|
|
35
|
-
model.language.reset();
|
|
36
|
-
closeModal();
|
|
37
|
-
};
|
|
38
|
-
const selectLanguage = language => {
|
|
39
|
-
model.language.selectLanguage(language);
|
|
40
|
-
closeAndReset();
|
|
41
|
-
};
|
|
42
|
-
const items = languages.map(language => ({
|
|
43
|
-
id: language,
|
|
44
|
-
label: language,
|
|
45
|
-
radio: true,
|
|
46
|
-
color: _reactNativeUi.CheckboxColor.ORANGE
|
|
47
|
-
}));
|
|
48
|
-
const selectedItems = items.filter(item => item.id === settings.translationLanguage);
|
|
49
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.BaseModal, {
|
|
50
|
-
onClose: closeAndReset,
|
|
51
|
-
style: modalStyle,
|
|
52
|
-
header: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
53
|
-
style: styles.header,
|
|
54
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
55
|
-
variant: _reactNativeUi.HeadingVariants.H2,
|
|
56
|
-
align: "center",
|
|
57
|
-
style: styles.title,
|
|
58
|
-
children: t('profile.translationModalTitle')
|
|
59
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Search, {
|
|
60
|
-
nativeID: "translation-language-search",
|
|
61
|
-
value: search,
|
|
62
|
-
onChangeText: model.language.setSearch,
|
|
63
|
-
placeholder: t('profile.search'),
|
|
64
|
-
containerStyle: styles.search
|
|
65
|
-
})]
|
|
66
|
-
}),
|
|
67
|
-
content: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
68
|
-
style: styles.content,
|
|
69
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Checkbox, {
|
|
70
|
-
radio: true,
|
|
71
|
-
label: t('profile.noLanguage'),
|
|
72
|
-
checked: !settings.translationLanguage,
|
|
73
|
-
color: _reactNativeUi.CheckboxColor.ORANGE,
|
|
74
|
-
style: noLanguageStyle,
|
|
75
|
-
onPress: () => selectLanguage(null)
|
|
76
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
77
|
-
style: styles.divider
|
|
78
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.CheckboxGroup, {
|
|
79
|
-
items: items,
|
|
80
|
-
selectedItems: selectedItems,
|
|
81
|
-
initialNumToRender: items.length,
|
|
82
|
-
style: listStyle,
|
|
83
|
-
onPress: item => selectLanguage(languages.find(language => language === item.id) ?? null)
|
|
84
|
-
})]
|
|
85
|
-
})
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
exports.TranslationLanguageModal = TranslationLanguageModal;
|
|
89
|
-
const styles = _reactNative.StyleSheet.create({
|
|
90
|
-
modal: {
|
|
91
|
-
width: 530
|
|
92
|
-
},
|
|
93
|
-
header: {
|
|
94
|
-
gap: _reactNativeUi.SPACING['500']
|
|
95
|
-
},
|
|
96
|
-
title: {
|
|
97
|
-
color: _reactNativeUi.COLORS.NEUTRAL_9
|
|
98
|
-
},
|
|
99
|
-
search: {
|
|
100
|
-
width: '100%'
|
|
101
|
-
},
|
|
102
|
-
content: {
|
|
103
|
-
gap: _reactNativeUi.SPACING['300']
|
|
104
|
-
},
|
|
105
|
-
noLanguage: {
|
|
106
|
-
paddingLeft: _reactNativeUi.SPACING['200']
|
|
107
|
-
},
|
|
108
|
-
divider: {
|
|
109
|
-
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_3,
|
|
110
|
-
height: 1
|
|
111
|
-
},
|
|
112
|
-
list: {
|
|
113
|
-
height: LIST_HEIGHT,
|
|
114
|
-
width: '100%'
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
const modalStyle = {
|
|
118
|
-
container: styles.modal
|
|
119
|
-
};
|
|
120
|
-
const noLanguageStyle = {
|
|
121
|
-
container: styles.noLanguage
|
|
122
|
-
};
|
|
123
|
-
const listStyle = {
|
|
124
|
-
container: styles.list
|
|
125
|
-
};
|
|
126
|
-
//# sourceMappingURL=TranslationLanguageModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_effectorReact","_reactNativeUi","_i18n","_jsxRuntime","e","__esModule","default","LIST_HEIGHT","TranslationLanguageModal","modal","closeModal","params","t","useText","model","search","languages","settings","useUnit","language","$search","$languages","$settings","closeAndReset","reset","selectLanguage","items","map","id","label","radio","color","CheckboxColor","ORANGE","selectedItems","filter","item","translationLanguage","jsx","BaseModal","onClose","style","modalStyle","header","jsxs","View","styles","children","Typography","variant","HeadingVariants","H2","align","title","Search","nativeID","value","onChangeText","setSearch","placeholder","containerStyle","content","Checkbox","checked","noLanguageStyle","onPress","divider","CheckboxGroup","initialNumToRender","length","listStyle","find","exports","StyleSheet","create","width","gap","SPACING","COLORS","NEUTRAL_9","noLanguage","paddingLeft","backgroundColor","NEUTRAL_3","height","list","container"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/modals/TranslationLanguageModal.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBA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,CAAC;AAEF,MAAMjC,UAAU,GAAG;EAAE4C,SAAS,EAAExC,MAAM,CAACrC;AAAM,CAAC;AAC9C,MAAMuD,eAAe,GAAG;EAAEsB,SAAS,EAAExC,MAAM,CAACkC;AAAW,CAAC;AACxD,MAAMV,SAAS,GAAG;EAAEgB,SAAS,EAAExC,MAAM,CAACuC;AAAK,CAAC","ignoreList":[]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.LanguageSettingsCard = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _i18n = require("../../../../i18n/i18n.js");
|
|
9
|
-
var _ProfileCard = require("../cards/ProfileCard.js");
|
|
10
|
-
var _TextToSpeechRow = require("./TextToSpeechRow.js");
|
|
11
|
-
var _TranslationLanguageRow = require("./TranslationLanguageRow.js");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
const LanguageSettingsCard = () => {
|
|
15
|
-
const t = (0, _i18n.useText)();
|
|
16
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ProfileCard.ProfileCard, {
|
|
17
|
-
title: t('profile.languageSettings'),
|
|
18
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TextToSpeechRow.TextToSpeechRow, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TranslationLanguageRow.TranslationLanguageRow, {})]
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
exports.LanguageSettingsCard = LanguageSettingsCard;
|
|
22
|
-
//# sourceMappingURL=LanguageSettingsCard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_i18n","_ProfileCard","_TextToSpeechRow","_TranslationLanguageRow","_jsxRuntime","e","__esModule","default","LanguageSettingsCard","t","useText","jsxs","ProfileCard","title","children","jsx","TextToSpeechRow","TranslationLanguageRow","exports"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/LanguageSettingsCard.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,uBAAA,GAAAJ,OAAA;AAAiE,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE1D,MAAMG,oBAAoB,GAAGA,CAAA,KAAM;EACxC,MAAMC,CAAC,GAAG,IAAAC,aAAO,EAAC,CAAC;EAEnB,oBACE,IAAAN,WAAA,CAAAO,IAAA,EAACV,YAAA,CAAAW,WAAW;IAACC,KAAK,EAAEJ,CAAC,CAAC,0BAA0B,CAAE;IAAAK,QAAA,gBAChD,IAAAV,WAAA,CAAAW,GAAA,EAACb,gBAAA,CAAAc,eAAe,IAAE,CAAC,eACnB,IAAAZ,WAAA,CAAAW,GAAA,EAACZ,uBAAA,CAAAc,sBAAsB,IAAE,CAAC;EAAA,CACf,CAAC;AAElB,CAAC;AAAAC,OAAA,CAAAV,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PreferencesCard = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _effectorReact = require("effector-react");
|
|
10
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
11
|
-
var _i18n = require("../../../../i18n/i18n.js");
|
|
12
|
-
var _ProfileContext = require("../../context/ProfileContext.js");
|
|
13
|
-
var _profileConstants = require("../../shared/profile.constants.js");
|
|
14
|
-
var _ProfileCard = require("../cards/ProfileCard.js");
|
|
15
|
-
var _SettingRow = require("./SettingRow.js");
|
|
16
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
-
const ICON_SIZE = 22;
|
|
19
|
-
const CONTROL_MAX_WIDTH = 248;
|
|
20
|
-
|
|
21
|
-
// Pass the glyph via `title` (children), not `icon`: an icon-only Button locks to a fixed
|
|
22
|
-
// square and collapses the SelectOption's flex stretch.
|
|
23
|
-
// TODO: replace CalculatorIcon with a dedicated KeyboardIcon once rn-ui ships one.
|
|
24
|
-
const CANVAS_OPTIONS = [{
|
|
25
|
-
key: String(_profileConstants.ProfileCanvasType.DRAWING),
|
|
26
|
-
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.PencilIcon, {
|
|
27
|
-
size: ICON_SIZE,
|
|
28
|
-
color: _reactNativeUi.COLORS.NEUTRAL_9
|
|
29
|
-
})
|
|
30
|
-
}, {
|
|
31
|
-
key: String(_profileConstants.ProfileCanvasType.SPREADSHEET),
|
|
32
|
-
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.CalculatorIcon, {
|
|
33
|
-
size: ICON_SIZE,
|
|
34
|
-
color: _reactNativeUi.COLORS.NEUTRAL_9
|
|
35
|
-
})
|
|
36
|
-
}];
|
|
37
|
-
const PreferencesCard = () => {
|
|
38
|
-
const t = (0, _i18n.useText)();
|
|
39
|
-
const {
|
|
40
|
-
model
|
|
41
|
-
} = (0, _ProfileContext.useProfile)();
|
|
42
|
-
const settings = (0, _effectorReact.useUnit)(model.$settings);
|
|
43
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProfileCard.ProfileCard, {
|
|
44
|
-
title: t('profile.preferences'),
|
|
45
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingRow.SettingRow, {
|
|
46
|
-
label: t('profile.solveMode'),
|
|
47
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
48
|
-
style: styles.control,
|
|
49
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.SelectGroup, {
|
|
50
|
-
color: _reactNativeUi.SelectOptionColor.GREY,
|
|
51
|
-
options: CANVAS_OPTIONS,
|
|
52
|
-
selectedOptions: CANVAS_OPTIONS.filter(({
|
|
53
|
-
key
|
|
54
|
-
}) => key === String(settings.canvasType)),
|
|
55
|
-
onOptionChange: ({
|
|
56
|
-
key
|
|
57
|
-
}) => model.setCanvasType(key === String(_profileConstants.ProfileCanvasType.SPREADSHEET) ? _profileConstants.ProfileCanvasType.SPREADSHEET : _profileConstants.ProfileCanvasType.DRAWING)
|
|
58
|
-
})
|
|
59
|
-
})
|
|
60
|
-
})
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
exports.PreferencesCard = PreferencesCard;
|
|
64
|
-
const styles = _reactNative.StyleSheet.create({
|
|
65
|
-
control: {
|
|
66
|
-
flex: 1,
|
|
67
|
-
maxWidth: CONTROL_MAX_WIDTH
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=PreferencesCard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_effectorReact","_reactNativeUi","_i18n","_ProfileContext","_profileConstants","_ProfileCard","_SettingRow","_jsxRuntime","e","__esModule","default","ICON_SIZE","CONTROL_MAX_WIDTH","CANVAS_OPTIONS","key","String","ProfileCanvasType","DRAWING","title","jsx","PencilIcon","size","color","COLORS","NEUTRAL_9","SPREADSHEET","CalculatorIcon","PreferencesCard","t","useText","model","useProfile","settings","useUnit","$settings","ProfileCard","children","SettingRow","label","View","style","styles","control","SelectGroup","SelectOptionColor","GREY","options","selectedOptions","filter","canvasType","onOptionChange","setCanvasType","exports","StyleSheet","create","flex","maxWidth"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/PreferencesCard.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AASA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAAyC,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAD,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEzC,MAAMG,SAAS,GAAG,EAAE;AACpB,MAAMC,iBAAiB,GAAG,GAAG;;AAE7B;AACA;AACA;AACA,MAAMC,cAAmC,GAAG,CAC1C;EACEC,GAAG,EAAEC,MAAM,CAACC,mCAAiB,CAACC,OAAO,CAAC;EACtCC,KAAK,eAAE,IAAAX,WAAA,CAAAY,GAAA,EAAClB,cAAA,CAAAmB,UAAU;IAACC,IAAI,EAAEV,SAAU;IAACW,KAAK,EAAEC,qBAAM,CAACC;EAAU,CAAE;AAChE,CAAC,EACD;EACEV,GAAG,EAAEC,MAAM,CAACC,mCAAiB,CAACS,WAAW,CAAC;EAC1CP,KAAK,eAAE,IAAAX,WAAA,CAAAY,GAAA,EAAClB,cAAA,CAAAyB,cAAc;IAACL,IAAI,EAAEV,SAAU;IAACW,KAAK,EAAEC,qBAAM,CAACC;EAAU,CAAE;AACpE,CAAC,CACF;AAEM,MAAMG,eAAe,GAAGA,CAAA,KAAM;EACnC,MAAMC,CAAC,GAAG,IAAAC,aAAO,EAAC,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-1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SettingRow = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const SettingRow = ({
|
|
13
|
-
icon,
|
|
14
|
-
label,
|
|
15
|
-
children,
|
|
16
|
-
style
|
|
17
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
18
|
-
style: [styles.row, style],
|
|
19
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
20
|
-
style: styles.labelGroup,
|
|
21
|
-
children: [icon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
22
|
-
variant: _reactNativeUi.HeadingVariants.H8,
|
|
23
|
-
style: styles.label,
|
|
24
|
-
children: label
|
|
25
|
-
})]
|
|
26
|
-
}), children]
|
|
27
|
-
});
|
|
28
|
-
exports.SettingRow = SettingRow;
|
|
29
|
-
const styles = _reactNative.StyleSheet.create({
|
|
30
|
-
row: {
|
|
31
|
-
alignItems: 'center',
|
|
32
|
-
flexDirection: 'row',
|
|
33
|
-
gap: _reactNativeUi.SPACING['400'],
|
|
34
|
-
justifyContent: 'space-between',
|
|
35
|
-
padding: _reactNativeUi.SPACING['200']
|
|
36
|
-
},
|
|
37
|
-
labelGroup: {
|
|
38
|
-
alignItems: 'center',
|
|
39
|
-
flexDirection: 'row',
|
|
40
|
-
flexShrink: 1,
|
|
41
|
-
gap: _reactNativeUi.SPACING['200']
|
|
42
|
-
},
|
|
43
|
-
label: {
|
|
44
|
-
color: _reactNativeUi.COLORS.NEUTRAL_9,
|
|
45
|
-
flexShrink: 1
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
//# sourceMappingURL=SettingRow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeUi","_jsxRuntime","e","__esModule","default","SettingRow","icon","label","children","style","jsxs","View","styles","row","labelGroup","jsx","Typography","variant","HeadingVariants","H8","exports","StyleSheet","create","alignItems","flexDirection","gap","SPACING","justifyContent","padding","flexShrink","color","COLORS","NEUTRAL_9"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/SettingRow.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAAyF,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AASlF,MAAMG,UAAU,GAAGA,CAAC;EAAEC,IAAI;EAAEC,KAAK;EAAEC,QAAQ;EAAEC;AAAuB,CAAC,kBAC1E,IAAAR,WAAA,CAAAS,IAAA,EAACX,YAAA,CAAAY,IAAI;EAACF,KAAK,EAAE,CAACG,MAAM,CAACC,GAAG,EAAEJ,KAAK,CAAE;EAAAD,QAAA,gBAC/B,IAAAP,WAAA,CAAAS,IAAA,EAACX,YAAA,CAAAY,IAAI;IAACF,KAAK,EAAEG,MAAM,CAACE,UAAW;IAAAN,QAAA,GAC5BF,IAAI,eACL,IAAAL,WAAA,CAAAc,GAAA,EAACf,cAAA,CAAAgB,UAAU;MAACC,OAAO,EAAEC,8BAAe,CAACC,EAAG;MAACV,KAAK,EAAEG,MAAM,CAACL,KAAM;MAAAC,QAAA,EAC1DD;IAAK,CACI,CAAC;EAAA,CACT,CAAC,EACNC,QAAQ;AAAA,CACL,CACP;AAAAY,OAAA,CAAAf,UAAA,GAAAA,UAAA;AAED,MAAMO,MAAM,GAAGS,uBAAU,CAACC,MAAM,CAAC;EAC/BT,GAAG,EAAE;IACHU,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBC,GAAG,EAAEC,sBAAO,CAAC,KAAK,CAAC;IACnBC,cAAc,EAAE,eAAe;IAC/BC,OAAO,EAAEF,sBAAO,CAAC,KAAK;EACxB,CAAC;EACDZ,UAAU,EAAE;IACVS,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBK,UAAU,EAAE,CAAC;IACbJ,GAAG,EAAEC,sBAAO,CAAC,KAAK;EACpB,CAAC;EACDnB,KAAK,EAAE;IACLuB,KAAK,EAAEC,qBAAM,CAACC,SAAS;IACvBH,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TextSettingsCard = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _effectorReact = require("effector-react");
|
|
9
|
-
var _reactNative = require("react-native");
|
|
10
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
11
|
-
var _i18n = require("../../../../i18n/i18n.js");
|
|
12
|
-
var _ProfileContext = require("../../context/ProfileContext.js");
|
|
13
|
-
var _TextSizeSlider = require("./TextSizeSlider.js");
|
|
14
|
-
var _ProfileCard = require("../cards/ProfileCard.js");
|
|
15
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
-
const TextSettingsCard = () => {
|
|
18
|
-
const t = (0, _i18n.useText)();
|
|
19
|
-
const {
|
|
20
|
-
model
|
|
21
|
-
} = (0, _ProfileContext.useProfile)();
|
|
22
|
-
const settings = (0, _effectorReact.useUnit)(model.$settings);
|
|
23
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ProfileCard.ProfileCard, {
|
|
24
|
-
title: t('profile.textSettings'),
|
|
25
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
26
|
-
variant: _reactNativeUi.HeadingVariants.H8,
|
|
27
|
-
style: styles.label,
|
|
28
|
-
children: t('profile.textSize')
|
|
29
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
30
|
-
style: styles.sliderWrap,
|
|
31
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TextSizeSlider.TextSizeSlider, {
|
|
32
|
-
value: settings.textSize,
|
|
33
|
-
onSlidingComplete: model.setTextSize
|
|
34
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
35
|
-
style: styles.markers,
|
|
36
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
37
|
-
variant: _reactNativeUi.ParagraphVariants.XS,
|
|
38
|
-
style: styles.marker,
|
|
39
|
-
selectable: false,
|
|
40
|
-
children: "A"
|
|
41
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
42
|
-
variant: _reactNativeUi.ParagraphVariants.MEDIUM,
|
|
43
|
-
style: styles.marker,
|
|
44
|
-
selectable: false,
|
|
45
|
-
children: "A"
|
|
46
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
47
|
-
variant: _reactNativeUi.ParagraphVariants.XL,
|
|
48
|
-
style: styles.marker,
|
|
49
|
-
selectable: false,
|
|
50
|
-
children: "A"
|
|
51
|
-
})]
|
|
52
|
-
})]
|
|
53
|
-
})]
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
exports.TextSettingsCard = TextSettingsCard;
|
|
57
|
-
const styles = _reactNative.StyleSheet.create({
|
|
58
|
-
label: {
|
|
59
|
-
color: _reactNativeUi.COLORS.NEUTRAL_9
|
|
60
|
-
},
|
|
61
|
-
sliderWrap: {
|
|
62
|
-
gap: _reactNativeUi.SPACING['200']
|
|
63
|
-
},
|
|
64
|
-
markers: {
|
|
65
|
-
alignItems: 'flex-end',
|
|
66
|
-
flexDirection: 'row',
|
|
67
|
-
justifyContent: 'space-between'
|
|
68
|
-
},
|
|
69
|
-
marker: {
|
|
70
|
-
color: _reactNativeUi.COLORS.NEUTRAL_7,
|
|
71
|
-
fontWeight: '700'
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
//# sourceMappingURL=TextSettingsCard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_effectorReact","_reactNative","_reactNativeUi","_i18n","_ProfileContext","_TextSizeSlider","_ProfileCard","_jsxRuntime","e","__esModule","default","TextSettingsCard","t","useText","model","useProfile","settings","useUnit","$settings","jsxs","ProfileCard","title","children","jsx","Typography","variant","HeadingVariants","H8","style","styles","label","View","sliderWrap","TextSizeSlider","value","textSize","onSlidingComplete","setTextSize","markers","ParagraphVariants","XS","marker","selectable","MEDIUM","XL","exports","StyleSheet","create","color","COLORS","NEUTRAL_9","gap","SPACING","alignItems","flexDirection","justifyContent","NEUTRAL_7","fontWeight"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/TextSettingsCard.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAQA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAAkD,IAAAQ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B,QAAA,EAAC;QAEpF,CAAY,CAAC,eACb,IAAAf,WAAA,CAAAgB,GAAA,EAACrB,cAAA,CAAAsB,UAAU;UAACC,OAAO,EAAEc,gCAAiB,CAACI,MAAO;UAACf,KAAK,EAAEC,MAAM,CAACY,MAAO;UAACC,UAAU,EAAE,KAAM;UAAApB,QAAA,EAAC;QAExF,CAAY,CAAC,eACb,IAAAf,WAAA,CAAAgB,GAAA,EAACrB,cAAA,CAAAsB,UAAU;UAACC,OAAO,EAAEc,gCAAiB,CAACK,EAAG;UAAChB,KAAK,EAAEC,MAAM,CAACY,MAAO;UAACC,UAAU,EAAE,KAAM;UAAApB,QAAA,EAAC;QAEpF,CAAY,CAAC;MAAA,CACT,CAAC;IAAA,CACH,CAAC;EAAA,CACI,CAAC;AAElB,CAAC;AAAAuB,OAAA,CAAAlC,gBAAA,GAAAA,gBAAA;AAED,MAAMkB,MAAM,GAAGiB,uBAAU,CAACC,MAAM,CAAC;EAC/BjB,KAAK,EAAE;IACLkB,KAAK,EAAEC,qBAAM,CAACC;EAChB,CAAC;EACDlB,UAAU,EAAE;IACVmB,GAAG,EAAEC,sBAAO,CAAC,KAAK;EACpB,CAAC;EACDd,OAAO,EAAE;IACPe,UAAU,EAAE,UAAU;IACtBC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDd,MAAM,EAAE;IACNO,KAAK,EAAEC,qBAAM,CAACO,SAAS;IACvBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TextSizeSlider = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
-
var _profileConstants = require("../../shared/profile.constants.js");
|
|
11
|
-
var _profileHelpers = require("../../shared/profile.helpers.js");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
-
const THUMB_SIZE = 20;
|
|
16
|
-
const DOT_SIZE = 6;
|
|
17
|
-
const TRACK_HEIGHT = 10;
|
|
18
|
-
const TRACK_RADIUS = 5;
|
|
19
|
-
const STEPS = (_profileConstants.TEXT_SIZE.MAX - _profileConstants.TEXT_SIZE.MIN) / _profileConstants.TEXT_SIZE.STEP + 1;
|
|
20
|
-
const RANGE = _profileConstants.TEXT_SIZE.MAX - _profileConstants.TEXT_SIZE.MIN;
|
|
21
|
-
const TRACK_PADDING = THUMB_SIZE / 2 - DOT_SIZE / 2;
|
|
22
|
-
const TextSizeSlider = ({
|
|
23
|
-
value,
|
|
24
|
-
onSlidingComplete
|
|
25
|
-
}) => {
|
|
26
|
-
const [trackWidth, setTrackWidth] = (0, _react.useState)(0);
|
|
27
|
-
const [dragValue, setDragValue] = (0, _react.useState)(null);
|
|
28
|
-
const widthRef = (0, _react.useRef)(0);
|
|
29
|
-
const onCompleteRef = (0, _react.useRef)(onSlidingComplete);
|
|
30
|
-
onCompleteRef.current = onSlidingComplete;
|
|
31
|
-
const currentValue = dragValue ?? value;
|
|
32
|
-
const fraction = RANGE === 0 ? 0 : (currentValue - _profileConstants.TEXT_SIZE.MIN) / RANGE;
|
|
33
|
-
const travel = Math.max(0, trackWidth - THUMB_SIZE);
|
|
34
|
-
const measureTrack = event => {
|
|
35
|
-
const width = event.nativeEvent.layout.width;
|
|
36
|
-
widthRef.current = width;
|
|
37
|
-
setTrackWidth(width);
|
|
38
|
-
};
|
|
39
|
-
const valueFromX = x => {
|
|
40
|
-
const width = widthRef.current;
|
|
41
|
-
if (width <= 0) return _profileConstants.TEXT_SIZE.MIN;
|
|
42
|
-
const ratio = Math.min(1, Math.max(0, x / width));
|
|
43
|
-
return (0, _profileHelpers.snapTextSize)(_profileConstants.TEXT_SIZE.MIN + ratio * RANGE);
|
|
44
|
-
};
|
|
45
|
-
const panResponder = (0, _react.useRef)(_reactNative.PanResponder.create({
|
|
46
|
-
onStartShouldSetPanResponder: () => true,
|
|
47
|
-
onMoveShouldSetPanResponder: () => true,
|
|
48
|
-
onPanResponderGrant: event => setDragValue(valueFromX(event.nativeEvent.locationX)),
|
|
49
|
-
onPanResponderMove: event => setDragValue(valueFromX(event.nativeEvent.locationX)),
|
|
50
|
-
onPanResponderRelease: event => {
|
|
51
|
-
const next = valueFromX(event.nativeEvent.locationX);
|
|
52
|
-
setDragValue(null);
|
|
53
|
-
onCompleteRef.current(next);
|
|
54
|
-
},
|
|
55
|
-
onPanResponderTerminate: () => setDragValue(null)
|
|
56
|
-
})).current;
|
|
57
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
58
|
-
style: styles.container,
|
|
59
|
-
onLayout: measureTrack,
|
|
60
|
-
...panResponder.panHandlers,
|
|
61
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
62
|
-
style: styles.track,
|
|
63
|
-
children: Array.from({
|
|
64
|
-
length: STEPS
|
|
65
|
-
}, (_, index) => {
|
|
66
|
-
const isEdge = index === 0 || index === STEPS - 1;
|
|
67
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
68
|
-
style: [styles.dot, isEdge && styles.dotHidden]
|
|
69
|
-
}, index);
|
|
70
|
-
})
|
|
71
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
72
|
-
style: [styles.thumb, {
|
|
73
|
-
left: fraction * travel
|
|
74
|
-
}]
|
|
75
|
-
})]
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
exports.TextSizeSlider = TextSizeSlider;
|
|
79
|
-
const styles = _reactNative.StyleSheet.create({
|
|
80
|
-
container: {
|
|
81
|
-
height: THUMB_SIZE,
|
|
82
|
-
justifyContent: 'center',
|
|
83
|
-
width: '100%'
|
|
84
|
-
},
|
|
85
|
-
track: {
|
|
86
|
-
alignItems: 'center',
|
|
87
|
-
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_3,
|
|
88
|
-
borderColor: _reactNativeUi.COLORS.NEUTRAL_4,
|
|
89
|
-
borderRadius: TRACK_RADIUS,
|
|
90
|
-
borderWidth: 0.5,
|
|
91
|
-
boxShadow: 'inset -3px -3px 3px rgba(255, 255, 255, 0.6), inset 2px 2px 3px rgba(0, 0, 0, 0.12)',
|
|
92
|
-
flexDirection: 'row',
|
|
93
|
-
height: TRACK_HEIGHT,
|
|
94
|
-
justifyContent: 'space-between',
|
|
95
|
-
paddingHorizontal: TRACK_PADDING,
|
|
96
|
-
width: '100%'
|
|
97
|
-
},
|
|
98
|
-
dot: {
|
|
99
|
-
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_5,
|
|
100
|
-
borderRadius: DOT_SIZE / 2,
|
|
101
|
-
height: DOT_SIZE,
|
|
102
|
-
width: DOT_SIZE
|
|
103
|
-
},
|
|
104
|
-
dotHidden: {
|
|
105
|
-
opacity: 0
|
|
106
|
-
},
|
|
107
|
-
thumb: {
|
|
108
|
-
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
|
|
109
|
-
borderRadius: THUMB_SIZE / 2,
|
|
110
|
-
boxShadow: '0px 2px 6px rgba(0, 0, 0, 0.2)',
|
|
111
|
-
height: THUMB_SIZE,
|
|
112
|
-
position: 'absolute',
|
|
113
|
-
width: THUMB_SIZE
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
//# sourceMappingURL=TextSizeSlider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeUi","_profileConstants","_profileHelpers","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","THUMB_SIZE","DOT_SIZE","TRACK_HEIGHT","TRACK_RADIUS","STEPS","TEXT_SIZE","MAX","MIN","STEP","RANGE","TRACK_PADDING","TextSizeSlider","value","onSlidingComplete","trackWidth","setTrackWidth","useState","dragValue","setDragValue","widthRef","useRef","onCompleteRef","current","currentValue","fraction","travel","Math","max","measureTrack","event","width","nativeEvent","layout","valueFromX","x","ratio","min","snapTextSize","panResponder","PanResponder","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderGrant","locationX","onPanResponderMove","onPanResponderRelease","next","onPanResponderTerminate","jsxs","View","style","styles","container","onLayout","panHandlers","children","jsx","track","Array","from","length","_","index","isEdge","dot","dotHidden","thumb","left","exports","StyleSheet","height","justifyContent","alignItems","backgroundColor","COLORS","NEUTRAL_3","borderColor","NEUTRAL_4","borderRadius","borderWidth","boxShadow","flexDirection","paddingHorizontal","NEUTRAL_5","opacity","NEUTRAL_1","position"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/TextSizeSlider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,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YAAY,EAAE9E,QAAQ,GAAG,CAAC;IAC1BsE,MAAM,EAAEtE,QAAQ;IAChB6B,KAAK,EAAE7B;EACT,CAAC;EACDiE,SAAS,EAAE;IACTmB,OAAO,EAAE;EACX,CAAC;EACDlB,KAAK,EAAE;IACLO,eAAe,EAAEC,qBAAM,CAACW,SAAS;IACjCP,YAAY,EAAE/E,UAAU,GAAG,CAAC;IAC5BiF,SAAS,EAAE,gCAAgC;IAC3CV,MAAM,EAAEvE,UAAU;IAClBuF,QAAQ,EAAE,UAAU;IACpBzD,KAAK,EAAE9B;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TextToSpeechRow = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _effectorReact = require("effector-react");
|
|
9
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
-
var _i18n = require("../../../../i18n/i18n.js");
|
|
11
|
-
var _ProfileContext = require("../../context/ProfileContext.js");
|
|
12
|
-
var _SettingRow = require("./SettingRow.js");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
const ICON_SIZE = 20;
|
|
16
|
-
const TextToSpeechRow = () => {
|
|
17
|
-
const t = (0, _i18n.useText)();
|
|
18
|
-
const {
|
|
19
|
-
model
|
|
20
|
-
} = (0, _ProfileContext.useProfile)();
|
|
21
|
-
const settings = (0, _effectorReact.useUnit)(model.$settings);
|
|
22
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingRow.SettingRow, {
|
|
23
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.SpeakerIcon, {
|
|
24
|
-
size: ICON_SIZE,
|
|
25
|
-
color: _reactNativeUi.COLORS.NEUTRAL_7
|
|
26
|
-
}),
|
|
27
|
-
label: t('profile.textToSpeech'),
|
|
28
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Toggle, {
|
|
29
|
-
value: settings.textToSpeech,
|
|
30
|
-
onValueChange: model.setTextToSpeech
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
exports.TextToSpeechRow = TextToSpeechRow;
|
|
35
|
-
//# sourceMappingURL=TextToSpeechRow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_effectorReact","_reactNativeUi","_i18n","_ProfileContext","_SettingRow","_jsxRuntime","e","__esModule","default","ICON_SIZE","TextToSpeechRow","t","useText","model","useProfile","settings","useUnit","$settings","jsx","SettingRow","icon","SpeakerIcon","size","color","COLORS","NEUTRAL_7","label","children","Toggle","value","textToSpeech","onValueChange","setTextToSpeech","exports"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/TextToSpeechRow.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAAyC,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEzC,MAAMG,SAAS,GAAG,EAAE;AAEb,MAAMC,eAAe,GAAGA,CAAA,KAAM;EACnC,MAAMC,CAAC,GAAG,IAAAC,aAAO,EAAC,CAAC;EACnB,MAAM;IAAEC;EAAM,CAAC,GAAG,IAAAC,0BAAU,EAAC,CAAC;EAC9B,MAAMC,QAAQ,GAAG,IAAAC,sBAAO,EAACH,KAAK,CAACI,SAAS,CAAC;EAEzC,oBACE,IAAAZ,WAAA,CAAAa,GAAA,EAACd,WAAA,CAAAe,UAAU;IACTC,IAAI,eAAE,IAAAf,WAAA,CAAAa,GAAA,EAACjB,cAAA,CAAAoB,WAAW;MAACC,IAAI,EAAEb,SAAU;MAACc,KAAK,EAAEC,qBAAM,CAACC;IAAU,CAAE,CAAE;IAChEC,KAAK,EAAEf,CAAC,CAAC,sBAAsB,CAAE;IAAAgB,QAAA,eAEjC,IAAAtB,WAAA,CAAAa,GAAA,EAACjB,cAAA,CAAA2B,MAAM;MAACC,KAAK,EAAEd,QAAQ,CAACe,YAAa;MAACC,aAAa,EAAElB,KAAK,CAACmB;IAAgB,CAAE;EAAC,CACpE,CAAC;AAEjB,CAAC;AAAAC,OAAA,CAAAvB,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TranslationLanguageRow = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _effectorReact = require("effector-react");
|
|
9
|
-
var _reactNative = require("react-native");
|
|
10
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
11
|
-
var _i18n = require("../../../../i18n/i18n.js");
|
|
12
|
-
var _ProfileContext = require("../../context/ProfileContext.js");
|
|
13
|
-
var _SettingRow = require("./SettingRow.js");
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
-
const ICON_SIZE = 20;
|
|
17
|
-
const TranslationLanguageRow = () => {
|
|
18
|
-
const t = (0, _i18n.useText)();
|
|
19
|
-
const {
|
|
20
|
-
model,
|
|
21
|
-
onOpenTranslationModal
|
|
22
|
-
} = (0, _ProfileContext.useProfile)();
|
|
23
|
-
const settings = (0, _effectorReact.useUnit)(model.$settings);
|
|
24
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingRow.SettingRow, {
|
|
25
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.GlobeIcon, {
|
|
26
|
-
size: ICON_SIZE,
|
|
27
|
-
color: _reactNativeUi.COLORS.NEUTRAL_7
|
|
28
|
-
}),
|
|
29
|
-
label: t('profile.translationLanguage'),
|
|
30
|
-
style: styles.settingRow,
|
|
31
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.FilterDropdown, {
|
|
32
|
-
variant: _reactNativeUi.FilterDropdownVariant.SECONDARY,
|
|
33
|
-
size: _reactNativeUi.FilterDropdownSize.MEDIUM,
|
|
34
|
-
value: settings.translationLanguage ?? undefined,
|
|
35
|
-
placeholder: t('profile.selectLanguage'),
|
|
36
|
-
disabled: settings.isTranslationLocked,
|
|
37
|
-
onPress: onOpenTranslationModal,
|
|
38
|
-
accessibilityLabel: t('profile.translationLanguage'),
|
|
39
|
-
style: {
|
|
40
|
-
text: styles.filterLabel,
|
|
41
|
-
container: styles.filterContainer
|
|
42
|
-
}
|
|
43
|
-
})
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
exports.TranslationLanguageRow = TranslationLanguageRow;
|
|
47
|
-
const styles = _reactNative.StyleSheet.create({
|
|
48
|
-
settingRow: {
|
|
49
|
-
paddingVertical: 0
|
|
50
|
-
},
|
|
51
|
-
filterLabel: {
|
|
52
|
-
color: _reactNativeUi.COLORS.NEUTRAL_7,
|
|
53
|
-
fontSize: 16,
|
|
54
|
-
fontWeight: '400'
|
|
55
|
-
},
|
|
56
|
-
filterContainer: {
|
|
57
|
-
maxWidth: 231
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
//# sourceMappingURL=TranslationLanguageRow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_effectorReact","_reactNative","_reactNativeUi","_i18n","_ProfileContext","_SettingRow","_jsxRuntime","e","__esModule","default","ICON_SIZE","TranslationLanguageRow","t","useText","model","onOpenTranslationModal","useProfile","settings","useUnit","$settings","jsx","SettingRow","icon","GlobeIcon","size","color","COLORS","NEUTRAL_7","label","style","styles","settingRow","children","FilterDropdown","variant","FilterDropdownVariant","SECONDARY","FilterDropdownSize","MEDIUM","value","translationLanguage","undefined","placeholder","disabled","isTranslationLocked","onPress","accessibilityLabel","text","filterLabel","container","filterContainer","exports","StyleSheet","create","paddingVertical","fontSize","fontWeight","maxWidth"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/TranslationLanguageRow.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAQA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAAyC,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEzC,MAAMG,SAAS,GAAG,EAAE;AAEb,MAAMC,sBAAsB,GAAGA,CAAA,KAAM;EAC1C,MAAMC,CAAC,GAAG,IAAAC,aAAO,EAAC,CAAC;EACnB,MAAM;IAAEC,KAAK;IAAEC;EAAuB,CAAC,GAAG,IAAAC,0BAAU,EAAC,CAAC;EACtD,MAAMC,QAAQ,GAAG,IAAAC,sBAAO,EAACJ,KAAK,CAACK,SAAS,CAAC;EAEzC,oBACE,IAAAb,WAAA,CAAAc,GAAA,EAACf,WAAA,CAAAgB,UAAU;IACTC,IAAI,eAAE,IAAAhB,WAAA,CAAAc,GAAA,EAAClB,cAAA,CAAAqB,SAAS;MAACC,IAAI,EAAEd,SAAU;MAACe,KAAK,EAAEC,qBAAM,CAACC;IAAU,CAAE,CAAE;IAC9DC,KAAK,EAAEhB,CAAC,CAAC,6BAA6B,CAAE;IACxCiB,KAAK,EAAEC,MAAM,CAACC,UAAW;IAAAC,QAAA,eAEzB,IAAA1B,WAAA,CAAAc,GAAA,EAAClB,cAAA,CAAA+B,cAAc;MACbC,OAAO,EAAEC,oCAAqB,CAACC,SAAU;MACzCZ,IAAI,EAAEa,iCAAkB,CAACC,MAAO;MAChCC,KAAK,EAAEtB,QAAQ,CAACuB,mBAAmB,IAAIC,SAAU;MACjDC,WAAW,EAAE9B,CAAC,CAAC,wBAAwB,CAAE;MACzC+B,QAAQ,EAAE1B,QAAQ,CAAC2B,mBAAoB;MACvCC,OAAO,EAAE9B,sBAAuB;MAChC+B,kBAAkB,EAAElC,CAAC,CAAC,6BAA6B,CAAE;MACrDiB,KAAK,EAAE;QACLkB,IAAI,EAAEjB,MAAM,CAACkB,WAAW;QACxBC,SAAS,EAAEnB,MAAM,CAACoB;MACpB;IAAE,CACH;EAAC,CACQ,CAAC;AAEjB,CAAC;AAAAC,OAAA,CAAAxC,sBAAA,GAAAA,sBAAA;AAED,MAAMmB,MAAM,GAAGsB,uBAAU,CAACC,MAAM,CAAC;EAC/BtB,UAAU,EAAE;IACVuB,eAAe,EAAE;EACnB,CAAC;EACDN,WAAW,EAAE;IACXvB,KAAK,EAAEC,qBAAM,CAACC,SAAS;IACvB4B,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDN,eAAe,EAAE;IACfO,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ProfileProvider = void 0;
|
|
7
|
-
exports.useProfile = useProfile;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
const ProfileContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
10
|
-
function useProfile() {
|
|
11
|
-
const value = (0, _react.useContext)(ProfileContext);
|
|
12
|
-
if (!value) {
|
|
13
|
-
throw new Error('useProfile must be used within ProfileProvider');
|
|
14
|
-
}
|
|
15
|
-
return value;
|
|
16
|
-
}
|
|
17
|
-
const ProfileProvider = exports.ProfileProvider = ProfileContext.Provider;
|
|
18
|
-
//# sourceMappingURL=ProfileContext.js.map
|