react-native-timacare 3.3.2 → 3.3.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.
Files changed (85) hide show
  1. package/lib/commonjs/AppStore.js +1 -1
  2. package/lib/commonjs/AppStore.js.flow +0 -1
  3. package/lib/commonjs/AppStore.js.map +1 -1
  4. package/lib/commonjs/RNTimacare.js +1 -1
  5. package/lib/commonjs/RNTimacare.js.flow +1 -6
  6. package/lib/commonjs/RNTimacare.js.map +1 -1
  7. package/lib/commonjs/components/MHeader.js +1 -1
  8. package/lib/commonjs/components/MHeader.js.flow +1 -1
  9. package/lib/commonjs/components/MHeader.js.map +1 -1
  10. package/lib/commonjs/components/keyboardspace/index.js +1 -1
  11. package/lib/commonjs/components/keyboardspace/index.js.flow +74 -113
  12. package/lib/commonjs/components/keyboardspace/index.js.map +1 -1
  13. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  14. package/lib/commonjs/navigation/primary-navigator.js.flow +0 -8
  15. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  16. package/lib/commonjs/screens/digital-lending/Step1.js +1 -1
  17. package/lib/commonjs/screens/digital-lending/Step1.js.flow +1 -1
  18. package/lib/commonjs/screens/digital-lending/Step1.js.map +1 -1
  19. package/lib/commonjs/screens/home/index.js +1 -1
  20. package/lib/commonjs/screens/home/index.js.flow +1 -1
  21. package/lib/commonjs/screens/home/index.js.map +1 -1
  22. package/lib/module/AppStore.js +1 -1
  23. package/lib/module/AppStore.js.map +1 -1
  24. package/lib/module/RNTimacare.js +1 -1
  25. package/lib/module/RNTimacare.js.map +1 -1
  26. package/lib/module/components/MHeader.js +1 -1
  27. package/lib/module/components/MHeader.js.map +1 -1
  28. package/lib/module/components/keyboardspace/index.js +1 -1
  29. package/lib/module/components/keyboardspace/index.js.map +1 -1
  30. package/lib/module/navigation/primary-navigator.js +1 -1
  31. package/lib/module/navigation/primary-navigator.js.map +1 -1
  32. package/lib/module/screens/digital-lending/Step1.js +1 -1
  33. package/lib/module/screens/digital-lending/Step1.js.map +1 -1
  34. package/lib/module/screens/home/index.js +1 -1
  35. package/lib/module/screens/home/index.js.map +1 -1
  36. package/lib/typescript/AppStore.d.ts +0 -1
  37. package/lib/typescript/AppStore.d.ts.map +1 -1
  38. package/lib/typescript/RNTimacare.d.ts.map +1 -1
  39. package/lib/typescript/components/keyboardspace/index.d.ts +9 -22
  40. package/lib/typescript/components/keyboardspace/index.d.ts.map +1 -1
  41. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  42. package/package.json +1 -13
  43. package/src/AppStore.tsx +0 -1
  44. package/src/RNTimacare.tsx +1 -6
  45. package/src/components/MHeader.tsx +1 -1
  46. package/src/components/keyboardspace/index.tsx +74 -113
  47. package/src/navigation/primary-navigator.tsx +0 -8
  48. package/src/screens/digital-lending/Step1.tsx +1 -1
  49. package/src/screens/home/index.tsx +1 -1
  50. package/lib/commonjs/components/logoTima/index.js +0 -2
  51. package/lib/commonjs/components/logoTima/index.js.flow +0 -32
  52. package/lib/commonjs/components/logoTima/index.js.map +0 -1
  53. package/lib/commonjs/components/logoTima/logo.png +0 -0
  54. package/lib/commonjs/components/logoTima/slogan.png +0 -0
  55. package/lib/commonjs/screens/intro/Store.js +0 -2
  56. package/lib/commonjs/screens/intro/Store.js.flow +0 -36
  57. package/lib/commonjs/screens/intro/Store.js.map +0 -1
  58. package/lib/commonjs/screens/intro/background_initial.png +0 -0
  59. package/lib/commonjs/screens/intro/index.js +0 -2
  60. package/lib/commonjs/screens/intro/index.js.flow +0 -300
  61. package/lib/commonjs/screens/intro/index.js.map +0 -1
  62. package/lib/commonjs/screens/intro/rightBottom.png +0 -0
  63. package/lib/module/components/logoTima/index.js +0 -2
  64. package/lib/module/components/logoTima/index.js.map +0 -1
  65. package/lib/module/components/logoTima/logo.png +0 -0
  66. package/lib/module/components/logoTima/slogan.png +0 -0
  67. package/lib/module/screens/intro/Store.js +0 -2
  68. package/lib/module/screens/intro/Store.js.map +0 -1
  69. package/lib/module/screens/intro/background_initial.png +0 -0
  70. package/lib/module/screens/intro/index.js +0 -2
  71. package/lib/module/screens/intro/index.js.map +0 -1
  72. package/lib/module/screens/intro/rightBottom.png +0 -0
  73. package/lib/typescript/components/logoTima/index.d.ts +0 -2
  74. package/lib/typescript/components/logoTima/index.d.ts.map +0 -1
  75. package/lib/typescript/screens/intro/Store.d.ts +0 -8
  76. package/lib/typescript/screens/intro/Store.d.ts.map +0 -1
  77. package/lib/typescript/screens/intro/index.d.ts +0 -2
  78. package/lib/typescript/screens/intro/index.d.ts.map +0 -1
  79. package/src/components/logoTima/index.tsx +0 -32
  80. package/src/components/logoTima/logo.png +0 -0
  81. package/src/components/logoTima/slogan.png +0 -0
  82. package/src/screens/intro/Store.tsx +0 -36
  83. package/src/screens/intro/background_initial.png +0 -0
  84. package/src/screens/intro/index.tsx +0 -300
  85. package/src/screens/intro/rightBottom.png +0 -0
