@magmamath/students-features 1.8.4-rc.7 → 1.8.4-rc.8
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/profile/components/modals/LogoutConfirmModal.js +61 -0
- package/dist/commonjs/features/profile/components/modals/LogoutConfirmModal.js.map +1 -0
- package/dist/commonjs/features/profile/index.js +8 -0
- package/dist/commonjs/features/profile/index.js.map +1 -1
- 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/index.js +1 -0
- package/dist/module/features/profile/index.js.map +1 -1
- 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/index.d.ts +2 -1
- package/dist/typescript/commonjs/features/profile/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/profile/model/profileModal.types.d.ts +5 -2
- package/dist/typescript/commonjs/features/profile/model/profileModal.types.d.ts.map +1 -1
- 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/index.d.ts +2 -1
- package/dist/typescript/module/features/profile/index.d.ts.map +1 -1
- package/dist/typescript/module/features/profile/model/profileModal.types.d.ts +5 -2
- package/dist/typescript/module/features/profile/model/profileModal.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/profile/components/modals/LogoutConfirmModal.tsx +64 -0
- package/src/features/profile/index.ts +2 -1
- package/src/features/profile/model/profileModal.types.ts +6 -2
- package/src/i18n/.generated/schema.json +4 -1
|
@@ -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":[]}
|
|
@@ -8,6 +8,7 @@ var _exportNames = {
|
|
|
8
8
|
ProfileModel: true,
|
|
9
9
|
TranslationLanguageModal: true,
|
|
10
10
|
JoinClassModal: true,
|
|
11
|
+
LogoutConfirmModal: true,
|
|
11
12
|
JoinClassError: true
|
|
12
13
|
};
|
|
13
14
|
Object.defineProperty(exports, "JoinClassError", {
|
|
@@ -22,6 +23,12 @@ Object.defineProperty(exports, "JoinClassModal", {
|
|
|
22
23
|
return _JoinClassModal.JoinClassModal;
|
|
23
24
|
}
|
|
24
25
|
});
|
|
26
|
+
Object.defineProperty(exports, "LogoutConfirmModal", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () {
|
|
29
|
+
return _LogoutConfirmModal.LogoutConfirmModal;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
25
32
|
Object.defineProperty(exports, "Profile", {
|
|
26
33
|
enumerable: true,
|
|
27
34
|
get: function () {
|
|
@@ -44,6 +51,7 @@ var _Profile = require("./Profile.js");
|
|
|
44
51
|
var _ProfileModel = require("./model/ProfileModel.js");
|
|
45
52
|
var _TranslationLanguageModal = require("./components/modals/TranslationLanguageModal.js");
|
|
46
53
|
var _JoinClassModal = require("./components/modals/JoinClassModal.js");
|
|
54
|
+
var _LogoutConfirmModal = require("./components/modals/LogoutConfirmModal.js");
|
|
47
55
|
var _JoinClassError = require("./shared/JoinClassError.js");
|
|
48
56
|
var _profileTypes = require("./shared/profile.types.js");
|
|
49
57
|
Object.keys(_profileTypes).forEach(function (key) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_Profile","require","_ProfileModel","_TranslationLanguageModal","_JoinClassModal","_JoinClassError","_profileTypes","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_profileConstants"],"sourceRoot":"../../../../src","sources":["features/profile/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_Profile","require","_ProfileModel","_TranslationLanguageModal","_JoinClassModal","_LogoutConfirmModal","_JoinClassError","_profileTypes","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_profileConstants"],"sourceRoot":"../../../../src","sources":["features/profile/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAGA,IAAAE,yBAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AAEA,IAAAK,eAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AAAAO,MAAA,CAAAC,IAAA,CAAAF,aAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,aAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,aAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,iBAAA,GAAAnB,OAAA;AAAAO,MAAA,CAAAC,IAAA,CAAAW,iBAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,iBAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,iBAAA,CAAAT,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StyleSheet } from 'react-native';
|
|
5
|
+
import { BaseModal, Button, ButtonColor, ButtonSize, ButtonVariant } from '@magmamath/react-native-ui';
|
|
6
|
+
import { useText } from "../../../../i18n/i18n.js";
|
|
7
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
export const LogoutConfirmModal = ({
|
|
9
|
+
modal: {
|
|
10
|
+
closeModal,
|
|
11
|
+
params
|
|
12
|
+
}
|
|
13
|
+
}) => {
|
|
14
|
+
const t = useText();
|
|
15
|
+
const confirm = () => {
|
|
16
|
+
closeModal();
|
|
17
|
+
params.onConfirm();
|
|
18
|
+
};
|
|
19
|
+
return /*#__PURE__*/_jsx(BaseModal, {
|
|
20
|
+
onClose: closeModal,
|
|
21
|
+
style: modalStyle,
|
|
22
|
+
header: t('profile.logOut'),
|
|
23
|
+
content: t('profile.logOutConfirmMessage'),
|
|
24
|
+
footer: /*#__PURE__*/_jsxs(_Fragment, {
|
|
25
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
26
|
+
variant: ButtonVariant.TERTIARY,
|
|
27
|
+
size: ButtonSize.LARGE,
|
|
28
|
+
onPress: closeModal,
|
|
29
|
+
style: buttonTextStyle,
|
|
30
|
+
children: t('profile.cancel')
|
|
31
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
32
|
+
colorScheme: ButtonColor.ORANGE,
|
|
33
|
+
size: ButtonSize.LARGE,
|
|
34
|
+
onPress: confirm,
|
|
35
|
+
style: buttonTextStyle,
|
|
36
|
+
children: t('profile.yes')
|
|
37
|
+
})]
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const styles = StyleSheet.create({
|
|
42
|
+
modal: {
|
|
43
|
+
width: 530
|
|
44
|
+
},
|
|
45
|
+
uppercase: {
|
|
46
|
+
textTransform: 'uppercase'
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const modalStyle = {
|
|
50
|
+
container: styles.modal
|
|
51
|
+
};
|
|
52
|
+
const buttonTextStyle = {
|
|
53
|
+
text: styles.uppercase
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=LogoutConfirmModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","BaseModal","Button","ButtonColor","ButtonSize","ButtonVariant","useText","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","LogoutConfirmModal","modal","closeModal","params","t","confirm","onConfirm","onClose","style","modalStyle","header","content","footer","children","variant","TERTIARY","size","LARGE","onPress","buttonTextStyle","colorScheme","ORANGE","styles","create","width","uppercase","textTransform","container","text"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/modals/LogoutConfirmModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AACzC,SACEC,SAAS,EACTC,MAAM,EACNC,WAAW,EACXC,UAAU,EACVC,aAAa,QACR,4BAA4B;AAEnC,SAASC,OAAO,QAAQ,0BAAuB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAG/C,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EACjCC,KAAK,EAAE;IAAEC,UAAU;IAAEC;EAAO;AACQ,CAAC,KAAK;EAC1C,MAAMC,CAAC,GAAGX,OAAO,CAAC,CAAC;EAEnB,MAAMY,OAAO,GAAGA,CAAA,KAAM;IACpBH,UAAU,CAAC,CAAC;IACZC,MAAM,CAACG,SAAS,CAAC,CAAC;EACpB,CAAC;EAED,oBACEX,IAAA,CAACP,SAAS;IACRmB,OAAO,EAAEL,UAAW;IACpBM,KAAK,EAAEC,UAAW;IAClBC,MAAM,EAAEN,CAAC,CAAC,gBAAgB,CAAE;IAC5BO,OAAO,EAAEP,CAAC,CAAC,8BAA8B,CAAE;IAC3CQ,MAAM,eACJb,KAAA,CAAAF,SAAA;MAAAgB,QAAA,gBACElB,IAAA,CAACN,MAAM;QACLyB,OAAO,EAAEtB,aAAa,CAACuB,QAAS;QAChCC,IAAI,EAAEzB,UAAU,CAAC0B,KAAM;QACvBC,OAAO,EAAEhB,UAAW;QACpBM,KAAK,EAAEW,eAAgB;QAAAN,QAAA,EAEtBT,CAAC,CAAC,gBAAgB;MAAC,CACd,CAAC,eACTT,IAAA,CAACN,MAAM;QACL+B,WAAW,EAAE9B,WAAW,CAAC+B,MAAO;QAChCL,IAAI,EAAEzB,UAAU,CAAC0B,KAAM;QACvBC,OAAO,EAAEb,OAAQ;QACjBG,KAAK,EAAEW,eAAgB;QAAAN,QAAA,EAEtBT,CAAC,CAAC,aAAa;MAAC,CACX,CAAC;IAAA,CACT;EACH,CACF,CAAC;AAEN,CAAC;AAED,MAAMkB,MAAM,GAAGnC,UAAU,CAACoC,MAAM,CAAC;EAC/BtB,KAAK,EAAE;IACLuB,KAAK,EAAE;EACT,CAAC;EACDC,SAAS,EAAE;IACTC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,MAAMjB,UAAU,GAAG;EAAEkB,SAAS,EAAEL,MAAM,CAACrB;AAAM,CAAC;AAC9C,MAAMkB,eAAe,GAAG;EAAES,IAAI,EAAEN,MAAM,CAACG;AAAU,CAAC","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ export { Profile } from "./Profile.js";
|
|
|
4
4
|
export { ProfileModel } from "./model/ProfileModel.js";
|
|
5
5
|
export { TranslationLanguageModal } from "./components/modals/TranslationLanguageModal.js";
|
|
6
6
|
export { JoinClassModal } from "./components/modals/JoinClassModal.js";
|
|
7
|
+
export { LogoutConfirmModal } from "./components/modals/LogoutConfirmModal.js";
|
|
7
8
|
export { JoinClassError } from "./shared/JoinClassError.js";
|
|
8
9
|
export * from "./shared/profile.types.js";
|
|
9
10
|
export * from "./shared/profile.constants.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Profile","ProfileModel","TranslationLanguageModal","JoinClassModal","JoinClassError"],"sourceRoot":"../../../../src","sources":["features/profile/index.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,cAAW;AACnC,SAASC,YAAY,QAAQ,yBAAsB;AAGnD,SAASC,wBAAwB,QAAQ,iDAA8C;AACvF,SAASC,cAAc,QAAQ,uCAAoC;
|
|
1
|
+
{"version":3,"names":["Profile","ProfileModel","TranslationLanguageModal","JoinClassModal","LogoutConfirmModal","JoinClassError"],"sourceRoot":"../../../../src","sources":["features/profile/index.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,cAAW;AACnC,SAASC,YAAY,QAAQ,yBAAsB;AAGnD,SAASC,wBAAwB,QAAQ,iDAA8C;AACvF,SAASC,cAAc,QAAQ,uCAAoC;AACnE,SAASC,kBAAkB,QAAQ,2CAAwC;AAE3E,SAASC,cAAc,QAAQ,4BAAyB;AACxD,cAAc,2BAAwB;AACtC,cAAc,+BAA4B","ignoreList":[]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LogoutModalParams, ProfileModalProps } from '../../model/profileModal.types';
|
|
3
|
+
export declare const LogoutConfirmModal: ({ modal: { closeModal, params }, }: ProfileModalProps<LogoutModalParams>) => React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=LogoutConfirmModal.d.ts.map
|
package/dist/typescript/commonjs/features/profile/components/modals/LogoutConfirmModal.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogoutConfirmModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/modals/LogoutConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAE1F,eAAO,MAAM,kBAAkB,uCAE5B,iBAAiB,CAAC,iBAAiB,CAAC,sBAoCtC,CAAA"}
|
|
@@ -4,7 +4,8 @@ export type { ProfileApiProps } from './model/ProfileApi';
|
|
|
4
4
|
export type { ProfileContextValue } from './context/ProfileContext';
|
|
5
5
|
export { TranslationLanguageModal } from './components/modals/TranslationLanguageModal';
|
|
6
6
|
export { JoinClassModal } from './components/modals/JoinClassModal';
|
|
7
|
-
export
|
|
7
|
+
export { LogoutConfirmModal } from './components/modals/LogoutConfirmModal';
|
|
8
|
+
export type { ProfileModalParams, LogoutModalParams } from './model/profileModal.types';
|
|
8
9
|
export { JoinClassError } from './shared/JoinClassError';
|
|
9
10
|
export * from './shared/profile.types';
|
|
10
11
|
export * from './shared/profile.constants';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACnE,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAC3E,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA"}
|
|
@@ -2,10 +2,13 @@ import type { ProfileModel } from './ProfileModel';
|
|
|
2
2
|
export type ProfileModalParams = {
|
|
3
3
|
model: ProfileModel;
|
|
4
4
|
};
|
|
5
|
-
export type
|
|
5
|
+
export type LogoutModalParams = {
|
|
6
|
+
onConfirm: () => void;
|
|
7
|
+
};
|
|
8
|
+
export type ProfileModalProps<Params = ProfileModalParams> = {
|
|
6
9
|
modal: {
|
|
7
10
|
closeModal: () => void;
|
|
8
|
-
params:
|
|
11
|
+
params: Params;
|
|
9
12
|
};
|
|
10
13
|
};
|
|
11
14
|
//# sourceMappingURL=profileModal.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileModal.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/profile/model/profileModal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,YAAY,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,IAAI,CAAA;QACtB,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"profileModal.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/profile/model/profileModal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,YAAY,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,iBAAiB,CAAC,MAAM,GAAG,kBAAkB,IAAI;IAC3D,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,IAAI,CAAA;QACtB,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;CACF,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LogoutModalParams, ProfileModalProps } from '../../model/profileModal.types';
|
|
3
|
+
export declare const LogoutConfirmModal: ({ modal: { closeModal, params }, }: ProfileModalProps<LogoutModalParams>) => React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=LogoutConfirmModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogoutConfirmModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/modals/LogoutConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAE1F,eAAO,MAAM,kBAAkB,uCAE5B,iBAAiB,CAAC,iBAAiB,CAAC,sBAoCtC,CAAA"}
|
|
@@ -4,7 +4,8 @@ export type { ProfileApiProps } from './model/ProfileApi';
|
|
|
4
4
|
export type { ProfileContextValue } from './context/ProfileContext';
|
|
5
5
|
export { TranslationLanguageModal } from './components/modals/TranslationLanguageModal';
|
|
6
6
|
export { JoinClassModal } from './components/modals/JoinClassModal';
|
|
7
|
-
export
|
|
7
|
+
export { LogoutConfirmModal } from './components/modals/LogoutConfirmModal';
|
|
8
|
+
export type { ProfileModalParams, LogoutModalParams } from './model/profileModal.types';
|
|
8
9
|
export { JoinClassError } from './shared/JoinClassError';
|
|
9
10
|
export * from './shared/profile.types';
|
|
10
11
|
export * from './shared/profile.constants';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACnE,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAC3E,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA"}
|
|
@@ -2,10 +2,13 @@ import type { ProfileModel } from './ProfileModel';
|
|
|
2
2
|
export type ProfileModalParams = {
|
|
3
3
|
model: ProfileModel;
|
|
4
4
|
};
|
|
5
|
-
export type
|
|
5
|
+
export type LogoutModalParams = {
|
|
6
|
+
onConfirm: () => void;
|
|
7
|
+
};
|
|
8
|
+
export type ProfileModalProps<Params = ProfileModalParams> = {
|
|
6
9
|
modal: {
|
|
7
10
|
closeModal: () => void;
|
|
8
|
-
params:
|
|
11
|
+
params: Params;
|
|
9
12
|
};
|
|
10
13
|
};
|
|
11
14
|
//# sourceMappingURL=profileModal.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileModal.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/profile/model/profileModal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,YAAY,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,IAAI,CAAA;QACtB,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"profileModal.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/profile/model/profileModal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,YAAY,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,iBAAiB,CAAC,MAAM,GAAG,kBAAkB,IAAI;IAC3D,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,IAAI,CAAA;QACtB,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;CACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StyleSheet } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
BaseModal,
|
|
5
|
+
Button,
|
|
6
|
+
ButtonColor,
|
|
7
|
+
ButtonSize,
|
|
8
|
+
ButtonVariant,
|
|
9
|
+
} from '@magmamath/react-native-ui'
|
|
10
|
+
|
|
11
|
+
import { useText } from '../../../../i18n/i18n'
|
|
12
|
+
import type { LogoutModalParams, ProfileModalProps } from '../../model/profileModal.types'
|
|
13
|
+
|
|
14
|
+
export const LogoutConfirmModal = ({
|
|
15
|
+
modal: { closeModal, params },
|
|
16
|
+
}: ProfileModalProps<LogoutModalParams>) => {
|
|
17
|
+
const t = useText()
|
|
18
|
+
|
|
19
|
+
const confirm = () => {
|
|
20
|
+
closeModal()
|
|
21
|
+
params.onConfirm()
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<BaseModal
|
|
26
|
+
onClose={closeModal}
|
|
27
|
+
style={modalStyle}
|
|
28
|
+
header={t('profile.logOut')}
|
|
29
|
+
content={t('profile.logOutConfirmMessage')}
|
|
30
|
+
footer={
|
|
31
|
+
<>
|
|
32
|
+
<Button
|
|
33
|
+
variant={ButtonVariant.TERTIARY}
|
|
34
|
+
size={ButtonSize.LARGE}
|
|
35
|
+
onPress={closeModal}
|
|
36
|
+
style={buttonTextStyle}
|
|
37
|
+
>
|
|
38
|
+
{t('profile.cancel')}
|
|
39
|
+
</Button>
|
|
40
|
+
<Button
|
|
41
|
+
colorScheme={ButtonColor.ORANGE}
|
|
42
|
+
size={ButtonSize.LARGE}
|
|
43
|
+
onPress={confirm}
|
|
44
|
+
style={buttonTextStyle}
|
|
45
|
+
>
|
|
46
|
+
{t('profile.yes')}
|
|
47
|
+
</Button>
|
|
48
|
+
</>
|
|
49
|
+
}
|
|
50
|
+
/>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const styles = StyleSheet.create({
|
|
55
|
+
modal: {
|
|
56
|
+
width: 530,
|
|
57
|
+
},
|
|
58
|
+
uppercase: {
|
|
59
|
+
textTransform: 'uppercase',
|
|
60
|
+
},
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
const modalStyle = { container: styles.modal }
|
|
64
|
+
const buttonTextStyle = { text: styles.uppercase }
|
|
@@ -4,7 +4,8 @@ export type { ProfileApiProps } from './model/ProfileApi'
|
|
|
4
4
|
export type { ProfileContextValue } from './context/ProfileContext'
|
|
5
5
|
export { TranslationLanguageModal } from './components/modals/TranslationLanguageModal'
|
|
6
6
|
export { JoinClassModal } from './components/modals/JoinClassModal'
|
|
7
|
-
export
|
|
7
|
+
export { LogoutConfirmModal } from './components/modals/LogoutConfirmModal'
|
|
8
|
+
export type { ProfileModalParams, LogoutModalParams } from './model/profileModal.types'
|
|
8
9
|
export { JoinClassError } from './shared/JoinClassError'
|
|
9
10
|
export * from './shared/profile.types'
|
|
10
11
|
export * from './shared/profile.constants'
|
|
@@ -4,9 +4,13 @@ export type ProfileModalParams = {
|
|
|
4
4
|
model: ProfileModel
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export type
|
|
7
|
+
export type LogoutModalParams = {
|
|
8
|
+
onConfirm: () => void
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type ProfileModalProps<Params = ProfileModalParams> = {
|
|
8
12
|
modal: {
|
|
9
13
|
closeModal: () => void
|
|
10
|
-
params:
|
|
14
|
+
params: Params
|
|
11
15
|
}
|
|
12
16
|
}
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"profile": {
|
|
58
58
|
"accountInfo": "Account info",
|
|
59
|
+
"cancel": "Cancel",
|
|
59
60
|
"changePasswordNote": "Ask your teacher if you need to change password",
|
|
60
61
|
"fullName": "Full name",
|
|
61
62
|
"joinClassButton": "Join new class",
|
|
@@ -68,6 +69,7 @@
|
|
|
68
69
|
"joinNewClass": "Join a new class",
|
|
69
70
|
"languageSettings": "Language settings",
|
|
70
71
|
"logOut": "Log out",
|
|
72
|
+
"logOutConfirmMessage": "Are you sure you want to log out?",
|
|
71
73
|
"noLanguage": "No language",
|
|
72
74
|
"preferences": "Preferences",
|
|
73
75
|
"school": "School",
|
|
@@ -79,7 +81,8 @@
|
|
|
79
81
|
"textToSpeech": "Text-to-speech",
|
|
80
82
|
"translationLanguage": "Translation language",
|
|
81
83
|
"translationModalTitle": "Translation language",
|
|
82
|
-
"username": "Username"
|
|
84
|
+
"username": "Username",
|
|
85
|
+
"yes": "Yes"
|
|
83
86
|
},
|
|
84
87
|
"student": {
|
|
85
88
|
"fluency": {
|