@coorpacademy/components 10.30.9 → 10.30.10-alpha.3
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/button/index.native.d.ts +14 -0
- package/es/atom/button/index.native.d.ts.map +1 -0
- package/es/atom/button/index.native.js +57 -0
- package/es/atom/button/index.native.js.map +1 -0
- package/es/atom/choice/index.native.js +2 -4
- package/es/atom/choice/index.native.js.map +1 -1
- package/es/atom/html/index.native.js +1 -3
- package/es/atom/html/index.native.js.map +1 -1
- package/es/atom/review-presentation/index.native.js +56 -60
- package/es/atom/review-presentation/index.native.js.map +1 -1
- package/es/atom/text/index.native.d.ts +2 -2
- package/es/atom/text/index.native.d.ts.map +1 -1
- package/es/atom/text/index.native.js.map +1 -1
- package/es/hoc/modal/select/index.native.js +3 -3
- package/es/hoc/modal/select/index.native.js.map +1 -1
- package/es/hoc/modal/select-item/index.native.js +13 -17
- package/es/hoc/modal/select-item/index.native.js.map +1 -1
- package/es/hoc/touchable/index.native.d.ts +2 -2
- package/es/hoc/touchable/index.native.d.ts.map +1 -1
- package/es/hoc/touchable/index.native.js +5 -2
- package/es/hoc/touchable/index.native.js.map +1 -1
- package/es/molecule/card-congrats/index.native.d.ts +5 -0
- package/es/molecule/card-congrats/index.native.d.ts.map +1 -0
- package/es/molecule/card-congrats/index.native.js +102 -0
- package/es/molecule/card-congrats/index.native.js.map +1 -0
- package/es/molecule/card-congrats/types.d.ts +15 -0
- package/es/molecule/card-congrats/types.d.ts.map +1 -0
- package/es/molecule/card-congrats/types.js +2 -0
- package/es/molecule/card-congrats/types.js.map +1 -0
- package/es/molecule/dashboard/cards-list/index.js +3 -7
- package/es/molecule/dashboard/cards-list/index.js.map +1 -1
- package/es/molecule/questions/free-text/index.native.js +26 -30
- package/es/molecule/questions/free-text/index.native.js.map +1 -1
- package/es/molecule/questions/mobile/slider/index.native.js +3 -5
- package/es/molecule/questions/mobile/slider/index.native.js.map +1 -1
- package/es/molecule/questions/mobile/template/index.native.js +1 -3
- package/es/molecule/questions/mobile/template/index.native.js.map +1 -1
- package/es/molecule/review-card-congrats/index.js +2 -2
- package/es/molecule/review-card-congrats/index.js.map +1 -1
- package/es/molecule/review-correction-popin/prop-types.d.ts +3 -0
- package/es/molecule/review-correction-popin/prop-types.d.ts.map +1 -1
- package/es/molecule/review-correction-popin/prop-types.js.map +1 -1
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +6 -6
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/review-congrats/index.js +1 -3
- package/es/organism/review-congrats/index.js.map +1 -1
- package/es/organism/review-congrats/index.native.d.ts +5 -0
- package/es/organism/review-congrats/index.native.d.ts.map +1 -0
- package/es/organism/review-congrats/index.native.js +130 -0
- package/es/organism/review-congrats/index.native.js.map +1 -0
- package/es/organism/review-slide/index.native.d.ts.map +1 -1
- package/es/organism/review-slide/index.native.js +16 -61
- package/es/organism/review-slide/index.native.js.map +1 -1
- package/es/organism/review-slide/prop-types.d.ts +5 -0
- package/es/organism/review-slide/prop-types.d.ts.map +1 -1
- package/es/organism/review-slide/prop-types.js.map +1 -1
- package/es/organism/review-stacked-slides/index.native.d.ts.map +1 -1
- package/es/organism/review-stacked-slides/index.native.js +1 -2
- package/es/organism/review-stacked-slides/index.native.js.map +1 -1
- package/es/template/app-review/player/index.native.d.ts.map +1 -1
- package/es/template/app-review/player/index.native.js +8 -9
- package/es/template/app-review/player/index.native.js.map +1 -1
- package/lib/atom/button/index.native.d.ts +14 -0
- package/lib/atom/button/index.native.d.ts.map +1 -0
- package/lib/atom/button/index.native.js +73 -0
- package/lib/atom/button/index.native.js.map +1 -0
- package/lib/atom/choice/index.native.js +2 -4
- package/lib/atom/choice/index.native.js.map +1 -1
- package/lib/atom/html/index.native.js +1 -3
- package/lib/atom/html/index.native.js.map +1 -1
- package/lib/atom/review-presentation/index.native.js +56 -60
- package/lib/atom/review-presentation/index.native.js.map +1 -1
- package/lib/atom/text/index.native.d.ts +2 -2
- package/lib/atom/text/index.native.d.ts.map +1 -1
- package/lib/atom/text/index.native.js.map +1 -1
- package/lib/hoc/modal/select/index.native.js +3 -3
- package/lib/hoc/modal/select/index.native.js.map +1 -1
- package/lib/hoc/modal/select-item/index.native.js +13 -17
- package/lib/hoc/modal/select-item/index.native.js.map +1 -1
- package/lib/hoc/touchable/index.native.d.ts +2 -2
- package/lib/hoc/touchable/index.native.d.ts.map +1 -1
- package/lib/hoc/touchable/index.native.js +5 -2
- package/lib/hoc/touchable/index.native.js.map +1 -1
- package/lib/molecule/card-congrats/index.native.d.ts +5 -0
- package/lib/molecule/card-congrats/index.native.d.ts.map +1 -0
- package/lib/molecule/card-congrats/index.native.js +118 -0
- package/lib/molecule/card-congrats/index.native.js.map +1 -0
- package/lib/molecule/card-congrats/types.d.ts +15 -0
- package/lib/molecule/card-congrats/types.d.ts.map +1 -0
- package/lib/molecule/card-congrats/types.js +2 -0
- package/lib/molecule/card-congrats/types.js.map +1 -0
- package/lib/molecule/dashboard/cards-list/index.js +3 -7
- package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
- package/lib/molecule/questions/free-text/index.native.js +26 -30
- package/lib/molecule/questions/free-text/index.native.js.map +1 -1
- package/lib/molecule/questions/mobile/slider/index.native.js +3 -5
- package/lib/molecule/questions/mobile/slider/index.native.js.map +1 -1
- package/lib/molecule/questions/mobile/template/index.native.js +1 -3
- package/lib/molecule/questions/mobile/template/index.native.js.map +1 -1
- package/lib/molecule/review-card-congrats/index.js.map +1 -1
- package/lib/molecule/review-correction-popin/prop-types.d.ts +3 -0
- package/lib/molecule/review-correction-popin/prop-types.d.ts.map +1 -1
- package/lib/molecule/review-correction-popin/prop-types.js.map +1 -1
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +6 -6
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/review-congrats/index.js +1 -3
- package/lib/organism/review-congrats/index.js.map +1 -1
- package/lib/organism/review-congrats/index.native.d.ts +5 -0
- package/lib/organism/review-congrats/index.native.d.ts.map +1 -0
- package/lib/organism/review-congrats/index.native.js +149 -0
- package/lib/organism/review-congrats/index.native.js.map +1 -0
- package/lib/organism/review-slide/index.native.d.ts.map +1 -1
- package/lib/organism/review-slide/index.native.js +16 -61
- package/lib/organism/review-slide/index.native.js.map +1 -1
- package/lib/organism/review-slide/prop-types.d.ts +5 -0
- package/lib/organism/review-slide/prop-types.d.ts.map +1 -1
- package/lib/organism/review-slide/prop-types.js.map +1 -1
- package/lib/organism/review-stacked-slides/index.native.d.ts.map +1 -1
- package/lib/organism/review-stacked-slides/index.native.js +1 -2
- package/lib/organism/review-stacked-slides/index.native.js.map +1 -1
- package/lib/template/app-review/player/index.native.d.ts.map +1 -1
- package/lib/template/app-review/player/index.native.js +10 -10
- package/lib/template/app-review/player/index.native.js.map +1 -1
- package/package.json +4 -3
|
@@ -8,7 +8,7 @@ import Text from '../../atom/text/index.native';
|
|
|
8
8
|
import Answer from '../../molecule/answer/index.native';
|
|
9
9
|
import ReviewCorrectionPopin from '../../molecule/review-correction-popin/index.native';
|
|
10
10
|
import { useTemplateContext } from '../../template/app-review/template-context';
|
|
11
|
-
import
|
|
11
|
+
import Button from '../../atom/button/index.native';
|
|
12
12
|
const styles = StyleSheet.create({
|
|
13
13
|
correctionPopinWrapper: {
|
|
14
14
|
position: 'absolute',
|
|
@@ -66,57 +66,6 @@ const CorrectionPopin = ({
|
|
|
66
66
|
}, /*#__PURE__*/React.createElement(ReviewCorrectionPopin, _correctionPopinProps));
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
const createValidateButtonStyle = (theme, brandTheme) => {
|
|
70
|
-
var _brandTheme$colors;
|
|
71
|
-
|
|
72
|
-
return StyleSheet.create({
|
|
73
|
-
validateButton: {
|
|
74
|
-
backgroundColor: (brandTheme == null ? void 0 : (_brandTheme$colors = brandTheme.colors) == null ? void 0 : _brandTheme$colors.primary) || theme.colors.text.primary,
|
|
75
|
-
borderRadius: 7,
|
|
76
|
-
width: '100%'
|
|
77
|
-
},
|
|
78
|
-
validateButtonText: {
|
|
79
|
-
fontSize: 14,
|
|
80
|
-
lineHeight: 20,
|
|
81
|
-
fontWeight: theme.fontWeight.bold,
|
|
82
|
-
color: theme.colors.white,
|
|
83
|
-
marginBottom: theme.spacing.small,
|
|
84
|
-
marginTop: theme.spacing.small,
|
|
85
|
-
textAlign: 'center'
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const ValidateButton = ({
|
|
91
|
-
slideIndex,
|
|
92
|
-
validateButton
|
|
93
|
-
}) => {
|
|
94
|
-
const {
|
|
95
|
-
label,
|
|
96
|
-
onClick,
|
|
97
|
-
disabled
|
|
98
|
-
} = validateButton;
|
|
99
|
-
const {
|
|
100
|
-
theme,
|
|
101
|
-
brandTheme
|
|
102
|
-
} = useTemplateContext();
|
|
103
|
-
const [style, setStyle] = useState();
|
|
104
|
-
useEffect(() => {
|
|
105
|
-
const buttonStyle = createValidateButtonStyle(theme, brandTheme);
|
|
106
|
-
setStyle(buttonStyle);
|
|
107
|
-
}, [theme, brandTheme]);
|
|
108
|
-
if (!style) return null;
|
|
109
|
-
return /*#__PURE__*/React.createElement(Touchable, {
|
|
110
|
-
style: style.validateButton,
|
|
111
|
-
onPress: onClick,
|
|
112
|
-
disabled: disabled,
|
|
113
|
-
accessibilityLabel: label,
|
|
114
|
-
testID: `slide-validate-button-${slideIndex}`
|
|
115
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
116
|
-
style: style.validateButtonText
|
|
117
|
-
}, label));
|
|
118
|
-
};
|
|
119
|
-
|
|
120
69
|
const createQuestionStyle = theme => StyleSheet.create({
|
|
121
70
|
questionHeading: {
|
|
122
71
|
justifyContent: 'space-between'
|
|
@@ -226,27 +175,33 @@ const Slide = props => {
|
|
|
226
175
|
showCorrectionPopin,
|
|
227
176
|
animateCorrectionPopin
|
|
228
177
|
} = slide;
|
|
178
|
+
|
|
179
|
+
if (loading) {
|
|
180
|
+
return /*#__PURE__*/React.createElement(Text, null, "@todo loader ", num);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const {
|
|
184
|
+
onClick: handleValidatePress
|
|
185
|
+
} = validateButton;
|
|
229
186
|
return /*#__PURE__*/React.createElement(View, {
|
|
230
187
|
style: slideStyle.slide
|
|
231
|
-
},
|
|
232
|
-
/*#__PURE__*/
|
|
233
|
-
// <Loader className={style.loader} theme="default" aria-label={loadingAriaLabel} />
|
|
234
|
-
React.createElement(Text, null, "@todo loader ", num) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Question, {
|
|
188
|
+
}, /*#__PURE__*/React.createElement(Question, {
|
|
235
189
|
questionOrigin: parentContentTitle,
|
|
236
190
|
questionText: questionText,
|
|
237
191
|
answerUI: answerUI,
|
|
238
192
|
key: "question-container"
|
|
239
|
-
}), /*#__PURE__*/React.createElement(
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
193
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
194
|
+
disabled: validateButton.disabled,
|
|
195
|
+
submitValue: validateButton.label,
|
|
196
|
+
onPress: handleValidatePress,
|
|
197
|
+
testID: `slide-validate-button-${slideIndex}`
|
|
243
198
|
}), correctionPopinProps ? /*#__PURE__*/React.createElement(CorrectionPopin, {
|
|
244
199
|
correctionPopinProps: correctionPopinProps,
|
|
245
200
|
slideIndex: slideIndex,
|
|
246
201
|
showCorrectionPopin: showCorrectionPopin,
|
|
247
202
|
animateCorrectionPopin: animateCorrectionPopin,
|
|
248
203
|
key: "correction-popin"
|
|
249
|
-
}) : null)
|
|
204
|
+
}) : null);
|
|
250
205
|
};
|
|
251
206
|
|
|
252
207
|
export default Slide;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useCallback","useEffect","useState","useRef","Animated","Easing","StyleSheet","useWindowDimensions","View","get","getOr","Text","Answer","ReviewCorrectionPopin","useTemplateContext","Touchable","styles","create","correctionPopinWrapper","position","bottom","width","CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","translateAnim","Value","current","translateYAnim","timing","toValue","duration","easing","bezier","useNativeDriver","start","klf","undefined","information","label","message","next","onClick","_correctionPopinProps","type","resultLabel","transform","translateY","createValidateButtonStyle","theme","brandTheme","validateButton","backgroundColor","colors","primary","text","borderRadius","validateButtonText","fontSize","lineHeight","fontWeight","bold","color","white","marginBottom","spacing","small","marginTop","textAlign","ValidateButton","disabled","style","setStyle","buttonStyle","createQuestionStyle","questionHeading","justifyContent","questionOrigin","tiny","questionText","questionHelp","gray","medium","choicesContainer","flex","Question","props","answerUI","questionStyle","createSlideStyle","num","screenWidth","slideWidth","slide","left","height","alignItems","padding","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","Slide","slideStyle","loading","parentContentTitle"],"sources":["../../../src/organism/review-slide/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useState, useRef} from 'react';\nimport {\n Animated,\n Easing,\n StyleSheet,\n TextStyle,\n useWindowDimensions,\n View,\n ViewStyle\n} from 'react-native';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport Text from '../../atom/text/index.native';\nimport Answer from '../../molecule/answer/index.native';\nimport ReviewCorrectionPopin from '../../molecule/review-correction-popin/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {Brand} from '../../variables/brand.native';\nimport {PopinProps, ReviewSlideProps, SlideProps, ValidateButtonProps} from './prop-types';\n\nconst styles = StyleSheet.create({\n correctionPopinWrapper: {\n position: 'absolute',\n bottom: 16,\n width: '105%'\n }\n});\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}: PopinProps) => {\n const translateAnim = useRef(new Animated.Value(1000)).current;\n\n const translateYAnim = useCallback(() => {\n Animated.timing(translateAnim, {\n toValue: 0,\n duration: 800,\n easing: Easing.bezier(0.37, 0, 0.63, 1),\n useNativeDriver: true\n }).start();\n }, [translateAnim]);\n\n if (animateCorrectionPopin) {\n translateYAnim();\n }\n\n if (!showCorrectionPopin) return null;\n\n const klf = getOr(undefined, 'klf', correctionPopinProps);\n const information = getOr({label: '', message: ''}, 'information', correctionPopinProps);\n const next = get('next', correctionPopinProps);\n const onClick = get(['next', 'onClick'], correctionPopinProps);\n\n const _correctionPopinProps = {\n next: {\n onClick,\n label: next && next.label,\n 'data-name': `next-question-button-${slideIndex}`,\n 'aria-label': next && next['aria-label']\n },\n klf,\n information,\n type: correctionPopinProps.type,\n resultLabel: correctionPopinProps.resultLabel\n };\n\n return (\n <Animated.View\n style={{\n ...styles.correctionPopinWrapper,\n transform: [\n {\n translateY: translateAnim\n }\n ]\n }}\n >\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </Animated.View>\n );\n};\n\ntype StyleValidateButtonType = {\n validateButton: ViewStyle;\n validateButtonText: ViewStyle;\n};\n\nconst createValidateButtonStyle = (theme: Theme, brandTheme: Brand): StyleValidateButtonType =>\n StyleSheet.create({\n validateButton: {\n backgroundColor: brandTheme?.colors?.primary || theme.colors.text.primary,\n borderRadius: 7,\n width: '100%'\n },\n validateButtonText: {\n fontSize: 14,\n lineHeight: 20,\n fontWeight: theme.fontWeight.bold,\n color: theme.colors.white,\n marginBottom: theme.spacing.small,\n marginTop: theme.spacing.small,\n textAlign: 'center'\n }\n });\n\nconst ValidateButton = ({slideIndex, validateButton}: ValidateButtonProps) => {\n const {label, onClick, disabled} = validateButton;\n const {theme, brandTheme} = useTemplateContext();\n const [style, setStyle] = useState<StyleValidateButtonType>();\n\n useEffect(() => {\n const buttonStyle = createValidateButtonStyle(theme, brandTheme);\n setStyle(buttonStyle);\n }, [theme, brandTheme]);\n\n if (!style) return null;\n\n return (\n <Touchable\n style={style.validateButton}\n onPress={onClick}\n disabled={disabled}\n accessibilityLabel={label}\n testID={`slide-validate-button-${slideIndex}`}\n >\n <Text style={style.validateButtonText}>{label}</Text>\n </Touchable>\n );\n};\n\ntype StyleSheetType = {\n questionHeading: ViewStyle;\n questionOrigin: ViewStyle;\n questionText: TextStyle;\n questionHelp: ViewStyle;\n choicesContainer: ViewStyle;\n};\n\nconst createQuestionStyle = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n questionHeading: {\n justifyContent: 'space-between'\n },\n questionOrigin: {\n fontSize: 12,\n lineHeight: 16,\n color: theme.colors.text.primary,\n marginBottom: theme.spacing.tiny,\n marginTop: theme.spacing.small,\n textAlign: 'center'\n },\n questionText: {\n fontSize: 16,\n lineHeight: 22,\n fontWeight: '700',\n color: theme.colors.text.primary,\n textAlign: 'center'\n },\n questionHelp: {\n fontSize: 12,\n lineHeight: 16,\n color: theme.colors.gray.medium,\n marginBottom: 0,\n marginTop: theme.spacing.small,\n textAlign: 'center'\n },\n choicesContainer: {\n flex: 1,\n width: '100%',\n justifyContent: 'center'\n }\n });\n\ntype QuestionProps = {\n answerUI: SlideProps['answerUI'];\n questionText: SlideProps['questionText'];\n questionOrigin: SlideProps['parentContentTitle'];\n};\n\nconst Question = (props: QuestionProps) => {\n const {answerUI, questionText, questionOrigin} = props;\n const {theme} = useTemplateContext();\n const [style, setStyle] = useState<StyleSheetType>();\n\n useEffect(() => {\n const questionStyle = createQuestionStyle(theme);\n setStyle(questionStyle);\n }, [theme]);\n\n if (!answerUI || !questionText || !style) return null;\n\n return (\n <>\n <View style={style.questionHeading}>\n <Text style={style.questionOrigin}>{questionOrigin}</Text>\n <Text style={style.questionText}>{questionText}</Text>\n <Text style={style.questionHelp}>{get('help', answerUI)}</Text>\n </View>\n <View style={style.choicesContainer}>\n <Answer {...answerUI} />\n </View>\n </>\n );\n};\n\ntype SlideStyle = {\n slide: ViewStyle;\n};\n\nconst createSlideStyle = (num: number, screenWidth: number): SlideStyle => {\n const slideWidth = screenWidth - 40 - num * 8;\n\n return StyleSheet.create({\n slide: {\n position: 'absolute',\n left: 20 + num * 4,\n bottom: 34 + num * 5,\n backgroundColor: '#fff', // theme.colors.white\n height: '90%',\n width: slideWidth,\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: 25,\n shadowColor: '#000',\n shadowOffset: {width: 0, height: -1},\n shadowOpacity: 0.05,\n shadowRadius: 16,\n elevation: 10 - num * 1,\n borderRadius: 16\n }\n });\n};\n\nconst Slide = (props: ReviewSlideProps) => {\n const {slide, correctionPopinProps, validateButton, num, slideIndex = '0'} = props;\n\n const {width} = useWindowDimensions();\n const slideStyle = createSlideStyle(num, width);\n\n const {\n loading,\n parentContentTitle,\n questionText,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n return (\n <View style={slideStyle.slide}>\n {loading ? (\n // <Loader className={style.loader} theme=\"default\" aria-label={loadingAriaLabel} />\n <Text>@todo loader {num}</Text>\n ) : (\n <>\n <Question\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n key=\"question-container\"\n />\n <ValidateButton\n slideIndex={slideIndex}\n validateButton={validateButton}\n key=\"validate-button\"\n />\n {correctionPopinProps ? (\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n ) : null}\n </>\n )}\n </View>\n );\n};\n\nexport default Slide;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,SAA5B,EAAuCC,QAAvC,EAAiDC,MAAjD,QAA8D,OAA9D;AACA,SACEC,QADF,EAEEC,MAFF,EAGEC,UAHF,EAKEC,mBALF,EAMEC,IANF,QAQO,cARP;AASA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,IAAP,MAAiB,8BAAjB;AACA,OAAOC,MAAP,MAAmB,oCAAnB;AACA,OAAOC,q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AAgB,CAACC,GAAD,EAAMvE,KAAN,CAAnC;EAEA,MAAM;IACJsF,OADI;IAEJC,kBAFI;IAGJ3B,YAHI;IAIJQ,QAJI;IAKJhE,mBALI;IAMJC;EANI,IAOFqE,KAPJ;EASA,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAEW,UAAU,CAACX;EAAxB,GACGY,OAAO;EAAA;EACN;EACA,oBAAC,IAAD,yBAAoBf,GAApB,CAFM,gBAIN,uDACE,oBAAC,QAAD;IACE,cAAc,EAAEgB,kBADlB;IAEE,YAAY,EAAE3B,YAFhB;IAGE,QAAQ,EAAEQ,QAHZ;IAIE,GAAG,EAAC;EAJN,EADF,eAOE,oBAAC,cAAD;IACE,UAAU,EAAEjE,UADd;IAEE,cAAc,EAAE6B,cAFlB;IAGE,GAAG,EAAC;EAHN,EAPF,EAYG9B,oBAAoB,gBACnB,oBAAC,eAAD;IACE,oBAAoB,EAAEA,oBADxB;IAEE,UAAU,EAAEC,UAFd;IAGE,mBAAmB,EAAEC,mBAHvB;IAIE,sBAAsB,EAAEC,sBAJ1B;IAKE,GAAG,EAAC;EALN,EADmB,GAQjB,IApBN,CALJ,CADF;AA+BD,CA9CD;;AAgDA,eAAe+E,KAAf"}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useCallback","useEffect","useState","useRef","Animated","Easing","StyleSheet","useWindowDimensions","View","get","getOr","Text","Answer","ReviewCorrectionPopin","useTemplateContext","Button","styles","create","correctionPopinWrapper","position","bottom","width","CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","translateAnim","Value","current","translateYAnim","timing","toValue","duration","easing","bezier","useNativeDriver","start","klf","undefined","information","label","message","next","onClick","_correctionPopinProps","type","resultLabel","transform","translateY","createQuestionStyle","theme","questionHeading","justifyContent","questionOrigin","fontSize","lineHeight","color","colors","text","primary","marginBottom","spacing","tiny","marginTop","small","textAlign","questionText","fontWeight","questionHelp","gray","medium","choicesContainer","flex","Question","props","answerUI","style","setStyle","questionStyle","createSlideStyle","num","screenWidth","slideWidth","slide","left","backgroundColor","height","alignItems","padding","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","Slide","validateButton","slideStyle","loading","parentContentTitle","handleValidatePress","disabled"],"sources":["../../../src/organism/review-slide/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useState, useRef} from 'react';\nimport {\n Animated,\n Easing,\n StyleSheet,\n TextStyle,\n useWindowDimensions,\n View,\n ViewStyle\n} from 'react-native';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport Text from '../../atom/text/index.native';\nimport Answer from '../../molecule/answer/index.native';\nimport ReviewCorrectionPopin from '../../molecule/review-correction-popin/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\nimport Button from '../../atom/button/index.native';\nimport {PopinProps, ReviewSlideProps, SlideProps} from './prop-types';\n\nconst styles = StyleSheet.create({\n correctionPopinWrapper: {\n position: 'absolute',\n bottom: 16,\n width: '105%'\n }\n});\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}: PopinProps) => {\n const translateAnim = useRef(new Animated.Value(1000)).current;\n\n const translateYAnim = useCallback(() => {\n Animated.timing(translateAnim, {\n toValue: 0,\n duration: 800,\n easing: Easing.bezier(0.37, 0, 0.63, 1),\n useNativeDriver: true\n }).start();\n }, [translateAnim]);\n\n if (animateCorrectionPopin) {\n translateYAnim();\n }\n\n if (!showCorrectionPopin) return null;\n\n const klf = getOr(undefined, 'klf', correctionPopinProps);\n const information = getOr({label: '', message: ''}, 'information', correctionPopinProps);\n const next = get('next', correctionPopinProps);\n const onClick = get(['next', 'onClick'], correctionPopinProps);\n\n const _correctionPopinProps = {\n next: {\n onClick,\n label: next && next.label,\n 'data-name': `next-question-button-${slideIndex}`,\n 'aria-label': next && next['aria-label']\n },\n klf,\n information,\n type: correctionPopinProps.type,\n resultLabel: correctionPopinProps.resultLabel\n };\n\n return (\n <Animated.View\n style={{\n ...styles.correctionPopinWrapper,\n transform: [\n {\n translateY: translateAnim\n }\n ]\n }}\n >\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </Animated.View>\n );\n};\n\ntype StyleSheetType = {\n questionHeading: ViewStyle;\n questionOrigin: ViewStyle;\n questionText: TextStyle;\n questionHelp: ViewStyle;\n choicesContainer: ViewStyle;\n};\n\nconst createQuestionStyle = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n questionHeading: {\n justifyContent: 'space-between'\n },\n questionOrigin: {\n fontSize: 12,\n lineHeight: 16,\n color: theme.colors.text.primary,\n marginBottom: theme.spacing.tiny,\n marginTop: theme.spacing.small,\n textAlign: 'center'\n },\n questionText: {\n fontSize: 16,\n lineHeight: 22,\n fontWeight: '700',\n color: theme.colors.text.primary,\n textAlign: 'center'\n },\n questionHelp: {\n fontSize: 12,\n lineHeight: 16,\n color: theme.colors.gray.medium,\n marginBottom: 0,\n marginTop: theme.spacing.small,\n textAlign: 'center'\n },\n choicesContainer: {\n flex: 1,\n width: '100%',\n justifyContent: 'center'\n }\n });\n\ntype QuestionProps = {\n answerUI: SlideProps['answerUI'];\n questionText: SlideProps['questionText'];\n questionOrigin: SlideProps['parentContentTitle'];\n};\n\nconst Question = (props: QuestionProps) => {\n const {answerUI, questionText, questionOrigin} = props;\n const {theme} = useTemplateContext();\n const [style, setStyle] = useState<StyleSheetType>();\n\n useEffect(() => {\n const questionStyle = createQuestionStyle(theme);\n setStyle(questionStyle);\n }, [theme]);\n\n if (!answerUI || !questionText || !style) return null;\n\n return (\n <>\n <View style={style.questionHeading}>\n <Text style={style.questionOrigin}>{questionOrigin}</Text>\n <Text style={style.questionText}>{questionText}</Text>\n <Text style={style.questionHelp}>{get('help', answerUI)}</Text>\n </View>\n <View style={style.choicesContainer}>\n <Answer {...answerUI} />\n </View>\n </>\n );\n};\n\ntype SlideStyle = {\n slide: ViewStyle;\n};\n\nconst createSlideStyle = (num: number, screenWidth: number): SlideStyle => {\n const slideWidth = screenWidth - 40 - num * 8;\n\n return StyleSheet.create({\n slide: {\n position: 'absolute',\n left: 20 + num * 4,\n bottom: 34 + num * 5,\n backgroundColor: '#fff', // theme.colors.white\n height: '90%',\n width: slideWidth,\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: 25,\n shadowColor: '#000',\n shadowOffset: {width: 0, height: -1},\n shadowOpacity: 0.05,\n shadowRadius: 16,\n elevation: 10 - num * 1,\n borderRadius: 16\n }\n });\n};\n\nconst Slide = (props: ReviewSlideProps) => {\n const {slide, correctionPopinProps, validateButton, num, slideIndex = '0'} = props;\n\n const {width} = useWindowDimensions();\n const slideStyle = createSlideStyle(num, width);\n\n const {\n loading,\n parentContentTitle,\n questionText,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n if (loading) {\n return <Text>@todo loader {num}</Text>;\n }\n\n const {onClick: handleValidatePress} = validateButton;\n\n return (\n <View style={slideStyle.slide}>\n <Question\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n key=\"question-container\"\n />\n <Button\n disabled={validateButton.disabled}\n submitValue={validateButton.label}\n onPress={handleValidatePress}\n testID={`slide-validate-button-${slideIndex}`}\n />\n {correctionPopinProps ? (\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n ) : null}\n </View>\n );\n};\n\nexport default Slide;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,SAA5B,EAAuCC,QAAvC,EAAiDC,MAAjD,QAA8D,OAA9D;AACA,SACEC,QADF,EAEEC,MAFF,EAGEC,UAHF,EAKEC,mBALF,EAMEC,IANF,QAQO,cARP;AASA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,IAAP,MAAiB,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,EAAa;IACX,oBAAO,oBAAC,IAAD,yBAAoBlB,GAApB,CAAP;EACD;;EAED,MAAM;IAACrC,OAAO,EAAEyD;EAAV,IAAiCJ,cAAvC;EAEA,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAEC,UAAU,CAACd;EAAxB,gBACE,oBAAC,QAAD;IACE,cAAc,EAAEgB,kBADlB;IAEE,YAAY,EAAEjC,YAFhB;IAGE,QAAQ,EAAES,QAHZ;IAIE,GAAG,EAAC;EAJN,EADF,eAOE,oBAAC,MAAD;IACE,QAAQ,EAAEqB,cAAc,CAACK,QAD3B;IAEE,WAAW,EAAEL,cAAc,CAACxD,KAF9B;IAGE,OAAO,EAAE4D,mBAHX;IAIE,MAAM,EAAG,yBAAwB7E,UAAW;EAJ9C,EAPF,EAaGD,oBAAoB,gBACnB,oBAAC,eAAD;IACE,oBAAoB,EAAEA,oBADxB;IAEE,UAAU,EAAEC,UAFd;IAGE,mBAAmB,EAAEC,mBAHvB;IAIE,sBAAsB,EAAEC,sBAJ1B;IAKE,GAAG,EAAC;EALN,EADmB,GAQjB,IArBN,CADF;AAyBD,CA9CD;;AAgDA,eAAesE,KAAf"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import { ReviewCorrectionPopinProps } from '../../molecule/review-correction-popin/prop-types';
|
|
3
3
|
import { AnswerProps } from '../../molecule/answer/prop-types';
|
|
4
|
+
import { TemplateContextValues } from '../../template/app-review/template-context';
|
|
4
5
|
export declare const SlidePropsTypes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
5
6
|
position: PropTypes.Requireable<number>;
|
|
6
7
|
loading: PropTypes.Requireable<boolean>;
|
|
@@ -210,4 +211,8 @@ export declare type ReviewSlideProps = {
|
|
|
210
211
|
disabled: boolean;
|
|
211
212
|
};
|
|
212
213
|
};
|
|
214
|
+
export declare type Fixture = {
|
|
215
|
+
props: ReviewSlideProps;
|
|
216
|
+
mobileContext?: TemplateContextValues;
|
|
217
|
+
};
|
|
213
218
|
//# sourceMappingURL=prop-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/organism/review-slide/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAuC,EACrC,0BAA0B,EAC3B,MAAM,mDAAmD,CAAC;AAC3D,OAAwB,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/organism/review-slide/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAuC,EACrC,0BAA0B,EAC3B,MAAM,mDAAmD,CAAC;AAC3D,OAAwB,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAC,qBAAqB,EAAC,MAAM,4CAA4C,CAAC;AAEjF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAY1B,CAAC;AAEH,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,UAAU,GAAG;IACvB,oBAAoB,EAAE,0BAA0B,CAAC;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACnD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,WAAW,CAAC;CACxB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,UAAU,CAAC;IAClB,oBAAoB,CAAC,EAAE,0BAA0B,CAAC;IAClD,cAAc,EAAE;QACd,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,oBAAY,OAAO,GAAG;IAAC,KAAK,EAAE,gBAAgB,CAAC;IAAC,aAAa,CAAC,EAAE,qBAAqB,CAAA;CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.js","names":["PropTypes","ReviewCorrectionPopinPropTypes","AnswerPropTypes","SlidePropsTypes","shape","position","number","loading","bool","loadingAriaLabel","string","animationType","isCorrect","animateCorrectionPopin","showCorrectionPopin","disableContent","parentContentTitle","questionText","answerUI","propTypes","slideIndex","slide","validateButton","label","isRequired","onClick","func","disabled","correctionPopinProps","klf","information","next","resultLabel","type"],"sources":["../../../src/organism/review-slide/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport ReviewCorrectionPopinPropTypes, {\n ReviewCorrectionPopinProps\n} from '../../molecule/review-correction-popin/prop-types';\nimport AnswerPropTypes, {AnswerProps} from '../../molecule/answer/prop-types';\n\nexport const SlidePropsTypes = PropTypes.shape({\n position: PropTypes.number,\n loading: PropTypes.bool,\n loadingAriaLabel: PropTypes.string,\n animationType: PropTypes.string, // 'unstack' | 'restack'\n isCorrect: PropTypes.bool,\n animateCorrectionPopin: PropTypes.bool,\n showCorrectionPopin: PropTypes.bool,\n disableContent: PropTypes.bool,\n parentContentTitle: PropTypes.string,\n questionText: PropTypes.string,\n answerUI: PropTypes.shape(AnswerPropTypes)\n});\n\nconst propTypes = {\n slideIndex: PropTypes.string,\n slide: SlidePropsTypes,\n validateButton: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n disabled: PropTypes.bool\n }),\n correctionPopinProps: PropTypes.shape({\n klf: ReviewCorrectionPopinPropTypes.klf,\n information: ReviewCorrectionPopinPropTypes.information,\n next: PropTypes.shape({\n label: PropTypes.string,\n 'aria-label': PropTypes.string // Pourquoi le onClick du next n'est pas ici !\n // updateSlidesOnNext: PropTypes.func.isRequired ???\n }),\n resultLabel: ReviewCorrectionPopinPropTypes.resultLabel,\n type: ReviewCorrectionPopinPropTypes.type\n })\n};\n\nexport default propTypes;\n\nexport type PopinProps = {\n correctionPopinProps: ReviewCorrectionPopinProps;\n slideIndex: string;\n showCorrectionPopin?: boolean;\n animateCorrectionPopin?: boolean;\n};\n\nexport type ValidateButtonProps = {\n slideIndex: string;\n validateButton: ReviewSlideProps['validateButton'];\n primarySkinColor?: string;\n};\n\nexport type SlideProps = {\n position: number;\n loading: boolean;\n loadingAriaLabel?: string;\n animationType?: 'unstack' | 'restack';\n isCorrect?: boolean;\n animateCorrectionPopin?: boolean;\n showCorrectionPopin?: boolean;\n parentContentTitle?: string;\n questionText?: string;\n answerUI?: AnswerProps;\n};\n\nexport type ReviewSlideProps = {\n slideIndex: string;\n num: number;\n slide: SlideProps;\n correctionPopinProps?: ReviewCorrectionPopinProps;\n validateButton: {\n label: string;\n onClick: () => void;\n disabled: boolean;\n };\n};\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,8BAAP,MAEO,mDAFP;AAGA,OAAOC,eAAP,MAA2C,kCAA3C;
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["PropTypes","ReviewCorrectionPopinPropTypes","AnswerPropTypes","SlidePropsTypes","shape","position","number","loading","bool","loadingAriaLabel","string","animationType","isCorrect","animateCorrectionPopin","showCorrectionPopin","disableContent","parentContentTitle","questionText","answerUI","propTypes","slideIndex","slide","validateButton","label","isRequired","onClick","func","disabled","correctionPopinProps","klf","information","next","resultLabel","type"],"sources":["../../../src/organism/review-slide/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport ReviewCorrectionPopinPropTypes, {\n ReviewCorrectionPopinProps\n} from '../../molecule/review-correction-popin/prop-types';\nimport AnswerPropTypes, {AnswerProps} from '../../molecule/answer/prop-types';\nimport {TemplateContextValues} from '../../template/app-review/template-context';\n\nexport const SlidePropsTypes = PropTypes.shape({\n position: PropTypes.number,\n loading: PropTypes.bool,\n loadingAriaLabel: PropTypes.string,\n animationType: PropTypes.string, // 'unstack' | 'restack'\n isCorrect: PropTypes.bool,\n animateCorrectionPopin: PropTypes.bool,\n showCorrectionPopin: PropTypes.bool,\n disableContent: PropTypes.bool,\n parentContentTitle: PropTypes.string,\n questionText: PropTypes.string,\n answerUI: PropTypes.shape(AnswerPropTypes)\n});\n\nconst propTypes = {\n slideIndex: PropTypes.string,\n slide: SlidePropsTypes,\n validateButton: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n disabled: PropTypes.bool\n }),\n correctionPopinProps: PropTypes.shape({\n klf: ReviewCorrectionPopinPropTypes.klf,\n information: ReviewCorrectionPopinPropTypes.information,\n next: PropTypes.shape({\n label: PropTypes.string,\n 'aria-label': PropTypes.string // Pourquoi le onClick du next n'est pas ici !\n // updateSlidesOnNext: PropTypes.func.isRequired ???\n }),\n resultLabel: ReviewCorrectionPopinPropTypes.resultLabel,\n type: ReviewCorrectionPopinPropTypes.type\n })\n};\n\nexport default propTypes;\n\nexport type PopinProps = {\n correctionPopinProps: ReviewCorrectionPopinProps;\n slideIndex: string;\n showCorrectionPopin?: boolean;\n animateCorrectionPopin?: boolean;\n};\n\nexport type ValidateButtonProps = {\n slideIndex: string;\n validateButton: ReviewSlideProps['validateButton'];\n primarySkinColor?: string;\n};\n\nexport type SlideProps = {\n position: number;\n loading: boolean;\n loadingAriaLabel?: string;\n animationType?: 'unstack' | 'restack';\n isCorrect?: boolean;\n animateCorrectionPopin?: boolean;\n showCorrectionPopin?: boolean;\n parentContentTitle?: string;\n questionText?: string;\n answerUI?: AnswerProps;\n};\n\nexport type ReviewSlideProps = {\n slideIndex: string;\n num: number;\n slide: SlideProps;\n correctionPopinProps?: ReviewCorrectionPopinProps;\n validateButton: {\n label: string;\n onClick: () => void;\n disabled: boolean;\n };\n};\n\nexport type Fixture = {props: ReviewSlideProps; mobileContext?: TemplateContextValues};\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,8BAAP,MAEO,mDAFP;AAGA,OAAOC,eAAP,MAA2C,kCAA3C;AAGA,OAAO,MAAMC,eAAe,GAAGH,SAAS,CAACI,KAAV,CAAgB;EAC7CC,QAAQ,EAAEL,SAAS,CAACM,MADyB;EAE7CC,OAAO,EAAEP,SAAS,CAACQ,IAF0B;EAG7CC,gBAAgB,EAAET,SAAS,CAACU,MAHiB;EAI7CC,aAAa,EAAEX,SAAS,CAACU,MAJoB;EAIZ;EACjCE,SAAS,EAAEZ,SAAS,CAACQ,IALwB;EAM7CK,sBAAsB,EAAEb,SAAS,CAACQ,IANW;EAO7CM,mBAAmB,EAAEd,SAAS,CAACQ,IAPc;EAQ7CO,cAAc,EAAEf,SAAS,CAACQ,IARmB;EAS7CQ,kBAAkB,EAAEhB,SAAS,CAACU,MATe;EAU7CO,YAAY,EAAEjB,SAAS,CAACU,MAVqB;EAW7CQ,QAAQ,EAAElB,SAAS,CAACI,KAAV,CAAgBF,eAAhB;AAXmC,CAAhB,CAAxB;AAcP,MAAMiB,SAAS,GAAG;EAChBC,UAAU,EAAEpB,SAAS,CAACU,MADN;EAEhBW,KAAK,EAAElB,eAFS;EAGhBmB,cAAc,EAAEtB,SAAS,CAACI,KAAV,CAAgB;IAC9BmB,KAAK,EAAEvB,SAAS,CAACU,MAAV,CAAiBc,UADM;IAE9BC,OAAO,EAAEzB,SAAS,CAAC0B,IAAV,CAAeF,UAFM;IAG9BG,QAAQ,EAAE3B,SAAS,CAACQ;EAHU,CAAhB,CAHA;EAQhBoB,oBAAoB,EAAE5B,SAAS,CAACI,KAAV,CAAgB;IACpCyB,GAAG,EAAE5B,8BAA8B,CAAC4B,GADA;IAEpCC,WAAW,EAAE7B,8BAA8B,CAAC6B,WAFR;IAGpCC,IAAI,EAAE/B,SAAS,CAACI,KAAV,CAAgB;MACpBmB,KAAK,EAAEvB,SAAS,CAACU,MADG;MAEpB,cAAcV,SAAS,CAACU,MAFJ,CAEW;MAC/B;;IAHoB,CAAhB,CAH8B;IAQpCsB,WAAW,EAAE/B,8BAA8B,CAAC+B,WARR;IASpCC,IAAI,EAAEhC,8BAA8B,CAACgC;EATD,CAAhB;AARN,CAAlB;AAqBA,eAAed,SAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAUpC,QAAA,MAAM,aAAa,UAAW,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAUpC,QAAA,MAAM,aAAa,UAAW,gBAAgB,gBAsB7C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -19,8 +19,7 @@ const StackedSlides = props => {
|
|
|
19
19
|
} = props;
|
|
20
20
|
const indexes = keys(slides).reverse();
|
|
21
21
|
const stackedSlides = indexes.map(slideIndex => {
|
|
22
|
-
const slide = slides[slideIndex];
|
|
23
|
-
|
|
22
|
+
const slide = slides[slideIndex];
|
|
24
23
|
return /*#__PURE__*/React.createElement(Slide, {
|
|
25
24
|
num: Number.parseInt(slideIndex),
|
|
26
25
|
slideIndex,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","StyleSheet","View","keys","Slide","TOTAL_SLIDES_STACK","style","create","slides","flex","height","width","StackedSlides","props","validateButton","correctionPopinProps","indexes","reverse","stackedSlides","map","slideIndex","slide","num","Number","parseInt"],"sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {StyleSheet, View} from 'react-native';\nimport keys from 'lodash/fp/keys';\nimport Slide from '../review-slide/index.native';\nimport {ReviewStackProps} from './prop-types';\n\nexport const TOTAL_SLIDES_STACK = 5;\n\nconst style = StyleSheet.create({\n slides: {\n flex: 1,\n height: '100%',\n width: '100%'\n }\n});\n\nconst StackedSlides = (props: ReviewStackProps) => {\n const {slides, validateButton, correctionPopinProps} = props;\n\n const indexes = keys(slides).reverse();\n const stackedSlides = indexes.map(slideIndex => {\n const slide = slides[slideIndex];\n
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","StyleSheet","View","keys","Slide","TOTAL_SLIDES_STACK","style","create","slides","flex","height","width","StackedSlides","props","validateButton","correctionPopinProps","indexes","reverse","stackedSlides","map","slideIndex","slide","num","Number","parseInt"],"sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {StyleSheet, View} from 'react-native';\nimport keys from 'lodash/fp/keys';\nimport Slide from '../review-slide/index.native';\nimport {ReviewStackProps} from './prop-types';\n\nexport const TOTAL_SLIDES_STACK = 5;\n\nconst style = StyleSheet.create({\n slides: {\n flex: 1,\n height: '100%',\n width: '100%'\n }\n});\n\nconst StackedSlides = (props: ReviewStackProps) => {\n const {slides, validateButton, correctionPopinProps} = props;\n\n const indexes = keys(slides).reverse();\n const stackedSlides = indexes.map(slideIndex => {\n const slide = slides[slideIndex];\n\n return (\n <Slide\n {...{\n num: Number.parseInt(slideIndex),\n slideIndex,\n slide,\n validateButton,\n correctionPopinProps\n }}\n key={slideIndex}\n />\n );\n });\n\n return <View style={style.slides}>{stackedSlides}</View>;\n};\n\nexport default StackedSlides;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAAQC,UAAR,EAAoBC,IAApB,QAA+B,cAA/B;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,KAAP,MAAkB,8BAAlB;AAGA,OAAO,MAAMC,kBAAkB,GAAG,CAA3B;AAEP,MAAMC,KAAK,GAAGL,UAAU,CAACM,MAAX,CAAkB;EAC9BC,MAAM,EAAE;IACNC,IAAI,EAAE,CADA;IAENC,MAAM,EAAE,MAFF;IAGNC,KAAK,EAAE;EAHD;AADsB,CAAlB,CAAd;;AAQA,MAAMC,aAAa,GAAIC,KAAD,IAA6B;EACjD,MAAM;IAACL,MAAD;IAASM,cAAT;IAAyBC;EAAzB,IAAiDF,KAAvD;EAEA,MAAMG,OAAO,GAAGb,IAAI,CAACK,MAAD,CAAJ,CAAaS,OAAb,EAAhB;EACA,MAAMC,aAAa,GAAGF,OAAO,CAACG,GAAR,CAAYC,UAAU,IAAI;IAC9C,MAAMC,KAAK,GAAGb,MAAM,CAACY,UAAD,CAApB;IAEA,oBACE,oBAAC,KAAD;MAEIE,GAAG,EAAEC,MAAM,CAACC,QAAP,CAAgBJ,UAAhB,CAFT;MAGIA,UAHJ;MAIIC,KAJJ;MAKIP,cALJ;MAMIC,oBANJ;MAQE,GAAG,EAAEK;IARP,EADF;EAYD,CAfqB,CAAtB;EAiBA,oBAAO,oBAAC,IAAD;IAAM,KAAK,EAAEd,KAAK,CAACE;EAAnB,GAA4BU,aAA5B,CAAP;AACD,CAtBD;;AAwBA,eAAeN,aAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/app-review/player/index.native.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/app-review/player/index.native.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAmB/C,QAAA,MAAM,MAAM,UAAW,iBAAiB,uBAuBvC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { View, StyleSheet } from 'react-native';
|
|
3
3
|
import StackedSlides from '../../../organism/review-stacked-slides/index.native';
|
|
4
|
+
import ReviewCongrats from '../../../organism/review-congrats/index.native';
|
|
4
5
|
import ReviewHeader from '../../../organism/review-header/index.native';
|
|
5
6
|
import { useTemplateContext } from '../template-context';
|
|
6
7
|
|
|
7
|
-
const createStyleSheet =
|
|
8
|
+
const createStyleSheet = theme => StyleSheet.create({
|
|
8
9
|
container: {
|
|
9
10
|
flex: 1,
|
|
10
11
|
width: '100%',
|
|
11
|
-
|
|
12
|
+
height: '100%',
|
|
12
13
|
backgroundColor: theme.colors.white,
|
|
13
14
|
flexDirection: 'column',
|
|
14
15
|
justifyContent: 'space-between',
|
|
@@ -18,21 +19,19 @@ const createStyleSheet = (theme, headerHeight) => StyleSheet.create({
|
|
|
18
19
|
|
|
19
20
|
const Slides = props => {
|
|
20
21
|
const {
|
|
22
|
+
congrats,
|
|
21
23
|
header,
|
|
22
24
|
stack
|
|
23
25
|
} = props;
|
|
24
26
|
const {
|
|
25
|
-
theme
|
|
26
|
-
display: {
|
|
27
|
-
headerHeight
|
|
28
|
-
}
|
|
27
|
+
theme
|
|
29
28
|
} = useTemplateContext();
|
|
30
29
|
const [styleSheet, setStylesheet] = useState(null);
|
|
31
30
|
useEffect(() => {
|
|
32
|
-
const _stylesheet = createStyleSheet(theme
|
|
31
|
+
const _stylesheet = createStyleSheet(theme);
|
|
33
32
|
|
|
34
33
|
setStylesheet(_stylesheet);
|
|
35
|
-
}, [theme
|
|
34
|
+
}, [theme]);
|
|
36
35
|
|
|
37
36
|
if (!styleSheet) {
|
|
38
37
|
return null;
|
|
@@ -40,7 +39,7 @@ const Slides = props => {
|
|
|
40
39
|
|
|
41
40
|
return /*#__PURE__*/React.createElement(View, {
|
|
42
41
|
style: styleSheet.container
|
|
43
|
-
}, /*#__PURE__*/React.createElement(ReviewHeader, header), stack ? /*#__PURE__*/React.createElement(StackedSlides, stack) : null);
|
|
42
|
+
}, /*#__PURE__*/React.createElement(ReviewHeader, header), stack ? /*#__PURE__*/React.createElement(StackedSlides, stack) : null, congrats ? /*#__PURE__*/React.createElement(ReviewCongrats, congrats) : null);
|
|
44
43
|
};
|
|
45
44
|
|
|
46
45
|
export default Slides;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","View","StyleSheet","StackedSlides","ReviewHeader","useTemplateContext","createStyleSheet","theme","
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","View","StyleSheet","StackedSlides","ReviewCongrats","ReviewHeader","useTemplateContext","createStyleSheet","theme","create","container","flex","width","height","backgroundColor","colors","white","flexDirection","justifyContent","alignItems","Slides","props","congrats","header","stack","styleSheet","setStylesheet","_stylesheet"],"sources":["../../../../src/template/app-review/player/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {View, StyleSheet, ViewStyle} from 'react-native';\nimport StackedSlides from '../../../organism/review-stacked-slides/index.native';\nimport ReviewCongrats from '../../../organism/review-congrats/index.native';\nimport ReviewHeader from '../../../organism/review-header/index.native';\nimport {Theme} from '../../../variables/theme.native';\nimport {useTemplateContext} from '../template-context';\nimport {ReviewPlayerProps} from './prop-types';\n\ntype StyleSheetType = {\n container: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n flex: 1,\n width: '100%',\n height: '100%',\n backgroundColor: theme.colors.white,\n flexDirection: 'column',\n justifyContent: 'space-between',\n alignItems: 'center'\n }\n });\n\nconst Slides = (props: ReviewPlayerProps) => {\n const {congrats, header, stack} = props;\n\n const {theme} = useTemplateContext();\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.container}>\n <ReviewHeader {...header} />\n {stack ? <StackedSlides {...stack} /> : null}\n {congrats ? <ReviewCongrats {...congrats} /> : null}\n </View>\n );\n};\n\nexport default Slides;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAQC,IAAR,EAAcC,UAAd,QAA0C,cAA1C;AACA,OAAOC,aAAP,MAA0B,sDAA1B;AACA,OAAOC,cAAP,MAA2B,gDAA3B;AACA,OAAOC,YAAP,MAAyB,8CAAzB;AAEA,SAAQC,kBAAR,QAAiC,qBAAjC;;AAOA,MAAMC,gBAAgB,GAAIC,KAAD,IACvBN,UAAU,CAACO,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,IAAI,EAAE,CADG;IAETC,KAAK,EAAE,MAFE;IAGTC,MAAM,EAAE,MAHC;IAITC,eAAe,EAAEN,KAAK,CAACO,MAAN,CAAaC,KAJrB;IAKTC,aAAa,EAAE,QALN;IAMTC,cAAc,EAAE,eANP;IAOTC,UAAU,EAAE;EAPH;AADK,CAAlB,CADF;;AAaA,MAAMC,MAAM,GAAIC,KAAD,IAA8B;EAC3C,MAAM;IAACC,QAAD;IAAWC,MAAX;IAAmBC;EAAnB,IAA4BH,KAAlC;EAEA,MAAM;IAACb;EAAD,IAAUF,kBAAkB,EAAlC;EAEA,MAAM,CAACmB,UAAD,EAAaC,aAAb,IAA8B1B,QAAQ,CAAwB,IAAxB,CAA5C;EAEAD,SAAS,CAAC,MAAM;IACd,MAAM4B,WAAW,GAAGpB,gBAAgB,CAACC,KAAD,CAApC;;IACAkB,aAAa,CAACC,WAAD,CAAb;EACD,CAHQ,EAGN,CAACnB,KAAD,CAHM,CAAT;;EAKA,IAAI,CAACiB,UAAL,EAAiB;IACf,OAAO,IAAP;EACD;;EAED,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAEA,UAAU,CAACf;EAAxB,gBACE,oBAAC,YAAD,EAAkBa,MAAlB,CADF,EAEGC,KAAK,gBAAG,oBAAC,aAAD,EAAmBA,KAAnB,CAAH,GAAkC,IAF1C,EAGGF,QAAQ,gBAAG,oBAAC,cAAD,EAAoBA,QAApB,CAAH,GAAsC,IAHjD,CADF;AAOD,CAvBD;;AAyBA,eAAeF,MAAf"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextStyle, ViewStyle } from 'react-native';
|
|
3
|
+
declare type ButtonProps = {
|
|
4
|
+
accessibilityLabel?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onPress: () => void;
|
|
7
|
+
style?: ViewStyle;
|
|
8
|
+
submitValue: string;
|
|
9
|
+
testID?: string;
|
|
10
|
+
textStyle?: TextStyle;
|
|
11
|
+
};
|
|
12
|
+
declare const Button: (props: ButtonProps) => JSX.Element | null;
|
|
13
|
+
export default Button;
|
|
14
|
+
//# sourceMappingURL=index.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/button/index.native.tsx"],"names":[],"mappings":";AACA,OAAO,EAAa,SAAS,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AA8B9D,aAAK,WAAW,GAAG;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,MAAM,UAAW,WAAW,uBAuBjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
+
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
|
|
10
|
+
var _index = _interopRequireDefault(require("../text/index.native"));
|
|
11
|
+
|
|
12
|
+
var _templateContext = require("../../template/app-review/template-context");
|
|
13
|
+
|
|
14
|
+
var _index2 = _interopRequireDefault(require("../../hoc/touchable/index.native"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
21
|
+
|
|
22
|
+
const createStyle = (theme, brandTheme) => _reactNative.StyleSheet.create({
|
|
23
|
+
wrapper: {
|
|
24
|
+
backgroundColor: brandTheme?.colors?.primary || theme.colors.text.primary,
|
|
25
|
+
borderRadius: 7,
|
|
26
|
+
width: '100%'
|
|
27
|
+
},
|
|
28
|
+
text: {
|
|
29
|
+
fontSize: 14,
|
|
30
|
+
lineHeight: 20,
|
|
31
|
+
fontWeight: '700',
|
|
32
|
+
color: theme.colors.white,
|
|
33
|
+
marginBottom: 16,
|
|
34
|
+
marginTop: 16,
|
|
35
|
+
textAlign: 'center'
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const Button = props => {
|
|
40
|
+
const {
|
|
41
|
+
accessibilityLabel,
|
|
42
|
+
disabled,
|
|
43
|
+
onPress,
|
|
44
|
+
style,
|
|
45
|
+
submitValue,
|
|
46
|
+
testID,
|
|
47
|
+
textStyle
|
|
48
|
+
} = props;
|
|
49
|
+
const {
|
|
50
|
+
theme,
|
|
51
|
+
brandTheme
|
|
52
|
+
} = (0, _templateContext.useTemplateContext)();
|
|
53
|
+
const [styleSheet, setStylesheet] = (0, _react.useState)();
|
|
54
|
+
(0, _react.useEffect)(() => {
|
|
55
|
+
const _style = createStyle(theme, brandTheme);
|
|
56
|
+
|
|
57
|
+
setStylesheet(_style);
|
|
58
|
+
}, [theme, brandTheme]);
|
|
59
|
+
if (!styleSheet) return null;
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
61
|
+
testID: testID,
|
|
62
|
+
onPress: onPress,
|
|
63
|
+
disabled: disabled,
|
|
64
|
+
accessibilityLabel: accessibilityLabel,
|
|
65
|
+
style: [styleSheet.wrapper, style]
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
67
|
+
style: [styleSheet.text, textStyle]
|
|
68
|
+
}, submitValue));
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var _default = Button;
|
|
72
|
+
exports.default = _default;
|
|
73
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["createStyle","theme","brandTheme","StyleSheet","create","wrapper","backgroundColor","colors","primary","text","borderRadius","width","fontSize","lineHeight","fontWeight","color","white","marginBottom","marginTop","textAlign","Button","props","accessibilityLabel","disabled","onPress","style","submitValue","testID","textStyle","useTemplateContext","styleSheet","setStylesheet","useState","useEffect","_style"],"sources":["../../../src/atom/button/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {StyleSheet, TextStyle, ViewStyle} from 'react-native';\nimport Text from '../text/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {Brand} from '../../variables/brand.native';\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n text: ViewStyle;\n};\n\nconst createStyle = (theme: Theme, brandTheme: Brand): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n backgroundColor: brandTheme?.colors?.primary || theme.colors.text.primary,\n borderRadius: 7,\n width: '100%'\n },\n text: {\n fontSize: 14,\n lineHeight: 20,\n fontWeight: '700',\n color: theme.colors.white,\n marginBottom: 16,\n marginTop: 16,\n textAlign: 'center'\n }\n });\n\ntype ButtonProps = {\n accessibilityLabel?: string;\n disabled?: boolean;\n onPress: () => void;\n style?: ViewStyle;\n submitValue: string;\n testID?: string;\n textStyle?: TextStyle;\n};\n\nconst Button = (props: ButtonProps) => {\n const {accessibilityLabel, disabled, onPress, style, submitValue, testID, textStyle} = props;\n const {theme, brandTheme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType>();\n\n useEffect(() => {\n const _style = createStyle(theme, brandTheme);\n setStylesheet(_style);\n }, [theme, brandTheme]);\n\n if (!styleSheet) return null;\n\n return (\n <Touchable\n testID={testID}\n onPress={onPress}\n disabled={disabled}\n accessibilityLabel={accessibilityLabel}\n style={[styleSheet.wrapper, style]}\n >\n <Text style={[styleSheet.text, textStyle]}>{submitValue}</Text>\n </Touchable>\n );\n};\n\nexport default Button;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;AAQA,MAAMA,WAAW,GAAG,CAACC,KAAD,EAAeC,UAAf,KAClBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,OAAO,EAAE;IACPC,eAAe,EAAEJ,UAAU,EAAEK,MAAZ,EAAoBC,OAApB,IAA+BP,KAAK,CAACM,MAAN,CAAaE,IAAb,CAAkBD,OAD3D;IAEPE,YAAY,EAAE,CAFP;IAGPC,KAAK,EAAE;EAHA,CADO;EAMhBF,IAAI,EAAE;IACJG,QAAQ,EAAE,EADN;IAEJC,UAAU,EAAE,EAFR;IAGJC,UAAU,EAAE,KAHR;IAIJC,KAAK,EAAEd,KAAK,CAACM,MAAN,CAAaS,KAJhB;IAKJC,YAAY,EAAE,EALV;IAMJC,SAAS,EAAE,EANP;IAOJC,SAAS,EAAE;EAPP;AANU,CAAlB,CADF;;AA4BA,MAAMC,MAAM,GAAIC,KAAD,IAAwB;EACrC,MAAM;IAACC,kBAAD;IAAqBC,QAArB;IAA+BC,OAA/B;IAAwCC,KAAxC;IAA+CC,WAA/C;IAA4DC,MAA5D;IAAoEC;EAApE,IAAiFP,KAAvF;EACA,MAAM;IAACpB,KAAD;IAAQC;EAAR,IAAsB,IAAA2B,mCAAA,GAA5B;EACA,MAAM,CAACC,UAAD,EAAaC,aAAb,IAA8B,IAAAC,eAAA,GAApC;EAEA,IAAAC,gBAAA,EAAU,MAAM;IACd,MAAMC,MAAM,GAAGlC,WAAW,CAACC,KAAD,EAAQC,UAAR,CAA1B;;IACA6B,aAAa,CAACG,MAAD,CAAb;EACD,CAHD,EAGG,CAACjC,KAAD,EAAQC,UAAR,CAHH;EAKA,IAAI,CAAC4B,UAAL,EAAiB,OAAO,IAAP;EAEjB,oBACE,6BAAC,eAAD;IACE,MAAM,EAAEH,MADV;IAEE,OAAO,EAAEH,OAFX;IAGE,QAAQ,EAAED,QAHZ;IAIE,kBAAkB,EAAED,kBAJtB;IAKE,KAAK,EAAE,CAACQ,UAAU,CAACzB,OAAZ,EAAqBoB,KAArB;EALT,gBAOE,6BAAC,cAAD;IAAM,KAAK,EAAE,CAACK,UAAU,CAACrB,IAAZ,EAAkBmB,SAAlB;EAAb,GAA4CF,WAA5C,CAPF,CADF;AAWD,CAvBD;;eAyBeN,M"}
|
|
@@ -123,13 +123,11 @@ const Choice = ({
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
if (isSelected) {
|
|
126
|
-
var _brandTheme$colors, _brandTheme$colors2;
|
|
127
|
-
|
|
128
126
|
textStyle.push(styleSheet.textSelected); // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread
|
|
129
127
|
|
|
130
128
|
const selectionStyle = brandTheme && _extends({
|
|
131
|
-
backgroundColor:
|
|
132
|
-
borderColor:
|
|
129
|
+
backgroundColor: brandTheme.colors?.primary,
|
|
130
|
+
borderColor: brandTheme.colors?.primary
|
|
133
131
|
}, url ? {
|
|
134
132
|
borderTopRightRadius: theme.radius.regular,
|
|
135
133
|
borderBottomRightRadius: theme.radius.regular
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["createStyleSheet","theme","squeezed","StyleSheet","create","boxShadow","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","backgroundColor","container","colors","white","borderRadius","radius","regular","flexDirection","alignItems","textContainer","paddingHorizontal","paddingVertical","justifyContent","flex","squeezedTextContainer","padding","spacing","small","paddingLeft","undefined","paddingRight","text","fontSize","medium","fontWeight","bold","color","black","textAlign","textSelected","unselectedImageContainer","borderRightColor","border","imageContainer","overflow","borderTopLeftRadius","borderBottomLeftRadius","image","Choice","children","isSelected","isDisabled","onPress","media","testID","prefixTestID","style","questionType","templateContext","useTemplateContext","brandTheme","styleSheet","setStylesheet","useState","useEffect","_stylesheet","selectedSuffix","mediaType","type","toLowerCase","url","src","length","getCleanUri","source","uri","mediaSuffix","textStyle","textWrapperStyle","push","selectionStyle","primary","borderColor","borderTopRightRadius","borderBottomRightRadius"],"sources":["../../../src/atom/choice/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {View, StyleSheet, ViewStyle, TextStyle} from 'react-native';\n\nimport Html from '../html/index.native';\nimport ImageBackground from '../image-background/index.native';\nimport type {Media, QuestionType} from '../../molecule/questions/types';\nimport getCleanUri from '../../util/get-clean-uri';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\n\nexport type Props = {\n isSelected?: boolean;\n onPress: () => void;\n children?: string;\n isDisabled?: boolean;\n testID?: string;\n media?: Media;\n squeezed?: boolean;\n style?: ViewStyle;\n questionType: QuestionType;\n};\n\ntype StyleSheetType = {\n boxShadow: ViewStyle;\n container: ViewStyle;\n text: TextStyle;\n textSelected: TextStyle;\n textContainer: ViewStyle;\n squeezedTextContainer: ViewStyle;\n unselectedImageContainer: ViewStyle;\n imageContainer: ViewStyle;\n image: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme, squeezed: boolean): StyleSheetType =>\n StyleSheet.create({\n boxShadow: {\n shadowColor: '#000',\n shadowOffset: {width: 0, height: 4},\n shadowOpacity: 0.12,\n shadowRadius: 16,\n elevation: 8,\n backgroundColor: '#0000'\n },\n container: {\n backgroundColor: theme.colors.white,\n borderRadius: theme.radius.regular,\n flexDirection: 'row',\n alignItems: 'stretch'\n },\n textContainer: {\n paddingHorizontal: 24,\n paddingVertical: 12,\n justifyContent: 'center',\n alignItems: 'center',\n flex: 1\n },\n squeezedTextContainer: {\n padding: theme.spacing.small,\n paddingLeft: undefined,\n paddingVertical: undefined,\n paddingRight: undefined,\n flex: 0\n },\n text: {\n fontSize: squeezed ? theme.fontSize.medium : theme.fontSize.regular,\n fontWeight: theme.fontWeight.bold,\n color: theme.colors.black,\n textAlign: 'center'\n },\n textSelected: {\n color: theme.colors.white\n },\n unselectedImageContainer: {\n borderRightColor: theme.colors.border\n },\n imageContainer: {\n height: '100%',\n width: '25%',\n overflow: 'hidden',\n borderTopLeftRadius: theme.radius.regular,\n borderBottomLeftRadius: theme.radius.regular\n },\n image: {\n flex: 1\n }\n });\n\nconst Choice = ({\n children,\n isSelected = false,\n squeezed = false,\n isDisabled,\n onPress,\n media,\n testID: prefixTestID,\n style,\n questionType\n}: Props) => {\n const templateContext = useTemplateContext();\n const {theme, brandTheme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, squeezed);\n setStylesheet(_stylesheet);\n }, [theme, squeezed]);\n\n if (!styleSheet) {\n return null;\n }\n\n const selectedSuffix = prefixTestID && isSelected ? '-selected' : '';\n const mediaType = media && media.type && media.type === 'img' && media.type.toLowerCase();\n const url =\n media &&\n media.type === 'img' &&\n media.src &&\n media.src.length > 0 &&\n getCleanUri(media.src[0].url);\n\n const source = {uri: url ? getCleanUri(url) : undefined};\n const mediaSuffix = prefixTestID && mediaType ? `-${mediaType}` : '';\n\n const textStyle: TextStyle[] = [styleSheet.text];\n const textWrapperStyle: ViewStyle[] = [styleSheet.textContainer];\n\n if (squeezed) {\n textWrapperStyle.push(styleSheet.squeezedTextContainer);\n }\n\n if (isSelected) {\n textStyle.push(styleSheet.textSelected);\n\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n const selectionStyle = brandTheme && {\n backgroundColor: brandTheme.colors?.primary,\n borderColor: brandTheme.colors?.primary,\n ...(url\n ? {\n borderTopRightRadius: theme.radius.regular,\n borderBottomRightRadius: theme.radius.regular\n }\n : {\n borderRadius: theme.radius.regular\n })\n };\n\n if (selectionStyle) {\n textWrapperStyle.push(selectionStyle);\n }\n }\n\n return (\n <Touchable\n onPress={!isDisabled ? onPress : undefined}\n style={style}\n analyticsID=\"question-choice\"\n analyticsParams={{questionType}}\n >\n <View\n style={[styleSheet.boxShadow, styleSheet.container]}\n testID={prefixTestID && `${prefixTestID}${selectedSuffix}`}\n >\n {url ? (\n <View style={styleSheet.imageContainer}>\n <ImageBackground\n testID={prefixTestID && `${prefixTestID}${mediaSuffix}`}\n source={source}\n style={styleSheet.image}\n />\n </View>\n ) : null}\n\n {children ? (\n <View style={textWrapperStyle}>\n <Html style={textStyle}>{children}</Html>\n </View>\n ) : null}\n </View>\n </Touchable>\n );\n};\n\nexport default Choice;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AA2BA,MAAMA,gBAAgB,GAAG,CAACC,KAAD,EAAeC,QAAf,KACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,WAAW,EAAE,MADJ;IAETC,YAAY,EAAE;MAACC,KAAK,EAAE,CAAR;MAAWC,MAAM,EAAE;IAAnB,CAFL;IAGTC,aAAa,EAAE,IAHN;IAITC,YAAY,EAAE,EAJL;IAKTC,SAAS,EAAE,CALF;IAMTC,eAAe,EAAE;EANR,CADK;EAShBC,SAAS,EAAE;IACTD,eAAe,EAAEZ,KAAK,CAACc,MAAN,CAAaC,KADrB;IAETC,YAAY,EAAEhB,KAAK,CAACiB,MAAN,CAAaC,OAFlB;IAGTC,aAAa,EAAE,KAHN;IAITC,UAAU,EAAE;EAJH,CATK;EAehBC,aAAa,EAAE;IACbC,iBAAiB,EAAE,EADN;IAEbC,eAA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M,KAAK,EAAE6B;EAAb,gBACE,6BAAC,cAAD;IAAM,KAAK,EAAED;EAAb,GAAyB5B,QAAzB,CADF,CADO,GAIL,IAlBN,CANF,CADF;AA6BD,CA/FD;;eAiGeD,M"}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["createStyleSheet","theme","squeezed","StyleSheet","create","boxShadow","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","backgroundColor","container","colors","white","borderRadius","radius","regular","flexDirection","alignItems","textContainer","paddingHorizontal","paddingVertical","justifyContent","flex","squeezedTextContainer","padding","spacing","small","paddingLeft","undefined","paddingRight","text","fontSize","medium","fontWeight","bold","color","black","textAlign","textSelected","unselectedImageContainer","borderRightColor","border","imageContainer","overflow","borderTopLeftRadius","borderBottomLeftRadius","image","Choice","children","isSelected","isDisabled","onPress","media","testID","prefixTestID","style","questionType","templateContext","useTemplateContext","brandTheme","styleSheet","setStylesheet","useState","useEffect","_stylesheet","selectedSuffix","mediaType","type","toLowerCase","url","src","length","getCleanUri","source","uri","mediaSuffix","textStyle","textWrapperStyle","push","selectionStyle","primary","borderColor","borderTopRightRadius","borderBottomRightRadius"],"sources":["../../../src/atom/choice/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {View, StyleSheet, ViewStyle, TextStyle} from 'react-native';\n\nimport Html from '../html/index.native';\nimport ImageBackground from '../image-background/index.native';\nimport type {Media, QuestionType} from '../../molecule/questions/types';\nimport getCleanUri from '../../util/get-clean-uri';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\n\nexport type Props = {\n isSelected?: boolean;\n onPress: () => void;\n children?: string;\n isDisabled?: boolean;\n testID?: string;\n media?: Media;\n squeezed?: boolean;\n style?: ViewStyle;\n questionType: QuestionType;\n};\n\ntype StyleSheetType = {\n boxShadow: ViewStyle;\n container: ViewStyle;\n text: TextStyle;\n textSelected: TextStyle;\n textContainer: ViewStyle;\n squeezedTextContainer: ViewStyle;\n unselectedImageContainer: ViewStyle;\n imageContainer: ViewStyle;\n image: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme, squeezed: boolean): StyleSheetType =>\n StyleSheet.create({\n boxShadow: {\n shadowColor: '#000',\n shadowOffset: {width: 0, height: 4},\n shadowOpacity: 0.12,\n shadowRadius: 16,\n elevation: 8,\n backgroundColor: '#0000'\n },\n container: {\n backgroundColor: theme.colors.white,\n borderRadius: theme.radius.regular,\n flexDirection: 'row',\n alignItems: 'stretch'\n },\n textContainer: {\n paddingHorizontal: 24,\n paddingVertical: 12,\n justifyContent: 'center',\n alignItems: 'center',\n flex: 1\n },\n squeezedTextContainer: {\n padding: theme.spacing.small,\n paddingLeft: undefined,\n paddingVertical: undefined,\n paddingRight: undefined,\n flex: 0\n },\n text: {\n fontSize: squeezed ? theme.fontSize.medium : theme.fontSize.regular,\n fontWeight: theme.fontWeight.bold,\n color: theme.colors.black,\n textAlign: 'center'\n },\n textSelected: {\n color: theme.colors.white\n },\n unselectedImageContainer: {\n borderRightColor: theme.colors.border\n },\n imageContainer: {\n height: '100%',\n width: '25%',\n overflow: 'hidden',\n borderTopLeftRadius: theme.radius.regular,\n borderBottomLeftRadius: theme.radius.regular\n },\n image: {\n flex: 1\n }\n });\n\nconst Choice = ({\n children,\n isSelected = false,\n squeezed = false,\n isDisabled,\n onPress,\n media,\n testID: prefixTestID,\n style,\n questionType\n}: Props) => {\n const templateContext = useTemplateContext();\n const {theme, brandTheme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, squeezed);\n setStylesheet(_stylesheet);\n }, [theme, squeezed]);\n\n if (!styleSheet) {\n return null;\n }\n\n const selectedSuffix = prefixTestID && isSelected ? '-selected' : '';\n const mediaType = media && media.type && media.type === 'img' && media.type.toLowerCase();\n const url =\n media &&\n media.type === 'img' &&\n media.src &&\n media.src.length > 0 &&\n getCleanUri(media.src[0].url);\n\n const source = {uri: url ? getCleanUri(url) : undefined};\n const mediaSuffix = prefixTestID && mediaType ? `-${mediaType}` : '';\n\n const textStyle: TextStyle[] = [styleSheet.text];\n const textWrapperStyle: ViewStyle[] = [styleSheet.textContainer];\n\n if (squeezed) {\n textWrapperStyle.push(styleSheet.squeezedTextContainer);\n }\n\n if (isSelected) {\n textStyle.push(styleSheet.textSelected);\n\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n const selectionStyle = brandTheme && {\n backgroundColor: brandTheme.colors?.primary,\n borderColor: brandTheme.colors?.primary,\n ...(url\n ? {\n borderTopRightRadius: theme.radius.regular,\n borderBottomRightRadius: theme.radius.regular\n }\n : {\n borderRadius: theme.radius.regular\n })\n };\n\n if (selectionStyle) {\n textWrapperStyle.push(selectionStyle);\n }\n }\n\n return (\n <Touchable\n onPress={!isDisabled ? onPress : undefined}\n style={style}\n analyticsID=\"question-choice\"\n analyticsParams={{questionType}}\n >\n <View\n style={[styleSheet.boxShadow, styleSheet.container]}\n testID={prefixTestID && `${prefixTestID}${selectedSuffix}`}\n >\n {url ? (\n <View style={styleSheet.imageContainer}>\n <ImageBackground\n testID={prefixTestID && `${prefixTestID}${mediaSuffix}`}\n source={source}\n style={styleSheet.image}\n />\n </View>\n ) : null}\n\n {children ? (\n <View style={textWrapperStyle}>\n <Html style={textStyle}>{children}</Html>\n </View>\n ) : null}\n </View>\n </Touchable>\n );\n};\n\nexport default Choice;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AA2BA,MAAMA,gBAAgB,GAAG,CAACC,KAAD,EAAeC,QAAf,KACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,WAAW,EAAE,MADJ;IAETC,YAAY,EAAE;MAACC,KAAK,EAAE,CAAR;MAAWC,MAAM,EAAE;IAAnB,CAFL;IAGTC,aAAa,EAAE,IAHN;IAITC,YAAY,EAA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AG,gBACF,6BAAC,iBAAD;IAAM,KAAK,EAAET,UAAU,CAAClB;EAAxB,gBACE,6BAAC,eAAD;IACE,MAAM,EAAEY,YAAY,IAAK,GAAEA,YAAa,GAAEqB,WAAY,EADxD;IAEE,MAAM,EAAEF,MAFV;IAGE,KAAK,EAAEb,UAAU,CAACd;EAHpB,EADF,CADE,GAQA,IAZN,EAcGE,QAAQ,gBACP,6BAAC,iBAAD;IAAM,KAAK,EAAE6B;EAAb,gBACE,6BAAC,cAAD;IAAM,KAAK,EAAED;EAAb,GAAyB5B,QAAzB,CADF,CADO,GAIL,IAlBN,CANF,CADF;AA6BD,CA/FD;;eAiGeD,M"}
|
|
@@ -107,8 +107,6 @@ const Html = props => {
|
|
|
107
107
|
numberOfLines: numberOfLines
|
|
108
108
|
}, _children), [numberOfLines]);
|
|
109
109
|
const FontRenderer = (0, _react.useCallback)((htmlAttribs, _children) => {
|
|
110
|
-
var _htmlAttribs$color;
|
|
111
|
-
|
|
112
110
|
if (htmlAttribs.color) {
|
|
113
111
|
disableBaseFontStyleColor(true);
|
|
114
112
|
}
|
|
@@ -116,7 +114,7 @@ const Html = props => {
|
|
|
116
114
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
117
115
|
key: 1,
|
|
118
116
|
style: _extends({}, baseFontStyle, {
|
|
119
|
-
color:
|
|
117
|
+
color: htmlAttribs.color?.replace(/ /g, '')
|
|
120
118
|
})
|
|
121
119
|
}, _children);
|
|
122
120
|
}, [baseFontStyle]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["HtmlBase","props","Html","templateContext","useTemplateContext","isDisabledBaseFontStyleColor","disableBaseFontStyleColor","useState","theme","children","fontSize","containerStyle","imageStyle","style","testID","anchorTextColor","HTML_ANCHOR_TEXT_COLOR","isTextCentered","numberOfLines","styles","p","marginVertical","textAlign","u","textDecorationLine","i","fontStyle","b","fontWeight","bold","s","tagsStyles","h1","h2","h3","h4","h5","h6","a","color","img","baseFontStyle","DEFAULT_TEXT_STYLE","colors","black","Array","isArray","styleObject","reduce","result","child","SpanRenderer","useCallback","htmlAttribs","_children","FontRenderer","replace","renderers","font","span","html","undefined"],"sources":["../../../src/atom/html/index.native.tsx"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport {View, ViewStyle, ImageStyle, TextStyle} from 'react-native';\nimport RenderHTML, {\n CustomRendererProps,\n MixedStyleRecord,\n RenderHTMLProps,\n TBlock\n} from 'react-native-render-html';\n\nimport {HTML_ANCHOR_TEXT_COLOR} from '../../variables/theme.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport Text, {DEFAULT_STYLE as DEFAULT_TEXT_STYLE} from '../text/index.native';\n\ninterface CustomRenderHTMLProps extends RenderHTMLProps {\n baseFontStyle?: TextStyle;\n testID?: string;\n}\n\nconst HtmlBase = (props: CustomRenderHTMLProps) => {\n return <RenderHTML {...props} />;\n};\n\nexport type Props = {\n children: string;\n fontSize?: TextStyle['fontSize'];\n numberOfLines?: number;\n onLinkPress?: (url: string) => void;\n containerStyle?: ViewStyle;\n anchorTextColor?: string;\n imageStyle?: ImageStyle;\n style?: ViewStyle | ViewStyle[];\n testID?: string;\n isTextCentered?: boolean;\n};\n\ntype Styles = {\n p: {\n marginVertical: ViewStyle['marginVertical'];\n textAlign: TextStyle['textAlign'];\n };\n u: {\n textDecorationLine: TextStyle['textDecorationLine'];\n };\n i: {\n fontStyle: TextStyle['fontStyle'];\n };\n b: {\n fontWeight: TextStyle['fontWeight'];\n };\n s: {\n textDecorationLine: TextStyle['textDecorationLine'];\n };\n};\n\nconst Html = (props: Props) => {\n const templateContext = useTemplateContext();\n const [isDisabledBaseFontStyleColor, disableBaseFontStyleColor] = useState<boolean>(false);\n const {theme} = templateContext;\n const {\n children,\n fontSize,\n containerStyle,\n imageStyle,\n style,\n testID,\n anchorTextColor = HTML_ANCHOR_TEXT_COLOR,\n isTextCentered,\n numberOfLines\n } = props;\n\n // Don't use StyleSheet there, it's not a react style\n const styles: Styles = {\n p: {\n marginVertical: 0,\n textAlign: 'center'\n },\n u: {\n textDecorationLine: 'underline'\n },\n i: {\n fontStyle: 'italic'\n },\n b: {\n fontWeight: theme.fontWeight.bold\n },\n s: {\n textDecorationLine: 'line-through'\n }\n };\n\n const tagsStyles: MixedStyleRecord = {\n ...styles,\n h1: {fontSize},\n h2: {fontSize},\n h3: {fontSize},\n h4: {fontSize},\n h5: {fontSize},\n h6: {fontSize},\n a: {color: anchorTextColor},\n img: imageStyle || {}\n };\n\n let baseFontStyle: TextStyle = {...DEFAULT_TEXT_STYLE, fontSize, color: theme.colors.black};\n if (style) {\n if (Array.isArray(style)) {\n const styleObject = style.reduce((result, child) => ({\n ...result,\n ...child\n }));\n baseFontStyle = {\n ...baseFontStyle,\n ...styleObject\n };\n } else {\n baseFontStyle = {\n ...baseFontStyle,\n ...style\n };\n }\n }\n\n const SpanRenderer = useCallback(\n (htmlAttribs: CustomRendererProps<TBlock>, _children: string) => (\n <Text numberOfLines={numberOfLines}>{_children}</Text>\n ),\n [numberOfLines]\n );\n\n interface HtmlAttrib extends CustomRendererProps<TBlock> {\n color?: string;\n }\n\n const FontRenderer = useCallback(\n (htmlAttribs: HtmlAttrib, _children: string) => {\n if (htmlAttribs.color) {\n disableBaseFontStyleColor(true);\n }\n\n return (\n <Text\n key={1}\n style={{\n ...baseFontStyle,\n color: htmlAttribs.color?.replace(/ /g, '')\n }}\n >\n {_children}\n </Text>\n );\n },\n [baseFontStyle]\n );\n\n const renderers = {\n font: FontRenderer,\n span: SpanRenderer\n };\n\n return (\n <View testID={testID} style={containerStyle}>\n <HtmlBase\n // to text-align center on android\n // we have to encapsulate between <p> tag\n // and use custom style define on <p>\n // definition in component style doesn't work\n source={{\n // eslint-disable-next-line no-nested-ternary\n html: isTextCentered\n ? `<p>${children}</p>`\n : numberOfLines\n ? `<span>${children}</span>`\n : `${children}`\n }}\n tagsStyles={tagsStyles}\n baseFontStyle={{\n ...baseFontStyle,\n color: isDisabledBaseFontStyleColor ? undefined : baseFontStyle.color\n }}\n renderers={renderers}\n // this is exceptionally for the onboarding course\n // is the only course that has a gif in the context but the img tag\n // comes with width & height attr and these makes this lib do not render the gif\n // so to avoid it, we decided to ignore these attr\n ignoredStyles={['width', 'height']}\n testID=\"html-base\"\n />\n </View>\n );\n};\n\nexport default Html;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAOA;;AACA;;AACA;;;;;;;;;;AAOA,MAAMA,QAAQ,GAAIC,KAAD,IAAkC;EACjD,oBAAO,6BAAC,8BAAD,EAAgBA,KAAhB,CAAP;AACD,CAFD;;AAoCA,MAAMC,IAAI,GAAID,KAAD,IAAkB;EAC7B,MAAME,eAAe,GAAG,IAAAC,mCAAA,GAAxB;EACA,MAAM,CAACC,4BAAD,EAA+BC,yBAA/B,IAA4D,IAAAC,eAAA,EAAkB,KAAlB,CAAlE;EACA,MAAM;IAACC;EAAD,IAAUL,eAAhB;EACA,MAAM;IACJM,QADI;IAEJC,QAFI;IAGJC,cAHI;IAIJC,UAJI;IAKJC,KALI;IAMJC,MANI;IAOJC,eAAe,GAAGC,6BAPd;IAQJC,cARI;IASJC;EATI,IAUFjB,KAVJ,CAJ6B,CAgB7B;;EACA,MAAMkB,MAAc,GAAG;IACrBC,CAAC,EAAE;MACDC,cAAc,EAAE,CADf;MAEDC,SAAS,EAAE;IAFV,CADkB;IAKrBC,CAAC,EAAE;MACDC,kBAAkB,EAAE;IADnB,CALkB;IAQrBC,CAAC,EAAE;MACDC,SAAS,EAAE;IADV,CARkB;IAWrBC,CAAC,EAAE;MACDC,UAAU,EAAEpB,KAAK,CAACoB,UAAN,CAAiBC;IAD5B,CAXkB;IAcrBC,CAAC,EAAE;MACDN,kBAAkB,EAAE;IADnB;EAdkB,CAAvB;;EAmBA,MAAMO,UAA4B,gBAC7BZ,MAD6B;IAEhCa,EAAE,EAAE;MAACtB;IAAD,CAF4B;IAGhCuB,EAAE,EAAE;MAACvB;IAAD,CAH4B;IAIhCwB,EAAE,EAAE;MAACxB;IAAD,CAJ4B;IAKhCyB,EAAE,EAAE;MAACzB;IAAD,CAL4B;IAMhC0B,EAAE,EAAE;MAAC1B;IAAD,CAN4B;IAOhC2B,EAAE,EAAE;MAAC3B;IAAD,CAP4B;IAQhC4B,CAAC,EAAE;MAACC,KAAK,EAAExB;IAAR,CAR6B;IAShCyB,GAAG,EAAE5B,UAAU,IAAI;EATa,EAAlC;;EAYA,IAAI6B,aAAwB,gBAAOC,oBAAP;IAA2BhC,QAA3B;IAAqC6B,KAAK,EAAE/B,KAAK,CAACmC,MAAN,CAAaC;EAAzD,EAA5B;;EACA,IAAI/B,KAAJ,EAAW;IACT,IAAIgC,KAAK,CAACC,OAAN,CAAcjC,KAAd,CAAJ,EAA0B;MACxB,MAAMkC,WAAW,GAAGlC,KAAK,CAACmC,MAAN,CAAa,CAACC,MAAD,EAASC,KAAT,kBAC5BD,MAD4B,EAE5BC,KAF4B,CAAb,CAApB;MAIAT,aAAa,gBACRA,aADQ,EAERM,WAFQ,CAAb;IAID,CATD,MASO;MACLN,aAAa,gBACRA,aADQ,EAER5B,KAFQ,CAAb;IAID;EACF;;EAED,MAAMsC,YAAY,GAAG,IAAAC,kBAAA,EACnB,CAACC,WAAD,EAA2CC,SAA3C,kBACE,6BAAC,cAAD;IAAM,aAAa,EAAEpC;EAArB,GAAqCoC,SAArC,CAFiB,EAInB,CAACpC,aAAD,CAJmB,CAArB;EAWA,MAAMqC,YAAY,GAAG,IAAAH,kBAAA,EACnB,CAACC,WAAD,EAA0BC,SAA1B,KAAgD;
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["HtmlBase","props","Html","templateContext","useTemplateContext","isDisabledBaseFontStyleColor","disableBaseFontStyleColor","useState","theme","children","fontSize","containerStyle","imageStyle","style","testID","anchorTextColor","HTML_ANCHOR_TEXT_COLOR","isTextCentered","numberOfLines","styles","p","marginVertical","textAlign","u","textDecorationLine","i","fontStyle","b","fontWeight","bold","s","tagsStyles","h1","h2","h3","h4","h5","h6","a","color","img","baseFontStyle","DEFAULT_TEXT_STYLE","colors","black","Array","isArray","styleObject","reduce","result","child","SpanRenderer","useCallback","htmlAttribs","_children","FontRenderer","replace","renderers","font","span","html","undefined"],"sources":["../../../src/atom/html/index.native.tsx"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport {View, ViewStyle, ImageStyle, TextStyle} from 'react-native';\nimport RenderHTML, {\n CustomRendererProps,\n MixedStyleRecord,\n RenderHTMLProps,\n TBlock\n} from 'react-native-render-html';\n\nimport {HTML_ANCHOR_TEXT_COLOR} from '../../variables/theme.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport Text, {DEFAULT_STYLE as DEFAULT_TEXT_STYLE} from '../text/index.native';\n\ninterface CustomRenderHTMLProps extends RenderHTMLProps {\n baseFontStyle?: TextStyle;\n testID?: string;\n}\n\nconst HtmlBase = (props: CustomRenderHTMLProps) => {\n return <RenderHTML {...props} />;\n};\n\nexport type Props = {\n children: string;\n fontSize?: TextStyle['fontSize'];\n numberOfLines?: number;\n onLinkPress?: (url: string) => void;\n containerStyle?: ViewStyle;\n anchorTextColor?: string;\n imageStyle?: ImageStyle;\n style?: ViewStyle | ViewStyle[];\n testID?: string;\n isTextCentered?: boolean;\n};\n\ntype Styles = {\n p: {\n marginVertical: ViewStyle['marginVertical'];\n textAlign: TextStyle['textAlign'];\n };\n u: {\n textDecorationLine: TextStyle['textDecorationLine'];\n };\n i: {\n fontStyle: TextStyle['fontStyle'];\n };\n b: {\n fontWeight: TextStyle['fontWeight'];\n };\n s: {\n textDecorationLine: TextStyle['textDecorationLine'];\n };\n};\n\nconst Html = (props: Props) => {\n const templateContext = useTemplateContext();\n const [isDisabledBaseFontStyleColor, disableBaseFontStyleColor] = useState<boolean>(false);\n const {theme} = templateContext;\n const {\n children,\n fontSize,\n containerStyle,\n imageStyle,\n style,\n testID,\n anchorTextColor = HTML_ANCHOR_TEXT_COLOR,\n isTextCentered,\n numberOfLines\n } = props;\n\n // Don't use StyleSheet there, it's not a react style\n const styles: Styles = {\n p: {\n marginVertical: 0,\n textAlign: 'center'\n },\n u: {\n textDecorationLine: 'underline'\n },\n i: {\n fontStyle: 'italic'\n },\n b: {\n fontWeight: theme.fontWeight.bold\n },\n s: {\n textDecorationLine: 'line-through'\n }\n };\n\n const tagsStyles: MixedStyleRecord = {\n ...styles,\n h1: {fontSize},\n h2: {fontSize},\n h3: {fontSize},\n h4: {fontSize},\n h5: {fontSize},\n h6: {fontSize},\n a: {color: anchorTextColor},\n img: imageStyle || {}\n };\n\n let baseFontStyle: TextStyle = {...DEFAULT_TEXT_STYLE, fontSize, color: theme.colors.black};\n if (style) {\n if (Array.isArray(style)) {\n const styleObject = style.reduce((result, child) => ({\n ...result,\n ...child\n }));\n baseFontStyle = {\n ...baseFontStyle,\n ...styleObject\n };\n } else {\n baseFontStyle = {\n ...baseFontStyle,\n ...style\n };\n }\n }\n\n const SpanRenderer = useCallback(\n (htmlAttribs: CustomRendererProps<TBlock>, _children: string) => (\n <Text numberOfLines={numberOfLines}>{_children}</Text>\n ),\n [numberOfLines]\n );\n\n interface HtmlAttrib extends CustomRendererProps<TBlock> {\n color?: string;\n }\n\n const FontRenderer = useCallback(\n (htmlAttribs: HtmlAttrib, _children: string) => {\n if (htmlAttribs.color) {\n disableBaseFontStyleColor(true);\n }\n\n return (\n <Text\n key={1}\n style={{\n ...baseFontStyle,\n color: htmlAttribs.color?.replace(/ /g, '')\n }}\n >\n {_children}\n </Text>\n );\n },\n [baseFontStyle]\n );\n\n const renderers = {\n font: FontRenderer,\n span: SpanRenderer\n };\n\n return (\n <View testID={testID} style={containerStyle}>\n <HtmlBase\n // to text-align center on android\n // we have to encapsulate between <p> tag\n // and use custom style define on <p>\n // definition in component style doesn't work\n source={{\n // eslint-disable-next-line no-nested-ternary\n html: isTextCentered\n ? `<p>${children}</p>`\n : numberOfLines\n ? `<span>${children}</span>`\n : `${children}`\n }}\n tagsStyles={tagsStyles}\n baseFontStyle={{\n ...baseFontStyle,\n color: isDisabledBaseFontStyleColor ? undefined : baseFontStyle.color\n }}\n renderers={renderers}\n // this is exceptionally for the onboarding course\n // is the only course that has a gif in the context but the img tag\n // comes with width & height attr and these makes this lib do not render the gif\n // so to avoid it, we decided to ignore these attr\n ignoredStyles={['width', 'height']}\n testID=\"html-base\"\n />\n </View>\n );\n};\n\nexport default Html;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAOA;;AACA;;AACA;;;;;;;;;;AAOA,MAAMA,QAAQ,GAAIC,KAAD,IAAkC;EACjD,oBAAO,6BAAC,8BAAD,EAAgBA,KAAhB,CAAP;AACD,CAFD;;AAoCA,MAAMC,IAAI,GAAID,KAAD,IAAkB;EAC7B,MAAME,eAAe,GAAG,IAAAC,mCAAA,GAAxB;EACA,MAAM,CAACC,4BAAD,EAA+BC,yBAA/B,IAA4D,IAAAC,eAAA,EAAkB,KAAlB,CAAlE;EACA,MAAM;IAACC;EAAD,IAAUL,eAAhB;EACA,MAAM;IACJM,QADI;IAEJC,QAFI;IAGJC,cAHI;IAIJC,UAJI;IAKJC,KALI;IAMJC,MANI;IAOJC,eAAe,GAAGC,6BAPd;IAQJC,cARI;IASJC;EATI,IAUFjB,KAVJ,CAJ6B,CAgB7B;;EACA,MAAMkB,MAAc,GAAG;IACrBC,CAAC,EAAE;MACDC,cAAc,EAAE,CADf;MAEDC,SAAS,EAAE;IAFV,CADkB;IAKrBC,CAAC,EAAE;MACDC,kBAAkB,EAAE;IADnB,CALkB;IAQrBC,CAAC,EAAE;MACDC,SAAS,EAAE;IADV,CARkB;IAWrBC,CAAC,EAAE;MACDC,UAAU,EAAEpB,KAAK,CAACoB,UAAN,CAAiBC;IAD5B,CAXkB;IAcrBC,CAAC,EAAE;MACDN,kBAAkB,EAAE;IADnB;EAdkB,CAAvB;;EAmBA,MAAMO,UAA4B,gBAC7BZ,MAD6B;IAEhCa,EAAE,EAAE;MAACtB;IAAD,CAF4B;IAGhCuB,EAAE,EAAE;MAACvB;IAAD,CAH4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