@magmamath/students-features 1.8.4 → 1.8.5-rc.1
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/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
- package/dist/commonjs/features/profile/Profile.js +90 -0
- package/dist/commonjs/features/profile/Profile.js.map +1 -0
- package/dist/commonjs/features/profile/components/actions/ProfileActions.js +70 -0
- package/dist/commonjs/features/profile/components/actions/ProfileActions.js.map +1 -0
- package/dist/commonjs/features/profile/components/cards/ProfileCard.js +57 -0
- package/dist/commonjs/features/profile/components/cards/ProfileCard.js.map +1 -0
- package/dist/commonjs/features/profile/components/info/AccountInfoCard.js +91 -0
- package/dist/commonjs/features/profile/components/info/AccountInfoCard.js.map +1 -0
- package/dist/commonjs/features/profile/components/modals/JoinClassModal.js +190 -0
- package/dist/commonjs/features/profile/components/modals/JoinClassModal.js.map +1 -0
- package/dist/commonjs/features/profile/components/modals/LogoutConfirmModal.js +61 -0
- package/dist/commonjs/features/profile/components/modals/LogoutConfirmModal.js.map +1 -0
- package/dist/commonjs/features/profile/components/modals/TranslationLanguageModal.js +128 -0
- package/dist/commonjs/features/profile/components/modals/TranslationLanguageModal.js.map +1 -0
- package/dist/commonjs/features/profile/components/settings/LanguageSettingsCard.js +22 -0
- package/dist/commonjs/features/profile/components/settings/LanguageSettingsCard.js.map +1 -0
- package/dist/commonjs/features/profile/components/settings/PreferencesCard.js +69 -0
- package/dist/commonjs/features/profile/components/settings/PreferencesCard.js.map +1 -0
- package/dist/commonjs/features/profile/components/settings/SettingRow.js +48 -0
- package/dist/commonjs/features/profile/components/settings/SettingRow.js.map +1 -0
- package/dist/commonjs/features/profile/components/settings/TextSettingsCard.js +77 -0
- package/dist/commonjs/features/profile/components/settings/TextSettingsCard.js.map +1 -0
- package/dist/commonjs/features/profile/components/settings/TextSizeSlider.js +119 -0
- package/dist/commonjs/features/profile/components/settings/TextSizeSlider.js.map +1 -0
- package/dist/commonjs/features/profile/components/settings/TextToSpeechRow.js +37 -0
- package/dist/commonjs/features/profile/components/settings/TextToSpeechRow.js.map +1 -0
- package/dist/commonjs/features/profile/components/settings/TranslationLanguageRow.js +62 -0
- package/dist/commonjs/features/profile/components/settings/TranslationLanguageRow.js.map +1 -0
- package/dist/commonjs/features/profile/context/ProfileContext.js +18 -0
- package/dist/commonjs/features/profile/context/ProfileContext.js.map +1 -0
- package/dist/commonjs/features/profile/index.js +80 -0
- package/dist/commonjs/features/profile/index.js.map +1 -0
- package/dist/commonjs/features/profile/model/ProfileApi.js +15 -0
- package/dist/commonjs/features/profile/model/ProfileApi.js.map +1 -0
- package/dist/commonjs/features/profile/model/ProfileJoinClassModel.js +60 -0
- package/dist/commonjs/features/profile/model/ProfileJoinClassModel.js.map +1 -0
- package/dist/commonjs/features/profile/model/ProfileLanguageModel.js +30 -0
- package/dist/commonjs/features/profile/model/ProfileLanguageModel.js.map +1 -0
- package/dist/commonjs/features/profile/model/ProfileModel.js +53 -0
- package/dist/commonjs/features/profile/model/ProfileModel.js.map +1 -0
- package/dist/commonjs/features/profile/model/profileModal.types.js +6 -0
- package/dist/commonjs/features/profile/model/profileModal.types.js.map +1 -0
- package/dist/commonjs/features/profile/shared/JoinClassError.js +16 -0
- package/dist/commonjs/features/profile/shared/JoinClassError.js.map +1 -0
- package/dist/commonjs/features/profile/shared/profile.constants.js +29 -0
- package/dist/commonjs/features/profile/shared/profile.constants.js.map +1 -0
- package/dist/commonjs/features/profile/shared/profile.helpers.js +40 -0
- package/dist/commonjs/features/profile/shared/profile.helpers.js.map +1 -0
- package/dist/commonjs/features/profile/shared/profile.types.js +6 -0
- package/dist/commonjs/features/profile/shared/profile.types.js.map +1 -0
- package/dist/commonjs/index.js +12 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/hooks/useKeyboardOffset.js +54 -0
- package/dist/commonjs/shared/hooks/useKeyboardOffset.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
- package/dist/module/features/profile/Profile.js +84 -0
- package/dist/module/features/profile/Profile.js.map +1 -0
- package/dist/module/features/profile/components/actions/ProfileActions.js +64 -0
- package/dist/module/features/profile/components/actions/ProfileActions.js.map +1 -0
- package/dist/module/features/profile/components/cards/ProfileCard.js +51 -0
- package/dist/module/features/profile/components/cards/ProfileCard.js.map +1 -0
- package/dist/module/features/profile/components/info/AccountInfoCard.js +85 -0
- package/dist/module/features/profile/components/info/AccountInfoCard.js.map +1 -0
- package/dist/module/features/profile/components/modals/JoinClassModal.js +183 -0
- package/dist/module/features/profile/components/modals/JoinClassModal.js.map +1 -0
- package/dist/module/features/profile/components/modals/LogoutConfirmModal.js +55 -0
- package/dist/module/features/profile/components/modals/LogoutConfirmModal.js.map +1 -0
- package/dist/module/features/profile/components/modals/TranslationLanguageModal.js +122 -0
- package/dist/module/features/profile/components/modals/TranslationLanguageModal.js.map +1 -0
- package/dist/module/features/profile/components/settings/LanguageSettingsCard.js +16 -0
- package/dist/module/features/profile/components/settings/LanguageSettingsCard.js.map +1 -0
- package/dist/module/features/profile/components/settings/PreferencesCard.js +63 -0
- package/dist/module/features/profile/components/settings/PreferencesCard.js.map +1 -0
- package/dist/module/features/profile/components/settings/SettingRow.js +42 -0
- package/dist/module/features/profile/components/settings/SettingRow.js.map +1 -0
- package/dist/module/features/profile/components/settings/TextSettingsCard.js +71 -0
- package/dist/module/features/profile/components/settings/TextSettingsCard.js.map +1 -0
- package/dist/module/features/profile/components/settings/TextSizeSlider.js +112 -0
- package/dist/module/features/profile/components/settings/TextSizeSlider.js.map +1 -0
- package/dist/module/features/profile/components/settings/TextToSpeechRow.js +31 -0
- package/dist/module/features/profile/components/settings/TextToSpeechRow.js.map +1 -0
- package/dist/module/features/profile/components/settings/TranslationLanguageRow.js +56 -0
- package/dist/module/features/profile/components/settings/TranslationLanguageRow.js.map +1 -0
- package/dist/module/features/profile/context/ProfileContext.js +13 -0
- package/dist/module/features/profile/context/ProfileContext.js.map +1 -0
- package/dist/module/features/profile/index.js +11 -0
- package/dist/module/features/profile/index.js.map +1 -0
- package/dist/module/features/profile/model/ProfileApi.js +10 -0
- package/dist/module/features/profile/model/ProfileApi.js.map +1 -0
- package/dist/module/features/profile/model/ProfileJoinClassModel.js +55 -0
- package/dist/module/features/profile/model/ProfileJoinClassModel.js.map +1 -0
- package/dist/module/features/profile/model/ProfileLanguageModel.js +25 -0
- package/dist/module/features/profile/model/ProfileLanguageModel.js.map +1 -0
- package/dist/module/features/profile/model/ProfileModel.js +48 -0
- package/dist/module/features/profile/model/ProfileModel.js.map +1 -0
- package/dist/module/features/profile/model/profileModal.types.js +4 -0
- package/dist/module/features/profile/model/profileModal.types.js.map +1 -0
- package/dist/module/features/profile/shared/JoinClassError.js +11 -0
- package/dist/module/features/profile/shared/JoinClassError.js.map +1 -0
- package/dist/module/features/profile/shared/profile.constants.js +25 -0
- package/dist/module/features/profile/shared/profile.constants.js.map +1 -0
- package/dist/module/features/profile/shared/profile.helpers.js +32 -0
- package/dist/module/features/profile/shared/profile.helpers.js.map +1 -0
- package/dist/module/features/profile/shared/profile.types.js +4 -0
- package/dist/module/features/profile/shared/profile.types.js.map +1 -0
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/hooks/useKeyboardOffset.js +49 -0
- package/dist/module/shared/hooks/useKeyboardOffset.js.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/profile/Profile.d.ts +6 -0
- package/dist/typescript/commonjs/features/profile/Profile.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/__tests__/ProfileModel.test.d.ts +2 -0
- package/dist/typescript/commonjs/features/profile/__tests__/ProfileModel.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/__tests__/profile.helpers.test.d.ts +2 -0
- package/dist/typescript/commonjs/features/profile/__tests__/profile.helpers.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/components/actions/ProfileActions.d.ts +3 -0
- package/dist/typescript/commonjs/features/profile/components/actions/ProfileActions.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/components/cards/ProfileCard.d.ts +10 -0
- package/dist/typescript/commonjs/features/profile/components/cards/ProfileCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/components/info/AccountInfoCard.d.ts +3 -0
- package/dist/typescript/commonjs/features/profile/components/info/AccountInfoCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/components/modals/JoinClassModal.d.ts +4 -0
- package/dist/typescript/commonjs/features/profile/components/modals/JoinClassModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/components/modals/LogoutConfirmModal.d.ts +4 -0
- package/dist/typescript/commonjs/features/profile/components/modals/LogoutConfirmModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/components/modals/TranslationLanguageModal.d.ts +4 -0
- package/dist/typescript/commonjs/features/profile/components/modals/TranslationLanguageModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/components/settings/LanguageSettingsCard.d.ts +3 -0
- package/dist/typescript/commonjs/features/profile/components/settings/LanguageSettingsCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/components/settings/PreferencesCard.d.ts +3 -0
- package/dist/typescript/commonjs/features/profile/components/settings/PreferencesCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/components/settings/SettingRow.d.ts +11 -0
- package/dist/typescript/commonjs/features/profile/components/settings/SettingRow.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/components/settings/TextSettingsCard.d.ts +3 -0
- package/dist/typescript/commonjs/features/profile/components/settings/TextSettingsCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/components/settings/TextSizeSlider.d.ts +8 -0
- package/dist/typescript/commonjs/features/profile/components/settings/TextSizeSlider.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/components/settings/TextToSpeechRow.d.ts +3 -0
- package/dist/typescript/commonjs/features/profile/components/settings/TextToSpeechRow.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/components/settings/TranslationLanguageRow.d.ts +3 -0
- package/dist/typescript/commonjs/features/profile/components/settings/TranslationLanguageRow.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/context/ProfileContext.d.ts +13 -0
- package/dist/typescript/commonjs/features/profile/context/ProfileContext.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/index.d.ts +12 -0
- package/dist/typescript/commonjs/features/profile/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/model/ProfileApi.d.ts +11 -0
- package/dist/typescript/commonjs/features/profile/model/ProfileApi.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/model/ProfileJoinClassModel.d.ts +14 -0
- package/dist/typescript/commonjs/features/profile/model/ProfileJoinClassModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/model/ProfileLanguageModel.d.ts +13 -0
- package/dist/typescript/commonjs/features/profile/model/ProfileLanguageModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/model/ProfileModel.d.ts +26 -0
- package/dist/typescript/commonjs/features/profile/model/ProfileModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/model/profileModal.types.d.ts +14 -0
- package/dist/typescript/commonjs/features/profile/model/profileModal.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/shared/JoinClassError.d.ts +5 -0
- package/dist/typescript/commonjs/features/profile/shared/JoinClassError.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/shared/profile.constants.d.ts +20 -0
- package/dist/typescript/commonjs/features/profile/shared/profile.constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/shared/profile.helpers.d.ts +6 -0
- package/dist/typescript/commonjs/features/profile/shared/profile.helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/profile/shared/profile.types.d.ts +27 -0
- package/dist/typescript/commonjs/features/profile/shared/profile.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +1 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/hooks/useKeyboardOffset.d.ts +11 -0
- package/dist/typescript/commonjs/shared/hooks/useKeyboardOffset.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.d.ts.map +1 -1
- package/dist/typescript/module/features/profile/Profile.d.ts +6 -0
- package/dist/typescript/module/features/profile/Profile.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/__tests__/ProfileModel.test.d.ts +2 -0
- package/dist/typescript/module/features/profile/__tests__/ProfileModel.test.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/__tests__/profile.helpers.test.d.ts +2 -0
- package/dist/typescript/module/features/profile/__tests__/profile.helpers.test.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/components/actions/ProfileActions.d.ts +3 -0
- package/dist/typescript/module/features/profile/components/actions/ProfileActions.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/components/cards/ProfileCard.d.ts +10 -0
- package/dist/typescript/module/features/profile/components/cards/ProfileCard.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/components/info/AccountInfoCard.d.ts +3 -0
- package/dist/typescript/module/features/profile/components/info/AccountInfoCard.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/components/modals/JoinClassModal.d.ts +4 -0
- package/dist/typescript/module/features/profile/components/modals/JoinClassModal.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/components/modals/LogoutConfirmModal.d.ts +4 -0
- package/dist/typescript/module/features/profile/components/modals/LogoutConfirmModal.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/components/modals/TranslationLanguageModal.d.ts +4 -0
- package/dist/typescript/module/features/profile/components/modals/TranslationLanguageModal.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/components/settings/LanguageSettingsCard.d.ts +3 -0
- package/dist/typescript/module/features/profile/components/settings/LanguageSettingsCard.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/components/settings/PreferencesCard.d.ts +3 -0
- package/dist/typescript/module/features/profile/components/settings/PreferencesCard.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/components/settings/SettingRow.d.ts +11 -0
- package/dist/typescript/module/features/profile/components/settings/SettingRow.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/components/settings/TextSettingsCard.d.ts +3 -0
- package/dist/typescript/module/features/profile/components/settings/TextSettingsCard.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/components/settings/TextSizeSlider.d.ts +8 -0
- package/dist/typescript/module/features/profile/components/settings/TextSizeSlider.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/components/settings/TextToSpeechRow.d.ts +3 -0
- package/dist/typescript/module/features/profile/components/settings/TextToSpeechRow.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/components/settings/TranslationLanguageRow.d.ts +3 -0
- package/dist/typescript/module/features/profile/components/settings/TranslationLanguageRow.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/context/ProfileContext.d.ts +13 -0
- package/dist/typescript/module/features/profile/context/ProfileContext.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/index.d.ts +12 -0
- package/dist/typescript/module/features/profile/index.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/model/ProfileApi.d.ts +11 -0
- package/dist/typescript/module/features/profile/model/ProfileApi.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/model/ProfileJoinClassModel.d.ts +14 -0
- package/dist/typescript/module/features/profile/model/ProfileJoinClassModel.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/model/ProfileLanguageModel.d.ts +13 -0
- package/dist/typescript/module/features/profile/model/ProfileLanguageModel.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/model/ProfileModel.d.ts +26 -0
- package/dist/typescript/module/features/profile/model/ProfileModel.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/model/profileModal.types.d.ts +14 -0
- package/dist/typescript/module/features/profile/model/profileModal.types.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/shared/JoinClassError.d.ts +5 -0
- package/dist/typescript/module/features/profile/shared/JoinClassError.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/shared/profile.constants.d.ts +20 -0
- package/dist/typescript/module/features/profile/shared/profile.constants.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/shared/profile.helpers.d.ts +6 -0
- package/dist/typescript/module/features/profile/shared/profile.helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/profile/shared/profile.types.d.ts +27 -0
- package/dist/typescript/module/features/profile/shared/profile.types.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +1 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/hooks/useKeyboardOffset.d.ts +11 -0
- package/dist/typescript/module/shared/hooks/useKeyboardOffset.d.ts.map +1 -0
- package/package.json +4 -2
- package/src/features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx +0 -1
- package/src/features/profile/Profile.tsx +83 -0
- package/src/features/profile/__tests__/ProfileModel.test.ts +99 -0
- package/src/features/profile/__tests__/profile.helpers.test.ts +57 -0
- package/src/features/profile/components/actions/ProfileActions.tsx +68 -0
- package/src/features/profile/components/cards/ProfileCard.tsx +53 -0
- package/src/features/profile/components/info/AccountInfoCard.tsx +74 -0
- package/src/features/profile/components/modals/JoinClassModal.tsx +180 -0
- package/src/features/profile/components/modals/LogoutConfirmModal.tsx +64 -0
- package/src/features/profile/components/modals/TranslationLanguageModal.tsx +126 -0
- package/src/features/profile/components/settings/LanguageSettingsCard.tsx +16 -0
- package/src/features/profile/components/settings/PreferencesCard.tsx +67 -0
- package/src/features/profile/components/settings/SettingRow.tsx +42 -0
- package/src/features/profile/components/settings/TextSettingsCard.tsx +64 -0
- package/src/features/profile/components/settings/TextSizeSlider.tsx +117 -0
- package/src/features/profile/components/settings/TextToSpeechRow.tsx +29 -0
- package/src/features/profile/components/settings/TranslationLanguageRow.tsx +60 -0
- package/src/features/profile/context/ProfileContext.tsx +24 -0
- package/src/features/profile/index.ts +11 -0
- package/src/features/profile/model/ProfileApi.ts +23 -0
- package/src/features/profile/model/ProfileJoinClassModel.ts +58 -0
- package/src/features/profile/model/ProfileLanguageModel.ts +26 -0
- package/src/features/profile/model/ProfileModel.ts +57 -0
- package/src/features/profile/model/profileModal.types.ts +16 -0
- package/src/features/profile/shared/JoinClassError.ts +7 -0
- package/src/features/profile/shared/profile.constants.ts +23 -0
- package/src/features/profile/shared/profile.helpers.ts +36 -0
- package/src/features/profile/shared/profile.types.ts +34 -0
- package/src/i18n/.generated/schema.json +9 -1
- package/src/index.ts +1 -0
- package/src/shared/hooks/useKeyboardOffset.ts +57 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LogoutConfirmModal = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
+
var _i18n = require("../../../../i18n/i18n.js");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const LogoutConfirmModal = ({
|
|
14
|
+
modal: {
|
|
15
|
+
closeModal,
|
|
16
|
+
params
|
|
17
|
+
}
|
|
18
|
+
}) => {
|
|
19
|
+
const t = (0, _i18n.useText)();
|
|
20
|
+
const confirm = () => {
|
|
21
|
+
closeModal();
|
|
22
|
+
params.onConfirm();
|
|
23
|
+
};
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.BaseModal, {
|
|
25
|
+
onClose: closeModal,
|
|
26
|
+
style: modalStyle,
|
|
27
|
+
header: t('profile.logOut'),
|
|
28
|
+
content: t('profile.logOutConfirmMessage'),
|
|
29
|
+
footer: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
30
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
|
|
31
|
+
variant: _reactNativeUi.ButtonVariant.TERTIARY,
|
|
32
|
+
size: _reactNativeUi.ButtonSize.LARGE,
|
|
33
|
+
onPress: closeModal,
|
|
34
|
+
style: buttonTextStyle,
|
|
35
|
+
children: t('profile.cancel')
|
|
36
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
|
|
37
|
+
colorScheme: _reactNativeUi.ButtonColor.ORANGE,
|
|
38
|
+
size: _reactNativeUi.ButtonSize.LARGE,
|
|
39
|
+
onPress: confirm,
|
|
40
|
+
style: buttonTextStyle,
|
|
41
|
+
children: t('profile.yes')
|
|
42
|
+
})]
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
exports.LogoutConfirmModal = LogoutConfirmModal;
|
|
47
|
+
const styles = _reactNative.StyleSheet.create({
|
|
48
|
+
modal: {
|
|
49
|
+
width: 530
|
|
50
|
+
},
|
|
51
|
+
uppercase: {
|
|
52
|
+
textTransform: 'uppercase'
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const modalStyle = {
|
|
56
|
+
container: styles.modal
|
|
57
|
+
};
|
|
58
|
+
const buttonTextStyle = {
|
|
59
|
+
text: styles.uppercase
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=LogoutConfirmModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeUi","_i18n","_jsxRuntime","e","__esModule","default","LogoutConfirmModal","modal","closeModal","params","t","useText","confirm","onConfirm","jsx","BaseModal","onClose","style","modalStyle","header","content","footer","jsxs","Fragment","children","Button","variant","ButtonVariant","TERTIARY","size","ButtonSize","LARGE","onPress","buttonTextStyle","colorScheme","ButtonColor","ORANGE","exports","styles","StyleSheet","create","width","uppercase","textTransform","container","text"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/modals/LogoutConfirmModal.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAQA,IAAAG,KAAA,GAAAH,OAAA;AAA+C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGxC,MAAMG,kBAAkB,GAAGA,CAAC;EACjCC,KAAK,EAAE;IAAEC,UAAU;IAAEC;EAAO;AACQ,CAAC,KAAK;EAC1C,MAAMC,CAAC,GAAG,IAAAC,aAAO,EAAC,CAAC;EAEnB,MAAMC,OAAO,GAAGA,CAAA,KAAM;IACpBJ,UAAU,CAAC,CAAC;IACZC,MAAM,CAACI,SAAS,CAAC,CAAC;EACpB,CAAC;EAED,oBACE,IAAAX,WAAA,CAAAY,GAAA,EAACd,cAAA,CAAAe,SAAS;IACRC,OAAO,EAAER,UAAW;IACpBS,KAAK,EAAEC,UAAW;IAClBC,MAAM,EAAET,CAAC,CAAC,gBAAgB,CAAE;IAC5BU,OAAO,EAAEV,CAAC,CAAC,8BAA8B,CAAE;IAC3CW,MAAM,eACJ,IAAAnB,WAAA,CAAAoB,IAAA,EAAApB,WAAA,CAAAqB,QAAA;MAAAC,QAAA,gBACE,IAAAtB,WAAA,CAAAY,GAAA,EAACd,cAAA,CAAAyB,MAAM;QACLC,OAAO,EAAEC,4BAAa,CAACC,QAAS;QAChCC,IAAI,EAAEC,yBAAU,CAACC,KAAM;QACvBC,OAAO,EAAExB,UAAW;QACpBS,KAAK,EAAEgB,eAAgB;QAAAT,QAAA,EAEtBd,CAAC,CAAC,gBAAgB;MAAC,CACd,CAAC,eACT,IAAAR,WAAA,CAAAY,GAAA,EAACd,cAAA,CAAAyB,MAAM;QACLS,WAAW,EAAEC,0BAAW,CAACC,MAAO;QAChCP,IAAI,EAAEC,yBAAU,CAACC,KAAM;QACvBC,OAAO,EAAEpB,OAAQ;QACjBK,KAAK,EAAEgB,eAAgB;QAAAT,QAAA,EAEtBd,CAAC,CAAC,aAAa;MAAC,CACX,CAAC;IAAA,CACT;EACH,CACF,CAAC;AAEN,CAAC;AAAA2B,OAAA,CAAA/B,kBAAA,GAAAA,kBAAA;AAED,MAAMgC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;EAC/BjC,KAAK,EAAE;IACLkC,KAAK,EAAE;EACT,CAAC;EACDC,SAAS,EAAE;IACTC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,MAAMzB,UAAU,GAAG;EAAE0B,SAAS,EAAEN,MAAM,CAAC/B;AAAM,CAAC;AAC9C,MAAM0B,eAAe,GAAG;EAAEY,IAAI,EAAEP,MAAM,CAACI;AAAU,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,128 @@
|
|
|
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 _studentsQa = require("@magmamath/students-qa");
|
|
12
|
+
var _i18n = require("../../../../i18n/i18n.js");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
const LIST_HEIGHT = 360;
|
|
16
|
+
const TranslationLanguageModal = ({
|
|
17
|
+
modal: {
|
|
18
|
+
closeModal,
|
|
19
|
+
params
|
|
20
|
+
}
|
|
21
|
+
}) => {
|
|
22
|
+
const t = (0, _i18n.useText)();
|
|
23
|
+
const {
|
|
24
|
+
model
|
|
25
|
+
} = params;
|
|
26
|
+
const {
|
|
27
|
+
search,
|
|
28
|
+
languages,
|
|
29
|
+
settings
|
|
30
|
+
} = (0, _effectorReact.useUnit)({
|
|
31
|
+
search: model.language.$search,
|
|
32
|
+
languages: model.language.$languages,
|
|
33
|
+
settings: model.$settings
|
|
34
|
+
});
|
|
35
|
+
const closeAndReset = () => {
|
|
36
|
+
model.language.reset();
|
|
37
|
+
closeModal();
|
|
38
|
+
};
|
|
39
|
+
const selectLanguage = language => {
|
|
40
|
+
model.language.selectLanguage(language);
|
|
41
|
+
closeAndReset();
|
|
42
|
+
};
|
|
43
|
+
const items = languages.map(language => ({
|
|
44
|
+
id: language,
|
|
45
|
+
label: language,
|
|
46
|
+
radio: true,
|
|
47
|
+
color: _reactNativeUi.CheckboxColor.ORANGE
|
|
48
|
+
}));
|
|
49
|
+
const selectedItems = items.filter(item => item.id === settings.translationLanguage);
|
|
50
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.BaseModal, {
|
|
51
|
+
onClose: closeAndReset,
|
|
52
|
+
style: modalStyle,
|
|
53
|
+
header: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
54
|
+
style: styles.header,
|
|
55
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
56
|
+
variant: _reactNativeUi.HeadingVariants.H2,
|
|
57
|
+
align: "center",
|
|
58
|
+
style: styles.title,
|
|
59
|
+
children: t('profile.translationModalTitle')
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Search, {
|
|
61
|
+
nativeID: "translation-language-search",
|
|
62
|
+
value: search,
|
|
63
|
+
onChangeText: model.language.setSearch,
|
|
64
|
+
placeholder: t('profile.search'),
|
|
65
|
+
containerStyle: styles.search,
|
|
66
|
+
testID: _studentsQa.TEST_IDS.LANGUAGE_SEARCH_INPUT
|
|
67
|
+
})]
|
|
68
|
+
}),
|
|
69
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
70
|
+
style: styles.content,
|
|
71
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Checkbox, {
|
|
72
|
+
radio: true,
|
|
73
|
+
label: t('profile.noLanguage'),
|
|
74
|
+
checked: !settings.translationLanguage,
|
|
75
|
+
color: _reactNativeUi.CheckboxColor.ORANGE,
|
|
76
|
+
style: noLanguageStyle,
|
|
77
|
+
onPress: () => selectLanguage(null)
|
|
78
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
79
|
+
style: styles.divider
|
|
80
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.CheckboxGroup, {
|
|
81
|
+
items: items,
|
|
82
|
+
selectedItems: selectedItems,
|
|
83
|
+
initialNumToRender: items.length,
|
|
84
|
+
style: listStyle,
|
|
85
|
+
onPress: item => selectLanguage(languages.find(language => language === item.id) ?? null)
|
|
86
|
+
})]
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
exports.TranslationLanguageModal = TranslationLanguageModal;
|
|
91
|
+
const styles = _reactNative.StyleSheet.create({
|
|
92
|
+
modal: {
|
|
93
|
+
width: 530
|
|
94
|
+
},
|
|
95
|
+
header: {
|
|
96
|
+
gap: _reactNativeUi.SPACING['500']
|
|
97
|
+
},
|
|
98
|
+
title: {
|
|
99
|
+
color: _reactNativeUi.COLORS.NEUTRAL_9
|
|
100
|
+
},
|
|
101
|
+
search: {
|
|
102
|
+
width: '100%'
|
|
103
|
+
},
|
|
104
|
+
content: {
|
|
105
|
+
gap: _reactNativeUi.SPACING['300']
|
|
106
|
+
},
|
|
107
|
+
noLanguage: {
|
|
108
|
+
paddingLeft: _reactNativeUi.SPACING['200']
|
|
109
|
+
},
|
|
110
|
+
divider: {
|
|
111
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_3,
|
|
112
|
+
height: 1
|
|
113
|
+
},
|
|
114
|
+
list: {
|
|
115
|
+
height: LIST_HEIGHT,
|
|
116
|
+
width: '100%'
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
const modalStyle = {
|
|
120
|
+
container: styles.modal
|
|
121
|
+
};
|
|
122
|
+
const noLanguageStyle = {
|
|
123
|
+
container: styles.noLanguage
|
|
124
|
+
};
|
|
125
|
+
const listStyle = {
|
|
126
|
+
container: styles.list
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=TranslationLanguageModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_effectorReact","_reactNativeUi","_studentsQa","_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","testID","TEST_IDS","LANGUAGE_SEARCH_INPUT","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,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAH,OAAA;AAWA,IAAAI,WAAA,GAA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,MAAM,CAACrC;AAAM,CAAC;AAC9C,MAAM0D,eAAe,GAAG;EAAEsB,SAAS,EAAE3C,MAAM,CAACqC;AAAW,CAAC;AACxD,MAAMV,SAAS,GAAG;EAAEgB,SAAS,EAAE3C,MAAM,CAAC0C;AAAK,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
const CANVAS_OPTIONS = [{
|
|
24
|
+
key: String(_profileConstants.ProfileCanvasType.DRAWING),
|
|
25
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.PencilIcon, {
|
|
26
|
+
size: ICON_SIZE,
|
|
27
|
+
color: _reactNativeUi.COLORS.NEUTRAL_9
|
|
28
|
+
})
|
|
29
|
+
}, {
|
|
30
|
+
key: String(_profileConstants.ProfileCanvasType.SPREADSHEET),
|
|
31
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.KeyboardIcon, {
|
|
32
|
+
size: ICON_SIZE,
|
|
33
|
+
color: _reactNativeUi.COLORS.NEUTRAL_9
|
|
34
|
+
})
|
|
35
|
+
}];
|
|
36
|
+
const PreferencesCard = () => {
|
|
37
|
+
const t = (0, _i18n.useText)();
|
|
38
|
+
const {
|
|
39
|
+
model
|
|
40
|
+
} = (0, _ProfileContext.useProfile)();
|
|
41
|
+
const settings = (0, _effectorReact.useUnit)(model.$settings);
|
|
42
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProfileCard.ProfileCard, {
|
|
43
|
+
title: t('profile.preferences'),
|
|
44
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingRow.SettingRow, {
|
|
45
|
+
label: t('profile.solveMode'),
|
|
46
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
47
|
+
style: styles.control,
|
|
48
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.SelectGroup, {
|
|
49
|
+
color: _reactNativeUi.SelectOptionColor.GREY,
|
|
50
|
+
options: CANVAS_OPTIONS,
|
|
51
|
+
selectedOptions: CANVAS_OPTIONS.filter(({
|
|
52
|
+
key
|
|
53
|
+
}) => key === String(settings.canvasType)),
|
|
54
|
+
onOptionChange: ({
|
|
55
|
+
key
|
|
56
|
+
}) => model.setCanvasType(key === String(_profileConstants.ProfileCanvasType.SPREADSHEET) ? _profileConstants.ProfileCanvasType.SPREADSHEET : _profileConstants.ProfileCanvasType.DRAWING)
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
exports.PreferencesCard = PreferencesCard;
|
|
63
|
+
const styles = _reactNative.StyleSheet.create({
|
|
64
|
+
control: {
|
|
65
|
+
flex: 1,
|
|
66
|
+
maxWidth: CONTROL_MAX_WIDTH
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=PreferencesCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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","KeyboardIcon","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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
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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":[]}
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
padding: _reactNativeUi.SPACING['200']
|
|
61
|
+
},
|
|
62
|
+
sliderWrap: {
|
|
63
|
+
gap: _reactNativeUi.SPACING['200'],
|
|
64
|
+
margin: _reactNativeUi.SPACING['100']
|
|
65
|
+
},
|
|
66
|
+
markers: {
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
flexDirection: 'row',
|
|
69
|
+
justifyContent: 'space-between'
|
|
70
|
+
},
|
|
71
|
+
marker: {
|
|
72
|
+
color: _reactNativeUi.COLORS.NEUTRAL_7,
|
|
73
|
+
fontWeight: '700',
|
|
74
|
+
width: 16
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
//# sourceMappingURL=TextSettingsCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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","padding","SPACING","gap","margin","alignItems","flexDirection","justifyContent","NEUTRAL_7","fontWeight","width"],"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,WAAA,GAAAR,O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EpF,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,SAAS;IACvBC,OAAO,EAAEC,sBAAO,CAAC,KAAK;EACxB,CAAC;EACDpB,UAAU,EAAE;IACVqB,GAAG,EAAED,sBAAO,CAAC,KAAK,CAAC;IACnBE,MAAM,EAAEF,sBAAO,CAAC,KAAK;EACvB,CAAC;EACDd,OAAO,EAAE;IACPiB,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDhB,MAAM,EAAE;IACNO,KAAK,EAAEC,qBAAM,CAACS,SAAS;IACvBC,UAAU,EAAE,KAAK;IACjBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,119 @@
|
|
|
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 _studentsQa = require("@magmamath/students-qa");
|
|
11
|
+
var _profileConstants = require("../../shared/profile.constants.js");
|
|
12
|
+
var _profileHelpers = require("../../shared/profile.helpers.js");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
const THUMB_SIZE = 20;
|
|
17
|
+
const DOT_SIZE = 6;
|
|
18
|
+
const TRACK_HEIGHT = 10;
|
|
19
|
+
const TRACK_RADIUS = 5;
|
|
20
|
+
const STEPS = (_profileConstants.TEXT_SIZE.MAX - _profileConstants.TEXT_SIZE.MIN) / _profileConstants.TEXT_SIZE.STEP + 1;
|
|
21
|
+
const RANGE = _profileConstants.TEXT_SIZE.MAX - _profileConstants.TEXT_SIZE.MIN;
|
|
22
|
+
const TRACK_PADDING = THUMB_SIZE / 2 - DOT_SIZE / 2;
|
|
23
|
+
const TextSizeSlider = ({
|
|
24
|
+
value,
|
|
25
|
+
onSlidingComplete
|
|
26
|
+
}) => {
|
|
27
|
+
const [trackWidth, setTrackWidth] = (0, _react.useState)(0);
|
|
28
|
+
const [dragValue, setDragValue] = (0, _react.useState)(null);
|
|
29
|
+
const widthRef = (0, _react.useRef)(0);
|
|
30
|
+
const onCompleteRef = (0, _react.useRef)(onSlidingComplete);
|
|
31
|
+
onCompleteRef.current = onSlidingComplete;
|
|
32
|
+
const currentValue = dragValue ?? value;
|
|
33
|
+
const fraction = RANGE === 0 ? 0 : (currentValue - _profileConstants.TEXT_SIZE.MIN) / RANGE;
|
|
34
|
+
const travel = Math.max(0, trackWidth - THUMB_SIZE);
|
|
35
|
+
const measureTrack = event => {
|
|
36
|
+
const width = event.nativeEvent.layout.width;
|
|
37
|
+
widthRef.current = width;
|
|
38
|
+
setTrackWidth(width);
|
|
39
|
+
};
|
|
40
|
+
const valueFromX = x => {
|
|
41
|
+
const width = widthRef.current;
|
|
42
|
+
if (width <= 0) return _profileConstants.TEXT_SIZE.MIN;
|
|
43
|
+
const ratio = Math.min(1, Math.max(0, x / width));
|
|
44
|
+
return (0, _profileHelpers.snapTextSize)(_profileConstants.TEXT_SIZE.MIN + ratio * RANGE);
|
|
45
|
+
};
|
|
46
|
+
const panResponder = (0, _react.useRef)(_reactNative.PanResponder.create({
|
|
47
|
+
onStartShouldSetPanResponder: () => true,
|
|
48
|
+
onMoveShouldSetPanResponder: () => true,
|
|
49
|
+
onPanResponderGrant: event => setDragValue(valueFromX(event.nativeEvent.locationX)),
|
|
50
|
+
onPanResponderMove: event => setDragValue(valueFromX(event.nativeEvent.locationX)),
|
|
51
|
+
onPanResponderRelease: event => {
|
|
52
|
+
const next = valueFromX(event.nativeEvent.locationX);
|
|
53
|
+
setDragValue(null);
|
|
54
|
+
onCompleteRef.current(next);
|
|
55
|
+
},
|
|
56
|
+
onPanResponderTerminate: () => setDragValue(null)
|
|
57
|
+
})).current;
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
59
|
+
style: styles.container,
|
|
60
|
+
onLayout: measureTrack,
|
|
61
|
+
testID: _studentsQa.TEST_IDS.TEXT_SIZE_SLIDER,
|
|
62
|
+
...panResponder.panHandlers,
|
|
63
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
64
|
+
style: styles.track,
|
|
65
|
+
children: Array.from({
|
|
66
|
+
length: STEPS
|
|
67
|
+
}, (_, index) => {
|
|
68
|
+
const isEdge = index === 0 || index === STEPS - 1;
|
|
69
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
70
|
+
style: [styles.dot, isEdge && styles.dotHidden]
|
|
71
|
+
}, index);
|
|
72
|
+
})
|
|
73
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
74
|
+
style: [styles.thumb, {
|
|
75
|
+
left: fraction * travel
|
|
76
|
+
}]
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
exports.TextSizeSlider = TextSizeSlider;
|
|
81
|
+
const styles = _reactNative.StyleSheet.create({
|
|
82
|
+
container: {
|
|
83
|
+
cursor: 'pointer',
|
|
84
|
+
height: THUMB_SIZE,
|
|
85
|
+
justifyContent: 'center',
|
|
86
|
+
width: '100%'
|
|
87
|
+
},
|
|
88
|
+
track: {
|
|
89
|
+
alignItems: 'center',
|
|
90
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_3,
|
|
91
|
+
borderColor: _reactNativeUi.COLORS.NEUTRAL_4,
|
|
92
|
+
borderRadius: TRACK_RADIUS,
|
|
93
|
+
borderWidth: 0.5,
|
|
94
|
+
boxShadow: 'inset -3px -3px 3px rgba(255, 255, 255, 0.6), inset 2px 2px 3px rgba(0, 0, 0, 0.12)',
|
|
95
|
+
flexDirection: 'row',
|
|
96
|
+
height: TRACK_HEIGHT,
|
|
97
|
+
justifyContent: 'space-between',
|
|
98
|
+
paddingHorizontal: TRACK_PADDING,
|
|
99
|
+
width: '100%'
|
|
100
|
+
},
|
|
101
|
+
dot: {
|
|
102
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_5,
|
|
103
|
+
borderRadius: DOT_SIZE / 2,
|
|
104
|
+
height: DOT_SIZE,
|
|
105
|
+
width: DOT_SIZE
|
|
106
|
+
},
|
|
107
|
+
dotHidden: {
|
|
108
|
+
opacity: 0
|
|
109
|
+
},
|
|
110
|
+
thumb: {
|
|
111
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
|
|
112
|
+
borderRadius: THUMB_SIZE / 2,
|
|
113
|
+
boxShadow: '0px 2px 6px rgba(0, 0, 0, 0.2)',
|
|
114
|
+
height: THUMB_SIZE,
|
|
115
|
+
position: 'absolute',
|
|
116
|
+
width: THUMB_SIZE
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
//# sourceMappingURL=TextSizeSlider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeUi","_studentsQa","_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","testID","TEST_IDS","TEXT_SIZE_SLIDER","panHandlers","children","jsx","track","Array","from","length","_","index","isEdge","dot","dotHidden","thumb","left","exports","StyleSheet","cursor","height","justifyContent","alignItems","backgroundColor","COLORS","NEUTRAL_3","borderColor","NEUTRAL_4","borderRadius","borderWidth","boxShadow","flexDirection","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AAQ;IACpBC,eAAe,EAAEC,qBAAM,CAACC,SAAS;IACjCC,WAAW,EAAEF,qBAAM,CAACG,SAAS;IAC7BC,YAAY,EAAEhF,YAAY;IAC1BiF,WAAW,EAAE,GAAG;IAChBC,SAAS,EACP,qFAAqF;IACvFC,aAAa,EAAE,KAAK;IACpBX,MAAM,EAAEzE,YAAY;IACpB0E,cAAc,EAAE,eAAe;IAC/BW,iBAAiB,EAAE7E,aAAa;IAChCoB,KAAK,EAAE;EACT,CAAC;EACDsC,GAAG,EAAE;IACHU,eAAe,EAAEC,qBAAM,CAACS,SAAS;IACjCL,YAAY,EAAElF,QAAQ,GAAG,CAAC;IAC1B0E,MAAM,EAAE1E,QAAQ;IAChB6B,KAAK,EAAE7B;EACT,CAAC;EACDoE,SAAS,EAAE;IACToB,OAAO,EAAE;EACX,CAAC;EACDnB,KAAK,EAAE;IACLQ,eAAe,EAAEC,qBAAM,CAACW,SAAS;IACjCP,YAAY,EAAEnF,UAAU,GAAG,CAAC;IAC5BqF,SAAS,EAAE,gCAAgC;IAC3CV,MAAM,EAAE3E,UAAU;IAClB2F,QAAQ,EAAE,UAAU;IACpB7D,KAAK,EAAE9B;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 _studentsQa = require("@magmamath/students-qa");
|
|
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 TextToSpeechRow = () => {
|
|
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.jsx)(_SettingRow.SettingRow, {
|
|
24
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.SpeakerIcon, {
|
|
25
|
+
size: ICON_SIZE,
|
|
26
|
+
color: _reactNativeUi.COLORS.NEUTRAL_7
|
|
27
|
+
}),
|
|
28
|
+
label: t('profile.textToSpeech'),
|
|
29
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Toggle, {
|
|
30
|
+
value: settings.textToSpeech,
|
|
31
|
+
onValueChange: model.setTextToSpeech,
|
|
32
|
+
testID: _studentsQa.TEST_IDS.PROFILE_TTS_SWITCH
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
exports.TextToSpeechRow = TextToSpeechRow;
|
|
37
|
+
//# sourceMappingURL=TextToSpeechRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_effectorReact","_reactNativeUi","_studentsQa","_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","testID","TEST_IDS","PROFILE_TTS_SWITCH","exports"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/TextToSpeechRow.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,C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