@coorpacademy/app-review 0.0.8 → 0.0.10

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 (90) hide show
  1. package/es/components/__tmp-backup-vues-mobile/revision-home.d.ts.map +1 -0
  2. package/es/components/__tmp-backup-vues-mobile/revision-home.stories.d.ts.map +1 -0
  3. package/es/components/__tmp-backup-vues-mobile/revision-onboarding.d.ts.map +1 -0
  4. package/es/components/__tmp-backup-vues-mobile/revision-quizzer.d.ts.map +1 -0
  5. package/es/components/root-view.d.ts +6 -0
  6. package/es/components/root-view.d.ts.map +1 -0
  7. package/es/components/root-view.js +19 -0
  8. package/es/components/root-view.native.d.ts +3 -0
  9. package/es/components/root-view.native.d.ts.map +1 -0
  10. package/{dist/index.js → es/components/root-view.native.js} +2 -25
  11. package/es/configure-store.d.ts.map +1 -0
  12. package/es/configure-store.js +17 -0
  13. package/es/index.d.ts.map +1 -0
  14. package/es/index.js +26 -0
  15. package/lib/actions/index.d.ts +2 -0
  16. package/lib/actions/index.d.ts.map +1 -0
  17. package/lib/actions/index.js +17 -0
  18. package/lib/actions/navigation.d.ts +13 -0
  19. package/lib/actions/navigation.d.ts.map +1 -0
  20. package/lib/actions/navigation.js +14 -0
  21. package/lib/components/__tmp-backup-vues-mobile/revision-home.d.ts +9 -0
  22. package/lib/components/__tmp-backup-vues-mobile/revision-home.d.ts.map +1 -0
  23. package/lib/components/__tmp-backup-vues-mobile/revision-home.js +100 -0
  24. package/lib/components/__tmp-backup-vues-mobile/revision-home.stories.d.ts +2 -0
  25. package/lib/components/__tmp-backup-vues-mobile/revision-home.stories.d.ts.map +1 -0
  26. package/lib/components/__tmp-backup-vues-mobile/revision-home.stories.js +16 -0
  27. package/lib/components/__tmp-backup-vues-mobile/revision-onboarding.d.ts +3 -0
  28. package/lib/components/__tmp-backup-vues-mobile/revision-onboarding.d.ts.map +1 -0
  29. package/lib/components/__tmp-backup-vues-mobile/revision-onboarding.js +62 -0
  30. package/lib/components/__tmp-backup-vues-mobile/revision-quizzer.d.ts +18 -0
  31. package/lib/components/__tmp-backup-vues-mobile/revision-quizzer.d.ts.map +1 -0
  32. package/lib/components/__tmp-backup-vues-mobile/revision-quizzer.js +130 -0
  33. package/lib/components/root-view.d.ts +6 -0
  34. package/lib/components/root-view.d.ts.map +1 -0
  35. package/lib/components/root-view.js +33 -0
  36. package/lib/components/root-view.native.d.ts +3 -0
  37. package/lib/components/root-view.native.d.ts.map +1 -0
  38. package/lib/components/root-view.native.js +47 -0
  39. package/lib/configure-store.d.ts +6 -0
  40. package/lib/configure-store.d.ts.map +1 -0
  41. package/lib/configure-store.js +20 -0
  42. package/lib/index.d.ts +5 -0
  43. package/lib/index.d.ts.map +1 -0
  44. package/lib/index.js +40 -0
  45. package/lib/reducers/index.d.ts +5 -0
  46. package/lib/reducers/index.d.ts.map +1 -0
  47. package/lib/reducers/index.js +8 -0
  48. package/lib/reducers/navigation.d.ts +7 -0
  49. package/lib/reducers/navigation.d.ts.map +1 -0
  50. package/lib/reducers/navigation.js +32 -0
  51. package/package.json +27 -7
  52. package/readme.md +16 -2
  53. package/src/components/root-view.modules.css +8 -0
  54. package/src/components/root-view.native.tsx +69 -0
  55. package/src/components/root-view.tsx +25 -0
  56. package/src/configure-store.ts +10 -11
  57. package/src/index.tsx +1 -64
  58. package/dist/components/revision-home.d.ts.map +0 -1
  59. package/dist/components/revision-home.stories.d.ts.map +0 -1
  60. package/dist/components/revision-onboarding.d.ts.map +0 -1
  61. package/dist/components/revision-quizzer.d.ts.map +0 -1
  62. package/dist/configure-store.d.ts.map +0 -1
  63. package/dist/configure-store.js +0 -18
  64. package/dist/index.d.ts.map +0 -1
  65. /package/{dist → es}/actions/index.d.ts +0 -0
  66. /package/{dist → es}/actions/index.d.ts.map +0 -0
  67. /package/{dist → es}/actions/index.js +0 -0
  68. /package/{dist → es}/actions/navigation.d.ts +0 -0
  69. /package/{dist → es}/actions/navigation.d.ts.map +0 -0
  70. /package/{dist → es}/actions/navigation.js +0 -0
  71. /package/{dist/components → es/components/__tmp-backup-vues-mobile}/revision-home.d.ts +0 -0
  72. /package/{dist/components → es/components/__tmp-backup-vues-mobile}/revision-home.js +0 -0
  73. /package/{dist/components → es/components/__tmp-backup-vues-mobile}/revision-home.stories.d.ts +0 -0
  74. /package/{dist/components → es/components/__tmp-backup-vues-mobile}/revision-home.stories.js +0 -0
  75. /package/{dist/components → es/components/__tmp-backup-vues-mobile}/revision-onboarding.d.ts +0 -0
  76. /package/{dist/components → es/components/__tmp-backup-vues-mobile}/revision-onboarding.js +0 -0
  77. /package/{dist/components → es/components/__tmp-backup-vues-mobile}/revision-quizzer.d.ts +0 -0
  78. /package/{dist/components → es/components/__tmp-backup-vues-mobile}/revision-quizzer.js +0 -0
  79. /package/{dist → es}/configure-store.d.ts +0 -0
  80. /package/{dist → es}/index.d.ts +0 -0
  81. /package/{dist → es}/reducers/index.d.ts +0 -0
  82. /package/{dist → es}/reducers/index.d.ts.map +0 -0
  83. /package/{dist → es}/reducers/index.js +0 -0
  84. /package/{dist → es}/reducers/navigation.d.ts +0 -0
  85. /package/{dist → es}/reducers/navigation.d.ts.map +0 -0
  86. /package/{dist → es}/reducers/navigation.js +0 -0
  87. /package/src/components/{revision-home.stories.tsx → __tmp-backup-vues-mobile/revision-home.stories.tsx} +0 -0
  88. /package/src/components/{revision-home.tsx → __tmp-backup-vues-mobile/revision-home.tsx} +0 -0
  89. /package/src/components/{revision-onboarding.tsx → __tmp-backup-vues-mobile/revision-onboarding.tsx} +0 -0
  90. /package/src/components/{revision-quizzer.tsx → __tmp-backup-vues-mobile/revision-quizzer.tsx} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revision-home.d.ts","sourceRoot":"","sources":["../../../src/components/__tmp-backup-vues-mobile/revision-home.tsx"],"names":[],"mappings":"AAWA,UAAU,KAAK;IACb,cAAc,EAAE;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;CACnD;AAoGD,QAAA,MAAM,YAAY,UAAW,KAAK,gBASjC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revision-home.stories.d.ts","sourceRoot":"","sources":["../../../src/components/__tmp-backup-vues-mobile/revision-home.stories.tsx"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revision-onboarding.d.ts","sourceRoot":"","sources":["../../../src/components/__tmp-backup-vues-mobile/revision-onboarding.tsx"],"names":[],"mappings":"AAkEA,QAAA,MAAM,kBAAkB,mBAevB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revision-quizzer.d.ts","sourceRoot":"","sources":["../../../src/components/__tmp-backup-vues-mobile/revision-quizzer.tsx"],"names":[],"mappings":"AASA,oBAAY,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,oBAAY,OAAO,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,gBAAgB,GAAG,iBAAiB,GAAG,aAAa,CAAC;IAC3D,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;CACtB,CAAC;AAEF,UAAU,KAAK;IACb,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AA2ID,QAAA,MAAM,eAAe,cAAa,KAAK,gBAStC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,6 @@
