@coorpacademy/components 10.22.24 → 10.22.25-alpha.20
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/atom/choice/index.native.js +4 -4
- package/es/atom/choice/index.native.js.map +1 -1
- package/es/atom/select-modal/index.native.js +1 -1
- package/es/atom/select-modal/index.native.js.map +1 -1
- package/es/molecule/answer/index.native.js +85 -0
- package/es/molecule/answer/index.native.js.map +1 -0
- package/es/molecule/answer/prop-types.js +22 -3
- package/es/molecule/answer/prop-types.js.map +1 -1
- package/es/molecule/questions/mobile/draggable/index.native.js +8 -29
- package/es/molecule/questions/mobile/draggable/index.native.js.map +1 -1
- package/es/molecule/questions/mobile/switch/index.native.js +57 -54
- package/es/molecule/questions/mobile/switch/index.native.js.map +1 -1
- package/es/molecule/questions/mobile/template/index.native.js +18 -23
- package/es/molecule/questions/mobile/template/index.native.js.map +1 -1
- package/es/organism/review-congrats/index.js +3 -1
- package/es/organism/review-congrats/index.js.map +1 -1
- package/es/organism/review-congrats/style.css +5 -0
- package/es/organism/review-slide/index.js +1 -8
- package/es/organism/review-slide/index.js.map +1 -1
- package/es/organism/review-slide/index.native.js +213 -0
- package/es/organism/review-slide/index.native.js.map +1 -0
- package/es/organism/review-slide/prop-types.js +4 -3
- package/es/organism/review-slide/prop-types.js.map +1 -1
- package/es/organism/review-stacked-slides/index.native.js +34 -0
- package/es/organism/review-stacked-slides/index.native.js.map +1 -0
- package/es/organism/review-stacked-slides/prop-types.js +3 -2
- package/es/organism/review-stacked-slides/prop-types.js.map +1 -1
- package/es/template/app-player/loading/index.js +9 -3
- package/es/template/app-player/loading/index.js.map +1 -1
- package/es/template/app-player/popin-correction/index.js +6 -3
- package/es/template/app-player/popin-correction/index.js.map +1 -1
- package/es/template/app-player/popin-end/index.js +6 -3
- package/es/template/app-player/popin-end/index.js.map +1 -1
- package/es/template/app-review/player/index.native.js +33 -230
- package/es/template/app-review/player/index.native.js.map +1 -1
- package/es/template/app-review/player/prop-types.js.map +1 -1
- package/es/template/app-review/player/style.css +7 -0
- package/es/template/app-review/template-context.js +3 -1
- package/es/template/app-review/template-context.js.map +1 -1
- package/lib/atom/choice/index.native.js +4 -4
- package/lib/atom/choice/index.native.js.map +1 -1
- package/lib/atom/select-modal/index.native.js +1 -1
- package/lib/atom/select-modal/index.native.js.map +1 -1
- package/lib/molecule/answer/index.native.js +94 -0
- package/lib/molecule/answer/index.native.js.map +1 -0
- package/lib/molecule/answer/prop-types.js +25 -3
- package/lib/molecule/answer/prop-types.js.map +1 -1
- package/lib/molecule/questions/mobile/draggable/index.native.js +8 -31
- package/lib/molecule/questions/mobile/draggable/index.native.js.map +1 -1
- package/lib/molecule/questions/mobile/switch/index.native.js +64 -62
- package/lib/molecule/questions/mobile/switch/index.native.js.map +1 -1
- package/lib/molecule/questions/mobile/template/index.native.js +18 -23
- package/lib/molecule/questions/mobile/template/index.native.js.map +1 -1
- package/lib/organism/review-congrats/index.js +3 -1
- package/lib/organism/review-congrats/index.js.map +1 -1
- package/lib/organism/review-congrats/style.css +5 -0
- package/lib/organism/review-slide/index.js +1 -8
- package/lib/organism/review-slide/index.js.map +1 -1
- package/lib/organism/review-slide/index.native.js +232 -0
- package/lib/organism/review-slide/index.native.js.map +1 -0
- package/lib/organism/review-slide/prop-types.js +6 -5
- package/lib/organism/review-slide/prop-types.js.map +1 -1
- package/lib/organism/review-stacked-slides/index.native.js +47 -0
- package/lib/organism/review-stacked-slides/index.native.js.map +1 -0
- package/lib/organism/review-stacked-slides/prop-types.js +3 -2
- package/lib/organism/review-stacked-slides/prop-types.js.map +1 -1
- package/lib/template/app-player/loading/index.js +11 -3
- package/lib/template/app-player/loading/index.js.map +1 -1
- package/lib/template/app-player/popin-correction/index.js +7 -3
- package/lib/template/app-player/popin-correction/index.js.map +1 -1
- package/lib/template/app-player/popin-end/index.js +7 -3
- package/lib/template/app-player/popin-end/index.js.map +1 -1
- package/lib/template/app-review/player/index.native.js +36 -233
- package/lib/template/app-review/player/index.native.js.map +1 -1
- package/lib/template/app-review/player/prop-types.js.map +1 -1
- package/lib/template/app-review/player/style.css +7 -0
- package/lib/template/app-review/template-context.js +3 -1
- package/lib/template/app-review/template-context.js.map +1 -1
- package/package.json +2 -2
- package/es/molecule/questions/qcm/index.native.js +0 -50
- package/es/molecule/questions/qcm/index.native.js.map +0 -1
- package/lib/molecule/questions/qcm/index.native.js +0 -62
- package/lib/molecule/questions/qcm/index.native.js.map +0 -1
|
@@ -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,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"}
|