@coorpacademy/components 10.22.24-alpha.5 → 10.22.25

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 (91) hide show
  1. package/es/atom/choice/index.native.js +4 -4
  2. package/es/atom/choice/index.native.js.map +1 -1
  3. package/es/atom/select-modal/index.native.js +1 -1
  4. package/es/atom/select-modal/index.native.js.map +1 -1
  5. package/es/hoc/modal/select/index.native.js.map +1 -1
  6. package/es/molecule/answer/index.native.js +85 -0
  7. package/es/molecule/answer/index.native.js.map +1 -0
  8. package/es/molecule/answer/prop-types.js +22 -3
  9. package/es/molecule/answer/prop-types.js.map +1 -1
  10. package/es/molecule/questions/mobile/draggable/index.native.js +8 -29
  11. package/es/molecule/questions/mobile/draggable/index.native.js.map +1 -1
  12. package/es/molecule/questions/mobile/switch/index.native.js +57 -54
  13. package/es/molecule/questions/mobile/switch/index.native.js.map +1 -1
  14. package/es/molecule/questions/mobile/template/index.native.js +18 -23
  15. package/es/molecule/questions/mobile/template/index.native.js.map +1 -1
  16. package/es/molecule/questions/types.js +2 -0
  17. package/{lib/types/styles.d.js.map → es/molecule/questions/types.js.map} +1 -1
  18. package/es/organism/review-congrats/index.js +3 -1
  19. package/es/organism/review-congrats/index.js.map +1 -1
  20. package/es/organism/review-congrats/style.css +5 -0
  21. package/es/organism/review-slide/index.js +7 -11
  22. package/es/organism/review-slide/index.js.map +1 -1
  23. package/es/organism/review-slide/index.native.js +213 -0
  24. package/es/organism/review-slide/index.native.js.map +1 -0
  25. package/es/organism/review-slide/prop-types.js +4 -3
  26. package/es/organism/review-slide/prop-types.js.map +1 -1
  27. package/es/organism/review-slide/style.css +4 -0
  28. package/es/organism/review-stacked-slides/index.native.js +34 -0
  29. package/es/organism/review-stacked-slides/index.native.js.map +1 -0
  30. package/es/organism/review-stacked-slides/prop-types.js +3 -2
  31. package/es/organism/review-stacked-slides/prop-types.js.map +1 -1
  32. package/es/template/app-review/player/index.native.js +33 -230
  33. package/es/template/app-review/player/index.native.js.map +1 -1
  34. package/es/template/app-review/player/prop-types.js.map +1 -1
  35. package/es/template/app-review/player/style.css +7 -0
  36. package/es/template/app-review/template-context.js +3 -1
  37. package/es/template/app-review/template-context.js.map +1 -1
  38. package/es/types/styles.js +2 -0
  39. package/es/types/{styles.d.js.map → styles.js.map} +1 -1
  40. package/lib/atom/choice/index.native.js +4 -4
  41. package/lib/atom/choice/index.native.js.map +1 -1
  42. package/lib/atom/select-modal/index.native.js +1 -1
  43. package/lib/atom/select-modal/index.native.js.map +1 -1
  44. package/lib/hoc/modal/select/index.native.js.map +1 -1
  45. package/lib/molecule/answer/index.native.js +94 -0
  46. package/lib/molecule/answer/index.native.js.map +1 -0
  47. package/lib/molecule/answer/prop-types.js +25 -3
  48. package/lib/molecule/answer/prop-types.js.map +1 -1
  49. package/lib/molecule/questions/mobile/draggable/index.native.js +8 -31
  50. package/lib/molecule/questions/mobile/draggable/index.native.js.map +1 -1
  51. package/lib/molecule/questions/mobile/switch/index.native.js +64 -62
  52. package/lib/molecule/questions/mobile/switch/index.native.js.map +1 -1
  53. package/lib/molecule/questions/mobile/template/index.native.js +18 -23
  54. package/lib/molecule/questions/mobile/template/index.native.js.map +1 -1
  55. package/lib/molecule/questions/types.js +2 -0
  56. package/lib/{types/app-review.d.js.map → molecule/questions/types.js.map} +1 -1
  57. package/lib/organism/review-congrats/index.js +3 -1
  58. package/lib/organism/review-congrats/index.js.map +1 -1
  59. package/lib/organism/review-congrats/style.css +5 -0
  60. package/lib/organism/review-slide/index.js +7 -11
  61. package/lib/organism/review-slide/index.js.map +1 -1
  62. package/lib/organism/review-slide/index.native.js +232 -0
  63. package/lib/organism/review-slide/index.native.js.map +1 -0
  64. package/lib/organism/review-slide/prop-types.js +6 -5
  65. package/lib/organism/review-slide/prop-types.js.map +1 -1
  66. package/lib/organism/review-slide/style.css +4 -0
  67. package/lib/organism/review-stacked-slides/index.native.js +47 -0
  68. package/lib/organism/review-stacked-slides/index.native.js.map +1 -0
  69. package/lib/organism/review-stacked-slides/prop-types.js +3 -2
  70. package/lib/organism/review-stacked-slides/prop-types.js.map +1 -1
  71. package/lib/template/app-review/player/index.native.js +36 -233
  72. package/lib/template/app-review/player/index.native.js.map +1 -1
  73. package/lib/template/app-review/player/prop-types.js.map +1 -1
  74. package/lib/template/app-review/player/style.css +7 -0
  75. package/lib/template/app-review/template-context.js +3 -1
  76. package/lib/template/app-review/template-context.js.map +1 -1
  77. package/lib/types/styles.js +2 -0
  78. package/{es/types/app-review.d.js.map → lib/types/styles.js.map} +1 -1
  79. package/package.json +2 -2
  80. package/es/molecule/questions/qcm/index.native.js +0 -50
  81. package/es/molecule/questions/qcm/index.native.js.map +0 -1
  82. package/es/types/app-review.d.js +0 -2
  83. package/es/types/progression-engine.d.js +0 -2
  84. package/es/types/progression-engine.d.js.map +0 -1
  85. package/es/types/styles.d.js +0 -2
  86. package/lib/molecule/questions/qcm/index.native.js +0 -62
  87. package/lib/molecule/questions/qcm/index.native.js.map +0 -1
  88. package/lib/types/app-review.d.js +0 -2
  89. package/lib/types/progression-engine.d.js +0 -2
  90. package/lib/types/progression-engine.d.js.map +0 -1
  91. package/lib/types/styles.d.js +0 -2