@@ -94,7 +94,7 @@ export default function MHeader({ title, onBack }: IProps) {
94
94
  paddingHorizontal: 10,
95
95
  }}
96
96
  onPress={() => {
97
- appStore.callback();
97
+ navigation.navigate('MyBank.Main');
98
98
  }}
99
99
  >
100
100
  <CloseIcon />
@@ -1,28 +1,31 @@
1
- /**
2
- * Created by andrewhurst on 10/5/15.
3
- */
4
1
  //@ts-nocheck
5
- import React, { Component } from 'react';
6
- import PropTypes from 'prop-types';
2
+ import React, { useEffect, useState } from 'react';
7
3
  import {
8
4
  Keyboard,
9
5
  LayoutAnimation,
10
6
  View,
11
7
  Dimensions,
12
- ViewPropTypes,
13
8
  Platform,
14
9
  StyleSheet,
10
+ ViewStyle,
11
+ KeyboardEvent,
15
12
  } from 'react-native';
16
13
 
14
+ type Props = {
15
+ topSpacing?: number;
16
+ onToggle?: (isOpen: boolean, height: number) => void;
17
+ style?: ViewStyle;
18
+ };
19
+
17
20
  const styles = StyleSheet.create({
18
21
  container: {
22
+ position: 'absolute',
19
23
  bottom: 0,
20
24
  left: 0,
21
25
  right: 0,
22
26
  },
23
27
  });
24
28
 
