@coorpacademy/components 11.13.4 → 11.13.6
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-link/index.js +1 -1
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/style.css +0 -9
- package/es/atom/button-link/types.d.ts +1 -1
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/choice/index.native.d.ts.map +1 -1
- package/es/atom/choice/index.native.js +2 -1
- package/es/atom/choice/index.native.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/style.css +2 -1
- package/es/molecule/review-correction-popin/index.native.d.ts.map +1 -1
- package/es/molecule/review-correction-popin/index.native.js +2 -1
- package/es/molecule/review-correction-popin/index.native.js.map +1 -1
- package/es/organism/list-items/index.d.ts +20 -1
- package/es/organism/list-items/index.d.ts.map +1 -1
- package/es/organism/list-items/index.js +8 -1
- package/es/organism/list-items/index.js.map +1 -1
- package/es/organism/list-items/style.css +10 -0
- package/es/organism/review-slide/index.native.d.ts.map +1 -1
- package/es/organism/review-slide/index.native.js +25 -9
- package/es/organism/review-slide/index.native.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +18 -0
- package/lib/atom/button-link/index.js +1 -1
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/style.css +0 -9
- package/lib/atom/button-link/types.d.ts +1 -1
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/choice/index.native.d.ts.map +1 -1
- package/lib/atom/choice/index.native.js +2 -1
- package/lib/atom/choice/index.native.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/style.css +2 -1
- package/lib/molecule/review-correction-popin/index.native.d.ts.map +1 -1
- package/lib/molecule/review-correction-popin/index.native.js +2 -1
- package/lib/molecule/review-correction-popin/index.native.js.map +1 -1
- package/lib/organism/list-items/index.d.ts +20 -1
- package/lib/organism/list-items/index.d.ts.map +1 -1
- package/lib/organism/list-items/index.js +9 -1
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/organism/list-items/style.css +10 -0
- package/lib/organism/review-slide/index.native.d.ts.map +1 -1
- package/lib/organism/review-slide/index.native.js +25 -9
- package/lib/organism/review-slide/index.native.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +18 -0
- package/package.json +3 -3
|
@@ -133,20 +133,28 @@ const createQuestionStyle = theme => _reactNative.StyleSheet.create({
|
|
|
133
133
|
justifyContent: 'space-between',
|
|
134
134
|
alignItems: 'center'
|
|
135
135
|
},
|
|
136
|
+
questionOriginContainer: {
|
|
137
|
+
marginBottom: theme.spacing.tiny,
|
|
138
|
+
marginTop: theme.spacing.small
|
|
139
|
+
},
|
|
136
140
|
questionOrigin: {
|
|
137
141
|
fontSize: 12,
|
|
138
142
|
lineHeight: 16,
|
|
139
143
|
color: theme.colors.text.primary,
|
|
140
|
-
|
|
141
|
-
|
|
144
|
+
textAlign: 'center'
|
|
145
|
+
},
|
|
146
|
+
questionTextContainer: {
|
|
147
|
+
marginVertical: 4,
|
|
142
148
|
textAlign: 'center'
|
|
143
149
|
},
|
|
144
150
|
questionText: {
|
|
145
151
|
fontSize: 16,
|
|
146
152
|
lineHeight: 22,
|
|
147
153
|
fontWeight: '700',
|
|
148
|
-
color: theme.colors.text.primary
|
|
149
|
-
|
|
154
|
+
color: theme.colors.text.primary
|
|
155
|
+
},
|
|
156
|
+
questionHelpContainer: {
|
|
157
|
+
marginVertical: 4
|
|
150
158
|
},
|
|
151
159
|
questionHelp: {
|
|
152
160
|
fontSize: 12,
|
|
@@ -187,13 +195,21 @@ const Question = props => {
|
|
|
187
195
|
const hasVideoOrImage = answerUI.media?.type && [_propTypes.TYPE_VIDEO, _propTypes.TYPE_IMAGE].includes(answerUI.media.type);
|
|
188
196
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
189
197
|
style: style.questionHeading
|
|
198
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
199
|
+
style: style.questionOriginContainer
|
|
200
|
+
}, /*#__PURE__*/_react.default.createElement(_index5.default, {
|
|
201
|
+
style: style.questionOrigin,
|
|
202
|
+
isTextCentered: true
|
|
203
|
+
}, questionOrigin)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
204
|
+
style: style.questionTextContainer
|
|
205
|
+
}, /*#__PURE__*/_react.default.createElement(_index5.default, {
|
|
206
|
+
style: style.questionText,
|
|
207
|
+
isTextCentered: true
|
|
208
|
+
}, questionText)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
209
|
+
style: style.questionHelpContainer
|
|
190
210
|
}, /*#__PURE__*/_react.default.createElement(_index5.default, {
|
|
191
|
-
style: style.questionOrigin
|
|
192
|
-
}, questionOrigin), /*#__PURE__*/_react.default.createElement(_index5.default, {
|
|
193
|
-
style: style.questionText
|
|
194
|
-
}, questionText), /*#__PURE__*/_react.default.createElement(_index5.default, {
|
|
195
211
|
style: style.questionHelp
|
|
196
|
-
}, (0, _get.default)('help', answerUI))), /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
212
|
+
}, (0, _get.default)('help', answerUI)))), /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
197
213
|
style: style.choicesScrollView,
|
|
198
214
|
contentContainerStyle: style.choicesScrollContent,
|
|
199
215
|
showsHorizontalScrollIndicator: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["styles","StyleSheet","create","mediaContainer","alignItems","justifyContent","width","height","borderRadius","overflow","image","flex","correctionPopinWrapper","position","bottom","MediaView","media","autoplay","type","TYPE_VIDEO","TYPE_IMAGE","uri","url","split","TYPE_AUDIO","CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","translateUp","useTranslateY","fromValue","toValue","duration","easing","Easing","bezier","useEffect","start","klf","getOr","undefined","information","label","message","next","get","onClick","_correctionPopinProps","resultLabel","style","animatedStyle","createQuestionStyle","theme","questionHeading","questionOrigin","fontSize","lineHeight","color","colors","text","primary","marginBottom","spacing","tiny","marginTop","small","textAlign","questionText","fontWeight","questionHelp","gray","medium","choicesScrollView","choicesScrollContent","flexGrow","padding","Question","props","answerUI","isKeyboardVisible","autoplayMedia","useTemplateContext","setStyle","useState","questionStyle","hasVideoOrImage","includes","createSlideStyle","num","screenWidth","slideWidth","hiddenBackgroundToLockActions","left","right","top","backgroundColor","slide","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","Slide","validateButton","isValidated","setValidated","setKeyboardVisible","showListener","Keyboard","addListener","hideListener","remove","handleValidatePress","useCallback","dismiss","setTimeout","useWindowDimensions","slideStyle","useMemo","isFirstSlide","loading","parentContentTitle","disabled"],"sources":["../../../src/organism/review-slide/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useMemo, useState} from 'react';\n\nimport {\n Animated,\n Easing,\n Image,\n Keyboard,\n ScrollView,\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 {useTranslateY} from '@coorpacademy/react-native-animation';\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 {TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO} from '../../molecule/answer/prop-types';\nimport Video from '../../molecule/video-player-mobile/index.native';\nimport {Media} from '../../molecule/questions/types';\nimport Html from '../../atom/html/index.native';\nimport {PopinProps, ReviewSlideProps, SlideProps} from './prop-types';\n\nconst styles = StyleSheet.create({\n mediaContainer: {\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: 200,\n borderRadius: 10,\n overflow: 'hidden'\n },\n image: {\n flex: 1,\n width: '100%'\n },\n correctionPopinWrapper: {\n position: 'absolute',\n bottom: 16,\n width: '105%'\n }\n});\n\nconst MediaView = ({media, autoplay}: {media?: Media; autoplay: boolean}) => {\n if (!media) {\n return null;\n }\n\n switch (media.type) {\n case TYPE_VIDEO:\n return (\n <View style={styles.mediaContainer}>\n <Video media={media} autoplay={autoplay} />\n </View>\n );\n case TYPE_IMAGE: {\n const uri = `https://${media.url?.split('//')[1]}`;\n return <Image style={[styles.mediaContainer, styles.image]} source={{uri}} />;\n }\n case TYPE_AUDIO:\n default:\n return null;\n }\n};\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}: PopinProps) => {\n const translateUp = useTranslateY({\n fromValue: 500,\n toValue: 0,\n duration: 500,\n easing: Easing.bezier(0.34, 1.36, 0.64, 1)\n });\n\n // the translation is required only once on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => translateUp.start(), []);\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 const style = animateCorrectionPopin\n ? [styles.correctionPopinWrapper, translateUp.animatedStyle]\n : styles.correctionPopinWrapper;\n\n return (\n <Animated.View style={style}>\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </Animated.View>\n );\n};\n\ntype StyleSheetType = {\n questionHeading: ViewStyle;\n questionOrigin: ViewStyle;\n questionText: TextStyle;\n questionHelp: ViewStyle;\n choicesScrollView: ViewStyle;\n choicesScrollContent: ViewStyle;\n};\n\nconst createQuestionStyle = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n questionHeading: {\n justifyContent: 'space-between',\n alignItems: 'center'\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 choicesScrollView: {\n marginTop: 20,\n width: '100%'\n },\n choicesScrollContent: {\n flexGrow: 1,\n justifyContent: 'space-around',\n padding: 10\n }\n });\n\ntype QuestionProps = {\n autoplayMedia: boolean;\n answerUI: SlideProps['answerUI'];\n isKeyboardVisible: boolean;\n questionText: SlideProps['questionText'];\n questionOrigin: SlideProps['parentContentTitle'];\n};\n\nconst Question = (props: QuestionProps) => {\n const {\n answerUI,\n questionText,\n questionOrigin = '',\n isKeyboardVisible,\n autoplayMedia = false\n } = 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 const hasVideoOrImage =\n answerUI.media?.type && [TYPE_VIDEO, TYPE_IMAGE].includes(answerUI.media.type);\n\n return (\n <>\n <View style={style.questionHeading}>\n <Html style={style.questionOrigin}>{questionOrigin}</Html>\n <Html style={style.questionText}>{questionText}</Html>\n <Html style={style.questionHelp}>{get('help', answerUI)}</Html>\n </View>\n <ScrollView\n style={style.choicesScrollView}\n contentContainerStyle={style.choicesScrollContent}\n showsHorizontalScrollIndicator={false}\n showsVerticalScrollIndicator={false}\n >\n {!isKeyboardVisible && hasVideoOrImage ? (\n <MediaView media={answerUI.media} autoplay={autoplayMedia} />\n ) : null}\n <View\n style={{\n marginTop: hasVideoOrImage ? 30 : 0\n }}\n >\n <Answer {...answerUI} />\n </View>\n </ScrollView>\n </>\n );\n};\n\ntype SlideStyle = {\n slide: ViewStyle;\n hiddenBackgroundToLockActions: ViewStyle;\n};\n\nconst createSlideStyle = (\n num: number,\n screenWidth: number,\n isKeyboardVisible: boolean\n): SlideStyle => {\n const slideWidth = screenWidth - 40 - num * 8;\n\n return StyleSheet.create({\n hiddenBackgroundToLockActions: {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n backgroundColor: '#00000000'\n },\n slide: {\n position: 'absolute',\n left: 20 + num * 4,\n bottom: (isKeyboardVisible ? 5 : 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 {animatedStyle, slide, correctionPopinProps, validateButton, num, slideIndex = '0'} = props;\n const [isValidated, setValidated] = useState<boolean>(false);\n const [isKeyboardVisible, setKeyboardVisible] = useState<boolean>(false);\n\n useEffect(() => {\n const showListener = Keyboard.addListener('keyboardDidShow', () => {\n setKeyboardVisible(true);\n });\n\n const hideListener = Keyboard.addListener('keyboardDidHide', () => {\n setKeyboardVisible(false);\n });\n\n return () => {\n showListener.remove();\n hideListener.remove();\n };\n }, []);\n\n const handleValidatePress = useCallback(() => {\n Keyboard.dismiss();\n setValidated(true);\n\n // calling the onclick later, after react has rerendered, to display the locking BG as soon as possible\n setTimeout(() => {\n validateButton.onClick();\n }, 20);\n\n // only to create on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const {width} = useWindowDimensions();\n const slideStyle = useMemo(\n () => createSlideStyle(num, width, isKeyboardVisible),\n [num, width, isKeyboardVisible]\n );\n const isFirstSlide = num === 1;\n\n const {\n loading,\n parentContentTitle,\n questionText,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n if (loading) {\n return <View style={slideStyle.slide} />;\n }\n\n return (\n <Animated.View style={[slideStyle.slide, animatedStyle]}>\n <Question\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n autoplayMedia={isFirstSlide}\n isKeyboardVisible={isKeyboardVisible}\n key=\"question-container\"\n />\n {isKeyboardVisible ? null : (\n <Button\n disabled={isValidated || validateButton.disabled}\n submitValue={validateButton.label}\n onPress={handleValidatePress}\n testID={`slide-validate-button-${slideIndex}`}\n />\n )}\n {isValidated ? <View style={slideStyle.hiddenBackgroundToLockActions} /> : null}\n {correctionPopinProps ? (\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n ) : null}\n </Animated.View>\n );\n};\n\nexport default Slide;\n"],"mappings":";;;;;AAAA;;AAEA;;AAYA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;;;;;;;AAGA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC/BC,cAAc,EAAE;IACdC,UAAU,EAAE,QADE;IAEdC,cAAc,EAAE,QAFF;IAGdC,KAAK,EAAE,MAHO;IAIdC,MAAM,EAAE,GAJM;IAKdC,YAAY,EAAE,EALA;IAMdC,QAAQ,EAAE;EANI,CADe;EAS/BC,KAAK,EAAE;IACLC,IAAI,EAAE,CADD;IAELL,KAAK,EAAE;EAFF,CATwB;EAa/BM,sBAAsB,EAAE;IACtBC,QAAQ,EAAE,UADY;IAEtBC,MAAM,EAAE,EAFc;IAGtBR,KAAK,EAAE;EAHe;AAbO,CAAlB,CAAf;;AAoBA,MAAMS,SAAS,GAAG,CAAC;EAACC,KAAD;EAAQC;A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,YAJjB;IAKE,iBAAiB,EAAExC,iBALrB;IAME,GAAG,EAAC;EANN,EADF,EASGA,iBAAiB,GAAG,IAAH,gBAChB,6BAAC,eAAD;IACE,QAAQ,EAAEyB,WAAW,IAAID,cAAc,CAACmB,QAD1C;IAEE,WAAW,EAAEnB,cAAc,CAAC7D,KAF9B;IAGE,OAAO,EAAEsE,mBAHX;IAIE,MAAM,EAAG,yBAAwBvF,UAAW;EAJ9C,EAVJ,EAiBG+E,WAAW,gBAAG,6BAAC,iBAAD;IAAM,KAAK,EAAEa,UAAU,CAAC1B;EAAxB,EAAH,GAA+D,IAjB7E,EAkBGnE,oBAAoB,gBACnB,6BAAC,eAAD;IACE,oBAAoB,EAAEA,oBADxB;IAEE,UAAU,EAAEC,UAFd;IAGE,mBAAmB,EAAEC,mBAHvB;IAIE,sBAAsB,EAAEC,sBAJ1B;IAKE,GAAG,EAAC;EALN,EADmB,GAQjB,IA1BN,CADF;AA8BD,CAnFD;;eAqFe2E,K"}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["styles","StyleSheet","create","mediaContainer","alignItems","justifyContent","width","height","borderRadius","overflow","image","flex","correctionPopinWrapper","position","bottom","MediaView","media","autoplay","type","TYPE_VIDEO","TYPE_IMAGE","uri","url","split","TYPE_AUDIO","CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","translateUp","useTranslateY","fromValue","toValue","duration","easing","Easing","bezier","useEffect","start","klf","getOr","undefined","information","label","message","next","get","onClick","_correctionPopinProps","resultLabel","style","animatedStyle","createQuestionStyle","theme","questionHeading","questionOriginContainer","marginBottom","spacing","tiny","marginTop","small","questionOrigin","fontSize","lineHeight","color","colors","text","primary","textAlign","questionTextContainer","marginVertical","questionText","fontWeight","questionHelpContainer","questionHelp","gray","medium","choicesScrollView","choicesScrollContent","flexGrow","padding","Question","props","answerUI","isKeyboardVisible","autoplayMedia","useTemplateContext","setStyle","useState","questionStyle","hasVideoOrImage","includes","createSlideStyle","num","screenWidth","slideWidth","hiddenBackgroundToLockActions","left","right","top","backgroundColor","slide","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","Slide","validateButton","isValidated","setValidated","setKeyboardVisible","showListener","Keyboard","addListener","hideListener","remove","handleValidatePress","useCallback","dismiss","setTimeout","useWindowDimensions","slideStyle","useMemo","isFirstSlide","loading","parentContentTitle","disabled"],"sources":["../../../src/organism/review-slide/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useMemo, useState} from 'react';\n\nimport {\n Animated,\n Easing,\n Image,\n Keyboard,\n ScrollView,\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 {useTranslateY} from '@coorpacademy/react-native-animation';\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 {TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO} from '../../molecule/answer/prop-types';\nimport Video from '../../molecule/video-player-mobile/index.native';\nimport {Media} from '../../molecule/questions/types';\nimport Html from '../../atom/html/index.native';\nimport {PopinProps, ReviewSlideProps, SlideProps} from './prop-types';\n\nconst styles = StyleSheet.create({\n mediaContainer: {\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: 200,\n borderRadius: 10,\n overflow: 'hidden'\n },\n image: {\n flex: 1,\n width: '100%'\n },\n correctionPopinWrapper: {\n position: 'absolute',\n bottom: 16,\n width: '105%'\n }\n});\n\nconst MediaView = ({media, autoplay}: {media?: Media; autoplay: boolean}) => {\n if (!media) {\n return null;\n }\n\n switch (media.type) {\n case TYPE_VIDEO:\n return (\n <View style={styles.mediaContainer}>\n <Video media={media} autoplay={autoplay} />\n </View>\n );\n case TYPE_IMAGE: {\n const uri = `https://${media.url?.split('//')[1]}`;\n return <Image style={[styles.mediaContainer, styles.image]} source={{uri}} />;\n }\n case TYPE_AUDIO:\n default:\n return null;\n }\n};\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}: PopinProps) => {\n const translateUp = useTranslateY({\n fromValue: 500,\n toValue: 0,\n duration: 500,\n easing: Easing.bezier(0.34, 1.36, 0.64, 1)\n });\n\n // the translation is required only once on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => translateUp.start(), []);\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 const style = animateCorrectionPopin\n ? [styles.correctionPopinWrapper, translateUp.animatedStyle]\n : styles.correctionPopinWrapper;\n\n return (\n <Animated.View style={style}>\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </Animated.View>\n );\n};\n\ntype StyleSheetType = {\n questionHeading: ViewStyle;\n questionOriginContainer: ViewStyle;\n questionOrigin: TextStyle;\n questionTextContainer: ViewStyle;\n questionText: TextStyle;\n questionHelpContainer: ViewStyle;\n questionHelp: TextStyle;\n choicesScrollView: ViewStyle;\n choicesScrollContent: ViewStyle;\n};\n\nconst createQuestionStyle = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n questionHeading: {\n justifyContent: 'space-between',\n alignItems: 'center'\n },\n questionOriginContainer: {\n marginBottom: theme.spacing.tiny,\n marginTop: theme.spacing.small\n },\n questionOrigin: {\n fontSize: 12,\n lineHeight: 16,\n color: theme.colors.text.primary,\n textAlign: 'center'\n },\n questionTextContainer: {\n marginVertical: 4,\n textAlign: 'center'\n },\n questionText: {\n fontSize: 16,\n lineHeight: 22,\n fontWeight: '700',\n color: theme.colors.text.primary\n },\n questionHelpContainer: {\n marginVertical: 4\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 choicesScrollView: {\n marginTop: 20,\n width: '100%'\n },\n choicesScrollContent: {\n flexGrow: 1,\n justifyContent: 'space-around',\n padding: 10\n }\n });\n\ntype QuestionProps = {\n autoplayMedia: boolean;\n answerUI: SlideProps['answerUI'];\n isKeyboardVisible: boolean;\n questionText: SlideProps['questionText'];\n questionOrigin: SlideProps['parentContentTitle'];\n};\n\nconst Question = (props: QuestionProps) => {\n const {\n answerUI,\n questionText,\n questionOrigin = '',\n isKeyboardVisible,\n autoplayMedia = false\n } = 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 const hasVideoOrImage =\n answerUI.media?.type && [TYPE_VIDEO, TYPE_IMAGE].includes(answerUI.media.type);\n\n return (\n <>\n <View style={style.questionHeading}>\n <View style={style.questionOriginContainer}>\n <Html style={style.questionOrigin} isTextCentered>\n {questionOrigin}\n </Html>\n </View>\n <View style={style.questionTextContainer}>\n <Html style={style.questionText} isTextCentered>\n {questionText}\n </Html>\n </View>\n <View style={style.questionHelpContainer}>\n <Html style={style.questionHelp}>{get('help', answerUI)}</Html>\n </View>\n </View>\n <ScrollView\n style={style.choicesScrollView}\n contentContainerStyle={style.choicesScrollContent}\n showsHorizontalScrollIndicator={false}\n showsVerticalScrollIndicator={false}\n >\n {!isKeyboardVisible && hasVideoOrImage ? (\n <MediaView media={answerUI.media} autoplay={autoplayMedia} />\n ) : null}\n <View\n style={{\n marginTop: hasVideoOrImage ? 30 : 0\n }}\n >\n <Answer {...answerUI} />\n </View>\n </ScrollView>\n </>\n );\n};\n\ntype SlideStyle = {\n slide: ViewStyle;\n hiddenBackgroundToLockActions: ViewStyle;\n};\n\nconst createSlideStyle = (\n num: number,\n screenWidth: number,\n isKeyboardVisible: boolean\n): SlideStyle => {\n const slideWidth = screenWidth - 40 - num * 8;\n\n return StyleSheet.create({\n hiddenBackgroundToLockActions: {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n backgroundColor: '#00000000'\n },\n slide: {\n position: 'absolute',\n left: 20 + num * 4,\n bottom: (isKeyboardVisible ? 5 : 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 {animatedStyle, slide, correctionPopinProps, validateButton, num, slideIndex = '0'} = props;\n const [isValidated, setValidated] = useState<boolean>(false);\n const [isKeyboardVisible, setKeyboardVisible] = useState<boolean>(false);\n\n useEffect(() => {\n const showListener = Keyboard.addListener('keyboardDidShow', () => {\n setKeyboardVisible(true);\n });\n\n const hideListener = Keyboard.addListener('keyboardDidHide', () => {\n setKeyboardVisible(false);\n });\n\n return () => {\n showListener.remove();\n hideListener.remove();\n };\n }, []);\n\n const handleValidatePress = useCallback(() => {\n Keyboard.dismiss();\n setValidated(true);\n\n // calling the onclick later, after react has rerendered, to display the locking BG as soon as possible\n setTimeout(() => {\n validateButton.onClick();\n }, 20);\n\n // only to create on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const {width} = useWindowDimensions();\n const slideStyle = useMemo(\n () => createSlideStyle(num, width, isKeyboardVisible),\n [num, width, isKeyboardVisible]\n );\n const isFirstSlide = num === 1;\n\n const {\n loading,\n parentContentTitle,\n questionText,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n if (loading) {\n return <View style={slideStyle.slide} />;\n }\n\n return (\n <Animated.View style={[slideStyle.slide, animatedStyle]}>\n <Question\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n autoplayMedia={isFirstSlide}\n isKeyboardVisible={isKeyboardVisible}\n key=\"question-container\"\n />\n {isKeyboardVisible ? null : (\n <Button\n disabled={isValidated || validateButton.disabled}\n submitValue={validateButton.label}\n onPress={handleValidatePress}\n testID={`slide-validate-button-${slideIndex}`}\n />\n )}\n {isValidated ? <View style={slideStyle.hiddenBackgroundToLockActions} /> : null}\n {correctionPopinProps ? (\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n ) : null}\n </Animated.View>\n );\n};\n\nexport default Slide;\n"],"mappings":";;;;;AAAA;;AAEA;;AAYA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;;;;;;;AAGA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC/BC,cAAc,EAAE;IACdC,UAAU,EAAE,QADE;IAEdC,cAAc,EAAE,QAFF;IAGdC,KAAK,EAAE,MAHO;IAIdC,MAAM,EAAE,GAJM;IAKdC,YAAY,EAAE,EALA;IAMdC,QAAQ,EAAE;EANI,CADe;EAS/BC,KAAK,EAAE;IACLC,IAAI,EAAE,CADD;IAELL,KAAK,EAAE;EAFF,CATwB;EAa/BM,sBAAsB,EAAE;IACtBC,QAAQ,EAAE,UADY;IAEtBC,MAAM,EAAE,EAFc;IAGtBR,KAAK,EAAE;EAHe;AAbO,CAAlB,CAAf;;AAoBA,MAAMS,SAAS,GAAG,CAAC;EAACC,KAAD;EAAQC;AAAR,CAAD,KAA2D;EAC3E,IAAI,CAACD,KAAL,EAAY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A,IAAIwB,OAAJ,EAAa;IACX,oBAAO,6BAAC,iBAAD;MAAM,KAAK,EAAEH,UAAU,CAACrB;IAAxB,EAAP;EACD;;EAED,oBACE,6BAAC,qBAAD,CAAU,IAAV;IAAe,KAAK,EAAE,CAACqB,UAAU,CAACrB,KAAZ,EAAmBlD,aAAnB;EAAtB,gBACE,6BAAC,QAAD;IACE,cAAc,EAAE2E,kBADlB;IAEE,YAAY,EAAEvD,YAFhB;IAGE,QAAQ,EAAEY,QAHZ;IAIE,aAAa,EAAEyC,YAJjB;IAKE,iBAAiB,EAAExC,iBALrB;IAME,GAAG,EAAC;EANN,EADF,EASGA,iBAAiB,GAAG,IAAH,gBAChB,6BAAC,eAAD;IACE,QAAQ,EAAEyB,WAAW,IAAID,cAAc,CAACmB,QAD1C;IAEE,WAAW,EAAEnB,cAAc,CAACjE,KAF9B;IAGE,OAAO,EAAE0E,mBAHX;IAIE,MAAM,EAAG,yBAAwB3F,UAAW;EAJ9C,EAVJ,EAiBGmF,WAAW,gBAAG,6BAAC,iBAAD;IAAM,KAAK,EAAEa,UAAU,CAAC1B;EAAxB,EAAH,GAA+D,IAjB7E,EAkBGvE,oBAAoB,gBACnB,6BAAC,eAAD;IACE,oBAAoB,EAAEA,oBADxB;IAEE,UAAU,EAAEC,UAFd;IAGE,mBAAmB,EAAEC,mBAHvB;IAIE,sBAAsB,EAAEC,sBAJ1B;IAKE,GAAG,EAAC;EALN,EADmB,GAQjB,IA1BN,CADF;AA8BD,CAnFD;;eAqFe+E,K"}
|
|
@@ -777,6 +777,24 @@ declare namespace BrandUpdate {
|
|
|
777
777
|
className: PropTypes.Requireable<string>;
|
|
778
778
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
779
779
|
}>>;
|
|
780
|
+
selectMultiple: PropTypes.Requireable<PropTypes.InferProps<{
|
|
781
|
+
title: PropTypes.Requireable<string>;
|
|
782
|
+
placeholder: PropTypes.Requireable<string>;
|
|
783
|
+
description: PropTypes.Requireable<string>;
|
|
784
|
+
hint: PropTypes.Requireable<string>;
|
|
785
|
+
options: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
786
|
+
selected: PropTypes.Validator<boolean>;
|
|
787
|
+
name: PropTypes.Validator<string>;
|
|
788
|
+
value: PropTypes.Requireable<string>;
|
|
789
|
+
}>>[]>;
|
|
790
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
791
|
+
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
792
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
793
|
+
modified: PropTypes.Requireable<boolean>;
|
|
794
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
795
|
+
error: PropTypes.Requireable<string>;
|
|
796
|
+
theme: PropTypes.Requireable<string>;
|
|
797
|
+
}>>;
|
|
780
798
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
781
799
|
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
782
800
|
buttonAriaLabel: PropTypes.Requireable<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.13.
|
|
3
|
+
"version": "11.13.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"Soualmi Djamel <djamel.soualmi@coorpacademy.com>"
|
|
57
57
|
],
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@coorpacademy/nova-icons": "4.1.
|
|
59
|
+
"@coorpacademy/nova-icons": "4.1.6",
|
|
60
60
|
"@coorpacademy/react-native-animation": "1.0.3",
|
|
61
61
|
"@jwplayer/jwplayer-react": "^1.1.0",
|
|
62
62
|
"@types/react": "^17.0.50",
|
|
@@ -166,5 +166,5 @@
|
|
|
166
166
|
"last 2 versions",
|
|
167
167
|
"IE 11"
|
|
168
168
|
],
|
|
169
|
-
"gitHead": "
|
|
169
|
+
"gitHead": "476d89a1f34bb385367e7896ea204a482950ad70"
|
|
170
170
|
}
|