@@ -1,50 +0,0 @@
1
- import { View, StyleSheet } from 'react-native';
2
- import React, { useState, useEffect } from 'react';
3
- import { useTemplateContext } from '../../../template/app-review/template-context';
4
-
5
- const createStyleSheet = theme => StyleSheet.create({
6
- boxShadow: {
7
- shadowColor: '#000',
8
- shadowOffset: {
9
- width: 0,
10
- height: 4
11
- },
12
- shadowOpacity: 0.12,
13
- shadowRadius: 16,
14
- elevation: 6
15
- },
16
- container: {
17
- backgroundColor: theme.colors.white,
18
- borderRadius: theme.radius.regular,
19
- overflow: 'hidden',
20
- flexDirection: 'row',
21
- alignItems: 'stretch'
22
- }
23
- });
24
-
25
- const QuestionChoiceComponent = ({
26
- children,
27
- isSelected = false,
28
- testID: prefixTestID
29
- }) => {
30
- const selectedSuffix = prefixTestID && isSelected ? '-selected' : '';
31
- const [styleSheet, setStylesheet] = useState(null);
32
- const templateContext = useTemplateContext();
33
- const {
34
- theme
35
- } = templateContext;
36
- useEffect(() => {
37
- const _stylesheet = createStyleSheet(theme);
38
-
39
- setStylesheet(_stylesheet);
40
- }, [theme]);
41
- return /*#__PURE__*/React.createElement(View, {
42
- style: [styleSheet && styleSheet.boxShadow]
43
- }, /*#__PURE__*/React.createElement(View, {
44
- style: [styleSheet && styleSheet.container],
45
- testID: prefixTestID && `${prefixTestID}${selectedSuffix}`
46
- }, children));
47
- };
48
-
49
- export default QuestionChoiceComponent;
50
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/molecule/questions/qcm/index.native.tsx"],"names":["View","StyleSheet","React","useState","useEffect","useTemplateContext","createStyleSheet","theme","create","boxShadow","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","container","backgroundColor","colors","white","borderRadius","radius","regular","overflow","flexDirection","alignItems","QuestionChoiceComponent","children","isSelected","testID","prefixTestID","selectedSuffix","styleSheet","setStylesheet","templateContext","_stylesheet"],"mappings":"AAAA,SAAQA,IAAR,EAAcC,UAAd,QAA0C,cAA1C;AACA,OAAOC,KAAP,IAAeC,QAAf,EAAyBC,SAAzB,QAAyC,OAAzC;AACA,SAAQC,kBAAR,QAAiC,+CAAjC;;AAmCA,MAAMC,gBAAgB,GAAIC,KAAD,IACvBN,UAAU,CAACO,MAAX,CAAkB;AAChBC,EAAAA,SAAS,EAAE;AACTC,IAAAA,WAAW,EAAE,MADJ;AAETC,IAAAA,YAAY,EAAE;AAACC,MAAAA,KAAK,EAAE,CAAR;AAAWC,MAAAA,MAAM,EAAE;AAAnB,KAFL;AAGTC,IAAAA,aAAa,EAAE,IAHN;AAITC,IAAAA,YAAY,EAAE,EAJL;AAKTC,IAAAA,SAAS,EAAE;AALF,GADK;AAQhBC,EAAAA,SAAS,EAAE;AACTC,IAAAA,eAAe,EAAEX,KAAK,CAACY,MAAN,CAAaC,KADrB;AAETC,IAAAA,YAAY,EAAEd,KAAK,CAACe,MAAN,CAAaC,OAFlB;AAGTC,IAAAA,QAAQ,EAAE,QAHD;AAITC,IAAAA,aAAa,EAAE,KAJN;AAKTC,IAAAA,UAAU,EAAE;AALH;AARK,CAAlB,CADF;;AAkBA,MAAMC,uBAAuB,GAAG,CAAC;AAACC,EAAAA,QAAD;AAAWC,EAAAA,UAAU,GAAG,KAAxB;AAA+BC,EAAAA,MAAM,EAAEC;AAAvC,CAAD,KAAiE;AAC/F,QAAMC,cAAc,GAAGD,YAAY,IAAIF,UAAhB,GAA6B,WAA7B,GAA2C,EAAlE;AAEA,QAAM,CAACI,UAAD,EAAaC,aAAb,IAA8B/B,QAAQ,CAAmB,IAAnB,CAA5C;AAEA,QAAMgC,eAAe,GAAG9B,kBAAkB,EAA1C;AACA,QAAM;AAACE,IAAAA;AAAD,MAAU4B,eAAhB;AAEA/B,EAAAA,SAAS,CAAC,MAAM;AACd,UAAMgC,WAAW,GAAG9B,gBAAgB,CAACC,KAAD,CAApC;;AACA2B,IAAAA,aAAa,CAACE,WAAD,CAAb;AACD,GAHQ,EAGN,CAAC7B,KAAD,CAHM,CAAT;AAKA,sBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE,CAAC0B,UAAU,IAAIA,UAAU,CAACxB,SAA1B;AAAb,kBACE,oBAAC,IAAD;AACE,IAAA,KAAK,EAAE,CAACwB,UAAU,IAAIA,UAAU,CAAChB,SAA1B,CADT;AAEE,IAAA,MAAM,EAAEc,YAAY,IAAK,GAAEA,YAAa,GAAEC,cAAe;AAF3D,KAIGJ,QAJH,CADF,CADF;AAUD,CAvBD;;AAyBA,eAAeD,uBAAf","sourcesContent":["import {View, StyleSheet, ViewStyle} from 'react-native';\nimport React, {useState, useEffect} from 'react';\nimport {useTemplateContext} from '../../../template/app-review/template-context';\n\ninterface Props {\n isSelected?: boolean;\n children: string;\n testID?: string;\n style?: ViewStyle;\n theme?: any;\n}\n\ntype StyleType = {\n boxShadow: {\n shadowColor: string;\n shadowOffset: {\n width: number;\n height: number;\n };\n shadowOpacity: number;\n shadowRadius: number;\n elevation: number;\n };\n container: {\n backgroundColor: string;\n borderRadius: number;\n shadowColor: string;\n shadowOffset: {width: number; height: number};\n shadowOpacity: number;\n shadowRadius: number;\n elevation: number;\n overflow: string;\n flexDirection: string;\n alignItems: string;\n };\n};\n\nconst createStyleSheet = (theme: any) =>\n StyleSheet.create({\n boxShadow: {\n shadowColor: '#000',\n shadowOffset: {width: 0, height: 4},\n shadowOpacity: 0.12,\n shadowRadius: 16,\n elevation: 6\n },\n container: {\n backgroundColor: theme.colors.white,\n borderRadius: theme.radius.regular,\n overflow: 'hidden',\n flexDirection: 'row',\n alignItems: 'stretch'\n }\n });\n\nconst QuestionChoiceComponent = ({children, isSelected = false, testID: prefixTestID}: Props) => {\n const selectedSuffix = prefixTestID && isSelected ? '-selected' : '';\n\n const [styleSheet, setStylesheet] = useState<StyleType | null>(null);\n\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n return (\n <View style={[styleSheet && styleSheet.boxShadow]}>\n <View\n style={[styleSheet && styleSheet.container]}\n testID={prefixTestID && `${prefixTestID}${selectedSuffix}`}\n >\n {children}\n </View>\n </View>\n );\n};\n\nexport default QuestionChoiceComponent;\n"],"file":"index.native.js"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=app-review.d.js.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=progression-engine.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"progression-engine.d.js"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=styles.d.js.map
@@ -1,62 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
-
6
- var _reactNative = require("react-native");
7
-
8
- var _react = _interopRequireWildcard(require("react"));
9
-
10
- var _templateContext = require("../../../template/app-review/template-context");
11
-
12
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
13
-
14
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
-
16
- const createStyleSheet = theme => _reactNative.StyleSheet.create({
17
- boxShadow: {
18
- shadowColor: '#000',
19
- shadowOffset: {
20
- width: 0,
21
- height: 4
22
- },
23
- shadowOpacity: 0.12,
24
- shadowRadius: 16,
25
- elevation: 6
26
- },
27
- container: {
28
- backgroundColor: theme.colors.white,
29
- borderRadius: theme.radius.regular,
30
- overflow: 'hidden',
31
- flexDirection: 'row',
32
- alignItems: 'stretch'
33
- }
34
- });
35
-
36
- const QuestionChoiceComponent = ({
37
- children,
38
- isSelected = false,
39
- testID: prefixTestID
40
- }) => {
41
- const selectedSuffix = prefixTestID && isSelected ? '-selected' : '';
42
- const [styleSheet, setStylesheet] = (0, _react.useState)(null);
43
- const templateContext = (0, _templateContext.useTemplateContext)();
44
- const {
45
- theme
46
- } = templateContext;
47
- (0, _react.useEffect)(() => {
48
- const _stylesheet = createStyleSheet(theme);
49
-
50
- setStylesheet(_stylesheet);
51
- }, [theme]);
52
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
53
- style: [styleSheet && styleSheet.boxShadow]
54
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
55
- style: [styleSheet && styleSheet.container],
56
- testID: prefixTestID && `${prefixTestID}${selectedSuffix}`
57
- }, children));
58
- };
59
-
60
- var _default = QuestionChoiceComponent;
61
- exports.default = _default;
62
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/molecule/questions/qcm/index.native.tsx"],"names":["createStyleSheet","theme","StyleSheet","create","boxShadow","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","container","backgroundColor","colors","white","borderRadius","radius","regular","overflow","flexDirection","alignItems","QuestionChoiceComponent","children","isSelected","testID","prefixTestID","selectedSuffix","styleSheet","setStylesheet","templateContext","_stylesheet"],"mappings":";;;;;AAAA;;AACA;;AACA;;;;;;AAmCA,MAAMA,gBAAgB,GAAIC,KAAD,IACvBC,wBAAWC,MAAX,CAAkB;AAChBC,EAAAA,SAAS,EAAE;AACTC,IAAAA,WAAW,EAAE,MADJ;AAETC,IAAAA,YAAY,EAAE;AAACC,MAAAA,KAAK,EAAE,CAAR;AAAWC,MAAAA,MAAM,EAAE;AAAnB,KAFL;AAGTC,IAAAA,aAAa,EAAE,IAHN;AAITC,IAAAA,YAAY,EAAE,EAJL;AAKTC,IAAAA,SAAS,EAAE;AALF,GADK;AAQhBC,EAAAA,SAAS,EAAE;AACTC,IAAAA,eAAe,EAAEZ,KAAK,CAACa,MAAN,CAAaC,KADrB;AAETC,IAAAA,YAAY,EAAEf,KAAK,CAACgB,MAAN,CAAaC,OAFlB;AAGTC,IAAAA,QAAQ,EAAE,QAHD;AAITC,IAAAA,aAAa,EAAE,KAJN;AAKTC,IAAAA,UAAU,EAAE;AALH;AARK,CAAlB,CADF;;AAkBA,MAAMC,uBAAuB,GAAG,CAAC;AAACC,EAAAA,QAAD;AAAWC,EAAAA,UAAU,GAAG,KAAxB;AAA+BC,EAAAA,MAAM,EAAEC;AAAvC,CAAD,KAAiE;AAC/F,QAAMC,cAAc,GAAGD,YAAY,IAAIF,UAAhB,GAA6B,WAA7B,GAA2C,EAAlE;AAEA,QAAM,CAACI,UAAD,EAAaC,aAAb,IAA8B,qBAA2B,IAA3B,CAApC;AAEA,QAAMC,eAAe,GAAG,0CAAxB;AACA,QAAM;AAAC7B,IAAAA;AAAD,MAAU6B,eAAhB;AAEA,wBAAU,MAAM;AACd,UAAMC,WAAW,GAAG/B,gBAAgB,CAACC,KAAD,CAApC;;AACA4B,IAAAA,aAAa,CAACE,WAAD,CAAb;AACD,GAHD,EAGG,CAAC9B,KAAD,CAHH;AAKA,sBACE,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAAC2B,UAAU,IAAIA,UAAU,CAACxB,SAA1B;AAAb,kBACE,6BAAC,iBAAD;AACE,IAAA,KAAK,EAAE,CAACwB,UAAU,IAAIA,UAAU,CAAChB,SAA1B,CADT;AAEE,IAAA,MAAM,EAAEc,YAAY,IAAK,GAAEA,YAAa,GAAEC,cAAe;AAF3D,KAIGJ,QAJH,CADF,CADF;AAUD,CAvBD;;eAyBeD,uB","sourcesContent":["import {View, StyleSheet, ViewStyle} from 'react-native';\nimport React, {useState, useEffect} from 'react';\nimport {useTemplateContext} from '../../../template/app-review/template-context';\n\ninterface Props {\n isSelected?: boolean;\n children: string;\n testID?: string;\n style?: ViewStyle;\n theme?: any;\n}\n\ntype StyleType = {\n boxShadow: {\n shadowColor: string;\n shadowOffset: {\n width: number;\n height: number;\n };\n shadowOpacity: number;\n shadowRadius: number;\n elevation: number;\n };\n container: {\n backgroundColor: string;\n borderRadius: number;\n shadowColor: string;\n shadowOffset: {width: number; height: number};\n shadowOpacity: number;\n shadowRadius: number;\n elevation: number;\n overflow: string;\n flexDirection: string;\n alignItems: string;\n };\n};\n\nconst createStyleSheet = (theme: any) =>\n StyleSheet.create({\n boxShadow: {\n shadowColor: '#000',\n shadowOffset: {width: 0, height: 4},\n shadowOpacity: 0.12,\n shadowRadius: 16,\n elevation: 6\n },\n container: {\n backgroundColor: theme.colors.white,\n borderRadius: theme.radius.regular,\n overflow: 'hidden',\n flexDirection: 'row',\n alignItems: 'stretch'\n }\n });\n\nconst QuestionChoiceComponent = ({children, isSelected = false, testID: prefixTestID}: Props) => {\n const selectedSuffix = prefixTestID && isSelected ? '-selected' : '';\n\n const [styleSheet, setStylesheet] = useState<StyleType | null>(null);\n\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n return (\n <View style={[styleSheet && styleSheet.boxShadow]}>\n <View\n style={[styleSheet && styleSheet.container]}\n testID={prefixTestID && `${prefixTestID}${selectedSuffix}`}\n >\n {children}\n </View>\n </View>\n );\n};\n\nexport default QuestionChoiceComponent;\n"],"file":"index.native.js"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=app-review.d.js.map
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=progression-engine.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"progression-engine.d.js"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=styles.d.js.map