@coorpacademy/app-review 0.0.10 → 0.0.11
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/es/index.js +2 -2
- package/lib/index.js +2 -2
- package/package.json +3 -2
- package/src/index.tsx +2 -2
- package/es/components/root-view.d.ts +0 -6
- package/es/components/root-view.d.ts.map +0 -1
- package/es/components/root-view.js +0 -19
- package/es/components/root-view.native.d.ts +0 -3
- package/es/components/root-view.native.d.ts.map +0 -1
- package/es/components/root-view.native.js +0 -44
- package/lib/components/root-view.d.ts +0 -6
- package/lib/components/root-view.d.ts.map +0 -1
- package/lib/components/root-view.js +0 -33
- package/lib/components/root-view.native.d.ts +0 -3
- package/lib/components/root-view.native.d.ts.map +0 -1
- package/lib/components/root-view.native.js +0 -47
- package/src/components/root-view.modules.css +0 -8
- package/src/components/root-view.native.tsx +0 -69
- package/src/components/root-view.tsx +0 -25
package/es/index.js
CHANGED
|
@@ -3,13 +3,13 @@ import { connect, Provider } from 'react-redux';
|
|
|
3
3
|
import configureStore from './configure-store';
|
|
4
4
|
import { navigateTo, navigateBack } from './actions/navigation';
|
|
5
5
|
import { getCurrentViewName } from './reducers/navigation';
|
|
6
|
-
import
|
|
6
|
+
import AppReviewRootView from '@coorpacademy/components';
|
|
7
7
|
// -----------------------------------------------------------------------------
|
|
8
8
|
const mapStateToProps = (state, ownProps) => {
|
|
9
9
|
return { ...ownProps, viewName: getCurrentViewName(state) };
|
|
10
10
|
};
|
|
11
11
|
const mapDispatchToProps = { navigateTo, navigateBack };
|
|
12
|
-
const App = connect(mapStateToProps, mapDispatchToProps)(
|
|
12
|
+
const App = connect(mapStateToProps, mapDispatchToProps)(AppReviewRootView);
|
|
13
13
|
// -----------------------------------------------------------------------------
|
|
14
14
|
const AppRevision = ({ services }) => {
|
|
15
15
|
const [store, setStore] = useState(null);
|
package/lib/index.js
CHANGED
|
@@ -16,13 +16,13 @@ var react_redux_1 = require("react-redux");
|
|
|
16
16
|
var configure_store_1 = require("./configure-store");
|
|
17
17
|
var navigation_1 = require("./actions/navigation");
|
|
18
18
|
var navigation_2 = require("./reducers/navigation");
|
|
19
|
-
var
|
|
19
|
+
var components_1 = require("@coorpacademy/components");
|
|
20
20
|
// -----------------------------------------------------------------------------
|
|
21
21
|
var mapStateToProps = function (state, ownProps) {
|
|
22
22
|
return __assign(__assign({}, ownProps), { viewName: (0, navigation_2.getCurrentViewName)(state) });
|
|
23
23
|
};
|
|
24
24
|
var mapDispatchToProps = { navigateTo: navigation_1.navigateTo, navigateBack: navigation_1.navigateBack };
|
|
25
|
-
var App = (0, react_redux_1.connect)(mapStateToProps, mapDispatchToProps)(
|
|
25
|
+
var App = (0, react_redux_1.connect)(mapStateToProps, mapDispatchToProps)(components_1.default);
|
|
26
26
|
// -----------------------------------------------------------------------------
|
|
27
27
|
var AppRevision = function (_a) {
|
|
28
28
|
var services = _a.services;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/app-review",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"./package.json": "./package.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
+
"@coorpacademy/components": "^10.19.4",
|
|
39
40
|
"react": "^17.0.2",
|
|
40
41
|
"react-native": "0.68.1",
|
|
41
42
|
"react-redux": "^8.0.1",
|
|
@@ -54,5 +55,5 @@
|
|
|
54
55
|
"redux-devtools-extension": "^2.13.9",
|
|
55
56
|
"typescript": "^4.6.4"
|
|
56
57
|
},
|
|
57
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "63fcd6d77ab00f3a62d0349e1d4ea9d155df775d"
|
|
58
59
|
}
|
package/src/index.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import {connect, Provider} from 'react-redux';
|
|
|
4
4
|
import configureStore from './configure-store';
|
|
5
5
|
import {navigateTo, navigateBack} from './actions/navigation';
|
|
6
6
|
import {getCurrentViewName} from './reducers/navigation';
|
|
7
|
-
import
|
|
7
|
+
import AppReviewRootView from '@coorpacademy/components';
|
|
8
8
|
|
|
9
9
|
// -----------------------------------------------------------------------------
|
|
10
10
|
|
|
@@ -13,7 +13,7 @@ const mapStateToProps = (state, ownProps) => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
const mapDispatchToProps = {navigateTo, navigateBack};
|
|
16
|
-
const App = connect(mapStateToProps, mapDispatchToProps)(
|
|
16
|
+
const App = connect(mapStateToProps, mapDispatchToProps)(AppReviewRootView);
|
|
17
17
|
|
|
18
18
|
// -----------------------------------------------------------------------------
|
|
19
19
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"root-view.d.ts","sourceRoot":"","sources":["../../src/components/root-view.tsx"],"names":[],"mappings":"AASA,QAAA,MAAM,QAAQ;;;iBAWb,CAAC;AAIF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styles from './root-view.modules.css';
|
|
3
|
-
// -----------------------------------------------------------------------------
|
|
4
|
-
const Button = (props) => React.createElement("p", { ...props, className: styles.textButton });
|
|
5
|
-
// -----------------------------------------------------------------------------
|
|
6
|
-
const RootView = ({ viewName, navigateTo }) => {
|
|
7
|
-
switch (viewName) {
|
|
8
|
-
case 'home':
|
|
9
|
-
return React.createElement(Button, { onClick: () => navigateTo('onboarding') }, "view home");
|
|
10
|
-
case 'onboarding':
|
|
11
|
-
return React.createElement(Button, { onClick: () => navigateTo('quizzer') }, "view onboarding");
|
|
12
|
-
case 'quizzer':
|
|
13
|
-
return React.createElement(Button, { onClick: () => navigateTo('home') }, "view quizzer");
|
|
14
|
-
default:
|
|
15
|
-
return React.createElement(Button, null, "view (none selected)");
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
// -----------------------------------------------------------------------------
|
|
19
|
-
export default RootView;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"root-view.native.d.ts","sourceRoot":"","sources":["../../src/components/root-view.native.tsx"],"names":[],"mappings":"AA8CA,QAAA,MAAM,QAAQ,6BAkBb,CAAC;AAIF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
import { Text, StyleSheet, Pressable, View, BackHandler } from 'react-native';
|
|
3
|
-
// -----------------------------------------------------------------------------
|
|
4
|
-
const styles = StyleSheet.create({
|
|
5
|
-
rootView: {
|
|
6
|
-
flex: 1,
|
|
7
|
-
alignItems: 'center',
|
|
8
|
-
justifyContent: 'center'
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
// -----------------------------------------------------------------------------
|
|
12
|
-
const NavText = ({ viewName, navigateTo }) => {
|
|
13
|
-
switch (viewName) {
|
|
14
|
-
case 'home':
|
|
15
|
-
return (React.createElement(Pressable, { onPress: () => {
|
|
16
|
-
navigateTo('onboarding');
|
|
17
|
-
} },
|
|
18
|
-
React.createElement(Text, null, "view home")));
|
|
19
|
-
case 'onboarding':
|
|
20
|
-
return (React.createElement(Pressable, { onPress: () => navigateTo('quizzer') },
|
|
21
|
-
React.createElement(Text, null, "view onboarding")));
|
|
22
|
-
case 'quizzer':
|
|
23
|
-
return (React.createElement(Pressable, { onPress: () => navigateTo('home') },
|
|
24
|
-
React.createElement(Text, null, "view quizzer")));
|
|
25
|
-
default:
|
|
26
|
-
return React.createElement(Text, null, "view (none selected)");
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
// -----------------------------------------------------------------------------
|
|
30
|
-
const RootView = (props) => {
|
|
31
|
-
const backAction = () => {
|
|
32
|
-
props.navigateBack();
|
|
33
|
-
return true;
|
|
34
|
-
};
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
// https://reactnative.dev/docs/backhandler
|
|
37
|
-
const backHandler = BackHandler.addEventListener('hardwareBackPress', backAction);
|
|
38
|
-
return () => backHandler.remove();
|
|
39
|
-
}, []);
|
|
40
|
-
return (React.createElement(View, { style: styles.rootView },
|
|
41
|
-
React.createElement(NavText, { viewName: props.viewName, navigateTo: props.navigateTo })));
|
|
42
|
-
};
|
|
43
|
-
// -----------------------------------------------------------------------------
|
|
44
|
-
export default RootView;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"root-view.d.ts","sourceRoot":"","sources":["../../src/components/root-view.tsx"],"names":[],"mappings":"AASA,QAAA,MAAM,QAAQ;;;iBAWb,CAAC;AAIF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
var react_1 = require("react");
|
|
15
|
-
var root_view_modules_css_1 = require("./root-view.modules.css");
|
|
16
|
-
// -----------------------------------------------------------------------------
|
|
17
|
-
var Button = function (props) { return react_1.default.createElement("p", __assign({}, props, { className: root_view_modules_css_1.default.textButton })); };
|
|
18
|
-
// -----------------------------------------------------------------------------
|
|
19
|
-
var RootView = function (_a) {
|
|
20
|
-
var viewName = _a.viewName, navigateTo = _a.navigateTo;
|
|
21
|
-
switch (viewName) {
|
|
22
|
-
case 'home':
|
|
23
|
-
return react_1.default.createElement(Button, { onClick: function () { return navigateTo('onboarding'); } }, "view home");
|
|
24
|
-
case 'onboarding':
|
|
25
|
-
return react_1.default.createElement(Button, { onClick: function () { return navigateTo('quizzer'); } }, "view onboarding");
|
|
26
|
-
case 'quizzer':
|
|
27
|
-
return react_1.default.createElement(Button, { onClick: function () { return navigateTo('home'); } }, "view quizzer");
|
|
28
|
-
default:
|
|
29
|
-
return react_1.default.createElement(Button, null, "view (none selected)");
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
// -----------------------------------------------------------------------------
|
|
33
|
-
exports.default = RootView;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"root-view.native.d.ts","sourceRoot":"","sources":["../../src/components/root-view.native.tsx"],"names":[],"mappings":"AA8CA,QAAA,MAAM,QAAQ,6BAkBb,CAAC;AAIF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var react_1 = require("react");
|
|
4
|
-
var react_native_1 = require("react-native");
|
|
5
|
-
// -----------------------------------------------------------------------------
|
|
6
|
-
var styles = react_native_1.StyleSheet.create({
|
|
7
|
-
rootView: {
|
|
8
|
-
flex: 1,
|
|
9
|
-
alignItems: 'center',
|
|
10
|
-
justifyContent: 'center'
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
// -----------------------------------------------------------------------------
|
|
14
|
-
var NavText = function (_a) {
|
|
15
|
-
var viewName = _a.viewName, navigateTo = _a.navigateTo;
|
|
16
|
-
switch (viewName) {
|
|
17
|
-
case 'home':
|
|
18
|
-
return (react_1.default.createElement(react_native_1.Pressable, { onPress: function () {
|
|
19
|
-
navigateTo('onboarding');
|
|
20
|
-
} },
|
|
21
|
-
react_1.default.createElement(react_native_1.Text, null, "view home")));
|
|
22
|
-
case 'onboarding':
|
|
23
|
-
return (react_1.default.createElement(react_native_1.Pressable, { onPress: function () { return navigateTo('quizzer'); } },
|
|
24
|
-
react_1.default.createElement(react_native_1.Text, null, "view onboarding")));
|
|
25
|
-
case 'quizzer':
|
|
26
|
-
return (react_1.default.createElement(react_native_1.Pressable, { onPress: function () { return navigateTo('home'); } },
|
|
27
|
-
react_1.default.createElement(react_native_1.Text, null, "view quizzer")));
|
|
28
|
-
default:
|
|
29
|
-
return react_1.default.createElement(react_native_1.Text, null, "view (none selected)");
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
// -----------------------------------------------------------------------------
|
|
33
|
-
var RootView = function (props) {
|
|
34
|
-
var backAction = function () {
|
|
35
|
-
props.navigateBack();
|
|
36
|
-
return true;
|
|
37
|
-
};
|
|
38
|
-
(0, react_1.useEffect)(function () {
|
|
39
|
-
// https://reactnative.dev/docs/backhandler
|
|
40
|
-
var backHandler = react_native_1.BackHandler.addEventListener('hardwareBackPress', backAction);
|
|
41
|
-
return function () { return backHandler.remove(); };
|
|
42
|
-
}, []);
|
|
43
|
-
return (react_1.default.createElement(react_native_1.View, { style: styles.rootView },
|
|
44
|
-
react_1.default.createElement(NavText, { viewName: props.viewName, navigateTo: props.navigateTo })));
|
|
45
|
-
};
|
|
46
|
-
// -----------------------------------------------------------------------------
|
|
47
|
-
exports.default = RootView;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import React, {useEffect} from 'react';
|
|
2
|
-
import {Text, StyleSheet, Pressable, View, BackHandler} from 'react-native';
|
|
3
|
-
|
|
4
|
-
// -----------------------------------------------------------------------------
|
|
5
|
-
|
|
6
|
-
const styles = StyleSheet.create({
|
|
7
|
-
rootView: {
|
|
8
|
-
flex: 1,
|
|
9
|
-
alignItems: 'center',
|
|
10
|
-
justifyContent: 'center'
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
// -----------------------------------------------------------------------------
|
|
15
|
-
|
|
16
|
-
const NavText = ({viewName, navigateTo}) => {
|
|
17
|
-
switch (viewName) {
|
|
18
|
-
case 'home':
|
|
19
|
-
return (
|
|
20
|
-
<Pressable
|
|
21
|
-
onPress={() => {
|
|
22
|
-
navigateTo('onboarding');
|
|
23
|
-
}}
|
|
24
|
-
>
|
|
25
|
-
<Text>view home</Text>
|
|
26
|
-
</Pressable>
|
|
27
|
-
);
|
|
28
|
-
case 'onboarding':
|
|
29
|
-
return (
|
|
30
|
-
<Pressable onPress={() => navigateTo('quizzer')}>
|
|
31
|
-
<Text>view onboarding</Text>
|
|
32
|
-
</Pressable>
|
|
33
|
-
);
|
|
34
|
-
case 'quizzer':
|
|
35
|
-
return (
|
|
36
|
-
<Pressable onPress={() => navigateTo('home')}>
|
|
37
|
-
<Text>view quizzer</Text>
|
|
38
|
-
</Pressable>
|
|
39
|
-
);
|
|
40
|
-
default:
|
|
41
|
-
return <Text>view (none selected)</Text>;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
// -----------------------------------------------------------------------------
|
|
46
|
-
|
|
47
|
-
const RootView = (props) => {
|
|
48
|
-
const backAction = () => {
|
|
49
|
-
props.navigateBack();
|
|
50
|
-
return true;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
useEffect(() => {
|
|
54
|
-
// https://reactnative.dev/docs/backhandler
|
|
55
|
-
const backHandler = BackHandler.addEventListener('hardwareBackPress', backAction);
|
|
56
|
-
|
|
57
|
-
return () => backHandler.remove();
|
|
58
|
-
}, []);
|
|
59
|
-
|
|
60
|
-
return (
|
|
61
|
-
<View style={styles.rootView}>
|
|
62
|
-
<NavText viewName={props.viewName} navigateTo={props.navigateTo} />
|
|
63
|
-
</View>
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
// -----------------------------------------------------------------------------
|
|
68
|
-
|
|
69
|
-
export default RootView;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styles from './root-view.modules.css';
|
|
3
|
-
|
|
4
|
-
// -----------------------------------------------------------------------------
|
|
5
|
-
|
|
6
|
-
const Button = (props) => <p {...props} className={styles.textButton} />;
|
|
7
|
-
|
|
8
|
-
// -----------------------------------------------------------------------------
|
|
9
|
-
|
|
10
|
-
const RootView = ({viewName, navigateTo}) => {
|
|
11
|
-
switch (viewName) {
|
|
12
|
-
case 'home':
|
|
13
|
-
return <Button onClick={() => navigateTo('onboarding')}>view home</Button>;
|
|
14
|
-
case 'onboarding':
|
|
15
|
-
return <Button onClick={() => navigateTo('quizzer')}>view onboarding</Button>;
|
|
16
|
-
case 'quizzer':
|
|
17
|
-
return <Button onClick={() => navigateTo('home')}>view quizzer</Button>;
|
|
18
|
-
default:
|
|
19
|
-
return <Button>view (none selected)</Button>;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
// -----------------------------------------------------------------------------
|
|
24
|
-
|
|
25
|
-
export default RootView;
|