1
+ declare const RootView: ({ viewName, navigateTo }: {
2
+ viewName: any;
3
+ navigateTo: any;
4
+ }) => JSX.Element;
5
+ export default RootView;
6
+ //# sourceMappingURL=root-view.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,19 @@
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;
@@ -0,0 +1,3 @@
1
+ declare const RootView: (props: any) => JSX.Element;
2
+ export default RootView;
3
+ //# sourceMappingURL=root-view.native.d.ts.map
@@ -0,0 +1 @@
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,9 +1,5 @@
1
- import React, { useEffect, useState } from 'react';
1
+ import React, { useEffect } from 'react';
2
2
  import { Text, StyleSheet, Pressable, View, BackHandler } from 'react-native';
3
- import { connect, Provider } from 'react-redux';
4
- import configureStore from './configure-store';
5
- import { navigateTo, navigateBack } from './actions/navigation';
6
- import { getCurrentViewName } from './reducers/navigation';
7
3
  // -----------------------------------------------------------------------------
8
4
  const styles = StyleSheet.create({
9
5
  rootView: {
@@ -14,7 +10,6 @@ const styles = StyleSheet.create({
14
10
  });
15
11
  // -----------------------------------------------------------------------------
16
12
  const NavText = ({ viewName, navigateTo }) => {
17
- console.log({ viewName });
18
13
  switch (viewName) {
19
14
  case 'home':
20
15
  return (React.createElement(Pressable, { onPress: () => {
@@ -46,22 +41,4 @@ const RootView = (props) => {
46
41
  React.createElement(NavText, { viewName: props.viewName, navigateTo: props.navigateTo })));
47
42
  };
48
43
  // -----------------------------------------------------------------------------
49
- const mapStateToProps = (state, ownProps) => {
50
- return Object.assign(Object.assign({}, ownProps), { viewName: getCurrentViewName(state) });
51
- };
52
- const mapDispatchToProps = { navigateTo, navigateBack };
53
- const App = connect(mapStateToProps, mapDispatchToProps)(RootView);
54
- // -----------------------------------------------------------------------------
55
- const AppRevision = ({ services }) => {
56
- const [store, setStore] = useState(null);
57
- useEffect(() => {
58
- const store = configureStore(services);
59
- setStore(store);
60
- }, []);
61
- if (!store)
62
- return null;
63
- return (React.createElement(Provider, { store: store },
64
- React.createElement(App, null)));
65
- };
66
- // -----------------------------------------------------------------------------
67
- export default AppRevision;
44
+ export default RootView;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configure-store.d.ts","sourceRoot":"","sources":["../src/configure-store.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,QAAQ,KAAA;;;;EAc9C"}
@@ -0,0 +1,17 @@
1
+ import { applyMiddleware, compose, createStore } from 'redux';
2
+ import thunk from 'redux-thunk';
3
+ import { composeWithDevTools } from 'redux-devtools-extension';
4
+ import rootReducer from './reducers';
5
+ const preloadedState = undefined;
6
+ export default function configureStore(services) {
7
+ const _compose = process.env.NODE_ENV !== 'production'
8
+ ? composeWithDevTools({
9
+ name: 'app-review',
10
+ trace: true,
11
+ traceLimit: 25
12
+ })
13
+ : compose;
14
+ const enhancer = _compose(applyMiddleware(thunk));
15
+ const store = createStore(rootReducer, preloadedState, enhancer);
16
+ return store;
17
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAmBA,QAAA,MAAM,WAAW;;iBAehB,CAAC;AAIF,eAAe,WAAW,CAAC"}
package/es/index.js ADDED
@@ -0,0 +1,26 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { connect, Provider } from 'react-redux';
3
+ import configureStore from './configure-store';
4
+ import { navigateTo, navigateBack } from './actions/navigation';
5
+ import { getCurrentViewName } from './reducers/navigation';
6
+ import RootView from './components/root-view';
7
+ // -----------------------------------------------------------------------------
8
+ const mapStateToProps = (state, ownProps) => {
9
+ return { ...ownProps, viewName: getCurrentViewName(state) };
10
+ };
11
+ const mapDispatchToProps = { navigateTo, navigateBack };
12
+ const App = connect(mapStateToProps, mapDispatchToProps)(RootView);
13
+ // -----------------------------------------------------------------------------
14
+ const AppRevision = ({ services }) => {
15
+ const [store, setStore] = useState(null);
16
+ useEffect(() => {
17
+ const store = configureStore(services);
18
+ setStore(store);
19
+ }, []);
20
+ if (!store)
21
+ return null;
22
+ return (React.createElement(Provider, { store: store },
23
+ React.createElement(App, null)));
24
+ };
25
+ // -----------------------------------------------------------------------------
26
+ export default AppRevision;
@@ -0,0 +1,2 @@
1
+ export * from './navigation';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./navigation"), exports);
@@ -0,0 +1,13 @@
1
+ import { ActionCreator } from 'redux';
2
+ export declare const NAVIGATE_TO = "@@navigation/NAVIGATE_TO";
3
+ export declare const NAVIGATE_BACK = "@@navigation/NAVIGATE_BACK";
4
+ export declare type $NAVIGATE_TO = {
5
+ type: '@@navigation/NAVIGATE_TO';
6
+ payload: string;
7
+ };
8
+ export declare type $NAVIGATE_BACK = {
9
+ type: '@@navigation/NAVIGATE_BACK';
10
+ };
11
+ export declare const navigateTo: ActionCreator<$NAVIGATE_TO>;
12
+ export declare const navigateBack: ActionCreator<$NAVIGATE_BACK>;
13
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/actions/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAEpC,eAAO,MAAM,WAAW,6BAA6B,CAAC;AACtD,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAE1D,oBAAY,YAAY,GAAG;IACzB,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,IAAI,EAAE,4BAA4B,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,aAAa,CAAC,YAAY,CAGjD,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,cAAc,CAErD,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.navigateBack = exports.navigateTo = exports.NAVIGATE_BACK = exports.NAVIGATE_TO = void 0;
4
+ exports.NAVIGATE_TO = '@@navigation/NAVIGATE_TO';
5
+ exports.NAVIGATE_BACK = '@@navigation/NAVIGATE_BACK';
6
+ var navigateTo = function (newPath) { return ({
7
+ type: exports.NAVIGATE_TO,
8
+ payload: newPath
9
+ }); };
10
+ exports.navigateTo = navigateTo;
11
+ var navigateBack = function () { return ({
12
+ type: exports.NAVIGATE_BACK
13
+ }); };
14
+ exports.navigateBack = navigateBack;
@@ -0,0 +1,9 @@
1
+ interface Props {
2
+ skillsToRevise: {
3
+ title?: string;
4
+ info?: string;
5
+ }[];
6
+ }
7
+ declare const RevisionHome: (props: Props) => JSX.Element;
8
+ export default RevisionHome;
9
+ //# sourceMappingURL=revision-home.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revision-home.d.ts","sourceRoot":"","sources":["../../../src/components/__tmp-backup-vues-mobile/revision-home.tsx"],"names":[],"mappings":"AAWA,UAAU,KAAK;IACb,cAAc,EAAE;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;CACnD;AAoGD,QAAA,MAAM,YAAY,UAAW,KAAK,gBASjC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
+ if (ar || !(i in from)) {
5
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
+ ar[i] = from[i];
7
+ }
8
+ }
9
+ return to.concat(ar || Array.prototype.slice.call(from));
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ var React = require("react");
13
+ var react_native_1 = require("react-native");
14
+ var nova_icons_1 = require("@coorpacademy/nova-icons");
15
+ var styles = react_native_1.StyleSheet.create({
16
+ container: {
17
+ flex: 1,
18
+ padding: 20
19
+ // paddingTop: HEADER_HEIGHT + 20,
20
+ // backgroundColor: theme.colors.white
21
+ },
22
+ title: {
23
+ // fontSize: theme.fontSize.xlarge,
24
+ // fontWeight: theme.fontWeight.bold,
25
+ lineHeight: 28
26
+ // color: theme.colors.text.primary,
27
+ // marginBottom: theme.spacing.base,
28
+ // marginTop: theme.spacing.small
29
+ },
30
+ subtitle: {
31
+ // fontSize: theme.fontSize.xlarge,
32
+ // color: theme.colors.text.primary,
33
+ // marginBottom: theme.spacing.tiny
34
+ },
35
+ text: {
36
+ fontSize: 16,
37
+ lineHeight: 22,
38
+ // color: theme.colors.text.primary,
39
+ opacity: 0.7
40
+ // marginBottom: theme.spacing.base
41
+ },
42
+ noSkillsImage: {
43
+ flex: 1,
44
+ alignSelf: 'center',
45
+ width: 320,
46
+ height: 300
47
+ },
48
+ skills: {},
49
+ skill: {
50
+ display: 'flex',
51
+ flexDirection: 'row',
52
+ overflow: 'hidden',
53
+ alignItems: 'center',
54
+ height: 118,
55
+ borderRadius: 8
56
+ // backgroundColor: theme.colors.gray.lighter,
57
+ // marginTop: theme.spacing.micro,
58
+ // marginBottom: theme.spacing.micro,
59
+ // padding: theme.spacing.base
60
+ },
61
+ skillTexts: {
62
+ flex: 1,
63
+ flexDirection: 'column'
64
+ },
65
+ skillTitle: {
66
+ fontSize: 18,
67
+ fontWeight: '600',
68
+ lineHeight: 22
69
+ // color: theme.colors.text.primary,
70
+ // marginBottom: theme.spacing.tiny
71
+ },
72
+ skillInfo: {
73
+ fontSize: 12,
74
+ lineHeight: 16
75
+ // color: theme.colors.gray.medium
76
+ },
77
+ extraSpace: {
78
+ height: 100
79
+ }
80
+ });
81
+ var onSelectSkill = function (title) { return function () {
82
+ console.log('pressed on', { title: title });
83
+ }; };
84
+ var ExtraSpace = function () { return React.createElement(react_native_1.View, { style: styles.extraSpace }); };
85
+ var Skill = function (_a) {
86
+ var title = _a.title, info = _a.info;
87
+ return (React.createElement(react_native_1.Pressable, { style: styles.skill, onPress: onSelectSkill(title) },
88
+ React.createElement(react_native_1.View, { style: styles.skillTexts },
89
+ React.createElement(react_native_1.Text, { style: styles.skillTitle }, title),
90
+ React.createElement(react_native_1.Text, { style: styles.skillInfo }, info)),
91
+ React.createElement(nova_icons_1.NovaCompositionNavigationArrowRight, { color: "#ededed", height: 20, width: 20 })));
92
+ };
93
+ var renderSkill = function (_a) {
94
+ var _b = _a.item, title = _b.title, info = _b.info, _c = _b.isExtraSpace, isExtraSpace = _c === void 0 ? false : _c;
95
+ return isExtraSpace ? React.createElement(ExtraSpace, null) : React.createElement(Skill, { title: title, info: info });
96
+ };
97
+ var Skills = function (props) { return (React.createElement(react_native_1.FlatList, { contentContainerStyle: styles.skills, data: props.skills, renderItem: renderSkill })); };
98
+ var NoSkills = function () { return (React.createElement(React.Fragment, null)); };
99
+ var RevisionHome = function (props) { return (React.createElement(react_native_1.View, { style: styles.container }, !props.skillsToRevise || props.skillsToRevise.length === 0 ? (React.createElement(NoSkills, null)) : (React.createElement(Skills, { skills: __spreadArray(__spreadArray([], props.skillsToRevise, true), [{ isExtraSpace: true }], false) })))); };
100
+ exports.default = RevisionHome;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=revision-home.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revision-home.stories.d.ts","sourceRoot":"","sources":["../../../src/components/__tmp-backup-vues-mobile/revision-home.stories.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var React = require("react");
4
+ var react_native_1 = require("@storybook/react-native");
5
+ var revision_home_1 = require("./revision-home");
6
+ var emptySkills = [];
7
+ var skillsToRevise = [
8
+ { title: 'Negotiation and powers of persuasion', info: '75 questions to revise' },
9
+ { title: 'Negotiation and powers of persuasion', info: '75 questions to revise' },
10
+ { title: 'Negotiation and powers of persuasion', info: '75 questions to revise' },
11
+ { title: 'Negotiation and powers of persuasion', info: '75 questions to revise' },
12
+ { title: 'Creativity and innovation', info: '75 questions to revise' }
13
+ ];
14
+ (0, react_native_1.storiesOf)('RevisionHome', module)
15
+ .add('No skills', function () { return React.createElement(revision_home_1.default, { skillsToRevise: emptySkills }); })
16
+ .add('Few skills', function () { return React.createElement(revision_home_1.default, { skillsToRevise: skillsToRevise }); });
@@ -0,0 +1,3 @@
1
+ declare const RevisionOnboarding: () => JSX.Element;
2
+ export default RevisionOnboarding;
3
+ //# sourceMappingURL=revision-onboarding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revision-onboarding.d.ts","sourceRoot":"","sources":["../../../src/components/__tmp-backup-vues-mobile/revision-onboarding.tsx"],"names":[],"mappings":"AAkEA,QAAA,MAAM,kBAAkB,mBAevB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var React = require("react");
4
+ var react_native_1 = require("react-native");
5
+ // import theme from '../../../modules/theme';
6
+ // import translations from '../../../translations';
7
+ // import Button from '../../../app-shared/components/button';
8
+ // import {HEADER_HEIGHT} from '../../../app-shared/components/header-v2';
9
+ var styles = react_native_1.StyleSheet.create({
10
+ container: {
11
+ justifyContent: 'space-between',
12
+ flex: 1,
13
+ padding: 20
14
+ // paddingTop: HEADER_HEIGHT + 20
15
+ },
16
+ title: {
17
+ height: 72,
18
+ width: 268,
19
+ // fontSize: theme.fontSize.xxlarge,
20
+ // fontWeight: theme.fontWeight.bold,
21
+ lineHeight: 36
22
+ // color: theme.colors.text.primary,
23
+ // marginBottom: theme.spacing.small
24
+ },
25
+ text: {
26
+ // fontSize: theme.fontSize.large,
27
+ // color: theme.colors.text.primary,
28
+ opacity: 0.7
29
+ // marginBottom: theme.spacing.small
30
+ },
31
+ tip: {
32
+ flexDirection: 'row',
33
+ overflow: 'hidden',
34
+ alignItems: 'center',
35
+ height: 54,
36
+ borderRadius: 8
37
+ // backgroundColor: theme.colors.gray.extra,
38
+ // marginTop: theme.spacing.micro,
39
+ // marginBottom: theme.spacing.micro
40
+ },
41
+ tipText: {
42
+ // fontSize: theme.fontSize.large,
43
+ // color: theme.colors.text.primary
44
+ },
45
+ icon: {
46
+ margin: 10
47
+ },
48
+ button: {
49
+ height: 52,
50
+ borderRadius: 7
51
+ // marginBottom: theme.spacing.large,
52
+ // marginTop: theme.spacing.large
53
+ }
54
+ });
55
+ var onButtonPress = function () { };
56
+ var Tip = function (_a) {
57
+ var Icon = _a.Icon, text = _a.text;
58
+ return (React.createElement(react_native_1.View, { style: styles.tip },
59
+ React.createElement(react_native_1.Text, { style: styles.tipText }, text)));
60
+ };
61
+ var RevisionOnboarding = function () { return (React.createElement(react_native_1.View, { style: styles.container })); };
62
+ exports.default = RevisionOnboarding;
@@ -0,0 +1,18 @@
1
+ export declare type _Choice_ = {
2
+ text?: string;
3
+ selected: boolean;
4
+ };
5
+ export declare type _Slide_ = {
6
+ category: string;
7
+ question: string;
8
+ instruction: string;
9
+ type: 'multiSelection' | 'singleSelection' | 'trueOrFalse';
10
+ choices?: _Choice_[];
11
+ };
12
+ interface Props {
13
+ slide: _Slide_;
14
+ num: number;
15
+ }
16
+ declare const RevisionQuizzer: ({ slide }: Props) => JSX.Element;
17
+ export default RevisionQuizzer;
18
+ //# sourceMappingURL=revision-quizzer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revision-quizzer.d.ts","sourceRoot":"","sources":["../../../src/components/__tmp-backup-vues-mobile/revision-quizzer.tsx"],"names":[],"mappings":"AASA,oBAAY,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,oBAAY,OAAO,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,gBAAgB,GAAG,iBAAiB,GAAG,aAAa,CAAC;IAC3D,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;CACtB,CAAC;AAEF,UAAU,KAAK;IACb,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AA2ID,QAAA,MAAM,eAAe,cAAa,KAAK,gBAStC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var React = require("react");
4
+ var react_native_1 = require("react-native");
5
+ var quizzerStyle = react_native_1.StyleSheet.create({
6
+ container: {
7
+ flex: 1,
8
+ padding: 20,
9
+ // paddingTop: HEADER_HEIGHT + 20, @todo with props
10
+ // backgroundColor: theme.colors.white, @todo with props
11
+ justifyContent: 'space-between',
12
+ alignItems: 'center'
13
+ }
14
+ });
15
+ var SLIDE_HEIGHT = function () { return (0, react_native_1.useWindowDimensions)().height * 0.75; };
16
+ var creatSlideStyle = function (num) {
17
+ return react_native_1.StyleSheet.create({
18
+ slide: {
19
+ position: 'absolute',
20
+ // backgroundColor: theme.colors.white, @todo with props
21
+ top: (0, react_native_1.useWindowDimensions)().height / 2 - SLIDE_HEIGHT() / 2 - num * 4,
22
+ flex: 1,
23
+ height: SLIDE_HEIGHT(),
24
+ width: (0, react_native_1.useWindowDimensions)().width - 40 - num * 8,
25
+ justifyContent: 'space-between',
26
+ alignItems: 'center',
27
+ padding: 25,
28
+ shadowColor: '#000',
29
+ shadowOffset: { width: 0, height: -1 },
30
+ shadowOpacity: 0.05,
31
+ shadowRadius: 16,
32
+ elevation: 10 - num * 1,
33
+ borderRadius: 16
34
+ },
35
+ category: {
36
+ fontSize: 12,
37
+ lineHeight: 16,
38
+ // color: theme.colors.text.primary, @todo with props
39
+ // marginBottom: theme.spacing.tiny, @todo with props
40
+ // marginTop: theme.spacing.small, @todo with props
41
+ textAlign: 'center'
42
+ },
43
+ question: {
44
+ fontSize: 16,
45
+ lineHeight: 22,
46
+ fontWeight: '700',
47
+ // color: theme.colors.text.primary, @todo with props
48
+ textAlign: 'center'
49
+ },
50
+ instruction: {
51
+ fontSize: 12,
52
+ lineHeight: 16,
53
+ // color: theme.colors.gray.medium, @todo with props
54
+ // marginBottom: theme.spacing.base, @todo with props
55
+ // marginTop: theme.spacing.small, @todo with props
56
+ textAlign: 'center'
57
+ },
58
+ button: {
59
+ width: 287,
60
+ height: 52,
61
+ borderRadius: 7
62
+ // marginTop: theme.spacing.base @todo with props
63
+ }
64
+ });
65
+ };
66
+ var createOptionStyle = function (selected) {
67
+ // const brandTheme = React.useContext(BrandThemeContext); @todo with props
68
+ return react_native_1.StyleSheet.create({
69
+ box: {
70
+ width: '100%',
71
+ // https://stackoverflow.com/a/66561995/959219
72
+ shadowColor: '#000',
73
+ shadowOffset: { width: 0, height: -1 },
74
+ shadowOpacity: 0.2,
75
+ shadowRadius: 16,
76
+ elevation: 8,
77
+ // backgroundColor: selected ? brandTheme.colors.primary : theme.colors.white, @todo with props
78
+ padding: 12,
79
+ marginTop: 4,
80
+ marginBottom: 4,
81
+ borderRadius: 8
82
+ },
83
+ text: {
84
+ fontSize: 15,
85
+ fontWeight: 'bold',
86
+ lineHeight: 24,
87
+ // color: selected ? theme.colors.white : theme.colors.text.primary, @todo with props
88
+ textAlign: 'center'
89
+ }
90
+ });
91
+ };
92
+ var choicesStyle = react_native_1.StyleSheet.create({
93
+ container: {
94
+ flex: 1,
95
+ width: '100%',
96
+ justifyContent: 'center',
97
+ alignItems: 'center'
98
+ }
99
+ });
100
+ var onButtonPress = function () { };
101
+ var Choices = function (_a) {
102
+ var choices = _a.choices;
103
+ return (React.createElement(react_native_1.View, { style: choicesStyle.container }, choices.map(function (_a) {
104
+ var text = _a.text, _b = _a.selected, selected = _b === void 0 ? false : _b;
105
+ var optionStyle = createOptionStyle(selected);
106
+ return (React.createElement(react_native_1.View, { style: optionStyle.box },
107
+ React.createElement(react_native_1.Text, { style: optionStyle.text },
108
+ text,
109
+ " ",
110
+ selected)));
111
+ })));
112
+ };
113
+ var Slide = function (_a) {
114
+ var slide = _a.slide, num = _a.num;
115
+ var slideStyle = creatSlideStyle(num);
116
+ return (React.createElement(react_native_1.View, { style: slideStyle.slide },
117
+ React.createElement(react_native_1.Text, { style: slideStyle.category },
118
+ slide.category,
119
+ " ",
120
+ num),
121
+ React.createElement(react_native_1.Text, { style: slideStyle.question }, slide.question),
122
+ React.createElement(react_native_1.Text, { style: slideStyle.instruction }, slide.instruction),
123
+ React.createElement(Choices, { choices: slide.choices })));
124
+ };
125
+ var RevisionQuizzer = function (_a) {
126
+ var slide = _a.slide;
127
+ var slides = [slide, slide, slide, slide, slide];
128
+ return (React.createElement(react_native_1.View, { style: quizzerStyle.container }, slides.reverse().map(function (slide, index) { return (React.createElement(Slide, { slide: slide, num: slides.length - index })); })));
129
+ };
130
+ exports.default = RevisionQuizzer;
@@ -0,0 +1,6 @@
1
+ declare const RootView: ({ viewName, navigateTo }: {
2
+ viewName: any;
3
+ navigateTo: any;
4
+ }) => JSX.Element;
5
+ export default RootView;
6
+ //# sourceMappingURL=root-view.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,3 @@
1
+ declare const RootView: (props: any) => JSX.Element;
2
+ export default RootView;
3
+ //# sourceMappingURL=root-view.native.d.ts.map
@@ -0,0 +1 @@
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"}