25
- // From: https://medium.com/man-moon/writing-modern-react-native-ui-e317ff956f02
26
29
  const defaultAnimation = {
27
30
  duration: 500,
28
31
  create: {
@@ -36,110 +39,68 @@ const defaultAnimation = {
36
39
  },
37
40
  };
38
41
 
39
- export default class KeyboardSpacer extends Component {
40
- static propTypes = {
41
- topSpacing: PropTypes.number,
42
- onToggle: PropTypes.func,
43
- style: ViewPropTypes.style,
44
- };
45
-
46
- static defaultProps = {
47
- topSpacing: 0,
48
- onToggle: () => null,
49
- };
50
-
51
- constructor(props, context) {
52
- super(props, context);
53
- this.state = {
54
- keyboardSpace: 0,
55
- isKeyboardOpened: false,
42
+ const KeyboardSpacer: React.FC<Props> = ({
43
+ topSpacing = 0,
44
+ onToggle = () => {},
45
+ style,
46
+ }) => {
47
+ const [keyboardSpace, setKeyboardSpace] = useState(0);
48
+
49
+ useEffect(() => {
50
+ const showEvent =
51
+ Platform.OS === 'android' ? 'keyboardDidShow' : 'keyboardWillShow';
52
+ const hideEvent =
53
+ Platform.OS === 'android' ? 'keyboardDidHide' : 'keyboardWillHide';
54
+
55
+ const onShow = (event: KeyboardEvent) => {
56
+ if (!event?.endCoordinates) return;
57
+
58
+ let animationConfig = defaultAnimation;
59
+
60
+ if (Platform.OS === 'ios') {
61
+ animationConfig = LayoutAnimation.create(
62
+ event.duration,
63
+ LayoutAnimation.Types[event.easing] || 'keyboard',
64
+ LayoutAnimation.Properties.opacity
65
+ );
66
+ }
67
+
68
+ LayoutAnimation.configureNext(animationConfig);
69
+
70
+ const screenHeight = Dimensions.get('window').height;
71
+ const height = screenHeight - event.endCoordinates.screenY + topSpacing;
72
+
73
+ setKeyboardSpace(height);
74
+ onToggle(true, height);
75
+ };
76
+
77
+ const onHide = (event: KeyboardEvent) => {
78
+ let animationConfig = defaultAnimation;
79
+
80
+ if (Platform.OS === 'ios') {
81
+ animationConfig = LayoutAnimation.create(
82
+ event?.duration || 250,
83
+ LayoutAnimation.Types[event?.easing] || 'keyboard',
84
+ LayoutAnimation.Properties.opacity
85
+ );
86
+ }
87
+
88
+ LayoutAnimation.configureNext(animationConfig);
89
+
90
+ setKeyboardSpace(0);
91
+ onToggle(false, 0);
92
+ };
93
+
94
+ const showSub = Keyboard.addListener(showEvent, onShow);
95
+ const hideSub = Keyboard.addListener(hideEvent, onHide);
96
+
97
+ return () => {
98
+ showSub.remove();
99
+ hideSub.remove();
56
100
  };
57
- this._listeners = null;
58
- this.updateKeyboardSpace = this.updateKeyboardSpace.bind(this);
59
- this.resetKeyboardSpace = this.resetKeyboardSpace.bind(this);
60
- }
61
-
62
- componentDidMount() {
63
- if (Platform.OS === 'ios') {
64
- const updateListener =
65
- Platform.OS === 'android' ? 'keyboardDidShow' : 'keyboardWillShow';
66
- const resetListener =
67
- Platform.OS === 'android' ? 'keyboardDidHide' : 'keyboardWillHide';
68
- this._listeners = [
69
- Keyboard.addListener(updateListener, this.updateKeyboardSpace),
70
- Keyboard.addListener(resetListener, this.resetKeyboardSpace),
71
- ];
72
- }
73
- }
74
-
75
- componentWillUnmount() {
76
- if (this._listeners !== null && this._listeners !== undefined) {
77
- this._listeners.forEach((listener) => listener.remove());
78
- }
79
- }
80
-
81
- updateKeyboardSpace(event) {
82
- // console.log('event', event);
83
- if (!event.endCoordinates) {
84
- return;
85
- }
86
-
87
- let animationConfig = defaultAnimation;
88
- if (Platform.OS === 'ios') {
89
- animationConfig = LayoutAnimation.create(
90
- event.duration,
91
- LayoutAnimation.Types[event.easing],
92
- LayoutAnimation.Properties.opacity
93
- );
94
- }
95
- LayoutAnimation.configureNext(animationConfig);
96
-
97
- // get updated on rotation
98
- const screenHeight = Dimensions.get('window').height;
99
- // when external physical keyboard is connected
100
- // event.endCoordinates.height still equals virtual keyboard height
101
- // however only the keyboard toolbar is showing if there should be one
102
- const keyboardSpace =
103
- screenHeight - event.endCoordinates.screenY + this.props.topSpacing;
104
- // console.log('keyboardSpace', keyboardSpace);
105
- this.setState(
106
- {
107
- keyboardSpace,
108
- isKeyboardOpened: true,
109
- },
110
- this.props.onToggle(true, keyboardSpace)
111
- );
112
- }
113
-
114
- resetKeyboardSpace(event) {
115
- let animationConfig = defaultAnimation;
116
- if (Platform.OS === 'ios') {
117
- animationConfig = LayoutAnimation.create(
118
- event.duration,
119
- LayoutAnimation.Types[event.easing],
120
- LayoutAnimation.Properties.opacity
121
- );
122
- }
123
- LayoutAnimation.configureNext(animationConfig);
124
-
125
- this.setState(
126
- {
127
- keyboardSpace: 0,
128
- isKeyboardOpened: false,
129
- },
130
- this.props.onToggle(false, 0)
131
- );
132
- }
133
-
134
- render() {
135
- return (
136
- <View
137
- style={[
138
- styles.container,
139
- { height: this.state.keyboardSpace },
140
- this.props.style,
141
- ]}
142
- />
143
- );
144
- }
145
- }
101
+ }, [topSpacing, onToggle]);
102
+
103
+ return <View style={[styles.container, { height: keyboardSpace }, style]} />;
104
+ };
105
+
106
+ export default KeyboardSpacer;
@@ -150,14 +150,6 @@ export const ScreenNames = {
150
150
  const Stack = createNativeStackNavigator();
151
151
 
152
152
  export function PrimaryNavigator(props) {
153
- useEffect(() => {
154
- if (props.route?.params?.callback) {
155
- appStore.callback = props.route?.params?.callback;
156
- }
157
- if (props.route?.params?.logOut) {
158
- appStore.logOutMyTima = props.route?.params?.logOut;
159
- }
160
- }, []);
161
153
  return (
162
154
  <Stack.Navigator
163
155
  initialRouteName={ScreenNames.Main}
@@ -22,10 +22,10 @@ import { Formik } from 'formik';
22
22
  import digitalLendingStore from './store';
23
23
  import { formatDDMMYYY } from '../../utils';
24
24
  import DatePicker from 'react-native-date-picker';
25
- import KeyboardSpacer from '../../components/keyboardspace';
26
25
  import { useNavigation } from '@react-navigation/native';
27
26
  import moment from 'moment';
28
27
  import Loading from '../../components/Loading';
28
+ import KeyboardSpacer from '../../components/keyboardspace';
29
29
 
30
30
  const EnumGender = [
31
31
  {
@@ -452,7 +452,7 @@ export const Home = observer(function Home() {
452
452
  paddingHorizontal: 10,
453
453
  }}
454
454
  onPress={() => {
455
- appStore.callback();
455
+ navigation.navigate('MyBank.Main');
456
456
  }}
457
457
  >
458
458
  <CloseIcon />
@@ -1,2 +0,0 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.LogoTima=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _mobxReactLite=require("mobx-react-lite");var Animatable=_interopRequireWildcard(require("react-native-animatable"));var _jsxFileName="/Users/tima/Documents/Tima/tima-care-v2-sdk/src/components/logoTima/index.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}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&&Object.prototype.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;}var LogoTima=exports.LogoTima=(0,_mobxReactLite.observer)(function LogoTima(){return _react.default.createElement(_reactNative.View,{style:{alignItems:'center',justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:9,columnNumber:5}},_react.default.createElement(Animatable.View,{animation:'fadeInUp',duration:1000,__self:this,__source:{fileName:_jsxFileName,lineNumber:10,columnNumber:7}},_react.default.createElement(_reactNative.Image,{source:require('./logo.png'),style:{width:200,height:150*200/397,resizeMode:'contain'},__self:this,__source:{fileName:_jsxFileName,lineNumber:11,columnNumber:9}})),_react.default.createElement(Animatable.View,{animation:'fadeInLeft',duration:1000,delay:1000,__self:this,__source:{fileName:_jsxFileName,lineNumber:20,columnNumber:7}},_react.default.createElement(_reactNative.Image,{source:require('./slogan.png'),style:{width:200,height:73*200/397,resizeMode:'contain'},__self:this,__source:{fileName:_jsxFileName,lineNumber:21,columnNumber:9}})));});
2
- //# sourceMappingURL=index.js.map
@@ -1,32 +0,0 @@
1
- //@ts-nocheck
2
- import React from 'react';
3
- import { View, Image } from 'react-native';
4
- import { observer } from 'mobx-react-lite';
5
- import * as Animatable from 'react-native-animatable';
6
-
7
- export const LogoTima = observer(function LogoTima() {
8
- return (
9
- <View style={{ alignItems: 'center', justifyContent: 'center' }}>
10
- <Animatable.View animation={'fadeInUp'} duration={1000}>
11
- <Image
12
- source={require('./logo.png')}
13
- style={{
14
- width: 200,
15
- height: (150 * 200) / 397,
16
- resizeMode: 'contain',
17
- }}
18
- />
19
- </Animatable.View>
20
- <Animatable.View animation={'fadeInLeft'} duration={1000} delay={1000}>
21
- <Image
22
- source={require('./slogan.png')}
23
- style={{
24
- width: 200,
25
- height: (73 * 200) / 397,
26
- resizeMode: 'contain',
27
- }}
28
- />
29
- </Animatable.View>
30
- </View>
31
- );
32
- });
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_mobxReactLite","Animatable","_interopRequireWildcard","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","LogoTima","exports","observer","createElement","View","style","alignItems","justifyContent","__self","__source","fileName","lineNumber","columnNumber","animation","duration","Image","source","width","height","resizeMode","delay"],"sourceRoot":"../../../../src","sources":["components/logoTima/index.tsx"],"mappings":"oKACA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,cAAA,CAAAF,OAAA,oBACA,IAAAG,UAAA,CAAAC,uBAAA,CAAAJ,OAAA,6BAAsD,IAAAK,YAAA,0FAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAA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,IAAAC,YAAA,IACH,CACc,CACb,CAAC,CAEX,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _initializerDefineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/initializerDefineProperty"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _applyDecoratedDescriptor2=_interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));var _initializerWarningHelper2=_interopRequireDefault(require("@babel/runtime/helpers/initializerWarningHelper"));var _mobx=require("mobx");var _api=require("../../services/api");var _log=require("../../utils/log");var _reactNative=require("react-native");var _class,_descriptor,_descriptor2;var Store=(_class=function(){function Store(){(0,_classCallCheck2.default)(this,Store);(0,_initializerDefineProperty2.default)(this,"isLoading",_descriptor,this);(0,_initializerDefineProperty2.default)(this,"isError",_descriptor2,this);}(0,_createClass2.default)(Store,[{key:"getOTP",value:function getOTP(params,onSuccess,onFailure){var response;return _regenerator.default.async(function getOTP$(_context){while(1)switch(_context.prev=_context.next){case 0:this.isLoading=true;_context.next=3;return _regenerator.default.awrap(_api.Api.getInstance().getOTP(params));case 3:response=_context.sent;(0,_log.myLog)(response);if(response.kind==='ok'){this.isLoading=false;this.isError=false;if(response.data.meta.errorCode===200){(0,_log.myLog)('data',response.data.data);if(onSuccess){onSuccess(response.data.data);}}}else{this.isLoading=false;this.isError=false;_reactNative.Alert.alert('Lỗi',response.Messages);}case 6:case"end":return _context.stop();}},null,this,null,Promise);}}]);return Store;}(),(_descriptor=(0,_applyDecoratedDescriptor2.default)(_class.prototype,"isLoading",[_mobx.observable],{configurable:true,enumerable:true,writable:true,initializer:function initializer(){return false;}}),_descriptor2=(0,_applyDecoratedDescriptor2.default)(_class.prototype,"isError",[_mobx.observable],{configurable:true,enumerable:true,writable:true,initializer:function initializer(){return false;}}),(0,_applyDecoratedDescriptor2.default)(_class.prototype,"getOTP",[_mobx.action],Object.getOwnPropertyDescriptor(_class.prototype,"getOTP"),_class.prototype)),_class);var registerStore=new Store();var _default=exports.default=registerStore;
2
- //# sourceMappingURL=Store.js.map
@@ -1,36 +0,0 @@
1
- //@ts-nocheck
2
- import { observable, action } from 'mobx';
3
- import { Api } from '../../services/api';
4
- import { myLog } from '../../utils/log';
5
- import { Alert } from 'react-native';
6
- import { save, USER } from '../../utils/storage';
7
-
8
- class Store {
9
- @observable isLoading = false;
10
- @observable isError = false;
11
-
12
- @action
13
- async getOTP(params, onSuccess?, onFailure?) {
14
- this.isLoading = true;
15
- const response = await Api.getInstance().getOTP(params);
16
- myLog(response);
17
- if (response.kind === 'ok') {
18
- this.isLoading = false;
19
- this.isError = false;
20
- if (response.data.meta.errorCode === 200) {
21
- myLog('data', response.data.data);
22
- if (onSuccess) {
23
- onSuccess(response.data.data);
24
- }
25
- }
26
- } else {
27
- this.isLoading = false;
28
- this.isError = false;
29
- Alert.alert('Lỗi', response.Messages);
30
- }
31
- }
32
- }
33
-
34
- const registerStore = new Store();
35
-
36
- export default registerStore;
@@ -1 +0,0 @@
1
- {"version":3,"names":["_mobx","require","_api","_log","_reactNative","_class","_descriptor","_descriptor2","Store","_classCallCheck2","default","_initializerDefineProperty2","_createClass2","key","value","getOTP","params","onSuccess","onFailure","response","_regenerator","async","getOTP$","_context","prev","next","isLoading","awrap","Api","getInstance","sent","myLog","kind","isError","data","meta","errorCode","Alert","alert","Messages","stop","Promise","_applyDecoratedDescriptor2","prototype","observable","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","registerStore","_default","exports"],"sourceRoot":"../../../../src","sources":["screens/intro/Store.tsx"],"mappings":"81BACA,IAAAA,KAAA,CAAAC,OAAA,SACA,IAAAC,IAAA,CAAAD,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AAG,KAAK,CACpBI,kBAAK,CAACC,KAAK,CAAC,KAAK,CAAEnB,QAAQ,CAACoB,QAAQ,CAAC,CACvC,CAAC,wBAAAhB,QAAA,CAAAiB,IAAA,qBAAAC,OAAA,GACF,WAAAjC,KAAA,MAAAF,WAAA,IAAAoC,0BAAA,CAAAhC,OAAA,EAAAL,MAAA,CAAAsC,SAAA,cAtBAC,gBAAU,GAAAC,YAAA,MAAAC,UAAA,MAAAC,QAAA,MAAAC,WAAA,UAAAA,YAAA,QAAa,MAAK,KAAAzC,YAAA,IAAAmC,0BAAA,CAAAhC,OAAA,EAAAL,MAAA,CAAAsC,SAAA,YAC5BC,gBAAU,GAAAC,YAAA,MAAAC,UAAA,MAAAC,QAAA,MAAAC,WAAA,UAAAA,YAAA,QAAW,MAAK,QAAAN,0BAAA,CAAAhC,OAAA,EAAAL,MAAA,CAAAsC,SAAA,WAE1BM,YAAM,EAAAC,MAAA,CAAAC,wBAAA,CAAA9C,MAAA,CAAAsC,SAAA,WAAAtC,MAAA,CAAAsC,SAAA,GAAAtC,MAAA,EAsBT,GAAM,CAAA+C,aAAa,CAAG,GAAI,CAAA5C,KAAK,CAAC,CAAC,CAAC,IAAA6C,QAAA,CAAAC,OAAA,CAAA5C,OAAA,CAEnB0C,aAAa"}
@@ -1,2 +0,0 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Intro=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _native=require("@react-navigation/native");var _mobxReactLite=require("mobx-react-lite");var _CommonStyles=require("../CommonStyles");var _keyboardspace=_interopRequireDefault(require("../../components/keyboardspace"));var _MButton=_interopRequireDefault(require("../../components/MButton"));var _theme=require("../../theme");var _MText=require("../../components/MText");var _icons=require("../../assets/icons");var _navigation=require("../../navigation");var _reactNativePagerView=_interopRequireDefault(require("react-native-pager-view"));var _log=require("../../utils/log");var _storage=require("../../utils/storage");var _jsxFileName="/Users/tima/Documents/Tima/tima-care-v2-sdk/src/screens/intro/index.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}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&&Object.prototype.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;}var Intro=exports.Intro=(0,_mobxReactLite.observer)(function Intro(){var navigation=(0,_native.useNavigation)();var _useState=(0,_react.useState)(0),_useState2=(0,_slicedToArray2.default)(_useState,2),index=_useState2[0],setIndex=_useState2[1];var pagerView=(0,_react.useRef)(null);var skip=function skip(){(0,_storage.save)(_storage.INTRO,'true');navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.Register}]}));};return _react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.fill,_CommonStyles.commonStyles.backgroundWhite],__self:this,__source:{fileName:_jsxFileName,lineNumber:51,columnNumber:5}},_react.default.createElement(_reactNative.SafeAreaView,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:52,columnNumber:7}},_react.default.createElement(_reactNativePagerView.default,{ref:pagerView,style:{flex:1},initialPage:index,onPageSelected:function onPageSelected(event){(0,_log.myLog)(event.nativeEvent);setIndex(event.nativeEvent.position);},__self:this,__source:{fileName:_jsxFileName,lineNumber:53,columnNumber:9}},_react.default.createElement(_reactNative.View,{key:"1",__self:this,__source:{fileName:_jsxFileName,lineNumber:62,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:63,columnNumber:13}},_react.default.createElement(_reactNative.Image,{source:require('../../../assets/img/logo.png'),style:{width:80,height:80,alignSelf:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:64,columnNumber:15}}),_react.default.createElement(_reactNative.Image,{source:require('../../../assets/img/sao_khue.png'),style:{width:80,height:150,marginTop:24,alignSelf:'center',resizeMode:'contain'},__self:this,__source:{fileName:_jsxFileName,lineNumber:68,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{fontSize:18,marginTop:16,color:_theme.color.primary,textAlign:'center'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:78,columnNumber:15}},"Top 10 Sao Khu\xEA 2018"),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{fontSize:14,lineHeight:24,marginTop:8,textAlign:'center',paddingHorizontal:36}],__self:this,__source:{fileName:_jsxFileName,lineNumber:91,columnNumber:15}},"T\u1EA1i l\u1EC5 c\xF4ng b\u1ED1 v\xE0 trao danh hi\u1EC7u Sao Khu\xEA 2018, s\u1EA3n ph\u1EA9m S\xE0n k\u1EBFt n\u1ED1i T\xE0i ch\xEDnh Tima c\u1EE7a C\xF4ng ty c\u1ED5 ph\u1EA7n T\u1EADp \u0111o\xE0n Tima \u0111\xE3 l\u1ECDt v\xE0o Top 10 c\xE1c s\u1EA3n ph\u1EA9m, d\u1ECBch v\u1EE5 xu\u1EA5t s\u1EAFc trong t\u1ED5ng s\u1ED1 73 s\u1EA3n ph\u1EA9m, d\u1ECBch v\u1EE5 CNTT \u0111\u01B0\u1EE3c trao gi\u1EA3i."))),_react.default.createElement(_reactNative.View,{key:"2",__self:this,__source:{fileName:_jsxFileName,lineNumber:105,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:106,columnNumber:13}},_react.default.createElement(_reactNative.Image,{source:require('../../../assets/img/logo.png'),style:{width:80,height:80,alignSelf:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:107,columnNumber:15}}),_react.default.createElement(_reactNative.Image,{source:require('../../../assets/img/slogan.png'),style:{width:'60%',height:150,marginTop:24,alignSelf:'center',resizeMode:'contain'},__self:this,__source:{fileName:_jsxFileName,lineNumber:111,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{fontSize:18,marginTop:16,color:_theme.color.primary,textAlign:'center'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:121,columnNumber:15}},"Vay nhanh & d\u1EC5 d\xE0ng h\u01A1n v\u1EDBi Tima"),_react.default.createElement(_reactNative.View,{style:{alignSelf:'center',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:134,columnNumber:15}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.row,_CommonStyles.commonStyles.alignCenter,{marginTop:8}],__self:this,__source:{fileName:_jsxFileName,lineNumber:135,columnNumber:17}},_react.default.createElement(_icons.IconHand,{width:10,height:9,style:{transform:[{scale:1.5}]},__self:this,__source:{fileName:_jsxFileName,lineNumber:142,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{paddingLeft:8,color:_theme.color.primary,textAlign:'center'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:147,columnNumber:19}},"Ch\u1EC9 m\u1EA5t 3 ph\xFAt \u0111\u0103ng k\xFD")),_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.row,_CommonStyles.commonStyles.alignCenter,{marginTop:8}],__self:this,__source:{fileName:_jsxFileName,lineNumber:160,columnNumber:17}},_react.default.createElement(_icons.IconHand,{width:10,height:9,style:{transform:[{scale:1.5}]},__self:this,__source:{fileName:_jsxFileName,lineNumber:167,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{paddingLeft:8,color:_theme.color.primary,textAlign:'center'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:172,columnNumber:19}},"Th\xF4ng tin chi ti\u1EBFt & l\xE3i su\u1EA5t minh b\u1EA1ch")),_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.row,_CommonStyles.commonStyles.alignCenter,{marginTop:8}],__self:this,__source:{fileName:_jsxFileName,lineNumber:185,columnNumber:17}},_react.default.createElement(_icons.IconHand,{width:10,height:9,style:{transform:[{scale:1.5}]},__self:this,__source:{fileName:_jsxFileName,lineNumber:192,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{paddingLeft:8,color:_theme.color.primary,textAlign:'center'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:197,columnNumber:19}},"Nh\u1EADt k\u1EBFt qu\u1EA3 h\u1ED3 s\u01A1 nhanh ch\xF3ng")))))),_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.row,_CommonStyles.commonStyles.alignCenter,{marginBottom:24,marginTop:16,alignSelf:'center'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:214,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:{backgroundColor:index===0?_theme.color.primary:_theme.color.textHint,width:12,height:12,borderRadius:6},__self:this,__source:{fileName:_jsxFileName,lineNumber:221,columnNumber:11}}),_react.default.createElement(_reactNative.View,{style:{backgroundColor:index===1?_theme.color.primary:_theme.color.textHint,width:12,height:12,borderRadius:6,marginLeft:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:229,columnNumber:11}})),_react.default.createElement(_MButton.default,{onPress:function onPress(){if(index==0){pagerView.current.setPage(1);setIndex(1);}else{skip();}},style:[_CommonStyles.commonStyles.justifyCenter,_CommonStyles.commonStyles.alignCenter,{backgroundColor:_theme.color.primary,width:'50%',height:48,borderRadius:24,alignSelf:'center'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:239,columnNumber:9}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{fontSize:16,color:'white'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:260,columnNumber:11}},"Ti\u1EBFp theo")),_react.default.createElement(_MButton.default,{onPress:skip,style:[_CommonStyles.commonStyles.justifyCenter,_CommonStyles.commonStyles.alignCenter,{width:'60%',height:48,alignSelf:'center',marginTop:16,marginBottom:24}],__self:this,__source:{fileName:_jsxFileName,lineNumber:269,columnNumber:9}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{fontSize:16,color:_theme.color.primary,textDecorationLine:'underline'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:283,columnNumber:11}},"B\u1ECF qua")),_react.default.createElement(_keyboardspace.default,{__self:this,__source:{fileName:_jsxFileName,lineNumber:296,columnNumber:9}})));});
2
- //# sourceMappingURL=index.js.map